UNPKG

@angular/material

Version:
1 lines 30.5 kB
{"version":3,"file":"bottom-sheet.mjs","sources":["../../../../../../src/material/bottom-sheet/bottom-sheet-animations.ts","../../../../../../src/material/bottom-sheet/bottom-sheet-container.ts","../../../../../../src/material/bottom-sheet/bottom-sheet-container.html","../../../../../../src/material/bottom-sheet/bottom-sheet-config.ts","../../../../../../src/material/bottom-sheet/bottom-sheet-ref.ts","../../../../../../src/material/bottom-sheet/bottom-sheet.ts","../../../../../../src/material/bottom-sheet/bottom-sheet-module.ts","../../../../../../src/material/bottom-sheet/bottom-sheet_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.dev/license\n */\nimport {\n animate,\n state,\n style,\n transition,\n trigger,\n AnimationTriggerMetadata,\n group,\n query,\n animateChild,\n} from '@angular/animations';\nimport {AnimationCurves, AnimationDurations} from '@angular/material/core';\n\n/** Animations used by the Material bottom sheet. */\nexport const matBottomSheetAnimations: {\n readonly bottomSheetState: AnimationTriggerMetadata;\n} = {\n /** Animation that shows and hides a bottom sheet. */\n bottomSheetState: trigger('state', [\n state('void, hidden', style({transform: 'translateY(100%)'})),\n state('visible', style({transform: 'translateY(0%)'})),\n transition(\n 'visible => void, visible => hidden',\n group([\n animate(`${AnimationDurations.COMPLEX} ${AnimationCurves.ACCELERATION_CURVE}`),\n query('@*', animateChild(), {optional: true}),\n ]),\n ),\n transition(\n 'void => visible',\n group([\n animate(`${AnimationDurations.EXITING} ${AnimationCurves.DECELERATION_CURVE}`),\n query('@*', animateChild(), {optional: true}),\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.dev/license\n */\n\nimport {AnimationEvent} from '@angular/animations';\nimport {CdkDialogContainer} from '@angular/cdk/dialog';\nimport {BreakpointObserver, Breakpoints} from '@angular/cdk/layout';\nimport {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n OnDestroy,\n ViewEncapsulation,\n inject,\n} from '@angular/core';\nimport {Subscription} from 'rxjs';\nimport {matBottomSheetAnimations} from './bottom-sheet-animations';\nimport {CdkPortalOutlet} from '@angular/cdk/portal';\n\n/**\n * Internal component that wraps user-provided bottom sheet content.\n * @docs-private\n */\n@Component({\n selector: 'mat-bottom-sheet-container',\n templateUrl: 'bottom-sheet-container.html',\n styleUrl: 'bottom-sheet-container.css',\n // In Ivy embedded views will be change detected from their declaration place, rather than where\n // they were stamped out. This means that we can't have the bottom sheet container be OnPush,\n // because it might cause the sheets 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: [matBottomSheetAnimations.bottomSheetState],\n host: {\n 'class': 'mat-bottom-sheet-container',\n 'tabindex': '-1',\n '[attr.role]': '_config.role',\n '[attr.aria-modal]': '_config.ariaModal',\n '[attr.aria-label]': '_config.ariaLabel',\n '[@state]': '_animationState',\n '(@state.start)': '_onAnimationStart($event)',\n '(@state.done)': '_onAnimationDone($event)',\n },\n imports: [CdkPortalOutlet],\n})\nexport class MatBottomSheetContainer extends CdkDialogContainer implements OnDestroy {\n private _breakpointSubscription: Subscription;\n\n /** The state of the bottom sheet animations. */\n _animationState: 'void' | 'visible' | 'hidden' = 'void';\n\n /** Emits whenever the state of the animation changes. */\n _animationStateChanged = new EventEmitter<AnimationEvent>();\n\n /** Whether the component has been destroyed. */\n private _destroyed: boolean;\n\n constructor(...args: unknown[]);\n\n constructor() {\n super();\n\n const breakpointObserver = inject(BreakpointObserver);\n\n this._breakpointSubscription = breakpointObserver\n .observe([Breakpoints.Medium, Breakpoints.Large, Breakpoints.XLarge])\n .subscribe(() => {\n const classList = (this._elementRef.nativeElement as HTMLElement).classList;\n\n classList.toggle(\n 'mat-bottom-sheet-container-medium',\n breakpointObserver.isMatched(Breakpoints.Medium),\n );\n classList.toggle(\n 'mat-bottom-sheet-container-large',\n breakpointObserver.isMatched(Breakpoints.Large),\n );\n classList.toggle(\n 'mat-bottom-sheet-container-xlarge',\n breakpointObserver.isMatched(Breakpoints.XLarge),\n );\n });\n }\n\n /** Begin animation of bottom sheet entrance into view. */\n enter(): void {\n if (!this._destroyed) {\n this._animationState = 'visible';\n this._changeDetectorRef.markForCheck();\n this._changeDetectorRef.detectChanges();\n }\n }\n\n /** Begin animation of the bottom sheet exiting from view. */\n exit(): void {\n if (!this._destroyed) {\n this._animationState = 'hidden';\n this._changeDetectorRef.markForCheck();\n }\n }\n\n override ngOnDestroy() {\n super.ngOnDestroy();\n this._breakpointSubscription.unsubscribe();\n this._destroyed = true;\n }\n\n _onAnimationDone(event: AnimationEvent) {\n if (event.toState === 'visible') {\n this._trapFocus();\n }\n\n this._animationStateChanged.emit(event);\n }\n\n _onAnimationStart(event: AnimationEvent) {\n this._animationStateChanged.emit(event);\n }\n\n protected override _captureInitialFocus(): void {}\n}\n","<ng-template cdkPortalOutlet></ng-template>\r\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.dev/license\n */\n\nimport {Direction} from '@angular/cdk/bidi';\nimport {ScrollStrategy} from '@angular/cdk/overlay';\nimport {InjectionToken, ViewContainerRef} from '@angular/core';\n\n/** Options for where to set focus to automatically on dialog open */\nexport type AutoFocusTarget = 'dialog' | 'first-tabbable' | 'first-heading';\n\n/** Injection token that can be used to access the data that was passed in to a bottom sheet. */\nexport const MAT_BOTTOM_SHEET_DATA = new InjectionToken<any>('MatBottomSheetData');\n\n/**\n * Configuration used when opening a bottom sheet.\n */\nexport class MatBottomSheetConfig<D = any> {\n /** The view container to place the overlay for the bottom sheet into. */\n viewContainerRef?: ViewContainerRef;\n\n /** Extra CSS classes to be added to the bottom sheet container. */\n panelClass?: string | string[];\n\n /** Text layout direction for the bottom sheet. */\n direction?: Direction;\n\n /** Data being injected into the child component. */\n data?: D | null = null;\n\n /** Whether the bottom sheet has a backdrop. */\n hasBackdrop?: boolean = true;\n\n /** Custom class for the backdrop. */\n backdropClass?: string;\n\n /** Whether the user can use escape or clicking outside to close the bottom sheet. */\n disableClose?: boolean = false;\n\n /** Aria label to assign to the bottom sheet element. */\n ariaLabel?: string | null = null;\n\n /**\n * Whether this is a modal dialog. Used to set the `aria-modal` attribute. Off by default,\n * because it can interfere with other overlay-based components (e.g. `mat-select`) and because\n * it is redundant since the dialog marks all outside content as `aria-hidden` anyway.\n */\n ariaModal?: boolean = false;\n\n /**\n * Whether the bottom sheet should close when the user goes backwards/forwards in history.\n * Note that this usually doesn't include clicking on links (unless the user is using\n * the `HashLocationStrategy`).\n */\n closeOnNavigation?: boolean = true;\n\n // Note that this is set to 'dialog' by default, because while the a11y recommendations\n // are to focus the first focusable element, doing so prevents screen readers from reading out the\n // rest of the bottom sheet content.\n /**\n * Where the bottom sheet should focus on open.\n * @breaking-change 14.0.0 Remove boolean option from autoFocus. Use string or\n * AutoFocusTarget instead.\n */\n autoFocus?: AutoFocusTarget | string | boolean = 'dialog';\n\n /**\n * Whether the bottom sheet should restore focus to the\n * previously-focused element, after it's closed.\n */\n restoreFocus?: boolean = true;\n\n /** Scroll strategy to be used for the bottom sheet. */\n scrollStrategy?: ScrollStrategy;\n\n /** Height for the bottom sheet. */\n height?: string = '';\n\n /** Minimum height for the bottom sheet. If a number is provided, assumes pixel units. */\n minHeight?: number | string;\n\n /** Maximum height for the bottom sheet. If a number is provided, assumes pixel units. */\n maxHeight?: number | string;\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.dev/license\n */\n\nimport {ComponentRef} from '@angular/core';\nimport {DialogRef} from '@angular/cdk/dialog';\nimport {ESCAPE, hasModifierKey} from '@angular/cdk/keycodes';\nimport {merge, Observable, Subject} from 'rxjs';\nimport {filter, take} from 'rxjs/operators';\nimport {MatBottomSheetConfig} from './bottom-sheet-config';\nimport {MatBottomSheetContainer} from './bottom-sheet-container';\n\n/**\n * Reference to a bottom sheet dispatched from the bottom sheet service.\n */\nexport class MatBottomSheetRef<T = any, R = any> {\n /** Instance of the component making up the content of the bottom sheet. */\n get instance(): T {\n return this._ref.componentInstance!;\n }\n\n /**\n * `ComponentRef` of the component opened into the bottom sheet. Will be\n * null when the bottom sheet is opened using a `TemplateRef`.\n */\n get componentRef(): ComponentRef<T> | null {\n return this._ref.componentRef;\n }\n\n /**\n * Instance of the component into which the bottom sheet content is projected.\n * @docs-private\n */\n containerInstance: MatBottomSheetContainer;\n\n /** Whether the user is allowed to close the bottom sheet. */\n disableClose: boolean | undefined;\n\n /** Subject for notifying the user that the bottom sheet has opened and appeared. */\n private readonly _afterOpened = new Subject<void>();\n\n /** Result to be passed down to the `afterDismissed` stream. */\n private _result: R | undefined;\n\n /** Handle to the timeout that's running as a fallback in case the exit animation doesn't fire. */\n private _closeFallbackTimeout: ReturnType<typeof setTimeout>;\n\n constructor(\n private _ref: DialogRef<R, T>,\n config: MatBottomSheetConfig,\n containerInstance: MatBottomSheetContainer,\n ) {\n this.containerInstance = containerInstance;\n this.disableClose = config.disableClose;\n\n // Emit when opening animation completes\n containerInstance._animationStateChanged\n .pipe(\n filter(event => event.phaseName === 'done' && event.toState === 'visible'),\n take(1),\n )\n .subscribe(() => {\n this._afterOpened.next();\n this._afterOpened.complete();\n });\n\n // Dispose overlay when closing animation is complete\n containerInstance._animationStateChanged\n .pipe(\n filter(event => event.phaseName === 'done' && event.toState === 'hidden'),\n take(1),\n )\n .subscribe(() => {\n clearTimeout(this._closeFallbackTimeout);\n this._ref.close(this._result);\n });\n\n _ref.overlayRef.detachments().subscribe(() => {\n this._ref.close(this._result);\n });\n\n merge(\n this.backdropClick(),\n this.keydownEvents().pipe(filter(event => event.keyCode === ESCAPE)),\n ).subscribe(event => {\n if (\n !this.disableClose &&\n (event.type !== 'keydown' || !hasModifierKey(event as KeyboardEvent))\n ) {\n event.preventDefault();\n this.dismiss();\n }\n });\n }\n\n /**\n * Dismisses the bottom sheet.\n * @param result Data to be passed back to the bottom sheet opener.\n */\n dismiss(result?: R): void {\n if (!this.containerInstance) {\n return;\n }\n\n // Transition the backdrop in parallel to the bottom sheet.\n this.containerInstance._animationStateChanged\n .pipe(\n filter(event => event.phaseName === 'start'),\n take(1),\n )\n .subscribe(event => {\n // The logic that disposes of the overlay depends on the exit animation completing, however\n // it isn't guaranteed if the parent view is destroyed while it's running. Add a fallback\n // timeout which will clean everything up if the animation hasn't fired within the specified\n // amount of time plus 100ms. We don't need to run this outside the NgZone, because for the\n // vast majority of cases the timeout will have been cleared before it has fired.\n this._closeFallbackTimeout = setTimeout(() => {\n this._ref.close(this._result);\n }, event.totalTime + 100);\n\n this._ref.overlayRef.detachBackdrop();\n });\n\n this._result = result;\n this.containerInstance.exit();\n this.containerInstance = null!;\n }\n\n /** Gets an observable that is notified when the bottom sheet is finished closing. */\n afterDismissed(): Observable<R | undefined> {\n return this._ref.closed;\n }\n\n /** Gets an observable that is notified when the bottom sheet has opened and appeared. */\n afterOpened(): Observable<void> {\n return this._afterOpened;\n }\n\n /**\n * Gets an observable that emits when the overlay's backdrop has been clicked.\n */\n backdropClick(): Observable<MouseEvent> {\n return this._ref.backdropClick;\n }\n\n /**\n * Gets an observable that emits when keydown events are targeted on the overlay.\n */\n keydownEvents(): Observable<KeyboardEvent> {\n return this._ref.keydownEvents;\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.dev/license\n */\n\nimport {Dialog} from '@angular/cdk/dialog';\nimport {Overlay} from '@angular/cdk/overlay';\nimport {ComponentType} from '@angular/cdk/portal';\nimport {Injectable, TemplateRef, InjectionToken, OnDestroy, inject} from '@angular/core';\nimport {MAT_BOTTOM_SHEET_DATA, MatBottomSheetConfig} from './bottom-sheet-config';\nimport {MatBottomSheetContainer} from './bottom-sheet-container';\nimport {MatBottomSheetRef} from './bottom-sheet-ref';\n\n/** Injection token that can be used to specify default bottom sheet options. */\nexport const MAT_BOTTOM_SHEET_DEFAULT_OPTIONS = new InjectionToken<MatBottomSheetConfig>(\n 'mat-bottom-sheet-default-options',\n);\n\n/**\n * Service to trigger Material Design bottom sheets.\n */\n@Injectable({providedIn: 'root'})\nexport class MatBottomSheet implements OnDestroy {\n private _overlay = inject(Overlay);\n private _parentBottomSheet = inject(MatBottomSheet, {optional: true, skipSelf: true});\n private _defaultOptions = inject<MatBottomSheetConfig>(MAT_BOTTOM_SHEET_DEFAULT_OPTIONS, {\n optional: true,\n });\n\n private _bottomSheetRefAtThisLevel: MatBottomSheetRef<any> | null = null;\n private _dialog = inject(Dialog);\n\n /** Reference to the currently opened bottom sheet. */\n get _openedBottomSheetRef(): MatBottomSheetRef<any> | null {\n const parent = this._parentBottomSheet;\n return parent ? parent._openedBottomSheetRef : this._bottomSheetRefAtThisLevel;\n }\n\n set _openedBottomSheetRef(value: MatBottomSheetRef<any> | null) {\n if (this._parentBottomSheet) {\n this._parentBottomSheet._openedBottomSheetRef = value;\n } else {\n this._bottomSheetRefAtThisLevel = value;\n }\n }\n\n constructor(...args: unknown[]);\n constructor() {}\n\n /**\n * Opens a bottom sheet containing the given component.\n * @param component Type of the component to load into the bottom sheet.\n * @param config Extra configuration options.\n * @returns Reference to the newly-opened bottom sheet.\n */\n open<T, D = any, R = any>(\n component: ComponentType<T>,\n config?: MatBottomSheetConfig<D>,\n ): MatBottomSheetRef<T, R>;\n\n /**\n * Opens a bottom sheet containing the given template.\n * @param template TemplateRef to instantiate as the bottom sheet content.\n * @param config Extra configuration options.\n * @returns Reference to the newly-opened bottom sheet.\n */\n open<T, D = any, R = any>(\n template: TemplateRef<T>,\n config?: MatBottomSheetConfig<D>,\n ): MatBottomSheetRef<T, R>;\n\n open<T, D = any, R = any>(\n componentOrTemplateRef: ComponentType<T> | TemplateRef<T>,\n config?: MatBottomSheetConfig<D>,\n ): MatBottomSheetRef<T, R> {\n const _config = {...(this._defaultOptions || new MatBottomSheetConfig()), ...config};\n let ref: MatBottomSheetRef<T, R>;\n\n this._dialog.open<R, D, T>(componentOrTemplateRef, {\n ..._config,\n // Disable closing since we need to sync it up to the animation ourselves.\n disableClose: true,\n // Disable closing on detachments so that we can sync up the animation.\n closeOnOverlayDetachments: false,\n maxWidth: '100%',\n container: MatBottomSheetContainer,\n scrollStrategy: _config.scrollStrategy || this._overlay.scrollStrategies.block(),\n positionStrategy: this._overlay.position().global().centerHorizontally().bottom('0'),\n templateContext: () => ({bottomSheetRef: ref}),\n providers: (cdkRef, _cdkConfig, container) => {\n ref = new MatBottomSheetRef(cdkRef, _config, container as MatBottomSheetContainer);\n return [\n {provide: MatBottomSheetRef, useValue: ref},\n {provide: MAT_BOTTOM_SHEET_DATA, useValue: _config.data},\n ];\n },\n });\n\n // When the bottom sheet is dismissed, clear the reference to it.\n ref!.afterDismissed().subscribe(() => {\n // Clear the bottom sheet ref if it hasn't already been replaced by a newer one.\n if (this._openedBottomSheetRef === ref) {\n this._openedBottomSheetRef = null;\n }\n });\n\n if (this._openedBottomSheetRef) {\n // If a bottom sheet is already in view, dismiss it and enter the\n // new bottom sheet after exit animation is complete.\n this._openedBottomSheetRef.afterDismissed().subscribe(() => ref.containerInstance?.enter());\n this._openedBottomSheetRef.dismiss();\n } else {\n // If no bottom sheet is in view, enter the new bottom sheet.\n ref!.containerInstance.enter();\n }\n\n this._openedBottomSheetRef = ref!;\n return ref!;\n }\n\n /**\n * Dismisses the currently-visible bottom sheet.\n * @param result Data to pass to the bottom sheet instance.\n */\n dismiss<R = any>(result?: R): void {\n if (this._openedBottomSheetRef) {\n this._openedBottomSheetRef.dismiss(result);\n }\n }\n\n ngOnDestroy() {\n if (this._bottomSheetRefAtThisLevel) {\n this._bottomSheetRefAtThisLevel.dismiss();\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.dev/license\n */\n\nimport {DialogModule} from '@angular/cdk/dialog';\nimport {PortalModule} from '@angular/cdk/portal';\nimport {NgModule} from '@angular/core';\nimport {MatCommonModule} from '@angular/material/core';\nimport {MatBottomSheetContainer} from './bottom-sheet-container';\nimport {MatBottomSheet} from './bottom-sheet';\n\n@NgModule({\n imports: [DialogModule, MatCommonModule, PortalModule, MatBottomSheetContainer],\n exports: [MatBottomSheetContainer, MatCommonModule],\n providers: [MatBottomSheet],\n})\nexport class MatBottomSheetModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;AAoBA;AACa,MAAA,wBAAwB,GAEjC;;AAEF,IAAA,gBAAgB,EAAE,OAAO,CAAC,OAAO,EAAE;QACjC,KAAK,CAAC,cAAc,EAAE,KAAK,CAAC,EAAC,SAAS,EAAE,kBAAkB,EAAC,CAAC,CAAC;QAC7D,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,EAAC,SAAS,EAAE,gBAAgB,EAAC,CAAC,CAAC;AACtD,QAAA,UAAU,CACR,oCAAoC,EACpC,KAAK,CAAC;YACJ,OAAO,CAAC,CAAG,EAAA,kBAAkB,CAAC,OAAO,IAAI,eAAe,CAAC,kBAAkB,CAAA,CAAE,CAAC;YAC9E,KAAK,CAAC,IAAI,EAAE,YAAY,EAAE,EAAE,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC;AAC9C,SAAA,CAAC,CACH;AACD,QAAA,UAAU,CACR,iBAAiB,EACjB,KAAK,CAAC;YACJ,OAAO,CAAC,CAAG,EAAA,kBAAkB,CAAC,OAAO,IAAI,eAAe,CAAC,kBAAkB,CAAA,CAAE,CAAC;YAC9E,KAAK,CAAC,IAAI,EAAE,YAAY,EAAE,EAAE,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC;AAC9C,SAAA,CAAC,CACH;KACF,CAAC;;;ACnBJ;;;AAGG;AAwBG,MAAO,uBAAwB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