ngwr 13.0.0 → 14.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -6
- package/color-picker/styles/_index.scss +43 -5
- package/fesm2022/ngwr-alert.mjs +5 -5
- package/fesm2022/ngwr-alert.mjs.map +1 -1
- package/fesm2022/ngwr-back-top.mjs +11 -1
- package/fesm2022/ngwr-back-top.mjs.map +1 -1
- package/fesm2022/ngwr-blur-text.mjs +13 -2
- package/fesm2022/ngwr-blur-text.mjs.map +1 -1
- package/fesm2022/ngwr-border-glow.mjs +12 -3
- package/fesm2022/ngwr-border-glow.mjs.map +1 -1
- package/fesm2022/ngwr-breadcrumbs.mjs +14 -3
- package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
- package/fesm2022/ngwr-button.mjs +4 -4
- package/fesm2022/ngwr-button.mjs.map +1 -1
- package/fesm2022/ngwr-calendar-testing.mjs +15 -0
- package/fesm2022/ngwr-calendar-testing.mjs.map +1 -1
- package/fesm2022/ngwr-calendar.mjs +51 -5
- package/fesm2022/ngwr-calendar.mjs.map +1 -1
- package/fesm2022/ngwr-circular-text.mjs +20 -1
- package/fesm2022/ngwr-circular-text.mjs.map +1 -1
- package/fesm2022/ngwr-collapse.mjs.map +1 -1
- package/fesm2022/ngwr-color-picker-testing.mjs +23 -7
- package/fesm2022/ngwr-color-picker-testing.mjs.map +1 -1
- package/fesm2022/ngwr-color-picker.mjs +89 -10
- package/fesm2022/ngwr-color-picker.mjs.map +1 -1
- package/fesm2022/ngwr-command-palette.mjs +27 -3
- package/fesm2022/ngwr-command-palette.mjs.map +1 -1
- package/fesm2022/ngwr-context-menu.mjs +13 -3
- package/fesm2022/ngwr-context-menu.mjs.map +1 -1
- package/fesm2022/ngwr-date-adapters-fns.mjs +101 -33
- package/fesm2022/ngwr-date-adapters-fns.mjs.map +1 -1
- package/fesm2022/ngwr-date-picker-testing.mjs +10 -2
- package/fesm2022/ngwr-date-picker-testing.mjs.map +1 -1
- package/fesm2022/ngwr-date-picker.mjs +103 -13
- package/fesm2022/ngwr-date-picker.mjs.map +1 -1
- package/fesm2022/ngwr-date.mjs +480 -79
- package/fesm2022/ngwr-date.mjs.map +1 -1
- package/fesm2022/ngwr-dialog.mjs +22 -16
- package/fesm2022/ngwr-dialog.mjs.map +1 -1
- package/fesm2022/ngwr-directives.mjs +5 -2
- package/fesm2022/ngwr-directives.mjs.map +1 -1
- package/fesm2022/ngwr-drag-drop.mjs +30 -2
- package/fesm2022/ngwr-drag-drop.mjs.map +1 -1
- package/fesm2022/ngwr-drawer.mjs +24 -18
- package/fesm2022/ngwr-drawer.mjs.map +1 -1
- package/fesm2022/ngwr-dropdown.mjs +8 -3
- package/fesm2022/ngwr-dropdown.mjs.map +1 -1
- package/fesm2022/ngwr-event-calendar-testing.mjs.map +1 -1
- package/fesm2022/ngwr-event-calendar.mjs +1 -1
- package/fesm2022/ngwr-event-calendar.mjs.map +1 -1
- package/fesm2022/ngwr-file-upload.mjs +52 -12
- package/fesm2022/ngwr-file-upload.mjs.map +1 -1
- package/fesm2022/ngwr-fuzzy-text.mjs +21 -4
- package/fesm2022/ngwr-fuzzy-text.mjs.map +1 -1
- package/fesm2022/ngwr-gradient-text.mjs +9 -2
- package/fesm2022/ngwr-gradient-text.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-en.mjs +63 -1
- package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ru.mjs +28 -1
- package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
- package/fesm2022/ngwr-i18n.mjs +150 -22
- package/fesm2022/ngwr-i18n.mjs.map +1 -1
- package/fesm2022/ngwr-icon-adapters-feather.mjs +11 -0
- package/fesm2022/ngwr-icon-adapters-feather.mjs.map +1 -1
- package/fesm2022/ngwr-icon-adapters-lucide.mjs +22 -2
- package/fesm2022/ngwr-icon-adapters-lucide.mjs.map +1 -1
- package/fesm2022/ngwr-icon.mjs +474 -37
- package/fesm2022/ngwr-icon.mjs.map +1 -1
- package/fesm2022/ngwr-input-number.mjs +3 -3
- package/fesm2022/ngwr-input-number.mjs.map +1 -1
- package/fesm2022/ngwr-input-otp.mjs +21 -3
- package/fesm2022/ngwr-input-otp.mjs.map +1 -1
- package/fesm2022/ngwr-input.mjs +14 -7
- package/fesm2022/ngwr-input.mjs.map +1 -1
- package/fesm2022/ngwr-knob-testing.mjs.map +1 -1
- package/fesm2022/ngwr-knob.mjs +20 -2
- package/fesm2022/ngwr-knob.mjs.map +1 -1
- package/fesm2022/ngwr-loading-bar-router.mjs +73 -0
- package/fesm2022/ngwr-loading-bar-router.mjs.map +1 -0
- package/fesm2022/ngwr-loading-bar.mjs +21 -32
- package/fesm2022/ngwr-loading-bar.mjs.map +1 -1
- package/fesm2022/ngwr-markdown.mjs +63 -11
- package/fesm2022/ngwr-markdown.mjs.map +1 -1
- package/fesm2022/ngwr-mention.mjs +104 -14
- package/fesm2022/ngwr-mention.mjs.map +1 -1
- package/fesm2022/ngwr-overlay.mjs +36 -7
- package/fesm2022/ngwr-overlay.mjs.map +1 -1
- package/fesm2022/ngwr-pagination-testing.mjs +11 -10
- package/fesm2022/ngwr-pagination-testing.mjs.map +1 -1
- package/fesm2022/ngwr-pagination.mjs +65 -30
- package/fesm2022/ngwr-pagination.mjs.map +1 -1
- package/fesm2022/ngwr-popconfirm.mjs +3 -2
- package/fesm2022/ngwr-popconfirm.mjs.map +1 -1
- package/fesm2022/ngwr-popover.mjs +2 -1
- package/fesm2022/ngwr-popover.mjs.map +1 -1
- package/fesm2022/ngwr-qr.mjs +38 -1
- package/fesm2022/ngwr-qr.mjs.map +1 -1
- package/fesm2022/ngwr-select.mjs +93 -34
- package/fesm2022/ngwr-select.mjs.map +1 -1
- package/fesm2022/ngwr-shiny-text.mjs +10 -3
- package/fesm2022/ngwr-shiny-text.mjs.map +1 -1
- package/fesm2022/ngwr-splitter-testing.mjs.map +1 -1
- package/fesm2022/ngwr-squircle.mjs +2 -1
- package/fesm2022/ngwr-squircle.mjs.map +1 -1
- package/fesm2022/ngwr-statistic.mjs +35 -4
- package/fesm2022/ngwr-statistic.mjs.map +1 -1
- package/fesm2022/ngwr-table.mjs +35 -12
- package/fesm2022/ngwr-table.mjs.map +1 -1
- package/fesm2022/ngwr-tabs-router.mjs +158 -0
- package/fesm2022/ngwr-tabs-router.mjs.map +1 -0
- package/fesm2022/ngwr-tabs-testing.mjs +13 -11
- package/fesm2022/ngwr-tabs-testing.mjs.map +1 -1
- package/fesm2022/ngwr-tabs.mjs +104 -12
- package/fesm2022/ngwr-tabs.mjs.map +1 -1
- package/fesm2022/ngwr-textarea.mjs +20 -1
- package/fesm2022/ngwr-textarea.mjs.map +1 -1
- package/fesm2022/ngwr-tour.mjs +1 -1
- package/fesm2022/ngwr-tour.mjs.map +1 -1
- package/fesm2022/ngwr-transfer.mjs +2 -2
- package/fesm2022/ngwr-transfer.mjs.map +1 -1
- package/fesm2022/ngwr-tree.mjs +18 -2
- package/fesm2022/ngwr-tree.mjs.map +1 -1
- package/fesm2022/ngwr-utils.mjs +143 -1
- package/fesm2022/ngwr-utils.mjs.map +1 -1
- package/fesm2022/ngwr-version.mjs +1 -1
- package/fesm2022/ngwr-version.mjs.map +1 -1
- package/fesm2022/ngwr-window-testing.mjs +10 -2
- package/fesm2022/ngwr-window-testing.mjs.map +1 -1
- package/fesm2022/ngwr-window.mjs +4 -4
- package/fesm2022/ngwr-window.mjs.map +1 -1
- package/i18n/en.json +33 -6
- package/i18n/ru.json +33 -6
- package/llms-full.txt +20 -11
- package/llms.txt +47 -16
- package/mcp/catalog.js +3 -3
- package/mcp/providers.js +11 -0
- package/package.json +11 -3
- package/schematics/migrations/v13/index.js +101 -0
- package/schematics/migrations/v14/index.js +422 -0
- package/schematics/migrations.json +10 -0
- package/schematics/page/templates.js +1 -1
- package/schematics/use/symbol-map.json +1 -0
- package/skills/ngwr/SKILL.md +4 -1
- package/skills/ngwr/references/catalog.md +2 -0
- package/skills/ngwr/references/setup.md +4 -0
- package/stepper/styles/_index.scss +19 -1
- package/textarea/styles/_index.scss +14 -6
- package/toast/styles/_index.scss +12 -4
- package/types/ngwr-alert.d.ts +3 -3
- package/types/ngwr-blur-text.d.ts +8 -0
- package/types/ngwr-breadcrumbs.d.ts +1 -0
- package/types/ngwr-button.d.ts +2 -2
- package/types/ngwr-calendar-testing.d.ts +21 -4
- package/types/ngwr-calendar.d.ts +37 -0
- package/types/ngwr-circular-text.d.ts +9 -0
- package/types/ngwr-collapse.d.ts +19 -15
- package/types/ngwr-color-picker-testing.d.ts +10 -4
- package/types/ngwr-color-picker.d.ts +70 -2
- package/types/ngwr-command-palette.d.ts +14 -0
- package/types/ngwr-context-menu.d.ts +1 -1
- package/types/ngwr-date-adapters-fns.d.ts +71 -29
- package/types/ngwr-date-picker-testing.d.ts +206 -185
- package/types/ngwr-date-picker.d.ts +7 -0
- package/types/ngwr-date.d.ts +143 -13
- package/types/ngwr-drag-drop.d.ts +19 -0
- package/types/ngwr-dropdown.d.ts +1 -1
- package/types/ngwr-event-calendar-testing.d.ts +12 -9
- package/types/ngwr-file-upload.d.ts +31 -3
- package/types/ngwr-fuzzy-text.d.ts +5 -0
- package/types/ngwr-i18n.d.ts +89 -7
- package/types/ngwr-icon-adapters-feather.d.ts +11 -0
- package/types/ngwr-icon.d.ts +42 -1
- package/types/ngwr-input-number.d.ts +1 -1
- package/types/ngwr-input-otp.d.ts +3 -0
- package/types/ngwr-input.d.ts +11 -4
- package/types/ngwr-knob-testing.d.ts +8 -4
- package/types/ngwr-knob.d.ts +18 -0
- package/types/ngwr-loading-bar-router.d.ts +35 -0
- package/types/ngwr-loading-bar.d.ts +19 -9
- package/types/ngwr-mention.d.ts +13 -0
- package/types/ngwr-pagination-testing.d.ts +11 -10
- package/types/ngwr-pagination.d.ts +39 -10
- package/types/ngwr-popconfirm.d.ts +1 -1
- package/types/ngwr-popover.d.ts +1 -1
- package/types/ngwr-select.d.ts +65 -10
- package/types/ngwr-shiny-text.d.ts +1 -0
- package/types/ngwr-splitter-testing.d.ts +9 -4
- package/types/ngwr-squircle.d.ts +1 -1
- package/types/ngwr-statistic.d.ts +22 -2
- package/types/ngwr-table.d.ts +24 -5
- package/types/ngwr-tabs-router.d.ts +67 -0
- package/types/ngwr-tabs-testing.d.ts +12 -10
- package/types/ngwr-tabs.d.ts +103 -6
- package/types/ngwr-textarea.d.ts +9 -0
- package/types/ngwr-tree.d.ts +7 -0
- package/types/ngwr-utils.d.ts +79 -1
- package/types/ngwr-version.d.ts +1 -1
- package/types/ngwr-window-testing.d.ts +11 -3
- package/types/ngwr-window.d.ts +11 -4
- package/window/styles/_index.scss +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngwr-event-calendar.mjs","sources":["../../../projects/lib/event-calendar/event-calendar-event-template.ts","../../../projects/lib/event-calendar/event-calendar.ts","../../../projects/lib/event-calendar/event-calendar.html","../../../projects/lib/event-calendar/ngwr-event-calendar.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { Directive, TemplateRef, inject } from '@angular/core';\n\nimport type { WrCalendarEventContext } from './interfaces';\n\n/**\n * Replace the chip's contents. The event is the implicit context; the chip\n * itself — its button, its position and its drag handling — stays with the\n * calendar, so a custom template cannot break the geometry.\n *\n * @example\n * ```html\n * <wr-event-calendar [events]=\"events\">\n * <ng-template wrCalendarEvent let-event>\n * <strong>{{ event.title }}</strong> — {{ event.data.room }}\n * </ng-template>\n * </wr-event-calendar>\n * ```\n */\n@Directive({\n selector: 'ng-template[wrCalendarEvent]',\n})\nexport class WrCalendarEventTemplate {\n readonly template = inject<TemplateRef<WrCalendarEventContext>>(TemplateRef);\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { Directionality } from '@angular/cdk/bidi';\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { NgTemplateOutlet } from '@angular/common';\nimport type { TemplateRef } from '@angular/core';\nimport {\n Component,\n DOCUMENT,\n ViewEncapsulation,\n computed,\n contentChild,\n inject,\n input,\n model,\n output,\n signal,\n} from '@angular/core';\n\nimport { WrButton, WrButtonGroup } from 'ngwr/button';\nimport { WrDateAdapter } from 'ngwr/date';\nimport { useI18nFormatter, useI18nText } from 'ngwr/i18n';\nimport { numAttr } from 'ngwr/utils';\n\nimport { WrCalendarEventTemplate } from './event-calendar-event-template';\nimport type {\n WrCalendarEvent,\n WrCalendarEventChange,\n WrCalendarEventContext,\n WrCalendarSlot,\n WrCalendarView,\n} from './interfaces';\n\n/**\n * Stands in for the consumer input `useI18nText` expects — the header strings take no\n * label inputs of their own.\n */\nconst NO_OVERRIDE = signal<string | null>(null).asReadonly();\n\nconst MINUTES_PER_DAY = 24 * 60;\nconst DAYS_PER_WEEK = 7;\nconst MONTH_ROWS = 6;\n\n/**\n * A chip that spans whole days — every month-view event, and the all-day band\n * of the time views. It lives in the cell where its segment STARTS and reaches\n * right with a `calc()` width, so it stays inside one `role=\"gridcell\"` however\n * far it spans.\n */\ninterface BandChip {\n readonly key: string;\n readonly event: WrCalendarEvent;\n /** Index of the day it starts on, within the row it was laid out against. */\n readonly column: number;\n readonly span: number;\n readonly lane: number;\n readonly continuesBefore: boolean;\n readonly continuesAfter: boolean;\n}\n\n/**\n * A chip positioned against the time grid. Same rule — it belongs to the cell\n * holding its start — but sized in percentages OF THAT CELL, which works only\n * because every slot row is the same height.\n */\ninterface TimeChip {\n readonly key: string;\n readonly event: WrCalendarEvent;\n /** Offset into the start cell, 0–100. */\n readonly top: number;\n /** Height as a multiple of the cell, ×100. */\n readonly height: number;\n /**\n * Lane offset from the column's inline START, 0–100 — not from its physical\n * left. Concurrent events are laid out in reading order, so under `dir=\"rtl\"`\n * lane 0 belongs at the right; a physical `left` would read the cluster\n * back-to-front, which is the one thing in this component that was not logical.\n */\n readonly inlineStart: number;\n /** Lane width as a share of the column, 0–100. */\n readonly width: number;\n readonly continuesBefore: boolean;\n readonly continuesAfter: boolean;\n}\n\ninterface DayCell {\n readonly date: Date;\n readonly key: string;\n readonly day: string;\n readonly label: string;\n readonly inMonth: boolean;\n readonly isToday: boolean;\n readonly bands: readonly BandChip[];\n readonly hidden: number;\n}\n\ninterface MonthWeek {\n readonly key: string;\n readonly days: readonly DayCell[];\n}\n\ninterface TimeCell {\n readonly key: string;\n readonly date: Date;\n readonly label: string;\n readonly chips: readonly TimeChip[];\n}\n\ninterface TimeRow {\n readonly key: string;\n readonly label: string;\n /** Minutes from midnight — also what the drag target reads off the cell. */\n readonly minutes: number;\n readonly major: boolean;\n readonly cells: readonly TimeCell[];\n}\n\ninterface ColumnHeader {\n readonly key: string;\n readonly date: Date;\n readonly weekday: string;\n readonly day: string;\n readonly label: string;\n readonly isToday: boolean;\n}\n\n/** Live drag state. `null` whenever the pointer is not down on a chip. */\ninterface DragState {\n readonly event: WrCalendarEvent;\n readonly kind: 'move' | 'resize';\n readonly originDate: Date;\n readonly originMinutes: number;\n readonly pointerId: number;\n}\n\n/**\n * Month / week / day event calendar with drag to move and resize.\n *\n * `events` is an INPUT, never mutated: a drag emits `eventChange` describing\n * where the event would land and stops there. Apply it to your own state and\n * the calendar re-renders — so an unhandled output is a cancelled drag, an\n * optimistic update is one `set`, and a rejected server write needs no rollback\n * path inside the component.\n *\n * Every chip lives inside the `role=\"gridcell\"` where it starts and reaches out\n * with `calc()` widths or percentage heights. That is what keeps the ARIA grid\n * valid — an events layer floating over the grid would leave rows owning\n * something other than cells — and it means no pixel measurement anywhere.\n *\n * **Keyboard.** The grid is one tab stop with a roving cursor: arrows move by\n * day (left / right) and by week or slot (up / down), `Home` / `End` jump to\n * the ends of the row, `Enter` on an empty cell emits `slotClick`, and `Enter`\n * on a cell holding events focuses the first chip (`Escape` returns). On a\n * focused chip, `Alt` + arrows move the event — the keyboard equivalent of the\n * drag, emitting the same `eventChange`.\n *\n * Date math and formatting go through {@link WrDateAdapter}; register one with\n * `provideWrDateAdapter(...)` at bootstrap.\n *\n * @example\n * ```html\n * <wr-event-calendar\n * editable\n * [events]=\"events()\"\n * [(view)]=\"view\"\n * [(date)]=\"anchor\"\n * (eventChange)=\"apply($event)\"\n * (slotClick)=\"compose($event)\"\n * />\n * ```\n *\n * @see https://ngwr.dev/reference/components/event-calendar\n */\n@Component({\n selector: 'wr-event-calendar',\n templateUrl: './event-calendar.html',\n encapsulation: ViewEncapsulation.None,\n host: {\n '[class]': 'classes()',\n // A drag has to end wherever the pointer is released, including outside the\n // chip it started on — so the host owns the release, not the chip.\n '(pointerup)': 'onPointerUp($event)',\n '(pointercancel)': 'drag.set(null)',\n },\n imports: [NgTemplateOutlet, WrButton, WrButtonGroup],\n})\nexport class WrEventCalendar {\n /** Everything to render. Never mutated — see `eventChange`. */\n readonly events = input<readonly WrCalendarEvent[]>([]);\n\n /** Which span is shown. Two-way bindable. @default 'month' */\n readonly view = model<WrCalendarView>('month');\n\n /** Any date inside the shown span. Two-way bindable. */\n readonly date = model<Date>(new Date());\n\n /** Which buttons the view switcher offers. Empty hides it. */\n readonly views = input<readonly WrCalendarView[]>(['month', 'week', 'day']);\n\n /** Allow dragging chips to move and resize them. @default false */\n readonly editable = input(false, { transform: coerceBooleanProperty });\n\n /** Minutes per row in the time views — also the drag snap. @default 30 */\n readonly slotMinutes = input(30, { transform: numAttr(30) });\n\n /** First hour the time views show. @default 0 */\n readonly dayStartHour = input(0, { transform: numAttr(0) });\n\n /** First hour they do NOT show, exclusive. @default 24 */\n readonly dayEndHour = input(24, { transform: numAttr(24) });\n\n /** Lanes a month cell shows before collapsing the rest into “+N more”. @default 3 */\n readonly maxLanes = input(3, { transform: numAttr(3) });\n\n /** Hide the built-in header — supply your own navigation instead. @default false */\n readonly hideHeader = input(false, { transform: coerceBooleanProperty });\n\n /** A chip was activated. */\n readonly eventClick = output<WrCalendarEvent>();\n\n /** Empty space was activated — the slot the user pointed at. */\n readonly slotClick = output<WrCalendarSlot>();\n\n /** A drag or an `Alt` + arrow finished. Apply it yourself; nothing moves until you do. */\n readonly eventChange = output<WrCalendarEventChange>();\n\n private readonly adapter = inject<WrDateAdapter<Date>>(WrDateAdapter);\n private readonly document = inject(DOCUMENT);\n private readonly dir = inject(Directionality, { optional: true });\n private readonly chipTpl = contentChild(WrCalendarEventTemplate);\n\n // Reactive: a calendar is as long-lived as the page it sits on, so a catalog that\n // finishes loading after construction — or a locale switch — has to reach these.\n // Resolved once, as they were, they froze the English defaults in place.\n protected readonly todayLabel = useI18nText(NO_OVERRIDE, 'eventCalendar.today', 'Today');\n protected readonly previousLabel = useI18nText(NO_OVERRIDE, 'eventCalendar.previous', 'Previous');\n protected readonly nextLabel = useI18nText(NO_OVERRIDE, 'eventCalendar.next', 'Next');\n protected readonly allDayLabel = useI18nText(NO_OVERRIDE, 'eventCalendar.allDay', 'All day');\n protected readonly timeLabel = useI18nText(NO_OVERRIDE, 'eventCalendar.time', 'Time');\n protected readonly moreLabel = useI18nFormatter('eventCalendar.more', '+{{count}} more');\n private readonly monthLabel = useI18nText(NO_OVERRIDE, 'eventCalendar.month', 'Month');\n private readonly weekLabel = useI18nText(NO_OVERRIDE, 'eventCalendar.week', 'Week');\n private readonly dayLabel = useI18nText(NO_OVERRIDE, 'eventCalendar.day', 'Day');\n\n protected readonly viewLabels = computed<Record<WrCalendarView, string>>(() => ({\n month: this.monthLabel(),\n week: this.weekLabel(),\n day: this.dayLabel(),\n }));\n\n /** Accessible name of the grid; overridable for a page with several. */\n readonly ariaLabel = input<string | null>(null);\n protected readonly resolvedAriaLabel = useI18nText(this.ariaLabel, 'eventCalendar.label', 'Calendar');\n\n /**\n * `[day, minutes]` of the roving cursor — `minutes === -1` means a month cell\n * or the all-day band. Raw, so it survives a view switch; read\n * {@link cursorCell}, which clamps it to what the current view actually has.\n */\n private readonly cursor = signal<readonly [number, number]>([0, -1]);\n\n /**\n * The cursor as the current view can honour it. Exactly one cell may carry\n * `tabindex=\"0\"`, so a stale coordinate — the 09:30 row after switching to\n * month, day 34 after switching to week — must fall back to a real cell\n * rather than leave the grid with no tab stop at all.\n */\n protected readonly cursorCell = computed<readonly [number, number]>(() => {\n const [day, minutes] = this.cursor();\n const columns = Math.max(1, this.days().length);\n const clamped = Math.min(columns - 1, Math.max(0, day));\n\n if (this.view() === 'month') return [clamped, -1];\n if (minutes === -1 && this.hasAllDay()) return [clamped, -1];\n\n const rows = this.rows();\n const known = rows.some(row => row.minutes === minutes);\n return [clamped, known ? minutes : (rows[0]?.minutes ?? 0)];\n });\n\n /** Non-null only while a pointer is down on a chip. @internal */\n protected readonly drag = signal<DragState | null>(null);\n\n protected readonly dragging = computed(() => this.drag()?.event.id ?? null);\n\n protected readonly chipTemplate = computed<TemplateRef<WrCalendarEventContext> | null>(\n () => this.chipTpl()?.template ?? null\n );\n\n protected readonly classes = computed(() => {\n const parts = ['wr-event-calendar', `wr-event-calendar--${this.view()}`];\n if (this.editable()) parts.push('wr-event-calendar--editable');\n if (this.drag()) parts.push('wr-event-calendar--dragging');\n return parts.join(' ');\n });\n\n // ---------------------------------------------------------------- ranges\n\n /** Inclusive-exclusive window the current view covers. */\n private readonly range = computed<readonly [Date, Date]>(() => {\n const anchor = this.startOfDay(this.date());\n switch (this.view()) {\n case 'day':\n return [anchor, this.adapter.addDays(anchor, 1)];\n case 'week': {\n const start = this.startOfWeek(anchor);\n return [start, this.adapter.addDays(start, DAYS_PER_WEEK)];\n }\n default: {\n const first = this.adapter.createDate(this.adapter.getYear(anchor), this.adapter.getMonth(anchor), 1);\n const start = this.startOfWeek(first);\n return [start, this.adapter.addDays(start, MONTH_ROWS * DAYS_PER_WEEK)];\n }\n }\n });\n\n /** Every day the view shows, left to right. */\n private readonly days = computed<readonly Date[]>(() => {\n const [start, end] = this.range();\n const count = Math.round((end.getTime() - start.getTime()) / (MINUTES_PER_DAY * 60_000));\n return Array.from({ length: count }, (_, i) => this.adapter.addDays(start, i));\n });\n\n /** Only what overlaps the window — everything downstream works off this. */\n private readonly visible = computed<readonly WrCalendarEvent[]>(() => {\n const [start, end] = this.range();\n return [...this.events()]\n .filter(e => e.end.getTime() > start.getTime() && e.start.getTime() < end.getTime())\n .sort((a, b) => {\n const byStart = a.start.getTime() - b.start.getTime();\n // Ties go to the longer event, so a week-long band claims its lane\n // before the one-day events sitting alongside it.\n return byStart !== 0 ? byStart : b.end.getTime() - a.end.getTime();\n });\n });\n\n protected readonly title = computed(() => {\n const anchor = this.date();\n const months = this.adapter.getMonthNames('long');\n switch (this.view()) {\n case 'day':\n return this.adapter.format(anchor, 'longDate');\n case 'week': {\n const [start] = this.range();\n const last = this.adapter.addDays(start, DAYS_PER_WEEK - 1);\n return `${this.adapter.format(start, 'mediumDate')} – ${this.adapter.format(last, 'mediumDate')}`;\n }\n default:\n return `${months[this.adapter.getMonth(anchor)]} ${this.adapter.getYear(anchor)}`;\n }\n });\n\n /**\n * The adapter contract is \"names ordered from `getFirstDayOfWeek()` onwards\",\n * so the list is ALREADY rotated. Rotating it again here put every column one\n * day out for every locale whose week does not start on Sunday — invisible in\n * en-US, wrong everywhere else. `wr-calendar` consumes the same call directly.\n */\n protected readonly weekdayNames = computed(() => this.adapter.getDayOfWeekNames('short'));\n\n protected readonly switcher = computed(() => this.views().map(view => ({ view, label: this.viewLabels()[view] })));\n\n // ----------------------------------------------------------- month model\n\n protected readonly weeks = computed<readonly MonthWeek[]>(() => {\n const days = this.days();\n const events = this.visible();\n const weeks: MonthWeek[] = [];\n const month = this.adapter.getMonth(this.date());\n\n for (let w = 0; w * DAYS_PER_WEEK < days.length; w++) {\n const row = days.slice(w * DAYS_PER_WEEK, (w + 1) * DAYS_PER_WEEK);\n const { chips, hidden } = this.bandLayout(events, row, this.maxLanes());\n\n weeks.push({\n key: this.iso(row[0]),\n days: row.map((date, col) => ({\n date,\n key: this.iso(date),\n day: String(this.adapter.getDate(date)),\n label: this.adapter.format(date, 'longDate'),\n inMonth: this.adapter.getMonth(date) === month,\n isToday: this.adapter.isSameDay(date, this.adapter.today()),\n bands: chips.filter(chip => chip.column === col),\n hidden: hidden[col],\n })),\n });\n }\n\n return weeks;\n });\n\n // ------------------------------------------------------------ time model\n\n protected readonly columns = computed<readonly ColumnHeader[]>(() => {\n const weekdays = this.adapter.getDayOfWeekNames('short');\n const first = this.adapter.getFirstDayOfWeek();\n return this.days().map(date => ({\n key: this.iso(date),\n date,\n // `weekdays` is indexed from the week's first day; `getDayOfWeek` is\n // absolute (0 = Sunday). Mixing the two spaces named Monday \"Tue\".\n weekday: weekdays[(this.adapter.getDayOfWeek(date) - first + DAYS_PER_WEEK) % DAYS_PER_WEEK],\n day: String(this.adapter.getDate(date)),\n label: this.adapter.format(date, 'longDate'),\n isToday: this.adapter.isSameDay(date, this.adapter.today()),\n }));\n });\n\n /** The all-day band above the time grid — same layout as a month week. */\n protected readonly allDayBands = computed<readonly BandChip[]>(() => {\n const days = this.days();\n const events = this.visible().filter(e => e.allDay === true || this.spansWholeDay(e));\n return this.bandLayout(events, days, Number.POSITIVE_INFINITY).chips;\n });\n\n protected readonly allDayCells = computed<\n readonly { key: string; date: Date; label: string; bands: readonly BandChip[] }[]\n >(() => {\n const days = this.days();\n const chips = this.allDayBands();\n return days.map((date, col) => ({\n key: this.iso(date),\n date,\n label: `${this.allDayLabel()} — ${this.adapter.format(date, 'longDate')}`,\n bands: chips.filter(chip => chip.column === col),\n }));\n });\n\n protected readonly hasAllDay = computed(() => this.allDayBands().length > 0);\n\n protected readonly rows = computed<readonly TimeRow[]>(() => {\n const slot = Math.max(5, this.slotMinutes());\n const from = Math.max(0, Math.min(23, this.dayStartHour())) * 60;\n const to = Math.max(from + slot, Math.min(24, this.dayEndHour()) * 60);\n const days = this.days();\n const placed = this.timeLayout(days, slot);\n const rows: TimeRow[] = [];\n\n // Each half of a cell's name is invariant along one axis: the day reads the\n // same down a column, the clock the same across a row. Formatting per CELL\n // asked the adapter for 336 of each on a default week (48 slots × 7 days)\n // where 48 clocks and 7 dates say the same thing, and\n // `WrNativeDateAdapter.format` builds a fresh `Intl.DateTimeFormat` per call.\n const dayLabels = days.map(date => this.adapter.format(date, 'longDate'));\n\n for (let minutes = from; minutes < to; minutes += slot) {\n const clock = this.clock(minutes);\n rows.push({\n key: String(minutes),\n minutes,\n major: minutes % 60 === 0,\n label: minutes % 60 === 0 ? clock : '',\n cells: days.map((date, col) => ({\n key: `${this.iso(date)}:${minutes}`,\n date,\n label: `${clock} — ${dayLabels[col]}`,\n chips: placed[col].filter(chip => chip.slotMinutes === minutes).map(chip => chip.chip),\n })),\n });\n }\n\n return rows;\n });\n\n // ------------------------------------------------------------------ nav\n\n protected step(direction: -1 | 1): void {\n const anchor = this.date();\n switch (this.view()) {\n case 'day':\n this.date.set(this.adapter.addDays(anchor, direction));\n break;\n case 'week':\n this.date.set(this.adapter.addDays(anchor, direction * DAYS_PER_WEEK));\n break;\n default:\n this.date.set(this.adapter.addMonths(anchor, direction));\n }\n }\n\n protected goToday(): void {\n this.date.set(this.adapter.today());\n }\n\n protected setView(view: WrCalendarView): void {\n this.view.set(view);\n }\n\n /** “+N more” opens that day — the overflow is only ever a month-view problem. */\n protected openDay(date: Date): void {\n this.date.set(date);\n this.view.set('day');\n }\n\n // -------------------------------------------------------------- pointer\n\n protected onChipPointerDown(event: PointerEvent, chipEvent: WrCalendarEvent, kind: 'move' | 'resize'): void {\n if (!this.canDrag(chipEvent) || event.button !== 0) return;\n\n // Hide the chip from the hit test for exactly this measurement. The\n // `--dragging` rule that does it for the rest of the gesture is bound to a\n // signal that is not set yet, so `elementFromPoint` returned the chip itself\n // and `closest()` climbed to the cell the chip STARTS in — never the cell\n // under the pointer. A chip wide or tall enough to reach past its own cell\n // then jumped by the grab offset instead of moving by the drag distance.\n const chip = event.currentTarget as HTMLElement;\n const pointerEvents = chip.style.pointerEvents;\n chip.style.pointerEvents = 'none';\n const cell = this.cellUnder(event.clientX, event.clientY);\n chip.style.pointerEvents = pointerEvents;\n if (!cell) return;\n\n // The chip must stop swallowing hit-tests, or `elementFromPoint` reports\n // the chip itself for the whole drag and the target never changes.\n try {\n (event.target as HTMLElement).setPointerCapture?.(event.pointerId);\n } catch {\n // Capture is an optimisation — it keeps the release on this element even\n // when the pointer leaves it. A pointer that is already gone throws here,\n // and losing capture is not a reason to lose the drag.\n }\n event.preventDefault();\n event.stopPropagation();\n\n this.drag.set({\n event: chipEvent,\n kind,\n originDate: cell.date,\n originMinutes: cell.minutes,\n pointerId: event.pointerId,\n });\n }\n\n protected onPointerUp(event: PointerEvent): void {\n const state = this.drag();\n this.drag.set(null);\n if (state?.pointerId !== event.pointerId) return;\n\n const cell = this.cellUnder(event.clientX, event.clientY);\n if (!cell) return;\n\n const dayDelta = this.daysBetween(state.originDate, cell.date);\n const minuteDelta = cell.minutes < 0 || state.originMinutes < 0 ? 0 : cell.minutes - state.originMinutes;\n if (dayDelta === 0 && minuteDelta === 0) return;\n\n const { event: source, kind } = state;\n if (kind === 'resize') {\n const end = this.shift(source.end, dayDelta, minuteDelta);\n // A resize that would end at or before the start is a no-op, not an\n // inverted event.\n if (end.getTime() <= source.start.getTime()) return;\n this.eventChange.emit({ event: source, start: source.start, end, kind });\n return;\n }\n\n this.eventChange.emit({\n event: source,\n start: this.shift(source.start, dayDelta, minuteDelta),\n end: this.shift(source.end, dayDelta, minuteDelta),\n kind,\n });\n }\n\n protected onChipClick(event: WrCalendarEvent): void {\n this.eventClick.emit(event);\n }\n\n protected onCellClick(date: Date, minutes: number): void {\n this.slotClick.emit(this.slotAt(date, minutes));\n }\n\n // ------------------------------------------------------------- keyboard\n\n protected onChipKeyDown(event: KeyboardEvent, chipEvent: WrCalendarEvent): void {\n if (event.key === 'Escape') {\n this.focusCell(event);\n return;\n }\n\n if (!event.altKey || !this.canDrag(chipEvent)) return;\n\n const slot = Math.max(5, this.slotMinutes());\n const inTime = this.view() !== 'month';\n let days = 0;\n let minutes = 0;\n\n switch (this.inlineKey(event.key)) {\n case 'ArrowLeft':\n days = -1;\n break;\n case 'ArrowRight':\n days = 1;\n break;\n case 'ArrowUp':\n if (inTime) minutes = -slot;\n else days = -DAYS_PER_WEEK;\n break;\n case 'ArrowDown':\n if (inTime) minutes = slot;\n else days = DAYS_PER_WEEK;\n break;\n default:\n return;\n }\n\n event.preventDefault();\n\n // `Shift` turns the same gesture into a resize, moving the END alone. Without it\n // the keyboard could move an event and never re-length one — and the resize grab\n // area is `aria-hidden` and unfocusable precisely BECAUSE this exists, so its\n // absence left the operation on the mouse only.\n if (event.shiftKey) {\n const end = this.shift(chipEvent.end, days, minutes);\n // Same rule as the pointer path: a resize that would end at or before the\n // start is a no-op rather than an inverted event.\n if (end.getTime() <= chipEvent.start.getTime()) return;\n this.eventChange.emit({ event: chipEvent, start: chipEvent.start, end, kind: 'resize' });\n return;\n }\n\n this.eventChange.emit({\n event: chipEvent,\n start: this.shift(chipEvent.start, days, minutes),\n end: this.shift(chipEvent.end, days, minutes),\n kind: 'move',\n });\n }\n\n protected onGridKeyDown(event: KeyboardEvent): void {\n // Handled per cell, not on the grid: the element carrying the keyboard\n // should be the one that actually holds focus. Chips sit inside cells and\n // own their keys, so let anything originating in one bubble straight past.\n if (event.target !== event.currentTarget) return;\n\n const [day, minutes] = this.cursorCell();\n const columns = this.days().length;\n const rows = this.rows();\n const inTime = this.view() !== 'month';\n let next: readonly [number, number];\n\n switch (this.inlineKey(event.key)) {\n case 'ArrowLeft':\n next = [Math.max(0, day - 1), minutes];\n break;\n case 'ArrowRight':\n next = [Math.min(columns - 1, day + 1), minutes];\n break;\n case 'ArrowUp':\n // Hold position at the top row, the way ArrowDown does at the bottom. A\n // `Math.max(0, …)` clamp reads as the same thing and is not: from the\n // Wednesday of the first week it lands on 0, so the cursor jumps\n // SIDEWAYS to Sunday instead of staying put.\n next = inTime\n ? [day, this.stepRow(minutes, -1, rows)]\n : [day - DAYS_PER_WEEK >= 0 ? day - DAYS_PER_WEEK : day, minutes];\n break;\n case 'ArrowDown':\n next = inTime\n ? [day, this.stepRow(minutes, 1, rows)]\n : [day + DAYS_PER_WEEK < columns ? day + DAYS_PER_WEEK : day, minutes];\n break;\n case 'Home':\n next = [day - (day % DAYS_PER_WEEK), minutes];\n break;\n case 'End':\n next = [Math.min(columns - 1, day - (day % DAYS_PER_WEEK) + DAYS_PER_WEEK - 1), minutes];\n break;\n case 'Enter':\n case ' ': {\n event.preventDefault();\n const cell = event.target as HTMLElement;\n const chip = cell.querySelector<HTMLElement>('.wr-event-calendar__chip');\n if (chip) chip.focus();\n else this.onCellClick(this.days()[day], minutes);\n return;\n }\n default:\n return;\n }\n\n event.preventDefault();\n this.cursor.set(next);\n this.focusCursor(event.currentTarget as HTMLElement);\n }\n\n /**\n * Keep the roving cursor on the cell that actually has focus.\n *\n * The cursor was only ever written by an arrow key, while focus moves for three\n * other reasons — a click, a Tab onto a chip, Escape out of one — so the next\n * arrow read a coordinate nobody was standing on and threw focus back to it,\n * usually the top-left of the grid.\n */\n protected onCellFocus(day: number, minutes: number): void {\n const [d, m] = this.cursor();\n if (d !== day || m !== minutes) this.cursor.set([day, minutes]);\n }\n\n protected isCursor(day: number, minutes: number): boolean {\n const [d, m] = this.cursorCell();\n return d === day && m === minutes;\n }\n\n // --------------------------------------------------------------- layout\n\n /**\n * Greedy lane packing for day-spanning chips. Sorted by start then by length,\n * each segment takes the first lane its columns are free in — the classic\n * interval-graph colouring, and the reason a long event keeps one lane across\n * the whole week instead of stair-stepping.\n *\n * `limit` caps the visible lanes; anything past it is reported per column so\n * the cell can say how much it is hiding.\n */\n private bandLayout(\n events: readonly WrCalendarEvent[],\n days: readonly Date[],\n limit: number\n ): { chips: readonly BandChip[]; hidden: readonly number[] } {\n const first = days[0];\n const last = this.adapter.addDays(days[days.length - 1], 1);\n const lanes: number[][] = [];\n const chips: BandChip[] = [];\n const hidden = days.map(() => 0);\n\n for (const event of events) {\n if (event.end.getTime() <= first.getTime() || event.start.getTime() >= last.getTime()) continue;\n\n const from = Math.max(0, this.daysBetween(first, this.startOfDay(event.start)));\n // An exclusive end landing exactly on midnight belongs to the previous\n // day — otherwise every all-day event paints one column too wide.\n const endDay = this.startOfDay(new Date(event.end.getTime() - 1));\n const to = Math.min(days.length - 1, this.daysBetween(first, endDay));\n if (to < from) continue;\n\n let lane = lanes.findIndex(taken => taken.every(col => col < from || col > to));\n if (lane === -1) {\n lane = lanes.length;\n lanes.push([]);\n }\n for (let col = from; col <= to; col++) lanes[lane].push(col);\n\n if (lane >= limit) {\n for (let col = from; col <= to; col++) hidden[col]++;\n continue;\n }\n\n chips.push({\n key: `${String(event.id)}:${from}`,\n event,\n column: from,\n span: to - from + 1,\n lane,\n continuesBefore: event.start.getTime() < first.getTime(),\n continuesAfter: event.end.getTime() > last.getTime(),\n });\n }\n\n return { chips, hidden };\n }\n\n /**\n * Column layout inside one day: events that overlap in time share the width.\n * Clusters are built by a running high-water mark — a new cluster starts the\n * moment an event begins after everything before it has ended.\n */\n private timeLayout(days: readonly Date[], slot: number): readonly { chip: TimeChip; slotMinutes: number }[][] {\n const from = Math.max(0, Math.min(23, this.dayStartHour())) * 60;\n const to = Math.max(from + slot, Math.min(24, this.dayEndHour()) * 60);\n const timed = this.visible().filter(e => !e.allDay && !this.spansWholeDay(e));\n\n return days.map(day => {\n const dayStart = this.startOfDay(day);\n const windowStart = dayStart.getTime() + from * 60_000;\n const windowEnd = dayStart.getTime() + to * 60_000;\n\n const onDay = timed\n .filter(e => e.end.getTime() > windowStart && e.start.getTime() < windowEnd)\n .map(event => ({\n event,\n from: Math.max(windowStart, event.start.getTime()),\n to: Math.min(windowEnd, event.end.getTime()),\n }))\n .sort((a, b) => {\n const byStart = a.from - b.from;\n return byStart !== 0 ? byStart : b.to - a.to;\n });\n\n const out: { chip: TimeChip; slotMinutes: number }[] = [];\n let cluster: typeof onDay = [];\n let highWater = -1;\n\n const flush = (): void => {\n for (const [index, item] of cluster.entries()) {\n const minutes = Math.floor((item.from - dayStart.getTime()) / 60_000);\n const slotStart = from + Math.floor((minutes - from) / slot) * slot;\n const length = (item.to - item.from) / 60_000;\n\n out.push({\n slotMinutes: slotStart,\n chip: {\n key: `${String(item.event.id)}:${minutes}`,\n event: item.event,\n top: ((minutes - slotStart) / slot) * 100,\n height: (length / slot) * 100,\n inlineStart: (index / cluster.length) * 100,\n width: (1 / cluster.length) * 100,\n continuesBefore: item.event.start.getTime() < windowStart,\n continuesAfter: item.event.end.getTime() > windowEnd,\n },\n });\n }\n cluster = [];\n };\n\n for (const item of onDay) {\n if (cluster.length > 0 && item.from >= highWater) flush();\n cluster.push(item);\n highWater = Math.max(highWater, item.to);\n }\n flush();\n\n return out;\n });\n }\n\n // --------------------------------------------------------------- chrome\n\n protected chipLabel(event: WrCalendarEvent): string {\n const time = event.allDay ? this.allDayLabel() : this.adapter.format(event.start, 'time');\n return `${event.title}, ${time}`;\n }\n\n protected chipTime(event: WrCalendarEvent): string {\n return event.allDay ? this.allDayLabel() : this.adapter.format(event.start, 'time');\n }\n\n protected canDrag(event: WrCalendarEvent): boolean {\n return this.editable() && event.editable !== false;\n }\n\n // --------------------------------------------------------------- helpers\n\n private slotAt(date: Date, minutes: number): WrCalendarSlot {\n if (minutes < 0) {\n const start = this.startOfDay(date);\n return { start, end: this.adapter.addDays(start, 1), allDay: true };\n }\n const start = new Date(this.startOfDay(date).getTime() + minutes * 60_000);\n return { start, end: new Date(start.getTime() + Math.max(5, this.slotMinutes()) * 60_000), allDay: false };\n }\n\n /** The `[data-cell]` under the pointer, or `null` outside the grid. */\n private cellUnder(x: number, y: number): { date: Date; minutes: number } | null {\n const el = this.document.elementFromPoint(x, y)?.closest<HTMLElement>('[data-cell-date]');\n if (!el) return null;\n // Epoch millis rather than a formatted date: `new Date('2026-08-08')` is\n // parsed as UTC and lands on the previous day west of Greenwich.\n const stamp = Number(el.dataset['cellDate']);\n if (!Number.isFinite(stamp)) return null;\n return { date: new Date(stamp), minutes: Number(el.dataset['cellMinutes'] ?? -1) };\n }\n\n /** Value of a cell's `data-cell-date`. @internal */\n protected stamp(date: Date): number {\n return this.startOfDay(date).getTime();\n }\n\n private focusCursor(from: HTMLElement): void {\n const [day, minutes] = this.cursorCell();\n from.closest('[role=\"grid\"]')?.querySelector<HTMLElement>(`[data-cell-index=\"${day}:${minutes}\"]`)?.focus();\n }\n\n private focusCell(event: KeyboardEvent): void {\n event.preventDefault();\n (event.target as HTMLElement).closest<HTMLElement>('[data-cell-date]')?.focus();\n }\n\n /**\n * Move one time row, treating the all-day band as the row above the first —\n * otherwise the band is mouse-only, which is the kind of gap that makes a\n * keyboard user give up on the whole grid.\n */\n private stepRow(minutes: number, direction: -1 | 1, rows: readonly TimeRow[]): number {\n if (minutes === -1) return direction === 1 ? (rows[0]?.minutes ?? -1) : -1;\n\n const index = rows.findIndex(row => row.minutes === minutes);\n if (index === -1) return rows[0]?.minutes ?? -1;\n if (index === 0 && direction === -1) return this.hasAllDay() ? -1 : minutes;\n\n return rows[Math.min(rows.length - 1, index + direction)].minutes;\n }\n\n private shift(date: Date, days: number, minutes: number): Date {\n return new Date(this.adapter.addDays(date, days).getTime() + minutes * 60_000);\n }\n\n private startOfDay(date: Date): Date {\n return this.adapter.setTime(date, 0, 0, 0);\n }\n\n private startOfWeek(date: Date): Date {\n const first = this.adapter.getFirstDayOfWeek();\n const offset = (this.adapter.getDayOfWeek(date) - first + DAYS_PER_WEEK) % DAYS_PER_WEEK;\n return this.startOfDay(this.adapter.addDays(date, -offset));\n }\n\n /** Whole days apart — computed on the day floor, so DST cannot round it off. */\n private daysBetween(from: Date, to: Date): number {\n const a = this.startOfDay(from);\n const b = this.startOfDay(to);\n return Math.round((b.getTime() - a.getTime()) / (MINUTES_PER_DAY * 60_000));\n }\n\n private spansWholeDay(event: WrCalendarEvent): boolean {\n return event.end.getTime() - event.start.getTime() >= MINUTES_PER_DAY * 60_000;\n }\n\n private clock(minutes: number): string {\n const date = this.adapter.setTime(this.adapter.today(), Math.floor(minutes / 60), minutes % 60, 0);\n return this.adapter.format(date, 'time');\n }\n\n private iso(date: Date): string {\n return `${this.adapter.getYear(date)}-${this.adapter.getMonth(date) + 1}-${this.adapter.getDate(date)}`;\n }\n\n /**\n * The key as the grid SEES it.\n *\n * A day step follows visual order, so under `dir=\"rtl\"` ArrowRight goes back a\n * day. Up/Down move by week or by row and never flip; Home/End are semantic.\n * Both key handlers route through here — the grid nav and the `Alt`+arrow drag,\n * which moves an event and would otherwise reschedule it the wrong way.\n */\n private inlineKey(key: string): string {\n if (this.dir?.value !== 'rtl') return key;\n if (key === 'ArrowRight') return 'ArrowLeft';\n if (key === 'ArrowLeft') return 'ArrowRight';\n return key;\n }\n}\n","<!--\n Two grids, one rule: a chip always lives inside the `role=\"gridcell\"` where it\n STARTS, and reaches out from there — `calc()` widths for day-spanning bands,\n percentage heights for timed chips. A floating events layer would read better\n in the template and would leave `role=\"row\"` owning something other than\n cells, which is exactly what the axe gate rejects.\n-->\n@if (!hideHeader()) {\n <div class=\"wr-event-calendar__header\">\n <div class=\"wr-event-calendar__nav\">\n <button\n wr-btn\n type=\"button\"\n size=\"sm\"\n outlined\n class=\"wr-event-calendar__step wr-event-calendar__step--prev\"\n [attr.aria-label]=\"previousLabel()\"\n (click)=\"step(-1)\"\n >\n <svg\n class=\"wr-icon__svg\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"m15 18-6-6 6-6\" />\n </svg>\n </button>\n <button wr-btn type=\"button\" size=\"sm\" outlined class=\"wr-event-calendar__today\" (click)=\"goToday()\">\n {{ todayLabel() }}\n </button>\n <button\n wr-btn\n type=\"button\"\n size=\"sm\"\n outlined\n class=\"wr-event-calendar__step wr-event-calendar__step--next\"\n [attr.aria-label]=\"nextLabel()\"\n (click)=\"step(1)\"\n >\n <svg\n class=\"wr-icon__svg\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"m9 18 6-6-6-6\" />\n </svg>\n </button>\n </div>\n\n <h2 class=\"wr-event-calendar__title\">{{ title() }}</h2>\n\n @if (switcher().length > 1) {\n <wr-btn-group>\n @for (item of switcher(); track item.view) {\n <button\n wr-btn\n type=\"button\"\n size=\"sm\"\n class=\"wr-event-calendar__view\"\n [outlined]=\"view() !== item.view\"\n [color]=\"view() === item.view ? 'primary' : null\"\n [attr.aria-pressed]=\"view() === item.view\"\n (click)=\"setView(item.view)\"\n >\n {{ item.label }}\n </button>\n }\n </wr-btn-group>\n }\n </div>\n}\n\n@if (view() === 'month') {\n <div\n role=\"grid\"\n class=\"wr-event-calendar__grid wr-event-calendar__grid--month\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n >\n <div role=\"row\" class=\"wr-event-calendar__row\">\n @for (name of weekdayNames(); track $index) {\n <div role=\"columnheader\" class=\"wr-event-calendar__weekday\">{{ name }}</div>\n }\n </div>\n\n @for (week of weeks(); track week.key; let w = $index) {\n <div role=\"row\" class=\"wr-event-calendar__row\">\n @for (cell of week.days; track cell.key; let c = $index) {\n @let index = w * 7 + c;\n <div\n role=\"gridcell\"\n class=\"wr-event-calendar__cell wr-event-calendar__cell--day\"\n [class.wr-event-calendar__cell--muted]=\"!cell.inMonth\"\n [class.wr-event-calendar__cell--today]=\"cell.isToday\"\n [attr.aria-label]=\"cell.label\"\n [attr.tabindex]=\"isCursor(index, -1) ? 0 : -1\"\n [attr.data-cell-date]=\"stamp(cell.date)\"\n [attr.data-cell-minutes]=\"-1\"\n [attr.data-cell-index]=\"`${index}:-1`\"\n (focusin)=\"onCellFocus(index, -1)\"\n (click)=\"onCellClick(cell.date, -1)\"\n (keydown)=\"onGridKeyDown($event)\"\n >\n <span class=\"wr-event-calendar__daynum\" aria-hidden=\"true\">{{ cell.day }}</span>\n\n @for (chip of cell.bands; track chip.key) {\n <ng-container\n [ngTemplateOutlet]=\"band\"\n [ngTemplateOutletContext]=\"{ $implicit: chip, offset: '1.75rem' }\"\n />\n }\n\n @if (cell.hidden > 0) {\n <button\n type=\"button\"\n class=\"wr-event-calendar__more\"\n [style.--wr-event-calendar-lane]=\"maxLanes()\"\n (click)=\"openDay(cell.date); $event.stopPropagation()\"\n >\n {{ moreLabel({ count: cell.hidden }) }}\n </button>\n }\n </div>\n }\n </div>\n }\n </div>\n} @else {\n <div\n role=\"grid\"\n class=\"wr-event-calendar__grid wr-event-calendar__grid--time\"\n [style.--wr-event-calendar-cols]=\"columns().length\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n >\n <div role=\"row\" class=\"wr-event-calendar__row\">\n <div role=\"columnheader\" class=\"wr-event-calendar__gutter\" [attr.aria-label]=\"timeLabel()\"></div>\n @for (column of columns(); track column.key) {\n <div\n role=\"columnheader\"\n class=\"wr-event-calendar__colhead\"\n [class.wr-event-calendar__colhead--today]=\"column.isToday\"\n >\n <span class=\"wr-event-calendar__colhead-weekday\">{{ column.weekday }}</span>\n <span class=\"wr-event-calendar__colhead-day\">{{ column.day }}</span>\n </div>\n }\n </div>\n\n @if (hasAllDay()) {\n <div role=\"row\" class=\"wr-event-calendar__row wr-event-calendar__row--allday\">\n <div role=\"rowheader\" class=\"wr-event-calendar__gutter\">{{ allDayLabel() }}</div>\n @for (cell of allDayCells(); track cell.key; let c = $index) {\n <div\n role=\"gridcell\"\n class=\"wr-event-calendar__cell wr-event-calendar__cell--allday\"\n [attr.aria-label]=\"cell.label\"\n [attr.tabindex]=\"isCursor(c, -1) ? 0 : -1\"\n [attr.data-cell-date]=\"stamp(cell.date)\"\n [attr.data-cell-minutes]=\"-1\"\n [attr.data-cell-index]=\"`${c}:-1`\"\n (focusin)=\"onCellFocus(c, -1)\"\n (click)=\"onCellClick(cell.date, -1)\"\n (keydown)=\"onGridKeyDown($event)\"\n >\n @for (chip of cell.bands; track chip.key) {\n <ng-container [ngTemplateOutlet]=\"band\" [ngTemplateOutletContext]=\"{ $implicit: chip, offset: '0rem' }\" />\n }\n </div>\n }\n </div>\n }\n\n @for (row of rows(); track row.key) {\n <div role=\"row\" class=\"wr-event-calendar__row\" [class.wr-event-calendar__row--major]=\"row.major\">\n <div role=\"rowheader\" class=\"wr-event-calendar__gutter\">{{ row.label }}</div>\n @for (cell of row.cells; track cell.key; let c = $index) {\n <div\n role=\"gridcell\"\n class=\"wr-event-calendar__cell wr-event-calendar__cell--slot\"\n [class.wr-event-calendar__cell--major]=\"row.major\"\n [attr.aria-label]=\"cell.label\"\n [attr.tabindex]=\"isCursor(c, row.minutes) ? 0 : -1\"\n [attr.data-cell-date]=\"stamp(cell.date)\"\n [attr.data-cell-minutes]=\"row.minutes\"\n [attr.data-cell-index]=\"`${c}:${row.minutes}`\"\n (focusin)=\"onCellFocus(c, row.minutes)\"\n (click)=\"onCellClick(cell.date, row.minutes)\"\n (keydown)=\"onGridKeyDown($event)\"\n >\n @for (chip of cell.chips; track chip.key) {\n <button\n type=\"button\"\n class=\"wr-event-calendar__chip wr-event-calendar__chip--time\"\n [class.wr-event-calendar__chip--dragging]=\"dragging() === chip.event.id\"\n [class.wr-event-calendar__chip--continues-before]=\"chip.continuesBefore\"\n [class.wr-event-calendar__chip--continues-after]=\"chip.continuesAfter\"\n [style.--wr-event-calendar-color]=\"`var(--wr-color-${chip.event.color ?? 'primary'})`\"\n [style.top.%]=\"chip.top\"\n [style.height.%]=\"chip.height\"\n [style.inset-inline-start.%]=\"chip.inlineStart\"\n [style.width.%]=\"chip.width\"\n [attr.aria-label]=\"chipLabel(chip.event)\"\n (click)=\"onChipClick(chip.event); $event.stopPropagation()\"\n (keydown)=\"onChipKeyDown($event, chip.event)\"\n (pointerdown)=\"onChipPointerDown($event, chip.event, 'move')\"\n >\n <span class=\"wr-event-calendar__chip-time\" aria-hidden=\"true\">{{ chipTime(chip.event) }}</span>\n @if (chipTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"{ $implicit: chip.event }\" />\n } @else {\n <span class=\"wr-event-calendar__chip-title\" aria-hidden=\"true\">{{ chip.event.title }}</span>\n }\n\n @if (canDrag(chip.event) && !chip.continuesAfter) {\n <!--\n A grab area, not a control: the same resize is on the keyboard as\n `Alt` + `Shift` + arrows on the chip itself, so exposing a second\n focusable thing here would add a tab stop that leads nowhere.\n -->\n <span\n class=\"wr-event-calendar__resize\"\n aria-hidden=\"true\"\n (pointerdown)=\"onChipPointerDown($event, chip.event, 'resize')\"\n ></span>\n }\n </button>\n }\n </div>\n }\n </div>\n }\n </div>\n}\n\n<!-- One chip shape for both day-spanning cases: month cells and the all-day band. -->\n<ng-template #band let-chip let-offset=\"offset\">\n <button\n type=\"button\"\n class=\"wr-event-calendar__chip wr-event-calendar__chip--band\"\n [class.wr-event-calendar__chip--dragging]=\"dragging() === chip.event.id\"\n [class.wr-event-calendar__chip--continues-before]=\"chip.continuesBefore\"\n [class.wr-event-calendar__chip--continues-after]=\"chip.continuesAfter\"\n [style.--wr-event-calendar-color]=\"`var(--wr-color-${chip.event.color ?? 'primary'})`\"\n [style.--wr-event-calendar-span]=\"chip.span\"\n [style.--wr-event-calendar-lane]=\"chip.lane\"\n [style.--wr-event-calendar-offset]=\"offset\"\n [attr.aria-label]=\"chipLabel(chip.event)\"\n (click)=\"onChipClick(chip.event); $event.stopPropagation()\"\n (keydown)=\"onChipKeyDown($event, chip.event)\"\n (pointerdown)=\"onChipPointerDown($event, chip.event, 'move')\"\n >\n @if (chipTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"{ $implicit: chip.event }\" />\n } @else {\n <span class=\"wr-event-calendar__chip-title\" aria-hidden=\"true\">{{ chip.event.title }}</span>\n }\n </button>\n</ng-template>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;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AAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,WAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AE1OjE;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ngwr-event-calendar.mjs","sources":["../../../projects/lib/event-calendar/event-calendar-event-template.ts","../../../projects/lib/event-calendar/event-calendar.ts","../../../projects/lib/event-calendar/event-calendar.html","../../../projects/lib/event-calendar/ngwr-event-calendar.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { Directive, TemplateRef, inject } from '@angular/core';\n\nimport type { WrCalendarEventContext } from './interfaces';\n\n/**\n * Replace the chip's contents. The event is the implicit context; the chip\n * itself — its button, its position and its drag handling — stays with the\n * calendar, so a custom template cannot break the geometry.\n *\n * @example\n * ```html\n * <wr-event-calendar [events]=\"events\">\n * <ng-template wrCalendarEvent let-event>\n * <strong>{{ event.title }}</strong> — {{ event.data.room }}\n * </ng-template>\n * </wr-event-calendar>\n * ```\n */\n@Directive({\n selector: 'ng-template[wrCalendarEvent]',\n})\nexport class WrCalendarEventTemplate {\n readonly template = inject<TemplateRef<WrCalendarEventContext>>(TemplateRef);\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { Directionality } from '@angular/cdk/bidi';\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { NgTemplateOutlet } from '@angular/common';\nimport type { TemplateRef } from '@angular/core';\nimport {\n Component,\n DOCUMENT,\n ViewEncapsulation,\n computed,\n contentChild,\n inject,\n input,\n model,\n output,\n signal,\n} from '@angular/core';\n\nimport { WrButton, WrButtonGroup } from 'ngwr/button';\nimport { WrDateAdapter } from 'ngwr/date';\nimport { useI18nFormatter, useI18nText } from 'ngwr/i18n';\nimport { numAttr } from 'ngwr/utils';\n\nimport { WrCalendarEventTemplate } from './event-calendar-event-template';\nimport type {\n WrCalendarEvent,\n WrCalendarEventChange,\n WrCalendarEventContext,\n WrCalendarSlot,\n WrCalendarView,\n} from './interfaces';\n\n/**\n * Stands in for the consumer input `useI18nText` expects — the header strings take no\n * label inputs of their own.\n */\nconst NO_OVERRIDE = signal<string | null>(null).asReadonly();\n\nconst MINUTES_PER_DAY = 24 * 60;\nconst DAYS_PER_WEEK = 7;\nconst MONTH_ROWS = 6;\n\n/**\n * A chip that spans whole days — every month-view event, and the all-day band\n * of the time views. It lives in the cell where its segment STARTS and reaches\n * right with a `calc()` width, so it stays inside one `role=\"gridcell\"` however\n * far it spans.\n */\ninterface BandChip {\n readonly key: string;\n readonly event: WrCalendarEvent;\n /** Index of the day it starts on, within the row it was laid out against. */\n readonly column: number;\n readonly span: number;\n readonly lane: number;\n readonly continuesBefore: boolean;\n readonly continuesAfter: boolean;\n}\n\n/**\n * A chip positioned against the time grid. Same rule — it belongs to the cell\n * holding its start — but sized in percentages OF THAT CELL, which works only\n * because every slot row is the same height.\n */\ninterface TimeChip {\n readonly key: string;\n readonly event: WrCalendarEvent;\n /** Offset into the start cell, 0–100. */\n readonly top: number;\n /** Height as a multiple of the cell, ×100. */\n readonly height: number;\n /**\n * Lane offset from the column's inline START, 0–100 — not from its physical\n * left. Concurrent events are laid out in reading order, so under `dir=\"rtl\"`\n * lane 0 belongs at the right; a physical `left` would read the cluster\n * back-to-front, which is the one thing in this component that was not logical.\n */\n readonly inlineStart: number;\n /** Lane width as a share of the column, 0–100. */\n readonly width: number;\n readonly continuesBefore: boolean;\n readonly continuesAfter: boolean;\n}\n\ninterface DayCell {\n readonly date: Date;\n readonly key: string;\n readonly day: string;\n readonly label: string;\n readonly inMonth: boolean;\n readonly isToday: boolean;\n readonly bands: readonly BandChip[];\n readonly hidden: number;\n}\n\ninterface MonthWeek {\n readonly key: string;\n readonly days: readonly DayCell[];\n}\n\ninterface TimeCell {\n readonly key: string;\n readonly date: Date;\n readonly label: string;\n readonly chips: readonly TimeChip[];\n}\n\ninterface TimeRow {\n readonly key: string;\n readonly label: string;\n /** Minutes from midnight — also what the drag target reads off the cell. */\n readonly minutes: number;\n readonly major: boolean;\n readonly cells: readonly TimeCell[];\n}\n\ninterface ColumnHeader {\n readonly key: string;\n readonly date: Date;\n readonly weekday: string;\n readonly day: string;\n readonly label: string;\n readonly isToday: boolean;\n}\n\n/** Live drag state. `null` whenever the pointer is not down on a chip. */\ninterface DragState {\n readonly event: WrCalendarEvent;\n readonly kind: 'move' | 'resize';\n readonly originDate: Date;\n readonly originMinutes: number;\n readonly pointerId: number;\n}\n\n/**\n * Month / week / day event calendar with drag to move and resize.\n *\n * `events` is an INPUT, never mutated: a drag emits `eventChange` describing\n * where the event would land and stops there. Apply it to your own state and\n * the calendar re-renders — so an unhandled output is a cancelled drag, an\n * optimistic update is one `set`, and a rejected server write needs no rollback\n * path inside the component.\n *\n * Every chip lives inside the `role=\"gridcell\"` where it starts and reaches out\n * with `calc()` widths or percentage heights. That is what keeps the ARIA grid\n * valid — an events layer floating over the grid would leave rows owning\n * something other than cells — and it means no pixel measurement anywhere.\n *\n * **Keyboard.** The grid is one tab stop with a roving cursor: arrows move by\n * day (left / right) and by week or slot (up / down), `Home` / `End` jump to\n * the ends of the row, `Enter` on an empty cell emits `slotClick`, and `Enter`\n * on a cell holding events focuses the first chip (`Escape` returns). On a\n * focused chip, `Alt` + arrows move the event — the keyboard equivalent of the\n * drag, emitting the same `eventChange`.\n *\n * Date math and formatting go through {@link WrDateAdapter}; register one with\n * `provideWrDateAdapter(...)` at bootstrap.\n *\n * @example\n * ```html\n * <wr-event-calendar\n * editable\n * [events]=\"events()\"\n * [(view)]=\"view\"\n * [(date)]=\"anchor\"\n * (eventChange)=\"apply($event)\"\n * (slotClick)=\"compose($event)\"\n * />\n * ```\n *\n * @see https://ngwr.dev/reference/components/event-calendar\n */\n@Component({\n selector: 'wr-event-calendar',\n templateUrl: './event-calendar.html',\n encapsulation: ViewEncapsulation.None,\n host: {\n '[class]': 'classes()',\n // A drag has to end wherever the pointer is released, including outside the\n // chip it started on — so the host owns the release, not the chip.\n '(pointerup)': 'onPointerUp($event)',\n '(pointercancel)': 'drag.set(null)',\n },\n imports: [NgTemplateOutlet, WrButton, WrButtonGroup],\n})\nexport class WrEventCalendar {\n /** Everything to render. Never mutated — see `eventChange`. */\n readonly events = input<readonly WrCalendarEvent[]>([]);\n\n /** Which span is shown. Two-way bindable. @default 'month' */\n readonly view = model<WrCalendarView>('month');\n\n /** Any date inside the shown span. Two-way bindable. */\n readonly date = model<Date>(new Date());\n\n /** Which buttons the view switcher offers. Empty hides it. */\n readonly views = input<readonly WrCalendarView[]>(['month', 'week', 'day']);\n\n /** Allow dragging chips to move and resize them. @default false */\n readonly editable = input(false, { transform: coerceBooleanProperty });\n\n /** Minutes per row in the time views — also the drag snap. @default 30 */\n readonly slotMinutes = input(30, { transform: numAttr(30) });\n\n /** First hour the time views show. @default 0 */\n readonly dayStartHour = input(0, { transform: numAttr(0) });\n\n /** First hour they do NOT show, exclusive. @default 24 */\n readonly dayEndHour = input(24, { transform: numAttr(24) });\n\n /** Lanes a month cell shows before collapsing the rest into “+N more”. @default 3 */\n readonly maxLanes = input(3, { transform: numAttr(3) });\n\n /** Hide the built-in header — supply your own navigation instead. @default false */\n readonly hideHeader = input(false, { transform: coerceBooleanProperty });\n\n /** A chip was activated. */\n readonly eventClick = output<WrCalendarEvent>();\n\n /** Empty space was activated — the slot the user pointed at. */\n readonly slotClick = output<WrCalendarSlot>();\n\n /** A drag or an `Alt` + arrow finished. Apply it yourself; nothing moves until you do. */\n readonly eventChange = output<WrCalendarEventChange>();\n\n private readonly adapter = inject<WrDateAdapter<Date>>(WrDateAdapter);\n private readonly document = inject(DOCUMENT);\n private readonly dir = inject(Directionality, { optional: true });\n private readonly chipTpl = contentChild(WrCalendarEventTemplate);\n\n // Reactive: a calendar is as long-lived as the page it sits on, so a catalog that\n // finishes loading after construction — or a locale switch — has to reach these.\n // Resolved once, as they were, they froze the English defaults in place.\n protected readonly todayLabel = useI18nText(NO_OVERRIDE, 'eventCalendar.today', 'Today');\n protected readonly previousLabel = useI18nText(NO_OVERRIDE, 'eventCalendar.previous', 'Previous');\n protected readonly nextLabel = useI18nText(NO_OVERRIDE, 'eventCalendar.next', 'Next');\n protected readonly allDayLabel = useI18nText(NO_OVERRIDE, 'eventCalendar.allDay', 'All day');\n protected readonly timeLabel = useI18nText(NO_OVERRIDE, 'eventCalendar.time', 'Time');\n protected readonly moreLabel = useI18nFormatter('eventCalendar.more', '+{{count}} more');\n private readonly monthLabel = useI18nText(NO_OVERRIDE, 'eventCalendar.month', 'Month');\n private readonly weekLabel = useI18nText(NO_OVERRIDE, 'eventCalendar.week', 'Week');\n private readonly dayLabel = useI18nText(NO_OVERRIDE, 'eventCalendar.day', 'Day');\n\n protected readonly viewLabels = computed<Record<WrCalendarView, string>>(() => ({\n month: this.monthLabel(),\n week: this.weekLabel(),\n day: this.dayLabel(),\n }));\n\n /** Accessible name of the grid; overridable for a page with several. */\n readonly ariaLabel = input<string | null>(null);\n protected readonly resolvedAriaLabel = useI18nText(this.ariaLabel, 'eventCalendar.label', 'Calendar');\n\n /**\n * `[day, minutes]` of the roving cursor — `minutes === -1` means a month cell\n * or the all-day band. Raw, so it survives a view switch; read\n * {@link cursorCell}, which clamps it to what the current view actually has.\n */\n private readonly cursor = signal<readonly [number, number]>([0, -1]);\n\n /**\n * The cursor as the current view can honour it. Exactly one cell may carry\n * `tabindex=\"0\"`, so a stale coordinate — the 09:30 row after switching to\n * month, day 34 after switching to week — must fall back to a real cell\n * rather than leave the grid with no tab stop at all.\n */\n protected readonly cursorCell = computed<readonly [number, number]>(() => {\n const [day, minutes] = this.cursor();\n const columns = Math.max(1, this.days().length);\n const clamped = Math.min(columns - 1, Math.max(0, day));\n\n if (this.view() === 'month') return [clamped, -1];\n if (minutes === -1 && this.hasAllDay()) return [clamped, -1];\n\n const rows = this.rows();\n const known = rows.some(row => row.minutes === minutes);\n return [clamped, known ? minutes : (rows[0]?.minutes ?? 0)];\n });\n\n /** Non-null only while a pointer is down on a chip. @internal */\n protected readonly drag = signal<DragState | null>(null);\n\n protected readonly dragging = computed(() => this.drag()?.event.id ?? null);\n\n protected readonly chipTemplate = computed<TemplateRef<WrCalendarEventContext> | null>(\n () => this.chipTpl()?.template ?? null\n );\n\n protected readonly classes = computed(() => {\n const parts = ['wr-event-calendar', `wr-event-calendar--${this.view()}`];\n if (this.editable()) parts.push('wr-event-calendar--editable');\n if (this.drag()) parts.push('wr-event-calendar--dragging');\n return parts.join(' ');\n });\n\n // ---------------------------------------------------------------- ranges\n\n /** Inclusive-exclusive window the current view covers. */\n private readonly range = computed<readonly [Date, Date]>(() => {\n const anchor = this.startOfDay(this.date());\n switch (this.view()) {\n case 'day':\n return [anchor, this.adapter.addDays(anchor, 1)];\n case 'week': {\n const start = this.startOfWeek(anchor);\n return [start, this.adapter.addDays(start, DAYS_PER_WEEK)];\n }\n default: {\n const first = this.adapter.createDate(this.adapter.getYear(anchor), this.adapter.getMonth(anchor), 1);\n const start = this.startOfWeek(first);\n return [start, this.adapter.addDays(start, MONTH_ROWS * DAYS_PER_WEEK)];\n }\n }\n });\n\n /** Every day the view shows, left to right. */\n private readonly days = computed<readonly Date[]>(() => {\n const [start, end] = this.range();\n const count = Math.round((end.getTime() - start.getTime()) / (MINUTES_PER_DAY * 60_000));\n return Array.from({ length: count }, (_, i) => this.adapter.addDays(start, i));\n });\n\n /** Only what overlaps the window — everything downstream works off this. */\n private readonly visible = computed<readonly WrCalendarEvent[]>(() => {\n const [start, end] = this.range();\n return [...this.events()]\n .filter(e => e.end.getTime() > start.getTime() && e.start.getTime() < end.getTime())\n .sort((a, b) => {\n const byStart = a.start.getTime() - b.start.getTime();\n // Ties go to the longer event, so a week-long band claims its lane\n // before the one-day events sitting alongside it.\n return byStart !== 0 ? byStart : b.end.getTime() - a.end.getTime();\n });\n });\n\n protected readonly title = computed(() => {\n const anchor = this.date();\n const months = this.adapter.getMonthNames('long');\n switch (this.view()) {\n case 'day':\n return this.adapter.format(anchor, 'longDate');\n case 'week': {\n const [start] = this.range();\n const last = this.adapter.addDays(start, DAYS_PER_WEEK - 1);\n return `${this.adapter.format(start, 'mediumDate')} – ${this.adapter.format(last, 'mediumDate')}`;\n }\n default:\n return `${months[this.adapter.getMonth(anchor)]} ${this.adapter.getYear(anchor)}`;\n }\n });\n\n /**\n * The adapter contract is \"names ordered from `getFirstDayOfWeek()` onwards\",\n * so the list is ALREADY rotated. Rotating it again here put every column one\n * day out for every locale whose week does not start on Sunday — invisible in\n * en-US, wrong everywhere else. `wr-calendar` consumes the same call directly.\n */\n protected readonly weekdayNames = computed(() => this.adapter.getDayOfWeekNames('short'));\n\n protected readonly switcher = computed(() => this.views().map(view => ({ view, label: this.viewLabels()[view] })));\n\n // ----------------------------------------------------------- month model\n\n protected readonly weeks = computed<readonly MonthWeek[]>(() => {\n const days = this.days();\n const events = this.visible();\n const weeks: MonthWeek[] = [];\n const month = this.adapter.getMonth(this.date());\n\n for (let w = 0; w * DAYS_PER_WEEK < days.length; w++) {\n const row = days.slice(w * DAYS_PER_WEEK, (w + 1) * DAYS_PER_WEEK);\n const { chips, hidden } = this.bandLayout(events, row, this.maxLanes());\n\n weeks.push({\n key: this.iso(row[0]),\n days: row.map((date, col) => ({\n date,\n key: this.iso(date),\n day: String(this.adapter.getDate(date)),\n label: this.adapter.format(date, 'longDate'),\n inMonth: this.adapter.getMonth(date) === month,\n isToday: this.adapter.isSameDay(date, this.adapter.today()),\n bands: chips.filter(chip => chip.column === col),\n hidden: hidden[col],\n })),\n });\n }\n\n return weeks;\n });\n\n // ------------------------------------------------------------ time model\n\n protected readonly columns = computed<readonly ColumnHeader[]>(() => {\n const weekdays = this.adapter.getDayOfWeekNames('short');\n const first = this.adapter.getFirstDayOfWeek();\n return this.days().map(date => ({\n key: this.iso(date),\n date,\n // `weekdays` is indexed from the week's first day; `getDayOfWeek` is\n // absolute (0 = Sunday). Mixing the two spaces named Monday \"Tue\".\n weekday: weekdays[(this.adapter.getDayOfWeek(date) - first + DAYS_PER_WEEK) % DAYS_PER_WEEK],\n day: String(this.adapter.getDate(date)),\n label: this.adapter.format(date, 'longDate'),\n isToday: this.adapter.isSameDay(date, this.adapter.today()),\n }));\n });\n\n /** The all-day band above the time grid — same layout as a month week. */\n protected readonly allDayBands = computed<readonly BandChip[]>(() => {\n const days = this.days();\n const events = this.visible().filter(e => e.allDay === true || this.spansWholeDay(e));\n return this.bandLayout(events, days, Number.POSITIVE_INFINITY).chips;\n });\n\n protected readonly allDayCells = computed<\n readonly { key: string; date: Date; label: string; bands: readonly BandChip[] }[]\n >(() => {\n const days = this.days();\n const chips = this.allDayBands();\n return days.map((date, col) => ({\n key: this.iso(date),\n date,\n label: `${this.allDayLabel()} — ${this.adapter.format(date, 'longDate')}`,\n bands: chips.filter(chip => chip.column === col),\n }));\n });\n\n protected readonly hasAllDay = computed(() => this.allDayBands().length > 0);\n\n protected readonly rows = computed<readonly TimeRow[]>(() => {\n const slot = Math.max(5, this.slotMinutes());\n const from = Math.max(0, Math.min(23, this.dayStartHour())) * 60;\n const to = Math.max(from + slot, Math.min(24, this.dayEndHour()) * 60);\n const days = this.days();\n const placed = this.timeLayout(days, slot);\n const rows: TimeRow[] = [];\n\n // Each half of a cell's name is invariant along one axis: the day reads the\n // same down a column, the clock the same across a row. Formatting per CELL\n // asked the adapter for 336 of each on a default week (48 slots × 7 days)\n // where 48 clocks and 7 dates say the same thing, and\n // `WrNativeDateAdapter.format` builds a fresh `Intl.DateTimeFormat` per call.\n const dayLabels = days.map(date => this.adapter.format(date, 'longDate'));\n\n for (let minutes = from; minutes < to; minutes += slot) {\n const clock = this.clock(minutes);\n rows.push({\n key: String(minutes),\n minutes,\n major: minutes % 60 === 0,\n label: minutes % 60 === 0 ? clock : '',\n cells: days.map((date, col) => ({\n key: `${this.iso(date)}:${minutes}`,\n date,\n label: `${clock} — ${dayLabels[col]}`,\n chips: placed[col].filter(chip => chip.slotMinutes === minutes).map(chip => chip.chip),\n })),\n });\n }\n\n return rows;\n });\n\n // ------------------------------------------------------------------ nav\n\n protected step(direction: -1 | 1): void {\n const anchor = this.date();\n switch (this.view()) {\n case 'day':\n this.date.set(this.adapter.addDays(anchor, direction));\n break;\n case 'week':\n this.date.set(this.adapter.addDays(anchor, direction * DAYS_PER_WEEK));\n break;\n default:\n this.date.set(this.adapter.addMonths(anchor, direction));\n }\n }\n\n protected goToday(): void {\n this.date.set(this.adapter.today());\n }\n\n protected setView(view: WrCalendarView): void {\n this.view.set(view);\n }\n\n /** “+N more” opens that day — the overflow is only ever a month-view problem. */\n protected openDay(date: Date): void {\n this.date.set(date);\n this.view.set('day');\n }\n\n // -------------------------------------------------------------- pointer\n\n protected onChipPointerDown(event: PointerEvent, chipEvent: WrCalendarEvent, kind: 'move' | 'resize'): void {\n if (!this.canDrag(chipEvent) || event.button !== 0) return;\n\n // Hide the chip from the hit test for exactly this measurement. The\n // `--dragging` rule that does it for the rest of the gesture is bound to a\n // signal that is not set yet, so `elementFromPoint` returned the chip itself\n // and `closest()` climbed to the cell the chip STARTS in — never the cell\n // under the pointer. A chip wide or tall enough to reach past its own cell\n // then jumped by the grab offset instead of moving by the drag distance.\n const chip = event.currentTarget as HTMLElement;\n const pointerEvents = chip.style.pointerEvents;\n chip.style.pointerEvents = 'none';\n const cell = this.cellUnder(event.clientX, event.clientY);\n chip.style.pointerEvents = pointerEvents;\n if (!cell) return;\n\n // The chip must stop swallowing hit-tests, or `elementFromPoint` reports\n // the chip itself for the whole drag and the target never changes.\n try {\n (event.target as HTMLElement).setPointerCapture?.(event.pointerId);\n } catch {\n // Capture is an optimisation — it keeps the release on this element even\n // when the pointer leaves it. A pointer that is already gone throws here,\n // and losing capture is not a reason to lose the drag.\n }\n event.preventDefault();\n event.stopPropagation();\n\n this.drag.set({\n event: chipEvent,\n kind,\n originDate: cell.date,\n originMinutes: cell.minutes,\n pointerId: event.pointerId,\n });\n }\n\n protected onPointerUp(event: PointerEvent): void {\n const state = this.drag();\n this.drag.set(null);\n if (state?.pointerId !== event.pointerId) return;\n\n const cell = this.cellUnder(event.clientX, event.clientY);\n if (!cell) return;\n\n const dayDelta = this.daysBetween(state.originDate, cell.date);\n const minuteDelta = cell.minutes < 0 || state.originMinutes < 0 ? 0 : cell.minutes - state.originMinutes;\n if (dayDelta === 0 && minuteDelta === 0) return;\n\n const { event: source, kind } = state;\n if (kind === 'resize') {\n const end = this.shift(source.end, dayDelta, minuteDelta);\n // A resize that would end at or before the start is a no-op, not an\n // inverted event.\n if (end.getTime() <= source.start.getTime()) return;\n this.eventChange.emit({ event: source, start: source.start, end, kind });\n return;\n }\n\n this.eventChange.emit({\n event: source,\n start: this.shift(source.start, dayDelta, minuteDelta),\n end: this.shift(source.end, dayDelta, minuteDelta),\n kind,\n });\n }\n\n protected onChipClick(event: WrCalendarEvent): void {\n this.eventClick.emit(event);\n }\n\n protected onCellClick(date: Date, minutes: number): void {\n this.slotClick.emit(this.slotAt(date, minutes));\n }\n\n // ------------------------------------------------------------- keyboard\n\n protected onChipKeyDown(event: KeyboardEvent, chipEvent: WrCalendarEvent): void {\n if (event.key === 'Escape') {\n this.focusCell(event);\n return;\n }\n\n if (!event.altKey || !this.canDrag(chipEvent)) return;\n\n const slot = Math.max(5, this.slotMinutes());\n const inTime = this.view() !== 'month';\n let days = 0;\n let minutes = 0;\n\n switch (this.inlineKey(event.key)) {\n case 'ArrowLeft':\n days = -1;\n break;\n case 'ArrowRight':\n days = 1;\n break;\n case 'ArrowUp':\n if (inTime) minutes = -slot;\n else days = -DAYS_PER_WEEK;\n break;\n case 'ArrowDown':\n if (inTime) minutes = slot;\n else days = DAYS_PER_WEEK;\n break;\n default:\n return;\n }\n\n event.preventDefault();\n\n // `Shift` turns the same gesture into a resize, moving the END alone. Without it\n // the keyboard could move an event and never re-length one — and the resize grab\n // area is `aria-hidden` and unfocusable precisely BECAUSE this exists, so its\n // absence left the operation on the mouse only.\n if (event.shiftKey) {\n const end = this.shift(chipEvent.end, days, minutes);\n // Same rule as the pointer path: a resize that would end at or before the\n // start is a no-op rather than an inverted event.\n if (end.getTime() <= chipEvent.start.getTime()) return;\n this.eventChange.emit({ event: chipEvent, start: chipEvent.start, end, kind: 'resize' });\n return;\n }\n\n this.eventChange.emit({\n event: chipEvent,\n start: this.shift(chipEvent.start, days, minutes),\n end: this.shift(chipEvent.end, days, minutes),\n kind: 'move',\n });\n }\n\n protected onGridKeyDown(event: KeyboardEvent): void {\n // Handled per cell, not on the grid: the element carrying the keyboard\n // should be the one that actually holds focus. Chips sit inside cells and\n // own their keys, so let anything originating in one bubble straight past.\n if (event.target !== event.currentTarget) return;\n\n const [day, minutes] = this.cursorCell();\n const columns = this.days().length;\n const rows = this.rows();\n const inTime = this.view() !== 'month';\n let next: readonly [number, number];\n\n switch (this.inlineKey(event.key)) {\n case 'ArrowLeft':\n next = [Math.max(0, day - 1), minutes];\n break;\n case 'ArrowRight':\n next = [Math.min(columns - 1, day + 1), minutes];\n break;\n case 'ArrowUp':\n // Hold position at the top row, the way ArrowDown does at the bottom. A\n // `Math.max(0, …)` clamp reads as the same thing and is not: from the\n // Wednesday of the first week it lands on 0, so the cursor jumps\n // SIDEWAYS to Sunday instead of staying put.\n next = inTime\n ? [day, this.stepRow(minutes, -1, rows)]\n : [day - DAYS_PER_WEEK >= 0 ? day - DAYS_PER_WEEK : day, minutes];\n break;\n case 'ArrowDown':\n next = inTime\n ? [day, this.stepRow(minutes, 1, rows)]\n : [day + DAYS_PER_WEEK < columns ? day + DAYS_PER_WEEK : day, minutes];\n break;\n case 'Home':\n next = [day - (day % DAYS_PER_WEEK), minutes];\n break;\n case 'End':\n next = [Math.min(columns - 1, day - (day % DAYS_PER_WEEK) + DAYS_PER_WEEK - 1), minutes];\n break;\n case 'Enter':\n case ' ': {\n event.preventDefault();\n const cell = event.target as HTMLElement;\n const chip = cell.querySelector<HTMLElement>('.wr-event-calendar__chip');\n if (chip) chip.focus();\n else this.onCellClick(this.days()[day], minutes);\n return;\n }\n default:\n return;\n }\n\n event.preventDefault();\n this.cursor.set(next);\n this.focusCursor(event.currentTarget as HTMLElement);\n }\n\n /**\n * Keep the roving cursor on the cell that actually has focus.\n *\n * The cursor was only ever written by an arrow key, while focus moves for three\n * other reasons — a click, a Tab onto a chip, Escape out of one — so the next\n * arrow read a coordinate nobody was standing on and threw focus back to it,\n * usually the top-left of the grid.\n */\n protected onCellFocus(day: number, minutes: number): void {\n const [d, m] = this.cursor();\n if (d !== day || m !== minutes) this.cursor.set([day, minutes]);\n }\n\n protected isCursor(day: number, minutes: number): boolean {\n const [d, m] = this.cursorCell();\n return d === day && m === minutes;\n }\n\n // --------------------------------------------------------------- layout\n\n /**\n * Greedy lane packing for day-spanning chips. Sorted by start then by length,\n * each segment takes the first lane its columns are free in — the classic\n * interval-graph colouring, and the reason a long event keeps one lane across\n * the whole week instead of stair-stepping.\n *\n * `limit` caps the visible lanes; anything past it is reported per column so\n * the cell can say how much it is hiding.\n */\n private bandLayout(\n events: readonly WrCalendarEvent[],\n days: readonly Date[],\n limit: number\n ): { chips: readonly BandChip[]; hidden: readonly number[] } {\n const first = days[0];\n const last = this.adapter.addDays(days[days.length - 1], 1);\n const lanes: number[][] = [];\n const chips: BandChip[] = [];\n const hidden = days.map(() => 0);\n\n for (const event of events) {\n if (event.end.getTime() <= first.getTime() || event.start.getTime() >= last.getTime()) continue;\n\n const from = Math.max(0, this.daysBetween(first, this.startOfDay(event.start)));\n // An exclusive end landing exactly on midnight belongs to the previous\n // day — otherwise every all-day event paints one column too wide.\n const endDay = this.startOfDay(new Date(event.end.getTime() - 1));\n const to = Math.min(days.length - 1, this.daysBetween(first, endDay));\n if (to < from) continue;\n\n let lane = lanes.findIndex(taken => taken.every(col => col < from || col > to));\n if (lane === -1) {\n lane = lanes.length;\n lanes.push([]);\n }\n for (let col = from; col <= to; col++) lanes[lane].push(col);\n\n if (lane >= limit) {\n for (let col = from; col <= to; col++) hidden[col]++;\n continue;\n }\n\n chips.push({\n key: `${String(event.id)}:${from}`,\n event,\n column: from,\n span: to - from + 1,\n lane,\n continuesBefore: event.start.getTime() < first.getTime(),\n continuesAfter: event.end.getTime() > last.getTime(),\n });\n }\n\n return { chips, hidden };\n }\n\n /**\n * Column layout inside one day: events that overlap in time share the width.\n * Clusters are built by a running high-water mark — a new cluster starts the\n * moment an event begins after everything before it has ended.\n */\n private timeLayout(days: readonly Date[], slot: number): readonly { chip: TimeChip; slotMinutes: number }[][] {\n const from = Math.max(0, Math.min(23, this.dayStartHour())) * 60;\n const to = Math.max(from + slot, Math.min(24, this.dayEndHour()) * 60);\n const timed = this.visible().filter(e => !e.allDay && !this.spansWholeDay(e));\n\n return days.map(day => {\n const dayStart = this.startOfDay(day);\n const windowStart = dayStart.getTime() + from * 60_000;\n const windowEnd = dayStart.getTime() + to * 60_000;\n\n const onDay = timed\n .filter(e => e.end.getTime() > windowStart && e.start.getTime() < windowEnd)\n .map(event => ({\n event,\n from: Math.max(windowStart, event.start.getTime()),\n to: Math.min(windowEnd, event.end.getTime()),\n }))\n .sort((a, b) => {\n const byStart = a.from - b.from;\n return byStart !== 0 ? byStart : b.to - a.to;\n });\n\n const out: { chip: TimeChip; slotMinutes: number }[] = [];\n let cluster: typeof onDay = [];\n let highWater = -1;\n\n const flush = (): void => {\n for (const [index, item] of cluster.entries()) {\n const minutes = Math.floor((item.from - dayStart.getTime()) / 60_000);\n const slotStart = from + Math.floor((minutes - from) / slot) * slot;\n const length = (item.to - item.from) / 60_000;\n\n out.push({\n slotMinutes: slotStart,\n chip: {\n key: `${String(item.event.id)}:${minutes}`,\n event: item.event,\n top: ((minutes - slotStart) / slot) * 100,\n height: (length / slot) * 100,\n inlineStart: (index / cluster.length) * 100,\n width: (1 / cluster.length) * 100,\n continuesBefore: item.event.start.getTime() < windowStart,\n continuesAfter: item.event.end.getTime() > windowEnd,\n },\n });\n }\n cluster = [];\n };\n\n for (const item of onDay) {\n if (cluster.length > 0 && item.from >= highWater) flush();\n cluster.push(item);\n highWater = Math.max(highWater, item.to);\n }\n flush();\n\n return out;\n });\n }\n\n // --------------------------------------------------------------- chrome\n\n protected chipLabel(event: WrCalendarEvent): string {\n const time = event.allDay ? this.allDayLabel() : this.adapter.format(event.start, 'time');\n return `${event.title}, ${time}`;\n }\n\n protected chipTime(event: WrCalendarEvent): string {\n return event.allDay ? this.allDayLabel() : this.adapter.format(event.start, 'time');\n }\n\n protected canDrag(event: WrCalendarEvent): boolean {\n return this.editable() && event.editable !== false;\n }\n\n // --------------------------------------------------------------- helpers\n\n private slotAt(date: Date, minutes: number): WrCalendarSlot {\n if (minutes < 0) {\n const start = this.startOfDay(date);\n return { start, end: this.adapter.addDays(start, 1), allDay: true };\n }\n const start = new Date(this.startOfDay(date).getTime() + minutes * 60_000);\n return { start, end: new Date(start.getTime() + Math.max(5, this.slotMinutes()) * 60_000), allDay: false };\n }\n\n /** The `[data-cell]` under the pointer, or `null` outside the grid. */\n private cellUnder(x: number, y: number): { date: Date; minutes: number } | null {\n const el = this.document.elementFromPoint(x, y)?.closest<HTMLElement>('[data-cell-date]');\n if (!el) return null;\n // Epoch millis rather than a formatted date: `new Date('2026-08-08')` is\n // parsed as UTC and lands on the previous day west of Greenwich.\n const stamp = Number(el.dataset['cellDate']);\n if (!Number.isFinite(stamp)) return null;\n return { date: new Date(stamp), minutes: Number(el.dataset['cellMinutes'] ?? -1) };\n }\n\n /** Value of a cell's `data-cell-date`. @internal */\n protected stamp(date: Date): number {\n return this.startOfDay(date).getTime();\n }\n\n private focusCursor(from: HTMLElement): void {\n const [day, minutes] = this.cursorCell();\n from.closest('[role=\"grid\"]')?.querySelector<HTMLElement>(`[data-cell-index=\"${day}:${minutes}\"]`)?.focus();\n }\n\n private focusCell(event: KeyboardEvent): void {\n event.preventDefault();\n (event.target as HTMLElement).closest<HTMLElement>('[data-cell-date]')?.focus();\n }\n\n /**\n * Move one time row, treating the all-day band as the row above the first —\n * otherwise the band is mouse-only, which is the kind of gap that makes a\n * keyboard user give up on the whole grid.\n */\n private stepRow(minutes: number, direction: -1 | 1, rows: readonly TimeRow[]): number {\n if (minutes === -1) return direction === 1 ? (rows[0]?.minutes ?? -1) : -1;\n\n const index = rows.findIndex(row => row.minutes === minutes);\n if (index === -1) return rows[0]?.minutes ?? -1;\n if (index === 0 && direction === -1) return this.hasAllDay() ? -1 : minutes;\n\n return rows[Math.min(rows.length - 1, index + direction)].minutes;\n }\n\n private shift(date: Date, days: number, minutes: number): Date {\n return new Date(this.adapter.addDays(date, days).getTime() + minutes * 60_000);\n }\n\n private startOfDay(date: Date): Date {\n return this.adapter.setTime(date, 0, 0, 0);\n }\n\n private startOfWeek(date: Date): Date {\n const first = this.adapter.getFirstDayOfWeek();\n const offset = (this.adapter.getDayOfWeek(date) - first + DAYS_PER_WEEK) % DAYS_PER_WEEK;\n return this.startOfDay(this.adapter.addDays(date, -offset));\n }\n\n /** Whole days apart — computed on the day floor, so DST cannot round it off. */\n private daysBetween(from: Date, to: Date): number {\n const a = this.startOfDay(from);\n const b = this.startOfDay(to);\n return Math.round((b.getTime() - a.getTime()) / (MINUTES_PER_DAY * 60_000));\n }\n\n private spansWholeDay(event: WrCalendarEvent): boolean {\n return event.end.getTime() - event.start.getTime() >= MINUTES_PER_DAY * 60_000;\n }\n\n private clock(minutes: number): string {\n const date = this.adapter.setTime(this.adapter.today(), Math.floor(minutes / 60), minutes % 60, 0);\n return this.adapter.format(date, 'time');\n }\n\n private iso(date: Date): string {\n return `${this.adapter.getYear(date)}-${this.adapter.getMonth(date) + 1}-${this.adapter.getDate(date)}`;\n }\n\n /**\n * The key as the grid SEES it.\n *\n * A day step follows visual order, so under `dir=\"rtl\"` ArrowRight goes back a\n * day. Up/Down move by week or by row and never flip; Home/End are semantic.\n * Both key handlers route through here — the grid nav and the `Alt`+arrow drag,\n * which moves an event and would otherwise reschedule it the wrong way.\n */\n private inlineKey(key: string): string {\n if (this.dir?.value !== 'rtl') return key;\n if (key === 'ArrowRight') return 'ArrowLeft';\n if (key === 'ArrowLeft') return 'ArrowRight';\n return key;\n }\n}\n","<!--\n Two grids, one rule: a chip always lives inside the `role=\"gridcell\"` where it\n STARTS, and reaches out from there — `calc()` widths for day-spanning bands,\n percentage heights for timed chips. A floating events layer would read better\n in the template and would leave `role=\"row\"` owning something other than\n cells, which is exactly what the axe gate rejects.\n-->\n@if (!hideHeader()) {\n <div class=\"wr-event-calendar__header\">\n <div class=\"wr-event-calendar__nav\">\n <button\n wr-btn\n type=\"button\"\n size=\"sm\"\n outlined\n class=\"wr-event-calendar__step wr-event-calendar__step--prev\"\n [attr.aria-label]=\"previousLabel()\"\n (click)=\"step(-1)\"\n >\n <svg\n class=\"wr-icon__svg\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"m15 18-6-6 6-6\" />\n </svg>\n </button>\n <button wr-btn type=\"button\" size=\"sm\" outlined class=\"wr-event-calendar__today\" (click)=\"goToday()\">\n {{ todayLabel() }}\n </button>\n <button\n wr-btn\n type=\"button\"\n size=\"sm\"\n outlined\n class=\"wr-event-calendar__step wr-event-calendar__step--next\"\n [attr.aria-label]=\"nextLabel()\"\n (click)=\"step(1)\"\n >\n <svg\n class=\"wr-icon__svg\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"m9 18 6-6-6-6\" />\n </svg>\n </button>\n </div>\n\n <h2 class=\"wr-event-calendar__title\">{{ title() }}</h2>\n\n @if (switcher().length > 1) {\n <wr-btn-group>\n @for (item of switcher(); track item.view) {\n <button\n wr-btn\n type=\"button\"\n size=\"sm\"\n class=\"wr-event-calendar__view\"\n [outlined]=\"view() !== item.view\"\n [color]=\"view() === item.view ? 'primary' : null\"\n [attr.aria-pressed]=\"view() === item.view\"\n (click)=\"setView(item.view)\"\n >\n {{ item.label }}\n </button>\n }\n </wr-btn-group>\n }\n </div>\n}\n\n@if (view() === 'month') {\n <div\n role=\"grid\"\n class=\"wr-event-calendar__grid wr-event-calendar__grid--month\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n >\n <div role=\"row\" class=\"wr-event-calendar__row\">\n @for (name of weekdayNames(); track $index) {\n <div role=\"columnheader\" class=\"wr-event-calendar__weekday\">{{ name }}</div>\n }\n </div>\n\n @for (week of weeks(); track week.key; let w = $index) {\n <div role=\"row\" class=\"wr-event-calendar__row\">\n @for (cell of week.days; track cell.key; let c = $index) {\n @let index = w * 7 + c;\n <div\n role=\"gridcell\"\n class=\"wr-event-calendar__cell wr-event-calendar__cell--day\"\n [class.wr-event-calendar__cell--muted]=\"!cell.inMonth\"\n [class.wr-event-calendar__cell--today]=\"cell.isToday\"\n [attr.aria-label]=\"cell.label\"\n [attr.tabindex]=\"isCursor(index, -1) ? 0 : -1\"\n [attr.data-cell-date]=\"stamp(cell.date)\"\n [attr.data-cell-minutes]=\"-1\"\n [attr.data-cell-index]=\"`${index}:-1`\"\n (focusin)=\"onCellFocus(index, -1)\"\n (click)=\"onCellClick(cell.date, -1)\"\n (keydown)=\"onGridKeyDown($event)\"\n >\n <span class=\"wr-event-calendar__daynum\" aria-hidden=\"true\">{{ cell.day }}</span>\n\n @for (chip of cell.bands; track chip.key) {\n <ng-container\n [ngTemplateOutlet]=\"band\"\n [ngTemplateOutletContext]=\"{ $implicit: chip, offset: '1.75rem' }\"\n />\n }\n\n @if (cell.hidden > 0) {\n <button\n type=\"button\"\n class=\"wr-event-calendar__more\"\n [style.--wr-event-calendar-lane]=\"maxLanes()\"\n (click)=\"openDay(cell.date); $event.stopPropagation()\"\n >\n {{ moreLabel({ count: cell.hidden }) }}\n </button>\n }\n </div>\n }\n </div>\n }\n </div>\n} @else {\n <div\n role=\"grid\"\n class=\"wr-event-calendar__grid wr-event-calendar__grid--time\"\n [style.--wr-event-calendar-cols]=\"columns().length\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n >\n <div role=\"row\" class=\"wr-event-calendar__row\">\n <div role=\"columnheader\" class=\"wr-event-calendar__gutter\" [attr.aria-label]=\"timeLabel()\"></div>\n @for (column of columns(); track column.key) {\n <div\n role=\"columnheader\"\n class=\"wr-event-calendar__colhead\"\n [class.wr-event-calendar__colhead--today]=\"column.isToday\"\n >\n <span class=\"wr-event-calendar__colhead-weekday\">{{ column.weekday }}</span>\n <span class=\"wr-event-calendar__colhead-day\">{{ column.day }}</span>\n </div>\n }\n </div>\n\n @if (hasAllDay()) {\n <div role=\"row\" class=\"wr-event-calendar__row wr-event-calendar__row--allday\">\n <div role=\"rowheader\" class=\"wr-event-calendar__gutter\">{{ allDayLabel() }}</div>\n @for (cell of allDayCells(); track cell.key; let c = $index) {\n <div\n role=\"gridcell\"\n class=\"wr-event-calendar__cell wr-event-calendar__cell--allday\"\n [attr.aria-label]=\"cell.label\"\n [attr.tabindex]=\"isCursor(c, -1) ? 0 : -1\"\n [attr.data-cell-date]=\"stamp(cell.date)\"\n [attr.data-cell-minutes]=\"-1\"\n [attr.data-cell-index]=\"`${c}:-1`\"\n (focusin)=\"onCellFocus(c, -1)\"\n (click)=\"onCellClick(cell.date, -1)\"\n (keydown)=\"onGridKeyDown($event)\"\n >\n @for (chip of cell.bands; track chip.key) {\n <ng-container [ngTemplateOutlet]=\"band\" [ngTemplateOutletContext]=\"{ $implicit: chip, offset: '0rem' }\" />\n }\n </div>\n }\n </div>\n }\n\n @for (row of rows(); track row.key) {\n <div role=\"row\" class=\"wr-event-calendar__row\" [class.wr-event-calendar__row--major]=\"row.major\">\n <div role=\"rowheader\" class=\"wr-event-calendar__gutter\">{{ row.label }}</div>\n @for (cell of row.cells; track cell.key; let c = $index) {\n <div\n role=\"gridcell\"\n class=\"wr-event-calendar__cell wr-event-calendar__cell--slot\"\n [class.wr-event-calendar__cell--major]=\"row.major\"\n [attr.aria-label]=\"cell.label\"\n [attr.tabindex]=\"isCursor(c, row.minutes) ? 0 : -1\"\n [attr.data-cell-date]=\"stamp(cell.date)\"\n [attr.data-cell-minutes]=\"row.minutes\"\n [attr.data-cell-index]=\"`${c}:${row.minutes}`\"\n (focusin)=\"onCellFocus(c, row.minutes)\"\n (click)=\"onCellClick(cell.date, row.minutes)\"\n (keydown)=\"onGridKeyDown($event)\"\n >\n @for (chip of cell.chips; track chip.key) {\n <button\n type=\"button\"\n class=\"wr-event-calendar__chip wr-event-calendar__chip--time\"\n [class.wr-event-calendar__chip--dragging]=\"dragging() === chip.event.id\"\n [class.wr-event-calendar__chip--continues-before]=\"chip.continuesBefore\"\n [class.wr-event-calendar__chip--continues-after]=\"chip.continuesAfter\"\n [style.--wr-event-calendar-color]=\"`var(--wr-color-${chip.event.color ?? 'primary'})`\"\n [style.top.%]=\"chip.top\"\n [style.height.%]=\"chip.height\"\n [style.inset-inline-start.%]=\"chip.inlineStart\"\n [style.width.%]=\"chip.width\"\n [attr.aria-label]=\"chipLabel(chip.event)\"\n (click)=\"onChipClick(chip.event); $event.stopPropagation()\"\n (keydown)=\"onChipKeyDown($event, chip.event)\"\n (pointerdown)=\"onChipPointerDown($event, chip.event, 'move')\"\n >\n <span class=\"wr-event-calendar__chip-time\" aria-hidden=\"true\">{{ chipTime(chip.event) }}</span>\n @if (chipTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"{ $implicit: chip.event }\" />\n } @else {\n <span class=\"wr-event-calendar__chip-title\" aria-hidden=\"true\">{{ chip.event.title }}</span>\n }\n\n @if (canDrag(chip.event) && !chip.continuesAfter) {\n <!--\n A grab area, not a control: the same resize is on the keyboard as\n `Alt` + `Shift` + arrows on the chip itself, so exposing a second\n focusable thing here would add a tab stop that leads nowhere.\n -->\n <span\n class=\"wr-event-calendar__resize\"\n aria-hidden=\"true\"\n (pointerdown)=\"onChipPointerDown($event, chip.event, 'resize')\"\n ></span>\n }\n </button>\n }\n </div>\n }\n </div>\n }\n </div>\n}\n\n<!-- One chip shape for both day-spanning cases: month cells and the all-day band. -->\n<ng-template #band let-chip let-offset=\"offset\">\n <button\n type=\"button\"\n class=\"wr-event-calendar__chip wr-event-calendar__chip--band\"\n [class.wr-event-calendar__chip--dragging]=\"dragging() === chip.event.id\"\n [class.wr-event-calendar__chip--continues-before]=\"chip.continuesBefore\"\n [class.wr-event-calendar__chip--continues-after]=\"chip.continuesAfter\"\n [style.--wr-event-calendar-color]=\"`var(--wr-color-${chip.event.color ?? 'primary'})`\"\n [style.--wr-event-calendar-span]=\"chip.span\"\n [style.--wr-event-calendar-lane]=\"chip.lane\"\n [style.--wr-event-calendar-offset]=\"offset\"\n [attr.aria-label]=\"chipLabel(chip.event)\"\n (click)=\"onChipClick(chip.event); $event.stopPropagation()\"\n (keydown)=\"onChipKeyDown($event, chip.event)\"\n (pointerdown)=\"onChipPointerDown($event, chip.event, 'move')\"\n >\n @if (chipTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"{ $implicit: chip.event }\" />\n } @else {\n <span class=\"wr-event-calendar__chip-title\" aria-hidden=\"true\">{{ chip.event.title }}</span>\n }\n </button>\n</ng-template>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;AAAA;;;;;AAKG;AAMH;;;;;;;;;;;;;AAaG;MAIU,uBAAuB,CAAA;AACzB,IAAA,QAAQ,GAAG,MAAM,CAAsC,WAAW,CAAC;uGADjE,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;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
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { coerceBooleanProperty, coerceNumberProperty } from '@angular/cdk/coercion';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { input, model, output, viewChild, signal, computed, effect, untracked, ViewEncapsulation, Component } from '@angular/core';
|
|
3
|
+
import { input, model, output, viewChild, signal, computed, inject, LOCALE_ID, effect, untracked, ViewEncapsulation, Component } from '@angular/core';
|
|
4
4
|
import { useFormFieldAria } from 'ngwr/form';
|
|
5
|
-
import { useI18nText } from 'ngwr/i18n';
|
|
5
|
+
import { useI18nText, useI18nFormatter, readI18nText } from 'ngwr/i18n';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* @license
|
|
@@ -10,15 +10,6 @@ import { useI18nText } from 'ngwr/i18n';
|
|
|
10
10
|
* Use of this source code is governed by an MIT-style license that can be
|
|
11
11
|
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
12
12
|
*/
|
|
13
|
-
/** Human-readable byte size (e.g. `1.2 MB`). */
|
|
14
|
-
function formatBytes(bytes) {
|
|
15
|
-
if (!Number.isFinite(bytes) || bytes <= 0)
|
|
16
|
-
return '0 B';
|
|
17
|
-
const units = ['B', 'KB', 'MB', 'GB', 'TB'];
|
|
18
|
-
const i = Math.min(Math.floor(Math.log(bytes) / Math.log(1024)), units.length - 1);
|
|
19
|
-
const v = bytes / 1024 ** i;
|
|
20
|
-
return `${v.toFixed(v >= 100 || i === 0 ? 0 : 1)} ${units[i]}`;
|
|
21
|
-
}
|
|
22
13
|
/** Does `file` match the `accept` attribute (extensions or MIME globs)? */
|
|
23
14
|
function matchesAccept(file, accept) {
|
|
24
15
|
if (!accept)
|
|
@@ -141,7 +132,56 @@ class WrFileUpload {
|
|
|
141
132
|
return parts.join(' ');
|
|
142
133
|
}, /* @ts-ignore */
|
|
143
134
|
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
144
|
-
|
|
135
|
+
/**
|
|
136
|
+
* Human-readable file size (e.g. `1.2 MB`).
|
|
137
|
+
*
|
|
138
|
+
* Every piece of this used to be English and unreachable: a module-level unit
|
|
139
|
+
* table with no catalog key, and `toFixed()`, which writes an ASCII decimal
|
|
140
|
+
* point whatever `LOCALE_ID` says. A Russian page showed translated drop-zone
|
|
141
|
+
* copy above `3.4 KB`. The number now goes through `Intl.NumberFormat` and the
|
|
142
|
+
* unit through the catalog, joined by a template the catalog also owns — so a
|
|
143
|
+
* locale controls the separator, the digits and whether a space sits before
|
|
144
|
+
* the unit.
|
|
145
|
+
*
|
|
146
|
+
* Not a `computed`: it is called per file, with the file's size as its
|
|
147
|
+
* argument. It still re-runs on a locale switch, because the formatters it
|
|
148
|
+
* calls are signals read during the same change detection that renders the row.
|
|
149
|
+
*/
|
|
150
|
+
formatBytes(bytes) {
|
|
151
|
+
if (!Number.isFinite(bytes) || bytes <= 0) {
|
|
152
|
+
return this.sizeText({ value: this.number(0, 0), unit: this.unitTexts[0]() });
|
|
153
|
+
}
|
|
154
|
+
const i = Math.min(Math.floor(Math.log(bytes) / Math.log(1024)), this.unitTexts.length - 1);
|
|
155
|
+
const v = bytes / 1024 ** i;
|
|
156
|
+
const digits = v >= 100 || i === 0 ? 0 : 1;
|
|
157
|
+
return this.sizeText({ value: this.number(v, digits), unit: this.unitTexts[i]() });
|
|
158
|
+
}
|
|
159
|
+
/** `{{value}} {{unit}}` — the join, so a locale owns the space too. */
|
|
160
|
+
sizeText = useI18nFormatter('fileUpload.size', '{{value}} {{unit}}');
|
|
161
|
+
/**
|
|
162
|
+
* One resolved signal per binary unit, indexed by the power of 1024 the
|
|
163
|
+
* arithmetic lands on.
|
|
164
|
+
*
|
|
165
|
+
* Spelled out rather than built from a key list: `i18n.spec.ts` reads every
|
|
166
|
+
* catalog key the library asks for out of the SOURCE, by matching a quoted
|
|
167
|
+
* dotted string inside the call, so a key built by interpolation is invisible
|
|
168
|
+
* to it. That spec fails rather than passing quietly, but either way the key
|
|
169
|
+
* would stop being checked.
|
|
170
|
+
*/
|
|
171
|
+
unitTexts = [
|
|
172
|
+
readI18nText('fileUpload.unitByte', 'B'),
|
|
173
|
+
readI18nText('fileUpload.unitKb', 'KB'),
|
|
174
|
+
readI18nText('fileUpload.unitMb', 'MB'),
|
|
175
|
+
readI18nText('fileUpload.unitGb', 'GB'),
|
|
176
|
+
readI18nText('fileUpload.unitTb', 'TB'),
|
|
177
|
+
];
|
|
178
|
+
locale = inject(LOCALE_ID);
|
|
179
|
+
number(value, digits) {
|
|
180
|
+
return new Intl.NumberFormat(this.locale, {
|
|
181
|
+
minimumFractionDigits: digits,
|
|
182
|
+
maximumFractionDigits: digits,
|
|
183
|
+
}).format(value);
|
|
184
|
+
}
|
|
145
185
|
constructor() {
|
|
146
186
|
// Rebuild the internal file list from an external `value` write (mirrors the
|
|
147
187
|
// old `writeValue`). Skipped when the value is merely the echo of an
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngwr-file-upload.mjs","sources":["../../../projects/lib/file-upload/file-upload.ts","../../../projects/lib/file-upload/file-upload.html","../../../projects/lib/file-upload/ngwr-file-upload.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { coerceBooleanProperty, coerceNumberProperty } from '@angular/cdk/coercion';\nimport {\n Component,\n type ElementRef,\n ViewEncapsulation,\n computed,\n effect,\n input,\n model,\n output,\n signal,\n untracked,\n viewChild,\n} from '@angular/core';\nimport type { FormValueControl } from '@angular/forms/signals';\n\nimport { useFormFieldAria } from 'ngwr/form';\nimport { useI18nText } from 'ngwr/i18n';\n\nimport type { WrFileUploadRejection, WrFileUploadRejectionReason } from './interfaces';\n\n/** Human-readable byte size (e.g. `1.2 MB`). */\nfunction formatBytes(bytes: number): string {\n if (!Number.isFinite(bytes) || bytes <= 0) return '0 B';\n const units = ['B', 'KB', 'MB', 'GB', 'TB'];\n const i = Math.min(Math.floor(Math.log(bytes) / Math.log(1024)), units.length - 1);\n const v = bytes / 1024 ** i;\n return `${v.toFixed(v >= 100 || i === 0 ? 0 : 1)} ${units[i]}`;\n}\n\n/** Does `file` match the `accept` attribute (extensions or MIME globs)? */\nfunction matchesAccept(file: File, accept: string): boolean {\n if (!accept) return true;\n const tokens = accept\n .split(',')\n .map(t => t.trim().toLowerCase())\n .filter(Boolean);\n if (tokens.length === 0) return true;\n const name = file.name.toLowerCase();\n const mime = file.type.toLowerCase();\n return tokens.some(token => {\n if (token.startsWith('.')) return name.endsWith(token);\n if (token.endsWith('/*')) return mime.startsWith(token.slice(0, -1));\n return mime === token;\n });\n}\n\n/**\n * Drag-and-drop file upload zone. Click to browse, drag-and-drop to add,\n * with an optional file list + remove buttons.\n *\n * A signal-forms native control: it implements\n * `FormValueControl<File | readonly File[] | null>`, so `[formField]` binds\n * straight to its `value` model — no `ControlValueAccessor` in between.\n * `[(value)]` works standalone. The value shape follows `multiple`: a single\n * `File` (or `null`), or a `File[]` array.\n *\n * @example\n * ```html\n * <!-- signal forms -->\n * <wr-file-upload [formField]=\"form.files\" [multiple]=\"true\" accept=\"image/*\" />\n *\n * <!-- standalone two-way binding -->\n * <wr-file-upload [(value)]=\"avatar\" accept=\".png,.jpg\" [maxSize]=\"2 * 1024 * 1024\" />\n * ```\n *\n * @see https://ngwr.dev/reference/components/file-upload\n */\n@Component({\n selector: 'wr-file-upload',\n templateUrl: './file-upload.html',\n encapsulation: ViewEncapsulation.None,\n host: { '[class]': 'classes()' },\n imports: [],\n})\nexport class WrFileUpload implements FormValueControl<File | readonly File[] | null> {\n /** Allow multiple files. Single mode replaces on each add. @default false */\n readonly multiple = input(false, { transform: coerceBooleanProperty });\n\n /** `accept` attribute — comma-separated MIME types or extensions. @default '' */\n readonly accept = input<string>('');\n\n /** Max bytes per file. `0` disables the check. @default 0 */\n readonly maxSize = input(0, { transform: (v: unknown): number => Math.max(0, coerceNumberProperty(v, 0)) });\n\n /** Max files (multi mode only). `0` disables the check. @default 0 */\n readonly maxFiles = input(0, { transform: (v: unknown): number => Math.max(0, coerceNumberProperty(v, 0)) });\n\n /** Render the picked-files list below the zone. @default true */\n readonly showList = input(true, { transform: coerceBooleanProperty });\n\n /**\n * Disable interaction. Bound automatically from the field's disabled state\n * when used with `[formField]`.\n *\n * @default false\n */\n readonly disabled = input(false, { transform: coerceBooleanProperty });\n\n /**\n * Refuse changes to the selection while the zone stays focusable and the files\n * still submit. Bound automatically from the field's readonly state when used\n * with `[formField]`.\n *\n * The zone stops opening the picker, a drop is refused and the per-file remove\n * buttons go inert — but the list stays readable, which is the point. No\n * `aria-readonly`: the zone is a `role=\"button\"`, and ARIA does not define the\n * state for that role, so `aria-disabled` would be the only mirror available\n * and it would say the wrong thing.\n *\n * @default false\n */\n readonly readonly = input(false, { transform: coerceBooleanProperty });\n\n /** The surrounding `<wr-form-field>`'s error state. @internal */\n protected readonly fieldAria = useFormFieldAria();\n\n /** Primary call-to-action label. Falls back to `fileUpload.browse`. */\n readonly pickLabel = input<string | null>(null);\n\n /** Secondary instruction below the CTA. Falls back to `fileUpload.dropZone`. */\n readonly dropLabel = input<string | null>(null);\n\n /** Drop-zone host aria-label. Falls back to `fileUpload.dropZoneLabel`. */\n readonly dropZoneLabel = input<string | null>(null);\n\n /** Remove-file button aria-label. Falls back to `fileUpload.removeFile`. */\n readonly removeFileLabel = input<string | null>(null);\n\n protected readonly resolvedPick = useI18nText(this.pickLabel, 'fileUpload.browse', 'Click to browse');\n protected readonly resolvedDrop = useI18nText(this.dropLabel, 'fileUpload.dropZone', 'or drop files here');\n protected readonly resolvedDropZone = useI18nText(\n this.dropZoneLabel,\n 'fileUpload.dropZoneLabel',\n 'File upload drop zone — click or drop files'\n );\n protected readonly resolvedRemove = useI18nText(this.removeFileLabel, 'fileUpload.removeFile', 'Remove file');\n\n /** Optional helper text shown below the labels (e.g. accepted formats). */\n readonly helperText = input<string>('');\n\n /**\n * Selected file(s). Bound by `[formField]`, or two-way via `[(value)]`. Shape\n * follows `multiple`: a single `File` (or `null`), or a `File[]` array.\n */\n readonly value = model<File | readonly File[] | null>(null);\n\n /** Emitted when files are rejected for type / size / count reasons. */\n readonly rejected = output<readonly WrFileUploadRejection[]>();\n\n /** Emitted on commit so a bound field can mark itself touched. */\n readonly touch = output<void>();\n\n protected readonly picker = viewChild.required<ElementRef<HTMLInputElement>>('picker');\n\n protected readonly files = signal<readonly File[]>([]);\n protected readonly dragging = signal(false);\n\n protected readonly classes = computed(() => {\n const parts = ['wr-file-upload'];\n if (this.dragging()) parts.push('wr-file-upload--dragging');\n if (this.disabled()) parts.push('wr-file-upload--disabled');\n else if (this.readonly()) parts.push('wr-file-upload--readonly');\n return parts.join(' ');\n });\n\n protected readonly formatBytes = formatBytes;\n\n constructor() {\n // Rebuild the internal file list from an external `value` write (mirrors the\n // old `writeValue`). Skipped when the value is merely the echo of an\n // in-component edit, so re-syncing can never clobber a live selection.\n effect(() => {\n const v = this.value();\n untracked(() => {\n // Coerce null/undefined to `[]` — a classic-forms binding can write\n // null, which the old `writeValue(v: … | null)` accepted too.\n const next: readonly File[] = v === null || v === undefined ? [] : Array.isArray(v) ? v : [v as File];\n const current = this.files();\n if (current.length === next.length && current.every((file, i) => file === next[i])) return;\n this.files.set(next);\n });\n });\n }\n\n // Template handlers\n\n protected openPicker(): void {\n if (this.disabled() || this.readonly()) return;\n this.picker().nativeElement.click();\n }\n\n protected onZoneKey(event: KeyboardEvent): void {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n this.openPicker();\n }\n }\n\n protected onPickerChange(event: Event): void {\n const target = event.target as HTMLInputElement;\n if (target.files) this.acceptFiles(Array.from(target.files));\n // Reset so picking the same file twice re-fires `change`.\n target.value = '';\n }\n\n protected onDragEnter(event: DragEvent): void {\n if (this.disabled() || this.readonly()) return;\n event.preventDefault();\n this.dragging.set(true);\n }\n\n protected onDragOver(event: DragEvent): void {\n if (this.disabled() || this.readonly()) return;\n event.preventDefault();\n if (event.dataTransfer) event.dataTransfer.dropEffect = 'copy';\n }\n\n protected onDragLeave(event: DragEvent): void {\n // Only clear when leaving the zone itself, not internal children.\n if (event.currentTarget === event.target) this.dragging.set(false);\n }\n\n protected onDrop(event: DragEvent): void {\n event.preventDefault();\n this.dragging.set(false);\n if (this.disabled() || this.readonly()) return;\n const dropped = event.dataTransfer?.files ? Array.from(event.dataTransfer.files) : [];\n if (dropped.length > 0) this.acceptFiles(dropped);\n }\n\n protected removeAt(index: number): void {\n if (this.disabled() || this.readonly()) return;\n const next = this.files().filter((_, i) => i !== index);\n this.files.set(next);\n this.emit();\n }\n\n // Internals\n\n private acceptFiles(incoming: readonly File[]): void {\n if (this.disabled() || this.readonly()) return;\n const accept = this.accept();\n const maxSize = this.maxSize();\n const rejections: WrFileUploadRejection[] = [];\n const accepted: File[] = [];\n\n for (const file of incoming) {\n const reason = this.reject(file, accept, maxSize);\n if (reason) rejections.push({ file, reason });\n else accepted.push(file);\n }\n\n let next: File[];\n if (this.multiple()) {\n next = [...this.files(), ...accepted];\n const maxFiles = this.maxFiles();\n if (maxFiles > 0 && next.length > maxFiles) {\n const overflow = next.splice(maxFiles);\n for (const file of overflow) rejections.push({ file, reason: 'count' });\n }\n } else {\n // Single mode — last accepted wins, prior selection cleared.\n next = accepted.length > 0 ? [accepted[accepted.length - 1]] : [...this.files()];\n }\n\n this.files.set(next);\n this.touch.emit();\n this.emit();\n if (rejections.length > 0) this.rejected.emit(rejections);\n }\n\n private reject(file: File, accept: string, maxSize: number): WrFileUploadRejectionReason | null {\n if (accept && !matchesAccept(file, accept)) return 'type';\n if (maxSize > 0 && file.size > maxSize) return 'size';\n return null;\n }\n\n private emit(): void {\n const list = this.files();\n if (this.multiple()) {\n this.value.set(list);\n } else {\n this.value.set(list.length > 0 ? list[0] : null);\n }\n }\n}\n","<div\n class=\"wr-file-upload__zone\"\n role=\"button\"\n tabindex=\"0\"\n [attr.aria-label]=\"resolvedDropZone()\"\n [attr.aria-disabled]=\"disabled() || null\"\n [attr.aria-invalid]=\"fieldAria.ariaInvalid()\"\n [attr.aria-describedby]=\"fieldAria.describedBy()\"\n (click)=\"openPicker()\"\n (keydown)=\"onZoneKey($event)\"\n (dragenter)=\"onDragEnter($event)\"\n (dragover)=\"onDragOver($event)\"\n (dragleave)=\"onDragLeave($event)\"\n (drop)=\"onDrop($event)\"\n>\n <svg class=\"wr-file-upload__icon\" width=\"32\" height=\"32\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <path\n d=\"M12 16V4M12 4l-4 4M12 4l4 4M4 16v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n <div class=\"wr-file-upload__hint\">\n <strong>{{ resolvedPick() }}</strong>\n <span>{{ resolvedDrop() }}</span>\n @if (helperText()) {\n <small>{{ helperText() }}</small>\n }\n </div>\n</div>\n\n<!--\n The real <input type=\"file\"> is never operated directly — the zone above is\n the control and forwards clicks here, so the input is visually hidden and kept\n OUTSIDE the zone: inside, it nested one interactive element within another\n (the zone is role=\"button\") and put two tab stops where users see one. It is\n positioned absolutely and clipped, so being a sibling changes nothing visually.\n aria-hidden must be paired with tabindex=\"-1\", or hiding a focusable element is\n itself a violation.\n-->\n<input\n #picker\n class=\"wr-file-upload__picker\"\n type=\"file\"\n aria-hidden=\"true\"\n tabindex=\"-1\"\n [attr.accept]=\"accept() || null\"\n [attr.multiple]=\"multiple() ? '' : null\"\n [disabled]=\"disabled() || readonly()\"\n (change)=\"onPickerChange($event)\"\n/>\n\n@if (showList() && files().length > 0) {\n <ul class=\"wr-file-upload__list\">\n @for (file of files(); track $index) {\n <li class=\"wr-file-upload__item\">\n <span class=\"wr-file-upload__name\" [title]=\"file.name\">{{ file.name }}</span>\n <span class=\"wr-file-upload__size\">{{ formatBytes(file.size) }}</span>\n <button\n type=\"button\"\n class=\"wr-file-upload__remove\"\n [attr.aria-label]=\"resolvedRemove()\"\n [disabled]=\"disabled() || readonly()\"\n (click)=\"removeAt($index)\"\n >\n <svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" aria-hidden=\"true\">\n <path\n d=\"M2 2 L10 10 M10 2 L2 10\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n />\n </svg>\n </button>\n </li>\n }\n </ul>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAAA;;;;;AAKG;AAuBH;AACA,SAAS,WAAW,CAAC,KAAa,EAAA;IAChC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,KAAK,IAAI,CAAC;AAAE,QAAA,OAAO,KAAK;AACvD,IAAA,MAAM,KAAK,GAAG,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;AAC3C,IAAA,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;AAClF,IAAA,MAAM,CAAC,GAAG,KAAK,GAAG,IAAI,IAAI,CAAC;IAC3B,OAAO,CAAA,EAAG,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAA,CAAA,EAAI,KAAK,CAAC,CAAC,CAAC,CAAA,CAAE;AAChE;AAEA;AACA,SAAS,aAAa,CAAC,IAAU,EAAE,MAAc,EAAA;AAC/C,IAAA,IAAI,CAAC,MAAM;AAAE,QAAA,OAAO,IAAI;IACxB,MAAM,MAAM,GAAG;SACZ,KAAK,CAAC,GAAG;AACT,SAAA,GAAG,C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AI,GAAG,IAAI,CAAC,KAAK,EAAE;AACzB,QAAA,IAAI,IAAI,CAAC,QAAQ,EAAE,EAAE;AACnB,YAAA,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC;QACtB;aAAO;YACL,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;QAClD;IACF;uGAlNW,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAZ,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,YAAY,4+DClFzB,8xFAkFA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FDAa,YAAY,EAAA,UAAA,EAAA,CAAA;kBAPxB,SAAS;+BACE,gBAAgB,EAAA,aAAA,EAEX,iBAAiB,CAAC,IAAI,EAAA,IAAA,EAC/B,EAAE,SAAS,EAAE,WAAW,EAAE,EAAA,OAAA,EACvB,EAAE,EAAA,QAAA,EAAA,8xFAAA,EAAA;k+CAgFkE,QAAQ,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEhKvF;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ngwr-file-upload.mjs","sources":["../../../projects/lib/file-upload/file-upload.ts","../../../projects/lib/file-upload/file-upload.html","../../../projects/lib/file-upload/ngwr-file-upload.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { coerceBooleanProperty, coerceNumberProperty } from '@angular/cdk/coercion';\nimport {\n Component,\n type ElementRef,\n LOCALE_ID,\n ViewEncapsulation,\n computed,\n effect,\n inject,\n input,\n model,\n output,\n signal,\n untracked,\n viewChild,\n} from '@angular/core';\nimport type { FormValueControl } from '@angular/forms/signals';\n\nimport { useFormFieldAria } from 'ngwr/form';\nimport { readI18nText, useI18nFormatter, useI18nText } from 'ngwr/i18n';\n\nimport type { WrFileUploadRejection, WrFileUploadRejectionReason } from './interfaces';\n\n/** Does `file` match the `accept` attribute (extensions or MIME globs)? */\nfunction matchesAccept(file: File, accept: string): boolean {\n if (!accept) return true;\n const tokens = accept\n .split(',')\n .map(t => t.trim().toLowerCase())\n .filter(Boolean);\n if (tokens.length === 0) return true;\n const name = file.name.toLowerCase();\n const mime = file.type.toLowerCase();\n return tokens.some(token => {\n if (token.startsWith('.')) return name.endsWith(token);\n if (token.endsWith('/*')) return mime.startsWith(token.slice(0, -1));\n return mime === token;\n });\n}\n\n/**\n * Drag-and-drop file upload zone. Click to browse, drag-and-drop to add,\n * with an optional file list + remove buttons.\n *\n * A signal-forms native control: it implements\n * `FormValueControl<File | readonly File[] | null>`, so `[formField]` binds\n * straight to its `value` model — no `ControlValueAccessor` in between.\n * `[(value)]` works standalone. The value shape follows `multiple`: a single\n * `File` (or `null`), or a `File[]` array.\n *\n * @example\n * ```html\n * <!-- signal forms -->\n * <wr-file-upload [formField]=\"form.files\" [multiple]=\"true\" accept=\"image/*\" />\n *\n * <!-- standalone two-way binding -->\n * <wr-file-upload [(value)]=\"avatar\" accept=\".png,.jpg\" [maxSize]=\"2 * 1024 * 1024\" />\n * ```\n *\n * @see https://ngwr.dev/reference/components/file-upload\n */\n@Component({\n selector: 'wr-file-upload',\n templateUrl: './file-upload.html',\n encapsulation: ViewEncapsulation.None,\n host: { '[class]': 'classes()' },\n imports: [],\n})\nexport class WrFileUpload implements FormValueControl<File | readonly File[] | null> {\n /** Allow multiple files. Single mode replaces on each add. @default false */\n readonly multiple = input(false, { transform: coerceBooleanProperty });\n\n /** `accept` attribute — comma-separated MIME types or extensions. @default '' */\n readonly accept = input<string>('');\n\n /** Max bytes per file. `0` disables the check. @default 0 */\n readonly maxSize = input(0, { transform: (v: unknown): number => Math.max(0, coerceNumberProperty(v, 0)) });\n\n /** Max files (multi mode only). `0` disables the check. @default 0 */\n readonly maxFiles = input(0, { transform: (v: unknown): number => Math.max(0, coerceNumberProperty(v, 0)) });\n\n /** Render the picked-files list below the zone. @default true */\n readonly showList = input(true, { transform: coerceBooleanProperty });\n\n /**\n * Disable interaction. Bound automatically from the field's disabled state\n * when used with `[formField]`.\n *\n * @default false\n */\n readonly disabled = input(false, { transform: coerceBooleanProperty });\n\n /**\n * Refuse changes to the selection while the zone stays focusable and the files\n * still submit. Bound automatically from the field's readonly state when used\n * with `[formField]`.\n *\n * The zone stops opening the picker, a drop is refused and the per-file remove\n * buttons go inert — but the list stays readable, which is the point. No\n * `aria-readonly`: the zone is a `role=\"button\"`, and ARIA does not define the\n * state for that role, so `aria-disabled` would be the only mirror available\n * and it would say the wrong thing.\n *\n * @default false\n */\n readonly readonly = input(false, { transform: coerceBooleanProperty });\n\n /** The surrounding `<wr-form-field>`'s error state. @internal */\n protected readonly fieldAria = useFormFieldAria();\n\n /** Primary call-to-action label. Falls back to `fileUpload.browse`. */\n readonly pickLabel = input<string | null>(null);\n\n /** Secondary instruction below the CTA. Falls back to `fileUpload.dropZone`. */\n readonly dropLabel = input<string | null>(null);\n\n /** Drop-zone host aria-label. Falls back to `fileUpload.dropZoneLabel`. */\n readonly dropZoneLabel = input<string | null>(null);\n\n /** Remove-file button aria-label. Falls back to `fileUpload.removeFile`. */\n readonly removeFileLabel = input<string | null>(null);\n\n protected readonly resolvedPick = useI18nText(this.pickLabel, 'fileUpload.browse', 'Click to browse');\n protected readonly resolvedDrop = useI18nText(this.dropLabel, 'fileUpload.dropZone', 'or drop files here');\n protected readonly resolvedDropZone = useI18nText(\n this.dropZoneLabel,\n 'fileUpload.dropZoneLabel',\n 'File upload drop zone — click or drop files'\n );\n protected readonly resolvedRemove = useI18nText(this.removeFileLabel, 'fileUpload.removeFile', 'Remove file');\n\n /** Optional helper text shown below the labels (e.g. accepted formats). */\n readonly helperText = input<string>('');\n\n /**\n * Selected file(s). Bound by `[formField]`, or two-way via `[(value)]`. Shape\n * follows `multiple`: a single `File` (or `null`), or a `File[]` array.\n */\n readonly value = model<File | readonly File[] | null>(null);\n\n /** Emitted when files are rejected for type / size / count reasons. */\n readonly rejected = output<readonly WrFileUploadRejection[]>();\n\n /** Emitted on commit so a bound field can mark itself touched. */\n readonly touch = output<void>();\n\n protected readonly picker = viewChild.required<ElementRef<HTMLInputElement>>('picker');\n\n protected readonly files = signal<readonly File[]>([]);\n protected readonly dragging = signal(false);\n\n protected readonly classes = computed(() => {\n const parts = ['wr-file-upload'];\n if (this.dragging()) parts.push('wr-file-upload--dragging');\n if (this.disabled()) parts.push('wr-file-upload--disabled');\n else if (this.readonly()) parts.push('wr-file-upload--readonly');\n return parts.join(' ');\n });\n\n /**\n * Human-readable file size (e.g. `1.2 MB`).\n *\n * Every piece of this used to be English and unreachable: a module-level unit\n * table with no catalog key, and `toFixed()`, which writes an ASCII decimal\n * point whatever `LOCALE_ID` says. A Russian page showed translated drop-zone\n * copy above `3.4 KB`. The number now goes through `Intl.NumberFormat` and the\n * unit through the catalog, joined by a template the catalog also owns — so a\n * locale controls the separator, the digits and whether a space sits before\n * the unit.\n *\n * Not a `computed`: it is called per file, with the file's size as its\n * argument. It still re-runs on a locale switch, because the formatters it\n * calls are signals read during the same change detection that renders the row.\n */\n protected formatBytes(bytes: number): string {\n if (!Number.isFinite(bytes) || bytes <= 0) {\n return this.sizeText({ value: this.number(0, 0), unit: this.unitTexts[0]() });\n }\n const i = Math.min(Math.floor(Math.log(bytes) / Math.log(1024)), this.unitTexts.length - 1);\n const v = bytes / 1024 ** i;\n const digits = v >= 100 || i === 0 ? 0 : 1;\n return this.sizeText({ value: this.number(v, digits), unit: this.unitTexts[i]() });\n }\n\n /** `{{value}} {{unit}}` — the join, so a locale owns the space too. */\n private readonly sizeText = useI18nFormatter('fileUpload.size', '{{value}} {{unit}}');\n\n /**\n * One resolved signal per binary unit, indexed by the power of 1024 the\n * arithmetic lands on.\n *\n * Spelled out rather than built from a key list: `i18n.spec.ts` reads every\n * catalog key the library asks for out of the SOURCE, by matching a quoted\n * dotted string inside the call, so a key built by interpolation is invisible\n * to it. That spec fails rather than passing quietly, but either way the key\n * would stop being checked.\n */\n private readonly unitTexts = [\n readI18nText('fileUpload.unitByte', 'B'),\n readI18nText('fileUpload.unitKb', 'KB'),\n readI18nText('fileUpload.unitMb', 'MB'),\n readI18nText('fileUpload.unitGb', 'GB'),\n readI18nText('fileUpload.unitTb', 'TB'),\n ] as const;\n\n private readonly locale = inject(LOCALE_ID);\n\n private number(value: number, digits: number): string {\n return new Intl.NumberFormat(this.locale, {\n minimumFractionDigits: digits,\n maximumFractionDigits: digits,\n }).format(value);\n }\n\n constructor() {\n // Rebuild the internal file list from an external `value` write (mirrors the\n // old `writeValue`). Skipped when the value is merely the echo of an\n // in-component edit, so re-syncing can never clobber a live selection.\n effect(() => {\n const v = this.value();\n untracked(() => {\n // Coerce null/undefined to `[]` — a classic-forms binding can write\n // null, which the old `writeValue(v: … | null)` accepted too.\n const next: readonly File[] = v === null || v === undefined ? [] : Array.isArray(v) ? v : [v as File];\n const current = this.files();\n if (current.length === next.length && current.every((file, i) => file === next[i])) return;\n this.files.set(next);\n });\n });\n }\n\n // Template handlers\n\n protected openPicker(): void {\n if (this.disabled() || this.readonly()) return;\n this.picker().nativeElement.click();\n }\n\n protected onZoneKey(event: KeyboardEvent): void {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n this.openPicker();\n }\n }\n\n protected onPickerChange(event: Event): void {\n const target = event.target as HTMLInputElement;\n if (target.files) this.acceptFiles(Array.from(target.files));\n // Reset so picking the same file twice re-fires `change`.\n target.value = '';\n }\n\n protected onDragEnter(event: DragEvent): void {\n if (this.disabled() || this.readonly()) return;\n event.preventDefault();\n this.dragging.set(true);\n }\n\n protected onDragOver(event: DragEvent): void {\n if (this.disabled() || this.readonly()) return;\n event.preventDefault();\n if (event.dataTransfer) event.dataTransfer.dropEffect = 'copy';\n }\n\n protected onDragLeave(event: DragEvent): void {\n // Only clear when leaving the zone itself, not internal children.\n if (event.currentTarget === event.target) this.dragging.set(false);\n }\n\n protected onDrop(event: DragEvent): void {\n event.preventDefault();\n this.dragging.set(false);\n if (this.disabled() || this.readonly()) return;\n const dropped = event.dataTransfer?.files ? Array.from(event.dataTransfer.files) : [];\n if (dropped.length > 0) this.acceptFiles(dropped);\n }\n\n protected removeAt(index: number): void {\n if (this.disabled() || this.readonly()) return;\n const next = this.files().filter((_, i) => i !== index);\n this.files.set(next);\n this.emit();\n }\n\n // Internals\n\n private acceptFiles(incoming: readonly File[]): void {\n if (this.disabled() || this.readonly()) return;\n const accept = this.accept();\n const maxSize = this.maxSize();\n const rejections: WrFileUploadRejection[] = [];\n const accepted: File[] = [];\n\n for (const file of incoming) {\n const reason = this.reject(file, accept, maxSize);\n if (reason) rejections.push({ file, reason });\n else accepted.push(file);\n }\n\n let next: File[];\n if (this.multiple()) {\n next = [...this.files(), ...accepted];\n const maxFiles = this.maxFiles();\n if (maxFiles > 0 && next.length > maxFiles) {\n const overflow = next.splice(maxFiles);\n for (const file of overflow) rejections.push({ file, reason: 'count' });\n }\n } else {\n // Single mode — last accepted wins, prior selection cleared.\n next = accepted.length > 0 ? [accepted[accepted.length - 1]] : [...this.files()];\n }\n\n this.files.set(next);\n this.touch.emit();\n this.emit();\n if (rejections.length > 0) this.rejected.emit(rejections);\n }\n\n private reject(file: File, accept: string, maxSize: number): WrFileUploadRejectionReason | null {\n if (accept && !matchesAccept(file, accept)) return 'type';\n if (maxSize > 0 && file.size > maxSize) return 'size';\n return null;\n }\n\n private emit(): void {\n const list = this.files();\n if (this.multiple()) {\n this.value.set(list);\n } else {\n this.value.set(list.length > 0 ? list[0] : null);\n }\n }\n}\n","<div\n class=\"wr-file-upload__zone\"\n role=\"button\"\n tabindex=\"0\"\n [attr.aria-label]=\"resolvedDropZone()\"\n [attr.aria-disabled]=\"disabled() || null\"\n [attr.aria-invalid]=\"fieldAria.ariaInvalid()\"\n [attr.aria-describedby]=\"fieldAria.describedBy()\"\n (click)=\"openPicker()\"\n (keydown)=\"onZoneKey($event)\"\n (dragenter)=\"onDragEnter($event)\"\n (dragover)=\"onDragOver($event)\"\n (dragleave)=\"onDragLeave($event)\"\n (drop)=\"onDrop($event)\"\n>\n <svg class=\"wr-file-upload__icon\" width=\"32\" height=\"32\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <path\n d=\"M12 16V4M12 4l-4 4M12 4l4 4M4 16v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n <div class=\"wr-file-upload__hint\">\n <strong>{{ resolvedPick() }}</strong>\n <span>{{ resolvedDrop() }}</span>\n @if (helperText()) {\n <small>{{ helperText() }}</small>\n }\n </div>\n</div>\n\n<!--\n The real <input type=\"file\"> is never operated directly — the zone above is\n the control and forwards clicks here, so the input is visually hidden and kept\n OUTSIDE the zone: inside, it nested one interactive element within another\n (the zone is role=\"button\") and put two tab stops where users see one. It is\n positioned absolutely and clipped, so being a sibling changes nothing visually.\n aria-hidden must be paired with tabindex=\"-1\", or hiding a focusable element is\n itself a violation.\n-->\n<input\n #picker\n class=\"wr-file-upload__picker\"\n type=\"file\"\n aria-hidden=\"true\"\n tabindex=\"-1\"\n [attr.accept]=\"accept() || null\"\n [attr.multiple]=\"multiple() ? '' : null\"\n [disabled]=\"disabled() || readonly()\"\n (change)=\"onPickerChange($event)\"\n/>\n\n@if (showList() && files().length > 0) {\n <ul class=\"wr-file-upload__list\">\n @for (file of files(); track $index) {\n <li class=\"wr-file-upload__item\">\n <span class=\"wr-file-upload__name\" [title]=\"file.name\">{{ file.name }}</span>\n <span class=\"wr-file-upload__size\">{{ formatBytes(file.size) }}</span>\n <button\n type=\"button\"\n class=\"wr-file-upload__remove\"\n [attr.aria-label]=\"resolvedRemove()\"\n [disabled]=\"disabled() || readonly()\"\n (click)=\"removeAt($index)\"\n >\n <svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" aria-hidden=\"true\">\n <path\n d=\"M2 2 L10 10 M10 2 L2 10\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n />\n </svg>\n </button>\n </li>\n }\n </ul>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAAA;;;;;AAKG;AAyBH;AACA,SAAS,aAAa,CAAC,IAAU,EAAE,MAAc,EAAA;AAC/C,IAAA,IAAI,CAAC,MAAM;AAAE,QAAA,OAAO,IAAI;IACxB,MAAM,MAAM,GAAG;SACZ,KAAK,CAAC,GAAG;AACT,SAAA,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE;SAC/B,MAAM,CAAC,OAAO,CAAC;AAClB,IAAA,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;AAAE,QAAA,OAAO,IAAI;IACpC,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE;IACpC,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE;AACpC,IAAA,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,IAAG;AACzB,QAAA,IAAI,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC;AAAE,YAAA,OAAO,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC;AACtD,QAAA,IAAI,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC;AAAE,YAAA,OAAO,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;QACpE,OAAO,IAAI,K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