@cocoar/vue-calendar 1.16.0 → 1.17.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/dist/builders/types.d.ts +13 -9
- package/dist/builders/types.d.ts.map +1 -1
- package/dist/components/CoarAgendaView.vue.d.ts +46 -0
- package/dist/components/CoarAgendaView.vue.d.ts.map +1 -0
- package/dist/components/CoarCalendar.vue.d.ts +18 -18
- package/dist/components/CoarCalendar.vue.d.ts.map +1 -1
- package/dist/components/CoarDayView.vue.d.ts +38 -0
- package/dist/components/CoarDayView.vue.d.ts.map +1 -0
- package/dist/components/CoarMonthView.vue.d.ts +47 -0
- package/dist/components/CoarMonthView.vue.d.ts.map +1 -0
- package/dist/components/CoarTimeGrid.vue.d.ts +56 -0
- package/dist/components/CoarTimeGrid.vue.d.ts.map +1 -0
- package/dist/components/CoarWeekView.vue.d.ts +52 -0
- package/dist/components/CoarWeekView.vue.d.ts.map +1 -0
- package/dist/components/internal/CoarEventDecorations.vue.d.ts +1 -0
- package/dist/components/internal/CoarEventDecorations.vue.d.ts.map +1 -1
- package/dist/components/internal/agenda/CoarAgendaEvent.vue.d.ts +51 -0
- package/dist/components/internal/agenda/CoarAgendaEvent.vue.d.ts.map +1 -0
- package/dist/components/internal/month/CoarMonthBar.vue.d.ts +51 -69
- package/dist/components/internal/month/CoarMonthBar.vue.d.ts.map +1 -1
- package/dist/components/internal/month/CoarMonthCell.vue.d.ts +2 -2
- package/dist/components/internal/month/CoarMonthCell.vue.d.ts.map +1 -1
- package/dist/components/internal/month/CoarMonthPill.vue.d.ts +44 -58
- package/dist/components/internal/month/CoarMonthPill.vue.d.ts.map +1 -1
- package/dist/components/internal/month/CoarMonthRow.vue.d.ts +18 -2
- package/dist/components/internal/month/CoarMonthRow.vue.d.ts.map +1 -1
- package/dist/components/internal/time-grid/CoarTimeGridAllDayBar.vue.d.ts +53 -0
- package/dist/components/internal/time-grid/CoarTimeGridAllDayBar.vue.d.ts.map +1 -0
- package/dist/components/internal/time-grid/CoarTimeGridEvent.vue.d.ts +66 -0
- package/dist/components/internal/time-grid/CoarTimeGridEvent.vue.d.ts.map +1 -0
- package/dist/components/internal/time-grid/CoarTimeGridHeader.vue.d.ts +2 -2
- package/dist/components/internal/time-grid/CoarTimeGridHeader.vue.d.ts.map +1 -1
- package/dist/composables/useCalendarDnd.d.ts +18 -30
- package/dist/composables/useCalendarDnd.d.ts.map +1 -1
- package/dist/composables/useMonthDnd.d.ts +20 -22
- package/dist/composables/useMonthDnd.d.ts.map +1 -1
- package/dist/composables/useTimeGridDnd.d.ts +23 -25
- package/dist/composables/useTimeGridDnd.d.ts.map +1 -1
- package/dist/composables/useViewWindow.d.ts +11 -2
- package/dist/composables/useViewWindow.d.ts.map +1 -1
- package/dist/core/recurrence.d.ts.map +1 -1
- package/dist/core/recurrenceWorker.d.ts.map +1 -1
- package/dist/core/timeGridLayout.d.ts +1 -1
- package/dist/core/timeGridLayout.d.ts.map +1 -1
- package/dist/index.js +475 -474
- package/dist/vue-calendar.css +1 -1
- package/package.json +5 -4
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as e, B as t, C as n, D as r, E as i, F as a, G as o, H as s, I as c, L as l, M as u, N as d, O as f, P as p, R as m, S as h, T as g, U as _, V as v, W as y, _ as b, a as x, b as
|
|
2
|
-
import { Fragment as A, computed as j, createBlock as M, createCommentVNode as N, createElementBlock as P, createElementVNode as F, createSlots as he, createTextVNode as ge, createVNode as I, defineComponent as L, effectScope as _e, guardReactiveProps as
|
|
1
|
+
import { A as e, B as t, C as n, D as r, E as i, F as a, G as o, H as s, I as c, L as l, M as u, N as d, O as f, P as p, R as m, S as h, T as g, U as _, V as v, W as y, _ as b, a as x, b as ee, c as S, d as te, f as ne, g as C, h as re, i as w, j as T, k as ie, l as ae, m as oe, n as se, o as ce, p as le, r as E, s as ue, t as D, u as O, v as de, w as k, x as fe, y as pe, z as me } from "./core-DK63eHat.js";
|
|
2
|
+
import { Fragment as A, computed as j, createBlock as M, createCommentVNode as N, createElementBlock as P, createElementVNode as F, createSlots as he, createTextVNode as ge, createVNode as I, defineComponent as L, effectScope as _e, guardReactiveProps as R, h as ve, isRef as ye, isVNode as be, mergeProps as z, nextTick as xe, normalizeClass as B, normalizeProps as V, normalizeStyle as H, onBeforeUnmount as Se, onMounted as Ce, onScopeDispose as we, openBlock as U, ref as W, renderList as G, renderSlot as K, shallowReactive as q, shallowRef as Te, toDisplayString as J, toValue as Y, unref as X, useTemplateRef as Ee, watch as Z, watchEffect as De, withCtx as Q, withDirectives as Oe, withModifiers as ke } from "vue";
|
|
3
3
|
import { useI18n as Ae, useLocalization as je } from "@cocoar/vue-localization";
|
|
4
4
|
import { CoarButton as Me, CoarContextMenu as Ne, CoarIcon as Pe, CoarMenuItem as Fe, CoarSegmentedControl as Ie, CoarSelect as Le, useContextMenu as Re } from "@cocoar/vue-ui";
|
|
5
5
|
//#region src/builders/calendar-builder-internals.ts
|
|
@@ -12,17 +12,17 @@ function We(e, t) {
|
|
|
12
12
|
}
|
|
13
13
|
function Ge(e, t) {
|
|
14
14
|
if (typeof e == "function") throw TypeError(`[CalendarBuilder.${t}] navigation setters require a Ref or a plain value, never a getter function. api.next() / setView() must be able to write back. Pass \`ref(...)\` if you want two-way binding.`);
|
|
15
|
-
return
|
|
15
|
+
return ye(e) ? e : W(e);
|
|
16
16
|
}
|
|
17
17
|
var Ke = class e {
|
|
18
18
|
state;
|
|
19
19
|
api;
|
|
20
20
|
_loading = W(!1);
|
|
21
|
-
_visibleRange =
|
|
21
|
+
_visibleRange = Te(null);
|
|
22
22
|
_gridReady = W(!1);
|
|
23
23
|
_scrollToTimeImpl;
|
|
24
24
|
_scrollToDateImpl;
|
|
25
|
-
_loaderCache =
|
|
25
|
+
_loaderCache = Te(/* @__PURE__ */ new Map());
|
|
26
26
|
_inFlight = 0;
|
|
27
27
|
_debounceHandle = null;
|
|
28
28
|
_generation = 0;
|
|
@@ -32,7 +32,7 @@ var Ke = class e {
|
|
|
32
32
|
let e = i();
|
|
33
33
|
typeof console < "u" && e === "UTC" && console.error("[CalendarBuilder] Browser timezone detection failed and silently fell back to UTC. This builder will render every event in UTC unless you call `builder.timezone(\"Europe/Vienna\")` (or similar IANA zone) explicitly. If you intentionally want UTC, call `.timezone(\"UTC\")` to silence this error.");
|
|
34
34
|
let t = W("month"), r = W(n.Now.plainDateISO(e));
|
|
35
|
-
this.state =
|
|
35
|
+
this.state = q({
|
|
36
36
|
events: null,
|
|
37
37
|
eventsLoader: null,
|
|
38
38
|
timezone: e,
|
|
@@ -332,10 +332,10 @@ function Ye(e, t) {
|
|
|
332
332
|
//#endregion
|
|
333
333
|
//#region src/composables/useViewWindow.ts
|
|
334
334
|
var Xe = /* @__PURE__ */ new WeakSet();
|
|
335
|
-
function Ze(e) {
|
|
336
|
-
return Xe.has(e) && typeof console < "u" && console.warn("[useViewWindow] A second useViewWindow() composable mounted against the same CalendarBuilder. The C5 invariant calls for a single writer for _visibleRange — duplicate writers compute identical windows but fire onRangeChange / schedule the eventsLoader twice per change. Mount useViewWindow in exactly ONE place per builder (typically the active sub-view component)."), Xe.add(e), Z(j(() => {
|
|
335
|
+
function Ze(e, t) {
|
|
336
|
+
return t?.view && e.state.view.value !== t.view && (e.state.view.value = t.view), Xe.has(e) && typeof console < "u" && console.warn("[useViewWindow] A second useViewWindow() composable mounted against the same CalendarBuilder. The C5 invariant calls for a single writer for _visibleRange — duplicate writers compute identical windows but fire onRangeChange / schedule the eventsLoader twice per change. Mount useViewWindow in exactly ONE place per builder (typically the active sub-view component)."), Xe.add(e), Z(j(() => {
|
|
337
337
|
let t = Y(e.state.firstDayOfWeek) ?? r(Y(e.state.locale) ?? "en-US");
|
|
338
|
-
return
|
|
338
|
+
return C({
|
|
339
339
|
view: e.state.view.value,
|
|
340
340
|
cursor: e.state.date.value,
|
|
341
341
|
firstDayOfWeek: t,
|
|
@@ -347,14 +347,14 @@ function Ze(e) {
|
|
|
347
347
|
}, {
|
|
348
348
|
immediate: !0,
|
|
349
349
|
flush: "post"
|
|
350
|
-
}),
|
|
350
|
+
}), we(() => {
|
|
351
351
|
Xe.delete(e);
|
|
352
352
|
}), { visibleRange: e.api.visibleRange };
|
|
353
353
|
}
|
|
354
354
|
//#endregion
|
|
355
355
|
//#region src/composables/useCoarDrag.ts
|
|
356
356
|
function Qe(e) {
|
|
357
|
-
let t =
|
|
357
|
+
let t = Te(null), n = Te(!1), r = j(() => t.value !== null && n.value), i = 0, a = -1, o = null, s = 0, c = 0, l = 0, u = 0, d = 0, f = 0, p = !1, m = 0;
|
|
358
358
|
function h() {
|
|
359
359
|
if (e.autoScroll === null) return;
|
|
360
360
|
let t = e.surfaceRef.value;
|
|
@@ -412,24 +412,24 @@ function Qe(e) {
|
|
|
412
412
|
if (t.value === null) return;
|
|
413
413
|
m !== 0 && (cancelAnimationFrame(m), m = 0);
|
|
414
414
|
let r = g();
|
|
415
|
-
n === "drop" ? e.onDragEnd?.(r) : e.onDragCancel?.(r),
|
|
415
|
+
n === "drop" ? e.onDragEnd?.(r) : e.onDragCancel?.(r), ne();
|
|
416
416
|
}
|
|
417
|
-
function
|
|
417
|
+
function ee(e) {
|
|
418
418
|
e.pointerId === a && b("drop");
|
|
419
419
|
}
|
|
420
|
-
function
|
|
420
|
+
function S(e) {
|
|
421
421
|
e.pointerId === a && b("cancel");
|
|
422
422
|
}
|
|
423
|
-
function
|
|
423
|
+
function te(e) {
|
|
424
424
|
e.key === "Escape" && b("cancel");
|
|
425
425
|
}
|
|
426
|
-
function
|
|
426
|
+
function ne() {
|
|
427
427
|
if (o && o instanceof Element && a >= 0) try {
|
|
428
428
|
o.releasePointerCapture?.(a);
|
|
429
429
|
} catch {}
|
|
430
|
-
window.removeEventListener("pointermove", y), window.removeEventListener("pointerup",
|
|
430
|
+
window.removeEventListener("pointermove", y), window.removeEventListener("pointerup", ee), window.removeEventListener("pointercancel", S), window.removeEventListener("keydown", te), a = -1, o = null, p = !1, t.value = null, n.value = !1, i++;
|
|
431
431
|
}
|
|
432
|
-
function
|
|
432
|
+
function C(r) {
|
|
433
433
|
return (i) => {
|
|
434
434
|
if (i.button !== 0 || t.value !== null || e.onDragStart?.({
|
|
435
435
|
event: i,
|
|
@@ -442,15 +442,15 @@ function Qe(e) {
|
|
|
442
442
|
try {
|
|
443
443
|
p?.setPointerCapture?.(a);
|
|
444
444
|
} catch {}
|
|
445
|
-
window.addEventListener("pointermove", y, { passive: !0 }), window.addEventListener("pointerup",
|
|
445
|
+
window.addEventListener("pointermove", y, { passive: !0 }), window.addEventListener("pointerup", ee), window.addEventListener("pointercancel", S), window.addEventListener("keydown", te), i.preventDefault();
|
|
446
446
|
};
|
|
447
447
|
}
|
|
448
|
-
return
|
|
448
|
+
return Se(() => {
|
|
449
449
|
r.value && b("cancel"), m !== 0 && (cancelAnimationFrame(m), m = 0);
|
|
450
450
|
}), {
|
|
451
451
|
isDragging: r,
|
|
452
452
|
draggedData: t,
|
|
453
|
-
startDrag:
|
|
453
|
+
startDrag: C
|
|
454
454
|
};
|
|
455
455
|
}
|
|
456
456
|
//#endregion
|
|
@@ -499,8 +499,8 @@ function nt(e) {
|
|
|
499
499
|
let e = b.start, t = b.end;
|
|
500
500
|
t && (x = Math.max(m, (t.epochMilliseconds - e.epochMilliseconds) / 6e4));
|
|
501
501
|
}
|
|
502
|
-
let
|
|
503
|
-
return y < h * 60 || y >
|
|
502
|
+
let ee = g * 60 - x;
|
|
503
|
+
return y < h * 60 || y > ee ? null : {
|
|
504
504
|
date: u.toString(),
|
|
505
505
|
minutes: y,
|
|
506
506
|
displayZone: e.timezone.value,
|
|
@@ -548,9 +548,9 @@ function nt(e) {
|
|
|
548
548
|
if (n === null) return n;
|
|
549
549
|
let r = e.dstPolicy?.value ?? "compatible";
|
|
550
550
|
if (r === "reject") try {
|
|
551
|
-
|
|
551
|
+
E(t, n, o.value, r);
|
|
552
552
|
} catch (e) {
|
|
553
|
-
if (e instanceof
|
|
553
|
+
if (e instanceof D) return {
|
|
554
554
|
...n,
|
|
555
555
|
valid: !1
|
|
556
556
|
};
|
|
@@ -578,14 +578,14 @@ function nt(e) {
|
|
|
578
578
|
if (i && i.valid && e.onEventDrop) {
|
|
579
579
|
let t = e.dstPolicy?.value ?? "compatible";
|
|
580
580
|
try {
|
|
581
|
-
let r =
|
|
581
|
+
let r = w(t, n.data, {
|
|
582
582
|
start: g ?? n.data.start,
|
|
583
583
|
..._ === void 0 ? {} : { end: _ },
|
|
584
584
|
displayZone: h
|
|
585
585
|
}, i, o.value, m);
|
|
586
586
|
e.onEventDrop(r);
|
|
587
587
|
} catch (e) {
|
|
588
|
-
if (e instanceof
|
|
588
|
+
if (e instanceof D) r = !0;
|
|
589
589
|
else throw e;
|
|
590
590
|
}
|
|
591
591
|
} else i && i.valid === !1 && (r = !0);
|
|
@@ -632,37 +632,37 @@ function nt(e) {
|
|
|
632
632
|
c = 0, l = 0, n(t);
|
|
633
633
|
};
|
|
634
634
|
}
|
|
635
|
-
function
|
|
635
|
+
function ee(e) {
|
|
636
636
|
let t = v.startDrag(e);
|
|
637
637
|
return (e) => {
|
|
638
638
|
o.value = "timed-resize-start", c = 0, l = 0, s = 0, t(e);
|
|
639
639
|
};
|
|
640
640
|
}
|
|
641
|
-
function
|
|
641
|
+
function S(e) {
|
|
642
642
|
let t = v.startDrag(e);
|
|
643
643
|
return (e) => {
|
|
644
644
|
o.value = "timed-resize-end", c = 0, l = 0, s = 0, t(e);
|
|
645
645
|
};
|
|
646
646
|
}
|
|
647
|
-
function
|
|
647
|
+
function te(e) {
|
|
648
648
|
let t = v.startDrag(e);
|
|
649
649
|
return (e) => {
|
|
650
650
|
o.value = "allDay-resize-start", c = 0, l = 0, s = 0, t(e);
|
|
651
651
|
};
|
|
652
652
|
}
|
|
653
|
-
function
|
|
653
|
+
function ne(e) {
|
|
654
654
|
let t = v.startDrag(e);
|
|
655
655
|
return (e) => {
|
|
656
656
|
o.value = "allDay-resize-end", c = 0, l = 0, s = 0, t(e);
|
|
657
657
|
};
|
|
658
658
|
}
|
|
659
|
-
function
|
|
659
|
+
function C(e) {
|
|
660
660
|
let t = v.startDrag(e);
|
|
661
661
|
return (e) => {
|
|
662
662
|
o.value = "month-resize-start", c = 0, l = 0, s = 0, t(e);
|
|
663
663
|
};
|
|
664
664
|
}
|
|
665
|
-
function
|
|
665
|
+
function re(e) {
|
|
666
666
|
let t = v.startDrag(e);
|
|
667
667
|
return (e) => {
|
|
668
668
|
o.value = "month-resize-end", c = 0, l = 0, s = 0, t(e);
|
|
@@ -675,14 +675,14 @@ function nt(e) {
|
|
|
675
675
|
dropTarget: t,
|
|
676
676
|
snappingBack: r,
|
|
677
677
|
startDrag: y,
|
|
678
|
-
startTimedResizeStart:
|
|
679
|
-
startTimedResizeEnd:
|
|
678
|
+
startTimedResizeStart: ee,
|
|
679
|
+
startTimedResizeEnd: S,
|
|
680
680
|
startAllDayDrag: b,
|
|
681
|
-
startAllDayResizeStart:
|
|
682
|
-
startAllDayResizeEnd:
|
|
681
|
+
startAllDayResizeStart: te,
|
|
682
|
+
startAllDayResizeEnd: ne,
|
|
683
683
|
startMonthDrag: x,
|
|
684
|
-
startMonthResizeStart:
|
|
685
|
-
startMonthResizeEnd:
|
|
684
|
+
startMonthResizeStart: C,
|
|
685
|
+
startMonthResizeEnd: re
|
|
686
686
|
};
|
|
687
687
|
}
|
|
688
688
|
//#endregion
|
|
@@ -714,7 +714,8 @@ function at(e) {
|
|
|
714
714
|
timeGridTopBufferMinutes: e.topBufferMinutes,
|
|
715
715
|
canDrop: e.canDrop ? (t, n) => e.canDrop(t, {
|
|
716
716
|
date: n.date,
|
|
717
|
-
minutes: n.minutes
|
|
717
|
+
minutes: n.minutes,
|
|
718
|
+
displayZone: n.displayZone
|
|
718
719
|
}) : void 0,
|
|
719
720
|
onEventClick: (t, n) => {
|
|
720
721
|
e.onEventClick?.(t, n);
|
|
@@ -726,7 +727,7 @@ function at(e) {
|
|
|
726
727
|
let n = Y(e.events), i = t.draggedEvent.value, a = t.dropTarget.value, o = t.dragMode.value;
|
|
727
728
|
if (i && a && o) {
|
|
728
729
|
if (a.valid === !1 || o === "month") return n;
|
|
729
|
-
let t =
|
|
730
|
+
let t = E(i, a, o, e.dstPolicy ? Y(e.dstPolicy) : "compatible"), r = {
|
|
730
731
|
...i,
|
|
731
732
|
id: `${i.id}__preview`,
|
|
732
733
|
start: t.start,
|
|
@@ -759,7 +760,7 @@ function at(e) {
|
|
|
759
760
|
if (!r) return;
|
|
760
761
|
let i = Y(e.events), a = Y(e.timezone);
|
|
761
762
|
if (n === "allDay" || n === "allDay-resize-start" || n === "allDay-resize-end") {
|
|
762
|
-
let t =
|
|
763
|
+
let t = le(i, {
|
|
763
764
|
days: e.days.value,
|
|
764
765
|
timezone: a
|
|
765
766
|
}).find((e) => e.event.id === r.id);
|
|
@@ -773,7 +774,7 @@ function at(e) {
|
|
|
773
774
|
event: r
|
|
774
775
|
});
|
|
775
776
|
} else {
|
|
776
|
-
let t =
|
|
777
|
+
let t = T(r.start, a), n = oe(i, {
|
|
777
778
|
day: t,
|
|
778
779
|
timeRange: e.timeRange.value,
|
|
779
780
|
timezone: a
|
|
@@ -794,7 +795,7 @@ function at(e) {
|
|
|
794
795
|
if (!t) return;
|
|
795
796
|
let n = Y(e.events), i = Y(e.timezone);
|
|
796
797
|
if (t.mode === "allDay" || t.mode === "allDay-resize-start" || t.mode === "allDay-resize-end") {
|
|
797
|
-
let r =
|
|
798
|
+
let r = le(n, {
|
|
798
799
|
days: e.days.value,
|
|
799
800
|
timezone: i
|
|
800
801
|
}).find((e) => e.event.id === t.event.id);
|
|
@@ -808,7 +809,7 @@ function at(e) {
|
|
|
808
809
|
event: t.event
|
|
809
810
|
});
|
|
810
811
|
} else {
|
|
811
|
-
let r =
|
|
812
|
+
let r = T(t.event.start, i), a = oe(n, {
|
|
812
813
|
day: r,
|
|
813
814
|
timeRange: e.timeRange.value,
|
|
814
815
|
timezone: i
|
|
@@ -884,7 +885,7 @@ function at(e) {
|
|
|
884
885
|
let e = (t.end ?? t.start.add({ minutes: 30 })).withTimeZone(s), n = r.key === "ArrowDown" ? i : -i, a = e.hour * 60 + e.minute + n, { date: o, minutes: u } = m(e.toPlainDate(), a);
|
|
885
886
|
try {
|
|
886
887
|
return {
|
|
887
|
-
next:
|
|
888
|
+
next: E(l, {
|
|
888
889
|
date: o,
|
|
889
890
|
minutes: u,
|
|
890
891
|
displayZone: s,
|
|
@@ -901,7 +902,7 @@ function at(e) {
|
|
|
901
902
|
let e = t.start.withTimeZone(s), n = r.key === "ArrowDown" ? i : -i, o = e.hour * 60 + e.minute + n, { date: u, minutes: d } = m(e.toPlainDate(), o);
|
|
902
903
|
try {
|
|
903
904
|
return {
|
|
904
|
-
next:
|
|
905
|
+
next: E(l, {
|
|
905
906
|
date: u,
|
|
906
907
|
minutes: d,
|
|
907
908
|
displayZone: s,
|
|
@@ -920,7 +921,7 @@ function at(e) {
|
|
|
920
921
|
let e = t.start.add({ days: n });
|
|
921
922
|
try {
|
|
922
923
|
return {
|
|
923
|
-
next:
|
|
924
|
+
next: E(l, {
|
|
924
925
|
date: e.toString(),
|
|
925
926
|
minutes: null,
|
|
926
927
|
displayZone: s,
|
|
@@ -936,7 +937,7 @@ function at(e) {
|
|
|
936
937
|
let e = t.start.withTimeZone(s), r = e.toPlainDate().add({ days: n }), i = e.hour * 60 + e.minute;
|
|
937
938
|
try {
|
|
938
939
|
return {
|
|
939
|
-
next:
|
|
940
|
+
next: E(l, {
|
|
940
941
|
date: r.toString(),
|
|
941
942
|
minutes: i,
|
|
942
943
|
displayZone: s,
|
|
@@ -984,7 +985,7 @@ function at(e) {
|
|
|
984
985
|
};
|
|
985
986
|
e.onEventDrop?.(i), e.onAnnounce?.("committed", i), r.value = null;
|
|
986
987
|
let a = t.event.id;
|
|
987
|
-
|
|
988
|
+
xe(() => {
|
|
988
989
|
let e = document.querySelector(`[data-event-id="${CSS.escape(a)}"]`);
|
|
989
990
|
e instanceof HTMLElement && e.focus();
|
|
990
991
|
});
|
|
@@ -1022,7 +1023,7 @@ function at(e) {
|
|
|
1022
1023
|
startDisplayZone: s,
|
|
1023
1024
|
originalStart: c,
|
|
1024
1025
|
...l ? { originalEnd: l } : {}
|
|
1025
|
-
},
|
|
1026
|
+
}, xe(() => {
|
|
1026
1027
|
let e = document.querySelector(".coar-time-grid-event--ghost[tabindex=\"0\"], .coar-time-grid-all-day-bar--ghost[tabindex=\"0\"]");
|
|
1027
1028
|
e && e.focus({ preventScroll: !0 });
|
|
1028
1029
|
});
|
|
@@ -1052,7 +1053,8 @@ function ot(e) {
|
|
|
1052
1053
|
dstPolicy: e.dstPolicy ? j(() => Y(e.dstPolicy)) : void 0,
|
|
1053
1054
|
canDrop: e.canDrop ? (t, n) => e.canDrop(t, {
|
|
1054
1055
|
date: n.date,
|
|
1055
|
-
minutes: n.minutes
|
|
1056
|
+
minutes: n.minutes,
|
|
1057
|
+
displayZone: n.displayZone
|
|
1056
1058
|
}) : void 0,
|
|
1057
1059
|
onEventClick: (t, n) => {
|
|
1058
1060
|
e.onEventClick?.(t, n);
|
|
@@ -1064,7 +1066,7 @@ function ot(e) {
|
|
|
1064
1066
|
let n = Y(e.events), i = t.draggedEvent.value, a = t.dropTarget.value, o = t.dragMode.value;
|
|
1065
1067
|
if (i && a && o) {
|
|
1066
1068
|
if (a.valid === !1 || o !== "month" && o !== "month-resize-start" && o !== "month-resize-end") return n;
|
|
1067
|
-
let t =
|
|
1069
|
+
let t = E(i, a, o, e.dstPolicy ? Y(e.dstPolicy) : "compatible"), r = {
|
|
1068
1070
|
...i,
|
|
1069
1071
|
id: `${i.id}__preview`,
|
|
1070
1072
|
start: t.start,
|
|
@@ -1096,7 +1098,7 @@ function ot(e) {
|
|
|
1096
1098
|
if (n && !r && (i === "month" || i === "month-resize-start" || i === "month-resize-end")) {
|
|
1097
1099
|
let n = t.draggedEvent.value;
|
|
1098
1100
|
if (!n) return;
|
|
1099
|
-
let r =
|
|
1101
|
+
let r = ne(Y(e.events), {
|
|
1100
1102
|
gridDates: e.gridDates.value,
|
|
1101
1103
|
timezone: Y(e.timezone)
|
|
1102
1104
|
}), i = [], a = [];
|
|
@@ -1122,7 +1124,7 @@ function ot(e) {
|
|
|
1122
1124
|
if (t && !n) {
|
|
1123
1125
|
let t = r.value;
|
|
1124
1126
|
if (!t) return;
|
|
1125
|
-
let n =
|
|
1127
|
+
let n = ne(Y(e.events), {
|
|
1126
1128
|
gridDates: e.gridDates.value,
|
|
1127
1129
|
timezone: Y(e.timezone)
|
|
1128
1130
|
}), i = [], a = [];
|
|
@@ -1205,7 +1207,7 @@ function ot(e) {
|
|
|
1205
1207
|
let e = n.subtract({ days: 1 }).add({ days: o });
|
|
1206
1208
|
try {
|
|
1207
1209
|
return {
|
|
1208
|
-
next:
|
|
1210
|
+
next: E(s, {
|
|
1209
1211
|
date: e.toString(),
|
|
1210
1212
|
minutes: null,
|
|
1211
1213
|
displayZone: i,
|
|
@@ -1220,7 +1222,7 @@ function ot(e) {
|
|
|
1220
1222
|
let c = e.add({ days: o });
|
|
1221
1223
|
try {
|
|
1222
1224
|
return {
|
|
1223
|
-
next:
|
|
1225
|
+
next: E(s, {
|
|
1224
1226
|
date: c.toString(),
|
|
1225
1227
|
minutes: null,
|
|
1226
1228
|
displayZone: i,
|
|
@@ -1236,7 +1238,7 @@ function ot(e) {
|
|
|
1236
1238
|
let e = t.start.withTimeZone(i), n = e.toPlainDate().add({ days: o }), r = e.hour * 60 + e.minute;
|
|
1237
1239
|
try {
|
|
1238
1240
|
return {
|
|
1239
|
-
next:
|
|
1241
|
+
next: E(s, {
|
|
1240
1242
|
date: n.toString(),
|
|
1241
1243
|
minutes: r,
|
|
1242
1244
|
displayZone: i,
|
|
@@ -1274,7 +1276,7 @@ function ot(e) {
|
|
|
1274
1276
|
};
|
|
1275
1277
|
e.onEventDrop?.(i), e.onAnnounce?.("committed", i), r.value = null;
|
|
1276
1278
|
let a = t.event.id;
|
|
1277
|
-
|
|
1279
|
+
xe(() => {
|
|
1278
1280
|
let e = document.querySelector(`[data-event-id="${CSS.escape(a)}"]`);
|
|
1279
1281
|
e instanceof HTMLElement && e.focus();
|
|
1280
1282
|
});
|
|
@@ -1312,7 +1314,7 @@ function ot(e) {
|
|
|
1312
1314
|
startDisplayZone: o,
|
|
1313
1315
|
originalStart: s,
|
|
1314
1316
|
...c ? { originalEnd: c } : {}
|
|
1315
|
-
},
|
|
1317
|
+
}, xe(() => {
|
|
1316
1318
|
let e = document.querySelector(".coar-month-pill--ghost[tabindex=\"0\"], .coar-month-bar--ghost[tabindex=\"0\"]");
|
|
1317
1319
|
e && e.focus({ preventScroll: !0 });
|
|
1318
1320
|
});
|
|
@@ -1372,18 +1374,18 @@ var dt = (e) => {
|
|
|
1372
1374
|
if (!t || !n) return null;
|
|
1373
1375
|
if (typeof t == "function") {
|
|
1374
1376
|
let e = t(n);
|
|
1375
|
-
return
|
|
1377
|
+
return be(e) ? e : ve(e, n);
|
|
1376
1378
|
}
|
|
1377
|
-
return
|
|
1379
|
+
return ve(t, n);
|
|
1378
1380
|
};
|
|
1379
1381
|
dt.props = ["renderer", "ctx"], dt.displayName = "CoarRenderEvent";
|
|
1380
1382
|
var ft = (e) => {
|
|
1381
1383
|
let { renderer: t, ctx: n } = e;
|
|
1382
1384
|
if (typeof t == "function") {
|
|
1383
1385
|
let e = t(n);
|
|
1384
|
-
return
|
|
1386
|
+
return be(e) ? e : ve(e, n);
|
|
1385
1387
|
}
|
|
1386
|
-
return
|
|
1388
|
+
return ve(t, n);
|
|
1387
1389
|
};
|
|
1388
1390
|
ft.props = ["renderer", "ctx"], ft.displayName = "CoarRenderDayHeader";
|
|
1389
1391
|
//#endregion
|
|
@@ -1392,14 +1394,14 @@ var pt = ["title", "aria-label"], mt = { class: "coar-event-decorations__sr-only
|
|
|
1392
1394
|
__name: "CoarEventDecorations",
|
|
1393
1395
|
props: {
|
|
1394
1396
|
event: {},
|
|
1395
|
-
displayZone: {},
|
|
1397
|
+
displayZone: { default: void 0 },
|
|
1396
1398
|
size: { default: "xs" }
|
|
1397
1399
|
},
|
|
1398
1400
|
setup(e) {
|
|
1399
1401
|
let t = e, n = je()?.t ?? ((e, t, n) => n ?? ""), r = j(() => Ye(t.event, t.displayZone)), i = j(() => n("coar.calendar.event.utcLabel", void 0, "Global")), a = j(() => n("coar.calendar.event.utcGlobalHint", void 0, "Global event — same instant worldwide")), o = j(() => {
|
|
1400
1402
|
let e = r.value.sourceZone;
|
|
1401
1403
|
return e ? n("coar.calendar.event.crossZoneHint", { zone: e }, `Source zone: ${e}`) : "";
|
|
1402
|
-
}), s = j(() => t.size === "s" ?
|
|
1404
|
+
}), s = j(() => t.size === "s" ? "14px" : "12px");
|
|
1403
1405
|
return (e, t) => r.value.isUtcAnchored ? (U(), P("span", {
|
|
1404
1406
|
key: 0,
|
|
1405
1407
|
class: "coar-event-decorations__utc",
|
|
@@ -1422,7 +1424,7 @@ var pt = ["title", "aria-label"], mt = { class: "coar-event-decorations__sr-only
|
|
|
1422
1424
|
let n = e.__vccOpts || e;
|
|
1423
1425
|
for (let [e, r] of t) n[e] = r;
|
|
1424
1426
|
return n;
|
|
1425
|
-
}, vt = /* @__PURE__ */ $(_t, [["__scopeId", "data-v-
|
|
1427
|
+
}, vt = /* @__PURE__ */ $(_t, [["__scopeId", "data-v-c94b210c"]]), yt = [
|
|
1426
1428
|
"data-event-id",
|
|
1427
1429
|
"tabindex",
|
|
1428
1430
|
"role",
|
|
@@ -1490,7 +1492,7 @@ var pt = ["title", "aria-label"], mt = { class: "coar-event-decorations__sr-only
|
|
|
1490
1492
|
e.stopPropagation(), r("endResize", e);
|
|
1491
1493
|
}
|
|
1492
1494
|
return (t, n) => (U(), P("div", {
|
|
1493
|
-
class:
|
|
1495
|
+
class: B(["coar-time-grid-event", {
|
|
1494
1496
|
"coar-time-grid-event--clipped-top": e.clippedTop,
|
|
1495
1497
|
"coar-time-grid-event--clipped-bottom": e.clippedBottom,
|
|
1496
1498
|
"coar-time-grid-event--ghost": e.variant === "preview",
|
|
@@ -1499,7 +1501,7 @@ var pt = ["title", "aria-label"], mt = { class: "coar-event-decorations__sr-only
|
|
|
1499
1501
|
"coar-time-grid-event--snap-back": e.variant === "invalid" && e.snappingBack,
|
|
1500
1502
|
"coar-time-grid-event--density-compact": e.density === "compact"
|
|
1501
1503
|
}]),
|
|
1502
|
-
style:
|
|
1504
|
+
style: H({
|
|
1503
1505
|
top: e.top + "px",
|
|
1504
1506
|
height: e.height + "px",
|
|
1505
1507
|
left: e.left,
|
|
@@ -1544,7 +1546,7 @@ var pt = ["title", "aria-label"], mt = { class: "coar-event-decorations__sr-only
|
|
|
1544
1546
|
}, null, 32)) : N("", !0)
|
|
1545
1547
|
], 46, yt));
|
|
1546
1548
|
}
|
|
1547
|
-
}), [["__scopeId", "data-v-
|
|
1549
|
+
}), [["__scopeId", "data-v-9d7d3ab2"]]), Dt = [
|
|
1548
1550
|
"data-event-id",
|
|
1549
1551
|
"tabindex",
|
|
1550
1552
|
"role",
|
|
@@ -1611,7 +1613,7 @@ var pt = ["title", "aria-label"], mt = { class: "coar-event-decorations__sr-only
|
|
|
1611
1613
|
e.stopPropagation(), r("endResize", e);
|
|
1612
1614
|
}
|
|
1613
1615
|
return (t, n) => (U(), P("div", {
|
|
1614
|
-
class:
|
|
1616
|
+
class: B(["coar-time-grid-all-day-bar", {
|
|
1615
1617
|
"coar-time-grid-all-day-bar--clipped-start": e.clippedStart,
|
|
1616
1618
|
"coar-time-grid-all-day-bar--clipped-end": e.clippedEnd,
|
|
1617
1619
|
"coar-time-grid-all-day-bar--ghost": e.variant === "preview",
|
|
@@ -1620,7 +1622,7 @@ var pt = ["title", "aria-label"], mt = { class: "coar-event-decorations__sr-only
|
|
|
1620
1622
|
"coar-time-grid-all-day-bar--snap-back": e.variant === "invalid" && e.snappingBack,
|
|
1621
1623
|
"coar-time-grid-all-day-bar--density-compact": e.density === "compact"
|
|
1622
1624
|
}]),
|
|
1623
|
-
style:
|
|
1625
|
+
style: H({
|
|
1624
1626
|
top: e.top + "px",
|
|
1625
1627
|
left: e.left,
|
|
1626
1628
|
width: e.width,
|
|
@@ -1657,13 +1659,13 @@ var pt = ["title", "aria-label"], mt = { class: "coar-event-decorations__sr-only
|
|
|
1657
1659
|
}, null, 32)) : N("", !0)
|
|
1658
1660
|
], 46, Dt));
|
|
1659
1661
|
}
|
|
1660
|
-
}), [["__scopeId", "data-v-
|
|
1662
|
+
}), [["__scopeId", "data-v-4fac0b2d"]]), jt = /* @__PURE__ */ $(/* @__PURE__ */ L({
|
|
1661
1663
|
__name: "CoarTimeGridNowMarker",
|
|
1662
1664
|
props: { topPx: {} },
|
|
1663
1665
|
setup(e) {
|
|
1664
1666
|
return (t, n) => (U(), P("div", {
|
|
1665
1667
|
class: "coar-time-grid-now-marker",
|
|
1666
|
-
style:
|
|
1668
|
+
style: H({ top: e.topPx + "px" }),
|
|
1667
1669
|
"aria-hidden": "true"
|
|
1668
1670
|
}, [...n[0] ||= [F("span", { class: "coar-time-grid-now-marker__dot" }, null, -1), F("span", { class: "coar-time-grid-now-marker__line" }, null, -1)]], 4));
|
|
1669
1671
|
}
|
|
@@ -1680,12 +1682,12 @@ var pt = ["title", "aria-label"], mt = { class: "coar-event-decorations__sr-only
|
|
|
1680
1682
|
density: { default: "comfortable" }
|
|
1681
1683
|
},
|
|
1682
1684
|
setup(e) {
|
|
1683
|
-
return (t, n) => (U(), P("div", { class:
|
|
1685
|
+
return (t, n) => (U(), P("div", { class: B(["coar-time-grid-header", { "coar-time-grid-header--density-compact": e.density === "compact" }]) }, [n[0] ||= F("div", {
|
|
1684
1686
|
class: "coar-time-grid-header__corner",
|
|
1685
1687
|
"aria-hidden": "true"
|
|
1686
1688
|
}, null, -1), F("div", Mt, [(U(!0), P(A, null, G(e.days, (n, r) => (U(), P("div", {
|
|
1687
1689
|
key: n.toString(),
|
|
1688
|
-
class:
|
|
1690
|
+
class: B(["coar-time-grid-header__cell", {
|
|
1689
1691
|
"coar-time-grid-header__cell--today": e.isToday(n),
|
|
1690
1692
|
"coar-time-grid-header__cell--weekend": e.isWeekend(n)
|
|
1691
1693
|
}]),
|
|
@@ -1698,7 +1700,7 @@ var pt = ["title", "aria-label"], mt = { class: "coar-event-decorations__sr-only
|
|
|
1698
1700
|
isWeekend: e.isWeekend(n)
|
|
1699
1701
|
}, () => [F("span", Pt, J(e.formatLabel(n)), 1)], !0)], 10, Nt))), 128))])], 2));
|
|
1700
1702
|
}
|
|
1701
|
-
}), [["__scopeId", "data-v-
|
|
1703
|
+
}), [["__scopeId", "data-v-ed6739ff"]]), It = ["aria-label"], Lt = {
|
|
1702
1704
|
class: "coar-time-grid-all-day-band__axis",
|
|
1703
1705
|
"aria-hidden": "true"
|
|
1704
1706
|
}, Rt = ["onPointerdown"], zt = /* @__PURE__ */ $(/* @__PURE__ */ L({
|
|
@@ -1719,7 +1721,7 @@ var pt = ["title", "aria-label"], mt = { class: "coar-event-decorations__sr-only
|
|
|
1719
1721
|
}
|
|
1720
1722
|
return (t, n) => (U(), P("div", {
|
|
1721
1723
|
class: "coar-time-grid-all-day-band",
|
|
1722
|
-
style:
|
|
1724
|
+
style: H({ minHeight: e.bandHeightPx + "px" }),
|
|
1723
1725
|
role: "region",
|
|
1724
1726
|
"aria-label": e.axisLabel
|
|
1725
1727
|
}, [F("div", Lt, J(e.axisLabel), 1), F("div", {
|
|
@@ -1727,11 +1729,11 @@ var pt = ["title", "aria-label"], mt = { class: "coar-event-decorations__sr-only
|
|
|
1727
1729
|
class: "coar-time-grid-all-day-band__columns"
|
|
1728
1730
|
}, [(U(!0), P(A, null, G(e.days, (t, n) => (U(), P("div", {
|
|
1729
1731
|
key: t.toString(),
|
|
1730
|
-
class:
|
|
1732
|
+
class: B(["coar-time-grid-all-day-band__cell", {
|
|
1731
1733
|
"coar-time-grid-all-day-band__cell--today": e.isToday(t),
|
|
1732
1734
|
"coar-time-grid-all-day-band__cell--weekend": e.isWeekend(t)
|
|
1733
1735
|
}]),
|
|
1734
|
-
style:
|
|
1736
|
+
style: H({ gridColumn: n + 1 }),
|
|
1735
1737
|
onPointerdown: (e) => r(e, t)
|
|
1736
1738
|
}, null, 46, Rt))), 128)), K(t.$slots, "default", {}, void 0, !0)], 512)], 12, It));
|
|
1737
1739
|
}
|
|
@@ -1758,11 +1760,11 @@ var pt = ["title", "aria-label"], mt = { class: "coar-event-decorations__sr-only
|
|
|
1758
1760
|
r("pointerdown", e, n.day);
|
|
1759
1761
|
}
|
|
1760
1762
|
return (t, n) => (U(), P("div", {
|
|
1761
|
-
class:
|
|
1763
|
+
class: B(["coar-time-grid-column", {
|
|
1762
1764
|
"coar-time-grid-column--today": e.isToday,
|
|
1763
1765
|
"coar-time-grid-column--weekend": e.isWeekend
|
|
1764
1766
|
}]),
|
|
1765
|
-
style:
|
|
1767
|
+
style: H({
|
|
1766
1768
|
height: e.heightPx + "px",
|
|
1767
1769
|
backgroundImage: i.value,
|
|
1768
1770
|
backgroundPosition: `0 ${e.renderBufferOffsetPx}px`
|
|
@@ -1813,7 +1815,7 @@ var pt = ["title", "aria-label"], mt = { class: "coar-event-decorations__sr-only
|
|
|
1813
1815
|
}), o = j(() => a.value.events), s = j(() => a.value.timeRange), l = j(() => a.value.slotDuration), u = j(() => a.value.pixelsPerHour), d = j(() => a.value.timezone), f = je(), p = j(() => a.value.locale ?? f?.language.value ?? "en-US"), m = j(() => a.value.density), h = j(() => a.value.canDrop), g = j(() => r.dates ?? []), y = g, b = {
|
|
1814
1816
|
event: {
|
|
1815
1817
|
id: "__phantom__",
|
|
1816
|
-
start: "1970-01-01T00:00:
|
|
1818
|
+
start: n.ZonedDateTime.from("1970-01-01T00:00:00+00:00[UTC]")
|
|
1817
1819
|
},
|
|
1818
1820
|
startMinutes: 0,
|
|
1819
1821
|
endMinutes: 0,
|
|
@@ -1824,7 +1826,7 @@ var pt = ["title", "aria-label"], mt = { class: "coar-event-decorations__sr-only
|
|
|
1824
1826
|
}, x = {
|
|
1825
1827
|
event: {
|
|
1826
1828
|
id: "__phantom__",
|
|
1827
|
-
start: "1970-01-01"
|
|
1829
|
+
start: n.PlainDate.from("1970-01-01")
|
|
1828
1830
|
},
|
|
1829
1831
|
lane: 0,
|
|
1830
1832
|
laneCount: 1,
|
|
@@ -1832,19 +1834,19 @@ var pt = ["title", "aria-label"], mt = { class: "coar-event-decorations__sr-only
|
|
|
1832
1834
|
endCol: 0,
|
|
1833
1835
|
clippedStart: !1,
|
|
1834
1836
|
clippedEnd: !1
|
|
1835
|
-
},
|
|
1836
|
-
function
|
|
1837
|
-
|
|
1837
|
+
}, ee = Ee("columns"), S = W(null);
|
|
1838
|
+
function te(e) {
|
|
1839
|
+
S.value = e;
|
|
1838
1840
|
}
|
|
1839
|
-
let
|
|
1840
|
-
let e =
|
|
1841
|
+
let ne = j(() => {
|
|
1842
|
+
let e = ee.value;
|
|
1841
1843
|
for (; e && e !== document.body;) {
|
|
1842
1844
|
let t = window.getComputedStyle(e).overflowY;
|
|
1843
1845
|
if (t === "auto" || t === "scroll") return e;
|
|
1844
1846
|
e = e.parentElement;
|
|
1845
1847
|
}
|
|
1846
1848
|
return null;
|
|
1847
|
-
}), { dnd:
|
|
1849
|
+
}), { dnd: C, workingEvents: re, dragSourceSnapshot: w, dragAllDaySourceSnapshot: T, invalidTimedGhost: ie, invalidAllDayGhost: ae, isPreviewEvent: se, onEventPointerdown: ce, onEventKeydown: E, keyboardDrag: ue } = at({
|
|
1848
1850
|
events: () => o.value,
|
|
1849
1851
|
days: g,
|
|
1850
1852
|
timeRange: s,
|
|
@@ -1852,11 +1854,11 @@ var pt = ["title", "aria-label"], mt = { class: "coar-event-decorations__sr-only
|
|
|
1852
1854
|
slotDuration: l,
|
|
1853
1855
|
timezone: () => d.value,
|
|
1854
1856
|
dstPolicy: () => a.value.dstPolicy,
|
|
1855
|
-
surfaceRef:
|
|
1856
|
-
columnsRef:
|
|
1857
|
-
allDayColumnsRef:
|
|
1857
|
+
surfaceRef: ne,
|
|
1858
|
+
columnsRef: ee,
|
|
1859
|
+
allDayColumnsRef: S,
|
|
1858
1860
|
topBufferMinutes: j(() => Yt),
|
|
1859
|
-
canDrop: h.value,
|
|
1861
|
+
canDrop: h.value ?? void 0,
|
|
1860
1862
|
onEventClick: (e, t) => {
|
|
1861
1863
|
t && r.builder.state.onEventClick?.({
|
|
1862
1864
|
event: e,
|
|
@@ -1865,8 +1867,8 @@ var pt = ["title", "aria-label"], mt = { class: "coar-event-decorations__sr-only
|
|
|
1865
1867
|
},
|
|
1866
1868
|
onEventDrop: (e) => r.builder.state.onEventDrop?.(e),
|
|
1867
1869
|
onAnnounce: (e, t) => pe(e, t)
|
|
1868
|
-
}),
|
|
1869
|
-
function
|
|
1870
|
+
}), D = it();
|
|
1871
|
+
function O(e) {
|
|
1870
1872
|
let t = e.next.start instanceof n.PlainDate, r = {
|
|
1871
1873
|
dateStyle: a.value.dateStyle,
|
|
1872
1874
|
timeStyle: a.value.timeStyle,
|
|
@@ -1906,17 +1908,17 @@ var pt = ["title", "aria-label"], mt = { class: "coar-event-decorations__sr-only
|
|
|
1906
1908
|
}
|
|
1907
1909
|
function pe(e, t) {
|
|
1908
1910
|
if (e === "cancelled") {
|
|
1909
|
-
|
|
1911
|
+
D.announce(i("coar.calendar.a11y.moveCancelled", void 0, "Move cancelled"));
|
|
1910
1912
|
return;
|
|
1911
1913
|
}
|
|
1912
1914
|
if (!t) return;
|
|
1913
|
-
let n = fe(t), r =
|
|
1914
|
-
|
|
1915
|
+
let n = fe(t), r = O(t);
|
|
1916
|
+
D.announce(i("coar.calendar.a11y.eventMovedTo", {
|
|
1915
1917
|
title: n,
|
|
1916
1918
|
when: r
|
|
1917
1919
|
}, `${n} moved to ${r}`));
|
|
1918
1920
|
}
|
|
1919
|
-
let me = j(() => s.value[1] - s.value[0]), ge = j(() => me.value * 60), L = j(() => me.value * u.value + 2 * (u.value * Yt) / 60), _e = j(() => u.value * l.value / 60),
|
|
1921
|
+
let me = j(() => s.value[1] - s.value[0]), ge = j(() => me.value * 60), L = j(() => me.value * u.value + 2 * (u.value * Yt) / 60), _e = j(() => u.value * l.value / 60), R = j(() => {
|
|
1920
1922
|
let e = [], t = new Intl.DateTimeFormat(p.value, k({ hour: "numeric" }, {
|
|
1921
1923
|
timeStyle: a.value.timeStyle,
|
|
1922
1924
|
hour12: a.value.hour12
|
|
@@ -1929,43 +1931,43 @@ var pt = ["title", "aria-label"], mt = { class: "coar-event-decorations__sr-only
|
|
|
1929
1931
|
});
|
|
1930
1932
|
}
|
|
1931
1933
|
return e;
|
|
1932
|
-
}),
|
|
1933
|
-
let e =
|
|
1934
|
+
}), ve = j(() => {
|
|
1935
|
+
let e = C.draggedEvent.value, t = C.dragMode.value, n = e !== null && (t === "timed" || t === "timed-resize-start" || t === "timed-resize-end") ? `${e.id}__preview` : void 0;
|
|
1934
1936
|
return g.value.map((e) => ({
|
|
1935
1937
|
date: e,
|
|
1936
|
-
positioned:
|
|
1938
|
+
positioned: oe(re.value, {
|
|
1937
1939
|
day: e,
|
|
1938
1940
|
timeRange: s.value,
|
|
1939
1941
|
timezone: d.value,
|
|
1940
1942
|
priorityId: n
|
|
1941
1943
|
})
|
|
1942
1944
|
}));
|
|
1943
|
-
}),
|
|
1945
|
+
}), ye = j(() => le(re.value, {
|
|
1944
1946
|
days: g.value,
|
|
1945
1947
|
timezone: d.value
|
|
1946
|
-
})),
|
|
1947
|
-
function
|
|
1948
|
+
})), be = j(() => ye.value.length === 0 ? 0 : ye.value[0].laneCount), xe = j(() => be.value === 0 ? 0 : be.value * (Xt + Zt) + 8);
|
|
1949
|
+
function we(e) {
|
|
1948
1950
|
return e * u.value / 60;
|
|
1949
1951
|
}
|
|
1950
|
-
function
|
|
1951
|
-
return
|
|
1952
|
+
function q(e) {
|
|
1953
|
+
return we(e + Yt);
|
|
1952
1954
|
}
|
|
1953
|
-
let
|
|
1954
|
-
|
|
1955
|
+
let Te = W(v(d.value)), Z = W(c(d.value)), Oe = 0;
|
|
1956
|
+
Ce(() => {
|
|
1955
1957
|
Oe = window.setInterval(() => {
|
|
1956
|
-
|
|
1958
|
+
Te.value = v(d.value), Z.value = c(d.value);
|
|
1957
1959
|
}, 3e4);
|
|
1958
|
-
}),
|
|
1960
|
+
}), Se(() => {
|
|
1959
1961
|
Oe && clearInterval(Oe);
|
|
1960
1962
|
}), De(() => {
|
|
1961
|
-
|
|
1963
|
+
Te.value = v(d.value), Z.value = c(d.value);
|
|
1962
1964
|
});
|
|
1963
1965
|
let ke = j(() => {
|
|
1964
1966
|
let e = Z.value.hour * 60 + Z.value.minute - s.value[0] * 60;
|
|
1965
1967
|
return e < 0 || e >= ge.value ? null : e;
|
|
1966
1968
|
});
|
|
1967
1969
|
function Me(e) {
|
|
1968
|
-
return n.PlainDate.compare(e,
|
|
1970
|
+
return n.PlainDate.compare(e, Te.value) === 0;
|
|
1969
1971
|
}
|
|
1970
1972
|
function Ne(e) {
|
|
1971
1973
|
let t = e.dayOfWeek;
|
|
@@ -2007,7 +2009,7 @@ var pt = ["title", "aria-label"], mt = { class: "coar-event-decorations__sr-only
|
|
|
2007
2009
|
let t = Re(e);
|
|
2008
2010
|
if (_(e)) return `${t} (${i("coar.calendar.timegrid.allDay", void 0, "all-day")})`;
|
|
2009
2011
|
try {
|
|
2010
|
-
let
|
|
2012
|
+
let r = new Intl.DateTimeFormat(p.value, k({
|
|
2011
2013
|
weekday: "short",
|
|
2012
2014
|
day: "numeric",
|
|
2013
2015
|
month: "short",
|
|
@@ -2018,8 +2020,10 @@ var pt = ["title", "aria-label"], mt = { class: "coar-event-decorations__sr-only
|
|
|
2018
2020
|
dateStyle: a.value.dateStyle,
|
|
2019
2021
|
timeStyle: a.value.timeStyle,
|
|
2020
2022
|
hour12: a.value.hour12
|
|
2021
|
-
})),
|
|
2022
|
-
|
|
2023
|
+
})), i = r.formatRange;
|
|
2024
|
+
if (e.start instanceof n.PlainDate) return t;
|
|
2025
|
+
let o = new Date(e.start.epochMilliseconds), s = e.end && !(e.end instanceof n.PlainDate) ? new Date(e.end.epochMilliseconds) : o;
|
|
2026
|
+
return i ? `${t}, ${i.call(r, o, s)}` : `${t}, ${r.format(o)} – ${r.format(s)}`;
|
|
2023
2027
|
} catch {
|
|
2024
2028
|
return t;
|
|
2025
2029
|
}
|
|
@@ -2035,7 +2039,7 @@ var pt = ["title", "aria-label"], mt = { class: "coar-event-decorations__sr-only
|
|
|
2035
2039
|
return Be(e) ?? "var(--coar-color-accent, #2563eb)";
|
|
2036
2040
|
}
|
|
2037
2041
|
function Ue(e) {
|
|
2038
|
-
let t = e.hour, n =
|
|
2042
|
+
let t = e.hour, n = ne.value;
|
|
2039
2043
|
if (!n) return;
|
|
2040
2044
|
let r = (t - s.value[0]) * u.value;
|
|
2041
2045
|
n.scrollTo({
|
|
@@ -2043,19 +2047,19 @@ var pt = ["title", "aria-label"], mt = { class: "coar-event-decorations__sr-only
|
|
|
2043
2047
|
behavior: "smooth"
|
|
2044
2048
|
});
|
|
2045
2049
|
}
|
|
2046
|
-
return
|
|
2050
|
+
return Ce(() => {
|
|
2047
2051
|
r.builder._setScrollToTime(Ue);
|
|
2048
|
-
}),
|
|
2052
|
+
}), Se(() => {
|
|
2049
2053
|
r.builder._setScrollToTime(void 0);
|
|
2050
2054
|
}), t({
|
|
2051
|
-
getLayout: () =>
|
|
2055
|
+
getLayout: () => ve.value,
|
|
2052
2056
|
scrollToTime: Ue
|
|
2053
2057
|
}), (e, t) => (U(), P("div", {
|
|
2054
|
-
class:
|
|
2058
|
+
class: B(["coar-time-grid", [`coar-time-grid--density-${m.value}`]]),
|
|
2055
2059
|
role: "region",
|
|
2056
2060
|
"aria-label": X(y).length === 1 ? X(i)("coar.calendar.timegrid.dayLabel", void 0, "Day view") : X(i)("coar.calendar.timegrid.weekLabel", void 0, "Week view")
|
|
2057
2061
|
}, [
|
|
2058
|
-
F("div", Ht, J(X(
|
|
2062
|
+
F("div", Ht, J(X(D).message.value), 1),
|
|
2059
2063
|
F("div", Ut, [I(Ft, {
|
|
2060
2064
|
days: X(y),
|
|
2061
2065
|
"is-today": Me,
|
|
@@ -2064,57 +2068,57 @@ var pt = ["title", "aria-label"], mt = { class: "coar-event-decorations__sr-only
|
|
|
2064
2068
|
density: m.value
|
|
2065
2069
|
}, he({ _: 2 }, [e.$slots.dayHeader || a.value.dayHeaderRenderer ? {
|
|
2066
2070
|
name: "dayHeader",
|
|
2067
|
-
fn: Q((t) => [e.$slots.dayHeader ? K(e.$slots, "dayHeader",
|
|
2071
|
+
fn: Q((t) => [e.$slots.dayHeader ? K(e.$slots, "dayHeader", V(z({ key: 0 }, t)), void 0, !0) : a.value.dayHeaderRenderer ? (U(), M(X(ft), {
|
|
2068
2072
|
key: 1,
|
|
2069
2073
|
renderer: a.value.dayHeaderRenderer,
|
|
2070
2074
|
ctx: t
|
|
2071
2075
|
}, null, 8, ["renderer", "ctx"])) : N("", !0)]),
|
|
2072
2076
|
key: "0"
|
|
2073
|
-
} : void 0]), 1032, ["days", "density"]),
|
|
2077
|
+
} : void 0]), 1032, ["days", "density"]), be.value > 0 ? (U(), M(zt, {
|
|
2074
2078
|
key: 0,
|
|
2075
2079
|
days: X(y),
|
|
2076
2080
|
"axis-label": X(i)("coar.calendar.timegrid.allDay", void 0, "all-day"),
|
|
2077
|
-
"band-height-px":
|
|
2081
|
+
"band-height-px": xe.value,
|
|
2078
2082
|
"is-today": Me,
|
|
2079
2083
|
"is-weekend": Ne,
|
|
2080
|
-
"set-columns-el":
|
|
2084
|
+
"set-columns-el": te,
|
|
2081
2085
|
onCellPointerdown: t[0] ||= (e, t) => Le(e, t)
|
|
2082
2086
|
}, {
|
|
2083
2087
|
default: Q(() => [
|
|
2084
|
-
(U(!0), P(A, null, G(
|
|
2088
|
+
(U(!0), P(A, null, G(ye.value, (t) => (U(), M(At, {
|
|
2085
2089
|
key: t.event.id,
|
|
2086
2090
|
event: t.event,
|
|
2087
2091
|
bar: t,
|
|
2088
|
-
variant: X(
|
|
2089
|
-
"kbd-active": X(
|
|
2092
|
+
variant: X(se)(t.event.id) ? "preview" : "live",
|
|
2093
|
+
"kbd-active": X(ue) !== null,
|
|
2090
2094
|
bg: Ve(t.event),
|
|
2091
2095
|
border: He(t.event),
|
|
2092
2096
|
title: Re(t.event),
|
|
2093
|
-
"aria-label": X(
|
|
2097
|
+
"aria-label": X(se)(t.event.id) && X(ue) ? de(t.event) : ze(t.event),
|
|
2094
2098
|
density: m.value,
|
|
2095
2099
|
top: 4 + t.lane * (Xt + Zt),
|
|
2096
2100
|
left: `calc(${t.startCol / X(y).length * 100}% + ${t.startCol === 0 ? 4 : 2}px)`,
|
|
2097
2101
|
width: `calc(${(t.endCol - t.startCol + 1) / X(y).length * 100}% - ${(t.startCol === 0 ? 4 : 2) + (t.endCol === X(y).length - 1 ? 4 : 2)}px)`,
|
|
2098
2102
|
height: Xt,
|
|
2099
|
-
"z-index": X(
|
|
2103
|
+
"z-index": X(se)(t.event.id) ? 100 : 1,
|
|
2100
2104
|
"clipped-start": t.clippedStart,
|
|
2101
2105
|
"clipped-end": t.clippedEnd,
|
|
2102
|
-
onPointerdown: (e) => X(
|
|
2103
|
-
onKeydown: (e) => X(
|
|
2106
|
+
onPointerdown: (e) => X(ce)(e, t.event, X(C).startAllDayDrag),
|
|
2107
|
+
onKeydown: (e) => X(E)(e, t.event),
|
|
2104
2108
|
onDblclick: (e) => r.builder.state.onEventDoubleClick?.({
|
|
2105
2109
|
event: t.event,
|
|
2106
2110
|
native: e
|
|
2107
2111
|
}),
|
|
2108
|
-
onStartResize: (e) => X(
|
|
2109
|
-
onEndResize: (e) => X(
|
|
2112
|
+
onStartResize: (e) => X(C).startAllDayResizeStart(t.event)(e),
|
|
2113
|
+
onEndResize: (e) => X(C).startAllDayResizeEnd(t.event)(e)
|
|
2110
2114
|
}, {
|
|
2111
2115
|
default: Q(({ event: t, bar: n }) => [e.$slots.allDayEvent ? K(e.$slots, "allDayEvent", {
|
|
2112
2116
|
key: 0,
|
|
2113
2117
|
event: t,
|
|
2114
2118
|
layout: n
|
|
2115
|
-
}, void 0, !0) : a.value.
|
|
2119
|
+
}, void 0, !0) : a.value.eventRenderer ? (U(), M(X(dt), {
|
|
2116
2120
|
key: 1,
|
|
2117
|
-
renderer: a.value.
|
|
2121
|
+
renderer: a.value.eventRenderer,
|
|
2118
2122
|
ctx: {
|
|
2119
2123
|
event: t,
|
|
2120
2124
|
view: "week",
|
|
@@ -2147,22 +2151,22 @@ var pt = ["title", "aria-label"], mt = { class: "coar-event-decorations__sr-only
|
|
|
2147
2151
|
"onStartResize",
|
|
2148
2152
|
"onEndResize"
|
|
2149
2153
|
]))), 128)),
|
|
2150
|
-
X(
|
|
2154
|
+
X(T) ? (U(), M(At, {
|
|
2151
2155
|
key: 0,
|
|
2152
2156
|
variant: "phantom",
|
|
2153
|
-
event: X(
|
|
2157
|
+
event: X(T).event,
|
|
2154
2158
|
bar: x,
|
|
2155
|
-
bg: Ve(X(
|
|
2156
|
-
border: He(X(
|
|
2157
|
-
title: Re(X(
|
|
2159
|
+
bg: Ve(X(T).event),
|
|
2160
|
+
border: He(X(T).event),
|
|
2161
|
+
title: Re(X(T).event),
|
|
2158
2162
|
density: m.value,
|
|
2159
|
-
top: 4 + X(
|
|
2160
|
-
left: `calc(${X(
|
|
2161
|
-
width: `calc(${(X(
|
|
2163
|
+
top: 4 + X(T).lane * (Xt + Zt),
|
|
2164
|
+
left: `calc(${X(T).startCol / X(y).length * 100}% + ${X(T).startCol === 0 ? 4 : 2}px)`,
|
|
2165
|
+
width: `calc(${(X(T).endCol - X(T).startCol + 1) / X(y).length * 100}% - ${(X(T).startCol === 0 ? 4 : 2) + (X(T).endCol === X(y).length - 1 ? 4 : 2)}px)`,
|
|
2162
2166
|
height: Xt,
|
|
2163
2167
|
"z-index": 1,
|
|
2164
|
-
"clipped-start": X(
|
|
2165
|
-
"clipped-end": X(
|
|
2168
|
+
"clipped-start": X(T).clippedStart,
|
|
2169
|
+
"clipped-end": X(T).clippedEnd
|
|
2166
2170
|
}, null, 8, [
|
|
2167
2171
|
"event",
|
|
2168
2172
|
"bg",
|
|
@@ -2175,19 +2179,19 @@ var pt = ["title", "aria-label"], mt = { class: "coar-event-decorations__sr-only
|
|
|
2175
2179
|
"clipped-start",
|
|
2176
2180
|
"clipped-end"
|
|
2177
2181
|
])) : N("", !0),
|
|
2178
|
-
X(
|
|
2182
|
+
X(ae) && X(C).draggedEvent.value ? (U(), M(At, {
|
|
2179
2183
|
key: 1,
|
|
2180
2184
|
variant: "invalid",
|
|
2181
|
-
event: X(
|
|
2185
|
+
event: X(C).draggedEvent.value,
|
|
2182
2186
|
bar: x,
|
|
2183
|
-
bg: Ve(X(
|
|
2184
|
-
border: He(X(
|
|
2185
|
-
title: Re(X(
|
|
2186
|
-
"snapping-back": X(
|
|
2187
|
+
bg: Ve(X(C).draggedEvent.value),
|
|
2188
|
+
border: He(X(C).draggedEvent.value),
|
|
2189
|
+
title: Re(X(C).draggedEvent.value),
|
|
2190
|
+
"snapping-back": X(C).snappingBack.value,
|
|
2187
2191
|
density: m.value,
|
|
2188
|
-
top: 4 + (X(
|
|
2189
|
-
left: `calc(${X(
|
|
2190
|
-
width: `calc(${(X(
|
|
2192
|
+
top: 4 + (X(T)?.lane ?? 0) * (Xt + Zt),
|
|
2193
|
+
left: `calc(${X(ae).startCol / X(y).length * 100}% + ${X(ae).startCol === 0 ? 4 : 2}px)`,
|
|
2194
|
+
width: `calc(${(X(ae).endCol - X(ae).startCol + 1) / X(y).length * 100}% - ${(X(ae).startCol === 0 ? 4 : 2) + (X(ae).endCol === X(y).length - 1 ? 4 : 2)}px)`,
|
|
2191
2195
|
height: Xt,
|
|
2192
2196
|
"z-index": 100
|
|
2193
2197
|
}, null, 8, [
|
|
@@ -2210,23 +2214,23 @@ var pt = ["title", "aria-label"], mt = { class: "coar-event-decorations__sr-only
|
|
|
2210
2214
|
])) : N("", !0)]),
|
|
2211
2215
|
F("div", {
|
|
2212
2216
|
class: "coar-time-grid__body",
|
|
2213
|
-
style:
|
|
2217
|
+
style: H({ height: L.value + "px" })
|
|
2214
2218
|
}, [F("div", {
|
|
2215
2219
|
class: "coar-time-grid__hour-axis",
|
|
2216
|
-
style:
|
|
2217
|
-
}, [(U(!0), P(A, null, G(
|
|
2220
|
+
style: H({ height: L.value + "px" })
|
|
2221
|
+
}, [(U(!0), P(A, null, G(R.value, (e) => (U(), P("div", {
|
|
2218
2222
|
key: e.hour,
|
|
2219
2223
|
class: "coar-time-grid__hour-label",
|
|
2220
2224
|
"data-hour": e.hour,
|
|
2221
|
-
style:
|
|
2222
|
-
}, J(e.label), 13, Gt))), 128))], 4), F("div", Kt, [(U(!0), P(A, null, G(
|
|
2225
|
+
style: H({ top: q((e.hour - s.value[0]) * 60) + "px" })
|
|
2226
|
+
}, J(e.label), 13, Gt))), 128))], 4), F("div", Kt, [(U(!0), P(A, null, G(ve.value, (n) => (U(), M(Bt, {
|
|
2223
2227
|
key: n.date.toString(),
|
|
2224
2228
|
day: n.date,
|
|
2225
2229
|
"is-today": Me(n.date),
|
|
2226
2230
|
"is-weekend": Ne(n.date),
|
|
2227
2231
|
"height-px": L.value,
|
|
2228
2232
|
"slot-height-px": _e.value,
|
|
2229
|
-
"render-buffer-offset-px":
|
|
2233
|
+
"render-buffer-offset-px": we(Yt),
|
|
2230
2234
|
onPointerdown: t[1] ||= (e, t) => Ie(e, t)
|
|
2231
2235
|
}, {
|
|
2232
2236
|
default: Q(() => [
|
|
@@ -2234,29 +2238,29 @@ var pt = ["title", "aria-label"], mt = { class: "coar-event-decorations__sr-only
|
|
|
2234
2238
|
key: t.event.id,
|
|
2235
2239
|
event: t.event,
|
|
2236
2240
|
positioned: t,
|
|
2237
|
-
variant: X(
|
|
2238
|
-
"kbd-active": X(
|
|
2241
|
+
variant: X(se)(t.event.id) ? "preview" : "live",
|
|
2242
|
+
"kbd-active": X(ue) !== null,
|
|
2239
2243
|
bg: Ve(t.event),
|
|
2240
2244
|
border: He(t.event),
|
|
2241
2245
|
title: Re(t.event),
|
|
2242
2246
|
"display-zone": d.value,
|
|
2243
|
-
"aria-label": X(
|
|
2247
|
+
"aria-label": X(se)(t.event.id) && X(ue) ? de(t.event) : ze(t.event),
|
|
2244
2248
|
density: m.value,
|
|
2245
|
-
top:
|
|
2246
|
-
height: Math.max(16,
|
|
2249
|
+
top: q(t.startMinutes),
|
|
2250
|
+
height: Math.max(16, we(t.endMinutes - t.startMinutes)),
|
|
2247
2251
|
left: `calc(${t.lane / t.laneCount * 100}% + ${t.lane === 0 ? 4 : 2}px)`,
|
|
2248
2252
|
width: `calc(${100 / t.laneCount}% - ${(t.lane === 0 ? 4 : 2) + (t.lane === t.laneCount - 1 ? 4 : 2)}px)`,
|
|
2249
|
-
"z-index": X(
|
|
2253
|
+
"z-index": X(se)(t.event.id) ? 100 : t.lane + 1,
|
|
2250
2254
|
"clipped-top": t.clippedTop,
|
|
2251
2255
|
"clipped-bottom": t.clippedBottom,
|
|
2252
|
-
onPointerdown: (e) => X(
|
|
2253
|
-
onKeydown: (e) => X(
|
|
2256
|
+
onPointerdown: (e) => X(ce)(e, t.event, X(C).startDrag),
|
|
2257
|
+
onKeydown: (e) => X(E)(e, t.event),
|
|
2254
2258
|
onDblclick: (e) => r.builder.state.onEventDoubleClick?.({
|
|
2255
2259
|
event: t.event,
|
|
2256
2260
|
native: e
|
|
2257
2261
|
}),
|
|
2258
|
-
onStartResize: (e) => X(
|
|
2259
|
-
onEndResize: (e) => X(
|
|
2262
|
+
onStartResize: (e) => X(C).startTimedResizeStart(t.event)(e),
|
|
2263
|
+
onEndResize: (e) => X(C).startTimedResizeEnd(t.event)(e)
|
|
2260
2264
|
}, {
|
|
2261
2265
|
default: Q(({ event: t, positioned: n }) => [e.$slots.event ? K(e.$slots, "event", {
|
|
2262
2266
|
key: 0,
|
|
@@ -2299,21 +2303,21 @@ var pt = ["title", "aria-label"], mt = { class: "coar-event-decorations__sr-only
|
|
|
2299
2303
|
"onStartResize",
|
|
2300
2304
|
"onEndResize"
|
|
2301
2305
|
]))), 128)),
|
|
2302
|
-
X(
|
|
2306
|
+
X(w) && X(w).dayKey === n.date.toString() ? (U(), M(Et, {
|
|
2303
2307
|
key: 0,
|
|
2304
2308
|
variant: "phantom",
|
|
2305
|
-
event: X(
|
|
2309
|
+
event: X(w).event,
|
|
2306
2310
|
positioned: b,
|
|
2307
|
-
bg: Ve(X(
|
|
2308
|
-
border: He(X(
|
|
2309
|
-
title: Re(X(
|
|
2311
|
+
bg: Ve(X(w).event),
|
|
2312
|
+
border: He(X(w).event),
|
|
2313
|
+
title: Re(X(w).event),
|
|
2310
2314
|
"display-zone": d.value,
|
|
2311
2315
|
density: m.value,
|
|
2312
|
-
top:
|
|
2313
|
-
height: Math.max(16,
|
|
2314
|
-
left: `calc(${X(
|
|
2315
|
-
width: `calc(${100 / X(
|
|
2316
|
-
"z-index": X(
|
|
2316
|
+
top: q(X(w).startMinutes),
|
|
2317
|
+
height: Math.max(16, we(X(w).endMinutes - X(w).startMinutes)),
|
|
2318
|
+
left: `calc(${X(w).lane / X(w).laneCount * 100}% + ${X(w).lane === 0 ? 4 : 2}px)`,
|
|
2319
|
+
width: `calc(${100 / X(w).laneCount}% - ${(X(w).lane === 0 ? 4 : 2) + (X(w).lane === X(w).laneCount - 1 ? 4 : 2)}px)`,
|
|
2320
|
+
"z-index": X(w).lane + 1
|
|
2317
2321
|
}, null, 8, [
|
|
2318
2322
|
"event",
|
|
2319
2323
|
"bg",
|
|
@@ -2327,18 +2331,18 @@ var pt = ["title", "aria-label"], mt = { class: "coar-event-decorations__sr-only
|
|
|
2327
2331
|
"width",
|
|
2328
2332
|
"z-index"
|
|
2329
2333
|
])) : N("", !0),
|
|
2330
|
-
X(
|
|
2334
|
+
X(ie) && X(ie).dayKey === n.date.toString() && X(C).draggedEvent.value ? (U(), M(Et, {
|
|
2331
2335
|
key: 1,
|
|
2332
2336
|
variant: "invalid",
|
|
2333
|
-
event: X(
|
|
2337
|
+
event: X(C).draggedEvent.value,
|
|
2334
2338
|
positioned: b,
|
|
2335
|
-
bg: Ve(X(
|
|
2336
|
-
border: He(X(
|
|
2337
|
-
title: Re(X(
|
|
2338
|
-
"snapping-back": X(
|
|
2339
|
+
bg: Ve(X(C).draggedEvent.value),
|
|
2340
|
+
border: He(X(C).draggedEvent.value),
|
|
2341
|
+
title: Re(X(C).draggedEvent.value),
|
|
2342
|
+
"snapping-back": X(C).snappingBack.value,
|
|
2339
2343
|
density: m.value,
|
|
2340
|
-
top:
|
|
2341
|
-
height: Math.max(16,
|
|
2344
|
+
top: q(X(ie).startMinutes),
|
|
2345
|
+
height: Math.max(16, we(X(ie).durationMinutes)),
|
|
2342
2346
|
left: "calc(0% + 4px)",
|
|
2343
2347
|
width: "calc(100% - 8px)",
|
|
2344
2348
|
"z-index": 100
|
|
@@ -2354,7 +2358,7 @@ var pt = ["title", "aria-label"], mt = { class: "coar-event-decorations__sr-only
|
|
|
2354
2358
|
])) : N("", !0),
|
|
2355
2359
|
Me(n.date) && ke.value !== null ? (U(), M(jt, {
|
|
2356
2360
|
key: 2,
|
|
2357
|
-
"top-px":
|
|
2361
|
+
"top-px": q(ke.value)
|
|
2358
2362
|
}, null, 8, ["top-px"])) : N("", !0)
|
|
2359
2363
|
]),
|
|
2360
2364
|
_: 2
|
|
@@ -2368,36 +2372,32 @@ var pt = ["title", "aria-label"], mt = { class: "coar-event-decorations__sr-only
|
|
|
2368
2372
|
]))), 128))], 512)], 4)
|
|
2369
2373
|
], 10, Vt));
|
|
2370
2374
|
}
|
|
2371
|
-
}), [["__scopeId", "data-v-
|
|
2375
|
+
}), [["__scopeId", "data-v-7e4afbd4"]]), $t = { class: "coar-day-view" }, en = /* @__PURE__ */ $(/* @__PURE__ */ L({
|
|
2372
2376
|
__name: "CoarDayView",
|
|
2373
2377
|
props: { builder: {} },
|
|
2374
2378
|
setup(e) {
|
|
2375
2379
|
let t = e;
|
|
2376
|
-
Ze(t.builder, { view: "day" })
|
|
2377
|
-
t.builder.state.view.value !== "day" && (t.builder.state.view.value = "day");
|
|
2378
|
-
});
|
|
2380
|
+
Ze(t.builder, { view: "day" });
|
|
2379
2381
|
let n = j(() => [t.builder.state.date.value]);
|
|
2380
2382
|
return (t, r) => (U(), P("div", $t, [I(Qt, {
|
|
2381
2383
|
builder: e.builder,
|
|
2382
2384
|
dates: n.value
|
|
2383
2385
|
}, he({ _: 2 }, [t.$slots.event ? {
|
|
2384
2386
|
name: "event",
|
|
2385
|
-
fn: Q((e) => [K(t.$slots, "event",
|
|
2387
|
+
fn: Q((e) => [K(t.$slots, "event", V(R(e)), void 0, !0)]),
|
|
2386
2388
|
key: "0"
|
|
2387
2389
|
} : void 0, t.$slots.dayHeader ? {
|
|
2388
2390
|
name: "dayHeader",
|
|
2389
|
-
fn: Q((e) => [K(t.$slots, "dayHeader",
|
|
2391
|
+
fn: Q((e) => [K(t.$slots, "dayHeader", V(R(e)), void 0, !0)]),
|
|
2390
2392
|
key: "1"
|
|
2391
2393
|
} : void 0]), 1032, ["builder", "dates"])]));
|
|
2392
2394
|
}
|
|
2393
|
-
}), [["__scopeId", "data-v-
|
|
2395
|
+
}), [["__scopeId", "data-v-639564d0"]]), tn = { class: "coar-week-view" }, nn = /* @__PURE__ */ $(/* @__PURE__ */ L({
|
|
2394
2396
|
__name: "CoarWeekView",
|
|
2395
2397
|
props: { builder: {} },
|
|
2396
2398
|
setup(e, { expose: t }) {
|
|
2397
2399
|
let n = e;
|
|
2398
|
-
Ze(n.builder, { view: "week" })
|
|
2399
|
-
n.builder.state.view.value !== "week" && (n.builder.state.view.value = "week");
|
|
2400
|
-
});
|
|
2400
|
+
Ze(n.builder, { view: "week" });
|
|
2401
2401
|
let i = je(), a = j(() => Y(n.builder.state.locale) ?? i?.language.value ?? "en-US"), o = j(() => Y(n.builder.state.firstDayOfWeek) ?? r(a.value)), c = j(() => s(n.builder.state.date.value, o.value));
|
|
2402
2402
|
return t({ getVisibleRange() {
|
|
2403
2403
|
let e = c.value;
|
|
@@ -2411,22 +2411,22 @@ var pt = ["title", "aria-label"], mt = { class: "coar-event-decorations__sr-only
|
|
|
2411
2411
|
}, he({ _: 2 }, [
|
|
2412
2412
|
t.$slots.event ? {
|
|
2413
2413
|
name: "event",
|
|
2414
|
-
fn: Q((e) => [K(t.$slots, "event",
|
|
2414
|
+
fn: Q((e) => [K(t.$slots, "event", V(R(e)), void 0, !0)]),
|
|
2415
2415
|
key: "0"
|
|
2416
2416
|
} : void 0,
|
|
2417
2417
|
t.$slots.allDayEvent ? {
|
|
2418
2418
|
name: "allDayEvent",
|
|
2419
|
-
fn: Q((e) => [K(t.$slots, "allDayEvent",
|
|
2419
|
+
fn: Q((e) => [K(t.$slots, "allDayEvent", V(R(e)), void 0, !0)]),
|
|
2420
2420
|
key: "1"
|
|
2421
2421
|
} : void 0,
|
|
2422
2422
|
t.$slots.dayHeader ? {
|
|
2423
2423
|
name: "dayHeader",
|
|
2424
|
-
fn: Q((e) => [K(t.$slots, "dayHeader",
|
|
2424
|
+
fn: Q((e) => [K(t.$slots, "dayHeader", V(R(e)), void 0, !0)]),
|
|
2425
2425
|
key: "2"
|
|
2426
2426
|
} : void 0
|
|
2427
2427
|
]), 1032, ["builder", "dates"])]));
|
|
2428
2428
|
}
|
|
2429
|
-
}), [["__scopeId", "data-v-
|
|
2429
|
+
}), [["__scopeId", "data-v-29a99a70"]]), rn = 20, an = 2, on = 24, sn = 76, cn = 100, ln = 300;
|
|
2430
2430
|
function un(e) {
|
|
2431
2431
|
function t(e) {
|
|
2432
2432
|
return on + e * (rn + an);
|
|
@@ -2467,9 +2467,9 @@ function un(e) {
|
|
|
2467
2467
|
e.layout,
|
|
2468
2468
|
i,
|
|
2469
2469
|
r
|
|
2470
|
-
], () =>
|
|
2471
|
-
|
|
2472
|
-
}),
|
|
2470
|
+
], () => xe(c), { deep: !1 }), Ce(() => {
|
|
2471
|
+
xe(c), window.addEventListener("resize", c);
|
|
2472
|
+
}), Se(() => {
|
|
2473
2473
|
window.removeEventListener("resize", c);
|
|
2474
2474
|
}), Z(e.resetToken, () => {
|
|
2475
2475
|
r.value = /* @__PURE__ */ new Set();
|
|
@@ -2532,14 +2532,14 @@ var dn = [
|
|
|
2532
2532
|
i.value && (e.stopPropagation(), r("dblclick", e));
|
|
2533
2533
|
}
|
|
2534
2534
|
return (t, n) => (U(), P("div", {
|
|
2535
|
-
class:
|
|
2535
|
+
class: B(["coar-month-pill", {
|
|
2536
2536
|
"coar-month-pill--ghost": e.variant === "preview",
|
|
2537
2537
|
"coar-month-pill--source-phantom": e.variant === "phantom",
|
|
2538
2538
|
"coar-month-pill--invalid": e.variant === "invalid",
|
|
2539
2539
|
"coar-month-pill--snap-back": e.variant === "invalid" && e.snappingBack,
|
|
2540
2540
|
"coar-month-pill--density-compact": e.density === "compact"
|
|
2541
2541
|
}]),
|
|
2542
|
-
style:
|
|
2542
|
+
style: H({
|
|
2543
2543
|
background: e.bg,
|
|
2544
2544
|
borderLeft: `3px solid ${e.border}`
|
|
2545
2545
|
}),
|
|
@@ -2565,7 +2565,7 @@ var dn = [
|
|
|
2565
2565
|
size: "xs"
|
|
2566
2566
|
}, null, 8, ["event", "display-zone"]), F("span", pn, J(e.title), 1)], 64))], 46, dn));
|
|
2567
2567
|
}
|
|
2568
|
-
}), [["__scopeId", "data-v-
|
|
2568
|
+
}), [["__scopeId", "data-v-ca59e6dd"]]), hn = [
|
|
2569
2569
|
"data-event-id",
|
|
2570
2570
|
"tabindex",
|
|
2571
2571
|
"role",
|
|
@@ -2630,7 +2630,7 @@ var dn = [
|
|
|
2630
2630
|
e.stopPropagation(), r("endResize", e);
|
|
2631
2631
|
}
|
|
2632
2632
|
return (t, n) => (U(), P("div", {
|
|
2633
|
-
class:
|
|
2633
|
+
class: B(["coar-month-bar", {
|
|
2634
2634
|
"coar-month-bar--clipped-start": e.clippedStart,
|
|
2635
2635
|
"coar-month-bar--clipped-end": e.clippedEnd,
|
|
2636
2636
|
"coar-month-bar--ghost": e.variant === "preview",
|
|
@@ -2639,7 +2639,7 @@ var dn = [
|
|
|
2639
2639
|
"coar-month-bar--snap-back": e.variant === "invalid" && e.snappingBack,
|
|
2640
2640
|
"coar-month-bar--density-compact": e.density === "compact"
|
|
2641
2641
|
}]),
|
|
2642
|
-
style:
|
|
2642
|
+
style: H({
|
|
2643
2643
|
top: e.top + "px",
|
|
2644
2644
|
left: e.left,
|
|
2645
2645
|
width: e.width,
|
|
@@ -2686,7 +2686,7 @@ var dn = [
|
|
|
2686
2686
|
}, null, 32)) : N("", !0)
|
|
2687
2687
|
], 46, hn));
|
|
2688
2688
|
}
|
|
2689
|
-
}), [["__scopeId", "data-v-
|
|
2689
|
+
}), [["__scopeId", "data-v-aae90a51"]]), yn = [
|
|
2690
2690
|
"data-day-key",
|
|
2691
2691
|
"aria-rowindex",
|
|
2692
2692
|
"aria-colindex",
|
|
@@ -2737,7 +2737,7 @@ var dn = [
|
|
|
2737
2737
|
r("kebabClick", e, n.day);
|
|
2738
2738
|
}
|
|
2739
2739
|
return (t, n) => (U(), P("div", {
|
|
2740
|
-
class:
|
|
2740
|
+
class: B(["coar-month-cell", {
|
|
2741
2741
|
"coar-month-cell--today": e.isToday,
|
|
2742
2742
|
"coar-month-cell--other-month": e.isOtherMonth,
|
|
2743
2743
|
"coar-month-cell--weekend": e.isWeekend,
|
|
@@ -2785,10 +2785,10 @@ var dn = [
|
|
|
2785
2785
|
})
|
|
2786
2786
|
], -1)]], 40, Sn)]), F("div", {
|
|
2787
2787
|
class: "coar-month-cell__pills",
|
|
2788
|
-
style:
|
|
2788
|
+
style: H({ marginTop: e.pillsMarginTopPx + "px" })
|
|
2789
2789
|
}, [K(t.$slots, "default", {}, void 0, !0)], 4)], 42, yn));
|
|
2790
2790
|
}
|
|
2791
|
-
}), [["__scopeId", "data-v-
|
|
2791
|
+
}), [["__scopeId", "data-v-a2e2a614"]]), wn = /* @__PURE__ */ $(/* @__PURE__ */ L({
|
|
2792
2792
|
__name: "CoarMonthRow",
|
|
2793
2793
|
props: {
|
|
2794
2794
|
heightPx: {},
|
|
@@ -2796,12 +2796,12 @@ var dn = [
|
|
|
2796
2796
|
},
|
|
2797
2797
|
setup(e) {
|
|
2798
2798
|
return (t, n) => (U(), P("div", {
|
|
2799
|
-
class:
|
|
2800
|
-
style:
|
|
2799
|
+
class: B(["coar-month-row", { "coar-month-row--density-compact": e.density === "compact" }]),
|
|
2800
|
+
style: H({ height: e.heightPx + "px" }),
|
|
2801
2801
|
role: "row"
|
|
2802
2802
|
}, [K(t.$slots, "default", {}, void 0, !0)], 6));
|
|
2803
2803
|
}
|
|
2804
|
-
}), [["__scopeId", "data-v-
|
|
2804
|
+
}), [["__scopeId", "data-v-8f7c41d6"]]), Tn = { class: "coar-month-grid" }, En = {
|
|
2805
2805
|
class: "coar-month-grid__weekday-row",
|
|
2806
2806
|
role: "row",
|
|
2807
2807
|
"aria-rowindex": "1"
|
|
@@ -2861,17 +2861,17 @@ var dn = [
|
|
|
2861
2861
|
year: e.year,
|
|
2862
2862
|
month: e.month
|
|
2863
2863
|
});
|
|
2864
|
-
}), h = j(() => a(m.value, f.value)),
|
|
2865
|
-
function
|
|
2866
|
-
|
|
2864
|
+
}), h = j(() => a(m.value, f.value)), b = j(() => p(u.value, f.value, "short")), x = W(null);
|
|
2865
|
+
function ee(e) {
|
|
2866
|
+
x.value = e;
|
|
2867
2867
|
}
|
|
2868
|
-
let { dnd: S, workingEvents:
|
|
2868
|
+
let { dnd: S, workingEvents: te, dragSourceSnapshot: C, invalidMonthGhost: re, isPreviewId: w, isInvalidPillTarget: T, onMonthEventPointerdown: ie, onMonthEventKeydown: ae, keyboardDrag: oe } = ot({
|
|
2869
2869
|
events: () => s.value.events,
|
|
2870
2870
|
gridDates: h,
|
|
2871
|
-
gridRef:
|
|
2871
|
+
gridRef: x,
|
|
2872
2872
|
timezone: () => d.value,
|
|
2873
2873
|
dstPolicy: () => s.value.dstPolicy,
|
|
2874
|
-
canDrop: s.value.canDrop,
|
|
2874
|
+
canDrop: s.value.canDrop ?? void 0,
|
|
2875
2875
|
onEventClick: (e, t) => {
|
|
2876
2876
|
t && i.builder.state.onEventClick?.({
|
|
2877
2877
|
event: e,
|
|
@@ -2879,17 +2879,17 @@ var dn = [
|
|
|
2879
2879
|
});
|
|
2880
2880
|
},
|
|
2881
2881
|
onEventDrop: (e) => i.builder.state.onEventDrop?.(e),
|
|
2882
|
-
onAnnounce: (e, t) =>
|
|
2883
|
-
}),
|
|
2884
|
-
function
|
|
2882
|
+
onAnnounce: (e, t) => ue(e, t)
|
|
2883
|
+
}), se = it();
|
|
2884
|
+
function ce(e) {
|
|
2885
2885
|
let t = e.meta, n = (typeof t?.title == "string" ? t.title : void 0) ?? o("coar.calendar.a11y.unnamedEvent", void 0, "Event");
|
|
2886
2886
|
return o("coar.calendar.a11y.kbdPreviewLabel", { title: n }, `${n} preview — Arrow keys to move, Enter to commit, Escape to cancel`);
|
|
2887
2887
|
}
|
|
2888
|
-
function
|
|
2888
|
+
function le(e) {
|
|
2889
2889
|
let t = e.meta;
|
|
2890
2890
|
return typeof t?.title == "string" ? t.title : o("coar.calendar.a11y.unnamedEvent", void 0, "Event");
|
|
2891
2891
|
}
|
|
2892
|
-
function
|
|
2892
|
+
function E(e) {
|
|
2893
2893
|
try {
|
|
2894
2894
|
let t = new Intl.DateTimeFormat(u.value, k({
|
|
2895
2895
|
weekday: "short",
|
|
@@ -2905,56 +2905,56 @@ var dn = [
|
|
|
2905
2905
|
return e.target.date;
|
|
2906
2906
|
}
|
|
2907
2907
|
}
|
|
2908
|
-
function
|
|
2908
|
+
function ue(e, t) {
|
|
2909
2909
|
if (e === "cancelled") {
|
|
2910
|
-
|
|
2910
|
+
se.announce(o("coar.calendar.a11y.moveCancelled", void 0, "Move cancelled"));
|
|
2911
2911
|
return;
|
|
2912
2912
|
}
|
|
2913
2913
|
if (!t) return;
|
|
2914
|
-
let n =
|
|
2915
|
-
|
|
2914
|
+
let n = le(t.event), r = E(t);
|
|
2915
|
+
se.announce(o("coar.calendar.a11y.eventMovedTo", {
|
|
2916
2916
|
title: n,
|
|
2917
2917
|
when: r
|
|
2918
2918
|
}, `${n} moved to ${r}`));
|
|
2919
2919
|
}
|
|
2920
|
-
let
|
|
2920
|
+
let D = j(() => ne(te.value, {
|
|
2921
2921
|
gridDates: h.value,
|
|
2922
2922
|
timezone: d.value
|
|
2923
|
-
})),
|
|
2924
|
-
function ue(e) {
|
|
2925
|
-
return n.PlainDate.compare(e, le.value) === 0;
|
|
2926
|
-
}
|
|
2923
|
+
})), O = W(v(d.value));
|
|
2927
2924
|
function de(e) {
|
|
2928
|
-
return e
|
|
2925
|
+
return n.PlainDate.compare(e, O.value) === 0;
|
|
2929
2926
|
}
|
|
2930
2927
|
function fe(e) {
|
|
2928
|
+
return e.year !== m.value.year || e.month !== m.value.month;
|
|
2929
|
+
}
|
|
2930
|
+
function pe(e) {
|
|
2931
2931
|
return e.dayOfWeek === 6 || e.dayOfWeek === 7;
|
|
2932
2932
|
}
|
|
2933
|
-
let { BAR_HEIGHT:
|
|
2934
|
-
layout:
|
|
2935
|
-
gridRef:
|
|
2933
|
+
let { BAR_HEIGHT: me, DAY_NUMBER_HEIGHT: he, barTopPx: ge, rowBarHeightsPx: L, rowHeightPx: _e, expandedRows: R, expandRow: ve, collapseRow: ye } = un({
|
|
2934
|
+
layout: D,
|
|
2935
|
+
gridRef: x,
|
|
2936
2936
|
resetToken: m
|
|
2937
|
-
}), be = Re(),
|
|
2938
|
-
function
|
|
2937
|
+
}), be = Re(), z = W(null), xe = W(null), V = W(!1);
|
|
2938
|
+
function H(e, t, n) {
|
|
2939
2939
|
let r = e.currentTarget;
|
|
2940
2940
|
if (!r) return;
|
|
2941
2941
|
let i = r.getBoundingClientRect();
|
|
2942
|
-
|
|
2942
|
+
z.value = t, xe.value = g(n), V.value = !0, be.open({
|
|
2943
2943
|
clientX: i.left,
|
|
2944
2944
|
clientY: i.bottom + 4
|
|
2945
2945
|
});
|
|
2946
2946
|
}
|
|
2947
|
-
function
|
|
2948
|
-
|
|
2947
|
+
function Se(e, t, n) {
|
|
2948
|
+
z.value = t, xe.value = g(n), V.value = !1, be.open(e);
|
|
2949
2949
|
}
|
|
2950
2950
|
Z(() => be.isOpen.value, (e) => {
|
|
2951
|
-
e || (
|
|
2951
|
+
e || (V.value = !1);
|
|
2952
2952
|
}), Z(m, () => {
|
|
2953
|
-
be.close(),
|
|
2953
|
+
be.close(), z.value = null, xe.value = null, V.value = !1;
|
|
2954
2954
|
});
|
|
2955
2955
|
let Ce = j(() => {
|
|
2956
2956
|
let e = /* @__PURE__ */ new Map();
|
|
2957
|
-
for (let t of
|
|
2957
|
+
for (let t of D.value.weekRows) for (let n of t.days) {
|
|
2958
2958
|
let r = g(n);
|
|
2959
2959
|
e.set(r, t.cellPills.get(r) ?? []);
|
|
2960
2960
|
}
|
|
@@ -2963,7 +2963,7 @@ var dn = [
|
|
|
2963
2963
|
function we(e) {
|
|
2964
2964
|
return Ce.value.get(g(e)) ?? [];
|
|
2965
2965
|
}
|
|
2966
|
-
function
|
|
2966
|
+
function q(e) {
|
|
2967
2967
|
let t = e.meta;
|
|
2968
2968
|
return typeof t?.title == "string" ? t.title : "(untitled)";
|
|
2969
2969
|
}
|
|
@@ -2971,13 +2971,13 @@ var dn = [
|
|
|
2971
2971
|
let t = e.meta;
|
|
2972
2972
|
return typeof t?.color == "string" ? t.color : void 0;
|
|
2973
2973
|
}
|
|
2974
|
-
function
|
|
2974
|
+
function Ee(e) {
|
|
2975
2975
|
return Te(e) ?? "var(--coar-color-accent-soft, #93c5fd)";
|
|
2976
2976
|
}
|
|
2977
|
-
function
|
|
2977
|
+
function De(e) {
|
|
2978
2978
|
return Te(e) ?? "var(--coar-color-accent, #2563eb)";
|
|
2979
2979
|
}
|
|
2980
|
-
let
|
|
2980
|
+
let Oe = j(() => new Intl.DateTimeFormat(u.value, k({
|
|
2981
2981
|
weekday: "long",
|
|
2982
2982
|
day: "numeric",
|
|
2983
2983
|
month: "long",
|
|
@@ -2987,11 +2987,11 @@ var dn = [
|
|
|
2987
2987
|
dateStyle: s.value.dateStyle,
|
|
2988
2988
|
hour12: s.value.hour12
|
|
2989
2989
|
})));
|
|
2990
|
-
function Oe(e) {
|
|
2991
|
-
return De.value.format(new Date(Date.UTC(e.year, e.month - 1, e.day)));
|
|
2992
|
-
}
|
|
2993
2990
|
function ke(e) {
|
|
2994
|
-
|
|
2991
|
+
return Oe.value.format(new Date(Date.UTC(e.year, e.month - 1, e.day)));
|
|
2992
|
+
}
|
|
2993
|
+
function Me(e) {
|
|
2994
|
+
let t = q(e), n = {
|
|
2995
2995
|
dateStyle: s.value.dateStyle,
|
|
2996
2996
|
timeStyle: s.value.timeStyle,
|
|
2997
2997
|
hour12: s.value.hour12
|
|
@@ -3006,34 +3006,35 @@ var dn = [
|
|
|
3006
3006
|
}, n)), i = e.start, a = new Date(Date.UTC(i.year, i.month - 1, i.day)), o = e.end ?? i, s = new Date(Date.UTC(o.year, o.month - 1, o.day));
|
|
3007
3007
|
return `${t}, ${r.format(a)} – ${r.format(s)}`;
|
|
3008
3008
|
}
|
|
3009
|
-
|
|
3009
|
+
let r = new Intl.DateTimeFormat(u.value, k({
|
|
3010
3010
|
weekday: "short",
|
|
3011
3011
|
day: "numeric",
|
|
3012
3012
|
month: "short",
|
|
3013
3013
|
hour: "numeric",
|
|
3014
3014
|
minute: "2-digit",
|
|
3015
3015
|
timeZone: d.value
|
|
3016
|
-
}, n))
|
|
3016
|
+
}, n));
|
|
3017
|
+
return y(e) ? `${t}, ${r.format(new Date(e.start.epochMilliseconds))}` : t;
|
|
3017
3018
|
} catch {
|
|
3018
3019
|
return t;
|
|
3019
3020
|
}
|
|
3020
3021
|
}
|
|
3021
|
-
function
|
|
3022
|
+
function Pe(e, t) {
|
|
3022
3023
|
i.builder.state.onDateClick?.({
|
|
3023
3024
|
date: t,
|
|
3024
3025
|
native: e
|
|
3025
3026
|
});
|
|
3026
3027
|
}
|
|
3027
|
-
let
|
|
3028
|
+
let Ie = {
|
|
3028
3029
|
event: {
|
|
3029
3030
|
id: "__phantom__",
|
|
3030
|
-
start: "1970-01-01"
|
|
3031
|
+
start: n.PlainDate.from("1970-01-01")
|
|
3031
3032
|
},
|
|
3032
3033
|
order: 0
|
|
3033
|
-
},
|
|
3034
|
+
}, Le = {
|
|
3034
3035
|
event: {
|
|
3035
3036
|
id: "__phantom__",
|
|
3036
|
-
start: "1970-01-01"
|
|
3037
|
+
start: n.PlainDate.from("1970-01-01")
|
|
3037
3038
|
},
|
|
3038
3039
|
lane: 0,
|
|
3039
3040
|
laneCount: 1,
|
|
@@ -3042,21 +3043,21 @@ var dn = [
|
|
|
3042
3043
|
clippedStart: !1,
|
|
3043
3044
|
clippedEnd: !1
|
|
3044
3045
|
};
|
|
3045
|
-
return t({ getLayout: () =>
|
|
3046
|
-
class:
|
|
3046
|
+
return t({ getLayout: () => D.value }), (e, t) => (U(), P("div", {
|
|
3047
|
+
class: B(["coar-month-view", [`coar-month-view--density-${s.value.density}`]]),
|
|
3047
3048
|
role: "grid",
|
|
3048
3049
|
"aria-label": X(o)("coar.calendar.month.gridLabel", void 0, "Month grid"),
|
|
3049
|
-
"aria-rowcount":
|
|
3050
|
+
"aria-rowcount": D.value.weekRows.length + 1,
|
|
3050
3051
|
"aria-colcount": 7
|
|
3051
3052
|
}, [
|
|
3052
|
-
F("div", An, J(X(
|
|
3053
|
+
F("div", An, J(X(se).message.value), 1),
|
|
3053
3054
|
I(On, {
|
|
3054
|
-
"weekday-headers":
|
|
3055
|
-
"set-rows-el":
|
|
3055
|
+
"weekday-headers": b.value,
|
|
3056
|
+
"set-rows-el": ee
|
|
3056
3057
|
}, {
|
|
3057
|
-
default: Q(() => [(U(!0), P(A, null, G(
|
|
3058
|
+
default: Q(() => [(U(!0), P(A, null, G(D.value.weekRows, (t, n) => (U(), M(wn, {
|
|
3058
3059
|
key: t.weekStart.toString(),
|
|
3059
|
-
"height-px": X(
|
|
3060
|
+
"height-px": X(_e)[n],
|
|
3060
3061
|
density: s.value.density
|
|
3061
3062
|
}, {
|
|
3062
3063
|
default: Q(() => [
|
|
@@ -3064,35 +3065,35 @@ var dn = [
|
|
|
3064
3065
|
key: t.toString(),
|
|
3065
3066
|
day: t,
|
|
3066
3067
|
"day-key": X(g)(t),
|
|
3067
|
-
"is-today":
|
|
3068
|
-
"is-other-month":
|
|
3069
|
-
"is-weekend":
|
|
3070
|
-
"pills-margin-top-px": X(
|
|
3071
|
-
"menu-open-for-this-cell": X(be).isOpen.value &&
|
|
3068
|
+
"is-today": de(t),
|
|
3069
|
+
"is-other-month": fe(t),
|
|
3070
|
+
"is-weekend": pe(t),
|
|
3071
|
+
"pills-margin-top-px": X(L)[n] - X(he),
|
|
3072
|
+
"menu-open-for-this-cell": X(be).isOpen.value && V.value && xe.value === X(g)(t),
|
|
3072
3073
|
"kebab-aria-label": X(o)("coar.calendar.month.cellMenu", void 0, "Day actions"),
|
|
3073
3074
|
density: s.value.density,
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
onCellPointerdown: (e) =>
|
|
3078
|
-
onCellContextmenu: (e) =>
|
|
3079
|
-
onKebabClick: (e) =>
|
|
3075
|
+
ariaRowIndex: n + 2,
|
|
3076
|
+
ariaColIndex: r + 1,
|
|
3077
|
+
ariaLabel: ke(t),
|
|
3078
|
+
onCellPointerdown: (e) => Pe(e, t),
|
|
3079
|
+
onCellContextmenu: (e) => Se(e, n, t),
|
|
3080
|
+
onKebabClick: (e) => H(e, n, t)
|
|
3080
3081
|
}, {
|
|
3081
3082
|
default: Q(() => [
|
|
3082
3083
|
(U(!0), P(A, null, G(we(t), (t) => (U(), M(mn, {
|
|
3083
3084
|
key: t.event.id,
|
|
3084
3085
|
event: t.event,
|
|
3085
3086
|
pill: t,
|
|
3086
|
-
variant: X(
|
|
3087
|
-
"kbd-active": X(
|
|
3088
|
-
bg:
|
|
3089
|
-
border:
|
|
3090
|
-
title:
|
|
3087
|
+
variant: X(w)(t.event.id) ? "preview" : "live",
|
|
3088
|
+
"kbd-active": X(oe) !== null,
|
|
3089
|
+
bg: Ee(t.event),
|
|
3090
|
+
border: De(t.event),
|
|
3091
|
+
title: q(t.event),
|
|
3091
3092
|
"display-zone": d.value,
|
|
3092
|
-
"aria-label": X(
|
|
3093
|
+
"aria-label": X(w)(t.event.id) && X(oe) ? ce(t.event) : Me(t.event),
|
|
3093
3094
|
density: s.value.density,
|
|
3094
|
-
onPointerdown: (e) => X(
|
|
3095
|
-
onKeydown: (e) => X(
|
|
3095
|
+
onPointerdown: (e) => X(ie)(e, t.event),
|
|
3096
|
+
onKeydown: (e) => X(ae)(e, t.event),
|
|
3096
3097
|
onDblclick: (e) => i.builder.state.onEventDoubleClick?.({
|
|
3097
3098
|
event: t.event,
|
|
3098
3099
|
native: e
|
|
@@ -3102,9 +3103,9 @@ var dn = [
|
|
|
3102
3103
|
key: 0,
|
|
3103
3104
|
event: t,
|
|
3104
3105
|
pill: n
|
|
3105
|
-
}, void 0, !0) : s.value.
|
|
3106
|
+
}, void 0, !0) : s.value.eventRenderer ? (U(), M(X(dt), {
|
|
3106
3107
|
key: 1,
|
|
3107
|
-
renderer: s.value.
|
|
3108
|
+
renderer: s.value.eventRenderer,
|
|
3108
3109
|
ctx: {
|
|
3109
3110
|
event: t,
|
|
3110
3111
|
view: "month",
|
|
@@ -3113,7 +3114,7 @@ var dn = [
|
|
|
3113
3114
|
layout: n
|
|
3114
3115
|
}
|
|
3115
3116
|
}
|
|
3116
|
-
}, null, 8, ["renderer", "ctx"])) : (U(), P("span", jn, J(
|
|
3117
|
+
}, null, 8, ["renderer", "ctx"])) : (U(), P("span", jn, J(q(t)), 1))]),
|
|
3117
3118
|
_: 2
|
|
3118
3119
|
}, 1032, [
|
|
3119
3120
|
"event",
|
|
@@ -3134,10 +3135,10 @@ var dn = [
|
|
|
3134
3135
|
key: 0,
|
|
3135
3136
|
variant: "phantom",
|
|
3136
3137
|
event: X(C).event,
|
|
3137
|
-
pill:
|
|
3138
|
-
bg:
|
|
3139
|
-
border:
|
|
3140
|
-
title:
|
|
3138
|
+
pill: Ie,
|
|
3139
|
+
bg: Ee(X(C).event),
|
|
3140
|
+
border: De(X(C).event),
|
|
3141
|
+
title: q(X(C).event),
|
|
3141
3142
|
"display-zone": d.value,
|
|
3142
3143
|
density: s.value.density
|
|
3143
3144
|
}, null, 8, [
|
|
@@ -3152,10 +3153,10 @@ var dn = [
|
|
|
3152
3153
|
key: 1,
|
|
3153
3154
|
variant: "invalid",
|
|
3154
3155
|
event: X(S).draggedEvent.value,
|
|
3155
|
-
pill:
|
|
3156
|
-
bg:
|
|
3157
|
-
border:
|
|
3158
|
-
title:
|
|
3156
|
+
pill: Ie,
|
|
3157
|
+
bg: Ee(X(S).draggedEvent.value),
|
|
3158
|
+
border: De(X(S).draggedEvent.value),
|
|
3159
|
+
title: q(X(S).draggedEvent.value),
|
|
3159
3160
|
"display-zone": d.value,
|
|
3160
3161
|
"snapping-back": X(S).snappingBack.value,
|
|
3161
3162
|
density: s.value.density
|
|
@@ -3180,9 +3181,9 @@ var dn = [
|
|
|
3180
3181
|
"menu-open-for-this-cell",
|
|
3181
3182
|
"kebab-aria-label",
|
|
3182
3183
|
"density",
|
|
3183
|
-
"
|
|
3184
|
-
"
|
|
3185
|
-
"
|
|
3184
|
+
"ariaRowIndex",
|
|
3185
|
+
"ariaColIndex",
|
|
3186
|
+
"ariaLabel",
|
|
3186
3187
|
"onCellPointerdown",
|
|
3187
3188
|
"onCellContextmenu",
|
|
3188
3189
|
"onKebabClick"
|
|
@@ -3191,23 +3192,23 @@ var dn = [
|
|
|
3191
3192
|
key: t.event.id,
|
|
3192
3193
|
event: t.event,
|
|
3193
3194
|
bar: t,
|
|
3194
|
-
variant: X(
|
|
3195
|
-
"kbd-active": X(
|
|
3196
|
-
bg:
|
|
3197
|
-
border:
|
|
3198
|
-
title:
|
|
3195
|
+
variant: X(w)(t.event.id) ? "preview" : "live",
|
|
3196
|
+
"kbd-active": X(oe) !== null,
|
|
3197
|
+
bg: Ee(t.event),
|
|
3198
|
+
border: De(t.event),
|
|
3199
|
+
title: q(t.event),
|
|
3199
3200
|
"display-zone": d.value,
|
|
3200
|
-
"aria-label": X(
|
|
3201
|
+
"aria-label": X(w)(t.event.id) && X(oe) ? ce(t.event) : Me(t.event),
|
|
3201
3202
|
density: s.value.density,
|
|
3202
|
-
top: X(
|
|
3203
|
+
top: X(ge)(t.lane),
|
|
3203
3204
|
left: `calc(${t.startCol / 7 * 100}% + 2px)`,
|
|
3204
3205
|
width: `calc(${(t.endCol - t.startCol + 1) / 7 * 100}% - 4px)`,
|
|
3205
|
-
height: X(
|
|
3206
|
-
"z-index": X(
|
|
3206
|
+
height: X(me),
|
|
3207
|
+
"z-index": X(w)(t.event.id) ? 100 : t.lane + 1,
|
|
3207
3208
|
"clipped-start": t.clippedStart,
|
|
3208
3209
|
"clipped-end": t.clippedEnd,
|
|
3209
|
-
onPointerdown: (e) => X(
|
|
3210
|
-
onKeydown: (e) => X(
|
|
3210
|
+
onPointerdown: (e) => X(ie)(e, t.event),
|
|
3211
|
+
onKeydown: (e) => X(ae)(e, t.event),
|
|
3211
3212
|
onDblclick: (e) => i.builder.state.onEventDoubleClick?.({
|
|
3212
3213
|
event: t.event,
|
|
3213
3214
|
native: e
|
|
@@ -3219,9 +3220,9 @@ var dn = [
|
|
|
3219
3220
|
key: 0,
|
|
3220
3221
|
event: t,
|
|
3221
3222
|
bar: n
|
|
3222
|
-
}, void 0, !0) : s.value.
|
|
3223
|
+
}, void 0, !0) : s.value.eventRenderer ? (U(), M(X(dt), {
|
|
3223
3224
|
key: 1,
|
|
3224
|
-
renderer: s.value.
|
|
3225
|
+
renderer: s.value.eventRenderer,
|
|
3225
3226
|
ctx: {
|
|
3226
3227
|
event: t,
|
|
3227
3228
|
view: "month",
|
|
@@ -3230,7 +3231,7 @@ var dn = [
|
|
|
3230
3231
|
layout: n
|
|
3231
3232
|
}
|
|
3232
3233
|
}
|
|
3233
|
-
}, null, 8, ["renderer", "ctx"])) : (U(), P("span", Mn, J(
|
|
3234
|
+
}, null, 8, ["renderer", "ctx"])) : (U(), P("span", Mn, J(q(t)), 1))]),
|
|
3234
3235
|
_: 3
|
|
3235
3236
|
}, 8, [
|
|
3236
3237
|
"event",
|
|
@@ -3260,16 +3261,16 @@ var dn = [
|
|
|
3260
3261
|
key: `phantom-${e.startCol}-${e.endCol}`,
|
|
3261
3262
|
variant: "phantom",
|
|
3262
3263
|
event: X(C).event,
|
|
3263
|
-
bar:
|
|
3264
|
-
bg:
|
|
3265
|
-
border:
|
|
3266
|
-
title:
|
|
3264
|
+
bar: Le,
|
|
3265
|
+
bg: Ee(X(C).event),
|
|
3266
|
+
border: De(X(C).event),
|
|
3267
|
+
title: q(X(C).event),
|
|
3267
3268
|
"display-zone": d.value,
|
|
3268
3269
|
density: s.value.density,
|
|
3269
|
-
top: X(
|
|
3270
|
+
top: X(ge)(e.lane),
|
|
3270
3271
|
left: `calc(${e.startCol / 7 * 100}% + 2px)`,
|
|
3271
3272
|
width: `calc(${(e.endCol - e.startCol + 1) / 7 * 100}% - 4px)`,
|
|
3272
|
-
height: X(
|
|
3273
|
+
height: X(me),
|
|
3273
3274
|
"z-index": e.lane + 1,
|
|
3274
3275
|
"clipped-start": e.clippedStart,
|
|
3275
3276
|
"clipped-end": e.clippedEnd
|
|
@@ -3288,21 +3289,21 @@ var dn = [
|
|
|
3288
3289
|
"clipped-start",
|
|
3289
3290
|
"clipped-end"
|
|
3290
3291
|
]))), 128)),
|
|
3291
|
-
X(
|
|
3292
|
+
X(re) && X(re).rowIndex === n && X(re).isBar && X(S).draggedEvent.value ? (U(), M(vn, {
|
|
3292
3293
|
key: 0,
|
|
3293
3294
|
variant: "invalid",
|
|
3294
3295
|
event: X(S).draggedEvent.value,
|
|
3295
|
-
bar:
|
|
3296
|
-
bg:
|
|
3297
|
-
border:
|
|
3298
|
-
title:
|
|
3296
|
+
bar: Le,
|
|
3297
|
+
bg: Ee(X(S).draggedEvent.value),
|
|
3298
|
+
border: De(X(S).draggedEvent.value),
|
|
3299
|
+
title: q(X(S).draggedEvent.value),
|
|
3299
3300
|
"display-zone": d.value,
|
|
3300
3301
|
"snapping-back": X(S).snappingBack.value,
|
|
3301
3302
|
density: s.value.density,
|
|
3302
|
-
top: X(
|
|
3303
|
-
left: `calc(${X(
|
|
3304
|
-
width: `calc(${(X(
|
|
3305
|
-
height: X(
|
|
3303
|
+
top: X(ge)(0),
|
|
3304
|
+
left: `calc(${X(re).startCol / 7 * 100}% + 2px)`,
|
|
3305
|
+
width: `calc(${(X(re).endCol - X(re).startCol + 1) / 7 * 100}% - 4px)`,
|
|
3306
|
+
height: X(me),
|
|
3306
3307
|
"z-index": 100
|
|
3307
3308
|
}, null, 8, [
|
|
3308
3309
|
"event",
|
|
@@ -3323,20 +3324,20 @@ var dn = [
|
|
|
3323
3324
|
_: 3
|
|
3324
3325
|
}, 8, ["weekday-headers"]),
|
|
3325
3326
|
I(X(Ne), { menu: X(be) }, {
|
|
3326
|
-
default: Q(() => [
|
|
3327
|
+
default: Q(() => [z.value !== null && !X(R).has(z.value) ? (U(), M(X(Fe), {
|
|
3327
3328
|
key: 0,
|
|
3328
3329
|
label: X(o)("coar.calendar.month.expandRow", void 0, "Show more events"),
|
|
3329
|
-
onClick: t[0] ||= (e) =>
|
|
3330
|
-
}, null, 8, ["label"])) : N("", !0),
|
|
3330
|
+
onClick: t[0] ||= (e) => z.value !== null && X(ve)(z.value)
|
|
3331
|
+
}, null, 8, ["label"])) : N("", !0), z.value !== null && X(R).has(z.value) ? (U(), M(X(Fe), {
|
|
3331
3332
|
key: 1,
|
|
3332
3333
|
label: X(o)("coar.calendar.month.collapseRow", void 0, "Show fewer events"),
|
|
3333
|
-
onClick: t[1] ||= (e) =>
|
|
3334
|
+
onClick: t[1] ||= (e) => z.value !== null && X(ye)(z.value)
|
|
3334
3335
|
}, null, 8, ["label"])) : N("", !0)]),
|
|
3335
3336
|
_: 1
|
|
3336
3337
|
}, 8, ["menu"])
|
|
3337
3338
|
], 10, kn));
|
|
3338
3339
|
}
|
|
3339
|
-
}), [["__scopeId", "data-v-
|
|
3340
|
+
}), [["__scopeId", "data-v-ce373bd0"]]), Pn = ["data-y"], Fn = /* @__PURE__ */ $(/* @__PURE__ */ L({
|
|
3340
3341
|
__name: "VirtualizedSurface1DY",
|
|
3341
3342
|
props: {
|
|
3342
3343
|
itemCount: {},
|
|
@@ -3347,9 +3348,9 @@ var dn = [
|
|
|
3347
3348
|
},
|
|
3348
3349
|
emits: ["rangeChange", "scroll"],
|
|
3349
3350
|
setup(e, { expose: t, emit: n }) {
|
|
3350
|
-
let r = e, i = n, a = j(() => r.fixedItemSize !== void 0), o = W(null), s = W(0), c = W(0), l =
|
|
3351
|
+
let r = e, i = n, a = j(() => r.fixedItemSize !== void 0), o = W(null), s = W(0), c = W(0), l = Te(null);
|
|
3351
3352
|
function u() {
|
|
3352
|
-
return l.value ||= new
|
|
3353
|
+
return l.value ||= new O(r.itemCount, r.estimatedItemSize), l.value;
|
|
3353
3354
|
}
|
|
3354
3355
|
let d = W(0), f = j(() => a.value ? r.itemCount * r.fixedItemSize : (d.value, l.value ? l.value.totalSize() : r.itemCount * r.estimatedItemSize)), p = j(() => {
|
|
3355
3356
|
if (a.value) {
|
|
@@ -3368,7 +3369,7 @@ var dn = [
|
|
|
3368
3369
|
totalSize: t
|
|
3369
3370
|
};
|
|
3370
3371
|
}
|
|
3371
|
-
return d.value,
|
|
3372
|
+
return d.value, S(u(), s.value, c.value, r.overscan);
|
|
3372
3373
|
}), m = j(() => {
|
|
3373
3374
|
let e = p.value, t = [];
|
|
3374
3375
|
for (let n = e.startIndex; n < e.endIndex; n++) t.push(n);
|
|
@@ -3389,7 +3390,7 @@ var dn = [
|
|
|
3389
3390
|
}));
|
|
3390
3391
|
}
|
|
3391
3392
|
let v = /* @__PURE__ */ new WeakMap(), y = /* @__PURE__ */ new Map(), b = !1, x = null;
|
|
3392
|
-
function
|
|
3393
|
+
function ee() {
|
|
3393
3394
|
x || a.value || typeof ResizeObserver > "u" || (x = new ResizeObserver((e) => {
|
|
3394
3395
|
for (let t of e) {
|
|
3395
3396
|
let e = v.get(t.target);
|
|
@@ -3397,12 +3398,12 @@ var dn = [
|
|
|
3397
3398
|
let n = t.contentRect.height, i = l.value, a = i && i.has(e.index) ? i.get(e.index) : r.estimatedItemSize;
|
|
3398
3399
|
Math.abs(n - a) < .5 || y.set(e.index, n);
|
|
3399
3400
|
}
|
|
3400
|
-
y.size > 0 &&
|
|
3401
|
+
y.size > 0 && C();
|
|
3401
3402
|
}));
|
|
3402
3403
|
}
|
|
3403
|
-
let
|
|
3404
|
+
let te = {
|
|
3404
3405
|
mounted(e, t) {
|
|
3405
|
-
a.value || (
|
|
3406
|
+
a.value || (ee(), x && (v.set(e, { index: t.value }), x.observe(e)));
|
|
3406
3407
|
},
|
|
3407
3408
|
updated(e, t) {
|
|
3408
3409
|
let n = v.get(e);
|
|
@@ -3412,7 +3413,7 @@ var dn = [
|
|
|
3412
3413
|
x && x.unobserve(e), v.delete(e);
|
|
3413
3414
|
}
|
|
3414
3415
|
};
|
|
3415
|
-
function
|
|
3416
|
+
function ne(e) {
|
|
3416
3417
|
if (r.anchor === null) return null;
|
|
3417
3418
|
if (typeof r.anchor == "number") return r.anchor;
|
|
3418
3419
|
if (r.itemCount === 0) return null;
|
|
@@ -3422,23 +3423,23 @@ var dn = [
|
|
|
3422
3423
|
}
|
|
3423
3424
|
return e.indexAtOffset(s.value);
|
|
3424
3425
|
}
|
|
3425
|
-
function
|
|
3426
|
-
b || (b = !0, requestAnimationFrame(
|
|
3426
|
+
function C() {
|
|
3427
|
+
b || (b = !0, requestAnimationFrame(re));
|
|
3427
3428
|
}
|
|
3428
|
-
function
|
|
3429
|
+
function re() {
|
|
3429
3430
|
if (b = !1, y.size === 0) return;
|
|
3430
|
-
let e = u(), t =
|
|
3431
|
+
let e = u(), t = w(e), n = ne(t);
|
|
3431
3432
|
for (let [t, n] of y) t >= 0 && t < e.itemCount && e.set(t, n);
|
|
3432
3433
|
if (y.clear(), d.value++, n !== null && o.value) {
|
|
3433
|
-
let r =
|
|
3434
|
+
let r = ue(t, e, n);
|
|
3434
3435
|
if (r !== 0) {
|
|
3435
3436
|
let e = o.value;
|
|
3436
3437
|
e.scrollTop += r, s.value = e.scrollTop;
|
|
3437
3438
|
}
|
|
3438
3439
|
}
|
|
3439
3440
|
}
|
|
3440
|
-
function
|
|
3441
|
-
let t = new
|
|
3441
|
+
function w(e) {
|
|
3442
|
+
let t = new O(e.itemCount, e.estimatedSize);
|
|
3442
3443
|
for (let n = 0; n < e.itemCount; n++) e.has(n) && t.set(n, e.get(n));
|
|
3443
3444
|
return t;
|
|
3444
3445
|
}
|
|
@@ -3446,19 +3447,19 @@ var dn = [
|
|
|
3446
3447
|
l.value && (l.value.resize(e), d.value++);
|
|
3447
3448
|
}), Z(() => r.estimatedItemSize, (e) => {
|
|
3448
3449
|
if (!l.value) return;
|
|
3449
|
-
let t = l.value, n = new
|
|
3450
|
+
let t = l.value, n = new O(t.itemCount, e);
|
|
3450
3451
|
for (let e = 0; e < t.itemCount; e++) t.has(e) && n.set(e, t.get(e));
|
|
3451
3452
|
l.value = n, d.value++;
|
|
3452
3453
|
});
|
|
3453
|
-
let
|
|
3454
|
-
return
|
|
3454
|
+
let T = null;
|
|
3455
|
+
return Ce(() => {
|
|
3455
3456
|
let e = o.value;
|
|
3456
|
-
e && (c.value = e.clientHeight, s.value = e.scrollTop, typeof ResizeObserver < "u" && (
|
|
3457
|
+
e && (c.value = e.clientHeight, s.value = e.scrollTop, typeof ResizeObserver < "u" && (T = new ResizeObserver(() => {
|
|
3457
3458
|
let t = e.clientHeight;
|
|
3458
3459
|
t !== c.value && (c.value = t);
|
|
3459
|
-
}),
|
|
3460
|
-
}),
|
|
3461
|
-
x?.disconnect(),
|
|
3460
|
+
}), T.observe(e)));
|
|
3461
|
+
}), Se(() => {
|
|
3462
|
+
x?.disconnect(), T?.disconnect(), y.clear();
|
|
3462
3463
|
}), t({
|
|
3463
3464
|
getContainerElement: () => o.value,
|
|
3464
3465
|
getRange: () => p.value,
|
|
@@ -3479,7 +3480,7 @@ var dn = [
|
|
|
3479
3480
|
behavior: t
|
|
3480
3481
|
});
|
|
3481
3482
|
},
|
|
3482
|
-
getCache: () => l.value ? l.value : a.value ? (l.value = new
|
|
3483
|
+
getCache: () => l.value ? l.value : a.value ? (l.value = new O(r.itemCount, r.fixedItemSize), l.value) : u()
|
|
3483
3484
|
}), (e, t) => (U(), P("div", {
|
|
3484
3485
|
ref_key: "containerRef",
|
|
3485
3486
|
ref: o,
|
|
@@ -3487,13 +3488,13 @@ var dn = [
|
|
|
3487
3488
|
onScroll: _
|
|
3488
3489
|
}, [F("div", {
|
|
3489
3490
|
class: "coar-virtualized-surface-1dy__spacer",
|
|
3490
|
-
style:
|
|
3491
|
+
style: H({ height: f.value + "px" })
|
|
3491
3492
|
}, [(U(!0), P(A, null, G(m.value, (t) => Oe((U(), P("div", {
|
|
3492
3493
|
key: t,
|
|
3493
3494
|
class: "coar-virtualized-surface-1dy__item",
|
|
3494
|
-
style:
|
|
3495
|
+
style: H({ transform: `translateY(${h(t)}px)` }),
|
|
3495
3496
|
"data-y": t
|
|
3496
|
-
}, [K(e.$slots, "item", { y: t }, void 0, !0)], 12, Pn)), [[
|
|
3497
|
+
}, [K(e.$slots, "item", { y: t }, void 0, !0)], 12, Pn)), [[te, t]])), 128))], 4)], 544));
|
|
3497
3498
|
}
|
|
3498
3499
|
}), [["__scopeId", "data-v-50d47c8e"]]), In = ["role", "aria-level"], Ln = { class: "coar-agenda-day-header__label" }, Rn = {
|
|
3499
3500
|
key: 0,
|
|
@@ -3522,12 +3523,12 @@ var dn = [
|
|
|
3522
3523
|
n("pointerdown", e);
|
|
3523
3524
|
}
|
|
3524
3525
|
return (t, n) => (U(), P("div", {
|
|
3525
|
-
class:
|
|
3526
|
+
class: B(["coar-agenda-day-header", {
|
|
3526
3527
|
"coar-agenda-day-header--today": e.isToday,
|
|
3527
3528
|
"coar-agenda-day-header--empty": e.item.isEmpty,
|
|
3528
3529
|
"coar-agenda-day-header--floating": e.floating
|
|
3529
3530
|
}]),
|
|
3530
|
-
style:
|
|
3531
|
+
style: H(e.floating ? { transform: e.transform } : void 0),
|
|
3531
3532
|
role: e.floating ? "presentation" : "heading",
|
|
3532
3533
|
"aria-level": e.floating ? void 0 : 3,
|
|
3533
3534
|
onPointerdown: r
|
|
@@ -3561,7 +3562,7 @@ var dn = [
|
|
|
3561
3562
|
e.stopPropagation(), n("dblclick", e);
|
|
3562
3563
|
}
|
|
3563
3564
|
return (t, n) => (U(), P("div", {
|
|
3564
|
-
class:
|
|
3565
|
+
class: B(["coar-agenda-event", { "coar-agenda-event--continuation": e.item.isContinuation }]),
|
|
3565
3566
|
role: "listitem",
|
|
3566
3567
|
onPointerdown: r,
|
|
3567
3568
|
onDblclick: i
|
|
@@ -3571,7 +3572,7 @@ var dn = [
|
|
|
3571
3572
|
}, () => [F("div", Bn, [
|
|
3572
3573
|
F("span", {
|
|
3573
3574
|
class: "coar-agenda-event__color",
|
|
3574
|
-
style:
|
|
3575
|
+
style: H({ background: e.color })
|
|
3575
3576
|
}, null, 4),
|
|
3576
3577
|
F("span", Vn, J(e.timeLabel), 1),
|
|
3577
3578
|
F("span", Hn, [
|
|
@@ -3585,7 +3586,7 @@ var dn = [
|
|
|
3585
3586
|
])
|
|
3586
3587
|
])], !0)], 34));
|
|
3587
3588
|
}
|
|
3588
|
-
}), [["__scopeId", "data-v-
|
|
3589
|
+
}), [["__scopeId", "data-v-12cce1c9"]]), Gn = ["aria-label"], Kn = /* @__PURE__ */ $(/* @__PURE__ */ L({
|
|
3589
3590
|
__name: "CoarAgendaView",
|
|
3590
3591
|
props: {
|
|
3591
3592
|
builder: {},
|
|
@@ -3609,17 +3610,17 @@ var dn = [
|
|
|
3609
3610
|
};
|
|
3610
3611
|
}), o = j(() => a.value.events), s = j(() => a.value.timezone), c = je(), l = j(() => a.value.locale ?? c?.language.value ?? "en-US"), u = j(() => a.value.density), d = j(() => a.value.showEmptyDays), f = j(() => a.value.agendaLengthDays), p = j(() => r.builder.state.date.value);
|
|
3611
3612
|
Ze(r.builder, { view: "agenda" });
|
|
3612
|
-
let m = j(() =>
|
|
3613
|
+
let m = j(() => p.value), h = j(() => m.value.toString()), g = j(() => m.value.add({ days: f.value }).toString()), b = j(() => te(o.value, {
|
|
3613
3614
|
rangeStart: h.value,
|
|
3614
3615
|
rangeEnd: g.value,
|
|
3615
3616
|
timezone: s.value,
|
|
3616
3617
|
showEmptyDays: d.value
|
|
3617
|
-
})),
|
|
3618
|
+
})), x = W(v(s.value));
|
|
3618
3619
|
De(() => {
|
|
3619
|
-
|
|
3620
|
+
x.value = v(s.value);
|
|
3620
3621
|
});
|
|
3621
|
-
function
|
|
3622
|
-
return n.PlainDate.compare(e,
|
|
3622
|
+
function ee(e) {
|
|
3623
|
+
return n.PlainDate.compare(e, x.value) === 0;
|
|
3623
3624
|
}
|
|
3624
3625
|
let S = j(() => new Intl.DateTimeFormat(l.value, k({
|
|
3625
3626
|
weekday: "long",
|
|
@@ -3630,7 +3631,7 @@ var dn = [
|
|
|
3630
3631
|
dateStyle: a.value.dateStyle,
|
|
3631
3632
|
timeStyle: a.value.timeStyle,
|
|
3632
3633
|
hour12: a.value.hour12
|
|
3633
|
-
}))),
|
|
3634
|
+
}))), ne = j(() => new Intl.DateTimeFormat(l.value, k({
|
|
3634
3635
|
hour: "numeric",
|
|
3635
3636
|
minute: "2-digit",
|
|
3636
3637
|
timeZone: s.value
|
|
@@ -3638,14 +3639,14 @@ var dn = [
|
|
|
3638
3639
|
timeStyle: a.value.timeStyle,
|
|
3639
3640
|
hour12: a.value.hour12
|
|
3640
3641
|
})));
|
|
3641
|
-
function
|
|
3642
|
+
function C(e) {
|
|
3642
3643
|
let t = /* @__PURE__ */ new Date(e + "T00:00:00Z");
|
|
3643
3644
|
return S.value.format(t);
|
|
3644
3645
|
}
|
|
3645
|
-
function
|
|
3646
|
-
return _(e) ? i("coar.calendar.agenda.allDay", void 0, "All day") :
|
|
3646
|
+
function re(e) {
|
|
3647
|
+
return _(e) ? i("coar.calendar.agenda.allDay", void 0, "All day") : y(e) ? ne.value.format(new Date(e.start.epochMilliseconds)) : "";
|
|
3647
3648
|
}
|
|
3648
|
-
function
|
|
3649
|
+
function w(e) {
|
|
3649
3650
|
let t = e.meta;
|
|
3650
3651
|
return typeof t?.title == "string" ? t.title : "(untitled)";
|
|
3651
3652
|
}
|
|
@@ -3653,37 +3654,37 @@ var dn = [
|
|
|
3653
3654
|
let t = e.meta;
|
|
3654
3655
|
return typeof t?.color == "string" ? t.color : void 0;
|
|
3655
3656
|
}
|
|
3656
|
-
function
|
|
3657
|
+
function ie(e) {
|
|
3657
3658
|
return T(e) ?? "var(--coar-color-accent, #2563eb)";
|
|
3658
3659
|
}
|
|
3659
|
-
function
|
|
3660
|
+
function ae(e, t) {
|
|
3660
3661
|
r.builder.state.onEventClick?.({
|
|
3661
3662
|
event: t,
|
|
3662
3663
|
native: e
|
|
3663
3664
|
});
|
|
3664
3665
|
}
|
|
3665
|
-
function
|
|
3666
|
+
function oe(e, t) {
|
|
3666
3667
|
r.builder.state.onDateClick?.({
|
|
3667
3668
|
date: n.PlainDate.from(t),
|
|
3668
3669
|
native: e
|
|
3669
3670
|
});
|
|
3670
3671
|
}
|
|
3671
|
-
let
|
|
3672
|
-
function
|
|
3673
|
-
|
|
3672
|
+
let se = Ee("surface"), ce = W(0), le = null;
|
|
3673
|
+
function E() {
|
|
3674
|
+
le && (ce.value = le.scrollTop);
|
|
3674
3675
|
}
|
|
3675
|
-
|
|
3676
|
-
let e =
|
|
3677
|
-
e && (
|
|
3678
|
-
}),
|
|
3679
|
-
|
|
3676
|
+
Ce(() => {
|
|
3677
|
+
let e = se.value?.$el ?? null;
|
|
3678
|
+
e && (le = e, le.addEventListener("scroll", E, { passive: !0 }), ce.value = le.scrollTop), r.builder._setScrollToDate((e) => me(e.toString()));
|
|
3679
|
+
}), Se(() => {
|
|
3680
|
+
le &&= (le.removeEventListener("scroll", E), null), r.builder._setScrollToDate(void 0);
|
|
3680
3681
|
});
|
|
3681
|
-
let
|
|
3682
|
-
let e =
|
|
3683
|
-
if (
|
|
3684
|
-
let t =
|
|
3682
|
+
let ue = W(0), D = j(() => {
|
|
3683
|
+
let e = ce.value;
|
|
3684
|
+
if (b.value.length === 0) return null;
|
|
3685
|
+
let t = se.value;
|
|
3685
3686
|
if (!t) return null;
|
|
3686
|
-
let n = t.getCache(), r =
|
|
3687
|
+
let n = t.getCache(), r = b.value, i = -1, a = -1, o = Infinity;
|
|
3687
3688
|
for (let t = 0; t < r.length; t++) {
|
|
3688
3689
|
if (r[t].kind !== "header") continue;
|
|
3689
3690
|
let s = n.prefixSum(t);
|
|
@@ -3695,48 +3696,48 @@ var dn = [
|
|
|
3695
3696
|
}
|
|
3696
3697
|
if (i < 0) return null;
|
|
3697
3698
|
let s = 0;
|
|
3698
|
-
if (a >= 0 &&
|
|
3699
|
+
if (a >= 0 && ue.value > 0) {
|
|
3699
3700
|
let t = o - e;
|
|
3700
|
-
t <
|
|
3701
|
+
t < ue.value && (s = ue.value - t);
|
|
3701
3702
|
}
|
|
3702
3703
|
return {
|
|
3703
3704
|
current: r[i],
|
|
3704
3705
|
pushOffset: s
|
|
3705
3706
|
};
|
|
3706
|
-
}),
|
|
3707
|
-
let e =
|
|
3707
|
+
}), O = j(() => D.value?.current ?? null), de = j(() => {
|
|
3708
|
+
let e = D.value?.pushOffset ?? 0;
|
|
3708
3709
|
return e > 0 ? `translateY(-${e}px)` : "none";
|
|
3709
|
-
}),
|
|
3710
|
-
function
|
|
3711
|
-
let e =
|
|
3712
|
-
e?.$el && (
|
|
3710
|
+
}), fe = Ee("overlayEl");
|
|
3711
|
+
function pe() {
|
|
3712
|
+
let e = fe.value;
|
|
3713
|
+
e?.$el && (ue.value = e.$el.offsetHeight);
|
|
3713
3714
|
}
|
|
3714
|
-
De(
|
|
3715
|
-
function
|
|
3716
|
-
let t =
|
|
3717
|
-
t >= 0 &&
|
|
3715
|
+
De(pe);
|
|
3716
|
+
function me(e) {
|
|
3717
|
+
let t = b.value.findIndex((t) => t.kind === "header" && t.date === e);
|
|
3718
|
+
t >= 0 && se.value?.scrollToIndex(t);
|
|
3718
3719
|
}
|
|
3719
3720
|
return t({
|
|
3720
|
-
getItems: () =>
|
|
3721
|
-
scrollToDate:
|
|
3722
|
-
}), (t,
|
|
3723
|
-
class:
|
|
3721
|
+
getItems: () => b.value,
|
|
3722
|
+
scrollToDate: me
|
|
3723
|
+
}), (t, a) => (U(), P("div", {
|
|
3724
|
+
class: B(["coar-agenda-view", [`coar-agenda-view--density-${u.value}`]]),
|
|
3724
3725
|
role: "region",
|
|
3725
3726
|
"aria-label": X(i)("coar.calendar.agenda.viewLabel", void 0, "Agenda view")
|
|
3726
|
-
}, [
|
|
3727
|
+
}, [O.value ? (U(), M(zn, {
|
|
3727
3728
|
key: 0,
|
|
3728
3729
|
ref: "overlayEl",
|
|
3729
3730
|
floating: "",
|
|
3730
|
-
date: X(n).PlainDate.from(
|
|
3731
|
-
item:
|
|
3732
|
-
"is-today":
|
|
3733
|
-
label:
|
|
3731
|
+
date: X(n).PlainDate.from(O.value.date),
|
|
3732
|
+
item: O.value,
|
|
3733
|
+
"is-today": ee(X(n).PlainDate.from(O.value.date)),
|
|
3734
|
+
label: C(O.value.date),
|
|
3734
3735
|
"today-label": X(i)("coar.calendar.agenda.todayBadge", void 0, "today"),
|
|
3735
|
-
transform:
|
|
3736
|
-
onPointerdown:
|
|
3737
|
-
}, he({ _: 2 }, [t.$slots.dayGroupHeader
|
|
3736
|
+
transform: de.value,
|
|
3737
|
+
onPointerdown: a[0] ||= (e) => oe(e, O.value.date)
|
|
3738
|
+
}, he({ _: 2 }, [t.$slots.dayGroupHeader ? {
|
|
3738
3739
|
name: "default",
|
|
3739
|
-
fn: Q((e) => [
|
|
3740
|
+
fn: Q((e) => [K(t.$slots, "dayGroupHeader", V(R(e)), void 0, !0)]),
|
|
3740
3741
|
key: "0"
|
|
3741
3742
|
} : void 0]), 1032, [
|
|
3742
3743
|
"date",
|
|
@@ -3749,22 +3750,22 @@ var dn = [
|
|
|
3749
3750
|
ref: "surface",
|
|
3750
3751
|
role: "list",
|
|
3751
3752
|
"aria-label": X(i)("coar.calendar.agenda.listLabel", void 0, "Agenda"),
|
|
3752
|
-
"item-count":
|
|
3753
|
+
"item-count": b.value.length,
|
|
3753
3754
|
"estimated-item-size": e.estimatedItemSize,
|
|
3754
3755
|
overscan: e.overscan,
|
|
3755
3756
|
class: "coar-agenda-view__surface"
|
|
3756
3757
|
}, {
|
|
3757
|
-
item: Q(({ y: e }) => [
|
|
3758
|
+
item: Q(({ y: e }) => [b.value[e].kind === "header" ? (U(), M(zn, {
|
|
3758
3759
|
key: 0,
|
|
3759
|
-
date: X(n).PlainDate.from(
|
|
3760
|
-
item:
|
|
3761
|
-
"is-today":
|
|
3762
|
-
label:
|
|
3760
|
+
date: X(n).PlainDate.from(b.value[e].date),
|
|
3761
|
+
item: b.value[e],
|
|
3762
|
+
"is-today": ee(X(n).PlainDate.from(b.value[e].date)),
|
|
3763
|
+
label: C(b.value[e].date),
|
|
3763
3764
|
"today-label": X(i)("coar.calendar.agenda.todayBadge", void 0, "today"),
|
|
3764
|
-
onPointerdown: (t) =>
|
|
3765
|
+
onPointerdown: (t) => oe(t, b.value[e].date)
|
|
3765
3766
|
}, he({ _: 2 }, [t.$slots.dayGroupHeader ? {
|
|
3766
3767
|
name: "default",
|
|
3767
|
-
fn: Q((e) => [K(t.$slots, "dayGroupHeader",
|
|
3768
|
+
fn: Q((e) => [K(t.$slots, "dayGroupHeader", V(R(e)), void 0, !0)]),
|
|
3768
3769
|
key: "0"
|
|
3769
3770
|
} : void 0]), 1032, [
|
|
3770
3771
|
"date",
|
|
@@ -3775,21 +3776,21 @@ var dn = [
|
|
|
3775
3776
|
"onPointerdown"
|
|
3776
3777
|
])) : (U(), M(Wn, {
|
|
3777
3778
|
key: 1,
|
|
3778
|
-
event:
|
|
3779
|
-
item:
|
|
3780
|
-
"time-label":
|
|
3781
|
-
title:
|
|
3782
|
-
color:
|
|
3779
|
+
event: b.value[e].event,
|
|
3780
|
+
item: b.value[e],
|
|
3781
|
+
"time-label": re(b.value[e].event),
|
|
3782
|
+
title: w(b.value[e].event),
|
|
3783
|
+
color: ie(b.value[e].event),
|
|
3783
3784
|
"continuation-tag": X(i)("coar.calendar.agenda.continuationTag", void 0, "(cont.)"),
|
|
3784
3785
|
"display-zone": s.value,
|
|
3785
|
-
onPointerdown: (t) =>
|
|
3786
|
+
onPointerdown: (t) => ae(t, b.value[e].event),
|
|
3786
3787
|
onDblclick: (t) => r.builder.state.onEventDoubleClick?.({
|
|
3787
|
-
event:
|
|
3788
|
+
event: b.value[e].event,
|
|
3788
3789
|
native: t
|
|
3789
3790
|
})
|
|
3790
3791
|
}, he({ _: 2 }, [t.$slots.event ? {
|
|
3791
3792
|
name: "default",
|
|
3792
|
-
fn: Q((e) => [K(t.$slots, "event",
|
|
3793
|
+
fn: Q((e) => [K(t.$slots, "event", V(R(e)), void 0, !0)]),
|
|
3793
3794
|
key: "0"
|
|
3794
3795
|
} : void 0]), 1032, [
|
|
3795
3796
|
"event",
|
|
@@ -3810,7 +3811,7 @@ var dn = [
|
|
|
3810
3811
|
"overscan"
|
|
3811
3812
|
])], 10, Gn));
|
|
3812
3813
|
}
|
|
3813
|
-
}), [["__scopeId", "data-v-
|
|
3814
|
+
}), [["__scopeId", "data-v-881506a3"]]), qn = { class: "coar-calendar__header" }, Jn = { class: "coar-calendar__nav" }, Yn = { class: "coar-calendar__range-label" }, Xn = 100, Zn = /* @__PURE__ */ $(/* @__PURE__ */ L({
|
|
3814
3815
|
__name: "CoarCalendar",
|
|
3815
3816
|
props: { builder: {} },
|
|
3816
3817
|
setup(e) {
|
|
@@ -3837,7 +3838,7 @@ var dn = [
|
|
|
3837
3838
|
eventRenderer: e.eventRenderer,
|
|
3838
3839
|
dayHeaderRenderer: e.dayHeaderRenderer
|
|
3839
3840
|
};
|
|
3840
|
-
}), a = t.builder.state.view, o = t.builder.state.date, s = je(), { t: c } = Ae(), l = j(() => i.value.locale ?? s?.language.value ?? "en-US"), u = j(() => o.value), d = j(() => i.value.firstDayOfWeek ?? r(l.value)), f = j(() =>
|
|
3841
|
+
}), a = t.builder.state.view, o = t.builder.state.date, s = je(), { t: c } = Ae(), l = j(() => i.value.locale ?? s?.language.value ?? "en-US"), u = j(() => o.value), d = j(() => i.value.firstDayOfWeek ?? r(l.value)), f = j(() => C({
|
|
3841
3842
|
view: a.value,
|
|
3842
3843
|
cursor: u.value,
|
|
3843
3844
|
firstDayOfWeek: d.value,
|
|
@@ -3898,9 +3899,9 @@ var dn = [
|
|
|
3898
3899
|
rangeLabel: _.value,
|
|
3899
3900
|
view: a.value,
|
|
3900
3901
|
available: i.value.availableViews
|
|
3901
|
-
})),
|
|
3902
|
-
function
|
|
3903
|
-
if (
|
|
3902
|
+
})), ee = Ee("bodyEl"), S = Ee("agendaView"), te = 0;
|
|
3903
|
+
function ne(e, t) {
|
|
3904
|
+
if (globalThis.matchMedia?.("(prefers-reduced-motion: reduce)").matches) {
|
|
3904
3905
|
e.scrollTop = t;
|
|
3905
3906
|
return;
|
|
3906
3907
|
}
|
|
@@ -3909,30 +3910,30 @@ var dn = [
|
|
|
3909
3910
|
e.scrollTop = t;
|
|
3910
3911
|
return;
|
|
3911
3912
|
}
|
|
3912
|
-
let i = performance.now(), a = ++
|
|
3913
|
+
let i = performance.now(), a = ++te;
|
|
3913
3914
|
function o(t) {
|
|
3914
|
-
if (a !==
|
|
3915
|
+
if (a !== te) return;
|
|
3915
3916
|
let s = Math.min(1, (t - i) / Xn);
|
|
3916
3917
|
e.scrollTop = n + r * (1 - (1 - s) ** 3), s < 1 && requestAnimationFrame(o);
|
|
3917
3918
|
}
|
|
3918
3919
|
requestAnimationFrame(o);
|
|
3919
3920
|
}
|
|
3920
|
-
return
|
|
3921
|
+
return Ce(() => {
|
|
3921
3922
|
t.builder._setScrollToTime((e) => {
|
|
3922
3923
|
let t = e.hour;
|
|
3923
3924
|
if (a.value !== "day" && a.value !== "week") return;
|
|
3924
|
-
let n =
|
|
3925
|
+
let n = ee.value;
|
|
3925
3926
|
if (!n) return;
|
|
3926
3927
|
let r = n.querySelector(`.coar-time-grid__hour-label[data-hour="${t}"]`);
|
|
3927
3928
|
if (!r) return;
|
|
3928
3929
|
let i = n.querySelector(".coar-time-grid__sticky-top"), o = n.getBoundingClientRect().top, s = i ? i.getBoundingClientRect().bottom : o, c = r.getBoundingClientRect().top;
|
|
3929
|
-
|
|
3930
|
+
ne(n, n.scrollTop + (c - s));
|
|
3930
3931
|
}), t.builder._setScrollToDate((e) => {
|
|
3931
|
-
a.value === "agenda" &&
|
|
3932
|
+
a.value === "agenda" && S.value?.scrollToDate?.(e.toString());
|
|
3932
3933
|
}), t.builder._setGridReady(!0);
|
|
3933
|
-
}),
|
|
3934
|
+
}), Se(() => {
|
|
3934
3935
|
t.builder._setScrollToTime(void 0), t.builder._setScrollToDate(void 0), t.builder._setGridReady(!1);
|
|
3935
|
-
}), (e, n) => (U(), P("div", { class:
|
|
3936
|
+
}), (e, n) => (U(), P("div", { class: B(["coar-calendar", [`coar-calendar--density-${i.value.density}`]]) }, [K(e.$slots, "header", {
|
|
3936
3937
|
view: X(a),
|
|
3937
3938
|
cursor: u.value,
|
|
3938
3939
|
range: f.value,
|
|
@@ -3971,7 +3972,7 @@ var dn = [
|
|
|
3971
3972
|
setView: g
|
|
3972
3973
|
}, () => [I(X(Ie), {
|
|
3973
3974
|
modelValue: X(a),
|
|
3974
|
-
"onUpdate:modelValue": n[0] ||= (e) =>
|
|
3975
|
+
"onUpdate:modelValue": n[0] ||= (e) => ye(a) ? a.value = e : null,
|
|
3975
3976
|
options: b.value,
|
|
3976
3977
|
size: "s",
|
|
3977
3978
|
"aria-label": X(c)("coar.calendar.viewSwitcher.label", void 0, "Change view")
|
|
@@ -3983,18 +3984,18 @@ var dn = [
|
|
|
3983
3984
|
K(e.$slots, "headerEnd", { controls: x.value }, void 0, !0)
|
|
3984
3985
|
])], !0), F("div", {
|
|
3985
3986
|
ref_key: "bodyEl",
|
|
3986
|
-
ref:
|
|
3987
|
-
class:
|
|
3987
|
+
ref: ee,
|
|
3988
|
+
class: B(["coar-calendar__body", `coar-calendar__body--${X(a)}`])
|
|
3988
3989
|
}, [X(a) === "day" ? (U(), M(en, {
|
|
3989
3990
|
key: 0,
|
|
3990
3991
|
builder: t.builder
|
|
3991
3992
|
}, he({ _: 2 }, [e.$slots.event ? {
|
|
3992
3993
|
name: "event",
|
|
3993
|
-
fn: Q((t) => [K(e.$slots, "event",
|
|
3994
|
+
fn: Q((t) => [K(e.$slots, "event", z(t, { view: X(a) }), void 0, !0)]),
|
|
3994
3995
|
key: "0"
|
|
3995
3996
|
} : void 0, e.$slots.dayHeader ? {
|
|
3996
3997
|
name: "dayHeader",
|
|
3997
|
-
fn: Q((t) => [K(e.$slots, "dayHeader",
|
|
3998
|
+
fn: Q((t) => [K(e.$slots, "dayHeader", V(R(t)), void 0, !0)]),
|
|
3998
3999
|
key: "1"
|
|
3999
4000
|
} : void 0]), 1032, ["builder"])) : X(a) === "week" ? (U(), M(nn, {
|
|
4000
4001
|
key: 1,
|
|
@@ -4002,17 +4003,17 @@ var dn = [
|
|
|
4002
4003
|
}, he({ _: 2 }, [
|
|
4003
4004
|
e.$slots.event ? {
|
|
4004
4005
|
name: "event",
|
|
4005
|
-
fn: Q((t) => [K(e.$slots, "event",
|
|
4006
|
+
fn: Q((t) => [K(e.$slots, "event", z(t, { view: X(a) }), void 0, !0)]),
|
|
4006
4007
|
key: "0"
|
|
4007
4008
|
} : void 0,
|
|
4008
4009
|
e.$slots.allDayEvent ? {
|
|
4009
4010
|
name: "allDayEvent",
|
|
4010
|
-
fn: Q((t) => [K(e.$slots, "allDayEvent",
|
|
4011
|
+
fn: Q((t) => [K(e.$slots, "allDayEvent", V(R(t)), void 0, !0)]),
|
|
4011
4012
|
key: "1"
|
|
4012
4013
|
} : void 0,
|
|
4013
4014
|
e.$slots.dayHeader ? {
|
|
4014
4015
|
name: "dayHeader",
|
|
4015
|
-
fn: Q((t) => [K(e.$slots, "dayHeader",
|
|
4016
|
+
fn: Q((t) => [K(e.$slots, "dayHeader", V(R(t)), void 0, !0)]),
|
|
4016
4017
|
key: "2"
|
|
4017
4018
|
} : void 0
|
|
4018
4019
|
]), 1032, ["builder"])) : X(a) === "month" ? (U(), M(Nn, {
|
|
@@ -4020,7 +4021,7 @@ var dn = [
|
|
|
4020
4021
|
builder: t.builder
|
|
4021
4022
|
}, he({ _: 2 }, [e.$slots.pill || e.$slots.event ? {
|
|
4022
4023
|
name: "pill",
|
|
4023
|
-
fn: Q((t) => [e.$slots.pill ? K(e.$slots, "pill",
|
|
4024
|
+
fn: Q((t) => [e.$slots.pill ? K(e.$slots, "pill", V(z({ key: 0 }, t)), void 0, !0) : K(e.$slots, "event", {
|
|
4024
4025
|
key: 1,
|
|
4025
4026
|
event: t.event,
|
|
4026
4027
|
view: X(a),
|
|
@@ -4029,7 +4030,7 @@ var dn = [
|
|
|
4029
4030
|
key: "0"
|
|
4030
4031
|
} : void 0, e.$slots.multiDayBar || e.$slots.event ? {
|
|
4031
4032
|
name: "multiDayBar",
|
|
4032
|
-
fn: Q((t) => [e.$slots.multiDayBar ? K(e.$slots, "multiDayBar",
|
|
4033
|
+
fn: Q((t) => [e.$slots.multiDayBar ? K(e.$slots, "multiDayBar", V(z({ key: 0 }, t)), void 0, !0) : K(e.$slots, "event", {
|
|
4033
4034
|
key: 1,
|
|
4034
4035
|
event: t.event,
|
|
4035
4036
|
view: X(a),
|
|
@@ -4042,11 +4043,11 @@ var dn = [
|
|
|
4042
4043
|
builder: t.builder
|
|
4043
4044
|
}, he({ _: 2 }, [e.$slots.event ? {
|
|
4044
4045
|
name: "event",
|
|
4045
|
-
fn: Q((t) => [K(e.$slots, "event",
|
|
4046
|
+
fn: Q((t) => [K(e.$slots, "event", z(t, { view: X(a) }), void 0, !0)]),
|
|
4046
4047
|
key: "0"
|
|
4047
4048
|
} : void 0]), 1032, ["builder"])) : N("", !0)], 2)], 2));
|
|
4048
4049
|
}
|
|
4049
|
-
}), [["__scopeId", "data-v-
|
|
4050
|
+
}), [["__scopeId", "data-v-b90f5519"]]), Qn = /* @__PURE__ */ L({
|
|
4050
4051
|
__name: "CoarDisplayZoneSwitcher",
|
|
4051
4052
|
props: {
|
|
4052
4053
|
modelValue: {},
|
|
@@ -4144,9 +4145,9 @@ var dn = [
|
|
|
4144
4145
|
},
|
|
4145
4146
|
emits: ["rangeChange", "scroll"],
|
|
4146
4147
|
setup(e, { expose: t, emit: n }) {
|
|
4147
|
-
let r = e, i = n, a = W(null), o = W(0), s = W(0), c = W(0), l = W(0), u = j(() => new
|
|
4148
|
-
x:
|
|
4149
|
-
y:
|
|
4148
|
+
let r = e, i = n, a = W(null), o = W(0), s = W(0), c = W(0), l = W(0), u = j(() => new O(r.itemCountX, r.cellWidth)), d = j(() => new O(r.itemCountY, r.cellHeight)), f = j(() => ({
|
|
4149
|
+
x: S(u.value, o.value, c.value, r.overscanX),
|
|
4150
|
+
y: S(d.value, s.value, l.value, r.overscanY)
|
|
4150
4151
|
})), p = j(() => r.itemCountX * r.cellWidth), m = j(() => r.itemCountY * r.cellHeight), h = j(() => {
|
|
4151
4152
|
let e = f.value, t = r.cellWidth, n = r.cellHeight, i = [];
|
|
4152
4153
|
for (let a = e.y.startIndex; a < e.y.endIndex; a++) for (let o = e.x.startIndex; o < e.x.endIndex; o++) i.push({
|
|
@@ -4170,13 +4171,13 @@ var dn = [
|
|
|
4170
4171
|
}
|
|
4171
4172
|
Z(f, (e) => i("rangeChange", e));
|
|
4172
4173
|
let v = null;
|
|
4173
|
-
return
|
|
4174
|
+
return Ce(() => {
|
|
4174
4175
|
let e = a.value;
|
|
4175
4176
|
e && (c.value = e.clientWidth, l.value = e.clientHeight, o.value = e.scrollLeft, s.value = e.scrollTop, typeof ResizeObserver < "u" && (v = new ResizeObserver(() => {
|
|
4176
4177
|
let t = e.clientWidth, n = e.clientHeight;
|
|
4177
4178
|
t !== c.value && (c.value = t), n !== l.value && (l.value = n);
|
|
4178
4179
|
}), v.observe(e)));
|
|
4179
|
-
}),
|
|
4180
|
+
}), Se(() => {
|
|
4180
4181
|
v?.disconnect();
|
|
4181
4182
|
}), t({
|
|
4182
4183
|
getRange: () => f.value,
|
|
@@ -4197,14 +4198,14 @@ var dn = [
|
|
|
4197
4198
|
onScroll: _
|
|
4198
4199
|
}, [F("div", {
|
|
4199
4200
|
class: "coar-virtualized-surface-2d__spacer",
|
|
4200
|
-
style:
|
|
4201
|
+
style: H({
|
|
4201
4202
|
width: p.value + "px",
|
|
4202
4203
|
height: m.value + "px"
|
|
4203
4204
|
})
|
|
4204
4205
|
}, [(U(!0), P(A, null, G(h.value, (t) => (U(), P("div", {
|
|
4205
4206
|
key: t.key,
|
|
4206
4207
|
class: "coar-virtualized-surface-2d__cell",
|
|
4207
|
-
style:
|
|
4208
|
+
style: H({
|
|
4208
4209
|
width: r.cellWidth + "px",
|
|
4209
4210
|
height: r.cellHeight + "px",
|
|
4210
4211
|
transform: `translate(${t.tx}px, ${t.ty}px)`
|
|
@@ -4218,4 +4219,4 @@ var dn = [
|
|
|
4218
4219
|
}
|
|
4219
4220
|
}), [["__scopeId", "data-v-fbba32db"]]);
|
|
4220
4221
|
//#endregion
|
|
4221
|
-
export { Ke as CalendarBuilder, Kn as CoarAgendaView, Zn as CoarCalendar, en as CoarDayView, Qn as CoarDisplayZoneSwitcher, Nn as CoarMonthView, Qt as CoarTimeGrid, nn as CoarWeekView,
|
|
4222
|
+
export { Ke as CalendarBuilder, Kn as CoarAgendaView, Zn as CoarCalendar, en as CoarDayView, Qn as CoarDisplayZoneSwitcher, Nn as CoarMonthView, Qt as CoarTimeGrid, nn as CoarWeekView, D as DstResolutionError, fe as EXPAND_SERIES_NOT_IMPLEMENTED_MESSAGE, se as MIN_RESIZE_MINUTES, O as MeasurementCache, n as Temporal, Fn as VirtualizedSurface1DY, er as VirtualizedSurface2D, E as applyMoveToEvent, te as buildAgendaItems, w as buildDropPayload, k as buildFormatOptions, ue as computeAnchorAdjustment, x as computeAutoScrollVelocity, C as computeViewWindow, g as dateKey, b as daysInWindow, i as detectBrowserTimezone, r as detectFirstDayOfWeekFromLocale, f as detectHour12FromLocale, ie as endOfMonth, e as endOfWeek, T as eventStartDateInZone, h as expandSeries, u as formatScheduledTime, Ye as getEventZoneHints, S as getVisibleRange1D, ae as getVisibleRange2D, ce as hitTestVerticalSurface, _ as isAllDayEvent, y as isTimedEvent, d as isoWeekNumber, le as layoutAllDayBand, oe as layoutDayEvents, ne as layoutMonthGrid, re as layoutOverlappingIntervals, p as localizedWeekdayNames, a as monthGridDates, de as navigateCursor, c as nowInZone, l as parsePlainDate, m as parseScheduledTime, me as startOfMonth, t as startOfWeek, v as todayInZone, it as useA11yAnnouncer, ut as useAgendaView, qe as useCalendar, nt as useCalendarDnd, Qe as useCoarDrag, st as useDayView, ot as useMonthDnd, lt as useMonthView, at as useTimeGridDnd, Ze as useViewWindow, ct as useWeekView, o as validateCalendarEvent, s as weekDates, pe as windowContainsDate, ee as windowDayCount };
|