@weekwise/react 0.1.1 → 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/hooks/useTimeOffset.d.ts +1 -0
- package/dist/hooks/useToday.d.ts +2 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +376 -352
- 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,32 +400,38 @@ function pt(e, t, n = !0) {
|
|
|
392
400
|
]);
|
|
393
401
|
}
|
|
394
402
|
// src/hooks/useToday.ts
|
|
395
|
-
|
|
396
|
-
|
|
403
|
+
var ht = (e) => e.toMillis(e.getToday());
|
|
404
|
+
function gt() {
|
|
405
|
+
let e = K(), [t, n] = d(() => ({
|
|
406
|
+
dateUtils: e,
|
|
407
|
+
today: ht(e)
|
|
408
|
+
})), r = t;
|
|
409
|
+
t.dateUtils !== e && (r = {
|
|
410
|
+
dateUtils: e,
|
|
411
|
+
today: ht(e)
|
|
412
|
+
}, n(r));
|
|
413
|
+
let { today: a } = r;
|
|
397
414
|
return i(() => {
|
|
398
|
-
let
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
n,
|
|
405
|
-
a
|
|
406
|
-
]), a;
|
|
415
|
+
let t = e.toMillis(e.addDays(e.fromMillis(a), 1)), r = Math.max(t - Date.now(), 0) + 1e3, i = setTimeout(() => n({
|
|
416
|
+
dateUtils: e,
|
|
417
|
+
today: ht(e)
|
|
418
|
+
}), r);
|
|
419
|
+
return () => clearTimeout(i);
|
|
420
|
+
}, [e, a]), a;
|
|
407
421
|
}
|
|
408
422
|
// src/contexts/CalendarContext.ts
|
|
409
|
-
var
|
|
410
|
-
U && (
|
|
423
|
+
var _t = e(void 0);
|
|
424
|
+
U && (_t.displayName = "CalendarContext");
|
|
411
425
|
function J() {
|
|
412
|
-
let e = r(
|
|
426
|
+
let e = r(_t);
|
|
413
427
|
if (!e) throw Error("CalendarContext is required");
|
|
414
428
|
return e;
|
|
415
429
|
}
|
|
416
430
|
// src/contexts/ThemeSourceContext.ts
|
|
417
|
-
var
|
|
418
|
-
U && (
|
|
431
|
+
var vt = e(null);
|
|
432
|
+
U && (vt.displayName = "ThemeSourceContext");
|
|
419
433
|
// src/hooks/useCalendarValue.ts
|
|
420
|
-
function
|
|
434
|
+
function yt(e) {
|
|
421
435
|
let { view: t, defaultView: r, startWeek: a, viewValue: o, defaultViewValue: s, dateUtils: c, onChangeView: l, onChangeViewValue: d } = e, [f, p] = $e({
|
|
422
436
|
controlled: t,
|
|
423
437
|
default: r,
|
|
@@ -451,7 +465,7 @@ function _t(e) {
|
|
|
451
465
|
};
|
|
452
466
|
}
|
|
453
467
|
// src/hooks/useNavigation.ts
|
|
454
|
-
function
|
|
468
|
+
function bt(e) {
|
|
455
469
|
let { dateUtils: t, view: n, viewValue: r, changeViewValue: i, startWeek: a } = e, o = (e, r) => () => i(z(t, n, e, r, a), n);
|
|
456
470
|
return {
|
|
457
471
|
goForward: q(o(r, 1)),
|
|
@@ -460,7 +474,7 @@ function vt(e) {
|
|
|
460
474
|
};
|
|
461
475
|
}
|
|
462
476
|
// src/icons/chevron.tsx
|
|
463
|
-
function
|
|
477
|
+
function xt(e) {
|
|
464
478
|
return /* @__PURE__ */ W("svg", {
|
|
465
479
|
xmlns: "http://www.w3.org/2000/svg",
|
|
466
480
|
fill: "none",
|
|
@@ -475,11 +489,11 @@ function yt(e) {
|
|
|
475
489
|
});
|
|
476
490
|
}
|
|
477
491
|
// src/portal/Portal.tsx
|
|
478
|
-
var
|
|
479
|
-
function
|
|
480
|
-
return f(
|
|
492
|
+
var St = () => () => {}, Ct = () => !0, wt = () => !1;
|
|
493
|
+
function Tt() {
|
|
494
|
+
return f(St, Ct, wt);
|
|
481
495
|
}
|
|
482
|
-
function
|
|
496
|
+
function Et(e) {
|
|
483
497
|
let t = { display: "contents" };
|
|
484
498
|
if (!e) return t;
|
|
485
499
|
let n = getComputedStyle(e);
|
|
@@ -489,10 +503,10 @@ function wt(e) {
|
|
|
489
503
|
}
|
|
490
504
|
return t;
|
|
491
505
|
}
|
|
492
|
-
function
|
|
493
|
-
let n =
|
|
506
|
+
function Dt({ children: e, container: t }) {
|
|
507
|
+
let n = Tt(), i = r(vt);
|
|
494
508
|
return n ? t ? Be(e, t) : Be(/* @__PURE__ */ W("div", {
|
|
495
|
-
style:
|
|
509
|
+
style: Et(i?.current),
|
|
496
510
|
children: e
|
|
497
511
|
}), document.body) : null;
|
|
498
512
|
}
|
|
@@ -517,7 +531,7 @@ var Y = {
|
|
|
517
531
|
popover__day_today: "_popover__day_today_1aojr_162"
|
|
518
532
|
};
|
|
519
533
|
// src/components/date-navigator/DateNavigator.tsx
|
|
520
|
-
function
|
|
534
|
+
function Ot({ renderHeading: e, type: t = "button", onClick: n, onKeyDown: r, className: a, ...o }) {
|
|
521
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({
|
|
522
536
|
placement: "bottom",
|
|
523
537
|
middleware: [
|
|
@@ -574,8 +588,8 @@ function Et({ renderHeading: e, type: t = "button", onClick: n, onKeyDown: r, cl
|
|
|
574
588
|
children: [/* @__PURE__ */ W("span", {
|
|
575
589
|
className: Y.root__toggleLabel,
|
|
576
590
|
children: E
|
|
577
|
-
}), /* @__PURE__ */ W(
|
|
578
|
-
}), 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", {
|
|
579
593
|
ref: w.setFloating,
|
|
580
594
|
style: T,
|
|
581
595
|
role: "dialog",
|
|
@@ -588,7 +602,7 @@ function Et({ renderHeading: e, type: t = "button", onClick: n, onKeyDown: r, cl
|
|
|
588
602
|
type: "button",
|
|
589
603
|
"aria-label": h.previousMonth,
|
|
590
604
|
onClick: () => S((e) => v(e, -1)),
|
|
591
|
-
children: /* @__PURE__ */ W(
|
|
605
|
+
children: /* @__PURE__ */ W(xt, { className: Y.popover__navBackward })
|
|
592
606
|
}),
|
|
593
607
|
/* @__PURE__ */ W("div", {
|
|
594
608
|
className: Y.popover__title,
|
|
@@ -598,7 +612,7 @@ function Et({ renderHeading: e, type: t = "button", onClick: n, onKeyDown: r, cl
|
|
|
598
612
|
type: "button",
|
|
599
613
|
"aria-label": h.nextMonth,
|
|
600
614
|
onClick: () => S((e) => v(e, 1)),
|
|
601
|
-
children: /* @__PURE__ */ W(
|
|
615
|
+
children: /* @__PURE__ */ W(xt, { className: Y.popover__navForward })
|
|
602
616
|
})
|
|
603
617
|
]
|
|
604
618
|
}), /* @__PURE__ */ G("div", {
|
|
@@ -625,14 +639,14 @@ function Et({ renderHeading: e, type: t = "button", onClick: n, onKeyDown: r, cl
|
|
|
625
639
|
}) })]
|
|
626
640
|
});
|
|
627
641
|
}
|
|
628
|
-
var
|
|
642
|
+
var kt = {
|
|
629
643
|
root: "_root_l1csz_1",
|
|
630
644
|
root__icon: "_root__icon_l1csz_21",
|
|
631
645
|
root__icon_forward: "_root__icon_forward_l1csz_25",
|
|
632
646
|
root__icon_backward: "_root__icon_backward_l1csz_29"
|
|
633
647
|
};
|
|
634
648
|
// src/components/nav-btn/NavBtn.tsx
|
|
635
|
-
function
|
|
649
|
+
function At({ direction: e = "forward", type: t = "button", onClick: n, className: r, children: i, ...a }) {
|
|
636
650
|
let { goForward: o, goBackward: s } = J(), c = Ge(), l = q(ve(n, () => {
|
|
637
651
|
e === "forward" ? o() : e === "backward" && s();
|
|
638
652
|
}));
|
|
@@ -641,28 +655,28 @@ function Ot({ direction: e = "forward", type: t = "button", onClick: n, classNam
|
|
|
641
655
|
"aria-label": e === "forward" ? c.next : c.previous,
|
|
642
656
|
...a,
|
|
643
657
|
onClick: l,
|
|
644
|
-
className: D(r,
|
|
645
|
-
children: i ?? /* @__PURE__ */ W(
|
|
646
|
-
[
|
|
647
|
-
[
|
|
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"
|
|
648
662
|
}) })
|
|
649
663
|
});
|
|
650
664
|
}
|
|
651
|
-
var
|
|
652
|
-
root: "
|
|
653
|
-
root__icon: "
|
|
654
|
-
root__icon_open: "
|
|
655
|
-
list: "
|
|
656
|
-
list__option: "
|
|
657
|
-
list__option_active: "
|
|
658
|
-
list__check: "
|
|
659
|
-
},
|
|
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 = [
|
|
660
674
|
"day",
|
|
661
675
|
"week",
|
|
662
676
|
"month"
|
|
663
677
|
];
|
|
664
|
-
function
|
|
665
|
-
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({
|
|
666
680
|
placement: "bottom-end",
|
|
667
681
|
middleware: [
|
|
668
682
|
Ie(6),
|
|
@@ -698,14 +712,14 @@ function jt({ className: e }) {
|
|
|
698
712
|
let x = (e) => {
|
|
699
713
|
(e.key === "ArrowDown" || e.key === "ArrowUp") && (e.preventDefault(), y());
|
|
700
714
|
}, S = (e) => {
|
|
701
|
-
let t =
|
|
702
|
-
e.preventDefault(), m(
|
|
715
|
+
let t = Mt.indexOf(p), n = (t) => {
|
|
716
|
+
e.preventDefault(), m(Mt[(t + Mt.length) % Mt.length] ?? p);
|
|
703
717
|
};
|
|
704
718
|
switch (e.key) {
|
|
705
719
|
case "ArrowDown": return n(t + 1);
|
|
706
720
|
case "ArrowUp": return n(t - 1);
|
|
707
721
|
case "Home": return n(0);
|
|
708
|
-
case "End": return n(
|
|
722
|
+
case "End": return n(Mt.length - 1);
|
|
709
723
|
case "Enter":
|
|
710
724
|
case " ": return e.preventDefault(), b(p);
|
|
711
725
|
case "Escape": return e.preventDefault(), v(!0);
|
|
@@ -719,22 +733,22 @@ function jt({ className: e }) {
|
|
|
719
733
|
"aria-expanded": l,
|
|
720
734
|
"aria-controls": l ? C : void 0,
|
|
721
735
|
"aria-label": `${r.chooseView}: ${r[t]}`,
|
|
722
|
-
className: D(e,
|
|
736
|
+
className: D(e, jt.root),
|
|
723
737
|
onClick: () => l ? v(!1) : y(),
|
|
724
738
|
onKeyDown: x,
|
|
725
|
-
children: [r[t], /* @__PURE__ */ W(
|
|
739
|
+
children: [r[t], /* @__PURE__ */ W(xt, {
|
|
726
740
|
"aria-hidden": "true",
|
|
727
|
-
className: D(
|
|
741
|
+
className: D(jt.root__icon, { [jt.root__icon_open]: l })
|
|
728
742
|
})]
|
|
729
|
-
}), l && /* @__PURE__ */ W(
|
|
743
|
+
}), l && /* @__PURE__ */ W(Dt, { children: /* @__PURE__ */ W("div", {
|
|
730
744
|
ref: g.setFloating,
|
|
731
745
|
id: C,
|
|
732
746
|
role: "listbox",
|
|
733
747
|
"aria-label": r.chooseView,
|
|
734
748
|
style: _,
|
|
735
|
-
className:
|
|
749
|
+
className: jt.list,
|
|
736
750
|
onKeyDown: S,
|
|
737
|
-
children:
|
|
751
|
+
children: Mt.map((e) => /* @__PURE__ */ G("div", {
|
|
738
752
|
ref: (t) => {
|
|
739
753
|
t ? h.current.set(e, t) : h.current.delete(e);
|
|
740
754
|
},
|
|
@@ -742,12 +756,12 @@ function jt({ className: e }) {
|
|
|
742
756
|
role: "option",
|
|
743
757
|
tabIndex: -1,
|
|
744
758
|
"aria-selected": e === t,
|
|
745
|
-
className: D(
|
|
759
|
+
className: D(jt.list__option, { [jt.list__option_active]: e === p }),
|
|
746
760
|
onClick: () => b(e),
|
|
747
761
|
onPointerMove: () => m(e),
|
|
748
762
|
children: [r[e], e === t && /* @__PURE__ */ W("svg", {
|
|
749
763
|
"aria-hidden": "true",
|
|
750
|
-
className:
|
|
764
|
+
className: jt.list__check,
|
|
751
765
|
viewBox: "0 0 16 16",
|
|
752
766
|
width: "14",
|
|
753
767
|
height: "14",
|
|
@@ -774,7 +788,7 @@ var X = {
|
|
|
774
788
|
root__viewSelect: "_root__viewSelect_1lvdm_89"
|
|
775
789
|
};
|
|
776
790
|
// src/components/calendar-toolbar/CalendarToolbar.tsx
|
|
777
|
-
function
|
|
791
|
+
function Pt(e) {
|
|
778
792
|
let { goToday: t, changeView: n, view: r } = J(), i = Ge(), a = e, o = {
|
|
779
793
|
day: {
|
|
780
794
|
type: "button",
|
|
@@ -807,14 +821,14 @@ function Mt(e) {
|
|
|
807
821
|
...a,
|
|
808
822
|
className: D(a.className, X.root),
|
|
809
823
|
children: [
|
|
810
|
-
/* @__PURE__ */ W(
|
|
824
|
+
/* @__PURE__ */ W(Ot, {}),
|
|
811
825
|
/* @__PURE__ */ G("div", {
|
|
812
826
|
className: X.root__navigationPane,
|
|
813
827
|
role: "group",
|
|
814
828
|
children: [
|
|
815
|
-
/* @__PURE__ */ W(
|
|
829
|
+
/* @__PURE__ */ W(At, { direction: "backward" }),
|
|
816
830
|
/* @__PURE__ */ W("button", { ...s }),
|
|
817
|
-
/* @__PURE__ */ W(
|
|
831
|
+
/* @__PURE__ */ W(At, { direction: "forward" })
|
|
818
832
|
]
|
|
819
833
|
}),
|
|
820
834
|
/* @__PURE__ */ G("div", {
|
|
@@ -827,26 +841,26 @@ function Mt(e) {
|
|
|
827
841
|
}),
|
|
828
842
|
/* @__PURE__ */ W("div", {
|
|
829
843
|
className: X.root__viewSelect,
|
|
830
|
-
children: /* @__PURE__ */ W(
|
|
844
|
+
children: /* @__PURE__ */ W(Nt, {})
|
|
831
845
|
})
|
|
832
846
|
]
|
|
833
847
|
});
|
|
834
848
|
}
|
|
835
849
|
// src/contexts/CalendarViewportContext.ts
|
|
836
|
-
var
|
|
837
|
-
U && (
|
|
838
|
-
function
|
|
839
|
-
let e = r(
|
|
850
|
+
var Ft = e(void 0);
|
|
851
|
+
U && (Ft.displayName = "CalendarViewportContext");
|
|
852
|
+
function It() {
|
|
853
|
+
let e = r(Ft);
|
|
840
854
|
if (!e) throw Error("CalendarViewportContext is required");
|
|
841
855
|
return e;
|
|
842
856
|
}
|
|
843
|
-
var
|
|
857
|
+
var Lt = { root: "_root_1pvvm_1" };
|
|
844
858
|
// src/components/pointer-popover/PointerPopover.tsx
|
|
845
|
-
function
|
|
859
|
+
function Rt({ coordinates: e, className: t, style: n, ...r }) {
|
|
846
860
|
return /* @__PURE__ */ W("span", {
|
|
847
861
|
tabIndex: -1,
|
|
848
862
|
...r,
|
|
849
|
-
className: D(t,
|
|
863
|
+
className: D(t, Lt.root),
|
|
850
864
|
style: {
|
|
851
865
|
...n,
|
|
852
866
|
...e ? {
|
|
@@ -856,18 +870,18 @@ function It({ coordinates: e, className: t, style: n, ...r }) {
|
|
|
856
870
|
}
|
|
857
871
|
});
|
|
858
872
|
}
|
|
859
|
-
var
|
|
860
|
-
root: "
|
|
861
|
-
root_isDragging: "
|
|
862
|
-
root_isReturning: "
|
|
863
|
-
"ww-drag-return": "_ww-drag-
|
|
864
|
-
root_isBlocked: "
|
|
865
|
-
},
|
|
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 = {
|
|
866
880
|
isStart: !0,
|
|
867
881
|
isEnd: !0
|
|
868
882
|
};
|
|
869
|
-
function
|
|
870
|
-
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 }) => {
|
|
871
885
|
let i = [...n.dropTargets.values()].shift(), a = [...e.dragTargets.values()].shift();
|
|
872
886
|
return {
|
|
873
887
|
...t.transform,
|
|
@@ -883,50 +897,59 @@ function zt({ showPreview: e = !0, pxPerMinute: t = 1, ...n }) {
|
|
|
883
897
|
if (!m) return null;
|
|
884
898
|
let { key: e } = JSON.parse(m.event);
|
|
885
899
|
return r.get(e)?.value ?? null;
|
|
886
|
-
}, [m, r]), b = u(null),
|
|
900
|
+
}, [m, r]), b = u(null), x = u(!1), [S, C] = d(!1), [w, T] = d(null);
|
|
887
901
|
if (Ke(() => {
|
|
888
|
-
if (
|
|
889
|
-
|
|
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));
|
|
890
908
|
return;
|
|
891
909
|
}
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
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({
|
|
896
917
|
container: t,
|
|
918
|
+
eventValue: e.eventValue,
|
|
897
919
|
style: {
|
|
898
|
-
left:
|
|
899
|
-
top:
|
|
900
|
-
width:
|
|
901
|
-
height:
|
|
902
|
-
"--ww-return-left": `${
|
|
903
|
-
"--ww-return-top": `${
|
|
904
|
-
"--ww-return-width": `${
|
|
905
|
-
"--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`
|
|
906
928
|
}
|
|
907
929
|
});
|
|
908
|
-
}), !l) return
|
|
909
|
-
|
|
910
|
-
container: x.container,
|
|
930
|
+
}), et(l ? f ? "grabbing" : "not-allowed" : null), !l) return w ? /* @__PURE__ */ W(Dt, {
|
|
931
|
+
container: w.container,
|
|
911
932
|
children: /* @__PURE__ */ W("div", {
|
|
912
933
|
...n,
|
|
913
|
-
className: D(n.className,
|
|
914
|
-
style:
|
|
915
|
-
|
|
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)
|
|
916
938
|
})
|
|
917
939
|
}) : null;
|
|
918
|
-
|
|
919
|
-
|
|
940
|
+
if (!S) return null;
|
|
941
|
+
let E = !f;
|
|
942
|
+
return /* @__PURE__ */ G(Dt, {
|
|
920
943
|
container: s.current,
|
|
921
944
|
children: [/* @__PURE__ */ W("div", {
|
|
922
945
|
...n,
|
|
923
|
-
className: D(n.className,
|
|
924
|
-
[
|
|
925
|
-
[
|
|
946
|
+
className: D(n.className, zt.root, {
|
|
947
|
+
[zt.root_isDragging]: l,
|
|
948
|
+
[zt.root_isBlocked]: E
|
|
926
949
|
}),
|
|
927
950
|
style: { ...v },
|
|
928
|
-
children: y == null ? null : i.current?.(y, o,
|
|
929
|
-
}), e && !
|
|
951
|
+
children: y == null ? null : i.current?.(y, o, Bt)
|
|
952
|
+
}), e && !E && /* @__PURE__ */ W(Rt, {
|
|
930
953
|
coordinates: {
|
|
931
954
|
x: g,
|
|
932
955
|
y: _
|
|
@@ -936,16 +959,16 @@ function zt({ showPreview: e = !0, pxPerMinute: t = 1, ...n }) {
|
|
|
936
959
|
});
|
|
937
960
|
}
|
|
938
961
|
// src/components/month-view/MonthView.utils.ts
|
|
939
|
-
function
|
|
962
|
+
function Ht(e, t) {
|
|
940
963
|
return {
|
|
941
964
|
...t,
|
|
942
965
|
...e
|
|
943
966
|
};
|
|
944
967
|
}
|
|
945
|
-
function
|
|
968
|
+
function Ut(e) {
|
|
946
969
|
return Array.from({ length: Math.ceil(e.length / 7) }, (t, n) => e.slice(n * 7, n * 7 + 7));
|
|
947
970
|
}
|
|
948
|
-
function
|
|
971
|
+
function Wt(e, t, n) {
|
|
949
972
|
let r = e?.querySelectorAll("[data-day-index]") ?? [], i = -1, a = 1e400;
|
|
950
973
|
for (let e of r) {
|
|
951
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);
|
|
@@ -954,31 +977,31 @@ function Ht(e, t, n) {
|
|
|
954
977
|
return i;
|
|
955
978
|
}
|
|
956
979
|
var Z = {
|
|
957
|
-
root: "
|
|
958
|
-
root__head: "
|
|
959
|
-
root__weekday: "
|
|
960
|
-
root__body: "
|
|
961
|
-
root__viewport: "
|
|
962
|
-
root__week: "
|
|
963
|
-
root__day: "
|
|
964
|
-
root__day_isOver: "
|
|
965
|
-
root__dayNumber: "
|
|
966
|
-
root__event: "
|
|
967
|
-
root__event_span: "
|
|
968
|
-
root__event_continuesBefore: "
|
|
969
|
-
root__event_continuesAfter: "
|
|
970
|
-
root__event_isResizing: "
|
|
971
|
-
root__event_isResizeSource: "
|
|
972
|
-
root__resize: "
|
|
973
|
-
root__resizeStart: "
|
|
974
|
-
root__resizeEnd: "
|
|
975
|
-
root_isResizing: "
|
|
976
|
-
root__event_isDragging: "
|
|
977
|
-
root__dragOverlay: "
|
|
978
|
-
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"
|
|
979
1002
|
};
|
|
980
1003
|
// src/components/month-view/MonthViewDay.tsx
|
|
981
|
-
function
|
|
1004
|
+
function Gt(e) {
|
|
982
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 }) => ({
|
|
983
1006
|
register: e,
|
|
984
1007
|
isOver: t(_.current)
|
|
@@ -1019,7 +1042,7 @@ function Ut(e) {
|
|
|
1019
1042
|
from: m(t) * 60 + h(t),
|
|
1020
1043
|
duration: 60
|
|
1021
1044
|
});
|
|
1022
|
-
}), x =
|
|
1045
|
+
}), x = ct(_, t);
|
|
1023
1046
|
return /* @__PURE__ */ W("div", {
|
|
1024
1047
|
...o,
|
|
1025
1048
|
ref: x,
|
|
@@ -1029,7 +1052,7 @@ function Ut(e) {
|
|
|
1029
1052
|
});
|
|
1030
1053
|
}
|
|
1031
1054
|
// src/hooks/useInterval.ts
|
|
1032
|
-
function
|
|
1055
|
+
function Kt() {
|
|
1033
1056
|
let e = u(null);
|
|
1034
1057
|
return [n((t, n) => {
|
|
1035
1058
|
e.current = setInterval(t, n);
|
|
@@ -1038,7 +1061,7 @@ function Wt() {
|
|
|
1038
1061
|
}, [])];
|
|
1039
1062
|
}
|
|
1040
1063
|
// src/hooks/useScrollIntent.ts
|
|
1041
|
-
var
|
|
1064
|
+
var qt = {
|
|
1042
1065
|
x: {
|
|
1043
1066
|
[-1]: !1,
|
|
1044
1067
|
1: !1
|
|
@@ -1048,10 +1071,10 @@ var Gt = {
|
|
|
1048
1071
|
1: !1
|
|
1049
1072
|
}
|
|
1050
1073
|
};
|
|
1051
|
-
function
|
|
1052
|
-
let n =
|
|
1074
|
+
function Jt({ delta: e, disabled: t }) {
|
|
1075
|
+
let n = ut(e);
|
|
1053
1076
|
return Xe((r) => {
|
|
1054
|
-
if (t || !n || !r) return
|
|
1077
|
+
if (t || !n || !r) return qt;
|
|
1055
1078
|
let i = {
|
|
1056
1079
|
x: Math.sign(e.x - n.x),
|
|
1057
1080
|
y: Math.sign(e.y - n.y)
|
|
@@ -1073,8 +1096,8 @@ function Kt({ delta: e, disabled: t }) {
|
|
|
1073
1096
|
]);
|
|
1074
1097
|
}
|
|
1075
1098
|
// src/hooks/useAutoScroller.ts
|
|
1076
|
-
function
|
|
1077
|
-
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({
|
|
1078
1101
|
delta: f,
|
|
1079
1102
|
disabled: !o
|
|
1080
1103
|
}), b = u({
|
|
@@ -1148,7 +1171,7 @@ function qt(e) {
|
|
|
1148
1171
|
]);
|
|
1149
1172
|
}
|
|
1150
1173
|
// src/hooks/useMutationObserver.ts
|
|
1151
|
-
function
|
|
1174
|
+
function Xt(e, t = !1) {
|
|
1152
1175
|
let n = u(e);
|
|
1153
1176
|
n.current = e;
|
|
1154
1177
|
let r = c(() => {
|
|
@@ -1159,8 +1182,8 @@ function Jt(e, t = !1) {
|
|
|
1159
1182
|
return i(() => () => r?.disconnect(), [r]), r;
|
|
1160
1183
|
}
|
|
1161
1184
|
// src/hooks/useRect.ts
|
|
1162
|
-
function
|
|
1163
|
-
let [r, i] = l(s, null), a =
|
|
1185
|
+
function Zt(e, t = P, n) {
|
|
1186
|
+
let [r, i] = l(s, null), a = Xt((t) => {
|
|
1164
1187
|
if (e) for (let n of t) {
|
|
1165
1188
|
let { type: t, target: r } = n;
|
|
1166
1189
|
if (t === "childList" && pe(r) && r.contains(e)) {
|
|
@@ -1187,18 +1210,18 @@ function Yt(e, t = P, n) {
|
|
|
1187
1210
|
}
|
|
1188
1211
|
}
|
|
1189
1212
|
// src/hooks/useScrollableAncestors.ts
|
|
1190
|
-
var
|
|
1191
|
-
function
|
|
1192
|
-
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]);
|
|
1193
1216
|
return i(() => {
|
|
1194
1217
|
n.current = e;
|
|
1195
1218
|
}, [e]), r;
|
|
1196
1219
|
}
|
|
1197
1220
|
// src/hooks/useScrollableAncestorsRects.ts
|
|
1198
|
-
var
|
|
1199
|
-
function
|
|
1200
|
-
let [n, r] = l(a,
|
|
1201
|
-
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(() => {
|
|
1202
1225
|
e.length ? e.forEach((e) => i?.observe(e)) : (i?.disconnect(), r());
|
|
1203
1226
|
}, [e, i]), n;
|
|
1204
1227
|
function a() {
|
|
@@ -1215,11 +1238,11 @@ function $t(e, t = P) {
|
|
|
1215
1238
|
};
|
|
1216
1239
|
}
|
|
1217
1240
|
return new h(t(e), e);
|
|
1218
|
-
}) :
|
|
1241
|
+
}) : en;
|
|
1219
1242
|
}
|
|
1220
1243
|
}
|
|
1221
1244
|
// src/hooks/useScrollOffsets.ts
|
|
1222
|
-
function
|
|
1245
|
+
function nn(e) {
|
|
1223
1246
|
let [t, r] = d(null), a = u(e), o = n((e) => {
|
|
1224
1247
|
let t = ie(e.target);
|
|
1225
1248
|
t && r((e) => e ? (e.set(t, V(t)), new Map(e)) : null);
|
|
@@ -1246,7 +1269,7 @@ function en(e) {
|
|
|
1246
1269
|
}, [o, e]), c(() => e.length ? t ? Array.from(t.values()).reduce((e, t) => _(e, t), O) : H(e) : O, [e, t]);
|
|
1247
1270
|
}
|
|
1248
1271
|
// src/hooks/useScrollOffsetsDelta.ts
|
|
1249
|
-
function
|
|
1272
|
+
function rn(e, t = k) {
|
|
1250
1273
|
let n = u(null);
|
|
1251
1274
|
return i(() => {
|
|
1252
1275
|
n.current = null;
|
|
@@ -1256,11 +1279,11 @@ function tn(e, t = k) {
|
|
|
1256
1279
|
}, [e]), n.current ? Oe(e, n.current) : O;
|
|
1257
1280
|
}
|
|
1258
1281
|
// src/hooks/useMoveTransform.ts
|
|
1259
|
-
var
|
|
1282
|
+
var an = {
|
|
1260
1283
|
Start: "start",
|
|
1261
1284
|
Move: "move",
|
|
1262
1285
|
Stop: "stop"
|
|
1263
|
-
},
|
|
1286
|
+
}, on = {
|
|
1264
1287
|
isActive: !1,
|
|
1265
1288
|
initialTranslate: {
|
|
1266
1289
|
x: 0,
|
|
@@ -1276,8 +1299,8 @@ var nn = {
|
|
|
1276
1299
|
},
|
|
1277
1300
|
context: null
|
|
1278
1301
|
};
|
|
1279
|
-
function
|
|
1280
|
-
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(() => {
|
|
1281
1304
|
let e = (e) => (t, n) => {
|
|
1282
1305
|
a({
|
|
1283
1306
|
type: e,
|
|
@@ -1286,12 +1309,12 @@ function an({ autoScrollEnabled: e = !0, modifiers: t = [], activeNode: n = null
|
|
|
1286
1309
|
});
|
|
1287
1310
|
};
|
|
1288
1311
|
return {
|
|
1289
|
-
start: e(
|
|
1290
|
-
move: e(
|
|
1291
|
-
stop: e(
|
|
1312
|
+
start: e(an.Start),
|
|
1313
|
+
move: e(an.Move),
|
|
1314
|
+
stop: e(an.Stop)
|
|
1292
1315
|
};
|
|
1293
1316
|
}, []), g = _(i.initialTranslate, i.translate);
|
|
1294
|
-
|
|
1317
|
+
Yt({
|
|
1295
1318
|
delta: i.translate,
|
|
1296
1319
|
enabled: e && i.isActive,
|
|
1297
1320
|
activeNodeRect: u,
|
|
@@ -1333,18 +1356,18 @@ function an({ autoScrollEnabled: e = !0, modifiers: t = [], activeNode: n = null
|
|
|
1333
1356
|
}
|
|
1334
1357
|
];
|
|
1335
1358
|
}
|
|
1336
|
-
function
|
|
1359
|
+
function cn(e, t) {
|
|
1337
1360
|
let n = {
|
|
1338
|
-
[
|
|
1361
|
+
[an.Start]: (e, { coordinates: t, context: n }) => ({
|
|
1339
1362
|
...e,
|
|
1340
1363
|
isActive: !0,
|
|
1341
|
-
currentAction:
|
|
1364
|
+
currentAction: an.Start,
|
|
1342
1365
|
initialTranslate: { ...t },
|
|
1343
1366
|
context: n
|
|
1344
1367
|
}),
|
|
1345
|
-
[
|
|
1368
|
+
[an.Move]: (e, { coordinates: t }) => ({
|
|
1346
1369
|
...e,
|
|
1347
|
-
currentAction:
|
|
1370
|
+
currentAction: an.Move,
|
|
1348
1371
|
translate: {
|
|
1349
1372
|
x: t.x - e.initialTranslate.x,
|
|
1350
1373
|
y: t.y - e.initialTranslate.y
|
|
@@ -1354,17 +1377,17 @@ function on(e, t) {
|
|
|
1354
1377
|
y: t.y - (e.translate.y + e.initialTranslate.y)
|
|
1355
1378
|
}
|
|
1356
1379
|
}),
|
|
1357
|
-
[
|
|
1358
|
-
...
|
|
1359
|
-
currentAction:
|
|
1380
|
+
[an.Stop]: () => ({
|
|
1381
|
+
...on,
|
|
1382
|
+
currentAction: an.Stop
|
|
1360
1383
|
})
|
|
1361
1384
|
};
|
|
1362
1385
|
return _e(t.type, n, e, t);
|
|
1363
1386
|
}
|
|
1364
1387
|
// src/components/month-view/MonthViewEvent.tsx
|
|
1365
|
-
var
|
|
1366
|
-
function
|
|
1367
|
-
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 }) => {
|
|
1368
1391
|
let a = i(g.current), [o] = a ? [...n.dropTargets].pop() ?? [null] : [null];
|
|
1369
1392
|
return {
|
|
1370
1393
|
attributes: t.attributes,
|
|
@@ -1373,18 +1396,18 @@ function cn(e) {
|
|
|
1373
1396
|
register: e,
|
|
1374
1397
|
setOverlayTransform: r
|
|
1375
1398
|
};
|
|
1376
|
-
}), C =
|
|
1399
|
+
}), C = Zt(y ? b : null), [{ transform: w, context: T }, E] = sn({
|
|
1377
1400
|
autoScrollEnabled: !1,
|
|
1378
1401
|
activeNode: () => g.current,
|
|
1379
1402
|
containerNode: () => h.current,
|
|
1380
1403
|
modifiers: [function({ activeNodeRect: e, containerNodeRect: t, transform: n, translate: r, initialTranslate: i }) {
|
|
1381
1404
|
if (!t || !e || !C) return n;
|
|
1382
|
-
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;
|
|
1383
1406
|
let a = e.top + r.y, o = C.top + p.header, s = C.top + C.height - e.height;
|
|
1384
1407
|
return n.top = Math.max(o, Math.min(a, s)) - t.top, n;
|
|
1385
1408
|
}]
|
|
1386
1409
|
}), O = q((e) => {
|
|
1387
|
-
T === "overlay" && S(e);
|
|
1410
|
+
T === "overlay" && b && S(e);
|
|
1388
1411
|
});
|
|
1389
1412
|
i(() => {
|
|
1390
1413
|
O(w);
|
|
@@ -1438,7 +1461,7 @@ function cn(e) {
|
|
|
1438
1461
|
onMoveStart: () => (o?.start(n.key, e), !0),
|
|
1439
1462
|
onMove: (e) => o?.move(e.clientX, e.clientY),
|
|
1440
1463
|
onMoveEnd: () => o?.end()
|
|
1441
|
-
}), { 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({
|
|
1442
1465
|
"--ww-column": n.column + 1,
|
|
1443
1466
|
"--ww-span": n.span,
|
|
1444
1467
|
"--ww-row": n.lane + 2
|
|
@@ -1476,7 +1499,7 @@ function cn(e) {
|
|
|
1476
1499
|
});
|
|
1477
1500
|
}
|
|
1478
1501
|
// src/components/month-view/MonthViewEventPreview.tsx
|
|
1479
|
-
function
|
|
1502
|
+
function dn({ bar: e, children: t }) {
|
|
1480
1503
|
return /* @__PURE__ */ W("div", {
|
|
1481
1504
|
"aria-hidden": "true",
|
|
1482
1505
|
"data-key": String(e.key),
|
|
@@ -1487,7 +1510,7 @@ function ln({ bar: e, children: t }) {
|
|
|
1487
1510
|
[Z.root__event_continuesBefore]: !e.isStart,
|
|
1488
1511
|
[Z.root__event_continuesAfter]: !e.isEnd
|
|
1489
1512
|
}),
|
|
1490
|
-
style:
|
|
1513
|
+
style: Ht({
|
|
1491
1514
|
"--ww-column": e.column + 1,
|
|
1492
1515
|
"--ww-span": e.span,
|
|
1493
1516
|
"--ww-row": e.lane + 2
|
|
@@ -1496,11 +1519,11 @@ function ln({ bar: e, children: t }) {
|
|
|
1496
1519
|
});
|
|
1497
1520
|
}
|
|
1498
1521
|
// src/components/month-view/MonthViewWeek.tsx
|
|
1499
|
-
function
|
|
1522
|
+
function fn(e) {
|
|
1500
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, {
|
|
1501
1524
|
isStart: e.isStart,
|
|
1502
1525
|
isEnd: e.isEnd
|
|
1503
|
-
}), y = (e, n = !1) => /* @__PURE__ */ W(
|
|
1526
|
+
}), y = (e, n = !1) => /* @__PURE__ */ W(un, {
|
|
1504
1527
|
eventData: e,
|
|
1505
1528
|
weekDays: t,
|
|
1506
1529
|
resizable: !d,
|
|
@@ -1512,24 +1535,24 @@ function un(e) {
|
|
|
1512
1535
|
return /* @__PURE__ */ G("div", {
|
|
1513
1536
|
className: Z.root__week,
|
|
1514
1537
|
children: [
|
|
1515
|
-
t.map((e, t) => /* @__PURE__ */ W(
|
|
1538
|
+
t.map((e, t) => /* @__PURE__ */ W(Gt, {
|
|
1516
1539
|
targetDate: e,
|
|
1517
1540
|
"data-day-index": n + t,
|
|
1518
1541
|
"data-is-outside": !p(e, c) || void 0,
|
|
1519
1542
|
"data-is-today": m(e) ? !0 : void 0,
|
|
1520
|
-
style:
|
|
1543
|
+
style: Ht({ "--ww-column": t + 1 }),
|
|
1521
1544
|
children: /* @__PURE__ */ W("span", {
|
|
1522
1545
|
className: Z.root__dayNumber,
|
|
1523
1546
|
children: f(e)
|
|
1524
1547
|
})
|
|
1525
1548
|
}, h(e))),
|
|
1526
|
-
[...r.bars.map((e) => e.key === o ? /* @__PURE__ */ W(
|
|
1549
|
+
[...r.bars.map((e) => e.key === o ? /* @__PURE__ */ W(dn, {
|
|
1527
1550
|
bar: e,
|
|
1528
1551
|
children: v(e)
|
|
1529
1552
|
}, `preview-${e.key}`) : y(e)), ...i.map((e) => y(e, !0))],
|
|
1530
1553
|
t.map((e, t) => r.hidden[t] > 0 && /* @__PURE__ */ W("span", {
|
|
1531
1554
|
className: Z.root__more,
|
|
1532
|
-
style:
|
|
1555
|
+
style: Ht({
|
|
1533
1556
|
"--ww-column": t + 1,
|
|
1534
1557
|
"--ww-row": a + 2
|
|
1535
1558
|
}),
|
|
@@ -1539,7 +1562,7 @@ function un(e) {
|
|
|
1539
1562
|
});
|
|
1540
1563
|
}
|
|
1541
1564
|
// src/components/month-view/useMonthLanes.ts
|
|
1542
|
-
function
|
|
1565
|
+
function pn(e, t) {
|
|
1543
1566
|
let [n, r] = d(t), i = () => {
|
|
1544
1567
|
let n = e.current?.firstElementChild;
|
|
1545
1568
|
n?.clientHeight && r(R(n.clientHeight, t));
|
|
@@ -1553,8 +1576,8 @@ function dn(e, t) {
|
|
|
1553
1576
|
}, [a, t]), n;
|
|
1554
1577
|
}
|
|
1555
1578
|
// src/components/month-view/useMonthResize.ts
|
|
1556
|
-
function
|
|
1557
|
-
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) => {
|
|
1558
1581
|
let t = d.current;
|
|
1559
1582
|
t && (p(), u(null), e && t.result && s(t.key, t.result.date, t.result.info));
|
|
1560
1583
|
}), h = q((e) => {
|
|
@@ -1566,7 +1589,7 @@ function fn(e) {
|
|
|
1566
1589
|
result: null
|
|
1567
1590
|
}), f(document, "keydown", h, !0));
|
|
1568
1591
|
}), _ = q((e, a) => {
|
|
1569
|
-
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)];
|
|
1570
1593
|
s && c && l && !o?.(l) && u({
|
|
1571
1594
|
...s,
|
|
1572
1595
|
result: xe(r, c, s.edge, l)
|
|
@@ -1600,15 +1623,15 @@ function fn(e) {
|
|
|
1600
1623
|
};
|
|
1601
1624
|
}
|
|
1602
1625
|
// src/components/month-view/MonthView.tsx
|
|
1603
|
-
var
|
|
1604
|
-
function
|
|
1626
|
+
var hn = [];
|
|
1627
|
+
function gn(e) {
|
|
1605
1628
|
let { className: t, style: n, ...r } = e, { viewValue: i, eventMap: a, startWeek: o, disabled: s, getIsDayDisabled: l, onEventChange: d } = J(), f = K();
|
|
1606
|
-
|
|
1629
|
+
gt();
|
|
1607
1630
|
let p = u(null), m = c(() => L(f, i, o), [
|
|
1608
1631
|
f,
|
|
1609
1632
|
o,
|
|
1610
1633
|
i
|
|
1611
|
-
]), h = c(() =>
|
|
1634
|
+
]), h = c(() => Ut(m), [m]), g = c(() => de(f, o), [f, o]), _ = mn({
|
|
1612
1635
|
days: m,
|
|
1613
1636
|
viewportRef: p,
|
|
1614
1637
|
dateUtils: f,
|
|
@@ -1616,7 +1639,7 @@ function mn(e) {
|
|
|
1616
1639
|
disabled: s,
|
|
1617
1640
|
getIsDayDisabled: l,
|
|
1618
1641
|
onEventChange: d
|
|
1619
|
-
}), v =
|
|
1642
|
+
}), v = pn(p, 3), y = c(() => h.map((e) => x(a, f, e, v)), [
|
|
1620
1643
|
f,
|
|
1621
1644
|
a,
|
|
1622
1645
|
v,
|
|
@@ -1629,12 +1652,12 @@ function mn(e) {
|
|
|
1629
1652
|
_.eventMap,
|
|
1630
1653
|
h
|
|
1631
1654
|
]), S = c(() => ({ viewportRef: p }), []);
|
|
1632
|
-
return /* @__PURE__ */ G(
|
|
1655
|
+
return /* @__PURE__ */ G(Ft.Provider, {
|
|
1633
1656
|
value: S,
|
|
1634
1657
|
children: [/* @__PURE__ */ G("div", {
|
|
1635
1658
|
...r,
|
|
1636
1659
|
className: D(t, Z.root, { [Z.root_isResizing]: _.resizingKey !== void 0 }),
|
|
1637
|
-
style:
|
|
1660
|
+
style: Ht({ "--ww-month-lanes": v }, n),
|
|
1638
1661
|
children: [/* @__PURE__ */ W("div", {
|
|
1639
1662
|
className: Z.root__head,
|
|
1640
1663
|
children: g.map((e) => /* @__PURE__ */ W("div", {
|
|
@@ -1646,29 +1669,29 @@ function mn(e) {
|
|
|
1646
1669
|
children: /* @__PURE__ */ W("div", {
|
|
1647
1670
|
ref: p,
|
|
1648
1671
|
className: Z.root__viewport,
|
|
1649
|
-
children: h.map((e, t) => /* @__PURE__ */ W(
|
|
1672
|
+
children: h.map((e, t) => /* @__PURE__ */ W(fn, {
|
|
1650
1673
|
days: e,
|
|
1651
1674
|
firstDayIndex: t * 7,
|
|
1652
1675
|
layout: b[t],
|
|
1653
|
-
sourceBars: _.resizingKey === void 0 ?
|
|
1676
|
+
sourceBars: _.resizingKey === void 0 ? hn : y[t].bars.filter((e) => e.key === _.resizingKey),
|
|
1654
1677
|
lanes: v,
|
|
1655
1678
|
resizingKey: _.resizingKey,
|
|
1656
1679
|
resize: _.actions
|
|
1657
1680
|
}, f.toMillis(e[0])))
|
|
1658
1681
|
})
|
|
1659
1682
|
})]
|
|
1660
|
-
}), /* @__PURE__ */ W(
|
|
1683
|
+
}), /* @__PURE__ */ W(Vt, {
|
|
1661
1684
|
className: Z.root__dragOverlay,
|
|
1662
1685
|
showPreview: !1
|
|
1663
1686
|
})]
|
|
1664
1687
|
});
|
|
1665
1688
|
}
|
|
1666
1689
|
// src/hooks/useEventResize.ts
|
|
1667
|
-
var
|
|
1668
|
-
function
|
|
1690
|
+
var _n = 1440;
|
|
1691
|
+
function vn(e) {
|
|
1669
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);
|
|
1670
1693
|
h.current = e;
|
|
1671
|
-
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) => {
|
|
1672
1695
|
let i = m.current, c = r.current;
|
|
1673
1696
|
if (!i || !c) return;
|
|
1674
1697
|
i.x = e, i.y = n;
|
|
@@ -1733,9 +1756,9 @@ function gn(e) {
|
|
|
1733
1756
|
if (m.current = null, p(null), !e) return;
|
|
1734
1757
|
let [n, r] = e.range;
|
|
1735
1758
|
if (n === e.original[0] && r === e.original[1]) return;
|
|
1736
|
-
let i = Math.floor(n /
|
|
1737
|
-
h.current.onEventChange(e.key, M(a, t[0], i *
|
|
1738
|
-
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,
|
|
1739
1762
|
duration: r - n
|
|
1740
1763
|
});
|
|
1741
1764
|
}
|
|
@@ -1744,60 +1767,62 @@ function gn(e) {
|
|
|
1744
1767
|
t,
|
|
1745
1768
|
v
|
|
1746
1769
|
]), b = f !== null;
|
|
1747
|
-
i(() => {
|
|
1770
|
+
return i(() => {
|
|
1748
1771
|
if (!b) return;
|
|
1749
1772
|
let e = () => m.current && v(m.current.x, m.current.y);
|
|
1750
1773
|
return document.addEventListener("scroll", e, !0), () => document.removeEventListener("scroll", e, !0);
|
|
1751
|
-
}, [b, v])
|
|
1752
|
-
let x = f?.blocked ?? !1;
|
|
1753
|
-
return i(() => {
|
|
1754
|
-
if (x) return document.documentElement.classList.add("ww-cursor-not-allowed"), () => document.documentElement.classList.remove("ww-cursor-not-allowed");
|
|
1755
|
-
}, [x]), {
|
|
1774
|
+
}, [b, v]), et(f?.blocked ? "not-allowed" : null), {
|
|
1756
1775
|
state: f,
|
|
1757
1776
|
actions: y,
|
|
1758
1777
|
previewOf: (e) => {
|
|
1759
|
-
let n = Math.floor(e[0] /
|
|
1778
|
+
let n = Math.floor(e[0] / _n);
|
|
1760
1779
|
return {
|
|
1761
|
-
date: M(a, t[0], n *
|
|
1762
|
-
top: e[0] - n *
|
|
1780
|
+
date: M(a, t[0], n * _n),
|
|
1781
|
+
top: e[0] - n * _n - g,
|
|
1763
1782
|
duration: e[1] - e[0]
|
|
1764
1783
|
};
|
|
1765
1784
|
}
|
|
1766
1785
|
};
|
|
1767
1786
|
}
|
|
1768
1787
|
// src/contexts/DayWeekViewContext.ts
|
|
1769
|
-
var
|
|
1770
|
-
U && (
|
|
1771
|
-
function
|
|
1772
|
-
let e = r(
|
|
1788
|
+
var yn = e(void 0);
|
|
1789
|
+
U && (yn.displayName = "DayWeekViewContext");
|
|
1790
|
+
function bn() {
|
|
1791
|
+
let e = r(yn);
|
|
1773
1792
|
if (!e) throw Error("DayWeekViewContext is required");
|
|
1774
1793
|
return e;
|
|
1775
1794
|
}
|
|
1776
1795
|
// src/hooks/useTimeOffset.ts
|
|
1777
|
-
function
|
|
1778
|
-
let { hideMinMaxTime: n, hourMin: r, hourMax: i } = J(), a = K(), o = ()
|
|
1796
|
+
function xn(e = !0, t = 6e4) {
|
|
1797
|
+
let { hideMinMaxTime: n, hourMin: r, hourMax: i } = J(), a = K(), [o, s] = d(null);
|
|
1798
|
+
return mt(() => s(Date.now()), t, e), c(() => o === null ? [0, !0] : B(a, {
|
|
1779
1799
|
hourMin: r,
|
|
1780
1800
|
hourMax: i,
|
|
1781
1801
|
hideMinMaxTime: n
|
|
1782
|
-
}), [
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1802
|
+
}), [
|
|
1803
|
+
o,
|
|
1804
|
+
a,
|
|
1805
|
+
r,
|
|
1806
|
+
i,
|
|
1807
|
+
n
|
|
1808
|
+
]);
|
|
1809
|
+
}
|
|
1810
|
+
var Sn = {
|
|
1811
|
+
root: "_root_1l2ji_1",
|
|
1812
|
+
root_timeLimit: "_root_timeLimit_1l2ji_8",
|
|
1813
|
+
root_isToday: "_root_isToday_1l2ji_8",
|
|
1814
|
+
root_isPast: "_root_isPast_1l2ji_18",
|
|
1815
|
+
root__container: "_root__container_1l2ji_36",
|
|
1816
|
+
root__spotlight: "_root__spotlight_1l2ji_57",
|
|
1817
|
+
root__timeLine: "_root__timeLine_1l2ji_67",
|
|
1818
|
+
root_offLimits: "_root_offLimits_1l2ji_121"
|
|
1794
1819
|
};
|
|
1795
1820
|
// src/components/day-week-drawer/DayWeekDrawer.tsx
|
|
1796
|
-
function
|
|
1797
|
-
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 }) => ({
|
|
1798
1823
|
register: e,
|
|
1799
1824
|
getTransform: t
|
|
1800
|
-
})), F =
|
|
1825
|
+
})), F = gt(), I = c(() => {
|
|
1801
1826
|
let e = E(n);
|
|
1802
1827
|
return {
|
|
1803
1828
|
isToday: e,
|
|
@@ -1808,7 +1833,7 @@ function xn(e) {
|
|
|
1808
1833
|
E,
|
|
1809
1834
|
n,
|
|
1810
1835
|
F
|
|
1811
|
-
]), [{ isActive: L, transform: R }, z, { scrollAdjustmentActiveNodeRect: B }] =
|
|
1836
|
+
]), [{ isActive: L, transform: R }, z, { scrollAdjustmentActiveNodeRect: B }] = sn({
|
|
1812
1837
|
activeNode: j.current,
|
|
1813
1838
|
containerNode: j.current?.parentElement,
|
|
1814
1839
|
modifiers: [
|
|
@@ -1827,7 +1852,7 @@ function xn(e) {
|
|
|
1827
1852
|
C,
|
|
1828
1853
|
oe(O)
|
|
1829
1854
|
]
|
|
1830
|
-
}), [te, V] =
|
|
1855
|
+
}), [te, V] = xn(I.isToday);
|
|
1831
1856
|
i(() => {
|
|
1832
1857
|
let e = j.current;
|
|
1833
1858
|
if (e) return N(e, {
|
|
@@ -1836,7 +1861,7 @@ function xn(e) {
|
|
|
1836
1861
|
let [t] = await Promise.all(e.items.filter((e) => e.kind === "text" && e.types.has("event") && "getText" in e).map(async (e) => {
|
|
1837
1862
|
let t = await e.getText("event");
|
|
1838
1863
|
return JSON.parse(t);
|
|
1839
|
-
})), 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;
|
|
1840
1865
|
if (c && l + c.duration > 1440) {
|
|
1841
1866
|
if (v && (b > 0 || x < 24)) {
|
|
1842
1867
|
z.stop({
|
|
@@ -1892,7 +1917,7 @@ function xn(e) {
|
|
|
1892
1917
|
y,
|
|
1893
1918
|
I
|
|
1894
1919
|
]);
|
|
1895
|
-
let { listeners: ne } =
|
|
1920
|
+
let { listeners: ne } = lt({
|
|
1896
1921
|
distance: Math.max(Math.min(5, y), 1),
|
|
1897
1922
|
onMoveStart: (e) => {
|
|
1898
1923
|
if (!S) {
|
|
@@ -1940,7 +1965,7 @@ function xn(e) {
|
|
|
1940
1965
|
duration: k(R.height)
|
|
1941
1966
|
}));
|
|
1942
1967
|
}
|
|
1943
|
-
}), H =
|
|
1968
|
+
}), H = ct(j, t), re = A(w, te, {
|
|
1944
1969
|
hourMin: b,
|
|
1945
1970
|
hideMinMaxTime: _
|
|
1946
1971
|
}), ie = () => d.current?.(n, k(R.top), k(R.height));
|
|
@@ -1948,35 +1973,35 @@ function xn(e) {
|
|
|
1948
1973
|
...a,
|
|
1949
1974
|
...ne,
|
|
1950
1975
|
ref: H,
|
|
1951
|
-
className: D(a.className,
|
|
1952
|
-
[
|
|
1953
|
-
[
|
|
1954
|
-
[
|
|
1955
|
-
[
|
|
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
|
|
1956
1981
|
}),
|
|
1957
1982
|
style: {
|
|
1958
1983
|
...a.style,
|
|
1959
|
-
"--offset": te
|
|
1984
|
+
"--offset": te * g
|
|
1960
1985
|
},
|
|
1961
1986
|
children: [
|
|
1962
|
-
I.isToday && !V && /* @__PURE__ */ W(
|
|
1987
|
+
I.isToday && !V && /* @__PURE__ */ W(Dt, {
|
|
1963
1988
|
container: m.current,
|
|
1964
1989
|
children: /* @__PURE__ */ W("span", {
|
|
1965
1990
|
tabIndex: -1,
|
|
1966
|
-
className:
|
|
1991
|
+
className: Sn.root__timeLine,
|
|
1967
1992
|
"data-now": re,
|
|
1968
|
-
style: { "--offset": te }
|
|
1993
|
+
style: { "--offset": te * g }
|
|
1969
1994
|
})
|
|
1970
1995
|
}),
|
|
1971
1996
|
/* @__PURE__ */ W("div", {
|
|
1972
1997
|
ref: M,
|
|
1973
|
-
className:
|
|
1998
|
+
className: Sn.root__container,
|
|
1974
1999
|
children: r
|
|
1975
2000
|
}),
|
|
1976
2001
|
L && /* @__PURE__ */ G(ze, { children: [/* @__PURE__ */ W("div", {
|
|
1977
|
-
className:
|
|
2002
|
+
className: Sn.root__spotlight,
|
|
1978
2003
|
style: R ? { ...R } : void 0
|
|
1979
|
-
}), /* @__PURE__ */ W(
|
|
2004
|
+
}), /* @__PURE__ */ W(Rt, {
|
|
1980
2005
|
coordinates: {
|
|
1981
2006
|
x: R.x,
|
|
1982
2007
|
y: R.y
|
|
@@ -1986,11 +2011,11 @@ function xn(e) {
|
|
|
1986
2011
|
]
|
|
1987
2012
|
});
|
|
1988
2013
|
}
|
|
1989
|
-
function
|
|
2014
|
+
function wn(e, t, n) {
|
|
1990
2015
|
return Math.round(e / t / n) * n;
|
|
1991
2016
|
}
|
|
1992
2017
|
// src/hooks/useAbsEventRect.ts
|
|
1993
|
-
function
|
|
2018
|
+
function Tn(e, t) {
|
|
1994
2019
|
let [n, r] = d(null);
|
|
1995
2020
|
return Ke(() => {
|
|
1996
2021
|
let n = e.current, i = e.current?.parentElement;
|
|
@@ -2006,8 +2031,8 @@ function Cn(e, t) {
|
|
|
2006
2031
|
}, [e, ...Object.values(t)]), n;
|
|
2007
2032
|
}
|
|
2008
2033
|
// src/hooks/useCanResizeEvent.ts
|
|
2009
|
-
function
|
|
2010
|
-
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();
|
|
2011
2036
|
return Ke(() => {
|
|
2012
2037
|
if (t && i) {
|
|
2013
2038
|
if (a(e) && !o(e)) r(!1);
|
|
@@ -2026,20 +2051,20 @@ function wn(e, t) {
|
|
|
2026
2051
|
]), n;
|
|
2027
2052
|
}
|
|
2028
2053
|
var Q = {
|
|
2029
|
-
root: "
|
|
2030
|
-
root_isDragging: "
|
|
2031
|
-
root__resizeTop: "
|
|
2032
|
-
root__resizeBottom: "
|
|
2033
|
-
root_isResizing: "
|
|
2034
|
-
root_isDisabled: "
|
|
2035
|
-
root__container: "
|
|
2036
|
-
root__dragPreview: "
|
|
2037
|
-
root_isPreview: "
|
|
2038
|
-
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"
|
|
2039
2064
|
};
|
|
2040
2065
|
// src/components/day-week-event/DayWeekEvent.tsx
|
|
2041
|
-
function
|
|
2042
|
-
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 }) => {
|
|
2043
2068
|
let a = i(p.current), [o, s] = a ? [...n.dropTargets].pop() ?? [null, null] : [null, null];
|
|
2044
2069
|
return {
|
|
2045
2070
|
attributes: t.attributes,
|
|
@@ -2049,8 +2074,7 @@ function Tn(e) {
|
|
|
2049
2074
|
register: e,
|
|
2050
2075
|
setOverlayTransform: r
|
|
2051
2076
|
};
|
|
2052
|
-
}), A =
|
|
2053
|
-
autoScrollEnabled: !T,
|
|
2077
|
+
}), A = Zt(T ? E : null), [{ isActive: j, transform: M, context: N }, P] = sn({
|
|
2054
2078
|
activeNode: (e) => e === "overlay" ? p.current : e === "top" ? m.current : h.current,
|
|
2055
2079
|
containerNode: (e) => e === "overlay" ? g.current : p.current?.parentElement?.parentElement ?? null,
|
|
2056
2080
|
modifiers: [
|
|
@@ -2065,7 +2089,7 @@ function Tn(e) {
|
|
|
2065
2089
|
let [n, r] = _(O.date).map((e) => Math.ceil(e / l) * x);
|
|
2066
2090
|
return e.top < n && (e.top = n), e.top + e.height > r && (e.top = r - e.height), e;
|
|
2067
2091
|
},
|
|
2068
|
-
|
|
2092
|
+
On(x)
|
|
2069
2093
|
]
|
|
2070
2094
|
}), F = ve(() => y.end(), (e) => {
|
|
2071
2095
|
P.stop({
|
|
@@ -2084,8 +2108,8 @@ function Tn(e) {
|
|
|
2084
2108
|
}), y.move(e.clientX, e.clientY);
|
|
2085
2109
|
},
|
|
2086
2110
|
onMoveEnd: F
|
|
2087
|
-
}), { listeners: L } =
|
|
2088
|
-
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);
|
|
2089
2113
|
});
|
|
2090
2114
|
i(() => {
|
|
2091
2115
|
V(M);
|
|
@@ -2166,14 +2190,14 @@ function Tn(e) {
|
|
|
2166
2190
|
]
|
|
2167
2191
|
}) });
|
|
2168
2192
|
}
|
|
2169
|
-
function
|
|
2193
|
+
function On(e) {
|
|
2170
2194
|
return (t) => {
|
|
2171
2195
|
let n = [oe(e)];
|
|
2172
2196
|
return t.context === "overlay" && n.push(S), y(n, t);
|
|
2173
2197
|
};
|
|
2174
2198
|
}
|
|
2175
2199
|
// src/components/day-week-event/DayWeekEventPreview.tsx
|
|
2176
|
-
function
|
|
2200
|
+
function kn({ part: e, timelineMinutes: t, children: n }) {
|
|
2177
2201
|
let r = (e) => `${e / t * 100}%`;
|
|
2178
2202
|
return /* @__PURE__ */ W("div", {
|
|
2179
2203
|
"aria-hidden": "true",
|
|
@@ -2193,30 +2217,30 @@ function Dn({ part: e, timelineMinutes: t, children: n }) {
|
|
|
2193
2217
|
});
|
|
2194
2218
|
}
|
|
2195
2219
|
var $ = {
|
|
2196
|
-
root: "
|
|
2197
|
-
root_scrollable: "
|
|
2198
|
-
root__body: "
|
|
2199
|
-
root__head: "
|
|
2200
|
-
root__main: "
|
|
2201
|
-
root__viewport: "
|
|
2202
|
-
root__column: "
|
|
2203
|
-
root__headerCell: "
|
|
2204
|
-
root__headerCellDay: "
|
|
2205
|
-
root__headerCellLabel: "
|
|
2206
|
-
root__headerCellName: "
|
|
2207
|
-
root__headerCellToday: "
|
|
2208
|
-
root__row: "
|
|
2209
|
-
root__timeStep: "
|
|
2210
|
-
root__timeStep_overTime: "
|
|
2211
|
-
root__rowHeadTime: "
|
|
2212
|
-
root__hiddenEventsLayer: "
|
|
2213
|
-
root__hiddenEventsColumn: "
|
|
2214
|
-
root__hiddenEvents: "
|
|
2215
|
-
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"
|
|
2216
2240
|
};
|
|
2217
2241
|
// src/components/day-week-view/HiddenEvents.tsx
|
|
2218
|
-
function
|
|
2219
|
-
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(() => {
|
|
2220
2244
|
let t = e.current;
|
|
2221
2245
|
if (!t) return;
|
|
2222
2246
|
let n = {
|
|
@@ -2263,7 +2287,7 @@ function On({ scrollerRef: e, columns: t, rowHeight: n }) {
|
|
|
2263
2287
|
"data-direction": t,
|
|
2264
2288
|
"aria-label": t === "above" ? l.earlier(e.length) : l.later(e.length),
|
|
2265
2289
|
onClick: () => y(n),
|
|
2266
|
-
children: [/* @__PURE__ */ W(
|
|
2290
|
+
children: [/* @__PURE__ */ W(xt, {
|
|
2267
2291
|
"aria-hidden": "true",
|
|
2268
2292
|
className: $.root__hiddenEventsIcon
|
|
2269
2293
|
}), i]
|
|
@@ -2278,7 +2302,7 @@ function On({ scrollerRef: e, columns: t, rowHeight: n }) {
|
|
|
2278
2302
|
});
|
|
2279
2303
|
}
|
|
2280
2304
|
// src/components/day-week-view/useTimeColumnWidth.ts
|
|
2281
|
-
function
|
|
2305
|
+
function jn(e, t, n) {
|
|
2282
2306
|
let [r, i] = d();
|
|
2283
2307
|
return Ke(() => {
|
|
2284
2308
|
let t = !1, r = () => {
|
|
@@ -2304,13 +2328,13 @@ function kn(e, t, n) {
|
|
|
2304
2328
|
]), r;
|
|
2305
2329
|
}
|
|
2306
2330
|
// src/components/day-week-view/DayWeekView.tsx
|
|
2307
|
-
var
|
|
2331
|
+
var Mn = {
|
|
2308
2332
|
regular: 64,
|
|
2309
2333
|
compact: 44,
|
|
2310
2334
|
narrow: 40
|
|
2311
2335
|
};
|
|
2312
|
-
function
|
|
2313
|
-
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, {
|
|
2314
2338
|
hourMin: i,
|
|
2315
2339
|
hourMax: a,
|
|
2316
2340
|
hideMinMaxTime: g
|
|
@@ -2321,7 +2345,7 @@ function jn({ rowHeight: e, ...t }) {
|
|
|
2321
2345
|
a,
|
|
2322
2346
|
g,
|
|
2323
2347
|
l
|
|
2324
|
-
]), P =
|
|
2348
|
+
]), P = jn(j, c(() => N.map(({ time: e }) => e), [N]), Mn[h]), F = c(() => ue(S, o, r), [
|
|
2325
2349
|
S,
|
|
2326
2350
|
o,
|
|
2327
2351
|
r
|
|
@@ -2339,7 +2363,7 @@ function jn({ rowHeight: e, ...t }) {
|
|
|
2339
2363
|
N.length,
|
|
2340
2364
|
F,
|
|
2341
2365
|
I
|
|
2342
|
-
]), 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({
|
|
2343
2367
|
days: F,
|
|
2344
2368
|
viewportRef: j,
|
|
2345
2369
|
dateUtils: S,
|
|
@@ -2383,7 +2407,7 @@ function jn({ rowHeight: e, ...t }) {
|
|
|
2383
2407
|
E,
|
|
2384
2408
|
O,
|
|
2385
2409
|
k
|
|
2386
|
-
]), 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(() => ({
|
|
2387
2411
|
viewportRef: j,
|
|
2388
2412
|
getTimeFrame: H,
|
|
2389
2413
|
pxPerMinute: A / 60,
|
|
@@ -2395,7 +2419,7 @@ function jn({ rowHeight: e, ...t }) {
|
|
|
2395
2419
|
A,
|
|
2396
2420
|
B,
|
|
2397
2421
|
z
|
|
2398
|
-
]), ve = c(() => ({ viewportRef: j }), [j]), ye = (e, t) => /* @__PURE__ */ W(
|
|
2422
|
+
]), ve = c(() => ({ viewportRef: j }), [j]), ye = (e, t) => /* @__PURE__ */ W(Dn, {
|
|
2399
2423
|
"data-idx": t,
|
|
2400
2424
|
eventData: e,
|
|
2401
2425
|
children: d.current?.(e.value, o, {
|
|
@@ -2403,9 +2427,9 @@ function jn({ rowHeight: e, ...t }) {
|
|
|
2403
2427
|
isEnd: e.isEnd
|
|
2404
2428
|
})
|
|
2405
2429
|
}, e.key);
|
|
2406
|
-
return /* @__PURE__ */ W(
|
|
2430
|
+
return /* @__PURE__ */ W(yn.Provider, {
|
|
2407
2431
|
value: _e,
|
|
2408
|
-
children: /* @__PURE__ */ W(
|
|
2432
|
+
children: /* @__PURE__ */ W(Ft.Provider, {
|
|
2409
2433
|
value: ve,
|
|
2410
2434
|
children: /* @__PURE__ */ G(ze, { children: [
|
|
2411
2435
|
/* @__PURE__ */ G("div", {
|
|
@@ -2464,10 +2488,10 @@ function jn({ rowHeight: e, ...t }) {
|
|
|
2464
2488
|
className: de,
|
|
2465
2489
|
"data-day-index": t,
|
|
2466
2490
|
...e.attributes,
|
|
2467
|
-
children: /* @__PURE__ */ G(
|
|
2491
|
+
children: /* @__PURE__ */ G(Cn, {
|
|
2468
2492
|
id: `${e.weekDayNumber}`,
|
|
2469
2493
|
targetDate: e.targetDate,
|
|
2470
|
-
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, {
|
|
2471
2495
|
part: e,
|
|
2472
2496
|
timelineMinutes: N.length * 60,
|
|
2473
2497
|
children: ne === void 0 ? null : d.current?.(ne, o, {
|
|
@@ -2478,15 +2502,15 @@ function jn({ rowHeight: e, ...t }) {
|
|
|
2478
2502
|
})
|
|
2479
2503
|
}, e.weekDayNumber))]
|
|
2480
2504
|
})
|
|
2481
|
-
}), p && /* @__PURE__ */ W(
|
|
2505
|
+
}), p && /* @__PURE__ */ W(An, {
|
|
2482
2506
|
scrollerRef: M,
|
|
2483
2507
|
columns: R,
|
|
2484
2508
|
rowHeight: A
|
|
2485
2509
|
})]
|
|
2486
2510
|
})]
|
|
2487
2511
|
}),
|
|
2488
|
-
/* @__PURE__ */ W(
|
|
2489
|
-
z && !z.blocked && /* @__PURE__ */ W(
|
|
2512
|
+
/* @__PURE__ */ W(Vt, { pxPerMinute: A / 60 }),
|
|
2513
|
+
z && !z.blocked && /* @__PURE__ */ W(Rt, {
|
|
2490
2514
|
coordinates: {
|
|
2491
2515
|
x: z.x,
|
|
2492
2516
|
y: z.y
|
|
@@ -2500,14 +2524,14 @@ function jn({ rowHeight: e, ...t }) {
|
|
|
2500
2524
|
})
|
|
2501
2525
|
});
|
|
2502
2526
|
}
|
|
2503
|
-
var
|
|
2504
|
-
root: "
|
|
2505
|
-
root__head: "
|
|
2506
|
-
root__body: "
|
|
2507
|
-
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"
|
|
2508
2532
|
};
|
|
2509
2533
|
// src/Calendar.tsx
|
|
2510
|
-
function
|
|
2534
|
+
function Fn(e) {
|
|
2511
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 } = {
|
|
2512
2536
|
hourMin: 0,
|
|
2513
2537
|
hourMax: 24,
|
|
@@ -2515,7 +2539,7 @@ function Nn(e) {
|
|
|
2515
2539
|
}, M = Ye({
|
|
2516
2540
|
eventTimeFrameResolver: g,
|
|
2517
2541
|
eventKeyResolver: _
|
|
2518
|
-
}), 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({
|
|
2519
2543
|
view: x,
|
|
2520
2544
|
defaultView: S,
|
|
2521
2545
|
viewValue: C,
|
|
@@ -2524,7 +2548,7 @@ function Nn(e) {
|
|
|
2524
2548
|
onChangeViewValue: O,
|
|
2525
2549
|
dateUtils: N,
|
|
2526
2550
|
startWeek: P
|
|
2527
|
-
}), V = Je(I), ne =
|
|
2551
|
+
}), V = Je(I), ne = nt(() => je({ input: "pointer" })).current, H = c(() => w(d, M.current, N, {
|
|
2528
2552
|
hourMin: A,
|
|
2529
2553
|
hideMinMaxTime: a
|
|
2530
2554
|
}), [
|
|
@@ -2533,7 +2557,7 @@ function Nn(e) {
|
|
|
2533
2557
|
A,
|
|
2534
2558
|
d,
|
|
2535
2559
|
M
|
|
2536
|
-
]), { goBackward: re, goForward: ie, goToday: ae } =
|
|
2560
|
+
]), { goBackward: re, goForward: ie, goToday: ae } = bt({
|
|
2537
2561
|
changeViewValue: z,
|
|
2538
2562
|
dateUtils: N,
|
|
2539
2563
|
startWeek: P,
|
|
@@ -2615,26 +2639,26 @@ function Nn(e) {
|
|
|
2615
2639
|
]);
|
|
2616
2640
|
return /* @__PURE__ */ W("div", {
|
|
2617
2641
|
...U,
|
|
2618
|
-
className: D(U.className,
|
|
2642
|
+
className: D(U.className, Pn.root),
|
|
2619
2643
|
"data-ww-size": V === "regular" ? void 0 : V,
|
|
2620
|
-
children: /* @__PURE__ */ W(
|
|
2644
|
+
children: /* @__PURE__ */ W(_t.Provider, {
|
|
2621
2645
|
value: pe,
|
|
2622
2646
|
children: /* @__PURE__ */ W(Me.Provider, {
|
|
2623
2647
|
value: ne,
|
|
2624
|
-
children: /* @__PURE__ */ G(
|
|
2648
|
+
children: /* @__PURE__ */ G(vt.Provider, {
|
|
2625
2649
|
value: I,
|
|
2626
2650
|
children: [/* @__PURE__ */ W("div", {
|
|
2627
|
-
className:
|
|
2628
|
-
children: /* @__PURE__ */ W(
|
|
2651
|
+
className: Pn.root__head,
|
|
2652
|
+
children: /* @__PURE__ */ W(Pt, {})
|
|
2629
2653
|
}), /* @__PURE__ */ W("div", {
|
|
2630
|
-
className:
|
|
2631
|
-
children: W(B === "month" ?
|
|
2654
|
+
className: Pn.root__body,
|
|
2655
|
+
children: W(B === "month" ? gn : Nn, {})
|
|
2632
2656
|
})]
|
|
2633
2657
|
})
|
|
2634
2658
|
})
|
|
2635
2659
|
})
|
|
2636
2660
|
});
|
|
2637
2661
|
}
|
|
2638
|
-
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 };
|
|
2639
2663
|
|
|
2640
2664
|
//# sourceMappingURL=index.js.map
|