mn-angular-lib 2.0.53 → 2.0.55
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/fesm2022/mn-angular-lib-calendar.mjs +2 -6
- package/fesm2022/mn-angular-lib-calendar.mjs.map +1 -1
- package/fesm2022/mn-angular-lib-modal-core.mjs.map +1 -1
- package/fesm2022/mn-angular-lib-modal-ui.mjs +15 -3
- package/fesm2022/mn-angular-lib-modal-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/types/mn-angular-lib-calendar.d.ts +1 -1
- package/types/mn-angular-lib-modal-core.d.ts +9 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mn-angular-lib-calendar.mjs","names":[],"sources":["../../../projects/mn-angular-lib/calendar/src/mn-calendar/components/calendar-month/calendar-month.component.ts","../../../projects/mn-angular-lib/calendar/src/mn-calendar/components/calendar-month/calendar-month.component.html","../../../projects/mn-angular-lib/calendar/src/mn-calendar/components/calendar-event-default/calendar-event-default.component.ts","../../../projects/mn-angular-lib/calendar/src/mn-calendar/components/calendar-event-default/calendar-event-default.component.html","../../../projects/mn-angular-lib/calendar/src/mn-calendar/components/calendar-event/calendar-event.component.ts","../../../projects/mn-angular-lib/calendar/src/mn-calendar/components/calendar-event/calendar-event.component.html","../../../projects/mn-angular-lib/calendar/src/mn-calendar/components/calendar-week/calendar-week.component.ts","../../../projects/mn-angular-lib/calendar/src/mn-calendar/components/calendar-week/calendar-week.component.html","../../../projects/mn-angular-lib/calendar/src/mn-calendar/components/calendar-day/calendar-day.component.ts","../../../projects/mn-angular-lib/calendar/src/mn-calendar/components/calendar-day/calendar-day.component.html","../../../projects/mn-angular-lib/calendar/src/mn-calendar/components/upcoming-event-row/upcoming-event-row.component.ts","../../../projects/mn-angular-lib/calendar/src/mn-calendar/components/upcoming-event-row/upcoming-event-row.component.html","../../../projects/mn-angular-lib/calendar/src/mn-calendar/components/upcoming-events/upcoming-events.component.ts","../../../projects/mn-angular-lib/calendar/src/mn-calendar/components/upcoming-events/upcoming-events.component.html","../../../projects/mn-angular-lib/calendar/src/mn-calendar/components/calendar-view/calendar-view.component.ts","../../../projects/mn-angular-lib/calendar/src/mn-calendar/components/calendar-view/calendar-view.component.html","../../../projects/mn-angular-lib/calendar/src/mn-date-selector-bar/mn-date-selector-bar.component.ts","../../../projects/mn-angular-lib/calendar/src/mn-date-selector-bar/mn-date-selector-bar.component.html"],"sourcesContent":["import {\n ChangeDetectorRef,\n Component,\n EventEmitter,\n inject,\n Input,\n OnDestroy,\n OnInit,\n Output,\n} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { Observable, Subject, takeUntil } from 'rxjs';\nimport { CalendarEvent } from 'mn-angular-lib/calendar-core';\nimport {\n CalendarConfig,\n DEFAULT_CALENDAR_CONFIG,\n MonthItem,\n resolveCalendarConfig,\n} from 'mn-angular-lib/calendar-core';\nimport { CalendarDateFormatter } from 'mn-angular-lib/calendar-core';\nimport { DefaultCalendarDateFormatter } from 'mn-angular-lib/calendar-core';\nimport { MnLanguageService } from 'mn-angular-lib/core';\n\n/**\n * Month grid view showing a 7×6 grid of day cells.\n *\n * Each cell displays the day number and up to 3 coloured dots representing\n * events on that day. Clicking a cell emits `dayClicked`.\n */\n@Component({\n selector: 'mn-calendar-month',\n standalone: true,\n imports: [CommonModule],\n templateUrl: './calendar-month.component.html',\n})\nexport class CalendarMonthComponent implements OnInit, OnDestroy {\n private readonly lang = inject(MnLanguageService);\n private readonly cdr = inject(ChangeDetectorRef);\n\n /**\n * Accessible name for this control. Resolved through the conventional\n * `mnCalendar.monthView` key so an app can translate it, falling back to English when the\n * key is not defined rather than leaking the raw key into the UI.\n */\n get monthViewLabel(): string {\n return this.lang.translateIfPresent('mnCalendar.monthView') ?? 'Month view';\n }\n\n /** The date whose month is displayed. */\n @Input() focusDay!: Date;\n /** Observable that emits the full event list whenever it changes. */\n @Input() eventsChanged!: Observable<CalendarEvent[]>;\n /** Observable that emits when the focus day changes. */\n @Input() focusDayChanged!: Observable<Date>;\n /** Resolved calendar configuration passed from the parent view. */\n @Input() config?: CalendarConfig;\n /** Emits the date of a clicked day cell. */\n @Output() dayClicked = new EventEmitter<Date>();\n\n monthItems: MonthItem[] = [];\n /** Short weekday column headers (e.g. \"Mon\"), kept compact for the narrow columns. */\n weekdayLabels: string[];\n /** Word shown after the \"+N\" overflow count (e.g. \"more\"), from config. */\n moreEventsLabel = DEFAULT_CALENDAR_CONFIG.moreEventsLabel;\n\n private events: CalendarEvent[] = [];\n private destroy$ = new Subject<void>();\n private formatter: CalendarDateFormatter;\n\n constructor() {\n this.formatter = new DefaultCalendarDateFormatter();\n this.weekdayLabels = DEFAULT_CALENDAR_CONFIG.shortDayNames;\n }\n\n ngOnInit() {\n const resolved = this.config\n ? resolveCalendarConfig(this.config)\n : { ...DEFAULT_CALENDAR_CONFIG };\n this.weekdayLabels = resolved.shortDayNames;\n this.moreEventsLabel = resolved.moreEventsLabel;\n this.buildMonth();\n\n // Both subscriptions mark the view: the grid is rebuilt into plain fields, so in a zoneless\n // app nothing else tells Angular this component has to be re-rendered. Without it a month\n // whose events arrive from a stream — a fetch, a parent seeding its list — stays blank until\n // some unrelated interaction happens to trigger change detection.\n if (this.eventsChanged) {\n this.eventsChanged.pipe(takeUntil(this.destroy$)).subscribe((events) => {\n this.events = events;\n this.buildMonth();\n this.cdr.markForCheck();\n });\n }\n\n if (this.focusDayChanged) {\n this.focusDayChanged.pipe(takeUntil(this.destroy$)).subscribe((date) => {\n this.focusDay = date;\n this.buildMonth();\n this.cdr.markForCheck();\n });\n }\n }\n\n ngOnDestroy() {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n /** Emits the clicked day's date. */\n onDayClick(date: Date) {\n this.dayClicked.emit(date);\n }\n\n /** trackBy for day name headers. */\n trackByDayName(index: number): number {\n return index;\n }\n\n /** trackBy for month grid cells. */\n trackByMonthItem(_index: number, item: MonthItem): number {\n return item.date.getTime();\n }\n\n /** trackBy for event dots. */\n trackByEventDot(_index: number, event: CalendarEvent): string {\n return event.id;\n }\n\n /** Builds the 42-cell month grid (6 rows × 7 columns). */\n private buildMonth() {\n if (!this.focusDay) return;\n\n const year = this.focusDay.getFullYear();\n const month = this.focusDay.getMonth();\n const firstDay = new Date(year, month, 1);\n const lastDay = new Date(year, month + 1, 0);\n\n let startOffset = firstDay.getDay() - 1;\n if (startOffset < 0) startOffset = 6;\n\n const today = new Date();\n this.monthItems = [];\n\n for (let i = startOffset - 1; i >= 0; i--) {\n const date = new Date(year, month, -i);\n this.monthItems.push(this.createMonthItem(date, false, today));\n }\n\n for (let d = 1; d <= lastDay.getDate(); d++) {\n const date = new Date(year, month, d);\n this.monthItems.push(this.createMonthItem(date, true, today));\n }\n\n const remaining = 42 - this.monthItems.length;\n for (let i = 1; i <= remaining; i++) {\n const date = new Date(year, month + 1, i);\n this.monthItems.push(this.createMonthItem(date, false, today));\n }\n }\n\n private createMonthItem(date: Date, isCurrentMonth: boolean, today: Date): MonthItem {\n const isToday = this.formatter.isSameDay(date, today);\n const dayEvents = this.events.filter(\n (e) =>\n this.formatter.isSameDay(e.startTime, date) ||\n this.formatter.isSameDay(e.endTime, date) ||\n (e.startTime < date && e.endTime > date),\n );\n\n return {\n date,\n dayNumber: date.getDate(),\n isCurrentMonth,\n isToday,\n events: dayEvents,\n };\n }\n}\n","<!-- Month grid. Cells are grouped by space rather than boxed by borders, in\n keeping with the date-selector-bar: no rules, soft rounded cells, a hover\n wash, and today marked by a tinted number alone (no circle). -->\n<!-- Rows are a compact fixed height rather than stretched to fill the container:\n a month with few events shouldn't leave each cell mostly empty. The panel\n scrolls if the grid is taller than the space it's given. -->\n<div [attr.aria-label]=\"monthViewLabel\" class=\"w-full flex flex-col\" role=\"grid\">\n <div class=\"grid grid-cols-7 pb-2\">\n @for (day of weekdayLabels; track day) {\n <div class=\"pl-2 text-left text-[11px] font-semibold uppercase tracking-wide opacity-45\" role=\"columnheader\">{{ day }}</div>\n }\n </div>\n <div class=\"grid grid-cols-7 gap-1 auto-rows-[minmax(92px,auto)]\">\n @for (item of monthItems; track item.date.getTime()) {\n <div\n class=\"flex flex-col gap-1 min-h-0 overflow-hidden rounded-xl p-1.5 cursor-pointer transition-colors hover:bg-base-200 focus-visible:outline-2 focus-visible:outline-offset-[-2px] focus-visible:outline-primary motion-reduce:transition-none\"\n [class.opacity-40]=\"!item.isCurrentMonth\"\n (keyup.enter)=\"onDayClick(item.date)\"\n (click)=\"onDayClick(item.date)\"\n tabindex=\"0\"\n role=\"gridcell\"\n [attr.aria-label]=\"item.date.toDateString()\">\n <span class=\"text-[13px] font-bold leading-none tabular-nums\" [class.text-primary]=\"item.isToday\">{{ item.dayNumber }}</span>\n <div class=\"flex flex-col gap-0.5 min-h-0\">\n @for (event of item.events.slice(0, 3); track $index) {\n <div\n class=\"flex items-center overflow-hidden rounded-md border-l-[3px] px-1.5 py-0.5 text-[11px] leading-tight\"\n [style.background-color]=\"'color-mix(in oklab, ' + event.color.primaryColor + ' 18%, var(--color-base-100, #fff))'\"\n [style.border-left-color]=\"event.color.primaryColor\"\n [style.color]=\"'color-mix(in oklab, ' + event.color.primaryColor + ' 30%, var(--color-base-content, #000))'\"\n [title]=\"event.title\">\n <span class=\"truncate font-semibold\">{{ event.title }}</span>\n </div>\n }\n <!-- Overflow indicator. Styled as a pill that lights up on hover so it\n reads as actionable; the whole cell already navigates to the Day\n view for this date on click / Enter, where every event is listed. -->\n @if (item.events.length > 3) {\n <span class=\"mt-0.5 inline-flex w-fit items-center rounded-md px-1.5 py-0.5 text-[10.5px] font-semibold opacity-60 transition-colors hover:bg-base-300 hover:opacity-100 motion-reduce:transition-none\">\n +{{ item.events.length - 3 }} {{ moreEventsLabel }}\n </span>\n }\n </div>\n </div>\n }\n </div>\n</div>\n","import {\n ChangeDetectorRef,\n Component,\n OnInit,\n inject,\n} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { CalendarEventData } from 'mn-angular-lib/calendar-core';\nimport { CalendarEvent } from 'mn-angular-lib/calendar-core';\nimport { CALENDAR_DATE_FORMATTER, CalendarDateFormatter } from 'mn-angular-lib/calendar-core';\nimport { DefaultCalendarDateFormatter } from 'mn-angular-lib/calendar-core';\n\n/**\n * Default event renderer used when no custom component is provided.\n *\n * Displays the event title, formatted time range, and optional description\n * with the event's colour scheme applied as background and left-border accent.\n */\n@Component({\n selector: 'mn-calendar-event-default',\n standalone: true,\n imports: [CommonModule],\n templateUrl: './calendar-event-default.component.html',\n})\nexport class CalendarEventDefaultComponent implements CalendarEventData, OnInit {\n private cdr = inject(ChangeDetectorRef);\n\n /** The event to render. Set by {@link CalendarEventComponent} after creation. */\n event!: CalendarEvent;\n formattedTime = '';\n\n private formatter: CalendarDateFormatter;\n\n constructor() {\n const formatter = inject<CalendarDateFormatter | null>(CALENDAR_DATE_FORMATTER, {\n optional: true,\n });\n\n this.formatter = formatter ?? new DefaultCalendarDateFormatter();\n }\n\n async ngOnInit() {\n if (this.event) {\n const start = await this.formatter.formatTime(this.event.startTime);\n const end = await this.formatter.formatTime(this.event.endTime);\n this.formattedTime = `${start} - ${end}`;\n this.cdr.markForCheck();\n }\n }\n}\n","<!-- The shared event chip: a colored spine and a tinted fill from the event's own\n colours, so it reads the same in week, day and month. Text mixes a little of\n the event's primary colour into the theme's base-content, so it stays AA-legible on either theme. The fill mixes that\n colour into the page surface, so it darkens with a dark theme instead of staying\n a light pastel. -->\n<div class=\"h-full overflow-hidden cursor-pointer rounded-lg border-l-[3px] px-2 py-1 text-xs\"\n [style.background-color]=\"'color-mix(in oklab, ' + event.color.primaryColor + ' 18%, var(--color-base-100, #fff))'\"\n [style.border-left-color]=\"event.color.primaryColor\"\n [style.color]=\"'color-mix(in oklab, ' + event.color.primaryColor + ' 30%, var(--color-base-content, #000))'\">\n <div class=\"truncate font-semibold\">{{ event.title }}</div>\n <div class=\"truncate text-[11px] opacity-85\">{{ formattedTime }}</div>\n @if (event.description) {\n <div class=\"truncate text-[11px] opacity-75\">{{ event.description }}</div>\n }\n</div>\n","import {\n Component,\n Input,\n Output,\n EventEmitter,\n ViewChild,\n ViewContainerRef,\n AfterViewInit,\n Type,\n OnChanges,\n SimpleChanges,\n} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { CalendarEvent } from 'mn-angular-lib/calendar-core';\nimport { CalendarEventData } from 'mn-angular-lib/calendar-core';\nimport { CalendarEventDefaultComponent } from '../calendar-event-default/calendar-event-default.component';\n\n/**\n * Dynamic event renderer that injects a custom or default event component\n * into its view container.\n *\n * The component to render is resolved in this order:\n * 1. `customComponent` input (set on the parent week/day view)\n * 2. `event.component` (per-event override)\n * 3. {@link CalendarEventDefaultComponent} (library default)\n */\n@Component({\n selector: 'mn-calendar-event',\n standalone: true,\n imports: [CommonModule],\n templateUrl: './calendar-event.component.html',\n})\nexport class CalendarEventComponent implements AfterViewInit, OnChanges {\n /** The event data to render. */\n @Input() event!: CalendarEvent;\n /** Optional custom component type that overrides the default renderer. */\n @Input() customComponent?: Type<CalendarEventData>;\n /** Emits when the rendered event is clicked. */\n @Output() eventClicked = new EventEmitter<CalendarEvent>();\n\n @ViewChild('eventContainer', { read: ViewContainerRef, static: true })\n eventContainer!: ViewContainerRef;\n\n private rendered = false;\n\n ngAfterViewInit() {\n this.renderComponent();\n }\n\n ngOnChanges(changes: SimpleChanges) {\n if (this.rendered && (changes['event'] || changes['customComponent'])) {\n this.renderComponent();\n }\n }\n\n /** Emits the event click. */\n onEventClick() {\n this.eventClicked.emit(this.event);\n }\n\n /** Creates the event component dynamically and sets its `event` property. */\n private renderComponent() {\n if (!this.eventContainer) return;\n this.eventContainer.clear();\n const component =\n this.customComponent ?? this.event?.component ?? CalendarEventDefaultComponent;\n const ref = this.eventContainer.createComponent(component);\n (ref.instance as CalendarEventData).event = this.event;\n ref.changeDetectorRef.detectChanges();\n this.rendered = true;\n }\n}\n","<!-- Host for the dynamically-rendered event component. Click/keyboard handling and\n the focus ring live on the week/day event wrapper, so this stays presentational\n to avoid a second, redundant tab stop per event. -->\n<div class=\"h-full w-full\">\n <ng-template #eventContainer></ng-template>\n</div>\n","import {\n ChangeDetectorRef,\n Component,\n EventEmitter,\n inject,\n Input,\n OnDestroy,\n OnInit,\n Output,\n Type,\n} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { Observable, Subject, takeUntil } from 'rxjs';\nimport { CalendarEvent } from 'mn-angular-lib/calendar-core';\nimport { CalendarEventData } from 'mn-angular-lib/calendar-core';\nimport {\n CalendarConfig,\n ColumnDay,\n DEFAULT_CALENDAR_CONFIG,\n HourRow,\n resolveCalendarConfig,\n} from 'mn-angular-lib/calendar-core';\nimport { CalendarDateFormatter } from 'mn-angular-lib/calendar-core';\nimport { DefaultCalendarDateFormatter } from 'mn-angular-lib/calendar-core';\nimport { CalendarEventLayoutService } from 'mn-angular-lib/calendar-core';\nimport { CalendarUtility } from 'mn-angular-lib/calendar-core';\nimport { CalendarEventComponent } from '../calendar-event/calendar-event.component';\nimport { MnLanguageService } from 'mn-angular-lib/core';\n\n/** Extended hour row with a pre-resolved display label. */\ntype DisplayHourRow = {\n hourLabel: string;\n} & HourRow;\n\n/**\n * Week grid view showing 7 day columns with half-hour time slots.\n *\n * Overlapping events within the same day are laid out in sub-columns\n * so they appear side-by-side rather than stacked.\n */\n@Component({\n selector: 'mn-calendar-week',\n standalone: true,\n imports: [CommonModule, CalendarEventComponent],\n templateUrl: './calendar-week.component.html',\n providers: [CalendarEventLayoutService],\n})\nexport class CalendarWeekComponent implements OnInit, OnDestroy {\n private readonly lang = inject(MnLanguageService);\n\n /**\n * Accessible name for this control. Resolved through the conventional\n * `mnCalendar.weekView` key so an app can translate it, falling back to English when the\n * key is not defined rather than leaking the raw key into the UI.\n */\n get weekViewLabel(): string {\n return this.lang.translateIfPresent('mnCalendar.weekView') ?? 'Week view';\n }\n\n private layoutService = inject(CalendarEventLayoutService);\n private cdr = inject(ChangeDetectorRef);\n\n /** The date around which the week is centred. */\n @Input() focusDay!: Date;\n /** Observable that emits the full event list whenever it changes. */\n @Input() eventsChanged!: Observable<CalendarEvent[]>;\n /** Observable that emits when the focus day changes. */\n @Input() focusDayChanged!: Observable<Date>;\n /** Resolved calendar configuration passed from the parent view. */\n @Input() config?: CalendarConfig;\n /** Optional custom event renderer component. */\n @Input() calendarEventComponent?: Type<CalendarEventData>;\n /** Emits when a calendar event is clicked. */\n @Output() eventClicked = new EventEmitter<CalendarEvent>();\n\n columns: ColumnDay[] = [];\n hourRows: DisplayHourRow[] = [];\n displayEvents: CalendarEvent[] = [];\n totalRows = 0;\n currentTimeRow = 0;\n currentTimeCol = '';\n /** The current time, formatted for the label riding the now-line. */\n currentTimeLabel = '';\n gridTemplateColumns = 'repeat(7, 1fr)';\n\n private dayColumnMap: { subColumns: number; startCol: number }[] = [];\n private events: CalendarEvent[] = [];\n private destroy$ = new Subject<void>();\n private formatter: CalendarDateFormatter;\n private resolvedConfig!: CalendarConfig;\n private currentTimeInterval?: ReturnType<typeof setInterval>;\n\n constructor() {\n this.formatter = new DefaultCalendarDateFormatter();\n }\n\n ngOnInit() {\n this.resolvedConfig = this.config\n ? resolveCalendarConfig(this.config)\n : { ...DEFAULT_CALENDAR_CONFIG };\n this.buildColumns();\n this.updateCurrentTime();\n this.currentTimeInterval = setInterval(() => this.updateCurrentTime(), 60000);\n\n if (this.eventsChanged) {\n this.eventsChanged.pipe(takeUntil(this.destroy$)).subscribe((events) => {\n this.events = events;\n this.refreshEvents();\n this.cdr.markForCheck();\n });\n }\n\n if (this.focusDayChanged) {\n this.focusDayChanged.pipe(takeUntil(this.destroy$)).subscribe((date) => {\n this.focusDay = date;\n this.buildColumns();\n this.refreshEvents();\n this.updateCurrentTime();\n this.cdr.markForCheck();\n });\n }\n\n // Build hour rows asynchronously (formatTimeI returns a Promise).\n this.buildHourRows().then(() => this.cdr.markForCheck());\n }\n\n ngOnDestroy() {\n this.destroy$.next();\n this.destroy$.complete();\n if (this.currentTimeInterval) clearInterval(this.currentTimeInterval);\n }\n\n /** Returns the CSS `grid-row` value for an event based on its start/end times. */\n getEventRow(event: CalendarEvent): string {\n const startRow = CalendarUtility.getCorrectRow(\n event.startTime.getHours(),\n event.startTime.getMinutes(),\n this.resolvedConfig.startHour,\n );\n const endRow = CalendarUtility.getCorrectRow(\n event.endTime.getHours(),\n event.endTime.getMinutes(),\n this.resolvedConfig.startHour,\n );\n return `${startRow} / ${Math.max(endRow, startRow + 1)}`;\n }\n\n /** Returns the CSS `grid-column` span for a day header, accounting for sub-columns. */\n getHeaderColumn(dayIndex: number): string {\n if (!this.dayColumnMap.length) return `${dayIndex + 2} / span 1`;\n const dayInfo = this.dayColumnMap[dayIndex];\n return `${dayInfo.startCol + 1} / span ${dayInfo.subColumns}`;\n }\n\n /** Returns the CSS `grid-column` value for an event within its day's sub-columns. */\n getEventColumn(event: CalendarEvent): string {\n const dayIdx = this.columns.findIndex((c) => this.formatter.isSameDay(c.date, event.startTime));\n if (dayIdx < 0) return '1 / span 1';\n const dayInfo = this.dayColumnMap[dayIdx];\n const subCol = (event.column ?? 0) + dayInfo.startCol;\n const width = event.width ?? 1;\n return `${subCol} / span ${width}`;\n }\n\n /** Forwards event click to parent. */\n onEventClick(event: CalendarEvent) {\n this.eventClicked.emit(event);\n }\n\n /** trackBy for hour rows. */\n trackByHour(_index: number, row: DisplayHourRow): number {\n return row.hour;\n }\n\n /** trackBy for day columns. */\n trackByColumn(_index: number, col: ColumnDay): number {\n return col.date.getTime();\n }\n\n /** trackBy for events. */\n trackByEvent(_index: number, event: CalendarEvent): string {\n return event.id;\n }\n\n private async buildHourRows() {\n const hours = this.resolvedConfig.endHour - this.resolvedConfig.startHour;\n this.totalRows = hours * 2;\n\n const rows: DisplayHourRow[] = [];\n for (let i = 0; i < hours; i++) {\n const hour = this.resolvedConfig.startHour + i;\n const label = await this.formatter.formatTimeI(hour, 0);\n rows.push({\n hour,\n topRow: i * 2 + 1,\n bottomRow: i * 2 + 3,\n hourLabel: label,\n });\n }\n this.hourRows = rows;\n }\n\n /** Builds the 7 day columns for the current week (Monday–Sunday). */\n private buildColumns() {\n if (!this.focusDay) return;\n\n const shortNames = this.resolvedConfig.shortDayNames;\n const today = new Date();\n\n const day = this.focusDay.getDay();\n const mondayOffset = day === 0 ? -6 : 1 - day;\n const monday = new Date(this.focusDay);\n monday.setDate(this.focusDay.getDate() + mondayOffset);\n\n this.columns = [];\n for (let i = 0; i < 7; i++) {\n const date = new Date(monday);\n date.setDate(monday.getDate() + i);\n this.columns.push({\n date,\n dayName: shortNames[i],\n dayNumber: date.getDate(),\n isToday: this.formatter.isSameDay(date, today),\n });\n }\n }\n\n /** Filters, splits, and lays out events for the current week. */\n private refreshEvents() {\n if (!this.columns.length) return;\n\n const rangeStart = this.columns[0].date;\n const rangeEnd = new Date(this.columns[6].date);\n rangeEnd.setHours(23, 59, 59, 999);\n\n const filtered = this.events.filter((e) =>\n this.layoutService.eventsOverlap(e.startTime, e.endTime, rangeStart, rangeEnd),\n );\n\n this.displayEvents = this.layoutService.calculateMultiDayEvents(\n filtered,\n this.resolvedConfig.startHour,\n this.resolvedConfig.endHour,\n rangeStart,\n rangeEnd,\n );\n\n // Assign columns per day so overlapping events within a day get sub-columns\n for (let i = 0; i < 7; i++) {\n const dayStart = new Date(this.columns[i].date);\n dayStart.setHours(0, 0, 0, 0);\n const dayEnd = new Date(this.columns[i].date);\n dayEnd.setHours(23, 59, 59, 999);\n\n const dayEvents = this.displayEvents.filter((e) =>\n this.formatter.isSameDay(e.startTime, this.columns[i].date),\n );\n\n this.layoutService.assignColumnsToEvents(dayEvents);\n this.layoutService.assignWidthsToEvents(dayEvents, dayStart, dayEnd);\n }\n\n this.buildGridColumns();\n this.updateCurrentTime();\n }\n\n /** Computes the CSS grid-template-columns string based on per-day sub-column counts. */\n private buildGridColumns() {\n this.dayColumnMap = [];\n let currentCol = 1;\n\n for (let i = 0; i < 7; i++) {\n const dayEvents = this.displayEvents.filter((e) =>\n this.formatter.isSameDay(e.startTime, this.columns[i].date),\n );\n\n let maxSubCols = 1;\n for (const e of dayEvents) {\n maxSubCols = Math.max(maxSubCols, (e.column ?? 0) + (e.width ?? 1));\n }\n\n this.dayColumnMap.push({ subColumns: maxSubCols, startCol: currentCol });\n currentCol += maxSubCols;\n }\n\n // Each overlap column gets at least 0.8 of a day: a day with two overlapping events grows\n // to 1.6 days instead of splitting one day in two, which left ~40px blocks reading \"V…\".\n const parts: string[] = [];\n for (const day of this.dayColumnMap) {\n const share = Math.max(1 / day.subColumns, 0.8);\n for (let j = 0; j < day.subColumns; j++) {\n parts.push(`${share}fr`);\n }\n }\n this.gridTemplateColumns = parts.join(' ');\n }\n\n /** Updates the current-time red line position. */\n private updateCurrentTime() {\n const now = new Date();\n const dayIdx = this.columns.findIndex((c) => this.formatter.isSameDay(c.date, now));\n if (dayIdx >= 0 && this.dayColumnMap.length > 0) {\n const dayInfo = this.dayColumnMap[dayIdx];\n this.currentTimeCol = `${dayInfo.startCol} / span ${dayInfo.subColumns}`;\n // Hide when outside the visible hours — getCorrectRow would clamp onto row 1 (l2tTCjLe).\n this.currentTimeRow = CalendarUtility.getCurrentTimeRow(\n now.getHours(),\n now.getMinutes(),\n this.resolvedConfig.startHour,\n this.resolvedConfig.endHour,\n );\n // formatTime is async; refresh the label and re-render when it resolves.\n this.formatter.formatTime(now).then((label) => {\n this.currentTimeLabel = label;\n this.cdr.markForCheck();\n });\n } else {\n this.currentTimeCol = '';\n this.currentTimeRow = 0;\n this.currentTimeLabel = '';\n }\n // See calendar-day: the setInterval tick marks nothing by itself.\n this.cdr.markForCheck();\n }\n}\n","<!-- Week grid. Hour rules are quiet hairlines; today's column header is a tinted\n number (no fill); the current time is a line carrying a small time bubble.\n Dynamic row/column placement stays inline — the layout maths lives in TS. -->\n<div [attr.aria-label]=\"weekViewLabel\" class=\"w-full h-full flex flex-col overflow-hidden\" role=\"grid\">\n <div class=\"grid\" [style.grid-template-columns]=\"'60px ' + gridTemplateColumns\">\n <div></div>\n @for (col of columns; track col.dayName; let i = $index) {\n <div class=\"py-2 px-1 text-center\"\n [style.grid-column]=\"getHeaderColumn(i)\"\n role=\"columnheader\">\n <span class=\"block text-[11px] font-semibold uppercase tracking-wide opacity-50\">{{ col.dayName }}</span>\n <span class=\"text-lg font-bold tabular-nums\" [class.text-primary]=\"col.isToday\">{{ col.dayNumber }}</span>\n </div>\n }\n </div>\n <div class=\"grid grid-cols-[60px_1fr] flex-1 min-h-0 overflow-hidden items-stretch\">\n <div class=\"grid h-full min-h-0\" [style.grid-template-rows]=\"'repeat(' + totalRows + ', minmax(1.5rem, 1fr))'\">\n @for (row of hourRows; track row.topRow) {\n <div class=\"flex items-start justify-end min-h-0 overflow-hidden pr-2 text-[11px] tabular-nums opacity-50\"\n [style.grid-row]=\"row.topRow + '/' + row.bottomRow\">\n {{ row.hourLabel }}\n </div>\n }\n </div>\n <div class=\"grid relative auto-rows-fr h-full min-h-0\"\n [style.grid-template-rows]=\"'repeat(' + totalRows + ', minmax(1.5rem, 1fr))'\"\n [style.grid-template-columns]=\"gridTemplateColumns\">\n @for (row of hourRows; track row.topRow) {\n <div class=\"border-t border-base-200 pointer-events-none min-h-0\"\n [style.grid-row]=\"row.topRow + '/' + row.bottomRow\"\n [style.grid-column]=\"'1 / -1'\">\n </div>\n }\n @if (currentTimeRow > 0 && currentTimeCol) {\n <div class=\"relative z-[2] pointer-events-none\"\n [style.grid-row]=\"currentTimeRow\"\n [style.grid-column]=\"currentTimeCol\">\n <div class=\"absolute -left-1 -top-1 h-2 w-2 rounded-full bg-error\"></div>\n <div class=\"h-0.5 w-full bg-error\"></div>\n <div class=\"absolute left-0 top-0 -translate-x-2 -translate-y-1/2 rounded-full bg-error px-1.5 py-0.5 text-[10px] font-bold tabular-nums text-error-content shadow\">{{ currentTimeLabel }}</div>\n </div>\n }\n @for (event of displayEvents; track $index) {\n <div class=\"z-[1] min-h-0 overflow-hidden rounded-lg p-0.5 focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-primary\"\n [style.grid-row]=\"getEventRow(event)\"\n [style.grid-column]=\"getEventColumn(event)\"\n (click)=\"onEventClick(event)\"\n (keyup.enter)=\"onEventClick(event)\"\n tabindex=\"0\">\n <mn-calendar-event [customComponent]=\"calendarEventComponent\" [event]=\"event\"></mn-calendar-event>\n </div>\n }\n </div>\n </div>\n</div>\n","import {\n ChangeDetectorRef,\n Component,\n EventEmitter,\n inject,\n Input,\n OnDestroy,\n OnInit,\n Output,\n Type,\n} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { Observable, Subject, takeUntil } from 'rxjs';\nimport { CalendarEvent } from 'mn-angular-lib/calendar-core';\nimport { CalendarEventData } from 'mn-angular-lib/calendar-core';\nimport {\n CalendarConfig,\n DEFAULT_CALENDAR_CONFIG,\n HourRow,\n resolveCalendarConfig,\n} from 'mn-angular-lib/calendar-core';\nimport { CalendarDateFormatter } from 'mn-angular-lib/calendar-core';\nimport { DefaultCalendarDateFormatter } from 'mn-angular-lib/calendar-core';\nimport { CalendarEventLayoutService } from 'mn-angular-lib/calendar-core';\nimport { CalendarUtility } from 'mn-angular-lib/calendar-core';\nimport { CalendarEventComponent } from '../calendar-event/calendar-event.component';\nimport { MnLanguageService } from 'mn-angular-lib/core';\n\n/** Extended hour row with a pre-resolved display label. */\ntype DisplayHourRow = {\n hourLabel: string;\n} & HourRow;\n\n/**\n * Day grid view showing a single day with half-hour time slots.\n *\n * Shares the same layout algorithm as the week view via\n * {@link CalendarEventLayoutService}.\n */\n@Component({\n selector: 'mn-calendar-day',\n standalone: true,\n imports: [CommonModule, CalendarEventComponent],\n templateUrl: './calendar-day.component.html',\n providers: [CalendarEventLayoutService],\n})\nexport class CalendarDayComponent implements OnInit, OnDestroy {\n private readonly lang = inject(MnLanguageService);\n\n /**\n * Accessible name for this control. Resolved through the conventional\n * `mnCalendar.dayView` key so an app can translate it, falling back to English when the\n * key is not defined rather than leaking the raw key into the UI.\n */\n get dayViewLabel(): string {\n return this.lang.translateIfPresent('mnCalendar.dayView') ?? 'Day view';\n }\n\n private layoutService = inject(CalendarEventLayoutService);\n private cdr = inject(ChangeDetectorRef);\n\n /** The date to display. */\n @Input() focusDay!: Date;\n /** Observable that emits the full event list whenever it changes. */\n @Input() eventsChanged!: Observable<CalendarEvent[]>;\n /** Observable that emits when the focus day changes. */\n @Input() focusDayChanged!: Observable<Date>;\n /** Resolved calendar configuration passed from the parent view. */\n @Input() config?: CalendarConfig;\n /** Optional custom event renderer component. */\n @Input() calendarEventComponent?: Type<CalendarEventData>;\n /** Emits when a calendar event is clicked. */\n @Output() eventClicked = new EventEmitter<CalendarEvent>();\n\n hourRows: DisplayHourRow[] = [];\n displayEvents: CalendarEvent[] = [];\n totalRows = 0;\n totalColumns = 1;\n currentTimeRow = 0;\n /** The current time, formatted for the label riding the now-line. */\n currentTimeLabel = '';\n isToday = false;\n dayName = '';\n\n private events: CalendarEvent[] = [];\n private destroy$ = new Subject<void>();\n private formatter: CalendarDateFormatter;\n private resolvedConfig!: CalendarConfig;\n private currentTimeInterval?: ReturnType<typeof setInterval>;\n\n constructor() {\n this.formatter = new DefaultCalendarDateFormatter();\n }\n\n ngOnInit() {\n this.resolvedConfig = this.config\n ? resolveCalendarConfig(this.config)\n : { ...DEFAULT_CALENDAR_CONFIG };\n this.updateDayInfo();\n this.updateCurrentTime();\n this.currentTimeInterval = setInterval(() => this.updateCurrentTime(), 60000);\n\n if (this.eventsChanged) {\n this.eventsChanged.pipe(takeUntil(this.destroy$)).subscribe((events) => {\n this.events = events;\n this.refreshEvents();\n this.cdr.markForCheck();\n });\n }\n\n if (this.focusDayChanged) {\n this.focusDayChanged.pipe(takeUntil(this.destroy$)).subscribe((date) => {\n this.focusDay = date;\n this.updateDayInfo();\n this.refreshEvents();\n this.updateCurrentTime();\n this.cdr.markForCheck();\n });\n }\n\n // Build hour rows asynchronously (formatTimeI returns a Promise).\n this.buildHourRows().then(() => this.cdr.markForCheck());\n }\n\n ngOnDestroy() {\n this.destroy$.next();\n this.destroy$.complete();\n if (this.currentTimeInterval) clearInterval(this.currentTimeInterval);\n }\n\n /** Returns the CSS `grid-row` value for an event. */\n getEventRow(event: CalendarEvent): string {\n const startRow = CalendarUtility.getCorrectRow(\n event.startTime.getHours(),\n event.startTime.getMinutes(),\n this.resolvedConfig.startHour,\n );\n const endRow = CalendarUtility.getCorrectRow(\n event.endTime.getHours(),\n event.endTime.getMinutes(),\n this.resolvedConfig.startHour,\n );\n return `${startRow} / ${Math.max(endRow, startRow + 1)}`;\n }\n\n /** Returns the CSS `grid-column` value for an event within its sub-columns. */\n getEventColumn(event: CalendarEvent): string {\n const col = (event.column ?? 0) + 1;\n const width = event.width ?? 1;\n return `${col} / span ${width}`;\n }\n\n /** Forwards event click to parent. */\n onEventClick(event: CalendarEvent) {\n this.eventClicked.emit(event);\n }\n\n /** trackBy for hour rows. */\n trackByHour(_index: number, row: DisplayHourRow): number {\n return row.hour;\n }\n\n /** trackBy for events. */\n trackByEvent(_index: number, event: CalendarEvent): string {\n return event.id;\n }\n\n private async buildHourRows() {\n const hours = this.resolvedConfig.endHour - this.resolvedConfig.startHour;\n this.totalRows = hours * 2;\n\n const rows: DisplayHourRow[] = [];\n for (let i = 0; i < hours; i++) {\n const hour = this.resolvedConfig.startHour + i;\n const label = await this.formatter.formatTimeI(hour, 0);\n rows.push({\n hour,\n topRow: i * 2 + 1,\n bottomRow: i * 2 + 3,\n hourLabel: label,\n });\n }\n this.hourRows = rows;\n }\n\n /** Updates the day name and isToday flag. */\n private updateDayInfo() {\n if (!this.focusDay) return;\n const today = new Date();\n this.isToday = this.formatter.isSameDay(this.focusDay, today);\n const longNames = this.resolvedConfig.longDayNames;\n const dayIdx = this.focusDay.getDay();\n const mondayIdx = dayIdx === 0 ? 6 : dayIdx - 1;\n this.dayName = longNames[mondayIdx];\n }\n\n /** Filters, splits, and lays out events for the focus day. */\n private refreshEvents() {\n if (!this.focusDay) return;\n\n const rangeStart = new Date(this.focusDay);\n rangeStart.setHours(0, 0, 0, 0);\n const rangeEnd = new Date(this.focusDay);\n rangeEnd.setHours(23, 59, 59, 999);\n\n const filtered = this.events.filter((e) =>\n this.layoutService.eventsOverlap(e.startTime, e.endTime, rangeStart, rangeEnd),\n );\n\n this.displayEvents = this.layoutService.calculateMultiDayEvents(\n filtered,\n this.resolvedConfig.startHour,\n this.resolvedConfig.endHour,\n rangeStart,\n rangeEnd,\n );\n\n this.layoutService.assignColumnsToEvents(this.displayEvents);\n this.layoutService.assignWidthsToEvents(this.displayEvents, rangeStart, rangeEnd);\n\n this.totalColumns = this.displayEvents.reduce(\n (max, e) => Math.max(max, (e.column ?? 0) + (e.width ?? 1)),\n 1,\n );\n }\n\n /** Updates the current-time red line position. */\n private updateCurrentTime() {\n const now = new Date();\n if (this.focusDay && this.formatter.isSameDay(this.focusDay, now)) {\n // Hide when outside the visible hours — getCorrectRow would clamp onto row 1 (l2tTCjLe).\n this.currentTimeRow = CalendarUtility.getCurrentTimeRow(\n now.getHours(),\n now.getMinutes(),\n this.resolvedConfig.startHour,\n this.resolvedConfig.endHour,\n );\n this.isToday = true;\n // formatTime is async; refresh the label and re-render when it resolves.\n this.formatter.formatTime(now).then((label) => {\n this.currentTimeLabel = label;\n this.cdr.markForCheck();\n });\n } else {\n this.currentTimeRow = 0;\n this.isToday = false;\n this.currentTimeLabel = '';\n }\n // The minute tick is a bare setInterval, so neither branch is reached through anything\n // Angular wraps. Only the `then` above marked anything, which left a view opened on a\n // day that stops being today painting its \"now\" line forever.\n this.cdr.markForCheck();\n }\n}\n","<!-- Day grid. One column, its header centered over that column (the toolbar\n already names the date). Today's number is tinted, not filled; the now-line\n carries a time bubble that overhangs into the gutter. -->\n<div [attr.aria-label]=\"dayViewLabel\" class=\"w-full h-full flex flex-col overflow-hidden\" role=\"grid\">\n <div class=\"grid grid-cols-[60px_1fr]\">\n <div></div>\n <div class=\"flex items-center justify-center gap-2 py-2 px-1\" role=\"columnheader\">\n <span class=\"text-[11px] font-semibold uppercase tracking-wide opacity-50\">{{ dayName }}</span>\n <span class=\"text-base font-bold tabular-nums\" [class.text-primary]=\"isToday\">{{ focusDay.getDate() }}</span>\n </div>\n </div>\n <div class=\"grid grid-cols-[60px_1fr] flex-1 min-h-0 overflow-hidden items-stretch\">\n <div class=\"grid h-full min-h-0\" [style.grid-template-rows]=\"'repeat(' + totalRows + ', minmax(1.5rem, 1fr))'\">\n @for (row of hourRows; track row.topRow) {\n <div class=\"flex items-start justify-end min-h-0 overflow-hidden pr-2 text-[11px] tabular-nums opacity-50\"\n [style.grid-row]=\"row.topRow + '/' + row.bottomRow\">\n {{ row.hourLabel }}\n </div>\n }\n </div>\n <div class=\"grid relative auto-rows-fr h-full min-h-0\"\n [style.grid-template-rows]=\"'repeat(' + totalRows + ', minmax(1.5rem, 1fr))'\"\n [style.grid-template-columns]=\"'repeat(' + totalColumns + ', 1fr)'\">\n @for (row of hourRows; track row.topRow) {\n <div class=\"border-t border-base-200 pointer-events-none min-h-0\"\n [style.grid-row]=\"row.topRow + '/' + row.bottomRow\"\n [style.grid-column]=\"'1 / -1'\">\n </div>\n }\n @if (currentTimeRow > 0 && isToday) {\n <div class=\"relative z-[2] pointer-events-none\"\n [style.grid-row]=\"currentTimeRow\"\n [style.grid-column]=\"'1 / -1'\">\n <div class=\"absolute -left-1 -top-1 h-2 w-2 rounded-full bg-error\"></div>\n <div class=\"h-0.5 w-full bg-error\"></div>\n <div class=\"absolute left-0 top-0 -translate-x-2 -translate-y-1/2 rounded-full bg-error px-1.5 py-0.5 text-[10px] font-bold tabular-nums text-error-content shadow\">{{ currentTimeLabel }}</div>\n </div>\n }\n @for (event of displayEvents; track $index) {\n <div class=\"z-[1] min-h-0 overflow-hidden rounded-lg p-0.5 focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-primary\"\n [style.grid-row]=\"getEventRow(event)\"\n [style.grid-column]=\"getEventColumn(event)\"\n (click)=\"onEventClick(event)\"\n (keyup.enter)=\"onEventClick(event)\"\n tabindex=\"0\">\n <mn-calendar-event [customComponent]=\"calendarEventComponent\" [event]=\"event\"></mn-calendar-event>\n </div>\n }\n </div>\n </div>\n</div>\n","import {\n ChangeDetectorRef,\n Component,\n DestroyRef,\n Input,\n OnChanges,\n OnInit,\n Output,\n EventEmitter,\n SimpleChanges,\n inject,\n} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { CalendarEvent } from 'mn-angular-lib/calendar-core';\nimport { CALENDAR_DATE_FORMATTER, CalendarDateFormatter } from 'mn-angular-lib/calendar-core';\nimport { DefaultCalendarDateFormatter } from 'mn-angular-lib/calendar-core';\nimport { MnLanguageService } from 'mn-angular-lib/core';\nimport { skip } from 'rxjs';\n\n/**\n * Renders a single row in the upcoming-events sidebar.\n * Shows the event title, formatted date/time, and optional description.\n *\n * Times are reformatted whenever the `event` input changes and whenever the\n * locale changes: parents often reuse the row with `@for (…; track $index)`, so\n * formatting only in `ngOnInit` left stale times on the rail after a day switch.\n */\n@Component({\n selector: 'mn-upcoming-event-row',\n standalone: true,\n imports: [CommonModule],\n templateUrl: './upcoming-event-row.component.html',\n})\nexport class UpcomingEventRowComponent implements OnInit, OnChanges {\n /** The event to display. */\n @Input() event!: CalendarEvent;\n /** Emits the event when this row is clicked. */\n @Output() eventClicked = new EventEmitter<CalendarEvent>();\n\n formattedDate = '';\n\n private formatter: CalendarDateFormatter;\n\n /** Marks the view when the awaited time string lands (see {@link refreshFormattedDate}). */\n private readonly cdr = inject(ChangeDetectorRef);\n private readonly lang = inject(MnLanguageService);\n private readonly destroyRef = inject(DestroyRef);\n\n /** Bumps so an in-flight format from a previous event/locale is ignored. */\n private formatGeneration = 0;\n\n constructor() {\n const formatter = inject<CalendarDateFormatter | null>(CALENDAR_DATE_FORMATTER, {\n optional: true,\n });\n\n this.formatter = formatter ?? new DefaultCalendarDateFormatter();\n }\n\n ngOnInit() {\n const sub = this.lang.locale$.pipe(skip(1)).subscribe(() => {\n void this.refreshFormattedDate();\n });\n this.destroyRef.onDestroy(() => sub.unsubscribe());\n void this.refreshFormattedDate();\n }\n\n ngOnChanges(changes: SimpleChanges) {\n if (changes['event'] && !changes['event'].firstChange) {\n void this.refreshFormattedDate();\n }\n }\n\n /**\n * Formats the current event's start/end times into {@link formattedDate}.\n * Generation-guarded so a slow format for an older event cannot overwrite a newer one.\n */\n private async refreshFormattedDate(): Promise<void> {\n const generation = ++this.formatGeneration;\n if (!this.event) {\n this.formattedDate = '';\n this.cdr.markForCheck();\n return;\n }\n const start = await this.formatter.formatTime(this.event.startTime);\n const end = await this.formatter.formatTime(this.event.endTime);\n if (generation !== this.formatGeneration) {\n return;\n }\n this.formattedDate = `${start} - ${end}`;\n // The first render already happened with the empty string; nothing schedules a second\n // one for a value written after an await. Same fix as calendar-event-default.\n this.cdr.markForCheck();\n }\n}\n","<!-- Sidebar row in the shared chip language: a colored rail from the event's own\n colour, a hover wash, and space-grouped content — no boxed borders. -->\n<div (click)=\"eventClicked.emit(event)\"\n (keyup.enter)=\"eventClicked.emit(event)\"\n class=\"grid grid-cols-[3px_1fr] items-stretch gap-2.5 mb-1.5 cursor-pointer rounded-lg p-2 transition-colors hover:bg-base-200 focus-visible:outline-2 focus-visible:outline-offset-[-2px] focus-visible:outline-primary motion-reduce:transition-none\"\n tabindex=\"0\">\n <div class=\"rounded-full\" [style.background-color]=\"event.color.primaryColor\"></div>\n <div class=\"min-w-0\">\n <div class=\"line-clamp-2 break-words text-[13px] font-semibold\">{{ event.title }}</div>\n <div class=\"text-xs tabular-nums opacity-60\">{{ formattedDate }}</div>\n @if (event.description) {\n <div class=\"line-clamp-2 break-words text-xs opacity-50\">{{ event.description }}</div>\n }\n </div>\n</div>\n","import {\n ChangeDetectorRef,\n Component,\n EventEmitter,\n inject,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Output,\n SimpleChanges,\n} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { Observable, Subject, takeUntil } from 'rxjs';\nimport { CalendarEvent } from 'mn-angular-lib/calendar-core';\nimport {\n CalendarConfig,\n DEFAULT_CALENDAR_CONFIG,\n resolveCalendarConfig,\n} from 'mn-angular-lib/calendar-core';\nimport { UpcomingEventRowComponent } from '../upcoming-event-row/upcoming-event-row.component';\nimport { MnLanguageService } from 'mn-angular-lib/core';\nimport { MnBadge } from 'mn-angular-lib/button';\n\n/**\n * Sidebar component that lists the next 10 upcoming events\n * (events whose end time is in the future), sorted by start time.\n */\n@Component({\n selector: 'mn-upcoming-events',\n standalone: true,\n imports: [CommonModule, UpcomingEventRowComponent, MnBadge],\n templateUrl: './upcoming-events.component.html',\n})\nexport class UpcomingEventsComponent implements OnInit, OnChanges, OnDestroy {\n private readonly lang = inject(MnLanguageService);\n private readonly cdr = inject(ChangeDetectorRef);\n\n /**\n * Accessible name for this control. Resolved through the conventional\n * `mnCalendar.upcomingEvents` key so an app can translate it, falling back to English when the\n * key is not defined rather than leaking the raw key into the UI.\n */\n get upcomingEventsLabel(): string {\n return this.lang.translateIfPresent('mnCalendar.upcomingEvents') ?? 'Upcoming events';\n }\n\n /** Observable that emits the full event list whenever it changes. */\n @Input() eventsChanged!: Observable<CalendarEvent[]>;\n /** Resolved calendar configuration passed from the parent view. */\n @Input() config?: CalendarConfig;\n /** Emits when an upcoming event row is clicked. */\n @Output() eventClicked = new EventEmitter<CalendarEvent>();\n\n upcomingEvents: CalendarEvent[] = [];\n title: string;\n noEventsMessage: string;\n\n private destroy$ = new Subject<void>();\n\n constructor() {\n this.title = DEFAULT_CALENDAR_CONFIG.upcomingEventsTitle;\n this.noEventsMessage = DEFAULT_CALENDAR_CONFIG.noUpcomingEvents;\n }\n\n /** Re-read labels when the config input changes (e.g. after a locale switch). */\n ngOnChanges(changes: SimpleChanges) {\n if (changes['config'] && this.config) {\n const resolved = resolveCalendarConfig(this.config);\n this.title = resolved.upcomingEventsTitle;\n this.noEventsMessage = resolved.noUpcomingEvents;\n }\n }\n\n ngOnInit() {\n const resolved = this.config\n ? resolveCalendarConfig(this.config)\n : { ...DEFAULT_CALENDAR_CONFIG };\n this.title = resolved.upcomingEventsTitle;\n this.noEventsMessage = resolved.noUpcomingEvents;\n\n // Marked because the list is a plain field: in a zoneless app a stream emission is not by\n // itself a reason for Angular to re-render, so the sidebar would keep showing the events it\n // was first given.\n if (this.eventsChanged) {\n this.eventsChanged.pipe(takeUntil(this.destroy$)).subscribe((events) => {\n const now = new Date();\n this.upcomingEvents = events\n .filter((e) => e.endTime > now)\n .sort((a, b) => a.startTime.getTime() - b.startTime.getTime())\n .slice(0, 10);\n this.cdr.markForCheck();\n });\n }\n }\n\n ngOnDestroy() {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n /** trackBy for upcoming event rows. */\n trackByEvent(_index: number, event: CalendarEvent): string {\n return event.id;\n }\n}\n","<div [attr.aria-label]=\"upcomingEventsLabel\" class=\"p-4\" role=\"complementary\">\n <div class=\"mb-3 flex items-center gap-2\">\n <h3 class=\"text-sm font-bold tracking-wide\">{{ title }}</h3>\n @if (upcomingEvents.length) {\n <span mnBadge [data]=\"{ size: 'sm', color: 'accent', variant: 'fill' }\" class=\"tabular-nums\">{{ upcomingEvents.length }}</span>\n }\n </div>\n @for (event of upcomingEvents; track $index) {\n <mn-upcoming-event-row\n [event]=\"event\"\n (eventClicked)=\"eventClicked.emit($event)\">\n </mn-upcoming-event-row>\n }\n @if (upcomingEvents.length === 0) {\n <div class=\"text-sm opacity-50\">{{ noEventsMessage }}</div>\n }\n</div>\n","import {\n ChangeDetectorRef,\n Component,\n DestroyRef,\n EventEmitter,\n HostListener,\n inject,\n Input,\n OnDestroy,\n OnInit,\n Output,\n Type,\n} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { LucideDynamicIcon } from '@lucide/angular';\nimport { BehaviorSubject, skip, Subject, takeUntil } from 'rxjs';\nimport { CalendarButton, CalendarEvent } from 'mn-angular-lib/calendar-core';\nimport { CalendarEventData } from 'mn-angular-lib/calendar-core';\nimport {\n CALENDAR_CONFIG,\n CalendarConfig,\n CalendarView,\n DEFAULT_CALENDAR_CONFIG,\n MN_CALENDAR_CONFIG,\n provideMnCalendarConfig,\n resolveCalendarConfig,\n} from 'mn-angular-lib/calendar-core';\nimport { MnLanguageService } from 'mn-angular-lib/core';\nimport { CalendarMonthComponent } from '../calendar-month/calendar-month.component';\nimport { CalendarWeekComponent } from '../calendar-week/calendar-week.component';\nimport { CalendarDayComponent } from '../calendar-day/calendar-day.component';\nimport { UpcomingEventsComponent } from '../upcoming-events/upcoming-events.component';\nimport { MnButton } from 'mn-angular-lib/button';\nimport { MnDatetime } from 'mn-angular-lib/forms';\nimport * as lucide from 'lucide';\nimport { lucideIcons } from 'mn-angular-lib/core';\n\n/** Lucide icons this file renders. */\nconst ICONS = lucideIcons({ ChevronLeft: lucide.ChevronLeft, ChevronRight: lucide.ChevronRight });\n\n/** Gives each calendar instance a unique id to tie its tabs to its view panel. */\nlet instanceCounter = 0;\n\n/**\n * Main calendar orchestrator component.\n *\n * Provides a toolbar with view switching (month / week / day), date navigation,\n * and an optional action button. The active view and an upcoming-events sidebar\n * are rendered inside a responsive grid layout.\n *\n * All configuration (visible hours, locale, labels, mobile breakpoint) is read\n * from the `mn-config.json5` system via {@link MN_CALENDAR_CONFIG}, falling back\n * to the legacy {@link CALENDAR_CONFIG} injection token, then to built-in defaults.\n * Date formatting is delegated to the {@link CALENDAR_DATE_FORMATTER} token.\n *\n * @example\n * ```html\n * <mn-calendar-view\n * [showButton]=\"true\"\n * [buttonTitle]=\"'New Event'\"\n * [NewCalendarItemsEvent]=\"eventsEmitter\"\n * (RequestNewCalendarItemsEvent)=\"loadEvents($event)\"\n * (CalendarItemClickedEvent)=\"onEventClick($event)\"\n * (ButtonClickedEvent)=\"openModal()\">\n * </mn-calendar-view>\n * ```\n */\n@Component({\n selector: 'mn-calendar-view',\n standalone: true,\n imports: [\n CommonModule,\n FormsModule,\n CalendarMonthComponent,\n CalendarWeekComponent,\n CalendarDayComponent,\n UpcomingEventsComponent,\n MnButton,\n MnDatetime,\n LucideDynamicIcon,\n ],\n templateUrl: './calendar-view.component.html',\n providers: [provideMnCalendarConfig(DEFAULT_CALENDAR_CONFIG)],\n styles: [\n `\n :host {\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n }\n `,\n ],\n})\nexport class CalendarViewComponent implements OnInit, OnDestroy {\n /** Lucide icons the template renders. */\n protected readonly icons = ICONS;\n\n /**\n * Accessible name for this control. Resolved through the conventional\n * `mnCalendar.calendarView` key so an app can translate it, falling back to English when the\n * key is not defined rather than leaking the raw key into the UI.\n */\n get calendarViewLabel(): string {\n return this.lang.translateIfPresent('mnCalendar.calendarView') ?? 'Calendar view';\n }\n\n /** Whether to show the action button in the toolbar. */\n @Input() showButton = false;\n /** Label text for the action button. */\n @Input() buttonTitle = '';\n /** Array of buttons to display in the toolbar's top-right area. */\n @Input() buttons: CalendarButton[] = [];\n /** Custom event renderer component type. */\n @Input() CalendarEventComponent?: Type<CalendarEventData>;\n /** Observable or EventEmitter that pushes new event arrays into the calendar. */\n @Input() NewCalendarItemsEvent?: EventEmitter<CalendarEvent[]>;\n\n /** Emits when the calendar needs fresh event data (e.g. after navigation). */\n @Output() RequestNewCalendarItemsEvent = new EventEmitter<Date>();\n /** Emits when a calendar event is clicked. */\n @Output() CalendarItemClickedEvent = new EventEmitter<CalendarEvent>();\n /** Emits when the action button is clicked. */\n @Output() ButtonClickedEvent = new EventEmitter<void>();\n\n readonly CalendarView = CalendarView;\n /** Ties the view tabs to the panel they control, uniquely per calendar. */\n readonly panelId = `mn-calendar-panel-${++instanceCounter}`;\n currentView = CalendarView.WEEK;\n focusDay = new Date();\n viewOptions: { value: CalendarView; label: string }[] = [];\n isMobileView = false;\n\n /** BehaviorSubject so late-subscribing child views receive the last emitted events. */\n internalEventsChanged = new BehaviorSubject<CalendarEvent[]>([]);\n /** Subject for broadcasting focus-day changes to child views. */\n internalFocusDayChanged = new Subject<Date>();\n\n private destroy$ = new Subject<void>();\n protected config: CalendarConfig;\n /** Reference to the injected mn-config object (mutated in-place on locale change). */\n private readonly mnConfigRef: CalendarConfig | null;\n private readonly destroyRef = inject(DestroyRef);\n private readonly lang = inject(MnLanguageService);\n private readonly cdr = inject(ChangeDetectorRef);\n\n constructor() {\n const mnConfig = inject<CalendarConfig | null>(MN_CALENDAR_CONFIG, { optional: true });\n const legacyConfig = inject<CalendarConfig | null>(CALENDAR_CONFIG, { optional: true });\n\n // Keep a reference to the injected config so we can re-read it after locale changes.\n this.mnConfigRef = mnConfig;\n // Priority: mn-config system > legacy CALENDAR_CONFIG > built-in defaults\n const raw = mnConfig ?? legacyConfig ?? undefined;\n this.config = resolveCalendarConfig(raw as Partial<CalendarConfig> | undefined);\n }\n\n @HostListener('window:resize')\n onResize() {\n this.checkMobileView();\n }\n\n ngOnInit() {\n this.rebuildFromConfig();\n\n // Re-resolve config when locale changes (supports $translate in mn-config). Marked because\n // the labels it rebuilds are plain fields: a locale switch arrives on a stream, which in a\n // zoneless app is not by itself a reason for Angular to re-render the toolbar.\n const sub = this.lang.locale$.pipe(skip(1)).subscribe(() => {\n this.rebuildFromConfig();\n this.cdr.markForCheck();\n });\n this.destroyRef.onDestroy(() => sub.unsubscribe());\n\n this.checkMobileView();\n this.RequestNewCalendarItemsEvent.emit(this.focusDay);\n\n if (this.NewCalendarItemsEvent) {\n this.NewCalendarItemsEvent.pipe(takeUntil(this.destroy$)).subscribe((events) => {\n this.internalEventsChanged.next(events);\n });\n }\n }\n\n ngOnDestroy() {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n /** Switches the active view. On mobile, forces day view. */\n switchView(view: CalendarView) {\n if (this.isMobileView) {\n this.currentView = CalendarView.DAY;\n return;\n }\n this.currentView = view;\n }\n\n /**\n * Names the stretch of time on screen — the day, the week, or the month. It is\n * the toolbar's orientation: without it, navigating leaves you somewhere with\n * no label. Announced politely, so stepping through says where you landed.\n */\n get periodLabel(): string {\n const locale = this.config.locale;\n\n if (this.currentView === CalendarView.MONTH) {\n return this.focusDay.toLocaleDateString(locale, { month: 'long', year: 'numeric' });\n }\n\n if (this.currentView === CalendarView.DAY) {\n // No weekday: the view's own column header already says which day it is,\n // and the year only earns its place once it stops being the obvious one.\n return this.focusDay.toLocaleDateString(locale, {\n day: 'numeric',\n month: 'long',\n ...(this.focusDay.getFullYear() !== new Date().getFullYear() ? { year: 'numeric' } : {}),\n });\n }\n\n const start = this.startOfWeek(this.focusDay);\n const end = new Date(start);\n end.setDate(end.getDate() + 6);\n // Only repeat what actually changes across the week's two ends.\n const from =\n start.getFullYear() !== end.getFullYear()\n ? start.toLocaleDateString(locale, { day: 'numeric', month: 'short', year: 'numeric' })\n : start.toLocaleDateString(locale, {\n day: 'numeric',\n ...(start.getMonth() !== end.getMonth() ? { month: 'short' } : {}),\n });\n const to = end.toLocaleDateString(locale, { day: 'numeric', month: 'short', year: 'numeric' });\n return `${from} – ${to}`;\n }\n\n /** The focus day as YYYY-MM-DD, for the toolbar's date picker. */\n get focusDayString(): string {\n const pad = (n: number) => n.toString().padStart(2, '0');\n const d = this.focusDay;\n return `${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDate())}`;\n }\n\n /**\n * Steps the calendar by one unit of whatever is on screen: a day in day view,\n * a week in week view, a month in month view. Navigating by the visible unit is\n * what makes one pair of arrows serve all three.\n */\n navigate(step: number) {\n const next = new Date(this.focusDay);\n\n switch (this.currentView) {\n case CalendarView.DAY:\n next.setDate(next.getDate() + step);\n break;\n case CalendarView.WEEK:\n next.setDate(next.getDate() + step * 7);\n break;\n default:\n this.setFocusDay(this.addMonths(this.focusDay, step));\n return;\n }\n\n this.setFocusDay(next);\n }\n\n /** Returns the calendar to today. */\n goToToday() {\n this.setFocusDay(new Date());\n }\n\n /**\n * Handles the toolbar date picker.\n * @param value The date string in YYYY-MM-DD format.\n */\n onPickDate(value: string) {\n if (!value) return;\n const picked = new Date(value + 'T00:00:00');\n if (isNaN(picked.getTime())) return;\n this.setFocusDay(picked);\n }\n\n /** Handles a day click from the month view — switches to day view. */\n onMonthDayClick(date: Date) {\n this.currentView = CalendarView.DAY;\n this.setFocusDay(date);\n }\n\n /** Forwards a child event click to the parent output. */\n onEventClick(event: CalendarEvent) {\n this.CalendarItemClickedEvent.emit(event);\n }\n\n /** trackBy for view option buttons. */\n trackByView(_index: number, item: { value: CalendarView }): string {\n return item.value;\n }\n\n /** Rebuilds view options and labels from the current config. */\n private rebuildFromConfig() {\n // Re-resolve from the injected config reference which is mutated in-place by the provider on locale change.\n if (this.mnConfigRef) {\n this.config = resolveCalendarConfig(this.mnConfigRef as Partial<CalendarConfig>);\n }\n this.viewOptions = [\n { value: CalendarView.MONTH, label: this.config.viewLabels['MONTH'] ?? 'Month' },\n { value: CalendarView.WEEK, label: this.config.viewLabels['WEEK'] ?? 'Week' },\n { value: CalendarView.DAY, label: this.config.viewLabels['DAY'] ?? 'Day' },\n ];\n }\n\n private checkMobileView() {\n const wasMobile = this.isMobileView;\n const width = window.innerWidth;\n // Honour the configured mobile breakpoint (default 768) rather than a hard-coded\n // width: a seven-column week is cramped well before a phone's width, so the day\n // view takes over earlier — and consumers can tune where via `mobileBreakpoint`.\n const breakpoint = this.config.mobileBreakpoint;\n this.isMobileView = width < breakpoint;\n if (this.isMobileView && !wasMobile) {\n this.currentView = CalendarView.DAY;\n }\n }\n\n /**\n * Adds months without the end-of-month overflow `setMonth` alone produces —\n * 31 January plus one month is 28 February, not 3 March.\n */\n private addMonths(date: Date, months: number): Date {\n const day = date.getDate();\n const shifted = new Date(date);\n shifted.setDate(1);\n shifted.setMonth(shifted.getMonth() + months);\n const lastDayOfMonth = new Date(shifted.getFullYear(), shifted.getMonth() + 1, 0).getDate();\n shifted.setDate(Math.min(day, lastDayOfMonth));\n return shifted;\n }\n\n /** Monday of the week containing `date`, matching the grid the views draw. */\n private startOfWeek(date: Date): Date {\n const start = new Date(date);\n start.setHours(0, 0, 0, 0);\n start.setDate(start.getDate() - ((start.getDay() + 6) % 7));\n return start;\n }\n\n private setFocusDay(date: Date) {\n this.focusDay = date;\n this.internalFocusDayChanged.next(date);\n this.RequestNewCalendarItemsEvent.emit(date);\n }\n}\n","<div class=\"w-full h-full flex flex-col\" role=\"application\" aria-label=\"Calendar\">\n\n <!-- Toolbar has one layout below the desktop (`lg`) width and one at it. Below\n `lg`: a controls row (Today anchored left, the right-hand cluster anchored\n right) with the ‹ date › nav centred on its own row beneath — the same\n shape from phone through tablet, so nothing wraps into a lopsided diagonal.\n At `lg`, where the upcoming-events sidebar also appears, the nav folds up\n inline after Today and the whole toolbar becomes a single row. The one JS\n breakpoint (`mobileBreakpoint`) governs the phone controls — icon-only\n picker, hidden view-switcher, forced day view — not the toolbar's shape. -->\n <div class=\"flex flex-wrap items-center gap-x-3 gap-y-2 py-3\">\n\n <button (click)=\"goToToday()\"\n [data]=\"{ variant: 'outline', size: 'md', color: 'primary' }\"\n class=\"shrink-0\"\n mnButton\n type=\"button\">\n {{ config.todayLabel }}\n </button>\n\n <!-- Stepping through time. The arrows sit either side of the date they move,\n so the control and the thing it controls read as one unit. Below `lg` it\n sits centred on its own row (basis-full, ordered last) — a period header\n above the grid, tight rather than flinging the arrows to the row's edges.\n At `lg` it folds inline right after Today, taking a stable min-width so\n the arrows don't jitter as the label's length changes. -->\n <div class=\"flex basis-full order-last justify-center items-center gap-1\n lg:basis-auto lg:order-none lg:justify-start\">\n <button (click)=\"navigate(-1)\"\n [attr.aria-label]=\"config.previousLabel\"\n [data]=\"{ variant: 'text', size: 'md', color: 'gray' }\"\n class=\"shrink-0\"\n mnButton\n type=\"button\">\n <svg [size]=\"18\" [lucideIcon]=\"icons.ChevronLeft\"></svg>\n </button>\n\n <h2 aria-live=\"polite\"\n class=\"text-center text-base font-semibold whitespace-nowrap px-1 lg:min-w-56\">\n {{ periodLabel }}\n </h2>\n\n <button (click)=\"navigate(1)\"\n [attr.aria-label]=\"config.nextLabel\"\n [data]=\"{ variant: 'text', size: 'md', color: 'gray' }\"\n class=\"shrink-0\"\n mnButton\n type=\"button\">\n <svg [size]=\"18\" [lucideIcon]=\"icons.ChevronRight\"></svg>\n </button>\n </div>\n\n <!-- Right-hand controls travel together as one cluster with `ml-auto`, so they\n hold to the right of the row on every width — and when space runs short the\n whole group wraps to a new line as a unit rather than stranding a lone\n button. On desktop the cluster lands above the upcoming-events sidebar,\n using that otherwise-empty space. -->\n <div class=\"ml-auto flex items-center gap-2\">\n <!-- On mobile the picker collapses to its icon-only variant. -->\n <mn-lib-datetime (ngModelChange)=\"onPickDate($event)\"\n [ngModel]=\"focusDayString\"\n [props]=\"{ id: panelId + '-date', mode: 'date', placeholder: config.pickDateLabel, size: 'md', borderRadius: 'lg', hover: true, iconOnly: isMobileView }\"\n class=\"block\"></mn-lib-datetime>\n\n <!-- View switcher (month / week / day) — hidden on mobile, which is forced to day view. -->\n @if (!isMobileView) {\n <div [attr.aria-label]=\"calendarViewLabel\" class=\"flex border border-base-300 rounded-md overflow-hidden\"\n role=\"tablist\">\n @for (view of viewOptions; track view.value) {\n <button\n (click)=\"switchView(view.value)\"\n [attr.aria-controls]=\"panelId\"\n [attr.aria-selected]=\"currentView === view.value\"\n [class.text-base-content!]=\"currentView !== view.value\"\n [class.font-semibold]=\"currentView === view.value\"\n [data]=\"{ size: 'md', variant: currentView === view.value ? 'fill' : 'text', color: 'primary' }\"\n mnButton\n role=\"tab\"\n type=\"button\">\n {{ view.label }}\n </button>\n }\n </div>\n }\n\n <!-- Action buttons (custom buttons + optional showButton CTA). -->\n @if (buttons.length || showButton) {\n @for (btn of buttons; track btn.label) {\n <button (click)=\"btn.onClick()\" [data]=\"btn.buttonData || {}\" mnButton type=\"button\">\n {{ btn.label }}\n </button>\n }\n @if (showButton) {\n <button (click)=\"ButtonClickedEvent.emit()\" [data]=\"{}\" mnButton type=\"button\">\n {{ buttonTitle }}\n </button>\n }\n }\n </div>\n\n </div>\n\n <div class=\"grid grid-cols-1 lg:grid-cols-[1fr_220px] gap-3 flex-1 min-h-0\">\n <div [id]=\"panelId\" class=\"min-w-0 min-h-0 overflow-hidden overflow-y-auto\" role=\"tabpanel\">\n @if (currentView === CalendarView.MONTH) {\n <mn-calendar-month\n [focusDay]=\"focusDay\"\n [eventsChanged]=\"internalEventsChanged\"\n [focusDayChanged]=\"internalFocusDayChanged\"\n [config]=\"config\"\n (dayClicked)=\"onMonthDayClick($event)\">\n </mn-calendar-month>\n }\n @if (currentView === CalendarView.WEEK) {\n <mn-calendar-week\n [focusDay]=\"focusDay\"\n [eventsChanged]=\"internalEventsChanged\"\n [focusDayChanged]=\"internalFocusDayChanged\"\n [config]=\"config\"\n [calendarEventComponent]=\"CalendarEventComponent\"\n (eventClicked)=\"onEventClick($event)\">\n </mn-calendar-week>\n }\n @if (currentView === CalendarView.DAY) {\n <mn-calendar-day\n [focusDay]=\"focusDay\"\n [eventsChanged]=\"internalEventsChanged\"\n [focusDayChanged]=\"internalFocusDayChanged\"\n [config]=\"config\"\n [calendarEventComponent]=\"CalendarEventComponent\"\n (eventClicked)=\"onEventClick($event)\">\n </mn-calendar-day>\n }\n </div>\n <div class=\"hidden lg:block border-l border-base-300 overflow-auto\">\n <mn-upcoming-events\n [eventsChanged]=\"internalEventsChanged\"\n [config]=\"config\"\n (eventClicked)=\"onEventClick($event)\">\n </mn-upcoming-events>\n </div>\n </div>\n\n</div>\n","import {\n afterNextRender,\n ChangeDetectionStrategy,\n Component,\n computed,\n DestroyRef,\n ElementRef,\n inject,\n Injector,\n input,\n linkedSignal,\n OnInit,\n output,\n signal,\n viewChildren,\n} from '@angular/core';\nimport {CommonModule} from '@angular/common';\nimport {FormsModule} from '@angular/forms';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport { LucideDynamicIcon } from '@lucide/angular';\nimport {MnButton} from 'mn-angular-lib/button';\nimport {MnDatetime} from 'mn-angular-lib/forms';\nimport {MnLanguageService} from 'mn-angular-lib/core';\nimport * as lucide from 'lucide';\nimport { lucideIcons } from 'mn-angular-lib/core';\n\n/** Lucide icons this file renders. */\nconst ICONS = lucideIcons({ ChevronLeft: lucide.ChevronLeft, ChevronRight: lucide.ChevronRight });\n\n/**\n * How the bar arranges itself at its current width.\n *\n * - `inline` — the day strip and Today share one row, under the month header. The\n * strip never stacks: as space runs out it shows fewer days rather than adding a\n * row.\n * - `compact` — too narrow even for a three-day strip, so the days give way to a\n * date picker sitting beside Today, still under the month header.\n *\n * Resolved from the bar's own width — not the viewport — so a bar in a narrow\n * sidebar lays itself out like a phone even on a wide screen.\n */\nexport type DateSelectorBarLayout = 'compact' | 'inline';\n\n/** Represents a single day tile in the date selector. */\nexport type DayTile = {\n /** The full date object (at midnight). */\n date: Date;\n /** Short day name (e.g. 'ma', 'Mon'). */\n dayName: string;\n /** Day-of-month number. */\n dayNumber: number;\n /** Short month name (e.g. 'mei', 'Jun'). */\n monthName: string;\n /**\n * Whether this tile is the first day of a month within the visible strip. The\n * days either side of it move apart, so the break is visible without a label —\n * the month header above the strip names both months.\n */\n startsNewMonth: boolean;\n /** Whether this tile is the currently selected date. */\n isSelected: boolean;\n /** Whether this tile represents today. */\n isToday: boolean;\n /** Full, locale-formatted date used as the tile's accessible name. */\n accessibleLabel: string;\n};\n\n/** A full week: the most days the strip shows, and the size it aligns to. */\nconst DAYS_IN_WEEK = 7;\n/** Fewest days worth showing before the picker takes over instead. */\nconst MIN_TILE_COUNT = 3;\n/** `Date.getDay()` value for Monday. */\nconst MONDAY = 1;\n/**\n * Width one day occupies. Days are sized by their content: a three-letter weekday\n * and a two-digit number at their set sizes measure about 72px including padding,\n * plus the `gap-1` beside it. Rounded up, because coming in under the real width\n * overflows the strip into the arrow beside it.\n */\nconst TILE_SLOT_WIDTH = 80;\n/** Space reserved for the two borderless window arrows and their gaps. */\nconst ARROWS_ZONE_WIDTH = 88;\n/**\n * Space the Today button claims, including the bar's own horizontal padding and\n * the gap beside it.\n */\nconst CONTROLS_ZONE_WIDTH = 150;\n/**\n * Everything on the controls row that isn't a day tile. The month is a full-width\n * header on its own line now, so it no longer competes with the days for room —\n * which is why more of them fit at a given width than they used to.\n */\nconst RESERVED_WIDTH = ARROWS_ZONE_WIDTH + CONTROLS_ZONE_WIDTH;\n/** Below this the strip can't hold even {@link MIN_TILE_COUNT} days. */\nconst COMPACT_MAX_WIDTH = MIN_TILE_COUNT * TILE_SLOT_WIDTH + RESERVED_WIDTH;\n/** Assumed width before the first measurement (and during server-side rendering). */\nconst UNMEASURED_WIDTH = 960;\n\n/** Counter used to give each bar instance a unique date-picker id. */\nlet instanceCounter = 0;\n\n/**\n * Reusable, responsive date selector bar.\n *\n * Renders a \"Today\" button, a month header, previous/next arrows and a strip of\n * day tiles. Selecting a tile or pressing \"Today\" emits the chosen day via\n * {@link dateSelected}. The arrows only shift the visible days and never emit.\n *\n * Given room, the strip is a whole week running Monday to Sunday, so the weekday\n * columns hold still as you page and no weekday appears twice. As the bar narrows\n * it shows fewer days rather than adding a second row — a partial strip has no\n * week to align to, so it slides to keep the selection in view instead. Narrower\n * still, and the days give way to a date picker beside Today, which keeps every\n * date reachable on a phone rather than leaving a strip too cramped to use.\n *\n * Selecting a day already on the strip leaves it exactly where it is; a selection\n * from outside moves the strip to where that day is. The arrows page by whatever\n * is on show, without touching the selection.\n *\n * The component carries no hard-coded copy: button, placeholder and assistive\n * text are supplied through the label inputs, and day/month names follow\n * {@link locale} (falling back to the active {@link MnLanguageService} locale).\n *\n * @example\n * ```html\n * <mn-date-selector-bar\n * [selectedDate]=\"focusDay\"\n * [todayLabel]=\"'Today'\"\n * [pickDateLabel]=\"'Pick a date'\"\n * [locale]=\"'nl-NL'\"\n * (dateSelected)=\"onDaySelected($event)\">\n * </mn-date-selector-bar>\n * ```\n */\n@Component({\n selector: 'mn-date-selector-bar',\n standalone: true,\n imports: [\n CommonModule,\n FormsModule,\n MnButton,\n MnDatetime,\n LucideDynamicIcon,\n ],\n templateUrl: './mn-date-selector-bar.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n // Styling lives entirely in the template as Tailwind utilities, as elsewhere in\n // the library — there is no stylesheet for this component.\n host: {class: 'block'},\n})\nexport class MnDateSelectorBar implements OnInit {\n /** Lucide icons the template renders. */\n protected readonly icons = ICONS;\n\n /** The currently selected date, provided by the parent. */\n readonly selectedDate = input<Date>(this.getToday());\n /** Label for the \"Today\" button. */\n readonly todayLabel = input<string>('Today');\n /** Placeholder for the date picker shown in place of a too-cramped week strip. */\n readonly pickDateLabel = input<string>('Pick a date');\n /** Accessible name for the previous-week arrow. */\n readonly previousLabel = input<string>('Show the previous week');\n /** Accessible name for the next-week arrow. */\n readonly nextLabel = input<string>('Show the next week');\n /** Accessible name for the day strip as a whole. */\n readonly dayStripLabel = input<string>('Select a day');\n /**\n * BCP 47 locale used to format day/month names. When empty, the active\n * {@link MnLanguageService} locale is used.\n */\n readonly locale = input<string>('');\n /** Emits when the user selects a new date. */\n readonly dateSelected = output<Date>();\n\n /** Unique id for this instance's date picker, so several bars can coexist. */\n readonly pickerId = `mn-dsb-date-${++instanceCounter}`;\n\n private readonly destroyRef = inject(DestroyRef);\n private readonly injector = inject(Injector);\n private readonly host = inject(ElementRef<HTMLElement>);\n private readonly lang = inject(MnLanguageService);\n\n private readonly tileButtons = viewChildren<ElementRef<HTMLButtonElement>>('tileButton');\n\n /** The bar's own width in px, tracked so the layout follows its container. */\n private readonly containerWidth = signal<number>(0);\n /** Bumped whenever the active language changes so name formatting re-runs. */\n private readonly localeTick = signal(0);\n\n /** How the bar is arranged at the current width. */\n readonly layout = computed<DateSelectorBarLayout>(() =>\n (this.containerWidth() || UNMEASURED_WIDTH) >= COMPACT_MAX_WIDTH ? 'inline' : 'compact',\n );\n\n /** Whether the day strip is shown, or the picker has taken its place. */\n readonly showDayStrip = computed<boolean>(() => this.layout() === 'inline');\n\n /**\n * Days in the visible strip: a full week where there's room, fewer as the bar\n * narrows. The bar drops days rather than adding a second row, so it stays one\n * line at every width it can.\n */\n readonly tileCount = computed<number>(() => {\n if (!this.showDayStrip()) return 0;\n const width = this.containerWidth() || UNMEASURED_WIDTH;\n const fits = Math.floor((width - RESERVED_WIDTH) / TILE_SLOT_WIDTH);\n return Math.min(DAYS_IN_WEEK, Math.max(MIN_TILE_COUNT, fits));\n });\n\n\n /** Effective locale: explicit input, else the active app locale. */\n private readonly effectiveLocale = computed<string>(() => {\n this.localeTick();\n return this.locale() || this.lang.locale;\n });\n\n /**\n * First day of the visible strip — the week's Monday when a whole week is on\n * show, otherwise whatever start keeps the selection in view.\n *\n * The strip holds still while the selection stays on screen; a selection\n * outside it moves to where that day is. The arrows write here directly to page\n * away from the selection.\n */\n private readonly windowStart = linkedSignal<{selected: number; count: number}, Date>({\n source: () => ({selected: this.selectedDate().getTime(), count: this.tileCount()}),\n computation: (source, previous) => {\n const selected = new Date(source.selected);\n const {count} = source;\n const anchored = this.anchorFor(selected, count);\n if (!previous || count === 0) return anchored;\n\n const current = previous.value;\n const holdsSelection = (() => {\n const offset = this.daysBetween(current, selected);\n return offset >= 0 && offset < count;\n })();\n\n // A whole week must also still be Monday-aligned to be worth keeping —\n // otherwise a strip that grew back to seven would keep a stale start.\n const stillValid = count === DAYS_IN_WEEK\n ? holdsSelection && current.getDay() === MONDAY\n : holdsSelection;\n\n return stillValid ? current : anchored;\n },\n });\n\n /**\n * Index of the tile that is currently keyboard-reachable (roving tabindex).\n * Tracks the selection so Tab lands on the selected day, falling back to Monday\n * when the selection has been paged out of sight.\n */\n private readonly focusedIndex = linkedSignal<number, number>({\n source: () => this.selectedDate().getTime(),\n computation: () => Math.max(0, this.indexOfSelected()),\n });\n\n /** The visible days, derived from the window start and the current selection. */\n readonly dayTiles = computed<DayTile[]>(() => {\n const count = this.tileCount();\n if (count === 0) return [];\n\n const start = this.windowStart();\n const selected = this.selectedDate();\n const today = this.getToday();\n const locale = this.effectiveLocale();\n\n const tiles: DayTile[] = [];\n let previousMonth = -1;\n let previousYear = -1;\n\n for (let i = 0; i < count; i++) {\n const date = new Date(start);\n date.setDate(start.getDate() + i);\n\n const month = date.getMonth();\n const year = date.getFullYear();\n const startsNewMonth = i > 0 && (month !== previousMonth || year !== previousYear);\n\n tiles.push({\n date,\n dayName: date.toLocaleDateString(locale, {weekday: 'short'}),\n dayNumber: date.getDate(),\n monthName: date.toLocaleDateString(locale, {month: 'short'}),\n startsNewMonth,\n isSelected: this.isSameDay(date, selected),\n isToday: this.isSameDay(date, today),\n accessibleLabel: date.toLocaleDateString(locale, {\n weekday: 'long',\n day: 'numeric',\n month: 'long',\n year: 'numeric',\n }),\n });\n\n previousMonth = month;\n previousYear = year;\n }\n\n return tiles;\n });\n\n /**\n * The month the strip is currently in, spelled out for the header that titles\n * the bar — so the days below are never just loose numbers. Reads as a range\n * when the strip straddles two months, and carries both years when it straddles\n * two of those.\n */\n readonly monthCaption = computed<string>(() => {\n const locale = this.effectiveLocale();\n const tiles = this.dayTiles();\n\n // With no strip to describe — the compact layout — the header names the\n // month the selection sits in, so the bar is never unlabelled.\n if (!tiles.length) {\n return this.selectedDate().toLocaleDateString(locale, {month: 'long', year: 'numeric'});\n }\n\n const first = tiles[0].date;\n const last = tiles[tiles.length - 1].date;\n\n if (first.getFullYear() !== last.getFullYear()) {\n const from = first.toLocaleDateString(locale, {month: 'long', year: 'numeric'});\n const to = last.toLocaleDateString(locale, {month: 'long', year: 'numeric'});\n return `${from} – ${to}`;\n }\n\n if (first.getMonth() !== last.getMonth()) {\n const from = first.toLocaleDateString(locale, {month: 'long'});\n const to = last.toLocaleDateString(locale, {month: 'long', year: 'numeric'});\n return `${from} – ${to}`;\n }\n\n return first.toLocaleDateString(locale, {month: 'long', year: 'numeric'});\n });\n\n /** The selected date formatted as YYYY-MM-DD for the date-picker input. */\n readonly selectedDateString = computed<string>(() => {\n const d = this.selectedDate();\n const pad = (n: number) => n.toString().padStart(2, '0');\n return `${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDate())}`;\n });\n\n /**\n * Props for the compact-layout date picker. Sized to match the Today button it\n * sits beside, and filling the rest of the row so it stays an easy tap target.\n */\n readonly pickerProps = computed(() => ({\n id: this.pickerId,\n mode: 'date' as const,\n placeholder: this.pickDateLabel(),\n size: 'md' as const,\n borderRadius: 'lg' as const,\n hover: true,\n fullWidth: true,\n }));\n\n ngOnInit(): void {\n // Re-format names when the active language changes.\n this.lang.locale$\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => this.localeTick.update((v) => v + 1));\n\n this.observeOwnWidth();\n }\n\n /** Shows the days before the visible ones, without changing the selection. */\n navigatePrevious(): void {\n this.shiftWindow(-1);\n }\n\n /** Shows the days after the visible ones, without changing the selection. */\n navigateNext(): void {\n this.shiftWindow(1);\n }\n\n /** Returns to today: brings today into the strip and selects it. */\n goToToday(): void {\n const today = this.getToday();\n // Move explicitly: when today is already selected the window signal has no new\n // source value to react to, but the user still expects to land on it.\n this.windowStart.set(this.anchorFor(today, this.tileCount()));\n // Only emit when today isn't already selected, so pressing \"Today\" while on\n // today doesn't trigger a redundant reload.\n if (!this.isSameDay(today, this.selectedDate())) {\n this.dateSelected.emit(today);\n }\n }\n\n /** Selects a date and emits it, unless it is already the selected day. */\n selectDate(date: Date): void {\n // Re-selecting the current day is a no-op: emitting again would make\n // consumers reload for no change.\n if (this.isSameDay(date, this.selectedDate())) return;\n this.dateSelected.emit(date);\n }\n\n /**\n * Handles the date-picker model change: shows the picked day's week and emits\n * it (unless it is already the selected day).\n * @param value The date string in YYYY-MM-DD format.\n */\n onDateModelChanged(value: string): void {\n if (!value) return;\n const picked = new Date(value + 'T00:00:00');\n if (isNaN(picked.getTime())) return;\n\n this.windowStart.set(this.anchorFor(picked, this.tileCount()));\n // Picking the day that's already selected shouldn't re-emit.\n if (!this.isSameDay(picked, this.selectedDate())) {\n this.dateSelected.emit(picked);\n }\n }\n\n /** Whether the tile at `index` is the one reachable with Tab. */\n isTabbable(index: number): boolean {\n return index === this.focusedIndex();\n }\n\n /** Remembers which tile last held focus, so Tab returns to it. */\n onTileFocus(index: number): void {\n this.focusedIndex.set(index);\n }\n\n /**\n * Moves focus across the week with the arrow keys. Running off either end turns\n * the page to the neighbouring week and lands on the day that continues the run,\n * so the weeks read as one continuous calendar.\n */\n onTileKeydown(event: KeyboardEvent, index: number): void {\n const lastIndex = this.tileCount() - 1;\n\n switch (event.key) {\n case 'ArrowRight':\n event.preventDefault();\n if (index < lastIndex) {\n this.moveFocusTo(index + 1);\n } else {\n // Off the end: turn the page and land on the day that continues the run.\n this.shiftWindow(1);\n this.moveFocusTo(0);\n }\n break;\n\n case 'ArrowLeft':\n event.preventDefault();\n if (index > 0) {\n this.moveFocusTo(index - 1);\n } else {\n this.shiftWindow(-1);\n this.moveFocusTo(lastIndex);\n }\n break;\n\n case 'Home':\n event.preventDefault();\n this.moveFocusTo(0);\n break;\n\n case 'End':\n event.preventDefault();\n this.moveFocusTo(lastIndex);\n break;\n\n default:\n break;\n }\n }\n\n /** trackBy key for day tiles. */\n trackByTile(_index: number, tile: DayTile): number {\n return tile.date.getTime();\n }\n\n /**\n * Moves the strip by `pages` of whatever it is currently showing. Paging by the\n * visible count is what keeps a full week Monday-aligned — seven days forward\n * from a Monday is the next Monday.\n */\n private shiftWindow(pages: number): void {\n const next = new Date(this.windowStart());\n next.setDate(next.getDate() + pages * this.tileCount());\n this.windowStart.set(next);\n }\n\n /** Focuses the tile at `index` once the week has rendered. */\n private moveFocusTo(index: number): void {\n this.focusedIndex.set(index);\n afterNextRender(\n () => this.tileButtons()[index]?.nativeElement.focus(),\n {injector: this.injector},\n );\n }\n\n /** Index of the selected day within the visible week, or -1 when off-week. */\n private indexOfSelected(): number {\n return this.dayTiles().findIndex((tile) => tile.isSelected);\n }\n\n /**\n * Where the strip should start to show `date` among `count` days: the week's\n * Monday when a whole week is on show, otherwise centred on the day, since a\n * partial strip has no week to align to.\n */\n private anchorFor(date: Date, count: number): Date {\n if (count === DAYS_IN_WEEK) return this.startOfWeek(date);\n\n const start = new Date(date);\n start.setHours(0, 0, 0, 0);\n start.setDate(start.getDate() - Math.floor(count / 2));\n return start;\n }\n\n /**\n * Returns the Monday of the week containing `date`. `getDay()` counts from\n * Sunday, so the shift maps Sunday to the end of the week rather than the start.\n */\n private startOfWeek(date: Date): Date {\n const start = new Date(date);\n start.setHours(0, 0, 0, 0);\n start.setDate(start.getDate() - ((start.getDay() + 6) % 7));\n return start;\n }\n\n /** Whole calendar days from `from` to `to`, ignoring time of day and DST. */\n private daysBetween(from: Date, to: Date): number {\n const a = Date.UTC(from.getFullYear(), from.getMonth(), from.getDate());\n const b = Date.UTC(to.getFullYear(), to.getMonth(), to.getDate());\n return Math.round((b - a) / 86400000);\n }\n\n /** Tracks the bar's own width so the layout responds to its container. */\n private observeOwnWidth(): void {\n const element = this.host.nativeElement;\n this.containerWidth.set(element.getBoundingClientRect().width);\n\n if (typeof ResizeObserver === 'undefined') return;\n\n const observer = new ResizeObserver((entries) => {\n const width = entries[0]?.contentRect.width ?? 0;\n if (width > 0) this.containerWidth.set(width);\n });\n observer.observe(element);\n this.destroyRef.onDestroy(() => observer.disconnect());\n }\n\n /** Returns a Date object for today at midnight. */\n private getToday(): Date {\n const now = new Date();\n now.setHours(0, 0, 0, 0);\n return now;\n }\n\n /** Checks whether two dates fall on the same calendar day. */\n private isSameDay(a: Date, b: Date): boolean {\n return (\n a.getFullYear() === b.getFullYear() &&\n a.getMonth() === b.getMonth() &&\n a.getDate() === b.getDate()\n );\n }\n}\n","<!-- Date selector bar. Layout is driven by the bar's own measured width, so it\n rearranges for the space the bar was given, not for the viewport. The strip\n never stacks: as room runs out it shows fewer days, then hands over to the\n picker. Nothing here is boxed — spacing does the grouping, not borders. -->\n<div class=\"flex flex-col gap-2 px-4 py-3\">\n\n <!-- Month header. Titles the whole bar so the day numbers below are never loose:\n it names the month the strip is in (or, when compact, the month the\n selection sits in), reading as a range where the strip crosses a boundary.\n On its own line it has room to be spelled out, and no longer steals width\n from the days the way the old inline caption did. -->\n <div aria-hidden=\"true\"\n class=\"text-center text-sm font-semibold tracking-wide whitespace-nowrap opacity-80\">\n {{ monthCaption() }}\n </div>\n\n <!-- Controls row. Today and the strip travel together as one centred cluster, so\n Today sits right beside the days instead of stranded against the far edge;\n the gap between them matches the strip's own spacing. When the strip gives\n way to the picker, the picker fills the row and Today anchors its left. -->\n <div class=\"flex items-center justify-center gap-3\">\n\n <!-- Today: returns the strip and the selection to the current day. Outlined\n rather than filled, so the one filled-primary element on the bar is the\n selected day — Today shares the primary accent without competing with it. -->\n <button (click)=\"goToToday()\"\n [data]=\"{ variant: 'outline', color: 'primary', size: 'md' }\"\n class=\"shrink-0\"\n mnButton\n type=\"button\">\n {{ todayLabel() }}\n </button>\n\n <!-- Too narrow for a usable strip, so the picker takes its place beside Today.\n Every date stays reachable on a phone, in one tap rather than by paging;\n the month header above keeps the compact bar labelled like the wide one. -->\n @if (!showDayStrip()) {\n <mn-lib-datetime (ngModelChange)=\"onDateModelChanged($event)\"\n [ngModel]=\"selectedDateString()\"\n [props]=\"pickerProps()\"\n class=\"block min-w-0 flex-1\"></mn-lib-datetime>\n }\n\n <!-- Arrows and days, sized to their own content so the row can centre them\n together with Today as a single cluster — rather than the days drifting to\n the middle of the leftover space, away from the button. -->\n @if (showDayStrip()) {\n <div [attr.aria-label]=\"dayStripLabel()\"\n class=\"flex min-w-0 items-center gap-3\"\n role=\"group\">\n <button (click)=\"navigatePrevious()\"\n [attr.aria-label]=\"previousLabel()\"\n [data]=\"{ variant: 'text', size: 'md', color: 'gray' }\"\n class=\"shrink-0\"\n mnButton\n type=\"button\">\n <svg [size]=\"18\" [lucideIcon]=\"icons.ChevronLeft\"></svg>\n </button>\n\n <!-- Days read on one line so each sits at the same height as the buttons\n either side of it. Roving tabindex: one day is in the tab order, the\n arrow keys move between the rest and page the strip at either end. -->\n <div class=\"flex min-w-0 gap-1\">\n @for (tile of dayTiles(); track tile.date.getTime(); let i = $index) {\n <!-- Selected is the filled pill; today is called out by its number\n alone, tinted primary — no box, in keeping with a bar that groups\n by spacing rather than borders. When today is also the selected\n day the fill takes over, since there is nothing left to tell apart.\n A month break is marked by extra breathing room rather than a rule,\n so the run of days stays unbroken; the header names both months. -->\n <button #tileButton\n (click)=\"selectDate(tile.date)\"\n (focus)=\"onTileFocus(i)\"\n (keydown)=\"onTileKeydown($event, i)\"\n [attr.aria-current]=\"tile.isToday ? 'date' : null\"\n [attr.aria-label]=\"tile.accessibleLabel\"\n [attr.aria-pressed]=\"tile.isSelected\"\n [attr.tabindex]=\"isTabbable(i) ? 0 : -1\"\n [class.bg-primary]=\"tile.isSelected\"\n [class.hover:bg-base-200]=\"!tile.isSelected\"\n [class.ml-3]=\"tile.startsNewMonth\"\n [class.text-primary-content]=\"tile.isSelected\"\n class=\"flex min-w-16 shrink-0 cursor-pointer items-center justify-center gap-1.5 rounded-lg px-3 py-2 text-sm transition-colors focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary motion-reduce:transition-none\"\n type=\"button\">\n <span [class.opacity-60]=\"!tile.isSelected\"\n [class.opacity-90]=\"tile.isSelected\"\n aria-hidden=\"true\"\n class=\"text-xs font-medium uppercase\">\n {{ tile.dayName }}\n </span>\n <!-- Today's number carries the primary tint, unless the tile is\n filled — then it wears the fill's own text colour instead. -->\n <span [class.text-primary]=\"tile.isToday && !tile.isSelected\"\n aria-hidden=\"true\"\n class=\"font-bold tabular-nums\">{{ tile.dayNumber }}</span>\n </button>\n }\n </div>\n\n <button (click)=\"navigateNext()\"\n [attr.aria-label]=\"nextLabel()\"\n [data]=\"{ variant: 'text', size: 'md', color: 'gray' }\"\n class=\"shrink-0\"\n mnButton\n type=\"button\">\n <svg [size]=\"18\" [lucideIcon]=\"icons.ChevronRight\"></svg>\n </button>\n </div>\n }\n </div>\n</div>\n"],"mappings":";;;;;;;;;;;;;AAmCA,IAAa,yBAAb,MAAa,uBAAsB;CAChB,OAAO,OAAO,iBAAiB;CAC/B,MAAM,OAAO,iBAAiB;CAO/C,IAAI,iBAAc;EAChB,OAAO,KAAK,KAAK,mBAAmB,sBAAsB,KAAK;CACjE;CAGS;CAEA;CAEA;CAEA;CAEC,aAAa,IAAI,aAAY;CAEvC,aAA0B,CAAA;CAE1B;CAEA,kBAAkB,wBAAwB;CAElC,SAA0B,CAA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;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,WAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,eAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,QAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,cAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,cAAA;EAAA,CAAA;EAAA,aAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,cAAY,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"mn-angular-lib-calendar.mjs","names":[],"sources":["../../../projects/mn-angular-lib/calendar/src/mn-calendar/components/calendar-month/calendar-month.component.ts","../../../projects/mn-angular-lib/calendar/src/mn-calendar/components/calendar-month/calendar-month.component.html","../../../projects/mn-angular-lib/calendar/src/mn-calendar/components/calendar-event-default/calendar-event-default.component.ts","../../../projects/mn-angular-lib/calendar/src/mn-calendar/components/calendar-event-default/calendar-event-default.component.html","../../../projects/mn-angular-lib/calendar/src/mn-calendar/components/calendar-event/calendar-event.component.ts","../../../projects/mn-angular-lib/calendar/src/mn-calendar/components/calendar-event/calendar-event.component.html","../../../projects/mn-angular-lib/calendar/src/mn-calendar/components/calendar-week/calendar-week.component.ts","../../../projects/mn-angular-lib/calendar/src/mn-calendar/components/calendar-week/calendar-week.component.html","../../../projects/mn-angular-lib/calendar/src/mn-calendar/components/calendar-day/calendar-day.component.ts","../../../projects/mn-angular-lib/calendar/src/mn-calendar/components/calendar-day/calendar-day.component.html","../../../projects/mn-angular-lib/calendar/src/mn-calendar/components/upcoming-event-row/upcoming-event-row.component.ts","../../../projects/mn-angular-lib/calendar/src/mn-calendar/components/upcoming-event-row/upcoming-event-row.component.html","../../../projects/mn-angular-lib/calendar/src/mn-calendar/components/upcoming-events/upcoming-events.component.ts","../../../projects/mn-angular-lib/calendar/src/mn-calendar/components/upcoming-events/upcoming-events.component.html","../../../projects/mn-angular-lib/calendar/src/mn-calendar/components/calendar-view/calendar-view.component.ts","../../../projects/mn-angular-lib/calendar/src/mn-calendar/components/calendar-view/calendar-view.component.html","../../../projects/mn-angular-lib/calendar/src/mn-date-selector-bar/mn-date-selector-bar.component.ts","../../../projects/mn-angular-lib/calendar/src/mn-date-selector-bar/mn-date-selector-bar.component.html"],"sourcesContent":["import {\n ChangeDetectorRef,\n Component,\n EventEmitter,\n inject,\n Input,\n OnDestroy,\n OnInit,\n Output,\n} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { Observable, Subject, takeUntil } from 'rxjs';\nimport { CalendarEvent } from 'mn-angular-lib/calendar-core';\nimport {\n CalendarConfig,\n DEFAULT_CALENDAR_CONFIG,\n MonthItem,\n resolveCalendarConfig,\n} from 'mn-angular-lib/calendar-core';\nimport { CalendarDateFormatter } from 'mn-angular-lib/calendar-core';\nimport { DefaultCalendarDateFormatter } from 'mn-angular-lib/calendar-core';\nimport { MnLanguageService } from 'mn-angular-lib/core';\n\n/**\n * Month grid view showing a 7×6 grid of day cells.\n *\n * Each cell displays the day number and up to 3 coloured dots representing\n * events on that day. Clicking a cell emits `dayClicked`.\n */\n@Component({\n selector: 'mn-calendar-month',\n standalone: true,\n imports: [CommonModule],\n templateUrl: './calendar-month.component.html',\n})\nexport class CalendarMonthComponent implements OnInit, OnDestroy {\n private readonly lang = inject(MnLanguageService);\n private readonly cdr = inject(ChangeDetectorRef);\n\n /**\n * Accessible name for this control. Resolved through the conventional\n * `mnCalendar.monthView` key so an app can translate it, falling back to English when the\n * key is not defined rather than leaking the raw key into the UI.\n */\n get monthViewLabel(): string {\n return this.lang.translateIfPresent('mnCalendar.monthView') ?? 'Month view';\n }\n\n /** The date whose month is displayed. */\n @Input() focusDay!: Date;\n /** Observable that emits the full event list whenever it changes. */\n @Input() eventsChanged!: Observable<CalendarEvent[]>;\n /** Observable that emits when the focus day changes. */\n @Input() focusDayChanged!: Observable<Date>;\n /** Resolved calendar configuration passed from the parent view. */\n @Input() config?: CalendarConfig;\n /** Emits the date of a clicked day cell. */\n @Output() dayClicked = new EventEmitter<Date>();\n\n monthItems: MonthItem[] = [];\n /** Short weekday column headers (e.g. \"Mon\"), kept compact for the narrow columns. */\n weekdayLabels: string[];\n /** Word shown after the \"+N\" overflow count (e.g. \"more\"), from config. */\n moreEventsLabel = DEFAULT_CALENDAR_CONFIG.moreEventsLabel;\n\n private events: CalendarEvent[] = [];\n private destroy$ = new Subject<void>();\n private formatter: CalendarDateFormatter;\n\n constructor() {\n this.formatter = new DefaultCalendarDateFormatter();\n this.weekdayLabels = DEFAULT_CALENDAR_CONFIG.shortDayNames;\n }\n\n ngOnInit() {\n const resolved = this.config\n ? resolveCalendarConfig(this.config)\n : { ...DEFAULT_CALENDAR_CONFIG };\n this.weekdayLabels = resolved.shortDayNames;\n this.moreEventsLabel = resolved.moreEventsLabel;\n this.buildMonth();\n\n // Both subscriptions mark the view: the grid is rebuilt into plain fields, so in a zoneless\n // app nothing else tells Angular this component has to be re-rendered. Without it a month\n // whose events arrive from a stream — a fetch, a parent seeding its list — stays blank until\n // some unrelated interaction happens to trigger change detection.\n if (this.eventsChanged) {\n this.eventsChanged.pipe(takeUntil(this.destroy$)).subscribe((events) => {\n this.events = events;\n this.buildMonth();\n this.cdr.markForCheck();\n });\n }\n\n if (this.focusDayChanged) {\n this.focusDayChanged.pipe(takeUntil(this.destroy$)).subscribe((date) => {\n this.focusDay = date;\n this.buildMonth();\n this.cdr.markForCheck();\n });\n }\n }\n\n ngOnDestroy() {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n /** Emits the clicked day's date. */\n onDayClick(date: Date) {\n this.dayClicked.emit(date);\n }\n\n /** trackBy for day name headers. */\n trackByDayName(index: number): number {\n return index;\n }\n\n /** trackBy for month grid cells. */\n trackByMonthItem(_index: number, item: MonthItem): number {\n return item.date.getTime();\n }\n\n /** trackBy for event dots. */\n trackByEventDot(_index: number, event: CalendarEvent): string {\n return event.id;\n }\n\n /** Builds the 42-cell month grid (6 rows × 7 columns). */\n private buildMonth() {\n if (!this.focusDay) return;\n\n const year = this.focusDay.getFullYear();\n const month = this.focusDay.getMonth();\n const firstDay = new Date(year, month, 1);\n const lastDay = new Date(year, month + 1, 0);\n\n let startOffset = firstDay.getDay() - 1;\n if (startOffset < 0) startOffset = 6;\n\n const today = new Date();\n this.monthItems = [];\n\n for (let i = startOffset - 1; i >= 0; i--) {\n const date = new Date(year, month, -i);\n this.monthItems.push(this.createMonthItem(date, false, today));\n }\n\n for (let d = 1; d <= lastDay.getDate(); d++) {\n const date = new Date(year, month, d);\n this.monthItems.push(this.createMonthItem(date, true, today));\n }\n\n const remaining = 42 - this.monthItems.length;\n for (let i = 1; i <= remaining; i++) {\n const date = new Date(year, month + 1, i);\n this.monthItems.push(this.createMonthItem(date, false, today));\n }\n }\n\n private createMonthItem(date: Date, isCurrentMonth: boolean, today: Date): MonthItem {\n const isToday = this.formatter.isSameDay(date, today);\n const dayEvents = this.events.filter(\n (e) =>\n this.formatter.isSameDay(e.startTime, date) ||\n this.formatter.isSameDay(e.endTime, date) ||\n (e.startTime < date && e.endTime > date),\n );\n\n return {\n date,\n dayNumber: date.getDate(),\n isCurrentMonth,\n isToday,\n events: dayEvents,\n };\n }\n}\n","<!-- Month grid. Cells are grouped by space rather than boxed by borders, in\n keeping with the date-selector-bar: no rules, soft rounded cells, a hover\n wash, and today marked by a tinted number alone (no circle). -->\n<!-- Rows are a compact fixed height rather than stretched to fill the container:\n a month with few events shouldn't leave each cell mostly empty. The panel\n scrolls if the grid is taller than the space it's given. -->\n<div [attr.aria-label]=\"monthViewLabel\" class=\"w-full flex flex-col\" role=\"grid\">\n <div class=\"grid grid-cols-7 pb-2\">\n @for (day of weekdayLabels; track day) {\n <div class=\"pl-2 text-left text-[11px] font-semibold uppercase tracking-wide opacity-45\" role=\"columnheader\">{{ day }}</div>\n }\n </div>\n <div class=\"grid grid-cols-7 gap-1 auto-rows-[minmax(92px,auto)]\">\n @for (item of monthItems; track item.date.getTime()) {\n <div\n class=\"flex flex-col gap-1 min-h-0 overflow-hidden rounded-xl p-1.5 cursor-pointer transition-colors hover:bg-base-200 focus-visible:outline-2 focus-visible:outline-offset-[-2px] focus-visible:outline-primary motion-reduce:transition-none\"\n [class.opacity-40]=\"!item.isCurrentMonth\"\n (keyup.enter)=\"onDayClick(item.date)\"\n (click)=\"onDayClick(item.date)\"\n tabindex=\"0\"\n role=\"gridcell\"\n [attr.aria-label]=\"item.date.toDateString()\">\n <span class=\"text-[13px] font-bold leading-none tabular-nums\" [class.text-primary]=\"item.isToday\">{{ item.dayNumber }}</span>\n <div class=\"flex flex-col gap-0.5 min-h-0\">\n @for (event of item.events.slice(0, 3); track $index) {\n <div\n class=\"flex items-center overflow-hidden rounded-md border-l-[3px] px-1.5 py-0.5 text-[11px] leading-tight\"\n [style.background-color]=\"'color-mix(in oklab, ' + event.color.primaryColor + ' 18%, var(--color-base-100, #fff))'\"\n [style.border-left-color]=\"event.color.primaryColor\"\n [style.color]=\"'color-mix(in oklab, ' + event.color.primaryColor + ' 30%, var(--color-base-content, #000))'\"\n [title]=\"event.title\">\n <span class=\"truncate font-semibold\">{{ event.title }}</span>\n </div>\n }\n <!-- Overflow indicator. Styled as a pill that lights up on hover so it\n reads as actionable; the whole cell already navigates to the Day\n view for this date on click / Enter, where every event is listed. -->\n @if (item.events.length > 3) {\n <span class=\"mt-0.5 inline-flex w-fit items-center rounded-md px-1.5 py-0.5 text-[10.5px] font-semibold opacity-60 transition-colors hover:bg-base-300 hover:opacity-100 motion-reduce:transition-none\">\n +{{ item.events.length - 3 }} {{ moreEventsLabel }}\n </span>\n }\n </div>\n </div>\n }\n </div>\n</div>\n","import {\n ChangeDetectorRef,\n Component,\n OnInit,\n inject,\n} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { CalendarEventData } from 'mn-angular-lib/calendar-core';\nimport { CalendarEvent } from 'mn-angular-lib/calendar-core';\nimport { CALENDAR_DATE_FORMATTER, CalendarDateFormatter } from 'mn-angular-lib/calendar-core';\nimport { DefaultCalendarDateFormatter } from 'mn-angular-lib/calendar-core';\n\n/**\n * Default event renderer used when no custom component is provided.\n *\n * Displays the event title, formatted time range, and optional description\n * with the event's colour scheme applied as background and left-border accent.\n */\n@Component({\n selector: 'mn-calendar-event-default',\n standalone: true,\n imports: [CommonModule],\n templateUrl: './calendar-event-default.component.html',\n})\nexport class CalendarEventDefaultComponent implements CalendarEventData, OnInit {\n private cdr = inject(ChangeDetectorRef);\n\n /** The event to render. Set by {@link CalendarEventComponent} after creation. */\n event!: CalendarEvent;\n formattedTime = '';\n\n private formatter: CalendarDateFormatter;\n\n constructor() {\n const formatter = inject<CalendarDateFormatter | null>(CALENDAR_DATE_FORMATTER, {\n optional: true,\n });\n\n this.formatter = formatter ?? new DefaultCalendarDateFormatter();\n }\n\n async ngOnInit() {\n if (this.event) {\n const start = await this.formatter.formatTime(this.event.startTime);\n const end = await this.formatter.formatTime(this.event.endTime);\n this.formattedTime = `${start} - ${end}`;\n this.cdr.markForCheck();\n }\n }\n}\n","<!-- The shared event chip: a colored spine and a tinted fill from the event's own\n colours, so it reads the same in week, day and month. Text mixes a little of\n the event's primary colour into the theme's base-content, so it stays AA-legible on either theme. The fill mixes that\n colour into the page surface, so it darkens with a dark theme instead of staying\n a light pastel. -->\n<div class=\"h-full overflow-hidden cursor-pointer rounded-lg border-l-[3px] px-2 py-1 text-xs\"\n [style.background-color]=\"'color-mix(in oklab, ' + event.color.primaryColor + ' 18%, var(--color-base-100, #fff))'\"\n [style.border-left-color]=\"event.color.primaryColor\"\n [style.color]=\"'color-mix(in oklab, ' + event.color.primaryColor + ' 30%, var(--color-base-content, #000))'\">\n <div class=\"truncate font-semibold\">{{ event.title }}</div>\n <div class=\"truncate text-[11px] opacity-85\">{{ formattedTime }}</div>\n @if (event.description) {\n <div class=\"truncate text-[11px] opacity-75\">{{ event.description }}</div>\n }\n</div>\n","import {\n Component,\n Input,\n Output,\n EventEmitter,\n ViewChild,\n ViewContainerRef,\n AfterViewInit,\n Type,\n OnChanges,\n SimpleChanges,\n} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { CalendarEvent } from 'mn-angular-lib/calendar-core';\nimport { CalendarEventData } from 'mn-angular-lib/calendar-core';\nimport { CalendarEventDefaultComponent } from '../calendar-event-default/calendar-event-default.component';\n\n/**\n * Dynamic event renderer that injects a custom or default event component\n * into its view container.\n *\n * The component to render is resolved in this order:\n * 1. `customComponent` input (set on the parent week/day view)\n * 2. `event.component` (per-event override)\n * 3. {@link CalendarEventDefaultComponent} (library default)\n */\n@Component({\n selector: 'mn-calendar-event',\n standalone: true,\n imports: [CommonModule],\n templateUrl: './calendar-event.component.html',\n})\nexport class CalendarEventComponent implements AfterViewInit, OnChanges {\n /** The event data to render. */\n @Input() event!: CalendarEvent;\n /** Optional custom component type that overrides the default renderer. */\n @Input() customComponent?: Type<CalendarEventData>;\n /** Emits when the rendered event is clicked. */\n @Output() eventClicked = new EventEmitter<CalendarEvent>();\n\n @ViewChild('eventContainer', { read: ViewContainerRef, static: true })\n eventContainer!: ViewContainerRef;\n\n private rendered = false;\n\n ngAfterViewInit() {\n this.renderComponent();\n }\n\n ngOnChanges(changes: SimpleChanges) {\n if (this.rendered && (changes['event'] || changes['customComponent'])) {\n this.renderComponent();\n }\n }\n\n /** Emits the event click. */\n onEventClick() {\n this.eventClicked.emit(this.event);\n }\n\n /** Creates the event component dynamically and sets its `event` property. */\n private renderComponent() {\n if (!this.eventContainer) return;\n this.eventContainer.clear();\n const component =\n this.customComponent ?? this.event?.component ?? CalendarEventDefaultComponent;\n const ref = this.eventContainer.createComponent(component);\n (ref.instance as CalendarEventData).event = this.event;\n ref.changeDetectorRef.detectChanges();\n this.rendered = true;\n }\n}\n","<!-- Host for the dynamically-rendered event component. Click/keyboard handling and\n the focus ring live on the week/day event wrapper, so this stays presentational\n to avoid a second, redundant tab stop per event. -->\n<div class=\"h-full w-full\">\n <ng-template #eventContainer></ng-template>\n</div>\n","import {\n ChangeDetectorRef,\n Component,\n EventEmitter,\n inject,\n Input,\n OnDestroy,\n OnInit,\n Output,\n Type,\n} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { Observable, Subject, takeUntil } from 'rxjs';\nimport { CalendarEvent } from 'mn-angular-lib/calendar-core';\nimport { CalendarEventData } from 'mn-angular-lib/calendar-core';\nimport {\n CalendarConfig,\n ColumnDay,\n DEFAULT_CALENDAR_CONFIG,\n HourRow,\n resolveCalendarConfig,\n} from 'mn-angular-lib/calendar-core';\nimport { CalendarDateFormatter } from 'mn-angular-lib/calendar-core';\nimport { DefaultCalendarDateFormatter } from 'mn-angular-lib/calendar-core';\nimport { CalendarEventLayoutService } from 'mn-angular-lib/calendar-core';\nimport { CalendarUtility } from 'mn-angular-lib/calendar-core';\nimport { CalendarEventComponent } from '../calendar-event/calendar-event.component';\nimport { MnLanguageService } from 'mn-angular-lib/core';\n\n/** Extended hour row with a pre-resolved display label. */\ntype DisplayHourRow = {\n hourLabel: string;\n} & HourRow;\n\n/**\n * Week grid view showing 7 day columns with half-hour time slots.\n *\n * Overlapping events within the same day are laid out in sub-columns\n * so they appear side-by-side rather than stacked.\n */\n@Component({\n selector: 'mn-calendar-week',\n standalone: true,\n imports: [CommonModule, CalendarEventComponent],\n templateUrl: './calendar-week.component.html',\n providers: [CalendarEventLayoutService],\n})\nexport class CalendarWeekComponent implements OnInit, OnDestroy {\n private readonly lang = inject(MnLanguageService);\n\n /**\n * Accessible name for this control. Resolved through the conventional\n * `mnCalendar.weekView` key so an app can translate it, falling back to English when the\n * key is not defined rather than leaking the raw key into the UI.\n */\n get weekViewLabel(): string {\n return this.lang.translateIfPresent('mnCalendar.weekView') ?? 'Week view';\n }\n\n private layoutService = inject(CalendarEventLayoutService);\n private cdr = inject(ChangeDetectorRef);\n\n /** The date around which the week is centred. */\n @Input() focusDay!: Date;\n /** Observable that emits the full event list whenever it changes. */\n @Input() eventsChanged!: Observable<CalendarEvent[]>;\n /** Observable that emits when the focus day changes. */\n @Input() focusDayChanged!: Observable<Date>;\n /** Resolved calendar configuration passed from the parent view. */\n @Input() config?: CalendarConfig;\n /** Optional custom event renderer component. */\n @Input() calendarEventComponent?: Type<CalendarEventData>;\n /** Emits when a calendar event is clicked. */\n @Output() eventClicked = new EventEmitter<CalendarEvent>();\n\n columns: ColumnDay[] = [];\n hourRows: DisplayHourRow[] = [];\n displayEvents: CalendarEvent[] = [];\n totalRows = 0;\n currentTimeRow = 0;\n currentTimeCol = '';\n /** The current time, formatted for the label riding the now-line. */\n currentTimeLabel = '';\n gridTemplateColumns = 'repeat(7, 1fr)';\n\n private dayColumnMap: { subColumns: number; startCol: number }[] = [];\n private events: CalendarEvent[] = [];\n private destroy$ = new Subject<void>();\n private formatter: CalendarDateFormatter;\n private resolvedConfig!: CalendarConfig;\n private currentTimeInterval?: ReturnType<typeof setInterval>;\n\n constructor() {\n this.formatter = new DefaultCalendarDateFormatter();\n }\n\n ngOnInit() {\n this.resolvedConfig = this.config\n ? resolveCalendarConfig(this.config)\n : { ...DEFAULT_CALENDAR_CONFIG };\n this.buildColumns();\n this.updateCurrentTime();\n this.currentTimeInterval = setInterval(() => this.updateCurrentTime(), 60000);\n\n if (this.eventsChanged) {\n this.eventsChanged.pipe(takeUntil(this.destroy$)).subscribe((events) => {\n this.events = events;\n this.refreshEvents();\n this.cdr.markForCheck();\n });\n }\n\n if (this.focusDayChanged) {\n this.focusDayChanged.pipe(takeUntil(this.destroy$)).subscribe((date) => {\n this.focusDay = date;\n this.buildColumns();\n this.refreshEvents();\n this.updateCurrentTime();\n this.cdr.markForCheck();\n });\n }\n\n // Build hour rows asynchronously (formatTimeI returns a Promise).\n this.buildHourRows().then(() => this.cdr.markForCheck());\n }\n\n ngOnDestroy() {\n this.destroy$.next();\n this.destroy$.complete();\n if (this.currentTimeInterval) clearInterval(this.currentTimeInterval);\n }\n\n /** Returns the CSS `grid-row` value for an event based on its start/end times. */\n getEventRow(event: CalendarEvent): string {\n const startRow = CalendarUtility.getCorrectRow(\n event.startTime.getHours(),\n event.startTime.getMinutes(),\n this.resolvedConfig.startHour,\n );\n const endRow = CalendarUtility.getCorrectRow(\n event.endTime.getHours(),\n event.endTime.getMinutes(),\n this.resolvedConfig.startHour,\n );\n return `${startRow} / ${Math.max(endRow, startRow + 1)}`;\n }\n\n /** Returns the CSS `grid-column` span for a day header, accounting for sub-columns. */\n getHeaderColumn(dayIndex: number): string {\n if (!this.dayColumnMap.length) return `${dayIndex + 2} / span 1`;\n const dayInfo = this.dayColumnMap[dayIndex];\n return `${dayInfo.startCol + 1} / span ${dayInfo.subColumns}`;\n }\n\n /** Returns the CSS `grid-column` value for an event within its day's sub-columns. */\n getEventColumn(event: CalendarEvent): string {\n const dayIdx = this.columns.findIndex((c) => this.formatter.isSameDay(c.date, event.startTime));\n if (dayIdx < 0) return '1 / span 1';\n const dayInfo = this.dayColumnMap[dayIdx];\n const subCol = (event.column ?? 0) + dayInfo.startCol;\n const width = event.width ?? 1;\n return `${subCol} / span ${width}`;\n }\n\n /** Forwards event click to parent. */\n onEventClick(event: CalendarEvent) {\n this.eventClicked.emit(event);\n }\n\n /** trackBy for hour rows. */\n trackByHour(_index: number, row: DisplayHourRow): number {\n return row.hour;\n }\n\n /** trackBy for day columns. */\n trackByColumn(_index: number, col: ColumnDay): number {\n return col.date.getTime();\n }\n\n /** trackBy for events. */\n trackByEvent(_index: number, event: CalendarEvent): string {\n return event.id;\n }\n\n private async buildHourRows() {\n const hours = this.resolvedConfig.endHour - this.resolvedConfig.startHour;\n this.totalRows = hours * 2;\n\n const rows: DisplayHourRow[] = [];\n for (let i = 0; i < hours; i++) {\n const hour = this.resolvedConfig.startHour + i;\n const label = await this.formatter.formatTimeI(hour, 0);\n rows.push({\n hour,\n topRow: i * 2 + 1,\n bottomRow: i * 2 + 3,\n hourLabel: label,\n });\n }\n this.hourRows = rows;\n }\n\n /** Builds the 7 day columns for the current week (Monday–Sunday). */\n private buildColumns() {\n if (!this.focusDay) return;\n\n const shortNames = this.resolvedConfig.shortDayNames;\n const today = new Date();\n\n const day = this.focusDay.getDay();\n const mondayOffset = day === 0 ? -6 : 1 - day;\n const monday = new Date(this.focusDay);\n monday.setDate(this.focusDay.getDate() + mondayOffset);\n\n this.columns = [];\n for (let i = 0; i < 7; i++) {\n const date = new Date(monday);\n date.setDate(monday.getDate() + i);\n this.columns.push({\n date,\n dayName: shortNames[i],\n dayNumber: date.getDate(),\n isToday: this.formatter.isSameDay(date, today),\n });\n }\n }\n\n /** Filters, splits, and lays out events for the current week. */\n private refreshEvents() {\n if (!this.columns.length) return;\n\n const rangeStart = this.columns[0].date;\n const rangeEnd = new Date(this.columns[6].date);\n rangeEnd.setHours(23, 59, 59, 999);\n\n const filtered = this.events.filter((e) =>\n this.layoutService.eventsOverlap(e.startTime, e.endTime, rangeStart, rangeEnd),\n );\n\n this.displayEvents = this.layoutService.calculateMultiDayEvents(\n filtered,\n this.resolvedConfig.startHour,\n this.resolvedConfig.endHour,\n rangeStart,\n rangeEnd,\n );\n\n // Assign columns per day so overlapping events within a day get sub-columns\n for (let i = 0; i < 7; i++) {\n const dayStart = new Date(this.columns[i].date);\n dayStart.setHours(0, 0, 0, 0);\n const dayEnd = new Date(this.columns[i].date);\n dayEnd.setHours(23, 59, 59, 999);\n\n const dayEvents = this.displayEvents.filter((e) =>\n this.formatter.isSameDay(e.startTime, this.columns[i].date),\n );\n\n this.layoutService.assignColumnsToEvents(dayEvents);\n this.layoutService.assignWidthsToEvents(dayEvents, dayStart, dayEnd);\n }\n\n this.buildGridColumns();\n this.updateCurrentTime();\n }\n\n /** Computes the CSS grid-template-columns string based on per-day sub-column counts. */\n private buildGridColumns() {\n this.dayColumnMap = [];\n let currentCol = 1;\n\n for (let i = 0; i < 7; i++) {\n const dayEvents = this.displayEvents.filter((e) =>\n this.formatter.isSameDay(e.startTime, this.columns[i].date),\n );\n\n let maxSubCols = 1;\n for (const e of dayEvents) {\n maxSubCols = Math.max(maxSubCols, (e.column ?? 0) + (e.width ?? 1));\n }\n\n this.dayColumnMap.push({ subColumns: maxSubCols, startCol: currentCol });\n currentCol += maxSubCols;\n }\n\n // Each overlap column gets at least 0.8 of a day: a day with two overlapping events grows\n // to 1.6 days instead of splitting one day in two, which left ~40px blocks reading \"V…\".\n const parts: string[] = [];\n for (const day of this.dayColumnMap) {\n const share = Math.max(1 / day.subColumns, 0.8);\n for (let j = 0; j < day.subColumns; j++) {\n parts.push(`${share}fr`);\n }\n }\n this.gridTemplateColumns = parts.join(' ');\n }\n\n /** Updates the current-time red line position. */\n private updateCurrentTime() {\n const now = new Date();\n const dayIdx = this.columns.findIndex((c) => this.formatter.isSameDay(c.date, now));\n if (dayIdx >= 0 && this.dayColumnMap.length > 0) {\n const dayInfo = this.dayColumnMap[dayIdx];\n this.currentTimeCol = `${dayInfo.startCol} / span ${dayInfo.subColumns}`;\n // Hide when outside the visible hours — getCorrectRow would clamp onto row 1 (l2tTCjLe).\n this.currentTimeRow = CalendarUtility.getCurrentTimeRow(\n now.getHours(),\n now.getMinutes(),\n this.resolvedConfig.startHour,\n this.resolvedConfig.endHour,\n );\n // formatTime is async; refresh the label and re-render when it resolves.\n this.formatter.formatTime(now).then((label) => {\n this.currentTimeLabel = label;\n this.cdr.markForCheck();\n });\n } else {\n this.currentTimeCol = '';\n this.currentTimeRow = 0;\n this.currentTimeLabel = '';\n }\n // See calendar-day: the setInterval tick marks nothing by itself.\n this.cdr.markForCheck();\n }\n}\n","<!-- Week grid. Hour rules are quiet hairlines; today's column header is a tinted\n number (no fill); the current time is a line carrying a small time bubble.\n Dynamic row/column placement stays inline — the layout maths lives in TS. -->\n<div [attr.aria-label]=\"weekViewLabel\" class=\"w-full h-full flex flex-col overflow-hidden\" role=\"grid\">\n <div class=\"grid\" [style.grid-template-columns]=\"'60px ' + gridTemplateColumns\">\n <div></div>\n @for (col of columns; track col.dayName; let i = $index) {\n <div class=\"py-2 px-1 text-center\"\n [style.grid-column]=\"getHeaderColumn(i)\"\n role=\"columnheader\">\n <span class=\"block text-[11px] font-semibold uppercase tracking-wide opacity-50\">{{ col.dayName }}</span>\n <span class=\"text-lg font-bold tabular-nums\" [class.text-primary]=\"col.isToday\">{{ col.dayNumber }}</span>\n </div>\n }\n </div>\n <div class=\"grid grid-cols-[60px_1fr] flex-1 min-h-0 overflow-hidden items-stretch\">\n <div class=\"grid h-full min-h-0\" [style.grid-template-rows]=\"'repeat(' + totalRows + ', minmax(1.5rem, 1fr))'\">\n @for (row of hourRows; track row.topRow) {\n <div class=\"flex items-start justify-end min-h-0 overflow-hidden pr-2 text-[11px] tabular-nums opacity-50\"\n [style.grid-row]=\"row.topRow + '/' + row.bottomRow\">\n {{ row.hourLabel }}\n </div>\n }\n </div>\n <div class=\"grid relative auto-rows-fr h-full min-h-0\"\n [style.grid-template-rows]=\"'repeat(' + totalRows + ', minmax(1.5rem, 1fr))'\"\n [style.grid-template-columns]=\"gridTemplateColumns\">\n @for (row of hourRows; track row.topRow) {\n <div class=\"border-t border-base-200 pointer-events-none min-h-0\"\n [style.grid-row]=\"row.topRow + '/' + row.bottomRow\"\n [style.grid-column]=\"'1 / -1'\">\n </div>\n }\n @if (currentTimeRow > 0 && currentTimeCol) {\n <div class=\"relative z-[2] pointer-events-none\"\n [style.grid-row]=\"currentTimeRow\"\n [style.grid-column]=\"currentTimeCol\">\n <div class=\"absolute -left-1 -top-1 h-2 w-2 rounded-full bg-error\"></div>\n <div class=\"h-0.5 w-full bg-error\"></div>\n <div class=\"absolute left-0 top-0 -translate-x-2 -translate-y-1/2 rounded-full bg-error px-1.5 py-0.5 text-[10px] font-bold tabular-nums text-error-content shadow\">{{ currentTimeLabel }}</div>\n </div>\n }\n @for (event of displayEvents; track $index) {\n <div class=\"z-[1] min-h-0 overflow-hidden rounded-lg p-0.5 focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-primary\"\n [style.grid-row]=\"getEventRow(event)\"\n [style.grid-column]=\"getEventColumn(event)\"\n (click)=\"onEventClick(event)\"\n (keyup.enter)=\"onEventClick(event)\"\n tabindex=\"0\">\n <mn-calendar-event [customComponent]=\"calendarEventComponent\" [event]=\"event\"></mn-calendar-event>\n </div>\n }\n </div>\n </div>\n</div>\n","import {\n ChangeDetectorRef,\n Component,\n EventEmitter,\n inject,\n Input,\n OnDestroy,\n OnInit,\n Output,\n Type,\n} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { Observable, Subject, takeUntil } from 'rxjs';\nimport { CalendarEvent } from 'mn-angular-lib/calendar-core';\nimport { CalendarEventData } from 'mn-angular-lib/calendar-core';\nimport {\n CalendarConfig,\n DEFAULT_CALENDAR_CONFIG,\n HourRow,\n resolveCalendarConfig,\n} from 'mn-angular-lib/calendar-core';\nimport { CalendarDateFormatter } from 'mn-angular-lib/calendar-core';\nimport { DefaultCalendarDateFormatter } from 'mn-angular-lib/calendar-core';\nimport { CalendarEventLayoutService } from 'mn-angular-lib/calendar-core';\nimport { CalendarUtility } from 'mn-angular-lib/calendar-core';\nimport { CalendarEventComponent } from '../calendar-event/calendar-event.component';\nimport { MnLanguageService } from 'mn-angular-lib/core';\n\n/** Extended hour row with a pre-resolved display label. */\ntype DisplayHourRow = {\n hourLabel: string;\n} & HourRow;\n\n/**\n * Day grid view showing a single day with half-hour time slots.\n *\n * Shares the same layout algorithm as the week view via\n * {@link CalendarEventLayoutService}.\n */\n@Component({\n selector: 'mn-calendar-day',\n standalone: true,\n imports: [CommonModule, CalendarEventComponent],\n templateUrl: './calendar-day.component.html',\n providers: [CalendarEventLayoutService],\n})\nexport class CalendarDayComponent implements OnInit, OnDestroy {\n private readonly lang = inject(MnLanguageService);\n\n /**\n * Accessible name for this control. Resolved through the conventional\n * `mnCalendar.dayView` key so an app can translate it, falling back to English when the\n * key is not defined rather than leaking the raw key into the UI.\n */\n get dayViewLabel(): string {\n return this.lang.translateIfPresent('mnCalendar.dayView') ?? 'Day view';\n }\n\n private layoutService = inject(CalendarEventLayoutService);\n private cdr = inject(ChangeDetectorRef);\n\n /** The date to display. */\n @Input() focusDay!: Date;\n /** Observable that emits the full event list whenever it changes. */\n @Input() eventsChanged!: Observable<CalendarEvent[]>;\n /** Observable that emits when the focus day changes. */\n @Input() focusDayChanged!: Observable<Date>;\n /** Resolved calendar configuration passed from the parent view. */\n @Input() config?: CalendarConfig;\n /** Optional custom event renderer component. */\n @Input() calendarEventComponent?: Type<CalendarEventData>;\n /** Emits when a calendar event is clicked. */\n @Output() eventClicked = new EventEmitter<CalendarEvent>();\n\n hourRows: DisplayHourRow[] = [];\n displayEvents: CalendarEvent[] = [];\n totalRows = 0;\n totalColumns = 1;\n currentTimeRow = 0;\n /** The current time, formatted for the label riding the now-line. */\n currentTimeLabel = '';\n isToday = false;\n dayName = '';\n\n private events: CalendarEvent[] = [];\n private destroy$ = new Subject<void>();\n private formatter: CalendarDateFormatter;\n private resolvedConfig!: CalendarConfig;\n private currentTimeInterval?: ReturnType<typeof setInterval>;\n\n constructor() {\n this.formatter = new DefaultCalendarDateFormatter();\n }\n\n ngOnInit() {\n this.resolvedConfig = this.config\n ? resolveCalendarConfig(this.config)\n : { ...DEFAULT_CALENDAR_CONFIG };\n this.updateDayInfo();\n this.updateCurrentTime();\n this.currentTimeInterval = setInterval(() => this.updateCurrentTime(), 60000);\n\n if (this.eventsChanged) {\n this.eventsChanged.pipe(takeUntil(this.destroy$)).subscribe((events) => {\n this.events = events;\n this.refreshEvents();\n this.cdr.markForCheck();\n });\n }\n\n if (this.focusDayChanged) {\n this.focusDayChanged.pipe(takeUntil(this.destroy$)).subscribe((date) => {\n this.focusDay = date;\n this.updateDayInfo();\n this.refreshEvents();\n this.updateCurrentTime();\n this.cdr.markForCheck();\n });\n }\n\n // Build hour rows asynchronously (formatTimeI returns a Promise).\n this.buildHourRows().then(() => this.cdr.markForCheck());\n }\n\n ngOnDestroy() {\n this.destroy$.next();\n this.destroy$.complete();\n if (this.currentTimeInterval) clearInterval(this.currentTimeInterval);\n }\n\n /** Returns the CSS `grid-row` value for an event. */\n getEventRow(event: CalendarEvent): string {\n const startRow = CalendarUtility.getCorrectRow(\n event.startTime.getHours(),\n event.startTime.getMinutes(),\n this.resolvedConfig.startHour,\n );\n const endRow = CalendarUtility.getCorrectRow(\n event.endTime.getHours(),\n event.endTime.getMinutes(),\n this.resolvedConfig.startHour,\n );\n return `${startRow} / ${Math.max(endRow, startRow + 1)}`;\n }\n\n /** Returns the CSS `grid-column` value for an event within its sub-columns. */\n getEventColumn(event: CalendarEvent): string {\n const col = (event.column ?? 0) + 1;\n const width = event.width ?? 1;\n return `${col} / span ${width}`;\n }\n\n /** Forwards event click to parent. */\n onEventClick(event: CalendarEvent) {\n this.eventClicked.emit(event);\n }\n\n /** trackBy for hour rows. */\n trackByHour(_index: number, row: DisplayHourRow): number {\n return row.hour;\n }\n\n /** trackBy for events. */\n trackByEvent(_index: number, event: CalendarEvent): string {\n return event.id;\n }\n\n private async buildHourRows() {\n const hours = this.resolvedConfig.endHour - this.resolvedConfig.startHour;\n this.totalRows = hours * 2;\n\n const rows: DisplayHourRow[] = [];\n for (let i = 0; i < hours; i++) {\n const hour = this.resolvedConfig.startHour + i;\n const label = await this.formatter.formatTimeI(hour, 0);\n rows.push({\n hour,\n topRow: i * 2 + 1,\n bottomRow: i * 2 + 3,\n hourLabel: label,\n });\n }\n this.hourRows = rows;\n }\n\n /** Updates the day name and isToday flag. */\n private updateDayInfo() {\n if (!this.focusDay) return;\n const today = new Date();\n this.isToday = this.formatter.isSameDay(this.focusDay, today);\n const longNames = this.resolvedConfig.longDayNames;\n const dayIdx = this.focusDay.getDay();\n const mondayIdx = dayIdx === 0 ? 6 : dayIdx - 1;\n this.dayName = longNames[mondayIdx];\n }\n\n /** Filters, splits, and lays out events for the focus day. */\n private refreshEvents() {\n if (!this.focusDay) return;\n\n const rangeStart = new Date(this.focusDay);\n rangeStart.setHours(0, 0, 0, 0);\n const rangeEnd = new Date(this.focusDay);\n rangeEnd.setHours(23, 59, 59, 999);\n\n const filtered = this.events.filter((e) =>\n this.layoutService.eventsOverlap(e.startTime, e.endTime, rangeStart, rangeEnd),\n );\n\n this.displayEvents = this.layoutService.calculateMultiDayEvents(\n filtered,\n this.resolvedConfig.startHour,\n this.resolvedConfig.endHour,\n rangeStart,\n rangeEnd,\n );\n\n this.layoutService.assignColumnsToEvents(this.displayEvents);\n this.layoutService.assignWidthsToEvents(this.displayEvents, rangeStart, rangeEnd);\n\n this.totalColumns = this.displayEvents.reduce(\n (max, e) => Math.max(max, (e.column ?? 0) + (e.width ?? 1)),\n 1,\n );\n }\n\n /** Updates the current-time red line position. */\n private updateCurrentTime() {\n const now = new Date();\n if (this.focusDay && this.formatter.isSameDay(this.focusDay, now)) {\n // Hide when outside the visible hours — getCorrectRow would clamp onto row 1 (l2tTCjLe).\n this.currentTimeRow = CalendarUtility.getCurrentTimeRow(\n now.getHours(),\n now.getMinutes(),\n this.resolvedConfig.startHour,\n this.resolvedConfig.endHour,\n );\n this.isToday = true;\n // formatTime is async; refresh the label and re-render when it resolves.\n this.formatter.formatTime(now).then((label) => {\n this.currentTimeLabel = label;\n this.cdr.markForCheck();\n });\n } else {\n this.currentTimeRow = 0;\n this.isToday = false;\n this.currentTimeLabel = '';\n }\n // The minute tick is a bare setInterval, so neither branch is reached through anything\n // Angular wraps. Only the `then` above marked anything, which left a view opened on a\n // day that stops being today painting its \"now\" line forever.\n this.cdr.markForCheck();\n }\n}\n","<!-- Day grid. One column, its header centered over that column (the toolbar\n already names the date). Today's number is tinted, not filled; the now-line\n carries a time bubble that overhangs into the gutter. -->\n<div [attr.aria-label]=\"dayViewLabel\" class=\"w-full h-full flex flex-col overflow-hidden\" role=\"grid\">\n <div class=\"grid grid-cols-[60px_1fr]\">\n <div></div>\n <div class=\"flex items-center justify-center gap-2 py-2 px-1\" role=\"columnheader\">\n <span class=\"text-[11px] font-semibold uppercase tracking-wide opacity-50\">{{ dayName }}</span>\n <span class=\"text-base font-bold tabular-nums\" [class.text-primary]=\"isToday\">{{ focusDay.getDate() }}</span>\n </div>\n </div>\n <div class=\"grid grid-cols-[60px_1fr] flex-1 min-h-0 overflow-hidden items-stretch\">\n <div class=\"grid h-full min-h-0\" [style.grid-template-rows]=\"'repeat(' + totalRows + ', minmax(1.5rem, 1fr))'\">\n @for (row of hourRows; track row.topRow) {\n <div class=\"flex items-start justify-end min-h-0 overflow-hidden pr-2 text-[11px] tabular-nums opacity-50\"\n [style.grid-row]=\"row.topRow + '/' + row.bottomRow\">\n {{ row.hourLabel }}\n </div>\n }\n </div>\n <div class=\"grid relative auto-rows-fr h-full min-h-0\"\n [style.grid-template-rows]=\"'repeat(' + totalRows + ', minmax(1.5rem, 1fr))'\"\n [style.grid-template-columns]=\"'repeat(' + totalColumns + ', 1fr)'\">\n @for (row of hourRows; track row.topRow) {\n <div class=\"border-t border-base-200 pointer-events-none min-h-0\"\n [style.grid-row]=\"row.topRow + '/' + row.bottomRow\"\n [style.grid-column]=\"'1 / -1'\">\n </div>\n }\n @if (currentTimeRow > 0 && isToday) {\n <div class=\"relative z-[2] pointer-events-none\"\n [style.grid-row]=\"currentTimeRow\"\n [style.grid-column]=\"'1 / -1'\">\n <div class=\"absolute -left-1 -top-1 h-2 w-2 rounded-full bg-error\"></div>\n <div class=\"h-0.5 w-full bg-error\"></div>\n <div class=\"absolute left-0 top-0 -translate-x-2 -translate-y-1/2 rounded-full bg-error px-1.5 py-0.5 text-[10px] font-bold tabular-nums text-error-content shadow\">{{ currentTimeLabel }}</div>\n </div>\n }\n @for (event of displayEvents; track $index) {\n <div class=\"z-[1] min-h-0 overflow-hidden rounded-lg p-0.5 focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-primary\"\n [style.grid-row]=\"getEventRow(event)\"\n [style.grid-column]=\"getEventColumn(event)\"\n (click)=\"onEventClick(event)\"\n (keyup.enter)=\"onEventClick(event)\"\n tabindex=\"0\">\n <mn-calendar-event [customComponent]=\"calendarEventComponent\" [event]=\"event\"></mn-calendar-event>\n </div>\n }\n </div>\n </div>\n</div>\n","import {\n ChangeDetectorRef,\n Component,\n DestroyRef,\n Input,\n OnChanges,\n OnInit,\n Output,\n EventEmitter,\n SimpleChanges,\n inject,\n} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { CalendarEvent } from 'mn-angular-lib/calendar-core';\nimport { CALENDAR_DATE_FORMATTER, CalendarDateFormatter } from 'mn-angular-lib/calendar-core';\nimport { DefaultCalendarDateFormatter } from 'mn-angular-lib/calendar-core';\nimport { MnLanguageService } from 'mn-angular-lib/core';\nimport { skip } from 'rxjs';\n\n/**\n * Renders a single row in the upcoming-events sidebar.\n * Shows the event title, formatted date/time, and optional description.\n *\n * Times are reformatted whenever the `event` input changes and whenever the\n * locale changes: parents often reuse the row with `@for (…; track $index)`, so\n * formatting only in `ngOnInit` left stale times on the rail after a day switch.\n */\n@Component({\n selector: 'mn-upcoming-event-row',\n standalone: true,\n imports: [CommonModule],\n templateUrl: './upcoming-event-row.component.html',\n})\nexport class UpcomingEventRowComponent implements OnInit, OnChanges {\n /** The event to display. */\n @Input() event!: CalendarEvent;\n /** Emits the event when this row is clicked. */\n @Output() eventClicked = new EventEmitter<CalendarEvent>();\n\n formattedDate = '';\n\n private formatter: CalendarDateFormatter;\n\n /** Marks the view when the awaited time string lands (see {@link refreshFormattedDate}). */\n private readonly cdr = inject(ChangeDetectorRef);\n private readonly lang = inject(MnLanguageService);\n private readonly destroyRef = inject(DestroyRef);\n\n /** Bumps so an in-flight format from a previous event/locale is ignored. */\n private formatGeneration = 0;\n\n constructor() {\n const formatter = inject<CalendarDateFormatter | null>(CALENDAR_DATE_FORMATTER, {\n optional: true,\n });\n\n this.formatter = formatter ?? new DefaultCalendarDateFormatter();\n }\n\n ngOnInit() {\n const sub = this.lang.locale$.pipe(skip(1)).subscribe(() => {\n void this.refreshFormattedDate();\n });\n this.destroyRef.onDestroy(() => sub.unsubscribe());\n void this.refreshFormattedDate();\n }\n\n ngOnChanges(changes: SimpleChanges) {\n if (changes['event'] && !changes['event'].firstChange) {\n void this.refreshFormattedDate();\n }\n }\n\n /**\n * Formats the current event's start/end times into {@link formattedDate}.\n * Generation-guarded so a slow format for an older event cannot overwrite a newer one.\n */\n private async refreshFormattedDate(): Promise<void> {\n const generation = ++this.formatGeneration;\n if (!this.event) {\n this.formattedDate = '';\n this.cdr.markForCheck();\n return;\n }\n const start = await this.formatter.formatTime(this.event.startTime);\n const end = await this.formatter.formatTime(this.event.endTime);\n if (generation !== this.formatGeneration) {\n return;\n }\n this.formattedDate = `${start} - ${end}`;\n // The first render already happened with the empty string; nothing schedules a second\n // one for a value written after an await. Same fix as calendar-event-default.\n this.cdr.markForCheck();\n }\n}\n","<!-- Sidebar row in the shared chip language: a colored rail from the event's own\n colour, a hover wash, and space-grouped content — no boxed borders. -->\n<div (click)=\"eventClicked.emit(event)\"\n (keyup.enter)=\"eventClicked.emit(event)\"\n class=\"grid grid-cols-[3px_1fr] items-stretch gap-2.5 mb-1.5 cursor-pointer rounded-lg p-2 transition-colors hover:bg-base-200 focus-visible:outline-2 focus-visible:outline-offset-[-2px] focus-visible:outline-primary motion-reduce:transition-none\"\n tabindex=\"0\">\n <div class=\"rounded-full\" [style.background-color]=\"event.color.primaryColor\"></div>\n <div class=\"min-w-0\">\n <div class=\"line-clamp-2 break-words text-[13px] font-semibold\">{{ event.title }}</div>\n <div class=\"text-xs tabular-nums opacity-60\">{{ formattedDate }}</div>\n @if (event.description) {\n <div class=\"line-clamp-2 break-words text-xs opacity-50\">{{ event.description }}</div>\n }\n </div>\n</div>\n","import {\n ChangeDetectorRef,\n Component,\n EventEmitter,\n inject,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Output,\n SimpleChanges,\n} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { Observable, Subject, takeUntil } from 'rxjs';\nimport { CalendarEvent } from 'mn-angular-lib/calendar-core';\nimport {\n CalendarConfig,\n DEFAULT_CALENDAR_CONFIG,\n resolveCalendarConfig,\n} from 'mn-angular-lib/calendar-core';\nimport { UpcomingEventRowComponent } from '../upcoming-event-row/upcoming-event-row.component';\nimport { MnLanguageService } from 'mn-angular-lib/core';\nimport { MnBadge } from 'mn-angular-lib/button';\n\n/**\n * Sidebar component that lists the next 10 upcoming events\n * (events whose end time is in the future), sorted by start time.\n */\n@Component({\n selector: 'mn-upcoming-events',\n standalone: true,\n imports: [CommonModule, UpcomingEventRowComponent, MnBadge],\n templateUrl: './upcoming-events.component.html',\n})\nexport class UpcomingEventsComponent implements OnInit, OnChanges, OnDestroy {\n private readonly lang = inject(MnLanguageService);\n private readonly cdr = inject(ChangeDetectorRef);\n\n /**\n * Accessible name for this control. Resolved through the conventional\n * `mnCalendar.upcomingEvents` key so an app can translate it, falling back to English when the\n * key is not defined rather than leaking the raw key into the UI.\n */\n get upcomingEventsLabel(): string {\n return this.lang.translateIfPresent('mnCalendar.upcomingEvents') ?? 'Upcoming events';\n }\n\n /** Observable that emits the full event list whenever it changes. */\n @Input() eventsChanged!: Observable<CalendarEvent[]>;\n /** Resolved calendar configuration passed from the parent view. */\n @Input() config?: CalendarConfig;\n /** Emits when an upcoming event row is clicked. */\n @Output() eventClicked = new EventEmitter<CalendarEvent>();\n\n upcomingEvents: CalendarEvent[] = [];\n title: string;\n noEventsMessage: string;\n\n private destroy$ = new Subject<void>();\n\n constructor() {\n this.title = DEFAULT_CALENDAR_CONFIG.upcomingEventsTitle;\n this.noEventsMessage = DEFAULT_CALENDAR_CONFIG.noUpcomingEvents;\n }\n\n /** Re-read labels when the config input changes (e.g. after a locale switch). */\n ngOnChanges(changes: SimpleChanges) {\n if (changes['config'] && this.config) {\n const resolved = resolveCalendarConfig(this.config);\n this.title = resolved.upcomingEventsTitle;\n this.noEventsMessage = resolved.noUpcomingEvents;\n }\n }\n\n ngOnInit() {\n const resolved = this.config\n ? resolveCalendarConfig(this.config)\n : { ...DEFAULT_CALENDAR_CONFIG };\n this.title = resolved.upcomingEventsTitle;\n this.noEventsMessage = resolved.noUpcomingEvents;\n\n // Marked because the list is a plain field: in a zoneless app a stream emission is not by\n // itself a reason for Angular to re-render, so the sidebar would keep showing the events it\n // was first given.\n if (this.eventsChanged) {\n this.eventsChanged.pipe(takeUntil(this.destroy$)).subscribe((events) => {\n const now = new Date();\n this.upcomingEvents = events\n .filter((e) => e.endTime > now)\n .sort((a, b) => a.startTime.getTime() - b.startTime.getTime())\n .slice(0, 10);\n this.cdr.markForCheck();\n });\n }\n }\n\n ngOnDestroy() {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n /** trackBy for upcoming event rows. */\n trackByEvent(_index: number, event: CalendarEvent): string {\n return event.id;\n }\n}\n","<div [attr.aria-label]=\"upcomingEventsLabel\" class=\"p-4\" role=\"complementary\">\n <div class=\"mb-3 flex items-center gap-2\">\n <h3 class=\"text-sm font-bold tracking-wide\">{{ title }}</h3>\n @if (upcomingEvents.length) {\n <span mnBadge [data]=\"{ size: 'sm', color: 'accent', variant: 'fill' }\" class=\"tabular-nums\">{{ upcomingEvents.length }}</span>\n }\n </div>\n @for (event of upcomingEvents; track $index) {\n <mn-upcoming-event-row\n [event]=\"event\"\n (eventClicked)=\"eventClicked.emit($event)\">\n </mn-upcoming-event-row>\n }\n @if (upcomingEvents.length === 0) {\n <div class=\"text-sm opacity-50\">{{ noEventsMessage }}</div>\n }\n</div>\n","import {\n ChangeDetectorRef,\n Component,\n DestroyRef,\n EventEmitter,\n HostListener,\n inject,\n Input,\n OnDestroy,\n OnInit,\n Output,\n Type,\n} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { LucideDynamicIcon } from '@lucide/angular';\nimport { BehaviorSubject, skip, Subject, takeUntil } from 'rxjs';\nimport { CalendarButton, CalendarEvent } from 'mn-angular-lib/calendar-core';\nimport { CalendarEventData } from 'mn-angular-lib/calendar-core';\nimport {\n CALENDAR_CONFIG,\n CalendarConfig,\n CalendarView,\n DEFAULT_CALENDAR_CONFIG,\n MN_CALENDAR_CONFIG,\n provideMnCalendarConfig,\n resolveCalendarConfig,\n} from 'mn-angular-lib/calendar-core';\nimport { MnLanguageService } from 'mn-angular-lib/core';\nimport { CalendarMonthComponent } from '../calendar-month/calendar-month.component';\nimport { CalendarWeekComponent } from '../calendar-week/calendar-week.component';\nimport { CalendarDayComponent } from '../calendar-day/calendar-day.component';\nimport { UpcomingEventsComponent } from '../upcoming-events/upcoming-events.component';\nimport { MnButton } from 'mn-angular-lib/button';\nimport { MnDatetime } from 'mn-angular-lib/forms';\nimport * as lucide from 'lucide';\nimport { lucideIcons } from 'mn-angular-lib/core';\n\n/** Lucide icons this file renders. */\nconst ICONS = lucideIcons({ ChevronLeft: lucide.ChevronLeft, ChevronRight: lucide.ChevronRight });\n\n/** Gives each calendar instance a unique id to tie its tabs to its view panel. */\nlet instanceCounter = 0;\n\n/**\n * Main calendar orchestrator component.\n *\n * Provides a toolbar with view switching (month / week / day), date navigation,\n * and an optional action button. The active view and an upcoming-events sidebar\n * are rendered inside a responsive grid layout.\n *\n * All configuration (visible hours, locale, labels, mobile breakpoint) is read\n * from the `mn-config.json5` system via {@link MN_CALENDAR_CONFIG}, falling back\n * to the legacy {@link CALENDAR_CONFIG} injection token, then to built-in defaults.\n * Date formatting is delegated to the {@link CALENDAR_DATE_FORMATTER} token.\n *\n * @example\n * ```html\n * <mn-calendar-view\n * [showButton]=\"true\"\n * [buttonTitle]=\"'New Event'\"\n * [NewCalendarItemsEvent]=\"eventsEmitter\"\n * (RequestNewCalendarItemsEvent)=\"loadEvents($event)\"\n * (CalendarItemClickedEvent)=\"onEventClick($event)\"\n * (ButtonClickedEvent)=\"openModal()\">\n * </mn-calendar-view>\n * ```\n */\n@Component({\n selector: 'mn-calendar-view',\n standalone: true,\n imports: [\n CommonModule,\n FormsModule,\n CalendarMonthComponent,\n CalendarWeekComponent,\n CalendarDayComponent,\n UpcomingEventsComponent,\n MnButton,\n MnDatetime,\n LucideDynamicIcon,\n ],\n templateUrl: './calendar-view.component.html',\n providers: [provideMnCalendarConfig(DEFAULT_CALENDAR_CONFIG)],\n styles: [\n `\n :host {\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n }\n `,\n ],\n})\nexport class CalendarViewComponent implements OnInit, OnDestroy {\n /** Lucide icons the template renders. */\n protected readonly icons = ICONS;\n\n /**\n * Accessible name for this control. Resolved through the conventional\n * `mnCalendar.calendarView` key so an app can translate it, falling back to English when the\n * key is not defined rather than leaking the raw key into the UI.\n */\n get calendarViewLabel(): string {\n return this.lang.translateIfPresent('mnCalendar.calendarView') ?? 'Calendar view';\n }\n\n /** Whether to show the action button in the toolbar. */\n @Input() showButton = false;\n /** Label text for the action button. */\n @Input() buttonTitle = '';\n /** Array of buttons to display in the toolbar's top-right area. */\n @Input() buttons: CalendarButton[] = [];\n /** Custom event renderer component type. */\n @Input() CalendarEventComponent?: Type<CalendarEventData>;\n /** Observable or EventEmitter that pushes new event arrays into the calendar. */\n @Input() NewCalendarItemsEvent?: EventEmitter<CalendarEvent[]>;\n\n /** Emits when the calendar needs fresh event data (e.g. after navigation). */\n @Output() RequestNewCalendarItemsEvent = new EventEmitter<Date>();\n /** Emits when a calendar event is clicked. */\n @Output() CalendarItemClickedEvent = new EventEmitter<CalendarEvent>();\n /** Emits when the action button is clicked. */\n @Output() ButtonClickedEvent = new EventEmitter<void>();\n\n readonly CalendarView = CalendarView;\n /** Ties the view tabs to the panel they control, uniquely per calendar. */\n readonly panelId = `mn-calendar-panel-${++instanceCounter}`;\n currentView = CalendarView.WEEK;\n focusDay = new Date();\n viewOptions: { value: CalendarView; label: string }[] = [];\n isMobileView = false;\n\n /** BehaviorSubject so late-subscribing child views receive the last emitted events. */\n internalEventsChanged = new BehaviorSubject<CalendarEvent[]>([]);\n /** Subject for broadcasting focus-day changes to child views. */\n internalFocusDayChanged = new Subject<Date>();\n\n private destroy$ = new Subject<void>();\n protected config: CalendarConfig;\n /** Reference to the injected mn-config object (mutated in-place on locale change). */\n private readonly mnConfigRef: CalendarConfig | null;\n private readonly destroyRef = inject(DestroyRef);\n private readonly lang = inject(MnLanguageService);\n private readonly cdr = inject(ChangeDetectorRef);\n\n constructor() {\n const mnConfig = inject<CalendarConfig | null>(MN_CALENDAR_CONFIG, { optional: true });\n const legacyConfig = inject<CalendarConfig | null>(CALENDAR_CONFIG, { optional: true });\n\n // Keep a reference to the injected config so we can re-read it after locale changes.\n this.mnConfigRef = mnConfig;\n // Priority: mn-config system > legacy CALENDAR_CONFIG > built-in defaults\n const raw = mnConfig ?? legacyConfig ?? undefined;\n this.config = resolveCalendarConfig(raw as Partial<CalendarConfig> | undefined);\n }\n\n @HostListener('window:resize')\n onResize() {\n this.checkMobileView();\n }\n\n ngOnInit() {\n this.rebuildFromConfig();\n\n // Re-resolve config when locale changes (supports $translate in mn-config). Marked because\n // the labels it rebuilds are plain fields: a locale switch arrives on a stream, which in a\n // zoneless app is not by itself a reason for Angular to re-render the toolbar.\n const sub = this.lang.locale$.pipe(skip(1)).subscribe(() => {\n this.rebuildFromConfig();\n this.cdr.markForCheck();\n });\n this.destroyRef.onDestroy(() => sub.unsubscribe());\n\n this.checkMobileView();\n this.RequestNewCalendarItemsEvent.emit(this.focusDay);\n\n if (this.NewCalendarItemsEvent) {\n this.NewCalendarItemsEvent.pipe(takeUntil(this.destroy$)).subscribe((events) => {\n this.internalEventsChanged.next(events);\n });\n }\n }\n\n ngOnDestroy() {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n /** Switches the active view (gM2XdeMo: allowed on mobile too). */\n switchView(view: CalendarView) {\n this.currentView = view;\n }\n\n /**\n * Names the stretch of time on screen — the day, the week, or the month. It is\n * the toolbar's orientation: without it, navigating leaves you somewhere with\n * no label. Announced politely, so stepping through says where you landed.\n */\n get periodLabel(): string {\n const locale = this.config.locale;\n\n if (this.currentView === CalendarView.MONTH) {\n return this.focusDay.toLocaleDateString(locale, { month: 'long', year: 'numeric' });\n }\n\n if (this.currentView === CalendarView.DAY) {\n // No weekday: the view's own column header already says which day it is,\n // and the year only earns its place once it stops being the obvious one.\n return this.focusDay.toLocaleDateString(locale, {\n day: 'numeric',\n month: 'long',\n ...(this.focusDay.getFullYear() !== new Date().getFullYear() ? { year: 'numeric' } : {}),\n });\n }\n\n const start = this.startOfWeek(this.focusDay);\n const end = new Date(start);\n end.setDate(end.getDate() + 6);\n // Only repeat what actually changes across the week's two ends.\n const from =\n start.getFullYear() !== end.getFullYear()\n ? start.toLocaleDateString(locale, { day: 'numeric', month: 'short', year: 'numeric' })\n : start.toLocaleDateString(locale, {\n day: 'numeric',\n ...(start.getMonth() !== end.getMonth() ? { month: 'short' } : {}),\n });\n const to = end.toLocaleDateString(locale, { day: 'numeric', month: 'short', year: 'numeric' });\n return `${from} – ${to}`;\n }\n\n /** The focus day as YYYY-MM-DD, for the toolbar's date picker. */\n get focusDayString(): string {\n const pad = (n: number) => n.toString().padStart(2, '0');\n const d = this.focusDay;\n return `${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDate())}`;\n }\n\n /**\n * Steps the calendar by one unit of whatever is on screen: a day in day view,\n * a week in week view, a month in month view. Navigating by the visible unit is\n * what makes one pair of arrows serve all three.\n */\n navigate(step: number) {\n const next = new Date(this.focusDay);\n\n switch (this.currentView) {\n case CalendarView.DAY:\n next.setDate(next.getDate() + step);\n break;\n case CalendarView.WEEK:\n next.setDate(next.getDate() + step * 7);\n break;\n default:\n this.setFocusDay(this.addMonths(this.focusDay, step));\n return;\n }\n\n this.setFocusDay(next);\n }\n\n /** Returns the calendar to today. */\n goToToday() {\n this.setFocusDay(new Date());\n }\n\n /**\n * Handles the toolbar date picker.\n * @param value The date string in YYYY-MM-DD format.\n */\n onPickDate(value: string) {\n if (!value) return;\n const picked = new Date(value + 'T00:00:00');\n if (isNaN(picked.getTime())) return;\n this.setFocusDay(picked);\n }\n\n /** Handles a day click from the month view — switches to day view. */\n onMonthDayClick(date: Date) {\n this.currentView = CalendarView.DAY;\n this.setFocusDay(date);\n }\n\n /** Forwards a child event click to the parent output. */\n onEventClick(event: CalendarEvent) {\n this.CalendarItemClickedEvent.emit(event);\n }\n\n /** trackBy for view option buttons. */\n trackByView(_index: number, item: { value: CalendarView }): string {\n return item.value;\n }\n\n /** Rebuilds view options and labels from the current config. */\n private rebuildFromConfig() {\n // Re-resolve from the injected config reference which is mutated in-place by the provider on locale change.\n if (this.mnConfigRef) {\n this.config = resolveCalendarConfig(this.mnConfigRef as Partial<CalendarConfig>);\n }\n this.viewOptions = [\n { value: CalendarView.MONTH, label: this.config.viewLabels['MONTH'] ?? 'Month' },\n { value: CalendarView.WEEK, label: this.config.viewLabels['WEEK'] ?? 'Week' },\n { value: CalendarView.DAY, label: this.config.viewLabels['DAY'] ?? 'Day' },\n ];\n }\n\n private checkMobileView() {\n const wasMobile = this.isMobileView;\n const width = window.innerWidth;\n // Honour the configured mobile breakpoint (default 768) rather than a hard-coded\n // width: a seven-column week is cramped well before a phone's width, so the day\n // view takes over earlier — and consumers can tune where via `mobileBreakpoint`.\n const breakpoint = this.config.mobileBreakpoint;\n this.isMobileView = width < breakpoint;\n if (this.isMobileView && !wasMobile) {\n this.currentView = CalendarView.DAY;\n }\n }\n\n /**\n * Adds months without the end-of-month overflow `setMonth` alone produces —\n * 31 January plus one month is 28 February, not 3 March.\n */\n private addMonths(date: Date, months: number): Date {\n const day = date.getDate();\n const shifted = new Date(date);\n shifted.setDate(1);\n shifted.setMonth(shifted.getMonth() + months);\n const lastDayOfMonth = new Date(shifted.getFullYear(), shifted.getMonth() + 1, 0).getDate();\n shifted.setDate(Math.min(day, lastDayOfMonth));\n return shifted;\n }\n\n /** Monday of the week containing `date`, matching the grid the views draw. */\n private startOfWeek(date: Date): Date {\n const start = new Date(date);\n start.setHours(0, 0, 0, 0);\n start.setDate(start.getDate() - ((start.getDay() + 6) % 7));\n return start;\n }\n\n private setFocusDay(date: Date) {\n this.focusDay = date;\n this.internalFocusDayChanged.next(date);\n this.RequestNewCalendarItemsEvent.emit(date);\n }\n}\n","<div class=\"w-full h-full flex flex-col\" role=\"application\" aria-label=\"Calendar\">\n\n <!-- Toolbar has one layout below the desktop (`lg`) width and one at it. Below\n `lg`: a controls row (Today anchored left, the right-hand cluster anchored\n right) with the ‹ date › nav centred on its own row beneath — the same\n shape from phone through tablet, so nothing wraps into a lopsided diagonal.\n At `lg`, where the upcoming-events sidebar also appears, the nav folds up\n inline after Today and the whole toolbar becomes a single row. The one JS\n breakpoint (`mobileBreakpoint`) governs the phone controls — icon-only\n picker, day default on first narrow enter — not the toolbar's shape. -->\n <div class=\"flex flex-wrap items-center gap-x-3 gap-y-2 py-3\">\n\n <button (click)=\"goToToday()\"\n [data]=\"{ variant: 'outline', size: 'md', color: 'primary' }\"\n class=\"shrink-0\"\n mnButton\n type=\"button\">\n {{ config.todayLabel }}\n </button>\n\n <!-- Stepping through time. The arrows sit either side of the date they move,\n so the control and the thing it controls read as one unit. Below `lg` it\n sits centred on its own row (basis-full, ordered last) — a period header\n above the grid, tight rather than flinging the arrows to the row's edges.\n At `lg` it folds inline right after Today, taking a stable min-width so\n the arrows don't jitter as the label's length changes. -->\n <div class=\"flex basis-full order-last justify-center items-center gap-1\n lg:basis-auto lg:order-none lg:justify-start\">\n <button (click)=\"navigate(-1)\"\n [attr.aria-label]=\"config.previousLabel\"\n [data]=\"{ variant: 'text', size: 'md', color: 'gray' }\"\n class=\"shrink-0\"\n mnButton\n type=\"button\">\n <svg [size]=\"18\" [lucideIcon]=\"icons.ChevronLeft\"></svg>\n </button>\n\n <h2 aria-live=\"polite\"\n class=\"text-center text-base font-semibold whitespace-nowrap px-1 lg:min-w-56\">\n {{ periodLabel }}\n </h2>\n\n <button (click)=\"navigate(1)\"\n [attr.aria-label]=\"config.nextLabel\"\n [data]=\"{ variant: 'text', size: 'md', color: 'gray' }\"\n class=\"shrink-0\"\n mnButton\n type=\"button\">\n <svg [size]=\"18\" [lucideIcon]=\"icons.ChevronRight\"></svg>\n </button>\n </div>\n\n <!-- Right-hand controls travel together as one cluster with `ml-auto`, so they\n hold to the right of the row on every width — and when space runs short the\n whole group wraps to a new line as a unit rather than stranding a lone\n button. On desktop the cluster lands above the upcoming-events sidebar,\n using that otherwise-empty space. -->\n <div class=\"ml-auto flex items-center gap-2\">\n <!-- On mobile the picker collapses to its icon-only variant. -->\n <mn-lib-datetime (ngModelChange)=\"onPickDate($event)\"\n [ngModel]=\"focusDayString\"\n [props]=\"{ id: panelId + '-date', mode: 'date', placeholder: config.pickDateLabel, size: 'md', borderRadius: 'lg', hover: true, iconOnly: isMobileView }\"\n class=\"block\"></mn-lib-datetime>\n\n <!-- View switcher (month / week / day). Always shown (gM2XdeMo) — mobile still\n defaults to day on first narrow enter, but the user can switch views. -->\n <div [attr.aria-label]=\"calendarViewLabel\" class=\"flex border border-base-300 rounded-md overflow-hidden\"\n role=\"tablist\">\n @for (view of viewOptions; track view.value) {\n <button\n (click)=\"switchView(view.value)\"\n [attr.aria-controls]=\"panelId\"\n [attr.aria-selected]=\"currentView === view.value\"\n [class.text-base-content!]=\"currentView !== view.value\"\n [class.font-semibold]=\"currentView === view.value\"\n [data]=\"{ size: 'md', variant: currentView === view.value ? 'fill' : 'text', color: 'primary' }\"\n mnButton\n role=\"tab\"\n type=\"button\">\n {{ view.label }}\n </button>\n }\n </div>\n\n <!-- Action buttons (custom buttons + optional showButton CTA). -->\n @if (buttons.length || showButton) {\n @for (btn of buttons; track btn.label) {\n <button (click)=\"btn.onClick()\" [data]=\"btn.buttonData || {}\" mnButton type=\"button\">\n {{ btn.label }}\n </button>\n }\n @if (showButton) {\n <button (click)=\"ButtonClickedEvent.emit()\" [data]=\"{}\" mnButton type=\"button\">\n {{ buttonTitle }}\n </button>\n }\n }\n </div>\n\n </div>\n\n <div class=\"grid grid-cols-1 lg:grid-cols-[1fr_220px] gap-3 flex-1 min-h-0\">\n <div [id]=\"panelId\" class=\"min-w-0 min-h-0 overflow-hidden overflow-y-auto\" role=\"tabpanel\">\n @if (currentView === CalendarView.MONTH) {\n <mn-calendar-month\n [focusDay]=\"focusDay\"\n [eventsChanged]=\"internalEventsChanged\"\n [focusDayChanged]=\"internalFocusDayChanged\"\n [config]=\"config\"\n (dayClicked)=\"onMonthDayClick($event)\">\n </mn-calendar-month>\n }\n @if (currentView === CalendarView.WEEK) {\n <mn-calendar-week\n [focusDay]=\"focusDay\"\n [eventsChanged]=\"internalEventsChanged\"\n [focusDayChanged]=\"internalFocusDayChanged\"\n [config]=\"config\"\n [calendarEventComponent]=\"CalendarEventComponent\"\n (eventClicked)=\"onEventClick($event)\">\n </mn-calendar-week>\n }\n @if (currentView === CalendarView.DAY) {\n <mn-calendar-day\n [focusDay]=\"focusDay\"\n [eventsChanged]=\"internalEventsChanged\"\n [focusDayChanged]=\"internalFocusDayChanged\"\n [config]=\"config\"\n [calendarEventComponent]=\"CalendarEventComponent\"\n (eventClicked)=\"onEventClick($event)\">\n </mn-calendar-day>\n }\n </div>\n <div class=\"hidden lg:block border-l border-base-300 overflow-auto\">\n <mn-upcoming-events\n [eventsChanged]=\"internalEventsChanged\"\n [config]=\"config\"\n (eventClicked)=\"onEventClick($event)\">\n </mn-upcoming-events>\n </div>\n </div>\n\n</div>\n","import {\n afterNextRender,\n ChangeDetectionStrategy,\n Component,\n computed,\n DestroyRef,\n ElementRef,\n inject,\n Injector,\n input,\n linkedSignal,\n OnInit,\n output,\n signal,\n viewChildren,\n} from '@angular/core';\nimport {CommonModule} from '@angular/common';\nimport {FormsModule} from '@angular/forms';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport { LucideDynamicIcon } from '@lucide/angular';\nimport {MnButton} from 'mn-angular-lib/button';\nimport {MnDatetime} from 'mn-angular-lib/forms';\nimport {MnLanguageService} from 'mn-angular-lib/core';\nimport * as lucide from 'lucide';\nimport { lucideIcons } from 'mn-angular-lib/core';\n\n/** Lucide icons this file renders. */\nconst ICONS = lucideIcons({ ChevronLeft: lucide.ChevronLeft, ChevronRight: lucide.ChevronRight });\n\n/**\n * How the bar arranges itself at its current width.\n *\n * - `inline` — the day strip and Today share one row, under the month header. The\n * strip never stacks: as space runs out it shows fewer days rather than adding a\n * row.\n * - `compact` — too narrow even for a three-day strip, so the days give way to a\n * date picker sitting beside Today, still under the month header.\n *\n * Resolved from the bar's own width — not the viewport — so a bar in a narrow\n * sidebar lays itself out like a phone even on a wide screen.\n */\nexport type DateSelectorBarLayout = 'compact' | 'inline';\n\n/** Represents a single day tile in the date selector. */\nexport type DayTile = {\n /** The full date object (at midnight). */\n date: Date;\n /** Short day name (e.g. 'ma', 'Mon'). */\n dayName: string;\n /** Day-of-month number. */\n dayNumber: number;\n /** Short month name (e.g. 'mei', 'Jun'). */\n monthName: string;\n /**\n * Whether this tile is the first day of a month within the visible strip. The\n * days either side of it move apart, so the break is visible without a label —\n * the month header above the strip names both months.\n */\n startsNewMonth: boolean;\n /** Whether this tile is the currently selected date. */\n isSelected: boolean;\n /** Whether this tile represents today. */\n isToday: boolean;\n /** Full, locale-formatted date used as the tile's accessible name. */\n accessibleLabel: string;\n};\n\n/** A full week: the most days the strip shows, and the size it aligns to. */\nconst DAYS_IN_WEEK = 7;\n/** Fewest days worth showing before the picker takes over instead. */\nconst MIN_TILE_COUNT = 3;\n/** `Date.getDay()` value for Monday. */\nconst MONDAY = 1;\n/**\n * Width one day occupies. Days are sized by their content: a three-letter weekday\n * and a two-digit number at their set sizes measure about 72px including padding,\n * plus the `gap-1` beside it. Rounded up, because coming in under the real width\n * overflows the strip into the arrow beside it.\n */\nconst TILE_SLOT_WIDTH = 80;\n/** Space reserved for the two borderless window arrows and their gaps. */\nconst ARROWS_ZONE_WIDTH = 88;\n/**\n * Space the Today button claims, including the bar's own horizontal padding and\n * the gap beside it.\n */\nconst CONTROLS_ZONE_WIDTH = 150;\n/**\n * Everything on the controls row that isn't a day tile. The month is a full-width\n * header on its own line now, so it no longer competes with the days for room —\n * which is why more of them fit at a given width than they used to.\n */\nconst RESERVED_WIDTH = ARROWS_ZONE_WIDTH + CONTROLS_ZONE_WIDTH;\n/** Below this the strip can't hold even {@link MIN_TILE_COUNT} days. */\nconst COMPACT_MAX_WIDTH = MIN_TILE_COUNT * TILE_SLOT_WIDTH + RESERVED_WIDTH;\n/** Assumed width before the first measurement (and during server-side rendering). */\nconst UNMEASURED_WIDTH = 960;\n\n/** Counter used to give each bar instance a unique date-picker id. */\nlet instanceCounter = 0;\n\n/**\n * Reusable, responsive date selector bar.\n *\n * Renders a \"Today\" button, a month header, previous/next arrows and a strip of\n * day tiles. Selecting a tile or pressing \"Today\" emits the chosen day via\n * {@link dateSelected}. The arrows only shift the visible days and never emit.\n *\n * Given room, the strip is a whole week running Monday to Sunday, so the weekday\n * columns hold still as you page and no weekday appears twice. As the bar narrows\n * it shows fewer days rather than adding a second row — a partial strip has no\n * week to align to, so it slides to keep the selection in view instead. Narrower\n * still, and the days give way to a date picker beside Today, which keeps every\n * date reachable on a phone rather than leaving a strip too cramped to use.\n *\n * Selecting a day already on the strip leaves it exactly where it is; a selection\n * from outside moves the strip to where that day is. The arrows page by whatever\n * is on show, without touching the selection.\n *\n * The component carries no hard-coded copy: button, placeholder and assistive\n * text are supplied through the label inputs, and day/month names follow\n * {@link locale} (falling back to the active {@link MnLanguageService} locale).\n *\n * @example\n * ```html\n * <mn-date-selector-bar\n * [selectedDate]=\"focusDay\"\n * [todayLabel]=\"'Today'\"\n * [pickDateLabel]=\"'Pick a date'\"\n * [locale]=\"'nl-NL'\"\n * (dateSelected)=\"onDaySelected($event)\">\n * </mn-date-selector-bar>\n * ```\n */\n@Component({\n selector: 'mn-date-selector-bar',\n standalone: true,\n imports: [\n CommonModule,\n FormsModule,\n MnButton,\n MnDatetime,\n LucideDynamicIcon,\n ],\n templateUrl: './mn-date-selector-bar.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n // Styling lives entirely in the template as Tailwind utilities, as elsewhere in\n // the library — there is no stylesheet for this component.\n host: {class: 'block'},\n})\nexport class MnDateSelectorBar implements OnInit {\n /** Lucide icons the template renders. */\n protected readonly icons = ICONS;\n\n /** The currently selected date, provided by the parent. */\n readonly selectedDate = input<Date>(this.getToday());\n /** Label for the \"Today\" button. */\n readonly todayLabel = input<string>('Today');\n /** Placeholder for the date picker shown in place of a too-cramped week strip. */\n readonly pickDateLabel = input<string>('Pick a date');\n /** Accessible name for the previous-week arrow. */\n readonly previousLabel = input<string>('Show the previous week');\n /** Accessible name for the next-week arrow. */\n readonly nextLabel = input<string>('Show the next week');\n /** Accessible name for the day strip as a whole. */\n readonly dayStripLabel = input<string>('Select a day');\n /**\n * BCP 47 locale used to format day/month names. When empty, the active\n * {@link MnLanguageService} locale is used.\n */\n readonly locale = input<string>('');\n /** Emits when the user selects a new date. */\n readonly dateSelected = output<Date>();\n\n /** Unique id for this instance's date picker, so several bars can coexist. */\n readonly pickerId = `mn-dsb-date-${++instanceCounter}`;\n\n private readonly destroyRef = inject(DestroyRef);\n private readonly injector = inject(Injector);\n private readonly host = inject(ElementRef<HTMLElement>);\n private readonly lang = inject(MnLanguageService);\n\n private readonly tileButtons = viewChildren<ElementRef<HTMLButtonElement>>('tileButton');\n\n /** The bar's own width in px, tracked so the layout follows its container. */\n private readonly containerWidth = signal<number>(0);\n /** Bumped whenever the active language changes so name formatting re-runs. */\n private readonly localeTick = signal(0);\n\n /** How the bar is arranged at the current width. */\n readonly layout = computed<DateSelectorBarLayout>(() =>\n (this.containerWidth() || UNMEASURED_WIDTH) >= COMPACT_MAX_WIDTH ? 'inline' : 'compact',\n );\n\n /** Whether the day strip is shown, or the picker has taken its place. */\n readonly showDayStrip = computed<boolean>(() => this.layout() === 'inline');\n\n /**\n * Days in the visible strip: a full week where there's room, fewer as the bar\n * narrows. The bar drops days rather than adding a second row, so it stays one\n * line at every width it can.\n */\n readonly tileCount = computed<number>(() => {\n if (!this.showDayStrip()) return 0;\n const width = this.containerWidth() || UNMEASURED_WIDTH;\n const fits = Math.floor((width - RESERVED_WIDTH) / TILE_SLOT_WIDTH);\n return Math.min(DAYS_IN_WEEK, Math.max(MIN_TILE_COUNT, fits));\n });\n\n\n /** Effective locale: explicit input, else the active app locale. */\n private readonly effectiveLocale = computed<string>(() => {\n this.localeTick();\n return this.locale() || this.lang.locale;\n });\n\n /**\n * First day of the visible strip — the week's Monday when a whole week is on\n * show, otherwise whatever start keeps the selection in view.\n *\n * The strip holds still while the selection stays on screen; a selection\n * outside it moves to where that day is. The arrows write here directly to page\n * away from the selection.\n */\n private readonly windowStart = linkedSignal<{selected: number; count: number}, Date>({\n source: () => ({selected: this.selectedDate().getTime(), count: this.tileCount()}),\n computation: (source, previous) => {\n const selected = new Date(source.selected);\n const {count} = source;\n const anchored = this.anchorFor(selected, count);\n if (!previous || count === 0) return anchored;\n\n const current = previous.value;\n const holdsSelection = (() => {\n const offset = this.daysBetween(current, selected);\n return offset >= 0 && offset < count;\n })();\n\n // A whole week must also still be Monday-aligned to be worth keeping —\n // otherwise a strip that grew back to seven would keep a stale start.\n const stillValid = count === DAYS_IN_WEEK\n ? holdsSelection && current.getDay() === MONDAY\n : holdsSelection;\n\n return stillValid ? current : anchored;\n },\n });\n\n /**\n * Index of the tile that is currently keyboard-reachable (roving tabindex).\n * Tracks the selection so Tab lands on the selected day, falling back to Monday\n * when the selection has been paged out of sight.\n */\n private readonly focusedIndex = linkedSignal<number, number>({\n source: () => this.selectedDate().getTime(),\n computation: () => Math.max(0, this.indexOfSelected()),\n });\n\n /** The visible days, derived from the window start and the current selection. */\n readonly dayTiles = computed<DayTile[]>(() => {\n const count = this.tileCount();\n if (count === 0) return [];\n\n const start = this.windowStart();\n const selected = this.selectedDate();\n const today = this.getToday();\n const locale = this.effectiveLocale();\n\n const tiles: DayTile[] = [];\n let previousMonth = -1;\n let previousYear = -1;\n\n for (let i = 0; i < count; i++) {\n const date = new Date(start);\n date.setDate(start.getDate() + i);\n\n const month = date.getMonth();\n const year = date.getFullYear();\n const startsNewMonth = i > 0 && (month !== previousMonth || year !== previousYear);\n\n tiles.push({\n date,\n dayName: date.toLocaleDateString(locale, {weekday: 'short'}),\n dayNumber: date.getDate(),\n monthName: date.toLocaleDateString(locale, {month: 'short'}),\n startsNewMonth,\n isSelected: this.isSameDay(date, selected),\n isToday: this.isSameDay(date, today),\n accessibleLabel: date.toLocaleDateString(locale, {\n weekday: 'long',\n day: 'numeric',\n month: 'long',\n year: 'numeric',\n }),\n });\n\n previousMonth = month;\n previousYear = year;\n }\n\n return tiles;\n });\n\n /**\n * The month the strip is currently in, spelled out for the header that titles\n * the bar — so the days below are never just loose numbers. Reads as a range\n * when the strip straddles two months, and carries both years when it straddles\n * two of those.\n */\n readonly monthCaption = computed<string>(() => {\n const locale = this.effectiveLocale();\n const tiles = this.dayTiles();\n\n // With no strip to describe — the compact layout — the header names the\n // month the selection sits in, so the bar is never unlabelled.\n if (!tiles.length) {\n return this.selectedDate().toLocaleDateString(locale, {month: 'long', year: 'numeric'});\n }\n\n const first = tiles[0].date;\n const last = tiles[tiles.length - 1].date;\n\n if (first.getFullYear() !== last.getFullYear()) {\n const from = first.toLocaleDateString(locale, {month: 'long', year: 'numeric'});\n const to = last.toLocaleDateString(locale, {month: 'long', year: 'numeric'});\n return `${from} – ${to}`;\n }\n\n if (first.getMonth() !== last.getMonth()) {\n const from = first.toLocaleDateString(locale, {month: 'long'});\n const to = last.toLocaleDateString(locale, {month: 'long', year: 'numeric'});\n return `${from} – ${to}`;\n }\n\n return first.toLocaleDateString(locale, {month: 'long', year: 'numeric'});\n });\n\n /** The selected date formatted as YYYY-MM-DD for the date-picker input. */\n readonly selectedDateString = computed<string>(() => {\n const d = this.selectedDate();\n const pad = (n: number) => n.toString().padStart(2, '0');\n return `${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDate())}`;\n });\n\n /**\n * Props for the compact-layout date picker. Sized to match the Today button it\n * sits beside, and filling the rest of the row so it stays an easy tap target.\n */\n readonly pickerProps = computed(() => ({\n id: this.pickerId,\n mode: 'date' as const,\n placeholder: this.pickDateLabel(),\n size: 'md' as const,\n borderRadius: 'lg' as const,\n hover: true,\n fullWidth: true,\n }));\n\n ngOnInit(): void {\n // Re-format names when the active language changes.\n this.lang.locale$\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => this.localeTick.update((v) => v + 1));\n\n this.observeOwnWidth();\n }\n\n /** Shows the days before the visible ones, without changing the selection. */\n navigatePrevious(): void {\n this.shiftWindow(-1);\n }\n\n /** Shows the days after the visible ones, without changing the selection. */\n navigateNext(): void {\n this.shiftWindow(1);\n }\n\n /** Returns to today: brings today into the strip and selects it. */\n goToToday(): void {\n const today = this.getToday();\n // Move explicitly: when today is already selected the window signal has no new\n // source value to react to, but the user still expects to land on it.\n this.windowStart.set(this.anchorFor(today, this.tileCount()));\n // Only emit when today isn't already selected, so pressing \"Today\" while on\n // today doesn't trigger a redundant reload.\n if (!this.isSameDay(today, this.selectedDate())) {\n this.dateSelected.emit(today);\n }\n }\n\n /** Selects a date and emits it, unless it is already the selected day. */\n selectDate(date: Date): void {\n // Re-selecting the current day is a no-op: emitting again would make\n // consumers reload for no change.\n if (this.isSameDay(date, this.selectedDate())) return;\n this.dateSelected.emit(date);\n }\n\n /**\n * Handles the date-picker model change: shows the picked day's week and emits\n * it (unless it is already the selected day).\n * @param value The date string in YYYY-MM-DD format.\n */\n onDateModelChanged(value: string): void {\n if (!value) return;\n const picked = new Date(value + 'T00:00:00');\n if (isNaN(picked.getTime())) return;\n\n this.windowStart.set(this.anchorFor(picked, this.tileCount()));\n // Picking the day that's already selected shouldn't re-emit.\n if (!this.isSameDay(picked, this.selectedDate())) {\n this.dateSelected.emit(picked);\n }\n }\n\n /** Whether the tile at `index` is the one reachable with Tab. */\n isTabbable(index: number): boolean {\n return index === this.focusedIndex();\n }\n\n /** Remembers which tile last held focus, so Tab returns to it. */\n onTileFocus(index: number): void {\n this.focusedIndex.set(index);\n }\n\n /**\n * Moves focus across the week with the arrow keys. Running off either end turns\n * the page to the neighbouring week and lands on the day that continues the run,\n * so the weeks read as one continuous calendar.\n */\n onTileKeydown(event: KeyboardEvent, index: number): void {\n const lastIndex = this.tileCount() - 1;\n\n switch (event.key) {\n case 'ArrowRight':\n event.preventDefault();\n if (index < lastIndex) {\n this.moveFocusTo(index + 1);\n } else {\n // Off the end: turn the page and land on the day that continues the run.\n this.shiftWindow(1);\n this.moveFocusTo(0);\n }\n break;\n\n case 'ArrowLeft':\n event.preventDefault();\n if (index > 0) {\n this.moveFocusTo(index - 1);\n } else {\n this.shiftWindow(-1);\n this.moveFocusTo(lastIndex);\n }\n break;\n\n case 'Home':\n event.preventDefault();\n this.moveFocusTo(0);\n break;\n\n case 'End':\n event.preventDefault();\n this.moveFocusTo(lastIndex);\n break;\n\n default:\n break;\n }\n }\n\n /** trackBy key for day tiles. */\n trackByTile(_index: number, tile: DayTile): number {\n return tile.date.getTime();\n }\n\n /**\n * Moves the strip by `pages` of whatever it is currently showing. Paging by the\n * visible count is what keeps a full week Monday-aligned — seven days forward\n * from a Monday is the next Monday.\n */\n private shiftWindow(pages: number): void {\n const next = new Date(this.windowStart());\n next.setDate(next.getDate() + pages * this.tileCount());\n this.windowStart.set(next);\n }\n\n /** Focuses the tile at `index` once the week has rendered. */\n private moveFocusTo(index: number): void {\n this.focusedIndex.set(index);\n afterNextRender(\n () => this.tileButtons()[index]?.nativeElement.focus(),\n {injector: this.injector},\n );\n }\n\n /** Index of the selected day within the visible week, or -1 when off-week. */\n private indexOfSelected(): number {\n return this.dayTiles().findIndex((tile) => tile.isSelected);\n }\n\n /**\n * Where the strip should start to show `date` among `count` days: the week's\n * Monday when a whole week is on show, otherwise centred on the day, since a\n * partial strip has no week to align to.\n */\n private anchorFor(date: Date, count: number): Date {\n if (count === DAYS_IN_WEEK) return this.startOfWeek(date);\n\n const start = new Date(date);\n start.setHours(0, 0, 0, 0);\n start.setDate(start.getDate() - Math.floor(count / 2));\n return start;\n }\n\n /**\n * Returns the Monday of the week containing `date`. `getDay()` counts from\n * Sunday, so the shift maps Sunday to the end of the week rather than the start.\n */\n private startOfWeek(date: Date): Date {\n const start = new Date(date);\n start.setHours(0, 0, 0, 0);\n start.setDate(start.getDate() - ((start.getDay() + 6) % 7));\n return start;\n }\n\n /** Whole calendar days from `from` to `to`, ignoring time of day and DST. */\n private daysBetween(from: Date, to: Date): number {\n const a = Date.UTC(from.getFullYear(), from.getMonth(), from.getDate());\n const b = Date.UTC(to.getFullYear(), to.getMonth(), to.getDate());\n return Math.round((b - a) / 86400000);\n }\n\n /** Tracks the bar's own width so the layout responds to its container. */\n private observeOwnWidth(): void {\n const element = this.host.nativeElement;\n this.containerWidth.set(element.getBoundingClientRect().width);\n\n if (typeof ResizeObserver === 'undefined') return;\n\n const observer = new ResizeObserver((entries) => {\n const width = entries[0]?.contentRect.width ?? 0;\n if (width > 0) this.containerWidth.set(width);\n });\n observer.observe(element);\n this.destroyRef.onDestroy(() => observer.disconnect());\n }\n\n /** Returns a Date object for today at midnight. */\n private getToday(): Date {\n const now = new Date();\n now.setHours(0, 0, 0, 0);\n return now;\n }\n\n /** Checks whether two dates fall on the same calendar day. */\n private isSameDay(a: Date, b: Date): boolean {\n return (\n a.getFullYear() === b.getFullYear() &&\n a.getMonth() === b.getMonth() &&\n a.getDate() === b.getDate()\n );\n }\n}\n","<!-- Date selector bar. Layout is driven by the bar's own measured width, so it\n rearranges for the space the bar was given, not for the viewport. The strip\n never stacks: as room runs out it shows fewer days, then hands over to the\n picker. Nothing here is boxed — spacing does the grouping, not borders. -->\n<div class=\"flex flex-col gap-2 px-4 py-3\">\n\n <!-- Month header. Titles the whole bar so the day numbers below are never loose:\n it names the month the strip is in (or, when compact, the month the\n selection sits in), reading as a range where the strip crosses a boundary.\n On its own line it has room to be spelled out, and no longer steals width\n from the days the way the old inline caption did. -->\n <div aria-hidden=\"true\"\n class=\"text-center text-sm font-semibold tracking-wide whitespace-nowrap opacity-80\">\n {{ monthCaption() }}\n </div>\n\n <!-- Controls row. Today and the strip travel together as one centred cluster, so\n Today sits right beside the days instead of stranded against the far edge;\n the gap between them matches the strip's own spacing. When the strip gives\n way to the picker, the picker fills the row and Today anchors its left. -->\n <div class=\"flex items-center justify-center gap-3\">\n\n <!-- Today: returns the strip and the selection to the current day. Outlined\n rather than filled, so the one filled-primary element on the bar is the\n selected day — Today shares the primary accent without competing with it. -->\n <button (click)=\"goToToday()\"\n [data]=\"{ variant: 'outline', color: 'primary', size: 'md' }\"\n class=\"shrink-0\"\n mnButton\n type=\"button\">\n {{ todayLabel() }}\n </button>\n\n <!-- Too narrow for a usable strip, so the picker takes its place beside Today.\n Every date stays reachable on a phone, in one tap rather than by paging;\n the month header above keeps the compact bar labelled like the wide one. -->\n @if (!showDayStrip()) {\n <mn-lib-datetime (ngModelChange)=\"onDateModelChanged($event)\"\n [ngModel]=\"selectedDateString()\"\n [props]=\"pickerProps()\"\n class=\"block min-w-0 flex-1\"></mn-lib-datetime>\n }\n\n <!-- Arrows and days, sized to their own content so the row can centre them\n together with Today as a single cluster — rather than the days drifting to\n the middle of the leftover space, away from the button. -->\n @if (showDayStrip()) {\n <div [attr.aria-label]=\"dayStripLabel()\"\n class=\"flex min-w-0 items-center gap-3\"\n role=\"group\">\n <button (click)=\"navigatePrevious()\"\n [attr.aria-label]=\"previousLabel()\"\n [data]=\"{ variant: 'text', size: 'md', color: 'gray' }\"\n class=\"shrink-0\"\n mnButton\n type=\"button\">\n <svg [size]=\"18\" [lucideIcon]=\"icons.ChevronLeft\"></svg>\n </button>\n\n <!-- Days read on one line so each sits at the same height as the buttons\n either side of it. Roving tabindex: one day is in the tab order, the\n arrow keys move between the rest and page the strip at either end. -->\n <div class=\"flex min-w-0 gap-1\">\n @for (tile of dayTiles(); track tile.date.getTime(); let i = $index) {\n <!-- Selected is the filled pill; today is called out by its number\n alone, tinted primary — no box, in keeping with a bar that groups\n by spacing rather than borders. When today is also the selected\n day the fill takes over, since there is nothing left to tell apart.\n A month break is marked by extra breathing room rather than a rule,\n so the run of days stays unbroken; the header names both months. -->\n <button #tileButton\n (click)=\"selectDate(tile.date)\"\n (focus)=\"onTileFocus(i)\"\n (keydown)=\"onTileKeydown($event, i)\"\n [attr.aria-current]=\"tile.isToday ? 'date' : null\"\n [attr.aria-label]=\"tile.accessibleLabel\"\n [attr.aria-pressed]=\"tile.isSelected\"\n [attr.tabindex]=\"isTabbable(i) ? 0 : -1\"\n [class.bg-primary]=\"tile.isSelected\"\n [class.hover:bg-base-200]=\"!tile.isSelected\"\n [class.ml-3]=\"tile.startsNewMonth\"\n [class.text-primary-content]=\"tile.isSelected\"\n class=\"flex min-w-16 shrink-0 cursor-pointer items-center justify-center gap-1.5 rounded-lg px-3 py-2 text-sm transition-colors focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary motion-reduce:transition-none\"\n type=\"button\">\n <span [class.opacity-60]=\"!tile.isSelected\"\n [class.opacity-90]=\"tile.isSelected\"\n aria-hidden=\"true\"\n class=\"text-xs font-medium uppercase\">\n {{ tile.dayName }}\n </span>\n <!-- Today's number carries the primary tint, unless the tile is\n filled — then it wears the fill's own text colour instead. -->\n <span [class.text-primary]=\"tile.isToday && !tile.isSelected\"\n aria-hidden=\"true\"\n class=\"font-bold tabular-nums\">{{ tile.dayNumber }}</span>\n </button>\n }\n </div>\n\n <button (click)=\"navigateNext()\"\n [attr.aria-label]=\"nextLabel()\"\n [data]=\"{ variant: 'text', size: 'md', color: 'gray' }\"\n class=\"shrink-0\"\n mnButton\n type=\"button\">\n <svg [size]=\"18\" [lucideIcon]=\"icons.ChevronRight\"></svg>\n </button>\n </div>\n }\n </div>\n</div>\n"],"mappings":";;;;;;;;;;;;;AAmCA,IAAa,yBAAb,MAAa,uBAAsB;CAChB,OAAO,OAAO,iBAAiB;CAC/B,MAAM,OAAO,iBAAiB;CA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