index.d.ts 44 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039
  1. import { _AbstractConstructor } from '@angular/material/core';
  2. import { AfterContentInit } from '@angular/core';
  3. import { AfterViewInit } from '@angular/core';
  4. import { BooleanInput } from '@angular/cdk/coercion';
  5. import { CanColor } from '@angular/material/core';
  6. import { CanDisable } from '@angular/material/core';
  7. import { CanDisableRipple } from '@angular/material/core';
  8. import { CanUpdateErrorState } from '@angular/material/core';
  9. import { ChangeDetectorRef } from '@angular/core';
  10. import { _Constructor } from '@angular/material/core';
  11. import { ControlValueAccessor } from '@angular/forms';
  12. import { Directionality } from '@angular/cdk/bidi';
  13. import { DoCheck } from '@angular/core';
  14. import { ElementRef } from '@angular/core';
  15. import { ErrorStateMatcher } from '@angular/material/core';
  16. import { EventEmitter } from '@angular/core';
  17. import { FocusKeyManager } from '@angular/cdk/a11y';
  18. import { FocusMonitor } from '@angular/cdk/a11y';
  19. import { FormGroupDirective } from '@angular/forms';
  20. import { HasTabIndex } from '@angular/material/core';
  21. import * as i0 from '@angular/core';
  22. import * as i11 from '@angular/material/core';
  23. import * as i12 from '@angular/common';
  24. import { InjectionToken } from '@angular/core';
  25. import { MatFormField } from '@angular/material/form-field';
  26. import { MatFormFieldControl } from '@angular/material/form-field';
  27. import { MatRipple } from '@angular/material/core';
  28. import { NgControl } from '@angular/forms';
  29. import { NgForm } from '@angular/forms';
  30. import { NgZone } from '@angular/core';
  31. import { Observable } from 'rxjs';
  32. import { OnChanges } from '@angular/core';
  33. import { OnDestroy } from '@angular/core';
  34. import { OnInit } from '@angular/core';
  35. import { QueryList } from '@angular/core';
  36. import { RippleGlobalOptions } from '@angular/material/core';
  37. import { Subject } from 'rxjs';
  38. declare namespace i1 {
  39. export {
  40. MatChipAction
  41. }
  42. }
  43. declare namespace i10 {
  44. export {
  45. MatChipSet
  46. }
  47. }
  48. declare namespace i2 {
  49. export {
  50. MatChipEvent,
  51. MatChip
  52. }
  53. }
  54. declare namespace i3 {
  55. export {
  56. MatChipAvatar,
  57. MatChipTrailingIcon,
  58. MatChipRemove
  59. }
  60. }
  61. declare namespace i4 {
  62. export {
  63. MatChipEditInput
  64. }
  65. }
  66. declare namespace i5 {
  67. export {
  68. MatChipGridChange,
  69. MatChipGrid
  70. }
  71. }
  72. declare namespace i6 {
  73. export {
  74. MatChipInputEvent,
  75. MatChipInput
  76. }
  77. }
  78. declare namespace i7 {
  79. export {
  80. MatChipListboxChange,
  81. MAT_CHIP_LISTBOX_CONTROL_VALUE_ACCESSOR,
  82. MatChipListbox
  83. }
  84. }
  85. declare namespace i8 {
  86. export {
  87. MatChipSelectionChange,
  88. MatChipOption
  89. }
  90. }
  91. declare namespace i9 {
  92. export {
  93. MatChipEditedEvent,
  94. MatChipRow
  95. }
  96. }
  97. /**
  98. * Injection token used to avoid a circular dependency between the `MatChip` and `MatChipAction`.
  99. */
  100. export declare const MAT_CHIP: InjectionToken<unknown>;
  101. /**
  102. * Injection token that can be used to reference instances of `MatChipAvatar`. It serves as
  103. * alternative token to the actual `MatChipAvatar` class which could cause unnecessary
  104. * retention of the class and its directive metadata.
  105. */
  106. export declare const MAT_CHIP_AVATAR: InjectionToken<unknown>;
  107. /**
  108. * Provider Expression that allows mat-chip-listbox to register as a ControlValueAccessor.
  109. * This allows it to support [(ngModel)].
  110. * @docs-private
  111. */
  112. export declare const MAT_CHIP_LISTBOX_CONTROL_VALUE_ACCESSOR: any;
  113. /**
  114. * Injection token that can be used to reference instances of `MatChipRemove`. It serves as
  115. * alternative token to the actual `MatChipRemove` class which could cause unnecessary
  116. * retention of the class and its directive metadata.
  117. */
  118. export declare const MAT_CHIP_REMOVE: InjectionToken<unknown>;
  119. /**
  120. * Injection token that can be used to reference instances of `MatChipTrailingIcon`. It serves as
  121. * alternative token to the actual `MatChipTrailingIcon` class which could cause unnecessary
  122. * retention of the class and its directive metadata.
  123. */
  124. export declare const MAT_CHIP_TRAILING_ICON: InjectionToken<unknown>;
  125. /** Injection token to be used to override the default options for the chips module. */
  126. export declare const MAT_CHIPS_DEFAULT_OPTIONS: InjectionToken<MatChipsDefaultOptions>;
  127. /**
  128. * Material design styled Chip base component. Used inside the MatChipSet component.
  129. *
  130. * Extended by MatChipOption and MatChipRow for different interaction patterns.
  131. */
  132. export declare class MatChip extends _MatChipMixinBase implements OnInit, AfterViewInit, AfterContentInit, CanColor, CanDisableRipple, CanDisable, HasTabIndex, OnDestroy {
  133. _changeDetectorRef: ChangeDetectorRef;
  134. protected _ngZone: NgZone;
  135. private _focusMonitor;
  136. private _globalRippleOptions?;
  137. protected _document: Document;
  138. /** Whether the ripple is centered on the chip. */
  139. readonly _isRippleCentered = false;
  140. /** Emits when the chip is focused. */
  141. readonly _onFocus: Subject<MatChipEvent>;
  142. /** Emits when the chip is blurred. */
  143. readonly _onBlur: Subject<MatChipEvent>;
  144. /** Whether this chip is a basic (unstyled) chip. */
  145. _isBasicChip: boolean;
  146. /** Role for the root of the chip. */
  147. role: string | null;
  148. /** Whether the chip has focus. */
  149. private _hasFocusInternal;
  150. /** Whether moving focus into the chip is pending. */
  151. private _pendingFocus;
  152. /** Subscription to changes in the chip's actions. */
  153. private _actionChanges;
  154. /** Whether animations for the chip are enabled. */
  155. _animationsDisabled: boolean;
  156. /** All avatars present in the chip. */
  157. protected _allLeadingIcons: QueryList<MatChipAvatar>;
  158. /** All trailing icons present in the chip. */
  159. protected _allTrailingIcons: QueryList<MatChipTrailingIcon>;
  160. /** All remove icons present in the chip. */
  161. protected _allRemoveIcons: QueryList<MatChipRemove>;
  162. _hasFocus(): boolean;
  163. /** A unique id for the chip. If none is supplied, it will be auto-generated. */
  164. id: string;
  165. /** ARIA label for the content of the chip. */
  166. ariaLabel: string | null;
  167. /** ARIA description for the content of the chip. */
  168. ariaDescription: string | null;
  169. /** Id of a span that contains this chip's aria description. */
  170. _ariaDescriptionId: string;
  171. private _textElement;
  172. /**
  173. * The value of the chip. Defaults to the content inside
  174. * the `mat-mdc-chip-action-label` element.
  175. */
  176. get value(): any;
  177. set value(value: any);
  178. protected _value: any;
  179. /**
  180. * Determines whether or not the chip displays the remove styling and emits (removed) events.
  181. */
  182. get removable(): boolean;
  183. set removable(value: BooleanInput);
  184. protected _removable: boolean;
  185. /**
  186. * Colors the chip for emphasis as if it were selected.
  187. */
  188. get highlighted(): boolean;
  189. set highlighted(value: BooleanInput);
  190. protected _highlighted: boolean;
  191. /** Emitted when a chip is to be removed. */
  192. readonly removed: EventEmitter<MatChipEvent>;
  193. /** Emitted when the chip is destroyed. */
  194. readonly destroyed: EventEmitter<MatChipEvent>;
  195. /** The unstyled chip selector for this component. */
  196. protected basicChipAttrName: string;
  197. /** The chip's leading icon. */
  198. leadingIcon: MatChipAvatar;
  199. /** The chip's trailing icon. */
  200. trailingIcon: MatChipTrailingIcon;
  201. /** The chip's trailing remove icon. */
  202. removeIcon: MatChipRemove;
  203. /**
  204. * Reference to the MatRipple instance of the chip.
  205. * @deprecated Considered an implementation detail. To be removed.
  206. * @breaking-change 17.0.0
  207. */
  208. ripple: MatRipple;
  209. /** Action receiving the primary set of user interactions. */
  210. primaryAction: MatChipAction;
  211. constructor(_changeDetectorRef: ChangeDetectorRef, elementRef: ElementRef<HTMLElement>, _ngZone: NgZone, _focusMonitor: FocusMonitor, _document: any, animationMode?: string, _globalRippleOptions?: RippleGlobalOptions | undefined, tabIndex?: string);
  212. ngOnInit(): void;
  213. ngAfterViewInit(): void;
  214. ngAfterContentInit(): void;
  215. ngOnDestroy(): void;
  216. /**
  217. * Allows for programmatic removal of the chip.
  218. *
  219. * Informs any listeners of the removal request. Does not remove the chip from the DOM.
  220. */
  221. remove(): void;
  222. /** Whether or not the ripple should be disabled. */
  223. _isRippleDisabled(): boolean;
  224. /** Returns whether the chip has a trailing icon. */
  225. _hasTrailingIcon(): boolean;
  226. /** Handles keyboard events on the chip. */
  227. _handleKeydown(event: KeyboardEvent): void;
  228. /** Allows for programmatic focusing of the chip. */
  229. focus(): void;
  230. /** Gets the action that contains a specific target node. */
  231. _getSourceAction(target: Node): MatChipAction | undefined;
  232. /** Gets all of the actions within the chip. */
  233. _getActions(): MatChipAction[];
  234. /** Handles interactions with the primary action of the chip. */
  235. _handlePrimaryActionInteraction(): void;
  236. /** Starts the focus monitoring process on the chip. */
  237. private _monitorFocus;
  238. static ɵfac: i0.ɵɵFactoryDeclaration<MatChip, [null, null, null, null, null, { optional: true; }, { optional: true; }, { attribute: "tabindex"; }]>;
  239. static ɵcmp: i0.ɵɵComponentDeclaration<MatChip, "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", ["matChip"], { "color": { "alias": "color"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "disableRipple": { "alias": "disableRipple"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "role": { "alias": "role"; "required": false; }; "id": { "alias": "id"; "required": false; }; "ariaLabel": { "alias": "aria-label"; "required": false; }; "ariaDescription": { "alias": "aria-description"; "required": false; }; "value": { "alias": "value"; "required": false; }; "removable": { "alias": "removable"; "required": false; }; "highlighted": { "alias": "highlighted"; "required": false; }; }, { "removed": "removed"; "destroyed": "destroyed"; }, ["leadingIcon", "trailingIcon", "removeIcon", "_allLeadingIcons", "_allTrailingIcons", "_allRemoveIcons"], ["mat-chip-avatar, [matChipAvatar]", "*", "mat-chip-trailing-icon,[matChipRemove],[matChipTrailingIcon]"], false, never>;
  240. }
  241. /**
  242. * Section within a chip.
  243. * @docs-private
  244. */
  245. declare class MatChipAction extends _MatChipActionMixinBase implements HasTabIndex {
  246. _elementRef: ElementRef<HTMLElement>;
  247. protected _parentChip: {
  248. _handlePrimaryActionInteraction(): void;
  249. remove(): void;
  250. disabled: boolean;
  251. _isEditing?: boolean;
  252. };
  253. /** Whether the action is interactive. */
  254. isInteractive: boolean;
  255. /** Whether this is the primary action in the chip. */
  256. _isPrimary: boolean;
  257. /** Whether the action is disabled. */
  258. get disabled(): boolean;
  259. set disabled(value: BooleanInput);
  260. private _disabled;
  261. /**
  262. * Private API to allow focusing this chip when it is disabled.
  263. */
  264. private _allowFocusWhenDisabled;
  265. /**
  266. * Determine the value of the disabled attribute for this chip action.
  267. */
  268. protected _getDisabledAttribute(): string | null;
  269. /**
  270. * Determine the value of the tabindex attribute for this chip action.
  271. */
  272. protected _getTabindex(): string | null;
  273. constructor(_elementRef: ElementRef<HTMLElement>, _parentChip: {
  274. _handlePrimaryActionInteraction(): void;
  275. remove(): void;
  276. disabled: boolean;
  277. _isEditing?: boolean;
  278. });
  279. focus(): void;
  280. _handleClick(event: MouseEvent): void;
  281. _handleKeydown(event: KeyboardEvent): void;
  282. static ɵfac: i0.ɵɵFactoryDeclaration<MatChipAction, never>;
  283. static ɵdir: i0.ɵɵDirectiveDeclaration<MatChipAction, "[matChipAction]", never, { "disabled": { "alias": "disabled"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "isInteractive": { "alias": "isInteractive"; "required": false; }; "_allowFocusWhenDisabled": { "alias": "_allowFocusWhenDisabled"; "required": false; }; }, {}, never, never, false, never>;
  284. }
  285. declare abstract class _MatChipActionBase {
  286. abstract disabled: boolean;
  287. }
  288. declare const _MatChipActionMixinBase: _Constructor<HasTabIndex> & _AbstractConstructor<HasTabIndex> & typeof _MatChipActionBase;
  289. /** Avatar image within a chip. */
  290. export declare class MatChipAvatar {
  291. static ɵfac: i0.ɵɵFactoryDeclaration<MatChipAvatar, never>;
  292. static ɵdir: i0.ɵɵDirectiveDeclaration<MatChipAvatar, "mat-chip-avatar, [matChipAvatar]", never, {}, {}, never, never, false, never>;
  293. }
  294. /** Represents an event fired on an individual `mat-chip` when it is edited. */
  295. export declare interface MatChipEditedEvent extends MatChipEvent {
  296. /** The final edit value. */
  297. value: string;
  298. }
  299. /**
  300. * A directive that makes a span editable and exposes functions to modify and retrieve the
  301. * element's contents.
  302. */
  303. export declare class MatChipEditInput {
  304. private readonly _elementRef;
  305. private readonly _document;
  306. constructor(_elementRef: ElementRef, _document: any);
  307. initialize(initialValue: string): void;
  308. getNativeElement(): HTMLElement;
  309. setValue(value: string): void;
  310. getValue(): string;
  311. private _moveCursorToEndOfInput;
  312. static ɵfac: i0.ɵɵFactoryDeclaration<MatChipEditInput, never>;
  313. static ɵdir: i0.ɵɵDirectiveDeclaration<MatChipEditInput, "span[matChipEditInput]", never, {}, {}, never, never, false, never>;
  314. }
  315. /** Represents an event fired on an individual `mat-chip`. */
  316. export declare interface MatChipEvent {
  317. /** The chip the event was fired on. */
  318. chip: MatChip;
  319. }
  320. /**
  321. * An extension of the MatChipSet component used with MatChipRow chips and
  322. * the matChipInputFor directive.
  323. */
  324. export declare class MatChipGrid extends _MatChipGridMixinBase implements AfterContentInit, AfterViewInit, CanUpdateErrorState, ControlValueAccessor, DoCheck, MatFormFieldControl<any>, OnDestroy {
  325. /**
  326. * Implemented as part of MatFormFieldControl.
  327. * @docs-private
  328. */
  329. readonly controlType: string;
  330. /** The chip input to add more chips */
  331. protected _chipInput: MatChipTextControl;
  332. protected _defaultRole: string;
  333. /**
  334. * List of element ids to propagate to the chipInput's aria-describedby attribute.
  335. */
  336. private _ariaDescribedbyIds;
  337. /**
  338. * Function when touched. Set as part of ControlValueAccessor implementation.
  339. * @docs-private
  340. */
  341. _onTouched: () => void;
  342. /**
  343. * Function when changed. Set as part of ControlValueAccessor implementation.
  344. * @docs-private
  345. */
  346. _onChange: (value: any) => void;
  347. /**
  348. * Implemented as part of MatFormFieldControl.
  349. * @docs-private
  350. */
  351. get disabled(): boolean;
  352. set disabled(value: BooleanInput);
  353. /**
  354. * Implemented as part of MatFormFieldControl.
  355. * @docs-private
  356. */
  357. get id(): string;
  358. /**
  359. * Implemented as part of MatFormFieldControl.
  360. * @docs-private
  361. */
  362. get empty(): boolean;
  363. /**
  364. * Implemented as part of MatFormFieldControl.
  365. * @docs-private
  366. */
  367. get placeholder(): string;
  368. set placeholder(value: string);
  369. protected _placeholder: string;
  370. /** Whether any chips or the matChipInput inside of this chip-grid has focus. */
  371. get focused(): boolean;
  372. /**
  373. * Implemented as part of MatFormFieldControl.
  374. * @docs-private
  375. */
  376. get required(): boolean;
  377. set required(value: BooleanInput);
  378. protected _required: boolean | undefined;
  379. /**
  380. * Implemented as part of MatFormFieldControl.
  381. * @docs-private
  382. */
  383. get shouldLabelFloat(): boolean;
  384. /**
  385. * Implemented as part of MatFormFieldControl.
  386. * @docs-private
  387. */
  388. get value(): any;
  389. set value(value: any);
  390. protected _value: any[];
  391. /** An object used to control when error messages are shown. */
  392. errorStateMatcher: ErrorStateMatcher;
  393. /** Combined stream of all of the child chips' blur events. */
  394. get chipBlurChanges(): Observable<MatChipEvent>;
  395. /** Emits when the chip grid value has been changed by the user. */
  396. readonly change: EventEmitter<MatChipGridChange>;
  397. /**
  398. * Emits whenever the raw value of the chip-grid changes. This is here primarily
  399. * to facilitate the two-way binding for the `value` input.
  400. * @docs-private
  401. */
  402. readonly valueChange: EventEmitter<any>;
  403. _chips: QueryList<MatChipRow>;
  404. constructor(elementRef: ElementRef, changeDetectorRef: ChangeDetectorRef, dir: Directionality, parentForm: NgForm, parentFormGroup: FormGroupDirective, defaultErrorStateMatcher: ErrorStateMatcher, ngControl: NgControl);
  405. ngAfterContentInit(): void;
  406. ngAfterViewInit(): void;
  407. ngDoCheck(): void;
  408. ngOnDestroy(): void;
  409. /** Associates an HTML input element with this chip grid. */
  410. registerInput(inputElement: MatChipTextControl): void;
  411. /**
  412. * Implemented as part of MatFormFieldControl.
  413. * @docs-private
  414. */
  415. onContainerClick(event: MouseEvent): void;
  416. /**
  417. * Focuses the first chip in this chip grid, or the associated input when there
  418. * are no eligible chips.
  419. */
  420. focus(): void;
  421. /**
  422. * Implemented as part of MatFormFieldControl.
  423. * @docs-private
  424. */
  425. setDescribedByIds(ids: string[]): void;
  426. /**
  427. * Implemented as part of ControlValueAccessor.
  428. * @docs-private
  429. */
  430. writeValue(value: any): void;
  431. /**
  432. * Implemented as part of ControlValueAccessor.
  433. * @docs-private
  434. */
  435. registerOnChange(fn: (value: any) => void): void;
  436. /**
  437. * Implemented as part of ControlValueAccessor.
  438. * @docs-private
  439. */
  440. registerOnTouched(fn: () => void): void;
  441. /**
  442. * Implemented as part of ControlValueAccessor.
  443. * @docs-private
  444. */
  445. setDisabledState(isDisabled: boolean): void;
  446. /** When blurred, mark the field as touched when focus moved outside the chip grid. */
  447. _blur(): void;
  448. /**
  449. * Removes the `tabindex` from the chip grid and resets it back afterwards, allowing the
  450. * user to tab out of it. This prevents the grid from capturing focus and redirecting
  451. * it back to the first chip, creating a focus trap, if it user tries to tab away.
  452. */
  453. protected _allowFocusEscape(): void;
  454. /** Handles custom keyboard events. */
  455. _handleKeydown(event: KeyboardEvent): void;
  456. _focusLastChip(): void;
  457. /** Emits change event to set the model value. */
  458. private _propagateChanges;
  459. /** Mark the field as touched */
  460. private _markAsTouched;
  461. static ɵfac: i0.ɵɵFactoryDeclaration<MatChipGrid, [null, null, { optional: true; }, { optional: true; }, { optional: true; }, null, { optional: true; self: true; }]>;
  462. static ɵcmp: i0.ɵɵComponentDeclaration<MatChipGrid, "mat-chip-grid", never, { "tabIndex": { "alias": "tabIndex"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "required": { "alias": "required"; "required": false; }; "value": { "alias": "value"; "required": false; }; "errorStateMatcher": { "alias": "errorStateMatcher"; "required": false; }; }, { "change": "change"; "valueChange": "valueChange"; }, ["_chips"], ["*"], false, never>;
  463. }
  464. /**
  465. * Boilerplate for applying mixins to MatChipGrid.
  466. * @docs-private
  467. */
  468. declare class MatChipGridBase extends MatChipSet {
  469. _defaultErrorStateMatcher: ErrorStateMatcher;
  470. _parentForm: NgForm;
  471. _parentFormGroup: FormGroupDirective;
  472. /**
  473. * Form control bound to the component.
  474. * Implemented as part of `MatFormFieldControl`.
  475. * @docs-private
  476. */
  477. ngControl: NgControl;
  478. /**
  479. * Emits whenever the component state changes and should cause the parent
  480. * form-field to update. Implemented as part of `MatFormFieldControl`.
  481. * @docs-private
  482. */
  483. readonly stateChanges: Subject<void>;
  484. constructor(elementRef: ElementRef, changeDetectorRef: ChangeDetectorRef, dir: Directionality, _defaultErrorStateMatcher: ErrorStateMatcher, _parentForm: NgForm, _parentFormGroup: FormGroupDirective,
  485. /**
  486. * Form control bound to the component.
  487. * Implemented as part of `MatFormFieldControl`.
  488. * @docs-private
  489. */
  490. ngControl: NgControl);
  491. }
  492. /** Change event object that is emitted when the chip grid value has changed. */
  493. export declare class MatChipGridChange {
  494. /** Chip grid that emitted the event. */
  495. source: MatChipGrid;
  496. /** Value of the chip grid when the event was emitted. */
  497. value: any;
  498. constructor(
  499. /** Chip grid that emitted the event. */
  500. source: MatChipGrid,
  501. /** Value of the chip grid when the event was emitted. */
  502. value: any);
  503. }
  504. declare const _MatChipGridMixinBase: _Constructor<CanUpdateErrorState> & _AbstractConstructor<CanUpdateErrorState> & typeof MatChipGridBase;
  505. /**
  506. * Directive that adds chip-specific behaviors to an input element inside `<mat-form-field>`.
  507. * May be placed inside or outside of a `<mat-chip-grid>`.
  508. */
  509. export declare class MatChipInput implements MatChipTextControl, AfterContentInit, OnChanges, OnDestroy {
  510. protected _elementRef: ElementRef<HTMLInputElement>;
  511. /** Used to prevent focus moving to chips while user is holding backspace */
  512. private _focusLastChipOnBackspace;
  513. /** Whether the control is focused. */
  514. focused: boolean;
  515. _chipGrid: MatChipGrid;
  516. /** Register input for chip list */
  517. set chipGrid(value: MatChipGrid);
  518. /**
  519. * Whether or not the chipEnd event will be emitted when the input is blurred.
  520. */
  521. get addOnBlur(): boolean;
  522. set addOnBlur(value: BooleanInput);
  523. _addOnBlur: boolean;
  524. /**
  525. * The list of key codes that will trigger a chipEnd event.
  526. *
  527. * Defaults to `[ENTER]`.
  528. */
  529. separatorKeyCodes: readonly number[] | ReadonlySet<number>;
  530. /** Emitted when a chip is to be added. */
  531. readonly chipEnd: EventEmitter<MatChipInputEvent>;
  532. /** The input's placeholder text. */
  533. placeholder: string;
  534. /** Unique id for the input. */
  535. id: string;
  536. /** Whether the input is disabled. */
  537. get disabled(): boolean;
  538. set disabled(value: BooleanInput);
  539. private _disabled;
  540. /** Whether the input is empty. */
  541. get empty(): boolean;
  542. /** The native input element to which this directive is attached. */
  543. readonly inputElement: HTMLInputElement;
  544. constructor(_elementRef: ElementRef<HTMLInputElement>, defaultOptions: MatChipsDefaultOptions, formField?: MatFormField);
  545. ngOnChanges(): void;
  546. ngOnDestroy(): void;
  547. ngAfterContentInit(): void;
  548. /** Utility method to make host definition/tests more clear. */
  549. _keydown(event?: KeyboardEvent): void;
  550. /**
  551. * Pass events to the keyboard manager. Available here for tests.
  552. */
  553. _keyup(event: KeyboardEvent): void;
  554. /** Checks to see if the blur should emit the (chipEnd) event. */
  555. _blur(): void;
  556. _focus(): void;
  557. /** Checks to see if the (chipEnd) event needs to be emitted. */
  558. _emitChipEnd(event?: KeyboardEvent): void;
  559. _onInput(): void;
  560. /** Focuses the input. */
  561. focus(): void;
  562. /** Clears the input */
  563. clear(): void;
  564. setDescribedByIds(ids: string[]): void;
  565. /** Checks whether a keycode is one of the configured separators. */
  566. private _isSeparatorKey;
  567. static ɵfac: i0.ɵɵFactoryDeclaration<MatChipInput, [null, null, { optional: true; }]>;
  568. static ɵdir: i0.ɵɵDirectiveDeclaration<MatChipInput, "input[matChipInputFor]", ["matChipInput", "matChipInputFor"], { "chipGrid": { "alias": "matChipInputFor"; "required": false; }; "addOnBlur": { "alias": "matChipInputAddOnBlur"; "required": false; }; "separatorKeyCodes": { "alias": "matChipInputSeparatorKeyCodes"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "id": { "alias": "id"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "chipEnd": "matChipInputTokenEnd"; }, never, never, false, never>;
  569. }
  570. /** Represents an input event on a `matChipInput`. */
  571. export declare interface MatChipInputEvent {
  572. /**
  573. * The native `<input>` element that the event is being fired for.
  574. * @deprecated Use `MatChipInputEvent#chipInput.inputElement` instead.
  575. * @breaking-change 13.0.0 This property will be removed.
  576. */
  577. input: HTMLInputElement;
  578. /** The value of the input. */
  579. value: string;
  580. /** Reference to the chip input that emitted the event. */
  581. chipInput: MatChipInput;
  582. }
  583. /**
  584. * An extension of the MatChipSet component that supports chip selection.
  585. * Used with MatChipOption chips.
  586. */
  587. export declare class MatChipListbox extends MatChipSet implements AfterContentInit, OnDestroy, ControlValueAccessor {
  588. /**
  589. * Function when touched. Set as part of ControlValueAccessor implementation.
  590. * @docs-private
  591. */
  592. _onTouched: () => void;
  593. /**
  594. * Function when changed. Set as part of ControlValueAccessor implementation.
  595. * @docs-private
  596. */
  597. _onChange: (value: any) => void;
  598. protected _defaultRole: string;
  599. /** Value that was assigned before the listbox was initialized. */
  600. private _pendingInitialValue;
  601. /** Default chip options. */
  602. private _defaultOptions;
  603. /** Whether the user should be allowed to select multiple chips. */
  604. get multiple(): boolean;
  605. set multiple(value: BooleanInput);
  606. private _multiple;
  607. /** The array of selected chips inside the chip listbox. */
  608. get selected(): MatChipOption[] | MatChipOption;
  609. /** Orientation of the chip list. */
  610. ariaOrientation: 'horizontal' | 'vertical';
  611. /**
  612. * Whether or not this chip listbox is selectable.
  613. *
  614. * When a chip listbox is not selectable, the selected states for all
  615. * the chips inside the chip listbox are always ignored.
  616. */
  617. get selectable(): boolean;
  618. set selectable(value: BooleanInput);
  619. protected _selectable: boolean;
  620. /**
  621. * A function to compare the option values with the selected values. The first argument
  622. * is a value from an option. The second is a value from the selection. A boolean
  623. * should be returned.
  624. */
  625. compareWith: (o1: any, o2: any) => boolean;
  626. /** Whether this chip listbox is required. */
  627. get required(): boolean;
  628. set required(value: BooleanInput);
  629. protected _required: boolean;
  630. /** Whether checkmark indicator for single-selection options is hidden. */
  631. get hideSingleSelectionIndicator(): boolean;
  632. set hideSingleSelectionIndicator(value: BooleanInput);
  633. private _hideSingleSelectionIndicator;
  634. /** Combined stream of all of the child chips' selection change events. */
  635. get chipSelectionChanges(): Observable<MatChipSelectionChange>;
  636. /** Combined stream of all of the child chips' blur events. */
  637. get chipBlurChanges(): Observable<MatChipEvent>;
  638. /** The value of the listbox, which is the combined value of the selected chips. */
  639. get value(): any;
  640. set value(value: any);
  641. protected _value: any;
  642. /** Event emitted when the selected chip listbox value has been changed by the user. */
  643. readonly change: EventEmitter<MatChipListboxChange>;
  644. _chips: QueryList<MatChipOption>;
  645. ngAfterContentInit(): void;
  646. /**
  647. * Focuses the first selected chip in this chip listbox, or the first non-disabled chip when there
  648. * are no selected chips.
  649. */
  650. focus(): void;
  651. /**
  652. * Implemented as part of ControlValueAccessor.
  653. * @docs-private
  654. */
  655. writeValue(value: any): void;
  656. /**
  657. * Implemented as part of ControlValueAccessor.
  658. * @docs-private
  659. */
  660. registerOnChange(fn: (value: any) => void): void;
  661. /**
  662. * Implemented as part of ControlValueAccessor.
  663. * @docs-private
  664. */
  665. registerOnTouched(fn: () => void): void;
  666. /**
  667. * Implemented as part of ControlValueAccessor.
  668. * @docs-private
  669. */
  670. setDisabledState(isDisabled: boolean): void;
  671. /** Selects all chips with value. */
  672. _setSelectionByValue(value: any, isUserInput?: boolean): void;
  673. /** When blurred, marks the field as touched when focus moved outside the chip listbox. */
  674. _blur(): void;
  675. _keydown(event: KeyboardEvent): void;
  676. /** Marks the field as touched */
  677. private _markAsTouched;
  678. /** Emits change event to set the model value. */
  679. private _propagateChanges;
  680. /**
  681. * Deselects every chip in the listbox.
  682. * @param skip Chip that should not be deselected.
  683. */
  684. private _clearSelection;
  685. /**
  686. * Finds and selects the chip based on its value.
  687. * @returns Chip that has the corresponding value.
  688. */
  689. private _selectValue;
  690. /** Syncs the chip-listbox selection state with the individual chips. */
  691. private _syncListboxProperties;
  692. /** Returns the first selected chip in this listbox, or undefined if no chips are selected. */
  693. private _getFirstSelectedChip;
  694. /**
  695. * Determines if key manager should avoid putting a given chip action in the tab index. Skip
  696. * non-interactive actions since the user can't do anything with them.
  697. */
  698. protected _skipPredicate(action: MatChipAction): boolean;
  699. static ɵfac: i0.ɵɵFactoryDeclaration<MatChipListbox, never>;
  700. static ɵcmp: i0.ɵɵComponentDeclaration<MatChipListbox, "mat-chip-listbox", never, { "tabIndex": { "alias": "tabIndex"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "ariaOrientation": { "alias": "aria-orientation"; "required": false; }; "selectable": { "alias": "selectable"; "required": false; }; "compareWith": { "alias": "compareWith"; "required": false; }; "required": { "alias": "required"; "required": false; }; "hideSingleSelectionIndicator": { "alias": "hideSingleSelectionIndicator"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, { "change": "change"; }, ["_chips"], ["*"], false, never>;
  701. }
  702. /** Change event object that is emitted when the chip listbox value has changed. */
  703. export declare class MatChipListboxChange {
  704. /** Chip listbox that emitted the event. */
  705. source: MatChipListbox;
  706. /** Value of the chip listbox when the event was emitted. */
  707. value: any;
  708. constructor(
  709. /** Chip listbox that emitted the event. */
  710. source: MatChipListbox,
  711. /** Value of the chip listbox when the event was emitted. */
  712. value: any);
  713. }
  714. /**
  715. * Boilerplate for applying mixins to MatChip.
  716. * @docs-private
  717. */
  718. declare const _MatChipMixinBase: _Constructor<HasTabIndex> & _AbstractConstructor<HasTabIndex> & _Constructor<CanColor> & _AbstractConstructor<CanColor> & _Constructor<CanDisableRipple> & _AbstractConstructor<CanDisableRipple> & _Constructor<CanDisable> & _AbstractConstructor<CanDisable> & {
  719. new (_elementRef: ElementRef<HTMLElement>): {
  720. _elementRef: ElementRef<HTMLElement>;
  721. };
  722. };
  723. /**
  724. * An extension of the MatChip component that supports chip selection. Used with MatChipListbox.
  725. *
  726. * Unlike other chips, the user can focus on disabled chip options inside a MatChipListbox. The
  727. * user cannot click disabled chips.
  728. */
  729. export declare class MatChipOption extends MatChip implements OnInit {
  730. /** Default chip options. */
  731. private _defaultOptions;
  732. /** Whether the chip list is selectable. */
  733. chipListSelectable: boolean;
  734. /** Whether the chip list is in multi-selection mode. */
  735. _chipListMultiple: boolean;
  736. /** Whether the chip list hides single-selection indicator. */
  737. _chipListHideSingleSelectionIndicator: boolean;
  738. /**
  739. * Whether or not the chip is selectable.
  740. *
  741. * When a chip is not selectable, changes to its selected state are always
  742. * ignored. By default an option chip is selectable, and it becomes
  743. * non-selectable if its parent chip list is not selectable.
  744. */
  745. get selectable(): boolean;
  746. set selectable(value: BooleanInput);
  747. protected _selectable: boolean;
  748. /** Whether the chip is selected. */
  749. get selected(): boolean;
  750. set selected(value: BooleanInput);
  751. private _selected;
  752. /**
  753. * The ARIA selected applied to the chip. Conforms to WAI ARIA best practices for listbox
  754. * interaction patterns.
  755. *
  756. * From [WAI ARIA Listbox authoring practices guide](
  757. * https://www.w3.org/WAI/ARIA/apg/patterns/listbox/):
  758. * "If any options are selected, each selected option has either aria-selected or aria-checked
  759. * set to true. All options that are selectable but not selected have either aria-selected or
  760. * aria-checked set to false."
  761. *
  762. * Set `aria-selected="false"` on not-selected listbox options that are selectable to fix
  763. * VoiceOver reading every option as "selected" (#25736).
  764. */
  765. get ariaSelected(): string | null;
  766. /** The unstyled chip selector for this component. */
  767. protected basicChipAttrName: string;
  768. /** Emitted when the chip is selected or deselected. */
  769. readonly selectionChange: EventEmitter<MatChipSelectionChange>;
  770. ngOnInit(): void;
  771. /** Selects the chip. */
  772. select(): void;
  773. /** Deselects the chip. */
  774. deselect(): void;
  775. /** Selects this chip and emits userInputSelection event */
  776. selectViaInteraction(): void;
  777. /** Toggles the current selected state of this chip. */
  778. toggleSelected(isUserInput?: boolean): boolean;
  779. _handlePrimaryActionInteraction(): void;
  780. _hasLeadingGraphic(): boolean;
  781. _setSelectedState(isSelected: boolean, isUserInput: boolean, emitEvent: boolean): void;
  782. static ɵfac: i0.ɵɵFactoryDeclaration<MatChipOption, never>;
  783. static ɵcmp: i0.ɵɵComponentDeclaration<MatChipOption, "mat-basic-chip-option, [mat-basic-chip-option], mat-chip-option, [mat-chip-option]", never, { "color": { "alias": "color"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "disableRipple": { "alias": "disableRipple"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "selectable": { "alias": "selectable"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; }, { "selectionChange": "selectionChange"; }, never, ["mat-chip-avatar, [matChipAvatar]", "*", "mat-chip-trailing-icon,[matChipRemove],[matChipTrailingIcon]"], false, never>;
  784. }
  785. /**
  786. * Directive to remove the parent chip when the trailing icon is clicked or
  787. * when the ENTER key is pressed on it.
  788. *
  789. * Recommended for use with the Material Design "cancel" icon
  790. * available at https://material.io/icons/#ic_cancel.
  791. *
  792. * Example:
  793. *
  794. * ```
  795. * <mat-chip>
  796. * <mat-icon matChipRemove>cancel</mat-icon>
  797. * </mat-chip>
  798. * ```
  799. */
  800. export declare class MatChipRemove extends MatChipAction {
  801. _isPrimary: boolean;
  802. _handleClick(event: MouseEvent): void;
  803. _handleKeydown(event: KeyboardEvent): void;
  804. static ɵfac: i0.ɵɵFactoryDeclaration<MatChipRemove, never>;
  805. static ɵdir: i0.ɵɵDirectiveDeclaration<MatChipRemove, "[matChipRemove]", never, {}, {}, never, never, false, never>;
  806. }
  807. /**
  808. * An extension of the MatChip component used with MatChipGrid and
  809. * the matChipInputFor directive.
  810. */
  811. export declare class MatChipRow extends MatChip implements AfterViewInit {
  812. protected basicChipAttrName: string;
  813. /**
  814. * The editing action has to be triggered in a timeout. While we're waiting on it, a blur
  815. * event might occur which will interrupt the editing. This flag is used to avoid interruptions
  816. * while the editing action is being initialized.
  817. */
  818. private _editStartPending;
  819. editable: boolean;
  820. /** Emitted when the chip is edited. */
  821. readonly edited: EventEmitter<MatChipEditedEvent>;
  822. /** The default chip edit input that is used if none is projected into this chip row. */
  823. defaultEditInput?: MatChipEditInput;
  824. /** The projected chip edit input. */
  825. contentEditInput?: MatChipEditInput;
  826. _isEditing: boolean;
  827. constructor(changeDetectorRef: ChangeDetectorRef, elementRef: ElementRef, ngZone: NgZone, focusMonitor: FocusMonitor, _document: any, animationMode?: string, globalRippleOptions?: RippleGlobalOptions, tabIndex?: string);
  828. _hasTrailingIcon(): boolean;
  829. /** Sends focus to the first gridcell when the user clicks anywhere inside the chip. */
  830. _handleFocus(): void;
  831. _handleKeydown(event: KeyboardEvent): void;
  832. _handleDoubleclick(event: MouseEvent): void;
  833. private _startEditing;
  834. private _onEditFinish;
  835. /**
  836. * Gets the projected chip edit input, or the default input if none is projected in. One of these
  837. * two values is guaranteed to be defined.
  838. */
  839. private _getEditInput;
  840. static ɵfac: i0.ɵɵFactoryDeclaration<MatChipRow, [null, null, null, null, null, { optional: true; }, { optional: true; }, { attribute: "tabindex"; }]>;
  841. static ɵcmp: i0.ɵɵComponentDeclaration<MatChipRow, "mat-chip-row, [mat-chip-row], mat-basic-chip-row, [mat-basic-chip-row]", never, { "color": { "alias": "color"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "disableRipple": { "alias": "disableRipple"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "editable": { "alias": "editable"; "required": false; }; }, { "edited": "edited"; }, ["contentEditInput"], ["mat-chip-avatar, [matChipAvatar]", "*", "[matChipEditInput]", "mat-chip-trailing-icon,[matChipRemove],[matChipTrailingIcon]"], false, never>;
  842. }
  843. /** Default options, for the chips module, that can be overridden. */
  844. export declare interface MatChipsDefaultOptions {
  845. /** The list of key codes that will trigger a chipEnd event. */
  846. separatorKeyCodes: readonly number[] | ReadonlySet<number>;
  847. /** Wheter icon indicators should be hidden for single-selection. */
  848. hideSingleSelectionIndicator?: boolean;
  849. }
  850. /** Event object emitted by MatChipOption when selected or deselected. */
  851. export declare class MatChipSelectionChange {
  852. /** Reference to the chip that emitted the event. */
  853. source: MatChipOption;
  854. /** Whether the chip that emitted the event is selected. */
  855. selected: boolean;
  856. /** Whether the selection change was a result of a user interaction. */
  857. isUserInput: boolean;
  858. constructor(
  859. /** Reference to the chip that emitted the event. */
  860. source: MatChipOption,
  861. /** Whether the chip that emitted the event is selected. */
  862. selected: boolean,
  863. /** Whether the selection change was a result of a user interaction. */
  864. isUserInput?: boolean);
  865. }
  866. /**
  867. * Basic container component for the MatChip component.
  868. *
  869. * Extended by MatChipListbox and MatChipGrid for different interaction patterns.
  870. */
  871. export declare class MatChipSet extends _MatChipSetMixinBase implements AfterViewInit, HasTabIndex, OnDestroy {
  872. protected _elementRef: ElementRef<HTMLElement>;
  873. protected _changeDetectorRef: ChangeDetectorRef;
  874. private _dir;
  875. /** Index of the last destroyed chip that had focus. */
  876. private _lastDestroyedFocusedChipIndex;
  877. /** Used to manage focus within the chip list. */
  878. protected _keyManager: FocusKeyManager<MatChipAction>;
  879. /** Subject that emits when the component has been destroyed. */
  880. protected _destroyed: Subject<void>;
  881. /** Role to use if it hasn't been overwritten by the user. */
  882. protected _defaultRole: string;
  883. /** Combined stream of all of the child chips' focus events. */
  884. get chipFocusChanges(): Observable<MatChipEvent>;
  885. /** Combined stream of all of the child chips' remove events. */
  886. get chipDestroyedChanges(): Observable<MatChipEvent>;
  887. /** Whether the chip set is disabled. */
  888. get disabled(): boolean;
  889. set disabled(value: BooleanInput);
  890. protected _disabled: boolean;
  891. /** Whether the chip list contains chips or not. */
  892. get empty(): boolean;
  893. /** The ARIA role applied to the chip set. */
  894. get role(): string | null;
  895. set role(value: string | null);
  896. private _explicitRole;
  897. /** Whether any of the chips inside of this chip-set has focus. */
  898. get focused(): boolean;
  899. /** The chips that are part of this chip set. */
  900. _chips: QueryList<MatChip>;
  901. /** Flat list of all the actions contained within the chips. */
  902. _chipActions: QueryList<MatChipAction>;
  903. constructor(_elementRef: ElementRef<HTMLElement>, _changeDetectorRef: ChangeDetectorRef, _dir: Directionality);
  904. ngAfterViewInit(): void;
  905. ngOnDestroy(): void;
  906. /** Checks whether any of the chips is focused. */
  907. protected _hasFocusedChip(): boolean;
  908. /** Syncs the chip-set's state with the individual chips. */
  909. protected _syncChipsState(): void;
  910. /** Dummy method for subclasses to override. Base chip set cannot be focused. */
  911. focus(): void;
  912. /** Handles keyboard events on the chip set. */
  913. _handleKeydown(event: KeyboardEvent): void;
  914. /**
  915. * Utility to ensure all indexes are valid.
  916. *
  917. * @param index The index to be checked.
  918. * @returns True if the index is valid for our list of chips.
  919. */
  920. protected _isValidIndex(index: number): boolean;
  921. /**
  922. * Removes the `tabindex` from the chip set and resets it back afterwards, allowing the
  923. * user to tab out of it. This prevents the set from capturing focus and redirecting
  924. * it back to the first chip, creating a focus trap, if it user tries to tab away.
  925. */
  926. protected _allowFocusEscape(): void;
  927. /**
  928. * Gets a stream of events from all the chips within the set.
  929. * The stream will automatically incorporate any newly-added chips.
  930. */
  931. protected _getChipStream<T, C extends MatChip = MatChip>(mappingFunction: (chip: C) => Observable<T>): Observable<T>;
  932. /** Checks whether an event comes from inside a chip element. */
  933. protected _originatesFromChip(event: Event): boolean;
  934. /** Sets up the chip set's focus management logic. */
  935. private _setUpFocusManagement;
  936. /**
  937. * Determines if key manager should avoid putting a given chip action in the tab index. Skip
  938. * non-interactive and disabled actions since the user can't do anything with them.
  939. */
  940. protected _skipPredicate(action: MatChipAction): boolean;
  941. /** Listens to changes in the chip set and syncs up the state of the individual chips. */
  942. private _trackChipSetChanges;
  943. /** Starts tracking the destroyed chips in order to capture the focused one. */
  944. private _trackDestroyedFocusedChip;
  945. /**
  946. * Finds the next appropriate chip to move focus to,
  947. * if the currently-focused chip is destroyed.
  948. */
  949. private _redirectDestroyedChipFocus;
  950. static ɵfac: i0.ɵɵFactoryDeclaration<MatChipSet, [null, null, { optional: true; }]>;
  951. static ɵcmp: i0.ɵɵComponentDeclaration<MatChipSet, "mat-chip-set", never, { "disabled": { "alias": "disabled"; "required": false; }; "role": { "alias": "role"; "required": false; }; }, {}, ["_chips"], ["*"], false, never>;
  952. }
  953. /**
  954. * Boilerplate for applying mixins to MatChipSet.
  955. * @docs-private
  956. */
  957. declare abstract class MatChipSetBase {
  958. abstract disabled: boolean;
  959. constructor(_elementRef: ElementRef);
  960. }
  961. declare const _MatChipSetMixinBase: _Constructor<HasTabIndex> & _AbstractConstructor<HasTabIndex> & typeof MatChipSetBase;
  962. export declare class MatChipsModule {
  963. static ɵfac: i0.ɵɵFactoryDeclaration<MatChipsModule, never>;
  964. static ɵmod: i0.ɵɵNgModuleDeclaration<MatChipsModule, [typeof i1.MatChipAction, typeof i2.MatChip, typeof i3.MatChipAvatar, typeof i4.MatChipEditInput, typeof i5.MatChipGrid, typeof i6.MatChipInput, typeof i7.MatChipListbox, typeof i8.MatChipOption, typeof i3.MatChipRemove, typeof i9.MatChipRow, typeof i10.MatChipSet, typeof i3.MatChipTrailingIcon], [typeof i11.MatCommonModule, typeof i12.CommonModule, typeof i11.MatRippleModule], [typeof i11.MatCommonModule, typeof i2.MatChip, typeof i3.MatChipAvatar, typeof i4.MatChipEditInput, typeof i5.MatChipGrid, typeof i6.MatChipInput, typeof i7.MatChipListbox, typeof i8.MatChipOption, typeof i3.MatChipRemove, typeof i9.MatChipRow, typeof i10.MatChipSet, typeof i3.MatChipTrailingIcon]>;
  965. static ɵinj: i0.ɵɵInjectorDeclaration<MatChipsModule>;
  966. }
  967. /** Interface for a text control that is used to drive interaction with a mat-chip-list. */
  968. export declare interface MatChipTextControl {
  969. /** Unique identifier for the text control. */
  970. id: string;
  971. /** The text control's placeholder text. */
  972. placeholder: string;
  973. /** Whether the text control has browser focus. */
  974. focused: boolean;
  975. /** Whether the text control is empty. */
  976. empty: boolean;
  977. /** Focuses the text control. */
  978. focus(): void;
  979. /** Sets the list of ids the input is described by. */
  980. setDescribedByIds(ids: string[]): void;
  981. }
  982. /** Non-interactive trailing icon in a chip. */
  983. export declare class MatChipTrailingIcon extends MatChipAction {
  984. /**
  985. * MDC considers all trailing actions as a remove icon,
  986. * but we support non-interactive trailing icons.
  987. */
  988. isInteractive: boolean;
  989. _isPrimary: boolean;
  990. static ɵfac: i0.ɵɵFactoryDeclaration<MatChipTrailingIcon, never>;
  991. static ɵdir: i0.ɵɵDirectiveDeclaration<MatChipTrailingIcon, "mat-chip-trailing-icon, [matChipTrailingIcon]", never, {}, {}, never, never, false, never>;
  992. }
  993. export { }