@burdenoff/microfe-calendar 2026.1114.1 → 2026.1119.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/EventFormModal.js +207 -207
- package/dist/components/EventFormModal.js.map +1 -1
- package/dist/pages/CalendarPage.js +110 -110
- package/dist/pages/CalendarPage.js.map +1 -1
- package/dist/pages/EventDetailsPage.js +156 -156
- package/dist/pages/EventDetailsPage.js.map +1 -1
- package/dist/pages/ResourcesPage.js +116 -116
- package/dist/pages/ResourcesPage.js.map +1 -1
- package/dist/pages/SettingsPage.js +161 -161
- package/dist/pages/SettingsPage.js.map +1 -1
- package/package.json +9 -9
|
@@ -3,54 +3,54 @@ import { useCreateEventMutation as t, useGetCalendarsQuery as n, useUpdateEventM
|
|
|
3
3
|
import { useEffect as i, useMemo as a, useState as o } from "react";
|
|
4
4
|
import { AlignLeft as s, Calendar as c, Clock as l, MapPin as u, Tag as d } from "lucide-react";
|
|
5
5
|
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
6
|
-
import { Button as m, OptionalFields as h, ResponsiveDialog as g, ResponsiveDialogContent as _, ResponsiveDialogFooter as v, ResponsiveDialogHeader as y, ResponsiveDialogTitle as b } from "@burdenoff/fe-libs/ui";
|
|
6
|
+
import { Button as m, OptionalFields as h, ResponsiveDialog as g, ResponsiveDialogContent as _, ResponsiveDialogFooter as v, ResponsiveDialogHeader as y, ResponsiveDialogTitle as b, ThemedSelect as x } from "@burdenoff/fe-libs/ui";
|
|
7
7
|
// src/components/EventFormModal.tsx
|
|
8
|
-
function
|
|
8
|
+
function S(e) {
|
|
9
9
|
return `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}-${String(e.getDate()).padStart(2, "0")}`;
|
|
10
10
|
}
|
|
11
|
-
function
|
|
11
|
+
function C(e) {
|
|
12
12
|
return `${String(e.getHours()).padStart(2, "0")}:${String(e.getMinutes()).padStart(2, "0")}`;
|
|
13
13
|
}
|
|
14
|
-
function
|
|
14
|
+
function w(e, t) {
|
|
15
15
|
return (/* @__PURE__ */ new Date(`${e}T${t}:00`)).toISOString();
|
|
16
16
|
}
|
|
17
|
-
var
|
|
18
|
-
let
|
|
19
|
-
MEETING:
|
|
20
|
-
TASK:
|
|
21
|
-
MILESTONE:
|
|
22
|
-
PROMPT:
|
|
23
|
-
}, N = {
|
|
24
|
-
PUBLIC: j("calendar.visibilityPublic", "Public"),
|
|
25
|
-
PRIVATE: j("calendar.visibilityPrivate", "Private"),
|
|
26
|
-
CONFIDENTIAL: j("calendar.visibilityConfidential", "Confidential")
|
|
17
|
+
var T = ({ open: T, event: E, defaultDate: D, defaultStartHour: O, onClose: k, onSuccess: A }) => {
|
|
18
|
+
let j = !!E, M = e(), N = {
|
|
19
|
+
MEETING: M("calendar.meeting", "Meeting"),
|
|
20
|
+
TASK: M("calendar.task", "Task"),
|
|
21
|
+
MILESTONE: M("calendar.milestone", "Milestone"),
|
|
22
|
+
PROMPT: M("calendar.prompt", "Prompt")
|
|
27
23
|
}, P = {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
TBD: j("calendar.locationTbd", "To be decided")
|
|
24
|
+
PUBLIC: M("calendar.visibilityPublic", "Public"),
|
|
25
|
+
PRIVATE: M("calendar.visibilityPrivate", "Private"),
|
|
26
|
+
CONFIDENTIAL: M("calendar.visibilityConfidential", "Confidential")
|
|
32
27
|
}, F = {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
28
|
+
PHYSICAL: M("calendar.locationPhysical", "Physical"),
|
|
29
|
+
ONLINE: M("calendar.locationOnline", "Online"),
|
|
30
|
+
HYBRID: M("calendar.locationHybrid", "Hybrid"),
|
|
31
|
+
TBD: M("calendar.locationTbd", "To be decided")
|
|
32
|
+
}, I = {
|
|
33
|
+
ZOOM: M("calendar.providerZoom", "Zoom"),
|
|
34
|
+
GOOGLE_MEET: M("calendar.providerGoogleMeet", "Google Meet"),
|
|
35
|
+
MICROSOFT_TEAMS: M("calendar.providerMicrosoftTeams", "Microsoft Teams"),
|
|
36
|
+
WEBEX: M("calendar.providerWebex", "Webex"),
|
|
37
|
+
CUSTOM: M("calendar.customMeetingProvider", "Custom")
|
|
38
|
+
}, { data: L } = n({ variables: { pagination: { limit: 50 } } }), R = a(() => L?.calendars?.calendars ?? [], [L?.calendars?.calendars]), [z, { loading: B, error: V }] = t(), [H, { loading: U, error: W }] = r(), G = B || U, K = V || W, { defaultStart: q, defaultEnd: J } = a(() => {
|
|
39
|
+
let e = D ?? /* @__PURE__ */ new Date(), t = O ?? e.getHours() + 1, n = new Date(e);
|
|
40
40
|
n.setHours(t, 0, 0, 0);
|
|
41
41
|
let r = new Date(n);
|
|
42
42
|
return r.setHours(t + 1, 0, 0, 0), {
|
|
43
43
|
defaultStart: n,
|
|
44
44
|
defaultEnd: r
|
|
45
45
|
};
|
|
46
|
-
}, [
|
|
46
|
+
}, [D, O]), [Y, X] = o({
|
|
47
47
|
title: "",
|
|
48
48
|
description: "",
|
|
49
49
|
calendarId: "",
|
|
50
|
-
startDate:
|
|
51
|
-
startTime:
|
|
52
|
-
endDate:
|
|
53
|
-
endTime:
|
|
50
|
+
startDate: S(q),
|
|
51
|
+
startTime: C(q),
|
|
52
|
+
endDate: S(J),
|
|
53
|
+
endTime: C(J),
|
|
54
54
|
allDay: !1,
|
|
55
55
|
location: "",
|
|
56
56
|
locationAddress: "",
|
|
@@ -69,17 +69,17 @@ var w = ({ open: w, event: T, defaultDate: E, defaultStartHour: D, onClose: O, o
|
|
|
69
69
|
timezone: Intl.DateTimeFormat().resolvedOptions().timeZone
|
|
70
70
|
});
|
|
71
71
|
i(() => {
|
|
72
|
-
if (
|
|
73
|
-
let e =
|
|
72
|
+
if (E) {
|
|
73
|
+
let e = E;
|
|
74
74
|
Promise.resolve().then(() => {
|
|
75
|
-
|
|
75
|
+
X({
|
|
76
76
|
title: e.title,
|
|
77
77
|
description: e.description ?? "",
|
|
78
78
|
calendarId: e.calendarId,
|
|
79
|
-
startDate:
|
|
80
|
-
startTime:
|
|
81
|
-
endDate:
|
|
82
|
-
endTime:
|
|
79
|
+
startDate: S(e.startTime),
|
|
80
|
+
startTime: C(e.startTime),
|
|
81
|
+
endDate: S(e.endTime),
|
|
82
|
+
endTime: C(e.endTime),
|
|
83
83
|
allDay: e.isAllDay,
|
|
84
84
|
location: e.location ?? "",
|
|
85
85
|
locationAddress: e.locationAddress ?? "",
|
|
@@ -99,9 +99,9 @@ var w = ({ open: w, event: T, defaultDate: E, defaultStartHour: D, onClose: O, o
|
|
|
99
99
|
});
|
|
100
100
|
});
|
|
101
101
|
} else {
|
|
102
|
-
let e =
|
|
102
|
+
let e = R.find((e) => e.isDefault) ?? R[0];
|
|
103
103
|
Promise.resolve().then(() => {
|
|
104
|
-
|
|
104
|
+
X((t) => ({
|
|
105
105
|
...t,
|
|
106
106
|
title: "",
|
|
107
107
|
description: "",
|
|
@@ -110,10 +110,10 @@ var w = ({ open: w, event: T, defaultDate: E, defaultStartHour: D, onClose: O, o
|
|
|
110
110
|
locationAddress: "",
|
|
111
111
|
locationUrl: "",
|
|
112
112
|
locationType: "PHYSICAL",
|
|
113
|
-
startDate:
|
|
114
|
-
startTime:
|
|
115
|
-
endDate:
|
|
116
|
-
endTime:
|
|
113
|
+
startDate: S(q),
|
|
114
|
+
startTime: C(q),
|
|
115
|
+
endDate: S(J),
|
|
116
|
+
endTime: C(J),
|
|
117
117
|
allDay: !1,
|
|
118
118
|
status: "CONFIRMED",
|
|
119
119
|
visibility: "PUBLIC",
|
|
@@ -128,93 +128,93 @@ var w = ({ open: w, event: T, defaultDate: E, defaultStartHour: D, onClose: O, o
|
|
|
128
128
|
});
|
|
129
129
|
}
|
|
130
130
|
}, [
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
131
|
+
E,
|
|
132
|
+
R,
|
|
133
|
+
q,
|
|
134
|
+
J
|
|
135
135
|
]);
|
|
136
|
-
let
|
|
137
|
-
|
|
136
|
+
let Z = (e, t) => {
|
|
137
|
+
X((n) => ({
|
|
138
138
|
...n,
|
|
139
139
|
[e]: t
|
|
140
140
|
}));
|
|
141
141
|
};
|
|
142
142
|
return /* @__PURE__ */ f(g, {
|
|
143
|
-
open:
|
|
143
|
+
open: T,
|
|
144
144
|
onOpenChange: (e) => {
|
|
145
|
-
e ||
|
|
145
|
+
e || k();
|
|
146
146
|
},
|
|
147
147
|
children: /* @__PURE__ */ p(_, {
|
|
148
148
|
className: "max-w-lg",
|
|
149
|
-
children: [/* @__PURE__ */ f(y, { children: /* @__PURE__ */ f(b, { children:
|
|
149
|
+
children: [/* @__PURE__ */ f(y, { children: /* @__PURE__ */ f(b, { children: j ? M("calendar.editEvent", "Edit Event") : M("calendar.createEvent", "Create Event") }) }), /* @__PURE__ */ p("form", {
|
|
150
150
|
onSubmit: async (e) => {
|
|
151
|
-
if (e.preventDefault(), !
|
|
152
|
-
let t =
|
|
153
|
-
if (
|
|
154
|
-
id:
|
|
151
|
+
if (e.preventDefault(), !Y.title.trim()) return;
|
|
152
|
+
let t = Y.allDay ? (/* @__PURE__ */ new Date(`${Y.startDate}T00:00:00`)).toISOString() : w(Y.startDate, Y.startTime), n = Y.allDay ? (/* @__PURE__ */ new Date(`${Y.endDate}T23:59:59`)).toISOString() : w(Y.endDate, Y.endTime);
|
|
153
|
+
if (j && E) await H({ variables: {
|
|
154
|
+
id: E.id,
|
|
155
155
|
input: {
|
|
156
|
-
title:
|
|
157
|
-
description:
|
|
158
|
-
location:
|
|
159
|
-
locationAddress:
|
|
160
|
-
locationUrl:
|
|
161
|
-
locationType:
|
|
156
|
+
title: Y.title,
|
|
157
|
+
description: Y.description || void 0,
|
|
158
|
+
location: Y.location || void 0,
|
|
159
|
+
locationAddress: Y.locationAddress || void 0,
|
|
160
|
+
locationUrl: Y.locationUrl || void 0,
|
|
161
|
+
locationType: Y.locationType,
|
|
162
162
|
startTime: t,
|
|
163
163
|
endTime: n,
|
|
164
|
-
allDay:
|
|
165
|
-
status:
|
|
166
|
-
visibility:
|
|
167
|
-
onlineMeetingProvider:
|
|
168
|
-
onlineMeetingUrl:
|
|
169
|
-
maxAttendees:
|
|
170
|
-
checkInEnabled:
|
|
171
|
-
tags:
|
|
164
|
+
allDay: Y.allDay,
|
|
165
|
+
status: Y.status,
|
|
166
|
+
visibility: Y.visibility,
|
|
167
|
+
onlineMeetingProvider: Y.onlineMeetingProvider,
|
|
168
|
+
onlineMeetingUrl: Y.onlineMeetingUrl || void 0,
|
|
169
|
+
maxAttendees: Y.maxAttendees ? parseInt(Y.maxAttendees, 10) : void 0,
|
|
170
|
+
checkInEnabled: Y.checkInEnabled,
|
|
171
|
+
tags: Y.tagsText.split(",").flatMap((e) => {
|
|
172
172
|
let t = e.trim();
|
|
173
173
|
return t ? [t] : [];
|
|
174
174
|
}),
|
|
175
|
-
rrule:
|
|
176
|
-
timezone:
|
|
175
|
+
rrule: Y.isRecurring && Y.rrule.trim() ? Y.rrule.trim() : void 0,
|
|
176
|
+
timezone: Y.timezone
|
|
177
177
|
}
|
|
178
178
|
} });
|
|
179
179
|
else {
|
|
180
|
-
let e = (await
|
|
181
|
-
title:
|
|
182
|
-
description:
|
|
183
|
-
calendarId:
|
|
184
|
-
location:
|
|
185
|
-
locationAddress:
|
|
186
|
-
locationUrl:
|
|
187
|
-
locationType:
|
|
180
|
+
let e = (await z({ variables: { input: {
|
|
181
|
+
title: Y.title,
|
|
182
|
+
description: Y.description || void 0,
|
|
183
|
+
calendarId: Y.calendarId,
|
|
184
|
+
location: Y.location || void 0,
|
|
185
|
+
locationAddress: Y.locationAddress || void 0,
|
|
186
|
+
locationUrl: Y.locationUrl || void 0,
|
|
187
|
+
locationType: Y.locationType,
|
|
188
188
|
startTime: t,
|
|
189
189
|
endTime: n,
|
|
190
|
-
allDay:
|
|
191
|
-
eventType:
|
|
192
|
-
status:
|
|
193
|
-
onlineMeetingProvider:
|
|
194
|
-
onlineMeetingUrl:
|
|
195
|
-
maxAttendees:
|
|
196
|
-
checkInEnabled:
|
|
197
|
-
isRecurring:
|
|
198
|
-
rrule:
|
|
199
|
-
tags:
|
|
190
|
+
allDay: Y.allDay,
|
|
191
|
+
eventType: Y.eventType,
|
|
192
|
+
status: Y.status,
|
|
193
|
+
onlineMeetingProvider: Y.onlineMeetingProvider,
|
|
194
|
+
onlineMeetingUrl: Y.onlineMeetingUrl || void 0,
|
|
195
|
+
maxAttendees: Y.maxAttendees ? parseInt(Y.maxAttendees, 10) : void 0,
|
|
196
|
+
checkInEnabled: Y.checkInEnabled,
|
|
197
|
+
isRecurring: Y.isRecurring,
|
|
198
|
+
rrule: Y.isRecurring && Y.rrule.trim() ? Y.rrule.trim() : void 0,
|
|
199
|
+
tags: Y.tagsText.split(",").flatMap((e) => {
|
|
200
200
|
let t = e.trim();
|
|
201
201
|
return t ? [t] : [];
|
|
202
202
|
}),
|
|
203
|
-
timezone:
|
|
203
|
+
timezone: Y.timezone
|
|
204
204
|
} } })).data?.createEvent.id;
|
|
205
|
-
e &&
|
|
205
|
+
e && Y.visibility !== "PUBLIC" && await H({ variables: {
|
|
206
206
|
id: e,
|
|
207
|
-
input: { visibility:
|
|
207
|
+
input: { visibility: Y.visibility }
|
|
208
208
|
} });
|
|
209
209
|
}
|
|
210
|
-
|
|
210
|
+
A?.(), k();
|
|
211
211
|
},
|
|
212
212
|
children: [
|
|
213
|
-
|
|
213
|
+
K && /* @__PURE__ */ f("div", {
|
|
214
214
|
className: "mb-4 p-3 rounded-radius-md bg-red-50 dark:bg-red-950/20 border border-red-200 dark:border-red-800",
|
|
215
215
|
children: /* @__PURE__ */ f("p", {
|
|
216
216
|
className: "font-text-sm text-red-700 dark:text-red-300",
|
|
217
|
-
children:
|
|
217
|
+
children: K.message
|
|
218
218
|
})
|
|
219
219
|
}),
|
|
220
220
|
/* @__PURE__ */ p("div", {
|
|
@@ -224,7 +224,7 @@ var w = ({ open: w, event: T, defaultDate: E, defaultStartHour: D, onClose: O, o
|
|
|
224
224
|
htmlFor: "event-title",
|
|
225
225
|
className: "block font-text-sm font-weight-medium text-text-primary mb-1",
|
|
226
226
|
children: [
|
|
227
|
-
|
|
227
|
+
M("calendar.eventTitleLabel", "Title"),
|
|
228
228
|
" ",
|
|
229
229
|
/* @__PURE__ */ f("span", {
|
|
230
230
|
className: "text-red-500",
|
|
@@ -235,67 +235,67 @@ var w = ({ open: w, event: T, defaultDate: E, defaultStartHour: D, onClose: O, o
|
|
|
235
235
|
id: "event-title",
|
|
236
236
|
type: "text",
|
|
237
237
|
required: !0,
|
|
238
|
-
value:
|
|
239
|
-
onChange: (e) =>
|
|
240
|
-
placeholder:
|
|
241
|
-
"aria-label":
|
|
238
|
+
value: Y.title,
|
|
239
|
+
onChange: (e) => Z("title", e.target.value),
|
|
240
|
+
placeholder: M("calendar.addTitle", "Add title"),
|
|
241
|
+
"aria-label": M("calendar.eventTitleLabel", "Title"),
|
|
242
242
|
className: "w-full px-3 py-2 rounded-radius-md border border-border-default bg-bg-surface text-text-primary font-text-sm placeholder:text-text-tertiary focus:outline-none focus:ring-2 focus:ring-action-primary-border"
|
|
243
243
|
})] }),
|
|
244
|
-
!
|
|
244
|
+
!j && /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ p("label", {
|
|
245
245
|
htmlFor: "event-calendar",
|
|
246
246
|
className: "flex items-center gap-2 font-text-sm font-weight-medium text-text-primary mb-1",
|
|
247
|
-
children: [/* @__PURE__ */ f(c, { className: "size-4 text-text-secondary" }),
|
|
248
|
-
}), /* @__PURE__ */ p(
|
|
247
|
+
children: [/* @__PURE__ */ f(c, { className: "size-4 text-text-secondary" }), M("calendar.calendar", "Calendar")]
|
|
248
|
+
}), /* @__PURE__ */ p(x, {
|
|
249
249
|
id: "event-calendar",
|
|
250
|
-
value:
|
|
251
|
-
onChange: (e) =>
|
|
250
|
+
value: Y.calendarId,
|
|
251
|
+
onChange: (e) => Z("calendarId", e.target.value),
|
|
252
252
|
className: "w-full px-3 py-2 rounded-radius-md border border-border-default bg-bg-surface text-text-primary font-text-sm focus:outline-none focus:ring-2 focus:ring-action-primary-border scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
|
|
253
253
|
children: [/* @__PURE__ */ f("option", {
|
|
254
254
|
value: "",
|
|
255
|
-
children:
|
|
256
|
-
}),
|
|
255
|
+
children: M("calendar.selectCalendar", "Select calendar")
|
|
256
|
+
}), R.map((e) => /* @__PURE__ */ f("option", {
|
|
257
257
|
value: e.id,
|
|
258
258
|
children: e.name
|
|
259
259
|
}, e.id))]
|
|
260
260
|
})] }),
|
|
261
|
-
!
|
|
261
|
+
!j && /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ p("label", {
|
|
262
262
|
htmlFor: "event-type",
|
|
263
263
|
className: "flex items-center gap-2 font-text-sm font-weight-medium text-text-primary mb-1",
|
|
264
|
-
children: [/* @__PURE__ */ f(d, { className: "size-4 text-text-secondary" }),
|
|
265
|
-
}), /* @__PURE__ */ p(
|
|
264
|
+
children: [/* @__PURE__ */ f(d, { className: "size-4 text-text-secondary" }), M("calendar.eventType", "Event Type")]
|
|
265
|
+
}), /* @__PURE__ */ p(x, {
|
|
266
266
|
id: "event-type",
|
|
267
|
-
value:
|
|
268
|
-
onChange: (e) =>
|
|
267
|
+
value: Y.eventType,
|
|
268
|
+
onChange: (e) => Z("eventType", e.target.value),
|
|
269
269
|
className: "w-full px-3 py-2 rounded-radius-md border border-border-default bg-bg-surface text-text-primary font-text-sm focus:outline-none focus:ring-2 focus:ring-action-primary-border scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
|
|
270
270
|
children: [
|
|
271
271
|
/* @__PURE__ */ f("option", {
|
|
272
272
|
value: "MEETING",
|
|
273
|
-
children:
|
|
273
|
+
children: N.MEETING
|
|
274
274
|
}),
|
|
275
275
|
/* @__PURE__ */ f("option", {
|
|
276
276
|
value: "TASK",
|
|
277
|
-
children:
|
|
277
|
+
children: N.TASK
|
|
278
278
|
}),
|
|
279
279
|
/* @__PURE__ */ f("option", {
|
|
280
280
|
value: "MILESTONE",
|
|
281
|
-
children:
|
|
281
|
+
children: N.MILESTONE
|
|
282
282
|
}),
|
|
283
283
|
/* @__PURE__ */ f("option", {
|
|
284
284
|
value: "PROMPT",
|
|
285
|
-
children:
|
|
285
|
+
children: N.PROMPT
|
|
286
286
|
})
|
|
287
287
|
]
|
|
288
288
|
})] }),
|
|
289
289
|
/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ p("label", {
|
|
290
290
|
htmlFor: "event-visibility",
|
|
291
291
|
className: "flex items-center gap-2 font-text-sm font-weight-medium text-text-primary mb-1",
|
|
292
|
-
children: [/* @__PURE__ */ f(d, { className: "size-4 text-text-secondary" }),
|
|
293
|
-
}), /* @__PURE__ */ f(
|
|
292
|
+
children: [/* @__PURE__ */ f(d, { className: "size-4 text-text-secondary" }), M("calendar.visibility", "Visibility")]
|
|
293
|
+
}), /* @__PURE__ */ f(x, {
|
|
294
294
|
id: "event-visibility",
|
|
295
|
-
value:
|
|
296
|
-
onChange: (e) =>
|
|
295
|
+
value: Y.visibility,
|
|
296
|
+
onChange: (e) => Z("visibility", e.target.value),
|
|
297
297
|
className: "w-full px-3 py-2 rounded-radius-md border border-border-default bg-bg-surface text-text-primary font-text-sm focus:outline-none focus:ring-2 focus:ring-action-primary-border scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
|
|
298
|
-
children: Object.entries(
|
|
298
|
+
children: Object.entries(P).map(([e, t]) => /* @__PURE__ */ f("option", {
|
|
299
299
|
value: e,
|
|
300
300
|
children: t
|
|
301
301
|
}, e))
|
|
@@ -305,14 +305,14 @@ var w = ({ open: w, event: T, defaultDate: E, defaultStartHour: D, onClose: O, o
|
|
|
305
305
|
children: [/* @__PURE__ */ f("input", {
|
|
306
306
|
id: "event-allday",
|
|
307
307
|
type: "checkbox",
|
|
308
|
-
checked:
|
|
309
|
-
onChange: (e) =>
|
|
308
|
+
checked: Y.allDay,
|
|
309
|
+
onChange: (e) => Z("allDay", e.target.checked),
|
|
310
310
|
className: "size-4 rounded border-border-default",
|
|
311
|
-
"aria-label":
|
|
311
|
+
"aria-label": M("calendar.allDayEvent", "All day event")
|
|
312
312
|
}), /* @__PURE__ */ f("label", {
|
|
313
313
|
htmlFor: "event-allday",
|
|
314
314
|
className: "font-text-sm text-text-primary",
|
|
315
|
-
children:
|
|
315
|
+
children: M("calendar.allDayEvent", "All day event")
|
|
316
316
|
})]
|
|
317
317
|
}),
|
|
318
318
|
/* @__PURE__ */ p("div", {
|
|
@@ -321,43 +321,43 @@ var w = ({ open: w, event: T, defaultDate: E, defaultStartHour: D, onClose: O, o
|
|
|
321
321
|
/* @__PURE__ */ p("label", {
|
|
322
322
|
htmlFor: "event-start-date",
|
|
323
323
|
className: "flex items-center gap-2 font-text-sm font-weight-medium text-text-primary mb-1",
|
|
324
|
-
children: [/* @__PURE__ */ f(l, { className: "size-4 text-text-secondary" }),
|
|
324
|
+
children: [/* @__PURE__ */ f(l, { className: "size-4 text-text-secondary" }), M("calendar.start", "Start")]
|
|
325
325
|
}),
|
|
326
326
|
/* @__PURE__ */ f("input", {
|
|
327
327
|
id: "event-start-date",
|
|
328
328
|
type: "date",
|
|
329
|
-
value:
|
|
330
|
-
onChange: (e) =>
|
|
329
|
+
value: Y.startDate,
|
|
330
|
+
onChange: (e) => Z("startDate", e.target.value),
|
|
331
331
|
className: "w-full px-3 py-2 rounded-radius-md border border-border-default bg-bg-surface text-text-primary font-text-sm focus:outline-none focus:ring-2 focus:ring-action-primary-border",
|
|
332
|
-
"aria-label":
|
|
332
|
+
"aria-label": M("calendar.start", "Start")
|
|
333
333
|
}),
|
|
334
|
-
!
|
|
334
|
+
!Y.allDay && /* @__PURE__ */ f("input", {
|
|
335
335
|
type: "time",
|
|
336
|
-
value:
|
|
337
|
-
onChange: (e) =>
|
|
336
|
+
value: Y.startTime,
|
|
337
|
+
onChange: (e) => Z("startTime", e.target.value),
|
|
338
338
|
className: "w-full mt-2 px-3 py-2 rounded-radius-md border border-border-default bg-bg-surface text-text-primary font-text-sm focus:outline-none focus:ring-2 focus:ring-action-primary-border",
|
|
339
|
-
"aria-label":
|
|
339
|
+
"aria-label": M("calendar.startTime", "Start time")
|
|
340
340
|
})
|
|
341
341
|
] }), /* @__PURE__ */ p("div", { children: [
|
|
342
342
|
/* @__PURE__ */ f("label", {
|
|
343
343
|
htmlFor: "event-end-date",
|
|
344
344
|
className: "font-text-sm font-weight-medium text-text-primary mb-1 block",
|
|
345
|
-
children:
|
|
345
|
+
children: M("calendar.end", "End")
|
|
346
346
|
}),
|
|
347
347
|
/* @__PURE__ */ f("input", {
|
|
348
348
|
id: "event-end-date",
|
|
349
349
|
type: "date",
|
|
350
|
-
value:
|
|
351
|
-
onChange: (e) =>
|
|
350
|
+
value: Y.endDate,
|
|
351
|
+
onChange: (e) => Z("endDate", e.target.value),
|
|
352
352
|
className: "w-full px-3 py-2 rounded-radius-md border border-border-default bg-bg-surface text-text-primary font-text-sm focus:outline-none focus:ring-2 focus:ring-action-primary-border",
|
|
353
|
-
"aria-label":
|
|
353
|
+
"aria-label": M("calendar.end", "End")
|
|
354
354
|
}),
|
|
355
|
-
!
|
|
355
|
+
!Y.allDay && /* @__PURE__ */ f("input", {
|
|
356
356
|
type: "time",
|
|
357
|
-
value:
|
|
358
|
-
onChange: (e) =>
|
|
357
|
+
value: Y.endTime,
|
|
358
|
+
onChange: (e) => Z("endTime", e.target.value),
|
|
359
359
|
className: "w-full mt-2 px-3 py-2 rounded-radius-md border border-border-default bg-bg-surface text-text-primary font-text-sm focus:outline-none focus:ring-2 focus:ring-action-primary-border",
|
|
360
|
-
"aria-label":
|
|
360
|
+
"aria-label": M("calendar.endTime", "End time")
|
|
361
361
|
})
|
|
362
362
|
] })]
|
|
363
363
|
}),
|
|
@@ -367,14 +367,14 @@ var w = ({ open: w, event: T, defaultDate: E, defaultStartHour: D, onClose: O, o
|
|
|
367
367
|
/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ p("label", {
|
|
368
368
|
htmlFor: "event-location",
|
|
369
369
|
className: "flex items-center gap-2 font-text-sm font-weight-medium text-text-primary mb-1",
|
|
370
|
-
children: [/* @__PURE__ */ f(u, { className: "size-4 text-text-secondary" }),
|
|
370
|
+
children: [/* @__PURE__ */ f(u, { className: "size-4 text-text-secondary" }), M("calendar.location", "Location")]
|
|
371
371
|
}), /* @__PURE__ */ f("input", {
|
|
372
372
|
id: "event-location",
|
|
373
373
|
type: "text",
|
|
374
|
-
value:
|
|
375
|
-
onChange: (e) =>
|
|
376
|
-
placeholder:
|
|
377
|
-
"aria-label":
|
|
374
|
+
value: Y.location,
|
|
375
|
+
onChange: (e) => Z("location", e.target.value),
|
|
376
|
+
placeholder: M("calendar.addLocation", "Add location"),
|
|
377
|
+
"aria-label": M("calendar.location", "Location"),
|
|
378
378
|
className: "w-full px-3 py-2 rounded-radius-md border border-border-default bg-bg-surface text-text-primary font-text-sm placeholder:text-text-tertiary focus:outline-none focus:ring-2 focus:ring-action-primary-border"
|
|
379
379
|
})] }),
|
|
380
380
|
/* @__PURE__ */ p("div", {
|
|
@@ -382,78 +382,78 @@ var w = ({ open: w, event: T, defaultDate: E, defaultStartHour: D, onClose: O, o
|
|
|
382
382
|
children: [/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
|
|
383
383
|
htmlFor: "event-location-type",
|
|
384
384
|
className: "block font-text-sm font-weight-medium text-text-primary mb-1",
|
|
385
|
-
children:
|
|
386
|
-
}), /* @__PURE__ */ f(
|
|
385
|
+
children: M("calendar.locationType", "Location type")
|
|
386
|
+
}), /* @__PURE__ */ f(x, {
|
|
387
387
|
id: "event-location-type",
|
|
388
|
-
value:
|
|
389
|
-
onChange: (e) =>
|
|
388
|
+
value: Y.locationType,
|
|
389
|
+
onChange: (e) => Z("locationType", e.target.value),
|
|
390
390
|
className: "w-full px-3 py-2 rounded-radius-md border border-border-default bg-bg-surface text-text-primary font-text-sm focus:outline-none focus:ring-2 focus:ring-action-primary-border scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
|
|
391
|
-
children: Object.entries(
|
|
391
|
+
children: Object.entries(F).map(([e, t]) => /* @__PURE__ */ f("option", {
|
|
392
392
|
value: e,
|
|
393
393
|
children: t
|
|
394
394
|
}, e))
|
|
395
395
|
})] }), /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
|
|
396
396
|
htmlFor: "event-max-attendees",
|
|
397
397
|
className: "block font-text-sm font-weight-medium text-text-primary mb-1",
|
|
398
|
-
children:
|
|
398
|
+
children: M("calendar.maxAttendees", "Max attendees")
|
|
399
399
|
}), /* @__PURE__ */ f("input", {
|
|
400
400
|
id: "event-max-attendees",
|
|
401
401
|
type: "number",
|
|
402
402
|
min: "1",
|
|
403
|
-
value:
|
|
404
|
-
onChange: (e) =>
|
|
403
|
+
value: Y.maxAttendees,
|
|
404
|
+
onChange: (e) => Z("maxAttendees", e.target.value),
|
|
405
405
|
className: "w-full px-3 py-2 rounded-radius-md border border-border-default bg-bg-surface text-text-primary font-text-sm focus:outline-none focus:ring-2 focus:ring-action-primary-border",
|
|
406
|
-
"aria-label":
|
|
406
|
+
"aria-label": M("calendar.maxAttendees", "Max attendees")
|
|
407
407
|
})] })]
|
|
408
408
|
}),
|
|
409
409
|
/* @__PURE__ */ f("input", {
|
|
410
410
|
type: "text",
|
|
411
|
-
value:
|
|
412
|
-
onChange: (e) =>
|
|
413
|
-
placeholder:
|
|
411
|
+
value: Y.locationAddress,
|
|
412
|
+
onChange: (e) => Z("locationAddress", e.target.value),
|
|
413
|
+
placeholder: M("calendar.locationAddress", "Location address or room details"),
|
|
414
414
|
className: "w-full px-3 py-2 rounded-radius-md border border-border-default bg-bg-surface text-text-primary font-text-sm placeholder:text-text-tertiary focus:outline-none focus:ring-2 focus:ring-action-primary-border",
|
|
415
|
-
"aria-label":
|
|
415
|
+
"aria-label": M("calendar.locationAddress", "Location address or room details")
|
|
416
416
|
}),
|
|
417
417
|
/* @__PURE__ */ f("input", {
|
|
418
418
|
type: "url",
|
|
419
|
-
value:
|
|
420
|
-
onChange: (e) =>
|
|
421
|
-
placeholder:
|
|
419
|
+
value: Y.locationUrl,
|
|
420
|
+
onChange: (e) => Z("locationUrl", e.target.value),
|
|
421
|
+
placeholder: M("calendar.locationUrl", "Location URL"),
|
|
422
422
|
className: "w-full px-3 py-2 rounded-radius-md border border-border-default bg-bg-surface text-text-primary font-text-sm placeholder:text-text-tertiary focus:outline-none focus:ring-2 focus:ring-action-primary-border",
|
|
423
|
-
"aria-label":
|
|
423
|
+
"aria-label": M("calendar.locationUrl", "Location URL")
|
|
424
424
|
})
|
|
425
425
|
]
|
|
426
426
|
}),
|
|
427
427
|
/* @__PURE__ */ p(h, {
|
|
428
|
-
title:
|
|
429
|
-
description:
|
|
428
|
+
title: M("calendar.advancedTitle", "Advanced"),
|
|
429
|
+
description: M("calendar.advancedDescription", "Meeting provider, recurrence, timezone and other options"),
|
|
430
430
|
children: [
|
|
431
431
|
/* @__PURE__ */ p("div", {
|
|
432
432
|
className: "grid grid-cols-1 gap-3 @md:grid-cols-2",
|
|
433
433
|
children: [/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
|
|
434
434
|
htmlFor: "event-meeting-provider",
|
|
435
435
|
className: "block font-text-sm font-weight-medium text-text-primary mb-1",
|
|
436
|
-
children:
|
|
437
|
-
}), /* @__PURE__ */ f(
|
|
436
|
+
children: M("calendar.meetingProvider", "Meeting provider")
|
|
437
|
+
}), /* @__PURE__ */ f(x, {
|
|
438
438
|
id: "event-meeting-provider",
|
|
439
|
-
value:
|
|
440
|
-
onChange: (e) =>
|
|
439
|
+
value: Y.onlineMeetingProvider,
|
|
440
|
+
onChange: (e) => Z("onlineMeetingProvider", e.target.value),
|
|
441
441
|
className: "w-full px-3 py-2 rounded-radius-md border border-border-default bg-bg-surface text-text-primary font-text-sm focus:outline-none focus:ring-2 focus:ring-action-primary-border scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
|
|
442
|
-
children: Object.entries(
|
|
442
|
+
children: Object.entries(I).map(([e, t]) => /* @__PURE__ */ f("option", {
|
|
443
443
|
value: e,
|
|
444
444
|
children: t
|
|
445
445
|
}, e))
|
|
446
446
|
})] }), /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
|
|
447
447
|
htmlFor: "event-meeting-url",
|
|
448
448
|
className: "block font-text-sm font-weight-medium text-text-primary mb-1",
|
|
449
|
-
children:
|
|
449
|
+
children: M("calendar.meetingUrl", "Meeting URL")
|
|
450
450
|
}), /* @__PURE__ */ f("input", {
|
|
451
451
|
id: "event-meeting-url",
|
|
452
452
|
type: "url",
|
|
453
|
-
value:
|
|
454
|
-
onChange: (e) =>
|
|
455
|
-
placeholder:
|
|
456
|
-
"aria-label":
|
|
453
|
+
value: Y.onlineMeetingUrl,
|
|
454
|
+
onChange: (e) => Z("onlineMeetingUrl", e.target.value),
|
|
455
|
+
placeholder: M("calendar.addMeetingLink", "Add meeting link"),
|
|
456
|
+
"aria-label": M("calendar.meetingUrl", "Meeting URL"),
|
|
457
457
|
className: "w-full px-3 py-2 rounded-radius-md border border-border-default bg-bg-surface text-text-primary font-text-sm placeholder:text-text-tertiary focus:outline-none focus:ring-2 focus:ring-action-primary-border"
|
|
458
458
|
})] })]
|
|
459
459
|
}),
|
|
@@ -461,20 +461,20 @@ var w = ({ open: w, event: T, defaultDate: E, defaultStartHour: D, onClose: O, o
|
|
|
461
461
|
/* @__PURE__ */ p("label", {
|
|
462
462
|
htmlFor: "event-description",
|
|
463
463
|
className: "flex items-center gap-2 font-text-sm font-weight-medium text-text-primary mb-1",
|
|
464
|
-
children: [/* @__PURE__ */ f(s, { className: "size-4 text-text-secondary" }),
|
|
464
|
+
children: [/* @__PURE__ */ f(s, { className: "size-4 text-text-secondary" }), M("calendar.eventDescriptionLabel", "Description")]
|
|
465
465
|
}),
|
|
466
466
|
/* @__PURE__ */ f("textarea", {
|
|
467
467
|
id: "event-description",
|
|
468
|
-
value:
|
|
469
|
-
onChange: (e) =>
|
|
470
|
-
placeholder:
|
|
468
|
+
value: Y.description,
|
|
469
|
+
onChange: (e) => Z("description", e.target.value),
|
|
470
|
+
placeholder: M("calendar.addDescription", "Add markdown notes or event description"),
|
|
471
471
|
rows: 4,
|
|
472
|
-
"aria-label":
|
|
472
|
+
"aria-label": M("calendar.eventDescriptionLabel", "Description"),
|
|
473
473
|
className: "w-full px-3 py-2 rounded-radius-md border border-border-default bg-bg-surface text-text-primary font-text-sm placeholder:text-text-tertiary focus:outline-none focus:ring-2 focus:ring-action-primary-border resize-none"
|
|
474
474
|
}),
|
|
475
475
|
/* @__PURE__ */ f("p", {
|
|
476
476
|
className: "mt-1 font-text-xs text-text-tertiary",
|
|
477
|
-
children:
|
|
477
|
+
children: M("calendar.descriptionMarkdownHint", "Supports markdown-style notes and formatting text.")
|
|
478
478
|
})
|
|
479
479
|
] }),
|
|
480
480
|
/* @__PURE__ */ p("div", {
|
|
@@ -482,28 +482,28 @@ var w = ({ open: w, event: T, defaultDate: E, defaultStartHour: D, onClose: O, o
|
|
|
482
482
|
children: [/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
|
|
483
483
|
htmlFor: "event-tags",
|
|
484
484
|
className: "block font-text-sm font-weight-medium text-text-primary mb-1",
|
|
485
|
-
children:
|
|
485
|
+
children: M("calendar.tags", "Tags")
|
|
486
486
|
}), /* @__PURE__ */ f("input", {
|
|
487
487
|
id: "event-tags",
|
|
488
488
|
type: "text",
|
|
489
|
-
value:
|
|
490
|
-
onChange: (e) =>
|
|
491
|
-
placeholder:
|
|
492
|
-
"aria-label":
|
|
489
|
+
value: Y.tagsText,
|
|
490
|
+
onChange: (e) => Z("tagsText", e.target.value),
|
|
491
|
+
placeholder: M("calendar.tagsPlaceholder", "e.g. planning, roadmap, leadership"),
|
|
492
|
+
"aria-label": M("calendar.tags", "Tags"),
|
|
493
493
|
className: "w-full px-3 py-2 rounded-radius-md border border-border-default bg-bg-surface text-text-primary font-text-sm placeholder:text-text-tertiary focus:outline-none focus:ring-2 focus:ring-action-primary-border"
|
|
494
494
|
})] }), /* @__PURE__ */ p("div", {
|
|
495
495
|
className: "flex items-center gap-3 self-end",
|
|
496
496
|
children: [/* @__PURE__ */ f("input", {
|
|
497
497
|
id: "event-checkin-enabled",
|
|
498
498
|
type: "checkbox",
|
|
499
|
-
checked:
|
|
500
|
-
onChange: (e) =>
|
|
499
|
+
checked: Y.checkInEnabled,
|
|
500
|
+
onChange: (e) => Z("checkInEnabled", e.target.checked),
|
|
501
501
|
className: "size-4 rounded border-border-default",
|
|
502
|
-
"aria-label":
|
|
502
|
+
"aria-label": M("calendar.enableCheckIn", "Enable attendee check-in")
|
|
503
503
|
}), /* @__PURE__ */ f("label", {
|
|
504
504
|
htmlFor: "event-checkin-enabled",
|
|
505
505
|
className: "font-text-sm text-text-primary",
|
|
506
|
-
children:
|
|
506
|
+
children: M("calendar.enableCheckIn", "Enable attendee check-in")
|
|
507
507
|
})]
|
|
508
508
|
})]
|
|
509
509
|
}),
|
|
@@ -514,26 +514,26 @@ var w = ({ open: w, event: T, defaultDate: E, defaultStartHour: D, onClose: O, o
|
|
|
514
514
|
children: [/* @__PURE__ */ f("input", {
|
|
515
515
|
id: "event-recurring",
|
|
516
516
|
type: "checkbox",
|
|
517
|
-
checked:
|
|
518
|
-
onChange: (e) =>
|
|
517
|
+
checked: Y.isRecurring,
|
|
518
|
+
onChange: (e) => Z("isRecurring", e.target.checked),
|
|
519
519
|
className: "size-4 rounded border-border-default",
|
|
520
|
-
"aria-label":
|
|
520
|
+
"aria-label": M("calendar.recurringEvent", "Recurring event")
|
|
521
521
|
}), /* @__PURE__ */ f("label", {
|
|
522
522
|
htmlFor: "event-recurring",
|
|
523
523
|
className: "font-text-sm text-text-primary",
|
|
524
|
-
children:
|
|
524
|
+
children: M("calendar.recurringEvent", "Recurring event")
|
|
525
525
|
})]
|
|
526
|
-
}),
|
|
526
|
+
}), Y.isRecurring && /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
|
|
527
527
|
htmlFor: "event-rrule",
|
|
528
528
|
className: "block font-text-sm font-weight-medium text-text-primary mb-1",
|
|
529
|
-
children:
|
|
529
|
+
children: M("calendar.rrule", "Recurrence rule (RRULE)")
|
|
530
530
|
}), /* @__PURE__ */ f("input", {
|
|
531
531
|
id: "event-rrule",
|
|
532
532
|
type: "text",
|
|
533
|
-
value:
|
|
534
|
-
onChange: (e) =>
|
|
535
|
-
"aria-label":
|
|
536
|
-
placeholder:
|
|
533
|
+
value: Y.rrule,
|
|
534
|
+
onChange: (e) => Z("rrule", e.target.value),
|
|
535
|
+
"aria-label": M("calendar.rrule", "Recurrence rule (RRULE)"),
|
|
536
|
+
placeholder: M("calendar.rrulePlaceholder", "FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR;INTERVAL=1"),
|
|
537
537
|
className: "w-full px-3 py-2 rounded-radius-md border border-border-default bg-bg-surface text-text-primary font-text-sm placeholder:text-text-tertiary focus:outline-none focus:ring-2 focus:ring-action-primary-border"
|
|
538
538
|
})] })]
|
|
539
539
|
})
|
|
@@ -544,19 +544,19 @@ var w = ({ open: w, event: T, defaultDate: E, defaultStartHour: D, onClose: O, o
|
|
|
544
544
|
/* @__PURE__ */ p(v, { children: [/* @__PURE__ */ f(m, {
|
|
545
545
|
type: "button",
|
|
546
546
|
variant: "outline",
|
|
547
|
-
onClick:
|
|
548
|
-
disabled:
|
|
549
|
-
children:
|
|
547
|
+
onClick: k,
|
|
548
|
+
disabled: G,
|
|
549
|
+
children: M("calendar.cancel", "Cancel")
|
|
550
550
|
}), /* @__PURE__ */ f(m, {
|
|
551
551
|
type: "submit",
|
|
552
|
-
disabled:
|
|
553
|
-
children:
|
|
552
|
+
disabled: G || !Y.title.trim(),
|
|
553
|
+
children: G ? M("calendar.saving", "Saving...") : j ? M("calendar.updateEvent", "Update Event") : M("calendar.createEvent", "Create Event")
|
|
554
554
|
})] })
|
|
555
555
|
]
|
|
556
556
|
})]
|
|
557
557
|
})
|
|
558
558
|
});
|
|
559
559
|
};
|
|
560
|
-
export {
|
|
560
|
+
export { T as EventFormModal };
|
|
561
561
|
|
|
562
562
|
//# sourceMappingURL=EventFormModal.js.map
|