calendarkit-prov2 2.0.6 → 2.0.8
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 +1 -0
- package/dist/index.d.mts +51 -1
- package/dist/index.d.ts +51 -1
- package/dist/index.js +496 -371
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +412 -292
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
1
|
+
import * as React17 from 'react';
|
|
2
|
+
import React17__default, { useState, useEffect, useRef, useCallback, useId, useMemo, useLayoutEffect } from 'react';
|
|
3
3
|
import { createPortal } from 'react-dom';
|
|
4
4
|
import { useDraggable, useSensors, useSensor, PointerSensor, DndContext, DragOverlay, useDroppable } from '@dnd-kit/core';
|
|
5
5
|
import { createSnapModifier, restrictToWindowEdges } from '@dnd-kit/modifiers';
|
|
@@ -8,7 +8,7 @@ import { startOfDay, addDays, endOfDay, startOfWeek, endOfWeek, startOfMonth, en
|
|
|
8
8
|
import { cva } from 'class-variance-authority';
|
|
9
9
|
import { clsx } from 'clsx';
|
|
10
10
|
import { twMerge } from 'tailwind-merge';
|
|
11
|
-
import { Menu, Plus, ChevronLeft, ChevronRight, Globe, ChevronDown, Sun, Moon, CalendarCheck2, CalendarDays, CalendarRange, Calendar, ListTodo, MoreHorizontal, LayoutGrid, X, Clock,
|
|
11
|
+
import { Headphones, Ban, PartyPopper, Star, Presentation, ClipboardCheck, RefreshCw, Sparkles, Home, MapPin, Video, Package, Users, User, Menu, Plus, ChevronLeft, ChevronRight, Globe, ChevronDown, Sun, Moon, CalendarCheck2, CalendarDays, CalendarRange, Calendar, ListTodo, MoreHorizontal, LayoutGrid, X, Clock, Paperclip, Bell, Edit3, Copy, Trash2, Edit2, ExternalLink, AlignLeft, File, Download, BellRing, Check, Repeat, Tag } from 'lucide-react';
|
|
12
12
|
import { sv as sv$1, pl as pl$1, nl as nl$1, ru as ru$1, ko as ko$1, ja as ja$1, zhCN, ar as ar$1, pt as pt$1, it as it$1, es as es$1, de as de$1, fr as fr$1, enUS, tr as tr$1 } from 'date-fns/locale';
|
|
13
13
|
import { toZonedTime, fromZonedTime } from 'date-fns-tz';
|
|
14
14
|
import { CSS } from '@dnd-kit/utilities';
|
|
@@ -44,10 +44,10 @@ var buttonVariants = cva(
|
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
);
|
|
47
|
-
var Button =
|
|
47
|
+
var Button = React17.forwardRef(
|
|
48
48
|
({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
49
49
|
const Comp = "button";
|
|
50
|
-
return /* @__PURE__ */
|
|
50
|
+
return /* @__PURE__ */ React17.createElement(
|
|
51
51
|
Comp,
|
|
52
52
|
{
|
|
53
53
|
className: cn(buttonVariants({ variant, size, className })),
|
|
@@ -1617,7 +1617,7 @@ var CalendarHeader = ({
|
|
|
1617
1617
|
{ key: "agenda", icon: ListTodo }
|
|
1618
1618
|
];
|
|
1619
1619
|
const currentLang = LANGUAGE_META[language] ?? LANGUAGE_META["tr"];
|
|
1620
|
-
return /* @__PURE__ */
|
|
1620
|
+
return /* @__PURE__ */ React17__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__ */ React17__default.createElement("div", { className: "flex items-center gap-2 w-full md:w-auto justify-between md:justify-start" }, /* @__PURE__ */ React17__default.createElement("div", { className: "flex items-center gap-2 md:gap-3" }, /* @__PURE__ */ React17__default.createElement(
|
|
1621
1621
|
Button,
|
|
1622
1622
|
{
|
|
1623
1623
|
variant: "ghost",
|
|
@@ -1625,8 +1625,8 @@ var CalendarHeader = ({
|
|
|
1625
1625
|
className: "text-muted-foreground hover:text-foreground hover:bg-accent/80 rounded-xl h-10 w-10 transition-all duration-200",
|
|
1626
1626
|
onClick: onMenuClick
|
|
1627
1627
|
},
|
|
1628
|
-
/* @__PURE__ */
|
|
1629
|
-
), /* @__PURE__ */
|
|
1628
|
+
/* @__PURE__ */ React17__default.createElement(Menu, { className: "h-5 w-5" })
|
|
1629
|
+
), /* @__PURE__ */ React17__default.createElement(
|
|
1630
1630
|
Button,
|
|
1631
1631
|
{
|
|
1632
1632
|
variant: "outline",
|
|
@@ -1634,15 +1634,15 @@ var CalendarHeader = ({
|
|
|
1634
1634
|
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"
|
|
1635
1635
|
},
|
|
1636
1636
|
translations.today
|
|
1637
|
-
), onCreateEvent && /* @__PURE__ */
|
|
1637
|
+
), onCreateEvent && /* @__PURE__ */ React17__default.createElement("div", { className: "relative group hidden sm:block" }, /* @__PURE__ */ React17__default.createElement(
|
|
1638
1638
|
Button,
|
|
1639
1639
|
{
|
|
1640
1640
|
onClick: onCreateEvent,
|
|
1641
1641
|
size: "icon",
|
|
1642
1642
|
className: "h-9 w-9 rounded-xl shadow-sm shadow-primary/20 transition-all duration-200"
|
|
1643
1643
|
},
|
|
1644
|
-
/* @__PURE__ */
|
|
1645
|
-
), /* @__PURE__ */
|
|
1644
|
+
/* @__PURE__ */ React17__default.createElement(Plus, { className: "h-4 w-4" })
|
|
1645
|
+
), /* @__PURE__ */ React17__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__ */ React17__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__ */ React17__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__ */ React17__default.createElement("div", { className: "flex items-center bg-muted/40 rounded-xl p-0.5" }, /* @__PURE__ */ React17__default.createElement(
|
|
1646
1646
|
Button,
|
|
1647
1647
|
{
|
|
1648
1648
|
variant: "ghost",
|
|
@@ -1650,8 +1650,8 @@ var CalendarHeader = ({
|
|
|
1650
1650
|
onClick: onPrev,
|
|
1651
1651
|
className: "rounded-lg h-8 w-8 hover:bg-background/80 transition-all duration-200"
|
|
1652
1652
|
},
|
|
1653
|
-
/* @__PURE__ */
|
|
1654
|
-
), /* @__PURE__ */
|
|
1653
|
+
/* @__PURE__ */ React17__default.createElement(ChevronLeft, { className: "h-4 w-4 text-muted-foreground" })
|
|
1654
|
+
), /* @__PURE__ */ React17__default.createElement(
|
|
1655
1655
|
Button,
|
|
1656
1656
|
{
|
|
1657
1657
|
variant: "ghost",
|
|
@@ -1659,8 +1659,8 @@ var CalendarHeader = ({
|
|
|
1659
1659
|
onClick: onNext,
|
|
1660
1660
|
className: "rounded-lg h-8 w-8 hover:bg-background/80 transition-all duration-200"
|
|
1661
1661
|
},
|
|
1662
|
-
/* @__PURE__ */
|
|
1663
|
-
)), /* @__PURE__ */
|
|
1662
|
+
/* @__PURE__ */ React17__default.createElement(ChevronRight, { className: "h-4 w-4 text-muted-foreground" })
|
|
1663
|
+
)), /* @__PURE__ */ React17__default.createElement("div", { className: "ml-2 md:ml-4 hidden sm:block" }, /* @__PURE__ */ React17__default.createElement("h2", { className: "text-lg md:text-xl font-semibold text-foreground whitespace-nowrap capitalize tracking-tight" }, format(currentDate, "MMMM yyyy", { locale })))), /* @__PURE__ */ React17__default.createElement("div", { className: "sm:hidden" }, /* @__PURE__ */ React17__default.createElement("h2", { className: "text-lg font-semibold text-foreground whitespace-nowrap capitalize tracking-tight" }, format(currentDate, "MMMM yyyy", { locale })))), /* @__PURE__ */ React17__default.createElement("div", { className: "flex items-center gap-2 md:gap-3 w-full md:w-auto justify-end" }, onLanguageChange && !hideLanguageSwitcher && /* @__PURE__ */ React17__default.createElement("div", { className: "relative" }, /* @__PURE__ */ React17__default.createElement(
|
|
1664
1664
|
"button",
|
|
1665
1665
|
{
|
|
1666
1666
|
ref: langButtonRef,
|
|
@@ -1672,20 +1672,20 @@ var CalendarHeader = ({
|
|
|
1672
1672
|
),
|
|
1673
1673
|
title: currentLang.english
|
|
1674
1674
|
},
|
|
1675
|
-
/* @__PURE__ */
|
|
1676
|
-
/* @__PURE__ */
|
|
1677
|
-
/* @__PURE__ */
|
|
1678
|
-
/* @__PURE__ */
|
|
1675
|
+
/* @__PURE__ */ React17__default.createElement(Globe, { className: "h-3.5 w-3.5" }),
|
|
1676
|
+
/* @__PURE__ */ React17__default.createElement("span", { className: "text-base leading-none" }, currentLang.flag),
|
|
1677
|
+
/* @__PURE__ */ React17__default.createElement("span", { className: "hidden sm:inline text-xs font-semibold uppercase tracking-wider" }, language),
|
|
1678
|
+
/* @__PURE__ */ React17__default.createElement(ChevronDown, { className: cn("h-3.5 w-3.5 transition-transform duration-200", isLangOpen && "rotate-180") })
|
|
1679
1679
|
), isLangOpen && langPos && createPortal(
|
|
1680
|
-
/* @__PURE__ */
|
|
1680
|
+
/* @__PURE__ */ React17__default.createElement(
|
|
1681
1681
|
"div",
|
|
1682
1682
|
{
|
|
1683
1683
|
ref: langDropdownRef,
|
|
1684
1684
|
className: "fixed w-52 bg-background border border-border/60 rounded-2xl shadow-2xl z-[9999] overflow-hidden py-1.5",
|
|
1685
1685
|
style: { top: langPos.top, left: langPos.left, width: LANG_DROPDOWN_WIDTH }
|
|
1686
1686
|
},
|
|
1687
|
-
/* @__PURE__ */
|
|
1688
|
-
/* @__PURE__ */
|
|
1687
|
+
/* @__PURE__ */ React17__default.createElement("div", { className: "px-3 py-2 border-b border-border/40 mb-1" }, /* @__PURE__ */ React17__default.createElement("p", { className: "text-xs font-semibold text-muted-foreground uppercase tracking-wider" }, "Language / Dil")),
|
|
1688
|
+
/* @__PURE__ */ React17__default.createElement("div", { className: "max-h-72 overflow-y-auto" }, Object.entries(LANGUAGE_META).map(([code, meta]) => /* @__PURE__ */ React17__default.createElement(
|
|
1689
1689
|
"button",
|
|
1690
1690
|
{
|
|
1691
1691
|
key: code,
|
|
@@ -1699,13 +1699,13 @@ var CalendarHeader = ({
|
|
|
1699
1699
|
language === code ? "bg-primary/10 text-primary font-semibold" : "text-foreground"
|
|
1700
1700
|
)
|
|
1701
1701
|
},
|
|
1702
|
-
/* @__PURE__ */
|
|
1703
|
-
/* @__PURE__ */
|
|
1704
|
-
language === code && /* @__PURE__ */
|
|
1702
|
+
/* @__PURE__ */ React17__default.createElement("span", { className: "text-lg leading-none w-6 text-center" }, meta.flag),
|
|
1703
|
+
/* @__PURE__ */ React17__default.createElement("div", { className: "flex-1 text-left" }, /* @__PURE__ */ React17__default.createElement("div", { className: cn("font-medium", meta.rtl && "text-right") }, meta.native), /* @__PURE__ */ React17__default.createElement("div", { className: "text-xs text-muted-foreground" }, meta.english)),
|
|
1704
|
+
language === code && /* @__PURE__ */ React17__default.createElement("div", { className: "w-2 h-2 rounded-full bg-primary shrink-0" })
|
|
1705
1705
|
)))
|
|
1706
1706
|
),
|
|
1707
1707
|
document.body
|
|
1708
|
-
)), onThemeToggle && /* @__PURE__ */
|
|
1708
|
+
)), onThemeToggle && /* @__PURE__ */ React17__default.createElement(
|
|
1709
1709
|
Button,
|
|
1710
1710
|
{
|
|
1711
1711
|
variant: "ghost",
|
|
@@ -1713,16 +1713,16 @@ var CalendarHeader = ({
|
|
|
1713
1713
|
className: "rounded-xl h-9 w-9 hover:bg-accent/80 transition-all duration-200",
|
|
1714
1714
|
onClick: onThemeToggle
|
|
1715
1715
|
},
|
|
1716
|
-
isDarkMode ? /* @__PURE__ */
|
|
1717
|
-
), typeof eventCount === "number" && !hideViewSwitcher && /* @__PURE__ */
|
|
1716
|
+
isDarkMode ? /* @__PURE__ */ React17__default.createElement(Sun, { className: "h-4 w-4 text-amber-500" }) : /* @__PURE__ */ React17__default.createElement(Moon, { className: "h-4 w-4 text-muted-foreground" })
|
|
1717
|
+
), typeof eventCount === "number" && !hideViewSwitcher && /* @__PURE__ */ React17__default.createElement(
|
|
1718
1718
|
"div",
|
|
1719
1719
|
{
|
|
1720
1720
|
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",
|
|
1721
1721
|
title: `${eventCount} event${eventCount !== 1 ? "s" : ""}`
|
|
1722
1722
|
},
|
|
1723
|
-
/* @__PURE__ */
|
|
1724
|
-
/* @__PURE__ */
|
|
1725
|
-
), !hideViewSwitcher && /* @__PURE__ */
|
|
1723
|
+
/* @__PURE__ */ React17__default.createElement(CalendarCheck2, { className: "w-3.5 h-3.5 shrink-0" }),
|
|
1724
|
+
/* @__PURE__ */ React17__default.createElement("span", null, eventCount)
|
|
1725
|
+
), !hideViewSwitcher && /* @__PURE__ */ React17__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__ */ React17__default.createElement(
|
|
1726
1726
|
Button,
|
|
1727
1727
|
{
|
|
1728
1728
|
key,
|
|
@@ -1737,9 +1737,9 @@ var CalendarHeader = ({
|
|
|
1737
1737
|
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"
|
|
1738
1738
|
)
|
|
1739
1739
|
},
|
|
1740
|
-
/* @__PURE__ */
|
|
1741
|
-
/* @__PURE__ */
|
|
1742
|
-
)), customViews && customViews.length > 0 && /* @__PURE__ */
|
|
1740
|
+
/* @__PURE__ */ React17__default.createElement(Icon, { className: "h-3.5 w-3.5" }),
|
|
1741
|
+
/* @__PURE__ */ React17__default.createElement("span", { className: "hidden sm:inline" }, translations[key])
|
|
1742
|
+
)), customViews && customViews.length > 0 && /* @__PURE__ */ React17__default.createElement(React17__default.Fragment, null, /* @__PURE__ */ React17__default.createElement("div", { className: "w-px h-5 bg-border/60 mx-0.5 shrink-0" }), /* @__PURE__ */ React17__default.createElement("div", { className: "relative" }, /* @__PURE__ */ React17__default.createElement(
|
|
1743
1743
|
Button,
|
|
1744
1744
|
{
|
|
1745
1745
|
ref: customViewButtonRef,
|
|
@@ -1752,17 +1752,17 @@ var CalendarHeader = ({
|
|
|
1752
1752
|
),
|
|
1753
1753
|
title: "Daha fazla g\xF6r\xFCn\xFCm"
|
|
1754
1754
|
},
|
|
1755
|
-
activeCustomViewId ? customViews.find((cv) => cv.id === activeCustomViewId)?.label : /* @__PURE__ */
|
|
1756
|
-
/* @__PURE__ */
|
|
1755
|
+
activeCustomViewId ? customViews.find((cv) => cv.id === activeCustomViewId)?.label : /* @__PURE__ */ React17__default.createElement(MoreHorizontal, { className: "h-3.5 w-3.5" }),
|
|
1756
|
+
/* @__PURE__ */ React17__default.createElement(ChevronDown, { className: cn("h-3 w-3 transition-transform duration-150", isCustomViewOpen && "rotate-180") })
|
|
1757
1757
|
), isCustomViewOpen && customViewPos && createPortal(
|
|
1758
|
-
/* @__PURE__ */
|
|
1758
|
+
/* @__PURE__ */ React17__default.createElement(
|
|
1759
1759
|
"div",
|
|
1760
1760
|
{
|
|
1761
1761
|
ref: customViewDropdownRef,
|
|
1762
1762
|
className: "fixed min-w-[160px] bg-background border border-border/60 rounded-2xl shadow-2xl z-[9999] overflow-hidden py-1.5",
|
|
1763
1763
|
style: { top: customViewPos.top, left: customViewPos.left, minWidth: CUSTOM_VIEW_DROPDOWN_WIDTH }
|
|
1764
1764
|
},
|
|
1765
|
-
customViews.map((cv) => /* @__PURE__ */
|
|
1765
|
+
customViews.map((cv) => /* @__PURE__ */ React17__default.createElement(
|
|
1766
1766
|
"button",
|
|
1767
1767
|
{
|
|
1768
1768
|
key: cv.id,
|
|
@@ -1776,9 +1776,9 @@ var CalendarHeader = ({
|
|
|
1776
1776
|
activeCustomViewId === cv.id ? "bg-primary/10 text-primary font-semibold" : "text-foreground"
|
|
1777
1777
|
)
|
|
1778
1778
|
},
|
|
1779
|
-
cv.icon && /* @__PURE__ */
|
|
1780
|
-
/* @__PURE__ */
|
|
1781
|
-
activeCustomViewId === cv.id && /* @__PURE__ */
|
|
1779
|
+
cv.icon && /* @__PURE__ */ React17__default.createElement("span", { className: "w-4 h-4 flex items-center justify-center shrink-0" }, cv.icon),
|
|
1780
|
+
/* @__PURE__ */ React17__default.createElement("span", null, cv.label),
|
|
1781
|
+
activeCustomViewId === cv.id && /* @__PURE__ */ React17__default.createElement("span", { className: "ml-auto w-1.5 h-1.5 rounded-full bg-primary shrink-0" })
|
|
1782
1782
|
))
|
|
1783
1783
|
),
|
|
1784
1784
|
document.body
|
|
@@ -1805,12 +1805,12 @@ var MiniCalendar = ({
|
|
|
1805
1805
|
className,
|
|
1806
1806
|
locale
|
|
1807
1807
|
}) => {
|
|
1808
|
-
const [viewDate, setViewDate] =
|
|
1809
|
-
|
|
1808
|
+
const [viewDate, setViewDate] = React17__default.useState(currentDate);
|
|
1809
|
+
React17__default.useEffect(() => {
|
|
1810
1810
|
setViewDate(currentDate);
|
|
1811
1811
|
}, [currentDate]);
|
|
1812
|
-
const days =
|
|
1813
|
-
const weekDays =
|
|
1812
|
+
const days = React17__default.useMemo(() => getMonthGrid(viewDate), [viewDate]);
|
|
1813
|
+
const weekDays = React17__default.useMemo(() => {
|
|
1814
1814
|
const base = new Date(2024, 0, 7);
|
|
1815
1815
|
return Array.from({ length: 7 }, (_, i) => {
|
|
1816
1816
|
const d = new Date(base);
|
|
@@ -1834,7 +1834,7 @@ var MiniCalendar = ({
|
|
|
1834
1834
|
onDateChange(day);
|
|
1835
1835
|
if (onViewChange) onViewChange("day");
|
|
1836
1836
|
};
|
|
1837
|
-
return /* @__PURE__ */
|
|
1837
|
+
return /* @__PURE__ */ React17__default.createElement("div", { className: cn("px-4 w-[260px]", className) }, /* @__PURE__ */ React17__default.createElement("div", { className: "flex items-center justify-between mb-4" }, /* @__PURE__ */ React17__default.createElement("span", { className: "text-sm font-semibold text-foreground capitalize" }, format(viewDate, "MMMM yyyy", { locale })), /* @__PURE__ */ React17__default.createElement("div", { className: "flex items-center bg-muted/40 rounded-lg p-0.5" }, /* @__PURE__ */ React17__default.createElement(
|
|
1838
1838
|
Button,
|
|
1839
1839
|
{
|
|
1840
1840
|
variant: "ghost",
|
|
@@ -1843,8 +1843,8 @@ var MiniCalendar = ({
|
|
|
1843
1843
|
onClick: handlePrev,
|
|
1844
1844
|
"aria-label": "Previous month"
|
|
1845
1845
|
},
|
|
1846
|
-
/* @__PURE__ */
|
|
1847
|
-
), /* @__PURE__ */
|
|
1846
|
+
/* @__PURE__ */ React17__default.createElement(ChevronLeft, { className: "h-4 w-4" })
|
|
1847
|
+
), /* @__PURE__ */ React17__default.createElement(
|
|
1848
1848
|
Button,
|
|
1849
1849
|
{
|
|
1850
1850
|
variant: "ghost",
|
|
@@ -1853,12 +1853,12 @@ var MiniCalendar = ({
|
|
|
1853
1853
|
onClick: handleNext,
|
|
1854
1854
|
"aria-label": "Next month"
|
|
1855
1855
|
},
|
|
1856
|
-
/* @__PURE__ */
|
|
1857
|
-
))), /* @__PURE__ */
|
|
1856
|
+
/* @__PURE__ */ React17__default.createElement(ChevronRight, { className: "h-4 w-4" })
|
|
1857
|
+
))), /* @__PURE__ */ React17__default.createElement("div", { className: "grid grid-cols-7 gap-y-2 text-center mb-2" }, weekDays.map((day, i) => /* @__PURE__ */ React17__default.createElement("div", { key: `${day}-${i}`, className: "text-[10px] text-muted-foreground/70 font-semibold uppercase" }, day))), /* @__PURE__ */ React17__default.createElement("div", { className: "grid grid-cols-7 gap-y-1 text-center" }, days.map((day) => {
|
|
1858
1858
|
const isSelected = isSameDay(day, currentDate);
|
|
1859
1859
|
const isCurrentMonth = isSameMonth(day, viewDate);
|
|
1860
1860
|
const isTodayDate = isToday(day);
|
|
1861
|
-
return /* @__PURE__ */
|
|
1861
|
+
return /* @__PURE__ */ React17__default.createElement(
|
|
1862
1862
|
"button",
|
|
1863
1863
|
{
|
|
1864
1864
|
key: day.toISOString(),
|
|
@@ -1940,7 +1940,7 @@ var Sidebar = ({
|
|
|
1940
1940
|
];
|
|
1941
1941
|
const formatTzLabel = (tz, showTime = true) => {
|
|
1942
1942
|
if (!hasMounted || !now || !showTime) {
|
|
1943
|
-
return /* @__PURE__ */
|
|
1943
|
+
return /* @__PURE__ */ React17__default.createElement("span", null, tz.label);
|
|
1944
1944
|
}
|
|
1945
1945
|
let time = "";
|
|
1946
1946
|
let acronym = tz.acronym;
|
|
@@ -1960,29 +1960,29 @@ var Sidebar = ({
|
|
|
1960
1960
|
}
|
|
1961
1961
|
}
|
|
1962
1962
|
} catch (e) {
|
|
1963
|
-
return /* @__PURE__ */
|
|
1963
|
+
return /* @__PURE__ */ React17__default.createElement("span", null, tz.label);
|
|
1964
1964
|
}
|
|
1965
|
-
return /* @__PURE__ */
|
|
1965
|
+
return /* @__PURE__ */ React17__default.createElement("div", { className: "flex justify-between w-full" }, /* @__PURE__ */ React17__default.createElement("span", null, tz.label), /* @__PURE__ */ React17__default.createElement("span", { className: "text-muted-foreground ml-2 tabular-nums" }, time, " ", /* @__PURE__ */ React17__default.createElement("span", { className: "text-xs opacity-75" }, "(", acronym, ")")));
|
|
1966
1966
|
};
|
|
1967
1967
|
const selectedTzObj = timezones.find((t) => t.value === (timezone || ""));
|
|
1968
1968
|
const selectedTimezoneLabel = selectedTzObj ? formatTzLabel(selectedTzObj) : translations?.localTime ?? "Local Time";
|
|
1969
|
-
return /* @__PURE__ */
|
|
1969
|
+
return /* @__PURE__ */ React17__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__ */ React17__default.createElement("div", { className: "px-4 mb-4" }, !menusExpanded && /* @__PURE__ */ React17__default.createElement(
|
|
1970
1970
|
Button,
|
|
1971
1971
|
{
|
|
1972
1972
|
variant: "outline",
|
|
1973
1973
|
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",
|
|
1974
1974
|
onClick: () => setMenusExpanded(true)
|
|
1975
1975
|
},
|
|
1976
|
-
/* @__PURE__ */
|
|
1977
|
-
/* @__PURE__ */
|
|
1978
|
-
), menusExpanded && /* @__PURE__ */
|
|
1976
|
+
/* @__PURE__ */ React17__default.createElement(LayoutGrid, { className: "w-4 h-4" }),
|
|
1977
|
+
/* @__PURE__ */ React17__default.createElement("span", null, translations?.operations ?? "\u0130\u015Flemler")
|
|
1978
|
+
), menusExpanded && /* @__PURE__ */ React17__default.createElement("div", { className: "animate-in fade-in slide-in-from-top-2 duration-200" }, /* @__PURE__ */ React17__default.createElement("div", { className: "flex items-center justify-between mb-2 px-1" }, /* @__PURE__ */ React17__default.createElement("span", { className: "text-xs font-semibold text-muted-foreground uppercase tracking-wider" }, translations?.operations ?? "\u0130\u015Flemler"), /* @__PURE__ */ React17__default.createElement(
|
|
1979
1979
|
"button",
|
|
1980
1980
|
{
|
|
1981
1981
|
onClick: () => setMenusExpanded(false),
|
|
1982
1982
|
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"
|
|
1983
1983
|
},
|
|
1984
|
-
/* @__PURE__ */
|
|
1985
|
-
)), /* @__PURE__ */
|
|
1984
|
+
/* @__PURE__ */ React17__default.createElement(X, { className: "w-3.5 h-3.5" })
|
|
1985
|
+
)), /* @__PURE__ */ React17__default.createElement("nav", { className: "space-y-0.5" }, /* @__PURE__ */ React17__default.createElement(
|
|
1986
1986
|
"button",
|
|
1987
1987
|
{
|
|
1988
1988
|
onClick: () => {
|
|
@@ -1994,10 +1994,10 @@ var Sidebar = ({
|
|
|
1994
1994
|
activeCustomMenu === null ? "bg-primary/10 text-primary" : "text-muted-foreground hover:bg-accent/60 hover:text-foreground"
|
|
1995
1995
|
)
|
|
1996
1996
|
},
|
|
1997
|
-
/* @__PURE__ */
|
|
1998
|
-
/* @__PURE__ */
|
|
1999
|
-
activeCustomMenu === null && /* @__PURE__ */
|
|
2000
|
-
), sidebarMenus?.map((item) => /* @__PURE__ */
|
|
1997
|
+
/* @__PURE__ */ React17__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__ */ React17__default.createElement("rect", { x: "3", y: "4", width: "18", height: "18", rx: "2", ry: "2" }), /* @__PURE__ */ React17__default.createElement("line", { x1: "16", y1: "2", x2: "16", y2: "6" }), /* @__PURE__ */ React17__default.createElement("line", { x1: "8", y1: "2", x2: "8", y2: "6" }), /* @__PURE__ */ React17__default.createElement("line", { x1: "3", y1: "10", x2: "21", y2: "10" })),
|
|
1998
|
+
/* @__PURE__ */ React17__default.createElement("span", null, translations?.calendar ?? "Takvim"),
|
|
1999
|
+
activeCustomMenu === null && /* @__PURE__ */ React17__default.createElement("span", { className: "ml-auto w-1.5 h-1.5 rounded-full bg-primary" })
|
|
2000
|
+
), sidebarMenus?.map((item) => /* @__PURE__ */ React17__default.createElement(
|
|
2001
2001
|
"button",
|
|
2002
2002
|
{
|
|
2003
2003
|
key: item.id,
|
|
@@ -2010,10 +2010,10 @@ var Sidebar = ({
|
|
|
2010
2010
|
activeCustomMenu === item.id ? "bg-primary/10 text-primary" : "text-muted-foreground hover:bg-accent/60 hover:text-foreground"
|
|
2011
2011
|
)
|
|
2012
2012
|
},
|
|
2013
|
-
item.icon && /* @__PURE__ */
|
|
2014
|
-
/* @__PURE__ */
|
|
2015
|
-
activeCustomMenu === item.id && /* @__PURE__ */
|
|
2016
|
-
))))), onEventCreate && /* @__PURE__ */
|
|
2013
|
+
item.icon && /* @__PURE__ */ React17__default.createElement("span", { className: "w-4 h-4 shrink-0 flex items-center justify-center" }, item.icon),
|
|
2014
|
+
/* @__PURE__ */ React17__default.createElement("span", { className: "truncate" }, item.label),
|
|
2015
|
+
activeCustomMenu === item.id && /* @__PURE__ */ React17__default.createElement("span", { className: "ml-auto w-1.5 h-1.5 rounded-full bg-primary" })
|
|
2016
|
+
))))), onEventCreate && /* @__PURE__ */ React17__default.createElement("div", { className: "md:hidden px-4 mb-4" }, /* @__PURE__ */ React17__default.createElement(
|
|
2017
2017
|
Button,
|
|
2018
2018
|
{
|
|
2019
2019
|
onClick: () => {
|
|
@@ -2021,9 +2021,9 @@ var Sidebar = ({
|
|
|
2021
2021
|
},
|
|
2022
2022
|
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"
|
|
2023
2023
|
},
|
|
2024
|
-
/* @__PURE__ */
|
|
2025
|
-
/* @__PURE__ */
|
|
2026
|
-
)), onReverseTimeChange && /* @__PURE__ */
|
|
2024
|
+
/* @__PURE__ */ React17__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__ */ React17__default.createElement("path", { d: "M5 12h14" }), /* @__PURE__ */ React17__default.createElement("path", { d: "M12 5v14" })),
|
|
2025
|
+
/* @__PURE__ */ React17__default.createElement("span", null, translations?.createEvent ?? "Etkinlik Olu\u015Ftur")
|
|
2026
|
+
)), onReverseTimeChange && /* @__PURE__ */ React17__default.createElement("div", { className: "px-4 mb-4" }, /* @__PURE__ */ React17__default.createElement(
|
|
2027
2027
|
"button",
|
|
2028
2028
|
{
|
|
2029
2029
|
onClick: () => onReverseTimeChange(!reverseTime),
|
|
@@ -2032,33 +2032,33 @@ var Sidebar = ({
|
|
|
2032
2032
|
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"
|
|
2033
2033
|
)
|
|
2034
2034
|
},
|
|
2035
|
-
/* @__PURE__ */
|
|
2036
|
-
/* @__PURE__ */
|
|
2035
|
+
/* @__PURE__ */ React17__default.createElement("div", { className: "flex items-center gap-2.5" }, /* @__PURE__ */ React17__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__ */ React17__default.createElement("line", { x1: "12", y1: "19", x2: "12", y2: "5" }), /* @__PURE__ */ React17__default.createElement("polyline", { points: "5 12 12 5 19 12" }), /* @__PURE__ */ React17__default.createElement("line", { x1: "12", y1: "5", x2: "12", y2: "19", className: "opacity-40" }), /* @__PURE__ */ React17__default.createElement("polyline", { points: "5 12 12 19 19 12", className: "opacity-40" })), /* @__PURE__ */ React17__default.createElement("div", { className: "text-left" }, /* @__PURE__ */ React17__default.createElement("div", { className: "text-xs font-semibold leading-tight" }, translations?.reverseTimeLabel ?? "Saat Y\xF6n\xFC"), /* @__PURE__ */ React17__default.createElement("div", { className: "text-[10px] leading-tight opacity-70 mt-0.5" }, reverseTime ? "23:00 \u2192 00:00" : "00:00 \u2192 23:00"))),
|
|
2036
|
+
/* @__PURE__ */ React17__default.createElement("div", { className: cn(
|
|
2037
2037
|
"relative w-9 h-5 rounded-full transition-colors duration-200 shrink-0",
|
|
2038
2038
|
reverseTime ? "bg-primary" : "bg-border"
|
|
2039
|
-
) }, /* @__PURE__ */
|
|
2039
|
+
) }, /* @__PURE__ */ React17__default.createElement("span", { className: cn(
|
|
2040
2040
|
"absolute top-0.5 w-4 h-4 bg-white rounded-full shadow-sm transition-all duration-200",
|
|
2041
2041
|
reverseTime ? "left-4" : "left-0.5"
|
|
2042
2042
|
) }))
|
|
2043
2043
|
)), renderMiniCalendar ? (
|
|
2044
2044
|
// Custom mini-calendar: receives the same props as the built-in one
|
|
2045
2045
|
renderMiniCalendar({ currentDate, onDateChange, onViewChange })
|
|
2046
|
-
) : /* @__PURE__ */
|
|
2046
|
+
) : /* @__PURE__ */ React17__default.createElement(MiniCalendar, { currentDate, onDateChange, onViewChange, locale }), /* @__PURE__ */ React17__default.createElement("div", { className: "flex-1 px-4 space-y-5 mt-5" }, /* @__PURE__ */ React17__default.createElement("div", { className: "bg-muted/20 rounded-2xl p-3 border-[0px] border-border/30" }, /* @__PURE__ */ React17__default.createElement(
|
|
2047
2047
|
"div",
|
|
2048
2048
|
{
|
|
2049
2049
|
className: "flex items-center justify-between cursor-pointer hover:bg-accent/50 p-2 -m-1 rounded-xl mb-2 transition-all duration-200",
|
|
2050
2050
|
onClick: () => setCalendarsOpen(!calendarsOpen)
|
|
2051
2051
|
},
|
|
2052
|
-
/* @__PURE__ */
|
|
2053
|
-
/* @__PURE__ */
|
|
2054
|
-
), calendarsOpen && /* @__PURE__ */
|
|
2052
|
+
/* @__PURE__ */ React17__default.createElement("span", { className: "text-sm font-semibold text-foreground" }, translations?.calendars),
|
|
2053
|
+
/* @__PURE__ */ React17__default.createElement(ChevronDown, { className: cn("w-4 h-4 text-muted-foreground transition-transform duration-200", calendarsOpen && "rotate-180") })
|
|
2054
|
+
), calendarsOpen && /* @__PURE__ */ React17__default.createElement("div", { className: "space-y-1" }, displayCalendars.map((cal) => /* @__PURE__ */ React17__default.createElement(
|
|
2055
2055
|
"div",
|
|
2056
2056
|
{
|
|
2057
2057
|
key: cal.id,
|
|
2058
2058
|
className: "flex items-center gap-3 py-2 px-2 hover:bg-accent/60 rounded-xl cursor-pointer group transition-all duration-200",
|
|
2059
2059
|
onClick: () => onCalendarToggle?.(cal.id, !(cal.active ?? true))
|
|
2060
2060
|
},
|
|
2061
|
-
/* @__PURE__ */
|
|
2061
|
+
/* @__PURE__ */ React17__default.createElement("div", { className: "relative flex items-center justify-center" }, /* @__PURE__ */ React17__default.createElement(
|
|
2062
2062
|
"input",
|
|
2063
2063
|
{
|
|
2064
2064
|
type: "checkbox",
|
|
@@ -2071,7 +2071,7 @@ var Sidebar = ({
|
|
|
2071
2071
|
style: { "--primary-color": cal.color },
|
|
2072
2072
|
"data-cal-id": cal.id
|
|
2073
2073
|
}
|
|
2074
|
-
), /* @__PURE__ */
|
|
2074
|
+
), /* @__PURE__ */ React17__default.createElement("div", { className: "absolute inset-0 flex items-center justify-center pointer-events-none opacity-0 peer-checked:opacity-100 transition-opacity" }, /* @__PURE__ */ React17__default.createElement("svg", { className: "w-3.5 h-3.5 text-white", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 3 }, /* @__PURE__ */ React17__default.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M5 13l4 4L19 7" }))), /* @__PURE__ */ React17__default.createElement("style", null, `
|
|
2075
2075
|
input[type="checkbox"][data-cal-id="${cal.id}"]:checked {
|
|
2076
2076
|
background-color: ${cal.color} !important;
|
|
2077
2077
|
border-color: ${cal.color} !important;
|
|
@@ -2080,23 +2080,23 @@ var Sidebar = ({
|
|
|
2080
2080
|
--tw-ring-color: ${cal.color}40 !important;
|
|
2081
2081
|
}
|
|
2082
2082
|
`)),
|
|
2083
|
-
/* @__PURE__ */
|
|
2084
|
-
/* @__PURE__ */
|
|
2083
|
+
/* @__PURE__ */ React17__default.createElement("div", { className: "flex items-center gap-2 flex-1 min-w-0" }, /* @__PURE__ */ React17__default.createElement("span", { className: "text-sm text-foreground/90 truncate font-medium" }, cal.label)),
|
|
2084
|
+
/* @__PURE__ */ React17__default.createElement(
|
|
2085
2085
|
"div",
|
|
2086
2086
|
{
|
|
2087
2087
|
className: "w-2 h-2 rounded-full opacity-60 group-hover:opacity-100 transition-opacity",
|
|
2088
2088
|
style: { backgroundColor: cal.color }
|
|
2089
2089
|
}
|
|
2090
2090
|
)
|
|
2091
|
-
))))), /* @__PURE__ */
|
|
2091
|
+
))))), /* @__PURE__ */ React17__default.createElement("div", { className: "mt-auto px-4 pt-5" }, /* @__PURE__ */ React17__default.createElement("div", { className: "bg-muted/20 rounded-2xl p-3" }, /* @__PURE__ */ React17__default.createElement("div", { className: "flex items-center gap-2 mb-3" }, /* @__PURE__ */ React17__default.createElement("div", { className: "p-1.5 bg-primary/10 rounded-lg" }, /* @__PURE__ */ React17__default.createElement(Globe, { className: "w-4 h-4 text-primary" })), /* @__PURE__ */ React17__default.createElement("span", { className: "text-sm font-semibold text-foreground" }, translations?.timezone)), /* @__PURE__ */ React17__default.createElement("div", { className: "relative" }, /* @__PURE__ */ React17__default.createElement(
|
|
2092
2092
|
"button",
|
|
2093
2093
|
{
|
|
2094
2094
|
onClick: () => setTimezoneOpen(!timezoneOpen),
|
|
2095
2095
|
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"
|
|
2096
2096
|
},
|
|
2097
|
-
/* @__PURE__ */
|
|
2098
|
-
/* @__PURE__ */
|
|
2099
|
-
), timezoneOpen && /* @__PURE__ */
|
|
2097
|
+
/* @__PURE__ */ React17__default.createElement("div", { className: "flex-1 truncate mr-2 font-medium" }, selectedTimezoneLabel),
|
|
2098
|
+
/* @__PURE__ */ React17__default.createElement(ChevronDown, { className: cn("w-4 h-4 text-muted-foreground transition-transform duration-200", timezoneOpen && "rotate-180") })
|
|
2099
|
+
), timezoneOpen && /* @__PURE__ */ React17__default.createElement(React17__default.Fragment, null, /* @__PURE__ */ React17__default.createElement("div", { className: "fixed inset-0 z-40", onClick: () => setTimezoneOpen(false) }), /* @__PURE__ */ React17__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__ */ React17__default.createElement(
|
|
2100
2100
|
"div",
|
|
2101
2101
|
{
|
|
2102
2102
|
key: tz.value,
|
|
@@ -2129,7 +2129,7 @@ var DraggableEvent = ({ event, children, className, style: propStyle, ...props }
|
|
|
2129
2129
|
opacity: isDragging ? 0 : propStyle?.opacity
|
|
2130
2130
|
// Hiding original element completely
|
|
2131
2131
|
};
|
|
2132
|
-
return /* @__PURE__ */
|
|
2132
|
+
return /* @__PURE__ */ React17__default.createElement(
|
|
2133
2133
|
"div",
|
|
2134
2134
|
{
|
|
2135
2135
|
ref: setNodeRef,
|
|
@@ -2150,7 +2150,7 @@ var DroppableCell = ({ id, date, resourceId, children, className, style, onClick
|
|
|
2150
2150
|
const minutes = date.getMinutes();
|
|
2151
2151
|
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";
|
|
2152
2152
|
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";
|
|
2153
|
-
return /* @__PURE__ */
|
|
2153
|
+
return /* @__PURE__ */ React17__default.createElement(
|
|
2154
2154
|
"div",
|
|
2155
2155
|
{
|
|
2156
2156
|
ref: setNodeRef,
|
|
@@ -2167,7 +2167,7 @@ var DroppableCell = ({ id, date, resourceId, children, className, style, onClick
|
|
|
2167
2167
|
};
|
|
2168
2168
|
|
|
2169
2169
|
// src/views/MonthView.tsx
|
|
2170
|
-
var EventItem =
|
|
2170
|
+
var EventItem = React17__default.memo(({ event, onEventClick }) => /* @__PURE__ */ React17__default.createElement(DraggableEvent, { event }, /* @__PURE__ */ React17__default.createElement(
|
|
2171
2171
|
"div",
|
|
2172
2172
|
{
|
|
2173
2173
|
className: cn(
|
|
@@ -2185,7 +2185,7 @@ var EventItem = React15__default.memo(({ event, onEventClick }) => /* @__PURE__
|
|
|
2185
2185
|
onEventClick?.(event);
|
|
2186
2186
|
}
|
|
2187
2187
|
},
|
|
2188
|
-
/* @__PURE__ */
|
|
2188
|
+
/* @__PURE__ */ React17__default.createElement("span", { className: "font-medium" }, event.title)
|
|
2189
2189
|
)));
|
|
2190
2190
|
EventItem.displayName = "EventItem";
|
|
2191
2191
|
var MonthView = ({
|
|
@@ -2217,19 +2217,19 @@ var MonthView = ({
|
|
|
2217
2217
|
});
|
|
2218
2218
|
return map;
|
|
2219
2219
|
}, [events, getZonedDate]);
|
|
2220
|
-
return /* @__PURE__ */
|
|
2220
|
+
return /* @__PURE__ */ React17__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__ */ React17__default.createElement("div", { className: "overflow-y-auto flex-1 min-h-0 relative" }, /* @__PURE__ */ React17__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__ */ React17__default.createElement(
|
|
2221
2221
|
"div",
|
|
2222
2222
|
{
|
|
2223
2223
|
key: day.toISOString(),
|
|
2224
2224
|
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"
|
|
2225
2225
|
},
|
|
2226
2226
|
format(day, "EEE", { locale })
|
|
2227
|
-
))), /* @__PURE__ */
|
|
2227
|
+
))), /* @__PURE__ */ React17__default.createElement("div", { className: "grid grid-cols-7", style: { gridAutoRows: "130px" } }, days.map((day) => {
|
|
2228
2228
|
const dayKey = format(day, "yyyy-MM-dd");
|
|
2229
2229
|
const dayEvents = eventsByDay.get(dayKey) || [];
|
|
2230
2230
|
const isCurrentMonth = isSameMonth(day, currentDate);
|
|
2231
2231
|
const cellId = day.toISOString();
|
|
2232
|
-
return /* @__PURE__ */
|
|
2232
|
+
return /* @__PURE__ */ React17__default.createElement(
|
|
2233
2233
|
DroppableCell,
|
|
2234
2234
|
{
|
|
2235
2235
|
key: cellId,
|
|
@@ -2242,11 +2242,11 @@ var MonthView = ({
|
|
|
2242
2242
|
),
|
|
2243
2243
|
onClick: () => onDateClick?.(day)
|
|
2244
2244
|
},
|
|
2245
|
-
/* @__PURE__ */
|
|
2245
|
+
/* @__PURE__ */ React17__default.createElement("div", { className: "flex justify-between items-start" }, /* @__PURE__ */ React17__default.createElement("div", { className: cn(
|
|
2246
2246
|
"text-sm font-semibold w-7 h-7 flex items-center justify-center rounded-full transition-all duration-200",
|
|
2247
2247
|
isToday(day) ? "bg-primary text-primary-foreground shadow-md shadow-primary/30" : "group-hover:bg-accent"
|
|
2248
|
-
) }, format(day, "d", { locale })), dayEvents.length > 0 && /* @__PURE__ */
|
|
2249
|
-
/* @__PURE__ */
|
|
2248
|
+
) }, format(day, "d", { locale })), dayEvents.length > 0 && /* @__PURE__ */ React17__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)),
|
|
2249
|
+
/* @__PURE__ */ React17__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__ */ React17__default.createElement(EventItem, { key: `${event.id}-${dayKey}`, event, onEventClick })), dayEvents.length > 4 && /* @__PURE__ */ React17__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"))
|
|
2250
2250
|
);
|
|
2251
2251
|
}))));
|
|
2252
2252
|
};
|
|
@@ -2307,7 +2307,7 @@ var ResizableEvent = ({
|
|
|
2307
2307
|
document.addEventListener("touchmove", handleMove, { passive: false });
|
|
2308
2308
|
document.addEventListener("touchend", handleEnd);
|
|
2309
2309
|
}, [event, hourHeight, minDuration, onResize, resizeHeight]);
|
|
2310
|
-
return /* @__PURE__ */
|
|
2310
|
+
return /* @__PURE__ */ React17__default.createElement(
|
|
2311
2311
|
"div",
|
|
2312
2312
|
{
|
|
2313
2313
|
ref: containerRef,
|
|
@@ -2318,7 +2318,7 @@ var ResizableEvent = ({
|
|
|
2318
2318
|
}
|
|
2319
2319
|
},
|
|
2320
2320
|
children,
|
|
2321
|
-
/* @__PURE__ */
|
|
2321
|
+
/* @__PURE__ */ React17__default.createElement(
|
|
2322
2322
|
"div",
|
|
2323
2323
|
{
|
|
2324
2324
|
className: cn(
|
|
@@ -2330,14 +2330,122 @@ var ResizableEvent = ({
|
|
|
2330
2330
|
onMouseDown: readonly ? void 0 : handleResizeStart,
|
|
2331
2331
|
onTouchStart: readonly ? void 0 : handleResizeStart
|
|
2332
2332
|
},
|
|
2333
|
-
/* @__PURE__ */
|
|
2333
|
+
/* @__PURE__ */ React17__default.createElement("div", { className: cn(
|
|
2334
2334
|
"w-8 h-1 rounded-full transition-all",
|
|
2335
2335
|
isResizing ? "bg-primary" : "bg-muted-foreground/30 group-hover:bg-primary/50"
|
|
2336
2336
|
) })
|
|
2337
2337
|
),
|
|
2338
|
-
isResizing && /* @__PURE__ */
|
|
2338
|
+
isResizing && /* @__PURE__ */ React17__default.createElement("div", { className: "absolute inset-0 border-2 border-primary border-dashed rounded-md pointer-events-none bg-primary/5" })
|
|
2339
2339
|
);
|
|
2340
2340
|
};
|
|
2341
|
+
var EventCardBadge = ({
|
|
2342
|
+
badge,
|
|
2343
|
+
compact = false,
|
|
2344
|
+
className
|
|
2345
|
+
}) => {
|
|
2346
|
+
if (!badge?.icon || !badge?.name) return null;
|
|
2347
|
+
return /* @__PURE__ */ React17__default.createElement(
|
|
2348
|
+
"div",
|
|
2349
|
+
{
|
|
2350
|
+
className: cn(
|
|
2351
|
+
// Pin to the card's top-left corner above content
|
|
2352
|
+
"absolute top-0 left-0 z-10 flex items-center gap-0.5 max-w-[calc(100%-4px)]",
|
|
2353
|
+
"rounded-br-md bg-background/85 backdrop-blur-sm border-b border-r border-border/40",
|
|
2354
|
+
"px-1 py-0.5 text-[9px] font-semibold leading-none text-foreground/80",
|
|
2355
|
+
"pointer-events-none select-none",
|
|
2356
|
+
className
|
|
2357
|
+
),
|
|
2358
|
+
title: badge.name
|
|
2359
|
+
},
|
|
2360
|
+
/* @__PURE__ */ React17__default.createElement("span", { className: "shrink-0 flex items-center justify-center [&>svg]:w-2.5 [&>svg]:h-2.5" }, badge.icon),
|
|
2361
|
+
!compact && /* @__PURE__ */ React17__default.createElement("span", { className: "truncate max-w-[72px]" }, badge.name)
|
|
2362
|
+
);
|
|
2363
|
+
};
|
|
2364
|
+
var ICON_CLASS = "w-2.5 h-2.5";
|
|
2365
|
+
var EVENT_BADGE_ICONS = {
|
|
2366
|
+
privateLesson: /* @__PURE__ */ React17__default.createElement(User, { className: ICON_CLASS }),
|
|
2367
|
+
groupLesson: /* @__PURE__ */ React17__default.createElement(Users, { className: ICON_CLASS }),
|
|
2368
|
+
packageLesson: /* @__PURE__ */ React17__default.createElement(Package, { className: ICON_CLASS }),
|
|
2369
|
+
online: /* @__PURE__ */ React17__default.createElement(Video, { className: ICON_CLASS }),
|
|
2370
|
+
inPerson: /* @__PURE__ */ React17__default.createElement(MapPin, { className: ICON_CLASS }),
|
|
2371
|
+
homeVisit: /* @__PURE__ */ React17__default.createElement(Home, { className: ICON_CLASS }),
|
|
2372
|
+
trial: /* @__PURE__ */ React17__default.createElement(Sparkles, { className: ICON_CLASS }),
|
|
2373
|
+
makeup: /* @__PURE__ */ React17__default.createElement(RefreshCw, { className: ICON_CLASS }),
|
|
2374
|
+
exam: /* @__PURE__ */ React17__default.createElement(ClipboardCheck, { className: ICON_CLASS }),
|
|
2375
|
+
workshop: /* @__PURE__ */ React17__default.createElement(Presentation, { className: ICON_CLASS }),
|
|
2376
|
+
priority: /* @__PURE__ */ React17__default.createElement(Star, { className: ICON_CLASS }),
|
|
2377
|
+
holiday: /* @__PURE__ */ React17__default.createElement(PartyPopper, { className: ICON_CLASS }),
|
|
2378
|
+
cancelled: /* @__PURE__ */ React17__default.createElement(Ban, { className: ICON_CLASS }),
|
|
2379
|
+
listening: /* @__PURE__ */ React17__default.createElement(Headphones, { className: ICON_CLASS })
|
|
2380
|
+
};
|
|
2381
|
+
var EVENT_BADGE_LABELS = {
|
|
2382
|
+
tr: {
|
|
2383
|
+
privateLesson: "\xD6zel Ders",
|
|
2384
|
+
groupLesson: "Grup Ders",
|
|
2385
|
+
packageLesson: "Paket Ders",
|
|
2386
|
+
online: "Online",
|
|
2387
|
+
inPerson: "Y\xFCz Y\xFCze",
|
|
2388
|
+
homeVisit: "Evde",
|
|
2389
|
+
trial: "Deneme",
|
|
2390
|
+
makeup: "Telafi",
|
|
2391
|
+
exam: "S\u0131nav",
|
|
2392
|
+
workshop: "Workshop",
|
|
2393
|
+
priority: "\xD6ncelikli",
|
|
2394
|
+
holiday: "Tatil",
|
|
2395
|
+
cancelled: "\u0130ptal",
|
|
2396
|
+
listening: "Dinleme"
|
|
2397
|
+
},
|
|
2398
|
+
en: {
|
|
2399
|
+
privateLesson: "Private",
|
|
2400
|
+
groupLesson: "Group",
|
|
2401
|
+
packageLesson: "Package",
|
|
2402
|
+
online: "Online",
|
|
2403
|
+
inPerson: "In Person",
|
|
2404
|
+
homeVisit: "At Home",
|
|
2405
|
+
trial: "Trial",
|
|
2406
|
+
makeup: "Makeup",
|
|
2407
|
+
exam: "Exam",
|
|
2408
|
+
workshop: "Workshop",
|
|
2409
|
+
priority: "Priority",
|
|
2410
|
+
holiday: "Holiday",
|
|
2411
|
+
cancelled: "Cancelled",
|
|
2412
|
+
listening: "Listening"
|
|
2413
|
+
}
|
|
2414
|
+
};
|
|
2415
|
+
var resolveLabelLang = (language) => language === "tr" ? "tr" : "en";
|
|
2416
|
+
function isBuiltInEventBadgeId(id) {
|
|
2417
|
+
return Object.prototype.hasOwnProperty.call(EVENT_BADGE_ICONS, id);
|
|
2418
|
+
}
|
|
2419
|
+
function getEventBadge(id, language = "tr", name) {
|
|
2420
|
+
const lang = resolveLabelLang(language);
|
|
2421
|
+
return {
|
|
2422
|
+
icon: EVENT_BADGE_ICONS[id],
|
|
2423
|
+
name: name ?? EVENT_BADGE_LABELS[lang][id]
|
|
2424
|
+
};
|
|
2425
|
+
}
|
|
2426
|
+
function resolveEventBadge(event, language = "tr") {
|
|
2427
|
+
if (event.badge?.icon && event.badge?.name) return event.badge;
|
|
2428
|
+
if (event.badgeId && isBuiltInEventBadgeId(event.badgeId)) {
|
|
2429
|
+
return getEventBadge(event.badgeId, language);
|
|
2430
|
+
}
|
|
2431
|
+
return void 0;
|
|
2432
|
+
}
|
|
2433
|
+
var EVENT_BADGES = {
|
|
2434
|
+
privateLesson: getEventBadge("privateLesson", "tr"),
|
|
2435
|
+
groupLesson: getEventBadge("groupLesson", "tr"),
|
|
2436
|
+
packageLesson: getEventBadge("packageLesson", "tr"),
|
|
2437
|
+
online: getEventBadge("online", "tr"),
|
|
2438
|
+
inPerson: getEventBadge("inPerson", "tr"),
|
|
2439
|
+
homeVisit: getEventBadge("homeVisit", "tr"),
|
|
2440
|
+
trial: getEventBadge("trial", "tr"),
|
|
2441
|
+
makeup: getEventBadge("makeup", "tr"),
|
|
2442
|
+
exam: getEventBadge("exam", "tr"),
|
|
2443
|
+
workshop: getEventBadge("workshop", "tr"),
|
|
2444
|
+
priority: getEventBadge("priority", "tr"),
|
|
2445
|
+
holiday: getEventBadge("holiday", "tr"),
|
|
2446
|
+
cancelled: getEventBadge("cancelled", "tr"),
|
|
2447
|
+
listening: getEventBadge("listening", "tr")
|
|
2448
|
+
};
|
|
2341
2449
|
|
|
2342
2450
|
// src/views/WeekView.tsx
|
|
2343
2451
|
var WeekView = ({
|
|
@@ -2358,13 +2466,13 @@ var WeekView = ({
|
|
|
2358
2466
|
const weekDays = eachDayOfInterval({ start, end });
|
|
2359
2467
|
const hours = reverseTime ? Array.from({ length: 24 }, (_, i) => 23 - i) : Array.from({ length: 24 }, (_, i) => i);
|
|
2360
2468
|
const hourHeight = 60;
|
|
2361
|
-
const scrollContainerRef =
|
|
2362
|
-
const [now, setNow] =
|
|
2363
|
-
|
|
2469
|
+
const scrollContainerRef = React17__default.useRef(null);
|
|
2470
|
+
const [now, setNow] = React17__default.useState(/* @__PURE__ */ new Date());
|
|
2471
|
+
React17__default.useEffect(() => {
|
|
2364
2472
|
const interval = setInterval(() => setNow(/* @__PURE__ */ new Date()), 6e4);
|
|
2365
2473
|
return () => clearInterval(interval);
|
|
2366
2474
|
}, []);
|
|
2367
|
-
|
|
2475
|
+
React17__default.useEffect(() => {
|
|
2368
2476
|
if (scrollContainerRef.current) {
|
|
2369
2477
|
scrollContainerRef.current.scrollTop = reverseTime ? (23 - initialScrollHour) * hourHeight : initialScrollHour * hourHeight;
|
|
2370
2478
|
}
|
|
@@ -2394,44 +2502,44 @@ var WeekView = ({
|
|
|
2394
2502
|
acronym = tz;
|
|
2395
2503
|
}
|
|
2396
2504
|
}
|
|
2397
|
-
return /* @__PURE__ */
|
|
2505
|
+
return /* @__PURE__ */ React17__default.createElement("div", { className: "flex flex-col items-center justify-center leading-tight" }, /* @__PURE__ */ React17__default.createElement("span", null, displayTime), /* @__PURE__ */ React17__default.createElement("span", { className: "text-[10px] opacity-75" }, "(", acronym, ")"));
|
|
2398
2506
|
};
|
|
2399
2507
|
const timeFormat = getTimeFormat(language);
|
|
2400
2508
|
const eventTimeFormat = getTimeFormatFull(language);
|
|
2401
2509
|
const nowFormat = getTimeFormatFull(language);
|
|
2402
|
-
return /* @__PURE__ */
|
|
2510
|
+
return /* @__PURE__ */ React17__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__ */ React17__default.createElement(
|
|
2403
2511
|
"div",
|
|
2404
2512
|
{
|
|
2405
2513
|
ref: scrollContainerRef,
|
|
2406
2514
|
className: "flex-1 min-h-0 overflow-y-auto scrollbar-hide relative bg-background scroll-smooth",
|
|
2407
2515
|
style: { scrollbarGutter: "stable" }
|
|
2408
2516
|
},
|
|
2409
|
-
/* @__PURE__ */
|
|
2517
|
+
/* @__PURE__ */ React17__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__ */ React17__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__ */ React17__default.createElement("div", { className: "flex-1 grid grid-cols-7" }, weekDays.map((day, index) => /* @__PURE__ */ React17__default.createElement("div", { key: day.toISOString(), className: cn("py-3 px-2 text-center", index > 0 && "border-l-[0.5px] border-border/30") }, /* @__PURE__ */ React17__default.createElement("div", { className: "text-[10px] font-semibold text-muted-foreground uppercase tracking-wider mb-1.5" }, format(day, "EEE", { locale })), /* @__PURE__ */ React17__default.createElement("div", { className: cn(
|
|
2410
2518
|
"w-9 h-9 flex items-center justify-center rounded-xl mx-auto text-sm font-semibold transition-all duration-200",
|
|
2411
2519
|
isToday(day) ? "bg-primary text-primary-foreground shadow-lg shadow-primary/30 scale-110" : "text-foreground hover:bg-accent/80"
|
|
2412
2520
|
) }, format(day, "d", { locale })))))),
|
|
2413
|
-
/* @__PURE__ */
|
|
2521
|
+
/* @__PURE__ */ React17__default.createElement(
|
|
2414
2522
|
"div",
|
|
2415
2523
|
{
|
|
2416
2524
|
className: "flex min-w-full relative",
|
|
2417
2525
|
style: { height: hours.length * hourHeight }
|
|
2418
2526
|
},
|
|
2419
|
-
/* @__PURE__ */
|
|
2527
|
+
/* @__PURE__ */ React17__default.createElement("div", { className: "flex-none w-16 border-r-[0.5px] border-border/30 relative bg-muted/5" }, hours.map((hour) => /* @__PURE__ */ React17__default.createElement(
|
|
2420
2528
|
"div",
|
|
2421
2529
|
{
|
|
2422
2530
|
key: hour,
|
|
2423
2531
|
className: "relative w-full text-[11px] text-muted-foreground/80 text-right pr-3 font-medium tabular-nums box-border",
|
|
2424
2532
|
style: { height: hourHeight }
|
|
2425
2533
|
},
|
|
2426
|
-
/* @__PURE__ */
|
|
2534
|
+
/* @__PURE__ */ React17__default.createElement("span", { className: "block -translate-y-1/2" }, hour !== 0 && format((/* @__PURE__ */ new Date()).setHours(hour, 0, 0, 0), timeFormat, { locale }))
|
|
2427
2535
|
))),
|
|
2428
|
-
/* @__PURE__ */
|
|
2536
|
+
/* @__PURE__ */ React17__default.createElement("div", { className: "flex-1 grid grid-cols-7 relative" }, weekDays.map((day, dayIndex) => {
|
|
2429
2537
|
const dayEvents = events.filter((e) => {
|
|
2430
2538
|
const zonedStart = getZonedDate(e.start);
|
|
2431
2539
|
return isSameDay(zonedStart, day);
|
|
2432
2540
|
});
|
|
2433
|
-
return /* @__PURE__ */
|
|
2434
|
-
return /* @__PURE__ */
|
|
2541
|
+
return /* @__PURE__ */ React17__default.createElement("div", { key: day.toISOString(), className: cn("relative h-full", dayIndex > 0 && "border-l-[0.5px] border-border/30") }, hours.map((hour) => {
|
|
2542
|
+
return /* @__PURE__ */ React17__default.createElement(
|
|
2435
2543
|
"div",
|
|
2436
2544
|
{
|
|
2437
2545
|
key: hour,
|
|
@@ -2442,7 +2550,7 @@ var WeekView = ({
|
|
|
2442
2550
|
const cellDate = new Date(day);
|
|
2443
2551
|
cellDate.setHours(hour, minute, 0, 0);
|
|
2444
2552
|
const cellId = cellDate.toISOString();
|
|
2445
|
-
return /* @__PURE__ */
|
|
2553
|
+
return /* @__PURE__ */ React17__default.createElement(
|
|
2446
2554
|
DroppableCell,
|
|
2447
2555
|
{
|
|
2448
2556
|
key: minute,
|
|
@@ -2454,7 +2562,7 @@ var WeekView = ({
|
|
|
2454
2562
|
top: `${minute / 60 * 100}%`
|
|
2455
2563
|
}
|
|
2456
2564
|
},
|
|
2457
|
-
/* @__PURE__ */
|
|
2565
|
+
/* @__PURE__ */ React17__default.createElement(
|
|
2458
2566
|
"div",
|
|
2459
2567
|
{
|
|
2460
2568
|
className: "w-full h-full bg-transparent cursor-pointer",
|
|
@@ -2488,7 +2596,9 @@ var WeekView = ({
|
|
|
2488
2596
|
const height = durationMinutes / 60 * hourHeight;
|
|
2489
2597
|
const top = reverseTime ? (1440 - startMinutes - durationMinutes) / 60 * hourHeight : startMinutes / 60 * hourHeight;
|
|
2490
2598
|
const isShortEvent = durationMinutes < 60;
|
|
2491
|
-
|
|
2599
|
+
const resolvedBadge = resolveEventBadge(event, language);
|
|
2600
|
+
const hasBadge = Boolean(resolvedBadge);
|
|
2601
|
+
return /* @__PURE__ */ React17__default.createElement(
|
|
2492
2602
|
DraggableEvent,
|
|
2493
2603
|
{
|
|
2494
2604
|
key: `${event.id}-${day.toISOString()}`,
|
|
@@ -2503,7 +2613,7 @@ var WeekView = ({
|
|
|
2503
2613
|
paddingRight: count > 1 ? "2px" : "0"
|
|
2504
2614
|
}
|
|
2505
2615
|
},
|
|
2506
|
-
/* @__PURE__ */
|
|
2616
|
+
/* @__PURE__ */ React17__default.createElement(
|
|
2507
2617
|
ResizableEvent,
|
|
2508
2618
|
{
|
|
2509
2619
|
readonly,
|
|
@@ -2513,7 +2623,7 @@ var WeekView = ({
|
|
|
2513
2623
|
className: "h-full",
|
|
2514
2624
|
style: { height: "100%" }
|
|
2515
2625
|
},
|
|
2516
|
-
/* @__PURE__ */
|
|
2626
|
+
/* @__PURE__ */ React17__default.createElement(
|
|
2517
2627
|
"div",
|
|
2518
2628
|
{
|
|
2519
2629
|
className: cn(
|
|
@@ -2522,6 +2632,8 @@ var WeekView = ({
|
|
|
2522
2632
|
readonly ? "cursor-default" : "cursor-grab active:cursor-grabbing",
|
|
2523
2633
|
!event.color && "border-primary/20 bg-primary/10",
|
|
2524
2634
|
isShortEvent ? "px-1 flex items-center justify-center" : "p-2",
|
|
2635
|
+
// Reserve space under the badge so title/time do not overlap
|
|
2636
|
+
hasBadge && !isShortEvent && "pt-4",
|
|
2525
2637
|
// Add active border for overlapped events to distinguish them
|
|
2526
2638
|
count > 1 && "border-l-4 border-l-primary/50"
|
|
2527
2639
|
),
|
|
@@ -2538,14 +2650,21 @@ var WeekView = ({
|
|
|
2538
2650
|
},
|
|
2539
2651
|
title: count > 1 ? `${event.title} (${index + 1}/${count})` : void 0
|
|
2540
2652
|
},
|
|
2541
|
-
|
|
2653
|
+
resolvedBadge && /* @__PURE__ */ React17__default.createElement(
|
|
2654
|
+
EventCardBadge,
|
|
2655
|
+
{
|
|
2656
|
+
badge: resolvedBadge,
|
|
2657
|
+
compact: isShortEvent
|
|
2658
|
+
}
|
|
2659
|
+
),
|
|
2660
|
+
/* @__PURE__ */ React17__default.createElement("div", { className: "flex flex-col h-full overflow-hidden w-full" }, /* @__PURE__ */ React17__default.createElement("div", { className: cn(
|
|
2542
2661
|
"font-semibold truncate text-foreground/90 leading-tight",
|
|
2543
2662
|
isShortEvent ? "text-xs text-center" : "text-xs"
|
|
2544
|
-
) }, event.title), !isShortEvent && /* @__PURE__ */
|
|
2663
|
+
) }, event.title), !isShortEvent && /* @__PURE__ */ React17__default.createElement(React17__default.Fragment, null, /* @__PURE__ */ React17__default.createElement("div", { className: "text-[10px] text-muted-foreground truncate mt-0.5 font-medium leading-tight" }, format(zonedEventStart, eventTimeFormat, { locale }), " - ", format(zonedEventEnd, eventTimeFormat, { locale })), event.description && height > 50 && /* @__PURE__ */ React17__default.createElement("div", { className: "text-[10px] text-muted-foreground/80 truncate mt-1 leading-tight opacity-80" }, event.description)), count > 1 && !isShortEvent && /* @__PURE__ */ React17__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))
|
|
2545
2664
|
)
|
|
2546
2665
|
)
|
|
2547
2666
|
);
|
|
2548
|
-
}), isToday(day) && /* @__PURE__ */
|
|
2667
|
+
}), isToday(day) && /* @__PURE__ */ React17__default.createElement(
|
|
2549
2668
|
"div",
|
|
2550
2669
|
{
|
|
2551
2670
|
className: "absolute left-0 right-0 z-20 pointer-events-none flex items-center",
|
|
@@ -2553,12 +2672,12 @@ var WeekView = ({
|
|
|
2553
2672
|
top: reverseTime ? `${(1440 - (zonedNow.getHours() * 60 + zonedNow.getMinutes())) / 60 * hourHeight}px` : `${(zonedNow.getHours() * 60 + zonedNow.getMinutes()) / 60 * hourHeight}px`
|
|
2554
2673
|
}
|
|
2555
2674
|
},
|
|
2556
|
-
/* @__PURE__ */
|
|
2557
|
-
/* @__PURE__ */
|
|
2675
|
+
/* @__PURE__ */ React17__default.createElement("div", { className: "h-[2px] w-full bg-gradient-to-r from-primary via-primary to-primary/50" }),
|
|
2676
|
+
/* @__PURE__ */ React17__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" })
|
|
2558
2677
|
));
|
|
2559
2678
|
}))
|
|
2560
2679
|
),
|
|
2561
|
-
/* @__PURE__ */
|
|
2680
|
+
/* @__PURE__ */ React17__default.createElement(
|
|
2562
2681
|
"div",
|
|
2563
2682
|
{
|
|
2564
2683
|
className: "absolute left-0 w-16 pointer-events-none z-30 flex justify-end pr-2",
|
|
@@ -2566,7 +2685,7 @@ var WeekView = ({
|
|
|
2566
2685
|
top: reverseTime ? `${(1440 - (zonedNow.getHours() * 60 + zonedNow.getMinutes())) / 60 * hourHeight + 80}px` : `${(zonedNow.getHours() * 60 + zonedNow.getMinutes()) / 60 * hourHeight + 80}px`
|
|
2567
2686
|
}
|
|
2568
2687
|
},
|
|
2569
|
-
/* @__PURE__ */
|
|
2688
|
+
/* @__PURE__ */ React17__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" }, format(zonedNow, nowFormat, { locale }))
|
|
2570
2689
|
)
|
|
2571
2690
|
));
|
|
2572
2691
|
};
|
|
@@ -2585,13 +2704,13 @@ var DayView = ({
|
|
|
2585
2704
|
}) => {
|
|
2586
2705
|
const hours = reverseTime ? Array.from({ length: 24 }, (_, i) => 23 - i) : Array.from({ length: 24 }, (_, i) => i);
|
|
2587
2706
|
const hourHeight = 80;
|
|
2588
|
-
const scrollContainerRef =
|
|
2589
|
-
const [now, setNow] =
|
|
2590
|
-
|
|
2707
|
+
const scrollContainerRef = React17__default.useRef(null);
|
|
2708
|
+
const [now, setNow] = React17__default.useState(/* @__PURE__ */ new Date());
|
|
2709
|
+
React17__default.useEffect(() => {
|
|
2591
2710
|
const interval = setInterval(() => setNow(/* @__PURE__ */ new Date()), 6e4);
|
|
2592
2711
|
return () => clearInterval(interval);
|
|
2593
2712
|
}, []);
|
|
2594
|
-
|
|
2713
|
+
React17__default.useEffect(() => {
|
|
2595
2714
|
if (scrollContainerRef.current) {
|
|
2596
2715
|
scrollContainerRef.current.scrollTop = reverseTime ? (23 - initialScrollHour) * hourHeight : initialScrollHour * hourHeight;
|
|
2597
2716
|
}
|
|
@@ -2607,15 +2726,15 @@ var DayView = ({
|
|
|
2607
2726
|
const timeFormat = getTimeFormat(language);
|
|
2608
2727
|
const eventTimeFormat = getTimeFormatFull(language);
|
|
2609
2728
|
const nowFormat = getTimeFormatFull(language);
|
|
2610
|
-
return /* @__PURE__ */
|
|
2729
|
+
return /* @__PURE__ */ React17__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__ */ React17__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__ */ React17__default.createElement("div", { className: "flex items-center justify-center gap-3" }, /* @__PURE__ */ React17__default.createElement("h2", { className: "text-xl font-semibold capitalize text-foreground" }, format(currentDate, "EEEE, MMMM d, yyyy", { locale })), isToday(currentDate) && /* @__PURE__ */ React17__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__ */ React17__default.createElement("div", { ref: scrollContainerRef, className: "flex-1 min-h-0 overflow-y-auto relative" }, /* @__PURE__ */ React17__default.createElement("div", { className: "flex relative", style: { height: hours.length * hourHeight } }, /* @__PURE__ */ React17__default.createElement("div", { className: "w-20 bg-muted/5 border-r-[0.5px] border-border/30 relative" }, hours.map((hour) => /* @__PURE__ */ React17__default.createElement(
|
|
2611
2730
|
"div",
|
|
2612
2731
|
{
|
|
2613
2732
|
key: hour,
|
|
2614
2733
|
className: "relative w-full",
|
|
2615
2734
|
style: { height: hourHeight }
|
|
2616
2735
|
},
|
|
2617
|
-
hour !== 0 && /* @__PURE__ */
|
|
2618
|
-
)), isToday(currentDate) && /* @__PURE__ */
|
|
2736
|
+
hour !== 0 && /* @__PURE__ */ React17__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" }, format((/* @__PURE__ */ new Date()).setHours(hour, 0, 0, 0), timeFormat, { locale }))
|
|
2737
|
+
)), isToday(currentDate) && /* @__PURE__ */ React17__default.createElement(
|
|
2619
2738
|
"div",
|
|
2620
2739
|
{
|
|
2621
2740
|
className: "absolute left-0 w-full pointer-events-none z-30 flex justify-end pr-2",
|
|
@@ -2623,9 +2742,9 @@ var DayView = ({
|
|
|
2623
2742
|
top: reverseTime ? `${(1440 - (zonedNow.getHours() * 60 + zonedNow.getMinutes())) / 60 * hourHeight}px` : `${(zonedNow.getHours() * 60 + zonedNow.getMinutes()) / 60 * hourHeight}px`
|
|
2624
2743
|
}
|
|
2625
2744
|
},
|
|
2626
|
-
/* @__PURE__ */
|
|
2627
|
-
)), /* @__PURE__ */
|
|
2628
|
-
return /* @__PURE__ */
|
|
2745
|
+
/* @__PURE__ */ React17__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" }, format(zonedNow, nowFormat, { locale }))
|
|
2746
|
+
)), /* @__PURE__ */ React17__default.createElement("div", { className: "flex-1 relative" }, hours.map((hour) => {
|
|
2747
|
+
return /* @__PURE__ */ React17__default.createElement(
|
|
2629
2748
|
"div",
|
|
2630
2749
|
{
|
|
2631
2750
|
key: hour,
|
|
@@ -2636,7 +2755,7 @@ var DayView = ({
|
|
|
2636
2755
|
const cellDate = new Date(currentDate);
|
|
2637
2756
|
cellDate.setHours(hour, minute, 0, 0);
|
|
2638
2757
|
const cellId = cellDate.toISOString();
|
|
2639
|
-
return /* @__PURE__ */
|
|
2758
|
+
return /* @__PURE__ */ React17__default.createElement(
|
|
2640
2759
|
DroppableCell,
|
|
2641
2760
|
{
|
|
2642
2761
|
key: minute,
|
|
@@ -2648,7 +2767,7 @@ var DayView = ({
|
|
|
2648
2767
|
top: `${minute / 60 * 100}%`
|
|
2649
2768
|
}
|
|
2650
2769
|
},
|
|
2651
|
-
/* @__PURE__ */
|
|
2770
|
+
/* @__PURE__ */ React17__default.createElement(
|
|
2652
2771
|
"div",
|
|
2653
2772
|
{
|
|
2654
2773
|
className: "h-full w-full bg-transparent cursor-pointer",
|
|
@@ -2681,7 +2800,7 @@ var DayView = ({
|
|
|
2681
2800
|
const height = durationMinutes / 60 * hourHeight;
|
|
2682
2801
|
const top = reverseTime ? (1440 - startMinutes - durationMinutes) / 60 * hourHeight : startMinutes / 60 * hourHeight;
|
|
2683
2802
|
const isShortEvent = durationMinutes < 45;
|
|
2684
|
-
return /* @__PURE__ */
|
|
2803
|
+
return /* @__PURE__ */ React17__default.createElement(
|
|
2685
2804
|
DraggableEvent,
|
|
2686
2805
|
{
|
|
2687
2806
|
key: `${event.id}-${currentDate.toISOString()}`,
|
|
@@ -2695,7 +2814,7 @@ var DayView = ({
|
|
|
2695
2814
|
paddingRight: count > 1 ? "2px" : "0"
|
|
2696
2815
|
}
|
|
2697
2816
|
},
|
|
2698
|
-
/* @__PURE__ */
|
|
2817
|
+
/* @__PURE__ */ React17__default.createElement(
|
|
2699
2818
|
ResizableEvent,
|
|
2700
2819
|
{
|
|
2701
2820
|
readonly,
|
|
@@ -2705,7 +2824,7 @@ var DayView = ({
|
|
|
2705
2824
|
className: "h-full",
|
|
2706
2825
|
style: { height: "100%" }
|
|
2707
2826
|
},
|
|
2708
|
-
/* @__PURE__ */
|
|
2827
|
+
/* @__PURE__ */ React17__default.createElement(
|
|
2709
2828
|
"div",
|
|
2710
2829
|
{
|
|
2711
2830
|
className: cn(
|
|
@@ -2728,15 +2847,15 @@ var DayView = ({
|
|
|
2728
2847
|
},
|
|
2729
2848
|
title: count > 1 ? `${event.title} (${index + 1}/${count})` : void 0
|
|
2730
2849
|
},
|
|
2731
|
-
/* @__PURE__ */
|
|
2850
|
+
/* @__PURE__ */ React17__default.createElement("div", { className: "flex flex-col h-full overflow-hidden w-full" }, /* @__PURE__ */ React17__default.createElement("div", { className: cn(
|
|
2732
2851
|
"font-semibold truncate leading-tight",
|
|
2733
2852
|
isShortEvent ? "text-xs" : "text-sm",
|
|
2734
2853
|
event.color ? "text-foreground" : "text-foreground/90"
|
|
2735
|
-
) }, event.title), !isShortEvent && /* @__PURE__ */
|
|
2854
|
+
) }, event.title), !isShortEvent && /* @__PURE__ */ React17__default.createElement(React17__default.Fragment, null, /* @__PURE__ */ React17__default.createElement("div", { className: "text-xs text-muted-foreground mt-0.5 font-medium" }, format(zonedStart, eventTimeFormat, { locale }), " - ", format(zonedEnd, eventTimeFormat, { locale })), event.description && height > 60 && /* @__PURE__ */ React17__default.createElement("div", { className: "text-xs text-muted-foreground/80 mt-1 line-clamp-2" }, event.description)), count > 1 && !isShortEvent && /* @__PURE__ */ React17__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))
|
|
2736
2855
|
)
|
|
2737
2856
|
)
|
|
2738
2857
|
);
|
|
2739
|
-
}), isToday(currentDate) && /* @__PURE__ */
|
|
2858
|
+
}), isToday(currentDate) && /* @__PURE__ */ React17__default.createElement(
|
|
2740
2859
|
"div",
|
|
2741
2860
|
{
|
|
2742
2861
|
className: "absolute left-0 right-0 z-20 pointer-events-none flex items-center",
|
|
@@ -2744,17 +2863,17 @@ var DayView = ({
|
|
|
2744
2863
|
top: reverseTime ? `${(1440 - (zonedNow.getHours() * 60 + zonedNow.getMinutes())) / 60 * hourHeight}px` : `${(zonedNow.getHours() * 60 + zonedNow.getMinutes()) / 60 * hourHeight}px`
|
|
2745
2864
|
}
|
|
2746
2865
|
},
|
|
2747
|
-
/* @__PURE__ */
|
|
2748
|
-
/* @__PURE__ */
|
|
2866
|
+
/* @__PURE__ */ React17__default.createElement("div", { className: "h-[2px] w-full bg-gradient-to-r from-primary via-primary to-primary/50" }),
|
|
2867
|
+
/* @__PURE__ */ React17__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" })
|
|
2749
2868
|
)))));
|
|
2750
2869
|
};
|
|
2751
|
-
var AgendaEmptyState = ({ onCreateEvent, translations }) => /* @__PURE__ */
|
|
2870
|
+
var AgendaEmptyState = ({ onCreateEvent, translations }) => /* @__PURE__ */ React17__default.createElement("div", { className: "flex flex-col items-center justify-center h-full min-h-[400px] py-12" }, /* @__PURE__ */ React17__default.createElement("div", { className: "relative mb-8" }, /* @__PURE__ */ React17__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__ */ React17__default.createElement("div", { className: "flex items-center gap-4" }, /* @__PURE__ */ React17__default.createElement("div", { className: "w-12 h-12 rounded-2xl bg-green-100 dark:bg-green-900/30 flex items-center justify-center" }, /* @__PURE__ */ React17__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__ */ React17__default.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M5 13l4 4L19 7" }))), /* @__PURE__ */ React17__default.createElement("div", { className: "text-left" }, /* @__PURE__ */ React17__default.createElement("div", { className: "font-medium text-foreground" }, "All caught up!"), /* @__PURE__ */ React17__default.createElement("div", { className: "text-sm text-muted-foreground" }, "No events scheduled"))))), /* @__PURE__ */ React17__default.createElement("div", { className: "text-center max-w-sm" }, /* @__PURE__ */ React17__default.createElement("h3", { className: "text-lg font-semibold text-foreground mb-2" }, translations?.noUpcoming || "Your schedule is clear"), /* @__PURE__ */ React17__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__ */ React17__default.createElement(
|
|
2752
2871
|
"button",
|
|
2753
2872
|
{
|
|
2754
2873
|
onClick: onCreateEvent,
|
|
2755
2874
|
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"
|
|
2756
2875
|
},
|
|
2757
|
-
/* @__PURE__ */
|
|
2876
|
+
/* @__PURE__ */ React17__default.createElement(Plus, { className: "w-4 h-4" }),
|
|
2758
2877
|
translations?.createEvent || "Create Event"
|
|
2759
2878
|
)));
|
|
2760
2879
|
var formatDuration = (start, end) => {
|
|
@@ -2806,7 +2925,7 @@ var AgendaView = ({
|
|
|
2806
2925
|
hidden: { opacity: 0, x: -20 },
|
|
2807
2926
|
show: { opacity: 1, x: 0 }
|
|
2808
2927
|
};
|
|
2809
|
-
return /* @__PURE__ */
|
|
2928
|
+
return /* @__PURE__ */ React17__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__ */ React17__default.createElement(AgendaEmptyState, { onCreateEvent }) : /* @__PURE__ */ React17__default.createElement(
|
|
2810
2929
|
motion.div,
|
|
2811
2930
|
{
|
|
2812
2931
|
className: "max-w-3xl mx-auto w-full pb-10 px-4 md:px-6",
|
|
@@ -2814,21 +2933,21 @@ var AgendaView = ({
|
|
|
2814
2933
|
initial: "hidden",
|
|
2815
2934
|
animate: "show"
|
|
2816
2935
|
},
|
|
2817
|
-
groupedEvents.map((group, groupIndex) => /* @__PURE__ */
|
|
2936
|
+
groupedEvents.map((group, groupIndex) => /* @__PURE__ */ React17__default.createElement(
|
|
2818
2937
|
motion.div,
|
|
2819
2938
|
{
|
|
2820
2939
|
key: group.date.toISOString(),
|
|
2821
2940
|
className: "relative",
|
|
2822
2941
|
variants: item
|
|
2823
2942
|
},
|
|
2824
|
-
/* @__PURE__ */
|
|
2943
|
+
/* @__PURE__ */ React17__default.createElement("div", { className: "sticky top-0 bg-background/95 backdrop-blur-md py-4 z-10 border-b border-border/50" }, /* @__PURE__ */ React17__default.createElement("div", { className: "flex items-center gap-4" }, /* @__PURE__ */ React17__default.createElement("div", { className: cn(
|
|
2825
2944
|
"flex flex-col items-center justify-center w-16 h-16 rounded-2xl transition-all",
|
|
2826
2945
|
isToday(group.date) ? "bg-primary text-primary-foreground shadow-lg shadow-primary/30" : "bg-muted/50 text-foreground"
|
|
2827
|
-
) }, /* @__PURE__ */
|
|
2946
|
+
) }, /* @__PURE__ */ React17__default.createElement("span", { className: "text-2xl font-bold leading-none" }, format(group.date, "d")), /* @__PURE__ */ React17__default.createElement("span", { className: "text-xs font-medium uppercase tracking-wide opacity-80" }, format(group.date, "MMM"))), /* @__PURE__ */ React17__default.createElement("div", { className: "flex flex-col" }, /* @__PURE__ */ React17__default.createElement("span", { className: cn(
|
|
2828
2947
|
"text-lg font-semibold",
|
|
2829
2948
|
isToday(group.date) && "text-primary"
|
|
2830
|
-
) }, getDateLabel(group.date, translations?.today ?? "Today", translations?.tomorrow ?? "Tomorrow")), /* @__PURE__ */
|
|
2831
|
-
/* @__PURE__ */
|
|
2949
|
+
) }, getDateLabel(group.date, translations?.today ?? "Today", translations?.tomorrow ?? "Tomorrow")), /* @__PURE__ */ React17__default.createElement("span", { className: "text-sm text-muted-foreground" }, group.events.length, " ", group.events.length !== 1 ? translations?.eventsCount ?? "events" : translations?.eventCount ?? "event")))),
|
|
2950
|
+
/* @__PURE__ */ React17__default.createElement("div", { className: "py-4 space-y-3" }, group.events.map((event, eventIndex) => /* @__PURE__ */ React17__default.createElement(
|
|
2832
2951
|
motion.div,
|
|
2833
2952
|
{
|
|
2834
2953
|
key: event.id,
|
|
@@ -2842,22 +2961,22 @@ var AgendaView = ({
|
|
|
2842
2961
|
whileHover: { scale: 1.01, y: -2 },
|
|
2843
2962
|
transition: { duration: 0.2 }
|
|
2844
2963
|
},
|
|
2845
|
-
/* @__PURE__ */
|
|
2964
|
+
/* @__PURE__ */ React17__default.createElement(
|
|
2846
2965
|
"div",
|
|
2847
2966
|
{
|
|
2848
2967
|
className: "absolute left-0 top-3 bottom-3 w-1 rounded-full",
|
|
2849
2968
|
style: { backgroundColor: event.color || "var(--primary)" }
|
|
2850
2969
|
}
|
|
2851
2970
|
),
|
|
2852
|
-
/* @__PURE__ */
|
|
2853
|
-
/* @__PURE__ */
|
|
2971
|
+
/* @__PURE__ */ React17__default.createElement("div", { className: "flex flex-col items-center min-w-[70px] pl-2" }, event.allDay ? /* @__PURE__ */ React17__default.createElement("div", { className: "flex flex-col items-center" }, /* @__PURE__ */ React17__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__ */ React17__default.createElement("div", { className: "flex flex-col items-center" }, /* @__PURE__ */ React17__default.createElement("span", { className: "text-base font-semibold text-foreground" }, format(event.start, timeFmt)), /* @__PURE__ */ React17__default.createElement("div", { className: "w-px h-3 bg-border my-1" }), /* @__PURE__ */ React17__default.createElement("span", { className: "text-xs text-muted-foreground/70 font-medium" }, formatDuration(event.start, event.end)))),
|
|
2972
|
+
/* @__PURE__ */ React17__default.createElement("div", { className: "flex-1 min-w-0 space-y-2" }, /* @__PURE__ */ React17__default.createElement("div", { className: "flex items-start justify-between gap-2" }, /* @__PURE__ */ React17__default.createElement("h4", { className: "text-base font-semibold text-foreground group-hover:text-primary transition-colors line-clamp-1" }, event.title), /* @__PURE__ */ React17__default.createElement(
|
|
2854
2973
|
"div",
|
|
2855
2974
|
{
|
|
2856
2975
|
className: "w-3 h-3 rounded-full shrink-0 mt-1.5",
|
|
2857
2976
|
style: { backgroundColor: event.color || "var(--primary)" }
|
|
2858
2977
|
}
|
|
2859
|
-
)), event.description && /* @__PURE__ */
|
|
2860
|
-
/* @__PURE__ */
|
|
2978
|
+
)), event.description && /* @__PURE__ */ React17__default.createElement("p", { className: "text-sm text-muted-foreground line-clamp-2 leading-relaxed" }, event.description), /* @__PURE__ */ React17__default.createElement("div", { className: "flex flex-wrap items-center gap-3 pt-1" }, !event.allDay && /* @__PURE__ */ React17__default.createElement("div", { className: "flex items-center gap-1.5 text-xs text-muted-foreground" }, /* @__PURE__ */ React17__default.createElement(Clock, { className: "w-3.5 h-3.5" }), /* @__PURE__ */ React17__default.createElement("span", null, format(event.start, timeFmt), " - ", format(event.end, timeFmt))), event.guests && event.guests.length > 0 && /* @__PURE__ */ React17__default.createElement("div", { className: "flex items-center gap-1.5 text-xs text-muted-foreground" }, /* @__PURE__ */ React17__default.createElement(Users, { className: "w-3.5 h-3.5" }), /* @__PURE__ */ React17__default.createElement("span", null, event.guests.length, " ", event.guests.length !== 1 ? translations?.guestsCount ?? "guests" : translations?.guestCount ?? "guest")), event.attachments && event.attachments.length > 0 && /* @__PURE__ */ React17__default.createElement("div", { className: "flex items-center gap-1.5 text-xs text-muted-foreground" }, /* @__PURE__ */ React17__default.createElement(Paperclip, { className: "w-3.5 h-3.5" }), /* @__PURE__ */ React17__default.createElement("span", null, event.attachments.length)), event.reminders && event.reminders.length > 0 && /* @__PURE__ */ React17__default.createElement("div", { className: "flex items-center gap-1.5 text-xs text-muted-foreground" }, /* @__PURE__ */ React17__default.createElement(Bell, { className: "w-3.5 h-3.5" }), /* @__PURE__ */ React17__default.createElement("span", null, event.reminders.length)))),
|
|
2979
|
+
/* @__PURE__ */ React17__default.createElement("div", { className: "absolute right-4 top-1/2 -translate-y-1/2 opacity-0 group-hover:opacity-100 transition-opacity" }, /* @__PURE__ */ React17__default.createElement("svg", { className: "w-5 h-5 text-muted-foreground", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2" }, /* @__PURE__ */ React17__default.createElement("path", { d: "M9 18l6-6-6-6" })))
|
|
2861
2980
|
)))
|
|
2862
2981
|
))
|
|
2863
2982
|
));
|
|
@@ -2889,7 +3008,7 @@ var ResourceView = ({
|
|
|
2889
3008
|
// Min width for visibility
|
|
2890
3009
|
};
|
|
2891
3010
|
};
|
|
2892
|
-
return /* @__PURE__ */
|
|
3011
|
+
return /* @__PURE__ */ React17__default.createElement("div", { className: "flex flex-col h-full min-h-0 bg-background overflow-hidden" }, /* @__PURE__ */ React17__default.createElement("div", { className: "flex border-b border-border bg-muted/20" }, /* @__PURE__ */ React17__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__ */ React17__default.createElement("div", { className: "flex overflow-hidden" }, /* @__PURE__ */ React17__default.createElement("div", { className: "flex relative", style: { width: hours.length * hourWidth } }, hours.map((hour) => /* @__PURE__ */ React17__default.createElement(
|
|
2893
3012
|
"div",
|
|
2894
3013
|
{
|
|
2895
3014
|
key: hour,
|
|
@@ -2897,11 +3016,11 @@ var ResourceView = ({
|
|
|
2897
3016
|
style: { width: hourWidth }
|
|
2898
3017
|
},
|
|
2899
3018
|
format((/* @__PURE__ */ new Date()).setHours(hour, 0, 0, 0), timeFormat, { locale })
|
|
2900
|
-
))))), /* @__PURE__ */
|
|
3019
|
+
))))), /* @__PURE__ */ React17__default.createElement("div", { className: "flex-1 min-h-0 overflow-auto relative", ref: containerRef }, /* @__PURE__ */ React17__default.createElement("div", { className: "min-w-fit" }, resources.map((resource) => {
|
|
2901
3020
|
const resourceEvents = events.filter(
|
|
2902
3021
|
(e) => e.resourceId === resource.id && isSameDay(new Date(e.start), currentDate)
|
|
2903
3022
|
);
|
|
2904
|
-
return /* @__PURE__ */
|
|
3023
|
+
return /* @__PURE__ */ React17__default.createElement("div", { key: resource.id, className: "flex border-b border-border min-h-[100px]" }, /* @__PURE__ */ React17__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__ */ React17__default.createElement("img", { src: resource.avatar, alt: resource.label, className: "w-8 h-8 rounded-full object-cover" }) : /* @__PURE__ */ React17__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__ */ React17__default.createElement("div", { className: "flex flex-col" }, /* @__PURE__ */ React17__default.createElement("span", { className: "text-sm font-medium" }, resource.label), /* @__PURE__ */ React17__default.createElement("span", { className: "text-xs text-muted-foreground" }, "ID: ", resource.id))), /* @__PURE__ */ React17__default.createElement("div", { className: "relative flex", style: { width: hours.length * hourWidth } }, hours.map((hour) => /* @__PURE__ */ React17__default.createElement(
|
|
2905
3024
|
"div",
|
|
2906
3025
|
{
|
|
2907
3026
|
key: hour,
|
|
@@ -2912,7 +3031,7 @@ var ResourceView = ({
|
|
|
2912
3031
|
const slotDate = new Date(currentDate);
|
|
2913
3032
|
slotDate.setHours(hour, minute, 0, 0);
|
|
2914
3033
|
const slotId = `${resource.id}-${slotDate.toISOString()}`;
|
|
2915
|
-
return /* @__PURE__ */
|
|
3034
|
+
return /* @__PURE__ */ React17__default.createElement(
|
|
2916
3035
|
DroppableCell,
|
|
2917
3036
|
{
|
|
2918
3037
|
key: minute,
|
|
@@ -2926,7 +3045,7 @@ var ResourceView = ({
|
|
|
2926
3045
|
}
|
|
2927
3046
|
);
|
|
2928
3047
|
})
|
|
2929
|
-
)), resourceEvents.map((event) => /* @__PURE__ */
|
|
3048
|
+
)), resourceEvents.map((event) => /* @__PURE__ */ React17__default.createElement(
|
|
2930
3049
|
DraggableEvent,
|
|
2931
3050
|
{
|
|
2932
3051
|
key: event.id,
|
|
@@ -2943,7 +3062,7 @@ var ResourceView = ({
|
|
|
2943
3062
|
color: "#fff"
|
|
2944
3063
|
}
|
|
2945
3064
|
},
|
|
2946
|
-
/* @__PURE__ */
|
|
3065
|
+
/* @__PURE__ */ React17__default.createElement("div", { className: "truncate" }, event.title)
|
|
2947
3066
|
))));
|
|
2948
3067
|
}))));
|
|
2949
3068
|
};
|
|
@@ -2970,14 +3089,14 @@ var Modal = ({
|
|
|
2970
3089
|
};
|
|
2971
3090
|
}, [isOpen, onClose]);
|
|
2972
3091
|
if (!isOpen) return null;
|
|
2973
|
-
return /* @__PURE__ */
|
|
3092
|
+
return /* @__PURE__ */ React17__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__ */ React17__default.createElement(
|
|
2974
3093
|
"div",
|
|
2975
3094
|
{
|
|
2976
3095
|
ref: overlayRef,
|
|
2977
3096
|
className: "absolute inset-0",
|
|
2978
3097
|
onClick: onClose
|
|
2979
3098
|
}
|
|
2980
|
-
), /* @__PURE__ */
|
|
3099
|
+
), /* @__PURE__ */ React17__default.createElement(
|
|
2981
3100
|
"div",
|
|
2982
3101
|
{
|
|
2983
3102
|
className: cn(
|
|
@@ -2985,7 +3104,7 @@ var Modal = ({
|
|
|
2985
3104
|
className
|
|
2986
3105
|
)
|
|
2987
3106
|
},
|
|
2988
|
-
!hideHeader && /* @__PURE__ */
|
|
3107
|
+
!hideHeader && /* @__PURE__ */ React17__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__ */ React17__default.createElement("h3", { className: "text-lg font-semibold text-foreground" }, title), /* @__PURE__ */ React17__default.createElement(
|
|
2989
3108
|
Button,
|
|
2990
3109
|
{
|
|
2991
3110
|
variant: "ghost",
|
|
@@ -2993,10 +3112,10 @@ var Modal = ({
|
|
|
2993
3112
|
onClick: onClose,
|
|
2994
3113
|
className: "h-9 w-9 p-0 rounded-xl hover:bg-accent/80 transition-all duration-200"
|
|
2995
3114
|
},
|
|
2996
|
-
/* @__PURE__ */
|
|
2997
|
-
/* @__PURE__ */
|
|
3115
|
+
/* @__PURE__ */ React17__default.createElement(X, { className: "h-4 w-4" }),
|
|
3116
|
+
/* @__PURE__ */ React17__default.createElement("span", { className: "sr-only" }, "Close")
|
|
2998
3117
|
)),
|
|
2999
|
-
/* @__PURE__ */
|
|
3118
|
+
/* @__PURE__ */ React17__default.createElement("div", { className: cn("overflow-y-auto flex-1", !hideHeader && "p-6") }, children)
|
|
3000
3119
|
));
|
|
3001
3120
|
};
|
|
3002
3121
|
var COLOR_PALETTE = [
|
|
@@ -3197,7 +3316,7 @@ var EventModal = ({
|
|
|
3197
3316
|
if (remainingMins === 0) return `${hours} hr`;
|
|
3198
3317
|
return `${hours} hr ${remainingMins} min`;
|
|
3199
3318
|
};
|
|
3200
|
-
const renderViewMode = () => /* @__PURE__ */
|
|
3319
|
+
const renderViewMode = () => /* @__PURE__ */ React17__default.createElement("div", { className: "flex flex-col bg-background overflow-hidden w-full max-h-[90vh]" }, /* @__PURE__ */ React17__default.createElement(
|
|
3201
3320
|
"div",
|
|
3202
3321
|
{
|
|
3203
3322
|
className: "relative px-6 pt-6 pb-8",
|
|
@@ -3205,50 +3324,50 @@ var EventModal = ({
|
|
|
3205
3324
|
background: `linear-gradient(135deg, ${event?.color || "#3b82f6"}15 0%, transparent 100%)`
|
|
3206
3325
|
}
|
|
3207
3326
|
},
|
|
3208
|
-
/* @__PURE__ */
|
|
3327
|
+
/* @__PURE__ */ React17__default.createElement("div", { className: "flex items-center justify-between mb-6" }, /* @__PURE__ */ React17__default.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React17__default.createElement(
|
|
3209
3328
|
"div",
|
|
3210
3329
|
{
|
|
3211
3330
|
className: "w-3 h-3 rounded-full",
|
|
3212
3331
|
style: { backgroundColor: event?.color || "#3b82f6" }
|
|
3213
3332
|
}
|
|
3214
|
-
), /* @__PURE__ */
|
|
3333
|
+
), /* @__PURE__ */ React17__default.createElement("span", { className: "text-xs font-medium text-muted-foreground uppercase tracking-wider" }, calendars?.find((c) => c.id === event?.calendarId)?.label || "Event")), /* @__PURE__ */ React17__default.createElement("div", { className: "flex items-center gap-1" }, /* @__PURE__ */ React17__default.createElement(
|
|
3215
3334
|
"button",
|
|
3216
3335
|
{
|
|
3217
3336
|
onClick: () => setMode("edit"),
|
|
3218
3337
|
className: "p-2 hover:bg-background/80 rounded-lg transition-all text-muted-foreground hover:text-foreground",
|
|
3219
3338
|
title: "Edit"
|
|
3220
3339
|
},
|
|
3221
|
-
/* @__PURE__ */
|
|
3222
|
-
), /* @__PURE__ */
|
|
3340
|
+
/* @__PURE__ */ React17__default.createElement(Edit2, { className: "w-4 h-4" })
|
|
3341
|
+
), /* @__PURE__ */ React17__default.createElement(
|
|
3223
3342
|
"button",
|
|
3224
3343
|
{
|
|
3225
3344
|
onClick: handleDelete,
|
|
3226
3345
|
className: "p-2 hover:bg-destructive/10 rounded-lg transition-all text-muted-foreground hover:text-destructive",
|
|
3227
3346
|
title: "Delete"
|
|
3228
3347
|
},
|
|
3229
|
-
/* @__PURE__ */
|
|
3230
|
-
), /* @__PURE__ */
|
|
3348
|
+
/* @__PURE__ */ React17__default.createElement(Trash2, { className: "w-4 h-4" })
|
|
3349
|
+
), /* @__PURE__ */ React17__default.createElement(
|
|
3231
3350
|
"button",
|
|
3232
3351
|
{
|
|
3233
3352
|
onClick: onClose,
|
|
3234
3353
|
className: "p-2 hover:bg-background/80 rounded-lg transition-all text-muted-foreground hover:text-foreground",
|
|
3235
3354
|
title: "Close"
|
|
3236
3355
|
},
|
|
3237
|
-
/* @__PURE__ */
|
|
3356
|
+
/* @__PURE__ */ React17__default.createElement(X, { className: "w-4 h-4" })
|
|
3238
3357
|
))),
|
|
3239
|
-
/* @__PURE__ */
|
|
3240
|
-
/* @__PURE__ */
|
|
3241
|
-
), /* @__PURE__ */
|
|
3358
|
+
/* @__PURE__ */ React17__default.createElement("h1", { className: "text-2xl font-bold text-foreground mb-3 leading-tight" }, event?.title || translations.noTitle),
|
|
3359
|
+
/* @__PURE__ */ React17__default.createElement("div", { className: "flex items-center gap-3 text-sm" }, /* @__PURE__ */ React17__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__ */ React17__default.createElement(Calendar, { className: "w-4 h-4 text-muted-foreground" }), /* @__PURE__ */ React17__default.createElement("span", { className: "font-medium" }, event?.start && format(new Date(event.start), "EEE, MMM d"))), /* @__PURE__ */ React17__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__ */ React17__default.createElement(Clock, { className: "w-4 h-4 text-muted-foreground" }), /* @__PURE__ */ React17__default.createElement("span", { className: "font-medium" }, event?.start && format(new Date(event.start), timeFmt), " \u2013 ", event?.end && format(new Date(event.end), timeFmt))))
|
|
3360
|
+
), /* @__PURE__ */ React17__default.createElement("div", { className: "px-6 pb-6 space-y-4 overflow-y-auto flex-1" }, event?.location && /* @__PURE__ */ React17__default.createElement(
|
|
3242
3361
|
motion.div,
|
|
3243
3362
|
{
|
|
3244
3363
|
initial: { opacity: 0, y: 10 },
|
|
3245
3364
|
animate: { opacity: 1, y: 0 },
|
|
3246
3365
|
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"
|
|
3247
3366
|
},
|
|
3248
|
-
/* @__PURE__ */
|
|
3249
|
-
/* @__PURE__ */
|
|
3250
|
-
/* @__PURE__ */
|
|
3251
|
-
), event?.guests && event.guests.length > 0 && /* @__PURE__ */
|
|
3367
|
+
/* @__PURE__ */ React17__default.createElement("div", { className: "p-2 bg-primary/10 rounded-xl" }, /* @__PURE__ */ React17__default.createElement(MapPin, { className: "w-5 h-5 text-primary" })),
|
|
3368
|
+
/* @__PURE__ */ React17__default.createElement("div", { className: "flex-1" }, /* @__PURE__ */ React17__default.createElement("p", { className: "text-sm font-medium text-foreground" }, event.location), /* @__PURE__ */ React17__default.createElement("p", { className: "text-xs text-muted-foreground mt-0.5" }, translations.clickToOpenInMaps)),
|
|
3369
|
+
/* @__PURE__ */ React17__default.createElement(ExternalLink, { className: "w-4 h-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity" })
|
|
3370
|
+
), event?.guests && event.guests.length > 0 && /* @__PURE__ */ React17__default.createElement(
|
|
3252
3371
|
motion.div,
|
|
3253
3372
|
{
|
|
3254
3373
|
initial: { opacity: 0, y: 10 },
|
|
@@ -3256,14 +3375,14 @@ var EventModal = ({
|
|
|
3256
3375
|
transition: { delay: 0.05 },
|
|
3257
3376
|
className: "space-y-3"
|
|
3258
3377
|
},
|
|
3259
|
-
/* @__PURE__ */
|
|
3260
|
-
/* @__PURE__ */
|
|
3378
|
+
/* @__PURE__ */ React17__default.createElement("div", { className: "flex items-center justify-between" }, /* @__PURE__ */ React17__default.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React17__default.createElement(Users, { className: "w-4 h-4 text-muted-foreground" }), /* @__PURE__ */ React17__default.createElement("span", { className: "text-sm font-medium text-foreground" }, event.guests.length, " ", event.guests.length > 1 ? translations.guestsCount : translations.guestCount))),
|
|
3379
|
+
/* @__PURE__ */ React17__default.createElement("div", { className: "flex flex-wrap gap-2" }, event.guests.map((email, index) => /* @__PURE__ */ React17__default.createElement(
|
|
3261
3380
|
"div",
|
|
3262
3381
|
{
|
|
3263
3382
|
key: index,
|
|
3264
3383
|
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"
|
|
3265
3384
|
},
|
|
3266
|
-
/* @__PURE__ */
|
|
3385
|
+
/* @__PURE__ */ React17__default.createElement(
|
|
3267
3386
|
"div",
|
|
3268
3387
|
{
|
|
3269
3388
|
className: "w-8 h-8 rounded-full flex items-center justify-center text-sm font-semibold text-white",
|
|
@@ -3271,9 +3390,9 @@ var EventModal = ({
|
|
|
3271
3390
|
},
|
|
3272
3391
|
email[0].toUpperCase()
|
|
3273
3392
|
),
|
|
3274
|
-
/* @__PURE__ */
|
|
3393
|
+
/* @__PURE__ */ React17__default.createElement("div", { className: "flex-1 min-w-0" }, /* @__PURE__ */ React17__default.createElement("p", { className: "text-sm font-medium text-foreground" }, email.split("@")[0]), /* @__PURE__ */ React17__default.createElement("p", { className: "text-xs text-muted-foreground truncate" }, email))
|
|
3275
3394
|
)))
|
|
3276
|
-
), event?.reminders && event.reminders.length > 0 && /* @__PURE__ */
|
|
3395
|
+
), event?.reminders && event.reminders.length > 0 && /* @__PURE__ */ React17__default.createElement(
|
|
3277
3396
|
motion.div,
|
|
3278
3397
|
{
|
|
3279
3398
|
initial: { opacity: 0, y: 10 },
|
|
@@ -3281,8 +3400,8 @@ var EventModal = ({
|
|
|
3281
3400
|
transition: { delay: 0.1 },
|
|
3282
3401
|
className: "flex items-center gap-3"
|
|
3283
3402
|
},
|
|
3284
|
-
/* @__PURE__ */
|
|
3285
|
-
/* @__PURE__ */
|
|
3403
|
+
/* @__PURE__ */ React17__default.createElement("div", { className: "p-2 bg-amber-500/10 rounded-xl" }, /* @__PURE__ */ React17__default.createElement(Bell, { className: "w-4 h-4 text-amber-500" })),
|
|
3404
|
+
/* @__PURE__ */ React17__default.createElement("div", { className: "flex flex-wrap gap-2" }, event.reminders.map((reminder) => /* @__PURE__ */ React17__default.createElement(
|
|
3286
3405
|
"span",
|
|
3287
3406
|
{
|
|
3288
3407
|
key: reminder.id,
|
|
@@ -3290,7 +3409,7 @@ var EventModal = ({
|
|
|
3290
3409
|
},
|
|
3291
3410
|
reminder.label || `${reminder.time} min before`
|
|
3292
3411
|
)))
|
|
3293
|
-
), event?.description && /* @__PURE__ */
|
|
3412
|
+
), event?.description && /* @__PURE__ */ React17__default.createElement(
|
|
3294
3413
|
motion.div,
|
|
3295
3414
|
{
|
|
3296
3415
|
initial: { opacity: 0, y: 10 },
|
|
@@ -3298,9 +3417,9 @@ var EventModal = ({
|
|
|
3298
3417
|
transition: { delay: 0.15 },
|
|
3299
3418
|
className: "space-y-2"
|
|
3300
3419
|
},
|
|
3301
|
-
/* @__PURE__ */
|
|
3302
|
-
/* @__PURE__ */
|
|
3303
|
-
), event?.attachments && event.attachments.length > 0 && /* @__PURE__ */
|
|
3420
|
+
/* @__PURE__ */ React17__default.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React17__default.createElement(AlignLeft, { className: "w-4 h-4 text-muted-foreground" }), /* @__PURE__ */ React17__default.createElement("span", { className: "text-sm font-medium text-foreground" }, translations.notes)),
|
|
3421
|
+
/* @__PURE__ */ React17__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)
|
|
3422
|
+
), event?.attachments && event.attachments.length > 0 && /* @__PURE__ */ React17__default.createElement(
|
|
3304
3423
|
motion.div,
|
|
3305
3424
|
{
|
|
3306
3425
|
initial: { opacity: 0, y: 10 },
|
|
@@ -3308,27 +3427,27 @@ var EventModal = ({
|
|
|
3308
3427
|
transition: { delay: 0.2 },
|
|
3309
3428
|
className: "space-y-2"
|
|
3310
3429
|
},
|
|
3311
|
-
/* @__PURE__ */
|
|
3312
|
-
/* @__PURE__ */
|
|
3430
|
+
/* @__PURE__ */ React17__default.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React17__default.createElement(Paperclip, { className: "w-4 h-4 text-muted-foreground" }), /* @__PURE__ */ React17__default.createElement("span", { className: "text-sm font-medium text-foreground" }, translations.attachments)),
|
|
3431
|
+
/* @__PURE__ */ React17__default.createElement("div", { className: "grid gap-2" }, event.attachments.map((att) => /* @__PURE__ */ React17__default.createElement(
|
|
3313
3432
|
"div",
|
|
3314
3433
|
{
|
|
3315
3434
|
key: att.id,
|
|
3316
3435
|
onClick: () => handleDownload(att),
|
|
3317
3436
|
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"
|
|
3318
3437
|
},
|
|
3319
|
-
/* @__PURE__ */
|
|
3320
|
-
/* @__PURE__ */
|
|
3321
|
-
/* @__PURE__ */
|
|
3438
|
+
/* @__PURE__ */ React17__default.createElement("div", { className: "p-2 bg-primary/10 rounded-lg" }, /* @__PURE__ */ React17__default.createElement(File, { className: "w-4 h-4 text-primary" })),
|
|
3439
|
+
/* @__PURE__ */ React17__default.createElement("div", { className: "flex-1 min-w-0" }, /* @__PURE__ */ React17__default.createElement("p", { className: "text-sm font-medium text-foreground truncate" }, att.name), /* @__PURE__ */ React17__default.createElement("p", { className: "text-xs text-muted-foreground" }, att.size)),
|
|
3440
|
+
/* @__PURE__ */ React17__default.createElement(Download, { className: "w-4 h-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity" })
|
|
3322
3441
|
)))
|
|
3323
3442
|
)));
|
|
3324
|
-
const renderEditMode = () => /* @__PURE__ */
|
|
3443
|
+
const renderEditMode = () => /* @__PURE__ */ React17__default.createElement("form", { onSubmit: handleSubmit, className: "flex flex-col bg-background overflow-hidden w-full max-h-[85vh]" }, /* @__PURE__ */ React17__default.createElement("div", { className: "flex items-center justify-between px-5 py-4 border-b border-border/50 shrink-0" }, /* @__PURE__ */ React17__default.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ React17__default.createElement(
|
|
3325
3444
|
"button",
|
|
3326
3445
|
{
|
|
3327
3446
|
type: "button",
|
|
3328
3447
|
onClick: () => setIsColorPickerOpen(!isColorPickerOpen),
|
|
3329
3448
|
className: "relative p-1"
|
|
3330
3449
|
},
|
|
3331
|
-
/* @__PURE__ */
|
|
3450
|
+
/* @__PURE__ */ React17__default.createElement(
|
|
3332
3451
|
"div",
|
|
3333
3452
|
{
|
|
3334
3453
|
className: "w-5 h-5 rounded-full cursor-pointer hover:scale-110 transition-transform",
|
|
@@ -3338,7 +3457,7 @@ var EventModal = ({
|
|
|
3338
3457
|
}
|
|
3339
3458
|
}
|
|
3340
3459
|
),
|
|
3341
|
-
isColorPickerOpen && /* @__PURE__ */
|
|
3460
|
+
isColorPickerOpen && /* @__PURE__ */ React17__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__ */ React17__default.createElement(
|
|
3342
3461
|
"button",
|
|
3343
3462
|
{
|
|
3344
3463
|
key: color,
|
|
@@ -3354,15 +3473,15 @@ var EventModal = ({
|
|
|
3354
3473
|
style: { backgroundColor: color, color }
|
|
3355
3474
|
}
|
|
3356
3475
|
)))
|
|
3357
|
-
), /* @__PURE__ */
|
|
3476
|
+
), /* @__PURE__ */ React17__default.createElement("h2", { className: "text-lg font-semibold text-foreground" }, mode === "edit" ? translations.editEvent : translations.newEvent)), /* @__PURE__ */ React17__default.createElement(
|
|
3358
3477
|
"button",
|
|
3359
3478
|
{
|
|
3360
3479
|
type: "button",
|
|
3361
3480
|
onClick: onClose,
|
|
3362
3481
|
className: "p-2 hover:bg-accent rounded-xl transition-all text-muted-foreground hover:text-foreground"
|
|
3363
3482
|
},
|
|
3364
|
-
/* @__PURE__ */
|
|
3365
|
-
)), /* @__PURE__ */
|
|
3483
|
+
/* @__PURE__ */ React17__default.createElement(X, { className: "w-4 h-4" })
|
|
3484
|
+
)), /* @__PURE__ */ React17__default.createElement("div", { className: "flex-1 overflow-y-auto" }, /* @__PURE__ */ React17__default.createElement("div", { className: "px-5 py-4 space-y-5" }, /* @__PURE__ */ React17__default.createElement("div", null, /* @__PURE__ */ React17__default.createElement(
|
|
3366
3485
|
"input",
|
|
3367
3486
|
{
|
|
3368
3487
|
type: "text",
|
|
@@ -3373,7 +3492,7 @@ var EventModal = ({
|
|
|
3373
3492
|
onChange: (e) => setFormData({ ...formData, title: e.target.value }),
|
|
3374
3493
|
placeholder: translations.addTitle
|
|
3375
3494
|
}
|
|
3376
|
-
)), /* @__PURE__ */
|
|
3495
|
+
)), /* @__PURE__ */ React17__default.createElement("div", { className: "flex items-center gap-3 p-4 rounded-2xl bg-muted/20 border border-border/30" }, /* @__PURE__ */ React17__default.createElement("div", { className: "p-2 bg-primary/10 rounded-xl shrink-0" }, /* @__PURE__ */ React17__default.createElement(Clock, { className: "w-5 h-5 text-primary" })), /* @__PURE__ */ React17__default.createElement("div", { className: "flex-1 grid grid-cols-2 gap-3" }, /* @__PURE__ */ React17__default.createElement("div", null, /* @__PURE__ */ React17__default.createElement("label", { className: "text-[10px] font-semibold text-muted-foreground uppercase tracking-wider mb-1 block" }, translations.start), /* @__PURE__ */ React17__default.createElement(
|
|
3377
3496
|
"input",
|
|
3378
3497
|
{
|
|
3379
3498
|
type: "datetime-local",
|
|
@@ -3381,7 +3500,7 @@ var EventModal = ({
|
|
|
3381
3500
|
value: formatDateForInput(formData.start),
|
|
3382
3501
|
onChange: (e) => handleDateChange("start", e.target.value)
|
|
3383
3502
|
}
|
|
3384
|
-
)), /* @__PURE__ */
|
|
3503
|
+
)), /* @__PURE__ */ React17__default.createElement("div", null, /* @__PURE__ */ React17__default.createElement("label", { className: "text-[10px] font-semibold text-muted-foreground uppercase tracking-wider mb-1 block" }, translations.end), /* @__PURE__ */ React17__default.createElement(
|
|
3385
3504
|
"input",
|
|
3386
3505
|
{
|
|
3387
3506
|
type: "datetime-local",
|
|
@@ -3389,16 +3508,16 @@ var EventModal = ({
|
|
|
3389
3508
|
value: formatDateForInput(formData.end),
|
|
3390
3509
|
onChange: (e) => handleDateChange("end", e.target.value)
|
|
3391
3510
|
}
|
|
3392
|
-
)))), getDurationText() && /* @__PURE__ */
|
|
3511
|
+
)))), getDurationText() && /* @__PURE__ */ React17__default.createElement("div", { className: "flex justify-center" }, /* @__PURE__ */ React17__default.createElement("span", { className: "text-xs font-medium px-3 py-1 rounded-full bg-primary/10 text-primary" }, getDurationText())), /* @__PURE__ */ React17__default.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React17__default.createElement("div", { className: "flex items-center justify-between" }, /* @__PURE__ */ React17__default.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React17__default.createElement(Bell, { className: "w-4 h-4 text-muted-foreground" }), /* @__PURE__ */ React17__default.createElement("span", { className: "text-sm font-medium text-foreground" }, translations.reminders)), /* @__PURE__ */ React17__default.createElement("div", { className: "relative" }, /* @__PURE__ */ React17__default.createElement(
|
|
3393
3512
|
"button",
|
|
3394
3513
|
{
|
|
3395
3514
|
type: "button",
|
|
3396
3515
|
onClick: () => setIsReminderDropdownOpen(!isReminderDropdownOpen),
|
|
3397
3516
|
className: "flex items-center gap-1 text-xs font-medium text-primary hover:text-primary/80 transition-colors"
|
|
3398
3517
|
},
|
|
3399
|
-
/* @__PURE__ */
|
|
3518
|
+
/* @__PURE__ */ React17__default.createElement(Plus, { className: "w-3.5 h-3.5" }),
|
|
3400
3519
|
translations.addReminder
|
|
3401
|
-
), isReminderDropdownOpen && /* @__PURE__ */
|
|
3520
|
+
), isReminderDropdownOpen && /* @__PURE__ */ React17__default.createElement(React17__default.Fragment, null, /* @__PURE__ */ React17__default.createElement("div", { className: "fixed inset-0 z-40", onClick: () => setIsReminderDropdownOpen(false) }), /* @__PURE__ */ React17__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__ */ React17__default.createElement(
|
|
3402
3521
|
"button",
|
|
3403
3522
|
{
|
|
3404
3523
|
key: option.value,
|
|
@@ -3407,58 +3526,58 @@ var EventModal = ({
|
|
|
3407
3526
|
className: "w-full px-3 py-2 text-left text-sm hover:bg-accent transition-colors"
|
|
3408
3527
|
},
|
|
3409
3528
|
option.label
|
|
3410
|
-
)))))), formData.reminders && formData.reminders.length > 0 && /* @__PURE__ */
|
|
3529
|
+
)))))), formData.reminders && formData.reminders.length > 0 && /* @__PURE__ */ React17__default.createElement("div", { className: "flex flex-wrap gap-2" }, formData.reminders.map((reminder) => /* @__PURE__ */ React17__default.createElement(
|
|
3411
3530
|
"div",
|
|
3412
3531
|
{
|
|
3413
3532
|
key: reminder.id,
|
|
3414
3533
|
className: "flex items-center gap-2 px-3 py-1.5 rounded-full bg-amber-500/10 border border-amber-500/20"
|
|
3415
3534
|
},
|
|
3416
|
-
/* @__PURE__ */
|
|
3417
|
-
/* @__PURE__ */
|
|
3418
|
-
/* @__PURE__ */
|
|
3535
|
+
/* @__PURE__ */ React17__default.createElement(BellRing, { className: "w-3.5 h-3.5 text-amber-500" }),
|
|
3536
|
+
/* @__PURE__ */ React17__default.createElement("span", { className: "text-xs font-medium text-amber-600 dark:text-amber-400" }, reminder.label),
|
|
3537
|
+
/* @__PURE__ */ React17__default.createElement(
|
|
3419
3538
|
"button",
|
|
3420
3539
|
{
|
|
3421
3540
|
type: "button",
|
|
3422
3541
|
onClick: () => removeReminder(reminder.id),
|
|
3423
3542
|
className: "p-0.5 hover:bg-amber-500/20 rounded-full transition-colors"
|
|
3424
3543
|
},
|
|
3425
|
-
/* @__PURE__ */
|
|
3544
|
+
/* @__PURE__ */ React17__default.createElement(X, { className: "w-3 h-3 text-amber-500" })
|
|
3426
3545
|
)
|
|
3427
|
-
)))), /* @__PURE__ */
|
|
3546
|
+
)))), /* @__PURE__ */ React17__default.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React17__default.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React17__default.createElement(Users, { className: "w-4 h-4 text-muted-foreground" }), /* @__PURE__ */ React17__default.createElement("span", { className: "text-sm font-medium text-foreground" }, translations.guests)), /* @__PURE__ */ React17__default.createElement("div", { className: "relative" }, /* @__PURE__ */ React17__default.createElement(
|
|
3428
3547
|
"button",
|
|
3429
3548
|
{
|
|
3430
3549
|
type: "button",
|
|
3431
3550
|
onClick: () => setIsGuestsDropdownOpen(!isGuestsDropdownOpen),
|
|
3432
3551
|
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"
|
|
3433
3552
|
},
|
|
3434
|
-
/* @__PURE__ */
|
|
3435
|
-
/* @__PURE__ */
|
|
3436
|
-
), isGuestsDropdownOpen && /* @__PURE__ */
|
|
3553
|
+
/* @__PURE__ */ React17__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),
|
|
3554
|
+
/* @__PURE__ */ React17__default.createElement(ChevronDown, { className: cn("w-4 h-4 text-muted-foreground transition-transform", isGuestsDropdownOpen && "rotate-180") })
|
|
3555
|
+
), isGuestsDropdownOpen && /* @__PURE__ */ React17__default.createElement(React17__default.Fragment, null, /* @__PURE__ */ React17__default.createElement("div", { className: "fixed inset-0 z-40", onClick: () => setIsGuestsDropdownOpen(false) }), /* @__PURE__ */ React17__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__ */ React17__default.createElement(
|
|
3437
3556
|
"div",
|
|
3438
3557
|
{
|
|
3439
3558
|
key: email,
|
|
3440
3559
|
className: "px-4 py-3 hover:bg-accent cursor-pointer flex items-center gap-3 transition-colors",
|
|
3441
3560
|
onClick: () => toggleGuest(email)
|
|
3442
3561
|
},
|
|
3443
|
-
/* @__PURE__ */
|
|
3562
|
+
/* @__PURE__ */ React17__default.createElement("div", { className: cn(
|
|
3444
3563
|
"w-5 h-5 rounded-md border-2 flex items-center justify-center transition-all",
|
|
3445
3564
|
selectedGuests.includes(email) ? "bg-primary border-primary" : "border-border"
|
|
3446
|
-
) }, selectedGuests.includes(email) && /* @__PURE__ */
|
|
3447
|
-
/* @__PURE__ */
|
|
3565
|
+
) }, selectedGuests.includes(email) && /* @__PURE__ */ React17__default.createElement(Check, { className: "w-3 h-3 text-primary-foreground" })),
|
|
3566
|
+
/* @__PURE__ */ React17__default.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React17__default.createElement(
|
|
3448
3567
|
"div",
|
|
3449
3568
|
{
|
|
3450
3569
|
className: "w-7 h-7 rounded-full flex items-center justify-center text-xs font-semibold text-white",
|
|
3451
3570
|
style: { backgroundColor: `hsl(${fakeGuests.indexOf(email) * 60}, 70%, 50%)` }
|
|
3452
3571
|
},
|
|
3453
3572
|
email[0].toUpperCase()
|
|
3454
|
-
), /* @__PURE__ */
|
|
3455
|
-
))))), selectedGuests.length > 0 && /* @__PURE__ */
|
|
3573
|
+
), /* @__PURE__ */ React17__default.createElement("span", { className: "text-sm" }, email))
|
|
3574
|
+
))))), selectedGuests.length > 0 && /* @__PURE__ */ React17__default.createElement("div", { className: "flex flex-wrap gap-2 mt-2" }, selectedGuests.map((email) => /* @__PURE__ */ React17__default.createElement(
|
|
3456
3575
|
"div",
|
|
3457
3576
|
{
|
|
3458
3577
|
key: email,
|
|
3459
3578
|
className: "flex items-center gap-2 pl-1 pr-2 py-1 bg-muted/30 border border-border/30 rounded-full"
|
|
3460
3579
|
},
|
|
3461
|
-
/* @__PURE__ */
|
|
3580
|
+
/* @__PURE__ */ React17__default.createElement(
|
|
3462
3581
|
"div",
|
|
3463
3582
|
{
|
|
3464
3583
|
className: "w-6 h-6 rounded-full flex items-center justify-center text-xs font-semibold text-white",
|
|
@@ -3466,17 +3585,17 @@ var EventModal = ({
|
|
|
3466
3585
|
},
|
|
3467
3586
|
email[0].toUpperCase()
|
|
3468
3587
|
),
|
|
3469
|
-
/* @__PURE__ */
|
|
3470
|
-
/* @__PURE__ */
|
|
3588
|
+
/* @__PURE__ */ React17__default.createElement("span", { className: "text-xs font-medium text-foreground" }, email.split("@")[0]),
|
|
3589
|
+
/* @__PURE__ */ React17__default.createElement(
|
|
3471
3590
|
"button",
|
|
3472
3591
|
{
|
|
3473
3592
|
type: "button",
|
|
3474
3593
|
onClick: () => toggleGuest(email),
|
|
3475
3594
|
className: "p-0.5 hover:bg-destructive/10 rounded-full transition-colors"
|
|
3476
3595
|
},
|
|
3477
|
-
/* @__PURE__ */
|
|
3596
|
+
/* @__PURE__ */ React17__default.createElement(X, { className: "w-3 h-3 text-muted-foreground" })
|
|
3478
3597
|
)
|
|
3479
|
-
)))), /* @__PURE__ */
|
|
3598
|
+
)))), /* @__PURE__ */ React17__default.createElement("div", { className: "flex items-center gap-3 p-3 rounded-xl bg-muted/20 border border-border/30" }, /* @__PURE__ */ React17__default.createElement(MapPin, { className: "w-5 h-5 text-muted-foreground shrink-0" }), /* @__PURE__ */ React17__default.createElement(
|
|
3480
3599
|
"input",
|
|
3481
3600
|
{
|
|
3482
3601
|
type: "text",
|
|
@@ -3485,7 +3604,7 @@ var EventModal = ({
|
|
|
3485
3604
|
value: formData.location || "",
|
|
3486
3605
|
onChange: (e) => setFormData({ ...formData, location: e.target.value })
|
|
3487
3606
|
}
|
|
3488
|
-
)), /* @__PURE__ */
|
|
3607
|
+
)), /* @__PURE__ */ React17__default.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React17__default.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React17__default.createElement(AlignLeft, { className: "w-4 h-4 text-muted-foreground" }), /* @__PURE__ */ React17__default.createElement("span", { className: "text-sm font-medium text-foreground" }, translations.notes)), /* @__PURE__ */ React17__default.createElement(
|
|
3489
3608
|
"textarea",
|
|
3490
3609
|
{
|
|
3491
3610
|
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",
|
|
@@ -3493,7 +3612,7 @@ var EventModal = ({
|
|
|
3493
3612
|
value: formData.description || "",
|
|
3494
3613
|
onChange: (e) => setFormData({ ...formData, description: e.target.value })
|
|
3495
3614
|
}
|
|
3496
|
-
)), /* @__PURE__ */
|
|
3615
|
+
)), /* @__PURE__ */ React17__default.createElement("div", { className: "flex items-center gap-3 p-3 rounded-xl bg-muted/20 border border-border/30" }, /* @__PURE__ */ React17__default.createElement(Repeat, { className: "w-5 h-5 text-muted-foreground shrink-0" }), /* @__PURE__ */ React17__default.createElement(
|
|
3497
3616
|
"select",
|
|
3498
3617
|
{
|
|
3499
3618
|
className: "flex-1 bg-transparent text-sm text-foreground focus:outline-none cursor-pointer",
|
|
@@ -3512,28 +3631,28 @@ var EventModal = ({
|
|
|
3512
3631
|
}
|
|
3513
3632
|
}
|
|
3514
3633
|
},
|
|
3515
|
-
/* @__PURE__ */
|
|
3516
|
-
/* @__PURE__ */
|
|
3517
|
-
/* @__PURE__ */
|
|
3518
|
-
/* @__PURE__ */
|
|
3519
|
-
/* @__PURE__ */
|
|
3520
|
-
)), /* @__PURE__ */
|
|
3634
|
+
/* @__PURE__ */ React17__default.createElement("option", { value: "" }, translations.doesNotRepeat),
|
|
3635
|
+
/* @__PURE__ */ React17__default.createElement("option", { value: "DAILY" }, translations.daily),
|
|
3636
|
+
/* @__PURE__ */ React17__default.createElement("option", { value: "WEEKLY" }, translations.weekly),
|
|
3637
|
+
/* @__PURE__ */ React17__default.createElement("option", { value: "MONTHLY" }, translations.monthly),
|
|
3638
|
+
/* @__PURE__ */ React17__default.createElement("option", { value: "YEARLY" }, translations.yearly)
|
|
3639
|
+
)), /* @__PURE__ */ React17__default.createElement("div", { className: "flex items-center justify-between p-3 rounded-xl bg-muted/20 border border-border/30" }, /* @__PURE__ */ React17__default.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React17__default.createElement(Tag, { className: "w-5 h-5 text-muted-foreground" }), /* @__PURE__ */ React17__default.createElement("span", { className: "text-sm text-foreground" }, translations.calendar)), /* @__PURE__ */ React17__default.createElement("div", { className: "relative" }, /* @__PURE__ */ React17__default.createElement(
|
|
3521
3640
|
"button",
|
|
3522
3641
|
{
|
|
3523
3642
|
type: "button",
|
|
3524
3643
|
onClick: () => setIsCalendarDropdownOpen(!isCalendarDropdownOpen),
|
|
3525
3644
|
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"
|
|
3526
3645
|
},
|
|
3527
|
-
/* @__PURE__ */
|
|
3646
|
+
/* @__PURE__ */ React17__default.createElement(
|
|
3528
3647
|
"div",
|
|
3529
3648
|
{
|
|
3530
3649
|
className: "w-3 h-3 rounded-full",
|
|
3531
3650
|
style: { backgroundColor: calendars?.find((c) => c.id === formData.calendarId)?.color || "#3b82f6" }
|
|
3532
3651
|
}
|
|
3533
3652
|
),
|
|
3534
|
-
/* @__PURE__ */
|
|
3535
|
-
/* @__PURE__ */
|
|
3536
|
-
), isCalendarDropdownOpen && /* @__PURE__ */
|
|
3653
|
+
/* @__PURE__ */ React17__default.createElement("span", { className: "font-medium" }, calendars?.find((c) => c.id === formData.calendarId)?.label || "Select"),
|
|
3654
|
+
/* @__PURE__ */ React17__default.createElement(ChevronDown, { className: "w-3.5 h-3.5 text-muted-foreground" })
|
|
3655
|
+
), isCalendarDropdownOpen && /* @__PURE__ */ React17__default.createElement(React17__default.Fragment, null, /* @__PURE__ */ React17__default.createElement("div", { className: "fixed inset-0 z-40", onClick: () => setIsCalendarDropdownOpen(false) }), /* @__PURE__ */ React17__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__ */ React17__default.createElement(
|
|
3537
3656
|
"button",
|
|
3538
3657
|
{
|
|
3539
3658
|
key: cal.id,
|
|
@@ -3548,19 +3667,19 @@ var EventModal = ({
|
|
|
3548
3667
|
setIsCalendarDropdownOpen(false);
|
|
3549
3668
|
}
|
|
3550
3669
|
},
|
|
3551
|
-
/* @__PURE__ */
|
|
3552
|
-
/* @__PURE__ */
|
|
3553
|
-
formData.calendarId === cal.id && /* @__PURE__ */
|
|
3554
|
-
)))))))), /* @__PURE__ */
|
|
3670
|
+
/* @__PURE__ */ React17__default.createElement("div", { className: "w-3 h-3 rounded-full", style: { backgroundColor: cal.color } }),
|
|
3671
|
+
/* @__PURE__ */ React17__default.createElement("span", { className: "flex-1 text-sm" }, cal.label),
|
|
3672
|
+
formData.calendarId === cal.id && /* @__PURE__ */ React17__default.createElement(Check, { className: "w-4 h-4 text-primary" })
|
|
3673
|
+
)))))))), /* @__PURE__ */ React17__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__ */ React17__default.createElement(
|
|
3555
3674
|
"button",
|
|
3556
3675
|
{
|
|
3557
3676
|
type: "button",
|
|
3558
3677
|
onClick: handleDelete,
|
|
3559
3678
|
className: "flex items-center gap-2 px-4 py-2 text-destructive hover:bg-destructive/10 rounded-xl transition-all text-sm font-medium"
|
|
3560
3679
|
},
|
|
3561
|
-
/* @__PURE__ */
|
|
3680
|
+
/* @__PURE__ */ React17__default.createElement(Trash2, { className: "w-4 h-4" }),
|
|
3562
3681
|
translations.delete
|
|
3563
|
-
), mode === "create" && /* @__PURE__ */
|
|
3682
|
+
), mode === "create" && /* @__PURE__ */ React17__default.createElement("div", null), /* @__PURE__ */ React17__default.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React17__default.createElement(
|
|
3564
3683
|
"button",
|
|
3565
3684
|
{
|
|
3566
3685
|
type: "button",
|
|
@@ -3568,7 +3687,7 @@ var EventModal = ({
|
|
|
3568
3687
|
className: "px-4 py-2.5 text-muted-foreground hover:text-foreground font-medium text-sm rounded-xl transition-all hover:bg-accent"
|
|
3569
3688
|
},
|
|
3570
3689
|
translations.cancel
|
|
3571
|
-
), /* @__PURE__ */
|
|
3690
|
+
), /* @__PURE__ */ React17__default.createElement(
|
|
3572
3691
|
"button",
|
|
3573
3692
|
{
|
|
3574
3693
|
type: "submit",
|
|
@@ -3576,7 +3695,7 @@ var EventModal = ({
|
|
|
3576
3695
|
},
|
|
3577
3696
|
mode === "edit" ? translations.saveChanges : translations.createEvent
|
|
3578
3697
|
))));
|
|
3579
|
-
return /* @__PURE__ */
|
|
3698
|
+
return /* @__PURE__ */ React17__default.createElement(Modal, { isOpen, onClose, hideHeader: true, className: "p-0 overflow-hidden max-w-lg rounded-2xl shadow-2xl" }, /* @__PURE__ */ React17__default.createElement(AnimatePresence, { mode: "wait" }, mode === "view" && event ? /* @__PURE__ */ React17__default.createElement(
|
|
3580
3699
|
motion.div,
|
|
3581
3700
|
{
|
|
3582
3701
|
key: "view",
|
|
@@ -3586,7 +3705,7 @@ var EventModal = ({
|
|
|
3586
3705
|
transition: { duration: 0.15 }
|
|
3587
3706
|
},
|
|
3588
3707
|
renderViewMode()
|
|
3589
|
-
) : /* @__PURE__ */
|
|
3708
|
+
) : /* @__PURE__ */ React17__default.createElement(
|
|
3590
3709
|
motion.div,
|
|
3591
3710
|
{
|
|
3592
3711
|
key: "edit",
|
|
@@ -3598,9 +3717,9 @@ var EventModal = ({
|
|
|
3598
3717
|
renderEditMode()
|
|
3599
3718
|
)));
|
|
3600
3719
|
};
|
|
3601
|
-
var Skeleton = ({ className, style }) => /* @__PURE__ */
|
|
3602
|
-
var MonthViewSkeleton = () => /* @__PURE__ */
|
|
3603
|
-
var WeekViewSkeleton = () => /* @__PURE__ */
|
|
3720
|
+
var Skeleton = ({ className, style }) => /* @__PURE__ */ React17__default.createElement("div", { className: cn("animate-pulse bg-muted/40 rounded", className), style });
|
|
3721
|
+
var MonthViewSkeleton = () => /* @__PURE__ */ React17__default.createElement("div", { className: "h-full bg-background border border-border/50 rounded-2xl overflow-hidden" }, /* @__PURE__ */ React17__default.createElement("div", { className: "grid grid-cols-7 border-b border-border/50 bg-muted/10" }, Array.from({ length: 7 }).map((_, i) => /* @__PURE__ */ React17__default.createElement("div", { key: i, className: "py-3 px-2 text-center border-r border-border/30 last:border-r-0" }, /* @__PURE__ */ React17__default.createElement(Skeleton, { className: "h-4 w-8 mx-auto" })))), /* @__PURE__ */ React17__default.createElement("div", { className: "grid grid-cols-7 flex-1" }, Array.from({ length: 35 }).map((_, i) => /* @__PURE__ */ React17__default.createElement("div", { key: i, className: "min-h-[120px] border-r border-b border-border/30 p-2" }, /* @__PURE__ */ React17__default.createElement(Skeleton, { className: "h-4 w-6 mb-2" }), /* @__PURE__ */ React17__default.createElement("div", { className: "space-y-1" }, Math.random() > 0.5 && /* @__PURE__ */ React17__default.createElement(Skeleton, { className: "h-5 w-full rounded-md" }), Math.random() > 0.7 && /* @__PURE__ */ React17__default.createElement(Skeleton, { className: "h-5 w-3/4 rounded-md" }))))));
|
|
3722
|
+
var WeekViewSkeleton = () => /* @__PURE__ */ React17__default.createElement("div", { className: "h-full bg-background border border-border/50 rounded-2xl overflow-hidden" }, /* @__PURE__ */ React17__default.createElement("div", { className: "flex border-b border-border/50 bg-muted/10" }, /* @__PURE__ */ React17__default.createElement("div", { className: "w-16 p-3 border-r border-border/30" }, /* @__PURE__ */ React17__default.createElement(Skeleton, { className: "h-8 w-10 mx-auto" })), /* @__PURE__ */ React17__default.createElement("div", { className: "flex-1 grid grid-cols-7" }, Array.from({ length: 7 }).map((_, i) => /* @__PURE__ */ React17__default.createElement("div", { key: i, className: "py-3 px-2 text-center border-r border-border/30 last:border-r-0" }, /* @__PURE__ */ React17__default.createElement(Skeleton, { className: "h-3 w-8 mx-auto mb-1" }), /* @__PURE__ */ React17__default.createElement(Skeleton, { className: "h-8 w-8 mx-auto rounded-xl" }))))), /* @__PURE__ */ React17__default.createElement("div", { className: "flex flex-1", style: { height: "600px" } }, /* @__PURE__ */ React17__default.createElement("div", { className: "w-16 border-r border-border/30" }, Array.from({ length: 10 }).map((_, i) => /* @__PURE__ */ React17__default.createElement("div", { key: i, className: "h-[60px] relative" }, /* @__PURE__ */ React17__default.createElement(Skeleton, { className: "h-4 w-10 absolute right-2 -translate-y-1/2" })))), /* @__PURE__ */ React17__default.createElement("div", { className: "flex-1 grid grid-cols-7 relative" }, Array.from({ length: 7 }).map((_, colIdx) => /* @__PURE__ */ React17__default.createElement("div", { key: colIdx, className: "relative border-r border-border/30 last:border-r-0" }, Array.from({ length: 10 }).map((_2, rowIdx) => /* @__PURE__ */ React17__default.createElement("div", { key: rowIdx, className: "h-[60px] border-b border-dashed border-border/20" })), Math.random() > 0.3 && /* @__PURE__ */ React17__default.createElement(
|
|
3604
3723
|
Skeleton,
|
|
3605
3724
|
{
|
|
3606
3725
|
className: "absolute rounded-md",
|
|
@@ -3612,20 +3731,20 @@ var WeekViewSkeleton = () => /* @__PURE__ */ React15__default.createElement("div
|
|
|
3612
3731
|
}
|
|
3613
3732
|
}
|
|
3614
3733
|
))))));
|
|
3615
|
-
var DayViewSkeleton = () => /* @__PURE__ */
|
|
3734
|
+
var DayViewSkeleton = () => /* @__PURE__ */ React17__default.createElement("div", { className: "h-full bg-background border border-border/50 rounded-2xl overflow-hidden" }, /* @__PURE__ */ React17__default.createElement("div", { className: "px-6 py-4 border-b border-border/50 bg-muted/10 text-center" }, /* @__PURE__ */ React17__default.createElement(Skeleton, { className: "h-7 w-64 mx-auto" })), /* @__PURE__ */ React17__default.createElement("div", { className: "flex flex-1", style: { height: "600px" } }, /* @__PURE__ */ React17__default.createElement("div", { className: "w-20 border-r border-border/30 bg-muted/5" }, Array.from({ length: 10 }).map((_, i) => /* @__PURE__ */ React17__default.createElement("div", { key: i, className: "h-[80px] relative" }, /* @__PURE__ */ React17__default.createElement(Skeleton, { className: "h-4 w-12 absolute left-1/2 -translate-x-1/2 -translate-y-1/2" })))), /* @__PURE__ */ React17__default.createElement("div", { className: "flex-1 relative" }, Array.from({ length: 10 }).map((_, i) => /* @__PURE__ */ React17__default.createElement("div", { key: i, className: "h-[80px] border-b border-dashed border-border/20" })), /* @__PURE__ */ React17__default.createElement(
|
|
3616
3735
|
Skeleton,
|
|
3617
3736
|
{
|
|
3618
3737
|
className: "absolute rounded-lg left-4 right-4",
|
|
3619
3738
|
style: { top: "160px", height: "120px" }
|
|
3620
3739
|
}
|
|
3621
|
-
), /* @__PURE__ */
|
|
3740
|
+
), /* @__PURE__ */ React17__default.createElement(
|
|
3622
3741
|
Skeleton,
|
|
3623
3742
|
{
|
|
3624
3743
|
className: "absolute rounded-lg left-4 right-4",
|
|
3625
3744
|
style: { top: "400px", height: "80px" }
|
|
3626
3745
|
}
|
|
3627
3746
|
))));
|
|
3628
|
-
var AgendaViewSkeleton = () => /* @__PURE__ */
|
|
3747
|
+
var AgendaViewSkeleton = () => /* @__PURE__ */ React17__default.createElement("div", { className: "h-full bg-background border border-border/50 rounded-2xl overflow-hidden p-6" }, /* @__PURE__ */ React17__default.createElement("div", { className: "space-y-6" }, Array.from({ length: 4 }).map((_, dayIdx) => /* @__PURE__ */ React17__default.createElement("div", { key: dayIdx }, /* @__PURE__ */ React17__default.createElement(Skeleton, { className: "h-5 w-40 mb-4" }), /* @__PURE__ */ React17__default.createElement("div", { className: "space-y-3" }, Array.from({ length: 2 + Math.floor(Math.random() * 3) }).map((_2, eventIdx) => /* @__PURE__ */ React17__default.createElement("div", { key: eventIdx, className: "flex items-center gap-4 p-3 rounded-xl bg-muted/10" }, /* @__PURE__ */ React17__default.createElement(Skeleton, { className: "h-10 w-10 rounded-lg" }), /* @__PURE__ */ React17__default.createElement("div", { className: "flex-1 space-y-2" }, /* @__PURE__ */ React17__default.createElement(Skeleton, { className: "h-4 w-3/4" }), /* @__PURE__ */ React17__default.createElement(Skeleton, { className: "h-3 w-1/2" })))))))));
|
|
3629
3748
|
var EventContextMenu = ({
|
|
3630
3749
|
event,
|
|
3631
3750
|
position,
|
|
@@ -3666,7 +3785,7 @@ var EventContextMenu = ({
|
|
|
3666
3785
|
...onEdit ? [{
|
|
3667
3786
|
id: "edit",
|
|
3668
3787
|
label: translations?.edit || "Edit",
|
|
3669
|
-
icon: /* @__PURE__ */
|
|
3788
|
+
icon: /* @__PURE__ */ React17__default.createElement(Edit3, { className: "w-4 h-4" }),
|
|
3670
3789
|
onClick: () => {
|
|
3671
3790
|
onEdit(event);
|
|
3672
3791
|
onClose();
|
|
@@ -3675,7 +3794,7 @@ var EventContextMenu = ({
|
|
|
3675
3794
|
...onDuplicate ? [{
|
|
3676
3795
|
id: "duplicate",
|
|
3677
3796
|
label: translations?.duplicate || "Duplicate",
|
|
3678
|
-
icon: /* @__PURE__ */
|
|
3797
|
+
icon: /* @__PURE__ */ React17__default.createElement(Copy, { className: "w-4 h-4" }),
|
|
3679
3798
|
onClick: () => {
|
|
3680
3799
|
onDuplicate(event);
|
|
3681
3800
|
onClose();
|
|
@@ -3685,7 +3804,7 @@ var EventContextMenu = ({
|
|
|
3685
3804
|
...onDelete ? [{
|
|
3686
3805
|
id: "delete",
|
|
3687
3806
|
label: translations?.delete || "Delete",
|
|
3688
|
-
icon: /* @__PURE__ */
|
|
3807
|
+
icon: /* @__PURE__ */ React17__default.createElement(Trash2, { className: "w-4 h-4" }),
|
|
3689
3808
|
onClick: () => {
|
|
3690
3809
|
onDelete(event.id);
|
|
3691
3810
|
onClose();
|
|
@@ -3697,7 +3816,7 @@ var EventContextMenu = ({
|
|
|
3697
3816
|
x: Math.min(position.x, window.innerWidth - 200),
|
|
3698
3817
|
y: Math.min(position.y, window.innerHeight - (actions.length * 44 + 80))
|
|
3699
3818
|
};
|
|
3700
|
-
return /* @__PURE__ */
|
|
3819
|
+
return /* @__PURE__ */ React17__default.createElement(AnimatePresence, null, /* @__PURE__ */ React17__default.createElement(
|
|
3701
3820
|
motion.div,
|
|
3702
3821
|
{
|
|
3703
3822
|
ref: menuRef,
|
|
@@ -3711,14 +3830,14 @@ var EventContextMenu = ({
|
|
|
3711
3830
|
top: adjustedPosition.y
|
|
3712
3831
|
}
|
|
3713
3832
|
},
|
|
3714
|
-
/* @__PURE__ */
|
|
3833
|
+
/* @__PURE__ */ React17__default.createElement("div", { className: "px-3 py-2 border-b-[0.5px] border-border bg-muted/30" }, /* @__PURE__ */ React17__default.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React17__default.createElement(
|
|
3715
3834
|
"div",
|
|
3716
3835
|
{
|
|
3717
3836
|
className: "w-2.5 h-2.5 rounded-full shrink-0",
|
|
3718
3837
|
style: { backgroundColor: event.color || "var(--primary)" }
|
|
3719
3838
|
}
|
|
3720
|
-
), /* @__PURE__ */
|
|
3721
|
-
/* @__PURE__ */
|
|
3839
|
+
), /* @__PURE__ */ React17__default.createElement("span", { className: "text-sm font-medium truncate text-foreground" }, event.title))),
|
|
3840
|
+
/* @__PURE__ */ React17__default.createElement("div", { className: "py-1" }, actions.map((action, index) => /* @__PURE__ */ React17__default.createElement(React17__default.Fragment, { key: action.id }, index > 0 && action.variant === "danger" && /* @__PURE__ */ React17__default.createElement("div", { className: "h-px bg-border my-1" }), /* @__PURE__ */ React17__default.createElement(
|
|
3722
3841
|
"button",
|
|
3723
3842
|
{
|
|
3724
3843
|
onClick: action.onClick,
|
|
@@ -3730,7 +3849,7 @@ var EventContextMenu = ({
|
|
|
3730
3849
|
)
|
|
3731
3850
|
},
|
|
3732
3851
|
action.icon,
|
|
3733
|
-
/* @__PURE__ */
|
|
3852
|
+
/* @__PURE__ */ React17__default.createElement("span", null, action.label)
|
|
3734
3853
|
))))
|
|
3735
3854
|
));
|
|
3736
3855
|
};
|
|
@@ -4185,6 +4304,7 @@ var Scheduler = ({
|
|
|
4185
4304
|
translations,
|
|
4186
4305
|
hideViewSwitcher,
|
|
4187
4306
|
hideLanguageSwitcher,
|
|
4307
|
+
hideFab = false,
|
|
4188
4308
|
initialScrollHour = 8,
|
|
4189
4309
|
reverseTime: reverseTimeProp = false,
|
|
4190
4310
|
language = "tr",
|
|
@@ -4377,7 +4497,7 @@ var Scheduler = ({
|
|
|
4377
4497
|
(e) => e.start >= rangeStart && e.start <= rangeEnd
|
|
4378
4498
|
).length;
|
|
4379
4499
|
}, [filteredEvents, view, currentDate]);
|
|
4380
|
-
return /* @__PURE__ */
|
|
4500
|
+
return /* @__PURE__ */ React17__default.createElement(React17__default.Fragment, null, /* @__PURE__ */ React17__default.createElement(
|
|
4381
4501
|
DndContext,
|
|
4382
4502
|
{
|
|
4383
4503
|
id,
|
|
@@ -4386,7 +4506,7 @@ var Scheduler = ({
|
|
|
4386
4506
|
onDragEnd: onDragEndWrapper,
|
|
4387
4507
|
modifiers
|
|
4388
4508
|
},
|
|
4389
|
-
/* @__PURE__ */
|
|
4509
|
+
/* @__PURE__ */ React17__default.createElement(
|
|
4390
4510
|
"div",
|
|
4391
4511
|
{
|
|
4392
4512
|
ref: schedulerRef,
|
|
@@ -4408,7 +4528,7 @@ var Scheduler = ({
|
|
|
4408
4528
|
isDarkMode,
|
|
4409
4529
|
onThemeToggle
|
|
4410
4530
|
})
|
|
4411
|
-
) : /* @__PURE__ */
|
|
4531
|
+
) : /* @__PURE__ */ React17__default.createElement(
|
|
4412
4532
|
CalendarHeader,
|
|
4413
4533
|
{
|
|
4414
4534
|
currentDate,
|
|
@@ -4436,7 +4556,7 @@ var Scheduler = ({
|
|
|
4436
4556
|
hideLanguageSwitcher
|
|
4437
4557
|
}
|
|
4438
4558
|
),
|
|
4439
|
-
/* @__PURE__ */
|
|
4559
|
+
/* @__PURE__ */ React17__default.createElement("div", { className: "flex flex-1 overflow-hidden" }, /* @__PURE__ */ React17__default.createElement(
|
|
4440
4560
|
motion.div,
|
|
4441
4561
|
{
|
|
4442
4562
|
className: "hidden md:block overflow-hidden shrink-0",
|
|
@@ -4450,7 +4570,7 @@ var Scheduler = ({
|
|
|
4450
4570
|
ease: [0.4, 0, 0.2, 1]
|
|
4451
4571
|
}
|
|
4452
4572
|
},
|
|
4453
|
-
/* @__PURE__ */
|
|
4573
|
+
/* @__PURE__ */ React17__default.createElement(
|
|
4454
4574
|
Sidebar,
|
|
4455
4575
|
{
|
|
4456
4576
|
currentDate,
|
|
@@ -4482,7 +4602,7 @@ var Scheduler = ({
|
|
|
4482
4602
|
}
|
|
4483
4603
|
}
|
|
4484
4604
|
)
|
|
4485
|
-
), /* @__PURE__ */
|
|
4605
|
+
), /* @__PURE__ */ React17__default.createElement(AnimatePresence, null, isSidebarOpen && /* @__PURE__ */ React17__default.createElement(
|
|
4486
4606
|
motion.div,
|
|
4487
4607
|
{
|
|
4488
4608
|
key: "mobile-sidebar-overlay",
|
|
@@ -4492,7 +4612,7 @@ var Scheduler = ({
|
|
|
4492
4612
|
exit: { opacity: 0 },
|
|
4493
4613
|
transition: { duration: 0.2 }
|
|
4494
4614
|
},
|
|
4495
|
-
/* @__PURE__ */
|
|
4615
|
+
/* @__PURE__ */ React17__default.createElement(
|
|
4496
4616
|
motion.div,
|
|
4497
4617
|
{
|
|
4498
4618
|
className: "w-[280px] h-full bg-background shadow-2xl overflow-hidden",
|
|
@@ -4501,7 +4621,7 @@ var Scheduler = ({
|
|
|
4501
4621
|
exit: { x: -280 },
|
|
4502
4622
|
transition: { duration: 0.25, ease: [0.4, 0, 0.2, 1] }
|
|
4503
4623
|
},
|
|
4504
|
-
/* @__PURE__ */
|
|
4624
|
+
/* @__PURE__ */ React17__default.createElement(
|
|
4505
4625
|
Sidebar,
|
|
4506
4626
|
{
|
|
4507
4627
|
currentDate,
|
|
@@ -4539,16 +4659,16 @@ var Scheduler = ({
|
|
|
4539
4659
|
}
|
|
4540
4660
|
)
|
|
4541
4661
|
),
|
|
4542
|
-
/* @__PURE__ */
|
|
4662
|
+
/* @__PURE__ */ React17__default.createElement(
|
|
4543
4663
|
motion.div,
|
|
4544
4664
|
{
|
|
4545
4665
|
className: "flex-1 bg-black/50 backdrop-blur-sm",
|
|
4546
4666
|
onClick: () => setIsSidebarOpen(false)
|
|
4547
4667
|
}
|
|
4548
4668
|
)
|
|
4549
|
-
)), /* @__PURE__ */
|
|
4669
|
+
)), /* @__PURE__ */ React17__default.createElement("div", { className: "flex-1 flex flex-col overflow-hidden relative min-h-0" }, activeCustomMenu !== null && sidebarMenus && /* @__PURE__ */ React17__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__ */ React17__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__ */ React17__default.createElement("div", { className: "flex-1 overflow-auto p-0 md:p-4 min-h-0" }, /* @__PURE__ */ React17__default.createElement("div", { className: "h-full min-w-full" }, view === "month" && /* @__PURE__ */ React17__default.createElement(MonthViewSkeleton, null), view === "week" && /* @__PURE__ */ React17__default.createElement(WeekViewSkeleton, null), view === "day" && /* @__PURE__ */ React17__default.createElement(DayViewSkeleton, null), view === "agenda" && /* @__PURE__ */ React17__default.createElement(AgendaViewSkeleton, null), view === "resource" && /* @__PURE__ */ React17__default.createElement(WeekViewSkeleton, null))) : (
|
|
4550
4670
|
/* overflow-hidden here: each view owns its own scroll container */
|
|
4551
|
-
/* @__PURE__ */
|
|
4671
|
+
/* @__PURE__ */ React17__default.createElement("div", { ref: swipeRef, className: "flex-1 overflow-hidden p-0 md:p-4 touch-pan-y min-h-0" }, /* @__PURE__ */ React17__default.createElement("div", { className: "flex flex-col h-full min-w-full min-h-0" }, /* @__PURE__ */ React17__default.createElement(AnimatePresence, { mode: "wait", initial: false }, /* @__PURE__ */ React17__default.createElement(
|
|
4552
4672
|
motion.div,
|
|
4553
4673
|
{
|
|
4554
4674
|
key: `${view}-${currentDate.toISOString()}-${timezone || "local"}`,
|
|
@@ -4572,7 +4692,7 @@ var Scheduler = ({
|
|
|
4572
4692
|
className: "flex-1 min-h-0 flex flex-col",
|
|
4573
4693
|
style: { height: "100%" }
|
|
4574
4694
|
},
|
|
4575
|
-
view === "month" && /* @__PURE__ */
|
|
4695
|
+
view === "month" && /* @__PURE__ */ React17__default.createElement(
|
|
4576
4696
|
MonthView,
|
|
4577
4697
|
{
|
|
4578
4698
|
currentDate,
|
|
@@ -4583,7 +4703,7 @@ var Scheduler = ({
|
|
|
4583
4703
|
locale
|
|
4584
4704
|
}
|
|
4585
4705
|
),
|
|
4586
|
-
view === "week" && /* @__PURE__ */
|
|
4706
|
+
view === "week" && /* @__PURE__ */ React17__default.createElement(
|
|
4587
4707
|
WeekView,
|
|
4588
4708
|
{
|
|
4589
4709
|
currentDate,
|
|
@@ -4599,7 +4719,7 @@ var Scheduler = ({
|
|
|
4599
4719
|
reverseTime
|
|
4600
4720
|
}
|
|
4601
4721
|
),
|
|
4602
|
-
view === "day" && /* @__PURE__ */
|
|
4722
|
+
view === "day" && /* @__PURE__ */ React17__default.createElement(
|
|
4603
4723
|
DayView,
|
|
4604
4724
|
{
|
|
4605
4725
|
currentDate,
|
|
@@ -4615,7 +4735,7 @@ var Scheduler = ({
|
|
|
4615
4735
|
reverseTime
|
|
4616
4736
|
}
|
|
4617
4737
|
),
|
|
4618
|
-
view === "agenda" && /* @__PURE__ */
|
|
4738
|
+
view === "agenda" && /* @__PURE__ */ React17__default.createElement(
|
|
4619
4739
|
AgendaView,
|
|
4620
4740
|
{
|
|
4621
4741
|
currentDate,
|
|
@@ -4627,7 +4747,7 @@ var Scheduler = ({
|
|
|
4627
4747
|
renderEmptyState
|
|
4628
4748
|
}
|
|
4629
4749
|
),
|
|
4630
|
-
view === "resource" && resources && /* @__PURE__ */
|
|
4750
|
+
view === "resource" && resources && /* @__PURE__ */ React17__default.createElement(
|
|
4631
4751
|
ResourceView,
|
|
4632
4752
|
{
|
|
4633
4753
|
currentDate,
|
|
@@ -4651,7 +4771,7 @@ var Scheduler = ({
|
|
|
4651
4771
|
initialDate: modalInitialDate,
|
|
4652
4772
|
onSave: handleModalSave,
|
|
4653
4773
|
onDelete: handleModalDelete
|
|
4654
|
-
}) : /* @__PURE__ */
|
|
4774
|
+
}) : /* @__PURE__ */ React17__default.createElement(
|
|
4655
4775
|
EventModal,
|
|
4656
4776
|
{
|
|
4657
4777
|
isOpen: isModalOpen,
|
|
@@ -4666,7 +4786,7 @@ var Scheduler = ({
|
|
|
4666
4786
|
language
|
|
4667
4787
|
}
|
|
4668
4788
|
),
|
|
4669
|
-
/* @__PURE__ */
|
|
4789
|
+
/* @__PURE__ */ React17__default.createElement(
|
|
4670
4790
|
EventContextMenu,
|
|
4671
4791
|
{
|
|
4672
4792
|
event: contextMenuEvent,
|
|
@@ -4699,7 +4819,7 @@ var Scheduler = ({
|
|
|
4699
4819
|
}
|
|
4700
4820
|
}
|
|
4701
4821
|
),
|
|
4702
|
-
/* @__PURE__ */
|
|
4822
|
+
/* @__PURE__ */ React17__default.createElement(DragOverlay, { dropAnimation: null }, activeDragEvent ? /* @__PURE__ */ React17__default.createElement(
|
|
4703
4823
|
"div",
|
|
4704
4824
|
{
|
|
4705
4825
|
className: cn(
|
|
@@ -4717,17 +4837,17 @@ var Scheduler = ({
|
|
|
4717
4837
|
transform: "rotate(-2deg) scale(1.02)"
|
|
4718
4838
|
}
|
|
4719
4839
|
},
|
|
4720
|
-
/* @__PURE__ */
|
|
4840
|
+
/* @__PURE__ */ React17__default.createElement("div", { className: "p-2.5 h-full flex flex-col" }, /* @__PURE__ */ React17__default.createElement(
|
|
4721
4841
|
"div",
|
|
4722
4842
|
{
|
|
4723
4843
|
className: "absolute left-0 top-0 bottom-0 w-1 rounded-l-lg",
|
|
4724
4844
|
style: { backgroundColor: activeDragEvent.color || "var(--primary)" }
|
|
4725
4845
|
}
|
|
4726
|
-
), /* @__PURE__ */
|
|
4846
|
+
), /* @__PURE__ */ React17__default.createElement("div", { className: "pl-2" }, /* @__PURE__ */ React17__default.createElement("div", { className: "font-semibold truncate text-sm" }, activeDragEvent.title), (view === "week" || view === "day") && getDragHeight() && getDragHeight() > 40 && /* @__PURE__ */ React17__default.createElement("div", { className: "text-xs opacity-80 mt-0.5 flex items-center gap-1" }, /* @__PURE__ */ React17__default.createElement("svg", { className: "w-3 h-3", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2" }, /* @__PURE__ */ React17__default.createElement("circle", { cx: "12", cy: "12", r: "10" }), /* @__PURE__ */ React17__default.createElement("path", { d: "M12 6v6l4 2" })), format(activeDragEvent.start, getTimeFormatFull(language)), " - ", format(activeDragEvent.end, getTimeFormatFull(language)))), /* @__PURE__ */ React17__default.createElement("div", { className: "absolute bottom-1.5 right-1.5 opacity-60" }, /* @__PURE__ */ React17__default.createElement("svg", { className: "w-4 h-4", viewBox: "0 0 24 24", fill: "currentColor" }, /* @__PURE__ */ React17__default.createElement("circle", { cx: "9", cy: "5", r: "1.5" }), /* @__PURE__ */ React17__default.createElement("circle", { cx: "15", cy: "5", r: "1.5" }), /* @__PURE__ */ React17__default.createElement("circle", { cx: "9", cy: "12", r: "1.5" }), /* @__PURE__ */ React17__default.createElement("circle", { cx: "15", cy: "12", r: "1.5" }), /* @__PURE__ */ React17__default.createElement("circle", { cx: "9", cy: "19", r: "1.5" }), /* @__PURE__ */ React17__default.createElement("circle", { cx: "15", cy: "19", r: "1.5" }))))
|
|
4727
4847
|
) : null)
|
|
4728
4848
|
)
|
|
4729
|
-
), isMounted && isMobile && !readOnly && createPortal(
|
|
4730
|
-
/* @__PURE__ */
|
|
4849
|
+
), isMounted && isMobile && !readOnly && !hideFab && createPortal(
|
|
4850
|
+
/* @__PURE__ */ React17__default.createElement(
|
|
4731
4851
|
"div",
|
|
4732
4852
|
{
|
|
4733
4853
|
style: {
|
|
@@ -4739,7 +4859,7 @@ var Scheduler = ({
|
|
|
4739
4859
|
...fabCssVars
|
|
4740
4860
|
}
|
|
4741
4861
|
},
|
|
4742
|
-
/* @__PURE__ */
|
|
4862
|
+
/* @__PURE__ */ React17__default.createElement(
|
|
4743
4863
|
"button",
|
|
4744
4864
|
{
|
|
4745
4865
|
type: "button",
|
|
@@ -4760,7 +4880,7 @@ var Scheduler = ({
|
|
|
4760
4880
|
boxShadow: "0 10px 25px -5px rgba(0, 0, 0, 0.25)"
|
|
4761
4881
|
}
|
|
4762
4882
|
},
|
|
4763
|
-
/* @__PURE__ */
|
|
4883
|
+
/* @__PURE__ */ React17__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__ */ React17__default.createElement("path", { d: "M5 12h14" }), /* @__PURE__ */ React17__default.createElement("path", { d: "M12 5v14" }))
|
|
4764
4884
|
)
|
|
4765
4885
|
),
|
|
4766
4886
|
document.body
|
|
@@ -4768,6 +4888,6 @@ var Scheduler = ({
|
|
|
4768
4888
|
};
|
|
4769
4889
|
var ProScheduler = Scheduler;
|
|
4770
4890
|
|
|
4771
|
-
export { DATE_FNS_LOCALES, LANGUAGE_META, LOCALES, ProScheduler, Scheduler, cn, getTranslations };
|
|
4891
|
+
export { DATE_FNS_LOCALES, EVENT_BADGES, EVENT_BADGE_ICONS, LANGUAGE_META, LOCALES, ProScheduler, Scheduler, cn, getEventBadge, getTranslations, isBuiltInEventBadgeId, resolveEventBadge };
|
|
4772
4892
|
//# sourceMappingURL=index.mjs.map
|
|
4773
4893
|
//# sourceMappingURL=index.mjs.map
|