@cocoar/vue-calendar 3.4.0-beta.38 → 3.4.0-beta.39
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/components/CoarCalendarBoard.vue.d.ts.map +1 -1
- package/dist/components/CoarMiniMonth.vue.d.ts +10 -0
- package/dist/components/CoarMiniMonth.vue.d.ts.map +1 -1
- package/dist/components/CoarMonthView.vue.d.ts.map +1 -1
- package/dist/components/internal/eventActivation.d.ts +11 -0
- package/dist/components/internal/eventActivation.d.ts.map +1 -0
- package/dist/components/internal/time-grid/CoarResourceDayGrid.vue.d.ts.map +1 -1
- package/dist/composables/useMonthGeometry.d.ts +5 -6
- package/dist/composables/useMonthGeometry.d.ts.map +1 -1
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/monthGridLayout.d.ts +11 -3
- package/dist/core/monthGridLayout.d.ts.map +1 -1
- package/dist/{core-B2rsRJDp.js → core-DfQCk0--.js} +112 -92
- package/dist/core.js +2 -2
- package/dist/index.js +1652 -1587
- package/dist/vue-calendar.css +1 -1
- package/package.json +6 -6
|
@@ -108,8 +108,8 @@ function b(e, t) {
|
|
|
108
108
|
hidden: e.length - n
|
|
109
109
|
};
|
|
110
110
|
}
|
|
111
|
-
var
|
|
112
|
-
function
|
|
111
|
+
var x = 2;
|
|
112
|
+
function ee(e, t) {
|
|
113
113
|
let n = e.length ? e[0].laneCount : 0, r = t === null || !Number.isFinite(t) || t < 0 ? n : Math.floor(t);
|
|
114
114
|
if (n <= r) return {
|
|
115
115
|
visible: e,
|
|
@@ -149,11 +149,31 @@ function te(e, t) {
|
|
|
149
149
|
laneCount: r
|
|
150
150
|
};
|
|
151
151
|
}
|
|
152
|
+
function te(e) {
|
|
153
|
+
return e.rowHeight - e.dayNumberHeight - e.pillsPaddingTop - e.pillsPaddingBottom;
|
|
154
|
+
}
|
|
155
|
+
function S(e, t) {
|
|
156
|
+
let n = e.pillHeight + e.pillGap;
|
|
157
|
+
if (n <= 0) return {
|
|
158
|
+
pillLimit: 0,
|
|
159
|
+
pillLimitWithoutMarker: 0
|
|
160
|
+
};
|
|
161
|
+
let r = te(e) - t * (e.barHeight + e.barGap), i = Math.min(Math.max(0, Math.floor((r + e.pillGap) / n)), e.pillLimit);
|
|
162
|
+
if (e.markerHeight <= 0) return {
|
|
163
|
+
pillLimit: i,
|
|
164
|
+
pillLimitWithoutMarker: i
|
|
165
|
+
};
|
|
166
|
+
let a = Math.max(0, Math.floor((r - e.markerHeight) / n));
|
|
167
|
+
return {
|
|
168
|
+
pillLimit: Math.min(a, e.pillLimit),
|
|
169
|
+
pillLimitWithoutMarker: i
|
|
170
|
+
};
|
|
171
|
+
}
|
|
152
172
|
function ne(e) {
|
|
153
|
-
let t =
|
|
173
|
+
let t = e.barHeight + e.barGap, n = Math.max(0, te(e) - e.markerHeight), r = t > 0 ? Math.floor(n / t) : 0, i = e.maxLanes === null || !Number.isFinite(e.maxLanes) || e.maxLanes < 0 ? r : Math.min(r, Math.floor(e.maxLanes));
|
|
154
174
|
return {
|
|
155
175
|
maxLanes: i,
|
|
156
|
-
|
|
176
|
+
...S(e, Math.min(e.laneCount, i))
|
|
157
177
|
};
|
|
158
178
|
}
|
|
159
179
|
function re(e, t) {
|
|
@@ -171,11 +191,11 @@ function re(e, t) {
|
|
|
171
191
|
weekEnd: t[6]
|
|
172
192
|
});
|
|
173
193
|
}
|
|
174
|
-
let s = /* @__PURE__ */ new Set(), c = [], l = /* @__PURE__ */ new Map(), u =
|
|
194
|
+
let s = /* @__PURE__ */ new Set(), c = [], l = /* @__PURE__ */ new Map(), u = C(n[0]), d = C(n[n.length - 1]), f = t.visibleStart ? C(t.visibleStart) : -Infinity, p = t.visibleEnd ? C(t.visibleEnd) : Infinity;
|
|
175
195
|
for (let t of e) {
|
|
176
196
|
if (s.has(t.id)) continue;
|
|
177
197
|
s.add(t.id);
|
|
178
|
-
let e =
|
|
198
|
+
let e = T(t, i);
|
|
179
199
|
if (e.lastOrd < u || e.firstOrd > d) continue;
|
|
180
200
|
let { firstDay: n, lastDayInclusive: r, isMultiDay: a } = e;
|
|
181
201
|
if (a) c.push({
|
|
@@ -247,22 +267,22 @@ function re(e, t) {
|
|
|
247
267
|
};
|
|
248
268
|
}) };
|
|
249
269
|
}
|
|
250
|
-
function
|
|
270
|
+
function C(e) {
|
|
251
271
|
return e.year * 1e4 + e.month * 100 + e.day;
|
|
252
272
|
}
|
|
253
|
-
var
|
|
254
|
-
function
|
|
255
|
-
let n =
|
|
273
|
+
var w = /* @__PURE__ */ new WeakMap();
|
|
274
|
+
function T(e, t) {
|
|
275
|
+
let n = w.get(e);
|
|
256
276
|
if (n && n.start === e.start && n.end === e.end && n.timezone === t) return n.bounds;
|
|
257
277
|
let { firstDay: i, lastDayInclusive: a, isMultiDay: o } = ie(e, t), s = {
|
|
258
278
|
firstDay: i,
|
|
259
279
|
lastDayInclusive: a,
|
|
260
280
|
isMultiDay: o,
|
|
261
|
-
firstOrd:
|
|
262
|
-
lastOrd:
|
|
281
|
+
firstOrd: C(i),
|
|
282
|
+
lastOrd: C(a),
|
|
263
283
|
firstKey: r(i)
|
|
264
284
|
};
|
|
265
|
-
return
|
|
285
|
+
return w.set(e, {
|
|
266
286
|
start: e.start,
|
|
267
287
|
end: e.end,
|
|
268
288
|
timezone: t,
|
|
@@ -291,14 +311,14 @@ function ie(e, t) {
|
|
|
291
311
|
}
|
|
292
312
|
//#endregion
|
|
293
313
|
//#region src/core/timeGridLayout.ts
|
|
294
|
-
function
|
|
314
|
+
function E(e, t) {
|
|
295
315
|
let { day: n, timeRange: r, timezone: i } = t, [a, o] = r, c = a * 60, l = o * 60;
|
|
296
316
|
if (l - c <= 0) return [];
|
|
297
317
|
let u = [], d = /* @__PURE__ */ new Set();
|
|
298
318
|
for (let t of e) {
|
|
299
319
|
if (d.has(t.id) || (d.add(t.id), !s(t))) continue;
|
|
300
|
-
let e =
|
|
301
|
-
if (t.end) r =
|
|
320
|
+
let e = oe(t.start, n, i), r;
|
|
321
|
+
if (t.end) r = oe(t.end, n, i);
|
|
302
322
|
else {
|
|
303
323
|
if (e < 0) continue;
|
|
304
324
|
r = e + 30;
|
|
@@ -396,7 +416,7 @@ function ae(e, t) {
|
|
|
396
416
|
clippedEnd: e.clippedEnd
|
|
397
417
|
}));
|
|
398
418
|
}
|
|
399
|
-
function
|
|
419
|
+
function oe(e, t, n) {
|
|
400
420
|
let r = e.withTimeZone(n), i = a.PlainDateTime.from({
|
|
401
421
|
year: t.year,
|
|
402
422
|
month: t.month,
|
|
@@ -408,7 +428,7 @@ function T(e, t, n) {
|
|
|
408
428
|
}
|
|
409
429
|
//#endregion
|
|
410
430
|
//#region src/core/resourceDayLayout.ts
|
|
411
|
-
var
|
|
431
|
+
var se = "__unassigned";
|
|
412
432
|
function D(e) {
|
|
413
433
|
let t = [];
|
|
414
434
|
for (let n of e) {
|
|
@@ -417,14 +437,14 @@ function D(e) {
|
|
|
417
437
|
}
|
|
418
438
|
return t;
|
|
419
439
|
}
|
|
420
|
-
function
|
|
421
|
-
let { day: n, resources: r, resourcesOf: i, timeRange: a, timezone: s } = t, c =
|
|
422
|
-
let t =
|
|
440
|
+
function ce(e, t) {
|
|
441
|
+
let { day: n, resources: r, resourcesOf: i, timeRange: a, timezone: s } = t, c = C(n), l = e.filter((e) => {
|
|
442
|
+
let t = T(e, s);
|
|
423
443
|
return t.firstOrd <= c && t.lastOrd >= c;
|
|
424
|
-
}), u = new Map(r.map((e, t) => [e, t])), d = (e) => [...new Set(i(e).flatMap((e) => u.get(e) ?? []))].sort((e, t) => e - t), f = l.some((e) => d(e).length === 0) ? [...r,
|
|
444
|
+
}), u = new Map(r.map((e, t) => [e, t])), d = (e) => [...new Set(i(e).flatMap((e) => u.get(e) ?? []))].sort((e, t) => e - t), f = l.some((e) => d(e).length === 0) ? [...r, se] : [...r], p = (e) => {
|
|
425
445
|
let t = d(e);
|
|
426
446
|
return t.length > 0 ? t : [f.length - 1];
|
|
427
|
-
}, m = l.filter((e) => !o(e)), h = f.map((e, t) =>
|
|
447
|
+
}, m = l.filter((e) => !o(e)), h = f.map((e, t) => E(m.filter((e) => p(e).includes(t)), {
|
|
428
448
|
day: n,
|
|
429
449
|
timeRange: a,
|
|
430
450
|
timezone: s
|
|
@@ -463,15 +483,15 @@ function oe(e, t) {
|
|
|
463
483
|
id: e.key,
|
|
464
484
|
start: e.startCol,
|
|
465
485
|
end: e.endCol
|
|
466
|
-
}))),
|
|
486
|
+
}))), x = new Map(b.bars.map((e) => [e.id, e.lane]));
|
|
467
487
|
return {
|
|
468
488
|
columns: f,
|
|
469
489
|
blocks: v,
|
|
470
490
|
allDay: y.map((e) => {
|
|
471
|
-
let t =
|
|
491
|
+
let t = T(e.event, s);
|
|
472
492
|
return {
|
|
473
493
|
...e,
|
|
474
|
-
lane:
|
|
494
|
+
lane: x.get(e.key) ?? 0,
|
|
475
495
|
laneCount: b.laneCount,
|
|
476
496
|
clippedStart: t.firstOrd < c,
|
|
477
497
|
clippedEnd: t.lastOrd > c
|
|
@@ -482,7 +502,7 @@ function oe(e, t) {
|
|
|
482
502
|
}
|
|
483
503
|
//#endregion
|
|
484
504
|
//#region src/core/boardLayout.ts
|
|
485
|
-
function
|
|
505
|
+
function le(e, t, n) {
|
|
486
506
|
let r = [], i = -1;
|
|
487
507
|
for (let a = 0; a <= e.length; a++) {
|
|
488
508
|
let o = e[a], s = o != null && o >= t && o <= n;
|
|
@@ -490,21 +510,21 @@ function se(e, t, n) {
|
|
|
490
510
|
}
|
|
491
511
|
return r;
|
|
492
512
|
}
|
|
493
|
-
function
|
|
513
|
+
function ue(e, t) {
|
|
494
514
|
let { rows: n, timezone: r } = t, i = [];
|
|
495
515
|
for (let t of n) {
|
|
496
516
|
let n = t.dates.map(() => []), a = [];
|
|
497
517
|
if (t.kind !== "custom") {
|
|
498
|
-
let i = t.dates.map((e) => e ?
|
|
518
|
+
let i = t.dates.map((e) => e ? C(e) : null), o = i.filter((e) => e !== null), s = o.length ? Math.min(...o) : Infinity, c = o.length ? Math.max(...o) : -Infinity;
|
|
499
519
|
for (let o of e) {
|
|
500
|
-
let e =
|
|
520
|
+
let e = T(o, r);
|
|
501
521
|
if (!(e.lastOrd < s || e.firstOrd > c) && !(t.match && !t.match(o))) {
|
|
502
522
|
if (t.kind === "cells" && !e.isMultiDay) {
|
|
503
523
|
let t = i.indexOf(e.firstOrd);
|
|
504
524
|
t >= 0 && n[t].push(o);
|
|
505
525
|
continue;
|
|
506
526
|
}
|
|
507
|
-
for (let [t, n] of
|
|
527
|
+
for (let [t, n] of le(i, e.firstOrd, e.lastOrd)) a.push({
|
|
508
528
|
event: o,
|
|
509
529
|
startCol: t,
|
|
510
530
|
endCol: n,
|
|
@@ -535,7 +555,7 @@ function ce(e, t) {
|
|
|
535
555
|
}
|
|
536
556
|
return i;
|
|
537
557
|
}
|
|
538
|
-
function
|
|
558
|
+
function de(e) {
|
|
539
559
|
let { event: t, row: n, date: r, sourceRow: i, grabOffsetDays: a, timezone: o } = e;
|
|
540
560
|
if (n.kind === "custom") return null;
|
|
541
561
|
let c = r.subtract({ days: a }).toString();
|
|
@@ -544,7 +564,7 @@ function le(e) {
|
|
|
544
564
|
minutes: null,
|
|
545
565
|
mode: "allDay"
|
|
546
566
|
};
|
|
547
|
-
let l = !!n.period && !!i.period && n.period.key !== i.period.key, u =
|
|
567
|
+
let l = !!n.period && !!i.period && n.period.key !== i.period.key, u = T(t, o).isMultiDay;
|
|
548
568
|
return {
|
|
549
569
|
date: c,
|
|
550
570
|
minutes: l && !u ? n.period.dropMinutes ?? n.period.startMinutes : A(t, o),
|
|
@@ -556,8 +576,8 @@ function A(e, t) {
|
|
|
556
576
|
let n = e.start.withTimeZone(t);
|
|
557
577
|
return n.hour * 60 + n.minute;
|
|
558
578
|
}
|
|
559
|
-
function
|
|
560
|
-
let { dates: t, periods: n, timezone: r, allDay: i = !0, extraRows: a = [] } = e, o = (e) => !s(e) ||
|
|
579
|
+
function fe(e) {
|
|
580
|
+
let { dates: t, periods: n, timezone: r, allDay: i = !0, extraRows: a = [] } = e, o = (e) => !s(e) || T(e, r).isMultiDay, c = (e) => {
|
|
561
581
|
let t = n.findIndex((t) => e >= t.startMinutes && e < t.endMinutes);
|
|
562
582
|
if (t >= 0) return t;
|
|
563
583
|
let r = n.findIndex((t) => t.startMinutes > e);
|
|
@@ -584,7 +604,7 @@ function ue(e) {
|
|
|
584
604
|
}))
|
|
585
605
|
];
|
|
586
606
|
}
|
|
587
|
-
function
|
|
607
|
+
function pe(e) {
|
|
588
608
|
let { year: t, locale: n, match: r } = e, i = new Intl.DateTimeFormat(n, {
|
|
589
609
|
month: "short",
|
|
590
610
|
timeZone: "UTC"
|
|
@@ -604,13 +624,13 @@ function de(e) {
|
|
|
604
624
|
};
|
|
605
625
|
});
|
|
606
626
|
}
|
|
607
|
-
function
|
|
627
|
+
function me() {
|
|
608
628
|
return Array.from({ length: 31 }, (e, t) => ({
|
|
609
629
|
key: String(t + 1),
|
|
610
630
|
label: String(t + 1)
|
|
611
631
|
}));
|
|
612
632
|
}
|
|
613
|
-
function
|
|
633
|
+
function he(e) {
|
|
614
634
|
let { dates: t, resources: n, resourcesOf: r, extraRows: i = [] } = e;
|
|
615
635
|
return [
|
|
616
636
|
...n.map((e) => ({
|
|
@@ -650,7 +670,7 @@ function M(e) {
|
|
|
650
670
|
end: t.epochMilliseconds
|
|
651
671
|
};
|
|
652
672
|
}
|
|
653
|
-
function
|
|
673
|
+
function ge(e, t) {
|
|
654
674
|
let n = e.start, r = e.end instanceof a.PlainDate ? e.end : n.add({ days: 1 });
|
|
655
675
|
return {
|
|
656
676
|
start: j(n, 0, t),
|
|
@@ -658,7 +678,7 @@ function me(e, t) {
|
|
|
658
678
|
};
|
|
659
679
|
}
|
|
660
680
|
var N = (e, t) => `${e.toString()}|${t}`;
|
|
661
|
-
function
|
|
681
|
+
function _e(e, t) {
|
|
662
682
|
let { dates: n, periods: r, resources: i, timezone: a, resourcesOf: o } = t, c = t.counts ?? s, l = new Set(i), u = n.flatMap((e) => r.map((t) => ({
|
|
663
683
|
key: N(e, t.key),
|
|
664
684
|
start: j(e, t.startMinutes, a),
|
|
@@ -666,7 +686,7 @@ function he(e, t) {
|
|
|
666
686
|
}))), d = /* @__PURE__ */ new Map();
|
|
667
687
|
for (let t of e) {
|
|
668
688
|
if (!c(t)) continue;
|
|
669
|
-
let e = M(t) ??
|
|
689
|
+
let e = M(t) ?? ge(t, a), n = o(t).filter((e) => l.has(e));
|
|
670
690
|
if (n.length !== 0) for (let t of u) {
|
|
671
691
|
if (e.start >= t.end || e.end <= t.start) continue;
|
|
672
692
|
let r = d.get(t.key);
|
|
@@ -685,7 +705,7 @@ function he(e, t) {
|
|
|
685
705
|
}
|
|
686
706
|
};
|
|
687
707
|
}
|
|
688
|
-
function
|
|
708
|
+
function ve(e, t) {
|
|
689
709
|
let { date: n, timezone: r, fromMinutes: i = 0, toMinutes: o = 1440, minMinutes: s = 1 } = t, c = j(n, i, r), l = j(n, o, r), u = e.flatMap((e) => {
|
|
690
710
|
let t = M(e);
|
|
691
711
|
return !t || t.end <= c || t.start >= l ? [] : [{
|
|
@@ -754,14 +774,14 @@ function R(e, t) {
|
|
|
754
774
|
}
|
|
755
775
|
//#endregion
|
|
756
776
|
//#region src/core/viewWindow.ts
|
|
757
|
-
var
|
|
777
|
+
var ye = [
|
|
758
778
|
1,
|
|
759
779
|
2,
|
|
760
780
|
3,
|
|
761
781
|
4,
|
|
762
782
|
5
|
|
763
783
|
];
|
|
764
|
-
function
|
|
784
|
+
function be(n) {
|
|
765
785
|
let { view: r, cursor: i, firstDayOfWeek: a, timezone: o } = n;
|
|
766
786
|
switch (r) {
|
|
767
787
|
case "day":
|
|
@@ -851,19 +871,19 @@ function ve(n) {
|
|
|
851
871
|
default: throw Error(`Unsupported view: ${String(r)}`);
|
|
852
872
|
}
|
|
853
873
|
}
|
|
854
|
-
function*
|
|
874
|
+
function* xe(e) {
|
|
855
875
|
let t = u.PlainDate.from(e.start), n = u.PlainDate.from(e.end);
|
|
856
876
|
for (; u.PlainDate.compare(t, n) < 0;) yield t, t = t.add({ days: 1 });
|
|
857
877
|
}
|
|
858
|
-
function
|
|
878
|
+
function Se(e) {
|
|
859
879
|
let t = u.PlainDate.from(e.start);
|
|
860
880
|
return u.PlainDate.from(e.end).since(t, { largestUnit: "days" }).days;
|
|
861
881
|
}
|
|
862
|
-
function
|
|
882
|
+
function Ce(e, t) {
|
|
863
883
|
let n = u.PlainDate.from(e.start), r = u.PlainDate.from(e.end);
|
|
864
884
|
return u.PlainDate.compare(t, n) >= 0 && u.PlainDate.compare(t, r) < 0;
|
|
865
885
|
}
|
|
866
|
-
function
|
|
886
|
+
function we(e, t, n, r = 30, i = 60, a = 1) {
|
|
867
887
|
let o = n === "next" ? 1 : -1;
|
|
868
888
|
switch (e) {
|
|
869
889
|
case "day": return t.add({ days: Math.max(1, a) * o });
|
|
@@ -880,7 +900,7 @@ function Se(e, t, n, r = 30, i = 60, a = 1) {
|
|
|
880
900
|
}
|
|
881
901
|
//#endregion
|
|
882
902
|
//#region src/core/dayColumns.ts
|
|
883
|
-
function
|
|
903
|
+
function Te(e, t = 1, n = 220, r = 64, i = 7) {
|
|
884
904
|
let a = Math.max(1, Math.round(t));
|
|
885
905
|
if (!Number.isFinite(e) || e <= 0) return a;
|
|
886
906
|
let o = Math.max(120, Number.isFinite(n) ? n : 220), s = Math.floor(Math.max(0, e - Math.max(0, r)) / o);
|
|
@@ -888,7 +908,7 @@ function Ce(e, t = 1, n = 220, r = 64, i = 7) {
|
|
|
888
908
|
}
|
|
889
909
|
//#endregion
|
|
890
910
|
//#region src/core/rangeLabel.ts
|
|
891
|
-
var
|
|
911
|
+
var Ee = {
|
|
892
912
|
month: "short",
|
|
893
913
|
day: "numeric",
|
|
894
914
|
year: "numeric",
|
|
@@ -899,7 +919,7 @@ var we = {
|
|
|
899
919
|
month: "long",
|
|
900
920
|
year: "numeric",
|
|
901
921
|
timeZone: "UTC"
|
|
902
|
-
},
|
|
922
|
+
}, De = {
|
|
903
923
|
year: "numeric",
|
|
904
924
|
month: "long",
|
|
905
925
|
timeZone: "UTC"
|
|
@@ -907,19 +927,19 @@ var we = {
|
|
|
907
927
|
function B(e) {
|
|
908
928
|
return new Date(Date.UTC(e.year, e.month - 1, e.day));
|
|
909
929
|
}
|
|
910
|
-
function
|
|
930
|
+
function Oe(e) {
|
|
911
931
|
let { view: t, window: n, cursor: r, locale: i } = e, a = {
|
|
912
932
|
dateStyle: e.dateStyle,
|
|
913
933
|
timeStyle: e.timeStyle,
|
|
914
934
|
hour12: e.hour12
|
|
915
|
-
}, o = u.PlainDate.from(n.start), s = u.PlainDate.from(n.end).subtract({ days: 1 }), l = () => new Intl.DateTimeFormat(i, c(
|
|
935
|
+
}, o = u.PlainDate.from(n.start), s = u.PlainDate.from(n.end).subtract({ days: 1 }), l = () => new Intl.DateTimeFormat(i, c(Ee, a)).formatRange(B(o), B(s)), d = (e) => new Intl.DateTimeFormat(i, c(e, a)).format(B(r));
|
|
916
936
|
switch (t) {
|
|
917
937
|
case "day": return o.until(s, { largestUnit: "day" }).days > 0 ? l() : d(z);
|
|
918
938
|
case "dayAgenda": return d(z);
|
|
919
939
|
case "week":
|
|
920
940
|
case "workWeek": return l();
|
|
921
941
|
case "month":
|
|
922
|
-
case "monthList": return d(
|
|
942
|
+
case "monthList": return d(De);
|
|
923
943
|
case "agenda":
|
|
924
944
|
case "timeline": return l();
|
|
925
945
|
case "year": return String(r.year);
|
|
@@ -928,15 +948,15 @@ function Ee(e) {
|
|
|
928
948
|
}
|
|
929
949
|
//#endregion
|
|
930
950
|
//#region src/core/timedCardAnatomy.ts
|
|
931
|
-
var
|
|
951
|
+
var ke = 112, Ae = Object.freeze({
|
|
932
952
|
compact: !0,
|
|
933
953
|
titleLines: 1,
|
|
934
954
|
showLocation: !1,
|
|
935
955
|
showTime: !1
|
|
936
956
|
});
|
|
937
|
-
function
|
|
957
|
+
function je(e) {
|
|
938
958
|
let { durationMinutes: t, visibleWidthPx: n, detailMinWidth: r, overlapped: i, hasLocation: a } = e;
|
|
939
|
-
return i && r > 0 && n !== null && n < r ?
|
|
959
|
+
return i && r > 0 && n !== null && n < r ? Ae : {
|
|
940
960
|
compact: !1,
|
|
941
961
|
titleLines: t >= 70 ? 2 : 1,
|
|
942
962
|
showLocation: a && t >= 34,
|
|
@@ -945,8 +965,8 @@ function ke(e) {
|
|
|
945
965
|
}
|
|
946
966
|
//#endregion
|
|
947
967
|
//#region src/core/allDayBandCap.ts
|
|
948
|
-
var
|
|
949
|
-
function
|
|
968
|
+
var Me = 3;
|
|
969
|
+
function Ne(e, { maxVisibleLanes: t, expanded: n, columnCount: r }) {
|
|
950
970
|
let i = e.length === 0 ? 0 : e[0].laneCount, a = t === null ? null : Math.max(1, Math.floor(t)), o = a !== null && i > a;
|
|
951
971
|
if (!o || n) return {
|
|
952
972
|
bars: [...e],
|
|
@@ -975,7 +995,7 @@ function je(e, { maxVisibleLanes: t, expanded: n, columnCount: r }) {
|
|
|
975
995
|
exceedsCap: o
|
|
976
996
|
};
|
|
977
997
|
}
|
|
978
|
-
function
|
|
998
|
+
function Pe(e, t, n) {
|
|
979
999
|
switch (t) {
|
|
980
1000
|
case "alwaysOneLane": return Math.max(1, e);
|
|
981
1001
|
case "reservesCap": return Math.max(n ?? 0, e);
|
|
@@ -984,7 +1004,7 @@ function Me(e, t, n) {
|
|
|
984
1004
|
}
|
|
985
1005
|
//#endregion
|
|
986
1006
|
//#region src/core/cascadeLayout.ts
|
|
987
|
-
function
|
|
1007
|
+
function Fe(e, t = 100, n = 1.5, r = 18) {
|
|
988
1008
|
let i = /* @__PURE__ */ new Map();
|
|
989
1009
|
if (!Number.isFinite(t) || t <= 0 || e.length === 0) return i;
|
|
990
1010
|
let a = Number.isFinite(n) ? Math.min(t / 2, Math.max(0, n)) : 0, o = Math.max(0, t - 2 * a), s = Number.isFinite(r) ? Math.max(0, r) : 0, c = e.map((e, t) => ({
|
|
@@ -1023,18 +1043,18 @@ function Ne(e, t = 100, n = 1.5, r = 18) {
|
|
|
1023
1043
|
}
|
|
1024
1044
|
return i;
|
|
1025
1045
|
}
|
|
1026
|
-
var V = "#ffffff", H = "#000000",
|
|
1046
|
+
var V = "#ffffff", H = "#000000", Ie = "var(--coar-text-base, #1a1c1f)";
|
|
1027
1047
|
function U(e, t = {}) {
|
|
1028
|
-
let n = typeof t == "string" ? { fallback: t } : t, r =
|
|
1029
|
-
return r ? (n.policy ?? "wcag") === "apca" ?
|
|
1048
|
+
let n = typeof t == "string" ? { fallback: t } : t, r = Be(e);
|
|
1049
|
+
return r ? (n.policy ?? "wcag") === "apca" ? ze(r) : Re(r) : n.fallback ?? Ie;
|
|
1030
1050
|
}
|
|
1031
|
-
function
|
|
1051
|
+
function Le({ background: e, textColor: t, policy: n, fallback: r }) {
|
|
1032
1052
|
return typeof t == "string" && t.trim() !== "" ? t : U(e, {
|
|
1033
1053
|
policy: n,
|
|
1034
1054
|
fallback: r
|
|
1035
1055
|
});
|
|
1036
1056
|
}
|
|
1037
|
-
function
|
|
1057
|
+
function Re(e) {
|
|
1038
1058
|
let t = .2126 * W(e[0]) + .7152 * W(e[1]) + .0722 * W(e[2]);
|
|
1039
1059
|
return 1.05 / (t + .05) >= (t + .05) / .05 ? V : H;
|
|
1040
1060
|
}
|
|
@@ -1067,7 +1087,7 @@ function q(e, t) {
|
|
|
1067
1087
|
let i = (r ** G.revBg - n ** G.revText) * G.scale;
|
|
1068
1088
|
return i > -G.loClip ? 0 : (i + G.loOffset) * 100;
|
|
1069
1089
|
}
|
|
1070
|
-
function
|
|
1090
|
+
function ze(e) {
|
|
1071
1091
|
return Math.abs(q([
|
|
1072
1092
|
255,
|
|
1073
1093
|
255,
|
|
@@ -1078,7 +1098,7 @@ function Le(e) {
|
|
|
1078
1098
|
0
|
|
1079
1099
|
], e)) ? V : H;
|
|
1080
1100
|
}
|
|
1081
|
-
function
|
|
1101
|
+
function Be(e) {
|
|
1082
1102
|
let t = e.trim().match(/^#([\da-f]{3}|[\da-f]{6})$/i);
|
|
1083
1103
|
if (!t) return null;
|
|
1084
1104
|
let n = t[1].length === 3 ? [...t[1]].map((e) => e + e).join("") : t[1];
|
|
@@ -1090,7 +1110,7 @@ function Re(e) {
|
|
|
1090
1110
|
}
|
|
1091
1111
|
//#endregion
|
|
1092
1112
|
//#region src/core/timeSelection.ts
|
|
1093
|
-
var J = 1440,
|
|
1113
|
+
var J = 1440, Ve = {
|
|
1094
1114
|
start: 0,
|
|
1095
1115
|
end: J
|
|
1096
1116
|
};
|
|
@@ -1100,8 +1120,8 @@ function Y(e, t) {
|
|
|
1100
1120
|
function X(e, t) {
|
|
1101
1121
|
return Math.min(t.end, Math.max(t.start, e));
|
|
1102
1122
|
}
|
|
1103
|
-
function
|
|
1104
|
-
return
|
|
1123
|
+
function He(e, t, n) {
|
|
1124
|
+
return E(e, {
|
|
1105
1125
|
day: t,
|
|
1106
1126
|
timeRange: [0, 24],
|
|
1107
1127
|
timezone: n
|
|
@@ -1111,7 +1131,7 @@ function Be(e, t, n) {
|
|
|
1111
1131
|
event: e.event
|
|
1112
1132
|
})).sort((e, t) => e.start - t.start || e.end - t.end);
|
|
1113
1133
|
}
|
|
1114
|
-
function Z(e, t, n =
|
|
1134
|
+
function Z(e, t, n = Ve) {
|
|
1115
1135
|
let r = X(t, n), i = n.start, a = n.end;
|
|
1116
1136
|
for (let t of e) if (!(t.end <= t.start)) {
|
|
1117
1137
|
if (r >= t.start && r < t.end) return null;
|
|
@@ -1139,7 +1159,7 @@ function Q() {
|
|
|
1139
1159
|
} : null;
|
|
1140
1160
|
};
|
|
1141
1161
|
}
|
|
1142
|
-
function
|
|
1162
|
+
function Ue(e) {
|
|
1143
1163
|
let t = Math.max(1, e.minutes), n = Q();
|
|
1144
1164
|
return (r) => {
|
|
1145
1165
|
let i = r.slotDuration, a = r.bounds;
|
|
@@ -1175,7 +1195,7 @@ function Ve(e) {
|
|
|
1175
1195
|
} : null;
|
|
1176
1196
|
};
|
|
1177
1197
|
}
|
|
1178
|
-
function
|
|
1198
|
+
function We(e, t, n, r = "compatible") {
|
|
1179
1199
|
let i = Math.round(t), o = i >= J ? e.add({ days: Math.floor(i / J) }) : e, s = i >= J ? i % J : Math.max(0, i), c = o.toPlainDateTime(a.PlainTime.from({
|
|
1180
1200
|
hour: Math.floor(s / 60),
|
|
1181
1201
|
minute: s % 60
|
|
@@ -1188,7 +1208,7 @@ function He(e, t, n, r = "compatible") {
|
|
|
1188
1208
|
}
|
|
1189
1209
|
//#endregion
|
|
1190
1210
|
//#region src/core/agendaLayout.ts
|
|
1191
|
-
function
|
|
1211
|
+
function Ge(e, t) {
|
|
1192
1212
|
let { rangeStart: n, rangeEnd: i, timezone: s, showEmptyDays: c = !1 } = t, l = a.PlainDate.from(n), u = a.PlainDate.from(i);
|
|
1193
1213
|
if (a.PlainDate.compare(u, l) <= 0) return [];
|
|
1194
1214
|
let d = /* @__PURE__ */ new Map(), f = /* @__PURE__ */ new Set();
|
|
@@ -1202,7 +1222,7 @@ function Ue(e, t) {
|
|
|
1202
1222
|
for (let t of e) {
|
|
1203
1223
|
if (f.has(t.id)) continue;
|
|
1204
1224
|
f.add(t.id);
|
|
1205
|
-
let e = o(t), { firstDay: n, lastDayInclusive: i } =
|
|
1225
|
+
let e = o(t), { firstDay: n, lastDayInclusive: i } = Ke(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;
|
|
1206
1226
|
if (a.PlainDate.compare(m, c) < 0) continue;
|
|
1207
1227
|
let h = c, g = !0;
|
|
1208
1228
|
for (; a.PlainDate.compare(h, m) <= 0;) {
|
|
@@ -1212,7 +1232,7 @@ function Ue(e, t) {
|
|
|
1212
1232
|
isContinuation: o
|
|
1213
1233
|
});
|
|
1214
1234
|
else {
|
|
1215
|
-
let e = o ? -Infinity :
|
|
1235
|
+
let e = o ? -Infinity : qe(t, s);
|
|
1216
1236
|
i.timed.push({
|
|
1217
1237
|
event: t,
|
|
1218
1238
|
startMs: e,
|
|
@@ -1252,7 +1272,7 @@ function Ue(e, t) {
|
|
|
1252
1272
|
}
|
|
1253
1273
|
return m;
|
|
1254
1274
|
}
|
|
1255
|
-
function
|
|
1275
|
+
function Ke(e, t) {
|
|
1256
1276
|
if (o(e)) {
|
|
1257
1277
|
let t = e.start, n;
|
|
1258
1278
|
return e.end ? (n = e.end.subtract({ days: 1 }), a.PlainDate.compare(n, t) < 0 && (n = t)) : n = t, {
|
|
@@ -1270,15 +1290,15 @@ function We(e, t) {
|
|
|
1270
1290
|
lastDayInclusive: r
|
|
1271
1291
|
};
|
|
1272
1292
|
}
|
|
1273
|
-
function
|
|
1293
|
+
function qe(e, t) {
|
|
1274
1294
|
return o(e) ? e.start.toZonedDateTime({ timeZone: t }).epochMilliseconds : e.start.epochMilliseconds;
|
|
1275
1295
|
}
|
|
1276
1296
|
//#endregion
|
|
1277
1297
|
//#region src/core/timelineLayout.ts
|
|
1278
|
-
function
|
|
1298
|
+
function Je(e, t) {
|
|
1279
1299
|
let { windowStart: n, windowEnd: r, pixelsPerDay: i, rowHeight: a, displayZone: o } = t, s = n.until(r, { largestUnit: "days" }).days * i, c = /* @__PURE__ */ new Map();
|
|
1280
1300
|
for (let t of e) {
|
|
1281
|
-
let e =
|
|
1301
|
+
let e = Xe(t), n = Ye(t) !== null, r = c.get(e);
|
|
1282
1302
|
r || (r = {
|
|
1283
1303
|
events: [],
|
|
1284
1304
|
isRecurring: n
|
|
@@ -1288,7 +1308,7 @@ function Ke(e, t) {
|
|
|
1288
1308
|
for (let [e, t] of c) {
|
|
1289
1309
|
let a = [];
|
|
1290
1310
|
for (let e of t.events) {
|
|
1291
|
-
let { startDate: t, endDate: s } =
|
|
1311
|
+
let { startDate: t, endDate: s } = Ze(e, o);
|
|
1292
1312
|
if (u.PlainDate.compare(s, n) <= 0 || u.PlainDate.compare(t, r) >= 0) continue;
|
|
1293
1313
|
let c = u.PlainDate.compare(t, n) < 0, l = u.PlainDate.compare(s, r) > 0, d = c ? n : t, f = l ? r : s, p = n.until(d, { largestUnit: "days" }).days, m = d.until(f, { largestUnit: "days" }).days;
|
|
1294
1314
|
a.push({
|
|
@@ -1320,14 +1340,14 @@ function Ke(e, t) {
|
|
|
1320
1340
|
totalHeight: d.length * a
|
|
1321
1341
|
};
|
|
1322
1342
|
}
|
|
1323
|
-
function
|
|
1343
|
+
function Ye(e) {
|
|
1324
1344
|
let t = e.meta?.__recurrence?.seriesId;
|
|
1325
1345
|
return typeof t == "string" ? t : null;
|
|
1326
1346
|
}
|
|
1327
|
-
function
|
|
1328
|
-
return
|
|
1347
|
+
function Xe(e) {
|
|
1348
|
+
return Ye(e) ?? e.id;
|
|
1329
1349
|
}
|
|
1330
|
-
function
|
|
1350
|
+
function Ze(e, t) {
|
|
1331
1351
|
if (e.start instanceof u.PlainDate) {
|
|
1332
1352
|
let t = e.start;
|
|
1333
1353
|
return {
|
|
@@ -1343,7 +1363,7 @@ function Ye(e, t) {
|
|
|
1343
1363
|
}
|
|
1344
1364
|
//#endregion
|
|
1345
1365
|
//#region src/core/measurementCache.ts
|
|
1346
|
-
var
|
|
1366
|
+
var Qe = class {
|
|
1347
1367
|
_itemCount;
|
|
1348
1368
|
_estimatedSize;
|
|
1349
1369
|
_measured;
|
|
@@ -1442,20 +1462,20 @@ function $(e, t, n, r = 3) {
|
|
|
1442
1462
|
totalSize: i
|
|
1443
1463
|
};
|
|
1444
1464
|
}
|
|
1445
|
-
function
|
|
1465
|
+
function $e(e, t, n, r, i, a, o = 3, s = 3) {
|
|
1446
1466
|
return {
|
|
1447
1467
|
x: $(e, n, i, o),
|
|
1448
1468
|
y: $(t, r, a, s)
|
|
1449
1469
|
};
|
|
1450
1470
|
}
|
|
1451
|
-
function
|
|
1471
|
+
function et(e, t, n) {
|
|
1452
1472
|
if (n < 0) throw RangeError(`anchorIndex must be non-negative, got ${n}`);
|
|
1453
1473
|
let r = e.prefixSum(n);
|
|
1454
1474
|
return t.prefixSum(n) - r;
|
|
1455
1475
|
}
|
|
1456
1476
|
//#endregion
|
|
1457
1477
|
//#region src/core/dragHitTest.ts
|
|
1458
|
-
function
|
|
1478
|
+
function tt(e, t, n, r, i) {
|
|
1459
1479
|
if (r.itemCount === 0) return {
|
|
1460
1480
|
itemIndex: -1,
|
|
1461
1481
|
ratio: NaN,
|
|
@@ -1486,7 +1506,7 @@ function $e(e, t, n, r, i) {
|
|
|
1486
1506
|
pixelInItem: u
|
|
1487
1507
|
};
|
|
1488
1508
|
}
|
|
1489
|
-
function
|
|
1509
|
+
function nt(e, t, n, r = {}) {
|
|
1490
1510
|
let i = r.hotZone ?? 30, a = r.maxVelocity ?? 24, o = r.curve ?? "linear";
|
|
1491
1511
|
if (i <= 0 || a <= 0) return {
|
|
1492
1512
|
velocityX: 0,
|
|
@@ -1510,4 +1530,4 @@ function et(e, t, n, r = {}) {
|
|
|
1510
1530
|
};
|
|
1511
1531
|
}
|
|
1512
1532
|
//#endregion
|
|
1513
|
-
export { b as $,
|
|
1533
|
+
export { b as $, Se as A, de as B, Oe as C, xe as D, be as E, R as F, pe as G, he as H, _e as I, ae as J, se as K, ve as L, L as M, I as N, we as O, F as P, _ as Q, O as R, je as S, ye as T, fe as U, ue as V, me as W, v as X, E as Y, x as Z, Fe as _, $e as a, g as at, Ne as b, Ge as c, Z as d, ee as et, Ue as f, U as g, Le as h, $ as i, y as it, P as j, Ce as k, He as l, Y as m, tt as n, ne as nt, Qe as o, We as p, ce as q, et as r, re as rt, Je as s, nt as t, S as tt, Q as u, Me as v, Te as w, ke as x, Pe as y, k as z };
|
package/dist/core.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
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 { $ as k, A, B as j, C as M, D as N, E as P, F, G as I, H as L, I as R, J as z, K as B, L as V, M as H, N as U, O as W, P as G, Q as K, R as q, S as J, T as Y, U as X, V as Z, W as Q, X as $, Y as ee, Z as te, _ as ne, a as re,
|
|
3
|
-
export { q as BOARD_ALL_DAY_ROW,
|
|
2
|
+
import { $ as k, A, B as j, C as M, D as N, E as P, F, G as I, H as L, I as R, J as z, K as B, L as V, M as H, N as U, O as W, P as G, Q as K, R as q, S as J, T as Y, U as X, V as Z, W as Q, X as $, Y as ee, Z as te, _ as ne, a as re, at as ie, b as ae, c as oe, d as se, et as ce, f as le, g as ue, h as de, i as fe, it as pe, j as me, k as he, l as ge, m as _e, n as ve, nt as ye, o as be, p as xe, q as Se, r as Ce, rt as we, s as Te, t as Ee, tt as De, u as Oe, v as ke, w as Ae, x as je, y as Me, z as Ne } from "./core-DfQCk0--.js";
|
|
3
|
+
export { q as BOARD_ALL_DAY_ROW, Ne as BOARD_UNASSIGNED_ROW, ke as DEFAULT_ALL_DAY_MAX_VISIBLE_LANES, je as DEFAULT_TIMED_EVENT_DETAIL_MIN_WIDTH, Y as DEFAULT_WORK_DAYS, C as DstResolutionError, v as MIN_RESIZE_MINUTES, $ as MONTH_COMPACT_VISIBLE_PILLS, te as MONTH_DEFAULT_MAX_VISIBLE_LANES, K as MONTH_STACKED_VISIBLE_PILLS, be as MeasurementCache, me as TIME_GRID_PRESETS, g as Temporal, B as UNASSIGNED_RESOURCE, Me as allDayBandLanes, x as applyMoveToEvent, j as boardDropTarget, oe as buildAgendaItems, m as buildDropPayload, w as buildFormatOptions, ge as busyMinutesOn, ae as capAllDayBand, k as capMonthCellPills, ce as capMonthRowLanes, Ce as computeAnchorAdjustment, Ee as computeAutoScrollVelocity, R as computeOccupancy, P as computeViewWindow, ne as contentAwareCascadeFrames, u as dateKey, N as daysInWindow, Oe as defaultSelectionPolicy, d as detectBrowserTimezone, s as detectDstSituation, b as detectFirstDayOfWeekFromLocale, _ as detectHour12FromLocale, p as endOfMonth, f as endOfWeek, de as eventInkColor, T as eventStartDateInZone, ue as eventTextColor, V as findDayGaps, De as fitMonthCell, ye as fitMonthRow, M as formatRangeLabel, O as formatScheduledTime, se as freeRangeAt, le as gapOrDurationPolicy, fe as getVisibleRange1D, re as getVisibleRange2D, ve as hitTestVerticalSurface, y as isAllDayEvent, S as isTimedEvent, c as isoWeekNumber, z as layoutAllDayBand, Z as layoutBoard, ee as layoutDayEvents, we as layoutMonthGrid, ie as layoutOverlappingIntervals, Se as layoutResourceDay, Te as layoutTimeline, D as localizedWeekdayNames, xe as minuteOfDayToZoned, pe as monthCellPillLimit, a as monthGridDates, W as navigateCursor, t as nowInZone, E as parsePlainDate, o as parseScheduledTime, H as resolveSpanDays, U as resolveTimeGridRange, J as resolveTimedCardAnatomy, L as resourceWeekRows, Ae as responsiveDayColumnCount, _e as snapToSlot, n as startOfMonth, i as startOfWeek, G as timeGridRangeSpecFor, F as timeGridStepDays, e as todayInZone, l as validateCalendarEvent, X as weekBoardRows, h as weekDates, he as windowContainsDate, A as windowDayCount, r as workWeekDates, Q as yearWallColumns, I as yearWallRows };
|