@savvycal/calendar 0.7.0 → 0.8.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/README.md +4 -0
- package/dist/components/day-grid-view/AllDayEventChip.d.ts.map +1 -1
- package/dist/components/day-grid-view/AllDayEventChip.js +31 -30
- package/dist/components/day-grid-view/DayGridView.d.ts.map +1 -1
- package/dist/components/day-grid-view/DayGridView.js +153 -152
- package/dist/components/resource-grid-view/ResourceGridView.d.ts.map +1 -1
- package/dist/components/resource-grid-view/ResourceGridView.js +170 -169
- package/dist/components/shared/AllDayRow.d.ts.map +1 -1
- package/dist/components/shared/AllDayRow.js +23 -22
- package/dist/components/shared/EventChip.d.ts.map +1 -1
- package/dist/components/shared/EventChip.js +60 -59
- package/dist/lib/accessibility.d.ts +6 -0
- package/dist/lib/accessibility.d.ts.map +1 -0
- package/dist/lib/accessibility.js +11 -0
- package/dist/types/calendar.d.ts +3 -0
- package/dist/types/calendar.d.ts.map +1 -1
- package/package.json +10 -10
|
@@ -1,147 +1,148 @@
|
|
|
1
|
-
import { jsxs as F, jsx as
|
|
2
|
-
import { useCallback as H, useRef as K, useState as
|
|
3
|
-
import { cn as
|
|
4
|
-
import { generateTimeSlots as
|
|
5
|
-
import { groupByResource as
|
|
6
|
-
import { computeUnavailableBlocks as
|
|
7
|
-
import { resourceGridViewDefaults as
|
|
8
|
-
import { GridHeader as
|
|
9
|
-
import { ResourceColumn as
|
|
10
|
-
import { TimeGutter as
|
|
11
|
-
import { SlotInteractionLayer as
|
|
12
|
-
import { SelectionOverlay as
|
|
13
|
-
import { UnavailabilityOverlay as
|
|
14
|
-
import { NowIndicator as
|
|
15
|
-
import { AllDayRow as
|
|
16
|
-
import { useEffectiveHourHeight as
|
|
17
|
-
import { useAnnouncer as
|
|
18
|
-
|
|
1
|
+
import { jsxs as F, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback as H, useRef as K, useState as bt, useEffect as P, useMemo as p } from "react";
|
|
3
|
+
import { cn as I } from "../../lib/utils.js";
|
|
4
|
+
import { generateTimeSlots as vt, formatDateLabel as Rt, formatTimeRange as q } from "../../lib/time.js";
|
|
5
|
+
import { groupByResource as Ht, computePositionedEvents as Ct } from "../../lib/overlap.js";
|
|
6
|
+
import { computeUnavailableBlocks as St } from "../../lib/availability.js";
|
|
7
|
+
import { resourceGridViewDefaults as Dt } from "./defaults.js";
|
|
8
|
+
import { GridHeader as $t } from "./GridHeader.js";
|
|
9
|
+
import { ResourceColumn as kt } from "./ResourceColumn.js";
|
|
10
|
+
import { TimeGutter as xt } from "../shared/TimeGutter.js";
|
|
11
|
+
import { SlotInteractionLayer as It } from "../shared/SlotInteractionLayer.js";
|
|
12
|
+
import { SelectionOverlay as Et } from "../shared/SelectionOverlay.js";
|
|
13
|
+
import { UnavailabilityOverlay as jt } from "../shared/UnavailabilityOverlay.js";
|
|
14
|
+
import { NowIndicator as Lt } from "../shared/NowIndicator.js";
|
|
15
|
+
import { AllDayRow as Nt } from "../shared/AllDayRow.js";
|
|
16
|
+
import { useEffectiveHourHeight as Bt } from "../shared/useEffectiveHourHeight.js";
|
|
17
|
+
import { useAnnouncer as Mt } from "../shared/useAnnouncer.js";
|
|
18
|
+
import { getEventLabel as J, getClientNameLabel as Q } from "../../lib/accessibility.js";
|
|
19
|
+
function ee({
|
|
19
20
|
date: a,
|
|
20
|
-
timeZone:
|
|
21
|
-
resources:
|
|
22
|
-
events:
|
|
21
|
+
timeZone: n,
|
|
22
|
+
resources: r,
|
|
23
|
+
events: E,
|
|
23
24
|
availability: y,
|
|
24
25
|
unavailability: T,
|
|
25
26
|
defaultUnavailable: w,
|
|
26
|
-
timeAxis:
|
|
27
|
-
onEventClick:
|
|
28
|
-
snapDuration:
|
|
29
|
-
placeholderDuration:
|
|
27
|
+
timeAxis: C,
|
|
28
|
+
onEventClick: j,
|
|
29
|
+
snapDuration: L,
|
|
30
|
+
placeholderDuration: X,
|
|
30
31
|
selectedRange: f,
|
|
31
32
|
onSelect: c,
|
|
32
|
-
onSlotClick:
|
|
33
|
-
className:
|
|
34
|
-
classNames:
|
|
35
|
-
hourHeight:
|
|
36
|
-
columnMinWidth:
|
|
37
|
-
renderHeader:
|
|
38
|
-
renderEvent:
|
|
39
|
-
selectionAppearance:
|
|
40
|
-
dragPreviewAppearance:
|
|
41
|
-
selectionRef:
|
|
42
|
-
selectionLingerMs:
|
|
33
|
+
onSlotClick: S,
|
|
34
|
+
className: Y,
|
|
35
|
+
classNames: N,
|
|
36
|
+
hourHeight: _ = 60,
|
|
37
|
+
columnMinWidth: U = 120,
|
|
38
|
+
renderHeader: Z,
|
|
39
|
+
renderEvent: D,
|
|
40
|
+
selectionAppearance: tt,
|
|
41
|
+
dragPreviewAppearance: et,
|
|
42
|
+
selectionRef: ot,
|
|
43
|
+
selectionLingerMs: $ = 0,
|
|
43
44
|
selectedEventId: B,
|
|
44
45
|
selectedEventRef: M,
|
|
45
|
-
renderCorner:
|
|
46
|
+
renderCorner: rt,
|
|
46
47
|
eventGap: it,
|
|
47
|
-
eventLayout:
|
|
48
|
-
stackOffset:
|
|
48
|
+
eventLayout: nt = "columns",
|
|
49
|
+
stackOffset: lt = 8
|
|
49
50
|
}) {
|
|
50
|
-
const d =
|
|
51
|
+
const d = C?.startHour ?? 0, m = C?.endHour ?? 24, k = C?.intervalMinutes ?? 60, {
|
|
51
52
|
effectiveHourHeight: s,
|
|
52
|
-
rootRef:
|
|
53
|
-
headerRef:
|
|
54
|
-
allDayRef:
|
|
55
|
-
gridRef:
|
|
53
|
+
rootRef: at,
|
|
54
|
+
headerRef: dt,
|
|
55
|
+
allDayRef: ct,
|
|
56
|
+
gridRef: mt,
|
|
56
57
|
headerHeight: G
|
|
57
|
-
} =
|
|
58
|
-
(t) =>
|
|
59
|
-
[
|
|
60
|
-
),
|
|
58
|
+
} = Bt(_, m - d), i = H(
|
|
59
|
+
(t) => I(Dt[t], N?.[t]),
|
|
60
|
+
[N]
|
|
61
|
+
), b = K(null), h = K(null), [st, O] = bt(
|
|
61
62
|
null
|
|
62
63
|
);
|
|
63
64
|
P(() => {
|
|
64
65
|
if (f)
|
|
65
|
-
h.current !== null && (clearTimeout(h.current), h.current = null),
|
|
66
|
-
else if (
|
|
67
|
-
const t =
|
|
68
|
-
|
|
66
|
+
h.current !== null && (clearTimeout(h.current), h.current = null), b.current = f;
|
|
67
|
+
else if (b.current && $ > 0) {
|
|
68
|
+
const t = b.current;
|
|
69
|
+
b.current = null, O(t), h.current = setTimeout(() => {
|
|
69
70
|
h.current = null, O(null);
|
|
70
|
-
},
|
|
71
|
+
}, $);
|
|
71
72
|
}
|
|
72
|
-
}, [f,
|
|
73
|
-
const v = f ??
|
|
74
|
-
() =>
|
|
75
|
-
[d, m,
|
|
73
|
+
}, [f, $]);
|
|
74
|
+
const v = f ?? st, x = p(
|
|
75
|
+
() => vt({ startHour: d, endHour: m, intervalMinutes: k }),
|
|
76
|
+
[d, m, k]
|
|
76
77
|
), { allDayEvents: W, timedEvents: A } = p(() => {
|
|
77
78
|
const t = [], e = [];
|
|
78
|
-
for (const
|
|
79
|
-
|
|
79
|
+
for (const o of E)
|
|
80
|
+
o.allDay ? t.push(o) : e.push(o);
|
|
80
81
|
return { allDayEvents: t, timedEvents: e };
|
|
81
|
-
}, [
|
|
82
|
-
() =>
|
|
82
|
+
}, [E]), ut = p(
|
|
83
|
+
() => Ht(W),
|
|
83
84
|
[W]
|
|
84
|
-
),
|
|
85
|
-
() =>
|
|
85
|
+
), ft = p(
|
|
86
|
+
() => Ct(
|
|
86
87
|
A,
|
|
87
|
-
|
|
88
|
+
n,
|
|
88
89
|
a,
|
|
89
90
|
d,
|
|
90
91
|
m,
|
|
91
92
|
s
|
|
92
93
|
),
|
|
93
|
-
[A,
|
|
94
|
-
),
|
|
94
|
+
[A, n, a, d, m, s]
|
|
95
|
+
), pt = p(() => {
|
|
95
96
|
if (!w && !y && !T)
|
|
96
97
|
return /* @__PURE__ */ new Map();
|
|
97
98
|
const t = /* @__PURE__ */ new Set([
|
|
98
99
|
...Object.keys(y ?? {}),
|
|
99
100
|
...Object.keys(T ?? {}),
|
|
100
|
-
...w ?
|
|
101
|
+
...w ? r.map((o) => o.id) : []
|
|
101
102
|
]), e = /* @__PURE__ */ new Map();
|
|
102
|
-
for (const
|
|
103
|
-
const u = y?.[
|
|
103
|
+
for (const o of t) {
|
|
104
|
+
const u = y?.[o], z = St(
|
|
104
105
|
w && u === void 0 ? [] : u,
|
|
105
|
-
T?.[
|
|
106
|
-
|
|
106
|
+
T?.[o],
|
|
107
|
+
n,
|
|
107
108
|
a,
|
|
108
109
|
d,
|
|
109
110
|
m,
|
|
110
111
|
s
|
|
111
112
|
);
|
|
112
|
-
z.length > 0 && e.set(
|
|
113
|
+
z.length > 0 && e.set(o, z);
|
|
113
114
|
}
|
|
114
115
|
return e;
|
|
115
116
|
}, [
|
|
116
117
|
w,
|
|
117
|
-
|
|
118
|
+
r,
|
|
118
119
|
y,
|
|
119
120
|
T,
|
|
120
|
-
|
|
121
|
+
n,
|
|
121
122
|
a,
|
|
122
123
|
d,
|
|
123
124
|
m,
|
|
124
125
|
s
|
|
125
|
-
]), { message:
|
|
126
|
+
]), { message: ht, announce: g } = Mt(), gt = p(
|
|
126
127
|
() => `Schedule for ${Rt(a)}`,
|
|
127
128
|
[a]
|
|
128
|
-
),
|
|
129
|
+
), V = H(
|
|
129
130
|
(t) => {
|
|
130
|
-
if (c?.(null),
|
|
131
|
-
const e = [t
|
|
132
|
-
|
|
131
|
+
if (c?.(null), j?.(t), t.allDay) {
|
|
132
|
+
const e = [J(t), "all day"], o = Q(t);
|
|
133
|
+
o && e.push(o), g(`Selected: ${e.join(", ")}`);
|
|
133
134
|
} else {
|
|
134
135
|
const e = [
|
|
135
|
-
t
|
|
136
|
-
q(t.startTime, t.endTime,
|
|
137
|
-
];
|
|
138
|
-
|
|
139
|
-
const
|
|
140
|
-
|
|
136
|
+
J(t),
|
|
137
|
+
q(t.startTime, t.endTime, n)
|
|
138
|
+
], o = Q(t);
|
|
139
|
+
o && e.push(o);
|
|
140
|
+
const u = r.find((R) => R.id === t.resourceId);
|
|
141
|
+
u && e.push(u.name), g(`Selected: ${e.join(", ")}`);
|
|
141
142
|
}
|
|
142
143
|
},
|
|
143
|
-
[c,
|
|
144
|
-
),
|
|
144
|
+
[c, j, n, r, g]
|
|
145
|
+
), yt = H(
|
|
145
146
|
(t) => {
|
|
146
147
|
if (!t) {
|
|
147
148
|
c?.(null);
|
|
@@ -153,20 +154,20 @@ function Ut({
|
|
|
153
154
|
endTime: t.endTime
|
|
154
155
|
};
|
|
155
156
|
c?.(e);
|
|
156
|
-
const
|
|
157
|
-
u &&
|
|
157
|
+
const o = [q(t.startTime, t.endTime, n)], u = r.find((R) => R.id === t.columnId);
|
|
158
|
+
u && o.push(u.name), g(`Selected time: ${o.join(", ")}`);
|
|
158
159
|
},
|
|
159
|
-
[c,
|
|
160
|
-
),
|
|
160
|
+
[c, n, r, g]
|
|
161
|
+
), Tt = H(
|
|
161
162
|
(t) => {
|
|
162
|
-
const e =
|
|
163
|
-
e &&
|
|
163
|
+
const e = r.find((o) => o.id === t.columnId);
|
|
164
|
+
e && S?.({
|
|
164
165
|
resource: e,
|
|
165
166
|
startTime: t.startTime,
|
|
166
167
|
endTime: t.endTime
|
|
167
168
|
});
|
|
168
169
|
},
|
|
169
|
-
[
|
|
170
|
+
[S, r]
|
|
170
171
|
);
|
|
171
172
|
P(() => {
|
|
172
173
|
if (!f || !c) return;
|
|
@@ -175,46 +176,46 @@ function Ut({
|
|
|
175
176
|
};
|
|
176
177
|
return document.addEventListener("keydown", t), () => document.removeEventListener("keydown", t);
|
|
177
178
|
}, [f, c]);
|
|
178
|
-
const
|
|
179
|
-
return /* @__PURE__ */ F("div", { ref:
|
|
179
|
+
const wt = s * k / 60;
|
|
180
|
+
return /* @__PURE__ */ F("div", { ref: at, className: I(i("root"), Y), children: [
|
|
180
181
|
/* @__PURE__ */ F(
|
|
181
182
|
"div",
|
|
182
183
|
{
|
|
183
|
-
ref:
|
|
184
|
-
className:
|
|
184
|
+
ref: mt,
|
|
185
|
+
className: i("grid"),
|
|
185
186
|
role: "region",
|
|
186
187
|
"aria-roledescription": "calendar",
|
|
187
|
-
"aria-label":
|
|
188
|
+
"aria-label": gt,
|
|
188
189
|
style: {
|
|
189
190
|
display: "grid",
|
|
190
|
-
gridTemplateColumns: `max-content repeat(${
|
|
191
|
-
gridTemplateRows: `auto auto repeat(${
|
|
191
|
+
gridTemplateColumns: `max-content repeat(${r.length}, minmax(${U}px, 1fr))`,
|
|
192
|
+
gridTemplateRows: `auto auto repeat(${x.length}, ${wt}px)`
|
|
192
193
|
},
|
|
193
194
|
children: [
|
|
194
|
-
/* @__PURE__ */
|
|
195
|
+
/* @__PURE__ */ l(
|
|
195
196
|
"div",
|
|
196
197
|
{
|
|
197
|
-
ref:
|
|
198
|
-
className:
|
|
198
|
+
ref: dt,
|
|
199
|
+
className: i("cornerCell"),
|
|
199
200
|
style: { gridRow: 1, gridColumn: 1 },
|
|
200
|
-
children:
|
|
201
|
+
children: rt?.({ timeZone: n, date: a })
|
|
201
202
|
}
|
|
202
203
|
),
|
|
203
|
-
|
|
204
|
-
|
|
204
|
+
r.map((t, e) => /* @__PURE__ */ l(
|
|
205
|
+
$t,
|
|
205
206
|
{
|
|
206
207
|
resource: t,
|
|
207
208
|
column: e + 2,
|
|
208
|
-
cls:
|
|
209
|
-
renderHeader:
|
|
209
|
+
cls: i,
|
|
210
|
+
renderHeader: Z
|
|
210
211
|
},
|
|
211
212
|
t.id
|
|
212
213
|
)),
|
|
213
|
-
/* @__PURE__ */
|
|
214
|
+
/* @__PURE__ */ l(
|
|
214
215
|
"div",
|
|
215
216
|
{
|
|
216
|
-
ref:
|
|
217
|
-
className:
|
|
217
|
+
ref: ct,
|
|
218
|
+
className: I(i("allDayCell"), "left-0 z-30"),
|
|
218
219
|
style: {
|
|
219
220
|
gridRow: 2,
|
|
220
221
|
gridColumn: 1,
|
|
@@ -222,22 +223,22 @@ function Ut({
|
|
|
222
223
|
}
|
|
223
224
|
}
|
|
224
225
|
),
|
|
225
|
-
|
|
226
|
+
r.map((t, e) => /* @__PURE__ */ l(
|
|
226
227
|
"div",
|
|
227
228
|
{
|
|
228
|
-
className:
|
|
229
|
+
className: i("allDayCell"),
|
|
229
230
|
style: {
|
|
230
231
|
gridRow: 2,
|
|
231
232
|
gridColumn: e + 2,
|
|
232
233
|
top: G,
|
|
233
|
-
...e ===
|
|
234
|
+
...e === r.length - 1 ? { borderRightWidth: 0 } : {}
|
|
234
235
|
},
|
|
235
|
-
children: /* @__PURE__ */
|
|
236
|
-
|
|
236
|
+
children: /* @__PURE__ */ l(
|
|
237
|
+
Nt,
|
|
237
238
|
{
|
|
238
|
-
events:
|
|
239
|
-
cls:
|
|
240
|
-
onEventClick:
|
|
239
|
+
events: ut.get(t.id) ?? [],
|
|
240
|
+
cls: i,
|
|
241
|
+
onEventClick: V,
|
|
241
242
|
selectedEventId: B,
|
|
242
243
|
selectedEventRef: M
|
|
243
244
|
}
|
|
@@ -245,121 +246,121 @@ function Ut({
|
|
|
245
246
|
},
|
|
246
247
|
`allday-${t.id}`
|
|
247
248
|
)),
|
|
248
|
-
|
|
249
|
-
|
|
249
|
+
x.map((t) => /* @__PURE__ */ l(
|
|
250
|
+
xt,
|
|
250
251
|
{
|
|
251
252
|
label: t.label,
|
|
252
253
|
row: t.index + 3,
|
|
253
254
|
isHourStart: t.isHourStart,
|
|
254
255
|
isFirst: t.index === 0,
|
|
255
|
-
cls:
|
|
256
|
+
cls: i
|
|
256
257
|
},
|
|
257
258
|
t.index
|
|
258
259
|
)),
|
|
259
|
-
|
|
260
|
-
(t) =>
|
|
260
|
+
x.map(
|
|
261
|
+
(t) => r.map((e, o) => /* @__PURE__ */ l(
|
|
261
262
|
"div",
|
|
262
263
|
{
|
|
263
|
-
className:
|
|
264
|
+
className: i(t.isHourStart ? "bodyCell" : "bodyCellMinor"),
|
|
264
265
|
style: {
|
|
265
266
|
gridRow: t.index + 3,
|
|
266
|
-
gridColumn:
|
|
267
|
+
gridColumn: o + 2,
|
|
267
268
|
...t.isHourStart ? {} : { borderTopStyle: "dotted" },
|
|
268
269
|
...t.index === 0 ? { borderTopWidth: 0 } : {},
|
|
269
|
-
...
|
|
270
|
+
...o === r.length - 1 ? { borderRightWidth: 0 } : {}
|
|
270
271
|
}
|
|
271
272
|
},
|
|
272
273
|
`${t.index}-${e.id}`
|
|
273
274
|
))
|
|
274
275
|
),
|
|
275
|
-
|
|
276
|
-
const
|
|
277
|
-
return
|
|
278
|
-
|
|
276
|
+
r.map((t, e) => {
|
|
277
|
+
const o = pt.get(t.id);
|
|
278
|
+
return o ? /* @__PURE__ */ l(
|
|
279
|
+
jt,
|
|
279
280
|
{
|
|
280
|
-
blocks:
|
|
281
|
+
blocks: o,
|
|
281
282
|
column: e + 2,
|
|
282
|
-
cls:
|
|
283
|
+
cls: i
|
|
283
284
|
},
|
|
284
285
|
`unavail-${t.id}`
|
|
285
286
|
) : null;
|
|
286
287
|
}),
|
|
287
|
-
|
|
288
|
-
|
|
288
|
+
L != null && r.map((t, e) => /* @__PURE__ */ l(
|
|
289
|
+
It,
|
|
289
290
|
{
|
|
290
291
|
columnId: t.id,
|
|
291
292
|
fallbackColor: t.color,
|
|
292
293
|
column: e + 2,
|
|
293
294
|
date: a,
|
|
294
|
-
timeZone:
|
|
295
|
+
timeZone: n,
|
|
295
296
|
startHour: d,
|
|
296
297
|
endHour: m,
|
|
297
298
|
hourHeight: s,
|
|
298
|
-
snapDuration:
|
|
299
|
-
placeholderDuration:
|
|
300
|
-
cls:
|
|
301
|
-
onSlotClick:
|
|
302
|
-
onSelect: c ?
|
|
303
|
-
dragPreviewAppearance:
|
|
304
|
-
renderEvent:
|
|
299
|
+
snapDuration: L,
|
|
300
|
+
placeholderDuration: X ?? 15,
|
|
301
|
+
cls: i,
|
|
302
|
+
onSlotClick: S ? Tt : void 0,
|
|
303
|
+
onSelect: c ? yt : void 0,
|
|
304
|
+
dragPreviewAppearance: et,
|
|
305
|
+
renderEvent: D
|
|
305
306
|
},
|
|
306
307
|
`slot-${t.id}`
|
|
307
308
|
)),
|
|
308
|
-
|
|
309
|
-
|
|
309
|
+
r.map((t, e) => /* @__PURE__ */ l(
|
|
310
|
+
kt,
|
|
310
311
|
{
|
|
311
312
|
resource: t,
|
|
312
|
-
positionedEvents:
|
|
313
|
+
positionedEvents: ft.get(t.id) ?? [],
|
|
313
314
|
column: e + 2,
|
|
314
|
-
timeZone:
|
|
315
|
-
cls:
|
|
316
|
-
onEventClick:
|
|
317
|
-
renderEvent:
|
|
315
|
+
timeZone: n,
|
|
316
|
+
cls: i,
|
|
317
|
+
onEventClick: V,
|
|
318
|
+
renderEvent: D,
|
|
318
319
|
eventGap: it,
|
|
319
|
-
eventLayout:
|
|
320
|
-
stackOffset:
|
|
320
|
+
eventLayout: nt,
|
|
321
|
+
stackOffset: lt,
|
|
321
322
|
selectedEventId: B,
|
|
322
323
|
selectedEventRef: M
|
|
323
324
|
},
|
|
324
325
|
t.id
|
|
325
326
|
)),
|
|
326
327
|
v != null && (() => {
|
|
327
|
-
const t =
|
|
328
|
+
const t = r.findIndex(
|
|
328
329
|
(e) => e.id === v.resourceId
|
|
329
330
|
);
|
|
330
|
-
return t === -1 ? null : /* @__PURE__ */
|
|
331
|
-
|
|
331
|
+
return t === -1 ? null : /* @__PURE__ */ l(
|
|
332
|
+
Et,
|
|
332
333
|
{
|
|
333
334
|
startTime: v.startTime,
|
|
334
335
|
endTime: v.endTime,
|
|
335
|
-
fallbackColor:
|
|
336
|
+
fallbackColor: r[t].color,
|
|
336
337
|
column: t + 2,
|
|
337
338
|
viewDate: a,
|
|
338
|
-
timeZone:
|
|
339
|
+
timeZone: n,
|
|
339
340
|
startHour: d,
|
|
340
341
|
hourHeight: s,
|
|
341
|
-
cls:
|
|
342
|
-
appearance:
|
|
343
|
-
selectionRef:
|
|
344
|
-
renderEvent:
|
|
342
|
+
cls: i,
|
|
343
|
+
appearance: tt,
|
|
344
|
+
selectionRef: ot,
|
|
345
|
+
renderEvent: D
|
|
345
346
|
}
|
|
346
347
|
);
|
|
347
348
|
})(),
|
|
348
|
-
/* @__PURE__ */
|
|
349
|
-
|
|
349
|
+
/* @__PURE__ */ l(
|
|
350
|
+
Lt,
|
|
350
351
|
{
|
|
351
352
|
date: a,
|
|
352
|
-
timeZone:
|
|
353
|
+
timeZone: n,
|
|
353
354
|
startHour: d,
|
|
354
355
|
endHour: m,
|
|
355
356
|
hourHeight: s,
|
|
356
|
-
cls:
|
|
357
|
+
cls: i
|
|
357
358
|
}
|
|
358
359
|
)
|
|
359
360
|
]
|
|
360
361
|
}
|
|
361
362
|
),
|
|
362
|
-
/* @__PURE__ */
|
|
363
|
+
/* @__PURE__ */ l(
|
|
363
364
|
"div",
|
|
364
365
|
{
|
|
365
366
|
"aria-live": "polite",
|
|
@@ -376,11 +377,11 @@ function Ut({
|
|
|
376
377
|
whiteSpace: "nowrap",
|
|
377
378
|
borderWidth: 0
|
|
378
379
|
},
|
|
379
|
-
children:
|
|
380
|
+
children: ht
|
|
380
381
|
}
|
|
381
382
|
)
|
|
382
383
|
] });
|
|
383
384
|
}
|
|
384
385
|
export {
|
|
385
|
-
|
|
386
|
+
ee as ResourceGridView
|
|
386
387
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AllDayRow.d.ts","sourceRoot":"","sources":["../../../src/components/shared/AllDayRow.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,GAAG,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"AllDayRow.d.ts","sourceRoot":"","sources":["../../../src/components/shared/AllDayRow.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,GAAG,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,KAAK,EACV,mBAAmB,EACnB,aAAa,EACb,kBAAkB,EACnB,MAAM,kBAAkB,CAAC;AAE1B,UAAU,cAAc;IACtB,MAAM,EAAE,mBAAmB,EAAE,CAAC;IAC9B,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,kBAAkB,KAAK,MAAM,CAAC;IAC/C,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IAC9C,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,gBAAgB,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CACxC;AAED,eAAO,MAAM,SAAS,sDAyDpB,CAAC"}
|
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { memo as
|
|
3
|
-
import { cn as
|
|
4
|
-
|
|
1
|
+
import { jsx as e, Fragment as d, jsxs as u } from "react/jsx-runtime";
|
|
2
|
+
import { memo as f } from "react";
|
|
3
|
+
import { cn as p } from "../../lib/utils.js";
|
|
4
|
+
import { getEventLabel as b, getClientNameLabel as h } from "../../lib/accessibility.js";
|
|
5
|
+
const j = f(function({
|
|
5
6
|
events: o,
|
|
6
|
-
cls:
|
|
7
|
-
onEventClick:
|
|
7
|
+
cls: l,
|
|
8
|
+
onEventClick: s,
|
|
8
9
|
selectedEventId: c,
|
|
9
|
-
selectedEventRef:
|
|
10
|
+
selectedEventRef: m
|
|
10
11
|
}) {
|
|
11
|
-
return o.length === 0 ? null : /* @__PURE__ */
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
const
|
|
12
|
+
return o.length === 0 ? null : /* @__PURE__ */ e(d, { children: o.map((t) => {
|
|
13
|
+
const i = t.id === c, r = [b(t), "all day"], n = h(t);
|
|
14
|
+
n && r.push(n);
|
|
15
|
+
const a = /* @__PURE__ */ u(
|
|
15
16
|
"button",
|
|
16
17
|
{
|
|
17
18
|
type: "button",
|
|
18
|
-
"aria-label":
|
|
19
|
-
className:
|
|
19
|
+
"aria-label": r.join(", "),
|
|
20
|
+
className: p(l("event"), i && l("eventSelected")),
|
|
20
21
|
style: {
|
|
21
22
|
position: "relative",
|
|
22
23
|
inset: "unset",
|
|
@@ -24,31 +25,31 @@ const x = u(function({
|
|
|
24
25
|
flex: "1 1 0",
|
|
25
26
|
minWidth: 0
|
|
26
27
|
},
|
|
27
|
-
onClick: () =>
|
|
28
|
+
onClick: () => s?.(t),
|
|
28
29
|
children: [
|
|
29
|
-
t.color && /* @__PURE__ */
|
|
30
|
+
t.color && /* @__PURE__ */ e(
|
|
30
31
|
"div",
|
|
31
32
|
{
|
|
32
|
-
className:
|
|
33
|
+
className: l("eventColorBar"),
|
|
33
34
|
style: { backgroundColor: t.color }
|
|
34
35
|
}
|
|
35
36
|
),
|
|
36
|
-
/* @__PURE__ */
|
|
37
|
+
/* @__PURE__ */ e("div", { className: l("eventTitle"), children: t.title })
|
|
37
38
|
]
|
|
38
39
|
},
|
|
39
40
|
t.id
|
|
40
41
|
);
|
|
41
|
-
return
|
|
42
|
+
return i ? /* @__PURE__ */ e(
|
|
42
43
|
"div",
|
|
43
44
|
{
|
|
44
|
-
ref:
|
|
45
|
+
ref: m,
|
|
45
46
|
style: { flex: "1 1 0", minWidth: 0 },
|
|
46
|
-
children:
|
|
47
|
+
children: a
|
|
47
48
|
},
|
|
48
49
|
t.id
|
|
49
|
-
) :
|
|
50
|
+
) : a;
|
|
50
51
|
}) });
|
|
51
52
|
});
|
|
52
53
|
export {
|
|
53
|
-
|
|
54
|
+
j as AllDayRow
|
|
54
55
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EventChip.d.ts","sourceRoot":"","sources":["../../../src/components/shared/EventChip.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,GAAG,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EACV,aAAa,EACb,WAAW,EACX,kBAAkB,EAClB,eAAe,EACf,kBAAkB,EACnB,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"EventChip.d.ts","sourceRoot":"","sources":["../../../src/components/shared/EventChip.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,GAAG,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EACV,aAAa,EACb,WAAW,EACX,kBAAkB,EAClB,eAAe,EACf,kBAAkB,EACnB,MAAM,kBAAkB,CAAC;AAI1B,UAAU,cAAc;IACtB,UAAU,EAAE,eAAe,CAAC;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,kBAAkB,KAAK,MAAM,CAAC;IAC/C,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IACzC,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE;QACpB,KAAK,EAAE,kBAAkB,CAAC;QAC1B,QAAQ,EAAE,eAAe,CAAC;KAC3B,KAAK,KAAK,CAAC,SAAS,CAAC;IACtB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,gBAAgB,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CACxC;AAED,eAAO,MAAM,SAAS,sDA2JpB,CAAC"}
|