@rokoyfa/calendar 0.1.0 → 1.0.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 +17 -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 +1130 -908
- 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
|
|
@@ -9639,7 +9309,7 @@ var parsePreferences = (value) => {
|
|
|
9639
9309
|
theme: isOneOf(THEMES$1, theme) ? theme : DEFAULT_PREFERENCES.theme,
|
|
9640
9310
|
defaultView: isCalendarView(defaultView) ? defaultView : DEFAULT_PREFERENCES.defaultView,
|
|
9641
9311
|
mobileDefaultView: isCalendarView(mobileDefaultView) ? mobileDefaultView : DEFAULT_PREFERENCES.mobileDefaultView,
|
|
9642
|
-
locale:
|
|
9312
|
+
locale: locale === "auto" ? AUTO_LOCALE : canonicalizeLocale(locale) ?? DEFAULT_PREFERENCES.locale
|
|
9643
9313
|
};
|
|
9644
9314
|
};
|
|
9645
9315
|
var getStartView = ({ defaultView, mobileDefaultView }, isMobile) => isMobile ? mobileDefaultView : defaultView;
|
|
@@ -9945,8 +9615,8 @@ var NO_EVENTS = [];
|
|
|
9945
9615
|
function useEvents({ from, to, calendarIds, targetCalendarId }) {
|
|
9946
9616
|
const { events: repository, version } = useStorage();
|
|
9947
9617
|
const load = useCallback(() => repository.list({
|
|
9948
|
-
from,
|
|
9949
|
-
to,
|
|
9618
|
+
from: addDaysToISODate(from, -1),
|
|
9619
|
+
to: addDaysToISODate(to, 1),
|
|
9950
9620
|
calendarIds
|
|
9951
9621
|
}), [
|
|
9952
9622
|
repository,
|
|
@@ -9977,12 +9647,12 @@ function useEvents({ from, to, calendarIds, targetCalendarId }) {
|
|
|
9977
9647
|
withReload,
|
|
9978
9648
|
targetCalendarId
|
|
9979
9649
|
]),
|
|
9980
|
-
updateEvent: useCallback((occurrence, input, scope) => withReload(() => updateOccurrence(repository, findSeries(occurrence), occurrence.
|
|
9650
|
+
updateEvent: useCallback((occurrence, input, scope) => withReload(() => updateOccurrence(repository, findSeries(occurrence), occurrence.occurrenceDate, input, scope)), [
|
|
9981
9651
|
repository,
|
|
9982
9652
|
withReload,
|
|
9983
9653
|
findSeries
|
|
9984
9654
|
]),
|
|
9985
|
-
deleteEvent: useCallback((occurrence, scope) => withReload(() => deleteOccurrence(repository, findSeries(occurrence), occurrence.
|
|
9655
|
+
deleteEvent: useCallback((occurrence, scope) => withReload(() => deleteOccurrence(repository, findSeries(occurrence), occurrence.occurrenceDate, scope)), [
|
|
9986
9656
|
repository,
|
|
9987
9657
|
withReload,
|
|
9988
9658
|
findSeries
|
|
@@ -9991,7 +9661,7 @@ function useEvents({ from, to, calendarIds, targetCalendarId }) {
|
|
|
9991
9661
|
}
|
|
9992
9662
|
|
|
9993
9663
|
// src/components/DateTimeField.tsx
|
|
9994
|
-
function DateTimeField({ name, dateLabel, timeLabel, date, time, minDate, dateError, timeError, onDateChange, onTimeChange }) {
|
|
9664
|
+
function DateTimeField({ name, dateLabel, timeLabel, date, time, minDate, showTime = true, dateError, timeError, onDateChange, onTimeChange }) {
|
|
9995
9665
|
return /* @__PURE__ */ jsxs("div", {
|
|
9996
9666
|
className: "formRow",
|
|
9997
9667
|
children: [/* @__PURE__ */ jsx(FormField, {
|
|
@@ -10006,7 +9676,7 @@ function DateTimeField({ name, dateLabel, timeLabel, date, time, minDate, dateEr
|
|
|
10006
9676
|
"aria-invalid": Boolean(dateError),
|
|
10007
9677
|
onChange: (event) => onDateChange(event.target.value)
|
|
10008
9678
|
})
|
|
10009
|
-
}), /* @__PURE__ */ jsx(FormField, {
|
|
9679
|
+
}), showTime && /* @__PURE__ */ jsx(FormField, {
|
|
10010
9680
|
label: timeLabel,
|
|
10011
9681
|
error: timeError,
|
|
10012
9682
|
children: /* @__PURE__ */ jsx("input", {
|
|
@@ -10026,7 +9696,7 @@ var getScopeOptions = (occurrence, nextRecurrence = occurrence?.recurrence ?? nu
|
|
|
10026
9696
|
if (!occurrence?.recurrence) return ["all"];
|
|
10027
9697
|
const options = [];
|
|
10028
9698
|
if (isSameRecurrence(occurrence.recurrence, nextRecurrence)) options.push("single");
|
|
10029
|
-
if (hasEarlierOccurrences(toSeriesRule(occurrence), occurrence.
|
|
9699
|
+
if (hasEarlierOccurrences(toSeriesRule(occurrence), occurrence.occurrenceDate)) options.push("following");
|
|
10030
9700
|
options.push("all");
|
|
10031
9701
|
return options;
|
|
10032
9702
|
};
|
|
@@ -10367,9 +10037,39 @@ function RecurrenceScopeModal({ options, onSelect, onClose }) {
|
|
|
10367
10037
|
});
|
|
10368
10038
|
}
|
|
10369
10039
|
|
|
10040
|
+
// src/features/events/components/TimeZoneField.tsx
|
|
10041
|
+
var FLOATING = "";
|
|
10042
|
+
var toLabel = (timeZone) => `${timeZone.replaceAll("_", " ")} (${formatTimeZoneOffset(timeZone)})`;
|
|
10043
|
+
function TimeZoneField({ value, onChange }) {
|
|
10044
|
+
const { m } = useI18n();
|
|
10045
|
+
const options = useMemo(() => {
|
|
10046
|
+
const zones = listTimeZones();
|
|
10047
|
+
if (value && !zones.includes(value)) zones.unshift(value);
|
|
10048
|
+
return [{
|
|
10049
|
+
value: FLOATING,
|
|
10050
|
+
label: m.events.floatingTimeZone
|
|
10051
|
+
}, ...zones.map((zone) => ({
|
|
10052
|
+
value: zone,
|
|
10053
|
+
label: toLabel(zone)
|
|
10054
|
+
}))];
|
|
10055
|
+
}, [m, value]);
|
|
10056
|
+
return /* @__PURE__ */ jsx(SelectField, {
|
|
10057
|
+
label: m.events.timeZone,
|
|
10058
|
+
name: "timeZone",
|
|
10059
|
+
value: value ?? FLOATING,
|
|
10060
|
+
options,
|
|
10061
|
+
onChange: (next) => onChange(next === FLOATING ? null : next)
|
|
10062
|
+
});
|
|
10063
|
+
}
|
|
10064
|
+
|
|
10370
10065
|
// src/features/events/components/EventModal.tsx
|
|
10066
|
+
var DEFAULT_START = "09:00";
|
|
10067
|
+
var DEFAULT_END = "10:00";
|
|
10068
|
+
var isValidPeriod = ({ startDate, start, endDate, end }) => isISODate(startDate) && isISODate(endDate) && isTime(start) && isTime(end);
|
|
10371
10069
|
function EventModal({ initialValue, occurrence = null, notice, onSave, onDelete, onClose }) {
|
|
10372
|
-
const
|
|
10070
|
+
const i18n = useI18n();
|
|
10071
|
+
const { m } = i18n;
|
|
10072
|
+
const viewerTimeZone = useViewerTimeZone();
|
|
10373
10073
|
const mode = occurrence ? "edit" : "create";
|
|
10374
10074
|
const [values, setValues] = useState(initialValue);
|
|
10375
10075
|
const [errors, setErrors] = useState({});
|
|
@@ -10386,6 +10086,41 @@ function EventModal({ initialValue, occurrence = null, notice, onSave, onDelete,
|
|
|
10386
10086
|
}));
|
|
10387
10087
|
};
|
|
10388
10088
|
const setField = (field, value) => update({ [field]: value }, [field]);
|
|
10089
|
+
const [timedValues, setTimedValues] = useState(() => initialValue.allDay ? {
|
|
10090
|
+
start: DEFAULT_START,
|
|
10091
|
+
end: DEFAULT_END,
|
|
10092
|
+
timeZone: viewerTimeZone
|
|
10093
|
+
} : {
|
|
10094
|
+
start: initialValue.start,
|
|
10095
|
+
end: initialValue.end,
|
|
10096
|
+
timeZone: initialValue.timeZone
|
|
10097
|
+
});
|
|
10098
|
+
const setAllDay = (allDay) => {
|
|
10099
|
+
if (allDay) {
|
|
10100
|
+
setTimedValues({
|
|
10101
|
+
start: values.start,
|
|
10102
|
+
end: values.end,
|
|
10103
|
+
timeZone: values.timeZone
|
|
10104
|
+
});
|
|
10105
|
+
update({
|
|
10106
|
+
allDay,
|
|
10107
|
+
start: ALL_DAY_TIME,
|
|
10108
|
+
end: ALL_DAY_TIME,
|
|
10109
|
+
timeZone: null
|
|
10110
|
+
}, [
|
|
10111
|
+
"start",
|
|
10112
|
+
"end",
|
|
10113
|
+
"endDate"
|
|
10114
|
+
]);
|
|
10115
|
+
} else update({
|
|
10116
|
+
allDay,
|
|
10117
|
+
...timedValues
|
|
10118
|
+
}, [
|
|
10119
|
+
"start",
|
|
10120
|
+
"end",
|
|
10121
|
+
"endDate"
|
|
10122
|
+
]);
|
|
10123
|
+
};
|
|
10389
10124
|
const changeStartDate = (startDate) => update({
|
|
10390
10125
|
...isISODate(values.startDate) && isISODate(values.endDate) && isISODate(startDate) ? moveToStartDate(values, startDate) : { startDate },
|
|
10391
10126
|
recurrence: adaptRecurrenceToStart(values.recurrence, values.startDate, startDate)
|
|
@@ -10409,6 +10144,7 @@ function EventModal({ initialValue, occurrence = null, notice, onSave, onDelete,
|
|
|
10409
10144
|
setPendingSave(null);
|
|
10410
10145
|
save(pendingSave.input, scope);
|
|
10411
10146
|
};
|
|
10147
|
+
const viewerHint = !values.allDay && values.timeZone && values.timeZone !== viewerTimeZone && isValidPeriod(values) ? m.events.inYourTimeZone(formatEventPeriod(toViewerPeriod(values, values.timeZone, viewerTimeZone), i18n)) : null;
|
|
10412
10148
|
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Modal, {
|
|
10413
10149
|
title: mode === "create" ? m.events.createTitle : m.events.editTitle,
|
|
10414
10150
|
onClose,
|
|
@@ -10430,12 +10166,18 @@ function EventModal({ initialValue, occurrence = null, notice, onSave, onDelete,
|
|
|
10430
10166
|
onChange: (title) => setField("title", title),
|
|
10431
10167
|
"data-autofocus": true
|
|
10432
10168
|
}),
|
|
10169
|
+
/* @__PURE__ */ jsx(Switch, {
|
|
10170
|
+
label: m.events.allDay,
|
|
10171
|
+
checked: values.allDay,
|
|
10172
|
+
onChange: setAllDay
|
|
10173
|
+
}),
|
|
10433
10174
|
/* @__PURE__ */ jsx(DateTimeField, {
|
|
10434
10175
|
name: "start",
|
|
10435
10176
|
dateLabel: m.events.startDate,
|
|
10436
10177
|
timeLabel: m.events.startTime,
|
|
10437
10178
|
date: values.startDate,
|
|
10438
10179
|
time: values.start,
|
|
10180
|
+
showTime: !values.allDay,
|
|
10439
10181
|
dateError: errors.startDate,
|
|
10440
10182
|
timeError: errors.start,
|
|
10441
10183
|
onDateChange: changeStartDate,
|
|
@@ -10447,12 +10189,21 @@ function EventModal({ initialValue, occurrence = null, notice, onSave, onDelete,
|
|
|
10447
10189
|
timeLabel: m.events.endTime,
|
|
10448
10190
|
date: values.endDate,
|
|
10449
10191
|
time: values.end,
|
|
10192
|
+
showTime: !values.allDay,
|
|
10450
10193
|
minDate: values.startDate,
|
|
10451
10194
|
dateError: errors.endDate,
|
|
10452
10195
|
timeError: errors.end,
|
|
10453
10196
|
onDateChange: (endDate) => setField("endDate", endDate),
|
|
10454
10197
|
onTimeChange: (end) => setField("end", end)
|
|
10455
10198
|
}),
|
|
10199
|
+
!values.allDay && /* @__PURE__ */ jsx(TimeZoneField, {
|
|
10200
|
+
value: values.timeZone,
|
|
10201
|
+
onChange: (timeZone) => setField("timeZone", timeZone)
|
|
10202
|
+
}),
|
|
10203
|
+
viewerHint && /* @__PURE__ */ jsx("p", {
|
|
10204
|
+
className: "formHint",
|
|
10205
|
+
children: viewerHint
|
|
10206
|
+
}),
|
|
10456
10207
|
/* @__PURE__ */ jsx(RecurrenceFields, {
|
|
10457
10208
|
value: values.recurrence,
|
|
10458
10209
|
startDate: values.startDate,
|
|
@@ -10599,6 +10350,10 @@ function CustomColorSettings() {
|
|
|
10599
10350
|
});
|
|
10600
10351
|
}
|
|
10601
10352
|
|
|
10353
|
+
// src/features/calendar/context/DragContext.ts
|
|
10354
|
+
var DraggingEventContext = createContext(null);
|
|
10355
|
+
var useIsDragging = (occurrenceKey) => use(DraggingEventContext) === occurrenceKey;
|
|
10356
|
+
|
|
10602
10357
|
// src/features/calendar/context/EventSourcesContext.ts
|
|
10603
10358
|
var NO_EVENT_SOURCES = /* @__PURE__ */ new Map();
|
|
10604
10359
|
var EventSourcesContext = createContext(NO_EVENT_SOURCES);
|
|
@@ -10683,6 +10438,268 @@ function useCalendarView(initialView = "week", initialDate = today()) {
|
|
|
10683
10438
|
};
|
|
10684
10439
|
}
|
|
10685
10440
|
|
|
10441
|
+
// src/features/calendar/constants/grid.ts
|
|
10442
|
+
var HOURS = Array.from({ length: 24 }, (_, hour) => hour);
|
|
10443
|
+
|
|
10444
|
+
// src/features/calendar/utils/eventDrag.ts
|
|
10445
|
+
var DRAG_STEP_MINUTES = 15;
|
|
10446
|
+
var toAbsolute = (reference, date, minutes) => daysBetween(reference, date) * MINUTES_PER_DAY + minutes;
|
|
10447
|
+
var fromAbsolute = (reference, absolute) => {
|
|
10448
|
+
const days = Math.floor(absolute / MINUTES_PER_DAY);
|
|
10449
|
+
return {
|
|
10450
|
+
date: addDaysToISODate(reference, days),
|
|
10451
|
+
time: minutesToTime(absolute - days * MINUTES_PER_DAY)
|
|
10452
|
+
};
|
|
10453
|
+
};
|
|
10454
|
+
var getDragDelta = (unit, from, to) => {
|
|
10455
|
+
if (unit === "days") return daysBetween(from.date, to.date) * MINUTES_PER_DAY;
|
|
10456
|
+
const delta = toAbsolute(from.date, to.date, to.minutes) - from.minutes;
|
|
10457
|
+
return Math.round(delta / 15) * 15;
|
|
10458
|
+
};
|
|
10459
|
+
var applyDragDelta = (period, mode, delta) => {
|
|
10460
|
+
const reference = period.startDate;
|
|
10461
|
+
const start = timeToMinutes(period.start);
|
|
10462
|
+
const end = toAbsolute(reference, period.endDate, timeToMinutes(period.end));
|
|
10463
|
+
const nextStart = mode === "move" ? start + delta : start;
|
|
10464
|
+
const nextEnd = mode === "move" ? end + delta : Math.max(end + delta, start + 15);
|
|
10465
|
+
const first = fromAbsolute(reference, nextStart);
|
|
10466
|
+
const last = fromAbsolute(reference, nextEnd);
|
|
10467
|
+
return {
|
|
10468
|
+
startDate: first.date,
|
|
10469
|
+
start: first.time,
|
|
10470
|
+
endDate: last.date,
|
|
10471
|
+
end: last.time
|
|
10472
|
+
};
|
|
10473
|
+
};
|
|
10474
|
+
var isSamePeriod = (a, b) => a.startDate === b.startDate && a.start === b.start && a.endDate === b.endDate && a.end === b.end;
|
|
10475
|
+
var toDropInput = (occurrence, viewerPeriod, viewerTimeZone, scope) => {
|
|
10476
|
+
const current = toOccurrenceInput(occurrence);
|
|
10477
|
+
const period = occurrence.timeZone ? toViewerPeriod(viewerPeriod, viewerTimeZone, occurrence.timeZone) : viewerPeriod;
|
|
10478
|
+
return {
|
|
10479
|
+
...current,
|
|
10480
|
+
...period,
|
|
10481
|
+
recurrence: scope === "single" ? current.recurrence : adaptRecurrenceToStart(current.recurrence, current.startDate, period.startDate)
|
|
10482
|
+
};
|
|
10483
|
+
};
|
|
10484
|
+
|
|
10485
|
+
// src/features/calendar/hooks/useEventDrag.ts
|
|
10486
|
+
var LONG_PRESS_MS$1 = 1e3;
|
|
10487
|
+
var MOVE_TOLERANCE_PX$1 = 8;
|
|
10488
|
+
var EDGE_PX$1 = 48;
|
|
10489
|
+
var SCROLL_STEP_PX$1 = 12;
|
|
10490
|
+
var CLICK_SUPPRESSION_MS$1 = 500;
|
|
10491
|
+
var findDragPoint = (scope, { x, y }, unit) => {
|
|
10492
|
+
const cell = scope.elementFromPoint(x, y)?.closest("[data-date]");
|
|
10493
|
+
const date = cell?.dataset.date;
|
|
10494
|
+
if (!cell || !date) return null;
|
|
10495
|
+
if (unit === "days") return {
|
|
10496
|
+
date,
|
|
10497
|
+
minutes: 0
|
|
10498
|
+
};
|
|
10499
|
+
const slots = cell.querySelector(".slots");
|
|
10500
|
+
if (!slots) return null;
|
|
10501
|
+
const { top, height } = slots.getBoundingClientRect();
|
|
10502
|
+
return {
|
|
10503
|
+
date,
|
|
10504
|
+
minutes: Math.min(Math.max((y - top) / height * MINUTES_PER_DAY, 0), MINUTES_PER_DAY)
|
|
10505
|
+
};
|
|
10506
|
+
};
|
|
10507
|
+
var findDraggable = (target) => target instanceof Element ? target.closest("[data-occurrence-key]") : null;
|
|
10508
|
+
function useEventDrag({ containerRef, enabled, occurrences, onPreview, onDrop }) {
|
|
10509
|
+
const latest = useRef({
|
|
10510
|
+
occurrences,
|
|
10511
|
+
onPreview,
|
|
10512
|
+
onDrop
|
|
10513
|
+
});
|
|
10514
|
+
useEffect(() => {
|
|
10515
|
+
latest.current = {
|
|
10516
|
+
occurrences,
|
|
10517
|
+
onPreview,
|
|
10518
|
+
onDrop
|
|
10519
|
+
};
|
|
10520
|
+
});
|
|
10521
|
+
useEffect(() => {
|
|
10522
|
+
const container = containerRef.current;
|
|
10523
|
+
if (!container || !enabled) return;
|
|
10524
|
+
const scope = container.getRootNode();
|
|
10525
|
+
const scroller = container.closest(".scrollArea") ?? container;
|
|
10526
|
+
let press = null;
|
|
10527
|
+
let isActive = false;
|
|
10528
|
+
let pressTimer;
|
|
10529
|
+
let frame = 0;
|
|
10530
|
+
let pressPoint = null;
|
|
10531
|
+
let lastPoint = null;
|
|
10532
|
+
let preview = null;
|
|
10533
|
+
let suppressClickUntil = 0;
|
|
10534
|
+
let touchTarget = null;
|
|
10535
|
+
const moveTo = (point) => {
|
|
10536
|
+
if (!press) return;
|
|
10537
|
+
const target = findDragPoint(scope, point, press.unit);
|
|
10538
|
+
if (!target) return;
|
|
10539
|
+
const next = applyDragDelta(press.period, press.mode, getDragDelta(press.unit, press.origin, target));
|
|
10540
|
+
if (preview && isSamePeriod(preview, next)) return;
|
|
10541
|
+
preview = next;
|
|
10542
|
+
latest.current.onPreview({
|
|
10543
|
+
occurrenceKey: press.occurrence.occurrenceKey,
|
|
10544
|
+
period: next
|
|
10545
|
+
});
|
|
10546
|
+
};
|
|
10547
|
+
const autoScroll = () => {
|
|
10548
|
+
if (!isActive) return;
|
|
10549
|
+
if (lastPoint) {
|
|
10550
|
+
const { top, bottom } = scroller.getBoundingClientRect();
|
|
10551
|
+
const step = lastPoint.y < top + EDGE_PX$1 ? -12 : lastPoint.y > bottom - EDGE_PX$1 ? SCROLL_STEP_PX$1 : 0;
|
|
10552
|
+
if (step !== 0) {
|
|
10553
|
+
scroller.scrollTop += step;
|
|
10554
|
+
moveTo(lastPoint);
|
|
10555
|
+
}
|
|
10556
|
+
}
|
|
10557
|
+
frame = requestAnimationFrame(autoScroll);
|
|
10558
|
+
};
|
|
10559
|
+
const activate = () => {
|
|
10560
|
+
if (!press) return;
|
|
10561
|
+
isActive = true;
|
|
10562
|
+
preview = press.period;
|
|
10563
|
+
latest.current.onPreview({
|
|
10564
|
+
occurrenceKey: press.occurrence.occurrenceKey,
|
|
10565
|
+
period: preview
|
|
10566
|
+
});
|
|
10567
|
+
container.classList.add("isDraggingEvent");
|
|
10568
|
+
navigator.vibrate?.(15);
|
|
10569
|
+
frame = requestAnimationFrame(autoScroll);
|
|
10570
|
+
};
|
|
10571
|
+
const removeTouchListeners = () => {
|
|
10572
|
+
touchTarget?.removeEventListener("touchmove", handleTouchMove);
|
|
10573
|
+
touchTarget?.removeEventListener("touchend", handleTouchEnd);
|
|
10574
|
+
touchTarget?.removeEventListener("touchcancel", handleTouchCancel);
|
|
10575
|
+
touchTarget = null;
|
|
10576
|
+
};
|
|
10577
|
+
const finish = (commit) => {
|
|
10578
|
+
clearTimeout(pressTimer);
|
|
10579
|
+
pressTimer = void 0;
|
|
10580
|
+
cancelAnimationFrame(frame);
|
|
10581
|
+
removeTouchListeners();
|
|
10582
|
+
container.classList.remove("isDraggingEvent");
|
|
10583
|
+
if (isActive) {
|
|
10584
|
+
suppressClickUntil = Date.now() + CLICK_SUPPRESSION_MS$1;
|
|
10585
|
+
if (commit && press && preview && !isSamePeriod(preview, press.period)) latest.current.onDrop(press.occurrence, preview);
|
|
10586
|
+
else latest.current.onPreview(null);
|
|
10587
|
+
}
|
|
10588
|
+
isActive = false;
|
|
10589
|
+
press = null;
|
|
10590
|
+
preview = null;
|
|
10591
|
+
pressPoint = null;
|
|
10592
|
+
};
|
|
10593
|
+
const begin = (target, point) => {
|
|
10594
|
+
const element = findDraggable(target);
|
|
10595
|
+
const occurrence = element && latest.current.occurrences.get(element.dataset.occurrenceKey ?? "");
|
|
10596
|
+
if (!element || !occurrence) return false;
|
|
10597
|
+
const mode = target instanceof Element && target.closest(".eventResizeHandle") ? "resize" : "move";
|
|
10598
|
+
const unit = element.closest(".slots") ? "minutes" : "days";
|
|
10599
|
+
const origin = findDragPoint(scope, point, unit);
|
|
10600
|
+
if (!origin) return false;
|
|
10601
|
+
const { startDate, start, endDate, end } = occurrence;
|
|
10602
|
+
press = {
|
|
10603
|
+
occurrence,
|
|
10604
|
+
mode,
|
|
10605
|
+
unit,
|
|
10606
|
+
origin,
|
|
10607
|
+
period: {
|
|
10608
|
+
startDate,
|
|
10609
|
+
start,
|
|
10610
|
+
endDate,
|
|
10611
|
+
end
|
|
10612
|
+
}
|
|
10613
|
+
};
|
|
10614
|
+
pressPoint = lastPoint = point;
|
|
10615
|
+
pressTimer = setTimeout(() => {
|
|
10616
|
+
pressTimer = void 0;
|
|
10617
|
+
activate();
|
|
10618
|
+
}, LONG_PRESS_MS$1);
|
|
10619
|
+
return true;
|
|
10620
|
+
};
|
|
10621
|
+
const track = (point) => {
|
|
10622
|
+
lastPoint = point;
|
|
10623
|
+
if (isActive) moveTo(point);
|
|
10624
|
+
else if (pressTimer && pressPoint && Math.hypot(point.x - pressPoint.x, point.y - pressPoint.y) > MOVE_TOLERANCE_PX$1) finish(false);
|
|
10625
|
+
};
|
|
10626
|
+
const handlePointerDown = (event) => {
|
|
10627
|
+
if (event.pointerType !== "mouse" || event.button !== 0) return;
|
|
10628
|
+
begin(event.target, {
|
|
10629
|
+
x: event.clientX,
|
|
10630
|
+
y: event.clientY
|
|
10631
|
+
});
|
|
10632
|
+
};
|
|
10633
|
+
const handlePointerMove = (event) => {
|
|
10634
|
+
if (event.pointerType !== "mouse" || !press) return;
|
|
10635
|
+
if (isActive) event.preventDefault();
|
|
10636
|
+
track({
|
|
10637
|
+
x: event.clientX,
|
|
10638
|
+
y: event.clientY
|
|
10639
|
+
});
|
|
10640
|
+
};
|
|
10641
|
+
const handlePointerUp = (event) => {
|
|
10642
|
+
if (event.pointerType === "mouse" && press) finish(true);
|
|
10643
|
+
};
|
|
10644
|
+
function handleTouchMove(event) {
|
|
10645
|
+
const touch = event.touches[0];
|
|
10646
|
+
if (!touch) return;
|
|
10647
|
+
if (isActive) event.preventDefault();
|
|
10648
|
+
track({
|
|
10649
|
+
x: touch.clientX,
|
|
10650
|
+
y: touch.clientY
|
|
10651
|
+
});
|
|
10652
|
+
}
|
|
10653
|
+
function handleTouchEnd() {
|
|
10654
|
+
finish(true);
|
|
10655
|
+
}
|
|
10656
|
+
function handleTouchCancel() {
|
|
10657
|
+
finish(false);
|
|
10658
|
+
}
|
|
10659
|
+
const handleTouchStart = (event) => {
|
|
10660
|
+
if (event.touches.length !== 1) return finish(false);
|
|
10661
|
+
const touch = event.touches[0];
|
|
10662
|
+
if (!begin(event.target, {
|
|
10663
|
+
x: touch.clientX,
|
|
10664
|
+
y: touch.clientY
|
|
10665
|
+
}) || !(event.target instanceof HTMLElement)) return;
|
|
10666
|
+
touchTarget = event.target;
|
|
10667
|
+
touchTarget.addEventListener("touchmove", handleTouchMove, { passive: false });
|
|
10668
|
+
touchTarget.addEventListener("touchend", handleTouchEnd);
|
|
10669
|
+
touchTarget.addEventListener("touchcancel", handleTouchCancel);
|
|
10670
|
+
};
|
|
10671
|
+
const handleClick = (event) => {
|
|
10672
|
+
if (Date.now() < suppressClickUntil) {
|
|
10673
|
+
event.preventDefault();
|
|
10674
|
+
event.stopPropagation();
|
|
10675
|
+
}
|
|
10676
|
+
};
|
|
10677
|
+
const handleContextMenu = (event) => {
|
|
10678
|
+
if (press || findDraggable(event.target)) event.preventDefault();
|
|
10679
|
+
};
|
|
10680
|
+
const handleKeyDown = (event) => {
|
|
10681
|
+
if (event.key === "Escape" && press) finish(false);
|
|
10682
|
+
};
|
|
10683
|
+
container.addEventListener("pointerdown", handlePointerDown);
|
|
10684
|
+
window.addEventListener("pointermove", handlePointerMove);
|
|
10685
|
+
window.addEventListener("pointerup", handlePointerUp);
|
|
10686
|
+
container.addEventListener("touchstart", handleTouchStart, { passive: true });
|
|
10687
|
+
container.addEventListener("click", handleClick, true);
|
|
10688
|
+
container.addEventListener("contextmenu", handleContextMenu);
|
|
10689
|
+
window.addEventListener("keydown", handleKeyDown);
|
|
10690
|
+
return () => {
|
|
10691
|
+
finish(false);
|
|
10692
|
+
container.removeEventListener("pointerdown", handlePointerDown);
|
|
10693
|
+
window.removeEventListener("pointermove", handlePointerMove);
|
|
10694
|
+
window.removeEventListener("pointerup", handlePointerUp);
|
|
10695
|
+
container.removeEventListener("touchstart", handleTouchStart);
|
|
10696
|
+
container.removeEventListener("click", handleClick, true);
|
|
10697
|
+
container.removeEventListener("contextmenu", handleContextMenu);
|
|
10698
|
+
window.removeEventListener("keydown", handleKeyDown);
|
|
10699
|
+
};
|
|
10700
|
+
}, [containerRef, enabled]);
|
|
10701
|
+
}
|
|
10702
|
+
|
|
10686
10703
|
// src/features/calendar/hooks/useNow.ts
|
|
10687
10704
|
var MINUTE = 6e4;
|
|
10688
10705
|
function useNow() {
|
|
@@ -10712,7 +10729,8 @@ var getEventTooltip = (event, source, i18n) => [
|
|
|
10712
10729
|
].filter(Boolean).join("\n");
|
|
10713
10730
|
var getSegmentAttributes = ({ event, continuesBefore, continuesAfter }, source, i18n, ...classNamesToMerge) => ({
|
|
10714
10731
|
...getEventColorAttributes(event.color, ...classNamesToMerge, continuesBefore && "eventContinuesBefore", continuesAfter && "eventContinuesAfter"),
|
|
10715
|
-
title: getEventTooltip(event, source, i18n)
|
|
10732
|
+
title: getEventTooltip(event, source, i18n),
|
|
10733
|
+
"data-occurrence-key": event.occurrenceKey
|
|
10716
10734
|
});
|
|
10717
10735
|
|
|
10718
10736
|
// src/features/calendar/utils/segmentEvents.ts
|
|
@@ -10832,15 +10850,12 @@ var withoutPropagation = (action) => (event) => {
|
|
|
10832
10850
|
action();
|
|
10833
10851
|
};
|
|
10834
10852
|
|
|
10835
|
-
// src/features/calendar/constants/grid.ts
|
|
10836
|
-
var HOURS = Array.from({ length: 24 }, (_, hour) => hour);
|
|
10837
|
-
|
|
10838
10853
|
// src/features/calendar/utils/eventGeometry.ts
|
|
10839
10854
|
var getVisibleEnd = ({ start, end }) => Math.max(end, start + 15);
|
|
10840
10855
|
var getVisibleDuration = (segment) => getVisibleEnd(segment) - segment.start;
|
|
10841
10856
|
|
|
10842
10857
|
// 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);
|
|
10858
|
+
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
10859
|
var sortSegments = (segments) => segments.toSorted(compareSegments);
|
|
10845
10860
|
function layoutEvents(segments) {
|
|
10846
10861
|
const positioned = [];
|
|
@@ -10888,15 +10903,21 @@ function EventTitle({ event, source }) {
|
|
|
10888
10903
|
}
|
|
10889
10904
|
|
|
10890
10905
|
// src/features/calendar/components/EventChip.tsx
|
|
10891
|
-
function EventChip({ segment, onSelect }) {
|
|
10906
|
+
function EventChip({ segment, row, isContinuation = false, onSelect }) {
|
|
10892
10907
|
const { event, start, continuesBefore } = segment;
|
|
10893
10908
|
const i18n = useI18n();
|
|
10894
10909
|
const source = useEventSource(event);
|
|
10910
|
+
const isDragging = useIsDragging(event.occurrenceKey);
|
|
10911
|
+
const { style, ...attributes } = getSegmentAttributes(segment, source, i18n, "eventChip", isContinuation && "eventChipContinuation", isDragging && "eventDragging");
|
|
10895
10912
|
return /* @__PURE__ */ jsxs("button", {
|
|
10896
10913
|
type: "button",
|
|
10897
|
-
...
|
|
10914
|
+
...attributes,
|
|
10915
|
+
style: row === void 0 ? style : {
|
|
10916
|
+
...style,
|
|
10917
|
+
gridRow: row + 1
|
|
10918
|
+
},
|
|
10898
10919
|
onClick: withoutPropagation(() => onSelect(event)),
|
|
10899
|
-
children: [!continuesBefore && /* @__PURE__ */ jsx("span", {
|
|
10920
|
+
children: [!continuesBefore && !event.allDay && /* @__PURE__ */ jsx("span", {
|
|
10900
10921
|
className: "eventChipTime",
|
|
10901
10922
|
children: i18n.format.time(start)
|
|
10902
10923
|
}), /* @__PURE__ */ jsx(EventTitle, {
|
|
@@ -11156,14 +11177,56 @@ function useSlotSelection(containerRef, enabled, onSelect) {
|
|
|
11156
11177
|
};
|
|
11157
11178
|
}
|
|
11158
11179
|
|
|
11180
|
+
// src/features/calendar/utils/allDay.ts
|
|
11181
|
+
var compareRuns = (a, b) => a.segments[0].date.localeCompare(b.segments[0].date) || b.segments.length - a.segments.length || a.title.localeCompare(b.title);
|
|
11182
|
+
function splitAllDay(dates, segmentsByDate) {
|
|
11183
|
+
const timed = /* @__PURE__ */ new Map();
|
|
11184
|
+
const runs = /* @__PURE__ */ new Map();
|
|
11185
|
+
for (const date of dates) {
|
|
11186
|
+
const segments = segmentsByDate.get(date) ?? [];
|
|
11187
|
+
timed.set(date, segments.filter((segment) => !segment.event.allDay));
|
|
11188
|
+
for (const segment of segments) {
|
|
11189
|
+
if (!segment.event.allDay) continue;
|
|
11190
|
+
const key = segment.event.occurrenceKey;
|
|
11191
|
+
const run = runs.get(key);
|
|
11192
|
+
if (run) run.segments.push(segment);
|
|
11193
|
+
else runs.set(key, {
|
|
11194
|
+
key,
|
|
11195
|
+
title: segment.event.title,
|
|
11196
|
+
segments: [segment]
|
|
11197
|
+
});
|
|
11198
|
+
}
|
|
11199
|
+
}
|
|
11200
|
+
const allDay = new Map(dates.map((date) => [date, []]));
|
|
11201
|
+
const rowEnds = [];
|
|
11202
|
+
for (const run of [...runs.values()].sort(compareRuns)) {
|
|
11203
|
+
const first = run.segments[0].date;
|
|
11204
|
+
const last = run.segments[run.segments.length - 1].date;
|
|
11205
|
+
let row = rowEnds.findIndex((end) => end < first);
|
|
11206
|
+
if (row === -1) row = rowEnds.length;
|
|
11207
|
+
rowEnds[row] = last;
|
|
11208
|
+
run.segments.forEach((segment, index) => allDay.get(segment.date)?.push({
|
|
11209
|
+
segment,
|
|
11210
|
+
row,
|
|
11211
|
+
isFirst: index === 0
|
|
11212
|
+
}));
|
|
11213
|
+
}
|
|
11214
|
+
return {
|
|
11215
|
+
allDay,
|
|
11216
|
+
timed,
|
|
11217
|
+
rows: Math.max(1, rowEnds.length)
|
|
11218
|
+
};
|
|
11219
|
+
}
|
|
11220
|
+
|
|
11159
11221
|
// src/features/calendar/components/EventBlock.tsx
|
|
11160
11222
|
var getSizeClass = (duration) => duration <= 30 ? "veryShortEvent" : duration < 60 ? "shortEvent" : null;
|
|
11161
11223
|
function EventBlock({ segment, column, columns, onSelect }) {
|
|
11162
11224
|
const { event, start } = segment;
|
|
11163
11225
|
const i18n = useI18n();
|
|
11164
11226
|
const source = useEventSource(event);
|
|
11227
|
+
const isDragging = useIsDragging(event.occurrenceKey);
|
|
11165
11228
|
const duration = getVisibleDuration(segment);
|
|
11166
|
-
const { style: colorStyle, ...attributes } = getSegmentAttributes(segment, source, i18n, "event", getSizeClass(duration));
|
|
11229
|
+
const { style: colorStyle, ...attributes } = getSegmentAttributes(segment, source, i18n, "event", getSizeClass(duration), isDragging && "eventDragging");
|
|
11167
11230
|
const style = {
|
|
11168
11231
|
"--event-start": start,
|
|
11169
11232
|
"--event-duration": duration,
|
|
@@ -11185,9 +11248,13 @@ function EventBlock({ segment, column, columns, onSelect }) {
|
|
|
11185
11248
|
className: "eventSource",
|
|
11186
11249
|
children: source.name
|
|
11187
11250
|
}),
|
|
11188
|
-
duration >= 90 && /* @__PURE__ */ jsx("span", {
|
|
11251
|
+
(duration >= 90 || isDragging) && /* @__PURE__ */ jsx("span", {
|
|
11189
11252
|
className: "eventTime",
|
|
11190
11253
|
children: formatEventPeriod(event, i18n)
|
|
11254
|
+
}),
|
|
11255
|
+
!segment.continuesAfter && /* @__PURE__ */ jsx("span", {
|
|
11256
|
+
className: "eventResizeHandle",
|
|
11257
|
+
"aria-hidden": "true"
|
|
11191
11258
|
})
|
|
11192
11259
|
]
|
|
11193
11260
|
});
|
|
@@ -11205,7 +11272,7 @@ function NowIndicator({ minutes, isToday }) {
|
|
|
11205
11272
|
}
|
|
11206
11273
|
|
|
11207
11274
|
// src/features/calendar/components/DayColumn.tsx
|
|
11208
|
-
function DayColumn({ date, isToday, nowMinutes, segments, selection = null, onSlotSelect, onEventSelect, onHeaderSelect }) {
|
|
11275
|
+
function DayColumn({ date, isToday, nowMinutes, segments, allDaySegments, selection = null, onSlotSelect, onAllDaySelect, onEventSelect, onHeaderSelect }) {
|
|
11209
11276
|
const { m, format } = useI18n();
|
|
11210
11277
|
const day = fromISODate(date);
|
|
11211
11278
|
const dayLabel = format.longDate(date);
|
|
@@ -11232,93 +11299,118 @@ function DayColumn({ date, isToday, nowMinutes, segments, selection = null, onSl
|
|
|
11232
11299
|
return /* @__PURE__ */ jsxs("div", {
|
|
11233
11300
|
className: classNames("day", isToday && "currentDay"),
|
|
11234
11301
|
"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, {
|
|
11302
|
+
children: [
|
|
11303
|
+
onHeaderSelect ? /* @__PURE__ */ jsx("button", {
|
|
11304
|
+
type: "button",
|
|
11305
|
+
className: "columnHeader",
|
|
11306
|
+
title: m.calendar.openDay(dayLabel),
|
|
11307
|
+
onClick: () => onHeaderSelect(date),
|
|
11308
|
+
children: header
|
|
11309
|
+
}) : /* @__PURE__ */ jsx("div", {
|
|
11310
|
+
className: "columnHeader",
|
|
11311
|
+
children: header
|
|
11312
|
+
}),
|
|
11313
|
+
/* @__PURE__ */ jsx("div", {
|
|
11314
|
+
className: "allDayLane",
|
|
11315
|
+
title: `${dayLabel} ${m.events.allDay}`,
|
|
11316
|
+
onClick: () => onAllDaySelect(date),
|
|
11317
|
+
children: allDaySegments.map(({ segment, row, isFirst }) => /* @__PURE__ */ jsx(EventChip, {
|
|
11254
11318
|
segment,
|
|
11255
|
-
|
|
11256
|
-
|
|
11319
|
+
row,
|
|
11320
|
+
isContinuation: !isFirst,
|
|
11257
11321
|
onSelect: onEventSelect
|
|
11258
|
-
}, segment.event.occurrenceKey))
|
|
11259
|
-
|
|
11260
|
-
|
|
11261
|
-
|
|
11262
|
-
|
|
11263
|
-
|
|
11264
|
-
|
|
11265
|
-
|
|
11266
|
-
|
|
11267
|
-
|
|
11268
|
-
|
|
11322
|
+
}, segment.event.occurrenceKey))
|
|
11323
|
+
}),
|
|
11324
|
+
/* @__PURE__ */ jsxs("div", {
|
|
11325
|
+
className: "slots",
|
|
11326
|
+
children: [
|
|
11327
|
+
HOURS.map((hour) => /* @__PURE__ */ jsx("div", {
|
|
11328
|
+
className: "slot",
|
|
11329
|
+
"data-hour": hour,
|
|
11330
|
+
title: `${dayLabel} ${format.hour(hour)}`,
|
|
11331
|
+
onClick: () => onSlotSelect(date, hour)
|
|
11332
|
+
}, hour)),
|
|
11333
|
+
positionedSegments.map(({ segment, column, columns }) => /* @__PURE__ */ jsx(EventBlock, {
|
|
11334
|
+
segment,
|
|
11335
|
+
column,
|
|
11336
|
+
columns,
|
|
11337
|
+
onSelect: onEventSelect
|
|
11338
|
+
}, segment.event.occurrenceKey)),
|
|
11339
|
+
selection && /* @__PURE__ */ jsx("div", {
|
|
11340
|
+
className: "slotSelection",
|
|
11341
|
+
style: {
|
|
11342
|
+
"--selection-start": selection.fromHour,
|
|
11343
|
+
"--selection-hours": selection.toHour - selection.fromHour + 1
|
|
11344
|
+
},
|
|
11345
|
+
"aria-hidden": "true",
|
|
11346
|
+
children: selection.label && /* @__PURE__ */ jsx("span", {
|
|
11347
|
+
className: "slotSelectionLabel",
|
|
11348
|
+
children: selection.label
|
|
11349
|
+
})
|
|
11350
|
+
}),
|
|
11351
|
+
nowMinutes !== null && /* @__PURE__ */ jsx(NowIndicator, {
|
|
11352
|
+
minutes: nowMinutes,
|
|
11353
|
+
isToday
|
|
11269
11354
|
})
|
|
11270
|
-
|
|
11271
|
-
|
|
11272
|
-
|
|
11273
|
-
isToday
|
|
11274
|
-
})
|
|
11275
|
-
]
|
|
11276
|
-
})]
|
|
11355
|
+
]
|
|
11356
|
+
})
|
|
11357
|
+
]
|
|
11277
11358
|
});
|
|
11278
11359
|
}
|
|
11279
11360
|
|
|
11280
11361
|
// src/features/calendar/components/TimeColumn.tsx
|
|
11281
11362
|
function TimeColumn() {
|
|
11282
|
-
const { format } = useI18n();
|
|
11363
|
+
const { m, format } = useI18n();
|
|
11283
11364
|
return /* @__PURE__ */ jsxs("div", {
|
|
11284
11365
|
className: "dayTime",
|
|
11285
11366
|
"aria-hidden": "true",
|
|
11286
|
-
children: [
|
|
11287
|
-
className: "
|
|
11288
|
-
|
|
11289
|
-
className: "
|
|
11290
|
-
children:
|
|
11291
|
-
|
|
11292
|
-
|
|
11293
|
-
|
|
11294
|
-
|
|
11295
|
-
|
|
11296
|
-
|
|
11297
|
-
|
|
11298
|
-
|
|
11367
|
+
children: [
|
|
11368
|
+
/* @__PURE__ */ jsx("div", { className: "columnHeader" }),
|
|
11369
|
+
/* @__PURE__ */ jsx("div", {
|
|
11370
|
+
className: "allDayLane allDayLabel",
|
|
11371
|
+
children: m.events.allDay
|
|
11372
|
+
}),
|
|
11373
|
+
/* @__PURE__ */ jsx("div", {
|
|
11374
|
+
className: "slots",
|
|
11375
|
+
children: HOURS.map((hour) => /* @__PURE__ */ jsxs("div", {
|
|
11376
|
+
className: "time",
|
|
11377
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
11378
|
+
className: "compactHidden",
|
|
11379
|
+
children: format.hour(hour)
|
|
11380
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
11381
|
+
className: "compactOnly",
|
|
11382
|
+
children: format.compactHour(hour)
|
|
11383
|
+
})]
|
|
11384
|
+
}, hour))
|
|
11385
|
+
})
|
|
11386
|
+
]
|
|
11299
11387
|
});
|
|
11300
11388
|
}
|
|
11301
11389
|
|
|
11302
11390
|
// src/features/calendar/components/TimeGridView.tsx
|
|
11303
11391
|
var NO_SEGMENTS = [];
|
|
11304
|
-
|
|
11392
|
+
var NO_ALL_DAY = [];
|
|
11393
|
+
function TimeGridView({ dates, today, currentMinutes, segmentsByDate, canCreate, onCreate, onCreateRange, onCreateAllDay, onEventSelect, onShowDay }) {
|
|
11305
11394
|
const i18n = useI18n();
|
|
11306
11395
|
const containerRef = useRef(null);
|
|
11307
11396
|
const { selection, isClickSuppressed } = useSlotSelection(containerRef, canCreate, onCreateRange);
|
|
11308
11397
|
const range = useMemo(() => selection ? toSlotRange(selection) : null, [selection]);
|
|
11309
|
-
const rangeLabel = range ? formatEventPeriod(createEventInputForSlots(range.first, range.last), i18n) : null;
|
|
11398
|
+
const rangeLabel = range ? formatEventPeriod(createEventInputForSlots(range.first, range.last, null), i18n) : null;
|
|
11310
11399
|
const isSingleDay = dates.length === 1;
|
|
11400
|
+
const lanes = useMemo(() => splitAllDay(dates, segmentsByDate), [dates, segmentsByDate]);
|
|
11311
11401
|
const showsToday = dates.includes(today);
|
|
11312
11402
|
return /* @__PURE__ */ jsxs("div", {
|
|
11313
11403
|
ref: containerRef,
|
|
11314
11404
|
className: classNames("calendar", isSingleDay ? "calendar--day" : "calendar--week", range && "isSelecting"),
|
|
11405
|
+
style: { "--all-day-rows": lanes.rows },
|
|
11315
11406
|
children: [/* @__PURE__ */ jsx(TimeColumn, {}), dates.map((date) => {
|
|
11316
11407
|
const hours = range && getHoursOnDate(range, date);
|
|
11317
11408
|
return /* @__PURE__ */ jsx(DayColumn, {
|
|
11318
11409
|
date,
|
|
11319
11410
|
isToday: date === today,
|
|
11320
11411
|
nowMinutes: showsToday ? currentMinutes : null,
|
|
11321
|
-
segments:
|
|
11412
|
+
segments: lanes.timed.get(date) ?? NO_SEGMENTS,
|
|
11413
|
+
allDaySegments: lanes.allDay.get(date) ?? NO_ALL_DAY,
|
|
11322
11414
|
selection: hours && {
|
|
11323
11415
|
...hours,
|
|
11324
11416
|
label: date === range.first.date ? rangeLabel : null
|
|
@@ -11326,6 +11418,9 @@ function TimeGridView({ dates, today, currentMinutes, segmentsByDate, canCreate,
|
|
|
11326
11418
|
onSlotSelect: (slotDate, hour) => {
|
|
11327
11419
|
if (!isClickSuppressed()) onCreate(slotDate, hour);
|
|
11328
11420
|
},
|
|
11421
|
+
onAllDaySelect: (allDayDate) => {
|
|
11422
|
+
if (canCreate) onCreateAllDay(allDayDate);
|
|
11423
|
+
},
|
|
11329
11424
|
onEventSelect,
|
|
11330
11425
|
onHeaderSelect: isSingleDay ? void 0 : onShowDay
|
|
11331
11426
|
}, date);
|
|
@@ -11403,7 +11498,28 @@ function Calendar({ calendarIds, targetCalendarId, canCreate = true, eventSource
|
|
|
11403
11498
|
calendarIds,
|
|
11404
11499
|
targetCalendarId
|
|
11405
11500
|
});
|
|
11406
|
-
const
|
|
11501
|
+
const viewerTimeZone = useViewerTimeZone();
|
|
11502
|
+
const occurrences = useMemo(() => expandEvents(events, range.from, range.to, viewerTimeZone), [
|
|
11503
|
+
events,
|
|
11504
|
+
range,
|
|
11505
|
+
viewerTimeZone
|
|
11506
|
+
]);
|
|
11507
|
+
const occurrencesByKey = useMemo(() => new Map(occurrences.map((occurrence) => [occurrence.occurrenceKey, occurrence])), [occurrences]);
|
|
11508
|
+
const [dragPreview, setDragPreview] = useState(null);
|
|
11509
|
+
const [pendingDrop, setPendingDrop] = useState(null);
|
|
11510
|
+
const [dropError, setDropError] = useState(null);
|
|
11511
|
+
const segmentsByDate = useMemo(() => {
|
|
11512
|
+
const shown = dragPreview ? occurrences.map((occurrence) => occurrence.occurrenceKey === dragPreview.occurrenceKey ? {
|
|
11513
|
+
...occurrence,
|
|
11514
|
+
...dragPreview.period
|
|
11515
|
+
} : occurrence) : occurrences;
|
|
11516
|
+
return groupSegmentsByDate(shown, range);
|
|
11517
|
+
}, [
|
|
11518
|
+
occurrences,
|
|
11519
|
+
dragPreview,
|
|
11520
|
+
range
|
|
11521
|
+
]);
|
|
11522
|
+
const mainRef = useRef(null);
|
|
11407
11523
|
const [editor, setEditor] = useState(null);
|
|
11408
11524
|
const [eventToDelete, setEventToDelete] = useState(null);
|
|
11409
11525
|
useArrowKeyNavigation({
|
|
@@ -11412,19 +11528,25 @@ function Calendar({ calendarIds, targetCalendarId, canCreate = true, eventSource
|
|
|
11412
11528
|
});
|
|
11413
11529
|
const openCreate = useCallback((date, hour) => {
|
|
11414
11530
|
if (canCreate) setEditor({
|
|
11415
|
-
initialValue: createEventInput(date, hour),
|
|
11531
|
+
initialValue: createEventInput(date, hour, viewerTimeZone),
|
|
11416
11532
|
occurrence: null
|
|
11417
11533
|
});
|
|
11418
|
-
}, [canCreate]);
|
|
11534
|
+
}, [canCreate, viewerTimeZone]);
|
|
11419
11535
|
const openCreateRange = useCallback(({ first, last }) => {
|
|
11420
11536
|
if (canCreate) setEditor({
|
|
11421
|
-
initialValue: createEventInputForSlots(first, last),
|
|
11537
|
+
initialValue: createEventInputForSlots(first, last, viewerTimeZone),
|
|
11538
|
+
occurrence: null
|
|
11539
|
+
});
|
|
11540
|
+
}, [canCreate, viewerTimeZone]);
|
|
11541
|
+
const openCreateAllDay = useCallback((date) => {
|
|
11542
|
+
if (canCreate) setEditor({
|
|
11543
|
+
initialValue: createAllDayEventInput(date),
|
|
11422
11544
|
occurrence: null
|
|
11423
11545
|
});
|
|
11424
11546
|
}, [canCreate]);
|
|
11425
11547
|
const openEdit = useCallback((occurrence) => {
|
|
11426
11548
|
setEditor({
|
|
11427
|
-
initialValue:
|
|
11549
|
+
initialValue: toOccurrenceInput(occurrence),
|
|
11428
11550
|
occurrence
|
|
11429
11551
|
});
|
|
11430
11552
|
}, []);
|
|
@@ -11434,6 +11556,37 @@ function Calendar({ calendarIds, targetCalendarId, canCreate = true, eventSource
|
|
|
11434
11556
|
setEditor(null);
|
|
11435
11557
|
goToDate(input.startDate);
|
|
11436
11558
|
};
|
|
11559
|
+
const saveDrop = async (occurrence, period, scope) => {
|
|
11560
|
+
setPendingDrop(null);
|
|
11561
|
+
setDropError(null);
|
|
11562
|
+
try {
|
|
11563
|
+
await updateEvent(occurrence, toDropInput(occurrence, period, viewerTimeZone, scope), scope);
|
|
11564
|
+
} catch (caught) {
|
|
11565
|
+
setDropError(getErrorMessage(caught, i18n.m));
|
|
11566
|
+
} finally {
|
|
11567
|
+
setDragPreview(null);
|
|
11568
|
+
}
|
|
11569
|
+
};
|
|
11570
|
+
const handleDrop = (occurrence, period) => {
|
|
11571
|
+
setDragPreview({
|
|
11572
|
+
occurrenceKey: occurrence.occurrenceKey,
|
|
11573
|
+
period
|
|
11574
|
+
});
|
|
11575
|
+
const options = getScopeOptions(occurrence);
|
|
11576
|
+
if (options.length > 1) setPendingDrop({
|
|
11577
|
+
occurrence,
|
|
11578
|
+
period,
|
|
11579
|
+
options
|
|
11580
|
+
});
|
|
11581
|
+
else saveDrop(occurrence, period, options[0]);
|
|
11582
|
+
};
|
|
11583
|
+
useEventDrag({
|
|
11584
|
+
containerRef: mainRef,
|
|
11585
|
+
enabled: canCreate,
|
|
11586
|
+
occurrences: occurrencesByKey,
|
|
11587
|
+
onPreview: setDragPreview,
|
|
11588
|
+
onDrop: handleDrop
|
|
11589
|
+
});
|
|
11437
11590
|
const handleDelete = async (scope) => {
|
|
11438
11591
|
if (!eventToDelete) return;
|
|
11439
11592
|
await deleteEvent(eventToDelete, scope);
|
|
@@ -11442,56 +11595,73 @@ function Calendar({ calendarIds, targetCalendarId, canCreate = true, eventSource
|
|
|
11442
11595
|
};
|
|
11443
11596
|
const ViewComponent = VIEW_COMPONENTS[view];
|
|
11444
11597
|
const editorSource = editor?.occurrence ? eventSources.get(editor.occurrence.calendarId) : void 0;
|
|
11445
|
-
return /* @__PURE__ */
|
|
11598
|
+
return /* @__PURE__ */ jsx(EventSourcesContext, {
|
|
11446
11599
|
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
|
-
|
|
11600
|
+
children: /* @__PURE__ */ jsxs(DraggingEventContext, {
|
|
11601
|
+
value: dragPreview?.occurrenceKey ?? null,
|
|
11602
|
+
children: [
|
|
11603
|
+
/* @__PURE__ */ jsx(CalendarHeader, {
|
|
11604
|
+
view,
|
|
11605
|
+
title,
|
|
11606
|
+
subtitle,
|
|
11607
|
+
onViewChange: setView,
|
|
11608
|
+
onPrevious: previous,
|
|
11609
|
+
onNext: next,
|
|
11610
|
+
onToday: goToToday,
|
|
11611
|
+
onCreateEvent: canCreate ? () => openCreate(view === "day" ? anchor : today, now.getHours()) : void 0,
|
|
11612
|
+
context: headerContext,
|
|
11613
|
+
accessory: headerAccessory
|
|
11614
|
+
}),
|
|
11615
|
+
/* @__PURE__ */ jsx(ErrorMessage, {
|
|
11616
|
+
message: error,
|
|
11617
|
+
className: "textCenter"
|
|
11618
|
+
}),
|
|
11619
|
+
/* @__PURE__ */ jsx(ErrorMessage, {
|
|
11620
|
+
message: dropError,
|
|
11621
|
+
className: "textCenter"
|
|
11622
|
+
}),
|
|
11623
|
+
/* @__PURE__ */ jsx("main", {
|
|
11624
|
+
ref: mainRef,
|
|
11625
|
+
className: "main scrollArea",
|
|
11626
|
+
"data-view": view,
|
|
11627
|
+
children: /* @__PURE__ */ jsx(ViewComponent, {
|
|
11628
|
+
anchor,
|
|
11629
|
+
dates,
|
|
11630
|
+
today,
|
|
11631
|
+
currentMinutes: now.getHours() * 60 + now.getMinutes(),
|
|
11632
|
+
segmentsByDate,
|
|
11633
|
+
canCreate,
|
|
11634
|
+
onCreate: openCreate,
|
|
11635
|
+
onCreateRange: openCreateRange,
|
|
11636
|
+
onCreateAllDay: openCreateAllDay,
|
|
11637
|
+
onEventSelect: openEdit,
|
|
11638
|
+
onShowDay: (date) => show("day", date),
|
|
11639
|
+
onShowMonth: (date) => show("month", date)
|
|
11640
|
+
})
|
|
11641
|
+
}),
|
|
11642
|
+
editor && /* @__PURE__ */ jsx(EventModal, {
|
|
11643
|
+
initialValue: editor.initialValue,
|
|
11644
|
+
occurrence: editor.occurrence,
|
|
11645
|
+
notice: editorSource && i18n.m.calendar.sharedEventNotice(getSourceText(editorSource, i18n)),
|
|
11646
|
+
onSave: handleSave,
|
|
11647
|
+
onDelete: editor.occurrence ? () => setEventToDelete(editor.occurrence) : void 0,
|
|
11648
|
+
onClose: () => setEditor(null)
|
|
11649
|
+
}, editor.occurrence?.occurrenceKey ?? "new"),
|
|
11650
|
+
pendingDrop && /* @__PURE__ */ jsx(RecurrenceScopeModal, {
|
|
11651
|
+
options: pendingDrop.options,
|
|
11652
|
+
onSelect: (scope) => void saveDrop(pendingDrop.occurrence, pendingDrop.period, scope),
|
|
11653
|
+
onClose: () => {
|
|
11654
|
+
setPendingDrop(null);
|
|
11655
|
+
setDragPreview(null);
|
|
11656
|
+
}
|
|
11657
|
+
}),
|
|
11658
|
+
eventToDelete && /* @__PURE__ */ jsx(DeleteEventModal, {
|
|
11659
|
+
occurrence: eventToDelete,
|
|
11660
|
+
onConfirm: handleDelete,
|
|
11661
|
+
onClose: () => setEventToDelete(null)
|
|
11479
11662
|
})
|
|
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
|
-
]
|
|
11663
|
+
]
|
|
11664
|
+
})
|
|
11495
11665
|
});
|
|
11496
11666
|
}
|
|
11497
11667
|
|
|
@@ -11633,6 +11803,30 @@ function GeneralSection({ calendar }) {
|
|
|
11633
11803
|
});
|
|
11634
11804
|
}
|
|
11635
11805
|
|
|
11806
|
+
// src/features/calendars/components/settings/RoleOverview.tsx
|
|
11807
|
+
function RoleOverview() {
|
|
11808
|
+
const { m } = useI18n();
|
|
11809
|
+
const root = useRootElement();
|
|
11810
|
+
const { roles, roleDescriptions, roleOverview } = m.calendars;
|
|
11811
|
+
return /* @__PURE__ */ jsxs("details", {
|
|
11812
|
+
className: "roleOverview",
|
|
11813
|
+
open: !isCompactWidth(root.clientWidth),
|
|
11814
|
+
children: [/* @__PURE__ */ jsx("summary", {
|
|
11815
|
+
className: "roleOverviewTitle",
|
|
11816
|
+
children: roleOverview
|
|
11817
|
+
}), /* @__PURE__ */ jsx("ul", {
|
|
11818
|
+
className: "roleOverviewList",
|
|
11819
|
+
children: TEAM_ROLES.map((role) => /* @__PURE__ */ jsxs("li", { children: [/* @__PURE__ */ jsx("span", {
|
|
11820
|
+
className: "roleOverviewName",
|
|
11821
|
+
children: roles[role]
|
|
11822
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
11823
|
+
className: "roleOverviewText",
|
|
11824
|
+
children: roleDescriptions[role]
|
|
11825
|
+
})] }, role))
|
|
11826
|
+
})]
|
|
11827
|
+
});
|
|
11828
|
+
}
|
|
11829
|
+
|
|
11636
11830
|
// src/features/calendars/components/settings/MembersSection.tsx
|
|
11637
11831
|
function MemberRow({ member, isSelf, canManage, roles, onChangeRole, onRemove }) {
|
|
11638
11832
|
const { m } = useI18n();
|
|
@@ -11683,6 +11877,7 @@ function MembersSection({ calendar, members, error, currentUserId, onChangeRole,
|
|
|
11683
11877
|
return /* @__PURE__ */ jsxs(PageSection, {
|
|
11684
11878
|
title: text.title,
|
|
11685
11879
|
description: text.description,
|
|
11880
|
+
aside: /* @__PURE__ */ jsx(RoleOverview, {}),
|
|
11686
11881
|
children: [
|
|
11687
11882
|
/* @__PURE__ */ jsx(ErrorMessage, { message: error }),
|
|
11688
11883
|
/* @__PURE__ */ jsx("ul", {
|
|
@@ -12243,6 +12438,7 @@ function CalendarSwitcherModal({ onClose }) {
|
|
|
12243
12438
|
const { m } = useI18n();
|
|
12244
12439
|
const { switcher } = m.calendars;
|
|
12245
12440
|
const { calendars, invitations, activeCalendar, selectCalendar } = useCalendars();
|
|
12441
|
+
const { user } = useAuth();
|
|
12246
12442
|
const personal = calendars.filter(isPersonalCalendar);
|
|
12247
12443
|
const teams = calendars.filter((calendar) => !isPersonalCalendar(calendar));
|
|
12248
12444
|
const renderCards = (list, extra) => /* @__PURE__ */ jsxs("ul", {
|
|
@@ -12270,13 +12466,13 @@ function CalendarSwitcherModal({ onClose }) {
|
|
|
12270
12466
|
children: switcher.personal
|
|
12271
12467
|
}), renderCards(personal)]
|
|
12272
12468
|
}),
|
|
12273
|
-
invitations.length > 0 && /* @__PURE__ */ jsxs("p", {
|
|
12469
|
+
user?.emailVerified && invitations.length > 0 && /* @__PURE__ */ jsxs("p", {
|
|
12274
12470
|
className: "formHint",
|
|
12275
12471
|
children: [
|
|
12276
12472
|
switcher.openInvitations(invitations.length),
|
|
12277
12473
|
" ",
|
|
12278
12474
|
/* @__PURE__ */ jsx(Link, {
|
|
12279
|
-
to:
|
|
12475
|
+
to: SETTINGS_INVITATIONS_PATH,
|
|
12280
12476
|
onClick: onClose,
|
|
12281
12477
|
children: switcher.view
|
|
12282
12478
|
})
|
|
@@ -12541,16 +12737,18 @@ function SegmentedField({ label, ...controlProps }) {
|
|
|
12541
12737
|
|
|
12542
12738
|
// src/features/preferences/components/PreferencesSettings.tsx
|
|
12543
12739
|
function PreferencesSettings() {
|
|
12544
|
-
const { m } = useI18n();
|
|
12740
|
+
const { m, languages } = useI18n();
|
|
12545
12741
|
const { preferences, updatePreferences } = usePreferences();
|
|
12546
12742
|
const { run, error } = useAsyncAction(updatePreferences);
|
|
12547
12743
|
const themeOptions = THEMES$1.map((theme) => ({
|
|
12548
12744
|
value: theme,
|
|
12549
12745
|
label: m.themes[theme]
|
|
12550
12746
|
}));
|
|
12551
|
-
const
|
|
12747
|
+
const choices = getLocaleChoices(languages);
|
|
12748
|
+
if (!choices.includes(preferences.locale)) choices.push(preferences.locale);
|
|
12749
|
+
const languageOptions = choices.map((choice) => ({
|
|
12552
12750
|
value: choice,
|
|
12553
|
-
label: m.settings.
|
|
12751
|
+
label: choice === "auto" ? m.settings.languageAuto : getLocaleName(choice)
|
|
12554
12752
|
}));
|
|
12555
12753
|
const viewOptions = getViewOptions(m);
|
|
12556
12754
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
@@ -12644,15 +12842,23 @@ function CalendarPage() {
|
|
|
12644
12842
|
function SettingsPage() {
|
|
12645
12843
|
const { m } = useI18n();
|
|
12646
12844
|
const { enabled, method, user } = useAuth();
|
|
12845
|
+
const { teams } = useHost();
|
|
12846
|
+
const { invitations } = useCalendars();
|
|
12647
12847
|
const tabs = [{
|
|
12648
12848
|
value: "calendars",
|
|
12649
12849
|
label: m.settings.tabs.calendars,
|
|
12650
12850
|
content: /* @__PURE__ */ jsx(CalendarSettings, {})
|
|
12651
|
-
}
|
|
12851
|
+
}];
|
|
12852
|
+
if (teams && user?.emailVerified) tabs.push({
|
|
12853
|
+
value: "invitations",
|
|
12854
|
+
label: m.calendars.settings.withCount(m.settings.tabs.invitations, invitations.length),
|
|
12855
|
+
content: /* @__PURE__ */ jsx(InvitationList, {})
|
|
12856
|
+
});
|
|
12857
|
+
tabs.push({
|
|
12652
12858
|
value: "appearance",
|
|
12653
12859
|
label: m.settings.tabs.appearance,
|
|
12654
12860
|
content: /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(PreferencesSettings, {}), /* @__PURE__ */ jsx(CustomColorSettings, {})] })
|
|
12655
|
-
}
|
|
12861
|
+
});
|
|
12656
12862
|
if (enabled && user && method === "password") tabs.push({
|
|
12657
12863
|
value: "account",
|
|
12658
12864
|
label: m.settings.tabs.account,
|
|
@@ -12822,7 +13028,7 @@ var DEFAULT_CONFIG = {
|
|
|
12822
13028
|
};
|
|
12823
13029
|
|
|
12824
13030
|
// 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)}";
|
|
13031
|
+
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
13032
|
|
|
12827
13033
|
// src/lib/IsolatedRoot.tsx
|
|
12828
13034
|
var ROOT_CLASS = "calendarRoot";
|
|
@@ -12873,7 +13079,7 @@ var readLinkedPath = (param) => {
|
|
|
12873
13079
|
};
|
|
12874
13080
|
|
|
12875
13081
|
// 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 }) {
|
|
13082
|
+
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
13083
|
const auth = features?.auth ?? DEFAULT_CONFIG.features.auth;
|
|
12878
13084
|
const teams = features?.teams ?? DEFAULT_CONFIG.features.teams;
|
|
12879
13085
|
const dataSource = useMemo(() => providedDataSource ?? (tenant ? tenantDataSource({
|
|
@@ -12895,14 +13101,17 @@ function CalendarWidget({ dataSource: providedDataSource, tenant, getUserToken,
|
|
|
12895
13101
|
apiBaseUrl,
|
|
12896
13102
|
apiTimeoutMs
|
|
12897
13103
|
]);
|
|
13104
|
+
const viewerTimeZone = timeZone && isTimeZone(timeZone) ? timeZone : void 0;
|
|
12898
13105
|
const host = useMemo(() => ({
|
|
12899
13106
|
teams,
|
|
12900
13107
|
theme,
|
|
12901
|
-
initialView
|
|
13108
|
+
initialView,
|
|
13109
|
+
timeZone: viewerTimeZone
|
|
12902
13110
|
}), [
|
|
12903
13111
|
teams,
|
|
12904
13112
|
theme,
|
|
12905
|
-
initialView
|
|
13113
|
+
initialView,
|
|
13114
|
+
viewerTimeZone
|
|
12906
13115
|
]);
|
|
12907
13116
|
const callbacks = useRef({});
|
|
12908
13117
|
useEffect(() => {
|
|
@@ -12925,6 +13134,7 @@ function CalendarWidget({ dataSource: providedDataSource, tenant, getUserToken,
|
|
|
12925
13134
|
value: host,
|
|
12926
13135
|
children: /* @__PURE__ */ jsx(I18nProvider, {
|
|
12927
13136
|
locale,
|
|
13137
|
+
messages,
|
|
12928
13138
|
children: /* @__PURE__ */ jsx(CalendarApp, {
|
|
12929
13139
|
dataSource,
|
|
12930
13140
|
eventCallbacks: callbacks,
|
|
@@ -12938,7 +13148,7 @@ function CalendarWidget({ dataSource: providedDataSource, tenant, getUserToken,
|
|
|
12938
13148
|
}
|
|
12939
13149
|
|
|
12940
13150
|
// src/lib/version.ts
|
|
12941
|
-
var VERSION = "
|
|
13151
|
+
var VERSION = "1.0.0";
|
|
12942
13152
|
|
|
12943
13153
|
// src/lib/element.tsx
|
|
12944
13154
|
var DEFAULT_ELEMENT_NAME = "calendar-widget";
|
|
@@ -12955,7 +13165,8 @@ var ATTRIBUTES = [
|
|
|
12955
13165
|
"tenant",
|
|
12956
13166
|
"theme",
|
|
12957
13167
|
"initial-view",
|
|
12958
|
-
"link-param"
|
|
13168
|
+
"link-param",
|
|
13169
|
+
"time-zone"
|
|
12959
13170
|
];
|
|
12960
13171
|
var CalendarElement = class extends HTMLElement {
|
|
12961
13172
|
static observedAttributes = ATTRIBUTES;
|
|
@@ -12963,6 +13174,7 @@ var CalendarElement = class extends HTMLElement {
|
|
|
12963
13174
|
#root = null;
|
|
12964
13175
|
#dataSource;
|
|
12965
13176
|
#getUserToken;
|
|
13177
|
+
#messages;
|
|
12966
13178
|
get dataSource() {
|
|
12967
13179
|
return this.#dataSource;
|
|
12968
13180
|
}
|
|
@@ -12977,9 +13189,17 @@ var CalendarElement = class extends HTMLElement {
|
|
|
12977
13189
|
this.#getUserToken = value;
|
|
12978
13190
|
if (this.#root) this.#render();
|
|
12979
13191
|
}
|
|
13192
|
+
get messages() {
|
|
13193
|
+
return this.#messages;
|
|
13194
|
+
}
|
|
13195
|
+
set messages(value) {
|
|
13196
|
+
this.#messages = value;
|
|
13197
|
+
if (this.#root) this.#render();
|
|
13198
|
+
}
|
|
12980
13199
|
connectedCallback() {
|
|
12981
13200
|
this.#adoptEarlyProperty("dataSource");
|
|
12982
13201
|
this.#adoptEarlyProperty("getUserToken");
|
|
13202
|
+
this.#adoptEarlyProperty("messages");
|
|
12983
13203
|
if (!this.style.display) this.style.display = "block";
|
|
12984
13204
|
this.#root ??= createRoot(this);
|
|
12985
13205
|
this.#render();
|
|
@@ -13031,12 +13251,14 @@ var CalendarElement = class extends HTMLElement {
|
|
|
13031
13251
|
tenant: this.getAttribute("tenant") ?? void 0,
|
|
13032
13252
|
theme: isOneOf(THEMES, theme) ? theme : void 0,
|
|
13033
13253
|
initialView: isCalendarView(initialView) ? initialView : void 0,
|
|
13254
|
+
timeZone: this.getAttribute("time-zone") ?? void 0,
|
|
13034
13255
|
linkParam: linkParam === "false" ? false : linkParam ?? void 0,
|
|
13035
13256
|
onEventCreate: this.#onEventCreate,
|
|
13036
13257
|
onEventUpdate: this.#onEventUpdate,
|
|
13037
13258
|
onEventDelete: this.#onEventDelete,
|
|
13038
13259
|
dataSource: this.#dataSource,
|
|
13039
|
-
getUserToken: this.#getUserToken
|
|
13260
|
+
getUserToken: this.#getUserToken,
|
|
13261
|
+
messages: this.#messages
|
|
13040
13262
|
};
|
|
13041
13263
|
}
|
|
13042
13264
|
#render() {
|