UNPKG

@angular/material

Version:
1 lines 64.4 kB
{"version":3,"file":"legacy-list.mjs","sources":["../../../../../../src/material/legacy-list/list.ts","../../../../../../src/material/legacy-list/list.html","../../../../../../src/material/legacy-list/list-item.html","../../../../../../src/material/legacy-list/selection-list.ts","../../../../../../src/material/legacy-list/list-option.html","../../../../../../src/material/legacy-list/list-module.ts","../../../../../../src/material/legacy-list/public-api.ts","../../../../../../src/material/legacy-list/index.ts","../../../../../../src/material/legacy-list/legacy-list_public_index.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.io/license\n */\n\nimport {coerceBooleanProperty, BooleanInput} from '@angular/cdk/coercion';\nimport {\n AfterContentInit,\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n ContentChildren,\n Directive,\n ElementRef,\n Optional,\n QueryList,\n ViewEncapsulation,\n OnChanges,\n OnDestroy,\n ChangeDetectorRef,\n Input,\n Inject,\n} from '@angular/core';\nimport {\n CanDisable,\n CanDisableRipple,\n MatLine,\n setLines,\n mixinDisableRipple,\n mixinDisabled,\n} from '@angular/material/core';\nimport {MAT_LIST, MAT_NAV_LIST} from '@angular/material/list';\nimport {Subject} from 'rxjs';\nimport {takeUntil} from 'rxjs/operators';\n\n// Boilerplate for applying mixins to MatList.\n/** @docs-private */\nconst _MatListBase = mixinDisabled(mixinDisableRipple(class {}));\n\n// Boilerplate for applying mixins to MatListItem.\n/** @docs-private */\nconst _MatListItemMixinBase = mixinDisableRipple(class {});\n\n/**\n * @deprecated Use `MatNavList` from `@angular/material/list` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.\n * @breaking-change 17.0.0\n */\n@Component({\n selector: 'mat-nav-list',\n exportAs: 'matNavList',\n host: {\n 'role': 'navigation',\n 'class': 'mat-nav-list mat-list-base',\n },\n templateUrl: 'list.html',\n styleUrls: ['list.css'],\n inputs: ['disableRipple', 'disabled'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{provide: MAT_NAV_LIST, useExisting: MatLegacyNavList}],\n})\nexport class MatLegacyNavList\n extends _MatListBase\n implements CanDisable, CanDisableRipple, OnChanges, OnDestroy\n{\n /** Emits when the state of the list changes. */\n readonly _stateChanges = new Subject<void>();\n\n ngOnChanges() {\n this._stateChanges.next();\n }\n\n ngOnDestroy() {\n this._stateChanges.complete();\n }\n}\n\n/**\n * @deprecated Use `MatList` from `@angular/material/list` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.\n * @breaking-change 17.0.0\n */\n@Component({\n selector: 'mat-list, mat-action-list',\n exportAs: 'matList',\n templateUrl: 'list.html',\n host: {\n 'class': 'mat-list mat-list-base',\n },\n styleUrls: ['list.css'],\n inputs: ['disableRipple', 'disabled'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{provide: MAT_LIST, useExisting: MatLegacyList}],\n})\nexport class MatLegacyList\n extends _MatListBase\n implements CanDisable, CanDisableRipple, OnChanges, OnDestroy\n{\n /** Emits when the state of the list changes. */\n readonly _stateChanges = new Subject<void>();\n\n constructor(private _elementRef: ElementRef<HTMLElement>) {\n super();\n\n if (this._getListType() === 'action-list') {\n _elementRef.nativeElement.classList.add('mat-action-list');\n _elementRef.nativeElement.setAttribute('role', 'group');\n }\n }\n\n _getListType(): 'list' | 'action-list' | null {\n const nodeName = this._elementRef.nativeElement.nodeName.toLowerCase();\n\n if (nodeName === 'mat-list') {\n return 'list';\n }\n\n if (nodeName === 'mat-action-list') {\n return 'action-list';\n }\n\n return null;\n }\n\n ngOnChanges() {\n this._stateChanges.next();\n }\n\n ngOnDestroy() {\n this._stateChanges.complete();\n }\n}\n\n/**\n * Directive whose purpose is to add the mat- CSS styling to this selector.\n * @docs-private\n * @deprecated Use `MatListAvatarCssMatStyler` from `@angular/material/list` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.\n * @breaking-change 17.0.0\n */\n@Directive({\n selector: '[mat-list-avatar], [matListAvatar]',\n host: {'class': 'mat-list-avatar'},\n})\nexport class MatLegacyListAvatarCssMatStyler {}\n\n/**\n * Directive whose purpose is to add the mat- CSS styling to this selector.\n * @docs-private\n * @deprecated Use `MatListIconCssMatStyler` from `@angular/material/list` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.\n * @breaking-change 17.0.0\n */\n@Directive({\n selector: '[mat-list-icon], [matListIcon]',\n host: {'class': 'mat-list-icon'},\n})\nexport class MatLegacyListIconCssMatStyler {}\n\n/**\n * Directive whose purpose is to add the mat- CSS styling to this selector.\n * @docs-private\n * @deprecated Use `MatListSubheaderCssMatStyler` from `@angular/material/list` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.\n * @breaking-change 17.0.0\n */\n@Directive({\n selector: '[mat-subheader], [matSubheader]',\n host: {'class': 'mat-subheader'},\n})\nexport class MatLegacyListSubheaderCssMatStyler {}\n\n/**\n * An item within a Material Design list.\n * @deprecated Use `MatListItem` from `@angular/material/list` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.\n * @breaking-change 17.0.0\n */\n@Component({\n selector: 'mat-list-item, a[mat-list-item], button[mat-list-item]',\n exportAs: 'matListItem',\n host: {\n 'class': 'mat-list-item mat-focus-indicator',\n '[class.mat-list-item-disabled]': 'disabled',\n '[class.mat-list-item-with-avatar]': '_avatar || _icon',\n },\n inputs: ['disableRipple'],\n templateUrl: 'list-item.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MatLegacyListItem\n extends _MatListItemMixinBase\n implements AfterContentInit, CanDisableRipple, OnDestroy\n{\n private _isInteractiveList: boolean = false;\n private _list?: MatLegacyNavList | MatLegacyList;\n private readonly _destroyed = new Subject<void>();\n\n @ContentChildren(MatLine, {descendants: true}) _lines: QueryList<MatLine>;\n @ContentChild(MatLegacyListAvatarCssMatStyler) _avatar: MatLegacyListAvatarCssMatStyler;\n @ContentChild(MatLegacyListIconCssMatStyler) _icon: MatLegacyListIconCssMatStyler;\n\n constructor(\n private _element: ElementRef<HTMLElement>,\n _changeDetectorRef: ChangeDetectorRef,\n @Optional() @Inject(MAT_NAV_LIST) navList?: MatLegacyNavList,\n @Optional() @Inject(MAT_LIST) list?: MatLegacyList,\n ) {\n super();\n this._isInteractiveList = !!(navList || (list && list._getListType() === 'action-list'));\n this._list = navList || list;\n\n // If no type attribute is specified for <button>, set it to \"button\".\n // If a type attribute is already specified, do nothing.\n const element = this._getHostElement();\n\n if (element.nodeName.toLowerCase() === 'button' && !element.hasAttribute('type')) {\n element.setAttribute('type', 'button');\n }\n\n if (this._list) {\n // React to changes in the state of the parent list since\n // some of the item's properties depend on it (e.g. `disableRipple`).\n this._list._stateChanges.pipe(takeUntil(this._destroyed)).subscribe(() => {\n _changeDetectorRef.markForCheck();\n });\n }\n }\n\n /** Whether the option is disabled. */\n @Input()\n get disabled(): boolean {\n return this._disabled || !!(this._list && this._list.disabled);\n }\n set disabled(value: BooleanInput) {\n this._disabled = coerceBooleanProperty(value);\n }\n private _disabled = false;\n\n ngAfterContentInit() {\n setLines(this._lines, this._element);\n }\n\n ngOnDestroy() {\n this._destroyed.next();\n this._destroyed.complete();\n }\n\n /** Whether this list item should show a ripple effect when clicked. */\n _isRippleDisabled() {\n return (\n !this._isInteractiveList || this.disableRipple || !!(this._list && this._list.disableRipple)\n );\n }\n\n /** Retrieves the DOM element of the component host. */\n _getHostElement(): HTMLElement {\n return this._element.nativeElement;\n }\n}\n","<ng-content></ng-content>\n\n","<span class=\"mat-list-item-content\">\n <span class=\"mat-list-item-ripple\" mat-ripple\n [matRippleTrigger]=\"_getHostElement()\"\n [matRippleDisabled]=\"_isRippleDisabled()\">\n </span>\n\n <ng-content select=\"[mat-list-avatar], [mat-list-icon], [matListAvatar], [matListIcon]\">\n </ng-content>\n\n <span class=\"mat-list-text\"><ng-content select=\"[mat-line], [matLine]\"></ng-content></span>\n\n <ng-content></ng-content>\n</span>\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.io/license\n */\n\nimport {FocusableOption, FocusKeyManager, FocusMonitor} from '@angular/cdk/a11y';\nimport {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {SelectionModel} from '@angular/cdk/collections';\nimport {A, DOWN_ARROW, ENTER, hasModifierKey, SPACE, UP_ARROW} from '@angular/cdk/keycodes';\nimport {\n AfterContentInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChild,\n ContentChildren,\n ElementRef,\n EventEmitter,\n forwardRef,\n Inject,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Output,\n QueryList,\n SimpleChanges,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from '@angular/forms';\nimport {\n CanDisableRipple,\n MatLine,\n mixinDisableRipple,\n setLines,\n ThemePalette,\n} from '@angular/material/core';\nimport {Subject} from 'rxjs';\nimport {startWith, takeUntil} from 'rxjs/operators';\nimport {MatLegacyListAvatarCssMatStyler, MatLegacyListIconCssMatStyler} from './list';\n\nconst _MatSelectionListBase = mixinDisableRipple(class {});\nconst _MatListOptionBase = mixinDisableRipple(class {});\n\n/**\n * @docs-private\n * @deprecated Use `MAT_SELECTION_LIST_VALUE_ACCESSOR` from `@angular/material/list` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.\n * @breaking-change 17.0.0\n */\nexport const MAT_LEGACY_SELECTION_LIST_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => MatLegacySelectionList),\n multi: true,\n};\n\n/**\n * Change event that is being fired whenever the selected state of an option changes.\n * @deprecated Use `MatSelectionListChange` from `@angular/material/list` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.\n * @breaking-change 17.0.0\n */\nexport class MatLegacySelectionListChange {\n constructor(\n /** Reference to the selection list that emitted the event. */\n public source: MatLegacySelectionList,\n /** Reference to the options that have been changed. */\n public options: MatLegacyListOption[],\n ) {}\n}\n\n/**\n * Type describing possible positions of a checkbox in a list option\n * with respect to the list item's text.\n * @deprecated Use `MatListOptionCheckboxPosition` from `@angular/material/list` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.\n * @breaking-change 17.0.0\n */\nexport type MatLegacyListOptionCheckboxPosition = 'before' | 'after';\n\n/**\n * Component for list-options of selection-list. Each list-option can automatically\n * generate a checkbox and can put current item into the selectionModel of selection-list\n * if the current item is selected.\n * @deprecated Use `MatListOption` from `@angular/material/list` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.\n * @breaking-change 17.0.0\n */\n@Component({\n selector: 'mat-list-option',\n exportAs: 'matListOption',\n inputs: ['disableRipple'],\n host: {\n 'role': 'option',\n 'class': 'mat-list-item mat-list-option mat-focus-indicator',\n '(focus)': '_handleFocus()',\n '(blur)': '_handleBlur()',\n '(click)': '_handleClick()',\n '[class.mat-list-item-disabled]': 'disabled',\n '[class.mat-list-item-with-avatar]': '_avatar || _icon',\n // Manually set the \"primary\" or \"warn\" class if the color has been explicitly\n // set to \"primary\" or \"warn\". The pseudo checkbox picks up these classes for\n // its theme.\n '[class.mat-primary]': 'color === \"primary\"',\n // Even though accent is the default, we need to set this class anyway, because the list might\n // be placed inside a parent that has one of the other colors with a higher specificity.\n '[class.mat-accent]': 'color !== \"primary\" && color !== \"warn\"',\n '[class.mat-warn]': 'color === \"warn\"',\n '[class.mat-list-single-selected-option]': 'selected && !selectionList.multiple',\n '[attr.aria-selected]': 'selected',\n '[attr.aria-disabled]': 'disabled',\n '[attr.tabindex]': '-1',\n },\n templateUrl: 'list-option.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MatLegacyListOption\n extends _MatListOptionBase\n implements AfterContentInit, OnDestroy, OnInit, FocusableOption, CanDisableRipple\n{\n private _selected = false;\n private _disabled = false;\n private _hasFocus = false;\n\n @ContentChild(MatLegacyListAvatarCssMatStyler) _avatar: MatLegacyListAvatarCssMatStyler;\n @ContentChild(MatLegacyListIconCssMatStyler) _icon: MatLegacyListIconCssMatStyler;\n @ContentChildren(MatLine, {descendants: true}) _lines: QueryList<MatLine>;\n\n /**\n * Emits when the selected state of the option has changed.\n * Use to facilitate two-data binding to the `selected` property.\n * @docs-private\n */\n @Output()\n readonly selectedChange: EventEmitter<boolean> = new EventEmitter<boolean>();\n\n /** DOM element containing the item's text. */\n @ViewChild('text') _text: ElementRef;\n\n /** Whether the label should appear before or after the checkbox. Defaults to 'after' */\n @Input() checkboxPosition: MatLegacyListOptionCheckboxPosition = 'after';\n\n /** Theme color of the list option. This sets the color of the checkbox. */\n @Input()\n get color(): ThemePalette {\n return this._color || this.selectionList.color;\n }\n set color(newValue: ThemePalette) {\n this._color = newValue;\n }\n private _color: ThemePalette;\n\n /**\n * This is set to true after the first OnChanges cycle so we don't clear the value of `selected`\n * in the first cycle.\n */\n private _inputsInitialized = false;\n /** Value of the option */\n @Input()\n get value(): any {\n return this._value;\n }\n set value(newValue: any) {\n if (\n this.selected &&\n !this.selectionList.compareWith(newValue, this.value) &&\n this._inputsInitialized\n ) {\n this.selected = false;\n }\n\n this._value = newValue;\n }\n private _value: any;\n\n /** Whether the option is disabled. */\n @Input()\n get disabled(): boolean {\n return this._disabled || (this.selectionList && this.selectionList.disabled);\n }\n set disabled(value: BooleanInput) {\n const newValue = coerceBooleanProperty(value);\n\n if (newValue !== this._disabled) {\n this._disabled = newValue;\n this._changeDetector.markForCheck();\n }\n }\n\n /** Whether the option is selected. */\n @Input()\n get selected(): boolean {\n return this.selectionList.selectedOptions.isSelected(this);\n }\n set selected(value: BooleanInput) {\n const isSelected = coerceBooleanProperty(value);\n\n if (isSelected !== this._selected) {\n this._setSelected(isSelected);\n\n if (isSelected || this.selectionList.multiple) {\n this.selectionList._reportValueChange();\n }\n }\n }\n\n constructor(\n private _element: ElementRef<HTMLElement>,\n private _changeDetector: ChangeDetectorRef,\n /** @docs-private */\n @Inject(forwardRef(() => MatLegacySelectionList)) public selectionList: MatLegacySelectionList,\n ) {\n super();\n }\n\n ngOnInit() {\n const list = this.selectionList;\n\n if (list._value && list._value.some(value => list.compareWith(this._value, value))) {\n this._setSelected(true);\n }\n\n const wasSelected = this._selected;\n\n // List options that are selected at initialization can't be reported properly to the form\n // control. This is because it takes some time until the selection-list knows about all\n // available options. Also it can happen that the ControlValueAccessor has an initial value\n // that should be used instead. Deferring the value change report to the next tick ensures\n // that the form control value is not being overwritten.\n Promise.resolve().then(() => {\n if (this._selected || wasSelected) {\n this.selected = true;\n this._changeDetector.markForCheck();\n }\n });\n this._inputsInitialized = true;\n }\n\n ngAfterContentInit() {\n setLines(this._lines, this._element);\n }\n\n ngOnDestroy(): void {\n if (this.selected) {\n // We have to delay this until the next tick in order\n // to avoid changed after checked errors.\n Promise.resolve().then(() => {\n this.selected = false;\n });\n }\n\n const hadFocus = this._hasFocus;\n const newActiveItem = this.selectionList._removeOptionFromList(this);\n\n // Only move focus if this option was focused at the time it was destroyed.\n if (hadFocus && newActiveItem) {\n newActiveItem.focus();\n }\n }\n\n /** Toggles the selection state of the option. */\n toggle(): void {\n this.selected = !this.selected;\n }\n\n /** Allows for programmatic focusing of the option. */\n focus(): void {\n this._element.nativeElement.focus();\n }\n\n /**\n * Returns the list item's text label. Implemented as a part of the FocusKeyManager.\n * @docs-private\n */\n getLabel() {\n return this._text ? this._text.nativeElement.textContent || '' : '';\n }\n\n /** Whether this list item should show a ripple effect when clicked. */\n _isRippleDisabled() {\n return this.disabled || this.disableRipple || this.selectionList.disableRipple;\n }\n\n _handleClick() {\n if (!this.disabled && (this.selectionList.multiple || !this.selected)) {\n this.toggle();\n\n // Emit a change event if the selected state of the option changed through user interaction.\n this.selectionList._emitChangeEvent([this]);\n }\n }\n\n _handleFocus() {\n this.selectionList._setFocusedOption(this);\n this._hasFocus = true;\n }\n\n _handleBlur() {\n this.selectionList._onTouched();\n this._hasFocus = false;\n }\n\n /** Retrieves the DOM element of the component host. */\n _getHostElement(): HTMLElement {\n return this._element.nativeElement;\n }\n\n /** Sets the selected state of the option. Returns whether the value has changed. */\n _setSelected(selected: boolean): boolean {\n if (selected === this._selected) {\n return false;\n }\n\n this._selected = selected;\n\n if (selected) {\n this.selectionList.selectedOptions.select(this);\n } else {\n this.selectionList.selectedOptions.deselect(this);\n }\n\n this.selectedChange.emit(selected);\n this._changeDetector.markForCheck();\n return true;\n }\n\n /**\n * Notifies Angular that the option needs to be checked in the next change detection run. Mainly\n * used to trigger an update of the list option if the disabled state of the selection list\n * changed.\n */\n _markForCheck() {\n this._changeDetector.markForCheck();\n }\n}\n\n/**\n * Material Design list component where each item is a selectable option. Behaves as a listbox.\n * @deprecated Use `MatSelectionList` from `@angular/material/list` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.\n * @breaking-change 17.0.0\n */\n@Component({\n selector: 'mat-selection-list',\n exportAs: 'matSelectionList',\n inputs: ['disableRipple'],\n host: {\n 'role': 'listbox',\n 'class': 'mat-selection-list mat-list-base',\n '(keydown)': '_keydown($event)',\n '[attr.aria-multiselectable]': 'multiple',\n '[attr.aria-disabled]': 'disabled.toString()',\n '[attr.tabindex]': '_tabIndex',\n },\n template: '<ng-content></ng-content>',\n styleUrls: ['list.css'],\n encapsulation: ViewEncapsulation.None,\n providers: [MAT_LEGACY_SELECTION_LIST_VALUE_ACCESSOR],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MatLegacySelectionList\n extends _MatSelectionListBase\n implements CanDisableRipple, AfterContentInit, ControlValueAccessor, OnDestroy, OnChanges\n{\n private _multiple = true;\n private _contentInitialized = false;\n\n /** The FocusKeyManager which handles focus. */\n _keyManager: FocusKeyManager<MatLegacyListOption>;\n\n /** The option components contained within this selection-list. */\n @ContentChildren(MatLegacyListOption, {descendants: true})\n options: QueryList<MatLegacyListOption>;\n\n /** Emits a change event whenever the selected state of an option changes. */\n @Output() readonly selectionChange: EventEmitter<MatLegacySelectionListChange> =\n new EventEmitter<MatLegacySelectionListChange>();\n\n /** Theme color of the selection list. This sets the checkbox color for all list options. */\n @Input() color: ThemePalette = 'accent';\n\n /**\n * Function used for comparing an option against the selected value when determining which\n * options should appear as selected. The first argument is the value of an options. The second\n * one is a value from the selected value. A boolean must be returned.\n */\n @Input() compareWith: (o1: any, o2: any) => boolean = (a1, a2) => a1 === a2;\n\n /** Whether the selection list is disabled. */\n @Input()\n get disabled(): boolean {\n return this._disabled;\n }\n set disabled(value: BooleanInput) {\n this._disabled = coerceBooleanProperty(value);\n\n // The `MatSelectionList` and `MatListOption` are using the `OnPush` change detection\n // strategy. Therefore the options will not check for any changes if the `MatSelectionList`\n // changed its state. Since we know that a change to `disabled` property of the list affects\n // the state of the options, we manually mark each option for check.\n this._markOptionsForCheck();\n }\n private _disabled: boolean = false;\n\n /** Whether selection is limited to one or multiple items (default multiple). */\n @Input()\n get multiple(): boolean {\n return this._multiple;\n }\n set multiple(value: BooleanInput) {\n const newValue = coerceBooleanProperty(value);\n\n if (newValue !== this._multiple) {\n if (this._contentInitialized && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw new Error(\n 'Cannot change `multiple` mode of mat-selection-list after initialization.',\n );\n }\n\n this._multiple = newValue;\n this.selectedOptions = new SelectionModel(this._multiple, this.selectedOptions.selected);\n }\n }\n\n /** The currently selected options. */\n selectedOptions = new SelectionModel<MatLegacyListOption>(this._multiple);\n\n /** The tabindex of the selection list. */\n _tabIndex = -1;\n\n /** View to model callback that should be called whenever the selected options change. */\n private _onChange: (value: any) => void = (_: any) => {};\n\n /** Keeps track of the currently-selected value. */\n _value: string[] | null;\n\n /** Emits when the list has been destroyed. */\n private readonly _destroyed = new Subject<void>();\n\n /** View to model callback that should be called if the list or its options lost focus. */\n _onTouched: () => void = () => {};\n\n /** Whether the list has been destroyed. */\n private _isDestroyed: boolean;\n\n constructor(\n private _element: ElementRef<HTMLElement>,\n private _changeDetector: ChangeDetectorRef,\n private _focusMonitor: FocusMonitor,\n ) {\n super();\n }\n\n ngAfterContentInit(): void {\n this._contentInitialized = true;\n\n this._keyManager = new FocusKeyManager<MatLegacyListOption>(this.options)\n .withWrap()\n .withTypeAhead()\n .withHomeAndEnd()\n // Allow disabled items to be focusable. For accessibility reasons, there must be a way for\n // screen reader users, that allows reading the different options of the list.\n .skipPredicate(() => false)\n .withAllowedModifierKeys(['shiftKey']);\n\n if (this._value) {\n this._setOptionsFromValues(this._value);\n }\n\n // If the user attempts to tab out of the selection list, allow focus to escape.\n this._keyManager.tabOut.subscribe(() => this._allowFocusEscape());\n\n // When the number of options change, update the tabindex of the selection list.\n this.options.changes.pipe(startWith(null), takeUntil(this._destroyed)).subscribe(() => {\n this._updateTabIndex();\n });\n\n // Sync external changes to the model back to the options.\n this.selectedOptions.changed.pipe(takeUntil(this._destroyed)).subscribe(event => {\n if (event.added) {\n for (let item of event.added) {\n item.selected = true;\n }\n }\n\n if (event.removed) {\n for (let item of event.removed) {\n item.selected = false;\n }\n }\n });\n\n this._focusMonitor\n .monitor(this._element)\n .pipe(takeUntil(this._destroyed))\n .subscribe(origin => {\n if (origin === 'keyboard' || origin === 'program') {\n let toFocus = 0;\n for (let i = 0; i < this.options.length; i++) {\n if (this.options.get(i)?.selected) {\n toFocus = i;\n break;\n }\n }\n this._keyManager.setActiveItem(toFocus);\n }\n });\n }\n\n ngOnChanges(changes: SimpleChanges) {\n const disableRippleChanges = changes['disableRipple'];\n const colorChanges = changes['color'];\n\n if (\n (disableRippleChanges && !disableRippleChanges.firstChange) ||\n (colorChanges && !colorChanges.firstChange)\n ) {\n this._markOptionsForCheck();\n }\n }\n\n ngOnDestroy() {\n this._keyManager?.destroy();\n this._focusMonitor.stopMonitoring(this._element);\n this._destroyed.next();\n this._destroyed.complete();\n this._isDestroyed = true;\n }\n\n /** Focuses the selection list. */\n focus(options?: FocusOptions) {\n this._element.nativeElement.focus(options);\n }\n\n /** Selects all of the options. Returns the options that changed as a result. */\n selectAll(): MatLegacyListOption[] {\n return this._setAllOptionsSelected(true);\n }\n\n /** Deselects all of the options. Returns the options that changed as a result. */\n deselectAll(): MatLegacyListOption[] {\n return this._setAllOptionsSelected(false);\n }\n\n /** Sets the focused option of the selection-list. */\n _setFocusedOption(option: MatLegacyListOption) {\n this._keyManager.updateActiveItem(option);\n }\n\n /**\n * Removes an option from the selection list and updates the active item.\n * @returns Currently-active item.\n */\n _removeOptionFromList(option: MatLegacyListOption): MatLegacyListOption | null {\n const optionIndex = this._getOptionIndex(option);\n\n if (optionIndex > -1 && this._keyManager.activeItemIndex === optionIndex) {\n // Check whether the option is the last item\n if (optionIndex > 0) {\n this._keyManager.updateActiveItem(optionIndex - 1);\n } else if (optionIndex === 0 && this.options.length > 1) {\n this._keyManager.updateActiveItem(Math.min(optionIndex + 1, this.options.length - 1));\n }\n }\n\n return this._keyManager.activeItem;\n }\n\n /** Passes relevant key presses to our key manager. */\n _keydown(event: KeyboardEvent) {\n const keyCode = event.keyCode;\n const manager = this._keyManager;\n const previousFocusIndex = manager.activeItemIndex;\n const hasModifier = hasModifierKey(event);\n\n switch (keyCode) {\n case SPACE:\n case ENTER:\n if (!hasModifier && !manager.isTyping()) {\n this._toggleFocusedOption();\n // Always prevent space from scrolling the page since the list has focus\n event.preventDefault();\n }\n break;\n default:\n // The \"A\" key gets special treatment, because it's used for the \"select all\" functionality.\n if (\n keyCode === A &&\n this.multiple &&\n hasModifierKey(event, 'ctrlKey') &&\n !manager.isTyping()\n ) {\n const shouldSelect = this.options.some(option => !option.disabled && !option.selected);\n this._setAllOptionsSelected(shouldSelect, true, true);\n event.preventDefault();\n } else {\n manager.onKeydown(event);\n }\n }\n\n if (\n this.multiple &&\n (keyCode === UP_ARROW || keyCode === DOWN_ARROW) &&\n event.shiftKey &&\n manager.activeItemIndex !== previousFocusIndex\n ) {\n this._toggleFocusedOption();\n }\n }\n\n /** Reports a value change to the ControlValueAccessor */\n _reportValueChange() {\n // Stop reporting value changes after the list has been destroyed. This avoids\n // cases where the list might wrongly reset its value once it is removed, but\n // the form control is still live.\n if (this.options && !this._isDestroyed) {\n const value = this._getSelectedOptionValues();\n this._onChange(value);\n this._value = value;\n }\n }\n\n /** Emits a change event if the selected state of an option changed. */\n _emitChangeEvent(options: MatLegacyListOption[]) {\n this.selectionChange.emit(new MatLegacySelectionListChange(this, options));\n }\n\n /** Implemented as part of ControlValueAccessor. */\n writeValue(values: string[]): void {\n this._value = values;\n\n if (this.options) {\n this._setOptionsFromValues(values || []);\n }\n }\n\n /** Implemented as a part of ControlValueAccessor. */\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n }\n\n /** Implemented as part of ControlValueAccessor. */\n registerOnChange(fn: (value: any) => void): void {\n this._onChange = fn;\n }\n\n /** Implemented as part of ControlValueAccessor. */\n registerOnTouched(fn: () => void): void {\n this._onTouched = fn;\n }\n\n /** Sets the selected options based on the specified values. */\n private _setOptionsFromValues(values: string[]) {\n this.options.forEach(option => option._setSelected(false));\n\n values.forEach(value => {\n const correspondingOption = this.options.find(option => {\n // Skip options that are already in the model. This allows us to handle cases\n // where the same primitive value is selected multiple times.\n return option.selected ? false : this.compareWith(option.value, value);\n });\n\n if (correspondingOption) {\n correspondingOption._setSelected(true);\n }\n });\n }\n\n /** Returns the values of the selected options. */\n private _getSelectedOptionValues(): string[] {\n return this.options.filter(option => option.selected).map(option => option.value);\n }\n\n /** Toggles the state of the currently focused option if enabled. */\n private _toggleFocusedOption(): void {\n let focusedIndex = this._keyManager.activeItemIndex;\n\n if (focusedIndex != null && this._isValidIndex(focusedIndex)) {\n let focusedOption: MatLegacyListOption = this.options.toArray()[focusedIndex];\n\n if (focusedOption && !focusedOption.disabled && (this._multiple || !focusedOption.selected)) {\n focusedOption.toggle();\n\n // Emit a change event because the focused option changed its state through user\n // interaction.\n this._emitChangeEvent([focusedOption]);\n }\n }\n }\n\n /**\n * Sets the selected state on all of the options\n * and emits an event if anything changed.\n */\n private _setAllOptionsSelected(\n isSelected: boolean,\n skipDisabled?: boolean,\n isUserInput?: boolean,\n ): MatLegacyListOption[] {\n // Keep track of whether anything changed, because we only want to\n // emit the changed event when something actually changed.\n const changedOptions: MatLegacyListOption[] = [];\n\n this.options.forEach(option => {\n if ((!skipDisabled || !option.disabled) && option._setSelected(isSelected)) {\n changedOptions.push(option);\n }\n });\n\n if (changedOptions.length) {\n this._reportValueChange();\n\n if (isUserInput) {\n this._emitChangeEvent(changedOptions);\n }\n }\n\n return changedOptions;\n }\n\n /**\n * Utility to ensure all indexes are valid.\n * @param index The index to be checked.\n * @returns True if the index is valid for our list of options.\n */\n private _isValidIndex(index: number): boolean {\n return index >= 0 && index < this.options.length;\n }\n\n /** Returns the index of the specified list option. */\n private _getOptionIndex(option: MatLegacyListOption): number {\n return this.options.toArray().indexOf(option);\n }\n\n /** Marks all the options to be checked in the next change detection run. */\n private _markOptionsForCheck() {\n if (this.options) {\n this.options.forEach(option => option._markForCheck());\n }\n }\n\n /**\n * Removes the tabindex from the selection list and resets it back afterwards, allowing the user\n * to tab out of it. This prevents the list from capturing focus and redirecting it back within\n * the list, creating a focus trap if it user tries to tab away.\n */\n private _allowFocusEscape() {\n this._tabIndex = -1;\n\n setTimeout(() => {\n this._tabIndex = 0;\n this._changeDetector.markForCheck();\n });\n }\n\n /** Updates the tabindex based upon if the selection list is empty. */\n private _updateTabIndex(): void {\n this._tabIndex = this.options.length === 0 ? -1 : 0;\n }\n}\n","<div class=\"mat-list-item-content\"\n [class.mat-list-item-content-reverse]=\"checkboxPosition == 'after'\">\n\n <div mat-ripple\n class=\"mat-list-item-ripple\"\n [matRippleTrigger]=\"_getHostElement()\"\n [matRippleDisabled]=\"_isRippleDisabled()\"></div>\n\n <mat-pseudo-checkbox\n *ngIf=\"selectionList.multiple\"\n [state]=\"selected ? 'checked' : 'unchecked'\"\n [disabled]=\"disabled\"></mat-pseudo-checkbox>\n\n <div class=\"mat-list-text\" #text><ng-content></ng-content></div>\n\n <ng-content select=\"[mat-list-avatar], [mat-list-icon], [matListAvatar], [matListIcon]\">\n </ng-content>\n\n</div>\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.io/license\n */\n\nimport {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {\n MatCommonModule,\n MatLineModule,\n MatPseudoCheckboxModule,\n MatRippleModule,\n} from '@angular/material/core';\nimport {\n MatLegacyList,\n MatLegacyNavList,\n MatLegacyListAvatarCssMatStyler,\n MatLegacyListIconCssMatStyler,\n MatLegacyListItem,\n MatLegacyListSubheaderCssMatStyler,\n} from './list';\nimport {MatLegacyListOption, MatLegacySelectionList} from './selection-list';\nimport {MatDividerModule} from '@angular/material/divider';\n\n/**\n * @deprecated Use `MatListModule` from `@angular/material/list` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.\n * @breaking-change 17.0.0\n */\n@NgModule({\n imports: [MatLineModule, MatRippleModule, MatCommonModule, MatPseudoCheckboxModule, CommonModule],\n exports: [\n MatLegacyList,\n MatLegacyNavList,\n MatLegacyListItem,\n MatLegacyListAvatarCssMatStyler,\n MatLineModule,\n MatCommonModule,\n MatLegacyListIconCssMatStyler,\n MatLegacyListSubheaderCssMatStyler,\n MatPseudoCheckboxModule,\n MatLegacySelectionList,\n MatLegacyListOption,\n MatDividerModule,\n ],\n declarations: [\n MatLegacyList,\n MatLegacyNavList,\n MatLegacyListItem,\n MatLegacyListAvatarCssMatStyler,\n MatLegacyListIconCssMatStyler,\n MatLegacyListSubheaderCssMatStyler,\n MatLegacySelectionList,\n MatLegacyListOption,\n ],\n})\nexport class MatLegacyListModule {}\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.io/license\n */\n\nexport {MatLegacyListModule} from './list-module';\nexport {\n MatLegacyNavList,\n MatLegacyList,\n MatLegacyListAvatarCssMatStyler,\n MatLegacyListIconCssMatStyler,\n MatLegacyListSubheaderCssMatStyler,\n MatLegacyListItem,\n} from './list';\nexport {\n MAT_LEGACY_SELECTION_LIST_VALUE_ACCESSOR,\n MatLegacySelectionListChange,\n MatLegacyListOptionCheckboxPosition,\n MatLegacyListOption,\n MatLegacySelectionList,\n} from './selection-list';\n\nexport {\n /**\n * @deprecated Use `MAT_LIST` from `@angular/material/list` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.\n * @breaking-change 17.0.0\n */\n MAT_LIST as MAT_LEGACY_LIST,\n\n /**\n * @deprecated Use `MAT_NAV_LIST` from `@angular/material/list` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.\n * @breaking-change 17.0.0\n */\n MAT_NAV_LIST as MAT_LEGACY_NAV_LIST,\n} from '@angular/material/list';\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.io/license\n */\n\nexport * from './public-api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;;;;AAMG;AAgCH;AACA;AACA,MAAM,YAAY,GAAG,aAAa,CAAC,kBAAkB,CAAC,MAAA;AAAQ,CAAA,CAAC,CAAC,CAAC;AAEjE;AACA;AACA,MAAM,qBAAqB,GAAG,kBAAkB,CAAC,MAAA;AAAQ,CAAA,CAAC,CAAC;AAE3D;;;AAGG;AAeG,MAAO,gBACX,SAAQ,YAAY,CAAA;AAftB,IAAA,WAAA,GAAA;;;AAmBW,QAAA,IAAA,CAAA,aAAa,GAAG,IAAI,OAAO,EAAQ,CAAC;AAS9C,KAAA;IAPC,WAAW,GAAA;AACT,QAAA,IAAI,CAAC,aAAa,CAAC,IAAI,EAAE,CAAC;KAC3B;IAED,WAAW,GAAA;AACT,QAAA,IAAI,CAAC,aAAa,CAAC,QAAQ,EAAE,CAAC;KAC/B;;kHAbU,gBAAgB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA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