calendarkit-prov2 2.0.9 → 2.0.11
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 +14 -0
- package/dist/index.d.mts +13 -3
- package/dist/index.d.ts +13 -3
- package/dist/index.js +597 -444
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +517 -364
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var React18 = require('react');
|
|
4
4
|
var reactDom = require('react-dom');
|
|
5
5
|
var core = require('@dnd-kit/core');
|
|
6
6
|
var modifiers = require('@dnd-kit/modifiers');
|
|
@@ -33,7 +33,7 @@ function _interopNamespace(e) {
|
|
|
33
33
|
return Object.freeze(n);
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
var
|
|
36
|
+
var React18__namespace = /*#__PURE__*/_interopNamespace(React18);
|
|
37
37
|
|
|
38
38
|
function cn(...inputs) {
|
|
39
39
|
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
@@ -65,10 +65,10 @@ var buttonVariants = classVarianceAuthority.cva(
|
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
);
|
|
68
|
-
var Button =
|
|
68
|
+
var Button = React18__namespace.forwardRef(
|
|
69
69
|
({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
70
70
|
const Comp = "button";
|
|
71
|
-
return /* @__PURE__ */
|
|
71
|
+
return /* @__PURE__ */ React18__namespace.createElement(
|
|
72
72
|
Comp,
|
|
73
73
|
{
|
|
74
74
|
className: cn(buttonVariants({ variant, size, className })),
|
|
@@ -179,6 +179,8 @@ var tr = {
|
|
|
179
179
|
tomorrow: "Yar\u0131n",
|
|
180
180
|
eventCount: "etkinlik",
|
|
181
181
|
eventsCount: "etkinlik",
|
|
182
|
+
hourCount: "saat",
|
|
183
|
+
hoursCount: "saat",
|
|
182
184
|
timezone: "Zaman Dilimi",
|
|
183
185
|
localTime: "Yerel Saat",
|
|
184
186
|
operations: "\u0130\u015Flemler",
|
|
@@ -272,6 +274,8 @@ var en = {
|
|
|
272
274
|
tomorrow: "Tomorrow",
|
|
273
275
|
eventCount: "event",
|
|
274
276
|
eventsCount: "events",
|
|
277
|
+
hourCount: "hour",
|
|
278
|
+
hoursCount: "hours",
|
|
275
279
|
timezone: "Time zone",
|
|
276
280
|
localTime: "Local Time",
|
|
277
281
|
operations: "Operations",
|
|
@@ -365,6 +369,8 @@ var fr = {
|
|
|
365
369
|
tomorrow: "Demain",
|
|
366
370
|
eventCount: "\xE9v\xE9nement",
|
|
367
371
|
eventsCount: "\xE9v\xE9nements",
|
|
372
|
+
hourCount: "heure",
|
|
373
|
+
hoursCount: "heures",
|
|
368
374
|
timezone: "Fuseau horaire",
|
|
369
375
|
localTime: "Heure locale",
|
|
370
376
|
operations: "Op\xE9rations",
|
|
@@ -458,6 +464,8 @@ var de = {
|
|
|
458
464
|
tomorrow: "Morgen",
|
|
459
465
|
eventCount: "Termin",
|
|
460
466
|
eventsCount: "Termine",
|
|
467
|
+
hourCount: "Stunde",
|
|
468
|
+
hoursCount: "Stunden",
|
|
461
469
|
timezone: "Zeitzone",
|
|
462
470
|
localTime: "Ortszeit",
|
|
463
471
|
operations: "Aktionen",
|
|
@@ -551,6 +559,8 @@ var es = {
|
|
|
551
559
|
tomorrow: "Ma\xF1ana",
|
|
552
560
|
eventCount: "evento",
|
|
553
561
|
eventsCount: "eventos",
|
|
562
|
+
hourCount: "hora",
|
|
563
|
+
hoursCount: "horas",
|
|
554
564
|
timezone: "Zona horaria",
|
|
555
565
|
localTime: "Hora local",
|
|
556
566
|
operations: "Operaciones",
|
|
@@ -644,6 +654,8 @@ var it = {
|
|
|
644
654
|
tomorrow: "Domani",
|
|
645
655
|
eventCount: "evento",
|
|
646
656
|
eventsCount: "eventi",
|
|
657
|
+
hourCount: "ora",
|
|
658
|
+
hoursCount: "ore",
|
|
647
659
|
timezone: "Fuso orario",
|
|
648
660
|
localTime: "Ora locale",
|
|
649
661
|
operations: "Operazioni",
|
|
@@ -737,6 +749,8 @@ var pt = {
|
|
|
737
749
|
tomorrow: "Amanh\xE3",
|
|
738
750
|
eventCount: "evento",
|
|
739
751
|
eventsCount: "eventos",
|
|
752
|
+
hourCount: "hora",
|
|
753
|
+
hoursCount: "horas",
|
|
740
754
|
timezone: "Fuso hor\xE1rio",
|
|
741
755
|
localTime: "Hora local",
|
|
742
756
|
operations: "Opera\xE7\xF5es",
|
|
@@ -830,6 +844,8 @@ var ar = {
|
|
|
830
844
|
tomorrow: "\u063A\u062F\u064B\u0627",
|
|
831
845
|
eventCount: "\u062D\u062F\u062B",
|
|
832
846
|
eventsCount: "\u0623\u062D\u062F\u0627\u062B",
|
|
847
|
+
hourCount: "\u0633\u0627\u0639\u0629",
|
|
848
|
+
hoursCount: "\u0633\u0627\u0639\u0627\u062A",
|
|
833
849
|
timezone: "\u0627\u0644\u0645\u0646\u0637\u0642\u0629 \u0627\u0644\u0632\u0645\u0646\u064A\u0629",
|
|
834
850
|
localTime: "\u0627\u0644\u062A\u0648\u0642\u064A\u062A \u0627\u0644\u0645\u062D\u0644\u064A",
|
|
835
851
|
operations: "\u0627\u0644\u0639\u0645\u0644\u064A\u0627\u062A",
|
|
@@ -923,6 +939,8 @@ var zh = {
|
|
|
923
939
|
tomorrow: "\u660E\u5929",
|
|
924
940
|
eventCount: "\u4E2A\u6D3B\u52A8",
|
|
925
941
|
eventsCount: "\u4E2A\u6D3B\u52A8",
|
|
942
|
+
hourCount: "\u5C0F\u65F6",
|
|
943
|
+
hoursCount: "\u5C0F\u65F6",
|
|
926
944
|
timezone: "\u65F6\u533A",
|
|
927
945
|
localTime: "\u672C\u5730\u65F6\u95F4",
|
|
928
946
|
operations: "\u64CD\u4F5C",
|
|
@@ -1016,6 +1034,8 @@ var ja = {
|
|
|
1016
1034
|
tomorrow: "\u660E\u65E5",
|
|
1017
1035
|
eventCount: "\u4EF6\u306E\u30A4\u30D9\u30F3\u30C8",
|
|
1018
1036
|
eventsCount: "\u4EF6\u306E\u30A4\u30D9\u30F3\u30C8",
|
|
1037
|
+
hourCount: "\u6642\u9593",
|
|
1038
|
+
hoursCount: "\u6642\u9593",
|
|
1019
1039
|
timezone: "\u30BF\u30A4\u30E0\u30BE\u30FC\u30F3",
|
|
1020
1040
|
localTime: "\u30ED\u30FC\u30AB\u30EB\u6642\u9593",
|
|
1021
1041
|
operations: "\u64CD\u4F5C",
|
|
@@ -1109,6 +1129,8 @@ var ko = {
|
|
|
1109
1129
|
tomorrow: "\uB0B4\uC77C",
|
|
1110
1130
|
eventCount: "\uAC1C \uC77C\uC815",
|
|
1111
1131
|
eventsCount: "\uAC1C \uC77C\uC815",
|
|
1132
|
+
hourCount: "\uC2DC\uAC04",
|
|
1133
|
+
hoursCount: "\uC2DC\uAC04",
|
|
1112
1134
|
timezone: "\uC2DC\uAC04\uB300",
|
|
1113
1135
|
localTime: "\uB85C\uCEEC \uC2DC\uAC04",
|
|
1114
1136
|
operations: "\uC791\uC5C5",
|
|
@@ -1202,6 +1224,8 @@ var ru = {
|
|
|
1202
1224
|
tomorrow: "\u0417\u0430\u0432\u0442\u0440\u0430",
|
|
1203
1225
|
eventCount: "\u0441\u043E\u0431\u044B\u0442\u0438\u0435",
|
|
1204
1226
|
eventsCount: "\u0441\u043E\u0431\u044B\u0442\u0438\u0439",
|
|
1227
|
+
hourCount: "\u0447\u0430\u0441",
|
|
1228
|
+
hoursCount: "\u0447\u0430\u0441\u043E\u0432",
|
|
1205
1229
|
timezone: "\u0427\u0430\u0441\u043E\u0432\u043E\u0439 \u043F\u043E\u044F\u0441",
|
|
1206
1230
|
localTime: "\u041C\u0435\u0441\u0442\u043D\u043E\u0435 \u0432\u0440\u0435\u043C\u044F",
|
|
1207
1231
|
operations: "\u041E\u043F\u0435\u0440\u0430\u0446\u0438\u0438",
|
|
@@ -1295,6 +1319,8 @@ var nl = {
|
|
|
1295
1319
|
tomorrow: "Morgen",
|
|
1296
1320
|
eventCount: "evenement",
|
|
1297
1321
|
eventsCount: "evenementen",
|
|
1322
|
+
hourCount: "uur",
|
|
1323
|
+
hoursCount: "uur",
|
|
1298
1324
|
timezone: "Tijdzone",
|
|
1299
1325
|
localTime: "Lokale tijd",
|
|
1300
1326
|
operations: "Bewerkingen",
|
|
@@ -1388,6 +1414,8 @@ var pl = {
|
|
|
1388
1414
|
tomorrow: "Jutro",
|
|
1389
1415
|
eventCount: "wydarzenie",
|
|
1390
1416
|
eventsCount: "wydarze\u0144",
|
|
1417
|
+
hourCount: "godzina",
|
|
1418
|
+
hoursCount: "godzin",
|
|
1391
1419
|
timezone: "Strefa czasowa",
|
|
1392
1420
|
localTime: "Czas lokalny",
|
|
1393
1421
|
operations: "Operacje",
|
|
@@ -1481,6 +1509,8 @@ var sv = {
|
|
|
1481
1509
|
tomorrow: "Imorgon",
|
|
1482
1510
|
eventCount: "h\xE4ndelse",
|
|
1483
1511
|
eventsCount: "h\xE4ndelser",
|
|
1512
|
+
hourCount: "timme",
|
|
1513
|
+
hoursCount: "timmar",
|
|
1484
1514
|
timezone: "Tidszon",
|
|
1485
1515
|
localTime: "Lokal tid",
|
|
1486
1516
|
operations: "\xC5tg\xE4rder",
|
|
@@ -1563,35 +1593,36 @@ var CalendarHeader = ({
|
|
|
1563
1593
|
activeCustomViewId,
|
|
1564
1594
|
onCustomViewChange,
|
|
1565
1595
|
eventCount,
|
|
1596
|
+
hourCount,
|
|
1566
1597
|
hideLanguageSwitcher = false
|
|
1567
1598
|
}) => {
|
|
1568
|
-
const [isLangOpen, setIsLangOpen] =
|
|
1569
|
-
const [isCustomViewOpen, setIsCustomViewOpen] =
|
|
1570
|
-
const langButtonRef =
|
|
1571
|
-
const langDropdownRef =
|
|
1572
|
-
const customViewDropdownRef =
|
|
1573
|
-
const customViewButtonRef =
|
|
1574
|
-
const [langPos, setLangPos] =
|
|
1575
|
-
const [customViewPos, setCustomViewPos] =
|
|
1576
|
-
const updateLangPos =
|
|
1599
|
+
const [isLangOpen, setIsLangOpen] = React18.useState(false);
|
|
1600
|
+
const [isCustomViewOpen, setIsCustomViewOpen] = React18.useState(false);
|
|
1601
|
+
const langButtonRef = React18.useRef(null);
|
|
1602
|
+
const langDropdownRef = React18.useRef(null);
|
|
1603
|
+
const customViewDropdownRef = React18.useRef(null);
|
|
1604
|
+
const customViewButtonRef = React18.useRef(null);
|
|
1605
|
+
const [langPos, setLangPos] = React18.useState(null);
|
|
1606
|
+
const [customViewPos, setCustomViewPos] = React18.useState(null);
|
|
1607
|
+
const updateLangPos = React18.useCallback(() => {
|
|
1577
1608
|
const el = langButtonRef.current;
|
|
1578
1609
|
if (!el) return;
|
|
1579
1610
|
setLangPos(getDropdownPosition(el.getBoundingClientRect(), LANG_DROPDOWN_WIDTH));
|
|
1580
1611
|
}, []);
|
|
1581
|
-
const updateCustomViewPos =
|
|
1612
|
+
const updateCustomViewPos = React18.useCallback(() => {
|
|
1582
1613
|
const el = customViewButtonRef.current;
|
|
1583
1614
|
if (!el) return;
|
|
1584
1615
|
setCustomViewPos(getDropdownPosition(el.getBoundingClientRect(), CUSTOM_VIEW_DROPDOWN_WIDTH));
|
|
1585
1616
|
}, []);
|
|
1586
|
-
|
|
1617
|
+
React18.useLayoutEffect(() => {
|
|
1587
1618
|
if (!isLangOpen) return;
|
|
1588
1619
|
updateLangPos();
|
|
1589
1620
|
}, [isLangOpen, updateLangPos]);
|
|
1590
|
-
|
|
1621
|
+
React18.useLayoutEffect(() => {
|
|
1591
1622
|
if (!isCustomViewOpen) return;
|
|
1592
1623
|
updateCustomViewPos();
|
|
1593
1624
|
}, [isCustomViewOpen, updateCustomViewPos]);
|
|
1594
|
-
|
|
1625
|
+
React18.useEffect(() => {
|
|
1595
1626
|
if (!isLangOpen) return;
|
|
1596
1627
|
const handle = () => updateLangPos();
|
|
1597
1628
|
window.addEventListener("resize", handle);
|
|
@@ -1601,7 +1632,7 @@ var CalendarHeader = ({
|
|
|
1601
1632
|
window.removeEventListener("scroll", handle, true);
|
|
1602
1633
|
};
|
|
1603
1634
|
}, [isLangOpen, updateLangPos]);
|
|
1604
|
-
|
|
1635
|
+
React18.useEffect(() => {
|
|
1605
1636
|
if (!isCustomViewOpen) return;
|
|
1606
1637
|
const handle = () => updateCustomViewPos();
|
|
1607
1638
|
window.addEventListener("resize", handle);
|
|
@@ -1611,7 +1642,7 @@ var CalendarHeader = ({
|
|
|
1611
1642
|
window.removeEventListener("scroll", handle, true);
|
|
1612
1643
|
};
|
|
1613
1644
|
}, [isCustomViewOpen, updateCustomViewPos]);
|
|
1614
|
-
|
|
1645
|
+
React18.useEffect(() => {
|
|
1615
1646
|
const handleClickOutside = (e) => {
|
|
1616
1647
|
const target = e.target;
|
|
1617
1648
|
const insideButton = langButtonRef.current?.contains(target);
|
|
@@ -1621,7 +1652,7 @@ var CalendarHeader = ({
|
|
|
1621
1652
|
if (isLangOpen) document.addEventListener("mousedown", handleClickOutside);
|
|
1622
1653
|
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
1623
1654
|
}, [isLangOpen]);
|
|
1624
|
-
|
|
1655
|
+
React18.useEffect(() => {
|
|
1625
1656
|
const handleClickOutside = (e) => {
|
|
1626
1657
|
const target = e.target;
|
|
1627
1658
|
const insideButton = customViewButtonRef.current?.contains(target);
|
|
@@ -1638,7 +1669,7 @@ var CalendarHeader = ({
|
|
|
1638
1669
|
{ key: "agenda", icon: lucideReact.ListTodo }
|
|
1639
1670
|
];
|
|
1640
1671
|
const currentLang = LANGUAGE_META[language] ?? LANGUAGE_META["tr"];
|
|
1641
|
-
return /* @__PURE__ */
|
|
1672
|
+
return /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex flex-col md:flex-row items-center justify-between px-3 md:px-5 py-3 border-b-[0px] border-border/50 bg-gradient-to-r from-background via-background to-muted/20 gap-3 md:gap-0 min-h-[64px]" }, /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex items-center gap-2 w-full md:w-auto justify-between md:justify-start" }, /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex items-center gap-2 md:gap-3" }, /* @__PURE__ */ React18__namespace.default.createElement(
|
|
1642
1673
|
Button,
|
|
1643
1674
|
{
|
|
1644
1675
|
variant: "ghost",
|
|
@@ -1646,8 +1677,8 @@ var CalendarHeader = ({
|
|
|
1646
1677
|
className: "text-muted-foreground hover:text-foreground hover:bg-accent/80 rounded-xl h-10 w-10 transition-all duration-200",
|
|
1647
1678
|
onClick: onMenuClick
|
|
1648
1679
|
},
|
|
1649
|
-
/* @__PURE__ */
|
|
1650
|
-
), /* @__PURE__ */
|
|
1680
|
+
/* @__PURE__ */ React18__namespace.default.createElement(lucideReact.Menu, { className: "h-5 w-5" })
|
|
1681
|
+
), /* @__PURE__ */ React18__namespace.default.createElement(
|
|
1651
1682
|
Button,
|
|
1652
1683
|
{
|
|
1653
1684
|
variant: "outline",
|
|
@@ -1655,15 +1686,15 @@ var CalendarHeader = ({
|
|
|
1655
1686
|
className: "h-9 px-5 rounded-xl text-sm font-medium hidden sm:inline-flex border-[0.5px] border-border/60 hover:border-primary/40 hover:bg-primary/5 hover:text-primary transition-all duration-200"
|
|
1656
1687
|
},
|
|
1657
1688
|
translations.today
|
|
1658
|
-
), onCreateEvent && /* @__PURE__ */
|
|
1689
|
+
), onCreateEvent && /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "relative group hidden sm:block" }, /* @__PURE__ */ React18__namespace.default.createElement(
|
|
1659
1690
|
Button,
|
|
1660
1691
|
{
|
|
1661
1692
|
onClick: onCreateEvent,
|
|
1662
1693
|
size: "icon",
|
|
1663
1694
|
className: "h-9 w-9 rounded-xl shadow-sm shadow-primary/20 transition-all duration-200"
|
|
1664
1695
|
},
|
|
1665
|
-
/* @__PURE__ */
|
|
1666
|
-
), /* @__PURE__ */
|
|
1696
|
+
/* @__PURE__ */ React18__namespace.default.createElement(lucideReact.Plus, { className: "h-4 w-4" })
|
|
1697
|
+
), /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "pointer-events-none absolute left-1/2 -translate-x-1/2 top-full mt-2 z-50 opacity-0 group-hover:opacity-100 transition-opacity duration-150" }, /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "bg-popover text-popover-foreground text-xs font-medium px-2.5 py-1.5 rounded-lg shadow-md border border-border/60 whitespace-nowrap" }, translations.createEvent ?? translations.create), /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "absolute -top-1 left-1/2 -translate-x-1/2 w-2 h-2 bg-popover border-l border-t border-border/60 rotate-45" }))), /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex items-center bg-muted/40 rounded-xl p-0.5" }, /* @__PURE__ */ React18__namespace.default.createElement(
|
|
1667
1698
|
Button,
|
|
1668
1699
|
{
|
|
1669
1700
|
variant: "ghost",
|
|
@@ -1671,8 +1702,8 @@ var CalendarHeader = ({
|
|
|
1671
1702
|
onClick: onPrev,
|
|
1672
1703
|
className: "rounded-lg h-8 w-8 hover:bg-background/80 transition-all duration-200"
|
|
1673
1704
|
},
|
|
1674
|
-
/* @__PURE__ */
|
|
1675
|
-
), /* @__PURE__ */
|
|
1705
|
+
/* @__PURE__ */ React18__namespace.default.createElement(lucideReact.ChevronLeft, { className: "h-4 w-4 text-muted-foreground" })
|
|
1706
|
+
), /* @__PURE__ */ React18__namespace.default.createElement(
|
|
1676
1707
|
Button,
|
|
1677
1708
|
{
|
|
1678
1709
|
variant: "ghost",
|
|
@@ -1680,8 +1711,8 @@ var CalendarHeader = ({
|
|
|
1680
1711
|
onClick: onNext,
|
|
1681
1712
|
className: "rounded-lg h-8 w-8 hover:bg-background/80 transition-all duration-200"
|
|
1682
1713
|
},
|
|
1683
|
-
/* @__PURE__ */
|
|
1684
|
-
)), /* @__PURE__ */
|
|
1714
|
+
/* @__PURE__ */ React18__namespace.default.createElement(lucideReact.ChevronRight, { className: "h-4 w-4 text-muted-foreground" })
|
|
1715
|
+
)), /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "ml-2 md:ml-4 hidden sm:block" }, /* @__PURE__ */ React18__namespace.default.createElement("h2", { className: "text-lg md:text-xl font-semibold text-foreground whitespace-nowrap capitalize tracking-tight" }, dateFns.format(currentDate, "MMMM yyyy", { locale })))), /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "sm:hidden" }, /* @__PURE__ */ React18__namespace.default.createElement("h2", { className: "text-lg font-semibold text-foreground whitespace-nowrap capitalize tracking-tight" }, dateFns.format(currentDate, "MMMM yyyy", { locale })))), /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex items-center gap-2 md:gap-3 w-full md:w-auto justify-end" }, onLanguageChange && !hideLanguageSwitcher && /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "relative" }, /* @__PURE__ */ React18__namespace.default.createElement(
|
|
1685
1716
|
"button",
|
|
1686
1717
|
{
|
|
1687
1718
|
ref: langButtonRef,
|
|
@@ -1693,20 +1724,20 @@ var CalendarHeader = ({
|
|
|
1693
1724
|
),
|
|
1694
1725
|
title: currentLang.english
|
|
1695
1726
|
},
|
|
1696
|
-
/* @__PURE__ */
|
|
1697
|
-
/* @__PURE__ */
|
|
1698
|
-
/* @__PURE__ */
|
|
1699
|
-
/* @__PURE__ */
|
|
1727
|
+
/* @__PURE__ */ React18__namespace.default.createElement(lucideReact.Globe, { className: "h-3.5 w-3.5" }),
|
|
1728
|
+
/* @__PURE__ */ React18__namespace.default.createElement("span", { className: "text-base leading-none" }, currentLang.flag),
|
|
1729
|
+
/* @__PURE__ */ React18__namespace.default.createElement("span", { className: "hidden sm:inline text-xs font-semibold uppercase tracking-wider" }, language),
|
|
1730
|
+
/* @__PURE__ */ React18__namespace.default.createElement(lucideReact.ChevronDown, { className: cn("h-3.5 w-3.5 transition-transform duration-200", isLangOpen && "rotate-180") })
|
|
1700
1731
|
), isLangOpen && langPos && reactDom.createPortal(
|
|
1701
|
-
/* @__PURE__ */
|
|
1732
|
+
/* @__PURE__ */ React18__namespace.default.createElement(
|
|
1702
1733
|
"div",
|
|
1703
1734
|
{
|
|
1704
1735
|
ref: langDropdownRef,
|
|
1705
1736
|
className: "fixed w-52 bg-background border border-border/60 rounded-2xl shadow-2xl z-[9999] overflow-hidden py-1.5",
|
|
1706
1737
|
style: { top: langPos.top, left: langPos.left, width: LANG_DROPDOWN_WIDTH }
|
|
1707
1738
|
},
|
|
1708
|
-
/* @__PURE__ */
|
|
1709
|
-
/* @__PURE__ */
|
|
1739
|
+
/* @__PURE__ */ React18__namespace.default.createElement("div", { className: "px-3 py-2 border-b border-border/40 mb-1" }, /* @__PURE__ */ React18__namespace.default.createElement("p", { className: "text-xs font-semibold text-muted-foreground uppercase tracking-wider" }, "Language / Dil")),
|
|
1740
|
+
/* @__PURE__ */ React18__namespace.default.createElement("div", { className: "max-h-72 overflow-y-auto" }, Object.entries(LANGUAGE_META).map(([code, meta]) => /* @__PURE__ */ React18__namespace.default.createElement(
|
|
1710
1741
|
"button",
|
|
1711
1742
|
{
|
|
1712
1743
|
key: code,
|
|
@@ -1720,13 +1751,13 @@ var CalendarHeader = ({
|
|
|
1720
1751
|
language === code ? "bg-primary/10 text-primary font-semibold" : "text-foreground"
|
|
1721
1752
|
)
|
|
1722
1753
|
},
|
|
1723
|
-
/* @__PURE__ */
|
|
1724
|
-
/* @__PURE__ */
|
|
1725
|
-
language === code && /* @__PURE__ */
|
|
1754
|
+
/* @__PURE__ */ React18__namespace.default.createElement("span", { className: "text-lg leading-none w-6 text-center" }, meta.flag),
|
|
1755
|
+
/* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex-1 text-left" }, /* @__PURE__ */ React18__namespace.default.createElement("div", { className: cn("font-medium", meta.rtl && "text-right") }, meta.native), /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "text-xs text-muted-foreground" }, meta.english)),
|
|
1756
|
+
language === code && /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "w-2 h-2 rounded-full bg-primary shrink-0" })
|
|
1726
1757
|
)))
|
|
1727
1758
|
),
|
|
1728
1759
|
document.body
|
|
1729
|
-
)), onThemeToggle && /* @__PURE__ */
|
|
1760
|
+
)), onThemeToggle && /* @__PURE__ */ React18__namespace.default.createElement(
|
|
1730
1761
|
Button,
|
|
1731
1762
|
{
|
|
1732
1763
|
variant: "ghost",
|
|
@@ -1734,16 +1765,24 @@ var CalendarHeader = ({
|
|
|
1734
1765
|
className: "rounded-xl h-9 w-9 hover:bg-accent/80 transition-all duration-200",
|
|
1735
1766
|
onClick: onThemeToggle
|
|
1736
1767
|
},
|
|
1737
|
-
isDarkMode ? /* @__PURE__ */
|
|
1738
|
-
), typeof eventCount === "number" &&
|
|
1768
|
+
isDarkMode ? /* @__PURE__ */ React18__namespace.default.createElement(lucideReact.Sun, { className: "h-4 w-4 text-amber-500" }) : /* @__PURE__ */ React18__namespace.default.createElement(lucideReact.Moon, { className: "h-4 w-4 text-muted-foreground" })
|
|
1769
|
+
), !hideViewSwitcher && (typeof eventCount === "number" || typeof hourCount === "number") && /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex items-center gap-1.5" }, typeof eventCount === "number" && /* @__PURE__ */ React18__namespace.default.createElement(
|
|
1739
1770
|
"div",
|
|
1740
1771
|
{
|
|
1741
1772
|
className: "flex items-center gap-1.5 h-8 px-3 rounded-xl bg-primary/10 text-primary text-xs font-semibold tabular-nums select-none border border-primary/20 shadow-sm shadow-primary/10",
|
|
1742
|
-
title: `${eventCount}
|
|
1773
|
+
title: `${eventCount} ${eventCount === 1 ? translations.eventCount ?? "event" : translations.eventsCount ?? "events"}`
|
|
1743
1774
|
},
|
|
1744
|
-
/* @__PURE__ */
|
|
1745
|
-
/* @__PURE__ */
|
|
1746
|
-
),
|
|
1775
|
+
/* @__PURE__ */ React18__namespace.default.createElement(lucideReact.CalendarCheck2, { className: "w-3.5 h-3.5 shrink-0" }),
|
|
1776
|
+
/* @__PURE__ */ React18__namespace.default.createElement("span", null, eventCount)
|
|
1777
|
+
), typeof hourCount === "number" && /* @__PURE__ */ React18__namespace.default.createElement(
|
|
1778
|
+
"div",
|
|
1779
|
+
{
|
|
1780
|
+
className: "flex items-center gap-1.5 h-8 px-3 rounded-xl bg-amber-500/10 text-amber-600 dark:text-amber-400 text-xs font-semibold tabular-nums select-none border border-amber-500/20 shadow-sm shadow-amber-500/10",
|
|
1781
|
+
title: `${hourCount} ${hourCount === 1 ? translations.hourCount ?? "hour" : translations.hoursCount ?? "hours"}`
|
|
1782
|
+
},
|
|
1783
|
+
/* @__PURE__ */ React18__namespace.default.createElement(lucideReact.Clock, { className: "w-3.5 h-3.5 shrink-0" }),
|
|
1784
|
+
/* @__PURE__ */ React18__namespace.default.createElement("span", null, hourCount)
|
|
1785
|
+
)), !hideViewSwitcher && /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex items-center bg-muted/50 backdrop-blur-sm rounded-xl p-1 gap-0.5" }, viewConfig.map(({ key, icon: Icon }) => /* @__PURE__ */ React18__namespace.default.createElement(
|
|
1747
1786
|
Button,
|
|
1748
1787
|
{
|
|
1749
1788
|
key,
|
|
@@ -1758,9 +1797,9 @@ var CalendarHeader = ({
|
|
|
1758
1797
|
view === key && !activeCustomViewId ? "bg-background shadow-sm text-foreground font-medium border-[0.5px] border-border/50" : "text-muted-foreground hover:text-foreground hover:bg-background/50"
|
|
1759
1798
|
)
|
|
1760
1799
|
},
|
|
1761
|
-
/* @__PURE__ */
|
|
1762
|
-
/* @__PURE__ */
|
|
1763
|
-
)), customViews && customViews.length > 0 && /* @__PURE__ */
|
|
1800
|
+
/* @__PURE__ */ React18__namespace.default.createElement(Icon, { className: "h-3.5 w-3.5" }),
|
|
1801
|
+
/* @__PURE__ */ React18__namespace.default.createElement("span", { className: "hidden sm:inline" }, translations[key])
|
|
1802
|
+
)), customViews && customViews.length > 0 && /* @__PURE__ */ React18__namespace.default.createElement(React18__namespace.default.Fragment, null, /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "w-px h-5 bg-border/60 mx-0.5 shrink-0" }), /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "relative" }, /* @__PURE__ */ React18__namespace.default.createElement(
|
|
1764
1803
|
Button,
|
|
1765
1804
|
{
|
|
1766
1805
|
ref: customViewButtonRef,
|
|
@@ -1773,17 +1812,17 @@ var CalendarHeader = ({
|
|
|
1773
1812
|
),
|
|
1774
1813
|
title: "Daha fazla g\xF6r\xFCn\xFCm"
|
|
1775
1814
|
},
|
|
1776
|
-
activeCustomViewId ? customViews.find((cv) => cv.id === activeCustomViewId)?.label : /* @__PURE__ */
|
|
1777
|
-
/* @__PURE__ */
|
|
1815
|
+
activeCustomViewId ? customViews.find((cv) => cv.id === activeCustomViewId)?.label : /* @__PURE__ */ React18__namespace.default.createElement(lucideReact.MoreHorizontal, { className: "h-3.5 w-3.5" }),
|
|
1816
|
+
/* @__PURE__ */ React18__namespace.default.createElement(lucideReact.ChevronDown, { className: cn("h-3 w-3 transition-transform duration-150", isCustomViewOpen && "rotate-180") })
|
|
1778
1817
|
), isCustomViewOpen && customViewPos && reactDom.createPortal(
|
|
1779
|
-
/* @__PURE__ */
|
|
1818
|
+
/* @__PURE__ */ React18__namespace.default.createElement(
|
|
1780
1819
|
"div",
|
|
1781
1820
|
{
|
|
1782
1821
|
ref: customViewDropdownRef,
|
|
1783
1822
|
className: "fixed min-w-[160px] bg-background border border-border/60 rounded-2xl shadow-2xl z-[9999] overflow-hidden py-1.5",
|
|
1784
1823
|
style: { top: customViewPos.top, left: customViewPos.left, minWidth: CUSTOM_VIEW_DROPDOWN_WIDTH }
|
|
1785
1824
|
},
|
|
1786
|
-
customViews.map((cv) => /* @__PURE__ */
|
|
1825
|
+
customViews.map((cv) => /* @__PURE__ */ React18__namespace.default.createElement(
|
|
1787
1826
|
"button",
|
|
1788
1827
|
{
|
|
1789
1828
|
key: cv.id,
|
|
@@ -1797,9 +1836,9 @@ var CalendarHeader = ({
|
|
|
1797
1836
|
activeCustomViewId === cv.id ? "bg-primary/10 text-primary font-semibold" : "text-foreground"
|
|
1798
1837
|
)
|
|
1799
1838
|
},
|
|
1800
|
-
cv.icon && /* @__PURE__ */
|
|
1801
|
-
/* @__PURE__ */
|
|
1802
|
-
activeCustomViewId === cv.id && /* @__PURE__ */
|
|
1839
|
+
cv.icon && /* @__PURE__ */ React18__namespace.default.createElement("span", { className: "w-4 h-4 flex items-center justify-center shrink-0" }, cv.icon),
|
|
1840
|
+
/* @__PURE__ */ React18__namespace.default.createElement("span", null, cv.label),
|
|
1841
|
+
activeCustomViewId === cv.id && /* @__PURE__ */ React18__namespace.default.createElement("span", { className: "ml-auto w-1.5 h-1.5 rounded-full bg-primary shrink-0" })
|
|
1803
1842
|
))
|
|
1804
1843
|
),
|
|
1805
1844
|
document.body
|
|
@@ -1826,12 +1865,12 @@ var MiniCalendar = ({
|
|
|
1826
1865
|
className,
|
|
1827
1866
|
locale
|
|
1828
1867
|
}) => {
|
|
1829
|
-
const [viewDate, setViewDate] =
|
|
1830
|
-
|
|
1868
|
+
const [viewDate, setViewDate] = React18__namespace.default.useState(currentDate);
|
|
1869
|
+
React18__namespace.default.useEffect(() => {
|
|
1831
1870
|
setViewDate(currentDate);
|
|
1832
1871
|
}, [currentDate]);
|
|
1833
|
-
const days =
|
|
1834
|
-
const weekDays =
|
|
1872
|
+
const days = React18__namespace.default.useMemo(() => getMonthGrid(viewDate), [viewDate]);
|
|
1873
|
+
const weekDays = React18__namespace.default.useMemo(() => {
|
|
1835
1874
|
const base = new Date(2024, 0, 7);
|
|
1836
1875
|
return Array.from({ length: 7 }, (_, i) => {
|
|
1837
1876
|
const d = new Date(base);
|
|
@@ -1855,7 +1894,7 @@ var MiniCalendar = ({
|
|
|
1855
1894
|
onDateChange(day);
|
|
1856
1895
|
if (onViewChange) onViewChange("day");
|
|
1857
1896
|
};
|
|
1858
|
-
return /* @__PURE__ */
|
|
1897
|
+
return /* @__PURE__ */ React18__namespace.default.createElement("div", { className: cn("px-4 w-[260px]", className) }, /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex items-center justify-between mb-4" }, /* @__PURE__ */ React18__namespace.default.createElement("span", { className: "text-sm font-semibold text-foreground capitalize" }, dateFns.format(viewDate, "MMMM yyyy", { locale })), /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex items-center bg-muted/40 rounded-lg p-0.5" }, /* @__PURE__ */ React18__namespace.default.createElement(
|
|
1859
1898
|
Button,
|
|
1860
1899
|
{
|
|
1861
1900
|
variant: "ghost",
|
|
@@ -1864,8 +1903,8 @@ var MiniCalendar = ({
|
|
|
1864
1903
|
onClick: handlePrev,
|
|
1865
1904
|
"aria-label": "Previous month"
|
|
1866
1905
|
},
|
|
1867
|
-
/* @__PURE__ */
|
|
1868
|
-
), /* @__PURE__ */
|
|
1906
|
+
/* @__PURE__ */ React18__namespace.default.createElement(lucideReact.ChevronLeft, { className: "h-4 w-4" })
|
|
1907
|
+
), /* @__PURE__ */ React18__namespace.default.createElement(
|
|
1869
1908
|
Button,
|
|
1870
1909
|
{
|
|
1871
1910
|
variant: "ghost",
|
|
@@ -1874,12 +1913,12 @@ var MiniCalendar = ({
|
|
|
1874
1913
|
onClick: handleNext,
|
|
1875
1914
|
"aria-label": "Next month"
|
|
1876
1915
|
},
|
|
1877
|
-
/* @__PURE__ */
|
|
1878
|
-
))), /* @__PURE__ */
|
|
1916
|
+
/* @__PURE__ */ React18__namespace.default.createElement(lucideReact.ChevronRight, { className: "h-4 w-4" })
|
|
1917
|
+
))), /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "grid grid-cols-7 gap-y-2 text-center mb-2" }, weekDays.map((day, i) => /* @__PURE__ */ React18__namespace.default.createElement("div", { key: `${day}-${i}`, className: "text-[10px] text-muted-foreground/70 font-semibold uppercase" }, day))), /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "grid grid-cols-7 gap-y-1 text-center" }, days.map((day) => {
|
|
1879
1918
|
const isSelected = dateFns.isSameDay(day, currentDate);
|
|
1880
1919
|
const isCurrentMonth = dateFns.isSameMonth(day, viewDate);
|
|
1881
1920
|
const isTodayDate = dateFns.isToday(day);
|
|
1882
|
-
return /* @__PURE__ */
|
|
1921
|
+
return /* @__PURE__ */ React18__namespace.default.createElement(
|
|
1883
1922
|
"button",
|
|
1884
1923
|
{
|
|
1885
1924
|
key: day.toISOString(),
|
|
@@ -1919,12 +1958,12 @@ var Sidebar = ({
|
|
|
1919
1958
|
onCustomViewChange,
|
|
1920
1959
|
locale
|
|
1921
1960
|
}) => {
|
|
1922
|
-
const [calendarsOpen, setCalendarsOpen] =
|
|
1923
|
-
const [timezoneOpen, setTimezoneOpen] =
|
|
1924
|
-
const [now, setNow] =
|
|
1925
|
-
const [hasMounted, setHasMounted] =
|
|
1926
|
-
const [menusExpanded, setMenusExpanded] =
|
|
1927
|
-
|
|
1961
|
+
const [calendarsOpen, setCalendarsOpen] = React18.useState(true);
|
|
1962
|
+
const [timezoneOpen, setTimezoneOpen] = React18.useState(false);
|
|
1963
|
+
const [now, setNow] = React18.useState(null);
|
|
1964
|
+
const [hasMounted, setHasMounted] = React18.useState(false);
|
|
1965
|
+
const [menusExpanded, setMenusExpanded] = React18.useState(false);
|
|
1966
|
+
React18.useEffect(() => {
|
|
1928
1967
|
setHasMounted(true);
|
|
1929
1968
|
setNow(/* @__PURE__ */ new Date());
|
|
1930
1969
|
const timer = setInterval(() => setNow(/* @__PURE__ */ new Date()), 6e4);
|
|
@@ -1961,7 +2000,7 @@ var Sidebar = ({
|
|
|
1961
2000
|
];
|
|
1962
2001
|
const formatTzLabel = (tz, showTime = true) => {
|
|
1963
2002
|
if (!hasMounted || !now || !showTime) {
|
|
1964
|
-
return /* @__PURE__ */
|
|
2003
|
+
return /* @__PURE__ */ React18__namespace.default.createElement("span", null, tz.label);
|
|
1965
2004
|
}
|
|
1966
2005
|
let time = "";
|
|
1967
2006
|
let acronym = tz.acronym;
|
|
@@ -1981,29 +2020,29 @@ var Sidebar = ({
|
|
|
1981
2020
|
}
|
|
1982
2021
|
}
|
|
1983
2022
|
} catch (e) {
|
|
1984
|
-
return /* @__PURE__ */
|
|
2023
|
+
return /* @__PURE__ */ React18__namespace.default.createElement("span", null, tz.label);
|
|
1985
2024
|
}
|
|
1986
|
-
return /* @__PURE__ */
|
|
2025
|
+
return /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex justify-between w-full" }, /* @__PURE__ */ React18__namespace.default.createElement("span", null, tz.label), /* @__PURE__ */ React18__namespace.default.createElement("span", { className: "text-muted-foreground ml-2 tabular-nums" }, time, " ", /* @__PURE__ */ React18__namespace.default.createElement("span", { className: "text-xs opacity-75" }, "(", acronym, ")")));
|
|
1987
2026
|
};
|
|
1988
2027
|
const selectedTzObj = timezones.find((t) => t.value === (timezone || ""));
|
|
1989
2028
|
const selectedTimezoneLabel = selectedTzObj ? formatTzLabel(selectedTzObj) : translations?.localTime ?? "Local Time";
|
|
1990
|
-
return /* @__PURE__ */
|
|
2029
|
+
return /* @__PURE__ */ React18__namespace.default.createElement("div", { className: cn("flex flex-col w-[260px] overflow-x-hidden h-full bg-gradient-to-b scrollbar-hide from-background via-background to-muted/10 pt-4 pb-4 overflow-y-auto", className) }, sidebarMenus && sidebarMenus.length > 0 && /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "px-4 mb-4" }, !menusExpanded && /* @__PURE__ */ React18__namespace.default.createElement(
|
|
1991
2030
|
Button,
|
|
1992
2031
|
{
|
|
1993
2032
|
variant: "outline",
|
|
1994
2033
|
className: "w-full rounded-2xl h-11 gap-2.5 justify-start border-[0.5px] border-border/60 hover:border-primary/40 hover:bg-primary/5 hover:text-primary transition-all duration-200 font-medium text-sm",
|
|
1995
2034
|
onClick: () => setMenusExpanded(true)
|
|
1996
2035
|
},
|
|
1997
|
-
/* @__PURE__ */
|
|
1998
|
-
/* @__PURE__ */
|
|
1999
|
-
), menusExpanded && /* @__PURE__ */
|
|
2036
|
+
/* @__PURE__ */ React18__namespace.default.createElement(lucideReact.LayoutGrid, { className: "w-4 h-4" }),
|
|
2037
|
+
/* @__PURE__ */ React18__namespace.default.createElement("span", null, translations?.operations ?? "\u0130\u015Flemler")
|
|
2038
|
+
), menusExpanded && /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "animate-in fade-in slide-in-from-top-2 duration-200" }, /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex items-center justify-between mb-2 px-1" }, /* @__PURE__ */ React18__namespace.default.createElement("span", { className: "text-xs font-semibold text-muted-foreground uppercase tracking-wider" }, translations?.operations ?? "\u0130\u015Flemler"), /* @__PURE__ */ React18__namespace.default.createElement(
|
|
2000
2039
|
"button",
|
|
2001
2040
|
{
|
|
2002
2041
|
onClick: () => setMenusExpanded(false),
|
|
2003
2042
|
className: "w-6 h-6 rounded-lg flex items-center justify-center text-muted-foreground hover:text-foreground hover:bg-accent/60 transition-all duration-150"
|
|
2004
2043
|
},
|
|
2005
|
-
/* @__PURE__ */
|
|
2006
|
-
)), /* @__PURE__ */
|
|
2044
|
+
/* @__PURE__ */ React18__namespace.default.createElement(lucideReact.X, { className: "w-3.5 h-3.5" })
|
|
2045
|
+
)), /* @__PURE__ */ React18__namespace.default.createElement("nav", { className: "space-y-0.5" }, /* @__PURE__ */ React18__namespace.default.createElement(
|
|
2007
2046
|
"button",
|
|
2008
2047
|
{
|
|
2009
2048
|
onClick: () => {
|
|
@@ -2015,10 +2054,10 @@ var Sidebar = ({
|
|
|
2015
2054
|
activeCustomMenu === null ? "bg-primary/10 text-primary" : "text-muted-foreground hover:bg-accent/60 hover:text-foreground"
|
|
2016
2055
|
)
|
|
2017
2056
|
},
|
|
2018
|
-
/* @__PURE__ */
|
|
2019
|
-
/* @__PURE__ */
|
|
2020
|
-
activeCustomMenu === null && /* @__PURE__ */
|
|
2021
|
-
), sidebarMenus?.map((item) => /* @__PURE__ */
|
|
2057
|
+
/* @__PURE__ */ React18__namespace.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", className: "w-4 h-4 shrink-0", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React18__namespace.default.createElement("rect", { x: "3", y: "4", width: "18", height: "18", rx: "2", ry: "2" }), /* @__PURE__ */ React18__namespace.default.createElement("line", { x1: "16", y1: "2", x2: "16", y2: "6" }), /* @__PURE__ */ React18__namespace.default.createElement("line", { x1: "8", y1: "2", x2: "8", y2: "6" }), /* @__PURE__ */ React18__namespace.default.createElement("line", { x1: "3", y1: "10", x2: "21", y2: "10" })),
|
|
2058
|
+
/* @__PURE__ */ React18__namespace.default.createElement("span", null, translations?.calendar ?? "Takvim"),
|
|
2059
|
+
activeCustomMenu === null && /* @__PURE__ */ React18__namespace.default.createElement("span", { className: "ml-auto w-1.5 h-1.5 rounded-full bg-primary" })
|
|
2060
|
+
), sidebarMenus?.map((item) => /* @__PURE__ */ React18__namespace.default.createElement(
|
|
2022
2061
|
"button",
|
|
2023
2062
|
{
|
|
2024
2063
|
key: item.id,
|
|
@@ -2031,10 +2070,10 @@ var Sidebar = ({
|
|
|
2031
2070
|
activeCustomMenu === item.id ? "bg-primary/10 text-primary" : "text-muted-foreground hover:bg-accent/60 hover:text-foreground"
|
|
2032
2071
|
)
|
|
2033
2072
|
},
|
|
2034
|
-
item.icon && /* @__PURE__ */
|
|
2035
|
-
/* @__PURE__ */
|
|
2036
|
-
activeCustomMenu === item.id && /* @__PURE__ */
|
|
2037
|
-
))))), onEventCreate && /* @__PURE__ */
|
|
2073
|
+
item.icon && /* @__PURE__ */ React18__namespace.default.createElement("span", { className: "w-4 h-4 shrink-0 flex items-center justify-center" }, item.icon),
|
|
2074
|
+
/* @__PURE__ */ React18__namespace.default.createElement("span", { className: "truncate" }, item.label),
|
|
2075
|
+
activeCustomMenu === item.id && /* @__PURE__ */ React18__namespace.default.createElement("span", { className: "ml-auto w-1.5 h-1.5 rounded-full bg-primary" })
|
|
2076
|
+
))))), onEventCreate && /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "md:hidden px-4 mb-4" }, /* @__PURE__ */ React18__namespace.default.createElement(
|
|
2038
2077
|
Button,
|
|
2039
2078
|
{
|
|
2040
2079
|
onClick: () => {
|
|
@@ -2042,9 +2081,9 @@ var Sidebar = ({
|
|
|
2042
2081
|
},
|
|
2043
2082
|
className: "w-full rounded-2xl h-11 gap-2.5 justify-center shadow-sm shadow-primary/20 transition-all duration-200 font-medium text-sm"
|
|
2044
2083
|
},
|
|
2045
|
-
/* @__PURE__ */
|
|
2046
|
-
/* @__PURE__ */
|
|
2047
|
-
)), onReverseTimeChange && /* @__PURE__ */
|
|
2084
|
+
/* @__PURE__ */ React18__namespace.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", className: "w-4 h-4 shrink-0", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2.5, strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React18__namespace.default.createElement("path", { d: "M5 12h14" }), /* @__PURE__ */ React18__namespace.default.createElement("path", { d: "M12 5v14" })),
|
|
2085
|
+
/* @__PURE__ */ React18__namespace.default.createElement("span", null, translations?.createEvent ?? "Etkinlik Olu\u015Ftur")
|
|
2086
|
+
)), onReverseTimeChange && /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "px-4 mb-4" }, /* @__PURE__ */ React18__namespace.default.createElement(
|
|
2048
2087
|
"button",
|
|
2049
2088
|
{
|
|
2050
2089
|
onClick: () => onReverseTimeChange(!reverseTime),
|
|
@@ -2053,33 +2092,33 @@ var Sidebar = ({
|
|
|
2053
2092
|
reverseTime ? "bg-primary/10 border-primary/30 text-primary" : "bg-muted/30 border-border/50 text-muted-foreground hover:border-primary/30 hover:text-foreground"
|
|
2054
2093
|
)
|
|
2055
2094
|
},
|
|
2056
|
-
/* @__PURE__ */
|
|
2057
|
-
/* @__PURE__ */
|
|
2095
|
+
/* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex items-center gap-2.5" }, /* @__PURE__ */ React18__namespace.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", className: "w-4 h-4 shrink-0", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React18__namespace.default.createElement("line", { x1: "12", y1: "19", x2: "12", y2: "5" }), /* @__PURE__ */ React18__namespace.default.createElement("polyline", { points: "5 12 12 5 19 12" }), /* @__PURE__ */ React18__namespace.default.createElement("line", { x1: "12", y1: "5", x2: "12", y2: "19", className: "opacity-40" }), /* @__PURE__ */ React18__namespace.default.createElement("polyline", { points: "5 12 12 19 19 12", className: "opacity-40" })), /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "text-left" }, /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "text-xs font-semibold leading-tight" }, translations?.reverseTimeLabel ?? "Saat Y\xF6n\xFC"), /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "text-[10px] leading-tight opacity-70 mt-0.5" }, reverseTime ? "23:00 \u2192 00:00" : "00:00 \u2192 23:00"))),
|
|
2096
|
+
/* @__PURE__ */ React18__namespace.default.createElement("div", { className: cn(
|
|
2058
2097
|
"relative w-9 h-5 rounded-full transition-colors duration-200 shrink-0",
|
|
2059
2098
|
reverseTime ? "bg-primary" : "bg-border"
|
|
2060
|
-
) }, /* @__PURE__ */
|
|
2099
|
+
) }, /* @__PURE__ */ React18__namespace.default.createElement("span", { className: cn(
|
|
2061
2100
|
"absolute top-0.5 w-4 h-4 bg-white rounded-full shadow-sm transition-all duration-200",
|
|
2062
2101
|
reverseTime ? "left-4" : "left-0.5"
|
|
2063
2102
|
) }))
|
|
2064
2103
|
)), renderMiniCalendar ? (
|
|
2065
2104
|
// Custom mini-calendar: receives the same props as the built-in one
|
|
2066
2105
|
renderMiniCalendar({ currentDate, onDateChange, onViewChange })
|
|
2067
|
-
) : /* @__PURE__ */
|
|
2106
|
+
) : /* @__PURE__ */ React18__namespace.default.createElement(MiniCalendar, { currentDate, onDateChange, onViewChange, locale }), /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex-1 px-4 space-y-5 mt-5" }, /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "bg-muted/20 rounded-2xl p-3 border-[0px] border-border/30" }, /* @__PURE__ */ React18__namespace.default.createElement(
|
|
2068
2107
|
"div",
|
|
2069
2108
|
{
|
|
2070
2109
|
className: "flex items-center justify-between cursor-pointer hover:bg-accent/50 p-2 -m-1 rounded-xl mb-2 transition-all duration-200",
|
|
2071
2110
|
onClick: () => setCalendarsOpen(!calendarsOpen)
|
|
2072
2111
|
},
|
|
2073
|
-
/* @__PURE__ */
|
|
2074
|
-
/* @__PURE__ */
|
|
2075
|
-
), calendarsOpen && /* @__PURE__ */
|
|
2112
|
+
/* @__PURE__ */ React18__namespace.default.createElement("span", { className: "text-sm font-semibold text-foreground" }, translations?.calendars),
|
|
2113
|
+
/* @__PURE__ */ React18__namespace.default.createElement(lucideReact.ChevronDown, { className: cn("w-4 h-4 text-muted-foreground transition-transform duration-200", calendarsOpen && "rotate-180") })
|
|
2114
|
+
), calendarsOpen && /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "space-y-1" }, displayCalendars.map((cal) => /* @__PURE__ */ React18__namespace.default.createElement(
|
|
2076
2115
|
"div",
|
|
2077
2116
|
{
|
|
2078
2117
|
key: cal.id,
|
|
2079
2118
|
className: "flex items-center gap-3 py-2 px-2 hover:bg-accent/60 rounded-xl cursor-pointer group transition-all duration-200",
|
|
2080
2119
|
onClick: () => onCalendarToggle?.(cal.id, !(cal.active ?? true))
|
|
2081
2120
|
},
|
|
2082
|
-
/* @__PURE__ */
|
|
2121
|
+
/* @__PURE__ */ React18__namespace.default.createElement("div", { className: "relative flex items-center justify-center" }, /* @__PURE__ */ React18__namespace.default.createElement(
|
|
2083
2122
|
"input",
|
|
2084
2123
|
{
|
|
2085
2124
|
type: "checkbox",
|
|
@@ -2092,7 +2131,7 @@ var Sidebar = ({
|
|
|
2092
2131
|
style: { "--primary-color": cal.color },
|
|
2093
2132
|
"data-cal-id": cal.id
|
|
2094
2133
|
}
|
|
2095
|
-
), /* @__PURE__ */
|
|
2134
|
+
), /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "absolute inset-0 flex items-center justify-center pointer-events-none opacity-0 peer-checked:opacity-100 transition-opacity" }, /* @__PURE__ */ React18__namespace.default.createElement("svg", { className: "w-3.5 h-3.5 text-white", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 3 }, /* @__PURE__ */ React18__namespace.default.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M5 13l4 4L19 7" }))), /* @__PURE__ */ React18__namespace.default.createElement("style", null, `
|
|
2096
2135
|
input[type="checkbox"][data-cal-id="${cal.id}"]:checked {
|
|
2097
2136
|
background-color: ${cal.color} !important;
|
|
2098
2137
|
border-color: ${cal.color} !important;
|
|
@@ -2101,23 +2140,23 @@ var Sidebar = ({
|
|
|
2101
2140
|
--tw-ring-color: ${cal.color}40 !important;
|
|
2102
2141
|
}
|
|
2103
2142
|
`)),
|
|
2104
|
-
/* @__PURE__ */
|
|
2105
|
-
/* @__PURE__ */
|
|
2143
|
+
/* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex items-center gap-2 flex-1 min-w-0" }, /* @__PURE__ */ React18__namespace.default.createElement("span", { className: "text-sm text-foreground/90 truncate font-medium" }, cal.label)),
|
|
2144
|
+
/* @__PURE__ */ React18__namespace.default.createElement(
|
|
2106
2145
|
"div",
|
|
2107
2146
|
{
|
|
2108
2147
|
className: "w-2 h-2 rounded-full opacity-60 group-hover:opacity-100 transition-opacity",
|
|
2109
2148
|
style: { backgroundColor: cal.color }
|
|
2110
2149
|
}
|
|
2111
2150
|
)
|
|
2112
|
-
))))), /* @__PURE__ */
|
|
2151
|
+
))))), /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "mt-auto px-4 pt-5" }, /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "bg-muted/20 rounded-2xl p-3" }, /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex items-center gap-2 mb-3" }, /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "p-1.5 bg-primary/10 rounded-lg" }, /* @__PURE__ */ React18__namespace.default.createElement(lucideReact.Globe, { className: "w-4 h-4 text-primary" })), /* @__PURE__ */ React18__namespace.default.createElement("span", { className: "text-sm font-semibold text-foreground" }, translations?.timezone)), /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "relative" }, /* @__PURE__ */ React18__namespace.default.createElement(
|
|
2113
2152
|
"button",
|
|
2114
2153
|
{
|
|
2115
2154
|
onClick: () => setTimezoneOpen(!timezoneOpen),
|
|
2116
2155
|
className: "w-full flex items-center justify-between bg-blue-200/40 hover:bg-blue-200/80 rounded-xl py-2.5 pl-4 pr-3 text-sm text-foreground focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary/50 transition-all duration-200 text-left"
|
|
2117
2156
|
},
|
|
2118
|
-
/* @__PURE__ */
|
|
2119
|
-
/* @__PURE__ */
|
|
2120
|
-
), timezoneOpen && /* @__PURE__ */
|
|
2157
|
+
/* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex-1 truncate mr-2 font-medium" }, selectedTimezoneLabel),
|
|
2158
|
+
/* @__PURE__ */ React18__namespace.default.createElement(lucideReact.ChevronDown, { className: cn("w-4 h-4 text-muted-foreground transition-transform duration-200", timezoneOpen && "rotate-180") })
|
|
2159
|
+
), timezoneOpen && /* @__PURE__ */ React18__namespace.default.createElement(React18__namespace.default.Fragment, null, /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "fixed inset-0 z-40", onClick: () => setTimezoneOpen(false) }), /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "absolute bottom-full left-0 w-full mb-2 bg-background rounded-xl shadow-2xl z-50 max-h-[260px] overflow-y-auto p-1.5 animate-in fade-in zoom-in-95 duration-200 backdrop-blur-none" }, timezones.map((tz) => /* @__PURE__ */ React18__namespace.default.createElement(
|
|
2121
2160
|
"div",
|
|
2122
2161
|
{
|
|
2123
2162
|
key: tz.value,
|
|
@@ -2150,7 +2189,7 @@ var DraggableEvent = ({ event, children, className, style: propStyle, ...props }
|
|
|
2150
2189
|
opacity: isDragging ? 0 : propStyle?.opacity
|
|
2151
2190
|
// Hiding original element completely
|
|
2152
2191
|
};
|
|
2153
|
-
return /* @__PURE__ */
|
|
2192
|
+
return /* @__PURE__ */ React18__namespace.default.createElement(
|
|
2154
2193
|
"div",
|
|
2155
2194
|
{
|
|
2156
2195
|
ref: setNodeRef,
|
|
@@ -2171,7 +2210,7 @@ var DroppableCell = ({ id, date, resourceId, children, className, style, onClick
|
|
|
2171
2210
|
const minutes = date.getMinutes();
|
|
2172
2211
|
const quarterClass = minutes === 0 ? "hover:bg-blue-50/50 dark:hover:bg-blue-900/10" : minutes === 15 ? "hover:bg-blue-50/80 dark:hover:bg-blue-900/20" : minutes === 30 ? "hover:bg-blue-100/50 dark:hover:bg-blue-900/30" : "hover:bg-blue-100/80 dark:hover:bg-blue-900/40";
|
|
2173
2212
|
const activeQuarterClass = minutes === 0 ? "bg-blue-50/50 dark:bg-blue-900/10 ring-2 ring-primary ring-inset" : minutes === 15 ? "bg-blue-50/80 dark:bg-blue-900/20 ring-2 ring-primary ring-inset" : minutes === 30 ? "bg-blue-100/50 dark:bg-blue-900/30 ring-2 ring-primary ring-inset" : "bg-blue-100/80 dark:bg-blue-900/40 ring-2 ring-primary ring-inset";
|
|
2174
|
-
return /* @__PURE__ */
|
|
2213
|
+
return /* @__PURE__ */ React18__namespace.default.createElement(
|
|
2175
2214
|
"div",
|
|
2176
2215
|
{
|
|
2177
2216
|
ref: setNodeRef,
|
|
@@ -2188,7 +2227,7 @@ var DroppableCell = ({ id, date, resourceId, children, className, style, onClick
|
|
|
2188
2227
|
};
|
|
2189
2228
|
|
|
2190
2229
|
// src/views/MonthView.tsx
|
|
2191
|
-
var EventItem =
|
|
2230
|
+
var EventItem = React18__namespace.default.memo(({ event, onEventClick }) => /* @__PURE__ */ React18__namespace.default.createElement(DraggableEvent, { event }, /* @__PURE__ */ React18__namespace.default.createElement(
|
|
2192
2231
|
"div",
|
|
2193
2232
|
{
|
|
2194
2233
|
className: cn(
|
|
@@ -2206,7 +2245,7 @@ var EventItem = React17__namespace.default.memo(({ event, onEventClick }) => /*
|
|
|
2206
2245
|
onEventClick?.(event);
|
|
2207
2246
|
}
|
|
2208
2247
|
},
|
|
2209
|
-
/* @__PURE__ */
|
|
2248
|
+
/* @__PURE__ */ React18__namespace.default.createElement("span", { className: "font-medium" }, event.title)
|
|
2210
2249
|
)));
|
|
2211
2250
|
EventItem.displayName = "EventItem";
|
|
2212
2251
|
var MonthView = ({
|
|
@@ -2217,16 +2256,16 @@ var MonthView = ({
|
|
|
2217
2256
|
timezone,
|
|
2218
2257
|
locale
|
|
2219
2258
|
}) => {
|
|
2220
|
-
const days =
|
|
2221
|
-
const weekDays =
|
|
2259
|
+
const days = React18.useMemo(() => getMonthGrid(currentDate), [currentDate]);
|
|
2260
|
+
const weekDays = React18.useMemo(() => {
|
|
2222
2261
|
const start = dateFns.startOfWeek(currentDate, { weekStartsOn: 1 });
|
|
2223
2262
|
const end = dateFns.endOfWeek(currentDate, { weekStartsOn: 1 });
|
|
2224
2263
|
return dateFns.eachDayOfInterval({ start, end });
|
|
2225
2264
|
}, [currentDate]);
|
|
2226
|
-
const getZonedDate =
|
|
2265
|
+
const getZonedDate = React18.useCallback((date) => {
|
|
2227
2266
|
return timezone ? dateFnsTz.toZonedTime(date, timezone) : date;
|
|
2228
2267
|
}, [timezone]);
|
|
2229
|
-
const eventsByDay =
|
|
2268
|
+
const eventsByDay = React18.useMemo(() => {
|
|
2230
2269
|
const map = /* @__PURE__ */ new Map();
|
|
2231
2270
|
events.forEach((event) => {
|
|
2232
2271
|
const zonedStart = getZonedDate(event.start);
|
|
@@ -2238,19 +2277,19 @@ var MonthView = ({
|
|
|
2238
2277
|
});
|
|
2239
2278
|
return map;
|
|
2240
2279
|
}, [events, getZonedDate]);
|
|
2241
|
-
return /* @__PURE__ */
|
|
2280
|
+
return /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex flex-col h-full min-h-0 bg-background border-[0.5px] scrollbar-hide border-border/50 rounded-2xl overflow-hidden min-w-[800px] md:min-w-0 shadow-sm" }, /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "overflow-y-auto flex-1 min-h-0 relative" }, /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "grid grid-cols-7 border-b-[0.5px] border-border/50 bg-gradient-to-r from-muted/30 via-muted/40 to-muted/30 sticky top-0 z-20 backdrop-blur-sm" }, weekDays.map((day) => /* @__PURE__ */ React18__namespace.default.createElement(
|
|
2242
2281
|
"div",
|
|
2243
2282
|
{
|
|
2244
2283
|
key: day.toISOString(),
|
|
2245
2284
|
className: "py-3 text-center text-xs font-semibold text-muted-foreground border-r-[0.5px] border-border/30 last:border-r-0 uppercase tracking-wider"
|
|
2246
2285
|
},
|
|
2247
2286
|
dateFns.format(day, "EEE", { locale })
|
|
2248
|
-
))), /* @__PURE__ */
|
|
2287
|
+
))), /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "grid grid-cols-7", style: { gridAutoRows: "130px" } }, days.map((day) => {
|
|
2249
2288
|
const dayKey = dateFns.format(day, "yyyy-MM-dd");
|
|
2250
2289
|
const dayEvents = eventsByDay.get(dayKey) || [];
|
|
2251
2290
|
const isCurrentMonth = dateFns.isSameMonth(day, currentDate);
|
|
2252
2291
|
const cellId = day.toISOString();
|
|
2253
|
-
return /* @__PURE__ */
|
|
2292
|
+
return /* @__PURE__ */ React18__namespace.default.createElement(
|
|
2254
2293
|
DroppableCell,
|
|
2255
2294
|
{
|
|
2256
2295
|
key: cellId,
|
|
@@ -2263,11 +2302,11 @@ var MonthView = ({
|
|
|
2263
2302
|
),
|
|
2264
2303
|
onClick: () => onDateClick?.(day)
|
|
2265
2304
|
},
|
|
2266
|
-
/* @__PURE__ */
|
|
2305
|
+
/* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex justify-between items-start" }, /* @__PURE__ */ React18__namespace.default.createElement("div", { className: cn(
|
|
2267
2306
|
"text-sm font-semibold w-7 h-7 flex items-center justify-center rounded-full transition-all duration-200",
|
|
2268
2307
|
dateFns.isToday(day) ? "bg-primary text-primary-foreground shadow-md shadow-primary/30" : "group-hover:bg-accent"
|
|
2269
|
-
) }, dateFns.format(day, "d", { locale })), dayEvents.length > 0 && /* @__PURE__ */
|
|
2270
|
-
/* @__PURE__ */
|
|
2308
|
+
) }, dateFns.format(day, "d", { locale })), dayEvents.length > 0 && /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "text-[10px] font-medium text-muted-foreground/60 bg-muted/50 px-1.5 py-0.5 rounded-full" }, dayEvents.length)),
|
|
2309
|
+
/* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex-1 flex flex-col gap-1 scrollbar-hide overflow-y-auto overflow-x-hidden" }, dayEvents.slice(0, 4).map((event) => /* @__PURE__ */ React18__namespace.default.createElement(EventItem, { key: `${event.id}-${dayKey}`, event, onEventClick })), dayEvents.length > 4 && /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "text-[10px] text-primary font-semibold text-center py-1 px-2 rounded-md bg-primary/5 hover:bg-primary/10 cursor-pointer transition-colors" }, "+", dayEvents.length - 4, " more"))
|
|
2271
2310
|
);
|
|
2272
2311
|
}))));
|
|
2273
2312
|
};
|
|
@@ -2281,12 +2320,12 @@ var ResizableEvent = ({
|
|
|
2281
2320
|
style,
|
|
2282
2321
|
readonly
|
|
2283
2322
|
}) => {
|
|
2284
|
-
const [isResizing, setIsResizing] =
|
|
2285
|
-
const [resizeHeight, setResizeHeight] =
|
|
2286
|
-
const containerRef =
|
|
2287
|
-
const startYRef =
|
|
2288
|
-
const startHeightRef =
|
|
2289
|
-
const handleResizeStart =
|
|
2323
|
+
const [isResizing, setIsResizing] = React18.useState(false);
|
|
2324
|
+
const [resizeHeight, setResizeHeight] = React18.useState(null);
|
|
2325
|
+
const containerRef = React18.useRef(null);
|
|
2326
|
+
const startYRef = React18.useRef(0);
|
|
2327
|
+
const startHeightRef = React18.useRef(0);
|
|
2328
|
+
const handleResizeStart = React18.useCallback((e) => {
|
|
2290
2329
|
e.preventDefault();
|
|
2291
2330
|
e.stopPropagation();
|
|
2292
2331
|
const clientY = "touches" in e ? e.touches[0].clientY : e.clientY;
|
|
@@ -2328,7 +2367,7 @@ var ResizableEvent = ({
|
|
|
2328
2367
|
document.addEventListener("touchmove", handleMove, { passive: false });
|
|
2329
2368
|
document.addEventListener("touchend", handleEnd);
|
|
2330
2369
|
}, [event, hourHeight, minDuration, onResize, resizeHeight]);
|
|
2331
|
-
return /* @__PURE__ */
|
|
2370
|
+
return /* @__PURE__ */ React18__namespace.default.createElement(
|
|
2332
2371
|
"div",
|
|
2333
2372
|
{
|
|
2334
2373
|
ref: containerRef,
|
|
@@ -2339,7 +2378,7 @@ var ResizableEvent = ({
|
|
|
2339
2378
|
}
|
|
2340
2379
|
},
|
|
2341
2380
|
children,
|
|
2342
|
-
/* @__PURE__ */
|
|
2381
|
+
/* @__PURE__ */ React18__namespace.default.createElement(
|
|
2343
2382
|
"div",
|
|
2344
2383
|
{
|
|
2345
2384
|
className: cn(
|
|
@@ -2351,12 +2390,12 @@ var ResizableEvent = ({
|
|
|
2351
2390
|
onMouseDown: readonly ? void 0 : handleResizeStart,
|
|
2352
2391
|
onTouchStart: readonly ? void 0 : handleResizeStart
|
|
2353
2392
|
},
|
|
2354
|
-
/* @__PURE__ */
|
|
2393
|
+
/* @__PURE__ */ React18__namespace.default.createElement("div", { className: cn(
|
|
2355
2394
|
"w-8 h-1 rounded-full transition-all",
|
|
2356
2395
|
isResizing ? "bg-primary" : "bg-muted-foreground/30 group-hover:bg-primary/50"
|
|
2357
2396
|
) })
|
|
2358
2397
|
),
|
|
2359
|
-
isResizing && /* @__PURE__ */
|
|
2398
|
+
isResizing && /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "absolute inset-0 border-2 border-primary border-dashed rounded-md pointer-events-none bg-primary/5" })
|
|
2360
2399
|
);
|
|
2361
2400
|
};
|
|
2362
2401
|
var EventCardBadge = ({
|
|
@@ -2365,7 +2404,7 @@ var EventCardBadge = ({
|
|
|
2365
2404
|
className
|
|
2366
2405
|
}) => {
|
|
2367
2406
|
if (!badge?.icon || !badge?.name) return null;
|
|
2368
|
-
return /* @__PURE__ */
|
|
2407
|
+
return /* @__PURE__ */ React18__namespace.default.createElement(
|
|
2369
2408
|
"div",
|
|
2370
2409
|
{
|
|
2371
2410
|
className: cn(
|
|
@@ -2378,26 +2417,121 @@ var EventCardBadge = ({
|
|
|
2378
2417
|
),
|
|
2379
2418
|
title: badge.name
|
|
2380
2419
|
},
|
|
2381
|
-
/* @__PURE__ */
|
|
2382
|
-
!compact && /* @__PURE__ */
|
|
2420
|
+
/* @__PURE__ */ React18__namespace.default.createElement("span", { className: "shrink-0 flex items-center justify-center [&>svg]:w-2.5 [&>svg]:h-2.5" }, badge.icon),
|
|
2421
|
+
!compact && /* @__PURE__ */ React18__namespace.default.createElement("span", { className: "truncate max-w-[72px]" }, badge.name)
|
|
2383
2422
|
);
|
|
2384
2423
|
};
|
|
2424
|
+
var EventHoverPopover = ({
|
|
2425
|
+
enabled,
|
|
2426
|
+
event,
|
|
2427
|
+
timeRange,
|
|
2428
|
+
children,
|
|
2429
|
+
className
|
|
2430
|
+
}) => {
|
|
2431
|
+
const triggerRef = React18.useRef(null);
|
|
2432
|
+
const [open, setOpen] = React18.useState(false);
|
|
2433
|
+
const [coords, setCoords] = React18.useState({ top: 0, left: 0, placeAbove: true });
|
|
2434
|
+
const hideTimerRef = React18.useRef(null);
|
|
2435
|
+
const updatePosition = React18.useCallback(() => {
|
|
2436
|
+
const el = triggerRef.current;
|
|
2437
|
+
if (!el) return;
|
|
2438
|
+
const rect = el.getBoundingClientRect();
|
|
2439
|
+
const placeAbove = rect.top > 160;
|
|
2440
|
+
setCoords({
|
|
2441
|
+
top: placeAbove ? rect.top - 8 : rect.bottom + 8,
|
|
2442
|
+
left: Math.min(
|
|
2443
|
+
Math.max(rect.left + rect.width / 2, 120),
|
|
2444
|
+
window.innerWidth - 120
|
|
2445
|
+
),
|
|
2446
|
+
placeAbove
|
|
2447
|
+
});
|
|
2448
|
+
}, []);
|
|
2449
|
+
const show = React18.useCallback(() => {
|
|
2450
|
+
if (!enabled) return;
|
|
2451
|
+
if (hideTimerRef.current) {
|
|
2452
|
+
clearTimeout(hideTimerRef.current);
|
|
2453
|
+
hideTimerRef.current = null;
|
|
2454
|
+
}
|
|
2455
|
+
updatePosition();
|
|
2456
|
+
setOpen(true);
|
|
2457
|
+
}, [enabled, updatePosition]);
|
|
2458
|
+
const scheduleHide = React18.useCallback(() => {
|
|
2459
|
+
if (hideTimerRef.current) clearTimeout(hideTimerRef.current);
|
|
2460
|
+
hideTimerRef.current = setTimeout(() => setOpen(false), 80);
|
|
2461
|
+
}, []);
|
|
2462
|
+
React18.useEffect(() => {
|
|
2463
|
+
if (!open) return;
|
|
2464
|
+
const onMove = () => updatePosition();
|
|
2465
|
+
window.addEventListener("scroll", onMove, true);
|
|
2466
|
+
window.addEventListener("resize", onMove);
|
|
2467
|
+
return () => {
|
|
2468
|
+
window.removeEventListener("scroll", onMove, true);
|
|
2469
|
+
window.removeEventListener("resize", onMove);
|
|
2470
|
+
};
|
|
2471
|
+
}, [open, updatePosition]);
|
|
2472
|
+
React18.useEffect(() => () => {
|
|
2473
|
+
if (hideTimerRef.current) clearTimeout(hideTimerRef.current);
|
|
2474
|
+
}, []);
|
|
2475
|
+
if (!enabled) {
|
|
2476
|
+
return /* @__PURE__ */ React18__namespace.default.createElement(React18__namespace.default.Fragment, null, children);
|
|
2477
|
+
}
|
|
2478
|
+
const accent = event.color || "hsl(var(--primary))";
|
|
2479
|
+
return /* @__PURE__ */ React18__namespace.default.createElement(React18__namespace.default.Fragment, null, /* @__PURE__ */ React18__namespace.default.createElement(
|
|
2480
|
+
"div",
|
|
2481
|
+
{
|
|
2482
|
+
ref: triggerRef,
|
|
2483
|
+
className: cn("h-full w-full", className),
|
|
2484
|
+
onMouseEnter: show,
|
|
2485
|
+
onMouseLeave: scheduleHide
|
|
2486
|
+
},
|
|
2487
|
+
children
|
|
2488
|
+
), open && typeof document !== "undefined" && reactDom.createPortal(
|
|
2489
|
+
/* @__PURE__ */ React18__namespace.default.createElement(
|
|
2490
|
+
"div",
|
|
2491
|
+
{
|
|
2492
|
+
role: "tooltip",
|
|
2493
|
+
className: cn(
|
|
2494
|
+
"fixed z-[10000] w-64 max-w-[min(16rem,calc(100vw-1.5rem))]",
|
|
2495
|
+
"rounded-xl border border-border/60 bg-popover text-popover-foreground",
|
|
2496
|
+
"shadow-xl shadow-black/10 backdrop-blur-md",
|
|
2497
|
+
"pointer-events-none transition-opacity duration-150"
|
|
2498
|
+
),
|
|
2499
|
+
style: {
|
|
2500
|
+
top: coords.top,
|
|
2501
|
+
left: coords.left,
|
|
2502
|
+
transform: coords.placeAbove ? "translate(-50%, -100%)" : "translate(-50%, 0)"
|
|
2503
|
+
},
|
|
2504
|
+
onMouseEnter: show,
|
|
2505
|
+
onMouseLeave: scheduleHide
|
|
2506
|
+
},
|
|
2507
|
+
/* @__PURE__ */ React18__namespace.default.createElement(
|
|
2508
|
+
"div",
|
|
2509
|
+
{
|
|
2510
|
+
className: "h-1 rounded-t-xl",
|
|
2511
|
+
style: { backgroundColor: accent }
|
|
2512
|
+
}
|
|
2513
|
+
),
|
|
2514
|
+
/* @__PURE__ */ React18__namespace.default.createElement("div", { className: "p-3 space-y-2" }, /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "text-sm font-semibold leading-snug text-foreground" }, event.title), /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "text-xs font-medium text-muted-foreground tabular-nums" }, timeRange), event.description && /* @__PURE__ */ React18__namespace.default.createElement("p", { className: "text-xs text-muted-foreground/90 leading-relaxed line-clamp-4" }, event.description), event.guests?.length || event.attachments?.length || event.reminders?.length ? /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex flex-wrap gap-1.5 pt-0.5" }, event.guests && event.guests.length > 0 && /* @__PURE__ */ React18__namespace.default.createElement("span", { className: "rounded-md bg-muted/60 px-1.5 py-0.5 text-[10px] text-muted-foreground" }, event.guests.length, " guest", event.guests.length !== 1 ? "s" : ""), event.attachments && event.attachments.length > 0 && /* @__PURE__ */ React18__namespace.default.createElement("span", { className: "rounded-md bg-muted/60 px-1.5 py-0.5 text-[10px] text-muted-foreground" }, event.attachments.length, " file", event.attachments.length !== 1 ? "s" : ""), event.reminders && event.reminders.length > 0 && /* @__PURE__ */ React18__namespace.default.createElement("span", { className: "rounded-md bg-muted/60 px-1.5 py-0.5 text-[10px] text-muted-foreground" }, event.reminders.length, " reminder", event.reminders.length !== 1 ? "s" : "")) : null)
|
|
2515
|
+
),
|
|
2516
|
+
document.body
|
|
2517
|
+
));
|
|
2518
|
+
};
|
|
2385
2519
|
var ICON_CLASS = "w-2.5 h-2.5";
|
|
2386
2520
|
var EVENT_BADGE_ICONS = {
|
|
2387
|
-
privateLesson: /* @__PURE__ */
|
|
2388
|
-
groupLesson: /* @__PURE__ */
|
|
2389
|
-
packageLesson: /* @__PURE__ */
|
|
2390
|
-
online: /* @__PURE__ */
|
|
2391
|
-
inPerson: /* @__PURE__ */
|
|
2392
|
-
homeVisit: /* @__PURE__ */
|
|
2393
|
-
trial: /* @__PURE__ */
|
|
2394
|
-
makeup: /* @__PURE__ */
|
|
2395
|
-
exam: /* @__PURE__ */
|
|
2396
|
-
workshop: /* @__PURE__ */
|
|
2397
|
-
priority: /* @__PURE__ */
|
|
2398
|
-
holiday: /* @__PURE__ */
|
|
2399
|
-
cancelled: /* @__PURE__ */
|
|
2400
|
-
listening: /* @__PURE__ */
|
|
2521
|
+
privateLesson: /* @__PURE__ */ React18__namespace.default.createElement(lucideReact.User, { className: ICON_CLASS }),
|
|
2522
|
+
groupLesson: /* @__PURE__ */ React18__namespace.default.createElement(lucideReact.Users, { className: ICON_CLASS }),
|
|
2523
|
+
packageLesson: /* @__PURE__ */ React18__namespace.default.createElement(lucideReact.Package, { className: ICON_CLASS }),
|
|
2524
|
+
online: /* @__PURE__ */ React18__namespace.default.createElement(lucideReact.Video, { className: ICON_CLASS }),
|
|
2525
|
+
inPerson: /* @__PURE__ */ React18__namespace.default.createElement(lucideReact.MapPin, { className: ICON_CLASS }),
|
|
2526
|
+
homeVisit: /* @__PURE__ */ React18__namespace.default.createElement(lucideReact.Home, { className: ICON_CLASS }),
|
|
2527
|
+
trial: /* @__PURE__ */ React18__namespace.default.createElement(lucideReact.Sparkles, { className: ICON_CLASS }),
|
|
2528
|
+
makeup: /* @__PURE__ */ React18__namespace.default.createElement(lucideReact.RefreshCw, { className: ICON_CLASS }),
|
|
2529
|
+
exam: /* @__PURE__ */ React18__namespace.default.createElement(lucideReact.ClipboardCheck, { className: ICON_CLASS }),
|
|
2530
|
+
workshop: /* @__PURE__ */ React18__namespace.default.createElement(lucideReact.Presentation, { className: ICON_CLASS }),
|
|
2531
|
+
priority: /* @__PURE__ */ React18__namespace.default.createElement(lucideReact.Star, { className: ICON_CLASS }),
|
|
2532
|
+
holiday: /* @__PURE__ */ React18__namespace.default.createElement(lucideReact.PartyPopper, { className: ICON_CLASS }),
|
|
2533
|
+
cancelled: /* @__PURE__ */ React18__namespace.default.createElement(lucideReact.Ban, { className: ICON_CLASS }),
|
|
2534
|
+
listening: /* @__PURE__ */ React18__namespace.default.createElement(lucideReact.Headphones, { className: ICON_CLASS })
|
|
2401
2535
|
};
|
|
2402
2536
|
var EVENT_BADGE_LABELS = {
|
|
2403
2537
|
tr: {
|
|
@@ -2488,13 +2622,13 @@ var WeekView = ({
|
|
|
2488
2622
|
const weekDays = dateFns.eachDayOfInterval({ start, end });
|
|
2489
2623
|
const hours = reverseTime ? Array.from({ length: 24 }, (_, i) => 23 - i) : Array.from({ length: 24 }, (_, i) => i);
|
|
2490
2624
|
const hourHeight = 60;
|
|
2491
|
-
const scrollContainerRef =
|
|
2492
|
-
const [now, setNow] =
|
|
2493
|
-
|
|
2625
|
+
const scrollContainerRef = React18__namespace.default.useRef(null);
|
|
2626
|
+
const [now, setNow] = React18__namespace.default.useState(/* @__PURE__ */ new Date());
|
|
2627
|
+
React18__namespace.default.useEffect(() => {
|
|
2494
2628
|
const interval = setInterval(() => setNow(/* @__PURE__ */ new Date()), 6e4);
|
|
2495
2629
|
return () => clearInterval(interval);
|
|
2496
2630
|
}, []);
|
|
2497
|
-
|
|
2631
|
+
React18__namespace.default.useEffect(() => {
|
|
2498
2632
|
if (scrollContainerRef.current) {
|
|
2499
2633
|
scrollContainerRef.current.scrollTop = reverseTime ? (23 - initialScrollHour) * hourHeight : initialScrollHour * hourHeight;
|
|
2500
2634
|
}
|
|
@@ -2524,44 +2658,44 @@ var WeekView = ({
|
|
|
2524
2658
|
acronym = tz;
|
|
2525
2659
|
}
|
|
2526
2660
|
}
|
|
2527
|
-
return /* @__PURE__ */
|
|
2661
|
+
return /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex flex-col items-center justify-center leading-tight" }, /* @__PURE__ */ React18__namespace.default.createElement("span", null, displayTime), /* @__PURE__ */ React18__namespace.default.createElement("span", { className: "text-[10px] opacity-75" }, "(", acronym, ")"));
|
|
2528
2662
|
};
|
|
2529
2663
|
const timeFormat = getTimeFormat(language);
|
|
2530
2664
|
const eventTimeFormat = getTimeFormatFull(language);
|
|
2531
2665
|
const nowFormat = getTimeFormatFull(language);
|
|
2532
|
-
return /* @__PURE__ */
|
|
2666
|
+
return /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex flex-col h-full min-h-0 bg-background border-[0.5px] border-border/50 rounded-2xl overflow-hidden min-w-[800px] md:min-w-0 shadow-sm" }, /* @__PURE__ */ React18__namespace.default.createElement(
|
|
2533
2667
|
"div",
|
|
2534
2668
|
{
|
|
2535
2669
|
ref: scrollContainerRef,
|
|
2536
2670
|
className: "flex-1 min-h-0 overflow-y-auto scrollbar-hide relative bg-background scroll-smooth",
|
|
2537
2671
|
style: { scrollbarGutter: "stable" }
|
|
2538
2672
|
},
|
|
2539
|
-
/* @__PURE__ */
|
|
2673
|
+
/* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex border-b-[0.5px] border-border/50 bg-gradient-to-r from-muted/20 via-background to-muted/20 z-20 sticky top-0 backdrop-blur-sm" }, /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex-none p-3 text-center text-xs font-semibold text-muted-foreground w-16 flex items-center justify-center border-r-[0.5px] border-border/30 bg-muted/10" }, getTimezoneDisplay(timezone)), /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex-1 grid grid-cols-7" }, weekDays.map((day, index) => /* @__PURE__ */ React18__namespace.default.createElement("div", { key: day.toISOString(), className: cn("py-3 px-2 text-center", index > 0 && "border-l-[0.5px] border-border/30") }, /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "text-[10px] font-semibold text-muted-foreground uppercase tracking-wider mb-1.5" }, dateFns.format(day, "EEE", { locale })), /* @__PURE__ */ React18__namespace.default.createElement("div", { className: cn(
|
|
2540
2674
|
"w-9 h-9 flex items-center justify-center rounded-xl mx-auto text-sm font-semibold transition-all duration-200",
|
|
2541
2675
|
dateFns.isToday(day) ? "bg-primary text-primary-foreground shadow-lg shadow-primary/30 scale-110" : "text-foreground hover:bg-accent/80"
|
|
2542
2676
|
) }, dateFns.format(day, "d", { locale })))))),
|
|
2543
|
-
/* @__PURE__ */
|
|
2677
|
+
/* @__PURE__ */ React18__namespace.default.createElement(
|
|
2544
2678
|
"div",
|
|
2545
2679
|
{
|
|
2546
2680
|
className: "flex min-w-full relative",
|
|
2547
2681
|
style: { height: hours.length * hourHeight }
|
|
2548
2682
|
},
|
|
2549
|
-
/* @__PURE__ */
|
|
2683
|
+
/* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex-none w-16 border-r-[0.5px] border-border/30 relative bg-muted/5" }, hours.map((hour) => /* @__PURE__ */ React18__namespace.default.createElement(
|
|
2550
2684
|
"div",
|
|
2551
2685
|
{
|
|
2552
2686
|
key: hour,
|
|
2553
2687
|
className: "relative w-full text-[11px] text-muted-foreground/80 text-right pr-3 font-medium tabular-nums box-border",
|
|
2554
2688
|
style: { height: hourHeight }
|
|
2555
2689
|
},
|
|
2556
|
-
/* @__PURE__ */
|
|
2690
|
+
/* @__PURE__ */ React18__namespace.default.createElement("span", { className: "block -translate-y-1/2" }, hour !== 0 && dateFns.format((/* @__PURE__ */ new Date()).setHours(hour, 0, 0, 0), timeFormat, { locale }))
|
|
2557
2691
|
))),
|
|
2558
|
-
/* @__PURE__ */
|
|
2692
|
+
/* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex-1 grid grid-cols-7 relative" }, weekDays.map((day, dayIndex) => {
|
|
2559
2693
|
const dayEvents = events.filter((e) => {
|
|
2560
2694
|
const zonedStart = getZonedDate(e.start);
|
|
2561
2695
|
return dateFns.isSameDay(zonedStart, day);
|
|
2562
2696
|
});
|
|
2563
|
-
return /* @__PURE__ */
|
|
2564
|
-
return /* @__PURE__ */
|
|
2697
|
+
return /* @__PURE__ */ React18__namespace.default.createElement("div", { key: day.toISOString(), className: cn("relative h-full", dayIndex > 0 && "border-l-[0.5px] border-border/30") }, hours.map((hour) => {
|
|
2698
|
+
return /* @__PURE__ */ React18__namespace.default.createElement(
|
|
2565
2699
|
"div",
|
|
2566
2700
|
{
|
|
2567
2701
|
key: hour,
|
|
@@ -2572,7 +2706,7 @@ var WeekView = ({
|
|
|
2572
2706
|
const cellDate = new Date(day);
|
|
2573
2707
|
cellDate.setHours(hour, minute, 0, 0);
|
|
2574
2708
|
const cellId = cellDate.toISOString();
|
|
2575
|
-
return /* @__PURE__ */
|
|
2709
|
+
return /* @__PURE__ */ React18__namespace.default.createElement(
|
|
2576
2710
|
DroppableCell,
|
|
2577
2711
|
{
|
|
2578
2712
|
key: minute,
|
|
@@ -2584,7 +2718,7 @@ var WeekView = ({
|
|
|
2584
2718
|
top: `${minute / 60 * 100}%`
|
|
2585
2719
|
}
|
|
2586
2720
|
},
|
|
2587
|
-
/* @__PURE__ */
|
|
2721
|
+
/* @__PURE__ */ React18__namespace.default.createElement(
|
|
2588
2722
|
"div",
|
|
2589
2723
|
{
|
|
2590
2724
|
className: "w-full h-full bg-transparent cursor-pointer",
|
|
@@ -2618,9 +2752,9 @@ var WeekView = ({
|
|
|
2618
2752
|
const height = durationMinutes / 60 * hourHeight;
|
|
2619
2753
|
const top = reverseTime ? (1440 - startMinutes - durationMinutes) / 60 * hourHeight : startMinutes / 60 * hourHeight;
|
|
2620
2754
|
const isShortEvent = compactShortEvents && durationMinutes < 60;
|
|
2621
|
-
const resolvedBadge = resolveEventBadge(event, language);
|
|
2755
|
+
const resolvedBadge = !isShortEvent ? resolveEventBadge(event, language) : void 0;
|
|
2622
2756
|
const hasBadge = Boolean(resolvedBadge);
|
|
2623
|
-
return /* @__PURE__ */
|
|
2757
|
+
return /* @__PURE__ */ React18__namespace.default.createElement(
|
|
2624
2758
|
DraggableEvent,
|
|
2625
2759
|
{
|
|
2626
2760
|
key: `${event.id}-${day.toISOString()}`,
|
|
@@ -2635,7 +2769,7 @@ var WeekView = ({
|
|
|
2635
2769
|
paddingRight: count > 1 ? "2px" : "0"
|
|
2636
2770
|
}
|
|
2637
2771
|
},
|
|
2638
|
-
/* @__PURE__ */
|
|
2772
|
+
/* @__PURE__ */ React18__namespace.default.createElement(
|
|
2639
2773
|
ResizableEvent,
|
|
2640
2774
|
{
|
|
2641
2775
|
readonly,
|
|
@@ -2645,48 +2779,56 @@ var WeekView = ({
|
|
|
2645
2779
|
className: "h-full",
|
|
2646
2780
|
style: { height: "100%" }
|
|
2647
2781
|
},
|
|
2648
|
-
/* @__PURE__ */
|
|
2649
|
-
|
|
2782
|
+
/* @__PURE__ */ React18__namespace.default.createElement(
|
|
2783
|
+
EventHoverPopover,
|
|
2650
2784
|
{
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
readonly ? "cursor-default" : "cursor-grab active:cursor-grabbing",
|
|
2655
|
-
!event.color && "border-primary/20 bg-primary/10",
|
|
2656
|
-
isShortEvent ? "px-1 flex items-center justify-center" : "p-2",
|
|
2657
|
-
// Reserve space under the badge so title/time do not overlap
|
|
2658
|
-
hasBadge && !isShortEvent && "pt-4",
|
|
2659
|
-
// Add active border for overlapped events to distinguish them
|
|
2660
|
-
count > 1 && "border-l-4 border-l-primary/50"
|
|
2661
|
-
),
|
|
2662
|
-
style: {
|
|
2663
|
-
height: "100%",
|
|
2664
|
-
backgroundColor: event.color ? `${event.color}15` : void 0,
|
|
2665
|
-
borderColor: event.color ? `${event.color}40` : void 0,
|
|
2666
|
-
borderLeftWidth: "3px",
|
|
2667
|
-
borderLeftColor: event.color || "var(--primary)"
|
|
2668
|
-
},
|
|
2669
|
-
onClick: (e) => {
|
|
2670
|
-
e.stopPropagation();
|
|
2671
|
-
onEventClick?.(event);
|
|
2672
|
-
},
|
|
2673
|
-
title: count > 1 ? `${event.title} (${index + 1}/${count})` : void 0
|
|
2785
|
+
enabled: isShortEvent,
|
|
2786
|
+
event,
|
|
2787
|
+
timeRange: `${dateFns.format(zonedEventStart, eventTimeFormat, { locale })} - ${dateFns.format(zonedEventEnd, eventTimeFormat, { locale })}`
|
|
2674
2788
|
},
|
|
2675
|
-
|
|
2676
|
-
|
|
2789
|
+
/* @__PURE__ */ React18__namespace.default.createElement(
|
|
2790
|
+
"div",
|
|
2677
2791
|
{
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2792
|
+
className: cn(
|
|
2793
|
+
"rounded-md border shadow-sm transition-all hover:shadow-md group overflow-hidden relative",
|
|
2794
|
+
"glass",
|
|
2795
|
+
readonly ? "cursor-default" : "cursor-grab active:cursor-grabbing",
|
|
2796
|
+
!event.color && "border-primary/20 bg-primary/10",
|
|
2797
|
+
isShortEvent ? "px-1 flex items-center justify-center" : "p-2",
|
|
2798
|
+
// Reserve space under the badge so title/time do not overlap
|
|
2799
|
+
hasBadge && !isShortEvent && "pt-4",
|
|
2800
|
+
// Add active border for overlapped events to distinguish them
|
|
2801
|
+
count > 1 && "border-l-4 border-l-primary/50"
|
|
2802
|
+
),
|
|
2803
|
+
style: {
|
|
2804
|
+
height: "100%",
|
|
2805
|
+
backgroundColor: event.color ? `${event.color}15` : void 0,
|
|
2806
|
+
borderColor: event.color ? `${event.color}40` : void 0,
|
|
2807
|
+
borderLeftWidth: "3px",
|
|
2808
|
+
borderLeftColor: event.color || "var(--primary)"
|
|
2809
|
+
},
|
|
2810
|
+
onClick: (e) => {
|
|
2811
|
+
e.stopPropagation();
|
|
2812
|
+
onEventClick?.(event);
|
|
2813
|
+
},
|
|
2814
|
+
title: !isShortEvent && count > 1 ? `${event.title} (${index + 1}/${count})` : void 0
|
|
2815
|
+
},
|
|
2816
|
+
hasBadge && /* @__PURE__ */ React18__namespace.default.createElement(
|
|
2817
|
+
EventCardBadge,
|
|
2818
|
+
{
|
|
2819
|
+
badge: resolvedBadge,
|
|
2820
|
+
compact: false
|
|
2821
|
+
}
|
|
2822
|
+
),
|
|
2823
|
+
/* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex flex-col h-full overflow-hidden w-full" }, /* @__PURE__ */ React18__namespace.default.createElement("div", { className: cn(
|
|
2824
|
+
"font-semibold truncate text-foreground/90 leading-tight",
|
|
2825
|
+
isShortEvent ? "text-xs text-center" : "text-xs"
|
|
2826
|
+
) }, event.title), !isShortEvent && /* @__PURE__ */ React18__namespace.default.createElement(React18__namespace.default.Fragment, null, /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "text-[10px] text-muted-foreground truncate mt-0.5 font-medium leading-tight" }, dateFns.format(zonedEventStart, eventTimeFormat, { locale }), " - ", dateFns.format(zonedEventEnd, eventTimeFormat, { locale })), event.description && height > 50 && /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "text-[10px] text-muted-foreground/80 truncate mt-1 leading-tight opacity-80" }, event.description)), count > 1 && !isShortEvent && /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "absolute top-1 right-1 bg-background/80 backdrop-blur-sm rounded-full w-4 h-4 flex items-center justify-center text-[9px] font-bold text-muted-foreground border border-border shadow-sm" }, count))
|
|
2827
|
+
)
|
|
2686
2828
|
)
|
|
2687
2829
|
)
|
|
2688
2830
|
);
|
|
2689
|
-
}), dateFns.isToday(day) && /* @__PURE__ */
|
|
2831
|
+
}), dateFns.isToday(day) && /* @__PURE__ */ React18__namespace.default.createElement(
|
|
2690
2832
|
"div",
|
|
2691
2833
|
{
|
|
2692
2834
|
className: "absolute left-0 right-0 z-20 pointer-events-none flex items-center",
|
|
@@ -2694,12 +2836,12 @@ var WeekView = ({
|
|
|
2694
2836
|
top: reverseTime ? `${(1440 - (zonedNow.getHours() * 60 + zonedNow.getMinutes())) / 60 * hourHeight}px` : `${(zonedNow.getHours() * 60 + zonedNow.getMinutes()) / 60 * hourHeight}px`
|
|
2695
2837
|
}
|
|
2696
2838
|
},
|
|
2697
|
-
/* @__PURE__ */
|
|
2698
|
-
/* @__PURE__ */
|
|
2839
|
+
/* @__PURE__ */ React18__namespace.default.createElement("div", { className: "h-[2px] w-full bg-gradient-to-r from-primary via-primary to-primary/50" }),
|
|
2840
|
+
/* @__PURE__ */ React18__namespace.default.createElement("div", { className: "absolute -left-1.5 w-3 h-3 bg-primary rounded-full shadow-lg shadow-primary/40 ring-2 ring-background animate-pulse" })
|
|
2699
2841
|
));
|
|
2700
2842
|
}))
|
|
2701
2843
|
),
|
|
2702
|
-
/* @__PURE__ */
|
|
2844
|
+
/* @__PURE__ */ React18__namespace.default.createElement(
|
|
2703
2845
|
"div",
|
|
2704
2846
|
{
|
|
2705
2847
|
className: "absolute left-0 w-16 pointer-events-none z-30 flex justify-end pr-2",
|
|
@@ -2707,7 +2849,7 @@ var WeekView = ({
|
|
|
2707
2849
|
top: reverseTime ? `${(1440 - (zonedNow.getHours() * 60 + zonedNow.getMinutes())) / 60 * hourHeight + 80}px` : `${(zonedNow.getHours() * 60 + zonedNow.getMinutes()) / 60 * hourHeight + 80}px`
|
|
2708
2850
|
}
|
|
2709
2851
|
},
|
|
2710
|
-
/* @__PURE__ */
|
|
2852
|
+
/* @__PURE__ */ React18__namespace.default.createElement("span", { className: "text-[10px] font-bold text-primary-foreground bg-primary px-1.5 py-0.5 rounded-md shadow-md -translate-y-1/2 backdrop-blur-none" }, dateFns.format(zonedNow, nowFormat, { locale }))
|
|
2711
2853
|
)
|
|
2712
2854
|
));
|
|
2713
2855
|
};
|
|
@@ -2727,13 +2869,13 @@ var DayView = ({
|
|
|
2727
2869
|
}) => {
|
|
2728
2870
|
const hours = reverseTime ? Array.from({ length: 24 }, (_, i) => 23 - i) : Array.from({ length: 24 }, (_, i) => i);
|
|
2729
2871
|
const hourHeight = 80;
|
|
2730
|
-
const scrollContainerRef =
|
|
2731
|
-
const [now, setNow] =
|
|
2732
|
-
|
|
2872
|
+
const scrollContainerRef = React18__namespace.default.useRef(null);
|
|
2873
|
+
const [now, setNow] = React18__namespace.default.useState(/* @__PURE__ */ new Date());
|
|
2874
|
+
React18__namespace.default.useEffect(() => {
|
|
2733
2875
|
const interval = setInterval(() => setNow(/* @__PURE__ */ new Date()), 6e4);
|
|
2734
2876
|
return () => clearInterval(interval);
|
|
2735
2877
|
}, []);
|
|
2736
|
-
|
|
2878
|
+
React18__namespace.default.useEffect(() => {
|
|
2737
2879
|
if (scrollContainerRef.current) {
|
|
2738
2880
|
scrollContainerRef.current.scrollTop = reverseTime ? (23 - initialScrollHour) * hourHeight : initialScrollHour * hourHeight;
|
|
2739
2881
|
}
|
|
@@ -2749,15 +2891,15 @@ var DayView = ({
|
|
|
2749
2891
|
const timeFormat = getTimeFormat(language);
|
|
2750
2892
|
const eventTimeFormat = getTimeFormatFull(language);
|
|
2751
2893
|
const nowFormat = getTimeFormatFull(language);
|
|
2752
|
-
return /* @__PURE__ */
|
|
2894
|
+
return /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex flex-col h-full min-h-0 bg-background border-[0.5px] border-border/50 rounded-2xl overflow-hidden shadow-sm" }, /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "px-6 py-4 border-b-[0.5px] border-border/50 bg-gradient-to-r from-muted/20 via-background to-muted/20 text-center shrink-0" }, /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex items-center justify-center gap-3" }, /* @__PURE__ */ React18__namespace.default.createElement("h2", { className: "text-xl font-semibold capitalize text-foreground" }, dateFns.format(currentDate, "EEEE, MMMM d, yyyy", { locale })), dateFns.isToday(currentDate) && /* @__PURE__ */ React18__namespace.default.createElement("span", { className: "text-xs font-semibold bg-primary text-primary-foreground px-3 py-1 rounded-full shadow-md shadow-primary/20" }, "Today"))), /* @__PURE__ */ React18__namespace.default.createElement("div", { ref: scrollContainerRef, className: "flex-1 min-h-0 overflow-y-auto relative" }, /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex relative", style: { height: hours.length * hourHeight } }, /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "w-20 bg-muted/5 border-r-[0.5px] border-border/30 relative" }, hours.map((hour) => /* @__PURE__ */ React18__namespace.default.createElement(
|
|
2753
2895
|
"div",
|
|
2754
2896
|
{
|
|
2755
2897
|
key: hour,
|
|
2756
2898
|
className: "relative w-full",
|
|
2757
2899
|
style: { height: hourHeight }
|
|
2758
2900
|
},
|
|
2759
|
-
hour !== 0 && /* @__PURE__ */
|
|
2760
|
-
)), dateFns.isToday(currentDate) && /* @__PURE__ */
|
|
2901
|
+
hour !== 0 && /* @__PURE__ */ React18__namespace.default.createElement("span", { className: "absolute w-full text-center -top-3 left-1/2 -translate-x-1/2 text-[11px] text-muted-foreground/80 font-medium tabular-nums bg-background px-1.5 py-0.5 rounded-md" }, dateFns.format((/* @__PURE__ */ new Date()).setHours(hour, 0, 0, 0), timeFormat, { locale }))
|
|
2902
|
+
)), dateFns.isToday(currentDate) && /* @__PURE__ */ React18__namespace.default.createElement(
|
|
2761
2903
|
"div",
|
|
2762
2904
|
{
|
|
2763
2905
|
className: "absolute left-0 w-full pointer-events-none z-30 flex justify-end pr-2",
|
|
@@ -2765,9 +2907,9 @@ var DayView = ({
|
|
|
2765
2907
|
top: reverseTime ? `${(1440 - (zonedNow.getHours() * 60 + zonedNow.getMinutes())) / 60 * hourHeight}px` : `${(zonedNow.getHours() * 60 + zonedNow.getMinutes()) / 60 * hourHeight}px`
|
|
2766
2908
|
}
|
|
2767
2909
|
},
|
|
2768
|
-
/* @__PURE__ */
|
|
2769
|
-
)), /* @__PURE__ */
|
|
2770
|
-
return /* @__PURE__ */
|
|
2910
|
+
/* @__PURE__ */ React18__namespace.default.createElement("span", { className: "text-[10px] font-bold text-white bg-primary px-2 py-1 rounded-lg shadow-md shadow-primary/30 -translate-y-1/2" }, dateFns.format(zonedNow, nowFormat, { locale }))
|
|
2911
|
+
)), /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex-1 relative" }, hours.map((hour) => {
|
|
2912
|
+
return /* @__PURE__ */ React18__namespace.default.createElement(
|
|
2771
2913
|
"div",
|
|
2772
2914
|
{
|
|
2773
2915
|
key: hour,
|
|
@@ -2778,7 +2920,7 @@ var DayView = ({
|
|
|
2778
2920
|
const cellDate = new Date(currentDate);
|
|
2779
2921
|
cellDate.setHours(hour, minute, 0, 0);
|
|
2780
2922
|
const cellId = cellDate.toISOString();
|
|
2781
|
-
return /* @__PURE__ */
|
|
2923
|
+
return /* @__PURE__ */ React18__namespace.default.createElement(
|
|
2782
2924
|
DroppableCell,
|
|
2783
2925
|
{
|
|
2784
2926
|
key: minute,
|
|
@@ -2790,7 +2932,7 @@ var DayView = ({
|
|
|
2790
2932
|
top: `${minute / 60 * 100}%`
|
|
2791
2933
|
}
|
|
2792
2934
|
},
|
|
2793
|
-
/* @__PURE__ */
|
|
2935
|
+
/* @__PURE__ */ React18__namespace.default.createElement(
|
|
2794
2936
|
"div",
|
|
2795
2937
|
{
|
|
2796
2938
|
className: "h-full w-full bg-transparent cursor-pointer",
|
|
@@ -2823,7 +2965,8 @@ var DayView = ({
|
|
|
2823
2965
|
const height = durationMinutes / 60 * hourHeight;
|
|
2824
2966
|
const top = reverseTime ? (1440 - startMinutes - durationMinutes) / 60 * hourHeight : startMinutes / 60 * hourHeight;
|
|
2825
2967
|
const isShortEvent = compactShortEvents && durationMinutes < 45;
|
|
2826
|
-
|
|
2968
|
+
const timeRange = `${dateFns.format(zonedStart, eventTimeFormat, { locale })} - ${dateFns.format(zonedEnd, eventTimeFormat, { locale })}`;
|
|
2969
|
+
return /* @__PURE__ */ React18__namespace.default.createElement(
|
|
2827
2970
|
DraggableEvent,
|
|
2828
2971
|
{
|
|
2829
2972
|
key: `${event.id}-${currentDate.toISOString()}`,
|
|
@@ -2837,7 +2980,7 @@ var DayView = ({
|
|
|
2837
2980
|
paddingRight: count > 1 ? "2px" : "0"
|
|
2838
2981
|
}
|
|
2839
2982
|
},
|
|
2840
|
-
/* @__PURE__ */
|
|
2983
|
+
/* @__PURE__ */ React18__namespace.default.createElement(
|
|
2841
2984
|
ResizableEvent,
|
|
2842
2985
|
{
|
|
2843
2986
|
readonly,
|
|
@@ -2847,38 +2990,46 @@ var DayView = ({
|
|
|
2847
2990
|
className: "h-full",
|
|
2848
2991
|
style: { height: "100%" }
|
|
2849
2992
|
},
|
|
2850
|
-
/* @__PURE__ */
|
|
2851
|
-
|
|
2993
|
+
/* @__PURE__ */ React18__namespace.default.createElement(
|
|
2994
|
+
EventHoverPopover,
|
|
2852
2995
|
{
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
readonly ? "cursor-default" : "cursor-grab active:cursor-grabbing",
|
|
2857
|
-
!event.color && "bg-primary/10 border-primary/20",
|
|
2858
|
-
isShortEvent ? "px-2 flex items-center" : "px-3 py-2",
|
|
2859
|
-
count > 1 && "border-l-4"
|
|
2860
|
-
),
|
|
2861
|
-
style: {
|
|
2862
|
-
backgroundColor: event.color ? `${event.color}15` : void 0,
|
|
2863
|
-
borderColor: event.color ? `${event.color}30` : void 0,
|
|
2864
|
-
borderLeftColor: event.color || "var(--primary)",
|
|
2865
|
-
borderLeftWidth: count > 1 ? "4px" : "3px"
|
|
2866
|
-
},
|
|
2867
|
-
onClick: (e) => {
|
|
2868
|
-
e.stopPropagation();
|
|
2869
|
-
onEventClick?.(event);
|
|
2870
|
-
},
|
|
2871
|
-
title: count > 1 ? `${event.title} (${index + 1}/${count})` : void 0
|
|
2996
|
+
enabled: isShortEvent,
|
|
2997
|
+
event,
|
|
2998
|
+
timeRange
|
|
2872
2999
|
},
|
|
2873
|
-
/* @__PURE__ */
|
|
2874
|
-
"
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
3000
|
+
/* @__PURE__ */ React18__namespace.default.createElement(
|
|
3001
|
+
"div",
|
|
3002
|
+
{
|
|
3003
|
+
className: cn(
|
|
3004
|
+
"h-full rounded-lg border-[0.5px] shadow-sm overflow-hidden transition-all hover:shadow-lg hover:z-20 group",
|
|
3005
|
+
"glass backdrop-blur-sm",
|
|
3006
|
+
readonly ? "cursor-default" : "cursor-grab active:cursor-grabbing",
|
|
3007
|
+
!event.color && "bg-primary/10 border-primary/20",
|
|
3008
|
+
isShortEvent ? "px-2 flex items-center" : "px-3 py-2",
|
|
3009
|
+
count > 1 && "border-l-4"
|
|
3010
|
+
),
|
|
3011
|
+
style: {
|
|
3012
|
+
backgroundColor: event.color ? `${event.color}15` : void 0,
|
|
3013
|
+
borderColor: event.color ? `${event.color}30` : void 0,
|
|
3014
|
+
borderLeftColor: event.color || "var(--primary)",
|
|
3015
|
+
borderLeftWidth: count > 1 ? "4px" : "3px"
|
|
3016
|
+
},
|
|
3017
|
+
onClick: (e) => {
|
|
3018
|
+
e.stopPropagation();
|
|
3019
|
+
onEventClick?.(event);
|
|
3020
|
+
},
|
|
3021
|
+
title: !isShortEvent && count > 1 ? `${event.title} (${index + 1}/${count})` : void 0
|
|
3022
|
+
},
|
|
3023
|
+
/* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex flex-col h-full overflow-hidden w-full" }, /* @__PURE__ */ React18__namespace.default.createElement("div", { className: cn(
|
|
3024
|
+
"font-semibold truncate leading-tight",
|
|
3025
|
+
isShortEvent ? "text-xs" : "text-sm",
|
|
3026
|
+
event.color ? "text-foreground" : "text-foreground/90"
|
|
3027
|
+
) }, event.title), !isShortEvent && /* @__PURE__ */ React18__namespace.default.createElement(React18__namespace.default.Fragment, null, /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "text-xs text-muted-foreground mt-0.5 font-medium" }, timeRange), event.description && height > 60 && /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "text-xs text-muted-foreground/80 mt-1 line-clamp-2" }, event.description)), count > 1 && !isShortEvent && /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "absolute top-1.5 right-1.5 bg-background/90 backdrop-blur-sm rounded-full w-5 h-5 flex items-center justify-center text-[10px] font-bold text-muted-foreground border border-border shadow-sm" }, count))
|
|
3028
|
+
)
|
|
2878
3029
|
)
|
|
2879
3030
|
)
|
|
2880
3031
|
);
|
|
2881
|
-
}), dateFns.isToday(currentDate) && /* @__PURE__ */
|
|
3032
|
+
}), dateFns.isToday(currentDate) && /* @__PURE__ */ React18__namespace.default.createElement(
|
|
2882
3033
|
"div",
|
|
2883
3034
|
{
|
|
2884
3035
|
className: "absolute left-0 right-0 z-20 pointer-events-none flex items-center",
|
|
@@ -2886,17 +3037,17 @@ var DayView = ({
|
|
|
2886
3037
|
top: reverseTime ? `${(1440 - (zonedNow.getHours() * 60 + zonedNow.getMinutes())) / 60 * hourHeight}px` : `${(zonedNow.getHours() * 60 + zonedNow.getMinutes()) / 60 * hourHeight}px`
|
|
2887
3038
|
}
|
|
2888
3039
|
},
|
|
2889
|
-
/* @__PURE__ */
|
|
2890
|
-
/* @__PURE__ */
|
|
3040
|
+
/* @__PURE__ */ React18__namespace.default.createElement("div", { className: "h-[2px] w-full bg-gradient-to-r from-primary via-primary to-primary/50" }),
|
|
3041
|
+
/* @__PURE__ */ React18__namespace.default.createElement("div", { className: "absolute -left-1.5 w-3 h-3 bg-primary rounded-full shadow-lg shadow-primary/40 ring-2 ring-background animate-pulse" })
|
|
2891
3042
|
)))));
|
|
2892
3043
|
};
|
|
2893
|
-
var AgendaEmptyState = ({ onCreateEvent, translations }) => /* @__PURE__ */
|
|
3044
|
+
var AgendaEmptyState = ({ onCreateEvent, translations }) => /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex flex-col items-center justify-center h-full min-h-[400px] py-12" }, /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "relative mb-8" }, /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "p-8 bg-gradient-to-br from-green-50 to-blue-50 dark:from-green-900/10 dark:to-blue-900/10 rounded-3xl border border-border/30" }, /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex items-center gap-4" }, /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "w-12 h-12 rounded-2xl bg-green-100 dark:bg-green-900/30 flex items-center justify-center" }, /* @__PURE__ */ React18__namespace.default.createElement("svg", { className: "w-6 h-6 text-green-600 dark:text-green-400", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2 }, /* @__PURE__ */ React18__namespace.default.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M5 13l4 4L19 7" }))), /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "text-left" }, /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "font-medium text-foreground" }, "All caught up!"), /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "text-sm text-muted-foreground" }, "No events scheduled"))))), /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "text-center max-w-sm" }, /* @__PURE__ */ React18__namespace.default.createElement("h3", { className: "text-lg font-semibold text-foreground mb-2" }, translations?.noUpcoming || "Your schedule is clear"), /* @__PURE__ */ React18__namespace.default.createElement("p", { className: "text-sm text-muted-foreground mb-6" }, "No upcoming events to show. Create a new event to start planning."), onCreateEvent && /* @__PURE__ */ React18__namespace.default.createElement(
|
|
2894
3045
|
"button",
|
|
2895
3046
|
{
|
|
2896
3047
|
onClick: onCreateEvent,
|
|
2897
3048
|
className: "inline-flex items-center gap-2 px-5 py-2.5 bg-primary text-primary-foreground rounded-xl font-medium text-sm shadow-lg shadow-primary/20 hover:shadow-xl hover:shadow-primary/30 hover:scale-105 active:scale-95 transition-all duration-200"
|
|
2898
3049
|
},
|
|
2899
|
-
/* @__PURE__ */
|
|
3050
|
+
/* @__PURE__ */ React18__namespace.default.createElement(lucideReact.Plus, { className: "w-4 h-4" }),
|
|
2900
3051
|
translations?.createEvent || "Create Event"
|
|
2901
3052
|
)));
|
|
2902
3053
|
var formatDuration = (start, end) => {
|
|
@@ -2922,7 +3073,7 @@ var AgendaView = ({
|
|
|
2922
3073
|
renderEmptyState
|
|
2923
3074
|
}) => {
|
|
2924
3075
|
const timeFmt = getTimeFormatFull(language);
|
|
2925
|
-
const groupedEvents =
|
|
3076
|
+
const groupedEvents = React18.useMemo(() => {
|
|
2926
3077
|
const startDate = dateFns.startOfDay(currentDate);
|
|
2927
3078
|
const groups = [];
|
|
2928
3079
|
const sortedEvents = [...events].sort((a, b) => a.start.getTime() - b.start.getTime());
|
|
@@ -2948,7 +3099,7 @@ var AgendaView = ({
|
|
|
2948
3099
|
hidden: { opacity: 0, x: -20 },
|
|
2949
3100
|
show: { opacity: 1, x: 0 }
|
|
2950
3101
|
};
|
|
2951
|
-
return /* @__PURE__ */
|
|
3102
|
+
return /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex flex-col h-full min-h-0 bg-background overflow-y-auto" }, groupedEvents.length === 0 ? renderEmptyState ? renderEmptyState({ view: "agenda", onCreateEvent }) : /* @__PURE__ */ React18__namespace.default.createElement(AgendaEmptyState, { onCreateEvent }) : /* @__PURE__ */ React18__namespace.default.createElement(
|
|
2952
3103
|
framerMotion.motion.div,
|
|
2953
3104
|
{
|
|
2954
3105
|
className: "max-w-3xl mx-auto w-full pb-10 px-4 md:px-6",
|
|
@@ -2956,21 +3107,21 @@ var AgendaView = ({
|
|
|
2956
3107
|
initial: "hidden",
|
|
2957
3108
|
animate: "show"
|
|
2958
3109
|
},
|
|
2959
|
-
groupedEvents.map((group, groupIndex) => /* @__PURE__ */
|
|
3110
|
+
groupedEvents.map((group, groupIndex) => /* @__PURE__ */ React18__namespace.default.createElement(
|
|
2960
3111
|
framerMotion.motion.div,
|
|
2961
3112
|
{
|
|
2962
3113
|
key: group.date.toISOString(),
|
|
2963
3114
|
className: "relative",
|
|
2964
3115
|
variants: item
|
|
2965
3116
|
},
|
|
2966
|
-
/* @__PURE__ */
|
|
3117
|
+
/* @__PURE__ */ React18__namespace.default.createElement("div", { className: "sticky top-0 bg-background/95 backdrop-blur-md py-4 z-10 border-b border-border/50" }, /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex items-center gap-4" }, /* @__PURE__ */ React18__namespace.default.createElement("div", { className: cn(
|
|
2967
3118
|
"flex flex-col items-center justify-center w-16 h-16 rounded-2xl transition-all",
|
|
2968
3119
|
dateFns.isToday(group.date) ? "bg-primary text-primary-foreground shadow-lg shadow-primary/30" : "bg-muted/50 text-foreground"
|
|
2969
|
-
) }, /* @__PURE__ */
|
|
3120
|
+
) }, /* @__PURE__ */ React18__namespace.default.createElement("span", { className: "text-2xl font-bold leading-none" }, dateFns.format(group.date, "d")), /* @__PURE__ */ React18__namespace.default.createElement("span", { className: "text-xs font-medium uppercase tracking-wide opacity-80" }, dateFns.format(group.date, "MMM"))), /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex flex-col" }, /* @__PURE__ */ React18__namespace.default.createElement("span", { className: cn(
|
|
2970
3121
|
"text-lg font-semibold",
|
|
2971
3122
|
dateFns.isToday(group.date) && "text-primary"
|
|
2972
|
-
) }, getDateLabel(group.date, translations?.today ?? "Today", translations?.tomorrow ?? "Tomorrow")), /* @__PURE__ */
|
|
2973
|
-
/* @__PURE__ */
|
|
3123
|
+
) }, getDateLabel(group.date, translations?.today ?? "Today", translations?.tomorrow ?? "Tomorrow")), /* @__PURE__ */ React18__namespace.default.createElement("span", { className: "text-sm text-muted-foreground" }, group.events.length, " ", group.events.length !== 1 ? translations?.eventsCount ?? "events" : translations?.eventCount ?? "event")))),
|
|
3124
|
+
/* @__PURE__ */ React18__namespace.default.createElement("div", { className: "py-4 space-y-3" }, group.events.map((event, eventIndex) => /* @__PURE__ */ React18__namespace.default.createElement(
|
|
2974
3125
|
framerMotion.motion.div,
|
|
2975
3126
|
{
|
|
2976
3127
|
key: event.id,
|
|
@@ -2984,22 +3135,22 @@ var AgendaView = ({
|
|
|
2984
3135
|
whileHover: { scale: 1.01, y: -2 },
|
|
2985
3136
|
transition: { duration: 0.2 }
|
|
2986
3137
|
},
|
|
2987
|
-
/* @__PURE__ */
|
|
3138
|
+
/* @__PURE__ */ React18__namespace.default.createElement(
|
|
2988
3139
|
"div",
|
|
2989
3140
|
{
|
|
2990
3141
|
className: "absolute left-0 top-3 bottom-3 w-1 rounded-full",
|
|
2991
3142
|
style: { backgroundColor: event.color || "var(--primary)" }
|
|
2992
3143
|
}
|
|
2993
3144
|
),
|
|
2994
|
-
/* @__PURE__ */
|
|
2995
|
-
/* @__PURE__ */
|
|
3145
|
+
/* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex flex-col items-center min-w-[70px] pl-2" }, event.allDay ? /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex flex-col items-center" }, /* @__PURE__ */ React18__namespace.default.createElement("span", { className: "text-xs font-semibold text-muted-foreground bg-muted/80 px-2.5 py-1 rounded-full" }, translations?.allDay ?? "All Day")) : /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex flex-col items-center" }, /* @__PURE__ */ React18__namespace.default.createElement("span", { className: "text-base font-semibold text-foreground" }, dateFns.format(event.start, timeFmt)), /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "w-px h-3 bg-border my-1" }), /* @__PURE__ */ React18__namespace.default.createElement("span", { className: "text-xs text-muted-foreground/70 font-medium" }, formatDuration(event.start, event.end)))),
|
|
3146
|
+
/* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex-1 min-w-0 space-y-2" }, /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex items-start justify-between gap-2" }, /* @__PURE__ */ React18__namespace.default.createElement("h4", { className: "text-base font-semibold text-foreground group-hover:text-primary transition-colors line-clamp-1" }, event.title), /* @__PURE__ */ React18__namespace.default.createElement(
|
|
2996
3147
|
"div",
|
|
2997
3148
|
{
|
|
2998
3149
|
className: "w-3 h-3 rounded-full shrink-0 mt-1.5",
|
|
2999
3150
|
style: { backgroundColor: event.color || "var(--primary)" }
|
|
3000
3151
|
}
|
|
3001
|
-
)), event.description && /* @__PURE__ */
|
|
3002
|
-
/* @__PURE__ */
|
|
3152
|
+
)), event.description && /* @__PURE__ */ React18__namespace.default.createElement("p", { className: "text-sm text-muted-foreground line-clamp-2 leading-relaxed" }, event.description), /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex flex-wrap items-center gap-3 pt-1" }, !event.allDay && /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex items-center gap-1.5 text-xs text-muted-foreground" }, /* @__PURE__ */ React18__namespace.default.createElement(lucideReact.Clock, { className: "w-3.5 h-3.5" }), /* @__PURE__ */ React18__namespace.default.createElement("span", null, dateFns.format(event.start, timeFmt), " - ", dateFns.format(event.end, timeFmt))), event.guests && event.guests.length > 0 && /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex items-center gap-1.5 text-xs text-muted-foreground" }, /* @__PURE__ */ React18__namespace.default.createElement(lucideReact.Users, { className: "w-3.5 h-3.5" }), /* @__PURE__ */ React18__namespace.default.createElement("span", null, event.guests.length, " ", event.guests.length !== 1 ? translations?.guestsCount ?? "guests" : translations?.guestCount ?? "guest")), event.attachments && event.attachments.length > 0 && /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex items-center gap-1.5 text-xs text-muted-foreground" }, /* @__PURE__ */ React18__namespace.default.createElement(lucideReact.Paperclip, { className: "w-3.5 h-3.5" }), /* @__PURE__ */ React18__namespace.default.createElement("span", null, event.attachments.length)), event.reminders && event.reminders.length > 0 && /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex items-center gap-1.5 text-xs text-muted-foreground" }, /* @__PURE__ */ React18__namespace.default.createElement(lucideReact.Bell, { className: "w-3.5 h-3.5" }), /* @__PURE__ */ React18__namespace.default.createElement("span", null, event.reminders.length)))),
|
|
3153
|
+
/* @__PURE__ */ React18__namespace.default.createElement("div", { className: "absolute right-4 top-1/2 -translate-y-1/2 opacity-0 group-hover:opacity-100 transition-opacity" }, /* @__PURE__ */ React18__namespace.default.createElement("svg", { className: "w-5 h-5 text-muted-foreground", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2" }, /* @__PURE__ */ React18__namespace.default.createElement("path", { d: "M9 18l6-6-6-6" })))
|
|
3003
3154
|
)))
|
|
3004
3155
|
))
|
|
3005
3156
|
));
|
|
@@ -3013,7 +3164,7 @@ var ResourceView = ({
|
|
|
3013
3164
|
locale,
|
|
3014
3165
|
language = "tr"
|
|
3015
3166
|
}) => {
|
|
3016
|
-
const containerRef =
|
|
3167
|
+
const containerRef = React18.useRef(null);
|
|
3017
3168
|
const hours = Array.from({ length: 24 }, (_, i) => i);
|
|
3018
3169
|
const hourWidth = 100;
|
|
3019
3170
|
const timeFormat = getTimeFormat(language);
|
|
@@ -3031,7 +3182,7 @@ var ResourceView = ({
|
|
|
3031
3182
|
// Min width for visibility
|
|
3032
3183
|
};
|
|
3033
3184
|
};
|
|
3034
|
-
return /* @__PURE__ */
|
|
3185
|
+
return /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex flex-col h-full min-h-0 bg-background overflow-hidden" }, /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex border-b border-border bg-muted/20" }, /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "w-48 shrink-0 border-r border-border p-4 font-semibold text-sm bg-background sticky left-0 z-20" }, "Resources"), /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex overflow-hidden" }, /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex relative", style: { width: hours.length * hourWidth } }, hours.map((hour) => /* @__PURE__ */ React18__namespace.default.createElement(
|
|
3035
3186
|
"div",
|
|
3036
3187
|
{
|
|
3037
3188
|
key: hour,
|
|
@@ -3039,11 +3190,11 @@ var ResourceView = ({
|
|
|
3039
3190
|
style: { width: hourWidth }
|
|
3040
3191
|
},
|
|
3041
3192
|
dateFns.format((/* @__PURE__ */ new Date()).setHours(hour, 0, 0, 0), timeFormat, { locale })
|
|
3042
|
-
))))), /* @__PURE__ */
|
|
3193
|
+
))))), /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex-1 min-h-0 overflow-auto relative", ref: containerRef }, /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "min-w-fit" }, resources.map((resource) => {
|
|
3043
3194
|
const resourceEvents = events.filter(
|
|
3044
3195
|
(e) => e.resourceId === resource.id && dateFns.isSameDay(new Date(e.start), currentDate)
|
|
3045
3196
|
);
|
|
3046
|
-
return /* @__PURE__ */
|
|
3197
|
+
return /* @__PURE__ */ React18__namespace.default.createElement("div", { key: resource.id, className: "flex border-b border-border min-h-[100px]" }, /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "w-48 shrink-0 border-r border-border p-4 bg-background sticky left-0 z-10 flex items-center gap-3" }, resource.avatar ? /* @__PURE__ */ React18__namespace.default.createElement("img", { src: resource.avatar, alt: resource.label, className: "w-8 h-8 rounded-full object-cover" }) : /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "w-8 h-8 rounded-full bg-primary/10 flex items-center justify-center text-xs font-bold text-primary" }, resource.label.substring(0, 2).toUpperCase()), /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex flex-col" }, /* @__PURE__ */ React18__namespace.default.createElement("span", { className: "text-sm font-medium" }, resource.label), /* @__PURE__ */ React18__namespace.default.createElement("span", { className: "text-xs text-muted-foreground" }, "ID: ", resource.id))), /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "relative flex", style: { width: hours.length * hourWidth } }, hours.map((hour) => /* @__PURE__ */ React18__namespace.default.createElement(
|
|
3047
3198
|
"div",
|
|
3048
3199
|
{
|
|
3049
3200
|
key: hour,
|
|
@@ -3054,7 +3205,7 @@ var ResourceView = ({
|
|
|
3054
3205
|
const slotDate = new Date(currentDate);
|
|
3055
3206
|
slotDate.setHours(hour, minute, 0, 0);
|
|
3056
3207
|
const slotId = `${resource.id}-${slotDate.toISOString()}`;
|
|
3057
|
-
return /* @__PURE__ */
|
|
3208
|
+
return /* @__PURE__ */ React18__namespace.default.createElement(
|
|
3058
3209
|
DroppableCell,
|
|
3059
3210
|
{
|
|
3060
3211
|
key: minute,
|
|
@@ -3068,7 +3219,7 @@ var ResourceView = ({
|
|
|
3068
3219
|
}
|
|
3069
3220
|
);
|
|
3070
3221
|
})
|
|
3071
|
-
)), resourceEvents.map((event) => /* @__PURE__ */
|
|
3222
|
+
)), resourceEvents.map((event) => /* @__PURE__ */ React18__namespace.default.createElement(
|
|
3072
3223
|
DraggableEvent,
|
|
3073
3224
|
{
|
|
3074
3225
|
key: event.id,
|
|
@@ -3085,7 +3236,7 @@ var ResourceView = ({
|
|
|
3085
3236
|
color: "#fff"
|
|
3086
3237
|
}
|
|
3087
3238
|
},
|
|
3088
|
-
/* @__PURE__ */
|
|
3239
|
+
/* @__PURE__ */ React18__namespace.default.createElement("div", { className: "truncate" }, event.title)
|
|
3089
3240
|
))));
|
|
3090
3241
|
}))));
|
|
3091
3242
|
};
|
|
@@ -3097,8 +3248,8 @@ var Modal = ({
|
|
|
3097
3248
|
className,
|
|
3098
3249
|
hideHeader = false
|
|
3099
3250
|
}) => {
|
|
3100
|
-
const overlayRef =
|
|
3101
|
-
|
|
3251
|
+
const overlayRef = React18.useRef(null);
|
|
3252
|
+
React18.useEffect(() => {
|
|
3102
3253
|
const handleEscape = (e) => {
|
|
3103
3254
|
if (e.key === "Escape") {
|
|
3104
3255
|
onClose();
|
|
@@ -3112,14 +3263,14 @@ var Modal = ({
|
|
|
3112
3263
|
};
|
|
3113
3264
|
}, [isOpen, onClose]);
|
|
3114
3265
|
if (!isOpen) return null;
|
|
3115
|
-
return /* @__PURE__ */
|
|
3266
|
+
return /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "absolute inset-0 z-50 flex items-center justify-center p-4 bg-black/40 backdrop-blur-md animate-in fade-in duration-300" }, /* @__PURE__ */ React18__namespace.default.createElement(
|
|
3116
3267
|
"div",
|
|
3117
3268
|
{
|
|
3118
3269
|
ref: overlayRef,
|
|
3119
3270
|
className: "absolute inset-0",
|
|
3120
3271
|
onClick: onClose
|
|
3121
3272
|
}
|
|
3122
|
-
), /* @__PURE__ */
|
|
3273
|
+
), /* @__PURE__ */ React18__namespace.default.createElement(
|
|
3123
3274
|
"div",
|
|
3124
3275
|
{
|
|
3125
3276
|
className: cn(
|
|
@@ -3127,7 +3278,7 @@ var Modal = ({
|
|
|
3127
3278
|
className
|
|
3128
3279
|
)
|
|
3129
3280
|
},
|
|
3130
|
-
!hideHeader && /* @__PURE__ */
|
|
3281
|
+
!hideHeader && /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex items-center justify-between px-6 py-4 border-b border-border/50 shrink-0 bg-gradient-to-r from-muted/20 to-background" }, /* @__PURE__ */ React18__namespace.default.createElement("h3", { className: "text-lg font-semibold text-foreground" }, title), /* @__PURE__ */ React18__namespace.default.createElement(
|
|
3131
3282
|
Button,
|
|
3132
3283
|
{
|
|
3133
3284
|
variant: "ghost",
|
|
@@ -3135,10 +3286,10 @@ var Modal = ({
|
|
|
3135
3286
|
onClick: onClose,
|
|
3136
3287
|
className: "h-9 w-9 p-0 rounded-xl hover:bg-accent/80 transition-all duration-200"
|
|
3137
3288
|
},
|
|
3138
|
-
/* @__PURE__ */
|
|
3139
|
-
/* @__PURE__ */
|
|
3289
|
+
/* @__PURE__ */ React18__namespace.default.createElement(lucideReact.X, { className: "h-4 w-4" }),
|
|
3290
|
+
/* @__PURE__ */ React18__namespace.default.createElement("span", { className: "sr-only" }, "Close")
|
|
3140
3291
|
)),
|
|
3141
|
-
/* @__PURE__ */
|
|
3292
|
+
/* @__PURE__ */ React18__namespace.default.createElement("div", { className: cn("overflow-y-auto flex-1", !hideHeader && "p-6") }, children)
|
|
3142
3293
|
));
|
|
3143
3294
|
};
|
|
3144
3295
|
var COLOR_PALETTE = [
|
|
@@ -3188,9 +3339,9 @@ var EventModal = ({
|
|
|
3188
3339
|
language = "tr"
|
|
3189
3340
|
}) => {
|
|
3190
3341
|
const timeFmt = getTimeFormatFull(language);
|
|
3191
|
-
const [mode, setMode] =
|
|
3192
|
-
const [activeTab, setActiveTab] =
|
|
3193
|
-
const [formData, setFormData] =
|
|
3342
|
+
const [mode, setMode] = React18.useState("create");
|
|
3343
|
+
const [activeTab, setActiveTab] = React18.useState("details");
|
|
3344
|
+
const [formData, setFormData] = React18.useState({
|
|
3194
3345
|
title: "",
|
|
3195
3346
|
description: "",
|
|
3196
3347
|
location: "",
|
|
@@ -3204,10 +3355,10 @@ var EventModal = ({
|
|
|
3204
3355
|
attachments: [],
|
|
3205
3356
|
reminders: [{ id: "1", type: "notification", time: 30, label: "30 minutes before" }]
|
|
3206
3357
|
});
|
|
3207
|
-
const [isCalendarDropdownOpen, setIsCalendarDropdownOpen] =
|
|
3208
|
-
const [isColorPickerOpen, setIsColorPickerOpen] =
|
|
3209
|
-
const [isReminderDropdownOpen, setIsReminderDropdownOpen] =
|
|
3210
|
-
const [isGuestsDropdownOpen, setIsGuestsDropdownOpen] =
|
|
3358
|
+
const [isCalendarDropdownOpen, setIsCalendarDropdownOpen] = React18.useState(false);
|
|
3359
|
+
const [isColorPickerOpen, setIsColorPickerOpen] = React18.useState(false);
|
|
3360
|
+
const [isReminderDropdownOpen, setIsReminderDropdownOpen] = React18.useState(false);
|
|
3361
|
+
const [isGuestsDropdownOpen, setIsGuestsDropdownOpen] = React18.useState(false);
|
|
3211
3362
|
const fakeGuests = [
|
|
3212
3363
|
"alice@example.com",
|
|
3213
3364
|
"bob@example.com",
|
|
@@ -3215,9 +3366,9 @@ var EventModal = ({
|
|
|
3215
3366
|
"diana@example.com",
|
|
3216
3367
|
"evan@example.com"
|
|
3217
3368
|
];
|
|
3218
|
-
|
|
3219
|
-
const [selectedGuests, setSelectedGuests] =
|
|
3220
|
-
|
|
3369
|
+
React18.useRef(null);
|
|
3370
|
+
const [selectedGuests, setSelectedGuests] = React18.useState([]);
|
|
3371
|
+
React18.useEffect(() => {
|
|
3221
3372
|
if (isOpen) {
|
|
3222
3373
|
if (event) {
|
|
3223
3374
|
setMode("view");
|
|
@@ -3339,7 +3490,7 @@ var EventModal = ({
|
|
|
3339
3490
|
if (remainingMins === 0) return `${hours} hr`;
|
|
3340
3491
|
return `${hours} hr ${remainingMins} min`;
|
|
3341
3492
|
};
|
|
3342
|
-
const renderViewMode = () => /* @__PURE__ */
|
|
3493
|
+
const renderViewMode = () => /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex flex-col bg-background overflow-hidden w-full max-h-[90vh]" }, /* @__PURE__ */ React18__namespace.default.createElement(
|
|
3343
3494
|
"div",
|
|
3344
3495
|
{
|
|
3345
3496
|
className: "relative px-6 pt-6 pb-8",
|
|
@@ -3347,50 +3498,50 @@ var EventModal = ({
|
|
|
3347
3498
|
background: `linear-gradient(135deg, ${event?.color || "#3b82f6"}15 0%, transparent 100%)`
|
|
3348
3499
|
}
|
|
3349
3500
|
},
|
|
3350
|
-
/* @__PURE__ */
|
|
3501
|
+
/* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex items-center justify-between mb-6" }, /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React18__namespace.default.createElement(
|
|
3351
3502
|
"div",
|
|
3352
3503
|
{
|
|
3353
3504
|
className: "w-3 h-3 rounded-full",
|
|
3354
3505
|
style: { backgroundColor: event?.color || "#3b82f6" }
|
|
3355
3506
|
}
|
|
3356
|
-
), /* @__PURE__ */
|
|
3507
|
+
), /* @__PURE__ */ React18__namespace.default.createElement("span", { className: "text-xs font-medium text-muted-foreground uppercase tracking-wider" }, calendars?.find((c) => c.id === event?.calendarId)?.label || "Event")), /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex items-center gap-1" }, /* @__PURE__ */ React18__namespace.default.createElement(
|
|
3357
3508
|
"button",
|
|
3358
3509
|
{
|
|
3359
3510
|
onClick: () => setMode("edit"),
|
|
3360
3511
|
className: "p-2 hover:bg-background/80 rounded-lg transition-all text-muted-foreground hover:text-foreground",
|
|
3361
3512
|
title: "Edit"
|
|
3362
3513
|
},
|
|
3363
|
-
/* @__PURE__ */
|
|
3364
|
-
), /* @__PURE__ */
|
|
3514
|
+
/* @__PURE__ */ React18__namespace.default.createElement(lucideReact.Edit2, { className: "w-4 h-4" })
|
|
3515
|
+
), /* @__PURE__ */ React18__namespace.default.createElement(
|
|
3365
3516
|
"button",
|
|
3366
3517
|
{
|
|
3367
3518
|
onClick: handleDelete,
|
|
3368
3519
|
className: "p-2 hover:bg-destructive/10 rounded-lg transition-all text-muted-foreground hover:text-destructive",
|
|
3369
3520
|
title: "Delete"
|
|
3370
3521
|
},
|
|
3371
|
-
/* @__PURE__ */
|
|
3372
|
-
), /* @__PURE__ */
|
|
3522
|
+
/* @__PURE__ */ React18__namespace.default.createElement(lucideReact.Trash2, { className: "w-4 h-4" })
|
|
3523
|
+
), /* @__PURE__ */ React18__namespace.default.createElement(
|
|
3373
3524
|
"button",
|
|
3374
3525
|
{
|
|
3375
3526
|
onClick: onClose,
|
|
3376
3527
|
className: "p-2 hover:bg-background/80 rounded-lg transition-all text-muted-foreground hover:text-foreground",
|
|
3377
3528
|
title: "Close"
|
|
3378
3529
|
},
|
|
3379
|
-
/* @__PURE__ */
|
|
3530
|
+
/* @__PURE__ */ React18__namespace.default.createElement(lucideReact.X, { className: "w-4 h-4" })
|
|
3380
3531
|
))),
|
|
3381
|
-
/* @__PURE__ */
|
|
3382
|
-
/* @__PURE__ */
|
|
3383
|
-
), /* @__PURE__ */
|
|
3532
|
+
/* @__PURE__ */ React18__namespace.default.createElement("h1", { className: "text-2xl font-bold text-foreground mb-3 leading-tight" }, event?.title || translations.noTitle),
|
|
3533
|
+
/* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex items-center gap-3 text-sm" }, /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex items-center gap-2 px-3 py-1.5 bg-background/60 backdrop-blur-sm rounded-lg border border-border/30" }, /* @__PURE__ */ React18__namespace.default.createElement(lucideReact.Calendar, { className: "w-4 h-4 text-muted-foreground" }), /* @__PURE__ */ React18__namespace.default.createElement("span", { className: "font-medium" }, event?.start && dateFns.format(new Date(event.start), "EEE, MMM d"))), /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex items-center gap-2 px-3 py-1.5 bg-background/60 backdrop-blur-sm rounded-lg border border-border/30" }, /* @__PURE__ */ React18__namespace.default.createElement(lucideReact.Clock, { className: "w-4 h-4 text-muted-foreground" }), /* @__PURE__ */ React18__namespace.default.createElement("span", { className: "font-medium" }, event?.start && dateFns.format(new Date(event.start), timeFmt), " \u2013 ", event?.end && dateFns.format(new Date(event.end), timeFmt))))
|
|
3534
|
+
), /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "px-6 pb-6 space-y-4 overflow-y-auto flex-1" }, event?.location && /* @__PURE__ */ React18__namespace.default.createElement(
|
|
3384
3535
|
framerMotion.motion.div,
|
|
3385
3536
|
{
|
|
3386
3537
|
initial: { opacity: 0, y: 10 },
|
|
3387
3538
|
animate: { opacity: 1, y: 0 },
|
|
3388
3539
|
className: "flex items-start gap-3 p-4 rounded-2xl bg-muted/30 border border-border/30 group hover:bg-muted/50 transition-all cursor-pointer"
|
|
3389
3540
|
},
|
|
3390
|
-
/* @__PURE__ */
|
|
3391
|
-
/* @__PURE__ */
|
|
3392
|
-
/* @__PURE__ */
|
|
3393
|
-
), event?.guests && event.guests.length > 0 && /* @__PURE__ */
|
|
3541
|
+
/* @__PURE__ */ React18__namespace.default.createElement("div", { className: "p-2 bg-primary/10 rounded-xl" }, /* @__PURE__ */ React18__namespace.default.createElement(lucideReact.MapPin, { className: "w-5 h-5 text-primary" })),
|
|
3542
|
+
/* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex-1" }, /* @__PURE__ */ React18__namespace.default.createElement("p", { className: "text-sm font-medium text-foreground" }, event.location), /* @__PURE__ */ React18__namespace.default.createElement("p", { className: "text-xs text-muted-foreground mt-0.5" }, translations.clickToOpenInMaps)),
|
|
3543
|
+
/* @__PURE__ */ React18__namespace.default.createElement(lucideReact.ExternalLink, { className: "w-4 h-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity" })
|
|
3544
|
+
), event?.guests && event.guests.length > 0 && /* @__PURE__ */ React18__namespace.default.createElement(
|
|
3394
3545
|
framerMotion.motion.div,
|
|
3395
3546
|
{
|
|
3396
3547
|
initial: { opacity: 0, y: 10 },
|
|
@@ -3398,14 +3549,14 @@ var EventModal = ({
|
|
|
3398
3549
|
transition: { delay: 0.05 },
|
|
3399
3550
|
className: "space-y-3"
|
|
3400
3551
|
},
|
|
3401
|
-
/* @__PURE__ */
|
|
3402
|
-
/* @__PURE__ */
|
|
3552
|
+
/* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex items-center justify-between" }, /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React18__namespace.default.createElement(lucideReact.Users, { className: "w-4 h-4 text-muted-foreground" }), /* @__PURE__ */ React18__namespace.default.createElement("span", { className: "text-sm font-medium text-foreground" }, event.guests.length, " ", event.guests.length > 1 ? translations.guestsCount : translations.guestCount))),
|
|
3553
|
+
/* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex flex-wrap gap-2" }, event.guests.map((email, index) => /* @__PURE__ */ React18__namespace.default.createElement(
|
|
3403
3554
|
"div",
|
|
3404
3555
|
{
|
|
3405
3556
|
key: index,
|
|
3406
3557
|
className: "flex items-center gap-2 px-3 py-2 rounded-xl bg-muted/30 border border-border/30 hover:bg-muted/50 transition-all cursor-pointer group"
|
|
3407
3558
|
},
|
|
3408
|
-
/* @__PURE__ */
|
|
3559
|
+
/* @__PURE__ */ React18__namespace.default.createElement(
|
|
3409
3560
|
"div",
|
|
3410
3561
|
{
|
|
3411
3562
|
className: "w-8 h-8 rounded-full flex items-center justify-center text-sm font-semibold text-white",
|
|
@@ -3413,9 +3564,9 @@ var EventModal = ({
|
|
|
3413
3564
|
},
|
|
3414
3565
|
email[0].toUpperCase()
|
|
3415
3566
|
),
|
|
3416
|
-
/* @__PURE__ */
|
|
3567
|
+
/* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex-1 min-w-0" }, /* @__PURE__ */ React18__namespace.default.createElement("p", { className: "text-sm font-medium text-foreground" }, email.split("@")[0]), /* @__PURE__ */ React18__namespace.default.createElement("p", { className: "text-xs text-muted-foreground truncate" }, email))
|
|
3417
3568
|
)))
|
|
3418
|
-
), event?.reminders && event.reminders.length > 0 && /* @__PURE__ */
|
|
3569
|
+
), event?.reminders && event.reminders.length > 0 && /* @__PURE__ */ React18__namespace.default.createElement(
|
|
3419
3570
|
framerMotion.motion.div,
|
|
3420
3571
|
{
|
|
3421
3572
|
initial: { opacity: 0, y: 10 },
|
|
@@ -3423,8 +3574,8 @@ var EventModal = ({
|
|
|
3423
3574
|
transition: { delay: 0.1 },
|
|
3424
3575
|
className: "flex items-center gap-3"
|
|
3425
3576
|
},
|
|
3426
|
-
/* @__PURE__ */
|
|
3427
|
-
/* @__PURE__ */
|
|
3577
|
+
/* @__PURE__ */ React18__namespace.default.createElement("div", { className: "p-2 bg-amber-500/10 rounded-xl" }, /* @__PURE__ */ React18__namespace.default.createElement(lucideReact.Bell, { className: "w-4 h-4 text-amber-500" })),
|
|
3578
|
+
/* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex flex-wrap gap-2" }, event.reminders.map((reminder) => /* @__PURE__ */ React18__namespace.default.createElement(
|
|
3428
3579
|
"span",
|
|
3429
3580
|
{
|
|
3430
3581
|
key: reminder.id,
|
|
@@ -3432,7 +3583,7 @@ var EventModal = ({
|
|
|
3432
3583
|
},
|
|
3433
3584
|
reminder.label || `${reminder.time} min before`
|
|
3434
3585
|
)))
|
|
3435
|
-
), event?.description && /* @__PURE__ */
|
|
3586
|
+
), event?.description && /* @__PURE__ */ React18__namespace.default.createElement(
|
|
3436
3587
|
framerMotion.motion.div,
|
|
3437
3588
|
{
|
|
3438
3589
|
initial: { opacity: 0, y: 10 },
|
|
@@ -3440,9 +3591,9 @@ var EventModal = ({
|
|
|
3440
3591
|
transition: { delay: 0.15 },
|
|
3441
3592
|
className: "space-y-2"
|
|
3442
3593
|
},
|
|
3443
|
-
/* @__PURE__ */
|
|
3444
|
-
/* @__PURE__ */
|
|
3445
|
-
), event?.attachments && event.attachments.length > 0 && /* @__PURE__ */
|
|
3594
|
+
/* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React18__namespace.default.createElement(lucideReact.AlignLeft, { className: "w-4 h-4 text-muted-foreground" }), /* @__PURE__ */ React18__namespace.default.createElement("span", { className: "text-sm font-medium text-foreground" }, translations.notes)),
|
|
3595
|
+
/* @__PURE__ */ React18__namespace.default.createElement("div", { className: "text-sm text-foreground/80 whitespace-pre-wrap leading-relaxed pl-6 p-3 rounded-xl bg-muted/20 border border-border/30" }, event.description)
|
|
3596
|
+
), event?.attachments && event.attachments.length > 0 && /* @__PURE__ */ React18__namespace.default.createElement(
|
|
3446
3597
|
framerMotion.motion.div,
|
|
3447
3598
|
{
|
|
3448
3599
|
initial: { opacity: 0, y: 10 },
|
|
@@ -3450,27 +3601,27 @@ var EventModal = ({
|
|
|
3450
3601
|
transition: { delay: 0.2 },
|
|
3451
3602
|
className: "space-y-2"
|
|
3452
3603
|
},
|
|
3453
|
-
/* @__PURE__ */
|
|
3454
|
-
/* @__PURE__ */
|
|
3604
|
+
/* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React18__namespace.default.createElement(lucideReact.Paperclip, { className: "w-4 h-4 text-muted-foreground" }), /* @__PURE__ */ React18__namespace.default.createElement("span", { className: "text-sm font-medium text-foreground" }, translations.attachments)),
|
|
3605
|
+
/* @__PURE__ */ React18__namespace.default.createElement("div", { className: "grid gap-2" }, event.attachments.map((att) => /* @__PURE__ */ React18__namespace.default.createElement(
|
|
3455
3606
|
"div",
|
|
3456
3607
|
{
|
|
3457
3608
|
key: att.id,
|
|
3458
3609
|
onClick: () => handleDownload(att),
|
|
3459
3610
|
className: "flex items-center gap-3 p-3 rounded-xl border border-border/30 bg-muted/20 hover:bg-muted/40 transition-all cursor-pointer group"
|
|
3460
3611
|
},
|
|
3461
|
-
/* @__PURE__ */
|
|
3462
|
-
/* @__PURE__ */
|
|
3463
|
-
/* @__PURE__ */
|
|
3612
|
+
/* @__PURE__ */ React18__namespace.default.createElement("div", { className: "p-2 bg-primary/10 rounded-lg" }, /* @__PURE__ */ React18__namespace.default.createElement(lucideReact.File, { className: "w-4 h-4 text-primary" })),
|
|
3613
|
+
/* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex-1 min-w-0" }, /* @__PURE__ */ React18__namespace.default.createElement("p", { className: "text-sm font-medium text-foreground truncate" }, att.name), /* @__PURE__ */ React18__namespace.default.createElement("p", { className: "text-xs text-muted-foreground" }, att.size)),
|
|
3614
|
+
/* @__PURE__ */ React18__namespace.default.createElement(lucideReact.Download, { className: "w-4 h-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity" })
|
|
3464
3615
|
)))
|
|
3465
3616
|
)));
|
|
3466
|
-
const renderEditMode = () => /* @__PURE__ */
|
|
3617
|
+
const renderEditMode = () => /* @__PURE__ */ React18__namespace.default.createElement("form", { onSubmit: handleSubmit, className: "flex flex-col bg-background overflow-hidden w-full max-h-[85vh]" }, /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex items-center justify-between px-5 py-4 border-b border-border/50 shrink-0" }, /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ React18__namespace.default.createElement(
|
|
3467
3618
|
"button",
|
|
3468
3619
|
{
|
|
3469
3620
|
type: "button",
|
|
3470
3621
|
onClick: () => setIsColorPickerOpen(!isColorPickerOpen),
|
|
3471
3622
|
className: "relative p-1"
|
|
3472
3623
|
},
|
|
3473
|
-
/* @__PURE__ */
|
|
3624
|
+
/* @__PURE__ */ React18__namespace.default.createElement(
|
|
3474
3625
|
"div",
|
|
3475
3626
|
{
|
|
3476
3627
|
className: "w-5 h-5 rounded-full cursor-pointer hover:scale-110 transition-transform",
|
|
@@ -3480,7 +3631,7 @@ var EventModal = ({
|
|
|
3480
3631
|
}
|
|
3481
3632
|
}
|
|
3482
3633
|
),
|
|
3483
|
-
isColorPickerOpen && /* @__PURE__ */
|
|
3634
|
+
isColorPickerOpen && /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "absolute top-full left-0 mt-2 p-2 bg-background border border-border rounded-xl shadow-xl z-50 flex flex-wrap gap-1.5 w-[180px]" }, COLOR_PALETTE.map((color) => /* @__PURE__ */ React18__namespace.default.createElement(
|
|
3484
3635
|
"button",
|
|
3485
3636
|
{
|
|
3486
3637
|
key: color,
|
|
@@ -3496,15 +3647,15 @@ var EventModal = ({
|
|
|
3496
3647
|
style: { backgroundColor: color, color }
|
|
3497
3648
|
}
|
|
3498
3649
|
)))
|
|
3499
|
-
), /* @__PURE__ */
|
|
3650
|
+
), /* @__PURE__ */ React18__namespace.default.createElement("h2", { className: "text-lg font-semibold text-foreground" }, mode === "edit" ? translations.editEvent : translations.newEvent)), /* @__PURE__ */ React18__namespace.default.createElement(
|
|
3500
3651
|
"button",
|
|
3501
3652
|
{
|
|
3502
3653
|
type: "button",
|
|
3503
3654
|
onClick: onClose,
|
|
3504
3655
|
className: "p-2 hover:bg-accent rounded-xl transition-all text-muted-foreground hover:text-foreground"
|
|
3505
3656
|
},
|
|
3506
|
-
/* @__PURE__ */
|
|
3507
|
-
)), /* @__PURE__ */
|
|
3657
|
+
/* @__PURE__ */ React18__namespace.default.createElement(lucideReact.X, { className: "w-4 h-4" })
|
|
3658
|
+
)), /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex-1 overflow-y-auto" }, /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "px-5 py-4 space-y-5" }, /* @__PURE__ */ React18__namespace.default.createElement("div", null, /* @__PURE__ */ React18__namespace.default.createElement(
|
|
3508
3659
|
"input",
|
|
3509
3660
|
{
|
|
3510
3661
|
type: "text",
|
|
@@ -3515,7 +3666,7 @@ var EventModal = ({
|
|
|
3515
3666
|
onChange: (e) => setFormData({ ...formData, title: e.target.value }),
|
|
3516
3667
|
placeholder: translations.addTitle
|
|
3517
3668
|
}
|
|
3518
|
-
)), /* @__PURE__ */
|
|
3669
|
+
)), /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex items-center gap-3 p-4 rounded-2xl bg-muted/20 border border-border/30" }, /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "p-2 bg-primary/10 rounded-xl shrink-0" }, /* @__PURE__ */ React18__namespace.default.createElement(lucideReact.Clock, { className: "w-5 h-5 text-primary" })), /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex-1 grid grid-cols-2 gap-3" }, /* @__PURE__ */ React18__namespace.default.createElement("div", null, /* @__PURE__ */ React18__namespace.default.createElement("label", { className: "text-[10px] font-semibold text-muted-foreground uppercase tracking-wider mb-1 block" }, translations.start), /* @__PURE__ */ React18__namespace.default.createElement(
|
|
3519
3670
|
"input",
|
|
3520
3671
|
{
|
|
3521
3672
|
type: "datetime-local",
|
|
@@ -3523,7 +3674,7 @@ var EventModal = ({
|
|
|
3523
3674
|
value: formatDateForInput(formData.start),
|
|
3524
3675
|
onChange: (e) => handleDateChange("start", e.target.value)
|
|
3525
3676
|
}
|
|
3526
|
-
)), /* @__PURE__ */
|
|
3677
|
+
)), /* @__PURE__ */ React18__namespace.default.createElement("div", null, /* @__PURE__ */ React18__namespace.default.createElement("label", { className: "text-[10px] font-semibold text-muted-foreground uppercase tracking-wider mb-1 block" }, translations.end), /* @__PURE__ */ React18__namespace.default.createElement(
|
|
3527
3678
|
"input",
|
|
3528
3679
|
{
|
|
3529
3680
|
type: "datetime-local",
|
|
@@ -3531,16 +3682,16 @@ var EventModal = ({
|
|
|
3531
3682
|
value: formatDateForInput(formData.end),
|
|
3532
3683
|
onChange: (e) => handleDateChange("end", e.target.value)
|
|
3533
3684
|
}
|
|
3534
|
-
)))), getDurationText() && /* @__PURE__ */
|
|
3685
|
+
)))), getDurationText() && /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex justify-center" }, /* @__PURE__ */ React18__namespace.default.createElement("span", { className: "text-xs font-medium px-3 py-1 rounded-full bg-primary/10 text-primary" }, getDurationText())), /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex items-center justify-between" }, /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React18__namespace.default.createElement(lucideReact.Bell, { className: "w-4 h-4 text-muted-foreground" }), /* @__PURE__ */ React18__namespace.default.createElement("span", { className: "text-sm font-medium text-foreground" }, translations.reminders)), /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "relative" }, /* @__PURE__ */ React18__namespace.default.createElement(
|
|
3535
3686
|
"button",
|
|
3536
3687
|
{
|
|
3537
3688
|
type: "button",
|
|
3538
3689
|
onClick: () => setIsReminderDropdownOpen(!isReminderDropdownOpen),
|
|
3539
3690
|
className: "flex items-center gap-1 text-xs font-medium text-primary hover:text-primary/80 transition-colors"
|
|
3540
3691
|
},
|
|
3541
|
-
/* @__PURE__ */
|
|
3692
|
+
/* @__PURE__ */ React18__namespace.default.createElement(lucideReact.Plus, { className: "w-3.5 h-3.5" }),
|
|
3542
3693
|
translations.addReminder
|
|
3543
|
-
), isReminderDropdownOpen && /* @__PURE__ */
|
|
3694
|
+
), isReminderDropdownOpen && /* @__PURE__ */ React18__namespace.default.createElement(React18__namespace.default.Fragment, null, /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "fixed inset-0 z-40", onClick: () => setIsReminderDropdownOpen(false) }), /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "absolute right-0 top-full mt-1 w-48 bg-background border border-border rounded-xl shadow-xl z-50 py-1 max-h-60 overflow-y-auto" }, getReminderOptions(translations).map((option) => /* @__PURE__ */ React18__namespace.default.createElement(
|
|
3544
3695
|
"button",
|
|
3545
3696
|
{
|
|
3546
3697
|
key: option.value,
|
|
@@ -3549,58 +3700,58 @@ var EventModal = ({
|
|
|
3549
3700
|
className: "w-full px-3 py-2 text-left text-sm hover:bg-accent transition-colors"
|
|
3550
3701
|
},
|
|
3551
3702
|
option.label
|
|
3552
|
-
)))))), formData.reminders && formData.reminders.length > 0 && /* @__PURE__ */
|
|
3703
|
+
)))))), formData.reminders && formData.reminders.length > 0 && /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex flex-wrap gap-2" }, formData.reminders.map((reminder) => /* @__PURE__ */ React18__namespace.default.createElement(
|
|
3553
3704
|
"div",
|
|
3554
3705
|
{
|
|
3555
3706
|
key: reminder.id,
|
|
3556
3707
|
className: "flex items-center gap-2 px-3 py-1.5 rounded-full bg-amber-500/10 border border-amber-500/20"
|
|
3557
3708
|
},
|
|
3558
|
-
/* @__PURE__ */
|
|
3559
|
-
/* @__PURE__ */
|
|
3560
|
-
/* @__PURE__ */
|
|
3709
|
+
/* @__PURE__ */ React18__namespace.default.createElement(lucideReact.BellRing, { className: "w-3.5 h-3.5 text-amber-500" }),
|
|
3710
|
+
/* @__PURE__ */ React18__namespace.default.createElement("span", { className: "text-xs font-medium text-amber-600 dark:text-amber-400" }, reminder.label),
|
|
3711
|
+
/* @__PURE__ */ React18__namespace.default.createElement(
|
|
3561
3712
|
"button",
|
|
3562
3713
|
{
|
|
3563
3714
|
type: "button",
|
|
3564
3715
|
onClick: () => removeReminder(reminder.id),
|
|
3565
3716
|
className: "p-0.5 hover:bg-amber-500/20 rounded-full transition-colors"
|
|
3566
3717
|
},
|
|
3567
|
-
/* @__PURE__ */
|
|
3718
|
+
/* @__PURE__ */ React18__namespace.default.createElement(lucideReact.X, { className: "w-3 h-3 text-amber-500" })
|
|
3568
3719
|
)
|
|
3569
|
-
)))), /* @__PURE__ */
|
|
3720
|
+
)))), /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React18__namespace.default.createElement(lucideReact.Users, { className: "w-4 h-4 text-muted-foreground" }), /* @__PURE__ */ React18__namespace.default.createElement("span", { className: "text-sm font-medium text-foreground" }, translations.guests)), /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "relative" }, /* @__PURE__ */ React18__namespace.default.createElement(
|
|
3570
3721
|
"button",
|
|
3571
3722
|
{
|
|
3572
3723
|
type: "button",
|
|
3573
3724
|
onClick: () => setIsGuestsDropdownOpen(!isGuestsDropdownOpen),
|
|
3574
3725
|
className: "w-full flex items-center justify-between px-4 py-3 bg-muted/20 border border-border/30 rounded-xl text-sm text-left hover:bg-muted/30 transition-all"
|
|
3575
3726
|
},
|
|
3576
|
-
/* @__PURE__ */
|
|
3577
|
-
/* @__PURE__ */
|
|
3578
|
-
), isGuestsDropdownOpen && /* @__PURE__ */
|
|
3727
|
+
/* @__PURE__ */ React18__namespace.default.createElement("span", { className: selectedGuests.length > 0 ? "text-foreground font-medium" : "text-muted-foreground" }, selectedGuests.length > 0 ? `${selectedGuests.length} ${selectedGuests.length > 1 ? translations.guestsAdded : translations.guestAdded}` : translations.addGuests),
|
|
3728
|
+
/* @__PURE__ */ React18__namespace.default.createElement(lucideReact.ChevronDown, { className: cn("w-4 h-4 text-muted-foreground transition-transform", isGuestsDropdownOpen && "rotate-180") })
|
|
3729
|
+
), isGuestsDropdownOpen && /* @__PURE__ */ React18__namespace.default.createElement(React18__namespace.default.Fragment, null, /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "fixed inset-0 z-40", onClick: () => setIsGuestsDropdownOpen(false) }), /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "absolute z-50 w-full mt-2 bg-background border border-border rounded-xl shadow-xl max-h-48 overflow-y-auto" }, fakeGuests.map((email) => /* @__PURE__ */ React18__namespace.default.createElement(
|
|
3579
3730
|
"div",
|
|
3580
3731
|
{
|
|
3581
3732
|
key: email,
|
|
3582
3733
|
className: "px-4 py-3 hover:bg-accent cursor-pointer flex items-center gap-3 transition-colors",
|
|
3583
3734
|
onClick: () => toggleGuest(email)
|
|
3584
3735
|
},
|
|
3585
|
-
/* @__PURE__ */
|
|
3736
|
+
/* @__PURE__ */ React18__namespace.default.createElement("div", { className: cn(
|
|
3586
3737
|
"w-5 h-5 rounded-md border-2 flex items-center justify-center transition-all",
|
|
3587
3738
|
selectedGuests.includes(email) ? "bg-primary border-primary" : "border-border"
|
|
3588
|
-
) }, selectedGuests.includes(email) && /* @__PURE__ */
|
|
3589
|
-
/* @__PURE__ */
|
|
3739
|
+
) }, selectedGuests.includes(email) && /* @__PURE__ */ React18__namespace.default.createElement(lucideReact.Check, { className: "w-3 h-3 text-primary-foreground" })),
|
|
3740
|
+
/* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React18__namespace.default.createElement(
|
|
3590
3741
|
"div",
|
|
3591
3742
|
{
|
|
3592
3743
|
className: "w-7 h-7 rounded-full flex items-center justify-center text-xs font-semibold text-white",
|
|
3593
3744
|
style: { backgroundColor: `hsl(${fakeGuests.indexOf(email) * 60}, 70%, 50%)` }
|
|
3594
3745
|
},
|
|
3595
3746
|
email[0].toUpperCase()
|
|
3596
|
-
), /* @__PURE__ */
|
|
3597
|
-
))))), selectedGuests.length > 0 && /* @__PURE__ */
|
|
3747
|
+
), /* @__PURE__ */ React18__namespace.default.createElement("span", { className: "text-sm" }, email))
|
|
3748
|
+
))))), selectedGuests.length > 0 && /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex flex-wrap gap-2 mt-2" }, selectedGuests.map((email) => /* @__PURE__ */ React18__namespace.default.createElement(
|
|
3598
3749
|
"div",
|
|
3599
3750
|
{
|
|
3600
3751
|
key: email,
|
|
3601
3752
|
className: "flex items-center gap-2 pl-1 pr-2 py-1 bg-muted/30 border border-border/30 rounded-full"
|
|
3602
3753
|
},
|
|
3603
|
-
/* @__PURE__ */
|
|
3754
|
+
/* @__PURE__ */ React18__namespace.default.createElement(
|
|
3604
3755
|
"div",
|
|
3605
3756
|
{
|
|
3606
3757
|
className: "w-6 h-6 rounded-full flex items-center justify-center text-xs font-semibold text-white",
|
|
@@ -3608,17 +3759,17 @@ var EventModal = ({
|
|
|
3608
3759
|
},
|
|
3609
3760
|
email[0].toUpperCase()
|
|
3610
3761
|
),
|
|
3611
|
-
/* @__PURE__ */
|
|
3612
|
-
/* @__PURE__ */
|
|
3762
|
+
/* @__PURE__ */ React18__namespace.default.createElement("span", { className: "text-xs font-medium text-foreground" }, email.split("@")[0]),
|
|
3763
|
+
/* @__PURE__ */ React18__namespace.default.createElement(
|
|
3613
3764
|
"button",
|
|
3614
3765
|
{
|
|
3615
3766
|
type: "button",
|
|
3616
3767
|
onClick: () => toggleGuest(email),
|
|
3617
3768
|
className: "p-0.5 hover:bg-destructive/10 rounded-full transition-colors"
|
|
3618
3769
|
},
|
|
3619
|
-
/* @__PURE__ */
|
|
3770
|
+
/* @__PURE__ */ React18__namespace.default.createElement(lucideReact.X, { className: "w-3 h-3 text-muted-foreground" })
|
|
3620
3771
|
)
|
|
3621
|
-
)))), /* @__PURE__ */
|
|
3772
|
+
)))), /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex items-center gap-3 p-3 rounded-xl bg-muted/20 border border-border/30" }, /* @__PURE__ */ React18__namespace.default.createElement(lucideReact.MapPin, { className: "w-5 h-5 text-muted-foreground shrink-0" }), /* @__PURE__ */ React18__namespace.default.createElement(
|
|
3622
3773
|
"input",
|
|
3623
3774
|
{
|
|
3624
3775
|
type: "text",
|
|
@@ -3627,7 +3778,7 @@ var EventModal = ({
|
|
|
3627
3778
|
value: formData.location || "",
|
|
3628
3779
|
onChange: (e) => setFormData({ ...formData, location: e.target.value })
|
|
3629
3780
|
}
|
|
3630
|
-
)), /* @__PURE__ */
|
|
3781
|
+
)), /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React18__namespace.default.createElement(lucideReact.AlignLeft, { className: "w-4 h-4 text-muted-foreground" }), /* @__PURE__ */ React18__namespace.default.createElement("span", { className: "text-sm font-medium text-foreground" }, translations.notes)), /* @__PURE__ */ React18__namespace.default.createElement(
|
|
3631
3782
|
"textarea",
|
|
3632
3783
|
{
|
|
3633
3784
|
className: "w-full bg-muted/20 border border-border/30 rounded-xl px-4 py-3 text-sm min-h-[100px] resize-none text-foreground placeholder-muted-foreground focus:border-primary focus:ring-2 focus:ring-primary/20 transition-all",
|
|
@@ -3635,7 +3786,7 @@ var EventModal = ({
|
|
|
3635
3786
|
value: formData.description || "",
|
|
3636
3787
|
onChange: (e) => setFormData({ ...formData, description: e.target.value })
|
|
3637
3788
|
}
|
|
3638
|
-
)), /* @__PURE__ */
|
|
3789
|
+
)), /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex items-center gap-3 p-3 rounded-xl bg-muted/20 border border-border/30" }, /* @__PURE__ */ React18__namespace.default.createElement(lucideReact.Repeat, { className: "w-5 h-5 text-muted-foreground shrink-0" }), /* @__PURE__ */ React18__namespace.default.createElement(
|
|
3639
3790
|
"select",
|
|
3640
3791
|
{
|
|
3641
3792
|
className: "flex-1 bg-transparent text-sm text-foreground focus:outline-none cursor-pointer",
|
|
@@ -3654,28 +3805,28 @@ var EventModal = ({
|
|
|
3654
3805
|
}
|
|
3655
3806
|
}
|
|
3656
3807
|
},
|
|
3657
|
-
/* @__PURE__ */
|
|
3658
|
-
/* @__PURE__ */
|
|
3659
|
-
/* @__PURE__ */
|
|
3660
|
-
/* @__PURE__ */
|
|
3661
|
-
/* @__PURE__ */
|
|
3662
|
-
)), /* @__PURE__ */
|
|
3808
|
+
/* @__PURE__ */ React18__namespace.default.createElement("option", { value: "" }, translations.doesNotRepeat),
|
|
3809
|
+
/* @__PURE__ */ React18__namespace.default.createElement("option", { value: "DAILY" }, translations.daily),
|
|
3810
|
+
/* @__PURE__ */ React18__namespace.default.createElement("option", { value: "WEEKLY" }, translations.weekly),
|
|
3811
|
+
/* @__PURE__ */ React18__namespace.default.createElement("option", { value: "MONTHLY" }, translations.monthly),
|
|
3812
|
+
/* @__PURE__ */ React18__namespace.default.createElement("option", { value: "YEARLY" }, translations.yearly)
|
|
3813
|
+
)), /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex items-center justify-between p-3 rounded-xl bg-muted/20 border border-border/30" }, /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React18__namespace.default.createElement(lucideReact.Tag, { className: "w-5 h-5 text-muted-foreground" }), /* @__PURE__ */ React18__namespace.default.createElement("span", { className: "text-sm text-foreground" }, translations.calendar)), /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "relative" }, /* @__PURE__ */ React18__namespace.default.createElement(
|
|
3663
3814
|
"button",
|
|
3664
3815
|
{
|
|
3665
3816
|
type: "button",
|
|
3666
3817
|
onClick: () => setIsCalendarDropdownOpen(!isCalendarDropdownOpen),
|
|
3667
3818
|
className: "flex items-center gap-2 px-3 py-1.5 bg-background border border-border/50 rounded-lg text-sm hover:bg-accent/50 transition-all"
|
|
3668
3819
|
},
|
|
3669
|
-
/* @__PURE__ */
|
|
3820
|
+
/* @__PURE__ */ React18__namespace.default.createElement(
|
|
3670
3821
|
"div",
|
|
3671
3822
|
{
|
|
3672
3823
|
className: "w-3 h-3 rounded-full",
|
|
3673
3824
|
style: { backgroundColor: calendars?.find((c) => c.id === formData.calendarId)?.color || "#3b82f6" }
|
|
3674
3825
|
}
|
|
3675
3826
|
),
|
|
3676
|
-
/* @__PURE__ */
|
|
3677
|
-
/* @__PURE__ */
|
|
3678
|
-
), isCalendarDropdownOpen && /* @__PURE__ */
|
|
3827
|
+
/* @__PURE__ */ React18__namespace.default.createElement("span", { className: "font-medium" }, calendars?.find((c) => c.id === formData.calendarId)?.label || "Select"),
|
|
3828
|
+
/* @__PURE__ */ React18__namespace.default.createElement(lucideReact.ChevronDown, { className: "w-3.5 h-3.5 text-muted-foreground" })
|
|
3829
|
+
), isCalendarDropdownOpen && /* @__PURE__ */ React18__namespace.default.createElement(React18__namespace.default.Fragment, null, /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "fixed inset-0 z-40", onClick: () => setIsCalendarDropdownOpen(false) }), /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "absolute right-0 bottom-full mb-2 w-48 bg-background border border-border rounded-xl shadow-xl z-50 py-1" }, calendars?.map((cal) => /* @__PURE__ */ React18__namespace.default.createElement(
|
|
3679
3830
|
"button",
|
|
3680
3831
|
{
|
|
3681
3832
|
key: cal.id,
|
|
@@ -3690,19 +3841,19 @@ var EventModal = ({
|
|
|
3690
3841
|
setIsCalendarDropdownOpen(false);
|
|
3691
3842
|
}
|
|
3692
3843
|
},
|
|
3693
|
-
/* @__PURE__ */
|
|
3694
|
-
/* @__PURE__ */
|
|
3695
|
-
formData.calendarId === cal.id && /* @__PURE__ */
|
|
3696
|
-
)))))))), /* @__PURE__ */
|
|
3844
|
+
/* @__PURE__ */ React18__namespace.default.createElement("div", { className: "w-3 h-3 rounded-full", style: { backgroundColor: cal.color } }),
|
|
3845
|
+
/* @__PURE__ */ React18__namespace.default.createElement("span", { className: "flex-1 text-sm" }, cal.label),
|
|
3846
|
+
formData.calendarId === cal.id && /* @__PURE__ */ React18__namespace.default.createElement(lucideReact.Check, { className: "w-4 h-4 text-primary" })
|
|
3847
|
+
)))))))), /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "px-5 py-4 border-t border-border/50 flex items-center justify-between bg-muted/10 shrink-0" }, mode === "edit" && /* @__PURE__ */ React18__namespace.default.createElement(
|
|
3697
3848
|
"button",
|
|
3698
3849
|
{
|
|
3699
3850
|
type: "button",
|
|
3700
3851
|
onClick: handleDelete,
|
|
3701
3852
|
className: "flex items-center gap-2 px-4 py-2 text-destructive hover:bg-destructive/10 rounded-xl transition-all text-sm font-medium"
|
|
3702
3853
|
},
|
|
3703
|
-
/* @__PURE__ */
|
|
3854
|
+
/* @__PURE__ */ React18__namespace.default.createElement(lucideReact.Trash2, { className: "w-4 h-4" }),
|
|
3704
3855
|
translations.delete
|
|
3705
|
-
), mode === "create" && /* @__PURE__ */
|
|
3856
|
+
), mode === "create" && /* @__PURE__ */ React18__namespace.default.createElement("div", null), /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React18__namespace.default.createElement(
|
|
3706
3857
|
"button",
|
|
3707
3858
|
{
|
|
3708
3859
|
type: "button",
|
|
@@ -3710,7 +3861,7 @@ var EventModal = ({
|
|
|
3710
3861
|
className: "px-4 py-2.5 text-muted-foreground hover:text-foreground font-medium text-sm rounded-xl transition-all hover:bg-accent"
|
|
3711
3862
|
},
|
|
3712
3863
|
translations.cancel
|
|
3713
|
-
), /* @__PURE__ */
|
|
3864
|
+
), /* @__PURE__ */ React18__namespace.default.createElement(
|
|
3714
3865
|
"button",
|
|
3715
3866
|
{
|
|
3716
3867
|
type: "submit",
|
|
@@ -3718,7 +3869,7 @@ var EventModal = ({
|
|
|
3718
3869
|
},
|
|
3719
3870
|
mode === "edit" ? translations.saveChanges : translations.createEvent
|
|
3720
3871
|
))));
|
|
3721
|
-
return /* @__PURE__ */
|
|
3872
|
+
return /* @__PURE__ */ React18__namespace.default.createElement(Modal, { isOpen, onClose, hideHeader: true, className: "p-0 overflow-hidden max-w-lg rounded-2xl shadow-2xl" }, /* @__PURE__ */ React18__namespace.default.createElement(framerMotion.AnimatePresence, { mode: "wait" }, mode === "view" && event ? /* @__PURE__ */ React18__namespace.default.createElement(
|
|
3722
3873
|
framerMotion.motion.div,
|
|
3723
3874
|
{
|
|
3724
3875
|
key: "view",
|
|
@@ -3728,7 +3879,7 @@ var EventModal = ({
|
|
|
3728
3879
|
transition: { duration: 0.15 }
|
|
3729
3880
|
},
|
|
3730
3881
|
renderViewMode()
|
|
3731
|
-
) : /* @__PURE__ */
|
|
3882
|
+
) : /* @__PURE__ */ React18__namespace.default.createElement(
|
|
3732
3883
|
framerMotion.motion.div,
|
|
3733
3884
|
{
|
|
3734
3885
|
key: "edit",
|
|
@@ -3740,9 +3891,9 @@ var EventModal = ({
|
|
|
3740
3891
|
renderEditMode()
|
|
3741
3892
|
)));
|
|
3742
3893
|
};
|
|
3743
|
-
var Skeleton = ({ className, style }) => /* @__PURE__ */
|
|
3744
|
-
var MonthViewSkeleton = () => /* @__PURE__ */
|
|
3745
|
-
var WeekViewSkeleton = () => /* @__PURE__ */
|
|
3894
|
+
var Skeleton = ({ className, style }) => /* @__PURE__ */ React18__namespace.default.createElement("div", { className: cn("animate-pulse bg-muted/40 rounded", className), style });
|
|
3895
|
+
var MonthViewSkeleton = () => /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "h-full bg-background border border-border/50 rounded-2xl overflow-hidden" }, /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "grid grid-cols-7 border-b border-border/50 bg-muted/10" }, Array.from({ length: 7 }).map((_, i) => /* @__PURE__ */ React18__namespace.default.createElement("div", { key: i, className: "py-3 px-2 text-center border-r border-border/30 last:border-r-0" }, /* @__PURE__ */ React18__namespace.default.createElement(Skeleton, { className: "h-4 w-8 mx-auto" })))), /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "grid grid-cols-7 flex-1" }, Array.from({ length: 35 }).map((_, i) => /* @__PURE__ */ React18__namespace.default.createElement("div", { key: i, className: "min-h-[120px] border-r border-b border-border/30 p-2" }, /* @__PURE__ */ React18__namespace.default.createElement(Skeleton, { className: "h-4 w-6 mb-2" }), /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "space-y-1" }, Math.random() > 0.5 && /* @__PURE__ */ React18__namespace.default.createElement(Skeleton, { className: "h-5 w-full rounded-md" }), Math.random() > 0.7 && /* @__PURE__ */ React18__namespace.default.createElement(Skeleton, { className: "h-5 w-3/4 rounded-md" }))))));
|
|
3896
|
+
var WeekViewSkeleton = () => /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "h-full bg-background border border-border/50 rounded-2xl overflow-hidden" }, /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex border-b border-border/50 bg-muted/10" }, /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "w-16 p-3 border-r border-border/30" }, /* @__PURE__ */ React18__namespace.default.createElement(Skeleton, { className: "h-8 w-10 mx-auto" })), /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex-1 grid grid-cols-7" }, Array.from({ length: 7 }).map((_, i) => /* @__PURE__ */ React18__namespace.default.createElement("div", { key: i, className: "py-3 px-2 text-center border-r border-border/30 last:border-r-0" }, /* @__PURE__ */ React18__namespace.default.createElement(Skeleton, { className: "h-3 w-8 mx-auto mb-1" }), /* @__PURE__ */ React18__namespace.default.createElement(Skeleton, { className: "h-8 w-8 mx-auto rounded-xl" }))))), /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex flex-1", style: { height: "600px" } }, /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "w-16 border-r border-border/30" }, Array.from({ length: 10 }).map((_, i) => /* @__PURE__ */ React18__namespace.default.createElement("div", { key: i, className: "h-[60px] relative" }, /* @__PURE__ */ React18__namespace.default.createElement(Skeleton, { className: "h-4 w-10 absolute right-2 -translate-y-1/2" })))), /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex-1 grid grid-cols-7 relative" }, Array.from({ length: 7 }).map((_, colIdx) => /* @__PURE__ */ React18__namespace.default.createElement("div", { key: colIdx, className: "relative border-r border-border/30 last:border-r-0" }, Array.from({ length: 10 }).map((_2, rowIdx) => /* @__PURE__ */ React18__namespace.default.createElement("div", { key: rowIdx, className: "h-[60px] border-b border-dashed border-border/20" })), Math.random() > 0.3 && /* @__PURE__ */ React18__namespace.default.createElement(
|
|
3746
3897
|
Skeleton,
|
|
3747
3898
|
{
|
|
3748
3899
|
className: "absolute rounded-md",
|
|
@@ -3754,20 +3905,20 @@ var WeekViewSkeleton = () => /* @__PURE__ */ React17__namespace.default.createEl
|
|
|
3754
3905
|
}
|
|
3755
3906
|
}
|
|
3756
3907
|
))))));
|
|
3757
|
-
var DayViewSkeleton = () => /* @__PURE__ */
|
|
3908
|
+
var DayViewSkeleton = () => /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "h-full bg-background border border-border/50 rounded-2xl overflow-hidden" }, /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "px-6 py-4 border-b border-border/50 bg-muted/10 text-center" }, /* @__PURE__ */ React18__namespace.default.createElement(Skeleton, { className: "h-7 w-64 mx-auto" })), /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex flex-1", style: { height: "600px" } }, /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "w-20 border-r border-border/30 bg-muted/5" }, Array.from({ length: 10 }).map((_, i) => /* @__PURE__ */ React18__namespace.default.createElement("div", { key: i, className: "h-[80px] relative" }, /* @__PURE__ */ React18__namespace.default.createElement(Skeleton, { className: "h-4 w-12 absolute left-1/2 -translate-x-1/2 -translate-y-1/2" })))), /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex-1 relative" }, Array.from({ length: 10 }).map((_, i) => /* @__PURE__ */ React18__namespace.default.createElement("div", { key: i, className: "h-[80px] border-b border-dashed border-border/20" })), /* @__PURE__ */ React18__namespace.default.createElement(
|
|
3758
3909
|
Skeleton,
|
|
3759
3910
|
{
|
|
3760
3911
|
className: "absolute rounded-lg left-4 right-4",
|
|
3761
3912
|
style: { top: "160px", height: "120px" }
|
|
3762
3913
|
}
|
|
3763
|
-
), /* @__PURE__ */
|
|
3914
|
+
), /* @__PURE__ */ React18__namespace.default.createElement(
|
|
3764
3915
|
Skeleton,
|
|
3765
3916
|
{
|
|
3766
3917
|
className: "absolute rounded-lg left-4 right-4",
|
|
3767
3918
|
style: { top: "400px", height: "80px" }
|
|
3768
3919
|
}
|
|
3769
3920
|
))));
|
|
3770
|
-
var AgendaViewSkeleton = () => /* @__PURE__ */
|
|
3921
|
+
var AgendaViewSkeleton = () => /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "h-full bg-background border border-border/50 rounded-2xl overflow-hidden p-6" }, /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "space-y-6" }, Array.from({ length: 4 }).map((_, dayIdx) => /* @__PURE__ */ React18__namespace.default.createElement("div", { key: dayIdx }, /* @__PURE__ */ React18__namespace.default.createElement(Skeleton, { className: "h-5 w-40 mb-4" }), /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "space-y-3" }, Array.from({ length: 2 + Math.floor(Math.random() * 3) }).map((_2, eventIdx) => /* @__PURE__ */ React18__namespace.default.createElement("div", { key: eventIdx, className: "flex items-center gap-4 p-3 rounded-xl bg-muted/10" }, /* @__PURE__ */ React18__namespace.default.createElement(Skeleton, { className: "h-10 w-10 rounded-lg" }), /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex-1 space-y-2" }, /* @__PURE__ */ React18__namespace.default.createElement(Skeleton, { className: "h-4 w-3/4" }), /* @__PURE__ */ React18__namespace.default.createElement(Skeleton, { className: "h-3 w-1/2" })))))))));
|
|
3771
3922
|
var EventContextMenu = ({
|
|
3772
3923
|
event,
|
|
3773
3924
|
position,
|
|
@@ -3778,8 +3929,8 @@ var EventContextMenu = ({
|
|
|
3778
3929
|
customActions = [],
|
|
3779
3930
|
translations
|
|
3780
3931
|
}) => {
|
|
3781
|
-
const menuRef =
|
|
3782
|
-
|
|
3932
|
+
const menuRef = React18.useRef(null);
|
|
3933
|
+
React18.useEffect(() => {
|
|
3783
3934
|
const handleKeyDown = (e) => {
|
|
3784
3935
|
if (e.key === "Escape") {
|
|
3785
3936
|
onClose();
|
|
@@ -3790,7 +3941,7 @@ var EventContextMenu = ({
|
|
|
3790
3941
|
return () => document.removeEventListener("keydown", handleKeyDown);
|
|
3791
3942
|
}
|
|
3792
3943
|
}, [position, onClose]);
|
|
3793
|
-
|
|
3944
|
+
React18.useEffect(() => {
|
|
3794
3945
|
const handleClickOutside = (e) => {
|
|
3795
3946
|
if (menuRef.current && !menuRef.current.contains(e.target)) {
|
|
3796
3947
|
onClose();
|
|
@@ -3808,7 +3959,7 @@ var EventContextMenu = ({
|
|
|
3808
3959
|
...onEdit ? [{
|
|
3809
3960
|
id: "edit",
|
|
3810
3961
|
label: translations?.edit || "Edit",
|
|
3811
|
-
icon: /* @__PURE__ */
|
|
3962
|
+
icon: /* @__PURE__ */ React18__namespace.default.createElement(lucideReact.Edit3, { className: "w-4 h-4" }),
|
|
3812
3963
|
onClick: () => {
|
|
3813
3964
|
onEdit(event);
|
|
3814
3965
|
onClose();
|
|
@@ -3817,7 +3968,7 @@ var EventContextMenu = ({
|
|
|
3817
3968
|
...onDuplicate ? [{
|
|
3818
3969
|
id: "duplicate",
|
|
3819
3970
|
label: translations?.duplicate || "Duplicate",
|
|
3820
|
-
icon: /* @__PURE__ */
|
|
3971
|
+
icon: /* @__PURE__ */ React18__namespace.default.createElement(lucideReact.Copy, { className: "w-4 h-4" }),
|
|
3821
3972
|
onClick: () => {
|
|
3822
3973
|
onDuplicate(event);
|
|
3823
3974
|
onClose();
|
|
@@ -3827,7 +3978,7 @@ var EventContextMenu = ({
|
|
|
3827
3978
|
...onDelete ? [{
|
|
3828
3979
|
id: "delete",
|
|
3829
3980
|
label: translations?.delete || "Delete",
|
|
3830
|
-
icon: /* @__PURE__ */
|
|
3981
|
+
icon: /* @__PURE__ */ React18__namespace.default.createElement(lucideReact.Trash2, { className: "w-4 h-4" }),
|
|
3831
3982
|
onClick: () => {
|
|
3832
3983
|
onDelete(event.id);
|
|
3833
3984
|
onClose();
|
|
@@ -3839,7 +3990,7 @@ var EventContextMenu = ({
|
|
|
3839
3990
|
x: Math.min(position.x, window.innerWidth - 200),
|
|
3840
3991
|
y: Math.min(position.y, window.innerHeight - (actions.length * 44 + 80))
|
|
3841
3992
|
};
|
|
3842
|
-
return /* @__PURE__ */
|
|
3993
|
+
return /* @__PURE__ */ React18__namespace.default.createElement(framerMotion.AnimatePresence, null, /* @__PURE__ */ React18__namespace.default.createElement(
|
|
3843
3994
|
framerMotion.motion.div,
|
|
3844
3995
|
{
|
|
3845
3996
|
ref: menuRef,
|
|
@@ -3853,14 +4004,14 @@ var EventContextMenu = ({
|
|
|
3853
4004
|
top: adjustedPosition.y
|
|
3854
4005
|
}
|
|
3855
4006
|
},
|
|
3856
|
-
/* @__PURE__ */
|
|
4007
|
+
/* @__PURE__ */ React18__namespace.default.createElement("div", { className: "px-3 py-2 border-b-[0.5px] border-border bg-muted/30" }, /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React18__namespace.default.createElement(
|
|
3857
4008
|
"div",
|
|
3858
4009
|
{
|
|
3859
4010
|
className: "w-2.5 h-2.5 rounded-full shrink-0",
|
|
3860
4011
|
style: { backgroundColor: event.color || "var(--primary)" }
|
|
3861
4012
|
}
|
|
3862
|
-
), /* @__PURE__ */
|
|
3863
|
-
/* @__PURE__ */
|
|
4013
|
+
), /* @__PURE__ */ React18__namespace.default.createElement("span", { className: "text-sm font-medium truncate text-foreground" }, event.title))),
|
|
4014
|
+
/* @__PURE__ */ React18__namespace.default.createElement("div", { className: "py-1" }, actions.map((action, index) => /* @__PURE__ */ React18__namespace.default.createElement(React18__namespace.default.Fragment, { key: action.id }, index > 0 && action.variant === "danger" && /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "h-px bg-border my-1" }), /* @__PURE__ */ React18__namespace.default.createElement(
|
|
3864
4015
|
"button",
|
|
3865
4016
|
{
|
|
3866
4017
|
onClick: action.onClick,
|
|
@@ -3872,13 +4023,13 @@ var EventContextMenu = ({
|
|
|
3872
4023
|
)
|
|
3873
4024
|
},
|
|
3874
4025
|
action.icon,
|
|
3875
|
-
/* @__PURE__ */
|
|
4026
|
+
/* @__PURE__ */ React18__namespace.default.createElement("span", null, action.label)
|
|
3876
4027
|
))))
|
|
3877
4028
|
));
|
|
3878
4029
|
};
|
|
3879
4030
|
var useEventContextMenu = () => {
|
|
3880
|
-
const [contextMenu, setContextMenu] =
|
|
3881
|
-
const openContextMenu =
|
|
4031
|
+
const [contextMenu, setContextMenu] = React18.useState({ event: null, position: null });
|
|
4032
|
+
const openContextMenu = React18.useCallback((event, e) => {
|
|
3882
4033
|
e.preventDefault();
|
|
3883
4034
|
e.stopPropagation();
|
|
3884
4035
|
setContextMenu({
|
|
@@ -3886,7 +4037,7 @@ var useEventContextMenu = () => {
|
|
|
3886
4037
|
position: { x: e.clientX, y: e.clientY }
|
|
3887
4038
|
});
|
|
3888
4039
|
}, []);
|
|
3889
|
-
const closeContextMenu =
|
|
4040
|
+
const closeContextMenu = React18.useCallback(() => {
|
|
3890
4041
|
setContextMenu({ event: null, position: null });
|
|
3891
4042
|
}, []);
|
|
3892
4043
|
return {
|
|
@@ -3989,20 +4140,20 @@ var useCalendarLogic = ({
|
|
|
3989
4140
|
readOnly,
|
|
3990
4141
|
timezone
|
|
3991
4142
|
}) => {
|
|
3992
|
-
const [internalView, setInternalView] =
|
|
3993
|
-
const [internalDate, setInternalDate] =
|
|
3994
|
-
const [isSidebarOpen, setIsSidebarOpen] =
|
|
3995
|
-
|
|
4143
|
+
const [internalView, setInternalView] = React18.useState("week");
|
|
4144
|
+
const [internalDate, setInternalDate] = React18.useState(/* @__PURE__ */ new Date());
|
|
4145
|
+
const [isSidebarOpen, setIsSidebarOpen] = React18.useState(false);
|
|
4146
|
+
React18.useEffect(() => {
|
|
3996
4147
|
if (window.innerWidth >= 768) {
|
|
3997
4148
|
setIsSidebarOpen(true);
|
|
3998
4149
|
}
|
|
3999
4150
|
}, []);
|
|
4000
|
-
const [isModalOpen, setIsModalOpen] =
|
|
4001
|
-
const [selectedEvent, setSelectedEvent] =
|
|
4002
|
-
const [modalInitialDate, setModalInitialDate] =
|
|
4151
|
+
const [isModalOpen, setIsModalOpen] = React18.useState(false);
|
|
4152
|
+
const [selectedEvent, setSelectedEvent] = React18.useState(null);
|
|
4153
|
+
const [modalInitialDate, setModalInitialDate] = React18.useState(void 0);
|
|
4003
4154
|
const view = controlledView ?? internalView;
|
|
4004
4155
|
const currentDate = controlledDate ?? internalDate;
|
|
4005
|
-
const expandedEvents =
|
|
4156
|
+
const expandedEvents = React18.useMemo(() => {
|
|
4006
4157
|
const allEvents = [];
|
|
4007
4158
|
const rangeStart = dateFns.subDays(currentDate, 365);
|
|
4008
4159
|
const rangeEnd = dateFns.addDays(currentDate, 365);
|
|
@@ -4237,9 +4388,9 @@ var useSwipeGesture = (options) => {
|
|
|
4237
4388
|
allowedTime = 500,
|
|
4238
4389
|
enabled = true
|
|
4239
4390
|
} = options;
|
|
4240
|
-
const touchInfoRef =
|
|
4241
|
-
const elementRef =
|
|
4242
|
-
const handleTouchStart =
|
|
4391
|
+
const touchInfoRef = React18.useRef(null);
|
|
4392
|
+
const elementRef = React18.useRef(null);
|
|
4393
|
+
const handleTouchStart = React18.useCallback((e) => {
|
|
4243
4394
|
if (!enabled) return;
|
|
4244
4395
|
const touch = e.touches[0];
|
|
4245
4396
|
touchInfoRef.current = {
|
|
@@ -4248,7 +4399,7 @@ var useSwipeGesture = (options) => {
|
|
|
4248
4399
|
startTime: Date.now()
|
|
4249
4400
|
};
|
|
4250
4401
|
}, [enabled]);
|
|
4251
|
-
const handleTouchEnd =
|
|
4402
|
+
const handleTouchEnd = React18.useCallback((e) => {
|
|
4252
4403
|
if (!enabled || !touchInfoRef.current) return;
|
|
4253
4404
|
const touch = e.changedTouches[0];
|
|
4254
4405
|
const { startX, startY, startTime } = touchInfoRef.current;
|
|
@@ -4272,7 +4423,7 @@ var useSwipeGesture = (options) => {
|
|
|
4272
4423
|
}
|
|
4273
4424
|
touchInfoRef.current = null;
|
|
4274
4425
|
}, [enabled, threshold, restraint, allowedTime, onSwipeLeft, onSwipeRight, onSwipeUp, onSwipeDown]);
|
|
4275
|
-
|
|
4426
|
+
React18.useEffect(() => {
|
|
4276
4427
|
const element = elementRef.current;
|
|
4277
4428
|
if (!element) return;
|
|
4278
4429
|
element.addEventListener("touchstart", handleTouchStart, { passive: true });
|
|
@@ -4327,6 +4478,7 @@ var Scheduler = ({
|
|
|
4327
4478
|
translations,
|
|
4328
4479
|
hideViewSwitcher,
|
|
4329
4480
|
hideLanguageSwitcher,
|
|
4481
|
+
hourCount,
|
|
4330
4482
|
hideFab = false,
|
|
4331
4483
|
compactShortEvents = true,
|
|
4332
4484
|
initialScrollHour = 8,
|
|
@@ -4338,10 +4490,10 @@ var Scheduler = ({
|
|
|
4338
4490
|
sidebarMenus,
|
|
4339
4491
|
customViews
|
|
4340
4492
|
}) => {
|
|
4341
|
-
const [activeCustomMenu, setActiveCustomMenu] =
|
|
4342
|
-
const [activeCustomViewId, setActiveCustomViewId] =
|
|
4493
|
+
const [activeCustomMenu, setActiveCustomMenu] = React18.useState(null);
|
|
4494
|
+
const [activeCustomViewId, setActiveCustomViewId] = React18.useState(null);
|
|
4343
4495
|
const REVERSE_TIME_KEY = "calendarkit:reverseTime";
|
|
4344
|
-
const [reverseTime, setReverseTime] =
|
|
4496
|
+
const [reverseTime, setReverseTime] = React18.useState(() => {
|
|
4345
4497
|
try {
|
|
4346
4498
|
const stored = localStorage.getItem(REVERSE_TIME_KEY);
|
|
4347
4499
|
return stored !== null ? stored === "true" : reverseTimeProp;
|
|
@@ -4349,21 +4501,21 @@ var Scheduler = ({
|
|
|
4349
4501
|
return reverseTimeProp;
|
|
4350
4502
|
}
|
|
4351
4503
|
});
|
|
4352
|
-
|
|
4504
|
+
React18.useEffect(() => {
|
|
4353
4505
|
try {
|
|
4354
4506
|
localStorage.setItem(REVERSE_TIME_KEY, String(reverseTime));
|
|
4355
4507
|
} catch {
|
|
4356
4508
|
}
|
|
4357
4509
|
}, [reverseTime]);
|
|
4358
|
-
const [activeDragEvent, setActiveDragEvent] =
|
|
4359
|
-
const schedulerRef =
|
|
4360
|
-
const [fabCssVars, setFabCssVars] =
|
|
4361
|
-
const [isMounted, setIsMounted] =
|
|
4362
|
-
const [isMobile, setIsMobile] =
|
|
4363
|
-
|
|
4510
|
+
const [activeDragEvent, setActiveDragEvent] = React18.useState(null);
|
|
4511
|
+
const schedulerRef = React18.useRef(null);
|
|
4512
|
+
const [fabCssVars, setFabCssVars] = React18.useState({});
|
|
4513
|
+
const [isMounted, setIsMounted] = React18.useState(false);
|
|
4514
|
+
const [isMobile, setIsMobile] = React18.useState(false);
|
|
4515
|
+
React18.useEffect(() => {
|
|
4364
4516
|
setIsMounted(true);
|
|
4365
4517
|
}, []);
|
|
4366
|
-
|
|
4518
|
+
React18.useEffect(() => {
|
|
4367
4519
|
if (!isMounted) return;
|
|
4368
4520
|
const mq = window.matchMedia("(max-width: 767px)");
|
|
4369
4521
|
const update = () => setIsMobile(mq.matches);
|
|
@@ -4371,7 +4523,7 @@ var Scheduler = ({
|
|
|
4371
4523
|
mq.addEventListener("change", update);
|
|
4372
4524
|
return () => mq.removeEventListener("change", update);
|
|
4373
4525
|
}, [isMounted]);
|
|
4374
|
-
const syncFabTheme =
|
|
4526
|
+
const syncFabTheme = React18.useCallback(() => {
|
|
4375
4527
|
const root = schedulerRef.current;
|
|
4376
4528
|
if (!root) return;
|
|
4377
4529
|
const cs = getComputedStyle(root);
|
|
@@ -4383,7 +4535,7 @@ var Scheduler = ({
|
|
|
4383
4535
|
});
|
|
4384
4536
|
setFabCssVars(next);
|
|
4385
4537
|
}, []);
|
|
4386
|
-
|
|
4538
|
+
React18.useEffect(() => {
|
|
4387
4539
|
if (!isMounted) return;
|
|
4388
4540
|
syncFabTheme();
|
|
4389
4541
|
}, [isMounted, theme, isDarkMode, syncFabTheme]);
|
|
@@ -4452,7 +4604,7 @@ var Scheduler = ({
|
|
|
4452
4604
|
});
|
|
4453
4605
|
}
|
|
4454
4606
|
};
|
|
4455
|
-
const id =
|
|
4607
|
+
const id = React18.useId();
|
|
4456
4608
|
const swipeRef = useViewSwipe(handlePrev, handleNext, true);
|
|
4457
4609
|
const t = getTranslations(language, translations ?? {});
|
|
4458
4610
|
const handleDragStart = (event) => {
|
|
@@ -4485,7 +4637,7 @@ var Scheduler = ({
|
|
|
4485
4637
|
}
|
|
4486
4638
|
return "150px";
|
|
4487
4639
|
};
|
|
4488
|
-
const filteredEvents =
|
|
4640
|
+
const filteredEvents = React18.useMemo(() => {
|
|
4489
4641
|
if (!calendars) return expandedEvents;
|
|
4490
4642
|
const activeCalendarIds = calendars.filter((c) => c.active !== false).map((c) => c.id);
|
|
4491
4643
|
return expandedEvents.filter((e) => {
|
|
@@ -4493,7 +4645,7 @@ var Scheduler = ({
|
|
|
4493
4645
|
return activeCalendarIds.includes(e.calendarId);
|
|
4494
4646
|
});
|
|
4495
4647
|
}, [expandedEvents, calendars]);
|
|
4496
|
-
const viewEventCount =
|
|
4648
|
+
const viewEventCount = React18.useMemo(() => {
|
|
4497
4649
|
let rangeStart;
|
|
4498
4650
|
let rangeEnd;
|
|
4499
4651
|
switch (view) {
|
|
@@ -4521,7 +4673,7 @@ var Scheduler = ({
|
|
|
4521
4673
|
(e) => e.start >= rangeStart && e.start <= rangeEnd
|
|
4522
4674
|
).length;
|
|
4523
4675
|
}, [filteredEvents, view, currentDate]);
|
|
4524
|
-
return /* @__PURE__ */
|
|
4676
|
+
return /* @__PURE__ */ React18__namespace.default.createElement(React18__namespace.default.Fragment, null, /* @__PURE__ */ React18__namespace.default.createElement(
|
|
4525
4677
|
core.DndContext,
|
|
4526
4678
|
{
|
|
4527
4679
|
id,
|
|
@@ -4530,7 +4682,7 @@ var Scheduler = ({
|
|
|
4530
4682
|
onDragEnd: onDragEndWrapper,
|
|
4531
4683
|
modifiers: modifiers$1
|
|
4532
4684
|
},
|
|
4533
|
-
/* @__PURE__ */
|
|
4685
|
+
/* @__PURE__ */ React18__namespace.default.createElement(
|
|
4534
4686
|
"div",
|
|
4535
4687
|
{
|
|
4536
4688
|
ref: schedulerRef,
|
|
@@ -4552,7 +4704,7 @@ var Scheduler = ({
|
|
|
4552
4704
|
isDarkMode,
|
|
4553
4705
|
onThemeToggle
|
|
4554
4706
|
})
|
|
4555
|
-
) : /* @__PURE__ */
|
|
4707
|
+
) : /* @__PURE__ */ React18__namespace.default.createElement(
|
|
4556
4708
|
CalendarHeader,
|
|
4557
4709
|
{
|
|
4558
4710
|
currentDate,
|
|
@@ -4577,10 +4729,11 @@ var Scheduler = ({
|
|
|
4577
4729
|
setActiveCustomMenu(null);
|
|
4578
4730
|
},
|
|
4579
4731
|
eventCount: viewEventCount,
|
|
4732
|
+
hourCount,
|
|
4580
4733
|
hideLanguageSwitcher
|
|
4581
4734
|
}
|
|
4582
4735
|
),
|
|
4583
|
-
/* @__PURE__ */
|
|
4736
|
+
/* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex flex-1 overflow-hidden" }, /* @__PURE__ */ React18__namespace.default.createElement(
|
|
4584
4737
|
framerMotion.motion.div,
|
|
4585
4738
|
{
|
|
4586
4739
|
className: "hidden md:block overflow-hidden shrink-0",
|
|
@@ -4594,7 +4747,7 @@ var Scheduler = ({
|
|
|
4594
4747
|
ease: [0.4, 0, 0.2, 1]
|
|
4595
4748
|
}
|
|
4596
4749
|
},
|
|
4597
|
-
/* @__PURE__ */
|
|
4750
|
+
/* @__PURE__ */ React18__namespace.default.createElement(
|
|
4598
4751
|
Sidebar,
|
|
4599
4752
|
{
|
|
4600
4753
|
currentDate,
|
|
@@ -4626,7 +4779,7 @@ var Scheduler = ({
|
|
|
4626
4779
|
}
|
|
4627
4780
|
}
|
|
4628
4781
|
)
|
|
4629
|
-
), /* @__PURE__ */
|
|
4782
|
+
), /* @__PURE__ */ React18__namespace.default.createElement(framerMotion.AnimatePresence, null, isSidebarOpen && /* @__PURE__ */ React18__namespace.default.createElement(
|
|
4630
4783
|
framerMotion.motion.div,
|
|
4631
4784
|
{
|
|
4632
4785
|
key: "mobile-sidebar-overlay",
|
|
@@ -4636,7 +4789,7 @@ var Scheduler = ({
|
|
|
4636
4789
|
exit: { opacity: 0 },
|
|
4637
4790
|
transition: { duration: 0.2 }
|
|
4638
4791
|
},
|
|
4639
|
-
/* @__PURE__ */
|
|
4792
|
+
/* @__PURE__ */ React18__namespace.default.createElement(
|
|
4640
4793
|
framerMotion.motion.div,
|
|
4641
4794
|
{
|
|
4642
4795
|
className: "w-[280px] h-full bg-background shadow-2xl overflow-hidden",
|
|
@@ -4645,7 +4798,7 @@ var Scheduler = ({
|
|
|
4645
4798
|
exit: { x: -280 },
|
|
4646
4799
|
transition: { duration: 0.25, ease: [0.4, 0, 0.2, 1] }
|
|
4647
4800
|
},
|
|
4648
|
-
/* @__PURE__ */
|
|
4801
|
+
/* @__PURE__ */ React18__namespace.default.createElement(
|
|
4649
4802
|
Sidebar,
|
|
4650
4803
|
{
|
|
4651
4804
|
currentDate,
|
|
@@ -4683,16 +4836,16 @@ var Scheduler = ({
|
|
|
4683
4836
|
}
|
|
4684
4837
|
)
|
|
4685
4838
|
),
|
|
4686
|
-
/* @__PURE__ */
|
|
4839
|
+
/* @__PURE__ */ React18__namespace.default.createElement(
|
|
4687
4840
|
framerMotion.motion.div,
|
|
4688
4841
|
{
|
|
4689
4842
|
className: "flex-1 bg-black/50 backdrop-blur-sm",
|
|
4690
4843
|
onClick: () => setIsSidebarOpen(false)
|
|
4691
4844
|
}
|
|
4692
4845
|
)
|
|
4693
|
-
)), /* @__PURE__ */
|
|
4846
|
+
)), /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex-1 flex flex-col overflow-hidden relative min-h-0" }, activeCustomMenu !== null && sidebarMenus && /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex-1 overflow-y-auto p-4 md:p-6" }, sidebarMenus.find((m) => m.id === activeCustomMenu)?.component), activeCustomViewId !== null && activeCustomMenu === null && customViews && /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex-1 overflow-y-auto p-4 md:p-6" }, customViews.find((v) => v.id === activeCustomViewId)?.component), activeCustomMenu === null && activeCustomViewId === null && (isLoading ? /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex-1 overflow-auto p-0 md:p-4 min-h-0" }, /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "h-full min-w-full" }, view === "month" && /* @__PURE__ */ React18__namespace.default.createElement(MonthViewSkeleton, null), view === "week" && /* @__PURE__ */ React18__namespace.default.createElement(WeekViewSkeleton, null), view === "day" && /* @__PURE__ */ React18__namespace.default.createElement(DayViewSkeleton, null), view === "agenda" && /* @__PURE__ */ React18__namespace.default.createElement(AgendaViewSkeleton, null), view === "resource" && /* @__PURE__ */ React18__namespace.default.createElement(WeekViewSkeleton, null))) : (
|
|
4694
4847
|
/* overflow-hidden here: each view owns its own scroll container */
|
|
4695
|
-
/* @__PURE__ */
|
|
4848
|
+
/* @__PURE__ */ React18__namespace.default.createElement("div", { ref: swipeRef, className: "flex-1 overflow-hidden p-0 md:p-4 touch-pan-y min-h-0" }, /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "flex flex-col h-full min-w-full min-h-0" }, /* @__PURE__ */ React18__namespace.default.createElement(framerMotion.AnimatePresence, { mode: "wait", initial: false }, /* @__PURE__ */ React18__namespace.default.createElement(
|
|
4696
4849
|
framerMotion.motion.div,
|
|
4697
4850
|
{
|
|
4698
4851
|
key: `${view}-${currentDate.toISOString()}-${timezone || "local"}`,
|
|
@@ -4716,7 +4869,7 @@ var Scheduler = ({
|
|
|
4716
4869
|
className: "flex-1 min-h-0 flex flex-col",
|
|
4717
4870
|
style: { height: "100%" }
|
|
4718
4871
|
},
|
|
4719
|
-
view === "month" && /* @__PURE__ */
|
|
4872
|
+
view === "month" && /* @__PURE__ */ React18__namespace.default.createElement(
|
|
4720
4873
|
MonthView,
|
|
4721
4874
|
{
|
|
4722
4875
|
currentDate,
|
|
@@ -4727,7 +4880,7 @@ var Scheduler = ({
|
|
|
4727
4880
|
locale
|
|
4728
4881
|
}
|
|
4729
4882
|
),
|
|
4730
|
-
view === "week" && /* @__PURE__ */
|
|
4883
|
+
view === "week" && /* @__PURE__ */ React18__namespace.default.createElement(
|
|
4731
4884
|
WeekView,
|
|
4732
4885
|
{
|
|
4733
4886
|
currentDate,
|
|
@@ -4744,7 +4897,7 @@ var Scheduler = ({
|
|
|
4744
4897
|
compactShortEvents
|
|
4745
4898
|
}
|
|
4746
4899
|
),
|
|
4747
|
-
view === "day" && /* @__PURE__ */
|
|
4900
|
+
view === "day" && /* @__PURE__ */ React18__namespace.default.createElement(
|
|
4748
4901
|
DayView,
|
|
4749
4902
|
{
|
|
4750
4903
|
currentDate,
|
|
@@ -4761,7 +4914,7 @@ var Scheduler = ({
|
|
|
4761
4914
|
compactShortEvents
|
|
4762
4915
|
}
|
|
4763
4916
|
),
|
|
4764
|
-
view === "agenda" && /* @__PURE__ */
|
|
4917
|
+
view === "agenda" && /* @__PURE__ */ React18__namespace.default.createElement(
|
|
4765
4918
|
AgendaView,
|
|
4766
4919
|
{
|
|
4767
4920
|
currentDate,
|
|
@@ -4773,7 +4926,7 @@ var Scheduler = ({
|
|
|
4773
4926
|
renderEmptyState
|
|
4774
4927
|
}
|
|
4775
4928
|
),
|
|
4776
|
-
view === "resource" && resources && /* @__PURE__ */
|
|
4929
|
+
view === "resource" && resources && /* @__PURE__ */ React18__namespace.default.createElement(
|
|
4777
4930
|
ResourceView,
|
|
4778
4931
|
{
|
|
4779
4932
|
currentDate,
|
|
@@ -4797,7 +4950,7 @@ var Scheduler = ({
|
|
|
4797
4950
|
initialDate: modalInitialDate,
|
|
4798
4951
|
onSave: handleModalSave,
|
|
4799
4952
|
onDelete: handleModalDelete
|
|
4800
|
-
}) : /* @__PURE__ */
|
|
4953
|
+
}) : /* @__PURE__ */ React18__namespace.default.createElement(
|
|
4801
4954
|
EventModal,
|
|
4802
4955
|
{
|
|
4803
4956
|
isOpen: isModalOpen,
|
|
@@ -4812,7 +4965,7 @@ var Scheduler = ({
|
|
|
4812
4965
|
language
|
|
4813
4966
|
}
|
|
4814
4967
|
),
|
|
4815
|
-
/* @__PURE__ */
|
|
4968
|
+
/* @__PURE__ */ React18__namespace.default.createElement(
|
|
4816
4969
|
EventContextMenu,
|
|
4817
4970
|
{
|
|
4818
4971
|
event: contextMenuEvent,
|
|
@@ -4845,7 +4998,7 @@ var Scheduler = ({
|
|
|
4845
4998
|
}
|
|
4846
4999
|
}
|
|
4847
5000
|
),
|
|
4848
|
-
/* @__PURE__ */
|
|
5001
|
+
/* @__PURE__ */ React18__namespace.default.createElement(core.DragOverlay, { dropAnimation: null }, activeDragEvent ? /* @__PURE__ */ React18__namespace.default.createElement(
|
|
4849
5002
|
"div",
|
|
4850
5003
|
{
|
|
4851
5004
|
className: cn(
|
|
@@ -4863,17 +5016,17 @@ var Scheduler = ({
|
|
|
4863
5016
|
transform: "rotate(-2deg) scale(1.02)"
|
|
4864
5017
|
}
|
|
4865
5018
|
},
|
|
4866
|
-
/* @__PURE__ */
|
|
5019
|
+
/* @__PURE__ */ React18__namespace.default.createElement("div", { className: "p-2.5 h-full flex flex-col" }, /* @__PURE__ */ React18__namespace.default.createElement(
|
|
4867
5020
|
"div",
|
|
4868
5021
|
{
|
|
4869
5022
|
className: "absolute left-0 top-0 bottom-0 w-1 rounded-l-lg",
|
|
4870
5023
|
style: { backgroundColor: activeDragEvent.color || "var(--primary)" }
|
|
4871
5024
|
}
|
|
4872
|
-
), /* @__PURE__ */
|
|
5025
|
+
), /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "pl-2" }, /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "font-semibold truncate text-sm" }, activeDragEvent.title), (view === "week" || view === "day") && getDragHeight() && getDragHeight() > 40 && /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "text-xs opacity-80 mt-0.5 flex items-center gap-1" }, /* @__PURE__ */ React18__namespace.default.createElement("svg", { className: "w-3 h-3", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2" }, /* @__PURE__ */ React18__namespace.default.createElement("circle", { cx: "12", cy: "12", r: "10" }), /* @__PURE__ */ React18__namespace.default.createElement("path", { d: "M12 6v6l4 2" })), dateFns.format(activeDragEvent.start, getTimeFormatFull(language)), " - ", dateFns.format(activeDragEvent.end, getTimeFormatFull(language)))), /* @__PURE__ */ React18__namespace.default.createElement("div", { className: "absolute bottom-1.5 right-1.5 opacity-60" }, /* @__PURE__ */ React18__namespace.default.createElement("svg", { className: "w-4 h-4", viewBox: "0 0 24 24", fill: "currentColor" }, /* @__PURE__ */ React18__namespace.default.createElement("circle", { cx: "9", cy: "5", r: "1.5" }), /* @__PURE__ */ React18__namespace.default.createElement("circle", { cx: "15", cy: "5", r: "1.5" }), /* @__PURE__ */ React18__namespace.default.createElement("circle", { cx: "9", cy: "12", r: "1.5" }), /* @__PURE__ */ React18__namespace.default.createElement("circle", { cx: "15", cy: "12", r: "1.5" }), /* @__PURE__ */ React18__namespace.default.createElement("circle", { cx: "9", cy: "19", r: "1.5" }), /* @__PURE__ */ React18__namespace.default.createElement("circle", { cx: "15", cy: "19", r: "1.5" }))))
|
|
4873
5026
|
) : null)
|
|
4874
5027
|
)
|
|
4875
5028
|
), isMounted && isMobile && !readOnly && !hideFab && reactDom.createPortal(
|
|
4876
|
-
/* @__PURE__ */
|
|
5029
|
+
/* @__PURE__ */ React18__namespace.default.createElement(
|
|
4877
5030
|
"div",
|
|
4878
5031
|
{
|
|
4879
5032
|
style: {
|
|
@@ -4885,7 +5038,7 @@ var Scheduler = ({
|
|
|
4885
5038
|
...fabCssVars
|
|
4886
5039
|
}
|
|
4887
5040
|
},
|
|
4888
|
-
/* @__PURE__ */
|
|
5041
|
+
/* @__PURE__ */ React18__namespace.default.createElement(
|
|
4889
5042
|
"button",
|
|
4890
5043
|
{
|
|
4891
5044
|
type: "button",
|
|
@@ -4906,7 +5059,7 @@ var Scheduler = ({
|
|
|
4906
5059
|
boxShadow: "0 10px 25px -5px rgba(0, 0, 0, 0.25)"
|
|
4907
5060
|
}
|
|
4908
5061
|
},
|
|
4909
|
-
/* @__PURE__ */
|
|
5062
|
+
/* @__PURE__ */ React18__namespace.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React18__namespace.default.createElement("path", { d: "M5 12h14" }), /* @__PURE__ */ React18__namespace.default.createElement("path", { d: "M12 5v14" }))
|
|
4910
5063
|
)
|
|
4911
5064
|
),
|
|
4912
5065
|
document.body
|