@besaitech/ng-design-system 0.0.76 → 0.0.78

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.
@@ -0,0 +1,924 @@
1
+ import { startOfDay, addDays, isSameDay, SdsIcon, SdsSegmented } from '@besaitech/ng-design-system';
2
+ import * as i0 from '@angular/core';
3
+ import { inject, DestroyRef, input, model, numberAttribute, booleanAttribute, output, signal, effect, untracked, computed, ChangeDetectionStrategy, Component } from '@angular/core';
4
+
5
+ const MS_PER_MINUTE = 60_000;
6
+ function toDate(value) {
7
+ return value instanceof Date ? new Date(value.getTime()) : new Date(value);
8
+ }
9
+ /** Minutes since local midnight. Read off the clock, never from an epoch difference — see below. */
10
+ function minutesOfDay(d) {
11
+ return d.getHours() * 60 + d.getMinutes();
12
+ }
13
+ function startOfWeek(d, firstDayOfWeek) {
14
+ const day = startOfDay(d);
15
+ const shift = (day.getDay() - firstDayOfWeek + 7) % 7;
16
+ return addDays(day, -shift);
17
+ }
18
+ /**
19
+ * The days a view shows.
20
+ *
21
+ * <p>`month` is always a 6×7 block, never 4–6 ragged rows: a grid that changes height as you page
22
+ * through the year makes everything below it jump.
23
+ */
24
+ function visibleDays(view, date, firstDayOfWeek) {
25
+ if (view === 'day') {
26
+ return [startOfDay(date)];
27
+ }
28
+ if (view === '3day') {
29
+ const from = startOfDay(date);
30
+ return [0, 1, 2].map((i) => addDays(from, i));
31
+ }
32
+ if (view === 'week') {
33
+ const from = startOfWeek(date, firstDayOfWeek);
34
+ return Array.from({ length: 7 }, (_, i) => addDays(from, i));
35
+ }
36
+ const first = new Date(date.getFullYear(), date.getMonth(), 1);
37
+ const from = startOfWeek(first, firstDayOfWeek);
38
+ return Array.from({ length: 42 }, (_, i) => addDays(from, i));
39
+ }
40
+ /** The half-open range a view covers — what a host should fetch for. */
41
+ function visibleRange(view, date, firstDayOfWeek) {
42
+ const days = visibleDays(view, date, firstDayOfWeek);
43
+ return { start: days[0], end: addDays(days[days.length - 1], 1) };
44
+ }
45
+ /** Paging: one month, one week, three days or one day at a time, in the view's own unit. */
46
+ function step(view, date, direction) {
47
+ switch (view) {
48
+ case 'month': {
49
+ const d = new Date(date.getFullYear(), date.getMonth() + direction, 1);
50
+ return d;
51
+ }
52
+ case 'week':
53
+ return addDays(date, 7 * direction);
54
+ case '3day':
55
+ return addDays(date, 3 * direction);
56
+ default:
57
+ return addDays(date, direction);
58
+ }
59
+ }
60
+ /** Whether an event touches a given day at all. Half-open: an event ending at 00:00 is not there. */
61
+ function occursOn(start, end, day) {
62
+ const from = startOfDay(day).getTime();
63
+ const to = addDays(startOfDay(day), 1).getTime();
64
+ return start.getTime() < to && end.getTime() > from;
65
+ }
66
+ /**
67
+ * Place one day's timed events in the grid, side by side where they overlap.
68
+ *
69
+ * <p>The classic column packing: events are clustered into runs that transitively overlap, each
70
+ * takes the leftmost column that is free at its time, and the whole cluster is then divided by the
71
+ * widest point. So two appointments at 09:00 each take half the width and a third takes a third —
72
+ * and a 14:00 appointment with nothing beside it is full width, because it is in its own cluster.
73
+ *
74
+ * <p><b>Vertical position is read off the clock, not from an epoch difference.</b> On the two days a
75
+ * year when the clocks move, a 09:00–10:00 appointment is still drawn at 09:00 and one hour tall;
76
+ * computing it from elapsed milliseconds would slide every event after the change by an hour.
77
+ *
78
+ * <p>Events are clipped to the visible window rather than dropped: a night shift starting at 06:00
79
+ * on a grid that opens at 08:00 should still show, flush to the top, not vanish.
80
+ */
81
+ function placeDay(events, day, startHour, endHour, defaultMinutes) {
82
+ const windowStart = startHour * 60;
83
+ const windowEnd = endHour * 60;
84
+ const span = Math.max(1, windowEnd - windowStart);
85
+ const dayStart = startOfDay(day);
86
+ const nextDay = addDays(dayStart, 1);
87
+ const resolved = events
88
+ .map((event) => {
89
+ const start = toDate(event.start);
90
+ const end = event.end
91
+ ? toDate(event.end)
92
+ : new Date(start.getTime() + defaultMinutes * MS_PER_MINUTE);
93
+ return { event, start, end };
94
+ })
95
+ .filter((e) => !e.event.allDay && occursOn(e.start, e.end, day))
96
+ .map((e) => {
97
+ // Clip to this day first, so a block running past midnight is drawn on both days correctly.
98
+ const from = e.start < dayStart ? dayStart : e.start;
99
+ const to = e.end > nextDay ? nextDay : e.end;
100
+ const fromMin = from.getTime() === dayStart.getTime() ? 0 : minutesOfDay(from);
101
+ const toMin = to.getTime() === nextDay.getTime() ? 24 * 60 : minutesOfDay(to);
102
+ return { ...e, fromMin, toMin: Math.max(toMin, fromMin + 1) };
103
+ })
104
+ .filter((e) => e.toMin > windowStart && e.fromMin < windowEnd)
105
+ .sort((a, b) => a.fromMin - b.fromMin || b.toMin - a.toMin);
106
+ // Cluster transitively overlapping events; each cluster is divided independently.
107
+ const placed = [];
108
+ let cluster = [];
109
+ let clusterEnd = -1;
110
+ const flush = () => {
111
+ if (!cluster.length)
112
+ return;
113
+ const columnEnds = [];
114
+ const columnOf = new Map();
115
+ for (const item of cluster) {
116
+ let column = columnEnds.findIndex((endMin) => endMin <= item.fromMin);
117
+ if (column === -1) {
118
+ column = columnEnds.length;
119
+ }
120
+ columnEnds[column] = item.toMin;
121
+ columnOf.set(item, column);
122
+ }
123
+ const columns = columnEnds.length;
124
+ for (const item of cluster) {
125
+ const top = (Math.max(item.fromMin, windowStart) - windowStart) / span;
126
+ const bottom = (Math.min(item.toMin, windowEnd) - windowStart) / span;
127
+ const column = columnOf.get(item) ?? 0;
128
+ placed.push({
129
+ event: item.event,
130
+ start: item.start,
131
+ end: item.end,
132
+ top,
133
+ height: Math.max(bottom - top, 0.012),
134
+ left: column / columns,
135
+ width: 1 / columns,
136
+ });
137
+ }
138
+ cluster = [];
139
+ clusterEnd = -1;
140
+ };
141
+ for (const item of resolved) {
142
+ if (cluster.length && item.fromMin >= clusterEnd) {
143
+ flush();
144
+ }
145
+ cluster.push(item);
146
+ clusterEnd = Math.max(clusterEnd, item.toMin);
147
+ }
148
+ flush();
149
+ return placed;
150
+ }
151
+ /** The all-day (and multi-day) events touching a given day, in a stable order. */
152
+ function allDayOn(events, day, defaultMinutes) {
153
+ return events
154
+ .map((event) => {
155
+ const start = toDate(event.start);
156
+ const end = event.end
157
+ ? toDate(event.end)
158
+ : new Date(start.getTime() + defaultMinutes * MS_PER_MINUTE);
159
+ return { event, start, end };
160
+ })
161
+ .filter((e) => e.event.allDay && occursOn(e.start, e.end, day))
162
+ .sort((a, b) => a.start.getTime() - b.start.getTime())
163
+ .map((e) => e.event);
164
+ }
165
+ /** Every event touching a day, all-day first then by start — what a month cell lists. */
166
+ function eventsOn(events, day, defaultMinutes) {
167
+ return events
168
+ .map((event) => {
169
+ const start = toDate(event.start);
170
+ const end = event.end
171
+ ? toDate(event.end)
172
+ : new Date(start.getTime() + defaultMinutes * MS_PER_MINUTE);
173
+ return { event, start, end };
174
+ })
175
+ .filter((e) => occursOn(e.start, e.end, day))
176
+ .sort((a, b) => Number(!!b.event.allDay) - Number(!!a.event.allDay) ||
177
+ a.start.getTime() - b.start.getTime())
178
+ .map((e) => e.event);
179
+ }
180
+
181
+ /** Written out in full — a composed `bg-accent-${c}-soft` would produce no CSS. See sds-severity. */
182
+ const CHIP = {
183
+ brand: 'bg-brand-500/15 text-brand-700 dark:text-brand-200 border-brand-500/40',
184
+ blue: 'bg-accent-blue-soft text-accent-blue border-accent-blue/40',
185
+ green: 'bg-accent-green-soft text-accent-green border-accent-green/40',
186
+ amber: 'bg-accent-amber-soft text-accent-amber border-accent-amber/40',
187
+ red: 'bg-accent-red-soft text-accent-red border-accent-red/40',
188
+ indigo: 'bg-accent-indigo-soft text-accent-indigo border-accent-indigo/40',
189
+ neutral: 'bg-muted text-ink-soft border-border',
190
+ };
191
+ const DOT = {
192
+ brand: 'bg-brand-500',
193
+ blue: 'bg-accent-blue',
194
+ green: 'bg-accent-green',
195
+ amber: 'bg-accent-amber',
196
+ red: 'bg-accent-red',
197
+ indigo: 'bg-accent-indigo',
198
+ neutral: 'bg-ink-faint',
199
+ };
200
+ /**
201
+ * A calendar of events — month, week, three days or one day.
202
+ *
203
+ * <p><b>Not {@link SdsCalendar}</b>, which is the month grid inside the date picker and exists to
204
+ * pick a date. This one shows what is ON the days, and it owns no data: the host passes `events`
205
+ * and listens to `rangeChange` to fetch the next lot.
206
+ *
207
+ * <p><b>It stores nothing and decides nothing.</b> `view` and `date` are two-way models, so the
208
+ * host can deep-link a view or restore one; every interaction is an output. That is what lets the
209
+ * same component serve a doctor's diary, a room's bookings or a delivery schedule without knowing
210
+ * what any of them are.
211
+ *
212
+ * <p><b>Dates come from `Intl`, control words come from you.</b> Day and month names follow
213
+ * `[locale]` automatically, so the part that is genuinely per-language needs no wiring — but
214
+ * "Today", "All day" and "+2 more" are inputs with English defaults, and a non-English app MUST
215
+ * pass them. An icon-only control's accessible name is the only name it has.
216
+ *
217
+ * <p><b>Mobile.</b> The week view keeps a readable minimum column width and scrolls sideways under
218
+ * its own header rather than squeezing seven columns onto a phone; the month view drops from chips
219
+ * to dots below `sm`. Both are CSS, so there is no resize listener to get wrong and no layout that
220
+ * depends on JavaScript having run.
221
+ *
222
+ * @example
223
+ * <sds-event-calendar
224
+ * [events]="appointments()"
225
+ * [(view)]="view"
226
+ * [(date)]="focused"
227
+ * [todayLabel]="'calendar.today' | translate"
228
+ * (eventClick)="open($event)"
229
+ * (rangeChange)="load($event)" />
230
+ */
231
+ class SdsEventCalendar {
232
+ destroyRef = inject(DestroyRef);
233
+ events = input([], ...(ngDevMode ? [{ debugName: "events" }] : []));
234
+ /** Two-way: the host can deep-link or restore a view. */
235
+ view = model('week', ...(ngDevMode ? [{ debugName: "view" }] : []));
236
+ /** Two-way: any day inside the span being shown. */
237
+ date = model(new Date(), ...(ngDevMode ? [{ debugName: "date" }] : []));
238
+ /** 1 = Monday (the European week), 0 = Sunday. */
239
+ firstDayOfWeek = input(1, ...(ngDevMode ? [{ debugName: "firstDayOfWeek", transform: numberAttribute }] : [{ transform: numberAttribute }]));
240
+ /** The hours the time grid shows. Events outside are clipped to the edge, never dropped. */
241
+ startHour = input(7, ...(ngDevMode ? [{ debugName: "startHour", transform: numberAttribute }] : [{ transform: numberAttribute }]));
242
+ endHour = input(20, ...(ngDevMode ? [{ debugName: "endHour", transform: numberAttribute }] : [{ transform: numberAttribute }]));
243
+ hourHeight = input(48, ...(ngDevMode ? [{ debugName: "hourHeight", transform: numberAttribute }] : [{ transform: numberAttribute }]));
244
+ /** How long an event with no `end` is assumed to last. */
245
+ defaultMinutes = input(30, ...(ngDevMode ? [{ debugName: "defaultMinutes", transform: numberAttribute }] : [{ transform: numberAttribute }]));
246
+ /** CSS height of the scrolling body (month: of the whole grid). */
247
+ height = input('32rem', ...(ngDevMode ? [{ debugName: "height" }] : []));
248
+ /** BCP-47 tag for day and month names. Empty follows the browser. */
249
+ locale = input('', ...(ngDevMode ? [{ debugName: "locale" }] : []));
250
+ nowIndicator = input(true, ...(ngDevMode ? [{ debugName: "nowIndicator", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
251
+ showToolbar = input(true, ...(ngDevMode ? [{ debugName: "showToolbar", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
252
+ showViewSwitcher = input(true, ...(ngDevMode ? [{ debugName: "showViewSwitcher", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
253
+ /** Chips per month cell before it collapses to "+N". */
254
+ maxPerCell = input(3, ...(ngDevMode ? [{ debugName: "maxPerCell", transform: numberAttribute }] : [{ transform: numberAttribute }]));
255
+ /** Control words. English defaults — a non-English app must pass every one of these. */
256
+ todayLabel = input('Today', ...(ngDevMode ? [{ debugName: "todayLabel" }] : []));
257
+ previousLabel = input('Previous', ...(ngDevMode ? [{ debugName: "previousLabel" }] : []));
258
+ nextLabel = input('Next', ...(ngDevMode ? [{ debugName: "nextLabel" }] : []));
259
+ allDayLabel = input('All day', ...(ngDevMode ? [{ debugName: "allDayLabel" }] : []));
260
+ /** `{count}` is substituted. */
261
+ moreLabel = input('+{count} more', ...(ngDevMode ? [{ debugName: "moreLabel" }] : []));
262
+ viewSwitcherLabel = input('View', ...(ngDevMode ? [{ debugName: "viewSwitcherLabel" }] : []));
263
+ monthLabel = input('Month', ...(ngDevMode ? [{ debugName: "monthLabel" }] : []));
264
+ weekLabel = input('Week', ...(ngDevMode ? [{ debugName: "weekLabel" }] : []));
265
+ threeDayLabel = input('3 days', ...(ngDevMode ? [{ debugName: "threeDayLabel" }] : []));
266
+ dayLabel = input('Day', ...(ngDevMode ? [{ debugName: "dayLabel" }] : []));
267
+ eventClick = output();
268
+ /** A click on empty time, snapped to the hour that was clicked. */
269
+ slotClick = output();
270
+ dayClick = output();
271
+ /** The span now on screen — fetch for this. Fires whenever the view or the date moves. */
272
+ rangeChange = output();
273
+ /** Ticks the now-indicator. One timer, cleared with the component. */
274
+ now = signal(new Date(), ...(ngDevMode ? [{ debugName: "now" }] : []));
275
+ constructor() {
276
+ const timer = setInterval(() => this.now.set(new Date()), 60_000);
277
+ this.destroyRef.onDestroy(() => clearInterval(timer));
278
+ /*
279
+ * Announce the visible span whenever it changes, HOWEVER it changed. Emitting from the toolbar
280
+ * handlers instead would look identical until a host moved `date` itself — a deep link, a
281
+ * "jump to this appointment", restoring a remembered day — and then the calendar would show a
282
+ * week nobody fetched. The models are two-way, so the host is a first-class navigator.
283
+ */
284
+ effect(() => {
285
+ const view = this.view();
286
+ const { start, end } = visibleRange(view, this.date(), this.firstDayOfWeek());
287
+ untracked(() => this.rangeChange.emit({ start, end, view }));
288
+ });
289
+ }
290
+ days = computed(() => visibleDays(this.view(), this.date(), this.firstDayOfWeek()), ...(ngDevMode ? [{ debugName: "days" }] : []));
291
+ hours = computed(() => {
292
+ const out = [];
293
+ for (let h = this.startHour(); h <= this.endHour(); h++)
294
+ out.push(h);
295
+ return out;
296
+ }, ...(ngDevMode ? [{ debugName: "hours" }] : []));
297
+ bodyHeight = computed(() => Math.max(1, this.endHour() - this.startHour()) * this.hourHeight(), ...(ngDevMode ? [{ debugName: "bodyHeight" }] : []));
298
+ columns = computed(() => `3.25rem repeat(${this.days().length}, minmax(0, 1fr))`, ...(ngDevMode ? [{ debugName: "columns" }] : []));
299
+ /** Keeps a day column readable on a phone; the grid scrolls sideways instead of squeezing. */
300
+ minWidth = computed(() => {
301
+ const perDay = this.days().length > 3 ? 92 : 120;
302
+ return 52 + this.days().length * perDay;
303
+ }, ...(ngDevMode ? [{ debugName: "minWidth" }] : []));
304
+ intl = computed(() => this.locale() || undefined, ...(ngDevMode ? [{ debugName: "intl" }] : []));
305
+ weekdayNames = computed(() => {
306
+ const fmt = new Intl.DateTimeFormat(this.intl(), { weekday: 'short' });
307
+ const base = startOfDay(new Date(2024, 0, 7)); // a Sunday
308
+ return Array.from({ length: 7 }, (_, i) => fmt.format(addDays(base, (this.firstDayOfWeek() + i) % 7)));
309
+ }, ...(ngDevMode ? [{ debugName: "weekdayNames" }] : []));
310
+ title = computed(() => {
311
+ const days = this.days();
312
+ const view = this.view();
313
+ if (view === 'day') {
314
+ return new Intl.DateTimeFormat(this.intl(), {
315
+ weekday: 'long',
316
+ day: 'numeric',
317
+ month: 'long',
318
+ year: 'numeric',
319
+ }).format(days[0]);
320
+ }
321
+ if (view === 'month') {
322
+ return new Intl.DateTimeFormat(this.intl(), { month: 'long', year: 'numeric' }).format(this.date());
323
+ }
324
+ const first = days[0];
325
+ const last = days[days.length - 1];
326
+ const sameMonth = first.getMonth() === last.getMonth();
327
+ const short = new Intl.DateTimeFormat(this.intl(), { day: 'numeric', month: 'short' });
328
+ const long = new Intl.DateTimeFormat(this.intl(), {
329
+ day: 'numeric',
330
+ month: 'short',
331
+ year: 'numeric',
332
+ });
333
+ return sameMonth
334
+ ? `${first.getDate()} – ${long.format(last)}`
335
+ : `${short.format(first)} – ${long.format(last)}`;
336
+ }, ...(ngDevMode ? [{ debugName: "title" }] : []));
337
+ viewOptions = computed(() => [
338
+ { value: 'month', label: this.monthLabel() },
339
+ { value: 'week', label: this.weekLabel() },
340
+ { value: '3day', label: this.threeDayLabel() },
341
+ { value: 'day', label: this.dayLabel() },
342
+ ], ...(ngDevMode ? [{ debugName: "viewOptions" }] : []));
343
+ hasAllDay = computed(() => this.days().some((d) => allDayOn(this.events(), d, this.defaultMinutes()).length > 0), ...(ngDevMode ? [{ debugName: "hasAllDay" }] : []));
344
+ nowTop = computed(() => {
345
+ const minutes = minutesOfDay(this.now());
346
+ const from = this.startHour() * 60;
347
+ const to = this.endHour() * 60;
348
+ if (minutes < from || minutes > to)
349
+ return null;
350
+ return ((minutes - from) / 60) * this.hourHeight();
351
+ }, ...(ngDevMode ? [{ debugName: "nowTop" }] : []));
352
+ placed(day) {
353
+ return placeDay(this.events(), day, this.startHour(), this.endHour(), this.defaultMinutes());
354
+ }
355
+ allDayEvents(day) {
356
+ return allDayOn(this.events(), day, this.defaultMinutes());
357
+ }
358
+ cellEvents(day) {
359
+ return eventsOn(this.events(), day, this.defaultMinutes());
360
+ }
361
+ isToday(day) {
362
+ return isSameDay(day, this.now());
363
+ }
364
+ inFocusedMonth(day) {
365
+ return day.getMonth() === this.date().getMonth();
366
+ }
367
+ shortWeekday(day) {
368
+ return new Intl.DateTimeFormat(this.intl(), { weekday: 'short' }).format(day);
369
+ }
370
+ hourLabel(hour) {
371
+ return new Intl.DateTimeFormat(this.intl(), { hour: 'numeric', minute: '2-digit' }).format(new Date(2024, 0, 1, hour, 0));
372
+ }
373
+ clock(value) {
374
+ return new Intl.DateTimeFormat(this.intl(), { hour: '2-digit', minute: '2-digit' }).format(toDate(value));
375
+ }
376
+ hourTop(hour) {
377
+ return (hour - this.startHour()) * this.hourHeight();
378
+ }
379
+ chipClass(e) {
380
+ return CHIP[e.color ?? 'brand'];
381
+ }
382
+ dotClass(e) {
383
+ return DOT[e.color ?? 'brand'];
384
+ }
385
+ setView(next) {
386
+ this.view.set(next);
387
+ }
388
+ move(direction) {
389
+ this.date.set(step(this.view(), this.date(), direction));
390
+ }
391
+ goToday() {
392
+ this.date.set(new Date());
393
+ }
394
+ /** A click on empty grid becomes a slot of `defaultMinutes`, snapped to the hour clicked. */
395
+ onGridClick(event, day) {
396
+ const host = event.currentTarget;
397
+ const y = event.clientY - host.getBoundingClientRect().top;
398
+ const minutes = this.startHour() * 60 + (y / this.hourHeight()) * 60;
399
+ const snapped = Math.floor(minutes / this.defaultMinutes()) * this.defaultMinutes();
400
+ const start = new Date(startOfDay(day).getTime() + snapped * 60_000);
401
+ this.slotClick.emit({
402
+ start,
403
+ end: new Date(start.getTime() + this.defaultMinutes() * 60_000),
404
+ });
405
+ }
406
+ onEventClick(event, placed) {
407
+ // Without this the click falls through to the grid and also opens "new appointment".
408
+ event.stopPropagation();
409
+ this.eventClick.emit(placed.event);
410
+ }
411
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsEventCalendar, deps: [], target: i0.ɵɵFactoryTarget.Component });
412
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: SdsEventCalendar, isStandalone: true, selector: "sds-event-calendar", inputs: { events: { classPropertyName: "events", publicName: "events", isSignal: true, isRequired: false, transformFunction: null }, view: { classPropertyName: "view", publicName: "view", isSignal: true, isRequired: false, transformFunction: null }, date: { classPropertyName: "date", publicName: "date", isSignal: true, isRequired: false, transformFunction: null }, firstDayOfWeek: { classPropertyName: "firstDayOfWeek", publicName: "firstDayOfWeek", isSignal: true, isRequired: false, transformFunction: null }, startHour: { classPropertyName: "startHour", publicName: "startHour", isSignal: true, isRequired: false, transformFunction: null }, endHour: { classPropertyName: "endHour", publicName: "endHour", isSignal: true, isRequired: false, transformFunction: null }, hourHeight: { classPropertyName: "hourHeight", publicName: "hourHeight", isSignal: true, isRequired: false, transformFunction: null }, defaultMinutes: { classPropertyName: "defaultMinutes", publicName: "defaultMinutes", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, nowIndicator: { classPropertyName: "nowIndicator", publicName: "nowIndicator", isSignal: true, isRequired: false, transformFunction: null }, showToolbar: { classPropertyName: "showToolbar", publicName: "showToolbar", isSignal: true, isRequired: false, transformFunction: null }, showViewSwitcher: { classPropertyName: "showViewSwitcher", publicName: "showViewSwitcher", isSignal: true, isRequired: false, transformFunction: null }, maxPerCell: { classPropertyName: "maxPerCell", publicName: "maxPerCell", isSignal: true, isRequired: false, transformFunction: null }, todayLabel: { classPropertyName: "todayLabel", publicName: "todayLabel", isSignal: true, isRequired: false, transformFunction: null }, previousLabel: { classPropertyName: "previousLabel", publicName: "previousLabel", isSignal: true, isRequired: false, transformFunction: null }, nextLabel: { classPropertyName: "nextLabel", publicName: "nextLabel", isSignal: true, isRequired: false, transformFunction: null }, allDayLabel: { classPropertyName: "allDayLabel", publicName: "allDayLabel", isSignal: true, isRequired: false, transformFunction: null }, moreLabel: { classPropertyName: "moreLabel", publicName: "moreLabel", isSignal: true, isRequired: false, transformFunction: null }, viewSwitcherLabel: { classPropertyName: "viewSwitcherLabel", publicName: "viewSwitcherLabel", isSignal: true, isRequired: false, transformFunction: null }, monthLabel: { classPropertyName: "monthLabel", publicName: "monthLabel", isSignal: true, isRequired: false, transformFunction: null }, weekLabel: { classPropertyName: "weekLabel", publicName: "weekLabel", isSignal: true, isRequired: false, transformFunction: null }, threeDayLabel: { classPropertyName: "threeDayLabel", publicName: "threeDayLabel", isSignal: true, isRequired: false, transformFunction: null }, dayLabel: { classPropertyName: "dayLabel", publicName: "dayLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { view: "viewChange", date: "dateChange", eventClick: "eventClick", slotClick: "slotClick", dayClick: "dayClick", rangeChange: "rangeChange" }, host: { classAttribute: "block" }, ngImport: i0, template: `
413
+ <div class="flex flex-col overflow-hidden rounded-card border border-border bg-surface">
414
+ @if (showToolbar()) {
415
+ <div class="flex flex-wrap items-center gap-x-3 gap-y-2 border-b border-border px-3 py-2.5">
416
+ <div class="flex shrink-0 items-center gap-1">
417
+ <button
418
+ type="button"
419
+ [attr.aria-label]="previousLabel()"
420
+ [title]="previousLabel()"
421
+ class="inline-flex size-8 items-center justify-center rounded-control text-ink-soft transition-colors hover:bg-muted hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-500"
422
+ (click)="move(-1)"
423
+ >
424
+ <sds-icon name="chevron-left" [size]="18" />
425
+ </button>
426
+ <button
427
+ type="button"
428
+ class="inline-flex h-8 items-center rounded-control border border-border px-3 text-sm font-medium text-ink transition-colors hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-500"
429
+ (click)="goToday()"
430
+ >
431
+ {{ todayLabel() }}
432
+ </button>
433
+ <button
434
+ type="button"
435
+ [attr.aria-label]="nextLabel()"
436
+ [title]="nextLabel()"
437
+ class="inline-flex size-8 items-center justify-center rounded-control text-ink-soft transition-colors hover:bg-muted hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-500"
438
+ (click)="move(1)"
439
+ >
440
+ <sds-icon name="chevron-right" [size]="18" />
441
+ </button>
442
+ </div>
443
+
444
+ <h2 class="min-w-0 flex-1 truncate text-sm font-semibold text-ink sm:text-base">
445
+ {{ title() }}
446
+ </h2>
447
+
448
+ @if (showViewSwitcher()) {
449
+ <sds-segmented
450
+ size="sm"
451
+ [ariaLabel]="viewSwitcherLabel()"
452
+ [options]="viewOptions()"
453
+ [value]="view()"
454
+ (valueChange)="setView($event)"
455
+ />
456
+ }
457
+ </div>
458
+ }
459
+
460
+ @if (view() === 'month') {
461
+ <!-- ------------------------------------------------------------------ month -->
462
+ <div class="grid grid-cols-7 border-b border-border bg-muted/50">
463
+ @for (d of weekdayNames(); track $index) {
464
+ <div class="px-1 py-1.5 text-center text-[11px] font-medium text-ink-soft">
465
+ {{ d }}
466
+ </div>
467
+ }
468
+ </div>
469
+ <div class="grid grid-cols-7 grid-rows-6" [style.height]="height()">
470
+ @for (day of days(); track day.getTime()) {
471
+ <div
472
+ class="flex min-w-0 flex-col gap-0.5 border-t border-l border-border p-1 first:border-l-0 [&:nth-child(7n+1)]:border-l-0"
473
+ [class.bg-muted]="!inFocusedMonth(day)"
474
+ [class.opacity-60]="!inFocusedMonth(day)"
475
+ >
476
+ <button
477
+ type="button"
478
+ class="self-start rounded-full px-1.5 text-[11px] font-medium transition-colors hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-500"
479
+ [class]="
480
+ isToday(day) ? 'bg-brand-500 text-white hover:bg-brand-600' : 'text-ink-soft'
481
+ "
482
+ (click)="dayClick.emit(day)"
483
+ >
484
+ {{ day.getDate() }}
485
+ </button>
486
+
487
+ <!-- Phones get dots: four chips in a 48px-wide cell is four unreadable smears. -->
488
+ <div class="flex flex-wrap items-center gap-0.5 px-0.5 sm:hidden">
489
+ @for (e of cellEvents(day).slice(0, 4); track e.id) {
490
+ <span [class]="dotClass(e) + ' size-1.5 rounded-full'" aria-hidden="true"></span>
491
+ }
492
+ @if (cellEvents(day).length) {
493
+ <span class="sr-only">{{ cellEvents(day).length }}</span>
494
+ }
495
+ </div>
496
+
497
+ <div class="hidden min-h-0 flex-col gap-0.5 overflow-hidden sm:flex">
498
+ @for (e of cellEvents(day).slice(0, maxPerCell()); track e.id) {
499
+ <button
500
+ type="button"
501
+ [class]="
502
+ chipClass(e) + ' truncate rounded border px-1 py-px text-left text-[11px]'
503
+ "
504
+ [class.line-through]="e.cancelled"
505
+ [class.opacity-60]="e.cancelled"
506
+ (click)="eventClick.emit(e)"
507
+ >
508
+ @if (!e.allDay) {
509
+ <span class="tabular-nums opacity-80">{{ clock(e.start) }}</span>
510
+ }
511
+ {{ e.title }}
512
+ </button>
513
+ }
514
+ @if (cellEvents(day).length > maxPerCell()) {
515
+ <button
516
+ type="button"
517
+ class="px-1 text-left text-[11px] font-medium text-ink-soft hover:text-ink"
518
+ (click)="dayClick.emit(day)"
519
+ >
520
+ {{
521
+ moreLabel().replace('{count}', '' + (cellEvents(day).length - maxPerCell()))
522
+ }}
523
+ </button>
524
+ }
525
+ </div>
526
+ </div>
527
+ }
528
+ </div>
529
+ } @else {
530
+ <!-- ------------------------------------------------- week / 3 days / one day -->
531
+ <div class="overflow-x-auto">
532
+ <div [style.min-width.px]="minWidth()">
533
+ <div class="grid border-b border-border" [style.grid-template-columns]="columns()">
534
+ <div class="border-r border-border"></div>
535
+ @for (day of days(); track day.getTime()) {
536
+ <button
537
+ type="button"
538
+ class="flex flex-col items-center gap-0.5 px-1 py-1.5 transition-colors hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-brand-500"
539
+ (click)="dayClick.emit(day)"
540
+ >
541
+ <span class="text-[11px] uppercase text-ink-faint">{{ shortWeekday(day) }}</span>
542
+ <span
543
+ class="inline-flex size-6 items-center justify-center rounded-full text-sm font-semibold"
544
+ [class]="isToday(day) ? 'bg-brand-500 text-white' : 'text-ink'"
545
+ >
546
+ {{ day.getDate() }}
547
+ </span>
548
+ </button>
549
+ }
550
+ </div>
551
+
552
+ @if (hasAllDay()) {
553
+ <div class="grid border-b border-border" [style.grid-template-columns]="columns()">
554
+ <div
555
+ class="border-r border-border px-1 py-1 text-right text-[10px] leading-tight text-ink-faint"
556
+ >
557
+ {{ allDayLabel() }}
558
+ </div>
559
+ @for (day of days(); track day.getTime()) {
560
+ <div class="flex min-w-0 flex-col gap-0.5 p-1">
561
+ @for (e of allDayEvents(day); track e.id) {
562
+ <button
563
+ type="button"
564
+ [class]="
565
+ chipClass(e) + ' truncate rounded border px-1 py-px text-left text-[11px]'
566
+ "
567
+ [class.line-through]="e.cancelled"
568
+ (click)="eventClick.emit(e)"
569
+ >
570
+ {{ e.title }}
571
+ </button>
572
+ }
573
+ </div>
574
+ }
575
+ </div>
576
+ }
577
+
578
+ <div class="overflow-y-auto" [style.height]="height()">
579
+ <div class="grid" [style.grid-template-columns]="columns()">
580
+ <div class="relative border-r border-border" [style.height.px]="bodyHeight()">
581
+ @for (h of hours(); track h) {
582
+ <span
583
+ class="absolute right-1.5 -translate-y-1/2 text-[10px] tabular-nums text-ink-faint"
584
+ [style.top.px]="hourTop(h)"
585
+ >
586
+ {{ hourLabel(h) }}
587
+ </span>
588
+ }
589
+ </div>
590
+
591
+ @for (day of days(); track day.getTime()) {
592
+ <div
593
+ class="relative border-r border-border last:border-r-0"
594
+ [style.height.px]="bodyHeight()"
595
+ (click)="onGridClick($event, day)"
596
+ >
597
+ @for (h of hours(); track h) {
598
+ <div
599
+ class="pointer-events-none absolute inset-x-0 border-t border-border/70"
600
+ [style.top.px]="hourTop(h)"
601
+ ></div>
602
+ }
603
+
604
+ @if (nowIndicator() && isToday(day) && nowTop() !== null) {
605
+ <div
606
+ class="pointer-events-none absolute inset-x-0 z-20 flex items-center"
607
+ [style.top.px]="nowTop()"
608
+ aria-hidden="true"
609
+ >
610
+ <span class="size-2 shrink-0 rounded-full bg-danger"></span>
611
+ <span class="h-px flex-1 bg-danger"></span>
612
+ </div>
613
+ }
614
+
615
+ @for (p of placed(day); track p.event.id) {
616
+ <button
617
+ type="button"
618
+ [class]="
619
+ chipClass(p.event) +
620
+ ' absolute z-10 overflow-hidden rounded border px-1 py-0.5 text-left transition-shadow hover:shadow-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-500'
621
+ "
622
+ [class.line-through]="p.event.cancelled"
623
+ [class.opacity-60]="p.event.cancelled"
624
+ [style.top.%]="p.top * 100"
625
+ [style.height.%]="p.height * 100"
626
+ [style.left.%]="p.left * 100"
627
+ [style.width.%]="p.width * 100"
628
+ [attr.aria-label]="
629
+ p.event.title + ', ' + clock(p.start) + ' – ' + clock(p.end)
630
+ "
631
+ (click)="onEventClick($event, p)"
632
+ >
633
+ <span class="block truncate text-[11px] font-medium leading-tight">
634
+ {{ p.event.title }}
635
+ </span>
636
+ @if (p.height > 0.045) {
637
+ <span class="block truncate text-[10px] leading-tight opacity-80">
638
+ {{ clock(p.start) }}
639
+ @if (p.event.subtitle) {
640
+ · {{ p.event.subtitle }}
641
+ }
642
+ </span>
643
+ }
644
+ </button>
645
+ }
646
+ </div>
647
+ }
648
+ </div>
649
+ </div>
650
+ </div>
651
+ </div>
652
+ }
653
+ </div>
654
+ `, isInline: true, dependencies: [{ kind: "component", type: SdsIcon, selector: "sds-icon", inputs: ["name", "size", "strokeWidth", "filled"] }, { kind: "component", type: SdsSegmented, selector: "sds-segmented", inputs: ["options", "value", "size", "ariaLabel", "ariaLabelledby", "disabled", "fullWidth", "iconOnly"], outputs: ["valueChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
655
+ }
656
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsEventCalendar, decorators: [{
657
+ type: Component,
658
+ args: [{
659
+ selector: 'sds-event-calendar',
660
+ changeDetection: ChangeDetectionStrategy.OnPush,
661
+ imports: [SdsIcon, SdsSegmented],
662
+ host: { class: 'block' },
663
+ template: `
664
+ <div class="flex flex-col overflow-hidden rounded-card border border-border bg-surface">
665
+ @if (showToolbar()) {
666
+ <div class="flex flex-wrap items-center gap-x-3 gap-y-2 border-b border-border px-3 py-2.5">
667
+ <div class="flex shrink-0 items-center gap-1">
668
+ <button
669
+ type="button"
670
+ [attr.aria-label]="previousLabel()"
671
+ [title]="previousLabel()"
672
+ class="inline-flex size-8 items-center justify-center rounded-control text-ink-soft transition-colors hover:bg-muted hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-500"
673
+ (click)="move(-1)"
674
+ >
675
+ <sds-icon name="chevron-left" [size]="18" />
676
+ </button>
677
+ <button
678
+ type="button"
679
+ class="inline-flex h-8 items-center rounded-control border border-border px-3 text-sm font-medium text-ink transition-colors hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-500"
680
+ (click)="goToday()"
681
+ >
682
+ {{ todayLabel() }}
683
+ </button>
684
+ <button
685
+ type="button"
686
+ [attr.aria-label]="nextLabel()"
687
+ [title]="nextLabel()"
688
+ class="inline-flex size-8 items-center justify-center rounded-control text-ink-soft transition-colors hover:bg-muted hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-500"
689
+ (click)="move(1)"
690
+ >
691
+ <sds-icon name="chevron-right" [size]="18" />
692
+ </button>
693
+ </div>
694
+
695
+ <h2 class="min-w-0 flex-1 truncate text-sm font-semibold text-ink sm:text-base">
696
+ {{ title() }}
697
+ </h2>
698
+
699
+ @if (showViewSwitcher()) {
700
+ <sds-segmented
701
+ size="sm"
702
+ [ariaLabel]="viewSwitcherLabel()"
703
+ [options]="viewOptions()"
704
+ [value]="view()"
705
+ (valueChange)="setView($event)"
706
+ />
707
+ }
708
+ </div>
709
+ }
710
+
711
+ @if (view() === 'month') {
712
+ <!-- ------------------------------------------------------------------ month -->
713
+ <div class="grid grid-cols-7 border-b border-border bg-muted/50">
714
+ @for (d of weekdayNames(); track $index) {
715
+ <div class="px-1 py-1.5 text-center text-[11px] font-medium text-ink-soft">
716
+ {{ d }}
717
+ </div>
718
+ }
719
+ </div>
720
+ <div class="grid grid-cols-7 grid-rows-6" [style.height]="height()">
721
+ @for (day of days(); track day.getTime()) {
722
+ <div
723
+ class="flex min-w-0 flex-col gap-0.5 border-t border-l border-border p-1 first:border-l-0 [&:nth-child(7n+1)]:border-l-0"
724
+ [class.bg-muted]="!inFocusedMonth(day)"
725
+ [class.opacity-60]="!inFocusedMonth(day)"
726
+ >
727
+ <button
728
+ type="button"
729
+ class="self-start rounded-full px-1.5 text-[11px] font-medium transition-colors hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-500"
730
+ [class]="
731
+ isToday(day) ? 'bg-brand-500 text-white hover:bg-brand-600' : 'text-ink-soft'
732
+ "
733
+ (click)="dayClick.emit(day)"
734
+ >
735
+ {{ day.getDate() }}
736
+ </button>
737
+
738
+ <!-- Phones get dots: four chips in a 48px-wide cell is four unreadable smears. -->
739
+ <div class="flex flex-wrap items-center gap-0.5 px-0.5 sm:hidden">
740
+ @for (e of cellEvents(day).slice(0, 4); track e.id) {
741
+ <span [class]="dotClass(e) + ' size-1.5 rounded-full'" aria-hidden="true"></span>
742
+ }
743
+ @if (cellEvents(day).length) {
744
+ <span class="sr-only">{{ cellEvents(day).length }}</span>
745
+ }
746
+ </div>
747
+
748
+ <div class="hidden min-h-0 flex-col gap-0.5 overflow-hidden sm:flex">
749
+ @for (e of cellEvents(day).slice(0, maxPerCell()); track e.id) {
750
+ <button
751
+ type="button"
752
+ [class]="
753
+ chipClass(e) + ' truncate rounded border px-1 py-px text-left text-[11px]'
754
+ "
755
+ [class.line-through]="e.cancelled"
756
+ [class.opacity-60]="e.cancelled"
757
+ (click)="eventClick.emit(e)"
758
+ >
759
+ @if (!e.allDay) {
760
+ <span class="tabular-nums opacity-80">{{ clock(e.start) }}</span>
761
+ }
762
+ {{ e.title }}
763
+ </button>
764
+ }
765
+ @if (cellEvents(day).length > maxPerCell()) {
766
+ <button
767
+ type="button"
768
+ class="px-1 text-left text-[11px] font-medium text-ink-soft hover:text-ink"
769
+ (click)="dayClick.emit(day)"
770
+ >
771
+ {{
772
+ moreLabel().replace('{count}', '' + (cellEvents(day).length - maxPerCell()))
773
+ }}
774
+ </button>
775
+ }
776
+ </div>
777
+ </div>
778
+ }
779
+ </div>
780
+ } @else {
781
+ <!-- ------------------------------------------------- week / 3 days / one day -->
782
+ <div class="overflow-x-auto">
783
+ <div [style.min-width.px]="minWidth()">
784
+ <div class="grid border-b border-border" [style.grid-template-columns]="columns()">
785
+ <div class="border-r border-border"></div>
786
+ @for (day of days(); track day.getTime()) {
787
+ <button
788
+ type="button"
789
+ class="flex flex-col items-center gap-0.5 px-1 py-1.5 transition-colors hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-brand-500"
790
+ (click)="dayClick.emit(day)"
791
+ >
792
+ <span class="text-[11px] uppercase text-ink-faint">{{ shortWeekday(day) }}</span>
793
+ <span
794
+ class="inline-flex size-6 items-center justify-center rounded-full text-sm font-semibold"
795
+ [class]="isToday(day) ? 'bg-brand-500 text-white' : 'text-ink'"
796
+ >
797
+ {{ day.getDate() }}
798
+ </span>
799
+ </button>
800
+ }
801
+ </div>
802
+
803
+ @if (hasAllDay()) {
804
+ <div class="grid border-b border-border" [style.grid-template-columns]="columns()">
805
+ <div
806
+ class="border-r border-border px-1 py-1 text-right text-[10px] leading-tight text-ink-faint"
807
+ >
808
+ {{ allDayLabel() }}
809
+ </div>
810
+ @for (day of days(); track day.getTime()) {
811
+ <div class="flex min-w-0 flex-col gap-0.5 p-1">
812
+ @for (e of allDayEvents(day); track e.id) {
813
+ <button
814
+ type="button"
815
+ [class]="
816
+ chipClass(e) + ' truncate rounded border px-1 py-px text-left text-[11px]'
817
+ "
818
+ [class.line-through]="e.cancelled"
819
+ (click)="eventClick.emit(e)"
820
+ >
821
+ {{ e.title }}
822
+ </button>
823
+ }
824
+ </div>
825
+ }
826
+ </div>
827
+ }
828
+
829
+ <div class="overflow-y-auto" [style.height]="height()">
830
+ <div class="grid" [style.grid-template-columns]="columns()">
831
+ <div class="relative border-r border-border" [style.height.px]="bodyHeight()">
832
+ @for (h of hours(); track h) {
833
+ <span
834
+ class="absolute right-1.5 -translate-y-1/2 text-[10px] tabular-nums text-ink-faint"
835
+ [style.top.px]="hourTop(h)"
836
+ >
837
+ {{ hourLabel(h) }}
838
+ </span>
839
+ }
840
+ </div>
841
+
842
+ @for (day of days(); track day.getTime()) {
843
+ <div
844
+ class="relative border-r border-border last:border-r-0"
845
+ [style.height.px]="bodyHeight()"
846
+ (click)="onGridClick($event, day)"
847
+ >
848
+ @for (h of hours(); track h) {
849
+ <div
850
+ class="pointer-events-none absolute inset-x-0 border-t border-border/70"
851
+ [style.top.px]="hourTop(h)"
852
+ ></div>
853
+ }
854
+
855
+ @if (nowIndicator() && isToday(day) && nowTop() !== null) {
856
+ <div
857
+ class="pointer-events-none absolute inset-x-0 z-20 flex items-center"
858
+ [style.top.px]="nowTop()"
859
+ aria-hidden="true"
860
+ >
861
+ <span class="size-2 shrink-0 rounded-full bg-danger"></span>
862
+ <span class="h-px flex-1 bg-danger"></span>
863
+ </div>
864
+ }
865
+
866
+ @for (p of placed(day); track p.event.id) {
867
+ <button
868
+ type="button"
869
+ [class]="
870
+ chipClass(p.event) +
871
+ ' absolute z-10 overflow-hidden rounded border px-1 py-0.5 text-left transition-shadow hover:shadow-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-500'
872
+ "
873
+ [class.line-through]="p.event.cancelled"
874
+ [class.opacity-60]="p.event.cancelled"
875
+ [style.top.%]="p.top * 100"
876
+ [style.height.%]="p.height * 100"
877
+ [style.left.%]="p.left * 100"
878
+ [style.width.%]="p.width * 100"
879
+ [attr.aria-label]="
880
+ p.event.title + ', ' + clock(p.start) + ' – ' + clock(p.end)
881
+ "
882
+ (click)="onEventClick($event, p)"
883
+ >
884
+ <span class="block truncate text-[11px] font-medium leading-tight">
885
+ {{ p.event.title }}
886
+ </span>
887
+ @if (p.height > 0.045) {
888
+ <span class="block truncate text-[10px] leading-tight opacity-80">
889
+ {{ clock(p.start) }}
890
+ @if (p.event.subtitle) {
891
+ · {{ p.event.subtitle }}
892
+ }
893
+ </span>
894
+ }
895
+ </button>
896
+ }
897
+ </div>
898
+ }
899
+ </div>
900
+ </div>
901
+ </div>
902
+ </div>
903
+ }
904
+ </div>
905
+ `,
906
+ }]
907
+ }], ctorParameters: () => [], propDecorators: { events: [{ type: i0.Input, args: [{ isSignal: true, alias: "events", required: false }] }], view: [{ type: i0.Input, args: [{ isSignal: true, alias: "view", required: false }] }, { type: i0.Output, args: ["viewChange"] }], date: [{ type: i0.Input, args: [{ isSignal: true, alias: "date", required: false }] }, { type: i0.Output, args: ["dateChange"] }], firstDayOfWeek: [{ type: i0.Input, args: [{ isSignal: true, alias: "firstDayOfWeek", required: false }] }], startHour: [{ type: i0.Input, args: [{ isSignal: true, alias: "startHour", required: false }] }], endHour: [{ type: i0.Input, args: [{ isSignal: true, alias: "endHour", required: false }] }], hourHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "hourHeight", required: false }] }], defaultMinutes: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultMinutes", required: false }] }], height: [{ type: i0.Input, args: [{ isSignal: true, alias: "height", required: false }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }], nowIndicator: [{ type: i0.Input, args: [{ isSignal: true, alias: "nowIndicator", required: false }] }], showToolbar: [{ type: i0.Input, args: [{ isSignal: true, alias: "showToolbar", required: false }] }], showViewSwitcher: [{ type: i0.Input, args: [{ isSignal: true, alias: "showViewSwitcher", required: false }] }], maxPerCell: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxPerCell", required: false }] }], todayLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "todayLabel", required: false }] }], previousLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "previousLabel", required: false }] }], nextLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "nextLabel", required: false }] }], allDayLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "allDayLabel", required: false }] }], moreLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "moreLabel", required: false }] }], viewSwitcherLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "viewSwitcherLabel", required: false }] }], monthLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "monthLabel", required: false }] }], weekLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "weekLabel", required: false }] }], threeDayLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "threeDayLabel", required: false }] }], dayLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "dayLabel", required: false }] }], eventClick: [{ type: i0.Output, args: ["eventClick"] }], slotClick: [{ type: i0.Output, args: ["slotClick"] }], dayClick: [{ type: i0.Output, args: ["dayClick"] }], rangeChange: [{ type: i0.Output, args: ["rangeChange"] }] } });
908
+
909
+ /*
910
+ * @besaitech/ng-design-system/calendar — the event calendar, kept OUT of the main entry point.
911
+ *
912
+ * Same reason the chart family has its own: a consuming app that never shows a calendar should not
913
+ * carry one. It is reachable from a lazy route, but the library is one ES module, so anything the
914
+ * primary entry point exports is linked into whatever bundle already imports from it — measured at
915
+ * roughly 28 kB landing in medicware-clinic's INITIAL bundle, past its budget, for a screen behind
916
+ * a lazy route. A separate entry point is what actually makes it lazy.
917
+ */
918
+
919
+ /**
920
+ * Generated bundle index. Do not edit.
921
+ */
922
+
923
+ export { SdsEventCalendar, allDayOn, eventsOn, minutesOfDay, occursOn, placeDay, startOfWeek, step, toDate, visibleDays, visibleRange };
924
+ //# sourceMappingURL=besaitech-ng-design-system-calendar.mjs.map