@angular/material 12.1.2 → 12.2.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/bundles/material-autocomplete-testing.umd.js +10 -4
- package/bundles/material-autocomplete-testing.umd.js.map +1 -1
- package/bundles/material-autocomplete.umd.js +10 -4
- package/bundles/material-autocomplete.umd.js.map +1 -1
- package/bundles/material-badge-testing.umd.js +10 -4
- package/bundles/material-badge-testing.umd.js.map +1 -1
- package/bundles/material-badge.umd.js +10 -4
- package/bundles/material-badge.umd.js.map +1 -1
- package/bundles/material-bottom-sheet-testing.umd.js +10 -4
- package/bundles/material-bottom-sheet-testing.umd.js.map +1 -1
- package/bundles/material-bottom-sheet.umd.js +10 -4
- package/bundles/material-bottom-sheet.umd.js.map +1 -1
- package/bundles/material-button-testing.umd.js +10 -4
- package/bundles/material-button-testing.umd.js.map +1 -1
- package/bundles/material-button-toggle-testing.umd.js +10 -4
- package/bundles/material-button-toggle-testing.umd.js.map +1 -1
- package/bundles/material-button-toggle.umd.js +10 -4
- package/bundles/material-button-toggle.umd.js.map +1 -1
- package/bundles/material-button.umd.js +10 -4
- package/bundles/material-button.umd.js.map +1 -1
- package/bundles/material-card-testing.umd.js +10 -4
- package/bundles/material-card-testing.umd.js.map +1 -1
- package/bundles/material-checkbox-testing.umd.js +10 -4
- package/bundles/material-checkbox-testing.umd.js.map +1 -1
- package/bundles/material-checkbox.umd.js +10 -4
- package/bundles/material-checkbox.umd.js.map +1 -1
- package/bundles/material-chips-testing.umd.js +44 -6
- package/bundles/material-chips-testing.umd.js.map +1 -1
- package/bundles/material-chips.umd.js +10 -4
- package/bundles/material-chips.umd.js.map +1 -1
- package/bundles/material-core-testing.umd.js +10 -4
- package/bundles/material-core-testing.umd.js.map +1 -1
- package/bundles/material-core.umd.js +12 -6
- package/bundles/material-core.umd.js.map +1 -1
- package/bundles/material-datepicker-testing.umd.js +10 -4
- package/bundles/material-datepicker-testing.umd.js.map +1 -1
- package/bundles/material-datepicker.umd.js +10 -4
- package/bundles/material-datepicker.umd.js.map +1 -1
- package/bundles/material-dialog-testing.umd.js +10 -4
- package/bundles/material-dialog-testing.umd.js.map +1 -1
- package/bundles/material-dialog.umd.js +10 -4
- package/bundles/material-dialog.umd.js.map +1 -1
- package/bundles/material-divider-testing.umd.js +10 -4
- package/bundles/material-divider-testing.umd.js.map +1 -1
- package/bundles/material-expansion-testing.umd.js +10 -4
- package/bundles/material-expansion-testing.umd.js.map +1 -1
- package/bundles/material-expansion.umd.js +10 -4
- package/bundles/material-expansion.umd.js.map +1 -1
- package/bundles/material-form-field-testing-control.umd.js +10 -4
- package/bundles/material-form-field-testing-control.umd.js.map +1 -1
- package/bundles/material-form-field-testing.umd.js +10 -4
- package/bundles/material-form-field-testing.umd.js.map +1 -1
- package/bundles/material-form-field.umd.js +10 -4
- package/bundles/material-form-field.umd.js.map +1 -1
- package/bundles/material-grid-list-testing.umd.js +10 -4
- package/bundles/material-grid-list-testing.umd.js.map +1 -1
- package/bundles/material-grid-list.umd.js +10 -4
- package/bundles/material-grid-list.umd.js.map +1 -1
- package/bundles/material-icon-testing.umd.js +10 -4
- package/bundles/material-icon-testing.umd.js.map +1 -1
- package/bundles/material-icon.umd.js +10 -4
- package/bundles/material-icon.umd.js.map +1 -1
- package/bundles/material-input-testing.umd.js +10 -4
- package/bundles/material-input-testing.umd.js.map +1 -1
- package/bundles/material-input.umd.js +11 -5
- package/bundles/material-input.umd.js.map +1 -1
- package/bundles/material-list-testing.umd.js +10 -4
- package/bundles/material-list-testing.umd.js.map +1 -1
- package/bundles/material-list.umd.js +18 -4
- package/bundles/material-list.umd.js.map +1 -1
- package/bundles/material-menu-testing.umd.js +10 -4
- package/bundles/material-menu-testing.umd.js.map +1 -1
- package/bundles/material-menu.umd.js +31 -9
- package/bundles/material-menu.umd.js.map +1 -1
- package/bundles/material-paginator-testing.umd.js +10 -4
- package/bundles/material-paginator-testing.umd.js.map +1 -1
- package/bundles/material-paginator.umd.js +10 -4
- package/bundles/material-paginator.umd.js.map +1 -1
- package/bundles/material-progress-bar-testing.umd.js +10 -4
- package/bundles/material-progress-bar-testing.umd.js.map +1 -1
- package/bundles/material-progress-bar.umd.js +10 -4
- package/bundles/material-progress-bar.umd.js.map +1 -1
- package/bundles/material-progress-spinner-testing.umd.js +10 -4
- package/bundles/material-progress-spinner-testing.umd.js.map +1 -1
- package/bundles/material-progress-spinner.umd.js +10 -4
- package/bundles/material-progress-spinner.umd.js.map +1 -1
- package/bundles/material-radio-testing.umd.js +10 -4
- package/bundles/material-radio-testing.umd.js.map +1 -1
- package/bundles/material-radio.umd.js +11 -5
- package/bundles/material-radio.umd.js.map +1 -1
- package/bundles/material-select-testing.umd.js +10 -4
- package/bundles/material-select-testing.umd.js.map +1 -1
- package/bundles/material-select.umd.js +11 -5
- package/bundles/material-select.umd.js.map +1 -1
- package/bundles/material-sidenav-testing.umd.js +10 -4
- package/bundles/material-sidenav-testing.umd.js.map +1 -1
- package/bundles/material-sidenav.umd.js +10 -4
- package/bundles/material-sidenav.umd.js.map +1 -1
- package/bundles/material-slide-toggle-testing.umd.js +10 -4
- package/bundles/material-slide-toggle-testing.umd.js.map +1 -1
- package/bundles/material-slide-toggle.umd.js +12 -5
- package/bundles/material-slide-toggle.umd.js.map +1 -1
- package/bundles/material-slider-testing.umd.js +10 -4
- package/bundles/material-slider-testing.umd.js.map +1 -1
- package/bundles/material-slider.umd.js +10 -4
- package/bundles/material-slider.umd.js.map +1 -1
- package/bundles/material-snack-bar-testing.umd.js +10 -4
- package/bundles/material-snack-bar-testing.umd.js.map +1 -1
- package/bundles/material-snack-bar.umd.js +10 -4
- package/bundles/material-snack-bar.umd.js.map +1 -1
- package/bundles/material-sort-testing.umd.js +10 -4
- package/bundles/material-sort-testing.umd.js.map +1 -1
- package/bundles/material-sort.umd.js +10 -4
- package/bundles/material-sort.umd.js.map +1 -1
- package/bundles/material-stepper-testing.umd.js +10 -4
- package/bundles/material-stepper-testing.umd.js.map +1 -1
- package/bundles/material-stepper.umd.js +10 -4
- package/bundles/material-stepper.umd.js.map +1 -1
- package/bundles/material-table-testing.umd.js +10 -4
- package/bundles/material-table-testing.umd.js.map +1 -1
- package/bundles/material-table.umd.js +11 -5
- package/bundles/material-table.umd.js.map +1 -1
- package/bundles/material-tabs-testing.umd.js +10 -4
- package/bundles/material-tabs-testing.umd.js.map +1 -1
- package/bundles/material-tabs.umd.js +15 -5
- package/bundles/material-tabs.umd.js.map +1 -1
- package/bundles/material-toolbar-testing.umd.js +10 -4
- package/bundles/material-toolbar-testing.umd.js.map +1 -1
- package/bundles/material-toolbar.umd.js +10 -4
- package/bundles/material-toolbar.umd.js.map +1 -1
- package/bundles/material-tooltip-testing.umd.js +10 -4
- package/bundles/material-tooltip-testing.umd.js.map +1 -1
- package/bundles/material-tooltip.umd.js +13 -6
- package/bundles/material-tooltip.umd.js.map +1 -1
- package/bundles/material-tree-testing.umd.js +10 -4
- package/bundles/material-tree-testing.umd.js.map +1 -1
- package/bundles/material-tree.umd.js +10 -4
- package/bundles/material-tree.umd.js.map +1 -1
- package/bundles/material.umd.js +12 -4
- package/bundles/material.umd.js.map +1 -1
- package/chips/testing/chip-avatar-harness.d.ts +20 -0
- package/chips/testing/chip-harness-filters.d.ts +3 -0
- package/chips/testing/chip-harness.d.ts +10 -4
- package/core/index.metadata.json +1 -1
- package/core/style/_menu-common.scss +22 -24
- package/core/theming/_theming.scss +3 -1
- package/core/typography/_typography-deprecated.scss +1 -1
- package/core/typography/_typography-utils.scss +7 -0
- package/esm2015/chips/testing/chip-avatar-harness.js +22 -0
- package/esm2015/chips/testing/chip-harness-filters.js +1 -1
- package/esm2015/chips/testing/chip-harness.js +14 -4
- package/esm2015/core/common-behaviors/common-module.js +1 -1
- package/esm2015/core/version.js +1 -1
- package/esm2015/index.js +4 -1
- package/esm2015/input/input.js +2 -2
- package/esm2015/list/selection-list.js +9 -1
- package/esm2015/menu/menu-item.js +21 -5
- package/esm2015/menu/menu-trigger.js +2 -2
- package/esm2015/menu/menu.js +1 -1
- package/esm2015/radio/radio.js +1 -1
- package/esm2015/select/select.js +1 -1
- package/esm2015/slide-toggle/slide-toggle.js +3 -2
- package/esm2015/table/table.js +1 -1
- package/esm2015/tabs/tab-group.js +6 -2
- package/esm2015/tooltip/tooltip.js +4 -3
- package/fesm2015/chips/testing.js +33 -3
- package/fesm2015/chips/testing.js.map +1 -1
- package/fesm2015/core.js +2 -2
- package/fesm2015/core.js.map +1 -1
- package/fesm2015/input.js +1 -1
- package/fesm2015/input.js.map +1 -1
- package/fesm2015/list.js +9 -1
- package/fesm2015/list.js.map +1 -1
- package/fesm2015/material.js +5 -0
- package/fesm2015/material.js.map +1 -1
- package/fesm2015/menu.js +21 -5
- package/fesm2015/menu.js.map +1 -1
- package/fesm2015/radio.js +1 -1
- package/fesm2015/select.js +1 -1
- package/fesm2015/slide-toggle.js +2 -1
- package/fesm2015/slide-toggle.js.map +1 -1
- package/fesm2015/table.js +1 -1
- package/fesm2015/tabs.js +5 -1
- package/fesm2015/tabs.js.map +1 -1
- package/fesm2015/tooltip.js +3 -2
- package/fesm2015/tooltip.js.map +1 -1
- package/form-field/_form-field-fill-theme.scss +2 -1
- package/form-field/_form-field-legacy-theme.scss +3 -1
- package/form-field/_form-field-outline-theme.scss +2 -1
- package/form-field/_form-field-theme.scss +4 -2
- package/index.d.ts +1 -0
- package/input/_input-theme.scss +1 -1
- package/list/index.metadata.json +1 -1
- package/list/selection-list.d.ts +6 -0
- package/menu/_menu-theme.scss +2 -2
- package/menu/index.metadata.json +1 -1
- package/menu/menu-item.d.ts +13 -2
- package/package.json +4 -3
- package/prebuilt-themes/deeppurple-amber.css +1 -1
- package/prebuilt-themes/indigo-pink.css +1 -1
- package/prebuilt-themes/pink-bluegrey.css +1 -1
- package/prebuilt-themes/purple-green.css +1 -1
- package/radio/index.metadata.json +1 -1
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-add/index.mjs +1 -1
- package/schematics/ng-update/migrations/theming-api-v12/migration.d.ts +2 -2
- package/schematics/ng-update/migrations/theming-api-v12/migration.js +63 -14
- package/schematics/ng-update/migrations/theming-api-v12/migration.mjs +63 -14
- package/select/_select-theme.scss +1 -1
- package/select/index.metadata.json +1 -1
- package/slide-toggle/index.metadata.json +1 -1
- package/slide-toggle/slide-toggle.d.ts +2 -0
- package/slider/_slider-theme.scss +1 -1
- package/table/_table-flex-styles.scss +30 -34
- package/table/_table-theme.scss +2 -2
- package/table/index.metadata.json +1 -1
- package/tabs/index.metadata.json +1 -1
- package/tooltip/index.metadata.json +1 -1
package/fesm2015/input.js
CHANGED
|
@@ -294,7 +294,7 @@ class MatInput extends _MatInputBase {
|
|
|
294
294
|
// tslint:disable:no-host-decorator-in-concrete
|
|
295
295
|
// tslint:enable:no-host-decorator-in-concrete
|
|
296
296
|
_focusChanged(isFocused) {
|
|
297
|
-
if (isFocused !== this.focused
|
|
297
|
+
if (isFocused !== this.focused) {
|
|
298
298
|
this.focused = isFocused;
|
|
299
299
|
this.stateChanges.next();
|
|
300
300
|
}
|
package/fesm2015/input.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.js","sources":["../../../../../../src/material/input/autosize.ts","../../../../../../src/material/input/input-errors.ts","../../../../../../src/material/input/input-value-accessor.ts","../../../../../../src/material/input/input.ts","../../../../../../src/material/input/input-module.ts","../../../../../../src/material/input/public-api.ts","../../../../../../src/material/input/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {CdkTextareaAutosize} from '@angular/cdk/text-field';\nimport {Directive, Input} from '@angular/core';\n\n/**\n * Directive to automatically resize a textarea to fit its content.\n * @deprecated Use `cdkTextareaAutosize` from `@angular/cdk/text-field` instead.\n * @breaking-change 8.0.0\n */\n@Directive({\n selector: 'textarea[mat-autosize], textarea[matTextareaAutosize]',\n exportAs: 'matTextareaAutosize',\n inputs: ['cdkAutosizeMinRows', 'cdkAutosizeMaxRows'],\n host: {\n 'class': 'cdk-textarea-autosize mat-autosize',\n // Textarea elements that have the directive applied should have a single row by default.\n // Browsers normally show two rows by default and therefore this limits the minRows binding.\n 'rows': '1',\n },\n})\nexport class MatTextareaAutosize extends CdkTextareaAutosize {\n @Input()\n get matAutosizeMinRows(): number { return this.minRows; }\n set matAutosizeMinRows(value: number) { this.minRows = value; }\n\n @Input()\n get matAutosizeMaxRows(): number { return this.maxRows; }\n set matAutosizeMaxRows(value: number) { this.maxRows = value; }\n\n @Input('mat-autosize')\n get matAutosize(): boolean { return this.enabled; }\n set matAutosize(value: boolean) { this.enabled = value; }\n\n @Input()\n get matTextareaAutosize(): boolean { return this.enabled; }\n set matTextareaAutosize(value: boolean) { this.enabled = value; }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/** @docs-private */\nexport function getMatInputUnsupportedTypeError(type: string): Error {\n return Error(`Input type \"${type}\" isn't supported by matInput.`);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {InjectionToken} from '@angular/core';\n\n\n/**\n * This token is used to inject the object whose value should be set into `MatInput`. If none is\n * provided, the native `HTMLInputElement` is used. Directives like `MatDatepickerInput` can provide\n * themselves for this token, in order to make `MatInput` delegate the getting and setting of the\n * value to them.\n */\nexport const MAT_INPUT_VALUE_ACCESSOR =\n new InjectionToken<{value: any}>('MAT_INPUT_VALUE_ACCESSOR');\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {getSupportedInputTypes, Platform} from '@angular/cdk/platform';\nimport {AutofillMonitor} from '@angular/cdk/text-field';\nimport {\n AfterViewInit,\n Directive,\n DoCheck,\n ElementRef,\n HostListener,\n Inject,\n Input,\n NgZone,\n OnChanges,\n OnDestroy,\n Optional,\n Self,\n} from '@angular/core';\nimport {FormGroupDirective, NgControl, NgForm} from '@angular/forms';\nimport {\n CanUpdateErrorState,\n ErrorStateMatcher,\n mixinErrorState,\n} from '@angular/material/core';\nimport {MatFormFieldControl, MatFormField, MAT_FORM_FIELD} from '@angular/material/form-field';\nimport {Subject} from 'rxjs';\nimport {getMatInputUnsupportedTypeError} from './input-errors';\nimport {MAT_INPUT_VALUE_ACCESSOR} from './input-value-accessor';\n\n\n// Invalid input type. Using one of these will throw an MatInputUnsupportedTypeError.\nconst MAT_INPUT_INVALID_TYPES = [\n 'button',\n 'checkbox',\n 'file',\n 'hidden',\n 'image',\n 'radio',\n 'range',\n 'reset',\n 'submit'\n];\n\nlet nextUniqueId = 0;\n\n// Boilerplate for applying mixins to MatInput.\n/** @docs-private */\nconst _MatInputBase = mixinErrorState(class {\n constructor(public _defaultErrorStateMatcher: ErrorStateMatcher,\n public _parentForm: NgForm,\n public _parentFormGroup: FormGroupDirective,\n /** @docs-private */\n public ngControl: NgControl) {}\n});\n\n/** Directive that allows a native input to work inside a `MatFormField`. */\n@Directive({\n selector: `input[matInput], textarea[matInput], select[matNativeControl],\n input[matNativeControl], textarea[matNativeControl]`,\n exportAs: 'matInput',\n host: {\n /**\n * @breaking-change 8.0.0 remove .mat-form-field-autofill-control in favor of AutofillMonitor.\n */\n 'class': 'mat-input-element mat-form-field-autofill-control',\n '[class.mat-input-server]': '_isServer',\n // Native input properties that are overwritten by Angular inputs need to be synced with\n // the native input element. Otherwise property bindings for those don't work.\n '[attr.id]': 'id',\n // At the time of writing, we have a lot of customer tests that look up the input based on its\n // placeholder. Since we sometimes omit the placeholder attribute from the DOM to prevent screen\n // readers from reading it twice, we have to keep it somewhere in the DOM for the lookup.\n '[attr.data-placeholder]': 'placeholder',\n '[disabled]': 'disabled',\n '[required]': 'required',\n '[attr.readonly]': 'readonly && !_isNativeSelect || null',\n // Only mark the input as invalid for assistive technology if it has a value since the\n // state usually overlaps with `aria-required` when the input is empty and can be redundant.\n '[attr.aria-invalid]': '(empty && required) ? null : errorState',\n '[attr.aria-required]': 'required',\n },\n providers: [{provide: MatFormFieldControl, useExisting: MatInput}],\n})\nexport class MatInput extends _MatInputBase implements MatFormFieldControl<any>, OnChanges,\n OnDestroy, AfterViewInit, DoCheck, CanUpdateErrorState {\n protected _uid = `mat-input-${nextUniqueId++}`;\n protected _previousNativeValue: any;\n private _inputValueAccessor: {value: any};\n private _previousPlaceholder: string | null;\n\n /** Whether the component is being rendered on the server. */\n readonly _isServer: boolean;\n\n /** Whether the component is a native html select. */\n readonly _isNativeSelect: boolean;\n\n /** Whether the component is a textarea. */\n readonly _isTextarea: boolean;\n\n /** Whether the input is inside of a form field. */\n readonly _isInFormField: boolean;\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n focused: boolean = false;\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n override readonly stateChanges: Subject<void> = new Subject<void>();\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n controlType: string = 'mat-input';\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n autofilled = false;\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n @Input()\n get disabled(): boolean {\n if (this.ngControl && this.ngControl.disabled !== null) {\n return this.ngControl.disabled;\n }\n return this._disabled;\n }\n set disabled(value: boolean) {\n this._disabled = coerceBooleanProperty(value);\n\n // Browsers may not fire the blur event if the input is disabled too quickly.\n // Reset from here to ensure that the element doesn't become stuck.\n if (this.focused) {\n this.focused = false;\n this.stateChanges.next();\n }\n }\n protected _disabled = false;\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n @Input()\n get id(): string { return this._id; }\n set id(value: string) { this._id = value || this._uid; }\n protected _id: string;\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n @Input() placeholder: string;\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n @Input()\n get required(): boolean { return this._required; }\n set required(value: boolean) { this._required = coerceBooleanProperty(value); }\n protected _required = false;\n\n /** Input type of the element. */\n @Input()\n get type(): string { return this._type; }\n set type(value: string) {\n this._type = value || 'text';\n this._validateType();\n\n // When using Angular inputs, developers are no longer able to set the properties on the native\n // input element. To ensure that bindings for `type` work, we need to sync the setter\n // with the native property. Textarea elements don't support the type property or attribute.\n if (!this._isTextarea && getSupportedInputTypes().has(this._type)) {\n (this._elementRef.nativeElement as HTMLInputElement).type = this._type;\n }\n }\n protected _type = 'text';\n\n /** An object used to control when error messages are shown. */\n @Input() override errorStateMatcher: ErrorStateMatcher;\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n @Input('aria-describedby') userAriaDescribedBy: string;\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n @Input()\n get value(): string { return this._inputValueAccessor.value; }\n set value(value: string) {\n if (value !== this.value) {\n this._inputValueAccessor.value = value;\n this.stateChanges.next();\n }\n }\n\n /** Whether the element is readonly. */\n @Input()\n get readonly(): boolean { return this._readonly; }\n set readonly(value: boolean) { this._readonly = coerceBooleanProperty(value); }\n private _readonly = false;\n\n protected _neverEmptyInputTypes = [\n 'date',\n 'datetime',\n 'datetime-local',\n 'month',\n 'time',\n 'week'\n ].filter(t => getSupportedInputTypes().has(t));\n\n constructor(\n protected _elementRef: ElementRef<HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement>,\n protected _platform: Platform,\n @Optional() @Self() ngControl: NgControl,\n @Optional() _parentForm: NgForm,\n @Optional() _parentFormGroup: FormGroupDirective,\n _defaultErrorStateMatcher: ErrorStateMatcher,\n @Optional() @Self() @Inject(MAT_INPUT_VALUE_ACCESSOR) inputValueAccessor: any,\n private _autofillMonitor: AutofillMonitor,\n ngZone: NgZone,\n // TODO: Remove this once the legacy appearance has been removed. We only need\n // to inject the form-field for determining whether the placeholder has been promoted.\n @Optional() @Inject(MAT_FORM_FIELD) private _formField?: MatFormField) {\n\n super(_defaultErrorStateMatcher, _parentForm, _parentFormGroup, ngControl);\n\n const element = this._elementRef.nativeElement;\n const nodeName = element.nodeName.toLowerCase();\n\n // If no input value accessor was explicitly specified, use the element as the input value\n // accessor.\n this._inputValueAccessor = inputValueAccessor || element;\n\n this._previousNativeValue = this.value;\n\n // Force setter to be called in case id was not specified.\n this.id = this.id;\n\n // On some versions of iOS the caret gets stuck in the wrong place when holding down the delete\n // key. In order to get around this we need to \"jiggle\" the caret loose. Since this bug only\n // exists on iOS, we only bother to install the listener on iOS.\n if (_platform.IOS) {\n ngZone.runOutsideAngular(() => {\n _elementRef.nativeElement.addEventListener('keyup', (event: Event) => {\n const el = event.target as HTMLInputElement;\n\n // Note: We specifically check for 0, rather than `!el.selectionStart`, because the two\n // indicate different things. If the value is 0, it means that the caret is at the start\n // of the input, whereas a value of `null` means that the input doesn't support\n // manipulating the selection range. Inputs that don't support setting the selection range\n // will throw an error so we want to avoid calling `setSelectionRange` on them. See:\n // https://html.spec.whatwg.org/multipage/input.html#do-not-apply\n if (!el.value && el.selectionStart === 0 && el.selectionEnd === 0) {\n // Note: Just setting `0, 0` doesn't fix the issue. Setting\n // `1, 1` fixes it for the first time that you type text and\n // then hold delete. Toggling to `1, 1` and then back to\n // `0, 0` seems to completely fix it.\n el.setSelectionRange(1, 1);\n el.setSelectionRange(0, 0);\n }\n });\n });\n }\n\n this._isServer = !this._platform.isBrowser;\n this._isNativeSelect = nodeName === 'select';\n this._isTextarea = nodeName === 'textarea';\n this._isInFormField = !!_formField;\n\n if (this._isNativeSelect) {\n this.controlType = (element as HTMLSelectElement).multiple ? 'mat-native-select-multiple' :\n 'mat-native-select';\n }\n }\n\n ngAfterViewInit() {\n if (this._platform.isBrowser) {\n this._autofillMonitor.monitor(this._elementRef.nativeElement).subscribe(event => {\n this.autofilled = event.isAutofilled;\n this.stateChanges.next();\n });\n }\n }\n\n ngOnChanges() {\n this.stateChanges.next();\n }\n\n ngOnDestroy() {\n this.stateChanges.complete();\n\n if (this._platform.isBrowser) {\n this._autofillMonitor.stopMonitoring(this._elementRef.nativeElement);\n }\n }\n\n ngDoCheck() {\n if (this.ngControl) {\n // We need to re-evaluate this on every change detection cycle, because there are some\n // error triggers that we can't subscribe to (e.g. parent form submissions). This means\n // that whatever logic is in here has to be super lean or we risk destroying the performance.\n this.updateErrorState();\n }\n\n // We need to dirty-check the native element's value, because there are some cases where\n // we won't be notified when it changes (e.g. the consumer isn't using forms or they're\n // updating the value using `emitEvent: false`).\n this._dirtyCheckNativeValue();\n\n // We need to dirty-check and set the placeholder attribute ourselves, because whether it's\n // present or not depends on a query which is prone to \"changed after checked\" errors.\n this._dirtyCheckPlaceholder();\n }\n\n /** Focuses the input. */\n focus(options?: FocusOptions): void {\n this._elementRef.nativeElement.focus(options);\n }\n\n // We have to use a `HostListener` here in order to support both Ivy and ViewEngine.\n // In Ivy the `host` bindings will be merged when this class is extended, whereas in\n // ViewEngine they're overwritten.\n // TODO(crisbeto): we move this back into `host` once Ivy is turned on by default.\n /** Callback for the cases where the focused state of the input changes. */\n // tslint:disable:no-host-decorator-in-concrete\n @HostListener('focus', ['true'])\n @HostListener('blur', ['false'])\n // tslint:enable:no-host-decorator-in-concrete\n _focusChanged(isFocused: boolean) {\n if (isFocused !== this.focused && (!this.readonly || !isFocused)) {\n this.focused = isFocused;\n this.stateChanges.next();\n }\n }\n\n // We have to use a `HostListener` here in order to support both Ivy and ViewEngine.\n // In Ivy the `host` bindings will be merged when this class is extended, whereas in\n // ViewEngine they're overwritten.\n // TODO(crisbeto): we move this back into `host` once Ivy is turned on by default.\n // tslint:disable-next-line:no-host-decorator-in-concrete\n @HostListener('input')\n _onInput() {\n // This is a noop function and is used to let Angular know whenever the value changes.\n // Angular will run a new change detection each time the `input` event has been dispatched.\n // It's necessary that Angular recognizes the value change, because when floatingLabel\n // is set to false and Angular forms aren't used, the placeholder won't recognize the\n // value changes and will not disappear.\n // Listening to the input event wouldn't be necessary when the input is using the\n // FormsModule or ReactiveFormsModule, because Angular forms also listens to input events.\n }\n\n /** Does some manual dirty checking on the native input `placeholder` attribute. */\n private _dirtyCheckPlaceholder() {\n // If we're hiding the native placeholder, it should also be cleared from the DOM, otherwise\n // screen readers will read it out twice: once from the label and once from the attribute.\n // TODO: can be removed once we get rid of the `legacy` style for the form field, because it's\n // the only one that supports promoting the placeholder to a label.\n const placeholder = this._formField?._hideControlPlaceholder?.() ? null : this.placeholder;\n if (placeholder !== this._previousPlaceholder) {\n const element = this._elementRef.nativeElement;\n this._previousPlaceholder = placeholder;\n placeholder ?\n element.setAttribute('placeholder', placeholder) : element.removeAttribute('placeholder');\n }\n }\n\n /** Does some manual dirty checking on the native input `value` property. */\n protected _dirtyCheckNativeValue() {\n const newValue = this._elementRef.nativeElement.value;\n\n if (this._previousNativeValue !== newValue) {\n this._previousNativeValue = newValue;\n this.stateChanges.next();\n }\n }\n\n /** Make sure the input is a supported type. */\n protected _validateType() {\n if (MAT_INPUT_INVALID_TYPES.indexOf(this._type) > -1 &&\n (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getMatInputUnsupportedTypeError(this._type);\n }\n }\n\n /** Checks whether the input type is one of the types that are never empty. */\n protected _isNeverEmpty() {\n return this._neverEmptyInputTypes.indexOf(this._type) > -1;\n }\n\n /** Checks whether the input is invalid based on the native validation. */\n protected _isBadInput() {\n // The `validity` property won't be present on platform-server.\n let validity = (this._elementRef.nativeElement as HTMLInputElement).validity;\n return validity && validity.badInput;\n }\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n get empty(): boolean {\n return !this._isNeverEmpty() && !this._elementRef.nativeElement.value && !this._isBadInput() &&\n !this.autofilled;\n }\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n get shouldLabelFloat(): boolean {\n if (this._isNativeSelect) {\n // For a single-selection `<select>`, the label should float when the selected option has\n // a non-empty display value. For a `<select multiple>`, the label *always* floats to avoid\n // overlapping the label with the options.\n const selectElement = this._elementRef.nativeElement as HTMLSelectElement;\n const firstOption: HTMLOptionElement | undefined = selectElement.options[0];\n\n // On most browsers the `selectedIndex` will always be 0, however on IE and Edge it'll be\n // -1 if the `value` is set to something, that isn't in the list of options, at a later point.\n return this.focused || selectElement.multiple || !this.empty ||\n !!(selectElement.selectedIndex > -1 && firstOption && firstOption.label);\n } else {\n return this.focused || !this.empty;\n }\n }\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n setDescribedByIds(ids: string[]) {\n if (ids.length) {\n this._elementRef.nativeElement.setAttribute('aria-describedby', ids.join(' '));\n } else {\n this._elementRef.nativeElement.removeAttribute('aria-describedby');\n }\n }\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n onContainerClick() {\n // Do not re-focus the input element if the element is already focused. Otherwise it can happen\n // that someone clicks on a time input and the cursor resets to the \"hours\" field while the\n // \"minutes\" field was actually clicked. See: https://github.com/angular/components/issues/12849\n if (!this.focused) {\n this.focus();\n }\n }\n\n static ngAcceptInputType_disabled: BooleanInput;\n static ngAcceptInputType_readonly: BooleanInput;\n static ngAcceptInputType_required: BooleanInput;\n\n // Accept `any` to avoid conflicts with other directives on `<input>` that may\n // accept different types.\n static ngAcceptInputType_value: any;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {TextFieldModule} from '@angular/cdk/text-field';\nimport {NgModule} from '@angular/core';\nimport {ErrorStateMatcher, MatCommonModule} from '@angular/material/core';\nimport {MatFormFieldModule} from '@angular/material/form-field';\nimport {MatTextareaAutosize} from './autosize';\nimport {MatInput} from './input';\n\n@NgModule({\n declarations: [MatInput, MatTextareaAutosize],\n imports: [\n TextFieldModule,\n MatFormFieldModule,\n MatCommonModule,\n ],\n exports: [\n TextFieldModule,\n // We re-export the `MatFormFieldModule` since `MatInput` will almost always\n // be used together with `MatFormField`.\n MatFormFieldModule,\n MatInput,\n MatTextareaAutosize,\n ],\n providers: [ErrorStateMatcher],\n})\nexport class MatInputModule {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './autosize';\nexport * from './input';\nexport * from './input-errors';\nexport * from './input-module';\nexport * from './input-value-accessor';\n\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;;AAWA;;;;;MAgBa,mBAAoB,SAAQ,mBAAmB;IAC1D,IACI,kBAAkB,KAAa,OAAO,IAAI,CAAC,OAAO,CAAC,EAAE;IACzD,IAAI,kBAAkB,CAAC,KAAa,IAAI,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,EAAE;IAE/D,IACI,kBAAkB,KAAa,OAAO,IAAI,CAAC,OAAO,CAAC,EAAE;IACzD,IAAI,kBAAkB,CAAC,KAAa,IAAI,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,EAAE;IAE/D,IACI,WAAW,KAAc,OAAO,IAAI,CAAC,OAAO,CAAC,EAAE;IACnD,IAAI,WAAW,CAAC,KAAc,IAAI,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,EAAE;IAEzD,IACI,mBAAmB,KAAc,OAAO,IAAI,CAAC,OAAO,CAAC,EAAE;IAC3D,IAAI,mBAAmB,CAAC,KAAc,IAAI,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,EAAE;;;YA1BlE,SAAS,SAAC;gBACT,QAAQ,EAAE,uDAAuD;gBACjE,QAAQ,EAAE,qBAAqB;gBAC/B,MAAM,EAAE,CAAC,oBAAoB,EAAE,oBAAoB,CAAC;gBACpD,IAAI,EAAE;oBACJ,OAAO,EAAE,oCAAoC;;;oBAG7C,MAAM,EAAE,GAAG;iBACZ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CAgBL,KAAK;kCAML,KAAK,SAAC,kBAAkB;oBAMxB,KAAK;uBAUL,KAAK;4BAiIL,YAAY,SAAC,OAAO,EAAE,CAAC,MAAM,CAAC,cAC9B,YAAY,SAAC,MAAM,EAAE,CAAC,OAAO,CAAC;uBAc9B,YAAY,SAAC,OAAO;;;AC3WvB;;;;;;;MAgCa,cAAc;;;YAjB1B,QAAQ,SAAC;gBACR,YAAY,EAAE,CAAC,QAAQ,EAAE,mBAAmB,CAAC;gBAC7C,OAAO,EAAE;oBACP,eAAe;oBACf,kBAAkB;oBAClB,eAAe;iBAChB;gBACD,OAAO,EAAE;oBACP,eAAe;;;oBAGf,kBAAkB;oBAClB,QAAQ;oBACR,mBAAmB;iBACpB;gBACD,SAAS,EAAE,CAAC,iBAAiB,CAAC;aAC/B;;;AC/BD;;;;;;;;ACAA;;;;;;"}
|
|
1
|
+
{"version":3,"file":"input.js","sources":["../../../../../../src/material/input/autosize.ts","../../../../../../src/material/input/input-errors.ts","../../../../../../src/material/input/input-value-accessor.ts","../../../../../../src/material/input/input.ts","../../../../../../src/material/input/input-module.ts","../../../../../../src/material/input/public-api.ts","../../../../../../src/material/input/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {CdkTextareaAutosize} from '@angular/cdk/text-field';\nimport {Directive, Input} from '@angular/core';\n\n/**\n * Directive to automatically resize a textarea to fit its content.\n * @deprecated Use `cdkTextareaAutosize` from `@angular/cdk/text-field` instead.\n * @breaking-change 8.0.0\n */\n@Directive({\n selector: 'textarea[mat-autosize], textarea[matTextareaAutosize]',\n exportAs: 'matTextareaAutosize',\n inputs: ['cdkAutosizeMinRows', 'cdkAutosizeMaxRows'],\n host: {\n 'class': 'cdk-textarea-autosize mat-autosize',\n // Textarea elements that have the directive applied should have a single row by default.\n // Browsers normally show two rows by default and therefore this limits the minRows binding.\n 'rows': '1',\n },\n})\nexport class MatTextareaAutosize extends CdkTextareaAutosize {\n @Input()\n get matAutosizeMinRows(): number { return this.minRows; }\n set matAutosizeMinRows(value: number) { this.minRows = value; }\n\n @Input()\n get matAutosizeMaxRows(): number { return this.maxRows; }\n set matAutosizeMaxRows(value: number) { this.maxRows = value; }\n\n @Input('mat-autosize')\n get matAutosize(): boolean { return this.enabled; }\n set matAutosize(value: boolean) { this.enabled = value; }\n\n @Input()\n get matTextareaAutosize(): boolean { return this.enabled; }\n set matTextareaAutosize(value: boolean) { this.enabled = value; }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/** @docs-private */\nexport function getMatInputUnsupportedTypeError(type: string): Error {\n return Error(`Input type \"${type}\" isn't supported by matInput.`);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {InjectionToken} from '@angular/core';\n\n\n/**\n * This token is used to inject the object whose value should be set into `MatInput`. If none is\n * provided, the native `HTMLInputElement` is used. Directives like `MatDatepickerInput` can provide\n * themselves for this token, in order to make `MatInput` delegate the getting and setting of the\n * value to them.\n */\nexport const MAT_INPUT_VALUE_ACCESSOR =\n new InjectionToken<{value: any}>('MAT_INPUT_VALUE_ACCESSOR');\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {getSupportedInputTypes, Platform} from '@angular/cdk/platform';\nimport {AutofillMonitor} from '@angular/cdk/text-field';\nimport {\n AfterViewInit,\n Directive,\n DoCheck,\n ElementRef,\n HostListener,\n Inject,\n Input,\n NgZone,\n OnChanges,\n OnDestroy,\n Optional,\n Self,\n} from '@angular/core';\nimport {FormGroupDirective, NgControl, NgForm} from '@angular/forms';\nimport {\n CanUpdateErrorState,\n ErrorStateMatcher,\n mixinErrorState,\n} from '@angular/material/core';\nimport {MatFormFieldControl, MatFormField, MAT_FORM_FIELD} from '@angular/material/form-field';\nimport {Subject} from 'rxjs';\nimport {getMatInputUnsupportedTypeError} from './input-errors';\nimport {MAT_INPUT_VALUE_ACCESSOR} from './input-value-accessor';\n\n\n// Invalid input type. Using one of these will throw an MatInputUnsupportedTypeError.\nconst MAT_INPUT_INVALID_TYPES = [\n 'button',\n 'checkbox',\n 'file',\n 'hidden',\n 'image',\n 'radio',\n 'range',\n 'reset',\n 'submit'\n];\n\nlet nextUniqueId = 0;\n\n// Boilerplate for applying mixins to MatInput.\n/** @docs-private */\nconst _MatInputBase = mixinErrorState(class {\n constructor(public _defaultErrorStateMatcher: ErrorStateMatcher,\n public _parentForm: NgForm,\n public _parentFormGroup: FormGroupDirective,\n /** @docs-private */\n public ngControl: NgControl) {}\n});\n\n/** Directive that allows a native input to work inside a `MatFormField`. */\n@Directive({\n selector: `input[matInput], textarea[matInput], select[matNativeControl],\n input[matNativeControl], textarea[matNativeControl]`,\n exportAs: 'matInput',\n host: {\n /**\n * @breaking-change 8.0.0 remove .mat-form-field-autofill-control in favor of AutofillMonitor.\n */\n 'class': 'mat-input-element mat-form-field-autofill-control',\n '[class.mat-input-server]': '_isServer',\n // Native input properties that are overwritten by Angular inputs need to be synced with\n // the native input element. Otherwise property bindings for those don't work.\n '[attr.id]': 'id',\n // At the time of writing, we have a lot of customer tests that look up the input based on its\n // placeholder. Since we sometimes omit the placeholder attribute from the DOM to prevent screen\n // readers from reading it twice, we have to keep it somewhere in the DOM for the lookup.\n '[attr.data-placeholder]': 'placeholder',\n '[disabled]': 'disabled',\n '[required]': 'required',\n '[attr.readonly]': 'readonly && !_isNativeSelect || null',\n // Only mark the input as invalid for assistive technology if it has a value since the\n // state usually overlaps with `aria-required` when the input is empty and can be redundant.\n '[attr.aria-invalid]': '(empty && required) ? null : errorState',\n '[attr.aria-required]': 'required',\n },\n providers: [{provide: MatFormFieldControl, useExisting: MatInput}],\n})\nexport class MatInput extends _MatInputBase implements MatFormFieldControl<any>, OnChanges,\n OnDestroy, AfterViewInit, DoCheck, CanUpdateErrorState {\n protected _uid = `mat-input-${nextUniqueId++}`;\n protected _previousNativeValue: any;\n private _inputValueAccessor: {value: any};\n private _previousPlaceholder: string | null;\n\n /** Whether the component is being rendered on the server. */\n readonly _isServer: boolean;\n\n /** Whether the component is a native html select. */\n readonly _isNativeSelect: boolean;\n\n /** Whether the component is a textarea. */\n readonly _isTextarea: boolean;\n\n /** Whether the input is inside of a form field. */\n readonly _isInFormField: boolean;\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n focused: boolean = false;\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n override readonly stateChanges: Subject<void> = new Subject<void>();\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n controlType: string = 'mat-input';\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n autofilled = false;\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n @Input()\n get disabled(): boolean {\n if (this.ngControl && this.ngControl.disabled !== null) {\n return this.ngControl.disabled;\n }\n return this._disabled;\n }\n set disabled(value: boolean) {\n this._disabled = coerceBooleanProperty(value);\n\n // Browsers may not fire the blur event if the input is disabled too quickly.\n // Reset from here to ensure that the element doesn't become stuck.\n if (this.focused) {\n this.focused = false;\n this.stateChanges.next();\n }\n }\n protected _disabled = false;\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n @Input()\n get id(): string { return this._id; }\n set id(value: string) { this._id = value || this._uid; }\n protected _id: string;\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n @Input() placeholder: string;\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n @Input()\n get required(): boolean { return this._required; }\n set required(value: boolean) { this._required = coerceBooleanProperty(value); }\n protected _required = false;\n\n /** Input type of the element. */\n @Input()\n get type(): string { return this._type; }\n set type(value: string) {\n this._type = value || 'text';\n this._validateType();\n\n // When using Angular inputs, developers are no longer able to set the properties on the native\n // input element. To ensure that bindings for `type` work, we need to sync the setter\n // with the native property. Textarea elements don't support the type property or attribute.\n if (!this._isTextarea && getSupportedInputTypes().has(this._type)) {\n (this._elementRef.nativeElement as HTMLInputElement).type = this._type;\n }\n }\n protected _type = 'text';\n\n /** An object used to control when error messages are shown. */\n @Input() override errorStateMatcher: ErrorStateMatcher;\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n @Input('aria-describedby') userAriaDescribedBy: string;\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n @Input()\n get value(): string { return this._inputValueAccessor.value; }\n set value(value: string) {\n if (value !== this.value) {\n this._inputValueAccessor.value = value;\n this.stateChanges.next();\n }\n }\n\n /** Whether the element is readonly. */\n @Input()\n get readonly(): boolean { return this._readonly; }\n set readonly(value: boolean) { this._readonly = coerceBooleanProperty(value); }\n private _readonly = false;\n\n protected _neverEmptyInputTypes = [\n 'date',\n 'datetime',\n 'datetime-local',\n 'month',\n 'time',\n 'week'\n ].filter(t => getSupportedInputTypes().has(t));\n\n constructor(\n protected _elementRef: ElementRef<HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement>,\n protected _platform: Platform,\n @Optional() @Self() ngControl: NgControl,\n @Optional() _parentForm: NgForm,\n @Optional() _parentFormGroup: FormGroupDirective,\n _defaultErrorStateMatcher: ErrorStateMatcher,\n @Optional() @Self() @Inject(MAT_INPUT_VALUE_ACCESSOR) inputValueAccessor: any,\n private _autofillMonitor: AutofillMonitor,\n ngZone: NgZone,\n // TODO: Remove this once the legacy appearance has been removed. We only need\n // to inject the form-field for determining whether the placeholder has been promoted.\n @Optional() @Inject(MAT_FORM_FIELD) private _formField?: MatFormField) {\n\n super(_defaultErrorStateMatcher, _parentForm, _parentFormGroup, ngControl);\n\n const element = this._elementRef.nativeElement;\n const nodeName = element.nodeName.toLowerCase();\n\n // If no input value accessor was explicitly specified, use the element as the input value\n // accessor.\n this._inputValueAccessor = inputValueAccessor || element;\n\n this._previousNativeValue = this.value;\n\n // Force setter to be called in case id was not specified.\n this.id = this.id;\n\n // On some versions of iOS the caret gets stuck in the wrong place when holding down the delete\n // key. In order to get around this we need to \"jiggle\" the caret loose. Since this bug only\n // exists on iOS, we only bother to install the listener on iOS.\n if (_platform.IOS) {\n ngZone.runOutsideAngular(() => {\n _elementRef.nativeElement.addEventListener('keyup', (event: Event) => {\n const el = event.target as HTMLInputElement;\n\n // Note: We specifically check for 0, rather than `!el.selectionStart`, because the two\n // indicate different things. If the value is 0, it means that the caret is at the start\n // of the input, whereas a value of `null` means that the input doesn't support\n // manipulating the selection range. Inputs that don't support setting the selection range\n // will throw an error so we want to avoid calling `setSelectionRange` on them. See:\n // https://html.spec.whatwg.org/multipage/input.html#do-not-apply\n if (!el.value && el.selectionStart === 0 && el.selectionEnd === 0) {\n // Note: Just setting `0, 0` doesn't fix the issue. Setting\n // `1, 1` fixes it for the first time that you type text and\n // then hold delete. Toggling to `1, 1` and then back to\n // `0, 0` seems to completely fix it.\n el.setSelectionRange(1, 1);\n el.setSelectionRange(0, 0);\n }\n });\n });\n }\n\n this._isServer = !this._platform.isBrowser;\n this._isNativeSelect = nodeName === 'select';\n this._isTextarea = nodeName === 'textarea';\n this._isInFormField = !!_formField;\n\n if (this._isNativeSelect) {\n this.controlType = (element as HTMLSelectElement).multiple ? 'mat-native-select-multiple' :\n 'mat-native-select';\n }\n }\n\n ngAfterViewInit() {\n if (this._platform.isBrowser) {\n this._autofillMonitor.monitor(this._elementRef.nativeElement).subscribe(event => {\n this.autofilled = event.isAutofilled;\n this.stateChanges.next();\n });\n }\n }\n\n ngOnChanges() {\n this.stateChanges.next();\n }\n\n ngOnDestroy() {\n this.stateChanges.complete();\n\n if (this._platform.isBrowser) {\n this._autofillMonitor.stopMonitoring(this._elementRef.nativeElement);\n }\n }\n\n ngDoCheck() {\n if (this.ngControl) {\n // We need to re-evaluate this on every change detection cycle, because there are some\n // error triggers that we can't subscribe to (e.g. parent form submissions). This means\n // that whatever logic is in here has to be super lean or we risk destroying the performance.\n this.updateErrorState();\n }\n\n // We need to dirty-check the native element's value, because there are some cases where\n // we won't be notified when it changes (e.g. the consumer isn't using forms or they're\n // updating the value using `emitEvent: false`).\n this._dirtyCheckNativeValue();\n\n // We need to dirty-check and set the placeholder attribute ourselves, because whether it's\n // present or not depends on a query which is prone to \"changed after checked\" errors.\n this._dirtyCheckPlaceholder();\n }\n\n /** Focuses the input. */\n focus(options?: FocusOptions): void {\n this._elementRef.nativeElement.focus(options);\n }\n\n // We have to use a `HostListener` here in order to support both Ivy and ViewEngine.\n // In Ivy the `host` bindings will be merged when this class is extended, whereas in\n // ViewEngine they're overwritten.\n // TODO(crisbeto): we move this back into `host` once Ivy is turned on by default.\n /** Callback for the cases where the focused state of the input changes. */\n // tslint:disable:no-host-decorator-in-concrete\n @HostListener('focus', ['true'])\n @HostListener('blur', ['false'])\n // tslint:enable:no-host-decorator-in-concrete\n _focusChanged(isFocused: boolean) {\n if (isFocused !== this.focused) {\n this.focused = isFocused;\n this.stateChanges.next();\n }\n }\n\n // We have to use a `HostListener` here in order to support both Ivy and ViewEngine.\n // In Ivy the `host` bindings will be merged when this class is extended, whereas in\n // ViewEngine they're overwritten.\n // TODO(crisbeto): we move this back into `host` once Ivy is turned on by default.\n // tslint:disable-next-line:no-host-decorator-in-concrete\n @HostListener('input')\n _onInput() {\n // This is a noop function and is used to let Angular know whenever the value changes.\n // Angular will run a new change detection each time the `input` event has been dispatched.\n // It's necessary that Angular recognizes the value change, because when floatingLabel\n // is set to false and Angular forms aren't used, the placeholder won't recognize the\n // value changes and will not disappear.\n // Listening to the input event wouldn't be necessary when the input is using the\n // FormsModule or ReactiveFormsModule, because Angular forms also listens to input events.\n }\n\n /** Does some manual dirty checking on the native input `placeholder` attribute. */\n private _dirtyCheckPlaceholder() {\n // If we're hiding the native placeholder, it should also be cleared from the DOM, otherwise\n // screen readers will read it out twice: once from the label and once from the attribute.\n // TODO: can be removed once we get rid of the `legacy` style for the form field, because it's\n // the only one that supports promoting the placeholder to a label.\n const placeholder = this._formField?._hideControlPlaceholder?.() ? null : this.placeholder;\n if (placeholder !== this._previousPlaceholder) {\n const element = this._elementRef.nativeElement;\n this._previousPlaceholder = placeholder;\n placeholder ?\n element.setAttribute('placeholder', placeholder) : element.removeAttribute('placeholder');\n }\n }\n\n /** Does some manual dirty checking on the native input `value` property. */\n protected _dirtyCheckNativeValue() {\n const newValue = this._elementRef.nativeElement.value;\n\n if (this._previousNativeValue !== newValue) {\n this._previousNativeValue = newValue;\n this.stateChanges.next();\n }\n }\n\n /** Make sure the input is a supported type. */\n protected _validateType() {\n if (MAT_INPUT_INVALID_TYPES.indexOf(this._type) > -1 &&\n (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getMatInputUnsupportedTypeError(this._type);\n }\n }\n\n /** Checks whether the input type is one of the types that are never empty. */\n protected _isNeverEmpty() {\n return this._neverEmptyInputTypes.indexOf(this._type) > -1;\n }\n\n /** Checks whether the input is invalid based on the native validation. */\n protected _isBadInput() {\n // The `validity` property won't be present on platform-server.\n let validity = (this._elementRef.nativeElement as HTMLInputElement).validity;\n return validity && validity.badInput;\n }\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n get empty(): boolean {\n return !this._isNeverEmpty() && !this._elementRef.nativeElement.value && !this._isBadInput() &&\n !this.autofilled;\n }\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n get shouldLabelFloat(): boolean {\n if (this._isNativeSelect) {\n // For a single-selection `<select>`, the label should float when the selected option has\n // a non-empty display value. For a `<select multiple>`, the label *always* floats to avoid\n // overlapping the label with the options.\n const selectElement = this._elementRef.nativeElement as HTMLSelectElement;\n const firstOption: HTMLOptionElement | undefined = selectElement.options[0];\n\n // On most browsers the `selectedIndex` will always be 0, however on IE and Edge it'll be\n // -1 if the `value` is set to something, that isn't in the list of options, at a later point.\n return this.focused || selectElement.multiple || !this.empty ||\n !!(selectElement.selectedIndex > -1 && firstOption && firstOption.label);\n } else {\n return this.focused || !this.empty;\n }\n }\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n setDescribedByIds(ids: string[]) {\n if (ids.length) {\n this._elementRef.nativeElement.setAttribute('aria-describedby', ids.join(' '));\n } else {\n this._elementRef.nativeElement.removeAttribute('aria-describedby');\n }\n }\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n onContainerClick() {\n // Do not re-focus the input element if the element is already focused. Otherwise it can happen\n // that someone clicks on a time input and the cursor resets to the \"hours\" field while the\n // \"minutes\" field was actually clicked. See: https://github.com/angular/components/issues/12849\n if (!this.focused) {\n this.focus();\n }\n }\n\n static ngAcceptInputType_disabled: BooleanInput;\n static ngAcceptInputType_readonly: BooleanInput;\n static ngAcceptInputType_required: BooleanInput;\n\n // Accept `any` to avoid conflicts with other directives on `<input>` that may\n // accept different types.\n static ngAcceptInputType_value: any;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {TextFieldModule} from '@angular/cdk/text-field';\nimport {NgModule} from '@angular/core';\nimport {ErrorStateMatcher, MatCommonModule} from '@angular/material/core';\nimport {MatFormFieldModule} from '@angular/material/form-field';\nimport {MatTextareaAutosize} from './autosize';\nimport {MatInput} from './input';\n\n@NgModule({\n declarations: [MatInput, MatTextareaAutosize],\n imports: [\n TextFieldModule,\n MatFormFieldModule,\n MatCommonModule,\n ],\n exports: [\n TextFieldModule,\n // We re-export the `MatFormFieldModule` since `MatInput` will almost always\n // be used together with `MatFormField`.\n MatFormFieldModule,\n MatInput,\n MatTextareaAutosize,\n ],\n providers: [ErrorStateMatcher],\n})\nexport class MatInputModule {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './autosize';\nexport * from './input';\nexport * from './input-errors';\nexport * from './input-module';\nexport * from './input-value-accessor';\n\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;;AAWA;;;;;MAgBa,mBAAoB,SAAQ,mBAAmB;IAC1D,IACI,kBAAkB,KAAa,OAAO,IAAI,CAAC,OAAO,CAAC,EAAE;IACzD,IAAI,kBAAkB,CAAC,KAAa,IAAI,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,EAAE;IAE/D,IACI,kBAAkB,KAAa,OAAO,IAAI,CAAC,OAAO,CAAC,EAAE;IACzD,IAAI,kBAAkB,CAAC,KAAa,IAAI,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,EAAE;IAE/D,IACI,WAAW,KAAc,OAAO,IAAI,CAAC,OAAO,CAAC,EAAE;IACnD,IAAI,WAAW,CAAC,KAAc,IAAI,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,EAAE;IAEzD,IACI,mBAAmB,KAAc,OAAO,IAAI,CAAC,OAAO,CAAC,EAAE;IAC3D,IAAI,mBAAmB,CAAC,KAAc,IAAI,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,EAAE;;;YA1BlE,SAAS,SAAC;gBACT,QAAQ,EAAE,uDAAuD;gBACjE,QAAQ,EAAE,qBAAqB;gBAC/B,MAAM,EAAE,CAAC,oBAAoB,EAAE,oBAAoB,CAAC;gBACpD,IAAI,EAAE;oBACJ,OAAO,EAAE,oCAAoC;;;oBAG7C,MAAM,EAAE,GAAG;iBACZ;aACF;;;iCAEE,KAAK;iCAIL,KAAK;0BAIL,KAAK,SAAC,cAAc;kCAIpB,KAAK;;;ACxCR;;;;;;;AAQA;SACgB,+BAA+B,CAAC,IAAY;IAC1D,OAAO,KAAK,CAAC,eAAe,IAAI,gCAAgC,CAAC,CAAC;A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AAQ,SAAC;gBACR,YAAY,EAAE,CAAC,QAAQ,EAAE,mBAAmB,CAAC;gBAC7C,OAAO,EAAE;oBACP,eAAe;oBACf,kBAAkB;oBAClB,eAAe;iBAChB;gBACD,OAAO,EAAE;oBACP,eAAe;;;oBAGf,kBAAkB;oBAClB,QAAQ;oBACR,mBAAmB;iBACpB;gBACD,SAAS,EAAE,CAAC,iBAAiB,CAAC;aAC/B;;;AC/BD;;;;;;;;ACAA;;;;;;"}
|
package/fesm2015/list.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CommonModule } from '@angular/common';
|
|
2
|
-
import { InjectionToken, Component, ViewEncapsulation, ChangeDetectionStrategy, ElementRef, Directive, ChangeDetectorRef, Optional, Inject, ContentChildren, ContentChild, Input, forwardRef,
|
|
2
|
+
import { InjectionToken, Component, ViewEncapsulation, ChangeDetectionStrategy, ElementRef, Directive, ChangeDetectorRef, Optional, Inject, ContentChildren, ContentChild, Input, forwardRef, EventEmitter, Output, ViewChild, Attribute, NgModule } from '@angular/core';
|
|
3
3
|
import { mixinDisabled, mixinDisableRipple, setLines, MatLine, MatLineModule, MatRippleModule, MatCommonModule, MatPseudoCheckboxModule } from '@angular/material/core';
|
|
4
4
|
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
5
5
|
import { Subject } from 'rxjs';
|
|
@@ -274,6 +274,12 @@ class MatListOption extends _MatListOptionBase {
|
|
|
274
274
|
this._selected = false;
|
|
275
275
|
this._disabled = false;
|
|
276
276
|
this._hasFocus = false;
|
|
277
|
+
/**
|
|
278
|
+
* Emits when the selected state of the option has changed.
|
|
279
|
+
* Use to facilitate two-data binding to the `selected` property.
|
|
280
|
+
* @docs-private
|
|
281
|
+
*/
|
|
282
|
+
this.selectedChange = new EventEmitter();
|
|
277
283
|
/** Whether the label should appear before or after the checkbox. Defaults to 'after' */
|
|
278
284
|
this.checkboxPosition = 'after';
|
|
279
285
|
/**
|
|
@@ -402,6 +408,7 @@ class MatListOption extends _MatListOptionBase {
|
|
|
402
408
|
else {
|
|
403
409
|
this.selectionList.selectedOptions.deselect(this);
|
|
404
410
|
}
|
|
411
|
+
this.selectedChange.emit(selected);
|
|
405
412
|
this._changeDetector.markForCheck();
|
|
406
413
|
return true;
|
|
407
414
|
}
|
|
@@ -454,6 +461,7 @@ MatListOption.propDecorators = {
|
|
|
454
461
|
_avatar: [{ type: ContentChild, args: [MatListAvatarCssMatStyler,] }],
|
|
455
462
|
_icon: [{ type: ContentChild, args: [MatListIconCssMatStyler,] }],
|
|
456
463
|
_lines: [{ type: ContentChildren, args: [MatLine, { descendants: true },] }],
|
|
464
|
+
selectedChange: [{ type: Output }],
|
|
457
465
|
_text: [{ type: ViewChild, args: ['text',] }],
|
|
458
466
|
checkboxPosition: [{ type: Input }],
|
|
459
467
|
color: [{ type: Input }],
|
package/fesm2015/list.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.js","sources":["../../../../../../src/material/list/list.ts","../../../../../../src/material/list/selection-list.ts","../../../../../../src/material/list/list-module.ts","../../../../../../src/material/list/public-api.ts","../../../../../../src/material/list/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {coerceBooleanProperty, BooleanInput} from '@angular/cdk/coercion';\nimport {\n AfterContentInit,\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n ContentChildren,\n Directive,\n ElementRef,\n Optional,\n QueryList,\n ViewEncapsulation,\n OnChanges,\n OnDestroy,\n ChangeDetectorRef,\n Input,\n InjectionToken,\n Inject,\n} from '@angular/core';\nimport {\n CanDisable,\n CanDisableRipple,\n MatLine,\n setLines,\n mixinDisableRipple,\n mixinDisabled,\n} from '@angular/material/core';\nimport {Subject} from 'rxjs';\nimport {takeUntil} from 'rxjs/operators';\n\n// Boilerplate for applying mixins to MatList.\n/** @docs-private */\nconst _MatListBase = mixinDisabled(mixinDisableRipple(class {}));\n\n// Boilerplate for applying mixins to MatListItem.\n/** @docs-private */\nconst _MatListItemMixinBase = mixinDisableRipple(class {});\n\n/**\n * Injection token that can be used to inject instances of `MatList`. It serves as\n * alternative token to the actual `MatList` class which could cause unnecessary\n * retention of the class and its component metadata.\n */\nexport const MAT_LIST = new InjectionToken<MatList>('MatList');\n\n/**\n * Injection token that can be used to inject instances of `MatNavList`. It serves as\n * alternative token to the actual `MatNavList` class which could cause unnecessary\n * retention of the class and its component metadata.\n */\nexport const MAT_NAV_LIST = new InjectionToken<MatNavList>('MatNavList');\n\n@Component({\n selector: 'mat-nav-list',\n exportAs: 'matNavList',\n host: {\n 'role': 'navigation',\n 'class': 'mat-nav-list mat-list-base'\n },\n templateUrl: 'list.html',\n styleUrls: ['list.css'],\n inputs: ['disableRipple', 'disabled'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{provide: MAT_NAV_LIST, useExisting: MatNavList}],\n})\nexport class MatNavList extends _MatListBase implements CanDisable, CanDisableRipple,\n OnChanges, OnDestroy {\n /** Emits when the state of the list changes. */\n readonly _stateChanges = new Subject<void>();\n\n ngOnChanges() {\n this._stateChanges.next();\n }\n\n ngOnDestroy() {\n this._stateChanges.complete();\n }\n\n static ngAcceptInputType_disableRipple: BooleanInput;\n static ngAcceptInputType_disabled: BooleanInput;\n}\n\n@Component({\n selector: 'mat-list, mat-action-list',\n exportAs: 'matList',\n templateUrl: 'list.html',\n host: {\n 'class': 'mat-list mat-list-base'\n },\n styleUrls: ['list.css'],\n inputs: ['disableRipple', 'disabled'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{provide: MAT_LIST, useExisting: MatList}],\n})\nexport class MatList extends _MatListBase implements CanDisable, CanDisableRipple, OnChanges,\n OnDestroy {\n /** Emits when the state of the list changes. */\n readonly _stateChanges = new Subject<void>();\n\n constructor(private _elementRef: ElementRef<HTMLElement>) {\n super();\n\n if (this._getListType() === 'action-list') {\n _elementRef.nativeElement.classList.add('mat-action-list');\n }\n }\n\n _getListType(): 'list' | 'action-list' | null {\n const nodeName = this._elementRef.nativeElement.nodeName.toLowerCase();\n\n if (nodeName === 'mat-list') {\n return 'list';\n }\n\n if (nodeName === 'mat-action-list') {\n return 'action-list';\n }\n\n return null;\n }\n\n ngOnChanges() {\n this._stateChanges.next();\n }\n\n ngOnDestroy() {\n this._stateChanges.complete();\n }\n\n static ngAcceptInputType_disableRipple: BooleanInput;\n static ngAcceptInputType_disabled: BooleanInput;\n}\n\n/**\n * Directive whose purpose is to add the mat- CSS styling to this selector.\n * @docs-private\n */\n@Directive({\n selector: '[mat-list-avatar], [matListAvatar]',\n host: {'class': 'mat-list-avatar'}\n})\nexport class MatListAvatarCssMatStyler {}\n\n/**\n * Directive whose purpose is to add the mat- CSS styling to this selector.\n * @docs-private\n */\n@Directive({\n selector: '[mat-list-icon], [matListIcon]',\n host: {'class': 'mat-list-icon'}\n})\nexport class MatListIconCssMatStyler {}\n\n/**\n * Directive whose purpose is to add the mat- CSS styling to this selector.\n * @docs-private\n */\n@Directive({\n selector: '[mat-subheader], [matSubheader]',\n host: {'class': 'mat-subheader'}\n})\nexport class MatListSubheaderCssMatStyler {}\n\n/** An item within a Material Design list. */\n@Component({\n selector: 'mat-list-item, a[mat-list-item], button[mat-list-item]',\n exportAs: 'matListItem',\n host: {\n 'class': 'mat-list-item mat-focus-indicator',\n '[class.mat-list-item-disabled]': 'disabled',\n // @breaking-change 8.0.0 Remove `mat-list-item-avatar` in favor of `mat-list-item-with-avatar`.\n '[class.mat-list-item-avatar]': '_avatar || _icon',\n '[class.mat-list-item-with-avatar]': '_avatar || _icon',\n },\n inputs: ['disableRipple'],\n templateUrl: 'list-item.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MatListItem extends _MatListItemMixinBase implements AfterContentInit,\n CanDisableRipple, OnDestroy {\n private _isInteractiveList: boolean = false;\n private _list?: MatNavList | MatList;\n private readonly _destroyed = new Subject<void>();\n\n @ContentChildren(MatLine, {descendants: true}) _lines: QueryList<MatLine>;\n @ContentChild(MatListAvatarCssMatStyler) _avatar: MatListAvatarCssMatStyler;\n @ContentChild(MatListIconCssMatStyler) _icon: MatListIconCssMatStyler;\n\n constructor(private _element: ElementRef<HTMLElement>,\n _changeDetectorRef: ChangeDetectorRef,\n @Optional() @Inject(MAT_NAV_LIST) navList?: MatNavList,\n @Optional() @Inject(MAT_LIST) list?: MatList) {\n super();\n this._isInteractiveList = !!(navList || (list && list._getListType() === 'action-list'));\n this._list = navList || list;\n\n // If no type attribute is specified for <button>, set it to \"button\".\n // If a type attribute is already specified, do nothing.\n const element = this._getHostElement();\n\n if (element.nodeName.toLowerCase() === 'button' && !element.hasAttribute('type')) {\n element.setAttribute('type', 'button');\n }\n\n if (this._list) {\n // React to changes in the state of the parent list since\n // some of the item's properties depend on it (e.g. `disableRipple`).\n this._list._stateChanges.pipe(takeUntil(this._destroyed)).subscribe(() => {\n _changeDetectorRef.markForCheck();\n });\n }\n }\n\n /** Whether the option is disabled. */\n @Input()\n get disabled() { return this._disabled || !!(this._list && this._list.disabled); }\n set disabled(value: boolean) {\n this._disabled = coerceBooleanProperty(value);\n }\n private _disabled = false;\n\n ngAfterContentInit() {\n setLines(this._lines, this._element);\n }\n\n ngOnDestroy() {\n this._destroyed.next();\n this._destroyed.complete();\n }\n\n /** Whether this list item should show a ripple effect when clicked. */\n _isRippleDisabled() {\n return !this._isInteractiveList || this.disableRipple ||\n !!(this._list && this._list.disableRipple);\n }\n\n /** Retrieves the DOM element of the component host. */\n _getHostElement(): HTMLElement {\n return this._element.nativeElement;\n }\n\n static ngAcceptInputType_disableRipple: BooleanInput;\n static ngAcceptInputType_disabled: BooleanInput;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {FocusableOption, FocusKeyManager, FocusMonitor} from '@angular/cdk/a11y';\nimport {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {SelectionModel} from '@angular/cdk/collections';\nimport {\n A,\n DOWN_ARROW,\n ENTER,\n hasModifierKey,\n SPACE,\n UP_ARROW,\n} from '@angular/cdk/keycodes';\nimport {\n AfterContentInit,\n Attribute,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChild,\n ContentChildren,\n ElementRef,\n EventEmitter,\n forwardRef,\n Inject,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Output,\n QueryList,\n SimpleChanges,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from '@angular/forms';\nimport {\n CanDisableRipple,\n MatLine,\n mixinDisableRipple,\n setLines,\n ThemePalette,\n} from '@angular/material/core';\nimport {Subject} from 'rxjs';\nimport {startWith, takeUntil} from 'rxjs/operators';\nimport {MatListAvatarCssMatStyler, MatListIconCssMatStyler} from './list';\n\nconst _MatSelectionListBase = mixinDisableRipple(class {});\nconst _MatListOptionBase = mixinDisableRipple(class {});\n\n/** @docs-private */\nexport const MAT_SELECTION_LIST_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => MatSelectionList),\n multi: true\n};\n\n/** Change event that is being fired whenever the selected state of an option changes. */\nexport class MatSelectionListChange {\n constructor(\n /** Reference to the selection list that emitted the event. */\n public source: MatSelectionList,\n /**\n * Reference to the option that has been changed.\n * @deprecated Use `options` instead, because some events may change more than one option.\n * @breaking-change 12.0.0\n */\n public option: MatListOption,\n /** Reference to the options that have been changed. */\n public options: MatListOption[]) {}\n}\n\n/**\n * Type describing possible positions of a checkbox in a list option\n * with respect to the list item's text.\n */\nexport type MatListOptionCheckboxPosition = 'before'|'after';\n\n/**\n * Component for list-options of selection-list. Each list-option can automatically\n * generate a checkbox and can put current item into the selectionModel of selection-list\n * if the current item is selected.\n */\n@Component({\n selector: 'mat-list-option',\n exportAs: 'matListOption',\n inputs: ['disableRipple'],\n host: {\n 'role': 'option',\n 'class': 'mat-list-item mat-list-option mat-focus-indicator',\n '(focus)': '_handleFocus()',\n '(blur)': '_handleBlur()',\n '(click)': '_handleClick()',\n '[class.mat-list-item-disabled]': 'disabled',\n '[class.mat-list-item-with-avatar]': '_avatar || _icon',\n // Manually set the \"primary\" or \"warn\" class if the color has been explicitly\n // set to \"primary\" or \"warn\". The pseudo checkbox picks up these classes for\n // its theme.\n '[class.mat-primary]': 'color === \"primary\"',\n // Even though accent is the default, we need to set this class anyway, because the list might\n // be placed inside a parent that has one of the other colors with a higher specificity.\n '[class.mat-accent]': 'color !== \"primary\" && color !== \"warn\"',\n '[class.mat-warn]': 'color === \"warn\"',\n '[class.mat-list-single-selected-option]': 'selected && !selectionList.multiple',\n '[attr.aria-selected]': 'selected',\n '[attr.aria-disabled]': 'disabled',\n '[attr.tabindex]': '-1',\n },\n templateUrl: 'list-option.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MatListOption extends _MatListOptionBase implements AfterContentInit, OnDestroy,\n OnInit, FocusableOption,\n CanDisableRipple {\n private _selected = false;\n private _disabled = false;\n private _hasFocus = false;\n\n @ContentChild(MatListAvatarCssMatStyler) _avatar: MatListAvatarCssMatStyler;\n @ContentChild(MatListIconCssMatStyler) _icon: MatListIconCssMatStyler;\n @ContentChildren(MatLine, {descendants: true}) _lines: QueryList<MatLine>;\n\n /** DOM element containing the item's text. */\n @ViewChild('text') _text: ElementRef;\n\n /** Whether the label should appear before or after the checkbox. Defaults to 'after' */\n @Input() checkboxPosition: MatListOptionCheckboxPosition = 'after';\n\n /** Theme color of the list option. This sets the color of the checkbox. */\n @Input()\n get color(): ThemePalette { return this._color || this.selectionList.color; }\n set color(newValue: ThemePalette) { this._color = newValue; }\n private _color: ThemePalette;\n\n /**\n * This is set to true after the first OnChanges cycle so we don't clear the value of `selected`\n * in the first cycle.\n */\n private _inputsInitialized = false;\n /** Value of the option */\n @Input()\n get value(): any { return this._value; }\n set value(newValue: any) {\n if (\n this.selected &&\n !this.selectionList.compareWith(newValue, this.value) &&\n this._inputsInitialized\n ) {\n this.selected = false;\n }\n\n this._value = newValue;\n }\n private _value: any;\n\n /** Whether the option is disabled. */\n @Input()\n get disabled() { return this._disabled || (this.selectionList && this.selectionList.disabled); }\n set disabled(value: any) {\n const newValue = coerceBooleanProperty(value);\n\n if (newValue !== this._disabled) {\n this._disabled = newValue;\n this._changeDetector.markForCheck();\n }\n }\n\n /** Whether the option is selected. */\n @Input()\n get selected(): boolean { return this.selectionList.selectedOptions.isSelected(this); }\n set selected(value: boolean) {\n const isSelected = coerceBooleanProperty(value);\n\n if (isSelected !== this._selected) {\n this._setSelected(isSelected);\n\n if (isSelected || this.selectionList.multiple) {\n this.selectionList._reportValueChange();\n }\n }\n }\n\n constructor(private _element: ElementRef<HTMLElement>,\n private _changeDetector: ChangeDetectorRef,\n /** @docs-private */\n @Inject(forwardRef(() => MatSelectionList)) public selectionList: MatSelectionList) {\n super();\n }\n\n ngOnInit() {\n const list = this.selectionList;\n\n if (list._value && list._value.some(value => list.compareWith(value, this._value))) {\n this._setSelected(true);\n }\n\n const wasSelected = this._selected;\n\n // List options that are selected at initialization can't be reported properly to the form\n // control. This is because it takes some time until the selection-list knows about all\n // available options. Also it can happen that the ControlValueAccessor has an initial value\n // that should be used instead. Deferring the value change report to the next tick ensures\n // that the form control value is not being overwritten.\n Promise.resolve().then(() => {\n if (this._selected || wasSelected) {\n this.selected = true;\n this._changeDetector.markForCheck();\n }\n });\n this._inputsInitialized = true;\n }\n\n ngAfterContentInit() {\n setLines(this._lines, this._element);\n }\n\n ngOnDestroy(): void {\n if (this.selected) {\n // We have to delay this until the next tick in order\n // to avoid changed after checked errors.\n Promise.resolve().then(() => {\n this.selected = false;\n });\n }\n\n const hadFocus = this._hasFocus;\n const newActiveItem = this.selectionList._removeOptionFromList(this);\n\n // Only move focus if this option was focused at the time it was destroyed.\n if (hadFocus && newActiveItem) {\n newActiveItem.focus();\n }\n }\n\n /** Toggles the selection state of the option. */\n toggle(): void {\n this.selected = !this.selected;\n }\n\n /** Allows for programmatic focusing of the option. */\n focus(): void {\n this._element.nativeElement.focus();\n }\n\n /**\n * Returns the list item's text label. Implemented as a part of the FocusKeyManager.\n * @docs-private\n */\n getLabel() {\n return this._text ? (this._text.nativeElement.textContent || '') : '';\n }\n\n /** Whether this list item should show a ripple effect when clicked. */\n _isRippleDisabled() {\n return this.disabled || this.disableRipple || this.selectionList.disableRipple;\n }\n\n _handleClick() {\n if (!this.disabled && (this.selectionList.multiple || !this.selected)) {\n this.toggle();\n\n // Emit a change event if the selected state of the option changed through user interaction.\n this.selectionList._emitChangeEvent([this]);\n }\n }\n\n _handleFocus() {\n this.selectionList._setFocusedOption(this);\n this._hasFocus = true;\n }\n\n _handleBlur() {\n this.selectionList._onTouched();\n this._hasFocus = false;\n }\n\n /** Retrieves the DOM element of the component host. */\n _getHostElement(): HTMLElement {\n return this._element.nativeElement;\n }\n\n /** Sets the selected state of the option. Returns whether the value has changed. */\n _setSelected(selected: boolean): boolean {\n if (selected === this._selected) {\n return false;\n }\n\n this._selected = selected;\n\n if (selected) {\n this.selectionList.selectedOptions.select(this);\n } else {\n this.selectionList.selectedOptions.deselect(this);\n }\n\n this._changeDetector.markForCheck();\n return true;\n }\n\n /**\n * Notifies Angular that the option needs to be checked in the next change detection run. Mainly\n * used to trigger an update of the list option if the disabled state of the selection list\n * changed.\n */\n _markForCheck() {\n this._changeDetector.markForCheck();\n }\n\n static ngAcceptInputType_disabled: BooleanInput;\n static ngAcceptInputType_selected: BooleanInput;\n static ngAcceptInputType_disableRipple: BooleanInput;\n}\n\n\n/**\n * Material Design list component where each item is a selectable option. Behaves as a listbox.\n */\n@Component({\n selector: 'mat-selection-list',\n exportAs: 'matSelectionList',\n inputs: ['disableRipple'],\n host: {\n 'role': 'listbox',\n 'class': 'mat-selection-list mat-list-base',\n '(keydown)': '_keydown($event)',\n '[attr.aria-multiselectable]': 'multiple',\n '[attr.aria-disabled]': 'disabled.toString()',\n '[attr.tabindex]': '_tabIndex',\n },\n template: '<ng-content></ng-content>',\n styleUrls: ['list.css'],\n encapsulation: ViewEncapsulation.None,\n providers: [MAT_SELECTION_LIST_VALUE_ACCESSOR],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class MatSelectionList extends _MatSelectionListBase implements CanDisableRipple,\n AfterContentInit, ControlValueAccessor, OnDestroy, OnChanges {\n private _multiple = true;\n private _contentInitialized = false;\n\n /** The FocusKeyManager which handles focus. */\n _keyManager: FocusKeyManager<MatListOption>;\n\n /** The option components contained within this selection-list. */\n @ContentChildren(MatListOption, {descendants: true}) options: QueryList<MatListOption>;\n\n /** Emits a change event whenever the selected state of an option changes. */\n @Output() readonly selectionChange: EventEmitter<MatSelectionListChange> =\n new EventEmitter<MatSelectionListChange>();\n\n /**\n * Tabindex of the selection list.\n * @breaking-change 11.0.0 Remove `tabIndex` input.\n */\n @Input() tabIndex: number = 0;\n\n /** Theme color of the selection list. This sets the checkbox color for all list options. */\n @Input() color: ThemePalette = 'accent';\n\n /**\n * Function used for comparing an option against the selected value when determining which\n * options should appear as selected. The first argument is the value of an options. The second\n * one is a value from the selected value. A boolean must be returned.\n */\n @Input() compareWith: (o1: any, o2: any) => boolean = (a1, a2) => a1 === a2;\n\n /** Whether the selection list is disabled. */\n @Input()\n get disabled(): boolean { return this._disabled; }\n set disabled(value: boolean) {\n this._disabled = coerceBooleanProperty(value);\n\n // The `MatSelectionList` and `MatListOption` are using the `OnPush` change detection\n // strategy. Therefore the options will not check for any changes if the `MatSelectionList`\n // changed its state. Since we know that a change to `disabled` property of the list affects\n // the state of the options, we manually mark each option for check.\n this._markOptionsForCheck();\n }\n private _disabled: boolean = false;\n\n /** Whether selection is limited to one or multiple items (default multiple). */\n @Input()\n get multiple(): boolean { return this._multiple; }\n set multiple(value: boolean) {\n const newValue = coerceBooleanProperty(value);\n\n if (newValue !== this._multiple) {\n if (this._contentInitialized && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw new Error(\n 'Cannot change `multiple` mode of mat-selection-list after initialization.');\n }\n\n this._multiple = newValue;\n this.selectedOptions = new SelectionModel(this._multiple, this.selectedOptions.selected);\n }\n }\n\n /** The currently selected options. */\n selectedOptions = new SelectionModel<MatListOption>(this._multiple);\n\n /** The tabindex of the selection list. */\n _tabIndex = -1;\n\n /** View to model callback that should be called whenever the selected options change. */\n private _onChange: (value: any) => void = (_: any) => {};\n\n /** Keeps track of the currently-selected value. */\n _value: string[]|null;\n\n /** Emits when the list has been destroyed. */\n private readonly _destroyed = new Subject<void>();\n\n /** View to model callback that should be called if the list or its options lost focus. */\n _onTouched: () => void = () => {};\n\n /** Whether the list has been destroyed. */\n private _isDestroyed: boolean;\n\n constructor(private _element: ElementRef<HTMLElement>,\n // @breaking-change 11.0.0 Remove `tabIndex` parameter.\n @Attribute('tabindex') tabIndex: string,\n private _changeDetector: ChangeDetectorRef,\n // @breaking-change 11.0.0 `_focusMonitor` parameter to become required.\n private _focusMonitor?: FocusMonitor) {\n super();\n }\n\n ngAfterContentInit(): void {\n this._contentInitialized = true;\n\n this._keyManager = new FocusKeyManager<MatListOption>(this.options)\n .withWrap()\n .withTypeAhead()\n .withHomeAndEnd()\n // Allow disabled items to be focusable. For accessibility reasons, there must be a way for\n // screenreader users, that allows reading the different options of the list.\n .skipPredicate(() => false)\n .withAllowedModifierKeys(['shiftKey']);\n\n if (this._value) {\n this._setOptionsFromValues(this._value);\n }\n\n // If the user attempts to tab out of the selection list, allow focus to escape.\n this._keyManager.tabOut.pipe(takeUntil(this._destroyed)).subscribe(() => {\n this._allowFocusEscape();\n });\n\n // When the number of options change, update the tabindex of the selection list.\n this.options.changes.pipe(startWith(null), takeUntil(this._destroyed)).subscribe(() => {\n this._updateTabIndex();\n });\n\n // Sync external changes to the model back to the options.\n this.selectedOptions.changed.pipe(takeUntil(this._destroyed)).subscribe(event => {\n if (event.added) {\n for (let item of event.added) {\n item.selected = true;\n }\n }\n\n if (event.removed) {\n for (let item of event.removed) {\n item.selected = false;\n }\n }\n });\n\n // @breaking-change 11.0.0 Remove null assertion once _focusMonitor is required.\n this._focusMonitor?.monitor(this._element)\n .pipe(takeUntil(this._destroyed))\n .subscribe(origin => {\n if (origin === 'keyboard' || origin === 'program') {\n let toFocus = 0;\n for (let i = 0; i < this.options.length; i++) {\n if (this.options.get(i)?.selected) {\n toFocus = i;\n break;\n }\n }\n this._keyManager.setActiveItem(toFocus);\n }\n });\n }\n\n ngOnChanges(changes: SimpleChanges) {\n const disableRippleChanges = changes['disableRipple'];\n const colorChanges = changes['color'];\n\n if ((disableRippleChanges && !disableRippleChanges.firstChange) ||\n (colorChanges && !colorChanges.firstChange)) {\n this._markOptionsForCheck();\n }\n }\n\n ngOnDestroy() {\n // @breaking-change 11.0.0 Remove null assertion once _focusMonitor is required.\n this._focusMonitor?.stopMonitoring(this._element);\n this._destroyed.next();\n this._destroyed.complete();\n this._isDestroyed = true;\n }\n\n /** Focuses the selection list. */\n focus(options?: FocusOptions) {\n this._element.nativeElement.focus(options);\n }\n\n /** Selects all of the options. Returns the options that changed as a result. */\n selectAll(): MatListOption[] {\n return this._setAllOptionsSelected(true);\n }\n\n /** Deselects all of the options. Returns the options that changed as a result. */\n deselectAll(): MatListOption[] {\n return this._setAllOptionsSelected(false);\n }\n\n /** Sets the focused option of the selection-list. */\n _setFocusedOption(option: MatListOption) {\n this._keyManager.updateActiveItem(option);\n }\n\n /**\n * Removes an option from the selection list and updates the active item.\n * @returns Currently-active item.\n */\n _removeOptionFromList(option: MatListOption): MatListOption | null {\n const optionIndex = this._getOptionIndex(option);\n\n if (optionIndex > -1 && this._keyManager.activeItemIndex === optionIndex) {\n // Check whether the option is the last item\n if (optionIndex > 0) {\n this._keyManager.updateActiveItem(optionIndex - 1);\n } else if (optionIndex === 0 && this.options.length > 1) {\n this._keyManager.updateActiveItem(Math.min(optionIndex + 1, this.options.length - 1));\n }\n }\n\n return this._keyManager.activeItem;\n }\n\n /** Passes relevant key presses to our key manager. */\n _keydown(event: KeyboardEvent) {\n const keyCode = event.keyCode;\n const manager = this._keyManager;\n const previousFocusIndex = manager.activeItemIndex;\n const hasModifier = hasModifierKey(event);\n\n switch (keyCode) {\n case SPACE:\n case ENTER:\n if (!hasModifier && !manager.isTyping()) {\n this._toggleFocusedOption();\n // Always prevent space from scrolling the page since the list has focus\n event.preventDefault();\n }\n break;\n default:\n // The \"A\" key gets special treatment, because it's used for the \"select all\" functionality.\n if (keyCode === A && this.multiple && hasModifierKey(event, 'ctrlKey') &&\n !manager.isTyping()) {\n const shouldSelect = this.options.some(option => !option.disabled && !option.selected);\n this._setAllOptionsSelected(shouldSelect, true, true);\n event.preventDefault();\n } else {\n manager.onKeydown(event);\n }\n }\n\n if (this.multiple && (keyCode === UP_ARROW || keyCode === DOWN_ARROW) && event.shiftKey &&\n manager.activeItemIndex !== previousFocusIndex) {\n this._toggleFocusedOption();\n }\n }\n\n /** Reports a value change to the ControlValueAccessor */\n _reportValueChange() {\n // Stop reporting value changes after the list has been destroyed. This avoids\n // cases where the list might wrongly reset its value once it is removed, but\n // the form control is still live.\n if (this.options && !this._isDestroyed) {\n const value = this._getSelectedOptionValues();\n this._onChange(value);\n this._value = value;\n }\n }\n\n /** Emits a change event if the selected state of an option changed. */\n _emitChangeEvent(options: MatListOption[]) {\n this.selectionChange.emit(new MatSelectionListChange(this, options[0], options));\n }\n\n /** Implemented as part of ControlValueAccessor. */\n writeValue(values: string[]): void {\n this._value = values;\n\n if (this.options) {\n this._setOptionsFromValues(values || []);\n }\n }\n\n /** Implemented as a part of ControlValueAccessor. */\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n }\n\n /** Implemented as part of ControlValueAccessor. */\n registerOnChange(fn: (value: any) => void): void {\n this._onChange = fn;\n }\n\n /** Implemented as part of ControlValueAccessor. */\n registerOnTouched(fn: () => void): void {\n this._onTouched = fn;\n }\n\n /** Sets the selected options based on the specified values. */\n private _setOptionsFromValues(values: string[]) {\n this.options.forEach(option => option._setSelected(false));\n\n values.forEach(value => {\n const correspondingOption = this.options.find(option => {\n // Skip options that are already in the model. This allows us to handle cases\n // where the same primitive value is selected multiple times.\n return option.selected ? false : this.compareWith(option.value, value);\n });\n\n if (correspondingOption) {\n correspondingOption._setSelected(true);\n }\n });\n }\n\n /** Returns the values of the selected options. */\n private _getSelectedOptionValues(): string[] {\n return this.options.filter(option => option.selected).map(option => option.value);\n }\n\n /** Toggles the state of the currently focused option if enabled. */\n private _toggleFocusedOption(): void {\n let focusedIndex = this._keyManager.activeItemIndex;\n\n if (focusedIndex != null && this._isValidIndex(focusedIndex)) {\n let focusedOption: MatListOption = this.options.toArray()[focusedIndex];\n\n if (focusedOption && !focusedOption.disabled && (this._multiple || !focusedOption.selected)) {\n focusedOption.toggle();\n\n // Emit a change event because the focused option changed its state through user\n // interaction.\n this._emitChangeEvent([focusedOption]);\n }\n }\n }\n\n /**\n * Sets the selected state on all of the options\n * and emits an event if anything changed.\n */\n private _setAllOptionsSelected(\n isSelected: boolean,\n skipDisabled?: boolean,\n isUserInput?: boolean): MatListOption[] {\n // Keep track of whether anything changed, because we only want to\n // emit the changed event when something actually changed.\n const changedOptions: MatListOption[] = [];\n\n this.options.forEach(option => {\n if ((!skipDisabled || !option.disabled) && option._setSelected(isSelected)) {\n changedOptions.push(option);\n }\n });\n\n if (changedOptions.length) {\n this._reportValueChange();\n\n if (isUserInput) {\n this._emitChangeEvent(changedOptions);\n }\n }\n\n return changedOptions;\n }\n\n /**\n * Utility to ensure all indexes are valid.\n * @param index The index to be checked.\n * @returns True if the index is valid for our list of options.\n */\n private _isValidIndex(index: number): boolean {\n return index >= 0 && index < this.options.length;\n }\n\n /** Returns the index of the specified list option. */\n private _getOptionIndex(option: MatListOption): number {\n return this.options.toArray().indexOf(option);\n }\n\n /** Marks all the options to be checked in the next change detection run. */\n private _markOptionsForCheck() {\n if (this.options) {\n this.options.forEach(option => option._markForCheck());\n }\n }\n\n /**\n * Removes the tabindex from the selection list and resets it back afterwards, allowing the user\n * to tab out of it. This prevents the list from capturing focus and redirecting it back within\n * the list, creating a focus trap if it user tries to tab away.\n */\n private _allowFocusEscape() {\n this._tabIndex = -1;\n\n setTimeout(() => {\n this._tabIndex = 0;\n this._changeDetector.markForCheck();\n });\n }\n\n /** Updates the tabindex based upon if the selection list is empty. */\n private _updateTabIndex(): void {\n this._tabIndex = (this.options.length === 0) ? -1 : 0;\n }\n\n static ngAcceptInputType_disabled: BooleanInput;\n static ngAcceptInputType_disableRipple: BooleanInput;\n static ngAcceptInputType_multiple: BooleanInput;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {\n MatCommonModule,\n MatLineModule,\n MatPseudoCheckboxModule,\n MatRippleModule,\n} from '@angular/material/core';\nimport {\n MatList,\n MatNavList,\n MatListAvatarCssMatStyler,\n MatListIconCssMatStyler,\n MatListItem,\n MatListSubheaderCssMatStyler,\n} from './list';\nimport {MatListOption, MatSelectionList} from './selection-list';\nimport {MatDividerModule} from '@angular/material/divider';\n\n\n@NgModule({\n imports: [MatLineModule, MatRippleModule, MatCommonModule, MatPseudoCheckboxModule, CommonModule],\n exports: [\n MatList,\n MatNavList,\n MatListItem,\n MatListAvatarCssMatStyler,\n MatLineModule,\n MatCommonModule,\n MatListIconCssMatStyler,\n MatListSubheaderCssMatStyler,\n MatPseudoCheckboxModule,\n MatSelectionList,\n MatListOption,\n MatDividerModule\n ],\n declarations: [\n MatList,\n MatNavList,\n MatListItem,\n MatListAvatarCssMatStyler,\n MatListIconCssMatStyler,\n MatListSubheaderCssMatStyler,\n MatSelectionList,\n MatListOption\n ],\n})\nexport class MatListModule {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './list-module';\nexport * from './list';\nexport * from './selection-list';\n\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;AAsCA;AACA;AACA,MAAM,YAAY,GAAG,aAAa,CAAC,kBAAkB,CAAC;CAAQ,CAAC,CAAC,CAAC;AAEjE;AACA;AACA,MAAM,qBAAqB,GAAG,kBAAkB,CAAC;CAAQ,CAAC,CAAC;AAE3D;;;;;MAKa,QAAQ,GAAG,IAAI,cAAc,CAAU,SAAS,EAAE;AAE/D;;;;;MAKa,YAAY,GAAG,IAAI,cAAc,CAAa,YAAY,EAAE;MAgB5D,UAAW,SAAQ,YAAY;IAd5C;;;QAiBW,kBAAa,GAAG,IAAI,OAAO,EAAQ,CAAC;KAY9C;IAVC,WAAW;QACT,IAAI,CAAC,aAAa,CAAC,IAAI,EAAE,CAAC;KAC3B;IAED,WAAW;QACT,IAAI,CAAC,aAAa,CAAC,QAAQ,EAAE,CAAC;KAC/B;;;YAzBF,SAAS,SAAC;gBACT,QAAQ,EAAE,cAAc;gBACxB,QAAQ,EAAE,YAAY;gBACtB,IAAI,EAAE;oBACJ,MAAM,EAAE,YAAY;oBACpB,OAAO,EAAE,4BAA4B;iBACtC;gBACD,yCAAwB;gBAExB,MAAM,EAAE,CAAC,eAAe,EAAE,UAAU,CAAC;gBACrC,aAAa,EAAE,iBAAiB,CAAC,IAAI;gBACrC,eAAe,EAAE,uBAAuB,CAAC,MAAM;gBAC/C,SAAS,EAAE,CAAC,EAAC,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,UAAU,EAAC,CAAC;;aAC9D;;MA+BY,OAAQ,SAAQ,YAAY;IAKvC,YAAoB,WAAoC;QACtD,KAAK,EAAE,CAAC;QADU,gBAAW,GAAX,WAAW,CAAyB;;QAF/C,kBAAa,GAAG,IAAI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AM,EAAE,SAAS;oBACjB,OAAO,EAAE,kCAAkC;oBAC3C,WAAW,EAAE,kBAAkB;oBAC/B,6BAA6B,EAAE,UAAU;oBACzC,sBAAsB,EAAE,qBAAqB;oBAC7C,iBAAiB,EAAE,WAAW;iBAC/B;gBACD,QAAQ,EAAE,2BAA2B;gBAErC,aAAa,EAAE,iBAAiB,CAAC,IAAI;gBACrC,SAAS,EAAE,CAAC,iCAAiC,CAAC;gBAC9C,eAAe,EAAE,uBAAuB,CAAC,MAAM;;aAChD;;;YA1TC,UAAU;yCAgZP,SAAS,SAAC,UAAU;YApZvB,iBAAiB;YAfuB,YAAY;;;sBAuVnD,eAAe,SAAC,aAAa,EAAE,EAAC,WAAW,EAAE,IAAI,EAAC;8BAGlD,MAAM;uBAON,KAAK;oBAGL,KAAK;0BAOL,KAAK;uBAGL,KAAK;uBAcL,KAAK;;;ACpYR;;;;;;;MAuDa,aAAa;;;YA3BzB,QAAQ,SAAC;gBACR,OAAO,EAAE,CAAC,aAAa,EAAE,eAAe,EAAE,eAAe,EAAE,uBAAuB,EAAE,YAAY,CAAC;gBACjG,OAAO,EAAE;oBACP,OAAO;oBACP,UAAU;oBACV,WAAW;oBACX,yBAAyB;oBACzB,aAAa;oBACb,eAAe;oBACf,uBAAuB;oBACvB,4BAA4B;oBAC5B,uBAAuB;oBACvB,gBAAgB;oBAChB,aAAa;oBACb,gBAAgB;iBACjB;gBACD,YAAY,EAAE;oBACZ,OAAO;oBACP,UAAU;oBACV,WAAW;oBACX,yBAAyB;oBACzB,uBAAuB;oBACvB,4BAA4B;oBAC5B,gBAAgB;oBAChB,aAAa;iBACd;aACF;;;ACtDD;;;;;;;;ACAA;;;;;;"}
|
|
1
|
+
{"version":3,"file":"list.js","sources":["../../../../../../src/material/list/list.ts","../../../../../../src/material/list/selection-list.ts","../../../../../../src/material/list/list-module.ts","../../../../../../src/material/list/public-api.ts","../../../../../../src/material/list/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {coerceBooleanProperty, BooleanInput} from '@angular/cdk/coercion';\nimport {\n AfterContentInit,\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n ContentChildren,\n Directive,\n ElementRef,\n Optional,\n QueryList,\n ViewEncapsulation,\n OnChanges,\n OnDestroy,\n ChangeDetectorRef,\n Input,\n InjectionToken,\n Inject,\n} from '@angular/core';\nimport {\n CanDisable,\n CanDisableRipple,\n MatLine,\n setLines,\n mixinDisableRipple,\n mixinDisabled,\n} from '@angular/material/core';\nimport {Subject} from 'rxjs';\nimport {takeUntil} from 'rxjs/operators';\n\n// Boilerplate for applying mixins to MatList.\n/** @docs-private */\nconst _MatListBase = mixinDisabled(mixinDisableRipple(class {}));\n\n// Boilerplate for applying mixins to MatListItem.\n/** @docs-private */\nconst _MatListItemMixinBase = mixinDisableRipple(class {});\n\n/**\n * Injection token that can be used to inject instances of `MatList`. It serves as\n * alternative token to the actual `MatList` class which could cause unnecessary\n * retention of the class and its component metadata.\n */\nexport const MAT_LIST = new InjectionToken<MatList>('MatList');\n\n/**\n * Injection token that can be used to inject instances of `MatNavList`. It serves as\n * alternative token to the actual `MatNavList` class which could cause unnecessary\n * retention of the class and its component metadata.\n */\nexport const MAT_NAV_LIST = new InjectionToken<MatNavList>('MatNavList');\n\n@Component({\n selector: 'mat-nav-list',\n exportAs: 'matNavList',\n host: {\n 'role': 'navigation',\n 'class': 'mat-nav-list mat-list-base'\n },\n templateUrl: 'list.html',\n styleUrls: ['list.css'],\n inputs: ['disableRipple', 'disabled'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{provide: MAT_NAV_LIST, useExisting: MatNavList}],\n})\nexport class MatNavList extends _MatListBase implements CanDisable, CanDisableRipple,\n OnChanges, OnDestroy {\n /** Emits when the state of the list changes. */\n readonly _stateChanges = new Subject<void>();\n\n ngOnChanges() {\n this._stateChanges.next();\n }\n\n ngOnDestroy() {\n this._stateChanges.complete();\n }\n\n static ngAcceptInputType_disableRipple: BooleanInput;\n static ngAcceptInputType_disabled: BooleanInput;\n}\n\n@Component({\n selector: 'mat-list, mat-action-list',\n exportAs: 'matList',\n templateUrl: 'list.html',\n host: {\n 'class': 'mat-list mat-list-base'\n },\n styleUrls: ['list.css'],\n inputs: ['disableRipple', 'disabled'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{provide: MAT_LIST, useExisting: MatList}],\n})\nexport class MatList extends _MatListBase implements CanDisable, CanDisableRipple, OnChanges,\n OnDestroy {\n /** Emits when the state of the list changes. */\n readonly _stateChanges = new Subject<void>();\n\n constructor(private _elementRef: ElementRef<HTMLElement>) {\n super();\n\n if (this._getListType() === 'action-list') {\n _elementRef.nativeElement.classList.add('mat-action-list');\n }\n }\n\n _getListType(): 'list' | 'action-list' | null {\n const nodeName = this._elementRef.nativeElement.nodeName.toLowerCase();\n\n if (nodeName === 'mat-list') {\n return 'list';\n }\n\n if (nodeName === 'mat-action-list') {\n return 'action-list';\n }\n\n return null;\n }\n\n ngOnChanges() {\n this._stateChanges.next();\n }\n\n ngOnDestroy() {\n this._stateChanges.complete();\n }\n\n static ngAcceptInputType_disableRipple: BooleanInput;\n static ngAcceptInputType_disabled: BooleanInput;\n}\n\n/**\n * Directive whose purpose is to add the mat- CSS styling to this selector.\n * @docs-private\n */\n@Directive({\n selector: '[mat-list-avatar], [matListAvatar]',\n host: {'class': 'mat-list-avatar'}\n})\nexport class MatListAvatarCssMatStyler {}\n\n/**\n * Directive whose purpose is to add the mat- CSS styling to this selector.\n * @docs-private\n */\n@Directive({\n selector: '[mat-list-icon], [matListIcon]',\n host: {'class': 'mat-list-icon'}\n})\nexport class MatListIconCssMatStyler {}\n\n/**\n * Directive whose purpose is to add the mat- CSS styling to this selector.\n * @docs-private\n */\n@Directive({\n selector: '[mat-subheader], [matSubheader]',\n host: {'class': 'mat-subheader'}\n})\nexport class MatListSubheaderCssMatStyler {}\n\n/** An item within a Material Design list. */\n@Component({\n selector: 'mat-list-item, a[mat-list-item], button[mat-list-item]',\n exportAs: 'matListItem',\n host: {\n 'class': 'mat-list-item mat-focus-indicator',\n '[class.mat-list-item-disabled]': 'disabled',\n // @breaking-change 8.0.0 Remove `mat-list-item-avatar` in favor of `mat-list-item-with-avatar`.\n '[class.mat-list-item-avatar]': '_avatar || _icon',\n '[class.mat-list-item-with-avatar]': '_avatar || _icon',\n },\n inputs: ['disableRipple'],\n templateUrl: 'list-item.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MatListItem extends _MatListItemMixinBase implements AfterContentInit,\n CanDisableRipple, OnDestroy {\n private _isInteractiveList: boolean = false;\n private _list?: MatNavList | MatList;\n private readonly _destroyed = new Subject<void>();\n\n @ContentChildren(MatLine, {descendants: true}) _lines: QueryList<MatLine>;\n @ContentChild(MatListAvatarCssMatStyler) _avatar: MatListAvatarCssMatStyler;\n @ContentChild(MatListIconCssMatStyler) _icon: MatListIconCssMatStyler;\n\n constructor(private _element: ElementRef<HTMLElement>,\n _changeDetectorRef: ChangeDetectorRef,\n @Optional() @Inject(MAT_NAV_LIST) navList?: MatNavList,\n @Optional() @Inject(MAT_LIST) list?: MatList) {\n super();\n this._isInteractiveList = !!(navList || (list && list._getListType() === 'action-list'));\n this._list = navList || list;\n\n // If no type attribute is specified for <button>, set it to \"button\".\n // If a type attribute is already specified, do nothing.\n const element = this._getHostElement();\n\n if (element.nodeName.toLowerCase() === 'button' && !element.hasAttribute('type')) {\n element.setAttribute('type', 'button');\n }\n\n if (this._list) {\n // React to changes in the state of the parent list since\n // some of the item's properties depend on it (e.g. `disableRipple`).\n this._list._stateChanges.pipe(takeUntil(this._destroyed)).subscribe(() => {\n _changeDetectorRef.markForCheck();\n });\n }\n }\n\n /** Whether the option is disabled. */\n @Input()\n get disabled() { return this._disabled || !!(this._list && this._list.disabled); }\n set disabled(value: boolean) {\n this._disabled = coerceBooleanProperty(value);\n }\n private _disabled = false;\n\n ngAfterContentInit() {\n setLines(this._lines, this._element);\n }\n\n ngOnDestroy() {\n this._destroyed.next();\n this._destroyed.complete();\n }\n\n /** Whether this list item should show a ripple effect when clicked. */\n _isRippleDisabled() {\n return !this._isInteractiveList || this.disableRipple ||\n !!(this._list && this._list.disableRipple);\n }\n\n /** Retrieves the DOM element of the component host. */\n _getHostElement(): HTMLElement {\n return this._element.nativeElement;\n }\n\n static ngAcceptInputType_disableRipple: BooleanInput;\n static ngAcceptInputType_disabled: BooleanInput;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {FocusableOption, FocusKeyManager, FocusMonitor} from '@angular/cdk/a11y';\nimport {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {SelectionModel} from '@angular/cdk/collections';\nimport {\n A,\n DOWN_ARROW,\n ENTER,\n hasModifierKey,\n SPACE,\n UP_ARROW,\n} from '@angular/cdk/keycodes';\nimport {\n AfterContentInit,\n Attribute,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChild,\n ContentChildren,\n ElementRef,\n EventEmitter,\n forwardRef,\n Inject,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Output,\n QueryList,\n SimpleChanges,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from '@angular/forms';\nimport {\n CanDisableRipple,\n MatLine,\n mixinDisableRipple,\n setLines,\n ThemePalette,\n} from '@angular/material/core';\nimport {Subject} from 'rxjs';\nimport {startWith, takeUntil} from 'rxjs/operators';\nimport {MatListAvatarCssMatStyler, MatListIconCssMatStyler} from './list';\n\nconst _MatSelectionListBase = mixinDisableRipple(class {});\nconst _MatListOptionBase = mixinDisableRipple(class {});\n\n/** @docs-private */\nexport const MAT_SELECTION_LIST_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => MatSelectionList),\n multi: true\n};\n\n/** Change event that is being fired whenever the selected state of an option changes. */\nexport class MatSelectionListChange {\n constructor(\n /** Reference to the selection list that emitted the event. */\n public source: MatSelectionList,\n /**\n * Reference to the option that has been changed.\n * @deprecated Use `options` instead, because some events may change more than one option.\n * @breaking-change 12.0.0\n */\n public option: MatListOption,\n /** Reference to the options that have been changed. */\n public options: MatListOption[]) {}\n}\n\n/**\n * Type describing possible positions of a checkbox in a list option\n * with respect to the list item's text.\n */\nexport type MatListOptionCheckboxPosition = 'before'|'after';\n\n/**\n * Component for list-options of selection-list. Each list-option can automatically\n * generate a checkbox and can put current item into the selectionModel of selection-list\n * if the current item is selected.\n */\n@Component({\n selector: 'mat-list-option',\n exportAs: 'matListOption',\n inputs: ['disableRipple'],\n host: {\n 'role': 'option',\n 'class': 'mat-list-item mat-list-option mat-focus-indicator',\n '(focus)': '_handleFocus()',\n '(blur)': '_handleBlur()',\n '(click)': '_handleClick()',\n '[class.mat-list-item-disabled]': 'disabled',\n '[class.mat-list-item-with-avatar]': '_avatar || _icon',\n // Manually set the \"primary\" or \"warn\" class if the color has been explicitly\n // set to \"primary\" or \"warn\". The pseudo checkbox picks up these classes for\n // its theme.\n '[class.mat-primary]': 'color === \"primary\"',\n // Even though accent is the default, we need to set this class anyway, because the list might\n // be placed inside a parent that has one of the other colors with a higher specificity.\n '[class.mat-accent]': 'color !== \"primary\" && color !== \"warn\"',\n '[class.mat-warn]': 'color === \"warn\"',\n '[class.mat-list-single-selected-option]': 'selected && !selectionList.multiple',\n '[attr.aria-selected]': 'selected',\n '[attr.aria-disabled]': 'disabled',\n '[attr.tabindex]': '-1',\n },\n templateUrl: 'list-option.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MatListOption extends _MatListOptionBase implements AfterContentInit, OnDestroy,\n OnInit, FocusableOption,\n CanDisableRipple {\n private _selected = false;\n private _disabled = false;\n private _hasFocus = false;\n\n @ContentChild(MatListAvatarCssMatStyler) _avatar: MatListAvatarCssMatStyler;\n @ContentChild(MatListIconCssMatStyler) _icon: MatListIconCssMatStyler;\n @ContentChildren(MatLine, {descendants: true}) _lines: QueryList<MatLine>;\n\n /**\n * Emits when the selected state of the option has changed.\n * Use to facilitate two-data binding to the `selected` property.\n * @docs-private\n */\n @Output()\n readonly selectedChange: EventEmitter<boolean> = new EventEmitter<boolean>();\n\n /** DOM element containing the item's text. */\n @ViewChild('text') _text: ElementRef;\n\n /** Whether the label should appear before or after the checkbox. Defaults to 'after' */\n @Input() checkboxPosition: MatListOptionCheckboxPosition = 'after';\n\n /** Theme color of the list option. This sets the color of the checkbox. */\n @Input()\n get color(): ThemePalette { return this._color || this.selectionList.color; }\n set color(newValue: ThemePalette) { this._color = newValue; }\n private _color: ThemePalette;\n\n /**\n * This is set to true after the first OnChanges cycle so we don't clear the value of `selected`\n * in the first cycle.\n */\n private _inputsInitialized = false;\n /** Value of the option */\n @Input()\n get value(): any { return this._value; }\n set value(newValue: any) {\n if (\n this.selected &&\n !this.selectionList.compareWith(newValue, this.value) &&\n this._inputsInitialized\n ) {\n this.selected = false;\n }\n\n this._value = newValue;\n }\n private _value: any;\n\n /** Whether the option is disabled. */\n @Input()\n get disabled() { return this._disabled || (this.selectionList && this.selectionList.disabled); }\n set disabled(value: any) {\n const newValue = coerceBooleanProperty(value);\n\n if (newValue !== this._disabled) {\n this._disabled = newValue;\n this._changeDetector.markForCheck();\n }\n }\n\n /** Whether the option is selected. */\n @Input()\n get selected(): boolean { return this.selectionList.selectedOptions.isSelected(this); }\n set selected(value: boolean) {\n const isSelected = coerceBooleanProperty(value);\n\n if (isSelected !== this._selected) {\n this._setSelected(isSelected);\n\n if (isSelected || this.selectionList.multiple) {\n this.selectionList._reportValueChange();\n }\n }\n }\n\n constructor(private _element: ElementRef<HTMLElement>,\n private _changeDetector: ChangeDetectorRef,\n /** @docs-private */\n @Inject(forwardRef(() => MatSelectionList)) public selectionList: MatSelectionList) {\n super();\n }\n\n ngOnInit() {\n const list = this.selectionList;\n\n if (list._value && list._value.some(value => list.compareWith(value, this._value))) {\n this._setSelected(true);\n }\n\n const wasSelected = this._selected;\n\n // List options that are selected at initialization can't be reported properly to the form\n // control. This is because it takes some time until the selection-list knows about all\n // available options. Also it can happen that the ControlValueAccessor has an initial value\n // that should be used instead. Deferring the value change report to the next tick ensures\n // that the form control value is not being overwritten.\n Promise.resolve().then(() => {\n if (this._selected || wasSelected) {\n this.selected = true;\n this._changeDetector.markForCheck();\n }\n });\n this._inputsInitialized = true;\n }\n\n ngAfterContentInit() {\n setLines(this._lines, this._element);\n }\n\n ngOnDestroy(): void {\n if (this.selected) {\n // We have to delay this until the next tick in order\n // to avoid changed after checked errors.\n Promise.resolve().then(() => {\n this.selected = false;\n });\n }\n\n const hadFocus = this._hasFocus;\n const newActiveItem = this.selectionList._removeOptionFromList(this);\n\n // Only move focus if this option was focused at the time it was destroyed.\n if (hadFocus && newActiveItem) {\n newActiveItem.focus();\n }\n }\n\n /** Toggles the selection state of the option. */\n toggle(): void {\n this.selected = !this.selected;\n }\n\n /** Allows for programmatic focusing of the option. */\n focus(): void {\n this._element.nativeElement.focus();\n }\n\n /**\n * Returns the list item's text label. Implemented as a part of the FocusKeyManager.\n * @docs-private\n */\n getLabel() {\n return this._text ? (this._text.nativeElement.textContent || '') : '';\n }\n\n /** Whether this list item should show a ripple effect when clicked. */\n _isRippleDisabled() {\n return this.disabled || this.disableRipple || this.selectionList.disableRipple;\n }\n\n _handleClick() {\n if (!this.disabled && (this.selectionList.multiple || !this.selected)) {\n this.toggle();\n\n // Emit a change event if the selected state of the option changed through user interaction.\n this.selectionList._emitChangeEvent([this]);\n }\n }\n\n _handleFocus() {\n this.selectionList._setFocusedOption(this);\n this._hasFocus = true;\n }\n\n _handleBlur() {\n this.selectionList._onTouched();\n this._hasFocus = false;\n }\n\n /** Retrieves the DOM element of the component host. */\n _getHostElement(): HTMLElement {\n return this._element.nativeElement;\n }\n\n /** Sets the selected state of the option. Returns whether the value has changed. */\n _setSelected(selected: boolean): boolean {\n if (selected === this._selected) {\n return false;\n }\n\n this._selected = selected;\n\n if (selected) {\n this.selectionList.selectedOptions.select(this);\n } else {\n this.selectionList.selectedOptions.deselect(this);\n }\n\n this.selectedChange.emit(selected);\n this._changeDetector.markForCheck();\n return true;\n }\n\n /**\n * Notifies Angular that the option needs to be checked in the next change detection run. Mainly\n * used to trigger an update of the list option if the disabled state of the selection list\n * changed.\n */\n _markForCheck() {\n this._changeDetector.markForCheck();\n }\n\n static ngAcceptInputType_disabled: BooleanInput;\n static ngAcceptInputType_selected: BooleanInput;\n static ngAcceptInputType_disableRipple: BooleanInput;\n}\n\n\n/**\n * Material Design list component where each item is a selectable option. Behaves as a listbox.\n */\n@Component({\n selector: 'mat-selection-list',\n exportAs: 'matSelectionList',\n inputs: ['disableRipple'],\n host: {\n 'role': 'listbox',\n 'class': 'mat-selection-list mat-list-base',\n '(keydown)': '_keydown($event)',\n '[attr.aria-multiselectable]': 'multiple',\n '[attr.aria-disabled]': 'disabled.toString()',\n '[attr.tabindex]': '_tabIndex',\n },\n template: '<ng-content></ng-content>',\n styleUrls: ['list.css'],\n encapsulation: ViewEncapsulation.None,\n providers: [MAT_SELECTION_LIST_VALUE_ACCESSOR],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class MatSelectionList extends _MatSelectionListBase implements CanDisableRipple,\n AfterContentInit, ControlValueAccessor, OnDestroy, OnChanges {\n private _multiple = true;\n private _contentInitialized = false;\n\n /** The FocusKeyManager which handles focus. */\n _keyManager: FocusKeyManager<MatListOption>;\n\n /** The option components contained within this selection-list. */\n @ContentChildren(MatListOption, {descendants: true}) options: QueryList<MatListOption>;\n\n /** Emits a change event whenever the selected state of an option changes. */\n @Output() readonly selectionChange: EventEmitter<MatSelectionListChange> =\n new EventEmitter<MatSelectionListChange>();\n\n /**\n * Tabindex of the selection list.\n * @breaking-change 11.0.0 Remove `tabIndex` input.\n */\n @Input() tabIndex: number = 0;\n\n /** Theme color of the selection list. This sets the checkbox color for all list options. */\n @Input() color: ThemePalette = 'accent';\n\n /**\n * Function used for comparing an option against the selected value when determining which\n * options should appear as selected. The first argument is the value of an options. The second\n * one is a value from the selected value. A boolean must be returned.\n */\n @Input() compareWith: (o1: any, o2: any) => boolean = (a1, a2) => a1 === a2;\n\n /** Whether the selection list is disabled. */\n @Input()\n get disabled(): boolean { return this._disabled; }\n set disabled(value: boolean) {\n this._disabled = coerceBooleanProperty(value);\n\n // The `MatSelectionList` and `MatListOption` are using the `OnPush` change detection\n // strategy. Therefore the options will not check for any changes if the `MatSelectionList`\n // changed its state. Since we know that a change to `disabled` property of the list affects\n // the state of the options, we manually mark each option for check.\n this._markOptionsForCheck();\n }\n private _disabled: boolean = false;\n\n /** Whether selection is limited to one or multiple items (default multiple). */\n @Input()\n get multiple(): boolean { return this._multiple; }\n set multiple(value: boolean) {\n const newValue = coerceBooleanProperty(value);\n\n if (newValue !== this._multiple) {\n if (this._contentInitialized && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw new Error(\n 'Cannot change `multiple` mode of mat-selection-list after initialization.');\n }\n\n this._multiple = newValue;\n this.selectedOptions = new SelectionModel(this._multiple, this.selectedOptions.selected);\n }\n }\n\n /** The currently selected options. */\n selectedOptions = new SelectionModel<MatListOption>(this._multiple);\n\n /** The tabindex of the selection list. */\n _tabIndex = -1;\n\n /** View to model callback that should be called whenever the selected options change. */\n private _onChange: (value: any) => void = (_: any) => {};\n\n /** Keeps track of the currently-selected value. */\n _value: string[]|null;\n\n /** Emits when the list has been destroyed. */\n private readonly _destroyed = new Subject<void>();\n\n /** View to model callback that should be called if the list or its options lost focus. */\n _onTouched: () => void = () => {};\n\n /** Whether the list has been destroyed. */\n private _isDestroyed: boolean;\n\n constructor(private _element: ElementRef<HTMLElement>,\n // @breaking-change 11.0.0 Remove `tabIndex` parameter.\n @Attribute('tabindex') tabIndex: string,\n private _changeDetector: ChangeDetectorRef,\n // @breaking-change 11.0.0 `_focusMonitor` parameter to become required.\n private _focusMonitor?: FocusMonitor) {\n super();\n }\n\n ngAfterContentInit(): void {\n this._contentInitialized = true;\n\n this._keyManager = new FocusKeyManager<MatListOption>(this.options)\n .withWrap()\n .withTypeAhead()\n .withHomeAndEnd()\n // Allow disabled items to be focusable. For accessibility reasons, there must be a way for\n // screenreader users, that allows reading the different options of the list.\n .skipPredicate(() => false)\n .withAllowedModifierKeys(['shiftKey']);\n\n if (this._value) {\n this._setOptionsFromValues(this._value);\n }\n\n // If the user attempts to tab out of the selection list, allow focus to escape.\n this._keyManager.tabOut.pipe(takeUntil(this._destroyed)).subscribe(() => {\n this._allowFocusEscape();\n });\n\n // When the number of options change, update the tabindex of the selection list.\n this.options.changes.pipe(startWith(null), takeUntil(this._destroyed)).subscribe(() => {\n this._updateTabIndex();\n });\n\n // Sync external changes to the model back to the options.\n this.selectedOptions.changed.pipe(takeUntil(this._destroyed)).subscribe(event => {\n if (event.added) {\n for (let item of event.added) {\n item.selected = true;\n }\n }\n\n if (event.removed) {\n for (let item of event.removed) {\n item.selected = false;\n }\n }\n });\n\n // @breaking-change 11.0.0 Remove null assertion once _focusMonitor is required.\n this._focusMonitor?.monitor(this._element)\n .pipe(takeUntil(this._destroyed))\n .subscribe(origin => {\n if (origin === 'keyboard' || origin === 'program') {\n let toFocus = 0;\n for (let i = 0; i < this.options.length; i++) {\n if (this.options.get(i)?.selected) {\n toFocus = i;\n break;\n }\n }\n this._keyManager.setActiveItem(toFocus);\n }\n });\n }\n\n ngOnChanges(changes: SimpleChanges) {\n const disableRippleChanges = changes['disableRipple'];\n const colorChanges = changes['color'];\n\n if ((disableRippleChanges && !disableRippleChanges.firstChange) ||\n (colorChanges && !colorChanges.firstChange)) {\n this._markOptionsForCheck();\n }\n }\n\n ngOnDestroy() {\n // @breaking-change 11.0.0 Remove null assertion once _focusMonitor is required.\n this._focusMonitor?.stopMonitoring(this._element);\n this._destroyed.next();\n this._destroyed.complete();\n this._isDestroyed = true;\n }\n\n /** Focuses the selection list. */\n focus(options?: FocusOptions) {\n this._element.nativeElement.focus(options);\n }\n\n /** Selects all of the options. Returns the options that changed as a result. */\n selectAll(): MatListOption[] {\n return this._setAllOptionsSelected(true);\n }\n\n /** Deselects all of the options. Returns the options that changed as a result. */\n deselectAll(): MatListOption[] {\n return this._setAllOptionsSelected(false);\n }\n\n /** Sets the focused option of the selection-list. */\n _setFocusedOption(option: MatListOption) {\n this._keyManager.updateActiveItem(option);\n }\n\n /**\n * Removes an option from the selection list and updates the active item.\n * @returns Currently-active item.\n */\n _removeOptionFromList(option: MatListOption): MatListOption | null {\n const optionIndex = this._getOptionIndex(option);\n\n if (optionIndex > -1 && this._keyManager.activeItemIndex === optionIndex) {\n // Check whether the option is the last item\n if (optionIndex > 0) {\n this._keyManager.updateActiveItem(optionIndex - 1);\n } else if (optionIndex === 0 && this.options.length > 1) {\n this._keyManager.updateActiveItem(Math.min(optionIndex + 1, this.options.length - 1));\n }\n }\n\n return this._keyManager.activeItem;\n }\n\n /** Passes relevant key presses to our key manager. */\n _keydown(event: KeyboardEvent) {\n const keyCode = event.keyCode;\n const manager = this._keyManager;\n const previousFocusIndex = manager.activeItemIndex;\n const hasModifier = hasModifierKey(event);\n\n switch (keyCode) {\n case SPACE:\n case ENTER:\n if (!hasModifier && !manager.isTyping()) {\n this._toggleFocusedOption();\n // Always prevent space from scrolling the page since the list has focus\n event.preventDefault();\n }\n break;\n default:\n // The \"A\" key gets special treatment, because it's used for the \"select all\" functionality.\n if (keyCode === A && this.multiple && hasModifierKey(event, 'ctrlKey') &&\n !manager.isTyping()) {\n const shouldSelect = this.options.some(option => !option.disabled && !option.selected);\n this._setAllOptionsSelected(shouldSelect, true, true);\n event.preventDefault();\n } else {\n manager.onKeydown(event);\n }\n }\n\n if (this.multiple && (keyCode === UP_ARROW || keyCode === DOWN_ARROW) && event.shiftKey &&\n manager.activeItemIndex !== previousFocusIndex) {\n this._toggleFocusedOption();\n }\n }\n\n /** Reports a value change to the ControlValueAccessor */\n _reportValueChange() {\n // Stop reporting value changes after the list has been destroyed. This avoids\n // cases where the list might wrongly reset its value once it is removed, but\n // the form control is still live.\n if (this.options && !this._isDestroyed) {\n const value = this._getSelectedOptionValues();\n this._onChange(value);\n this._value = value;\n }\n }\n\n /** Emits a change event if the selected state of an option changed. */\n _emitChangeEvent(options: MatListOption[]) {\n this.selectionChange.emit(new MatSelectionListChange(this, options[0], options));\n }\n\n /** Implemented as part of ControlValueAccessor. */\n writeValue(values: string[]): void {\n this._value = values;\n\n if (this.options) {\n this._setOptionsFromValues(values || []);\n }\n }\n\n /** Implemented as a part of ControlValueAccessor. */\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n }\n\n /** Implemented as part of ControlValueAccessor. */\n registerOnChange(fn: (value: any) => void): void {\n this._onChange = fn;\n }\n\n /** Implemented as part of ControlValueAccessor. */\n registerOnTouched(fn: () => void): void {\n this._onTouched = fn;\n }\n\n /** Sets the selected options based on the specified values. */\n private _setOptionsFromValues(values: string[]) {\n this.options.forEach(option => option._setSelected(false));\n\n values.forEach(value => {\n const correspondingOption = this.options.find(option => {\n // Skip options that are already in the model. This allows us to handle cases\n // where the same primitive value is selected multiple times.\n return option.selected ? false : this.compareWith(option.value, value);\n });\n\n if (correspondingOption) {\n correspondingOption._setSelected(true);\n }\n });\n }\n\n /** Returns the values of the selected options. */\n private _getSelectedOptionValues(): string[] {\n return this.options.filter(option => option.selected).map(option => option.value);\n }\n\n /** Toggles the state of the currently focused option if enabled. */\n private _toggleFocusedOption(): void {\n let focusedIndex = this._keyManager.activeItemIndex;\n\n if (focusedIndex != null && this._isValidIndex(focusedIndex)) {\n let focusedOption: MatListOption = this.options.toArray()[focusedIndex];\n\n if (focusedOption && !focusedOption.disabled && (this._multiple || !focusedOption.selected)) {\n focusedOption.toggle();\n\n // Emit a change event because the focused option changed its state through user\n // interaction.\n this._emitChangeEvent([focusedOption]);\n }\n }\n }\n\n /**\n * Sets the selected state on all of the options\n * and emits an event if anything changed.\n */\n private _setAllOptionsSelected(\n isSelected: boolean,\n skipDisabled?: boolean,\n isUserInput?: boolean): MatListOption[] {\n // Keep track of whether anything changed, because we only want to\n // emit the changed event when something actually changed.\n const changedOptions: MatListOption[] = [];\n\n this.options.forEach(option => {\n if ((!skipDisabled || !option.disabled) && option._setSelected(isSelected)) {\n changedOptions.push(option);\n }\n });\n\n if (changedOptions.length) {\n this._reportValueChange();\n\n if (isUserInput) {\n this._emitChangeEvent(changedOptions);\n }\n }\n\n return changedOptions;\n }\n\n /**\n * Utility to ensure all indexes are valid.\n * @param index The index to be checked.\n * @returns True if the index is valid for our list of options.\n */\n private _isValidIndex(index: number): boolean {\n return index >= 0 && index < this.options.length;\n }\n\n /** Returns the index of the specified list option. */\n private _getOptionIndex(option: MatListOption): number {\n return this.options.toArray().indexOf(option);\n }\n\n /** Marks all the options to be checked in the next change detection run. */\n private _markOptionsForCheck() {\n if (this.options) {\n this.options.forEach(option => option._markForCheck());\n }\n }\n\n /**\n * Removes the tabindex from the selection list and resets it back afterwards, allowing the user\n * to tab out of it. This prevents the list from capturing focus and redirecting it back within\n * the list, creating a focus trap if it user tries to tab away.\n */\n private _allowFocusEscape() {\n this._tabIndex = -1;\n\n setTimeout(() => {\n this._tabIndex = 0;\n this._changeDetector.markForCheck();\n });\n }\n\n /** Updates the tabindex based upon if the selection list is empty. */\n private _updateTabIndex(): void {\n this._tabIndex = (this.options.length === 0) ? -1 : 0;\n }\n\n static ngAcceptInputType_disabled: BooleanInput;\n static ngAcceptInputType_disableRipple: BooleanInput;\n static ngAcceptInputType_multiple: BooleanInput;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {\n MatCommonModule,\n MatLineModule,\n MatPseudoCheckboxModule,\n MatRippleModule,\n} from '@angular/material/core';\nimport {\n MatList,\n MatNavList,\n MatListAvatarCssMatStyler,\n MatListIconCssMatStyler,\n MatListItem,\n MatListSubheaderCssMatStyler,\n} from './list';\nimport {MatListOption, MatSelectionList} from './selection-list';\nimport {MatDividerModule} from '@angular/material/divider';\n\n\n@NgModule({\n imports: [MatLineModule, MatRippleModule, MatCommonModule, MatPseudoCheckboxModule, CommonModule],\n exports: [\n MatList,\n MatNavList,\n MatListItem,\n MatListAvatarCssMatStyler,\n MatLineModule,\n MatCommonModule,\n MatListIconCssMatStyler,\n MatListSubheaderCssMatStyler,\n MatPseudoCheckboxModule,\n MatSelectionList,\n MatListOption,\n MatDividerModule\n ],\n declarations: [\n MatList,\n MatNavList,\n MatListItem,\n MatListAvatarCssMatStyler,\n MatListIconCssMatStyler,\n MatListSubheaderCssMatStyler,\n MatSelectionList,\n MatListOption\n ],\n})\nexport class MatListModule {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './list-module';\nexport * from './list';\nexport * from './selection-list';\n\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;AAsCA;AACA;AACA,MAAM,YAAY,GAAG,aAAa,CAAC,kBAAkB,CAAC;CAAQ,CAAC,CAAC,CAAC;AAEjE;AACA;AACA,MAAM,qBAAqB,GAAG,kBAAkB,CAAC;CAAQ,CAAC,CAAC;AAE3D;;;;;MAKa,QAAQ,GAAG,IAAI,cAAc,CAAU,SAAS,EAAE;AAE/D;;;;;MAKa,YAAY,GAAG,IAAI,cAAc,CAAa,YAAY,EAAE;MAgB5D,UAAW,SAAQ,YAAY;IAd5C;;;QAiBW,kBAAa,GAAG,IAAI,OAAO,EAAQ,CAAC;KAY9C;IAVC,WAAW;QACT,IAAI,CAAC,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uBAON,KAAK;oBAGL,KAAK;0BAOL,KAAK;uBAGL,KAAK;uBAcL,KAAK;;;AC7YR;;;;;;;MAuDa,aAAa;;;YA3BzB,QAAQ,SAAC;gBACR,OAAO,EAAE,CAAC,aAAa,EAAE,eAAe,EAAE,eAAe,EAAE,uBAAuB,EAAE,YAAY,CAAC;gBACjG,OAAO,EAAE;oBACP,OAAO;oBACP,UAAU;oBACV,WAAW;oBACX,yBAAyB;oBACzB,aAAa;oBACb,eAAe;oBACf,uBAAuB;oBACvB,4BAA4B;oBAC5B,uBAAuB;oBACvB,gBAAgB;oBAChB,aAAa;oBACb,gBAAgB;iBACjB;gBACD,YAAY,EAAE;oBACZ,OAAO;oBACP,UAAU;oBACV,WAAW;oBACX,yBAAyB;oBACzB,uBAAuB;oBACvB,4BAA4B;oBAC5B,gBAAgB;oBAChB,aAAa;iBACd;aACF;;;ACtDD;;;;;;;;ACAA;;;;;;"}
|
package/fesm2015/material.js
CHANGED
|
@@ -8,4 +8,9 @@
|
|
|
8
8
|
// primary entry-point which is empty as of version 9. All components should
|
|
9
9
|
// be imported through their individual entry-points. This file is needed to
|
|
10
10
|
// satisfy the "ng_package" bazel rule which also requires a primary entry-point.
|
|
11
|
+
// Workaround for: https://github.com/microsoft/rushstack/issues/2806.
|
|
12
|
+
// This is a private export that can be removed at any time.
|
|
13
|
+
const ɵɵtsModuleIndicatorApiExtractorWorkaround = true;
|
|
14
|
+
|
|
15
|
+
export { ɵɵtsModuleIndicatorApiExtractorWorkaround };
|
|
11
16
|
//# sourceMappingURL=material.js.map
|
package/fesm2015/material.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"material.js","sources":["../../../../../../src/material/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// primary entry-point which is empty as of version 9. All components should\n// be imported through their individual entry-points. This file is needed to\n// satisfy the \"ng_package\" bazel rule which also requires a primary entry-point.\n"],"names":[],"mappings":"AAAA;;;;;;;AAQA;AACA;AACA"}
|
|
1
|
+
{"version":3,"file":"material.js","sources":["../../../../../../src/material/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// primary entry-point which is empty as of version 9. All components should\n// be imported through their individual entry-points. This file is needed to\n// satisfy the \"ng_package\" bazel rule which also requires a primary entry-point.\n\n// Workaround for: https://github.com/microsoft/rushstack/issues/2806.\n// This is a private export that can be removed at any time.\nexport const ɵɵtsModuleIndicatorApiExtractorWorkaround = true;\n"],"names":[],"mappings":"AAAA;;;;;;;AAQA;AACA;AACA;AAEA;AACA;MACa,yCAAyC,GAAG;;;;"}
|
package/fesm2015/menu.js
CHANGED
|
@@ -240,12 +240,18 @@ class MatMenuItem extends _MatMenuItemBase {
|
|
|
240
240
|
* @deprecated `_document` parameter is no longer being used and will be removed.
|
|
241
241
|
* @breaking-change 12.0.0
|
|
242
242
|
*/
|
|
243
|
-
_document, _focusMonitor, _parentMenu
|
|
243
|
+
_document, _focusMonitor, _parentMenu,
|
|
244
|
+
/**
|
|
245
|
+
* @deprecated `_changeDetectorRef` to become a required parameter.
|
|
246
|
+
* @breaking-change 14.0.0
|
|
247
|
+
*/
|
|
248
|
+
_changeDetectorRef) {
|
|
244
249
|
// @breaking-change 8.0.0 make `_focusMonitor` and `document` required params.
|
|
245
250
|
super();
|
|
246
251
|
this._elementRef = _elementRef;
|
|
247
252
|
this._focusMonitor = _focusMonitor;
|
|
248
253
|
this._parentMenu = _parentMenu;
|
|
254
|
+
this._changeDetectorRef = _changeDetectorRef;
|
|
249
255
|
/** ARIA role for the menu item. */
|
|
250
256
|
this.role = 'menuitem';
|
|
251
257
|
/** Stream that emits when the menu item is hovered. */
|
|
@@ -329,6 +335,15 @@ class MatMenuItem extends _MatMenuItemBase {
|
|
|
329
335
|
}
|
|
330
336
|
return ((_b = clone.textContent) === null || _b === void 0 ? void 0 : _b.trim()) || '';
|
|
331
337
|
}
|
|
338
|
+
_setHighlighted(isHighlighted) {
|
|
339
|
+
var _a;
|
|
340
|
+
// We need to mark this for check for the case where the content is coming from a
|
|
341
|
+
// `matMenuContent` whose change detection tree is at the declaration position,
|
|
342
|
+
// not the insertion position. See #23175.
|
|
343
|
+
// @breaking-change 14.0.0 Remove null check for `_changeDetectorRef`.
|
|
344
|
+
this._highlighted = isHighlighted;
|
|
345
|
+
(_a = this._changeDetectorRef) === null || _a === void 0 ? void 0 : _a.markForCheck();
|
|
346
|
+
}
|
|
332
347
|
}
|
|
333
348
|
MatMenuItem.decorators = [
|
|
334
349
|
{ type: Component, args: [{
|
|
@@ -347,14 +362,15 @@ MatMenuItem.decorators = [
|
|
|
347
362
|
},
|
|
348
363
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
349
364
|
encapsulation: ViewEncapsulation.None,
|
|
350
|
-
template: "<ng-content></ng-content>\n<div class=\"mat-menu-ripple\" matRipple\n [matRippleDisabled]=\"disableRipple || disabled\"\n [matRippleTrigger]=\"_getHostElement()\">\n</div>\n"
|
|
365
|
+
template: "<ng-content></ng-content>\n<div class=\"mat-menu-ripple\" matRipple\n [matRippleDisabled]=\"disableRipple || disabled\"\n [matRippleTrigger]=\"_getHostElement()\">\n</div>\n\n<svg\n *ngIf=\"_triggersSubmenu\"\n class=\"mat-menu-submenu-icon\"\n viewBox=\"0 0 5 10\"\n focusable=\"false\"><polygon points=\"0,0 5,5 0,10\"/></svg>\n"
|
|
351
366
|
},] }
|
|
352
367
|
];
|
|
353
368
|
MatMenuItem.ctorParameters = () => [
|
|
354
369
|
{ type: ElementRef },
|
|
355
370
|
{ type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] },
|
|
356
371
|
{ type: FocusMonitor },
|
|
357
|
-
{ type: undefined, decorators: [{ type: Inject, args: [MAT_MENU_PANEL,] }, { type: Optional }] }
|
|
372
|
+
{ type: undefined, decorators: [{ type: Inject, args: [MAT_MENU_PANEL,] }, { type: Optional }] },
|
|
373
|
+
{ type: ChangeDetectorRef }
|
|
358
374
|
];
|
|
359
375
|
MatMenuItem.propDecorators = {
|
|
360
376
|
role: [{ type: Input }],
|
|
@@ -723,7 +739,7 @@ MatMenu.decorators = [
|
|
|
723
739
|
providers: [
|
|
724
740
|
{ provide: MAT_MENU_PANEL, useExisting: MatMenu },
|
|
725
741
|
],
|
|
726
|
-
styles: ["mat-menu{display:none}.mat-menu-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;max-height:calc(100vh - 48px);border-radius:4px;outline:0;min-height:64px}.mat-menu-panel.ng-animating{pointer-events:none}.cdk-high-contrast-active .mat-menu-panel{outline:solid 1px}.mat-menu-content:not(:empty){padding-top:8px;padding-bottom:8px}.mat-menu-item{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;line-height:48px;height:48px;padding:0 16px;text-align:left;text-decoration:none;max-width:100%;position:relative}.mat-menu-item::-moz-focus-inner{border:0}.mat-menu-item[disabled]{cursor:default}[dir=rtl] .mat-menu-item{text-align:right}.mat-menu-item .mat-icon{margin-right:16px;vertical-align:middle}.mat-menu-item .mat-icon svg{vertical-align:top}[dir=rtl] .mat-menu-item .mat-icon{margin-left:16px;margin-right:0}.mat-menu-item[disabled]{pointer-events:none}.cdk-high-contrast-active .mat-menu-item{margin-top:1px}.cdk-high-contrast-active .mat-menu-item.cdk-program-focused,.cdk-high-contrast-active .mat-menu-item.cdk-keyboard-focused,.cdk-high-contrast-active .mat-menu-item-highlighted{outline:dotted 1px}.mat-menu-item-submenu-trigger{padding-right:32px}.mat-menu-item-submenu-trigger
|
|
742
|
+
styles: ["mat-menu{display:none}.mat-menu-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;max-height:calc(100vh - 48px);border-radius:4px;outline:0;min-height:64px}.mat-menu-panel.ng-animating{pointer-events:none}.cdk-high-contrast-active .mat-menu-panel{outline:solid 1px}.mat-menu-content:not(:empty){padding-top:8px;padding-bottom:8px}.mat-menu-item{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;line-height:48px;height:48px;padding:0 16px;text-align:left;text-decoration:none;max-width:100%;position:relative}.mat-menu-item::-moz-focus-inner{border:0}.mat-menu-item[disabled]{cursor:default}[dir=rtl] .mat-menu-item{text-align:right}.mat-menu-item .mat-icon{margin-right:16px;vertical-align:middle}.mat-menu-item .mat-icon svg{vertical-align:top}[dir=rtl] .mat-menu-item .mat-icon{margin-left:16px;margin-right:0}.mat-menu-item[disabled]{pointer-events:none}.cdk-high-contrast-active .mat-menu-item{margin-top:1px}.cdk-high-contrast-active .mat-menu-item.cdk-program-focused,.cdk-high-contrast-active .mat-menu-item.cdk-keyboard-focused,.cdk-high-contrast-active .mat-menu-item-highlighted{outline:dotted 1px}.mat-menu-item-submenu-trigger{padding-right:32px}[dir=rtl] .mat-menu-item-submenu-trigger{padding-right:16px;padding-left:32px}.mat-menu-submenu-icon{position:absolute;top:50%;right:16px;transform:translateY(-50%);width:5px;height:10px;fill:currentColor}[dir=rtl] .mat-menu-submenu-icon{right:auto;left:16px;transform:translateY(-50%) scaleX(-1)}.cdk-high-contrast-active .mat-menu-submenu-icon{fill:CanvasText}button.mat-menu-item{width:100%}.mat-menu-item .mat-menu-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}\n"]
|
|
727
743
|
},] }
|
|
728
744
|
];
|
|
729
745
|
MatMenu.ctorParameters = () => [
|
|
@@ -991,7 +1007,7 @@ class MatMenuTrigger {
|
|
|
991
1007
|
this._menuOpen = isOpen;
|
|
992
1008
|
this._menuOpen ? this.menuOpened.emit() : this.menuClosed.emit();
|
|
993
1009
|
if (this.triggersSubmenu()) {
|
|
994
|
-
this._menuItemInstance.
|
|
1010
|
+
this._menuItemInstance._setHighlighted(isOpen);
|
|
995
1011
|
}
|
|
996
1012
|
}
|
|
997
1013
|
/**
|