@cocoar/vue-calendar 3.4.0-beta.21 → 3.4.0-beta.25
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/calendar-builder.d.ts.map +1 -1
- package/dist/components/CoarMonthListView.vue.d.ts.map +1 -1
- package/dist/components/CoarMonthView.vue.d.ts.map +1 -1
- package/dist/components/CoarTimeGrid.vue.d.ts.map +1 -1
- package/dist/components/internal/CoarEventAssignees.vue.d.ts.map +1 -1
- package/dist/components/internal/month/CoarMonthCell.vue.d.ts.map +1 -1
- package/dist/components/internal/month/CoarMonthDayOverlay.vue.d.ts.map +1 -1
- package/dist/components/internal/month/CoarMonthGrid.vue.d.ts +2 -0
- package/dist/components/internal/month/CoarMonthGrid.vue.d.ts.map +1 -1
- package/dist/components/internal/time-grid/CoarTimeGridAllDayBand.vue.d.ts.map +1 -1
- package/dist/components/internal/time-grid/CoarTimeGridEvent.vue.d.ts.map +1 -1
- package/dist/components/internal/time-grid/CoarTimeGridSurface.vue.d.ts.map +1 -1
- package/dist/components/internal/time-grid/CoarTimeSelectionLayer.vue.d.ts.map +1 -1
- package/dist/composables/useCalendarDnd.d.ts.map +1 -1
- package/dist/composables/useCoarDrag.d.ts.map +1 -1
- package/dist/composables/useMonthDayOverlay.d.ts.map +1 -1
- package/dist/composables/useTimeGridDnd.d.ts.map +1 -1
- package/dist/composables/useTimeGridPresentation.d.ts.map +1 -1
- package/dist/core/temporal.d.ts +2 -0
- package/dist/core/temporal.d.ts.map +1 -1
- package/dist/{core-Dcw3ry8Z.js → core-BU4PCeme.js} +153 -153
- package/dist/core.js +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1811 -1766
- package/dist/{move-math-C9mwvFPJ.js → move-math-ChynaO4h.js} +171 -171
- package/dist/recurrence.js +1 -1
- package/dist/vue-calendar.css +1 -1
- package/package.json +6 -6
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { O as e, S as t, _ as n, d as r, k as i, l as a, o, s, u as c, v as l } from "./move-math-ChynaO4h.js";
|
|
2
2
|
import { Temporal as u } from "@js-temporal/polyfill";
|
|
3
3
|
//#region src/core/timeGridRange.ts
|
|
4
4
|
var d = {
|
|
@@ -30,13 +30,13 @@ var d = {
|
|
|
30
30
|
function f(e, t = {}) {
|
|
31
31
|
return e === "week" ? d.week : e === "workWeek" ? d.workWeek : t.explicit ? t.explicit : t.dayMode === "multiDay" ? d.dayMulti : d.daySingle;
|
|
32
32
|
}
|
|
33
|
-
function p(
|
|
34
|
-
let { spec: n, cursor: r, firstDayOfWeek:
|
|
33
|
+
function p(t) {
|
|
34
|
+
let { spec: n, cursor: r, firstDayOfWeek: a, workDays: o } = t, s = n.anchor === "weekStart" ? e(r, a) : r, c = m(n, t.responsiveColumns), l = Array.from({ length: c }, (e, t) => s.add({ days: t }));
|
|
35
35
|
return {
|
|
36
|
-
start:
|
|
37
|
-
spanDays:
|
|
38
|
-
days: n.filter === "workDays" ? l.filter((e) =>
|
|
39
|
-
stepDays: h(n,
|
|
36
|
+
start: s,
|
|
37
|
+
spanDays: c,
|
|
38
|
+
days: n.filter === "workDays" ? l.filter((e) => o.includes(i(e.dayOfWeek))) : l,
|
|
39
|
+
stepDays: h(n, c)
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
42
|
function m(e, t) {
|
|
@@ -54,94 +54,94 @@ var g = [
|
|
|
54
54
|
4,
|
|
55
55
|
5
|
|
56
56
|
];
|
|
57
|
-
function _(
|
|
58
|
-
let { view:
|
|
59
|
-
switch (
|
|
57
|
+
function _(n) {
|
|
58
|
+
let { view: r, cursor: i, firstDayOfWeek: a, timezone: o } = n;
|
|
59
|
+
switch (r) {
|
|
60
60
|
case "day":
|
|
61
61
|
case "week":
|
|
62
62
|
case "workWeek": {
|
|
63
|
-
let
|
|
64
|
-
spec: f(
|
|
63
|
+
let e = p({
|
|
64
|
+
spec: f(r, {
|
|
65
65
|
dayMode: "multiDay",
|
|
66
|
-
explicit:
|
|
66
|
+
explicit: r === "day" ? n.timeGridRange ?? null : null
|
|
67
67
|
}),
|
|
68
|
-
cursor:
|
|
69
|
-
firstDayOfWeek:
|
|
68
|
+
cursor: i,
|
|
69
|
+
firstDayOfWeek: a,
|
|
70
70
|
workDays: [],
|
|
71
|
-
responsiveColumns:
|
|
71
|
+
responsiveColumns: n.dayColumnCount ?? 1
|
|
72
72
|
});
|
|
73
73
|
return {
|
|
74
|
-
view:
|
|
75
|
-
start:
|
|
76
|
-
end:
|
|
77
|
-
timezone:
|
|
74
|
+
view: r,
|
|
75
|
+
start: e.start.toString(),
|
|
76
|
+
end: e.start.add({ days: e.spanDays }).toString(),
|
|
77
|
+
timezone: o
|
|
78
78
|
};
|
|
79
79
|
}
|
|
80
80
|
case "dayAgenda": {
|
|
81
|
-
let
|
|
81
|
+
let t = e(i, a);
|
|
82
82
|
return {
|
|
83
|
-
view:
|
|
84
|
-
start:
|
|
85
|
-
end:
|
|
86
|
-
timezone:
|
|
83
|
+
view: r,
|
|
84
|
+
start: t.toString(),
|
|
85
|
+
end: t.add({ days: 7 }).toString(),
|
|
86
|
+
timezone: o
|
|
87
87
|
};
|
|
88
88
|
}
|
|
89
89
|
case "month": {
|
|
90
|
-
let
|
|
91
|
-
year:
|
|
92
|
-
month:
|
|
93
|
-
}),
|
|
90
|
+
let e = Math.max(0, Math.floor(n.monthBuffer ?? 0)), s = u.PlainYearMonth.from({
|
|
91
|
+
year: i.year,
|
|
92
|
+
month: i.month
|
|
93
|
+
}), c = t(s.subtract({ months: e }), a), l = t(s.add({ months: e }), a);
|
|
94
94
|
return {
|
|
95
|
-
view:
|
|
96
|
-
start:
|
|
97
|
-
end:
|
|
98
|
-
timezone:
|
|
95
|
+
view: r,
|
|
96
|
+
start: c[0].toString(),
|
|
97
|
+
end: l[41].add({ days: 1 }).toString(),
|
|
98
|
+
timezone: o
|
|
99
99
|
};
|
|
100
100
|
}
|
|
101
101
|
case "monthList": {
|
|
102
|
-
let e =
|
|
103
|
-
year:
|
|
104
|
-
month:
|
|
105
|
-
}),
|
|
102
|
+
let e = t(u.PlainYearMonth.from({
|
|
103
|
+
year: i.year,
|
|
104
|
+
month: i.month
|
|
105
|
+
}), a);
|
|
106
106
|
return {
|
|
107
|
-
view:
|
|
107
|
+
view: r,
|
|
108
108
|
start: e[0].toString(),
|
|
109
109
|
end: e[41].add({ days: 1 }).toString(),
|
|
110
|
-
timezone:
|
|
110
|
+
timezone: o
|
|
111
111
|
};
|
|
112
112
|
}
|
|
113
113
|
case "agenda": {
|
|
114
|
-
let
|
|
114
|
+
let e = n.agendaLengthDays ?? 30;
|
|
115
115
|
return {
|
|
116
|
-
view:
|
|
117
|
-
start:
|
|
118
|
-
end:
|
|
119
|
-
timezone:
|
|
116
|
+
view: r,
|
|
117
|
+
start: i.toString(),
|
|
118
|
+
end: i.add({ days: e }).toString(),
|
|
119
|
+
timezone: o
|
|
120
120
|
};
|
|
121
121
|
}
|
|
122
122
|
case "timeline": {
|
|
123
|
-
let
|
|
123
|
+
let e = n.timelineRangeDays ?? 60;
|
|
124
124
|
return {
|
|
125
|
-
view:
|
|
126
|
-
start:
|
|
127
|
-
end:
|
|
128
|
-
timezone:
|
|
125
|
+
view: r,
|
|
126
|
+
start: i.toString(),
|
|
127
|
+
end: i.add({ days: e }).toString(),
|
|
128
|
+
timezone: o
|
|
129
129
|
};
|
|
130
130
|
}
|
|
131
131
|
case "year": {
|
|
132
132
|
let e = u.PlainDate.from({
|
|
133
|
-
year:
|
|
133
|
+
year: i.year,
|
|
134
134
|
month: 1,
|
|
135
135
|
day: 1
|
|
136
136
|
});
|
|
137
137
|
return {
|
|
138
|
-
view:
|
|
138
|
+
view: r,
|
|
139
139
|
start: e.toString(),
|
|
140
140
|
end: e.add({ years: 1 }).toString(),
|
|
141
|
-
timezone:
|
|
141
|
+
timezone: o
|
|
142
142
|
};
|
|
143
143
|
}
|
|
144
|
-
default: throw Error(`Unsupported view: ${String(
|
|
144
|
+
default: throw Error(`Unsupported view: ${String(r)}`);
|
|
145
145
|
}
|
|
146
146
|
}
|
|
147
147
|
function* v(e) {
|
|
@@ -205,9 +205,9 @@ function ie(e) {
|
|
|
205
205
|
dateStyle: e.dateStyle,
|
|
206
206
|
timeStyle: e.timeStyle,
|
|
207
207
|
hour12: e.hour12
|
|
208
|
-
}, o = u.PlainDate.from(n.start),
|
|
208
|
+
}, o = u.PlainDate.from(n.start), s = u.PlainDate.from(n.end).subtract({ days: 1 }), l = () => new Intl.DateTimeFormat(i, c(ne, a)).formatRange(S(o), S(s)), d = (e) => new Intl.DateTimeFormat(i, c(e, a)).format(S(r));
|
|
209
209
|
switch (t) {
|
|
210
|
-
case "day": return o.until(
|
|
210
|
+
case "day": return o.until(s, { largestUnit: "day" }).days > 0 ? l() : d(x);
|
|
211
211
|
case "dayAgenda": return d(x);
|
|
212
212
|
case "week":
|
|
213
213
|
case "workWeek": return l();
|
|
@@ -468,25 +468,25 @@ function B(e) {
|
|
|
468
468
|
}
|
|
469
469
|
//#endregion
|
|
470
470
|
//#region src/core/timeGridLayout.ts
|
|
471
|
-
function V(
|
|
472
|
-
let { day:
|
|
471
|
+
function V(e, t) {
|
|
472
|
+
let { day: n, timeRange: r, timezone: i } = t, [a, o] = r, c = a * 60, l = o * 60;
|
|
473
473
|
if (l - c <= 0) return [];
|
|
474
474
|
let u = [], d = /* @__PURE__ */ new Set();
|
|
475
|
-
for (let
|
|
476
|
-
if (d.has(
|
|
477
|
-
let
|
|
478
|
-
if (
|
|
475
|
+
for (let t of e) {
|
|
476
|
+
if (d.has(t.id) || (d.add(t.id), !s(t))) continue;
|
|
477
|
+
let e = U(t.start, n, i), r;
|
|
478
|
+
if (t.end) r = U(t.end, n, i);
|
|
479
479
|
else {
|
|
480
|
-
if (
|
|
481
|
-
|
|
480
|
+
if (e < 0) continue;
|
|
481
|
+
r = e + 30;
|
|
482
482
|
}
|
|
483
|
-
let
|
|
483
|
+
let a = e, o = r, f = Math.max(a, c), p = Math.min(o, l);
|
|
484
484
|
p > 1440 && (p = Math.min(p, 1440)), f < 0 && (f = 0), !(p <= f) && (p <= c || f >= l || u.push({
|
|
485
|
-
event:
|
|
485
|
+
event: t,
|
|
486
486
|
startMinutes: f - c,
|
|
487
487
|
endMinutes: p - c,
|
|
488
|
-
clippedTop:
|
|
489
|
-
clippedBottom:
|
|
488
|
+
clippedTop: a < c,
|
|
489
|
+
clippedBottom: o > l
|
|
490
490
|
}));
|
|
491
491
|
}
|
|
492
492
|
if (u.length === 0) return [];
|
|
@@ -498,23 +498,23 @@ function V(t, n) {
|
|
|
498
498
|
m.length > 0 && p.push(m);
|
|
499
499
|
let g = /* @__PURE__ */ new Map();
|
|
500
500
|
for (let e of p) {
|
|
501
|
-
let
|
|
501
|
+
let n = B(e.map((e) => ({
|
|
502
502
|
id: e.event.id,
|
|
503
503
|
start: e.startMinutes,
|
|
504
504
|
end: Math.max(e.startMinutes, e.endMinutes - 1)
|
|
505
505
|
}))), r = -1;
|
|
506
|
-
if (
|
|
507
|
-
for (let e of
|
|
506
|
+
if (t.priorityId !== void 0) {
|
|
507
|
+
for (let e of n.bars) if (e.id === t.priorityId) {
|
|
508
508
|
r = e.lane;
|
|
509
509
|
break;
|
|
510
510
|
}
|
|
511
511
|
}
|
|
512
|
-
let i =
|
|
513
|
-
for (let e of
|
|
514
|
-
let
|
|
515
|
-
r >= 0 && r < i && (
|
|
516
|
-
lane:
|
|
517
|
-
laneCount:
|
|
512
|
+
let i = n.laneCount - 1;
|
|
513
|
+
for (let e of n.bars) {
|
|
514
|
+
let t = e.lane;
|
|
515
|
+
r >= 0 && r < i && (t === r ? t = i : t > r && --t), g.set(e.id, {
|
|
516
|
+
lane: t,
|
|
517
|
+
laneCount: n.laneCount
|
|
518
518
|
});
|
|
519
519
|
}
|
|
520
520
|
}
|
|
@@ -535,25 +535,25 @@ function V(t, n) {
|
|
|
535
535
|
});
|
|
536
536
|
}
|
|
537
537
|
function H(e, t) {
|
|
538
|
-
let { days:
|
|
539
|
-
if (t.timezone,
|
|
540
|
-
let
|
|
541
|
-
for (let e = 0; e <
|
|
542
|
-
n
|
|
538
|
+
let { days: n } = t;
|
|
539
|
+
if (t.timezone, n.length === 0) return [];
|
|
540
|
+
let i = /* @__PURE__ */ new Map();
|
|
541
|
+
for (let e = 0; e < n.length; e++) i.set(r(n[e]), e);
|
|
542
|
+
r(n[n.length - 1]);
|
|
543
543
|
let s = [], c = /* @__PURE__ */ new Set();
|
|
544
544
|
for (let t of e) {
|
|
545
|
-
if (c.has(t.id) || (c.add(t.id), !
|
|
545
|
+
if (c.has(t.id) || (c.add(t.id), !o(t))) continue;
|
|
546
546
|
let e = t.start, l;
|
|
547
|
-
t.end ? (l = t.end.subtract({ days: 1 }),
|
|
548
|
-
let u =
|
|
549
|
-
if (
|
|
550
|
-
let f =
|
|
547
|
+
t.end ? (l = t.end.subtract({ days: 1 }), a.PlainDate.compare(l, e) < 0 && (l = e)) : l = e;
|
|
548
|
+
let u = n[0], d = n[n.length - 1];
|
|
549
|
+
if (a.PlainDate.compare(l, u) < 0 || a.PlainDate.compare(e, d) > 0) continue;
|
|
550
|
+
let f = a.PlainDate.compare(e, u) < 0 ? u : e, p = a.PlainDate.compare(l, d) > 0 ? d : l, m = i.get(r(f)), h = i.get(r(p));
|
|
551
551
|
m === void 0 || h === void 0 || s.push({
|
|
552
552
|
event: t,
|
|
553
553
|
startCol: m,
|
|
554
554
|
endCol: h,
|
|
555
|
-
clippedStart:
|
|
556
|
-
clippedEnd:
|
|
555
|
+
clippedStart: a.PlainDate.compare(e, u) < 0,
|
|
556
|
+
clippedEnd: a.PlainDate.compare(l, d) > 0
|
|
557
557
|
});
|
|
558
558
|
}
|
|
559
559
|
if (s.length === 0) return [];
|
|
@@ -574,14 +574,14 @@ function H(e, t) {
|
|
|
574
574
|
}));
|
|
575
575
|
}
|
|
576
576
|
function U(e, t, n) {
|
|
577
|
-
let r = e.withTimeZone(n), i =
|
|
577
|
+
let r = e.withTimeZone(n), i = a.PlainDateTime.from({
|
|
578
578
|
year: t.year,
|
|
579
579
|
month: t.month,
|
|
580
580
|
day: t.day,
|
|
581
581
|
hour: 0,
|
|
582
582
|
minute: 0
|
|
583
|
-
}).toZonedDateTime(n, { disambiguation: "compatible" }),
|
|
584
|
-
return
|
|
583
|
+
}).toZonedDateTime(n, { disambiguation: "compatible" }), o = i.add({ days: 1 });
|
|
584
|
+
return a.ZonedDateTime.compare(r, i) < 0 ? -1 : a.ZonedDateTime.compare(r, o) >= 0 ? 1441 : r.hour * 60 + r.minute + r.second / 60;
|
|
585
585
|
}
|
|
586
586
|
//#endregion
|
|
587
587
|
//#region src/core/timeSelection.ts
|
|
@@ -671,7 +671,7 @@ function me(e) {
|
|
|
671
671
|
};
|
|
672
672
|
}
|
|
673
673
|
function he(e, t, n, r = "compatible") {
|
|
674
|
-
let i = Math.round(t),
|
|
674
|
+
let i = Math.round(t), o = i >= W ? e.add({ days: Math.floor(i / W) }) : e, s = i >= W ? i % W : Math.max(0, i), c = o.toPlainDateTime(a.PlainTime.from({
|
|
675
675
|
hour: Math.floor(s / 60),
|
|
676
676
|
minute: s % 60
|
|
677
677
|
}));
|
|
@@ -747,13 +747,13 @@ function xe(e, t) {
|
|
|
747
747
|
};
|
|
748
748
|
}
|
|
749
749
|
function Se(e, t) {
|
|
750
|
-
let { gridDates:
|
|
751
|
-
if (
|
|
752
|
-
let
|
|
753
|
-
for (let e = 0; e <
|
|
754
|
-
let t =
|
|
755
|
-
for (let e = 0; e < 7; e++) i.set(
|
|
756
|
-
|
|
750
|
+
let { gridDates: n, timezone: i } = t;
|
|
751
|
+
if (n.length < 7 || n.length % 7 != 0) throw RangeError(`gridDates must contain complete seven-day rows (got ${n.length})`);
|
|
752
|
+
let o = [];
|
|
753
|
+
for (let e = 0; e < n.length / 7; e++) {
|
|
754
|
+
let t = n.slice(e * 7, e * 7 + 7), i = /* @__PURE__ */ new Map();
|
|
755
|
+
for (let e = 0; e < 7; e++) i.set(r(t[e]), e);
|
|
756
|
+
o.push({
|
|
757
757
|
rowIndex: e,
|
|
758
758
|
days: t,
|
|
759
759
|
dayKeyToCol: i,
|
|
@@ -761,7 +761,7 @@ function Se(e, t) {
|
|
|
761
761
|
weekEnd: t[6]
|
|
762
762
|
});
|
|
763
763
|
}
|
|
764
|
-
let s = /* @__PURE__ */ new Set(), c = [], l = /* @__PURE__ */ new Map(), u = Y(
|
|
764
|
+
let s = /* @__PURE__ */ new Set(), c = [], l = /* @__PURE__ */ new Map(), u = Y(n[0]), d = Y(n[n.length - 1]), f = t.visibleStart ? Y(t.visibleStart) : -Infinity, p = t.visibleEnd ? Y(t.visibleEnd) : Infinity;
|
|
765
765
|
for (let t of e) {
|
|
766
766
|
if (s.has(t.id)) continue;
|
|
767
767
|
s.add(t.id);
|
|
@@ -781,38 +781,38 @@ function Se(e, t) {
|
|
|
781
781
|
r ? r.push(i) : l.set(n, [i]);
|
|
782
782
|
}
|
|
783
783
|
}
|
|
784
|
-
return { weekRows:
|
|
785
|
-
let
|
|
784
|
+
return { weekRows: o.map((e) => {
|
|
785
|
+
let n = [];
|
|
786
786
|
for (let i of c) {
|
|
787
|
-
if (
|
|
788
|
-
let
|
|
787
|
+
if (a.PlainDate.compare(i.lastDayInclusive, e.weekStart) < 0 || a.PlainDate.compare(i.firstDay, e.weekEnd) > 0) continue;
|
|
788
|
+
let o = [
|
|
789
789
|
i.firstDay,
|
|
790
790
|
e.weekStart,
|
|
791
791
|
t.visibleStart
|
|
792
|
-
].filter((e) => e !== void 0).reduce((e, t) =>
|
|
792
|
+
].filter((e) => e !== void 0).reduce((e, t) => a.PlainDate.compare(t, e) > 0 ? t : e), s = [
|
|
793
793
|
i.lastDayInclusive,
|
|
794
794
|
e.weekEnd,
|
|
795
795
|
t.visibleEnd
|
|
796
|
-
].filter((e) => e !== void 0).reduce((e, t) =>
|
|
797
|
-
if (
|
|
798
|
-
let c = e.dayKeyToCol.get(
|
|
799
|
-
c === void 0 || l === void 0 ||
|
|
796
|
+
].filter((e) => e !== void 0).reduce((e, t) => a.PlainDate.compare(t, e) < 0 ? t : e);
|
|
797
|
+
if (a.PlainDate.compare(o, s) > 0) continue;
|
|
798
|
+
let c = e.dayKeyToCol.get(r(o)), l = e.dayKeyToCol.get(r(s));
|
|
799
|
+
c === void 0 || l === void 0 || n.push({
|
|
800
800
|
...i,
|
|
801
801
|
startCol: c,
|
|
802
802
|
endCol: l,
|
|
803
|
-
clippedStart:
|
|
804
|
-
clippedEnd:
|
|
803
|
+
clippedStart: a.PlainDate.compare(i.firstDay, o) < 0,
|
|
804
|
+
clippedEnd: a.PlainDate.compare(i.lastDayInclusive, s) > 0
|
|
805
805
|
});
|
|
806
806
|
}
|
|
807
807
|
let i = [];
|
|
808
|
-
if (
|
|
809
|
-
let e = B(
|
|
808
|
+
if (n.length > 0) {
|
|
809
|
+
let e = B(n.map((e) => ({
|
|
810
810
|
id: e.event.id,
|
|
811
811
|
start: e.startCol,
|
|
812
812
|
end: e.endCol
|
|
813
813
|
}))), t = /* @__PURE__ */ new Map();
|
|
814
814
|
for (let n of e.bars) t.set(n.id, n.lane);
|
|
815
|
-
i =
|
|
815
|
+
i = n.map((n) => ({
|
|
816
816
|
event: n.event,
|
|
817
817
|
lane: t.get(n.event.id) ?? 0,
|
|
818
818
|
laneCount: e.laneCount,
|
|
@@ -822,18 +822,18 @@ function Se(e, t) {
|
|
|
822
822
|
clippedEnd: n.clippedEnd
|
|
823
823
|
}));
|
|
824
824
|
}
|
|
825
|
-
let
|
|
826
|
-
for (let
|
|
827
|
-
if (t.visibleStart &&
|
|
828
|
-
let e = n
|
|
829
|
-
i &&
|
|
825
|
+
let o = /* @__PURE__ */ new Map();
|
|
826
|
+
for (let n of e.days) {
|
|
827
|
+
if (t.visibleStart && a.PlainDate.compare(n, t.visibleStart) < 0 || t.visibleEnd && a.PlainDate.compare(n, t.visibleEnd) > 0) continue;
|
|
828
|
+
let e = r(n), i = l.get(e);
|
|
829
|
+
i && o.set(e, i);
|
|
830
830
|
}
|
|
831
831
|
return {
|
|
832
832
|
rowIndex: e.rowIndex,
|
|
833
833
|
weekStart: e.weekStart,
|
|
834
834
|
days: e.days,
|
|
835
835
|
multiDayBars: i,
|
|
836
|
-
cellPills:
|
|
836
|
+
cellPills: o
|
|
837
837
|
};
|
|
838
838
|
}) };
|
|
839
839
|
}
|
|
@@ -842,15 +842,15 @@ function Y(e) {
|
|
|
842
842
|
}
|
|
843
843
|
var X = /* @__PURE__ */ new WeakMap();
|
|
844
844
|
function Ce(e, t) {
|
|
845
|
-
let
|
|
846
|
-
if (
|
|
845
|
+
let n = X.get(e);
|
|
846
|
+
if (n && n.start === e.start && n.end === e.end && n.timezone === t) return n.bounds;
|
|
847
847
|
let { firstDay: i, lastDayInclusive: a, isMultiDay: o } = we(e, t), s = {
|
|
848
848
|
firstDay: i,
|
|
849
849
|
lastDayInclusive: a,
|
|
850
850
|
isMultiDay: o,
|
|
851
851
|
firstOrd: Y(i),
|
|
852
852
|
lastOrd: Y(a),
|
|
853
|
-
firstKey:
|
|
853
|
+
firstKey: r(i)
|
|
854
854
|
};
|
|
855
855
|
return X.set(e, {
|
|
856
856
|
start: e.start,
|
|
@@ -860,30 +860,30 @@ function Ce(e, t) {
|
|
|
860
860
|
}), s;
|
|
861
861
|
}
|
|
862
862
|
function we(e, t) {
|
|
863
|
-
if (
|
|
863
|
+
if (o(e)) {
|
|
864
864
|
let t = e.start, n;
|
|
865
|
-
return e.end ? (n = e.end.subtract({ days: 1 }),
|
|
865
|
+
return e.end ? (n = e.end.subtract({ days: 1 }), a.PlainDate.compare(n, t) < 0 && (n = t)) : n = t, {
|
|
866
866
|
firstDay: t,
|
|
867
867
|
lastDayInclusive: n,
|
|
868
|
-
isMultiDay:
|
|
868
|
+
isMultiDay: a.PlainDate.compare(n, t) > 0
|
|
869
869
|
};
|
|
870
870
|
}
|
|
871
|
-
let
|
|
872
|
-
if (e.end instanceof
|
|
873
|
-
let
|
|
874
|
-
|
|
871
|
+
let r = l(e.start, t), i = r;
|
|
872
|
+
if (e.end instanceof a.ZonedDateTime) {
|
|
873
|
+
let o = e.end.withTimeZone(t), s = o.toPlainDate();
|
|
874
|
+
i = n(o) ? s.subtract({ days: 1 }) : s, a.PlainDate.compare(i, r) < 0 && (i = r);
|
|
875
875
|
}
|
|
876
876
|
return {
|
|
877
|
-
firstDay:
|
|
878
|
-
lastDayInclusive:
|
|
879
|
-
isMultiDay:
|
|
877
|
+
firstDay: r,
|
|
878
|
+
lastDayInclusive: i,
|
|
879
|
+
isMultiDay: a.PlainDate.compare(i, r) > 0
|
|
880
880
|
};
|
|
881
881
|
}
|
|
882
882
|
//#endregion
|
|
883
883
|
//#region src/core/agendaLayout.ts
|
|
884
884
|
function Te(e, t) {
|
|
885
|
-
let { rangeStart:
|
|
886
|
-
if (
|
|
885
|
+
let { rangeStart: n, rangeEnd: i, timezone: s, showEmptyDays: c = !1 } = t, l = a.PlainDate.from(n), u = a.PlainDate.from(i);
|
|
886
|
+
if (a.PlainDate.compare(u, l) <= 0) return [];
|
|
887
887
|
let d = /* @__PURE__ */ new Map(), f = /* @__PURE__ */ new Set();
|
|
888
888
|
function p(e) {
|
|
889
889
|
let t = d.get(e);
|
|
@@ -895,33 +895,33 @@ function Te(e, t) {
|
|
|
895
895
|
for (let t of e) {
|
|
896
896
|
if (f.has(t.id)) continue;
|
|
897
897
|
f.add(t.id);
|
|
898
|
-
let e =
|
|
899
|
-
if (
|
|
898
|
+
let e = o(t), { firstDay: n, lastDayInclusive: i } = Ee(t, s), c = a.PlainDate.compare(n, l) < 0 ? l : n, d = u.subtract({ days: 1 }), m = a.PlainDate.compare(i, d) > 0 ? d : i;
|
|
899
|
+
if (a.PlainDate.compare(m, c) < 0) continue;
|
|
900
900
|
let h = c, g = !0;
|
|
901
|
-
for (;
|
|
902
|
-
let i = p(
|
|
901
|
+
for (; a.PlainDate.compare(h, m) <= 0;) {
|
|
902
|
+
let i = p(r(h)), o = a.PlainDate.compare(h, n) > 0 || !g;
|
|
903
903
|
if (e) i.allDay.push({
|
|
904
904
|
event: t,
|
|
905
|
-
isContinuation:
|
|
905
|
+
isContinuation: o
|
|
906
906
|
});
|
|
907
907
|
else {
|
|
908
|
-
let e =
|
|
908
|
+
let e = o ? -Infinity : De(t, s);
|
|
909
909
|
i.timed.push({
|
|
910
910
|
event: t,
|
|
911
911
|
startMs: e,
|
|
912
|
-
isContinuation:
|
|
912
|
+
isContinuation: o
|
|
913
913
|
});
|
|
914
914
|
}
|
|
915
915
|
g = !1, h = h.add({ days: 1 });
|
|
916
916
|
}
|
|
917
917
|
}
|
|
918
918
|
let m = [], h = l;
|
|
919
|
-
for (;
|
|
920
|
-
let e =
|
|
921
|
-
if ((
|
|
919
|
+
for (; a.PlainDate.compare(h, u) < 0;) {
|
|
920
|
+
let e = r(h), t = d.get(e), n = !!t && (t.allDay.length > 0 || t.timed.length > 0);
|
|
921
|
+
if ((n || c) && (m.push({
|
|
922
922
|
kind: "header",
|
|
923
923
|
date: e,
|
|
924
|
-
isEmpty: !
|
|
924
|
+
isEmpty: !n,
|
|
925
925
|
key: `h-${e}`
|
|
926
926
|
}), t)) {
|
|
927
927
|
t.allDay.sort((e, t) => e.event.id < t.event.id ? -1 : +(e.event.id > t.event.id));
|
|
@@ -946,25 +946,25 @@ function Te(e, t) {
|
|
|
946
946
|
return m;
|
|
947
947
|
}
|
|
948
948
|
function Ee(e, t) {
|
|
949
|
-
if (
|
|
949
|
+
if (o(e)) {
|
|
950
950
|
let t = e.start, n;
|
|
951
|
-
return e.end ? (n = e.end.subtract({ days: 1 }),
|
|
951
|
+
return e.end ? (n = e.end.subtract({ days: 1 }), a.PlainDate.compare(n, t) < 0 && (n = t)) : n = t, {
|
|
952
952
|
firstDay: t,
|
|
953
953
|
lastDayInclusive: n
|
|
954
954
|
};
|
|
955
955
|
}
|
|
956
|
-
let n =
|
|
956
|
+
let n = l(e.start, t), r = n;
|
|
957
957
|
if (e.end) {
|
|
958
|
-
let
|
|
959
|
-
|
|
958
|
+
let i = e.end.withTimeZone(t), o = i.toPlainDate();
|
|
959
|
+
i.hour === 0 && i.minute === 0 && i.second === 0 && i.millisecond === 0 && i.microsecond === 0 && i.nanosecond === 0 ? (r = o.subtract({ days: 1 }), a.PlainDate.compare(r, n) < 0 && (r = n)) : r = o;
|
|
960
960
|
}
|
|
961
961
|
return {
|
|
962
962
|
firstDay: n,
|
|
963
|
-
lastDayInclusive:
|
|
963
|
+
lastDayInclusive: r
|
|
964
964
|
};
|
|
965
965
|
}
|
|
966
966
|
function De(e, t) {
|
|
967
|
-
return
|
|
967
|
+
return o(e) ? e.start.toZonedDateTime({ timeZone: t }).epochMilliseconds : e.start.epochMilliseconds;
|
|
968
968
|
}
|
|
969
969
|
//#endregion
|
|
970
970
|
//#region src/core/timelineLayout.ts
|
package/dist/core.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { A as e, C as t, D as n,
|
|
2
|
-
import { A as k, B as A, C as j, D as M, E as N, F as P, G as F, H as I, I as L, L as R, M as z, N as B, O as V, P as H, R as U, S as W, T as G, U as K, V as q, W as J, _ as Y, a as X, b as Z, c as Q, d as $, f as ee, g as te, h as ne, i as re, j as ie, k as ae, l as oe, m as se, n as ce, o as le, p as ue, r as de, s as fe, t as pe, u as me, v as he, w as ge, x as _e, y as ve, z as ye } from "./core-
|
|
3
|
-
export { V as DEFAULT_ALL_DAY_MAX_VISIBLE_LANES, ie as DEFAULT_TIMED_EVENT_DETAIL_MIN_WIDTH, P as DEFAULT_WORK_DAYS, C as DstResolutionError, v as MIN_RESIZE_MINUTES, oe as MONTH_COMPACT_VISIBLE_PILLS, me as MONTH_DEFAULT_MAX_VISIBLE_LANES, $ as MONTH_STACKED_VISIBLE_PILLS, le as MeasurementCache, q as TIME_GRID_PRESETS,
|
|
1
|
+
import { A as e, C as t, D as n, M as r, O as i, S as a, T as o, a as s, b as c, c as l, d as u, f as d, g as f, h as p, i as m, j as h, l as g, m as _, n as v, o as y, p as b, r as x, s as S, t as C, u as w, v as T, w as E, x as D, y as O } from "./move-math-ChynaO4h.js";
|
|
2
|
+
import { A as k, B as A, C as j, D as M, E as N, F as P, G as F, H as I, I as L, L as R, M as z, N as B, O as V, P as H, R as U, S as W, T as G, U as K, V as q, W as J, _ as Y, a as X, b as Z, c as Q, d as $, f as ee, g as te, h as ne, i as re, j as ie, k as ae, l as oe, m as se, n as ce, o as le, p as ue, r as de, s as fe, t as pe, u as me, v as he, w as ge, x as _e, y as ve, z as ye } from "./core-BU4PCeme.js";
|
|
3
|
+
export { V as DEFAULT_ALL_DAY_MAX_VISIBLE_LANES, ie as DEFAULT_TIMED_EVENT_DETAIL_MIN_WIDTH, P as DEFAULT_WORK_DAYS, C as DstResolutionError, v as MIN_RESIZE_MINUTES, oe as MONTH_COMPACT_VISIBLE_PILLS, me as MONTH_DEFAULT_MAX_VISIBLE_LANES, $ as MONTH_STACKED_VISIBLE_PILLS, le as MeasurementCache, q as TIME_GRID_PRESETS, g as Temporal, ae as allDayBandLanes, x as applyMoveToEvent, Q as buildAgendaItems, m as buildDropPayload, w as buildFormatOptions, te as busyMinutesOn, k as capAllDayBand, ee as capMonthCellPills, ue as capMonthRowLanes, de as computeAnchorAdjustment, pe as computeAutoScrollVelocity, L as computeViewWindow, M as contentAwareCascadeFrames, u as dateKey, R as daysInWindow, Y as defaultSelectionPolicy, d as detectBrowserTimezone, s as detectDstSituation, b as detectFirstDayOfWeekFromLocale, _ as detectHour12FromLocale, p as endOfMonth, f as endOfWeek, G as eventInkColor, T as eventStartDateInZone, N as eventTextColor, B as formatRangeLabel, O as formatScheduledTime, he as freeRangeAt, ve as gapOrDurationPolicy, re as getVisibleRange1D, X as getVisibleRange2D, ce as hitTestVerticalSurface, y as isAllDayEvent, S as isTimedEvent, c as isoWeekNumber, W as layoutAllDayBand, j as layoutDayEvents, se as layoutMonthGrid, ge as layoutOverlappingIntervals, fe as layoutTimeline, D as localizedWeekdayNames, Z as minuteOfDayToZoned, ne as monthCellPillLimit, a as monthGridDates, U as navigateCursor, t as nowInZone, E as parsePlainDate, o as parseScheduledTime, I as resolveSpanDays, K as resolveTimeGridRange, z as resolveTimedCardAnatomy, H as responsiveDayColumnCount, _e as snapToSlot, n as startOfMonth, i as startOfWeek, J as timeGridRangeSpecFor, F as timeGridStepDays, e as todayInZone, l as validateCalendarEvent, h as weekDates, ye as windowContainsDate, A as windowDayCount, r as workWeekDates };
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"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"}
|