@angular/material-experimental 13.1.2 → 13.2.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_index.scss +2 -1
- package/esm2020/column-resize/column-resize-directives/column-resize-flex.mjs +4 -4
- package/esm2020/column-resize/column-resize-directives/column-resize.mjs +4 -4
- package/esm2020/column-resize/column-resize-directives/default-enabled-column-resize-flex.mjs +4 -4
- package/esm2020/column-resize/column-resize-directives/default-enabled-column-resize.mjs +4 -4
- package/esm2020/column-resize/column-resize-module.mjs +13 -13
- package/esm2020/column-resize/overlay-handle.mjs +4 -4
- package/esm2020/column-resize/resizable-directives/default-enabled-resizable.mjs +4 -4
- package/esm2020/column-resize/resizable-directives/resizable.mjs +4 -4
- package/esm2020/column-resize/resize-strategy.mjs +4 -4
- package/esm2020/mdc-autocomplete/autocomplete-origin.mjs +4 -4
- package/esm2020/mdc-autocomplete/autocomplete-trigger.mjs +4 -4
- package/esm2020/mdc-autocomplete/autocomplete.mjs +4 -4
- package/esm2020/mdc-autocomplete/module.mjs +5 -5
- package/esm2020/mdc-button/button-base.mjs +22 -19
- package/esm2020/mdc-button/button.mjs +7 -7
- package/esm2020/mdc-button/fab.mjs +13 -13
- package/esm2020/mdc-button/icon-button.mjs +7 -7
- package/esm2020/mdc-button/module.mjs +5 -5
- package/esm2020/mdc-card/card.mjs +43 -43
- package/esm2020/mdc-card/module.mjs +5 -5
- package/esm2020/mdc-checkbox/checkbox.mjs +4 -4
- package/esm2020/mdc-checkbox/module.mjs +5 -5
- package/esm2020/mdc-chips/chip-action.mjs +123 -0
- package/esm2020/mdc-chips/chip-edit-input.mjs +5 -5
- package/esm2020/mdc-chips/chip-grid.mjs +46 -94
- package/esm2020/mdc-chips/chip-icons.mjs +39 -101
- package/esm2020/mdc-chips/chip-input.mjs +6 -13
- package/esm2020/mdc-chips/chip-listbox.mjs +51 -156
- package/esm2020/mdc-chips/chip-option.mjs +84 -95
- package/esm2020/mdc-chips/chip-row.mjs +81 -89
- package/esm2020/mdc-chips/chip-set.mjs +119 -120
- package/esm2020/mdc-chips/chip.mjs +188 -180
- package/esm2020/mdc-chips/emit-event.mjs +27 -0
- package/esm2020/mdc-chips/module.mjs +8 -10
- package/esm2020/mdc-chips/testing/chip-harness.mjs +5 -1
- package/esm2020/mdc-chips/testing/chip-option-harness.mjs +2 -2
- package/esm2020/mdc-chips/testing/chip-row-harness.mjs +10 -1
- package/esm2020/mdc-core/option/index.mjs +5 -5
- package/esm2020/mdc-core/option/optgroup.mjs +4 -4
- package/esm2020/mdc-core/option/option.mjs +4 -4
- package/esm2020/mdc-core/public-api.mjs +2 -2
- package/esm2020/mdc-dialog/dialog-container.mjs +4 -4
- package/esm2020/mdc-dialog/dialog-content-directives.mjs +13 -13
- package/esm2020/mdc-dialog/dialog.mjs +4 -4
- package/esm2020/mdc-dialog/module.mjs +5 -5
- package/esm2020/mdc-form-field/directives/error.mjs +4 -4
- package/esm2020/mdc-form-field/directives/floating-label.mjs +4 -4
- package/esm2020/mdc-form-field/directives/hint.mjs +4 -4
- package/esm2020/mdc-form-field/directives/label.mjs +4 -4
- package/esm2020/mdc-form-field/directives/line-ripple.mjs +4 -4
- package/esm2020/mdc-form-field/directives/notched-outline.mjs +4 -4
- package/esm2020/mdc-form-field/directives/prefix.mjs +4 -4
- package/esm2020/mdc-form-field/directives/suffix.mjs +4 -4
- package/esm2020/mdc-form-field/form-field.mjs +4 -4
- package/esm2020/mdc-form-field/module.mjs +5 -5
- package/esm2020/mdc-input/input.mjs +5 -4
- package/esm2020/mdc-input/module.mjs +5 -5
- package/esm2020/mdc-list/action-list.mjs +5 -5
- package/esm2020/mdc-list/interactive-list-base.mjs +4 -4
- package/esm2020/mdc-list/list-base.mjs +138 -41
- package/esm2020/mdc-list/list-item-sections.mjs +138 -0
- package/esm2020/mdc-list/list-option.mjs +25 -17
- package/esm2020/mdc-list/list.mjs +24 -18
- package/esm2020/mdc-list/module.mjs +46 -23
- package/esm2020/mdc-list/nav-list.mjs +5 -5
- package/esm2020/mdc-list/public-api.mjs +3 -2
- package/esm2020/mdc-list/selection-list.mjs +8 -8
- package/esm2020/mdc-list/subheader.mjs +27 -0
- package/esm2020/mdc-list/testing/list-harness-filters.mjs +1 -1
- package/esm2020/mdc-list/testing/list-item-harness-base.mjs +100 -12
- package/esm2020/mdc-list/testing/public-api.mjs +2 -1
- package/esm2020/mdc-list/testing/selection-list-harness.mjs +1 -5
- package/esm2020/mdc-menu/directives.mjs +7 -7
- package/esm2020/mdc-menu/menu-item.mjs +4 -4
- package/esm2020/mdc-menu/menu.mjs +4 -4
- package/esm2020/mdc-menu/module.mjs +5 -5
- package/esm2020/mdc-paginator/module.mjs +5 -5
- package/esm2020/mdc-paginator/paginator.mjs +4 -4
- package/esm2020/mdc-progress-bar/module.mjs +5 -5
- package/esm2020/mdc-progress-bar/progress-bar.mjs +4 -4
- package/esm2020/mdc-progress-spinner/module.mjs +5 -5
- package/esm2020/mdc-progress-spinner/progress-spinner.mjs +4 -4
- package/esm2020/mdc-radio/module.mjs +5 -5
- package/esm2020/mdc-radio/radio.mjs +7 -7
- package/esm2020/mdc-select/module.mjs +5 -5
- package/esm2020/mdc-select/select.mjs +7 -7
- package/esm2020/mdc-sidenav/module.mjs +5 -5
- package/esm2020/mdc-slide-toggle/module.mjs +5 -5
- package/esm2020/mdc-slide-toggle/slide-toggle.mjs +4 -4
- package/esm2020/mdc-slider/global-change-and-input-listener.mjs +4 -4
- package/esm2020/mdc-slider/module.mjs +5 -5
- package/esm2020/mdc-slider/slider.mjs +10 -10
- package/esm2020/mdc-snack-bar/module.mjs +7 -7
- package/esm2020/mdc-snack-bar/public-api.mjs +2 -2
- package/esm2020/mdc-snack-bar/simple-snack-bar.mjs +7 -7
- package/esm2020/mdc-snack-bar/snack-bar-container.mjs +4 -4
- package/esm2020/mdc-snack-bar/snack-bar-content.mjs +10 -10
- package/esm2020/mdc-snack-bar/snack-bar.mjs +26 -12
- package/esm2020/mdc-table/cell.mjs +22 -22
- package/esm2020/mdc-table/module.mjs +5 -5
- package/esm2020/mdc-table/row.mjs +22 -22
- package/esm2020/mdc-table/table.mjs +7 -7
- package/esm2020/mdc-table/text-column.mjs +4 -4
- package/esm2020/mdc-tabs/module.mjs +10 -6
- package/esm2020/mdc-tabs/public-api.mjs +2 -2
- package/esm2020/mdc-tabs/tab-body.mjs +8 -8
- package/esm2020/mdc-tabs/tab-content.mjs +4 -4
- package/esm2020/mdc-tabs/tab-group.mjs +7 -7
- package/esm2020/mdc-tabs/tab-header.mjs +5 -5
- package/esm2020/mdc-tabs/tab-label-wrapper.mjs +4 -4
- package/esm2020/mdc-tabs/tab-label.mjs +4 -4
- package/esm2020/mdc-tabs/tab-nav-bar/tab-nav-bar.mjs +47 -10
- package/esm2020/mdc-tabs/tab.mjs +5 -5
- package/esm2020/mdc-tabs/testing/tab-harness-filters.mjs +1 -1
- package/esm2020/mdc-tabs/testing/tab-nav-bar-harness.mjs +13 -1
- package/esm2020/mdc-tabs/testing/tab-nav-panel-harness.mjs +27 -0
- package/esm2020/mdc-tooltip/module.mjs +5 -5
- package/esm2020/mdc-tooltip/tooltip.mjs +7 -7
- package/esm2020/menubar/menubar-item.mjs +4 -4
- package/esm2020/menubar/menubar-module.mjs +5 -5
- package/esm2020/menubar/menubar.mjs +4 -4
- package/esm2020/popover-edit/lens-directives.mjs +10 -10
- package/esm2020/popover-edit/popover-edit-module.mjs +5 -5
- package/esm2020/popover-edit/table-directives.mjs +13 -13
- package/esm2020/selection/row-selection.mjs +4 -4
- package/esm2020/selection/select-all.mjs +4 -4
- package/esm2020/selection/selection-column.mjs +4 -4
- package/esm2020/selection/selection-module.mjs +5 -5
- package/esm2020/selection/selection-toggle.mjs +4 -4
- package/esm2020/selection/selection.mjs +4 -4
- package/esm2020/version.mjs +1 -1
- package/fesm2015/column-resize.mjs +36 -36
- package/fesm2015/column-resize.mjs.map +1 -1
- package/fesm2015/material-experimental.mjs +1 -1
- package/fesm2015/material-experimental.mjs.map +1 -1
- package/fesm2015/mdc-autocomplete.mjs +13 -13
- package/fesm2015/mdc-autocomplete.mjs.map +1 -1
- package/fesm2015/mdc-button.mjs +49 -46
- package/fesm2015/mdc-button.mjs.map +1 -1
- package/fesm2015/mdc-card.mjs +46 -46
- package/fesm2015/mdc-card.mjs.map +1 -1
- package/fesm2015/mdc-checkbox.mjs +7 -7
- package/fesm2015/mdc-checkbox.mjs.map +1 -1
- package/fesm2015/mdc-chips/testing.mjs +18 -8
- package/fesm2015/mdc-chips/testing.mjs.map +1 -1
- package/fesm2015/mdc-chips.mjs +749 -1057
- package/fesm2015/mdc-chips.mjs.map +1 -1
- package/fesm2015/mdc-core.mjs +11 -11
- package/fesm2015/mdc-core.mjs.map +1 -1
- package/fesm2015/mdc-dialog.mjs +22 -22
- package/fesm2015/mdc-dialog.mjs.map +1 -1
- package/fesm2015/mdc-form-field.mjs +31 -31
- package/fesm2015/mdc-form-field.mjs.map +1 -1
- package/fesm2015/mdc-input.mjs +8 -7
- package/fesm2015/mdc-input.mjs.map +1 -1
- package/fesm2015/mdc-list/testing.mjs +110 -18
- package/fesm2015/mdc-list/testing.mjs.map +1 -1
- package/fesm2015/mdc-list.mjs +353 -148
- package/fesm2015/mdc-list.mjs.map +1 -1
- package/fesm2015/mdc-menu.mjs +16 -16
- package/fesm2015/mdc-menu.mjs.map +1 -1
- package/fesm2015/mdc-paginator.mjs +7 -7
- package/fesm2015/mdc-paginator.mjs.map +1 -1
- package/fesm2015/mdc-progress-bar.mjs +7 -7
- package/fesm2015/mdc-progress-bar.mjs.map +1 -1
- package/fesm2015/mdc-progress-spinner.mjs +7 -7
- package/fesm2015/mdc-progress-spinner.mjs.map +1 -1
- package/fesm2015/mdc-radio.mjs +10 -10
- package/fesm2015/mdc-radio.mjs.map +1 -1
- package/fesm2015/mdc-select.mjs +10 -10
- package/fesm2015/mdc-select.mjs.map +1 -1
- package/fesm2015/mdc-sidenav.mjs +4 -4
- package/fesm2015/mdc-sidenav.mjs.map +1 -1
- package/fesm2015/mdc-slide-toggle.mjs +7 -7
- package/fesm2015/mdc-slide-toggle.mjs.map +1 -1
- package/fesm2015/mdc-slider.mjs +16 -16
- package/fesm2015/mdc-slider.mjs.map +1 -1
- package/fesm2015/mdc-snack-bar.mjs +46 -41
- package/fesm2015/mdc-snack-bar.mjs.map +1 -1
- package/fesm2015/mdc-table.mjs +55 -55
- package/fesm2015/mdc-table.mjs.map +1 -1
- package/fesm2015/mdc-tabs/testing.mjs +34 -0
- package/fesm2015/mdc-tabs/testing.mjs.map +1 -1
- package/fesm2015/mdc-tabs.mjs +85 -44
- package/fesm2015/mdc-tabs.mjs.map +1 -1
- package/fesm2015/mdc-tooltip.mjs +10 -10
- package/fesm2015/mdc-tooltip.mjs.map +1 -1
- package/fesm2015/menubar.mjs +10 -10
- package/fesm2015/menubar.mjs.map +1 -1
- package/fesm2015/popover-edit.mjs +25 -25
- package/fesm2015/popover-edit.mjs.map +1 -1
- package/fesm2015/selection.mjs +19 -19
- package/fesm2015/selection.mjs.map +1 -1
- package/fesm2020/column-resize.mjs +36 -36
- package/fesm2020/column-resize.mjs.map +1 -1
- package/fesm2020/material-experimental.mjs +1 -1
- package/fesm2020/material-experimental.mjs.map +1 -1
- package/fesm2020/mdc-autocomplete.mjs +13 -13
- package/fesm2020/mdc-autocomplete.mjs.map +1 -1
- package/fesm2020/mdc-button.mjs +49 -46
- package/fesm2020/mdc-button.mjs.map +1 -1
- package/fesm2020/mdc-card.mjs +46 -46
- package/fesm2020/mdc-card.mjs.map +1 -1
- package/fesm2020/mdc-checkbox.mjs +7 -7
- package/fesm2020/mdc-checkbox.mjs.map +1 -1
- package/fesm2020/mdc-chips/testing.mjs +14 -1
- package/fesm2020/mdc-chips/testing.mjs.map +1 -1
- package/fesm2020/mdc-chips.mjs +729 -1062
- package/fesm2020/mdc-chips.mjs.map +1 -1
- package/fesm2020/mdc-core.mjs +11 -11
- package/fesm2020/mdc-core.mjs.map +1 -1
- package/fesm2020/mdc-dialog.mjs +22 -22
- package/fesm2020/mdc-dialog.mjs.map +1 -1
- package/fesm2020/mdc-form-field.mjs +31 -31
- package/fesm2020/mdc-form-field.mjs.map +1 -1
- package/fesm2020/mdc-input.mjs +8 -7
- package/fesm2020/mdc-input.mjs.map +1 -1
- package/fesm2020/mdc-list/testing.mjs +100 -16
- package/fesm2020/mdc-list/testing.mjs.map +1 -1
- package/fesm2020/mdc-list.mjs +351 -148
- package/fesm2020/mdc-list.mjs.map +1 -1
- package/fesm2020/mdc-menu.mjs +16 -16
- package/fesm2020/mdc-menu.mjs.map +1 -1
- package/fesm2020/mdc-paginator.mjs +7 -7
- package/fesm2020/mdc-paginator.mjs.map +1 -1
- package/fesm2020/mdc-progress-bar.mjs +7 -7
- package/fesm2020/mdc-progress-bar.mjs.map +1 -1
- package/fesm2020/mdc-progress-spinner.mjs +7 -7
- package/fesm2020/mdc-progress-spinner.mjs.map +1 -1
- package/fesm2020/mdc-radio.mjs +10 -10
- package/fesm2020/mdc-radio.mjs.map +1 -1
- package/fesm2020/mdc-select.mjs +10 -10
- package/fesm2020/mdc-select.mjs.map +1 -1
- package/fesm2020/mdc-sidenav.mjs +4 -4
- package/fesm2020/mdc-sidenav.mjs.map +1 -1
- package/fesm2020/mdc-slide-toggle.mjs +7 -7
- package/fesm2020/mdc-slide-toggle.mjs.map +1 -1
- package/fesm2020/mdc-slider.mjs +16 -16
- package/fesm2020/mdc-slider.mjs.map +1 -1
- package/fesm2020/mdc-snack-bar.mjs +44 -34
- package/fesm2020/mdc-snack-bar.mjs.map +1 -1
- package/fesm2020/mdc-table.mjs +55 -55
- package/fesm2020/mdc-table.mjs.map +1 -1
- package/fesm2020/mdc-tabs/testing.mjs +37 -0
- package/fesm2020/mdc-tabs/testing.mjs.map +1 -1
- package/fesm2020/mdc-tabs.mjs +85 -44
- package/fesm2020/mdc-tabs.mjs.map +1 -1
- package/fesm2020/mdc-tooltip.mjs +10 -10
- package/fesm2020/mdc-tooltip.mjs.map +1 -1
- package/fesm2020/menubar.mjs +10 -10
- package/fesm2020/menubar.mjs.map +1 -1
- package/fesm2020/popover-edit.mjs +25 -25
- package/fesm2020/popover-edit.mjs.map +1 -1
- package/fesm2020/selection.mjs +19 -19
- package/fesm2020/selection.mjs.map +1 -1
- package/mdc-button/button-base.d.ts +5 -3
- package/mdc-checkbox/_checkbox-theme.scss +12 -9
- package/mdc-chips/_chips-theme.scss +53 -53
- package/mdc-chips/chip-action.d.ts +40 -0
- package/mdc-chips/chip-grid.d.ts +6 -22
- package/mdc-chips/chip-icons.d.ts +14 -37
- package/mdc-chips/chip-listbox.d.ts +4 -40
- package/mdc-chips/chip-option.d.ts +15 -11
- package/mdc-chips/chip-row.d.ts +13 -28
- package/mdc-chips/chip-set.d.ts +25 -42
- package/mdc-chips/chip.d.ts +37 -36
- package/mdc-chips/emit-event.d.ts +16 -0
- package/mdc-chips/module.d.ts +13 -12
- package/mdc-chips/testing/chip-harness.d.ts +1 -0
- package/mdc-chips/testing/chip-row-harness.d.ts +4 -0
- package/mdc-core/_core-theme.scss +47 -14
- package/mdc-core/option/option.d.ts +3 -3
- package/mdc-core/public-api.d.ts +1 -1
- package/mdc-helpers/_focus-indicators.scss +11 -3
- package/mdc-list/_interactive-list-theme.scss +17 -11
- package/mdc-list/list-base.d.ts +56 -11
- package/mdc-list/list-item-sections.d.ts +77 -0
- package/mdc-list/list-option.d.ts +11 -8
- package/mdc-list/list.d.ts +6 -2
- package/mdc-list/module.d.ts +7 -5
- package/mdc-list/public-api.d.ts +2 -1
- package/mdc-list/subheader.d.ts +9 -0
- package/mdc-list/testing/list-harness-filters.d.ts +8 -0
- package/mdc-list/testing/list-item-harness-base.d.ts +36 -3
- package/mdc-list/testing/public-api.d.ts +1 -1
- package/mdc-list/testing/selection-list-harness.d.ts +0 -2
- package/mdc-snack-bar/module.d.ts +1 -1
- package/mdc-snack-bar/public-api.d.ts +1 -1
- package/mdc-snack-bar/simple-snack-bar.d.ts +4 -4
- package/mdc-snack-bar/snack-bar.d.ts +17 -5
- package/mdc-tabs/module.d.ts +1 -1
- package/mdc-tabs/public-api.d.ts +1 -1
- package/mdc-tabs/tab-nav-bar/tab-nav-bar.d.ts +11 -0
- package/mdc-tabs/testing/tab-harness-filters.d.ts +3 -0
- package/mdc-tabs/testing/tab-nav-bar-harness.d.ts +3 -0
- package/mdc-tabs/testing/tab-nav-panel-harness.d.ts +23 -0
- package/mdc-theming/prebuilt/deeppurple-amber.css +1 -1
- package/mdc-theming/prebuilt/indigo-pink.css +1 -1
- package/mdc-theming/prebuilt/pink-bluegrey.css +1 -1
- package/mdc-theming/prebuilt/purple-green.css +1 -1
- package/package.json +3 -3
- package/esm2020/mdc-chips/grid-focus-key-manager.mjs +0 -21
- package/esm2020/mdc-chips/grid-key-manager.mjs +0 -218
- package/esm2020/mdc-list/list-styling.mjs +0 -92
- package/mdc-chips/grid-focus-key-manager.d.ts +0 -28
- package/mdc-chips/grid-key-manager.d.ts +0 -116
- package/mdc-list/list-styling.d.ts +0 -40
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
6
|
* found in the LICENSE file at https://angular.io/license
|
|
7
7
|
*/
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
8
|
+
import { InjectionToken } from '@angular/core';
|
|
9
|
+
import { MDCChipActionAdapter, MDCChipTrailingActionFoundation } from '@material/chips';
|
|
10
|
+
import { MatChipAction } from './chip-action';
|
|
11
11
|
import * as i0 from "@angular/core";
|
|
12
12
|
/**
|
|
13
13
|
* Injection token that can be used to reference instances of `MatChipAvatar`. It serves as
|
|
@@ -20,11 +20,6 @@ export declare const MAT_CHIP_AVATAR: InjectionToken<MatChipAvatar>;
|
|
|
20
20
|
* @docs-private
|
|
21
21
|
*/
|
|
22
22
|
export declare class MatChipAvatar {
|
|
23
|
-
private _changeDetectorRef;
|
|
24
|
-
private _elementRef;
|
|
25
|
-
constructor(_changeDetectorRef: ChangeDetectorRef, _elementRef: ElementRef<HTMLElement>);
|
|
26
|
-
/** Sets whether the given CSS class should be applied to the leading icon. */
|
|
27
|
-
setClass(cssClass: string, active: boolean): void;
|
|
28
23
|
static ɵfac: i0.ɵɵFactoryDeclaration<MatChipAvatar, never>;
|
|
29
24
|
static ɵdir: i0.ɵɵDirectiveDeclaration<MatChipAvatar, "mat-chip-avatar, [matChipAvatar]", never, {}, {}, never>;
|
|
30
25
|
}
|
|
@@ -38,16 +33,13 @@ export declare const MAT_CHIP_TRAILING_ICON: InjectionToken<MatChipTrailingIcon>
|
|
|
38
33
|
* Directive to add CSS classes to and configure attributes for chip trailing icon.
|
|
39
34
|
* @docs-private
|
|
40
35
|
*/
|
|
41
|
-
export declare class MatChipTrailingIcon
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
/** Sets an attribute on the icon. */
|
|
49
|
-
setAttribute(name: string, value: string): void;
|
|
50
|
-
isNavigable(): boolean;
|
|
36
|
+
export declare class MatChipTrailingIcon extends MatChipAction {
|
|
37
|
+
/**
|
|
38
|
+
* MDC considers all trailing actions as a remove icon,
|
|
39
|
+
* but we support non-interactive trailing icons.
|
|
40
|
+
*/
|
|
41
|
+
isInteractive: boolean;
|
|
42
|
+
protected _createFoundation(adapter: MDCChipActionAdapter): MDCChipTrailingActionFoundation;
|
|
51
43
|
static ɵfac: i0.ɵɵFactoryDeclaration<MatChipTrailingIcon, never>;
|
|
52
44
|
static ɵdir: i0.ɵɵDirectiveDeclaration<MatChipTrailingIcon, "mat-chip-trailing-icon, [matChipTrailingIcon]", never, {}, {}, never>;
|
|
53
45
|
}
|
|
@@ -57,14 +49,6 @@ export declare class MatChipTrailingIcon implements OnDestroy {
|
|
|
57
49
|
* retention of the class and its directive metadata.
|
|
58
50
|
*/
|
|
59
51
|
export declare const MAT_CHIP_REMOVE: InjectionToken<MatChipRemove>;
|
|
60
|
-
/**
|
|
61
|
-
* Boilerplate for applying mixins to MatChipRemove.
|
|
62
|
-
* @docs-private
|
|
63
|
-
*/
|
|
64
|
-
declare class MatChipRemoveBase extends MatChipTrailingIcon {
|
|
65
|
-
constructor(elementRef: ElementRef);
|
|
66
|
-
}
|
|
67
|
-
declare const _MatChipRemoveMixinBase: import("@angular/material-experimental/mdc-core")._Constructor<HasTabIndex> & import("@angular/material-experimental/mdc-core")._AbstractConstructor<HasTabIndex> & import("@angular/material-experimental/mdc-core")._Constructor<CanDisable> & import("@angular/material-experimental/mdc-core")._AbstractConstructor<CanDisable> & typeof MatChipRemoveBase;
|
|
68
52
|
/**
|
|
69
53
|
* Directive to remove the parent chip when the trailing icon is clicked or
|
|
70
54
|
* when the ENTER key is pressed on it.
|
|
@@ -80,17 +64,10 @@ declare const _MatChipRemoveMixinBase: import("@angular/material-experimental/md
|
|
|
80
64
|
* </mat-chip>
|
|
81
65
|
* ```
|
|
82
66
|
*/
|
|
83
|
-
export declare class MatChipRemove extends
|
|
84
|
-
|
|
85
|
-
* Emits when the user interacts with the icon.
|
|
86
|
-
* @docs-private
|
|
87
|
-
*/
|
|
88
|
-
readonly interaction: Subject<MouseEvent | KeyboardEvent>;
|
|
89
|
-
constructor(elementRef: ElementRef);
|
|
90
|
-
/** Emits a MouseEvent when the user clicks on the remove icon. */
|
|
67
|
+
export declare class MatChipRemove extends MatChipAction {
|
|
68
|
+
protected _createFoundation(adapter: MDCChipActionAdapter): MDCChipTrailingActionFoundation;
|
|
91
69
|
_handleClick(event: MouseEvent): void;
|
|
92
|
-
|
|
70
|
+
_handleKeydown(event: KeyboardEvent): void;
|
|
93
71
|
static ɵfac: i0.ɵɵFactoryDeclaration<MatChipRemove, never>;
|
|
94
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<MatChipRemove, "[matChipRemove]", never, {
|
|
72
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<MatChipRemove, "[matChipRemove]", never, {}, {}, never>;
|
|
95
73
|
}
|
|
96
|
-
export {};
|
|
@@ -5,13 +5,11 @@
|
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
6
|
* found in the LICENSE file at https://angular.io/license
|
|
7
7
|
*/
|
|
8
|
-
import { FocusKeyManager } from '@angular/cdk/a11y';
|
|
9
|
-
import { Directionality } from '@angular/cdk/bidi';
|
|
10
8
|
import { BooleanInput } from '@angular/cdk/coercion';
|
|
11
|
-
import { AfterContentInit,
|
|
9
|
+
import { AfterContentInit, EventEmitter, OnDestroy, QueryList } from '@angular/core';
|
|
12
10
|
import { ControlValueAccessor } from '@angular/forms';
|
|
13
11
|
import { Observable } from 'rxjs';
|
|
14
|
-
import {
|
|
12
|
+
import { MatChipEvent } from './chip';
|
|
15
13
|
import { MatChipOption, MatChipSelectionChange } from './chip-option';
|
|
16
14
|
import { MatChipSet } from './chip-set';
|
|
17
15
|
import * as i0 from "@angular/core";
|
|
@@ -37,15 +35,7 @@ export declare const MAT_CHIP_LISTBOX_CONTROL_VALUE_ACCESSOR: any;
|
|
|
37
35
|
* An extension of the MatChipSet component that supports chip selection.
|
|
38
36
|
* Used with MatChipOption chips.
|
|
39
37
|
*/
|
|
40
|
-
export declare class MatChipListbox extends MatChipSet implements AfterContentInit, ControlValueAccessor {
|
|
41
|
-
/** Subscription to selection changes in the chips. */
|
|
42
|
-
private _chipSelectionSubscription;
|
|
43
|
-
/** Subscription to blur changes in the chips. */
|
|
44
|
-
private _chipBlurSubscription;
|
|
45
|
-
/** Subscription to focus changes in the chips. */
|
|
46
|
-
private _chipFocusSubscription;
|
|
47
|
-
/** The FocusKeyManager which handles focus. */
|
|
48
|
-
_keyManager: FocusKeyManager<MatChip>;
|
|
38
|
+
export declare class MatChipListbox extends MatChipSet implements AfterContentInit, OnDestroy, ControlValueAccessor {
|
|
49
39
|
/**
|
|
50
40
|
* Function when touched. Set as part of ControlValueAccessor implementation.
|
|
51
41
|
* @docs-private
|
|
@@ -100,7 +90,6 @@ export declare class MatChipListbox extends MatChipSet implements AfterContentIn
|
|
|
100
90
|
/** Event emitted when the selected chip listbox value has been changed by the user. */
|
|
101
91
|
readonly change: EventEmitter<MatChipListboxChange>;
|
|
102
92
|
_chips: QueryList<MatChipOption>;
|
|
103
|
-
constructor(elementRef: ElementRef, changeDetectorRef: ChangeDetectorRef, _dir: Directionality);
|
|
104
93
|
ngAfterContentInit(): void;
|
|
105
94
|
/**
|
|
106
95
|
* Focuses the first selected chip in this chip listbox, or the first non-disabled chip when there
|
|
@@ -129,19 +118,8 @@ export declare class MatChipListbox extends MatChipSet implements AfterContentIn
|
|
|
129
118
|
setDisabledState(isDisabled: boolean): void;
|
|
130
119
|
/** Selects all chips with value. */
|
|
131
120
|
_setSelectionByValue(value: any, isUserInput?: boolean): void;
|
|
132
|
-
/** Selects or deselects a chip by id. */
|
|
133
|
-
_setSelected(index: number, selected: boolean): void;
|
|
134
121
|
/** When blurred, marks the field as touched when focus moved outside the chip listbox. */
|
|
135
122
|
_blur(): void;
|
|
136
|
-
/**
|
|
137
|
-
* Removes the `tabindex` from the chip listbox and resets it back afterwards, allowing the
|
|
138
|
-
* user to tab out of it. This prevents the listbox from capturing focus and redirecting
|
|
139
|
-
* it back to the first chip, creating a focus trap, if it user tries to tab away.
|
|
140
|
-
*/
|
|
141
|
-
_allowFocusEscape(): void;
|
|
142
|
-
/**
|
|
143
|
-
* Handles custom keyboard shortcuts, and passes other keyboard events to the keyboard manager.
|
|
144
|
-
*/
|
|
145
123
|
_keydown(event: KeyboardEvent): void;
|
|
146
124
|
/** Marks the field as touched */
|
|
147
125
|
private _markAsTouched;
|
|
@@ -163,27 +141,13 @@ export declare class MatChipListbox extends MatChipSet implements AfterContentIn
|
|
|
163
141
|
private _selectValue;
|
|
164
142
|
/** Syncs the chip-listbox selection state with the individual chips. */
|
|
165
143
|
private _syncListboxProperties;
|
|
166
|
-
/** Sets the mdc classes for single vs multi selection. */
|
|
167
|
-
private _updateMdcSelectionClasses;
|
|
168
|
-
/** Initializes the key manager to manage focus. */
|
|
169
|
-
private _initKeyManager;
|
|
170
144
|
/** Returns the first selected chip in this listbox, or undefined if no chips are selected. */
|
|
171
145
|
private _getFirstSelectedChip;
|
|
172
|
-
/** Unsubscribes from all chip events. */
|
|
173
|
-
protected _dropSubscriptions(): void;
|
|
174
|
-
/** Subscribes to events on the child chips. */
|
|
175
|
-
protected _subscribeToChipEvents(): void;
|
|
176
|
-
/** Subscribes to chip focus events. */
|
|
177
|
-
private _listenToChipsFocus;
|
|
178
|
-
/** Subscribes to chip blur events. */
|
|
179
|
-
private _listenToChipsBlur;
|
|
180
|
-
/** Subscribes to selection changes in the option chips. */
|
|
181
|
-
private _listenToChipsSelection;
|
|
182
146
|
/**
|
|
183
147
|
* If the amount of chips changed, we need to update the
|
|
184
148
|
* key manager state and focus the next closest chip.
|
|
185
149
|
*/
|
|
186
150
|
private _updateFocusForDestroyedChips;
|
|
187
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<MatChipListbox,
|
|
151
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MatChipListbox, never>;
|
|
188
152
|
static ɵcmp: i0.ɵɵComponentDeclaration<MatChipListbox, "mat-chip-listbox", never, { "tabIndex": "tabIndex"; "multiple": "multiple"; "ariaOrientation": "aria-orientation"; "selectable": "selectable"; "compareWith": "compareWith"; "required": "required"; "value": "value"; }, { "change": "change"; }, ["_chips"], ["*"]>;
|
|
189
153
|
}
|
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
* found in the LICENSE file at https://angular.io/license
|
|
7
7
|
*/
|
|
8
8
|
import { BooleanInput } from '@angular/cdk/coercion';
|
|
9
|
-
import { EventEmitter,
|
|
9
|
+
import { EventEmitter, AfterViewInit, OnInit } from '@angular/core';
|
|
10
|
+
import { ActionInteractionEvent } from '@material/chips';
|
|
10
11
|
import { MatChip } from './chip';
|
|
11
12
|
import * as i0 from "@angular/core";
|
|
12
13
|
/** Event object emitted by MatChipOption when selected or deselected. */
|
|
@@ -29,7 +30,14 @@ export declare class MatChipSelectionChange {
|
|
|
29
30
|
* An extension of the MatChip component that supports chip selection.
|
|
30
31
|
* Used with MatChipListbox.
|
|
31
32
|
*/
|
|
32
|
-
export declare class MatChipOption extends MatChip implements
|
|
33
|
+
export declare class MatChipOption extends MatChip implements OnInit, AfterViewInit {
|
|
34
|
+
/** Whether the component is done initializing. */
|
|
35
|
+
private _isInitialized;
|
|
36
|
+
/**
|
|
37
|
+
* Selected state that was assigned before the component was initializing
|
|
38
|
+
* and which needs to be synced back up with the foundation.
|
|
39
|
+
*/
|
|
40
|
+
private _pendingSelectedState;
|
|
33
41
|
/** Whether the chip list is selectable. */
|
|
34
42
|
chipListSelectable: boolean;
|
|
35
43
|
/** Whether the chip list is in multi-selection mode. */
|
|
@@ -53,7 +61,8 @@ export declare class MatChipOption extends MatChip implements AfterContentInit {
|
|
|
53
61
|
protected basicChipAttrName: string;
|
|
54
62
|
/** Emitted when the chip is selected or deselected. */
|
|
55
63
|
readonly selectionChange: EventEmitter<MatChipSelectionChange>;
|
|
56
|
-
|
|
64
|
+
ngOnInit(): void;
|
|
65
|
+
ngAfterViewInit(): void;
|
|
57
66
|
/** Selects the chip. */
|
|
58
67
|
select(): void;
|
|
59
68
|
/** Deselects the chip. */
|
|
@@ -62,16 +71,11 @@ export declare class MatChipOption extends MatChip implements AfterContentInit {
|
|
|
62
71
|
selectViaInteraction(): void;
|
|
63
72
|
/** Toggles the current selected state of this chip. */
|
|
64
73
|
toggleSelected(isUserInput?: boolean): boolean;
|
|
65
|
-
/** Emits a selection change event. */
|
|
66
|
-
private _dispatchSelectionChange;
|
|
67
|
-
/** Allows for programmatic focusing of the chip. */
|
|
68
|
-
focus(): void;
|
|
69
74
|
/** Resets the state of the chip when it loses focus. */
|
|
70
75
|
_blur(): void;
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
_keydown(event: KeyboardEvent): void;
|
|
76
|
+
protected _onChipInteraction(event: ActionInteractionEvent): void;
|
|
77
|
+
_hasLeadingGraphic(): import("@angular/material-experimental/mdc-chips").MatChipAvatar;
|
|
78
|
+
private _setSelectedState;
|
|
75
79
|
static ɵfac: i0.ɵɵFactoryDeclaration<MatChipOption, never>;
|
|
76
80
|
static ɵcmp: i0.ɵɵComponentDeclaration<MatChipOption, "mat-basic-chip-option, mat-chip-option", never, { "color": "color"; "disableRipple": "disableRipple"; "tabIndex": "tabIndex"; "selectable": "selectable"; "selected": "selected"; }, { "selectionChange": "selectionChange"; }, never, ["mat-chip-avatar, [matChipAvatar]", "*", "mat-chip-trailing-icon,[matChipRemove],[matChipTrailingIcon]"]>;
|
|
77
81
|
}
|
package/mdc-chips/chip-row.d.ts
CHANGED
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
* found in the LICENSE file at https://angular.io/license
|
|
7
7
|
*/
|
|
8
8
|
import { Directionality } from '@angular/cdk/bidi';
|
|
9
|
-
import {
|
|
9
|
+
import { AfterViewInit, ChangeDetectorRef, ElementRef, EventEmitter, NgZone } from '@angular/core';
|
|
10
10
|
import { RippleGlobalOptions } from '@angular/material-experimental/mdc-core';
|
|
11
|
+
import { FocusMonitor } from '@angular/cdk/a11y';
|
|
11
12
|
import { MatChip, MatChipEvent } from './chip';
|
|
12
13
|
import { MatChipEditInput } from './chip-edit-input';
|
|
13
|
-
import { GridKeyManagerRow } from './grid-key-manager';
|
|
14
14
|
import * as i0 from "@angular/core";
|
|
15
15
|
/** Represents an event fired on an individual `mat-chip` when it is edited. */
|
|
16
16
|
export interface MatChipEditedEvent extends MatChipEvent {
|
|
@@ -21,57 +21,42 @@ export interface MatChipEditedEvent extends MatChipEvent {
|
|
|
21
21
|
* An extension of the MatChip component used with MatChipGrid and
|
|
22
22
|
* the matChipInputFor directive.
|
|
23
23
|
*/
|
|
24
|
-
export declare class MatChipRow extends MatChip implements
|
|
25
|
-
private readonly _document;
|
|
24
|
+
export declare class MatChipRow extends MatChip implements AfterViewInit {
|
|
26
25
|
protected basicChipAttrName: string;
|
|
27
26
|
editable: boolean;
|
|
28
27
|
/** Emitted when the chip is edited. */
|
|
29
28
|
readonly edited: EventEmitter<MatChipEditedEvent>;
|
|
30
|
-
/**
|
|
31
|
-
* The focusable wrapper element in the first gridcell, which contains all
|
|
32
|
-
* chip content other than the remove icon.
|
|
33
|
-
*/
|
|
34
|
-
chipContent: ElementRef;
|
|
35
29
|
/** The default chip edit input that is used if none is projected into this chip row. */
|
|
36
30
|
defaultEditInput?: MatChipEditInput;
|
|
37
31
|
/** The projected chip edit input. */
|
|
38
32
|
contentEditInput?: MatChipEditInput;
|
|
39
|
-
|
|
40
|
-
cells: HTMLElement[];
|
|
33
|
+
_isEditing: boolean;
|
|
41
34
|
/**
|
|
42
35
|
* Timeout used to give some time between `focusin` and `focusout`
|
|
43
36
|
* in order to determine whether focus has left the chip.
|
|
44
37
|
*/
|
|
45
38
|
private _focusoutTimeout;
|
|
46
|
-
constructor(
|
|
47
|
-
|
|
48
|
-
ngAfterViewInit(): void;
|
|
49
|
-
/**
|
|
50
|
-
* Allows for programmatic focusing of the chip.
|
|
51
|
-
* Sends focus to the first grid cell. The row chip element itself
|
|
52
|
-
* is never focused.
|
|
53
|
-
*/
|
|
54
|
-
focus(): void;
|
|
39
|
+
constructor(changeDetectorRef: ChangeDetectorRef, elementRef: ElementRef, ngZone: NgZone, focusMonitor: FocusMonitor, _document: any, dir: Directionality, animationMode?: string, globalRippleOptions?: RippleGlobalOptions, tabIndex?: string);
|
|
40
|
+
_hasTrailingIcon(): boolean;
|
|
55
41
|
/**
|
|
56
42
|
* Emits a blur event when one of the gridcells loses focus, unless focus moved
|
|
57
43
|
* to the other gridcell.
|
|
58
44
|
*/
|
|
59
|
-
_focusout(
|
|
45
|
+
_focusout(): void;
|
|
60
46
|
/** Records that the chip has focus when one of the gridcells is focused. */
|
|
61
|
-
_focusin(
|
|
47
|
+
_focusin(): void;
|
|
62
48
|
/** Sends focus to the first gridcell when the user clicks anywhere inside the chip. */
|
|
63
49
|
_mousedown(event: MouseEvent): void;
|
|
64
|
-
_dblclick(event: MouseEvent): void;
|
|
65
50
|
/** Handles custom key presses. */
|
|
66
51
|
_keydown(event: KeyboardEvent): void;
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
52
|
+
_doubleclick(): void;
|
|
53
|
+
private _startEditing;
|
|
54
|
+
private _onEditFinish;
|
|
70
55
|
/**
|
|
71
56
|
* Gets the projected chip edit input, or the default input if none is projected in. One of these
|
|
72
57
|
* two values is guaranteed to be defined.
|
|
73
58
|
*/
|
|
74
59
|
private _getEditInput;
|
|
75
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<MatChipRow, [null, null, null, null, { optional: true; }, { optional: true; }, { optional: true; }]>;
|
|
76
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MatChipRow, "mat-chip-row, mat-basic-chip-row", never, { "color": "color"; "disableRipple": "disableRipple"; "tabIndex": "tabIndex"; "editable": "editable"; }, { "edited": "edited"; }, ["contentEditInput"], ["mat-chip-avatar, [matChipAvatar]", "*", "mat-chip-trailing-icon,[
|
|
60
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MatChipRow, [null, null, null, null, null, { optional: true; }, { optional: true; }, { optional: true; }, { attribute: "tabindex"; }]>;
|
|
61
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MatChipRow, "mat-chip-row, mat-basic-chip-row", never, { "color": "color"; "disableRipple": "disableRipple"; "tabIndex": "tabIndex"; "editable": "editable"; }, { "edited": "edited"; }, ["contentEditInput"], ["mat-chip-avatar, [matChipAvatar]", "*", "[matChipEditInput]", "mat-chip-trailing-icon,[matChipRemove],[matChipTrailingIcon]"]>;
|
|
77
62
|
}
|
package/mdc-chips/chip-set.d.ts
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
6
|
* found in the LICENSE file at https://angular.io/license
|
|
7
7
|
*/
|
|
8
|
-
import {
|
|
8
|
+
import { LiveAnnouncer } from '@angular/cdk/a11y';
|
|
9
9
|
import { BooleanInput } from '@angular/cdk/coercion';
|
|
10
10
|
import { AfterContentInit, AfterViewInit, ChangeDetectorRef, ElementRef, OnDestroy, QueryList } from '@angular/core';
|
|
11
11
|
import { HasTabIndex } from '@angular/material-experimental/mdc-core';
|
|
12
|
-
import {
|
|
12
|
+
import { MDCChipSetFoundation, MDCChipSetAdapter } from '@material/chips';
|
|
13
13
|
import { Observable, Subject } from 'rxjs';
|
|
14
14
|
import { MatChip, MatChipEvent } from './chip';
|
|
15
15
|
import * as i0 from "@angular/core";
|
|
@@ -28,15 +28,10 @@ declare const _MatChipSetMixinBase: import("@angular/material-experimental/mdc-c
|
|
|
28
28
|
* Extended by MatChipListbox and MatChipGrid for different interaction patterns.
|
|
29
29
|
*/
|
|
30
30
|
export declare class MatChipSet extends _MatChipSetMixinBase implements AfterContentInit, AfterViewInit, HasTabIndex, OnDestroy {
|
|
31
|
-
|
|
31
|
+
private _liveAnnouncer;
|
|
32
|
+
private _document;
|
|
33
|
+
protected _elementRef: ElementRef<HTMLElement>;
|
|
32
34
|
protected _changeDetectorRef: ChangeDetectorRef;
|
|
33
|
-
protected _dir: Directionality;
|
|
34
|
-
/** Subscription to remove changes in chips. */
|
|
35
|
-
private _chipRemoveSubscription;
|
|
36
|
-
/** Subscription to destroyed events in chips. */
|
|
37
|
-
private _chipDestroyedSubscription;
|
|
38
|
-
/** Subscription to chip interactions. */
|
|
39
|
-
private _chipInteractionSubscription;
|
|
40
35
|
/**
|
|
41
36
|
* When a chip is destroyed, we store the index of the destroyed chip until the chips
|
|
42
37
|
* query list notifies about the update. This is necessary because we cannot determine an
|
|
@@ -44,18 +39,18 @@ export declare class MatChipSet extends _MatChipSetMixinBase implements AfterCon
|
|
|
44
39
|
*/
|
|
45
40
|
protected _lastDestroyedChipIndex: number | null;
|
|
46
41
|
/** The MDC foundation containing business logic for MDC chip-set. */
|
|
47
|
-
protected _chipSetFoundation:
|
|
42
|
+
protected _chipSetFoundation: MDCChipSetFoundation;
|
|
48
43
|
/** Subject that emits when the component has been destroyed. */
|
|
49
44
|
protected _destroyed: Subject<void>;
|
|
45
|
+
/** Combined stream of all of the child chips' remove events. */
|
|
46
|
+
get chipDestroyedChanges(): Observable<MatChipEvent>;
|
|
50
47
|
/**
|
|
51
48
|
* Implementation of the MDC chip-set adapter interface.
|
|
52
49
|
* These methods are called by the chip set foundation.
|
|
53
50
|
*/
|
|
54
|
-
protected _chipSetAdapter:
|
|
51
|
+
protected _chipSetAdapter: MDCChipSetAdapter;
|
|
55
52
|
/** The aria-describedby attribute on the chip list for improved a11y. */
|
|
56
53
|
_ariaDescribedby: string;
|
|
57
|
-
/** Uid of the chip set */
|
|
58
|
-
_uid: string;
|
|
59
54
|
/**
|
|
60
55
|
* Map from class to whether the class is enabled.
|
|
61
56
|
* Enabled classes are set on the MDC chip-set div.
|
|
@@ -75,15 +70,9 @@ export declare class MatChipSet extends _MatChipSetMixinBase implements AfterCon
|
|
|
75
70
|
private _role;
|
|
76
71
|
/** Whether any of the chips inside of this chip-set has focus. */
|
|
77
72
|
get focused(): boolean;
|
|
78
|
-
/** Combined stream of all of the child chips' remove events. */
|
|
79
|
-
get chipRemoveChanges(): Observable<MatChipEvent>;
|
|
80
|
-
/** Combined stream of all of the child chips' remove events. */
|
|
81
|
-
get chipDestroyedChanges(): Observable<MatChipEvent>;
|
|
82
|
-
/** Combined stream of all of the child chips' interaction events. */
|
|
83
|
-
get chipInteractionChanges(): Observable<string>;
|
|
84
73
|
/** The chips that are part of this chip set. */
|
|
85
74
|
_chips: QueryList<MatChip>;
|
|
86
|
-
constructor(
|
|
75
|
+
constructor(_liveAnnouncer: LiveAnnouncer, _document: any, _elementRef: ElementRef<HTMLElement>, _changeDetectorRef: ChangeDetectorRef);
|
|
87
76
|
ngAfterViewInit(): void;
|
|
88
77
|
ngAfterContentInit(): void;
|
|
89
78
|
ngOnDestroy(): void;
|
|
@@ -91,22 +80,6 @@ export declare class MatChipSet extends _MatChipSetMixinBase implements AfterCon
|
|
|
91
80
|
protected _hasFocusedChip(): boolean;
|
|
92
81
|
/** Syncs the chip-set's state with the individual chips. */
|
|
93
82
|
protected _syncChipsState(): void;
|
|
94
|
-
/** Sets whether the given CSS class should be applied to the MDC chip. */
|
|
95
|
-
protected _setMdcClass(cssClass: string, active: boolean): void;
|
|
96
|
-
/** Adapter method that returns true if the chip set has the given MDC class. */
|
|
97
|
-
protected _hasMdcClass(className: string): any;
|
|
98
|
-
/** Updates subscriptions to chip events. */
|
|
99
|
-
private _resetChips;
|
|
100
|
-
/** Subscribes to events on the child chips. */
|
|
101
|
-
protected _subscribeToChipEvents(): void;
|
|
102
|
-
/** Subscribes to chip removal events. */
|
|
103
|
-
private _listenToChipsRemove;
|
|
104
|
-
/** Subscribes to chip destroyed events. */
|
|
105
|
-
private _listenToChipsDestroyed;
|
|
106
|
-
/** Subscribes to chip interaction events. */
|
|
107
|
-
private _listenToChipsInteraction;
|
|
108
|
-
/** Unsubscribes from all chip events. */
|
|
109
|
-
protected _dropSubscriptions(): void;
|
|
110
83
|
/** Dummy method for subclasses to override. Base chip set cannot be focused. */
|
|
111
84
|
focus(): void;
|
|
112
85
|
/**
|
|
@@ -119,12 +92,22 @@ export declare class MatChipSet extends _MatChipSetMixinBase implements AfterCon
|
|
|
119
92
|
/** Checks whether an event comes from inside a chip element. */
|
|
120
93
|
protected _originatesFromChip(event: Event): boolean;
|
|
121
94
|
/**
|
|
122
|
-
*
|
|
123
|
-
*
|
|
95
|
+
* Removes the `tabindex` from the chip grid and resets it back afterwards, allowing the
|
|
96
|
+
* user to tab out of it. This prevents the grid from capturing focus and redirecting
|
|
97
|
+
* it back to the first chip, creating a focus trap, if it user tries to tab away.
|
|
98
|
+
*/
|
|
99
|
+
protected _allowFocusEscape(): void;
|
|
100
|
+
/**
|
|
101
|
+
* Gets a stream of events from all the chips within the set.
|
|
102
|
+
* The stream will automatically incorporate any newly-added chips.
|
|
124
103
|
*/
|
|
125
|
-
protected
|
|
126
|
-
|
|
127
|
-
|
|
104
|
+
protected _getChipStream<T, C extends MatChip = MatChip>(mappingFunction: (chip: C) => Observable<T>): Observable<T>;
|
|
105
|
+
protected _checkForClassInHierarchy(event: Event, className: string): boolean;
|
|
106
|
+
private _chipFoundation;
|
|
107
|
+
private _handleChipAnimation;
|
|
108
|
+
private _handleChipInteraction;
|
|
109
|
+
private _handleChipNavigation;
|
|
110
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MatChipSet, never>;
|
|
128
111
|
static ɵcmp: i0.ɵɵComponentDeclaration<MatChipSet, "mat-chip-set", never, { "disabled": "disabled"; "role": "role"; }, {}, ["_chips"], ["*"]>;
|
|
129
112
|
}
|
|
130
113
|
export {};
|
package/mdc-chips/chip.d.ts
CHANGED
|
@@ -7,25 +7,19 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { Directionality } from '@angular/cdk/bidi';
|
|
9
9
|
import { BooleanInput } from '@angular/cdk/coercion';
|
|
10
|
-
import {
|
|
10
|
+
import { AfterViewInit, ChangeDetectorRef, ElementRef, EventEmitter, NgZone, OnDestroy } from '@angular/core';
|
|
11
11
|
import { CanColor, CanDisable, CanDisableRipple, HasTabIndex, MatRipple, RippleGlobalOptions } from '@angular/material-experimental/mdc-core';
|
|
12
|
-
import {
|
|
12
|
+
import { MDCChipFoundation, MDCChipAdapter, MDCChipActionType, MDCChipActionFoundation, ActionInteractionEvent } from '@material/chips';
|
|
13
|
+
import { FocusMonitor } from '@angular/cdk/a11y';
|
|
13
14
|
import { Subject } from 'rxjs';
|
|
14
15
|
import { MatChipAvatar, MatChipTrailingIcon, MatChipRemove } from './chip-icons';
|
|
16
|
+
import { MatChipAction } from './chip-action';
|
|
15
17
|
import * as i0 from "@angular/core";
|
|
16
18
|
/** Represents an event fired on an individual `mat-chip`. */
|
|
17
19
|
export interface MatChipEvent {
|
|
18
20
|
/** The chip the event was fired on. */
|
|
19
21
|
chip: MatChip;
|
|
20
22
|
}
|
|
21
|
-
/**
|
|
22
|
-
* Directive to add MDC CSS to non-basic chips.
|
|
23
|
-
* @docs-private
|
|
24
|
-
*/
|
|
25
|
-
export declare class MatChipCssInternalOnly {
|
|
26
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<MatChipCssInternalOnly, never>;
|
|
27
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<MatChipCssInternalOnly, "mat-chip, mat-chip-option, mat-chip-row, [mat-chip], [mat-chip-option], [mat-chip-row]", never, {}, {}, never>;
|
|
28
|
-
}
|
|
29
23
|
/**
|
|
30
24
|
* Boilerplate for applying mixins to MatChip.
|
|
31
25
|
* @docs-private
|
|
@@ -41,35 +35,42 @@ declare const _MatChipMixinBase: import("@angular/material-experimental/mdc-core
|
|
|
41
35
|
*
|
|
42
36
|
* Extended by MatChipOption and MatChipRow for different interaction patterns.
|
|
43
37
|
*/
|
|
44
|
-
export declare class MatChip extends _MatChipMixinBase implements
|
|
38
|
+
export declare class MatChip extends _MatChipMixinBase implements AfterViewInit, CanColor, CanDisableRipple, CanDisable, HasTabIndex, OnDestroy {
|
|
45
39
|
_changeDetectorRef: ChangeDetectorRef;
|
|
46
40
|
protected _ngZone: NgZone;
|
|
41
|
+
private _focusMonitor;
|
|
47
42
|
private _dir;
|
|
48
43
|
private _globalRippleOptions?;
|
|
44
|
+
protected _document: Document;
|
|
49
45
|
/** Whether the ripple is centered on the chip. */
|
|
50
46
|
readonly _isRippleCentered = false;
|
|
51
47
|
/** Emits when the chip is focused. */
|
|
52
48
|
readonly _onFocus: Subject<MatChipEvent>;
|
|
53
49
|
/** Emits when the chip is blurred. */
|
|
54
50
|
readonly _onBlur: Subject<MatChipEvent>;
|
|
55
|
-
readonly REMOVE_ICON_HANDLED_KEYS: ReadonlySet<number>;
|
|
56
51
|
/** Whether this chip is a basic (unstyled) chip. */
|
|
57
52
|
readonly _isBasicChip: boolean;
|
|
53
|
+
/** Role for the root of the chip. */
|
|
54
|
+
role: string | null;
|
|
58
55
|
/** Whether the chip has focus. */
|
|
59
56
|
protected _hasFocusInternal: boolean;
|
|
57
|
+
/** Whether moving focus into the chip is pending. */
|
|
58
|
+
private _pendingFocus;
|
|
60
59
|
/** Whether animations for the chip are enabled. */
|
|
61
60
|
_animationsDisabled: boolean;
|
|
62
|
-
_handleTransitionEnd(event: TransitionEvent): void;
|
|
63
61
|
_hasFocus(): boolean;
|
|
64
|
-
/** Default unique id for the chip. */
|
|
65
|
-
private _uniqueId;
|
|
66
62
|
/** A unique id for the chip. If none is supplied, it will be auto-generated. */
|
|
67
63
|
id: string;
|
|
64
|
+
/** ARIA label for the content of the chip. */
|
|
65
|
+
ariaLabel: string | null;
|
|
68
66
|
get disabled(): boolean;
|
|
69
67
|
set disabled(value: BooleanInput);
|
|
70
68
|
protected _disabled: boolean;
|
|
71
69
|
private _textElement;
|
|
72
|
-
/**
|
|
70
|
+
/**
|
|
71
|
+
* The value of the chip. Defaults to the content inside
|
|
72
|
+
* the `mat-mdc-chip-action-label` element.
|
|
73
|
+
*/
|
|
73
74
|
get value(): any;
|
|
74
75
|
set value(value: any);
|
|
75
76
|
protected _value: any;
|
|
@@ -85,14 +86,12 @@ export declare class MatChip extends _MatChipMixinBase implements AfterContentIn
|
|
|
85
86
|
get highlighted(): boolean;
|
|
86
87
|
set highlighted(value: BooleanInput);
|
|
87
88
|
protected _highlighted: boolean;
|
|
88
|
-
/** Emitted when the user interacts with the chip. */
|
|
89
|
-
readonly interaction: EventEmitter<string>;
|
|
90
|
-
/** Emitted when the chip is destroyed. */
|
|
91
|
-
readonly destroyed: EventEmitter<MatChipEvent>;
|
|
92
89
|
/** Emitted when a chip is to be removed. */
|
|
93
90
|
readonly removed: EventEmitter<MatChipEvent>;
|
|
91
|
+
/** Emitted when the chip is destroyed. */
|
|
92
|
+
readonly destroyed: EventEmitter<MatChipEvent>;
|
|
94
93
|
/** The MDC foundation containing business logic for MDC chip. */
|
|
95
|
-
_chipFoundation:
|
|
94
|
+
_chipFoundation: MDCChipFoundation;
|
|
96
95
|
/** The unstyled chip selector for this component. */
|
|
97
96
|
protected basicChipAttrName: string;
|
|
98
97
|
/** The chip's leading icon. */
|
|
@@ -103,17 +102,16 @@ export declare class MatChip extends _MatChipMixinBase implements AfterContentIn
|
|
|
103
102
|
removeIcon: MatChipRemove;
|
|
104
103
|
/** Reference to the MatRipple instance of the chip. */
|
|
105
104
|
ripple: MatRipple;
|
|
105
|
+
/** Action receiving the primary set of user interactions. */
|
|
106
|
+
primaryAction: MatChipAction;
|
|
106
107
|
/**
|
|
107
108
|
* Implementation of the MDC chip adapter interface.
|
|
108
109
|
* These methods are called by the chip foundation.
|
|
109
110
|
*/
|
|
110
|
-
protected _chipAdapter:
|
|
111
|
-
constructor(_changeDetectorRef: ChangeDetectorRef, elementRef: ElementRef
|
|
112
|
-
ngAfterContentInit(): void;
|
|
111
|
+
protected _chipAdapter: MDCChipAdapter;
|
|
112
|
+
constructor(_changeDetectorRef: ChangeDetectorRef, elementRef: ElementRef<HTMLElement>, _ngZone: NgZone, _focusMonitor: FocusMonitor, _document: any, _dir: Directionality, animationMode?: string, _globalRippleOptions?: RippleGlobalOptions | undefined, tabIndex?: string);
|
|
113
113
|
ngAfterViewInit(): void;
|
|
114
114
|
ngOnDestroy(): void;
|
|
115
|
-
/** Sets up the remove icon chip foundation, and subscribes to remove icon events. */
|
|
116
|
-
private _initRemoveIcon;
|
|
117
115
|
/**
|
|
118
116
|
* Allows for programmatic removal of the chip.
|
|
119
117
|
*
|
|
@@ -122,17 +120,20 @@ export declare class MatChip extends _MatChipMixinBase implements AfterContentIn
|
|
|
122
120
|
remove(): void;
|
|
123
121
|
/** Sets whether the given CSS class should be applied to the MDC chip. */
|
|
124
122
|
private _setMdcClass;
|
|
125
|
-
/** Forwards interaction events to the MDC chip foundation. */
|
|
126
|
-
_handleInteraction(event: MouseEvent | KeyboardEvent | FocusEvent): void;
|
|
127
123
|
/** Whether or not the ripple should be disabled. */
|
|
128
124
|
_isRippleDisabled(): boolean;
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
125
|
+
_getAction(type: MDCChipActionType): MDCChipActionFoundation | undefined;
|
|
126
|
+
_getFoundation(): MDCChipFoundation;
|
|
127
|
+
_hasTrailingIcon(): boolean;
|
|
128
|
+
/** Allows for programmatic focusing of the chip. */
|
|
129
|
+
focus(): void;
|
|
130
|
+
/** Overridden by MatChipOption. */
|
|
131
|
+
protected _onChipInteraction(event: ActionInteractionEvent): void;
|
|
132
|
+
private _handleActionInteraction;
|
|
133
|
+
private _handleActionNavigation;
|
|
134
|
+
private _handleTransitionend;
|
|
135
|
+
private _handleAnimationend;
|
|
136
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MatChip, [null, null, null, null, null, { optional: true; }, { optional: true; }, { optional: true; }, { attribute: "tabindex"; }]>;
|
|
137
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MatChip, "mat-basic-chip, mat-chip", ["matChip"], { "color": "color"; "disableRipple": "disableRipple"; "tabIndex": "tabIndex"; "role": "role"; "id": "id"; "ariaLabel": "aria-label"; "disabled": "disabled"; "value": "value"; "removable": "removable"; "highlighted": "highlighted"; }, { "removed": "removed"; "destroyed": "destroyed"; }, ["leadingIcon", "trailingIcon", "removeIcon"], ["mat-chip-avatar, [matChipAvatar]", "*", "mat-chip-trailing-icon,[matChipRemove],[matChipTrailingIcon]"]>;
|
|
137
138
|
}
|
|
138
139
|
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Google LLC All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
+
* found in the LICENSE file at https://angular.io/license
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Emits a custom event from an element.
|
|
10
|
+
* @param element Element from which to emit the event.
|
|
11
|
+
* @param _document Document that the element is placed in.
|
|
12
|
+
* @param eventName Name of the event.
|
|
13
|
+
* @param data Data attached to the event.
|
|
14
|
+
* @param shouldBubble Whether the event should bubble.
|
|
15
|
+
*/
|
|
16
|
+
export declare function emitCustomEvent<T>(element: HTMLElement, _document: Document, eventName: string, data: T, shouldBubble: boolean): void;
|
package/mdc-chips/module.d.ts
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "./chip";
|
|
3
|
-
import * as i2 from "./chip
|
|
4
|
-
import * as i3 from "./chip-
|
|
5
|
-
import * as i4 from "./chip-
|
|
6
|
-
import * as i5 from "./chip-
|
|
7
|
-
import * as i6 from "./chip-
|
|
8
|
-
import * as i7 from "./chip-
|
|
9
|
-
import * as i8 from "./chip-
|
|
10
|
-
import * as i9 from "./chip-
|
|
11
|
-
import * as i10 from "
|
|
12
|
-
import * as i11 from "@angular/
|
|
2
|
+
import * as i1 from "./chip-action";
|
|
3
|
+
import * as i2 from "./chip";
|
|
4
|
+
import * as i3 from "./chip-icons";
|
|
5
|
+
import * as i4 from "./chip-edit-input";
|
|
6
|
+
import * as i5 from "./chip-grid";
|
|
7
|
+
import * as i6 from "./chip-input";
|
|
8
|
+
import * as i7 from "./chip-listbox";
|
|
9
|
+
import * as i8 from "./chip-option";
|
|
10
|
+
import * as i9 from "./chip-row";
|
|
11
|
+
import * as i10 from "./chip-set";
|
|
12
|
+
import * as i11 from "@angular/material-experimental/mdc-core";
|
|
13
|
+
import * as i12 from "@angular/common";
|
|
13
14
|
export declare class MatChipsModule {
|
|
14
15
|
static ɵfac: i0.ɵɵFactoryDeclaration<MatChipsModule, never>;
|
|
15
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<MatChipsModule, [typeof i1.
|
|
16
|
+
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]>;
|
|
16
17
|
static ɵinj: i0.ɵɵInjectorDeclaration<MatChipsModule>;
|
|
17
18
|
}
|