mn-angular-lib 1.0.178 → 1.0.179

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.
Files changed (66) hide show
  1. package/fesm2022/mn-angular-lib-alert.mjs +535 -0
  2. package/fesm2022/mn-angular-lib-alert.mjs.map +1 -0
  3. package/fesm2022/mn-angular-lib-bottom-sheet.mjs +356 -0
  4. package/fesm2022/mn-angular-lib-bottom-sheet.mjs.map +1 -0
  5. package/fesm2022/mn-angular-lib-button.mjs +382 -0
  6. package/fesm2022/mn-angular-lib-button.mjs.map +1 -0
  7. package/fesm2022/mn-angular-lib-calendar-core.mjs +377 -0
  8. package/fesm2022/mn-angular-lib-calendar-core.mjs.map +1 -0
  9. package/fesm2022/mn-angular-lib-calendar.mjs +1513 -0
  10. package/fesm2022/mn-angular-lib-calendar.mjs.map +1 -0
  11. package/fesm2022/mn-angular-lib-collection.mjs +2277 -0
  12. package/fesm2022/mn-angular-lib-collection.mjs.map +1 -0
  13. package/fesm2022/mn-angular-lib-core.mjs +1232 -0
  14. package/fesm2022/mn-angular-lib-core.mjs.map +1 -0
  15. package/fesm2022/mn-angular-lib-display.mjs +728 -0
  16. package/fesm2022/mn-angular-lib-display.mjs.map +1 -0
  17. package/fesm2022/mn-angular-lib-forms.mjs +4260 -0
  18. package/fesm2022/mn-angular-lib-forms.mjs.map +1 -0
  19. package/fesm2022/mn-angular-lib-keyboard.mjs +195 -0
  20. package/fesm2022/mn-angular-lib-keyboard.mjs.map +1 -0
  21. package/fesm2022/mn-angular-lib-modal-core.mjs +945 -0
  22. package/fesm2022/mn-angular-lib-modal-core.mjs.map +1 -0
  23. package/fesm2022/mn-angular-lib-modal-ui.mjs +2016 -0
  24. package/fesm2022/mn-angular-lib-modal-ui.mjs.map +1 -0
  25. package/fesm2022/mn-angular-lib-modal.mjs +126 -0
  26. package/fesm2022/mn-angular-lib-modal.mjs.map +1 -0
  27. package/fesm2022/mn-angular-lib-rich-text-editor.mjs +275 -0
  28. package/fesm2022/mn-angular-lib-rich-text-editor.mjs.map +1 -0
  29. package/fesm2022/mn-angular-lib-segmented.mjs +246 -0
  30. package/fesm2022/mn-angular-lib-segmented.mjs.map +1 -0
  31. package/fesm2022/mn-angular-lib-tab.mjs +573 -0
  32. package/fesm2022/mn-angular-lib-tab.mjs.map +1 -0
  33. package/fesm2022/mn-angular-lib.mjs +21 -15517
  34. package/fesm2022/mn-angular-lib.mjs.map +1 -1
  35. package/package.json +66 -1
  36. package/src/lib/styles/index.css +2 -2
  37. package/types/mn-angular-lib-alert.d.ts +258 -0
  38. package/types/mn-angular-lib-bottom-sheet.d.ts +173 -0
  39. package/types/mn-angular-lib-button.d.ts +318 -0
  40. package/types/mn-angular-lib-calendar-core.d.ts +378 -0
  41. package/types/mn-angular-lib-calendar.d.ts +636 -0
  42. package/types/mn-angular-lib-collection.d.ts +1550 -0
  43. package/types/mn-angular-lib-core.d.ts +756 -0
  44. package/types/mn-angular-lib-display.d.ts +1075 -0
  45. package/types/mn-angular-lib-forms.d.ts +3235 -0
  46. package/types/mn-angular-lib-keyboard.d.ts +128 -0
  47. package/types/mn-angular-lib-modal-core.d.ts +1130 -0
  48. package/types/mn-angular-lib-modal-ui.d.ts +492 -0
  49. package/types/mn-angular-lib-modal.d.ts +27 -0
  50. package/types/mn-angular-lib-rich-text-editor.d.ts +157 -0
  51. package/types/mn-angular-lib-segmented.d.ts +395 -0
  52. package/types/mn-angular-lib-tab.d.ts +313 -0
  53. package/types/mn-angular-lib.d.ts +16 -10822
  54. /package/{src/lib/features → alert/src}/mn-alert/mn-alert-outlet/mn-alert-outlet.css +0 -0
  55. /package/{src/lib/features → bottom-sheet/src}/mn-bottom-sheet/mn-bottom-sheet.component.css +0 -0
  56. /package/{src/lib/features → button/src}/mn-skeleton/mn-skeleton.css +0 -0
  57. /package/{src/lib/features → collection/src}/mn-list/mn-list.component.css +0 -0
  58. /package/{src/lib/features → forms/src}/mn-checkbox/mn-checkbox.css +0 -0
  59. /package/{src/lib/features → forms/src}/mn-dropdown/mn-dropdown.css +0 -0
  60. /package/{src/lib/features → forms/src}/mn-multi-select/mn-multi-select.css +0 -0
  61. /package/{src/lib/features → keyboard/src}/mn-keyboard/mn-keyboard.component.css +0 -0
  62. /package/{src/lib/features → modal-ui/src}/mn-modal/components/mn-confirmation-body/mn-confirmation-body.component.css +0 -0
  63. /package/{src/lib/features → modal-ui/src}/mn-modal/components/mn-form-body/mn-form-body.component.css +0 -0
  64. /package/{src/lib/features → modal-ui/src}/mn-modal/components/mn-modal-shell/mn-modal-shell.component.css +0 -0
  65. /package/{src/lib/features → modal-ui/src}/mn-modal/components/mn-wizard-body/mn-wizard-body.component.css +0 -0
  66. /package/{src/lib/features → rich-text-editor/src}/mn-rich-text-editor/mn-rich-text-editor.component.css +0 -0
@@ -0,0 +1,636 @@
1
+ import * as _lucide_angular from '@lucide/angular';
2
+ import * as i0 from '@angular/core';
3
+ import { OnInit, OnDestroy, Type, EventEmitter, AfterViewInit, OnChanges, ViewContainerRef, SimpleChanges } from '@angular/core';
4
+ import { BehaviorSubject, Subject, Observable } from 'rxjs';
5
+ import { CalendarButton, CalendarEventData, CalendarEvent, CalendarView, CalendarConfig, ColumnDay, HourRow, MonthItem } from 'mn-angular-lib/calendar-core';
6
+
7
+ /**
8
+ * Main calendar orchestrator component.
9
+ *
10
+ * Provides a toolbar with view switching (month / week / day), date navigation,
11
+ * and an optional action button. The active view and an upcoming-events sidebar
12
+ * are rendered inside a responsive grid layout.
13
+ *
14
+ * All configuration (visible hours, locale, labels, mobile breakpoint) is read
15
+ * from the `mn-config.json5` system via {@link MN_CALENDAR_CONFIG}, falling back
16
+ * to the legacy {@link CALENDAR_CONFIG} injection token, then to built-in defaults.
17
+ * Date formatting is delegated to the {@link CALENDAR_DATE_FORMATTER} token.
18
+ *
19
+ * @example
20
+ * ```html
21
+ * <mn-calendar-view
22
+ * [showButton]="true"
23
+ * [buttonTitle]="'New Event'"
24
+ * [NewCalendarItemsEvent]="eventsEmitter"
25
+ * (RequestNewCalendarItemsEvent)="loadEvents($event)"
26
+ * (CalendarItemClickedEvent)="onEventClick($event)"
27
+ * (ButtonClickedEvent)="openModal()">
28
+ * </mn-calendar-view>
29
+ * ```
30
+ */
31
+ declare class CalendarViewComponent implements OnInit, OnDestroy {
32
+ /** Lucide icons the template renders. */
33
+ protected readonly icons: Record<"ChevronLeft" | "ChevronRight", _lucide_angular.LucideIconData>;
34
+ /**
35
+ * Accessible name for this control. Resolved through the conventional
36
+ * `mnCalendar.calendarView` key so an app can translate it, falling back to English when the
37
+ * key is not defined rather than leaking the raw key into the UI.
38
+ */
39
+ get calendarViewLabel(): string;
40
+ /** Whether to show the action button in the toolbar. */
41
+ showButton: boolean;
42
+ /** Label text for the action button. */
43
+ buttonTitle: string;
44
+ /** Array of buttons to display in the toolbar's top-right area. */
45
+ buttons: CalendarButton[];
46
+ /** Custom event renderer component type. */
47
+ CalendarEventComponent?: Type<CalendarEventData>;
48
+ /** Observable or EventEmitter that pushes new event arrays into the calendar. */
49
+ NewCalendarItemsEvent?: EventEmitter<CalendarEvent[]>;
50
+ /** Emits when the calendar needs fresh event data (e.g. after navigation). */
51
+ RequestNewCalendarItemsEvent: EventEmitter<Date>;
52
+ /** Emits when a calendar event is clicked. */
53
+ CalendarItemClickedEvent: EventEmitter<CalendarEvent>;
54
+ /** Emits when the action button is clicked. */
55
+ ButtonClickedEvent: EventEmitter<void>;
56
+ readonly CalendarView: typeof CalendarView;
57
+ /** Ties the view tabs to the panel they control, uniquely per calendar. */
58
+ readonly panelId: string;
59
+ currentView: CalendarView;
60
+ focusDay: Date;
61
+ viewOptions: {
62
+ value: CalendarView;
63
+ label: string;
64
+ }[];
65
+ isMobileView: boolean;
66
+ /** BehaviorSubject so late-subscribing child views receive the last emitted events. */
67
+ internalEventsChanged: BehaviorSubject<CalendarEvent[]>;
68
+ /** Subject for broadcasting focus-day changes to child views. */
69
+ internalFocusDayChanged: Subject<Date>;
70
+ private destroy$;
71
+ protected config: CalendarConfig;
72
+ /** Reference to the injected mn-config object (mutated in-place on locale change). */
73
+ private readonly mnConfigRef;
74
+ private readonly destroyRef;
75
+ private readonly lang;
76
+ private readonly cdr;
77
+ constructor();
78
+ onResize(): void;
79
+ ngOnInit(): void;
80
+ ngOnDestroy(): void;
81
+ /** Switches the active view. On mobile, forces day view. */
82
+ switchView(view: CalendarView): void;
83
+ /**
84
+ * Names the stretch of time on screen — the day, the week, or the month. It is
85
+ * the toolbar's orientation: without it, navigating leaves you somewhere with
86
+ * no label. Announced politely, so stepping through says where you landed.
87
+ */
88
+ get periodLabel(): string;
89
+ /** The focus day as YYYY-MM-DD, for the toolbar's date picker. */
90
+ get focusDayString(): string;
91
+ /**
92
+ * Steps the calendar by one unit of whatever is on screen: a day in day view,
93
+ * a week in week view, a month in month view. Navigating by the visible unit is
94
+ * what makes one pair of arrows serve all three.
95
+ */
96
+ navigate(step: number): void;
97
+ /** Returns the calendar to today. */
98
+ goToToday(): void;
99
+ /**
100
+ * Handles the toolbar date picker.
101
+ * @param value The date string in YYYY-MM-DD format.
102
+ */
103
+ onPickDate(value: string): void;
104
+ /** Handles a day click from the month view — switches to day view. */
105
+ onMonthDayClick(date: Date): void;
106
+ /** Forwards a child event click to the parent output. */
107
+ onEventClick(event: CalendarEvent): void;
108
+ /** trackBy for view option buttons. */
109
+ trackByView(_index: number, item: {
110
+ value: CalendarView;
111
+ }): string;
112
+ /** Rebuilds view options and labels from the current config. */
113
+ private rebuildFromConfig;
114
+ private checkMobileView;
115
+ /**
116
+ * Adds months without the end-of-month overflow `setMonth` alone produces —
117
+ * 31 January plus one month is 28 February, not 3 March.
118
+ */
119
+ private addMonths;
120
+ /** Monday of the week containing `date`, matching the grid the views draw. */
121
+ private startOfWeek;
122
+ private setFocusDay;
123
+ static ɵfac: i0.ɵɵFactoryDeclaration<CalendarViewComponent, never>;
124
+ static ɵcmp: i0.ɵɵComponentDeclaration<CalendarViewComponent, "mn-calendar-view", never, { "showButton": { "alias": "showButton"; "required": false; }; "buttonTitle": { "alias": "buttonTitle"; "required": false; }; "buttons": { "alias": "buttons"; "required": false; }; "CalendarEventComponent": { "alias": "CalendarEventComponent"; "required": false; }; "NewCalendarItemsEvent": { "alias": "NewCalendarItemsEvent"; "required": false; }; }, { "RequestNewCalendarItemsEvent": "RequestNewCalendarItemsEvent"; "CalendarItemClickedEvent": "CalendarItemClickedEvent"; "ButtonClickedEvent": "ButtonClickedEvent"; }, never, never, true, never>;
125
+ }
126
+
127
+ /** Extended hour row with a pre-resolved display label. */
128
+ type DisplayHourRow$1 = {
129
+ hourLabel: string;
130
+ } & HourRow;
131
+ /**
132
+ * Week grid view showing 7 day columns with half-hour time slots.
133
+ *
134
+ * Overlapping events within the same day are laid out in sub-columns
135
+ * so they appear side-by-side rather than stacked.
136
+ */
137
+ declare class CalendarWeekComponent implements OnInit, OnDestroy {
138
+ private readonly lang;
139
+ /**
140
+ * Accessible name for this control. Resolved through the conventional
141
+ * `mnCalendar.weekView` key so an app can translate it, falling back to English when the
142
+ * key is not defined rather than leaking the raw key into the UI.
143
+ */
144
+ get weekViewLabel(): string;
145
+ private layoutService;
146
+ private cdr;
147
+ /** The date around which the week is centred. */
148
+ focusDay: Date;
149
+ /** Observable that emits the full event list whenever it changes. */
150
+ eventsChanged: Observable<CalendarEvent[]>;
151
+ /** Observable that emits when the focus day changes. */
152
+ focusDayChanged: Observable<Date>;
153
+ /** Resolved calendar configuration passed from the parent view. */
154
+ config?: CalendarConfig;
155
+ /** Optional custom event renderer component. */
156
+ calendarEventComponent?: Type<CalendarEventData>;
157
+ /** Emits when a calendar event is clicked. */
158
+ eventClicked: EventEmitter<CalendarEvent>;
159
+ columns: ColumnDay[];
160
+ hourRows: DisplayHourRow$1[];
161
+ displayEvents: CalendarEvent[];
162
+ totalRows: number;
163
+ currentTimeRow: number;
164
+ currentTimeCol: string;
165
+ /** The current time, formatted for the label riding the now-line. */
166
+ currentTimeLabel: string;
167
+ gridTemplateColumns: string;
168
+ private dayColumnMap;
169
+ private events;
170
+ private destroy$;
171
+ private formatter;
172
+ private resolvedConfig;
173
+ private currentTimeInterval?;
174
+ constructor();
175
+ ngOnInit(): void;
176
+ ngOnDestroy(): void;
177
+ /** Returns the CSS `grid-row` value for an event based on its start/end times. */
178
+ getEventRow(event: CalendarEvent): string;
179
+ /** Returns the CSS `grid-column` span for a day header, accounting for sub-columns. */
180
+ getHeaderColumn(dayIndex: number): string;
181
+ /** Returns the CSS `grid-column` value for an event within its day's sub-columns. */
182
+ getEventColumn(event: CalendarEvent): string;
183
+ /** Forwards event click to parent. */
184
+ onEventClick(event: CalendarEvent): void;
185
+ /** trackBy for hour rows. */
186
+ trackByHour(_index: number, row: DisplayHourRow$1): number;
187
+ /** trackBy for day columns. */
188
+ trackByColumn(_index: number, col: ColumnDay): number;
189
+ /** trackBy for events. */
190
+ trackByEvent(_index: number, event: CalendarEvent): string;
191
+ private buildHourRows;
192
+ /** Builds the 7 day columns for the current week (Monday–Sunday). */
193
+ private buildColumns;
194
+ /** Filters, splits, and lays out events for the current week. */
195
+ private refreshEvents;
196
+ /** Computes the CSS grid-template-columns string based on per-day sub-column counts. */
197
+ private buildGridColumns;
198
+ /** Updates the current-time red line position. */
199
+ private updateCurrentTime;
200
+ static ɵfac: i0.ɵɵFactoryDeclaration<CalendarWeekComponent, never>;
201
+ static ɵcmp: i0.ɵɵComponentDeclaration<CalendarWeekComponent, "mn-calendar-week", never, { "focusDay": { "alias": "focusDay"; "required": false; }; "eventsChanged": { "alias": "eventsChanged"; "required": false; }; "focusDayChanged": { "alias": "focusDayChanged"; "required": false; }; "config": { "alias": "config"; "required": false; }; "calendarEventComponent": { "alias": "calendarEventComponent"; "required": false; }; }, { "eventClicked": "eventClicked"; }, never, never, true, never>;
202
+ }
203
+
204
+ /** Extended hour row with a pre-resolved display label. */
205
+ type DisplayHourRow = {
206
+ hourLabel: string;
207
+ } & HourRow;
208
+ /**
209
+ * Day grid view showing a single day with half-hour time slots.
210
+ *
211
+ * Shares the same layout algorithm as the week view via
212
+ * {@link CalendarEventLayoutService}.
213
+ */
214
+ declare class CalendarDayComponent implements OnInit, OnDestroy {
215
+ private readonly lang;
216
+ /**
217
+ * Accessible name for this control. Resolved through the conventional
218
+ * `mnCalendar.dayView` key so an app can translate it, falling back to English when the
219
+ * key is not defined rather than leaking the raw key into the UI.
220
+ */
221
+ get dayViewLabel(): string;
222
+ private layoutService;
223
+ private cdr;
224
+ /** The date to display. */
225
+ focusDay: Date;
226
+ /** Observable that emits the full event list whenever it changes. */
227
+ eventsChanged: Observable<CalendarEvent[]>;
228
+ /** Observable that emits when the focus day changes. */
229
+ focusDayChanged: Observable<Date>;
230
+ /** Resolved calendar configuration passed from the parent view. */
231
+ config?: CalendarConfig;
232
+ /** Optional custom event renderer component. */
233
+ calendarEventComponent?: Type<CalendarEventData>;
234
+ /** Emits when a calendar event is clicked. */
235
+ eventClicked: EventEmitter<CalendarEvent>;
236
+ hourRows: DisplayHourRow[];
237
+ displayEvents: CalendarEvent[];
238
+ totalRows: number;
239
+ totalColumns: number;
240
+ currentTimeRow: number;
241
+ /** The current time, formatted for the label riding the now-line. */
242
+ currentTimeLabel: string;
243
+ isToday: boolean;
244
+ dayName: string;
245
+ private events;
246
+ private destroy$;
247
+ private formatter;
248
+ private resolvedConfig;
249
+ private currentTimeInterval?;
250
+ constructor();
251
+ ngOnInit(): void;
252
+ ngOnDestroy(): void;
253
+ /** Returns the CSS `grid-row` value for an event. */
254
+ getEventRow(event: CalendarEvent): string;
255
+ /** Returns the CSS `grid-column` value for an event within its sub-columns. */
256
+ getEventColumn(event: CalendarEvent): string;
257
+ /** Forwards event click to parent. */
258
+ onEventClick(event: CalendarEvent): void;
259
+ /** trackBy for hour rows. */
260
+ trackByHour(_index: number, row: DisplayHourRow): number;
261
+ /** trackBy for events. */
262
+ trackByEvent(_index: number, event: CalendarEvent): string;
263
+ private buildHourRows;
264
+ /** Updates the day name and isToday flag. */
265
+ private updateDayInfo;
266
+ /** Filters, splits, and lays out events for the focus day. */
267
+ private refreshEvents;
268
+ /** Updates the current-time red line position. */
269
+ private updateCurrentTime;
270
+ static ɵfac: i0.ɵɵFactoryDeclaration<CalendarDayComponent, never>;
271
+ static ɵcmp: i0.ɵɵComponentDeclaration<CalendarDayComponent, "mn-calendar-day", never, { "focusDay": { "alias": "focusDay"; "required": false; }; "eventsChanged": { "alias": "eventsChanged"; "required": false; }; "focusDayChanged": { "alias": "focusDayChanged"; "required": false; }; "config": { "alias": "config"; "required": false; }; "calendarEventComponent": { "alias": "calendarEventComponent"; "required": false; }; }, { "eventClicked": "eventClicked"; }, never, never, true, never>;
272
+ }
273
+
274
+ /**
275
+ * Month grid view showing a 7×6 grid of day cells.
276
+ *
277
+ * Each cell displays the day number and up to 3 coloured dots representing
278
+ * events on that day. Clicking a cell emits `dayClicked`.
279
+ */
280
+ declare class CalendarMonthComponent implements OnInit, OnDestroy {
281
+ private readonly lang;
282
+ private readonly cdr;
283
+ /**
284
+ * Accessible name for this control. Resolved through the conventional
285
+ * `mnCalendar.monthView` key so an app can translate it, falling back to English when the
286
+ * key is not defined rather than leaking the raw key into the UI.
287
+ */
288
+ get monthViewLabel(): string;
289
+ /** The date whose month is displayed. */
290
+ focusDay: Date;
291
+ /** Observable that emits the full event list whenever it changes. */
292
+ eventsChanged: Observable<CalendarEvent[]>;
293
+ /** Observable that emits when the focus day changes. */
294
+ focusDayChanged: Observable<Date>;
295
+ /** Resolved calendar configuration passed from the parent view. */
296
+ config?: CalendarConfig;
297
+ /** Emits the date of a clicked day cell. */
298
+ dayClicked: EventEmitter<Date>;
299
+ monthItems: MonthItem[];
300
+ /** Short weekday column headers (e.g. "Mon"), kept compact for the narrow columns. */
301
+ weekdayLabels: string[];
302
+ /** Word shown after the "+N" overflow count (e.g. "more"), from config. */
303
+ moreEventsLabel: string;
304
+ private events;
305
+ private destroy$;
306
+ private formatter;
307
+ constructor();
308
+ ngOnInit(): void;
309
+ ngOnDestroy(): void;
310
+ /** Emits the clicked day's date. */
311
+ onDayClick(date: Date): void;
312
+ /** trackBy for day name headers. */
313
+ trackByDayName(index: number): number;
314
+ /** trackBy for month grid cells. */
315
+ trackByMonthItem(_index: number, item: MonthItem): number;
316
+ /** trackBy for event dots. */
317
+ trackByEventDot(_index: number, event: CalendarEvent): string;
318
+ /** Builds the 42-cell month grid (6 rows × 7 columns). */
319
+ private buildMonth;
320
+ private createMonthItem;
321
+ static ɵfac: i0.ɵɵFactoryDeclaration<CalendarMonthComponent, never>;
322
+ static ɵcmp: i0.ɵɵComponentDeclaration<CalendarMonthComponent, "mn-calendar-month", never, { "focusDay": { "alias": "focusDay"; "required": false; }; "eventsChanged": { "alias": "eventsChanged"; "required": false; }; "focusDayChanged": { "alias": "focusDayChanged"; "required": false; }; "config": { "alias": "config"; "required": false; }; }, { "dayClicked": "dayClicked"; }, never, never, true, never>;
323
+ }
324
+
325
+ /**
326
+ * Dynamic event renderer that injects a custom or default event component
327
+ * into its view container.
328
+ *
329
+ * The component to render is resolved in this order:
330
+ * 1. `customComponent` input (set on the parent week/day view)
331
+ * 2. `event.component` (per-event override)
332
+ * 3. {@link CalendarEventDefaultComponent} (library default)
333
+ */
334
+ declare class CalendarEventComponent implements AfterViewInit, OnChanges {
335
+ /** The event data to render. */
336
+ event: CalendarEvent;
337
+ /** Optional custom component type that overrides the default renderer. */
338
+ customComponent?: Type<CalendarEventData>;
339
+ /** Emits when the rendered event is clicked. */
340
+ eventClicked: EventEmitter<CalendarEvent>;
341
+ eventContainer: ViewContainerRef;
342
+ private rendered;
343
+ ngAfterViewInit(): void;
344
+ ngOnChanges(changes: SimpleChanges): void;
345
+ /** Emits the event click. */
346
+ onEventClick(): void;
347
+ /** Creates the event component dynamically and sets its `event` property. */
348
+ private renderComponent;
349
+ static ɵfac: i0.ɵɵFactoryDeclaration<CalendarEventComponent, never>;
350
+ static ɵcmp: i0.ɵɵComponentDeclaration<CalendarEventComponent, "mn-calendar-event", never, { "event": { "alias": "event"; "required": false; }; "customComponent": { "alias": "customComponent"; "required": false; }; }, { "eventClicked": "eventClicked"; }, never, never, true, never>;
351
+ }
352
+
353
+ /**
354
+ * Default event renderer used when no custom component is provided.
355
+ *
356
+ * Displays the event title, formatted time range, and optional description
357
+ * with the event's colour scheme applied as background and left-border accent.
358
+ */
359
+ declare class CalendarEventDefaultComponent implements CalendarEventData, OnInit {
360
+ private cdr;
361
+ /** The event to render. Set by {@link CalendarEventComponent} after creation. */
362
+ event: CalendarEvent;
363
+ formattedTime: string;
364
+ private formatter;
365
+ constructor();
366
+ ngOnInit(): Promise<void>;
367
+ static ɵfac: i0.ɵɵFactoryDeclaration<CalendarEventDefaultComponent, never>;
368
+ static ɵcmp: i0.ɵɵComponentDeclaration<CalendarEventDefaultComponent, "mn-calendar-event-default", never, {}, {}, never, never, true, never>;
369
+ }
370
+
371
+ /**
372
+ * Sidebar component that lists the next 10 upcoming events
373
+ * (events whose end time is in the future), sorted by start time.
374
+ */
375
+ declare class UpcomingEventsComponent implements OnInit, OnChanges, OnDestroy {
376
+ private readonly lang;
377
+ private readonly cdr;
378
+ /**
379
+ * Accessible name for this control. Resolved through the conventional
380
+ * `mnCalendar.upcomingEvents` key so an app can translate it, falling back to English when the
381
+ * key is not defined rather than leaking the raw key into the UI.
382
+ */
383
+ get upcomingEventsLabel(): string;
384
+ /** Observable that emits the full event list whenever it changes. */
385
+ eventsChanged: Observable<CalendarEvent[]>;
386
+ /** Resolved calendar configuration passed from the parent view. */
387
+ config?: CalendarConfig;
388
+ /** Emits when an upcoming event row is clicked. */
389
+ eventClicked: EventEmitter<CalendarEvent>;
390
+ upcomingEvents: CalendarEvent[];
391
+ title: string;
392
+ noEventsMessage: string;
393
+ private destroy$;
394
+ constructor();
395
+ /** Re-read labels when the config input changes (e.g. after a locale switch). */
396
+ ngOnChanges(changes: SimpleChanges): void;
397
+ ngOnInit(): void;
398
+ ngOnDestroy(): void;
399
+ /** trackBy for upcoming event rows. */
400
+ trackByEvent(_index: number, event: CalendarEvent): string;
401
+ static ɵfac: i0.ɵɵFactoryDeclaration<UpcomingEventsComponent, never>;
402
+ static ɵcmp: i0.ɵɵComponentDeclaration<UpcomingEventsComponent, "mn-upcoming-events", never, { "eventsChanged": { "alias": "eventsChanged"; "required": false; }; "config": { "alias": "config"; "required": false; }; }, { "eventClicked": "eventClicked"; }, never, never, true, never>;
403
+ }
404
+
405
+ /**
406
+ * Renders a single row in the upcoming-events sidebar.
407
+ * Shows the event title, formatted date/time, and optional description.
408
+ */
409
+ declare class UpcomingEventRowComponent implements OnInit {
410
+ /** The event to display. */
411
+ event: CalendarEvent;
412
+ /** Emits the event when this row is clicked. */
413
+ eventClicked: EventEmitter<CalendarEvent>;
414
+ formattedDate: string;
415
+ private formatter;
416
+ constructor();
417
+ ngOnInit(): Promise<void>;
418
+ static ɵfac: i0.ɵɵFactoryDeclaration<UpcomingEventRowComponent, never>;
419
+ static ɵcmp: i0.ɵɵComponentDeclaration<UpcomingEventRowComponent, "mn-upcoming-event-row", never, { "event": { "alias": "event"; "required": false; }; }, { "eventClicked": "eventClicked"; }, never, never, true, never>;
420
+ }
421
+
422
+ /**
423
+ * How the bar arranges itself at its current width.
424
+ *
425
+ * - `inline` — the day strip and Today share one row, under the month header. The
426
+ * strip never stacks: as space runs out it shows fewer days rather than adding a
427
+ * row.
428
+ * - `compact` — too narrow even for a three-day strip, so the days give way to a
429
+ * date picker sitting beside Today, still under the month header.
430
+ *
431
+ * Resolved from the bar's own width — not the viewport — so a bar in a narrow
432
+ * sidebar lays itself out like a phone even on a wide screen.
433
+ */
434
+ type DateSelectorBarLayout = 'compact' | 'inline';
435
+ /** Represents a single day tile in the date selector. */
436
+ type DayTile = {
437
+ /** The full date object (at midnight). */
438
+ date: Date;
439
+ /** Short day name (e.g. 'ma', 'Mon'). */
440
+ dayName: string;
441
+ /** Day-of-month number. */
442
+ dayNumber: number;
443
+ /** Short month name (e.g. 'mei', 'Jun'). */
444
+ monthName: string;
445
+ /**
446
+ * Whether this tile is the first day of a month within the visible strip. The
447
+ * days either side of it move apart, so the break is visible without a label —
448
+ * the month header above the strip names both months.
449
+ */
450
+ startsNewMonth: boolean;
451
+ /** Whether this tile is the currently selected date. */
452
+ isSelected: boolean;
453
+ /** Whether this tile represents today. */
454
+ isToday: boolean;
455
+ /** Full, locale-formatted date used as the tile's accessible name. */
456
+ accessibleLabel: string;
457
+ };
458
+ /**
459
+ * Reusable, responsive date selector bar.
460
+ *
461
+ * Renders a "Today" button, a month header, previous/next arrows and a strip of
462
+ * day tiles. Selecting a tile or pressing "Today" emits the chosen day via
463
+ * {@link dateSelected}. The arrows only shift the visible days and never emit.
464
+ *
465
+ * Given room, the strip is a whole week running Monday to Sunday, so the weekday
466
+ * columns hold still as you page and no weekday appears twice. As the bar narrows
467
+ * it shows fewer days rather than adding a second row — a partial strip has no
468
+ * week to align to, so it slides to keep the selection in view instead. Narrower
469
+ * still, and the days give way to a date picker beside Today, which keeps every
470
+ * date reachable on a phone rather than leaving a strip too cramped to use.
471
+ *
472
+ * Selecting a day already on the strip leaves it exactly where it is; a selection
473
+ * from outside moves the strip to where that day is. The arrows page by whatever
474
+ * is on show, without touching the selection.
475
+ *
476
+ * The component carries no hard-coded copy: button, placeholder and assistive
477
+ * text are supplied through the label inputs, and day/month names follow
478
+ * {@link locale} (falling back to the active {@link MnLanguageService} locale).
479
+ *
480
+ * @example
481
+ * ```html
482
+ * <mn-date-selector-bar
483
+ * [selectedDate]="focusDay"
484
+ * [todayLabel]="'Today'"
485
+ * [pickDateLabel]="'Pick a date'"
486
+ * [locale]="'nl-NL'"
487
+ * (dateSelected)="onDaySelected($event)">
488
+ * </mn-date-selector-bar>
489
+ * ```
490
+ */
491
+ declare class MnDateSelectorBar implements OnInit {
492
+ /** Lucide icons the template renders. */
493
+ protected readonly icons: Record<"ChevronLeft" | "ChevronRight", _lucide_angular.LucideIconData>;
494
+ /** The currently selected date, provided by the parent. */
495
+ readonly selectedDate: i0.InputSignal<Date>;
496
+ /** Label for the "Today" button. */
497
+ readonly todayLabel: i0.InputSignal<string>;
498
+ /** Placeholder for the date picker shown in place of a too-cramped week strip. */
499
+ readonly pickDateLabel: i0.InputSignal<string>;
500
+ /** Accessible name for the previous-week arrow. */
501
+ readonly previousLabel: i0.InputSignal<string>;
502
+ /** Accessible name for the next-week arrow. */
503
+ readonly nextLabel: i0.InputSignal<string>;
504
+ /** Accessible name for the day strip as a whole. */
505
+ readonly dayStripLabel: i0.InputSignal<string>;
506
+ /**
507
+ * BCP 47 locale used to format day/month names. When empty, the active
508
+ * {@link MnLanguageService} locale is used.
509
+ */
510
+ readonly locale: i0.InputSignal<string>;
511
+ /** Emits when the user selects a new date. */
512
+ readonly dateSelected: i0.OutputEmitterRef<Date>;
513
+ /** Unique id for this instance's date picker, so several bars can coexist. */
514
+ readonly pickerId: string;
515
+ private readonly destroyRef;
516
+ private readonly injector;
517
+ private readonly host;
518
+ private readonly lang;
519
+ private readonly tileButtons;
520
+ /** The bar's own width in px, tracked so the layout follows its container. */
521
+ private readonly containerWidth;
522
+ /** Bumped whenever the active language changes so name formatting re-runs. */
523
+ private readonly localeTick;
524
+ /** How the bar is arranged at the current width. */
525
+ readonly layout: i0.Signal<DateSelectorBarLayout>;
526
+ /** Whether the day strip is shown, or the picker has taken its place. */
527
+ readonly showDayStrip: i0.Signal<boolean>;
528
+ /**
529
+ * Days in the visible strip: a full week where there's room, fewer as the bar
530
+ * narrows. The bar drops days rather than adding a second row, so it stays one
531
+ * line at every width it can.
532
+ */
533
+ readonly tileCount: i0.Signal<number>;
534
+ /** Effective locale: explicit input, else the active app locale. */
535
+ private readonly effectiveLocale;
536
+ /**
537
+ * First day of the visible strip — the week's Monday when a whole week is on
538
+ * show, otherwise whatever start keeps the selection in view.
539
+ *
540
+ * The strip holds still while the selection stays on screen; a selection
541
+ * outside it moves to where that day is. The arrows write here directly to page
542
+ * away from the selection.
543
+ */
544
+ private readonly windowStart;
545
+ /**
546
+ * Index of the tile that is currently keyboard-reachable (roving tabindex).
547
+ * Tracks the selection so Tab lands on the selected day, falling back to Monday
548
+ * when the selection has been paged out of sight.
549
+ */
550
+ private readonly focusedIndex;
551
+ /** The visible days, derived from the window start and the current selection. */
552
+ readonly dayTiles: i0.Signal<DayTile[]>;
553
+ /**
554
+ * The month the strip is currently in, spelled out for the header that titles
555
+ * the bar — so the days below are never just loose numbers. Reads as a range
556
+ * when the strip straddles two months, and carries both years when it straddles
557
+ * two of those.
558
+ */
559
+ readonly monthCaption: i0.Signal<string>;
560
+ /** The selected date formatted as YYYY-MM-DD for the date-picker input. */
561
+ readonly selectedDateString: i0.Signal<string>;
562
+ /**
563
+ * Props for the compact-layout date picker. Sized to match the Today button it
564
+ * sits beside, and filling the rest of the row so it stays an easy tap target.
565
+ */
566
+ readonly pickerProps: i0.Signal<{
567
+ id: string;
568
+ mode: "date";
569
+ placeholder: string;
570
+ size: "md";
571
+ borderRadius: "lg";
572
+ hover: boolean;
573
+ fullWidth: boolean;
574
+ }>;
575
+ ngOnInit(): void;
576
+ /** Shows the days before the visible ones, without changing the selection. */
577
+ navigatePrevious(): void;
578
+ /** Shows the days after the visible ones, without changing the selection. */
579
+ navigateNext(): void;
580
+ /** Returns to today: brings today into the strip and selects it. */
581
+ goToToday(): void;
582
+ /** Selects a date and emits it, unless it is already the selected day. */
583
+ selectDate(date: Date): void;
584
+ /**
585
+ * Handles the date-picker model change: shows the picked day's week and emits
586
+ * it (unless it is already the selected day).
587
+ * @param value The date string in YYYY-MM-DD format.
588
+ */
589
+ onDateModelChanged(value: string): void;
590
+ /** Whether the tile at `index` is the one reachable with Tab. */
591
+ isTabbable(index: number): boolean;
592
+ /** Remembers which tile last held focus, so Tab returns to it. */
593
+ onTileFocus(index: number): void;
594
+ /**
595
+ * Moves focus across the week with the arrow keys. Running off either end turns
596
+ * the page to the neighbouring week and lands on the day that continues the run,
597
+ * so the weeks read as one continuous calendar.
598
+ */
599
+ onTileKeydown(event: KeyboardEvent, index: number): void;
600
+ /** trackBy key for day tiles. */
601
+ trackByTile(_index: number, tile: DayTile): number;
602
+ /**
603
+ * Moves the strip by `pages` of whatever it is currently showing. Paging by the
604
+ * visible count is what keeps a full week Monday-aligned — seven days forward
605
+ * from a Monday is the next Monday.
606
+ */
607
+ private shiftWindow;
608
+ /** Focuses the tile at `index` once the week has rendered. */
609
+ private moveFocusTo;
610
+ /** Index of the selected day within the visible week, or -1 when off-week. */
611
+ private indexOfSelected;
612
+ /**
613
+ * Where the strip should start to show `date` among `count` days: the week's
614
+ * Monday when a whole week is on show, otherwise centred on the day, since a
615
+ * partial strip has no week to align to.
616
+ */
617
+ private anchorFor;
618
+ /**
619
+ * Returns the Monday of the week containing `date`. `getDay()` counts from
620
+ * Sunday, so the shift maps Sunday to the end of the week rather than the start.
621
+ */
622
+ private startOfWeek;
623
+ /** Whole calendar days from `from` to `to`, ignoring time of day and DST. */
624
+ private daysBetween;
625
+ /** Tracks the bar's own width so the layout responds to its container. */
626
+ private observeOwnWidth;
627
+ /** Returns a Date object for today at midnight. */
628
+ private getToday;
629
+ /** Checks whether two dates fall on the same calendar day. */
630
+ private isSameDay;
631
+ static ɵfac: i0.ɵɵFactoryDeclaration<MnDateSelectorBar, never>;
632
+ static ɵcmp: i0.ɵɵComponentDeclaration<MnDateSelectorBar, "mn-date-selector-bar", never, { "selectedDate": { "alias": "selectedDate"; "required": false; "isSignal": true; }; "todayLabel": { "alias": "todayLabel"; "required": false; "isSignal": true; }; "pickDateLabel": { "alias": "pickDateLabel"; "required": false; "isSignal": true; }; "previousLabel": { "alias": "previousLabel"; "required": false; "isSignal": true; }; "nextLabel": { "alias": "nextLabel"; "required": false; "isSignal": true; }; "dayStripLabel": { "alias": "dayStripLabel"; "required": false; "isSignal": true; }; "locale": { "alias": "locale"; "required": false; "isSignal": true; }; }, { "dateSelected": "dateSelected"; }, never, never, true, never>;
633
+ }
634
+
635
+ export { CalendarDayComponent, CalendarEventComponent, CalendarEventDefaultComponent, CalendarMonthComponent, CalendarViewComponent, CalendarWeekComponent, MnDateSelectorBar, UpcomingEventRowComponent, UpcomingEventsComponent };
636
+ export type { DateSelectorBarLayout, DayTile };