@alfadocs/ui-kit-debug 0.78.0 → 0.80.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunks/{alia-sidebar-w6B0TEx7.js → alia-sidebar-DzNz1gDf.js} +2 -2
- package/dist/_chunks/{alia-sidebar-w6B0TEx7.js.map → alia-sidebar-DzNz1gDf.js.map} +1 -1
- package/dist/_chunks/calendar-4dXTvsCz.js +1136 -0
- package/dist/_chunks/calendar-4dXTvsCz.js.map +1 -0
- package/dist/_chunks/calendar-event-card-C6qGtywL.js +257 -0
- package/dist/_chunks/calendar-event-card-C6qGtywL.js.map +1 -0
- package/dist/_chunks/{chat-input-BTCDqUDX.js → chat-input-QpHxBEnN.js} +32 -31
- package/dist/_chunks/chat-input-QpHxBEnN.js.map +1 -0
- package/dist/_chunks/{fiscal-code-input-DWA6C8x8.js → fiscal-code-input-QP9gkyDE.js} +2 -2
- package/dist/_chunks/fiscal-code-input-QP9gkyDE.js.map +1 -0
- package/dist/_chunks/{patient-details-zy76MRh7.js → patient-details-COvYWp2e.js} +2 -2
- package/dist/_chunks/{patient-details-zy76MRh7.js.map → patient-details-COvYWp2e.js.map} +1 -1
- package/dist/_chunks/signature-request-CEOrCDyk.js +341 -0
- package/dist/_chunks/signature-request-CEOrCDyk.js.map +1 -0
- package/dist/agent-catalog.json +1 -1
- package/dist/components/_shared/contrast-warning.d.ts +46 -0
- package/dist/components/_shared/contrast-warning.d.ts.map +1 -0
- package/dist/components/calendar/calendar.d.ts +284 -7
- package/dist/components/calendar/calendar.d.ts.map +1 -1
- package/dist/components/calendar/index.d.ts +1 -1
- package/dist/components/calendar/index.d.ts.map +1 -1
- package/dist/components/calendar/index.js +1 -1
- package/dist/components/calendar-event-card/calendar-event-card.d.ts +103 -0
- package/dist/components/calendar-event-card/calendar-event-card.d.ts.map +1 -0
- package/dist/components/calendar-event-card/index.d.ts +3 -0
- package/dist/components/calendar-event-card/index.d.ts.map +1 -0
- package/dist/components/calendar-event-card/index.js +5 -0
- package/dist/components/calendar-event-card/index.js.map +1 -0
- package/dist/components/chat-input/chat-input.d.ts.map +1 -1
- package/dist/components/chat-input/index.js +1 -1
- package/dist/components/fiscal-code-input/index.js +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/patient-details/index.js +1 -1
- package/dist/index.js +252 -250
- package/dist/index.js.map +1 -1
- package/dist/patterns/alia-assistant/index.js +1 -1
- package/dist/patterns/signature-request/index.js +1 -1
- package/dist/patterns/signature-request/signature-request.d.ts +7 -0
- package/dist/patterns/signature-request/signature-request.d.ts.map +1 -1
- package/dist/tokens.css +8 -5
- package/package.json +5 -1
- package/dist/_chunks/calendar-DeAlFPsF.js +0 -1050
- package/dist/_chunks/calendar-DeAlFPsF.js.map +0 -1
- package/dist/_chunks/chat-input-BTCDqUDX.js.map +0 -1
- package/dist/_chunks/fiscal-code-input-DWA6C8x8.js.map +0 -1
- package/dist/_chunks/signature-request-C-mskXwi.js +0 -318
- package/dist/_chunks/signature-request-C-mskXwi.js.map +0 -1
- package/dist/components/calendar/contrast-warning.d.ts +0 -20
- package/dist/components/calendar/contrast-warning.d.ts.map +0 -1
|
@@ -1,1050 +0,0 @@
|
|
|
1
|
-
import { jsxs as C, jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as me, useRef as _, useState as ne, useEffect as G, useMemo as l, useImperativeHandle as Je, useCallback as z } from "react";
|
|
3
|
-
import { c as Ze } from "./index-D2ZczOXr.js";
|
|
4
|
-
import { useTranslation as ae } from "react-i18next";
|
|
5
|
-
import Ye from "@fullcalendar/react";
|
|
6
|
-
import Qe from "@fullcalendar/daygrid";
|
|
7
|
-
import Xe from "@fullcalendar/timegrid";
|
|
8
|
-
import et from "@fullcalendar/list";
|
|
9
|
-
import tt from "@fullcalendar/resource";
|
|
10
|
-
import rt from "@fullcalendar/resource-timegrid";
|
|
11
|
-
import nt from "@fullcalendar/resource-timeline";
|
|
12
|
-
import at from "@fullcalendar/timeline";
|
|
13
|
-
import st from "@fullcalendar/interaction";
|
|
14
|
-
import { u as ot } from "./use-prefers-reduced-motion-BMwIQRjB.js";
|
|
15
|
-
import { u as it } from "./registry-DvAUVLHh.js";
|
|
16
|
-
import { C as de } from "./chevron-right-I9AeSxH2.js";
|
|
17
|
-
import { C as ce } from "./chevron-left-B8cOyH-V.js";
|
|
18
|
-
import { c as H } from "./createLucideIcon-DhHxpK9K.js";
|
|
19
|
-
import { C as dt } from "./check-DrFSN__t.js";
|
|
20
|
-
import { S as ct } from "./stethoscope-sZXGC43m.js";
|
|
21
|
-
import { C as lt } from "./clock-Drd4Wtis.js";
|
|
22
|
-
import { G as ut } from "./globe-sHBW1JN5.js";
|
|
23
|
-
import { T as mt } from "./triangle-alert-CBnO6nq_.js";
|
|
24
|
-
import { H as ft } from "./heart-pulse-BCppJyN2.js";
|
|
25
|
-
import { V as vt } from "./video-BheNGvsu.js";
|
|
26
|
-
/**
|
|
27
|
-
* @license lucide-react v1.22.0 - ISC
|
|
28
|
-
*
|
|
29
|
-
* This source code is licensed under the ISC license.
|
|
30
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
31
|
-
*/
|
|
32
|
-
const pt = [
|
|
33
|
-
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
34
|
-
["path", { d: "M4.929 4.929 19.07 19.071", key: "196cmz" }]
|
|
35
|
-
], gt = H("ban", pt);
|
|
36
|
-
/**
|
|
37
|
-
* @license lucide-react v1.22.0 - ISC
|
|
38
|
-
*
|
|
39
|
-
* This source code is licensed under the ISC license.
|
|
40
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
41
|
-
*/
|
|
42
|
-
const ht = [
|
|
43
|
-
["path", { d: "M4 10h12", key: "1y6xl8" }],
|
|
44
|
-
["path", { d: "M4 14h9", key: "1loblj" }],
|
|
45
|
-
[
|
|
46
|
-
"path",
|
|
47
|
-
{
|
|
48
|
-
d: "M19 6a7.7 7.7 0 0 0-5.2-2A7.9 7.9 0 0 0 6 12c0 4.4 3.5 8 7.8 8 2 0 3.8-.8 5.2-2",
|
|
49
|
-
key: "1j6lzo"
|
|
50
|
-
}
|
|
51
|
-
]
|
|
52
|
-
], bt = H("euro", ht);
|
|
53
|
-
/**
|
|
54
|
-
* @license lucide-react v1.22.0 - ISC
|
|
55
|
-
*
|
|
56
|
-
* This source code is licensed under the ISC license.
|
|
57
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
58
|
-
*/
|
|
59
|
-
const yt = [
|
|
60
|
-
[
|
|
61
|
-
"path",
|
|
62
|
-
{
|
|
63
|
-
d: "M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z",
|
|
64
|
-
key: "emmmcr"
|
|
65
|
-
}
|
|
66
|
-
],
|
|
67
|
-
["path", { d: "M7 10v12", key: "1qc93n" }]
|
|
68
|
-
], xt = H("thumbs-up", yt);
|
|
69
|
-
/**
|
|
70
|
-
* @license lucide-react v1.22.0 - ISC
|
|
71
|
-
*
|
|
72
|
-
* This source code is licensed under the ISC license.
|
|
73
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
74
|
-
*/
|
|
75
|
-
const Tt = [
|
|
76
|
-
[
|
|
77
|
-
"path",
|
|
78
|
-
{
|
|
79
|
-
d: "M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",
|
|
80
|
-
key: "1xq2db"
|
|
81
|
-
}
|
|
82
|
-
]
|
|
83
|
-
], wt = H("zap", Tt);
|
|
84
|
-
const kt = {
|
|
85
|
-
id: "calendar",
|
|
86
|
-
capabilities: ["view_change", "range_navigate", "pick"],
|
|
87
|
-
state: {
|
|
88
|
-
currentView: {
|
|
89
|
-
type: "CalendarView",
|
|
90
|
-
descriptionKey: "ui.agent.calendar.state.currentView",
|
|
91
|
-
description: "Active view name (e.g. dayGridMonth, timeGridWeek).",
|
|
92
|
-
read: (r) => r.getCurrentView() ?? null
|
|
93
|
-
},
|
|
94
|
-
currentDate: {
|
|
95
|
-
type: "iso-date",
|
|
96
|
-
descriptionKey: "ui.agent.calendar.state.currentDate",
|
|
97
|
-
description: "ISO date anchor of the visible range.",
|
|
98
|
-
read: (r) => {
|
|
99
|
-
var s;
|
|
100
|
-
return ((s = r.getCurrentDate()) == null ? void 0 : s.toISOString()) ?? null;
|
|
101
|
-
}
|
|
102
|
-
},
|
|
103
|
-
currentTitle: {
|
|
104
|
-
type: "string",
|
|
105
|
-
descriptionKey: "ui.agent.calendar.state.currentTitle",
|
|
106
|
-
description: 'Human title of the current range (e.g. "April 2026").',
|
|
107
|
-
read: (r) => r.getTitle()
|
|
108
|
-
}
|
|
109
|
-
},
|
|
110
|
-
actions: {
|
|
111
|
-
today: {
|
|
112
|
-
safety: "read",
|
|
113
|
-
idempotent: !0,
|
|
114
|
-
descriptionKey: "ui.agent.calendar.actions.today",
|
|
115
|
-
description: "Jump to the current day.",
|
|
116
|
-
invoke: (r) => {
|
|
117
|
-
r.today();
|
|
118
|
-
}
|
|
119
|
-
},
|
|
120
|
-
prev: {
|
|
121
|
-
// Not idempotent: each call steps one range further back.
|
|
122
|
-
safety: "read",
|
|
123
|
-
descriptionKey: "ui.agent.calendar.actions.prev",
|
|
124
|
-
description: "Move to the previous range.",
|
|
125
|
-
invoke: (r) => {
|
|
126
|
-
r.prev();
|
|
127
|
-
}
|
|
128
|
-
},
|
|
129
|
-
next: {
|
|
130
|
-
// Not idempotent: each call steps one range further forward.
|
|
131
|
-
safety: "read",
|
|
132
|
-
descriptionKey: "ui.agent.calendar.actions.next",
|
|
133
|
-
description: "Move to the next range.",
|
|
134
|
-
invoke: (r) => {
|
|
135
|
-
r.next();
|
|
136
|
-
}
|
|
137
|
-
},
|
|
138
|
-
goto_date: {
|
|
139
|
-
safety: "read",
|
|
140
|
-
argsType: "{ date: string | Date }",
|
|
141
|
-
argsSchema: {
|
|
142
|
-
type: "object",
|
|
143
|
-
properties: {
|
|
144
|
-
date: {
|
|
145
|
-
type: "string",
|
|
146
|
-
format: "date",
|
|
147
|
-
description: "Target date — ISO 8601 string (or Date at runtime)."
|
|
148
|
-
}
|
|
149
|
-
},
|
|
150
|
-
required: ["date"]
|
|
151
|
-
},
|
|
152
|
-
idempotent: !0,
|
|
153
|
-
descriptionKey: "ui.agent.calendar.actions.gotoDate",
|
|
154
|
-
description: "Navigate to a specific date.",
|
|
155
|
-
examples: [
|
|
156
|
-
{ args: { date: "2026-04-15" }, note: "Jump to 15 April 2026." }
|
|
157
|
-
],
|
|
158
|
-
invoke: (r, s) => {
|
|
159
|
-
r.gotoDate(s.date);
|
|
160
|
-
}
|
|
161
|
-
},
|
|
162
|
-
change_view: {
|
|
163
|
-
safety: "read",
|
|
164
|
-
argsType: "{ view: CalendarView }",
|
|
165
|
-
argsSchema: {
|
|
166
|
-
type: "object",
|
|
167
|
-
properties: {
|
|
168
|
-
view: {
|
|
169
|
-
type: "string",
|
|
170
|
-
enum: [
|
|
171
|
-
"dayGridMonth",
|
|
172
|
-
"timeGridWeek",
|
|
173
|
-
"timeGridDay",
|
|
174
|
-
"listWeek",
|
|
175
|
-
"resourceTimeGridDayChair",
|
|
176
|
-
"resourceTimeGridThreeDaysChair",
|
|
177
|
-
"resourceTimeGridWeekChair",
|
|
178
|
-
"resourceTimeGridDayOperator",
|
|
179
|
-
"resourceTimeGridThreeDaysOperator",
|
|
180
|
-
"resourceTimeGridWeekOperator"
|
|
181
|
-
],
|
|
182
|
-
description: "Target view name."
|
|
183
|
-
}
|
|
184
|
-
},
|
|
185
|
-
required: ["view"]
|
|
186
|
-
},
|
|
187
|
-
idempotent: !0,
|
|
188
|
-
descriptionKey: "ui.agent.calendar.actions.changeView",
|
|
189
|
-
description: "Switch the calendar to the given view.",
|
|
190
|
-
examples: [
|
|
191
|
-
{ args: { view: "timeGridWeek" }, note: "Switch to the week view." }
|
|
192
|
-
],
|
|
193
|
-
invoke: (r, s) => {
|
|
194
|
-
r.changeView(s.view);
|
|
195
|
-
}
|
|
196
|
-
},
|
|
197
|
-
focus_event: {
|
|
198
|
-
// pick: transient focus + highlight of an event — no persisted selection.
|
|
199
|
-
// Not idempotent: each call re-triggers the flash highlight.
|
|
200
|
-
safety: "read",
|
|
201
|
-
argsType: "{ eventId: string }",
|
|
202
|
-
argsSchema: {
|
|
203
|
-
type: "object",
|
|
204
|
-
properties: {
|
|
205
|
-
eventId: {
|
|
206
|
-
type: "string",
|
|
207
|
-
description: "Stable event id (matches a data-event-id node)."
|
|
208
|
-
}
|
|
209
|
-
},
|
|
210
|
-
required: ["eventId"]
|
|
211
|
-
},
|
|
212
|
-
descriptionKey: "ui.agent.calendar.actions.focusEvent",
|
|
213
|
-
description: "Scroll an event into view and briefly highlight it.",
|
|
214
|
-
errors: ["No DOM node matches the given event id — no-op."],
|
|
215
|
-
invoke: (r, s) => {
|
|
216
|
-
r.focusEvent(s.eventId);
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
},
|
|
220
|
-
domHooks: {
|
|
221
|
-
root: {
|
|
222
|
-
attr: "data-component",
|
|
223
|
-
value: "calendar",
|
|
224
|
-
description: "Marks the Calendar wrapper."
|
|
225
|
-
},
|
|
226
|
-
instanceId: {
|
|
227
|
-
attr: "data-component-id",
|
|
228
|
-
sourceProp: "id",
|
|
229
|
-
description: "Sourced from the id prop."
|
|
230
|
-
},
|
|
231
|
-
item: {
|
|
232
|
-
attr: "data-event-id",
|
|
233
|
-
description: "Emitted on every rendered FullCalendar event by the kit event renderer. Used by focusEvent."
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
}, Ct = {
|
|
237
|
-
vertical: {
|
|
238
|
-
Day: "resourceTimeGridDay",
|
|
239
|
-
ThreeDays: "resourceTimeGridThreeDays",
|
|
240
|
-
Week: "resourceTimeGridWeek"
|
|
241
|
-
},
|
|
242
|
-
horizontal: {
|
|
243
|
-
Day: "resourceTimelineDay",
|
|
244
|
-
ThreeDays: "resourceTimelineThreeDays",
|
|
245
|
-
Week: "resourceTimelineWeek"
|
|
246
|
-
}
|
|
247
|
-
}, Dt = /* @__PURE__ */ new Set([
|
|
248
|
-
"dayGridMonth",
|
|
249
|
-
"timeGridWeek",
|
|
250
|
-
"timeGridDay",
|
|
251
|
-
"listWeek"
|
|
252
|
-
]);
|
|
253
|
-
function le(r, s = "vertical") {
|
|
254
|
-
if (Dt.has(r))
|
|
255
|
-
return r;
|
|
256
|
-
const u = r.replace(/^resourceTimeGrid/, "").replace(
|
|
257
|
-
/(Chair|Operator)$/,
|
|
258
|
-
""
|
|
259
|
-
);
|
|
260
|
-
return Ct[s][u];
|
|
261
|
-
}
|
|
262
|
-
const Nt = {
|
|
263
|
-
resourceTimeGridThreeDays: {
|
|
264
|
-
type: "resourceTimeGrid",
|
|
265
|
-
duration: { days: 3 }
|
|
266
|
-
},
|
|
267
|
-
resourceTimelineThreeDays: {
|
|
268
|
-
type: "resourceTimeline",
|
|
269
|
-
duration: { days: 3 }
|
|
270
|
-
}
|
|
271
|
-
}, At = Ze(
|
|
272
|
-
[
|
|
273
|
-
"ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]",
|
|
274
|
-
"ds:w-full ds:h-full",
|
|
275
|
-
"ds:ps-[var(--spacing-xs)] ds:pe-[var(--spacing-xs)]",
|
|
276
|
-
"ds:rounded-[var(--radius-sm)]",
|
|
277
|
-
"ds:text-[length:var(--font-size-sm)]",
|
|
278
|
-
"ds:font-[var(--font-weight-medium)]",
|
|
279
|
-
"ds:overflow-hidden",
|
|
280
|
-
"ds:focus-visible:outline-[length:var(--focus-ring-width)]",
|
|
281
|
-
"ds:focus-visible:outline-[var(--ring)]",
|
|
282
|
-
"ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]"
|
|
283
|
-
].join(" "),
|
|
284
|
-
{
|
|
285
|
-
variants: {
|
|
286
|
-
status: {
|
|
287
|
-
// Note: every text-[…] uses the explicit `color:` prefix so
|
|
288
|
-
// Tailwind interprets it as a colour, not a length. Without the
|
|
289
|
-
// prefix, `text-[var(--X)]` resolves to font-size and the text
|
|
290
|
-
// colour falls through to the inherited `--foreground` — which
|
|
291
|
-
// produced 2.07:1 axe failures on saturated backgrounds.
|
|
292
|
-
confirmed: "ds:bg-[color:var(--success)] ds:text-[color:var(--success-solid-foreground)] ds:border ds:border-[color:var(--success)]",
|
|
293
|
-
waiting: "ds:bg-[color:var(--info)] ds:text-[color:var(--info-solid-foreground)] ds:border ds:border-[color:var(--info)]",
|
|
294
|
-
in_care: "ds:bg-[color:var(--primary)] ds:text-[color:var(--primary-foreground)] ds:border ds:border-[color:var(--primary)]",
|
|
295
|
-
// `done` reads as "completed, fading out". Previously
|
|
296
|
-
// `bg-color-mix(--success 70%, transparent) text-success-solid-foreground`,
|
|
297
|
-
// composited to ~#65a586 with white text → 2.88:1 fail.
|
|
298
|
-
// Now uses a low-saturation tint background with dark
|
|
299
|
-
// `--foreground` text + a left accent bar carrying the status
|
|
300
|
-
// hue.
|
|
301
|
-
done: "ds:bg-[color:color-mix(in_srgb,var(--success)_18%,var(--background))] ds:text-[color:var(--foreground)] ds:border-s-[3px] ds:border-s-[color:var(--success)] ds:border-y ds:border-e ds:border-y-[color:color-mix(in_srgb,var(--success)_25%,var(--border))] ds:border-e-[color:color-mix(in_srgb,var(--success)_25%,var(--border))]",
|
|
302
|
-
cancelled: "ds:bg-[color:var(--destructive)] ds:text-[color:var(--destructive-foreground)] ds:border ds:border-[color:var(--destructive)] ds:line-through",
|
|
303
|
-
absent: "ds:bg-[color:var(--warning)] ds:text-[color:var(--warning-solid-foreground)] ds:border ds:border-[color:var(--warning)]",
|
|
304
|
-
default: "ds:bg-[color:var(--primary)] ds:text-[color:var(--primary-foreground)] ds:border ds:border-[color:var(--primary)]"
|
|
305
|
-
}
|
|
306
|
-
},
|
|
307
|
-
defaultVariants: { status: "default" }
|
|
308
|
-
}
|
|
309
|
-
), It = {
|
|
310
|
-
confirmed: xt,
|
|
311
|
-
waiting: lt,
|
|
312
|
-
in_care: ct,
|
|
313
|
-
done: dt,
|
|
314
|
-
cancelled: gt,
|
|
315
|
-
absent: wt
|
|
316
|
-
}, St = {
|
|
317
|
-
create: "calendar.modeBanner.create",
|
|
318
|
-
move: "calendar.modeBanner.move",
|
|
319
|
-
copy: "calendar.modeBanner.copy"
|
|
320
|
-
};
|
|
321
|
-
function Pt(r) {
|
|
322
|
-
try {
|
|
323
|
-
const s = new Intl.Locale(r), d = typeof s.getWeekInfo == "function" ? s.getWeekInfo() : s.weekInfo;
|
|
324
|
-
if (d && typeof d.firstDay == "number")
|
|
325
|
-
return d.firstDay % 7;
|
|
326
|
-
} catch {
|
|
327
|
-
}
|
|
328
|
-
return r.startsWith("en-US") || r.startsWith("he") || r.startsWith("ar-SA") ? 0 : 1;
|
|
329
|
-
}
|
|
330
|
-
function Mt() {
|
|
331
|
-
const { i18n: r } = ae(), [s, d] = ne(() => {
|
|
332
|
-
if (typeof document > "u") return !1;
|
|
333
|
-
const u = document.documentElement.getAttribute("dir"), h = typeof r.dir == "function" ? r.dir() : "ltr";
|
|
334
|
-
return u === "rtl" || h === "rtl";
|
|
335
|
-
});
|
|
336
|
-
return G(() => {
|
|
337
|
-
if (typeof document > "u") return;
|
|
338
|
-
const u = new MutationObserver(() => {
|
|
339
|
-
const h = document.documentElement.getAttribute("dir"), D = typeof r.dir == "function" ? r.dir() : "ltr";
|
|
340
|
-
d(h === "rtl" || D === "rtl");
|
|
341
|
-
});
|
|
342
|
-
return u.observe(document.documentElement, {
|
|
343
|
-
attributes: !0,
|
|
344
|
-
attributeFilter: ["dir", "lang"]
|
|
345
|
-
}), () => u.disconnect();
|
|
346
|
-
}, [r]), s;
|
|
347
|
-
}
|
|
348
|
-
function Et({
|
|
349
|
-
arg: r,
|
|
350
|
-
locale: s,
|
|
351
|
-
resources: d,
|
|
352
|
-
statusLabels: u,
|
|
353
|
-
privacyMode: h,
|
|
354
|
-
showTime: D
|
|
355
|
-
}) {
|
|
356
|
-
var W;
|
|
357
|
-
const N = r.event.extendedProps ?? {}, {
|
|
358
|
-
status: m,
|
|
359
|
-
backgroundColor: v,
|
|
360
|
-
textColor: f,
|
|
361
|
-
suffix: y,
|
|
362
|
-
privacyModeTitle: A,
|
|
363
|
-
isBookedOnline: O,
|
|
364
|
-
hasUnassignedPatient: U,
|
|
365
|
-
hasHighlightedAnamnesis: K,
|
|
366
|
-
hasBillableAmount: $,
|
|
367
|
-
isTelehealth: p,
|
|
368
|
-
resourceId: I
|
|
369
|
-
} = N, B = m ? It[m] : null, x = r.event.start, T = r.event.end ?? r.event.start, V = r.event.allDay;
|
|
370
|
-
let S = "";
|
|
371
|
-
if (x && T)
|
|
372
|
-
try {
|
|
373
|
-
const w = new Intl.DateTimeFormat(s, {
|
|
374
|
-
hour: "2-digit",
|
|
375
|
-
minute: "2-digit",
|
|
376
|
-
hour12: !1
|
|
377
|
-
});
|
|
378
|
-
S = typeof w.formatRange == "function" ? w.formatRange(x, T) : `${w.format(x)} – ${w.format(T)}`;
|
|
379
|
-
} catch {
|
|
380
|
-
S = "";
|
|
381
|
-
}
|
|
382
|
-
const J = I ? (W = d.find((w) => w.id === I)) == null ? void 0 : W.title : void 0, Z = m ? u[m] : void 0, j = h ? A ?? "•••" : r.event.title, Y = [j, S, J, Z].filter(Boolean).join(", "), Q = v || f ? {
|
|
383
|
-
...v ? { "--calendar-event-bg": v } : {},
|
|
384
|
-
...f ? { "--calendar-event-text": f } : {}
|
|
385
|
-
} : void 0;
|
|
386
|
-
(v || f) && (`${r.event.id}`, void 0);
|
|
387
|
-
const X = [
|
|
388
|
-
At({ status: m ?? "default" }),
|
|
389
|
-
O ? "event-booked-online" : null,
|
|
390
|
-
v ? "ds:[background-color:var(--calendar-event-bg)]" : null,
|
|
391
|
-
f ? "ds:[color:var(--calendar-event-text)]" : null
|
|
392
|
-
].filter(Boolean).join(" ");
|
|
393
|
-
return /* @__PURE__ */ C(
|
|
394
|
-
"div",
|
|
395
|
-
{
|
|
396
|
-
className: X,
|
|
397
|
-
style: Q,
|
|
398
|
-
"aria-label": Y,
|
|
399
|
-
"data-event-id": r.event.id,
|
|
400
|
-
children: [
|
|
401
|
-
/* @__PURE__ */ C("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)] ds:self-end", children: [
|
|
402
|
-
B ? /* @__PURE__ */ a(B, { size: 14, "aria-hidden": "true" }) : null,
|
|
403
|
-
O ? /* @__PURE__ */ a(ut, { size: 12, "aria-hidden": "true" }) : null,
|
|
404
|
-
U ? /* @__PURE__ */ a(mt, { size: 12, "aria-hidden": "true" }) : null,
|
|
405
|
-
K ? /* @__PURE__ */ a(ft, { size: 12, "aria-hidden": "true" }) : null,
|
|
406
|
-
$ ? /* @__PURE__ */ a(bt, { size: 12, "aria-hidden": "true" }) : null,
|
|
407
|
-
p ? /* @__PURE__ */ a(vt, { size: 12, "aria-hidden": "true" }) : null
|
|
408
|
-
] }),
|
|
409
|
-
D && !V && S ? (
|
|
410
|
-
// No opacity here — composing 70% over saturated bgs (success /
|
|
411
|
-
// destructive / primary) drops effective contrast below WCAG AA
|
|
412
|
-
// (≤ 3.82:1 measured). The smaller font-size-xs vs the title's
|
|
413
|
-
// font-weight-semibold provides sufficient visual hierarchy.
|
|
414
|
-
/* @__PURE__ */ a("span", { className: "ds:text-[length:var(--font-size-xs)]", children: S })
|
|
415
|
-
) : null,
|
|
416
|
-
/* @__PURE__ */ a("span", { className: "ds:font-[var(--font-weight-semibold)] ds:truncate ds:text-start", children: j }),
|
|
417
|
-
y ? /* @__PURE__ */ a("span", { className: "ds:truncate ds:text-start ds:text-[length:var(--font-size-xs)]", children: y }) : null
|
|
418
|
-
]
|
|
419
|
-
}
|
|
420
|
-
);
|
|
421
|
-
}
|
|
422
|
-
const fe = [
|
|
423
|
-
"ds:inline-flex ds:items-center ds:justify-center",
|
|
424
|
-
"ds:min-h-[var(--min-target-size)]",
|
|
425
|
-
"ds:bg-[var(--background)] ds:text-[var(--foreground)]",
|
|
426
|
-
"ds:border ds:border-[var(--border)]",
|
|
427
|
-
"ds:rounded-[var(--radius-full)]",
|
|
428
|
-
"ds:font-[var(--font-weight-medium)] ds:text-[length:var(--font-size-sm)]",
|
|
429
|
-
"ds:transition-colors ds:duration-[var(--animation-duration)] ds:ease-[var(--ease-out)]",
|
|
430
|
-
"ds:hover:bg-[var(--muted)]",
|
|
431
|
-
"ds:focus-visible:outline-[length:var(--focus-ring-width)]",
|
|
432
|
-
"ds:focus-visible:outline-[var(--ring)]",
|
|
433
|
-
"ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
|
|
434
|
-
"ds:motion-reduce:transition-none"
|
|
435
|
-
].join(" "), Rt = [
|
|
436
|
-
fe,
|
|
437
|
-
"ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]"
|
|
438
|
-
].join(" "), ue = [
|
|
439
|
-
fe,
|
|
440
|
-
"ds:min-w-[var(--min-target-size)]"
|
|
441
|
-
].join(" "), se = me(
|
|
442
|
-
({ title: r, onToday: s, onPrev: d, onNext: u, end: h, className: D }, N) => {
|
|
443
|
-
const { t: m } = ae(), v = Mt(), f = v ? de : ce, y = v ? ce : de, A = [
|
|
444
|
-
"ds:calendar-toolbar",
|
|
445
|
-
"ds:sticky ds:top-0 ds:z-20",
|
|
446
|
-
"ds:flex ds:items-center ds:gap-[var(--spacing-sm)]",
|
|
447
|
-
"ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]",
|
|
448
|
-
"ds:py-[var(--spacing-sm)]",
|
|
449
|
-
"ds:bg-[var(--background)]",
|
|
450
|
-
"ds:border-b ds:border-[var(--border)]",
|
|
451
|
-
D
|
|
452
|
-
].filter(Boolean).join(" ");
|
|
453
|
-
return /* @__PURE__ */ C("div", { ref: N, className: A, children: [
|
|
454
|
-
/* @__PURE__ */ C("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
455
|
-
/* @__PURE__ */ a(
|
|
456
|
-
"button",
|
|
457
|
-
{
|
|
458
|
-
type: "button",
|
|
459
|
-
onClick: s,
|
|
460
|
-
className: Rt,
|
|
461
|
-
children: m("calendar.today")
|
|
462
|
-
}
|
|
463
|
-
),
|
|
464
|
-
/* @__PURE__ */ a(
|
|
465
|
-
"button",
|
|
466
|
-
{
|
|
467
|
-
type: "button",
|
|
468
|
-
onClick: d,
|
|
469
|
-
"aria-label": m("calendar.previousPeriod"),
|
|
470
|
-
className: ue,
|
|
471
|
-
children: /* @__PURE__ */ a(f, { size: 16, "aria-hidden": "true" })
|
|
472
|
-
}
|
|
473
|
-
),
|
|
474
|
-
/* @__PURE__ */ a(
|
|
475
|
-
"button",
|
|
476
|
-
{
|
|
477
|
-
type: "button",
|
|
478
|
-
onClick: u,
|
|
479
|
-
"aria-label": m("calendar.nextPeriod"),
|
|
480
|
-
className: ue,
|
|
481
|
-
children: /* @__PURE__ */ a(y, { size: 16, "aria-hidden": "true" })
|
|
482
|
-
}
|
|
483
|
-
)
|
|
484
|
-
] }),
|
|
485
|
-
r ? /* @__PURE__ */ a(
|
|
486
|
-
"h2",
|
|
487
|
-
{
|
|
488
|
-
"aria-live": "polite",
|
|
489
|
-
className: "ds:flex-1 ds:text-center ds:truncate type-title-card",
|
|
490
|
-
children: r
|
|
491
|
-
}
|
|
492
|
-
) : (
|
|
493
|
-
/* Keep the centering slot stable even before the first
|
|
494
|
-
`datesSet` populates the title — an empty <h2> would trip
|
|
495
|
-
axe's `empty-heading` rule, so we substitute a decorative
|
|
496
|
-
spacer that matches the h2's flex sizing. Once `title` is
|
|
497
|
-
non-empty the h2 renders in the same slot. */
|
|
498
|
-
/* @__PURE__ */ a("div", { "aria-hidden": "true", className: "ds:flex-1 ds:text-center" })
|
|
499
|
-
),
|
|
500
|
-
h ? /* @__PURE__ */ a("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]", children: h }) : null
|
|
501
|
-
] });
|
|
502
|
-
}
|
|
503
|
-
);
|
|
504
|
-
se.displayName = "Calendar.Toolbar";
|
|
505
|
-
const ve = me(
|
|
506
|
-
({
|
|
507
|
-
id: r,
|
|
508
|
-
events: s,
|
|
509
|
-
resources: d,
|
|
510
|
-
view: u = "dayGridMonth",
|
|
511
|
-
initialDate: h,
|
|
512
|
-
locale: D,
|
|
513
|
-
onEventDrop: N,
|
|
514
|
-
onEventResize: m,
|
|
515
|
-
onEventResizeStart: v,
|
|
516
|
-
onEventClick: f,
|
|
517
|
-
onDateSelect: y,
|
|
518
|
-
editable: A = !1,
|
|
519
|
-
eventDurationEditable: O,
|
|
520
|
-
selectable: U = !1,
|
|
521
|
-
height: K,
|
|
522
|
-
className: $,
|
|
523
|
-
privacyMode: p = !1,
|
|
524
|
-
mode: I = "default",
|
|
525
|
-
modeLabel: B,
|
|
526
|
-
modeBannerColor: x,
|
|
527
|
-
modeBannerTextColor: T,
|
|
528
|
-
onModeCancel: V,
|
|
529
|
-
alertBanner: S,
|
|
530
|
-
slotMinTime: J,
|
|
531
|
-
slotMaxTime: Z,
|
|
532
|
-
slotDuration: j,
|
|
533
|
-
showTime: Y = !0,
|
|
534
|
-
datesAboveResources: Q = !0,
|
|
535
|
-
slotEventOverlap: X = !1,
|
|
536
|
-
stickyHeaderDates: W = !0,
|
|
537
|
-
nowIndicator: w = !0,
|
|
538
|
-
dayMaxEvents: pe = !0,
|
|
539
|
-
schedulerLicenseKey: ge = void 0,
|
|
540
|
-
toolbar: he = !0,
|
|
541
|
-
toolbarEnd: be,
|
|
542
|
-
resourceLayout: L = "vertical",
|
|
543
|
-
showResourceInitials: oe = !1
|
|
544
|
-
}, ye) => {
|
|
545
|
-
const { t: o, i18n: M } = ae(), P = _(null), ee = _(null), b = _(null), k = _(null), E = _(null), q = D ?? M.language ?? "en", [xe, Te] = ne(() => {
|
|
546
|
-
if (typeof document > "u") return "ltr";
|
|
547
|
-
const e = document.documentElement.getAttribute("dir"), t = typeof M.dir == "function" ? M.dir() : "ltr";
|
|
548
|
-
return e === "rtl" || t === "rtl" ? "rtl" : "ltr";
|
|
549
|
-
});
|
|
550
|
-
G(() => {
|
|
551
|
-
if (typeof document > "u") return;
|
|
552
|
-
const e = new MutationObserver(() => {
|
|
553
|
-
const t = document.documentElement.getAttribute("dir"), n = typeof M.dir == "function" ? M.dir() : "ltr";
|
|
554
|
-
Te(t === "rtl" || n === "rtl" ? "rtl" : "ltr");
|
|
555
|
-
});
|
|
556
|
-
return e.observe(document.documentElement, {
|
|
557
|
-
attributes: !0,
|
|
558
|
-
attributeFilter: ["dir", "lang"]
|
|
559
|
-
}), () => e.disconnect();
|
|
560
|
-
}, [M]), G(() => {
|
|
561
|
-
if (typeof document > "u") return;
|
|
562
|
-
let e;
|
|
563
|
-
const t = new MutationObserver(() => {
|
|
564
|
-
clearTimeout(e), e = setTimeout(() => {
|
|
565
|
-
var c;
|
|
566
|
-
const n = (c = P.current) == null ? void 0 : c.getApi();
|
|
567
|
-
n && typeof n.render == "function" && n.render();
|
|
568
|
-
}, 50);
|
|
569
|
-
});
|
|
570
|
-
return t.observe(document.documentElement, {
|
|
571
|
-
attributes: !0,
|
|
572
|
-
attributeFilter: ["class"]
|
|
573
|
-
}), () => {
|
|
574
|
-
clearTimeout(e), t.disconnect();
|
|
575
|
-
};
|
|
576
|
-
}, []), G(() => {
|
|
577
|
-
if (typeof document > "u") return;
|
|
578
|
-
const e = ee.current;
|
|
579
|
-
if (!e) return;
|
|
580
|
-
const t = () => {
|
|
581
|
-
e.querySelectorAll(".fc-daygrid-more-link").forEach((c) => {
|
|
582
|
-
c.getAttribute("role") || c.setAttribute("role", "button");
|
|
583
|
-
}), e.querySelectorAll('[aria-hidden="true"]').forEach((c) => {
|
|
584
|
-
c.querySelectorAll(
|
|
585
|
-
'a[href], button, [tabindex]:not([tabindex="-1"])'
|
|
586
|
-
).forEach((i) => {
|
|
587
|
-
i.setAttribute("tabindex", "-1");
|
|
588
|
-
});
|
|
589
|
-
});
|
|
590
|
-
};
|
|
591
|
-
t();
|
|
592
|
-
const n = new MutationObserver(t);
|
|
593
|
-
return n.observe(e, {
|
|
594
|
-
childList: !0,
|
|
595
|
-
subtree: !0,
|
|
596
|
-
attributes: !0,
|
|
597
|
-
attributeFilter: ["aria-hidden"]
|
|
598
|
-
}), () => n.disconnect();
|
|
599
|
-
}, [o]);
|
|
600
|
-
const F = ot(), [we, ke] = ne(""), te = l(() => {
|
|
601
|
-
const e = () => {
|
|
602
|
-
var t;
|
|
603
|
-
return (t = P.current) == null ? void 0 : t.getApi();
|
|
604
|
-
};
|
|
605
|
-
return {
|
|
606
|
-
getApi: () => {
|
|
607
|
-
var t;
|
|
608
|
-
return (t = P.current) == null ? void 0 : t.getApi();
|
|
609
|
-
},
|
|
610
|
-
today: () => {
|
|
611
|
-
var t;
|
|
612
|
-
(t = e()) == null || t.today();
|
|
613
|
-
},
|
|
614
|
-
prev: () => {
|
|
615
|
-
var t;
|
|
616
|
-
(t = e()) == null || t.prev();
|
|
617
|
-
},
|
|
618
|
-
next: () => {
|
|
619
|
-
var t;
|
|
620
|
-
(t = e()) == null || t.next();
|
|
621
|
-
},
|
|
622
|
-
gotoDate: (t) => {
|
|
623
|
-
var n;
|
|
624
|
-
(n = e()) == null || n.gotoDate(t);
|
|
625
|
-
},
|
|
626
|
-
changeView: (t) => {
|
|
627
|
-
var n;
|
|
628
|
-
(n = e()) == null || n.changeView(
|
|
629
|
-
le(t, L)
|
|
630
|
-
);
|
|
631
|
-
},
|
|
632
|
-
getTitle: () => {
|
|
633
|
-
var t;
|
|
634
|
-
return ((t = e()) == null ? void 0 : t.view.title) ?? "";
|
|
635
|
-
},
|
|
636
|
-
getCurrentView: () => {
|
|
637
|
-
var n;
|
|
638
|
-
return (n = e()) == null ? void 0 : n.view.type;
|
|
639
|
-
},
|
|
640
|
-
getCurrentDate: () => {
|
|
641
|
-
var t;
|
|
642
|
-
return (t = e()) == null ? void 0 : t.getDate();
|
|
643
|
-
},
|
|
644
|
-
focusEvent: (t) => {
|
|
645
|
-
const n = ee.current;
|
|
646
|
-
if (!n) return;
|
|
647
|
-
const c = `[data-event-id="${CSS.escape(t)}"]`, i = n.querySelector(c);
|
|
648
|
-
if (i) {
|
|
649
|
-
if (k.current && (clearTimeout(k.current), k.current = null), E.current && E.current !== i && E.current.classList.remove("calendar-event-focused"), i.scrollIntoView({
|
|
650
|
-
behavior: F ? "auto" : "smooth",
|
|
651
|
-
block: "center"
|
|
652
|
-
}), i.classList.add("calendar-event-focused"), E.current = i, b.current) {
|
|
653
|
-
const g = i.getAttribute("aria-label") ?? t, R = p ? "•••" : g;
|
|
654
|
-
b.current.textContent = o("calendar.focusedEvent", {
|
|
655
|
-
title: R
|
|
656
|
-
});
|
|
657
|
-
}
|
|
658
|
-
k.current = setTimeout(() => {
|
|
659
|
-
i.classList.remove("calendar-event-focused"), E.current === i && (E.current = null), k.current = null;
|
|
660
|
-
}, 3e3);
|
|
661
|
-
}
|
|
662
|
-
}
|
|
663
|
-
};
|
|
664
|
-
}, [F, p, o, L]);
|
|
665
|
-
Je(ye, () => te, [te]), it(kt, te, r), G(
|
|
666
|
-
() => () => {
|
|
667
|
-
k.current && (clearTimeout(k.current), k.current = null);
|
|
668
|
-
},
|
|
669
|
-
[]
|
|
670
|
-
);
|
|
671
|
-
const Ce = l(
|
|
672
|
-
() => ({
|
|
673
|
-
confirmed: o("calendar.status.confirmed"),
|
|
674
|
-
waiting: o("calendar.status.waiting"),
|
|
675
|
-
in_care: o("calendar.status.inCare"),
|
|
676
|
-
done: o("calendar.status.done"),
|
|
677
|
-
cancelled: o("calendar.status.cancelled"),
|
|
678
|
-
absent: o("calendar.status.absent")
|
|
679
|
-
}),
|
|
680
|
-
[o]
|
|
681
|
-
), ie = _(!0);
|
|
682
|
-
G(() => {
|
|
683
|
-
if (ie.current) {
|
|
684
|
-
ie.current = !1;
|
|
685
|
-
return;
|
|
686
|
-
}
|
|
687
|
-
b.current && (b.current.textContent = o(p ? "calendar.privacyModeOn" : "calendar.privacyModeOff"));
|
|
688
|
-
}, [p, o]);
|
|
689
|
-
const De = l(
|
|
690
|
-
() => s.map((e) => ({
|
|
691
|
-
id: e.id,
|
|
692
|
-
title: e.title,
|
|
693
|
-
start: e.start,
|
|
694
|
-
end: e.end,
|
|
695
|
-
allDay: e.allDay,
|
|
696
|
-
resourceId: e.resourceId,
|
|
697
|
-
display: e.isInternal ? "background" : void 0,
|
|
698
|
-
extendedProps: {
|
|
699
|
-
status: e.status,
|
|
700
|
-
resourceId: e.resourceId,
|
|
701
|
-
backgroundColor: e.backgroundColor,
|
|
702
|
-
textColor: e.textColor,
|
|
703
|
-
suffix: e.suffix,
|
|
704
|
-
privacyModeTitle: e.privacyModeTitle,
|
|
705
|
-
isBookedOnline: e.isBookedOnline ?? !1,
|
|
706
|
-
hasUnassignedPatient: e.hasUnassignedPatient ?? !1,
|
|
707
|
-
hasHighlightedAnamnesis: e.hasHighlightedAnamnesis ?? !1,
|
|
708
|
-
hasBillableAmount: e.hasBillableAmount ?? !1,
|
|
709
|
-
isTelehealth: e.isTelehealth ?? !1,
|
|
710
|
-
isRecurrenceParent: e.isRecurrenceParent ?? !1,
|
|
711
|
-
isInternal: e.isInternal ?? !1,
|
|
712
|
-
patientId: e.patientId,
|
|
713
|
-
operatorId: e.operatorId
|
|
714
|
-
}
|
|
715
|
-
})),
|
|
716
|
-
[s]
|
|
717
|
-
), Ne = l(
|
|
718
|
-
() => ({
|
|
719
|
-
year: "numeric",
|
|
720
|
-
month: "long"
|
|
721
|
-
}),
|
|
722
|
-
[]
|
|
723
|
-
), Ae = l(
|
|
724
|
-
() => ({
|
|
725
|
-
weekday: "short"
|
|
726
|
-
}),
|
|
727
|
-
[]
|
|
728
|
-
), Ie = l(
|
|
729
|
-
() => ({
|
|
730
|
-
hour: "numeric",
|
|
731
|
-
minute: "2-digit"
|
|
732
|
-
}),
|
|
733
|
-
[]
|
|
734
|
-
), Se = l(
|
|
735
|
-
() => ({
|
|
736
|
-
hour: "numeric",
|
|
737
|
-
minute: "2-digit"
|
|
738
|
-
}),
|
|
739
|
-
[]
|
|
740
|
-
), re = (e) => {
|
|
741
|
-
const t = e.extendedProps ?? {};
|
|
742
|
-
return {
|
|
743
|
-
id: e.id,
|
|
744
|
-
title: e.title,
|
|
745
|
-
start: e.start ?? /* @__PURE__ */ new Date(),
|
|
746
|
-
end: e.end ?? void 0,
|
|
747
|
-
resourceId: t.resourceId,
|
|
748
|
-
status: t.status,
|
|
749
|
-
allDay: e.allDay,
|
|
750
|
-
backgroundColor: t.backgroundColor,
|
|
751
|
-
textColor: t.textColor,
|
|
752
|
-
suffix: t.suffix,
|
|
753
|
-
privacyModeTitle: t.privacyModeTitle,
|
|
754
|
-
isBookedOnline: t.isBookedOnline,
|
|
755
|
-
hasUnassignedPatient: t.hasUnassignedPatient,
|
|
756
|
-
hasHighlightedAnamnesis: t.hasHighlightedAnamnesis,
|
|
757
|
-
hasBillableAmount: t.hasBillableAmount,
|
|
758
|
-
isTelehealth: t.isTelehealth,
|
|
759
|
-
isRecurrenceParent: t.isRecurrenceParent,
|
|
760
|
-
isInternal: t.isInternal,
|
|
761
|
-
patientId: t.patientId,
|
|
762
|
-
operatorId: t.operatorId
|
|
763
|
-
};
|
|
764
|
-
}, Pe = l(() => {
|
|
765
|
-
if (N)
|
|
766
|
-
return (e) => {
|
|
767
|
-
if (!e.event.start) return;
|
|
768
|
-
const t = e.oldEvent.start;
|
|
769
|
-
if (t && (N({
|
|
770
|
-
event: re(e.event),
|
|
771
|
-
oldStart: t,
|
|
772
|
-
newStart: e.event.start
|
|
773
|
-
}), b.current)) {
|
|
774
|
-
const n = e.event.extendedProps ?? {}, c = p ? n.privacyModeTitle ?? "•••" : e.event.title;
|
|
775
|
-
b.current.textContent = o("calendar.eventMoved", {
|
|
776
|
-
title: c
|
|
777
|
-
});
|
|
778
|
-
}
|
|
779
|
-
};
|
|
780
|
-
}, [N, p, o]), Me = l(() => {
|
|
781
|
-
if (m)
|
|
782
|
-
return (e) => {
|
|
783
|
-
if (!e.event.end) return;
|
|
784
|
-
const t = e.oldEvent.end;
|
|
785
|
-
if (!t)
|
|
786
|
-
return;
|
|
787
|
-
const n = e.event.end, c = e.event.start ?? e.oldEvent.start ?? t;
|
|
788
|
-
if (m({
|
|
789
|
-
event: re(e.event),
|
|
790
|
-
oldEnd: t,
|
|
791
|
-
newEnd: n
|
|
792
|
-
}), b.current) {
|
|
793
|
-
const i = Math.round(
|
|
794
|
-
(n.getTime() - c.getTime()) / 6e4
|
|
795
|
-
), g = e.event.extendedProps ?? {}, R = p ? g.privacyModeTitle ?? "•••" : e.event.title;
|
|
796
|
-
b.current.textContent = o("calendar.eventResized", {
|
|
797
|
-
title: R,
|
|
798
|
-
duration: i
|
|
799
|
-
});
|
|
800
|
-
}
|
|
801
|
-
};
|
|
802
|
-
}, [m, p, o]), Ee = l(() => {
|
|
803
|
-
if (f)
|
|
804
|
-
return (e) => {
|
|
805
|
-
e.event.start && f(re(e.event));
|
|
806
|
-
};
|
|
807
|
-
}, [f]), Re = l(() => {
|
|
808
|
-
if (y)
|
|
809
|
-
return (e) => {
|
|
810
|
-
var t;
|
|
811
|
-
y({
|
|
812
|
-
start: e.start,
|
|
813
|
-
end: e.end,
|
|
814
|
-
allDay: e.allDay,
|
|
815
|
-
resourceId: (t = e.resource) == null ? void 0 : t.id
|
|
816
|
-
});
|
|
817
|
-
};
|
|
818
|
-
}, [y]), _e = z((e) => {
|
|
819
|
-
ke(e.view.title);
|
|
820
|
-
}, []), Ge = l(() => Pt(q), [q]), ze = l(
|
|
821
|
-
() => [
|
|
822
|
-
Qe,
|
|
823
|
-
Xe,
|
|
824
|
-
et,
|
|
825
|
-
st,
|
|
826
|
-
tt,
|
|
827
|
-
rt,
|
|
828
|
-
nt,
|
|
829
|
-
at
|
|
830
|
-
],
|
|
831
|
-
[]
|
|
832
|
-
), Oe = l(
|
|
833
|
-
() => le(u, L),
|
|
834
|
-
[u, L]
|
|
835
|
-
), Be = z(
|
|
836
|
-
(e) => {
|
|
837
|
-
const t = e.resource.extendedProps, n = e.resource.title, c = t.shortTitle, i = t.color, g = t.shortTitleTextColor, R = i || g ? {
|
|
838
|
-
...i ? { "--resource-color": i } : {},
|
|
839
|
-
...g ? {
|
|
840
|
-
"--resource-initials-text-color": g
|
|
841
|
-
} : {}
|
|
842
|
-
} : void 0;
|
|
843
|
-
if (oe && c && i) {
|
|
844
|
-
`${e.resource.id}`;
|
|
845
|
-
const $e = [
|
|
846
|
-
"resource-initials",
|
|
847
|
-
"ds:[background-color:var(--resource-color)]",
|
|
848
|
-
g ? "ds:[color:var(--resource-initials-text-color)]" : null
|
|
849
|
-
].filter(Boolean).join(" ");
|
|
850
|
-
return /* @__PURE__ */ C("span", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
851
|
-
/* @__PURE__ */ a(
|
|
852
|
-
"span",
|
|
853
|
-
{
|
|
854
|
-
className: $e,
|
|
855
|
-
style: R,
|
|
856
|
-
"aria-hidden": "true",
|
|
857
|
-
children: c
|
|
858
|
-
}
|
|
859
|
-
),
|
|
860
|
-
/* @__PURE__ */ a("span", { className: "ds:truncate ds:text-start", children: n })
|
|
861
|
-
] });
|
|
862
|
-
}
|
|
863
|
-
return i ? (i && g && (`${e.resource.id}`, void 0), /* @__PURE__ */ C("span", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
864
|
-
/* @__PURE__ */ a(
|
|
865
|
-
"span",
|
|
866
|
-
{
|
|
867
|
-
className: "resource-dot ds:[background-color:var(--resource-color)]",
|
|
868
|
-
style: R,
|
|
869
|
-
"aria-hidden": "true"
|
|
870
|
-
}
|
|
871
|
-
),
|
|
872
|
-
/* @__PURE__ */ a("span", { className: "ds:truncate ds:text-start", children: n })
|
|
873
|
-
] })) : /* @__PURE__ */ a("span", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]", children: /* @__PURE__ */ a("span", { className: "ds:truncate ds:text-start", children: n }) });
|
|
874
|
-
},
|
|
875
|
-
[oe]
|
|
876
|
-
), Ve = l(
|
|
877
|
-
() => d == null ? void 0 : d.map((e) => ({
|
|
878
|
-
id: e.id,
|
|
879
|
-
title: e.title,
|
|
880
|
-
sequenceNumber: e.sequenceNumber,
|
|
881
|
-
extendedProps: {
|
|
882
|
-
shortTitle: e.shortTitle,
|
|
883
|
-
color: e.color,
|
|
884
|
-
shortTitleTextColor: e.shortTitleTextColor,
|
|
885
|
-
sequenceNumber: e.sequenceNumber
|
|
886
|
-
}
|
|
887
|
-
})),
|
|
888
|
-
[d]
|
|
889
|
-
), je = z(() => {
|
|
890
|
-
var e, t;
|
|
891
|
-
(t = (e = P.current) == null ? void 0 : e.getApi()) == null || t.today();
|
|
892
|
-
}, []), We = z(() => {
|
|
893
|
-
var e, t;
|
|
894
|
-
(t = (e = P.current) == null ? void 0 : e.getApi()) == null || t.prev();
|
|
895
|
-
}, []), Le = z(() => {
|
|
896
|
-
var e, t;
|
|
897
|
-
(t = (e = P.current) == null ? void 0 : e.getApi()) == null || t.next();
|
|
898
|
-
}, []), qe = [
|
|
899
|
-
"fc-theme-alfadocs",
|
|
900
|
-
"ds:bg-background ds:text-foreground",
|
|
901
|
-
"ds:rounded-[var(--radius-md)]",
|
|
902
|
-
$
|
|
903
|
-
].filter(Boolean).join(" "), Fe = x || T ? {
|
|
904
|
-
...x ? { "--calendar-mode-bg": x } : {},
|
|
905
|
-
...T ? { "--calendar-mode-fg": T } : {}
|
|
906
|
-
} : void 0, He = I !== "default" ? B ?? o(St[I]) : "", Ue = [
|
|
907
|
-
"ds:sticky ds:top-0 ds:z-10",
|
|
908
|
-
"ds:flex ds:items-center ds:gap-[var(--spacing-sm)]",
|
|
909
|
-
"ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]",
|
|
910
|
-
"ds:py-[var(--spacing-sm)]",
|
|
911
|
-
/* Caller-supplied colours flow through CSS custom properties set
|
|
912
|
-
in `modeBannerStyle`; fallback tokens apply when the caller
|
|
913
|
-
doesn't supply a hex. */
|
|
914
|
-
x ? "ds:[background-color:var(--calendar-mode-bg)]" : "ds:bg-[var(--muted)]",
|
|
915
|
-
T ? "ds:[color:var(--calendar-mode-fg)]" : "ds:text-[var(--muted-foreground)]"
|
|
916
|
-
].filter(Boolean).join(" "), Ke = [
|
|
917
|
-
"ds:inline-flex ds:items-center ds:justify-center",
|
|
918
|
-
"ds:min-h-[var(--min-target-size)]",
|
|
919
|
-
"ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]",
|
|
920
|
-
"ds:rounded-[var(--radius-full)]",
|
|
921
|
-
"ds:bg-[var(--background)] ds:text-[var(--foreground)]",
|
|
922
|
-
"ds:border ds:border-[var(--border)]",
|
|
923
|
-
"ds:font-[var(--font-weight-medium)] ds:text-[length:var(--font-size-sm)]",
|
|
924
|
-
"ds:transition-colors ds:duration-[var(--animation-duration)] ds:ease-[var(--ease-out)]",
|
|
925
|
-
"ds:hover:bg-[var(--muted)]",
|
|
926
|
-
"ds:focus-visible:outline-[length:var(--focus-ring-width)]",
|
|
927
|
-
"ds:focus-visible:outline-[var(--ring)]",
|
|
928
|
-
"ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
|
|
929
|
-
"ds:motion-reduce:transition-none"
|
|
930
|
-
].join(" ");
|
|
931
|
-
return /* @__PURE__ */ C(
|
|
932
|
-
"div",
|
|
933
|
-
{
|
|
934
|
-
ref: ee,
|
|
935
|
-
className: qe,
|
|
936
|
-
role: "region",
|
|
937
|
-
"aria-label": o("calendar.ariaLabel"),
|
|
938
|
-
"data-component": "calendar",
|
|
939
|
-
"data-component-id": r,
|
|
940
|
-
"data-mode": I,
|
|
941
|
-
children: [
|
|
942
|
-
/* @__PURE__ */ a(
|
|
943
|
-
"div",
|
|
944
|
-
{
|
|
945
|
-
ref: b,
|
|
946
|
-
"aria-live": "polite",
|
|
947
|
-
"aria-atomic": "true",
|
|
948
|
-
className: "ds:sr-only"
|
|
949
|
-
}
|
|
950
|
-
),
|
|
951
|
-
S,
|
|
952
|
-
I !== "default" ? /* @__PURE__ */ C(
|
|
953
|
-
"div",
|
|
954
|
-
{
|
|
955
|
-
className: Ue,
|
|
956
|
-
style: Fe,
|
|
957
|
-
role: "status",
|
|
958
|
-
children: [
|
|
959
|
-
/* @__PURE__ */ a("span", { className: "ds:flex-1 ds:text-start", children: He }),
|
|
960
|
-
V ? /* @__PURE__ */ a(
|
|
961
|
-
"button",
|
|
962
|
-
{
|
|
963
|
-
type: "button",
|
|
964
|
-
onClick: V,
|
|
965
|
-
className: Ke,
|
|
966
|
-
children: o("calendar.modeBanner.cancel")
|
|
967
|
-
}
|
|
968
|
-
) : null
|
|
969
|
-
]
|
|
970
|
-
}
|
|
971
|
-
) : null,
|
|
972
|
-
he !== !1 ? /* @__PURE__ */ a(
|
|
973
|
-
se,
|
|
974
|
-
{
|
|
975
|
-
title: we,
|
|
976
|
-
onToday: je,
|
|
977
|
-
onPrev: We,
|
|
978
|
-
onNext: Le,
|
|
979
|
-
end: be
|
|
980
|
-
}
|
|
981
|
-
) : null,
|
|
982
|
-
/* @__PURE__ */ a(
|
|
983
|
-
Ye,
|
|
984
|
-
{
|
|
985
|
-
ref: P,
|
|
986
|
-
plugins: ze,
|
|
987
|
-
schedulerLicenseKey: ge,
|
|
988
|
-
initialView: Oe,
|
|
989
|
-
views: Nt,
|
|
990
|
-
initialDate: h,
|
|
991
|
-
locale: q,
|
|
992
|
-
direction: xe,
|
|
993
|
-
firstDay: Ge,
|
|
994
|
-
editable: A,
|
|
995
|
-
eventDurationEditable: O ?? A,
|
|
996
|
-
selectable: U,
|
|
997
|
-
droppable: A,
|
|
998
|
-
dayMaxEvents: pe,
|
|
999
|
-
height: K,
|
|
1000
|
-
events: De,
|
|
1001
|
-
resources: Ve,
|
|
1002
|
-
resourceOrder: "sequenceNumber",
|
|
1003
|
-
resourceLabelContent: Be,
|
|
1004
|
-
headerToolbar: !1,
|
|
1005
|
-
allDayText: o("calendar.allDay"),
|
|
1006
|
-
noEventsText: o("calendar.noEvents"),
|
|
1007
|
-
titleFormat: Ne,
|
|
1008
|
-
dayHeaderFormat: Ae,
|
|
1009
|
-
eventTimeFormat: Ie,
|
|
1010
|
-
slotLabelFormat: Se,
|
|
1011
|
-
slotMinTime: J ?? "00:00:00",
|
|
1012
|
-
slotMaxTime: Z ?? "24:00:00",
|
|
1013
|
-
slotDuration: j ?? "00:30:00",
|
|
1014
|
-
slotLabelInterval: "01:00:00",
|
|
1015
|
-
datesAboveResources: Q,
|
|
1016
|
-
slotEventOverlap: X,
|
|
1017
|
-
stickyHeaderDates: W,
|
|
1018
|
-
nowIndicator: w,
|
|
1019
|
-
eventLongPressDelay: F ? 0 : 1e3,
|
|
1020
|
-
eventDragMinDistance: F ? 0 : 5,
|
|
1021
|
-
eventContent: (e) => Et({
|
|
1022
|
-
arg: e,
|
|
1023
|
-
locale: q,
|
|
1024
|
-
resources: d ?? [],
|
|
1025
|
-
statusLabels: Ce,
|
|
1026
|
-
privacyMode: p,
|
|
1027
|
-
showTime: Y
|
|
1028
|
-
}),
|
|
1029
|
-
eventClick: Ee,
|
|
1030
|
-
eventDrop: Pe,
|
|
1031
|
-
eventResize: Me,
|
|
1032
|
-
eventResizeStart: v,
|
|
1033
|
-
select: Re,
|
|
1034
|
-
datesSet: _e
|
|
1035
|
-
}
|
|
1036
|
-
)
|
|
1037
|
-
]
|
|
1038
|
-
}
|
|
1039
|
-
);
|
|
1040
|
-
}
|
|
1041
|
-
);
|
|
1042
|
-
ve.displayName = "Calendar";
|
|
1043
|
-
const _t = ve;
|
|
1044
|
-
_t.Toolbar = se;
|
|
1045
|
-
export {
|
|
1046
|
-
_t as C,
|
|
1047
|
-
kt as c,
|
|
1048
|
-
le as r
|
|
1049
|
-
};
|
|
1050
|
-
//# sourceMappingURL=calendar-DeAlFPsF.js.map
|