@weekwise/react 0.1.2 → 0.2.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/README.md +9 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/useDocumentCursor.d.ts +7 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +345 -333
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -115,20 +115,28 @@ function $e(e) {
|
|
|
115
115
|
s
|
|
116
116
|
];
|
|
117
117
|
}
|
|
118
|
+
// src/hooks/useDocumentCursor.ts
|
|
119
|
+
function et(e) {
|
|
120
|
+
i(() => {
|
|
121
|
+
if (!e) return;
|
|
122
|
+
let t = `ww-cursor-${e}`, n = document.documentElement;
|
|
123
|
+
return n.classList.add(t), () => n.classList.remove(t);
|
|
124
|
+
}, [e]);
|
|
125
|
+
}
|
|
118
126
|
// src/hooks/useRefWithInit.ts
|
|
119
|
-
var
|
|
120
|
-
function
|
|
121
|
-
let n = u(
|
|
122
|
-
return n.current ===
|
|
127
|
+
var tt = {};
|
|
128
|
+
function nt(e, t) {
|
|
129
|
+
let n = u(tt);
|
|
130
|
+
return n.current === tt && (n.current = e(t)), n;
|
|
123
131
|
}
|
|
124
132
|
// src/hooks/useEventCallback.utils.ts
|
|
125
|
-
function
|
|
133
|
+
function rt() {
|
|
126
134
|
if (U) throw Error("useEventCallback: Cannot call an event handler while rendering.");
|
|
127
135
|
}
|
|
128
|
-
function
|
|
136
|
+
function it() {
|
|
129
137
|
let e = {
|
|
130
138
|
next: void 0,
|
|
131
|
-
callback:
|
|
139
|
+
callback: rt,
|
|
132
140
|
trampoline: (...t) => e.callback?.(...t),
|
|
133
141
|
effect: () => {
|
|
134
142
|
e.callback = e.next;
|
|
@@ -138,11 +146,11 @@ function rt() {
|
|
|
138
146
|
}
|
|
139
147
|
// src/hooks/useEventCallback.ts
|
|
140
148
|
function q(e) {
|
|
141
|
-
let t =
|
|
149
|
+
let t = nt(it).current;
|
|
142
150
|
return t.next = e, o(t.effect), t.trampoline;
|
|
143
151
|
}
|
|
144
152
|
// src/hooks/useGlobalListeners.ts
|
|
145
|
-
function
|
|
153
|
+
function at() {
|
|
146
154
|
let [e] = d(() => ({ current: /* @__PURE__ */ new Map() })), { addGlobalListener: t, removeGlobalListener: n, removeAllGlobalListeners: r } = c(() => {
|
|
147
155
|
function t(t, n, r, i) {
|
|
148
156
|
let a = typeof i != "boolean" && i?.once ? (n) => {
|
|
@@ -177,22 +185,22 @@ function it() {
|
|
|
177
185
|
};
|
|
178
186
|
}
|
|
179
187
|
// src/utils/mergeRefs.ts
|
|
180
|
-
var
|
|
188
|
+
var ot = (e) => !e || typeof e == "function" ? e : (t) => {
|
|
181
189
|
e.current = t;
|
|
182
190
|
};
|
|
183
|
-
function
|
|
191
|
+
function st(...e) {
|
|
184
192
|
return (t) => {
|
|
185
193
|
e.forEach((e) => {
|
|
186
|
-
|
|
194
|
+
ot(e)?.(t);
|
|
187
195
|
});
|
|
188
196
|
};
|
|
189
197
|
}
|
|
190
198
|
// src/hooks/useMergedRefs.ts
|
|
191
|
-
function
|
|
192
|
-
return c(() =>
|
|
199
|
+
function ct(...e) {
|
|
200
|
+
return c(() => st(...e), e);
|
|
193
201
|
}
|
|
194
202
|
// src/hooks/useMove.ts
|
|
195
|
-
function
|
|
203
|
+
function lt(e) {
|
|
196
204
|
let [{ state: t }] = d(() => ({ state: {
|
|
197
205
|
activePointId: null,
|
|
198
206
|
clientX: 0,
|
|
@@ -202,7 +210,7 @@ function ct(e) {
|
|
|
202
210
|
isDistanceReached: !1
|
|
203
211
|
} })), n = u(e);
|
|
204
212
|
n.current = e;
|
|
205
|
-
let { addGlobalListener: r, removeGlobalListener: i } =
|
|
213
|
+
let { addGlobalListener: r, removeGlobalListener: i } = at();
|
|
206
214
|
return { listeners: c(() => {
|
|
207
215
|
let e = {}, a = (e) => {
|
|
208
216
|
"stopPropagation" in e && "preventDefault" in e && (e.stopPropagation(), e.preventDefault());
|
|
@@ -324,14 +332,14 @@ function ct(e) {
|
|
|
324
332
|
]) };
|
|
325
333
|
}
|
|
326
334
|
// src/hooks/usePrevious.ts
|
|
327
|
-
function
|
|
335
|
+
function ut(e) {
|
|
328
336
|
let t = u(void 0);
|
|
329
337
|
return i(() => {
|
|
330
338
|
t.current = e;
|
|
331
339
|
}, [e]), t.current;
|
|
332
340
|
}
|
|
333
341
|
// src/hooks/useScrollBarSize.ts
|
|
334
|
-
function
|
|
342
|
+
function dt() {
|
|
335
343
|
let e = null, n = 0, r = (t) => (n += 1, e === null && (e = document.createElement("div"), e.style.width = "99px", e.style.height = "99px", e.style.overflow = "scroll", e.style.position = "absolute", e.style.top = "-9999px", e.setAttribute("aria-hidden", "true"), e.setAttribute("role", "presentation"), document.body.appendChild(e), window.addEventListener("resize", t)), {
|
|
336
344
|
element: e,
|
|
337
345
|
cleanup: () => {
|
|
@@ -360,9 +368,9 @@ function ut() {
|
|
|
360
368
|
}, []), e;
|
|
361
369
|
};
|
|
362
370
|
}
|
|
363
|
-
var
|
|
371
|
+
var ft = dt();
|
|
364
372
|
// src/hooks/useStateRef.ts
|
|
365
|
-
function
|
|
373
|
+
function pt(e) {
|
|
366
374
|
let [t, r] = d(e), i = u(e);
|
|
367
375
|
return [
|
|
368
376
|
t,
|
|
@@ -373,7 +381,7 @@ function ft(e) {
|
|
|
373
381
|
];
|
|
374
382
|
}
|
|
375
383
|
// src/hooks/useTimeInterval.ts
|
|
376
|
-
function
|
|
384
|
+
function mt(e, t, n = !0) {
|
|
377
385
|
let r = u(null), a = Ye(e);
|
|
378
386
|
i(() => {
|
|
379
387
|
if (n) {
|
|
@@ -392,38 +400,38 @@ function pt(e, t, n = !0) {
|
|
|
392
400
|
]);
|
|
393
401
|
}
|
|
394
402
|
// src/hooks/useToday.ts
|
|
395
|
-
var
|
|
396
|
-
function
|
|
403
|
+
var ht = (e) => e.toMillis(e.getToday());
|
|
404
|
+
function gt() {
|
|
397
405
|
let e = K(), [t, n] = d(() => ({
|
|
398
406
|
dateUtils: e,
|
|
399
|
-
today:
|
|
407
|
+
today: ht(e)
|
|
400
408
|
})), r = t;
|
|
401
409
|
t.dateUtils !== e && (r = {
|
|
402
410
|
dateUtils: e,
|
|
403
|
-
today:
|
|
411
|
+
today: ht(e)
|
|
404
412
|
}, n(r));
|
|
405
413
|
let { today: a } = r;
|
|
406
414
|
return i(() => {
|
|
407
415
|
let t = e.toMillis(e.addDays(e.fromMillis(a), 1)), r = Math.max(t - Date.now(), 0) + 1e3, i = setTimeout(() => n({
|
|
408
416
|
dateUtils: e,
|
|
409
|
-
today:
|
|
417
|
+
today: ht(e)
|
|
410
418
|
}), r);
|
|
411
419
|
return () => clearTimeout(i);
|
|
412
420
|
}, [e, a]), a;
|
|
413
421
|
}
|
|
414
422
|
// src/contexts/CalendarContext.ts
|
|
415
|
-
var
|
|
416
|
-
U && (
|
|
423
|
+
var _t = e(void 0);
|
|
424
|
+
U && (_t.displayName = "CalendarContext");
|
|
417
425
|
function J() {
|
|
418
|
-
let e = r(
|
|
426
|
+
let e = r(_t);
|
|
419
427
|
if (!e) throw Error("CalendarContext is required");
|
|
420
428
|
return e;
|
|
421
429
|
}
|
|
422
430
|
// src/contexts/ThemeSourceContext.ts
|
|
423
|
-
var
|
|
424
|
-
U && (
|
|
431
|
+
var vt = e(null);
|
|
432
|
+
U && (vt.displayName = "ThemeSourceContext");
|
|
425
433
|
// src/hooks/useCalendarValue.ts
|
|
426
|
-
function
|
|
434
|
+
function yt(e) {
|
|
427
435
|
let { view: t, defaultView: r, startWeek: a, viewValue: o, defaultViewValue: s, dateUtils: c, onChangeView: l, onChangeViewValue: d } = e, [f, p] = $e({
|
|
428
436
|
controlled: t,
|
|
429
437
|
default: r,
|
|
@@ -457,7 +465,7 @@ function vt(e) {
|
|
|
457
465
|
};
|
|
458
466
|
}
|
|
459
467
|
// src/hooks/useNavigation.ts
|
|
460
|
-
function
|
|
468
|
+
function bt(e) {
|
|
461
469
|
let { dateUtils: t, view: n, viewValue: r, changeViewValue: i, startWeek: a } = e, o = (e, r) => () => i(z(t, n, e, r, a), n);
|
|
462
470
|
return {
|
|
463
471
|
goForward: q(o(r, 1)),
|
|
@@ -466,7 +474,7 @@ function yt(e) {
|
|
|
466
474
|
};
|
|
467
475
|
}
|
|
468
476
|
// src/icons/chevron.tsx
|
|
469
|
-
function
|
|
477
|
+
function xt(e) {
|
|
470
478
|
return /* @__PURE__ */ W("svg", {
|
|
471
479
|
xmlns: "http://www.w3.org/2000/svg",
|
|
472
480
|
fill: "none",
|
|
@@ -481,11 +489,11 @@ function bt(e) {
|
|
|
481
489
|
});
|
|
482
490
|
}
|
|
483
491
|
// src/portal/Portal.tsx
|
|
484
|
-
var
|
|
485
|
-
function
|
|
486
|
-
return f(
|
|
492
|
+
var St = () => () => {}, Ct = () => !0, wt = () => !1;
|
|
493
|
+
function Tt() {
|
|
494
|
+
return f(St, Ct, wt);
|
|
487
495
|
}
|
|
488
|
-
function
|
|
496
|
+
function Et(e) {
|
|
489
497
|
let t = { display: "contents" };
|
|
490
498
|
if (!e) return t;
|
|
491
499
|
let n = getComputedStyle(e);
|
|
@@ -495,10 +503,10 @@ function Tt(e) {
|
|
|
495
503
|
}
|
|
496
504
|
return t;
|
|
497
505
|
}
|
|
498
|
-
function
|
|
499
|
-
let n =
|
|
506
|
+
function Dt({ children: e, container: t }) {
|
|
507
|
+
let n = Tt(), i = r(vt);
|
|
500
508
|
return n ? t ? Be(e, t) : Be(/* @__PURE__ */ W("div", {
|
|
501
|
-
style:
|
|
509
|
+
style: Et(i?.current),
|
|
502
510
|
children: e
|
|
503
511
|
}), document.body) : null;
|
|
504
512
|
}
|
|
@@ -523,7 +531,7 @@ var Y = {
|
|
|
523
531
|
popover__day_today: "_popover__day_today_1aojr_162"
|
|
524
532
|
};
|
|
525
533
|
// src/components/date-navigator/DateNavigator.tsx
|
|
526
|
-
function
|
|
534
|
+
function Ot({ renderHeading: e, type: t = "button", onClick: n, onKeyDown: r, className: a, ...o }) {
|
|
527
535
|
let { view: s, viewValue: l, changeViewValue: f, startWeek: p } = J(), m = K(), h = Ge(), { getStartOfWeek: g, getStartOfMonth: _, addMonths: v } = m, [y, b] = d(!1), [x, S] = d(() => _(l)), C = u(null), { refs: w, floatingStyles: T } = Re({
|
|
528
536
|
placement: "bottom",
|
|
529
537
|
middleware: [
|
|
@@ -580,8 +588,8 @@ function Dt({ renderHeading: e, type: t = "button", onClick: n, onKeyDown: r, cl
|
|
|
580
588
|
children: [/* @__PURE__ */ W("span", {
|
|
581
589
|
className: Y.root__toggleLabel,
|
|
582
590
|
children: E
|
|
583
|
-
}), /* @__PURE__ */ W(
|
|
584
|
-
}), y && /* @__PURE__ */ W(
|
|
591
|
+
}), /* @__PURE__ */ W(xt, { className: D(Y.root__toggleIcon, { [Y.root__toggleIcon_open]: y }) })]
|
|
592
|
+
}), y && /* @__PURE__ */ W(Dt, { children: /* @__PURE__ */ G("div", {
|
|
585
593
|
ref: w.setFloating,
|
|
586
594
|
style: T,
|
|
587
595
|
role: "dialog",
|
|
@@ -594,7 +602,7 @@ function Dt({ renderHeading: e, type: t = "button", onClick: n, onKeyDown: r, cl
|
|
|
594
602
|
type: "button",
|
|
595
603
|
"aria-label": h.previousMonth,
|
|
596
604
|
onClick: () => S((e) => v(e, -1)),
|
|
597
|
-
children: /* @__PURE__ */ W(
|
|
605
|
+
children: /* @__PURE__ */ W(xt, { className: Y.popover__navBackward })
|
|
598
606
|
}),
|
|
599
607
|
/* @__PURE__ */ W("div", {
|
|
600
608
|
className: Y.popover__title,
|
|
@@ -604,7 +612,7 @@ function Dt({ renderHeading: e, type: t = "button", onClick: n, onKeyDown: r, cl
|
|
|
604
612
|
type: "button",
|
|
605
613
|
"aria-label": h.nextMonth,
|
|
606
614
|
onClick: () => S((e) => v(e, 1)),
|
|
607
|
-
children: /* @__PURE__ */ W(
|
|
615
|
+
children: /* @__PURE__ */ W(xt, { className: Y.popover__navForward })
|
|
608
616
|
})
|
|
609
617
|
]
|
|
610
618
|
}), /* @__PURE__ */ G("div", {
|
|
@@ -631,14 +639,14 @@ function Dt({ renderHeading: e, type: t = "button", onClick: n, onKeyDown: r, cl
|
|
|
631
639
|
}) })]
|
|
632
640
|
});
|
|
633
641
|
}
|
|
634
|
-
var
|
|
642
|
+
var kt = {
|
|
635
643
|
root: "_root_l1csz_1",
|
|
636
644
|
root__icon: "_root__icon_l1csz_21",
|
|
637
645
|
root__icon_forward: "_root__icon_forward_l1csz_25",
|
|
638
646
|
root__icon_backward: "_root__icon_backward_l1csz_29"
|
|
639
647
|
};
|
|
640
648
|
// src/components/nav-btn/NavBtn.tsx
|
|
641
|
-
function
|
|
649
|
+
function At({ direction: e = "forward", type: t = "button", onClick: n, className: r, children: i, ...a }) {
|
|
642
650
|
let { goForward: o, goBackward: s } = J(), c = Ge(), l = q(ve(n, () => {
|
|
643
651
|
e === "forward" ? o() : e === "backward" && s();
|
|
644
652
|
}));
|
|
@@ -647,28 +655,28 @@ function kt({ direction: e = "forward", type: t = "button", onClick: n, classNam
|
|
|
647
655
|
"aria-label": e === "forward" ? c.next : c.previous,
|
|
648
656
|
...a,
|
|
649
657
|
onClick: l,
|
|
650
|
-
className: D(r,
|
|
651
|
-
children: i ?? /* @__PURE__ */ W(
|
|
652
|
-
[
|
|
653
|
-
[
|
|
658
|
+
className: D(r, kt.root),
|
|
659
|
+
children: i ?? /* @__PURE__ */ W(xt, { className: D(kt.root__icon, {
|
|
660
|
+
[kt.root__icon_backward]: e === "backward",
|
|
661
|
+
[kt.root__icon_forward]: e === "forward"
|
|
654
662
|
}) })
|
|
655
663
|
});
|
|
656
664
|
}
|
|
657
|
-
var
|
|
658
|
-
root: "
|
|
659
|
-
root__icon: "
|
|
660
|
-
root__icon_open: "
|
|
661
|
-
list: "
|
|
662
|
-
list__option: "
|
|
663
|
-
list__option_active: "
|
|
664
|
-
list__check: "
|
|
665
|
-
},
|
|
665
|
+
var jt = {
|
|
666
|
+
root: "_root_gpxmh_1",
|
|
667
|
+
root__icon: "_root__icon_gpxmh_25",
|
|
668
|
+
root__icon_open: "_root__icon_open_gpxmh_32",
|
|
669
|
+
list: "_list_gpxmh_36",
|
|
670
|
+
list__option: "_list__option_gpxmh_48",
|
|
671
|
+
list__option_active: "_list__option_active_gpxmh_68",
|
|
672
|
+
list__check: "_list__check_gpxmh_76"
|
|
673
|
+
}, Mt = [
|
|
666
674
|
"day",
|
|
667
675
|
"week",
|
|
668
676
|
"month"
|
|
669
677
|
];
|
|
670
|
-
function
|
|
671
|
-
let { view: t, changeView: n } = J(), r = Ge(), { addGlobalListener: o, removeGlobalListener: s } =
|
|
678
|
+
function Nt({ className: e }) {
|
|
679
|
+
let { view: t, changeView: n } = J(), r = Ge(), { addGlobalListener: o, removeGlobalListener: s } = at(), c = a(), [l, f] = d(!1), [p, m] = d(t), h = u(/* @__PURE__ */ new Map()), { refs: g, floatingStyles: _ } = Re({
|
|
672
680
|
placement: "bottom-end",
|
|
673
681
|
middleware: [
|
|
674
682
|
Ie(6),
|
|
@@ -704,14 +712,14 @@ function Mt({ className: e }) {
|
|
|
704
712
|
let x = (e) => {
|
|
705
713
|
(e.key === "ArrowDown" || e.key === "ArrowUp") && (e.preventDefault(), y());
|
|
706
714
|
}, S = (e) => {
|
|
707
|
-
let t =
|
|
708
|
-
e.preventDefault(), m(
|
|
715
|
+
let t = Mt.indexOf(p), n = (t) => {
|
|
716
|
+
e.preventDefault(), m(Mt[(t + Mt.length) % Mt.length] ?? p);
|
|
709
717
|
};
|
|
710
718
|
switch (e.key) {
|
|
711
719
|
case "ArrowDown": return n(t + 1);
|
|
712
720
|
case "ArrowUp": return n(t - 1);
|
|
713
721
|
case "Home": return n(0);
|
|
714
|
-
case "End": return n(
|
|
722
|
+
case "End": return n(Mt.length - 1);
|
|
715
723
|
case "Enter":
|
|
716
724
|
case " ": return e.preventDefault(), b(p);
|
|
717
725
|
case "Escape": return e.preventDefault(), v(!0);
|
|
@@ -725,22 +733,22 @@ function Mt({ className: e }) {
|
|
|
725
733
|
"aria-expanded": l,
|
|
726
734
|
"aria-controls": l ? C : void 0,
|
|
727
735
|
"aria-label": `${r.chooseView}: ${r[t]}`,
|
|
728
|
-
className: D(e,
|
|
736
|
+
className: D(e, jt.root),
|
|
729
737
|
onClick: () => l ? v(!1) : y(),
|
|
730
738
|
onKeyDown: x,
|
|
731
|
-
children: [r[t], /* @__PURE__ */ W(
|
|
739
|
+
children: [r[t], /* @__PURE__ */ W(xt, {
|
|
732
740
|
"aria-hidden": "true",
|
|
733
|
-
className: D(
|
|
741
|
+
className: D(jt.root__icon, { [jt.root__icon_open]: l })
|
|
734
742
|
})]
|
|
735
|
-
}), l && /* @__PURE__ */ W(
|
|
743
|
+
}), l && /* @__PURE__ */ W(Dt, { children: /* @__PURE__ */ W("div", {
|
|
736
744
|
ref: g.setFloating,
|
|
737
745
|
id: C,
|
|
738
746
|
role: "listbox",
|
|
739
747
|
"aria-label": r.chooseView,
|
|
740
748
|
style: _,
|
|
741
|
-
className:
|
|
749
|
+
className: jt.list,
|
|
742
750
|
onKeyDown: S,
|
|
743
|
-
children:
|
|
751
|
+
children: Mt.map((e) => /* @__PURE__ */ G("div", {
|
|
744
752
|
ref: (t) => {
|
|
745
753
|
t ? h.current.set(e, t) : h.current.delete(e);
|
|
746
754
|
},
|
|
@@ -748,12 +756,12 @@ function Mt({ className: e }) {
|
|
|
748
756
|
role: "option",
|
|
749
757
|
tabIndex: -1,
|
|
750
758
|
"aria-selected": e === t,
|
|
751
|
-
className: D(
|
|
759
|
+
className: D(jt.list__option, { [jt.list__option_active]: e === p }),
|
|
752
760
|
onClick: () => b(e),
|
|
753
761
|
onPointerMove: () => m(e),
|
|
754
762
|
children: [r[e], e === t && /* @__PURE__ */ W("svg", {
|
|
755
763
|
"aria-hidden": "true",
|
|
756
|
-
className:
|
|
764
|
+
className: jt.list__check,
|
|
757
765
|
viewBox: "0 0 16 16",
|
|
758
766
|
width: "14",
|
|
759
767
|
height: "14",
|
|
@@ -780,7 +788,7 @@ var X = {
|
|
|
780
788
|
root__viewSelect: "_root__viewSelect_1lvdm_89"
|
|
781
789
|
};
|
|
782
790
|
// src/components/calendar-toolbar/CalendarToolbar.tsx
|
|
783
|
-
function
|
|
791
|
+
function Pt(e) {
|
|
784
792
|
let { goToday: t, changeView: n, view: r } = J(), i = Ge(), a = e, o = {
|
|
785
793
|
day: {
|
|
786
794
|
type: "button",
|
|
@@ -813,14 +821,14 @@ function Nt(e) {
|
|
|
813
821
|
...a,
|
|
814
822
|
className: D(a.className, X.root),
|
|
815
823
|
children: [
|
|
816
|
-
/* @__PURE__ */ W(
|
|
824
|
+
/* @__PURE__ */ W(Ot, {}),
|
|
817
825
|
/* @__PURE__ */ G("div", {
|
|
818
826
|
className: X.root__navigationPane,
|
|
819
827
|
role: "group",
|
|
820
828
|
children: [
|
|
821
|
-
/* @__PURE__ */ W(
|
|
829
|
+
/* @__PURE__ */ W(At, { direction: "backward" }),
|
|
822
830
|
/* @__PURE__ */ W("button", { ...s }),
|
|
823
|
-
/* @__PURE__ */ W(
|
|
831
|
+
/* @__PURE__ */ W(At, { direction: "forward" })
|
|
824
832
|
]
|
|
825
833
|
}),
|
|
826
834
|
/* @__PURE__ */ G("div", {
|
|
@@ -833,26 +841,26 @@ function Nt(e) {
|
|
|
833
841
|
}),
|
|
834
842
|
/* @__PURE__ */ W("div", {
|
|
835
843
|
className: X.root__viewSelect,
|
|
836
|
-
children: /* @__PURE__ */ W(
|
|
844
|
+
children: /* @__PURE__ */ W(Nt, {})
|
|
837
845
|
})
|
|
838
846
|
]
|
|
839
847
|
});
|
|
840
848
|
}
|
|
841
849
|
// src/contexts/CalendarViewportContext.ts
|
|
842
|
-
var
|
|
843
|
-
U && (
|
|
844
|
-
function
|
|
845
|
-
let e = r(
|
|
850
|
+
var Ft = e(void 0);
|
|
851
|
+
U && (Ft.displayName = "CalendarViewportContext");
|
|
852
|
+
function It() {
|
|
853
|
+
let e = r(Ft);
|
|
846
854
|
if (!e) throw Error("CalendarViewportContext is required");
|
|
847
855
|
return e;
|
|
848
856
|
}
|
|
849
|
-
var
|
|
857
|
+
var Lt = { root: "_root_1pvvm_1" };
|
|
850
858
|
// src/components/pointer-popover/PointerPopover.tsx
|
|
851
|
-
function
|
|
859
|
+
function Rt({ coordinates: e, className: t, style: n, ...r }) {
|
|
852
860
|
return /* @__PURE__ */ W("span", {
|
|
853
861
|
tabIndex: -1,
|
|
854
862
|
...r,
|
|
855
|
-
className: D(t,
|
|
863
|
+
className: D(t, Lt.root),
|
|
856
864
|
style: {
|
|
857
865
|
...n,
|
|
858
866
|
...e ? {
|
|
@@ -862,18 +870,18 @@ function Lt({ coordinates: e, className: t, style: n, ...r }) {
|
|
|
862
870
|
}
|
|
863
871
|
});
|
|
864
872
|
}
|
|
865
|
-
var
|
|
866
|
-
root: "
|
|
867
|
-
root_isDragging: "
|
|
868
|
-
root_isReturning: "
|
|
869
|
-
"ww-drag-return": "_ww-drag-
|
|
870
|
-
root_isBlocked: "
|
|
871
|
-
},
|
|
873
|
+
var zt = {
|
|
874
|
+
root: "_root_ssdmn_1",
|
|
875
|
+
root_isDragging: "_root_isDragging_ssdmn_14",
|
|
876
|
+
root_isReturning: "_root_isReturning_ssdmn_23",
|
|
877
|
+
"ww-drag-return": "_ww-drag-return_ssdmn_39",
|
|
878
|
+
root_isBlocked: "_root_isBlocked_ssdmn_36"
|
|
879
|
+
}, Bt = {
|
|
872
880
|
isStart: !0,
|
|
873
881
|
isEnd: !0
|
|
874
882
|
};
|
|
875
|
-
function
|
|
876
|
-
let { eventMap: r, eventRenderer: i, pointerPreviewRenderer: a, view: o } = J(), { viewportRef: s } =
|
|
883
|
+
function Vt({ showPreview: e = !0, pxPerMinute: t = 1, ...n }) {
|
|
884
|
+
let { eventMap: r, eventRenderer: i, pointerPreviewRenderer: a, view: o } = J(), { viewportRef: s } = It(), { isDragging: l, canDrop: f, dropData: p, eventItem: m, source: h, x: g, y: _, ...v } = Ne(({ draggable: e, overlay: t, droppable: n, canDrop: r }) => {
|
|
877
885
|
let i = [...n.dropTargets.values()].shift(), a = [...e.dragTargets.values()].shift();
|
|
878
886
|
return {
|
|
879
887
|
...t.transform,
|
|
@@ -889,50 +897,59 @@ function Bt({ showPreview: e = !0, pxPerMinute: t = 1, ...n }) {
|
|
|
889
897
|
if (!m) return null;
|
|
890
898
|
let { key: e } = JSON.parse(m.event);
|
|
891
899
|
return r.get(e)?.value ?? null;
|
|
892
|
-
}, [m, r]), b = u(null),
|
|
900
|
+
}, [m, r]), b = u(null), x = u(!1), [S, C] = d(!1), [w, T] = d(null);
|
|
893
901
|
if (Ke(() => {
|
|
894
|
-
if (
|
|
895
|
-
|
|
902
|
+
if (l) {
|
|
903
|
+
x.current = f, p && h && (b.current = {
|
|
904
|
+
transform: v,
|
|
905
|
+
source: h,
|
|
906
|
+
eventValue: y
|
|
907
|
+
}, C(!0), T(null));
|
|
896
908
|
return;
|
|
897
909
|
}
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
910
|
+
C(!1);
|
|
911
|
+
let e = b.current;
|
|
912
|
+
b.current = null;
|
|
913
|
+
let t = s.current;
|
|
914
|
+
if (!e || x.current || !t || !e.source.isConnected) return;
|
|
915
|
+
let { transform: n } = e, r = e.source.getBoundingClientRect(), i = t.getBoundingClientRect();
|
|
916
|
+
T({
|
|
902
917
|
container: t,
|
|
918
|
+
eventValue: e.eventValue,
|
|
903
919
|
style: {
|
|
904
|
-
left:
|
|
905
|
-
top:
|
|
906
|
-
width:
|
|
907
|
-
height:
|
|
908
|
-
"--ww-return-left": `${
|
|
909
|
-
"--ww-return-top": `${
|
|
910
|
-
"--ww-return-width": `${
|
|
911
|
-
"--ww-return-height": `${
|
|
920
|
+
left: r.left - i.left,
|
|
921
|
+
top: r.top - i.top,
|
|
922
|
+
width: r.width,
|
|
923
|
+
height: r.height,
|
|
924
|
+
"--ww-return-left": `${n.left}px`,
|
|
925
|
+
"--ww-return-top": `${n.top}px`,
|
|
926
|
+
"--ww-return-width": `${n.width}px`,
|
|
927
|
+
"--ww-return-height": `${n.height}px`
|
|
912
928
|
}
|
|
913
929
|
});
|
|
914
|
-
}), !l) return
|
|
915
|
-
|
|
916
|
-
container: x.container,
|
|
930
|
+
}), et(l ? f ? "grabbing" : "not-allowed" : null), !l) return w ? /* @__PURE__ */ W(Dt, {
|
|
931
|
+
container: w.container,
|
|
917
932
|
children: /* @__PURE__ */ W("div", {
|
|
918
933
|
...n,
|
|
919
|
-
className: D(n.className,
|
|
920
|
-
style:
|
|
921
|
-
|
|
934
|
+
className: D(n.className, zt.root, zt.root_isReturning),
|
|
935
|
+
style: w.style,
|
|
936
|
+
onAnimationEnd: () => T(null),
|
|
937
|
+
children: w.eventValue == null ? null : i.current?.(w.eventValue, o, Bt)
|
|
922
938
|
})
|
|
923
939
|
}) : null;
|
|
924
|
-
|
|
925
|
-
|
|
940
|
+
if (!S) return null;
|
|
941
|
+
let E = !f;
|
|
942
|
+
return /* @__PURE__ */ G(Dt, {
|
|
926
943
|
container: s.current,
|
|
927
944
|
children: [/* @__PURE__ */ W("div", {
|
|
928
945
|
...n,
|
|
929
|
-
className: D(n.className,
|
|
930
|
-
[
|
|
931
|
-
[
|
|
946
|
+
className: D(n.className, zt.root, {
|
|
947
|
+
[zt.root_isDragging]: l,
|
|
948
|
+
[zt.root_isBlocked]: E
|
|
932
949
|
}),
|
|
933
950
|
style: { ...v },
|
|
934
|
-
children: y == null ? null : i.current?.(y, o,
|
|
935
|
-
}), e && !
|
|
951
|
+
children: y == null ? null : i.current?.(y, o, Bt)
|
|
952
|
+
}), e && !E && /* @__PURE__ */ W(Rt, {
|
|
936
953
|
coordinates: {
|
|
937
954
|
x: g,
|
|
938
955
|
y: _
|
|
@@ -942,16 +959,16 @@ function Bt({ showPreview: e = !0, pxPerMinute: t = 1, ...n }) {
|
|
|
942
959
|
});
|
|
943
960
|
}
|
|
944
961
|
// src/components/month-view/MonthView.utils.ts
|
|
945
|
-
function
|
|
962
|
+
function Ht(e, t) {
|
|
946
963
|
return {
|
|
947
964
|
...t,
|
|
948
965
|
...e
|
|
949
966
|
};
|
|
950
967
|
}
|
|
951
|
-
function
|
|
968
|
+
function Ut(e) {
|
|
952
969
|
return Array.from({ length: Math.ceil(e.length / 7) }, (t, n) => e.slice(n * 7, n * 7 + 7));
|
|
953
970
|
}
|
|
954
|
-
function
|
|
971
|
+
function Wt(e, t, n) {
|
|
955
972
|
let r = e?.querySelectorAll("[data-day-index]") ?? [], i = -1, a = 1e400;
|
|
956
973
|
for (let e of r) {
|
|
957
974
|
let r = e.getBoundingClientRect(), o = t < r.left ? r.left - t : t >= r.right ? t - r.right : 0, s = n < r.top ? r.top - n : n >= r.bottom ? n - r.bottom : 0, c = Math.hypot(o, s);
|
|
@@ -960,31 +977,31 @@ function Ut(e, t, n) {
|
|
|
960
977
|
return i;
|
|
961
978
|
}
|
|
962
979
|
var Z = {
|
|
963
|
-
root: "
|
|
964
|
-
root__head: "
|
|
965
|
-
root__weekday: "
|
|
966
|
-
root__body: "
|
|
967
|
-
root__viewport: "
|
|
968
|
-
root__week: "
|
|
969
|
-
root__day: "
|
|
970
|
-
root__day_isOver: "
|
|
971
|
-
root__dayNumber: "
|
|
972
|
-
root__event: "
|
|
973
|
-
root__event_span: "
|
|
974
|
-
root__event_continuesBefore: "
|
|
975
|
-
root__event_continuesAfter: "
|
|
976
|
-
root__event_isResizing: "
|
|
977
|
-
root__event_isResizeSource: "
|
|
978
|
-
root__resize: "
|
|
979
|
-
root__resizeStart: "
|
|
980
|
-
root__resizeEnd: "
|
|
981
|
-
root_isResizing: "
|
|
982
|
-
root__event_isDragging: "
|
|
983
|
-
root__dragOverlay: "
|
|
984
|
-
root__more: "
|
|
980
|
+
root: "_root_fq0jy_1",
|
|
981
|
+
root__head: "_root__head_fq0jy_11",
|
|
982
|
+
root__weekday: "_root__weekday_fq0jy_21",
|
|
983
|
+
root__body: "_root__body_fq0jy_31",
|
|
984
|
+
root__viewport: "_root__viewport_fq0jy_37",
|
|
985
|
+
root__week: "_root__week_fq0jy_21",
|
|
986
|
+
root__day: "_root__day_fq0jy_62",
|
|
987
|
+
root__day_isOver: "_root__day_isOver_fq0jy_86",
|
|
988
|
+
root__dayNumber: "_root__dayNumber_fq0jy_100",
|
|
989
|
+
root__event: "_root__event_fq0jy_122",
|
|
990
|
+
root__event_span: "_root__event_span_fq0jy_153",
|
|
991
|
+
root__event_continuesBefore: "_root__event_continuesBefore_fq0jy_159",
|
|
992
|
+
root__event_continuesAfter: "_root__event_continuesAfter_fq0jy_165",
|
|
993
|
+
root__event_isResizing: "_root__event_isResizing_fq0jy_171",
|
|
994
|
+
root__event_isResizeSource: "_root__event_isResizeSource_fq0jy_175",
|
|
995
|
+
root__resize: "_root__resize_fq0jy_180",
|
|
996
|
+
root__resizeStart: "_root__resizeStart_fq0jy_188",
|
|
997
|
+
root__resizeEnd: "_root__resizeEnd_fq0jy_192",
|
|
998
|
+
root_isResizing: "_root_isResizing_fq0jy_196",
|
|
999
|
+
root__event_isDragging: "_root__event_isDragging_fq0jy_201",
|
|
1000
|
+
root__dragOverlay: "_root__dragOverlay_fq0jy_206",
|
|
1001
|
+
root__more: "_root__more_fq0jy_231"
|
|
985
1002
|
};
|
|
986
1003
|
// src/components/month-view/MonthViewDay.tsx
|
|
987
|
-
function
|
|
1004
|
+
function Gt(e) {
|
|
988
1005
|
let { ref: t, targetDate: n, children: r, onDoubleClick: a, ...o } = e, { onEventChange: s, onEventCreate: c, getIsDayDisabled: l, disabled: d, eventMap: f } = J(), p = K(), { getHours: m, getMinutes: h, getNow: g } = p, _ = u(null), { register: v, isOver: y } = Ne(({ registerDropTarget: e, isOver: t }) => ({
|
|
989
1006
|
register: e,
|
|
990
1007
|
isOver: t(_.current)
|
|
@@ -1025,7 +1042,7 @@ function Wt(e) {
|
|
|
1025
1042
|
from: m(t) * 60 + h(t),
|
|
1026
1043
|
duration: 60
|
|
1027
1044
|
});
|
|
1028
|
-
}), x =
|
|
1045
|
+
}), x = ct(_, t);
|
|
1029
1046
|
return /* @__PURE__ */ W("div", {
|
|
1030
1047
|
...o,
|
|
1031
1048
|
ref: x,
|
|
@@ -1035,7 +1052,7 @@ function Wt(e) {
|
|
|
1035
1052
|
});
|
|
1036
1053
|
}
|
|
1037
1054
|
// src/hooks/useInterval.ts
|
|
1038
|
-
function
|
|
1055
|
+
function Kt() {
|
|
1039
1056
|
let e = u(null);
|
|
1040
1057
|
return [n((t, n) => {
|
|
1041
1058
|
e.current = setInterval(t, n);
|
|
@@ -1044,7 +1061,7 @@ function Gt() {
|
|
|
1044
1061
|
}, [])];
|
|
1045
1062
|
}
|
|
1046
1063
|
// src/hooks/useScrollIntent.ts
|
|
1047
|
-
var
|
|
1064
|
+
var qt = {
|
|
1048
1065
|
x: {
|
|
1049
1066
|
[-1]: !1,
|
|
1050
1067
|
1: !1
|
|
@@ -1054,10 +1071,10 @@ var Kt = {
|
|
|
1054
1071
|
1: !1
|
|
1055
1072
|
}
|
|
1056
1073
|
};
|
|
1057
|
-
function
|
|
1058
|
-
let n =
|
|
1074
|
+
function Jt({ delta: e, disabled: t }) {
|
|
1075
|
+
let n = ut(e);
|
|
1059
1076
|
return Xe((r) => {
|
|
1060
|
-
if (t || !n || !r) return
|
|
1077
|
+
if (t || !n || !r) return qt;
|
|
1061
1078
|
let i = {
|
|
1062
1079
|
x: Math.sign(e.x - n.x),
|
|
1063
1080
|
y: Math.sign(e.y - n.y)
|
|
@@ -1079,8 +1096,8 @@ function qt({ delta: e, disabled: t }) {
|
|
|
1079
1096
|
]);
|
|
1080
1097
|
}
|
|
1081
1098
|
// src/hooks/useAutoScroller.ts
|
|
1082
|
-
function
|
|
1083
|
-
let { acceleration: t, activator: r = 0, canScroll: a, enabled: o, interval: s = 5, pointerCoordinates: l, order: d = 0, delta: f, threshold: p, activeNodeRect: m, scrollableAncestors: h, scrollableAncestorsRects: g } = e, [_, v] =
|
|
1099
|
+
function Yt(e) {
|
|
1100
|
+
let { acceleration: t, activator: r = 0, canScroll: a, enabled: o, interval: s = 5, pointerCoordinates: l, order: d = 0, delta: f, threshold: p, activeNodeRect: m, scrollableAncestors: h, scrollableAncestorsRects: g } = e, [_, v] = Kt(), y = Jt({
|
|
1084
1101
|
delta: f,
|
|
1085
1102
|
disabled: !o
|
|
1086
1103
|
}), b = u({
|
|
@@ -1154,7 +1171,7 @@ function Jt(e) {
|
|
|
1154
1171
|
]);
|
|
1155
1172
|
}
|
|
1156
1173
|
// src/hooks/useMutationObserver.ts
|
|
1157
|
-
function
|
|
1174
|
+
function Xt(e, t = !1) {
|
|
1158
1175
|
let n = u(e);
|
|
1159
1176
|
n.current = e;
|
|
1160
1177
|
let r = c(() => {
|
|
@@ -1165,8 +1182,8 @@ function Yt(e, t = !1) {
|
|
|
1165
1182
|
return i(() => () => r?.disconnect(), [r]), r;
|
|
1166
1183
|
}
|
|
1167
1184
|
// src/hooks/useRect.ts
|
|
1168
|
-
function
|
|
1169
|
-
let [r, i] = l(s, null), a =
|
|
1185
|
+
function Zt(e, t = P, n) {
|
|
1186
|
+
let [r, i] = l(s, null), a = Xt((t) => {
|
|
1170
1187
|
if (e) for (let n of t) {
|
|
1171
1188
|
let { type: t, target: r } = n;
|
|
1172
1189
|
if (t === "childList" && pe(r) && r.contains(e)) {
|
|
@@ -1193,18 +1210,18 @@ function Xt(e, t = P, n) {
|
|
|
1193
1210
|
}
|
|
1194
1211
|
}
|
|
1195
1212
|
// src/hooks/useScrollableAncestors.ts
|
|
1196
|
-
var
|
|
1197
|
-
function
|
|
1198
|
-
let n = u(e), r = c(() => e ? re(e, t) :
|
|
1213
|
+
var Qt = [];
|
|
1214
|
+
function $t(e, t) {
|
|
1215
|
+
let n = u(e), r = c(() => e ? re(e, t) : Qt, [e, t]);
|
|
1199
1216
|
return i(() => {
|
|
1200
1217
|
n.current = e;
|
|
1201
1218
|
}, [e]), r;
|
|
1202
1219
|
}
|
|
1203
1220
|
// src/hooks/useScrollableAncestorsRects.ts
|
|
1204
|
-
var
|
|
1205
|
-
function
|
|
1206
|
-
let [n, r] = l(a,
|
|
1207
|
-
return e.length > 0 && n ===
|
|
1221
|
+
var en = [];
|
|
1222
|
+
function tn(e, t = P) {
|
|
1223
|
+
let [n, r] = l(a, en), i = qe(r);
|
|
1224
|
+
return e.length > 0 && n === en && r(), Ke(() => {
|
|
1208
1225
|
e.length ? e.forEach((e) => i?.observe(e)) : (i?.disconnect(), r());
|
|
1209
1226
|
}, [e, i]), n;
|
|
1210
1227
|
function a() {
|
|
@@ -1221,11 +1238,11 @@ function en(e, t = P) {
|
|
|
1221
1238
|
};
|
|
1222
1239
|
}
|
|
1223
1240
|
return new h(t(e), e);
|
|
1224
|
-
}) :
|
|
1241
|
+
}) : en;
|
|
1225
1242
|
}
|
|
1226
1243
|
}
|
|
1227
1244
|
// src/hooks/useScrollOffsets.ts
|
|
1228
|
-
function
|
|
1245
|
+
function nn(e) {
|
|
1229
1246
|
let [t, r] = d(null), a = u(e), o = n((e) => {
|
|
1230
1247
|
let t = ie(e.target);
|
|
1231
1248
|
t && r((e) => e ? (e.set(t, V(t)), new Map(e)) : null);
|
|
@@ -1252,7 +1269,7 @@ function tn(e) {
|
|
|
1252
1269
|
}, [o, e]), c(() => e.length ? t ? Array.from(t.values()).reduce((e, t) => _(e, t), O) : H(e) : O, [e, t]);
|
|
1253
1270
|
}
|
|
1254
1271
|
// src/hooks/useScrollOffsetsDelta.ts
|
|
1255
|
-
function
|
|
1272
|
+
function rn(e, t = k) {
|
|
1256
1273
|
let n = u(null);
|
|
1257
1274
|
return i(() => {
|
|
1258
1275
|
n.current = null;
|
|
@@ -1262,11 +1279,11 @@ function nn(e, t = k) {
|
|
|
1262
1279
|
}, [e]), n.current ? Oe(e, n.current) : O;
|
|
1263
1280
|
}
|
|
1264
1281
|
// src/hooks/useMoveTransform.ts
|
|
1265
|
-
var
|
|
1282
|
+
var an = {
|
|
1266
1283
|
Start: "start",
|
|
1267
1284
|
Move: "move",
|
|
1268
1285
|
Stop: "stop"
|
|
1269
|
-
},
|
|
1286
|
+
}, on = {
|
|
1270
1287
|
isActive: !1,
|
|
1271
1288
|
initialTranslate: {
|
|
1272
1289
|
x: 0,
|
|
@@ -1282,8 +1299,8 @@ var rn = {
|
|
|
1282
1299
|
},
|
|
1283
1300
|
context: null
|
|
1284
1301
|
};
|
|
1285
|
-
function
|
|
1286
|
-
let [i, a] = l(
|
|
1302
|
+
function sn({ autoScrollEnabled: e = !0, modifiers: t = [], activeNode: n = null, containerNode: r = null }) {
|
|
1303
|
+
let [i, a] = l(cn, on), o = typeof n == "function" ? n(i.context) : n, s = typeof r == "function" ? r(i.context) : r, u = Zt(i.isActive ? o : null), d = Zt(i.isActive ? s : null), f = $t(i.isActive ? o : null), p = tn(f), m = rn(nn(f)), h = c(() => {
|
|
1287
1304
|
let e = (e) => (t, n) => {
|
|
1288
1305
|
a({
|
|
1289
1306
|
type: e,
|
|
@@ -1292,12 +1309,12 @@ function on({ autoScrollEnabled: e = !0, modifiers: t = [], activeNode: n = null
|
|
|
1292
1309
|
});
|
|
1293
1310
|
};
|
|
1294
1311
|
return {
|
|
1295
|
-
start: e(
|
|
1296
|
-
move: e(
|
|
1297
|
-
stop: e(
|
|
1312
|
+
start: e(an.Start),
|
|
1313
|
+
move: e(an.Move),
|
|
1314
|
+
stop: e(an.Stop)
|
|
1298
1315
|
};
|
|
1299
1316
|
}, []), g = _(i.initialTranslate, i.translate);
|
|
1300
|
-
|
|
1317
|
+
Yt({
|
|
1301
1318
|
delta: i.translate,
|
|
1302
1319
|
enabled: e && i.isActive,
|
|
1303
1320
|
activeNodeRect: u,
|
|
@@ -1339,18 +1356,18 @@ function on({ autoScrollEnabled: e = !0, modifiers: t = [], activeNode: n = null
|
|
|
1339
1356
|
}
|
|
1340
1357
|
];
|
|
1341
1358
|
}
|
|
1342
|
-
function
|
|
1359
|
+
function cn(e, t) {
|
|
1343
1360
|
let n = {
|
|
1344
|
-
[
|
|
1361
|
+
[an.Start]: (e, { coordinates: t, context: n }) => ({
|
|
1345
1362
|
...e,
|
|
1346
1363
|
isActive: !0,
|
|
1347
|
-
currentAction:
|
|
1364
|
+
currentAction: an.Start,
|
|
1348
1365
|
initialTranslate: { ...t },
|
|
1349
1366
|
context: n
|
|
1350
1367
|
}),
|
|
1351
|
-
[
|
|
1368
|
+
[an.Move]: (e, { coordinates: t }) => ({
|
|
1352
1369
|
...e,
|
|
1353
|
-
currentAction:
|
|
1370
|
+
currentAction: an.Move,
|
|
1354
1371
|
translate: {
|
|
1355
1372
|
x: t.x - e.initialTranslate.x,
|
|
1356
1373
|
y: t.y - e.initialTranslate.y
|
|
@@ -1360,17 +1377,17 @@ function sn(e, t) {
|
|
|
1360
1377
|
y: t.y - (e.translate.y + e.initialTranslate.y)
|
|
1361
1378
|
}
|
|
1362
1379
|
}),
|
|
1363
|
-
[
|
|
1364
|
-
...
|
|
1365
|
-
currentAction:
|
|
1380
|
+
[an.Stop]: () => ({
|
|
1381
|
+
...on,
|
|
1382
|
+
currentAction: an.Stop
|
|
1366
1383
|
})
|
|
1367
1384
|
};
|
|
1368
1385
|
return _e(t.type, n, e, t);
|
|
1369
1386
|
}
|
|
1370
1387
|
// src/components/month-view/MonthViewEvent.tsx
|
|
1371
|
-
var
|
|
1372
|
-
function
|
|
1373
|
-
let { ref: t, eventData: n, weekDays: r, resizable: a = !1, resize: o, isResizeSource: s = !1, isAnyResizing: c = !1, children: l, ...d } = e, { disabled: f } = J(), m = K(), { viewportRef: h } =
|
|
1388
|
+
var ln = 6;
|
|
1389
|
+
function un(e) {
|
|
1390
|
+
let { ref: t, eventData: n, weekDays: r, resizable: a = !1, resize: o, isResizeSource: s = !1, isAnyResizing: c = !1, children: l, ...d } = e, { disabled: f } = J(), m = K(), { viewportRef: h } = It(), g = u(null), _ = u(null), { attributes: v, isDragging: y, overElement: b, register: x, setOverlayTransform: S } = Ne(({ registerDragSource: e, draggable: t, droppable: n, setTransform: r, isActive: i }) => {
|
|
1374
1391
|
let a = i(g.current), [o] = a ? [...n.dropTargets].pop() ?? [null] : [null];
|
|
1375
1392
|
return {
|
|
1376
1393
|
attributes: t.attributes,
|
|
@@ -1379,18 +1396,18 @@ function ln(e) {
|
|
|
1379
1396
|
register: e,
|
|
1380
1397
|
setOverlayTransform: r
|
|
1381
1398
|
};
|
|
1382
|
-
}), C =
|
|
1399
|
+
}), C = Zt(y ? b : null), [{ transform: w, context: T }, E] = sn({
|
|
1383
1400
|
autoScrollEnabled: !1,
|
|
1384
1401
|
activeNode: () => g.current,
|
|
1385
1402
|
containerNode: () => h.current,
|
|
1386
1403
|
modifiers: [function({ activeNodeRect: e, containerNodeRect: t, transform: n, translate: r, initialTranslate: i }) {
|
|
1387
1404
|
if (!t || !e || !C) return n;
|
|
1388
|
-
n.x = r.x + i.x - t.left, n.y = r.y + i.y - t.top, n.left = C.left - t.left +
|
|
1405
|
+
n.x = r.x + i.x - t.left, n.y = r.y + i.y - t.top, n.left = C.left - t.left + ln, n.width = C.width - 12, n.height = e.height;
|
|
1389
1406
|
let a = e.top + r.y, o = C.top + p.header, s = C.top + C.height - e.height;
|
|
1390
1407
|
return n.top = Math.max(o, Math.min(a, s)) - t.top, n;
|
|
1391
1408
|
}]
|
|
1392
1409
|
}), O = q((e) => {
|
|
1393
|
-
T === "overlay" && S(e);
|
|
1410
|
+
T === "overlay" && b && S(e);
|
|
1394
1411
|
});
|
|
1395
1412
|
i(() => {
|
|
1396
1413
|
O(w);
|
|
@@ -1444,7 +1461,7 @@ function ln(e) {
|
|
|
1444
1461
|
onMoveStart: () => (o?.start(n.key, e), !0),
|
|
1445
1462
|
onMove: (e) => o?.move(e.clientX, e.clientY),
|
|
1446
1463
|
onMoveEnd: () => o?.end()
|
|
1447
|
-
}), { listeners: j } =
|
|
1464
|
+
}), { listeners: j } = lt(A("start")), { listeners: M } = lt(A("end")), N = ct(g, t), P = n.span > 1 || !n.isStart || !n.isEnd, F = Ht({
|
|
1448
1465
|
"--ww-column": n.column + 1,
|
|
1449
1466
|
"--ww-span": n.span,
|
|
1450
1467
|
"--ww-row": n.lane + 2
|
|
@@ -1482,7 +1499,7 @@ function ln(e) {
|
|
|
1482
1499
|
});
|
|
1483
1500
|
}
|
|
1484
1501
|
// src/components/month-view/MonthViewEventPreview.tsx
|
|
1485
|
-
function
|
|
1502
|
+
function dn({ bar: e, children: t }) {
|
|
1486
1503
|
return /* @__PURE__ */ W("div", {
|
|
1487
1504
|
"aria-hidden": "true",
|
|
1488
1505
|
"data-key": String(e.key),
|
|
@@ -1493,7 +1510,7 @@ function un({ bar: e, children: t }) {
|
|
|
1493
1510
|
[Z.root__event_continuesBefore]: !e.isStart,
|
|
1494
1511
|
[Z.root__event_continuesAfter]: !e.isEnd
|
|
1495
1512
|
}),
|
|
1496
|
-
style:
|
|
1513
|
+
style: Ht({
|
|
1497
1514
|
"--ww-column": e.column + 1,
|
|
1498
1515
|
"--ww-span": e.span,
|
|
1499
1516
|
"--ww-row": e.lane + 2
|
|
@@ -1502,11 +1519,11 @@ function un({ bar: e, children: t }) {
|
|
|
1502
1519
|
});
|
|
1503
1520
|
}
|
|
1504
1521
|
// src/components/month-view/MonthViewWeek.tsx
|
|
1505
|
-
function
|
|
1522
|
+
function fn(e) {
|
|
1506
1523
|
let { days: t, firstDayIndex: n, layout: r, sourceBars: i, lanes: a, resizingKey: o, resize: s } = e, { viewValue: c, eventRenderer: l, view: u, disabled: d } = J(), { getMonthDay: f, isSameMonth: p, isToday: m, toMillis: h } = K(), g = Ge(), _ = o !== void 0, v = (e) => l.current?.(e.value, u, {
|
|
1507
1524
|
isStart: e.isStart,
|
|
1508
1525
|
isEnd: e.isEnd
|
|
1509
|
-
}), y = (e, n = !1) => /* @__PURE__ */ W(
|
|
1526
|
+
}), y = (e, n = !1) => /* @__PURE__ */ W(un, {
|
|
1510
1527
|
eventData: e,
|
|
1511
1528
|
weekDays: t,
|
|
1512
1529
|
resizable: !d,
|
|
@@ -1518,24 +1535,24 @@ function dn(e) {
|
|
|
1518
1535
|
return /* @__PURE__ */ G("div", {
|
|
1519
1536
|
className: Z.root__week,
|
|
1520
1537
|
children: [
|
|
1521
|
-
t.map((e, t) => /* @__PURE__ */ W(
|
|
1538
|
+
t.map((e, t) => /* @__PURE__ */ W(Gt, {
|
|
1522
1539
|
targetDate: e,
|
|
1523
1540
|
"data-day-index": n + t,
|
|
1524
1541
|
"data-is-outside": !p(e, c) || void 0,
|
|
1525
1542
|
"data-is-today": m(e) ? !0 : void 0,
|
|
1526
|
-
style:
|
|
1543
|
+
style: Ht({ "--ww-column": t + 1 }),
|
|
1527
1544
|
children: /* @__PURE__ */ W("span", {
|
|
1528
1545
|
className: Z.root__dayNumber,
|
|
1529
1546
|
children: f(e)
|
|
1530
1547
|
})
|
|
1531
1548
|
}, h(e))),
|
|
1532
|
-
[...r.bars.map((e) => e.key === o ? /* @__PURE__ */ W(
|
|
1549
|
+
[...r.bars.map((e) => e.key === o ? /* @__PURE__ */ W(dn, {
|
|
1533
1550
|
bar: e,
|
|
1534
1551
|
children: v(e)
|
|
1535
1552
|
}, `preview-${e.key}`) : y(e)), ...i.map((e) => y(e, !0))],
|
|
1536
1553
|
t.map((e, t) => r.hidden[t] > 0 && /* @__PURE__ */ W("span", {
|
|
1537
1554
|
className: Z.root__more,
|
|
1538
|
-
style:
|
|
1555
|
+
style: Ht({
|
|
1539
1556
|
"--ww-column": t + 1,
|
|
1540
1557
|
"--ww-row": a + 2
|
|
1541
1558
|
}),
|
|
@@ -1545,7 +1562,7 @@ function dn(e) {
|
|
|
1545
1562
|
});
|
|
1546
1563
|
}
|
|
1547
1564
|
// src/components/month-view/useMonthLanes.ts
|
|
1548
|
-
function
|
|
1565
|
+
function pn(e, t) {
|
|
1549
1566
|
let [n, r] = d(t), i = () => {
|
|
1550
1567
|
let n = e.current?.firstElementChild;
|
|
1551
1568
|
n?.clientHeight && r(R(n.clientHeight, t));
|
|
@@ -1559,8 +1576,8 @@ function fn(e, t) {
|
|
|
1559
1576
|
}, [a, t]), n;
|
|
1560
1577
|
}
|
|
1561
1578
|
// src/components/month-view/useMonthResize.ts
|
|
1562
|
-
function
|
|
1563
|
-
let { days: t, viewportRef: n, dateUtils: r, eventMap: i, disabled: a, getIsDayDisabled: o, onEventChange: s } = e, [l, u, d] =
|
|
1579
|
+
function mn(e) {
|
|
1580
|
+
let { days: t, viewportRef: n, dateUtils: r, eventMap: i, disabled: a, getIsDayDisabled: o, onEventChange: s } = e, [l, u, d] = pt(null), { addGlobalListener: f, removeAllGlobalListeners: p } = at(), m = q((e = !0) => {
|
|
1564
1581
|
let t = d.current;
|
|
1565
1582
|
t && (p(), u(null), e && t.result && s(t.key, t.result.date, t.result.info));
|
|
1566
1583
|
}), h = q((e) => {
|
|
@@ -1572,7 +1589,7 @@ function pn(e) {
|
|
|
1572
1589
|
result: null
|
|
1573
1590
|
}), f(document, "keydown", h, !0));
|
|
1574
1591
|
}), _ = q((e, a) => {
|
|
1575
|
-
let s = d.current, c = s && i.get(s.key), l = t[
|
|
1592
|
+
let s = d.current, c = s && i.get(s.key), l = t[Wt(n.current, e, a)];
|
|
1576
1593
|
s && c && l && !o?.(l) && u({
|
|
1577
1594
|
...s,
|
|
1578
1595
|
result: xe(r, c, s.edge, l)
|
|
@@ -1606,15 +1623,15 @@ function pn(e) {
|
|
|
1606
1623
|
};
|
|
1607
1624
|
}
|
|
1608
1625
|
// src/components/month-view/MonthView.tsx
|
|
1609
|
-
var
|
|
1610
|
-
function
|
|
1626
|
+
var hn = [];
|
|
1627
|
+
function gn(e) {
|
|
1611
1628
|
let { className: t, style: n, ...r } = e, { viewValue: i, eventMap: a, startWeek: o, disabled: s, getIsDayDisabled: l, onEventChange: d } = J(), f = K();
|
|
1612
|
-
|
|
1629
|
+
gt();
|
|
1613
1630
|
let p = u(null), m = c(() => L(f, i, o), [
|
|
1614
1631
|
f,
|
|
1615
1632
|
o,
|
|
1616
1633
|
i
|
|
1617
|
-
]), h = c(() =>
|
|
1634
|
+
]), h = c(() => Ut(m), [m]), g = c(() => de(f, o), [f, o]), _ = mn({
|
|
1618
1635
|
days: m,
|
|
1619
1636
|
viewportRef: p,
|
|
1620
1637
|
dateUtils: f,
|
|
@@ -1622,7 +1639,7 @@ function hn(e) {
|
|
|
1622
1639
|
disabled: s,
|
|
1623
1640
|
getIsDayDisabled: l,
|
|
1624
1641
|
onEventChange: d
|
|
1625
|
-
}), v =
|
|
1642
|
+
}), v = pn(p, 3), y = c(() => h.map((e) => x(a, f, e, v)), [
|
|
1626
1643
|
f,
|
|
1627
1644
|
a,
|
|
1628
1645
|
v,
|
|
@@ -1635,12 +1652,12 @@ function hn(e) {
|
|
|
1635
1652
|
_.eventMap,
|
|
1636
1653
|
h
|
|
1637
1654
|
]), S = c(() => ({ viewportRef: p }), []);
|
|
1638
|
-
return /* @__PURE__ */ G(
|
|
1655
|
+
return /* @__PURE__ */ G(Ft.Provider, {
|
|
1639
1656
|
value: S,
|
|
1640
1657
|
children: [/* @__PURE__ */ G("div", {
|
|
1641
1658
|
...r,
|
|
1642
1659
|
className: D(t, Z.root, { [Z.root_isResizing]: _.resizingKey !== void 0 }),
|
|
1643
|
-
style:
|
|
1660
|
+
style: Ht({ "--ww-month-lanes": v }, n),
|
|
1644
1661
|
children: [/* @__PURE__ */ W("div", {
|
|
1645
1662
|
className: Z.root__head,
|
|
1646
1663
|
children: g.map((e) => /* @__PURE__ */ W("div", {
|
|
@@ -1652,29 +1669,29 @@ function hn(e) {
|
|
|
1652
1669
|
children: /* @__PURE__ */ W("div", {
|
|
1653
1670
|
ref: p,
|
|
1654
1671
|
className: Z.root__viewport,
|
|
1655
|
-
children: h.map((e, t) => /* @__PURE__ */ W(
|
|
1672
|
+
children: h.map((e, t) => /* @__PURE__ */ W(fn, {
|
|
1656
1673
|
days: e,
|
|
1657
1674
|
firstDayIndex: t * 7,
|
|
1658
1675
|
layout: b[t],
|
|
1659
|
-
sourceBars: _.resizingKey === void 0 ?
|
|
1676
|
+
sourceBars: _.resizingKey === void 0 ? hn : y[t].bars.filter((e) => e.key === _.resizingKey),
|
|
1660
1677
|
lanes: v,
|
|
1661
1678
|
resizingKey: _.resizingKey,
|
|
1662
1679
|
resize: _.actions
|
|
1663
1680
|
}, f.toMillis(e[0])))
|
|
1664
1681
|
})
|
|
1665
1682
|
})]
|
|
1666
|
-
}), /* @__PURE__ */ W(
|
|
1683
|
+
}), /* @__PURE__ */ W(Vt, {
|
|
1667
1684
|
className: Z.root__dragOverlay,
|
|
1668
1685
|
showPreview: !1
|
|
1669
1686
|
})]
|
|
1670
1687
|
});
|
|
1671
1688
|
}
|
|
1672
1689
|
// src/hooks/useEventResize.ts
|
|
1673
|
-
var
|
|
1674
|
-
function
|
|
1690
|
+
var _n = 1440;
|
|
1691
|
+
function vn(e) {
|
|
1675
1692
|
let { days: t, viewportRef: r, dateUtils: a, bounds: o, timeStep: s, preventOutBoundsChanges: l } = e, [f, p] = d(null), m = u(null), h = u(e);
|
|
1676
1693
|
h.current = e;
|
|
1677
|
-
let g = o.hideMinMaxTime ? o.hourMin * 60 : 0, _ = o.hideMinMaxTime ? (o.hourMax - o.hourMin) * 60 :
|
|
1694
|
+
let g = o.hideMinMaxTime ? o.hourMin * 60 : 0, _ = o.hideMinMaxTime ? (o.hourMax - o.hourMin) * 60 : _n, v = n((e, n) => {
|
|
1678
1695
|
let i = m.current, c = r.current;
|
|
1679
1696
|
if (!i || !c) return;
|
|
1680
1697
|
i.x = e, i.y = n;
|
|
@@ -1739,9 +1756,9 @@ function _n(e) {
|
|
|
1739
1756
|
if (m.current = null, p(null), !e) return;
|
|
1740
1757
|
let [n, r] = e.range;
|
|
1741
1758
|
if (n === e.original[0] && r === e.original[1]) return;
|
|
1742
|
-
let i = Math.floor(n /
|
|
1743
|
-
h.current.onEventChange(e.key, M(a, t[0], i *
|
|
1744
|
-
from: n - i *
|
|
1759
|
+
let i = Math.floor(n / _n);
|
|
1760
|
+
h.current.onEventChange(e.key, M(a, t[0], i * _n), {
|
|
1761
|
+
from: n - i * _n,
|
|
1745
1762
|
duration: r - n
|
|
1746
1763
|
});
|
|
1747
1764
|
}
|
|
@@ -1750,39 +1767,35 @@ function _n(e) {
|
|
|
1750
1767
|
t,
|
|
1751
1768
|
v
|
|
1752
1769
|
]), b = f !== null;
|
|
1753
|
-
i(() => {
|
|
1770
|
+
return i(() => {
|
|
1754
1771
|
if (!b) return;
|
|
1755
1772
|
let e = () => m.current && v(m.current.x, m.current.y);
|
|
1756
1773
|
return document.addEventListener("scroll", e, !0), () => document.removeEventListener("scroll", e, !0);
|
|
1757
|
-
}, [b, v])
|
|
1758
|
-
let x = f?.blocked ?? !1;
|
|
1759
|
-
return i(() => {
|
|
1760
|
-
if (x) return document.documentElement.classList.add("ww-cursor-not-allowed"), () => document.documentElement.classList.remove("ww-cursor-not-allowed");
|
|
1761
|
-
}, [x]), {
|
|
1774
|
+
}, [b, v]), et(f?.blocked ? "not-allowed" : null), {
|
|
1762
1775
|
state: f,
|
|
1763
1776
|
actions: y,
|
|
1764
1777
|
previewOf: (e) => {
|
|
1765
|
-
let n = Math.floor(e[0] /
|
|
1778
|
+
let n = Math.floor(e[0] / _n);
|
|
1766
1779
|
return {
|
|
1767
|
-
date: M(a, t[0], n *
|
|
1768
|
-
top: e[0] - n *
|
|
1780
|
+
date: M(a, t[0], n * _n),
|
|
1781
|
+
top: e[0] - n * _n - g,
|
|
1769
1782
|
duration: e[1] - e[0]
|
|
1770
1783
|
};
|
|
1771
1784
|
}
|
|
1772
1785
|
};
|
|
1773
1786
|
}
|
|
1774
1787
|
// src/contexts/DayWeekViewContext.ts
|
|
1775
|
-
var
|
|
1776
|
-
U && (
|
|
1777
|
-
function
|
|
1778
|
-
let e = r(
|
|
1788
|
+
var yn = e(void 0);
|
|
1789
|
+
U && (yn.displayName = "DayWeekViewContext");
|
|
1790
|
+
function bn() {
|
|
1791
|
+
let e = r(yn);
|
|
1779
1792
|
if (!e) throw Error("DayWeekViewContext is required");
|
|
1780
1793
|
return e;
|
|
1781
1794
|
}
|
|
1782
1795
|
// src/hooks/useTimeOffset.ts
|
|
1783
|
-
function
|
|
1796
|
+
function xn(e = !0, t = 6e4) {
|
|
1784
1797
|
let { hideMinMaxTime: n, hourMin: r, hourMax: i } = J(), a = K(), [o, s] = d(null);
|
|
1785
|
-
return
|
|
1798
|
+
return mt(() => s(Date.now()), t, e), c(() => o === null ? [0, !0] : B(a, {
|
|
1786
1799
|
hourMin: r,
|
|
1787
1800
|
hourMax: i,
|
|
1788
1801
|
hideMinMaxTime: n
|
|
@@ -1794,7 +1807,7 @@ function bn(e = !0, t = 6e4) {
|
|
|
1794
1807
|
n
|
|
1795
1808
|
]);
|
|
1796
1809
|
}
|
|
1797
|
-
var
|
|
1810
|
+
var Sn = {
|
|
1798
1811
|
root: "_root_1l2ji_1",
|
|
1799
1812
|
root_timeLimit: "_root_timeLimit_1l2ji_8",
|
|
1800
1813
|
root_isToday: "_root_isToday_1l2ji_8",
|
|
@@ -1805,11 +1818,11 @@ var xn = {
|
|
|
1805
1818
|
root_offLimits: "_root_offLimits_1l2ji_121"
|
|
1806
1819
|
};
|
|
1807
1820
|
// src/components/day-week-drawer/DayWeekDrawer.tsx
|
|
1808
|
-
function
|
|
1809
|
-
let { ref: t, targetDate: n, children: r, ...a } = e, { onEventChange: o, onEventCreate: s, getIsDayDisabled: l, pointerPreviewRenderer: d, eventMap: f, ...p } = J(), { viewportRef: m, getTimeFrame: h, pxPerMinute: g } =
|
|
1821
|
+
function Cn(e) {
|
|
1822
|
+
let { ref: t, targetDate: n, children: r, ...a } = e, { onEventChange: o, onEventCreate: s, getIsDayDisabled: l, pointerPreviewRenderer: d, eventMap: f, ...p } = J(), { viewportRef: m, getTimeFrame: h, pxPerMinute: g } = bn(), { hideMinMaxTime: _, preventOutBoundsChanges: v, timeStep: y, hourMin: b, hourMax: x, disabled: S } = p, w = K(), { isBefore: T, isToday: E } = w, O = y * g, k = (e) => wn(e, g, y), ee = (e) => h(e).map((e) => e * g), j = u(null), M = u(null), { register: N, getTransform: P } = Ne(({ registerDropTarget: e, getTransform: t }) => ({
|
|
1810
1823
|
register: e,
|
|
1811
1824
|
getTransform: t
|
|
1812
|
-
})), F =
|
|
1825
|
+
})), F = gt(), I = c(() => {
|
|
1813
1826
|
let e = E(n);
|
|
1814
1827
|
return {
|
|
1815
1828
|
isToday: e,
|
|
@@ -1820,7 +1833,7 @@ function Sn(e) {
|
|
|
1820
1833
|
E,
|
|
1821
1834
|
n,
|
|
1822
1835
|
F
|
|
1823
|
-
]), [{ isActive: L, transform: R }, z, { scrollAdjustmentActiveNodeRect: B }] =
|
|
1836
|
+
]), [{ isActive: L, transform: R }, z, { scrollAdjustmentActiveNodeRect: B }] = sn({
|
|
1824
1837
|
activeNode: j.current,
|
|
1825
1838
|
containerNode: j.current?.parentElement,
|
|
1826
1839
|
modifiers: [
|
|
@@ -1839,7 +1852,7 @@ function Sn(e) {
|
|
|
1839
1852
|
C,
|
|
1840
1853
|
oe(O)
|
|
1841
1854
|
]
|
|
1842
|
-
}), [te, V] =
|
|
1855
|
+
}), [te, V] = xn(I.isToday);
|
|
1843
1856
|
i(() => {
|
|
1844
1857
|
let e = j.current;
|
|
1845
1858
|
if (e) return N(e, {
|
|
@@ -1848,7 +1861,7 @@ function Sn(e) {
|
|
|
1848
1861
|
let [t] = await Promise.all(e.items.filter((e) => e.kind === "text" && e.types.has("event") && "getText" in e).map(async (e) => {
|
|
1849
1862
|
let t = await e.getText("event");
|
|
1850
1863
|
return JSON.parse(t);
|
|
1851
|
-
})), r = P(), i =
|
|
1864
|
+
})), r = P(), i = wn(r.top, g, y), a = wn(r.height, g, y), s = _ ? b * 60 : 0, c = f.get(t.key), l = c ? ke(w, c.date, c.date) : 0;
|
|
1852
1865
|
if (c && l + c.duration > 1440) {
|
|
1853
1866
|
if (v && (b > 0 || x < 24)) {
|
|
1854
1867
|
z.stop({
|
|
@@ -1904,7 +1917,7 @@ function Sn(e) {
|
|
|
1904
1917
|
y,
|
|
1905
1918
|
I
|
|
1906
1919
|
]);
|
|
1907
|
-
let { listeners: ne } =
|
|
1920
|
+
let { listeners: ne } = lt({
|
|
1908
1921
|
distance: Math.max(Math.min(5, y), 1),
|
|
1909
1922
|
onMoveStart: (e) => {
|
|
1910
1923
|
if (!S) {
|
|
@@ -1952,7 +1965,7 @@ function Sn(e) {
|
|
|
1952
1965
|
duration: k(R.height)
|
|
1953
1966
|
}));
|
|
1954
1967
|
}
|
|
1955
|
-
}), H =
|
|
1968
|
+
}), H = ct(j, t), re = A(w, te, {
|
|
1956
1969
|
hourMin: b,
|
|
1957
1970
|
hideMinMaxTime: _
|
|
1958
1971
|
}), ie = () => d.current?.(n, k(R.top), k(R.height));
|
|
@@ -1960,35 +1973,35 @@ function Sn(e) {
|
|
|
1960
1973
|
...a,
|
|
1961
1974
|
...ne,
|
|
1962
1975
|
ref: H,
|
|
1963
|
-
className: D(a.className,
|
|
1964
|
-
[
|
|
1965
|
-
[
|
|
1966
|
-
[
|
|
1967
|
-
[
|
|
1976
|
+
className: D(a.className, Sn.root, {
|
|
1977
|
+
[Sn.root_timeLimit]: v,
|
|
1978
|
+
[Sn.root_isToday]: I.isToday,
|
|
1979
|
+
[Sn.root_isPast]: I.isPast,
|
|
1980
|
+
[Sn.root_offLimits]: V
|
|
1968
1981
|
}),
|
|
1969
1982
|
style: {
|
|
1970
1983
|
...a.style,
|
|
1971
1984
|
"--offset": te * g
|
|
1972
1985
|
},
|
|
1973
1986
|
children: [
|
|
1974
|
-
I.isToday && !V && /* @__PURE__ */ W(
|
|
1987
|
+
I.isToday && !V && /* @__PURE__ */ W(Dt, {
|
|
1975
1988
|
container: m.current,
|
|
1976
1989
|
children: /* @__PURE__ */ W("span", {
|
|
1977
1990
|
tabIndex: -1,
|
|
1978
|
-
className:
|
|
1991
|
+
className: Sn.root__timeLine,
|
|
1979
1992
|
"data-now": re,
|
|
1980
1993
|
style: { "--offset": te * g }
|
|
1981
1994
|
})
|
|
1982
1995
|
}),
|
|
1983
1996
|
/* @__PURE__ */ W("div", {
|
|
1984
1997
|
ref: M,
|
|
1985
|
-
className:
|
|
1998
|
+
className: Sn.root__container,
|
|
1986
1999
|
children: r
|
|
1987
2000
|
}),
|
|
1988
2001
|
L && /* @__PURE__ */ G(ze, { children: [/* @__PURE__ */ W("div", {
|
|
1989
|
-
className:
|
|
2002
|
+
className: Sn.root__spotlight,
|
|
1990
2003
|
style: R ? { ...R } : void 0
|
|
1991
|
-
}), /* @__PURE__ */ W(
|
|
2004
|
+
}), /* @__PURE__ */ W(Rt, {
|
|
1992
2005
|
coordinates: {
|
|
1993
2006
|
x: R.x,
|
|
1994
2007
|
y: R.y
|
|
@@ -1998,11 +2011,11 @@ function Sn(e) {
|
|
|
1998
2011
|
]
|
|
1999
2012
|
});
|
|
2000
2013
|
}
|
|
2001
|
-
function
|
|
2014
|
+
function wn(e, t, n) {
|
|
2002
2015
|
return Math.round(e / t / n) * n;
|
|
2003
2016
|
}
|
|
2004
2017
|
// src/hooks/useAbsEventRect.ts
|
|
2005
|
-
function
|
|
2018
|
+
function Tn(e, t) {
|
|
2006
2019
|
let [n, r] = d(null);
|
|
2007
2020
|
return Ke(() => {
|
|
2008
2021
|
let n = e.current, i = e.current?.parentElement;
|
|
@@ -2018,8 +2031,8 @@ function wn(e, t) {
|
|
|
2018
2031
|
}, [e, ...Object.values(t)]), n;
|
|
2019
2032
|
}
|
|
2020
2033
|
// src/hooks/useCanResizeEvent.ts
|
|
2021
|
-
function
|
|
2022
|
-
let [n, r] = d(!0), { preventOutBoundsChanges: i } = J(), { isBefore: a, isToday: o } = K(), { getTimeFrame: s } =
|
|
2034
|
+
function En(e, t) {
|
|
2035
|
+
let [n, r] = d(!0), { preventOutBoundsChanges: i } = J(), { isBefore: a, isToday: o } = K(), { getTimeFrame: s } = bn();
|
|
2023
2036
|
return Ke(() => {
|
|
2024
2037
|
if (t && i) {
|
|
2025
2038
|
if (a(e) && !o(e)) r(!1);
|
|
@@ -2038,20 +2051,20 @@ function Tn(e, t) {
|
|
|
2038
2051
|
]), n;
|
|
2039
2052
|
}
|
|
2040
2053
|
var Q = {
|
|
2041
|
-
root: "
|
|
2042
|
-
root_isDragging: "
|
|
2043
|
-
root__resizeTop: "
|
|
2044
|
-
root__resizeBottom: "
|
|
2045
|
-
root_isResizing: "
|
|
2046
|
-
root_isDisabled: "
|
|
2047
|
-
root__container: "
|
|
2048
|
-
root__dragPreview: "
|
|
2049
|
-
root_isPreview: "
|
|
2050
|
-
root_isResizeSource: "
|
|
2054
|
+
root: "_root_d2kfg_1",
|
|
2055
|
+
root_isDragging: "_root_isDragging_d2kfg_10",
|
|
2056
|
+
root__resizeTop: "_root__resizeTop_d2kfg_10",
|
|
2057
|
+
root__resizeBottom: "_root__resizeBottom_d2kfg_12",
|
|
2058
|
+
root_isResizing: "_root_isResizing_d2kfg_14",
|
|
2059
|
+
root_isDisabled: "_root_isDisabled_d2kfg_41",
|
|
2060
|
+
root__container: "_root__container_d2kfg_57",
|
|
2061
|
+
root__dragPreview: "_root__dragPreview_d2kfg_104",
|
|
2062
|
+
root_isPreview: "_root_isPreview_d2kfg_110",
|
|
2063
|
+
root_isResizeSource: "_root_isResizeSource_d2kfg_115"
|
|
2051
2064
|
};
|
|
2052
2065
|
// src/components/day-week-event/DayWeekEvent.tsx
|
|
2053
|
-
function
|
|
2054
|
-
let { ref: t, eventData: n, children: r, ...a } = e, { eventMap: o, ...s } = J(), c = K(), { timeStep: l, preventOutBoundsChanges: d, disabled: f } = s, p = u(null), m = u(null), h = u(null), { viewportRef: g, getTimeFrame: _, pxPerMinute: v, resize: y, resizing: b } =
|
|
2066
|
+
function Dn(e) {
|
|
2067
|
+
let { ref: t, eventData: n, children: r, ...a } = e, { eventMap: o, ...s } = J(), c = K(), { timeStep: l, preventOutBoundsChanges: d, disabled: f } = s, p = u(null), m = u(null), h = u(null), { viewportRef: g, getTimeFrame: _, pxPerMinute: v, resize: y, resizing: b } = bn(), x = l * v, S = Tn(p, n.rect), C = En(o.get(n.key)?.date ?? n.date, S), { attributes: w, isDragging: T, overElement: E, overData: O, register: k, setOverlayTransform: ee } = Ne(({ registerDragSource: e, draggable: t, droppable: n, setTransform: r, isActive: i }) => {
|
|
2055
2068
|
let a = i(p.current), [o, s] = a ? [...n.dropTargets].pop() ?? [null, null] : [null, null];
|
|
2056
2069
|
return {
|
|
2057
2070
|
attributes: t.attributes,
|
|
@@ -2061,8 +2074,7 @@ function En(e) {
|
|
|
2061
2074
|
register: e,
|
|
2062
2075
|
setOverlayTransform: r
|
|
2063
2076
|
};
|
|
2064
|
-
}), A =
|
|
2065
|
-
autoScrollEnabled: !T,
|
|
2077
|
+
}), A = Zt(T ? E : null), [{ isActive: j, transform: M, context: N }, P] = sn({
|
|
2066
2078
|
activeNode: (e) => e === "overlay" ? p.current : e === "top" ? m.current : h.current,
|
|
2067
2079
|
containerNode: (e) => e === "overlay" ? g.current : p.current?.parentElement?.parentElement ?? null,
|
|
2068
2080
|
modifiers: [
|
|
@@ -2077,7 +2089,7 @@ function En(e) {
|
|
|
2077
2089
|
let [n, r] = _(O.date).map((e) => Math.ceil(e / l) * x);
|
|
2078
2090
|
return e.top < n && (e.top = n), e.top + e.height > r && (e.top = r - e.height), e;
|
|
2079
2091
|
},
|
|
2080
|
-
|
|
2092
|
+
On(x)
|
|
2081
2093
|
]
|
|
2082
2094
|
}), F = ve(() => y.end(), (e) => {
|
|
2083
2095
|
P.stop({
|
|
@@ -2096,8 +2108,8 @@ function En(e) {
|
|
|
2096
2108
|
}), y.move(e.clientX, e.clientY);
|
|
2097
2109
|
},
|
|
2098
2110
|
onMoveEnd: F
|
|
2099
|
-
}), { listeners: L } =
|
|
2100
|
-
N === "overlay" && ee(e);
|
|
2111
|
+
}), { listeners: L } = lt(I("bottom")), { listeners: R } = lt(I("top")), z = ct(p, t), B = j && T && N === "overlay", te = b?.key === n.key, V = q((e) => {
|
|
2112
|
+
N === "overlay" && E && ee(e);
|
|
2101
2113
|
});
|
|
2102
2114
|
i(() => {
|
|
2103
2115
|
V(M);
|
|
@@ -2178,14 +2190,14 @@ function En(e) {
|
|
|
2178
2190
|
]
|
|
2179
2191
|
}) });
|
|
2180
2192
|
}
|
|
2181
|
-
function
|
|
2193
|
+
function On(e) {
|
|
2182
2194
|
return (t) => {
|
|
2183
2195
|
let n = [oe(e)];
|
|
2184
2196
|
return t.context === "overlay" && n.push(S), y(n, t);
|
|
2185
2197
|
};
|
|
2186
2198
|
}
|
|
2187
2199
|
// src/components/day-week-event/DayWeekEventPreview.tsx
|
|
2188
|
-
function
|
|
2200
|
+
function kn({ part: e, timelineMinutes: t, children: n }) {
|
|
2189
2201
|
let r = (e) => `${e / t * 100}%`;
|
|
2190
2202
|
return /* @__PURE__ */ W("div", {
|
|
2191
2203
|
"aria-hidden": "true",
|
|
@@ -2205,30 +2217,30 @@ function On({ part: e, timelineMinutes: t, children: n }) {
|
|
|
2205
2217
|
});
|
|
2206
2218
|
}
|
|
2207
2219
|
var $ = {
|
|
2208
|
-
root: "
|
|
2209
|
-
root_scrollable: "
|
|
2210
|
-
root__body: "
|
|
2211
|
-
root__head: "
|
|
2212
|
-
root__main: "
|
|
2213
|
-
root__viewport: "
|
|
2214
|
-
root__column: "
|
|
2215
|
-
root__headerCell: "
|
|
2216
|
-
root__headerCellDay: "
|
|
2217
|
-
root__headerCellLabel: "
|
|
2218
|
-
root__headerCellName: "
|
|
2219
|
-
root__headerCellToday: "
|
|
2220
|
-
root__row: "
|
|
2221
|
-
root__timeStep: "
|
|
2222
|
-
root__timeStep_overTime: "
|
|
2223
|
-
root__rowHeadTime: "
|
|
2224
|
-
root__hiddenEventsLayer: "
|
|
2225
|
-
root__hiddenEventsColumn: "
|
|
2226
|
-
root__hiddenEvents: "
|
|
2227
|
-
root__hiddenEventsIcon: "
|
|
2220
|
+
root: "_root_19kk1_1",
|
|
2221
|
+
root_scrollable: "_root_scrollable_19kk1_11",
|
|
2222
|
+
root__body: "_root__body_19kk1_11",
|
|
2223
|
+
root__head: "_root__head_19kk1_15",
|
|
2224
|
+
root__main: "_root__main_19kk1_30",
|
|
2225
|
+
root__viewport: "_root__viewport_19kk1_44",
|
|
2226
|
+
root__column: "_root__column_19kk1_52",
|
|
2227
|
+
root__headerCell: "_root__headerCell_19kk1_77",
|
|
2228
|
+
root__headerCellDay: "_root__headerCellDay_19kk1_104",
|
|
2229
|
+
root__headerCellLabel: "_root__headerCellLabel_19kk1_111",
|
|
2230
|
+
root__headerCellName: "_root__headerCellName_19kk1_118",
|
|
2231
|
+
root__headerCellToday: "_root__headerCellToday_19kk1_125",
|
|
2232
|
+
root__row: "_root__row_19kk1_140",
|
|
2233
|
+
root__timeStep: "_root__timeStep_19kk1_162",
|
|
2234
|
+
root__timeStep_overTime: "_root__timeStep_overTime_19kk1_174",
|
|
2235
|
+
root__rowHeadTime: "_root__rowHeadTime_19kk1_178",
|
|
2236
|
+
root__hiddenEventsLayer: "_root__hiddenEventsLayer_19kk1_194",
|
|
2237
|
+
root__hiddenEventsColumn: "_root__hiddenEventsColumn_19kk1_207",
|
|
2238
|
+
root__hiddenEvents: "_root__hiddenEvents_19kk1_194",
|
|
2239
|
+
root__hiddenEventsIcon: "_root__hiddenEventsIcon_19kk1_254"
|
|
2228
2240
|
};
|
|
2229
2241
|
// src/components/day-week-view/HiddenEvents.tsx
|
|
2230
|
-
function
|
|
2231
|
-
let { hourMin: r, hideMinMaxTime: a, size: o } = J(), s = K(), l = Ge(), { addGlobalListener: u, removeGlobalListener: f } =
|
|
2242
|
+
function An({ scrollerRef: e, columns: t, rowHeight: n }) {
|
|
2243
|
+
let { hourMin: r, hideMinMaxTime: a, size: o } = J(), s = K(), l = Ge(), { addGlobalListener: u, removeGlobalListener: f } = at(), [p, m] = d(null), h = n / 60, g = q(() => {
|
|
2232
2244
|
let t = e.current;
|
|
2233
2245
|
if (!t) return;
|
|
2234
2246
|
let n = {
|
|
@@ -2275,7 +2287,7 @@ function kn({ scrollerRef: e, columns: t, rowHeight: n }) {
|
|
|
2275
2287
|
"data-direction": t,
|
|
2276
2288
|
"aria-label": t === "above" ? l.earlier(e.length) : l.later(e.length),
|
|
2277
2289
|
onClick: () => y(n),
|
|
2278
|
-
children: [/* @__PURE__ */ W(
|
|
2290
|
+
children: [/* @__PURE__ */ W(xt, {
|
|
2279
2291
|
"aria-hidden": "true",
|
|
2280
2292
|
className: $.root__hiddenEventsIcon
|
|
2281
2293
|
}), i]
|
|
@@ -2290,7 +2302,7 @@ function kn({ scrollerRef: e, columns: t, rowHeight: n }) {
|
|
|
2290
2302
|
});
|
|
2291
2303
|
}
|
|
2292
2304
|
// src/components/day-week-view/useTimeColumnWidth.ts
|
|
2293
|
-
function
|
|
2305
|
+
function jn(e, t, n) {
|
|
2294
2306
|
let [r, i] = d();
|
|
2295
2307
|
return Ke(() => {
|
|
2296
2308
|
let t = !1, r = () => {
|
|
@@ -2316,13 +2328,13 @@ function An(e, t, n) {
|
|
|
2316
2328
|
]), r;
|
|
2317
2329
|
}
|
|
2318
2330
|
// src/components/day-week-view/DayWeekView.tsx
|
|
2319
|
-
var
|
|
2331
|
+
var Mn = {
|
|
2320
2332
|
regular: 64,
|
|
2321
2333
|
compact: 44,
|
|
2322
2334
|
narrow: 40
|
|
2323
2335
|
};
|
|
2324
|
-
function
|
|
2325
|
-
let { viewValue: r, hourMin: i, hourMax: a, view: o, eventMap: s, preventOutBoundsChanges: l, eventRenderer: d, timeStep: f, scrollable: p, size: h, hideMinMaxTime: g, disabled: _, getIsDayDisabled: v, onEventChange: y, pointerPreviewRenderer: x } = J(), S = K(), C = Ge(), { getMonthDay: w, getWeekDay: E, isToday: O, weekDayShortName: k } = S, ee =
|
|
2336
|
+
function Nn({ rowHeight: e, ...t }) {
|
|
2337
|
+
let { viewValue: r, hourMin: i, hourMax: a, view: o, eventMap: s, preventOutBoundsChanges: l, eventRenderer: d, timeStep: f, scrollable: p, size: h, hideMinMaxTime: g, disabled: _, getIsDayDisabled: v, onEventChange: y, pointerPreviewRenderer: x } = J(), S = K(), C = Ge(), { getMonthDay: w, getWeekDay: E, isToday: O, weekDayShortName: k } = S, ee = gt(), A = e ?? m[h], j = u(null), M = u(null), N = c(() => T(S, f, {
|
|
2326
2338
|
hourMin: i,
|
|
2327
2339
|
hourMax: a,
|
|
2328
2340
|
hideMinMaxTime: g
|
|
@@ -2333,7 +2345,7 @@ function Mn({ rowHeight: e, ...t }) {
|
|
|
2333
2345
|
a,
|
|
2334
2346
|
g,
|
|
2335
2347
|
l
|
|
2336
|
-
]), P =
|
|
2348
|
+
]), P = jn(j, c(() => N.map(({ time: e }) => e), [N]), Mn[h]), F = c(() => ue(S, o, r), [
|
|
2337
2349
|
S,
|
|
2338
2350
|
o,
|
|
2339
2351
|
r
|
|
@@ -2351,7 +2363,7 @@ function Mn({ rowHeight: e, ...t }) {
|
|
|
2351
2363
|
N.length,
|
|
2352
2364
|
F,
|
|
2353
2365
|
I
|
|
2354
|
-
]), R = c(() => L.map(({ events: e }) => e), [L]), { state: z, actions: B, previewOf: te } =
|
|
2366
|
+
]), R = c(() => L.map(({ events: e }) => e), [L]), { state: z, actions: B, previewOf: te } = vn({
|
|
2355
2367
|
days: F,
|
|
2356
2368
|
viewportRef: j,
|
|
2357
2369
|
dateUtils: S,
|
|
@@ -2395,7 +2407,7 @@ function Mn({ rowHeight: e, ...t }) {
|
|
|
2395
2407
|
E,
|
|
2396
2408
|
O,
|
|
2397
2409
|
k
|
|
2398
|
-
]), ie =
|
|
2410
|
+
]), ie = ft(), oe = t, se = $.root__head, ce = $.root__body, le = $.root__viewport, de = $.root__column, fe = $.root__headerCell, U = $.root__headerCellDay, pe = $.root__row, me = $.root__rowHeadTime, he = $.root__timeStep, ge = ct(j), _e = c(() => ({
|
|
2399
2411
|
viewportRef: j,
|
|
2400
2412
|
getTimeFrame: H,
|
|
2401
2413
|
pxPerMinute: A / 60,
|
|
@@ -2407,7 +2419,7 @@ function Mn({ rowHeight: e, ...t }) {
|
|
|
2407
2419
|
A,
|
|
2408
2420
|
B,
|
|
2409
2421
|
z
|
|
2410
|
-
]), ve = c(() => ({ viewportRef: j }), [j]), ye = (e, t) => /* @__PURE__ */ W(
|
|
2422
|
+
]), ve = c(() => ({ viewportRef: j }), [j]), ye = (e, t) => /* @__PURE__ */ W(Dn, {
|
|
2411
2423
|
"data-idx": t,
|
|
2412
2424
|
eventData: e,
|
|
2413
2425
|
children: d.current?.(e.value, o, {
|
|
@@ -2415,9 +2427,9 @@ function Mn({ rowHeight: e, ...t }) {
|
|
|
2415
2427
|
isEnd: e.isEnd
|
|
2416
2428
|
})
|
|
2417
2429
|
}, e.key);
|
|
2418
|
-
return /* @__PURE__ */ W(
|
|
2430
|
+
return /* @__PURE__ */ W(yn.Provider, {
|
|
2419
2431
|
value: _e,
|
|
2420
|
-
children: /* @__PURE__ */ W(
|
|
2432
|
+
children: /* @__PURE__ */ W(Ft.Provider, {
|
|
2421
2433
|
value: ve,
|
|
2422
2434
|
children: /* @__PURE__ */ G(ze, { children: [
|
|
2423
2435
|
/* @__PURE__ */ G("div", {
|
|
@@ -2476,10 +2488,10 @@ function Mn({ rowHeight: e, ...t }) {
|
|
|
2476
2488
|
className: de,
|
|
2477
2489
|
"data-day-index": t,
|
|
2478
2490
|
...e.attributes,
|
|
2479
|
-
children: /* @__PURE__ */ G(
|
|
2491
|
+
children: /* @__PURE__ */ G(Cn, {
|
|
2480
2492
|
id: `${e.weekDayNumber}`,
|
|
2481
2493
|
targetDate: e.targetDate,
|
|
2482
|
-
children: [e.events.map((e, t) => ye(e, t)), V.filter((e) => e.dayIndex === t).map((e) => /* @__PURE__ */ W(
|
|
2494
|
+
children: [e.events.map((e, t) => ye(e, t)), V.filter((e) => e.dayIndex === t).map((e) => /* @__PURE__ */ W(kn, {
|
|
2483
2495
|
part: e,
|
|
2484
2496
|
timelineMinutes: N.length * 60,
|
|
2485
2497
|
children: ne === void 0 ? null : d.current?.(ne, o, {
|
|
@@ -2490,15 +2502,15 @@ function Mn({ rowHeight: e, ...t }) {
|
|
|
2490
2502
|
})
|
|
2491
2503
|
}, e.weekDayNumber))]
|
|
2492
2504
|
})
|
|
2493
|
-
}), p && /* @__PURE__ */ W(
|
|
2505
|
+
}), p && /* @__PURE__ */ W(An, {
|
|
2494
2506
|
scrollerRef: M,
|
|
2495
2507
|
columns: R,
|
|
2496
2508
|
rowHeight: A
|
|
2497
2509
|
})]
|
|
2498
2510
|
})]
|
|
2499
2511
|
}),
|
|
2500
|
-
/* @__PURE__ */ W(
|
|
2501
|
-
z && !z.blocked && /* @__PURE__ */ W(
|
|
2512
|
+
/* @__PURE__ */ W(Vt, { pxPerMinute: A / 60 }),
|
|
2513
|
+
z && !z.blocked && /* @__PURE__ */ W(Rt, {
|
|
2502
2514
|
coordinates: {
|
|
2503
2515
|
x: z.x,
|
|
2504
2516
|
y: z.y
|
|
@@ -2512,14 +2524,14 @@ function Mn({ rowHeight: e, ...t }) {
|
|
|
2512
2524
|
})
|
|
2513
2525
|
});
|
|
2514
2526
|
}
|
|
2515
|
-
var
|
|
2516
|
-
root: "
|
|
2517
|
-
root__head: "
|
|
2518
|
-
root__body: "
|
|
2519
|
-
root__body_readonly: "
|
|
2527
|
+
var Pn = {
|
|
2528
|
+
root: "_root_uggip_2",
|
|
2529
|
+
root__head: "_root__head_uggip_22",
|
|
2530
|
+
root__body: "_root__body_uggip_26",
|
|
2531
|
+
root__body_readonly: "_root__body_readonly_uggip_35"
|
|
2520
2532
|
};
|
|
2521
2533
|
// src/Calendar.tsx
|
|
2522
|
-
function
|
|
2534
|
+
function Fn(e) {
|
|
2523
2535
|
let { ref: t, disabled: n = !1, children: r, hideMinMaxTime: a = !1, timeFrame: o, startWeek: s, timeStep: l = 15, items: d, onEventCreate: f, onEventChange: p, onEventDelete: m, onEventEdit: h, eventTimeFrameResolver: g, eventKeyResolver: _, getIsDayDisabled: v, pointerPreviewFormat: y, scrollable: b = !1, view: x, defaultView: S, viewValue: C, defaultViewValue: T, onChangeView: E, onChangeViewValue: O, ...k } = e, { hourMax: ee, hourMin: A } = {
|
|
2524
2536
|
hourMin: 0,
|
|
2525
2537
|
hourMax: 24,
|
|
@@ -2527,7 +2539,7 @@ function Pn(e) {
|
|
|
2527
2539
|
}, M = Ye({
|
|
2528
2540
|
eventTimeFrameResolver: g,
|
|
2529
2541
|
eventKeyResolver: _
|
|
2530
|
-
}), N = K(), P = s ?? N.weekStartsOn, I = u(null), L =
|
|
2542
|
+
}), N = K(), P = s ?? N.weekStartsOn, I = u(null), L = ct(I, t), { viewValue: R, changeViewValue: z, view: B, changeView: te } = yt({
|
|
2531
2543
|
view: x,
|
|
2532
2544
|
defaultView: S,
|
|
2533
2545
|
viewValue: C,
|
|
@@ -2536,7 +2548,7 @@ function Pn(e) {
|
|
|
2536
2548
|
onChangeViewValue: O,
|
|
2537
2549
|
dateUtils: N,
|
|
2538
2550
|
startWeek: P
|
|
2539
|
-
}), V = Je(I), ne =
|
|
2551
|
+
}), V = Je(I), ne = nt(() => je({ input: "pointer" })).current, H = c(() => w(d, M.current, N, {
|
|
2540
2552
|
hourMin: A,
|
|
2541
2553
|
hideMinMaxTime: a
|
|
2542
2554
|
}), [
|
|
@@ -2545,7 +2557,7 @@ function Pn(e) {
|
|
|
2545
2557
|
A,
|
|
2546
2558
|
d,
|
|
2547
2559
|
M
|
|
2548
|
-
]), { goBackward: re, goForward: ie, goToday: ae } =
|
|
2560
|
+
]), { goBackward: re, goForward: ie, goToday: ae } = bt({
|
|
2549
2561
|
changeViewValue: z,
|
|
2550
2562
|
dateUtils: N,
|
|
2551
2563
|
startWeek: P,
|
|
@@ -2627,26 +2639,26 @@ function Pn(e) {
|
|
|
2627
2639
|
]);
|
|
2628
2640
|
return /* @__PURE__ */ W("div", {
|
|
2629
2641
|
...U,
|
|
2630
|
-
className: D(U.className,
|
|
2642
|
+
className: D(U.className, Pn.root),
|
|
2631
2643
|
"data-ww-size": V === "regular" ? void 0 : V,
|
|
2632
|
-
children: /* @__PURE__ */ W(
|
|
2644
|
+
children: /* @__PURE__ */ W(_t.Provider, {
|
|
2633
2645
|
value: pe,
|
|
2634
2646
|
children: /* @__PURE__ */ W(Me.Provider, {
|
|
2635
2647
|
value: ne,
|
|
2636
|
-
children: /* @__PURE__ */ G(
|
|
2648
|
+
children: /* @__PURE__ */ G(vt.Provider, {
|
|
2637
2649
|
value: I,
|
|
2638
2650
|
children: [/* @__PURE__ */ W("div", {
|
|
2639
|
-
className:
|
|
2640
|
-
children: /* @__PURE__ */ W(
|
|
2651
|
+
className: Pn.root__head,
|
|
2652
|
+
children: /* @__PURE__ */ W(Pt, {})
|
|
2641
2653
|
}), /* @__PURE__ */ W("div", {
|
|
2642
|
-
className:
|
|
2643
|
-
children: W(B === "month" ?
|
|
2654
|
+
className: Pn.root__body,
|
|
2655
|
+
children: W(B === "month" ? gn : Nn, {})
|
|
2644
2656
|
})]
|
|
2645
2657
|
})
|
|
2646
2658
|
})
|
|
2647
2659
|
})
|
|
2648
2660
|
});
|
|
2649
2661
|
}
|
|
2650
|
-
export {
|
|
2662
|
+
export { Fn as Calendar, Fn as default, Ve as DateLocalizationContext, We as DateLocalizationProvider, Ue as MessagesContext, E as builtInMessages, Ce as resolveMessages, He as useDateUtils, Ge as useMessages };
|
|
2651
2663
|
|
|
2652
2664
|
//# sourceMappingURL=index.js.map
|