@liquid-js/lyr-core 22.0.0-alpha.0 → 22.0.0-alpha.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/fesm2022/liquid-js-lyr-core-base.mjs +13 -1
- package/fesm2022/liquid-js-lyr-core-base.mjs.map +1 -1
- package/fesm2022/liquid-js-lyr-core-button.mjs +5 -2
- package/fesm2022/liquid-js-lyr-core-button.mjs.map +1 -1
- package/fesm2022/liquid-js-lyr-core-checkbox.mjs +2 -2
- package/fesm2022/liquid-js-lyr-core-checkbox.mjs.map +1 -1
- package/fesm2022/liquid-js-lyr-core-datepicker.mjs +7 -5
- package/fesm2022/liquid-js-lyr-core-datepicker.mjs.map +1 -1
- package/fesm2022/liquid-js-lyr-core-file-drop.mjs +7 -4
- package/fesm2022/liquid-js-lyr-core-file-drop.mjs.map +1 -1
- package/fesm2022/liquid-js-lyr-core-input.mjs +8 -5
- package/fesm2022/liquid-js-lyr-core-input.mjs.map +1 -1
- package/fesm2022/liquid-js-lyr-core-radio.mjs +1 -1
- package/fesm2022/liquid-js-lyr-core-radio.mjs.map +1 -1
- package/fesm2022/liquid-js-lyr-core-select.mjs +25 -15
- package/fesm2022/liquid-js-lyr-core-select.mjs.map +1 -1
- package/fesm2022/liquid-js-lyr-core-slider.mjs +5 -2
- package/fesm2022/liquid-js-lyr-core-slider.mjs.map +1 -1
- package/fesm2022/liquid-js-lyr-core-timepicker.mjs +1 -1
- package/fesm2022/liquid-js-lyr-core-timepicker.mjs.map +1 -1
- package/fesm2022/liquid-js-lyr-core-toggle.mjs +2 -2
- package/fesm2022/liquid-js-lyr-core-toggle.mjs.map +1 -1
- package/package.json +1 -1
- package/types/liquid-js-lyr-core-base.d.ts +6 -1
- package/types/liquid-js-lyr-core-button.d.ts +1 -1
- package/types/liquid-js-lyr-core-select.d.ts +5 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"liquid-js-lyr-core-select.mjs","names":["convertToBoolProperty","convertToBoolProperty","convertToBoolProperty","enableTransitionsAfterRender","convertToBoolProperty","convertToBoolProperty","enableTransitionsAfterRender","convertToBoolProperty","NbActiveDescendantKeyManagerFactoryService","enableTransitionsAfterRender","isComposing","convertToBoolProperty","NbActiveDescendantKeyManagerFactoryService","isComposing","NbKeyManagerActiveItemMode","NbActiveDescendantKeyManagerFactoryService","convertToBoolProperty","enableTransitionsAfterRender","isComposing"],"sources":["../../../packages/core/src/components/select/select-injection-tokens.ts","../../../packages/core/src/components/option/option-reveal.ts","../../../packages/core/src/components/option/option-group.component.ts","../../../packages/core/src/components/option/option-group.component.html","../../../packages/core/src/components/option/option-list-item.ts","../../../packages/core/src/components/option/option-level.ts","../../../packages/core/src/components/option/option-nested.component.ts","../../../packages/core/src/components/option/option-nested.component.html","../../../packages/core/src/components/option/option.component.ts","../../../packages/core/src/components/option/option.component.html","../../../packages/core/src/components/option/option-list.component.ts","../../../packages/core/src/components/option/option-list.component.html","../../../packages/core/src/components/option/option-list.module.ts","../../../packages/core/src/components/tag/tag-list-size.ts","../../../packages/core/src/components/tag/tag.component.ts","../../../packages/core/src/components/tag/tag.component.html","../../../packages/core/src/components/select/select.component.ts","../../../packages/core/src/components/select/select.component.html","../../../packages/core/src/components/select/select.module.ts","../../../packages/core/src/components/autocomplete/autocomplete.component.ts","../../../packages/core/src/components/autocomplete/autocomplete.component.html","../../../packages/core/src/components/autocomplete/autocomplete-ref.ts","../../../packages/core/src/components/autocomplete/autocomplete.directive.ts","../../../packages/core/src/components/autocomplete/autocomplete.module.ts","../../../packages/core/src/components/tag/tag-input.directive.ts","../../../packages/core/src/components/tag/tag-list.component.ts","../../../packages/core/src/components/tag/tag-list.component.html","../../../packages/core/src/components/tag/tag.module.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core'\n\nimport type { NbSelectComponent } from './select.component'\n\n/**\n * The select an option belongs to; `nb-select` provides it.\n */\nexport const NB_SELECT_INJECTION_TOKEN = new InjectionToken<NbSelectComponent>('NB_SELECT_INJECTION_TOKEN')\n","/**\n * Asks the option list to show an option outside its laid-out window, e.g. before it takes focus.\n */\nexport const NB_OPTION_REVEAL_EVENT = 'nboptionreveal'\n","import { Component, computed, ElementRef, inject, input, Signal, signal } from '@angular/core'\n\nimport { ɵconvertToBoolProperty as convertToBoolProperty, NbBooleanInput } from '@liquid-js/lyr-core/base'\n\nlet lastOptionGroupId = 0\n\n/**\n * Groups the options of a select or autocomplete under a `title`; a `disabled` group disables its options. The group\n * hides while a search leaves out all its options.\n *\n * @styles\n *\n * option-group-text-color:\n * option-group-text-font-weight:\n * option-group-tiny-start-padding:\n * option-group-small-start-padding:\n * option-group-medium-start-padding:\n * option-group-large-start-padding:\n * option-group-giant-start-padding:\n **/\n@Component({\n selector: 'nb-option-group',\n styleUrls: ['./option-group.component.scss'],\n templateUrl: './option-group.component.html',\n host: {\n 'role': 'group',\n // Hidden when a select's search leaves out all its options.\n '[class.filtered]': 'allFiltered()',\n '[attr.aria-labelledby]': 'titleId',\n '[attr.disabled]': \"disabled() ? '' : null\"\n }\n})\nexport class NbOptionGroupComponent {\n protected readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef)\n protected readonly titleId = `nb-option-group-title-${lastOptionGroupId++}`\n\n readonly title = input<string>()\n\n /**\n * Disables the options in the group.\n */\n readonly disabled = input<boolean, NbBooleanInput>(false, { transform: convertToBoolProperty })\n\n // Options register themselves; importing them here would be circular.\n protected readonly options = signal(new Array<{ filtered: Signal<boolean> }>())\n protected readonly allFiltered = computed(() => {\n const options = this.options()\n return options.length > 0 && options.every((option) => option.filtered())\n })\n\n addOption(option: { filtered: Signal<boolean> }) {\n this.options.update((options) => [...options, option])\n }\n\n removeOption(option: { filtered: Signal<boolean> }) {\n this.options.update((options) => options.filter((existing) => existing !== option))\n }\n\n /**\n * Set by its select: whether nothing in the group is in view, e.g. the list is drilled into a nested option outside\n * it, which hides it; or whether the list is drilled into a nested option in it, which hides only its title.\n */\n setNestedView(collapsed: boolean, drilledInto: boolean) {\n const host = this.elementRef.nativeElement\n host.classList.toggle('nb-option-collapsed', collapsed)\n host.querySelector(`#${this.titleId}`)?.classList.toggle('nb-option-collapsed', drilledInto)\n host.setAttribute('role', drilledInto ? 'none' : 'group')\n }\n}\n","<span class=\"option-group-title\"\n [id]=\"titleId\"><span dir=\"auto\">{{ title() }}</span></span>\n<ng-content select=\"nb-option, nb-option-nested, ng-container\" />\n","import { InjectionToken } from '@angular/core'\n\nimport { NbFocusableOption, ɵNbHighlightableOption as NbHighlightableOption } from '@liquid-js/lyr-core/cdk'\n\n/**\n * An entry the keyboard moves through in an option list: an option, or the row of a nested option.\n */\nexport interface NbOptionListItem extends NbFocusableOption, NbHighlightableOption {\n readonly id: string\n readonly disabled: boolean\n readonly hidden: boolean\n}\n\n/**\n * Provided by options and nested options, so a select can query both, in the order they're in.\n */\nexport const NB_OPTION_LIST_ITEM = new InjectionToken<NbOptionListItem>('NB_OPTION_LIST_ITEM')\n","/**\n * Sets how deep a row is in the view of a list, which indents it.\n */\nexport function setLevel(row: HTMLElement, level: number) {\n // Only indented rows have the spacer that indents them, so lists without nested options have none.\n row.classList.toggle('nb-option-indented', level > 1)\n if (level > 1) {\n row.style.setProperty('--nb-option-level', String(level))\n } else {\n row.style.removeProperty('--nb-option-level')\n }\n}\n","import { Component, computed, ElementRef, inject, input, model, signal, Signal, viewChild } from '@angular/core'\n\nimport { ɵconvertToBoolProperty as convertToBoolProperty, NbBooleanInput } from '@liquid-js/lyr-core/base'\nimport { NbIconComponent } from '@liquid-js/lyr-core/icon'\nimport { NB_SELECT_INJECTION_TOKEN } from '../select/select-injection-tokens'\nimport { NB_OPTION_LIST_ITEM, NbOptionListItem } from './option-list-item'\nimport { NbOptionGroupComponent } from './option-group.component'\nimport { NB_OPTION_REVEAL_EVENT } from './option-reveal'\nimport { setLevel } from './option-level'\n\nlet lastOptionNestedId = 0\n\n// What a nested option needs of the options in it; importing them here would be circular.\ninterface NbNestedChildOption {\n filtered: Signal<boolean>\n selected: Signal<boolean>\n}\n\n/**\n * Options in a `nb-select` that open from a row, as a tree. Only the options in them are selected, not the nested\n * options themselves. Nested options can hold more nested options, and sit in groups.\n *\n * ```html\n * <nb-select placeholder=\"Import from\">\n * <nb-option value=\"local\">This device</nb-option>\n * <nb-option-nested title=\"Cloud\">\n * <nb-option value=\"drive\">Google Drive</nb-option>\n * <nb-option-nested title=\"Object storage\">\n * <nb-option value=\"s3\">AWS S3</nb-option>\n * </nb-option-nested>\n * </nb-option-nested>\n * </nb-select>\n * ```\n *\n * A row opens and closes on click, Enter or Space; ArrowRight opens it, or moves into it when it's open, and ArrowLeft\n * closes it or moves to its parent. The list shows up to `nestedLevels` levels of the select at once (3 by default):\n * opening a deeper one drills in, so the list starts at a nested option, with a row to go back. A collapsed row shows\n * when an option in it is selected, and opens to show an option that becomes active, e.g. the selected one as the\n * list opens. A search shows the matching options with the nested options they're in.\n *\n * @styles\n *\n * option-nested-icon-color:\n * option-nested-selected-text-color:\n * option-nested-tiny-indent:\n * option-nested-small-indent:\n * option-nested-medium-indent:\n * option-nested-large-indent:\n * option-nested-giant-indent:\n */\n@Component({\n selector: 'nb-option-nested',\n templateUrl: './option-nested.component.html',\n styleUrls: ['./option-nested.component.scss'],\n imports: [NbIconComponent],\n providers: [{ provide: NB_OPTION_LIST_ITEM, useExisting: NbOptionNestedComponent }],\n host: {\n 'tabindex': '-1',\n 'role': 'treeitem',\n '[attr.id]': 'id',\n '[attr.aria-labelledby]': 'titleId',\n '[attr.aria-disabled]': 'disabled || null',\n '[attr.disabled]': \"disabled ? '' : null\",\n '[class.active]': 'active()',\n '[class.filtered]': 'filtered()',\n '[class.has-selected]': 'hasSelected()'\n }\n})\nexport class NbOptionNestedComponent implements NbOptionListItem {\n protected readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef)\n protected readonly select = inject(NB_SELECT_INJECTION_TOKEN, { optional: true })\n readonly group = inject(NbOptionGroupComponent, { optional: true })\n /**\n * The nested option this one is in.\n */\n readonly parentNested = inject(NbOptionNestedComponent, { optional: true, skipSelf: true })\n\n readonly id = `nb-option-nested-${lastOptionNestedId++}`\n protected readonly titleId = `${this.id}-title`\n protected readonly groupId = `${this.id}-group`\n protected readonly row = viewChild.required<ElementRef<HTMLElement>>('row')\n\n /**\n * How deep it is in the select: 1 for a nested option at the top.\n */\n readonly depth: number = (this.parentNested?.depth ?? 0) + 1\n\n readonly title = input<string>()\n\n /**\n * Disables the nested option and the options in it.\n */\n readonly disabledInput = input<boolean, NbBooleanInput>(false, { alias: 'disabled', transform: convertToBoolProperty })\n\n /**\n * Whether its options show.\n */\n readonly expanded = model(false)\n\n /**\n * Whether it's disabled by itself, a group or a nested option it's in.\n */\n readonly isDisabled: Signal<boolean> = computed(\n () => this.disabledInput() || !!this.group?.disabled() || !!this.parentNested?.isDisabled()\n )\n\n // Options register themselves with every nested option they're in.\n protected readonly options = signal(new Array<NbNestedChildOption>())\n protected readonly filtered = computed(() => {\n const options = this.options()\n return options.length > 0 && options.every((option) => option.filtered())\n })\n protected readonly hasSelected = computed(() => this.options().some((option) => option.selected()))\n protected readonly activeState = signal(false)\n protected readonly active = this.activeState.asReadonly()\n protected readonly multiple = computed(() => !!this.select?.multiple())\n protected collapsed = false\n\n get disabled(): boolean {\n return this.isDisabled()\n }\n\n get hidden(): boolean {\n return this.filtered() || this.collapsed\n }\n\n addOption(option: NbNestedChildOption) {\n this.options.update((options) => [...options, option])\n }\n\n removeOption(option: NbNestedChildOption) {\n this.options.update((options) => options.filter((existing) => existing !== option))\n }\n\n /**\n * Set by its select: whether its row is out of view (in a collapsed or drilled-past nested option), how deep it is\n * in the view, whether its options show (it's expanded, or a search shows them), and whether the list is drilled\n * into it or a nested option in it, so only its options show.\n */\n setNestedView(collapsed: boolean, level: number, open: boolean, drilledInto: boolean) {\n this.collapsed = collapsed\n const host = this.elementRef.nativeElement\n host.classList.toggle('expanded', open)\n host.setAttribute('aria-expanded', String(open))\n const row = this.row().nativeElement\n row.classList.toggle('nb-option-collapsed', collapsed)\n setLevel(row, level)\n host.setAttribute('aria-level', String(level))\n // Its row is the list's back row then, and its options are at the top of the tree.\n host.setAttribute('role', drilledInto ? 'none' : 'treeitem')\n host.querySelector(`#${this.groupId}`)?.setAttribute('role', drilledInto ? 'none' : 'group')\n }\n\n getHostElement(): HTMLElement {\n return this.elementRef.nativeElement\n }\n\n /**\n * The row with its title, which shows in the list; the element holds the options in it too.\n */\n getRowElement(): HTMLElement {\n return this.row().nativeElement\n }\n\n getLabel(): string {\n return this.title() ?? ''\n }\n\n focus() {\n // The list scrolls to its row; the element holds the options in it too, so scrolling to it could scroll past it.\n this.reveal()\n this.elementRef.nativeElement.focus({ preventScroll: true })\n }\n\n setActiveStyles() {\n this.reveal()\n this.activeState.set(true)\n }\n\n setInactiveStyles() {\n this.activeState.set(false)\n }\n\n protected toggle(event: Event) {\n event.stopPropagation()\n if (!this.disabled) {\n this.select?.toggleNested(this)\n }\n }\n\n protected reveal() {\n this.select?.revealNested(this)\n this.row().nativeElement.dispatchEvent(new CustomEvent(NB_OPTION_REVEAL_EVENT, { bubbles: true }))\n }\n}\n","<!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- The select's list moves focus and opens groups by keyboard. -->\n<div class=\"option-nested-row\"\n [class.multiple]=\"multiple()\"\n (click)=\"toggle($event)\"\n #row>\n <span class=\"option-nested-title\"\n [id]=\"titleId\"><span dir=\"auto\">{{ title() }}</span></span>\n <nb-icon class=\"option-nested-icon\"\n icon=\"chevron-right-outline\"\n pack=\"essentials\"\n aria-hidden=\"true\" />\n</div>\n<div class=\"option-nested-options\"\n role=\"group\"\n [id]=\"groupId\">\n <ng-content select=\"nb-option, nb-option-nested, nb-option-group, ng-container\" />\n</div>\n","import {\n Component,\n computed,\n DestroyRef,\n ElementRef,\n inject,\n input,\n output,\n signal\n} from '@angular/core'\nimport { Observable, Subject } from 'rxjs'\n\n// Component class scoped counter for aria attributes.\nlet lastOptionId = 0\n\nimport { ɵconvertToBoolProperty as convertToBoolProperty, NbBooleanInput, ɵenableTransitionsAfterRender as enableTransitionsAfterRender } from '@liquid-js/lyr-core/base'\nimport { NbFocusableOption, ɵNbHighlightableOption as NbHighlightableOption } from '@liquid-js/lyr-core/cdk'\nimport { NbCheckboxComponent } from '@liquid-js/lyr-core/checkbox'\nimport { NB_SELECT_INJECTION_TOKEN } from '../select/select-injection-tokens'\nimport { NB_OPTION_REVEAL_EVENT } from './option-reveal'\nimport { NbOptionGroupComponent } from './option-group.component'\nimport { NbOptionNestedComponent } from './option-nested.component'\nimport { setLevel } from './option-level'\nimport { NB_OPTION_LIST_ITEM, NbOptionListItem } from './option-list-item'\n\n/**\n * An option of an `nb-select` or `nb-autocomplete`, with the `value` it selects; its content is its label. A\n * `disabled` option can't be chosen.\n *\n * @styles\n *\n * option-background-color:\n * option-text-color:\n * option-text-font-family:\n * option-hover-background-color:\n * option-hover-text-color:\n * option-active-background-color:\n * option-active-text-color:\n * option-focus-background-color:\n * option-focus-text-color:\n * option-selected-background-color:\n * option-selected-text-color:\n * option-selected-hover-background-color:\n * option-selected-hover-text-color:\n * option-selected-active-background-color:\n * option-selected-active-text-color:\n * option-selected-focus-background-color:\n * option-selected-focus-text-color:\n * option-disabled-background-color:\n * option-disabled-text-color:\n * option-tiny-text-font-size:\n * option-tiny-text-font-weight:\n * option-tiny-text-line-height:\n * option-tiny-padding:\n * option-tiny-padding-inline:\n * option-small-text-font-size:\n * option-small-text-font-weight:\n * option-small-text-line-height:\n * option-small-padding:\n * option-small-padding-inline:\n * option-medium-text-font-size:\n * option-medium-text-font-weight:\n * option-medium-text-line-height:\n * option-medium-padding:\n * option-medium-padding-inline:\n * option-large-text-font-size:\n * option-large-text-font-weight:\n * option-large-text-line-height:\n * option-large-padding:\n * option-large-padding-inline:\n * option-giant-text-font-size:\n * option-giant-text-font-weight:\n * option-giant-text-line-height:\n * option-giant-padding:\n * option-giant-padding-inline:\n **/\n@Component({\n selector: 'nb-option',\n styleUrls: ['./option.component.scss'],\n templateUrl: './option.component.html',\n imports: [NbCheckboxComponent],\n providers: [{ provide: NB_OPTION_LIST_ITEM, useExisting: NbOptionComponent }],\n host: {\n 'tabindex': '-1',\n // A treeitem in a select with nested options, which sets it.\n 'role': 'option',\n '[attr.id]': 'id',\n '[attr.aria-selected]': 'checkboxChecked()',\n '[attr.aria-disabled]': 'disabled || null',\n '[class.multiple]': 'multiple()',\n '[class.selected]': 'selected()',\n '[class.active]': 'active()',\n '[class.filtered]': 'filtered()',\n '[attr.disabled]': \"disabled ? '' : null\",\n '(click)': 'onClick($event)',\n '(keydown.space)': 'onClick($event)',\n '(keydown.enter)': 'onClick($event)'\n }\n})\nexport class NbOptionComponent<T = unknown> implements NbFocusableOption, NbHighlightableOption, NbOptionListItem {\n protected readonly elementRef = inject(ElementRef)\n readonly group = inject(NbOptionGroupComponent, { optional: true })\n /**\n * The nested option this one is in.\n */\n readonly parentNested = inject(NbOptionNestedComponent, { optional: true })\n /**\n * How deep it is in its select: 1 at the top, 2 in a nested option, and so on.\n */\n readonly depth: number = (this.parentNested?.depth ?? 0) + 1\n protected readonly parent = inject(NB_SELECT_INJECTION_TOKEN, { optional: true })\n\n /**\n * The value the select gets when the option is selected; an option without one clears the selection.\n */\n readonly value = input<T>()\n\n /**\n * Disables the option. An option in a disabled `nb-option-group` is disabled too.\n */\n readonly disabledInput = input<boolean, NbBooleanInput>(false, { alias: 'disabled', transform: convertToBoolProperty })\n\n /**\n * Emits the option as it's selected or deselected.\n */\n readonly selectionChange = output<NbOptionComponent<T>>()\n\n // Emits on click, Enter and Space; the select listens to it.\n protected click$: Subject<NbOptionComponent<T>> = new Subject<NbOptionComponent<T>>()\n get click(): Observable<NbOptionComponent<T>> {\n return this.click$.asObservable()\n }\n\n protected readonly selectedState = signal(false)\n\n /**\n * Whether the option is selected.\n */\n readonly selected = this.selectedState.asReadonly()\n\n protected readonly activeState = signal(false)\n protected readonly active = this.activeState.asReadonly()\n\n protected alive = true\n\n /**\n * Unique id of the element, for ARIA references such as `aria-activedescendant`.\n */\n readonly id: string = `nb-option-${lastOptionId++}`\n\n /**\n * In a multiple select, makes this the option that selects all others, or clears them when they're all selected.\n * It acts on the options a search shows, and up to `maxSelections`.\n */\n readonly selectAll = input<boolean, NbBooleanInput>(false, { transform: convertToBoolProperty })\n\n /**\n * Whether the option is disabled by itself or its group, as opposed to by its select's `maxSelections`.\n */\n readonly ownDisabled = computed(\n () => this.disabledInput() || !!this.group?.disabled() || !!this.parentNested?.isDisabled()\n )\n\n // Disabled by itself, by its group, or because its select has as many options selected as it allows.\n protected readonly isDisabled = computed(() => this.ownDisabled() || !!this.parent?.isLimited(this))\n\n // A select-all option shows whether all, some or none of the options are selected.\n protected readonly checkboxChecked = computed(() =>\n this.selectAll() ? this.parent?.selectAllState() === 'all' : this.selected()\n )\n protected readonly checkboxIndeterminate = computed(() => this.selectAll() && this.parent?.selectAllState() === 'some')\n // As big as the select's text.\n protected readonly checkboxSize = computed(() => this.parent?.size() ?? 'medium')\n\n /**\n * Whether the option is in a multiple select.\n */\n readonly multiple = computed(() => !!this.parent?.multiple())\n\n /**\n * Whether the option shows a checkbox: in a multiple select, unless it clears the selection (`null` is a value in a\n * `nullable` select).\n */\n readonly withCheckbox = computed(\n () =>\n this.multiple() &&\n (this.selectAll() || !(this.parent ? this.parent.isEmptyValue(this.value()) : this.value() == null))\n )\n\n constructor() {\n enableTransitionsAfterRender(this.elementRef.nativeElement)\n\n this.group?.addOption(this)\n for (let nested = this.parentNested; nested; nested = nested.parentNested) {\n nested.addOption(this)\n }\n inject(DestroyRef).onDestroy(() => {\n this.alive = false\n this.group?.removeOption(this)\n for (let nested = this.parentNested; nested; nested = nested.parentNested) {\n nested.removeOption(this)\n }\n })\n }\n\n /**\n * Whether the option is disabled: by itself, its group, a nested option it's in, or its select's `maxSelections`.\n * A plain boolean, which the keyboard managers read.\n */\n get disabled(): boolean {\n return this.isDisabled()\n }\n\n get content() {\n return this.elementRef.nativeElement.textContent\n }\n\n get hidden() {\n return this.elementRef.nativeElement.hidden || this.filtered() || this.collapsed\n }\n\n protected collapsed = false\n protected nestedView?: string\n\n /**\n * Set by a select with nested options: whether the option is out of view (in a collapsed or drilled-past nested\n * option), and how deep it is in the view, as an item of its tree.\n */\n setNestedView(collapsed: boolean, level: number) {\n // A tree sets this on all its options as it changes, so only the ones that change touch the DOM.\n if (this.nestedView === `${collapsed} ${level}`) {\n return\n }\n this.nestedView = `${collapsed} ${level}`\n this.collapsed = collapsed\n const host = this.elementRef.nativeElement\n host.setAttribute('role', 'treeitem')\n host.classList.toggle('nb-option-collapsed', collapsed)\n setLevel(host, level)\n host.setAttribute('aria-level', String(level))\n }\n\n /**\n * Whether a select's search left the option out.\n */\n readonly filtered = signal(false)\n\n onClick(event: Event) {\n this.click$.next(this)\n\n // Prevent scroll on space click, etc.\n event.preventDefault()\n }\n\n select() {\n this.setSelection(true)\n }\n\n deselect() {\n this.setSelection(false)\n }\n\n protected setSelection(selected: boolean) {\n // A select keeps a reference to a selected option that was replaced at runtime, and Angular can call writeValue on\n // a destroyed view (angular/angular#27803), so a destroyed option ignores the change rather than throwing.\n if (this.alive && this.selected() !== selected) {\n this.selectedState.set(selected)\n this.selectionChange.emit(this)\n }\n }\n\n focus() {\n this.reveal()\n this.elementRef.nativeElement.focus()\n }\n\n getLabel(): string {\n return this.content\n }\n\n setActiveStyles() {\n this.reveal()\n this.activeState.set(true)\n }\n\n // A long option list lays out only the options near its view; it shows and scrolls to this one on request.\n protected reveal() {\n this.parent?.revealNested(this)\n this.elementRef.nativeElement.dispatchEvent(new CustomEvent(NB_OPTION_REVEAL_EVENT, { bubbles: true }))\n }\n\n setInactiveStyles() {\n this.activeState.set(false)\n }\n\n getHostElement(): HTMLElement {\n return this.elementRef.nativeElement\n }\n}\n","@if (withCheckbox()) {\n<nb-checkbox [checked]=\"checkboxChecked()\"\n [size]=\"checkboxSize()\"\n [indeterminate]=\"checkboxIndeterminate()\"\n [disabled]=\"disabled\"\n aria-hidden=\"true\" />\n}\n<ng-content />\n","import { AfterViewInit, Component, DestroyRef, ElementRef, inject, input, viewChild } from '@angular/core'\n\nimport { NbComponentSize, ɵconvertToBoolProperty as convertToBoolProperty, NbBooleanInput } from '@liquid-js/lyr-core/base'\nimport { NbPosition } from '@liquid-js/lyr-core/cdk'\nimport { NB_OPTION_REVEAL_EVENT } from './option-reveal'\n\n/**\n * The scrolling container of options, groups and nested options, which a select or autocomplete opens in an overlay.\n * With 100 or more options shown, it lays out only the ones near its view; see `NbOptionListWindowing`.\n *\n * @styles\n *\n * option-list-max-height:\n * option-list-scrollbar-color:\n * option-list-scrollbar-background-color:\n * option-list-scrollbar-width:\n * option-list-shadow:\n * option-list-background-color:\n * option-list-border-style:\n * option-list-border-width:\n * option-list-border-color:\n * option-list-border-radius:\n * option-list-adjacent-border-color:\n * option-list-adjacent-border-style:\n * option-list-adjacent-border-width:\n * */\n@Component({\n selector: 'nb-option-list',\n templateUrl: './option-list.component.html',\n host: {\n '[class]': \"'size-' + size()\",\n '[class.position-top]': \"position() === 'top'\",\n '[class.position-bottom]': \"position() === 'bottom'\",\n 'animate.enter': 'nb-overlay-enter',\n 'animate.leave': 'nb-overlay-leave'\n }\n})\nexport class NbOptionListComponent implements AfterViewInit {\n readonly size = input<NbComponentSize>('medium')\n\n readonly position = input<NbPosition>()\n\n /**\n * Whether more than one option can be selected, for assistive technology.\n */\n readonly multiple = input<boolean, NbBooleanInput>(false, { transform: convertToBoolProperty })\n\n /**\n * Id of the listbox, for a search input that controls it.\n */\n readonly listId = input<string>()\n\n /**\n * The role of the list: a `tree` when it has nested options.\n */\n readonly listRole = input<'listbox' | 'tree'>('listbox')\n\n readonly list = viewChild<ElementRef<HTMLElement>>('list')\n\n protected readonly destroyRef = inject(DestroyRef)\n protected readonly windowing = new NbOptionListWindowing()\n\n // Overlays check the list as they attach it, before positioning it, so a long list lays out only its window from the\n // start; waiting for the first render would measure all its options once.\n ngAfterViewInit() {\n const list = this.list()?.nativeElement\n if (list) {\n this.windowing.attach(list)\n this.destroyRef.onDestroy(() => this.windowing.detach())\n }\n }\n\n setScrollTop(scrollTop: number) {\n const list = this.list()\n if (list) {\n list.nativeElement.scrollTop = scrollTop\n }\n }\n\n getScrollTop(): number {\n return this.list()?.nativeElement.scrollTop ?? 0\n }\n}\n\n// The rows of a list: its options, and the rows of nested options.\nconst NB_OPTION_ROWS = 'nb-option, .option-nested-row'\n// Left out by a search, collapsed in a nested option, or hidden by the app, by themselves or what they're in.\nconst NB_HIDDEN = '[hidden], .filtered, .nb-option-collapsed'\n\n// Lists with at least this many shown options lay out only the ones near the view.\nconst WINDOWING_THRESHOLD = 100\n// Options shown above and below the view, so scrolling a little shows them at once.\nconst WINDOW_BUFFER = 20\n\ninterface NbWindowRow {\n option: HTMLElement\n // The group the option is in, or the list.\n parent: HTMLElement\n // Space before the option that isn't an option, i.e. its group's title.\n before: number\n top: number\n height: number\n}\n\n/**\n * Lays out only the options of a long list that are near its view, so opening, scrolling and searching stay fast with\n * thousands of options. The others are hidden, and the space they take is kept as margins, so the scrollbar, groups\n * and positions stay right. It works from the list's DOM, so it applies to any list of `nb-option`s.\n *\n * Options can differ in height: each one laid out keeps its own, and the others take the average of the first ones\n * laid out until they are. As they are, the option at the top of the view stays where it is.\n */\nexport class NbOptionListWindowing {\n protected list?: HTMLElement\n protected inView = new Set<HTMLElement>()\n protected spaced = new Set<HTMLElement>()\n protected rows = new Array<NbWindowRow>()\n // The height of options not laid out yet; zero until the list is laid out.\n protected optionHeight = 0\n protected heights = new WeakMap<HTMLElement, number>()\n protected width = 0\n // The option last revealed, and the scroll position the windowing last set.\n protected revealed?: HTMLElement\n protected scrolledTo = 0\n // Each of these runs before the browser paints, so updating in them keeps every painted frame consistent; waiting for\n // an animation frame would show a frame with the old window, e.g. an empty list after a jump.\n protected readonly mutations = new MutationObserver(() => this.update())\n // Also reports the list's first size, once it's laid out in the document.\n protected readonly resizes = new ResizeObserver(() => this.resize())\n protected readonly onScroll = () => {\n const list = this.list as HTMLElement\n // Scrolled by the user, not by revealing an option.\n if (Math.abs(list.scrollTop - this.scrolledTo) >= 1) {\n this.revealed = undefined\n }\n // A list that stops being long scrolls as it shrinks, e.g. as a search leaves out options.\n if (list.classList.contains('nb-option-list-windowed')) {\n this.render()\n }\n }\n protected readonly onReveal = (event: Event) => this.reveal(event.target as HTMLElement)\n\n attach(list: HTMLElement) {\n this.list = list\n list.addEventListener('scroll', this.onScroll, { passive: true })\n list.addEventListener(NB_OPTION_REVEAL_EVENT, this.onReveal)\n // Options added, removed, filtered or hidden change the rows.\n this.mutations.observe(list, { childList: true, subtree: true, attributes: true, attributeFilter: ['class', 'hidden'] })\n this.resizes.observe(list)\n // Options start hidden, so whatever measures the list before this (e.g. its width) doesn't lay out all of them.\n // Updating hides them again, if the list is long, before anything is measured.\n list.classList.remove('nb-option-list-pending')\n this.update()\n this.mutations.takeRecords()\n }\n\n detach() {\n this.list?.removeEventListener('scroll', this.onScroll)\n this.list?.removeEventListener(NB_OPTION_REVEAL_EVENT, this.onReveal)\n this.mutations.disconnect()\n this.resizes.disconnect()\n // Options outlive the list (they're the app's content), so they're left as they were for the next list.\n this.apply(new Set(), new Map(), new Map())\n this.list?.querySelectorAll('.nb-option-in-view').forEach((option) => option.classList.remove('nb-option-in-view'))\n }\n\n /**\n * Shows an option and scrolls it into view, at once.\n */\n reveal(option: HTMLElement) {\n const list = this.list\n // Options can be revealed before what changes the list reaches it, e.g. the first match of a new search, so it's\n // revealed again as the list changes, until the list is scrolled.\n this.revealed = option\n if (!list) {\n return\n }\n if (!list.classList.contains('nb-option-list-windowed')) {\n this.scrollIntoView(option)\n return\n }\n this.measure()\n if (this.rows.some((row) => row.option === option)) {\n this.render(list.scrollTop, option)\n }\n }\n\n // A short list lays out all its options, but one can still be out of view, e.g. the active option of a search input,\n // which keeps focus. Only the list scrolls, not the page.\n protected scrollIntoView(option: HTMLElement) {\n const list = this.list as HTMLElement\n const rect = option.getBoundingClientRect()\n if (!rect.height) {\n return\n }\n // The first option of a group shows with the group's title.\n const title = option.previousElementSibling?.classList.contains('option-group-title') ? option.previousElementSibling : null\n const start = title?.getBoundingClientRect().top ?? rect.top\n const top = list.getBoundingClientRect().top + list.clientTop\n if (start < top) {\n list.scrollTop += start - top\n } else if (rect.bottom > top + list.clientHeight) {\n list.scrollTop += rect.bottom - top - list.clientHeight\n }\n this.scrolledTo = list.scrollTop\n }\n\n protected resize() {\n const width = this.list?.clientWidth ?? 0\n // Options wrap differently at another width, so the heights known are stale.\n if (width !== this.width) {\n this.width = width\n this.heights = new WeakMap()\n }\n this.update()\n }\n\n protected update() {\n const list = this.list\n if (!list) {\n return\n }\n const rows = this.allRows()\n const hidden = this.hiddenRows()\n if (rows.length - hidden.size < WINDOWING_THRESHOLD) {\n if (list.classList.contains('nb-option-list-windowed')) {\n list.classList.remove('nb-option-list-windowed')\n this.apply(new Set(), new Map(), new Map())\n }\n if (this.revealed && this.isShown(this.revealed)) {\n this.scrollIntoView(this.revealed)\n }\n return\n }\n list.classList.add('nb-option-list-windowed')\n this.measure(rows, hidden)\n const revealed = this.rows.find((row) => row.option === this.revealed)?.option\n this.render(list.scrollTop, revealed)\n }\n\n // Collects the shown options, and the group titles before them.\n protected measure(options = this.allRows(), hidden = this.hiddenRows()) {\n const list = this.list as HTMLElement\n const rows = new Array<NbWindowRow>()\n let parent: HTMLElement | undefined\n for (const option of options) {\n if (hidden.has(option)) {\n continue\n }\n const optionParent = (option.closest('nb-option-group') as HTMLElement | null) ?? list\n let before = 0\n if (optionParent !== parent) {\n parent = optionParent\n if (parent !== list) {\n before = (parent.querySelector('.option-group-title') as HTMLElement | null)?.offsetHeight ?? 0\n }\n }\n rows.push({ option, parent, before, top: 0, height: 0 })\n }\n this.rows = rows\n this.place()\n }\n\n // Works out where each option would be if all were laid out.\n protected place() {\n let top = 0\n for (const row of this.rows) {\n top += row.before\n row.top = top\n row.height = this.heights.get(row.option) ?? this.optionHeight\n top += row.height\n }\n }\n\n /**\n * Shows the options near the view and keeps the space of the hidden ones as margins. Options laid out for the first\n * time can turn out taller or shorter than expected, so it measures them and lays out again, scrolling to keep the\n * option at the top of the view (or the one to reveal) in place.\n */\n protected render(scrollTop = (this.list as HTMLElement).scrollTop, target?: HTMLElement) {\n const list = this.list as HTMLElement\n // Laid out, though maybe without height: the rows are hidden until there's a window, e.g. as the list gets long.\n if (!this.optionHeight && list.getClientRects().length) {\n this.estimate()\n }\n if (!this.optionHeight || !list.clientHeight) {\n // Not in the document yet: show the first options, as many as a list shows at most, until it's laid out and the\n // resize observer reports its size.\n this.optionHeight = 0\n this.apply(new Set(this.rows.slice(0, WINDOW_BUFFER * 2).map((row) => row.option)), new Map(), new Map())\n return\n }\n const anchor = this.rows[this.rowAt(scrollTop)]\n const offset = anchor ? scrollTop - anchor.top : 0\n const targetRow = target && this.rows.find((row) => row.option === target)\n // Each pass measures the options it lays out, so the next has more of them right; one or two do in practice.\n for (let pass = 0; pass < 4; pass++) {\n if (targetRow) {\n scrollTop = this.scrollFor(targetRow, scrollTop)\n } else if (anchor) {\n scrollTop = Math.max(0, anchor.top + offset)\n }\n this.layOut(scrollTop)\n if (!this.measureInView()) {\n break\n }\n this.place()\n }\n // Only differences of a pixel or more: browsers round scroll positions, and setting one stops a scroll in progress.\n if (Math.abs(list.scrollTop - scrollTop) >= 1) {\n list.scrollTop = scrollTop\n }\n this.scrolledTo = list.scrollTop\n }\n\n // The height options take until they're laid out: the average of the first ones.\n protected estimate() {\n const sample = this.rows.slice(0, WINDOW_BUFFER * 2).map((row) => row.option)\n this.apply(new Set(sample), new Map(), new Map())\n const heights = sample.map((option) => option.getBoundingClientRect().height)\n // Zero while the options aren't laid out, e.g. hidden with the list.\n this.optionHeight = heights.reduce((sum, height) => sum + height, 0) / heights.length || 0\n if (this.optionHeight) {\n sample.forEach((option, i) => this.heights.set(option, heights[i]))\n this.place()\n }\n }\n\n // Records the heights of the options laid out, and tells whether any of them differ from what was expected.\n protected measureInView(): boolean {\n let changed = false\n // Reads only, after the writes of laying out, so the browser lays the list out once.\n for (const row of this.rows) {\n if (this.inView.has(row.option)) {\n const height = row.option.getBoundingClientRect().height\n this.heights.set(row.option, height)\n changed ||= Math.abs(height - row.height) >= 0.5\n }\n }\n return changed\n }\n\n // The scroll position nearest to this one that shows the whole row.\n protected scrollFor(row: NbWindowRow, scrollTop: number): number {\n const clientHeight = (this.list as HTMLElement).clientHeight\n // The first option of a group shows with the group's title.\n if (row.top - row.before < scrollTop) {\n return row.top - row.before\n }\n if (row.top + row.height > scrollTop + clientHeight) {\n return row.top + row.height - clientHeight\n }\n return scrollTop\n }\n\n protected layOut(scrollTop: number) {\n const list = this.list as HTMLElement\n const rows = this.rows\n const first = Math.max(0, this.rowAt(scrollTop) - WINDOW_BUFFER)\n const last = Math.min(rows.length - 1, this.rowAt(scrollTop + list.clientHeight) + WINDOW_BUFFER)\n const window = rows.slice(first, last + 1)\n const shown = new Set(window.map((row) => row.option))\n\n // A run of hidden options becomes the top margin of the shown option after it, or the end space of its group\n // or list when nothing in it follows.\n const margins = new Map<HTMLElement, number>()\n const paddings = new Map<HTMLElement, number>()\n let hidden = 0\n let parent: HTMLElement | undefined\n const closeRun = () => {\n if (hidden && parent) {\n paddings.set(parent, (paddings.get(parent) ?? 0) + hidden)\n }\n hidden = 0\n }\n for (const row of rows) {\n if (row.parent !== parent) {\n closeRun()\n parent = row.parent\n }\n if (shown.has(row.option)) {\n if (hidden) {\n margins.set(row.option, hidden)\n }\n hidden = 0\n } else {\n hidden += row.height\n }\n }\n closeRun()\n this.apply(shown, margins, paddings)\n\n // Assistive technology hears the position of each shown option among all of them; in a tree, it's among the\n // options next to it, which the browser works out.\n if (list.getAttribute('role') !== 'listbox') {\n return\n }\n window.forEach((row, i) => {\n row.option.setAttribute('aria-setsize', String(rows.length))\n row.option.setAttribute('aria-posinset', String(first + i + 1))\n })\n }\n\n protected apply(shown: Set<HTMLElement>, margins: Map<HTMLElement, number>, paddings: Map<HTMLElement, number>) {\n for (const option of this.inView) {\n if (!shown.has(option)) {\n option.classList.remove('nb-option-in-view')\n option.style.removeProperty('margin-top')\n option.removeAttribute('aria-setsize')\n option.removeAttribute('aria-posinset')\n }\n }\n for (const option of shown) {\n option.classList.add('nb-option-in-view')\n const margin = margins.get(option)\n if (margin) {\n option.style.setProperty('margin-top', `${margin}px`)\n } else {\n option.style.removeProperty('margin-top')\n }\n }\n for (const element of this.spaced) {\n if (!paddings.has(element)) {\n this.setEndSpace(element, 0)\n }\n }\n for (const [element, padding] of paddings) {\n this.setEndSpace(element, padding)\n }\n this.inView = shown\n this.spaced = new Set(paddings.keys())\n // These are the windowing's own changes, not ones it needs to react to.\n this.mutations.takeRecords()\n }\n\n // The list scrolls, so its end space is content (see the theme), not padding, which would grow it past its height.\n protected setEndSpace(element: HTMLElement, space: number) {\n const property = element === this.list ? '--nb-option-list-end-space' : 'padding-bottom'\n if (space) {\n element.style.setProperty(property, `${space}px`)\n } else {\n element.style.removeProperty(property)\n }\n }\n\n // Long lists are scanned on every change, so this uses the browser's cached collections where it can; a list\n // without nested options has only options as rows.\n protected allRows(): HTMLCollectionOf<HTMLElement> | NodeListOf<HTMLElement> {\n const list = this.list as HTMLElement\n return list.getElementsByClassName('option-nested-row').length\n ? list.querySelectorAll<HTMLElement>(NB_OPTION_ROWS)\n : (list.getElementsByTagName('nb-option') as HTMLCollectionOf<HTMLElement>)\n }\n\n // The rows hidden by themselves, or by what they're in: walking up from every row is slow in long lists, so it\n // starts from what hides them.\n protected hiddenRows(): Set<Element> {\n const list = this.list as HTMLElement\n const hidden = new Set<Element>()\n const hiding = [\n ...Array.from(list.getElementsByClassName('filtered')),\n ...Array.from(list.getElementsByClassName('nb-option-collapsed')),\n ...Array.from(list.querySelectorAll('[hidden]'))\n ]\n for (const element of hiding) {\n if (element.tagName === 'NB-OPTION' || element.classList.contains('option-nested-row')) {\n hidden.add(element)\n } else {\n element.querySelectorAll(NB_OPTION_ROWS).forEach((row) => hidden.add(row))\n }\n }\n return hidden\n }\n\n protected isShown(row: HTMLElement): boolean {\n const hiddenBy = row.closest(NB_HIDDEN)\n return !hiddenBy || !(this.list as HTMLElement).contains(hiddenBy)\n }\n\n // The row at an offset from the top of the list.\n protected rowAt(offset: number): number {\n const rows = this.rows\n let low = 0\n let high = rows.length - 1\n while (low < high) {\n const middle = (low + high) >> 1\n if (rows[middle].top + rows[middle].height <= offset) {\n low = middle + 1\n } else {\n high = middle\n }\n }\n return low\n }\n}\n","<ng-content select=\"[nbOptionListHeader]\" />\n<ul class=\"option-list nb-option-list-pending\"\n [attr.role]=\"listRole()\"\n [attr.id]=\"listId()\"\n [attr.aria-multiselectable]=\"multiple() || null\"\n #list>\n <ng-content />\n</ul>\n","import { NgModule } from '@angular/core'\nimport { NbCheckboxModule } from '@liquid-js/lyr-core/checkbox'\nimport { NbOptionComponent } from './option.component'\nimport { NbOptionGroupComponent } from './option-group.component'\nimport { NbOptionNestedComponent } from './option-nested.component'\nimport { NbOptionListComponent } from './option-list.component'\n\nconst NB_OPTION_LIST_COMPONENTS = [\n NbOptionListComponent,\n NbOptionComponent,\n NbOptionGroupComponent,\n NbOptionNestedComponent\n]\n\n@NgModule({\n imports: [NbCheckboxModule, ...NB_OPTION_LIST_COMPONENTS],\n exports: [...NB_OPTION_LIST_COMPONENTS]\n})\nexport class NbOptionModule { }\n","import { InjectionToken, Signal } from '@angular/core'\n\nimport { NbComponentSize } from '@liquid-js/lyr-core/base'\n\n/**\n * The size of the tags in a tag list, which tags placed in it take unless they set their own.\n */\nexport const NB_TAG_LIST_SIZE = new InjectionToken<Signal<NbComponentSize>>('NB_TAG_LIST_SIZE')\n","import {\n Component,\n computed,\n ElementRef,\n inject,\n input,\n linkedSignal,\n OnDestroy,\n output,\n signal\n} from '@angular/core'\nimport { Observable, Subject } from 'rxjs'\n\nimport { injectNbDefaults, NbStatusService, ɵconvertToBoolProperty as convertToBoolProperty, NbBooleanInput, NbComponentOrCustomStatus, NbComponentSize, ɵenableTransitionsAfterRender as enableTransitionsAfterRender, injectNbTexts, NbLocalize, type NbTagAppearance } from '@liquid-js/lyr-core/base'\nimport { ɵNbHighlightableOption as NbHighlightableOption } from '@liquid-js/lyr-core/cdk'\nimport { NbIconComponent } from '@liquid-js/lyr-core/icon'\nimport { NB_TAG_LIST_SIZE } from './tag-list-size'\n\n/** @internal */\ndeclare const $localize: NbLocalize\nexport interface NbTagSelectionChange {\n tag: NbTagComponent\n selected: boolean\n}\n\nlet tagUniqueId = 0\n\n/**\n * A small label with a status, on its own or in an `nb-tag-list`, where it can be selected and removed.\n *\n * With `removable`, the tag shows a cross and emits `remove` when the cross is clicked or Backspace or Delete is\n * pressed on it:\n *\n * @stacked-example(Removable tags, tag/tag-removable.component)\n *\n * The `appearance` is `filled` (default), `outline` or `hero`, the hero button's gradient:\n * @stacked-example(Tag Appearance, tag/tag-appearance.component)\n *\n * The `status` colours it:\n * @stacked-example(Tag Status, tag/tag-status.component)\n * @styles\n *\n * tag-text-font-family:\n * tag-text-transform:\n * tag-border-width:\n * tag-border-style:\n * tag-border-radius:\n * tag-tiny-text-font-size:\n * tag-tiny-text-font-weight:\n * tag-tiny-text-line-height:\n * tag-tiny-padding:\n * tag-tiny-close-offset:\n * tag-small-text-font-size:\n * tag-small-text-font-weight:\n * tag-small-text-line-height:\n * tag-small-padding:\n * tag-small-close-offset:\n * tag-medium-text-font-size:\n * tag-medium-text-font-weight:\n * tag-medium-text-line-height:\n * tag-medium-padding:\n * tag-medium-close-offset:\n * tag-large-text-font-size:\n * tag-large-text-font-weight:\n * tag-large-text-line-height:\n * tag-large-padding:\n * tag-large-close-offset:\n * tag-giant-text-font-size:\n * tag-giant-text-font-weight:\n * tag-giant-text-line-height:\n * tag-giant-padding:\n * tag-giant-close-offset:\n * tag-filled-basic-background-color:\n * tag-filled-basic-border-color:\n * tag-filled-basic-text-color:\n * tag-filled-basic-active-background-color:\n * tag-filled-basic-active-border-color:\n * tag-filled-basic-hover-background-color:\n * tag-filled-basic-hover-border-color:\n * tag-filled-basic-selected-background-color:\n * tag-filled-basic-selected-border-color:\n * tag-filled-primary-background-color:\n * tag-filled-primary-border-color:\n * tag-filled-primary-text-color:\n * tag-filled-primary-active-background-color:\n * tag-filled-primary-active-border-color:\n * tag-filled-primary-hover-background-color:\n * tag-filled-primary-hover-border-color:\n * tag-filled-primary-selected-background-color:\n * tag-filled-primary-selected-border-color:\n * tag-filled-success-background-color:\n * tag-filled-success-border-color:\n * tag-filled-success-text-color:\n * tag-filled-success-active-background-color:\n * tag-filled-success-active-border-color:\n * tag-filled-success-hover-background-color:\n * tag-filled-success-hover-border-color:\n * tag-filled-success-selected-background-color:\n * tag-filled-success-selected-border-color:\n * tag-filled-info-background-color:\n * tag-filled-info-border-color:\n * tag-filled-info-text-color:\n * tag-filled-info-active-background-color:\n * tag-filled-info-active-border-color:\n * tag-filled-info-hover-background-color:\n * tag-filled-info-hover-border-color:\n * tag-filled-info-selected-background-color:\n * tag-filled-info-selected-border-color:\n * tag-filled-warning-background-color:\n * tag-filled-warning-border-color:\n * tag-filled-warning-text-color:\n * tag-filled-warning-active-background-color:\n * tag-filled-warning-active-border-color:\n * tag-filled-warning-hover-background-color:\n * tag-filled-warning-hover-border-color:\n * tag-filled-warning-selected-background-color:\n * tag-filled-warning-selected-border-color:\n * tag-filled-danger-background-color:\n * tag-filled-danger-border-color:\n * tag-filled-danger-text-color:\n * tag-filled-danger-active-background-color:\n * tag-filled-danger-active-border-color:\n * tag-filled-danger-hover-background-color:\n * tag-filled-danger-hover-border-color:\n * tag-filled-danger-selected-background-color:\n * tag-filled-danger-selected-border-color:\n * tag-filled-control-background-color:\n * tag-filled-control-border-color:\n * tag-filled-control-text-color:\n * tag-filled-control-active-background-color:\n * tag-filled-control-active-border-color:\n * tag-filled-control-hover-background-color:\n * tag-filled-control-hover-border-color:\n * tag-filled-control-selected-background-color:\n * tag-filled-control-selected-border-color:\n * tag-outline-basic-background-color:\n * tag-outline-basic-border-color:\n * tag-outline-basic-text-color:\n * tag-outline-basic-active-background-color:\n * tag-outline-basic-active-border-color:\n * tag-outline-basic-active-text-color:\n * tag-outline-basic-hover-background-color:\n * tag-outline-basic-hover-border-color:\n * tag-outline-basic-hover-text-color:\n * tag-outline-basic-selected-background-color:\n * tag-outline-basic-selected-border-color:\n * tag-outline-basic-selected-text-color:\n * tag-outline-primary-background-color:\n * tag-outline-primary-border-color:\n * tag-outline-primary-text-color:\n * tag-outline-primary-active-background-color:\n * tag-outline-primary-active-border-color:\n * tag-outline-primary-active-text-color:\n * tag-outline-primary-hover-background-color:\n * tag-outline-primary-hover-border-color:\n * tag-outline-primary-hover-text-color:\n * tag-outline-primary-selected-background-color:\n * tag-outline-primary-selected-border-color:\n * tag-outline-primary-selected-text-color:\n * tag-outline-success-background-color:\n * tag-outline-success-border-color:\n * tag-outline-success-text-color:\n * tag-outline-success-active-background-color:\n * tag-outline-success-active-border-color:\n * tag-outline-success-active-text-color:\n * tag-outline-success-hover-background-color:\n * tag-outline-success-hover-border-color:\n * tag-outline-success-hover-text-color:\n * tag-outline-success-selected-background-color:\n * tag-outline-success-selected-border-color:\n * tag-outline-success-selected-text-color:\n * tag-outline-info-background-color:\n * tag-outline-info-border-color:\n * tag-outline-info-text-color:\n * tag-outline-info-active-background-color:\n * tag-outline-info-active-border-color:\n * tag-outline-info-active-text-color:\n * tag-outline-info-hover-background-color:\n * tag-outline-info-hover-border-color:\n * tag-outline-info-hover-text-color:\n * tag-outline-info-selected-background-color:\n * tag-outline-info-selected-border-color:\n * tag-outline-info-selected-text-color:\n * tag-outline-warning-background-color:\n * tag-outline-warning-border-color:\n * tag-outline-warning-text-color:\n * tag-outline-warning-active-background-color:\n * tag-outline-warning-active-border-color:\n * tag-outline-warning-active-text-color:\n * tag-outline-warning-hover-background-color:\n * tag-outline-warning-hover-border-color:\n * tag-outline-warning-hover-text-color:\n * tag-outline-warning-selected-background-color:\n * tag-outline-warning-selected-border-color:\n * tag-outline-warning-selected-text-color:\n * tag-outline-danger-background-color:\n * tag-outline-danger-border-color:\n * tag-outline-danger-text-color:\n * tag-outline-danger-active-background-color:\n * tag-outline-danger-active-border-color:\n * tag-outline-danger-active-text-color:\n * tag-outline-danger-hover-background-color:\n * tag-outline-danger-hover-border-color:\n * tag-outline-danger-hover-text-color:\n * tag-outline-danger-selected-background-color:\n * tag-outline-danger-selected-border-color:\n * tag-outline-danger-selected-text-color:\n * tag-outline-control-background-color:\n * tag-outline-control-border-color:\n * tag-outline-control-text-color:\n * tag-outline-control-active-background-color:\n * tag-outline-control-active-border-color:\n * tag-outline-control-active-text-color:\n * tag-outline-control-hover-background-color:\n * tag-outline-control-hover-border-color:\n * tag-outline-control-hover-text-color:\n * tag-outline-control-selected-background-color:\n * tag-outline-control-selected-border-color:\n * tag-outline-control-selected-text-color:\n * tag-hero-text-shadow:\n * tag-hero-basic-text-color:\n * tag-hero-basic-left-background-color:\n * tag-hero-basic-right-background-color:\n * tag-hero-basic-active-left-background-color:\n * tag-hero-basic-active-right-background-color:\n * tag-hero-basic-hover-left-background-color:\n * tag-hero-basic-hover-right-background-color:\n * tag-hero-basic-selected-left-background-color:\n * tag-hero-basic-selected-right-background-color:\n * tag-hero-primary-text-color:\n * tag-hero-primary-left-background-color:\n * tag-hero-primary-right-background-color:\n * tag-hero-primary-active-left-background-color:\n * tag-hero-primary-active-right-background-color:\n * tag-hero-primary-hover-left-background-color:\n * tag-hero-primary-hover-right-background-color:\n * tag-hero-primary-selected-left-background-color:\n * tag-hero-primary-selected-right-background-color:\n * tag-hero-success-text-color:\n * tag-hero-success-left-background-color:\n * tag-hero-success-right-background-color:\n * tag-hero-success-active-left-background-color:\n * tag-hero-success-active-right-background-color:\n * tag-hero-success-hover-left-background-color:\n * tag-hero-success-hover-right-background-color:\n * tag-hero-success-selected-left-background-color:\n * tag-hero-success-selected-right-background-color:\n * tag-hero-info-text-color:\n * tag-hero-info-left-background-color:\n * tag-hero-info-right-background-color:\n * tag-hero-info-active-left-background-color:\n * tag-hero-info-active-right-background-color:\n * tag-hero-info-hover-left-background-color:\n * tag-hero-info-hover-right-background-color:\n * tag-hero-info-selected-left-background-color:\n * tag-hero-info-selected-right-background-color:\n * tag-hero-warning-text-color:\n * tag-hero-warning-left-background-color:\n * tag-hero-warning-right-background-color:\n * tag-hero-warning-active-left-background-color:\n * tag-hero-warning-active-right-background-color:\n * tag-hero-warning-hover-left-background-color:\n * tag-hero-warning-hover-right-background-color:\n * tag-hero-warning-selected-left-background-color:\n * tag-hero-warning-selected-right-background-color:\n * tag-hero-danger-text-color:\n * tag-hero-danger-left-background-color:\n * tag-hero-danger-right-background-color:\n * tag-hero-danger-active-left-background-color:\n * tag-hero-danger-active-right-background-color:\n * tag-hero-danger-hover-left-background-color:\n * tag-hero-danger-hover-right-background-color:\n * tag-hero-danger-selected-left-background-color:\n * tag-hero-danger-selected-right-background-color:\n * tag-hero-control-text-color:\n * tag-hero-control-left-background-color:\n * tag-hero-control-right-background-color:\n * tag-hero-control-active-left-background-color:\n * tag-hero-control-active-right-background-color:\n * tag-hero-control-hover-left-background-color:\n * tag-hero-control-hover-right-background-color:\n * tag-hero-control-selected-left-background-color:\n * tag-hero-control-selected-right-background-color:\n */\n@Component({\n selector: 'nb-tag',\n templateUrl: './tag.component.html',\n exportAs: 'nbTag',\n imports: [NbIconComponent],\n host: {\n '[class]': 'hostClasses()',\n '[class.selected]': 'isSelected()',\n '[attr.aria-selected]': \"role() === 'option' ? isSelected() : null\",\n '[class.active]': '_isActive()',\n '[attr.role]': 'role()',\n '[attr.id]': '_id',\n '(keydown.delete)': '_remove()',\n '(keydown.backspace)': '_remove()'\n }\n})\nexport class NbTagComponent implements OnDestroy, NbHighlightableOption {\n // The app's defaults for this type, which the inputs below start from.\n protected readonly nbDefaults = injectNbDefaults('tag')\n\n readonly _hostElement = inject(ElementRef)\n protected readonly statusService = inject(NbStatusService)\n\n private _destroy$: Subject<NbTagComponent> = new Subject<NbTagComponent>()\n\n get destroy$(): Observable<NbTagComponent> {\n return this._destroy$.asObservable()\n }\n\n /**\n * Tag text.\n */\n readonly text = input<string>()\n\n /**\n * Selects the tag, until a click or its list changes that; see `isSelected`.\n */\n readonly selected = input<boolean, NbBooleanInput>(false, { transform: convertToBoolProperty })\n\n /**\n * Shows a cross and lets the user remove the tag; see `remove`.\n */\n readonly removable = input<boolean, NbBooleanInput>(false, { transform: convertToBoolProperty })\n\n /**\n * Icon of the cross.\n */\n readonly removeIcon = input<string>('close-outline')\n\n /**\n * Pack of the cross's icon.\n */\n readonly removeIconPack = input<string>('essentials')\n\n /**\n * `filled` (default), `outline` or `hero`.\n */\n readonly appearanceInput = input<NbTagAppearance | undefined>(undefined, { alias: 'appearance' })\n /** The appearance in use: the input's, the app's default, or 'filled'. */\n readonly appearance = linkedSignal<NbTagAppearance>(() => this.appearanceInput() ?? this.nbDefaults().appearance ?? 'filled')\n\n /**\n * `basic` (default), `primary`, `info`, `success`, `warning`, `danger`, `control` or a custom status.\n */\n readonly status = input<NbComponentOrCustomStatus>('basic')\n\n /**\n * Tag size: `tiny`, `small`, `medium`, `large`, `giant`. A tag in an `nb-tag-list` takes the list's size unless it\n * sets one; others are `medium`.\n */\n readonly sizeInput = input<NbComponentSize | undefined>(undefined, { alias: 'size' })\n\n protected readonly listSize = inject(NB_TAG_LIST_SIZE, { optional: true })\n // A tag in a tag list is one of its options; one on its own has a remove button the keyboard reaches.\n protected readonly inList = this.listSize !== null\n protected readonly texts = injectNbTexts('tag', () => ({\n remove: (text) => $localize`:@@nb.tag.remove:Remove ${text}:text:`\n }))\n\n /** The tag's size: its own, its list's, or `medium`. */\n readonly size = computed(() => this.sizeInput() ?? this.listSize?.() ?? this.nbDefaults().size ?? 'medium')\n\n /** The tag's role: `option` in a tag list, none on its own. */\n readonly roleInput = input<string | undefined>(undefined, { alias: 'role' })\n readonly role = computed(() => this.roleInput() ?? (this.inList ? 'option' : null))\n\n /**\n * Emits when the user removes a `removable` tag, with its cross or the Backspace or Delete key. The tag stays until\n * the app, or a managed `nb-tag-list`, takes it out.\n */\n readonly remove = output<NbTagComponent>()\n\n readonly selectedChange = output<NbTagSelectionChange>()\n\n /**\n * Whether the tag is selected: the `selected` input, until a user or the tag list changes it.\n */\n readonly isSelected = linkedSignal(() => this.selected())\n\n protected readonly activeState = signal(false)\n readonly _isActive = this.activeState.asReadonly()\n\n readonly _id: string = `nb-tag-${tagUniqueId++}`\n\n protected readonly hostClasses = computed(() => [\n `appearance-${this.appearance()}`,\n this.statusService.getStatusClass(this.status()),\n `size-${this.size()}`\n ])\n\n _remove() {\n if (this.removable()) {\n this.remove.emit(this)\n }\n }\n\n constructor() {\n enableTransitionsAfterRender(this._hostElement.nativeElement)\n }\n\n ngOnDestroy() {\n this._destroy$.next(this)\n }\n\n /**\n * Selects or deselects the tag and emits `selectedChange` when that changes its state.\n */\n setSelected(selected: boolean) {\n if (this.isSelected() !== selected) {\n this.isSelected.set(selected)\n this.selectedChange.emit({ tag: this, selected })\n }\n }\n\n _toggleSelection() {\n this.setSelected(!this.isSelected())\n }\n\n setActiveStyles() {\n this.activeState.set(true)\n }\n\n setInactiveStyles() {\n this.activeState.set(false)\n }\n}\n","<span dir=\"auto\">{{ text() }}</span>\n@if (removable()) {\n@if (inList) {\n<!-- An option's content is presentational: in a list, Backspace or Delete removes the active tag. -->\n<nb-icon (click)=\"_remove()\"\n class=\"nb-tag-remove size-{{ size() }}\"\n [icon]=\"removeIcon()\"\n [pack]=\"removeIconPack()\"\n aria-hidden=\"true\" />\n} @else {\n<button type=\"button\"\n class=\"nb-tag-remove nb-tag-remove-button size-{{ size() }}\"\n tabindex=\"0\"\n [attr.aria-label]=\"texts().remove(text() ?? '')\"\n (click)=\"_remove()\">\n <nb-icon [icon]=\"removeIcon()\"\n [pack]=\"removeIconPack()\" />\n</button>\n}\n}\n","import {\n AfterContentChecked,\n afterRenderEffect,\n AfterViewInit,\n ChangeDetectorRef,\n Component,\n ComponentRef,\n computed,\n contentChild,\n contentChildren,\n DestroyRef,\n effect,\n ElementRef,\n forwardRef,\n inject,\n Injector,\n input,\n linkedSignal,\n numberAttribute,\n OnDestroy,\n output,\n signal,\n untracked,\n viewChild\n} from '@angular/core'\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms'\nimport { takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop'\nimport { BehaviorSubject, EMPTY, merge, Observable } from 'rxjs'\nimport { filter, map, switchMap, take } from 'rxjs/operators'\n\nimport { injectNbDefaults, NbStatusService, ɵisComposing as isComposing, NbComponentSize, NbComponentShape, NbComponentOrCustomStatus, NB_DOCUMENT, NbLayoutDirectionService, ɵconvertToBoolProperty as convertToBoolProperty, NbBooleanInput, ɵNbClassInput as NbClassInput, ɵenableTransitionsAfterRender as enableTransitionsAfterRender, injectNbTexts, NbLocalize, type NbSelectAppearance } from '@liquid-js/lyr-core/base'\nimport { NbAdjustableConnectedPositionStrategy, NbAdjustment, NbPosition, NbPositionBuilderService, NbOverlayRef, NbPortalDirective, NbScrollStrategy, NbOverlayService, NbTrigger, NbTriggerStrategy, NbTriggerStrategyBuilderService, NbFocusKeyManager, NbFocusKeyManagerFactoryService, ɵNbActiveDescendantKeyManager as NbActiveDescendantKeyManager, ɵNbActiveDescendantKeyManagerFactoryService as NbActiveDescendantKeyManagerFactoryService, NbFocusMonitor, NbScrollStrategies } from '@liquid-js/lyr-core/cdk'\nimport { NbInputDirective } from '@liquid-js/lyr-core/input'\nimport { NbValidationDirective } from '@liquid-js/lyr-core/validation'\nimport { NbFormFieldControl, NbFormFieldControlConfig } from '@liquid-js/lyr-core/form-field'\nimport { NbIconComponent } from '@liquid-js/lyr-core/icon'\nimport { NbOptionListComponent } from '../option/option-list.component'\nimport { NbTagComponent } from '../tag/tag.component'\nimport { NB_OPTION_LIST_ITEM, NbOptionListItem } from '../option/option-list-item'\nimport { NbOptionGroupComponent } from '../option/option-group.component'\nimport { NbOptionNestedComponent } from '../option/option-nested.component'\nimport { NbOptionComponent } from '../option/option.component'\nimport { NB_SELECT_INJECTION_TOKEN } from './select-injection-tokens'\n\n/** @internal */\ndeclare const $localize: NbLocalize\n\nlet lastSelectId = 0\n\n// Case and accents don't count when searching, so \"creme\" finds \"Crème\".\nconst normalizeSearchText = (text: string) =>\n text.normalize('NFD').replace(/\\p{Diacritic}/gu, '').toLocaleLowerCase().trim()\n\n/**\n * Matches options whose text contains the query, ignoring case and accents.\n */\nexport function nbSelectSearchFn<T>(option: NbOptionComponent<T>, query: string): boolean {\n return normalizeSearchText(option.content ?? '').includes(normalizeSearchText(query))\n}\n\n// An option or nested option, of any value type, by where it is in the tree.\ntype NbNestedItem = Pick<NbOptionComponent | NbOptionNestedComponent, 'depth' | 'parentNested'>\n\nexport type NbSelectCompareFunction<T = unknown> = (v1: T, v2: T) => boolean\n\n/**\n * Whether a select's `multiple` isn't given. Angular's template type checker doesn't apply a type parameter's default:\n * without a `multiple` binding it infers `M` as its whole constraint (or `any`), which no binding gives.\n */\ntype NbSelectMultipleUnset<M> = 0 extends 1 & M ? true : [NbBooleanInput] extends [M] ? true : false\n\n/**\n * What a select gives in `selectedChange`, for options of value `T` and a `multiple` of `M`: one value, or `null` when\n * nothing is selected; with `multiple` (`true`, `''` or `'true'`), all selected values. A `multiple` bound to a\n * `boolean` that may be either gives either.\n */\nexport type NbSelectValue<T, M extends NbBooleanInput = NbBooleanInput> =\n NbSelectMultipleUnset<M> extends true ? T | null : M extends true | '' | 'true' ? T[] : T | null\n\n@Component({\n selector: 'nb-select-label',\n template: '<ng-content />'\n})\nexport class NbSelectLabelComponent {}\n\nexport function nbSelectFormFieldControlConfigFactory() {\n const config = new NbFormFieldControlConfig()\n config.supportsSuffix = false\n return config\n}\n\n/**\n * A dropdown that selects one of its `nb-option`s, or several with `multiple`.\n *\n * @stacked-example(Showcase, select/select-showcase.component)\n *\n * ### Installation\n *\n * Import `NbSelectComponent`, `NbOptionComponent` into your standalone component:\n * ```ts\n * @Component({\n * imports: [NbSelectComponent, NbOptionComponent],\n * })\n * export class PageComponent { }\n * ```\n *\n * With NgModules:\n *\n * Import `NbSelectModule` to your feature module.\n * ```ts\n * @NgModule({\n * imports: [\n * // ...\n * NbSelectModule,\n * ],\n * })\n * export class PageModule { }\n * ```\n * ### Usage\n *\n * Marked `multiple`, the select works with arrays only: it accepts and emits arrays.\n *\n * Templates know which: `selectedChange` gives `T | null` for a single select and `T[]` for one marked `multiple`\n * (or `[multiple]=\"true\"`), where `T` is the options' value type, so a handler can take exactly that. A `multiple`\n * bound to a `boolean` that may be either gives either. See `NbSelectValue`.\n * @stacked-example(Multiple, select/select-multiple.component)\n *\n * With `chips`, a multiple select shows its selected options as tags. The select keeps its background under the\n * pointer while it shows them, as a tag list with an input does, so the tags stay apart from the field:\n * @stacked-example(Chips, select/select-chips.component)\n *\n * With `searchable`, the open list has a search input that filters the options by their text, ignoring case and\n * accents; `searchFn` changes how options match. Focus stays in the input, and the arrow keys, Home, End and Enter\n * work the list:\n * @stacked-example(Search, select/select-search.component)\n *\n * In a multiple select, `<nb-option selectAll>` selects all enabled options (the ones a search shows), or clears them\n * when they're all selected; its checkbox shows when only some are. `maxSelections` caps how many options the user can\n * select, disabling the rest until one is deselected:\n * @stacked-example(Select all and limits, select/select-all.component)\n *\n * Long lists stay fast: with 100 or more options shown, the list lays out only the ones near its view, and the rest\n * keep their place in the scroll. Options are still written as usual, e.g. with `@for`, can differ in height, and work\n * with search, the keyboard and assistive technology; this applies to every list of `nb-option`s, including\n * autocomplete.\n *\n * An option without a value clears the selection, as writing `null` or `undefined` does.\n * @stacked-example(Clean selection, select/select-clean.component)\n *\n * With `nullable`, `null` is a value like any other: an option with a `null` value, e.g. \"Auto\", is selected and shown\n * when the value is `null`, and only options without a value clear the selection.\n * @stacked-example(Nullable, select/select-nullable.component)\n *\n * The `ghost` appearance shows no background or border until the select is hovered, focused or open:\n * @stacked-example(Ghost, input/input-ghost.component)\n *\n * The selection can be bound with the `selected` input:\n *\n * ```html\n * <nb-select [(selected)]=\"selected\"></nb-select>\n * ```\n *\n * or with a form control or `ngModel`:\n * @stacked-example(Select form binding, select/select-form.component)\n *\n * `nb-option-group` groups options under a title:\n * @stacked-example(Grouping, select/select-groups.component)\n *\n * `nb-option-nested` puts options in a row that opens like a tree, as deep as needed; only options are selected, not\n * the nested options. The list shows up to `nestedLevels` levels at once (3 by default), and drills into deeper ones,\n * with a row to go back. The arrow keys move through the tree, Enter and Space open and close a row, and a search\n * shows the matching options with the nested options they're in:\n * @stacked-example(Nested options, select/select-nested.component)\n *\n * A `placeholder` shows while nothing is selected:\n * @stacked-example(Placeholder, select/select-placeholder.component)\n *\n * The select, single options and whole groups can be disabled:\n * @stacked-example(Disabled select, select/select-disabled.component)\n *\n * An `nb-select-label` in the content replaces the selected options' text while something is selected:\n * @stacked-example(Custom label, select/select-label.component)\n *\n * The `status` colours the select; it's `basic` by default:\n * @stacked-example(Select statuses, select/select-status.component)\n *\n * There are five sizes, `medium` by default:\n * @stacked-example(Select sizes, select/select-sizes.component)\n *\n * Besides `outline`, the `appearance` can be `filled`:\n * @stacked-example(Filled select, select/select-filled.component)\n *\n * and `hero`:\n * @stacked-example(Select colors, select/select-hero.component)\n *\n * The `shape` combines with the other properties:\n * @stacked-example(Select shapes, select/select-shapes.component)\n *\n * Options match the value by strict equality (`===`); `compareWith` changes how they match:\n * @stacked-example(Select custom comparator, select/select-compare-with.component)\n *\n * An `nb-form-field` adds an icon to the select:\n * @stacked-example(Select with icon, select/select-icon.component)\n * @additional-example(Interactive, select/select-interactive.component)\n * @styles\n *\n * select-cursor:\n * select-disabled-cursor:\n * select-ghost-background-color:\n * select-ghost-border-color:\n * select-tiny-width:\n * select-tiny-chips-margin:\n * select-small-width:\n * select-small-chips-margin:\n * select-medium-width:\n * select-medium-chips-margin:\n * select-large-width:\n * select-large-chips-margin:\n * select-giant-width:\n * select-giant-chips-margin:\n * select-icon-offset:\n * select-text-font-family:\n * select-placeholder-text-font-family:\n * select-tiny-text-font-size:\n * select-tiny-text-font-weight:\n * select-tiny-text-line-height:\n * select-tiny-placeholder-text-font-size:\n * select-tiny-placeholder-text-font-weight:\n * select-tiny-max-width:\n * select-small-text-font-size:\n * select-small-text-font-weight:\n * select-small-text-line-height:\n * select-small-placeholder-text-font-size:\n * select-small-placeholder-text-font-weight:\n * select-small-max-width:\n * select-medium-text-font-size:\n * select-medium-text-font-weight:\n * select-medium-text-line-height:\n * select-medium-placeholder-text-font-size:\n * select-medium-placeholder-text-font-weight:\n * select-medium-max-width:\n * select-large-text-font-size:\n * select-large-text-font-weight:\n * select-large-text-line-height:\n * select-large-placeholder-text-font-size:\n * select-large-placeholder-text-font-weight:\n * select-large-max-width:\n * select-giant-text-font-size:\n * select-giant-text-font-weight:\n * select-giant-text-line-height:\n * select-giant-placeholder-text-font-size:\n * select-giant-placeholder-text-font-weight:\n * select-giant-max-width:\n * select-rectangle-border-radius:\n * select-semi-round-border-radius:\n * select-round-border-radius:\n * select-outline-border-style:\n * select-outline-border-width:\n * select-outline-tiny-padding:\n * select-outline-small-padding:\n * select-outline-medium-padding:\n * select-outline-large-padding:\n * select-outline-giant-padding:\n * select-outline-basic-icon-color:\n * select-outline-basic-text-color:\n * select-outline-basic-placeholder-text-color:\n * select-outline-basic-background-color:\n * select-outline-basic-border-color:\n * select-outline-basic-focus-background-color:\n * select-outline-basic-focus-and-hover-background-color:\n * select-outline-basic-focus-and-hover-border-color:\n * select-outline-basic-focus-border-color:\n * select-outline-basic-hover-background-color:\n * select-outline-basic-hover-border-color:\n * select-outline-basic-disabled-background-color:\n * select-outline-basic-disabled-border-color:\n * select-outline-basic-disabled-icon-color:\n * select-outline-basic-disabled-text-color:\n * select-outline-primary-icon-color:\n * select-outline-primary-text-color:\n * select-outline-primary-placeholder-text-color:\n * select-outline-primary-background-color:\n * select-outline-primary-border-color:\n * select-outline-primary-focus-background-color:\n * select-outline-primary-focus-and-hover-background-color:\n * select-outline-primary-focus-and-hover-border-color:\n * select-outline-primary-focus-border-color:\n * select-outline-primary-hover-background-color:\n * select-outline-primary-hover-border-color:\n * select-outline-primary-disabled-background-color:\n * select-outline-primary-disabled-border-color:\n * select-outline-primary-disabled-icon-color:\n * select-outline-primary-disabled-text-color:\n * select-outline-success-icon-color:\n * select-outline-success-text-color:\n * select-outline-success-placeholder-text-color:\n * select-outline-success-background-color:\n * select-outline-success-border-color:\n * select-outline-success-focus-background-color:\n * select-outline-success-focus-and-hover-background-color:\n * select-outline-success-focus-and-hover-border-color:\n * select-outline-success-focus-border-color:\n * select-outline-success-hover-background-color:\n * select-outline-success-hover-border-color:\n * select-outline-success-disabled-background-color:\n * select-outline-success-disabled-border-color:\n * select-outline-success-disabled-icon-color:\n * select-outline-success-disabled-text-color:\n * select-outline-info-icon-color:\n * select-outline-info-text-color:\n * select-outline-info-placeholder-text-color:\n * select-outline-info-background-color:\n * select-outline-info-border-color:\n * select-outline-info-focus-background-color:\n * select-outline-info-focus-and-hover-background-color:\n * select-outline-info-focus-and-hover-border-color:\n * select-outline-info-focus-border-color:\n * select-outline-info-hover-background-color:\n * select-outline-info-hover-border-color:\n * select-outline-info-disabled-background-color:\n * select-outline-info-disabled-border-color:\n * select-outline-info-disabled-icon-color:\n * select-outline-info-disabled-text-color:\n * select-outline-warning-icon-color:\n * select-outline-warning-text-color:\n * select-outline-warning-placeholder-text-color:\n * select-outline-warning-background-color:\n * select-outline-warning-border-color:\n * select-outline-warning-focus-background-color:\n * select-outline-warning-focus-and-hover-background-color:\n * select-outline-warning-focus-and-hover-border-color:\n * select-outline-warning-focus-border-color:\n * select-outline-warning-hover-background-color:\n * select-outline-warning-hover-border-color:\n * select-outline-warning-disabled-background-color:\n * select-outline-warning-disabled-border-color:\n * select-outline-warning-disabled-icon-color:\n * select-outline-warning-disabled-text-color:\n * select-outline-danger-icon-color:\n * select-outline-danger-text-color:\n * select-outline-danger-placeholder-text-color:\n * select-outline-danger-background-color:\n * select-outline-danger-border-color:\n * select-outline-danger-focus-background-color:\n * select-outline-danger-focus-and-hover-background-color:\n * select-outline-danger-focus-and-hover-border-color:\n * select-outline-danger-focus-border-color:\n * select-outline-danger-hover-background-color:\n * select-outline-danger-hover-border-color:\n * select-outline-danger-disabled-background-color:\n * select-outline-danger-disabled-border-color:\n * select-outline-danger-disabled-icon-color:\n * select-outline-danger-disabled-text-color:\n * select-outline-control-icon-color:\n * select-outline-control-text-color:\n * select-outline-control-placeholder-text-color:\n * select-outline-control-background-color:\n * select-outline-control-border-color:\n * select-outline-control-focus-background-color:\n * select-outline-control-focus-and-hover-background-color:\n * select-outline-control-focus-and-hover-border-color:\n * select-outline-control-focus-border-color:\n * select-outline-control-hover-background-color:\n * select-outline-control-hover-border-color:\n * select-outline-control-disabled-background-color:\n * select-outline-control-disabled-border-color:\n * select-outline-control-disabled-icon-color:\n * select-outline-control-disabled-text-color:\n * select-outline-adjacent-border-style:\n * select-outline-adjacent-border-width:\n * select-outline-basic-open-border-color:\n * select-outline-basic-adjacent-border-color:\n * select-outline-primary-open-border-color:\n * select-outline-primary-adjacent-border-color:\n * select-outline-success-open-border-color:\n * select-outline-success-adjacent-border-color:\n * select-outline-info-open-border-color:\n * select-outline-info-adjacent-border-color:\n * select-outline-warning-open-border-color:\n * select-outline-warning-adjacent-border-color:\n * select-outline-danger-open-border-color:\n * select-outline-danger-adjacent-border-color:\n * select-outline-control-open-border-color:\n * select-outline-control-adjacent-border-color:\n * select-filled-border-style:\n * select-filled-border-width:\n * select-filled-tiny-padding:\n * select-filled-small-padding:\n * select-filled-medium-padding:\n * select-filled-large-padding:\n * select-filled-giant-padding:\n * select-filled-basic-background-color:\n * select-filled-basic-border-color:\n * select-filled-basic-icon-color:\n * select-filled-basic-text-color:\n * select-filled-basic-placeholder-text-color:\n * select-filled-basic-focus-background-color:\n * select-filled-basic-focus-and-hover-background-color:\n * select-filled-basic-focus-and-hover-border-color:\n * select-filled-basic-focus-border-color:\n * select-filled-basic-hover-background-color:\n * select-filled-basic-hover-border-color:\n * select-filled-basic-disabled-background-color:\n * select-filled-basic-disabled-border-color:\n * select-filled-basic-disabled-icon-color:\n * select-filled-basic-disabled-text-color:\n * select-filled-primary-background-color:\n * select-filled-primary-border-color:\n * select-filled-primary-icon-color:\n * select-filled-primary-text-color:\n * select-filled-primary-placeholder-text-color:\n * select-filled-primary-focus-background-color:\n * select-filled-primary-focus-and-hover-background-color:\n * select-filled-primary-focus-and-hover-border-color:\n * select-filled-primary-focus-border-color:\n * select-filled-primary-hover-background-color:\n * select-filled-primary-hover-border-color:\n * select-filled-primary-disabled-background-color:\n * select-filled-primary-disabled-border-color:\n * select-filled-primary-disabled-icon-color:\n * select-filled-primary-disabled-text-color:\n * select-filled-success-background-color:\n * select-filled-success-border-color:\n * select-filled-success-icon-color:\n * select-filled-success-text-color:\n * select-filled-success-placeholder-text-color:\n * select-filled-success-focus-background-color:\n * select-filled-success-focus-and-hover-background-color:\n * select-filled-success-focus-and-hover-border-color:\n * select-filled-success-focus-border-color:\n * select-filled-success-hover-background-color:\n * select-filled-success-hover-border-color:\n * select-filled-success-disabled-background-color:\n * select-filled-success-disabled-border-color:\n * select-filled-success-disabled-icon-color:\n * select-filled-success-disabled-text-color:\n * select-filled-info-background-color:\n * select-filled-info-border-color:\n * select-filled-info-icon-color:\n * select-filled-info-text-color:\n * select-filled-info-placeholder-text-color:\n * select-filled-info-focus-background-color:\n * select-filled-info-focus-and-hover-background-color:\n * select-filled-info-focus-and-hover-border-color:\n * select-filled-info-focus-border-color:\n * select-filled-info-hover-background-color:\n * select-filled-info-hover-border-color:\n * select-filled-info-disabled-background-color:\n * select-filled-info-disabled-border-color:\n * select-filled-info-disabled-icon-color:\n * select-filled-info-disabled-text-color:\n * select-filled-warning-background-color:\n * select-filled-warning-border-color:\n * select-filled-warning-icon-color:\n * select-filled-warning-text-color:\n * select-filled-warning-placeholder-text-color:\n * select-filled-warning-focus-background-color:\n * select-filled-warning-focus-and-hover-background-color:\n * select-filled-warning-focus-and-hover-border-color:\n * select-filled-warning-focus-border-color:\n * select-filled-warning-hover-background-color:\n * select-filled-warning-hover-border-color:\n * select-filled-warning-disabled-background-color:\n * select-filled-warning-disabled-border-color:\n * select-filled-warning-disabled-icon-color:\n * select-filled-warning-disabled-text-color:\n * select-filled-danger-background-color:\n * select-filled-danger-border-color:\n * select-filled-danger-icon-color:\n * select-filled-danger-text-color:\n * select-filled-danger-placeholder-text-color:\n * select-filled-danger-focus-background-color:\n * select-filled-danger-focus-and-hover-background-color:\n * select-filled-danger-focus-and-hover-border-color:\n * select-filled-danger-focus-border-color:\n * select-filled-danger-hover-background-color:\n * select-filled-danger-hover-border-color:\n * select-filled-danger-disabled-background-color:\n * select-filled-danger-disabled-border-color:\n * select-filled-danger-disabled-icon-color:\n * select-filled-danger-disabled-text-color:\n * select-filled-control-background-color:\n * select-filled-control-border-color:\n * select-filled-control-icon-color:\n * select-filled-control-text-color:\n * select-filled-control-placeholder-text-color:\n * select-filled-control-focus-background-color:\n * select-filled-control-focus-and-hover-background-color:\n * select-filled-control-focus-and-hover-border-color:\n * select-filled-control-focus-border-color:\n * select-filled-control-hover-background-color:\n * select-filled-control-hover-border-color:\n * select-filled-control-disabled-background-color:\n * select-filled-control-disabled-border-color:\n * select-filled-control-disabled-icon-color:\n * select-filled-control-disabled-text-color:\n * select-hero-tiny-padding:\n * select-hero-small-padding:\n * select-hero-medium-padding:\n * select-hero-large-padding:\n * select-hero-giant-padding:\n * select-hero-basic-left-background-color:\n * select-hero-basic-right-background-color:\n * select-hero-basic-icon-color:\n * select-hero-basic-text-color:\n * select-hero-basic-placeholder-text-color:\n * select-hero-basic-focus-left-background-color:\n * select-hero-basic-focus-right-background-color:\n * select-hero-basic-focus-and-hover-left-background-color:\n * select-hero-basic-focus-and-hover-right-background-color:\n * select-hero-basic-hover-left-background-color:\n * select-hero-basic-hover-right-background-color:\n * select-hero-basic-disabled-background-color:\n * select-hero-basic-disabled-icon-color:\n * select-hero-basic-disabled-text-color:\n * select-hero-primary-left-background-color:\n * select-hero-primary-right-background-color:\n * select-hero-primary-icon-color:\n * select-hero-primary-text-color:\n * select-hero-primary-placeholder-text-color:\n * select-hero-primary-focus-left-background-color:\n * select-hero-primary-focus-right-background-color:\n * select-hero-primary-focus-and-hover-left-background-color:\n * select-hero-primary-focus-and-hover-right-background-color:\n * select-hero-primary-hover-left-background-color:\n * select-hero-primary-hover-right-background-color:\n * select-hero-primary-disabled-background-color:\n * select-hero-primary-disabled-icon-color:\n * select-hero-primary-disabled-text-color:\n * select-hero-success-left-background-color:\n * select-hero-success-right-background-color:\n * select-hero-success-icon-color:\n * select-hero-success-text-color:\n * select-hero-success-placeholder-text-color:\n * select-hero-success-focus-left-background-color:\n * select-hero-success-focus-right-background-color:\n * select-hero-success-focus-and-hover-left-background-color:\n * select-hero-success-focus-and-hover-right-background-color:\n * select-hero-success-hover-left-background-color:\n * select-hero-success-hover-right-background-color:\n * select-hero-success-disabled-background-color:\n * select-hero-success-disabled-icon-color:\n * select-hero-success-disabled-text-color:\n * select-hero-info-left-background-color:\n * select-hero-info-right-background-color:\n * select-hero-info-icon-color:\n * select-hero-info-text-color:\n * select-hero-info-placeholder-text-color:\n * select-hero-info-focus-left-background-color:\n * select-hero-info-focus-right-background-color:\n * select-hero-info-focus-and-hover-left-background-color:\n * select-hero-info-focus-and-hover-right-background-color:\n * select-hero-info-hover-left-background-color:\n * select-hero-info-hover-right-background-color:\n * select-hero-info-disabled-background-color:\n * select-hero-info-disabled-icon-color:\n * select-hero-info-disabled-text-color:\n * select-hero-warning-left-background-color:\n * select-hero-warning-right-background-color:\n * select-hero-warning-icon-color:\n * select-hero-warning-text-color:\n * select-hero-warning-placeholder-text-color:\n * select-hero-warning-focus-left-background-color:\n * select-hero-warning-focus-right-background-color:\n * select-hero-warning-focus-and-hover-left-background-color:\n * select-hero-warning-focus-and-hover-right-background-color:\n * select-hero-warning-hover-left-background-color:\n * select-hero-warning-hover-right-background-color:\n * select-hero-warning-disabled-background-color:\n * select-hero-warning-disabled-icon-color:\n * select-hero-warning-disabled-text-color:\n * select-hero-danger-left-background-color:\n * select-hero-danger-right-background-color:\n * select-hero-danger-icon-color:\n * select-hero-danger-text-color:\n * select-hero-danger-placeholder-text-color:\n * select-hero-danger-focus-left-background-color:\n * select-hero-danger-focus-right-background-color:\n * select-hero-danger-focus-and-hover-left-background-color:\n * select-hero-danger-focus-and-hover-right-background-color:\n * select-hero-danger-hover-left-background-color:\n * select-hero-danger-hover-right-background-color:\n * select-hero-danger-disabled-background-color:\n * select-hero-danger-disabled-icon-color:\n * select-hero-danger-disabled-text-color:\n * select-hero-control-left-background-color:\n * select-hero-control-right-background-color:\n * select-hero-control-icon-color:\n * select-hero-control-text-color:\n * select-hero-control-placeholder-text-color:\n * select-hero-control-focus-left-background-color:\n * select-hero-control-focus-right-background-color:\n * select-hero-control-focus-and-hover-left-background-color:\n * select-hero-control-focus-and-hover-right-background-color:\n * select-hero-control-hover-left-background-color:\n * select-hero-control-hover-right-background-color:\n * select-hero-control-disabled-background-color:\n * select-hero-control-disabled-icon-color:\n * select-hero-control-disabled-text-color:\n * */\n@Component({\n selector: 'nb-select',\n templateUrl: './select.component.html',\n styleUrls: ['./select.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => NbSelectComponent),\n multi: true\n },\n { provide: NB_SELECT_INJECTION_TOKEN, useExisting: NbSelectComponent },\n { provide: NbFormFieldControl, useExisting: NbSelectComponent },\n { provide: NbFormFieldControlConfig, useFactory: nbSelectFormFieldControlConfigFactory }\n ],\n imports: [NbIconComponent, NbPortalDirective, NbOptionListComponent, NbTagComponent, NbInputDirective],\n host: {\n '[class]': 'hostClasses()',\n '[class.full-width]': 'fullWidth()',\n '[class.open]': 'isOpen()',\n // The label goes to the button, which is what screen readers focus.\n '[attr.aria-labelledby]': 'null'\n }\n})\n// `M` defaults to a mode that isn't known, as a query gives it: typed as a single select, as an unset `multiple` is.\n// Code that holds a multiple select names it, e.g. `NbSelectComponent<City, true>`.\nexport class NbSelectComponent<T = unknown, M extends NbBooleanInput = NbBooleanInput>\nimplements AfterViewInit, AfterContentChecked, OnDestroy, ControlValueAccessor, NbFormFieldControl {\n // The app's defaults for this type, which the inputs below start from.\n protected readonly nbDefaults = injectNbDefaults('select')\n\n protected readonly document = inject(NB_DOCUMENT)\n protected readonly overlay = inject(NbOverlayService)\n protected readonly hostRef = inject<ElementRef<HTMLElement>>(ElementRef)\n protected readonly positionBuilder = inject(NbPositionBuilderService)\n protected readonly triggerStrategyBuilder = inject(NbTriggerStrategyBuilderService)\n protected readonly cd = inject(ChangeDetectorRef)\n protected readonly focusKeyManagerFactoryService = inject<NbFocusKeyManagerFactoryService<NbOptionComponent<T>>>(\n NbFocusKeyManagerFactoryService\n )\n protected readonly focusMonitor = inject(NbFocusMonitor)\n protected readonly statusService = inject(NbStatusService)\n protected readonly injector = inject(Injector)\n protected readonly destroyRef = inject(DestroyRef)\n\n /**\n * `tiny`, `small`, `medium` (default), `large` or `giant`.\n */\n readonly sizeInput = input<NbComponentSize | undefined>(undefined, { alias: 'size' })\n /** The size in use: the input's, the app's default, or 'medium'. */\n readonly size = linkedSignal<NbComponentSize>(() => this.sizeInput() ?? this.nbDefaults().size ?? 'medium')\n\n protected readonly validation = inject(NbValidationDirective, { self: true, optional: true })\n\n /**\n * `basic` (default), `primary`, `info`, `success`, `warning`, `danger`, `control` or a custom status. With\n * `nbValidation`, the status it gives takes over while the control shows errors or success.\n */\n readonly status = input<NbComponentOrCustomStatus>('basic')\n\n // With `nbValidation`, the status it gives while the control shows errors or success.\n protected readonly resolvedStatus = computed(() => this.validation?.status() ?? this.status())\n\n /**\n * `rectangle` (default), `round` or `semi-round`.\n */\n readonly shapeInput = input<NbComponentShape | undefined>(undefined, { alias: 'shape' })\n /** The shape in use: the input's, the app's default, or 'rectangle'. */\n readonly shape = linkedSignal<NbComponentShape>(() => this.shapeInput() ?? this.nbDefaults().shape ?? 'rectangle')\n\n /**\n * `outline` (default), `filled`, `hero` or `ghost` (no background or border at rest; like `outline` under the\n * pointer, with focus, and open). The `outline`, `filled`, `hero` and `ghost` attributes override it.\n */\n readonly appearanceInput = input<NbSelectAppearance | undefined>(undefined, { alias: 'appearance' })\n /** The appearance in use: the input's, the app's default, or 'outline'. */\n readonly appearance = linkedSignal<NbSelectAppearance>(() => this.appearanceInput() ?? this.nbDefaults().appearance ?? 'outline')\n\n /**\n * Class of the options list (`nb-option-list`).\n */\n readonly optionsListClass = input<NbClassInput>()\n\n /**\n * Class of the overlay pane the options open in.\n */\n readonly optionsPanelClass = input<string | string[]>()\n\n /**\n * Tab index of the select button.\n */\n readonly tabIndex = input<number, unknown>(0, { transform: numberAttribute })\n\n /**\n * Width of the options list in pixels; the select's width by default.\n */\n readonly optionsWidth = input<number>()\n\n /**\n * `appearance=\"outline\"` as an attribute.\n */\n readonly outline = input<boolean, NbBooleanInput>(false, { transform: convertToBoolProperty })\n\n /**\n * `appearance=\"filled\"` as an attribute.\n */\n readonly filled = input<boolean, NbBooleanInput>(false, { transform: convertToBoolProperty })\n\n /**\n * `appearance=\"hero\"` as an attribute.\n */\n readonly hero = input<boolean, NbBooleanInput>(false, { transform: convertToBoolProperty })\n\n /**\n * `appearance=\"ghost\"` as an attribute.\n */\n readonly ghost = input<boolean, NbBooleanInput>(false, { transform: convertToBoolProperty })\n\n /**\n * Disables the select, until a form sets its disabled state; see `isDisabled`.\n */\n readonly disabled = input<boolean, NbBooleanInput>(false, { transform: convertToBoolProperty })\n\n /**\n * Stretches the select to its container's width.\n */\n readonly fullWidth = input<boolean, NbBooleanInput>(false, { transform: convertToBoolProperty })\n\n /**\n * Text shown while nothing is selected.\n */\n readonly placeholder = input<string>('')\n\n /**\n * Id of the element that labels the select, e.g. a `<label>` next to it. Screen readers announce the label and then\n * the selected value.\n * Bind it as `[aria-labelledby]` (or set it as a plain attribute); `[attr.aria-labelledby]` bypasses the select.\n */\n readonly ariaLabelledBy = input<string>(undefined, { alias: 'aria-labelledby' })\n\n protected readonly buttonId = `nb-select-button-${lastSelectId++}`\n protected readonly listId = `${this.buttonId}-list`\n protected readonly buttonLabelledBy = computed(() => {\n // Its own label and an `nbLabel` of its `nbValidation`, then the selected value.\n const labelledBy = [this.ariaLabelledBy(), this.validation?.labelledBy()].filter(Boolean).join(' ')\n return labelledBy ? `${labelledBy} ${this.buttonId}` : null\n })\n\n /**\n * Compares an option's value with the select's; strict equality (`===`) by default. `null` and `undefined` never\n * reach it: they only match themselves.\n */\n readonly compareWith = input<NbSelectCompareFunction<T>>()\n\n /**\n * The selected value, or the selected values of a multiple select. It's written like a form value: a value whose\n * options aren't rendered yet is kept until they are.\n *\n * It's typed as either in any mode, so that the options' value type `T` is the item's: `City` for\n * `[selected]=\"city\"` and for `[selected]=\"cities\"` alike.\n */\n readonly selected = input<T | T[] | null>()\n\n /**\n * Lets several options be selected; the value is then an array, and the list stays open as options are picked.\n * Its type `M` sets the type of `selectedChange`; see `NbSelectValue`.\n */\n readonly multiple = input<boolean, M>(false, { transform: convertToBoolProperty })\n\n /**\n * Treats `null` as a value: an option with a `null` value is selected and shown like any other, e.g. \"Auto\" or\n * \"None\". Without it, `null` clears the selection and shows the placeholder. Options without a value (`undefined`)\n * clear the selection either way.\n */\n readonly nullable = input<boolean, NbBooleanInput>(false, { transform: convertToBoolProperty })\n\n /**\n * In a multiple select, shows the selected options as tags instead of a comma-separated list.\n */\n readonly chips = input<boolean, NbBooleanInput>(false, { transform: convertToBoolProperty })\n\n /**\n * In a multiple select, the most options the user can select; once reached, the others are disabled until one is\n * deselected. A value written with more is kept as it is.\n */\n readonly maxSelections = input<number>()\n\n /**\n * Whether a multiple select has as many options selected as `maxSelections` allows.\n */\n readonly isLimitReached = computed(() => {\n const max = this.maxSelections()\n return this.multiple() && max !== undefined && this.selectionModel().length >= max\n })\n\n /**\n * Adds a search input at the top of the open list that filters the options by their text. Focus stays in the\n * input; the arrow keys, Home and End move through the matching options and Enter selects one.\n */\n readonly searchable = input<boolean, NbBooleanInput>(false, { transform: convertToBoolProperty })\n\n /**\n * Decides whether an option matches the search query; by default its text contains it, ignoring case and accents.\n */\n readonly searchFn = input<(option: NbOptionComponent<T>, query: string) => boolean>(nbSelectSearchFn)\n\n protected readonly texts = injectNbTexts('select', () => ({\n search: $localize`:@@nb.select.search:Search`,\n noMatches: $localize`:@@nb.select.noMatches:No matches`,\n back: (title) => $localize`:@@nb.select.back:Back to ${title}:title:`\n }))\n protected readonly searchKeyManagerFactory = inject(\n NbActiveDescendantKeyManagerFactoryService\n ) as NbActiveDescendantKeyManagerFactoryService<NbOptionListItem>\n protected readonly itemKeyManagerFactory = inject(\n NbFocusKeyManagerFactoryService\n ) as NbFocusKeyManagerFactoryService<NbOptionListItem>\n protected readonly query = signal('')\n protected readonly searchInput = viewChild<ElementRef<HTMLInputElement>>('searchInput')\n protected readonly activeOptionId = signal<string | undefined>(undefined)\n // Moves the active option without taking focus from the search input.\n protected searchKeyManager?: NbActiveDescendantKeyManager<NbOptionListItem>\n\n // Tags one size smaller than the select fit in its line, so a row of them doesn't make it taller.\n protected readonly chipSize = computed<NbComponentSize>(() => {\n const sizes: NbComponentSize[] = ['tiny', 'tiny', 'small', 'medium', 'large']\n return sizes[['tiny', 'small', 'medium', 'large', 'giant'].indexOf(this.size())] ?? 'small'\n })\n\n /**\n * The options' distance from the select, in pixels.\n */\n readonly overlayOffset = input(8)\n\n /**\n * What scrolling the page does while the options are open: `block` (default) prevents it, `close` closes them,\n * `reposition` moves them along, and `noop` nothing.\n */\n readonly scrollStrategy = input<NbScrollStrategies>('block')\n\n /**\n * Emits when the user changes the selection, not when a value is written: the selected option's value (or `null`),\n * or with `multiple`, the values of all selected options. See `NbSelectValue`.\n */\n readonly selectedChange = output<NbSelectValue<T, M>>()\n\n /**\n * The options passed as content, at any depth.\n */\n // The options of a select carry values of the select's type.\n readonly options = contentChildren<NbOptionComponent<T>>(NbOptionComponent, { descendants: true })\n\n /**\n * The nested options passed as content.\n */\n readonly nestedOptions = contentChildren(NbOptionNestedComponent, { descendants: true })\n\n // The options and nested options, in the order they're in, which the keyboard moves through.\n protected readonly items = contentChildren(NB_OPTION_LIST_ITEM, { descendants: true })\n\n /**\n * How many levels of nested options the list shows at once; opening a deeper one drills into it.\n */\n readonly nestedLevels = input<number, unknown>(3, { transform: (value) => Math.max(1, numberAttribute(value, 3)) })\n\n /**\n * The nested option the list is drilled into: only the options in it show, and a row at the top goes back.\n */\n readonly nestedRoot = signal<NbOptionNestedComponent | undefined>(undefined)\n\n /**\n * Whether the select has nested options, which make its list a tree.\n */\n readonly isTree = computed(() => this.nestedOptions().length > 0)\n\n // A search shows the matching options in all nested options, wherever the list is drilled into.\n protected readonly isNestedSearch = computed(() => this.searchable() && !!this.query().trim())\n protected readonly directionService = inject(NbLayoutDirectionService)\n // The nested option the back row goes back from; a search shows all, without one.\n protected readonly backTo = computed(() => (this.isNestedSearch() ? undefined : this.nestedRoot()))\n\n /**\n * An `nb-select-label` passed as content, shown instead of the selected options' text.\n */\n readonly customLabel = contentChild(NbSelectLabelComponent)\n\n // The options list, which the overlay attaches.\n protected readonly portal = viewChild(NbPortalDirective)\n\n protected readonly button = viewChild.required('selectButton', { read: ElementRef<HTMLButtonElement> })\n\n protected readonly opened = signal(false)\n\n /**\n * Whether the options are open.\n */\n readonly isOpen = this.opened.asReadonly()\n\n /**\n * Whether the options are closed.\n */\n readonly isHidden = computed(() => !this.isOpen())\n\n /**\n * The selected options.\n */\n readonly selectionModel = signal<Array<NbOptionComponent<T>>>([])\n\n /**\n * The selected value, or the values of the selected options in a multiple select.\n */\n readonly selectedValue = computed(() => {\n const selection = this.selectionModel()\n return this.multiple() ? this.optionValues(selection) : selection[0]?.value()\n })\n\n /**\n * Whether the select is disabled: the `disabled` input, until a form changes it.\n */\n readonly isDisabled = linkedSignal(() => this.disabled())\n\n // The position strategy can be replaced while the options are open, e.g. by a subclass.\n protected readonly positionStrategy$ = new BehaviorSubject<NbAdjustableConnectedPositionStrategy | undefined>(\n undefined\n )\n\n get positionStrategy(): NbAdjustableConnectedPositionStrategy | undefined {\n return this.positionStrategy$.value\n }\n\n /**\n * Current overlay position, which the options list and the button render with.\n */\n readonly overlayPosition = signal<NbPosition>('' as NbPosition)\n\n protected readonly focused = signal(false)\n\n protected ref?: NbOverlayRef\n\n protected triggerStrategy?: NbTriggerStrategy\n\n protected alive = true\n\n protected keyManager?: NbFocusKeyManager<NbOptionListItem>\n\n // A value written before its options rendered, applied once they do; only the last one is kept.\n protected queue?: T | T[] | null\n // Whether `queue` holds a value; `null` can be a queued value when the select is `nullable`.\n protected queued = false\n protected lastSelectionView?: string\n\n protected onChange: (value: T | T[] | null) => void = () => {}\n protected onTouched: () => void = () => {}\n\n protected readonly compareFn = computed<NbSelectCompareFunction<T>>(() => {\n const compareWith = this.compareWith()\n return typeof compareWith === 'function' ? compareWith : (v1, v2) => v1 === v2\n })\n\n readonly controlState = computed(() => ({\n status: this.resolvedStatus(),\n size: this.size(),\n fullWidth: this.fullWidth(),\n focused: this.focused(),\n disabled: this.isDisabled()\n }))\n\n protected readonly resolvedAppearance = computed<NbSelectAppearance>(() => {\n if (this.ghost()) {\n return 'ghost'\n }\n if (this.hero()) {\n return 'hero'\n }\n if (this.filled()) {\n return 'filled'\n }\n if (this.outline()) {\n return 'outline'\n }\n return this.appearance()\n })\n\n protected readonly hostClasses = computed(() => [\n `size-${this.size()}`,\n this.statusService.getStatusClass(this.resolvedStatus()),\n `shape-${this.shape()}`,\n `appearance-${this.resolvedAppearance()}`\n ])\n\n readonly selectButtonClasses = computed(() => {\n const classes = new Array<string>()\n const empty = !this.selectionModel().length\n\n if (empty) {\n classes.push('placeholder')\n }\n if (empty && !this.placeholder()) {\n classes.push('empty')\n }\n if (this.isOpen()) {\n classes.push(this.overlayPosition())\n }\n\n return classes\n })\n\n constructor() {\n // The focusable element is inside: the button or the native input gets aria-invalid and aria-describedby.\n this.validation?.delegateAria()\n enableTransitionsAfterRender(this.hostRef.nativeElement)\n\n // Searching leaves out the options that don't match, and keeps the active option among the ones shown.\n effect(() => {\n const query = this.searchable() ? this.query().trim() : ''\n const matches = this.searchFn()\n const options = this.options()\n untracked(() => {\n const choices = options.filter((option) => !option.selectAll())\n choices.forEach((option) => option.filtered.set(!!query && !matches(option, query)))\n // A select-all option acts on the options the search shows, so it stays while there are any.\n const nothingShown = choices.every((option) => option.filtered())\n options\n .filter((option) => option.selectAll())\n .forEach((option) => option.filtered.set(!!query && nothingShown))\n const active = this.searchKeyManager?.activeItem\n if (this.isSearching() && (!active || active.hidden)) {\n this.searchKeyManager?.setFirstItemActive()\n }\n })\n })\n\n // Options added, a search, or a nested option opened from the app change which options show.\n effect(() => {\n this.options()\n const nestedOptions = this.nestedOptions()\n this.nestedRoot()\n this.isNestedSearch()\n nestedOptions.forEach((nested) => nested.expanded())\n if (nestedOptions.length) {\n untracked(() => this.syncNested())\n }\n })\n\n this.destroyRef.onDestroy(() => (this.alive = false))\n\n // A bound `selected` is written like a form value; an unbound one doesn't clear a form's value.\n let firstSelected = true\n effect(() => {\n const selected = this.selected()\n untracked(() => {\n if (!firstSelected || selected !== undefined) {\n this.writeValue(selected)\n }\n firstSelected = false\n })\n })\n\n // Select the current value again with a new compare function.\n effect(() => {\n this.compareFn()\n untracked(() => {\n if (this.selectionModel().length && this.canSelectValue()) {\n this.setSelection(this.selectedValue())\n }\n })\n })\n\n // A queued value, or a selection of options that were replaced (e.g. options loaded again),\n // is selected among the current options once they render with their values bound.\n afterRenderEffect(() => {\n this.options().forEach((option) => option.value())\n untracked(() => {\n if ((this.queued || this.hasRemovedSelectedOptions()) && this.canSelectValue()) {\n this.writeValue(this.queued ? this.queue : this.selectedValue())\n }\n })\n })\n\n // Options can change at runtime, so listen to the clicks of the current ones.\n toObservable(this.options)\n .pipe(\n switchMap((options) => merge(...options.map((option) => option.click))),\n takeUntilDestroyed()\n )\n .subscribe((clickedOption) => this.handleOptionClick(clickedOption))\n }\n\n /**\n * The select button's width, in pixels.\n */\n get hostWidth(): number {\n return this.button().nativeElement.getBoundingClientRect().width\n }\n\n /**\n * The text of the selected options, which the button shows; it's read from the DOM.\n */\n get selectionView() {\n const selection = this.selectionModel()\n if (selection.length > 1) {\n return selection.map((option) => option.content).join(', ')\n }\n\n return selection[0].content\n }\n\n ngAfterContentChecked() {\n // The label shows the text of the selected options, which their parent view renders (e.g. a translation).\n const label = this.selectionModel().length ? this.selectionView : undefined\n if (label !== this.lastSelectionView) {\n this.lastSelectionView = label\n this.cd.markForCheck()\n }\n }\n\n ngAfterViewInit() {\n this.triggerStrategy = this.createTriggerStrategy()\n\n this.subscribeOnButtonFocus()\n this.subscribeOnTriggers(this.triggerStrategy)\n }\n\n ngOnDestroy() {\n if (this.ref) {\n this.ref.dispose()\n }\n if (this.triggerStrategy) {\n this.triggerStrategy.destroy()\n }\n }\n\n show() {\n if (this.shouldShow()) {\n this.attachToOverlay()\n\n this.positionChanges()\n .pipe(take(1), takeUntilDestroyed(this.destroyRef))\n .subscribe(() => this.onPositioned())\n }\n }\n\n hide() {\n if (this.isOpen()) {\n this.ref?.detach()\n this.opened.set(false)\n // The list opens with all its options again.\n this.query.set('')\n }\n }\n\n registerOnChange(fn: (value: T | T[] | null) => void) {\n this.onChange = fn\n }\n\n registerOnTouched(fn: () => void) {\n this.onTouched = fn\n }\n\n setDisabledState(isDisabled: boolean) {\n this.isDisabled.set(isDisabled)\n }\n\n writeValue(value?: T | T[] | null) {\n if (!this.alive) {\n return\n }\n\n if (this.canSelectValue()) {\n this.setSelection(value)\n // Keep a value whose options aren't all rendered yet (options loaded later), so they're selected once they\n // appear.\n this.queued = this.selectionModel().length < this.countValues(value)\n this.queue = this.queued ? value : undefined\n } else {\n this.queued = true\n this.queue = value\n }\n }\n\n /**\n * Selects the option; a select-all one toggles all, and one without a value clears the selection.\n */\n protected handleOptionClick(option: NbOptionComponent<T>) {\n this.queue = undefined\n this.queued = false\n if (option.selectAll()) {\n if (this.multiple()) {\n this.toggleAll()\n }\n } else if (this.isEmptyValue(option.value())) {\n this.reset()\n } else {\n this.selectOption(option)\n }\n // A multiple select stays open; searching goes on where it was.\n if (this.isSearching() && this.isOpen()) {\n this.searchKeyManager?.setActiveItem(option)\n this.searchInput()?.nativeElement.focus()\n }\n }\n\n /**\n * Clears the selection, closes the options and emits an empty value.\n */\n protected reset() {\n this.selectionModel().forEach((option) => option.deselect())\n this.selectionModel.set([])\n this.hide()\n this.focusButton()\n this.emitSelected(this.multiple() ? [] : null)\n }\n\n protected selectOption(option: NbOptionComponent<T>) {\n if (this.multiple()) {\n this.handleMultipleSelect(option)\n } else {\n this.handleSingleSelect(option)\n }\n }\n\n // Selects the option, closes the options and emits.\n protected handleSingleSelect(option: NbOptionComponent<T>) {\n const selected = this.selectionModel()[0]\n\n if (selected && !this.sameValue(selected.value(), option.value())) {\n selected.deselect()\n }\n\n this.selectionModel.set([option])\n option.select()\n this.hide()\n this.focusButton()\n\n // An option without a value clears the selection instead, so it has one here.\n this.emitSelected(option.value() ?? null)\n }\n\n // Toggles the option, unless `maxSelections` is reached; the options stay open.\n protected handleMultipleSelect(option: NbOptionComponent<T>) {\n if (this.isLimited(option)) {\n return\n }\n if (option.selected()) {\n this.selectionModel.update((selection) =>\n selection.filter((s) => !this.sameValue(s.value(), option.value()))\n )\n option.deselect()\n } else {\n this.selectionModel.update((selection) => [...selection, option])\n option.select()\n }\n\n this.emitSelected(this.optionValues(this.selectionModel()))\n }\n\n protected attachToOverlay() {\n let ref = this.ref\n if (!ref) {\n ref = this.createOverlay()\n this.subscribeOnPositionChange()\n this.createKeyManager()\n this.subscribeOnOverlayKeys(ref)\n }\n\n ref.attach(this.portal())\n this.opened.set(true)\n }\n\n /**\n * Runs once the open options are positioned.\n */\n protected onPositioned() {\n this.setActiveOption()\n if (this.isSearching()) {\n this.searchInput()?.nativeElement.focus()\n }\n }\n\n // Whether the open list is searched, with `searchable`.\n protected isSearching(): boolean {\n return this.searchable() && !!this.searchKeyManager\n }\n\n protected readonly noMatches = computed(\n () =>\n this.searchable() &&\n !!this.query().trim() &&\n this.options().every((option) => option.selectAll() || option.filtered())\n )\n\n protected onSearchInput(event: Event) {\n this.query.set((event.target as HTMLInputElement).value)\n }\n\n protected positionChanges() {\n return this.positionStrategy$.pipe(switchMap((positionStrategy) => positionStrategy?.positionChange ?? EMPTY))\n }\n\n protected focusButton() {\n this.button().nativeElement.focus()\n }\n\n protected setActiveOption() {\n const keyManager = this.isSearching() && this.searchKeyManager ? this.searchKeyManager : this.keyManager\n // A selected option in a collapsed nested option opens it.\n if (this.selectionModel().length) {\n this.revealNested(this.selectionModel()[0])\n }\n const selection = this.selectionModel().filter((option) => !option.hidden)\n if (selection.length) {\n keyManager?.setActiveItem(selection[0])\n } else {\n keyManager?.setFirstItemActive()\n }\n }\n\n protected createOverlay(): NbOverlayRef {\n const scrollStrategy = this.createScrollStrategy()\n this.positionStrategy$.next(this.createPositionStrategy())\n const ref = this.overlay.create({\n positionStrategy: this.positionStrategy,\n scrollStrategy,\n panelClass: this.optionsPanelClass()\n })\n this.ref = ref\n // The overlay can also detach itself, e.g. through its scroll strategy.\n ref.detachments().pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => this.opened.set(false))\n return ref\n }\n\n protected createKeyManager() {\n this.keyManager = this.itemKeyManagerFactory\n .create(this.items, this.injector)\n .withTypeAhead(200)\n // Like a native select: Home, End, PageUp and PageDown move through the options.\n .withHomeAndEnd()\n .withPageUpDown()\n // Collapsed in a nested option.\n .skipPredicate((item) => item.disabled || item.hidden)\n\n this.searchKeyManager = this.searchKeyManagerFactory\n .create(this.items, this.injector)\n .withHomeAndEnd()\n .withPageUpDown()\n .skipPredicate((option) => option.disabled || option.hidden)\n this.searchKeyManager.change\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => this.activeOptionId.set(this.searchKeyManager?.activeItem?.id))\n }\n\n protected createPositionStrategy(): NbAdjustableConnectedPositionStrategy {\n return this.positionBuilder\n .connectedTo(this.button())\n .position(NbPosition.BOTTOM)\n .offset(this.overlayOffset())\n .adjustment(NbAdjustment.VERTICAL)\n // Where neither below nor above has room for the whole list, it gets the space there is and scrolls. The CDK\n // shifts the list by the offset after sizing it, so the margin includes the offset to keep 8px from the edge.\n .withFlexibleDimensions(true)\n .withViewportMargin(8 + this.overlayOffset())\n }\n\n protected createScrollStrategy(): NbScrollStrategy {\n return this.overlay.scrollStrategies[this.scrollStrategy()]()\n }\n\n protected createTriggerStrategy(): NbTriggerStrategy {\n return this.triggerStrategyBuilder\n .trigger(NbTrigger.CLICK)\n .host(this.hostRef.nativeElement)\n .container(() => this.getContainer())\n .build()\n }\n\n protected subscribeOnTriggers(triggerStrategy: NbTriggerStrategy) {\n triggerStrategy.show$.subscribe(() => this.show())\n triggerStrategy.hide$.pipe(filter(() => this.isOpen())).subscribe(($event: Event) => {\n this.hide()\n if (!this.isClickedWithinComponent($event)) {\n this.onTouched()\n }\n })\n }\n\n protected subscribeOnPositionChange() {\n this.positionChanges()\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe((position: NbPosition) => this.overlayPosition.set(position))\n }\n\n protected subscribeOnOverlayKeys(ref: NbOverlayRef) {\n ref\n .keydownEvents()\n .pipe(\n filter(() => this.isOpen()),\n takeUntilDestroyed(this.destroyRef)\n )\n .subscribe((event: KeyboardEvent) => {\n const keyManager = this.isSearching() && this.searchKeyManager ? this.searchKeyManager : this.keyManager\n if (event.key === 'Escape' && !isComposing(event)) {\n // Only the options close, not a dialog or window the select is in.\n event.preventDefault()\n event.stopPropagation()\n this.focusButton()\n this.hide()\n } else if (this.onNestedKeydown(event, keyManager)) {\n event.preventDefault()\n } else if (this.isSearching() && this.searchKeyManager) {\n this.onSearchKeydown(event, this.searchKeyManager)\n } else {\n this.keyManager?.onKeydown(event)\n }\n })\n\n const tabOuts = new Array<Observable<void>>()\n if (this.keyManager) {\n tabOuts.push(this.keyManager.tabOut)\n }\n if (this.searchKeyManager) {\n tabOuts.push(this.searchKeyManager.tabOut)\n }\n merge(...tabOuts)\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => {\n this.hide()\n this.onTouched()\n })\n }\n\n protected onSearchKeydown(event: KeyboardEvent, keyManager: NbActiveDescendantKeyManager<NbOptionListItem>) {\n if (event.key === 'Enter' && !isComposing(event)) {\n const active = keyManager.activeItem\n if (active instanceof NbOptionComponent) {\n event.preventDefault()\n this.handleOptionClick(active)\n }\n } else {\n // Arrows, Home and End move the active option; other keys type into the input.\n keyManager.onKeydown(event)\n }\n }\n\n /**\n * Opens or closes a nested option. Opening one deeper than `nestedLevels` drills into it.\n */\n toggleNested(nested: NbOptionNestedComponent) {\n if (nested.expanded()) {\n nested.expanded.set(false)\n } else {\n nested.expanded.set(true)\n // Its options would be one level too deep: start the list lower, so they're at the last level shown.\n if (this.nestedLevel(nested) + 1 > this.nestedLevels()) {\n this.setNestedRoot(this.nestedAncestor(nested, nested.depth + 1 - this.nestedLevels()))\n }\n }\n this.syncNested()\n // Clicking a row focuses it; searching goes on in the input.\n if (this.isSearching() && this.isOpen()) {\n this.searchInput()?.nativeElement.focus()\n }\n const keyManager = this.isSearching() && this.searchKeyManager ? this.searchKeyManager : this.keyManager\n if (nested.hidden) {\n // Drilled into it, with one level shown: its first option is in its place. Making it active would reveal it,\n // going back out.\n keyManager?.updateActiveItem(nested)\n keyManager?.setNextItemActive()\n } else if (keyManager?.activeItem !== nested) {\n keyManager?.setActiveItem(nested)\n }\n }\n\n /**\n * Opens the nested options an option or nested option is in, and drills in or back as needed, so it shows.\n */\n revealNested(item: NbNestedItem) {\n if (!this.isTree() || this.isNestedSearch()) {\n return\n }\n for (let nested = item.parentNested; nested; nested = nested.parentNested) {\n nested.expanded.set(true)\n }\n const root = this.nestedRoot()\n if (!this.isInNested(item, root) || this.nestedLevel(item) > this.nestedLevels()) {\n this.setNestedRoot(this.nestedAncestor(item, item.depth - this.nestedLevels()))\n }\n this.syncNested()\n }\n\n /**\n * Goes back from the nested option the list is drilled into, to the one it's in.\n */\n nestedBack() {\n const root = this.nestedRoot()\n if (root) {\n this.setNestedRoot(root.parentNested ?? undefined)\n this.syncNested()\n if (this.isSearching()) {\n this.searchInput()?.nativeElement.focus()\n }\n (this.isSearching() && this.searchKeyManager ? this.searchKeyManager : this.keyManager)?.setActiveItem(root)\n }\n }\n\n protected setNestedRoot(root?: NbOptionNestedComponent) {\n this.nestedRoot.set(root)\n // Nested options whose options would be deeper than the levels shown close.\n for (const nested of this.nestedOptions()) {\n if (nested.expanded() && this.nestedLevel(nested) >= this.nestedLevels() && this.isInNested(nested, root)) {\n nested.expanded.set(false)\n }\n }\n }\n\n // How deep an option or nested option is in the view: 1 at its top.\n protected nestedLevel(item: NbNestedItem): number {\n return item.depth - (this.nestedRoot()?.depth ?? 0)\n }\n\n // Whether an option or nested option is in a nested option, or anywhere for none.\n protected isInNested(item: NbNestedItem, root?: NbOptionNestedComponent) {\n for (let nested = item.parentNested; nested; nested = nested.parentNested) {\n if (nested === root) {\n return true\n }\n }\n return !root\n }\n\n // The nested option an item is in at a depth, or the item itself if it's there; none above the top.\n protected nestedAncestor(item: NbNestedItem, depth: number) {\n let nested = item instanceof NbOptionNestedComponent ? item : item.parentNested\n while (nested && nested.depth > depth) {\n nested = nested.parentNested\n }\n return depth > 0 ? (nested ?? undefined) : undefined\n }\n\n /**\n * Shows the options and nested options in view, and indents them by how deep they are in it. It sets them at once,\n * not on the next render, so an option can take focus and scroll into view as soon as it's revealed.\n */\n protected syncNested() {\n const root = this.nestedRoot()\n const search = this.isNestedSearch()\n const base = search ? 0 : (root?.depth ?? 0)\n const shows = (item: NbNestedItem) => {\n if (search) {\n return true\n }\n let nested = item.parentNested\n while (nested && nested !== root) {\n if (!nested.expanded()) {\n return false\n }\n nested = nested.parentNested\n }\n return (nested ?? undefined) === root\n }\n // Groups with nothing in view hide, with their title; a group holding the nested option the list is drilled into\n // hides only its title.\n const groups = new Map<NbOptionGroupComponent, boolean>()\n const drilledGroups = new Set<NbOptionGroupComponent>()\n for (const option of this.options()) {\n const shown = shows(option)\n option.setNestedView(!shown, option.depth - base)\n if (option.group) {\n groups.set(option.group, shown || !!groups.get(option.group))\n }\n }\n for (const nested of this.nestedOptions()) {\n const shown = shows(nested)\n const drilledInto = !search && !!root && (nested === root || this.isInNested(root, nested))\n nested.setNestedView(!shown, nested.depth - base, search || nested.expanded(), drilledInto)\n if (nested.group) {\n groups.set(nested.group, shown || drilledInto || !!groups.get(nested.group))\n if (drilledInto) {\n drilledGroups.add(nested.group)\n }\n }\n }\n groups.forEach((shown, group) => group.setNestedView(!shown, drilledGroups.has(group)))\n }\n\n /**\n * Moves through nested options like a tree: ArrowRight (ArrowLeft in RTL) opens one, or moves into it when it's\n * open; ArrowLeft closes one, moves to the one it's in, or goes back from where the list is drilled into; Enter and\n * Space open and close one. Typing into the search input keeps the arrows, so they move through the tree only while\n * it's empty.\n */\n protected onNestedKeydown(\n event: KeyboardEvent,\n keyManager?: NbFocusKeyManager<NbOptionListItem> | NbActiveDescendantKeyManager<NbOptionListItem>\n ): boolean {\n const active = keyManager?.activeItem\n if (!this.isTree() || !keyManager || !active || isComposing(event)) {\n return false\n }\n const searching = this.isSearching()\n if (event.key === 'Enter' || (event.key === ' ' && !searching)) {\n if (active instanceof NbOptionNestedComponent) {\n if (!active.disabled) {\n this.toggleNested(active)\n }\n return true\n }\n return false\n }\n const rtl = this.directionService.isRtl()\n const forward = event.key === (rtl ? 'ArrowLeft' : 'ArrowRight')\n const backward = event.key === (rtl ? 'ArrowRight' : 'ArrowLeft')\n if ((!forward && !backward) || (searching && this.query())) {\n return false\n }\n if (!(active instanceof NbOptionComponent || active instanceof NbOptionNestedComponent)) {\n return false\n }\n if (forward) {\n if (active instanceof NbOptionNestedComponent && !active.disabled) {\n if (active.expanded()) {\n keyManager.setNextItemActive()\n } else {\n this.toggleNested(active)\n }\n }\n } else if (active instanceof NbOptionNestedComponent && active.expanded() && !active.hidden) {\n this.toggleNested(active)\n } else if (active.parentNested && active.parentNested !== this.nestedRoot()) {\n keyManager.setActiveItem(active.parentNested)\n } else {\n this.nestedBack()\n }\n return true\n }\n\n protected subscribeOnButtonFocus() {\n const button = this.button()\n this.focusMonitor\n .monitor(button)\n .pipe(\n map((origin) => !!origin),\n takeUntilDestroyed(this.destroyRef)\n )\n // Focus can change while the select renders: hiding a focused button blurs it once the layout is measured.\n .subscribe((focused) => untracked(() => this.focused.set(focused)))\n this.destroyRef.onDestroy(() => this.focusMonitor.stopMonitoring(button))\n }\n\n protected getContainer(): ComponentRef<unknown> | undefined {\n return this.ref && this.ref.hasAttached()\n ? <ComponentRef<unknown>>{\n location: {\n nativeElement: this.ref.overlayElement\n }\n }\n : undefined\n }\n\n /**\n * Emits the value to the form and `selectedChange`.\n */\n protected emitSelected(selected: T | T[] | null) {\n this.onChange(selected)\n // An array in a multiple select, one value (or null) otherwise, which is what NbSelectValue says for `M`.\n this.selectedChange.emit(selected as NbSelectValue<T, M>)\n }\n\n protected countValues(value: unknown): number {\n if (this.isEmptyValue(value) || (this.multiple() && value === '')) {\n return 0\n }\n return this.multiple() && Array.isArray(value) ? value.length : 1\n }\n\n /**\n * Whether an option can't be selected because `maxSelections` is reached.\n */\n isLimited(option: Pick<NbOptionComponent, 'selected' | 'selectAll'>): boolean {\n return this.isLimitReached() && !option.selected() && !option.selectAll()\n }\n\n // The options a select-all option acts on: the enabled ones a search shows.\n protected readonly selectAllCandidates = computed(() =>\n this.options().filter((option) => !option.selectAll() && !option.ownDisabled() && !option.filtered())\n )\n\n /**\n * How many of the options a select-all option acts on are selected: `all`, `some` or `none`.\n */\n readonly selectAllState = computed<'all' | 'some' | 'none'>(() => {\n const candidates = this.selectAllCandidates()\n const selected = candidates.filter((option) => option.selected()).length\n if (selected && selected === candidates.length) {\n return 'all'\n }\n return selected ? 'some' : 'none'\n })\n\n // Selects the options it acts on, up to `maxSelections`, or clears them when all are selected or the limit is\n // reached.\n protected toggleAll() {\n const candidates = this.selectAllCandidates()\n if (this.selectAllState() === 'all' || this.isLimitReached()) {\n candidates.forEach((option) => option.deselect())\n this.selectionModel.update((selection) =>\n selection.filter((selected) => !candidates.some((option) => this.sameValue(option.value(), selected.value())))\n )\n } else {\n const room = (this.maxSelections() ?? Infinity) - this.selectionModel().length\n const added = candidates.filter((option) => !option.selected()).slice(0, room)\n added.forEach((option) => option.select())\n this.selectionModel.update((selection) => [...selection, ...added])\n }\n this.emitSelected(this.optionValues(this.selectionModel()))\n }\n\n /**\n * Whether a value means \"nothing selected\": `undefined`, and `null` unless the select is `nullable`.\n */\n isEmptyValue(value: unknown): boolean {\n return value === undefined || (value === null && !this.nullable())\n }\n\n // Compares values with `compareWith`; `null` and `undefined` only match themselves.\n protected sameValue(v1?: T | null, v2?: T | null): boolean {\n return v1 == null || v2 == null ? v1 === v2 : this.compareFn()(v1, v2)\n }\n\n // The values of options; options without a value clear the selection, so they aren't among them.\n protected optionValues(options: ReadonlyArray<NbOptionComponent<T>>): T[] {\n return options.map((option) => option.value()).filter((value): value is T => value !== undefined)\n }\n\n protected hasRemovedSelectedOptions(): boolean {\n const options = this.options()\n return this.selectionModel().some((option) => !options.includes(option))\n }\n\n /**\n * Selects the options matching the value and deselects the others. Throws when the value's shape doesn't match\n * `multiple`: an array for a single select, or a single value for a multiple one.\n */\n protected setSelection(value?: T | T[] | null) {\n const multiple = this.multiple()\n // A bare `ngModel` writes '' initially; a multiple select treats it like no value.\n const isResetValue = this.isEmptyValue(value) || (multiple && value === '')\n let safeValue = value\n\n if (multiple) {\n safeValue = isResetValue ? [] : value\n }\n\n const isArray: boolean = Array.isArray(safeValue)\n\n if (multiple && !isArray && !isResetValue) {\n throw new Error(\"Can't assign single value if select is marked as multiple\")\n }\n if (!multiple && isArray) {\n throw new Error(\"Can't assign array if select is not marked as multiple\")\n }\n\n const previouslySelectedOptions = this.selectionModel()\n const selection = new Array<NbOptionComponent<T>>()\n\n // A multiple select has an array by now, and a single one doesn't.\n if (Array.isArray(safeValue)) {\n safeValue.forEach((option) => this.selectValue(option, selection))\n } else {\n this.selectValue(safeValue, selection)\n }\n this.selectionModel.set(selection)\n\n // find options which were selected before and trigger deselect\n previouslySelectedOptions\n .filter((option) => !selection.includes(option))\n .forEach((option) => option.deselect())\n }\n\n /**\n * Adds the option matching the value to the selection, if there is one.\n */\n protected selectValue(value: T | null | undefined, selection: Array<NbOptionComponent<T>>) {\n if (this.isEmptyValue(value)) {\n return\n }\n\n const corresponding = this.options().find((option) => this.sameValue(option.value(), value))\n\n if (corresponding) {\n corresponding.select()\n selection.push(corresponding)\n }\n }\n\n protected shouldShow(): boolean {\n // A disabled select, or one inside a disabled <fieldset>, stays closed.\n const disabled = this.isDisabled() || !!this.button()?.nativeElement.matches(':disabled')\n return !disabled && this.isHidden() && this.options().length > 0\n }\n\n /**\n * Marks the control touched when the button loses focus while the options are closed; focus moving into the\n * open options doesn't count.\n */\n trySetTouched() {\n if (this.isHidden()) {\n this.onTouched()\n }\n }\n\n protected isClickedWithinComponent($event: Event) {\n return this.hostRef.nativeElement === $event.target || this.hostRef.nativeElement.contains($event.target as Node)\n }\n\n protected canSelectValue(): boolean {\n return this.options().length > 0\n }\n}\n","<button [disabled]=\"isDisabled()\"\n [class]=\"selectButtonClasses()\"\n [id]=\"buttonId\"\n [attr.aria-labelledby]=\"buttonLabelledBy()\"\n aria-haspopup=\"listbox\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-controls]=\"isOpen() ? listId : null\"\n [attr.aria-invalid]=\"validation?.ariaInvalid()\"\n [attr.aria-describedby]=\"validation?.describedBy()\"\n [attr.aria-required]=\"validation?.ariaRequired()\"\n [tabIndex]=\"tabIndex()\"\n (blur)=\"trySetTouched()\"\n (keydown.arrowDown)=\"show()\"\n (keydown.arrowUp)=\"show()\"\n class=\"select-button\"\n type=\"button\"\n #selectButton>\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- Stops chip clicks while disabled; the keyboard reaches only the button. -->\n <span [class.select-label-chips]=\"chips() && multiple() && !customLabel() && selectionModel().length\"\n (click)=\"isDisabled() && $event.stopPropagation()\">\n @if (selectionModel().length) {\n @if (customLabel()) {\n <ng-content select=\"nb-select-label\" />\n } @else if (chips() && multiple()) {\n <span class=\"select-chips\">\n @for (option of selectionModel(); track option) {\n <nb-tag [text]=\"option.content.trim()\"\n [size]=\"chipSize()\" />\n }\n </span>\n } @else {\n <span dir=\"auto\">{{ selectionView }}</span>\n }\n } @else {\n <span dir=\"auto\">{{ placeholder() }}</span>\n }\n </span>\n\n <nb-icon icon=\"chevron-down-outline\"\n pack=\"essentials\"\n (click)=\"isDisabled() && $event.stopPropagation()\"\n aria-hidden=\"true\" />\n</button>\n\n<nb-option-list *nbPortal\n [size]=\"size()\"\n [multiple]=\"multiple()\"\n [listId]=\"listId\"\n [listRole]=\"isTree() ? 'tree' : 'listbox'\"\n [position]=\"overlayPosition()\"\n [style.width.px]=\"optionsWidth() ?? hostWidth\"\n [class]=\"optionsListClass()\">\n @if (searchable()) {\n <div nbOptionListHeader\n class=\"select-search\">\n <input nbInput\n ghost\n fullWidth\n #searchInput\n autocomplete=\"off\"\n role=\"combobox\"\n aria-autocomplete=\"list\"\n aria-expanded=\"true\"\n [attr.aria-controls]=\"listId\"\n [attr.aria-activedescendant]=\"activeOptionId()\"\n [attr.aria-label]=\"texts().search\"\n [placeholder]=\"texts().search\"\n [fieldSize]=\"size()\"\n [value]=\"query()\"\n (input)=\"onSearchInput($event)\" />\n <div class=\"select-no-matches\"\n role=\"status\">\n @if (noMatches()) {{{ texts().noMatches }}}\n </div>\n </div>\n }\n @if (backTo(); as root) {\n <button nbOptionListHeader\n class=\"option-nested-back\"\n type=\"button\"\n tabindex=\"-1\"\n [attr.aria-label]=\"texts().back(root.title() ?? '')\"\n (click)=\"nestedBack()\">\n <nb-icon icon=\"chevron-left-outline\"\n pack=\"essentials\"\n aria-hidden=\"true\" />\n <span><span dir=\"auto\">{{ root.title() }}</span></span>\n </button>\n }\n <!-- Everything but the label, so options also come in nested control flow, e.g. an @if in a @for. -->\n <ng-content />\n</nb-option-list>\n","import { NgModule } from '@angular/core'\n\nimport { NbOverlayModule } from '@liquid-js/lyr-core/cdk'\nimport { NbInputModule } from '@liquid-js/lyr-core/input'\nimport { NbCardModule } from '@liquid-js/lyr-core/card'\nimport { NbButtonModule } from '@liquid-js/lyr-core/button'\nimport { NbIconModule } from '@liquid-js/lyr-core/icon'\nimport { NbOptionModule } from '../option/option-list.module'\nimport { NbSelectComponent, NbSelectLabelComponent } from './select.component'\n\nconst NB_SELECT_COMPONENTS = [NbSelectComponent, NbSelectLabelComponent]\n\n@NgModule({\n imports: [\n NbOverlayModule,\n NbButtonModule,\n NbInputModule,\n NbCardModule,\n NbIconModule,\n NbOptionModule,\n ...NB_SELECT_COMPONENTS\n ],\n exports: [...NB_SELECT_COMPONENTS, NbOptionModule]\n})\nexport class NbSelectModule {}\n","import {\n Component,\n contentChildren,\n ElementRef,\n input,\n linkedSignal,\n output,\n Signal,\n signal,\n viewChild\n} from '@angular/core'\n\nimport { ɵconvertToBoolProperty as convertToBoolProperty, NbBooleanInput, ɵNbClassInput as NbClassInput, injectNbDefaults, NbComponentSize } from '@liquid-js/lyr-core/base'\nimport { NbPosition, NbPortalDirective } from '@liquid-js/lyr-core/cdk'\nimport { NbOptionComponent } from '../option/option.component'\nimport { NbOptionListComponent } from '../option/option-list.component'\nimport { NbOptionGroupComponent } from '../option/option-group.component'\n\n// Component class scoped counter for aria attributes.\nlet lastAutocompleteId = 0\n\n/**\n * The options of an `input[nbAutocomplete]`, which the directive shows in an overlay below the input.\n */\n@Component({\n selector: 'nb-autocomplete',\n templateUrl: './autocomplete.component.html',\n styleUrls: ['./autocomplete.component.scss'],\n imports: [NbPortalDirective, NbOptionListComponent],\n host: {\n '[class]': \"'size-' + size()\"\n }\n})\nexport class NbAutocompleteComponent<T> {\n /**\n * The element the options are positioned at, which `NbAutocompleteDirective` sets when they first open.\n */\n hostRef?: ElementRef<HTMLElement>\n\n /**\n * Id of the listbox, which the input's `aria-controls` points to while the options are open.\n */\n readonly id: string = `nb-autocomplete-${lastAutocompleteId++}`\n\n /**\n * Current overlay position, which `NbAutocompleteDirective` sets and the options list renders with.\n */\n readonly overlayPosition = signal<NbPosition>('' as NbPosition)\n\n /**\n * The width of the element the options are positioned at, which the options take unless `optionsWidth` is set.\n */\n get hostWidth(): number {\n return this.hostRef?.nativeElement.getBoundingClientRect().width ?? 0\n }\n\n /**\n * Turns a value into the text shown in the input, e.g. an object's name. It's given the text typed in the input\n * too.\n */\n readonly handleDisplayFn = input<(value: T | string) => string>()\n\n protected readonly nbDefaults = injectNbDefaults('input')\n\n // The size of the field it's attached to, which `NbAutocompleteDirective` gives it.\n protected readonly fieldSize = signal<Signal<NbComponentSize> | undefined>(undefined)\n\n /**\n * The size of the options: `tiny`, `small`, `medium`, `large` or `giant`. Unset, they match the field the\n * autocomplete is attached to, as a select's options match the select.\n */\n readonly sizeInput = input<NbComponentSize | undefined>(undefined, { alias: 'size' })\n /** The size in use: the input's, the field's, the app's default for fields, or 'medium'. */\n readonly size = linkedSignal<NbComponentSize>(\n () => this.sizeInput() ?? this.fieldSize()?.() ?? this.nbDefaults().size ?? 'medium'\n )\n\n /**\n * Makes the first option active whenever the options open or change, so Enter selects it at once.\n */\n readonly activeFirst = input<boolean, NbBooleanInput>(false, { transform: convertToBoolProperty })\n\n /**\n * Class of the `nb-option-list` holding the options.\n */\n readonly optionsListClass = input<NbClassInput>()\n\n /**\n * Class of the overlay panel around the options list.\n */\n readonly optionsPanelClass = input<string | string[]>()\n\n /**\n * Width of the options list, in pixels; the input's width by default.\n */\n readonly optionsWidth = input<number>()\n\n /**\n * Emits the value of an option chosen with a click or Enter, and a value the form control writes.\n */\n readonly selectedChange = output<T | undefined>()\n\n /**\n * The options in the content, inside groups or not.\n */\n readonly options = contentChildren<NbOptionComponent<T>>(NbOptionComponent, { descendants: true })\n\n readonly optionGroups = contentChildren(NbOptionGroupComponent, { descendants: true })\n\n /**\n * The portal with the options list, which the directive attaches to its overlay.\n */\n readonly portal = viewChild(NbPortalDirective)\n\n readonly list = viewChild(NbOptionListComponent)\n\n /**\n * Called by `NbAutocompleteDirective` when the options first open, with the element they are positioned at, for\n * their width, and the size of the field they match.\n */\n setHost(hostRef: ElementRef<HTMLElement>, fieldSize?: Signal<NbComponentSize>) {\n this.hostRef = hostRef\n this.fieldSize.set(fieldSize)\n }\n\n emitSelected(selected?: T) {\n this.selectedChange.emit(selected)\n }\n}\n","<nb-option-list *nbPortal\n [size]=\"size()\"\n [position]=\"overlayPosition()\"\n [style.width.px]=\"optionsWidth() ?? hostWidth\"\n role=\"listbox\"\n [id]=\"id\"\n [class.empty]=\"!options().length\"\n [class]=\"optionsListClass()\">\n <ng-content select=\"nb-option, nb-option-group\" />\n</nb-option-list>\n","import { ElementRef, WritableSignal } from '@angular/core'\n\n/**\n * An `input[nbAutocomplete]`, for components that hold one, e.g. a tag list, which opens the options below itself.\n * Querying this instead of the directive keeps the autocomplete code out of an app that doesn't use one.\n */\nexport abstract class NbAutocompleteRef {\n /** The element the options open next to; the input by default. */\n abstract readonly overlayHost: WritableSignal<ElementRef | undefined>\n}\n","import {\n AfterViewInit,\n ComponentRef,\n computed,\n DestroyRef,\n Directive,\n ElementRef,\n forwardRef,\n inject,\n Injector,\n input,\n linkedSignal,\n OnDestroy,\n Renderer2,\n signal\n} from '@angular/core'\nimport { takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop'\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms'\nimport { merge } from 'rxjs'\nimport { filter, skip, switchMap } from 'rxjs/operators'\n\nimport { NbOverlayRef, NbScrollStrategy, NbTrigger, NbTriggerStrategy, NbTriggerStrategyBuilderService, NbOverlayService, NbAdjustableConnectedPositionStrategy, NbAdjustment, NbPosition, NbPositionBuilderService, ɵNbActiveDescendantKeyManager as NbActiveDescendantKeyManager, ɵNbActiveDescendantKeyManagerFactoryService as NbActiveDescendantKeyManagerFactoryService, ɵNbKeyManagerActiveItemMode as NbKeyManagerActiveItemMode, NbScrollStrategies } from '@liquid-js/lyr-core/cdk'\nimport { ɵisComposing as isComposing } from '@liquid-js/lyr-core/base'\nimport { NbFormFieldControl } from '@liquid-js/lyr-core/form-field'\nimport { NbOptionComponent } from '../option/option.component'\nimport { NbOptionGroupComponent } from '../option/option-group.component'\nimport { NbAutocompleteComponent } from './autocomplete.component'\nimport { NbAutocompleteRef } from './autocomplete-ref'\n\n/**\n * Attaches an `nb-autocomplete` to an input: its options open below the input on focus, click or typing, and the\n * chosen one fills the input.\n *\n * The input is a combobox. Up and Down open the options and move the active one, Enter selects it, Escape closes\n * the options and keeps the text, and they close when the focus leaves them. A form control bound to the input gets\n * the typed text as well as the value of a chosen option.\n *\n * @stacked-example(Showcase, autocomplete/autocomplete-showcase.component)\n *\n * ### Installation\n *\n * Import `NbAutocompleteDirective`, `NbAutocompleteComponent`, `NbOptionComponent` into your standalone component:\n * ```ts\n * @Component({\n * imports: [NbAutocompleteDirective, NbAutocompleteComponent, NbOptionComponent],\n * })\n * export class PageComponent { }\n * ```\n *\n * With NgModules:\n *\n * Import `NbAutocompleteModule` to your feature module.\n * ```ts\n * @NgModule({\n * imports: [\n * // ...\n * NbAutocompleteModule,\n * ],\n * })\n * export class PageModule { }\n * ```\n * ### Usage\n *\n * The input binds to a form control or `ngModel`:\n * @stacked-example(Autocomplete form binding, autocomplete/autocomplete-form.component)\n *\n * Options are grouped with `nb-option-group`:\n * @stacked-example(Grouping, autocomplete/autocomplete-group.component)\n *\n * `handleDisplayFn` turns a value into the text shown in the input, e.g. for options with object values:\n * @stacked-example(Custom display, autocomplete/autocomplete-custom-display.component)\n *\n * With `activeFirst` the first option is active as soon as the options open, so Enter selects it:\n * @stacked-example(Active first, autocomplete/autocomplete-active-first.component)\n *\n * The input is disabled with `disabled`, or through its form control:\n * @stacked-example(Disabled, autocomplete/autocomplete-disabled.component)\n */\n@Directive({\n selector: 'input[nbAutocomplete]',\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => NbAutocompleteDirective),\n multi: true\n },\n { provide: NbAutocompleteRef, useExisting: forwardRef(() => NbAutocompleteDirective) }\n ],\n host: {\n 'role': 'combobox',\n 'aria-autocomplete': 'list',\n 'aria-haspopup': 'listbox',\n '[class.nb-autocomplete-position-top]': \"isOpen() && !!autocomplete().options().length && autocomplete().overlayPosition() === 'top'\",\n '[class.nb-autocomplete-position-bottom]': \"isOpen() && !!autocomplete().options().length && autocomplete().overlayPosition() === 'bottom'\",\n '[attr.aria-expanded]': 'isOpen()',\n '[attr.aria-controls]': 'isOpen() ? autocomplete().id : null',\n '[attr.aria-activedescendant]': 'isOpen() ? activeOption()?.id ?? null : null',\n '(input)': 'handleInput()',\n '(keydown.arrowDown)': 'handleKeydown()',\n '(keydown.arrowUp)': 'handleKeydown()',\n '(blur)': 'handleBlur()'\n }\n})\nexport class NbAutocompleteDirective<T> implements NbAutocompleteRef, OnDestroy, AfterViewInit, ControlValueAccessor {\n protected readonly hostRef = inject(ElementRef)\n protected readonly overlay = inject(NbOverlayService)\n protected readonly triggerStrategyBuilder = inject(NbTriggerStrategyBuilderService)\n protected readonly positionBuilder = inject(NbPositionBuilderService)\n protected readonly activeDescendantKeyManagerFactory = inject(\n NbActiveDescendantKeyManagerFactoryService\n ) as NbActiveDescendantKeyManagerFactoryService<NbOptionComponent<T>>\n protected readonly renderer = inject(Renderer2)\n protected readonly injector = inject(Injector)\n protected readonly destroyRef = inject(DestroyRef)\n\n /** @docs-private */\n protected triggerStrategy?: NbTriggerStrategy\n\n protected positionStrategy?: NbAdjustableConnectedPositionStrategy\n\n protected overlayRef?: NbOverlayRef\n\n protected keyManager?: NbActiveDescendantKeyManager<NbOptionComponent<T>>\n\n // The form gets the text typed in the input too.\n protected _onChange: (value?: T | string) => void = () => {}\n\n protected writtenValue?: T\n protected hasWrittenValue = false\n\n protected _onTouched: () => void = () => {}\n\n protected readonly opened = signal(false)\n\n /**\n * Whether the options are open.\n */\n readonly isOpen = this.opened.asReadonly()\n\n /**\n * Whether the options are closed.\n */\n readonly isClosed = computed(() => !this.isOpen())\n\n // The option the key manager made active, which the input announces as its active descendant.\n protected readonly activeOption = signal<NbOptionComponent<T> | undefined>(undefined)\n\n /**\n * Whether the open options have an active option, which Enter selects.\n */\n get hasActiveOption(): boolean {\n return !!(this.isOpen() && this.keyManager?.activeItem)\n }\n\n /**\n * The `nb-autocomplete` with the options.\n */\n readonly autocomplete = input.required<NbAutocompleteComponent<T>>({ alias: 'nbAutocomplete' })\n\n /**\n * The options' distance from the input, in pixels.\n */\n readonly overlayOffset = input<number>(8)\n\n /**\n * What scrolling the page does while the options are open: `block` (default) prevents it, `close` closes them,\n * `reposition` moves them along, and `noop` leaves them where they are.\n */\n readonly scrollStrategy = input<NbScrollStrategies>('block')\n\n /**\n * An element to position the options at instead of the input.\n */\n readonly customOverlayHost = input<ElementRef>()\n\n /**\n * The element the options overlay is positioned at: `customOverlayHost` until a component such as `nb-tag-list`\n * sets another, or else the input.\n */\n readonly overlayHost = linkedSignal(() => this.customOverlayHost())\n\n ngAfterViewInit() {\n this.triggerStrategy = this.createTriggerStrategy()\n this.subscribeOnTriggers(this.triggerStrategy)\n // A form control writes its initial value before the autocomplete panel has its `handleDisplayFn`,\n // so the value is displayed again once the panel inputs are set.\n if (this.hasWrittenValue) {\n this.setHostInputValue(this.writtenValue ?? '')\n }\n }\n\n ngOnDestroy() {\n if (this.triggerStrategy) {\n this.triggerStrategy.destroy()\n }\n\n if (this.positionStrategy) {\n this.positionStrategy.dispose()\n }\n\n if (this.overlayRef) {\n this.overlayRef.dispose()\n }\n }\n\n handleInput() {\n const currentValue = this.hostRef.nativeElement.value\n this._onChange(currentValue)\n this.setHostInputValue(this.getDisplayValue(currentValue))\n this.show()\n }\n\n handleKeydown() {\n this.show()\n }\n\n handleBlur() {\n this._onTouched()\n }\n\n show() {\n if (this.shouldShow()) {\n this.attachToOverlay()\n this.setActiveItem()\n }\n }\n\n hide() {\n if (this.isOpen()) {\n this.overlayRef?.detach()\n this.opened.set(false)\n }\n }\n\n writeValue(value: T) {\n this.writtenValue = value\n this.hasWrittenValue = true\n this.handleInputValueUpdate(value)\n }\n\n registerOnChange(fn: (value?: T | string) => void) {\n this._onChange = fn\n }\n\n registerOnTouched(fn: () => void) {\n this._onTouched = fn\n }\n\n setDisabledState(disabled: boolean) {\n this.renderer.setProperty(this.hostRef.nativeElement, 'disabled', disabled)\n }\n\n protected subscribeOnOptions() {\n const options$ = toObservable(this.autocomplete().options, { injector: this.injector })\n\n // Options can change at runtime, so listen to the clicks of the current ones.\n options$\n .pipe(\n switchMap((options) => merge(...options.map((option) => option.click))),\n takeUntilDestroyed(this.destroyRef)\n )\n .subscribe((clickedOption: NbOptionComponent<T>) => this.handleInputValueUpdate(clickedOption.value(), true))\n\n options$.pipe(skip(1), takeUntilDestroyed(this.destroyRef)).subscribe((options) => {\n this.setActiveItem()\n if (!options.length) {\n this.hide()\n }\n })\n }\n\n protected subscribeOnPositionChange(positionStrategy: NbAdjustableConnectedPositionStrategy) {\n positionStrategy.positionChange\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe((position: NbPosition) => this.autocomplete().overlayPosition.set(position))\n }\n\n protected getActiveItem(): NbOptionComponent<T> | undefined {\n return this.keyManager?.activeItem ?? undefined\n }\n\n protected setupAutocomplete() {\n // The field the input is, e.g. `nbInput`, whose size the options match; looked up once the autocomplete opens, as\n // a field like `nbTagInput` needs this directive itself.\n const control = this.injector.get(NbFormFieldControl, null, { self: true, optional: true })\n this.autocomplete().setHost(\n this.overlayHost() || this.hostRef,\n control ? computed(() => control.controlState().size) : undefined\n )\n }\n\n protected getDisplayValue(value: T | string) {\n const displayFn = this.autocomplete().handleDisplayFn()\n return displayFn ? displayFn(value) : value\n }\n\n protected getContainer(): ComponentRef<unknown> | undefined {\n return this.overlayRef && this.isOpen()\n ? <ComponentRef<unknown>>{\n location: {\n nativeElement: this.overlayRef.overlayElement\n }\n }\n : undefined\n }\n\n protected handleInputValueUpdate(value?: T, focusInput: boolean = false) {\n this.setHostInputValue(value ?? '')\n this._onChange(value)\n if (focusInput) {\n this.hostRef.nativeElement.focus()\n }\n this.autocomplete().emitSelected(value)\n this.hide()\n }\n\n protected subscribeOnTriggers(triggerStrategy: NbTriggerStrategy) {\n triggerStrategy.show$.pipe(filter(() => this.isClosed())).subscribe(() => this.show())\n\n triggerStrategy.hide$.pipe(filter(() => this.isOpen())).subscribe(() => this.hide())\n }\n\n protected createTriggerStrategy(): NbTriggerStrategy {\n return this.triggerStrategyBuilder\n .trigger(NbTrigger.FOCUS)\n .host(this.hostRef.nativeElement)\n .container(() => this.getContainer())\n .build()\n }\n\n protected createKeyManager(): NbActiveDescendantKeyManager<NbOptionComponent<T>> {\n const keyManager = this.activeDescendantKeyManagerFactory.create(this.autocomplete().options, this.injector)\n this.keyManager = keyManager\n keyManager.change\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => this.activeOption.set(keyManager.activeItem ?? undefined))\n return keyManager\n }\n\n protected setHostInputValue(value: T | string) {\n this.hostRef.nativeElement.value = this.getDisplayValue(value)\n }\n\n protected createPositionStrategy(): NbAdjustableConnectedPositionStrategy {\n return this.positionBuilder\n .connectedTo(this.overlayHost() || this.hostRef)\n .position(NbPosition.BOTTOM)\n .offset(this.overlayOffset())\n .adjustment(NbAdjustment.VERTICAL)\n // As for nb-select: without room for the whole list, it gets the space there is and scrolls.\n .withFlexibleDimensions(true)\n .withViewportMargin(8 + this.overlayOffset())\n }\n\n protected subscribeOnOverlayKeys(\n overlayRef: NbOverlayRef,\n keyManager: NbActiveDescendantKeyManager<NbOptionComponent<T>>\n ) {\n overlayRef\n .keydownEvents()\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe((event: KeyboardEvent) => {\n if (event.key === 'Escape' && !isComposing(event) && this.isOpen()) {\n // Only the options close, not a dialog or window the input is in.\n event.preventDefault()\n event.stopPropagation()\n this.hostRef.nativeElement.focus()\n this.hide()\n } else if (event.key === 'Enter' && !isComposing(event)) {\n event.preventDefault()\n const activeItem = this.getActiveItem()\n if (!activeItem) {\n return\n }\n this.handleInputValueUpdate(activeItem.value(), true)\n } else {\n keyManager.onKeydown(event)\n this.scrollToOption(keyManager.activeItemIndex || 0)\n }\n })\n }\n\n protected setActiveItem() {\n // With `activeFirst` the first option is active, otherwise none.\n const mode = this.autocomplete().activeFirst()\n ? NbKeyManagerActiveItemMode.FIRST_ACTIVE\n : NbKeyManagerActiveItemMode.RESET_ACTIVE\n this.keyManager?.setActiveItem(mode)\n this.activeOption.set(this.keyManager?.activeItem ?? undefined)\n }\n\n protected attachToOverlay() {\n let overlayRef = this.overlayRef\n if (!overlayRef) {\n this.setupAutocomplete()\n overlayRef = this.initOverlay()\n }\n overlayRef.attach(this.autocomplete().portal())\n this.opened.set(true)\n }\n\n protected createOverlay(positionStrategy: NbAdjustableConnectedPositionStrategy): NbOverlayRef {\n const scrollStrategy = this.createScrollStrategy()\n const overlayRef = this.overlay.create({\n positionStrategy,\n scrollStrategy,\n panelClass: this.autocomplete().optionsPanelClass()\n })\n this.overlayRef = overlayRef\n // The overlay can also detach itself, e.g. through its scroll strategy.\n overlayRef.detachments().pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => this.opened.set(false))\n return overlayRef\n }\n\n protected initOverlay(): NbOverlayRef {\n const positionStrategy = this.createPositionStrategy()\n this.positionStrategy = positionStrategy\n\n const keyManager = this.createKeyManager()\n this.subscribeOnPositionChange(positionStrategy)\n this.subscribeOnOptions()\n const overlayRef = this.createOverlay(positionStrategy)\n this.subscribeOnOverlayKeys(overlayRef, keyManager)\n return overlayRef\n }\n\n protected createScrollStrategy(): NbScrollStrategy {\n return this.overlay.scrollStrategies[this.scrollStrategy()]()\n }\n\n protected shouldShow(): boolean {\n return this.isClosed()\n }\n\n private scrollToOption(index: number) {\n const autocomplete = this.autocomplete()\n const list = autocomplete.list()\n const listElement = list?.list()\n const options = autocomplete.options()\n const labelCount = this.countGroupLabelsBeforeOption(index, options, autocomplete.optionGroups())\n\n if (index === 0 && labelCount === 1) {\n // At the first option of the first group the list scrolls to the top, so that the group's label shows too.\n list?.setScrollTop(0)\n } else if (list && listElement) {\n const option = options[index]\n if (option) {\n const element = option.getHostElement()\n const newScrollPosition = this.getOptionScrollPosition(\n element.offsetTop,\n element.offsetHeight,\n list.getScrollTop(),\n listElement.nativeElement.offsetHeight\n )\n\n list.setScrollTop(newScrollPosition)\n }\n }\n }\n\n /**\n * The position of the option's group among the groups, counting from 1, or 0 for an option outside groups.\n */\n countGroupLabelsBeforeOption(\n optionIndex: number,\n options: ReadonlyArray<NbOptionComponent<T>>,\n optionGroups: ReadonlyArray<NbOptionGroupComponent>\n ): number {\n const group = options[optionIndex]?.group\n return group ? optionGroups.indexOf(group) + 1 : 0\n }\n\n getOptionScrollPosition(\n optionOffset: number,\n optionHeight: number,\n currentScrollPosition: number,\n portalHeight: number\n ): number {\n if (optionOffset < currentScrollPosition) {\n return optionOffset\n }\n\n if (optionOffset + optionHeight > currentScrollPosition + portalHeight) {\n return Math.max(0, optionOffset - portalHeight + optionHeight)\n }\n\n return currentScrollPosition\n }\n}\n","import { NgModule } from '@angular/core'\n\nimport { NbOverlayModule } from '@liquid-js/lyr-core/cdk'\nimport { NbCardModule } from '@liquid-js/lyr-core/card'\nimport { FormsModule } from '@angular/forms'\nimport { NbOptionModule } from '../option/option-list.module'\nimport { NbAutocompleteComponent } from './autocomplete.component'\nimport { NbAutocompleteDirective } from './autocomplete.directive'\n\nconst NB_AUTOCOMPLETE_COMPONENTS = [\n NbAutocompleteComponent,\n NbAutocompleteDirective\n]\n\n@NgModule({\n imports: [\n FormsModule,\n NbOverlayModule,\n NbCardModule,\n NbOptionModule,\n ...NB_AUTOCOMPLETE_COMPONENTS\n ],\n exports: [...NB_AUTOCOMPLETE_COMPONENTS, NbOptionModule]\n})\nexport class NbAutocompleteModule {\n}\n","import { Directive, ElementRef, inject, input, output } from '@angular/core'\n\nimport { ENTER } from '@angular/cdk/keycodes'\nimport { NbFormFieldControl } from '@liquid-js/lyr-core/form-field'\nimport { NbInputDirective } from '@liquid-js/lyr-core/input'\nimport { NbAutocompleteDirective } from '../autocomplete/autocomplete.directive'\n\nexport interface NbTagInputAddEvent {\n input: ElementRef<HTMLInputElement>\n value: string\n}\n\n/**\n * An input in an `nb-tag-list` that adds tags: it emits `tagAdd` on a separator key, and a managed list turns its\n * text into tags. It's an `nbInput`, and its `fieldSize`, `status` and `shape` style the whole list.\n *\n * @stacked-example(Tag Input, tag/tag-input.component)\n * @additional-example(Tag Input with Autocomplete, tag/tag-input-with-autocomplete.component)\n * @styles\n *\n * tag-list-tiny-tag-offset:\n * tag-list-small-tag-offset:\n * tag-list-medium-tag-offset:\n * tag-list-large-tag-offset:\n * tag-list-giant-tag-offset:\n * tag-list-with-input-tiny-padding:\n * tag-list-with-input-small-padding:\n * tag-list-with-input-medium-padding:\n * tag-list-with-input-large-padding:\n * tag-list-with-input-giant-padding:\n * tag-list-with-input-rectangle-border-radius:\n * tag-list-with-input-semi-round-border-radius:\n * tag-list-with-input-round-border-radius:\n * tag-input-min-width:\n * tag-input-text-font-family:\n * tag-input-placeholder-text-font-family:\n * tag-input-basic-background-color:\n * tag-input-basic-border-color:\n * tag-input-basic-text-color:\n * tag-input-basic-placeholder-text-color:\n * tag-input-basic-focus-background-color:\n * tag-input-basic-focus-border-color:\n * tag-input-basic-hover-background-color:\n * tag-input-basic-hover-border-color:\n * tag-input-basic-focus-and-hover-background-color:\n * tag-input-basic-focus-and-hover-border-color:\n * tag-input-basic-disabled-background-color:\n * tag-input-basic-disabled-border-color:\n * tag-input-basic-disabled-text-color:\n * tag-input-basic-disabled-placeholder-text-color:\n * tag-input-primary-background-color:\n * tag-input-primary-border-color:\n * tag-input-primary-text-color:\n * tag-input-primary-placeholder-text-color:\n * tag-input-primary-focus-background-color:\n * tag-input-primary-focus-border-color:\n * tag-input-primary-hover-background-color:\n * tag-input-primary-hover-border-color:\n * tag-input-primary-focus-and-hover-background-color:\n * tag-input-primary-focus-and-hover-border-color:\n * tag-input-primary-disabled-background-color:\n * tag-input-primary-disabled-border-color:\n * tag-input-primary-disabled-text-color:\n * tag-input-primary-disabled-placeholder-text-color:\n * tag-input-success-background-color:\n * tag-input-success-border-color:\n * tag-input-success-text-color:\n * tag-input-success-placeholder-text-color:\n * tag-input-success-focus-background-color:\n * tag-input-success-focus-border-color:\n * tag-input-success-hover-background-color:\n * tag-input-success-hover-border-color:\n * tag-input-success-focus-and-hover-background-color:\n * tag-input-success-focus-and-hover-border-color:\n * tag-input-success-disabled-background-color:\n * tag-input-success-disabled-border-color:\n * tag-input-success-disabled-text-color:\n * tag-input-success-disabled-placeholder-text-color:\n * tag-input-info-background-color:\n * tag-input-info-border-color:\n * tag-input-info-text-color:\n * tag-input-info-placeholder-text-color:\n * tag-input-info-focus-background-color:\n * tag-input-info-focus-border-color:\n * tag-input-info-hover-background-color:\n * tag-input-info-hover-border-color:\n * tag-input-info-focus-and-hover-background-color:\n * tag-input-info-focus-and-hover-border-color:\n * tag-input-info-disabled-background-color:\n * tag-input-info-disabled-border-color:\n * tag-input-info-disabled-text-color:\n * tag-input-info-disabled-placeholder-text-color:\n * tag-input-warning-background-color:\n * tag-input-warning-border-color:\n * tag-input-warning-text-color:\n * tag-input-warning-placeholder-text-color:\n * tag-input-warning-focus-background-color:\n * tag-input-warning-focus-border-color:\n * tag-input-warning-hover-background-color:\n * tag-input-warning-hover-border-color:\n * tag-input-warning-focus-and-hover-background-color:\n * tag-input-warning-focus-and-hover-border-color:\n * tag-input-warning-disabled-background-color:\n * tag-input-warning-disabled-border-color:\n * tag-input-warning-disabled-text-color:\n * tag-input-warning-disabled-placeholder-text-color:\n * tag-input-danger-background-color:\n * tag-input-danger-border-color:\n * tag-input-danger-text-color:\n * tag-input-danger-placeholder-text-color:\n * tag-input-danger-focus-background-color:\n * tag-input-danger-focus-border-color:\n * tag-input-danger-hover-background-color:\n * tag-input-danger-hover-border-color:\n * tag-input-danger-focus-and-hover-background-color:\n * tag-input-danger-focus-and-hover-border-color:\n * tag-input-danger-disabled-background-color:\n * tag-input-danger-disabled-border-color:\n * tag-input-danger-disabled-text-color:\n * tag-input-danger-disabled-placeholder-text-color:\n * tag-input-control-background-color:\n * tag-input-control-border-color:\n * tag-input-control-text-color:\n * tag-input-control-placeholder-text-color:\n * tag-input-control-focus-background-color:\n * tag-input-control-focus-border-color:\n * tag-input-control-hover-background-color:\n * tag-input-control-hover-border-color:\n * tag-input-control-focus-and-hover-background-color:\n * tag-input-control-focus-and-hover-border-color:\n * tag-input-control-disabled-background-color:\n * tag-input-control-disabled-border-color:\n * tag-input-control-disabled-text-color:\n * tag-input-control-disabled-placeholder-text-color:\n * tag-input-tiny-text-font-size:\n * tag-input-tiny-text-font-weight:\n * tag-input-tiny-text-line-height:\n * tag-input-tiny-placeholder-text-font-size:\n * tag-input-tiny-placeholder-text-font-weight:\n * tag-input-tiny-placeholder-text-line-height:\n * tag-input-tiny-padding:\n * tag-input-small-text-font-size:\n * tag-input-small-text-font-weight:\n * tag-input-small-text-line-height:\n * tag-input-small-placeholder-text-font-size:\n * tag-input-small-placeholder-text-font-weight:\n * tag-input-small-placeholder-text-line-height:\n * tag-input-small-padding:\n * tag-input-medium-text-font-size:\n * tag-input-medium-text-font-weight:\n * tag-input-medium-text-line-height:\n * tag-input-medium-placeholder-text-font-size:\n * tag-input-medium-placeholder-text-font-weight:\n * tag-input-medium-placeholder-text-line-height:\n * tag-input-medium-padding:\n * tag-input-large-text-font-size:\n * tag-input-large-text-font-weight:\n * tag-input-large-text-line-height:\n * tag-input-large-placeholder-text-font-size:\n * tag-input-large-placeholder-text-font-weight:\n * tag-input-large-placeholder-text-line-height:\n * tag-input-large-padding:\n * tag-input-giant-text-font-size:\n * tag-input-giant-text-font-weight:\n * tag-input-giant-text-line-height:\n * tag-input-giant-placeholder-text-font-size:\n * tag-input-giant-placeholder-text-font-weight:\n * tag-input-giant-placeholder-text-line-height:\n * tag-input-giant-padding:\n */\n@Directive({\n selector: 'input[nbTagInput]',\n exportAs: 'nbTagInput',\n providers: [\n { provide: NbFormFieldControl, useExisting: NbTagInputDirective }\n ],\n host: {\n 'class': 'nb-tag-input',\n '(keydown)': '_onKeydown($event)'\n }\n})\nexport class NbTagInputDirective extends NbInputDirective {\n readonly _hostElement = inject<ElementRef<HTMLInputElement>>(ElementRef)\n protected readonly autocomplete = inject<NbAutocompleteDirective<unknown>>(\n NbAutocompleteDirective, { optional: true, self: true }\n )\n\n get _value(): string {\n return this._hostElement.nativeElement.value\n }\n\n /**\n * Key codes that emit `tagAdd`; Enter by default. A managed list also splits pasted text by the characters they\n * type.\n */\n readonly separatorKeys = input<number[]>([ENTER])\n\n /**\n * Emits the input's text when a separator key is pressed; an Enter that picks an autocomplete option doesn't.\n */\n readonly tagAdd = output<NbTagInputAddEvent>()\n\n // eslint-disable-next-line @typescript-eslint/no-deprecated -- separatorKeys are key codes, as Angular Material's separatorKeyCodes; a code also leaves out the Enter that ends an IME composition in Safari (229).\n _onKeydown({ keyCode }: KeyboardEvent) {\n // An Enter key that selects an autocomplete option adds that option rather than the typed text.\n if (this.isSeparatorKey(keyCode) && !(keyCode === ENTER && this.autocomplete?.hasActiveOption)) {\n this.tagAdd.emit({ value: this._value, input: this._hostElement })\n }\n }\n\n protected isSeparatorKey(keyCode: number): boolean {\n return this.separatorKeys().includes(keyCode)\n }\n}\n","import {\n Component,\n computed,\n contentChild,\n contentChildren,\n DestroyRef,\n effect,\n ElementRef,\n forwardRef,\n inject,\n Injector,\n input,\n linkedSignal,\n model,\n output,\n signal,\n untracked,\n viewChildren,\n numberAttribute\n} from '@angular/core'\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms'\nimport { outputToObservable, takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop'\nimport { EMPTY, fromEvent, merge } from 'rxjs'\nimport { filter, map, switchMap } from 'rxjs/operators'\n\nimport { injectNbDefaults, NbLayoutDirectionService, NbStatusService, ɵisComposing as isComposing, ɵconvertToBoolProperty as convertToBoolProperty, NbBooleanInput, NbComponentSize, ɵenableTransitionsAfterRender as enableTransitionsAfterRender } from '@liquid-js/lyr-core/base'\nimport { NbFocusMonitor, ɵNbActiveDescendantKeyManager as NbActiveDescendantKeyManager, ɵNbActiveDescendantKeyManagerFactoryService as NbActiveDescendantKeyManagerFactoryService } from '@liquid-js/lyr-core/cdk'\nimport { COMMA, ENTER, SEMICOLON, SPACE, TAB } from '@angular/cdk/keycodes'\nimport { NbValidationDirective } from '@liquid-js/lyr-core/validation'\nimport { NbAutocompleteRef } from '../autocomplete/autocomplete-ref'\nimport { NbTagComponent } from './tag.component'\nimport { NB_TAG_LIST_SIZE } from './tag-list-size'\nimport { NbTagInputDirective } from './tag-input.directive'\n\n// The characters separator keys type, which also split pasted or blurred text into tags.\nconst SEPARATOR_CHARACTERS: Record<number, string> = { [COMMA]: ',', [SEMICOLON]: ';', [SPACE]: ' ', [TAB]: '\\t', [ENTER]: '\\n' }\n\n/**\n * A list of `nb-tag`s, placed in it or managed from a value, with an optional `nbTagInput` to add more.\n *\n * @stacked-example(Tag List Showcase, tag/tag-showcase.component)\n *\n * Bound to a form control, `ngModel` or `[(value)]`, the tag list manages its tags: it shows one for each string of\n * the value, adds what's typed into its `nbTagInput` when a separator key is pressed, the input loses focus, or a\n * list is pasted, and removes tags with their cross or the Backspace or Delete key. Duplicates are skipped, and text\n * `tagValidator` rejects stays in the input to be corrected.\n *\n * Focused, the list moves through its tags with the arrow keys; Space selects the active tag (one at a time, unless\n * `multiple`), and Backspace or Delete removes it. Backspace in an empty input moves to the last tag.\n * @stacked-example(Form control, tag/tag-form.component)\n *\n * The input's `fieldSize`, `status` and `shape` style the whole list, as an `nbInput`'s style its field, and tags\n * placed in the list take its size unless they set their own. The list has a field's colours, but keeps its\n * background under the pointer, and a filled basic tag in it darkens under the pointer rather than lightening, so\n * the tags never match the field:\n * @stacked-example(Sizes, tag/tag-list-sizes.component)\n * @styles\n *\n * tag-list-tiny-tag-offset:\n * tag-list-small-tag-offset:\n * tag-list-medium-tag-offset:\n * tag-list-large-tag-offset:\n * tag-list-giant-tag-offset:\n * tag-list-with-input-tiny-padding:\n * tag-list-with-input-small-padding:\n * tag-list-with-input-medium-padding:\n * tag-list-with-input-large-padding:\n * tag-list-with-input-giant-padding:\n * tag-list-with-input-rectangle-border-radius:\n * tag-list-with-input-semi-round-border-radius:\n * tag-list-with-input-round-border-radius:\n */\n@Component({\n selector: 'nb-tag-list',\n templateUrl: './tag-list.component.html',\n exportAs: 'nbTagList',\n providers: [\n { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => NbTagListComponent), multi: true },\n // Tags placed in the list take its size.\n { provide: NB_TAG_LIST_SIZE, useFactory: () => inject(NbTagListComponent).tagSize }\n ],\n imports: [NbTagComponent],\n host: {\n '[class]': '_inputClasses()',\n '[class.nb-tag-list-with-input]': '_hasInput()',\n '[class.focus]': '_isFocused()',\n '[class.disabled]': 'isDisabled()',\n '[class.input-full-width]': '_isFullWidth()',\n '[attr.tabindex]': 'tabIndex()',\n '[attr.role]': 'role()',\n '[attr.aria-multiselectable]': 'multiple()',\n '[attr.aria-activedescendant]': 'activeTagId()',\n '(keydown)': '_onKeydown($event)',\n '(click)': '_onClick($event)'\n }\n})\nexport class NbTagListComponent implements ControlValueAccessor {\n // The app's defaults for this type, which the inputs below start from.\n protected readonly nbDefaults = injectNbDefaults('tag')\n\n protected readonly hostElement = inject<ElementRef<HTMLElement>>(ElementRef)\n protected readonly focusMonitor = inject(NbFocusMonitor)\n protected readonly activeDescendantKeyManagerFactory = inject(\n NbActiveDescendantKeyManagerFactoryService\n ) as NbActiveDescendantKeyManagerFactoryService<NbTagComponent>\n protected readonly directionService = inject(NbLayoutDirectionService)\n protected readonly statusService = inject(NbStatusService)\n protected readonly destroyRef = inject(DestroyRef)\n protected readonly validation = inject(NbValidationDirective, { self: true, optional: true })\n\n protected readonly contentTags = contentChildren(NbTagComponent)\n protected readonly valueTags = viewChildren(NbTagComponent)\n\n /**\n * All tags of the list: the ones it shows for its value, then the ones placed in it.\n */\n readonly tags = computed(() => [...this.valueTags(), ...this.contentTags()])\n readonly tagInput = contentChild(NbTagInputDirective)\n readonly autocompleteDirective = contentChild(NbAutocompleteRef)\n\n /**\n * The size of the tags and their spacing. With an `nbTagInput`, the input's `fieldSize` sizes the list and its tags\n * instead, as its `status` and `shape` style it.\n */\n readonly sizeInput = input<NbComponentSize | undefined>(undefined, { alias: 'size' })\n /** The size in use: the input's, the app's default, or 'medium'. */\n readonly size = linkedSignal<NbComponentSize>(() => this.sizeInput() ?? this.nbDefaults().size ?? 'medium')\n\n /** Tabindex of the list, e.g. `tabIndex=\"-1\"`, as a select's. */\n readonly tabIndex = input<number, unknown>(0, { transform: numberAttribute })\n\n readonly role = input<string>('listbox')\n\n /** Lets several tags be selected at once; otherwise selecting a tag deselects the others. */\n readonly multiple = input<boolean, NbBooleanInput>(false, { transform: convertToBoolProperty })\n\n /**\n * The tags, when the list manages them; usually bound through a form control or `ngModel` instead.\n * Leave it unset to place `nb-tag`s in the list yourself.\n */\n readonly value = model<string[]>()\n\n /**\n * Decides whether typed text can become a tag; rejected text stays in the input.\n */\n readonly tagValidator = input<(tag: string) => boolean>(() => true)\n\n /**\n * Whether text left in the input becomes tags when the input loses focus.\n */\n readonly addOnBlur = input<boolean, NbBooleanInput>(true, { transform: convertToBoolProperty })\n\n /**\n * Whether the list shows and edits the tags of its value.\n */\n readonly managed = computed(() => this.value() !== undefined)\n\n /** Disables the list: its input, and removing its tags. */\n readonly disabled = input<boolean, NbBooleanInput>(false, { transform: convertToBoolProperty })\n\n /**\n * Whether it's disabled: the `disabled` input, or the form's disabled state, whichever changed last. A managed list\n * sets its input's disabled state from this.\n */\n readonly isDisabled = linkedSignal(() => this.disabled())\n\n /**\n * Emits a tag the user removes, with its cross or the Backspace or Delete key. A managed list also takes it out of\n * its value; otherwise the app does.\n */\n readonly tagRemove = output<NbTagComponent>()\n\n protected readonly focused = signal(false)\n\n readonly activeTagId = signal<string | undefined>(undefined)\n\n protected readonly keyManager: NbActiveDescendantKeyManager<NbTagComponent> = this.activeDescendantKeyManagerFactory\n .create(this.tags, inject(Injector))\n .withHorizontalOrientation(this.directionService.getDirection())\n .withWrap()\n\n readonly _hasInput = computed(() => !!this.tagInput())\n\n readonly _isFocused = this.focused.asReadonly()\n\n readonly _isFullWidth = computed(() => !!this.tagInput()?.fullWidth())\n\n readonly _inputClasses = computed(() => {\n const tagInput = this.tagInput()\n if (tagInput) {\n return [\n `shape-${tagInput.shape()}`,\n `size-${tagInput.fieldSize()}`,\n // With `nbValidation`, the status it gives while the list shows errors or success.\n this.statusService.getStatusClass(this.validation?.status() ?? tagInput.status())\n ]\n }\n\n return [`size-${this.size()}`]\n })\n\n /** The size of the list's tags: its input's `fieldSize`, or its `size` without an input. */\n readonly tagSize = computed(() => this.tagInput()?.fieldSize() ?? this.size())\n\n protected onChange: (value: string[]) => void = () => undefined\n protected onTouched = () => {}\n\n constructor() {\n enableTransitionsAfterRender(this.hostElement.nativeElement)\n this.validation?.delegateAria()\n\n // The input carries the field's state for forms and assistive technology.\n effect(() => {\n const element = this.tagInput()?._hostElement.nativeElement\n if (element && this.managed()) {\n element.disabled = this.isDisabled()\n }\n if (element && this.validation) {\n setOrRemoveAttribute(element, 'aria-invalid', this.validation.ariaInvalid())\n setOrRemoveAttribute(element, 'aria-describedby', this.validation.describedBy())\n // An `nbLabel` names the input; without one, it keeps a name of its own.\n const labelledBy = this.validation.labelledBy()\n if (labelledBy) {\n element.setAttribute('aria-labelledby', labelledBy)\n }\n setOrRemoveAttribute(element, 'aria-required', this.validation.ariaRequired())\n }\n })\n\n toObservable(this.tagInput)\n .pipe(\n switchMap((tagInput) => {\n if (!tagInput) {\n return EMPTY\n }\n const element = tagInput._hostElement.nativeElement\n return merge(\n outputToObservable(tagInput.tagAdd).pipe(map(() => 'separator')),\n fromEvent(element, 'blur').pipe(\n filter(() => this.addOnBlur()),\n map(() => 'blur')\n ),\n // Pasted lists become tags once the text is in the input.\n fromEvent(element, 'paste').pipe(map(() => 'paste'))\n ).pipe(map((trigger) => ({ tagInput, trigger })))\n }),\n filter(() => this.managed() && !this.isDisabled()),\n takeUntilDestroyed()\n )\n .subscribe(({ tagInput, trigger }) => {\n if (trigger === 'paste') {\n setTimeout(() => this.addFromInput(tagInput, true))\n } else {\n this.addFromInput(tagInput, false)\n }\n })\n\n this.focusMonitor\n .monitor(this.hostElement, true)\n .pipe(\n map((origin) => !!origin),\n takeUntilDestroyed()\n )\n .subscribe((isFocused: boolean) => untracked(() => this.onFocusChange(isFocused)))\n this.destroyRef.onDestroy(() => this.focusMonitor.stopMonitoring(this.hostElement))\n\n this.keyManager.change\n .pipe(takeUntilDestroyed())\n .subscribe(() => this.activeTagId.set(this.keyManager.activeItem?._id))\n\n effect(() => this.keyManager.withHorizontalOrientation(this.directionService.direction()))\n\n // The autocomplete options open below the whole list, not just the input.\n effect(() => this.autocompleteDirective()?.overlayHost.set(this.hostElement))\n\n effect(() => {\n if (this.tags().length === 0) {\n untracked(() => this.focusInputIfActive())\n }\n })\n\n const tags$ = toObservable(this.tags)\n tags$\n .pipe(\n switchMap((tags) => merge(...tags.map((tag) => outputToObservable(tag.remove)))),\n takeUntilDestroyed()\n )\n .subscribe((tagToRemove: NbTagComponent) => {\n this.tagRemove.emit(tagToRemove)\n if (this.managed() && !this.isDisabled() && this.valueTags().includes(tagToRemove)) {\n this.setValue((this.value() ?? []).filter((tag) => tag !== tagToRemove.text()))\n }\n })\n\n tags$\n .pipe(\n switchMap((tags) => merge(...tags.map((tag) => tag.destroy$))),\n filter((destroyedTag: NbTagComponent) => destroyedTag === this.keyManager.activeItem),\n map((destroyedTag: NbTagComponent) => destroyedTag === this.tags().at(-1)),\n takeUntilDestroyed()\n )\n .subscribe((isLastTagDestroyed: boolean) => {\n if (isLastTagDestroyed) {\n this.keyManager.setPreviousItemActive()\n } else {\n this.keyManager.setNextItemActive()\n }\n })\n }\n\n _onKeydown(event: KeyboardEvent) {\n const tagInput = this.tagInput()\n if (event.target === this.hostElement.nativeElement) {\n this.handleListKeydown(event)\n } else if (tagInput && event.target === tagInput._hostElement.nativeElement) {\n this.handleInputKeydown(event, tagInput)\n }\n }\n\n _onClick({ target }: MouseEvent) {\n // The tag clicked anywhere in, e.g. on its text, but not on its remove button, which removes it.\n const element = target instanceof Element ? target : null\n const clickedTag = element?.closest('.nb-tag-remove')\n ? undefined\n : this.tags().find((tag: NbTagComponent) => tag._hostElement.nativeElement.contains(element))\n if (clickedTag) {\n this.toggleTag(clickedTag)\n this.keyManager.setActiveItem(clickedTag)\n }\n }\n\n protected handleListKeydown(event: KeyboardEvent) {\n this.keyManager.onKeydown(event)\n\n const activeTag = this.keyManager.activeItem\n if (!activeTag) {\n return\n }\n if (event.key === ' ') {\n this.toggleTag(activeTag)\n // Prevents page scroll.\n event.preventDefault()\n } else if (this.isBackspaceOrDelete(event.key)) {\n activeTag._remove()\n // Backspace's default action outside a text field is going back, in Safari and others.\n event.preventDefault()\n }\n }\n\n protected handleInputKeydown(event: KeyboardEvent, tagInput: NbTagInputDirective) {\n if (tagInput._value === '' && this.isBackspaceOrDelete(event.key) && !isComposing(event) && this.tags().length > 0) {\n // Focus moves to the list before the key's default action runs, which there would be going back.\n event.preventDefault()\n this.hostElement.nativeElement.focus()\n this.keyManager.setLastItemActive()\n }\n }\n\n writeValue(value?: string[] | null) {\n this.value.set(value ?? [])\n }\n\n registerOnChange(fn: (value: string[]) => void) {\n this.onChange = fn\n }\n\n registerOnTouched(fn: () => void) {\n this.onTouched = fn\n }\n\n setDisabledState(isDisabled: boolean) {\n this.isDisabled.set(isDisabled)\n }\n\n /**\n * Adds tags to a managed list, skipping empty ones and ones it already has.\n */\n addTags(tags: string[]) {\n const value = this.value() ?? []\n const added = tags\n .map((tag) => tag.trim())\n .filter((tag, i, all) => tag && !value.includes(tag) && all.indexOf(tag) === i)\n if (added.length) {\n this.setValue([...value, ...added])\n }\n }\n\n protected setValue(value: string[]) {\n this.value.set(value)\n this.onChange(value)\n }\n\n // Turns the input's text into tags; with `whenSeparated`, only when it holds separated parts, as a pasted list does.\n protected addFromInput(tagInput: NbTagInputDirective, whenSeparated: boolean) {\n const separators = [...new Set([...tagInput.separatorKeys().map((key) => SEPARATOR_CHARACTERS[key]), '\\n'])]\n .filter(Boolean)\n const parts = this.split(tagInput._value, separators)\n if (whenSeparated && parts.length < 2) {\n return\n }\n const validator = this.tagValidator()\n const value = this.value() ?? []\n const rejected = parts.filter((part) => !value.includes(part) && !validator(part))\n this.addTags(parts.filter((part) => validator(part)))\n // Rejected parts stay in the input, separated as they were typed.\n const separator = separators.find((candidate) => candidate.trim()) ?? ''\n tagInput._hostElement.nativeElement.value = rejected.join(`${separator} `)\n }\n\n protected split(text: string, separators: string[]): string[] {\n let parts = [text]\n for (const separator of separators) {\n parts = parts.flatMap((part) => part.split(separator))\n }\n return parts.map((part) => part.trim()).filter(Boolean)\n }\n\n protected onFocusChange(isFocused: boolean) {\n this.focused.set(isFocused)\n if (!isFocused) {\n this.onTouched()\n }\n\n if (!isFocused || this.tagInput()?.focused()) {\n this.keyManager.setActiveItem(-1)\n return\n }\n\n // Focus input when focusing tag list without tags. Otherwise select first tag.\n if (this.tags().length === 0 && this._hasInput()) {\n this.focusInput()\n } else {\n this.keyManager.setFirstItemActive()\n }\n }\n\n protected isBackspaceOrDelete(key: string): boolean {\n return key === 'Backspace' || key === 'Delete'\n }\n\n protected toggleTag(tagToToggle: NbTagComponent) {\n tagToToggle._toggleSelection()\n\n if (tagToToggle.isSelected() && !this.multiple()) {\n this.tags().forEach((tag: NbTagComponent) => {\n if (tag !== tagToToggle) {\n tag.setSelected(false)\n }\n })\n }\n }\n\n protected focusInput() {\n this.tagInput()?._hostElement.nativeElement.focus()\n }\n\n protected focusInputIfActive() {\n if (this._isFocused()) {\n this.focusInput()\n }\n }\n}\n\nfunction setOrRemoveAttribute(element: HTMLElement, name: string, value: string | null) {\n if (value === null) {\n element.removeAttribute(name)\n } else {\n element.setAttribute(name, value)\n }\n}\n","<div class=\"nb-tag-list-tags-wrapper\">\n @if (managed()) {\n @for (tag of value(); track tag) {\n <nb-tag [text]=\"tag\"\n [removable]=\"!isDisabled()\"\n [size]=\"tagSize()\" />\n }\n }\n <ng-content select=\"nb-tag, input[nbTagInput]\" />\n</div>\n","import { NgModule } from '@angular/core'\n\nimport { NbIconModule } from '@liquid-js/lyr-core/icon'\nimport { NbTagComponent } from './tag.component'\nimport { NbTagListComponent } from './tag-list.component'\nimport { NbTagInputDirective } from './tag-input.directive'\n\n@NgModule({\n imports: [\n NbIconModule,\n NbTagComponent,\n NbTagListComponent,\n NbTagInputDirective\n ],\n exports: [NbTagComponent, NbTagListComponent, NbTagInputDirective]\n})\nexport class NbTagModule { }\n"],"mappings":";;;;;;;;;;;;;;;;AAOA,MAAa,4BAA4B,IAAI,eAAkC,2BAA2B;ACJ1G,MAAa,yBAAyB;ACCtC,IAAI,oBAAoB;AA4BxB,IAAa,yBAAb,MAAa,uBAAsB;CAZnC,cAAA;EAauB,KAAA,aAAa,OAAgC,UAAU;EACvD,KAAA,UAAU,yBAAyB;EAE7C,KAAA,QAAQ,MAAe,GAAA,YAAA,CAAA,QAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;EAKvB,KAAA,WAAW,MAA+B,OAAK;GAAA,GAAA,YAAA,EAAA,WAAA,WAAA,+BAAA,CAAA;GAAI,WAAWA;EAAqB,CAAA;EAGzE,KAAA,UAAU,OAAO,IAAI,MAAK,GAAkC,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;EAC5D,KAAA,cAAc,eAAc;GAC3C,MAAM,UAAU,KAAK,QAAO;GAC5B,OAAO,QAAQ,SAAS,KAAK,QAAQ,OAAO,WAAW,OAAO,SAAQ,CAAE;EAC5E,GAAE,GAAA,YAAA,CAAA,EAAA,WAAA,cAAA,CAAA,+BAAA,CAAA,CAAA;CAoBL;CAlBG,UAAU,QAAqC;EAC3C,KAAK,QAAQ,QAAQ,YAAY,CAAC,GAAG,SAAS,MAAM,CAAC;CACzD;CAEA,aAAa,QAAqC;EAC9C,KAAK,QAAQ,QAAQ,YAAY,QAAQ,QAAQ,aA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AS,qBAAqB,SAAsB,MAAc,OAAoB;CAClF,IAAI,UAAU,MACV,QAAQ,gBAAgB,IAAI;MAE5B,QAAQ,aAAa,MAAM,KAAK;AAExC;AErcA,IAAa,cAAb,MAAa,YAAW;CAAX;EAAA,KAAA,OAAA,GAAA,mBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAW,MAAA,CAAA;GAAA,QAAA,GAAA,gBAAA;EAAA,CAAA;CAAA;CAAX;EAAA,KAAA,OAAA,GAAA,oBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAW,SAAA;IAPhB;IACA;IACA;IACA;GAAmB;GAAA,SAAA;IAEb;IAAgB;IAAoB;GAAmB;EAAA,CAAA;CAAA;CAExD;EAAA,KAAA,OAAA,GAAA,oBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAW,SAAA;IAPhB;IACA;IACA;GAAkB;EAAA,CAAA;CAAA;;AAKb,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAW,YAAA,CAAA;EATvB,MAAA;EAAS,MAAA,CAAA;GACN,SAAS;IACL;IACA;IACA;IACA;GACH;GACD,SAAS;IAAC;IAAgB;IAAoB;GAAmB;EACpE,CAAA"}
|
|
1
|
+
{"version":3,"file":"liquid-js-lyr-core-select.mjs","names":["convertToBoolProperty","convertToBoolProperty","convertToBoolProperty","enableTransitionsAfterRender","convertToBoolProperty","convertToBoolProperty","enableTransitionsAfterRender","convertToBoolProperty","NbActiveDescendantKeyManagerFactoryService","enableTransitionsAfterRender","isComposing","convertToBoolProperty","NbActiveDescendantKeyManagerFactoryService","isComposing","NbKeyManagerActiveItemMode","NbActiveDescendantKeyManagerFactoryService","convertToBoolProperty","enableTransitionsAfterRender","isComposing","sameControlValue"],"sources":["../../../packages/core/src/components/select/select-injection-tokens.ts","../../../packages/core/src/components/option/option-reveal.ts","../../../packages/core/src/components/option/option-group.component.ts","../../../packages/core/src/components/option/option-group.component.html","../../../packages/core/src/components/option/option-list-item.ts","../../../packages/core/src/components/option/option-level.ts","../../../packages/core/src/components/option/option-nested.component.ts","../../../packages/core/src/components/option/option-nested.component.html","../../../packages/core/src/components/option/option.component.ts","../../../packages/core/src/components/option/option.component.html","../../../packages/core/src/components/option/option-list.component.ts","../../../packages/core/src/components/option/option-list.component.html","../../../packages/core/src/components/option/option-list.module.ts","../../../packages/core/src/components/tag/tag-list-size.ts","../../../packages/core/src/components/tag/tag.component.ts","../../../packages/core/src/components/tag/tag.component.html","../../../packages/core/src/components/select/select.component.ts","../../../packages/core/src/components/select/select.component.html","../../../packages/core/src/components/select/select.module.ts","../../../packages/core/src/components/autocomplete/autocomplete.component.ts","../../../packages/core/src/components/autocomplete/autocomplete.component.html","../../../packages/core/src/components/autocomplete/autocomplete-ref.ts","../../../packages/core/src/components/autocomplete/autocomplete.directive.ts","../../../packages/core/src/components/autocomplete/autocomplete.module.ts","../../../packages/core/src/components/tag/tag-input.directive.ts","../../../packages/core/src/components/tag/tag-list.component.ts","../../../packages/core/src/components/tag/tag-list.component.html","../../../packages/core/src/components/tag/tag.module.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core'\n\nimport type { NbSelectComponent } from './select.component'\n\n/**\n * The select an option belongs to; `nb-select` provides it.\n */\nexport const NB_SELECT_INJECTION_TOKEN = new InjectionToken<NbSelectComponent>('NB_SELECT_INJECTION_TOKEN')\n","/**\n * Asks the option list to show an option outside its laid-out window, e.g. before it takes focus.\n */\nexport const NB_OPTION_REVEAL_EVENT = 'nboptionreveal'\n","import { Component, computed, ElementRef, inject, input, Signal, signal } from '@angular/core'\n\nimport { ɵconvertToBoolProperty as convertToBoolProperty, NbBooleanInput } from '@liquid-js/lyr-core/base'\n\nlet lastOptionGroupId = 0\n\n/**\n * Groups the options of a select or autocomplete under a `title`; a `disabled` group disables its options. The group\n * hides while a search leaves out all its options.\n *\n * @styles\n *\n * option-group-text-color:\n * option-group-text-font-weight:\n * option-group-tiny-start-padding:\n * option-group-small-start-padding:\n * option-group-medium-start-padding:\n * option-group-large-start-padding:\n * option-group-giant-start-padding:\n **/\n@Component({\n selector: 'nb-option-group',\n styleUrls: ['./option-group.component.scss'],\n templateUrl: './option-group.component.html',\n host: {\n 'role': 'group',\n // Hidden when a select's search leaves out all its options.\n '[class.filtered]': 'allFiltered()',\n '[attr.aria-labelledby]': 'titleId',\n '[attr.disabled]': \"disabled() ? '' : null\"\n }\n})\nexport class NbOptionGroupComponent {\n protected readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef)\n protected readonly titleId = `nb-option-group-title-${lastOptionGroupId++}`\n\n readonly title = input<string>()\n\n /**\n * Disables the options in the group.\n */\n readonly disabled = input<boolean, NbBooleanInput>(false, { transform: convertToBoolProperty })\n\n // Options register themselves; importing them here would be circular.\n protected readonly options = signal(new Array<{ filtered: Signal<boolean> }>())\n protected readonly allFiltered = computed(() => {\n const options = this.options()\n return options.length > 0 && options.every((option) => option.filtered())\n })\n\n addOption(option: { filtered: Signal<boolean> }) {\n this.options.update((options) => [...options, option])\n }\n\n removeOption(option: { filtered: Signal<boolean> }) {\n this.options.update((options) => options.filter((existing) => existing !== option))\n }\n\n /**\n * Set by its select: whether nothing in the group is in view, e.g. the list is drilled into a nested option outside\n * it, which hides it; or whether the list is drilled into a nested option in it, which hides only its title.\n */\n setNestedView(collapsed: boolean, drilledInto: boolean) {\n const host = this.elementRef.nativeElement\n host.classList.toggle('nb-option-collapsed', collapsed)\n host.querySelector(`#${this.titleId}`)?.classList.toggle('nb-option-collapsed', drilledInto)\n host.setAttribute('role', drilledInto ? 'none' : 'group')\n }\n}\n","<span class=\"option-group-title\"\n [id]=\"titleId\"><span dir=\"auto\">{{ title() }}</span></span>\n<ng-content select=\"nb-option, nb-option-nested, ng-container\" />\n","import { InjectionToken } from '@angular/core'\n\nimport { NbFocusableOption, ɵNbHighlightableOption as NbHighlightableOption } from '@liquid-js/lyr-core/cdk'\n\n/**\n * An entry the keyboard moves through in an option list: an option, or the row of a nested option.\n */\nexport interface NbOptionListItem extends NbFocusableOption, NbHighlightableOption {\n readonly id: string\n readonly disabled: boolean\n readonly hidden: boolean\n}\n\n/**\n * Provided by options and nested options, so a select can query both, in the order they're in.\n */\nexport const NB_OPTION_LIST_ITEM = new InjectionToken<NbOptionListItem>('NB_OPTION_LIST_ITEM')\n","/**\n * Sets how deep a row is in the view of a list, which indents it.\n */\nexport function setLevel(row: HTMLElement, level: number) {\n // Only indented rows have the spacer that indents them, so lists without nested options have none.\n row.classList.toggle('nb-option-indented', level > 1)\n if (level > 1) {\n row.style.setProperty('--nb-option-level', String(level))\n } else {\n row.style.removeProperty('--nb-option-level')\n }\n}\n","import { Component, computed, ElementRef, inject, input, model, signal, Signal, viewChild } from '@angular/core'\n\nimport { ɵconvertToBoolProperty as convertToBoolProperty, NbBooleanInput } from '@liquid-js/lyr-core/base'\nimport { NbIconComponent } from '@liquid-js/lyr-core/icon'\nimport { NB_SELECT_INJECTION_TOKEN } from '../select/select-injection-tokens'\nimport { NB_OPTION_LIST_ITEM, NbOptionListItem } from './option-list-item'\nimport { NbOptionGroupComponent } from './option-group.component'\nimport { NB_OPTION_REVEAL_EVENT } from './option-reveal'\nimport { setLevel } from './option-level'\n\nlet lastOptionNestedId = 0\n\n// What a nested option needs of the options in it; importing them here would be circular.\ninterface NbNestedChildOption {\n filtered: Signal<boolean>\n selected: Signal<boolean>\n}\n\n/**\n * Options in a `nb-select` that open from a row, as a tree. Only the options in them are selected, not the nested\n * options themselves. Nested options can hold more nested options, and sit in groups.\n *\n * ```html\n * <nb-select placeholder=\"Import from\">\n * <nb-option value=\"local\">This device</nb-option>\n * <nb-option-nested title=\"Cloud\">\n * <nb-option value=\"drive\">Google Drive</nb-option>\n * <nb-option-nested title=\"Object storage\">\n * <nb-option value=\"s3\">AWS S3</nb-option>\n * </nb-option-nested>\n * </nb-option-nested>\n * </nb-select>\n * ```\n *\n * A row opens and closes on click, Enter or Space; ArrowRight opens it, or moves into it when it's open, and ArrowLeft\n * closes it or moves to its parent. The list shows up to `nestedLevels` levels of the select at once (3 by default):\n * opening a deeper one drills in, so the list starts at a nested option, with a row to go back. A collapsed row shows\n * when an option in it is selected, and opens to show an option that becomes active, e.g. the selected one as the\n * list opens. A search shows the matching options with the nested options they're in.\n *\n * @styles\n *\n * option-nested-icon-color:\n * option-nested-selected-text-color:\n * option-nested-tiny-indent:\n * option-nested-small-indent:\n * option-nested-medium-indent:\n * option-nested-large-indent:\n * option-nested-giant-indent:\n */\n@Component({\n selector: 'nb-option-nested',\n templateUrl: './option-nested.component.html',\n styleUrls: ['./option-nested.component.scss'],\n imports: [NbIconComponent],\n providers: [{ provide: NB_OPTION_LIST_ITEM, useExisting: NbOptionNestedComponent }],\n host: {\n 'tabindex': '-1',\n 'role': 'treeitem',\n '[attr.id]': 'id',\n '[attr.aria-labelledby]': 'titleId',\n '[attr.aria-disabled]': 'disabled || null',\n '[attr.disabled]': \"disabled ? '' : null\",\n '[class.active]': 'active()',\n '[class.filtered]': 'filtered()',\n '[class.has-selected]': 'hasSelected()'\n }\n})\nexport class NbOptionNestedComponent implements NbOptionListItem {\n protected readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef)\n protected readonly select = inject(NB_SELECT_INJECTION_TOKEN, { optional: true })\n readonly group = inject(NbOptionGroupComponent, { optional: true })\n /**\n * The nested option this one is in.\n */\n readonly parentNested = inject(NbOptionNestedComponent, { optional: true, skipSelf: true })\n\n readonly id = `nb-option-nested-${lastOptionNestedId++}`\n protected readonly titleId = `${this.id}-title`\n protected readonly groupId = `${this.id}-group`\n protected readonly row = viewChild.required<ElementRef<HTMLElement>>('row')\n\n /**\n * How deep it is in the select: 1 for a nested option at the top.\n */\n readonly depth: number = (this.parentNested?.depth ?? 0) + 1\n\n readonly title = input<string>()\n\n /**\n * Disables the nested option and the options in it.\n */\n readonly disabledInput = input<boolean, NbBooleanInput>(false, { alias: 'disabled', transform: convertToBoolProperty })\n\n /**\n * Whether its options show.\n */\n readonly expanded = model(false)\n\n /**\n * Whether it's disabled by itself, a group or a nested option it's in.\n */\n readonly isDisabled: Signal<boolean> = computed(\n () => this.disabledInput() || !!this.group?.disabled() || !!this.parentNested?.isDisabled()\n )\n\n // Options register themselves with every nested option they're in.\n protected readonly options = signal(new Array<NbNestedChildOption>())\n protected readonly filtered = computed(() => {\n const options = this.options()\n return options.length > 0 && options.every((option) => option.filtered())\n })\n protected readonly hasSelected = computed(() => this.options().some((option) => option.selected()))\n protected readonly activeState = signal(false)\n protected readonly active = this.activeState.asReadonly()\n protected readonly multiple = computed(() => !!this.select?.multiple())\n protected collapsed = false\n\n get disabled(): boolean {\n return this.isDisabled()\n }\n\n get hidden(): boolean {\n return this.filtered() || this.collapsed\n }\n\n addOption(option: NbNestedChildOption) {\n this.options.update((options) => [...options, option])\n }\n\n removeOption(option: NbNestedChildOption) {\n this.options.update((options) => options.filter((existing) => existing !== option))\n }\n\n /**\n * Set by its select: whether its row is out of view (in a collapsed or drilled-past nested option), how deep it is\n * in the view, whether its options show (it's expanded, or a search shows them), and whether the list is drilled\n * into it or a nested option in it, so only its options show.\n */\n setNestedView(collapsed: boolean, level: number, open: boolean, drilledInto: boolean) {\n this.collapsed = collapsed\n const host = this.elementRef.nativeElement\n host.classList.toggle('expanded', open)\n host.setAttribute('aria-expanded', String(open))\n const row = this.row().nativeElement\n row.classList.toggle('nb-option-collapsed', collapsed)\n setLevel(row, level)\n host.setAttribute('aria-level', String(level))\n // Its row is the list's back row then, and its options are at the top of the tree.\n host.setAttribute('role', drilledInto ? 'none' : 'treeitem')\n host.querySelector(`#${this.groupId}`)?.setAttribute('role', drilledInto ? 'none' : 'group')\n }\n\n getHostElement(): HTMLElement {\n return this.elementRef.nativeElement\n }\n\n /**\n * The row with its title, which shows in the list; the element holds the options in it too.\n */\n getRowElement(): HTMLElement {\n return this.row().nativeElement\n }\n\n getLabel(): string {\n return this.title() ?? ''\n }\n\n focus() {\n // The list scrolls to its row; the element holds the options in it too, so scrolling to it could scroll past it.\n this.reveal()\n this.elementRef.nativeElement.focus({ preventScroll: true })\n }\n\n setActiveStyles() {\n this.reveal()\n this.activeState.set(true)\n }\n\n setInactiveStyles() {\n this.activeState.set(false)\n }\n\n protected toggle(event: Event) {\n event.stopPropagation()\n if (!this.disabled) {\n this.select?.toggleNested(this)\n }\n }\n\n protected reveal() {\n this.select?.revealNested(this)\n this.row().nativeElement.dispatchEvent(new CustomEvent(NB_OPTION_REVEAL_EVENT, { bubbles: true }))\n }\n}\n","<!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- The select's list moves focus and opens groups by keyboard. -->\n<div class=\"option-nested-row\"\n [class.multiple]=\"multiple()\"\n (click)=\"toggle($event)\"\n #row>\n <span class=\"option-nested-title\"\n [id]=\"titleId\"><span dir=\"auto\">{{ title() }}</span></span>\n <nb-icon class=\"option-nested-icon\"\n icon=\"chevron-right-outline\"\n pack=\"essentials\"\n aria-hidden=\"true\" />\n</div>\n<div class=\"option-nested-options\"\n role=\"group\"\n [id]=\"groupId\">\n <ng-content select=\"nb-option, nb-option-nested, nb-option-group, ng-container\" />\n</div>\n","import {\n Component,\n computed,\n DestroyRef,\n ElementRef,\n inject,\n input,\n output,\n signal\n} from '@angular/core'\nimport { Observable, Subject } from 'rxjs'\n\n// Component class scoped counter for aria attributes.\nlet lastOptionId = 0\n\nimport { ɵconvertToBoolProperty as convertToBoolProperty, NbBooleanInput, ɵenableTransitionsAfterRender as enableTransitionsAfterRender } from '@liquid-js/lyr-core/base'\nimport { NbFocusableOption, ɵNbHighlightableOption as NbHighlightableOption } from '@liquid-js/lyr-core/cdk'\nimport { NbCheckboxComponent } from '@liquid-js/lyr-core/checkbox'\nimport { NB_SELECT_INJECTION_TOKEN } from '../select/select-injection-tokens'\nimport { NB_OPTION_REVEAL_EVENT } from './option-reveal'\nimport { NbOptionGroupComponent } from './option-group.component'\nimport { NbOptionNestedComponent } from './option-nested.component'\nimport { setLevel } from './option-level'\nimport { NB_OPTION_LIST_ITEM, NbOptionListItem } from './option-list-item'\n\n/**\n * An option of an `nb-select` or `nb-autocomplete`, with the `value` it selects; its content is its label. A\n * `disabled` option can't be chosen.\n *\n * @styles\n *\n * option-background-color:\n * option-text-color:\n * option-text-font-family:\n * option-hover-background-color:\n * option-hover-text-color:\n * option-active-background-color:\n * option-active-text-color:\n * option-focus-background-color:\n * option-focus-text-color:\n * option-selected-background-color:\n * option-selected-text-color:\n * option-selected-hover-background-color:\n * option-selected-hover-text-color:\n * option-selected-active-background-color:\n * option-selected-active-text-color:\n * option-selected-focus-background-color:\n * option-selected-focus-text-color:\n * option-disabled-background-color:\n * option-disabled-text-color:\n * option-tiny-text-font-size:\n * option-tiny-text-font-weight:\n * option-tiny-text-line-height:\n * option-tiny-padding:\n * option-tiny-padding-inline:\n * option-small-text-font-size:\n * option-small-text-font-weight:\n * option-small-text-line-height:\n * option-small-padding:\n * option-small-padding-inline:\n * option-medium-text-font-size:\n * option-medium-text-font-weight:\n * option-medium-text-line-height:\n * option-medium-padding:\n * option-medium-padding-inline:\n * option-large-text-font-size:\n * option-large-text-font-weight:\n * option-large-text-line-height:\n * option-large-padding:\n * option-large-padding-inline:\n * option-giant-text-font-size:\n * option-giant-text-font-weight:\n * option-giant-text-line-height:\n * option-giant-padding:\n * option-giant-padding-inline:\n **/\n@Component({\n selector: 'nb-option',\n styleUrls: ['./option.component.scss'],\n templateUrl: './option.component.html',\n imports: [NbCheckboxComponent],\n providers: [{ provide: NB_OPTION_LIST_ITEM, useExisting: NbOptionComponent }],\n host: {\n 'tabindex': '-1',\n // A treeitem in a select with nested options, which sets it.\n 'role': 'option',\n '[attr.id]': 'id',\n '[attr.aria-selected]': 'checkboxChecked()',\n '[attr.aria-disabled]': 'disabled || null',\n '[class.multiple]': 'multiple()',\n '[class.selected]': 'selected()',\n '[class.active]': 'active()',\n '[class.filtered]': 'filtered()',\n '[attr.disabled]': \"disabled ? '' : null\",\n '(click)': 'onClick($event)',\n '(keydown.space)': 'onClick($event)',\n '(keydown.enter)': 'onClick($event)'\n }\n})\nexport class NbOptionComponent<T = unknown> implements NbFocusableOption, NbHighlightableOption, NbOptionListItem {\n protected readonly elementRef = inject(ElementRef)\n readonly group = inject(NbOptionGroupComponent, { optional: true })\n /**\n * The nested option this one is in.\n */\n readonly parentNested = inject(NbOptionNestedComponent, { optional: true })\n /**\n * How deep it is in its select: 1 at the top, 2 in a nested option, and so on.\n */\n readonly depth: number = (this.parentNested?.depth ?? 0) + 1\n protected readonly parent = inject(NB_SELECT_INJECTION_TOKEN, { optional: true })\n\n /**\n * The value the select gets when the option is selected; an option without one clears the selection.\n */\n readonly value = input<T>()\n\n /**\n * Disables the option. An option in a disabled `nb-option-group` is disabled too.\n */\n readonly disabledInput = input<boolean, NbBooleanInput>(false, { alias: 'disabled', transform: convertToBoolProperty })\n\n /**\n * Emits the option as it's selected or deselected.\n */\n readonly selectionChange = output<NbOptionComponent<T>>()\n\n // Emits on click, Enter and Space; the select listens to it.\n protected click$: Subject<NbOptionComponent<T>> = new Subject<NbOptionComponent<T>>()\n get click(): Observable<NbOptionComponent<T>> {\n return this.click$.asObservable()\n }\n\n protected readonly selectedState = signal(false)\n\n /**\n * Whether the option is selected.\n */\n readonly selected = this.selectedState.asReadonly()\n\n protected readonly activeState = signal(false)\n protected readonly active = this.activeState.asReadonly()\n\n protected alive = true\n\n /**\n * Unique id of the element, for ARIA references such as `aria-activedescendant`.\n */\n readonly id: string = `nb-option-${lastOptionId++}`\n\n /**\n * In a multiple select, makes this the option that selects all others, or clears them when they're all selected.\n * It acts on the options a search shows, and up to `maxSelections`.\n */\n readonly selectAll = input<boolean, NbBooleanInput>(false, { transform: convertToBoolProperty })\n\n /**\n * Whether the option is disabled by itself or its group, as opposed to by its select's `maxSelections`.\n */\n readonly ownDisabled = computed(\n () => this.disabledInput() || !!this.group?.disabled() || !!this.parentNested?.isDisabled()\n )\n\n // Disabled by itself, by its group, or because its select has as many options selected as it allows.\n protected readonly isDisabled = computed(() => this.ownDisabled() || !!this.parent?.isLimited(this))\n\n // A select-all option shows whether all, some or none of the options are selected.\n protected readonly checkboxChecked = computed(() =>\n this.selectAll() ? this.parent?.selectAllState() === 'all' : this.selected()\n )\n protected readonly checkboxIndeterminate = computed(() => this.selectAll() && this.parent?.selectAllState() === 'some')\n // As big as the select's text.\n protected readonly checkboxSize = computed(() => this.parent?.size() ?? 'medium')\n\n /**\n * Whether the option is in a multiple select.\n */\n readonly multiple = computed(() => !!this.parent?.multiple())\n\n /**\n * Whether the option shows a checkbox: in a multiple select, unless it clears the selection (`null` is a value in a\n * `nullable` select).\n */\n readonly withCheckbox = computed(\n () =>\n this.multiple() &&\n (this.selectAll() || !(this.parent ? this.parent.isEmptyValue(this.value()) : this.value() == null))\n )\n\n constructor() {\n enableTransitionsAfterRender(this.elementRef.nativeElement)\n\n this.group?.addOption(this)\n for (let nested = this.parentNested; nested; nested = nested.parentNested) {\n nested.addOption(this)\n }\n inject(DestroyRef).onDestroy(() => {\n this.alive = false\n this.group?.removeOption(this)\n for (let nested = this.parentNested; nested; nested = nested.parentNested) {\n nested.removeOption(this)\n }\n })\n }\n\n /**\n * Whether the option is disabled: by itself, its group, a nested option it's in, or its select's `maxSelections`.\n * A plain boolean, which the keyboard managers read.\n */\n get disabled(): boolean {\n return this.isDisabled()\n }\n\n get content() {\n return this.elementRef.nativeElement.textContent\n }\n\n get hidden() {\n return this.elementRef.nativeElement.hidden || this.filtered() || this.collapsed\n }\n\n protected collapsed = false\n protected nestedView?: string\n\n /**\n * Set by a select with nested options: whether the option is out of view (in a collapsed or drilled-past nested\n * option), and how deep it is in the view, as an item of its tree.\n */\n setNestedView(collapsed: boolean, level: number) {\n // A tree sets this on all its options as it changes, so only the ones that change touch the DOM.\n if (this.nestedView === `${collapsed} ${level}`) {\n return\n }\n this.nestedView = `${collapsed} ${level}`\n this.collapsed = collapsed\n const host = this.elementRef.nativeElement\n host.setAttribute('role', 'treeitem')\n host.classList.toggle('nb-option-collapsed', collapsed)\n setLevel(host, level)\n host.setAttribute('aria-level', String(level))\n }\n\n /**\n * Whether a select's search left the option out.\n */\n readonly filtered = signal(false)\n\n onClick(event: Event) {\n this.click$.next(this)\n\n // Prevent scroll on space click, etc.\n event.preventDefault()\n }\n\n select() {\n this.setSelection(true)\n }\n\n deselect() {\n this.setSelection(false)\n }\n\n protected setSelection(selected: boolean) {\n // A select keeps a reference to a selected option that was replaced at runtime, and Angular can call writeValue on\n // a destroyed view (angular/angular#27803), so a destroyed option ignores the change rather than throwing.\n if (this.alive && this.selected() !== selected) {\n this.selectedState.set(selected)\n this.selectionChange.emit(this)\n }\n }\n\n focus() {\n this.reveal()\n this.elementRef.nativeElement.focus()\n }\n\n getLabel(): string {\n return this.content\n }\n\n setActiveStyles() {\n this.reveal()\n this.activeState.set(true)\n }\n\n // A long option list lays out only the options near its view; it shows and scrolls to this one on request.\n protected reveal() {\n this.parent?.revealNested(this)\n this.elementRef.nativeElement.dispatchEvent(new CustomEvent(NB_OPTION_REVEAL_EVENT, { bubbles: true }))\n }\n\n setInactiveStyles() {\n this.activeState.set(false)\n }\n\n getHostElement(): HTMLElement {\n return this.elementRef.nativeElement\n }\n}\n","@if (withCheckbox()) {\n<nb-checkbox [checked]=\"checkboxChecked()\"\n [size]=\"checkboxSize()\"\n [indeterminate]=\"checkboxIndeterminate()\"\n [disabled]=\"disabled\"\n aria-hidden=\"true\" />\n}\n<ng-content />\n","import { AfterViewInit, Component, DestroyRef, ElementRef, inject, input, viewChild } from '@angular/core'\n\nimport { NbComponentSize, ɵconvertToBoolProperty as convertToBoolProperty, NbBooleanInput } from '@liquid-js/lyr-core/base'\nimport { NbPosition } from '@liquid-js/lyr-core/cdk'\nimport { NB_OPTION_REVEAL_EVENT } from './option-reveal'\n\n/**\n * The scrolling container of options, groups and nested options, which a select or autocomplete opens in an overlay.\n * With 100 or more options shown, it lays out only the ones near its view; see `NbOptionListWindowing`.\n *\n * @styles\n *\n * option-list-max-height:\n * option-list-scrollbar-color:\n * option-list-scrollbar-background-color:\n * option-list-scrollbar-width:\n * option-list-shadow:\n * option-list-background-color:\n * option-list-border-style:\n * option-list-border-width:\n * option-list-border-color:\n * option-list-border-radius:\n * option-list-adjacent-border-color:\n * option-list-adjacent-border-style:\n * option-list-adjacent-border-width:\n * */\n@Component({\n selector: 'nb-option-list',\n templateUrl: './option-list.component.html',\n host: {\n '[class]': \"'size-' + size()\",\n '[class.position-top]': \"position() === 'top'\",\n '[class.position-bottom]': \"position() === 'bottom'\",\n 'animate.enter': 'nb-overlay-enter',\n 'animate.leave': 'nb-overlay-leave'\n }\n})\nexport class NbOptionListComponent implements AfterViewInit {\n readonly size = input<NbComponentSize>('medium')\n\n readonly position = input<NbPosition>()\n\n /**\n * Whether more than one option can be selected, for assistive technology.\n */\n readonly multiple = input<boolean, NbBooleanInput>(false, { transform: convertToBoolProperty })\n\n /**\n * Id of the listbox, for a search input that controls it.\n */\n readonly listId = input<string>()\n\n /**\n * The role of the list: a `tree` when it has nested options.\n */\n readonly listRole = input<'listbox' | 'tree'>('listbox')\n\n readonly list = viewChild<ElementRef<HTMLElement>>('list')\n\n protected readonly destroyRef = inject(DestroyRef)\n protected readonly windowing = new NbOptionListWindowing()\n\n // Overlays check the list as they attach it, before positioning it, so a long list lays out only its window from the\n // start; waiting for the first render would measure all its options once.\n ngAfterViewInit() {\n const list = this.list()?.nativeElement\n if (list) {\n this.windowing.attach(list)\n this.destroyRef.onDestroy(() => this.windowing.detach())\n }\n }\n\n setScrollTop(scrollTop: number) {\n const list = this.list()\n if (list) {\n list.nativeElement.scrollTop = scrollTop\n }\n }\n\n getScrollTop(): number {\n return this.list()?.nativeElement.scrollTop ?? 0\n }\n}\n\n// The rows of a list: its options, and the rows of nested options.\nconst NB_OPTION_ROWS = 'nb-option, .option-nested-row'\n// Left out by a search, collapsed in a nested option, or hidden by the app, by themselves or what they're in.\nconst NB_HIDDEN = '[hidden], .filtered, .nb-option-collapsed'\n\n// Lists with at least this many shown options lay out only the ones near the view.\nconst WINDOWING_THRESHOLD = 100\n// Options shown above and below the view, so scrolling a little shows them at once.\nconst WINDOW_BUFFER = 20\n\ninterface NbWindowRow {\n option: HTMLElement\n // The group the option is in, or the list.\n parent: HTMLElement\n // Space before the option that isn't an option, i.e. its group's title.\n before: number\n top: number\n height: number\n}\n\n/**\n * Lays out only the options of a long list that are near its view, so opening, scrolling and searching stay fast with\n * thousands of options. The others are hidden, and the space they take is kept as margins, so the scrollbar, groups\n * and positions stay right. It works from the list's DOM, so it applies to any list of `nb-option`s.\n *\n * Options can differ in height: each one laid out keeps its own, and the others take the average of the first ones\n * laid out until they are. As they are, the option at the top of the view stays where it is.\n */\nexport class NbOptionListWindowing {\n protected list?: HTMLElement\n protected inView = new Set<HTMLElement>()\n protected spaced = new Set<HTMLElement>()\n protected rows = new Array<NbWindowRow>()\n // The height of options not laid out yet; zero until the list is laid out.\n protected optionHeight = 0\n protected heights = new WeakMap<HTMLElement, number>()\n protected width = 0\n // The option last revealed, and the scroll position the windowing last set.\n protected revealed?: HTMLElement\n protected scrolledTo = 0\n // Each of these runs before the browser paints, so updating in them keeps every painted frame consistent; waiting for\n // an animation frame would show a frame with the old window, e.g. an empty list after a jump.\n protected readonly mutations = new MutationObserver(() => this.update())\n // Also reports the list's first size, once it's laid out in the document.\n protected readonly resizes = new ResizeObserver(() => this.resize())\n protected readonly onScroll = () => {\n const list = this.list as HTMLElement\n // Scrolled by the user, not by revealing an option.\n if (Math.abs(list.scrollTop - this.scrolledTo) >= 1) {\n this.revealed = undefined\n }\n // A list that stops being long scrolls as it shrinks, e.g. as a search leaves out options.\n if (list.classList.contains('nb-option-list-windowed')) {\n this.render()\n }\n }\n protected readonly onReveal = (event: Event) => this.reveal(event.target as HTMLElement)\n\n attach(list: HTMLElement) {\n this.list = list\n list.addEventListener('scroll', this.onScroll, { passive: true })\n list.addEventListener(NB_OPTION_REVEAL_EVENT, this.onReveal)\n // Options added, removed, filtered or hidden change the rows.\n this.mutations.observe(list, { childList: true, subtree: true, attributes: true, attributeFilter: ['class', 'hidden'] })\n this.resizes.observe(list)\n // Options start hidden, so whatever measures the list before this (e.g. its width) doesn't lay out all of them.\n // Updating hides them again, if the list is long, before anything is measured.\n list.classList.remove('nb-option-list-pending')\n this.update()\n this.mutations.takeRecords()\n }\n\n detach() {\n this.list?.removeEventListener('scroll', this.onScroll)\n this.list?.removeEventListener(NB_OPTION_REVEAL_EVENT, this.onReveal)\n this.mutations.disconnect()\n this.resizes.disconnect()\n // Options outlive the list (they're the app's content), so they're left as they were for the next list.\n this.apply(new Set(), new Map(), new Map())\n this.list?.querySelectorAll('.nb-option-in-view').forEach((option) => option.classList.remove('nb-option-in-view'))\n }\n\n /**\n * Shows an option and scrolls it into view, at once.\n */\n reveal(option: HTMLElement) {\n const list = this.list\n // Options can be revealed before what changes the list reaches it, e.g. the first match of a new search, so it's\n // revealed again as the list changes, until the list is scrolled.\n this.revealed = option\n if (!list) {\n return\n }\n if (!list.classList.contains('nb-option-list-windowed')) {\n this.scrollIntoView(option)\n return\n }\n this.measure()\n if (this.rows.some((row) => row.option === option)) {\n this.render(list.scrollTop, option)\n }\n }\n\n // A short list lays out all its options, but one can still be out of view, e.g. the active option of a search input,\n // which keeps focus. Only the list scrolls, not the page.\n protected scrollIntoView(option: HTMLElement) {\n const list = this.list as HTMLElement\n const rect = option.getBoundingClientRect()\n if (!rect.height) {\n return\n }\n // The first option of a group shows with the group's title.\n const title = option.previousElementSibling?.classList.contains('option-group-title') ? option.previousElementSibling : null\n const start = title?.getBoundingClientRect().top ?? rect.top\n const top = list.getBoundingClientRect().top + list.clientTop\n if (start < top) {\n list.scrollTop += start - top\n } else if (rect.bottom > top + list.clientHeight) {\n list.scrollTop += rect.bottom - top - list.clientHeight\n }\n this.scrolledTo = list.scrollTop\n }\n\n protected resize() {\n const width = this.list?.clientWidth ?? 0\n // Options wrap differently at another width, so the heights known are stale.\n if (width !== this.width) {\n this.width = width\n this.heights = new WeakMap()\n }\n this.update()\n }\n\n protected update() {\n const list = this.list\n if (!list) {\n return\n }\n const rows = this.allRows()\n const hidden = this.hiddenRows()\n if (rows.length - hidden.size < WINDOWING_THRESHOLD) {\n if (list.classList.contains('nb-option-list-windowed')) {\n list.classList.remove('nb-option-list-windowed')\n this.apply(new Set(), new Map(), new Map())\n }\n if (this.revealed && this.isShown(this.revealed)) {\n this.scrollIntoView(this.revealed)\n }\n return\n }\n list.classList.add('nb-option-list-windowed')\n this.measure(rows, hidden)\n const revealed = this.rows.find((row) => row.option === this.revealed)?.option\n this.render(list.scrollTop, revealed)\n }\n\n // Collects the shown options, and the group titles before them.\n protected measure(options = this.allRows(), hidden = this.hiddenRows()) {\n const list = this.list as HTMLElement\n const rows = new Array<NbWindowRow>()\n let parent: HTMLElement | undefined\n for (const option of options) {\n if (hidden.has(option)) {\n continue\n }\n const optionParent = (option.closest('nb-option-group') as HTMLElement | null) ?? list\n let before = 0\n if (optionParent !== parent) {\n parent = optionParent\n if (parent !== list) {\n before = (parent.querySelector('.option-group-title') as HTMLElement | null)?.offsetHeight ?? 0\n }\n }\n rows.push({ option, parent, before, top: 0, height: 0 })\n }\n this.rows = rows\n this.place()\n }\n\n // Works out where each option would be if all were laid out.\n protected place() {\n let top = 0\n for (const row of this.rows) {\n top += row.before\n row.top = top\n row.height = this.heights.get(row.option) ?? this.optionHeight\n top += row.height\n }\n }\n\n /**\n * Shows the options near the view and keeps the space of the hidden ones as margins. Options laid out for the first\n * time can turn out taller or shorter than expected, so it measures them and lays out again, scrolling to keep the\n * option at the top of the view (or the one to reveal) in place.\n */\n protected render(scrollTop = (this.list as HTMLElement).scrollTop, target?: HTMLElement) {\n const list = this.list as HTMLElement\n // Laid out, though maybe without height: the rows are hidden until there's a window, e.g. as the list gets long.\n if (!this.optionHeight && list.getClientRects().length) {\n this.estimate()\n }\n if (!this.optionHeight || !list.clientHeight) {\n // Not in the document yet: show the first options, as many as a list shows at most, until it's laid out and the\n // resize observer reports its size.\n this.optionHeight = 0\n this.apply(new Set(this.rows.slice(0, WINDOW_BUFFER * 2).map((row) => row.option)), new Map(), new Map())\n return\n }\n const anchor = this.rows[this.rowAt(scrollTop)]\n const offset = anchor ? scrollTop - anchor.top : 0\n const targetRow = target && this.rows.find((row) => row.option === target)\n // Each pass measures the options it lays out, so the next has more of them right; one or two do in practice.\n for (let pass = 0; pass < 4; pass++) {\n if (targetRow) {\n scrollTop = this.scrollFor(targetRow, scrollTop)\n } else if (anchor) {\n scrollTop = Math.max(0, anchor.top + offset)\n }\n this.layOut(scrollTop)\n if (!this.measureInView()) {\n break\n }\n this.place()\n }\n // Only differences of a pixel or more: browsers round scroll positions, and setting one stops a scroll in progress.\n if (Math.abs(list.scrollTop - scrollTop) >= 1) {\n list.scrollTop = scrollTop\n }\n this.scrolledTo = list.scrollTop\n }\n\n // The height options take until they're laid out: the average of the first ones.\n protected estimate() {\n const sample = this.rows.slice(0, WINDOW_BUFFER * 2).map((row) => row.option)\n this.apply(new Set(sample), new Map(), new Map())\n const heights = sample.map((option) => option.getBoundingClientRect().height)\n // Zero while the options aren't laid out, e.g. hidden with the list.\n this.optionHeight = heights.reduce((sum, height) => sum + height, 0) / heights.length || 0\n if (this.optionHeight) {\n sample.forEach((option, i) => this.heights.set(option, heights[i]))\n this.place()\n }\n }\n\n // Records the heights of the options laid out, and tells whether any of them differ from what was expected.\n protected measureInView(): boolean {\n let changed = false\n // Reads only, after the writes of laying out, so the browser lays the list out once.\n for (const row of this.rows) {\n if (this.inView.has(row.option)) {\n const height = row.option.getBoundingClientRect().height\n this.heights.set(row.option, height)\n changed ||= Math.abs(height - row.height) >= 0.5\n }\n }\n return changed\n }\n\n // The scroll position nearest to this one that shows the whole row.\n protected scrollFor(row: NbWindowRow, scrollTop: number): number {\n const clientHeight = (this.list as HTMLElement).clientHeight\n // The first option of a group shows with the group's title.\n if (row.top - row.before < scrollTop) {\n return row.top - row.before\n }\n if (row.top + row.height > scrollTop + clientHeight) {\n return row.top + row.height - clientHeight\n }\n return scrollTop\n }\n\n protected layOut(scrollTop: number) {\n const list = this.list as HTMLElement\n const rows = this.rows\n const first = Math.max(0, this.rowAt(scrollTop) - WINDOW_BUFFER)\n const last = Math.min(rows.length - 1, this.rowAt(scrollTop + list.clientHeight) + WINDOW_BUFFER)\n const window = rows.slice(first, last + 1)\n const shown = new Set(window.map((row) => row.option))\n\n // A run of hidden options becomes the top margin of the shown option after it, or the end space of its group\n // or list when nothing in it follows.\n const margins = new Map<HTMLElement, number>()\n const paddings = new Map<HTMLElement, number>()\n let hidden = 0\n let parent: HTMLElement | undefined\n const closeRun = () => {\n if (hidden && parent) {\n paddings.set(parent, (paddings.get(parent) ?? 0) + hidden)\n }\n hidden = 0\n }\n for (const row of rows) {\n if (row.parent !== parent) {\n closeRun()\n parent = row.parent\n }\n if (shown.has(row.option)) {\n if (hidden) {\n margins.set(row.option, hidden)\n }\n hidden = 0\n } else {\n hidden += row.height\n }\n }\n closeRun()\n this.apply(shown, margins, paddings)\n\n // Assistive technology hears the position of each shown option among all of them; in a tree, it's among the\n // options next to it, which the browser works out.\n if (list.getAttribute('role') !== 'listbox') {\n return\n }\n window.forEach((row, i) => {\n row.option.setAttribute('aria-setsize', String(rows.length))\n row.option.setAttribute('aria-posinset', String(first + i + 1))\n })\n }\n\n protected apply(shown: Set<HTMLElement>, margins: Map<HTMLElement, number>, paddings: Map<HTMLElement, number>) {\n for (const option of this.inView) {\n if (!shown.has(option)) {\n option.classList.remove('nb-option-in-view')\n option.style.removeProperty('margin-top')\n option.removeAttribute('aria-setsize')\n option.removeAttribute('aria-posinset')\n }\n }\n for (const option of shown) {\n option.classList.add('nb-option-in-view')\n const margin = margins.get(option)\n if (margin) {\n option.style.setProperty('margin-top', `${margin}px`)\n } else {\n option.style.removeProperty('margin-top')\n }\n }\n for (const element of this.spaced) {\n if (!paddings.has(element)) {\n this.setEndSpace(element, 0)\n }\n }\n for (const [element, padding] of paddings) {\n this.setEndSpace(element, padding)\n }\n this.inView = shown\n this.spaced = new Set(paddings.keys())\n // These are the windowing's own changes, not ones it needs to react to.\n this.mutations.takeRecords()\n }\n\n // The list scrolls, so its end space is content (see the theme), not padding, which would grow it past its height.\n protected setEndSpace(element: HTMLElement, space: number) {\n const property = element === this.list ? '--nb-option-list-end-space' : 'padding-bottom'\n if (space) {\n element.style.setProperty(property, `${space}px`)\n } else {\n element.style.removeProperty(property)\n }\n }\n\n // Long lists are scanned on every change, so this uses the browser's cached collections where it can; a list\n // without nested options has only options as rows.\n protected allRows(): HTMLCollectionOf<HTMLElement> | NodeListOf<HTMLElement> {\n const list = this.list as HTMLElement\n return list.getElementsByClassName('option-nested-row').length\n ? list.querySelectorAll<HTMLElement>(NB_OPTION_ROWS)\n : (list.getElementsByTagName('nb-option') as HTMLCollectionOf<HTMLElement>)\n }\n\n // The rows hidden by themselves, or by what they're in: walking up from every row is slow in long lists, so it\n // starts from what hides them.\n protected hiddenRows(): Set<Element> {\n const list = this.list as HTMLElement\n const hidden = new Set<Element>()\n const hiding = [\n ...Array.from(list.getElementsByClassName('filtered')),\n ...Array.from(list.getElementsByClassName('nb-option-collapsed')),\n ...Array.from(list.querySelectorAll('[hidden]'))\n ]\n for (const element of hiding) {\n if (element.tagName === 'NB-OPTION' || element.classList.contains('option-nested-row')) {\n hidden.add(element)\n } else {\n element.querySelectorAll(NB_OPTION_ROWS).forEach((row) => hidden.add(row))\n }\n }\n return hidden\n }\n\n protected isShown(row: HTMLElement): boolean {\n const hiddenBy = row.closest(NB_HIDDEN)\n return !hiddenBy || !(this.list as HTMLElement).contains(hiddenBy)\n }\n\n // The row at an offset from the top of the list.\n protected rowAt(offset: number): number {\n const rows = this.rows\n let low = 0\n let high = rows.length - 1\n while (low < high) {\n const middle = (low + high) >> 1\n if (rows[middle].top + rows[middle].height <= offset) {\n low = middle + 1\n } else {\n high = middle\n }\n }\n return low\n }\n}\n","<ng-content select=\"[nbOptionListHeader]\" />\n<ul class=\"option-list nb-option-list-pending\"\n [attr.role]=\"listRole()\"\n [attr.id]=\"listId()\"\n [attr.aria-multiselectable]=\"multiple() || null\"\n #list>\n <ng-content />\n</ul>\n","import { NgModule } from '@angular/core'\nimport { NbCheckboxModule } from '@liquid-js/lyr-core/checkbox'\nimport { NbOptionComponent } from './option.component'\nimport { NbOptionGroupComponent } from './option-group.component'\nimport { NbOptionNestedComponent } from './option-nested.component'\nimport { NbOptionListComponent } from './option-list.component'\n\nconst NB_OPTION_LIST_COMPONENTS = [\n NbOptionListComponent,\n NbOptionComponent,\n NbOptionGroupComponent,\n NbOptionNestedComponent\n]\n\n@NgModule({\n imports: [NbCheckboxModule, ...NB_OPTION_LIST_COMPONENTS],\n exports: [...NB_OPTION_LIST_COMPONENTS]\n})\nexport class NbOptionModule { }\n","import { InjectionToken, Signal } from '@angular/core'\n\nimport { NbComponentSize } from '@liquid-js/lyr-core/base'\n\n/**\n * The size of the tags in a tag list, which tags placed in it take unless they set their own.\n */\nexport const NB_TAG_LIST_SIZE = new InjectionToken<Signal<NbComponentSize>>('NB_TAG_LIST_SIZE')\n","import {\n Component,\n computed,\n ElementRef,\n inject,\n input,\n linkedSignal,\n OnDestroy,\n output,\n signal\n} from '@angular/core'\nimport { Observable, Subject } from 'rxjs'\n\nimport { injectNbDefaults, NbStatusService, ɵconvertToBoolProperty as convertToBoolProperty, NbBooleanInput, NbComponentOrCustomStatus, NbComponentSize, ɵenableTransitionsAfterRender as enableTransitionsAfterRender, injectNbTexts, NbLocalize, type NbTagAppearance } from '@liquid-js/lyr-core/base'\nimport { ɵNbHighlightableOption as NbHighlightableOption } from '@liquid-js/lyr-core/cdk'\nimport { NbIconComponent } from '@liquid-js/lyr-core/icon'\nimport { NB_TAG_LIST_SIZE } from './tag-list-size'\n\n/** @internal */\ndeclare const $localize: NbLocalize\nexport interface NbTagSelectionChange {\n tag: NbTagComponent\n selected: boolean\n}\n\nlet tagUniqueId = 0\n\n/**\n * A small label with a status, on its own or in an `nb-tag-list`, where it can be selected and removed.\n *\n * With `removable`, the tag shows a cross and emits `remove` when the cross is clicked or Backspace or Delete is\n * pressed on it:\n *\n * @stacked-example(Removable tags, tag/tag-removable.component)\n *\n * The `appearance` is `filled` (default), `outline` or `hero`, the hero button's gradient:\n * @stacked-example(Tag Appearance, tag/tag-appearance.component)\n *\n * The `status` colours it:\n * @stacked-example(Tag Status, tag/tag-status.component)\n * @styles\n *\n * tag-text-font-family:\n * tag-text-transform:\n * tag-border-width:\n * tag-border-style:\n * tag-border-radius:\n * tag-tiny-text-font-size:\n * tag-tiny-text-font-weight:\n * tag-tiny-text-line-height:\n * tag-tiny-padding:\n * tag-tiny-close-offset:\n * tag-small-text-font-size:\n * tag-small-text-font-weight:\n * tag-small-text-line-height:\n * tag-small-padding:\n * tag-small-close-offset:\n * tag-medium-text-font-size:\n * tag-medium-text-font-weight:\n * tag-medium-text-line-height:\n * tag-medium-padding:\n * tag-medium-close-offset:\n * tag-large-text-font-size:\n * tag-large-text-font-weight:\n * tag-large-text-line-height:\n * tag-large-padding:\n * tag-large-close-offset:\n * tag-giant-text-font-size:\n * tag-giant-text-font-weight:\n * tag-giant-text-line-height:\n * tag-giant-padding:\n * tag-giant-close-offset:\n * tag-filled-basic-background-color:\n * tag-filled-basic-border-color:\n * tag-filled-basic-text-color:\n * tag-filled-basic-active-background-color:\n * tag-filled-basic-active-border-color:\n * tag-filled-basic-hover-background-color:\n * tag-filled-basic-hover-border-color:\n * tag-filled-basic-selected-background-color:\n * tag-filled-basic-selected-border-color:\n * tag-filled-primary-background-color:\n * tag-filled-primary-border-color:\n * tag-filled-primary-text-color:\n * tag-filled-primary-active-background-color:\n * tag-filled-primary-active-border-color:\n * tag-filled-primary-hover-background-color:\n * tag-filled-primary-hover-border-color:\n * tag-filled-primary-selected-background-color:\n * tag-filled-primary-selected-border-color:\n * tag-filled-success-background-color:\n * tag-filled-success-border-color:\n * tag-filled-success-text-color:\n * tag-filled-success-active-background-color:\n * tag-filled-success-active-border-color:\n * tag-filled-success-hover-background-color:\n * tag-filled-success-hover-border-color:\n * tag-filled-success-selected-background-color:\n * tag-filled-success-selected-border-color:\n * tag-filled-info-background-color:\n * tag-filled-info-border-color:\n * tag-filled-info-text-color:\n * tag-filled-info-active-background-color:\n * tag-filled-info-active-border-color:\n * tag-filled-info-hover-background-color:\n * tag-filled-info-hover-border-color:\n * tag-filled-info-selected-background-color:\n * tag-filled-info-selected-border-color:\n * tag-filled-warning-background-color:\n * tag-filled-warning-border-color:\n * tag-filled-warning-text-color:\n * tag-filled-warning-active-background-color:\n * tag-filled-warning-active-border-color:\n * tag-filled-warning-hover-background-color:\n * tag-filled-warning-hover-border-color:\n * tag-filled-warning-selected-background-color:\n * tag-filled-warning-selected-border-color:\n * tag-filled-danger-background-color:\n * tag-filled-danger-border-color:\n * tag-filled-danger-text-color:\n * tag-filled-danger-active-background-color:\n * tag-filled-danger-active-border-color:\n * tag-filled-danger-hover-background-color:\n * tag-filled-danger-hover-border-color:\n * tag-filled-danger-selected-background-color:\n * tag-filled-danger-selected-border-color:\n * tag-filled-control-background-color:\n * tag-filled-control-border-color:\n * tag-filled-control-text-color:\n * tag-filled-control-active-background-color:\n * tag-filled-control-active-border-color:\n * tag-filled-control-hover-background-color:\n * tag-filled-control-hover-border-color:\n * tag-filled-control-selected-background-color:\n * tag-filled-control-selected-border-color:\n * tag-outline-basic-background-color:\n * tag-outline-basic-border-color:\n * tag-outline-basic-text-color:\n * tag-outline-basic-active-background-color:\n * tag-outline-basic-active-border-color:\n * tag-outline-basic-active-text-color:\n * tag-outline-basic-hover-background-color:\n * tag-outline-basic-hover-border-color:\n * tag-outline-basic-hover-text-color:\n * tag-outline-basic-selected-background-color:\n * tag-outline-basic-selected-border-color:\n * tag-outline-basic-selected-text-color:\n * tag-outline-primary-background-color:\n * tag-outline-primary-border-color:\n * tag-outline-primary-text-color:\n * tag-outline-primary-active-background-color:\n * tag-outline-primary-active-border-color:\n * tag-outline-primary-active-text-color:\n * tag-outline-primary-hover-background-color:\n * tag-outline-primary-hover-border-color:\n * tag-outline-primary-hover-text-color:\n * tag-outline-primary-selected-background-color:\n * tag-outline-primary-selected-border-color:\n * tag-outline-primary-selected-text-color:\n * tag-outline-success-background-color:\n * tag-outline-success-border-color:\n * tag-outline-success-text-color:\n * tag-outline-success-active-background-color:\n * tag-outline-success-active-border-color:\n * tag-outline-success-active-text-color:\n * tag-outline-success-hover-background-color:\n * tag-outline-success-hover-border-color:\n * tag-outline-success-hover-text-color:\n * tag-outline-success-selected-background-color:\n * tag-outline-success-selected-border-color:\n * tag-outline-success-selected-text-color:\n * tag-outline-info-background-color:\n * tag-outline-info-border-color:\n * tag-outline-info-text-color:\n * tag-outline-info-active-background-color:\n * tag-outline-info-active-border-color:\n * tag-outline-info-active-text-color:\n * tag-outline-info-hover-background-color:\n * tag-outline-info-hover-border-color:\n * tag-outline-info-hover-text-color:\n * tag-outline-info-selected-background-color:\n * tag-outline-info-selected-border-color:\n * tag-outline-info-selected-text-color:\n * tag-outline-warning-background-color:\n * tag-outline-warning-border-color:\n * tag-outline-warning-text-color:\n * tag-outline-warning-active-background-color:\n * tag-outline-warning-active-border-color:\n * tag-outline-warning-active-text-color:\n * tag-outline-warning-hover-background-color:\n * tag-outline-warning-hover-border-color:\n * tag-outline-warning-hover-text-color:\n * tag-outline-warning-selected-background-color:\n * tag-outline-warning-selected-border-color:\n * tag-outline-warning-selected-text-color:\n * tag-outline-danger-background-color:\n * tag-outline-danger-border-color:\n * tag-outline-danger-text-color:\n * tag-outline-danger-active-background-color:\n * tag-outline-danger-active-border-color:\n * tag-outline-danger-active-text-color:\n * tag-outline-danger-hover-background-color:\n * tag-outline-danger-hover-border-color:\n * tag-outline-danger-hover-text-color:\n * tag-outline-danger-selected-background-color:\n * tag-outline-danger-selected-border-color:\n * tag-outline-danger-selected-text-color:\n * tag-outline-control-background-color:\n * tag-outline-control-border-color:\n * tag-outline-control-text-color:\n * tag-outline-control-active-background-color:\n * tag-outline-control-active-border-color:\n * tag-outline-control-active-text-color:\n * tag-outline-control-hover-background-color:\n * tag-outline-control-hover-border-color:\n * tag-outline-control-hover-text-color:\n * tag-outline-control-selected-background-color:\n * tag-outline-control-selected-border-color:\n * tag-outline-control-selected-text-color:\n * tag-hero-text-shadow:\n * tag-hero-basic-text-color:\n * tag-hero-basic-left-background-color:\n * tag-hero-basic-right-background-color:\n * tag-hero-basic-active-left-background-color:\n * tag-hero-basic-active-right-background-color:\n * tag-hero-basic-hover-left-background-color:\n * tag-hero-basic-hover-right-background-color:\n * tag-hero-basic-selected-left-background-color:\n * tag-hero-basic-selected-right-background-color:\n * tag-hero-primary-text-color:\n * tag-hero-primary-left-background-color:\n * tag-hero-primary-right-background-color:\n * tag-hero-primary-active-left-background-color:\n * tag-hero-primary-active-right-background-color:\n * tag-hero-primary-hover-left-background-color:\n * tag-hero-primary-hover-right-background-color:\n * tag-hero-primary-selected-left-background-color:\n * tag-hero-primary-selected-right-background-color:\n * tag-hero-success-text-color:\n * tag-hero-success-left-background-color:\n * tag-hero-success-right-background-color:\n * tag-hero-success-active-left-background-color:\n * tag-hero-success-active-right-background-color:\n * tag-hero-success-hover-left-background-color:\n * tag-hero-success-hover-right-background-color:\n * tag-hero-success-selected-left-background-color:\n * tag-hero-success-selected-right-background-color:\n * tag-hero-info-text-color:\n * tag-hero-info-left-background-color:\n * tag-hero-info-right-background-color:\n * tag-hero-info-active-left-background-color:\n * tag-hero-info-active-right-background-color:\n * tag-hero-info-hover-left-background-color:\n * tag-hero-info-hover-right-background-color:\n * tag-hero-info-selected-left-background-color:\n * tag-hero-info-selected-right-background-color:\n * tag-hero-warning-text-color:\n * tag-hero-warning-left-background-color:\n * tag-hero-warning-right-background-color:\n * tag-hero-warning-active-left-background-color:\n * tag-hero-warning-active-right-background-color:\n * tag-hero-warning-hover-left-background-color:\n * tag-hero-warning-hover-right-background-color:\n * tag-hero-warning-selected-left-background-color:\n * tag-hero-warning-selected-right-background-color:\n * tag-hero-danger-text-color:\n * tag-hero-danger-left-background-color:\n * tag-hero-danger-right-background-color:\n * tag-hero-danger-active-left-background-color:\n * tag-hero-danger-active-right-background-color:\n * tag-hero-danger-hover-left-background-color:\n * tag-hero-danger-hover-right-background-color:\n * tag-hero-danger-selected-left-background-color:\n * tag-hero-danger-selected-right-background-color:\n * tag-hero-control-text-color:\n * tag-hero-control-left-background-color:\n * tag-hero-control-right-background-color:\n * tag-hero-control-active-left-background-color:\n * tag-hero-control-active-right-background-color:\n * tag-hero-control-hover-left-background-color:\n * tag-hero-control-hover-right-background-color:\n * tag-hero-control-selected-left-background-color:\n * tag-hero-control-selected-right-background-color:\n */\n@Component({\n selector: 'nb-tag',\n templateUrl: './tag.component.html',\n exportAs: 'nbTag',\n imports: [NbIconComponent],\n host: {\n '[class]': 'hostClasses()',\n '[class.selected]': 'isSelected()',\n '[attr.aria-selected]': \"role() === 'option' ? isSelected() : null\",\n '[class.active]': '_isActive()',\n '[attr.role]': 'role()',\n '[attr.id]': '_id',\n '(keydown.delete)': '_remove()',\n '(keydown.backspace)': '_remove()'\n }\n})\nexport class NbTagComponent implements OnDestroy, NbHighlightableOption {\n // The app's defaults for this type, which the inputs below start from.\n protected readonly nbDefaults = injectNbDefaults('tag')\n\n readonly _hostElement = inject(ElementRef)\n protected readonly statusService = inject(NbStatusService)\n\n private _destroy$: Subject<NbTagComponent> = new Subject<NbTagComponent>()\n\n get destroy$(): Observable<NbTagComponent> {\n return this._destroy$.asObservable()\n }\n\n /**\n * Tag text.\n */\n readonly text = input<string>()\n\n /**\n * Selects the tag, until a click or its list changes that; see `isSelected`.\n */\n readonly selected = input<boolean, NbBooleanInput>(false, { transform: convertToBoolProperty })\n\n /**\n * Shows a cross and lets the user remove the tag; see `remove`.\n */\n readonly removable = input<boolean, NbBooleanInput>(false, { transform: convertToBoolProperty })\n\n /**\n * Icon of the cross.\n */\n readonly removeIcon = input<string>('close-outline')\n\n /**\n * Pack of the cross's icon.\n */\n readonly removeIconPack = input<string>('essentials')\n\n /**\n * `filled` (default), `outline` or `hero`.\n */\n readonly appearanceInput = input<NbTagAppearance | undefined>(undefined, { alias: 'appearance' })\n /** The appearance in use: the input's, the app's default, or 'filled'. */\n readonly appearance = linkedSignal<NbTagAppearance>(() => this.appearanceInput() ?? this.nbDefaults().appearance ?? 'filled')\n\n /**\n * `basic` (default), `primary`, `info`, `success`, `warning`, `danger`, `control` or a custom status.\n */\n readonly status = input<NbComponentOrCustomStatus>('basic')\n\n /**\n * Tag size: `tiny`, `small`, `medium`, `large`, `giant`. A tag in an `nb-tag-list` takes the list's size unless it\n * sets one; others are `medium`.\n */\n readonly sizeInput = input<NbComponentSize | undefined>(undefined, { alias: 'size' })\n\n protected readonly listSize = inject(NB_TAG_LIST_SIZE, { optional: true })\n // A tag in a tag list is one of its options; one on its own has a remove button the keyboard reaches.\n protected readonly inList = this.listSize !== null\n protected readonly texts = injectNbTexts('tag', () => ({\n remove: (text) => $localize`:@@nb.tag.remove:Remove ${text}:text:`\n }))\n\n /** The tag's size: its own, its list's, or `medium`. */\n readonly size = computed(() => this.sizeInput() ?? this.listSize?.() ?? this.nbDefaults().size ?? 'medium')\n\n /** The tag's role: `option` in a tag list, none on its own. */\n readonly roleInput = input<string | undefined>(undefined, { alias: 'role' })\n readonly role = computed(() => this.roleInput() ?? (this.inList ? 'option' : null))\n\n /**\n * Emits when the user removes a `removable` tag, with its cross or the Backspace or Delete key. The tag stays until\n * the app, or a managed `nb-tag-list`, takes it out.\n */\n readonly remove = output<NbTagComponent>()\n\n readonly selectedChange = output<NbTagSelectionChange>()\n\n /**\n * Whether the tag is selected: the `selected` input, until a user or the tag list changes it.\n */\n readonly isSelected = linkedSignal(() => this.selected())\n\n protected readonly activeState = signal(false)\n readonly _isActive = this.activeState.asReadonly()\n\n readonly _id: string = `nb-tag-${tagUniqueId++}`\n\n protected readonly hostClasses = computed(() => [\n `appearance-${this.appearance()}`,\n this.statusService.getStatusClass(this.status()),\n `size-${this.size()}`\n ])\n\n _remove() {\n if (this.removable()) {\n this.remove.emit(this)\n }\n }\n\n constructor() {\n enableTransitionsAfterRender(this._hostElement.nativeElement)\n }\n\n ngOnDestroy() {\n this._destroy$.next(this)\n }\n\n /**\n * Selects or deselects the tag and emits `selectedChange` when that changes its state.\n */\n setSelected(selected: boolean) {\n if (this.isSelected() !== selected) {\n this.isSelected.set(selected)\n this.selectedChange.emit({ tag: this, selected })\n }\n }\n\n _toggleSelection() {\n this.setSelected(!this.isSelected())\n }\n\n setActiveStyles() {\n this.activeState.set(true)\n }\n\n setInactiveStyles() {\n this.activeState.set(false)\n }\n}\n","<span dir=\"auto\">{{ text() }}</span>\n@if (removable()) {\n@if (inList) {\n<!-- An option's content is presentational: in a list, Backspace or Delete removes the active tag. -->\n<nb-icon (click)=\"_remove()\"\n class=\"nb-tag-remove size-{{ size() }}\"\n [icon]=\"removeIcon()\"\n [pack]=\"removeIconPack()\"\n aria-hidden=\"true\" />\n} @else {\n<button type=\"button\"\n class=\"nb-tag-remove nb-tag-remove-button size-{{ size() }}\"\n tabindex=\"0\"\n [attr.aria-label]=\"texts().remove(text() ?? '')\"\n (click)=\"_remove()\">\n <nb-icon [icon]=\"removeIcon()\"\n [pack]=\"removeIconPack()\" />\n</button>\n}\n}\n","import {\n AfterContentChecked,\n afterRenderEffect,\n AfterViewInit,\n ChangeDetectorRef,\n Component,\n ComponentRef,\n computed,\n contentChild,\n contentChildren,\n DestroyRef,\n effect,\n ElementRef,\n forwardRef,\n inject,\n Injector,\n input,\n linkedSignal,\n numberAttribute,\n OnDestroy,\n output,\n signal,\n untracked,\n viewChild\n} from '@angular/core'\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms'\nimport { takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop'\nimport { BehaviorSubject, EMPTY, merge, Observable } from 'rxjs'\nimport { filter, map, switchMap, take } from 'rxjs/operators'\n\nimport { injectNbDefaults, NbStatusService, ɵisComposing as isComposing, NbComponentSize, NbComponentShape, NbComponentOrCustomStatus, NB_DOCUMENT, NbLayoutDirectionService, ɵconvertToBoolProperty as convertToBoolProperty, NbBooleanInput, ɵNbClassInput as NbClassInput, ɵenableTransitionsAfterRender as enableTransitionsAfterRender, injectNbTexts, NbLocalize, type NbSelectAppearance } from '@liquid-js/lyr-core/base'\nimport { NbAdjustableConnectedPositionStrategy, NbAdjustment, NbPosition, NbPositionBuilderService, NbOverlayRef, NbPortalDirective, NbScrollStrategy, NbOverlayService, NbTrigger, NbTriggerStrategy, NbTriggerStrategyBuilderService, NbFocusKeyManager, NbFocusKeyManagerFactoryService, ɵNbActiveDescendantKeyManager as NbActiveDescendantKeyManager, ɵNbActiveDescendantKeyManagerFactoryService as NbActiveDescendantKeyManagerFactoryService, NbFocusMonitor, NbScrollStrategies } from '@liquid-js/lyr-core/cdk'\nimport { NbInputDirective } from '@liquid-js/lyr-core/input'\nimport { NbValidationDirective } from '@liquid-js/lyr-core/validation'\nimport { NbFormFieldControl, NbFormFieldControlConfig } from '@liquid-js/lyr-core/form-field'\nimport { NbIconComponent } from '@liquid-js/lyr-core/icon'\nimport { NbOptionListComponent } from '../option/option-list.component'\nimport { NbTagComponent } from '../tag/tag.component'\nimport { NB_OPTION_LIST_ITEM, NbOptionListItem } from '../option/option-list-item'\nimport { NbOptionGroupComponent } from '../option/option-group.component'\nimport { NbOptionNestedComponent } from '../option/option-nested.component'\nimport { NbOptionComponent } from '../option/option.component'\nimport { NB_SELECT_INJECTION_TOKEN } from './select-injection-tokens'\n\n/** @internal */\ndeclare const $localize: NbLocalize\n\nlet lastSelectId = 0\n\n// Case and accents don't count when searching, so \"creme\" finds \"Crème\".\nconst normalizeSearchText = (text: string) =>\n text.normalize('NFD').replace(/\\p{Diacritic}/gu, '').toLocaleLowerCase().trim()\n\n/**\n * Matches options whose text contains the query, ignoring case and accents.\n */\nexport function nbSelectSearchFn<T>(option: NbOptionComponent<T>, query: string): boolean {\n return normalizeSearchText(option.content ?? '').includes(normalizeSearchText(query))\n}\n\n// An option or nested option, of any value type, by where it is in the tree.\ntype NbNestedItem = Pick<NbOptionComponent | NbOptionNestedComponent, 'depth' | 'parentNested'>\n\nexport type NbSelectCompareFunction<T = unknown> = (v1: T, v2: T) => boolean\n\n/**\n * Whether a select's `multiple` isn't given. Angular's template type checker doesn't apply a type parameter's default:\n * without a `multiple` binding it infers `M` as its whole constraint (or `any`), which no binding gives.\n */\ntype NbSelectMultipleUnset<M> = 0 extends 1 & M ? true : [NbBooleanInput] extends [M] ? true : false\n\n/**\n * What a select gives in `selectedChange`, for options of value `T` and a `multiple` of `M`: one value, or `null` when\n * nothing is selected; with `multiple` (`true`, `''` or `'true'`), all selected values. A `multiple` bound to a\n * `boolean` that may be either gives either.\n */\nexport type NbSelectValue<T, M extends NbBooleanInput = NbBooleanInput> =\n NbSelectMultipleUnset<M> extends true ? T | null : M extends true | '' | 'true' ? T[] : T | null\n\n@Component({\n selector: 'nb-select-label',\n template: '<ng-content />'\n})\nexport class NbSelectLabelComponent {}\n\nexport function nbSelectFormFieldControlConfigFactory() {\n const config = new NbFormFieldControlConfig()\n config.supportsSuffix = false\n return config\n}\n\n/**\n * A dropdown that selects one of its `nb-option`s, or several with `multiple`.\n *\n * @stacked-example(Showcase, select/select-showcase.component)\n *\n * ### Installation\n *\n * Import `NbSelectComponent`, `NbOptionComponent` into your standalone component:\n * ```ts\n * @Component({\n * imports: [NbSelectComponent, NbOptionComponent],\n * })\n * export class PageComponent { }\n * ```\n *\n * With NgModules:\n *\n * Import `NbSelectModule` to your feature module.\n * ```ts\n * @NgModule({\n * imports: [\n * // ...\n * NbSelectModule,\n * ],\n * })\n * export class PageModule { }\n * ```\n * ### Usage\n *\n * Marked `multiple`, the select works with arrays only: it accepts and emits arrays.\n *\n * Templates know which: `selectedChange` gives `T | null` for a single select and `T[]` for one marked `multiple`\n * (or `[multiple]=\"true\"`), where `T` is the options' value type, so a handler can take exactly that. A `multiple`\n * bound to a `boolean` that may be either gives either. See `NbSelectValue`.\n * @stacked-example(Multiple, select/select-multiple.component)\n *\n * With `chips`, a multiple select shows its selected options as tags. The select keeps its background under the\n * pointer while it shows them, as a tag list with an input does, so the tags stay apart from the field:\n * @stacked-example(Chips, select/select-chips.component)\n *\n * With `searchable`, the open list has a search input that filters the options by their text, ignoring case and\n * accents; `searchFn` changes how options match. Focus stays in the input, and the arrow keys, Home, End and Enter\n * work the list:\n * @stacked-example(Search, select/select-search.component)\n *\n * In a multiple select, `<nb-option selectAll>` selects all enabled options (the ones a search shows), or clears them\n * when they're all selected; its checkbox shows when only some are. `maxSelections` caps how many options the user can\n * select, disabling the rest until one is deselected:\n * @stacked-example(Select all and limits, select/select-all.component)\n *\n * Long lists stay fast: with 100 or more options shown, the list lays out only the ones near its view, and the rest\n * keep their place in the scroll. Options are still written as usual, e.g. with `@for`, can differ in height, and work\n * with search, the keyboard and assistive technology; this applies to every list of `nb-option`s, including\n * autocomplete.\n *\n * An option without a value clears the selection, as writing `null` or `undefined` does.\n * @stacked-example(Clean selection, select/select-clean.component)\n *\n * With `nullable`, `null` is a value like any other: an option with a `null` value, e.g. \"Auto\", is selected and shown\n * when the value is `null`, and only options without a value clear the selection.\n * @stacked-example(Nullable, select/select-nullable.component)\n *\n * The `ghost` appearance shows no background or border until the select is hovered, focused or open:\n * @stacked-example(Ghost, input/input-ghost.component)\n *\n * The selection can be bound with the `selected` input:\n *\n * ```html\n * <nb-select [(selected)]=\"selected\"></nb-select>\n * ```\n *\n * or with a form control or `ngModel`:\n * @stacked-example(Select form binding, select/select-form.component)\n *\n * `nb-option-group` groups options under a title:\n * @stacked-example(Grouping, select/select-groups.component)\n *\n * `nb-option-nested` puts options in a row that opens like a tree, as deep as needed; only options are selected, not\n * the nested options. The list shows up to `nestedLevels` levels at once (3 by default), and drills into deeper ones,\n * with a row to go back. The arrow keys move through the tree, Enter and Space open and close a row, and a search\n * shows the matching options with the nested options they're in:\n * @stacked-example(Nested options, select/select-nested.component)\n *\n * A `placeholder` shows while nothing is selected:\n * @stacked-example(Placeholder, select/select-placeholder.component)\n *\n * The select, single options and whole groups can be disabled:\n * @stacked-example(Disabled select, select/select-disabled.component)\n *\n * An `nb-select-label` in the content replaces the selected options' text while something is selected:\n * @stacked-example(Custom label, select/select-label.component)\n *\n * The `status` colours the select; it's `basic` by default:\n * @stacked-example(Select statuses, select/select-status.component)\n *\n * There are five sizes, `medium` by default:\n * @stacked-example(Select sizes, select/select-sizes.component)\n *\n * Besides `outline`, the `appearance` can be `filled`:\n * @stacked-example(Filled select, select/select-filled.component)\n *\n * and `hero`:\n * @stacked-example(Select colors, select/select-hero.component)\n *\n * The `shape` combines with the other properties:\n * @stacked-example(Select shapes, select/select-shapes.component)\n *\n * Options match the value by strict equality (`===`); `compareWith` changes how they match:\n * @stacked-example(Select custom comparator, select/select-compare-with.component)\n *\n * An `nb-form-field` adds an icon to the select:\n * @stacked-example(Select with icon, select/select-icon.component)\n * @additional-example(Interactive, select/select-interactive.component)\n * @styles\n *\n * select-cursor:\n * select-disabled-cursor:\n * select-ghost-background-color:\n * select-ghost-border-color:\n * select-tiny-width:\n * select-tiny-chips-margin:\n * select-small-width:\n * select-small-chips-margin:\n * select-medium-width:\n * select-medium-chips-margin:\n * select-large-width:\n * select-large-chips-margin:\n * select-giant-width:\n * select-giant-chips-margin:\n * select-icon-offset:\n * select-text-font-family:\n * select-placeholder-text-font-family:\n * select-tiny-text-font-size:\n * select-tiny-text-font-weight:\n * select-tiny-text-line-height:\n * select-tiny-placeholder-text-font-size:\n * select-tiny-placeholder-text-font-weight:\n * select-tiny-max-width:\n * select-small-text-font-size:\n * select-small-text-font-weight:\n * select-small-text-line-height:\n * select-small-placeholder-text-font-size:\n * select-small-placeholder-text-font-weight:\n * select-small-max-width:\n * select-medium-text-font-size:\n * select-medium-text-font-weight:\n * select-medium-text-line-height:\n * select-medium-placeholder-text-font-size:\n * select-medium-placeholder-text-font-weight:\n * select-medium-max-width:\n * select-large-text-font-size:\n * select-large-text-font-weight:\n * select-large-text-line-height:\n * select-large-placeholder-text-font-size:\n * select-large-placeholder-text-font-weight:\n * select-large-max-width:\n * select-giant-text-font-size:\n * select-giant-text-font-weight:\n * select-giant-text-line-height:\n * select-giant-placeholder-text-font-size:\n * select-giant-placeholder-text-font-weight:\n * select-giant-max-width:\n * select-rectangle-border-radius:\n * select-semi-round-border-radius:\n * select-round-border-radius:\n * select-outline-border-style:\n * select-outline-border-width:\n * select-outline-tiny-padding:\n * select-outline-small-padding:\n * select-outline-medium-padding:\n * select-outline-large-padding:\n * select-outline-giant-padding:\n * select-outline-basic-icon-color:\n * select-outline-basic-text-color:\n * select-outline-basic-placeholder-text-color:\n * select-outline-basic-background-color:\n * select-outline-basic-border-color:\n * select-outline-basic-focus-background-color:\n * select-outline-basic-focus-and-hover-background-color:\n * select-outline-basic-focus-and-hover-border-color:\n * select-outline-basic-focus-border-color:\n * select-outline-basic-hover-background-color:\n * select-outline-basic-hover-border-color:\n * select-outline-basic-disabled-background-color:\n * select-outline-basic-disabled-border-color:\n * select-outline-basic-disabled-icon-color:\n * select-outline-basic-disabled-text-color:\n * select-outline-primary-icon-color:\n * select-outline-primary-text-color:\n * select-outline-primary-placeholder-text-color:\n * select-outline-primary-background-color:\n * select-outline-primary-border-color:\n * select-outline-primary-focus-background-color:\n * select-outline-primary-focus-and-hover-background-color:\n * select-outline-primary-focus-and-hover-border-color:\n * select-outline-primary-focus-border-color:\n * select-outline-primary-hover-background-color:\n * select-outline-primary-hover-border-color:\n * select-outline-primary-disabled-background-color:\n * select-outline-primary-disabled-border-color:\n * select-outline-primary-disabled-icon-color:\n * select-outline-primary-disabled-text-color:\n * select-outline-success-icon-color:\n * select-outline-success-text-color:\n * select-outline-success-placeholder-text-color:\n * select-outline-success-background-color:\n * select-outline-success-border-color:\n * select-outline-success-focus-background-color:\n * select-outline-success-focus-and-hover-background-color:\n * select-outline-success-focus-and-hover-border-color:\n * select-outline-success-focus-border-color:\n * select-outline-success-hover-background-color:\n * select-outline-success-hover-border-color:\n * select-outline-success-disabled-background-color:\n * select-outline-success-disabled-border-color:\n * select-outline-success-disabled-icon-color:\n * select-outline-success-disabled-text-color:\n * select-outline-info-icon-color:\n * select-outline-info-text-color:\n * select-outline-info-placeholder-text-color:\n * select-outline-info-background-color:\n * select-outline-info-border-color:\n * select-outline-info-focus-background-color:\n * select-outline-info-focus-and-hover-background-color:\n * select-outline-info-focus-and-hover-border-color:\n * select-outline-info-focus-border-color:\n * select-outline-info-hover-background-color:\n * select-outline-info-hover-border-color:\n * select-outline-info-disabled-background-color:\n * select-outline-info-disabled-border-color:\n * select-outline-info-disabled-icon-color:\n * select-outline-info-disabled-text-color:\n * select-outline-warning-icon-color:\n * select-outline-warning-text-color:\n * select-outline-warning-placeholder-text-color:\n * select-outline-warning-background-color:\n * select-outline-warning-border-color:\n * select-outline-warning-focus-background-color:\n * select-outline-warning-focus-and-hover-background-color:\n * select-outline-warning-focus-and-hover-border-color:\n * select-outline-warning-focus-border-color:\n * select-outline-warning-hover-background-color:\n * select-outline-warning-hover-border-color:\n * select-outline-warning-disabled-background-color:\n * select-outline-warning-disabled-border-color:\n * select-outline-warning-disabled-icon-color:\n * select-outline-warning-disabled-text-color:\n * select-outline-danger-icon-color:\n * select-outline-danger-text-color:\n * select-outline-danger-placeholder-text-color:\n * select-outline-danger-background-color:\n * select-outline-danger-border-color:\n * select-outline-danger-focus-background-color:\n * select-outline-danger-focus-and-hover-background-color:\n * select-outline-danger-focus-and-hover-border-color:\n * select-outline-danger-focus-border-color:\n * select-outline-danger-hover-background-color:\n * select-outline-danger-hover-border-color:\n * select-outline-danger-disabled-background-color:\n * select-outline-danger-disabled-border-color:\n * select-outline-danger-disabled-icon-color:\n * select-outline-danger-disabled-text-color:\n * select-outline-control-icon-color:\n * select-outline-control-text-color:\n * select-outline-control-placeholder-text-color:\n * select-outline-control-background-color:\n * select-outline-control-border-color:\n * select-outline-control-focus-background-color:\n * select-outline-control-focus-and-hover-background-color:\n * select-outline-control-focus-and-hover-border-color:\n * select-outline-control-focus-border-color:\n * select-outline-control-hover-background-color:\n * select-outline-control-hover-border-color:\n * select-outline-control-disabled-background-color:\n * select-outline-control-disabled-border-color:\n * select-outline-control-disabled-icon-color:\n * select-outline-control-disabled-text-color:\n * select-outline-adjacent-border-style:\n * select-outline-adjacent-border-width:\n * select-outline-basic-open-border-color:\n * select-outline-basic-adjacent-border-color:\n * select-outline-primary-open-border-color:\n * select-outline-primary-adjacent-border-color:\n * select-outline-success-open-border-color:\n * select-outline-success-adjacent-border-color:\n * select-outline-info-open-border-color:\n * select-outline-info-adjacent-border-color:\n * select-outline-warning-open-border-color:\n * select-outline-warning-adjacent-border-color:\n * select-outline-danger-open-border-color:\n * select-outline-danger-adjacent-border-color:\n * select-outline-control-open-border-color:\n * select-outline-control-adjacent-border-color:\n * select-filled-border-style:\n * select-filled-border-width:\n * select-filled-tiny-padding:\n * select-filled-small-padding:\n * select-filled-medium-padding:\n * select-filled-large-padding:\n * select-filled-giant-padding:\n * select-filled-basic-background-color:\n * select-filled-basic-border-color:\n * select-filled-basic-icon-color:\n * select-filled-basic-text-color:\n * select-filled-basic-placeholder-text-color:\n * select-filled-basic-focus-background-color:\n * select-filled-basic-focus-and-hover-background-color:\n * select-filled-basic-focus-and-hover-border-color:\n * select-filled-basic-focus-border-color:\n * select-filled-basic-hover-background-color:\n * select-filled-basic-hover-border-color:\n * select-filled-basic-disabled-background-color:\n * select-filled-basic-disabled-border-color:\n * select-filled-basic-disabled-icon-color:\n * select-filled-basic-disabled-text-color:\n * select-filled-primary-background-color:\n * select-filled-primary-border-color:\n * select-filled-primary-icon-color:\n * select-filled-primary-text-color:\n * select-filled-primary-placeholder-text-color:\n * select-filled-primary-focus-background-color:\n * select-filled-primary-focus-and-hover-background-color:\n * select-filled-primary-focus-and-hover-border-color:\n * select-filled-primary-focus-border-color:\n * select-filled-primary-hover-background-color:\n * select-filled-primary-hover-border-color:\n * select-filled-primary-disabled-background-color:\n * select-filled-primary-disabled-border-color:\n * select-filled-primary-disabled-icon-color:\n * select-filled-primary-disabled-text-color:\n * select-filled-success-background-color:\n * select-filled-success-border-color:\n * select-filled-success-icon-color:\n * select-filled-success-text-color:\n * select-filled-success-placeholder-text-color:\n * select-filled-success-focus-background-color:\n * select-filled-success-focus-and-hover-background-color:\n * select-filled-success-focus-and-hover-border-color:\n * select-filled-success-focus-border-color:\n * select-filled-success-hover-background-color:\n * select-filled-success-hover-border-color:\n * select-filled-success-disabled-background-color:\n * select-filled-success-disabled-border-color:\n * select-filled-success-disabled-icon-color:\n * select-filled-success-disabled-text-color:\n * select-filled-info-background-color:\n * select-filled-info-border-color:\n * select-filled-info-icon-color:\n * select-filled-info-text-color:\n * select-filled-info-placeholder-text-color:\n * select-filled-info-focus-background-color:\n * select-filled-info-focus-and-hover-background-color:\n * select-filled-info-focus-and-hover-border-color:\n * select-filled-info-focus-border-color:\n * select-filled-info-hover-background-color:\n * select-filled-info-hover-border-color:\n * select-filled-info-disabled-background-color:\n * select-filled-info-disabled-border-color:\n * select-filled-info-disabled-icon-color:\n * select-filled-info-disabled-text-color:\n * select-filled-warning-background-color:\n * select-filled-warning-border-color:\n * select-filled-warning-icon-color:\n * select-filled-warning-text-color:\n * select-filled-warning-placeholder-text-color:\n * select-filled-warning-focus-background-color:\n * select-filled-warning-focus-and-hover-background-color:\n * select-filled-warning-focus-and-hover-border-color:\n * select-filled-warning-focus-border-color:\n * select-filled-warning-hover-background-color:\n * select-filled-warning-hover-border-color:\n * select-filled-warning-disabled-background-color:\n * select-filled-warning-disabled-border-color:\n * select-filled-warning-disabled-icon-color:\n * select-filled-warning-disabled-text-color:\n * select-filled-danger-background-color:\n * select-filled-danger-border-color:\n * select-filled-danger-icon-color:\n * select-filled-danger-text-color:\n * select-filled-danger-placeholder-text-color:\n * select-filled-danger-focus-background-color:\n * select-filled-danger-focus-and-hover-background-color:\n * select-filled-danger-focus-and-hover-border-color:\n * select-filled-danger-focus-border-color:\n * select-filled-danger-hover-background-color:\n * select-filled-danger-hover-border-color:\n * select-filled-danger-disabled-background-color:\n * select-filled-danger-disabled-border-color:\n * select-filled-danger-disabled-icon-color:\n * select-filled-danger-disabled-text-color:\n * select-filled-control-background-color:\n * select-filled-control-border-color:\n * select-filled-control-icon-color:\n * select-filled-control-text-color:\n * select-filled-control-placeholder-text-color:\n * select-filled-control-focus-background-color:\n * select-filled-control-focus-and-hover-background-color:\n * select-filled-control-focus-and-hover-border-color:\n * select-filled-control-focus-border-color:\n * select-filled-control-hover-background-color:\n * select-filled-control-hover-border-color:\n * select-filled-control-disabled-background-color:\n * select-filled-control-disabled-border-color:\n * select-filled-control-disabled-icon-color:\n * select-filled-control-disabled-text-color:\n * select-hero-tiny-padding:\n * select-hero-small-padding:\n * select-hero-medium-padding:\n * select-hero-large-padding:\n * select-hero-giant-padding:\n * select-hero-basic-left-background-color:\n * select-hero-basic-right-background-color:\n * select-hero-basic-icon-color:\n * select-hero-basic-text-color:\n * select-hero-basic-placeholder-text-color:\n * select-hero-basic-focus-left-background-color:\n * select-hero-basic-focus-right-background-color:\n * select-hero-basic-focus-and-hover-left-background-color:\n * select-hero-basic-focus-and-hover-right-background-color:\n * select-hero-basic-hover-left-background-color:\n * select-hero-basic-hover-right-background-color:\n * select-hero-basic-disabled-background-color:\n * select-hero-basic-disabled-icon-color:\n * select-hero-basic-disabled-text-color:\n * select-hero-primary-left-background-color:\n * select-hero-primary-right-background-color:\n * select-hero-primary-icon-color:\n * select-hero-primary-text-color:\n * select-hero-primary-placeholder-text-color:\n * select-hero-primary-focus-left-background-color:\n * select-hero-primary-focus-right-background-color:\n * select-hero-primary-focus-and-hover-left-background-color:\n * select-hero-primary-focus-and-hover-right-background-color:\n * select-hero-primary-hover-left-background-color:\n * select-hero-primary-hover-right-background-color:\n * select-hero-primary-disabled-background-color:\n * select-hero-primary-disabled-icon-color:\n * select-hero-primary-disabled-text-color:\n * select-hero-success-left-background-color:\n * select-hero-success-right-background-color:\n * select-hero-success-icon-color:\n * select-hero-success-text-color:\n * select-hero-success-placeholder-text-color:\n * select-hero-success-focus-left-background-color:\n * select-hero-success-focus-right-background-color:\n * select-hero-success-focus-and-hover-left-background-color:\n * select-hero-success-focus-and-hover-right-background-color:\n * select-hero-success-hover-left-background-color:\n * select-hero-success-hover-right-background-color:\n * select-hero-success-disabled-background-color:\n * select-hero-success-disabled-icon-color:\n * select-hero-success-disabled-text-color:\n * select-hero-info-left-background-color:\n * select-hero-info-right-background-color:\n * select-hero-info-icon-color:\n * select-hero-info-text-color:\n * select-hero-info-placeholder-text-color:\n * select-hero-info-focus-left-background-color:\n * select-hero-info-focus-right-background-color:\n * select-hero-info-focus-and-hover-left-background-color:\n * select-hero-info-focus-and-hover-right-background-color:\n * select-hero-info-hover-left-background-color:\n * select-hero-info-hover-right-background-color:\n * select-hero-info-disabled-background-color:\n * select-hero-info-disabled-icon-color:\n * select-hero-info-disabled-text-color:\n * select-hero-warning-left-background-color:\n * select-hero-warning-right-background-color:\n * select-hero-warning-icon-color:\n * select-hero-warning-text-color:\n * select-hero-warning-placeholder-text-color:\n * select-hero-warning-focus-left-background-color:\n * select-hero-warning-focus-right-background-color:\n * select-hero-warning-focus-and-hover-left-background-color:\n * select-hero-warning-focus-and-hover-right-background-color:\n * select-hero-warning-hover-left-background-color:\n * select-hero-warning-hover-right-background-color:\n * select-hero-warning-disabled-background-color:\n * select-hero-warning-disabled-icon-color:\n * select-hero-warning-disabled-text-color:\n * select-hero-danger-left-background-color:\n * select-hero-danger-right-background-color:\n * select-hero-danger-icon-color:\n * select-hero-danger-text-color:\n * select-hero-danger-placeholder-text-color:\n * select-hero-danger-focus-left-background-color:\n * select-hero-danger-focus-right-background-color:\n * select-hero-danger-focus-and-hover-left-background-color:\n * select-hero-danger-focus-and-hover-right-background-color:\n * select-hero-danger-hover-left-background-color:\n * select-hero-danger-hover-right-background-color:\n * select-hero-danger-disabled-background-color:\n * select-hero-danger-disabled-icon-color:\n * select-hero-danger-disabled-text-color:\n * select-hero-control-left-background-color:\n * select-hero-control-right-background-color:\n * select-hero-control-icon-color:\n * select-hero-control-text-color:\n * select-hero-control-placeholder-text-color:\n * select-hero-control-focus-left-background-color:\n * select-hero-control-focus-right-background-color:\n * select-hero-control-focus-and-hover-left-background-color:\n * select-hero-control-focus-and-hover-right-background-color:\n * select-hero-control-hover-left-background-color:\n * select-hero-control-hover-right-background-color:\n * select-hero-control-disabled-background-color:\n * select-hero-control-disabled-icon-color:\n * select-hero-control-disabled-text-color:\n * */\n@Component({\n selector: 'nb-select',\n templateUrl: './select.component.html',\n styleUrls: ['./select.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => NbSelectComponent),\n multi: true\n },\n { provide: NB_SELECT_INJECTION_TOKEN, useExisting: NbSelectComponent },\n { provide: NbFormFieldControl, useExisting: NbSelectComponent },\n { provide: NbFormFieldControlConfig, useFactory: nbSelectFormFieldControlConfigFactory }\n ],\n imports: [NbIconComponent, NbPortalDirective, NbOptionListComponent, NbTagComponent, NbInputDirective],\n host: {\n '[class]': 'hostClasses()',\n '[class.full-width]': 'fullWidth()',\n '[class.open]': 'isOpen()',\n // The label goes to the button, which is what screen readers focus.\n '[attr.aria-labelledby]': 'null'\n }\n})\n// `M` defaults to a mode that isn't known, as a query gives it: typed as a single select, as an unset `multiple` is.\n// Code that holds a multiple select names it, e.g. `NbSelectComponent<City, true>`.\nexport class NbSelectComponent<T = unknown, M extends NbBooleanInput = NbBooleanInput>\nimplements AfterViewInit, AfterContentChecked, OnDestroy, ControlValueAccessor, NbFormFieldControl {\n // The app's defaults for this type, which the inputs below start from.\n protected readonly nbDefaults = injectNbDefaults('select')\n\n protected readonly document = inject(NB_DOCUMENT)\n protected readonly overlay = inject(NbOverlayService)\n protected readonly hostRef = inject<ElementRef<HTMLElement>>(ElementRef)\n protected readonly positionBuilder = inject(NbPositionBuilderService)\n protected readonly triggerStrategyBuilder = inject(NbTriggerStrategyBuilderService)\n protected readonly cd = inject(ChangeDetectorRef)\n protected readonly focusKeyManagerFactoryService = inject<NbFocusKeyManagerFactoryService<NbOptionComponent<T>>>(\n NbFocusKeyManagerFactoryService\n )\n protected readonly focusMonitor = inject(NbFocusMonitor)\n protected readonly statusService = inject(NbStatusService)\n protected readonly injector = inject(Injector)\n protected readonly destroyRef = inject(DestroyRef)\n\n /**\n * `tiny`, `small`, `medium` (default), `large` or `giant`.\n */\n readonly sizeInput = input<NbComponentSize | undefined>(undefined, { alias: 'size' })\n /** The size in use: the input's, the app's default, or 'medium'. */\n readonly size = linkedSignal<NbComponentSize>(() => this.sizeInput() ?? this.nbDefaults().size ?? 'medium')\n\n protected readonly validation = inject(NbValidationDirective, { self: true, optional: true })\n\n /**\n * `basic` (default), `primary`, `info`, `success`, `warning`, `danger`, `control` or a custom status. With\n * `nbValidation`, the status it gives takes over while the control shows errors or success.\n */\n readonly status = input<NbComponentOrCustomStatus>('basic')\n\n // With `nbValidation`, the status it gives while the control shows errors or success.\n protected readonly resolvedStatus = computed(() => this.validation?.status() ?? this.status())\n\n /**\n * `rectangle` (default), `round` or `semi-round`.\n */\n readonly shapeInput = input<NbComponentShape | undefined>(undefined, { alias: 'shape' })\n /** The shape in use: the input's, the app's default, or 'rectangle'. */\n readonly shape = linkedSignal<NbComponentShape>(() => this.shapeInput() ?? this.nbDefaults().shape ?? 'rectangle')\n\n /**\n * `outline` (default), `filled`, `hero` or `ghost` (no background or border at rest; like `outline` under the\n * pointer, with focus, and open). The `outline`, `filled`, `hero` and `ghost` attributes override it.\n */\n readonly appearanceInput = input<NbSelectAppearance | undefined>(undefined, { alias: 'appearance' })\n /** The appearance in use: the input's, the app's default, or 'outline'. */\n readonly appearance = linkedSignal<NbSelectAppearance>(() => this.appearanceInput() ?? this.nbDefaults().appearance ?? 'outline')\n\n /**\n * Class of the options list (`nb-option-list`).\n */\n readonly optionsListClass = input<NbClassInput>()\n\n /**\n * Class of the overlay pane the options open in.\n */\n readonly optionsPanelClass = input<string | string[]>()\n\n /**\n * Tab index of the select button.\n */\n readonly tabIndex = input<number, unknown>(0, { transform: numberAttribute })\n\n /**\n * Width of the options list in pixels; the select's width by default.\n */\n readonly optionsWidth = input<number>()\n\n /**\n * `appearance=\"outline\"` as an attribute.\n */\n readonly outline = input<boolean, NbBooleanInput>(false, { transform: convertToBoolProperty })\n\n /**\n * `appearance=\"filled\"` as an attribute.\n */\n readonly filled = input<boolean, NbBooleanInput>(false, { transform: convertToBoolProperty })\n\n /**\n * `appearance=\"hero\"` as an attribute.\n */\n readonly hero = input<boolean, NbBooleanInput>(false, { transform: convertToBoolProperty })\n\n /**\n * `appearance=\"ghost\"` as an attribute.\n */\n readonly ghost = input<boolean, NbBooleanInput>(false, { transform: convertToBoolProperty })\n\n /**\n * Disables the select, until a form sets its disabled state; see `isDisabled`.\n */\n readonly disabled = input<boolean, NbBooleanInput>(false, { transform: convertToBoolProperty })\n\n /**\n * Stretches the select to its container's width.\n */\n readonly fullWidth = input<boolean, NbBooleanInput>(false, { transform: convertToBoolProperty })\n\n /**\n * Text shown while nothing is selected.\n */\n readonly placeholder = input<string>('')\n\n /**\n * Id of the element that labels the select, e.g. a `<label>` next to it. Screen readers announce the label and then\n * the selected value.\n * Bind it as `[aria-labelledby]` (or set it as a plain attribute); `[attr.aria-labelledby]` bypasses the select.\n */\n readonly ariaLabelledBy = input<string>(undefined, { alias: 'aria-labelledby' })\n\n protected readonly buttonId = `nb-select-button-${lastSelectId++}`\n protected readonly listId = `${this.buttonId}-list`\n protected readonly buttonLabelledBy = computed(() => {\n // Its own label and an `nbLabel` of its `nbValidation`, then the selected value.\n const labelledBy = [this.ariaLabelledBy(), this.validation?.labelledBy()].filter(Boolean).join(' ')\n return labelledBy ? `${labelledBy} ${this.buttonId}` : null\n })\n\n /**\n * Compares an option's value with the select's; strict equality (`===`) by default. `null` and `undefined` never\n * reach it: they only match themselves.\n */\n readonly compareWith = input<NbSelectCompareFunction<T>>()\n\n /**\n * The selected value, or the selected values of a multiple select. It's written like a form value: a value whose\n * options aren't rendered yet is kept until they are.\n *\n * It's typed as either in any mode, so that the options' value type `T` is the item's: `City` for\n * `[selected]=\"city\"` and for `[selected]=\"cities\"` alike.\n */\n readonly selected = input<T | T[] | null>()\n\n /**\n * Lets several options be selected; the value is then an array, and the list stays open as options are picked.\n * Its type `M` sets the type of `selectedChange`; see `NbSelectValue`.\n */\n readonly multiple = input<boolean, M>(false, { transform: convertToBoolProperty })\n\n /**\n * Treats `null` as a value: an option with a `null` value is selected and shown like any other, e.g. \"Auto\" or\n * \"None\". Without it, `null` clears the selection and shows the placeholder. Options without a value (`undefined`)\n * clear the selection either way.\n */\n readonly nullable = input<boolean, NbBooleanInput>(false, { transform: convertToBoolProperty })\n\n /**\n * In a multiple select, shows the selected options as tags instead of a comma-separated list.\n */\n readonly chips = input<boolean, NbBooleanInput>(false, { transform: convertToBoolProperty })\n\n /**\n * In a multiple select, the most options the user can select; once reached, the others are disabled until one is\n * deselected. A value written with more is kept as it is.\n */\n readonly maxSelections = input<number>()\n\n /**\n * Whether a multiple select has as many options selected as `maxSelections` allows.\n */\n readonly isLimitReached = computed(() => {\n const max = this.maxSelections()\n return this.multiple() && max !== undefined && this.selectionModel().length >= max\n })\n\n /**\n * Adds a search input at the top of the open list that filters the options by their text. Focus stays in the\n * input; the arrow keys, Home and End move through the matching options and Enter selects one.\n */\n readonly searchable = input<boolean, NbBooleanInput>(false, { transform: convertToBoolProperty })\n\n /**\n * Decides whether an option matches the search query; by default its text contains it, ignoring case and accents.\n */\n readonly searchFn = input<(option: NbOptionComponent<T>, query: string) => boolean>(nbSelectSearchFn)\n\n protected readonly texts = injectNbTexts('select', () => ({\n search: $localize`:@@nb.select.search:Search`,\n noMatches: $localize`:@@nb.select.noMatches:No matches`,\n back: (title) => $localize`:@@nb.select.back:Back to ${title}:title:`\n }))\n protected readonly searchKeyManagerFactory = inject(\n NbActiveDescendantKeyManagerFactoryService\n ) as NbActiveDescendantKeyManagerFactoryService<NbOptionListItem>\n protected readonly itemKeyManagerFactory = inject(\n NbFocusKeyManagerFactoryService\n ) as NbFocusKeyManagerFactoryService<NbOptionListItem>\n protected readonly query = signal('')\n protected readonly searchInput = viewChild<ElementRef<HTMLInputElement>>('searchInput')\n protected readonly activeOptionId = signal<string | undefined>(undefined)\n // Moves the active option without taking focus from the search input.\n protected searchKeyManager?: NbActiveDescendantKeyManager<NbOptionListItem>\n\n // Tags one size smaller than the select fit in its line, so a row of them doesn't make it taller.\n protected readonly chipSize = computed<NbComponentSize>(() => {\n const sizes: NbComponentSize[] = ['tiny', 'tiny', 'small', 'medium', 'large']\n return sizes[['tiny', 'small', 'medium', 'large', 'giant'].indexOf(this.size())] ?? 'small'\n })\n\n /**\n * The options' distance from the select, in pixels.\n */\n readonly overlayOffset = input(8)\n\n /**\n * What scrolling the page does while the options are open: `block` (default) prevents it, `close` closes them,\n * `reposition` moves them along, and `noop` nothing.\n */\n readonly scrollStrategy = input<NbScrollStrategies>('block')\n\n /**\n * Emits when the user changes the selection, not when a value is written: the selected option's value (or `null`),\n * or with `multiple`, the values of all selected options. See `NbSelectValue`.\n */\n readonly selectedChange = output<NbSelectValue<T, M>>()\n\n /**\n * The options passed as content, at any depth.\n */\n // The options of a select carry values of the select's type.\n readonly options = contentChildren<NbOptionComponent<T>>(NbOptionComponent, { descendants: true })\n\n /**\n * The nested options passed as content.\n */\n readonly nestedOptions = contentChildren(NbOptionNestedComponent, { descendants: true })\n\n // The options and nested options, in the order they're in, which the keyboard moves through.\n protected readonly items = contentChildren(NB_OPTION_LIST_ITEM, { descendants: true })\n\n /**\n * How many levels of nested options the list shows at once; opening a deeper one drills into it.\n */\n readonly nestedLevels = input<number, unknown>(3, { transform: (value) => Math.max(1, numberAttribute(value, 3)) })\n\n /**\n * The nested option the list is drilled into: only the options in it show, and a row at the top goes back.\n */\n readonly nestedRoot = signal<NbOptionNestedComponent | undefined>(undefined)\n\n /**\n * Whether the select has nested options, which make its list a tree.\n */\n readonly isTree = computed(() => this.nestedOptions().length > 0)\n\n // A search shows the matching options in all nested options, wherever the list is drilled into.\n protected readonly isNestedSearch = computed(() => this.searchable() && !!this.query().trim())\n protected readonly directionService = inject(NbLayoutDirectionService)\n // The nested option the back row goes back from; a search shows all, without one.\n protected readonly backTo = computed(() => (this.isNestedSearch() ? undefined : this.nestedRoot()))\n\n /**\n * An `nb-select-label` passed as content, shown instead of the selected options' text.\n */\n readonly customLabel = contentChild(NbSelectLabelComponent)\n\n // The options list, which the overlay attaches.\n protected readonly portal = viewChild(NbPortalDirective)\n\n protected readonly button = viewChild.required('selectButton', { read: ElementRef<HTMLButtonElement> })\n\n protected readonly opened = signal(false)\n\n /**\n * Whether the options are open.\n */\n readonly isOpen = this.opened.asReadonly()\n\n /**\n * Whether the options are closed.\n */\n readonly isHidden = computed(() => !this.isOpen())\n\n /**\n * The selected options. Selecting the same options again isn't a change, so writing the value a select already\n * shows doesn't wake what depends on it.\n */\n readonly selectionModel = signal<Array<NbOptionComponent<T>>>([], {\n equal: (a, b) => a.length === b.length && a.every((option, index) => option === b[index])\n })\n\n /**\n * The selected value, or the values of the selected options in a multiple select.\n */\n readonly selectedValue = computed(() => {\n const selection = this.selectionModel()\n return this.multiple() ? this.optionValues(selection) : selection[0]?.value()\n })\n\n /**\n * Whether the select is disabled: the `disabled` input, until a form changes it.\n */\n readonly isDisabled = linkedSignal(() => this.disabled())\n\n // The position strategy can be replaced while the options are open, e.g. by a subclass.\n protected readonly positionStrategy$ = new BehaviorSubject<NbAdjustableConnectedPositionStrategy | undefined>(\n undefined\n )\n\n get positionStrategy(): NbAdjustableConnectedPositionStrategy | undefined {\n return this.positionStrategy$.value\n }\n\n /**\n * Current overlay position, which the options list and the button render with.\n */\n readonly overlayPosition = signal<NbPosition>('' as NbPosition)\n\n protected readonly focused = signal(false)\n\n protected ref?: NbOverlayRef\n\n protected triggerStrategy?: NbTriggerStrategy\n\n protected alive = true\n\n protected keyManager?: NbFocusKeyManager<NbOptionListItem>\n\n // A value written before its options rendered, applied once they do; only the last one is kept.\n protected queue?: T | T[] | null\n // Whether `queue` holds a value; `null` can be a queued value when the select is `nullable`.\n protected queued = false\n protected lastSelectionView?: string\n\n protected onChange: (value: T | T[] | null) => void = () => {}\n protected onTouched: () => void = () => {}\n\n protected readonly compareFn = computed<NbSelectCompareFunction<T>>(() => {\n const compareWith = this.compareWith()\n return typeof compareWith === 'function' ? compareWith : (v1, v2) => v1 === v2\n })\n\n readonly controlState = computed(() => ({\n status: this.resolvedStatus(),\n size: this.size(),\n fullWidth: this.fullWidth(),\n focused: this.focused(),\n disabled: this.isDisabled()\n }))\n\n protected readonly resolvedAppearance = computed<NbSelectAppearance>(() => {\n if (this.ghost()) {\n return 'ghost'\n }\n if (this.hero()) {\n return 'hero'\n }\n if (this.filled()) {\n return 'filled'\n }\n if (this.outline()) {\n return 'outline'\n }\n return this.appearance()\n })\n\n protected readonly hostClasses = computed(() => [\n `size-${this.size()}`,\n this.statusService.getStatusClass(this.resolvedStatus()),\n `shape-${this.shape()}`,\n `appearance-${this.resolvedAppearance()}`\n ])\n\n readonly selectButtonClasses = computed(() => {\n const classes = new Array<string>()\n const empty = !this.selectionModel().length\n\n if (empty) {\n classes.push('placeholder')\n }\n if (empty && !this.placeholder()) {\n classes.push('empty')\n }\n if (this.isOpen()) {\n classes.push(this.overlayPosition())\n }\n\n return classes\n })\n\n constructor() {\n // The focusable element is inside: the button or the native input gets aria-invalid and aria-describedby.\n this.validation?.delegateAria()\n enableTransitionsAfterRender(this.hostRef.nativeElement)\n\n // Searching leaves out the options that don't match, and keeps the active option among the ones shown.\n effect(() => {\n const query = this.searchable() ? this.query().trim() : ''\n const matches = this.searchFn()\n const options = this.options()\n untracked(() => {\n const choices = options.filter((option) => !option.selectAll())\n choices.forEach((option) => option.filtered.set(!!query && !matches(option, query)))\n // A select-all option acts on the options the search shows, so it stays while there are any.\n const nothingShown = choices.every((option) => option.filtered())\n options\n .filter((option) => option.selectAll())\n .forEach((option) => option.filtered.set(!!query && nothingShown))\n const active = this.searchKeyManager?.activeItem\n if (this.isSearching() && (!active || active.hidden)) {\n this.searchKeyManager?.setFirstItemActive()\n }\n })\n })\n\n // Options added, a search, or a nested option opened from the app change which options show.\n effect(() => {\n this.options()\n const nestedOptions = this.nestedOptions()\n this.nestedRoot()\n this.isNestedSearch()\n nestedOptions.forEach((nested) => nested.expanded())\n if (nestedOptions.length) {\n untracked(() => this.syncNested())\n }\n })\n\n this.destroyRef.onDestroy(() => (this.alive = false))\n\n // A bound `selected` is written like a form value; an unbound one doesn't clear a form's value.\n let firstSelected = true\n effect(() => {\n const selected = this.selected()\n untracked(() => {\n if (!firstSelected || selected !== undefined) {\n this.writeValue(selected)\n }\n firstSelected = false\n })\n })\n\n // Select the current value again with a new compare function.\n effect(() => {\n this.compareFn()\n untracked(() => {\n if (this.selectionModel().length && this.canSelectValue()) {\n this.setSelection(this.selectedValue())\n }\n })\n })\n\n // A queued value, or a selection of options that were replaced (e.g. options loaded again),\n // is selected among the current options once they render with their values bound.\n afterRenderEffect(() => {\n this.options().forEach((option) => option.value())\n untracked(() => {\n if ((this.queued || this.hasRemovedSelectedOptions()) && this.canSelectValue()) {\n this.writeValue(this.queued ? this.queue : this.selectedValue())\n }\n })\n })\n\n // Options can change at runtime, so listen to the clicks of the current ones.\n toObservable(this.options)\n .pipe(\n switchMap((options) => merge(...options.map((option) => option.click))),\n takeUntilDestroyed()\n )\n .subscribe((clickedOption) => this.handleOptionClick(clickedOption))\n }\n\n /**\n * The select button's width, in pixels.\n */\n get hostWidth(): number {\n return this.button().nativeElement.getBoundingClientRect().width\n }\n\n /**\n * The text of the selected options, which the button shows; it's read from the DOM.\n */\n get selectionView() {\n const selection = this.selectionModel()\n if (selection.length > 1) {\n return selection.map((option) => option.content).join(', ')\n }\n\n return selection[0].content\n }\n\n ngAfterContentChecked() {\n // The label shows the text of the selected options, which their parent view renders (e.g. a translation).\n const label = this.selectionModel().length ? this.selectionView : undefined\n if (label !== this.lastSelectionView) {\n this.lastSelectionView = label\n this.cd.markForCheck()\n }\n }\n\n ngAfterViewInit() {\n this.triggerStrategy = this.createTriggerStrategy()\n\n this.subscribeOnButtonFocus()\n this.subscribeOnTriggers(this.triggerStrategy)\n }\n\n ngOnDestroy() {\n if (this.ref) {\n this.ref.dispose()\n }\n if (this.triggerStrategy) {\n this.triggerStrategy.destroy()\n }\n }\n\n show() {\n if (this.shouldShow()) {\n this.attachToOverlay()\n\n this.positionChanges()\n .pipe(take(1), takeUntilDestroyed(this.destroyRef))\n .subscribe(() => this.onPositioned())\n }\n }\n\n hide() {\n if (this.isOpen()) {\n this.ref?.detach()\n this.opened.set(false)\n // The list opens with all its options again.\n this.query.set('')\n }\n }\n\n registerOnChange(fn: (value: T | T[] | null) => void) {\n this.onChange = fn\n }\n\n registerOnTouched(fn: () => void) {\n this.onTouched = fn\n }\n\n setDisabledState(isDisabled: boolean) {\n this.isDisabled.set(isDisabled)\n }\n\n // Forms write values from wherever the app sets them, e.g. inside an effect, which mustn't come to depend on the\n // select's own state.\n writeValue(value?: T | T[] | null) {\n untracked(() => {\n if (!this.alive) {\n return\n }\n\n if (this.canSelectValue()) {\n this.setSelection(value)\n // Keep a value whose options aren't all rendered yet (options loaded later), so they're selected once\n // they appear.\n this.queued = this.selectionModel().length < this.countValues(value)\n this.queue = this.queued ? value : undefined\n } else {\n this.queued = true\n this.queue = value\n }\n })\n }\n\n /**\n * Selects the option; a select-all one toggles all, and one without a value clears the selection.\n */\n protected handleOptionClick(option: NbOptionComponent<T>) {\n this.queue = undefined\n this.queued = false\n if (option.selectAll()) {\n if (this.multiple()) {\n this.toggleAll()\n }\n } else if (this.isEmptyValue(option.value())) {\n this.reset()\n } else {\n this.selectOption(option)\n }\n // A multiple select stays open; searching goes on where it was.\n if (this.isSearching() && this.isOpen()) {\n this.searchKeyManager?.setActiveItem(option)\n this.searchInput()?.nativeElement.focus()\n }\n }\n\n /**\n * Clears the selection, closes the options and emits an empty value.\n */\n protected reset() {\n this.selectionModel().forEach((option) => option.deselect())\n this.selectionModel.set([])\n this.hide()\n this.focusButton()\n this.emitSelected(this.multiple() ? [] : null)\n }\n\n protected selectOption(option: NbOptionComponent<T>) {\n if (this.multiple()) {\n this.handleMultipleSelect(option)\n } else {\n this.handleSingleSelect(option)\n }\n }\n\n // Selects the option, closes the options and emits.\n protected handleSingleSelect(option: NbOptionComponent<T>) {\n const selected = this.selectionModel()[0]\n\n if (selected && !this.sameValue(selected.value(), option.value())) {\n selected.deselect()\n }\n\n this.selectionModel.set([option])\n option.select()\n this.hide()\n this.focusButton()\n\n // An option without a value clears the selection instead, so it has one here.\n this.emitSelected(option.value() ?? null)\n }\n\n // Toggles the option, unless `maxSelections` is reached; the options stay open.\n protected handleMultipleSelect(option: NbOptionComponent<T>) {\n if (this.isLimited(option)) {\n return\n }\n if (option.selected()) {\n this.selectionModel.update((selection) =>\n selection.filter((s) => !this.sameValue(s.value(), option.value()))\n )\n option.deselect()\n } else {\n this.selectionModel.update((selection) => [...selection, option])\n option.select()\n }\n\n this.emitSelected(this.optionValues(this.selectionModel()))\n }\n\n protected attachToOverlay() {\n let ref = this.ref\n if (!ref) {\n ref = this.createOverlay()\n this.subscribeOnPositionChange()\n this.createKeyManager()\n this.subscribeOnOverlayKeys(ref)\n }\n\n ref.attach(this.portal())\n this.opened.set(true)\n }\n\n /**\n * Runs once the open options are positioned.\n */\n protected onPositioned() {\n this.setActiveOption()\n if (this.isSearching()) {\n this.searchInput()?.nativeElement.focus()\n }\n }\n\n // Whether the open list is searched, with `searchable`.\n protected isSearching(): boolean {\n return this.searchable() && !!this.searchKeyManager\n }\n\n protected readonly noMatches = computed(\n () =>\n this.searchable() &&\n !!this.query().trim() &&\n this.options().every((option) => option.selectAll() || option.filtered())\n )\n\n protected onSearchInput(event: Event) {\n this.query.set((event.target as HTMLInputElement).value)\n }\n\n protected positionChanges() {\n return this.positionStrategy$.pipe(switchMap((positionStrategy) => positionStrategy?.positionChange ?? EMPTY))\n }\n\n protected focusButton() {\n this.button().nativeElement.focus()\n }\n\n protected setActiveOption() {\n const keyManager = this.isSearching() && this.searchKeyManager ? this.searchKeyManager : this.keyManager\n // A selected option in a collapsed nested option opens it.\n if (this.selectionModel().length) {\n this.revealNested(this.selectionModel()[0])\n }\n const selection = this.selectionModel().filter((option) => !option.hidden)\n if (selection.length) {\n keyManager?.setActiveItem(selection[0])\n } else {\n keyManager?.setFirstItemActive()\n }\n }\n\n protected createOverlay(): NbOverlayRef {\n const scrollStrategy = this.createScrollStrategy()\n this.positionStrategy$.next(this.createPositionStrategy())\n const ref = this.overlay.create({\n positionStrategy: this.positionStrategy,\n scrollStrategy,\n panelClass: this.optionsPanelClass()\n })\n this.ref = ref\n // The overlay can also detach itself, e.g. through its scroll strategy.\n ref.detachments().pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => this.opened.set(false))\n return ref\n }\n\n protected createKeyManager() {\n this.keyManager = this.itemKeyManagerFactory\n .create(this.items, this.injector)\n .withTypeAhead(200)\n // Like a native select: Home, End, PageUp and PageDown move through the options.\n .withHomeAndEnd()\n .withPageUpDown()\n // Collapsed in a nested option.\n .skipPredicate((item) => item.disabled || item.hidden)\n\n this.searchKeyManager = this.searchKeyManagerFactory\n .create(this.items, this.injector)\n .withHomeAndEnd()\n .withPageUpDown()\n .skipPredicate((option) => option.disabled || option.hidden)\n this.searchKeyManager.change\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => this.activeOptionId.set(this.searchKeyManager?.activeItem?.id))\n }\n\n protected createPositionStrategy(): NbAdjustableConnectedPositionStrategy {\n return this.positionBuilder\n .connectedTo(this.button())\n .position(NbPosition.BOTTOM)\n .offset(this.overlayOffset())\n .adjustment(NbAdjustment.VERTICAL)\n // Where neither below nor above has room for the whole list, it gets the space there is and scrolls. The CDK\n // shifts the list by the offset after sizing it, so the margin includes the offset to keep 8px from the edge.\n .withFlexibleDimensions(true)\n .withViewportMargin(8 + this.overlayOffset())\n }\n\n protected createScrollStrategy(): NbScrollStrategy {\n return this.overlay.scrollStrategies[this.scrollStrategy()]()\n }\n\n protected createTriggerStrategy(): NbTriggerStrategy {\n return this.triggerStrategyBuilder\n .trigger(NbTrigger.CLICK)\n .host(this.hostRef.nativeElement)\n .container(() => this.getContainer())\n .build()\n }\n\n protected subscribeOnTriggers(triggerStrategy: NbTriggerStrategy) {\n triggerStrategy.show$.subscribe(() => this.show())\n triggerStrategy.hide$.pipe(filter(() => this.isOpen())).subscribe(($event: Event) => {\n this.hide()\n if (!this.isClickedWithinComponent($event)) {\n this.onTouched()\n }\n })\n }\n\n protected subscribeOnPositionChange() {\n this.positionChanges()\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe((position: NbPosition) => this.overlayPosition.set(position))\n }\n\n protected subscribeOnOverlayKeys(ref: NbOverlayRef) {\n ref\n .keydownEvents()\n .pipe(\n filter(() => this.isOpen()),\n takeUntilDestroyed(this.destroyRef)\n )\n .subscribe((event: KeyboardEvent) => {\n const keyManager = this.isSearching() && this.searchKeyManager ? this.searchKeyManager : this.keyManager\n if (event.key === 'Escape' && !isComposing(event)) {\n // Only the options close, not a dialog or window the select is in.\n event.preventDefault()\n event.stopPropagation()\n this.focusButton()\n this.hide()\n } else if (this.onNestedKeydown(event, keyManager)) {\n event.preventDefault()\n } else if (this.isSearching() && this.searchKeyManager) {\n this.onSearchKeydown(event, this.searchKeyManager)\n } else {\n this.keyManager?.onKeydown(event)\n }\n })\n\n const tabOuts = new Array<Observable<void>>()\n if (this.keyManager) {\n tabOuts.push(this.keyManager.tabOut)\n }\n if (this.searchKeyManager) {\n tabOuts.push(this.searchKeyManager.tabOut)\n }\n merge(...tabOuts)\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => {\n this.hide()\n this.onTouched()\n })\n }\n\n protected onSearchKeydown(event: KeyboardEvent, keyManager: NbActiveDescendantKeyManager<NbOptionListItem>) {\n if (event.key === 'Enter' && !isComposing(event)) {\n const active = keyManager.activeItem\n if (active instanceof NbOptionComponent) {\n event.preventDefault()\n this.handleOptionClick(active)\n }\n } else {\n // Arrows, Home and End move the active option; other keys type into the input.\n keyManager.onKeydown(event)\n }\n }\n\n /**\n * Opens or closes a nested option. Opening one deeper than `nestedLevels` drills into it.\n */\n toggleNested(nested: NbOptionNestedComponent) {\n if (nested.expanded()) {\n nested.expanded.set(false)\n } else {\n nested.expanded.set(true)\n // Its options would be one level too deep: start the list lower, so they're at the last level shown.\n if (this.nestedLevel(nested) + 1 > this.nestedLevels()) {\n this.setNestedRoot(this.nestedAncestor(nested, nested.depth + 1 - this.nestedLevels()))\n }\n }\n this.syncNested()\n // Clicking a row focuses it; searching goes on in the input.\n if (this.isSearching() && this.isOpen()) {\n this.searchInput()?.nativeElement.focus()\n }\n const keyManager = this.isSearching() && this.searchKeyManager ? this.searchKeyManager : this.keyManager\n if (nested.hidden) {\n // Drilled into it, with one level shown: its first option is in its place. Making it active would reveal it,\n // going back out.\n keyManager?.updateActiveItem(nested)\n keyManager?.setNextItemActive()\n } else if (keyManager?.activeItem !== nested) {\n keyManager?.setActiveItem(nested)\n }\n }\n\n /**\n * Opens the nested options an option or nested option is in, and drills in or back as needed, so it shows.\n */\n revealNested(item: NbNestedItem) {\n if (!this.isTree() || this.isNestedSearch()) {\n return\n }\n for (let nested = item.parentNested; nested; nested = nested.parentNested) {\n nested.expanded.set(true)\n }\n const root = this.nestedRoot()\n if (!this.isInNested(item, root) || this.nestedLevel(item) > this.nestedLevels()) {\n this.setNestedRoot(this.nestedAncestor(item, item.depth - this.nestedLevels()))\n }\n this.syncNested()\n }\n\n /**\n * Goes back from the nested option the list is drilled into, to the one it's in.\n */\n nestedBack() {\n const root = this.nestedRoot()\n if (root) {\n this.setNestedRoot(root.parentNested ?? undefined)\n this.syncNested()\n if (this.isSearching()) {\n this.searchInput()?.nativeElement.focus()\n }\n (this.isSearching() && this.searchKeyManager ? this.searchKeyManager : this.keyManager)?.setActiveItem(root)\n }\n }\n\n protected setNestedRoot(root?: NbOptionNestedComponent) {\n this.nestedRoot.set(root)\n // Nested options whose options would be deeper than the levels shown close.\n for (const nested of this.nestedOptions()) {\n if (nested.expanded() && this.nestedLevel(nested) >= this.nestedLevels() && this.isInNested(nested, root)) {\n nested.expanded.set(false)\n }\n }\n }\n\n // How deep an option or nested option is in the view: 1 at its top.\n protected nestedLevel(item: NbNestedItem): number {\n return item.depth - (this.nestedRoot()?.depth ?? 0)\n }\n\n // Whether an option or nested option is in a nested option, or anywhere for none.\n protected isInNested(item: NbNestedItem, root?: NbOptionNestedComponent) {\n for (let nested = item.parentNested; nested; nested = nested.parentNested) {\n if (nested === root) {\n return true\n }\n }\n return !root\n }\n\n // The nested option an item is in at a depth, or the item itself if it's there; none above the top.\n protected nestedAncestor(item: NbNestedItem, depth: number) {\n let nested = item instanceof NbOptionNestedComponent ? item : item.parentNested\n while (nested && nested.depth > depth) {\n nested = nested.parentNested\n }\n return depth > 0 ? (nested ?? undefined) : undefined\n }\n\n /**\n * Shows the options and nested options in view, and indents them by how deep they are in it. It sets them at once,\n * not on the next render, so an option can take focus and scroll into view as soon as it's revealed.\n */\n protected syncNested() {\n const root = this.nestedRoot()\n const search = this.isNestedSearch()\n const base = search ? 0 : (root?.depth ?? 0)\n const shows = (item: NbNestedItem) => {\n if (search) {\n return true\n }\n let nested = item.parentNested\n while (nested && nested !== root) {\n if (!nested.expanded()) {\n return false\n }\n nested = nested.parentNested\n }\n return (nested ?? undefined) === root\n }\n // Groups with nothing in view hide, with their title; a group holding the nested option the list is drilled into\n // hides only its title.\n const groups = new Map<NbOptionGroupComponent, boolean>()\n const drilledGroups = new Set<NbOptionGroupComponent>()\n for (const option of this.options()) {\n const shown = shows(option)\n option.setNestedView(!shown, option.depth - base)\n if (option.group) {\n groups.set(option.group, shown || !!groups.get(option.group))\n }\n }\n for (const nested of this.nestedOptions()) {\n const shown = shows(nested)\n const drilledInto = !search && !!root && (nested === root || this.isInNested(root, nested))\n nested.setNestedView(!shown, nested.depth - base, search || nested.expanded(), drilledInto)\n if (nested.group) {\n groups.set(nested.group, shown || drilledInto || !!groups.get(nested.group))\n if (drilledInto) {\n drilledGroups.add(nested.group)\n }\n }\n }\n groups.forEach((shown, group) => group.setNestedView(!shown, drilledGroups.has(group)))\n }\n\n /**\n * Moves through nested options like a tree: ArrowRight (ArrowLeft in RTL) opens one, or moves into it when it's\n * open; ArrowLeft closes one, moves to the one it's in, or goes back from where the list is drilled into; Enter and\n * Space open and close one. Typing into the search input keeps the arrows, so they move through the tree only while\n * it's empty.\n */\n protected onNestedKeydown(\n event: KeyboardEvent,\n keyManager?: NbFocusKeyManager<NbOptionListItem> | NbActiveDescendantKeyManager<NbOptionListItem>\n ): boolean {\n const active = keyManager?.activeItem\n if (!this.isTree() || !keyManager || !active || isComposing(event)) {\n return false\n }\n const searching = this.isSearching()\n if (event.key === 'Enter' || (event.key === ' ' && !searching)) {\n if (active instanceof NbOptionNestedComponent) {\n if (!active.disabled) {\n this.toggleNested(active)\n }\n return true\n }\n return false\n }\n const rtl = this.directionService.isRtl()\n const forward = event.key === (rtl ? 'ArrowLeft' : 'ArrowRight')\n const backward = event.key === (rtl ? 'ArrowRight' : 'ArrowLeft')\n if ((!forward && !backward) || (searching && this.query())) {\n return false\n }\n if (!(active instanceof NbOptionComponent || active instanceof NbOptionNestedComponent)) {\n return false\n }\n if (forward) {\n if (active instanceof NbOptionNestedComponent && !active.disabled) {\n if (active.expanded()) {\n keyManager.setNextItemActive()\n } else {\n this.toggleNested(active)\n }\n }\n } else if (active instanceof NbOptionNestedComponent && active.expanded() && !active.hidden) {\n this.toggleNested(active)\n } else if (active.parentNested && active.parentNested !== this.nestedRoot()) {\n keyManager.setActiveItem(active.parentNested)\n } else {\n this.nestedBack()\n }\n return true\n }\n\n protected subscribeOnButtonFocus() {\n const button = this.button()\n this.focusMonitor\n .monitor(button)\n .pipe(\n map((origin) => !!origin),\n takeUntilDestroyed(this.destroyRef)\n )\n // Focus can change while the select renders: hiding a focused button blurs it once the layout is measured.\n .subscribe((focused) => untracked(() => this.focused.set(focused)))\n this.destroyRef.onDestroy(() => this.focusMonitor.stopMonitoring(button))\n }\n\n protected getContainer(): ComponentRef<unknown> | undefined {\n return this.ref && this.ref.hasAttached()\n ? <ComponentRef<unknown>>{\n location: {\n nativeElement: this.ref.overlayElement\n }\n }\n : undefined\n }\n\n /**\n * Emits the value to the form and `selectedChange`.\n */\n protected emitSelected(selected: T | T[] | null) {\n this.onChange(selected)\n // An array in a multiple select, one value (or null) otherwise, which is what NbSelectValue says for `M`.\n this.selectedChange.emit(selected as NbSelectValue<T, M>)\n }\n\n protected countValues(value: unknown): number {\n if (this.isEmptyValue(value) || (this.multiple() && value === '')) {\n return 0\n }\n return this.multiple() && Array.isArray(value) ? value.length : 1\n }\n\n /**\n * Whether an option can't be selected because `maxSelections` is reached.\n */\n isLimited(option: Pick<NbOptionComponent, 'selected' | 'selectAll'>): boolean {\n return this.isLimitReached() && !option.selected() && !option.selectAll()\n }\n\n // The options a select-all option acts on: the enabled ones a search shows.\n protected readonly selectAllCandidates = computed(() =>\n this.options().filter((option) => !option.selectAll() && !option.ownDisabled() && !option.filtered())\n )\n\n /**\n * How many of the options a select-all option acts on are selected: `all`, `some` or `none`.\n */\n readonly selectAllState = computed<'all' | 'some' | 'none'>(() => {\n const candidates = this.selectAllCandidates()\n const selected = candidates.filter((option) => option.selected()).length\n if (selected && selected === candidates.length) {\n return 'all'\n }\n return selected ? 'some' : 'none'\n })\n\n // Selects the options it acts on, up to `maxSelections`, or clears them when all are selected or the limit is\n // reached.\n protected toggleAll() {\n const candidates = this.selectAllCandidates()\n if (this.selectAllState() === 'all' || this.isLimitReached()) {\n candidates.forEach((option) => option.deselect())\n this.selectionModel.update((selection) =>\n selection.filter((selected) => !candidates.some((option) => this.sameValue(option.value(), selected.value())))\n )\n } else {\n const room = (this.maxSelections() ?? Infinity) - this.selectionModel().length\n const added = candidates.filter((option) => !option.selected()).slice(0, room)\n added.forEach((option) => option.select())\n this.selectionModel.update((selection) => [...selection, ...added])\n }\n this.emitSelected(this.optionValues(this.selectionModel()))\n }\n\n /**\n * Whether a value means \"nothing selected\": `undefined`, and `null` unless the select is `nullable`.\n */\n isEmptyValue(value: unknown): boolean {\n return value === undefined || (value === null && !this.nullable())\n }\n\n // Compares values with `compareWith`; `null` and `undefined` only match themselves.\n protected sameValue(v1?: T | null, v2?: T | null): boolean {\n return v1 == null || v2 == null ? v1 === v2 : this.compareFn()(v1, v2)\n }\n\n // The values of options; options without a value clear the selection, so they aren't among them.\n protected optionValues(options: ReadonlyArray<NbOptionComponent<T>>): T[] {\n return options.map((option) => option.value()).filter((value): value is T => value !== undefined)\n }\n\n protected hasRemovedSelectedOptions(): boolean {\n const options = this.options()\n return this.selectionModel().some((option) => !options.includes(option))\n }\n\n /**\n * Selects the options matching the value and deselects the others. Throws when the value's shape doesn't match\n * `multiple`: an array for a single select, or a single value for a multiple one.\n */\n protected setSelection(value?: T | T[] | null) {\n const multiple = this.multiple()\n // A bare `ngModel` writes '' initially; a multiple select treats it like no value.\n const isResetValue = this.isEmptyValue(value) || (multiple && value === '')\n let safeValue = value\n\n if (multiple) {\n safeValue = isResetValue ? [] : value\n }\n\n const isArray: boolean = Array.isArray(safeValue)\n\n if (multiple && !isArray && !isResetValue) {\n throw new Error(\"Can't assign single value if select is marked as multiple\")\n }\n if (!multiple && isArray) {\n throw new Error(\"Can't assign array if select is not marked as multiple\")\n }\n\n const previouslySelectedOptions = this.selectionModel()\n const selection = new Array<NbOptionComponent<T>>()\n\n // A multiple select has an array by now, and a single one doesn't.\n if (Array.isArray(safeValue)) {\n safeValue.forEach((option) => this.selectValue(option, selection))\n } else {\n this.selectValue(safeValue, selection)\n }\n this.selectionModel.set(selection)\n\n // find options which were selected before and trigger deselect\n previouslySelectedOptions\n .filter((option) => !selection.includes(option))\n .forEach((option) => option.deselect())\n }\n\n /**\n * Adds the option matching the value to the selection, if there is one.\n */\n protected selectValue(value: T | null | undefined, selection: Array<NbOptionComponent<T>>) {\n if (this.isEmptyValue(value)) {\n return\n }\n\n const corresponding = this.options().find((option) => this.sameValue(option.value(), value))\n\n if (corresponding) {\n corresponding.select()\n selection.push(corresponding)\n }\n }\n\n protected shouldShow(): boolean {\n // A disabled select, or one inside a disabled <fieldset>, stays closed.\n const disabled = this.isDisabled() || !!this.button()?.nativeElement.matches(':disabled')\n return !disabled && this.isHidden() && this.options().length > 0\n }\n\n /**\n * Marks the control touched when the button loses focus while the options are closed; focus moving into the\n * open options doesn't count.\n */\n trySetTouched() {\n if (this.isHidden()) {\n this.onTouched()\n }\n }\n\n protected isClickedWithinComponent($event: Event) {\n return this.hostRef.nativeElement === $event.target || this.hostRef.nativeElement.contains($event.target as Node)\n }\n\n protected canSelectValue(): boolean {\n return this.options().length > 0\n }\n}\n","<button [disabled]=\"isDisabled()\"\n [class]=\"selectButtonClasses()\"\n [id]=\"buttonId\"\n [attr.aria-labelledby]=\"buttonLabelledBy()\"\n aria-haspopup=\"listbox\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-controls]=\"isOpen() ? listId : null\"\n [attr.aria-invalid]=\"validation?.ariaInvalid()\"\n [attr.aria-describedby]=\"validation?.describedBy()\"\n [attr.aria-required]=\"validation?.ariaRequired()\"\n [tabIndex]=\"tabIndex()\"\n (blur)=\"trySetTouched()\"\n (keydown.arrowDown)=\"show()\"\n (keydown.arrowUp)=\"show()\"\n class=\"select-button\"\n type=\"button\"\n #selectButton>\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- Stops chip clicks while disabled; the keyboard reaches only the button. -->\n <span [class.select-label-chips]=\"chips() && multiple() && !customLabel() && selectionModel().length\"\n (click)=\"isDisabled() && $event.stopPropagation()\">\n @if (selectionModel().length) {\n @if (customLabel()) {\n <ng-content select=\"nb-select-label\" />\n } @else if (chips() && multiple()) {\n <span class=\"select-chips\">\n @for (option of selectionModel(); track option) {\n <nb-tag [text]=\"option.content.trim()\"\n [size]=\"chipSize()\" />\n }\n </span>\n } @else {\n <span dir=\"auto\">{{ selectionView }}</span>\n }\n } @else {\n <span dir=\"auto\">{{ placeholder() }}</span>\n }\n </span>\n\n <nb-icon icon=\"chevron-down-outline\"\n pack=\"essentials\"\n (click)=\"isDisabled() && $event.stopPropagation()\"\n aria-hidden=\"true\" />\n</button>\n\n<nb-option-list *nbPortal\n [size]=\"size()\"\n [multiple]=\"multiple()\"\n [listId]=\"listId\"\n [listRole]=\"isTree() ? 'tree' : 'listbox'\"\n [position]=\"overlayPosition()\"\n [style.width.px]=\"optionsWidth() ?? hostWidth\"\n [class]=\"optionsListClass()\">\n @if (searchable()) {\n <div nbOptionListHeader\n class=\"select-search\">\n <input nbInput\n ghost\n fullWidth\n #searchInput\n autocomplete=\"off\"\n role=\"combobox\"\n aria-autocomplete=\"list\"\n aria-expanded=\"true\"\n [attr.aria-controls]=\"listId\"\n [attr.aria-activedescendant]=\"activeOptionId()\"\n [attr.aria-label]=\"texts().search\"\n [placeholder]=\"texts().search\"\n [fieldSize]=\"size()\"\n [value]=\"query()\"\n (input)=\"onSearchInput($event)\" />\n <div class=\"select-no-matches\"\n role=\"status\">\n @if (noMatches()) {{{ texts().noMatches }}}\n </div>\n </div>\n }\n @if (backTo(); as root) {\n <button nbOptionListHeader\n class=\"option-nested-back\"\n type=\"button\"\n tabindex=\"-1\"\n [attr.aria-label]=\"texts().back(root.title() ?? '')\"\n (click)=\"nestedBack()\">\n <nb-icon icon=\"chevron-left-outline\"\n pack=\"essentials\"\n aria-hidden=\"true\" />\n <span><span dir=\"auto\">{{ root.title() }}</span></span>\n </button>\n }\n <!-- Everything but the label, so options also come in nested control flow, e.g. an @if in a @for. -->\n <ng-content />\n</nb-option-list>\n","import { NgModule } from '@angular/core'\n\nimport { NbOverlayModule } from '@liquid-js/lyr-core/cdk'\nimport { NbInputModule } from '@liquid-js/lyr-core/input'\nimport { NbCardModule } from '@liquid-js/lyr-core/card'\nimport { NbButtonModule } from '@liquid-js/lyr-core/button'\nimport { NbIconModule } from '@liquid-js/lyr-core/icon'\nimport { NbOptionModule } from '../option/option-list.module'\nimport { NbSelectComponent, NbSelectLabelComponent } from './select.component'\n\nconst NB_SELECT_COMPONENTS = [NbSelectComponent, NbSelectLabelComponent]\n\n@NgModule({\n imports: [\n NbOverlayModule,\n NbButtonModule,\n NbInputModule,\n NbCardModule,\n NbIconModule,\n NbOptionModule,\n ...NB_SELECT_COMPONENTS\n ],\n exports: [...NB_SELECT_COMPONENTS, NbOptionModule]\n})\nexport class NbSelectModule {}\n","import {\n Component,\n contentChildren,\n ElementRef,\n input,\n linkedSignal,\n output,\n Signal,\n signal,\n viewChild\n} from '@angular/core'\n\nimport { ɵconvertToBoolProperty as convertToBoolProperty, NbBooleanInput, ɵNbClassInput as NbClassInput, injectNbDefaults, NbComponentSize } from '@liquid-js/lyr-core/base'\nimport { NbPosition, NbPortalDirective } from '@liquid-js/lyr-core/cdk'\nimport { NbOptionComponent } from '../option/option.component'\nimport { NbOptionListComponent } from '../option/option-list.component'\nimport { NbOptionGroupComponent } from '../option/option-group.component'\n\n// Component class scoped counter for aria attributes.\nlet lastAutocompleteId = 0\n\n/**\n * The options of an `input[nbAutocomplete]`, which the directive shows in an overlay below the input.\n */\n@Component({\n selector: 'nb-autocomplete',\n templateUrl: './autocomplete.component.html',\n styleUrls: ['./autocomplete.component.scss'],\n imports: [NbPortalDirective, NbOptionListComponent],\n host: {\n '[class]': \"'size-' + size()\"\n }\n})\nexport class NbAutocompleteComponent<T> {\n /**\n * The element the options are positioned at, which `NbAutocompleteDirective` sets when they first open.\n */\n hostRef?: ElementRef<HTMLElement>\n\n /**\n * Id of the listbox, which the input's `aria-controls` points to while the options are open.\n */\n readonly id: string = `nb-autocomplete-${lastAutocompleteId++}`\n\n /**\n * Current overlay position, which `NbAutocompleteDirective` sets and the options list renders with.\n */\n readonly overlayPosition = signal<NbPosition>('' as NbPosition)\n\n /**\n * The width of the element the options are positioned at, which the options take unless `optionsWidth` is set.\n */\n get hostWidth(): number {\n return this.hostRef?.nativeElement.getBoundingClientRect().width ?? 0\n }\n\n /**\n * Turns a value into the text shown in the input, e.g. an object's name. It's given the text typed in the input\n * too.\n */\n readonly handleDisplayFn = input<(value: T | string) => string>()\n\n protected readonly nbDefaults = injectNbDefaults('input')\n\n // The size of the field it's attached to, which `NbAutocompleteDirective` gives it.\n protected readonly fieldSize = signal<Signal<NbComponentSize> | undefined>(undefined)\n\n /**\n * The size of the options: `tiny`, `small`, `medium`, `large` or `giant`. Unset, they match the field the\n * autocomplete is attached to, as a select's options match the select.\n */\n readonly sizeInput = input<NbComponentSize | undefined>(undefined, { alias: 'size' })\n /** The size in use: the input's, the field's, the app's default for fields, or 'medium'. */\n readonly size = linkedSignal<NbComponentSize>(\n () => this.sizeInput() ?? this.fieldSize()?.() ?? this.nbDefaults().size ?? 'medium'\n )\n\n /**\n * Makes the first option active whenever the options open or change, so Enter selects it at once.\n */\n readonly activeFirst = input<boolean, NbBooleanInput>(false, { transform: convertToBoolProperty })\n\n /**\n * Class of the `nb-option-list` holding the options.\n */\n readonly optionsListClass = input<NbClassInput>()\n\n /**\n * Class of the overlay panel around the options list.\n */\n readonly optionsPanelClass = input<string | string[]>()\n\n /**\n * Width of the options list, in pixels; the input's width by default.\n */\n readonly optionsWidth = input<number>()\n\n /**\n * Emits the value of an option chosen with a click or Enter, and a value the form control writes.\n */\n readonly selectedChange = output<T | undefined>()\n\n /**\n * The options in the content, inside groups or not.\n */\n readonly options = contentChildren<NbOptionComponent<T>>(NbOptionComponent, { descendants: true })\n\n readonly optionGroups = contentChildren(NbOptionGroupComponent, { descendants: true })\n\n /**\n * The portal with the options list, which the directive attaches to its overlay.\n */\n readonly portal = viewChild(NbPortalDirective)\n\n readonly list = viewChild(NbOptionListComponent)\n\n /**\n * Called by `NbAutocompleteDirective` when the options first open, with the element they are positioned at, for\n * their width, and the size of the field they match.\n */\n setHost(hostRef: ElementRef<HTMLElement>, fieldSize?: Signal<NbComponentSize>) {\n this.hostRef = hostRef\n this.fieldSize.set(fieldSize)\n }\n\n emitSelected(selected?: T) {\n this.selectedChange.emit(selected)\n }\n}\n","<nb-option-list *nbPortal\n [size]=\"size()\"\n [position]=\"overlayPosition()\"\n [style.width.px]=\"optionsWidth() ?? hostWidth\"\n role=\"listbox\"\n [id]=\"id\"\n [class.empty]=\"!options().length\"\n [class]=\"optionsListClass()\">\n <ng-content select=\"nb-option, nb-option-group\" />\n</nb-option-list>\n","import { ElementRef, WritableSignal } from '@angular/core'\n\n/**\n * An `input[nbAutocomplete]`, for components that hold one, e.g. a tag list, which opens the options below itself.\n * Querying this instead of the directive keeps the autocomplete code out of an app that doesn't use one.\n */\nexport abstract class NbAutocompleteRef {\n /** The element the options open next to; the input by default. */\n abstract readonly overlayHost: WritableSignal<ElementRef | undefined>\n}\n","import {\n AfterViewInit,\n ComponentRef,\n computed,\n DestroyRef,\n Directive,\n ElementRef,\n forwardRef,\n inject,\n Injector,\n input,\n linkedSignal,\n OnDestroy,\n Renderer2,\n signal,\n untracked\n} from '@angular/core'\nimport { takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop'\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms'\nimport { merge } from 'rxjs'\nimport { filter, skip, switchMap } from 'rxjs/operators'\n\nimport { NbOverlayRef, NbScrollStrategy, NbTrigger, NbTriggerStrategy, NbTriggerStrategyBuilderService, NbOverlayService, NbAdjustableConnectedPositionStrategy, NbAdjustment, NbPosition, NbPositionBuilderService, ɵNbActiveDescendantKeyManager as NbActiveDescendantKeyManager, ɵNbActiveDescendantKeyManagerFactoryService as NbActiveDescendantKeyManagerFactoryService, ɵNbKeyManagerActiveItemMode as NbKeyManagerActiveItemMode, NbScrollStrategies } from '@liquid-js/lyr-core/cdk'\nimport { ɵisComposing as isComposing } from '@liquid-js/lyr-core/base'\nimport { NbFormFieldControl } from '@liquid-js/lyr-core/form-field'\nimport { NbOptionComponent } from '../option/option.component'\nimport { NbOptionGroupComponent } from '../option/option-group.component'\nimport { NbAutocompleteComponent } from './autocomplete.component'\nimport { NbAutocompleteRef } from './autocomplete-ref'\n\n/**\n * Attaches an `nb-autocomplete` to an input: its options open below the input on focus, click or typing, and the\n * chosen one fills the input.\n *\n * The input is a combobox. Up and Down open the options and move the active one, Enter selects it, Escape closes\n * the options and keeps the text, and they close when the focus leaves them. A form control bound to the input gets\n * the typed text as well as the value of a chosen option.\n *\n * @stacked-example(Showcase, autocomplete/autocomplete-showcase.component)\n *\n * ### Installation\n *\n * Import `NbAutocompleteDirective`, `NbAutocompleteComponent`, `NbOptionComponent` into your standalone component:\n * ```ts\n * @Component({\n * imports: [NbAutocompleteDirective, NbAutocompleteComponent, NbOptionComponent],\n * })\n * export class PageComponent { }\n * ```\n *\n * With NgModules:\n *\n * Import `NbAutocompleteModule` to your feature module.\n * ```ts\n * @NgModule({\n * imports: [\n * // ...\n * NbAutocompleteModule,\n * ],\n * })\n * export class PageModule { }\n * ```\n * ### Usage\n *\n * The input binds to a form control or `ngModel`:\n * @stacked-example(Autocomplete form binding, autocomplete/autocomplete-form.component)\n *\n * Options are grouped with `nb-option-group`:\n * @stacked-example(Grouping, autocomplete/autocomplete-group.component)\n *\n * `handleDisplayFn` turns a value into the text shown in the input, e.g. for options with object values:\n * @stacked-example(Custom display, autocomplete/autocomplete-custom-display.component)\n *\n * With `activeFirst` the first option is active as soon as the options open, so Enter selects it:\n * @stacked-example(Active first, autocomplete/autocomplete-active-first.component)\n *\n * The input is disabled with `disabled`, or through its form control:\n * @stacked-example(Disabled, autocomplete/autocomplete-disabled.component)\n */\n@Directive({\n selector: 'input[nbAutocomplete]',\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => NbAutocompleteDirective),\n multi: true\n },\n { provide: NbAutocompleteRef, useExisting: forwardRef(() => NbAutocompleteDirective) }\n ],\n host: {\n 'role': 'combobox',\n 'aria-autocomplete': 'list',\n 'aria-haspopup': 'listbox',\n '[class.nb-autocomplete-position-top]': \"isOpen() && !!autocomplete().options().length && autocomplete().overlayPosition() === 'top'\",\n '[class.nb-autocomplete-position-bottom]': \"isOpen() && !!autocomplete().options().length && autocomplete().overlayPosition() === 'bottom'\",\n '[attr.aria-expanded]': 'isOpen()',\n '[attr.aria-controls]': 'isOpen() ? autocomplete().id : null',\n '[attr.aria-activedescendant]': 'isOpen() ? activeOption()?.id ?? null : null',\n '(input)': 'handleInput()',\n '(keydown.arrowDown)': 'handleKeydown()',\n '(keydown.arrowUp)': 'handleKeydown()',\n '(blur)': 'handleBlur()'\n }\n})\nexport class NbAutocompleteDirective<T> implements NbAutocompleteRef, OnDestroy, AfterViewInit, ControlValueAccessor {\n protected readonly hostRef = inject(ElementRef)\n protected readonly overlay = inject(NbOverlayService)\n protected readonly triggerStrategyBuilder = inject(NbTriggerStrategyBuilderService)\n protected readonly positionBuilder = inject(NbPositionBuilderService)\n protected readonly activeDescendantKeyManagerFactory = inject(\n NbActiveDescendantKeyManagerFactoryService\n ) as NbActiveDescendantKeyManagerFactoryService<NbOptionComponent<T>>\n protected readonly renderer = inject(Renderer2)\n protected readonly injector = inject(Injector)\n protected readonly destroyRef = inject(DestroyRef)\n\n /** @docs-private */\n protected triggerStrategy?: NbTriggerStrategy\n\n protected positionStrategy?: NbAdjustableConnectedPositionStrategy\n\n protected overlayRef?: NbOverlayRef\n\n protected keyManager?: NbActiveDescendantKeyManager<NbOptionComponent<T>>\n\n // The form gets the text typed in the input too.\n protected _onChange: (value?: T | string) => void = () => {}\n\n protected writtenValue?: T\n protected hasWrittenValue = false\n\n protected _onTouched: () => void = () => {}\n\n protected readonly opened = signal(false)\n\n /**\n * Whether the options are open.\n */\n readonly isOpen = this.opened.asReadonly()\n\n /**\n * Whether the options are closed.\n */\n readonly isClosed = computed(() => !this.isOpen())\n\n // The option the key manager made active, which the input announces as its active descendant.\n protected readonly activeOption = signal<NbOptionComponent<T> | undefined>(undefined)\n\n /**\n * Whether the open options have an active option, which Enter selects.\n */\n get hasActiveOption(): boolean {\n return !!(this.isOpen() && this.keyManager?.activeItem)\n }\n\n /**\n * The `nb-autocomplete` with the options.\n */\n readonly autocomplete = input.required<NbAutocompleteComponent<T>>({ alias: 'nbAutocomplete' })\n\n /**\n * The options' distance from the input, in pixels.\n */\n readonly overlayOffset = input<number>(8)\n\n /**\n * What scrolling the page does while the options are open: `block` (default) prevents it, `close` closes them,\n * `reposition` moves them along, and `noop` leaves them where they are.\n */\n readonly scrollStrategy = input<NbScrollStrategies>('block')\n\n /**\n * An element to position the options at instead of the input.\n */\n readonly customOverlayHost = input<ElementRef>()\n\n /**\n * The element the options overlay is positioned at: `customOverlayHost` until a component such as `nb-tag-list`\n * sets another, or else the input.\n */\n readonly overlayHost = linkedSignal(() => this.customOverlayHost())\n\n ngAfterViewInit() {\n this.triggerStrategy = this.createTriggerStrategy()\n this.subscribeOnTriggers(this.triggerStrategy)\n // A form control writes its initial value before the autocomplete panel has its `handleDisplayFn`,\n // so the value is displayed again once the panel inputs are set.\n if (this.hasWrittenValue) {\n this.setHostInputValue(this.writtenValue ?? '')\n }\n }\n\n ngOnDestroy() {\n if (this.triggerStrategy) {\n this.triggerStrategy.destroy()\n }\n\n if (this.positionStrategy) {\n this.positionStrategy.dispose()\n }\n\n if (this.overlayRef) {\n this.overlayRef.dispose()\n }\n }\n\n handleInput() {\n const currentValue = this.hostRef.nativeElement.value\n this._onChange(currentValue)\n this.setHostInputValue(this.getDisplayValue(currentValue))\n this.show()\n }\n\n handleKeydown() {\n this.show()\n }\n\n handleBlur() {\n this._onTouched()\n }\n\n show() {\n if (this.shouldShow()) {\n this.attachToOverlay()\n this.setActiveItem()\n }\n }\n\n hide() {\n if (this.isOpen()) {\n this.overlayRef?.detach()\n this.opened.set(false)\n }\n }\n\n // Untracked, as forms write values from wherever the app sets them, e.g. an effect that mustn't come to depend\n // on the control.\n writeValue(value: T) {\n untracked(() => {\n this.writtenValue = value\n this.hasWrittenValue = true\n this.handleInputValueUpdate(value)\n })\n }\n\n registerOnChange(fn: (value?: T | string) => void) {\n this._onChange = fn\n }\n\n registerOnTouched(fn: () => void) {\n this._onTouched = fn\n }\n\n setDisabledState(disabled: boolean) {\n this.renderer.setProperty(this.hostRef.nativeElement, 'disabled', disabled)\n }\n\n protected subscribeOnOptions() {\n const options$ = toObservable(this.autocomplete().options, { injector: this.injector })\n\n // Options can change at runtime, so listen to the clicks of the current ones.\n options$\n .pipe(\n switchMap((options) => merge(...options.map((option) => option.click))),\n takeUntilDestroyed(this.destroyRef)\n )\n .subscribe((clickedOption: NbOptionComponent<T>) => this.handleInputValueUpdate(clickedOption.value(), true))\n\n options$.pipe(skip(1), takeUntilDestroyed(this.destroyRef)).subscribe((options) => {\n this.setActiveItem()\n if (!options.length) {\n this.hide()\n }\n })\n }\n\n protected subscribeOnPositionChange(positionStrategy: NbAdjustableConnectedPositionStrategy) {\n positionStrategy.positionChange\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe((position: NbPosition) => this.autocomplete().overlayPosition.set(position))\n }\n\n protected getActiveItem(): NbOptionComponent<T> | undefined {\n return this.keyManager?.activeItem ?? undefined\n }\n\n protected setupAutocomplete() {\n // The field the input is, e.g. `nbInput`, whose size the options match; looked up once the autocomplete opens, as\n // a field like `nbTagInput` needs this directive itself.\n const control = this.injector.get(NbFormFieldControl, null, { self: true, optional: true })\n this.autocomplete().setHost(\n this.overlayHost() || this.hostRef,\n control ? computed(() => control.controlState().size) : undefined\n )\n }\n\n protected getDisplayValue(value: T | string) {\n const displayFn = this.autocomplete().handleDisplayFn()\n return displayFn ? displayFn(value) : value\n }\n\n protected getContainer(): ComponentRef<unknown> | undefined {\n return this.overlayRef && this.isOpen()\n ? <ComponentRef<unknown>>{\n location: {\n nativeElement: this.overlayRef.overlayElement\n }\n }\n : undefined\n }\n\n protected handleInputValueUpdate(value?: T, focusInput: boolean = false) {\n this.setHostInputValue(value ?? '')\n this._onChange(value)\n if (focusInput) {\n this.hostRef.nativeElement.focus()\n }\n this.autocomplete().emitSelected(value)\n this.hide()\n }\n\n protected subscribeOnTriggers(triggerStrategy: NbTriggerStrategy) {\n triggerStrategy.show$.pipe(filter(() => this.isClosed())).subscribe(() => this.show())\n\n triggerStrategy.hide$.pipe(filter(() => this.isOpen())).subscribe(() => this.hide())\n }\n\n protected createTriggerStrategy(): NbTriggerStrategy {\n return this.triggerStrategyBuilder\n .trigger(NbTrigger.FOCUS)\n .host(this.hostRef.nativeElement)\n .container(() => this.getContainer())\n .build()\n }\n\n protected createKeyManager(): NbActiveDescendantKeyManager<NbOptionComponent<T>> {\n const keyManager = this.activeDescendantKeyManagerFactory.create(this.autocomplete().options, this.injector)\n this.keyManager = keyManager\n keyManager.change\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => this.activeOption.set(keyManager.activeItem ?? undefined))\n return keyManager\n }\n\n protected setHostInputValue(value: T | string) {\n this.hostRef.nativeElement.value = this.getDisplayValue(value)\n }\n\n protected createPositionStrategy(): NbAdjustableConnectedPositionStrategy {\n return this.positionBuilder\n .connectedTo(this.overlayHost() || this.hostRef)\n .position(NbPosition.BOTTOM)\n .offset(this.overlayOffset())\n .adjustment(NbAdjustment.VERTICAL)\n // As for nb-select: without room for the whole list, it gets the space there is and scrolls.\n .withFlexibleDimensions(true)\n .withViewportMargin(8 + this.overlayOffset())\n }\n\n protected subscribeOnOverlayKeys(\n overlayRef: NbOverlayRef,\n keyManager: NbActiveDescendantKeyManager<NbOptionComponent<T>>\n ) {\n overlayRef\n .keydownEvents()\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe((event: KeyboardEvent) => {\n if (event.key === 'Escape' && !isComposing(event) && this.isOpen()) {\n // Only the options close, not a dialog or window the input is in.\n event.preventDefault()\n event.stopPropagation()\n this.hostRef.nativeElement.focus()\n this.hide()\n } else if (event.key === 'Enter' && !isComposing(event)) {\n event.preventDefault()\n const activeItem = this.getActiveItem()\n if (!activeItem) {\n return\n }\n this.handleInputValueUpdate(activeItem.value(), true)\n } else {\n keyManager.onKeydown(event)\n this.scrollToOption(keyManager.activeItemIndex || 0)\n }\n })\n }\n\n protected setActiveItem() {\n // With `activeFirst` the first option is active, otherwise none.\n const mode = this.autocomplete().activeFirst()\n ? NbKeyManagerActiveItemMode.FIRST_ACTIVE\n : NbKeyManagerActiveItemMode.RESET_ACTIVE\n this.keyManager?.setActiveItem(mode)\n this.activeOption.set(this.keyManager?.activeItem ?? undefined)\n }\n\n protected attachToOverlay() {\n let overlayRef = this.overlayRef\n if (!overlayRef) {\n this.setupAutocomplete()\n overlayRef = this.initOverlay()\n }\n overlayRef.attach(this.autocomplete().portal())\n this.opened.set(true)\n }\n\n protected createOverlay(positionStrategy: NbAdjustableConnectedPositionStrategy): NbOverlayRef {\n const scrollStrategy = this.createScrollStrategy()\n const overlayRef = this.overlay.create({\n positionStrategy,\n scrollStrategy,\n panelClass: this.autocomplete().optionsPanelClass()\n })\n this.overlayRef = overlayRef\n // The overlay can also detach itself, e.g. through its scroll strategy.\n overlayRef.detachments().pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => this.opened.set(false))\n return overlayRef\n }\n\n protected initOverlay(): NbOverlayRef {\n const positionStrategy = this.createPositionStrategy()\n this.positionStrategy = positionStrategy\n\n const keyManager = this.createKeyManager()\n this.subscribeOnPositionChange(positionStrategy)\n this.subscribeOnOptions()\n const overlayRef = this.createOverlay(positionStrategy)\n this.subscribeOnOverlayKeys(overlayRef, keyManager)\n return overlayRef\n }\n\n protected createScrollStrategy(): NbScrollStrategy {\n return this.overlay.scrollStrategies[this.scrollStrategy()]()\n }\n\n protected shouldShow(): boolean {\n return this.isClosed()\n }\n\n private scrollToOption(index: number) {\n const autocomplete = this.autocomplete()\n const list = autocomplete.list()\n const listElement = list?.list()\n const options = autocomplete.options()\n const labelCount = this.countGroupLabelsBeforeOption(index, options, autocomplete.optionGroups())\n\n if (index === 0 && labelCount === 1) {\n // At the first option of the first group the list scrolls to the top, so that the group's label shows too.\n list?.setScrollTop(0)\n } else if (list && listElement) {\n const option = options[index]\n if (option) {\n const element = option.getHostElement()\n const newScrollPosition = this.getOptionScrollPosition(\n element.offsetTop,\n element.offsetHeight,\n list.getScrollTop(),\n listElement.nativeElement.offsetHeight\n )\n\n list.setScrollTop(newScrollPosition)\n }\n }\n }\n\n /**\n * The position of the option's group among the groups, counting from 1, or 0 for an option outside groups.\n */\n countGroupLabelsBeforeOption(\n optionIndex: number,\n options: ReadonlyArray<NbOptionComponent<T>>,\n optionGroups: ReadonlyArray<NbOptionGroupComponent>\n ): number {\n const group = options[optionIndex]?.group\n return group ? optionGroups.indexOf(group) + 1 : 0\n }\n\n getOptionScrollPosition(\n optionOffset: number,\n optionHeight: number,\n currentScrollPosition: number,\n portalHeight: number\n ): number {\n if (optionOffset < currentScrollPosition) {\n return optionOffset\n }\n\n if (optionOffset + optionHeight > currentScrollPosition + portalHeight) {\n return Math.max(0, optionOffset - portalHeight + optionHeight)\n }\n\n return currentScrollPosition\n }\n}\n","import { NgModule } from '@angular/core'\n\nimport { NbOverlayModule } from '@liquid-js/lyr-core/cdk'\nimport { NbCardModule } from '@liquid-js/lyr-core/card'\nimport { FormsModule } from '@angular/forms'\nimport { NbOptionModule } from '../option/option-list.module'\nimport { NbAutocompleteComponent } from './autocomplete.component'\nimport { NbAutocompleteDirective } from './autocomplete.directive'\n\nconst NB_AUTOCOMPLETE_COMPONENTS = [\n NbAutocompleteComponent,\n NbAutocompleteDirective\n]\n\n@NgModule({\n imports: [\n FormsModule,\n NbOverlayModule,\n NbCardModule,\n NbOptionModule,\n ...NB_AUTOCOMPLETE_COMPONENTS\n ],\n exports: [...NB_AUTOCOMPLETE_COMPONENTS, NbOptionModule]\n})\nexport class NbAutocompleteModule {\n}\n","import { Directive, ElementRef, inject, input, output } from '@angular/core'\n\nimport { ENTER } from '@angular/cdk/keycodes'\nimport { NbFormFieldControl } from '@liquid-js/lyr-core/form-field'\nimport { NbInputDirective } from '@liquid-js/lyr-core/input'\nimport { NbAutocompleteDirective } from '../autocomplete/autocomplete.directive'\n\nexport interface NbTagInputAddEvent {\n input: ElementRef<HTMLInputElement>\n value: string\n}\n\n/**\n * An input in an `nb-tag-list` that adds tags: it emits `tagAdd` on a separator key, and a managed list turns its\n * text into tags. It's an `nbInput`, and its `fieldSize`, `status` and `shape` style the whole list.\n *\n * @stacked-example(Tag Input, tag/tag-input.component)\n * @additional-example(Tag Input with Autocomplete, tag/tag-input-with-autocomplete.component)\n * @styles\n *\n * tag-list-tiny-tag-offset:\n * tag-list-small-tag-offset:\n * tag-list-medium-tag-offset:\n * tag-list-large-tag-offset:\n * tag-list-giant-tag-offset:\n * tag-list-with-input-tiny-padding:\n * tag-list-with-input-small-padding:\n * tag-list-with-input-medium-padding:\n * tag-list-with-input-large-padding:\n * tag-list-with-input-giant-padding:\n * tag-list-with-input-rectangle-border-radius:\n * tag-list-with-input-semi-round-border-radius:\n * tag-list-with-input-round-border-radius:\n * tag-input-min-width:\n * tag-input-text-font-family:\n * tag-input-placeholder-text-font-family:\n * tag-input-basic-background-color:\n * tag-input-basic-border-color:\n * tag-input-basic-text-color:\n * tag-input-basic-placeholder-text-color:\n * tag-input-basic-focus-background-color:\n * tag-input-basic-focus-border-color:\n * tag-input-basic-hover-background-color:\n * tag-input-basic-hover-border-color:\n * tag-input-basic-focus-and-hover-background-color:\n * tag-input-basic-focus-and-hover-border-color:\n * tag-input-basic-disabled-background-color:\n * tag-input-basic-disabled-border-color:\n * tag-input-basic-disabled-text-color:\n * tag-input-basic-disabled-placeholder-text-color:\n * tag-input-primary-background-color:\n * tag-input-primary-border-color:\n * tag-input-primary-text-color:\n * tag-input-primary-placeholder-text-color:\n * tag-input-primary-focus-background-color:\n * tag-input-primary-focus-border-color:\n * tag-input-primary-hover-background-color:\n * tag-input-primary-hover-border-color:\n * tag-input-primary-focus-and-hover-background-color:\n * tag-input-primary-focus-and-hover-border-color:\n * tag-input-primary-disabled-background-color:\n * tag-input-primary-disabled-border-color:\n * tag-input-primary-disabled-text-color:\n * tag-input-primary-disabled-placeholder-text-color:\n * tag-input-success-background-color:\n * tag-input-success-border-color:\n * tag-input-success-text-color:\n * tag-input-success-placeholder-text-color:\n * tag-input-success-focus-background-color:\n * tag-input-success-focus-border-color:\n * tag-input-success-hover-background-color:\n * tag-input-success-hover-border-color:\n * tag-input-success-focus-and-hover-background-color:\n * tag-input-success-focus-and-hover-border-color:\n * tag-input-success-disabled-background-color:\n * tag-input-success-disabled-border-color:\n * tag-input-success-disabled-text-color:\n * tag-input-success-disabled-placeholder-text-color:\n * tag-input-info-background-color:\n * tag-input-info-border-color:\n * tag-input-info-text-color:\n * tag-input-info-placeholder-text-color:\n * tag-input-info-focus-background-color:\n * tag-input-info-focus-border-color:\n * tag-input-info-hover-background-color:\n * tag-input-info-hover-border-color:\n * tag-input-info-focus-and-hover-background-color:\n * tag-input-info-focus-and-hover-border-color:\n * tag-input-info-disabled-background-color:\n * tag-input-info-disabled-border-color:\n * tag-input-info-disabled-text-color:\n * tag-input-info-disabled-placeholder-text-color:\n * tag-input-warning-background-color:\n * tag-input-warning-border-color:\n * tag-input-warning-text-color:\n * tag-input-warning-placeholder-text-color:\n * tag-input-warning-focus-background-color:\n * tag-input-warning-focus-border-color:\n * tag-input-warning-hover-background-color:\n * tag-input-warning-hover-border-color:\n * tag-input-warning-focus-and-hover-background-color:\n * tag-input-warning-focus-and-hover-border-color:\n * tag-input-warning-disabled-background-color:\n * tag-input-warning-disabled-border-color:\n * tag-input-warning-disabled-text-color:\n * tag-input-warning-disabled-placeholder-text-color:\n * tag-input-danger-background-color:\n * tag-input-danger-border-color:\n * tag-input-danger-text-color:\n * tag-input-danger-placeholder-text-color:\n * tag-input-danger-focus-background-color:\n * tag-input-danger-focus-border-color:\n * tag-input-danger-hover-background-color:\n * tag-input-danger-hover-border-color:\n * tag-input-danger-focus-and-hover-background-color:\n * tag-input-danger-focus-and-hover-border-color:\n * tag-input-danger-disabled-background-color:\n * tag-input-danger-disabled-border-color:\n * tag-input-danger-disabled-text-color:\n * tag-input-danger-disabled-placeholder-text-color:\n * tag-input-control-background-color:\n * tag-input-control-border-color:\n * tag-input-control-text-color:\n * tag-input-control-placeholder-text-color:\n * tag-input-control-focus-background-color:\n * tag-input-control-focus-border-color:\n * tag-input-control-hover-background-color:\n * tag-input-control-hover-border-color:\n * tag-input-control-focus-and-hover-background-color:\n * tag-input-control-focus-and-hover-border-color:\n * tag-input-control-disabled-background-color:\n * tag-input-control-disabled-border-color:\n * tag-input-control-disabled-text-color:\n * tag-input-control-disabled-placeholder-text-color:\n * tag-input-tiny-text-font-size:\n * tag-input-tiny-text-font-weight:\n * tag-input-tiny-text-line-height:\n * tag-input-tiny-placeholder-text-font-size:\n * tag-input-tiny-placeholder-text-font-weight:\n * tag-input-tiny-placeholder-text-line-height:\n * tag-input-tiny-padding:\n * tag-input-small-text-font-size:\n * tag-input-small-text-font-weight:\n * tag-input-small-text-line-height:\n * tag-input-small-placeholder-text-font-size:\n * tag-input-small-placeholder-text-font-weight:\n * tag-input-small-placeholder-text-line-height:\n * tag-input-small-padding:\n * tag-input-medium-text-font-size:\n * tag-input-medium-text-font-weight:\n * tag-input-medium-text-line-height:\n * tag-input-medium-placeholder-text-font-size:\n * tag-input-medium-placeholder-text-font-weight:\n * tag-input-medium-placeholder-text-line-height:\n * tag-input-medium-padding:\n * tag-input-large-text-font-size:\n * tag-input-large-text-font-weight:\n * tag-input-large-text-line-height:\n * tag-input-large-placeholder-text-font-size:\n * tag-input-large-placeholder-text-font-weight:\n * tag-input-large-placeholder-text-line-height:\n * tag-input-large-padding:\n * tag-input-giant-text-font-size:\n * tag-input-giant-text-font-weight:\n * tag-input-giant-text-line-height:\n * tag-input-giant-placeholder-text-font-size:\n * tag-input-giant-placeholder-text-font-weight:\n * tag-input-giant-placeholder-text-line-height:\n * tag-input-giant-padding:\n */\n@Directive({\n selector: 'input[nbTagInput]',\n exportAs: 'nbTagInput',\n providers: [\n { provide: NbFormFieldControl, useExisting: NbTagInputDirective }\n ],\n host: {\n 'class': 'nb-tag-input',\n '(keydown)': '_onKeydown($event)'\n }\n})\nexport class NbTagInputDirective extends NbInputDirective {\n readonly _hostElement = inject<ElementRef<HTMLInputElement>>(ElementRef)\n protected readonly autocomplete = inject<NbAutocompleteDirective<unknown>>(\n NbAutocompleteDirective, { optional: true, self: true }\n )\n\n get _value(): string {\n return this._hostElement.nativeElement.value\n }\n\n /**\n * Key codes that emit `tagAdd`; Enter by default. A managed list also splits pasted text by the characters they\n * type.\n */\n readonly separatorKeys = input<number[]>([ENTER])\n\n /**\n * Emits the input's text when a separator key is pressed; an Enter that picks an autocomplete option doesn't.\n */\n readonly tagAdd = output<NbTagInputAddEvent>()\n\n // eslint-disable-next-line @typescript-eslint/no-deprecated -- separatorKeys are key codes, as Angular Material's separatorKeyCodes; a code also leaves out the Enter that ends an IME composition in Safari (229).\n _onKeydown({ keyCode }: KeyboardEvent) {\n // An Enter key that selects an autocomplete option adds that option rather than the typed text.\n if (this.isSeparatorKey(keyCode) && !(keyCode === ENTER && this.autocomplete?.hasActiveOption)) {\n this.tagAdd.emit({ value: this._value, input: this._hostElement })\n }\n }\n\n protected isSeparatorKey(keyCode: number): boolean {\n return this.separatorKeys().includes(keyCode)\n }\n}\n","import {\n Component,\n computed,\n contentChild,\n contentChildren,\n DestroyRef,\n effect,\n ElementRef,\n forwardRef,\n inject,\n Injector,\n input,\n linkedSignal,\n model,\n numberAttribute,\n output,\n signal,\n untracked,\n viewChildren\n} from '@angular/core'\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms'\nimport { outputToObservable, takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop'\nimport { EMPTY, fromEvent, merge } from 'rxjs'\nimport { filter, map, switchMap } from 'rxjs/operators'\n\nimport { injectNbDefaults, NbLayoutDirectionService, NbStatusService, ɵisComposing as isComposing, ɵconvertToBoolProperty as convertToBoolProperty, NbBooleanInput, NbComponentSize, ɵenableTransitionsAfterRender as enableTransitionsAfterRender, ɵsameControlValue as sameControlValue } from '@liquid-js/lyr-core/base'\nimport { NbFocusMonitor, ɵNbActiveDescendantKeyManager as NbActiveDescendantKeyManager, ɵNbActiveDescendantKeyManagerFactoryService as NbActiveDescendantKeyManagerFactoryService } from '@liquid-js/lyr-core/cdk'\nimport { COMMA, ENTER, SEMICOLON, SPACE, TAB } from '@angular/cdk/keycodes'\nimport { NbValidationDirective } from '@liquid-js/lyr-core/validation'\nimport { NbAutocompleteRef } from '../autocomplete/autocomplete-ref'\nimport { NbTagComponent } from './tag.component'\nimport { NB_TAG_LIST_SIZE } from './tag-list-size'\nimport { NbTagInputDirective } from './tag-input.directive'\n\n// The characters separator keys type, which also split pasted or blurred text into tags.\nconst SEPARATOR_CHARACTERS: Record<number, string> = { [COMMA]: ',', [SEMICOLON]: ';', [SPACE]: ' ', [TAB]: '\\t', [ENTER]: '\\n' }\n\n/**\n * A list of `nb-tag`s, placed in it or managed from a value, with an optional `nbTagInput` to add more.\n *\n * @stacked-example(Tag List Showcase, tag/tag-showcase.component)\n *\n * Bound to a form control, `ngModel` or `[(value)]`, the tag list manages its tags: it shows one for each string of\n * the value, adds what's typed into its `nbTagInput` when a separator key is pressed, the input loses focus, or a\n * list is pasted, and removes tags with their cross or the Backspace or Delete key. Duplicates are skipped, and text\n * `tagValidator` rejects stays in the input to be corrected.\n *\n * Focused, the list moves through its tags with the arrow keys; Space selects the active tag (one at a time, unless\n * `multiple`), and Backspace or Delete removes it. Backspace in an empty input moves to the last tag.\n * @stacked-example(Form control, tag/tag-form.component)\n *\n * The input's `fieldSize`, `status` and `shape` style the whole list, as an `nbInput`'s style its field, and tags\n * placed in the list take its size unless they set their own. The list has a field's colours, but keeps its\n * background under the pointer, and a filled basic tag in it darkens under the pointer rather than lightening, so\n * the tags never match the field:\n * @stacked-example(Sizes, tag/tag-list-sizes.component)\n * @styles\n *\n * tag-list-tiny-tag-offset:\n * tag-list-small-tag-offset:\n * tag-list-medium-tag-offset:\n * tag-list-large-tag-offset:\n * tag-list-giant-tag-offset:\n * tag-list-with-input-tiny-padding:\n * tag-list-with-input-small-padding:\n * tag-list-with-input-medium-padding:\n * tag-list-with-input-large-padding:\n * tag-list-with-input-giant-padding:\n * tag-list-with-input-rectangle-border-radius:\n * tag-list-with-input-semi-round-border-radius:\n * tag-list-with-input-round-border-radius:\n */\n@Component({\n selector: 'nb-tag-list',\n templateUrl: './tag-list.component.html',\n exportAs: 'nbTagList',\n providers: [\n { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => NbTagListComponent), multi: true },\n // Tags placed in the list take its size.\n { provide: NB_TAG_LIST_SIZE, useFactory: () => inject(NbTagListComponent).tagSize }\n ],\n imports: [NbTagComponent],\n host: {\n '[class]': '_inputClasses()',\n '[class.nb-tag-list-with-input]': '_hasInput()',\n '[class.focus]': '_isFocused()',\n '[class.disabled]': 'isDisabled()',\n '[class.input-full-width]': '_isFullWidth()',\n '[attr.tabindex]': 'tabIndex()',\n '[attr.role]': 'role()',\n '[attr.aria-multiselectable]': 'multiple()',\n '[attr.aria-activedescendant]': 'activeTagId()',\n '(keydown)': '_onKeydown($event)',\n '(click)': '_onClick($event)'\n }\n})\nexport class NbTagListComponent implements ControlValueAccessor {\n // The app's defaults for this type, which the inputs below start from.\n protected readonly nbDefaults = injectNbDefaults('tag')\n\n protected readonly hostElement = inject<ElementRef<HTMLElement>>(ElementRef)\n protected readonly focusMonitor = inject(NbFocusMonitor)\n protected readonly activeDescendantKeyManagerFactory = inject(\n NbActiveDescendantKeyManagerFactoryService\n ) as NbActiveDescendantKeyManagerFactoryService<NbTagComponent>\n protected readonly directionService = inject(NbLayoutDirectionService)\n protected readonly statusService = inject(NbStatusService)\n protected readonly destroyRef = inject(DestroyRef)\n protected readonly validation = inject(NbValidationDirective, { self: true, optional: true })\n\n protected readonly contentTags = contentChildren(NbTagComponent)\n protected readonly valueTags = viewChildren(NbTagComponent)\n\n /**\n * All tags of the list: the ones it shows for its value, then the ones placed in it.\n */\n readonly tags = computed(() => [...this.valueTags(), ...this.contentTags()])\n readonly tagInput = contentChild(NbTagInputDirective)\n readonly autocompleteDirective = contentChild(NbAutocompleteRef)\n\n /**\n * The size of the tags and their spacing. With an `nbTagInput`, the input's `fieldSize` sizes the list and its tags\n * instead, as its `status` and `shape` style it.\n */\n readonly sizeInput = input<NbComponentSize | undefined>(undefined, { alias: 'size' })\n /** The size in use: the input's, the app's default, or 'medium'. */\n readonly size = linkedSignal<NbComponentSize>(() => this.sizeInput() ?? this.nbDefaults().size ?? 'medium')\n\n /** Tabindex of the list, e.g. `tabIndex=\"-1\"`, as a select's. */\n readonly tabIndex = input<number, unknown>(0, { transform: numberAttribute })\n\n readonly role = input<string>('listbox')\n\n /** Lets several tags be selected at once; otherwise selecting a tag deselects the others. */\n readonly multiple = input<boolean, NbBooleanInput>(false, { transform: convertToBoolProperty })\n\n /**\n * The tags, when the list manages them; usually bound through a form control or `ngModel` instead.\n * Leave it unset to place `nb-tag`s in the list yourself.\n */\n readonly value = model<string[]>()\n\n /**\n * Decides whether typed text can become a tag; rejected text stays in the input.\n */\n readonly tagValidator = input<(tag: string) => boolean>(() => true)\n\n /**\n * Whether text left in the input becomes tags when the input loses focus.\n */\n readonly addOnBlur = input<boolean, NbBooleanInput>(true, { transform: convertToBoolProperty })\n\n /**\n * Whether the list shows and edits the tags of its value.\n */\n readonly managed = computed(() => this.value() !== undefined)\n\n /** Disables the list: its input, and removing its tags. */\n readonly disabled = input<boolean, NbBooleanInput>(false, { transform: convertToBoolProperty })\n\n /**\n * Whether it's disabled: the `disabled` input, or the form's disabled state, whichever changed last. A managed list\n * sets its input's disabled state from this.\n */\n readonly isDisabled = linkedSignal(() => this.disabled())\n\n /**\n * Emits a tag the user removes, with its cross or the Backspace or Delete key. A managed list also takes it out of\n * its value; otherwise the app does.\n */\n readonly tagRemove = output<NbTagComponent>()\n\n protected readonly focused = signal(false)\n\n readonly activeTagId = signal<string | undefined>(undefined)\n\n protected readonly keyManager: NbActiveDescendantKeyManager<NbTagComponent> = this.activeDescendantKeyManagerFactory\n .create(this.tags, inject(Injector))\n .withHorizontalOrientation(this.directionService.getDirection())\n .withWrap()\n\n readonly _hasInput = computed(() => !!this.tagInput())\n\n readonly _isFocused = this.focused.asReadonly()\n\n readonly _isFullWidth = computed(() => !!this.tagInput()?.fullWidth())\n\n readonly _inputClasses = computed(() => {\n const tagInput = this.tagInput()\n if (tagInput) {\n return [\n `shape-${tagInput.shape()}`,\n `size-${tagInput.fieldSize()}`,\n // With `nbValidation`, the status it gives while the list shows errors or success.\n this.statusService.getStatusClass(this.validation?.status() ?? tagInput.status())\n ]\n }\n\n return [`size-${this.size()}`]\n })\n\n /** The size of the list's tags: its input's `fieldSize`, or its `size` without an input. */\n readonly tagSize = computed(() => this.tagInput()?.fieldSize() ?? this.size())\n\n protected onChange: (value: string[]) => void = () => undefined\n protected onTouched = () => {}\n\n constructor() {\n enableTransitionsAfterRender(this.hostElement.nativeElement)\n this.validation?.delegateAria()\n\n // The input carries the field's state for forms and assistive technology.\n effect(() => {\n const element = this.tagInput()?._hostElement.nativeElement\n if (element && this.managed()) {\n element.disabled = this.isDisabled()\n }\n if (element && this.validation) {\n setOrRemoveAttribute(element, 'aria-invalid', this.validation.ariaInvalid())\n setOrRemoveAttribute(element, 'aria-describedby', this.validation.describedBy())\n // An `nbLabel` names the input; without one, it keeps a name of its own.\n const labelledBy = this.validation.labelledBy()\n if (labelledBy) {\n element.setAttribute('aria-labelledby', labelledBy)\n }\n setOrRemoveAttribute(element, 'aria-required', this.validation.ariaRequired())\n }\n })\n\n toObservable(this.tagInput)\n .pipe(\n switchMap((tagInput) => {\n if (!tagInput) {\n return EMPTY\n }\n const element = tagInput._hostElement.nativeElement\n return merge(\n outputToObservable(tagInput.tagAdd).pipe(map(() => 'separator')),\n fromEvent(element, 'blur').pipe(\n filter(() => this.addOnBlur()),\n map(() => 'blur')\n ),\n // Pasted lists become tags once the text is in the input.\n fromEvent(element, 'paste').pipe(map(() => 'paste'))\n ).pipe(map((trigger) => ({ tagInput, trigger })))\n }),\n filter(() => this.managed() && !this.isDisabled()),\n takeUntilDestroyed()\n )\n .subscribe(({ tagInput, trigger }) => {\n if (trigger === 'paste') {\n setTimeout(() => this.addFromInput(tagInput, true))\n } else {\n this.addFromInput(tagInput, false)\n }\n })\n\n this.focusMonitor\n .monitor(this.hostElement, true)\n .pipe(\n map((origin) => !!origin),\n takeUntilDestroyed()\n )\n .subscribe((isFocused: boolean) => untracked(() => this.onFocusChange(isFocused)))\n this.destroyRef.onDestroy(() => this.focusMonitor.stopMonitoring(this.hostElement))\n\n this.keyManager.change\n .pipe(takeUntilDestroyed())\n .subscribe(() => this.activeTagId.set(this.keyManager.activeItem?._id))\n\n effect(() => this.keyManager.withHorizontalOrientation(this.directionService.direction()))\n\n // The autocomplete options open below the whole list, not just the input.\n effect(() => this.autocompleteDirective()?.overlayHost.set(this.hostElement))\n\n effect(() => {\n if (this.tags().length === 0) {\n untracked(() => this.focusInputIfActive())\n }\n })\n\n const tags$ = toObservable(this.tags)\n tags$\n .pipe(\n switchMap((tags) => merge(...tags.map((tag) => outputToObservable(tag.remove)))),\n takeUntilDestroyed()\n )\n .subscribe((tagToRemove: NbTagComponent) => {\n this.tagRemove.emit(tagToRemove)\n if (this.managed() && !this.isDisabled() && this.valueTags().includes(tagToRemove)) {\n this.setValue((this.value() ?? []).filter((tag) => tag !== tagToRemove.text()))\n }\n })\n\n tags$\n .pipe(\n switchMap((tags) => merge(...tags.map((tag) => tag.destroy$))),\n filter((destroyedTag: NbTagComponent) => destroyedTag === this.keyManager.activeItem),\n map((destroyedTag: NbTagComponent) => destroyedTag === this.tags().at(-1)),\n takeUntilDestroyed()\n )\n .subscribe((isLastTagDestroyed: boolean) => {\n if (isLastTagDestroyed) {\n this.keyManager.setPreviousItemActive()\n } else {\n this.keyManager.setNextItemActive()\n }\n })\n }\n\n _onKeydown(event: KeyboardEvent) {\n const tagInput = this.tagInput()\n if (event.target === this.hostElement.nativeElement) {\n this.handleListKeydown(event)\n } else if (tagInput && event.target === tagInput._hostElement.nativeElement) {\n this.handleInputKeydown(event, tagInput)\n }\n }\n\n _onClick({ target }: MouseEvent) {\n // The tag clicked anywhere in, e.g. on its text, but not on its remove button, which removes it.\n const element = target instanceof Element ? target : null\n const clickedTag = element?.closest('.nb-tag-remove')\n ? undefined\n : this.tags().find((tag: NbTagComponent) => tag._hostElement.nativeElement.contains(element))\n if (clickedTag) {\n this.toggleTag(clickedTag)\n this.keyManager.setActiveItem(clickedTag)\n }\n }\n\n protected handleListKeydown(event: KeyboardEvent) {\n this.keyManager.onKeydown(event)\n\n const activeTag = this.keyManager.activeItem\n if (!activeTag) {\n return\n }\n if (event.key === ' ') {\n this.toggleTag(activeTag)\n // Prevents page scroll.\n event.preventDefault()\n } else if (this.isBackspaceOrDelete(event.key)) {\n activeTag._remove()\n // Backspace's default action outside a text field is going back, in Safari and others.\n event.preventDefault()\n }\n }\n\n protected handleInputKeydown(event: KeyboardEvent, tagInput: NbTagInputDirective) {\n if (tagInput._value === '' && this.isBackspaceOrDelete(event.key) && !isComposing(event) && this.tags().length > 0) {\n // Focus moves to the list before the key's default action runs, which there would be going back.\n event.preventDefault()\n this.hostElement.nativeElement.focus()\n this.keyManager.setLastItemActive()\n }\n }\n\n // Untracked, as forms write values from wherever the app sets them, e.g. an effect that mustn't come to depend\n // on the control.\n writeValue(value?: string[] | null) {\n untracked(() => {\n const next = value ?? []\n if (!sameControlValue(this.value(), next)) {\n this.value.set(next)\n }\n })\n }\n\n registerOnChange(fn: (value: string[]) => void) {\n this.onChange = fn\n }\n\n registerOnTouched(fn: () => void) {\n this.onTouched = fn\n }\n\n setDisabledState(isDisabled: boolean) {\n this.isDisabled.set(isDisabled)\n }\n\n /**\n * Adds tags to a managed list, skipping empty ones and ones it already has.\n */\n addTags(tags: string[]) {\n const value = this.value() ?? []\n const added = tags\n .map((tag) => tag.trim())\n .filter((tag, i, all) => tag && !value.includes(tag) && all.indexOf(tag) === i)\n if (added.length) {\n this.setValue([...value, ...added])\n }\n }\n\n protected setValue(value: string[]) {\n this.value.set(value)\n this.onChange(value)\n }\n\n // Turns the input's text into tags; with `whenSeparated`, only when it holds separated parts, as a pasted list does.\n protected addFromInput(tagInput: NbTagInputDirective, whenSeparated: boolean) {\n const separators = [...new Set([...tagInput.separatorKeys().map((key) => SEPARATOR_CHARACTERS[key]), '\\n'])]\n .filter(Boolean)\n const parts = this.split(tagInput._value, separators)\n if (whenSeparated && parts.length < 2) {\n return\n }\n const validator = this.tagValidator()\n const value = this.value() ?? []\n const rejected = parts.filter((part) => !value.includes(part) && !validator(part))\n this.addTags(parts.filter((part) => validator(part)))\n // Rejected parts stay in the input, separated as they were typed.\n const separator = separators.find((candidate) => candidate.trim()) ?? ''\n tagInput._hostElement.nativeElement.value = rejected.join(`${separator} `)\n }\n\n protected split(text: string, separators: string[]): string[] {\n let parts = [text]\n for (const separator of separators) {\n parts = parts.flatMap((part) => part.split(separator))\n }\n return parts.map((part) => part.trim()).filter(Boolean)\n }\n\n protected onFocusChange(isFocused: boolean) {\n this.focused.set(isFocused)\n if (!isFocused) {\n this.onTouched()\n }\n\n if (!isFocused || this.tagInput()?.focused()) {\n this.keyManager.setActiveItem(-1)\n return\n }\n\n // Focus input when focusing tag list without tags. Otherwise select first tag.\n if (this.tags().length === 0 && this._hasInput()) {\n this.focusInput()\n } else {\n this.keyManager.setFirstItemActive()\n }\n }\n\n protected isBackspaceOrDelete(key: string): boolean {\n return key === 'Backspace' || key === 'Delete'\n }\n\n protected toggleTag(tagToToggle: NbTagComponent) {\n tagToToggle._toggleSelection()\n\n if (tagToToggle.isSelected() && !this.multiple()) {\n this.tags().forEach((tag: NbTagComponent) => {\n if (tag !== tagToToggle) {\n tag.setSelected(false)\n }\n })\n }\n }\n\n protected focusInput() {\n this.tagInput()?._hostElement.nativeElement.focus()\n }\n\n protected focusInputIfActive() {\n if (this._isFocused()) {\n this.focusInput()\n }\n }\n}\n\nfunction setOrRemoveAttribute(element: HTMLElement, name: string, value: string | null) {\n if (value === null) {\n element.removeAttribute(name)\n } else {\n element.setAttribute(name, value)\n }\n}\n","<div class=\"nb-tag-list-tags-wrapper\">\n @if (managed()) {\n @for (tag of value(); track tag) {\n <nb-tag [text]=\"tag\"\n [removable]=\"!isDisabled()\"\n [size]=\"tagSize()\" />\n }\n }\n <ng-content select=\"nb-tag, input[nbTagInput]\" />\n</div>\n","import { NgModule } from '@angular/core'\n\nimport { NbIconModule } from '@liquid-js/lyr-core/icon'\nimport { NbTagComponent } from './tag.component'\nimport { NbTagListComponent } from './tag-list.component'\nimport { NbTagInputDirective } from './tag-input.directive'\n\n@NgModule({\n imports: [\n NbIconModule,\n NbTagComponent,\n NbTagListComponent,\n NbTagInputDirective\n ],\n exports: [NbTagComponent, NbTagListComponent, NbTagInputDirective]\n})\nexport class NbTagModule { }\n"],"mappings":";;;;;;;;;;;;;;;;AAOA,MAAa,4BAA4B,IAAI,eAAkC,2BAA2B;ACJ1G,MAAa,yBAAyB;ACCtC,IAAI,oBAAoB;AA4BxB,IAAa,yBAAb,MAAa,uBAAsB;CAZnC,cAAA;EAauB,KAAA,aAAa,OAAgC,UAAU;EACvD,KAAA,UAAU,yBAAyB;EAE7C,KAAA,QAAQ,MAAe,GAAA,YAAA,CAAA,QAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;EAKvB,KAAA,WAAW,MAA+B,OAAK;GAAA,GAAA,YAAA,EAAA,WAAA,WAAA,+BAAA,CAAA;GAAI,WAAWA;EAAqB,CAAA;EAGzE,KAAA,UAAU,OAAO,IAAI,MAAK,GAAkC,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;EAC5D,KAAA,cAAc,eAAc;GAC3C,MAAM,UAAU,KAAK,QAAO;GAC5B,OAAO,QAAQ,SAAS,KAAK,QAAQ,OAAO,WAAW,OAAO,SAAQ,CAAE;EAC5E,GAAE,GAAA,YAAA,CAAA,EAAA,WAAA,cAAA,CAAA,+BAAA,CAAA,CAAA;CAoBL;CAlBG,UAAU,QAAqC;EAC3C,KAAK,QAAQ,QAAQ,YAAY,CAAC,GAAG,SAAS,MAAM,CAAC;CACzD;CAEA,aAAa,QAAqC;EAC9C,KAAK,QAAQ,QAAQ,YAAY,Q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