@moontra/moonui-pro 2.16.0 → 2.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +129 -17
- package/dist/index.mjs +1128 -155
- package/package.json +3 -1
- package/src/components/calendar-pro/index.tsx +1556 -0
- package/src/components/index.ts +3 -0
package/dist/index.mjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { clsx } from 'clsx';
|
|
2
2
|
import { twMerge } from 'tailwind-merge';
|
|
3
3
|
import * as t from 'react';
|
|
4
|
-
import t__default, { useState, useRef, useCallback, forwardRef, createContext, useEffect,
|
|
4
|
+
import t__default, { useState, useRef, useCallback, useMemo, forwardRef, createContext, useEffect, useContext, useLayoutEffect, useDebugValue, Component } from 'react';
|
|
5
5
|
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
6
|
-
import { ChevronDown, Info, AlertCircle, AlertTriangle, Check, X, MoreHorizontal, Loader2, Minus, Search, ChevronRight, Circle, ChevronUp, Lock, Sparkles, Plus, Upload, Play, Eye, CheckCircle2, Pause, RotateCcw,
|
|
6
|
+
import { ChevronDown, Info, AlertCircle, AlertTriangle, Check, X, MoreHorizontal, Loader2, Minus, Search, ChevronRight, Circle, ChevronUp, Lock, Sparkles, Plus, PanelLeft, PanelRight, ChevronLeft, Download, FileText, FileSpreadsheet, FileCode, Printer, Share2, Settings, Upload, Play, Eye, CheckCircle2, Pause, RotateCcw, Copy, Share, Trash2, CreditCard, Globe, XCircle, Clock, HelpCircle, Calendar as Calendar$1, Repeat, Edit, MapPin, Users, User, Briefcase, ClipboardList, Bell, Cake, Tag, Filter, Move, Archive, EyeOff, Timer, Palette, ArrowUpDown, Star, Square, CheckSquare, Bold, Italic, Underline, Strikethrough, Code, Type, Heading1, Heading2, Heading3, AlignLeft, AlignCenter, AlignRight, AlignJustify, List, ListOrdered, Quote, Highlighter, Link2, Image as Image$1, Table as Table$1, Undo, Redo, RefreshCw, Wand2, Maximize, MessageSquare, Heart, GraduationCap, Zap, Languages, Lightbulb, Target, GitBranch, ArrowRight, MoreVertical, Trash, ExternalLink, TrendingUp, MessageCircle, Paperclip, TrendingDown, ZoomOut, ZoomIn, FileJson, Maximize2, Menu, CheckCheck, CheckCircle, Settings2, LogOut, Edit3, LayoutGrid, Save, Video, Music, File, FileDown, ArrowUp, ArrowDown, ChevronsLeft, ChevronsRight, Pin, Sun, Moon, Monitor, Activity, Send, Flag, CalendarIcon, DollarSign, Github, GitFork, Server, RotateCw, Cpu, MemoryStick, HardDrive, Network, BarChart3, Columns, Grip, Unlock, Minimize2, Map as Map$1, BellOff, ArrowDownRight, ArrowUpRight } from 'lucide-react';
|
|
7
7
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
8
8
|
import { cva } from 'class-variance-authority';
|
|
9
9
|
import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
10
|
-
import {
|
|
11
|
-
import { motion, AnimatePresence, useMotionValue, useSpring, useTransform, animate, Reorder, useDragControls } from 'framer-motion';
|
|
10
|
+
import { startOfDay, endOfDay, addDays, startOfYear, endOfYear, startOfMonth, endOfMonth, startOfWeek, endOfWeek, isWithinInterval, isBefore, isAfter, subYears, addYears, subMonths, addMonths, subWeeks, addWeeks, subDays, addHours, differenceInMinutes, addMinutes, format, isSameDay, setHours, isToday, eachDayOfInterval, isSameMonth, eachMonthOfInterval, getDay, getDaysInMonth, formatDistanceToNow } from 'date-fns';
|
|
11
|
+
import { motion, AnimatePresence, useMotionValue, useSpring, useTransform, animate, LayoutGroup, Reorder, useDragControls } from 'framer-motion';
|
|
12
12
|
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
13
13
|
import * as ReactDOM from 'react-dom';
|
|
14
14
|
import ReactDOM__default from 'react-dom';
|
|
@@ -4054,7 +4054,7 @@ var me = t.forwardRef((r2, o) => {
|
|
|
4054
4054
|
var e;
|
|
4055
4055
|
return Array.from(((e = I.current) == null ? void 0 : e.querySelectorAll(ce)) || []);
|
|
4056
4056
|
}
|
|
4057
|
-
function
|
|
4057
|
+
function X23(e) {
|
|
4058
4058
|
let s = V()[e];
|
|
4059
4059
|
s && E.setState("value", s.getAttribute(T));
|
|
4060
4060
|
}
|
|
@@ -4069,10 +4069,10 @@ var me = t.forwardRef((r2, o) => {
|
|
|
4069
4069
|
s = e > 0 ? we(s, N) : De(s, N), i = s == null ? void 0 : s.querySelector(ce);
|
|
4070
4070
|
i ? E.setState("value", i.getAttribute(T)) : Q(e);
|
|
4071
4071
|
}
|
|
4072
|
-
let oe = () =>
|
|
4072
|
+
let oe = () => X23(V().length - 1), ie3 = (e) => {
|
|
4073
4073
|
e.preventDefault(), e.metaKey ? oe() : e.altKey ? re(1) : Q(1);
|
|
4074
4074
|
}, se = (e) => {
|
|
4075
|
-
e.preventDefault(), e.metaKey ?
|
|
4075
|
+
e.preventDefault(), e.metaKey ? X23(0) : e.altKey ? re(-1) : Q(-1);
|
|
4076
4076
|
};
|
|
4077
4077
|
return t.createElement(Primitive2.div, { ref: o, tabIndex: -1, ...O, "cmdk-root": "", onKeyDown: (e) => {
|
|
4078
4078
|
var s;
|
|
@@ -4099,7 +4099,7 @@ var me = t.forwardRef((r2, o) => {
|
|
|
4099
4099
|
break;
|
|
4100
4100
|
}
|
|
4101
4101
|
case "Home": {
|
|
4102
|
-
e.preventDefault(),
|
|
4102
|
+
e.preventDefault(), X23(0);
|
|
4103
4103
|
break;
|
|
4104
4104
|
}
|
|
4105
4105
|
case "End": {
|
|
@@ -10890,7 +10890,7 @@ function Calendar3({
|
|
|
10890
10890
|
return false;
|
|
10891
10891
|
}
|
|
10892
10892
|
};
|
|
10893
|
-
const
|
|
10893
|
+
const isToday3 = (date) => {
|
|
10894
10894
|
return date.toDateString() === today.toDateString();
|
|
10895
10895
|
};
|
|
10896
10896
|
const isCurrentMonth = (date) => {
|
|
@@ -11072,7 +11072,7 @@ function Calendar3({
|
|
|
11072
11072
|
filteredDays.map((date, index2) => {
|
|
11073
11073
|
const dayEvents = getEventsForDate(date);
|
|
11074
11074
|
const isCurrentMonthDate = isCurrentMonth(date);
|
|
11075
|
-
const isTodayDate =
|
|
11075
|
+
const isTodayDate = isToday3(date);
|
|
11076
11076
|
const isSelectedDate = isSelected(date);
|
|
11077
11077
|
const isDisabledDate = isDisabled(date);
|
|
11078
11078
|
return /* @__PURE__ */ jsxs(
|
|
@@ -11178,7 +11178,7 @@ function Calendar3({
|
|
|
11178
11178
|
/* @__PURE__ */ jsx("div", { className: "text-xs font-medium text-muted-foreground", children: DAYS_OF_WEEK[i] }),
|
|
11179
11179
|
/* @__PURE__ */ jsx("div", { className: cn(
|
|
11180
11180
|
"text-sm font-medium",
|
|
11181
|
-
|
|
11181
|
+
isToday3(date) && "text-primary"
|
|
11182
11182
|
), children: date.getDate() })
|
|
11183
11183
|
] }, i);
|
|
11184
11184
|
})
|
|
@@ -11199,7 +11199,7 @@ function Calendar3({
|
|
|
11199
11199
|
{
|
|
11200
11200
|
className: cn(
|
|
11201
11201
|
"p-1 min-h-[60px] border-r last:border-r-0 hover:bg-muted/50 transition-colors",
|
|
11202
|
-
|
|
11202
|
+
isToday3(date) && "bg-primary/5"
|
|
11203
11203
|
),
|
|
11204
11204
|
onClick: () => handleDateClick(date),
|
|
11205
11205
|
children: hourEvents.map((event) => /* @__PURE__ */ jsxs(
|
|
@@ -11465,6 +11465,979 @@ function Calendar3({
|
|
|
11465
11465
|
)
|
|
11466
11466
|
] });
|
|
11467
11467
|
}
|
|
11468
|
+
var defaultCategories = [
|
|
11469
|
+
{ id: "personal", name: "Personal", color: "#3b82f6", icon: /* @__PURE__ */ jsx(User, { className: "h-4 w-4" }) },
|
|
11470
|
+
{ id: "work", name: "Work", color: "#10b981", icon: /* @__PURE__ */ jsx(Briefcase, { className: "h-4 w-4" }) },
|
|
11471
|
+
{ id: "meeting", name: "Meeting", color: "#f59e0b", icon: /* @__PURE__ */ jsx(Users, { className: "h-4 w-4" }) },
|
|
11472
|
+
{ id: "task", name: "Task", color: "#8b5cf6", icon: /* @__PURE__ */ jsx(ClipboardList, { className: "h-4 w-4" }) },
|
|
11473
|
+
{ id: "reminder", name: "Reminder", color: "#ef4444", icon: /* @__PURE__ */ jsx(Bell, { className: "h-4 w-4" }) },
|
|
11474
|
+
{ id: "holiday", name: "Holiday", color: "#ec4899", icon: /* @__PURE__ */ jsx(Calendar$1, { className: "h-4 w-4" }) },
|
|
11475
|
+
{ id: "birthday", name: "Birthday", color: "#f472b6", icon: /* @__PURE__ */ jsx(Cake, { className: "h-4 w-4" }) },
|
|
11476
|
+
{ id: "other", name: "Other", color: "#6b7280", icon: /* @__PURE__ */ jsx(Tag, { className: "h-4 w-4" }) }
|
|
11477
|
+
];
|
|
11478
|
+
var defaultViews = [
|
|
11479
|
+
{ id: "day", name: "Day", type: "day" },
|
|
11480
|
+
{ id: "week", name: "Week", type: "week", default: true },
|
|
11481
|
+
{ id: "month", name: "Month", type: "month" },
|
|
11482
|
+
{ id: "year", name: "Year", type: "year" },
|
|
11483
|
+
{ id: "agenda", name: "Agenda", type: "agenda" }
|
|
11484
|
+
];
|
|
11485
|
+
var CalendarPro = t.forwardRef(({
|
|
11486
|
+
events = [],
|
|
11487
|
+
categories = defaultCategories,
|
|
11488
|
+
views = defaultViews,
|
|
11489
|
+
defaultView,
|
|
11490
|
+
height = "100%",
|
|
11491
|
+
className,
|
|
11492
|
+
sidebarCollapsed: controlledSidebarCollapsed,
|
|
11493
|
+
onSidebarToggle,
|
|
11494
|
+
onEventClick,
|
|
11495
|
+
onEventCreate,
|
|
11496
|
+
onEventUpdate,
|
|
11497
|
+
onEventDelete,
|
|
11498
|
+
onEventDrop,
|
|
11499
|
+
onDateSelect,
|
|
11500
|
+
onViewChange,
|
|
11501
|
+
allowEventCreation = true,
|
|
11502
|
+
allowEventDeletion = true,
|
|
11503
|
+
allowEventDragging = true,
|
|
11504
|
+
showWeekNumbers = true,
|
|
11505
|
+
firstDayOfWeek = 1,
|
|
11506
|
+
timeFormat = "24h",
|
|
11507
|
+
locale = "en-US",
|
|
11508
|
+
workingHours = { start: 9, end: 17 },
|
|
11509
|
+
nonWorkingDays = [0, 6],
|
|
11510
|
+
holidays = [],
|
|
11511
|
+
customEventRenderer,
|
|
11512
|
+
customHeaderRenderer,
|
|
11513
|
+
customCellRenderer,
|
|
11514
|
+
eventColors = {},
|
|
11515
|
+
onExport,
|
|
11516
|
+
onImport,
|
|
11517
|
+
integrations = {},
|
|
11518
|
+
theme = "system",
|
|
11519
|
+
...props
|
|
11520
|
+
}, ref) => {
|
|
11521
|
+
const [internalSidebarCollapsed, setInternalSidebarCollapsed] = useState(false);
|
|
11522
|
+
const sidebarCollapsed = controlledSidebarCollapsed ?? internalSidebarCollapsed;
|
|
11523
|
+
const setSidebarCollapsed = useCallback((collapsed) => {
|
|
11524
|
+
setInternalSidebarCollapsed(collapsed);
|
|
11525
|
+
onSidebarToggle?.(collapsed);
|
|
11526
|
+
}, [onSidebarToggle]);
|
|
11527
|
+
const [currentDate, setCurrentDate] = useState(/* @__PURE__ */ new Date());
|
|
11528
|
+
const [currentView, setCurrentView] = useState(() => {
|
|
11529
|
+
if (defaultView) {
|
|
11530
|
+
return defaultView;
|
|
11531
|
+
}
|
|
11532
|
+
const defaultViewObj = views.find((v) => v.default);
|
|
11533
|
+
return defaultViewObj ? defaultViewObj.id : views[0].id;
|
|
11534
|
+
});
|
|
11535
|
+
const [selectedDate, setSelectedDate] = useState(null);
|
|
11536
|
+
const [selectedEvent, setSelectedEvent] = useState(null);
|
|
11537
|
+
const [isEventDialogOpen, setIsEventDialogOpen] = useState(false);
|
|
11538
|
+
const [isCreating, setIsCreating] = useState(false);
|
|
11539
|
+
const [newEventStart, setNewEventStart] = useState(null);
|
|
11540
|
+
const [newEventEnd, setNewEventEnd] = useState(null);
|
|
11541
|
+
const [searchQuery, setSearchQuery] = useState("");
|
|
11542
|
+
const [selectedCategories, setSelectedCategories] = useState([]);
|
|
11543
|
+
const [editingEvent, setEditingEvent] = useState({});
|
|
11544
|
+
const [isDragging, setIsDragging] = useState(false);
|
|
11545
|
+
const [draggedEvent, setDraggedEvent] = useState(null);
|
|
11546
|
+
const [dropTarget, setDropTarget] = useState(null);
|
|
11547
|
+
useRef(null);
|
|
11548
|
+
const currentViewConfig = useMemo(() => {
|
|
11549
|
+
return views.find((v) => v.id === currentView) || views[0];
|
|
11550
|
+
}, [currentView, views]);
|
|
11551
|
+
const filteredEvents = useMemo(() => {
|
|
11552
|
+
return events.filter((event) => {
|
|
11553
|
+
const matchesSearch = !searchQuery || event.title.toLowerCase().includes(searchQuery.toLowerCase()) || event.description?.toLowerCase().includes(searchQuery.toLowerCase()) || event.location?.toLowerCase().includes(searchQuery.toLowerCase()) || event.tags?.some((tag) => tag.toLowerCase().includes(searchQuery.toLowerCase()));
|
|
11554
|
+
const matchesCategory = selectedCategories.length === 0 || event.category && selectedCategories.includes(event.category);
|
|
11555
|
+
return matchesSearch && matchesCategory;
|
|
11556
|
+
});
|
|
11557
|
+
}, [events, searchQuery, selectedCategories]);
|
|
11558
|
+
const eventsInView = useMemo(() => {
|
|
11559
|
+
const viewType = currentViewConfig.type;
|
|
11560
|
+
let start;
|
|
11561
|
+
let end;
|
|
11562
|
+
switch (viewType) {
|
|
11563
|
+
case "day":
|
|
11564
|
+
start = startOfDay(currentDate);
|
|
11565
|
+
end = endOfDay(currentDate);
|
|
11566
|
+
break;
|
|
11567
|
+
case "week":
|
|
11568
|
+
start = startOfWeek(currentDate, { weekStartsOn: firstDayOfWeek });
|
|
11569
|
+
end = endOfWeek(currentDate, { weekStartsOn: firstDayOfWeek });
|
|
11570
|
+
break;
|
|
11571
|
+
case "month":
|
|
11572
|
+
start = startOfMonth(currentDate);
|
|
11573
|
+
end = endOfMonth(currentDate);
|
|
11574
|
+
break;
|
|
11575
|
+
case "year":
|
|
11576
|
+
start = startOfYear(currentDate);
|
|
11577
|
+
end = endOfYear(currentDate);
|
|
11578
|
+
break;
|
|
11579
|
+
case "agenda":
|
|
11580
|
+
start = startOfDay(currentDate);
|
|
11581
|
+
end = addDays(currentDate, 30);
|
|
11582
|
+
break;
|
|
11583
|
+
default:
|
|
11584
|
+
start = startOfDay(currentDate);
|
|
11585
|
+
end = endOfDay(currentDate);
|
|
11586
|
+
}
|
|
11587
|
+
return filteredEvents.filter((event) => {
|
|
11588
|
+
const eventStart = new Date(event.start);
|
|
11589
|
+
const eventEnd = new Date(event.end);
|
|
11590
|
+
return isWithinInterval(eventStart, { start, end }) || isWithinInterval(eventEnd, { start, end }) || isBefore(eventStart, start) && isAfter(eventEnd, end);
|
|
11591
|
+
});
|
|
11592
|
+
}, [filteredEvents, currentDate, currentViewConfig, firstDayOfWeek]);
|
|
11593
|
+
const handleViewChange = useCallback((viewId) => {
|
|
11594
|
+
setCurrentView(viewId);
|
|
11595
|
+
onViewChange?.(viewId);
|
|
11596
|
+
}, [onViewChange]);
|
|
11597
|
+
const navigateDate = useCallback((direction) => {
|
|
11598
|
+
const viewType = currentViewConfig.type;
|
|
11599
|
+
let newDate;
|
|
11600
|
+
switch (viewType) {
|
|
11601
|
+
case "day":
|
|
11602
|
+
newDate = direction === "prev" ? subDays(currentDate, 1) : addDays(currentDate, 1);
|
|
11603
|
+
break;
|
|
11604
|
+
case "week":
|
|
11605
|
+
newDate = direction === "prev" ? subWeeks(currentDate, 1) : addWeeks(currentDate, 1);
|
|
11606
|
+
break;
|
|
11607
|
+
case "month":
|
|
11608
|
+
newDate = direction === "prev" ? subMonths(currentDate, 1) : addMonths(currentDate, 1);
|
|
11609
|
+
break;
|
|
11610
|
+
case "year":
|
|
11611
|
+
newDate = direction === "prev" ? subYears(currentDate, 1) : addYears(currentDate, 1);
|
|
11612
|
+
break;
|
|
11613
|
+
default:
|
|
11614
|
+
newDate = currentDate;
|
|
11615
|
+
}
|
|
11616
|
+
setCurrentDate(newDate);
|
|
11617
|
+
}, [currentDate, currentViewConfig]);
|
|
11618
|
+
const handleDateSelect = useCallback((date) => {
|
|
11619
|
+
setSelectedDate(date);
|
|
11620
|
+
setCurrentDate(date);
|
|
11621
|
+
onDateSelect?.(date);
|
|
11622
|
+
if (allowEventCreation && currentViewConfig.type !== "year") {
|
|
11623
|
+
setNewEventStart(date);
|
|
11624
|
+
setNewEventEnd(addHours(date, 1));
|
|
11625
|
+
setIsCreating(true);
|
|
11626
|
+
setIsEventDialogOpen(true);
|
|
11627
|
+
}
|
|
11628
|
+
}, [allowEventCreation, currentViewConfig, onDateSelect]);
|
|
11629
|
+
const handleEventClick = useCallback((event, e) => {
|
|
11630
|
+
e.stopPropagation();
|
|
11631
|
+
setSelectedEvent(event);
|
|
11632
|
+
setEditingEvent(event);
|
|
11633
|
+
setIsEventDialogOpen(true);
|
|
11634
|
+
setIsCreating(false);
|
|
11635
|
+
onEventClick?.(event, e);
|
|
11636
|
+
}, [onEventClick]);
|
|
11637
|
+
const handleEventSave = useCallback(() => {
|
|
11638
|
+
if (isCreating && onEventCreate) {
|
|
11639
|
+
onEventCreate(editingEvent);
|
|
11640
|
+
} else if (selectedEvent && onEventUpdate) {
|
|
11641
|
+
onEventUpdate({ ...selectedEvent, ...editingEvent });
|
|
11642
|
+
}
|
|
11643
|
+
setIsEventDialogOpen(false);
|
|
11644
|
+
setSelectedEvent(null);
|
|
11645
|
+
setEditingEvent({});
|
|
11646
|
+
setIsCreating(false);
|
|
11647
|
+
setNewEventStart(null);
|
|
11648
|
+
setNewEventEnd(null);
|
|
11649
|
+
}, [isCreating, selectedEvent, editingEvent, onEventCreate, onEventUpdate]);
|
|
11650
|
+
const handleEventDelete = useCallback(() => {
|
|
11651
|
+
if (selectedEvent && onEventDelete) {
|
|
11652
|
+
onEventDelete(selectedEvent.id);
|
|
11653
|
+
setIsEventDialogOpen(false);
|
|
11654
|
+
setSelectedEvent(null);
|
|
11655
|
+
setEditingEvent({});
|
|
11656
|
+
}
|
|
11657
|
+
}, [selectedEvent, onEventDelete]);
|
|
11658
|
+
useCallback((event) => {
|
|
11659
|
+
if (!allowEventDragging)
|
|
11660
|
+
return;
|
|
11661
|
+
setIsDragging(true);
|
|
11662
|
+
setDraggedEvent(event);
|
|
11663
|
+
}, [allowEventDragging]);
|
|
11664
|
+
useCallback((result) => {
|
|
11665
|
+
setIsDragging(false);
|
|
11666
|
+
setDraggedEvent(null);
|
|
11667
|
+
setDropTarget(null);
|
|
11668
|
+
if (!result.destination || !draggedEvent || !onEventDrop)
|
|
11669
|
+
return;
|
|
11670
|
+
const newStart = new Date(result.destination.droppableId);
|
|
11671
|
+
const duration = differenceInMinutes(draggedEvent.end, draggedEvent.start);
|
|
11672
|
+
const newEnd = addMinutes(newStart, duration);
|
|
11673
|
+
onEventDrop(draggedEvent.id, newStart, newEnd);
|
|
11674
|
+
}, [draggedEvent, onEventDrop]);
|
|
11675
|
+
const exportCalendar = useCallback((format7) => {
|
|
11676
|
+
if (onExport) {
|
|
11677
|
+
onExport(format7, eventsInView);
|
|
11678
|
+
} else {
|
|
11679
|
+
const data = eventsInView;
|
|
11680
|
+
let content;
|
|
11681
|
+
let mimeType;
|
|
11682
|
+
let filename;
|
|
11683
|
+
switch (format7) {
|
|
11684
|
+
case "json":
|
|
11685
|
+
content = JSON.stringify(data, null, 2);
|
|
11686
|
+
mimeType = "application/json";
|
|
11687
|
+
filename = "calendar.json";
|
|
11688
|
+
break;
|
|
11689
|
+
case "csv":
|
|
11690
|
+
const headers = ["Title", "Start", "End", "Location", "Description"];
|
|
11691
|
+
const rows = data.map((event) => [
|
|
11692
|
+
event.title,
|
|
11693
|
+
event.start.toISOString(),
|
|
11694
|
+
event.end.toISOString(),
|
|
11695
|
+
event.location || "",
|
|
11696
|
+
event.description || ""
|
|
11697
|
+
]);
|
|
11698
|
+
content = [headers, ...rows].map((row) => row.map((cell) => `"${cell}"`).join(",")).join("\n");
|
|
11699
|
+
mimeType = "text/csv";
|
|
11700
|
+
filename = "calendar.csv";
|
|
11701
|
+
break;
|
|
11702
|
+
case "ics":
|
|
11703
|
+
const icsEvents = data.map((event) => {
|
|
11704
|
+
const start = event.start.toISOString().replace(/[-:]/g, "").replace(/\.\d{3}/, "");
|
|
11705
|
+
const end = event.end.toISOString().replace(/[-:]/g, "").replace(/\.\d{3}/, "");
|
|
11706
|
+
return `BEGIN:VEVENT
|
|
11707
|
+
UID:${event.id}@calendar.app
|
|
11708
|
+
DTSTART:${start}Z
|
|
11709
|
+
DTEND:${end}Z
|
|
11710
|
+
SUMMARY:${event.title}
|
|
11711
|
+
${event.description ? `DESCRIPTION:${event.description}` : ""}
|
|
11712
|
+
${event.location ? `LOCATION:${event.location}` : ""}
|
|
11713
|
+
END:VEVENT`;
|
|
11714
|
+
}).join("\n");
|
|
11715
|
+
content = `BEGIN:VCALENDAR
|
|
11716
|
+
VERSION:2.0
|
|
11717
|
+
PRODID:-//Calendar App//EN
|
|
11718
|
+
${icsEvents}
|
|
11719
|
+
END:VCALENDAR`;
|
|
11720
|
+
mimeType = "text/calendar";
|
|
11721
|
+
filename = "calendar.ics";
|
|
11722
|
+
break;
|
|
11723
|
+
default:
|
|
11724
|
+
return;
|
|
11725
|
+
}
|
|
11726
|
+
const blob = new Blob([content], { type: mimeType });
|
|
11727
|
+
const url = URL.createObjectURL(blob);
|
|
11728
|
+
const link = document.createElement("a");
|
|
11729
|
+
link.href = url;
|
|
11730
|
+
link.download = filename;
|
|
11731
|
+
link.click();
|
|
11732
|
+
URL.revokeObjectURL(url);
|
|
11733
|
+
}
|
|
11734
|
+
}, [eventsInView, onExport]);
|
|
11735
|
+
const renderDayView = () => {
|
|
11736
|
+
const hours = Array.from({ length: 24 }, (_, i) => i);
|
|
11737
|
+
const dayEvents = eventsInView.filter(
|
|
11738
|
+
(event) => isSameDay(new Date(event.start), currentDate)
|
|
11739
|
+
);
|
|
11740
|
+
return /* @__PURE__ */ jsx("div", { className: "flex flex-1 overflow-hidden", children: /* @__PURE__ */ jsx("div", { className: "flex-1 overflow-auto", children: /* @__PURE__ */ jsxs("div", { className: "min-h-full", children: [
|
|
11741
|
+
/* @__PURE__ */ jsxs("div", { className: "border-b p-2", children: [
|
|
11742
|
+
/* @__PURE__ */ jsx("div", { className: "text-xs text-muted-foreground mb-1", children: "All Day" }),
|
|
11743
|
+
/* @__PURE__ */ jsx("div", { className: "space-y-1", children: dayEvents.filter((event) => event.allDay).map((event) => /* @__PURE__ */ jsx(
|
|
11744
|
+
"div",
|
|
11745
|
+
{
|
|
11746
|
+
className: "p-2 rounded text-xs cursor-pointer hover:opacity-80",
|
|
11747
|
+
style: {
|
|
11748
|
+
backgroundColor: event.color || eventColors[event.category || ""] || "#3b82f6",
|
|
11749
|
+
color: "#ffffff"
|
|
11750
|
+
},
|
|
11751
|
+
onClick: (e) => handleEventClick(event, e),
|
|
11752
|
+
children: event.title
|
|
11753
|
+
},
|
|
11754
|
+
event.id
|
|
11755
|
+
)) })
|
|
11756
|
+
] }),
|
|
11757
|
+
/* @__PURE__ */ jsx("div", { className: "relative", children: hours.map((hour) => /* @__PURE__ */ jsxs("div", { className: "flex border-b", style: { height: "60px" }, children: [
|
|
11758
|
+
/* @__PURE__ */ jsx("div", { className: "w-16 p-2 text-xs text-muted-foreground text-right", children: format(setHours(/* @__PURE__ */ new Date(), hour), timeFormat === "12h" ? "h a" : "HH:00") }),
|
|
11759
|
+
/* @__PURE__ */ jsx("div", { className: "flex-1 relative border-l", children: dayEvents.filter((event) => {
|
|
11760
|
+
if (event.allDay)
|
|
11761
|
+
return false;
|
|
11762
|
+
const eventHour = new Date(event.start).getHours();
|
|
11763
|
+
return eventHour === hour;
|
|
11764
|
+
}).map((event) => {
|
|
11765
|
+
const startMinutes = new Date(event.start).getMinutes();
|
|
11766
|
+
const duration = differenceInMinutes(new Date(event.end), new Date(event.start));
|
|
11767
|
+
const height2 = duration / 60 * 60;
|
|
11768
|
+
const top = startMinutes / 60 * 60;
|
|
11769
|
+
return /* @__PURE__ */ jsxs(
|
|
11770
|
+
"div",
|
|
11771
|
+
{
|
|
11772
|
+
className: "absolute left-0 right-0 mx-1 p-1 rounded text-xs cursor-pointer hover:opacity-80 overflow-hidden",
|
|
11773
|
+
style: {
|
|
11774
|
+
top: `${top}px`,
|
|
11775
|
+
height: `${height2}px`,
|
|
11776
|
+
backgroundColor: event.color || eventColors[event.category || ""] || "#3b82f6",
|
|
11777
|
+
color: "#ffffff",
|
|
11778
|
+
zIndex: 10
|
|
11779
|
+
},
|
|
11780
|
+
onClick: (e) => handleEventClick(event, e),
|
|
11781
|
+
children: [
|
|
11782
|
+
/* @__PURE__ */ jsx("div", { className: "font-medium", children: event.title }),
|
|
11783
|
+
/* @__PURE__ */ jsxs("div", { className: "text-xs opacity-80", children: [
|
|
11784
|
+
format(new Date(event.start), "HH:mm"),
|
|
11785
|
+
" - ",
|
|
11786
|
+
format(new Date(event.end), "HH:mm")
|
|
11787
|
+
] })
|
|
11788
|
+
]
|
|
11789
|
+
},
|
|
11790
|
+
event.id
|
|
11791
|
+
);
|
|
11792
|
+
}) })
|
|
11793
|
+
] }, hour)) })
|
|
11794
|
+
] }) }) });
|
|
11795
|
+
};
|
|
11796
|
+
const renderWeekView = () => {
|
|
11797
|
+
const weekStart = startOfWeek(currentDate, { weekStartsOn: firstDayOfWeek });
|
|
11798
|
+
const weekDays = Array.from({ length: 7 }, (_, i) => addDays(weekStart, i));
|
|
11799
|
+
const hours = Array.from({ length: 24 }, (_, i) => i);
|
|
11800
|
+
return /* @__PURE__ */ jsx("div", { className: "flex flex-1 overflow-hidden", children: /* @__PURE__ */ jsx("div", { className: "flex-1 overflow-auto", children: /* @__PURE__ */ jsxs("div", { className: "min-h-full", children: [
|
|
11801
|
+
/* @__PURE__ */ jsx("div", { className: "sticky top-0 z-20 bg-background border-b", children: /* @__PURE__ */ jsxs("div", { className: "flex", children: [
|
|
11802
|
+
/* @__PURE__ */ jsx("div", { className: "w-16" }),
|
|
11803
|
+
weekDays.map((day) => /* @__PURE__ */ jsxs(
|
|
11804
|
+
"div",
|
|
11805
|
+
{
|
|
11806
|
+
className: cn(
|
|
11807
|
+
"flex-1 p-2 text-center border-l",
|
|
11808
|
+
isToday(day) && "bg-primary/10"
|
|
11809
|
+
),
|
|
11810
|
+
children: [
|
|
11811
|
+
/* @__PURE__ */ jsx("div", { className: "text-xs text-muted-foreground", children: format(day, "EEE") }),
|
|
11812
|
+
/* @__PURE__ */ jsx("div", { className: cn(
|
|
11813
|
+
"text-lg font-medium",
|
|
11814
|
+
isToday(day) && "text-primary"
|
|
11815
|
+
), children: format(day, "d") })
|
|
11816
|
+
]
|
|
11817
|
+
},
|
|
11818
|
+
day.toISOString()
|
|
11819
|
+
))
|
|
11820
|
+
] }) }),
|
|
11821
|
+
/* @__PURE__ */ jsx("div", { className: "relative", children: hours.map((hour) => /* @__PURE__ */ jsxs("div", { className: "flex", style: { height: "60px" }, children: [
|
|
11822
|
+
/* @__PURE__ */ jsx("div", { className: "w-16 p-2 text-xs text-muted-foreground text-right border-b", children: format(setHours(/* @__PURE__ */ new Date(), hour), timeFormat === "12h" ? "h a" : "HH:00") }),
|
|
11823
|
+
weekDays.map((day) => {
|
|
11824
|
+
const dayEvents = eventsInView.filter(
|
|
11825
|
+
(event) => isSameDay(new Date(event.start), day) && !event.allDay
|
|
11826
|
+
);
|
|
11827
|
+
return /* @__PURE__ */ jsx(
|
|
11828
|
+
"div",
|
|
11829
|
+
{
|
|
11830
|
+
className: cn(
|
|
11831
|
+
"flex-1 relative border-l border-b",
|
|
11832
|
+
isToday(day) && "bg-primary/5"
|
|
11833
|
+
),
|
|
11834
|
+
children: dayEvents.filter((event) => {
|
|
11835
|
+
const eventHour = new Date(event.start).getHours();
|
|
11836
|
+
return eventHour === hour;
|
|
11837
|
+
}).map((event) => {
|
|
11838
|
+
const startMinutes = new Date(event.start).getMinutes();
|
|
11839
|
+
const duration = differenceInMinutes(new Date(event.end), new Date(event.start));
|
|
11840
|
+
const height2 = duration / 60 * 60;
|
|
11841
|
+
const top = startMinutes / 60 * 60;
|
|
11842
|
+
return /* @__PURE__ */ jsx(
|
|
11843
|
+
"div",
|
|
11844
|
+
{
|
|
11845
|
+
className: "absolute left-0 right-0 mx-1 p-1 rounded text-xs cursor-pointer hover:opacity-80 overflow-hidden",
|
|
11846
|
+
style: {
|
|
11847
|
+
top: `${top}px`,
|
|
11848
|
+
height: `${height2}px`,
|
|
11849
|
+
backgroundColor: event.color || eventColors[event.category || ""] || "#3b82f6",
|
|
11850
|
+
color: "#ffffff",
|
|
11851
|
+
zIndex: 10
|
|
11852
|
+
},
|
|
11853
|
+
onClick: (e) => handleEventClick(event, e),
|
|
11854
|
+
children: event.title
|
|
11855
|
+
},
|
|
11856
|
+
event.id
|
|
11857
|
+
);
|
|
11858
|
+
})
|
|
11859
|
+
},
|
|
11860
|
+
day.toISOString()
|
|
11861
|
+
);
|
|
11862
|
+
})
|
|
11863
|
+
] }, hour)) })
|
|
11864
|
+
] }) }) });
|
|
11865
|
+
};
|
|
11866
|
+
const renderMonthView = () => {
|
|
11867
|
+
const monthStart = startOfMonth(currentDate);
|
|
11868
|
+
const monthEnd = endOfMonth(currentDate);
|
|
11869
|
+
const startDate = startOfWeek(monthStart, { weekStartsOn: firstDayOfWeek });
|
|
11870
|
+
const endDate = endOfWeek(monthEnd, { weekStartsOn: firstDayOfWeek });
|
|
11871
|
+
const days = eachDayOfInterval({ start: startDate, end: endDate });
|
|
11872
|
+
const weeks = [];
|
|
11873
|
+
for (let i = 0; i < days.length; i += 7) {
|
|
11874
|
+
weeks.push(days.slice(i, i + 7));
|
|
11875
|
+
}
|
|
11876
|
+
return /* @__PURE__ */ jsx("div", { className: "flex-1 p-4 overflow-auto", children: /* @__PURE__ */ jsxs("div", { className: "min-h-full", children: [
|
|
11877
|
+
/* @__PURE__ */ jsx("div", { className: "grid grid-cols-7 gap-px mb-2", children: weeks[0].map((day) => /* @__PURE__ */ jsx(
|
|
11878
|
+
"div",
|
|
11879
|
+
{
|
|
11880
|
+
className: "p-2 text-center text-sm font-medium text-muted-foreground",
|
|
11881
|
+
children: format(day, "EEE")
|
|
11882
|
+
},
|
|
11883
|
+
day.toISOString()
|
|
11884
|
+
)) }),
|
|
11885
|
+
weeks.map((week, weekIndex) => /* @__PURE__ */ jsx("div", { className: "grid grid-cols-7 gap-px", children: week.map((day) => {
|
|
11886
|
+
const dayEvents = eventsInView.filter(
|
|
11887
|
+
(event) => isSameDay(new Date(event.start), day)
|
|
11888
|
+
);
|
|
11889
|
+
const isCurrentMonth = isSameMonth(day, currentDate);
|
|
11890
|
+
return /* @__PURE__ */ jsxs(
|
|
11891
|
+
"div",
|
|
11892
|
+
{
|
|
11893
|
+
className: cn(
|
|
11894
|
+
"min-h-[100px] p-2 border rounded-lg cursor-pointer transition-colors",
|
|
11895
|
+
!isCurrentMonth && "opacity-50",
|
|
11896
|
+
isToday(day) && "bg-primary/10 border-primary",
|
|
11897
|
+
"hover:bg-muted/50"
|
|
11898
|
+
),
|
|
11899
|
+
onClick: () => handleDateSelect(day),
|
|
11900
|
+
children: [
|
|
11901
|
+
/* @__PURE__ */ jsx("div", { className: cn(
|
|
11902
|
+
"text-sm font-medium mb-1",
|
|
11903
|
+
isToday(day) && "text-primary"
|
|
11904
|
+
), children: format(day, "d") }),
|
|
11905
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
|
|
11906
|
+
dayEvents.slice(0, 3).map((event) => {
|
|
11907
|
+
return /* @__PURE__ */ jsx(
|
|
11908
|
+
motion.div,
|
|
11909
|
+
{
|
|
11910
|
+
className: "text-xs p-1 rounded cursor-pointer truncate",
|
|
11911
|
+
style: {
|
|
11912
|
+
backgroundColor: event.color || eventColors[event.category || ""] || "#3b82f6",
|
|
11913
|
+
color: "#ffffff"
|
|
11914
|
+
},
|
|
11915
|
+
whileHover: { scale: 1.02 },
|
|
11916
|
+
whileTap: { scale: 0.98 },
|
|
11917
|
+
onClick: (e) => {
|
|
11918
|
+
e.stopPropagation();
|
|
11919
|
+
handleEventClick(event, e);
|
|
11920
|
+
},
|
|
11921
|
+
children: event.allDay ? event.title : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
11922
|
+
format(new Date(event.start), "HH:mm"),
|
|
11923
|
+
" ",
|
|
11924
|
+
event.title
|
|
11925
|
+
] })
|
|
11926
|
+
},
|
|
11927
|
+
event.id
|
|
11928
|
+
);
|
|
11929
|
+
}),
|
|
11930
|
+
dayEvents.length > 3 && /* @__PURE__ */ jsxs("div", { className: "text-xs text-muted-foreground text-center", children: [
|
|
11931
|
+
"+",
|
|
11932
|
+
dayEvents.length - 3,
|
|
11933
|
+
" more"
|
|
11934
|
+
] })
|
|
11935
|
+
] })
|
|
11936
|
+
]
|
|
11937
|
+
},
|
|
11938
|
+
day.toISOString()
|
|
11939
|
+
);
|
|
11940
|
+
}) }, weekIndex))
|
|
11941
|
+
] }) });
|
|
11942
|
+
};
|
|
11943
|
+
const renderYearView = () => {
|
|
11944
|
+
const yearStart = startOfYear(currentDate);
|
|
11945
|
+
const yearEnd = endOfYear(currentDate);
|
|
11946
|
+
const months = eachMonthOfInterval({ start: yearStart, end: yearEnd });
|
|
11947
|
+
return /* @__PURE__ */ jsx("div", { className: "flex-1 overflow-auto p-4", children: /* @__PURE__ */ jsx("div", { className: "grid grid-cols-3 gap-4", children: months.map((month) => {
|
|
11948
|
+
const monthEvents = eventsInView.filter((event) => {
|
|
11949
|
+
const eventStart = new Date(event.start);
|
|
11950
|
+
return isSameMonth(eventStart, month);
|
|
11951
|
+
});
|
|
11952
|
+
return /* @__PURE__ */ jsxs(
|
|
11953
|
+
MoonUICardPro,
|
|
11954
|
+
{
|
|
11955
|
+
className: "cursor-pointer hover:shadow-lg transition-shadow",
|
|
11956
|
+
onClick: () => {
|
|
11957
|
+
setCurrentDate(month);
|
|
11958
|
+
handleViewChange("month");
|
|
11959
|
+
},
|
|
11960
|
+
children: [
|
|
11961
|
+
/* @__PURE__ */ jsxs(MoonUICardHeaderPro, { className: "pb-2", children: [
|
|
11962
|
+
/* @__PURE__ */ jsx(MoonUICardTitlePro, { className: "text-lg", children: format(month, "MMMM") }),
|
|
11963
|
+
/* @__PURE__ */ jsxs(MoonUICardDescriptionPro, { children: [
|
|
11964
|
+
monthEvents.length,
|
|
11965
|
+
" events"
|
|
11966
|
+
] })
|
|
11967
|
+
] }),
|
|
11968
|
+
/* @__PURE__ */ jsx(MoonUICardContentPro, { children: /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-7 gap-1 text-xs", children: [
|
|
11969
|
+
["S", "M", "T", "W", "T", "F", "S"].map((day) => /* @__PURE__ */ jsx("div", { className: "text-center text-muted-foreground p-1", children: day }, day)),
|
|
11970
|
+
Array.from({ length: getDay(startOfMonth(month)) }, (_, i) => /* @__PURE__ */ jsx("div", {}, `empty-${i}`)),
|
|
11971
|
+
Array.from({ length: getDaysInMonth(month) }, (_, i) => {
|
|
11972
|
+
const day = new Date(month.getFullYear(), month.getMonth(), i + 1);
|
|
11973
|
+
const hasEvents = monthEvents.some(
|
|
11974
|
+
(event) => isSameDay(new Date(event.start), day)
|
|
11975
|
+
);
|
|
11976
|
+
return /* @__PURE__ */ jsx(
|
|
11977
|
+
"div",
|
|
11978
|
+
{
|
|
11979
|
+
className: cn(
|
|
11980
|
+
"text-center p-1 rounded",
|
|
11981
|
+
isToday(day) && "bg-primary text-primary-foreground",
|
|
11982
|
+
hasEvents && !isToday(day) && "bg-primary/20 font-medium"
|
|
11983
|
+
),
|
|
11984
|
+
children: i + 1
|
|
11985
|
+
},
|
|
11986
|
+
i
|
|
11987
|
+
);
|
|
11988
|
+
})
|
|
11989
|
+
] }) })
|
|
11990
|
+
]
|
|
11991
|
+
},
|
|
11992
|
+
month.toISOString()
|
|
11993
|
+
);
|
|
11994
|
+
}) }) });
|
|
11995
|
+
};
|
|
11996
|
+
const renderAgendaView = () => {
|
|
11997
|
+
const agendaDays = Array.from({ length: 30 }, (_, i) => addDays(currentDate, i));
|
|
11998
|
+
return /* @__PURE__ */ jsx("div", { className: "flex-1 overflow-auto p-4", children: /* @__PURE__ */ jsx("div", { className: "space-y-4", children: agendaDays.map((day) => {
|
|
11999
|
+
const dayEvents = eventsInView.filter(
|
|
12000
|
+
(event) => isSameDay(new Date(event.start), day)
|
|
12001
|
+
).sort((a, b) => new Date(a.start).getTime() - new Date(b.start).getTime());
|
|
12002
|
+
if (dayEvents.length === 0)
|
|
12003
|
+
return null;
|
|
12004
|
+
return /* @__PURE__ */ jsxs(MoonUICardPro, { children: [
|
|
12005
|
+
/* @__PURE__ */ jsxs(MoonUICardHeaderPro, { className: "pb-2", children: [
|
|
12006
|
+
/* @__PURE__ */ jsx(MoonUICardTitlePro, { className: "text-lg", children: format(day, "EEEE, MMMM d, yyyy") }),
|
|
12007
|
+
/* @__PURE__ */ jsxs(MoonUICardDescriptionPro, { children: [
|
|
12008
|
+
dayEvents.length,
|
|
12009
|
+
" events"
|
|
12010
|
+
] })
|
|
12011
|
+
] }),
|
|
12012
|
+
/* @__PURE__ */ jsx(MoonUICardContentPro, { children: /* @__PURE__ */ jsx("div", { className: "space-y-2", children: dayEvents.map((event) => /* @__PURE__ */ jsxs(
|
|
12013
|
+
"div",
|
|
12014
|
+
{
|
|
12015
|
+
className: "flex items-start gap-3 p-3 rounded-lg hover:bg-muted/50 cursor-pointer",
|
|
12016
|
+
onClick: (e) => handleEventClick(event, e),
|
|
12017
|
+
children: [
|
|
12018
|
+
/* @__PURE__ */ jsx(
|
|
12019
|
+
"div",
|
|
12020
|
+
{
|
|
12021
|
+
className: "w-1 h-full rounded",
|
|
12022
|
+
style: {
|
|
12023
|
+
backgroundColor: event.color || eventColors[event.category || ""] || "#3b82f6"
|
|
12024
|
+
}
|
|
12025
|
+
}
|
|
12026
|
+
),
|
|
12027
|
+
/* @__PURE__ */ jsxs("div", { className: "flex-1", children: [
|
|
12028
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 mb-1", children: [
|
|
12029
|
+
/* @__PURE__ */ jsx("span", { className: "font-medium", children: event.title }),
|
|
12030
|
+
event.priority && /* @__PURE__ */ jsx(MoonUIBadgePro, { variant: event.priority === "high" ? "destructive" : event.priority === "medium" ? "secondary" : "secondary", children: event.priority })
|
|
12031
|
+
] }),
|
|
12032
|
+
/* @__PURE__ */ jsxs("div", { className: "text-sm text-muted-foreground", children: [
|
|
12033
|
+
event.allDay ? "All day" : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
12034
|
+
format(new Date(event.start), "HH:mm"),
|
|
12035
|
+
" - ",
|
|
12036
|
+
format(new Date(event.end), "HH:mm")
|
|
12037
|
+
] }),
|
|
12038
|
+
event.location && /* @__PURE__ */ jsxs("span", { className: "ml-2", children: [
|
|
12039
|
+
/* @__PURE__ */ jsx(MapPin, { className: "inline h-3 w-3 mr-1" }),
|
|
12040
|
+
event.location
|
|
12041
|
+
] })
|
|
12042
|
+
] }),
|
|
12043
|
+
event.description && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground mt-1", children: event.description })
|
|
12044
|
+
] })
|
|
12045
|
+
]
|
|
12046
|
+
},
|
|
12047
|
+
event.id
|
|
12048
|
+
)) }) })
|
|
12049
|
+
] }, day.toISOString());
|
|
12050
|
+
}) }) });
|
|
12051
|
+
};
|
|
12052
|
+
return /* @__PURE__ */ jsx(MoonUITooltipProviderPro, { children: /* @__PURE__ */ jsxs("div", { className: cn("flex h-full bg-background", className), style: { height }, children: [
|
|
12053
|
+
/* @__PURE__ */ jsxs(
|
|
12054
|
+
motion.div,
|
|
12055
|
+
{
|
|
12056
|
+
className: cn(
|
|
12057
|
+
"border-r bg-muted/30 flex flex-col",
|
|
12058
|
+
sidebarCollapsed ? "w-16" : "w-80"
|
|
12059
|
+
),
|
|
12060
|
+
animate: { width: sidebarCollapsed ? 64 : 320 },
|
|
12061
|
+
transition: { type: "spring", stiffness: 300, damping: 30 },
|
|
12062
|
+
children: [
|
|
12063
|
+
!sidebarCollapsed && /* @__PURE__ */ jsx("div", { className: "p-4", children: /* @__PURE__ */ jsx(
|
|
12064
|
+
Calendar,
|
|
12065
|
+
{
|
|
12066
|
+
mode: "single",
|
|
12067
|
+
selected: currentDate,
|
|
12068
|
+
onSelect: (date) => {
|
|
12069
|
+
if (date instanceof Date) {
|
|
12070
|
+
handleDateSelect(date);
|
|
12071
|
+
}
|
|
12072
|
+
},
|
|
12073
|
+
className: "rounded-md border"
|
|
12074
|
+
}
|
|
12075
|
+
) }),
|
|
12076
|
+
/* @__PURE__ */ jsx("div", { className: "flex-1 overflow-auto p-4", children: sidebarCollapsed ? /* @__PURE__ */ jsx("div", { className: "space-y-2", children: categories.map((category) => /* @__PURE__ */ jsxs(MoonUITooltipPro, { children: [
|
|
12077
|
+
/* @__PURE__ */ jsx(MoonUITooltipTriggerPro, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
12078
|
+
MoonUIButtonPro,
|
|
12079
|
+
{
|
|
12080
|
+
variant: "ghost",
|
|
12081
|
+
size: "icon",
|
|
12082
|
+
className: "w-full",
|
|
12083
|
+
onClick: () => {
|
|
12084
|
+
setSelectedCategories(
|
|
12085
|
+
(prev) => prev.includes(category.id) ? prev.filter((c2) => c2 !== category.id) : [...prev, category.id]
|
|
12086
|
+
);
|
|
12087
|
+
},
|
|
12088
|
+
children: /* @__PURE__ */ jsx(
|
|
12089
|
+
"div",
|
|
12090
|
+
{
|
|
12091
|
+
className: "w-4 h-4 rounded",
|
|
12092
|
+
style: { backgroundColor: category.color }
|
|
12093
|
+
}
|
|
12094
|
+
)
|
|
12095
|
+
}
|
|
12096
|
+
) }),
|
|
12097
|
+
/* @__PURE__ */ jsx(MoonUITooltipContentPro, { side: "right", children: category.name })
|
|
12098
|
+
] }, category.id)) }) : /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
12099
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mb-2", children: [
|
|
12100
|
+
/* @__PURE__ */ jsx("h3", { className: "font-medium", children: "Categories" }),
|
|
12101
|
+
/* @__PURE__ */ jsx(
|
|
12102
|
+
MoonUIButtonPro,
|
|
12103
|
+
{
|
|
12104
|
+
variant: "ghost",
|
|
12105
|
+
size: "sm",
|
|
12106
|
+
onClick: () => setSelectedCategories([]),
|
|
12107
|
+
children: "Clear"
|
|
12108
|
+
}
|
|
12109
|
+
)
|
|
12110
|
+
] }),
|
|
12111
|
+
categories.map((category) => /* @__PURE__ */ jsxs(
|
|
12112
|
+
"div",
|
|
12113
|
+
{
|
|
12114
|
+
className: cn(
|
|
12115
|
+
"flex items-center gap-2 p-2 rounded-lg cursor-pointer hover:bg-muted",
|
|
12116
|
+
selectedCategories.includes(category.id) && "bg-muted"
|
|
12117
|
+
),
|
|
12118
|
+
onClick: () => {
|
|
12119
|
+
setSelectedCategories(
|
|
12120
|
+
(prev) => prev.includes(category.id) ? prev.filter((c2) => c2 !== category.id) : [...prev, category.id]
|
|
12121
|
+
);
|
|
12122
|
+
},
|
|
12123
|
+
children: [
|
|
12124
|
+
/* @__PURE__ */ jsx(
|
|
12125
|
+
MoonUICheckboxPro,
|
|
12126
|
+
{
|
|
12127
|
+
checked: selectedCategories.includes(category.id),
|
|
12128
|
+
onCheckedChange: () => {
|
|
12129
|
+
}
|
|
12130
|
+
}
|
|
12131
|
+
),
|
|
12132
|
+
/* @__PURE__ */ jsx(
|
|
12133
|
+
"div",
|
|
12134
|
+
{
|
|
12135
|
+
className: "w-4 h-4 rounded",
|
|
12136
|
+
style: { backgroundColor: category.color }
|
|
12137
|
+
}
|
|
12138
|
+
),
|
|
12139
|
+
category.icon,
|
|
12140
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm", children: category.name })
|
|
12141
|
+
]
|
|
12142
|
+
},
|
|
12143
|
+
category.id
|
|
12144
|
+
))
|
|
12145
|
+
] }) }),
|
|
12146
|
+
/* @__PURE__ */ jsx("div", { className: "p-2 border-t", children: /* @__PURE__ */ jsx(
|
|
12147
|
+
MoonUIButtonPro,
|
|
12148
|
+
{
|
|
12149
|
+
variant: "ghost",
|
|
12150
|
+
size: "icon",
|
|
12151
|
+
className: "w-full",
|
|
12152
|
+
onClick: () => setSidebarCollapsed(!sidebarCollapsed),
|
|
12153
|
+
children: sidebarCollapsed ? /* @__PURE__ */ jsx(PanelLeft, {}) : /* @__PURE__ */ jsx(PanelRight, {})
|
|
12154
|
+
}
|
|
12155
|
+
) })
|
|
12156
|
+
]
|
|
12157
|
+
}
|
|
12158
|
+
),
|
|
12159
|
+
/* @__PURE__ */ jsxs("div", { className: "flex-1 flex flex-col overflow-hidden", children: [
|
|
12160
|
+
/* @__PURE__ */ jsxs("div", { className: "border-b p-4 flex items-center justify-between", children: [
|
|
12161
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-4", children: [
|
|
12162
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
12163
|
+
/* @__PURE__ */ jsx(
|
|
12164
|
+
MoonUIButtonPro,
|
|
12165
|
+
{
|
|
12166
|
+
variant: "outline",
|
|
12167
|
+
size: "icon",
|
|
12168
|
+
onClick: () => navigateDate("prev"),
|
|
12169
|
+
children: /* @__PURE__ */ jsx(ChevronLeft, { className: "h-4 w-4" })
|
|
12170
|
+
}
|
|
12171
|
+
),
|
|
12172
|
+
/* @__PURE__ */ jsx(
|
|
12173
|
+
MoonUIButtonPro,
|
|
12174
|
+
{
|
|
12175
|
+
variant: "outline",
|
|
12176
|
+
size: "icon",
|
|
12177
|
+
onClick: () => navigateDate("next"),
|
|
12178
|
+
children: /* @__PURE__ */ jsx(ChevronRight, { className: "h-4 w-4" })
|
|
12179
|
+
}
|
|
12180
|
+
),
|
|
12181
|
+
/* @__PURE__ */ jsx(
|
|
12182
|
+
MoonUIButtonPro,
|
|
12183
|
+
{
|
|
12184
|
+
variant: "outline",
|
|
12185
|
+
onClick: () => setCurrentDate(/* @__PURE__ */ new Date()),
|
|
12186
|
+
children: "Today"
|
|
12187
|
+
}
|
|
12188
|
+
)
|
|
12189
|
+
] }),
|
|
12190
|
+
/* @__PURE__ */ jsx("h2", { className: "text-xl font-semibold", children: format(
|
|
12191
|
+
currentDate,
|
|
12192
|
+
currentViewConfig.type === "day" ? "EEEE, MMMM d, yyyy" : currentViewConfig.type === "week" ? "'Week of' MMMM d, yyyy" : currentViewConfig.type === "month" ? "MMMM yyyy" : currentViewConfig.type === "year" ? "yyyy" : "MMMM yyyy"
|
|
12193
|
+
) })
|
|
12194
|
+
] }),
|
|
12195
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
12196
|
+
/* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
12197
|
+
/* @__PURE__ */ jsx(Search, { className: "absolute left-3 top-1/2 transform -translate-y-1/2 text-muted-foreground h-4 w-4" }),
|
|
12198
|
+
/* @__PURE__ */ jsx(
|
|
12199
|
+
MoonUIInputPro,
|
|
12200
|
+
{
|
|
12201
|
+
placeholder: "Search events...",
|
|
12202
|
+
value: searchQuery,
|
|
12203
|
+
onChange: (e) => setSearchQuery(e.target.value),
|
|
12204
|
+
className: "pl-9 w-64"
|
|
12205
|
+
}
|
|
12206
|
+
)
|
|
12207
|
+
] }),
|
|
12208
|
+
/* @__PURE__ */ jsx(MoonUITabsPro, { value: currentView, onValueChange: handleViewChange, children: /* @__PURE__ */ jsx(MoonUITabsListPro, { children: views.map((view) => /* @__PURE__ */ jsx(MoonUITabsTriggerPro, { value: view.id, children: view.name }, view.id)) }) }),
|
|
12209
|
+
/* @__PURE__ */ jsxs(MoonUIDropdownMenuPro, { children: [
|
|
12210
|
+
/* @__PURE__ */ jsx(MoonUIDropdownMenuTriggerPro, { asChild: true, children: /* @__PURE__ */ jsx(MoonUIButtonPro, { variant: "outline", size: "icon", children: /* @__PURE__ */ jsx(MoreHorizontal, { className: "h-4 w-4" }) }) }),
|
|
12211
|
+
/* @__PURE__ */ jsxs(MoonUIDropdownMenuContentPro, { align: "end", className: "w-48", children: [
|
|
12212
|
+
/* @__PURE__ */ jsx(MoonUIDropdownMenuLabelPro, { children: "Actions" }),
|
|
12213
|
+
/* @__PURE__ */ jsx(MoonUIDropdownMenuSeparatorPro, {}),
|
|
12214
|
+
allowEventCreation && /* @__PURE__ */ jsxs(
|
|
12215
|
+
MoonUIDropdownMenuItemPro,
|
|
12216
|
+
{
|
|
12217
|
+
onClick: () => {
|
|
12218
|
+
setNewEventStart(/* @__PURE__ */ new Date());
|
|
12219
|
+
setNewEventEnd(addHours(/* @__PURE__ */ new Date(), 1));
|
|
12220
|
+
setIsCreating(true);
|
|
12221
|
+
setIsEventDialogOpen(true);
|
|
12222
|
+
},
|
|
12223
|
+
children: [
|
|
12224
|
+
/* @__PURE__ */ jsx(Plus, { className: "h-4 w-4 mr-2" }),
|
|
12225
|
+
"Create Event"
|
|
12226
|
+
]
|
|
12227
|
+
}
|
|
12228
|
+
),
|
|
12229
|
+
/* @__PURE__ */ jsx(MoonUIDropdownMenuSeparatorPro, {}),
|
|
12230
|
+
/* @__PURE__ */ jsxs(MoonUIDropdownMenuSubPro, { children: [
|
|
12231
|
+
/* @__PURE__ */ jsxs(MoonUIDropdownMenuSubTriggerPro, { children: [
|
|
12232
|
+
/* @__PURE__ */ jsx(Download, { className: "h-4 w-4 mr-2" }),
|
|
12233
|
+
"Export"
|
|
12234
|
+
] }),
|
|
12235
|
+
/* @__PURE__ */ jsxs(MoonUIDropdownMenuSubContentPro, { children: [
|
|
12236
|
+
/* @__PURE__ */ jsxs(MoonUIDropdownMenuItemPro, { onClick: () => exportCalendar("ics"), children: [
|
|
12237
|
+
/* @__PURE__ */ jsx(FileText, { className: "h-4 w-4 mr-2" }),
|
|
12238
|
+
"Export as ICS"
|
|
12239
|
+
] }),
|
|
12240
|
+
/* @__PURE__ */ jsxs(MoonUIDropdownMenuItemPro, { onClick: () => exportCalendar("csv"), children: [
|
|
12241
|
+
/* @__PURE__ */ jsx(FileSpreadsheet, { className: "h-4 w-4 mr-2" }),
|
|
12242
|
+
"Export as CSV"
|
|
12243
|
+
] }),
|
|
12244
|
+
/* @__PURE__ */ jsxs(MoonUIDropdownMenuItemPro, { onClick: () => exportCalendar("json"), children: [
|
|
12245
|
+
/* @__PURE__ */ jsx(FileCode, { className: "h-4 w-4 mr-2" }),
|
|
12246
|
+
"Export as JSON"
|
|
12247
|
+
] })
|
|
12248
|
+
] })
|
|
12249
|
+
] }),
|
|
12250
|
+
/* @__PURE__ */ jsxs(MoonUIDropdownMenuItemPro, { children: [
|
|
12251
|
+
/* @__PURE__ */ jsx(Printer, { className: "h-4 w-4 mr-2" }),
|
|
12252
|
+
"Print"
|
|
12253
|
+
] }),
|
|
12254
|
+
/* @__PURE__ */ jsxs(MoonUIDropdownMenuItemPro, { children: [
|
|
12255
|
+
/* @__PURE__ */ jsx(Share2, { className: "h-4 w-4 mr-2" }),
|
|
12256
|
+
"Share"
|
|
12257
|
+
] }),
|
|
12258
|
+
/* @__PURE__ */ jsx(MoonUIDropdownMenuSeparatorPro, {}),
|
|
12259
|
+
/* @__PURE__ */ jsxs(MoonUIDropdownMenuItemPro, { children: [
|
|
12260
|
+
/* @__PURE__ */ jsx(Settings, { className: "h-4 w-4 mr-2" }),
|
|
12261
|
+
"Settings"
|
|
12262
|
+
] })
|
|
12263
|
+
] })
|
|
12264
|
+
] })
|
|
12265
|
+
] })
|
|
12266
|
+
] }),
|
|
12267
|
+
/* @__PURE__ */ jsx(LayoutGroup, { children: /* @__PURE__ */ jsx(AnimatePresence, { mode: "wait", children: /* @__PURE__ */ jsxs(
|
|
12268
|
+
motion.div,
|
|
12269
|
+
{
|
|
12270
|
+
className: "flex-1 overflow-hidden",
|
|
12271
|
+
initial: { opacity: 0, y: 20 },
|
|
12272
|
+
animate: { opacity: 1, y: 0 },
|
|
12273
|
+
exit: { opacity: 0, y: -20 },
|
|
12274
|
+
transition: { duration: 0.2 },
|
|
12275
|
+
children: [
|
|
12276
|
+
currentViewConfig.type === "day" && renderDayView(),
|
|
12277
|
+
currentViewConfig.type === "week" && renderWeekView(),
|
|
12278
|
+
currentViewConfig.type === "month" && renderMonthView(),
|
|
12279
|
+
currentViewConfig.type === "year" && renderYearView(),
|
|
12280
|
+
currentViewConfig.type === "agenda" && renderAgendaView()
|
|
12281
|
+
]
|
|
12282
|
+
},
|
|
12283
|
+
currentView
|
|
12284
|
+
) }) })
|
|
12285
|
+
] }),
|
|
12286
|
+
/* @__PURE__ */ jsx(MoonUIDialogPro, { open: isEventDialogOpen, onOpenChange: setIsEventDialogOpen, children: /* @__PURE__ */ jsxs(MoonUIDialogContentPro, { className: "sm:max-w-[600px]", children: [
|
|
12287
|
+
/* @__PURE__ */ jsxs(MoonUIDialogHeaderPro, { children: [
|
|
12288
|
+
/* @__PURE__ */ jsx(MoonUIDialogTitlePro, { children: isCreating ? "Create Event" : "Edit Event" }),
|
|
12289
|
+
/* @__PURE__ */ jsx(MoonUIDialogDescriptionPro, { children: isCreating ? "Add a new event to your calendar" : "Update event details" })
|
|
12290
|
+
] }),
|
|
12291
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
12292
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
12293
|
+
/* @__PURE__ */ jsx(MoonUILabelPro, { htmlFor: "title", children: "Title" }),
|
|
12294
|
+
/* @__PURE__ */ jsx(
|
|
12295
|
+
MoonUIInputPro,
|
|
12296
|
+
{
|
|
12297
|
+
id: "title",
|
|
12298
|
+
value: editingEvent.title || "",
|
|
12299
|
+
onChange: (e) => setEditingEvent({ ...editingEvent, title: e.target.value }),
|
|
12300
|
+
placeholder: "Event title"
|
|
12301
|
+
}
|
|
12302
|
+
)
|
|
12303
|
+
] }),
|
|
12304
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
12305
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
12306
|
+
/* @__PURE__ */ jsx(MoonUILabelPro, { htmlFor: "start", children: "Start" }),
|
|
12307
|
+
/* @__PURE__ */ jsx(
|
|
12308
|
+
MoonUIInputPro,
|
|
12309
|
+
{
|
|
12310
|
+
id: "start",
|
|
12311
|
+
type: "datetime-local",
|
|
12312
|
+
value: editingEvent.start ? format(editingEvent.start, "yyyy-MM-dd'T'HH:mm") : "",
|
|
12313
|
+
onChange: (e) => setEditingEvent({ ...editingEvent, start: new Date(e.target.value) })
|
|
12314
|
+
}
|
|
12315
|
+
)
|
|
12316
|
+
] }),
|
|
12317
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
12318
|
+
/* @__PURE__ */ jsx(MoonUILabelPro, { htmlFor: "end", children: "End" }),
|
|
12319
|
+
/* @__PURE__ */ jsx(
|
|
12320
|
+
MoonUIInputPro,
|
|
12321
|
+
{
|
|
12322
|
+
id: "end",
|
|
12323
|
+
type: "datetime-local",
|
|
12324
|
+
value: editingEvent.end ? format(editingEvent.end, "yyyy-MM-dd'T'HH:mm") : "",
|
|
12325
|
+
onChange: (e) => setEditingEvent({ ...editingEvent, end: new Date(e.target.value) })
|
|
12326
|
+
}
|
|
12327
|
+
)
|
|
12328
|
+
] })
|
|
12329
|
+
] }),
|
|
12330
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
12331
|
+
/* @__PURE__ */ jsx(
|
|
12332
|
+
MoonUISwitchPro,
|
|
12333
|
+
{
|
|
12334
|
+
id: "allDay",
|
|
12335
|
+
checked: editingEvent.allDay || false,
|
|
12336
|
+
onCheckedChange: (checked) => setEditingEvent({ ...editingEvent, allDay: checked })
|
|
12337
|
+
}
|
|
12338
|
+
),
|
|
12339
|
+
/* @__PURE__ */ jsx(MoonUILabelPro, { htmlFor: "allDay", children: "All day" })
|
|
12340
|
+
] }),
|
|
12341
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
12342
|
+
/* @__PURE__ */ jsx(MoonUILabelPro, { htmlFor: "category", children: "Category" }),
|
|
12343
|
+
/* @__PURE__ */ jsxs(
|
|
12344
|
+
MoonUISelectPro,
|
|
12345
|
+
{
|
|
12346
|
+
value: editingEvent.category || "",
|
|
12347
|
+
onValueChange: (value) => setEditingEvent({ ...editingEvent, category: value }),
|
|
12348
|
+
children: [
|
|
12349
|
+
/* @__PURE__ */ jsx(MoonUISelectTriggerPro, { id: "category", children: /* @__PURE__ */ jsx(MoonUISelectValuePro, { placeholder: "Select a category" }) }),
|
|
12350
|
+
/* @__PURE__ */ jsx(MoonUISelectContentPro, { children: categories.map((category) => /* @__PURE__ */ jsx(MoonUISelectItemPro, { value: category.id, children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
12351
|
+
/* @__PURE__ */ jsx(
|
|
12352
|
+
"div",
|
|
12353
|
+
{
|
|
12354
|
+
className: "w-3 h-3 rounded",
|
|
12355
|
+
style: { backgroundColor: category.color }
|
|
12356
|
+
}
|
|
12357
|
+
),
|
|
12358
|
+
category.name
|
|
12359
|
+
] }) }, category.id)) })
|
|
12360
|
+
]
|
|
12361
|
+
}
|
|
12362
|
+
)
|
|
12363
|
+
] }),
|
|
12364
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
12365
|
+
/* @__PURE__ */ jsx(MoonUILabelPro, { htmlFor: "location", children: "Location" }),
|
|
12366
|
+
/* @__PURE__ */ jsx(
|
|
12367
|
+
MoonUIInputPro,
|
|
12368
|
+
{
|
|
12369
|
+
id: "location",
|
|
12370
|
+
value: editingEvent.location || "",
|
|
12371
|
+
onChange: (e) => setEditingEvent({ ...editingEvent, location: e.target.value }),
|
|
12372
|
+
placeholder: "Event location"
|
|
12373
|
+
}
|
|
12374
|
+
)
|
|
12375
|
+
] }),
|
|
12376
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
12377
|
+
/* @__PURE__ */ jsx(MoonUILabelPro, { htmlFor: "description", children: "Description" }),
|
|
12378
|
+
/* @__PURE__ */ jsx(
|
|
12379
|
+
MoonUITextareaPro,
|
|
12380
|
+
{
|
|
12381
|
+
id: "description",
|
|
12382
|
+
value: editingEvent.description || "",
|
|
12383
|
+
onChange: (e) => setEditingEvent({ ...editingEvent, description: e.target.value }),
|
|
12384
|
+
placeholder: "Event description"
|
|
12385
|
+
}
|
|
12386
|
+
)
|
|
12387
|
+
] }),
|
|
12388
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
12389
|
+
/* @__PURE__ */ jsx(MoonUILabelPro, { children: "Priority" }),
|
|
12390
|
+
/* @__PURE__ */ jsxs(
|
|
12391
|
+
MoonUIRadioGroupPro,
|
|
12392
|
+
{
|
|
12393
|
+
value: editingEvent.priority || "medium",
|
|
12394
|
+
onValueChange: (value) => setEditingEvent({ ...editingEvent, priority: value }),
|
|
12395
|
+
children: [
|
|
12396
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
12397
|
+
/* @__PURE__ */ jsx(MoonUIRadioGroupItemPro, { value: "low", id: "low" }),
|
|
12398
|
+
/* @__PURE__ */ jsx(MoonUILabelPro, { htmlFor: "low", children: "Low" })
|
|
12399
|
+
] }),
|
|
12400
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
12401
|
+
/* @__PURE__ */ jsx(MoonUIRadioGroupItemPro, { value: "medium", id: "medium" }),
|
|
12402
|
+
/* @__PURE__ */ jsx(MoonUILabelPro, { htmlFor: "medium", children: "Medium" })
|
|
12403
|
+
] }),
|
|
12404
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
12405
|
+
/* @__PURE__ */ jsx(MoonUIRadioGroupItemPro, { value: "high", id: "high" }),
|
|
12406
|
+
/* @__PURE__ */ jsx(MoonUILabelPro, { htmlFor: "high", children: "High" })
|
|
12407
|
+
] })
|
|
12408
|
+
]
|
|
12409
|
+
}
|
|
12410
|
+
)
|
|
12411
|
+
] })
|
|
12412
|
+
] }),
|
|
12413
|
+
/* @__PURE__ */ jsxs(MoonUIDialogFooterPro, { children: [
|
|
12414
|
+
!isCreating && allowEventDeletion && /* @__PURE__ */ jsx(
|
|
12415
|
+
MoonUIButtonPro,
|
|
12416
|
+
{
|
|
12417
|
+
variant: "destructive",
|
|
12418
|
+
onClick: handleEventDelete,
|
|
12419
|
+
children: "Delete"
|
|
12420
|
+
}
|
|
12421
|
+
),
|
|
12422
|
+
/* @__PURE__ */ jsx(
|
|
12423
|
+
MoonUIButtonPro,
|
|
12424
|
+
{
|
|
12425
|
+
variant: "outline",
|
|
12426
|
+
onClick: () => {
|
|
12427
|
+
setIsEventDialogOpen(false);
|
|
12428
|
+
setEditingEvent({});
|
|
12429
|
+
setSelectedEvent(null);
|
|
12430
|
+
setIsCreating(false);
|
|
12431
|
+
},
|
|
12432
|
+
children: "Cancel"
|
|
12433
|
+
}
|
|
12434
|
+
),
|
|
12435
|
+
/* @__PURE__ */ jsx(MoonUIButtonPro, { onClick: handleEventSave, children: isCreating ? "Create" : "Save" })
|
|
12436
|
+
] })
|
|
12437
|
+
] }) })
|
|
12438
|
+
] }) });
|
|
12439
|
+
});
|
|
12440
|
+
CalendarPro.displayName = "CalendarPro";
|
|
11468
12441
|
var PRIORITY_OPTIONS = [
|
|
11469
12442
|
{ value: "low", label: "Low", icon: Flag, color: "text-green-600" },
|
|
11470
12443
|
{ value: "medium", label: "Medium", icon: Flag, color: "text-yellow-600" },
|
|
@@ -13141,11 +14114,11 @@ function Kanban({
|
|
|
13141
14114
|
description: "Column color has been changed"
|
|
13142
14115
|
});
|
|
13143
14116
|
};
|
|
13144
|
-
const handleExport = (
|
|
14117
|
+
const handleExport = (format7) => {
|
|
13145
14118
|
if (onExport) {
|
|
13146
|
-
onExport(
|
|
14119
|
+
onExport(format7);
|
|
13147
14120
|
} else {
|
|
13148
|
-
if (
|
|
14121
|
+
if (format7 === "json") {
|
|
13149
14122
|
const data = JSON.stringify(columns, null, 2);
|
|
13150
14123
|
const blob = new Blob([data], { type: "application/json" });
|
|
13151
14124
|
const url = URL.createObjectURL(blob);
|
|
@@ -13160,7 +14133,7 @@ function Kanban({
|
|
|
13160
14133
|
title: "Board exported",
|
|
13161
14134
|
description: "Board exported as JSON file"
|
|
13162
14135
|
});
|
|
13163
|
-
} else if (
|
|
14136
|
+
} else if (format7 === "csv") {
|
|
13164
14137
|
let csv = "Column,Card Title,Description,Priority,Assignees,Due Date,Tags\n";
|
|
13165
14138
|
columns.forEach((column) => {
|
|
13166
14139
|
column.cards.forEach((card) => {
|
|
@@ -13926,7 +14899,7 @@ function findDiffEnd(a, b, posA, posB) {
|
|
|
13926
14899
|
posB -= size4;
|
|
13927
14900
|
}
|
|
13928
14901
|
}
|
|
13929
|
-
var
|
|
14902
|
+
var Fragment8 = class {
|
|
13930
14903
|
/**
|
|
13931
14904
|
@internal
|
|
13932
14905
|
*/
|
|
@@ -13994,7 +14967,7 @@ var Fragment7 = class {
|
|
|
13994
14967
|
}
|
|
13995
14968
|
for (; i < other.content.length; i++)
|
|
13996
14969
|
content.push(other.content[i]);
|
|
13997
|
-
return new
|
|
14970
|
+
return new Fragment8(content, this.size + other.size);
|
|
13998
14971
|
}
|
|
13999
14972
|
/**
|
|
14000
14973
|
Cut out the sub-fragment between the two given positions.
|
|
@@ -14018,17 +14991,17 @@ var Fragment7 = class {
|
|
|
14018
14991
|
}
|
|
14019
14992
|
pos = end;
|
|
14020
14993
|
}
|
|
14021
|
-
return new
|
|
14994
|
+
return new Fragment8(result, size4);
|
|
14022
14995
|
}
|
|
14023
14996
|
/**
|
|
14024
14997
|
@internal
|
|
14025
14998
|
*/
|
|
14026
14999
|
cutByIndex(from2, to) {
|
|
14027
15000
|
if (from2 == to)
|
|
14028
|
-
return
|
|
15001
|
+
return Fragment8.empty;
|
|
14029
15002
|
if (from2 == 0 && to == this.content.length)
|
|
14030
15003
|
return this;
|
|
14031
|
-
return new
|
|
15004
|
+
return new Fragment8(this.content.slice(from2, to));
|
|
14032
15005
|
}
|
|
14033
15006
|
/**
|
|
14034
15007
|
Create a new fragment in which the node at the given index is
|
|
@@ -14041,21 +15014,21 @@ var Fragment7 = class {
|
|
|
14041
15014
|
let copy2 = this.content.slice();
|
|
14042
15015
|
let size4 = this.size + node.nodeSize - current.nodeSize;
|
|
14043
15016
|
copy2[index2] = node;
|
|
14044
|
-
return new
|
|
15017
|
+
return new Fragment8(copy2, size4);
|
|
14045
15018
|
}
|
|
14046
15019
|
/**
|
|
14047
15020
|
Create a new fragment by prepending the given node to this
|
|
14048
15021
|
fragment.
|
|
14049
15022
|
*/
|
|
14050
15023
|
addToStart(node) {
|
|
14051
|
-
return new
|
|
15024
|
+
return new Fragment8([node].concat(this.content), this.size + node.nodeSize);
|
|
14052
15025
|
}
|
|
14053
15026
|
/**
|
|
14054
15027
|
Create a new fragment by appending the given node to this
|
|
14055
15028
|
fragment.
|
|
14056
15029
|
*/
|
|
14057
15030
|
addToEnd(node) {
|
|
14058
|
-
return new
|
|
15031
|
+
return new Fragment8(this.content.concat(node), this.size + node.nodeSize);
|
|
14059
15032
|
}
|
|
14060
15033
|
/**
|
|
14061
15034
|
Compare this fragment to another one.
|
|
@@ -14174,10 +15147,10 @@ var Fragment7 = class {
|
|
|
14174
15147
|
*/
|
|
14175
15148
|
static fromJSON(schema, value) {
|
|
14176
15149
|
if (!value)
|
|
14177
|
-
return
|
|
15150
|
+
return Fragment8.empty;
|
|
14178
15151
|
if (!Array.isArray(value))
|
|
14179
15152
|
throw new RangeError("Invalid input for Fragment.fromJSON");
|
|
14180
|
-
return new
|
|
15153
|
+
return new Fragment8(value.map(schema.nodeFromJSON));
|
|
14181
15154
|
}
|
|
14182
15155
|
/**
|
|
14183
15156
|
Build a fragment from an array of nodes. Ensures that adjacent
|
|
@@ -14185,7 +15158,7 @@ var Fragment7 = class {
|
|
|
14185
15158
|
*/
|
|
14186
15159
|
static fromArray(array) {
|
|
14187
15160
|
if (!array.length)
|
|
14188
|
-
return
|
|
15161
|
+
return Fragment8.empty;
|
|
14189
15162
|
let joined, size4 = 0;
|
|
14190
15163
|
for (let i = 0; i < array.length; i++) {
|
|
14191
15164
|
let node = array[i];
|
|
@@ -14198,7 +15171,7 @@ var Fragment7 = class {
|
|
|
14198
15171
|
joined.push(node);
|
|
14199
15172
|
}
|
|
14200
15173
|
}
|
|
14201
|
-
return new
|
|
15174
|
+
return new Fragment8(joined || array, size4);
|
|
14202
15175
|
}
|
|
14203
15176
|
/**
|
|
14204
15177
|
Create a fragment from something that can be interpreted as a
|
|
@@ -14208,17 +15181,17 @@ var Fragment7 = class {
|
|
|
14208
15181
|
*/
|
|
14209
15182
|
static from(nodes) {
|
|
14210
15183
|
if (!nodes)
|
|
14211
|
-
return
|
|
14212
|
-
if (nodes instanceof
|
|
15184
|
+
return Fragment8.empty;
|
|
15185
|
+
if (nodes instanceof Fragment8)
|
|
14213
15186
|
return nodes;
|
|
14214
15187
|
if (Array.isArray(nodes))
|
|
14215
15188
|
return this.fromArray(nodes);
|
|
14216
15189
|
if (nodes.attrs)
|
|
14217
|
-
return new
|
|
15190
|
+
return new Fragment8([nodes], nodes.nodeSize);
|
|
14218
15191
|
throw new RangeError("Can not convert " + nodes + " to a Fragment" + (nodes.nodesBetween ? " (looks like multiple versions of prosemirror-model were loaded)" : ""));
|
|
14219
15192
|
}
|
|
14220
15193
|
};
|
|
14221
|
-
|
|
15194
|
+
Fragment8.empty = new Fragment8([], 0);
|
|
14222
15195
|
var found = { index: 0, offset: 0 };
|
|
14223
15196
|
function retIndex(index2, offset4) {
|
|
14224
15197
|
found.index = index2;
|
|
@@ -14443,7 +15416,7 @@ var Slice = class {
|
|
|
14443
15416
|
let openStart = json2.openStart || 0, openEnd = json2.openEnd || 0;
|
|
14444
15417
|
if (typeof openStart != "number" || typeof openEnd != "number")
|
|
14445
15418
|
throw new RangeError("Invalid input for Slice.fromJSON");
|
|
14446
|
-
return new Slice(
|
|
15419
|
+
return new Slice(Fragment8.fromJSON(schema, json2.content), openStart, openEnd);
|
|
14447
15420
|
}
|
|
14448
15421
|
/**
|
|
14449
15422
|
Create a slice from a fragment by taking the maximum possible
|
|
@@ -14458,7 +15431,7 @@ var Slice = class {
|
|
|
14458
15431
|
return new Slice(fragment, openStart, openEnd);
|
|
14459
15432
|
}
|
|
14460
15433
|
};
|
|
14461
|
-
Slice.empty = new Slice(
|
|
15434
|
+
Slice.empty = new Slice(Fragment8.empty, 0, 0);
|
|
14462
15435
|
function removeRange(content, from2, to) {
|
|
14463
15436
|
let { index: index2, offset: offset4 } = content.findIndex(from2), child = content.maybeChild(index2);
|
|
14464
15437
|
let { index: indexTo, offset: offsetTo } = content.findIndex(to);
|
|
@@ -14556,7 +15529,7 @@ function replaceThreeWay($from, $start, $end, $to, depth) {
|
|
|
14556
15529
|
addNode(close(openEnd, replaceTwoWay($end, $to, depth + 1)), content);
|
|
14557
15530
|
}
|
|
14558
15531
|
addRange($to, null, depth, content);
|
|
14559
|
-
return new
|
|
15532
|
+
return new Fragment8(content);
|
|
14560
15533
|
}
|
|
14561
15534
|
function replaceTwoWay($from, $to, depth) {
|
|
14562
15535
|
let content = [];
|
|
@@ -14566,13 +15539,13 @@ function replaceTwoWay($from, $to, depth) {
|
|
|
14566
15539
|
addNode(close(type, replaceTwoWay($from, $to, depth + 1)), content);
|
|
14567
15540
|
}
|
|
14568
15541
|
addRange($to, null, depth, content);
|
|
14569
|
-
return new
|
|
15542
|
+
return new Fragment8(content);
|
|
14570
15543
|
}
|
|
14571
15544
|
function prepareSliceForReplace(slice2, $along) {
|
|
14572
15545
|
let extra = $along.depth - slice2.openStart, parent = $along.node(extra);
|
|
14573
15546
|
let node = parent.copy(slice2.content);
|
|
14574
15547
|
for (let i = extra - 1; i >= 0; i--)
|
|
14575
|
-
node = $along.node(i).copy(
|
|
15548
|
+
node = $along.node(i).copy(Fragment8.from(node));
|
|
14576
15549
|
return {
|
|
14577
15550
|
start: node.resolveNoCache(slice2.openStart + extra),
|
|
14578
15551
|
end: node.resolveNoCache(node.content.size - slice2.openEnd - extra)
|
|
@@ -14911,7 +15884,7 @@ var Node2 = class {
|
|
|
14911
15884
|
this.type = type;
|
|
14912
15885
|
this.attrs = attrs;
|
|
14913
15886
|
this.marks = marks;
|
|
14914
|
-
this.content = content ||
|
|
15887
|
+
this.content = content || Fragment8.empty;
|
|
14915
15888
|
}
|
|
14916
15889
|
/**
|
|
14917
15890
|
The array of this node's child nodes.
|
|
@@ -15216,7 +16189,7 @@ var Node2 = class {
|
|
|
15216
16189
|
can optionally pass `start` and `end` indices into the
|
|
15217
16190
|
replacement fragment.
|
|
15218
16191
|
*/
|
|
15219
|
-
canReplace(from2, to, replacement =
|
|
16192
|
+
canReplace(from2, to, replacement = Fragment8.empty, start = 0, end = replacement.childCount) {
|
|
15220
16193
|
let one = this.contentMatchAt(from2).matchFragment(replacement, start, end);
|
|
15221
16194
|
let two = one && one.matchFragment(this.content, to);
|
|
15222
16195
|
if (!two || !two.validEnd)
|
|
@@ -15298,7 +16271,7 @@ var Node2 = class {
|
|
|
15298
16271
|
throw new RangeError("Invalid text node in JSON");
|
|
15299
16272
|
return schema.text(json2.text, marks);
|
|
15300
16273
|
}
|
|
15301
|
-
let content =
|
|
16274
|
+
let content = Fragment8.fromJSON(schema, json2.content);
|
|
15302
16275
|
let node = schema.nodeType(json2.type).create(json2.attrs, content, marks);
|
|
15303
16276
|
node.type.checkAttrs(node.attrs);
|
|
15304
16277
|
return node;
|
|
@@ -15440,7 +16413,7 @@ var ContentMatch = class {
|
|
|
15440
16413
|
function search(match, types) {
|
|
15441
16414
|
let finished = match.matchFragment(after, startIndex);
|
|
15442
16415
|
if (finished && (!toEnd || finished.validEnd))
|
|
15443
|
-
return
|
|
16416
|
+
return Fragment8.from(types.map((tp) => tp.createAndFill()));
|
|
15444
16417
|
for (let i = 0; i < match.next.length; i++) {
|
|
15445
16418
|
let { type, next } = match.next[i];
|
|
15446
16419
|
if (!(type.isText || type.hasRequiredAttrs()) && seen.indexOf(next) == -1) {
|
|
@@ -15892,7 +16865,7 @@ var NodeType = class {
|
|
|
15892
16865
|
create(attrs = null, content, marks) {
|
|
15893
16866
|
if (this.isText)
|
|
15894
16867
|
throw new Error("NodeType.create can't construct text nodes");
|
|
15895
|
-
return new Node2(this, this.computeAttrs(attrs),
|
|
16868
|
+
return new Node2(this, this.computeAttrs(attrs), Fragment8.from(content), Mark.setFrom(marks));
|
|
15896
16869
|
}
|
|
15897
16870
|
/**
|
|
15898
16871
|
Like [`create`](https://prosemirror.net/docs/ref/#model.NodeType.create), but check the given content
|
|
@@ -15900,7 +16873,7 @@ var NodeType = class {
|
|
|
15900
16873
|
if it doesn't match.
|
|
15901
16874
|
*/
|
|
15902
16875
|
createChecked(attrs = null, content, marks) {
|
|
15903
|
-
content =
|
|
16876
|
+
content = Fragment8.from(content);
|
|
15904
16877
|
this.checkContent(content);
|
|
15905
16878
|
return new Node2(this, this.computeAttrs(attrs), content, Mark.setFrom(marks));
|
|
15906
16879
|
}
|
|
@@ -15914,7 +16887,7 @@ var NodeType = class {
|
|
|
15914
16887
|
*/
|
|
15915
16888
|
createAndFill(attrs = null, content, marks) {
|
|
15916
16889
|
attrs = this.computeAttrs(attrs);
|
|
15917
|
-
content =
|
|
16890
|
+
content = Fragment8.from(content);
|
|
15918
16891
|
if (content.size) {
|
|
15919
16892
|
let before = this.contentMatch.fillBefore(content);
|
|
15920
16893
|
if (!before)
|
|
@@ -15922,7 +16895,7 @@ var NodeType = class {
|
|
|
15922
16895
|
content = before.append(content);
|
|
15923
16896
|
}
|
|
15924
16897
|
let matched = this.contentMatch.matchFragment(content);
|
|
15925
|
-
let after = matched && matched.fillBefore(
|
|
16898
|
+
let after = matched && matched.fillBefore(Fragment8.empty, true);
|
|
15926
16899
|
if (!after)
|
|
15927
16900
|
return null;
|
|
15928
16901
|
return new Node2(this, attrs, content.append(after), Mark.setFrom(marks));
|
|
@@ -16386,7 +17359,7 @@ var NodeContext = class {
|
|
|
16386
17359
|
if (!this.match) {
|
|
16387
17360
|
if (!this.type)
|
|
16388
17361
|
return [];
|
|
16389
|
-
let fill = this.type.contentMatch.fillBefore(
|
|
17362
|
+
let fill = this.type.contentMatch.fillBefore(Fragment8.from(node));
|
|
16390
17363
|
if (fill) {
|
|
16391
17364
|
this.match = this.type.contentMatch.matchFragment(fill);
|
|
16392
17365
|
} else {
|
|
@@ -16412,9 +17385,9 @@ var NodeContext = class {
|
|
|
16412
17385
|
this.content[this.content.length - 1] = text.withText(text.text.slice(0, text.text.length - m2[0].length));
|
|
16413
17386
|
}
|
|
16414
17387
|
}
|
|
16415
|
-
let content =
|
|
17388
|
+
let content = Fragment8.from(this.content);
|
|
16416
17389
|
if (!openEnd && this.match)
|
|
16417
|
-
content = content.append(this.match.fillBefore(
|
|
17390
|
+
content = content.append(this.match.fillBefore(Fragment8.empty, true));
|
|
16418
17391
|
return this.type ? this.type.create(this.attrs, content, this.marks) : content;
|
|
16419
17392
|
}
|
|
16420
17393
|
inlineContext(node) {
|
|
@@ -17431,7 +18404,7 @@ function mapFragment(fragment, f, parent) {
|
|
|
17431
18404
|
child = f(child, parent, i);
|
|
17432
18405
|
mapped.push(child);
|
|
17433
18406
|
}
|
|
17434
|
-
return
|
|
18407
|
+
return Fragment8.fromArray(mapped);
|
|
17435
18408
|
}
|
|
17436
18409
|
var AddMarkStep = class extends Step {
|
|
17437
18410
|
/**
|
|
@@ -17548,7 +18521,7 @@ var AddNodeMarkStep = class extends Step {
|
|
|
17548
18521
|
if (!node)
|
|
17549
18522
|
return StepResult.fail("No node at mark step's position");
|
|
17550
18523
|
let updated = node.type.create(node.attrs, null, this.mark.addToSet(node.marks));
|
|
17551
|
-
return StepResult.fromReplace(doc3, this.pos, this.pos + 1, new Slice(
|
|
18524
|
+
return StepResult.fromReplace(doc3, this.pos, this.pos + 1, new Slice(Fragment8.from(updated), 0, node.isLeaf ? 0 : 1));
|
|
17552
18525
|
}
|
|
17553
18526
|
invert(doc3) {
|
|
17554
18527
|
let node = doc3.nodeAt(this.pos);
|
|
@@ -17594,7 +18567,7 @@ var RemoveNodeMarkStep = class extends Step {
|
|
|
17594
18567
|
if (!node)
|
|
17595
18568
|
return StepResult.fail("No node at mark step's position");
|
|
17596
18569
|
let updated = node.type.create(node.attrs, null, this.mark.removeFromSet(node.marks));
|
|
17597
|
-
return StepResult.fromReplace(doc3, this.pos, this.pos + 1, new Slice(
|
|
18570
|
+
return StepResult.fromReplace(doc3, this.pos, this.pos + 1, new Slice(Fragment8.from(updated), 0, node.isLeaf ? 0 : 1));
|
|
17598
18571
|
}
|
|
17599
18572
|
invert(doc3) {
|
|
17600
18573
|
let node = doc3.nodeAt(this.pos);
|
|
@@ -17859,7 +18832,7 @@ function clearIncompatible(tr2, pos, parentType, match = parentType.contentMatch
|
|
|
17859
18832
|
let m2, newline = /\r?\n|\r/g, slice2;
|
|
17860
18833
|
while (m2 = newline.exec(child.text)) {
|
|
17861
18834
|
if (!slice2)
|
|
17862
|
-
slice2 = new Slice(
|
|
18835
|
+
slice2 = new Slice(Fragment8.from(parentType.schema.text(" ", parentType.allowedMarks(child.marks))), 0, 0);
|
|
17863
18836
|
replSteps.push(new ReplaceStep(cur + m2.index, cur + m2.index + m2[0].length, slice2));
|
|
17864
18837
|
}
|
|
17865
18838
|
}
|
|
@@ -17867,7 +18840,7 @@ function clearIncompatible(tr2, pos, parentType, match = parentType.contentMatch
|
|
|
17867
18840
|
cur = end;
|
|
17868
18841
|
}
|
|
17869
18842
|
if (!match.validEnd) {
|
|
17870
|
-
let fill = match.fillBefore(
|
|
18843
|
+
let fill = match.fillBefore(Fragment8.empty, true);
|
|
17871
18844
|
tr2.replace(cur, cur, new Slice(fill, 0, 0));
|
|
17872
18845
|
}
|
|
17873
18846
|
for (let i = replSteps.length - 1; i >= 0; i--)
|
|
@@ -17893,20 +18866,20 @@ function lift(tr2, range, target) {
|
|
|
17893
18866
|
let { $from, $to, depth } = range;
|
|
17894
18867
|
let gapStart = $from.before(depth + 1), gapEnd = $to.after(depth + 1);
|
|
17895
18868
|
let start = gapStart, end = gapEnd;
|
|
17896
|
-
let before =
|
|
18869
|
+
let before = Fragment8.empty, openStart = 0;
|
|
17897
18870
|
for (let d = depth, splitting = false; d > target; d--)
|
|
17898
18871
|
if (splitting || $from.index(d) > 0) {
|
|
17899
18872
|
splitting = true;
|
|
17900
|
-
before =
|
|
18873
|
+
before = Fragment8.from($from.node(d).copy(before));
|
|
17901
18874
|
openStart++;
|
|
17902
18875
|
} else {
|
|
17903
18876
|
start--;
|
|
17904
18877
|
}
|
|
17905
|
-
let after =
|
|
18878
|
+
let after = Fragment8.empty, openEnd = 0;
|
|
17906
18879
|
for (let d = depth, splitting = false; d > target; d--)
|
|
17907
18880
|
if (splitting || $to.after(d + 1) < $to.end(d)) {
|
|
17908
18881
|
splitting = true;
|
|
17909
|
-
after =
|
|
18882
|
+
after = Fragment8.from($to.node(d).copy(after));
|
|
17910
18883
|
openEnd++;
|
|
17911
18884
|
} else {
|
|
17912
18885
|
end++;
|
|
@@ -17946,14 +18919,14 @@ function findWrappingInside(range, type) {
|
|
|
17946
18919
|
return inside;
|
|
17947
18920
|
}
|
|
17948
18921
|
function wrap(tr2, range, wrappers) {
|
|
17949
|
-
let content =
|
|
18922
|
+
let content = Fragment8.empty;
|
|
17950
18923
|
for (let i = wrappers.length - 1; i >= 0; i--) {
|
|
17951
18924
|
if (content.size) {
|
|
17952
18925
|
let match = wrappers[i].type.contentMatch.matchFragment(content);
|
|
17953
18926
|
if (!match || !match.validEnd)
|
|
17954
18927
|
throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper");
|
|
17955
18928
|
}
|
|
17956
|
-
content =
|
|
18929
|
+
content = Fragment8.from(wrappers[i].type.create(wrappers[i].attrs, content));
|
|
17957
18930
|
}
|
|
17958
18931
|
let start = range.start, end = range.end;
|
|
17959
18932
|
tr2.step(new ReplaceAroundStep(start, end, start, end, new Slice(content, 0, 0), wrappers.length, true));
|
|
@@ -17978,7 +18951,7 @@ function setBlockType(tr2, from2, to, type, attrs) {
|
|
|
17978
18951
|
clearIncompatible(tr2, tr2.mapping.slice(mapFrom).map(pos, 1), type, void 0, convertNewlines === null);
|
|
17979
18952
|
let mapping = tr2.mapping.slice(mapFrom);
|
|
17980
18953
|
let startM = mapping.map(pos, 1), endM = mapping.map(pos + node.nodeSize, 1);
|
|
17981
|
-
tr2.step(new ReplaceAroundStep(startM, endM, startM + 1, endM - 1, new Slice(
|
|
18954
|
+
tr2.step(new ReplaceAroundStep(startM, endM, startM + 1, endM - 1, new Slice(Fragment8.from(type.create(attrsHere, null, node.marks)), 0, 0), 1, true));
|
|
17982
18955
|
if (convertNewlines === true)
|
|
17983
18956
|
replaceNewlines(tr2, node, pos, mapFrom);
|
|
17984
18957
|
return false;
|
|
@@ -18019,7 +18992,7 @@ function setNodeMarkup(tr2, pos, type, attrs, marks) {
|
|
|
18019
18992
|
return tr2.replaceWith(pos, pos + node.nodeSize, newNode);
|
|
18020
18993
|
if (!type.validContent(node.content))
|
|
18021
18994
|
throw new RangeError("Invalid content for node type " + type.name);
|
|
18022
|
-
tr2.step(new ReplaceAroundStep(pos, pos + node.nodeSize, pos + 1, pos + node.nodeSize - 1, new Slice(
|
|
18995
|
+
tr2.step(new ReplaceAroundStep(pos, pos + node.nodeSize, pos + 1, pos + node.nodeSize - 1, new Slice(Fragment8.from(newNode), 0, 0), 1, true));
|
|
18023
18996
|
}
|
|
18024
18997
|
function canSplit(doc3, pos, depth = 1, typesAfter) {
|
|
18025
18998
|
let $pos = doc3.resolve(pos), base2 = $pos.depth - depth;
|
|
@@ -18043,11 +19016,11 @@ function canSplit(doc3, pos, depth = 1, typesAfter) {
|
|
|
18043
19016
|
return $pos.node(base2).canReplaceWith(index2, index2, baseType ? baseType.type : $pos.node(base2 + 1).type);
|
|
18044
19017
|
}
|
|
18045
19018
|
function split(tr2, pos, depth = 1, typesAfter) {
|
|
18046
|
-
let $pos = tr2.doc.resolve(pos), before =
|
|
19019
|
+
let $pos = tr2.doc.resolve(pos), before = Fragment8.empty, after = Fragment8.empty;
|
|
18047
19020
|
for (let d = $pos.depth, e = $pos.depth - depth, i = depth - 1; d > e; d--, i--) {
|
|
18048
|
-
before =
|
|
19021
|
+
before = Fragment8.from($pos.node(d).copy(before));
|
|
18049
19022
|
let typeAfter = typesAfter && typesAfter[i];
|
|
18050
|
-
after =
|
|
19023
|
+
after = Fragment8.from(typeAfter ? typeAfter.type.create(typeAfter.attrs, after) : $pos.node(d).copy(after));
|
|
18051
19024
|
}
|
|
18052
19025
|
tr2.step(new ReplaceStep(pos, pos, new Slice(before.append(after), depth, depth), true));
|
|
18053
19026
|
}
|
|
@@ -18186,7 +19159,7 @@ var Fitter = class {
|
|
|
18186
19159
|
this.$to = $to;
|
|
18187
19160
|
this.unplaced = unplaced;
|
|
18188
19161
|
this.frontier = [];
|
|
18189
|
-
this.placed =
|
|
19162
|
+
this.placed = Fragment8.empty;
|
|
18190
19163
|
for (let i = 0; i <= $from.depth; i++) {
|
|
18191
19164
|
let node = $from.node(i);
|
|
18192
19165
|
this.frontier.push({
|
|
@@ -18195,7 +19168,7 @@ var Fitter = class {
|
|
|
18195
19168
|
});
|
|
18196
19169
|
}
|
|
18197
19170
|
for (let i = $from.depth; i > 0; i--)
|
|
18198
|
-
this.placed =
|
|
19171
|
+
this.placed = Fragment8.from($from.node(i).copy(this.placed));
|
|
18199
19172
|
}
|
|
18200
19173
|
get depth() {
|
|
18201
19174
|
return this.frontier.length - 1;
|
|
@@ -18252,7 +19225,7 @@ var Fitter = class {
|
|
|
18252
19225
|
let first2 = fragment.firstChild;
|
|
18253
19226
|
for (let frontierDepth = this.depth; frontierDepth >= 0; frontierDepth--) {
|
|
18254
19227
|
let { type, match } = this.frontier[frontierDepth], wrap2, inject = null;
|
|
18255
|
-
if (pass == 1 && (first2 ? match.matchType(first2.type) || (inject = match.fillBefore(
|
|
19228
|
+
if (pass == 1 && (first2 ? match.matchType(first2.type) || (inject = match.fillBefore(Fragment8.from(first2), false)) : parent && type.compatibleContent(parent.type)))
|
|
18256
19229
|
return { sliceDepth, frontierDepth, parent, inject };
|
|
18257
19230
|
else if (pass == 2 && first2 && (wrap2 = match.findWrapping(first2.type)))
|
|
18258
19231
|
return { sliceDepth, frontierDepth, parent, wrap: wrap2 };
|
|
@@ -18312,7 +19285,7 @@ var Fitter = class {
|
|
|
18312
19285
|
let toEnd = taken == fragment.childCount;
|
|
18313
19286
|
if (!toEnd)
|
|
18314
19287
|
openEndCount = -1;
|
|
18315
|
-
this.placed = addToFragment(this.placed, frontierDepth,
|
|
19288
|
+
this.placed = addToFragment(this.placed, frontierDepth, Fragment8.from(add));
|
|
18316
19289
|
this.frontier[frontierDepth].match = match;
|
|
18317
19290
|
if (toEnd && openEndCount < 0 && parent && parent.type == this.frontier[this.depth].type && this.frontier.length > 1)
|
|
18318
19291
|
this.closeFrontierNode();
|
|
@@ -18369,12 +19342,12 @@ var Fitter = class {
|
|
|
18369
19342
|
openFrontierNode(type, attrs = null, content) {
|
|
18370
19343
|
let top = this.frontier[this.depth];
|
|
18371
19344
|
top.match = top.match.matchType(type);
|
|
18372
|
-
this.placed = addToFragment(this.placed, this.depth,
|
|
19345
|
+
this.placed = addToFragment(this.placed, this.depth, Fragment8.from(type.create(attrs, content)));
|
|
18373
19346
|
this.frontier.push({ type, match: type.contentMatch });
|
|
18374
19347
|
}
|
|
18375
19348
|
closeFrontierNode() {
|
|
18376
19349
|
let open = this.frontier.pop();
|
|
18377
|
-
let add = open.match.fillBefore(
|
|
19350
|
+
let add = open.match.fillBefore(Fragment8.empty, true);
|
|
18378
19351
|
if (add.childCount)
|
|
18379
19352
|
this.placed = addToFragment(this.placed, this.frontier.length, add);
|
|
18380
19353
|
}
|
|
@@ -18403,7 +19376,7 @@ function closeNodeStart(node, openStart, openEnd) {
|
|
|
18403
19376
|
if (openStart > 0) {
|
|
18404
19377
|
frag = node.type.contentMatch.fillBefore(frag).append(frag);
|
|
18405
19378
|
if (openEnd <= 0)
|
|
18406
|
-
frag = frag.append(node.type.contentMatch.matchFragment(frag).fillBefore(
|
|
19379
|
+
frag = frag.append(node.type.contentMatch.matchFragment(frag).fillBefore(Fragment8.empty, true));
|
|
18407
19380
|
}
|
|
18408
19381
|
return node.copy(frag);
|
|
18409
19382
|
}
|
|
@@ -18495,7 +19468,7 @@ function closeFragment(fragment, depth, oldOpen, newOpen, parent) {
|
|
|
18495
19468
|
if (depth > newOpen) {
|
|
18496
19469
|
let match = parent.contentMatchAt(0);
|
|
18497
19470
|
let start = match.fillBefore(fragment).append(fragment);
|
|
18498
|
-
fragment = start.append(match.matchFragment(start).fillBefore(
|
|
19471
|
+
fragment = start.append(match.matchFragment(start).fillBefore(Fragment8.empty, true));
|
|
18499
19472
|
}
|
|
18500
19473
|
return fragment;
|
|
18501
19474
|
}
|
|
@@ -18505,7 +19478,7 @@ function replaceRangeWith(tr2, from2, to, node) {
|
|
|
18505
19478
|
if (point != null)
|
|
18506
19479
|
from2 = to = point;
|
|
18507
19480
|
}
|
|
18508
|
-
tr2.replaceRange(from2, to, new Slice(
|
|
19481
|
+
tr2.replaceRange(from2, to, new Slice(Fragment8.from(node), 0, 0));
|
|
18509
19482
|
}
|
|
18510
19483
|
function deleteRange(tr2, from2, to) {
|
|
18511
19484
|
let $from = tr2.doc.resolve(from2), $to = tr2.doc.resolve(to);
|
|
@@ -18553,7 +19526,7 @@ var AttrStep = class extends Step {
|
|
|
18553
19526
|
attrs[name] = node.attrs[name];
|
|
18554
19527
|
attrs[this.attr] = this.value;
|
|
18555
19528
|
let updated = node.type.create(attrs, null, node.marks);
|
|
18556
|
-
return StepResult.fromReplace(doc3, this.pos, this.pos + 1, new Slice(
|
|
19529
|
+
return StepResult.fromReplace(doc3, this.pos, this.pos + 1, new Slice(Fragment8.from(updated), 0, node.isLeaf ? 0 : 1));
|
|
18557
19530
|
}
|
|
18558
19531
|
getMap() {
|
|
18559
19532
|
return StepMap.empty;
|
|
@@ -18688,7 +19661,7 @@ var Transform = class {
|
|
|
18688
19661
|
fragment, node, or array of nodes.
|
|
18689
19662
|
*/
|
|
18690
19663
|
replaceWith(from2, to, content) {
|
|
18691
|
-
return this.replace(from2, to, new Slice(
|
|
19664
|
+
return this.replace(from2, to, new Slice(Fragment8.from(content), 0, 0));
|
|
18692
19665
|
}
|
|
18693
19666
|
/**
|
|
18694
19667
|
Delete the content between the given positions.
|
|
@@ -19190,7 +20163,7 @@ var NodeSelection = class extends Selection {
|
|
|
19190
20163
|
return new NodeSelection($pos);
|
|
19191
20164
|
}
|
|
19192
20165
|
content() {
|
|
19193
|
-
return new Slice(
|
|
20166
|
+
return new Slice(Fragment8.from(this.node), 0, 0);
|
|
19194
20167
|
}
|
|
19195
20168
|
eq(other) {
|
|
19196
20169
|
return other instanceof NodeSelection && other.anchor == this.anchor;
|
|
@@ -21012,7 +21985,7 @@ var NodeViewDesc = class extends ViewDesc {
|
|
|
21012
21985
|
}
|
|
21013
21986
|
}
|
|
21014
21987
|
if (!rule.contentElement)
|
|
21015
|
-
rule.getContent = () =>
|
|
21988
|
+
rule.getContent = () => Fragment8.empty;
|
|
21016
21989
|
}
|
|
21017
21990
|
return rule;
|
|
21018
21991
|
}
|
|
@@ -22331,7 +23304,7 @@ function parseFromClipboard(view, text, html, plainText, $context) {
|
|
|
22331
23304
|
text = f(text, inCode || plainText, view);
|
|
22332
23305
|
});
|
|
22333
23306
|
if (inCode)
|
|
22334
|
-
return text ? new Slice(
|
|
23307
|
+
return text ? new Slice(Fragment8.from(view.state.schema.text(text.replace(/\r\n?/g, "\n"))), 0, 0) : Slice.empty;
|
|
22335
23308
|
let parsed = view.someProp("clipboardTextParser", (f) => f(text, $context, plainText, view));
|
|
22336
23309
|
if (parsed) {
|
|
22337
23310
|
slice2 = parsed;
|
|
@@ -22420,13 +23393,13 @@ function normalizeSiblings(fragment, $context) {
|
|
|
22420
23393
|
}
|
|
22421
23394
|
});
|
|
22422
23395
|
if (result)
|
|
22423
|
-
return
|
|
23396
|
+
return Fragment8.from(result);
|
|
22424
23397
|
}
|
|
22425
23398
|
return fragment;
|
|
22426
23399
|
}
|
|
22427
23400
|
function withWrappers(node, wrap2, from2 = 0) {
|
|
22428
23401
|
for (let i = wrap2.length - 1; i >= from2; i--)
|
|
22429
|
-
node = wrap2[i].create(null,
|
|
23402
|
+
node = wrap2[i].create(null, Fragment8.from(node));
|
|
22430
23403
|
return node;
|
|
22431
23404
|
}
|
|
22432
23405
|
function addToSibling(wrap2, lastWrap, node, sibling, depth) {
|
|
@@ -22436,14 +23409,14 @@ function addToSibling(wrap2, lastWrap, node, sibling, depth) {
|
|
|
22436
23409
|
return sibling.copy(sibling.content.replaceChild(sibling.childCount - 1, inner));
|
|
22437
23410
|
let match = sibling.contentMatchAt(sibling.childCount);
|
|
22438
23411
|
if (match.matchType(depth == wrap2.length - 1 ? node.type : wrap2[depth + 1]))
|
|
22439
|
-
return sibling.copy(sibling.content.append(
|
|
23412
|
+
return sibling.copy(sibling.content.append(Fragment8.from(withWrappers(node, wrap2, depth + 1))));
|
|
22440
23413
|
}
|
|
22441
23414
|
}
|
|
22442
23415
|
function closeRight(node, depth) {
|
|
22443
23416
|
if (depth == 0)
|
|
22444
23417
|
return node;
|
|
22445
23418
|
let fragment = node.content.replaceChild(node.childCount - 1, closeRight(node.lastChild, depth - 1));
|
|
22446
|
-
let fill = node.contentMatchAt(node.childCount).fillBefore(
|
|
23419
|
+
let fill = node.contentMatchAt(node.childCount).fillBefore(Fragment8.empty, true);
|
|
22447
23420
|
return node.copy(fragment.append(fill));
|
|
22448
23421
|
}
|
|
22449
23422
|
function closeRange(fragment, side, from2, to, depth, openEnd) {
|
|
@@ -22453,7 +23426,7 @@ function closeRange(fragment, side, from2, to, depth, openEnd) {
|
|
|
22453
23426
|
if (depth < to - 1)
|
|
22454
23427
|
inner = closeRange(inner, side, from2, to, depth + 1, openEnd);
|
|
22455
23428
|
if (depth >= from2)
|
|
22456
|
-
inner = side < 0 ? node.contentMatchAt(0).fillBefore(inner, openEnd <= depth).append(inner) : inner.append(node.contentMatchAt(node.childCount).fillBefore(
|
|
23429
|
+
inner = side < 0 ? node.contentMatchAt(0).fillBefore(inner, openEnd <= depth).append(inner) : inner.append(node.contentMatchAt(node.childCount).fillBefore(Fragment8.empty, true));
|
|
22457
23430
|
return fragment.replaceChild(side < 0 ? 0 : fragment.childCount - 1, node.copy(inner));
|
|
22458
23431
|
}
|
|
22459
23432
|
function closeSlice(slice2, openStart, openEnd) {
|
|
@@ -22523,7 +23496,7 @@ function addContext(slice2, context) {
|
|
|
22523
23496
|
let type = schema.nodes[array[i]];
|
|
22524
23497
|
if (!type || type.hasRequiredAttrs())
|
|
22525
23498
|
break;
|
|
22526
|
-
content =
|
|
23499
|
+
content = Fragment8.from(type.create(array[i + 1], content));
|
|
22527
23500
|
openStart++;
|
|
22528
23501
|
openEnd++;
|
|
22529
23502
|
}
|
|
@@ -24384,7 +25357,7 @@ function isMarkChange(cur, prev) {
|
|
|
24384
25357
|
let updated = [];
|
|
24385
25358
|
for (let i = 0; i < prev.childCount; i++)
|
|
24386
25359
|
updated.push(update(prev.child(i)));
|
|
24387
|
-
if (
|
|
25360
|
+
if (Fragment8.from(updated).eq(cur))
|
|
24388
25361
|
return { mark, type };
|
|
24389
25362
|
}
|
|
24390
25363
|
function looksLikeBackspace(old, start, end, $newStart, $newEnd) {
|
|
@@ -25494,10 +26467,10 @@ function deleteBarrier(state, $cut, dispatch2, dir) {
|
|
|
25494
26467
|
let canDelAfter = !isolated && $cut.parent.canReplace($cut.index(), $cut.index() + 1);
|
|
25495
26468
|
if (canDelAfter && (conn = (match = before.contentMatchAt(before.childCount)).findWrapping(after.type)) && match.matchType(conn[0] || after.type).validEnd) {
|
|
25496
26469
|
if (dispatch2) {
|
|
25497
|
-
let end = $cut.pos + after.nodeSize, wrap2 =
|
|
26470
|
+
let end = $cut.pos + after.nodeSize, wrap2 = Fragment8.empty;
|
|
25498
26471
|
for (let i = conn.length - 1; i >= 0; i--)
|
|
25499
|
-
wrap2 =
|
|
25500
|
-
wrap2 =
|
|
26472
|
+
wrap2 = Fragment8.from(conn[i].create(null, wrap2));
|
|
26473
|
+
wrap2 = Fragment8.from(before.copy(wrap2));
|
|
25501
26474
|
let tr2 = state.tr.step(new ReplaceAroundStep($cut.pos - 1, end, $cut.pos, end, new Slice(wrap2, 1, 0), conn.length, true));
|
|
25502
26475
|
let $joinAt = tr2.doc.resolve(end + 2 * conn.length);
|
|
25503
26476
|
if ($joinAt.nodeAfter && $joinAt.nodeAfter.type == before.type && canJoin(tr2.doc, $joinAt.pos))
|
|
@@ -25526,9 +26499,9 @@ function deleteBarrier(state, $cut, dispatch2, dir) {
|
|
|
25526
26499
|
afterDepth++;
|
|
25527
26500
|
if (at.canReplace(at.childCount, at.childCount, afterText.content)) {
|
|
25528
26501
|
if (dispatch2) {
|
|
25529
|
-
let end =
|
|
26502
|
+
let end = Fragment8.empty;
|
|
25530
26503
|
for (let i = wrap2.length - 1; i >= 0; i--)
|
|
25531
|
-
end =
|
|
26504
|
+
end = Fragment8.from(wrap2[i].copy(end));
|
|
25532
26505
|
let tr2 = state.tr.step(new ReplaceAroundStep($cut.pos - wrap2.length, $cut.pos + after.nodeSize, $cut.pos + afterDepth, $cut.pos + after.nodeSize - afterDepth, new Slice(end, wrap2.length, 0), 0, true));
|
|
25533
26506
|
dispatch2(tr2.scrollIntoView());
|
|
25534
26507
|
}
|
|
@@ -25633,9 +26606,9 @@ function wrapRangeInList(tr2, range, listType, attrs = null) {
|
|
|
25633
26606
|
return true;
|
|
25634
26607
|
}
|
|
25635
26608
|
function doWrapInList(tr2, range, wrappers, joinBefore, listType) {
|
|
25636
|
-
let content =
|
|
26609
|
+
let content = Fragment8.empty;
|
|
25637
26610
|
for (let i = wrappers.length - 1; i >= 0; i--)
|
|
25638
|
-
content =
|
|
26611
|
+
content = Fragment8.from(wrappers[i].type.create(wrappers[i].attrs, content));
|
|
25639
26612
|
tr2.step(new ReplaceAroundStep(range.start - (joinBefore ? 2 : 0), range.end, range.start, range.end, new Slice(content, 0, 0), wrappers.length, true));
|
|
25640
26613
|
let found2 = 0;
|
|
25641
26614
|
for (let i = 0; i < wrappers.length; i++)
|
|
@@ -25669,7 +26642,7 @@ function liftListItem(itemType) {
|
|
|
25669
26642
|
function liftToOuterList(state, dispatch2, itemType, range) {
|
|
25670
26643
|
let tr2 = state.tr, end = range.end, endOfList = range.$to.end(range.depth);
|
|
25671
26644
|
if (end < endOfList) {
|
|
25672
|
-
tr2.step(new ReplaceAroundStep(end - 1, endOfList, end, endOfList, new Slice(
|
|
26645
|
+
tr2.step(new ReplaceAroundStep(end - 1, endOfList, end, endOfList, new Slice(Fragment8.from(itemType.create(null, range.parent.copy())), 1, 0), 1, true));
|
|
25673
26646
|
range = new NodeRange(tr2.doc.resolve(range.$from.pos), tr2.doc.resolve(endOfList), range.depth);
|
|
25674
26647
|
}
|
|
25675
26648
|
const target = liftTarget(range);
|
|
@@ -25693,10 +26666,10 @@ function liftOutOfList(state, dispatch2, range) {
|
|
|
25693
26666
|
return false;
|
|
25694
26667
|
let atStart = range.startIndex == 0, atEnd = range.endIndex == list.childCount;
|
|
25695
26668
|
let parent = $start.node(-1), indexBefore = $start.index(-1);
|
|
25696
|
-
if (!parent.canReplace(indexBefore + (atStart ? 0 : 1), indexBefore + 1, item.content.append(atEnd ?
|
|
26669
|
+
if (!parent.canReplace(indexBefore + (atStart ? 0 : 1), indexBefore + 1, item.content.append(atEnd ? Fragment8.empty : Fragment8.from(list))))
|
|
25697
26670
|
return false;
|
|
25698
26671
|
let start = $start.pos, end = start + item.nodeSize;
|
|
25699
|
-
tr2.step(new ReplaceAroundStep(start - (atStart ? 1 : 0), end + (atEnd ? 1 : 0), start + 1, end - 1, new Slice((atStart ?
|
|
26672
|
+
tr2.step(new ReplaceAroundStep(start - (atStart ? 1 : 0), end + (atEnd ? 1 : 0), start + 1, end - 1, new Slice((atStart ? Fragment8.empty : Fragment8.from(list.copy(Fragment8.empty))).append(atEnd ? Fragment8.empty : Fragment8.from(list.copy(Fragment8.empty))), atStart ? 0 : 1, atEnd ? 0 : 1), atStart ? 0 : 1));
|
|
25700
26673
|
dispatch2(tr2.scrollIntoView());
|
|
25701
26674
|
return true;
|
|
25702
26675
|
}
|
|
@@ -25714,8 +26687,8 @@ function sinkListItem(itemType) {
|
|
|
25714
26687
|
return false;
|
|
25715
26688
|
if (dispatch2) {
|
|
25716
26689
|
let nestedBefore = nodeBefore.lastChild && nodeBefore.lastChild.type == parent.type;
|
|
25717
|
-
let inner =
|
|
25718
|
-
let slice2 = new Slice(
|
|
26690
|
+
let inner = Fragment8.from(nestedBefore ? itemType.create() : null);
|
|
26691
|
+
let slice2 = new Slice(Fragment8.from(itemType.create(null, Fragment8.from(parent.type.create(null, inner)))), nestedBefore ? 3 : 1, 0);
|
|
25719
26692
|
let before = range.start, after = range.end;
|
|
25720
26693
|
dispatch2(state.tr.step(new ReplaceAroundStep(before - (nestedBefore ? 3 : 1), after, before, after, slice2, 1, true)).scrollIntoView());
|
|
25721
26694
|
}
|
|
@@ -25933,7 +26906,7 @@ function elementFromString(value) {
|
|
|
25933
26906
|
return removeWhitespaces(html);
|
|
25934
26907
|
}
|
|
25935
26908
|
function createNodeFromContent(content, schema, options) {
|
|
25936
|
-
if (content instanceof Node2 || content instanceof
|
|
26909
|
+
if (content instanceof Node2 || content instanceof Fragment8) {
|
|
25937
26910
|
return content;
|
|
25938
26911
|
}
|
|
25939
26912
|
options = {
|
|
@@ -25947,7 +26920,7 @@ function createNodeFromContent(content, schema, options) {
|
|
|
25947
26920
|
try {
|
|
25948
26921
|
const isArrayContent = Array.isArray(content) && content.length > 0;
|
|
25949
26922
|
if (isArrayContent) {
|
|
25950
|
-
return
|
|
26923
|
+
return Fragment8.fromArray(content.map((item) => schema.nodeFromJSON(item)));
|
|
25951
26924
|
}
|
|
25952
26925
|
const node = schema.nodeFromJSON(content);
|
|
25953
26926
|
if (options.errorOnInvalidContent) {
|
|
@@ -27081,7 +28054,7 @@ function inputRulesPlugin(props) {
|
|
|
27081
28054
|
if (typeof text === "string") {
|
|
27082
28055
|
text = text;
|
|
27083
28056
|
} else {
|
|
27084
|
-
text = getHTMLFromFragment(
|
|
28057
|
+
text = getHTMLFromFragment(Fragment8.from(text), state.schema);
|
|
27085
28058
|
}
|
|
27086
28059
|
const { from: from2 } = simulatedInputMeta;
|
|
27087
28060
|
const to = from2 + text.length;
|
|
@@ -27459,7 +28432,7 @@ function pasteRulesPlugin(props) {
|
|
|
27459
28432
|
if (typeof text === "string") {
|
|
27460
28433
|
text = text;
|
|
27461
28434
|
} else {
|
|
27462
|
-
text = getHTMLFromFragment(
|
|
28435
|
+
text = getHTMLFromFragment(Fragment8.from(text), state.schema);
|
|
27463
28436
|
}
|
|
27464
28437
|
const { from: from22 } = simulatedPasteMeta;
|
|
27465
28438
|
const to2 = from22 + text.length;
|
|
@@ -28117,7 +29090,7 @@ var insertContentAt = (position, value, options) => ({ tr: tr2, dispatch: dispat
|
|
|
28117
29090
|
if (isOnlyTextContent) {
|
|
28118
29091
|
if (Array.isArray(value)) {
|
|
28119
29092
|
newContent = value.map((v) => v.text || "").join("");
|
|
28120
|
-
} else if (value instanceof
|
|
29093
|
+
} else if (value instanceof Fragment8) {
|
|
28121
29094
|
let text = "";
|
|
28122
29095
|
value.forEach((node) => {
|
|
28123
29096
|
if (node.text) {
|
|
@@ -28584,10 +29557,10 @@ var splitListItem = (typeOrName, overrideAttrs = {}) => ({ tr: tr2, state, dispa
|
|
|
28584
29557
|
return false;
|
|
28585
29558
|
}
|
|
28586
29559
|
if (dispatch2) {
|
|
28587
|
-
let wrap2 =
|
|
29560
|
+
let wrap2 = Fragment8.empty;
|
|
28588
29561
|
const depthBefore = $from.index(-1) ? 1 : $from.index(-2) ? 2 : 3;
|
|
28589
29562
|
for (let d = $from.depth - depthBefore; d >= $from.depth - 3; d -= 1) {
|
|
28590
|
-
wrap2 =
|
|
29563
|
+
wrap2 = Fragment8.from($from.node(d).copy(wrap2));
|
|
28591
29564
|
}
|
|
28592
29565
|
const depthAfter = (
|
|
28593
29566
|
// eslint-disable-next-line no-nested-ternary
|
|
@@ -28598,7 +29571,7 @@ var splitListItem = (typeOrName, overrideAttrs = {}) => ({ tr: tr2, state, dispa
|
|
|
28598
29571
|
...overrideAttrs
|
|
28599
29572
|
};
|
|
28600
29573
|
const nextType2 = ((_a = type.contentMatch.defaultType) == null ? void 0 : _a.createAndFill(newNextTypeAttributes2)) || void 0;
|
|
28601
|
-
wrap2 = wrap2.append(
|
|
29574
|
+
wrap2 = wrap2.append(Fragment8.from(type.createAndFill(null, nextType2) || void 0));
|
|
28602
29575
|
const start = $from.before($from.depth - (depthBefore - 1));
|
|
28603
29576
|
tr2.replace(start, $from.after(-depthAfter), new Slice(wrap2, 4 - depthBefore, 0));
|
|
28604
29577
|
let sel = -1;
|
|
@@ -30229,7 +31202,7 @@ function markPasteRule(config) {
|
|
|
30229
31202
|
}
|
|
30230
31203
|
|
|
30231
31204
|
// ../../node_modules/@tiptap/react/dist/index.js
|
|
30232
|
-
var
|
|
31205
|
+
var import_react20 = __toESM(require_react(), 1);
|
|
30233
31206
|
var mergeRefs = (...refs) => {
|
|
30234
31207
|
return (node) => {
|
|
30235
31208
|
refs.forEach((ref) => {
|
|
@@ -30448,7 +31421,7 @@ function useEditorState(options) {
|
|
|
30448
31421
|
editorStateManager.getSnapshot,
|
|
30449
31422
|
editorStateManager.getServerSnapshot,
|
|
30450
31423
|
options.selector,
|
|
30451
|
-
(_a = options.equalityFn) != null ? _a :
|
|
31424
|
+
(_a = options.equalityFn) != null ? _a : import_react20.default
|
|
30452
31425
|
);
|
|
30453
31426
|
useIsomorphicLayoutEffect(() => {
|
|
30454
31427
|
return editorStateManager.watch(options.editor);
|
|
@@ -30727,11 +31700,11 @@ var ReactNodeViewContext = createContext({
|
|
|
30727
31700
|
var useReactNodeView = () => useContext(ReactNodeViewContext);
|
|
30728
31701
|
t__default.forwardRef((props, ref) => {
|
|
30729
31702
|
const { onDragStart } = useReactNodeView();
|
|
30730
|
-
const
|
|
31703
|
+
const Tag6 = props.as || "div";
|
|
30731
31704
|
return (
|
|
30732
31705
|
// @ts-ignore
|
|
30733
31706
|
/* @__PURE__ */ jsx(
|
|
30734
|
-
|
|
31707
|
+
Tag6,
|
|
30735
31708
|
{
|
|
30736
31709
|
...props,
|
|
30737
31710
|
ref,
|
|
@@ -30816,7 +31789,7 @@ var starInputRegex = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/;
|
|
|
30816
31789
|
var starPasteRegex = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g;
|
|
30817
31790
|
var underscoreInputRegex = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/;
|
|
30818
31791
|
var underscorePasteRegex = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g;
|
|
30819
|
-
var
|
|
31792
|
+
var Bold2 = Mark2.create({
|
|
30820
31793
|
name: "bold",
|
|
30821
31794
|
addOptions() {
|
|
30822
31795
|
return {
|
|
@@ -30893,7 +31866,7 @@ var Bold = Mark2.create({
|
|
|
30893
31866
|
// ../../node_modules/@tiptap/extension-code/dist/index.js
|
|
30894
31867
|
var inputRegex2 = /(^|[^`])`([^`]+)`(?!`)/;
|
|
30895
31868
|
var pasteRegex = /(^|[^`])`([^`]+)`(?!`)/g;
|
|
30896
|
-
var
|
|
31869
|
+
var Code2 = Mark2.create({
|
|
30897
31870
|
name: "code",
|
|
30898
31871
|
addOptions() {
|
|
30899
31872
|
return {
|
|
@@ -31342,7 +32315,7 @@ var starInputRegex2 = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/;
|
|
|
31342
32315
|
var starPasteRegex2 = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g;
|
|
31343
32316
|
var underscoreInputRegex2 = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/;
|
|
31344
32317
|
var underscorePasteRegex2 = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g;
|
|
31345
|
-
var
|
|
32318
|
+
var Italic2 = Mark2.create({
|
|
31346
32319
|
name: "italic",
|
|
31347
32320
|
addOptions() {
|
|
31348
32321
|
return {
|
|
@@ -32748,7 +33721,7 @@ function isAllowedUri(uri, protocols) {
|
|
|
32748
33721
|
)
|
|
32749
33722
|
);
|
|
32750
33723
|
}
|
|
32751
|
-
var
|
|
33724
|
+
var Link3 = Mark2.create({
|
|
32752
33725
|
name: "link",
|
|
32753
33726
|
priority: 1e3,
|
|
32754
33727
|
keepOnSplit: false,
|
|
@@ -32942,7 +33915,7 @@ var Link = Mark2.create({
|
|
|
32942
33915
|
return plugins;
|
|
32943
33916
|
}
|
|
32944
33917
|
});
|
|
32945
|
-
var index_default2 =
|
|
33918
|
+
var index_default2 = Link3;
|
|
32946
33919
|
|
|
32947
33920
|
// ../../node_modules/@tiptap/extension-list/dist/index.js
|
|
32948
33921
|
var __defProp3 = Object.defineProperty;
|
|
@@ -33671,7 +34644,7 @@ var Text2 = Node3.create({
|
|
|
33671
34644
|
});
|
|
33672
34645
|
|
|
33673
34646
|
// ../../node_modules/@tiptap/extension-underline/dist/index.js
|
|
33674
|
-
var
|
|
34647
|
+
var Underline2 = Mark2.create({
|
|
33675
34648
|
name: "underline",
|
|
33676
34649
|
addOptions() {
|
|
33677
34650
|
return {
|
|
@@ -33713,7 +34686,7 @@ var Underline = Mark2.create({
|
|
|
33713
34686
|
};
|
|
33714
34687
|
}
|
|
33715
34688
|
});
|
|
33716
|
-
var index_default3 =
|
|
34689
|
+
var index_default3 = Underline2;
|
|
33717
34690
|
|
|
33718
34691
|
// ../../node_modules/prosemirror-dropcursor/dist/index.js
|
|
33719
34692
|
function dropCursor(options = {}) {
|
|
@@ -34044,9 +35017,9 @@ function beforeinput(view, event) {
|
|
|
34044
35017
|
let insert = $from.parent.contentMatchAt($from.index()).findWrapping(view.state.schema.nodes.text);
|
|
34045
35018
|
if (!insert)
|
|
34046
35019
|
return false;
|
|
34047
|
-
let frag =
|
|
35020
|
+
let frag = Fragment8.empty;
|
|
34048
35021
|
for (let i = insert.length - 1; i >= 0; i--)
|
|
34049
|
-
frag =
|
|
35022
|
+
frag = Fragment8.from(insert[i].createAndFill(null, frag));
|
|
34050
35023
|
let tr2 = view.state.tr.replace($from.pos, $from.pos, new Slice(frag, 0, 0));
|
|
34051
35024
|
tr2.setSelection(TextSelection.near(tr2.doc.resolve($from.pos + 1)));
|
|
34052
35025
|
view.dispatch(tr2);
|
|
@@ -34953,7 +35926,7 @@ var StarterKit = Extension.create({
|
|
|
34953
35926
|
var _a, _b, _c, _d;
|
|
34954
35927
|
const extensions = [];
|
|
34955
35928
|
if (this.options.bold !== false) {
|
|
34956
|
-
extensions.push(
|
|
35929
|
+
extensions.push(Bold2.configure(this.options.bold));
|
|
34957
35930
|
}
|
|
34958
35931
|
if (this.options.blockquote !== false) {
|
|
34959
35932
|
extensions.push(Blockquote.configure(this.options.blockquote));
|
|
@@ -34962,7 +35935,7 @@ var StarterKit = Extension.create({
|
|
|
34962
35935
|
extensions.push(BulletList.configure(this.options.bulletList));
|
|
34963
35936
|
}
|
|
34964
35937
|
if (this.options.code !== false) {
|
|
34965
|
-
extensions.push(
|
|
35938
|
+
extensions.push(Code2.configure(this.options.code));
|
|
34966
35939
|
}
|
|
34967
35940
|
if (this.options.codeBlock !== false) {
|
|
34968
35941
|
extensions.push(CodeBlock.configure(this.options.codeBlock));
|
|
@@ -34989,7 +35962,7 @@ var StarterKit = Extension.create({
|
|
|
34989
35962
|
extensions.push(HorizontalRule.configure(this.options.horizontalRule));
|
|
34990
35963
|
}
|
|
34991
35964
|
if (this.options.italic !== false) {
|
|
34992
|
-
extensions.push(
|
|
35965
|
+
extensions.push(Italic2.configure(this.options.italic));
|
|
34993
35966
|
}
|
|
34994
35967
|
if (this.options.listItem !== false) {
|
|
34995
35968
|
extensions.push(ListItem.configure(this.options.listItem));
|
|
@@ -34998,7 +35971,7 @@ var StarterKit = Extension.create({
|
|
|
34998
35971
|
extensions.push(ListKeymap.configure((_a = this.options) == null ? void 0 : _a.listKeymap));
|
|
34999
35972
|
}
|
|
35000
35973
|
if (this.options.link !== false) {
|
|
35001
|
-
extensions.push(
|
|
35974
|
+
extensions.push(Link3.configure((_b = this.options) == null ? void 0 : _b.link));
|
|
35002
35975
|
}
|
|
35003
35976
|
if (this.options.orderedList !== false) {
|
|
35004
35977
|
extensions.push(OrderedList.configure(this.options.orderedList));
|
|
@@ -35013,7 +35986,7 @@ var StarterKit = Extension.create({
|
|
|
35013
35986
|
extensions.push(Text2.configure(this.options.text));
|
|
35014
35987
|
}
|
|
35015
35988
|
if (this.options.underline !== false) {
|
|
35016
|
-
extensions.push(
|
|
35989
|
+
extensions.push(Underline2.configure((_c = this.options) == null ? void 0 : _c.underline));
|
|
35017
35990
|
}
|
|
35018
35991
|
if (this.options.trailingNode !== false) {
|
|
35019
35992
|
extensions.push(TrailingNode.configure((_d = this.options) == null ? void 0 : _d.trailingNode));
|
|
@@ -35726,10 +36699,10 @@ var CellSelection = class _CellSelection extends Selection {
|
|
|
35726
36699
|
}
|
|
35727
36700
|
rowContent.push(cell);
|
|
35728
36701
|
}
|
|
35729
|
-
rows.push(table.child(row).copy(
|
|
36702
|
+
rows.push(table.child(row).copy(Fragment8.from(rowContent)));
|
|
35730
36703
|
}
|
|
35731
36704
|
const fragment = this.isColSelection() && this.isRowSelection() ? table : rows;
|
|
35732
|
-
return new Slice(
|
|
36705
|
+
return new Slice(Fragment8.from(fragment), 1, 1);
|
|
35733
36706
|
}
|
|
35734
36707
|
replace(tr2, content = Slice.empty) {
|
|
35735
36708
|
const mapFrom = tr2.steps.length, ranges = this.ranges;
|
|
@@ -35749,7 +36722,7 @@ var CellSelection = class _CellSelection extends Selection {
|
|
|
35749
36722
|
tr2.setSelection(sel);
|
|
35750
36723
|
}
|
|
35751
36724
|
replaceWith(tr2, node) {
|
|
35752
|
-
this.replace(tr2, new Slice(
|
|
36725
|
+
this.replace(tr2, new Slice(Fragment8.from(node), 0, 0));
|
|
35753
36726
|
}
|
|
35754
36727
|
forEachCell(f) {
|
|
35755
36728
|
const table = this.$anchorCell.node(-1);
|
|
@@ -36297,7 +37270,7 @@ function mergeCells(state, dispatch2) {
|
|
|
36297
37270
|
if (dispatch2) {
|
|
36298
37271
|
const tr2 = state.tr;
|
|
36299
37272
|
const seen = {};
|
|
36300
|
-
let content =
|
|
37273
|
+
let content = Fragment8.empty;
|
|
36301
37274
|
let mergedPos;
|
|
36302
37275
|
let mergedCell;
|
|
36303
37276
|
for (let row = rect.top; row < rect.bottom; row++) {
|
|
@@ -36678,14 +37651,14 @@ function ensureRectangular(schema, rows) {
|
|
|
36678
37651
|
width = Math.max(width, widths[r2]);
|
|
36679
37652
|
for (let r2 = 0; r2 < widths.length; r2++) {
|
|
36680
37653
|
if (r2 >= rows.length)
|
|
36681
|
-
rows.push(
|
|
37654
|
+
rows.push(Fragment8.empty);
|
|
36682
37655
|
if (widths[r2] < width) {
|
|
36683
37656
|
const empty2 = tableNodeTypes(schema).cell.createAndFill();
|
|
36684
37657
|
const cells = [];
|
|
36685
37658
|
for (let i = widths[r2]; i < width; i++) {
|
|
36686
37659
|
cells.push(empty2);
|
|
36687
37660
|
}
|
|
36688
|
-
rows[r2] = rows[r2].append(
|
|
37661
|
+
rows[r2] = rows[r2].append(Fragment8.from(cells));
|
|
36689
37662
|
}
|
|
36690
37663
|
}
|
|
36691
37664
|
return { height: rows.length, width, rows };
|
|
@@ -36717,7 +37690,7 @@ function clipCells({ width, height, rows }, newWidth, newHeight) {
|
|
|
36717
37690
|
for (let j = 1; j < cell.attrs.rowspan; j++)
|
|
36718
37691
|
added[row + j] = (added[row + j] || 0) + cell.attrs.colspan;
|
|
36719
37692
|
}
|
|
36720
|
-
newRows.push(
|
|
37693
|
+
newRows.push(Fragment8.from(cells));
|
|
36721
37694
|
}
|
|
36722
37695
|
rows = newRows;
|
|
36723
37696
|
width = newWidth;
|
|
@@ -36738,7 +37711,7 @@ function clipCells({ width, height, rows }, newWidth, newHeight) {
|
|
|
36738
37711
|
);
|
|
36739
37712
|
cells.push(cell);
|
|
36740
37713
|
}
|
|
36741
|
-
newRows.push(
|
|
37714
|
+
newRows.push(Fragment8.from(cells));
|
|
36742
37715
|
}
|
|
36743
37716
|
rows = newRows;
|
|
36744
37717
|
height = newHeight;
|
|
@@ -36773,7 +37746,7 @@ function growTable(tr2, map2, table, start, width, height, mapFrom) {
|
|
|
36773
37746
|
header ? emptyHead || (emptyHead = types.header_cell.createAndFill()) : empty2 || (empty2 = types.cell.createAndFill())
|
|
36774
37747
|
);
|
|
36775
37748
|
}
|
|
36776
|
-
const emptyRow = types.row.create(null,
|
|
37749
|
+
const emptyRow = types.row.create(null, Fragment8.from(cells)), rows = [];
|
|
36777
37750
|
for (let i = map2.height; i < height; i++)
|
|
36778
37751
|
rows.push(emptyRow);
|
|
36779
37752
|
tr2.insert(tr2.mapping.slice(mapFrom).map(start + table.nodeSize - 2), rows);
|
|
@@ -36982,7 +37955,7 @@ function handlePaste(view, _, slice2) {
|
|
|
36982
37955
|
width: 1,
|
|
36983
37956
|
height: 1,
|
|
36984
37957
|
rows: [
|
|
36985
|
-
|
|
37958
|
+
Fragment8.from(
|
|
36986
37959
|
fitSlice(tableNodeTypes(view.state.schema).cell, slice2)
|
|
36987
37960
|
)
|
|
36988
37961
|
]
|
|
@@ -53355,7 +54328,7 @@ function RichTextEditor({
|
|
|
53355
54328
|
onClick: () => editor.chain().focus().toggleBold().run(),
|
|
53356
54329
|
tooltip: "Bold (Cmd+B)",
|
|
53357
54330
|
disabled: isSourceView,
|
|
53358
|
-
children: /* @__PURE__ */ jsx(Bold
|
|
54331
|
+
children: /* @__PURE__ */ jsx(Bold, { className: "w-4 h-4" })
|
|
53359
54332
|
}
|
|
53360
54333
|
),
|
|
53361
54334
|
features.italic && /* @__PURE__ */ jsx(
|
|
@@ -53365,7 +54338,7 @@ function RichTextEditor({
|
|
|
53365
54338
|
onClick: () => editor.chain().focus().toggleItalic().run(),
|
|
53366
54339
|
tooltip: "Italic (Cmd+I)",
|
|
53367
54340
|
disabled: isSourceView,
|
|
53368
|
-
children: /* @__PURE__ */ jsx(Italic
|
|
54341
|
+
children: /* @__PURE__ */ jsx(Italic, { className: "w-4 h-4" })
|
|
53369
54342
|
}
|
|
53370
54343
|
),
|
|
53371
54344
|
features.underline && /* @__PURE__ */ jsx(
|
|
@@ -53375,7 +54348,7 @@ function RichTextEditor({
|
|
|
53375
54348
|
onClick: () => editor.chain().focus().toggleUnderline().run(),
|
|
53376
54349
|
tooltip: "Underline (Cmd+U)",
|
|
53377
54350
|
disabled: isSourceView,
|
|
53378
|
-
children: /* @__PURE__ */ jsx(Underline
|
|
54351
|
+
children: /* @__PURE__ */ jsx(Underline, { className: "w-4 h-4" })
|
|
53379
54352
|
}
|
|
53380
54353
|
),
|
|
53381
54354
|
features.strike && /* @__PURE__ */ jsx(
|
|
@@ -53395,7 +54368,7 @@ function RichTextEditor({
|
|
|
53395
54368
|
onClick: () => editor.chain().focus().toggleCode().run(),
|
|
53396
54369
|
tooltip: "Inline code",
|
|
53397
54370
|
disabled: isSourceView,
|
|
53398
|
-
children: /* @__PURE__ */ jsx(Code
|
|
54371
|
+
children: /* @__PURE__ */ jsx(Code, { className: "w-4 h-4" })
|
|
53399
54372
|
}
|
|
53400
54373
|
)
|
|
53401
54374
|
] }),
|
|
@@ -56119,9 +57092,9 @@ function AdvancedChart({
|
|
|
56119
57092
|
toggleSeriesVisibility(entry.dataKey);
|
|
56120
57093
|
}
|
|
56121
57094
|
};
|
|
56122
|
-
const handleExport = (
|
|
57095
|
+
const handleExport = (format7) => {
|
|
56123
57096
|
if (onExport) {
|
|
56124
|
-
onExport(
|
|
57097
|
+
onExport(format7);
|
|
56125
57098
|
}
|
|
56126
57099
|
};
|
|
56127
57100
|
const handleZoom = (direction) => {
|
|
@@ -60317,7 +61290,7 @@ var OptimizedImageInternal = ({
|
|
|
60317
61290
|
width,
|
|
60318
61291
|
height,
|
|
60319
61292
|
quality = 75,
|
|
60320
|
-
format:
|
|
61293
|
+
format: format7 = "auto",
|
|
60321
61294
|
lazy = true,
|
|
60322
61295
|
blur: blur2 = true,
|
|
60323
61296
|
priority = false,
|
|
@@ -60356,7 +61329,7 @@ var OptimizedImageInternal = ({
|
|
|
60356
61329
|
params.set("f", options.format);
|
|
60357
61330
|
return optimizedUrl;
|
|
60358
61331
|
};
|
|
60359
|
-
const optimizedSrc = getOptimizedSrc(src, { width, height, quality, format:
|
|
61332
|
+
const optimizedSrc = getOptimizedSrc(src, { width, height, quality, format: format7 });
|
|
60360
61333
|
const handleImageLoad = () => {
|
|
60361
61334
|
setIsLoaded(true);
|
|
60362
61335
|
setIsLoading(false);
|
|
@@ -60520,7 +61493,7 @@ var OptimizedImageInternal = ({
|
|
|
60520
61493
|
] }),
|
|
60521
61494
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
60522
61495
|
"Format: ",
|
|
60523
|
-
|
|
61496
|
+
format7
|
|
60524
61497
|
] })
|
|
60525
61498
|
]
|
|
60526
61499
|
}
|
|
@@ -63400,11 +64373,11 @@ function downloadFile(content, filename, mimeType) {
|
|
|
63400
64373
|
URL.revokeObjectURL(url);
|
|
63401
64374
|
}
|
|
63402
64375
|
async function exportData(data, options) {
|
|
63403
|
-
const { format:
|
|
64376
|
+
const { format: format7, filename = "data-export", columns, includeHeaders = true } = options;
|
|
63404
64377
|
let content;
|
|
63405
64378
|
let mimeType;
|
|
63406
64379
|
let extension;
|
|
63407
|
-
switch (
|
|
64380
|
+
switch (format7) {
|
|
63408
64381
|
case "csv":
|
|
63409
64382
|
content = dataToCSV(data, columns, includeHeaders);
|
|
63410
64383
|
mimeType = "text/csv;charset=utf-8;";
|
|
@@ -63418,7 +64391,7 @@ async function exportData(data, options) {
|
|
|
63418
64391
|
case "xlsx":
|
|
63419
64392
|
throw new Error("XLSX export requires additional dependencies. Use CSV format instead.");
|
|
63420
64393
|
default:
|
|
63421
|
-
throw new Error(`Unsupported export format: ${
|
|
64394
|
+
throw new Error(`Unsupported export format: ${format7}`);
|
|
63422
64395
|
}
|
|
63423
64396
|
const finalFilename = `${filename}-${( new Date()).toISOString().split("T")[0]}.${extension}`;
|
|
63424
64397
|
downloadFile(content, finalFilename, mimeType);
|
|
@@ -63901,11 +64874,11 @@ function DataTable({
|
|
|
63901
64874
|
rowSelection: features.rowSelection !== false || selectable,
|
|
63902
64875
|
export: features.export !== false || exportable
|
|
63903
64876
|
});
|
|
63904
|
-
const handleExport = async (
|
|
64877
|
+
const handleExport = async (format7) => {
|
|
63905
64878
|
const selectedRows = table.getFilteredSelectedRowModel().rows;
|
|
63906
64879
|
const dataToExport = selectedRows.length > 0 ? selectedRows.map((row) => row.original) : table.getFilteredRowModel().rows.map((row) => row.original);
|
|
63907
64880
|
if (typeof exportable === "object" && exportable.onExport) {
|
|
63908
|
-
exportable.onExport(dataToExport,
|
|
64881
|
+
exportable.onExport(dataToExport, format7);
|
|
63909
64882
|
return;
|
|
63910
64883
|
}
|
|
63911
64884
|
if (onExport) {
|
|
@@ -63915,7 +64888,7 @@ function DataTable({
|
|
|
63915
64888
|
const filename = typeof exportable === "object" && exportable.filename ? exportable.filename : "data-export";
|
|
63916
64889
|
const visibleColumns = getVisibleColumns(columns, columnVisibility);
|
|
63917
64890
|
await exportData(dataToExport, {
|
|
63918
|
-
format:
|
|
64891
|
+
format: format7,
|
|
63919
64892
|
filename,
|
|
63920
64893
|
columns: visibleColumns,
|
|
63921
64894
|
includeHeaders: true
|
|
@@ -64326,7 +65299,7 @@ var SearchInput = t__default.memo(({
|
|
|
64326
65299
|
] })
|
|
64327
65300
|
] }) });
|
|
64328
65301
|
});
|
|
64329
|
-
function
|
|
65302
|
+
function Sidebar2({
|
|
64330
65303
|
sections,
|
|
64331
65304
|
footer,
|
|
64332
65305
|
showSearch = true,
|
|
@@ -65847,18 +66820,18 @@ var countries = [
|
|
|
65847
66820
|
{ code: "NO", name: "Norway", dialCode: "+47", flag: "\u{1F1F3}\u{1F1F4}", format: "xxx xx xxx" },
|
|
65848
66821
|
{ code: "FI", name: "Finland", dialCode: "+358", flag: "\u{1F1EB}\u{1F1EE}", format: "xx xxxxxxx" }
|
|
65849
66822
|
];
|
|
65850
|
-
function formatPhoneNumber(number,
|
|
65851
|
-
if (!number || !
|
|
66823
|
+
function formatPhoneNumber(number, format7) {
|
|
66824
|
+
if (!number || !format7)
|
|
65852
66825
|
return "";
|
|
65853
66826
|
const cleaned = number.replace(/\D/g, "");
|
|
65854
66827
|
let formatted = "";
|
|
65855
66828
|
let digitIndex = 0;
|
|
65856
|
-
for (let i = 0; i <
|
|
65857
|
-
if (
|
|
66829
|
+
for (let i = 0; i < format7.length && digitIndex < cleaned.length; i++) {
|
|
66830
|
+
if (format7[i] === "x") {
|
|
65858
66831
|
formatted += cleaned[digitIndex];
|
|
65859
66832
|
digitIndex++;
|
|
65860
66833
|
} else {
|
|
65861
|
-
formatted +=
|
|
66834
|
+
formatted += format7[i];
|
|
65862
66835
|
}
|
|
65863
66836
|
}
|
|
65864
66837
|
return formatted;
|
|
@@ -67577,4 +68550,4 @@ var BadgePro = t__default.forwardRef(({
|
|
|
67577
68550
|
});
|
|
67578
68551
|
BadgePro.displayName = "BadgePro";
|
|
67579
68552
|
|
|
67580
|
-
export { MoonUIAccordionPro as Accordion, MoonUIAccordionContentPro as AccordionContent, MoonUIAccordionItemPro as AccordionItem, MoonUIAccordionTriggerPro as AccordionTrigger, Calendar3 as AdvancedCalendar, AdvancedChart, AdvancedForms, MoonUIAlertPro as Alert, MoonUIAlertDescriptionPro as AlertDescription, MoonUIAlertTitlePro as AlertTitle, AnimatedButton, MoonUIAspectRatioPro as AspectRatio, MoonUIAvatarPro as Avatar, MoonUIAvatarFallbackPro as AvatarFallback, MoonUIAvatarImagePro as AvatarImage, MoonUIBadgePro as Badge, MoonUIBreadcrumbPro as Breadcrumb, MoonUIBreadcrumbEllipsisPro as BreadcrumbEllipsis, MoonUIBreadcrumbItemPro as BreadcrumbItem, MoonUIBreadcrumbLinkPro as BreadcrumbLink, MoonUIBreadcrumbListPro as BreadcrumbList, MoonUIBreadcrumbPagePro as BreadcrumbPage, MoonUIBreadcrumbSeparatorPro as BreadcrumbSeparator, MoonUIButtonPro as Button, Calendar, MoonUICardPro as Card, MoonUICardContentPro as CardContent, MoonUICardDescriptionPro as CardDescription, MoonUICardFooterPro as CardFooter, MoonUICardHeaderPro as CardHeader, MoonUICardTitlePro as CardTitle, MoonUICheckboxPro as Checkbox, MoonUICollapsiblePro as Collapsible, MoonUICollapsibleContentPro as CollapsibleContent, MoonUICollapsibleTriggerPro as CollapsibleTrigger, MoonUIColorPickerPro as ColorPicker, MoonUICommandPro as Command, MoonUICommandDialogPro as CommandDialog, MoonUICommandEmptyPro as CommandEmpty, MoonUICommandGroupPro as CommandGroup, MoonUICommandInputPro as CommandInput, MoonUICommandItemPro as CommandItem, MoonUICommandListPro as CommandList, MoonUICommandSeparatorPro as CommandSeparator, MoonUICommandShortcutPro as CommandShortcut, Dashboard, DataTable, MoonUIDialogPro as Dialog, MoonUIDialogClosePro as DialogClose, MoonUIDialogContentPro as DialogContent, MoonUIDialogDescriptionPro as DialogDescription, MoonUIDialogFooterPro as DialogFooter, MoonUIDialogHeaderPro as DialogHeader, MoonUIDialogTitlePro as DialogTitle, MoonUIDialogTriggerPro as DialogTrigger, DraggableList, MoonUIDropdownMenuPro as DropdownMenu, MoonUIDropdownMenuCheckboxItemPro as DropdownMenuCheckboxItem, MoonUIDropdownMenuContentPro as DropdownMenuContent, MoonUIDropdownMenuGroupPro as DropdownMenuGroup, MoonUIDropdownMenuItemPro as DropdownMenuItem, MoonUIDropdownMenuLabelPro as DropdownMenuLabel, MoonUIDropdownMenuPortalPro as DropdownMenuPortal, MoonUIDropdownMenuRadioGroupPro as DropdownMenuRadioGroup, MoonUIDropdownMenuRadioItemPro as DropdownMenuRadioItem, MoonUIDropdownMenuSeparatorPro as DropdownMenuSeparator, MoonUIDropdownMenuShortcutPro as DropdownMenuShortcut, MoonUIDropdownMenuSubPro as DropdownMenuSub, MoonUIDropdownMenuSubContentPro as DropdownMenuSubContent, MoonUIDropdownMenuSubTriggerPro as DropdownMenuSubTrigger, MoonUIDropdownMenuTriggerPro as DropdownMenuTrigger, enhanced_exports as Enhanced, ErrorBoundary, FloatingActionButton, FormWizardNavigation, FormWizardProgress, FormWizardStep, GitHubStars, HealthCheck, HoverCard2 as HoverCard, HoverCard3D, HoverCardContent2 as HoverCardContent, HoverCardTrigger2 as HoverCardTrigger, MoonUIInputPro as Input, Kanban, MoonUILabelPro as Label, LazyComponent, LazyImage, LazyList, MagneticButton, MemoryAnalytics, MemoryEfficientData, MoonUIAccordionContentPro, MoonUIAccordionItemPro, MoonUIAccordionPro, MoonUIAccordionTriggerPro, MoonUIAlertDescriptionPro, MoonUIAlertPro, MoonUIAlertTitlePro, MoonUIAspectRatioPro, MoonUIAvatarFallbackPro, MoonUIAvatarImagePro, MoonUIAvatarPro, MoonUIBadgePro, MoonUIBreadcrumbEllipsisPro, MoonUIBreadcrumbItemPro, MoonUIBreadcrumbLinkPro, MoonUIBreadcrumbListPro, MoonUIBreadcrumbPagePro, MoonUIBreadcrumbPro, MoonUIBreadcrumbSeparatorPro, MoonUIButtonPro, MoonUICardContentPro, MoonUICardDescriptionPro, MoonUICardFooterPro, MoonUICardHeaderPro, MoonUICardPro, MoonUICardTitlePro, MoonUICheckboxPro, MoonUICollapsibleContentPro, MoonUICollapsiblePro, MoonUICollapsibleTriggerPro, MoonUIColorPickerPro, MoonUICommandDialogPro, MoonUICommandEmptyPro, MoonUICommandGroupPro, MoonUICommandInputPro, MoonUICommandItemPro, MoonUICommandListPro, MoonUICommandPro, MoonUICommandSeparatorPro, MoonUICommandShortcutPro, MoonUICreditCardInputPro, MoonUIDialogClosePro, MoonUIDialogContentPro, MoonUIDialogDescriptionPro, MoonUIDialogFooterPro, MoonUIDialogHeaderPro, MoonUIDialogPro, MoonUIDialogTitlePro, MoonUIDialogTriggerPro, MoonUIDropdownMenuCheckboxItemPro, MoonUIDropdownMenuContentPro, MoonUIDropdownMenuGroupPro, MoonUIDropdownMenuItemPro, MoonUIDropdownMenuLabelPro, MoonUIDropdownMenuPortalPro, MoonUIDropdownMenuPro, MoonUIDropdownMenuRadioGroupPro, MoonUIDropdownMenuRadioItemPro, MoonUIDropdownMenuSeparatorPro, MoonUIDropdownMenuShortcutPro, MoonUIDropdownMenuSubContentPro, MoonUIDropdownMenuSubPro, MoonUIDropdownMenuSubTriggerPro, MoonUIDropdownMenuTriggerPro, MoonUIFileUploadPro, MoonUIFormWizardPro, MoonUIInputPro, MoonUILabelPro, MoonUIPaginationContentPro, MoonUIPaginationEllipsisPro, MoonUIPaginationItemPro, MoonUIPaginationLinkPro, MoonUIPaginationNextPro, MoonUIPaginationPreviousPro, MoonUIPaginationPro, MoonUIPhoneNumberInputPro, MoonUIPopoverContentPro, MoonUIPopoverPro, MoonUIPopoverTriggerPro, MoonUIProgressPro, MoonUIQuizFormPro, MoonUIRadioGroupContextPro, MoonUIRadioGroupItemPro, MoonUIRadioGroupPro, MoonUIRadioItemWithLabelPro, MoonUIRadioLabelPro, MoonUISelectContentPro, MoonUISelectGroupPro, MoonUISelectItemPro, MoonUISelectLabelPro, MoonUISelectPro, MoonUISelectSeparatorPro, MoonUISelectTriggerPro, MoonUISelectValuePro, MoonUISeparatorPro, MoonUISkeletonPro, MoonUISliderPro, MoonUISwitchPro, MoonUITableBodyPro, MoonUITableCaptionPro, MoonUITableCellPro, MoonUITableFooterPro, MoonUITableHeadPro, MoonUITableHeaderPro, MoonUITablePro, MoonUITableRowPro, MoonUITabsContentPro, MoonUITabsListPro, MoonUITabsPro, MoonUITabsTriggerPro, MoonUITextareaPro, MoonUIToastPro, MoonUITogglePro, MoonUITooltipContentPro, MoonUITooltipPro, MoonUITooltipProviderPro, MoonUITooltipTriggerPro, MoonUIalertVariantsPro, MoonUIaspectRatioVariantsPro, MoonUIbreadcrumbVariantsPro, MoonUIcollapsibleContentVariantsPro, MoonUIcollapsibleTriggerVariantsPro, MoonUIcommandVariantsPro, MoonUIradioGroupItemVariantsPro, MoonUItableVariantsPro, MoonUItoggleVariantsPro, OptimizedImage, MoonUIPaginationPro as Pagination, MoonUIPaginationContentPro as PaginationContent, MoonUIPaginationEllipsisPro as PaginationEllipsis, MoonUIPaginationItemPro as PaginationItem, MoonUIPaginationLinkPro as PaginationLink, MoonUIPaginationNextPro as PaginationNext, MoonUIPaginationPreviousPro as PaginationPrevious, PerformanceDebugger, PerformanceMonitor, PinchZoom, MoonUIPopoverPro as Popover, MoonUIPopoverContentPro as PopoverContent, MoonUIPopoverTriggerPro as PopoverTrigger, MoonUIProgressPro as Progress, MoonUIRadioGroupPro as RadioGroup, MoonUIRadioGroupContextPro as RadioGroupContext, MoonUIRadioGroupItemPro as RadioGroupItem, MoonUIRadioItemWithLabelPro as RadioItemWithLabel, MoonUIRadioLabelPro as RadioLabel, RichTextEditor, ScrollArea, ScrollBar, MoonUISelectPro as Select, MoonUISelectContentPro as SelectContent, MoonUISelectGroupPro as SelectGroup, MoonUISelectItemPro as SelectItem, MoonUISelectLabelPro as SelectLabel, MoonUISelectSeparatorPro as SelectSeparator, MoonUISelectTriggerPro as SelectTrigger, MoonUISelectValuePro as SelectValue, SelectableVirtualList, MoonUISeparatorPro as Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar, MoonUISkeletonPro as Skeleton, MoonUISliderPro as Slider, SpotlightCard, SwipeableCard, MoonUISwitchPro as Switch, MoonUITablePro as Table, MoonUITableBodyPro as TableBody, MoonUITableCaptionPro as TableCaption, MoonUITableCellPro as TableCell, MoonUITableFooterPro as TableFooter, MoonUITableHeadPro as TableHead, MoonUITableHeaderPro as TableHeader, MoonUITableRowPro as TableRow, MoonUITabsPro as Tabs, MoonUITabsContentPro as TabsContent, MoonUITabsListPro as TabsList, MoonUITabsTriggerPro as TabsTrigger, MoonUITextareaPro as Textarea, Timeline, MoonUIToastPro as Toast, MoonUITogglePro as Toggle, MoonUITooltipPro as Tooltip, MoonUITooltipContentPro as TooltipContent, MoonUITooltipProviderPro as TooltipProvider, MoonUITooltipTriggerPro as TooltipTrigger, VirtualList, MoonUIalertVariantsPro as alertVariants, animatedButtonVariants, MoonUIaspectRatioVariantsPro as aspectRatioVariants, moonUIBadgeVariantsPro as badgeVariants, MoonUIbreadcrumbVariantsPro as breadcrumbVariants, moonUIButtonProVariants as buttonVariants, cn, MoonUIcollapsibleContentVariantsPro as collapsibleContentVariants, MoonUIcollapsibleTriggerVariantsPro as collapsibleTriggerVariants, MoonUIcommandVariantsPro as commandVariants, getExpandableColumn, moonUIBadgeVariantsPro, moonUIButtonProVariants, moonUISeparatorVariantsPro, countries as phoneCountries, MoonUIradioGroupItemVariantsPro as radioGroupItemVariants, moonUISeparatorVariantsPro as separatorVariants, MoonUItableVariantsPro as tableVariants, MoonUItoggleVariantsPro as toggleVariants, useExpandableRows, useFormWizard, useStreamingData, useVirtualList };
|
|
68553
|
+
export { MoonUIAccordionPro as Accordion, MoonUIAccordionContentPro as AccordionContent, MoonUIAccordionItemPro as AccordionItem, MoonUIAccordionTriggerPro as AccordionTrigger, Calendar3 as AdvancedCalendar, AdvancedChart, AdvancedForms, MoonUIAlertPro as Alert, MoonUIAlertDescriptionPro as AlertDescription, MoonUIAlertTitlePro as AlertTitle, AnimatedButton, MoonUIAspectRatioPro as AspectRatio, MoonUIAvatarPro as Avatar, MoonUIAvatarFallbackPro as AvatarFallback, MoonUIAvatarImagePro as AvatarImage, MoonUIBadgePro as Badge, MoonUIBreadcrumbPro as Breadcrumb, MoonUIBreadcrumbEllipsisPro as BreadcrumbEllipsis, MoonUIBreadcrumbItemPro as BreadcrumbItem, MoonUIBreadcrumbLinkPro as BreadcrumbLink, MoonUIBreadcrumbListPro as BreadcrumbList, MoonUIBreadcrumbPagePro as BreadcrumbPage, MoonUIBreadcrumbSeparatorPro as BreadcrumbSeparator, MoonUIButtonPro as Button, Calendar, CalendarPro, MoonUICardPro as Card, MoonUICardContentPro as CardContent, MoonUICardDescriptionPro as CardDescription, MoonUICardFooterPro as CardFooter, MoonUICardHeaderPro as CardHeader, MoonUICardTitlePro as CardTitle, MoonUICheckboxPro as Checkbox, MoonUICollapsiblePro as Collapsible, MoonUICollapsibleContentPro as CollapsibleContent, MoonUICollapsibleTriggerPro as CollapsibleTrigger, MoonUIColorPickerPro as ColorPicker, MoonUICommandPro as Command, MoonUICommandDialogPro as CommandDialog, MoonUICommandEmptyPro as CommandEmpty, MoonUICommandGroupPro as CommandGroup, MoonUICommandInputPro as CommandInput, MoonUICommandItemPro as CommandItem, MoonUICommandListPro as CommandList, MoonUICommandSeparatorPro as CommandSeparator, MoonUICommandShortcutPro as CommandShortcut, Dashboard, DataTable, MoonUIDialogPro as Dialog, MoonUIDialogClosePro as DialogClose, MoonUIDialogContentPro as DialogContent, MoonUIDialogDescriptionPro as DialogDescription, MoonUIDialogFooterPro as DialogFooter, MoonUIDialogHeaderPro as DialogHeader, MoonUIDialogTitlePro as DialogTitle, MoonUIDialogTriggerPro as DialogTrigger, DraggableList, MoonUIDropdownMenuPro as DropdownMenu, MoonUIDropdownMenuCheckboxItemPro as DropdownMenuCheckboxItem, MoonUIDropdownMenuContentPro as DropdownMenuContent, MoonUIDropdownMenuGroupPro as DropdownMenuGroup, MoonUIDropdownMenuItemPro as DropdownMenuItem, MoonUIDropdownMenuLabelPro as DropdownMenuLabel, MoonUIDropdownMenuPortalPro as DropdownMenuPortal, MoonUIDropdownMenuRadioGroupPro as DropdownMenuRadioGroup, MoonUIDropdownMenuRadioItemPro as DropdownMenuRadioItem, MoonUIDropdownMenuSeparatorPro as DropdownMenuSeparator, MoonUIDropdownMenuShortcutPro as DropdownMenuShortcut, MoonUIDropdownMenuSubPro as DropdownMenuSub, MoonUIDropdownMenuSubContentPro as DropdownMenuSubContent, MoonUIDropdownMenuSubTriggerPro as DropdownMenuSubTrigger, MoonUIDropdownMenuTriggerPro as DropdownMenuTrigger, enhanced_exports as Enhanced, ErrorBoundary, FloatingActionButton, FormWizardNavigation, FormWizardProgress, FormWizardStep, GitHubStars, HealthCheck, HoverCard2 as HoverCard, HoverCard3D, HoverCardContent2 as HoverCardContent, HoverCardTrigger2 as HoverCardTrigger, MoonUIInputPro as Input, Kanban, MoonUILabelPro as Label, LazyComponent, LazyImage, LazyList, MagneticButton, MemoryAnalytics, MemoryEfficientData, MoonUIAccordionContentPro, MoonUIAccordionItemPro, MoonUIAccordionPro, MoonUIAccordionTriggerPro, MoonUIAlertDescriptionPro, MoonUIAlertPro, MoonUIAlertTitlePro, MoonUIAspectRatioPro, MoonUIAvatarFallbackPro, MoonUIAvatarImagePro, MoonUIAvatarPro, MoonUIBadgePro, MoonUIBreadcrumbEllipsisPro, MoonUIBreadcrumbItemPro, MoonUIBreadcrumbLinkPro, MoonUIBreadcrumbListPro, MoonUIBreadcrumbPagePro, MoonUIBreadcrumbPro, MoonUIBreadcrumbSeparatorPro, MoonUIButtonPro, MoonUICardContentPro, MoonUICardDescriptionPro, MoonUICardFooterPro, MoonUICardHeaderPro, MoonUICardPro, MoonUICardTitlePro, MoonUICheckboxPro, MoonUICollapsibleContentPro, MoonUICollapsiblePro, MoonUICollapsibleTriggerPro, MoonUIColorPickerPro, MoonUICommandDialogPro, MoonUICommandEmptyPro, MoonUICommandGroupPro, MoonUICommandInputPro, MoonUICommandItemPro, MoonUICommandListPro, MoonUICommandPro, MoonUICommandSeparatorPro, MoonUICommandShortcutPro, MoonUICreditCardInputPro, MoonUIDialogClosePro, MoonUIDialogContentPro, MoonUIDialogDescriptionPro, MoonUIDialogFooterPro, MoonUIDialogHeaderPro, MoonUIDialogPro, MoonUIDialogTitlePro, MoonUIDialogTriggerPro, MoonUIDropdownMenuCheckboxItemPro, MoonUIDropdownMenuContentPro, MoonUIDropdownMenuGroupPro, MoonUIDropdownMenuItemPro, MoonUIDropdownMenuLabelPro, MoonUIDropdownMenuPortalPro, MoonUIDropdownMenuPro, MoonUIDropdownMenuRadioGroupPro, MoonUIDropdownMenuRadioItemPro, MoonUIDropdownMenuSeparatorPro, MoonUIDropdownMenuShortcutPro, MoonUIDropdownMenuSubContentPro, MoonUIDropdownMenuSubPro, MoonUIDropdownMenuSubTriggerPro, MoonUIDropdownMenuTriggerPro, MoonUIFileUploadPro, MoonUIFormWizardPro, MoonUIInputPro, MoonUILabelPro, MoonUIPaginationContentPro, MoonUIPaginationEllipsisPro, MoonUIPaginationItemPro, MoonUIPaginationLinkPro, MoonUIPaginationNextPro, MoonUIPaginationPreviousPro, MoonUIPaginationPro, MoonUIPhoneNumberInputPro, MoonUIPopoverContentPro, MoonUIPopoverPro, MoonUIPopoverTriggerPro, MoonUIProgressPro, MoonUIQuizFormPro, MoonUIRadioGroupContextPro, MoonUIRadioGroupItemPro, MoonUIRadioGroupPro, MoonUIRadioItemWithLabelPro, MoonUIRadioLabelPro, MoonUISelectContentPro, MoonUISelectGroupPro, MoonUISelectItemPro, MoonUISelectLabelPro, MoonUISelectPro, MoonUISelectSeparatorPro, MoonUISelectTriggerPro, MoonUISelectValuePro, MoonUISeparatorPro, MoonUISkeletonPro, MoonUISliderPro, MoonUISwitchPro, MoonUITableBodyPro, MoonUITableCaptionPro, MoonUITableCellPro, MoonUITableFooterPro, MoonUITableHeadPro, MoonUITableHeaderPro, MoonUITablePro, MoonUITableRowPro, MoonUITabsContentPro, MoonUITabsListPro, MoonUITabsPro, MoonUITabsTriggerPro, MoonUITextareaPro, MoonUIToastPro, MoonUITogglePro, MoonUITooltipContentPro, MoonUITooltipPro, MoonUITooltipProviderPro, MoonUITooltipTriggerPro, MoonUIalertVariantsPro, MoonUIaspectRatioVariantsPro, MoonUIbreadcrumbVariantsPro, MoonUIcollapsibleContentVariantsPro, MoonUIcollapsibleTriggerVariantsPro, MoonUIcommandVariantsPro, MoonUIradioGroupItemVariantsPro, MoonUItableVariantsPro, MoonUItoggleVariantsPro, OptimizedImage, MoonUIPaginationPro as Pagination, MoonUIPaginationContentPro as PaginationContent, MoonUIPaginationEllipsisPro as PaginationEllipsis, MoonUIPaginationItemPro as PaginationItem, MoonUIPaginationLinkPro as PaginationLink, MoonUIPaginationNextPro as PaginationNext, MoonUIPaginationPreviousPro as PaginationPrevious, PerformanceDebugger, PerformanceMonitor, PinchZoom, MoonUIPopoverPro as Popover, MoonUIPopoverContentPro as PopoverContent, MoonUIPopoverTriggerPro as PopoverTrigger, MoonUIProgressPro as Progress, MoonUIRadioGroupPro as RadioGroup, MoonUIRadioGroupContextPro as RadioGroupContext, MoonUIRadioGroupItemPro as RadioGroupItem, MoonUIRadioItemWithLabelPro as RadioItemWithLabel, MoonUIRadioLabelPro as RadioLabel, RichTextEditor, ScrollArea, ScrollBar, MoonUISelectPro as Select, MoonUISelectContentPro as SelectContent, MoonUISelectGroupPro as SelectGroup, MoonUISelectItemPro as SelectItem, MoonUISelectLabelPro as SelectLabel, MoonUISelectSeparatorPro as SelectSeparator, MoonUISelectTriggerPro as SelectTrigger, MoonUISelectValuePro as SelectValue, SelectableVirtualList, MoonUISeparatorPro as Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar2 as Sidebar, MoonUISkeletonPro as Skeleton, MoonUISliderPro as Slider, SpotlightCard, SwipeableCard, MoonUISwitchPro as Switch, MoonUITablePro as Table, MoonUITableBodyPro as TableBody, MoonUITableCaptionPro as TableCaption, MoonUITableCellPro as TableCell, MoonUITableFooterPro as TableFooter, MoonUITableHeadPro as TableHead, MoonUITableHeaderPro as TableHeader, MoonUITableRowPro as TableRow, MoonUITabsPro as Tabs, MoonUITabsContentPro as TabsContent, MoonUITabsListPro as TabsList, MoonUITabsTriggerPro as TabsTrigger, MoonUITextareaPro as Textarea, Timeline, MoonUIToastPro as Toast, MoonUITogglePro as Toggle, MoonUITooltipPro as Tooltip, MoonUITooltipContentPro as TooltipContent, MoonUITooltipProviderPro as TooltipProvider, MoonUITooltipTriggerPro as TooltipTrigger, VirtualList, MoonUIalertVariantsPro as alertVariants, animatedButtonVariants, MoonUIaspectRatioVariantsPro as aspectRatioVariants, moonUIBadgeVariantsPro as badgeVariants, MoonUIbreadcrumbVariantsPro as breadcrumbVariants, moonUIButtonProVariants as buttonVariants, cn, MoonUIcollapsibleContentVariantsPro as collapsibleContentVariants, MoonUIcollapsibleTriggerVariantsPro as collapsibleTriggerVariants, MoonUIcommandVariantsPro as commandVariants, getExpandableColumn, moonUIBadgeVariantsPro, moonUIButtonProVariants, moonUISeparatorVariantsPro, countries as phoneCountries, MoonUIradioGroupItemVariantsPro as radioGroupItemVariants, moonUISeparatorVariantsPro as separatorVariants, MoonUItableVariantsPro as tableVariants, MoonUItoggleVariantsPro as toggleVariants, useExpandableRows, useFormWizard, useStreamingData, useVirtualList };
|