@angular/material-experimental 13.1.2 → 13.1.3
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/esm2020/mdc-button/button-base.mjs +17 -14
- package/esm2020/mdc-core/option/option.mjs +1 -1
- package/esm2020/mdc-input/input.mjs +3 -2
- package/esm2020/mdc-snack-bar/module.mjs +4 -4
- package/esm2020/mdc-snack-bar/public-api.mjs +2 -2
- package/esm2020/mdc-snack-bar/simple-snack-bar.mjs +7 -7
- package/esm2020/mdc-snack-bar/snack-bar.mjs +24 -10
- package/esm2020/version.mjs +1 -1
- package/fesm2015/material-experimental.mjs +1 -1
- package/fesm2015/material-experimental.mjs.map +1 -1
- package/fesm2015/mdc-button.mjs +16 -13
- package/fesm2015/mdc-button.mjs.map +1 -1
- package/fesm2015/mdc-core.mjs.map +1 -1
- package/fesm2015/mdc-input.mjs +2 -1
- package/fesm2015/mdc-input.mjs.map +1 -1
- package/fesm2015/mdc-snack-bar.mjs +29 -24
- package/fesm2015/mdc-snack-bar.mjs.map +1 -1
- package/fesm2020/material-experimental.mjs +1 -1
- package/fesm2020/material-experimental.mjs.map +1 -1
- package/fesm2020/mdc-button.mjs +16 -13
- package/fesm2020/mdc-button.mjs.map +1 -1
- package/fesm2020/mdc-core.mjs.map +1 -1
- package/fesm2020/mdc-input.mjs +2 -1
- package/fesm2020/mdc-input.mjs.map +1 -1
- package/fesm2020/mdc-snack-bar.mjs +27 -17
- package/fesm2020/mdc-snack-bar.mjs.map +1 -1
- package/mdc-button/button-base.d.ts +5 -3
- package/mdc-checkbox/_checkbox-theme.scss +12 -9
- package/mdc-core/option/option.d.ts +3 -3
- package/mdc-snack-bar/module.d.ts +1 -1
- package/mdc-snack-bar/public-api.d.ts +1 -1
- package/mdc-snack-bar/simple-snack-bar.d.ts +4 -4
- package/mdc-snack-bar/snack-bar.d.ts +17 -5
- package/mdc-theming/prebuilt/deeppurple-amber.css +1 -1
- package/mdc-theming/prebuilt/indigo-pink.css +1 -1
- package/mdc-theming/prebuilt/pink-bluegrey.css +1 -1
- package/mdc-theming/prebuilt/purple-green.css +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mdc-core.mjs","sources":["../../../../../../src/material-experimental/mdc-core/option/optgroup.ts","../../../../../../src/material-experimental/mdc-core/option/optgroup.html","../../../../../../src/material-experimental/mdc-core/option/option.ts","../../../../../../src/material-experimental/mdc-core/option/option.html","../../../../../../src/material-experimental/mdc-core/option/index.ts","../../../../../../src/material-experimental/mdc-core/public-api.ts","../../../../../../src/material-experimental/mdc-core/index.ts","../../../../../../src/material-experimental/mdc-core/mdc-core_public_index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Component, ViewEncapsulation, ChangeDetectionStrategy} from '@angular/core';\nimport {_MatOptgroupBase, MAT_OPTGROUP} from '@angular/material/core';\n\n// Notes on the accessibility pattern used for `mat-optgroup`.\n// The option group has two different \"modes\": regular and inert. The regular mode uses the\n// recommended a11y pattern which has `role=\"group\"` on the group element with `aria-labelledby`\n// pointing to the label. This works for `mat-select`, but it seems to hit a bug for autocomplete\n// under VoiceOver where the group doesn't get read out at all. The bug appears to be that if\n// there's __any__ a11y-related attribute on the group (e.g. `role` or `aria-labelledby`),\n// VoiceOver on Safari won't read it out.\n// We've introduced the `inert` mode as a workaround. Under this mode, all a11y attributes are\n// removed from the group, and we get the screen reader to read out the group label by mirroring it\n// inside an invisible element in the option. This is sub-optimal, because the screen reader will\n// repeat the group label on each navigation, whereas the default pattern only reads the group when\n// the user enters a new group. The following alternate approaches were considered:\n// 1. Reading out the group label using the `LiveAnnouncer` solves the problem, but we can't control\n// when the text will be read out so sometimes it comes in too late or never if the user\n// navigates quickly.\n// 2. `<mat-option aria-describedby=\"groupLabel\"` - This works on Safari, but VoiceOver in Chrome\n// won't read out the description at all.\n// 3. `<mat-option aria-labelledby=\"optionLabel groupLabel\"` - This works on Chrome, but Safari\n// doesn't read out the text at all. Furthermore, on\n\n/**\n * Component that is used to group instances of `mat-option`.\n */\n@Component({\n selector: 'mat-optgroup',\n exportAs: 'matOptgroup',\n templateUrl: 'optgroup.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n inputs: ['disabled'],\n styleUrls: ['optgroup.css'],\n host: {\n 'class': 'mat-mdc-optgroup',\n '[attr.role]': '_inert ? null : \"group\"',\n '[attr.aria-disabled]': '_inert ? null : disabled.toString()',\n '[attr.aria-labelledby]': '_inert ? null : _labelId',\n },\n providers: [{provide: MAT_OPTGROUP, useExisting: MatOptgroup}],\n})\nexport class MatOptgroup extends _MatOptgroupBase {}\n","<span\n class=\"mat-mdc-optgroup-label\"\n aria-hidden=\"true\"\n [class.mdc-list-item--disabled]=\"disabled\"\n [id]=\"_labelId\">\n <span class=\"mdc-list-item__primary-text\">{{ label }} <ng-content></ng-content></span>\n</span>\n\n<ng-content select=\"mat-option, ng-container\"></ng-content>\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 {\n Component,\n ViewEncapsulation,\n ChangeDetectionStrategy,\n ElementRef,\n ChangeDetectorRef,\n Optional,\n Inject,\n} from '@angular/core';\nimport {\n _MatOptionBase,\n MAT_OPTION_PARENT_COMPONENT,\n MatOptionParentComponent,\n MAT_OPTGROUP,\n} from '@angular/material/core';\nimport {MatOptgroup} from './optgroup';\n\n/**\n * Single option inside of a `<mat-select>` element.\n */\n@Component({\n selector: 'mat-option',\n exportAs: 'matOption',\n host: {\n 'role': 'option',\n '[attr.tabindex]': '_getTabIndex()',\n '[class.mdc-list-item--selected]': 'selected',\n '[class.mat-mdc-option-multiple]': 'multiple',\n '[class.mat-mdc-option-active]': 'active',\n '[class.mdc-list-item--disabled]': 'disabled',\n '[id]': 'id',\n '[attr.aria-selected]': '_getAriaSelected()',\n '[attr.aria-disabled]': 'disabled.toString()',\n '(click)': '_selectViaInteraction()',\n '(keydown)': '_handleKeydown($event)',\n 'class': 'mat-mdc-option mat-mdc-focus-indicator mdc-list-item',\n },\n styleUrls: ['option.css'],\n templateUrl: 'option.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MatOption extends _MatOptionBase {\n constructor(\n element: ElementRef<HTMLElement>,\n changeDetectorRef: ChangeDetectorRef,\n @Optional() @Inject(MAT_OPTION_PARENT_COMPONENT) parent: MatOptionParentComponent,\n @Optional() @Inject(MAT_OPTGROUP) group: MatOptgroup,\n ) {\n super(element, changeDetectorRef, parent, group);\n }\n}\n","<mat-pseudo-checkbox *ngIf=\"multiple\" class=\"mat-mdc-option-pseudo-checkbox\"\n [state]=\"selected ? 'checked' : 'unchecked'\" [disabled]=\"disabled\"></mat-pseudo-checkbox>\n\n<span class=\"mdc-list-item__primary-text\"><ng-content></ng-content></span>\n\n<!-- See a11y notes inside optgroup.ts for context behind this element. -->\n<span class=\"cdk-visually-hidden\" *ngIf=\"group && group._inert\">({{ group.label }})</span>\n\n<div class=\"mat-mdc-option-ripple\" mat-ripple\n [matRippleTrigger]=\"_getHostElement()\"\n [matRippleDisabled]=\"disabled || disableRipple\">\n</div>\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {NgModule} from '@angular/core';\nimport {CommonModule} from '@angular/common';\nimport {MatRippleModule, MatPseudoCheckboxModule} from '@angular/material/core';\nimport {MatOption} from './option';\nimport {MatOptgroup} from './optgroup';\n\n@NgModule({\n imports: [MatRippleModule, CommonModule, MatPseudoCheckboxModule],\n exports: [MatOption, MatOptgroup],\n declarations: [MatOption, MatOptgroup],\n})\nexport class MatOptionModule {}\n\nexport * from './option';\nexport * from './optgroup';\nexport {\n MatOptionSelectionChange,\n MatOptionParentComponent,\n MAT_OPTION_PARENT_COMPONENT,\n _countGroupLabelsBeforeOption,\n _getOptionScrollPosition,\n} from '@angular/material/core';\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 './option/index';\nexport {\n AnimationCurves,\n AnimationDurations,\n CanColor,\n CanDisable,\n CanDisableRipple,\n CanUpdateErrorState,\n DateAdapter,\n defaultRippleAnimationConfig,\n ErrorStateMatcher,\n GranularSanityChecks,\n HasInitialized,\n HasTabIndex,\n MAT_DATE_FORMATS,\n MAT_DATE_LOCALE,\n MAT_DATE_LOCALE_FACTORY,\n MAT_NATIVE_DATE_FORMATS,\n MAT_OPTGROUP,\n MAT_RIPPLE_GLOBAL_OPTIONS,\n MatCommonModule,\n MatDateFormats,\n MATERIAL_SANITY_CHECKS,\n MatLine,\n MatLineModule,\n MatNativeDateModule,\n MatPseudoCheckbox,\n MatPseudoCheckboxModule,\n MatPseudoCheckboxState,\n MatRipple,\n MatRippleModule,\n mixinColor,\n mixinDisabled,\n mixinDisableRipple,\n mixinErrorState,\n mixinInitialized,\n mixinTabIndex,\n NativeDateAdapter,\n NativeDateModule,\n RippleAnimationConfig,\n RippleConfig,\n RippleGlobalOptions,\n RippleRef,\n RippleRenderer,\n RippleState,\n RippleTarget,\n SanityChecks,\n setLines,\n ShowOnDirtyErrorStateMatcher,\n ThemePalette,\n VERSION,\n // Note: These need to be exposed privately for cross-package type inference. e.g. if the\n // experimental package uses a mixin, TS will try to write an explicit type reference that\n // is equivalent to e.g. `CanColorCtor`. For this it needs these two helpers as otherwise it\n // would generate a deep cross-package import that breaks in the NPM package output.\n _AbstractConstructor,\n _Constructor,\n} from '@angular/material/core';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './public-api';\n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qBAAqB;wBAC7C,SAAS,EAAE,yBAAyB;wBACpC,WAAW,EAAE,wBAAwB;wBACrC,OAAO,EAAE,sDAAsD;qBAChE,iBAGc,iBAAiB,CAAC,IAAI,mBACpB,uBAAuB,CAAC,MAAM;;0BAM5C,QAAQ;;0BAAI,MAAM;2BAAC,2BAA2B;;0BAC9C,QAAQ;;0BAAI,MAAM;2BAAC,YAAY;;;AEvDpC;;;;;;;MAmBa,eAAe;;4GAAf,eAAe;6GAAf,eAAe,iBAFX,SAAS,EAAE,WAAW,aAF3B,eAAe,EAAE,YAAY,EAAE,uBAAuB,aACtD,SAAS,EAAE,WAAW;6GAGrB,eAAe,YAJjB,CAAC,eAAe,EAAE,YAAY,EAAE,uBAAuB,CAAC;2FAItD,eAAe;kBAL3B,QAAQ;mBAAC;oBACR,OAAO,EAAE,CAAC,eAAe,EAAE,YAAY,EAAE,uBAAuB,CAAC;oBACjE,OAAO,EAAE,CAAC,SAAS,EAAE,WAAW,CAAC;oBACjC,YAAY,EAAE,CAAC,SAAS,EAAE,WAAW,CAAC;iBACvC;;;AClBD;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;"}
|
|
1
|
+
{"version":3,"file":"mdc-core.mjs","sources":["../../../../../../src/material-experimental/mdc-core/option/optgroup.ts","../../../../../../src/material-experimental/mdc-core/option/optgroup.html","../../../../../../src/material-experimental/mdc-core/option/option.ts","../../../../../../src/material-experimental/mdc-core/option/option.html","../../../../../../src/material-experimental/mdc-core/option/index.ts","../../../../../../src/material-experimental/mdc-core/public-api.ts","../../../../../../src/material-experimental/mdc-core/index.ts","../../../../../../src/material-experimental/mdc-core/mdc-core_public_index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Component, ViewEncapsulation, ChangeDetectionStrategy} from '@angular/core';\nimport {_MatOptgroupBase, MAT_OPTGROUP} from '@angular/material/core';\n\n// Notes on the accessibility pattern used for `mat-optgroup`.\n// The option group has two different \"modes\": regular and inert. The regular mode uses the\n// recommended a11y pattern which has `role=\"group\"` on the group element with `aria-labelledby`\n// pointing to the label. This works for `mat-select`, but it seems to hit a bug for autocomplete\n// under VoiceOver where the group doesn't get read out at all. The bug appears to be that if\n// there's __any__ a11y-related attribute on the group (e.g. `role` or `aria-labelledby`),\n// VoiceOver on Safari won't read it out.\n// We've introduced the `inert` mode as a workaround. Under this mode, all a11y attributes are\n// removed from the group, and we get the screen reader to read out the group label by mirroring it\n// inside an invisible element in the option. This is sub-optimal, because the screen reader will\n// repeat the group label on each navigation, whereas the default pattern only reads the group when\n// the user enters a new group. The following alternate approaches were considered:\n// 1. Reading out the group label using the `LiveAnnouncer` solves the problem, but we can't control\n// when the text will be read out so sometimes it comes in too late or never if the user\n// navigates quickly.\n// 2. `<mat-option aria-describedby=\"groupLabel\"` - This works on Safari, but VoiceOver in Chrome\n// won't read out the description at all.\n// 3. `<mat-option aria-labelledby=\"optionLabel groupLabel\"` - This works on Chrome, but Safari\n// doesn't read out the text at all. Furthermore, on\n\n/**\n * Component that is used to group instances of `mat-option`.\n */\n@Component({\n selector: 'mat-optgroup',\n exportAs: 'matOptgroup',\n templateUrl: 'optgroup.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n inputs: ['disabled'],\n styleUrls: ['optgroup.css'],\n host: {\n 'class': 'mat-mdc-optgroup',\n '[attr.role]': '_inert ? null : \"group\"',\n '[attr.aria-disabled]': '_inert ? null : disabled.toString()',\n '[attr.aria-labelledby]': '_inert ? null : _labelId',\n },\n providers: [{provide: MAT_OPTGROUP, useExisting: MatOptgroup}],\n})\nexport class MatOptgroup extends _MatOptgroupBase {}\n","<span\n class=\"mat-mdc-optgroup-label\"\n aria-hidden=\"true\"\n [class.mdc-list-item--disabled]=\"disabled\"\n [id]=\"_labelId\">\n <span class=\"mdc-list-item__primary-text\">{{ label }} <ng-content></ng-content></span>\n</span>\n\n<ng-content select=\"mat-option, ng-container\"></ng-content>\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 {\n Component,\n ViewEncapsulation,\n ChangeDetectionStrategy,\n ElementRef,\n ChangeDetectorRef,\n Optional,\n Inject,\n} from '@angular/core';\nimport {\n _MatOptionBase,\n MAT_OPTION_PARENT_COMPONENT,\n MatOptionParentComponent,\n MAT_OPTGROUP,\n} from '@angular/material/core';\nimport {MatOptgroup} from './optgroup';\n\n/**\n * Single option inside of a `<mat-select>` element.\n */\n@Component({\n selector: 'mat-option',\n exportAs: 'matOption',\n host: {\n 'role': 'option',\n '[attr.tabindex]': '_getTabIndex()',\n '[class.mdc-list-item--selected]': 'selected',\n '[class.mat-mdc-option-multiple]': 'multiple',\n '[class.mat-mdc-option-active]': 'active',\n '[class.mdc-list-item--disabled]': 'disabled',\n '[id]': 'id',\n '[attr.aria-selected]': '_getAriaSelected()',\n '[attr.aria-disabled]': 'disabled.toString()',\n '(click)': '_selectViaInteraction()',\n '(keydown)': '_handleKeydown($event)',\n 'class': 'mat-mdc-option mat-mdc-focus-indicator mdc-list-item',\n },\n styleUrls: ['option.css'],\n templateUrl: 'option.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MatOption<T = any> extends _MatOptionBase<T> {\n constructor(\n element: ElementRef<HTMLElement>,\n changeDetectorRef: ChangeDetectorRef,\n @Optional() @Inject(MAT_OPTION_PARENT_COMPONENT) parent: MatOptionParentComponent,\n @Optional() @Inject(MAT_OPTGROUP) group: MatOptgroup,\n ) {\n super(element, changeDetectorRef, parent, group);\n }\n}\n","<mat-pseudo-checkbox *ngIf=\"multiple\" class=\"mat-mdc-option-pseudo-checkbox\"\n [state]=\"selected ? 'checked' : 'unchecked'\" [disabled]=\"disabled\"></mat-pseudo-checkbox>\n\n<span class=\"mdc-list-item__primary-text\"><ng-content></ng-content></span>\n\n<!-- See a11y notes inside optgroup.ts for context behind this element. -->\n<span class=\"cdk-visually-hidden\" *ngIf=\"group && group._inert\">({{ group.label }})</span>\n\n<div class=\"mat-mdc-option-ripple\" mat-ripple\n [matRippleTrigger]=\"_getHostElement()\"\n [matRippleDisabled]=\"disabled || disableRipple\">\n</div>\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {NgModule} from '@angular/core';\nimport {CommonModule} from '@angular/common';\nimport {MatRippleModule, MatPseudoCheckboxModule} from '@angular/material/core';\nimport {MatOption} from './option';\nimport {MatOptgroup} from './optgroup';\n\n@NgModule({\n imports: [MatRippleModule, CommonModule, MatPseudoCheckboxModule],\n exports: [MatOption, MatOptgroup],\n declarations: [MatOption, MatOptgroup],\n})\nexport class MatOptionModule {}\n\nexport * from './option';\nexport * from './optgroup';\nexport {\n MatOptionSelectionChange,\n MatOptionParentComponent,\n MAT_OPTION_PARENT_COMPONENT,\n _countGroupLabelsBeforeOption,\n _getOptionScrollPosition,\n} from '@angular/material/core';\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 './option/index';\nexport {\n AnimationCurves,\n AnimationDurations,\n CanColor,\n CanDisable,\n CanDisableRipple,\n CanUpdateErrorState,\n DateAdapter,\n defaultRippleAnimationConfig,\n ErrorStateMatcher,\n GranularSanityChecks,\n HasInitialized,\n HasTabIndex,\n MAT_DATE_FORMATS,\n MAT_DATE_LOCALE,\n MAT_DATE_LOCALE_FACTORY,\n MAT_NATIVE_DATE_FORMATS,\n MAT_OPTGROUP,\n MAT_RIPPLE_GLOBAL_OPTIONS,\n MatCommonModule,\n MatDateFormats,\n MATERIAL_SANITY_CHECKS,\n MatLine,\n MatLineModule,\n MatNativeDateModule,\n MatPseudoCheckbox,\n MatPseudoCheckboxModule,\n MatPseudoCheckboxState,\n MatRipple,\n MatRippleModule,\n mixinColor,\n mixinDisabled,\n mixinDisableRipple,\n mixinErrorState,\n mixinInitialized,\n mixinTabIndex,\n NativeDateAdapter,\n NativeDateModule,\n RippleAnimationConfig,\n RippleConfig,\n RippleGlobalOptions,\n RippleRef,\n RippleRenderer,\n RippleState,\n RippleTarget,\n SanityChecks,\n setLines,\n ShowOnDirtyErrorStateMatcher,\n ThemePalette,\n VERSION,\n // Note: These need to be exposed privately for cross-package type inference. e.g. if the\n // experimental package uses a mixin, TS will try to write an explicit type reference that\n // is equivalent to e.g. `CanColorCtor`. For this it needs these two helpers as otherwise it\n // would generate a deep cross-package import that breaks in the NPM package output.\n _AbstractConstructor,\n _Constructor,\n} from '@angular/material/core';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './public-api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAAA;;;;;;;AAWA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;;;MAmBa,WAAY,SAAQ,gBAAgB;;wGAApC,WAAW;4FAAX,WAAW,kSAFX,CAAC,EAAC,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,WAAW,EAAC,CAAC,4EChDhE,iTASA;2FDyCa,WAAW;kBAhBvB,SAAS;+BACE,cAAc,YACd,aAAa,iBAER,iBAAiB,CAAC,IAAI,mBACpB,uBAAuB,CAAC,MAAM,UACvC,CAAC,UAAU,CAAC,QAEd;wBACJ,OAAO,EAAE,kBAAkB;wBAC3B,aAAa,EAAE,yBAAyB;wBACxC,sBAAsB,EAAE,qCAAqC;wBAC7D,wBAAwB,EAAE,0BAA0B;qBACrD,aACU,CAAC,EAAC,OAAO,EAAE,YAAY,EAAE,WAA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C,SAAS,EAAE,WAAW,CAAC;iBACvC;;;AClBD;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;"}
|
package/fesm2020/mdc-input.mjs
CHANGED
|
@@ -20,7 +20,7 @@ import { MatFormFieldModule } from '@angular/material-experimental/mdc-form-fiel
|
|
|
20
20
|
class MatInput extends MatInput$1 {
|
|
21
21
|
}
|
|
22
22
|
MatInput.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: MatInput, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
23
|
-
MatInput.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.0", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl],\n input[matNativeControl], textarea[matNativeControl]", host: { properties: { "class.mat-form-field-autofill-control": "false", "class.mat-input-element": "false", "class.mat-form-field-control": "false", "class.mat-native-select-inline": "false", "class.mat-input-server": "_isServer", "class.mat-mdc-form-field-textarea-control": "_isInFormField && _isTextarea", "class.mat-mdc-form-field-input-control": "_isInFormField", "class.mdc-text-field__input": "_isInFormField", "class.mat-mdc-native-select-inline": "_isInlineSelect()", "id": "id", "disabled": "disabled", "required": "required", "attr.placeholder": "placeholder", "attr.readonly": "readonly && !_isNativeSelect || null", "attr.aria-invalid": "(empty && required) ? null : errorState", "attr.aria-required": "required" }, classAttribute: "mat-mdc-input-element" }, providers: [{ provide: MatFormFieldControl, useExisting: MatInput }], exportAs: ["matInput"], usesInheritance: true, ngImport: i0 });
|
|
23
|
+
MatInput.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.0", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl],\n input[matNativeControl], textarea[matNativeControl]", host: { properties: { "class.mat-form-field-autofill-control": "false", "class.mat-input-element": "false", "class.mat-form-field-control": "false", "class.mat-native-select-inline": "false", "class.mat-input-server": "_isServer", "class.mat-mdc-form-field-textarea-control": "_isInFormField && _isTextarea", "class.mat-mdc-form-field-input-control": "_isInFormField", "class.mdc-text-field__input": "_isInFormField", "class.mat-mdc-native-select-inline": "_isInlineSelect()", "id": "id", "disabled": "disabled", "required": "required", "attr.name": "name", "attr.placeholder": "placeholder", "attr.readonly": "readonly && !_isNativeSelect || null", "attr.aria-invalid": "(empty && required) ? null : errorState", "attr.aria-required": "required" }, classAttribute: "mat-mdc-input-element" }, providers: [{ provide: MatFormFieldControl, useExisting: MatInput }], exportAs: ["matInput"], usesInheritance: true, ngImport: i0 });
|
|
24
24
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: MatInput, decorators: [{
|
|
25
25
|
type: Directive,
|
|
26
26
|
args: [{
|
|
@@ -46,6 +46,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.0", ngImpor
|
|
|
46
46
|
'[id]': 'id',
|
|
47
47
|
'[disabled]': 'disabled',
|
|
48
48
|
'[required]': 'required',
|
|
49
|
+
'[attr.name]': 'name',
|
|
49
50
|
'[attr.placeholder]': 'placeholder',
|
|
50
51
|
'[attr.readonly]': 'readonly && !_isNativeSelect || null',
|
|
51
52
|
// Only mark the input as invalid for assistive technology if it has a value since the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mdc-input.mjs","sources":["../../../../../../src/material-experimental/mdc-input/input.ts","../../../../../../src/material-experimental/mdc-input/module.ts","../../../../../../src/material-experimental/mdc-input/public-api.ts","../../../../../../src/material-experimental/mdc-input/index.ts","../../../../../../src/material-experimental/mdc-input/mdc-input_public_index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive} from '@angular/core';\nimport {MatFormFieldControl} from '@angular/material/form-field';\nimport {MatInput as BaseMatInput} from '@angular/material/input';\n\n// workaround until we have feature targeting for MDC text-field. At that\n// point we can just use the actual \"MatInput\" class and apply the MDC text-field\n// styles appropriately.\n\n@Directive({\n selector: `input[matInput], textarea[matInput], select[matNativeControl],\n input[matNativeControl], textarea[matNativeControl]`,\n exportAs: 'matInput',\n host: {\n 'class': 'mat-mdc-input-element',\n // The BaseMatInput parent class adds `mat-input-element`, `mat-form-field-control` and\n // `mat-form-field-autofill-control` to the CSS class list, but this should not be added for\n // this MDC equivalent input.\n '[class.mat-form-field-autofill-control]': 'false',\n '[class.mat-input-element]': 'false',\n '[class.mat-form-field-control]': 'false',\n '[class.mat-native-select-inline]': 'false',\n '[class.mat-input-server]': '_isServer',\n '[class.mat-mdc-form-field-textarea-control]': '_isInFormField && _isTextarea',\n '[class.mat-mdc-form-field-input-control]': '_isInFormField',\n '[class.mdc-text-field__input]': '_isInFormField',\n '[class.mat-mdc-native-select-inline]': '_isInlineSelect()',\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 '[id]': 'id',\n '[disabled]': 'disabled',\n '[required]': 'required',\n '[attr.placeholder]': 'placeholder',\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 BaseMatInput {}\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 {MatCommonModule} from '@angular/material-experimental/mdc-core';\nimport {MatFormFieldModule} from '@angular/material-experimental/mdc-form-field';\nimport {MatInput} from './input';\n\n@NgModule({\n imports: [MatCommonModule, MatFormFieldModule],\n exports: [MatInput, MatFormFieldModule, TextFieldModule, MatCommonModule],\n declarations: [MatInput],\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 {MatInput} from './input';\nexport {MatInputModule} from './module';\nexport {getMatInputUnsupportedTypeError, MAT_INPUT_VALUE_ACCESSOR} from '@angular/material/input';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './public-api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["BaseMatInput"],"mappings":";;;;;;;;;AAAA;;;;;;;AAYA;AACA;AACA;
|
|
1
|
+
{"version":3,"file":"mdc-input.mjs","sources":["../../../../../../src/material-experimental/mdc-input/input.ts","../../../../../../src/material-experimental/mdc-input/module.ts","../../../../../../src/material-experimental/mdc-input/public-api.ts","../../../../../../src/material-experimental/mdc-input/index.ts","../../../../../../src/material-experimental/mdc-input/mdc-input_public_index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive} from '@angular/core';\nimport {MatFormFieldControl} from '@angular/material/form-field';\nimport {MatInput as BaseMatInput} from '@angular/material/input';\n\n// workaround until we have feature targeting for MDC text-field. At that\n// point we can just use the actual \"MatInput\" class and apply the MDC text-field\n// styles appropriately.\n\n@Directive({\n selector: `input[matInput], textarea[matInput], select[matNativeControl],\n input[matNativeControl], textarea[matNativeControl]`,\n exportAs: 'matInput',\n host: {\n 'class': 'mat-mdc-input-element',\n // The BaseMatInput parent class adds `mat-input-element`, `mat-form-field-control` and\n // `mat-form-field-autofill-control` to the CSS class list, but this should not be added for\n // this MDC equivalent input.\n '[class.mat-form-field-autofill-control]': 'false',\n '[class.mat-input-element]': 'false',\n '[class.mat-form-field-control]': 'false',\n '[class.mat-native-select-inline]': 'false',\n '[class.mat-input-server]': '_isServer',\n '[class.mat-mdc-form-field-textarea-control]': '_isInFormField && _isTextarea',\n '[class.mat-mdc-form-field-input-control]': '_isInFormField',\n '[class.mdc-text-field__input]': '_isInFormField',\n '[class.mat-mdc-native-select-inline]': '_isInlineSelect()',\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 '[id]': 'id',\n '[disabled]': 'disabled',\n '[required]': 'required',\n '[attr.name]': 'name',\n '[attr.placeholder]': 'placeholder',\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 BaseMatInput {}\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 {MatCommonModule} from '@angular/material-experimental/mdc-core';\nimport {MatFormFieldModule} from '@angular/material-experimental/mdc-form-field';\nimport {MatInput} from './input';\n\n@NgModule({\n imports: [MatCommonModule, MatFormFieldModule],\n exports: [MatInput, MatFormFieldModule, TextFieldModule, MatCommonModule],\n declarations: [MatInput],\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 {MatInput} from './input';\nexport {MatInputModule} from './module';\nexport {getMatInputUnsupportedTypeError, MAT_INPUT_VALUE_ACCESSOR} from '@angular/material/input';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './public-api';\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B,QAAQ;mBAAC;oBACR,OAAO,EAAE,CAAC,eAAe,EAAE,kBAAkB,CAAC;oBAC9C,OAAO,EAAE,CAAC,QAAQ,EAAE,kBAAkB,EAAE,eAAe,EAAE,eAAe,CAAC;oBACzE,YAAY,EAAE,CAAC,QAAQ,CAAC;iBACzB;;;AClBD;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Directive, Component, ViewEncapsulation, ChangeDetectionStrategy, Inject, Optional, ViewChild, NgModule, Injectable } from '@angular/core';
|
|
2
|
+
import { Directive, Component, ViewEncapsulation, ChangeDetectionStrategy, Inject, Optional, ViewChild, NgModule, Injectable, SkipSelf } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/material/snack-bar';
|
|
4
|
-
import { MAT_SNACK_BAR_DATA,
|
|
5
|
-
export { MAT_SNACK_BAR_DATA, MAT_SNACK_BAR_DEFAULT_OPTIONS, MAT_SNACK_BAR_DEFAULT_OPTIONS_FACTORY, MatSnackBarConfig, MatSnackBarRef,
|
|
4
|
+
import { MAT_SNACK_BAR_DATA, _MatSnackBarBase, MAT_SNACK_BAR_DEFAULT_OPTIONS } from '@angular/material/snack-bar';
|
|
5
|
+
export { MAT_SNACK_BAR_DATA, MAT_SNACK_BAR_DEFAULT_OPTIONS, MAT_SNACK_BAR_DEFAULT_OPTIONS_FACTORY, MatSnackBarConfig, MatSnackBarRef, matSnackBarAnimations } from '@angular/material/snack-bar';
|
|
6
6
|
import * as i2 from '@angular/material-experimental/mdc-button';
|
|
7
7
|
import { MatButtonModule } from '@angular/material-experimental/mdc-button';
|
|
8
8
|
import * as i4 from '@angular/common';
|
|
@@ -13,6 +13,9 @@ import { ANIMATION_MODULE_TYPE } from '@angular/platform-browser/animations';
|
|
|
13
13
|
import { MDCSnackbarFoundation } from '@material/snackbar';
|
|
14
14
|
import * as i2$1 from '@angular/cdk/platform';
|
|
15
15
|
import { Subject } from 'rxjs';
|
|
16
|
+
import * as i2$2 from '@angular/cdk/a11y';
|
|
17
|
+
import * as i3$1 from '@angular/cdk/layout';
|
|
18
|
+
import * as i1$1 from '@angular/cdk/overlay';
|
|
16
19
|
import { OverlayModule } from '@angular/cdk/overlay';
|
|
17
20
|
import { MatCommonModule } from '@angular/material-experimental/mdc-core';
|
|
18
21
|
|
|
@@ -73,7 +76,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.0", ngImpor
|
|
|
73
76
|
* Use of this source code is governed by an MIT-style license that can be
|
|
74
77
|
* found in the LICENSE file at https://angular.io/license
|
|
75
78
|
*/
|
|
76
|
-
class
|
|
79
|
+
class SimpleSnackBar {
|
|
77
80
|
constructor(snackBarRef, data) {
|
|
78
81
|
this.snackBarRef = snackBarRef;
|
|
79
82
|
this.data = data;
|
|
@@ -87,11 +90,11 @@ class MatSimpleSnackBar {
|
|
|
87
90
|
return !!this.data.action;
|
|
88
91
|
}
|
|
89
92
|
}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type:
|
|
93
|
+
SimpleSnackBar.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: SimpleSnackBar, deps: [{ token: i1.MatSnackBarRef }, { token: MAT_SNACK_BAR_DATA }], target: i0.ɵɵFactoryTarget.Component });
|
|
94
|
+
SimpleSnackBar.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.0", type: SimpleSnackBar, selector: "simple-snack-bar", host: { classAttribute: "mat-mdc-simple-snack-bar" }, exportAs: ["matSnackBar"], ngImport: i0, template: "<div matSnackBarLabel>\n {{data.message}}\n</div>\n\n<div matSnackBarActions *ngIf=\"hasAction\">\n <button mat-button matSnackBarAction (click)=\"action()\">\n {{data.action}}\n </button>\n</div>\n", styles: [".mat-mdc-simple-snack-bar{display:flex}\n"], components: [{ type: i2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: MatSnackBarLabel, selector: "[matSnackBarLabel]" }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: MatSnackBarActions, selector: "[matSnackBarActions]" }, { type: MatSnackBarAction, selector: "[matSnackBarAction]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
95
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: SimpleSnackBar, decorators: [{
|
|
93
96
|
type: Component,
|
|
94
|
-
args: [{ selector: '
|
|
97
|
+
args: [{ selector: 'simple-snack-bar', exportAs: 'matSnackBar', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
95
98
|
'class': 'mat-mdc-simple-snack-bar',
|
|
96
99
|
}, template: "<div matSnackBarLabel>\n {{data.message}}\n</div>\n\n<div matSnackBarActions *ngIf=\"hasAction\">\n <button mat-button matSnackBarAction (click)=\"action()\">\n {{data.action}}\n </button>\n</div>\n", styles: [".mat-mdc-simple-snack-bar{display:flex}\n"] }]
|
|
97
100
|
}], ctorParameters: function () { return [{ type: i1.MatSnackBarRef }, { type: undefined, decorators: [{
|
|
@@ -296,7 +299,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.0", ngImpor
|
|
|
296
299
|
class MatSnackBarModule {
|
|
297
300
|
}
|
|
298
301
|
MatSnackBarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: MatSnackBarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
299
|
-
MatSnackBarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: MatSnackBarModule, declarations: [
|
|
302
|
+
MatSnackBarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: MatSnackBarModule, declarations: [SimpleSnackBar,
|
|
300
303
|
MatSnackBarContainer,
|
|
301
304
|
MatSnackBarLabel,
|
|
302
305
|
MatSnackBarActions,
|
|
@@ -318,7 +321,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.0", ngImpor
|
|
|
318
321
|
MatSnackBarAction,
|
|
319
322
|
],
|
|
320
323
|
declarations: [
|
|
321
|
-
|
|
324
|
+
SimpleSnackBar,
|
|
322
325
|
MatSnackBarContainer,
|
|
323
326
|
MatSnackBarLabel,
|
|
324
327
|
MatSnackBarActions,
|
|
@@ -337,20 +340,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.0", ngImpor
|
|
|
337
340
|
/**
|
|
338
341
|
* Service to dispatch Material Design snack bar messages.
|
|
339
342
|
*/
|
|
340
|
-
class MatSnackBar extends
|
|
341
|
-
constructor() {
|
|
342
|
-
super(
|
|
343
|
-
this.simpleSnackBarComponent =
|
|
343
|
+
class MatSnackBar extends _MatSnackBarBase {
|
|
344
|
+
constructor(overlay, live, injector, breakpointObserver, parentSnackBar, defaultConfig) {
|
|
345
|
+
super(overlay, live, injector, breakpointObserver, parentSnackBar, defaultConfig);
|
|
346
|
+
this.simpleSnackBarComponent = SimpleSnackBar;
|
|
344
347
|
this.snackBarContainerComponent = MatSnackBarContainer;
|
|
345
348
|
this.handsetCssClass = 'mat-mdc-snack-bar-handset';
|
|
346
349
|
}
|
|
347
350
|
}
|
|
348
|
-
MatSnackBar.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: MatSnackBar, deps:
|
|
351
|
+
MatSnackBar.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: MatSnackBar, deps: [{ token: i1$1.Overlay }, { token: i2$2.LiveAnnouncer }, { token: i0.Injector }, { token: i3$1.BreakpointObserver }, { token: MatSnackBar, optional: true, skipSelf: true }, { token: MAT_SNACK_BAR_DEFAULT_OPTIONS }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
349
352
|
MatSnackBar.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: MatSnackBar, providedIn: MatSnackBarModule });
|
|
350
353
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: MatSnackBar, decorators: [{
|
|
351
354
|
type: Injectable,
|
|
352
355
|
args: [{ providedIn: MatSnackBarModule }]
|
|
353
|
-
}] }
|
|
356
|
+
}], ctorParameters: function () { return [{ type: i1$1.Overlay }, { type: i2$2.LiveAnnouncer }, { type: i0.Injector }, { type: i3$1.BreakpointObserver }, { type: MatSnackBar, decorators: [{
|
|
357
|
+
type: Optional
|
|
358
|
+
}, {
|
|
359
|
+
type: SkipSelf
|
|
360
|
+
}] }, { type: i1.MatSnackBarConfig, decorators: [{
|
|
361
|
+
type: Inject,
|
|
362
|
+
args: [MAT_SNACK_BAR_DEFAULT_OPTIONS]
|
|
363
|
+
}] }]; } });
|
|
354
364
|
|
|
355
365
|
/**
|
|
356
366
|
* @license
|
|
@@ -372,5 +382,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.0", ngImpor
|
|
|
372
382
|
* Generated bundle index. Do not edit.
|
|
373
383
|
*/
|
|
374
384
|
|
|
375
|
-
export {
|
|
385
|
+
export { MatSnackBar, MatSnackBarAction, MatSnackBarActions, MatSnackBarContainer, MatSnackBarLabel, MatSnackBarModule, SimpleSnackBar };
|
|
376
386
|
//# sourceMappingURL=mdc-snack-bar.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mdc-snack-bar.mjs","sources":["../../../../../../src/material-experimental/mdc-snack-bar/snack-bar-content.ts","../../../../../../src/material-experimental/mdc-snack-bar/simple-snack-bar.ts","../../../../../../src/material-experimental/mdc-snack-bar/simple-snack-bar.html","../../../../../../src/material-experimental/mdc-snack-bar/snack-bar-container.ts","../../../../../../src/material-experimental/mdc-snack-bar/snack-bar-container.html","../../../../../../src/material-experimental/mdc-snack-bar/module.ts","../../../../../../src/material-experimental/mdc-snack-bar/snack-bar.ts","../../../../../../src/material-experimental/mdc-snack-bar/public-api.ts","../../../../../../src/material-experimental/mdc-snack-bar/index.ts","../../../../../../src/material-experimental/mdc-snack-bar/mdc-snack-bar_public_index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive} from '@angular/core';\n\n/** Directive that should be applied to the text element to be rendered in the snack bar. */\n@Directive({\n selector: `[matSnackBarLabel]`,\n host: {\n 'class': 'mat-mdc-snack-bar-label mdc-snackbar__label',\n },\n})\nexport class MatSnackBarLabel {}\n\n/** Directive that should be applied to the element containing the snack bar's action buttons. */\n@Directive({\n selector: `[matSnackBarActions]`,\n host: {\n 'class': 'mat-mdc-snack-bar-actions mdc-snackbar__actions',\n },\n})\nexport class MatSnackBarActions {}\n\n/** Directive that should be applied to each of the snack bar's action buttons. */\n@Directive({\n selector: `[matSnackBarAction]`,\n host: {\n 'class': 'mat-mdc-snack-bar-action mdc-snackbar__action',\n },\n})\nexport class MatSnackBarAction {}\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 {ChangeDetectionStrategy, Component, Inject, ViewEncapsulation} from '@angular/core';\nimport {\n MAT_SNACK_BAR_DATA,\n TextOnlySnackBar,\n MatSnackBarRef,\n SimpleSnackBar,\n} from '@angular/material/snack-bar';\n\n@Component({\n selector: 'mat-simple-snack-bar',\n templateUrl: 'simple-snack-bar.html',\n styleUrls: ['simple-snack-bar.css'],\n exportAs: 'matSnackBar',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n 'class': 'mat-mdc-simple-snack-bar',\n },\n})\nexport class MatSimpleSnackBar implements TextOnlySnackBar {\n constructor(\n public snackBarRef: MatSnackBarRef<SimpleSnackBar>,\n @Inject(MAT_SNACK_BAR_DATA) public data: {message: string; action: string},\n ) {}\n\n /** Performs the action on the snack bar. */\n action(): void {\n this.snackBarRef.dismissWithAction();\n }\n\n /** If the action button should be shown. */\n get hasAction(): boolean {\n return !!this.data.action;\n }\n}\n","<div matSnackBarLabel>\n {{data.message}}\n</div>\n\n<div matSnackBarActions *ngIf=\"hasAction\">\n <button mat-button matSnackBarAction (click)=\"action()\">\n {{data.action}}\n </button>\n</div>\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {AriaLivePoliteness} from '@angular/cdk/a11y';\nimport {\n BasePortalOutlet,\n CdkPortalOutlet,\n ComponentPortal,\n TemplatePortal,\n} from '@angular/cdk/portal';\nimport {\n AfterViewChecked,\n ChangeDetectionStrategy,\n Component,\n ComponentRef,\n ElementRef,\n EmbeddedViewRef,\n Inject,\n NgZone,\n OnDestroy,\n Optional,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport {MatSnackBarConfig, _SnackBarContainer} from '@angular/material/snack-bar';\nimport {ANIMATION_MODULE_TYPE} from '@angular/platform-browser/animations';\nimport {MDCSnackbarAdapter, MDCSnackbarFoundation} from '@material/snackbar';\nimport {Platform} from '@angular/cdk/platform';\nimport {Observable, Subject} from 'rxjs';\n\n/**\n * The MDC label class that should wrap the label content of the snack bar.\n * @docs-private\n */\nconst MDC_SNACKBAR_LABEL_CLASS = 'mdc-snackbar__label';\n\n/**\n * Internal component that wraps user-provided snack bar content.\n * @docs-private\n */\n@Component({\n selector: 'mat-snack-bar-container',\n templateUrl: 'snack-bar-container.html',\n styleUrls: ['snack-bar-container.css'],\n // In Ivy embedded views will be change detected from their declaration place, rather than\n // where they were stamped out. This means that we can't have the snack bar container be OnPush,\n // because it might cause snack bars that were opened from a template not to be out of date.\n // tslint:disable-next-line:validate-decorators\n changeDetection: ChangeDetectionStrategy.Default,\n encapsulation: ViewEncapsulation.None,\n host: {\n 'class': 'mdc-snackbar mat-mdc-snack-bar-container',\n '[class.mat-snack-bar-container]': 'false',\n // Mark this element with a 'mat-exit' attribute to indicate that the snackbar has\n // been dismissed and will soon be removed from the DOM. This is used by the snackbar\n // test harness.\n '[attr.mat-exit]': `_exiting ? '' : null`,\n '[class._mat-animation-noopable]': `_animationMode === 'NoopAnimations'`,\n },\n})\nexport class MatSnackBarContainer\n extends BasePortalOutlet\n implements _SnackBarContainer, AfterViewChecked, OnDestroy\n{\n /** The number of milliseconds to wait before announcing the snack bar's content. */\n private readonly _announceDelay: number = 150;\n\n /** The timeout for announcing the snack bar's content. */\n private _announceTimeoutId: number;\n\n /** Subject for notifying that the snack bar has announced to screen readers. */\n readonly _onAnnounce: Subject<void> = new Subject();\n\n /** Subject for notifying that the snack bar has exited from view. */\n readonly _onExit: Subject<void> = new Subject();\n\n /** Subject for notifying that the snack bar has finished entering the view. */\n readonly _onEnter: Subject<void> = new Subject();\n\n /** aria-live value for the live region. */\n _live: AriaLivePoliteness;\n\n /** Whether the snack bar is currently exiting. */\n _exiting = false;\n\n /**\n * Role of the live region. This is only for Firefox as there is a known issue where Firefox +\n * JAWS does not read out aria-live message.\n */\n _role?: 'status' | 'alert';\n\n private _mdcAdapter: MDCSnackbarAdapter = {\n addClass: (className: string) => this._setClass(className, true),\n removeClass: (className: string) => this._setClass(className, false),\n announce: () => {},\n notifyClosed: () => {\n this._onExit.next();\n this._mdcFoundation.destroy();\n },\n notifyClosing: () => {},\n notifyOpened: () => this._onEnter.next(),\n notifyOpening: () => {},\n };\n\n _mdcFoundation = new MDCSnackbarFoundation(this._mdcAdapter);\n\n /** The portal outlet inside of this container into which the snack bar content will be loaded. */\n @ViewChild(CdkPortalOutlet, {static: true}) _portalOutlet: CdkPortalOutlet;\n\n /** Element that acts as the MDC surface container which should contain the label and actions. */\n @ViewChild('surface', {static: true}) _surface: ElementRef;\n\n /**\n * Element that will have the `mdc-snackbar__label` class applied if the attached component\n * or template does not have it. This ensures that the appropriate structure, typography, and\n * color is applied to the attached view.\n */\n @ViewChild('label', {static: true}) _label: ElementRef;\n\n constructor(\n private _elementRef: ElementRef<HTMLElement>,\n public snackBarConfig: MatSnackBarConfig,\n private _platform: Platform,\n private _ngZone: NgZone,\n @Optional() @Inject(ANIMATION_MODULE_TYPE) public _animationMode?: string,\n ) {\n super();\n\n // Use aria-live rather than a live role like 'alert' or 'status'\n // because NVDA and JAWS have show inconsistent behavior with live roles.\n if (snackBarConfig.politeness === 'assertive' && !snackBarConfig.announcementMessage) {\n this._live = 'assertive';\n } else if (snackBarConfig.politeness === 'off') {\n this._live = 'off';\n } else {\n this._live = 'polite';\n }\n\n // Only set role for Firefox. Set role based on aria-live because setting role=\"alert\" implies\n // aria-live=\"assertive\" which may cause issues if aria-live is set to \"polite\" above.\n if (this._platform.FIREFOX) {\n if (this._live === 'polite') {\n this._role = 'status';\n }\n if (this._live === 'assertive') {\n this._role = 'alert';\n }\n }\n\n // `MatSnackBar` will use the config's timeout to determine when the snack bar should be closed.\n // Set this to `-1` to mark it as indefinitely open so that MDC does not close itself.\n this._mdcFoundation.setTimeoutMs(-1);\n }\n\n ngAfterViewChecked() {\n // Check to see if the attached component or template uses the MDC template structure,\n // specifically the MDC label. If not, the container should apply the MDC label class to this\n // component's label container, which will apply MDC's label styles to the attached view.\n if (!this._label.nativeElement.querySelector(`.${MDC_SNACKBAR_LABEL_CLASS}`)) {\n this._label.nativeElement.classList.add(MDC_SNACKBAR_LABEL_CLASS);\n } else {\n this._label.nativeElement.classList.remove(MDC_SNACKBAR_LABEL_CLASS);\n }\n }\n\n /** Makes sure the exit callbacks have been invoked when the element is destroyed. */\n ngOnDestroy() {\n this._mdcFoundation.close();\n }\n\n enter() {\n // MDC uses some browser APIs that will throw during server-side rendering.\n if (this._platform.isBrowser) {\n this._mdcFoundation.open();\n this._screenReaderAnnounce();\n }\n }\n\n exit(): Observable<void> {\n this._exiting = true;\n this._mdcFoundation.close();\n\n // If the snack bar hasn't been announced by the time it exits it wouldn't have been open\n // long enough to visually read it either, so clear the timeout for announcing.\n clearTimeout(this._announceTimeoutId);\n\n return this._onExit;\n }\n\n /** Attach a component portal as content to this snack bar container. */\n attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T> {\n this._assertNotAttached();\n this._applySnackBarClasses();\n return this._portalOutlet.attachComponentPortal(portal);\n }\n\n /** Attach a template portal as content to this snack bar container. */\n attachTemplatePortal<C>(portal: TemplatePortal<C>): EmbeddedViewRef<C> {\n this._assertNotAttached();\n this._applySnackBarClasses();\n return this._portalOutlet.attachTemplatePortal(portal);\n }\n\n private _setClass(cssClass: string, active: boolean) {\n this._elementRef.nativeElement.classList.toggle(cssClass, active);\n }\n\n /** Applies the user-configured CSS classes to the snack bar. */\n private _applySnackBarClasses() {\n const panelClasses = this.snackBarConfig.panelClass;\n if (panelClasses) {\n if (Array.isArray(panelClasses)) {\n // Note that we can't use a spread here, because IE doesn't support multiple arguments.\n panelClasses.forEach(cssClass => this._setClass(cssClass, true));\n } else {\n this._setClass(panelClasses, true);\n }\n }\n }\n\n /** Asserts that no content is already attached to the container. */\n private _assertNotAttached() {\n if (this._portalOutlet.hasAttached() && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error('Attempting to attach snack bar content after content is already attached');\n }\n }\n\n /**\n * Starts a timeout to move the snack bar content to the live region so screen readers will\n * announce it.\n */\n private _screenReaderAnnounce() {\n if (!this._announceTimeoutId) {\n this._ngZone.runOutsideAngular(() => {\n this._announceTimeoutId = setTimeout(() => {\n const inertElement = this._elementRef.nativeElement.querySelector('[aria-hidden]');\n const liveElement = this._elementRef.nativeElement.querySelector('[aria-live]');\n\n if (inertElement && liveElement) {\n // If an element in the snack bar content is focused before being moved\n // track it and restore focus after moving to the live region.\n let focusedElement: HTMLElement | null = null;\n if (\n document.activeElement instanceof HTMLElement &&\n inertElement.contains(document.activeElement)\n ) {\n focusedElement = document.activeElement;\n }\n\n inertElement.removeAttribute('aria-hidden');\n liveElement.appendChild(inertElement);\n focusedElement?.focus();\n\n this._onAnnounce.next();\n this._onAnnounce.complete();\n }\n }, this._announceDelay);\n });\n }\n }\n}\n","<div class=\"mdc-snackbar__surface\" #surface>\n <!--\n This outer label wrapper will have the class `mdc-snackbar__label` applied if\n the attached template/component does not contain it.\n -->\n <div class=\"mat-mdc-snack-bar-label\" #label>\n <!-- Initialy holds the snack bar content, will be empty after announcing to screen readers. -->\n <div aria-hidden=\"true\">\n <ng-template cdkPortalOutlet></ng-template>\n </div>\n\n <!-- Will receive the snack bar content from the non-live div, move will happen a short delay after opening -->\n <div [attr.aria-live]=\"_live\" [attr.role]=\"_role\"></div>\n </div>\n</div>\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {OverlayModule} from '@angular/cdk/overlay';\nimport {PortalModule} from '@angular/cdk/portal';\nimport {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {MatButtonModule} from '@angular/material-experimental/mdc-button';\nimport {MatCommonModule} from '@angular/material-experimental/mdc-core';\n\nimport {MatSimpleSnackBar} from './simple-snack-bar';\nimport {MatSnackBarContainer} from './snack-bar-container';\nimport {MatSnackBarAction, MatSnackBarActions, MatSnackBarLabel} from './snack-bar-content';\n\n@NgModule({\n imports: [OverlayModule, PortalModule, CommonModule, MatButtonModule, MatCommonModule],\n exports: [\n MatCommonModule,\n MatSnackBarContainer,\n MatSnackBarLabel,\n MatSnackBarActions,\n MatSnackBarAction,\n ],\n declarations: [\n MatSimpleSnackBar,\n MatSnackBarContainer,\n MatSnackBarLabel,\n MatSnackBarActions,\n MatSnackBarAction,\n ],\n})\nexport class MatSnackBarModule {}\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 {Injectable} from '@angular/core';\nimport {MatSnackBar as BaseMatSnackBar} from '@angular/material/snack-bar';\nimport {MatSnackBarModule} from './module';\nimport {MatSimpleSnackBar} from './simple-snack-bar';\nimport {MatSnackBarContainer} from './snack-bar-container';\n\n/**\n * Service to dispatch Material Design snack bar messages.\n */\n@Injectable({providedIn: MatSnackBarModule})\nexport class MatSnackBar extends BaseMatSnackBar {\n protected override simpleSnackBarComponent = MatSimpleSnackBar;\n protected override snackBarContainerComponent = MatSnackBarContainer;\n protected override handsetCssClass = 'mat-mdc-snack-bar-handset';\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\nexport * from './simple-snack-bar';\nexport * from './snack-bar-container';\nexport * from './snack-bar-content';\nexport * from './snack-bar';\nexport * from './module';\n\nexport {\n MatSnackBarConfig,\n MatSnackBarDismiss,\n MatSnackBarRef,\n SimpleSnackBar,\n MAT_SNACK_BAR_DATA,\n MAT_SNACK_BAR_DEFAULT_OPTIONS,\n MAT_SNACK_BAR_DEFAULT_OPTIONS_FACTORY,\n MatSnackBarHorizontalPosition,\n MatSnackBarVerticalPosition,\n TextOnlySnackBar,\n matSnackBarAnimations,\n} from '@angular/material/snack-bar';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './public-api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["BaseMatSnackBar"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;;;;;AAUA;MAOa,gBAA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,gBAAgB;QAChB,kBAAkB;QAClB,iBAAiB,aAbT,aAAa,EAAE,YAAY,EAAE,YAAY,EAAE,eAAe,EAAE,eAAe,aAEnF,eAAe;QACf,oBAAoB;QACpB,gBAAgB;QAChB,kBAAkB;QAClB,iBAAiB;+GAUR,iBAAiB,YAhBnB,CAAC,aAAa,EAAE,YAAY,EAAE,YAAY,EAAE,eAAe,EAAE,eAAe,CAAC,EAEpF,eAAe;2FAcN,iBAAiB;kBAjB7B,QAAQ;mBAAC;oBACR,OAAO,EAAE,CAAC,aAAa,EAAE,YAAY,EAAE,YAAY,EAAE,eAAe,EAAE,eAAe,CAAC;oBACtF,OAAO,EAAE;wBACP,eAAe;wBACf,oBAAoB;wBACpB,gBAAgB;wBAChB,kBAAkB;wBAClB,iBAAiB;qBAClB;oBACD,YAAY,EAAE;wBACZ,iBAAiB;wBACjB,oBAAoB;wBACpB,gBAAgB;wBAChB,kBAAkB;wBAClB,iBAAiB;qBAClB;iBACF;;;ACnCD;;;;;;;AAcA;;;MAIa,WAAY,SAAQA,aAAe;IADhD;;QAEqB,4BAAuB,GAAG,iBAAiB,CAAC;QAC5C,+BAA0B,GAAG,oBAAoB,CAAC;QAClD,oBAAe,GAAG,2BAA2B,CAAC;KAClE;;wGAJY,WAAW;4GAAX,WAAW,cADC,iBAAiB;2FAC7B,WAAW;kBADvB,UAAU;mBAAC,EAAC,UAAU,EAAE,iBAAiB,EAAC;;;ACjB3C;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;"}
|
|
1
|
+
{"version":3,"file":"mdc-snack-bar.mjs","sources":["../../../../../../src/material-experimental/mdc-snack-bar/snack-bar-content.ts","../../../../../../src/material-experimental/mdc-snack-bar/simple-snack-bar.ts","../../../../../../src/material-experimental/mdc-snack-bar/simple-snack-bar.html","../../../../../../src/material-experimental/mdc-snack-bar/snack-bar-container.ts","../../../../../../src/material-experimental/mdc-snack-bar/snack-bar-container.html","../../../../../../src/material-experimental/mdc-snack-bar/module.ts","../../../../../../src/material-experimental/mdc-snack-bar/snack-bar.ts","../../../../../../src/material-experimental/mdc-snack-bar/public-api.ts","../../../../../../src/material-experimental/mdc-snack-bar/index.ts","../../../../../../src/material-experimental/mdc-snack-bar/mdc-snack-bar_public_index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive} from '@angular/core';\n\n/** Directive that should be applied to the text element to be rendered in the snack bar. */\n@Directive({\n selector: `[matSnackBarLabel]`,\n host: {\n 'class': 'mat-mdc-snack-bar-label mdc-snackbar__label',\n },\n})\nexport class MatSnackBarLabel {}\n\n/** Directive that should be applied to the element containing the snack bar's action buttons. */\n@Directive({\n selector: `[matSnackBarActions]`,\n host: {\n 'class': 'mat-mdc-snack-bar-actions mdc-snackbar__actions',\n },\n})\nexport class MatSnackBarActions {}\n\n/** Directive that should be applied to each of the snack bar's action buttons. */\n@Directive({\n selector: `[matSnackBarAction]`,\n host: {\n 'class': 'mat-mdc-snack-bar-action mdc-snackbar__action',\n },\n})\nexport class MatSnackBarAction {}\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 {ChangeDetectionStrategy, Component, Inject, ViewEncapsulation} from '@angular/core';\nimport {MAT_SNACK_BAR_DATA, TextOnlySnackBar, MatSnackBarRef} from '@angular/material/snack-bar';\n\n@Component({\n selector: 'simple-snack-bar',\n templateUrl: 'simple-snack-bar.html',\n styleUrls: ['simple-snack-bar.css'],\n exportAs: 'matSnackBar',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n 'class': 'mat-mdc-simple-snack-bar',\n },\n})\nexport class SimpleSnackBar implements TextOnlySnackBar {\n constructor(\n public snackBarRef: MatSnackBarRef<SimpleSnackBar>,\n @Inject(MAT_SNACK_BAR_DATA) public data: {message: string; action: string},\n ) {}\n\n /** Performs the action on the snack bar. */\n action(): void {\n this.snackBarRef.dismissWithAction();\n }\n\n /** If the action button should be shown. */\n get hasAction(): boolean {\n return !!this.data.action;\n }\n}\n","<div matSnackBarLabel>\n {{data.message}}\n</div>\n\n<div matSnackBarActions *ngIf=\"hasAction\">\n <button mat-button matSnackBarAction (click)=\"action()\">\n {{data.action}}\n </button>\n</div>\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {AriaLivePoliteness} from '@angular/cdk/a11y';\nimport {\n BasePortalOutlet,\n CdkPortalOutlet,\n ComponentPortal,\n TemplatePortal,\n} from '@angular/cdk/portal';\nimport {\n AfterViewChecked,\n ChangeDetectionStrategy,\n Component,\n ComponentRef,\n ElementRef,\n EmbeddedViewRef,\n Inject,\n NgZone,\n OnDestroy,\n Optional,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport {MatSnackBarConfig, _SnackBarContainer} from '@angular/material/snack-bar';\nimport {ANIMATION_MODULE_TYPE} from '@angular/platform-browser/animations';\nimport {MDCSnackbarAdapter, MDCSnackbarFoundation} from '@material/snackbar';\nimport {Platform} from '@angular/cdk/platform';\nimport {Observable, Subject} from 'rxjs';\n\n/**\n * The MDC label class that should wrap the label content of the snack bar.\n * @docs-private\n */\nconst MDC_SNACKBAR_LABEL_CLASS = 'mdc-snackbar__label';\n\n/**\n * Internal component that wraps user-provided snack bar content.\n * @docs-private\n */\n@Component({\n selector: 'mat-snack-bar-container',\n templateUrl: 'snack-bar-container.html',\n styleUrls: ['snack-bar-container.css'],\n // In Ivy embedded views will be change detected from their declaration place, rather than\n // where they were stamped out. This means that we can't have the snack bar container be OnPush,\n // because it might cause snack bars that were opened from a template not to be out of date.\n // tslint:disable-next-line:validate-decorators\n changeDetection: ChangeDetectionStrategy.Default,\n encapsulation: ViewEncapsulation.None,\n host: {\n 'class': 'mdc-snackbar mat-mdc-snack-bar-container',\n '[class.mat-snack-bar-container]': 'false',\n // Mark this element with a 'mat-exit' attribute to indicate that the snackbar has\n // been dismissed and will soon be removed from the DOM. This is used by the snackbar\n // test harness.\n '[attr.mat-exit]': `_exiting ? '' : null`,\n '[class._mat-animation-noopable]': `_animationMode === 'NoopAnimations'`,\n },\n})\nexport class MatSnackBarContainer\n extends BasePortalOutlet\n implements _SnackBarContainer, AfterViewChecked, OnDestroy\n{\n /** The number of milliseconds to wait before announcing the snack bar's content. */\n private readonly _announceDelay: number = 150;\n\n /** The timeout for announcing the snack bar's content. */\n private _announceTimeoutId: number;\n\n /** Subject for notifying that the snack bar has announced to screen readers. */\n readonly _onAnnounce: Subject<void> = new Subject();\n\n /** Subject for notifying that the snack bar has exited from view. */\n readonly _onExit: Subject<void> = new Subject();\n\n /** Subject for notifying that the snack bar has finished entering the view. */\n readonly _onEnter: Subject<void> = new Subject();\n\n /** aria-live value for the live region. */\n _live: AriaLivePoliteness;\n\n /** Whether the snack bar is currently exiting. */\n _exiting = false;\n\n /**\n * Role of the live region. This is only for Firefox as there is a known issue where Firefox +\n * JAWS does not read out aria-live message.\n */\n _role?: 'status' | 'alert';\n\n private _mdcAdapter: MDCSnackbarAdapter = {\n addClass: (className: string) => this._setClass(className, true),\n removeClass: (className: string) => this._setClass(className, false),\n announce: () => {},\n notifyClosed: () => {\n this._onExit.next();\n this._mdcFoundation.destroy();\n },\n notifyClosing: () => {},\n notifyOpened: () => this._onEnter.next(),\n notifyOpening: () => {},\n };\n\n _mdcFoundation = new MDCSnackbarFoundation(this._mdcAdapter);\n\n /** The portal outlet inside of this container into which the snack bar content will be loaded. */\n @ViewChild(CdkPortalOutlet, {static: true}) _portalOutlet: CdkPortalOutlet;\n\n /** Element that acts as the MDC surface container which should contain the label and actions. */\n @ViewChild('surface', {static: true}) _surface: ElementRef;\n\n /**\n * Element that will have the `mdc-snackbar__label` class applied if the attached component\n * or template does not have it. This ensures that the appropriate structure, typography, and\n * color is applied to the attached view.\n */\n @ViewChild('label', {static: true}) _label: ElementRef;\n\n constructor(\n private _elementRef: ElementRef<HTMLElement>,\n public snackBarConfig: MatSnackBarConfig,\n private _platform: Platform,\n private _ngZone: NgZone,\n @Optional() @Inject(ANIMATION_MODULE_TYPE) public _animationMode?: string,\n ) {\n super();\n\n // Use aria-live rather than a live role like 'alert' or 'status'\n // because NVDA and JAWS have show inconsistent behavior with live roles.\n if (snackBarConfig.politeness === 'assertive' && !snackBarConfig.announcementMessage) {\n this._live = 'assertive';\n } else if (snackBarConfig.politeness === 'off') {\n this._live = 'off';\n } else {\n this._live = 'polite';\n }\n\n // Only set role for Firefox. Set role based on aria-live because setting role=\"alert\" implies\n // aria-live=\"assertive\" which may cause issues if aria-live is set to \"polite\" above.\n if (this._platform.FIREFOX) {\n if (this._live === 'polite') {\n this._role = 'status';\n }\n if (this._live === 'assertive') {\n this._role = 'alert';\n }\n }\n\n // `MatSnackBar` will use the config's timeout to determine when the snack bar should be closed.\n // Set this to `-1` to mark it as indefinitely open so that MDC does not close itself.\n this._mdcFoundation.setTimeoutMs(-1);\n }\n\n ngAfterViewChecked() {\n // Check to see if the attached component or template uses the MDC template structure,\n // specifically the MDC label. If not, the container should apply the MDC label class to this\n // component's label container, which will apply MDC's label styles to the attached view.\n if (!this._label.nativeElement.querySelector(`.${MDC_SNACKBAR_LABEL_CLASS}`)) {\n this._label.nativeElement.classList.add(MDC_SNACKBAR_LABEL_CLASS);\n } else {\n this._label.nativeElement.classList.remove(MDC_SNACKBAR_LABEL_CLASS);\n }\n }\n\n /** Makes sure the exit callbacks have been invoked when the element is destroyed. */\n ngOnDestroy() {\n this._mdcFoundation.close();\n }\n\n enter() {\n // MDC uses some browser APIs that will throw during server-side rendering.\n if (this._platform.isBrowser) {\n this._mdcFoundation.open();\n this._screenReaderAnnounce();\n }\n }\n\n exit(): Observable<void> {\n this._exiting = true;\n this._mdcFoundation.close();\n\n // If the snack bar hasn't been announced by the time it exits it wouldn't have been open\n // long enough to visually read it either, so clear the timeout for announcing.\n clearTimeout(this._announceTimeoutId);\n\n return this._onExit;\n }\n\n /** Attach a component portal as content to this snack bar container. */\n attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T> {\n this._assertNotAttached();\n this._applySnackBarClasses();\n return this._portalOutlet.attachComponentPortal(portal);\n }\n\n /** Attach a template portal as content to this snack bar container. */\n attachTemplatePortal<C>(portal: TemplatePortal<C>): EmbeddedViewRef<C> {\n this._assertNotAttached();\n this._applySnackBarClasses();\n return this._portalOutlet.attachTemplatePortal(portal);\n }\n\n private _setClass(cssClass: string, active: boolean) {\n this._elementRef.nativeElement.classList.toggle(cssClass, active);\n }\n\n /** Applies the user-configured CSS classes to the snack bar. */\n private _applySnackBarClasses() {\n const panelClasses = this.snackBarConfig.panelClass;\n if (panelClasses) {\n if (Array.isArray(panelClasses)) {\n // Note that we can't use a spread here, because IE doesn't support multiple arguments.\n panelClasses.forEach(cssClass => this._setClass(cssClass, true));\n } else {\n this._setClass(panelClasses, true);\n }\n }\n }\n\n /** Asserts that no content is already attached to the container. */\n private _assertNotAttached() {\n if (this._portalOutlet.hasAttached() && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error('Attempting to attach snack bar content after content is already attached');\n }\n }\n\n /**\n * Starts a timeout to move the snack bar content to the live region so screen readers will\n * announce it.\n */\n private _screenReaderAnnounce() {\n if (!this._announceTimeoutId) {\n this._ngZone.runOutsideAngular(() => {\n this._announceTimeoutId = setTimeout(() => {\n const inertElement = this._elementRef.nativeElement.querySelector('[aria-hidden]');\n const liveElement = this._elementRef.nativeElement.querySelector('[aria-live]');\n\n if (inertElement && liveElement) {\n // If an element in the snack bar content is focused before being moved\n // track it and restore focus after moving to the live region.\n let focusedElement: HTMLElement | null = null;\n if (\n document.activeElement instanceof HTMLElement &&\n inertElement.contains(document.activeElement)\n ) {\n focusedElement = document.activeElement;\n }\n\n inertElement.removeAttribute('aria-hidden');\n liveElement.appendChild(inertElement);\n focusedElement?.focus();\n\n this._onAnnounce.next();\n this._onAnnounce.complete();\n }\n }, this._announceDelay);\n });\n }\n }\n}\n","<div class=\"mdc-snackbar__surface\" #surface>\n <!--\n This outer label wrapper will have the class `mdc-snackbar__label` applied if\n the attached template/component does not contain it.\n -->\n <div class=\"mat-mdc-snack-bar-label\" #label>\n <!-- Initialy holds the snack bar content, will be empty after announcing to screen readers. -->\n <div aria-hidden=\"true\">\n <ng-template cdkPortalOutlet></ng-template>\n </div>\n\n <!-- Will receive the snack bar content from the non-live div, move will happen a short delay after opening -->\n <div [attr.aria-live]=\"_live\" [attr.role]=\"_role\"></div>\n </div>\n</div>\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {OverlayModule} from '@angular/cdk/overlay';\nimport {PortalModule} from '@angular/cdk/portal';\nimport {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {MatButtonModule} from '@angular/material-experimental/mdc-button';\nimport {MatCommonModule} from '@angular/material-experimental/mdc-core';\n\nimport {SimpleSnackBar} from './simple-snack-bar';\nimport {MatSnackBarContainer} from './snack-bar-container';\nimport {MatSnackBarAction, MatSnackBarActions, MatSnackBarLabel} from './snack-bar-content';\n\n@NgModule({\n imports: [OverlayModule, PortalModule, CommonModule, MatButtonModule, MatCommonModule],\n exports: [\n MatCommonModule,\n MatSnackBarContainer,\n MatSnackBarLabel,\n MatSnackBarActions,\n MatSnackBarAction,\n ],\n declarations: [\n SimpleSnackBar,\n MatSnackBarContainer,\n MatSnackBarLabel,\n MatSnackBarActions,\n MatSnackBarAction,\n ],\n})\nexport class MatSnackBarModule {}\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 {LiveAnnouncer} from '@angular/cdk/a11y';\nimport {BreakpointObserver} from '@angular/cdk/layout';\nimport {Overlay} from '@angular/cdk/overlay';\nimport {Inject, Injectable, Injector, Optional, SkipSelf} from '@angular/core';\nimport {\n MatSnackBarConfig,\n MAT_SNACK_BAR_DEFAULT_OPTIONS,\n _MatSnackBarBase,\n} from '@angular/material/snack-bar';\nimport {MatSnackBarModule} from './module';\nimport {SimpleSnackBar} from './simple-snack-bar';\nimport {MatSnackBarContainer} from './snack-bar-container';\n\n/**\n * Service to dispatch Material Design snack bar messages.\n */\n@Injectable({providedIn: MatSnackBarModule})\nexport class MatSnackBar extends _MatSnackBarBase {\n protected override simpleSnackBarComponent = SimpleSnackBar;\n protected override snackBarContainerComponent = MatSnackBarContainer;\n protected override handsetCssClass = 'mat-mdc-snack-bar-handset';\n\n constructor(\n overlay: Overlay,\n live: LiveAnnouncer,\n injector: Injector,\n breakpointObserver: BreakpointObserver,\n @Optional() @SkipSelf() parentSnackBar: MatSnackBar,\n @Inject(MAT_SNACK_BAR_DEFAULT_OPTIONS) defaultConfig: MatSnackBarConfig,\n ) {\n super(overlay, live, injector, breakpointObserver, parentSnackBar, defaultConfig);\n }\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\nexport * from './simple-snack-bar';\nexport * from './snack-bar-container';\nexport * from './snack-bar-content';\nexport * from './snack-bar';\nexport * from './module';\n\nexport {\n MatSnackBarConfig,\n MatSnackBarDismiss,\n MatSnackBarRef,\n MAT_SNACK_BAR_DATA,\n MAT_SNACK_BAR_DEFAULT_OPTIONS,\n MAT_SNACK_BAR_DEFAULT_OPTIONS_FACTORY,\n MatSnackBarHorizontalPosition,\n MatSnackBarVerticalPosition,\n TextOnlySnackBar,\n matSnackBarAnimations,\n} from '@angular/material/snack-bar';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './public-api';\n","/**\n * Generated bundle index. Do not edit.\n */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;;;ACpCzC;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;"}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* found in the LICENSE file at https://angular.io/license
|
|
7
7
|
*/
|
|
8
8
|
import { Platform } from '@angular/cdk/platform';
|
|
9
|
-
import { ElementRef, NgZone } from '@angular/core';
|
|
9
|
+
import { ElementRef, NgZone, OnDestroy, OnInit } from '@angular/core';
|
|
10
10
|
import { CanColor, CanDisable, CanDisableRipple, MatRipple } from '@angular/material-experimental/mdc-core';
|
|
11
11
|
import { FocusOrigin } from '@angular/cdk/a11y';
|
|
12
12
|
import * as i0 from "@angular/core";
|
|
@@ -59,10 +59,12 @@ export declare const MAT_ANCHOR_HOST: {
|
|
|
59
59
|
/**
|
|
60
60
|
* Anchor button base.
|
|
61
61
|
*/
|
|
62
|
-
export declare class MatAnchorBase extends MatButtonBase {
|
|
62
|
+
export declare class MatAnchorBase extends MatButtonBase implements OnInit, OnDestroy {
|
|
63
63
|
tabIndex: number;
|
|
64
64
|
constructor(elementRef: ElementRef, platform: Platform, ngZone: NgZone, animationMode?: string);
|
|
65
|
-
|
|
65
|
+
ngOnInit(): void;
|
|
66
|
+
ngOnDestroy(): void;
|
|
67
|
+
_haltDisabledEvents: (event: Event) => void;
|
|
66
68
|
static ɵfac: i0.ɵɵFactoryDeclaration<MatAnchorBase, never>;
|
|
67
69
|
static ɵdir: i0.ɵɵDirectiveDeclaration<MatAnchorBase, never, never, {}, {}, never>;
|
|
68
70
|
}
|
|
@@ -112,16 +112,19 @@
|
|
|
112
112
|
|
|
113
113
|
@mixin density($config-or-theme) {
|
|
114
114
|
$density-scale: theming.get-density-config($config-or-theme);
|
|
115
|
-
.mat-mdc-checkbox .mdc-checkbox {
|
|
116
|
-
@include mdc-checkbox-theme.density(
|
|
117
|
-
$density-scale,
|
|
118
|
-
$query: mdc-helpers.$mat-base-styles-query
|
|
119
|
-
);
|
|
120
|
-
}
|
|
121
115
|
|
|
122
|
-
@
|
|
123
|
-
.mat-mdc-checkbox-
|
|
124
|
-
|
|
116
|
+
@include mdc-helpers.disable-fallback-declarations {
|
|
117
|
+
.mat-mdc-checkbox .mdc-checkbox {
|
|
118
|
+
@include mdc-checkbox-theme.density(
|
|
119
|
+
$density-scale,
|
|
120
|
+
$query: mdc-helpers.$mat-base-styles-query
|
|
121
|
+
);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
@if ($density-scale == -2 or $density-scale == 'minimum') {
|
|
125
|
+
.mat-mdc-checkbox-touch-target {
|
|
126
|
+
display: none;
|
|
127
|
+
}
|
|
125
128
|
}
|
|
126
129
|
}
|
|
127
130
|
}
|
|
@@ -12,8 +12,8 @@ import * as i0 from "@angular/core";
|
|
|
12
12
|
/**
|
|
13
13
|
* Single option inside of a `<mat-select>` element.
|
|
14
14
|
*/
|
|
15
|
-
export declare class MatOption extends _MatOptionBase {
|
|
15
|
+
export declare class MatOption<T = any> extends _MatOptionBase<T> {
|
|
16
16
|
constructor(element: ElementRef<HTMLElement>, changeDetectorRef: ChangeDetectorRef, parent: MatOptionParentComponent, group: MatOptgroup);
|
|
17
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<MatOption
|
|
18
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MatOption
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MatOption<any>, [null, null, { optional: true; }, { optional: true; }]>;
|
|
18
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MatOption<any>, "mat-option", ["matOption"], {}, {}, never, ["*"]>;
|
|
19
19
|
}
|
|
@@ -9,6 +9,6 @@ import * as i7 from "@angular/material-experimental/mdc-button";
|
|
|
9
9
|
import * as i8 from "@angular/material-experimental/mdc-core";
|
|
10
10
|
export declare class MatSnackBarModule {
|
|
11
11
|
static ɵfac: i0.ɵɵFactoryDeclaration<MatSnackBarModule, never>;
|
|
12
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<MatSnackBarModule, [typeof i1.
|
|
12
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<MatSnackBarModule, [typeof i1.SimpleSnackBar, typeof i2.MatSnackBarContainer, typeof i3.MatSnackBarLabel, typeof i3.MatSnackBarActions, typeof i3.MatSnackBarAction], [typeof i4.OverlayModule, typeof i5.PortalModule, typeof i6.CommonModule, typeof i7.MatButtonModule, typeof i8.MatCommonModule], [typeof i8.MatCommonModule, typeof i2.MatSnackBarContainer, typeof i3.MatSnackBarLabel, typeof i3.MatSnackBarActions, typeof i3.MatSnackBarAction]>;
|
|
13
13
|
static ɵinj: i0.ɵɵInjectorDeclaration<MatSnackBarModule>;
|
|
14
14
|
}
|
|
@@ -10,4 +10,4 @@ export * from './snack-bar-container';
|
|
|
10
10
|
export * from './snack-bar-content';
|
|
11
11
|
export * from './snack-bar';
|
|
12
12
|
export * from './module';
|
|
13
|
-
export { MatSnackBarConfig, MatSnackBarDismiss, MatSnackBarRef,
|
|
13
|
+
export { MatSnackBarConfig, MatSnackBarDismiss, MatSnackBarRef, MAT_SNACK_BAR_DATA, MAT_SNACK_BAR_DEFAULT_OPTIONS, MAT_SNACK_BAR_DEFAULT_OPTIONS_FACTORY, MatSnackBarHorizontalPosition, MatSnackBarVerticalPosition, TextOnlySnackBar, matSnackBarAnimations, } from '@angular/material/snack-bar';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { TextOnlySnackBar, MatSnackBarRef
|
|
1
|
+
import { TextOnlySnackBar, MatSnackBarRef } from '@angular/material/snack-bar';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class
|
|
3
|
+
export declare class SimpleSnackBar implements TextOnlySnackBar {
|
|
4
4
|
snackBarRef: MatSnackBarRef<SimpleSnackBar>;
|
|
5
5
|
data: {
|
|
6
6
|
message: string;
|
|
@@ -14,6 +14,6 @@ export declare class MatSimpleSnackBar implements TextOnlySnackBar {
|
|
|
14
14
|
action(): void;
|
|
15
15
|
/** If the action button should be shown. */
|
|
16
16
|
get hasAction(): boolean;
|
|
17
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
18
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SimpleSnackBar, never>;
|
|
18
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SimpleSnackBar, "simple-snack-bar", ["matSnackBar"], {}, {}, never, never>;
|
|
19
19
|
}
|
|
@@ -1,14 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Google LLC All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
+
* found in the LICENSE file at https://angular.io/license
|
|
7
|
+
*/
|
|
8
|
+
import { LiveAnnouncer } from '@angular/cdk/a11y';
|
|
9
|
+
import { BreakpointObserver } from '@angular/cdk/layout';
|
|
10
|
+
import { Overlay } from '@angular/cdk/overlay';
|
|
11
|
+
import { Injector } from '@angular/core';
|
|
12
|
+
import { MatSnackBarConfig, _MatSnackBarBase } from '@angular/material/snack-bar';
|
|
13
|
+
import { SimpleSnackBar } from './simple-snack-bar';
|
|
3
14
|
import { MatSnackBarContainer } from './snack-bar-container';
|
|
4
15
|
import * as i0 from "@angular/core";
|
|
5
16
|
/**
|
|
6
17
|
* Service to dispatch Material Design snack bar messages.
|
|
7
18
|
*/
|
|
8
|
-
export declare class MatSnackBar extends
|
|
9
|
-
protected simpleSnackBarComponent: typeof
|
|
19
|
+
export declare class MatSnackBar extends _MatSnackBarBase {
|
|
20
|
+
protected simpleSnackBarComponent: typeof SimpleSnackBar;
|
|
10
21
|
protected snackBarContainerComponent: typeof MatSnackBarContainer;
|
|
11
22
|
protected handsetCssClass: string;
|
|
12
|
-
|
|
23
|
+
constructor(overlay: Overlay, live: LiveAnnouncer, injector: Injector, breakpointObserver: BreakpointObserver, parentSnackBar: MatSnackBar, defaultConfig: MatSnackBarConfig);
|
|
24
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MatSnackBar, [null, null, null, null, { optional: true; skipSelf: true; }, null]>;
|
|
13
25
|
static ɵprov: i0.ɵɵInjectableDeclaration<MatSnackBar>;
|
|
14
26
|
}
|