ngwr 14.1.0 → 14.3.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 +23 -22
- package/command-palette/styles/_index.scss +17 -0
- package/fesm2022/ngwr-breadcrumbs.mjs +2 -2
- package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
- package/fesm2022/ngwr-calendar.mjs +4 -2
- package/fesm2022/ngwr-calendar.mjs.map +1 -1
- package/fesm2022/ngwr-cascader.mjs +2 -2
- package/fesm2022/ngwr-cascader.mjs.map +1 -1
- package/fesm2022/ngwr-command-palette.mjs +2 -2
- package/fesm2022/ngwr-command-palette.mjs.map +1 -1
- package/fesm2022/ngwr-drag-drop.mjs +2 -2
- package/fesm2022/ngwr-drag-drop.mjs.map +1 -1
- package/fesm2022/ngwr-event-calendar.mjs +17 -5
- package/fesm2022/ngwr-event-calendar.mjs.map +1 -1
- package/fesm2022/ngwr-form.mjs +30 -1
- package/fesm2022/ngwr-form.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ar.mjs +429 -0
- package/fesm2022/ngwr-i18n-ar.mjs.map +1 -0
- package/fesm2022/ngwr-i18n-cs.mjs +399 -0
- package/fesm2022/ngwr-i18n-cs.mjs.map +1 -0
- package/fesm2022/ngwr-i18n-de.mjs +418 -0
- package/fesm2022/ngwr-i18n-de.mjs.map +1 -0
- package/fesm2022/ngwr-i18n-en.mjs +23 -0
- package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-es.mjs +399 -0
- package/fesm2022/ngwr-i18n-es.mjs.map +1 -0
- package/fesm2022/ngwr-i18n-fr.mjs +423 -0
- package/fesm2022/ngwr-i18n-fr.mjs.map +1 -0
- package/fesm2022/ngwr-i18n-he.mjs +422 -0
- package/fesm2022/ngwr-i18n-he.mjs.map +1 -0
- package/fesm2022/ngwr-i18n-hi.mjs +399 -0
- package/fesm2022/ngwr-i18n-hi.mjs.map +1 -0
- package/fesm2022/ngwr-i18n-id.mjs +399 -0
- package/fesm2022/ngwr-i18n-id.mjs.map +1 -0
- package/fesm2022/ngwr-i18n-it.mjs +418 -0
- package/fesm2022/ngwr-i18n-it.mjs.map +1 -0
- package/fesm2022/ngwr-i18n-ja.mjs +403 -0
- package/fesm2022/ngwr-i18n-ja.mjs.map +1 -0
- package/fesm2022/ngwr-i18n-ko.mjs +411 -0
- package/fesm2022/ngwr-i18n-ko.mjs.map +1 -0
- package/fesm2022/ngwr-i18n-nl.mjs +415 -0
- package/fesm2022/ngwr-i18n-nl.mjs.map +1 -0
- package/fesm2022/ngwr-i18n-pl.mjs +425 -0
- package/fesm2022/ngwr-i18n-pl.mjs.map +1 -0
- package/fesm2022/ngwr-i18n-pt.mjs +408 -0
- package/fesm2022/ngwr-i18n-pt.mjs.map +1 -0
- package/fesm2022/ngwr-i18n-ru.mjs +11 -0
- package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-sv.mjs +399 -0
- package/fesm2022/ngwr-i18n-sv.mjs.map +1 -0
- package/fesm2022/ngwr-i18n-tr.mjs +423 -0
- package/fesm2022/ngwr-i18n-tr.mjs.map +1 -0
- package/fesm2022/ngwr-i18n-uk.mjs +420 -0
- package/fesm2022/ngwr-i18n-uk.mjs.map +1 -0
- package/fesm2022/ngwr-i18n-vi.mjs +416 -0
- package/fesm2022/ngwr-i18n-vi.mjs.map +1 -0
- package/fesm2022/ngwr-i18n-zh-TW.mjs +407 -0
- package/fesm2022/ngwr-i18n-zh-TW.mjs.map +1 -0
- package/fesm2022/ngwr-i18n-zh.mjs +398 -0
- package/fesm2022/ngwr-i18n-zh.mjs.map +1 -0
- package/fesm2022/ngwr-lightbox.mjs +2 -2
- package/fesm2022/ngwr-lightbox.mjs.map +1 -1
- package/fesm2022/ngwr-line-chart.mjs +24 -4
- package/fesm2022/ngwr-line-chart.mjs.map +1 -1
- package/fesm2022/ngwr-list.mjs +2 -2
- package/fesm2022/ngwr-list.mjs.map +1 -1
- package/fesm2022/ngwr-pipes.mjs +75 -10
- package/fesm2022/ngwr-pipes.mjs.map +1 -1
- package/fesm2022/ngwr-schema-form.mjs +185 -0
- package/fesm2022/ngwr-schema-form.mjs.map +1 -0
- package/fesm2022/ngwr-select.mjs +2 -2
- package/fesm2022/ngwr-select.mjs.map +1 -1
- package/fesm2022/ngwr-validators.mjs +8 -1
- package/fesm2022/ngwr-validators.mjs.map +1 -1
- package/fesm2022/ngwr-version.mjs +1 -1
- package/fesm2022/ngwr-version.mjs.map +1 -1
- package/i18n/ar.json +389 -0
- package/i18n/cs.json +389 -0
- package/i18n/de.json +389 -0
- package/i18n/en.json +10 -2
- package/i18n/es.json +389 -0
- package/i18n/fr.json +389 -0
- package/i18n/he.json +389 -0
- package/i18n/hi.json +389 -0
- package/i18n/id.json +389 -0
- package/i18n/it.json +389 -0
- package/i18n/ja.json +389 -0
- package/i18n/ko.json +389 -0
- package/i18n/nl.json +389 -0
- package/i18n/pl.json +389 -0
- package/i18n/pt.json +389 -0
- package/i18n/ru.json +10 -2
- package/i18n/sv.json +389 -0
- package/i18n/tr.json +389 -0
- package/i18n/uk.json +389 -0
- package/i18n/vi.json +389 -0
- package/i18n/zh-TW.json +389 -0
- package/i18n/zh.json +389 -0
- package/llms-full.txt +87 -1
- package/llms.txt +1 -1
- package/package.json +89 -7
- package/schema-form/styles/_index.scss +15 -0
- package/schematics/migrations/v9/index.js +11 -3
- package/schematics/use/symbol-map.json +1 -0
- package/skills/ngwr/SKILL.md +1 -1
- package/skills/ngwr/references/catalog.md +21 -0
- package/styles.scss +1 -0
- package/theme/styles/_focus.scss +23 -2
- package/types/ngwr-calendar.d.ts +2 -0
- package/types/ngwr-command-palette.d.ts +1 -1
- package/types/ngwr-event-calendar.d.ts +5 -0
- package/types/ngwr-form.d.ts +88 -2
- package/types/ngwr-i18n-ar.d.ts +6 -0
- package/types/ngwr-i18n-cs.d.ts +6 -0
- package/types/ngwr-i18n-de.d.ts +6 -0
- package/types/ngwr-i18n-es.d.ts +6 -0
- package/types/ngwr-i18n-fr.d.ts +6 -0
- package/types/ngwr-i18n-he.d.ts +6 -0
- package/types/ngwr-i18n-hi.d.ts +6 -0
- package/types/ngwr-i18n-id.d.ts +6 -0
- package/types/ngwr-i18n-it.d.ts +6 -0
- package/types/ngwr-i18n-ja.d.ts +6 -0
- package/types/ngwr-i18n-ko.d.ts +6 -0
- package/types/ngwr-i18n-nl.d.ts +6 -0
- package/types/ngwr-i18n-pl.d.ts +6 -0
- package/types/ngwr-i18n-pt.d.ts +6 -0
- package/types/ngwr-i18n-sv.d.ts +6 -0
- package/types/ngwr-i18n-tr.d.ts +6 -0
- package/types/ngwr-i18n-uk.d.ts +6 -0
- package/types/ngwr-i18n-vi.d.ts +6 -0
- package/types/ngwr-i18n-zh-TW.d.ts +6 -0
- package/types/ngwr-i18n-zh.d.ts +6 -0
- package/types/ngwr-line-chart.d.ts +15 -0
- package/types/ngwr-pipes.d.ts +45 -4
- package/types/ngwr-schema-form.d.ts +90 -0
- package/types/ngwr-version.d.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngwr-drag-drop.mjs","sources":["../../../projects/lib/drag-drop/sortable-list.ts","../../../projects/lib/drag-drop/sortable-list.html","../../../projects/lib/drag-drop/drag-handle.ts","../../../projects/lib/drag-drop/ngwr-drag-drop.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 { Directionality } from '@angular/cdk/bidi';\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { CdkDrag, type CdkDragDrop, CdkDropList, moveItemInArray } from '@angular/cdk/drag-drop';\nimport { NgTemplateOutlet } from '@angular/common';\nimport type { ElementRef } from '@angular/core';\nimport {\n Component,\n Injector,\n TemplateRef,\n ViewEncapsulation,\n afterNextRender,\n contentChild,\n inject,\n input,\n model,\n output,\n signal,\n viewChildren,\n} from '@angular/core';\n\nimport { readI18nText, useI18nFormatter } from 'ngwr/i18n';\n\nimport type { WrSortableReorderEvent } from './interfaces';\n\n/** Counted, not random: the list prerenders, so the id has to match on rehydration. */\nlet sortableListUid = 0;\n\n/**\n * Drag-to-reorder list. Wraps CDK's `cdkDropList` + `cdkDrag` with a\n * signal-based items binding — the source array is updated in place and\n * emitted via 2-way `[(items)]`.\n *\n * Drop a single template — it's rendered per item with `let-item\n * let-index=\"index\"`. Put `wrDragHandle` on an element inside that\n * template to restrict drag start to a handle; there is no input for\n * it, the directive's presence is the switch.\n *\n * Every row is a tab stop: Space or Enter picks it up, the arrow keys move it,\n * Space or Enter drops it and Escape puts it back. CDK's `cdkDrag` ships no key\n * handling of its own, so without this the component's only function was\n * unreachable from a keyboard.\n *\n * Reading direction: a `horizontal` list follows the VISUAL order, so under\n * `dir=\"rtl\"` ArrowLeft moves the held row toward the higher index — the same\n * rule `wr-slider` applies to its track. A vertical list never mirrors.\n *\n * What that does NOT answer is WCAG 2.5.7, which asks for a POINTER alternative\n * to the drag. Click-to-pick-up is the obvious candidate and is not safe here:\n * the CDK's drag-drop bundle installs no click suppressor of any kind, so the\n * mouseup ending a drag still produces a click, and a row that grabbed itself on\n * click would be picking itself straight back up. A visible move-up /\n * move-down affordance is the remaining answer, and that is a design change.\n *\n * @example\n * ```html\n * <wr-sortable-list [(items)]=\"rows\" (reorder)=\"onReorder($event)\">\n * <ng-template let-row let-i=\"index\">\n * <div class=\"row\">\n * <span wrDragHandle>≡</span>\n * {{ i + 1 }}. {{ row.label }}\n * </div>\n * </ng-template>\n * </wr-sortable-list>\n * ```\n *\n * @see https://ngwr.dev/reference/components/drag-drop\n */\n@Component({\n selector: 'wr-sortable-list',\n templateUrl: './sortable-list.html',\n styleUrl: './sortable-list.scss',\n encapsulation: ViewEncapsulation.None,\n imports: [CdkDropList, CdkDrag, NgTemplateOutlet],\n host: { class: 'wr-sortable-list' },\n})\nexport class WrSortableList<T = unknown> {\n /** Items to render. Two-way — emits the reordered array on drop. */\n readonly items = model.required<T[]>();\n\n /** Layout direction. Drives CDK's `cdkDropListOrientation`. @default 'vertical' */\n readonly orientation = input<'vertical' | 'horizontal'>('vertical');\n\n /** Disable all dragging. @default false */\n readonly disabled = input(false, { transform: coerceBooleanProperty });\n\n /** Locked axis — restrict drag movement to one axis even diagonally. */\n readonly lockAxis = input<'x' | 'y' | undefined>(undefined);\n\n /**\n * Delay (ms) before a drag begins after the pointer goes down. The touch\n * delay is the fix for the classic CDK touch snag: without it, the\n * `touch-action: none` CDK puts on each item blocks scrolling the list on a\n * phone. With a small touch delay, a quick swipe scrolls and a brief hold\n * starts the drag; mouse stays instant. Pass a single number to apply one\n * delay to both pointers. @default { touch: 150, mouse: 0 }\n */\n readonly dragStartDelay = input<number | { touch: number; mouse: number }>({ touch: 150, mouse: 0 });\n\n /** `trackBy` for the inner `@for`. Defaults to identity. */\n readonly trackBy = input<(index: number, item: T) => unknown>((_, item) => item);\n\n /** Fired after a successful reorder with the new array + indices. */\n readonly reorder = output<WrSortableReorderEvent<T>>();\n\n protected readonly rowTemplate = contentChild.required(TemplateRef<{ $implicit: T; index: number }>);\n\n private readonly injector = inject(Injector);\n\n /**\n * Ambient reading direction, for the horizontal keyboard path only.\n *\n * Optional so a bare `TestBed` — or any consumer that never set a direction —\n * needs no provider; `Directionality` is root-provided, so `null` only ever\n * means \"nobody asked\", which is LTR. Nothing caches a direction-derived\n * value: `isRtl()` is read inside the key handler, so a runtime flip needs no\n * subscription to `Directionality.change`.\n *\n * The POINTER path already mirrors without this — `cdkDropList` injects\n * `Directionality` itself and feeds it to `DropListRef.withDirection`, so a\n * horizontal drag has always followed the visual order. The keyboard path was\n * the half that did not, which is why the two disagreed.\n */\n private readonly dir = inject(Directionality, { optional: true });\n\n private readonly rowEls = viewChildren<ElementRef<HTMLElement>>('row');\n\n /** Index of the row the keyboard is holding, or `null` when nothing is held. */\n protected readonly grabbedIndex = signal<number | null>(null);\n\n /** Live-region text. Written by the keyboard path only. */\n protected readonly announcement = signal('');\n\n /** Links every row to the key model via `aria-describedby`. */\n protected readonly keyHelpId = `wr-sortable-list-help-${++sortableListUid}`;\n\n protected readonly resolvedKeyHelp = readI18nText(\n 'sortableList.keyHelp',\n 'Press Space to pick this item up, then use the arrow keys to move it. ' +\n 'Press Space again to drop it, or Escape to put it back.'\n );\n\n private readonly grabbedText = useI18nFormatter('sortableList.grabbed', 'Grabbed. {{index}} of {{total}}.');\n private readonly movedText = useI18nFormatter('sortableList.moved', '{{index}} of {{total}}.');\n private readonly droppedText = useI18nFormatter('sortableList.dropped', 'Dropped. {{index}} of {{total}}.');\n private readonly cancelledText = readI18nText('sortableList.cancelled', 'Move cancelled.');\n\n /** Where the held row started. Escape puts it back there. */\n private grabOrigin = -1;\n\n /** True while a keyboard move is handing focus back — see `onRowFocusout`. */\n private restoringFocus = false;\n\n protected onDrop(event: CdkDragDrop<T[]>): void {\n if (event.previousIndex === event.currentIndex) return;\n const next = this.items().slice();\n moveItemInArray(next, event.previousIndex, event.currentIndex);\n this.items.set(next);\n this.reorder.emit({\n items: next,\n previousIndex: event.previousIndex,\n currentIndex: event.currentIndex,\n item: next[event.currentIndex],\n });\n }\n\n /**\n * The keyboard reorder path: pick up, move, drop — deliberately a two-step\n * grab rather than \"an arrow moves the focused row\", so that arrowing through\n * a list a user is only reading can never rearrange it.\n *\n * Keys are handled only when the ROW itself is the event target; a button or\n * an input projected into the row template keeps every key it would normally\n * get.\n */\n protected onRowKeydown(event: KeyboardEvent, index: number): void {\n if (this.disabled() || event.target !== event.currentTarget) return;\n\n const grabbed = this.grabbedIndex();\n const horizontal = this.orientation() === 'horizontal';\n // The horizontal arrows name a SIDE of the row, so they follow the reading\n // direction: a horizontal list under `dir=\"rtl\"` paints index 0 at the right,\n // so the key that raises the index is ArrowLeft. Raising it on ArrowRight\n // regardless moved the held item away from the arrow the user pressed — the\n // one failure in this set a user cannot rationalise, because it inverts their\n // model of the list silently. The block arrows name a value's direction in a\n // column and never mirror, which is why only the horizontal pair is swapped.\n const rtl = horizontal && this.dir?.value === 'rtl';\n const forward = horizontal ? (rtl ? 'ArrowLeft' : 'ArrowRight') : 'ArrowDown';\n const back = horizontal ? (rtl ? 'ArrowRight' : 'ArrowLeft') : 'ArrowUp';\n\n if (event.key === ' ' || event.key === 'Enter') {\n event.preventDefault();\n if (grabbed === null) this.grab(index);\n else this.drop();\n return;\n }\n\n if (grabbed === null) return;\n\n if (event.key === 'Escape') {\n event.preventDefault();\n // Held only while a row is grabbed — an Escape typed anywhere else has to\n // keep reaching whatever dialog or overlay the list is sitting in.\n event.stopPropagation();\n this.cancelGrab();\n return;\n }\n\n if (event.key === forward || event.key === back) {\n event.preventDefault();\n this.moveGrabbed(event.key === forward ? 1 : -1);\n }\n }\n\n /**\n * Focus leaving a held row ends the gesture as a drop rather than dropping the\n * change on the floor — `[(items)]` has already been written by then, so a\n * silent release would leave `reorder` never reporting a move that happened.\n * The guard is what makes it safe: moving a focused node in the DOM blurs it,\n * so every keyboard move fires this too.\n */\n protected onRowFocusout(): void {\n if (this.restoringFocus || this.grabbedIndex() === null) return;\n this.drop();\n }\n\n private grab(index: number): void {\n this.grabOrigin = index;\n this.grabbedIndex.set(index);\n this.announcement.set(this.grabbedText(this.position(index)));\n }\n\n private moveGrabbed(delta: number): void {\n const from = this.grabbedIndex();\n if (from === null) return;\n const to = from + delta;\n if (to < 0 || to >= this.items().length) return;\n\n this.relocate(from, to);\n this.grabbedIndex.set(to);\n this.announcement.set(this.movedText(this.position(to)));\n }\n\n private drop(): void {\n const to = this.grabbedIndex();\n const from = this.grabOrigin;\n this.grabbedIndex.set(null);\n this.grabOrigin = -1;\n if (to === null) return;\n\n this.announcement.set(this.droppedText(this.position(to)));\n if (from === to) return;\n // One event per gesture, the way a drag emits one on drop — not one per\n // arrow press, which would put a host that persists on `reorder` through a\n // write per keystroke. `[(items)]` still updates on every press, because\n // the rendered order has to follow the row the user is moving.\n this.reorder.emit({ items: this.items(), previousIndex: from, currentIndex: to, item: this.items()[to] });\n }\n\n private cancelGrab(): void {\n const from = this.grabbedIndex();\n if (from === null) return;\n if (from !== this.grabOrigin) this.relocate(from, this.grabOrigin);\n this.grabbedIndex.set(null);\n this.grabOrigin = -1;\n this.announcement.set(this.cancelledText());\n }\n\n private relocate(from: number, to: number): void {\n const next = this.items().slice();\n moveItemInArray(next, from, to);\n this.items.set(next);\n\n // The row is the same DOM node moved to another slot, and moving a focused\n // node hands focus back to `<body>` — so it has to be taken again once the\n // move has rendered. `afterNextRender`, never a microtask: zoneless change\n // detection runs in a macrotask, so a microtask would fire while the row is\n // still at its old index and focus the wrong one. (jsdom keeps focus across\n // a node move, so no spec here can express that half.)\n this.restoringFocus = true;\n afterNextRender(\n () => {\n this.rowEls()[to]?.nativeElement.focus();\n this.restoringFocus = false;\n },\n { injector: this.injector }\n );\n }\n\n private position(index: number): { index: number; total: number } {\n return { index: index + 1, total: this.items().length };\n }\n}\n\nexport type { WrSortableReorderEvent } from './interfaces';\n","<!--\n `role=\"list\"` / `role=\"listitem\"` rather than the bare divs this used to be:\n every row is a tab stop now, and a focusable element with no role at all is\n announced as loose text. The list role is also what gives the reader the\n position of the row focus lands on.\n-->\n<div\n cdkDropList\n role=\"list\"\n class=\"wr-sortable-list__list\"\n [cdkDropListOrientation]=\"orientation()\"\n [cdkDropListDisabled]=\"disabled()\"\n (cdkDropListDropped)=\"onDrop($event)\"\n>\n @for (item of items(); track trackBy()($index, item)) {\n <div\n #row\n cdkDrag\n role=\"listitem\"\n class=\"wr-sortable-list__item\"\n [class.wr-sortable-list__item--grabbed]=\"grabbedIndex() === $index\"\n [attr.tabindex]=\"disabled() ? null : 0\"\n [attr.aria-describedby]=\"disabled() ? null : keyHelpId\"\n [cdkDragDisabled]=\"disabled()\"\n [cdkDragLockAxis]=\"lockAxis() ?? null\"\n [cdkDragStartDelay]=\"dragStartDelay()\"\n (keydown)=\"onRowKeydown($event, $index)\"\n (focusout)=\"onRowFocusout()\"\n >\n <ng-container *ngTemplateOutlet=\"rowTemplate(); context: { $implicit: item, index: $index }\" />\n </div>\n }\n</div>\n\n<!--\n The key model, on every row rather than once on the container: focus lands on\n a row and never on the list itself, so a description hung on the list would\n never be read out.\n-->\n<p class=\"wr-sortable-list__sr-only\" [id]=\"keyHelpId\">{{ resolvedKeyHelp() }}</p>\n\n<!--\n Position announcements, written by the keyboard path only — a drag already\n gives sighted feedback, and announcing every pointer move would flood the\n region.\n-->\n<p class=\"wr-sortable-list__sr-only\" role=\"status\">{{ announcement() }}</p>\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 { CdkDragHandle } from '@angular/cdk/drag-drop';\nimport { Directive } from '@angular/core';\n\n/**\n * Drag handle for {@link WrSortableList} (and any nested `cdkDrag`).\n * Composes CDK's `cdkDragHandle` via `hostDirectives` so consumers don't\n * need to import the CDK selector directly.\n *\n * @example\n * ```html\n * <wr-sortable-list [(items)]=\"rows\">\n * <ng-template let-row>\n * <div class=\"row\">\n * <span wrDragHandle class=\"grip\">≡</span>\n * <span>{{ row.label }}</span>\n * </div>\n * </ng-template>\n * </wr-sortable-list>\n * ```\n */\n@Directive({\n selector: '[wrDragHandle]',\n hostDirectives: [CdkDragHandle],\n host: { class: 'wr-drag-handle' },\n})\nexport class WrDragHandle {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;AAKG;AA0BH;AACA,IAAI,eAAe,GAAG,CAAC;AAEvB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuCG;MASU,cAAc,CAAA;;IAEhB,KAAK,GAAG,KAAK,CAAC,QAAQ;8EAAO;;IAG7B,WAAW,GAAG,KAAK,CAA4B,UAAU;oFAAC;;IAG1D,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,qBAAqB,EAAA,CAAG;;IA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EAAA,CAAA,UAAA,CAAA,MAAA,WAA4C,oEAoBnC,KAAK,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEnIvE;;;;;AAKG;AAKH;;;;;;;;;;;;;;;;AAgBG;MAMU,YAAY,CAAA;uGAAZ,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAZ,YAAY,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,gBAAA,EAAA,IAAA,EAAA,EAAA,cAAA,EAAA,gBAAA,EAAA,EAAA,cAAA,EAAA,CAAA,EAAA,SAAA,EAAA,EAAA,CAAA,aAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAZ,YAAY,EAAA,UAAA,EAAA,CAAA;kBALxB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,gBAAgB;oBAC1B,cAAc,EAAE,CAAC,aAAa,CAAC;AAC/B,oBAAA,IAAI,EAAE,EAAE,KAAK,EAAE,gBAAgB,EAAE;AAClC,iBAAA;;;AC/BD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ngwr-drag-drop.mjs","sources":["../../../projects/lib/drag-drop/sortable-list.ts","../../../projects/lib/drag-drop/sortable-list.html","../../../projects/lib/drag-drop/drag-handle.ts","../../../projects/lib/drag-drop/ngwr-drag-drop.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 { Directionality } from '@angular/cdk/bidi';\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { CdkDrag, type CdkDragDrop, CdkDropList, moveItemInArray } from '@angular/cdk/drag-drop';\nimport { NgTemplateOutlet } from '@angular/common';\nimport type { ElementRef } from '@angular/core';\nimport {\n Component,\n Injector,\n TemplateRef,\n ViewEncapsulation,\n afterNextRender,\n contentChild,\n inject,\n input,\n model,\n output,\n signal,\n viewChildren,\n} from '@angular/core';\n\nimport { readI18nText, useI18nFormatter } from 'ngwr/i18n';\n\nimport type { WrSortableReorderEvent } from './interfaces';\n\n/** Counted, not random: the list prerenders, so the id has to match on rehydration. */\nlet sortableListUid = 0;\n\n/**\n * Drag-to-reorder list. Wraps CDK's `cdkDropList` + `cdkDrag` with a\n * signal-based items binding — the source array is updated in place and\n * emitted via 2-way `[(items)]`.\n *\n * Drop a single template — it's rendered per item with `let-item\n * let-index=\"index\"`. Put `wrDragHandle` on an element inside that\n * template to restrict drag start to a handle; there is no input for\n * it, the directive's presence is the switch.\n *\n * Every row is a tab stop: Space or Enter picks it up, the arrow keys move it,\n * Space or Enter drops it and Escape puts it back. CDK's `cdkDrag` ships no key\n * handling of its own, so without this the component's only function was\n * unreachable from a keyboard.\n *\n * Reading direction: a `horizontal` list follows the VISUAL order, so under\n * `dir=\"rtl\"` ArrowLeft moves the held row toward the higher index — the same\n * rule `wr-slider` applies to its track. A vertical list never mirrors.\n *\n * What that does NOT answer is WCAG 2.5.7, which asks for a POINTER alternative\n * to the drag. Click-to-pick-up is the obvious candidate and is not safe here:\n * the CDK's drag-drop bundle installs no click suppressor of any kind, so the\n * mouseup ending a drag still produces a click, and a row that grabbed itself on\n * click would be picking itself straight back up. A visible move-up /\n * move-down affordance is the remaining answer, and that is a design change.\n *\n * @example\n * ```html\n * <wr-sortable-list [(items)]=\"rows\" (reorder)=\"onReorder($event)\">\n * <ng-template let-row let-i=\"index\">\n * <div class=\"row\">\n * <span wrDragHandle>≡</span>\n * {{ i + 1 }}. {{ row.label }}\n * </div>\n * </ng-template>\n * </wr-sortable-list>\n * ```\n *\n * @see https://ngwr.dev/reference/components/drag-drop\n */\n@Component({\n selector: 'wr-sortable-list',\n templateUrl: './sortable-list.html',\n styleUrl: './sortable-list.scss',\n encapsulation: ViewEncapsulation.None,\n imports: [CdkDropList, CdkDrag, NgTemplateOutlet],\n host: { class: 'wr-sortable-list' },\n})\nexport class WrSortableList<T = unknown> {\n /** Items to render. Two-way — emits the reordered array on drop. */\n readonly items = model.required<T[]>();\n\n /** Layout direction. Drives CDK's `cdkDropListOrientation`. @default 'vertical' */\n readonly orientation = input<'vertical' | 'horizontal'>('vertical');\n\n /** Disable all dragging. @default false */\n readonly disabled = input(false, { transform: coerceBooleanProperty });\n\n /** Locked axis — restrict drag movement to one axis even diagonally. */\n readonly lockAxis = input<'x' | 'y' | undefined>(undefined);\n\n /**\n * Delay (ms) before a drag begins after the pointer goes down. The touch\n * delay is the fix for the classic CDK touch snag: without it, the\n * `touch-action: none` CDK puts on each item blocks scrolling the list on a\n * phone. With a small touch delay, a quick swipe scrolls and a brief hold\n * starts the drag; mouse stays instant. Pass a single number to apply one\n * delay to both pointers. @default { touch: 150, mouse: 0 }\n */\n readonly dragStartDelay = input<number | { touch: number; mouse: number }>({ touch: 150, mouse: 0 });\n\n /** `trackBy` for the inner `@for`. Defaults to identity. */\n readonly trackBy = input<(index: number, item: T) => unknown>((_, item) => item);\n\n /** Fired after a successful reorder with the new array + indices. */\n readonly reorder = output<WrSortableReorderEvent<T>>();\n\n protected readonly rowTemplate = contentChild.required(TemplateRef<{ $implicit: T; index: number }>);\n\n private readonly injector = inject(Injector);\n\n /**\n * Ambient reading direction, for the horizontal keyboard path only.\n *\n * Optional so a bare `TestBed` — or any consumer that never set a direction —\n * needs no provider; `Directionality` is root-provided, so `null` only ever\n * means \"nobody asked\", which is LTR. Nothing caches a direction-derived\n * value: `isRtl()` is read inside the key handler, so a runtime flip needs no\n * subscription to `Directionality.change`.\n *\n * The POINTER path already mirrors without this — `cdkDropList` injects\n * `Directionality` itself and feeds it to `DropListRef.withDirection`, so a\n * horizontal drag has always followed the visual order. The keyboard path was\n * the half that did not, which is why the two disagreed.\n */\n private readonly dir = inject(Directionality, { optional: true });\n\n private readonly rowEls = viewChildren<ElementRef<HTMLElement>>('row');\n\n /** Index of the row the keyboard is holding, or `null` when nothing is held. */\n protected readonly grabbedIndex = signal<number | null>(null);\n\n /** Live-region text. Written by the keyboard path only. */\n protected readonly announcement = signal('');\n\n /** Links every row to the key model via `aria-describedby`. */\n protected readonly keyHelpId = `wr-sortable-list-help-${++sortableListUid}`;\n\n protected readonly resolvedKeyHelp = readI18nText(\n 'sortableList.keyHelp',\n 'Press Space to pick this item up, then use the arrow keys to move it. ' +\n 'Press Space again to drop it, or Escape to put it back.'\n );\n\n private readonly grabbedText = useI18nFormatter('sortableList.grabbed', 'Grabbed. {{index}} of {{total}}.');\n private readonly movedText = useI18nFormatter('sortableList.moved', '{{index}} of {{total}}.');\n private readonly droppedText = useI18nFormatter('sortableList.dropped', 'Dropped. {{index}} of {{total}}.');\n private readonly cancelledText = readI18nText('sortableList.cancelled', 'Move cancelled.');\n\n /** Where the held row started. Escape puts it back there. */\n private grabOrigin = -1;\n\n /** True while a keyboard move is handing focus back — see `onRowFocusout`. */\n private restoringFocus = false;\n\n protected onDrop(event: CdkDragDrop<T[]>): void {\n if (event.previousIndex === event.currentIndex) return;\n const next = this.items().slice();\n moveItemInArray(next, event.previousIndex, event.currentIndex);\n this.items.set(next);\n this.reorder.emit({\n items: next,\n previousIndex: event.previousIndex,\n currentIndex: event.currentIndex,\n item: next[event.currentIndex],\n });\n }\n\n /**\n * The keyboard reorder path: pick up, move, drop — deliberately a two-step\n * grab rather than \"an arrow moves the focused row\", so that arrowing through\n * a list a user is only reading can never rearrange it.\n *\n * Keys are handled only when the ROW itself is the event target; a button or\n * an input projected into the row template keeps every key it would normally\n * get.\n */\n protected onRowKeydown(event: KeyboardEvent, index: number): void {\n if (this.disabled() || event.target !== event.currentTarget) return;\n\n const grabbed = this.grabbedIndex();\n const horizontal = this.orientation() === 'horizontal';\n // The horizontal arrows name a SIDE of the row, so they follow the reading\n // direction: a horizontal list under `dir=\"rtl\"` paints index 0 at the right,\n // so the key that raises the index is ArrowLeft. Raising it on ArrowRight\n // regardless moved the held item away from the arrow the user pressed — the\n // one failure in this set a user cannot rationalise, because it inverts their\n // model of the list silently. The block arrows name a value's direction in a\n // column and never mirror, which is why only the horizontal pair is swapped.\n const rtl = horizontal && this.dir?.value === 'rtl';\n const forward = horizontal ? (rtl ? 'ArrowLeft' : 'ArrowRight') : 'ArrowDown';\n const back = horizontal ? (rtl ? 'ArrowRight' : 'ArrowLeft') : 'ArrowUp';\n\n if (event.key === ' ' || event.key === 'Enter') {\n event.preventDefault();\n if (grabbed === null) this.grab(index);\n else this.drop();\n return;\n }\n\n if (grabbed === null) return;\n\n if (event.key === 'Escape') {\n event.preventDefault();\n // Held only while a row is grabbed — an Escape typed anywhere else has to\n // keep reaching whatever dialog or overlay the list is sitting in.\n event.stopPropagation();\n this.cancelGrab();\n return;\n }\n\n if (event.key === forward || event.key === back) {\n event.preventDefault();\n this.moveGrabbed(event.key === forward ? 1 : -1);\n }\n }\n\n /**\n * Focus leaving a held row ends the gesture as a drop rather than dropping the\n * change on the floor — `[(items)]` has already been written by then, so a\n * silent release would leave `reorder` never reporting a move that happened.\n * The guard is what makes it safe: moving a focused node in the DOM blurs it,\n * so every keyboard move fires this too.\n */\n protected onRowFocusout(): void {\n if (this.restoringFocus || this.grabbedIndex() === null) return;\n this.drop();\n }\n\n private grab(index: number): void {\n this.grabOrigin = index;\n this.grabbedIndex.set(index);\n this.announcement.set(this.grabbedText(this.position(index)));\n }\n\n private moveGrabbed(delta: number): void {\n const from = this.grabbedIndex();\n if (from === null) return;\n const to = from + delta;\n if (to < 0 || to >= this.items().length) return;\n\n this.relocate(from, to);\n this.grabbedIndex.set(to);\n this.announcement.set(this.movedText(this.position(to)));\n }\n\n private drop(): void {\n const to = this.grabbedIndex();\n const from = this.grabOrigin;\n this.grabbedIndex.set(null);\n this.grabOrigin = -1;\n if (to === null) return;\n\n this.announcement.set(this.droppedText(this.position(to)));\n if (from === to) return;\n // One event per gesture, the way a drag emits one on drop — not one per\n // arrow press, which would put a host that persists on `reorder` through a\n // write per keystroke. `[(items)]` still updates on every press, because\n // the rendered order has to follow the row the user is moving.\n this.reorder.emit({ items: this.items(), previousIndex: from, currentIndex: to, item: this.items()[to] });\n }\n\n private cancelGrab(): void {\n const from = this.grabbedIndex();\n if (from === null) return;\n if (from !== this.grabOrigin) this.relocate(from, this.grabOrigin);\n this.grabbedIndex.set(null);\n this.grabOrigin = -1;\n this.announcement.set(this.cancelledText());\n }\n\n private relocate(from: number, to: number): void {\n const next = this.items().slice();\n moveItemInArray(next, from, to);\n this.items.set(next);\n\n // The row is the same DOM node moved to another slot, and moving a focused\n // node hands focus back to `<body>` — so it has to be taken again once the\n // move has rendered. `afterNextRender`, never a microtask: zoneless change\n // detection runs in a macrotask, so a microtask would fire while the row is\n // still at its old index and focus the wrong one. (jsdom keeps focus across\n // a node move, so no spec here can express that half.)\n this.restoringFocus = true;\n afterNextRender(\n () => {\n this.rowEls()[to]?.nativeElement.focus();\n this.restoringFocus = false;\n },\n { injector: this.injector }\n );\n }\n\n private position(index: number): { index: number; total: number } {\n return { index: index + 1, total: this.items().length };\n }\n}\n\nexport type { WrSortableReorderEvent } from './interfaces';\n","<!--\n `role=\"list\"` / `role=\"listitem\"` rather than the bare divs this used to be:\n every row is a tab stop now, and a focusable element with no role at all is\n announced as loose text. The list role is also what gives the reader the\n position of the row focus lands on.\n-->\n<div\n cdkDropList\n role=\"list\"\n class=\"wr-sortable-list__list\"\n [cdkDropListOrientation]=\"orientation()\"\n [cdkDropListDisabled]=\"disabled()\"\n (cdkDropListDropped)=\"onDrop($event)\"\n>\n @for (item of items(); track trackBy()($index, item)) {\n <div\n #row\n cdkDrag\n role=\"listitem\"\n class=\"wr-sortable-list__item\"\n [class.wr-sortable-list__item--grabbed]=\"grabbedIndex() === $index\"\n [attr.tabindex]=\"disabled() ? null : 0\"\n [attr.aria-describedby]=\"disabled() ? null : keyHelpId\"\n [cdkDragDisabled]=\"disabled()\"\n [cdkDragLockAxis]=\"lockAxis() ?? null\"\n [cdkDragStartDelay]=\"dragStartDelay()\"\n (keydown)=\"onRowKeydown($event, $index)\"\n (focusout)=\"onRowFocusout()\"\n >\n <ng-container *ngTemplateOutlet=\"rowTemplate(); context: { $implicit: item, index: $index }\" />\n </div>\n }\n</div>\n\n<!--\n The key model, on every row rather than once on the container: focus lands on\n a row and never on the list itself, so a description hung on the list would\n never be read out.\n-->\n<p class=\"wr-sortable-list__sr-only\" [id]=\"keyHelpId\">{{ resolvedKeyHelp() }}</p>\n\n<!--\n Position announcements, written by the keyboard path only — a drag already\n gives sighted feedback, and announcing every pointer move would flood the\n region.\n-->\n<p class=\"wr-sortable-list__sr-only\" role=\"status\">{{ announcement() }}</p>\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 { CdkDragHandle } from '@angular/cdk/drag-drop';\nimport { Directive } from '@angular/core';\n\n/**\n * Drag handle for {@link WrSortableList} (and any nested `cdkDrag`).\n * Composes CDK's `cdkDragHandle` via `hostDirectives` so consumers don't\n * need to import the CDK selector directly.\n *\n * @example\n * ```html\n * <wr-sortable-list [(items)]=\"rows\">\n * <ng-template let-row>\n * <div class=\"row\">\n * <span wrDragHandle class=\"grip\">≡</span>\n * <span>{{ row.label }}</span>\n * </div>\n * </ng-template>\n * </wr-sortable-list>\n * ```\n */\n@Directive({\n selector: '[wrDragHandle]',\n hostDirectives: [CdkDragHandle],\n host: { class: 'wr-drag-handle' },\n})\nexport class WrDragHandle {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;AAKG;AA0BH;AACA,IAAI,eAAe,GAAG,CAAC;AAEvB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuCG;MASU,cAAc,CAAA;;IAEhB,KAAK,GAAG,KAAK,CAAC,QAAQ;8EAAO;;IAG7B,WAAW,GAAG,KAAK,CAA4B,UAAU;o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,CAAA,EAAA,WAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,YAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,UAAA,CAAA,MAAA,WAA4C,oEAoBnC,KAAK,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEnIvE;;;;;AAKG;AAKH;;;;;;;;;;;;;;;;AAgBG;MAMU,YAAY,CAAA;uGAAZ,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAZ,YAAY,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,gBAAA,EAAA,IAAA,EAAA,EAAA,cAAA,EAAA,gBAAA,EAAA,EAAA,cAAA,EAAA,CAAA,EAAA,SAAA,EAAA,EAAA,CAAA,aAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAZ,YAAY,EAAA,UAAA,EAAA,CAAA;kBALxB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,gBAAgB;oBAC1B,cAAc,EAAE,CAAC,aAAa,CAAC;AAC/B,oBAAA,IAAI,EAAE,EAAE,KAAK,EAAE,gBAAgB,EAAE;AAClC,iBAAA;;;AC/BD;;AAEG;;;;"}
|
|
@@ -137,6 +137,15 @@ class WrEventCalendar {
|
|
|
137
137
|
allDayLabel = useI18nText(NO_OVERRIDE, 'eventCalendar.allDay', 'All day');
|
|
138
138
|
timeLabel = useI18nText(NO_OVERRIDE, 'eventCalendar.time', 'Time');
|
|
139
139
|
moreLabel = useI18nFormatter('eventCalendar.more', '+{{count}} more');
|
|
140
|
+
// The five composed strings. Each was a template literal, which localises the
|
|
141
|
+
// words inside it and freezes the word ORDER and the punctuation between them
|
|
142
|
+
// — `wr-calendar` learned the same thing one component over and its
|
|
143
|
+
// `calendar.header` / `.yearRange` / `.dayLabel` are the shape copied here.
|
|
144
|
+
headerText = useI18nFormatter('eventCalendar.header', '{{month}} {{year}}');
|
|
145
|
+
rangeText = useI18nFormatter('eventCalendar.range', '{{from}} – {{to}}');
|
|
146
|
+
chipLabelText = useI18nFormatter('eventCalendar.chipLabel', '{{title}}, {{time}}');
|
|
147
|
+
slotLabelText = useI18nFormatter('eventCalendar.slotLabel', '{{time}} — {{date}}');
|
|
148
|
+
allDayCellText = useI18nFormatter('eventCalendar.allDayCellLabel', '{{label}} — {{date}}');
|
|
140
149
|
monthLabel = useI18nText(NO_OVERRIDE, 'eventCalendar.month', 'Month');
|
|
141
150
|
weekLabel = useI18nText(NO_OVERRIDE, 'eventCalendar.week', 'Week');
|
|
142
151
|
dayLabel = useI18nText(NO_OVERRIDE, 'eventCalendar.day', 'Day');
|
|
@@ -240,10 +249,13 @@ class WrEventCalendar {
|
|
|
240
249
|
case 'week': {
|
|
241
250
|
const [start] = this.range();
|
|
242
251
|
const last = this.adapter.addDays(start, DAYS_PER_WEEK - 1);
|
|
243
|
-
return
|
|
252
|
+
return this.rangeText({
|
|
253
|
+
from: this.adapter.format(start, 'mediumDate'),
|
|
254
|
+
to: this.adapter.format(last, 'mediumDate'),
|
|
255
|
+
});
|
|
244
256
|
}
|
|
245
257
|
default:
|
|
246
|
-
return
|
|
258
|
+
return this.headerText({ month: months[this.adapter.getMonth(anchor)], year: this.adapter.getYear(anchor) });
|
|
247
259
|
}
|
|
248
260
|
}, /* @ts-ignore */
|
|
249
261
|
...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
|
|
@@ -312,7 +324,7 @@ class WrEventCalendar {
|
|
|
312
324
|
return days.map((date, col) => ({
|
|
313
325
|
key: this.iso(date),
|
|
314
326
|
date,
|
|
315
|
-
label:
|
|
327
|
+
label: this.allDayCellText({ label: this.allDayLabel(), date: this.adapter.format(date, 'longDate') }),
|
|
316
328
|
bands: chips.filter(chip => chip.column === col),
|
|
317
329
|
}));
|
|
318
330
|
}, /* @ts-ignore */
|
|
@@ -342,7 +354,7 @@ class WrEventCalendar {
|
|
|
342
354
|
cells: days.map((date, col) => ({
|
|
343
355
|
key: `${this.iso(date)}:${minutes}`,
|
|
344
356
|
date,
|
|
345
|
-
label:
|
|
357
|
+
label: this.slotLabelText({ time: clock, date: dayLabels[col] }),
|
|
346
358
|
chips: placed[col].filter(chip => chip.slotMinutes === minutes).map(chip => chip.chip),
|
|
347
359
|
})),
|
|
348
360
|
});
|
|
@@ -686,7 +698,7 @@ class WrEventCalendar {
|
|
|
686
698
|
// --------------------------------------------------------------- chrome
|
|
687
699
|
chipLabel(event) {
|
|
688
700
|
const time = event.allDay ? this.allDayLabel() : this.adapter.format(event.start, 'time');
|
|
689
|
-
return
|
|
701
|
+
return this.chipLabelText({ title: event.title, time });
|
|
690
702
|
}
|
|
691
703
|
chipTime(event) {
|
|
692
704
|
return event.allDay ? this.allDayLabel() : this.adapter.format(event.start, 'time');
|
|
@@ -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":";;;;;;;;;;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;2FAAvB,uBAAuB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,8BAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAvB,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAHnC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,8BAA8B;AACzC,iBAAA;;;AC3BD;;;;;AAKG;AAiCH;;;AAGG;AACH,MAAM,WAAW,GAAG,MAAM,CAAgB,IAAI,CAAC,CAAC,UAAU,EAAE;AAE5D,MAAM,eAAe,GAAG,EAAE,GAAG,EAAE;AAC/B,MAAM,aAAa,GAAG,CAAC;AACvB,MAAM,UAAU,GAAG,CAAC;AA8FpB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCG;MAcU,eAAe,CAAA;;IAEjB,MAAM,GAAG,KAAK,CAA6B,EAAE;+EAAC;;IAG9C,IAAI,GAAG,KAAK,CAAiB,OAAO;6EAAC;;AAGrC,IAAA,IAAI,GAAG,KAAK,CAAO,IAAI,IAAI,EAAE;6EAAC;;IAG9B,KAAK,GAAG,KAAK,CAA4B,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC;8EAAC;;IAGlE,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,qBAAqB,EAAA,CAAG;;AAG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Q,CAAC,gBAAgB,EAAE,QAAQ,EAAE,aAAa,CAAC,EAAA,QAAA,EAAA,g7VAAA,EAAA;yxCA6CZ,uBAAuB,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,SAAA,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 // The five composed strings. Each was a template literal, which localises the\n // words inside it and freezes the word ORDER and the punctuation between them\n // — `wr-calendar` learned the same thing one component over and its\n // `calendar.header` / `.yearRange` / `.dayLabel` are the shape copied here.\n private readonly headerText = useI18nFormatter('eventCalendar.header', '{{month}} {{year}}');\n private readonly rangeText = useI18nFormatter('eventCalendar.range', '{{from}} – {{to}}');\n private readonly chipLabelText = useI18nFormatter('eventCalendar.chipLabel', '{{title}}, {{time}}');\n private readonly slotLabelText = useI18nFormatter('eventCalendar.slotLabel', '{{time}} — {{date}}');\n private readonly allDayCellText = useI18nFormatter('eventCalendar.allDayCellLabel', '{{label}} — {{date}}');\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.rangeText({\n from: this.adapter.format(start, 'mediumDate'),\n to: this.adapter.format(last, 'mediumDate'),\n });\n }\n default:\n return this.headerText({ month: months[this.adapter.getMonth(anchor)], year: 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.allDayCellText({ label: this.allDayLabel(), date: 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: this.slotLabelText({ time: clock, date: 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 this.chipLabelText({ title: 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;2FAAvB,uBAAuB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,8BAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAvB,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAHnC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,8BAA8B;AACzC,iBAAA;;;AC3BD;;;;;AAKG;AAiCH;;;AAGG;AACH,MAAM,WAAW,GAAG,MAAM,CAAgB,IAAI,CAAC,CAAC,UAAU,EAAE;AAE5D,MAAM,eAAe,GAAG,EAAE,GAAG,EAAE;AAC/B,MAAM,aAAa,GAAG,CAAC;AACvB,MAAM,UAAU,GAAG,CAAC;AA8FpB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCG;MAcU,eAAe,CAAA;;IAEjB,MAAM,GAAG,KAAK,CAA6B,EAAE;+EAAC;;IAG9C,IAAI,GAAG,KAAK,CAAiB,OAAO;6EAAC;;AAG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