calendarkit-prov2 2.0.10 → 2.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -0
- package/dist/index.d.mts +9 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +44 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +45 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -8,7 +8,7 @@ import { startOfDay, addDays, endOfDay, startOfWeek, endOfWeek, startOfMonth, en
|
|
|
8
8
|
import { cva } from 'class-variance-authority';
|
|
9
9
|
import { clsx } from 'clsx';
|
|
10
10
|
import { twMerge } from 'tailwind-merge';
|
|
11
|
-
import { Headphones, Ban, PartyPopper, Star, Presentation, ClipboardCheck, RefreshCw, Sparkles, Home, MapPin, Video, Package, Users, User, Menu, Plus, ChevronLeft, ChevronRight, Globe, ChevronDown, Sun, Moon, CalendarCheck2, CalendarDays, CalendarRange, Calendar, ListTodo, MoreHorizontal, LayoutGrid, X,
|
|
11
|
+
import { Headphones, Ban, PartyPopper, Star, Presentation, ClipboardCheck, RefreshCw, Sparkles, Home, MapPin, Video, Package, Users, User, Menu, Plus, ChevronLeft, ChevronRight, Globe, ChevronDown, Sun, Moon, CalendarCheck2, Clock, CalendarDays, CalendarRange, Calendar, ListTodo, MoreHorizontal, LayoutGrid, X, Paperclip, Bell, Edit3, Copy, Trash2, Edit2, ExternalLink, AlignLeft, File, Download, BellRing, Check, Repeat, Tag } from 'lucide-react';
|
|
12
12
|
import { sv as sv$1, pl as pl$1, nl as nl$1, ru as ru$1, ko as ko$1, ja as ja$1, zhCN, ar as ar$1, pt as pt$1, it as it$1, es as es$1, de as de$1, fr as fr$1, enUS, tr as tr$1 } from 'date-fns/locale';
|
|
13
13
|
import { toZonedTime, fromZonedTime } from 'date-fns-tz';
|
|
14
14
|
import { CSS } from '@dnd-kit/utilities';
|
|
@@ -158,6 +158,8 @@ var tr = {
|
|
|
158
158
|
tomorrow: "Yar\u0131n",
|
|
159
159
|
eventCount: "etkinlik",
|
|
160
160
|
eventsCount: "etkinlik",
|
|
161
|
+
hourCount: "saat",
|
|
162
|
+
hoursCount: "saat",
|
|
161
163
|
timezone: "Zaman Dilimi",
|
|
162
164
|
localTime: "Yerel Saat",
|
|
163
165
|
operations: "\u0130\u015Flemler",
|
|
@@ -251,6 +253,8 @@ var en = {
|
|
|
251
253
|
tomorrow: "Tomorrow",
|
|
252
254
|
eventCount: "event",
|
|
253
255
|
eventsCount: "events",
|
|
256
|
+
hourCount: "hour",
|
|
257
|
+
hoursCount: "hours",
|
|
254
258
|
timezone: "Time zone",
|
|
255
259
|
localTime: "Local Time",
|
|
256
260
|
operations: "Operations",
|
|
@@ -344,6 +348,8 @@ var fr = {
|
|
|
344
348
|
tomorrow: "Demain",
|
|
345
349
|
eventCount: "\xE9v\xE9nement",
|
|
346
350
|
eventsCount: "\xE9v\xE9nements",
|
|
351
|
+
hourCount: "heure",
|
|
352
|
+
hoursCount: "heures",
|
|
347
353
|
timezone: "Fuseau horaire",
|
|
348
354
|
localTime: "Heure locale",
|
|
349
355
|
operations: "Op\xE9rations",
|
|
@@ -437,6 +443,8 @@ var de = {
|
|
|
437
443
|
tomorrow: "Morgen",
|
|
438
444
|
eventCount: "Termin",
|
|
439
445
|
eventsCount: "Termine",
|
|
446
|
+
hourCount: "Stunde",
|
|
447
|
+
hoursCount: "Stunden",
|
|
440
448
|
timezone: "Zeitzone",
|
|
441
449
|
localTime: "Ortszeit",
|
|
442
450
|
operations: "Aktionen",
|
|
@@ -530,6 +538,8 @@ var es = {
|
|
|
530
538
|
tomorrow: "Ma\xF1ana",
|
|
531
539
|
eventCount: "evento",
|
|
532
540
|
eventsCount: "eventos",
|
|
541
|
+
hourCount: "hora",
|
|
542
|
+
hoursCount: "horas",
|
|
533
543
|
timezone: "Zona horaria",
|
|
534
544
|
localTime: "Hora local",
|
|
535
545
|
operations: "Operaciones",
|
|
@@ -623,6 +633,8 @@ var it = {
|
|
|
623
633
|
tomorrow: "Domani",
|
|
624
634
|
eventCount: "evento",
|
|
625
635
|
eventsCount: "eventi",
|
|
636
|
+
hourCount: "ora",
|
|
637
|
+
hoursCount: "ore",
|
|
626
638
|
timezone: "Fuso orario",
|
|
627
639
|
localTime: "Ora locale",
|
|
628
640
|
operations: "Operazioni",
|
|
@@ -716,6 +728,8 @@ var pt = {
|
|
|
716
728
|
tomorrow: "Amanh\xE3",
|
|
717
729
|
eventCount: "evento",
|
|
718
730
|
eventsCount: "eventos",
|
|
731
|
+
hourCount: "hora",
|
|
732
|
+
hoursCount: "horas",
|
|
719
733
|
timezone: "Fuso hor\xE1rio",
|
|
720
734
|
localTime: "Hora local",
|
|
721
735
|
operations: "Opera\xE7\xF5es",
|
|
@@ -809,6 +823,8 @@ var ar = {
|
|
|
809
823
|
tomorrow: "\u063A\u062F\u064B\u0627",
|
|
810
824
|
eventCount: "\u062D\u062F\u062B",
|
|
811
825
|
eventsCount: "\u0623\u062D\u062F\u0627\u062B",
|
|
826
|
+
hourCount: "\u0633\u0627\u0639\u0629",
|
|
827
|
+
hoursCount: "\u0633\u0627\u0639\u0627\u062A",
|
|
812
828
|
timezone: "\u0627\u0644\u0645\u0646\u0637\u0642\u0629 \u0627\u0644\u0632\u0645\u0646\u064A\u0629",
|
|
813
829
|
localTime: "\u0627\u0644\u062A\u0648\u0642\u064A\u062A \u0627\u0644\u0645\u062D\u0644\u064A",
|
|
814
830
|
operations: "\u0627\u0644\u0639\u0645\u0644\u064A\u0627\u062A",
|
|
@@ -902,6 +918,8 @@ var zh = {
|
|
|
902
918
|
tomorrow: "\u660E\u5929",
|
|
903
919
|
eventCount: "\u4E2A\u6D3B\u52A8",
|
|
904
920
|
eventsCount: "\u4E2A\u6D3B\u52A8",
|
|
921
|
+
hourCount: "\u5C0F\u65F6",
|
|
922
|
+
hoursCount: "\u5C0F\u65F6",
|
|
905
923
|
timezone: "\u65F6\u533A",
|
|
906
924
|
localTime: "\u672C\u5730\u65F6\u95F4",
|
|
907
925
|
operations: "\u64CD\u4F5C",
|
|
@@ -995,6 +1013,8 @@ var ja = {
|
|
|
995
1013
|
tomorrow: "\u660E\u65E5",
|
|
996
1014
|
eventCount: "\u4EF6\u306E\u30A4\u30D9\u30F3\u30C8",
|
|
997
1015
|
eventsCount: "\u4EF6\u306E\u30A4\u30D9\u30F3\u30C8",
|
|
1016
|
+
hourCount: "\u6642\u9593",
|
|
1017
|
+
hoursCount: "\u6642\u9593",
|
|
998
1018
|
timezone: "\u30BF\u30A4\u30E0\u30BE\u30FC\u30F3",
|
|
999
1019
|
localTime: "\u30ED\u30FC\u30AB\u30EB\u6642\u9593",
|
|
1000
1020
|
operations: "\u64CD\u4F5C",
|
|
@@ -1088,6 +1108,8 @@ var ko = {
|
|
|
1088
1108
|
tomorrow: "\uB0B4\uC77C",
|
|
1089
1109
|
eventCount: "\uAC1C \uC77C\uC815",
|
|
1090
1110
|
eventsCount: "\uAC1C \uC77C\uC815",
|
|
1111
|
+
hourCount: "\uC2DC\uAC04",
|
|
1112
|
+
hoursCount: "\uC2DC\uAC04",
|
|
1091
1113
|
timezone: "\uC2DC\uAC04\uB300",
|
|
1092
1114
|
localTime: "\uB85C\uCEEC \uC2DC\uAC04",
|
|
1093
1115
|
operations: "\uC791\uC5C5",
|
|
@@ -1181,6 +1203,8 @@ var ru = {
|
|
|
1181
1203
|
tomorrow: "\u0417\u0430\u0432\u0442\u0440\u0430",
|
|
1182
1204
|
eventCount: "\u0441\u043E\u0431\u044B\u0442\u0438\u0435",
|
|
1183
1205
|
eventsCount: "\u0441\u043E\u0431\u044B\u0442\u0438\u0439",
|
|
1206
|
+
hourCount: "\u0447\u0430\u0441",
|
|
1207
|
+
hoursCount: "\u0447\u0430\u0441\u043E\u0432",
|
|
1184
1208
|
timezone: "\u0427\u0430\u0441\u043E\u0432\u043E\u0439 \u043F\u043E\u044F\u0441",
|
|
1185
1209
|
localTime: "\u041C\u0435\u0441\u0442\u043D\u043E\u0435 \u0432\u0440\u0435\u043C\u044F",
|
|
1186
1210
|
operations: "\u041E\u043F\u0435\u0440\u0430\u0446\u0438\u0438",
|
|
@@ -1274,6 +1298,8 @@ var nl = {
|
|
|
1274
1298
|
tomorrow: "Morgen",
|
|
1275
1299
|
eventCount: "evenement",
|
|
1276
1300
|
eventsCount: "evenementen",
|
|
1301
|
+
hourCount: "uur",
|
|
1302
|
+
hoursCount: "uur",
|
|
1277
1303
|
timezone: "Tijdzone",
|
|
1278
1304
|
localTime: "Lokale tijd",
|
|
1279
1305
|
operations: "Bewerkingen",
|
|
@@ -1367,6 +1393,8 @@ var pl = {
|
|
|
1367
1393
|
tomorrow: "Jutro",
|
|
1368
1394
|
eventCount: "wydarzenie",
|
|
1369
1395
|
eventsCount: "wydarze\u0144",
|
|
1396
|
+
hourCount: "godzina",
|
|
1397
|
+
hoursCount: "godzin",
|
|
1370
1398
|
timezone: "Strefa czasowa",
|
|
1371
1399
|
localTime: "Czas lokalny",
|
|
1372
1400
|
operations: "Operacje",
|
|
@@ -1460,6 +1488,8 @@ var sv = {
|
|
|
1460
1488
|
tomorrow: "Imorgon",
|
|
1461
1489
|
eventCount: "h\xE4ndelse",
|
|
1462
1490
|
eventsCount: "h\xE4ndelser",
|
|
1491
|
+
hourCount: "timme",
|
|
1492
|
+
hoursCount: "timmar",
|
|
1463
1493
|
timezone: "Tidszon",
|
|
1464
1494
|
localTime: "Lokal tid",
|
|
1465
1495
|
operations: "\xC5tg\xE4rder",
|
|
@@ -1542,6 +1572,7 @@ var CalendarHeader = ({
|
|
|
1542
1572
|
activeCustomViewId,
|
|
1543
1573
|
onCustomViewChange,
|
|
1544
1574
|
eventCount,
|
|
1575
|
+
hourCount,
|
|
1545
1576
|
hideLanguageSwitcher = false
|
|
1546
1577
|
}) => {
|
|
1547
1578
|
const [isLangOpen, setIsLangOpen] = useState(false);
|
|
@@ -1714,15 +1745,23 @@ var CalendarHeader = ({
|
|
|
1714
1745
|
onClick: onThemeToggle
|
|
1715
1746
|
},
|
|
1716
1747
|
isDarkMode ? /* @__PURE__ */ React18__default.createElement(Sun, { className: "h-4 w-4 text-amber-500" }) : /* @__PURE__ */ React18__default.createElement(Moon, { className: "h-4 w-4 text-muted-foreground" })
|
|
1717
|
-
), typeof eventCount === "number" &&
|
|
1748
|
+
), !hideViewSwitcher && (typeof eventCount === "number" || typeof hourCount === "number") && /* @__PURE__ */ React18__default.createElement("div", { className: "flex items-center gap-1.5" }, typeof eventCount === "number" && /* @__PURE__ */ React18__default.createElement(
|
|
1718
1749
|
"div",
|
|
1719
1750
|
{
|
|
1720
1751
|
className: "flex items-center gap-1.5 h-8 px-3 rounded-xl bg-primary/10 text-primary text-xs font-semibold tabular-nums select-none border border-primary/20 shadow-sm shadow-primary/10",
|
|
1721
|
-
title: `${eventCount}
|
|
1752
|
+
title: `${eventCount} ${eventCount === 1 ? translations.eventCount ?? "event" : translations.eventsCount ?? "events"}`
|
|
1722
1753
|
},
|
|
1723
1754
|
/* @__PURE__ */ React18__default.createElement(CalendarCheck2, { className: "w-3.5 h-3.5 shrink-0" }),
|
|
1724
1755
|
/* @__PURE__ */ React18__default.createElement("span", null, eventCount)
|
|
1725
|
-
),
|
|
1756
|
+
), typeof hourCount === "number" && /* @__PURE__ */ React18__default.createElement(
|
|
1757
|
+
"div",
|
|
1758
|
+
{
|
|
1759
|
+
className: "flex items-center gap-1.5 h-8 px-3 rounded-xl bg-amber-500/10 text-amber-600 dark:text-amber-400 text-xs font-semibold tabular-nums select-none border border-amber-500/20 shadow-sm shadow-amber-500/10",
|
|
1760
|
+
title: `${hourCount} ${hourCount === 1 ? translations.hourCount ?? "hour" : translations.hoursCount ?? "hours"}`
|
|
1761
|
+
},
|
|
1762
|
+
/* @__PURE__ */ React18__default.createElement(Clock, { className: "w-3.5 h-3.5 shrink-0" }),
|
|
1763
|
+
/* @__PURE__ */ React18__default.createElement("span", null, hourCount)
|
|
1764
|
+
)), !hideViewSwitcher && /* @__PURE__ */ React18__default.createElement("div", { className: "flex items-center bg-muted/50 backdrop-blur-sm rounded-xl p-1 gap-0.5" }, viewConfig.map(({ key, icon: Icon }) => /* @__PURE__ */ React18__default.createElement(
|
|
1726
1765
|
Button,
|
|
1727
1766
|
{
|
|
1728
1767
|
key,
|
|
@@ -4418,6 +4457,7 @@ var Scheduler = ({
|
|
|
4418
4457
|
translations,
|
|
4419
4458
|
hideViewSwitcher,
|
|
4420
4459
|
hideLanguageSwitcher,
|
|
4460
|
+
hourCount,
|
|
4421
4461
|
hideFab = false,
|
|
4422
4462
|
compactShortEvents = true,
|
|
4423
4463
|
initialScrollHour = 8,
|
|
@@ -4668,6 +4708,7 @@ var Scheduler = ({
|
|
|
4668
4708
|
setActiveCustomMenu(null);
|
|
4669
4709
|
},
|
|
4670
4710
|
eventCount: viewEventCount,
|
|
4711
|
+
hourCount,
|
|
4671
4712
|
hideLanguageSwitcher
|
|
4672
4713
|
}
|
|
4673
4714
|
),
|