{"version":3,"file":"chip-list.d.ts","sources":["chip-list.d.ts"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA;AACA","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 */\nimport { FocusKeyManager } from '@angular/cdk/a11y';\nimport { Directionality } from '@angular/cdk/bidi';\nimport { BooleanInput } from '@angular/cdk/coercion';\nimport { SelectionModel } from '@angular/cdk/collections';\nimport { AfterContentInit, ChangeDetectorRef, DoCheck, ElementRef, EventEmitter, OnDestroy, OnInit, QueryList } from '@angular/core';\nimport { ControlValueAccessor, FormGroupDirective, NgControl, NgForm } from '@angular/forms';\nimport { CanUpdateErrorState, ErrorStateMatcher } from '@angular/material/core';\nimport { MatFormFieldControl } from '@angular/material/form-field';\nimport { Observable } from 'rxjs';\nimport { MatChip, MatChipEvent, MatChipSelectionChange } from './chip';\nimport { MatChipTextControl } from './chip-text-control';\n/** @docs-private */\ndeclare const _MatChipListBase: import(\"@angular/material/core/common-behaviors/constructor\").Constructor & import(\"@angular/material/core/common-behaviors/constructor\").AbstractConstructor & {\n new (_defaultErrorStateMatcher: ErrorStateMatcher, _parentForm: NgForm, _parentFormGroup: FormGroupDirective, ngControl: NgControl): {\n _defaultErrorStateMatcher: ErrorStateMatcher;\n _parentForm: NgForm;\n _parentFormGroup: FormGroupDirective;\n /** @docs-private */\n ngControl: NgControl;\n };\n};\n/** Change event object that is emitted when the chip list value has changed. */\nexport declare class MatChipListChange {\n /** Chip list that emitted the event. */\n source: MatChipList;\n /** Value of the chip list when the event was emitted. */\n value: any;\n constructor(\n /** Chip list that emitted the event. */\n source: MatChipList, \n /** Value of the chip list when the event was emitted. */\n value: any);\n}\n/**\n * A material design chips component (named ChipList for its similarity to the List component).\n */\nexport declare class MatChipList extends _MatChipListBase implements MatFormFieldControl, ControlValueAccessor, AfterContentInit, DoCheck, OnInit, OnDestroy, CanUpdateErrorState {\n protected _elementRef: ElementRef;\n private _changeDetectorRef;\n private _dir;\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n readonly controlType: string;\n /**\n * When a chip is destroyed, we store the index of the destroyed chip until the chips\n * query list notifies about the update. This is necessary because we cannot determine an\n * appropriate chip that should receive focus until the array of chips updated completely.\n */\n private _lastDestroyedChipIndex;\n /** Subject that emits when the component has been destroyed. */\n private readonly _destroyed;\n /** Subscription to focus changes in the chips. */\n private _chipFocusSubscription;\n /** Subscription to blur changes in the chips. */\n private _chipBlurSubscription;\n /** Subscription to selection changes in chips. */\n private _chipSelectionSubscription;\n /** Subscription to remove changes in chips. */\n private _chipRemoveSubscription;\n /** The chip input to add more chips */\n protected _chipInput: MatChipTextControl;\n /** Uid of the chip list */\n _uid: string;\n /** The aria-describedby attribute on the chip list for improved a11y. */\n _ariaDescribedby: string;\n /** Tab index for the chip list. */\n _tabIndex: number;\n /**\n * User defined tab index.\n * When it is not null, use user defined tab index. Otherwise use _tabIndex\n */\n _userTabIndex: number | null;\n /** The FocusKeyManager which handles focus. */\n _keyManager: FocusKeyManager;\n /** Function when touched */\n _onTouched: () => void;\n /** Function when changed */\n _onChange: (value: any) => void;\n _selectionModel: SelectionModel;\n /** The array of selected chips inside chip list. */\n get selected(): MatChip[] | MatChip;\n /** The ARIA role applied to the chip list. */\n get role(): string | null;\n /** An object used to control when error messages are shown. */\n errorStateMatcher: ErrorStateMatcher;\n /** Whether the user should be allowed to select multiple chips. */\n get multiple(): boolean;\n set multiple(value: boolean);\n private _multiple;\n /**\n * A function to compare the option values with the selected values. The first argument\n * is a value from an option. The second is a value from the selection. A boolean\n * should be returned.\n */\n get compareWith(): (o1: any, o2: any) => boolean;\n set compareWith(fn: (o1: any, o2: any) => boolean);\n private _compareWith;\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n get value(): any;\n set value(value: any);\n protected _value: any;\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n get id(): string;\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n get required(): boolean;\n set required(value: boolean);\n protected _required: boolean;\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n get placeholder(): string;\n set placeholder(value: string);\n protected _placeholder: string;\n /** Whether any chips or the matChipInput inside of this chip-list has focus. */\n get focused(): boolean;\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n get empty(): boolean;\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n get shouldLabelFloat(): boolean;\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n get disabled(): boolean;\n set disabled(value: boolean);\n protected _disabled: boolean;\n /** Orientation of the chip list. */\n ariaOrientation: 'horizontal' | 'vertical';\n /**\n * Whether or not this chip list is selectable. When a chip list is not selectable,\n * the selected states for all the chips inside the chip list are always ignored.\n */\n get selectable(): boolean;\n set selectable(value: boolean);\n protected _selectable: boolean;\n set tabIndex(value: number);\n /** Combined stream of all of the child chips' selection change events. */\n get chipSelectionChanges(): Observable;\n /** Combined stream of all of the child chips' focus change events. */\n get chipFocusChanges(): Observable;\n /** Combined stream of all of the child chips' blur change events. */\n get chipBlurChanges(): Observable;\n /** Combined stream of all of the child chips' remove change events. */\n get chipRemoveChanges(): Observable;\n /** Event emitted when the selected chip list value has been changed by the user. */\n readonly change: EventEmitter;\n /**\n * Event that emits whenever the raw value of the chip-list changes. This is here primarily\n * to facilitate the two-way binding for the `value` input.\n * @docs-private\n */\n readonly valueChange: EventEmitter;\n /** The chip components contained within this chip list. */\n chips: QueryList;\n constructor(_elementRef: ElementRef, _changeDetectorRef: ChangeDetectorRef, _dir: Directionality, _parentForm: NgForm, _parentFormGroup: FormGroupDirective, _defaultErrorStateMatcher: ErrorStateMatcher, ngControl: NgControl);\n ngAfterContentInit(): void;\n ngOnInit(): void;\n ngDoCheck(): void;\n ngOnDestroy(): void;\n /** Associates an HTML input element with this chip list. */\n registerInput(inputElement: MatChipTextControl): void;\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n setDescribedByIds(ids: string[]): void;\n writeValue(value: any): void;\n registerOnChange(fn: (value: any) => void): void;\n registerOnTouched(fn: () => void): void;\n setDisabledState(isDisabled: boolean): void;\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n onContainerClick(event: MouseEvent): void;\n /**\n * Focuses the first non-disabled chip in this chip list, or the associated input when there\n * are no eligible chips.\n */\n focus(options?: FocusOptions): void;\n /** Attempt to focus an input if we have one. */\n _focusInput(options?: FocusOptions): void;\n /**\n * Pass events to the keyboard manager. Available here for tests.\n */\n _keydown(event: KeyboardEvent): void;\n /**\n * Check the tab index as you should not be allowed to focus an empty list.\n */\n protected _updateTabIndex(): void;\n /**\n * If the amount of chips changed, we need to update the\n * key manager state and focus the next closest chip.\n */\n protected _updateFocusForDestroyedChips(): void;\n /**\n * Utility to ensure all indexes are valid.\n *\n * @param index The index to be checked.\n * @returns True if the index is valid for our list of chips.\n */\n private _isValidIndex;\n _setSelectionByValue(value: any, isUserInput?: boolean): void;\n /**\n * Finds and selects the chip based on its value.\n * @returns Chip that has the corresponding value.\n */\n private _selectValue;\n private _initializeSelection;\n /**\n * Deselects every chip in the list.\n * @param skip Chip that should not be deselected.\n */\n private _clearSelection;\n /**\n * Sorts the model values, ensuring that they keep the same\n * order that they have in the panel.\n */\n private _sortValues;\n /** Emits change event to set the model value. */\n private _propagateChanges;\n /** When blurred, mark the field as touched when focus moved outside the chip list. */\n _blur(): void;\n /** Mark the field as touched */\n _markAsTouched(): void;\n /**\n * Removes the `tabindex` from the chip list and resets it back afterwards, allowing the\n * user to tab out of it. This prevents the list from capturing focus and redirecting\n * it back to the first chip, creating a focus trap, if it user tries to tab away.\n */\n _allowFocusEscape(): void;\n private _resetChips;\n private _dropSubscriptions;\n /** Listens to user-generated selection events on each chip. */\n private _listenToChipsSelection;\n /** Listens to user-generated selection events on each chip. */\n private _listenToChipsFocus;\n private _listenToChipsRemoved;\n /** Checks whether an event comes from inside a chip element. */\n private _originatesFromChip;\n /** Checks whether any of the chips is focused. */\n private _hasFocusedChip;\n /** Syncs the list's state with the individual chips. */\n private _syncChipsState;\n static ngAcceptInputType_multiple: BooleanInput;\n static ngAcceptInputType_required: BooleanInput;\n static ngAcceptInputType_disabled: BooleanInput;\n static ngAcceptInputType_selectable: BooleanInput;\n}\nexport {};\n"]}