@savvycal/calendar 0.6.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,2CAuZlB"}
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,136 +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 St, 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 Tt, generateTimeSlots as wt, formatDayOfWeek as q, formatTimeRange as J } from "../../lib/time.js";
6
- import { layoutAllDayEvents as Ht, computePositionedEventsByDate as bt } from "../../lib/overlap.js";
7
- import { computeUnavailableBlocks as vt } from "../../lib/availability.js";
8
- import { UnavailabilityOverlay as $t } from "../shared/UnavailabilityOverlay.js";
9
- import { dayGridViewDefaults as xt } from "./defaults.js";
10
- import { DayHeader as Ct } from "./DayHeader.js";
11
- import { DayColumn as Et } from "./DayColumn.js";
12
- import { TimeGutter as Nt } from "../shared/TimeGutter.js";
13
- import { SlotInteractionLayer as kt } from "../shared/SlotInteractionLayer.js";
14
- import { SelectionOverlay as It } from "../shared/SelectionOverlay.js";
15
- import { NowIndicator as jt } from "../shared/NowIndicator.js";
16
- import { AllDaySection as Mt } from "./AllDaySection.js";
17
- import { useEffectiveHourHeight as At } from "../shared/useEffectiveHourHeight.js";
18
- import { useAnnouncer as Bt } from "../shared/useAnnouncer.js";
19
- function tr({
20
- activeRange: u,
21
- timeZone: o,
22
- events: k,
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({
21
+ activeRange: d,
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,
30
- selectedRange: p,
28
+ onEventClick: L,
29
+ snapDuration: j,
30
+ placeholderDuration: Y,
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
- () => Tt(u.startDate, u.endDate),
52
- [u.startDate, u.endDate]
53
- ), O = m(() => E.Now.plainDateISO(o).toString(), [o]), { effectiveHourHeight: d, rootRef: lt, headerRef: st, allDayRef: ct, headerHeight: P } = At(Y, c - l), i = g(
54
- (t) => N(xt[t], A?.[t]),
55
- [A]
56
- ), y = K(null), f = K(null), [mt, W] = St(null);
51
+ const l = w?.startHour ?? 0, c = w?.endHour ?? 24, C = w?.intervalMinutes ?? 60, o = m(
52
+ () => bt(d.startDate, d.endDate),
53
+ [d.startDate, d.endDate]
54
+ ), G = m(() => E.Now.plainDateISO(n).toString(), [n]), {
55
+ effectiveHourHeight: u,
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);
57
65
  U(() => {
58
- if (p)
59
- f.current !== null && (clearTimeout(f.current), f.current = null), y.current = p;
66
+ if (f)
67
+ p.current !== null && (clearTimeout(p.current), p.current = null), y.current = f;
60
68
  else if (y.current && v > 0) {
61
69
  const t = y.current;
62
- y.current = null, W(t), f.current = setTimeout(() => {
63
- f.current = null, W(null);
70
+ y.current = null, P(t), p.current = setTimeout(() => {
71
+ p.current = null, P(null);
64
72
  }, v);
65
73
  }
66
- }, [p, v]);
67
- const D = p ?? mt, x = m(
68
- () => wt({ startHour: l, endHour: c, intervalMinutes: $ }),
69
- [l, c, $]
70
- ), { allDayEvents: L, timedEvents: R } = m(() => {
74
+ }, [f, v]);
75
+ const g = f ?? ft, $ = m(
76
+ () => vt({ startHour: l, endHour: c, intervalMinutes: C }),
77
+ [l, c, C]
78
+ ), { allDayEvents: W, timedEvents: R } = m(() => {
71
79
  const t = [], r = [];
72
- for (const n of k)
73
- n.allDay ? t.push(n) : r.push(n);
80
+ for (const e of N)
81
+ e.allDay ? t.push(e) : r.push(e);
74
82
  return { allDayEvents: t, timedEvents: r };
75
- }, [k]), ut = m(
76
- () => Ht(L, e),
77
- [L, e]
78
- ), dt = m(
79
- () => bt(
83
+ }, [N]), pt = m(
84
+ () => Ct(W, o),
85
+ [W, o]
86
+ ), ht = m(
87
+ () => $t(
80
88
  R,
89
+ n,
81
90
  o,
82
- e,
83
91
  l,
84
92
  c,
85
- d
93
+ u
86
94
  ),
87
- [R, o, e, l, c, d]
88
- ), C = m(
95
+ [R, n, o, l, c, u]
96
+ ), x = m(
89
97
  () => I ? S ?? [] : S,
90
98
  [I, S]
91
- ), pt = m(() => {
92
- if (C === void 0 && !T)
99
+ ), yt = m(() => {
100
+ if (x === void 0 && !T)
93
101
  return /* @__PURE__ */ new Map();
94
102
  const t = /* @__PURE__ */ new Map();
95
- for (const r of e) {
96
- const n = vt(
97
- C,
103
+ for (const r of o) {
104
+ const e = xt(
105
+ x,
98
106
  T,
99
- o,
107
+ n,
100
108
  r,
101
109
  l,
102
110
  c,
103
- d
111
+ u
104
112
  );
105
- n.length > 0 && t.set(r.toString(), n);
113
+ e.length > 0 && t.set(r.toString(), e);
106
114
  }
107
115
  return t;
108
116
  }, [
109
- C,
117
+ x,
110
118
  T,
119
+ n,
111
120
  o,
112
- e,
113
121
  l,
114
122
  c,
115
- d
116
- ]), { message: ft, announce: h } = Bt(), ht = m(() => {
117
- const t = q(u.startDate), r = q(u.endDate);
123
+ u
124
+ ]), { message: gt, announce: h } = Ot(), Dt = m(() => {
125
+ const t = q(d.startDate), r = q(d.endDate);
118
126
  return `Schedule for ${t} to ${r}`;
119
- }, [u.startDate, u.endDate]), V = g(
127
+ }, [d.startDate, d.endDate]), V = D(
120
128
  (t) => {
121
- if (s?.(null), j?.(t), t.allDay) {
122
- const r = [t.title, "all day"];
123
- 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(", ")}`);
124
132
  } else {
125
133
  const r = [
126
- t.title,
127
- J(t.startTime, t.endTime, o)
128
- ];
129
- 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(", ")}`);
130
138
  }
131
139
  },
132
- [s, j, o, h]
133
- ), yt = g(
140
+ [s, L, n, h]
141
+ ), St = D(
134
142
  (t) => {
135
143
  if (!t) {
136
144
  s?.(null);
@@ -141,11 +149,11 @@ function tr({
141
149
  endTime: t.endTime
142
150
  };
143
151
  s?.(r);
144
- const n = [J(t.startTime, t.endTime, o)];
145
- h(`Selected time: ${n.join(", ")}`);
152
+ const e = [J(t.startTime, t.endTime, n)];
153
+ h(`Selected time: ${e.join(", ")}`);
146
154
  },
147
- [s, o, h]
148
- ), Dt = g(
155
+ [s, n, h]
156
+ ), Tt = D(
149
157
  (t) => {
150
158
  const r = E.PlainDate.from(t.columnId);
151
159
  H?.({
@@ -157,73 +165,74 @@ function tr({
157
165
  [H]
158
166
  );
159
167
  U(() => {
160
- if (!p || !s) return;
168
+ if (!f || !s) return;
161
169
  const t = (r) => {
162
170
  r.key === "Escape" && s(null);
163
171
  };
164
172
  return document.addEventListener("keydown", t), () => document.removeEventListener("keydown", t);
165
- }, [p, s]);
166
- const gt = d * $ / 60, z = e.find((t) => t.toString() === O);
167
- return /* @__PURE__ */ F("div", { ref: lt, className: N(i("root"), X), children: [
173
+ }, [f, s]);
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: [
168
176
  /* @__PURE__ */ F(
169
177
  "div",
170
178
  {
179
+ ref: ut,
171
180
  className: i("grid"),
172
181
  role: "region",
173
182
  "aria-roledescription": "calendar",
174
- "aria-label": ht,
183
+ "aria-label": Dt,
175
184
  style: {
176
185
  display: "grid",
177
- gridTemplateColumns: `max-content repeat(${e.length}, minmax(${_}px, 1fr))`,
178
- gridTemplateRows: `auto auto repeat(${x.length}, ${gt}px)`
186
+ gridTemplateColumns: `max-content repeat(${o.length}, minmax(${tt}px, 1fr))`,
187
+ gridTemplateRows: `auto auto repeat(${$.length}, ${wt}px)`
179
188
  },
180
189
  children: [
181
190
  /* @__PURE__ */ a(
182
191
  "div",
183
192
  {
184
- ref: st,
193
+ ref: mt,
185
194
  className: i("cornerCell"),
186
195
  style: { gridRow: 1, gridColumn: 1 },
187
- children: ot?.({ timeZone: o })
196
+ children: it?.({ timeZone: n })
188
197
  }
189
198
  ),
190
- e.map((t, r) => /* @__PURE__ */ a(
191
- Ct,
199
+ o.map((t, r) => /* @__PURE__ */ a(
200
+ Nt,
192
201
  {
193
202
  date: t,
194
- isToday: t.toString() === O,
203
+ isToday: t.toString() === G,
195
204
  column: r + 2,
196
205
  cls: i,
197
- renderHeader: Z
206
+ renderHeader: rt
198
207
  },
199
208
  t.toString()
200
209
  )),
201
210
  /* @__PURE__ */ a(
202
211
  "div",
203
212
  {
204
- ref: ct,
205
- className: N(i("allDayCell"), "left-0 z-30"),
213
+ ref: dt,
214
+ className: k(i("allDayCell"), "left-0 z-30"),
206
215
  style: {
207
216
  gridRow: 2,
208
217
  gridColumn: 1,
209
- top: P
218
+ top: O
210
219
  }
211
220
  }
212
221
  ),
213
222
  /* @__PURE__ */ a(
214
- Mt,
223
+ Bt,
215
224
  {
216
- positioned: ut,
217
- dates: e,
218
- headerHeight: P,
225
+ positioned: pt,
226
+ dates: o,
227
+ headerHeight: O,
219
228
  cls: i,
220
229
  onEventClick: V,
221
- selectedEventId: B,
222
- selectedEventRef: G
230
+ selectedEventId: A,
231
+ selectedEventRef: B
223
232
  }
224
233
  ),
225
- x.map((t) => /* @__PURE__ */ a(
226
- Nt,
234
+ $.map((t) => /* @__PURE__ */ a(
235
+ Lt,
227
236
  {
228
237
  label: t.label,
229
238
  row: t.index + 3,
@@ -233,100 +242,100 @@ function tr({
233
242
  },
234
243
  t.index
235
244
  )),
236
- x.map(
237
- (t) => e.map((r, n) => /* @__PURE__ */ a(
245
+ $.map(
246
+ (t) => o.map((r, e) => /* @__PURE__ */ a(
238
247
  "div",
239
248
  {
240
249
  className: i(t.isHourStart ? "bodyCell" : "bodyCellMinor"),
241
250
  style: {
242
251
  gridRow: t.index + 3,
243
- gridColumn: n + 2,
252
+ gridColumn: e + 2,
244
253
  ...t.isHourStart ? {} : { borderTopStyle: "dotted" },
245
254
  ...t.index === 0 ? { borderTopWidth: 0 } : {},
246
- ...n === e.length - 1 ? { borderRightWidth: 0 } : {}
255
+ ...e === o.length - 1 ? { borderRightWidth: 0 } : {}
247
256
  }
248
257
  },
249
258
  `${t.index}-${r.toString()}`
250
259
  ))
251
260
  ),
252
- e.map((t, r) => {
253
- const n = pt.get(t.toString());
254
- return n ? /* @__PURE__ */ a(
255
- $t,
261
+ o.map((t, r) => {
262
+ const e = yt.get(t.toString());
263
+ return e ? /* @__PURE__ */ a(
264
+ Et,
256
265
  {
257
- blocks: n,
266
+ blocks: e,
258
267
  column: r + 2,
259
268
  cls: i
260
269
  },
261
270
  `unavail-${t.toString()}`
262
271
  ) : null;
263
272
  }),
264
- M != null && e.map((t, r) => /* @__PURE__ */ a(
265
- kt,
273
+ j != null && o.map((t, r) => /* @__PURE__ */ a(
274
+ jt,
266
275
  {
267
276
  columnId: t.toString(),
268
277
  column: r + 2,
269
278
  date: t,
270
- timeZone: o,
279
+ timeZone: n,
271
280
  startHour: l,
272
281
  endHour: c,
273
- hourHeight: d,
274
- snapDuration: M,
275
- placeholderDuration: Q ?? 15,
282
+ hourHeight: u,
283
+ snapDuration: j,
284
+ placeholderDuration: Y ?? 15,
276
285
  cls: i,
277
- onSlotClick: H ? Dt : void 0,
278
- onSelect: s ? yt : void 0,
279
- dragPreviewAppearance: rt,
286
+ onSlotClick: H ? Tt : void 0,
287
+ onSelect: s ? St : void 0,
288
+ dragPreviewAppearance: ot,
280
289
  renderEvent: b
281
290
  },
282
291
  `slot-${t.toString()}`
283
292
  )),
284
- e.map((t, r) => /* @__PURE__ */ a(
285
- Et,
293
+ o.map((t, r) => /* @__PURE__ */ a(
294
+ It,
286
295
  {
287
- positionedEvents: dt.get(t.toString()) ?? [],
296
+ positionedEvents: ht.get(t.toString()) ?? [],
288
297
  column: r + 2,
289
- timeZone: o,
298
+ timeZone: n,
290
299
  cls: i,
291
300
  onEventClick: V,
292
301
  renderEvent: b,
293
- eventGap: nt,
294
- eventLayout: it,
295
- stackOffset: at,
296
- selectedEventId: B,
297
- selectedEventRef: G
302
+ eventGap: at,
303
+ eventLayout: lt,
304
+ stackOffset: st,
305
+ selectedEventId: A,
306
+ selectedEventRef: B
298
307
  },
299
308
  t.toString()
300
309
  )),
301
- D != null && (() => {
302
- const t = D.startTime.withTimeZone(o).toPlainDate(), r = e.findIndex(
303
- (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
304
313
  );
305
314
  return r === -1 ? null : /* @__PURE__ */ a(
306
- It,
315
+ Mt,
307
316
  {
308
- startTime: D.startTime,
309
- endTime: D.endTime,
317
+ startTime: g.startTime,
318
+ endTime: g.endTime,
310
319
  column: r + 2,
311
- viewDate: e[r],
312
- timeZone: o,
320
+ viewDate: o[r],
321
+ timeZone: n,
313
322
  startHour: l,
314
- hourHeight: d,
323
+ hourHeight: u,
315
324
  cls: i,
316
- appearance: tt,
317
- selectionRef: et,
325
+ appearance: et,
326
+ selectionRef: nt,
318
327
  renderEvent: b
319
328
  }
320
329
  );
321
330
  })(),
322
331
  z && /* @__PURE__ */ a(
323
- jt,
332
+ At,
324
333
  {
325
334
  date: z,
326
- timeZone: o,
335
+ timeZone: n,
327
336
  startHour: l,
328
337
  endHour: c,
329
- hourHeight: d,
338
+ hourHeight: u,
330
339
  cls: i
331
340
  }
332
341
  )
@@ -350,11 +359,11 @@ function tr({
350
359
  whiteSpace: "nowrap",
351
360
  borderWidth: 0
352
361
  },
353
- children: ft
362
+ children: gt
354
363
  }
355
364
  )
356
365
  ] });
357
366
  }
358
367
  export {
359
- tr as DayGridView
368
+ nr as DayGridView
360
369
  };
@@ -1 +1 @@
1
- {"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../../src/components/day-grid-view/defaults.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAE9D,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,qBAAqB,CA0C/D,CAAC"}
1
+ {"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../../src/components/day-grid-view/defaults.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAE9D,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,qBAAqB,CA2C/D,CAAC"}