@angular/cdk 21.0.0-next.0 → 21.0.0-next.2

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.
Files changed (89) hide show
  1. package/a11y/index.d.ts +3 -34
  2. package/a11y-module.d.d.ts +1 -7
  3. package/fesm2022/a11y-module.mjs +24 -32
  4. package/fesm2022/a11y-module.mjs.map +1 -1
  5. package/fesm2022/a11y.mjs +13 -31
  6. package/fesm2022/a11y.mjs.map +1 -1
  7. package/fesm2022/accordion.mjs +10 -10
  8. package/fesm2022/accordion.mjs.map +1 -1
  9. package/fesm2022/activedescendant-key-manager.mjs.map +1 -1
  10. package/fesm2022/array.mjs.map +1 -1
  11. package/fesm2022/bidi.mjs +7 -7
  12. package/fesm2022/bidi.mjs.map +1 -1
  13. package/fesm2022/breakpoints-observer.mjs +6 -6
  14. package/fesm2022/breakpoints-observer.mjs.map +1 -1
  15. package/fesm2022/cdk.mjs +1 -1
  16. package/fesm2022/cdk.mjs.map +1 -1
  17. package/fesm2022/clipboard.mjs +10 -10
  18. package/fesm2022/clipboard.mjs.map +1 -1
  19. package/fesm2022/coercion/private.mjs.map +1 -1
  20. package/fesm2022/coercion.mjs.map +1 -1
  21. package/fesm2022/css-pixel-value.mjs.map +1 -1
  22. package/fesm2022/data-source.mjs.map +1 -1
  23. package/fesm2022/dialog.mjs +10 -10
  24. package/fesm2022/dialog.mjs.map +1 -1
  25. package/fesm2022/directionality.mjs +4 -12
  26. package/fesm2022/directionality.mjs.map +1 -1
  27. package/fesm2022/dispose-view-repeater-strategy.mjs.map +1 -1
  28. package/fesm2022/drag-drop.mjs +31 -31
  29. package/fesm2022/drag-drop.mjs.map +1 -1
  30. package/fesm2022/element.mjs.map +1 -1
  31. package/fesm2022/fake-event-detection.mjs.map +1 -1
  32. package/fesm2022/focus-key-manager.mjs.map +1 -1
  33. package/fesm2022/focus-monitor.mjs +9 -9
  34. package/fesm2022/focus-monitor.mjs.map +1 -1
  35. package/fesm2022/id-generator.mjs +3 -3
  36. package/fesm2022/id-generator.mjs.map +1 -1
  37. package/fesm2022/keycodes.mjs.map +1 -1
  38. package/fesm2022/keycodes2.mjs.map +1 -1
  39. package/fesm2022/layout.mjs +4 -4
  40. package/fesm2022/layout.mjs.map +1 -1
  41. package/fesm2022/list-key-manager.mjs.map +1 -1
  42. package/fesm2022/listbox.mjs +10 -10
  43. package/fesm2022/listbox.mjs.map +1 -1
  44. package/fesm2022/menu.mjs +49 -49
  45. package/fesm2022/menu.mjs.map +1 -1
  46. package/fesm2022/observers/private.mjs +3 -3
  47. package/fesm2022/observers/private.mjs.map +1 -1
  48. package/fesm2022/observers.mjs +13 -13
  49. package/fesm2022/observers.mjs.map +1 -1
  50. package/fesm2022/overlay-module.mjs +35 -53
  51. package/fesm2022/overlay-module.mjs.map +1 -1
  52. package/fesm2022/overlay.mjs +3 -3
  53. package/fesm2022/overlay.mjs.map +1 -1
  54. package/fesm2022/passive-listeners.mjs.map +1 -1
  55. package/fesm2022/platform.mjs +4 -4
  56. package/fesm2022/platform.mjs.map +1 -1
  57. package/fesm2022/platform2.mjs +3 -3
  58. package/fesm2022/platform2.mjs.map +1 -1
  59. package/fesm2022/portal.mjs +16 -16
  60. package/fesm2022/portal.mjs.map +1 -1
  61. package/fesm2022/private.mjs +3 -3
  62. package/fesm2022/private.mjs.map +1 -1
  63. package/fesm2022/recycle-view-repeater-strategy.mjs.map +1 -1
  64. package/fesm2022/scrolling.mjs +35 -35
  65. package/fesm2022/scrolling.mjs.map +1 -1
  66. package/fesm2022/scrolling2.mjs.map +1 -1
  67. package/fesm2022/selection-model.mjs.map +1 -1
  68. package/fesm2022/shadow-dom.mjs.map +1 -1
  69. package/fesm2022/stepper.mjs +22 -22
  70. package/fesm2022/stepper.mjs.map +1 -1
  71. package/fesm2022/style-loader.mjs +3 -3
  72. package/fesm2022/style-loader.mjs.map +1 -1
  73. package/fesm2022/table.mjs +73 -73
  74. package/fesm2022/table.mjs.map +1 -1
  75. package/fesm2022/test-environment.mjs.map +1 -1
  76. package/fesm2022/testing/selenium-webdriver.mjs.map +1 -1
  77. package/fesm2022/testing/testbed.mjs.map +1 -1
  78. package/fesm2022/testing.mjs.map +1 -1
  79. package/fesm2022/text-field.mjs +16 -16
  80. package/fesm2022/text-field.mjs.map +1 -1
  81. package/fesm2022/tree-key-manager.mjs +2 -19
  82. package/fesm2022/tree-key-manager.mjs.map +1 -1
  83. package/fesm2022/tree.mjs +30 -25
  84. package/fesm2022/tree.mjs.map +1 -1
  85. package/fesm2022/typeahead.mjs.map +1 -1
  86. package/fesm2022/unique-selection-dispatcher.mjs +3 -3
  87. package/fesm2022/unique-selection-dispatcher.mjs.map +1 -1
  88. package/package.json +1 -1
  89. package/schematics/ng-add/index.js +1 -1
@@ -152,10 +152,10 @@ class CdkOption {
152
152
  }
153
153
  return this.isActive() ? this.enabledTabIndex : -1;
154
154
  }
155
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-rc.1", ngImport: i0, type: CdkOption, deps: [], target: i0.ɵɵFactoryTarget.Directive });
156
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "20.2.0-rc.1", type: CdkOption, isStandalone: true, selector: "[cdkOption]", inputs: { id: "id", value: ["cdkOption", "value"], typeaheadLabel: ["cdkOptionTypeaheadLabel", "typeaheadLabel"], disabled: ["cdkOptionDisabled", "disabled", booleanAttribute], enabledTabIndex: ["tabindex", "enabledTabIndex", (value) => (value == null ? undefined : numberAttribute(value))] }, host: { attributes: { "role": "option" }, listeners: { "click": "_clicked.next($event)", "focus": "_handleFocus()" }, properties: { "id": "id", "attr.aria-selected": "isSelected()", "attr.tabindex": "_getTabIndex()", "attr.aria-disabled": "disabled", "class.cdk-option-active": "isActive()" }, classAttribute: "cdk-option" }, exportAs: ["cdkOption"], ngImport: i0 });
155
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: CdkOption, deps: [], target: i0.ɵɵFactoryTarget.Directive });
156
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "20.2.0-next.2", type: CdkOption, isStandalone: true, selector: "[cdkOption]", inputs: { id: "id", value: ["cdkOption", "value"], typeaheadLabel: ["cdkOptionTypeaheadLabel", "typeaheadLabel"], disabled: ["cdkOptionDisabled", "disabled", booleanAttribute], enabledTabIndex: ["tabindex", "enabledTabIndex", (value) => (value == null ? undefined : numberAttribute(value))] }, host: { attributes: { "role": "option" }, listeners: { "click": "_clicked.next($event)", "focus": "_handleFocus()" }, properties: { "id": "id", "attr.aria-selected": "isSelected()", "attr.tabindex": "_getTabIndex()", "attr.aria-disabled": "disabled", "class.cdk-option-active": "isActive()" }, classAttribute: "cdk-option" }, exportAs: ["cdkOption"], ngImport: i0 });
157
157
  }
158
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-rc.1", ngImport: i0, type: CdkOption, decorators: [{
158
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: CdkOption, decorators: [{
159
159
  type: Directive,
160
160
  args: [{
161
161
  selector: '[cdkOption]',
@@ -837,8 +837,8 @@ class CdkListbox {
837
837
  const index = this.options.toArray().indexOf(this._lastTriggered);
838
838
  return index === -1 ? null : index;
839
839
  }
840
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-rc.1", ngImport: i0, type: CdkListbox, deps: [], target: i0.ɵɵFactoryTarget.Directive });
841
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "20.2.0-rc.1", type: CdkListbox, isStandalone: true, selector: "[cdkListbox]", inputs: { id: "id", enabledTabIndex: ["tabindex", "enabledTabIndex"], value: ["cdkListboxValue", "value"], multiple: ["cdkListboxMultiple", "multiple", booleanAttribute], disabled: ["cdkListboxDisabled", "disabled", booleanAttribute], useActiveDescendant: ["cdkListboxUseActiveDescendant", "useActiveDescendant", booleanAttribute], orientation: ["cdkListboxOrientation", "orientation"], compareWith: ["cdkListboxCompareWith", "compareWith"], navigationWrapDisabled: ["cdkListboxNavigationWrapDisabled", "navigationWrapDisabled", booleanAttribute], navigateDisabledOptions: ["cdkListboxNavigatesDisabledOptions", "navigateDisabledOptions", booleanAttribute] }, outputs: { valueChange: "cdkListboxValueChange" }, host: { attributes: { "role": "listbox" }, listeners: { "focus": "_handleFocus()", "keydown": "_handleKeydown($event)", "focusout": "_handleFocusOut($event)", "focusin": "_handleFocusIn()" }, properties: { "id": "id", "attr.tabindex": "_getTabIndex()", "attr.aria-disabled": "disabled", "attr.aria-multiselectable": "multiple", "attr.aria-activedescendant": "_getAriaActiveDescendant()", "attr.aria-orientation": "orientation" }, classAttribute: "cdk-listbox" }, providers: [
840
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: CdkListbox, deps: [], target: i0.ɵɵFactoryTarget.Directive });
841
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "20.2.0-next.2", type: CdkListbox, isStandalone: true, selector: "[cdkListbox]", inputs: { id: "id", enabledTabIndex: ["tabindex", "enabledTabIndex"], value: ["cdkListboxValue", "value"], multiple: ["cdkListboxMultiple", "multiple", booleanAttribute], disabled: ["cdkListboxDisabled", "disabled", booleanAttribute], useActiveDescendant: ["cdkListboxUseActiveDescendant", "useActiveDescendant", booleanAttribute], orientation: ["cdkListboxOrientation", "orientation"], compareWith: ["cdkListboxCompareWith", "compareWith"], navigationWrapDisabled: ["cdkListboxNavigationWrapDisabled", "navigationWrapDisabled", booleanAttribute], navigateDisabledOptions: ["cdkListboxNavigatesDisabledOptions", "navigateDisabledOptions", booleanAttribute] }, outputs: { valueChange: "cdkListboxValueChange" }, host: { attributes: { "role": "listbox" }, listeners: { "focus": "_handleFocus()", "keydown": "_handleKeydown($event)", "focusout": "_handleFocusOut($event)", "focusin": "_handleFocusIn()" }, properties: { "id": "id", "attr.tabindex": "_getTabIndex()", "attr.aria-disabled": "disabled", "attr.aria-multiselectable": "multiple", "attr.aria-activedescendant": "_getAriaActiveDescendant()", "attr.aria-orientation": "orientation" }, classAttribute: "cdk-listbox" }, providers: [
842
842
  {
843
843
  provide: NG_VALUE_ACCESSOR,
844
844
  useExisting: forwardRef(() => CdkListbox),
@@ -846,7 +846,7 @@ class CdkListbox {
846
846
  },
847
847
  ], queries: [{ propertyName: "options", predicate: CdkOption, descendants: true }], exportAs: ["cdkListbox"], ngImport: i0 });
848
848
  }
849
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-rc.1", ngImport: i0, type: CdkListbox, decorators: [{
849
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: CdkListbox, decorators: [{
850
850
  type: Directive,
851
851
  args: [{
852
852
  selector: '[cdkListbox]',
@@ -912,11 +912,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-rc.1", ng
912
912
 
913
913
  const EXPORTED_DECLARATIONS = [CdkListbox, CdkOption];
914
914
  class CdkListboxModule {
915
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-rc.1", ngImport: i0, type: CdkListboxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
916
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.2.0-rc.1", ngImport: i0, type: CdkListboxModule, imports: [CdkListbox, CdkOption], exports: [CdkListbox, CdkOption] });
917
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.2.0-rc.1", ngImport: i0, type: CdkListboxModule });
915
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: CdkListboxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
916
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.2.0-next.2", ngImport: i0, type: CdkListboxModule, imports: [CdkListbox, CdkOption], exports: [CdkListbox, CdkOption] });
917
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: CdkListboxModule });
918
918
  }
919
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-rc.1", ngImport: i0, type: CdkListboxModule, decorators: [{
919
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: CdkListboxModule, decorators: [{
920
920
  type: NgModule,
921
921
  args: [{
922
922
  imports: [...EXPORTED_DECLARATIONS],
@@ -1 +1 @@
1
- {"version":3,"file":"listbox.mjs","sources":["../../../../../k8-fastbuild-ST-c646aa77115d/bin/src/cdk/listbox/listbox.ts","../../../../../k8-fastbuild-ST-c646aa77115d/bin/src/cdk/listbox/listbox-module.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n _IdGenerator,\n ActiveDescendantKeyManager,\n Highlightable,\n ListKeyManagerOption,\n} from '../a11y';\nimport {Directionality} from '../bidi';\nimport {coerceArray} from '../coercion';\nimport {SelectionModel} from '../collections';\nimport {\n A,\n DOWN_ARROW,\n END,\n ENTER,\n hasModifierKey,\n HOME,\n LEFT_ARROW,\n RIGHT_ARROW,\n SPACE,\n UP_ARROW,\n} from '../keycodes';\nimport {Platform} from '../platform';\nimport {\n AfterContentInit,\n booleanAttribute,\n ChangeDetectorRef,\n ContentChildren,\n Directive,\n ElementRef,\n forwardRef,\n inject,\n Input,\n NgZone,\n numberAttribute,\n OnDestroy,\n Output,\n QueryList,\n Renderer2,\n signal,\n} from '@angular/core';\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from '@angular/forms';\nimport {defer, merge, Observable, Subject} from 'rxjs';\nimport {filter, map, startWith, switchMap, takeUntil} from 'rxjs/operators';\n\n/**\n * An implementation of SelectionModel that internally always represents the selection as a\n * multi-selection. This is necessary so that we can recover the full selection if the user\n * switches the listbox from single-selection to multi-selection after initialization.\n *\n * This selection model may report multiple selected values, even if it is in single-selection\n * mode. It is up to the user (CdkListbox) to check for invalid selections.\n */\nclass ListboxSelectionModel<T> extends SelectionModel<T> {\n constructor(\n public multiple = false,\n initiallySelectedValues?: T[],\n emitChanges = true,\n compareWith?: (o1: T, o2: T) => boolean,\n ) {\n super(true, initiallySelectedValues, emitChanges, compareWith);\n }\n\n override isMultipleSelection(): boolean {\n return this.multiple;\n }\n\n override select(...values: T[]) {\n // The super class is always in multi-selection mode, so we need to override the behavior if\n // this selection model actually belongs to a single-selection listbox.\n if (this.multiple) {\n return super.select(...values);\n } else {\n return super.setSelection(...values);\n }\n }\n}\n\n/** A selectable option in a listbox. */\n@Directive({\n selector: '[cdkOption]',\n exportAs: 'cdkOption',\n host: {\n 'role': 'option',\n 'class': 'cdk-option',\n '[id]': 'id',\n '[attr.aria-selected]': 'isSelected()',\n '[attr.tabindex]': '_getTabIndex()',\n '[attr.aria-disabled]': 'disabled',\n '[class.cdk-option-active]': 'isActive()',\n '(click)': '_clicked.next($event)',\n '(focus)': '_handleFocus()',\n },\n})\nexport class CdkOption<T = unknown> implements ListKeyManagerOption, Highlightable, OnDestroy {\n /** The id of the option's host element. */\n @Input()\n get id() {\n return this._id || this._generatedId;\n }\n set id(value) {\n this._id = value;\n }\n private _id: string;\n private _generatedId = inject(_IdGenerator).getId('cdk-option-');\n\n /** The value of this option. */\n @Input('cdkOption') value: T;\n\n /**\n * The text used to locate this item during listbox typeahead. If not specified,\n * the `textContent` of the item will be used.\n */\n @Input('cdkOptionTypeaheadLabel') typeaheadLabel: string | null;\n\n /** Whether this option is disabled. */\n @Input({alias: 'cdkOptionDisabled', transform: booleanAttribute})\n get disabled(): boolean {\n return this.listbox.disabled || this._disabled();\n }\n set disabled(value: boolean) {\n this._disabled.set(value);\n }\n private _disabled = signal(false);\n\n /** The tabindex of the option when it is enabled. */\n @Input({\n alias: 'tabindex',\n transform: (value: unknown) => (value == null ? undefined : numberAttribute(value)),\n })\n get enabledTabIndex() {\n return this._enabledTabIndex() === undefined\n ? this.listbox.enabledTabIndex\n : this._enabledTabIndex();\n }\n set enabledTabIndex(value) {\n this._enabledTabIndex.set(value);\n }\n private _enabledTabIndex = signal<number | null | undefined>(undefined);\n\n /** The option's host element */\n readonly element: HTMLElement = inject(ElementRef).nativeElement;\n\n /** The parent listbox this option belongs to. */\n protected readonly listbox: CdkListbox<T> = inject(CdkListbox);\n\n /** Emits when the option is destroyed. */\n protected destroyed = new Subject<void>();\n\n /** Emits when the option is clicked. */\n readonly _clicked = new Subject<MouseEvent>();\n\n ngOnDestroy() {\n this.destroyed.next();\n this.destroyed.complete();\n }\n\n /** Whether this option is selected. */\n isSelected() {\n return this.listbox.isSelected(this);\n }\n\n /** Whether this option is active. */\n isActive() {\n return this.listbox.isActive(this);\n }\n\n /** Toggle the selected state of this option. */\n toggle() {\n this.listbox.toggle(this);\n }\n\n /** Select this option if it is not selected. */\n select() {\n this.listbox.select(this);\n }\n\n /** Deselect this option if it is selected. */\n deselect() {\n this.listbox.deselect(this);\n }\n\n /** Focus this option. */\n focus() {\n this.element.focus();\n }\n\n /** Get the label for this element which is required by the FocusableOption interface. */\n getLabel() {\n return (this.typeaheadLabel ?? this.element.textContent?.trim()) || '';\n }\n\n /**\n * No-op implemented as a part of `Highlightable`.\n * @docs-private\n */\n setActiveStyles() {\n // If the listbox is using `aria-activedescendant` the option won't have focus so the\n // browser won't scroll them into view automatically so we need to do it ourselves.\n if (this.listbox.useActiveDescendant) {\n this.element.scrollIntoView({block: 'nearest', inline: 'nearest'});\n }\n }\n\n /**\n * No-op implemented as a part of `Highlightable`.\n * @docs-private\n */\n setInactiveStyles() {}\n\n /** Handle focus events on the option. */\n protected _handleFocus() {\n // Options can wind up getting focused in active descendant mode if the user clicks on them.\n // In this case, we push focus back to the parent listbox to prevent an extra tab stop when\n // the user performs a shift+tab.\n if (this.listbox.useActiveDescendant) {\n this.listbox._setActiveOption(this);\n this.listbox.focus();\n }\n }\n\n /** Get the tabindex for this option. */\n protected _getTabIndex() {\n if (this.listbox.useActiveDescendant || this.disabled) {\n return -1;\n }\n return this.isActive() ? this.enabledTabIndex : -1;\n }\n}\n\n@Directive({\n selector: '[cdkListbox]',\n exportAs: 'cdkListbox',\n host: {\n 'role': 'listbox',\n 'class': 'cdk-listbox',\n '[id]': 'id',\n '[attr.tabindex]': '_getTabIndex()',\n '[attr.aria-disabled]': 'disabled',\n '[attr.aria-multiselectable]': 'multiple',\n '[attr.aria-activedescendant]': '_getAriaActiveDescendant()',\n '[attr.aria-orientation]': 'orientation',\n '(focus)': '_handleFocus()',\n '(keydown)': '_handleKeydown($event)',\n '(focusout)': '_handleFocusOut($event)',\n '(focusin)': '_handleFocusIn()',\n },\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => CdkListbox),\n multi: true,\n },\n ],\n})\nexport class CdkListbox<T = unknown> implements AfterContentInit, OnDestroy, ControlValueAccessor {\n private _cleanupWindowBlur: (() => void) | undefined;\n\n /** The id of the option's host element. */\n @Input()\n get id() {\n return this._id || this._generatedId;\n }\n set id(value) {\n this._id = value;\n }\n private _id: string;\n private _generatedId = inject(_IdGenerator).getId('cdk-listbox-');\n\n /** The tabindex to use when the listbox is enabled. */\n @Input('tabindex')\n get enabledTabIndex() {\n return this._enabledTabIndex() === undefined ? 0 : this._enabledTabIndex();\n }\n set enabledTabIndex(value) {\n this._enabledTabIndex.set(value);\n }\n private _enabledTabIndex = signal<number | null | undefined>(undefined);\n\n /** The value selected in the listbox, represented as an array of option values. */\n @Input('cdkListboxValue')\n get value(): readonly T[] {\n return this._invalid ? [] : this.selectionModel.selected;\n }\n set value(value: readonly T[]) {\n this._setSelection(value);\n }\n\n /**\n * Whether the listbox allows multiple options to be selected. If the value switches from `true`\n * to `false`, and more than one option is selected, all options are deselected.\n */\n @Input({alias: 'cdkListboxMultiple', transform: booleanAttribute})\n get multiple(): boolean {\n return this.selectionModel.multiple;\n }\n set multiple(value: boolean) {\n this.selectionModel.multiple = value;\n\n if (this.options) {\n this._updateInternalValue();\n }\n }\n\n /** Whether the listbox is disabled. */\n @Input({alias: 'cdkListboxDisabled', transform: booleanAttribute})\n get disabled() {\n return this._disabled();\n }\n set disabled(value: boolean) {\n this._disabled.set(value);\n }\n private _disabled = signal(false);\n\n /** Whether the listbox will use active descendant or will move focus onto the options. */\n @Input({alias: 'cdkListboxUseActiveDescendant', transform: booleanAttribute})\n get useActiveDescendant() {\n return this._useActiveDescendant();\n }\n set useActiveDescendant(value: boolean) {\n this._useActiveDescendant.set(value);\n }\n private _useActiveDescendant = signal(false);\n\n /** The orientation of the listbox. Only affects keyboard interaction, not visual layout. */\n @Input('cdkListboxOrientation')\n get orientation() {\n return this._orientation;\n }\n set orientation(value: 'horizontal' | 'vertical') {\n this._orientation = value === 'horizontal' ? 'horizontal' : 'vertical';\n if (value === 'horizontal') {\n this.listKeyManager?.withHorizontalOrientation(this._dir?.value || 'ltr');\n } else {\n this.listKeyManager?.withVerticalOrientation();\n }\n }\n private _orientation: 'horizontal' | 'vertical' = 'vertical';\n\n /** The function used to compare option values. */\n @Input('cdkListboxCompareWith')\n get compareWith(): undefined | ((o1: T, o2: T) => boolean) {\n return this.selectionModel.compareWith;\n }\n set compareWith(fn: undefined | ((o1: T, o2: T) => boolean)) {\n this.selectionModel.compareWith = fn;\n }\n\n /**\n * Whether the keyboard navigation should wrap when the user presses arrow down on the last item\n * or arrow up on the first item.\n */\n @Input({alias: 'cdkListboxNavigationWrapDisabled', transform: booleanAttribute})\n get navigationWrapDisabled() {\n return this._navigationWrapDisabled;\n }\n set navigationWrapDisabled(wrap: boolean) {\n this._navigationWrapDisabled = wrap;\n this.listKeyManager?.withWrap(!this._navigationWrapDisabled);\n }\n private _navigationWrapDisabled = false;\n\n /** Whether keyboard navigation should skip over disabled items. */\n @Input({alias: 'cdkListboxNavigatesDisabledOptions', transform: booleanAttribute})\n get navigateDisabledOptions() {\n return this._navigateDisabledOptions;\n }\n set navigateDisabledOptions(skip: boolean) {\n this._navigateDisabledOptions = skip;\n this.listKeyManager?.skipPredicate(\n this._navigateDisabledOptions ? this._skipNonePredicate : this._skipDisabledPredicate,\n );\n }\n private _navigateDisabledOptions = false;\n\n /** Emits when the selected value(s) in the listbox change. */\n @Output('cdkListboxValueChange') readonly valueChange = new Subject<ListboxValueChangeEvent<T>>();\n\n /** The child options in this listbox. */\n @ContentChildren(CdkOption, {descendants: true}) protected options: QueryList<CdkOption<T>>;\n\n /** The selection model used by the listbox. */\n protected selectionModel = new ListboxSelectionModel<T>();\n\n /** The key manager that manages keyboard navigation for this listbox. */\n protected listKeyManager: ActiveDescendantKeyManager<CdkOption<T>>;\n\n /** Emits when the listbox is destroyed. */\n protected readonly destroyed = new Subject<void>();\n\n /** The host element of the listbox. */\n protected readonly element: HTMLElement = inject(ElementRef).nativeElement;\n\n /** The Angular zone. */\n protected readonly ngZone = inject(NgZone);\n\n /** The change detector for this listbox. */\n protected readonly changeDetectorRef = inject(ChangeDetectorRef);\n\n /** Whether the currently selected value in the selection model is invalid. */\n private _invalid = false;\n\n /** The last user-triggered option. */\n private _lastTriggered: CdkOption<T> | null = null;\n\n /** Callback called when the listbox has been touched */\n private _onTouched = () => {};\n\n /** Callback called when the listbox value changes */\n private _onChange: (value: readonly T[]) => void = () => {};\n\n /** Emits when an option has been clicked. */\n private _optionClicked = defer(() =>\n (this.options.changes as Observable<CdkOption<T>[]>).pipe(\n startWith(this.options),\n switchMap(options =>\n merge(...options.map(option => option._clicked.pipe(map(event => ({option, event}))))),\n ),\n ),\n );\n\n /** The directionality of the page. */\n private readonly _dir = inject(Directionality, {optional: true});\n\n /** Whether the component is being rendered in the browser. */\n private readonly _isBrowser: boolean = inject(Platform).isBrowser;\n\n /** A predicate that skips disabled options. */\n private readonly _skipDisabledPredicate = (option: CdkOption<T>) => option.disabled;\n\n /** A predicate that does not skip any options. */\n private readonly _skipNonePredicate = () => false;\n\n /** Whether the listbox currently has focus. */\n private _hasFocus = false;\n\n /** A reference to the option that was active before the listbox lost focus. */\n private _previousActiveOption: CdkOption<T> | null = null;\n\n constructor() {\n if (this._isBrowser) {\n const renderer = inject(Renderer2);\n\n this._cleanupWindowBlur = this.ngZone.runOutsideAngular(() => {\n return renderer.listen('window', 'blur', () => {\n if (this.element.contains(document.activeElement) && this._previousActiveOption) {\n this._setActiveOption(this._previousActiveOption);\n this._previousActiveOption = null;\n }\n });\n });\n }\n }\n\n ngAfterContentInit() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n this._verifyNoOptionValueCollisions();\n this._verifyOptionValues();\n }\n\n this._initKeyManager();\n\n // Update the internal value whenever the options or the model value changes.\n merge(this.selectionModel.changed, this.options.changes)\n .pipe(startWith(null), takeUntil(this.destroyed))\n .subscribe(() => this._updateInternalValue());\n\n this._optionClicked\n .pipe(\n filter(({option}) => !option.disabled),\n takeUntil(this.destroyed),\n )\n .subscribe(({option, event}) => this._handleOptionClicked(option, event));\n }\n\n ngOnDestroy() {\n this._cleanupWindowBlur?.();\n this.listKeyManager?.destroy();\n this.destroyed.next();\n this.destroyed.complete();\n }\n\n /**\n * Toggle the selected state of the given option.\n * @param option The option to toggle\n */\n toggle(option: CdkOption<T>) {\n this.toggleValue(option.value);\n }\n\n /**\n * Toggle the selected state of the given value.\n * @param value The value to toggle\n */\n toggleValue(value: T) {\n if (this._invalid) {\n this.selectionModel.clear(false);\n }\n this.selectionModel.toggle(value);\n }\n\n /**\n * Select the given option.\n * @param option The option to select\n */\n select(option: CdkOption<T>) {\n this.selectValue(option.value);\n }\n\n /**\n * Select the given value.\n * @param value The value to select\n */\n selectValue(value: T) {\n if (this._invalid) {\n this.selectionModel.clear(false);\n }\n this.selectionModel.select(value);\n }\n\n /**\n * Deselect the given option.\n * @param option The option to deselect\n */\n deselect(option: CdkOption<T>) {\n this.deselectValue(option.value);\n }\n\n /**\n * Deselect the given value.\n * @param value The value to deselect\n */\n deselectValue(value: T) {\n if (this._invalid) {\n this.selectionModel.clear(false);\n }\n this.selectionModel.deselect(value);\n }\n\n /**\n * Set the selected state of all options.\n * @param isSelected The new selected state to set\n */\n setAllSelected(isSelected: boolean) {\n if (!isSelected) {\n this.selectionModel.clear();\n } else {\n if (this._invalid) {\n this.selectionModel.clear(false);\n }\n this.selectionModel.select(...this.options.map(option => option.value));\n }\n }\n\n /**\n * Get whether the given option is selected.\n * @param option The option to get the selected state of\n */\n isSelected(option: CdkOption<T>) {\n return this.isValueSelected(option.value);\n }\n\n /**\n * Get whether the given option is active.\n * @param option The option to get the active state of\n */\n isActive(option: CdkOption<T>): boolean {\n return !!(this.listKeyManager?.activeItem === option);\n }\n\n /**\n * Get whether the given value is selected.\n * @param value The value to get the selected state of\n */\n isValueSelected(value: T) {\n if (this._invalid) {\n return false;\n }\n return this.selectionModel.isSelected(value);\n }\n\n /**\n * Registers a callback to be invoked when the listbox's value changes from user input.\n * @param fn The callback to register\n * @docs-private\n */\n registerOnChange(fn: (value: readonly T[]) => void): void {\n this._onChange = fn;\n }\n\n /**\n * Registers a callback to be invoked when the listbox is blurred by the user.\n * @param fn The callback to register\n * @docs-private\n */\n registerOnTouched(fn: () => {}): void {\n this._onTouched = fn;\n }\n\n /**\n * Sets the listbox's value.\n * @param value The new value of the listbox\n * @docs-private\n */\n writeValue(value: readonly T[]): void {\n this._setSelection(value);\n this._verifyOptionValues();\n }\n\n /**\n * Sets the disabled state of the listbox.\n * @param isDisabled The new disabled state\n * @docs-private\n */\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n this.changeDetectorRef.markForCheck();\n }\n\n /** Focus the listbox's host element. */\n focus() {\n this.element.focus();\n }\n\n /**\n * Triggers the given option in response to user interaction.\n * - In single selection mode: selects the option and deselects any other selected option.\n * - In multi selection mode: toggles the selected state of the option.\n * @param option The option to trigger\n */\n protected triggerOption(option: CdkOption<T> | null) {\n if (option && !option.disabled) {\n this._lastTriggered = option;\n const changed = this.multiple\n ? this.selectionModel.toggle(option.value)\n : this.selectionModel.select(option.value);\n if (changed) {\n this._onChange(this.value);\n this.valueChange.next({\n value: this.value,\n listbox: this,\n option: option,\n });\n }\n }\n }\n\n /**\n * Trigger the given range of options in response to user interaction.\n * Should only be called in multi-selection mode.\n * @param trigger The option that was triggered\n * @param from The start index of the options to toggle\n * @param to The end index of the options to toggle\n * @param on Whether to toggle the option range on\n */\n protected triggerRange(trigger: CdkOption<T> | null, from: number, to: number, on: boolean) {\n if (this.disabled || (trigger && trigger.disabled)) {\n return;\n }\n this._lastTriggered = trigger;\n const isEqual = this.compareWith ?? Object.is;\n const updateValues = [...this.options]\n .slice(Math.max(0, Math.min(from, to)), Math.min(this.options.length, Math.max(from, to) + 1))\n .filter(option => !option.disabled)\n .map(option => option.value);\n const selected = [...this.value];\n for (const updateValue of updateValues) {\n const selectedIndex = selected.findIndex(selectedValue =>\n isEqual(selectedValue, updateValue),\n );\n if (on && selectedIndex === -1) {\n selected.push(updateValue);\n } else if (!on && selectedIndex !== -1) {\n selected.splice(selectedIndex, 1);\n }\n }\n let changed = this.selectionModel.setSelection(...selected);\n if (changed) {\n this._onChange(this.value);\n this.valueChange.next({\n value: this.value,\n listbox: this,\n option: trigger,\n });\n }\n }\n\n /**\n * Sets the given option as active.\n * @param option The option to make active\n */\n _setActiveOption(option: CdkOption<T>) {\n this.listKeyManager.setActiveItem(option);\n }\n\n /** Called when the listbox receives focus. */\n protected _handleFocus() {\n if (!this.useActiveDescendant) {\n if (this.selectionModel.selected.length > 0) {\n this._setNextFocusToSelectedOption();\n } else {\n this.listKeyManager.setNextItemActive();\n }\n\n this._focusActiveOption();\n }\n }\n\n /** Called when the user presses keydown on the listbox. */\n protected _handleKeydown(event: KeyboardEvent) {\n if (this.disabled) {\n return;\n }\n\n const {keyCode} = event;\n const previousActiveIndex = this.listKeyManager.activeItemIndex;\n const ctrlKeys = ['ctrlKey', 'metaKey'] as const;\n\n if (this.multiple && keyCode === A && hasModifierKey(event, ...ctrlKeys)) {\n // Toggle all options off if they're all selected, otherwise toggle them all on.\n this.triggerRange(\n null,\n 0,\n this.options.length - 1,\n this.options.length !== this.value.length,\n );\n event.preventDefault();\n return;\n }\n\n if (\n this.multiple &&\n (keyCode === SPACE || keyCode === ENTER) &&\n hasModifierKey(event, 'shiftKey')\n ) {\n if (this.listKeyManager.activeItem && this.listKeyManager.activeItemIndex != null) {\n this.triggerRange(\n this.listKeyManager.activeItem,\n this._getLastTriggeredIndex() ?? this.listKeyManager.activeItemIndex,\n this.listKeyManager.activeItemIndex,\n !this.listKeyManager.activeItem.isSelected(),\n );\n }\n event.preventDefault();\n return;\n }\n\n if (\n this.multiple &&\n keyCode === HOME &&\n hasModifierKey(event, ...ctrlKeys) &&\n hasModifierKey(event, 'shiftKey')\n ) {\n const trigger = this.listKeyManager.activeItem;\n if (trigger) {\n const from = this.listKeyManager.activeItemIndex!;\n this.listKeyManager.setFirstItemActive();\n this.triggerRange(\n trigger,\n from,\n this.listKeyManager.activeItemIndex!,\n !trigger.isSelected(),\n );\n }\n event.preventDefault();\n return;\n }\n\n if (\n this.multiple &&\n keyCode === END &&\n hasModifierKey(event, ...ctrlKeys) &&\n hasModifierKey(event, 'shiftKey')\n ) {\n const trigger = this.listKeyManager.activeItem;\n if (trigger) {\n const from = this.listKeyManager.activeItemIndex!;\n this.listKeyManager.setLastItemActive();\n this.triggerRange(\n trigger,\n from,\n this.listKeyManager.activeItemIndex!,\n !trigger.isSelected(),\n );\n }\n event.preventDefault();\n return;\n }\n\n if (keyCode === SPACE || keyCode === ENTER) {\n this.triggerOption(this.listKeyManager.activeItem);\n event.preventDefault();\n return;\n }\n\n const isNavKey =\n keyCode === UP_ARROW ||\n keyCode === DOWN_ARROW ||\n keyCode === LEFT_ARROW ||\n keyCode === RIGHT_ARROW ||\n keyCode === HOME ||\n keyCode === END;\n this.listKeyManager.onKeydown(event);\n // Will select an option if shift was pressed while navigating to the option\n if (isNavKey && event.shiftKey && previousActiveIndex !== this.listKeyManager.activeItemIndex) {\n this.triggerOption(this.listKeyManager.activeItem);\n }\n }\n\n /** Called when a focus moves into the listbox. */\n protected _handleFocusIn() {\n // Note that we use a `focusin` handler for this instead of the existing `focus` handler,\n // because focus won't land on the listbox if `useActiveDescendant` is enabled.\n this._hasFocus = true;\n }\n\n /**\n * Called when the focus leaves an element in the listbox.\n * @param event The focusout event\n */\n protected _handleFocusOut(event: FocusEvent) {\n // Some browsers (e.g. Chrome and Firefox) trigger the focusout event when the user returns back to the document.\n // To prevent losing the active option in this case, we store it in `_previousActiveOption` and restore it on the window `blur` event\n // This ensures that the `activeItem` matches the actual focused element when the user returns to the document.\n this._previousActiveOption = this.listKeyManager.activeItem;\n\n const otherElement = event.relatedTarget as Element;\n if (this.element !== otherElement && !this.element.contains(otherElement)) {\n this._onTouched();\n this._hasFocus = false;\n this._setNextFocusToSelectedOption();\n }\n }\n\n /** Get the id of the active option if active descendant is being used. */\n protected _getAriaActiveDescendant(): string | null | undefined {\n return this.useActiveDescendant ? this.listKeyManager?.activeItem?.id : null;\n }\n\n /** Get the tabindex for the listbox. */\n protected _getTabIndex() {\n if (this.disabled) {\n return -1;\n }\n return this.useActiveDescendant || !this.listKeyManager.activeItem ? this.enabledTabIndex : -1;\n }\n\n /** Initialize the key manager. */\n private _initKeyManager() {\n this.listKeyManager = new ActiveDescendantKeyManager(this.options)\n .withWrap(!this._navigationWrapDisabled)\n .withTypeAhead()\n .withHomeAndEnd()\n .withAllowedModifierKeys(['shiftKey'])\n .skipPredicate(\n this._navigateDisabledOptions ? this._skipNonePredicate : this._skipDisabledPredicate,\n );\n\n if (this.orientation === 'vertical') {\n this.listKeyManager.withVerticalOrientation();\n } else {\n this.listKeyManager.withHorizontalOrientation(this._dir?.value || 'ltr');\n }\n\n if (this.selectionModel.selected.length) {\n Promise.resolve().then(() => this._setNextFocusToSelectedOption());\n }\n\n this.listKeyManager.change.subscribe(() => this._focusActiveOption());\n\n this.options.changes.pipe(takeUntil(this.destroyed)).subscribe(() => {\n const activeOption = this.listKeyManager.activeItem;\n\n // If the active option was deleted, we need to reset\n // the key manager so it can allow focus back in.\n if (activeOption && !this.options.find(option => option === activeOption)) {\n this.listKeyManager.setActiveItem(-1);\n this.changeDetectorRef.markForCheck();\n }\n });\n }\n\n /** Focus the active option. */\n private _focusActiveOption() {\n if (!this.useActiveDescendant) {\n this.listKeyManager.activeItem?.focus();\n }\n this.changeDetectorRef.markForCheck();\n }\n\n /**\n * Set the selected values.\n * @param value The list of new selected values.\n */\n private _setSelection(value: readonly T[]) {\n if (this._invalid) {\n this.selectionModel.clear(false);\n }\n this.selectionModel.setSelection(...this._coerceValue(value));\n\n if (!this._hasFocus) {\n this._setNextFocusToSelectedOption();\n }\n }\n\n /** Sets the first selected option as first in the keyboard focus order. */\n private _setNextFocusToSelectedOption() {\n // Null check the options since they only get defined after `ngAfterContentInit`.\n const selected = this.options?.find(option => option.isSelected());\n\n if (selected) {\n this.listKeyManager.updateActiveItem(selected);\n }\n }\n\n /** Update the internal value of the listbox based on the selection model. */\n private _updateInternalValue() {\n const indexCache = new Map<T, number>();\n this.selectionModel.sort((a: T, b: T) => {\n const aIndex = this._getIndexForValue(indexCache, a);\n const bIndex = this._getIndexForValue(indexCache, b);\n return aIndex - bIndex;\n });\n const selected = this.selectionModel.selected;\n this._invalid =\n (!this.multiple && selected.length > 1) || !!this._getInvalidOptionValues(selected).length;\n this.changeDetectorRef.markForCheck();\n }\n\n /**\n * Gets the index of the given value in the given list of options.\n * @param cache The cache of indices found so far\n * @param value The value to find\n * @return The index of the value in the options list\n */\n private _getIndexForValue(cache: Map<T, number>, value: T) {\n const isEqual = this.compareWith || Object.is;\n if (!cache.has(value)) {\n let index = -1;\n for (let i = 0; i < this.options.length; i++) {\n if (isEqual(value, this.options.get(i)!.value)) {\n index = i;\n break;\n }\n }\n cache.set(value, index);\n }\n return cache.get(value)!;\n }\n\n /**\n * Handle the user clicking an option.\n * @param option The option that was clicked.\n */\n private _handleOptionClicked(option: CdkOption<T>, event: MouseEvent) {\n event.preventDefault();\n this.listKeyManager.setActiveItem(option);\n if (event.shiftKey && this.multiple) {\n this.triggerRange(\n option,\n this._getLastTriggeredIndex() ?? this.listKeyManager.activeItemIndex!,\n this.listKeyManager.activeItemIndex!,\n !option.isSelected(),\n );\n } else {\n this.triggerOption(option);\n }\n }\n\n /** Verifies that no two options represent the same value under the compareWith function. */\n private _verifyNoOptionValueCollisions() {\n this.options.changes.pipe(startWith(this.options), takeUntil(this.destroyed)).subscribe(() => {\n const isEqual = this.compareWith ?? Object.is;\n for (let i = 0; i < this.options.length; i++) {\n const option = this.options.get(i)!;\n let duplicate: CdkOption<T> | null = null;\n for (let j = i + 1; j < this.options.length; j++) {\n const other = this.options.get(j)!;\n if (isEqual(option.value, other.value)) {\n duplicate = other;\n break;\n }\n }\n if (duplicate) {\n // TODO(mmalerba): Link to docs about this.\n if (this.compareWith) {\n console.warn(\n `Found multiple CdkOption representing the same value under the given compareWith function`,\n {\n option1: option.element,\n option2: duplicate.element,\n compareWith: this.compareWith,\n },\n );\n } else {\n console.warn(`Found multiple CdkOption with the same value`, {\n option1: option.element,\n option2: duplicate.element,\n });\n }\n return;\n }\n }\n });\n }\n\n /** Verifies that the option values are valid. */\n private _verifyOptionValues() {\n if (this.options && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n const selected = this.selectionModel.selected;\n const invalidValues = this._getInvalidOptionValues(selected);\n\n if (!this.multiple && selected.length > 1) {\n throw Error('Listbox cannot have more than one selected value in multi-selection mode.');\n }\n\n if (invalidValues.length) {\n throw Error('Listbox has selected values that do not match any of its options.');\n }\n }\n }\n\n /**\n * Coerces a value into an array representing a listbox selection.\n * @param value The value to coerce\n * @return An array\n */\n private _coerceValue(value: readonly T[]) {\n return value == null ? [] : coerceArray(value);\n }\n\n /**\n * Get the sublist of values that do not represent valid option values in this listbox.\n * @param values The list of values\n * @return The sublist of values that are not valid option values\n */\n private _getInvalidOptionValues(values: readonly T[]) {\n const isEqual = this.compareWith || Object.is;\n const validValues = (this.options || []).map(option => option.value);\n return values.filter(value => !validValues.some(validValue => isEqual(value, validValue)));\n }\n\n /** Get the index of the last triggered option. */\n private _getLastTriggeredIndex() {\n const index = this.options.toArray().indexOf(this._lastTriggered!);\n return index === -1 ? null : index;\n }\n}\n\n/** Change event that is fired whenever the value of the listbox changes. */\nexport interface ListboxValueChangeEvent<T> {\n /** The new value of the listbox. */\n readonly value: readonly T[];\n\n /** Reference to the listbox that emitted the event. */\n readonly listbox: CdkListbox<T>;\n\n /** Reference to the option that was triggered. */\n readonly option: CdkOption<T> | null;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {NgModule} from '@angular/core';\nimport {CdkListbox, CdkOption} from './listbox';\n\nconst EXPORTED_DECLARATIONS = [CdkListbox, CdkOption];\n\n@NgModule({\n imports: [...EXPORTED_DECLARATIONS],\n exports: [...EXPORTED_DECLARATIONS],\n})\nexport class CdkListboxModule {}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAoDA;;;;;;;AAOG;AACH,MAAM,qBAAyB,SAAQ,cAAiB,CAAA;AAE7C,IAAA,QAAA;IADT,WACS,CAAA,QAAA,GAAW,KAAK,EACvB,uBAA6B,EAC7B,WAAW,GAAG,IAAI,EAClB,WAAuC,EAAA;QAEvC,KAAK,CAAC,IAAI,EAAE,uBAAuB,EAAE,WAAW,EAAE,WAAW,CAAC;QALvD,IAAQ,CAAA,QAAA,GAAR,QAAQ;;IAQR,mBAAmB,GAAA;QAC1B,OAAO,IAAI,CAAC,QAAQ;;IAGb,MAAM,CAAC,GAAG,MAAW,EAAA;;;AAG5B,QAAA,IAAI,IAAI,CAAC,QAAQ,EAAE;AACjB,YAAA,OAAO,KAAK,CAAC,MAAM,CAAC,GAAG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-ST-199a4f3c4e20/bin/src/cdk/listbox/listbox.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/cdk/listbox/listbox-module.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n _IdGenerator,\n ActiveDescendantKeyManager,\n Highlightable,\n ListKeyManagerOption,\n} from '../a11y';\nimport {Directionality} from '../bidi';\nimport {coerceArray} from '../coercion';\nimport {SelectionModel} from '../collections';\nimport {\n A,\n DOWN_ARROW,\n END,\n ENTER,\n hasModifierKey,\n HOME,\n LEFT_ARROW,\n RIGHT_ARROW,\n SPACE,\n UP_ARROW,\n} from '../keycodes';\nimport {Platform} from '../platform';\nimport {\n AfterContentInit,\n booleanAttribute,\n ChangeDetectorRef,\n ContentChildren,\n Directive,\n ElementRef,\n forwardRef,\n inject,\n Input,\n NgZone,\n numberAttribute,\n OnDestroy,\n Output,\n QueryList,\n Renderer2,\n signal,\n} from '@angular/core';\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from '@angular/forms';\nimport {defer, merge, Observable, Subject} from 'rxjs';\nimport {filter, map, startWith, switchMap, takeUntil} from 'rxjs/operators';\n\n/**\n * An implementation of SelectionModel that internally always represents the selection as a\n * multi-selection. This is necessary so that we can recover the full selection if the user\n * switches the listbox from single-selection to multi-selection after initialization.\n *\n * This selection model may report multiple selected values, even if it is in single-selection\n * mode. It is up to the user (CdkListbox) to check for invalid selections.\n */\nclass ListboxSelectionModel<T> extends SelectionModel<T> {\n constructor(\n public multiple = false,\n initiallySelectedValues?: T[],\n emitChanges = true,\n compareWith?: (o1: T, o2: T) => boolean,\n ) {\n super(true, initiallySelectedValues, emitChanges, compareWith);\n }\n\n override isMultipleSelection(): boolean {\n return this.multiple;\n }\n\n override select(...values: T[]) {\n // The super class is always in multi-selection mode, so we need to override the behavior if\n // this selection model actually belongs to a single-selection listbox.\n if (this.multiple) {\n return super.select(...values);\n } else {\n return super.setSelection(...values);\n }\n }\n}\n\n/** A selectable option in a listbox. */\n@Directive({\n selector: '[cdkOption]',\n exportAs: 'cdkOption',\n host: {\n 'role': 'option',\n 'class': 'cdk-option',\n '[id]': 'id',\n '[attr.aria-selected]': 'isSelected()',\n '[attr.tabindex]': '_getTabIndex()',\n '[attr.aria-disabled]': 'disabled',\n '[class.cdk-option-active]': 'isActive()',\n '(click)': '_clicked.next($event)',\n '(focus)': '_handleFocus()',\n },\n})\nexport class CdkOption<T = unknown> implements ListKeyManagerOption, Highlightable, OnDestroy {\n /** The id of the option's host element. */\n @Input()\n get id() {\n return this._id || this._generatedId;\n }\n set id(value) {\n this._id = value;\n }\n private _id: string;\n private _generatedId = inject(_IdGenerator).getId('cdk-option-');\n\n /** The value of this option. */\n @Input('cdkOption') value: T;\n\n /**\n * The text used to locate this item during listbox typeahead. If not specified,\n * the `textContent` of the item will be used.\n */\n @Input('cdkOptionTypeaheadLabel') typeaheadLabel: string | null;\n\n /** Whether this option is disabled. */\n @Input({alias: 'cdkOptionDisabled', transform: booleanAttribute})\n get disabled(): boolean {\n return this.listbox.disabled || this._disabled();\n }\n set disabled(value: boolean) {\n this._disabled.set(value);\n }\n private _disabled = signal(false);\n\n /** The tabindex of the option when it is enabled. */\n @Input({\n alias: 'tabindex',\n transform: (value: unknown) => (value == null ? undefined : numberAttribute(value)),\n })\n get enabledTabIndex() {\n return this._enabledTabIndex() === undefined\n ? this.listbox.enabledTabIndex\n : this._enabledTabIndex();\n }\n set enabledTabIndex(value) {\n this._enabledTabIndex.set(value);\n }\n private _enabledTabIndex = signal<number | null | undefined>(undefined);\n\n /** The option's host element */\n readonly element: HTMLElement = inject(ElementRef).nativeElement;\n\n /** The parent listbox this option belongs to. */\n protected readonly listbox: CdkListbox<T> = inject(CdkListbox);\n\n /** Emits when the option is destroyed. */\n protected destroyed = new Subject<void>();\n\n /** Emits when the option is clicked. */\n readonly _clicked = new Subject<MouseEvent>();\n\n ngOnDestroy() {\n this.destroyed.next();\n this.destroyed.complete();\n }\n\n /** Whether this option is selected. */\n isSelected() {\n return this.listbox.isSelected(this);\n }\n\n /** Whether this option is active. */\n isActive() {\n return this.listbox.isActive(this);\n }\n\n /** Toggle the selected state of this option. */\n toggle() {\n this.listbox.toggle(this);\n }\n\n /** Select this option if it is not selected. */\n select() {\n this.listbox.select(this);\n }\n\n /** Deselect this option if it is selected. */\n deselect() {\n this.listbox.deselect(this);\n }\n\n /** Focus this option. */\n focus() {\n this.element.focus();\n }\n\n /** Get the label for this element which is required by the FocusableOption interface. */\n getLabel() {\n return (this.typeaheadLabel ?? this.element.textContent?.trim()) || '';\n }\n\n /**\n * No-op implemented as a part of `Highlightable`.\n * @docs-private\n */\n setActiveStyles() {\n // If the listbox is using `aria-activedescendant` the option won't have focus so the\n // browser won't scroll them into view automatically so we need to do it ourselves.\n if (this.listbox.useActiveDescendant) {\n this.element.scrollIntoView({block: 'nearest', inline: 'nearest'});\n }\n }\n\n /**\n * No-op implemented as a part of `Highlightable`.\n * @docs-private\n */\n setInactiveStyles() {}\n\n /** Handle focus events on the option. */\n protected _handleFocus() {\n // Options can wind up getting focused in active descendant mode if the user clicks on them.\n // In this case, we push focus back to the parent listbox to prevent an extra tab stop when\n // the user performs a shift+tab.\n if (this.listbox.useActiveDescendant) {\n this.listbox._setActiveOption(this);\n this.listbox.focus();\n }\n }\n\n /** Get the tabindex for this option. */\n protected _getTabIndex() {\n if (this.listbox.useActiveDescendant || this.disabled) {\n return -1;\n }\n return this.isActive() ? this.enabledTabIndex : -1;\n }\n}\n\n@Directive({\n selector: '[cdkListbox]',\n exportAs: 'cdkListbox',\n host: {\n 'role': 'listbox',\n 'class': 'cdk-listbox',\n '[id]': 'id',\n '[attr.tabindex]': '_getTabIndex()',\n '[attr.aria-disabled]': 'disabled',\n '[attr.aria-multiselectable]': 'multiple',\n '[attr.aria-activedescendant]': '_getAriaActiveDescendant()',\n '[attr.aria-orientation]': 'orientation',\n '(focus)': '_handleFocus()',\n '(keydown)': '_handleKeydown($event)',\n '(focusout)': '_handleFocusOut($event)',\n '(focusin)': '_handleFocusIn()',\n },\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => CdkListbox),\n multi: true,\n },\n ],\n})\nexport class CdkListbox<T = unknown> implements AfterContentInit, OnDestroy, ControlValueAccessor {\n private _cleanupWindowBlur: (() => void) | undefined;\n\n /** The id of the option's host element. */\n @Input()\n get id() {\n return this._id || this._generatedId;\n }\n set id(value) {\n this._id = value;\n }\n private _id: string;\n private _generatedId = inject(_IdGenerator).getId('cdk-listbox-');\n\n /** The tabindex to use when the listbox is enabled. */\n @Input('tabindex')\n get enabledTabIndex() {\n return this._enabledTabIndex() === undefined ? 0 : this._enabledTabIndex();\n }\n set enabledTabIndex(value) {\n this._enabledTabIndex.set(value);\n }\n private _enabledTabIndex = signal<number | null | undefined>(undefined);\n\n /** The value selected in the listbox, represented as an array of option values. */\n @Input('cdkListboxValue')\n get value(): readonly T[] {\n return this._invalid ? [] : this.selectionModel.selected;\n }\n set value(value: readonly T[]) {\n this._setSelection(value);\n }\n\n /**\n * Whether the listbox allows multiple options to be selected. If the value switches from `true`\n * to `false`, and more than one option is selected, all options are deselected.\n */\n @Input({alias: 'cdkListboxMultiple', transform: booleanAttribute})\n get multiple(): boolean {\n return this.selectionModel.multiple;\n }\n set multiple(value: boolean) {\n this.selectionModel.multiple = value;\n\n if (this.options) {\n this._updateInternalValue();\n }\n }\n\n /** Whether the listbox is disabled. */\n @Input({alias: 'cdkListboxDisabled', transform: booleanAttribute})\n get disabled() {\n return this._disabled();\n }\n set disabled(value: boolean) {\n this._disabled.set(value);\n }\n private _disabled = signal(false);\n\n /** Whether the listbox will use active descendant or will move focus onto the options. */\n @Input({alias: 'cdkListboxUseActiveDescendant', transform: booleanAttribute})\n get useActiveDescendant() {\n return this._useActiveDescendant();\n }\n set useActiveDescendant(value: boolean) {\n this._useActiveDescendant.set(value);\n }\n private _useActiveDescendant = signal(false);\n\n /** The orientation of the listbox. Only affects keyboard interaction, not visual layout. */\n @Input('cdkListboxOrientation')\n get orientation() {\n return this._orientation;\n }\n set orientation(value: 'horizontal' | 'vertical') {\n this._orientation = value === 'horizontal' ? 'horizontal' : 'vertical';\n if (value === 'horizontal') {\n this.listKeyManager?.withHorizontalOrientation(this._dir?.value || 'ltr');\n } else {\n this.listKeyManager?.withVerticalOrientation();\n }\n }\n private _orientation: 'horizontal' | 'vertical' = 'vertical';\n\n /** The function used to compare option values. */\n @Input('cdkListboxCompareWith')\n get compareWith(): undefined | ((o1: T, o2: T) => boolean) {\n return this.selectionModel.compareWith;\n }\n set compareWith(fn: undefined | ((o1: T, o2: T) => boolean)) {\n this.selectionModel.compareWith = fn;\n }\n\n /**\n * Whether the keyboard navigation should wrap when the user presses arrow down on the last item\n * or arrow up on the first item.\n */\n @Input({alias: 'cdkListboxNavigationWrapDisabled', transform: booleanAttribute})\n get navigationWrapDisabled() {\n return this._navigationWrapDisabled;\n }\n set navigationWrapDisabled(wrap: boolean) {\n this._navigationWrapDisabled = wrap;\n this.listKeyManager?.withWrap(!this._navigationWrapDisabled);\n }\n private _navigationWrapDisabled = false;\n\n /** Whether keyboard navigation should skip over disabled items. */\n @Input({alias: 'cdkListboxNavigatesDisabledOptions', transform: booleanAttribute})\n get navigateDisabledOptions() {\n return this._navigateDisabledOptions;\n }\n set navigateDisabledOptions(skip: boolean) {\n this._navigateDisabledOptions = skip;\n this.listKeyManager?.skipPredicate(\n this._navigateDisabledOptions ? this._skipNonePredicate : this._skipDisabledPredicate,\n );\n }\n private _navigateDisabledOptions = false;\n\n /** Emits when the selected value(s) in the listbox change. */\n @Output('cdkListboxValueChange') readonly valueChange = new Subject<ListboxValueChangeEvent<T>>();\n\n /** The child options in this listbox. */\n @ContentChildren(CdkOption, {descendants: true}) protected options: QueryList<CdkOption<T>>;\n\n /** The selection model used by the listbox. */\n protected selectionModel = new ListboxSelectionModel<T>();\n\n /** The key manager that manages keyboard navigation for this listbox. */\n protected listKeyManager: ActiveDescendantKeyManager<CdkOption<T>>;\n\n /** Emits when the listbox is destroyed. */\n protected readonly destroyed = new Subject<void>();\n\n /** The host element of the listbox. */\n protected readonly element: HTMLElement = inject(ElementRef).nativeElement;\n\n /** The Angular zone. */\n protected readonly ngZone = inject(NgZone);\n\n /** The change detector for this listbox. */\n protected readonly changeDetectorRef = inject(ChangeDetectorRef);\n\n /** Whether the currently selected value in the selection model is invalid. */\n private _invalid = false;\n\n /** The last user-triggered option. */\n private _lastTriggered: CdkOption<T> | null = null;\n\n /** Callback called when the listbox has been touched */\n private _onTouched = () => {};\n\n /** Callback called when the listbox value changes */\n private _onChange: (value: readonly T[]) => void = () => {};\n\n /** Emits when an option has been clicked. */\n private _optionClicked = defer(() =>\n (this.options.changes as Observable<CdkOption<T>[]>).pipe(\n startWith(this.options),\n switchMap(options =>\n merge(...options.map(option => option._clicked.pipe(map(event => ({option, event}))))),\n ),\n ),\n );\n\n /** The directionality of the page. */\n private readonly _dir = inject(Directionality, {optional: true});\n\n /** Whether the component is being rendered in the browser. */\n private readonly _isBrowser: boolean = inject(Platform).isBrowser;\n\n /** A predicate that skips disabled options. */\n private readonly _skipDisabledPredicate = (option: CdkOption<T>) => option.disabled;\n\n /** A predicate that does not skip any options. */\n private readonly _skipNonePredicate = () => false;\n\n /** Whether the listbox currently has focus. */\n private _hasFocus = false;\n\n /** A reference to the option that was active before the listbox lost focus. */\n private _previousActiveOption: CdkOption<T> | null = null;\n\n constructor() {\n if (this._isBrowser) {\n const renderer = inject(Renderer2);\n\n this._cleanupWindowBlur = this.ngZone.runOutsideAngular(() => {\n return renderer.listen('window', 'blur', () => {\n if (this.element.contains(document.activeElement) && this._previousActiveOption) {\n this._setActiveOption(this._previousActiveOption);\n this._previousActiveOption = null;\n }\n });\n });\n }\n }\n\n ngAfterContentInit() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n this._verifyNoOptionValueCollisions();\n this._verifyOptionValues();\n }\n\n this._initKeyManager();\n\n // Update the internal value whenever the options or the model value changes.\n merge(this.selectionModel.changed, this.options.changes)\n .pipe(startWith(null), takeUntil(this.destroyed))\n .subscribe(() => this._updateInternalValue());\n\n this._optionClicked\n .pipe(\n filter(({option}) => !option.disabled),\n takeUntil(this.destroyed),\n )\n .subscribe(({option, event}) => this._handleOptionClicked(option, event));\n }\n\n ngOnDestroy() {\n this._cleanupWindowBlur?.();\n this.listKeyManager?.destroy();\n this.destroyed.next();\n this.destroyed.complete();\n }\n\n /**\n * Toggle the selected state of the given option.\n * @param option The option to toggle\n */\n toggle(option: CdkOption<T>) {\n this.toggleValue(option.value);\n }\n\n /**\n * Toggle the selected state of the given value.\n * @param value The value to toggle\n */\n toggleValue(value: T) {\n if (this._invalid) {\n this.selectionModel.clear(false);\n }\n this.selectionModel.toggle(value);\n }\n\n /**\n * Select the given option.\n * @param option The option to select\n */\n select(option: CdkOption<T>) {\n this.selectValue(option.value);\n }\n\n /**\n * Select the given value.\n * @param value The value to select\n */\n selectValue(value: T) {\n if (this._invalid) {\n this.selectionModel.clear(false);\n }\n this.selectionModel.select(value);\n }\n\n /**\n * Deselect the given option.\n * @param option The option to deselect\n */\n deselect(option: CdkOption<T>) {\n this.deselectValue(option.value);\n }\n\n /**\n * Deselect the given value.\n * @param value The value to deselect\n */\n deselectValue(value: T) {\n if (this._invalid) {\n this.selectionModel.clear(false);\n }\n this.selectionModel.deselect(value);\n }\n\n /**\n * Set the selected state of all options.\n * @param isSelected The new selected state to set\n */\n setAllSelected(isSelected: boolean) {\n if (!isSelected) {\n this.selectionModel.clear();\n } else {\n if (this._invalid) {\n this.selectionModel.clear(false);\n }\n this.selectionModel.select(...this.options.map(option => option.value));\n }\n }\n\n /**\n * Get whether the given option is selected.\n * @param option The option to get the selected state of\n */\n isSelected(option: CdkOption<T>) {\n return this.isValueSelected(option.value);\n }\n\n /**\n * Get whether the given option is active.\n * @param option The option to get the active state of\n */\n isActive(option: CdkOption<T>): boolean {\n return !!(this.listKeyManager?.activeItem === option);\n }\n\n /**\n * Get whether the given value is selected.\n * @param value The value to get the selected state of\n */\n isValueSelected(value: T) {\n if (this._invalid) {\n return false;\n }\n return this.selectionModel.isSelected(value);\n }\n\n /**\n * Registers a callback to be invoked when the listbox's value changes from user input.\n * @param fn The callback to register\n * @docs-private\n */\n registerOnChange(fn: (value: readonly T[]) => void): void {\n this._onChange = fn;\n }\n\n /**\n * Registers a callback to be invoked when the listbox is blurred by the user.\n * @param fn The callback to register\n * @docs-private\n */\n registerOnTouched(fn: () => {}): void {\n this._onTouched = fn;\n }\n\n /**\n * Sets the listbox's value.\n * @param value The new value of the listbox\n * @docs-private\n */\n writeValue(value: readonly T[]): void {\n this._setSelection(value);\n this._verifyOptionValues();\n }\n\n /**\n * Sets the disabled state of the listbox.\n * @param isDisabled The new disabled state\n * @docs-private\n */\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n this.changeDetectorRef.markForCheck();\n }\n\n /** Focus the listbox's host element. */\n focus() {\n this.element.focus();\n }\n\n /**\n * Triggers the given option in response to user interaction.\n * - In single selection mode: selects the option and deselects any other selected option.\n * - In multi selection mode: toggles the selected state of the option.\n * @param option The option to trigger\n */\n protected triggerOption(option: CdkOption<T> | null) {\n if (option && !option.disabled) {\n this._lastTriggered = option;\n const changed = this.multiple\n ? this.selectionModel.toggle(option.value)\n : this.selectionModel.select(option.value);\n if (changed) {\n this._onChange(this.value);\n this.valueChange.next({\n value: this.value,\n listbox: this,\n option: option,\n });\n }\n }\n }\n\n /**\n * Trigger the given range of options in response to user interaction.\n * Should only be called in multi-selection mode.\n * @param trigger The option that was triggered\n * @param from The start index of the options to toggle\n * @param to The end index of the options to toggle\n * @param on Whether to toggle the option range on\n */\n protected triggerRange(trigger: CdkOption<T> | null, from: number, to: number, on: boolean) {\n if (this.disabled || (trigger && trigger.disabled)) {\n return;\n }\n this._lastTriggered = trigger;\n const isEqual = this.compareWith ?? Object.is;\n const updateValues = [...this.options]\n .slice(Math.max(0, Math.min(from, to)), Math.min(this.options.length, Math.max(from, to) + 1))\n .filter(option => !option.disabled)\n .map(option => option.value);\n const selected = [...this.value];\n for (const updateValue of updateValues) {\n const selectedIndex = selected.findIndex(selectedValue =>\n isEqual(selectedValue, updateValue),\n );\n if (on && selectedIndex === -1) {\n selected.push(updateValue);\n } else if (!on && selectedIndex !== -1) {\n selected.splice(selectedIndex, 1);\n }\n }\n let changed = this.selectionModel.setSelection(...selected);\n if (changed) {\n this._onChange(this.value);\n this.valueChange.next({\n value: this.value,\n listbox: this,\n option: trigger,\n });\n }\n }\n\n /**\n * Sets the given option as active.\n * @param option The option to make active\n */\n _setActiveOption(option: CdkOption<T>) {\n this.listKeyManager.setActiveItem(option);\n }\n\n /** Called when the listbox receives focus. */\n protected _handleFocus() {\n if (!this.useActiveDescendant) {\n if (this.selectionModel.selected.length > 0) {\n this._setNextFocusToSelectedOption();\n } else {\n this.listKeyManager.setNextItemActive();\n }\n\n this._focusActiveOption();\n }\n }\n\n /** Called when the user presses keydown on the listbox. */\n protected _handleKeydown(event: KeyboardEvent) {\n if (this.disabled) {\n return;\n }\n\n const {keyCode} = event;\n const previousActiveIndex = this.listKeyManager.activeItemIndex;\n const ctrlKeys = ['ctrlKey', 'metaKey'] as const;\n\n if (this.multiple && keyCode === A && hasModifierKey(event, ...ctrlKeys)) {\n // Toggle all options off if they're all selected, otherwise toggle them all on.\n this.triggerRange(\n null,\n 0,\n this.options.length - 1,\n this.options.length !== this.value.length,\n );\n event.preventDefault();\n return;\n }\n\n if (\n this.multiple &&\n (keyCode === SPACE || keyCode === ENTER) &&\n hasModifierKey(event, 'shiftKey')\n ) {\n if (this.listKeyManager.activeItem && this.listKeyManager.activeItemIndex != null) {\n this.triggerRange(\n this.listKeyManager.activeItem,\n this._getLastTriggeredIndex() ?? this.listKeyManager.activeItemIndex,\n this.listKeyManager.activeItemIndex,\n !this.listKeyManager.activeItem.isSelected(),\n );\n }\n event.preventDefault();\n return;\n }\n\n if (\n this.multiple &&\n keyCode === HOME &&\n hasModifierKey(event, ...ctrlKeys) &&\n hasModifierKey(event, 'shiftKey')\n ) {\n const trigger = this.listKeyManager.activeItem;\n if (trigger) {\n const from = this.listKeyManager.activeItemIndex!;\n this.listKeyManager.setFirstItemActive();\n this.triggerRange(\n trigger,\n from,\n this.listKeyManager.activeItemIndex!,\n !trigger.isSelected(),\n );\n }\n event.preventDefault();\n return;\n }\n\n if (\n this.multiple &&\n keyCode === END &&\n hasModifierKey(event, ...ctrlKeys) &&\n hasModifierKey(event, 'shiftKey')\n ) {\n const trigger = this.listKeyManager.activeItem;\n if (trigger) {\n const from = this.listKeyManager.activeItemIndex!;\n this.listKeyManager.setLastItemActive();\n this.triggerRange(\n trigger,\n from,\n this.listKeyManager.activeItemIndex!,\n !trigger.isSelected(),\n );\n }\n event.preventDefault();\n return;\n }\n\n if (keyCode === SPACE || keyCode === ENTER) {\n this.triggerOption(this.listKeyManager.activeItem);\n event.preventDefault();\n return;\n }\n\n const isNavKey =\n keyCode === UP_ARROW ||\n keyCode === DOWN_ARROW ||\n keyCode === LEFT_ARROW ||\n keyCode === RIGHT_ARROW ||\n keyCode === HOME ||\n keyCode === END;\n this.listKeyManager.onKeydown(event);\n // Will select an option if shift was pressed while navigating to the option\n if (isNavKey && event.shiftKey && previousActiveIndex !== this.listKeyManager.activeItemIndex) {\n this.triggerOption(this.listKeyManager.activeItem);\n }\n }\n\n /** Called when a focus moves into the listbox. */\n protected _handleFocusIn() {\n // Note that we use a `focusin` handler for this instead of the existing `focus` handler,\n // because focus won't land on the listbox if `useActiveDescendant` is enabled.\n this._hasFocus = true;\n }\n\n /**\n * Called when the focus leaves an element in the listbox.\n * @param event The focusout event\n */\n protected _handleFocusOut(event: FocusEvent) {\n // Some browsers (e.g. Chrome and Firefox) trigger the focusout event when the user returns back to the document.\n // To prevent losing the active option in this case, we store it in `_previousActiveOption` and restore it on the window `blur` event\n // This ensures that the `activeItem` matches the actual focused element when the user returns to the document.\n this._previousActiveOption = this.listKeyManager.activeItem;\n\n const otherElement = event.relatedTarget as Element;\n if (this.element !== otherElement && !this.element.contains(otherElement)) {\n this._onTouched();\n this._hasFocus = false;\n this._setNextFocusToSelectedOption();\n }\n }\n\n /** Get the id of the active option if active descendant is being used. */\n protected _getAriaActiveDescendant(): string | null | undefined {\n return this.useActiveDescendant ? this.listKeyManager?.activeItem?.id : null;\n }\n\n /** Get the tabindex for the listbox. */\n protected _getTabIndex() {\n if (this.disabled) {\n return -1;\n }\n return this.useActiveDescendant || !this.listKeyManager.activeItem ? this.enabledTabIndex : -1;\n }\n\n /** Initialize the key manager. */\n private _initKeyManager() {\n this.listKeyManager = new ActiveDescendantKeyManager(this.options)\n .withWrap(!this._navigationWrapDisabled)\n .withTypeAhead()\n .withHomeAndEnd()\n .withAllowedModifierKeys(['shiftKey'])\n .skipPredicate(\n this._navigateDisabledOptions ? this._skipNonePredicate : this._skipDisabledPredicate,\n );\n\n if (this.orientation === 'vertical') {\n this.listKeyManager.withVerticalOrientation();\n } else {\n this.listKeyManager.withHorizontalOrientation(this._dir?.value || 'ltr');\n }\n\n if (this.selectionModel.selected.length) {\n Promise.resolve().then(() => this._setNextFocusToSelectedOption());\n }\n\n this.listKeyManager.change.subscribe(() => this._focusActiveOption());\n\n this.options.changes.pipe(takeUntil(this.destroyed)).subscribe(() => {\n const activeOption = this.listKeyManager.activeItem;\n\n // If the active option was deleted, we need to reset\n // the key manager so it can allow focus back in.\n if (activeOption && !this.options.find(option => option === activeOption)) {\n this.listKeyManager.setActiveItem(-1);\n this.changeDetectorRef.markForCheck();\n }\n });\n }\n\n /** Focus the active option. */\n private _focusActiveOption() {\n if (!this.useActiveDescendant) {\n this.listKeyManager.activeItem?.focus();\n }\n this.changeDetectorRef.markForCheck();\n }\n\n /**\n * Set the selected values.\n * @param value The list of new selected values.\n */\n private _setSelection(value: readonly T[]) {\n if (this._invalid) {\n this.selectionModel.clear(false);\n }\n this.selectionModel.setSelection(...this._coerceValue(value));\n\n if (!this._hasFocus) {\n this._setNextFocusToSelectedOption();\n }\n }\n\n /** Sets the first selected option as first in the keyboard focus order. */\n private _setNextFocusToSelectedOption() {\n // Null check the options since they only get defined after `ngAfterContentInit`.\n const selected = this.options?.find(option => option.isSelected());\n\n if (selected) {\n this.listKeyManager.updateActiveItem(selected);\n }\n }\n\n /** Update the internal value of the listbox based on the selection model. */\n private _updateInternalValue() {\n const indexCache = new Map<T, number>();\n this.selectionModel.sort((a: T, b: T) => {\n const aIndex = this._getIndexForValue(indexCache, a);\n const bIndex = this._getIndexForValue(indexCache, b);\n return aIndex - bIndex;\n });\n const selected = this.selectionModel.selected;\n this._invalid =\n (!this.multiple && selected.length > 1) || !!this._getInvalidOptionValues(selected).length;\n this.changeDetectorRef.markForCheck();\n }\n\n /**\n * Gets the index of the given value in the given list of options.\n * @param cache The cache of indices found so far\n * @param value The value to find\n * @return The index of the value in the options list\n */\n private _getIndexForValue(cache: Map<T, number>, value: T) {\n const isEqual = this.compareWith || Object.is;\n if (!cache.has(value)) {\n let index = -1;\n for (let i = 0; i < this.options.length; i++) {\n if (isEqual(value, this.options.get(i)!.value)) {\n index = i;\n break;\n }\n }\n cache.set(value, index);\n }\n return cache.get(value)!;\n }\n\n /**\n * Handle the user clicking an option.\n * @param option The option that was clicked.\n */\n private _handleOptionClicked(option: CdkOption<T>, event: MouseEvent) {\n event.preventDefault();\n this.listKeyManager.setActiveItem(option);\n if (event.shiftKey && this.multiple) {\n this.triggerRange(\n option,\n this._getLastTriggeredIndex() ?? this.listKeyManager.activeItemIndex!,\n this.listKeyManager.activeItemIndex!,\n !option.isSelected(),\n );\n } else {\n this.triggerOption(option);\n }\n }\n\n /** Verifies that no two options represent the same value under the compareWith function. */\n private _verifyNoOptionValueCollisions() {\n this.options.changes.pipe(startWith(this.options), takeUntil(this.destroyed)).subscribe(() => {\n const isEqual = this.compareWith ?? Object.is;\n for (let i = 0; i < this.options.length; i++) {\n const option = this.options.get(i)!;\n let duplicate: CdkOption<T> | null = null;\n for (let j = i + 1; j < this.options.length; j++) {\n const other = this.options.get(j)!;\n if (isEqual(option.value, other.value)) {\n duplicate = other;\n break;\n }\n }\n if (duplicate) {\n // TODO(mmalerba): Link to docs about this.\n if (this.compareWith) {\n console.warn(\n `Found multiple CdkOption representing the same value under the given compareWith function`,\n {\n option1: option.element,\n option2: duplicate.element,\n compareWith: this.compareWith,\n },\n );\n } else {\n console.warn(`Found multiple CdkOption with the same value`, {\n option1: option.element,\n option2: duplicate.element,\n });\n }\n return;\n }\n }\n });\n }\n\n /** Verifies that the option values are valid. */\n private _verifyOptionValues() {\n if (this.options && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n const selected = this.selectionModel.selected;\n const invalidValues = this._getInvalidOptionValues(selected);\n\n if (!this.multiple && selected.length > 1) {\n throw Error('Listbox cannot have more than one selected value in multi-selection mode.');\n }\n\n if (invalidValues.length) {\n throw Error('Listbox has selected values that do not match any of its options.');\n }\n }\n }\n\n /**\n * Coerces a value into an array representing a listbox selection.\n * @param value The value to coerce\n * @return An array\n */\n private _coerceValue(value: readonly T[]) {\n return value == null ? [] : coerceArray(value);\n }\n\n /**\n * Get the sublist of values that do not represent valid option values in this listbox.\n * @param values The list of values\n * @return The sublist of values that are not valid option values\n */\n private _getInvalidOptionValues(values: readonly T[]) {\n const isEqual = this.compareWith || Object.is;\n const validValues = (this.options || []).map(option => option.value);\n return values.filter(value => !validValues.some(validValue => isEqual(value, validValue)));\n }\n\n /** Get the index of the last triggered option. */\n private _getLastTriggeredIndex() {\n const index = this.options.toArray().indexOf(this._lastTriggered!);\n return index === -1 ? null : index;\n }\n}\n\n/** Change event that is fired whenever the value of the listbox changes. */\nexport interface ListboxValueChangeEvent<T> {\n /** The new value of the listbox. */\n readonly value: readonly T[];\n\n /** Reference to the listbox that emitted the event. */\n readonly listbox: CdkListbox<T>;\n\n /** Reference to the option that was triggered. */\n readonly option: CdkOption<T> | null;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {NgModule} from '@angular/core';\nimport {CdkListbox, CdkOption} from './listbox';\n\nconst EXPORTED_DECLARATIONS = [CdkListbox, CdkOption];\n\n@NgModule({\n imports: [...EXPORTED_DECLARATIONS],\n exports: [...EXPORTED_DECLARATIONS],\n})\nexport class CdkListboxModule {}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAoDA;;;;;;;AAOG;AACH,MAAM,qBAAyB,SAAQ,cAAiB,CAAA;AAE7C,IAAA,QAAA;IADT,WACS,CAAA,QAAA,GAAW,KAAK,EACvB,uBAA6B,EAC7B,WAAW,GAAG,IAAI,EAClB,WAAuC,EAAA;QAEvC,KAAK,CAAC,IAAI,EAAE,uBAAuB,EAAE,WAAW,EAAE,WAAW,CAAC;QALvD,IAAQ,CAAA,QAAA,GAAR,QAAQ;;IAQR,mBAAmB,GAAA;QAC1B,OAAO,IAAI,CAAC,QAAQ;;IAGb,MAAM,CAAC,GAAG,MAAW,EAAA;;;AAG5B,QAAA,IAAI,IAAI,CAAC,QAAQ,EAAE;AACjB,YAAA,OAAO,KAAK,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;;aACzB;AACL,YAAA,OAAO,KAAK,CAAC,YAAY,CAAC,GAAG,MAAM,CAAC;;;AAGzC;AAED;MAgBa,SAAS,CAAA;;AAEpB,IAAA,IACI,EAAE,GAAA;AACJ,QAAA,OAAO,IAAI,CAAC,GAAG,IAAI,IAAI,CAAC,YAAY;;IAEtC,IAAI,EAAE,CAAC,KAAK,EAAA;AACV,QAAA,IAAI,CAAC,GAAG,GAAG,KAAK;;AAEV,IAAA,GAAG;IACH,YAAY,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC;;AAG5C,IAAA,KAAK;AAEzB;;;AAGG;AAC+B,IAAA,cAAc;;AAGhD,IAAA,IACI,QAAQ,GAAA;QACV,OAAO,IAAI,CAAC,OAA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