{"version":3,"file":"legacy-snack-bar.mjs","sources":["../../../../../../src/material/legacy-snack-bar/simple-snack-bar.ts","../../../../../../src/material/legacy-snack-bar/simple-snack-bar.html","../../../../../../src/material/legacy-snack-bar/snack-bar-container.ts","../../../../../../src/material/legacy-snack-bar/snack-bar-container.html","../../../../../../src/material/legacy-snack-bar/snack-bar-module.ts","../../../../../../src/material/legacy-snack-bar/snack-bar.ts","../../../../../../src/material/legacy-snack-bar/legacy-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 {ChangeDetectionStrategy, Component, Inject, ViewEncapsulation} from '@angular/core';\nimport {TextOnlySnackBar, MatSnackBarRef, MAT_SNACK_BAR_DATA} from '@angular/material/snack-bar';\n\n/**\n * A component used to open as the default snack bar, matching material spec.\n * This should only be used internally by the snack bar service.\n * @deprecated Use `SimpleSnackBar` from `@angular/material/snack-bar` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.\n * @breaking-change 17.0.0\n */\n@Component({\n selector: 'simple-snack-bar',\n templateUrl: 'simple-snack-bar.html',\n styleUrls: ['simple-snack-bar.css'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n 'class': 'mat-simple-snackbar',\n },\n})\nexport class LegacySimpleSnackBar implements TextOnlySnackBar {\n /** Data that was injected into the snack bar. */\n data: {message: string; action: string};\n\n constructor(\n public snackBarRef: MatSnackBarRef,\n @Inject(MAT_SNACK_BAR_DATA) data: any,\n ) {\n this.data = data;\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","{{data.message}}\n
\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\nimport {ChangeDetectionStrategy, Component, ViewEncapsulation} from '@angular/core';\nimport {_MatSnackBarContainerBase, matSnackBarAnimations} from '@angular/material/snack-bar';\n\n/**\n * Internal component that wraps user-provided snack bar content.\n * @docs-private\n * @deprecated Use `MatSnackBarContainer` from `@angular/material/snack-bar` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.\n * @breaking-change 17.0.0\n */\n@Component({\n selector: '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 animations: [matSnackBarAnimations.snackBarState],\n host: {\n 'class': 'mat-snack-bar-container',\n '[@state]': '_animationState',\n '(@state.done)': 'onAnimationEnd($event)',\n },\n})\nexport class MatLegacySnackBarContainer extends _MatSnackBarContainerBase {\n protected override _afterPortalAttached() {\n super._afterPortalAttached();\n\n if (this.snackBarConfig.horizontalPosition === 'center') {\n this._elementRef.nativeElement.classList.add('mat-snack-bar-center');\n }\n\n if (this.snackBarConfig.verticalPosition === 'top') {\n this._elementRef.nativeElement.classList.add('mat-snack-bar-top');\n }\n }\n}\n","\n
\n \n
\n\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\nimport {OverlayModule} from '@angular/cdk/overlay';\nimport {PortalModule} from '@angular/cdk/portal';\nimport {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {MatCommonModule} from '@angular/material/core';\nimport {MatLegacyButtonModule} from '@angular/material/legacy-button';\nimport {LegacySimpleSnackBar} from './simple-snack-bar';\nimport {MatLegacySnackBarContainer} from './snack-bar-container';\n\n/**\n * @deprecated Use `MatSnackBarModule` from `@angular/material/snack-bar` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.\n * @breaking-change 17.0.0\n */\n@NgModule({\n imports: [OverlayModule, PortalModule, CommonModule, MatLegacyButtonModule, MatCommonModule],\n exports: [MatLegacySnackBarContainer, MatCommonModule],\n declarations: [MatLegacySnackBarContainer, LegacySimpleSnackBar],\n})\nexport class MatLegacySnackBarModule {}\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 {LegacySimpleSnackBar} from './simple-snack-bar';\nimport {\n _MatSnackBarBase,\n MAT_SNACK_BAR_DEFAULT_OPTIONS,\n MatSnackBarConfig,\n} from '@angular/material/snack-bar';\nimport {MatLegacySnackBarContainer} from './snack-bar-container';\nimport {MatLegacySnackBarModule} from './snack-bar-module';\n\n/**\n * Service to dispatch Material Design snack bar messages.\n * @deprecated Use `MatSnackBar` from `@angular/material/snack-bar` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.\n * @breaking-change 17.0.0\n */\n@Injectable({providedIn: MatLegacySnackBarModule})\nexport class MatLegacySnackBar extends _MatSnackBarBase {\n protected simpleSnackBarComponent = LegacySimpleSnackBar;\n protected snackBarContainerComponent = MatLegacySnackBarContainer;\n protected handsetCssClass = 'mat-snack-bar-handset';\n\n constructor(\n overlay: Overlay,\n live: LiveAnnouncer,\n injector: Injector,\n breakpointObserver: BreakpointObserver,\n @Optional() @SkipSelf() parentSnackBar: MatLegacySnackBar,\n @Inject(MAT_SNACK_BAR_DEFAULT_OPTIONS) defaultConfig: MatSnackBarConfig,\n ) {\n super(overlay, live, injector, breakpointObserver, parentSnackBar, defaultConfig);\n }\n}\n","/**\n * Generated bundle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