ngwr 13.0.1 → 14.0.1
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 +69 -13
- package/aurora/aurora.scss +1 -1
- package/aurora/styles/_dark.scss +21 -0
- package/aurora/styles/_index.scss +11 -30
- package/aurora/styles/_rules.scss +25 -0
- package/border-glow/styles/_dark.scss +46 -0
- package/border-glow/styles/_index.scss +5 -0
- package/border-glow/styles/_rules.scss +0 -31
- package/button/styles/_index.scss +16 -0
- package/color-picker/styles/_index.scss +43 -5
- package/event-calendar/styles/_index.scss +15 -0
- package/fesm2022/ngwr-action-sheet.mjs +3 -3
- package/fesm2022/ngwr-affix.mjs +3 -3
- package/fesm2022/ngwr-alert.mjs +7 -7
- package/fesm2022/ngwr-alert.mjs.map +1 -1
- package/fesm2022/ngwr-anchor.mjs +3 -3
- package/fesm2022/ngwr-aurora.mjs +4 -4
- package/fesm2022/ngwr-aurora.mjs.map +1 -1
- package/fesm2022/ngwr-avatar.mjs +3 -3
- package/fesm2022/ngwr-back-top.mjs +14 -4
- package/fesm2022/ngwr-back-top.mjs.map +1 -1
- package/fesm2022/ngwr-badge.mjs +6 -6
- package/fesm2022/ngwr-bar-chart.mjs +3 -3
- package/fesm2022/ngwr-blur-text.mjs +16 -5
- package/fesm2022/ngwr-blur-text.mjs.map +1 -1
- package/fesm2022/ngwr-border-glow.mjs +4 -4
- package/fesm2022/ngwr-border-glow.mjs.map +1 -1
- package/fesm2022/ngwr-breadcrumbs.mjs +7 -7
- package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
- package/fesm2022/ngwr-burger.mjs +3 -3
- package/fesm2022/ngwr-button.mjs +88 -10
- package/fesm2022/ngwr-button.mjs.map +1 -1
- package/fesm2022/ngwr-calendar-heatmap.mjs +3 -3
- package/fesm2022/ngwr-calendar-testing.mjs +15 -0
- package/fesm2022/ngwr-calendar-testing.mjs.map +1 -1
- package/fesm2022/ngwr-calendar.mjs +53 -7
- package/fesm2022/ngwr-calendar.mjs.map +1 -1
- package/fesm2022/ngwr-card.mjs +9 -9
- package/fesm2022/ngwr-carousel.mjs +6 -6
- package/fesm2022/ngwr-cascader.mjs +4 -4
- package/fesm2022/ngwr-cascader.mjs.map +1 -1
- package/fesm2022/ngwr-checkbox.mjs +6 -6
- package/fesm2022/ngwr-circular-text.mjs +23 -4
- package/fesm2022/ngwr-circular-text.mjs.map +1 -1
- package/fesm2022/ngwr-click-spark.mjs +3 -3
- package/fesm2022/ngwr-clipboard.mjs +3 -3
- package/fesm2022/ngwr-collapse.mjs +9 -9
- package/fesm2022/ngwr-collapse.mjs.map +1 -1
- package/fesm2022/ngwr-color-picker-testing.mjs +23 -7
- package/fesm2022/ngwr-color-picker-testing.mjs.map +1 -1
- package/fesm2022/ngwr-color-picker.mjs +93 -14
- package/fesm2022/ngwr-color-picker.mjs.map +1 -1
- package/fesm2022/ngwr-command-palette.mjs +29 -5
- package/fesm2022/ngwr-command-palette.mjs.map +1 -1
- package/fesm2022/ngwr-compare.mjs +3 -3
- package/fesm2022/ngwr-confetti.mjs +3 -3
- package/fesm2022/ngwr-context-menu.mjs +18 -12
- package/fesm2022/ngwr-context-menu.mjs.map +1 -1
- package/fesm2022/ngwr-cookie.mjs +3 -3
- package/fesm2022/ngwr-counter.mjs +6 -6
- package/fesm2022/ngwr-date-adapters-fns.mjs +104 -36
- package/fesm2022/ngwr-date-adapters-fns.mjs.map +1 -1
- package/fesm2022/ngwr-date-adapters-luxon.mjs +3 -3
- package/fesm2022/ngwr-date-picker-testing.mjs +10 -2
- package/fesm2022/ngwr-date-picker-testing.mjs.map +1 -1
- package/fesm2022/ngwr-date-picker.mjs +118 -28
- package/fesm2022/ngwr-date-picker.mjs.map +1 -1
- package/fesm2022/ngwr-date.mjs +483 -82
- package/fesm2022/ngwr-date.mjs.map +1 -1
- package/fesm2022/ngwr-decrypt-text.mjs +3 -3
- package/fesm2022/ngwr-density.mjs +6 -6
- package/fesm2022/ngwr-descriptions.mjs +6 -6
- package/fesm2022/ngwr-dialog.mjs +15 -15
- package/fesm2022/ngwr-directives.mjs +12 -12
- package/fesm2022/ngwr-divider.mjs +3 -3
- package/fesm2022/ngwr-donut-chart.mjs +3 -3
- package/fesm2022/ngwr-drag-drop.mjs +37 -9
- package/fesm2022/ngwr-drag-drop.mjs.map +1 -1
- package/fesm2022/ngwr-drawer.mjs +18 -18
- package/fesm2022/ngwr-dropdown.mjs +29 -12
- package/fesm2022/ngwr-dropdown.mjs.map +1 -1
- package/fesm2022/ngwr-empty.mjs +3 -3
- package/fesm2022/ngwr-event-calendar-testing.mjs.map +1 -1
- package/fesm2022/ngwr-event-calendar.mjs +6 -6
- package/fesm2022/ngwr-event-calendar.mjs.map +1 -1
- package/fesm2022/ngwr-falling-text.mjs +3 -3
- package/fesm2022/ngwr-file-upload.mjs +55 -15
- package/fesm2022/ngwr-file-upload.mjs.map +1 -1
- package/fesm2022/ngwr-form-testing.mjs +13 -7
- package/fesm2022/ngwr-form-testing.mjs.map +1 -1
- package/fesm2022/ngwr-form.mjs +44 -25
- package/fesm2022/ngwr-form.mjs.map +1 -1
- package/fesm2022/ngwr-fuzzy-text.mjs +3 -3
- package/fesm2022/ngwr-gauge.mjs +3 -3
- package/fesm2022/ngwr-glitch-text.mjs +3 -3
- package/fesm2022/ngwr-gradient-text.mjs +3 -3
- package/fesm2022/ngwr-hotkey.mjs +6 -6
- package/fesm2022/ngwr-i18n-en.mjs +63 -1
- package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ru.mjs +28 -1
- package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
- package/fesm2022/ngwr-i18n.mjs +159 -31
- package/fesm2022/ngwr-i18n.mjs.map +1 -1
- package/fesm2022/ngwr-icon.mjs +6 -6
- package/fesm2022/ngwr-image-cropper.mjs +3 -3
- package/fesm2022/ngwr-input-number.mjs +5 -5
- package/fesm2022/ngwr-input-number.mjs.map +1 -1
- package/fesm2022/ngwr-input-otp.mjs +23 -5
- package/fesm2022/ngwr-input-otp.mjs.map +1 -1
- package/fesm2022/ngwr-input.mjs +37 -26
- package/fesm2022/ngwr-input.mjs.map +1 -1
- package/fesm2022/ngwr-keyboard.mjs +3 -3
- package/fesm2022/ngwr-knob-testing.mjs.map +1 -1
- package/fesm2022/ngwr-knob.mjs +22 -4
- package/fesm2022/ngwr-knob.mjs.map +1 -1
- package/fesm2022/ngwr-layout.mjs +15 -15
- package/fesm2022/ngwr-lightbox.mjs +4 -4
- package/fesm2022/ngwr-lightbox.mjs.map +1 -1
- package/fesm2022/ngwr-line-chart.mjs +3 -3
- package/fesm2022/ngwr-list.mjs +7 -7
- package/fesm2022/ngwr-list.mjs.map +1 -1
- package/fesm2022/ngwr-loading-bar-router.mjs +73 -0
- package/fesm2022/ngwr-loading-bar-router.mjs.map +1 -0
- package/fesm2022/ngwr-loading-bar.mjs +27 -38
- package/fesm2022/ngwr-loading-bar.mjs.map +1 -1
- package/fesm2022/ngwr-markdown.mjs +6 -6
- package/fesm2022/ngwr-marquee.mjs +3 -3
- package/fesm2022/ngwr-media.mjs +3 -3
- package/fesm2022/ngwr-mention.mjs +109 -19
- package/fesm2022/ngwr-mention.mjs.map +1 -1
- package/fesm2022/ngwr-meta.mjs +6 -6
- package/fesm2022/ngwr-meter-group.mjs +3 -3
- package/fesm2022/ngwr-overlay.mjs +6 -6
- package/fesm2022/ngwr-page-header.mjs +3 -3
- package/fesm2022/ngwr-pagination-testing.mjs +11 -10
- package/fesm2022/ngwr-pagination-testing.mjs.map +1 -1
- package/fesm2022/ngwr-pagination.mjs +67 -32
- package/fesm2022/ngwr-pagination.mjs.map +1 -1
- package/fesm2022/ngwr-pipes.mjs +21 -21
- package/fesm2022/ngwr-platform.mjs +9 -9
- package/fesm2022/ngwr-popconfirm.mjs +7 -6
- package/fesm2022/ngwr-popconfirm.mjs.map +1 -1
- package/fesm2022/ngwr-popover.mjs +7 -6
- package/fesm2022/ngwr-popover.mjs.map +1 -1
- package/fesm2022/ngwr-progress.mjs +3 -3
- package/fesm2022/ngwr-pull-to-refresh.mjs +3 -3
- package/fesm2022/ngwr-qr.mjs +3 -3
- package/fesm2022/ngwr-radio.mjs +6 -6
- package/fesm2022/ngwr-rating.mjs +48 -22
- package/fesm2022/ngwr-rating.mjs.map +1 -1
- package/fesm2022/ngwr-result.mjs +12 -12
- package/fesm2022/ngwr-rotating-text.mjs +3 -3
- package/fesm2022/ngwr-scroll.mjs +3 -3
- package/fesm2022/ngwr-segmented.mjs +12 -8
- package/fesm2022/ngwr-segmented.mjs.map +1 -1
- package/fesm2022/ngwr-select.mjs +217 -59
- package/fesm2022/ngwr-select.mjs.map +1 -1
- package/fesm2022/ngwr-shiny-text.mjs +7 -7
- package/fesm2022/ngwr-shiny-text.mjs.map +1 -1
- package/fesm2022/ngwr-sidebar.mjs +3 -3
- package/fesm2022/ngwr-skeleton.mjs +3 -3
- package/fesm2022/ngwr-slider.mjs +12 -8
- package/fesm2022/ngwr-slider.mjs.map +1 -1
- package/fesm2022/ngwr-sparkline.mjs +3 -3
- package/fesm2022/ngwr-speed-dial.mjs +3 -3
- package/fesm2022/ngwr-spinner.mjs +3 -3
- package/fesm2022/ngwr-splash-cursor.mjs +3 -3
- package/fesm2022/ngwr-split-text.mjs +3 -3
- package/fesm2022/ngwr-splitter-testing.mjs.map +1 -1
- package/fesm2022/ngwr-splitter.mjs +3 -3
- package/fesm2022/ngwr-spotlight-card.mjs +7 -7
- package/fesm2022/ngwr-spotlight-card.mjs.map +1 -1
- package/fesm2022/ngwr-squircle.mjs +7 -6
- package/fesm2022/ngwr-squircle.mjs.map +1 -1
- package/fesm2022/ngwr-star-border.mjs +4 -4
- package/fesm2022/ngwr-star-border.mjs.map +1 -1
- package/fesm2022/ngwr-statistic.mjs +44 -13
- package/fesm2022/ngwr-statistic.mjs.map +1 -1
- package/fesm2022/ngwr-stepper.mjs +6 -6
- package/fesm2022/ngwr-storage.mjs +11 -3
- package/fesm2022/ngwr-storage.mjs.map +1 -1
- package/fesm2022/ngwr-switch.mjs +3 -3
- package/fesm2022/ngwr-table.mjs +51 -28
- package/fesm2022/ngwr-table.mjs.map +1 -1
- package/fesm2022/ngwr-tabs-router.mjs +158 -0
- package/fesm2022/ngwr-tabs-router.mjs.map +1 -0
- package/fesm2022/ngwr-tabs-testing.mjs +13 -11
- package/fesm2022/ngwr-tabs-testing.mjs.map +1 -1
- package/fesm2022/ngwr-tabs.mjs +104 -16
- package/fesm2022/ngwr-tabs.mjs.map +1 -1
- package/fesm2022/ngwr-textarea.mjs +46 -6
- package/fesm2022/ngwr-textarea.mjs.map +1 -1
- package/fesm2022/ngwr-theme.mjs +90 -4
- package/fesm2022/ngwr-theme.mjs.map +1 -1
- package/fesm2022/ngwr-tilt-card.mjs +7 -7
- package/fesm2022/ngwr-tilt-card.mjs.map +1 -1
- package/fesm2022/ngwr-timeline.mjs +6 -6
- package/fesm2022/ngwr-toast.mjs +116 -11
- package/fesm2022/ngwr-toast.mjs.map +1 -1
- package/fesm2022/ngwr-toolbar.mjs +3 -3
- package/fesm2022/ngwr-tour.mjs +6 -6
- package/fesm2022/ngwr-tour.mjs.map +1 -1
- package/fesm2022/ngwr-transfer.mjs +4 -4
- package/fesm2022/ngwr-transfer.mjs.map +1 -1
- package/fesm2022/ngwr-tree.mjs +35 -12
- package/fesm2022/ngwr-tree.mjs.map +1 -1
- package/fesm2022/ngwr-typewriter.mjs +3 -3
- package/fesm2022/ngwr-typography.mjs +3 -3
- package/fesm2022/ngwr-utils.mjs +37 -1
- package/fesm2022/ngwr-utils.mjs.map +1 -1
- package/fesm2022/ngwr-version.mjs +1 -1
- package/fesm2022/ngwr-version.mjs.map +1 -1
- package/fesm2022/ngwr-virtual-scroll.mjs +3 -3
- package/fesm2022/ngwr-waves.mjs +4 -4
- package/fesm2022/ngwr-waves.mjs.map +1 -1
- package/fesm2022/ngwr-window-testing.mjs +10 -2
- package/fesm2022/ngwr-window-testing.mjs.map +1 -1
- package/fesm2022/ngwr-window.mjs +15 -15
- package/fesm2022/ngwr-window.mjs.map +1 -1
- package/i18n/en.json +33 -6
- package/i18n/ru.json +33 -6
- package/llms-full.txt +29 -20
- package/llms.txt +127 -25
- package/mcp/catalog.js +3 -3
- package/mcp/providers.js +11 -0
- package/package.json +9 -1
- package/schematics/migrations/v13/index.js +101 -0
- package/schematics/migrations/v14/index.js +422 -0
- package/schematics/migrations.json +10 -0
- package/schematics/page/templates.js +1 -1
- package/schematics/use/symbol-map.json +1 -0
- package/shiny-text/styles/_dark.scss +20 -0
- package/shiny-text/styles/_index.scss +5 -0
- package/shiny-text/styles/_rules.scss +0 -4
- package/skills/ngwr/SKILL.md +4 -1
- package/skills/ngwr/references/catalog.md +2 -0
- package/skills/ngwr/references/setup.md +4 -0
- package/spotlight-card/styles/_dark.scss +21 -0
- package/spotlight-card/styles/_index.scss +5 -0
- package/spotlight-card/styles/_rules.scss +0 -6
- package/star-border/styles/_dark.scss +21 -0
- package/star-border/styles/_index.scss +5 -0
- package/star-border/styles/_rules.scss +0 -5
- package/stepper/styles/_index.scss +19 -1
- package/textarea/styles/_index.scss +14 -6
- package/theme/styles/_colors.scss +102 -0
- package/theme/styles/_focus.scss +31 -1
- package/tilt-card/styles/_dark.scss +21 -0
- package/tilt-card/styles/_index.scss +5 -0
- package/tilt-card/styles/_rules.scss +0 -5
- package/toast/styles/_index.scss +12 -4
- package/types/ngwr-alert.d.ts +3 -3
- package/types/ngwr-blur-text.d.ts +8 -0
- package/types/ngwr-button.d.ts +45 -2
- package/types/ngwr-calendar-testing.d.ts +21 -4
- package/types/ngwr-calendar.d.ts +37 -0
- package/types/ngwr-circular-text.d.ts +9 -0
- package/types/ngwr-collapse.d.ts +19 -15
- package/types/ngwr-color-picker-testing.d.ts +10 -4
- package/types/ngwr-color-picker.d.ts +70 -2
- package/types/ngwr-command-palette.d.ts +14 -0
- package/types/ngwr-context-menu.d.ts +1 -1
- package/types/ngwr-date-adapters-fns.d.ts +71 -29
- package/types/ngwr-date-picker-testing.d.ts +206 -185
- package/types/ngwr-date-picker.d.ts +7 -0
- package/types/ngwr-date.d.ts +143 -13
- package/types/ngwr-drag-drop.d.ts +19 -0
- package/types/ngwr-dropdown.d.ts +18 -2
- package/types/ngwr-event-calendar-testing.d.ts +12 -9
- package/types/ngwr-file-upload.d.ts +31 -3
- package/types/ngwr-form-testing.d.ts +13 -7
- package/types/ngwr-form.d.ts +47 -12
- package/types/ngwr-i18n.d.ts +89 -7
- package/types/ngwr-input-number.d.ts +1 -1
- package/types/ngwr-input-otp.d.ts +3 -0
- package/types/ngwr-input.d.ts +13 -5
- package/types/ngwr-knob-testing.d.ts +8 -4
- package/types/ngwr-knob.d.ts +18 -0
- package/types/ngwr-loading-bar-router.d.ts +35 -0
- package/types/ngwr-loading-bar.d.ts +19 -9
- package/types/ngwr-mention.d.ts +13 -0
- package/types/ngwr-pagination-testing.d.ts +11 -10
- package/types/ngwr-pagination.d.ts +39 -10
- package/types/ngwr-popconfirm.d.ts +1 -1
- package/types/ngwr-popover.d.ts +1 -1
- package/types/ngwr-rating.d.ts +25 -4
- package/types/ngwr-segmented.d.ts +1 -0
- package/types/ngwr-select.d.ts +110 -19
- package/types/ngwr-slider.d.ts +1 -0
- package/types/ngwr-splitter-testing.d.ts +9 -4
- package/types/ngwr-squircle.d.ts +1 -1
- package/types/ngwr-statistic.d.ts +22 -2
- package/types/ngwr-storage.d.ts +39 -1
- package/types/ngwr-table.d.ts +24 -5
- package/types/ngwr-tabs-router.d.ts +67 -0
- package/types/ngwr-tabs-testing.d.ts +12 -10
- package/types/ngwr-tabs.d.ts +103 -6
- package/types/ngwr-textarea.d.ts +29 -0
- package/types/ngwr-theme.d.ts +92 -2
- package/types/ngwr-toast.d.ts +53 -0
- package/types/ngwr-tree.d.ts +10 -2
- package/types/ngwr-utils.d.ts +33 -1
- package/types/ngwr-version.d.ts +1 -1
- package/types/ngwr-window-testing.d.ts +11 -3
- package/types/ngwr-window.d.ts +11 -4
- package/waves/styles/_dark.scss +19 -0
- package/waves/styles/_index.scss +5 -0
- package/waves/styles/_rules.scss +0 -3
- package/window/styles/_index.scss +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngwr-select.mjs","sources":["../../../projects/lib/select/tokens/select.token.ts","../../../projects/lib/select/option.ts","../../../projects/lib/select/select.ts","../../../projects/lib/select/select.html","../../../projects/lib/select/option-group.ts","../../../projects/lib/select/option-group.html","../../../projects/lib/select/ngwr-select.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 { InjectionToken, type Signal } from '@angular/core';\n\n/** Per-option registration metadata. @internal */\nexport interface WrSelectOptionRegistration {\n readonly id: string;\n readonly value: unknown;\n readonly disabled: boolean;\n /**\n * Lazy label reader. Options render text via `<ng-content>`, so we\n * read it at call time once Angular has settled the projected content.\n */\n readonly getLabel: () => string;\n /**\n * The option's own element, when it has one. The keyboard cursor walks the\n * registry, and registration order is CREATION order — projected children are\n * created before the panel renders its own `[options]` rows — so without this\n * the cursor moved in a different order from the one on screen. Optional: a\n * registration that cannot supply an element simply keeps its place.\n */\n readonly host?: HTMLElement;\n}\n\n/**\n * Contract a `<wr-option>` uses to talk to its parent `<wr-select>`.\n *\n * @internal\n */\nexport interface WrSelectContext {\n /**\n * Currently selected value. Single mode: `T | null`. Multi mode:\n * `readonly T[]`. Options consult {@link isSelected} instead of\n * reading this directly so the same option code works in both modes.\n */\n readonly value: Signal<unknown>;\n /** Whether the select is in multi-selection mode. */\n readonly multi: Signal<boolean>;\n /** Whether the select is disabled. */\n readonly isDisabled: Signal<boolean>;\n /** Id of the option currently highlighted by keyboard navigation. */\n readonly activeOptionId: Signal<string | null>;\n /**\n * Active search query (search mode only). Empty string when there is\n * no filter applied — options treat that as \"show me\".\n */\n readonly searchQuery: Signal<string>;\n /** True only when `mode=\"search\"`. */\n readonly isSearch: Signal<boolean>;\n /**\n * True when a filter is active — `mode=\"search\"` or `[searchable]`. Options\n * gate self-hiding on this.\n */\n readonly isSearchable: Signal<boolean>;\n /**\n * False when the option list is already query-scoped upstream (`[loader]` or\n * `[serverSearch]`), in which case options must NOT self-hide.\n */\n readonly clientFilter: Signal<boolean>;\n /** Is the given option value currently selected? Handles both single and multi. */\n isSelected(value: unknown): boolean;\n /**\n * Called when a child option is clicked. The label is read lazily\n * via {@link WrSelectOptionRegistration.getLabel}, so callers don't\n * need to thread it through.\n */\n selectOption(value: unknown): void;\n /** Register an option; returns an unregister function. */\n registerOption(reg: WrSelectOptionRegistration): () => void;\n}\n\n/**\n * Token a `<wr-option>` injects to register itself with and notify its\n * parent `<wr-select>`.\n *\n * @internal\n */\nexport const WR_SELECT = new InjectionToken<WrSelectContext>('WR_SELECT');\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 { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { Component, DestroyRef, ElementRef, ViewEncapsulation, computed, effect, inject, input } from '@angular/core';\n\nimport { WR_SELECT } from './tokens';\n\nlet uid = 0;\n\n/**\n * Single option inside a `<wr-select>`.\n *\n * The option's display label is taken from its projected text content;\n * the form value is its `value` input.\n *\n * @example\n * ```html\n * <wr-option value=\"sm\">Small</wr-option>\n * <wr-option [value]=\"42\">Forty-two</wr-option>\n * ```\n */\n@Component({\n selector: 'wr-option',\n template: '<ng-content />',\n encapsulation: ViewEncapsulation.None,\n host: {\n role: 'option',\n '[attr.id]': 'id',\n '[class]': 'classes()',\n '[attr.aria-selected]': 'selected()',\n '[attr.aria-disabled]': 'disabled() ? true : null',\n '(click)': 'onClick()',\n },\n})\nexport class WrOption {\n /** The value contributed when this option is chosen. Required. */\n readonly value = input.required<unknown>();\n\n /** Disable this option. @default false */\n readonly disabled = input(false, { transform: coerceBooleanProperty });\n\n /** Stable id used for `aria-activedescendant`. */\n readonly id = `wr-option-${++uid}`;\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly parent = inject(WR_SELECT, { optional: true });\n\n /**\n * @internal — true when this option is currently selected. Works for\n * both single and multi-select parents via `WrSelectContext.isSelected`.\n */\n protected readonly selected = computed(() => {\n const parent = this.parent;\n if (!parent) return false;\n // Re-read parent's value signal so the computed recomputes on change.\n parent.value();\n return parent.isSelected(this.value());\n });\n\n /** @internal — true when this option is the keyboard cursor target. */\n protected readonly active = computed(() => this.parent?.activeOptionId() === this.id);\n\n /**\n * @internal — searchable selects only. True when the parent has a query that\n * the option's text content does not match (case-insensitive substring).\n * Hidden options stay in the DOM so registration order survives but\n * collapse via CSS.\n */\n protected readonly hidden = computed(() => {\n const parent = this.parent;\n if (!parent?.isSearchable() || !parent.clientFilter()) return false;\n const q = parent.searchQuery().trim().toLowerCase();\n if (!q) return false;\n const label = (this.host.nativeElement.textContent ?? '').trim().toLowerCase();\n return !label.includes(q);\n });\n\n protected readonly classes = computed(() => {\n const parts = ['wr-option'];\n if (this.selected()) parts.push('wr-option--selected');\n if (this.active()) parts.push('wr-option--active');\n if (this.disabled()) parts.push('wr-option--disabled');\n if (this.hidden()) parts.push('wr-option--hidden');\n return parts.join(' ');\n });\n\n constructor() {\n if (this.parent) {\n const parent = this.parent;\n // Re-register when disabled or value changes so the parent has fresh metadata.\n effect(onCleanup => {\n const unreg = parent.registerOption({\n id: this.id,\n value: this.value(),\n disabled: this.disabled(),\n getLabel: () => this.host.nativeElement.textContent?.trim() ?? '',\n host: this.host.nativeElement,\n });\n onCleanup(() => unreg());\n });\n inject(DestroyRef);\n }\n }\n\n protected onClick(): void {\n if (this.disabled() || !this.parent) return;\n this.parent.selectOption(this.value());\n }\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 { type BooleanInput, coerceBooleanProperty, coerceNumberProperty } from '@angular/cdk/coercion';\nimport { type OverlayRef, ScrollStrategyOptions } from '@angular/cdk/overlay';\nimport { TemplatePortal } from '@angular/cdk/portal';\nimport { isPlatformBrowser } from '@angular/common';\nimport {\n Component,\n DestroyRef,\n ElementRef,\n PLATFORM_ID,\n TemplateRef,\n ViewContainerRef,\n ViewEncapsulation,\n computed,\n contentChildren,\n effect,\n forwardRef,\n inject,\n input,\n model,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport { takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop';\nimport type { FormValueControl } from '@angular/forms/signals';\n\nimport {\n type Observable,\n catchError,\n debounce,\n defer,\n finalize,\n from,\n isObservable,\n of,\n skip,\n switchMap,\n tap,\n timer,\n} from 'rxjs';\n\nimport { useConfigValue } from 'ngwr/config';\nimport { WR_FORM_FIELD } from 'ngwr/form';\nimport { useI18nFormatter, useI18nText } from 'ngwr/i18n';\nimport { WR_OVERLAY, WR_RESPONSIVE_OVERLAYS, WrOutsideClick, wrPresentAsSheet } from 'ngwr/overlay';\n\nimport type { WrSelectMode, WrSelectSearchLoader, WrSelectTagValidator, WrSelectSize } from './interfaces';\nimport { WrOption } from './option';\nimport { WR_SELECT, type WrSelectContext, type WrSelectOptionRegistration } from './tokens';\n\nlet listboxUid = 0;\n\ninterface SelectedChip {\n readonly value: unknown;\n readonly label: string;\n}\n\n/**\n * Combobox primitive. Renders a button that opens a CDK overlay\n * containing the projected `<wr-option>` (and optionally\n * `<wr-option-group>`) children. Every shape is the same component\n * with a different `[mode]`:\n *\n * - `'single'` (default) — one value, no input. Classic dropdown.\n * - `'multi'` — array value, chips on the trigger; clicking an option\n * toggles instead of closing, Backspace removes the last chip.\n * - `'search'` — type-ahead with sync `[options]` filter or async\n * `[loader]`. Replaces the standalone `<wr-autocomplete>`.\n * - `'tag'` — free-text + chips with `[separators]` / `[validate]` /\n * `[allowDuplicates]`. Replaces `<wr-chips-input>`.\n *\n * `[searchable]` is orthogonal to the mode — it adds the type-ahead filter to\n * `single` / `multi` without changing the value shape, which is how you get a\n * searchable multi-select. Server-side search hangs off the `(searchChange)` output\n * plus `[options]` / `[loading]`.\n *\n * A signal-forms native control: it implements `FormValueControl<unknown>`, so\n * `[formField]` binds straight to its `value` model — no\n * `ControlValueAccessor` in between. `[(value)]` works standalone, and classic\n * `[(ngModel)]` / reactive forms keep working through Angular's bridge.\n *\n * @example\n * ```html\n * <!-- Single (signal forms) -->\n * <wr-select placeholder=\"Pick a size\" [formField]=\"form.size\">\n * <wr-option value=\"sm\">Small</wr-option>\n * <wr-option value=\"md\">Medium</wr-option>\n * <wr-option value=\"lg\">Large</wr-option>\n * </wr-select>\n *\n * <!-- Multi (standalone two-way binding) -->\n * <wr-select mode=\"multi\" placeholder=\"Pick tags\" [(value)]=\"tags\">\n * <wr-option value=\"ts\">TypeScript</wr-option>\n * <wr-option value=\"ng\">Angular</wr-option>\n * </wr-select>\n *\n * <!-- Multi + type-ahead, options from a store -->\n * <wr-select\n * mode=\"multi\"\n * searchable\n * [options]=\"results()\"\n * [loading]=\"pending()\"\n * [(value)]=\"categories\"\n * (searchChange)=\"store.search($event)\"\n * />\n * ```\n *\n *\n * @see https://ngwr.dev/reference/components/select\n */\n@Component({\n selector: 'wr-select',\n templateUrl: './select.html',\n encapsulation: ViewEncapsulation.None,\n host: { '[class]': 'classes()' },\n imports: [WrOption],\n providers: [\n {\n provide: WR_SELECT,\n // eslint-disable-next-line @angular-eslint/no-forward-ref\n useExisting: forwardRef(() => WrSelect),\n },\n ],\n})\nexport class WrSelect implements FormValueControl<unknown>, WrSelectContext {\n /** Placeholder shown when no option is selected. Falls back to `select.placeholder`. */\n readonly placeholder = input<string | null>(null);\n\n /** Clear-selection (×) button aria-label. Falls back to `select.clearSelection`. */\n readonly clearLabel = input<string | null>(null);\n\n protected readonly resolvedPlaceholder = useI18nText(this.placeholder, 'select.placeholder', '');\n protected readonly resolvedClear = useI18nText(this.clearLabel, 'select.clearSelection', 'Clear selection');\n\n /**\n * Accessible name of the trigger. Falls back to the placeholder, then to\n * `select.label` — `role=\"combobox\"` on an empty trigger otherwise has no name\n * at all, which is the common case before anything is selected.\n */\n readonly ariaLabel = input<string | null>(null);\n\n private readonly labelText = useI18nText(this.ariaLabel, 'select.label', 'Select');\n protected readonly resolvedAriaLabel = computed(() => {\n // Not `??`: an empty placeholder must fall through to the catalog string.\n const explicit = this.ariaLabel();\n if (explicit) return explicit;\n const placeholder = this.resolvedPlaceholder();\n return placeholder ? placeholder : this.labelText();\n });\n\n /** Per-chip ARIA label — interpolates `{{label}}`. @internal */\n protected readonly chipRemoveLabel = useI18nFormatter('select.removeItem', 'Remove {{label}}');\n\n /**\n * The overflow chip past `maxTagCount` — interpolates `{{count}}`. Through the\n * catalog, like every other string here: printed as a bare `+{{ extra }} more`\n * it stayed English in a fully localized app, beside an event-calendar cell\n * reading \"ещё 3\" from the same string. @internal\n */\n protected readonly moreLabel = useI18nFormatter('select.more', '+{{count}} more');\n\n private readonly field = inject(WR_FORM_FIELD, { optional: true });\n\n /**\n * Id the surrounding `<wr-form-field>`'s `<label for>` points at.\n *\n * The field renders its label before it can see what was projected into it, so\n * the id travels the other way and the control adopts it, exactly as `[wrInput]`\n * and `wr-slider` do. Without this the `for` named an element that was nowhere in\n * the document: clicking the label did nothing, and the field's own text reached\n * the control through no path at all.\n *\n * It lands on the ONE focusable element each trigger shape has — the button, the\n * search input, or the tag input — never on the host, because only a labelable\n * element can be a label's target and `<wr-select>` is not one.\n *\n * What this does NOT change is that element's NAME: `aria-label` outranks a\n * `<label>` in the accname order, and the trigger keeps `resolvedAriaLabel()`\n * because the field cannot promise it has a name to give — `<wr-form-field>`\n * renders a label only when its `label` input is set, and a combobox that traded\n * a generic name for no name would be the worse bug. `WrFormFieldContext`\n * publishes no \"do I have a visible label\" signal to key that on. Until it does,\n * set `[ariaLabel]` to the field's label where the two should read alike.\n */\n protected readonly controlId = computed(() => this.field?.controlId() ?? null);\n\n /**\n * The field's error message, wired to the same element.\n *\n * Without it the messages `<wr-form-field>` renders are visible and nothing else:\n * a screen reader on the trigger never learns the field is invalid, nor what the\n * message says. `aria-invalid` is keyed on the message EXISTING rather than on\n * `errorKeys()`, because the field only publishes an id once it is showing\n * something — announcing \"invalid\" while pointing at nothing is worse than\n * staying quiet.\n */\n protected readonly describedBy = computed(() => this.field?.describedBy() ?? null);\n protected readonly ariaInvalid = computed(() => (this.field?.describedBy() ? 'true' : null));\n\n /**\n * Disable the select. Bound automatically from the field's disabled state\n * when used with `[formField]`.\n *\n * @default false\n */\n readonly disabled = input(false, { transform: coerceBooleanProperty });\n\n /**\n * Refuse changes while the trigger stays focusable and the value still\n * submits. Bound automatically from the field's readonly state when used with\n * `[formField]`.\n *\n * The panel is where every edit happens, so a read-only select does not open —\n * and with it go the clear button, the chip ×, the tag draft and the search\n * query. The text-input shapes take the native `readonly` attribute, which is\n * what keeps them focusable and selectable where `disabled` would not; every\n * shape mirrors `aria-readonly`, which role `combobox` supports.\n *\n * @default false\n */\n readonly readonly = input(false, { transform: coerceBooleanProperty });\n\n /**\n * Pill-shaped corners on the trigger. Unset falls back to the `select.rounded`\n * app default from `provideWrConfig()`; `[rounded]=\"false\"` turns a configured\n * `true` back off. @default false\n */\n readonly rounded = input<boolean | null, BooleanInput>(null, {\n // Null-preserving, like `responsive` below: the plain `coerceBooleanProperty`\n // folds `null` into `false`, which would make \"not set\" and \"set to false\"\n // the same value — and a config default nothing could ever supply.\n transform: (v: BooleanInput): boolean | null => (v == null ? null : coerceBooleanProperty(v)),\n });\n\n /**\n * Control size — shares the `--wr-control-*` contract. Unset falls back to the\n * `select.size` app default from `provideWrConfig()`. @default 'md'\n */\n readonly size = input<WrSelectSize | null>(null);\n\n /** `rounded`, then the app config, then `false`. @internal */\n protected readonly resolvedRounded = useConfigValue(this.rounded, c => c.select?.rounded, false);\n\n /**\n * `size`, then the app config, then `md`. Read by the trigger's host classes AND\n * by the overlay panel, which builds its size modifier separately.\n */\n protected readonly resolvedSize = useConfigValue(this.size, c => c.select?.size, 'md');\n\n /**\n * Present the option panel as a full-width bottom-sheet on small\n * viewports instead of an anchored dropdown. `undefined` follows the\n * app-wide `provideWrResponsiveOverlays()` setting; `true`/`false`\n * overrides it. @default undefined\n */\n readonly responsive = input<boolean | undefined, BooleanInput>(undefined, {\n transform: (v: BooleanInput): boolean | undefined => (v == null ? undefined : coerceBooleanProperty(v)),\n });\n\n /**\n * Behavior mode. `<wr-select>` is the unified combobox primitive —\n * pick the shape via `[mode]`:\n *\n * - `'single'` (default) — one value, no input. Classic dropdown.\n * - `'multi'` — array value, chips on the trigger.\n * - `'search'` — type-ahead with sync filter or async loader.\n * - `'tag'` — free-text + chips.\n *\n */\n readonly mode = input<WrSelectMode | null>(null);\n\n /** Resolved mode — `'single'` unless `[mode]` says otherwise. */\n protected readonly effectiveMode = computed<WrSelectMode>(() => this.mode() ?? 'single');\n\n /** Convenience — `effectiveMode() === 'multi'`. */\n protected readonly isMulti = computed(() => this.effectiveMode() === 'multi');\n\n /** Convenience — `effectiveMode() === 'tag'`. */\n protected readonly isTag = computed(() => this.effectiveMode() === 'tag');\n\n /** Convenience — `effectiveMode() === 'search'`. Exposed via context for options. */\n readonly isSearch = computed(() => this.effectiveMode() === 'search');\n\n /**\n * Add a type-ahead filter without changing the value shape — the missing\n * multi-with-search combination, since `[mode]` picks exactly one shape:\n *\n * ```html\n * <wr-select mode=\"multi\" searchable [(value)]=\"categories\">…</wr-select>\n * ```\n *\n * On `multi` the trigger keeps its chips and grows an inline text field (the\n * shape `tag` mode already uses); on `single` it is equivalent to\n * `mode=\"search\"`. Every search input (`[options]`, `[loader]`,\n * `[debounceMs]`, `[minChars]`, `[virtualScroll]`, the `(searchChange)` output, …)\n * applies either way. Ignored in `tag` mode, which owns its own input.\n * @default false\n */\n readonly searchable = input(false, { transform: coerceBooleanProperty });\n\n /**\n * Filtering is active — either `mode=\"search\"` or `[searchable]`. Exposed via\n * context so each `<wr-option>` can self-hide non-matching rows.\n */\n readonly isSearchable = computed(() => this.isSearch() || (this.searchable() && !this.isTag()));\n\n /** The trigger *is* the search input: `mode=\"search\"`, or a searchable single. */\n protected readonly isSearchTrigger = computed(() => this.isSearch() || (this.searchable() && !this.hasChips()));\n\n /** Chips plus an inline search field — a searchable multi-select. */\n protected readonly hasChipSearch = computed(() => this.searchable() && this.isMulti());\n\n /** WrSelectContext — resolved multi-selection flag for child options. */\n readonly multi = computed(() => this.effectiveMode() === 'multi' || this.effectiveMode() === 'tag');\n\n /** Both multi and tag render chips on the trigger. */\n protected readonly hasChips = computed(() => {\n const m = this.effectiveMode();\n return m === 'multi' || m === 'tag';\n });\n\n /**\n * The live search query. Empty string = no filter. Exposed via context so\n * each `<wr-option>` can self-hide non-matching rows.\n *\n * Two-way bindable, so the query can be owned or reset from outside:\n * `[(searchQuery)]=\"query\"`. For server-side search prefer the debounced\n * {@link searchChange} output — `searchQueryChange` fires on every keystroke.\n */\n readonly searchQuery = model('');\n\n // Search-mode-only inputs (ignored in other modes)\n\n /**\n * Search mode: dynamic option array. Each item is rendered as a\n * `<wr-option>` whose label comes from `[displayWith]`. Works\n * alongside projected `<wr-option>` children — both lists are\n * filtered by the search query.\n */\n readonly options = input<readonly unknown[]>([]);\n\n /** Search mode: map a dynamic option item to its display label. @default String */\n readonly displayWith = input<(item: unknown) => string>((item: unknown) => String(item));\n\n /**\n * Search mode: async loader. When set, the loader is called on every\n * (debounced) keystroke and its result replaces `[options]`. Supports\n * Observables, Promises, and plain arrays.\n */\n readonly loader = input<WrSelectSearchLoader<unknown> | null>(null);\n\n /**\n * The option list is already scoped to the query upstream — skip the built-in\n * client-side label filter. Set it when `[options]` is fed from a server via\n * the {@link searchChange} output; the async `[loader]` path implies it.\n *\n * Without this, a server that ranks or fuzzy-matches (returning rows whose\n * labels don't literally contain the query) would have those rows hidden\n * again on the client. @default false\n */\n readonly serverSearch = input(false, { transform: coerceBooleanProperty });\n\n /**\n * Whether the built-in label filter runs. Exposed via context so each\n * `<wr-option>` knows whether to self-hide. @internal\n */\n readonly clientFilter = computed(() => !this.loader() && !this.serverSearch());\n\n /** Search mode: debounce (ms) applied to the loader. @default 250 */\n readonly debounceMs = input(250, { transform: (v: unknown): number => Math.max(0, Number(v) || 0) });\n\n /** Search mode: minimum query length before the panel opens / loader fires. @default 0 */\n readonly minChars = input(0, { transform: (v: unknown): number => Math.max(0, Number(v) || 0) });\n\n /**\n * Search mode: allow values not in the options list. Enter on an\n * unmatched query commits the raw text as the form value. @default false\n */\n readonly freeText = input(false, { transform: coerceBooleanProperty });\n\n /**\n * Search mode: window the option panel so thousands of `[options]` keep only\n * ~one viewport of rows in the DOM. Opt-in and OFF by default. Engages ONLY on\n * the pure data-array search tier — it silently falls back to the full render\n * when static `<wr-option>` children are projected or the filtered list is\n * empty. While on, rows are plain `role=\"option\"` elements (no `<wr-option>`),\n * navigated via `aria-activedescendant`, selected by value. @default false\n */\n readonly virtualScroll = input(false, { transform: coerceBooleanProperty });\n\n /**\n * Search mode: uniform option-row height in px for the virtual window. `0`\n * (default) measures the first rendered row once and reuses it, so it adapts\n * to the control size. Read only when `virtualScroll` engages. @default 0\n */\n readonly rowHeight = input(0, { transform: (v: unknown): number => Math.max(0, coerceNumberProperty(v, 0)) });\n\n /**\n * Search mode: height of the virtual scroll viewport — a number (px) or any\n * CSS length. @default 256\n */\n readonly viewportHeight = input<number | string>(256);\n\n /** Search mode: extra rows kept above/below the virtual viewport. @default 6 */\n readonly overscan = input(6, { transform: (v: unknown): number => Math.max(0, coerceNumberProperty(v, 6)) });\n\n /** Search mode: text shown when the filter / loader returns nothing. Falls back to `select.noResults`. */\n readonly noResultsText = input<string | null>(null);\n\n /** Search mode: text shown while the async loader is in flight. Falls back to `select.loading`. */\n readonly loadingText = input<string | null>(null);\n\n protected readonly resolvedNoResults = useI18nText(this.noResultsText, 'select.noResults', 'No results');\n protected readonly resolvedLoading = useI18nText(this.loadingText, 'select.loading', 'Loading…');\n\n /**\n * Debounced search query, gated to searchable selects. Emits on every settled\n * change — including the empty string when the field is cleared — so a\n * store-backed option list can stay in sync and reset itself. `[debounceMs]`\n * controls the delay; `[minChars]` does NOT gate it, for the same reason the\n * `[loader]` path clears its results below that threshold.\n *\n * This is the hook for server-side search: dispatch on `(searchChange)`, feed\n * the results back through `[options]` (plus `[serverSearch]`), and drive the\n * panel's progress row with `[loading]`. Prefer it over the model's raw\n * `(searchQueryChange)`, which fires on every keystroke.\n *\n * @example\n * ```html\n * <wr-select\n * mode=\"search\"\n * serverSearch\n * [options]=\"results()\"\n * [loading]=\"pending()\"\n * (searchChange)=\"store.search($event)\"\n * />\n * ```\n */\n readonly searchChange = output<string>();\n\n /**\n * Show the panel's progress row. Independent of `[loader]`, which raises and\n * lowers its own flag — use this when the options come from a store fed by\n * the {@link searchChange} output. @default false\n */\n readonly loading = input(false, { transform: coerceBooleanProperty });\n\n /** Search mode: results returned by the async loader. @internal */\n protected readonly loadedOptions = signal<readonly unknown[]>([]);\n\n /** True while the async `[loader]` is in flight. @internal */\n private readonly loaderLoading = signal(false);\n\n /** Either flag shows the panel's progress row. @internal */\n protected readonly isLoading = computed(() => this.loading() || this.loaderLoading());\n\n // Tag-mode-only inputs (ignored in other modes)\n\n /**\n * Tag mode: keys / characters that commit the current draft into a chip.\n * `'Enter'` is the key name; everything else is a literal character watched\n * in keypresses and pastes. @default ['Enter', ',']\n */\n readonly separators = input<readonly string[]>(['Enter', ',']);\n\n /** Tag mode: allow the same value to appear more than once. @default false */\n readonly allowDuplicates = input(false, { transform: coerceBooleanProperty });\n\n /**\n * Tag mode: custom validator — return `true` to accept the value, `false`\n * to silently reject. Receives the trimmed draft + the existing chips.\n */\n readonly validate = input<WrSelectTagValidator | null>(null);\n\n /** Tag-mode draft (text currently typed in the inline input). @internal */\n protected readonly draft = signal('');\n\n /**\n * Show a clear (×) button once at least one option is selected.\n *\n * NOT multi-only, which this said for a long time and which the template\n * refutes: only the button trigger gates on `isMulti()`, so the chips trigger\n * AND a single `mode=\"search\"` / `[searchable]` select carry it too. The\n * wording mattered little while the default was `true`; it decides what a\n * reader expects to lose now that it is not.\n *\n * The default changed from `true` to `false`: the affordance is opt-in, so a\n * trigger that grew an × on its own no longer does — pass `clearable` to keep\n * it. In `search` mode this also gates Backspace-to-clear on an empty field,\n * since that key is the keyboard twin of this button. @default false\n */\n readonly clearable = input(false, { transform: coerceBooleanProperty });\n\n /**\n * Cap on selected items (multi mode). `0` = unlimited. Once reached,\n * additional clicks on unselected options are ignored. @default 0\n */\n readonly maxItems = input(0, {\n transform: (v: unknown): number => Math.max(0, Number(v) || 0),\n });\n\n /**\n * Maximum number of chips rendered before collapsing the rest into a\n * `+N more` indicator. `0` = render every chip. @default 0\n */\n readonly maxTagCount = input(0, {\n transform: (v: unknown): number => Math.max(0, Number(v) || 0),\n });\n\n /**\n * Unified value. Single mode holds a scalar (or `null`); multi / tag\n * mode holds `readonly unknown[]`. Bound by `[formField]`, or two-way\n * via `[(value)]`.\n */\n readonly value = model<unknown>(null);\n\n /** Emitted on blur / commit so a bound field can mark itself touched. */\n readonly touch = output<void>();\n\n /** Listbox id used by the trigger's `aria-controls`. */\n protected readonly listboxId = `wr-select-listbox-${++listboxUid}`;\n\n /** Registered options (insertion order). Internal — distinct from the public `[options]` input. */\n private readonly registry = signal<readonly WrSelectOptionRegistration[]>([]);\n\n /**\n * The registry in DOM order — the list the keyboard cursor walks.\n *\n * `registry` is CREATION order, and projected `<wr-option>` children are created\n * before the panel renders its own `[options]` rows, so with both in play the\n * cursor moved in an order the eye could not follow: opening highlighted the\n * third row on screen and ArrowDown went to the last. Value lookups keep reading\n * `registry` — they do not care about order — and a registration with no element\n * keeps its place, since the sort is stable.\n */\n protected readonly orderedRegistry = computed<readonly WrSelectOptionRegistration[]>(() => {\n const list = this.registry();\n if (list.length < 2) return list;\n return [...list].sort((a, b) => {\n if (!a.host || !b.host || a.host === b.host) return 0;\n const relation = a.host.compareDocumentPosition(b.host);\n // `compareDocumentPosition` returns a BITMASK — a node can be both\n // following and contained — so masking is the API's own idiom, not a\n // cleverness to be rewritten as a comparison.\n /* eslint-disable no-bitwise -- reading the flags of a DOM bitmask */\n if (relation & Node.DOCUMENT_POSITION_FOLLOWING) return -1;\n if (relation & Node.DOCUMENT_POSITION_PRECEDING) return 1;\n /* eslint-enable no-bitwise */\n return 0;\n });\n });\n\n /** Keyboard cursor index into `options`. -1 = none. */\n protected readonly activeIndex = signal(-1);\n\n /** Id of the active option (for `aria-activedescendant`). */\n readonly activeOptionId = computed<string | null>(() => {\n const idx = this.activeIndex();\n if (this.virtualActive()) {\n // Virtual rows aren't registered; the active id is derived from the index,\n // and returned only while the row is inside the rendered window so\n // `aria-activedescendant` never dangles at a recycled element.\n const { start, end } = this.virtualWindow();\n return idx >= start && idx < end ? this.virtualRowId(idx) : null;\n }\n const list = this.orderedRegistry();\n return idx >= 0 && idx < list.length ? list[idx].id : null;\n });\n\n protected readonly open = signal(false);\n protected readonly selectedLabel = signal<string | null>(null);\n\n /**\n * Selected chips (multi + tag modes). Multi reads labels from the\n * registered `<wr-option>` children; tag uses each raw string as\n * both value and label.\n */\n protected readonly selectedChips = computed<readonly SelectedChip[]>(() => {\n if (!this.hasChips()) return [];\n const arr = this.asArray(this.value());\n if (this.isTag()) {\n return arr.map<SelectedChip>(v => ({ value: v, label: String(v) }));\n }\n const list = this.registry();\n return arr.map<SelectedChip>(v => {\n const found = list.find(o => o.value === v);\n // Fall back to `displayWith` (defaults to `String`) rather than `String`\n // directly: a searchable multi fed from `[options]` has no registered\n // `<wr-option>` for a virtualized or unmounted row, and object items\n // would otherwise render as \"[object Object]\".\n return { value: v, label: found?.getLabel() ?? this.displayWith()(v) };\n });\n });\n\n protected readonly visibleChips = computed<readonly SelectedChip[]>(() => {\n const cap = this.maxTagCount();\n const chips = this.selectedChips();\n return cap > 0 && chips.length > cap ? chips.slice(0, cap) : chips;\n });\n\n protected readonly hiddenChipCount = computed(() => {\n const cap = this.maxTagCount();\n const total = this.selectedChips().length;\n return cap > 0 && total > cap ? total - cap : 0;\n });\n\n protected readonly hasSelection = computed(() => {\n if (this.hasChips()) return this.selectedChips().length > 0;\n return this.value() != null;\n });\n\n /** Effective disabled state. Part of {@link WrSelectContext} for child options. */\n readonly isDisabled = computed(() => this.disabled());\n\n /** Effective readonly state — refuses every write path without removing focus. */\n protected readonly isReadonly = computed(() => this.readonly());\n\n protected readonly classes = computed(() => {\n const parts = ['wr-select'];\n if (this.open()) parts.push('wr-select--open');\n if (this.resolvedRounded()) parts.push('wr-select--rounded');\n const size = this.resolvedSize();\n if (size !== 'md') parts.push(`wr-select--${size}`);\n if (this.isMulti()) parts.push('wr-select--multi');\n if (this.isTag()) parts.push('wr-select--tag');\n if (this.isSearchTrigger()) parts.push('wr-select--search');\n if (this.hasChipSearch()) parts.push('wr-select--searchable');\n if (this.isDisabled()) parts.push('wr-select--disabled');\n else if (this.isReadonly()) parts.push('wr-select--readonly');\n return parts.join(' ');\n });\n\n /**\n * Search-mode dynamic options. Loader results win when the loader is\n * set; otherwise the static `[options]` array. Each item is rendered\n * as an internal `<wr-option>` in the panel.\n */\n protected readonly dynamicOptions = computed<readonly unknown[]>(() =>\n this.loader() ? this.loadedOptions() : this.options()\n );\n\n // --- Virtual scroll (search mode, data-array path) ------------------------\n\n private static readonly FALLBACK_ROW_PX = 34;\n private static readonly FALLBACK_VIEWPORT_PX = 256;\n\n /**\n * Consumer-projected `<wr-option>` children only (NOT the `@for`-rendered ones\n * — those live in the panel's own view, which a content query never sees).\n *\n * `descendants: true` because a projected option is as often wrapped in a\n * `<wr-option-group>` as it is a direct child, and the signal default is\n * `false`. A grouped list therefore read as NO projected options: `virtualActive`\n * engaged over the (empty) data array, so the panel rendered the group's rows\n * with a virtual window beside them that owned the keyboard — no\n * `aria-activedescendant`, no active row, and Enter committing nothing.\n */\n private readonly projectedOptions = contentChildren(WrOption, { descendants: true });\n\n /**\n * `dynamicOptions()` narrowed to the current search query. `dynamicOptions()`\n * is intentionally UNFILTERED (projected `<wr-option>` self-hide via CSS), so\n * the virtual path — which renders plain rows that can't self-hide — filters\n * here. Loader / `serverSearch` results are already query-scoped upstream.\n */\n protected readonly filteredDynamicOptions = computed<readonly unknown[]>(() => {\n const items = this.dynamicOptions();\n if (!this.clientFilter()) return items;\n const q = this.searchQuery().trim().toLowerCase();\n if (!q) return items;\n const label = this.displayWith();\n return items.filter(it => label(it).toLowerCase().includes(q));\n });\n\n /**\n * Virtualization engaged: opt-in, search mode, and NO projected `<wr-option>`\n * children — grouped ones included (those keep the full-render registry path so\n * their DOM-derived labels / selection still work).\n *\n * NOT gated on there being matches. It used to also require\n * `filteredDynamicOptions().length > 0`, which meant a query matching nothing\n * fell back to the full-render path and mounted the ENTIRE unfiltered array —\n * 2000 `<wr-option>` hosts, every one of them `--hidden`, behind a \"No\n * results\" line — and then tore all of them down again on the next keystroke\n * that matched. The empty window is handled where it belongs: `virtualWindow`\n * already short-circuits on `total === 0`, and `firstEnabled` / `lastEnabled`\n * already answer -1.\n */\n protected readonly virtualActive = computed<boolean>(\n () => this.virtualScroll() && this.isSearchable() && this.projectedOptions().length === 0\n );\n\n private readonly scrollTop = signal(0);\n private readonly viewportPx = signal(0);\n private readonly measuredRowPx = signal(0);\n\n /** Effective uniform row height (px). */\n protected readonly effRowH = computed(() =>\n this.rowHeight() > 0 ? this.rowHeight() : this.measuredRowPx() || WrSelect.FALLBACK_ROW_PX\n );\n\n private readonly fallbackViewportPx = computed(() => {\n const h = this.viewportHeight();\n if (typeof h === 'number') return h;\n return /^\\d+$/.test(h) ? Number(h) : WrSelect.FALLBACK_VIEWPORT_PX;\n });\n\n /** `viewportHeight` as a CSS length for the inline max-height (bare number → px). */\n protected readonly resolvedViewportHeight = computed(() => {\n const h = this.viewportHeight();\n return typeof h === 'number' || /^\\d+$/.test(h) ? `${h}px` : h;\n });\n\n /** Rendered window [start,end) + spacer pads (px). */\n protected readonly virtualWindow = computed<{ start: number; end: number; padTop: number; padBottom: number }>(() => {\n const total = this.filteredDynamicOptions().length;\n if (!this.virtualActive() || total === 0) return { start: 0, end: total, padTop: 0, padBottom: 0 };\n const h = this.effRowH();\n const vp = this.viewportPx() || this.fallbackViewportPx();\n const over = this.overscan();\n const first = Math.min(Math.floor(this.scrollTop() / h), total - 1);\n const count = Math.ceil(vp / h) + 1;\n const start = Math.max(0, first - over);\n const end = Math.min(total, first + count + over);\n return { start, end, padTop: start * h, padBottom: (total - end) * h };\n });\n\n /** The windowed slice of options, each carrying its absolute index. */\n protected readonly windowOptions = computed<readonly { item: unknown; index: number }[]>(() => {\n const { start, end } = this.virtualWindow();\n return this.filteredDynamicOptions()\n .slice(start, end)\n .map((item, k) => ({ item, index: start + k }));\n });\n\n /** Stable id for a virtual option row at filtered index `i`. */\n protected virtualRowId(i: number): string {\n return `${this.listboxId}-vopt-${i}`;\n }\n\n /** The virtual scroll container inside the overlay panel, if attached. */\n private get vlistElement(): HTMLElement | null {\n return this.overlayRef?.overlayElement.querySelector<HTMLElement>('.wr-select-panel__vlist') ?? null;\n }\n\n /** Scroll filtered index `i` just into view (sets the `scrollTop` signal synchronously). */\n private ensureVisible(i: number): void {\n if (!this.virtualActive() || i < 0) return;\n const h = this.effRowH();\n const vp = this.viewportPx() || this.fallbackViewportPx();\n const top = i * h;\n const cur = this.scrollTop();\n let next = cur;\n if (top < cur) next = top;\n else if (top + h > cur + vp) next = top + h - vp;\n if (next !== cur) {\n this.scrollTop.set(next);\n this.vlistElement?.scrollTo({ top: next });\n }\n }\n\n /**\n * Count of registered options that pass the current search filter.\n * Hides the noResults state when the panel has at least one visible row.\n */\n protected readonly visibleCount = computed(() => {\n if (this.virtualActive()) return this.filteredDynamicOptions().length;\n const list = this.registry();\n if (!this.isSearchable() || !this.clientFilter()) return list.length;\n const q = this.searchQuery().trim().toLowerCase();\n if (!q) return list.length;\n let count = 0;\n for (const o of list) {\n if (o.getLabel().toLowerCase().includes(q)) count++;\n }\n return count;\n });\n\n /**\n * Whether the panel may be open at all. `minChars` is documented as the\n * \"minimum query length before the panel OPENS\", and nothing gated the open —\n * so a picker with `[minChars]=\"3\"` popped a panel on focus and showed an empty\n * bordered box for the first two keystrokes (with the \"no results\" row itself\n * gated on the same threshold, there was nothing in it to explain the box).\n */\n protected readonly meetsMinChars = computed(\n () => !this.isSearchable() || this.searchQuery().trim().length >= this.minChars()\n );\n\n /** Search mode: show \"no results\" when the panel has nothing to offer. */\n protected readonly hasNoResults = computed(() => {\n if (!this.isSearchable() || !this.open() || this.isLoading()) return false;\n if (this.searchQuery().trim().length < this.minChars()) return false;\n return this.visibleCount() === 0;\n });\n\n /** Search mode: is this option hidden by the current query? @internal */\n private isOptionHidden(label: string): boolean {\n if (!this.isSearchable() || !this.clientFilter()) return false;\n const q = this.searchQuery().trim().toLowerCase();\n if (!q) return false;\n return !label.toLowerCase().includes(q);\n }\n\n protected readonly panelTpl = viewChild.required('panelTpl', { read: TemplateRef });\n\n /** The inline input inside a chip trigger — tag mode or a searchable multi. @internal */\n protected readonly tagInputEl = viewChild<ElementRef<HTMLInputElement>>('tagInput');\n\n /** Search-mode inline input. Present only when `mode=\"search\"`. @internal */\n protected readonly searchInputEl = viewChild<ElementRef<HTMLInputElement>>('searchInput');\n\n protected focusTagInput(): void {\n this.tagInputEl()?.nativeElement.focus();\n }\n\n protected focusSearchInput(): void {\n this.searchInputEl()?.nativeElement.focus();\n }\n\n // Chip-trigger input dispatch. One inline input, two owners: tag mode\n // commits a draft into chips, a searchable multi filters the panel.\n\n protected onChipsInput(event: Event): void {\n if (this.hasChipSearch()) this.onSearchInput(event);\n else this.onTagInput(event);\n }\n\n protected onChipsKeydown(event: KeyboardEvent): void {\n if (this.hasChipSearch()) this.onSearchKey(event);\n else this.onTagKeydown(event);\n }\n\n protected onChipsFocus(): void {\n // Tag mode has no panel to open.\n if (this.hasChipSearch()) this.onSearchFocus();\n }\n\n protected onChipsPaste(event: ClipboardEvent): void {\n // Splitting a paste into chips is tag-mode behaviour; a search query is\n // pasted as-is.\n if (!this.hasChipSearch()) this.onTagPaste(event);\n }\n\n protected onChipsBlur(): void {\n if (this.hasChipSearch()) this.touch.emit();\n else this.onTagBlur();\n }\n\n // Search-mode handlers\n\n protected onSearchInput(event: Event): void {\n if (this.isDisabled() || this.isReadonly()) return;\n const value = (event.target as HTMLInputElement).value;\n this.searchQuery.set(value);\n if (this.meetsMinChars()) {\n if (!this.open()) this.open.set(true);\n } else if (this.open()) {\n this.open.set(false);\n }\n // A new filter invalidates every index, so re-seed the cursor onto the first\n // option that still matches. This must happen on BOTH paths: on the\n // projected-`<wr-option>` path the registry keeps filtered-out options (they\n // only self-hide via CSS), so a stale `activeIndex` would leave the cursor on\n // a row the user can no longer see — and Enter would select it.\n this.activeIndex.set(this.firstEnabled());\n if (this.virtualActive()) {\n this.scrollTop.set(0);\n this.vlistElement?.scrollTo({ top: 0 });\n }\n }\n\n protected onSearchFocus(): void {\n if (this.isDisabled()) return;\n // Focus is tracked even while read-only — the field still takes it, and\n // `searchDisplay()` keys off it — but nothing opens.\n this.searchHasFocus.set(true);\n if (this.isReadonly()) return;\n if (!this.meetsMinChars()) return;\n if (!this.open()) {\n this.seedActiveIndex();\n this.open.set(true);\n }\n }\n\n protected onSearchBlur(): void {\n this.searchHasFocus.set(false);\n // Leaving the field is what makes a below-threshold query stale, so this is\n // where the panel-close reset would have run if it could have waited.\n if (!this.open() && this.isSearchable()) this.searchQuery.set('');\n this.touch.emit();\n }\n\n protected onSearchKey(event: KeyboardEvent): void {\n // freeText: Enter on an unmatched query commits the typed string\n // as the value. Skips when an active option is highlighted (the\n // normal Enter-selects behaviour wins).\n if (event.key === 'Enter' && this.freeText() && this.open()) {\n const q = this.searchQuery().trim();\n const idx = this.activeIndex();\n const list = this.orderedRegistry();\n const hasActive = this.virtualActive()\n ? idx >= 0 && idx < this.filteredDynamicOptions().length\n : idx >= 0 && idx < list.length && !list[idx].disabled && !this.isOptionHidden(list[idx].getLabel());\n if (!hasActive && q) {\n event.preventDefault();\n this.value.set(q);\n this.touch.emit();\n this.open.set(false);\n return;\n }\n }\n // Space belongs to the text field, not to the listbox. The button trigger\n // uses it to pick the active option, but here swallowing it would make a\n // multi-word query (\"dump trucks\") impossible to type.\n if (event.key === ' ') return;\n\n // Backspace on an empty query drops the last chip, matching tag mode. The\n // button-trigger path only does this while closed, and a chip-search input\n // keeps the panel open, so it never reaches that branch.\n if (event.key === 'Backspace' && this.hasChipSearch() && this.searchQuery() === '' && this.hasSelection()) {\n const chips = this.selectedChips();\n if (chips.length > 0) {\n event.preventDefault();\n this.removeChip(chips.length - 1, event);\n return;\n }\n }\n\n // The same key, for the searchable SINGLE: Backspace on an empty field is\n // its clear control. Every other mode could already undo a selection from\n // the keyboard — the chip modes above, the button trigger one chip per\n // Backspace — while here the × was the only way out, and it is a\n // `tabindex=\"-1\"` span no key can reach. A function offered by pointer\n // alone is a WCAG 2.1.1 failure, not a missing convenience.\n //\n // Gated on `clearable()` because that input IS the clear control: a consumer\n // who turned the × off did not ask for a keyboard twin of it. Gated on the\n // FIELD being empty rather than on `searchQuery()`, which is not the same\n // question — under `[minChars]` a collapsed field shows the selected label\n // while the query is still '', and backspacing over that text has always\n // started a query rather than thrown the selection away.\n if (\n event.key === 'Backspace' &&\n !this.hasChipSearch() &&\n this.clearable() &&\n this.hasSelection() &&\n (event.target as HTMLInputElement | null)?.value === ''\n ) {\n event.preventDefault();\n this.clearAll(event);\n return;\n }\n\n // Otherwise route through the same keyboard plumbing as the button trigger.\n this.onTriggerKey(event);\n }\n\n /**\n * Display text for the search input. Shows the selected option's\n * label when collapsed, or the live query while typing / panel open.\n * @internal\n */\n protected readonly searchDisplay = computed(() => {\n // FOCUS as well as open, and that second term is the whole `[minChars]`\n // story. Backspacing under the threshold closes the panel, and falling back\n // to the selected label the moment `open()` goes false rewrote the field\n // out from under someone who was still typing — \"sma\" -> \"sm\" showed an\n // empty box.\n //\n // A NON-EMPTY query, though: picking an option clears it and leaves focus\n // in the field, and there the label is what belongs on screen.\n if (this.open()) return this.searchQuery();\n if (this.searchHasFocus() && this.searchQuery() !== '') return this.searchQuery();\n return this.selectedLabel() ?? '';\n });\n\n /**\n * Whether the search field holds focus.\n *\n * Read by `searchDisplay`, so it has to be a signal — and it is also what\n * lets the panel-close effect tell \"the user walked away\" (reset the query)\n * from \"the query dropped under `minChars` and they are still typing\" (keep\n * it).\n */\n private readonly searchHasFocus = signal(false);\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly overlay = inject(WR_OVERLAY);\n private readonly outsideClick = inject(WrOutsideClick);\n private readonly responsiveConfig = inject(WR_RESPONSIVE_OVERLAYS);\n private readonly vcr = inject(ViewContainerRef);\n private readonly scrollStrategies = inject(ScrollStrategyOptions);\n private readonly destroyRef = inject(DestroyRef);\n private readonly platformId = inject(PLATFORM_ID);\n private overlayRef: OverlayRef | null = null;\n\n constructor() {\n // A component destroyed while the panel is open takes its overlay with it.\n // Without this the pane stays in the CDK container forever, and in sheet\n // mode the block scroll strategy is never released, so the page can no\n // longer scroll at all.\n this.destroyRef.onDestroy(() => this.closeOverlay());\n\n // Close the panel if the control goes read-only or disabled while it is up —\n // a panel whose every row now refuses the click is a trap, not a view.\n effect(() => {\n if (this.isDisabled() || this.isReadonly()) this.open.set(false);\n });\n\n effect(() => {\n if (this.open()) {\n this.openOverlay();\n } else {\n this.closeOverlay();\n // Reset the search query when the panel closes so a re-open doesn't\n // carry a stale filter — but NOT while the field still has focus.\n //\n // With `[minChars]`, backspacing under the threshold closes the panel\n // (`onSearchInput`), and `searchDisplay` falls back to the selected\n // label the moment `open()` is false — so an unconditional reset here\n // erased what the user was still typing, mid-word. A query the user is\n // actively editing is not stale.\n if (this.isSearchable() && !this.searchHasFocus()) this.searchQuery.set('');\n }\n });\n\n // One debounced query stream feeds both the async loader and the public\n // `searchChange` output, so they fire on exactly the same cadence.\n // `debounce(() => timer(...))` rather than `debounceTime(this.debounceMs())`:\n // this runs in the constructor, where inputs aren't bound yet, so reading\n // the input eagerly would pin the delay to the default and ignore\n // `[debounceMs]` forever.\n // `skip(1)` sits BEFORE the debounce so it drops the mount-time replay of the\n // empty query and nothing else. Downstream of `debounce` it would instead\n // drop the first *settled* emission — and when a fast typist's first\n // keystrokes coalesce with that initial `''`, the dropped emission is their\n // query, not the replay.\n const debouncedQuery = toObservable(this.searchQuery).pipe(\n skip(1),\n debounce(() => timer(this.debounceMs()))\n );\n\n debouncedQuery.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(query => {\n if (this.isSearchable()) this.searchChange.emit(query);\n });\n\n // Async loader pipeline (searchable selects only). `switchMap` cancels\n // in-flight requests when a new keystroke arrives.\n debouncedQuery\n .pipe(\n switchMap(query => {\n const loader = this.loader();\n if (!loader || !this.isSearchable() || query.length < this.minChars()) {\n this.loaderLoading.set(false);\n return of<readonly unknown[]>([]);\n }\n this.loaderLoading.set(true);\n // `defer` so the loader CALL is part of the inner observable too. Called\n // out here, a loader that throws SYNCHRONOUSLY throws from switchMap's\n // project function, which rxjs routes straight to the destination — past\n // the `catchError` below and past `finalize`, so the flag raised on the\n // line above would stay up for good.\n const source = defer((): Observable<readonly unknown[]> => {\n const result = loader(query);\n return isObservable(result) ? result : from(Promise.resolve(result));\n });\n return source.pipe(\n // A loader can hand back a long-lived observable (a store selector,\n // say) that emits and never completes — so the first value lowers the\n // flag. `finalize` still covers completion, errors and cancellation,\n // including a loader that completes without emitting.\n tap(() => this.loaderLoading.set(false)),\n // INSIDE the projection, which is the whole point: an error allowed to\n // reach the outer subscriber closes the subscription for good, and the\n // select then never calls the loader again for the life of the\n // component — silently, since nothing here has an error callback. Kept\n // inside, one failed request costs that query and nothing else.\n // Reported as \"no results\" rather than as an error row: the panel has\n // no error state, and stale results for a query two keystrokes old\n // would read as an answer to the current one.\n catchError(() => of<readonly unknown[]>([])),\n finalize(() => this.loaderLoading.set(false))\n );\n }),\n takeUntilDestroyed(this.destroyRef)\n )\n .subscribe(items => this.loadedOptions.set(items));\n\n // Resolve the single-mode trigger label whenever the value or\n // options change. Multi mode reads `selectedChips` instead and\n // doesn't need this.\n effect(() => {\n const v = this.value();\n const list = this.registry();\n if (this.isMulti()) {\n this.selectedLabel.set(null);\n return;\n }\n const match = list.find(o => o.value === v);\n if (match) {\n this.selectedLabel.set(match.getLabel());\n return;\n }\n // Search mode: a value picked from a virtualized (or since-unmounted) row\n // has no registered `<wr-option>`, so derive its label from `displayWith`\n // — the same function that rendered the row.\n this.selectedLabel.set(v != null && this.isSearchable() ? this.displayWith()(v) : null);\n });\n\n // Wire the virtual scroll listener + viewport/row measurement while the panel\n // is open and virtualized. Re-runs when the panel opens/closes or the virtual\n // list mounts/unmounts; the microtask defers the DOM read until the overlay\n // portal is attached. Browser-only — the panel never prerenders (overlay).\n effect(onCleanup => {\n if (!isPlatformBrowser(this.platformId)) return;\n if (!this.open() || !this.virtualActive()) return;\n let raf = 0;\n let ro: ResizeObserver | null = null;\n let el: HTMLElement | null = null;\n const onScroll = (): void => {\n if (raf) return;\n raf = requestAnimationFrame(() => {\n raf = 0;\n if (el) this.scrollTop.set(el.scrollTop);\n });\n };\n queueMicrotask(() => {\n el = this.vlistElement;\n if (!el) return;\n this.viewportPx.set(el.clientHeight);\n if (this.rowHeight() === 0) {\n const h = el.querySelector<HTMLElement>('.wr-option')?.offsetHeight ?? 0;\n if (h > 0) this.measuredRowPx.set(h);\n }\n // Re-seed the scroll with the now-measured row height + real viewport so\n // a deep pre-selected active row lands correctly on first open (the seed\n // before open used the fallback height). No-op when it's already in view.\n this.ensureVisible(this.activeIndex());\n // Sync the freshly-attached element to the retained signal — seeds the\n // scroll to the active option and avoids a blank panel on reopen.\n if (el.scrollTop !== this.scrollTop()) el.scrollTop = this.scrollTop();\n el.addEventListener('scroll', onScroll, { passive: true });\n if (typeof ResizeObserver !== 'undefined') {\n ro = new ResizeObserver(() => {\n if (el) this.viewportPx.set(el.clientHeight);\n });\n ro.observe(el);\n }\n });\n onCleanup(() => {\n if (raf) cancelAnimationFrame(raf);\n if (el) el.removeEventListener('scroll', onScroll);\n ro?.disconnect();\n });\n });\n }\n\n // WrSelectContext\n\n isSelected(value: unknown): boolean {\n if (this.isMulti()) return this.asArray(this.value()).includes(value);\n return this.value() === value;\n }\n\n selectOption(value: unknown): void {\n // The panel cannot open while read-only, but `selectOption` is reachable\n // from `WrSelectContext` — a projected `<wr-option>` calls it directly — so\n // the guard belongs on the write, not only on the way in.\n if (this.isReadonly()) return;\n if (this.isMulti()) {\n const current = this.asArray(this.value());\n const idx = current.indexOf(value);\n let next: readonly unknown[];\n if (idx >= 0) {\n next = [...current.slice(0, idx), ...current.slice(idx + 1)];\n } else {\n const cap = this.maxItems();\n if (cap > 0 && current.length >= cap) return;\n next = [...current, value];\n }\n this.value.set(next);\n this.touch.emit();\n // Keep the panel open in multi mode so the user can keep picking.\n return;\n }\n this.value.set(value);\n this.touch.emit();\n // A committed choice replaces the query, focus or no focus: the field goes\n // back to showing the selected label. The close-effect below deliberately\n // will not do it while the field is focused, which is right for a panel\n // that closed under `minChars` and wrong for one that closed on a pick.\n this.searchQuery.set('');\n this.open.set(false);\n }\n\n registerOption(reg: WrSelectOptionRegistration): () => void {\n this.registry.update(list => [...list, reg]);\n return () => this.registry.update(list => list.filter(o => o.id !== reg.id));\n }\n\n // Chip handlers (multi + tag)\n\n /**\n * Remove one selection (chip × button) BY POSITION. Works for multi and tag\n * modes.\n *\n * Positional, not by value: under `allowDuplicates` two chips carry the same\n * string, and a filter on equality deleted every copy at once — one click on\n * the second \"red\" took both reds with it. `visibleChips()` slices the HEAD\n * of `selectedChips()`, which maps the value array one for one, so the\n * `$index` a chip was rendered with indexes the value array directly. The\n * multi-mode toggle in `selectOption` was already positional.\n */\n protected removeChip(index: number, event: Event): void {\n event.stopPropagation();\n if (this.isDisabled() || this.isReadonly() || !this.hasChips()) return;\n const current = this.asArray(this.value());\n if (index < 0 || index >= current.length) return;\n this.value.set([...current.slice(0, index), ...current.slice(index + 1)]);\n this.touch.emit();\n }\n\n /** Clear every selection (× button). Multi/tag → empty array; search → null. */\n protected clearAll(event: Event): void {\n event.stopPropagation();\n if (this.isDisabled() || this.isReadonly()) return;\n if (this.hasChips()) {\n this.value.set([]);\n // `isSearchTrigger()`, not `isSearch()` — a searchable single renders the\n // same × and would otherwise fall through to the no-op below.\n } else if (this.isSearchTrigger()) {\n this.value.set(null);\n this.searchQuery.set('');\n } else {\n return;\n }\n this.touch.emit();\n }\n\n // Tag-mode draft handlers\n\n /** Capacity check used by tag mode to refuse the next add. */\n protected readonly atCapacity = computed(() => {\n const cap = this.maxItems();\n return cap > 0 && this.asArray(this.value()).length >= cap;\n });\n\n protected onTagInput(event: Event): void {\n if (this.isDisabled() || this.isReadonly()) return;\n this.draft.set((event.target as HTMLInputElement).value);\n }\n\n protected onTagKeydown(event: KeyboardEvent): void {\n if (this.isDisabled() || this.isReadonly()) return;\n const seps = this.separators();\n\n if (seps.includes(event.key)) {\n event.preventDefault();\n this.commitDraft();\n return;\n }\n\n if (event.key === 'Backspace' && this.draft() === '') {\n const chips = this.selectedChips();\n if (chips.length > 0) {\n event.preventDefault();\n this.removeChip(chips.length - 1, event);\n }\n }\n }\n\n protected onTagPaste(event: ClipboardEvent): void {\n if (this.isDisabled() || this.isReadonly()) return;\n const text = event.clipboardData?.getData('text') ?? '';\n if (!text) return;\n\n const seps = this.separators().filter(s => s !== 'Enter');\n if (seps.length === 0) return;\n\n event.preventDefault();\n // `-` has to be escaped too, and it is the one that bites: unescaped it\n // OPENS A RANGE inside the class. `[',', '-']` compiled to `/[,-\\n]+/` —\n // \"Range out of order\", a SyntaxError thrown after `preventDefault()`, so\n // the paste was dropped whole; `[',', '-', ';']` compiled without\n // complaint to a `,`–`;` range that swallowed every digit, shredding\n // `2024-01-02` into nothing. A lone `-` only worked because it landed\n // first in the class, where it is literal — position-dependent luck.\n const escaped = seps.map(s => s.replace(/[-.*+?^${}()|[\\]\\\\]/g, '\\\\$&')).join('');\n const splitRegex = new RegExp(`[${escaped}\\\\n]+`);\n for (const part of text.split(splitRegex)) this.tryAddTag(part);\n }\n\n protected onTagBlur(): void {\n if (this.draft().trim()) this.commitDraft();\n this.touch.emit();\n }\n\n private commitDraft(): void {\n const v = this.draft().trim();\n this.draft.set('');\n if (v) this.tryAddTag(v);\n }\n\n private tryAddTag(raw: string): void {\n if (!this.isTag() || this.atCapacity()) return;\n const value = raw.trim();\n if (!value) return;\n\n const existing = this.asArray(this.value()).map(String);\n if (!this.allowDuplicates() && existing.includes(value)) return;\n\n const validator = this.validate();\n if (validator && !validator(value, existing)) return;\n\n const next = [...existing, value];\n this.value.set(next);\n this.touch.emit();\n }\n\n // Template handlers\n\n protected onTriggerClick(): void {\n if (this.isDisabled() || this.isReadonly()) return;\n // Tag mode has no panel — clicks should land on the inline input,\n // not toggle an overlay that's never created.\n if (this.isTag()) return;\n this.open.update(v => !v);\n }\n\n protected onTriggerKey(event: KeyboardEvent): void {\n if (this.isDisabled() || this.isReadonly()) return;\n\n if (!this.open()) {\n if (event.key === 'Enter' || event.key === ' ' || event.key === 'ArrowDown' || event.key === 'ArrowUp') {\n event.preventDefault();\n this.seedActiveIndex();\n this.open.set(true);\n return;\n }\n // Multi mode: Backspace on closed trigger removes last chip. Tag\n // mode has its own input handler — never reaches this branch. A\n // searchable multi does, so only claim Backspace once its query is empty\n // — otherwise it would eat a chip and a character at once.\n if (\n event.key === 'Backspace' &&\n this.isMulti() &&\n this.hasSelection() &&\n (!this.hasChipSearch() || this.searchQuery() === '')\n ) {\n event.preventDefault();\n const chips = this.selectedChips();\n if (chips.length > 0) this.removeChip(chips.length - 1, event);\n }\n return;\n }\n\n // Open — navigation/selection.\n switch (event.key) {\n case 'Tab':\n // Let focus leave naturally — no `preventDefault` — but do not let the panel\n // outlive it. Nothing closed on Tab, so the listbox stayed on screen with a\n // live `aria-activedescendant` while the combobox no longer had focus: it can\n // cover the control that just took it (WCAG 2.4.11), and it keeps tracking a\n // trigger nobody is on, so a click aimed at what is underneath lands on an\n // option and commits into a select the user had already left. `wr-dropdown`\n // and `wr-context-menu` close on Tab for the same reason.\n //\n // Closing does NOT commit the active option. The cursor is SEEDED on open, so\n // tabbing straight through would select a row the user never looked at — and\n // in multi / search / freeText modes there is no single \"the option\" to take.\n this.open.set(false);\n break;\n case 'ArrowDown':\n event.preventDefault();\n this.moveActive(1);\n break;\n case 'ArrowUp':\n event.preventDefault();\n this.moveActive(-1);\n break;\n case 'Home':\n event.preventDefault();\n this.activeIndex.set(this.firstEnabled());\n this.ensureVisible(this.activeIndex());\n break;\n case 'End':\n event.preventDefault();\n this.activeIndex.set(this.lastEnabled());\n this.ensureVisible(this.activeIndex());\n break;\n case 'Enter':\n case ' ': {\n event.preventDefault();\n const idx = this.activeIndex();\n if (this.virtualActive()) {\n // Virtual rows aren't in the DOM to click — select the value directly.\n const list = this.filteredDynamicOptions();\n if (idx >= 0 && idx < list.length) this.selectOption(list[idx]);\n break;\n }\n const list = this.orderedRegistry();\n // Filtered-out options stay registered (they only self-hide via CSS), so\n // the hidden check is load-bearing: without it Enter can commit a row\n // that is not on screen.\n if (idx >= 0 && idx < list.length && !list[idx].disabled && !this.isOptionHidden(list[idx].getLabel())) {\n const id = list[idx].id;\n const el = this.overlayRef?.overlayElement.querySelector<HTMLElement>(`#${CSS.escape(id)}`);\n el?.click();\n }\n break;\n }\n default:\n break;\n }\n }\n\n private seedActiveIndex(): void {\n if (this.virtualActive()) {\n const list = this.filteredDynamicOptions();\n const idx = list.findIndex(it => this.isSelected(it));\n this.activeIndex.set(idx >= 0 ? idx : this.firstEnabled());\n this.ensureVisible(this.activeIndex());\n return;\n }\n const list = this.orderedRegistry();\n let selectedIdx = -1;\n if (this.isMulti()) {\n const arr = this.asArray(this.value());\n if (arr.length > 0) selectedIdx = list.findIndex(o => o.value === arr[0]);\n } else {\n selectedIdx = list.findIndex(o => o.value === this.value());\n }\n this.activeIndex.set(selectedIdx >= 0 ? selectedIdx : this.firstEnabled());\n }\n\n private moveActive(delta: number): void {\n // Virtual rows are never disabled or hidden (the list is already filtered),\n // so navigation is a plain wrap plus a scroll-into-view.\n if (this.virtualActive()) {\n const len = this.filteredDynamicOptions().length;\n if (len === 0) return;\n const i = (this.activeIndex() + delta + len) % len;\n this.activeIndex.set(i);\n this.ensureVisible(i);\n return;\n }\n const list = this.orderedRegistry();\n if (list.length === 0) return;\n let i = this.activeIndex();\n let attempts = list.length;\n while (attempts-- > 0) {\n i = (i + delta + list.length) % list.length;\n const o = list[i];\n if (!o.disabled && !this.isOptionHidden(o.getLabel())) {\n this.activeIndex.set(i);\n return;\n }\n }\n }\n\n /**\n * Both scan `orderedRegistry`, and that is not interchangeable with\n * `registry`.\n *\n * They RETURN an index, and every reader of `activeIndex` — `activeOptionId`,\n * `moveActive`, `seedActiveIndex`, the Enter branch of `onTriggerKey` —\n * resolves it against DOM order. Scanning creation order here produced an\n * index into the other list: with projected `<wr-option>` children next to\n * `[options]` rows the two differ, so opening or searching left the cursor on\n * a row the user was not looking at, and Enter committed whatever happened to\n * sit at that position in DOM order — a filter-hidden option, which commits\n * nothing at all.\n */\n private firstEnabled(): number {\n if (this.virtualActive()) return this.filteredDynamicOptions().length > 0 ? 0 : -1;\n return this.orderedRegistry().findIndex(o => !o.disabled && !this.isOptionHidden(o.getLabel()));\n }\n\n private lastEnabled(): number {\n if (this.virtualActive()) return this.filteredDynamicOptions().length - 1;\n const list = this.orderedRegistry();\n let found = -1;\n list.forEach((o, i) => {\n if (!o.disabled && !this.isOptionHidden(o.getLabel())) found = i;\n });\n return found;\n }\n\n /** Coerce the multi-mode value into an array (tolerates a scalar or null write). */\n private asArray(value: unknown): readonly unknown[] {\n if (Array.isArray(value)) return value as readonly unknown[];\n if (value == null) return [];\n return [value];\n }\n\n // Overlay\n\n private openOverlay(): void {\n if (this.overlayRef) return;\n\n // On small viewports (when opted in) detach from the trigger and present\n // the panel as a full-width slide-up sheet pinned to the bottom edge.\n const asSheet = wrPresentAsSheet(this.responsive(), this.responsiveConfig);\n\n const positionStrategy = asSheet\n ? this.overlay.position().global().centerHorizontally().bottom('0')\n : this.overlay\n .position()\n .flexibleConnectedTo(this.host)\n .withPositions([\n { originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top' },\n { originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom' },\n ])\n .withPush(true);\n\n this.overlayRef = this.overlay.create({\n positionStrategy,\n scrollStrategy: asSheet ? this.scrollStrategies.block() : this.scrollStrategies.reposition(),\n // Floor the panel at the trigger width (it can still grow for long\n // options) instead of pinning it. The panel fills this via `width: 100%`,\n // so the flex overlay pane has no transparent gutter beside a\n // content-narrow panel — that gutter would otherwise sit \"inside\" the\n // overlay and swallow outside-clicks, leaving the panel open. Mirrors how\n // mat-select sizes its overlay.\n width: asSheet ? '100%' : undefined,\n minWidth: asSheet ? undefined : this.host.nativeElement.getBoundingClientRect().width,\n hasBackdrop: asSheet,\n // `wr-overlay-backdrop`, not a name of our own: that class is what carries\n // the dim and the blur (overlay/styles), and this stylesheet already\n // imports it for exactly this. A custom class also REPLACES the CDK\n // default, so the sheet had an invisible scrim that still ate clicks.\n backdropClass: asSheet ? 'wr-overlay-backdrop' : undefined,\n panelClass: asSheet ? ['wr-select-overlay', 'wr-overlay-sheet'] : 'wr-select-overlay',\n });\n\n const portal = new TemplatePortal(this.panelTpl(), this.vcr);\n this.overlayRef.attach(portal);\n\n if (asSheet) {\n this.overlayRef\n .backdropClick()\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => this.open.set(false));\n }\n\n this.outsideClick\n .outsidePointerEvents(this.overlayRef)\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(event => {\n if (this.host.nativeElement.contains(event.target as Node)) return;\n this.open.set(false);\n });\n\n this.overlayRef\n .keydownEvents()\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(event => {\n if (event.key === 'Escape') {\n event.preventDefault();\n this.open.set(false);\n }\n });\n }\n\n private closeOverlay(): void {\n if (!this.overlayRef) return;\n this.overlayRef.dispose();\n this.overlayRef = null;\n }\n}\n","@if (isSearchTrigger()) {\n <!-- Search mode (or a searchable single): a real text input drives a filtered\n overlay panel. The wrapper isn't itself focusable — the input is the\n tabstop. -->\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events,@angular-eslint/template/interactive-supports-focus -->\n <div class=\"wr-select__trigger wr-select__trigger--search\" (click)=\"focusSearchInput()\">\n <!-- `id` / `aria-describedby` / `aria-invalid` come from a surrounding\n `<wr-form-field>` and are null without one — see `controlId` in the\n component. They go on the tab stop, the only labelable element here. -->\n <input\n #searchInput\n type=\"text\"\n role=\"combobox\"\n class=\"wr-select__search-input\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n [attr.id]=\"controlId()\"\n [attr.aria-describedby]=\"describedBy()\"\n [attr.aria-invalid]=\"ariaInvalid()\"\n [disabled]=\"isDisabled()\"\n [attr.aria-haspopup]=\"'listbox'\"\n [attr.aria-expanded]=\"open()\"\n [attr.aria-controls]=\"listboxId\"\n [attr.aria-activedescendant]=\"open() ? activeOptionId() || null : null\"\n [attr.aria-readonly]=\"isReadonly() || null\"\n [readonly]=\"isReadonly()\"\n [placeholder]=\"resolvedPlaceholder()\"\n [value]=\"searchDisplay()\"\n (input)=\"onSearchInput($event)\"\n (focus)=\"onSearchFocus()\"\n (keydown)=\"onSearchKey($event)\"\n (blur)=\"onSearchBlur()\"\n />\n <!-- Pointer-only, and the `keydown.enter` / `keydown.space` pair this used to\n carry was dead code rather than the keyboard path it looked like: the ×\n is `tabindex=\"-1\"` with no roving owner, so no key event ever originates\n here to bubble into a handler. It stays unfocusable because the same\n span sits inside the BUTTON trigger further down, where a focusable\n child is `nested-interactive` — the defect the window taskbar's close\n button already taught this repo. The keyboard reaches the function\n instead: Backspace on the empty field, which `onSearchKey` routes to\n `clearAll` for a single and to the last chip for a multi. -->\n @if (clearable() && hasSelection() && !isDisabled() && !isReadonly()) {\n <span\n class=\"wr-select__clear\"\n role=\"button\"\n [attr.aria-label]=\"resolvedClear()\"\n tabindex=\"-1\"\n (click)=\"clearAll($event)\"\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=\"M18 6 6 18\" />\n <path d=\"m6 6 12 12\" />\n </svg>\n </span>\n }\n <svg\n class=\"wr-icon__svg wr-select__chevron\"\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=\"m6 9 6 6 6-6\" />\n </svg>\n </div>\n} @else if (isTag() || hasChipSearch()) {\n <!-- Chip trigger — tag mode, or a searchable multi. A focusable input lives\n inside, so the wrapper itself only exists to host chips and forward\n whitespace clicks to the input. Tag mode needs no role (users tab\n straight into the input); the searchable multi is a real combobox, so it\n carries the listbox wiring. The click handler is a mouse-only\n convenience. -->\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events,@angular-eslint/template/interactive-supports-focus -->\n <div\n class=\"wr-select__trigger wr-select__trigger--tag\"\n [attr.aria-disabled]=\"isDisabled() || null\"\n (click)=\"focusTagInput()\"\n >\n <span class=\"wr-select__chips\">\n @for (chip of visibleChips(); track $index) {\n <span class=\"wr-select__chip\">\n <span class=\"wr-select__chip-label\">{{ chip.label }}</span>\n @if (!isReadonly()) {\n <span\n class=\"wr-select__chip-remove\"\n role=\"button\"\n [attr.aria-label]=\"chipRemoveLabel({ label: chip.label })\"\n tabindex=\"-1\"\n (click)=\"removeChip($index, $event)\"\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=\"M18 6 6 18\" />\n <path d=\"m6 6 12 12\" />\n </svg>\n </span>\n }\n </span>\n }\n @if (hiddenChipCount(); as extra) {\n <span class=\"wr-select__chip wr-select__chip--more\">{{ moreLabel({ count: extra }) }}</span>\n }\n <!-- At `maxItems` this input goes READONLY, never disabled: it is the only\n tab stop in the whole control (the chip × and the clear button are\n `tabindex=\"-1\"` spans), so disabling it left a full tag select with\n nothing focusable at all — and Backspace on an empty draft, the one\n keyboard way back UNDER the cap, is bound to this very element. It was\n never needed as enforcement either: `tryAddTag` already refuses past\n capacity. -->\n <input\n #tagInput\n type=\"text\"\n class=\"wr-select__tag-input\"\n autocomplete=\"off\"\n [attr.id]=\"controlId()\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-describedby]=\"describedBy()\"\n [attr.aria-invalid]=\"ariaInvalid()\"\n spellcheck=\"false\"\n [value]=\"hasChipSearch() ? searchQuery() : draft()\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"isReadonly() || (isTag() && atCapacity())\"\n [attr.aria-readonly]=\"hasChipSearch() && isReadonly() ? true : null\"\n [placeholder]=\"hasSelection() ? '' : resolvedPlaceholder()\"\n [attr.role]=\"hasChipSearch() ? 'combobox' : null\"\n [attr.aria-haspopup]=\"hasChipSearch() ? 'listbox' : null\"\n [attr.aria-expanded]=\"hasChipSearch() ? open() : null\"\n [attr.aria-controls]=\"hasChipSearch() ? listboxId : null\"\n [attr.aria-activedescendant]=\"hasChipSearch() && open() ? activeOptionId() || null : null\"\n (input)=\"onChipsInput($event)\"\n (keydown)=\"onChipsKeydown($event)\"\n (paste)=\"onChipsPaste($event)\"\n (focus)=\"onChipsFocus()\"\n (blur)=\"onChipsBlur()\"\n />\n </span>\n\n @if (clearable() && hasSelection() && !isDisabled() && !isReadonly()) {\n <span\n class=\"wr-select__clear\"\n role=\"button\"\n [attr.aria-label]=\"resolvedClear()\"\n tabindex=\"-1\"\n (click)=\"clearAll($event)\"\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=\"M18 6 6 18\" />\n <path d=\"m6 6 12 12\" />\n </svg>\n </span>\n }\n </div>\n} @else {\n <button\n type=\"button\"\n class=\"wr-select__trigger\"\n role=\"combobox\"\n [attr.id]=\"controlId()\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-describedby]=\"describedBy()\"\n [attr.aria-invalid]=\"ariaInvalid()\"\n [disabled]=\"isDisabled()\"\n [attr.aria-haspopup]=\"'listbox'\"\n [attr.aria-expanded]=\"open()\"\n [attr.aria-controls]=\"listboxId\"\n [attr.aria-activedescendant]=\"open() ? activeOptionId() || null : null\"\n [attr.aria-readonly]=\"isReadonly() || null\"\n (click)=\"onTriggerClick()\"\n (keydown)=\"onTriggerKey($event)\"\n (blur)=\"touch.emit()\"\n >\n @if (isMulti()) {\n @if (hasSelection()) {\n <span class=\"wr-select__chips\">\n @for (chip of visibleChips(); track $index) {\n <span class=\"wr-select__chip\">\n <span class=\"wr-select__chip-label\">{{ chip.label }}</span>\n @if (!isReadonly()) {\n <span\n class=\"wr-select__chip-remove\"\n role=\"button\"\n [attr.aria-label]=\"chipRemoveLabel({ label: chip.label })\"\n tabindex=\"-1\"\n (click)=\"removeChip($index, $event)\"\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=\"M18 6 6 18\" />\n <path d=\"m6 6 12 12\" />\n </svg>\n </span>\n }\n </span>\n }\n @if (hiddenChipCount(); as extra) {\n <span class=\"wr-select__chip wr-select__chip--more\">{{ moreLabel({ count: extra }) }}</span>\n }\n </span>\n } @else {\n <span class=\"wr-select__placeholder\">{{ resolvedPlaceholder() }}</span>\n }\n } @else {\n @if (selectedLabel(); as label) {\n <span class=\"wr-select__value\">{{ label }}</span>\n } @else {\n <span class=\"wr-select__placeholder\">{{ resolvedPlaceholder() }}</span>\n }\n }\n\n @if (isMulti() && clearable() && hasSelection() && !isDisabled() && !isReadonly()) {\n <span\n class=\"wr-select__clear\"\n role=\"button\"\n [attr.aria-label]=\"resolvedClear()\"\n tabindex=\"-1\"\n (click)=\"clearAll($event)\"\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=\"M18 6 6 18\" />\n <path d=\"m6 6 12 12\" />\n </svg>\n </span>\n }\n\n <svg\n class=\"wr-icon__svg wr-select__chevron\"\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=\"m6 9 6 6 6-6\" />\n </svg>\n </button>\n}\n\n<ng-template #panelTpl>\n <div\n class=\"wr-select-panel\"\n [class.wr-select-panel--sm]=\"resolvedSize() === 'sm'\"\n [class.wr-select-panel--lg]=\"resolvedSize() === 'lg'\"\n [class.wr-select-panel--virtual]=\"virtualActive()\"\n role=\"listbox\"\n [attr.id]=\"listboxId\"\n [attr.aria-multiselectable]=\"isMulti() ? 'true' : null\"\n [attr.aria-busy]=\"isLoading() ? 'true' : null\"\n >\n <!-- `aria-busy` belongs on the listbox, not on this row: it is the container\n whose required `option` children are temporarily missing, and a global\n ARIA attribute on a role-less child makes that child an owned element the\n listbox may not own (axe `aria-required-children`, critical). Plain text\n inside the listbox is fine — only ELEMENTS are checked. -->\n @if (isLoading()) {\n <div class=\"wr-select-panel__loading\">{{ resolvedLoading() }}</div>\n }\n\n @if (virtualActive()) {\n <!-- Windowed data-array rows: plain role=\"option\" elements (not <wr-option>),\n navigated via the input's aria-activedescendant, selected by value. -->\n <div class=\"wr-select-panel__vlist\" [style.max-height]=\"resolvedViewportHeight()\">\n @if (virtualWindow().padTop > 0) {\n <div class=\"wr-select-panel__vspacer\" aria-hidden=\"true\" [style.height.px]=\"virtualWindow().padTop\"></div>\n }\n @for (entry of windowOptions(); track entry.index) {\n <!-- Keyboard handled by the search input via aria-activedescendant; the\n row is a pointer target only. -->\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events,@angular-eslint/template/interactive-supports-focus -->\n <div\n role=\"option\"\n class=\"wr-option\"\n [id]=\"virtualRowId(entry.index)\"\n [class.wr-option--active]=\"entry.index === activeIndex()\"\n [class.wr-option--selected]=\"isSelected(entry.item)\"\n [attr.aria-selected]=\"isSelected(entry.item)\"\n [attr.aria-setsize]=\"filteredDynamicOptions().length\"\n [attr.aria-posinset]=\"entry.index + 1\"\n (click)=\"selectOption(entry.item)\"\n >\n {{ displayWith()(entry.item) }}\n </div>\n }\n @if (virtualWindow().padBottom > 0) {\n <div class=\"wr-select-panel__vspacer\" aria-hidden=\"true\" [style.height.px]=\"virtualWindow().padBottom\"></div>\n }\n </div>\n } @else {\n <!-- Dynamic options from [options] or async [loader] (search mode).\n Rendered as wr-option so the standard registration / filter\n pipeline applies uniformly. -->\n @for (item of dynamicOptions(); track $index) {\n <wr-option [value]=\"item\">{{ displayWith()(item) }}</wr-option>\n }\n }\n\n <!-- Projected static options — always present (a conditional `<ng-content>`\n would drop projected content). Empty whenever `virtualActive`. -->\n <ng-content />\n\n <!-- A listbox may only own `option` and `group` children, and as a bare `<div>`\n this row was the only thing in the tree when it showed — an\n `aria-required-children` critical. It cannot move out of the listbox the\n way the command palette's does: this element IS the listbox, and the id\n the trigger's `aria-controls` names is what gives it its accessible name.\n So it announces as a disabled option instead. Keyboard navigation skips\n it for free — arrow keys walk the registered `wr-option`s, and nothing\n registers this row. -->\n @if (hasNoResults()) {\n <div class=\"wr-select-panel__empty\" role=\"option\" aria-selected=\"false\" aria-disabled=\"true\">\n {{ resolvedNoResults() }}\n </div>\n }\n </div>\n</ng-template>\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 { Component, ViewEncapsulation, input } from '@angular/core';\n\nimport { randomId } from 'ngwr/utils';\n\n/**\n * Visually groups options under a label inside a `<wr-select>`.\n *\n * @example\n * ```html\n * <wr-option-group label=\"Sizes\">\n * <wr-option value=\"sm\">Small</wr-option>\n * <wr-option value=\"md\">Medium</wr-option>\n * </wr-option-group>\n * ```\n */\n@Component({\n selector: 'wr-option-group',\n templateUrl: './option-group.html',\n encapsulation: ViewEncapsulation.None,\n host: { class: 'wr-option-group', role: 'group', '[attr.aria-labelledby]': 'labelId' },\n})\nexport class WrOptionGroup {\n /** Section heading shown above the options. */\n readonly label = input.required<string>();\n\n /**\n * `role=\"group\"` alone announces an unnamed group — the visible heading has to\n * be wired to it for the name to reach a screen reader.\n */\n protected readonly labelId = randomId('wr-option-group-label');\n}\n","<div class=\"wr-option-group__label\" [id]=\"labelId\">{{ label() }}</div>\n<ng-content />\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA;;;;;AAKG;AAuEH;;;;;AAKG;MACU,SAAS,GAAG,IAAI,cAAc,CAAkB,WAAW;;AClFxE;;;;;AAKG;AAOH,IAAI,GAAG,GAAG,CAAC;AAEX;;;;;;;;;;;AAWG;MAcU,QAAQ,CAAA;;IAEV,KAAK,GAAG,KAAK,CAAC,QAAQ;8EAAW;;IAGjC,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,qBAAqB,EAAA,CAAG;;AAG7D,IAAA,EAAE,GAAG,CAAA,UAAA,EAAa,EAAE,GAAG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eAAA,CAAA,SAAA,EAAA,CAAA;AAAb,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,aAAa,+UC5B1B,8FAEA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FD0Ba,aAAa,EAAA,UAAA,EAAA,CAAA;kBANzB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,iBAAiB,iBAEZ,iBAAiB,CAAC,IAAI,EAAA,IAAA,EAC/B,EAAE,KAAK,EAAE,iBAAiB,EAAE,IAAI,EAAE,OAAO,EAAE,wBAAwB,EAAE,SAAS,EAAE,EAAA,QAAA,EAAA,8FAAA,EAAA;;;AE1BxF;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ngwr-select.mjs","sources":["../../../projects/lib/select/tokens/select.token.ts","../../../projects/lib/select/option.ts","../../../projects/lib/select/select.ts","../../../projects/lib/select/select.html","../../../projects/lib/select/option-group.ts","../../../projects/lib/select/option-group.html","../../../projects/lib/select/ngwr-select.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 { InjectionToken, type Signal } from '@angular/core';\n\n/** Per-option registration metadata. @internal */\nexport interface WrSelectOptionRegistration {\n readonly id: string;\n readonly value: unknown;\n readonly disabled: boolean;\n /**\n * The option's text, as a signal. Options render it via `<ng-content>`, so it\n * is read back off the DOM — and it has to be reactive, because the ordinary\n * way it changes is a translation catalog landing after the first pass. A\n * plain reader let the trigger cache the English fallback forever.\n */\n readonly label: Signal<string>;\n /**\n * The option's own element, when it has one. The keyboard cursor walks the\n * registry, and registration order is CREATION order — projected children are\n * created before the panel renders its own `[options]` rows — so without this\n * the cursor moved in a different order from the one on screen. Optional: a\n * registration that cannot supply an element simply keeps its place.\n */\n readonly host?: HTMLElement;\n}\n\n/**\n * Contract a `<wr-option>` uses to talk to its parent `<wr-select>`.\n *\n * @internal\n */\nexport interface WrSelectContext {\n /**\n * Currently selected value. Single mode: `T | null`. Multi mode:\n * `readonly T[]`. Options consult {@link isSelected} instead of\n * reading this directly so the same option code works in both modes.\n */\n readonly value: Signal<unknown>;\n /** Whether the select is in multi-selection mode. */\n readonly multi: Signal<boolean>;\n /** Whether the select is disabled. */\n readonly isDisabled: Signal<boolean>;\n /** Id of the option currently highlighted by keyboard navigation. */\n readonly activeOptionId: Signal<string | null>;\n /**\n * Active search query (search mode only). Empty string when there is\n * no filter applied — options treat that as \"show me\".\n */\n readonly searchQuery: Signal<string>;\n /** True only when `mode=\"search\"`. */\n readonly isSearch: Signal<boolean>;\n /**\n * True when a filter is active — `mode=\"search\"` or `[searchable]`. Options\n * gate self-hiding on this.\n */\n readonly isSearchable: Signal<boolean>;\n /**\n * False when the option list is already query-scoped upstream (`[loader]` or\n * `[serverSearch]`), in which case options must NOT self-hide.\n */\n readonly clientFilter: Signal<boolean>;\n /** Is the given option value currently selected? Handles both single and multi. */\n isSelected(value: unknown): boolean;\n /**\n * Called when a child option is clicked. The label rides along on the\n * registration ({@link WrSelectOptionRegistration.label}), so callers don't\n * need to thread it through.\n */\n selectOption(value: unknown): void;\n /** Register an option; returns an unregister function. */\n registerOption(reg: WrSelectOptionRegistration): () => void;\n}\n\n/**\n * Token a `<wr-option>` injects to register itself with and notify its\n * parent `<wr-select>`.\n *\n * @internal\n */\nexport const WR_SELECT = new InjectionToken<WrSelectContext>('WR_SELECT');\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 { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport {\n Component,\n ElementRef,\n type Signal,\n ViewEncapsulation,\n afterEveryRender,\n computed,\n effect,\n inject,\n input,\n signal,\n} from '@angular/core';\n\nimport { WR_SELECT } from './tokens';\n\nlet uid = 0;\n\n/**\n * Single option inside a `<wr-select>`.\n *\n * The option's display label is taken from its projected text content;\n * the form value is its `value` input.\n *\n * @example\n * ```html\n * <wr-option value=\"sm\">Small</wr-option>\n * <wr-option [value]=\"42\">Forty-two</wr-option>\n * ```\n */\n@Component({\n selector: 'wr-option',\n template: '<ng-content />',\n encapsulation: ViewEncapsulation.None,\n host: {\n role: 'option',\n '[attr.id]': 'id',\n '[class]': 'classes()',\n '[attr.aria-selected]': 'selected()',\n '[attr.aria-disabled]': 'disabled() ? true : null',\n '(click)': 'onClick()',\n },\n})\nexport class WrOption {\n /** The value contributed when this option is chosen. Required. */\n readonly value = input.required<unknown>();\n\n /** Disable this option. @default false */\n readonly disabled = input(false, { transform: coerceBooleanProperty });\n\n /** Stable id used for `aria-activedescendant`. */\n readonly id = `wr-option-${++uid}`;\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly parent = inject(WR_SELECT, { optional: true });\n\n /**\n * The option's own text, as a signal — the parent's trigger label and the\n * client-side filter both read it from here.\n *\n * It has to be a signal, and a plain `textContent` read cannot be one. The\n * label is PROJECTED content: the host template decides it, and the ordinary\n * way it changes is that a `WrI18n` catalog lands a microtask after the first\n * change-detection pass (`i18n/i18n.ts` writes every loader-backed catalog\n * from `firstValueFrom(...).then(...)`). Read once and cached, a trigger sat\n * on the English fallback while the open panel beside it showed the\n * translation — visible in `wr-pagination`'s size changer, which prints\n * `pagination.perPage` into each `<wr-option>`.\n *\n * Kept in step the way `wr-divider` keeps its own projected label: an\n * `effect` and an `afterEveryRender`, and both are needed. The render hook is\n * a hard no-op under SSR, so on its own the server would emit a trigger with\n * no label at all; the effect is not gated that way and runs after the\n * content has been projected. The effect on its own cannot follow text that\n * moves later, because it reads nothing reactive to be re-run by.\n *\n * @internal\n */\n private readonly labelText = signal('');\n private readonly label: Signal<string> = this.labelText.asReadonly();\n\n /**\n * @internal — true when this option is currently selected. Works for\n * both single and multi-select parents via `WrSelectContext.isSelected`.\n */\n protected readonly selected = computed(() => {\n const parent = this.parent;\n if (!parent) return false;\n // Re-read parent's value signal so the computed recomputes on change.\n parent.value();\n return parent.isSelected(this.value());\n });\n\n /** @internal — true when this option is the keyboard cursor target. */\n protected readonly active = computed(() => this.parent?.activeOptionId() === this.id);\n\n /**\n * @internal — searchable selects only. True when the parent has a query that\n * the option's text content does not match (case-insensitive substring).\n * Hidden options stay in the DOM so registration order survives but\n * collapse via CSS.\n */\n protected readonly hidden = computed(() => {\n const parent = this.parent;\n if (!parent?.isSearchable() || !parent.clientFilter()) return false;\n const q = parent.searchQuery().trim().toLowerCase();\n if (!q) return false;\n return !this.label().toLowerCase().includes(q);\n });\n\n protected readonly classes = computed(() => {\n const parts = ['wr-option'];\n if (this.selected()) parts.push('wr-option--selected');\n if (this.active()) parts.push('wr-option--active');\n if (this.disabled()) parts.push('wr-option--disabled');\n if (this.hidden()) parts.push('wr-option--hidden');\n return parts.join(' ');\n });\n\n constructor() {\n if (this.parent) {\n const parent = this.parent;\n // Re-register when disabled or value changes so the parent has fresh metadata.\n // The label is seeded here as well, which is the read the server takes.\n effect(onCleanup => {\n this.syncLabel();\n const unreg = parent.registerOption({\n id: this.id,\n value: this.value(),\n disabled: this.disabled(),\n label: this.label,\n host: this.host.nativeElement,\n });\n onCleanup(() => unreg());\n });\n\n afterEveryRender(() => this.syncLabel());\n }\n }\n\n /**\n * Read the projected text back off the DOM. Setting the same string again is\n * a signal no-op, so the render hook costs a `textContent` read and nothing\n * else on the passes where nothing moved.\n */\n private syncLabel(): void {\n this.labelText.set(this.host.nativeElement.textContent?.trim() ?? '');\n }\n\n protected onClick(): void {\n if (this.disabled() || !this.parent) return;\n this.parent.selectOption(this.value());\n }\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 { type BooleanInput, coerceBooleanProperty, coerceNumberProperty } from '@angular/cdk/coercion';\nimport { type OverlayRef, ScrollStrategyOptions } from '@angular/cdk/overlay';\nimport { TemplatePortal } from '@angular/cdk/portal';\nimport { isPlatformBrowser } from '@angular/common';\nimport {\n Component,\n DestroyRef,\n ElementRef,\n Injector,\n PLATFORM_ID,\n TemplateRef,\n ViewContainerRef,\n ViewEncapsulation,\n afterNextRender,\n computed,\n contentChildren,\n effect,\n forwardRef,\n inject,\n input,\n model,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport { takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop';\nimport type { FormValueControl } from '@angular/forms/signals';\n\nimport {\n type Observable,\n catchError,\n debounce,\n defer,\n finalize,\n from,\n isObservable,\n of,\n skip,\n switchMap,\n tap,\n timer,\n} from 'rxjs';\n\nimport { useConfigValue } from 'ngwr/config';\nimport { WR_FORM_FIELD, useFormFieldAria } from 'ngwr/form';\nimport { useI18nFormatter, useI18nText } from 'ngwr/i18n';\nimport { WR_OVERLAY, WR_RESPONSIVE_OVERLAYS, WrOutsideClick, wrPresentAsSheet } from 'ngwr/overlay';\nimport { isComposing } from 'ngwr/utils';\n\nimport type { WrSelectMode, WrSelectSearchLoader, WrSelectTagValidator, WrSelectSize } from './interfaces';\nimport { WrOption } from './option';\nimport { WR_SELECT, type WrSelectContext, type WrSelectOptionRegistration } from './tokens';\n\nlet listboxUid = 0;\n\ninterface SelectedChip {\n readonly value: unknown;\n readonly label: string;\n}\n\n/**\n * Combobox primitive. Renders a button that opens a CDK overlay\n * containing the projected `<wr-option>` (and optionally\n * `<wr-option-group>`) children. Every shape is the same component\n * with a different `[mode]`:\n *\n * - `'single'` (default) — one value, no input. Classic dropdown.\n * - `'multi'` — array value, chips on the trigger; clicking an option\n * toggles instead of closing, Backspace removes the last chip.\n * - `'search'` — type-ahead with sync `[options]` filter or async\n * `[loader]`. Replaces the standalone `<wr-autocomplete>`.\n * - `'tag'` — free-text + chips with `[separators]` / `[validate]` /\n * `[allowDuplicates]`. Replaces `<wr-chips-input>`.\n *\n * `[searchable]` is orthogonal to the mode — it adds the type-ahead filter to\n * `single` / `multi` without changing the value shape, which is how you get a\n * searchable multi-select. Server-side search hangs off the `(searchChange)` output\n * plus `[options]` / `[loading]`.\n *\n * A signal-forms native control: it implements `FormValueControl<unknown>`, so\n * `[formField]` binds straight to its `value` model — no\n * `ControlValueAccessor` in between. `[(value)]` works standalone, and classic\n * `[(ngModel)]` / reactive forms keep working through Angular's bridge.\n *\n * @example\n * ```html\n * <!-- Single (signal forms) -->\n * <wr-select placeholder=\"Pick a size\" [formField]=\"form.size\">\n * <wr-option value=\"sm\">Small</wr-option>\n * <wr-option value=\"md\">Medium</wr-option>\n * <wr-option value=\"lg\">Large</wr-option>\n * </wr-select>\n *\n * <!-- Multi (standalone two-way binding) -->\n * <wr-select mode=\"multi\" placeholder=\"Pick tags\" [(value)]=\"tags\">\n * <wr-option value=\"ts\">TypeScript</wr-option>\n * <wr-option value=\"ng\">Angular</wr-option>\n * </wr-select>\n *\n * <!-- Multi + type-ahead, options from a store -->\n * <wr-select\n * mode=\"multi\"\n * searchable\n * [options]=\"results()\"\n * [loading]=\"pending()\"\n * [(value)]=\"categories\"\n * (searchChange)=\"store.search($event)\"\n * />\n * ```\n *\n *\n * @see https://ngwr.dev/reference/components/select\n */\n@Component({\n selector: 'wr-select',\n templateUrl: './select.html',\n encapsulation: ViewEncapsulation.None,\n host: { '[class]': 'classes()' },\n imports: [WrOption],\n providers: [\n {\n provide: WR_SELECT,\n // eslint-disable-next-line @angular-eslint/no-forward-ref\n useExisting: forwardRef(() => WrSelect),\n },\n ],\n})\nexport class WrSelect implements FormValueControl<unknown>, WrSelectContext {\n /** Placeholder shown when no option is selected. Falls back to `select.placeholder`. */\n readonly placeholder = input<string | null>(null);\n\n /** Clear-selection (×) button aria-label. Falls back to `select.clearSelection`. */\n readonly clearLabel = input<string | null>(null);\n\n protected readonly resolvedPlaceholder = useI18nText(this.placeholder, 'select.placeholder', '');\n protected readonly resolvedClear = useI18nText(this.clearLabel, 'select.clearSelection', 'Clear selection');\n\n /**\n * Accessible name of the trigger. Falls back to the placeholder, then to\n * `select.label` — `role=\"combobox\"` on an empty trigger otherwise has no name\n * at all, which is the common case before anything is selected.\n */\n readonly ariaLabel = input<string | null>(null);\n\n private readonly labelText = useI18nText(this.ariaLabel, 'select.label', 'Select');\n protected readonly resolvedAriaLabel = computed(() => {\n // Not `??`: an empty placeholder must fall through to the catalog string.\n const explicit = this.ariaLabel();\n if (explicit) return explicit;\n const placeholder = this.resolvedPlaceholder();\n return placeholder ? placeholder : this.labelText();\n });\n\n /** Per-chip ARIA label — interpolates `{{label}}`. @internal */\n protected readonly chipRemoveLabel = useI18nFormatter('select.removeItem', 'Remove {{label}}');\n\n /**\n * The overflow chip past `maxTagCount` — interpolates `{{count}}`. Through the\n * catalog, like every other string here: printed as a bare `+{{ extra }} more`\n * it stayed English in a fully localized app, beside an event-calendar cell\n * reading \"ещё 3\" from the same string. @internal\n */\n protected readonly moreLabel = useI18nFormatter('select.more', '+{{count}} more');\n\n private readonly field = inject(WR_FORM_FIELD, { optional: true });\n\n /**\n * Id the surrounding `<wr-form-field>`'s `<label for>` points at.\n *\n * The field renders its label before it can see what was projected into it, so\n * the id travels the other way and the control adopts it, exactly as `[wrInput]`\n * and `wr-slider` do. Without this the `for` named an element that was nowhere in\n * the document: clicking the label did nothing, and the field's own text reached\n * the control through no path at all.\n *\n * It lands on the ONE focusable element each trigger shape has — the button, the\n * search input, or the tag input — never on the host, because only a labelable\n * element can be a label's target and `<wr-select>` is not one.\n *\n * What this does NOT change is that element's NAME: `aria-label` outranks a\n * `<label>` in the accname order, and the trigger keeps `resolvedAriaLabel()`\n * because the field cannot promise it has a name to give — `<wr-form-field>`\n * renders a label only when its `label` input is set, and a combobox that traded\n * a generic name for no name would be the worse bug. `WrFormFieldContext`\n * publishes no \"do I have a visible label\" signal to key that on. Until it does,\n * set `[ariaLabel]` to the field's label where the two should read alike.\n */\n protected readonly controlId = computed(() => this.field?.controlId() ?? null);\n\n /**\n * The field's error message — or, failing that, its hint — wired to the same\n * element, plus the invalid flag.\n *\n * Without it the copy `<wr-form-field>` renders is visible and nothing else: a\n * screen reader on the trigger never learns the field is invalid, nor what the\n * message says. Composed by `useFormFieldAria()` rather than read off the field\n * here, so the trigger picks up the hint the same way the other value controls\n * do and `aria-invalid` stays keyed on the error rather than on \"is anything\n * describing me\".\n */\n private readonly fieldAria = useFormFieldAria();\n protected readonly describedBy = this.fieldAria.describedBy;\n protected readonly ariaInvalid = this.fieldAria.ariaInvalid;\n\n /**\n * Disable the select. Bound automatically from the field's disabled state\n * when used with `[formField]`.\n *\n * @default false\n */\n readonly disabled = input(false, { transform: coerceBooleanProperty });\n\n /**\n * Refuse changes while the trigger stays focusable and the value still\n * submits. Bound automatically from the field's readonly state when used with\n * `[formField]`.\n *\n * The panel is where every edit happens, so a read-only select does not open —\n * and with it go the clear button, the chip ×, the tag draft and the search\n * query. The text-input shapes take the native `readonly` attribute, which is\n * what keeps them focusable and selectable where `disabled` would not; every\n * shape mirrors `aria-readonly`, which role `combobox` supports.\n *\n * @default false\n */\n readonly readonly = input(false, { transform: coerceBooleanProperty });\n\n /**\n * Pill-shaped corners on the trigger. Unset falls back to the `select.rounded`\n * app default from `provideWrConfig()`; `[rounded]=\"false\"` turns a configured\n * `true` back off. @default false\n */\n readonly rounded = input<boolean | null, BooleanInput>(null, {\n // Null-preserving, like `responsive` below: the plain `coerceBooleanProperty`\n // folds `null` into `false`, which would make \"not set\" and \"set to false\"\n // the same value — and a config default nothing could ever supply.\n transform: (v: BooleanInput): boolean | null => (v == null ? null : coerceBooleanProperty(v)),\n });\n\n /**\n * Control size — shares the `--wr-control-*` contract. Unset falls back to the\n * `select.size` app default from `provideWrConfig()`. @default 'md'\n */\n readonly size = input<WrSelectSize | null>(null);\n\n /** `rounded`, then the app config, then `false`. @internal */\n protected readonly resolvedRounded = useConfigValue(this.rounded, c => c.select?.rounded, false);\n\n /**\n * `size`, then the app config, then `md`. Read by the trigger's host classes AND\n * by the overlay panel, which builds its size modifier separately.\n */\n protected readonly resolvedSize = useConfigValue(this.size, c => c.select?.size, 'md');\n\n /**\n * Present the option panel as a full-width bottom-sheet on small\n * viewports instead of an anchored dropdown. `undefined` follows the\n * app-wide `provideWrResponsiveOverlays()` setting; `true`/`false`\n * overrides it. @default undefined\n */\n readonly responsive = input<boolean | undefined, BooleanInput>(undefined, {\n transform: (v: BooleanInput): boolean | undefined => (v == null ? undefined : coerceBooleanProperty(v)),\n });\n\n /**\n * Behavior mode. `<wr-select>` is the unified combobox primitive —\n * pick the shape via `[mode]`:\n *\n * - `'single'` (default) — one value, no input. Classic dropdown.\n * - `'multi'` — array value, chips on the trigger.\n * - `'search'` — type-ahead with sync filter or async loader.\n * - `'tag'` — free-text + chips.\n *\n */\n readonly mode = input<WrSelectMode | null>(null);\n\n /** Resolved mode — `'single'` unless `[mode]` says otherwise. */\n protected readonly effectiveMode = computed<WrSelectMode>(() => this.mode() ?? 'single');\n\n /** Convenience — `effectiveMode() === 'multi'`. */\n protected readonly isMulti = computed(() => this.effectiveMode() === 'multi');\n\n /** Convenience — `effectiveMode() === 'tag'`. */\n protected readonly isTag = computed(() => this.effectiveMode() === 'tag');\n\n /** Convenience — `effectiveMode() === 'search'`. Exposed via context for options. */\n readonly isSearch = computed(() => this.effectiveMode() === 'search');\n\n /**\n * Add a type-ahead filter without changing the value shape — the missing\n * multi-with-search combination, since `[mode]` picks exactly one shape:\n *\n * ```html\n * <wr-select mode=\"multi\" searchable [(value)]=\"categories\">…</wr-select>\n * ```\n *\n * On `multi` the trigger keeps its chips and grows an inline text field (the\n * shape `tag` mode already uses); on `single` it is equivalent to\n * `mode=\"search\"`. Every search input (`[options]`, `[loader]`,\n * `[debounceMs]`, `[minChars]`, `[virtualScroll]`, the `(searchChange)` output, …)\n * applies either way. Ignored in `tag` mode, which owns its own input.\n * @default false\n */\n readonly searchable = input(false, { transform: coerceBooleanProperty });\n\n /**\n * Filtering is active — either `mode=\"search\"` or `[searchable]`. Exposed via\n * context so each `<wr-option>` can self-hide non-matching rows.\n */\n readonly isSearchable = computed(() => this.isSearch() || (this.searchable() && !this.isTag()));\n\n /** The trigger *is* the search input: `mode=\"search\"`, or a searchable single. */\n protected readonly isSearchTrigger = computed(() => this.isSearch() || (this.searchable() && !this.hasChips()));\n\n /** Chips plus an inline search field — a searchable multi-select. */\n protected readonly hasChipSearch = computed(() => this.searchable() && this.isMulti());\n\n /** WrSelectContext — resolved multi-selection flag for child options. */\n readonly multi = computed(() => this.effectiveMode() === 'multi' || this.effectiveMode() === 'tag');\n\n /** Both multi and tag render chips on the trigger. */\n protected readonly hasChips = computed(() => {\n const m = this.effectiveMode();\n return m === 'multi' || m === 'tag';\n });\n\n /**\n * The live search query. Empty string = no filter. Exposed via context so\n * each `<wr-option>` can self-hide non-matching rows.\n *\n * Two-way bindable, so the query can be owned or reset from outside:\n * `[(searchQuery)]=\"query\"`. For server-side search prefer the debounced\n * {@link searchChange} output — `searchQueryChange` fires on every keystroke.\n */\n readonly searchQuery = model('');\n\n // Search-mode-only inputs (ignored in other modes)\n\n /**\n * Search mode: dynamic option array. Each item is rendered as a\n * `<wr-option>` whose label comes from `[displayWith]`. Works\n * alongside projected `<wr-option>` children — both lists are\n * filtered by the search query.\n */\n readonly options = input<readonly unknown[]>([]);\n\n /** Search mode: map a dynamic option item to its display label. @default String */\n readonly displayWith = input<(item: unknown) => string>((item: unknown) => String(item));\n\n /**\n * Search mode: async loader. When set, the loader is called on every\n * (debounced) keystroke and its result replaces `[options]`. Supports\n * Observables, Promises, and plain arrays.\n */\n readonly loader = input<WrSelectSearchLoader<unknown> | null>(null);\n\n /**\n * The option list is already scoped to the query upstream — skip the built-in\n * client-side label filter. Set it when `[options]` is fed from a server via\n * the {@link searchChange} output; the async `[loader]` path implies it.\n *\n * Without this, a server that ranks or fuzzy-matches (returning rows whose\n * labels don't literally contain the query) would have those rows hidden\n * again on the client. @default false\n */\n readonly serverSearch = input(false, { transform: coerceBooleanProperty });\n\n /**\n * Whether the built-in label filter runs. Exposed via context so each\n * `<wr-option>` knows whether to self-hide. @internal\n */\n readonly clientFilter = computed(() => !this.loader() && !this.serverSearch());\n\n /** Search mode: debounce (ms) applied to the loader. @default 250 */\n readonly debounceMs = input(250, { transform: (v: unknown): number => Math.max(0, Number(v) || 0) });\n\n /** Search mode: minimum query length before the panel opens / loader fires. @default 0 */\n readonly minChars = input(0, { transform: (v: unknown): number => Math.max(0, Number(v) || 0) });\n\n /**\n * Search mode: allow values not in the options list. Enter on an\n * unmatched query commits the raw text as the form value. @default false\n */\n readonly freeText = input(false, { transform: coerceBooleanProperty });\n\n /**\n * Search mode: window the option panel so thousands of `[options]` keep only\n * ~one viewport of rows in the DOM. Opt-in and OFF by default. Engages ONLY on\n * the pure data-array search tier — it silently falls back to the full render\n * when static `<wr-option>` children are projected or the filtered list is\n * empty. While on, rows are plain `role=\"option\"` elements (no `<wr-option>`),\n * navigated via `aria-activedescendant`, selected by value. @default false\n */\n readonly virtualScroll = input(false, { transform: coerceBooleanProperty });\n\n /**\n * Search mode: uniform option-row height in px for the virtual window. `0`\n * (default) measures the first rendered row once and reuses it, so it adapts\n * to the control size. Read only when `virtualScroll` engages. @default 0\n */\n readonly rowHeight = input(0, { transform: (v: unknown): number => Math.max(0, coerceNumberProperty(v, 0)) });\n\n /**\n * Search mode: height of the virtual scroll viewport — a number (px) or any\n * CSS length. @default 256\n */\n readonly viewportHeight = input<number | string>(256);\n\n /** Search mode: extra rows kept above/below the virtual viewport. @default 6 */\n readonly overscan = input(6, { transform: (v: unknown): number => Math.max(0, coerceNumberProperty(v, 6)) });\n\n /** Search mode: text shown when the filter / loader returns nothing. Falls back to `select.noResults`. */\n readonly noResultsText = input<string | null>(null);\n\n /** Search mode: text shown while the async loader is in flight. Falls back to `select.loading`. */\n readonly loadingText = input<string | null>(null);\n\n protected readonly resolvedNoResults = useI18nText(this.noResultsText, 'select.noResults', 'No results');\n protected readonly resolvedLoading = useI18nText(this.loadingText, 'select.loading', 'Loading…');\n\n /**\n * Debounced search query, gated to searchable selects. Emits on every settled\n * change — including the empty string when the field is cleared — so a\n * store-backed option list can stay in sync and reset itself. `[debounceMs]`\n * controls the delay; `[minChars]` does NOT gate it, for the same reason the\n * `[loader]` path clears its results below that threshold.\n *\n * This is the hook for server-side search: dispatch on `(searchChange)`, feed\n * the results back through `[options]` (plus `[serverSearch]`), and drive the\n * panel's progress row with `[loading]`. Prefer it over the model's raw\n * `(searchQueryChange)`, which fires on every keystroke.\n *\n * @example\n * ```html\n * <wr-select\n * mode=\"search\"\n * serverSearch\n * [options]=\"results()\"\n * [loading]=\"pending()\"\n * (searchChange)=\"store.search($event)\"\n * />\n * ```\n */\n readonly searchChange = output<string>();\n\n /**\n * Show the panel's progress row. Independent of `[loader]`, which raises and\n * lowers its own flag — use this when the options come from a store fed by\n * the {@link searchChange} output. @default false\n */\n readonly loading = input(false, { transform: coerceBooleanProperty });\n\n /** Search mode: results returned by the async loader. @internal */\n protected readonly loadedOptions = signal<readonly unknown[]>([]);\n\n /** True while the async `[loader]` is in flight. @internal */\n private readonly loaderLoading = signal(false);\n\n /** Either flag shows the panel's progress row. @internal */\n protected readonly isLoading = computed(() => this.loading() || this.loaderLoading());\n\n // Tag-mode-only inputs (ignored in other modes)\n\n /**\n * Tag mode: keys / characters that commit the current draft into a chip.\n * `'Enter'` is the key name; everything else is a literal character watched\n * in keypresses and pastes. @default ['Enter', ',']\n */\n readonly separators = input<readonly string[]>(['Enter', ',']);\n\n /** Tag mode: allow the same value to appear more than once. @default false */\n readonly allowDuplicates = input(false, { transform: coerceBooleanProperty });\n\n /**\n * Tag mode: custom validator — return `true` to accept the value, `false`\n * to silently reject. Receives the trimmed draft + the existing chips.\n */\n readonly validate = input<WrSelectTagValidator | null>(null);\n\n /** Tag-mode draft (text currently typed in the inline input). @internal */\n protected readonly draft = signal('');\n\n /**\n * Show a clear (×) button once at least one option is selected.\n *\n * NOT multi-only, which this said for a long time and which the template\n * refutes: only the button trigger gates on `isMulti()`, so the chips trigger\n * AND a single `mode=\"search\"` / `[searchable]` select carry it too. The\n * wording mattered little while the default was `true`; it decides what a\n * reader expects to lose now that it is not.\n *\n * The default changed from `true` to `false`: the affordance is opt-in, so a\n * trigger that grew an × on its own no longer does — pass `clearable` to keep\n * it. In `search` mode this also gates Backspace-to-clear on an empty field,\n * since that key is the keyboard twin of this button. @default false\n */\n readonly clearable = input(false, { transform: coerceBooleanProperty });\n\n /**\n * Cap on selected items (multi mode). `0` = unlimited. Once reached,\n * additional clicks on unselected options are ignored. @default 0\n */\n readonly maxItems = input(0, {\n transform: (v: unknown): number => Math.max(0, Number(v) || 0),\n });\n\n /**\n * Maximum number of chips rendered before collapsing the rest into a\n * `+N more` indicator. `0` = render every chip. @default 0\n */\n readonly maxTagCount = input(0, {\n transform: (v: unknown): number => Math.max(0, Number(v) || 0),\n });\n\n /**\n * Unified value. Single mode holds a scalar (or `null`); multi / tag\n * mode holds `readonly unknown[]`. Bound by `[formField]`, or two-way\n * via `[(value)]`.\n */\n readonly value = model<unknown>(null);\n\n /** Emitted on blur / commit so a bound field can mark itself touched. */\n readonly touch = output<void>();\n\n /** Listbox id used by the trigger's `aria-controls`. */\n protected readonly listboxId = `wr-select-listbox-${++listboxUid}`;\n\n /** Registered options (insertion order). Internal — distinct from the public `[options]` input. */\n private readonly registry = signal<readonly WrSelectOptionRegistration[]>([]);\n\n /**\n * The registry in DOM order — the list the keyboard cursor walks.\n *\n * `registry` is CREATION order, and projected `<wr-option>` children are created\n * before the panel renders its own `[options]` rows, so with both in play the\n * cursor moved in an order the eye could not follow: opening highlighted the\n * third row on screen and ArrowDown went to the last. Value lookups keep reading\n * `registry` — they do not care about order — and a registration with no element\n * keeps its place, since the sort is stable.\n */\n protected readonly orderedRegistry = computed<readonly WrSelectOptionRegistration[]>(() => {\n const list = this.registry();\n if (list.length < 2) return list;\n return [...list].sort((a, b) => {\n if (!a.host || !b.host || a.host === b.host) return 0;\n const relation = a.host.compareDocumentPosition(b.host);\n // `compareDocumentPosition` returns a BITMASK — a node can be both\n // following and contained — so masking is the API's own idiom, not a\n // cleverness to be rewritten as a comparison.\n /* eslint-disable no-bitwise -- reading the flags of a DOM bitmask */\n // DISCONNECTED is checked FIRST, and it is not defensive noise. Projected\n // `<wr-option>` hosts live in an `<ng-template>` that only instantiates\n // when the panel opens, so on the first change detection they are not in\n // the document yet — and the template's own `aria-activedescendant`\n // binding reads this computed on exactly that pass. For disconnected nodes\n // the spec lets a UA answer PRECEDING or FOLLOWING arbitrarily, as long as\n // it answers consistently; the answer means nothing, and the computed\n // CACHES it until the registry itself changes, so one meaningless\n // comparison decides the cursor order for the life of the select. Chromium\n // happens to answer in tree order and jsdom happens to answer in reverse,\n // which is the whole difference between a working component and one where\n // End lands on the first option. Registration order is the honest fallback:\n // the sort is stable, and it is already DOM order for a static list.\n if (relation & Node.DOCUMENT_POSITION_DISCONNECTED) return 0;\n if (relation & Node.DOCUMENT_POSITION_FOLLOWING) return -1;\n if (relation & Node.DOCUMENT_POSITION_PRECEDING) return 1;\n /* eslint-enable no-bitwise */\n return 0;\n });\n });\n\n /** Keyboard cursor index into `options`. -1 = none. */\n protected readonly activeIndex = signal(-1);\n\n /** Id of the active option (for `aria-activedescendant`). */\n readonly activeOptionId = computed<string | null>(() => {\n const idx = this.activeIndex();\n if (this.virtualActive()) {\n // Virtual rows aren't registered; the active id is derived from the index,\n // and returned only while the row is inside the rendered window so\n // `aria-activedescendant` never dangles at a recycled element.\n const { start, end } = this.virtualWindow();\n return idx >= start && idx < end ? this.virtualRowId(idx) : null;\n }\n const list = this.orderedRegistry();\n return idx >= 0 && idx < list.length ? list[idx].id : null;\n });\n\n protected readonly open = signal(false);\n\n /**\n * Trigger label for single mode. Multi reads `selectedChips` instead.\n *\n * A `computed`, and that is the whole point. It used to be a `signal` written\n * from an effect keyed on `value` / `registry` / `isMulti` / `displayWith` —\n * not one of which moves when the OPTION'S OWN TEXT does, and that text is\n * projected content whose ordinary way of changing is a translation catalog\n * landing a microtask after the first pass. The trigger kept the English\n * fallback while the open panel beside it showed the translation. The\n * registration now carries the label as a signal, so a late catalog and a\n * runtime locale switch both repaint the trigger with the panel.\n */\n protected readonly selectedLabel = computed<string | null>(() => {\n const v = this.value();\n if (this.isMulti()) return null;\n const match = this.registry().find(o => o.value === v);\n if (match) return match.label();\n // Search mode: a value picked from a virtualized (or since-unmounted) row\n // has no registered `<wr-option>`, so derive its label from `displayWith`\n // — the same function that rendered the row.\n return v != null && this.isSearchable() ? this.displayWith()(v) : null;\n });\n\n /**\n * Selected chips (multi + tag modes). Multi reads labels from the\n * registered `<wr-option>` children; tag uses each raw string as\n * both value and label.\n */\n protected readonly selectedChips = computed<readonly SelectedChip[]>(() => {\n if (!this.hasChips()) return [];\n const arr = this.asArray(this.value());\n if (this.isTag()) {\n return arr.map<SelectedChip>(v => ({ value: v, label: String(v) }));\n }\n const list = this.registry();\n return arr.map<SelectedChip>(v => {\n const found = list.find(o => o.value === v);\n // Fall back to `displayWith` (defaults to `String`) rather than `String`\n // directly: a searchable multi fed from `[options]` has no registered\n // `<wr-option>` for a virtualized or unmounted row, and object items\n // would otherwise render as \"[object Object]\".\n return { value: v, label: found?.label() ?? this.displayWith()(v) };\n });\n });\n\n protected readonly visibleChips = computed<readonly SelectedChip[]>(() => {\n const cap = this.maxTagCount();\n const chips = this.selectedChips();\n return cap > 0 && chips.length > cap ? chips.slice(0, cap) : chips;\n });\n\n protected readonly hiddenChipCount = computed(() => {\n const cap = this.maxTagCount();\n const total = this.selectedChips().length;\n return cap > 0 && total > cap ? total - cap : 0;\n });\n\n protected readonly hasSelection = computed(() => {\n if (this.hasChips()) return this.selectedChips().length > 0;\n return this.value() != null;\n });\n\n /** Effective disabled state. Part of {@link WrSelectContext} for child options. */\n readonly isDisabled = computed(() => this.disabled());\n\n /** Effective readonly state — refuses every write path without removing focus. */\n protected readonly isReadonly = computed(() => this.readonly());\n\n protected readonly classes = computed(() => {\n const parts = ['wr-select'];\n if (this.open()) parts.push('wr-select--open');\n if (this.resolvedRounded()) parts.push('wr-select--rounded');\n const size = this.resolvedSize();\n if (size !== 'md') parts.push(`wr-select--${size}`);\n if (this.isMulti()) parts.push('wr-select--multi');\n if (this.isTag()) parts.push('wr-select--tag');\n if (this.isSearchTrigger()) parts.push('wr-select--search');\n if (this.hasChipSearch()) parts.push('wr-select--searchable');\n if (this.isDisabled()) parts.push('wr-select--disabled');\n else if (this.isReadonly()) parts.push('wr-select--readonly');\n return parts.join(' ');\n });\n\n /**\n * Search-mode dynamic options. Loader results win when the loader is\n * set; otherwise the static `[options]` array. Each item is rendered\n * as an internal `<wr-option>` in the panel.\n */\n protected readonly dynamicOptions = computed<readonly unknown[]>(() =>\n this.loader() ? this.loadedOptions() : this.options()\n );\n\n // --- Virtual scroll (search mode, data-array path) ------------------------\n\n private static readonly FALLBACK_ROW_PX = 34;\n private static readonly FALLBACK_VIEWPORT_PX = 256;\n\n /**\n * Consumer-projected `<wr-option>` children only (NOT the `@for`-rendered ones\n * — those live in the panel's own view, which a content query never sees).\n *\n * `descendants: true` because a projected option is as often wrapped in a\n * `<wr-option-group>` as it is a direct child, and the signal default is\n * `false`. A grouped list therefore read as NO projected options: `virtualActive`\n * engaged over the (empty) data array, so the panel rendered the group's rows\n * with a virtual window beside them that owned the keyboard — no\n * `aria-activedescendant`, no active row, and Enter committing nothing.\n */\n private readonly projectedOptions = contentChildren(WrOption, { descendants: true });\n\n /**\n * `dynamicOptions()` narrowed to the current search query. `dynamicOptions()`\n * is intentionally UNFILTERED (projected `<wr-option>` self-hide via CSS), so\n * the virtual path — which renders plain rows that can't self-hide — filters\n * here. Loader / `serverSearch` results are already query-scoped upstream.\n */\n protected readonly filteredDynamicOptions = computed<readonly unknown[]>(() => {\n const items = this.dynamicOptions();\n if (!this.clientFilter()) return items;\n const q = this.searchQuery().trim().toLowerCase();\n if (!q) return items;\n const label = this.displayWith();\n return items.filter(it => label(it).toLowerCase().includes(q));\n });\n\n /**\n * Virtualization engaged: opt-in, search mode, and NO projected `<wr-option>`\n * children — grouped ones included (those keep the full-render registry path so\n * their DOM-derived labels / selection still work).\n *\n * NOT gated on there being matches. It used to also require\n * `filteredDynamicOptions().length > 0`, which meant a query matching nothing\n * fell back to the full-render path and mounted the ENTIRE unfiltered array —\n * 2000 `<wr-option>` hosts, every one of them `--hidden`, behind a \"No\n * results\" line — and then tore all of them down again on the next keystroke\n * that matched. The empty window is handled where it belongs: `virtualWindow`\n * already short-circuits on `total === 0`, and `firstEnabled` / `lastEnabled`\n * already answer -1.\n */\n protected readonly virtualActive = computed<boolean>(\n () => this.virtualScroll() && this.isSearchable() && this.projectedOptions().length === 0\n );\n\n private readonly scrollTop = signal(0);\n private readonly viewportPx = signal(0);\n private readonly measuredRowPx = signal(0);\n\n /** Effective uniform row height (px). */\n protected readonly effRowH = computed(() =>\n this.rowHeight() > 0 ? this.rowHeight() : this.measuredRowPx() || WrSelect.FALLBACK_ROW_PX\n );\n\n private readonly fallbackViewportPx = computed(() => {\n const h = this.viewportHeight();\n if (typeof h === 'number') return h;\n return /^\\d+$/.test(h) ? Number(h) : WrSelect.FALLBACK_VIEWPORT_PX;\n });\n\n /** `viewportHeight` as a CSS length for the inline max-height (bare number → px). */\n protected readonly resolvedViewportHeight = computed(() => {\n const h = this.viewportHeight();\n return typeof h === 'number' || /^\\d+$/.test(h) ? `${h}px` : h;\n });\n\n /** Rendered window [start,end) + spacer pads (px). */\n protected readonly virtualWindow = computed<{ start: number; end: number; padTop: number; padBottom: number }>(() => {\n const total = this.filteredDynamicOptions().length;\n if (!this.virtualActive() || total === 0) return { start: 0, end: total, padTop: 0, padBottom: 0 };\n const h = this.effRowH();\n const vp = this.viewportPx() || this.fallbackViewportPx();\n const over = this.overscan();\n const first = Math.min(Math.floor(this.scrollTop() / h), total - 1);\n const count = Math.ceil(vp / h) + 1;\n const start = Math.max(0, first - over);\n const end = Math.min(total, first + count + over);\n return { start, end, padTop: start * h, padBottom: (total - end) * h };\n });\n\n /** The windowed slice of options, each carrying its absolute index. */\n protected readonly windowOptions = computed<readonly { item: unknown; index: number }[]>(() => {\n const { start, end } = this.virtualWindow();\n return this.filteredDynamicOptions()\n .slice(start, end)\n .map((item, k) => ({ item, index: start + k }));\n });\n\n /** Stable id for a virtual option row at filtered index `i`. */\n protected virtualRowId(i: number): string {\n return `${this.listboxId}-vopt-${i}`;\n }\n\n /** The virtual scroll container inside the overlay panel, if attached. */\n private get vlistElement(): HTMLElement | null {\n return this.overlayRef?.overlayElement.querySelector<HTMLElement>('.wr-select-panel__vlist') ?? null;\n }\n\n /** The scrolling listbox inside the overlay panel, if attached. */\n private get panelElement(): HTMLElement | null {\n return this.overlayRef?.overlayElement.querySelector<HTMLElement>('.wr-select-panel') ?? null;\n }\n\n /**\n * Scroll the ordered index `i` just into view. Two implementations, because the\n * two panels scroll different elements and know the row geometry in different\n * ways — the virtual list is index maths against a measured row height, the\n * projected list has to read the row it is moving to.\n *\n * The non-virtual half is not an optimisation, it is the whole keyboard\n * contract: `activeIndex` drives `aria-activedescendant`, and NOTHING else\n * moves a projected panel, because the rows never take DOM focus. Without it\n * End on a 250-option `mode=\"search\"` panel announced Zimbabwe while the panel\n * sat at `scrollTop` 0 with the cursor 9 218 px below the fold, and Enter then\n * committed a row the user could not see.\n */\n private ensureVisible(i: number): void {\n if (i < 0) return;\n if (!this.virtualActive()) {\n this.ensureRowVisible(i);\n return;\n }\n const h = this.effRowH();\n const vp = this.viewportPx() || this.fallbackViewportPx();\n const top = i * h;\n const cur = this.scrollTop();\n let next = cur;\n if (top < cur) next = top;\n else if (top + h > cur + vp) next = top + h - vp;\n if (next !== cur) {\n this.scrollTop.set(next);\n this.vlistElement?.scrollTo({ top: next });\n }\n }\n\n /**\n * Scroll the projected row at ordered index `i` just into view.\n *\n * Geometry is READ rather than computed: projected `<wr-option>` rows are\n * consumer content, so they are not a uniform height the way a virtual row is\n * — a row with a description, an icon or a wrapped label is taller than its\n * neighbours, and index maths would land the panel next to the cursor instead\n * of on it. The offset is taken relative to the panel's own scroll content\n * (`rect.top` difference plus the current `scrollTop`) rather than from\n * `offsetTop`, which is measured against whichever ancestor happens to be\n * positioned.\n *\n * `scrollTop` is written directly instead of `scrollTo`, so the write is\n * observable in a spec — jsdom implements the property and does not implement\n * the method. It still reads as a no-op there, since every jsdom rect is 0×0:\n * a spec asserting a scroll has to stub `getBoundingClientRect` and\n * `clientHeight` on the panel and the row, which `select.spec.ts` does.\n */\n private ensureRowVisible(i: number): void {\n const panel = this.panelElement;\n if (!panel) return;\n const list = this.orderedRegistry();\n if (i >= list.length) return;\n const row = panel.querySelector<HTMLElement>(`#${CSS.escape(list[i].id)}`);\n if (!row) return;\n\n const panelRect = panel.getBoundingClientRect();\n const rowRect = row.getBoundingClientRect();\n const cur = panel.scrollTop;\n const top = rowRect.top - panelRect.top + cur;\n const vp = panel.clientHeight;\n\n let next = cur;\n if (top < cur) next = top;\n else if (top + rowRect.height > cur + vp) next = top + rowRect.height - vp;\n if (next !== cur) panel.scrollTop = next;\n }\n\n /**\n * Count of registered options that pass the current search filter.\n * Hides the noResults state when the panel has at least one visible row.\n */\n protected readonly visibleCount = computed(() => {\n if (this.virtualActive()) return this.filteredDynamicOptions().length;\n const list = this.registry();\n if (!this.isSearchable() || !this.clientFilter()) return list.length;\n const q = this.searchQuery().trim().toLowerCase();\n if (!q) return list.length;\n let count = 0;\n for (const o of list) {\n if (o.label().toLowerCase().includes(q)) count++;\n }\n return count;\n });\n\n /**\n * Whether the panel may be open at all. `minChars` is documented as the\n * \"minimum query length before the panel OPENS\", and nothing gated the open —\n * so a picker with `[minChars]=\"3\"` popped a panel on focus and showed an empty\n * bordered box for the first two keystrokes (with the \"no results\" row itself\n * gated on the same threshold, there was nothing in it to explain the box).\n */\n protected readonly meetsMinChars = computed(\n () => !this.isSearchable() || this.searchQuery().trim().length >= this.minChars()\n );\n\n /** Search mode: show \"no results\" when the panel has nothing to offer. */\n protected readonly hasNoResults = computed(() => {\n if (!this.isSearchable() || !this.open() || this.isLoading()) return false;\n if (this.searchQuery().trim().length < this.minChars()) return false;\n return this.visibleCount() === 0;\n });\n\n /** Search mode: is this option hidden by the current query? @internal */\n private isOptionHidden(label: string): boolean {\n if (!this.isSearchable() || !this.clientFilter()) return false;\n const q = this.searchQuery().trim().toLowerCase();\n if (!q) return false;\n return !label.toLowerCase().includes(q);\n }\n\n protected readonly panelTpl = viewChild.required('panelTpl', { read: TemplateRef });\n\n /** The inline input inside a chip trigger — tag mode or a searchable multi. @internal */\n protected readonly tagInputEl = viewChild<ElementRef<HTMLInputElement>>('tagInput');\n\n /** Search-mode inline input. Present only when `mode=\"search\"`. @internal */\n protected readonly searchInputEl = viewChild<ElementRef<HTMLInputElement>>('searchInput');\n\n protected focusTagInput(): void {\n this.tagInputEl()?.nativeElement.focus();\n }\n\n protected focusSearchInput(): void {\n this.searchInputEl()?.nativeElement.focus();\n }\n\n // Chip-trigger input dispatch. One inline input, two owners: tag mode\n // commits a draft into chips, a searchable multi filters the panel.\n\n protected onChipsInput(event: Event): void {\n if (this.hasChipSearch()) this.onSearchInput(event);\n else this.onTagInput(event);\n }\n\n protected onChipsKeydown(event: KeyboardEvent): void {\n if (this.imeOwnsKey(event)) return;\n if (this.hasChipSearch()) this.onSearchKey(event);\n else this.onTagKeydown(event);\n }\n\n /**\n * True when the key belongs to an open IME conversion — and, when it does,\n * stops the event on its way out.\n *\n * Not acting is not enough here. The panel closes on Escape from CDK's overlay\n * keyboard dispatcher, one listener on `<body>` in the bubble phase, so a\n * handler that merely returns still loses the panel: the Japanese user meant\n * to cancel a reading and lost the query with it. Stopping the event at the\n * field that owns the composition is the only place that reaches both.\n */\n private imeOwnsKey(event: KeyboardEvent): boolean {\n if (!isComposing(event)) return false;\n event.stopPropagation();\n return true;\n }\n\n protected onChipsFocus(): void {\n // Tag mode has no panel to open.\n if (this.hasChipSearch()) this.onSearchFocus();\n }\n\n protected onChipsPaste(event: ClipboardEvent): void {\n // Splitting a paste into chips is tag-mode behaviour; a search query is\n // pasted as-is.\n if (!this.hasChipSearch()) this.onTagPaste(event);\n }\n\n protected onChipsBlur(): void {\n if (this.hasChipSearch()) this.touch.emit();\n else this.onTagBlur();\n }\n\n // Search-mode handlers\n\n protected onSearchInput(event: Event): void {\n if (this.isDisabled() || this.isReadonly()) return;\n const value = (event.target as HTMLInputElement).value;\n this.searchQuery.set(value);\n if (this.meetsMinChars()) {\n if (!this.open()) this.open.set(true);\n } else if (this.open()) {\n this.open.set(false);\n }\n // A new filter invalidates every index, so re-seed the cursor onto the first\n // option that still matches. This must happen on BOTH paths: on the\n // projected-`<wr-option>` path the registry keeps filtered-out options (they\n // only self-hide via CSS), so a stale `activeIndex` would leave the cursor on\n // a row the user can no longer see — and Enter would select it.\n this.activeIndex.set(this.firstEnabled());\n if (this.virtualActive()) {\n this.scrollTop.set(0);\n this.vlistElement?.scrollTo({ top: 0 });\n return;\n }\n // The projected panel keeps whatever `scrollTop` the previous query left it\n // at, so the re-seeded cursor lands off screen unless it is scrolled to —\n // and this is the ONE cursor move that cannot be handled synchronously.\n // Filtered-out options only self-hide via CSS, applied on the next pass, so\n // a rect read on this line measures the panel as it was BEFORE the new query\n // removed rows above the cursor. `afterNextRender`, not `queueMicrotask`:\n // under zoneless CD the scheduler refreshes the view in a macrotask, and a\n // microtask queued from this handler runs before the DOM reflects the query\n // that caused it.\n afterNextRender(() => this.ensureVisible(this.activeIndex()), { injector: this.injector });\n }\n\n protected onSearchFocus(): void {\n if (this.isDisabled()) return;\n // Focus is tracked even while read-only — the field still takes it, and\n // `searchDisplay()` keys off it — but nothing opens.\n this.searchHasFocus.set(true);\n if (this.isReadonly()) return;\n if (!this.meetsMinChars()) return;\n if (!this.open()) {\n this.seedActiveIndex();\n this.open.set(true);\n }\n }\n\n protected onSearchBlur(): void {\n this.searchHasFocus.set(false);\n // Leaving the field is what makes a below-threshold query stale, so this is\n // where the panel-close reset would have run if it could have waited.\n if (!this.open() && this.isSearchable()) this.searchQuery.set('');\n this.touch.emit();\n }\n\n protected onSearchKey(event: KeyboardEvent): void {\n // Enter accepts an IME candidate, Escape cancels the reading, the arrows walk\n // the candidate list — none of it is the listbox's while a conversion is open.\n if (this.imeOwnsKey(event)) return;\n\n // freeText: Enter on an unmatched query commits the typed string\n // as the value. Skips when an active option is highlighted (the\n // normal Enter-selects behaviour wins).\n if (event.key === 'Enter' && this.freeText() && this.open()) {\n const q = this.searchQuery().trim();\n const idx = this.activeIndex();\n const list = this.orderedRegistry();\n const hasActive = this.virtualActive()\n ? idx >= 0 && idx < this.filteredDynamicOptions().length\n : idx >= 0 && idx < list.length && !list[idx].disabled && !this.isOptionHidden(list[idx].label());\n if (!hasActive && q) {\n event.preventDefault();\n this.value.set(q);\n this.touch.emit();\n this.open.set(false);\n return;\n }\n }\n // Space belongs to the text field, not to the listbox. The button trigger\n // uses it to pick the active option, but here swallowing it would make a\n // multi-word query (\"dump trucks\") impossible to type.\n if (event.key === ' ') return;\n\n // Backspace on an empty query drops the last chip, matching tag mode. The\n // button-trigger path only does this while closed, and a chip-search input\n // keeps the panel open, so it never reaches that branch.\n if (event.key === 'Backspace' && this.hasChipSearch() && this.searchQuery() === '' && this.hasSelection()) {\n const chips = this.selectedChips();\n if (chips.length > 0) {\n event.preventDefault();\n this.removeChip(chips.length - 1, event);\n return;\n }\n }\n\n // The same key, for the searchable SINGLE: Backspace on an empty field is\n // its clear control. Every other mode could already undo a selection from\n // the keyboard — the chip modes above, the button trigger one chip per\n // Backspace — while here the × was the only way out, and it is a\n // `tabindex=\"-1\"` span no key can reach. A function offered by pointer\n // alone is a WCAG 2.1.1 failure, not a missing convenience.\n //\n // Gated on `clearable()` because that input IS the clear control: a consumer\n // who turned the × off did not ask for a keyboard twin of it. Gated on the\n // FIELD being empty rather than on `searchQuery()`, which is not the same\n // question — under `[minChars]` a collapsed field shows the selected label\n // while the query is still '', and backspacing over that text has always\n // started a query rather than thrown the selection away.\n if (\n event.key === 'Backspace' &&\n !this.hasChipSearch() &&\n this.clearable() &&\n this.hasSelection() &&\n (event.target as HTMLInputElement | null)?.value === ''\n ) {\n event.preventDefault();\n this.clearAll(event);\n return;\n }\n\n // Otherwise route through the same keyboard plumbing as the button trigger.\n this.onTriggerKey(event);\n }\n\n /**\n * Display text for the search input. Shows the selected option's\n * label when collapsed, or the live query while typing / panel open.\n * @internal\n */\n protected readonly searchDisplay = computed(() => {\n // FOCUS as well as open, and that second term is the whole `[minChars]`\n // story. Backspacing under the threshold closes the panel, and falling back\n // to the selected label the moment `open()` goes false rewrote the field\n // out from under someone who was still typing — \"sma\" -> \"sm\" showed an\n // empty box.\n //\n // A NON-EMPTY query, though: picking an option clears it and leaves focus\n // in the field, and there the label is what belongs on screen.\n if (this.open()) return this.searchQuery();\n if (this.searchHasFocus() && this.searchQuery() !== '') return this.searchQuery();\n return this.selectedLabel() ?? '';\n });\n\n /**\n * Whether the search field holds focus.\n *\n * Read by `searchDisplay`, so it has to be a signal — and it is also what\n * lets the panel-close effect tell \"the user walked away\" (reset the query)\n * from \"the query dropped under `minChars` and they are still typing\" (keep\n * it).\n */\n private readonly searchHasFocus = signal(false);\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly overlay = inject(WR_OVERLAY);\n private readonly outsideClick = inject(WrOutsideClick);\n private readonly responsiveConfig = inject(WR_RESPONSIVE_OVERLAYS);\n private readonly vcr = inject(ViewContainerRef);\n private readonly scrollStrategies = inject(ScrollStrategyOptions);\n private readonly destroyRef = inject(DestroyRef);\n private readonly platformId = inject(PLATFORM_ID);\n private readonly injector = inject(Injector);\n private overlayRef: OverlayRef | null = null;\n\n constructor() {\n // A component destroyed while the panel is open takes its overlay with it.\n // Without this the pane stays in the CDK container forever, and in sheet\n // mode the block scroll strategy is never released, so the page can no\n // longer scroll at all.\n this.destroyRef.onDestroy(() => this.closeOverlay());\n\n // Close the panel if the control goes read-only or disabled while it is up —\n // a panel whose every row now refuses the click is a trap, not a view.\n effect(() => {\n if (this.isDisabled() || this.isReadonly()) this.open.set(false);\n });\n\n effect(() => {\n if (this.open()) {\n this.openOverlay();\n } else {\n this.closeOverlay();\n // Reset the search query when the panel closes so a re-open doesn't\n // carry a stale filter — but NOT while the field still has focus.\n //\n // With `[minChars]`, backspacing under the threshold closes the panel\n // (`onSearchInput`), and `searchDisplay` falls back to the selected\n // label the moment `open()` is false — so an unconditional reset here\n // erased what the user was still typing, mid-word. A query the user is\n // actively editing is not stale.\n if (this.isSearchable() && !this.searchHasFocus()) this.searchQuery.set('');\n }\n });\n\n // One debounced query stream feeds both the async loader and the public\n // `searchChange` output, so they fire on exactly the same cadence.\n // `debounce(() => timer(...))` rather than `debounceTime(this.debounceMs())`:\n // this runs in the constructor, where inputs aren't bound yet, so reading\n // the input eagerly would pin the delay to the default and ignore\n // `[debounceMs]` forever.\n // `skip(1)` sits BEFORE the debounce so it drops the mount-time replay of the\n // empty query and nothing else. Downstream of `debounce` it would instead\n // drop the first *settled* emission — and when a fast typist's first\n // keystrokes coalesce with that initial `''`, the dropped emission is their\n // query, not the replay.\n const debouncedQuery = toObservable(this.searchQuery).pipe(\n skip(1),\n debounce(() => timer(this.debounceMs()))\n );\n\n debouncedQuery.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(query => {\n if (this.isSearchable()) this.searchChange.emit(query);\n });\n\n // Async loader pipeline (searchable selects only). `switchMap` cancels\n // in-flight requests when a new keystroke arrives.\n debouncedQuery\n .pipe(\n switchMap(query => {\n const loader = this.loader();\n if (!loader || !this.isSearchable() || query.length < this.minChars()) {\n this.loaderLoading.set(false);\n return of<readonly unknown[]>([]);\n }\n this.loaderLoading.set(true);\n // `defer` so the loader CALL is part of the inner observable too. Called\n // out here, a loader that throws SYNCHRONOUSLY throws from switchMap's\n // project function, which rxjs routes straight to the destination — past\n // the `catchError` below and past `finalize`, so the flag raised on the\n // line above would stay up for good.\n const source = defer((): Observable<readonly unknown[]> => {\n const result = loader(query);\n return isObservable(result) ? result : from(Promise.resolve(result));\n });\n return source.pipe(\n // A loader can hand back a long-lived observable (a store selector,\n // say) that emits and never completes — so the first value lowers the\n // flag. `finalize` still covers completion, errors and cancellation,\n // including a loader that completes without emitting.\n tap(() => this.loaderLoading.set(false)),\n // INSIDE the projection, which is the whole point: an error allowed to\n // reach the outer subscriber closes the subscription for good, and the\n // select then never calls the loader again for the life of the\n // component — silently, since nothing here has an error callback. Kept\n // inside, one failed request costs that query and nothing else.\n // Reported as \"no results\" rather than as an error row: the panel has\n // no error state, and stale results for a query two keystrokes old\n // would read as an answer to the current one.\n catchError(() => of<readonly unknown[]>([])),\n finalize(() => this.loaderLoading.set(false))\n );\n }),\n takeUntilDestroyed(this.destroyRef)\n )\n .subscribe(items => this.loadedOptions.set(items));\n\n // Wire the virtual scroll listener + viewport/row measurement while the panel\n // is open and virtualized. Re-runs when the panel opens/closes or the virtual\n // list mounts/unmounts; the microtask defers the DOM read until the overlay\n // portal is attached. Browser-only — the panel never prerenders (overlay).\n effect(onCleanup => {\n if (!isPlatformBrowser(this.platformId)) return;\n if (!this.open() || !this.virtualActive()) return;\n let raf = 0;\n let ro: ResizeObserver | null = null;\n let el: HTMLElement | null = null;\n const onScroll = (): void => {\n if (raf) return;\n raf = requestAnimationFrame(() => {\n raf = 0;\n if (el) this.scrollTop.set(el.scrollTop);\n });\n };\n queueMicrotask(() => {\n el = this.vlistElement;\n if (!el) return;\n this.viewportPx.set(el.clientHeight);\n if (this.rowHeight() === 0) {\n const h = el.querySelector<HTMLElement>('.wr-option')?.offsetHeight ?? 0;\n if (h > 0) this.measuredRowPx.set(h);\n }\n // Re-seed the scroll with the now-measured row height + real viewport so\n // a deep pre-selected active row lands correctly on first open (the seed\n // before open used the fallback height). No-op when it's already in view.\n this.ensureVisible(this.activeIndex());\n // Sync the freshly-attached element to the retained signal — seeds the\n // scroll to the active option and avoids a blank panel on reopen.\n if (el.scrollTop !== this.scrollTop()) el.scrollTop = this.scrollTop();\n el.addEventListener('scroll', onScroll, { passive: true });\n if (typeof ResizeObserver !== 'undefined') {\n ro = new ResizeObserver(() => {\n if (el) this.viewportPx.set(el.clientHeight);\n });\n ro.observe(el);\n }\n });\n onCleanup(() => {\n if (raf) cancelAnimationFrame(raf);\n if (el) el.removeEventListener('scroll', onScroll);\n ro?.disconnect();\n });\n });\n }\n\n // WrSelectContext\n\n isSelected(value: unknown): boolean {\n if (this.isMulti()) return this.asArray(this.value()).includes(value);\n return this.value() === value;\n }\n\n selectOption(value: unknown): void {\n // The panel cannot open while read-only, but `selectOption` is reachable\n // from `WrSelectContext` — a projected `<wr-option>` calls it directly — so\n // the guard belongs on the write, not only on the way in.\n if (this.isReadonly()) return;\n if (this.isMulti()) {\n const current = this.asArray(this.value());\n const idx = current.indexOf(value);\n let next: readonly unknown[];\n if (idx >= 0) {\n next = [...current.slice(0, idx), ...current.slice(idx + 1)];\n } else {\n const cap = this.maxItems();\n if (cap > 0 && current.length >= cap) return;\n next = [...current, value];\n }\n this.value.set(next);\n this.touch.emit();\n // Keep the panel open in multi mode so the user can keep picking.\n return;\n }\n this.value.set(value);\n this.touch.emit();\n // A committed choice replaces the query, focus or no focus: the field goes\n // back to showing the selected label. The close-effect below deliberately\n // will not do it while the field is focused, which is right for a panel\n // that closed under `minChars` and wrong for one that closed on a pick.\n this.searchQuery.set('');\n this.open.set(false);\n }\n\n registerOption(reg: WrSelectOptionRegistration): () => void {\n this.registry.update(list => [...list, reg]);\n return () => this.registry.update(list => list.filter(o => o.id !== reg.id));\n }\n\n // Chip handlers (multi + tag)\n\n /**\n * Remove one selection (chip × button) BY POSITION. Works for multi and tag\n * modes.\n *\n * Positional, not by value: under `allowDuplicates` two chips carry the same\n * string, and a filter on equality deleted every copy at once — one click on\n * the second \"red\" took both reds with it. `visibleChips()` slices the HEAD\n * of `selectedChips()`, which maps the value array one for one, so the\n * `$index` a chip was rendered with indexes the value array directly. The\n * multi-mode toggle in `selectOption` was already positional.\n */\n protected removeChip(index: number, event: Event): void {\n event.stopPropagation();\n if (this.isDisabled() || this.isReadonly() || !this.hasChips()) return;\n const current = this.asArray(this.value());\n if (index < 0 || index >= current.length) return;\n this.value.set([...current.slice(0, index), ...current.slice(index + 1)]);\n this.touch.emit();\n }\n\n /** Clear every selection (× button). Multi/tag → empty array; search → null. */\n protected clearAll(event: Event): void {\n event.stopPropagation();\n if (this.isDisabled() || this.isReadonly()) return;\n if (this.hasChips()) {\n this.value.set([]);\n // `isSearchTrigger()`, not `isSearch()` — a searchable single renders the\n // same × and would otherwise fall through to the no-op below.\n } else if (this.isSearchTrigger()) {\n this.value.set(null);\n this.searchQuery.set('');\n } else {\n return;\n }\n this.touch.emit();\n }\n\n // Tag-mode draft handlers\n\n /** Capacity check used by tag mode to refuse the next add. */\n protected readonly atCapacity = computed(() => {\n const cap = this.maxItems();\n return cap > 0 && this.asArray(this.value()).length >= cap;\n });\n\n protected onTagInput(event: Event): void {\n if (this.isDisabled() || this.isReadonly()) return;\n this.draft.set((event.target as HTMLInputElement).value);\n }\n\n protected onTagKeydown(event: KeyboardEvent): void {\n if (this.isDisabled() || this.isReadonly()) return;\n const seps = this.separators();\n\n if (seps.includes(event.key)) {\n event.preventDefault();\n this.commitDraft();\n return;\n }\n\n if (event.key === 'Backspace' && this.draft() === '') {\n const chips = this.selectedChips();\n if (chips.length > 0) {\n event.preventDefault();\n this.removeChip(chips.length - 1, event);\n }\n }\n }\n\n protected onTagPaste(event: ClipboardEvent): void {\n if (this.isDisabled() || this.isReadonly()) return;\n const text = event.clipboardData?.getData('text') ?? '';\n if (!text) return;\n\n const seps = this.separators().filter(s => s !== 'Enter');\n if (seps.length === 0) return;\n\n event.preventDefault();\n // `-` has to be escaped too, and it is the one that bites: unescaped it\n // OPENS A RANGE inside the class. `[',', '-']` compiled to `/[,-\\n]+/` —\n // \"Range out of order\", a SyntaxError thrown after `preventDefault()`, so\n // the paste was dropped whole; `[',', '-', ';']` compiled without\n // complaint to a `,`–`;` range that swallowed every digit, shredding\n // `2024-01-02` into nothing. A lone `-` only worked because it landed\n // first in the class, where it is literal — position-dependent luck.\n const escaped = seps.map(s => s.replace(/[-.*+?^${}()|[\\]\\\\]/g, '\\\\$&')).join('');\n const splitRegex = new RegExp(`[${escaped}\\\\n]+`);\n for (const part of text.split(splitRegex)) this.tryAddTag(part);\n }\n\n protected onTagBlur(): void {\n if (this.draft().trim()) this.commitDraft();\n this.touch.emit();\n }\n\n private commitDraft(): void {\n const v = this.draft().trim();\n this.draft.set('');\n if (v) this.tryAddTag(v);\n }\n\n private tryAddTag(raw: string): void {\n if (!this.isTag() || this.atCapacity()) return;\n const value = raw.trim();\n if (!value) return;\n\n const existing = this.asArray(this.value()).map(String);\n if (!this.allowDuplicates() && existing.includes(value)) return;\n\n const validator = this.validate();\n if (validator && !validator(value, existing)) return;\n\n const next = [...existing, value];\n this.value.set(next);\n this.touch.emit();\n }\n\n // Template handlers\n\n protected onTriggerClick(): void {\n if (this.isDisabled() || this.isReadonly()) return;\n // Tag mode has no panel — clicks should land on the inline input,\n // not toggle an overlay that's never created.\n if (this.isTag()) return;\n this.open.update(v => !v);\n }\n\n protected onTriggerKey(event: KeyboardEvent): void {\n if (this.isDisabled() || this.isReadonly()) return;\n\n if (!this.open()) {\n if (event.key === 'Enter' || event.key === ' ' || event.key === 'ArrowDown' || event.key === 'ArrowUp') {\n event.preventDefault();\n this.seedActiveIndex();\n this.open.set(true);\n return;\n }\n // Multi mode: Backspace on closed trigger removes last chip. Tag\n // mode has its own input handler — never reaches this branch. A\n // searchable multi does, so only claim Backspace once its query is empty\n // — otherwise it would eat a chip and a character at once.\n if (\n event.key === 'Backspace' &&\n this.isMulti() &&\n this.hasSelection() &&\n (!this.hasChipSearch() || this.searchQuery() === '')\n ) {\n event.preventDefault();\n const chips = this.selectedChips();\n if (chips.length > 0) this.removeChip(chips.length - 1, event);\n }\n return;\n }\n\n // Open — navigation/selection.\n switch (event.key) {\n case 'Tab':\n // Let focus leave naturally — no `preventDefault` — but do not let the panel\n // outlive it. Nothing closed on Tab, so the listbox stayed on screen with a\n // live `aria-activedescendant` while the combobox no longer had focus: it can\n // cover the control that just took it (WCAG 2.4.11), and it keeps tracking a\n // trigger nobody is on, so a click aimed at what is underneath lands on an\n // option and commits into a select the user had already left. `wr-dropdown`\n // and `wr-context-menu` close on Tab for the same reason.\n //\n // Closing does NOT commit the active option. The cursor is SEEDED on open, so\n // tabbing straight through would select a row the user never looked at — and\n // in multi / search / freeText modes there is no single \"the option\" to take.\n this.open.set(false);\n break;\n case 'ArrowDown':\n event.preventDefault();\n this.moveActive(1);\n break;\n case 'ArrowUp':\n event.preventDefault();\n this.moveActive(-1);\n break;\n case 'Home':\n event.preventDefault();\n this.activeIndex.set(this.firstEnabled());\n this.ensureVisible(this.activeIndex());\n break;\n case 'End':\n event.preventDefault();\n this.activeIndex.set(this.lastEnabled());\n this.ensureVisible(this.activeIndex());\n break;\n case 'Enter':\n case ' ': {\n event.preventDefault();\n const idx = this.activeIndex();\n if (this.virtualActive()) {\n // Virtual rows aren't in the DOM to click — select the value directly.\n const list = this.filteredDynamicOptions();\n if (idx >= 0 && idx < list.length) this.selectOption(list[idx]);\n break;\n }\n const list = this.orderedRegistry();\n // Filtered-out options stay registered (they only self-hide via CSS), so\n // the hidden check is load-bearing: without it Enter can commit a row\n // that is not on screen.\n if (idx >= 0 && idx < list.length && !list[idx].disabled && !this.isOptionHidden(list[idx].label())) {\n const id = list[idx].id;\n const el = this.overlayRef?.overlayElement.querySelector<HTMLElement>(`#${CSS.escape(id)}`);\n el?.click();\n }\n break;\n }\n default:\n break;\n }\n }\n\n private seedActiveIndex(): void {\n if (this.virtualActive()) {\n const list = this.filteredDynamicOptions();\n const idx = list.findIndex(it => this.isSelected(it));\n this.activeIndex.set(idx >= 0 ? idx : this.firstEnabled());\n this.ensureVisible(this.activeIndex());\n return;\n }\n const list = this.orderedRegistry();\n let selectedIdx = -1;\n if (this.isMulti()) {\n const arr = this.asArray(this.value());\n if (arr.length > 0) selectedIdx = list.findIndex(o => o.value === arr[0]);\n } else {\n selectedIdx = list.findIndex(o => o.value === this.value());\n }\n this.activeIndex.set(selectedIdx >= 0 ? selectedIdx : this.firstEnabled());\n }\n\n private moveActive(delta: number): void {\n // Virtual rows are never disabled or hidden (the list is already filtered),\n // so navigation is a plain wrap plus a scroll-into-view.\n if (this.virtualActive()) {\n const len = this.filteredDynamicOptions().length;\n if (len === 0) return;\n const i = (this.activeIndex() + delta + len) % len;\n this.activeIndex.set(i);\n this.ensureVisible(i);\n return;\n }\n const list = this.orderedRegistry();\n if (list.length === 0) return;\n let i = this.activeIndex();\n let attempts = list.length;\n while (attempts-- > 0) {\n i = (i + delta + list.length) % list.length;\n const o = list[i];\n if (!o.disabled && !this.isOptionHidden(o.label())) {\n this.activeIndex.set(i);\n this.ensureVisible(i);\n return;\n }\n }\n }\n\n /**\n * Both scan `orderedRegistry`, and that is not interchangeable with\n * `registry`.\n *\n * They RETURN an index, and every reader of `activeIndex` — `activeOptionId`,\n * `moveActive`, `seedActiveIndex`, the Enter branch of `onTriggerKey` —\n * resolves it against DOM order. Scanning creation order here produced an\n * index into the other list: with projected `<wr-option>` children next to\n * `[options]` rows the two differ, so opening or searching left the cursor on\n * a row the user was not looking at, and Enter committed whatever happened to\n * sit at that position in DOM order — a filter-hidden option, which commits\n * nothing at all.\n */\n private firstEnabled(): number {\n if (this.virtualActive()) return this.filteredDynamicOptions().length > 0 ? 0 : -1;\n return this.orderedRegistry().findIndex(o => !o.disabled && !this.isOptionHidden(o.label()));\n }\n\n private lastEnabled(): number {\n if (this.virtualActive()) return this.filteredDynamicOptions().length - 1;\n const list = this.orderedRegistry();\n let found = -1;\n list.forEach((o, i) => {\n if (!o.disabled && !this.isOptionHidden(o.label())) found = i;\n });\n return found;\n }\n\n /** Coerce the multi-mode value into an array (tolerates a scalar or null write). */\n private asArray(value: unknown): readonly unknown[] {\n if (Array.isArray(value)) return value as readonly unknown[];\n if (value == null) return [];\n return [value];\n }\n\n // Overlay\n\n private openOverlay(): void {\n if (this.overlayRef) return;\n\n // On small viewports (when opted in) detach from the trigger and present\n // the panel as a full-width slide-up sheet pinned to the bottom edge.\n const asSheet = wrPresentAsSheet(this.responsive(), this.responsiveConfig);\n\n const positionStrategy = asSheet\n ? this.overlay.position().global().centerHorizontally().bottom('0')\n : this.overlay\n .position()\n .flexibleConnectedTo(this.host)\n .withPositions([\n { originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top' },\n { originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom' },\n ])\n .withPush(true);\n\n this.overlayRef = this.overlay.create({\n positionStrategy,\n scrollStrategy: asSheet ? this.scrollStrategies.block() : this.scrollStrategies.reposition(),\n // Floor the panel at the trigger width (it can still grow for long\n // options) instead of pinning it. The panel fills this via `width: 100%`,\n // so the flex overlay pane has no transparent gutter beside a\n // content-narrow panel — that gutter would otherwise sit \"inside\" the\n // overlay and swallow outside-clicks, leaving the panel open. Mirrors how\n // mat-select sizes its overlay.\n width: asSheet ? '100%' : undefined,\n minWidth: asSheet ? undefined : this.host.nativeElement.getBoundingClientRect().width,\n hasBackdrop: asSheet,\n // `wr-overlay-backdrop`, not a name of our own: that class is what carries\n // the dim and the blur (overlay/styles), and this stylesheet already\n // imports it for exactly this. A custom class also REPLACES the CDK\n // default, so the sheet had an invisible scrim that still ate clicks.\n backdropClass: asSheet ? 'wr-overlay-backdrop' : undefined,\n panelClass: asSheet ? ['wr-select-overlay', 'wr-overlay-sheet'] : 'wr-select-overlay',\n });\n\n const portal = new TemplatePortal(this.panelTpl(), this.vcr);\n this.overlayRef.attach(portal);\n\n // Seed the projected panel's scroll onto the cursor the same way the virtual\n // one is seeded from its own effect: opening a select whose selected option\n // is the 200th shows the cursor, not the top of the list. Synchronous is\n // correct here and a deferral would not be — `attachTemplatePortal` appends\n // the rows and calls `detectChanges()` before returning, and `activeIndex`\n // was seeded before `open()` flipped, so the row is in the DOM and the panel\n // is measurable on this line. The virtual path stays on its effect, which\n // has to wait to MEASURE a row height this one never needs.\n if (!this.virtualActive()) this.ensureVisible(this.activeIndex());\n\n if (asSheet) {\n this.overlayRef\n .backdropClick()\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => this.open.set(false));\n }\n\n this.outsideClick\n .outsidePointerEvents(this.overlayRef)\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(event => {\n if (this.host.nativeElement.contains(event.target as Node)) return;\n this.open.set(false);\n });\n\n this.overlayRef\n .keydownEvents()\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(event => {\n if (event.key === 'Escape') {\n event.preventDefault();\n this.open.set(false);\n }\n });\n }\n\n private closeOverlay(): void {\n if (!this.overlayRef) return;\n this.overlayRef.dispose();\n this.overlayRef = null;\n }\n}\n","@if (isSearchTrigger()) {\n <!-- Search mode (or a searchable single): a real text input drives a filtered\n overlay panel. The wrapper isn't itself focusable — the input is the\n tabstop. -->\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events,@angular-eslint/template/interactive-supports-focus -->\n <div class=\"wr-select__trigger wr-select__trigger--search\" (click)=\"focusSearchInput()\">\n <!-- `id` / `aria-describedby` / `aria-invalid` come from a surrounding\n `<wr-form-field>` and are null without one — see `controlId` in the\n component. They go on the tab stop, the only labelable element here.\n `aria-label` is the trigger's name and belongs on the same element for\n the same reason: this input carries `role=\"combobox\"`, and the four\n other trigger shapes all bind `resolvedAriaLabel()`. Without it a\n search select with no placeholder rendered a combobox with no name at\n all — the one shape where the documented `ariaLabel` input reached\n nothing. -->\n <input\n #searchInput\n type=\"text\"\n role=\"combobox\"\n class=\"wr-select__search-input\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n [attr.id]=\"controlId()\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-describedby]=\"describedBy()\"\n [attr.aria-invalid]=\"ariaInvalid()\"\n [disabled]=\"isDisabled()\"\n [attr.aria-haspopup]=\"'listbox'\"\n [attr.aria-expanded]=\"open()\"\n [attr.aria-controls]=\"listboxId\"\n [attr.aria-activedescendant]=\"open() ? activeOptionId() || null : null\"\n [attr.aria-readonly]=\"isReadonly() || null\"\n [readonly]=\"isReadonly()\"\n [placeholder]=\"resolvedPlaceholder()\"\n [value]=\"searchDisplay()\"\n (input)=\"onSearchInput($event)\"\n (focus)=\"onSearchFocus()\"\n (keydown)=\"onSearchKey($event)\"\n (blur)=\"onSearchBlur()\"\n />\n <!-- Pointer-only, and the `keydown.enter` / `keydown.space` pair this used to\n carry was dead code rather than the keyboard path it looked like: the ×\n is `tabindex=\"-1\"` with no roving owner, so no key event ever originates\n here to bubble into a handler. It stays unfocusable because the same\n span sits inside the BUTTON trigger further down, where a focusable\n child is `nested-interactive` — the defect the window taskbar's close\n button already taught this repo. The keyboard reaches the function\n instead: Backspace on the empty field, which `onSearchKey` routes to\n `clearAll` for a single and to the last chip for a multi. -->\n @if (clearable() && hasSelection() && !isDisabled() && !isReadonly()) {\n <span\n class=\"wr-select__clear\"\n role=\"button\"\n [attr.aria-label]=\"resolvedClear()\"\n tabindex=\"-1\"\n (click)=\"clearAll($event)\"\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=\"M18 6 6 18\" />\n <path d=\"m6 6 12 12\" />\n </svg>\n </span>\n }\n <svg\n class=\"wr-icon__svg wr-select__chevron\"\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=\"m6 9 6 6 6-6\" />\n </svg>\n </div>\n} @else if (isTag() || hasChipSearch()) {\n <!-- Chip trigger — tag mode, or a searchable multi. A focusable input lives\n inside, so the wrapper itself only exists to host chips and forward\n whitespace clicks to the input. Tag mode needs no role (users tab\n straight into the input); the searchable multi is a real combobox, so it\n carries the listbox wiring. The click handler is a mouse-only\n convenience. -->\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events,@angular-eslint/template/interactive-supports-focus -->\n <div\n class=\"wr-select__trigger wr-select__trigger--tag\"\n [attr.aria-disabled]=\"isDisabled() || null\"\n (click)=\"focusTagInput()\"\n >\n <span class=\"wr-select__chips\">\n @for (chip of visibleChips(); track $index) {\n <span class=\"wr-select__chip\">\n <span class=\"wr-select__chip-label\">{{ chip.label }}</span>\n @if (!isReadonly()) {\n <span\n class=\"wr-select__chip-remove\"\n role=\"button\"\n [attr.aria-label]=\"chipRemoveLabel({ label: chip.label })\"\n tabindex=\"-1\"\n (click)=\"removeChip($index, $event)\"\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=\"M18 6 6 18\" />\n <path d=\"m6 6 12 12\" />\n </svg>\n </span>\n }\n </span>\n }\n @if (hiddenChipCount(); as extra) {\n <span class=\"wr-select__chip wr-select__chip--more\">{{ moreLabel({ count: extra }) }}</span>\n }\n <!-- At `maxItems` this input goes READONLY, never disabled: it is the only\n tab stop in the whole control (the chip × and the clear button are\n `tabindex=\"-1\"` spans), so disabling it left a full tag select with\n nothing focusable at all — and Backspace on an empty draft, the one\n keyboard way back UNDER the cap, is bound to this very element. It was\n never needed as enforcement either: `tryAddTag` already refuses past\n capacity. -->\n <input\n #tagInput\n type=\"text\"\n class=\"wr-select__tag-input\"\n autocomplete=\"off\"\n [attr.id]=\"controlId()\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-describedby]=\"describedBy()\"\n [attr.aria-invalid]=\"ariaInvalid()\"\n spellcheck=\"false\"\n [value]=\"hasChipSearch() ? searchQuery() : draft()\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"isReadonly() || (isTag() && atCapacity())\"\n [attr.aria-readonly]=\"hasChipSearch() && isReadonly() ? true : null\"\n [placeholder]=\"hasSelection() ? '' : resolvedPlaceholder()\"\n [attr.role]=\"hasChipSearch() ? 'combobox' : null\"\n [attr.aria-haspopup]=\"hasChipSearch() ? 'listbox' : null\"\n [attr.aria-expanded]=\"hasChipSearch() ? open() : null\"\n [attr.aria-controls]=\"hasChipSearch() ? listboxId : null\"\n [attr.aria-activedescendant]=\"hasChipSearch() && open() ? activeOptionId() || null : null\"\n (input)=\"onChipsInput($event)\"\n (keydown)=\"onChipsKeydown($event)\"\n (paste)=\"onChipsPaste($event)\"\n (focus)=\"onChipsFocus()\"\n (blur)=\"onChipsBlur()\"\n />\n </span>\n\n @if (clearable() && hasSelection() && !isDisabled() && !isReadonly()) {\n <span\n class=\"wr-select__clear\"\n role=\"button\"\n [attr.aria-label]=\"resolvedClear()\"\n tabindex=\"-1\"\n (click)=\"clearAll($event)\"\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=\"M18 6 6 18\" />\n <path d=\"m6 6 12 12\" />\n </svg>\n </span>\n }\n </div>\n} @else {\n <button\n type=\"button\"\n class=\"wr-select__trigger\"\n role=\"combobox\"\n [attr.id]=\"controlId()\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-describedby]=\"describedBy()\"\n [attr.aria-invalid]=\"ariaInvalid()\"\n [disabled]=\"isDisabled()\"\n [attr.aria-haspopup]=\"'listbox'\"\n [attr.aria-expanded]=\"open()\"\n [attr.aria-controls]=\"listboxId\"\n [attr.aria-activedescendant]=\"open() ? activeOptionId() || null : null\"\n [attr.aria-readonly]=\"isReadonly() || null\"\n (click)=\"onTriggerClick()\"\n (keydown)=\"onTriggerKey($event)\"\n (blur)=\"touch.emit()\"\n >\n @if (isMulti()) {\n @if (hasSelection()) {\n <span class=\"wr-select__chips\">\n @for (chip of visibleChips(); track $index) {\n <span class=\"wr-select__chip\">\n <span class=\"wr-select__chip-label\">{{ chip.label }}</span>\n @if (!isReadonly()) {\n <span\n class=\"wr-select__chip-remove\"\n role=\"button\"\n [attr.aria-label]=\"chipRemoveLabel({ label: chip.label })\"\n tabindex=\"-1\"\n (click)=\"removeChip($index, $event)\"\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=\"M18 6 6 18\" />\n <path d=\"m6 6 12 12\" />\n </svg>\n </span>\n }\n </span>\n }\n @if (hiddenChipCount(); as extra) {\n <span class=\"wr-select__chip wr-select__chip--more\">{{ moreLabel({ count: extra }) }}</span>\n }\n </span>\n } @else {\n <span class=\"wr-select__placeholder\">{{ resolvedPlaceholder() }}</span>\n }\n } @else {\n @if (selectedLabel(); as label) {\n <span class=\"wr-select__value\">{{ label }}</span>\n } @else {\n <span class=\"wr-select__placeholder\">{{ resolvedPlaceholder() }}</span>\n }\n }\n\n @if (isMulti() && clearable() && hasSelection() && !isDisabled() && !isReadonly()) {\n <span\n class=\"wr-select__clear\"\n role=\"button\"\n [attr.aria-label]=\"resolvedClear()\"\n tabindex=\"-1\"\n (click)=\"clearAll($event)\"\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=\"M18 6 6 18\" />\n <path d=\"m6 6 12 12\" />\n </svg>\n </span>\n }\n\n <svg\n class=\"wr-icon__svg wr-select__chevron\"\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=\"m6 9 6 6 6-6\" />\n </svg>\n </button>\n}\n\n<ng-template #panelTpl>\n <div\n class=\"wr-select-panel\"\n [class.wr-select-panel--sm]=\"resolvedSize() === 'sm'\"\n [class.wr-select-panel--lg]=\"resolvedSize() === 'lg'\"\n [class.wr-select-panel--virtual]=\"virtualActive()\"\n role=\"listbox\"\n [attr.id]=\"listboxId\"\n [attr.aria-multiselectable]=\"isMulti() ? 'true' : null\"\n [attr.aria-busy]=\"isLoading() ? 'true' : null\"\n >\n <!-- `aria-busy` belongs on the listbox, not on this row: it is the container\n whose required `option` children are temporarily missing, and a global\n ARIA attribute on a role-less child makes that child an owned element the\n listbox may not own (axe `aria-required-children`, critical). Plain text\n inside the listbox is fine — only ELEMENTS are checked. -->\n @if (isLoading()) {\n <div class=\"wr-select-panel__loading\">{{ resolvedLoading() }}</div>\n }\n\n @if (virtualActive()) {\n <!-- Windowed data-array rows: plain role=\"option\" elements (not <wr-option>),\n navigated via the input's aria-activedescendant, selected by value. -->\n <div class=\"wr-select-panel__vlist\" [style.max-height]=\"resolvedViewportHeight()\">\n @if (virtualWindow().padTop > 0) {\n <div class=\"wr-select-panel__vspacer\" aria-hidden=\"true\" [style.height.px]=\"virtualWindow().padTop\"></div>\n }\n @for (entry of windowOptions(); track entry.index) {\n <!-- Keyboard handled by the search input via aria-activedescendant; the\n row is a pointer target only. -->\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events,@angular-eslint/template/interactive-supports-focus -->\n <div\n role=\"option\"\n class=\"wr-option\"\n [id]=\"virtualRowId(entry.index)\"\n [class.wr-option--active]=\"entry.index === activeIndex()\"\n [class.wr-option--selected]=\"isSelected(entry.item)\"\n [attr.aria-selected]=\"isSelected(entry.item)\"\n [attr.aria-setsize]=\"filteredDynamicOptions().length\"\n [attr.aria-posinset]=\"entry.index + 1\"\n (click)=\"selectOption(entry.item)\"\n >\n {{ displayWith()(entry.item) }}\n </div>\n }\n @if (virtualWindow().padBottom > 0) {\n <div class=\"wr-select-panel__vspacer\" aria-hidden=\"true\" [style.height.px]=\"virtualWindow().padBottom\"></div>\n }\n </div>\n } @else {\n <!-- Dynamic options from [options] or async [loader] (search mode).\n Rendered as wr-option so the standard registration / filter\n pipeline applies uniformly. -->\n @for (item of dynamicOptions(); track $index) {\n <wr-option [value]=\"item\">{{ displayWith()(item) }}</wr-option>\n }\n }\n\n <!-- Projected static options — always present (a conditional `<ng-content>`\n would drop projected content). Empty whenever `virtualActive`. -->\n <ng-content />\n\n <!-- A listbox may only own `option` and `group` children, and as a bare `<div>`\n this row was the only thing in the tree when it showed — an\n `aria-required-children` critical. It cannot move out of the listbox the\n way the command palette's does: this element IS the listbox, and the id\n the trigger's `aria-controls` names is what gives it its accessible name.\n So it announces as a disabled option instead. Keyboard navigation skips\n it for free — arrow keys walk the registered `wr-option`s, and nothing\n registers this row. -->\n @if (hasNoResults()) {\n <div class=\"wr-select-panel__empty\" role=\"option\" aria-selected=\"false\" aria-disabled=\"true\">\n {{ resolvedNoResults() }}\n </div>\n }\n </div>\n</ng-template>\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 { Component, ViewEncapsulation, input } from '@angular/core';\n\nimport { randomId } from 'ngwr/utils';\n\n/**\n * Visually groups options under a label inside a `<wr-select>`.\n *\n * @example\n * ```html\n * <wr-option-group label=\"Sizes\">\n * <wr-option value=\"sm\">Small</wr-option>\n * <wr-option value=\"md\">Medium</wr-option>\n * </wr-option-group>\n * ```\n */\n@Component({\n selector: 'wr-option-group',\n templateUrl: './option-group.html',\n encapsulation: ViewEncapsulation.None,\n host: { class: 'wr-option-group', role: 'group', '[attr.aria-labelledby]': 'labelId' },\n})\nexport class WrOptionGroup {\n /** Section heading shown above the options. */\n readonly label = input.required<string>();\n\n /**\n * `role=\"group\"` alone announces an unnamed group — the visible heading has to\n * be wired to it for the name to reach a screen reader.\n */\n protected readonly labelId = randomId('wr-option-group-label');\n}\n","<div class=\"wr-option-group__label\" [id]=\"labelId\">{{ label() }}</div>\n<ng-content />\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA;;;;;AAKG;AAyEH;;;;;AAKG;MACU,SAAS,GAAG,IAAI,cAAc,CAAkB,WAAW;;ACpFxE;;;;;AAKG;AAkBH,IAAI,GAAG,GAAG,CAAC;AAEX;;;;;;;;;;;AAWG;MAcU,QAAQ,CAAA;;IAEV,KAAK,GAAG,KAAK,CAAC,QAAQ;8EAAW;;IAGjC,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,qBAAqB,EAAA,CAAG;;AAG7D,IAAA,EAAE,GAAG,CAAA,UAAA,EAAa,EAAE,GAAG,EAAE;AAEjB,IAAA,IAAI,GAAG,MAAM,CAA0B,UAAU,CAAC;IAClD,MAAM,GAAG,MAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AAE/D;;;;;;;;;;;;;;;;;;;;;AAqBG;IACc,SAAS,GAAG,MAAM,CAAC,EAAE;kFAAC;AACtB,IAAA,KAAK,GAAmB,IAAI,CAAC,SAAS,CAAC,UAAU,EAAE;AAEpE;;;AAGG;AACgB,IAAA,QAAQ,GAAG,QAAQ,CAAC,MAAK;AAC1C,QAAA,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM;AAC1B,QAAA,IAAI,CAAC,MAAM;AAAE,YAAA,OAAO,KAAK;;QAEzB,MAAM,CAAC,KAAK,EAAE;QACd,OAAO,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;IACxC,CAA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