@rokoyfa/calendar 0.1.0 → 1.1.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/CHANGELOG.md +21 -1
- package/README.md +107 -142
- package/api/openapi.yaml +10 -2
- package/dist-lib/cdn/calendar-widget.js +7 -7
- package/dist-lib/cdn/calendar-widget.js.map +1 -1
- package/dist-lib/cdn/de-BPZBZXaZ.js +2 -0
- package/dist-lib/cdn/de-BPZBZXaZ.js.map +1 -0
- package/dist-lib/cdn/es-DsIckdik.js +2 -0
- package/dist-lib/cdn/es-DsIckdik.js.map +1 -0
- package/dist-lib/cdn/fr-DWAs3O6J.js +2 -0
- package/dist-lib/cdn/fr-DWAs3O6J.js.map +1 -0
- package/dist-lib/cdn/it-CbhjxqIb.js +2 -0
- package/dist-lib/cdn/it-CbhjxqIb.js.map +1 -0
- package/dist-lib/cdn/nl-mjTHznX5.js +2 -0
- package/dist-lib/cdn/nl-mjTHznX5.js.map +1 -0
- package/dist-lib/cdn/pl-CXT0jb2D.js +2 -0
- package/dist-lib/cdn/pl-CXT0jb2D.js.map +1 -0
- package/dist-lib/cdn/pt-D0oXlVdU.js +2 -0
- package/dist-lib/cdn/pt-D0oXlVdU.js.map +1 -0
- package/dist-lib/npm/de-CCzGjeTd.js +573 -0
- package/dist-lib/npm/de-CCzGjeTd.js.map +1 -0
- package/dist-lib/npm/es-Ciaf66rH.js +559 -0
- package/dist-lib/npm/es-Ciaf66rH.js.map +1 -0
- package/dist-lib/npm/fr-CAqNm10Z.js +559 -0
- package/dist-lib/npm/fr-CAqNm10Z.js.map +1 -0
- package/dist-lib/npm/index.js +1159 -911
- package/dist-lib/npm/index.js.map +1 -1
- package/dist-lib/npm/it-Cqqdu2ua.js +565 -0
- package/dist-lib/npm/it-Cqqdu2ua.js.map +1 -0
- package/dist-lib/npm/nl-CkchSA8q.js +559 -0
- package/dist-lib/npm/nl-CkchSA8q.js.map +1 -0
- package/dist-lib/npm/pl-CCBDUr8k.js +565 -0
- package/dist-lib/npm/pl-CCBDUr8k.js.map +1 -0
- package/dist-lib/npm/pt-DucaCaoY.js +566 -0
- package/dist-lib/npm/pt-DucaCaoY.js.map +1 -0
- package/dist-lib/npm/types/components/DateTimeField.d.ts +2 -1
- package/dist-lib/npm/types/components/PageSection.d.ts +2 -1
- package/dist-lib/npm/types/config/routes.d.ts +1 -0
- package/dist-lib/npm/types/context/HostContext.d.ts +2 -0
- package/dist-lib/npm/types/features/calendar/components/DayColumn.d.ts +4 -1
- package/dist-lib/npm/types/features/calendar/components/EventChip.d.ts +3 -1
- package/dist-lib/npm/types/features/calendar/components/TimeGridView.d.ts +1 -1
- package/dist-lib/npm/types/features/calendar/context/DragContext.d.ts +2 -0
- package/dist-lib/npm/types/features/calendar/hooks/useEventDrag.d.ts +15 -0
- package/dist-lib/npm/types/features/calendar/types/view.d.ts +1 -0
- package/dist-lib/npm/types/features/calendar/utils/allDay.d.ts +12 -0
- package/dist-lib/npm/types/features/calendar/utils/eventDrag.d.ts +12 -0
- package/dist-lib/npm/types/features/calendar/utils/eventLabels.d.ts +1 -0
- package/dist-lib/npm/types/features/calendars/components/InvitationList.d.ts +1 -1
- package/dist-lib/npm/types/features/calendars/components/settings/RoleOverview.d.ts +1 -0
- package/dist-lib/npm/types/features/calendars/index.d.ts +1 -0
- package/dist-lib/npm/types/features/events/components/TimeZoneField.d.ts +6 -0
- package/dist-lib/npm/types/features/events/index.d.ts +2 -0
- package/dist-lib/npm/types/i18n/I18nContext.d.ts +1 -0
- package/dist-lib/npm/types/i18n/I18nProvider.d.ts +3 -1
- package/dist-lib/npm/types/i18n/index.d.ts +2 -2
- package/dist-lib/npm/types/i18n/locale.d.ts +13 -6
- package/dist-lib/npm/types/i18n/messages/en/calendars.d.ts +2 -0
- package/dist-lib/npm/types/i18n/messages/en/events.d.ts +4 -0
- package/dist-lib/npm/types/i18n/messages/en/index.d.ts +8 -6
- package/dist-lib/npm/types/i18n/messages/en/settings.d.ts +2 -6
- package/dist-lib/npm/types/i18n/messages/es/index.d.ts +2 -0
- package/dist-lib/npm/types/i18n/messages/fr/index.d.ts +2 -0
- package/dist-lib/npm/types/i18n/messages/index.d.ts +473 -4
- package/dist-lib/npm/types/i18n/messages/it/index.d.ts +2 -0
- package/dist-lib/npm/types/i18n/messages/nl/index.d.ts +2 -0
- package/dist-lib/npm/types/i18n/messages/pl/index.d.ts +2 -0
- package/dist-lib/npm/types/i18n/messages/pt/index.d.ts +2 -0
- package/dist-lib/npm/types/i18n/messages/types.d.ts +5 -0
- package/dist-lib/npm/types/lib/CalendarWidget.d.ts +1 -1
- package/dist-lib/npm/types/lib/config.d.ts +3 -0
- package/dist-lib/npm/types/lib/element.d.ts +4 -1
- package/dist-lib/npm/types/lib/index.d.ts +1 -0
- package/dist-lib/npm/types/utils/event.d.ts +19 -7
- package/dist-lib/npm/types/utils/preferences.d.ts +1 -2
- package/dist-lib/npm/types/utils/timeZone.d.ts +11 -0
- package/package.json +11 -5
package/dist-lib/npm/index.js
CHANGED
|
@@ -4,9 +4,144 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
|
4
4
|
import { createPortal } from "react-dom";
|
|
5
5
|
import { createRoot } from "react-dom/client";
|
|
6
6
|
|
|
7
|
+
// src/utils/date.ts
|
|
8
|
+
var DAYS_PER_WEEK = 7;
|
|
9
|
+
var MINUTES_PER_HOUR = 60;
|
|
10
|
+
var MINUTES_PER_DAY = 1440;
|
|
11
|
+
var MS_PER_DAY = 864e5;
|
|
12
|
+
var ISO_DATE_PATTERN = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/;
|
|
13
|
+
var TIME_PATTERN = /^([01]\d|2[0-3]):[0-5]\d$/;
|
|
14
|
+
var isISODate = (value) => typeof value === "string" && ISO_DATE_PATTERN.test(value);
|
|
15
|
+
var isTime = (value) => typeof value === "string" && TIME_PATTERN.test(value);
|
|
16
|
+
var pad = (value) => String(value).padStart(2, "0");
|
|
17
|
+
var parseISODate = (isoDate) => {
|
|
18
|
+
const [year, month, day] = isoDate.split("-").map(Number);
|
|
19
|
+
return {
|
|
20
|
+
year,
|
|
21
|
+
monthIndex: month - 1,
|
|
22
|
+
day
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
var toISODate = (date) => `${date.getFullYear()}-${pad(date.getMonth() + 1)}-${pad(date.getDate())}`;
|
|
26
|
+
var fromISODate = (isoDate) => {
|
|
27
|
+
const { year, monthIndex, day } = parseISODate(isoDate);
|
|
28
|
+
return new Date(year, monthIndex, day);
|
|
29
|
+
};
|
|
30
|
+
var minISODate = (a, b) => a < b ? a : b;
|
|
31
|
+
var maxISODate = (a, b) => a > b ? a : b;
|
|
32
|
+
var timeToMinutes = (time) => {
|
|
33
|
+
const [hours, minutes] = time.split(":").map(Number);
|
|
34
|
+
return hours * 60 + minutes;
|
|
35
|
+
};
|
|
36
|
+
var minutesToTime = (totalMinutes) => `${pad(Math.floor(totalMinutes / 60))}:${pad(totalMinutes % 60)}`;
|
|
37
|
+
var addDays = (date, amount) => new Date(date.getFullYear(), date.getMonth(), date.getDate() + amount);
|
|
38
|
+
var addDaysToISODate = (isoDate, amount) => toISODate(addDays(fromISODate(isoDate), amount));
|
|
39
|
+
var addMonthsToISODate = (isoDate, amount) => {
|
|
40
|
+
const { year, monthIndex, day } = parseISODate(isoDate);
|
|
41
|
+
const target = new Date(year, monthIndex + amount, 1);
|
|
42
|
+
return toISODate(new Date(target.getFullYear(), target.getMonth(), Math.min(day, daysInMonth(target.getFullYear(), target.getMonth()))));
|
|
43
|
+
};
|
|
44
|
+
var startOfMonthISO = (isoDate) => `${isoDate.slice(0, 7)}-01`;
|
|
45
|
+
var endOfMonthISO = (isoDate) => addDaysToISODate(addMonthsToISODate(startOfMonthISO(isoDate), 1), -1);
|
|
46
|
+
var startOfYearISO = (isoDate) => `${isoDate.slice(0, 4)}-01-01`;
|
|
47
|
+
var endOfYearISO = (isoDate) => `${isoDate.slice(0, 4)}-12-31`;
|
|
48
|
+
var isSameMonthISO = (a, b) => a.slice(0, 7) === b.slice(0, 7);
|
|
49
|
+
var listISODates = (from, to) => Array.from({ length: daysBetween(from, to) + 1 }, (_, index) => addDaysToISODate(from, index));
|
|
50
|
+
var toUTCTime = (isoDate) => {
|
|
51
|
+
const { year, monthIndex, day } = parseISODate(isoDate);
|
|
52
|
+
return Date.UTC(year, monthIndex, day);
|
|
53
|
+
};
|
|
54
|
+
var daysBetween = (fromIsoDate, toIsoDate) => Math.round((toUTCTime(toIsoDate) - toUTCTime(fromIsoDate)) / MS_PER_DAY);
|
|
55
|
+
var daysInMonth = (year, monthIndex) => new Date(year, monthIndex + 1, 0).getDate();
|
|
56
|
+
var getWeekdayIndex = (date) => (date.getDay() + 7 - 1) % 7;
|
|
57
|
+
var MONDAY = 1;
|
|
58
|
+
var startOfWeek = (date, firstDay = 1) => addDays(date, -((date.getDay() - firstDay + 7) % 7));
|
|
59
|
+
var startOfWeekISO = (isoDate, firstDay = 1) => toISODate(startOfWeek(fromISODate(isoDate), firstDay));
|
|
60
|
+
var endOfWeekISO = (isoDate, firstDay = 1) => addDaysToISODate(startOfWeekISO(isoDate, firstDay), 6);
|
|
61
|
+
var getMonthWeeks = (isoDate, firstDay = 1) => {
|
|
62
|
+
const dates = listISODates(startOfWeekISO(startOfMonthISO(isoDate), firstDay), endOfWeekISO(endOfMonthISO(isoDate), firstDay));
|
|
63
|
+
return Array.from({ length: dates.length / 7 }, (_, week) => dates.slice(week * 7, (week + 1) * 7));
|
|
64
|
+
};
|
|
65
|
+
var firstWeekStart = (year, { firstDay, minimalDays }) => startOfWeek(new Date(year, 0, minimalDays), firstDay);
|
|
66
|
+
var getWeekNumber = (date, rule) => {
|
|
67
|
+
const weekStart = startOfWeek(date, rule.firstDay);
|
|
68
|
+
const weekEndYear = addDays(weekStart, 6).getFullYear();
|
|
69
|
+
const candidate = firstWeekStart(weekEndYear, rule);
|
|
70
|
+
const firstWeek = weekStart < candidate ? firstWeekStart(weekEndYear - 1, rule) : candidate;
|
|
71
|
+
return Math.floor(daysBetween(toISODate(firstWeek), toISODate(weekStart)) / 7) + 1;
|
|
72
|
+
};
|
|
73
|
+
var getDayOfMonth = (isoDate) => Number(isoDate.slice(8, 10));
|
|
74
|
+
|
|
75
|
+
// src/utils/timeZone.ts
|
|
76
|
+
var MS_PER_MINUTE = 6e4;
|
|
77
|
+
var formatters = /* @__PURE__ */ new Map();
|
|
78
|
+
var getFormatter = (timeZone) => {
|
|
79
|
+
let formatter = formatters.get(timeZone);
|
|
80
|
+
if (!formatter) {
|
|
81
|
+
formatter = new Intl.DateTimeFormat("en-US", {
|
|
82
|
+
timeZone,
|
|
83
|
+
hourCycle: "h23",
|
|
84
|
+
year: "numeric",
|
|
85
|
+
month: "2-digit",
|
|
86
|
+
day: "2-digit",
|
|
87
|
+
hour: "2-digit",
|
|
88
|
+
minute: "2-digit"
|
|
89
|
+
});
|
|
90
|
+
formatters.set(timeZone, formatter);
|
|
91
|
+
}
|
|
92
|
+
return formatter;
|
|
93
|
+
};
|
|
94
|
+
var isTimeZone = (value) => {
|
|
95
|
+
if (typeof value !== "string" || value.length === 0 || value.length > 64) return false;
|
|
96
|
+
try {
|
|
97
|
+
getFormatter(value);
|
|
98
|
+
return true;
|
|
99
|
+
} catch {
|
|
100
|
+
return false;
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
var getBrowserTimeZone = () => Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
104
|
+
var listTimeZones = () => {
|
|
105
|
+
const supported = Intl.supportedValuesOf?.("timeZone");
|
|
106
|
+
return supported?.length ? supported : [getBrowserTimeZone(), "UTC"];
|
|
107
|
+
};
|
|
108
|
+
var toWallTime = (instant, timeZone) => {
|
|
109
|
+
const parts = Object.fromEntries(getFormatter(timeZone).formatToParts(new Date(instant)).map((part) => [part.type, part.value]));
|
|
110
|
+
return {
|
|
111
|
+
date: `${parts.year}-${parts.month}-${parts.day}`,
|
|
112
|
+
time: `${parts.hour}:${parts.minute}`
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
var wallTimeAsUtc = ({ date, time }) => {
|
|
116
|
+
const [year, month, day] = date.split("-").map(Number);
|
|
117
|
+
const [hour, minute] = time.split(":").map(Number);
|
|
118
|
+
return Date.UTC(year, month - 1, day, hour, minute);
|
|
119
|
+
};
|
|
120
|
+
var offsetAt = (instant, timeZone) => {
|
|
121
|
+
const minute = Math.floor(instant / MS_PER_MINUTE) * MS_PER_MINUTE;
|
|
122
|
+
return wallTimeAsUtc(toWallTime(minute, timeZone)) - minute;
|
|
123
|
+
};
|
|
124
|
+
var toInstant = (wallTime, timeZone) => {
|
|
125
|
+
const asUtc = wallTimeAsUtc(wallTime);
|
|
126
|
+
const first = asUtc - offsetAt(asUtc, timeZone);
|
|
127
|
+
const second = asUtc - offsetAt(first, timeZone);
|
|
128
|
+
return Math.max(first, second);
|
|
129
|
+
};
|
|
130
|
+
var fromInstant = (instant, timeZone) => toWallTime(instant, timeZone);
|
|
131
|
+
var convertWallTime = (wallTime, from, to) => from === to ? wallTime : fromInstant(toInstant(wallTime, from), to);
|
|
132
|
+
var formatTimeZoneOffset = (timeZone, at = Date.now()) => {
|
|
133
|
+
const minutes = Math.round(offsetAt(at, timeZone) / MS_PER_MINUTE);
|
|
134
|
+
const sign = minutes < 0 ? "−" : "+";
|
|
135
|
+
const absolute = Math.abs(minutes);
|
|
136
|
+
const hours = Math.floor(absolute / 60);
|
|
137
|
+
const rest = absolute % 60;
|
|
138
|
+
return `UTC${sign}${hours}${rest ? `:${String(rest).padStart(2, "0")}` : ""}`;
|
|
139
|
+
};
|
|
140
|
+
|
|
7
141
|
// src/context/HostContext.ts
|
|
8
142
|
var HostContext = createContext({ teams: true });
|
|
9
143
|
var useHost = () => use(HostContext);
|
|
144
|
+
var useViewerTimeZone = () => useHost().timeZone ?? getBrowserTimeZone();
|
|
10
145
|
|
|
11
146
|
// src/utils/appError.ts
|
|
12
147
|
var ERROR_CODES = [
|
|
@@ -134,74 +269,6 @@ function useRootElement() {
|
|
|
134
269
|
return root;
|
|
135
270
|
}
|
|
136
271
|
|
|
137
|
-
// src/utils/date.ts
|
|
138
|
-
var DAYS_PER_WEEK = 7;
|
|
139
|
-
var MINUTES_PER_HOUR = 60;
|
|
140
|
-
var MINUTES_PER_DAY = 1440;
|
|
141
|
-
var MS_PER_DAY = 864e5;
|
|
142
|
-
var ISO_DATE_PATTERN = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/;
|
|
143
|
-
var TIME_PATTERN = /^([01]\d|2[0-3]):[0-5]\d$/;
|
|
144
|
-
var isISODate = (value) => typeof value === "string" && ISO_DATE_PATTERN.test(value);
|
|
145
|
-
var isTime = (value) => typeof value === "string" && TIME_PATTERN.test(value);
|
|
146
|
-
var pad = (value) => String(value).padStart(2, "0");
|
|
147
|
-
var parseISODate = (isoDate) => {
|
|
148
|
-
const [year, month, day] = isoDate.split("-").map(Number);
|
|
149
|
-
return {
|
|
150
|
-
year,
|
|
151
|
-
monthIndex: month - 1,
|
|
152
|
-
day
|
|
153
|
-
};
|
|
154
|
-
};
|
|
155
|
-
var toISODate = (date) => `${date.getFullYear()}-${pad(date.getMonth() + 1)}-${pad(date.getDate())}`;
|
|
156
|
-
var fromISODate = (isoDate) => {
|
|
157
|
-
const { year, monthIndex, day } = parseISODate(isoDate);
|
|
158
|
-
return new Date(year, monthIndex, day);
|
|
159
|
-
};
|
|
160
|
-
var minISODate = (a, b) => a < b ? a : b;
|
|
161
|
-
var maxISODate = (a, b) => a > b ? a : b;
|
|
162
|
-
var timeToMinutes = (time) => {
|
|
163
|
-
const [hours, minutes] = time.split(":").map(Number);
|
|
164
|
-
return hours * 60 + minutes;
|
|
165
|
-
};
|
|
166
|
-
var minutesToTime = (totalMinutes) => `${pad(Math.floor(totalMinutes / 60))}:${pad(totalMinutes % 60)}`;
|
|
167
|
-
var addDays = (date, amount) => new Date(date.getFullYear(), date.getMonth(), date.getDate() + amount);
|
|
168
|
-
var addDaysToISODate = (isoDate, amount) => toISODate(addDays(fromISODate(isoDate), amount));
|
|
169
|
-
var addMonthsToISODate = (isoDate, amount) => {
|
|
170
|
-
const { year, monthIndex, day } = parseISODate(isoDate);
|
|
171
|
-
const target = new Date(year, monthIndex + amount, 1);
|
|
172
|
-
return toISODate(new Date(target.getFullYear(), target.getMonth(), Math.min(day, daysInMonth(target.getFullYear(), target.getMonth()))));
|
|
173
|
-
};
|
|
174
|
-
var startOfMonthISO = (isoDate) => `${isoDate.slice(0, 7)}-01`;
|
|
175
|
-
var endOfMonthISO = (isoDate) => addDaysToISODate(addMonthsToISODate(startOfMonthISO(isoDate), 1), -1);
|
|
176
|
-
var startOfYearISO = (isoDate) => `${isoDate.slice(0, 4)}-01-01`;
|
|
177
|
-
var endOfYearISO = (isoDate) => `${isoDate.slice(0, 4)}-12-31`;
|
|
178
|
-
var isSameMonthISO = (a, b) => a.slice(0, 7) === b.slice(0, 7);
|
|
179
|
-
var listISODates = (from, to) => Array.from({ length: daysBetween(from, to) + 1 }, (_, index) => addDaysToISODate(from, index));
|
|
180
|
-
var toUTCTime = (isoDate) => {
|
|
181
|
-
const { year, monthIndex, day } = parseISODate(isoDate);
|
|
182
|
-
return Date.UTC(year, monthIndex, day);
|
|
183
|
-
};
|
|
184
|
-
var daysBetween = (fromIsoDate, toIsoDate) => Math.round((toUTCTime(toIsoDate) - toUTCTime(fromIsoDate)) / MS_PER_DAY);
|
|
185
|
-
var daysInMonth = (year, monthIndex) => new Date(year, monthIndex + 1, 0).getDate();
|
|
186
|
-
var getWeekdayIndex = (date) => (date.getDay() + 7 - 1) % 7;
|
|
187
|
-
var MONDAY = 1;
|
|
188
|
-
var startOfWeek = (date, firstDay = 1) => addDays(date, -((date.getDay() - firstDay + 7) % 7));
|
|
189
|
-
var startOfWeekISO = (isoDate, firstDay = 1) => toISODate(startOfWeek(fromISODate(isoDate), firstDay));
|
|
190
|
-
var endOfWeekISO = (isoDate, firstDay = 1) => addDaysToISODate(startOfWeekISO(isoDate, firstDay), 6);
|
|
191
|
-
var getMonthWeeks = (isoDate, firstDay = 1) => {
|
|
192
|
-
const dates = listISODates(startOfWeekISO(startOfMonthISO(isoDate), firstDay), endOfWeekISO(endOfMonthISO(isoDate), firstDay));
|
|
193
|
-
return Array.from({ length: dates.length / 7 }, (_, week) => dates.slice(week * 7, (week + 1) * 7));
|
|
194
|
-
};
|
|
195
|
-
var firstWeekStart = (year, { firstDay, minimalDays }) => startOfWeek(new Date(year, 0, minimalDays), firstDay);
|
|
196
|
-
var getWeekNumber = (date, rule) => {
|
|
197
|
-
const weekStart = startOfWeek(date, rule.firstDay);
|
|
198
|
-
const weekEndYear = addDays(weekStart, 6).getFullYear();
|
|
199
|
-
const candidate = firstWeekStart(weekEndYear, rule);
|
|
200
|
-
const firstWeek = weekStart < candidate ? firstWeekStart(weekEndYear - 1, rule) : candidate;
|
|
201
|
-
return Math.floor(daysBetween(toISODate(firstWeek), toISODate(weekStart)) / 7) + 1;
|
|
202
|
-
};
|
|
203
|
-
var getDayOfMonth = (isoDate) => Number(isoDate.slice(8, 10));
|
|
204
|
-
|
|
205
272
|
// src/i18n/format.ts
|
|
206
273
|
var atMinutes = (minutes) => new Date(2e3, 0, 3, Math.floor(minutes / 60), minutes % 60);
|
|
207
274
|
var REFERENCE_MONDAY = new Date(2e3, 0, 3);
|
|
@@ -291,617 +358,85 @@ function createFormatter(locale, firstDay) {
|
|
|
291
358
|
var I18nContext = createContext(null);
|
|
292
359
|
|
|
293
360
|
// src/i18n/locale.ts
|
|
294
|
-
var
|
|
361
|
+
var BUILT_IN_LANGUAGES = [
|
|
362
|
+
"en",
|
|
363
|
+
"de",
|
|
364
|
+
"fr",
|
|
365
|
+
"es",
|
|
366
|
+
"it",
|
|
367
|
+
"nl",
|
|
368
|
+
"pl",
|
|
369
|
+
"pt"
|
|
370
|
+
];
|
|
371
|
+
var DEFAULT_LANGUAGE = "en";
|
|
295
372
|
var DEFAULT_LOCALE = "en-US";
|
|
296
|
-
var
|
|
297
|
-
|
|
373
|
+
var AUTO_LOCALE = "auto";
|
|
374
|
+
var BUILT_IN_LOCALES = [
|
|
298
375
|
"en-US",
|
|
299
376
|
"en-GB",
|
|
300
|
-
"de-DE"
|
|
377
|
+
"de-DE",
|
|
378
|
+
"fr-FR",
|
|
379
|
+
"es-ES",
|
|
380
|
+
"it-IT",
|
|
381
|
+
"nl-NL",
|
|
382
|
+
"pl-PL",
|
|
383
|
+
"pt-BR",
|
|
384
|
+
"pt-PT"
|
|
301
385
|
];
|
|
302
|
-
var
|
|
303
|
-
var
|
|
304
|
-
if (
|
|
386
|
+
var isBuiltInLanguage = (language) => BUILT_IN_LANGUAGES.includes(language);
|
|
387
|
+
var canonicalizeLocale = (tag) => {
|
|
388
|
+
if (typeof tag !== "string" || tag === "") return null;
|
|
305
389
|
try {
|
|
306
390
|
return Intl.getCanonicalLocales(tag)[0] ?? null;
|
|
307
391
|
} catch {
|
|
308
392
|
return null;
|
|
309
393
|
}
|
|
310
394
|
};
|
|
311
|
-
var
|
|
312
|
-
const canonical =
|
|
395
|
+
var toAvailableLocale = (tag, languages) => {
|
|
396
|
+
const canonical = canonicalizeLocale(tag);
|
|
313
397
|
if (!canonical) return null;
|
|
314
398
|
const { language, region } = new Intl.Locale(canonical);
|
|
315
|
-
if (
|
|
316
|
-
const fallback = region ?
|
|
399
|
+
if (languages.has(language)) return canonical;
|
|
400
|
+
const fallback = region ? `${"en"}-${region}` : null;
|
|
317
401
|
return fallback && Intl.DateTimeFormat.supportedLocalesOf(fallback).length > 0 ? fallback : null;
|
|
318
402
|
};
|
|
319
|
-
var
|
|
403
|
+
var BUILT_IN_SET = new Set(BUILT_IN_LANGUAGES);
|
|
404
|
+
var getLanguage = (locale, languages = BUILT_IN_SET) => {
|
|
320
405
|
const { language } = new Intl.Locale(locale);
|
|
321
|
-
return
|
|
406
|
+
return languages.has(language) ? language : "en";
|
|
322
407
|
};
|
|
323
|
-
function resolveLocale({ user, host, browser = [] }) {
|
|
408
|
+
function resolveLocale({ user, host, browser = [], languages = BUILT_IN_SET }) {
|
|
324
409
|
const candidates = [
|
|
325
410
|
user === "auto" ? null : user,
|
|
326
411
|
host,
|
|
327
412
|
...browser
|
|
328
413
|
];
|
|
329
414
|
for (const candidate of candidates) {
|
|
330
|
-
const locale =
|
|
415
|
+
const locale = toAvailableLocale(candidate, languages);
|
|
331
416
|
if (locale) return locale;
|
|
332
417
|
}
|
|
333
418
|
return DEFAULT_LOCALE;
|
|
334
419
|
}
|
|
335
|
-
var
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
startDate: "Startdatum",
|
|
343
|
-
startTime: "Beginn",
|
|
344
|
-
endDate: "Enddatum",
|
|
345
|
-
endTime: "Ende",
|
|
346
|
-
description: "Beschreibung",
|
|
347
|
-
color: "Farbe",
|
|
348
|
-
addCustomColor: "Eigene Farbe hinzufügen",
|
|
349
|
-
customColors: "Eigene Farben",
|
|
350
|
-
customColorsDescription: (max) => `Bis zu ${max} Farben, die du beim Bearbeiten eines Termins hinzufügst. Termine behalten ihre Farbe, auch wenn du sie hier entfernst.`,
|
|
351
|
-
noCustomColors: "Noch keine eigenen Farben.",
|
|
352
|
-
removeColor: (label) => `Farbe ${label} entfernen`,
|
|
353
|
-
deleteTitle: "Termin löschen?",
|
|
354
|
-
deleteSeriesMessage: (title) => `„${title}“ ist ein wiederkehrender Termin. Was soll gelöscht werden? Das kann nicht rückgängig gemacht werden.`,
|
|
355
|
-
deleteMessage: (title) => `Soll „${title}“ wirklich gelöscht werden? Das kann nicht rückgängig gemacht werden.`,
|
|
356
|
-
yes: "Ja",
|
|
357
|
-
no: "Nein",
|
|
358
|
-
scopeTitle: "Wiederkehrenden Termin ändern",
|
|
359
|
-
scopeMessage: "Für welche Termine der Serie sollen die Änderungen gelten?",
|
|
360
|
-
scopes: {
|
|
361
|
-
single: "Nur dieser Termin",
|
|
362
|
-
following: "Dieser und alle folgenden",
|
|
363
|
-
all: "Alle Termine"
|
|
364
|
-
},
|
|
365
|
-
repeat: "Wiederholen",
|
|
366
|
-
never: "Nie",
|
|
367
|
-
every: "Alle",
|
|
368
|
-
onTheseDays: "An diesen Tagen",
|
|
369
|
-
inMonth: "Im Monat",
|
|
370
|
-
ends: "Endet",
|
|
371
|
-
endsOnDate: "Am Datum",
|
|
372
|
-
endsAfterCount: "Nach Anzahl",
|
|
373
|
-
lastOccurrence: "Letzter Termin",
|
|
374
|
-
after: "Nach",
|
|
375
|
-
occurrences: {
|
|
376
|
-
one: "Termin",
|
|
377
|
-
many: "Terminen"
|
|
378
|
-
}
|
|
420
|
+
var getLocaleChoices = (extraLanguages = []) => {
|
|
421
|
+
const extra = [...extraLanguages].filter((language) => !isBuiltInLanguage(language));
|
|
422
|
+
return [
|
|
423
|
+
AUTO_LOCALE,
|
|
424
|
+
...BUILT_IN_LOCALES,
|
|
425
|
+
...extra
|
|
426
|
+
];
|
|
379
427
|
};
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
nameRequired: "Bitte einen Namen eingeben.",
|
|
390
|
-
nameTooLong: (max) => `Der Name darf höchstens ${max} Zeichen lang sein.`,
|
|
391
|
-
passwordRequired: "Bitte das Passwort eingeben.",
|
|
392
|
-
passwordTooShort: (min) => `Das Passwort muss mindestens ${min} Zeichen lang sein.`,
|
|
393
|
-
passwordTooLong: (max) => `Das Passwort darf höchstens ${max} Zeichen lang sein.`,
|
|
394
|
-
passwordMismatch: "Die Passwörter stimmen nicht überein.",
|
|
395
|
-
passwordUnchanged: "Das neue Passwort muss sich vom aktuellen unterscheiden."
|
|
396
|
-
},
|
|
397
|
-
login: {
|
|
398
|
-
title: "Anmelden",
|
|
399
|
-
submit: "Anmelden",
|
|
400
|
-
pending: "Wird angemeldet …",
|
|
401
|
-
noAccount: "Noch kein Konto?",
|
|
402
|
-
registerLink: "Jetzt registrieren",
|
|
403
|
-
forgotPassword: "Passwort vergessen?"
|
|
404
|
-
},
|
|
405
|
-
register: {
|
|
406
|
-
title: "Registrieren",
|
|
407
|
-
submit: "Konto erstellen",
|
|
408
|
-
pending: "Konto wird erstellt …",
|
|
409
|
-
hasAccount: "Schon ein Konto?",
|
|
410
|
-
loginLink: "Anmelden"
|
|
411
|
-
},
|
|
412
|
-
forgot: {
|
|
413
|
-
title: "Passwort vergessen",
|
|
414
|
-
remembered: "Wieder eingefallen?",
|
|
415
|
-
loginLink: "Anmelden",
|
|
416
|
-
hint: "Gib die E-Mail-Adresse deines Kontos ein. Wir schicken dir einen Link für ein neues Passwort.",
|
|
417
|
-
success: (email) => `Falls es ein Konto für ${email} gibt, haben wir dir einen Link zum Zurücksetzen geschickt. Er ist eine Stunde gültig.`,
|
|
418
|
-
submit: "Link senden",
|
|
419
|
-
pending: "Wird gesendet …"
|
|
420
|
-
},
|
|
421
|
-
reset: {
|
|
422
|
-
title: "Neues Passwort",
|
|
423
|
-
newPassword: "Neues Passwort",
|
|
424
|
-
incompleteLink: "Dieser Link ist unvollständig. Bitte fordere einen neuen an.",
|
|
425
|
-
requestNewLink: "Neuen Link anfordern",
|
|
426
|
-
success: "Dein Passwort wurde geändert.",
|
|
427
|
-
submit: "Passwort speichern",
|
|
428
|
-
pending: "Wird gespeichert …"
|
|
429
|
-
},
|
|
430
|
-
verify: {
|
|
431
|
-
title: "E-Mail bestätigen",
|
|
432
|
-
verifying: "E-Mail-Adresse wird bestätigt …",
|
|
433
|
-
incompleteLink: "Dieser Link ist unvollständig.",
|
|
434
|
-
success: "Deine E-Mail-Adresse ist bestätigt.",
|
|
435
|
-
newLinkBefore: "Einen neuen Link kannst du in den ",
|
|
436
|
-
newLinkSettings: "Einstellungen",
|
|
437
|
-
newLinkAfter: " anfordern.",
|
|
438
|
-
bannerLabel: "E-Mail-Bestätigung",
|
|
439
|
-
bannerBefore: "Bitte bestätige deine E-Mail-Adresse ",
|
|
440
|
-
bannerAfter: " über den Link in unserer E-Mail.",
|
|
441
|
-
resend: "Erneut senden",
|
|
442
|
-
resent: "E-Mail wurde erneut gesendet.",
|
|
443
|
-
sending: "Wird gesendet …"
|
|
444
|
-
},
|
|
445
|
-
continueToCalendar: "Zum Kalender",
|
|
446
|
-
signInNow: "Jetzt anmelden",
|
|
447
|
-
menu: {
|
|
448
|
-
signIn: "Anmelden",
|
|
449
|
-
accountOf: (name) => `Konto von ${name}`,
|
|
450
|
-
signOut: "Abmelden",
|
|
451
|
-
signingOut: "Wird abgemeldet …"
|
|
452
|
-
},
|
|
453
|
-
account: {
|
|
454
|
-
profile: "Profil",
|
|
455
|
-
savePending: "Wird gespeichert …",
|
|
456
|
-
emailTitle: "E-Mail-Adresse",
|
|
457
|
-
verified: "Bestätigt",
|
|
458
|
-
unverified: "Nicht bestätigt",
|
|
459
|
-
verificationSent: "Wir haben dir einen Bestätigungslink geschickt. Nichts angekommen?",
|
|
460
|
-
resendVerification: "Bestätigungslink erneut senden",
|
|
461
|
-
passwordTitle: "Passwort ändern",
|
|
462
|
-
passwordDescription: "Andere Geräte werden danach abgemeldet.",
|
|
463
|
-
currentPassword: "Aktuelles Passwort",
|
|
464
|
-
newPassword: "Neues Passwort",
|
|
465
|
-
passwordChanged: "Dein Passwort wurde geändert.",
|
|
466
|
-
passwordPending: "Wird geändert …",
|
|
467
|
-
passwordSubmit: "Passwort ändern",
|
|
468
|
-
deleteTitle: "Konto löschen",
|
|
469
|
-
deleteDescription: "Löscht dein Konto mit allen persönlichen Terminen.",
|
|
470
|
-
deleteOpen: "Konto löschen …",
|
|
471
|
-
deleteWarningBefore: "Dein Konto, dein persönlicher Kalender und alle Termine darin werden ",
|
|
472
|
-
deleteWarningStrong: "endgültig gelöscht",
|
|
473
|
-
deleteWarningAfter: ". Das lässt sich nicht rückgängig machen.",
|
|
474
|
-
deletePassword: "Passwort zur Bestätigung",
|
|
475
|
-
deletePending: "Wird gelöscht …",
|
|
476
|
-
deleteSubmit: "Endgültig löschen"
|
|
477
|
-
}
|
|
478
|
-
};
|
|
479
|
-
|
|
480
|
-
// src/i18n/messages/de/calendars.ts
|
|
481
|
-
var calendars$1 = {
|
|
482
|
-
personalName: "Persönlich",
|
|
483
|
-
roles: {
|
|
484
|
-
owner: "Owner",
|
|
485
|
-
admin: "Administrator",
|
|
486
|
-
manager: "Verwalter",
|
|
487
|
-
editor: "Redakteur",
|
|
488
|
-
member: "Mitglied",
|
|
489
|
-
contributor: "Beitragender",
|
|
490
|
-
viewer: "Betrachter"
|
|
491
|
-
},
|
|
492
|
-
roleDescriptions: {
|
|
493
|
-
owner: "Leitet den Kalender und hat immer alle Rechte.",
|
|
494
|
-
admin: "Verwaltet Kalender, Mitglieder und alle Termine. Kann den Kalender nicht löschen.",
|
|
495
|
-
manager: "Verwaltet den Kalender und alle Termine und lädt neue Mitglieder ein.",
|
|
496
|
-
editor: "Legt Termine an und bearbeitet und löscht alle Termine.",
|
|
497
|
-
member: "Legt Termine an und bearbeitet und löscht die eigenen.",
|
|
498
|
-
contributor: "Legt Termine an und bearbeitet die eigenen, löscht aber nichts.",
|
|
499
|
-
viewer: "Sieht den Kalender, ändert aber nichts."
|
|
500
|
-
},
|
|
501
|
-
roleHint: (role, description) => `${role}: ${description}`,
|
|
502
|
-
kind: {
|
|
503
|
-
personal: "Persönlicher Kalender",
|
|
504
|
-
team: "Team-Kalender",
|
|
505
|
-
teamWithName: (team) => `Team-Kalender · ${team}`
|
|
506
|
-
},
|
|
507
|
-
indicator: {
|
|
508
|
-
onlyYou: "Nur für dich",
|
|
509
|
-
team: (role) => `Team · ${role}`,
|
|
510
|
-
current: (name) => `Aktueller Kalender: ${name}`
|
|
511
|
-
},
|
|
512
|
-
switcher: {
|
|
513
|
-
open: "Kalender wechseln",
|
|
514
|
-
title: "Kalender wechseln",
|
|
515
|
-
personal: "Persönlich",
|
|
516
|
-
teams: "Teams",
|
|
517
|
-
active: "Aktiv",
|
|
518
|
-
openInvitations: (count) => count === 1 ? "Du hast eine offene Einladung." : `Du hast ${count} offene Einladungen.`,
|
|
519
|
-
view: "Ansehen",
|
|
520
|
-
noTeams: "Du bist noch in keinem Team. Erstelle einen Kalender oder tritt über eine Einladung bei.",
|
|
521
|
-
newCalendar: "Neuer Kalender"
|
|
522
|
-
},
|
|
523
|
-
invitations: {
|
|
524
|
-
title: "Einladungen",
|
|
525
|
-
description: "Du wurdest in diese Kalender eingeladen. Nach dem Annehmen erscheinen sie unten und in „Kalender wechseln“.",
|
|
526
|
-
invitedBy: (name) => `${name} lädt dich ein`,
|
|
527
|
-
invited: "Du bist eingeladen",
|
|
528
|
-
validUntil: (date) => `gültig bis ${date}`,
|
|
529
|
-
decline: "Ablehnen",
|
|
530
|
-
declining: "Wird abgelehnt …",
|
|
531
|
-
accept: "Annehmen",
|
|
532
|
-
accepting: "Wird angenommen …"
|
|
533
|
-
},
|
|
534
|
-
list: {
|
|
535
|
-
title: "Kalender",
|
|
536
|
-
description: "Alle Kalender, auf die du Zugriff hast, mit deiner Rolle. Bei Team-Kalendern legst du fest, ob ihre Termine auch in deinem persönlichen Kalender erscheinen. Verlassen kannst du sie, außer du bist Owner. Dann musst du die Leitung vorher übergeben.",
|
|
537
|
-
settingsFor: (name) => `Einstellungen für ${name}`,
|
|
538
|
-
personalHint: "Dein eigener Kalender. Er lässt sich nicht verlassen oder entfernen.",
|
|
539
|
-
showInPersonal: "Termine auch im persönlichen Kalender anzeigen",
|
|
540
|
-
leave: "Kalender verlassen",
|
|
541
|
-
ownerCannotLeave: "Als Owner kannst du den Kalender erst verlassen, wenn du die Leitung übergeben hast.",
|
|
542
|
-
noTeamCalendars: "Noch keine Team-Kalender. Erstelle einen oder tritt über eine Einladung bei.",
|
|
543
|
-
create: "Kalender erstellen"
|
|
544
|
-
},
|
|
545
|
-
leave: {
|
|
546
|
-
title: "Kalender verlassen?",
|
|
547
|
-
confirm: "Verlassen",
|
|
548
|
-
pending: "Wird verlassen …",
|
|
549
|
-
message: (team) => `Du verlässt das Team „${team}“ und siehst seinen Kalender nicht mehr. Zurück geht es nur über eine neue Einladung.`
|
|
550
|
-
},
|
|
551
|
-
create: {
|
|
552
|
-
title: "Neuer Kalender",
|
|
553
|
-
steps: [
|
|
554
|
-
{
|
|
555
|
-
label: "Name",
|
|
556
|
-
title: "Wie heißt der Kalender?",
|
|
557
|
-
hint: "Name und Beschreibung sehen alle Mitglieder."
|
|
558
|
-
},
|
|
559
|
-
{
|
|
560
|
-
label: "Farbe",
|
|
561
|
-
title: "Welche Farbe bekommt er?",
|
|
562
|
-
hint: "Neue Termine in diesem Kalender starten mit dieser Farbe."
|
|
563
|
-
},
|
|
564
|
-
{
|
|
565
|
-
label: "Mitglieder",
|
|
566
|
-
title: "Wen möchtest du einladen?",
|
|
567
|
-
hint: "Eingeladene bekommen eine E-Mail und sehen den Kalender, sobald sie annehmen."
|
|
568
|
-
},
|
|
569
|
-
{
|
|
570
|
-
label: "Überprüfen",
|
|
571
|
-
title: "Alles richtig?",
|
|
572
|
-
hint: "Du bist Owner und kannst alles später noch ändern."
|
|
573
|
-
}
|
|
574
|
-
],
|
|
575
|
-
stepCount: (step, total) => `Schritt ${step} von ${total}`,
|
|
576
|
-
next: "Weiter",
|
|
577
|
-
pending: "Wird erstellt …",
|
|
578
|
-
submit: "Kalender erstellen"
|
|
579
|
-
},
|
|
580
|
-
details: {
|
|
581
|
-
name: "Name",
|
|
582
|
-
namePlaceholder: "z. B. Familie, Fußballverein, Projekt",
|
|
583
|
-
description: "Beschreibung",
|
|
584
|
-
descriptionOptional: "Beschreibung (optional)",
|
|
585
|
-
descriptionPlaceholder: "Wofür ist dieser Kalender?",
|
|
586
|
-
yourRole: "Deine Rolle",
|
|
587
|
-
invitations: "Einladungen",
|
|
588
|
-
none: "Keine"
|
|
589
|
-
},
|
|
590
|
-
invite: {
|
|
591
|
-
email: "E-Mail-Adresse",
|
|
592
|
-
role: "Rolle",
|
|
593
|
-
add: "Hinzufügen",
|
|
594
|
-
nobodyYet: "Noch niemand eingeladen. Das geht auch später noch.",
|
|
595
|
-
remove: (email) => `${email} entfernen`
|
|
596
|
-
},
|
|
597
|
-
validation: {
|
|
598
|
-
nameRequired: "Bitte einen Namen eingeben.",
|
|
599
|
-
nameTooLong: (max) => `Der Name darf höchstens ${max} Zeichen lang sein.`,
|
|
600
|
-
tooManyInvitations: (max) => `Höchstens ${max} Einladungen auf einmal.`,
|
|
601
|
-
selfInvite: "Du bist automatisch Owner und musst dich nicht einladen.",
|
|
602
|
-
alreadyInvited: "Diese Adresse ist schon eingeladen.",
|
|
603
|
-
alreadyMember: "Diese Person ist schon Mitglied."
|
|
604
|
-
},
|
|
605
|
-
settings: {
|
|
606
|
-
title: "Kalender-Einstellungen",
|
|
607
|
-
pageTitle: (name) => `${name} · Einstellungen`,
|
|
608
|
-
notFound: "Diesen Kalender gibt es nicht, oder du hast keinen Zugriff mehr.",
|
|
609
|
-
tabsLabel: "Bereiche der Kalender-Einstellungen",
|
|
610
|
-
withCount: (label, count) => count > 0 ? `${label} (${count})` : label,
|
|
611
|
-
tabs: {
|
|
612
|
-
general: "Allgemein",
|
|
613
|
-
members: "Mitglieder",
|
|
614
|
-
invitations: "Einladungen",
|
|
615
|
-
danger: "Gefahrenbereich"
|
|
616
|
-
},
|
|
617
|
-
displayTitle: "Anzeige",
|
|
618
|
-
displayDescription: "Gilt nur für dich. Andere Mitglieder stellen das selbst ein.",
|
|
619
|
-
personalTitle: "Persönlicher Kalender",
|
|
620
|
-
personalHint: "Nur du siehst diesen Kalender. Er lässt sich nicht teilen, verlassen oder löschen. Termine aus Team-Kalendern blendest du in deren Einstellungen ein oder aus."
|
|
621
|
-
},
|
|
622
|
-
general: {
|
|
623
|
-
title: "Allgemein",
|
|
624
|
-
teamDescription: "Name und Farbe ändern Owner, Administratoren und Verwalter. Die Beschreibung ändern Owner und Administratoren.",
|
|
625
|
-
personalDescription: "Name und Farbe deines persönlichen Kalenders. Nur du siehst ihn.",
|
|
626
|
-
pending: "Wird gespeichert …"
|
|
627
|
-
},
|
|
628
|
-
members: {
|
|
629
|
-
title: "Mitglieder",
|
|
630
|
-
description: "Alle, die diesen Kalender sehen. Rollen ändern und Mitglieder entfernen dürfen Owner und Administratoren, und zwar nur bei Rollen unterhalb der eigenen.",
|
|
631
|
-
you: " (du)",
|
|
632
|
-
roleOf: (name) => `Rolle von ${name}`,
|
|
633
|
-
remove: "Entfernen",
|
|
634
|
-
removeTitle: "Mitglied entfernen?",
|
|
635
|
-
removing: "Wird entfernt …",
|
|
636
|
-
removeMessage: (name, calendar) => `${name} sieht „${calendar}“ danach nicht mehr. Zurück geht es nur über eine neue Einladung.`
|
|
637
|
-
},
|
|
638
|
-
teamInvitations: {
|
|
639
|
-
title: "Einladungen",
|
|
640
|
-
description: "Neue Mitglieder per E-Mail einladen. Du kannst nur Rollen unterhalb deiner eigenen vergeben. Eine Einladung ist 7 Tage gültig.",
|
|
641
|
-
revoke: "Zurückziehen",
|
|
642
|
-
revoking: "Wird zurückgezogen …",
|
|
643
|
-
submit: "Einladen",
|
|
644
|
-
sending: "Wird gesendet …",
|
|
645
|
-
sent: (email) => `Einladung an ${email} verschickt.`,
|
|
646
|
-
none: "Keine offenen Einladungen."
|
|
647
|
-
},
|
|
648
|
-
danger: {
|
|
649
|
-
title: "Gefahrenbereich",
|
|
650
|
-
transferHint: "Ein anderes Mitglied wird Owner, du wirst Administrator. Zurück geht es nur, wenn der neue Owner dir die Rolle wieder gibt.",
|
|
651
|
-
transferUnavailable: "Zum Übertragen braucht das Team ein weiteres Mitglied, das noch nicht Owner ist.",
|
|
652
|
-
transfer: "Leitung übertragen",
|
|
653
|
-
lastOwnerHint: "Als einziger Owner kannst du nicht austreten. Übertrage vorher die Leitung oder lösche das Team.",
|
|
654
|
-
leaveHint: "Du siehst den Kalender danach nicht mehr. Zurück geht es nur über eine neue Einladung.",
|
|
655
|
-
deleteHint: (team) => `Löscht das Team „${team}“ mit allen Kalendern, Terminen und Einladungen für alle Mitglieder.`,
|
|
656
|
-
deleteTeam: "Team löschen",
|
|
657
|
-
transferConfirmTitle: "Leitung wirklich übertragen?",
|
|
658
|
-
transferConfirm: "Endgültig übertragen",
|
|
659
|
-
transferring: "Wird übertragen …",
|
|
660
|
-
transferMessage: (name, email, team, role) => `${name} (${email}) wird Owner von „${team}“ und bekommt alle Rechte, auch zum Löschen des Teams. Du wirst ${role} und kannst das Team danach nicht mehr löschen oder die Leitung selbst zurückholen.`,
|
|
661
|
-
deleteTitle: "Team löschen?",
|
|
662
|
-
deleteConfirm: "Endgültig löschen",
|
|
663
|
-
deleting: "Wird gelöscht …",
|
|
664
|
-
deleteMessage: (team, count) => `„${team}“ wird mit allen Kalendern, Terminen und Einladungen gelöscht, auch für alle ${count} Mitglieder. Das kann nicht rückgängig gemacht werden.`
|
|
665
|
-
},
|
|
666
|
-
transfer: {
|
|
667
|
-
title: "Leitung übertragen",
|
|
668
|
-
search: "Mitglied suchen",
|
|
669
|
-
searchPlaceholder: "Name oder E-Mail",
|
|
670
|
-
noResults: "Kein Mitglied gefunden.",
|
|
671
|
-
newOwner: "Neuer Owner",
|
|
672
|
-
confirm: "Bestätigen"
|
|
428
|
+
var getLocaleName = (locale) => {
|
|
429
|
+
try {
|
|
430
|
+
const name = new Intl.DisplayNames([locale], {
|
|
431
|
+
type: "language",
|
|
432
|
+
languageDisplay: "standard"
|
|
433
|
+
}).of(locale) ?? locale;
|
|
434
|
+
return name.charAt(0).toLocaleUpperCase(locale) + name.slice(1);
|
|
435
|
+
} catch {
|
|
436
|
+
return locale;
|
|
673
437
|
}
|
|
674
438
|
};
|
|
675
|
-
|
|
676
|
-
// src/i18n/messages/de/settings.ts
|
|
677
|
-
var settings$1 = {
|
|
678
|
-
tabsLabel: "Bereiche der Einstellungen",
|
|
679
|
-
tabs: {
|
|
680
|
-
calendars: "Kalender",
|
|
681
|
-
appearance: "Darstellung",
|
|
682
|
-
account: "Konto"
|
|
683
|
-
},
|
|
684
|
-
languageTitle: "Sprache und Region",
|
|
685
|
-
languageDescription: "Bestimmt Sprache, Datums- und Zeitformate und den ersten Tag der Woche.",
|
|
686
|
-
languageLabel: "Sprache",
|
|
687
|
-
languages: {
|
|
688
|
-
auto: "Automatisch (Browser)",
|
|
689
|
-
"en-US": "English (US)",
|
|
690
|
-
"en-GB": "English (UK)",
|
|
691
|
-
"de-DE": "Deutsch"
|
|
692
|
-
},
|
|
693
|
-
themeTitle: "Farbschema",
|
|
694
|
-
themeLabel: "Hell oder dunkel",
|
|
695
|
-
startViewTitle: "Startansicht",
|
|
696
|
-
startViewDescription: "Mit dieser Ansicht öffnet sich der Kalender.",
|
|
697
|
-
desktop: "Computer und Tablet",
|
|
698
|
-
mobile: "Handy"
|
|
699
|
-
};
|
|
700
|
-
|
|
701
|
-
// src/i18n/messages/de/storage.ts
|
|
702
|
-
var storage$1 = {
|
|
703
|
-
importTitle: "Lokale Termine übernehmen?",
|
|
704
|
-
importMessage: (count) => `In diesem Browser ${count === 1 ? "ist ein Termin" : `sind ${count} Termine`} ohne Konto gespeichert. Sollen sie in dein Konto übernommen werden? Danach sind sie auf allen Geräten verfügbar und werden hier lokal entfernt.`,
|
|
705
|
-
importing: "Wird übernommen …",
|
|
706
|
-
importConfirm: "In mein Konto übernehmen",
|
|
707
|
-
keepLocal: "Nur in diesem Browser behalten"
|
|
708
|
-
};
|
|
709
|
-
|
|
710
|
-
// src/i18n/messages/de/calendar.ts
|
|
711
|
-
var views$1 = {
|
|
712
|
-
label: "Ansicht",
|
|
713
|
-
day: {
|
|
714
|
-
label: "Tag",
|
|
715
|
-
previous: "Vorheriger Tag",
|
|
716
|
-
next: "Nächster Tag"
|
|
717
|
-
},
|
|
718
|
-
week: {
|
|
719
|
-
label: "Woche",
|
|
720
|
-
previous: "Vorherige Woche",
|
|
721
|
-
next: "Nächste Woche"
|
|
722
|
-
},
|
|
723
|
-
month: {
|
|
724
|
-
label: "Monat",
|
|
725
|
-
previous: "Vorheriger Monat",
|
|
726
|
-
next: "Nächster Monat"
|
|
727
|
-
},
|
|
728
|
-
year: {
|
|
729
|
-
label: "Jahr",
|
|
730
|
-
previous: "Vorheriges Jahr",
|
|
731
|
-
next: "Nächstes Jahr"
|
|
732
|
-
},
|
|
733
|
-
weekNumber: (week) => `KW ${week}`,
|
|
734
|
-
weekNumberLong: (week) => `Kalenderwoche ${week}`
|
|
735
|
-
};
|
|
736
|
-
var calendar$1 = {
|
|
737
|
-
today: "Heute",
|
|
738
|
-
newEvent: "Neuer Termin",
|
|
739
|
-
now: (time) => `Jetzt: ${time}`,
|
|
740
|
-
openDay: (date) => `${date} öffnen`,
|
|
741
|
-
moreEvents: (count) => `+${count} weitere`,
|
|
742
|
-
fromCalendar: (name) => `Aus dem Kalender „${name}“`,
|
|
743
|
-
sharedEventNotice: (source) => `${source}. Änderungen sehen alle Mitglieder.`
|
|
744
|
-
};
|
|
745
|
-
|
|
746
|
-
// src/i18n/messages/de/core.ts
|
|
747
|
-
var common$1 = {
|
|
748
|
-
loading: "Lädt …",
|
|
749
|
-
close: "Schließen",
|
|
750
|
-
cancel: "Abbrechen",
|
|
751
|
-
save: "Speichern",
|
|
752
|
-
saving: "Wird gespeichert …",
|
|
753
|
-
saved: "Gespeichert.",
|
|
754
|
-
delete: "Löschen",
|
|
755
|
-
deleting: "Wird gelöscht …",
|
|
756
|
-
backToCalendar: "Zum Kalender",
|
|
757
|
-
backToSettings: "Zu den Einstellungen",
|
|
758
|
-
settings: "Einstellungen",
|
|
759
|
-
progress: "Fortschritt",
|
|
760
|
-
next: "Weiter",
|
|
761
|
-
back: "Zurück"
|
|
762
|
-
};
|
|
763
|
-
var errors$1 = {
|
|
764
|
-
unknown: "Ein unbekannter Fehler ist aufgetreten.",
|
|
765
|
-
eventNotFound: "Der Termin wurde nicht gefunden.",
|
|
766
|
-
accountRequired: "Team-Kalender gibt es nur mit Konto.",
|
|
767
|
-
saveEventsFailed: "Die Termine konnten nicht lokal gespeichert werden.",
|
|
768
|
-
savePreferencesFailed: "Die Einstellungen konnten nicht lokal gespeichert werden.",
|
|
769
|
-
saveColorFailed: "Die Farbe konnte nicht lokal gespeichert werden.",
|
|
770
|
-
saveDecisionFailed: "Die Entscheidung konnte nicht gespeichert werden.",
|
|
771
|
-
invalidLink: "Der Link ist ungültig oder abgelaufen.",
|
|
772
|
-
invalidResetLink: "Der Link ist ungültig oder abgelaufen. Bitte fordere einen neuen an.",
|
|
773
|
-
invalidCredentials: "E-Mail-Adresse oder Passwort ist falsch.",
|
|
774
|
-
emailTaken: "Für diese E-Mail-Adresse gibt es bereits ein Konto.",
|
|
775
|
-
wrongCurrentPassword: "Das aktuelle Passwort ist falsch.",
|
|
776
|
-
wrongPassword: "Das Passwort ist falsch.",
|
|
777
|
-
soleOwner: "Du bist einziger Owner eines Teams mit weiteren Mitgliedern. Bitte übergib zuerst die Leitung.",
|
|
778
|
-
unauthorized: "Bitte melde dich an.",
|
|
779
|
-
forbidden: "Dazu fehlt dir die Berechtigung.",
|
|
780
|
-
notFound: "Der Eintrag wurde nicht gefunden.",
|
|
781
|
-
payloadTooLarge: "Die Daten sind zu groß.",
|
|
782
|
-
calendarNotFound: "Der Kalender wurde nicht gefunden.",
|
|
783
|
-
teamNotFound: "Das Team wurde nicht gefunden.",
|
|
784
|
-
memberNotFound: "Das Mitglied wurde nicht gefunden.",
|
|
785
|
-
invitationNotFound: "Die Einladung wurde nicht gefunden.",
|
|
786
|
-
invitationExpired: "Die Einladung ist nicht mehr gültig.",
|
|
787
|
-
tooManyLoginAttempts: "Zu viele Fehlversuche. Bitte warte ein paar Minuten.",
|
|
788
|
-
seriesHasDetached: "Die Serie hat einzeln geänderte Termine. Bitte diese zuerst löschen.",
|
|
789
|
-
selfInvite: "Du kannst dich nicht selbst einladen.",
|
|
790
|
-
alreadyMember: "Diese Person ist schon Mitglied.",
|
|
791
|
-
alreadyInvited: "Diese Adresse ist schon eingeladen.",
|
|
792
|
-
personalTeam: "Im persönlichen Kalender ist das nicht möglich.",
|
|
793
|
-
lastOwner: "Ein Team braucht mindestens einen Owner. Übertrage vorher die Leitung oder lösche das Team.",
|
|
794
|
-
alreadyOwner: "Dieses Mitglied ist bereits Owner.",
|
|
795
|
-
lastCalendar: "Das ist der letzte Kalender des Teams. Lösche stattdessen das Team.",
|
|
796
|
-
tooManyColors: "Du kannst höchstens 12 eigene Farben speichern.",
|
|
797
|
-
managedByHost: "Dein Konto wird von der Website verwaltet, auf der du den Kalender nutzt.",
|
|
798
|
-
unknownTenant: "Dieser Kalender ist nicht richtig eingerichtet (unbekannter Tenant).",
|
|
799
|
-
originNotAllowed: "Dieser Kalender darf auf dieser Website nicht verwendet werden.",
|
|
800
|
-
invalidUserToken: "Deine Anmeldung konnte nicht bestätigt werden. Bitte lade die Seite neu.",
|
|
801
|
-
status: {
|
|
802
|
-
400: "Die Anfrage war ungültig.",
|
|
803
|
-
401: "Bitte melde dich an.",
|
|
804
|
-
403: "Dafür fehlt dir die Berechtigung.",
|
|
805
|
-
404: "Der Eintrag wurde nicht gefunden.",
|
|
806
|
-
409: "Der Eintrag wurde inzwischen geändert. Bitte neu laden.",
|
|
807
|
-
413: "Die Daten sind zu groß.",
|
|
808
|
-
422: "Die Eingaben sind ungültig.",
|
|
809
|
-
429: "Zu viele Anfragen. Bitte kurz warten."
|
|
810
|
-
},
|
|
811
|
-
serverError: "Auf dem Server ist ein Fehler aufgetreten.",
|
|
812
|
-
requestFailed: (status) => `Die Anfrage ist fehlgeschlagen (${status}).`,
|
|
813
|
-
kind: {
|
|
814
|
-
timeout: "Der Server hat nicht rechtzeitig geantwortet.",
|
|
815
|
-
network: "Der Server ist nicht erreichbar.",
|
|
816
|
-
aborted: "Die Anfrage wurde abgebrochen.",
|
|
817
|
-
parse: "Die Antwort des Servers konnte nicht gelesen werden."
|
|
818
|
-
}
|
|
819
|
-
};
|
|
820
|
-
var validation$1 = {
|
|
821
|
-
emailRequired: "Bitte eine E-Mail-Adresse eingeben.",
|
|
822
|
-
emailInvalid: "Bitte eine gültige E-Mail-Adresse eingeben.",
|
|
823
|
-
integerRange: (min, max) => `Bitte eine ganze Zahl von ${min} bis ${max} eingeben.`,
|
|
824
|
-
titleRequired: "Bitte einen Titel eingeben.",
|
|
825
|
-
titleTooLong: (max) => `Der Titel darf höchstens ${max} Zeichen lang sein.`,
|
|
826
|
-
descriptionTooLong: (max) => `Die Beschreibung darf höchstens ${max} Zeichen lang sein.`,
|
|
827
|
-
startDateInvalid: "Bitte ein gültiges Startdatum wählen.",
|
|
828
|
-
startTimeInvalid: "Bitte eine gültige Startzeit wählen.",
|
|
829
|
-
endDateInvalid: "Bitte ein gültiges Enddatum wählen.",
|
|
830
|
-
endTimeInvalid: "Bitte eine gültige Endzeit wählen.",
|
|
831
|
-
endDateBeforeStart: "Das Enddatum darf nicht vor dem Startdatum liegen.",
|
|
832
|
-
endBeforeStart: "Das Ende muss nach dem Beginn liegen.",
|
|
833
|
-
weekdaysRequired: "Bitte mindestens einen Wochentag wählen.",
|
|
834
|
-
dateInvalid: "Bitte ein gültiges Datum wählen.",
|
|
835
|
-
untilBeforeStart: "Das Ende der Wiederholung darf nicht vor dem Startdatum liegen."
|
|
836
|
-
};
|
|
837
|
-
var colors$1 = {
|
|
838
|
-
blue: "Blau",
|
|
839
|
-
red: "Rot",
|
|
840
|
-
green: "Grün",
|
|
841
|
-
yellow: "Gelb"
|
|
842
|
-
};
|
|
843
|
-
var themes$1 = {
|
|
844
|
-
system: "Automatisch",
|
|
845
|
-
light: "Hell",
|
|
846
|
-
dark: "Dunkel"
|
|
847
|
-
};
|
|
848
|
-
var recurrence$1 = {
|
|
849
|
-
frequency: {
|
|
850
|
-
daily: "Täglich",
|
|
851
|
-
weekly: "Wöchentlich",
|
|
852
|
-
monthly: "Monatlich",
|
|
853
|
-
yearly: "Jährlich"
|
|
854
|
-
},
|
|
855
|
-
units: {
|
|
856
|
-
daily: {
|
|
857
|
-
one: "Tag",
|
|
858
|
-
many: "Tage"
|
|
859
|
-
},
|
|
860
|
-
weekly: {
|
|
861
|
-
one: "Woche",
|
|
862
|
-
many: "Wochen"
|
|
863
|
-
},
|
|
864
|
-
monthly: {
|
|
865
|
-
one: "Monat",
|
|
866
|
-
many: "Monate"
|
|
867
|
-
},
|
|
868
|
-
yearly: {
|
|
869
|
-
one: "Jahr",
|
|
870
|
-
many: "Jahre"
|
|
871
|
-
}
|
|
872
|
-
},
|
|
873
|
-
every: (interval, unit) => `Alle ${interval} ${unit}`,
|
|
874
|
-
onWeekdays: (weekdays) => ` am ${weekdays}`,
|
|
875
|
-
onDate: (date) => ` am ${date}`,
|
|
876
|
-
monthlyOnDay: (day) => `am ${day}.`,
|
|
877
|
-
monthlyOnWeekday: (ordinal, weekday) => `am ${[
|
|
878
|
-
"ersten",
|
|
879
|
-
"zweiten",
|
|
880
|
-
"dritten",
|
|
881
|
-
"vierten",
|
|
882
|
-
"fünften"
|
|
883
|
-
][ordinal - 1]} ${weekday}`,
|
|
884
|
-
monthlyOnLastWeekday: (weekday) => `am letzten ${weekday}`,
|
|
885
|
-
until: (date) => ` bis ${date}`,
|
|
886
|
-
times: (count) => count === 1 ? ", einmal" : `, ${count}-mal`
|
|
887
|
-
};
|
|
888
|
-
|
|
889
|
-
// src/i18n/messages/de/index.ts
|
|
890
|
-
var de = {
|
|
891
|
-
common: common$1,
|
|
892
|
-
errors: errors$1,
|
|
893
|
-
validation: validation$1,
|
|
894
|
-
colors: colors$1,
|
|
895
|
-
themes: themes$1,
|
|
896
|
-
recurrence: recurrence$1,
|
|
897
|
-
views: views$1,
|
|
898
|
-
calendar: calendar$1,
|
|
899
|
-
events: events$1,
|
|
900
|
-
storage: storage$1,
|
|
901
|
-
settings: settings$1,
|
|
902
|
-
auth: auth$1,
|
|
903
|
-
calendars: calendars$1
|
|
904
|
-
};
|
|
439
|
+
var getBrowserLanguages = () => typeof navigator === "undefined" ? [] : navigator.languages;
|
|
905
440
|
|
|
906
441
|
// src/i18n/messages/en/events.ts
|
|
907
442
|
var events = {
|
|
@@ -912,6 +447,10 @@ var events = {
|
|
|
912
447
|
startTime: "Start",
|
|
913
448
|
endDate: "End date",
|
|
914
449
|
endTime: "End",
|
|
450
|
+
allDay: "All day",
|
|
451
|
+
timeZone: "Time zone",
|
|
452
|
+
floatingTimeZone: "Same local time everywhere",
|
|
453
|
+
inYourTimeZone: (period) => `In your time zone: ${period}`,
|
|
915
454
|
description: "Description",
|
|
916
455
|
color: "Color",
|
|
917
456
|
addCustomColor: "Add custom color",
|
|
@@ -1067,6 +606,7 @@ var calendars = {
|
|
|
1067
606
|
contributor: "Creates events and edits their own, but deletes nothing.",
|
|
1068
607
|
viewer: "Sees the calendar but changes nothing."
|
|
1069
608
|
},
|
|
609
|
+
roleOverview: "What each role can do",
|
|
1070
610
|
roleHint: (role, description) => `${role}: ${description}`,
|
|
1071
611
|
kind: {
|
|
1072
612
|
personal: "Personal calendar",
|
|
@@ -1091,7 +631,8 @@ var calendars = {
|
|
|
1091
631
|
},
|
|
1092
632
|
invitations: {
|
|
1093
633
|
title: "Invitations",
|
|
1094
|
-
description: "You have been invited to these calendars. Once accepted, they appear
|
|
634
|
+
description: "You have been invited to these calendars. Once accepted, they appear under Calendars and in “Switch calendar”.",
|
|
635
|
+
empty: "No open invitations. When someone invites you to a calendar, it shows up here.",
|
|
1095
636
|
invitedBy: (name) => `${name} invited you`,
|
|
1096
637
|
invited: "You are invited",
|
|
1097
638
|
validUntil: (date) => `valid until ${date}`,
|
|
@@ -1247,18 +788,14 @@ var settings = {
|
|
|
1247
788
|
tabsLabel: "Settings sections",
|
|
1248
789
|
tabs: {
|
|
1249
790
|
calendars: "Calendars",
|
|
791
|
+
invitations: "Invitations",
|
|
1250
792
|
appearance: "Appearance",
|
|
1251
793
|
account: "Account"
|
|
1252
794
|
},
|
|
1253
795
|
languageTitle: "Language and region",
|
|
1254
796
|
languageDescription: "Controls the language, date and time formats and the first day of the week.",
|
|
1255
797
|
languageLabel: "Language",
|
|
1256
|
-
|
|
1257
|
-
auto: "Automatic (browser)",
|
|
1258
|
-
"en-US": "English (US)",
|
|
1259
|
-
"en-GB": "English (UK)",
|
|
1260
|
-
"de-DE": "Deutsch"
|
|
1261
|
-
},
|
|
798
|
+
languageAuto: "Automatic (browser)",
|
|
1262
799
|
themeTitle: "Color scheme",
|
|
1263
800
|
themeLabel: "Light or dark",
|
|
1264
801
|
startViewTitle: "Start view",
|
|
@@ -1473,10 +1010,34 @@ var en = {
|
|
|
1473
1010
|
};
|
|
1474
1011
|
|
|
1475
1012
|
// src/i18n/messages/index.ts
|
|
1476
|
-
var
|
|
1477
|
-
|
|
1478
|
-
|
|
1013
|
+
var LOADERS = {
|
|
1014
|
+
de: () => import("./de-CCzGjeTd.js").then((module) => module.de),
|
|
1015
|
+
fr: () => import("./fr-CAqNm10Z.js").then((module) => module.fr),
|
|
1016
|
+
es: () => import("./es-Ciaf66rH.js").then((module) => module.es),
|
|
1017
|
+
it: () => import("./it-Cqqdu2ua.js").then((module) => module.it),
|
|
1018
|
+
nl: () => import("./nl-CkchSA8q.js").then((module) => module.nl),
|
|
1019
|
+
pl: () => import("./pl-CCBDUr8k.js").then((module) => module.pl),
|
|
1020
|
+
pt: () => import("./pt-DucaCaoY.js").then((module) => module.pt)
|
|
1021
|
+
};
|
|
1022
|
+
var loaded = /* @__PURE__ */ new Map([["en", en]]);
|
|
1023
|
+
var getLoadedMessages = (language) => loaded.get(language) ?? null;
|
|
1024
|
+
async function loadMessages(language) {
|
|
1025
|
+
const cached = loaded.get(language);
|
|
1026
|
+
if (cached) return cached;
|
|
1027
|
+
if (!isBuiltInLanguage(language) || language === "en") return en;
|
|
1028
|
+
const messages = await LOADERS[language]();
|
|
1029
|
+
loaded.set(language, messages);
|
|
1030
|
+
return messages;
|
|
1031
|
+
}
|
|
1032
|
+
var isPlainObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
1033
|
+
var mergeDeep = (base, override) => {
|
|
1034
|
+
if (override === void 0) return base;
|
|
1035
|
+
if (!isPlainObject(base) || !isPlainObject(override)) return override;
|
|
1036
|
+
const result = { ...base };
|
|
1037
|
+
for (const [key, value] of Object.entries(override)) result[key] = mergeDeep(base[key], value);
|
|
1038
|
+
return result;
|
|
1479
1039
|
};
|
|
1040
|
+
var mergeMessages = (base, override) => override ? mergeDeep(base, override) : base;
|
|
1480
1041
|
|
|
1481
1042
|
// src/i18n/weekInfo.ts
|
|
1482
1043
|
var SUNDAY_FIRST_REGIONS = /* @__PURE__ */ new Set([
|
|
@@ -1516,27 +1077,62 @@ function getWeekInfo(tag) {
|
|
|
1516
1077
|
}
|
|
1517
1078
|
|
|
1518
1079
|
// src/i18n/I18nProvider.tsx
|
|
1519
|
-
|
|
1080
|
+
var NO_OVERRIDES = {};
|
|
1081
|
+
function I18nProvider({ locale: hostLocale, messages: overrides = NO_OVERRIDES, children }) {
|
|
1520
1082
|
const root = useRootElement();
|
|
1521
1083
|
const [userLocale, setUserLocale] = useState(null);
|
|
1084
|
+
const languages = useMemo(() => /* @__PURE__ */ new Set([...BUILT_IN_LANGUAGES, ...Object.keys(overrides)]), [overrides]);
|
|
1522
1085
|
const locale = useMemo(() => resolveLocale({
|
|
1523
1086
|
user: userLocale,
|
|
1524
1087
|
host: hostLocale,
|
|
1525
|
-
browser: getBrowserLanguages()
|
|
1526
|
-
|
|
1088
|
+
browser: getBrowserLanguages(),
|
|
1089
|
+
languages
|
|
1090
|
+
}), [
|
|
1091
|
+
userLocale,
|
|
1092
|
+
hostLocale,
|
|
1093
|
+
languages
|
|
1094
|
+
]);
|
|
1095
|
+
const language = getLanguage(locale, languages);
|
|
1096
|
+
const [loaded, setLoaded] = useState(() => {
|
|
1097
|
+
const messages = getLoadedMessages(language);
|
|
1098
|
+
return messages ? {
|
|
1099
|
+
language,
|
|
1100
|
+
messages
|
|
1101
|
+
} : null;
|
|
1102
|
+
});
|
|
1527
1103
|
useEffect(() => root.setAttribute("lang", locale), [root, locale]);
|
|
1104
|
+
useEffect(() => {
|
|
1105
|
+
if (loaded?.language === language) return;
|
|
1106
|
+
let isCurrent = true;
|
|
1107
|
+
loadMessages(language).then((messages) => {
|
|
1108
|
+
if (isCurrent) setLoaded({
|
|
1109
|
+
language,
|
|
1110
|
+
messages
|
|
1111
|
+
});
|
|
1112
|
+
});
|
|
1113
|
+
return () => {
|
|
1114
|
+
isCurrent = false;
|
|
1115
|
+
};
|
|
1116
|
+
}, [language, loaded]);
|
|
1528
1117
|
const value = useMemo(() => {
|
|
1529
|
-
|
|
1118
|
+
if (!loaded) return null;
|
|
1530
1119
|
const weekInfo = getWeekInfo(locale);
|
|
1531
1120
|
return {
|
|
1532
1121
|
locale,
|
|
1533
|
-
language,
|
|
1534
|
-
|
|
1122
|
+
language: loaded.language,
|
|
1123
|
+
languages,
|
|
1124
|
+
m: mergeMessages(loaded.messages, overrides[loaded.language]),
|
|
1535
1125
|
format: createFormatter(locale, weekInfo.firstDay),
|
|
1536
1126
|
weekInfo,
|
|
1537
1127
|
setUserLocale
|
|
1538
1128
|
};
|
|
1539
|
-
}, [
|
|
1129
|
+
}, [
|
|
1130
|
+
locale,
|
|
1131
|
+
loaded,
|
|
1132
|
+
languages,
|
|
1133
|
+
overrides
|
|
1134
|
+
]);
|
|
1135
|
+
if (!value) return null;
|
|
1540
1136
|
return /* @__PURE__ */ jsx(I18nContext, {
|
|
1541
1137
|
value,
|
|
1542
1138
|
children
|
|
@@ -7196,6 +6792,7 @@ var ROUTES = {
|
|
|
7196
6792
|
};
|
|
7197
6793
|
var calendarSettingsPath = (calendarId) => ROUTES.calendarSettings.replace(":calendarId", encodeURIComponent(calendarId));
|
|
7198
6794
|
var SETTINGS_CALENDARS_PATH = `${ROUTES.settings}?tab=calendars`;
|
|
6795
|
+
var SETTINGS_INVITATIONS_PATH = `${ROUTES.settings}?tab=invitations`;
|
|
7199
6796
|
var TOKEN_PARAM = "token";
|
|
7200
6797
|
var REDIRECT_PARAM = "redirect";
|
|
7201
6798
|
var isSafeRedirect = (path) => path !== null && path.startsWith("/") && !path.startsWith("//") && !path.startsWith("/\\");
|
|
@@ -7377,18 +6974,22 @@ var SettingsIcon = (props) => /* @__PURE__ */ jsx(IconBase, {
|
|
|
7377
6974
|
});
|
|
7378
6975
|
|
|
7379
6976
|
// src/components/PageSection.tsx
|
|
7380
|
-
function PageSection({ title, description, tone = "default", children }) {
|
|
6977
|
+
function PageSection({ title, description, aside, tone = "default", children }) {
|
|
7381
6978
|
return /* @__PURE__ */ jsxs("section", {
|
|
7382
6979
|
className: classNames("pageSection", tone === "danger" && "pageSection--danger"),
|
|
7383
6980
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
7384
6981
|
className: "pageSectionIntro",
|
|
7385
|
-
children: [
|
|
7386
|
-
|
|
7387
|
-
|
|
7388
|
-
|
|
7389
|
-
|
|
7390
|
-
|
|
7391
|
-
|
|
6982
|
+
children: [
|
|
6983
|
+
/* @__PURE__ */ jsx("h2", {
|
|
6984
|
+
className: "pageSectionTitle",
|
|
6985
|
+
children: title
|
|
6986
|
+
}),
|
|
6987
|
+
description && /* @__PURE__ */ jsx("p", {
|
|
6988
|
+
className: "formHint",
|
|
6989
|
+
children: description
|
|
6990
|
+
}),
|
|
6991
|
+
aside
|
|
6992
|
+
]
|
|
7392
6993
|
}), /* @__PURE__ */ jsx("div", {
|
|
7393
6994
|
className: "pageSectionBody",
|
|
7394
6995
|
children
|
|
@@ -7634,6 +7235,8 @@ var EVENT_INPUT_KEYS = [
|
|
|
7634
7235
|
"start",
|
|
7635
7236
|
"endDate",
|
|
7636
7237
|
"end",
|
|
7238
|
+
"allDay",
|
|
7239
|
+
"timeZone",
|
|
7637
7240
|
"description",
|
|
7638
7241
|
"color",
|
|
7639
7242
|
"recurrence",
|
|
@@ -7664,15 +7267,20 @@ var parseCalendarEvent = (value) => {
|
|
|
7664
7267
|
const excludedDates = Array.isArray(rest.excludedDates) ? rest.excludedDates.filter(isISODate) : [];
|
|
7665
7268
|
const seriesId = typeof rest.seriesId === "string" ? rest.seriesId : null;
|
|
7666
7269
|
const originalDate = seriesId !== null && isISODate(rest.originalDate) ? rest.originalDate : null;
|
|
7667
|
-
|
|
7270
|
+
const allDay = rest.allDay === true;
|
|
7271
|
+
const start = allDay && rest.start === void 0 ? ALL_DAY_TIME : rest.start;
|
|
7272
|
+
const end = allDay && rest.end === void 0 ? ALL_DAY_TIME : rest.end;
|
|
7273
|
+
if (typeof rest.id !== "string" || typeof rest.calendarId !== "string" || typeof rest.title !== "string" || !isISODate(startDate) || !isTime(start) || !isISODate(endDate) || !isTime(end) || typeof rest.description !== "string" || !isEventColor(rest.color) || rest.recurrence != null && recurrence === null) return null;
|
|
7668
7274
|
return {
|
|
7669
7275
|
id: rest.id,
|
|
7670
7276
|
calendarId: rest.calendarId,
|
|
7671
7277
|
title: rest.title,
|
|
7672
7278
|
startDate,
|
|
7673
|
-
start:
|
|
7279
|
+
start: allDay ? ALL_DAY_TIME : start,
|
|
7674
7280
|
endDate,
|
|
7675
|
-
end:
|
|
7281
|
+
end: allDay ? ALL_DAY_TIME : end,
|
|
7282
|
+
allDay,
|
|
7283
|
+
timeZone: !allDay && isTimeZone(rest.timeZone) ? rest.timeZone : null,
|
|
7676
7284
|
description: rest.description,
|
|
7677
7285
|
color: rest.color,
|
|
7678
7286
|
recurrence,
|
|
@@ -7683,7 +7291,8 @@ var parseCalendarEvent = (value) => {
|
|
|
7683
7291
|
updatedAt: typeof rest.updatedAt === "string" ? rest.updatedAt : ""
|
|
7684
7292
|
};
|
|
7685
7293
|
};
|
|
7686
|
-
var
|
|
7294
|
+
var ALL_DAY_TIME = "00:00";
|
|
7295
|
+
var createEventInputForSlots = (first, last, timeZone) => {
|
|
7687
7296
|
const end = (last.hour + 1) * 60;
|
|
7688
7297
|
const endsNextDay = end >= MINUTES_PER_DAY;
|
|
7689
7298
|
return {
|
|
@@ -7692,6 +7301,8 @@ var createEventInputForSlots = (first, last) => {
|
|
|
7692
7301
|
start: minutesToTime(first.hour * 60),
|
|
7693
7302
|
endDate: endsNextDay ? addDaysToISODate(last.date, 1) : last.date,
|
|
7694
7303
|
end: minutesToTime(end % MINUTES_PER_DAY),
|
|
7304
|
+
allDay: false,
|
|
7305
|
+
timeZone,
|
|
7695
7306
|
description: "",
|
|
7696
7307
|
color: "blue",
|
|
7697
7308
|
recurrence: null,
|
|
@@ -7699,21 +7310,43 @@ var createEventInputForSlots = (first, last) => {
|
|
|
7699
7310
|
...NO_SERIES_LINK
|
|
7700
7311
|
};
|
|
7701
7312
|
};
|
|
7702
|
-
var createEventInput = (date, hour) => createEventInputForSlots({
|
|
7313
|
+
var createEventInput = (date, hour, timeZone) => createEventInputForSlots({
|
|
7703
7314
|
date,
|
|
7704
7315
|
hour
|
|
7705
7316
|
}, {
|
|
7706
7317
|
date,
|
|
7707
7318
|
hour
|
|
7319
|
+
}, timeZone);
|
|
7320
|
+
var createAllDayEventInput = (startDate, endDate = startDate) => ({
|
|
7321
|
+
...createEventInputForSlots({
|
|
7322
|
+
date: startDate,
|
|
7323
|
+
hour: 0
|
|
7324
|
+
}, {
|
|
7325
|
+
date: startDate,
|
|
7326
|
+
hour: 0
|
|
7327
|
+
}, null),
|
|
7328
|
+
start: ALL_DAY_TIME,
|
|
7329
|
+
endDate,
|
|
7330
|
+
end: ALL_DAY_TIME,
|
|
7331
|
+
allDay: true
|
|
7708
7332
|
});
|
|
7709
7333
|
var toEventInput = (event) => pick(event, EVENT_INPUT_KEYS);
|
|
7710
7334
|
var normalizeEventInput = (input) => ({
|
|
7711
7335
|
...input,
|
|
7712
7336
|
title: input.title.trim(),
|
|
7713
7337
|
description: input.description.trim(),
|
|
7338
|
+
...input.allDay ? {
|
|
7339
|
+
start: ALL_DAY_TIME,
|
|
7340
|
+
end: ALL_DAY_TIME,
|
|
7341
|
+
timeZone: null
|
|
7342
|
+
} : {},
|
|
7714
7343
|
...input.recurrence ? NO_SERIES_LINK : { excludedDates: [] }
|
|
7715
7344
|
});
|
|
7716
|
-
var
|
|
7345
|
+
var toOccurrenceInput = (occurrence) => ({
|
|
7346
|
+
...toEventInput(occurrence),
|
|
7347
|
+
...occurrence.source
|
|
7348
|
+
});
|
|
7349
|
+
var getEventDuration = (period) => period.allDay ? (getSpanDays(period) + 1) * MINUTES_PER_DAY : getSpanDays(period) * MINUTES_PER_DAY + timeToMinutes(period.end) - timeToMinutes(period.start);
|
|
7717
7350
|
var isMultiDayEvent = ({ startDate, endDate }) => startDate !== endDate;
|
|
7718
7351
|
var getSpanDays = ({ startDate, endDate }) => daysBetween(startDate, endDate);
|
|
7719
7352
|
var moveToStartDate = (period, startDate) => ({
|
|
@@ -7732,13 +7365,48 @@ var toSeriesRule = (occurrence) => ({
|
|
|
7732
7365
|
recurrence: occurrence.recurrence,
|
|
7733
7366
|
excludedDates: occurrence.excludedDates
|
|
7734
7367
|
});
|
|
7735
|
-
var
|
|
7736
|
-
|
|
7737
|
-
|
|
7738
|
-
|
|
7739
|
-
|
|
7740
|
-
})
|
|
7741
|
-
|
|
7368
|
+
var toViewerPeriod = (period, timeZone, viewerTimeZone) => {
|
|
7369
|
+
if (!timeZone || !viewerTimeZone || timeZone === viewerTimeZone) return period;
|
|
7370
|
+
const start = convertWallTime({
|
|
7371
|
+
date: period.startDate,
|
|
7372
|
+
time: period.start
|
|
7373
|
+
}, timeZone, viewerTimeZone);
|
|
7374
|
+
const end = convertWallTime({
|
|
7375
|
+
date: period.endDate,
|
|
7376
|
+
time: period.end
|
|
7377
|
+
}, timeZone, viewerTimeZone);
|
|
7378
|
+
return {
|
|
7379
|
+
startDate: start.date,
|
|
7380
|
+
start: start.time,
|
|
7381
|
+
endDate: end.date,
|
|
7382
|
+
end: end.time
|
|
7383
|
+
};
|
|
7384
|
+
};
|
|
7385
|
+
var overlapsRange = ({ startDate, endDate }, from, to) => startDate <= to && endDate >= from;
|
|
7386
|
+
var expandEvents = (events, from, to, viewerTimeZone = null) => events.flatMap((event) => {
|
|
7387
|
+
const shifts = event.timeZone !== null && viewerTimeZone !== null && event.timeZone !== viewerTimeZone;
|
|
7388
|
+
const searchFrom = shifts ? addDaysToISODate(from, -1) : from;
|
|
7389
|
+
const searchTo = shifts ? addDaysToISODate(to, 1) : to;
|
|
7390
|
+
return getOccurrenceStartDates(event, searchFrom, searchTo).flatMap((startDate) => {
|
|
7391
|
+
const source = {
|
|
7392
|
+
start: event.start,
|
|
7393
|
+
end: event.end,
|
|
7394
|
+
...moveToStartDate(event, startDate)
|
|
7395
|
+
};
|
|
7396
|
+
const period = toViewerPeriod(source, event.timeZone, viewerTimeZone);
|
|
7397
|
+
if (!overlapsRange(period, from, to)) return [];
|
|
7398
|
+
return [{
|
|
7399
|
+
...event,
|
|
7400
|
+
...period,
|
|
7401
|
+
occurrenceKey: `${event.id}:${startDate}`,
|
|
7402
|
+
occurrenceDate: startDate,
|
|
7403
|
+
seriesStartDate: event.startDate,
|
|
7404
|
+
source
|
|
7405
|
+
}];
|
|
7406
|
+
});
|
|
7407
|
+
});
|
|
7408
|
+
var formatEventPeriod = (event, { m, format }) => {
|
|
7409
|
+
if (event.allDay) return isMultiDayEvent(event) ? `${format.shortDay(event.startDate)} – ${format.shortDay(event.endDate)}` : m.events.allDay;
|
|
7742
7410
|
const start = format.time(timeToMinutes(event.start));
|
|
7743
7411
|
const end = format.time(timeToMinutes(event.end));
|
|
7744
7412
|
return isMultiDayEvent(event) ? `${format.shortDay(event.startDate)} ${start} – ${format.shortDay(event.endDate)} ${end}` : `${start} – ${end}`;
|
|
@@ -7749,9 +7417,9 @@ var validateEventInput = (input, m) => {
|
|
|
7749
7417
|
if (!input.title) errors.title = validation.titleRequired;
|
|
7750
7418
|
else if (input.title.length > 100) errors.title = validation.titleTooLong(100);
|
|
7751
7419
|
if (!isISODate(input.startDate)) errors.startDate = validation.startDateInvalid;
|
|
7752
|
-
if (!isTime(input.start)) errors.start = validation.startTimeInvalid;
|
|
7420
|
+
if (!input.allDay && !isTime(input.start)) errors.start = validation.startTimeInvalid;
|
|
7753
7421
|
if (!isISODate(input.endDate)) errors.endDate = validation.endDateInvalid;
|
|
7754
|
-
if (!isTime(input.end)) errors.end = validation.endTimeInvalid;
|
|
7422
|
+
if (!input.allDay && !isTime(input.end)) errors.end = validation.endTimeInvalid;
|
|
7755
7423
|
if (!errors.startDate && !errors.endDate && input.endDate < input.startDate) errors.endDate = validation.endDateBeforeStart;
|
|
7756
7424
|
else if (!errors.startDate && !errors.start && !errors.endDate && !errors.end && getEventDuration(input) <= 0) errors.end = validation.endBeforeStart;
|
|
7757
7425
|
if (input.recurrence) {
|
|
@@ -7763,79 +7431,6 @@ var validateEventInput = (input, m) => {
|
|
|
7763
7431
|
};
|
|
7764
7432
|
var hasValidationErrors = ({ recurrence, ...fields }) => hasFieldErrors(fields) || recurrence !== void 0 && hasRecurrenceErrors(recurrence);
|
|
7765
7433
|
|
|
7766
|
-
// src/features/calendars/components/InvitationList.tsx
|
|
7767
|
-
function InvitationRow$1({ invitation }) {
|
|
7768
|
-
const { m, format } = useI18n();
|
|
7769
|
-
const { invitations: text, roles } = m.calendars;
|
|
7770
|
-
const { acceptInvitation, declineInvitation } = useCalendars();
|
|
7771
|
-
const accept = useAsyncAction(() => acceptInvitation(invitation.id));
|
|
7772
|
-
const decline = useAsyncAction(() => declineInvitation(invitation.id));
|
|
7773
|
-
const isBusy = accept.isPending || decline.isPending;
|
|
7774
|
-
return /* @__PURE__ */ jsxs("li", {
|
|
7775
|
-
className: "calendarSettingCard",
|
|
7776
|
-
children: [/* @__PURE__ */ jsxs("div", {
|
|
7777
|
-
className: "calendarSettingHeader",
|
|
7778
|
-
children: [/* @__PURE__ */ jsxs("span", {
|
|
7779
|
-
className: "itemRowMain",
|
|
7780
|
-
children: [
|
|
7781
|
-
/* @__PURE__ */ jsx("span", {
|
|
7782
|
-
className: "itemRowTitle",
|
|
7783
|
-
children: invitation.teamName
|
|
7784
|
-
}),
|
|
7785
|
-
/* @__PURE__ */ jsxs("span", {
|
|
7786
|
-
className: "itemRowMeta",
|
|
7787
|
-
children: [
|
|
7788
|
-
invitation.invitedBy ? text.invitedBy(invitation.invitedBy) : text.invited,
|
|
7789
|
-
" ·",
|
|
7790
|
-
" ",
|
|
7791
|
-
text.validUntil(format.longDate(toISODate(new Date(invitation.expiresAt))))
|
|
7792
|
-
]
|
|
7793
|
-
}),
|
|
7794
|
-
invitation.description && /* @__PURE__ */ jsx("span", {
|
|
7795
|
-
className: "itemRowMeta",
|
|
7796
|
-
children: invitation.description
|
|
7797
|
-
})
|
|
7798
|
-
]
|
|
7799
|
-
}), /* @__PURE__ */ jsx("span", {
|
|
7800
|
-
className: "badge",
|
|
7801
|
-
children: roles[invitation.role]
|
|
7802
|
-
})]
|
|
7803
|
-
}), /* @__PURE__ */ jsxs("div", {
|
|
7804
|
-
className: "calendarSettingBody",
|
|
7805
|
-
children: [/* @__PURE__ */ jsx(ActionFeedback, { error: accept.error ?? decline.error }), /* @__PURE__ */ jsxs("div", {
|
|
7806
|
-
className: "formActions",
|
|
7807
|
-
children: [/* @__PURE__ */ jsx(Button, {
|
|
7808
|
-
variant: "outline",
|
|
7809
|
-
disabled: isBusy,
|
|
7810
|
-
isPending: decline.isPending,
|
|
7811
|
-
pendingLabel: text.declining,
|
|
7812
|
-
onClick: () => void decline.run(),
|
|
7813
|
-
children: text.decline
|
|
7814
|
-
}), /* @__PURE__ */ jsx(Button, {
|
|
7815
|
-
disabled: isBusy,
|
|
7816
|
-
isPending: accept.isPending,
|
|
7817
|
-
pendingLabel: text.accepting,
|
|
7818
|
-
onClick: () => void accept.run(),
|
|
7819
|
-
children: text.accept
|
|
7820
|
-
})]
|
|
7821
|
-
})]
|
|
7822
|
-
})]
|
|
7823
|
-
});
|
|
7824
|
-
}
|
|
7825
|
-
function InvitationList() {
|
|
7826
|
-
const { m } = useI18n();
|
|
7827
|
-
const { invitations } = useCalendars();
|
|
7828
|
-
if (invitations.length === 0) return null;
|
|
7829
|
-
return /* @__PURE__ */ jsx(PageSection, {
|
|
7830
|
-
title: m.calendars.invitations.title,
|
|
7831
|
-
description: m.calendars.invitations.description,
|
|
7832
|
-
children: /* @__PURE__ */ jsx("ul", {
|
|
7833
|
-
className: "calendarSettingList",
|
|
7834
|
-
children: invitations.map((invitation) => /* @__PURE__ */ jsx(InvitationRow$1, { invitation }, invitation.id))
|
|
7835
|
-
})
|
|
7836
|
-
});
|
|
7837
|
-
}
|
|
7838
|
-
|
|
7839
7434
|
// src/features/calendars/components/CalendarSettings.tsx
|
|
7840
7435
|
function LeaveCalendarModal({ calendar, onClose }) {
|
|
7841
7436
|
const { m } = useI18n();
|
|
@@ -7928,7 +7523,7 @@ function CalendarSettings() {
|
|
|
7928
7523
|
const { teams } = useHost();
|
|
7929
7524
|
const { calendars, error } = useCalendars();
|
|
7930
7525
|
const [calendarToLeave, setCalendarToLeave] = useState(null);
|
|
7931
|
-
return /* @__PURE__ */ jsxs(
|
|
7526
|
+
return /* @__PURE__ */ jsxs(PageSection, {
|
|
7932
7527
|
title: list.title,
|
|
7933
7528
|
description: list.description,
|
|
7934
7529
|
children: [
|
|
@@ -7956,7 +7551,82 @@ function CalendarSettings() {
|
|
|
7956
7551
|
onClose: () => setCalendarToLeave(null)
|
|
7957
7552
|
})
|
|
7958
7553
|
]
|
|
7959
|
-
})
|
|
7554
|
+
});
|
|
7555
|
+
}
|
|
7556
|
+
|
|
7557
|
+
// src/features/calendars/components/InvitationList.tsx
|
|
7558
|
+
function InvitationRow$1({ invitation }) {
|
|
7559
|
+
const { m, format } = useI18n();
|
|
7560
|
+
const { invitations: text, roles } = m.calendars;
|
|
7561
|
+
const { acceptInvitation, declineInvitation } = useCalendars();
|
|
7562
|
+
const accept = useAsyncAction(() => acceptInvitation(invitation.id));
|
|
7563
|
+
const decline = useAsyncAction(() => declineInvitation(invitation.id));
|
|
7564
|
+
const isBusy = accept.isPending || decline.isPending;
|
|
7565
|
+
return /* @__PURE__ */ jsxs("li", {
|
|
7566
|
+
className: "calendarSettingCard",
|
|
7567
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
7568
|
+
className: "calendarSettingHeader",
|
|
7569
|
+
children: [/* @__PURE__ */ jsxs("span", {
|
|
7570
|
+
className: "itemRowMain",
|
|
7571
|
+
children: [
|
|
7572
|
+
/* @__PURE__ */ jsx("span", {
|
|
7573
|
+
className: "itemRowTitle",
|
|
7574
|
+
children: invitation.teamName
|
|
7575
|
+
}),
|
|
7576
|
+
/* @__PURE__ */ jsxs("span", {
|
|
7577
|
+
className: "itemRowMeta",
|
|
7578
|
+
children: [
|
|
7579
|
+
invitation.invitedBy ? text.invitedBy(invitation.invitedBy) : text.invited,
|
|
7580
|
+
" ·",
|
|
7581
|
+
" ",
|
|
7582
|
+
text.validUntil(format.longDate(toISODate(new Date(invitation.expiresAt))))
|
|
7583
|
+
]
|
|
7584
|
+
}),
|
|
7585
|
+
invitation.description && /* @__PURE__ */ jsx("span", {
|
|
7586
|
+
className: "itemRowMeta",
|
|
7587
|
+
children: invitation.description
|
|
7588
|
+
})
|
|
7589
|
+
]
|
|
7590
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
7591
|
+
className: "badge",
|
|
7592
|
+
children: roles[invitation.role]
|
|
7593
|
+
})]
|
|
7594
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
7595
|
+
className: "calendarSettingBody",
|
|
7596
|
+
children: [/* @__PURE__ */ jsx(ActionFeedback, { error: accept.error ?? decline.error }), /* @__PURE__ */ jsxs("div", {
|
|
7597
|
+
className: "formActions",
|
|
7598
|
+
children: [/* @__PURE__ */ jsx(Button, {
|
|
7599
|
+
variant: "outline",
|
|
7600
|
+
disabled: isBusy,
|
|
7601
|
+
isPending: decline.isPending,
|
|
7602
|
+
pendingLabel: text.declining,
|
|
7603
|
+
onClick: () => void decline.run(),
|
|
7604
|
+
children: text.decline
|
|
7605
|
+
}), /* @__PURE__ */ jsx(Button, {
|
|
7606
|
+
disabled: isBusy,
|
|
7607
|
+
isPending: accept.isPending,
|
|
7608
|
+
pendingLabel: text.accepting,
|
|
7609
|
+
onClick: () => void accept.run(),
|
|
7610
|
+
children: text.accept
|
|
7611
|
+
})]
|
|
7612
|
+
})]
|
|
7613
|
+
})]
|
|
7614
|
+
});
|
|
7615
|
+
}
|
|
7616
|
+
function InvitationList() {
|
|
7617
|
+
const { m } = useI18n();
|
|
7618
|
+
const { invitations } = useCalendars();
|
|
7619
|
+
return /* @__PURE__ */ jsx(PageSection, {
|
|
7620
|
+
title: m.calendars.invitations.title,
|
|
7621
|
+
description: m.calendars.invitations.description,
|
|
7622
|
+
children: invitations.length === 0 ? /* @__PURE__ */ jsx("p", {
|
|
7623
|
+
className: "emptyHint",
|
|
7624
|
+
children: m.calendars.invitations.empty
|
|
7625
|
+
}) : /* @__PURE__ */ jsx("ul", {
|
|
7626
|
+
className: "calendarSettingList",
|
|
7627
|
+
children: invitations.map((invitation) => /* @__PURE__ */ jsx(InvitationRow$1, { invitation }, invitation.id))
|
|
7628
|
+
})
|
|
7629
|
+
});
|
|
7960
7630
|
}
|
|
7961
7631
|
|
|
7962
7632
|
// src/components/PageLayout.tsx
|
|
@@ -9367,20 +9037,46 @@ function DangerSection({ calendar, members, currentUserId, onOwnershipTransferre
|
|
|
9367
9037
|
}
|
|
9368
9038
|
|
|
9369
9039
|
// src/hooks/useArrowKeyNavigation.ts
|
|
9040
|
+
var lastUsedRoot = null;
|
|
9041
|
+
var wasUsed = false;
|
|
9042
|
+
var precedes = (a, b) => a.getRootNode().host.compareDocumentPosition(b.getRootNode().host) & Node.DOCUMENT_POSITION_FOLLOWING;
|
|
9370
9043
|
var isEditableTarget = (target) => target instanceof HTMLElement && (target.isContentEditable || target.closest("input, textarea, select, [role=\"dialog\"], dialog") !== null);
|
|
9044
|
+
var isNothingFocused = (target) => target === null || target === document.body || target === document.documentElement || target === document;
|
|
9045
|
+
var isVisible = (element) => {
|
|
9046
|
+
const { top, bottom, width, height } = element.getBoundingClientRect();
|
|
9047
|
+
return width > 0 && height > 0 && bottom > 0 && top < window.innerHeight;
|
|
9048
|
+
};
|
|
9049
|
+
var getInnerTarget = (event) => event.composedPath()[0] ?? null;
|
|
9371
9050
|
function useArrowKeyNavigation({ onPrevious, onNext }) {
|
|
9372
9051
|
const root = useRootElement();
|
|
9052
|
+
useEffect(() => {
|
|
9053
|
+
if (!lastUsedRoot || !wasUsed && precedes(root, lastUsedRoot)) lastUsedRoot = root;
|
|
9054
|
+
const markUsed = () => {
|
|
9055
|
+
lastUsedRoot = root;
|
|
9056
|
+
wasUsed = true;
|
|
9057
|
+
};
|
|
9058
|
+
root.addEventListener("pointerdown", markUsed);
|
|
9059
|
+
root.addEventListener("focusin", markUsed);
|
|
9060
|
+
return () => {
|
|
9061
|
+
root.removeEventListener("pointerdown", markUsed);
|
|
9062
|
+
root.removeEventListener("focusin", markUsed);
|
|
9063
|
+
if (lastUsedRoot === root) lastUsedRoot = null;
|
|
9064
|
+
};
|
|
9065
|
+
}, [root]);
|
|
9373
9066
|
useEffect(() => {
|
|
9374
9067
|
const handleKeyDown = (event) => {
|
|
9375
9068
|
if (event.defaultPrevented || event.altKey || event.ctrlKey || event.metaKey || event.shiftKey) return;
|
|
9376
|
-
if (isEditableTarget(event.target)) return;
|
|
9377
9069
|
const action = event.key === "ArrowLeft" ? onPrevious : event.key === "ArrowRight" ? onNext : null;
|
|
9378
9070
|
if (!action) return;
|
|
9071
|
+
const target = getInnerTarget(event);
|
|
9072
|
+
if (event.composedPath().includes(root)) {
|
|
9073
|
+
if (isEditableTarget(target)) return;
|
|
9074
|
+
} else if (!isNothingFocused(target) || lastUsedRoot !== root || !isVisible(root)) return;
|
|
9379
9075
|
event.preventDefault();
|
|
9380
9076
|
action();
|
|
9381
9077
|
};
|
|
9382
|
-
|
|
9383
|
-
return () =>
|
|
9078
|
+
document.addEventListener("keydown", handleKeyDown);
|
|
9079
|
+
return () => document.removeEventListener("keydown", handleKeyDown);
|
|
9384
9080
|
}, [
|
|
9385
9081
|
root,
|
|
9386
9082
|
onPrevious,
|
|
@@ -9639,7 +9335,7 @@ var parsePreferences = (value) => {
|
|
|
9639
9335
|
theme: isOneOf(THEMES$1, theme) ? theme : DEFAULT_PREFERENCES.theme,
|
|
9640
9336
|
defaultView: isCalendarView(defaultView) ? defaultView : DEFAULT_PREFERENCES.defaultView,
|
|
9641
9337
|
mobileDefaultView: isCalendarView(mobileDefaultView) ? mobileDefaultView : DEFAULT_PREFERENCES.mobileDefaultView,
|
|
9642
|
-
locale:
|
|
9338
|
+
locale: locale === "auto" ? AUTO_LOCALE : canonicalizeLocale(locale) ?? DEFAULT_PREFERENCES.locale
|
|
9643
9339
|
};
|
|
9644
9340
|
};
|
|
9645
9341
|
var getStartView = ({ defaultView, mobileDefaultView }, isMobile) => isMobile ? mobileDefaultView : defaultView;
|
|
@@ -9945,8 +9641,8 @@ var NO_EVENTS = [];
|
|
|
9945
9641
|
function useEvents({ from, to, calendarIds, targetCalendarId }) {
|
|
9946
9642
|
const { events: repository, version } = useStorage();
|
|
9947
9643
|
const load = useCallback(() => repository.list({
|
|
9948
|
-
from,
|
|
9949
|
-
to,
|
|
9644
|
+
from: addDaysToISODate(from, -1),
|
|
9645
|
+
to: addDaysToISODate(to, 1),
|
|
9950
9646
|
calendarIds
|
|
9951
9647
|
}), [
|
|
9952
9648
|
repository,
|
|
@@ -9977,12 +9673,12 @@ function useEvents({ from, to, calendarIds, targetCalendarId }) {
|
|
|
9977
9673
|
withReload,
|
|
9978
9674
|
targetCalendarId
|
|
9979
9675
|
]),
|
|
9980
|
-
updateEvent: useCallback((occurrence, input, scope) => withReload(() => updateOccurrence(repository, findSeries(occurrence), occurrence.
|
|
9676
|
+
updateEvent: useCallback((occurrence, input, scope) => withReload(() => updateOccurrence(repository, findSeries(occurrence), occurrence.occurrenceDate, input, scope)), [
|
|
9981
9677
|
repository,
|
|
9982
9678
|
withReload,
|
|
9983
9679
|
findSeries
|
|
9984
9680
|
]),
|
|
9985
|
-
deleteEvent: useCallback((occurrence, scope) => withReload(() => deleteOccurrence(repository, findSeries(occurrence), occurrence.
|
|
9681
|
+
deleteEvent: useCallback((occurrence, scope) => withReload(() => deleteOccurrence(repository, findSeries(occurrence), occurrence.occurrenceDate, scope)), [
|
|
9986
9682
|
repository,
|
|
9987
9683
|
withReload,
|
|
9988
9684
|
findSeries
|
|
@@ -9991,7 +9687,7 @@ function useEvents({ from, to, calendarIds, targetCalendarId }) {
|
|
|
9991
9687
|
}
|
|
9992
9688
|
|
|
9993
9689
|
// src/components/DateTimeField.tsx
|
|
9994
|
-
function DateTimeField({ name, dateLabel, timeLabel, date, time, minDate, dateError, timeError, onDateChange, onTimeChange }) {
|
|
9690
|
+
function DateTimeField({ name, dateLabel, timeLabel, date, time, minDate, showTime = true, dateError, timeError, onDateChange, onTimeChange }) {
|
|
9995
9691
|
return /* @__PURE__ */ jsxs("div", {
|
|
9996
9692
|
className: "formRow",
|
|
9997
9693
|
children: [/* @__PURE__ */ jsx(FormField, {
|
|
@@ -10006,7 +9702,7 @@ function DateTimeField({ name, dateLabel, timeLabel, date, time, minDate, dateEr
|
|
|
10006
9702
|
"aria-invalid": Boolean(dateError),
|
|
10007
9703
|
onChange: (event) => onDateChange(event.target.value)
|
|
10008
9704
|
})
|
|
10009
|
-
}), /* @__PURE__ */ jsx(FormField, {
|
|
9705
|
+
}), showTime && /* @__PURE__ */ jsx(FormField, {
|
|
10010
9706
|
label: timeLabel,
|
|
10011
9707
|
error: timeError,
|
|
10012
9708
|
children: /* @__PURE__ */ jsx("input", {
|
|
@@ -10026,7 +9722,7 @@ var getScopeOptions = (occurrence, nextRecurrence = occurrence?.recurrence ?? nu
|
|
|
10026
9722
|
if (!occurrence?.recurrence) return ["all"];
|
|
10027
9723
|
const options = [];
|
|
10028
9724
|
if (isSameRecurrence(occurrence.recurrence, nextRecurrence)) options.push("single");
|
|
10029
|
-
if (hasEarlierOccurrences(toSeriesRule(occurrence), occurrence.
|
|
9725
|
+
if (hasEarlierOccurrences(toSeriesRule(occurrence), occurrence.occurrenceDate)) options.push("following");
|
|
10030
9726
|
options.push("all");
|
|
10031
9727
|
return options;
|
|
10032
9728
|
};
|
|
@@ -10367,9 +10063,39 @@ function RecurrenceScopeModal({ options, onSelect, onClose }) {
|
|
|
10367
10063
|
});
|
|
10368
10064
|
}
|
|
10369
10065
|
|
|
10066
|
+
// src/features/events/components/TimeZoneField.tsx
|
|
10067
|
+
var FLOATING = "";
|
|
10068
|
+
var toLabel = (timeZone) => `${timeZone.replaceAll("_", " ")} (${formatTimeZoneOffset(timeZone)})`;
|
|
10069
|
+
function TimeZoneField({ value, onChange }) {
|
|
10070
|
+
const { m } = useI18n();
|
|
10071
|
+
const options = useMemo(() => {
|
|
10072
|
+
const zones = listTimeZones();
|
|
10073
|
+
if (value && !zones.includes(value)) zones.unshift(value);
|
|
10074
|
+
return [{
|
|
10075
|
+
value: FLOATING,
|
|
10076
|
+
label: m.events.floatingTimeZone
|
|
10077
|
+
}, ...zones.map((zone) => ({
|
|
10078
|
+
value: zone,
|
|
10079
|
+
label: toLabel(zone)
|
|
10080
|
+
}))];
|
|
10081
|
+
}, [m, value]);
|
|
10082
|
+
return /* @__PURE__ */ jsx(SelectField, {
|
|
10083
|
+
label: m.events.timeZone,
|
|
10084
|
+
name: "timeZone",
|
|
10085
|
+
value: value ?? FLOATING,
|
|
10086
|
+
options,
|
|
10087
|
+
onChange: (next) => onChange(next === FLOATING ? null : next)
|
|
10088
|
+
});
|
|
10089
|
+
}
|
|
10090
|
+
|
|
10370
10091
|
// src/features/events/components/EventModal.tsx
|
|
10092
|
+
var DEFAULT_START = "09:00";
|
|
10093
|
+
var DEFAULT_END = "10:00";
|
|
10094
|
+
var isValidPeriod = ({ startDate, start, endDate, end }) => isISODate(startDate) && isISODate(endDate) && isTime(start) && isTime(end);
|
|
10371
10095
|
function EventModal({ initialValue, occurrence = null, notice, onSave, onDelete, onClose }) {
|
|
10372
|
-
const
|
|
10096
|
+
const i18n = useI18n();
|
|
10097
|
+
const { m } = i18n;
|
|
10098
|
+
const viewerTimeZone = useViewerTimeZone();
|
|
10373
10099
|
const mode = occurrence ? "edit" : "create";
|
|
10374
10100
|
const [values, setValues] = useState(initialValue);
|
|
10375
10101
|
const [errors, setErrors] = useState({});
|
|
@@ -10386,6 +10112,41 @@ function EventModal({ initialValue, occurrence = null, notice, onSave, onDelete,
|
|
|
10386
10112
|
}));
|
|
10387
10113
|
};
|
|
10388
10114
|
const setField = (field, value) => update({ [field]: value }, [field]);
|
|
10115
|
+
const [timedValues, setTimedValues] = useState(() => initialValue.allDay ? {
|
|
10116
|
+
start: DEFAULT_START,
|
|
10117
|
+
end: DEFAULT_END,
|
|
10118
|
+
timeZone: viewerTimeZone
|
|
10119
|
+
} : {
|
|
10120
|
+
start: initialValue.start,
|
|
10121
|
+
end: initialValue.end,
|
|
10122
|
+
timeZone: initialValue.timeZone
|
|
10123
|
+
});
|
|
10124
|
+
const setAllDay = (allDay) => {
|
|
10125
|
+
if (allDay) {
|
|
10126
|
+
setTimedValues({
|
|
10127
|
+
start: values.start,
|
|
10128
|
+
end: values.end,
|
|
10129
|
+
timeZone: values.timeZone
|
|
10130
|
+
});
|
|
10131
|
+
update({
|
|
10132
|
+
allDay,
|
|
10133
|
+
start: ALL_DAY_TIME,
|
|
10134
|
+
end: ALL_DAY_TIME,
|
|
10135
|
+
timeZone: null
|
|
10136
|
+
}, [
|
|
10137
|
+
"start",
|
|
10138
|
+
"end",
|
|
10139
|
+
"endDate"
|
|
10140
|
+
]);
|
|
10141
|
+
} else update({
|
|
10142
|
+
allDay,
|
|
10143
|
+
...timedValues
|
|
10144
|
+
}, [
|
|
10145
|
+
"start",
|
|
10146
|
+
"end",
|
|
10147
|
+
"endDate"
|
|
10148
|
+
]);
|
|
10149
|
+
};
|
|
10389
10150
|
const changeStartDate = (startDate) => update({
|
|
10390
10151
|
...isISODate(values.startDate) && isISODate(values.endDate) && isISODate(startDate) ? moveToStartDate(values, startDate) : { startDate },
|
|
10391
10152
|
recurrence: adaptRecurrenceToStart(values.recurrence, values.startDate, startDate)
|
|
@@ -10409,6 +10170,7 @@ function EventModal({ initialValue, occurrence = null, notice, onSave, onDelete,
|
|
|
10409
10170
|
setPendingSave(null);
|
|
10410
10171
|
save(pendingSave.input, scope);
|
|
10411
10172
|
};
|
|
10173
|
+
const viewerHint = !values.allDay && values.timeZone && values.timeZone !== viewerTimeZone && isValidPeriod(values) ? m.events.inYourTimeZone(formatEventPeriod(toViewerPeriod(values, values.timeZone, viewerTimeZone), i18n)) : null;
|
|
10412
10174
|
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Modal, {
|
|
10413
10175
|
title: mode === "create" ? m.events.createTitle : m.events.editTitle,
|
|
10414
10176
|
onClose,
|
|
@@ -10430,12 +10192,18 @@ function EventModal({ initialValue, occurrence = null, notice, onSave, onDelete,
|
|
|
10430
10192
|
onChange: (title) => setField("title", title),
|
|
10431
10193
|
"data-autofocus": true
|
|
10432
10194
|
}),
|
|
10195
|
+
/* @__PURE__ */ jsx(Switch, {
|
|
10196
|
+
label: m.events.allDay,
|
|
10197
|
+
checked: values.allDay,
|
|
10198
|
+
onChange: setAllDay
|
|
10199
|
+
}),
|
|
10433
10200
|
/* @__PURE__ */ jsx(DateTimeField, {
|
|
10434
10201
|
name: "start",
|
|
10435
10202
|
dateLabel: m.events.startDate,
|
|
10436
10203
|
timeLabel: m.events.startTime,
|
|
10437
10204
|
date: values.startDate,
|
|
10438
10205
|
time: values.start,
|
|
10206
|
+
showTime: !values.allDay,
|
|
10439
10207
|
dateError: errors.startDate,
|
|
10440
10208
|
timeError: errors.start,
|
|
10441
10209
|
onDateChange: changeStartDate,
|
|
@@ -10447,12 +10215,21 @@ function EventModal({ initialValue, occurrence = null, notice, onSave, onDelete,
|
|
|
10447
10215
|
timeLabel: m.events.endTime,
|
|
10448
10216
|
date: values.endDate,
|
|
10449
10217
|
time: values.end,
|
|
10218
|
+
showTime: !values.allDay,
|
|
10450
10219
|
minDate: values.startDate,
|
|
10451
10220
|
dateError: errors.endDate,
|
|
10452
10221
|
timeError: errors.end,
|
|
10453
10222
|
onDateChange: (endDate) => setField("endDate", endDate),
|
|
10454
10223
|
onTimeChange: (end) => setField("end", end)
|
|
10455
10224
|
}),
|
|
10225
|
+
!values.allDay && /* @__PURE__ */ jsx(TimeZoneField, {
|
|
10226
|
+
value: values.timeZone,
|
|
10227
|
+
onChange: (timeZone) => setField("timeZone", timeZone)
|
|
10228
|
+
}),
|
|
10229
|
+
viewerHint && /* @__PURE__ */ jsx("p", {
|
|
10230
|
+
className: "formHint",
|
|
10231
|
+
children: viewerHint
|
|
10232
|
+
}),
|
|
10456
10233
|
/* @__PURE__ */ jsx(RecurrenceFields, {
|
|
10457
10234
|
value: values.recurrence,
|
|
10458
10235
|
startDate: values.startDate,
|
|
@@ -10599,6 +10376,10 @@ function CustomColorSettings() {
|
|
|
10599
10376
|
});
|
|
10600
10377
|
}
|
|
10601
10378
|
|
|
10379
|
+
// src/features/calendar/context/DragContext.ts
|
|
10380
|
+
var DraggingEventContext = createContext(null);
|
|
10381
|
+
var useIsDragging = (occurrenceKey) => use(DraggingEventContext) === occurrenceKey;
|
|
10382
|
+
|
|
10602
10383
|
// src/features/calendar/context/EventSourcesContext.ts
|
|
10603
10384
|
var NO_EVENT_SOURCES = /* @__PURE__ */ new Map();
|
|
10604
10385
|
var EventSourcesContext = createContext(NO_EVENT_SOURCES);
|
|
@@ -10683,6 +10464,268 @@ function useCalendarView(initialView = "week", initialDate = today()) {
|
|
|
10683
10464
|
};
|
|
10684
10465
|
}
|
|
10685
10466
|
|
|
10467
|
+
// src/features/calendar/constants/grid.ts
|
|
10468
|
+
var HOURS = Array.from({ length: 24 }, (_, hour) => hour);
|
|
10469
|
+
|
|
10470
|
+
// src/features/calendar/utils/eventDrag.ts
|
|
10471
|
+
var DRAG_STEP_MINUTES = 15;
|
|
10472
|
+
var toAbsolute = (reference, date, minutes) => daysBetween(reference, date) * MINUTES_PER_DAY + minutes;
|
|
10473
|
+
var fromAbsolute = (reference, absolute) => {
|
|
10474
|
+
const days = Math.floor(absolute / MINUTES_PER_DAY);
|
|
10475
|
+
return {
|
|
10476
|
+
date: addDaysToISODate(reference, days),
|
|
10477
|
+
time: minutesToTime(absolute - days * MINUTES_PER_DAY)
|
|
10478
|
+
};
|
|
10479
|
+
};
|
|
10480
|
+
var getDragDelta = (unit, from, to) => {
|
|
10481
|
+
if (unit === "days") return daysBetween(from.date, to.date) * MINUTES_PER_DAY;
|
|
10482
|
+
const delta = toAbsolute(from.date, to.date, to.minutes) - from.minutes;
|
|
10483
|
+
return Math.round(delta / 15) * 15;
|
|
10484
|
+
};
|
|
10485
|
+
var applyDragDelta = (period, mode, delta) => {
|
|
10486
|
+
const reference = period.startDate;
|
|
10487
|
+
const start = timeToMinutes(period.start);
|
|
10488
|
+
const end = toAbsolute(reference, period.endDate, timeToMinutes(period.end));
|
|
10489
|
+
const nextStart = mode === "move" ? start + delta : start;
|
|
10490
|
+
const nextEnd = mode === "move" ? end + delta : Math.max(end + delta, start + 15);
|
|
10491
|
+
const first = fromAbsolute(reference, nextStart);
|
|
10492
|
+
const last = fromAbsolute(reference, nextEnd);
|
|
10493
|
+
return {
|
|
10494
|
+
startDate: first.date,
|
|
10495
|
+
start: first.time,
|
|
10496
|
+
endDate: last.date,
|
|
10497
|
+
end: last.time
|
|
10498
|
+
};
|
|
10499
|
+
};
|
|
10500
|
+
var isSamePeriod = (a, b) => a.startDate === b.startDate && a.start === b.start && a.endDate === b.endDate && a.end === b.end;
|
|
10501
|
+
var toDropInput = (occurrence, viewerPeriod, viewerTimeZone, scope) => {
|
|
10502
|
+
const current = toOccurrenceInput(occurrence);
|
|
10503
|
+
const period = occurrence.timeZone ? toViewerPeriod(viewerPeriod, viewerTimeZone, occurrence.timeZone) : viewerPeriod;
|
|
10504
|
+
return {
|
|
10505
|
+
...current,
|
|
10506
|
+
...period,
|
|
10507
|
+
recurrence: scope === "single" ? current.recurrence : adaptRecurrenceToStart(current.recurrence, current.startDate, period.startDate)
|
|
10508
|
+
};
|
|
10509
|
+
};
|
|
10510
|
+
|
|
10511
|
+
// src/features/calendar/hooks/useEventDrag.ts
|
|
10512
|
+
var LONG_PRESS_MS$1 = 1e3;
|
|
10513
|
+
var MOVE_TOLERANCE_PX$1 = 8;
|
|
10514
|
+
var EDGE_PX$1 = 48;
|
|
10515
|
+
var SCROLL_STEP_PX$1 = 12;
|
|
10516
|
+
var CLICK_SUPPRESSION_MS$1 = 500;
|
|
10517
|
+
var findDragPoint = (scope, { x, y }, unit) => {
|
|
10518
|
+
const cell = scope.elementFromPoint(x, y)?.closest("[data-date]");
|
|
10519
|
+
const date = cell?.dataset.date;
|
|
10520
|
+
if (!cell || !date) return null;
|
|
10521
|
+
if (unit === "days") return {
|
|
10522
|
+
date,
|
|
10523
|
+
minutes: 0
|
|
10524
|
+
};
|
|
10525
|
+
const slots = cell.querySelector(".slots");
|
|
10526
|
+
if (!slots) return null;
|
|
10527
|
+
const { top, height } = slots.getBoundingClientRect();
|
|
10528
|
+
return {
|
|
10529
|
+
date,
|
|
10530
|
+
minutes: Math.min(Math.max((y - top) / height * MINUTES_PER_DAY, 0), MINUTES_PER_DAY)
|
|
10531
|
+
};
|
|
10532
|
+
};
|
|
10533
|
+
var findDraggable = (target) => target instanceof Element ? target.closest("[data-occurrence-key]") : null;
|
|
10534
|
+
function useEventDrag({ containerRef, enabled, occurrences, onPreview, onDrop }) {
|
|
10535
|
+
const latest = useRef({
|
|
10536
|
+
occurrences,
|
|
10537
|
+
onPreview,
|
|
10538
|
+
onDrop
|
|
10539
|
+
});
|
|
10540
|
+
useEffect(() => {
|
|
10541
|
+
latest.current = {
|
|
10542
|
+
occurrences,
|
|
10543
|
+
onPreview,
|
|
10544
|
+
onDrop
|
|
10545
|
+
};
|
|
10546
|
+
});
|
|
10547
|
+
useEffect(() => {
|
|
10548
|
+
const container = containerRef.current;
|
|
10549
|
+
if (!container || !enabled) return;
|
|
10550
|
+
const scope = container.getRootNode();
|
|
10551
|
+
const scroller = container.closest(".scrollArea") ?? container;
|
|
10552
|
+
let press = null;
|
|
10553
|
+
let isActive = false;
|
|
10554
|
+
let pressTimer;
|
|
10555
|
+
let frame = 0;
|
|
10556
|
+
let pressPoint = null;
|
|
10557
|
+
let lastPoint = null;
|
|
10558
|
+
let preview = null;
|
|
10559
|
+
let suppressClickUntil = 0;
|
|
10560
|
+
let touchTarget = null;
|
|
10561
|
+
const moveTo = (point) => {
|
|
10562
|
+
if (!press) return;
|
|
10563
|
+
const target = findDragPoint(scope, point, press.unit);
|
|
10564
|
+
if (!target) return;
|
|
10565
|
+
const next = applyDragDelta(press.period, press.mode, getDragDelta(press.unit, press.origin, target));
|
|
10566
|
+
if (preview && isSamePeriod(preview, next)) return;
|
|
10567
|
+
preview = next;
|
|
10568
|
+
latest.current.onPreview({
|
|
10569
|
+
occurrenceKey: press.occurrence.occurrenceKey,
|
|
10570
|
+
period: next
|
|
10571
|
+
});
|
|
10572
|
+
};
|
|
10573
|
+
const autoScroll = () => {
|
|
10574
|
+
if (!isActive) return;
|
|
10575
|
+
if (lastPoint) {
|
|
10576
|
+
const { top, bottom } = scroller.getBoundingClientRect();
|
|
10577
|
+
const step = lastPoint.y < top + EDGE_PX$1 ? -12 : lastPoint.y > bottom - EDGE_PX$1 ? SCROLL_STEP_PX$1 : 0;
|
|
10578
|
+
if (step !== 0) {
|
|
10579
|
+
scroller.scrollTop += step;
|
|
10580
|
+
moveTo(lastPoint);
|
|
10581
|
+
}
|
|
10582
|
+
}
|
|
10583
|
+
frame = requestAnimationFrame(autoScroll);
|
|
10584
|
+
};
|
|
10585
|
+
const activate = () => {
|
|
10586
|
+
if (!press) return;
|
|
10587
|
+
isActive = true;
|
|
10588
|
+
preview = press.period;
|
|
10589
|
+
latest.current.onPreview({
|
|
10590
|
+
occurrenceKey: press.occurrence.occurrenceKey,
|
|
10591
|
+
period: preview
|
|
10592
|
+
});
|
|
10593
|
+
container.classList.add("isDraggingEvent");
|
|
10594
|
+
navigator.vibrate?.(15);
|
|
10595
|
+
frame = requestAnimationFrame(autoScroll);
|
|
10596
|
+
};
|
|
10597
|
+
const removeTouchListeners = () => {
|
|
10598
|
+
touchTarget?.removeEventListener("touchmove", handleTouchMove);
|
|
10599
|
+
touchTarget?.removeEventListener("touchend", handleTouchEnd);
|
|
10600
|
+
touchTarget?.removeEventListener("touchcancel", handleTouchCancel);
|
|
10601
|
+
touchTarget = null;
|
|
10602
|
+
};
|
|
10603
|
+
const finish = (commit) => {
|
|
10604
|
+
clearTimeout(pressTimer);
|
|
10605
|
+
pressTimer = void 0;
|
|
10606
|
+
cancelAnimationFrame(frame);
|
|
10607
|
+
removeTouchListeners();
|
|
10608
|
+
container.classList.remove("isDraggingEvent");
|
|
10609
|
+
if (isActive) {
|
|
10610
|
+
suppressClickUntil = Date.now() + CLICK_SUPPRESSION_MS$1;
|
|
10611
|
+
if (commit && press && preview && !isSamePeriod(preview, press.period)) latest.current.onDrop(press.occurrence, preview);
|
|
10612
|
+
else latest.current.onPreview(null);
|
|
10613
|
+
}
|
|
10614
|
+
isActive = false;
|
|
10615
|
+
press = null;
|
|
10616
|
+
preview = null;
|
|
10617
|
+
pressPoint = null;
|
|
10618
|
+
};
|
|
10619
|
+
const begin = (target, point) => {
|
|
10620
|
+
const element = findDraggable(target);
|
|
10621
|
+
const occurrence = element && latest.current.occurrences.get(element.dataset.occurrenceKey ?? "");
|
|
10622
|
+
if (!element || !occurrence) return false;
|
|
10623
|
+
const mode = target instanceof Element && target.closest(".eventResizeHandle") ? "resize" : "move";
|
|
10624
|
+
const unit = element.closest(".slots") ? "minutes" : "days";
|
|
10625
|
+
const origin = findDragPoint(scope, point, unit);
|
|
10626
|
+
if (!origin) return false;
|
|
10627
|
+
const { startDate, start, endDate, end } = occurrence;
|
|
10628
|
+
press = {
|
|
10629
|
+
occurrence,
|
|
10630
|
+
mode,
|
|
10631
|
+
unit,
|
|
10632
|
+
origin,
|
|
10633
|
+
period: {
|
|
10634
|
+
startDate,
|
|
10635
|
+
start,
|
|
10636
|
+
endDate,
|
|
10637
|
+
end
|
|
10638
|
+
}
|
|
10639
|
+
};
|
|
10640
|
+
pressPoint = lastPoint = point;
|
|
10641
|
+
pressTimer = setTimeout(() => {
|
|
10642
|
+
pressTimer = void 0;
|
|
10643
|
+
activate();
|
|
10644
|
+
}, LONG_PRESS_MS$1);
|
|
10645
|
+
return true;
|
|
10646
|
+
};
|
|
10647
|
+
const track = (point) => {
|
|
10648
|
+
lastPoint = point;
|
|
10649
|
+
if (isActive) moveTo(point);
|
|
10650
|
+
else if (pressTimer && pressPoint && Math.hypot(point.x - pressPoint.x, point.y - pressPoint.y) > MOVE_TOLERANCE_PX$1) finish(false);
|
|
10651
|
+
};
|
|
10652
|
+
const handlePointerDown = (event) => {
|
|
10653
|
+
if (event.pointerType !== "mouse" || event.button !== 0) return;
|
|
10654
|
+
begin(event.target, {
|
|
10655
|
+
x: event.clientX,
|
|
10656
|
+
y: event.clientY
|
|
10657
|
+
});
|
|
10658
|
+
};
|
|
10659
|
+
const handlePointerMove = (event) => {
|
|
10660
|
+
if (event.pointerType !== "mouse" || !press) return;
|
|
10661
|
+
if (isActive) event.preventDefault();
|
|
10662
|
+
track({
|
|
10663
|
+
x: event.clientX,
|
|
10664
|
+
y: event.clientY
|
|
10665
|
+
});
|
|
10666
|
+
};
|
|
10667
|
+
const handlePointerUp = (event) => {
|
|
10668
|
+
if (event.pointerType === "mouse" && press) finish(true);
|
|
10669
|
+
};
|
|
10670
|
+
function handleTouchMove(event) {
|
|
10671
|
+
const touch = event.touches[0];
|
|
10672
|
+
if (!touch) return;
|
|
10673
|
+
if (isActive) event.preventDefault();
|
|
10674
|
+
track({
|
|
10675
|
+
x: touch.clientX,
|
|
10676
|
+
y: touch.clientY
|
|
10677
|
+
});
|
|
10678
|
+
}
|
|
10679
|
+
function handleTouchEnd() {
|
|
10680
|
+
finish(true);
|
|
10681
|
+
}
|
|
10682
|
+
function handleTouchCancel() {
|
|
10683
|
+
finish(false);
|
|
10684
|
+
}
|
|
10685
|
+
const handleTouchStart = (event) => {
|
|
10686
|
+
if (event.touches.length !== 1) return finish(false);
|
|
10687
|
+
const touch = event.touches[0];
|
|
10688
|
+
if (!begin(event.target, {
|
|
10689
|
+
x: touch.clientX,
|
|
10690
|
+
y: touch.clientY
|
|
10691
|
+
}) || !(event.target instanceof HTMLElement)) return;
|
|
10692
|
+
touchTarget = event.target;
|
|
10693
|
+
touchTarget.addEventListener("touchmove", handleTouchMove, { passive: false });
|
|
10694
|
+
touchTarget.addEventListener("touchend", handleTouchEnd);
|
|
10695
|
+
touchTarget.addEventListener("touchcancel", handleTouchCancel);
|
|
10696
|
+
};
|
|
10697
|
+
const handleClick = (event) => {
|
|
10698
|
+
if (Date.now() < suppressClickUntil) {
|
|
10699
|
+
event.preventDefault();
|
|
10700
|
+
event.stopPropagation();
|
|
10701
|
+
}
|
|
10702
|
+
};
|
|
10703
|
+
const handleContextMenu = (event) => {
|
|
10704
|
+
if (press || findDraggable(event.target)) event.preventDefault();
|
|
10705
|
+
};
|
|
10706
|
+
const handleKeyDown = (event) => {
|
|
10707
|
+
if (event.key === "Escape" && press) finish(false);
|
|
10708
|
+
};
|
|
10709
|
+
container.addEventListener("pointerdown", handlePointerDown);
|
|
10710
|
+
window.addEventListener("pointermove", handlePointerMove);
|
|
10711
|
+
window.addEventListener("pointerup", handlePointerUp);
|
|
10712
|
+
container.addEventListener("touchstart", handleTouchStart, { passive: true });
|
|
10713
|
+
container.addEventListener("click", handleClick, true);
|
|
10714
|
+
container.addEventListener("contextmenu", handleContextMenu);
|
|
10715
|
+
window.addEventListener("keydown", handleKeyDown);
|
|
10716
|
+
return () => {
|
|
10717
|
+
finish(false);
|
|
10718
|
+
container.removeEventListener("pointerdown", handlePointerDown);
|
|
10719
|
+
window.removeEventListener("pointermove", handlePointerMove);
|
|
10720
|
+
window.removeEventListener("pointerup", handlePointerUp);
|
|
10721
|
+
container.removeEventListener("touchstart", handleTouchStart);
|
|
10722
|
+
container.removeEventListener("click", handleClick, true);
|
|
10723
|
+
container.removeEventListener("contextmenu", handleContextMenu);
|
|
10724
|
+
window.removeEventListener("keydown", handleKeyDown);
|
|
10725
|
+
};
|
|
10726
|
+
}, [containerRef, enabled]);
|
|
10727
|
+
}
|
|
10728
|
+
|
|
10686
10729
|
// src/features/calendar/hooks/useNow.ts
|
|
10687
10730
|
var MINUTE = 6e4;
|
|
10688
10731
|
function useNow() {
|
|
@@ -10712,7 +10755,8 @@ var getEventTooltip = (event, source, i18n) => [
|
|
|
10712
10755
|
].filter(Boolean).join("\n");
|
|
10713
10756
|
var getSegmentAttributes = ({ event, continuesBefore, continuesAfter }, source, i18n, ...classNamesToMerge) => ({
|
|
10714
10757
|
...getEventColorAttributes(event.color, ...classNamesToMerge, continuesBefore && "eventContinuesBefore", continuesAfter && "eventContinuesAfter"),
|
|
10715
|
-
title: getEventTooltip(event, source, i18n)
|
|
10758
|
+
title: getEventTooltip(event, source, i18n),
|
|
10759
|
+
"data-occurrence-key": event.occurrenceKey
|
|
10716
10760
|
});
|
|
10717
10761
|
|
|
10718
10762
|
// src/features/calendar/utils/segmentEvents.ts
|
|
@@ -10832,15 +10876,12 @@ var withoutPropagation = (action) => (event) => {
|
|
|
10832
10876
|
action();
|
|
10833
10877
|
};
|
|
10834
10878
|
|
|
10835
|
-
// src/features/calendar/constants/grid.ts
|
|
10836
|
-
var HOURS = Array.from({ length: 24 }, (_, hour) => hour);
|
|
10837
|
-
|
|
10838
10879
|
// src/features/calendar/utils/eventGeometry.ts
|
|
10839
10880
|
var getVisibleEnd = ({ start, end }) => Math.max(end, start + 15);
|
|
10840
10881
|
var getVisibleDuration = (segment) => getVisibleEnd(segment) - segment.start;
|
|
10841
10882
|
|
|
10842
10883
|
// src/features/calendar/utils/layoutEvents.ts
|
|
10843
|
-
var compareSegments = (a, b) => a.start - b.start || b.end - b.start - (a.end - a.start) || a.event.title.localeCompare(b.event.title);
|
|
10884
|
+
var compareSegments = (a, b) => Number(b.event.allDay) - Number(a.event.allDay) || a.start - b.start || b.end - b.start - (a.end - a.start) || a.event.title.localeCompare(b.event.title);
|
|
10844
10885
|
var sortSegments = (segments) => segments.toSorted(compareSegments);
|
|
10845
10886
|
function layoutEvents(segments) {
|
|
10846
10887
|
const positioned = [];
|
|
@@ -10888,15 +10929,21 @@ function EventTitle({ event, source }) {
|
|
|
10888
10929
|
}
|
|
10889
10930
|
|
|
10890
10931
|
// src/features/calendar/components/EventChip.tsx
|
|
10891
|
-
function EventChip({ segment, onSelect }) {
|
|
10932
|
+
function EventChip({ segment, row, isContinuation = false, onSelect }) {
|
|
10892
10933
|
const { event, start, continuesBefore } = segment;
|
|
10893
10934
|
const i18n = useI18n();
|
|
10894
10935
|
const source = useEventSource(event);
|
|
10936
|
+
const isDragging = useIsDragging(event.occurrenceKey);
|
|
10937
|
+
const { style, ...attributes } = getSegmentAttributes(segment, source, i18n, "eventChip", isContinuation && "eventChipContinuation", isDragging && "eventDragging");
|
|
10895
10938
|
return /* @__PURE__ */ jsxs("button", {
|
|
10896
10939
|
type: "button",
|
|
10897
|
-
...
|
|
10940
|
+
...attributes,
|
|
10941
|
+
style: row === void 0 ? style : {
|
|
10942
|
+
...style,
|
|
10943
|
+
gridRow: row + 1
|
|
10944
|
+
},
|
|
10898
10945
|
onClick: withoutPropagation(() => onSelect(event)),
|
|
10899
|
-
children: [!continuesBefore && /* @__PURE__ */ jsx("span", {
|
|
10946
|
+
children: [!continuesBefore && !event.allDay && /* @__PURE__ */ jsx("span", {
|
|
10900
10947
|
className: "eventChipTime",
|
|
10901
10948
|
children: i18n.format.time(start)
|
|
10902
10949
|
}), /* @__PURE__ */ jsx(EventTitle, {
|
|
@@ -11156,14 +11203,56 @@ function useSlotSelection(containerRef, enabled, onSelect) {
|
|
|
11156
11203
|
};
|
|
11157
11204
|
}
|
|
11158
11205
|
|
|
11206
|
+
// src/features/calendar/utils/allDay.ts
|
|
11207
|
+
var compareRuns = (a, b) => a.segments[0].date.localeCompare(b.segments[0].date) || b.segments.length - a.segments.length || a.title.localeCompare(b.title);
|
|
11208
|
+
function splitAllDay(dates, segmentsByDate) {
|
|
11209
|
+
const timed = /* @__PURE__ */ new Map();
|
|
11210
|
+
const runs = /* @__PURE__ */ new Map();
|
|
11211
|
+
for (const date of dates) {
|
|
11212
|
+
const segments = segmentsByDate.get(date) ?? [];
|
|
11213
|
+
timed.set(date, segments.filter((segment) => !segment.event.allDay));
|
|
11214
|
+
for (const segment of segments) {
|
|
11215
|
+
if (!segment.event.allDay) continue;
|
|
11216
|
+
const key = segment.event.occurrenceKey;
|
|
11217
|
+
const run = runs.get(key);
|
|
11218
|
+
if (run) run.segments.push(segment);
|
|
11219
|
+
else runs.set(key, {
|
|
11220
|
+
key,
|
|
11221
|
+
title: segment.event.title,
|
|
11222
|
+
segments: [segment]
|
|
11223
|
+
});
|
|
11224
|
+
}
|
|
11225
|
+
}
|
|
11226
|
+
const allDay = new Map(dates.map((date) => [date, []]));
|
|
11227
|
+
const rowEnds = [];
|
|
11228
|
+
for (const run of [...runs.values()].sort(compareRuns)) {
|
|
11229
|
+
const first = run.segments[0].date;
|
|
11230
|
+
const last = run.segments[run.segments.length - 1].date;
|
|
11231
|
+
let row = rowEnds.findIndex((end) => end < first);
|
|
11232
|
+
if (row === -1) row = rowEnds.length;
|
|
11233
|
+
rowEnds[row] = last;
|
|
11234
|
+
run.segments.forEach((segment, index) => allDay.get(segment.date)?.push({
|
|
11235
|
+
segment,
|
|
11236
|
+
row,
|
|
11237
|
+
isFirst: index === 0
|
|
11238
|
+
}));
|
|
11239
|
+
}
|
|
11240
|
+
return {
|
|
11241
|
+
allDay,
|
|
11242
|
+
timed,
|
|
11243
|
+
rows: Math.max(1, rowEnds.length)
|
|
11244
|
+
};
|
|
11245
|
+
}
|
|
11246
|
+
|
|
11159
11247
|
// src/features/calendar/components/EventBlock.tsx
|
|
11160
11248
|
var getSizeClass = (duration) => duration <= 30 ? "veryShortEvent" : duration < 60 ? "shortEvent" : null;
|
|
11161
11249
|
function EventBlock({ segment, column, columns, onSelect }) {
|
|
11162
11250
|
const { event, start } = segment;
|
|
11163
11251
|
const i18n = useI18n();
|
|
11164
11252
|
const source = useEventSource(event);
|
|
11253
|
+
const isDragging = useIsDragging(event.occurrenceKey);
|
|
11165
11254
|
const duration = getVisibleDuration(segment);
|
|
11166
|
-
const { style: colorStyle, ...attributes } = getSegmentAttributes(segment, source, i18n, "event", getSizeClass(duration));
|
|
11255
|
+
const { style: colorStyle, ...attributes } = getSegmentAttributes(segment, source, i18n, "event", getSizeClass(duration), isDragging && "eventDragging");
|
|
11167
11256
|
const style = {
|
|
11168
11257
|
"--event-start": start,
|
|
11169
11258
|
"--event-duration": duration,
|
|
@@ -11185,9 +11274,13 @@ function EventBlock({ segment, column, columns, onSelect }) {
|
|
|
11185
11274
|
className: "eventSource",
|
|
11186
11275
|
children: source.name
|
|
11187
11276
|
}),
|
|
11188
|
-
duration >= 90 && /* @__PURE__ */ jsx("span", {
|
|
11277
|
+
(duration >= 90 || isDragging) && /* @__PURE__ */ jsx("span", {
|
|
11189
11278
|
className: "eventTime",
|
|
11190
11279
|
children: formatEventPeriod(event, i18n)
|
|
11280
|
+
}),
|
|
11281
|
+
!segment.continuesAfter && /* @__PURE__ */ jsx("span", {
|
|
11282
|
+
className: "eventResizeHandle",
|
|
11283
|
+
"aria-hidden": "true"
|
|
11191
11284
|
})
|
|
11192
11285
|
]
|
|
11193
11286
|
});
|
|
@@ -11205,7 +11298,7 @@ function NowIndicator({ minutes, isToday }) {
|
|
|
11205
11298
|
}
|
|
11206
11299
|
|
|
11207
11300
|
// src/features/calendar/components/DayColumn.tsx
|
|
11208
|
-
function DayColumn({ date, isToday, nowMinutes, segments, selection = null, onSlotSelect, onEventSelect, onHeaderSelect }) {
|
|
11301
|
+
function DayColumn({ date, isToday, nowMinutes, segments, allDaySegments, selection = null, onSlotSelect, onAllDaySelect, onEventSelect, onHeaderSelect }) {
|
|
11209
11302
|
const { m, format } = useI18n();
|
|
11210
11303
|
const day = fromISODate(date);
|
|
11211
11304
|
const dayLabel = format.longDate(date);
|
|
@@ -11232,93 +11325,118 @@ function DayColumn({ date, isToday, nowMinutes, segments, selection = null, onSl
|
|
|
11232
11325
|
return /* @__PURE__ */ jsxs("div", {
|
|
11233
11326
|
className: classNames("day", isToday && "currentDay"),
|
|
11234
11327
|
"data-date": date,
|
|
11235
|
-
children: [
|
|
11236
|
-
|
|
11237
|
-
|
|
11238
|
-
|
|
11239
|
-
|
|
11240
|
-
|
|
11241
|
-
|
|
11242
|
-
|
|
11243
|
-
|
|
11244
|
-
|
|
11245
|
-
|
|
11246
|
-
|
|
11247
|
-
|
|
11248
|
-
|
|
11249
|
-
|
|
11250
|
-
|
|
11251
|
-
onClick: () => onSlotSelect(date, hour)
|
|
11252
|
-
}, hour)),
|
|
11253
|
-
positionedSegments.map(({ segment, column, columns }) => /* @__PURE__ */ jsx(EventBlock, {
|
|
11328
|
+
children: [
|
|
11329
|
+
onHeaderSelect ? /* @__PURE__ */ jsx("button", {
|
|
11330
|
+
type: "button",
|
|
11331
|
+
className: "columnHeader",
|
|
11332
|
+
title: m.calendar.openDay(dayLabel),
|
|
11333
|
+
onClick: () => onHeaderSelect(date),
|
|
11334
|
+
children: header
|
|
11335
|
+
}) : /* @__PURE__ */ jsx("div", {
|
|
11336
|
+
className: "columnHeader",
|
|
11337
|
+
children: header
|
|
11338
|
+
}),
|
|
11339
|
+
/* @__PURE__ */ jsx("div", {
|
|
11340
|
+
className: "allDayLane",
|
|
11341
|
+
title: `${dayLabel} ${m.events.allDay}`,
|
|
11342
|
+
onClick: () => onAllDaySelect(date),
|
|
11343
|
+
children: allDaySegments.map(({ segment, row, isFirst }) => /* @__PURE__ */ jsx(EventChip, {
|
|
11254
11344
|
segment,
|
|
11255
|
-
|
|
11256
|
-
|
|
11345
|
+
row,
|
|
11346
|
+
isContinuation: !isFirst,
|
|
11257
11347
|
onSelect: onEventSelect
|
|
11258
|
-
}, segment.event.occurrenceKey))
|
|
11259
|
-
|
|
11260
|
-
|
|
11261
|
-
|
|
11262
|
-
|
|
11263
|
-
|
|
11264
|
-
|
|
11265
|
-
|
|
11266
|
-
|
|
11267
|
-
|
|
11268
|
-
|
|
11348
|
+
}, segment.event.occurrenceKey))
|
|
11349
|
+
}),
|
|
11350
|
+
/* @__PURE__ */ jsxs("div", {
|
|
11351
|
+
className: "slots",
|
|
11352
|
+
children: [
|
|
11353
|
+
HOURS.map((hour) => /* @__PURE__ */ jsx("div", {
|
|
11354
|
+
className: "slot",
|
|
11355
|
+
"data-hour": hour,
|
|
11356
|
+
title: `${dayLabel} ${format.hour(hour)}`,
|
|
11357
|
+
onClick: () => onSlotSelect(date, hour)
|
|
11358
|
+
}, hour)),
|
|
11359
|
+
positionedSegments.map(({ segment, column, columns }) => /* @__PURE__ */ jsx(EventBlock, {
|
|
11360
|
+
segment,
|
|
11361
|
+
column,
|
|
11362
|
+
columns,
|
|
11363
|
+
onSelect: onEventSelect
|
|
11364
|
+
}, segment.event.occurrenceKey)),
|
|
11365
|
+
selection && /* @__PURE__ */ jsx("div", {
|
|
11366
|
+
className: "slotSelection",
|
|
11367
|
+
style: {
|
|
11368
|
+
"--selection-start": selection.fromHour,
|
|
11369
|
+
"--selection-hours": selection.toHour - selection.fromHour + 1
|
|
11370
|
+
},
|
|
11371
|
+
"aria-hidden": "true",
|
|
11372
|
+
children: selection.label && /* @__PURE__ */ jsx("span", {
|
|
11373
|
+
className: "slotSelectionLabel",
|
|
11374
|
+
children: selection.label
|
|
11375
|
+
})
|
|
11376
|
+
}),
|
|
11377
|
+
nowMinutes !== null && /* @__PURE__ */ jsx(NowIndicator, {
|
|
11378
|
+
minutes: nowMinutes,
|
|
11379
|
+
isToday
|
|
11269
11380
|
})
|
|
11270
|
-
|
|
11271
|
-
|
|
11272
|
-
|
|
11273
|
-
isToday
|
|
11274
|
-
})
|
|
11275
|
-
]
|
|
11276
|
-
})]
|
|
11381
|
+
]
|
|
11382
|
+
})
|
|
11383
|
+
]
|
|
11277
11384
|
});
|
|
11278
11385
|
}
|
|
11279
11386
|
|
|
11280
11387
|
// src/features/calendar/components/TimeColumn.tsx
|
|
11281
11388
|
function TimeColumn() {
|
|
11282
|
-
const { format } = useI18n();
|
|
11389
|
+
const { m, format } = useI18n();
|
|
11283
11390
|
return /* @__PURE__ */ jsxs("div", {
|
|
11284
11391
|
className: "dayTime",
|
|
11285
11392
|
"aria-hidden": "true",
|
|
11286
|
-
children: [
|
|
11287
|
-
className: "
|
|
11288
|
-
|
|
11289
|
-
className: "
|
|
11290
|
-
children:
|
|
11291
|
-
|
|
11292
|
-
|
|
11293
|
-
|
|
11294
|
-
|
|
11295
|
-
|
|
11296
|
-
|
|
11297
|
-
|
|
11298
|
-
|
|
11393
|
+
children: [
|
|
11394
|
+
/* @__PURE__ */ jsx("div", { className: "columnHeader" }),
|
|
11395
|
+
/* @__PURE__ */ jsx("div", {
|
|
11396
|
+
className: "allDayLane allDayLabel",
|
|
11397
|
+
children: m.events.allDay
|
|
11398
|
+
}),
|
|
11399
|
+
/* @__PURE__ */ jsx("div", {
|
|
11400
|
+
className: "slots",
|
|
11401
|
+
children: HOURS.map((hour) => /* @__PURE__ */ jsxs("div", {
|
|
11402
|
+
className: "time",
|
|
11403
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
11404
|
+
className: "compactHidden",
|
|
11405
|
+
children: format.hour(hour)
|
|
11406
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
11407
|
+
className: "compactOnly",
|
|
11408
|
+
children: format.compactHour(hour)
|
|
11409
|
+
})]
|
|
11410
|
+
}, hour))
|
|
11411
|
+
})
|
|
11412
|
+
]
|
|
11299
11413
|
});
|
|
11300
11414
|
}
|
|
11301
11415
|
|
|
11302
11416
|
// src/features/calendar/components/TimeGridView.tsx
|
|
11303
11417
|
var NO_SEGMENTS = [];
|
|
11304
|
-
|
|
11418
|
+
var NO_ALL_DAY = [];
|
|
11419
|
+
function TimeGridView({ dates, today, currentMinutes, segmentsByDate, canCreate, onCreate, onCreateRange, onCreateAllDay, onEventSelect, onShowDay }) {
|
|
11305
11420
|
const i18n = useI18n();
|
|
11306
11421
|
const containerRef = useRef(null);
|
|
11307
11422
|
const { selection, isClickSuppressed } = useSlotSelection(containerRef, canCreate, onCreateRange);
|
|
11308
11423
|
const range = useMemo(() => selection ? toSlotRange(selection) : null, [selection]);
|
|
11309
|
-
const rangeLabel = range ? formatEventPeriod(createEventInputForSlots(range.first, range.last), i18n) : null;
|
|
11424
|
+
const rangeLabel = range ? formatEventPeriod(createEventInputForSlots(range.first, range.last, null), i18n) : null;
|
|
11310
11425
|
const isSingleDay = dates.length === 1;
|
|
11426
|
+
const lanes = useMemo(() => splitAllDay(dates, segmentsByDate), [dates, segmentsByDate]);
|
|
11311
11427
|
const showsToday = dates.includes(today);
|
|
11312
11428
|
return /* @__PURE__ */ jsxs("div", {
|
|
11313
11429
|
ref: containerRef,
|
|
11314
11430
|
className: classNames("calendar", isSingleDay ? "calendar--day" : "calendar--week", range && "isSelecting"),
|
|
11431
|
+
style: { "--all-day-rows": lanes.rows },
|
|
11315
11432
|
children: [/* @__PURE__ */ jsx(TimeColumn, {}), dates.map((date) => {
|
|
11316
11433
|
const hours = range && getHoursOnDate(range, date);
|
|
11317
11434
|
return /* @__PURE__ */ jsx(DayColumn, {
|
|
11318
11435
|
date,
|
|
11319
11436
|
isToday: date === today,
|
|
11320
11437
|
nowMinutes: showsToday ? currentMinutes : null,
|
|
11321
|
-
segments:
|
|
11438
|
+
segments: lanes.timed.get(date) ?? NO_SEGMENTS,
|
|
11439
|
+
allDaySegments: lanes.allDay.get(date) ?? NO_ALL_DAY,
|
|
11322
11440
|
selection: hours && {
|
|
11323
11441
|
...hours,
|
|
11324
11442
|
label: date === range.first.date ? rangeLabel : null
|
|
@@ -11326,6 +11444,9 @@ function TimeGridView({ dates, today, currentMinutes, segmentsByDate, canCreate,
|
|
|
11326
11444
|
onSlotSelect: (slotDate, hour) => {
|
|
11327
11445
|
if (!isClickSuppressed()) onCreate(slotDate, hour);
|
|
11328
11446
|
},
|
|
11447
|
+
onAllDaySelect: (allDayDate) => {
|
|
11448
|
+
if (canCreate) onCreateAllDay(allDayDate);
|
|
11449
|
+
},
|
|
11329
11450
|
onEventSelect,
|
|
11330
11451
|
onHeaderSelect: isSingleDay ? void 0 : onShowDay
|
|
11331
11452
|
}, date);
|
|
@@ -11403,7 +11524,28 @@ function Calendar({ calendarIds, targetCalendarId, canCreate = true, eventSource
|
|
|
11403
11524
|
calendarIds,
|
|
11404
11525
|
targetCalendarId
|
|
11405
11526
|
});
|
|
11406
|
-
const
|
|
11527
|
+
const viewerTimeZone = useViewerTimeZone();
|
|
11528
|
+
const occurrences = useMemo(() => expandEvents(events, range.from, range.to, viewerTimeZone), [
|
|
11529
|
+
events,
|
|
11530
|
+
range,
|
|
11531
|
+
viewerTimeZone
|
|
11532
|
+
]);
|
|
11533
|
+
const occurrencesByKey = useMemo(() => new Map(occurrences.map((occurrence) => [occurrence.occurrenceKey, occurrence])), [occurrences]);
|
|
11534
|
+
const [dragPreview, setDragPreview] = useState(null);
|
|
11535
|
+
const [pendingDrop, setPendingDrop] = useState(null);
|
|
11536
|
+
const [dropError, setDropError] = useState(null);
|
|
11537
|
+
const segmentsByDate = useMemo(() => {
|
|
11538
|
+
const shown = dragPreview ? occurrences.map((occurrence) => occurrence.occurrenceKey === dragPreview.occurrenceKey ? {
|
|
11539
|
+
...occurrence,
|
|
11540
|
+
...dragPreview.period
|
|
11541
|
+
} : occurrence) : occurrences;
|
|
11542
|
+
return groupSegmentsByDate(shown, range);
|
|
11543
|
+
}, [
|
|
11544
|
+
occurrences,
|
|
11545
|
+
dragPreview,
|
|
11546
|
+
range
|
|
11547
|
+
]);
|
|
11548
|
+
const mainRef = useRef(null);
|
|
11407
11549
|
const [editor, setEditor] = useState(null);
|
|
11408
11550
|
const [eventToDelete, setEventToDelete] = useState(null);
|
|
11409
11551
|
useArrowKeyNavigation({
|
|
@@ -11412,19 +11554,25 @@ function Calendar({ calendarIds, targetCalendarId, canCreate = true, eventSource
|
|
|
11412
11554
|
});
|
|
11413
11555
|
const openCreate = useCallback((date, hour) => {
|
|
11414
11556
|
if (canCreate) setEditor({
|
|
11415
|
-
initialValue: createEventInput(date, hour),
|
|
11557
|
+
initialValue: createEventInput(date, hour, viewerTimeZone),
|
|
11416
11558
|
occurrence: null
|
|
11417
11559
|
});
|
|
11418
|
-
}, [canCreate]);
|
|
11560
|
+
}, [canCreate, viewerTimeZone]);
|
|
11419
11561
|
const openCreateRange = useCallback(({ first, last }) => {
|
|
11420
11562
|
if (canCreate) setEditor({
|
|
11421
|
-
initialValue: createEventInputForSlots(first, last),
|
|
11563
|
+
initialValue: createEventInputForSlots(first, last, viewerTimeZone),
|
|
11564
|
+
occurrence: null
|
|
11565
|
+
});
|
|
11566
|
+
}, [canCreate, viewerTimeZone]);
|
|
11567
|
+
const openCreateAllDay = useCallback((date) => {
|
|
11568
|
+
if (canCreate) setEditor({
|
|
11569
|
+
initialValue: createAllDayEventInput(date),
|
|
11422
11570
|
occurrence: null
|
|
11423
11571
|
});
|
|
11424
11572
|
}, [canCreate]);
|
|
11425
11573
|
const openEdit = useCallback((occurrence) => {
|
|
11426
11574
|
setEditor({
|
|
11427
|
-
initialValue:
|
|
11575
|
+
initialValue: toOccurrenceInput(occurrence),
|
|
11428
11576
|
occurrence
|
|
11429
11577
|
});
|
|
11430
11578
|
}, []);
|
|
@@ -11434,6 +11582,37 @@ function Calendar({ calendarIds, targetCalendarId, canCreate = true, eventSource
|
|
|
11434
11582
|
setEditor(null);
|
|
11435
11583
|
goToDate(input.startDate);
|
|
11436
11584
|
};
|
|
11585
|
+
const saveDrop = async (occurrence, period, scope) => {
|
|
11586
|
+
setPendingDrop(null);
|
|
11587
|
+
setDropError(null);
|
|
11588
|
+
try {
|
|
11589
|
+
await updateEvent(occurrence, toDropInput(occurrence, period, viewerTimeZone, scope), scope);
|
|
11590
|
+
} catch (caught) {
|
|
11591
|
+
setDropError(getErrorMessage(caught, i18n.m));
|
|
11592
|
+
} finally {
|
|
11593
|
+
setDragPreview(null);
|
|
11594
|
+
}
|
|
11595
|
+
};
|
|
11596
|
+
const handleDrop = (occurrence, period) => {
|
|
11597
|
+
setDragPreview({
|
|
11598
|
+
occurrenceKey: occurrence.occurrenceKey,
|
|
11599
|
+
period
|
|
11600
|
+
});
|
|
11601
|
+
const options = getScopeOptions(occurrence);
|
|
11602
|
+
if (options.length > 1) setPendingDrop({
|
|
11603
|
+
occurrence,
|
|
11604
|
+
period,
|
|
11605
|
+
options
|
|
11606
|
+
});
|
|
11607
|
+
else saveDrop(occurrence, period, options[0]);
|
|
11608
|
+
};
|
|
11609
|
+
useEventDrag({
|
|
11610
|
+
containerRef: mainRef,
|
|
11611
|
+
enabled: canCreate,
|
|
11612
|
+
occurrences: occurrencesByKey,
|
|
11613
|
+
onPreview: setDragPreview,
|
|
11614
|
+
onDrop: handleDrop
|
|
11615
|
+
});
|
|
11437
11616
|
const handleDelete = async (scope) => {
|
|
11438
11617
|
if (!eventToDelete) return;
|
|
11439
11618
|
await deleteEvent(eventToDelete, scope);
|
|
@@ -11442,56 +11621,73 @@ function Calendar({ calendarIds, targetCalendarId, canCreate = true, eventSource
|
|
|
11442
11621
|
};
|
|
11443
11622
|
const ViewComponent = VIEW_COMPONENTS[view];
|
|
11444
11623
|
const editorSource = editor?.occurrence ? eventSources.get(editor.occurrence.calendarId) : void 0;
|
|
11445
|
-
return /* @__PURE__ */
|
|
11624
|
+
return /* @__PURE__ */ jsx(EventSourcesContext, {
|
|
11446
11625
|
value: eventSources,
|
|
11447
|
-
children:
|
|
11448
|
-
|
|
11449
|
-
|
|
11450
|
-
|
|
11451
|
-
|
|
11452
|
-
|
|
11453
|
-
|
|
11454
|
-
|
|
11455
|
-
|
|
11456
|
-
|
|
11457
|
-
|
|
11458
|
-
|
|
11459
|
-
|
|
11460
|
-
|
|
11461
|
-
|
|
11462
|
-
|
|
11463
|
-
|
|
11464
|
-
|
|
11465
|
-
|
|
11466
|
-
|
|
11467
|
-
|
|
11468
|
-
|
|
11469
|
-
|
|
11470
|
-
|
|
11471
|
-
|
|
11472
|
-
|
|
11473
|
-
|
|
11474
|
-
|
|
11475
|
-
|
|
11476
|
-
|
|
11477
|
-
|
|
11478
|
-
|
|
11626
|
+
children: /* @__PURE__ */ jsxs(DraggingEventContext, {
|
|
11627
|
+
value: dragPreview?.occurrenceKey ?? null,
|
|
11628
|
+
children: [
|
|
11629
|
+
/* @__PURE__ */ jsx(CalendarHeader, {
|
|
11630
|
+
view,
|
|
11631
|
+
title,
|
|
11632
|
+
subtitle,
|
|
11633
|
+
onViewChange: setView,
|
|
11634
|
+
onPrevious: previous,
|
|
11635
|
+
onNext: next,
|
|
11636
|
+
onToday: goToToday,
|
|
11637
|
+
onCreateEvent: canCreate ? () => openCreate(view === "day" ? anchor : today, now.getHours()) : void 0,
|
|
11638
|
+
context: headerContext,
|
|
11639
|
+
accessory: headerAccessory
|
|
11640
|
+
}),
|
|
11641
|
+
/* @__PURE__ */ jsx(ErrorMessage, {
|
|
11642
|
+
message: error,
|
|
11643
|
+
className: "textCenter"
|
|
11644
|
+
}),
|
|
11645
|
+
/* @__PURE__ */ jsx(ErrorMessage, {
|
|
11646
|
+
message: dropError,
|
|
11647
|
+
className: "textCenter"
|
|
11648
|
+
}),
|
|
11649
|
+
/* @__PURE__ */ jsx("main", {
|
|
11650
|
+
ref: mainRef,
|
|
11651
|
+
className: "main scrollArea",
|
|
11652
|
+
"data-view": view,
|
|
11653
|
+
children: /* @__PURE__ */ jsx(ViewComponent, {
|
|
11654
|
+
anchor,
|
|
11655
|
+
dates,
|
|
11656
|
+
today,
|
|
11657
|
+
currentMinutes: now.getHours() * 60 + now.getMinutes(),
|
|
11658
|
+
segmentsByDate,
|
|
11659
|
+
canCreate,
|
|
11660
|
+
onCreate: openCreate,
|
|
11661
|
+
onCreateRange: openCreateRange,
|
|
11662
|
+
onCreateAllDay: openCreateAllDay,
|
|
11663
|
+
onEventSelect: openEdit,
|
|
11664
|
+
onShowDay: (date) => show("day", date),
|
|
11665
|
+
onShowMonth: (date) => show("month", date)
|
|
11666
|
+
})
|
|
11667
|
+
}),
|
|
11668
|
+
editor && /* @__PURE__ */ jsx(EventModal, {
|
|
11669
|
+
initialValue: editor.initialValue,
|
|
11670
|
+
occurrence: editor.occurrence,
|
|
11671
|
+
notice: editorSource && i18n.m.calendar.sharedEventNotice(getSourceText(editorSource, i18n)),
|
|
11672
|
+
onSave: handleSave,
|
|
11673
|
+
onDelete: editor.occurrence ? () => setEventToDelete(editor.occurrence) : void 0,
|
|
11674
|
+
onClose: () => setEditor(null)
|
|
11675
|
+
}, editor.occurrence?.occurrenceKey ?? "new"),
|
|
11676
|
+
pendingDrop && /* @__PURE__ */ jsx(RecurrenceScopeModal, {
|
|
11677
|
+
options: pendingDrop.options,
|
|
11678
|
+
onSelect: (scope) => void saveDrop(pendingDrop.occurrence, pendingDrop.period, scope),
|
|
11679
|
+
onClose: () => {
|
|
11680
|
+
setPendingDrop(null);
|
|
11681
|
+
setDragPreview(null);
|
|
11682
|
+
}
|
|
11683
|
+
}),
|
|
11684
|
+
eventToDelete && /* @__PURE__ */ jsx(DeleteEventModal, {
|
|
11685
|
+
occurrence: eventToDelete,
|
|
11686
|
+
onConfirm: handleDelete,
|
|
11687
|
+
onClose: () => setEventToDelete(null)
|
|
11479
11688
|
})
|
|
11480
|
-
|
|
11481
|
-
|
|
11482
|
-
initialValue: editor.initialValue,
|
|
11483
|
-
occurrence: editor.occurrence,
|
|
11484
|
-
notice: editorSource && i18n.m.calendar.sharedEventNotice(getSourceText(editorSource, i18n)),
|
|
11485
|
-
onSave: handleSave,
|
|
11486
|
-
onDelete: editor.occurrence ? () => setEventToDelete(editor.occurrence) : void 0,
|
|
11487
|
-
onClose: () => setEditor(null)
|
|
11488
|
-
}, editor.occurrence?.occurrenceKey ?? "new"),
|
|
11489
|
-
eventToDelete && /* @__PURE__ */ jsx(DeleteEventModal, {
|
|
11490
|
-
occurrence: eventToDelete,
|
|
11491
|
-
onConfirm: handleDelete,
|
|
11492
|
-
onClose: () => setEventToDelete(null)
|
|
11493
|
-
})
|
|
11494
|
-
]
|
|
11689
|
+
]
|
|
11690
|
+
})
|
|
11495
11691
|
});
|
|
11496
11692
|
}
|
|
11497
11693
|
|
|
@@ -11633,6 +11829,30 @@ function GeneralSection({ calendar }) {
|
|
|
11633
11829
|
});
|
|
11634
11830
|
}
|
|
11635
11831
|
|
|
11832
|
+
// src/features/calendars/components/settings/RoleOverview.tsx
|
|
11833
|
+
function RoleOverview() {
|
|
11834
|
+
const { m } = useI18n();
|
|
11835
|
+
const root = useRootElement();
|
|
11836
|
+
const { roles, roleDescriptions, roleOverview } = m.calendars;
|
|
11837
|
+
return /* @__PURE__ */ jsxs("details", {
|
|
11838
|
+
className: "roleOverview",
|
|
11839
|
+
open: !isCompactWidth(root.clientWidth),
|
|
11840
|
+
children: [/* @__PURE__ */ jsx("summary", {
|
|
11841
|
+
className: "roleOverviewTitle",
|
|
11842
|
+
children: roleOverview
|
|
11843
|
+
}), /* @__PURE__ */ jsx("ul", {
|
|
11844
|
+
className: "roleOverviewList",
|
|
11845
|
+
children: TEAM_ROLES.map((role) => /* @__PURE__ */ jsxs("li", { children: [/* @__PURE__ */ jsx("span", {
|
|
11846
|
+
className: "roleOverviewName",
|
|
11847
|
+
children: roles[role]
|
|
11848
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
11849
|
+
className: "roleOverviewText",
|
|
11850
|
+
children: roleDescriptions[role]
|
|
11851
|
+
})] }, role))
|
|
11852
|
+
})]
|
|
11853
|
+
});
|
|
11854
|
+
}
|
|
11855
|
+
|
|
11636
11856
|
// src/features/calendars/components/settings/MembersSection.tsx
|
|
11637
11857
|
function MemberRow({ member, isSelf, canManage, roles, onChangeRole, onRemove }) {
|
|
11638
11858
|
const { m } = useI18n();
|
|
@@ -11683,6 +11903,7 @@ function MembersSection({ calendar, members, error, currentUserId, onChangeRole,
|
|
|
11683
11903
|
return /* @__PURE__ */ jsxs(PageSection, {
|
|
11684
11904
|
title: text.title,
|
|
11685
11905
|
description: text.description,
|
|
11906
|
+
aside: /* @__PURE__ */ jsx(RoleOverview, {}),
|
|
11686
11907
|
children: [
|
|
11687
11908
|
/* @__PURE__ */ jsx(ErrorMessage, { message: error }),
|
|
11688
11909
|
/* @__PURE__ */ jsx("ul", {
|
|
@@ -12243,6 +12464,7 @@ function CalendarSwitcherModal({ onClose }) {
|
|
|
12243
12464
|
const { m } = useI18n();
|
|
12244
12465
|
const { switcher } = m.calendars;
|
|
12245
12466
|
const { calendars, invitations, activeCalendar, selectCalendar } = useCalendars();
|
|
12467
|
+
const { user } = useAuth();
|
|
12246
12468
|
const personal = calendars.filter(isPersonalCalendar);
|
|
12247
12469
|
const teams = calendars.filter((calendar) => !isPersonalCalendar(calendar));
|
|
12248
12470
|
const renderCards = (list, extra) => /* @__PURE__ */ jsxs("ul", {
|
|
@@ -12270,13 +12492,13 @@ function CalendarSwitcherModal({ onClose }) {
|
|
|
12270
12492
|
children: switcher.personal
|
|
12271
12493
|
}), renderCards(personal)]
|
|
12272
12494
|
}),
|
|
12273
|
-
invitations.length > 0 && /* @__PURE__ */ jsxs("p", {
|
|
12495
|
+
user?.emailVerified && invitations.length > 0 && /* @__PURE__ */ jsxs("p", {
|
|
12274
12496
|
className: "formHint",
|
|
12275
12497
|
children: [
|
|
12276
12498
|
switcher.openInvitations(invitations.length),
|
|
12277
12499
|
" ",
|
|
12278
12500
|
/* @__PURE__ */ jsx(Link, {
|
|
12279
|
-
to:
|
|
12501
|
+
to: SETTINGS_INVITATIONS_PATH,
|
|
12280
12502
|
onClick: onClose,
|
|
12281
12503
|
children: switcher.view
|
|
12282
12504
|
})
|
|
@@ -12541,16 +12763,18 @@ function SegmentedField({ label, ...controlProps }) {
|
|
|
12541
12763
|
|
|
12542
12764
|
// src/features/preferences/components/PreferencesSettings.tsx
|
|
12543
12765
|
function PreferencesSettings() {
|
|
12544
|
-
const { m } = useI18n();
|
|
12766
|
+
const { m, languages } = useI18n();
|
|
12545
12767
|
const { preferences, updatePreferences } = usePreferences();
|
|
12546
12768
|
const { run, error } = useAsyncAction(updatePreferences);
|
|
12547
12769
|
const themeOptions = THEMES$1.map((theme) => ({
|
|
12548
12770
|
value: theme,
|
|
12549
12771
|
label: m.themes[theme]
|
|
12550
12772
|
}));
|
|
12551
|
-
const
|
|
12773
|
+
const choices = getLocaleChoices(languages);
|
|
12774
|
+
if (!choices.includes(preferences.locale)) choices.push(preferences.locale);
|
|
12775
|
+
const languageOptions = choices.map((choice) => ({
|
|
12552
12776
|
value: choice,
|
|
12553
|
-
label: m.settings.
|
|
12777
|
+
label: choice === "auto" ? m.settings.languageAuto : getLocaleName(choice)
|
|
12554
12778
|
}));
|
|
12555
12779
|
const viewOptions = getViewOptions(m);
|
|
12556
12780
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
@@ -12644,15 +12868,23 @@ function CalendarPage() {
|
|
|
12644
12868
|
function SettingsPage() {
|
|
12645
12869
|
const { m } = useI18n();
|
|
12646
12870
|
const { enabled, method, user } = useAuth();
|
|
12871
|
+
const { teams } = useHost();
|
|
12872
|
+
const { invitations } = useCalendars();
|
|
12647
12873
|
const tabs = [{
|
|
12648
12874
|
value: "calendars",
|
|
12649
12875
|
label: m.settings.tabs.calendars,
|
|
12650
12876
|
content: /* @__PURE__ */ jsx(CalendarSettings, {})
|
|
12651
|
-
}
|
|
12877
|
+
}];
|
|
12878
|
+
if (teams && user?.emailVerified) tabs.push({
|
|
12879
|
+
value: "invitations",
|
|
12880
|
+
label: m.calendars.settings.withCount(m.settings.tabs.invitations, invitations.length),
|
|
12881
|
+
content: /* @__PURE__ */ jsx(InvitationList, {})
|
|
12882
|
+
});
|
|
12883
|
+
tabs.push({
|
|
12652
12884
|
value: "appearance",
|
|
12653
12885
|
label: m.settings.tabs.appearance,
|
|
12654
12886
|
content: /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(PreferencesSettings, {}), /* @__PURE__ */ jsx(CustomColorSettings, {})] })
|
|
12655
|
-
}
|
|
12887
|
+
});
|
|
12656
12888
|
if (enabled && user && method === "password") tabs.push({
|
|
12657
12889
|
value: "account",
|
|
12658
12890
|
label: m.settings.tabs.account,
|
|
@@ -12822,7 +13054,7 @@ var DEFAULT_CONFIG = {
|
|
|
12822
13054
|
};
|
|
12823
13055
|
|
|
12824
13056
|
// src/assets/css/index.css?inline
|
|
12825
|
-
var css_default = ":host{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light dark;--font-family:\"Segoe UI\", Tahoma, Geneva, Verdana, sans-serif;--font-size-xs:10px;--font-size-sm:12px;--font-size-md:14px;--font-size-base:15px;--font-size-lg:20px;--font-size-xl:22px;--color-bg:var(--lightningcss-light,#fff)var(--lightningcss-dark,#16171a);--color-surface:var(--lightningcss-light,#fff)var(--lightningcss-dark,#1e1f23);--color-surface-hover:var(--lightningcss-light,#eee)var(--lightningcss-dark,#2a2b30);--color-grid:var(--lightningcss-light,#cecece)var(--lightningcss-dark,#3a3b40);--color-muted:var(--lightningcss-light,#777)var(--lightningcss-dark,#9a9a9f);--color-text:var(--lightningcss-light,#222)var(--lightningcss-dark,#e6e6e6);--color-heading:var(--lightningcss-light,#5e5b5b)var(--lightningcss-dark,#b9b6b6);--color-on-accent:#fff;--color-on-yellow:var(--lightningcss-light,#222)var(--lightningcss-dark,#1a1a1a);--color-red:var(--lightningcss-light,#be230f)var(--lightningcss-dark,#e2503c);--color-blue:var(--lightningcss-light,#365caf)var(--lightningcss-dark,#628ce6);--color-green:var(--lightningcss-light,#158115)var(--lightningcss-dark,#34aa52);--color-yellow:var(--lightningcss-light,#e9e504)var(--lightningcss-dark,#e6d228);--color-grey:var(--lightningcss-light,#5e5b5b)var(--lightningcss-dark,#969393);--shadow-color:var(--lightningcss-light,#5705054d)var(--lightningcss-dark,#0009);--shadow:0 0 20px var(--shadow-color);--focus-ring:0 0 0 2px var(--color-blue);--radius-sm:4px;--radius-md:10px;--radius-pill:25px;--radius-round:50%;--space-1:2px;--space-2:5px;--space-3:10px;--space-4:20px;--space-5:25px;--slot-height:30px;--time-column-width:100px;--day-column-min-width:110px;--column-header-height:60px;--transition-fast:80ms linear;--transition-base:.2s ease-in}@media (prefers-color-scheme:dark){:host{--lightningcss-light: ;--lightningcss-dark:initial}}.calendarRoot[data-theme=light]{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light}.calendarRoot[data-theme=dark]{--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}*,:before,:after{box-sizing:border-box;margin:0;padding:0}:host{-webkit-text-size-adjust:100%;display:block}.calendarRoot{height:100%;font-family:var(--font-family);font-size:var(--font-size-base);color:var(--color-text);background-color:var(--color-bg);transition:background-color var(--transition-base), color var(--transition-base);line-height:1.4;overflow:auto;container:calendar/inline-size}.calendarRoot:focus{outline:none}h1,h2,h3{color:var(--color-heading);font-weight:550;line-height:1.2}a{color:var(--color-blue);text-decoration:none}a:hover{text-decoration:underline}img,svg{max-width:100%;display:block}button,input,textarea,select{font-family:inherit;font-size:inherit;color:inherit;background:0 0;border:none;outline:none}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.5}:focus-visible{box-shadow:var(--focus-ring);outline:none}::selection{background-color:var(--color-blue);color:var(--color-on-accent)}@media (prefers-reduced-motion:reduce){*,:before,:after{transition-duration:.01ms!important;animation-duration:.01ms!important}}.app{flex-direction:column;min-height:100%;display:flex}.main{flex-direction:column;flex:1;min-width:0;display:flex}.scrollArea{scrollbar-color:var(--color-grid) transparent;overflow:auto}.header{align-items:center;gap:var(--space-3);padding:var(--space-4);grid-template-columns:1fr auto 1fr;grid-template-areas:\"nav title actions\";display:grid}.headerNav{align-items:center;gap:var(--space-2);font-size:var(--font-size-xl);grid-area:nav;display:flex}.headerCenter{align-items:center;gap:var(--space-1);flex-direction:column;grid-area:title;min-width:0;display:flex}.headerTitle{justify-content:center;align-items:baseline;gap:0 var(--space-3);text-align:center;flex-wrap:wrap;display:flex}.headerSubtitle{font-size:var(--font-size-base);color:var(--color-muted);font-weight:400}.headerCreate{align-items:center;gap:var(--space-2);display:flex}.headerActions{justify-content:flex-end;align-items:center;gap:var(--space-3);grid-area:actions;display:flex}.page{min-height:100%;padding:var(--space-4);place-items:center;display:grid}.pageCard{gap:var(--space-4);width:min(420px,100%);padding:var(--space-5);flex-direction:column;display:flex}.pageBack{font-size:var(--font-size-md);align-self:flex-start}.pageTitle{font-size:1.75rem}.pageFooter{font-size:var(--font-size-md);color:var(--color-muted);text-align:center}.pageFull{flex-direction:column;min-height:100%;display:flex}.pageHeader{gap:var(--space-2);padding:var(--space-4);border-bottom:1px solid var(--color-grid);flex-direction:column;display:flex}.pageContent{width:100%;padding:0 var(--space-4) var(--space-5);flex:1}.pageSection{gap:var(--space-3) var(--space-5);padding:var(--space-5) 0;grid-template-columns:minmax(200px,1fr) minmax(0,2fr);display:grid}.pageSection+.pageSection{border-top:1px solid var(--color-grid)}.pageSectionIntro,.pageSectionBody{gap:var(--space-3);flex-direction:column;display:flex}.pageSectionBody{max-width:720px}.pageSectionTitle{font-size:var(--font-size-lg)}.pageSection--danger .pageSectionTitle{color:var(--color-red)}.pageFull:has(.tabList) .pageHeader{border-bottom:none;padding-bottom:0}.tabList{z-index:2;gap:var(--space-1);margin:0 calc(-1 * var(--space-4));padding:0 var(--space-4);border-bottom:1px solid var(--color-grid);background-color:var(--color-bg);scrollbar-width:none;display:flex;position:sticky;top:0;overflow-x:auto}.tab{padding:var(--space-3) var(--space-4);color:var(--color-muted);transition:color var(--transition-fast), border-color var(--transition-fast);border-bottom:3px solid #0000;flex:none;font-weight:600}.tab:hover,.tab:focus-visible{color:var(--color-text)}.tab.active{border-bottom-color:var(--color-blue);color:var(--color-text)}.itemList{flex-direction:column;list-style:none;display:flex}.itemRow{align-items:center;gap:var(--space-3);padding:var(--space-2) 0;display:flex}.itemRow+.itemRow{border-top:1px solid var(--color-grid)}.itemRowMain{flex-direction:column;flex:1;min-width:0;display:flex}.itemRowTitle{overflow-wrap:anywhere;font-weight:600}.itemRowMeta{font-size:var(--font-size-sm);color:var(--color-muted)}.badge{padding:0 var(--space-3);border-radius:var(--radius-pill);background-color:var(--color-surface-hover);color:var(--color-muted);font-size:var(--font-size-sm);vertical-align:1px;font-weight:600;display:inline-block}.badge--success{background-color:color-mix(in srgb, var(--color-green) 18%, transparent);color:var(--color-green)}.settingValue{align-items:center;gap:var(--space-2) var(--space-3);overflow-wrap:anywhere;flex-wrap:wrap;display:flex}@container calendar (width<=900px){.header{grid-template-columns:auto 1fr;grid-template-areas:\"nav actions\"\"title title\"}.headerActions{justify-self:end}}@container calendar (width<=700px){.header{padding:var(--space-3);grid-template-columns:1fr auto;grid-template-areas:\"nav create\"\"title title\"\"views views\"}.headerActions{display:contents}.headerActions .segmentedControl{grid-area:views}.headerCreate{grid-area:create}.headerTitle,.headerNav{font-size:var(--font-size-lg)}.page{padding:var(--space-3);place-items:start center}.pageCard.surface{padding:var(--space-4);box-shadow:none}.pageHeader{padding:var(--space-3)}.pageContent{padding:0 var(--space-3) var(--space-4)}.tabList{margin:0 calc(-1 * var(--space-3));padding:0 var(--space-3)}.tab{padding:var(--space-3)}.pageSection{padding:var(--space-4) 0;grid-template-columns:minmax(0,1fr)}}.button{justify-content:center;align-items:center;gap:var(--space-2);padding:var(--space-3) var(--space-4);border-radius:var(--radius-pill);background-color:var(--color-blue);color:var(--color-on-accent);transition:opacity var(--transition-fast);font-weight:600;display:inline-flex}.button:hover,.button:focus-visible{opacity:.8}.button--danger{background-color:var(--color-red)}.button--success{background-color:var(--color-green)}.button--secondary{background-color:var(--color-grey)}.button--outline{border:1px solid var(--color-grid);color:var(--color-text);background-color:#0000}.button--block{width:100%}.iconButton{width:30px;height:30px;margin:0 var(--space-2);border:3px solid var(--color-muted);border-radius:var(--radius-round);color:var(--color-muted);transition:color var(--transition-fast), border-color var(--transition-fast);place-items:center;font-size:16px;line-height:1;display:inline-grid}.iconButton:hover,.iconButton:focus-visible{color:var(--color-text);border-color:var(--color-text)}.iconButton--plain{width:auto;height:auto;font-size:inherit;border:none}.todayButton{padding:var(--space-2) var(--space-3);font-size:var(--font-size-base)}.segmentedControl{border:1px solid var(--color-grid);border-radius:var(--radius-pill);padding:2px;display:inline-flex}.segment{padding:var(--space-2) var(--space-3);border-radius:var(--radius-pill);color:var(--color-muted);font-size:var(--font-size-md);transition:background-color var(--transition-fast), color var(--transition-fast);flex:1;font-weight:600}.segment:hover{color:var(--color-text)}.segment.active{background-color:var(--color-blue);color:var(--color-on-accent)}.closeButton{color:var(--color-muted);font-size:28px;font-weight:700;line-height:1}.closeButton:hover,.closeButton:focus-visible{color:var(--color-text)}.formSection{gap:var(--space-4);flex-direction:column;display:flex}.formSection .formSection{gap:var(--space-3)}.formRow{gap:var(--space-4);flex-wrap:wrap;display:flex}.formRow .field{flex:1;min-width:120px}.field{gap:var(--space-2);flex-direction:column;display:flex}fieldset.field{border:none;min-width:0}.label{font-weight:700}.formHint{font-size:var(--font-size-md);color:var(--color-muted)}.input{padding:var(--space-1) 1px;border-bottom:1px solid var(--color-grid);transition:border-color var(--transition-fast)}.input:focus{border-bottom-color:var(--color-text)}.formSection .input{width:100%}.formSection .numberInput{width:4.5em}select.input{background-color:var(--color-surface);color:var(--color-text);cursor:pointer}.inlineField{align-items:center;gap:var(--space-2);display:flex}.choiceList{align-items:center;gap:var(--space-3);flex-wrap:wrap;display:flex}.chip{border-radius:var(--radius-round);cursor:pointer;-webkit-user-select:none;user-select:none;transition:background-color var(--transition-fast), border-color var(--transition-fast);place-items:center;display:grid;position:relative}.chip:has(:focus-visible){box-shadow:var(--focus-ring)}.textarea{border:1px solid var(--color-grid);resize:vertical;width:100%;min-height:40px;transition:border-color var(--transition-fast);padding:4px}.textarea:focus{border-color:var(--color-text)}.input:focus-visible,.textarea:focus-visible{box-shadow:none}.input::placeholder,.textarea::placeholder{color:var(--color-muted)}.errorText{color:var(--color-red)}.successText{color:var(--color-green)}.formActions{justify-content:flex-end;gap:var(--space-3);flex-wrap:wrap;display:flex}.emptyHint{color:var(--color-muted);font-style:italic}.switch{align-items:center;gap:var(--space-2);font-size:var(--font-size-sm);cursor:pointer;display:inline-flex;position:relative}.switchInput{opacity:0;pointer-events:none;position:absolute}.switchTrack{border-radius:var(--radius-pill);background-color:var(--color-grid);width:34px;height:20px;transition:background-color var(--transition-fast);flex:none;position:relative}.switchTrack:after{content:\"\";border-radius:var(--radius-round);background-color:var(--color-bg);width:16px;height:16px;transition:translate var(--transition-fast);position:absolute;top:2px;left:2px;box-shadow:0 1px 2px #0000004d}.switchInput:checked+.switchTrack{background-color:var(--color-blue)}.switchInput:checked+.switchTrack:after{translate:14px}.switchInput:focus-visible+.switchTrack{box-shadow:var(--focus-ring)}.switchInput:disabled+.switchTrack,.switchInput:disabled~.switchLabel{opacity:.5}.modal{width:min(450px, calc(100vw - 2 * var(--space-4)));min-width:250px;max-height:calc(100dvh - 2 * var(--space-4));border-radius:var(--radius-md);background-color:var(--color-surface);color:var(--color-text);box-shadow:var(--shadow);border:none;margin:auto;padding:0;overflow:auto}.modal--large{width:min(860px, calc(100vw - 2 * var(--space-4)))}.modal[open]{animation:.15s ease-out modalIn}.modal::backdrop{background-color:#00000059}.modalContent{padding:var(--space-4)}.modalHeader{justify-content:space-between;align-items:flex-start;gap:var(--space-3);margin-bottom:var(--space-4);display:flex}.modalMessage{overflow-wrap:anywhere;line-height:1.5}.modalTitle{font-size:1.5rem}.modal--danger .modalTitle{color:var(--color-red);font-size:25px}.modalActions{margin:var(--space-5) 0 var(--space-3);flex-wrap:wrap;gap:12px;display:flex}.modalActions--stacked{flex-direction:column}.modalActions--split{justify-content:space-between}.modalActions--split .button{min-width:90px;padding:15px 25px;font-weight:700}@keyframes modalIn{0%{opacity:0;transform:translateY(8px)}}.calendar{border-bottom:1px solid var(--color-grid);width:100%;display:flex}.dayTime{width:var(--time-column-width);text-align:center;color:var(--color-muted);flex:none}.day{min-width:var(--day-column-min-width);border-left:1px solid var(--color-grid);flex:1}.columnHeader{width:100%;height:var(--column-header-height);padding:var(--space-2) 0;line-height:1.25;font-size:var(--font-size-lg);flex-direction:column;justify-content:center;align-items:center;display:flex;overflow:hidden}button.columnHeader:hover{background-color:var(--color-surface-hover)}.calendar--day .day{min-width:0}.day .columnHeader{border-top:1px solid var(--color-grid)}.day.currentDay .columnHeader{background-color:var(--color-surface-hover)}.dayName,.dayDisplay{text-overflow:ellipsis;white-space:nowrap;max-width:100%;overflow:hidden}.dayDisplay{font-size:var(--font-size-base);color:var(--color-muted)}.compactOnly{display:none}.slots{position:relative}.slot,.time{height:var(--slot-height);border-top:1px solid var(--color-grid)}.time{font-size:var(--font-size-md)}.slot{cursor:pointer;transition:background-color var(--transition-fast)}.slot:hover{background-color:var(--color-surface-hover)}.slots{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}.isSelecting .slot:hover{background-color:#0000}.isSelecting,.isSelecting .slot{cursor:grabbing}.slotSelection{top:calc(var(--selection-start,0) * var(--slot-height));z-index:2;height:calc(var(--selection-hours,1) * var(--slot-height));padding:var(--space-1) var(--space-2);border:2px solid var(--color-blue);border-radius:var(--radius-sm);background-color:color-mix(in srgb, var(--color-blue) 22%, transparent);pointer-events:none;position:absolute;left:1px;right:1px;overflow:hidden}.slotSelectionLabel{color:var(--color-text);font-size:var(--font-size-sm);white-space:nowrap;font-weight:600;display:block}.event{top:calc(var(--event-start,0) * var(--slot-height) / 60);left:calc(var(--event-column,0) * 100% / var(--event-columns,1) + 1px);z-index:1;width:calc(100% / var(--event-columns,1) - 2px);min-width:0;height:calc(var(--event-duration,60) * var(--slot-height) / 60);padding:var(--space-1) var(--space-2);text-align:left;border-radius:var(--radius-sm);cursor:pointer;flex-direction:column;line-height:1.25;display:flex;position:absolute;overflow:hidden}.event,.eventChip{background-color:var(--event-color,var(--color-blue));color:var(--event-text,var(--color-on-accent));transition:filter var(--transition-fast)}.event:hover,.eventChip:hover{filter:brightness(1.08)}.eventContinuesBefore{border-top-left-radius:0;border-top-right-radius:0}.eventContinuesAfter{border-bottom-right-radius:0;border-bottom-left-radius:0}.nowIndicator{top:calc(var(--now-minutes,0) * var(--slot-height) / 60);z-index:3;border-top:1px solid color-mix(in srgb, var(--color-red) 45%, transparent);pointer-events:none;height:0;position:absolute;left:0;right:0}.nowIndicator--today{border-top:2px solid var(--color-red);translate:0 -1px}.nowIndicator--today:before{content:\"\";border-radius:var(--radius-round);background-color:var(--color-red);width:10px;height:10px;position:absolute;top:-6px;left:-5px}.event:focus-visible{z-index:2}.eventName,.eventTime,.eventChip{white-space:nowrap;text-overflow:ellipsis;flex:none;overflow:hidden}.eventName{font-weight:600}.eventName svg{vertical-align:-1px;margin-right:3px;display:inline-block}.eventTime,.eventSource{font-size:var(--font-size-sm);opacity:.9}.eventSource{white-space:nowrap;text-overflow:ellipsis;flex:none;overflow:hidden}.shortEvent{padding:0 var(--space-2);font-size:var(--font-size-sm)}.veryShortEvent{padding:0 var(--space-2);font-size:var(--font-size-xs);margin-top:-1px}.monthGrid{grid-template-columns:repeat(7,minmax(0,1fr));display:grid}.monthGridWeekday{padding:var(--space-2) 0;text-align:center;font-size:var(--font-size-md);color:var(--color-muted)}.monthView{border-bottom:1px solid var(--color-grid);flex:1;grid-template-rows:auto;grid-auto-rows:minmax(110px,1fr)}.monthCell{min-width:0;padding:var(--space-1);border-top:1px solid var(--color-grid);border-left:1px solid var(--color-grid);cursor:pointer;transition:background-color var(--transition-fast);flex-direction:column;gap:2px;display:flex}.monthCell:hover{background-color:var(--color-surface-hover)}.monthCell.outsideMonth{color:var(--color-muted);opacity:.6}.dayNumber{min-width:26px;height:26px;padding:0 var(--space-1);border-radius:var(--radius-pill);font-size:var(--font-size-md);align-self:center}.dayNumber:hover{background-color:var(--color-grid)}.today .dayNumber,.miniDay.today{background-color:var(--event-color,var(--color-blue));color:var(--event-text,var(--color-on-accent))}.monthCellEvents{flex-direction:column;gap:2px;min-width:0;display:flex}.eventChip{width:100%;padding:1px var(--space-2);border-radius:var(--radius-sm);font-size:var(--font-size-sm);text-align:left;line-height:1.4;display:block}.eventChip.eventContinuesBefore{border-radius:0 var(--radius-sm) var(--radius-sm) 0}.eventChip.eventContinuesAfter{border-radius:var(--radius-sm) 0 0 var(--radius-sm)}.eventChip.eventContinuesBefore.eventContinuesAfter{border-radius:0}.eventChip .eventName{display:inline}.eventChipTime{margin-right:var(--space-2);opacity:.9}.moreEvents{padding:0 var(--space-2);font-size:var(--font-size-sm);color:var(--color-muted);text-align:left}.moreEvents:hover{color:var(--color-text)}.eventDots{display:none}.yearView{gap:var(--space-4);padding:var(--space-4);grid-template-columns:repeat(auto-fill,minmax(230px,1fr));display:grid}.yearMonth h2{margin-bottom:var(--space-2);font-size:var(--font-size-lg)}.yearMonthTitle{font-weight:inherit;border-radius:var(--radius-sm)}.yearMonthTitle:hover{color:var(--color-blue)}.miniMonth .monthGridWeekday{font-size:var(--font-size-xs)}.miniDay{aspect-ratio:1;border-radius:var(--radius-round);font-size:var(--font-size-sm);place-items:center;display:grid;position:relative}button.miniDay:hover{background-color:var(--color-surface-hover)}.miniDay.hasEvents:after{content:\"\";border-radius:var(--radius-round);background-color:var(--color-blue);width:4px;height:4px;position:absolute;bottom:2px;left:50%;transform:translate(-50%)}.miniDay.today.hasEvents:after{background-color:var(--color-on-accent)}@container calendar (width<=900px){.day{min-width:0}.calendar--week .dayName .compactHidden{display:none}.calendar--week .dayName .compactOnly{display:inline}}@container calendar (width<=600px){.dayTime{width:56px;font-size:var(--font-size-sm)}.day{min-width:0}.columnHeader{font-size:var(--font-size-base)}.dayDisplay{font-size:var(--font-size-sm)}.calendar--week .compactHidden{display:none}.calendar--week .compactOnly{display:inline}.calendar--week .dayTime{width:40px;font-size:var(--font-size-xs)}.calendar--week .columnHeader{padding:var(--space-1) 0}.calendar--week .dayDisplay{font-size:var(--font-size-base);color:inherit;font-weight:600}.calendar--week .event{font-size:var(--font-size-xs);padding:1px 2px;line-height:1.15}.calendar--week .slotSelectionLabel{font-size:var(--font-size-xs);white-space:normal;line-height:1.2}.calendar--week .eventName{white-space:normal;overflow-wrap:break-word;-webkit-hyphens:auto;hyphens:auto;flex:0 auto}.calendar--week .eventName svg,.calendar--week .eventTime{display:none}.calendar--day .dayTime{width:48px}.monthView{grid-auto-rows:minmax(64px,1fr)}.monthCellEvents{display:none}.eventDots{border-radius:var(--radius-pill);background-color:var(--color-blue);min-width:18px;color:var(--color-on-accent);font-size:var(--font-size-xs);text-align:center;align-self:center;padding:0 4px;display:block}.yearView{gap:var(--space-3);padding:var(--space-3);grid-template-columns:repeat(auto-fill,minmax(150px,1fr))}.yearMonth h2{font-size:var(--font-size-base)}}.eventDescription{height:120px}.color{border:5px solid var(--color-surface);box-sizing:content-box;background-color:var(--event-color,var(--color-blue));width:20px;height:20px}.color.active,.color:hover{border-color:var(--color-grid)}.colorAdd{background:linear-gradient(var(--color-on-accent), var(--color-on-accent)) center / 10px 2px no-repeat, linear-gradient(var(--color-on-accent), var(--color-on-accent)) center / 2px 10px no-repeat, var(--color-grey)}.weekday{border:1px solid var(--color-grid);width:34px;height:34px;font-size:var(--font-size-md)}.weekday:hover{border-color:var(--color-text)}.weekday.active{border-color:var(--color-blue);background-color:var(--color-blue);color:var(--color-on-accent)}.colorSwatch{border-radius:var(--radius-round);background-color:var(--event-color,var(--color-blue));flex:none;width:22px;height:22px}.colorCode{font-family:ui-monospace,monospace}.itemRow .iconButton{font-size:var(--font-size-lg)}.eventNotice{padding:var(--space-2) var(--space-3);border-radius:var(--radius-sm);background-color:var(--color-surface-hover);margin:0}.calendarGroup{gap:var(--space-2);flex-direction:column;display:flex}.calendarGroupTitle{font-size:var(--font-size-md);color:var(--color-muted);text-transform:uppercase;letter-spacing:.04em;font-weight:600}.calendarCards{gap:var(--space-4);grid-template-columns:repeat(auto-fill,minmax(190px,1fr));list-style:none;display:grid}.calendarCard{gap:var(--space-3);width:100%;padding:var(--space-3);border:2px solid var(--color-grid);border-radius:var(--radius-md);text-align:left;transition:border-color var(--transition-fast), background-color var(--transition-fast);flex-direction:column;display:flex;position:relative}.calendarCard:hover{background-color:var(--color-surface-hover)}.calendarCard.active{border-color:var(--color-blue)}.calendarPreview{border:1px solid var(--color-grid);border-radius:var(--radius-sm);background-color:var(--color-bg);overflow:hidden}.calendarPreviewHeader{padding:var(--space-1) var(--space-2);background-color:var(--event-color,var(--color-blue));color:var(--event-text,var(--color-on-accent));font-size:var(--font-size-sm);font-weight:600}.calendarPreviewMonth{padding:var(--space-2);row-gap:1px}.calendarPreviewMonth .monthGridWeekday{padding:0;font-size:9px}.calendarPreviewMonth .miniDay{font-size:var(--font-size-xs);color:var(--color-muted)}.calendarPreviewMonth .miniDay.today{color:var(--event-text,var(--color-on-accent));font-weight:700}.calendarCardInfo{flex-direction:column;display:flex}.calendarCardName{overflow-wrap:anywhere;font-weight:600}.calendarCardMeta{font-size:var(--font-size-sm);color:var(--color-muted)}.calendarCardBadge{top:var(--space-2);right:var(--space-2);border-radius:var(--radius-round);background-color:var(--color-blue);width:24px;height:24px;color:var(--color-on-accent);font-size:var(--font-size-sm);place-items:center;font-weight:700;display:grid;position:absolute}.calendarSettingList{gap:var(--space-4);flex-direction:column;list-style:none;display:flex}.calendarSettingCard{gap:var(--space-4);padding:var(--space-4) var(--space-5);border:1px solid var(--color-grid);border-radius:var(--radius-md);background-color:var(--color-surface);flex-direction:column;display:flex}.calendarSettingHeader{align-items:center;gap:var(--space-3);display:flex}.calendarSettingHeader .itemRowMain{flex:1}.calendarSettingHeader .itemRowTitle{font-size:var(--font-size-lg)}.calendarSettingBody{gap:var(--space-3);padding-top:var(--space-4);border-top:1px solid var(--color-grid);flex-direction:column;display:flex}.calendarSettingBody .switch{font-size:var(--font-size-base)}.colorSwatch--large{width:32px;height:32px}.calendarCardNew{min-height:100%;color:var(--color-muted);border-style:dashed;justify-content:center;align-items:center;text-decoration:none}.calendarCardNew:hover{color:var(--color-blue);border-color:var(--color-blue)}.wizard{gap:var(--space-5);max-width:760px;margin:var(--space-5) auto 0;flex-direction:column;display:flex}.wizardPanel{gap:var(--space-4);padding:var(--space-5);border:1px solid var(--color-grid);border-radius:var(--radius-md);background-color:var(--color-surface)}.wizardHeader{gap:var(--space-1);flex-direction:column;display:flex}.wizardStepCount{font-size:var(--font-size-sm);color:var(--color-blue);font-weight:600}.wizardTitle{font-size:var(--font-size-lg)}.wizardActions{justify-content:flex-end;gap:var(--space-3);padding-top:var(--space-4);border-top:1px solid var(--color-grid);display:flex}.wizardSplit{align-items:start;gap:var(--space-5);grid-template-columns:minmax(0,1fr) 220px;display:grid}.inviteRow{align-items:flex-end}.inviteAdd{flex:none}.summaryList{gap:var(--space-2) var(--space-4);grid-template-columns:max-content minmax(0,1fr);display:grid}.summaryList dt{color:var(--color-muted)}.summaryList dd{overflow-wrap:anywhere}.summaryInvitations{list-style:none}.stepper{list-style:none;display:flex}.step{flex:1;justify-content:center;display:flex;position:relative}.step+.step:before{content:\"\";background-color:var(--color-grid);height:2px;margin:0 22px;position:absolute;top:14px;left:-50%;right:50%}.step--done+.step:before,.step--done+.step--current:before{background-color:var(--color-blue)}.stepContent{align-items:center;gap:var(--space-2);color:var(--color-muted);font-size:var(--font-size-sm);flex-direction:column;font-weight:600;display:flex;position:relative}button.stepContent:hover .stepLabel{color:var(--color-blue)}.stepNumber{border:2px solid var(--color-grid);border-radius:var(--radius-round);background-color:var(--color-bg);place-items:center;width:28px;height:28px;display:grid}.step--done .stepNumber{border-color:var(--color-blue);color:var(--color-blue)}.step--current .stepNumber{border-color:var(--color-blue);background-color:var(--color-blue);color:var(--color-on-accent)}.step--current .stepContent{color:var(--color-text)}@container calendar (width<=700px){.wizard{margin-top:var(--space-4)}.wizardPanel{padding:var(--space-4)}.wizardSplit{grid-template-columns:minmax(0,1fr)}.inviteRow{flex-wrap:wrap}.step:not(.step--current) .stepLabel{display:none}.calendarSettingCard{padding:var(--space-4)}.calendarCards{gap:var(--space-3);grid-template-columns:repeat(2,minmax(0,1fr))}.calendarCard{padding:var(--space-2)}.calendarPreviewMonth .monthGridWeekday{font-size:8px}.calendarPreviewMonth .miniDay{font-size:9px}}.activeCalendar{align-items:center;gap:var(--space-2);max-width:100%;padding:var(--space-1) var(--space-3);border:1px solid color-mix(in srgb, var(--event-color,var(--color-blue)) 45%, transparent);border-radius:var(--radius-pill);background-color:color-mix(in srgb, var(--event-color,var(--color-blue)) 12%, var(--color-bg));font-size:var(--font-size-sm);margin:0;line-height:1.4;display:inline-flex}.activeCalendarDot{border-radius:var(--radius-round);background-color:var(--event-color,var(--color-blue));flex:none;width:10px;height:10px}.activeCalendarName{text-overflow:ellipsis;white-space:nowrap;font-weight:600;overflow:hidden}.activeCalendarMeta{color:var(--color-muted);flex:none}.memberRow{flex-wrap:wrap}.memberRole{width:auto;min-width:10rem}.dangerAction{justify-content:space-between;align-items:center;gap:var(--space-4);display:flex}.dangerAction>.button{white-space:nowrap;flex:none}.dangerAction+.dangerAction{padding-top:var(--space-4);border-top:1px solid var(--color-grid)}@container calendar (width<=700px){.dangerAction{flex-direction:column;align-items:stretch}.memberRow .itemRowMain{flex-basis:100%}.memberRole{flex:1}}.memberPicker{gap:var(--space-2);flex-direction:column;max-height:min(50vh,22rem);margin:0;padding:0;list-style:none;display:flex;overflow-y:auto}.memberOption{align-items:center;gap:var(--space-3);padding:var(--space-2) var(--space-3);border:1px solid var(--color-grid);border-radius:var(--radius-sm);cursor:pointer;display:flex}.memberOption:hover{background-color:var(--color-surface-hover)}.memberOption:has(input:checked){border-color:var(--color-blue);background-color:color-mix(in srgb, var(--color-blue) 10%, transparent)}.memberOption input{accent-color:var(--color-blue);flex:none}.appLoading{min-height:100%;color:var(--color-muted);place-items:center;display:grid}.fieldToggle{font-size:var(--font-size-sm);color:var(--color-blue);flex:none}.accountLogin{padding:var(--space-2) var(--space-3);font-size:var(--font-size-md);white-space:nowrap}.accountButton{border-radius:var(--radius-round);background-color:var(--color-blue);width:32px;height:32px;color:var(--color-on-accent);place-items:center;font-weight:700;display:inline-grid}.accountPopover{inset:64px var(--space-4) auto auto;width:min(280px, calc(100vw - 2 * var(--space-4)));padding:var(--space-4);color:var(--color-text);border:none;margin:0;position:fixed}.accountPopover:popover-open{gap:var(--space-2);flex-direction:column;display:flex}.accountName{overflow-wrap:anywhere;font-weight:600}.accountEmail{margin-bottom:var(--space-2);font-size:var(--font-size-md);color:var(--color-muted);overflow-wrap:anywhere}.formLink{margin-top:calc(-1 * var(--space-3));font-size:var(--font-size-md);align-self:flex-end}.iconLink{border-radius:var(--radius-round);width:32px;height:32px;color:var(--color-muted);transition:color var(--transition-fast), background-color var(--transition-fast);place-items:center;display:inline-grid}.iconLink:hover,.iconLink:focus-visible{color:var(--color-text);background-color:var(--color-surface-hover)}.banner{justify-content:center;align-items:center;gap:var(--space-2) var(--space-4);padding:var(--space-3) var(--space-4);background-color:color-mix(in srgb, var(--color-yellow) 25%, var(--color-bg));font-size:var(--font-size-md);text-align:center;flex-wrap:wrap;display:flex}.bannerAction{padding:var(--space-2) var(--space-3);font-size:var(--font-size-md)}.color-red{--event-color:var(--color-red)}.color-blue{--event-color:var(--color-blue)}.color-green{--event-color:var(--color-green)}.color-yellow{--event-color:var(--color-yellow);--event-text:var(--color-on-yellow)}.visuallyHidden{clip:rect(0 0 0 0);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.textCenter{text-align:center}.surface{background-color:var(--color-surface);border-radius:var(--radius-md);box-shadow:var(--shadow)}";
|
|
13057
|
+
var css_default = ":host{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light dark;--font-family:\"Segoe UI\", Tahoma, Geneva, Verdana, sans-serif;--font-size-xs:10px;--font-size-sm:12px;--font-size-md:14px;--font-size-base:15px;--font-size-lg:20px;--font-size-xl:22px;--color-bg:var(--lightningcss-light,#fff)var(--lightningcss-dark,#16171a);--color-surface:var(--lightningcss-light,#fff)var(--lightningcss-dark,#1e1f23);--color-surface-hover:var(--lightningcss-light,#eee)var(--lightningcss-dark,#2a2b30);--color-grid:var(--lightningcss-light,#cecece)var(--lightningcss-dark,#3a3b40);--color-muted:var(--lightningcss-light,#777)var(--lightningcss-dark,#9a9a9f);--color-text:var(--lightningcss-light,#222)var(--lightningcss-dark,#e6e6e6);--color-heading:var(--lightningcss-light,#5e5b5b)var(--lightningcss-dark,#b9b6b6);--color-on-accent:#fff;--color-on-yellow:var(--lightningcss-light,#222)var(--lightningcss-dark,#1a1a1a);--color-red:var(--lightningcss-light,#be230f)var(--lightningcss-dark,#e2503c);--color-blue:var(--lightningcss-light,#365caf)var(--lightningcss-dark,#628ce6);--color-green:var(--lightningcss-light,#158115)var(--lightningcss-dark,#34aa52);--color-yellow:var(--lightningcss-light,#e9e504)var(--lightningcss-dark,#e6d228);--color-grey:var(--lightningcss-light,#5e5b5b)var(--lightningcss-dark,#969393);--shadow-color:var(--lightningcss-light,#5705054d)var(--lightningcss-dark,#0009);--shadow:0 0 20px var(--shadow-color);--focus-ring:0 0 0 2px var(--color-blue);--radius-sm:4px;--radius-md:10px;--radius-pill:25px;--radius-round:50%;--space-1:2px;--space-2:5px;--space-3:10px;--space-4:20px;--space-5:25px;--slot-height:30px;--all-day-row-height:22px;--time-column-width:100px;--day-column-min-width:110px;--column-header-height:60px;--transition-fast:80ms linear;--transition-base:.2s ease-in}@media (prefers-color-scheme:dark){:host{--lightningcss-light: ;--lightningcss-dark:initial}}.calendarRoot[data-theme=light]{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light}.calendarRoot[data-theme=dark]{--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}*,:before,:after{box-sizing:border-box;margin:0;padding:0}:host{-webkit-text-size-adjust:100%;display:block}.calendarRoot{height:100%;font-family:var(--font-family);font-size:var(--font-size-base);color:var(--color-text);background-color:var(--color-bg);transition:background-color var(--transition-base), color var(--transition-base);line-height:1.4;overflow:auto;container:calendar/inline-size}.calendarRoot:focus{outline:none}h1,h2,h3{color:var(--color-heading);font-weight:550;line-height:1.2}a{color:var(--color-blue);text-decoration:none}a:hover{text-decoration:underline}img,svg{max-width:100%;display:block}button,input,textarea,select{font-family:inherit;font-size:inherit;color:inherit;background:0 0;border:none;outline:none}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.5}:focus-visible{box-shadow:var(--focus-ring);outline:none}::selection{background-color:var(--color-blue);color:var(--color-on-accent)}@media (prefers-reduced-motion:reduce){*,:before,:after{transition-duration:.01ms!important;animation-duration:.01ms!important}}.app{flex-direction:column;height:100%;display:flex}.main{flex-direction:column;flex:1;min-width:0;min-height:0;display:flex}.scrollArea{scrollbar-color:var(--color-grid) transparent;overflow:auto}.header{align-items:center;gap:var(--space-3);padding:var(--space-4);grid-template-columns:1fr auto 1fr;grid-template-areas:\"nav title actions\";display:grid}.headerNav{align-items:center;gap:var(--space-2);font-size:var(--font-size-xl);grid-area:nav;display:flex}.headerCenter{align-items:center;gap:var(--space-1);flex-direction:column;grid-area:title;min-width:0;display:flex}.headerTitle{justify-content:center;align-items:baseline;gap:0 var(--space-3);text-align:center;flex-wrap:wrap;display:flex}.headerSubtitle{font-size:var(--font-size-base);color:var(--color-muted);font-weight:400}.headerCreate{align-items:center;gap:var(--space-2);display:flex}.headerActions{justify-content:flex-end;align-items:center;gap:var(--space-3);grid-area:actions;display:flex}.page{min-height:100%;padding:var(--space-4);place-items:center;display:grid}.pageCard{gap:var(--space-4);width:min(420px,100%);padding:var(--space-5);flex-direction:column;display:flex}.pageBack{font-size:var(--font-size-md);align-self:flex-start}.pageTitle{font-size:1.75rem}.pageFooter{font-size:var(--font-size-md);color:var(--color-muted);text-align:center}.pageFull{flex-direction:column;min-height:100%;display:flex}.pageHeader{gap:var(--space-2);padding:var(--space-4);border-bottom:1px solid var(--color-grid);flex-direction:column;display:flex}.pageContent{width:100%;padding:0 var(--space-4) var(--space-5);flex:1}.pageSection{gap:var(--space-3) var(--space-5);padding:var(--space-5) 0;grid-template-columns:minmax(200px,1fr) minmax(0,2fr);display:grid}.pageSection+.pageSection{border-top:1px solid var(--color-grid)}.pageSectionIntro,.pageSectionBody{gap:var(--space-3);flex-direction:column;display:flex}.roleOverview{gap:var(--space-2);margin-top:var(--space-2);flex-direction:column;display:flex}.roleOverviewTitle{font-size:var(--font-size-md);color:var(--color-text);cursor:pointer;font-weight:600}.roleOverviewList{gap:var(--space-2);font-size:var(--font-size-md);color:var(--color-muted);flex-direction:column;padding-left:1.1em;display:flex}.roleOverviewName{color:var(--color-text);font-weight:600}.roleOverviewName:after{content:\": \"}.pageSectionBody{max-width:720px}.pageSectionTitle{font-size:var(--font-size-lg)}.pageSection--danger .pageSectionTitle{color:var(--color-red)}.pageFull:has(.tabList) .pageHeader{border-bottom:none;padding-bottom:0}.tabList{z-index:2;gap:var(--space-1);margin:0 calc(-1 * var(--space-4));padding:0 var(--space-4);border-bottom:1px solid var(--color-grid);background-color:var(--color-bg);scrollbar-width:none;display:flex;position:sticky;top:0;overflow-x:auto}.tab{padding:var(--space-3) var(--space-4);color:var(--color-muted);transition:color var(--transition-fast), border-color var(--transition-fast);border-bottom:3px solid #0000;flex:none;font-weight:600}.tab:hover,.tab:focus-visible{color:var(--color-text)}.tab.active{border-bottom-color:var(--color-blue);color:var(--color-text)}.itemList{flex-direction:column;list-style:none;display:flex}.itemRow{align-items:center;gap:var(--space-3);padding:var(--space-2) 0;display:flex}.itemRow+.itemRow{border-top:1px solid var(--color-grid)}.itemRowMain{flex-direction:column;flex:1;min-width:0;display:flex}.itemRowTitle{overflow-wrap:anywhere;font-weight:600}.itemRowMeta{font-size:var(--font-size-sm);color:var(--color-muted)}.badge{padding:0 var(--space-3);border-radius:var(--radius-pill);background-color:var(--color-surface-hover);color:var(--color-muted);font-size:var(--font-size-sm);vertical-align:1px;font-weight:600;display:inline-block}.badge--success{background-color:color-mix(in srgb, var(--color-green) 18%, transparent);color:var(--color-green)}.settingValue{align-items:center;gap:var(--space-2) var(--space-3);overflow-wrap:anywhere;flex-wrap:wrap;display:flex}@container calendar (width<=900px){.header{grid-template-columns:auto 1fr;grid-template-areas:\"nav actions\"\"title title\"}.headerActions{justify-self:end}}@container calendar (width<=700px){.header{padding:var(--space-3);grid-template-columns:1fr auto;grid-template-areas:\"nav create\"\"title title\"\"views views\"}.headerActions{display:contents}.headerActions .segmentedControl{grid-area:views}.headerCreate{grid-area:create}.headerTitle,.headerNav{font-size:var(--font-size-lg)}.page{padding:var(--space-3);place-items:start center}.pageCard.surface{padding:var(--space-4);box-shadow:none}.pageHeader{padding:var(--space-3)}.pageContent{padding:0 var(--space-3) var(--space-4)}.tabList{margin:0 calc(-1 * var(--space-3));padding:0 var(--space-3)}.tab{padding:var(--space-3)}.pageSection{padding:var(--space-4) 0;grid-template-columns:minmax(0,1fr)}}.button{justify-content:center;align-items:center;gap:var(--space-2);padding:var(--space-3) var(--space-4);border-radius:var(--radius-pill);background-color:var(--color-blue);color:var(--color-on-accent);transition:opacity var(--transition-fast);font-weight:600;display:inline-flex}.button:hover,.button:focus-visible{opacity:.8}.button--danger{background-color:var(--color-red)}.button--success{background-color:var(--color-green)}.button--secondary{background-color:var(--color-grey)}.button--outline{border:1px solid var(--color-grid);color:var(--color-text);background-color:#0000}.button--block{width:100%}.iconButton{width:30px;height:30px;margin:0 var(--space-2);border:3px solid var(--color-muted);border-radius:var(--radius-round);color:var(--color-muted);transition:color var(--transition-fast), border-color var(--transition-fast);place-items:center;font-size:16px;line-height:1;display:inline-grid}.iconButton:hover,.iconButton:focus-visible{color:var(--color-text);border-color:var(--color-text)}.iconButton--plain{width:auto;height:auto;font-size:inherit;border:none}.todayButton{padding:var(--space-2) var(--space-3);font-size:var(--font-size-base)}.segmentedControl{border:1px solid var(--color-grid);border-radius:var(--radius-pill);padding:2px;display:inline-flex}.segment{padding:var(--space-2) var(--space-3);border-radius:var(--radius-pill);color:var(--color-muted);font-size:var(--font-size-md);transition:background-color var(--transition-fast), color var(--transition-fast);flex:1;font-weight:600}.segment:hover{color:var(--color-text)}.segment.active{background-color:var(--color-blue);color:var(--color-on-accent)}.closeButton{color:var(--color-muted);font-size:28px;font-weight:700;line-height:1}.closeButton:hover,.closeButton:focus-visible{color:var(--color-text)}.formSection{gap:var(--space-4);flex-direction:column;display:flex}.formSection .formSection{gap:var(--space-3)}.formRow{gap:var(--space-4);flex-wrap:wrap;display:flex}.formRow .field{flex:1;min-width:120px}.field{gap:var(--space-2);flex-direction:column;display:flex}fieldset.field{border:none;min-width:0}.label{font-weight:700}.formHint{font-size:var(--font-size-md);color:var(--color-muted)}.input{padding:var(--space-1) 1px;border-bottom:1px solid var(--color-grid);transition:border-color var(--transition-fast)}.input:focus{border-bottom-color:var(--color-text)}.formSection .input{width:100%}.formSection .numberInput{width:4.5em}select.input{background-color:var(--color-surface);color:var(--color-text);cursor:pointer}.inlineField{align-items:center;gap:var(--space-2);display:flex}.choiceList{align-items:center;gap:var(--space-3);flex-wrap:wrap;display:flex}.chip{border-radius:var(--radius-round);cursor:pointer;-webkit-user-select:none;user-select:none;transition:background-color var(--transition-fast), border-color var(--transition-fast);place-items:center;display:grid;position:relative}.chip:has(:focus-visible){box-shadow:var(--focus-ring)}.textarea{border:1px solid var(--color-grid);resize:vertical;width:100%;min-height:40px;transition:border-color var(--transition-fast);padding:4px}.textarea:focus{border-color:var(--color-text)}.input:focus-visible,.textarea:focus-visible{box-shadow:none}.input::placeholder,.textarea::placeholder{color:var(--color-muted)}.errorText{color:var(--color-red)}.successText{color:var(--color-green)}.formActions{justify-content:flex-end;gap:var(--space-3);flex-wrap:wrap;display:flex}.emptyHint{color:var(--color-muted);font-style:italic}.switch{align-items:center;gap:var(--space-2);font-size:var(--font-size-sm);cursor:pointer;display:inline-flex;position:relative}.switchInput{opacity:0;pointer-events:none;position:absolute}.switchTrack{border-radius:var(--radius-pill);background-color:var(--color-grid);width:34px;height:20px;transition:background-color var(--transition-fast);flex:none;position:relative}.switchTrack:after{content:\"\";border-radius:var(--radius-round);background-color:var(--color-bg);width:16px;height:16px;transition:translate var(--transition-fast);position:absolute;top:2px;left:2px;box-shadow:0 1px 2px #0000004d}.switchInput:checked+.switchTrack{background-color:var(--color-blue)}.switchInput:checked+.switchTrack:after{translate:14px}.switchInput:focus-visible+.switchTrack{box-shadow:var(--focus-ring)}.switchInput:disabled+.switchTrack,.switchInput:disabled~.switchLabel{opacity:.5}.modal{width:min(450px, calc(100vw - 2 * var(--space-4)));min-width:250px;max-height:calc(100dvh - 2 * var(--space-4));border-radius:var(--radius-md);background-color:var(--color-surface);color:var(--color-text);box-shadow:var(--shadow);border:none;margin:auto;padding:0;overflow:auto}.modal--large{width:min(860px, calc(100vw - 2 * var(--space-4)))}.modal[open]{animation:.15s ease-out modalIn}.modal::backdrop{background-color:#00000059}.modalContent{padding:var(--space-4)}.modalHeader{justify-content:space-between;align-items:flex-start;gap:var(--space-3);margin-bottom:var(--space-4);display:flex}.modalMessage{overflow-wrap:anywhere;line-height:1.5}.modalTitle{font-size:1.5rem}.modal--danger .modalTitle{color:var(--color-red);font-size:25px}.modalActions{margin:var(--space-5) 0 var(--space-3);flex-wrap:wrap;gap:12px;display:flex}.modalActions--stacked{flex-direction:column}.modalActions--split{justify-content:space-between}.modalActions--split .button{min-width:90px;padding:15px 25px;font-weight:700}@keyframes modalIn{0%{opacity:0;transform:translateY(8px)}}.calendar{border-bottom:1px solid var(--color-grid);width:100%;display:flex}.dayTime{width:var(--time-column-width);text-align:center;color:var(--color-muted);flex:none}.day{min-width:var(--day-column-min-width);border-left:1px solid var(--color-grid);flex:1}.columnHeader{width:100%;height:var(--column-header-height);padding:var(--space-2) 0;line-height:1.25;font-size:var(--font-size-lg);flex-direction:column;justify-content:center;align-items:center;display:flex;overflow:hidden}button.columnHeader:hover{background-color:var(--color-surface-hover)}.calendar--day .day{min-width:0}.day .columnHeader{border-top:1px solid var(--color-grid)}.day.currentDay .columnHeader{background-color:var(--color-surface-hover)}.dayName,.dayDisplay{text-overflow:ellipsis;white-space:nowrap;max-width:100%;overflow:hidden}.dayDisplay{font-size:var(--font-size-base);color:var(--color-muted)}.compactOnly{display:none}.slots{position:relative}.allDayLane{grid-template-rows:repeat(var(--all-day-rows,1), var(--all-day-row-height));min-height:calc(var(--all-day-rows,1) * (var(--all-day-row-height) + 2px) + 4px);border-top:1px solid var(--color-grid);cursor:pointer;grid-template-columns:minmax(0,1fr);row-gap:2px;padding:2px 0;display:grid}.day .allDayLane:hover{background-color:var(--color-surface-hover)}.allDayLabel{font-size:var(--font-size-sm);cursor:default;justify-content:center;align-items:center;display:flex}.allDayLane .eventChip{white-space:nowrap;text-overflow:ellipsis;grid-column:1;width:auto;margin:0 1px;overflow:hidden}.allDayLane .eventChip.eventContinuesBefore{margin-left:-1px}.allDayLane .eventChip.eventContinuesAfter{margin-right:0}.allDayLane .eventChipContinuation>*{visibility:hidden}.slot,.time{height:var(--slot-height);border-top:1px solid var(--color-grid)}.time{font-size:var(--font-size-md)}.slot{cursor:pointer;transition:background-color var(--transition-fast)}.slot:hover{background-color:var(--color-surface-hover)}.slots{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}.isSelecting .slot:hover{background-color:#0000}.isSelecting,.isSelecting .slot{cursor:grabbing}.slotSelection{top:calc(var(--selection-start,0) * var(--slot-height));z-index:2;height:calc(var(--selection-hours,1) * var(--slot-height));padding:var(--space-1) var(--space-2);border:2px solid var(--color-blue);border-radius:var(--radius-sm);background-color:color-mix(in srgb, var(--color-blue) 22%, transparent);pointer-events:none;position:absolute;left:1px;right:1px;overflow:hidden}.slotSelectionLabel{color:var(--color-text);font-size:var(--font-size-sm);white-space:nowrap;font-weight:600;display:block}.event{top:calc(var(--event-start,0) * var(--slot-height) / 60);left:calc(var(--event-column,0) * 100% / var(--event-columns,1) + 1px);z-index:1;width:calc(100% / var(--event-columns,1) - 2px);min-width:0;height:calc(var(--event-duration,60) * var(--slot-height) / 60);padding:var(--space-1) var(--space-2);text-align:left;border-radius:var(--radius-sm);cursor:pointer;flex-direction:column;line-height:1.25;display:flex;position:absolute;overflow:hidden}.event,.eventChip{background-color:var(--event-color,var(--color-blue));color:var(--event-text,var(--color-on-accent));transition:filter var(--transition-fast)}.event:hover,.eventChip:hover{filter:brightness(1.08)}.eventContinuesBefore{border-top-left-radius:0;border-top-right-radius:0}.eventContinuesAfter{border-bottom-right-radius:0;border-bottom-left-radius:0}.nowIndicator{top:calc(var(--now-minutes,0) * var(--slot-height) / 60);z-index:3;border-top:1px solid color-mix(in srgb, var(--color-red) 45%, transparent);pointer-events:none;height:0;position:absolute;left:0;right:0}.nowIndicator--today{border-top:2px solid var(--color-red);translate:0 -1px}.nowIndicator--today:before{content:\"\";border-radius:var(--radius-round);background-color:var(--color-red);width:10px;height:10px;position:absolute;top:-6px;left:-5px}.event:focus-visible{z-index:2}.eventName,.eventTime,.eventChip{white-space:nowrap;text-overflow:ellipsis;flex:none;overflow:hidden}.eventName{font-weight:600}.eventName svg{vertical-align:-1px;margin-right:3px;display:inline-block}.eventTime,.eventSource{font-size:var(--font-size-sm);opacity:.9}.eventSource{white-space:nowrap;text-overflow:ellipsis;flex:none;overflow:hidden}.shortEvent{padding:0 var(--space-2);font-size:var(--font-size-sm)}.veryShortEvent{padding:0 var(--space-2);font-size:var(--font-size-xs);margin-top:-1px}.monthGrid{grid-template-columns:repeat(7,minmax(0,1fr));display:grid}.monthGridWeekday{padding:var(--space-2) 0;text-align:center;font-size:var(--font-size-md);color:var(--color-muted)}.monthView{border-bottom:1px solid var(--color-grid);flex:1;grid-template-rows:auto;grid-auto-rows:minmax(110px,1fr)}.monthCell{min-width:0;padding:var(--space-1);border-top:1px solid var(--color-grid);border-left:1px solid var(--color-grid);cursor:pointer;transition:background-color var(--transition-fast);flex-direction:column;gap:2px;display:flex}.monthCell:hover{background-color:var(--color-surface-hover)}.monthCell.outsideMonth{color:var(--color-muted);opacity:.6}.dayNumber{min-width:26px;height:26px;padding:0 var(--space-1);border-radius:var(--radius-pill);font-size:var(--font-size-md);align-self:center}.dayNumber:hover{background-color:var(--color-grid)}.today .dayNumber,.miniDay.today{background-color:var(--event-color,var(--color-blue));color:var(--event-text,var(--color-on-accent))}.monthCellEvents{flex-direction:column;gap:2px;min-width:0;display:flex}.eventChip{width:100%;padding:1px var(--space-2);border-radius:var(--radius-sm);font-size:var(--font-size-sm);text-align:left;line-height:1.4;display:block}.eventChip.eventContinuesBefore{border-radius:0 var(--radius-sm) var(--radius-sm) 0}.eventChip.eventContinuesAfter{border-radius:var(--radius-sm) 0 0 var(--radius-sm)}.eventChip.eventContinuesBefore.eventContinuesAfter{border-radius:0}.eventChip .eventName{display:inline}.eventChipTime{margin-right:var(--space-2);opacity:.9}.moreEvents{padding:0 var(--space-2);font-size:var(--font-size-sm);color:var(--color-muted);text-align:left}.moreEvents:hover{color:var(--color-text)}.eventDots{display:none}.yearView{gap:var(--space-4);padding:var(--space-4);grid-template-columns:repeat(auto-fill,minmax(230px,1fr));display:grid}.yearMonth h2{margin-bottom:var(--space-2);font-size:var(--font-size-lg)}.yearMonthTitle{font-weight:inherit;border-radius:var(--radius-sm)}.yearMonthTitle:hover{color:var(--color-blue)}.miniMonth .monthGridWeekday{font-size:var(--font-size-xs)}.miniDay{aspect-ratio:1;border-radius:var(--radius-round);font-size:var(--font-size-sm);place-items:center;display:grid;position:relative}button.miniDay:hover{background-color:var(--color-surface-hover)}.miniDay.hasEvents:after{content:\"\";border-radius:var(--radius-round);background-color:var(--color-blue);width:4px;height:4px;position:absolute;bottom:2px;left:50%;transform:translate(-50%)}.miniDay.today.hasEvents:after{background-color:var(--color-on-accent)}@container calendar (width<=900px){.day{min-width:0}.calendar--week .dayName .compactHidden{display:none}.calendar--week .dayName .compactOnly{display:inline}}@container calendar (width<=600px){.calendar--week .allDayLabel{font-size:0}.dayTime{width:56px;font-size:var(--font-size-sm)}.day{min-width:0}.columnHeader{font-size:var(--font-size-base)}.dayDisplay{font-size:var(--font-size-sm)}.calendar--week .compactHidden{display:none}.calendar--week .compactOnly{display:inline}.calendar--week .dayTime{width:40px;font-size:var(--font-size-xs)}.calendar--week .columnHeader{padding:var(--space-1) 0}.calendar--week .dayDisplay{font-size:var(--font-size-base);color:inherit;font-weight:600}.calendar--week .event{font-size:var(--font-size-xs);padding:1px 2px;line-height:1.15}.calendar--week .slotSelectionLabel{font-size:var(--font-size-xs);white-space:normal;line-height:1.2}.calendar--week .eventName{white-space:normal;overflow-wrap:break-word;-webkit-hyphens:auto;hyphens:auto;flex:0 auto}.calendar--week .eventName svg,.calendar--week .eventTime{display:none}.calendar--day .dayTime{width:48px}.monthView{grid-auto-rows:minmax(64px,1fr)}.monthCellEvents{display:none}.eventDots{border-radius:var(--radius-pill);background-color:var(--color-blue);min-width:18px;color:var(--color-on-accent);font-size:var(--font-size-xs);text-align:center;align-self:center;padding:0 4px;display:block}.yearView{gap:var(--space-3);padding:var(--space-3);grid-template-columns:repeat(auto-fill,minmax(150px,1fr))}.yearMonth h2{font-size:var(--font-size-base)}}.event,.eventChip{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}.eventResizeHandle{cursor:ns-resize;height:6px;position:absolute;bottom:0;left:0;right:0}.eventDragging{z-index:3;box-shadow:var(--shadow);outline:2px solid var(--color-bg);filter:brightness(1.08)}.isDraggingEvent,.isDraggingEvent *{cursor:grabbing!important}.isDraggingEvent .slot:hover,.isDraggingEvent .allDayLane:hover{background-color:#0000}.calendar .columnHeader,.calendar .allDayLane{z-index:4;background-color:var(--color-bg);position:sticky}.calendar .columnHeader{top:0}.calendar .allDayLane{top:var(--column-header-height);border-bottom:1px solid var(--color-grid)}.calendar .slots{margin-top:-1px}.eventDescription{height:120px}.color{border:5px solid var(--color-surface);box-sizing:content-box;background-color:var(--event-color,var(--color-blue));width:20px;height:20px}.color.active,.color:hover{border-color:var(--color-grid)}.colorAdd{background:linear-gradient(var(--color-on-accent), var(--color-on-accent)) center / 10px 2px no-repeat, linear-gradient(var(--color-on-accent), var(--color-on-accent)) center / 2px 10px no-repeat, var(--color-grey)}.weekday{border:1px solid var(--color-grid);width:34px;height:34px;font-size:var(--font-size-md)}.weekday:hover{border-color:var(--color-text)}.weekday.active{border-color:var(--color-blue);background-color:var(--color-blue);color:var(--color-on-accent)}.colorSwatch{border-radius:var(--radius-round);background-color:var(--event-color,var(--color-blue));flex:none;width:22px;height:22px}.colorCode{font-family:ui-monospace,monospace}.itemRow .iconButton{font-size:var(--font-size-lg)}.eventNotice{padding:var(--space-2) var(--space-3);border-radius:var(--radius-sm);background-color:var(--color-surface-hover);margin:0}.calendarGroup{gap:var(--space-2);flex-direction:column;display:flex}.calendarGroupTitle{font-size:var(--font-size-md);color:var(--color-muted);text-transform:uppercase;letter-spacing:.04em;font-weight:600}.calendarCards{gap:var(--space-4);grid-template-columns:repeat(auto-fill,minmax(190px,1fr));list-style:none;display:grid}.calendarCard{gap:var(--space-3);width:100%;padding:var(--space-3);border:2px solid var(--color-grid);border-radius:var(--radius-md);text-align:left;transition:border-color var(--transition-fast), background-color var(--transition-fast);flex-direction:column;display:flex;position:relative}.calendarCard:hover{background-color:var(--color-surface-hover)}.calendarCard.active{border-color:var(--color-blue)}.calendarPreview{border:1px solid var(--color-grid);border-radius:var(--radius-sm);background-color:var(--color-bg);overflow:hidden}.calendarPreviewHeader{padding:var(--space-1) var(--space-2);background-color:var(--event-color,var(--color-blue));color:var(--event-text,var(--color-on-accent));font-size:var(--font-size-sm);font-weight:600}.calendarPreviewMonth{padding:var(--space-2);row-gap:1px}.calendarPreviewMonth .monthGridWeekday{padding:0;font-size:9px}.calendarPreviewMonth .miniDay{font-size:var(--font-size-xs);color:var(--color-muted)}.calendarPreviewMonth .miniDay.today{color:var(--event-text,var(--color-on-accent));font-weight:700}.calendarCardInfo{flex-direction:column;display:flex}.calendarCardName{overflow-wrap:anywhere;font-weight:600}.calendarCardMeta{font-size:var(--font-size-sm);color:var(--color-muted)}.calendarCardBadge{top:var(--space-2);right:var(--space-2);border-radius:var(--radius-round);background-color:var(--color-blue);width:24px;height:24px;color:var(--color-on-accent);font-size:var(--font-size-sm);place-items:center;font-weight:700;display:grid;position:absolute}.calendarSettingList{gap:var(--space-4);flex-direction:column;list-style:none;display:flex}.calendarSettingCard{gap:var(--space-4);padding:var(--space-4) var(--space-5);border:1px solid var(--color-grid);border-radius:var(--radius-md);background-color:var(--color-surface);flex-direction:column;display:flex}.calendarSettingHeader{align-items:center;gap:var(--space-3);display:flex}.calendarSettingHeader .itemRowMain{flex:1}.calendarSettingHeader .itemRowTitle{font-size:var(--font-size-lg)}.calendarSettingBody{gap:var(--space-3);padding-top:var(--space-4);border-top:1px solid var(--color-grid);flex-direction:column;display:flex}.calendarSettingBody .switch{font-size:var(--font-size-base)}.colorSwatch--large{width:32px;height:32px}.calendarCardNew{min-height:100%;color:var(--color-muted);border-style:dashed;justify-content:center;align-items:center;text-decoration:none}.calendarCardNew:hover{color:var(--color-blue);border-color:var(--color-blue)}.wizard{gap:var(--space-5);max-width:760px;margin:var(--space-5) auto 0;flex-direction:column;display:flex}.wizardPanel{gap:var(--space-4);padding:var(--space-5);border:1px solid var(--color-grid);border-radius:var(--radius-md);background-color:var(--color-surface)}.wizardHeader{gap:var(--space-1);flex-direction:column;display:flex}.wizardStepCount{font-size:var(--font-size-sm);color:var(--color-blue);font-weight:600}.wizardTitle{font-size:var(--font-size-lg)}.wizardActions{justify-content:flex-end;gap:var(--space-3);padding-top:var(--space-4);border-top:1px solid var(--color-grid);display:flex}.wizardSplit{align-items:start;gap:var(--space-5);grid-template-columns:minmax(0,1fr) 220px;display:grid}.inviteRow{align-items:flex-end}.inviteAdd{flex:none}.summaryList{gap:var(--space-2) var(--space-4);grid-template-columns:max-content minmax(0,1fr);display:grid}.summaryList dt{color:var(--color-muted)}.summaryList dd{overflow-wrap:anywhere}.summaryInvitations{list-style:none}.stepper{list-style:none;display:flex}.step{flex:1;justify-content:center;display:flex;position:relative}.step+.step:before{content:\"\";background-color:var(--color-grid);height:2px;margin:0 22px;position:absolute;top:14px;left:-50%;right:50%}.step--done+.step:before,.step--done+.step--current:before{background-color:var(--color-blue)}.stepContent{align-items:center;gap:var(--space-2);color:var(--color-muted);font-size:var(--font-size-sm);flex-direction:column;font-weight:600;display:flex;position:relative}button.stepContent:hover .stepLabel{color:var(--color-blue)}.stepNumber{border:2px solid var(--color-grid);border-radius:var(--radius-round);background-color:var(--color-bg);place-items:center;width:28px;height:28px;display:grid}.step--done .stepNumber{border-color:var(--color-blue);color:var(--color-blue)}.step--current .stepNumber{border-color:var(--color-blue);background-color:var(--color-blue);color:var(--color-on-accent)}.step--current .stepContent{color:var(--color-text)}@container calendar (width<=700px){.wizard{margin-top:var(--space-4)}.wizardPanel{padding:var(--space-4)}.wizardSplit{grid-template-columns:minmax(0,1fr)}.inviteRow{flex-wrap:wrap}.step:not(.step--current) .stepLabel{display:none}.calendarSettingCard{padding:var(--space-4)}.calendarCards{gap:var(--space-3);grid-template-columns:repeat(2,minmax(0,1fr))}.calendarCard{padding:var(--space-2)}.calendarPreviewMonth .monthGridWeekday{font-size:8px}.calendarPreviewMonth .miniDay{font-size:9px}}.activeCalendar{align-items:center;gap:var(--space-2);max-width:100%;padding:var(--space-1) var(--space-3);border:1px solid color-mix(in srgb, var(--event-color,var(--color-blue)) 45%, transparent);border-radius:var(--radius-pill);background-color:color-mix(in srgb, var(--event-color,var(--color-blue)) 12%, var(--color-bg));font-size:var(--font-size-sm);margin:0;line-height:1.4;display:inline-flex}.activeCalendarDot{border-radius:var(--radius-round);background-color:var(--event-color,var(--color-blue));flex:none;width:10px;height:10px}.activeCalendarName{text-overflow:ellipsis;white-space:nowrap;font-weight:600;overflow:hidden}.activeCalendarMeta{color:var(--color-muted);flex:none}.memberRow{flex-wrap:wrap}.memberRole{width:auto;min-width:10rem}.dangerAction{justify-content:space-between;align-items:center;gap:var(--space-4);display:flex}.dangerAction>.button{white-space:nowrap;flex:none}.dangerAction+.dangerAction{padding-top:var(--space-4);border-top:1px solid var(--color-grid)}@container calendar (width<=700px){.dangerAction{flex-direction:column;align-items:stretch}.memberRow .itemRowMain{flex-basis:100%}.memberRole{flex:1}}.memberPicker{gap:var(--space-2);flex-direction:column;max-height:min(50vh,22rem);margin:0;padding:0;list-style:none;display:flex;overflow-y:auto}.memberOption{align-items:center;gap:var(--space-3);padding:var(--space-2) var(--space-3);border:1px solid var(--color-grid);border-radius:var(--radius-sm);cursor:pointer;display:flex}.memberOption:hover{background-color:var(--color-surface-hover)}.memberOption:has(input:checked){border-color:var(--color-blue);background-color:color-mix(in srgb, var(--color-blue) 10%, transparent)}.memberOption input{accent-color:var(--color-blue);flex:none}.appLoading{min-height:100%;color:var(--color-muted);place-items:center;display:grid}.fieldToggle{font-size:var(--font-size-sm);color:var(--color-blue);flex:none}.accountLogin{padding:var(--space-2) var(--space-3);font-size:var(--font-size-md);white-space:nowrap}.accountButton{border-radius:var(--radius-round);background-color:var(--color-blue);width:32px;height:32px;color:var(--color-on-accent);place-items:center;font-weight:700;display:inline-grid}.accountPopover{inset:64px var(--space-4) auto auto;width:min(280px, calc(100vw - 2 * var(--space-4)));padding:var(--space-4);color:var(--color-text);border:none;margin:0;position:fixed}.accountPopover:popover-open{gap:var(--space-2);flex-direction:column;display:flex}.accountName{overflow-wrap:anywhere;font-weight:600}.accountEmail{margin-bottom:var(--space-2);font-size:var(--font-size-md);color:var(--color-muted);overflow-wrap:anywhere}.formLink{margin-top:calc(-1 * var(--space-3));font-size:var(--font-size-md);align-self:flex-end}.iconLink{border-radius:var(--radius-round);width:32px;height:32px;color:var(--color-muted);transition:color var(--transition-fast), background-color var(--transition-fast);place-items:center;display:inline-grid}.iconLink:hover,.iconLink:focus-visible{color:var(--color-text);background-color:var(--color-surface-hover)}.banner{justify-content:center;align-items:center;gap:var(--space-2) var(--space-4);padding:var(--space-3) var(--space-4);background-color:color-mix(in srgb, var(--color-yellow) 25%, var(--color-bg));font-size:var(--font-size-md);text-align:center;flex-wrap:wrap;display:flex}.bannerAction{padding:var(--space-2) var(--space-3);font-size:var(--font-size-md)}.color-red{--event-color:var(--color-red)}.color-blue{--event-color:var(--color-blue)}.color-green{--event-color:var(--color-green)}.color-yellow{--event-color:var(--color-yellow);--event-text:var(--color-on-yellow)}.visuallyHidden{clip:rect(0 0 0 0);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.textCenter{text-align:center}.surface{background-color:var(--color-surface);border-radius:var(--radius-md);box-shadow:var(--shadow)}";
|
|
12826
13058
|
|
|
12827
13059
|
// src/lib/IsolatedRoot.tsx
|
|
12828
13060
|
var ROOT_CLASS = "calendarRoot";
|
|
@@ -12873,7 +13105,7 @@ var readLinkedPath = (param) => {
|
|
|
12873
13105
|
};
|
|
12874
13106
|
|
|
12875
13107
|
// src/lib/CalendarWidget.tsx
|
|
12876
|
-
function CalendarWidget({ dataSource: providedDataSource, tenant, getUserToken, storageMode = DEFAULT_CONFIG.storageMode, apiBaseUrl = DEFAULT_CONFIG.apiBaseUrl, apiTimeoutMs = DEFAULT_CONFIG.apiTimeoutMs, features, routing = "memory", basename, initialPath, linkParam = DEFAULT_LINK_PARAM, locale, theme, initialView, onEventCreate, onEventUpdate, onEventDelete, className, style }) {
|
|
13108
|
+
function CalendarWidget({ dataSource: providedDataSource, tenant, getUserToken, storageMode = DEFAULT_CONFIG.storageMode, apiBaseUrl = DEFAULT_CONFIG.apiBaseUrl, apiTimeoutMs = DEFAULT_CONFIG.apiTimeoutMs, features, routing = "memory", basename, initialPath, linkParam = DEFAULT_LINK_PARAM, locale, messages, theme, initialView, timeZone, onEventCreate, onEventUpdate, onEventDelete, className, style }) {
|
|
12877
13109
|
const auth = features?.auth ?? DEFAULT_CONFIG.features.auth;
|
|
12878
13110
|
const teams = features?.teams ?? DEFAULT_CONFIG.features.teams;
|
|
12879
13111
|
const dataSource = useMemo(() => providedDataSource ?? (tenant ? tenantDataSource({
|
|
@@ -12895,14 +13127,17 @@ function CalendarWidget({ dataSource: providedDataSource, tenant, getUserToken,
|
|
|
12895
13127
|
apiBaseUrl,
|
|
12896
13128
|
apiTimeoutMs
|
|
12897
13129
|
]);
|
|
13130
|
+
const viewerTimeZone = timeZone && isTimeZone(timeZone) ? timeZone : void 0;
|
|
12898
13131
|
const host = useMemo(() => ({
|
|
12899
13132
|
teams,
|
|
12900
13133
|
theme,
|
|
12901
|
-
initialView
|
|
13134
|
+
initialView,
|
|
13135
|
+
timeZone: viewerTimeZone
|
|
12902
13136
|
}), [
|
|
12903
13137
|
teams,
|
|
12904
13138
|
theme,
|
|
12905
|
-
initialView
|
|
13139
|
+
initialView,
|
|
13140
|
+
viewerTimeZone
|
|
12906
13141
|
]);
|
|
12907
13142
|
const callbacks = useRef({});
|
|
12908
13143
|
useEffect(() => {
|
|
@@ -12925,6 +13160,7 @@ function CalendarWidget({ dataSource: providedDataSource, tenant, getUserToken,
|
|
|
12925
13160
|
value: host,
|
|
12926
13161
|
children: /* @__PURE__ */ jsx(I18nProvider, {
|
|
12927
13162
|
locale,
|
|
13163
|
+
messages,
|
|
12928
13164
|
children: /* @__PURE__ */ jsx(CalendarApp, {
|
|
12929
13165
|
dataSource,
|
|
12930
13166
|
eventCallbacks: callbacks,
|
|
@@ -12938,7 +13174,7 @@ function CalendarWidget({ dataSource: providedDataSource, tenant, getUserToken,
|
|
|
12938
13174
|
}
|
|
12939
13175
|
|
|
12940
13176
|
// src/lib/version.ts
|
|
12941
|
-
var VERSION = "
|
|
13177
|
+
var VERSION = "1.1.0";
|
|
12942
13178
|
|
|
12943
13179
|
// src/lib/element.tsx
|
|
12944
13180
|
var DEFAULT_ELEMENT_NAME = "calendar-widget";
|
|
@@ -12955,7 +13191,8 @@ var ATTRIBUTES = [
|
|
|
12955
13191
|
"tenant",
|
|
12956
13192
|
"theme",
|
|
12957
13193
|
"initial-view",
|
|
12958
|
-
"link-param"
|
|
13194
|
+
"link-param",
|
|
13195
|
+
"time-zone"
|
|
12959
13196
|
];
|
|
12960
13197
|
var CalendarElement = class extends HTMLElement {
|
|
12961
13198
|
static observedAttributes = ATTRIBUTES;
|
|
@@ -12963,6 +13200,7 @@ var CalendarElement = class extends HTMLElement {
|
|
|
12963
13200
|
#root = null;
|
|
12964
13201
|
#dataSource;
|
|
12965
13202
|
#getUserToken;
|
|
13203
|
+
#messages;
|
|
12966
13204
|
get dataSource() {
|
|
12967
13205
|
return this.#dataSource;
|
|
12968
13206
|
}
|
|
@@ -12977,9 +13215,17 @@ var CalendarElement = class extends HTMLElement {
|
|
|
12977
13215
|
this.#getUserToken = value;
|
|
12978
13216
|
if (this.#root) this.#render();
|
|
12979
13217
|
}
|
|
13218
|
+
get messages() {
|
|
13219
|
+
return this.#messages;
|
|
13220
|
+
}
|
|
13221
|
+
set messages(value) {
|
|
13222
|
+
this.#messages = value;
|
|
13223
|
+
if (this.#root) this.#render();
|
|
13224
|
+
}
|
|
12980
13225
|
connectedCallback() {
|
|
12981
13226
|
this.#adoptEarlyProperty("dataSource");
|
|
12982
13227
|
this.#adoptEarlyProperty("getUserToken");
|
|
13228
|
+
this.#adoptEarlyProperty("messages");
|
|
12983
13229
|
if (!this.style.display) this.style.display = "block";
|
|
12984
13230
|
this.#root ??= createRoot(this);
|
|
12985
13231
|
this.#render();
|
|
@@ -13031,12 +13277,14 @@ var CalendarElement = class extends HTMLElement {
|
|
|
13031
13277
|
tenant: this.getAttribute("tenant") ?? void 0,
|
|
13032
13278
|
theme: isOneOf(THEMES, theme) ? theme : void 0,
|
|
13033
13279
|
initialView: isCalendarView(initialView) ? initialView : void 0,
|
|
13280
|
+
timeZone: this.getAttribute("time-zone") ?? void 0,
|
|
13034
13281
|
linkParam: linkParam === "false" ? false : linkParam ?? void 0,
|
|
13035
13282
|
onEventCreate: this.#onEventCreate,
|
|
13036
13283
|
onEventUpdate: this.#onEventUpdate,
|
|
13037
13284
|
onEventDelete: this.#onEventDelete,
|
|
13038
13285
|
dataSource: this.#dataSource,
|
|
13039
|
-
getUserToken: this.#getUserToken
|
|
13286
|
+
getUserToken: this.#getUserToken,
|
|
13287
|
+
messages: this.#messages
|
|
13040
13288
|
};
|
|
13041
13289
|
}
|
|
13042
13290
|
#render() {
|