@savvycal/calendar 0.7.0 → 0.8.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/README.md CHANGED
@@ -256,6 +256,7 @@ interface TimedCalendarEvent {
256
256
  color?: string;
257
257
  clientName?: string;
258
258
  status?: 'confirmed' | 'canceled' | 'tentative';
259
+ ariaLabel?: string;
259
260
  metadata?: Record<string, unknown>;
260
261
  }
261
262
 
@@ -269,10 +270,13 @@ interface AllDayCalendarEvent {
269
270
  color?: string;
270
271
  clientName?: string;
271
272
  status?: 'confirmed' | 'canceled' | 'tentative';
273
+ ariaLabel?: string;
272
274
  metadata?: Record<string, unknown>;
273
275
  }
274
276
  ```
275
277
 
278
+ The optional `ariaLabel` field provides a plain-text label used for `aria-label` attributes and screen reader announcements. When `title` or `clientName` are React elements (not plain strings), set `ariaLabel` to avoid `"[object Object]"` in accessible labels.
279
+
276
280
  ### AvailabilityRange
277
281
 
278
282
  ```ts
@@ -1 +1 @@
1
- {"version":3,"file":"AllDayEventChip.d.ts","sourceRoot":"","sources":["../../../src/components/day-grid-view/AllDayEventChip.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,GAAG,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAC7E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAE3D,UAAU,oBAAoB;IAC5B,UAAU,EAAE,qBAAqB,CAAC;IAClC,UAAU,EAAE,MAAM,CAAC;IACnB,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,qBAAqB,KAAK,MAAM,CAAC;IAClD,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,eAAe,4DAkG1B,CAAC"}
1
+ {"version":3,"file":"AllDayEventChip.d.ts","sourceRoot":"","sources":["../../../src/components/day-grid-view/AllDayEventChip.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,GAAG,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,KAAK,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAC7E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAE3D,UAAU,oBAAoB;IAC5B,UAAU,EAAE,qBAAqB,CAAC;IAClC,UAAU,EAAE,MAAM,CAAC;IACnB,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,qBAAqB,KAAK,MAAM,CAAC;IAClD,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,eAAe,4DAmG1B,CAAC"}
@@ -1,31 +1,32 @@
1
- import { jsxs as R, Fragment as D, jsx as n } from "react/jsx-runtime";
2
- import { memo as x } from "react";
3
- import { cn as f } from "../../lib/utils.js";
4
- const B = x(function({
5
- positioned: y,
6
- laneOffset: g,
1
+ import { jsxs as D, Fragment as E, jsx as n } from "react/jsx-runtime";
2
+ import { memo as L } from "react";
3
+ import { cn as g } from "../../lib/utils.js";
4
+ import { getEventLabel as x, getClientNameLabel as N } from "../../lib/accessibility.js";
5
+ const T = L(function({
6
+ positioned: b,
7
+ laneOffset: y,
7
8
  cls: t,
8
9
  onEventClick: a,
9
10
  selectedEventId: h,
10
- selectedEventRef: b
11
+ selectedEventRef: v
11
12
  }) {
12
13
  const {
13
14
  event: e,
14
- gridColumnStart: o,
15
+ gridColumnStart: i,
15
16
  gridColumnSpan: r,
16
- lane: v,
17
+ lane: C,
17
18
  continuesBefore: l,
18
19
  continuesAfter: s
19
- } = y, C = e.id === h, d = v + 1 + g, i = [e.title, "all day"];
20
- e.clientName && i.push(e.clientName);
21
- const c = l ? 2 : 4, m = s ? 2 : 4, p = {
20
+ } = b, R = e.id === h, d = C + 1 + y, o = [x(e), "all day"], c = N(e);
21
+ c && o.push(c);
22
+ const m = l ? 2 : 4, p = s ? 2 : 4, u = {
22
23
  ...l ? {
23
24
  borderTopLeftRadius: 0,
24
25
  borderBottomLeftRadius: 0,
25
26
  paddingLeft: 4
26
27
  } : {},
27
28
  ...s ? { borderTopRightRadius: 0, borderBottomRightRadius: 0 } : {}
28
- }, u = /* @__PURE__ */ R(D, { children: [
29
+ }, f = /* @__PURE__ */ D(E, { children: [
29
30
  e.color && !l && /* @__PURE__ */ n(
30
31
  "div",
31
32
  {
@@ -35,31 +36,31 @@ const B = x(function({
35
36
  ),
36
37
  /* @__PURE__ */ n("span", { className: t("allDayEventTitle"), children: e.title })
37
38
  ] });
38
- return C ? /* @__PURE__ */ n(
39
+ return R ? /* @__PURE__ */ n(
39
40
  "div",
40
41
  {
41
- ref: b,
42
+ ref: v,
42
43
  style: {
43
- gridColumn: `${o} / span ${r}`,
44
+ gridColumn: `${i} / span ${r}`,
44
45
  gridRow: d,
45
46
  display: "flex",
46
47
  minWidth: 0,
47
- marginLeft: c,
48
- marginRight: m
48
+ marginLeft: m,
49
+ marginRight: p
49
50
  },
50
51
  children: /* @__PURE__ */ n(
51
52
  "button",
52
53
  {
53
54
  type: "button",
54
- "aria-label": i.join(", "),
55
- className: f(
55
+ "aria-label": o.join(", "),
56
+ className: g(
56
57
  t("allDayEvent"),
57
58
  t("allDayEventSelected"),
58
59
  "relative flex items-center gap-1 w-full"
59
60
  ),
60
- style: p,
61
+ style: u,
61
62
  onClick: () => a?.(e),
62
- children: u
63
+ children: f
63
64
  }
64
65
  )
65
66
  }
@@ -67,20 +68,20 @@ const B = x(function({
67
68
  "button",
68
69
  {
69
70
  type: "button",
70
- "aria-label": i.join(", "),
71
- className: f(t("allDayEvent"), "relative flex items-center gap-1"),
71
+ "aria-label": o.join(", "),
72
+ className: g(t("allDayEvent"), "relative flex items-center gap-1"),
72
73
  style: {
73
- gridColumn: `${o} / span ${r}`,
74
+ gridColumn: `${i} / span ${r}`,
74
75
  gridRow: d,
75
- marginLeft: c,
76
- marginRight: m,
77
- ...p
76
+ marginLeft: m,
77
+ marginRight: p,
78
+ ...u
78
79
  },
79
80
  onClick: () => a?.(e),
80
- children: u
81
+ children: f
81
82
  }
82
83
  );
83
84
  });
84
85
  export {
85
- B as AllDayEventChip
86
+ T as AllDayEventChip
86
87
  };
@@ -1 +1 @@
1
- {"version":3,"file":"DayGridView.d.ts","sourceRoot":"","sources":["../../../src/components/day-grid-view/DayGridView.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAKV,gBAAgB,EAEjB,MAAM,kBAAkB,CAAC;AAa1B,wBAAgB,WAAW,CAAC,EAC1B,WAAW,EACX,QAAQ,EACR,MAAM,EACN,YAAY,EACZ,cAAc,EACd,kBAAkB,EAClB,QAAQ,EACR,YAAY,EACZ,YAAY,EACZ,mBAAmB,EACnB,aAAa,EACb,QAAQ,EACR,WAAW,EACX,SAAS,EACT,UAAU,EACV,UAAe,EACf,cAAoB,EACpB,YAAY,EACZ,WAAW,EACX,mBAAmB,EACnB,qBAAqB,EACrB,YAAY,EACZ,iBAAqB,EACrB,eAAe,EACf,gBAAgB,EAChB,YAAY,EACZ,QAAQ,EACR,WAAuB,EACvB,WAAe,GAChB,EAAE,gBAAgB,2CA8ZlB"}
1
+ {"version":3,"file":"DayGridView.d.ts","sourceRoot":"","sources":["../../../src/components/day-grid-view/DayGridView.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAKV,gBAAgB,EAEjB,MAAM,kBAAkB,CAAC;AAc1B,wBAAgB,WAAW,CAAC,EAC1B,WAAW,EACX,QAAQ,EACR,MAAM,EACN,YAAY,EACZ,cAAc,EACd,kBAAkB,EAClB,QAAQ,EACR,YAAY,EACZ,YAAY,EACZ,mBAAmB,EACnB,aAAa,EACb,QAAQ,EACR,WAAW,EACX,SAAS,EACT,UAAU,EACV,UAAe,EACf,cAAoB,EACpB,YAAY,EACZ,WAAW,EACX,mBAAmB,EACnB,qBAAqB,EACrB,YAAY,EACZ,iBAAqB,EACrB,eAAe,EACf,gBAAgB,EAChB,YAAY,EACZ,QAAQ,EACR,WAAuB,EACvB,WAAe,GAChB,EAAE,gBAAgB,2CAgalB"}
@@ -1,143 +1,144 @@
1
1
  import { jsxs as F, jsx as a } from "react/jsx-runtime";
2
- import { useMemo as m, useCallback as g, useRef as K, useState as Tt, useEffect as U } from "react";
2
+ import { useMemo as m, useCallback as D, useRef as K, useState as Ht, useEffect as U } from "react";
3
3
  import { Temporal as E } from "temporal-polyfill";
4
- import { cn as N } from "../../lib/utils.js";
5
- import { generateDateRange as wt, generateTimeSlots as Ht, formatDayOfWeek as q, formatTimeRange as J } from "../../lib/time.js";
6
- import { layoutAllDayEvents as bt, computePositionedEventsByDate as vt } from "../../lib/overlap.js";
7
- import { computeUnavailableBlocks as $t } from "../../lib/availability.js";
8
- import { UnavailabilityOverlay as xt } from "../shared/UnavailabilityOverlay.js";
9
- import { dayGridViewDefaults as Ct } from "./defaults.js";
10
- import { DayHeader as Et } from "./DayHeader.js";
11
- import { DayColumn as Nt } from "./DayColumn.js";
12
- import { TimeGutter as kt } from "../shared/TimeGutter.js";
13
- import { SlotInteractionLayer as It } from "../shared/SlotInteractionLayer.js";
14
- import { SelectionOverlay as jt } from "../shared/SelectionOverlay.js";
15
- import { NowIndicator as Mt } from "../shared/NowIndicator.js";
16
- import { AllDaySection as At } from "./AllDaySection.js";
17
- import { useEffectiveHourHeight as Bt } from "../shared/useEffectiveHourHeight.js";
18
- import { useAnnouncer as Gt } from "../shared/useAnnouncer.js";
19
- function rr({
4
+ import { cn as k } from "../../lib/utils.js";
5
+ import { generateDateRange as bt, generateTimeSlots as vt, formatDayOfWeek as q, formatTimeRange as J } from "../../lib/time.js";
6
+ import { layoutAllDayEvents as Ct, computePositionedEventsByDate as $t } from "../../lib/overlap.js";
7
+ import { computeUnavailableBlocks as xt } from "../../lib/availability.js";
8
+ import { UnavailabilityOverlay as Et } from "../shared/UnavailabilityOverlay.js";
9
+ import { dayGridViewDefaults as kt } from "./defaults.js";
10
+ import { DayHeader as Nt } from "./DayHeader.js";
11
+ import { DayColumn as It } from "./DayColumn.js";
12
+ import { TimeGutter as Lt } from "../shared/TimeGutter.js";
13
+ import { SlotInteractionLayer as jt } from "../shared/SlotInteractionLayer.js";
14
+ import { SelectionOverlay as Mt } from "../shared/SelectionOverlay.js";
15
+ import { NowIndicator as At } from "../shared/NowIndicator.js";
16
+ import { AllDaySection as Bt } from "./AllDaySection.js";
17
+ import { useEffectiveHourHeight as Gt } from "../shared/useEffectiveHourHeight.js";
18
+ import { useAnnouncer as Ot } from "../shared/useAnnouncer.js";
19
+ import { getEventLabel as Q, getClientNameLabel as X } from "../../lib/accessibility.js";
20
+ function nr({
20
21
  activeRange: d,
21
- timeZone: o,
22
- events: k,
22
+ timeZone: n,
23
+ events: N,
23
24
  availability: S,
24
25
  unavailability: T,
25
26
  defaultUnavailable: I,
26
27
  timeAxis: w,
27
- onEventClick: j,
28
- snapDuration: M,
29
- placeholderDuration: Q,
28
+ onEventClick: L,
29
+ snapDuration: j,
30
+ placeholderDuration: Y,
30
31
  selectedRange: f,
31
32
  onSelect: s,
32
33
  onSlotClick: H,
33
- className: X,
34
- classNames: A,
35
- hourHeight: Y = 60,
36
- columnMinWidth: _ = 120,
37
- renderHeader: Z,
34
+ className: _,
35
+ classNames: M,
36
+ hourHeight: Z = 60,
37
+ columnMinWidth: tt = 120,
38
+ renderHeader: rt,
38
39
  renderEvent: b,
39
- selectionAppearance: tt,
40
- dragPreviewAppearance: rt,
41
- selectionRef: et,
40
+ selectionAppearance: et,
41
+ dragPreviewAppearance: ot,
42
+ selectionRef: nt,
42
43
  selectionLingerMs: v = 0,
43
- selectedEventId: B,
44
- selectedEventRef: G,
45
- renderCorner: ot,
46
- eventGap: nt,
47
- eventLayout: it = "columns",
48
- stackOffset: at = 8
44
+ selectedEventId: A,
45
+ selectedEventRef: B,
46
+ renderCorner: it,
47
+ eventGap: at,
48
+ eventLayout: lt = "columns",
49
+ stackOffset: st = 8
49
50
  }) {
50
- const l = w?.startHour ?? 0, c = w?.endHour ?? 24, $ = w?.intervalMinutes ?? 60, e = m(
51
- () => wt(d.startDate, d.endDate),
51
+ const l = w?.startHour ?? 0, c = w?.endHour ?? 24, C = w?.intervalMinutes ?? 60, o = m(
52
+ () => bt(d.startDate, d.endDate),
52
53
  [d.startDate, d.endDate]
53
- ), O = m(() => E.Now.plainDateISO(o).toString(), [o]), {
54
+ ), G = m(() => E.Now.plainDateISO(n).toString(), [n]), {
54
55
  effectiveHourHeight: u,
55
- rootRef: lt,
56
- headerRef: st,
57
- allDayRef: ct,
58
- gridRef: mt,
59
- headerHeight: P
60
- } = Bt(Y, c - l), i = g(
61
- (t) => N(Ct[t], A?.[t]),
62
- [A]
63
- ), y = K(null), p = K(null), [dt, W] = Tt(null);
56
+ rootRef: ct,
57
+ headerRef: mt,
58
+ allDayRef: dt,
59
+ gridRef: ut,
60
+ headerHeight: O
61
+ } = Gt(Z, c - l), i = D(
62
+ (t) => k(kt[t], M?.[t]),
63
+ [M]
64
+ ), y = K(null), p = K(null), [ft, P] = Ht(null);
64
65
  U(() => {
65
66
  if (f)
66
67
  p.current !== null && (clearTimeout(p.current), p.current = null), y.current = f;
67
68
  else if (y.current && v > 0) {
68
69
  const t = y.current;
69
- y.current = null, W(t), p.current = setTimeout(() => {
70
- p.current = null, W(null);
70
+ y.current = null, P(t), p.current = setTimeout(() => {
71
+ p.current = null, P(null);
71
72
  }, v);
72
73
  }
73
74
  }, [f, v]);
74
- const D = f ?? dt, x = m(
75
- () => Ht({ startHour: l, endHour: c, intervalMinutes: $ }),
76
- [l, c, $]
77
- ), { allDayEvents: R, timedEvents: L } = m(() => {
75
+ const g = f ?? ft, $ = m(
76
+ () => vt({ startHour: l, endHour: c, intervalMinutes: C }),
77
+ [l, c, C]
78
+ ), { allDayEvents: W, timedEvents: R } = m(() => {
78
79
  const t = [], r = [];
79
- for (const n of k)
80
- n.allDay ? t.push(n) : r.push(n);
80
+ for (const e of N)
81
+ e.allDay ? t.push(e) : r.push(e);
81
82
  return { allDayEvents: t, timedEvents: r };
82
- }, [k]), ut = m(
83
- () => bt(R, e),
84
- [R, e]
85
- ), ft = m(
86
- () => vt(
87
- L,
83
+ }, [N]), pt = m(
84
+ () => Ct(W, o),
85
+ [W, o]
86
+ ), ht = m(
87
+ () => $t(
88
+ R,
89
+ n,
88
90
  o,
89
- e,
90
91
  l,
91
92
  c,
92
93
  u
93
94
  ),
94
- [L, o, e, l, c, u]
95
- ), C = m(
95
+ [R, n, o, l, c, u]
96
+ ), x = m(
96
97
  () => I ? S ?? [] : S,
97
98
  [I, S]
98
- ), pt = m(() => {
99
- if (C === void 0 && !T)
99
+ ), yt = m(() => {
100
+ if (x === void 0 && !T)
100
101
  return /* @__PURE__ */ new Map();
101
102
  const t = /* @__PURE__ */ new Map();
102
- for (const r of e) {
103
- const n = $t(
104
- C,
103
+ for (const r of o) {
104
+ const e = xt(
105
+ x,
105
106
  T,
106
- o,
107
+ n,
107
108
  r,
108
109
  l,
109
110
  c,
110
111
  u
111
112
  );
112
- n.length > 0 && t.set(r.toString(), n);
113
+ e.length > 0 && t.set(r.toString(), e);
113
114
  }
114
115
  return t;
115
116
  }, [
116
- C,
117
+ x,
117
118
  T,
119
+ n,
118
120
  o,
119
- e,
120
121
  l,
121
122
  c,
122
123
  u
123
- ]), { message: ht, announce: h } = Gt(), yt = m(() => {
124
+ ]), { message: gt, announce: h } = Ot(), Dt = m(() => {
124
125
  const t = q(d.startDate), r = q(d.endDate);
125
126
  return `Schedule for ${t} to ${r}`;
126
- }, [d.startDate, d.endDate]), V = g(
127
+ }, [d.startDate, d.endDate]), V = D(
127
128
  (t) => {
128
- if (s?.(null), j?.(t), t.allDay) {
129
- const r = [t.title, "all day"];
130
- t.clientName && r.push(t.clientName), h(`Selected: ${r.join(", ")}`);
129
+ if (s?.(null), L?.(t), t.allDay) {
130
+ const r = [Q(t), "all day"], e = X(t);
131
+ e && r.push(e), h(`Selected: ${r.join(", ")}`);
131
132
  } else {
132
133
  const r = [
133
- t.title,
134
- J(t.startTime, t.endTime, o)
135
- ];
136
- t.clientName && r.push(t.clientName), h(`Selected: ${r.join(", ")}`);
134
+ Q(t),
135
+ J(t.startTime, t.endTime, n)
136
+ ], e = X(t);
137
+ e && r.push(e), h(`Selected: ${r.join(", ")}`);
137
138
  }
138
139
  },
139
- [s, j, o, h]
140
- ), Dt = g(
140
+ [s, L, n, h]
141
+ ), St = D(
141
142
  (t) => {
142
143
  if (!t) {
143
144
  s?.(null);
@@ -148,11 +149,11 @@ function rr({
148
149
  endTime: t.endTime
149
150
  };
150
151
  s?.(r);
151
- const n = [J(t.startTime, t.endTime, o)];
152
- h(`Selected time: ${n.join(", ")}`);
152
+ const e = [J(t.startTime, t.endTime, n)];
153
+ h(`Selected time: ${e.join(", ")}`);
153
154
  },
154
- [s, o, h]
155
- ), gt = g(
155
+ [s, n, h]
156
+ ), Tt = D(
156
157
  (t) => {
157
158
  const r = E.PlainDate.from(t.columnId);
158
159
  H?.({
@@ -170,68 +171,68 @@ function rr({
170
171
  };
171
172
  return document.addEventListener("keydown", t), () => document.removeEventListener("keydown", t);
172
173
  }, [f, s]);
173
- const St = u * $ / 60, z = e.find((t) => t.toString() === O);
174
- return /* @__PURE__ */ F("div", { ref: lt, className: N(i("root"), X), children: [
174
+ const wt = u * C / 60, z = o.find((t) => t.toString() === G);
175
+ return /* @__PURE__ */ F("div", { ref: ct, className: k(i("root"), _), children: [
175
176
  /* @__PURE__ */ F(
176
177
  "div",
177
178
  {
178
- ref: mt,
179
+ ref: ut,
179
180
  className: i("grid"),
180
181
  role: "region",
181
182
  "aria-roledescription": "calendar",
182
- "aria-label": yt,
183
+ "aria-label": Dt,
183
184
  style: {
184
185
  display: "grid",
185
- gridTemplateColumns: `max-content repeat(${e.length}, minmax(${_}px, 1fr))`,
186
- gridTemplateRows: `auto auto repeat(${x.length}, ${St}px)`
186
+ gridTemplateColumns: `max-content repeat(${o.length}, minmax(${tt}px, 1fr))`,
187
+ gridTemplateRows: `auto auto repeat(${$.length}, ${wt}px)`
187
188
  },
188
189
  children: [
189
190
  /* @__PURE__ */ a(
190
191
  "div",
191
192
  {
192
- ref: st,
193
+ ref: mt,
193
194
  className: i("cornerCell"),
194
195
  style: { gridRow: 1, gridColumn: 1 },
195
- children: ot?.({ timeZone: o })
196
+ children: it?.({ timeZone: n })
196
197
  }
197
198
  ),
198
- e.map((t, r) => /* @__PURE__ */ a(
199
- Et,
199
+ o.map((t, r) => /* @__PURE__ */ a(
200
+ Nt,
200
201
  {
201
202
  date: t,
202
- isToday: t.toString() === O,
203
+ isToday: t.toString() === G,
203
204
  column: r + 2,
204
205
  cls: i,
205
- renderHeader: Z
206
+ renderHeader: rt
206
207
  },
207
208
  t.toString()
208
209
  )),
209
210
  /* @__PURE__ */ a(
210
211
  "div",
211
212
  {
212
- ref: ct,
213
- className: N(i("allDayCell"), "left-0 z-30"),
213
+ ref: dt,
214
+ className: k(i("allDayCell"), "left-0 z-30"),
214
215
  style: {
215
216
  gridRow: 2,
216
217
  gridColumn: 1,
217
- top: P
218
+ top: O
218
219
  }
219
220
  }
220
221
  ),
221
222
  /* @__PURE__ */ a(
222
- At,
223
+ Bt,
223
224
  {
224
- positioned: ut,
225
- dates: e,
226
- headerHeight: P,
225
+ positioned: pt,
226
+ dates: o,
227
+ headerHeight: O,
227
228
  cls: i,
228
229
  onEventClick: V,
229
- selectedEventId: B,
230
- selectedEventRef: G
230
+ selectedEventId: A,
231
+ selectedEventRef: B
231
232
  }
232
233
  ),
233
- x.map((t) => /* @__PURE__ */ a(
234
- kt,
234
+ $.map((t) => /* @__PURE__ */ a(
235
+ Lt,
235
236
  {
236
237
  label: t.label,
237
238
  row: t.index + 3,
@@ -241,97 +242,97 @@ function rr({
241
242
  },
242
243
  t.index
243
244
  )),
244
- x.map(
245
- (t) => e.map((r, n) => /* @__PURE__ */ a(
245
+ $.map(
246
+ (t) => o.map((r, e) => /* @__PURE__ */ a(
246
247
  "div",
247
248
  {
248
249
  className: i(t.isHourStart ? "bodyCell" : "bodyCellMinor"),
249
250
  style: {
250
251
  gridRow: t.index + 3,
251
- gridColumn: n + 2,
252
+ gridColumn: e + 2,
252
253
  ...t.isHourStart ? {} : { borderTopStyle: "dotted" },
253
254
  ...t.index === 0 ? { borderTopWidth: 0 } : {},
254
- ...n === e.length - 1 ? { borderRightWidth: 0 } : {}
255
+ ...e === o.length - 1 ? { borderRightWidth: 0 } : {}
255
256
  }
256
257
  },
257
258
  `${t.index}-${r.toString()}`
258
259
  ))
259
260
  ),
260
- e.map((t, r) => {
261
- const n = pt.get(t.toString());
262
- return n ? /* @__PURE__ */ a(
263
- xt,
261
+ o.map((t, r) => {
262
+ const e = yt.get(t.toString());
263
+ return e ? /* @__PURE__ */ a(
264
+ Et,
264
265
  {
265
- blocks: n,
266
+ blocks: e,
266
267
  column: r + 2,
267
268
  cls: i
268
269
  },
269
270
  `unavail-${t.toString()}`
270
271
  ) : null;
271
272
  }),
272
- M != null && e.map((t, r) => /* @__PURE__ */ a(
273
- It,
273
+ j != null && o.map((t, r) => /* @__PURE__ */ a(
274
+ jt,
274
275
  {
275
276
  columnId: t.toString(),
276
277
  column: r + 2,
277
278
  date: t,
278
- timeZone: o,
279
+ timeZone: n,
279
280
  startHour: l,
280
281
  endHour: c,
281
282
  hourHeight: u,
282
- snapDuration: M,
283
- placeholderDuration: Q ?? 15,
283
+ snapDuration: j,
284
+ placeholderDuration: Y ?? 15,
284
285
  cls: i,
285
- onSlotClick: H ? gt : void 0,
286
- onSelect: s ? Dt : void 0,
287
- dragPreviewAppearance: rt,
286
+ onSlotClick: H ? Tt : void 0,
287
+ onSelect: s ? St : void 0,
288
+ dragPreviewAppearance: ot,
288
289
  renderEvent: b
289
290
  },
290
291
  `slot-${t.toString()}`
291
292
  )),
292
- e.map((t, r) => /* @__PURE__ */ a(
293
- Nt,
293
+ o.map((t, r) => /* @__PURE__ */ a(
294
+ It,
294
295
  {
295
- positionedEvents: ft.get(t.toString()) ?? [],
296
+ positionedEvents: ht.get(t.toString()) ?? [],
296
297
  column: r + 2,
297
- timeZone: o,
298
+ timeZone: n,
298
299
  cls: i,
299
300
  onEventClick: V,
300
301
  renderEvent: b,
301
- eventGap: nt,
302
- eventLayout: it,
303
- stackOffset: at,
304
- selectedEventId: B,
305
- selectedEventRef: G
302
+ eventGap: at,
303
+ eventLayout: lt,
304
+ stackOffset: st,
305
+ selectedEventId: A,
306
+ selectedEventRef: B
306
307
  },
307
308
  t.toString()
308
309
  )),
309
- D != null && (() => {
310
- const t = D.startTime.withTimeZone(o).toPlainDate(), r = e.findIndex(
311
- (n) => E.PlainDate.compare(n, t) === 0
310
+ g != null && (() => {
311
+ const t = g.startTime.withTimeZone(n).toPlainDate(), r = o.findIndex(
312
+ (e) => E.PlainDate.compare(e, t) === 0
312
313
  );
313
314
  return r === -1 ? null : /* @__PURE__ */ a(
314
- jt,
315
+ Mt,
315
316
  {
316
- startTime: D.startTime,
317
- endTime: D.endTime,
317
+ startTime: g.startTime,
318
+ endTime: g.endTime,
318
319
  column: r + 2,
319
- viewDate: e[r],
320
- timeZone: o,
320
+ viewDate: o[r],
321
+ timeZone: n,
321
322
  startHour: l,
322
323
  hourHeight: u,
323
324
  cls: i,
324
- appearance: tt,
325
- selectionRef: et,
325
+ appearance: et,
326
+ selectionRef: nt,
326
327
  renderEvent: b
327
328
  }
328
329
  );
329
330
  })(),
330
331
  z && /* @__PURE__ */ a(
331
- Mt,
332
+ At,
332
333
  {
333
334
  date: z,
334
- timeZone: o,
335
+ timeZone: n,
335
336
  startHour: l,
336
337
  endHour: c,
337
338
  hourHeight: u,
@@ -358,11 +359,11 @@ function rr({
358
359
  whiteSpace: "nowrap",
359
360
  borderWidth: 0
360
361
  },
361
- children: ht
362
+ children: gt
362
363
  }
363
364
  )
364
365
  ] });
365
366
  }
366
367
  export {
367
- rr as DayGridView
368
+ nr as DayGridView
368
369
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ResourceGridView.d.ts","sourceRoot":"","sources":["../../../src/components/resource-grid-view/ResourceGridView.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAIV,qBAAqB,EAGtB,MAAM,kBAAkB,CAAC;AAa1B,wBAAgB,gBAAgB,CAAC,EAC/B,IAAI,EACJ,QAAQ,EACR,SAAS,EACT,MAAM,EACN,YAAY,EACZ,cAAc,EACd,kBAAkB,EAClB,QAAQ,EACR,YAAY,EACZ,YAAY,EACZ,mBAAmB,EACnB,aAAa,EACb,QAAQ,EACR,WAAW,EACX,SAAS,EACT,UAAU,EACV,UAAe,EACf,cAAoB,EACpB,YAAY,EACZ,WAAW,EACX,mBAAmB,EACnB,qBAAqB,EACrB,YAAY,EACZ,iBAAqB,EACrB,eAAe,EACf,gBAAgB,EAChB,YAAY,EACZ,QAAQ,EACR,WAAuB,EACvB,WAAe,GAChB,EAAE,qBAAqB,2CA6avB"}
1
+ {"version":3,"file":"ResourceGridView.d.ts","sourceRoot":"","sources":["../../../src/components/resource-grid-view/ResourceGridView.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAIV,qBAAqB,EAGtB,MAAM,kBAAkB,CAAC;AAc1B,wBAAgB,gBAAgB,CAAC,EAC/B,IAAI,EACJ,QAAQ,EACR,SAAS,EACT,MAAM,EACN,YAAY,EACZ,cAAc,EACd,kBAAkB,EAClB,QAAQ,EACR,YAAY,EACZ,YAAY,EACZ,mBAAmB,EACnB,aAAa,EACb,QAAQ,EACR,WAAW,EACX,SAAS,EACT,UAAU,EACV,UAAe,EACf,cAAoB,EACpB,YAAY,EACZ,WAAW,EACX,mBAAmB,EACnB,qBAAqB,EACrB,YAAY,EACZ,iBAAqB,EACrB,eAAe,EACf,gBAAgB,EAChB,YAAY,EACZ,QAAQ,EACR,WAAuB,EACvB,WAAe,GAChB,EAAE,qBAAqB,2CA+avB"}