@angular/material 13.2.3 → 13.2.6

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.
Files changed (136) hide show
  1. package/autocomplete/autocomplete-trigger.d.ts +1 -0
  2. package/button-toggle/_button-toggle-theme.scss +14 -2
  3. package/checkbox/_checkbox-theme.scss +1 -1
  4. package/core/theming/_theming.scss +9 -0
  5. package/dialog/dialog-config.d.ts +2 -0
  6. package/dialog/dialog-container.d.ts +1 -4
  7. package/dialog/dialog.d.ts +12 -6
  8. package/dialog/testing/dialog-opener.d.ts +33 -0
  9. package/dialog/testing/public-api.d.ts +1 -0
  10. package/esm2020/autocomplete/autocomplete-trigger.mjs +19 -6
  11. package/esm2020/bottom-sheet/bottom-sheet-animations.mjs +10 -4
  12. package/esm2020/button/button.mjs +3 -3
  13. package/esm2020/button-toggle/button-toggle.mjs +2 -2
  14. package/esm2020/checkbox/checkbox.mjs +4 -2
  15. package/esm2020/core/version.mjs +1 -1
  16. package/esm2020/datepicker/calendar.mjs +9 -9
  17. package/esm2020/datepicker/datepicker-input-base.mjs +9 -4
  18. package/esm2020/dialog/dialog-animations.mjs +10 -4
  19. package/esm2020/dialog/dialog-config.mjs +3 -1
  20. package/esm2020/dialog/dialog-container.mjs +14 -14
  21. package/esm2020/dialog/dialog.mjs +15 -31
  22. package/esm2020/dialog/testing/dialog-opener.mjs +67 -0
  23. package/esm2020/dialog/testing/public-api.mjs +2 -1
  24. package/esm2020/expansion/expansion-panel.mjs +3 -3
  25. package/esm2020/form-field/form-field.mjs +3 -3
  26. package/esm2020/menu/menu-item.mjs +5 -1
  27. package/esm2020/menu/menu.mjs +17 -1
  28. package/esm2020/progress-spinner/progress-spinner-module.mjs +5 -5
  29. package/esm2020/progress-spinner/progress-spinner.mjs +8 -48
  30. package/esm2020/progress-spinner/public-api.mjs +10 -2
  31. package/esm2020/radio/radio.mjs +3 -3
  32. package/esm2020/select/select.mjs +14 -4
  33. package/esm2020/sidenav/drawer.mjs +3 -3
  34. package/esm2020/sidenav/sidenav.mjs +3 -3
  35. package/esm2020/slide-toggle/slide-toggle.mjs +3 -2
  36. package/esm2020/sort/sort-header.mjs +4 -4
  37. package/esm2020/tabs/tab-body.mjs +3 -3
  38. package/esm2020/tabs/tab-header.mjs +3 -3
  39. package/esm2020/tooltip/testing/tooltip-harness.mjs +12 -7
  40. package/esm2020/tooltip/tooltip.mjs +117 -42
  41. package/fesm2015/autocomplete.mjs +19 -6
  42. package/fesm2015/autocomplete.mjs.map +1 -1
  43. package/fesm2015/bottom-sheet.mjs +9 -3
  44. package/fesm2015/bottom-sheet.mjs.map +1 -1
  45. package/fesm2015/button-toggle.mjs +2 -2
  46. package/fesm2015/button.mjs +2 -2
  47. package/fesm2015/button.mjs.map +1 -1
  48. package/fesm2015/checkbox.mjs +3 -1
  49. package/fesm2015/checkbox.mjs.map +1 -1
  50. package/fesm2015/core.mjs +1 -1
  51. package/fesm2015/core.mjs.map +1 -1
  52. package/fesm2015/datepicker.mjs +15 -10
  53. package/fesm2015/datepicker.mjs.map +1 -1
  54. package/fesm2015/dialog/testing.mjs +65 -2
  55. package/fesm2015/dialog/testing.mjs.map +1 -1
  56. package/fesm2015/dialog.mjs +38 -46
  57. package/fesm2015/dialog.mjs.map +1 -1
  58. package/fesm2015/expansion.mjs +2 -2
  59. package/fesm2015/expansion.mjs.map +1 -1
  60. package/fesm2015/form-field.mjs +2 -2
  61. package/fesm2015/form-field.mjs.map +1 -1
  62. package/fesm2015/menu.mjs +21 -0
  63. package/fesm2015/menu.mjs.map +1 -1
  64. package/fesm2015/progress-spinner.mjs +22 -57
  65. package/fesm2015/progress-spinner.mjs.map +1 -1
  66. package/fesm2015/radio.mjs +2 -2
  67. package/fesm2015/radio.mjs.map +1 -1
  68. package/fesm2015/select.mjs +13 -3
  69. package/fesm2015/select.mjs.map +1 -1
  70. package/fesm2015/sidenav.mjs +4 -4
  71. package/fesm2015/sidenav.mjs.map +1 -1
  72. package/fesm2015/slide-toggle.mjs +2 -1
  73. package/fesm2015/slide-toggle.mjs.map +1 -1
  74. package/fesm2015/sort.mjs +3 -3
  75. package/fesm2015/sort.mjs.map +1 -1
  76. package/fesm2015/tabs.mjs +4 -4
  77. package/fesm2015/tabs.mjs.map +1 -1
  78. package/fesm2015/tooltip/testing.mjs +11 -8
  79. package/fesm2015/tooltip/testing.mjs.map +1 -1
  80. package/fesm2015/tooltip.mjs +141 -66
  81. package/fesm2015/tooltip.mjs.map +1 -1
  82. package/fesm2020/autocomplete.mjs +19 -6
  83. package/fesm2020/autocomplete.mjs.map +1 -1
  84. package/fesm2020/bottom-sheet.mjs +9 -3
  85. package/fesm2020/bottom-sheet.mjs.map +1 -1
  86. package/fesm2020/button-toggle.mjs +2 -2
  87. package/fesm2020/button.mjs +2 -2
  88. package/fesm2020/button.mjs.map +1 -1
  89. package/fesm2020/checkbox.mjs +3 -1
  90. package/fesm2020/checkbox.mjs.map +1 -1
  91. package/fesm2020/core.mjs +1 -1
  92. package/fesm2020/core.mjs.map +1 -1
  93. package/fesm2020/datepicker.mjs +15 -10
  94. package/fesm2020/datepicker.mjs.map +1 -1
  95. package/fesm2020/dialog/testing.mjs +65 -1
  96. package/fesm2020/dialog/testing.mjs.map +1 -1
  97. package/fesm2020/dialog.mjs +38 -46
  98. package/fesm2020/dialog.mjs.map +1 -1
  99. package/fesm2020/expansion.mjs +2 -2
  100. package/fesm2020/expansion.mjs.map +1 -1
  101. package/fesm2020/form-field.mjs +2 -2
  102. package/fesm2020/form-field.mjs.map +1 -1
  103. package/fesm2020/menu.mjs +20 -0
  104. package/fesm2020/menu.mjs.map +1 -1
  105. package/fesm2020/progress-spinner.mjs +22 -55
  106. package/fesm2020/progress-spinner.mjs.map +1 -1
  107. package/fesm2020/radio.mjs +2 -2
  108. package/fesm2020/radio.mjs.map +1 -1
  109. package/fesm2020/select.mjs +13 -3
  110. package/fesm2020/select.mjs.map +1 -1
  111. package/fesm2020/sidenav.mjs +4 -4
  112. package/fesm2020/sidenav.mjs.map +1 -1
  113. package/fesm2020/slide-toggle.mjs +2 -1
  114. package/fesm2020/slide-toggle.mjs.map +1 -1
  115. package/fesm2020/sort.mjs +3 -3
  116. package/fesm2020/sort.mjs.map +1 -1
  117. package/fesm2020/tabs.mjs +4 -4
  118. package/fesm2020/tabs.mjs.map +1 -1
  119. package/fesm2020/tooltip/testing.mjs +11 -6
  120. package/fesm2020/tooltip/testing.mjs.map +1 -1
  121. package/fesm2020/tooltip.mjs +134 -58
  122. package/fesm2020/tooltip.mjs.map +1 -1
  123. package/menu/menu-item.d.ts +3 -2
  124. package/package.json +2 -2
  125. package/prebuilt-themes/deeppurple-amber.css +1 -1
  126. package/prebuilt-themes/indigo-pink.css +1 -1
  127. package/prebuilt-themes/pink-bluegrey.css +1 -1
  128. package/prebuilt-themes/purple-green.css +1 -1
  129. package/progress-spinner/progress-spinner-module.d.ts +1 -1
  130. package/progress-spinner/progress-spinner.d.ts +1 -18
  131. package/progress-spinner/public-api.d.ts +8 -1
  132. package/schematics/ng-add/index.js +1 -1
  133. package/schematics/ng-add/index.mjs +1 -1
  134. package/select/select.d.ts +5 -0
  135. package/tooltip/testing/tooltip-harness.d.ts +6 -0
  136. package/tooltip/tooltip.d.ts +36 -8
@@ -1 +1 @@
1
- {"version":3,"file":"autocomplete.mjs","sources":["../../../../../../src/material/autocomplete/autocomplete.ts","../../../../../../src/material/autocomplete/autocomplete.html","../../../../../../src/material/autocomplete/autocomplete-origin.ts","../../../../../../src/material/autocomplete/autocomplete-trigger.ts","../../../../../../src/material/autocomplete/autocomplete-module.ts","../../../../../../src/material/autocomplete/public-api.ts","../../../../../../src/material/autocomplete/index.ts","../../../../../../src/material/autocomplete/autocomplete_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 {ActiveDescendantKeyManager} from '@angular/cdk/a11y';\nimport {BooleanInput, coerceBooleanProperty, coerceStringArray} from '@angular/cdk/coercion';\nimport {Platform} from '@angular/cdk/platform';\nimport {\n AfterContentInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChildren,\n ElementRef,\n EventEmitter,\n Inject,\n InjectionToken,\n Input,\n Output,\n QueryList,\n TemplateRef,\n ViewChild,\n ViewEncapsulation,\n OnDestroy,\n Directive,\n} from '@angular/core';\nimport {\n CanDisableRipple,\n MAT_OPTGROUP,\n MAT_OPTION_PARENT_COMPONENT,\n _MatOptgroupBase,\n _MatOptionBase,\n mixinDisableRipple,\n MatOption,\n MatOptgroup,\n} from '@angular/material/core';\nimport {Subscription} from 'rxjs';\n\n/**\n * Autocomplete IDs need to be unique across components, so this counter exists outside of\n * the component definition.\n */\nlet _uniqueAutocompleteIdCounter = 0;\n\n/** Event object that is emitted when an autocomplete option is selected. */\nexport class MatAutocompleteSelectedEvent {\n constructor(\n /** Reference to the autocomplete panel that emitted the event. */\n public source: _MatAutocompleteBase,\n /** Option that was selected. */\n public option: _MatOptionBase,\n ) {}\n}\n\n/** Event object that is emitted when an autocomplete option is activated. */\nexport interface MatAutocompleteActivatedEvent {\n /** Reference to the autocomplete panel that emitted the event. */\n source: _MatAutocompleteBase;\n\n /** Option that was selected. */\n option: _MatOptionBase | null;\n}\n\n// Boilerplate for applying mixins to MatAutocomplete.\n/** @docs-private */\nconst _MatAutocompleteMixinBase = mixinDisableRipple(class {});\n\n/** Default `mat-autocomplete` options that can be overridden. */\nexport interface MatAutocompleteDefaultOptions {\n /** Whether the first option should be highlighted when an autocomplete panel is opened. */\n autoActiveFirstOption?: boolean;\n\n /** Class or list of classes to be applied to the autocomplete's overlay panel. */\n overlayPanelClass?: string | string[];\n}\n\n/** Injection token to be used to override the default options for `mat-autocomplete`. */\nexport const MAT_AUTOCOMPLETE_DEFAULT_OPTIONS = new InjectionToken<MatAutocompleteDefaultOptions>(\n 'mat-autocomplete-default-options',\n {\n providedIn: 'root',\n factory: MAT_AUTOCOMPLETE_DEFAULT_OPTIONS_FACTORY,\n },\n);\n\n/** @docs-private */\nexport function MAT_AUTOCOMPLETE_DEFAULT_OPTIONS_FACTORY(): MatAutocompleteDefaultOptions {\n return {autoActiveFirstOption: false};\n}\n\n/** Base class with all of the `MatAutocomplete` functionality. */\n@Directive()\nexport abstract class _MatAutocompleteBase\n extends _MatAutocompleteMixinBase\n implements AfterContentInit, CanDisableRipple, OnDestroy\n{\n private _activeOptionChanges = Subscription.EMPTY;\n\n /** Class to apply to the panel when it's visible. */\n protected abstract _visibleClass: string;\n\n /** Class to apply to the panel when it's hidden. */\n protected abstract _hiddenClass: string;\n\n /** Manages active item in option list based on key events. */\n _keyManager: ActiveDescendantKeyManager<_MatOptionBase>;\n\n /** Whether the autocomplete panel should be visible, depending on option length. */\n showPanel: boolean = false;\n\n /** Whether the autocomplete panel is open. */\n get isOpen(): boolean {\n return this._isOpen && this.showPanel;\n }\n _isOpen: boolean = false;\n\n // The @ViewChild query for TemplateRef here needs to be static because some code paths\n // lead to the overlay being created before change detection has finished for this component.\n // Notably, another component may trigger `focus` on the autocomplete-trigger.\n\n /** @docs-private */\n @ViewChild(TemplateRef, {static: true}) template: TemplateRef<any>;\n\n /** Element for the panel containing the autocomplete options. */\n @ViewChild('panel') panel: ElementRef;\n\n /** Reference to all options within the autocomplete. */\n abstract options: QueryList<_MatOptionBase>;\n\n /** Reference to all option groups within the autocomplete. */\n abstract optionGroups: QueryList<_MatOptgroupBase>;\n\n /** Aria label of the autocomplete. */\n @Input('aria-label') ariaLabel: string;\n\n /** Input that can be used to specify the `aria-labelledby` attribute. */\n @Input('aria-labelledby') ariaLabelledby: string;\n\n /** Function that maps an option's control value to its display value in the trigger. */\n @Input() displayWith: ((value: any) => string) | null = null;\n\n /**\n * Whether the first option should be highlighted when the autocomplete panel is opened.\n * Can be configured globally through the `MAT_AUTOCOMPLETE_DEFAULT_OPTIONS` token.\n */\n @Input()\n get autoActiveFirstOption(): boolean {\n return this._autoActiveFirstOption;\n }\n set autoActiveFirstOption(value: BooleanInput) {\n this._autoActiveFirstOption = coerceBooleanProperty(value);\n }\n private _autoActiveFirstOption: boolean;\n\n /**\n * Specify the width of the autocomplete panel. Can be any CSS sizing value, otherwise it will\n * match the width of its host.\n */\n @Input() panelWidth: string | number;\n\n /** Event that is emitted whenever an option from the list is selected. */\n @Output() readonly optionSelected: EventEmitter<MatAutocompleteSelectedEvent> =\n new EventEmitter<MatAutocompleteSelectedEvent>();\n\n /** Event that is emitted when the autocomplete panel is opened. */\n @Output() readonly opened: EventEmitter<void> = new EventEmitter<void>();\n\n /** Event that is emitted when the autocomplete panel is closed. */\n @Output() readonly closed: EventEmitter<void> = new EventEmitter<void>();\n\n /** Emits whenever an option is activated using the keyboard. */\n @Output() readonly optionActivated: EventEmitter<MatAutocompleteActivatedEvent> =\n new EventEmitter<MatAutocompleteActivatedEvent>();\n\n /**\n * Takes classes set on the host mat-autocomplete element and applies them to the panel\n * inside the overlay container to allow for easy styling.\n */\n @Input('class')\n set classList(value: string | string[]) {\n if (value && value.length) {\n this._classList = coerceStringArray(value).reduce((classList, className) => {\n classList[className] = true;\n return classList;\n }, {} as {[key: string]: boolean});\n } else {\n this._classList = {};\n }\n\n this._setVisibilityClasses(this._classList);\n this._elementRef.nativeElement.className = '';\n }\n _classList: {[key: string]: boolean} = {};\n\n /** Unique ID to be used by autocomplete trigger's \"aria-owns\" property. */\n id: string = `mat-autocomplete-${_uniqueAutocompleteIdCounter++}`;\n\n /**\n * Tells any descendant `mat-optgroup` to use the inert a11y pattern.\n * @docs-private\n */\n readonly inertGroups: boolean;\n\n constructor(\n private _changeDetectorRef: ChangeDetectorRef,\n private _elementRef: ElementRef<HTMLElement>,\n @Inject(MAT_AUTOCOMPLETE_DEFAULT_OPTIONS) defaults: MatAutocompleteDefaultOptions,\n platform?: Platform,\n ) {\n super();\n\n // TODO(crisbeto): the problem that the `inertGroups` option resolves is only present on\n // Safari using VoiceOver. We should occasionally check back to see whether the bug\n // wasn't resolved in VoiceOver, and if it has, we can remove this and the `inertGroups`\n // option altogether.\n this.inertGroups = platform?.SAFARI || false;\n this._autoActiveFirstOption = !!defaults.autoActiveFirstOption;\n }\n\n ngAfterContentInit() {\n this._keyManager = new ActiveDescendantKeyManager<_MatOptionBase>(this.options).withWrap();\n this._activeOptionChanges = this._keyManager.change.subscribe(index => {\n if (this.isOpen) {\n this.optionActivated.emit({source: this, option: this.options.toArray()[index] || null});\n }\n });\n\n // Set the initial visibility state.\n this._setVisibility();\n }\n\n ngOnDestroy() {\n this._activeOptionChanges.unsubscribe();\n }\n\n /**\n * Sets the panel scrollTop. This allows us to manually scroll to display options\n * above or below the fold, as they are not actually being focused when active.\n */\n _setScrollTop(scrollTop: number): void {\n if (this.panel) {\n this.panel.nativeElement.scrollTop = scrollTop;\n }\n }\n\n /** Returns the panel's scrollTop. */\n _getScrollTop(): number {\n return this.panel ? this.panel.nativeElement.scrollTop : 0;\n }\n\n /** Panel should hide itself when the option list is empty. */\n _setVisibility() {\n this.showPanel = !!this.options.length;\n this._setVisibilityClasses(this._classList);\n this._changeDetectorRef.markForCheck();\n }\n\n /** Emits the `select` event. */\n _emitSelectEvent(option: _MatOptionBase): void {\n const event = new MatAutocompleteSelectedEvent(this, option);\n this.optionSelected.emit(event);\n }\n\n /** Gets the aria-labelledby for the autocomplete panel. */\n _getPanelAriaLabelledby(labelId: string | null): string | null {\n if (this.ariaLabel) {\n return null;\n }\n\n const labelExpression = labelId ? labelId + ' ' : '';\n return this.ariaLabelledby ? labelExpression + this.ariaLabelledby : labelId;\n }\n\n /** Sets the autocomplete visibility classes on a classlist based on the panel is visible. */\n private _setVisibilityClasses(classList: {[key: string]: boolean}) {\n classList[this._visibleClass] = this.showPanel;\n classList[this._hiddenClass] = !this.showPanel;\n }\n}\n\n@Component({\n selector: 'mat-autocomplete',\n templateUrl: 'autocomplete.html',\n styleUrls: ['autocomplete.css'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n exportAs: 'matAutocomplete',\n inputs: ['disableRipple'],\n host: {\n 'class': 'mat-autocomplete',\n },\n providers: [{provide: MAT_OPTION_PARENT_COMPONENT, useExisting: MatAutocomplete}],\n})\nexport class MatAutocomplete extends _MatAutocompleteBase {\n /** Reference to all option groups within the autocomplete. */\n @ContentChildren(MAT_OPTGROUP, {descendants: true}) optionGroups: QueryList<MatOptgroup>;\n /** Reference to all options within the autocomplete. */\n @ContentChildren(MatOption, {descendants: true}) options: QueryList<MatOption>;\n protected _visibleClass = 'mat-autocomplete-visible';\n protected _hiddenClass = 'mat-autocomplete-hidden';\n}\n","<ng-template let-formFieldId=\"id\">\n <div class=\"mat-autocomplete-panel\"\n role=\"listbox\"\n [id]=\"id\"\n [attr.aria-label]=\"ariaLabel || null\"\n [attr.aria-labelledby]=\"_getPanelAriaLabelledby(formFieldId)\"\n [ngClass]=\"_classList\"\n #panel>\n <ng-content></ng-content>\n </div>\n</ng-template>\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 {Directive, ElementRef} from '@angular/core';\n\n/** Base class containing all of the functionality for `MatAutocompleteOrigin`. */\n@Directive()\nexport abstract class _MatAutocompleteOriginBase {\n constructor(\n /** Reference to the element on which the directive is applied. */\n public elementRef: ElementRef<HTMLElement>,\n ) {}\n}\n\n/**\n * Directive applied to an element to make it usable\n * as a connection point for an autocomplete panel.\n */\n@Directive({\n selector: '[matAutocompleteOrigin]',\n exportAs: 'matAutocompleteOrigin',\n})\nexport class MatAutocompleteOrigin extends _MatAutocompleteOriginBase {}\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 */\nimport {Directionality} from '@angular/cdk/bidi';\nimport {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {DOWN_ARROW, ENTER, ESCAPE, TAB, UP_ARROW, hasModifierKey} from '@angular/cdk/keycodes';\nimport {\n FlexibleConnectedPositionStrategy,\n Overlay,\n OverlayConfig,\n OverlayRef,\n PositionStrategy,\n ScrollStrategy,\n ConnectedPosition,\n} from '@angular/cdk/overlay';\nimport {_getEventTarget} from '@angular/cdk/platform';\nimport {TemplatePortal} from '@angular/cdk/portal';\nimport {ViewportRuler} from '@angular/cdk/scrolling';\nimport {DOCUMENT} from '@angular/common';\nimport {\n AfterViewInit,\n ChangeDetectorRef,\n Directive,\n ElementRef,\n forwardRef,\n Host,\n Inject,\n InjectionToken,\n Input,\n NgZone,\n OnDestroy,\n Optional,\n ViewContainerRef,\n OnChanges,\n SimpleChanges,\n} from '@angular/core';\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from '@angular/forms';\nimport {\n _countGroupLabelsBeforeOption,\n _getOptionScrollPosition,\n MatOption,\n MatOptionSelectionChange,\n} from '@angular/material/core';\nimport {MAT_FORM_FIELD, MatFormField} from '@angular/material/form-field';\nimport {defer, fromEvent, merge, Observable, of as observableOf, Subject, Subscription} from 'rxjs';\nimport {delay, filter, map, switchMap, take, tap, startWith} from 'rxjs/operators';\n\nimport {\n _MatAutocompleteBase,\n MAT_AUTOCOMPLETE_DEFAULT_OPTIONS,\n MatAutocompleteDefaultOptions,\n} from './autocomplete';\nimport {_MatAutocompleteOriginBase} from './autocomplete-origin';\n\n/** Injection token that determines the scroll handling while the autocomplete panel is open. */\nexport const MAT_AUTOCOMPLETE_SCROLL_STRATEGY = new InjectionToken<() => ScrollStrategy>(\n 'mat-autocomplete-scroll-strategy',\n);\n\n/** @docs-private */\nexport function MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY(overlay: Overlay): () => ScrollStrategy {\n return () => overlay.scrollStrategies.reposition();\n}\n\n/** @docs-private */\nexport const MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY_PROVIDER = {\n provide: MAT_AUTOCOMPLETE_SCROLL_STRATEGY,\n deps: [Overlay],\n useFactory: MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY,\n};\n\n/**\n * Provider that allows the autocomplete to register as a ControlValueAccessor.\n * @docs-private\n */\nexport const MAT_AUTOCOMPLETE_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => MatAutocompleteTrigger),\n multi: true,\n};\n\n/**\n * Creates an error to be thrown when attempting to use an autocomplete trigger without a panel.\n * @docs-private\n */\nexport function getMatAutocompleteMissingPanelError(): Error {\n return Error(\n 'Attempting to open an undefined instance of `mat-autocomplete`. ' +\n 'Make sure that the id passed to the `matAutocomplete` is correct and that ' +\n \"you're attempting to open it after the ngAfterContentInit hook.\",\n );\n}\n\n/** Base class with all of the `MatAutocompleteTrigger` functionality. */\n@Directive()\nexport abstract class _MatAutocompleteTriggerBase\n implements ControlValueAccessor, AfterViewInit, OnChanges, OnDestroy\n{\n private _overlayRef: OverlayRef | null;\n private _portal: TemplatePortal;\n private _componentDestroyed = false;\n private _autocompleteDisabled = false;\n private _scrollStrategy: () => ScrollStrategy;\n\n /** Old value of the native input. Used to work around issues with the `input` event on IE. */\n private _previousValue: string | number | null;\n\n /** Strategy that is used to position the panel. */\n private _positionStrategy: FlexibleConnectedPositionStrategy;\n\n /** Whether or not the label state is being overridden. */\n private _manuallyFloatingLabel = false;\n\n /** The subscription for closing actions (some are bound to document). */\n private _closingActionsSubscription: Subscription;\n\n /** Subscription to viewport size changes. */\n private _viewportSubscription = Subscription.EMPTY;\n\n /**\n * Whether the autocomplete can open the next time it is focused. Used to prevent a focused,\n * closed autocomplete from being reopened if the user switches to another browser tab and then\n * comes back.\n */\n private _canOpenOnNextFocus = true;\n\n /** Stream of keyboard events that can close the panel. */\n private readonly _closeKeyEventStream = new Subject<void>();\n\n /**\n * Event handler for when the window is blurred. Needs to be an\n * arrow function in order to preserve the context.\n */\n private _windowBlurHandler = () => {\n // If the user blurred the window while the autocomplete is focused, it means that it'll be\n // refocused when they come back. In this case we want to skip the first focus event, if the\n // pane was closed, in order to avoid reopening it unintentionally.\n this._canOpenOnNextFocus =\n this._document.activeElement !== this._element.nativeElement || this.panelOpen;\n };\n\n /** `View -> model callback called when value changes` */\n _onChange: (value: any) => void = () => {};\n\n /** `View -> model callback called when autocomplete has been touched` */\n _onTouched = () => {};\n\n /** The autocomplete panel to be attached to this trigger. */\n @Input('matAutocomplete') autocomplete: _MatAutocompleteBase;\n\n /**\n * Position of the autocomplete panel relative to the trigger element. A position of `auto`\n * will render the panel underneath the trigger if there is enough space for it to fit in\n * the viewport, otherwise the panel will be shown above it. If the position is set to\n * `above` or `below`, the panel will always be shown above or below the trigger. no matter\n * whether it fits completely in the viewport.\n */\n @Input('matAutocompletePosition') position: 'auto' | 'above' | 'below' = 'auto';\n\n /**\n * Reference relative to which to position the autocomplete panel.\n * Defaults to the autocomplete trigger element.\n */\n @Input('matAutocompleteConnectedTo') connectedTo: _MatAutocompleteOriginBase;\n\n /**\n * `autocomplete` attribute to be set on the input element.\n * @docs-private\n */\n @Input('autocomplete') autocompleteAttribute: string = 'off';\n\n /**\n * Whether the autocomplete is disabled. When disabled, the element will\n * act as a regular input and the user won't be able to open the panel.\n */\n @Input('matAutocompleteDisabled')\n get autocompleteDisabled(): boolean {\n return this._autocompleteDisabled;\n }\n set autocompleteDisabled(value: BooleanInput) {\n this._autocompleteDisabled = coerceBooleanProperty(value);\n }\n\n constructor(\n private _element: ElementRef<HTMLInputElement>,\n private _overlay: Overlay,\n private _viewContainerRef: ViewContainerRef,\n private _zone: NgZone,\n private _changeDetectorRef: ChangeDetectorRef,\n @Inject(MAT_AUTOCOMPLETE_SCROLL_STRATEGY) scrollStrategy: any,\n @Optional() private _dir: Directionality,\n @Optional() @Inject(MAT_FORM_FIELD) @Host() private _formField: MatFormField,\n @Optional() @Inject(DOCUMENT) private _document: any,\n private _viewportRuler: ViewportRuler,\n @Optional()\n @Inject(MAT_AUTOCOMPLETE_DEFAULT_OPTIONS)\n private _defaults?: MatAutocompleteDefaultOptions,\n ) {\n this._scrollStrategy = scrollStrategy;\n }\n\n /** Class to apply to the panel when it's above the input. */\n protected abstract _aboveClass: string;\n\n ngAfterViewInit() {\n const window = this._getWindow();\n\n if (typeof window !== 'undefined') {\n this._zone.runOutsideAngular(() => window.addEventListener('blur', this._windowBlurHandler));\n }\n }\n\n ngOnChanges(changes: SimpleChanges) {\n if (changes['position'] && this._positionStrategy) {\n this._setStrategyPositions(this._positionStrategy);\n\n if (this.panelOpen) {\n this._overlayRef!.updatePosition();\n }\n }\n }\n\n ngOnDestroy() {\n const window = this._getWindow();\n\n if (typeof window !== 'undefined') {\n window.removeEventListener('blur', this._windowBlurHandler);\n }\n\n this._viewportSubscription.unsubscribe();\n this._componentDestroyed = true;\n this._destroyPanel();\n this._closeKeyEventStream.complete();\n }\n\n /** Whether or not the autocomplete panel is open. */\n get panelOpen(): boolean {\n return this._overlayAttached && this.autocomplete.showPanel;\n }\n private _overlayAttached: boolean = false;\n\n /** Opens the autocomplete suggestion panel. */\n openPanel(): void {\n this._attachOverlay();\n this._floatLabel();\n }\n\n /** Closes the autocomplete suggestion panel. */\n closePanel(): void {\n this._resetLabel();\n\n if (!this._overlayAttached) {\n return;\n }\n\n if (this.panelOpen) {\n // Only emit if the panel was visible.\n this.autocomplete.closed.emit();\n }\n\n this.autocomplete._isOpen = this._overlayAttached = false;\n\n if (this._overlayRef && this._overlayRef.hasAttached()) {\n this._overlayRef.detach();\n this._closingActionsSubscription.unsubscribe();\n }\n\n // Note that in some cases this can end up being called after the component is destroyed.\n // Add a check to ensure that we don't try to run change detection on a destroyed view.\n if (!this._componentDestroyed) {\n // We need to trigger change detection manually, because\n // `fromEvent` doesn't seem to do it at the proper time.\n // This ensures that the label is reset when the\n // user clicks outside.\n this._changeDetectorRef.detectChanges();\n }\n }\n\n /**\n * Updates the position of the autocomplete suggestion panel to ensure that it fits all options\n * within the viewport.\n */\n updatePosition(): void {\n if (this._overlayAttached) {\n this._overlayRef!.updatePosition();\n }\n }\n\n /**\n * A stream of actions that should close the autocomplete panel, including\n * when an option is selected, on blur, and when TAB is pressed.\n */\n get panelClosingActions(): Observable<MatOptionSelectionChange | null> {\n return merge(\n this.optionSelections,\n this.autocomplete._keyManager.tabOut.pipe(filter(() => this._overlayAttached)),\n this._closeKeyEventStream,\n this._getOutsideClickStream(),\n this._overlayRef\n ? this._overlayRef.detachments().pipe(filter(() => this._overlayAttached))\n : observableOf(),\n ).pipe(\n // Normalize the output so we return a consistent type.\n map(event => (event instanceof MatOptionSelectionChange ? event : null)),\n );\n }\n\n /** Stream of changes to the selection state of the autocomplete options. */\n readonly optionSelections: Observable<MatOptionSelectionChange> = defer(() => {\n const options = this.autocomplete ? this.autocomplete.options : null;\n\n if (options) {\n return options.changes.pipe(\n startWith(options),\n switchMap(() => merge(...options.map(option => option.onSelectionChange))),\n );\n }\n\n // If there are any subscribers before `ngAfterViewInit`, the `autocomplete` will be undefined.\n // Return a stream that we'll replace with the real one once everything is in place.\n return this._zone.onStable.pipe(\n take(1),\n switchMap(() => this.optionSelections),\n );\n }) as Observable<MatOptionSelectionChange>;\n\n /** The currently active option, coerced to MatOption type. */\n get activeOption(): MatOption | null {\n if (this.autocomplete && this.autocomplete._keyManager) {\n return this.autocomplete._keyManager.activeItem;\n }\n\n return null;\n }\n\n /** Stream of clicks outside of the autocomplete panel. */\n private _getOutsideClickStream(): Observable<any> {\n return merge(\n fromEvent(this._document, 'click') as Observable<MouseEvent>,\n fromEvent(this._document, 'auxclick') as Observable<MouseEvent>,\n fromEvent(this._document, 'touchend') as Observable<TouchEvent>,\n ).pipe(\n filter(event => {\n // If we're in the Shadow DOM, the event target will be the shadow root, so we have to\n // fall back to check the first element in the path of the click event.\n const clickTarget = _getEventTarget<HTMLElement>(event)!;\n const formField = this._formField ? this._formField._elementRef.nativeElement : null;\n const customOrigin = this.connectedTo ? this.connectedTo.elementRef.nativeElement : null;\n\n return (\n this._overlayAttached &&\n clickTarget !== this._element.nativeElement &&\n (!formField || !formField.contains(clickTarget)) &&\n (!customOrigin || !customOrigin.contains(clickTarget)) &&\n !!this._overlayRef &&\n !this._overlayRef.overlayElement.contains(clickTarget)\n );\n }),\n );\n }\n\n // Implemented as part of ControlValueAccessor.\n writeValue(value: any): void {\n Promise.resolve().then(() => this._setTriggerValue(value));\n }\n\n // Implemented as part of ControlValueAccessor.\n registerOnChange(fn: (value: any) => {}): void {\n this._onChange = fn;\n }\n\n // Implemented as part of ControlValueAccessor.\n registerOnTouched(fn: () => {}) {\n this._onTouched = fn;\n }\n\n // Implemented as part of ControlValueAccessor.\n setDisabledState(isDisabled: boolean) {\n this._element.nativeElement.disabled = isDisabled;\n }\n\n _handleKeydown(event: KeyboardEvent): void {\n const keyCode = event.keyCode;\n\n // Prevent the default action on all escape key presses. This is here primarily to bring IE\n // in line with other browsers. By default, pressing escape on IE will cause it to revert\n // the input value to the one that it had on focus, however it won't dispatch any events\n // which means that the model value will be out of sync with the view.\n if (keyCode === ESCAPE && !hasModifierKey(event)) {\n event.preventDefault();\n }\n\n if (this.activeOption && keyCode === ENTER && this.panelOpen && !hasModifierKey(event)) {\n this.activeOption._selectViaInteraction();\n this._resetActiveItem();\n event.preventDefault();\n } else if (this.autocomplete) {\n const prevActiveItem = this.autocomplete._keyManager.activeItem;\n const isArrowKey = keyCode === UP_ARROW || keyCode === DOWN_ARROW;\n\n if (this.panelOpen || keyCode === TAB) {\n this.autocomplete._keyManager.onKeydown(event);\n } else if (isArrowKey && this._canOpen()) {\n this.openPanel();\n }\n\n if (isArrowKey || this.autocomplete._keyManager.activeItem !== prevActiveItem) {\n this._scrollToOption(this.autocomplete._keyManager.activeItemIndex || 0);\n }\n }\n }\n\n _handleInput(event: KeyboardEvent): void {\n let target = event.target as HTMLInputElement;\n let value: number | string | null = target.value;\n\n // Based on `NumberValueAccessor` from forms.\n if (target.type === 'number') {\n value = value == '' ? null : parseFloat(value);\n }\n\n // If the input has a placeholder, IE will fire the `input` event on page load,\n // focus and blur, in addition to when the user actually changed the value. To\n // filter out all of the extra events, we save the value on focus and between\n // `input` events, and we check whether it changed.\n // See: https://connect.microsoft.com/IE/feedback/details/885747/\n if (this._previousValue !== value) {\n this._previousValue = value;\n this._onChange(value);\n\n if (this._canOpen() && this._document.activeElement === event.target) {\n this.openPanel();\n }\n }\n }\n\n _handleFocus(): void {\n if (!this._canOpenOnNextFocus) {\n this._canOpenOnNextFocus = true;\n } else if (this._canOpen()) {\n this._previousValue = this._element.nativeElement.value;\n this._attachOverlay();\n this._floatLabel(true);\n }\n }\n\n /**\n * In \"auto\" mode, the label will animate down as soon as focus is lost.\n * This causes the value to jump when selecting an option with the mouse.\n * This method manually floats the label until the panel can be closed.\n * @param shouldAnimate Whether the label should be animated when it is floated.\n */\n private _floatLabel(shouldAnimate = false): void {\n if (this._formField && this._formField.floatLabel === 'auto') {\n if (shouldAnimate) {\n this._formField._animateAndLockLabel();\n } else {\n this._formField.floatLabel = 'always';\n }\n\n this._manuallyFloatingLabel = true;\n }\n }\n\n /** If the label has been manually elevated, return it to its normal state. */\n private _resetLabel(): void {\n if (this._manuallyFloatingLabel) {\n this._formField.floatLabel = 'auto';\n this._manuallyFloatingLabel = false;\n }\n }\n\n /**\n * This method listens to a stream of panel closing actions and resets the\n * stream every time the option list changes.\n */\n private _subscribeToClosingActions(): Subscription {\n const firstStable = this._zone.onStable.pipe(take(1));\n const optionChanges = this.autocomplete.options.changes.pipe(\n tap(() => this._positionStrategy.reapplyLastPosition()),\n // Defer emitting to the stream until the next tick, because changing\n // bindings in here will cause \"changed after checked\" errors.\n delay(0),\n );\n\n // When the zone is stable initially, and when the option list changes...\n return (\n merge(firstStable, optionChanges)\n .pipe(\n // create a new stream of panelClosingActions, replacing any previous streams\n // that were created, and flatten it so our stream only emits closing events...\n switchMap(() => {\n const wasOpen = this.panelOpen;\n this._resetActiveItem();\n this.autocomplete._setVisibility();\n\n if (this.panelOpen) {\n this._overlayRef!.updatePosition();\n\n // If the `panelOpen` state changed, we need to make sure to emit the `opened`\n // event, because we may not have emitted it when the panel was attached. This\n // can happen if the users opens the panel and there are no options, but the\n // options come in slightly later or as a result of the value changing.\n if (wasOpen !== this.panelOpen) {\n this.autocomplete.opened.emit();\n }\n }\n\n return this.panelClosingActions;\n }),\n // when the first closing event occurs...\n take(1),\n )\n // set the value, close the panel, and complete.\n .subscribe(event => this._setValueAndClose(event))\n );\n }\n\n /** Destroys the autocomplete suggestion panel. */\n private _destroyPanel(): void {\n if (this._overlayRef) {\n this.closePanel();\n this._overlayRef.dispose();\n this._overlayRef = null;\n }\n }\n\n private _setTriggerValue(value: any): void {\n const toDisplay =\n this.autocomplete && this.autocomplete.displayWith\n ? this.autocomplete.displayWith(value)\n : value;\n\n // Simply falling back to an empty string if the display value is falsy does not work properly.\n // The display value can also be the number zero and shouldn't fall back to an empty string.\n const inputValue = toDisplay != null ? toDisplay : '';\n\n // If it's used within a `MatFormField`, we should set it through the property so it can go\n // through change detection.\n if (this._formField) {\n this._formField._control.value = inputValue;\n } else {\n this._element.nativeElement.value = inputValue;\n }\n\n this._previousValue = inputValue;\n }\n\n /**\n * This method closes the panel, and if a value is specified, also sets the associated\n * control to that value. It will also mark the control as dirty if this interaction\n * stemmed from the user.\n */\n private _setValueAndClose(event: MatOptionSelectionChange | null): void {\n const source = event && event.source;\n\n if (source) {\n this._clearPreviousSelectedOption(source);\n this._setTriggerValue(source.value);\n this._onChange(source.value);\n this.autocomplete._emitSelectEvent(source);\n this._element.nativeElement.focus();\n }\n\n this.closePanel();\n }\n\n /**\n * Clear any previous selected option and emit a selection change event for this option\n */\n private _clearPreviousSelectedOption(skip: MatOption) {\n this.autocomplete.options.forEach(option => {\n if (option !== skip && option.selected) {\n option.deselect();\n }\n });\n }\n\n private _attachOverlay(): void {\n if (!this.autocomplete && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getMatAutocompleteMissingPanelError();\n }\n\n let overlayRef = this._overlayRef;\n\n if (!overlayRef) {\n this._portal = new TemplatePortal(this.autocomplete.template, this._viewContainerRef, {\n id: this._formField?.getLabelId(),\n });\n overlayRef = this._overlay.create(this._getOverlayConfig());\n this._overlayRef = overlayRef;\n\n // Use the `keydownEvents` in order to take advantage of\n // the overlay event targeting provided by the CDK overlay.\n overlayRef.keydownEvents().subscribe(event => {\n // Close when pressing ESCAPE or ALT + UP_ARROW, based on the a11y guidelines.\n // See: https://www.w3.org/TR/wai-aria-practices-1.1/#textbox-keyboard-interaction\n if (\n (event.keyCode === ESCAPE && !hasModifierKey(event)) ||\n (event.keyCode === UP_ARROW && hasModifierKey(event, 'altKey'))\n ) {\n this._closeKeyEventStream.next();\n this._resetActiveItem();\n\n // We need to stop propagation, otherwise the event will eventually\n // reach the input itself and cause the overlay to be reopened.\n event.stopPropagation();\n event.preventDefault();\n }\n });\n\n this._viewportSubscription = this._viewportRuler.change().subscribe(() => {\n if (this.panelOpen && overlayRef) {\n overlayRef.updateSize({width: this._getPanelWidth()});\n }\n });\n } else {\n // Update the trigger, panel width and direction, in case anything has changed.\n this._positionStrategy.setOrigin(this._getConnectedElement());\n overlayRef.updateSize({width: this._getPanelWidth()});\n }\n\n if (overlayRef && !overlayRef.hasAttached()) {\n overlayRef.attach(this._portal);\n this._closingActionsSubscription = this._subscribeToClosingActions();\n }\n\n const wasOpen = this.panelOpen;\n\n this.autocomplete._setVisibility();\n this.autocomplete._isOpen = this._overlayAttached = true;\n\n // We need to do an extra `panelOpen` check in here, because the\n // autocomplete won't be shown if there are no options.\n if (this.panelOpen && wasOpen !== this.panelOpen) {\n this.autocomplete.opened.emit();\n }\n }\n\n private _getOverlayConfig(): OverlayConfig {\n return new OverlayConfig({\n positionStrategy: this._getOverlayPosition(),\n scrollStrategy: this._scrollStrategy(),\n width: this._getPanelWidth(),\n direction: this._dir,\n panelClass: this._defaults?.overlayPanelClass,\n });\n }\n\n private _getOverlayPosition(): PositionStrategy {\n const strategy = this._overlay\n .position()\n .flexibleConnectedTo(this._getConnectedElement())\n .withFlexibleDimensions(false)\n .withPush(false);\n\n this._setStrategyPositions(strategy);\n this._positionStrategy = strategy;\n return strategy;\n }\n\n /** Sets the positions on a position strategy based on the directive's input state. */\n private _setStrategyPositions(positionStrategy: FlexibleConnectedPositionStrategy) {\n // Note that we provide horizontal fallback positions, even though by default the dropdown\n // width matches the input, because consumers can override the width. See #18854.\n const belowPositions: ConnectedPosition[] = [\n {originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top'},\n {originX: 'end', originY: 'bottom', overlayX: 'end', overlayY: 'top'},\n ];\n\n // The overlay edge connected to the trigger should have squared corners, while\n // the opposite end has rounded corners. We apply a CSS class to swap the\n // border-radius based on the overlay position.\n const panelClass = this._aboveClass;\n const abovePositions: ConnectedPosition[] = [\n {originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom', panelClass},\n {originX: 'end', originY: 'top', overlayX: 'end', overlayY: 'bottom', panelClass},\n ];\n\n let positions: ConnectedPosition[];\n\n if (this.position === 'above') {\n positions = abovePositions;\n } else if (this.position === 'below') {\n positions = belowPositions;\n } else {\n positions = [...belowPositions, ...abovePositions];\n }\n\n positionStrategy.withPositions(positions);\n }\n\n private _getConnectedElement(): ElementRef<HTMLElement> {\n if (this.connectedTo) {\n return this.connectedTo.elementRef;\n }\n\n return this._formField ? this._formField.getConnectedOverlayOrigin() : this._element;\n }\n\n private _getPanelWidth(): number | string {\n return this.autocomplete.panelWidth || this._getHostWidth();\n }\n\n /** Returns the width of the input element, so the panel width can match it. */\n private _getHostWidth(): number {\n return this._getConnectedElement().nativeElement.getBoundingClientRect().width;\n }\n\n /**\n * Resets the active item to -1 so arrow events will activate the\n * correct options, or to 0 if the consumer opted into it.\n */\n private _resetActiveItem(): void {\n const autocomplete = this.autocomplete;\n\n if (autocomplete.autoActiveFirstOption) {\n // Note that we go through `setFirstItemActive`, rather than `setActiveItem(0)`, because\n // the former will find the next enabled option, if the first one is disabled.\n autocomplete._keyManager.setFirstItemActive();\n } else {\n autocomplete._keyManager.setActiveItem(-1);\n }\n }\n\n /** Determines whether the panel can be opened. */\n private _canOpen(): boolean {\n const element = this._element.nativeElement;\n return !element.readOnly && !element.disabled && !this._autocompleteDisabled;\n }\n\n /** Use defaultView of injected document if available or fallback to global window reference */\n private _getWindow(): Window {\n return this._document?.defaultView || window;\n }\n\n /** Scrolls to a particular option in the list. */\n private _scrollToOption(index: number): void {\n // Given that we are not actually focusing active options, we must manually adjust scroll\n // to reveal options below the fold. First, we find the offset of the option from the top\n // of the panel. If that offset is below the fold, the new scrollTop will be the offset -\n // the panel height + the option height, so the active option will be just visible at the\n // bottom of the panel. If that offset is above the top of the visible panel, the new scrollTop\n // will become the offset. If that offset is visible within the panel already, the scrollTop is\n // not adjusted.\n const autocomplete = this.autocomplete;\n const labelCount = _countGroupLabelsBeforeOption(\n index,\n autocomplete.options,\n autocomplete.optionGroups,\n );\n\n if (index === 0 && labelCount === 1) {\n // If we've got one group label before the option and we're at the top option,\n // scroll the list to the top. This is better UX than scrolling the list to the\n // top of the option, because it allows the user to read the top group's label.\n autocomplete._setScrollTop(0);\n } else if (autocomplete.panel) {\n const option = autocomplete.options.toArray()[index];\n\n if (option) {\n const element = option._getHostElement();\n const newScrollPosition = _getOptionScrollPosition(\n element.offsetTop,\n element.offsetHeight,\n autocomplete._getScrollTop(),\n autocomplete.panel.nativeElement.offsetHeight,\n );\n\n autocomplete._setScrollTop(newScrollPosition);\n }\n }\n }\n}\n\n@Directive({\n selector: `input[matAutocomplete], textarea[matAutocomplete]`,\n host: {\n 'class': 'mat-autocomplete-trigger',\n '[attr.autocomplete]': 'autocompleteAttribute',\n '[attr.role]': 'autocompleteDisabled ? null : \"combobox\"',\n '[attr.aria-autocomplete]': 'autocompleteDisabled ? null : \"list\"',\n '[attr.aria-activedescendant]': '(panelOpen && activeOption) ? activeOption.id : null',\n '[attr.aria-expanded]': 'autocompleteDisabled ? null : panelOpen.toString()',\n '[attr.aria-owns]': '(autocompleteDisabled || !panelOpen) ? null : autocomplete?.id',\n '[attr.aria-haspopup]': '!autocompleteDisabled',\n // Note: we use `focusin`, as opposed to `focus`, in order to open the panel\n // a little earlier. This avoids issues where IE delays the focusing of the input.\n '(focusin)': '_handleFocus()',\n '(blur)': '_onTouched()',\n '(input)': '_handleInput($event)',\n '(keydown)': '_handleKeydown($event)',\n },\n exportAs: 'matAutocompleteTrigger',\n providers: [MAT_AUTOCOMPLETE_VALUE_ACCESSOR],\n})\nexport class MatAutocompleteTrigger extends _MatAutocompleteTriggerBase {\n protected _aboveClass = 'mat-autocomplete-panel-above';\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 {NgModule} from '@angular/core';\nimport {CommonModule} from '@angular/common';\nimport {OverlayModule} from '@angular/cdk/overlay';\nimport {MatOptionModule, MatCommonModule} from '@angular/material/core';\nimport {CdkScrollableModule} from '@angular/cdk/scrolling';\nimport {MatAutocomplete} from './autocomplete';\nimport {\n MatAutocompleteTrigger,\n MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY_PROVIDER,\n} from './autocomplete-trigger';\nimport {MatAutocompleteOrigin} from './autocomplete-origin';\n\n@NgModule({\n imports: [OverlayModule, MatOptionModule, MatCommonModule, CommonModule],\n exports: [\n MatAutocomplete,\n MatAutocompleteTrigger,\n MatAutocompleteOrigin,\n CdkScrollableModule,\n MatOptionModule,\n MatCommonModule,\n ],\n declarations: [MatAutocomplete, MatAutocompleteTrigger, MatAutocompleteOrigin],\n providers: [MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY_PROVIDER],\n})\nexport class MatAutocompleteModule {}\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 './autocomplete';\nexport * from './autocomplete-module';\nexport * from './autocomplete-trigger';\nexport * from './autocomplete-origin';\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":["observableOf"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;AA0CA;;;;AAIA,IAAI,4BAA4B,GAAG,CAAC,CAAC;AAErC;MACa,4BAA4B;IACvC;;IAES,MAA4B;;IAE5B,MAAsB;QAFtB,WAAM,GAAN,MAAM,CAAsB;QAE5B,WAAM,GAAN,MAAM,CAAgB;KAC3B;CACL;AAWD;AACA;AACA,MAAM,yBAAyB,GAAG,kBAAkB,CAAC;CAAQ,CAAC,CAAC;AAW/D;MACa,gCAAgC,GAAG,IAAI,cAAc,CAChE,kCAAkC,EAClC;IACE,UAAU,EAAE,MAAM;IAClB,OAAO,EAAE,wCAAwC;CAClD,EACD;AAEF;SACgB,wCAAwC;IACtD,OAAO,EAAC,qBAAqB,EAAE,KAAK,EAAC,CAAC;AACxC,CAAC;AAED;MAEsB,oBACpB,SAAQ,yBAAyB;IA8GjC,YACU,kBAAqC,EACrC,WAAoC,EACF,QAAuC,EACjF,QAAmB;QAEnB,KAAK,EAAE,CAAC;QALA,uBAAkB,GAAlB,kBAAkB,CAAmB;QACrC,gBAAW,GAAX,WAAW,CAAyB;QA7GtC,yBAAoB,GAAG,YAAY,CAAC,KAAK,CAAC;;QAYlD,cAAS,GAAY,KAAK,CAAC;QAM3B,YAAO,GAAY,KAAK,CAAC;;QAyBhB,gBAAW,GAAoC,IAAI,CAAC;;QAsB1C,mBAAc,GAC/B,IAAI,YAAY,EAAgC,CAAC;;QAGhC,WAAM,GAAuB,IAAI,YAAY,EAAQ,CAAC;;QAGtD,WAAM,GAAuB,IAAI,YAAY,EAAQ,CAAC;;QAGtD,oBAAe,GAChC,IAAI,YAAY,EAAiC,CAAC;QAoBpD,eAAU,GAA6B,EAAE,CAAC;;QAG1C,OAAE,GAAW,oBAAoB,4BAA4B,EAAE,EAAE,CAAC;;;;;QAo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iBAC/D;;;AChCD;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;"}
1
+ {"version":3,"file":"autocomplete.mjs","sources":["../../../../../../src/material/autocomplete/autocomplete.ts","../../../../../../src/material/autocomplete/autocomplete.html","../../../../../../src/material/autocomplete/autocomplete-origin.ts","../../../../../../src/material/autocomplete/autocomplete-trigger.ts","../../../../../../src/material/autocomplete/autocomplete-module.ts","../../../../../../src/material/autocomplete/public-api.ts","../../../../../../src/material/autocomplete/index.ts","../../../../../../src/material/autocomplete/autocomplete_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 {ActiveDescendantKeyManager} from '@angular/cdk/a11y';\nimport {BooleanInput, coerceBooleanProperty, coerceStringArray} from '@angular/cdk/coercion';\nimport {Platform} from '@angular/cdk/platform';\nimport {\n AfterContentInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChildren,\n ElementRef,\n EventEmitter,\n Inject,\n InjectionToken,\n Input,\n Output,\n QueryList,\n TemplateRef,\n ViewChild,\n ViewEncapsulation,\n OnDestroy,\n Directive,\n} from '@angular/core';\nimport {\n CanDisableRipple,\n MAT_OPTGROUP,\n MAT_OPTION_PARENT_COMPONENT,\n _MatOptgroupBase,\n _MatOptionBase,\n mixinDisableRipple,\n MatOption,\n MatOptgroup,\n} from '@angular/material/core';\nimport {Subscription} from 'rxjs';\n\n/**\n * Autocomplete IDs need to be unique across components, so this counter exists outside of\n * the component definition.\n */\nlet _uniqueAutocompleteIdCounter = 0;\n\n/** Event object that is emitted when an autocomplete option is selected. */\nexport class MatAutocompleteSelectedEvent {\n constructor(\n /** Reference to the autocomplete panel that emitted the event. */\n public source: _MatAutocompleteBase,\n /** Option that was selected. */\n public option: _MatOptionBase,\n ) {}\n}\n\n/** Event object that is emitted when an autocomplete option is activated. */\nexport interface MatAutocompleteActivatedEvent {\n /** Reference to the autocomplete panel that emitted the event. */\n source: _MatAutocompleteBase;\n\n /** Option that was selected. */\n option: _MatOptionBase | null;\n}\n\n// Boilerplate for applying mixins to MatAutocomplete.\n/** @docs-private */\nconst _MatAutocompleteMixinBase = mixinDisableRipple(class {});\n\n/** Default `mat-autocomplete` options that can be overridden. */\nexport interface MatAutocompleteDefaultOptions {\n /** Whether the first option should be highlighted when an autocomplete panel is opened. */\n autoActiveFirstOption?: boolean;\n\n /** Class or list of classes to be applied to the autocomplete's overlay panel. */\n overlayPanelClass?: string | string[];\n}\n\n/** Injection token to be used to override the default options for `mat-autocomplete`. */\nexport const MAT_AUTOCOMPLETE_DEFAULT_OPTIONS = new InjectionToken<MatAutocompleteDefaultOptions>(\n 'mat-autocomplete-default-options',\n {\n providedIn: 'root',\n factory: MAT_AUTOCOMPLETE_DEFAULT_OPTIONS_FACTORY,\n },\n);\n\n/** @docs-private */\nexport function MAT_AUTOCOMPLETE_DEFAULT_OPTIONS_FACTORY(): MatAutocompleteDefaultOptions {\n return {autoActiveFirstOption: false};\n}\n\n/** Base class with all of the `MatAutocomplete` functionality. */\n@Directive()\nexport abstract class _MatAutocompleteBase\n extends _MatAutocompleteMixinBase\n implements AfterContentInit, CanDisableRipple, OnDestroy\n{\n private _activeOptionChanges = Subscription.EMPTY;\n\n /** Class to apply to the panel when it's visible. */\n protected abstract _visibleClass: string;\n\n /** Class to apply to the panel when it's hidden. */\n protected abstract _hiddenClass: string;\n\n /** Manages active item in option list based on key events. */\n _keyManager: ActiveDescendantKeyManager<_MatOptionBase>;\n\n /** Whether the autocomplete panel should be visible, depending on option length. */\n showPanel: boolean = false;\n\n /** Whether the autocomplete panel is open. */\n get isOpen(): boolean {\n return this._isOpen && this.showPanel;\n }\n _isOpen: boolean = false;\n\n // The @ViewChild query for TemplateRef here needs to be static because some code paths\n // lead to the overlay being created before change detection has finished for this component.\n // Notably, another component may trigger `focus` on the autocomplete-trigger.\n\n /** @docs-private */\n @ViewChild(TemplateRef, {static: true}) template: TemplateRef<any>;\n\n /** Element for the panel containing the autocomplete options. */\n @ViewChild('panel') panel: ElementRef;\n\n /** Reference to all options within the autocomplete. */\n abstract options: QueryList<_MatOptionBase>;\n\n /** Reference to all option groups within the autocomplete. */\n abstract optionGroups: QueryList<_MatOptgroupBase>;\n\n /** Aria label of the autocomplete. */\n @Input('aria-label') ariaLabel: string;\n\n /** Input that can be used to specify the `aria-labelledby` attribute. */\n @Input('aria-labelledby') ariaLabelledby: string;\n\n /** Function that maps an option's control value to its display value in the trigger. */\n @Input() displayWith: ((value: any) => string) | null = null;\n\n /**\n * Whether the first option should be highlighted when the autocomplete panel is opened.\n * Can be configured globally through the `MAT_AUTOCOMPLETE_DEFAULT_OPTIONS` token.\n */\n @Input()\n get autoActiveFirstOption(): boolean {\n return this._autoActiveFirstOption;\n }\n set autoActiveFirstOption(value: BooleanInput) {\n this._autoActiveFirstOption = coerceBooleanProperty(value);\n }\n private _autoActiveFirstOption: boolean;\n\n /**\n * Specify the width of the autocomplete panel. Can be any CSS sizing value, otherwise it will\n * match the width of its host.\n */\n @Input() panelWidth: string | number;\n\n /** Event that is emitted whenever an option from the list is selected. */\n @Output() readonly optionSelected: EventEmitter<MatAutocompleteSelectedEvent> =\n new EventEmitter<MatAutocompleteSelectedEvent>();\n\n /** Event that is emitted when the autocomplete panel is opened. */\n @Output() readonly opened: EventEmitter<void> = new EventEmitter<void>();\n\n /** Event that is emitted when the autocomplete panel is closed. */\n @Output() readonly closed: EventEmitter<void> = new EventEmitter<void>();\n\n /** Emits whenever an option is activated using the keyboard. */\n @Output() readonly optionActivated: EventEmitter<MatAutocompleteActivatedEvent> =\n new EventEmitter<MatAutocompleteActivatedEvent>();\n\n /**\n * Takes classes set on the host mat-autocomplete element and applies them to the panel\n * inside the overlay container to allow for easy styling.\n */\n @Input('class')\n set classList(value: string | string[]) {\n if (value && value.length) {\n this._classList = coerceStringArray(value).reduce((classList, className) => {\n classList[className] = true;\n return classList;\n }, {} as {[key: string]: boolean});\n } else {\n this._classList = {};\n }\n\n this._setVisibilityClasses(this._classList);\n this._elementRef.nativeElement.className = '';\n }\n _classList: {[key: string]: boolean} = {};\n\n /** Unique ID to be used by autocomplete trigger's \"aria-owns\" property. */\n id: string = `mat-autocomplete-${_uniqueAutocompleteIdCounter++}`;\n\n /**\n * Tells any descendant `mat-optgroup` to use the inert a11y pattern.\n * @docs-private\n */\n readonly inertGroups: boolean;\n\n constructor(\n private _changeDetectorRef: ChangeDetectorRef,\n private _elementRef: ElementRef<HTMLElement>,\n @Inject(MAT_AUTOCOMPLETE_DEFAULT_OPTIONS) defaults: MatAutocompleteDefaultOptions,\n platform?: Platform,\n ) {\n super();\n\n // TODO(crisbeto): the problem that the `inertGroups` option resolves is only present on\n // Safari using VoiceOver. We should occasionally check back to see whether the bug\n // wasn't resolved in VoiceOver, and if it has, we can remove this and the `inertGroups`\n // option altogether.\n this.inertGroups = platform?.SAFARI || false;\n this._autoActiveFirstOption = !!defaults.autoActiveFirstOption;\n }\n\n ngAfterContentInit() {\n this._keyManager = new ActiveDescendantKeyManager<_MatOptionBase>(this.options).withWrap();\n this._activeOptionChanges = this._keyManager.change.subscribe(index => {\n if (this.isOpen) {\n this.optionActivated.emit({source: this, option: this.options.toArray()[index] || null});\n }\n });\n\n // Set the initial visibility state.\n this._setVisibility();\n }\n\n ngOnDestroy() {\n this._activeOptionChanges.unsubscribe();\n }\n\n /**\n * Sets the panel scrollTop. This allows us to manually scroll to display options\n * above or below the fold, as they are not actually being focused when active.\n */\n _setScrollTop(scrollTop: number): void {\n if (this.panel) {\n this.panel.nativeElement.scrollTop = scrollTop;\n }\n }\n\n /** Returns the panel's scrollTop. */\n _getScrollTop(): number {\n return this.panel ? this.panel.nativeElement.scrollTop : 0;\n }\n\n /** Panel should hide itself when the option list is empty. */\n _setVisibility() {\n this.showPanel = !!this.options.length;\n this._setVisibilityClasses(this._classList);\n this._changeDetectorRef.markForCheck();\n }\n\n /** Emits the `select` event. */\n _emitSelectEvent(option: _MatOptionBase): void {\n const event = new MatAutocompleteSelectedEvent(this, option);\n this.optionSelected.emit(event);\n }\n\n /** Gets the aria-labelledby for the autocomplete panel. */\n _getPanelAriaLabelledby(labelId: string | null): string | null {\n if (this.ariaLabel) {\n return null;\n }\n\n const labelExpression = labelId ? labelId + ' ' : '';\n return this.ariaLabelledby ? labelExpression + this.ariaLabelledby : labelId;\n }\n\n /** Sets the autocomplete visibility classes on a classlist based on the panel is visible. */\n private _setVisibilityClasses(classList: {[key: string]: boolean}) {\n classList[this._visibleClass] = this.showPanel;\n classList[this._hiddenClass] = !this.showPanel;\n }\n}\n\n@Component({\n selector: 'mat-autocomplete',\n templateUrl: 'autocomplete.html',\n styleUrls: ['autocomplete.css'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n exportAs: 'matAutocomplete',\n inputs: ['disableRipple'],\n host: {\n 'class': 'mat-autocomplete',\n },\n providers: [{provide: MAT_OPTION_PARENT_COMPONENT, useExisting: MatAutocomplete}],\n})\nexport class MatAutocomplete extends _MatAutocompleteBase {\n /** Reference to all option groups within the autocomplete. */\n @ContentChildren(MAT_OPTGROUP, {descendants: true}) optionGroups: QueryList<MatOptgroup>;\n /** Reference to all options within the autocomplete. */\n @ContentChildren(MatOption, {descendants: true}) options: QueryList<MatOption>;\n protected _visibleClass = 'mat-autocomplete-visible';\n protected _hiddenClass = 'mat-autocomplete-hidden';\n}\n","<ng-template let-formFieldId=\"id\">\n <div class=\"mat-autocomplete-panel\"\n role=\"listbox\"\n [id]=\"id\"\n [attr.aria-label]=\"ariaLabel || null\"\n [attr.aria-labelledby]=\"_getPanelAriaLabelledby(formFieldId)\"\n [ngClass]=\"_classList\"\n #panel>\n <ng-content></ng-content>\n </div>\n</ng-template>\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 {Directive, ElementRef} from '@angular/core';\n\n/** Base class containing all of the functionality for `MatAutocompleteOrigin`. */\n@Directive()\nexport abstract class _MatAutocompleteOriginBase {\n constructor(\n /** Reference to the element on which the directive is applied. */\n public elementRef: ElementRef<HTMLElement>,\n ) {}\n}\n\n/**\n * Directive applied to an element to make it usable\n * as a connection point for an autocomplete panel.\n */\n@Directive({\n selector: '[matAutocompleteOrigin]',\n exportAs: 'matAutocompleteOrigin',\n})\nexport class MatAutocompleteOrigin extends _MatAutocompleteOriginBase {}\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 */\nimport {Directionality} from '@angular/cdk/bidi';\nimport {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {DOWN_ARROW, ENTER, ESCAPE, TAB, UP_ARROW, hasModifierKey} from '@angular/cdk/keycodes';\nimport {\n FlexibleConnectedPositionStrategy,\n Overlay,\n OverlayConfig,\n OverlayRef,\n PositionStrategy,\n ScrollStrategy,\n ConnectedPosition,\n} from '@angular/cdk/overlay';\nimport {_getEventTarget} from '@angular/cdk/platform';\nimport {TemplatePortal} from '@angular/cdk/portal';\nimport {ViewportRuler} from '@angular/cdk/scrolling';\nimport {DOCUMENT} from '@angular/common';\nimport {\n AfterViewInit,\n ChangeDetectorRef,\n Directive,\n ElementRef,\n forwardRef,\n Host,\n Inject,\n InjectionToken,\n Input,\n NgZone,\n OnDestroy,\n Optional,\n ViewContainerRef,\n OnChanges,\n SimpleChanges,\n} from '@angular/core';\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from '@angular/forms';\nimport {\n _countGroupLabelsBeforeOption,\n _getOptionScrollPosition,\n MatOption,\n MatOptionSelectionChange,\n} from '@angular/material/core';\nimport {MAT_FORM_FIELD, MatFormField} from '@angular/material/form-field';\nimport {defer, fromEvent, merge, Observable, of as observableOf, Subject, Subscription} from 'rxjs';\nimport {delay, filter, map, switchMap, take, tap, startWith} from 'rxjs/operators';\n\nimport {\n _MatAutocompleteBase,\n MAT_AUTOCOMPLETE_DEFAULT_OPTIONS,\n MatAutocompleteDefaultOptions,\n} from './autocomplete';\nimport {_MatAutocompleteOriginBase} from './autocomplete-origin';\n\n/** Injection token that determines the scroll handling while the autocomplete panel is open. */\nexport const MAT_AUTOCOMPLETE_SCROLL_STRATEGY = new InjectionToken<() => ScrollStrategy>(\n 'mat-autocomplete-scroll-strategy',\n);\n\n/** @docs-private */\nexport function MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY(overlay: Overlay): () => ScrollStrategy {\n return () => overlay.scrollStrategies.reposition();\n}\n\n/** @docs-private */\nexport const MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY_PROVIDER = {\n provide: MAT_AUTOCOMPLETE_SCROLL_STRATEGY,\n deps: [Overlay],\n useFactory: MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY,\n};\n\n/**\n * Provider that allows the autocomplete to register as a ControlValueAccessor.\n * @docs-private\n */\nexport const MAT_AUTOCOMPLETE_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => MatAutocompleteTrigger),\n multi: true,\n};\n\n/**\n * Creates an error to be thrown when attempting to use an autocomplete trigger without a panel.\n * @docs-private\n */\nexport function getMatAutocompleteMissingPanelError(): Error {\n return Error(\n 'Attempting to open an undefined instance of `mat-autocomplete`. ' +\n 'Make sure that the id passed to the `matAutocomplete` is correct and that ' +\n \"you're attempting to open it after the ngAfterContentInit hook.\",\n );\n}\n\n/** Base class with all of the `MatAutocompleteTrigger` functionality. */\n@Directive()\nexport abstract class _MatAutocompleteTriggerBase\n implements ControlValueAccessor, AfterViewInit, OnChanges, OnDestroy\n{\n private _overlayRef: OverlayRef | null;\n private _portal: TemplatePortal;\n private _componentDestroyed = false;\n private _autocompleteDisabled = false;\n private _scrollStrategy: () => ScrollStrategy;\n\n /** Old value of the native input. Used to work around issues with the `input` event on IE. */\n private _previousValue: string | number | null;\n\n /** Strategy that is used to position the panel. */\n private _positionStrategy: FlexibleConnectedPositionStrategy;\n\n /** Whether or not the label state is being overridden. */\n private _manuallyFloatingLabel = false;\n\n /** The subscription for closing actions (some are bound to document). */\n private _closingActionsSubscription: Subscription;\n\n /** Subscription to viewport size changes. */\n private _viewportSubscription = Subscription.EMPTY;\n\n /**\n * Whether the autocomplete can open the next time it is focused. Used to prevent a focused,\n * closed autocomplete from being reopened if the user switches to another browser tab and then\n * comes back.\n */\n private _canOpenOnNextFocus = true;\n\n /** Stream of keyboard events that can close the panel. */\n private readonly _closeKeyEventStream = new Subject<void>();\n\n /**\n * Event handler for when the window is blurred. Needs to be an\n * arrow function in order to preserve the context.\n */\n private _windowBlurHandler = () => {\n // If the user blurred the window while the autocomplete is focused, it means that it'll be\n // refocused when they come back. In this case we want to skip the first focus event, if the\n // pane was closed, in order to avoid reopening it unintentionally.\n this._canOpenOnNextFocus =\n this._document.activeElement !== this._element.nativeElement || this.panelOpen;\n };\n\n /** `View -> model callback called when value changes` */\n _onChange: (value: any) => void = () => {};\n\n /** `View -> model callback called when autocomplete has been touched` */\n _onTouched = () => {};\n\n /** The autocomplete panel to be attached to this trigger. */\n @Input('matAutocomplete') autocomplete: _MatAutocompleteBase;\n\n /**\n * Position of the autocomplete panel relative to the trigger element. A position of `auto`\n * will render the panel underneath the trigger if there is enough space for it to fit in\n * the viewport, otherwise the panel will be shown above it. If the position is set to\n * `above` or `below`, the panel will always be shown above or below the trigger. no matter\n * whether it fits completely in the viewport.\n */\n @Input('matAutocompletePosition') position: 'auto' | 'above' | 'below' = 'auto';\n\n /**\n * Reference relative to which to position the autocomplete panel.\n * Defaults to the autocomplete trigger element.\n */\n @Input('matAutocompleteConnectedTo') connectedTo: _MatAutocompleteOriginBase;\n\n /**\n * `autocomplete` attribute to be set on the input element.\n * @docs-private\n */\n @Input('autocomplete') autocompleteAttribute: string = 'off';\n\n /**\n * Whether the autocomplete is disabled. When disabled, the element will\n * act as a regular input and the user won't be able to open the panel.\n */\n @Input('matAutocompleteDisabled')\n get autocompleteDisabled(): boolean {\n return this._autocompleteDisabled;\n }\n set autocompleteDisabled(value: BooleanInput) {\n this._autocompleteDisabled = coerceBooleanProperty(value);\n }\n\n constructor(\n private _element: ElementRef<HTMLInputElement>,\n private _overlay: Overlay,\n private _viewContainerRef: ViewContainerRef,\n private _zone: NgZone,\n private _changeDetectorRef: ChangeDetectorRef,\n @Inject(MAT_AUTOCOMPLETE_SCROLL_STRATEGY) scrollStrategy: any,\n @Optional() private _dir: Directionality,\n @Optional() @Inject(MAT_FORM_FIELD) @Host() private _formField: MatFormField,\n @Optional() @Inject(DOCUMENT) private _document: any,\n private _viewportRuler: ViewportRuler,\n @Optional()\n @Inject(MAT_AUTOCOMPLETE_DEFAULT_OPTIONS)\n private _defaults?: MatAutocompleteDefaultOptions,\n ) {\n this._scrollStrategy = scrollStrategy;\n }\n\n /** Class to apply to the panel when it's above the input. */\n protected abstract _aboveClass: string;\n\n ngAfterViewInit() {\n const window = this._getWindow();\n\n if (typeof window !== 'undefined') {\n this._zone.runOutsideAngular(() => window.addEventListener('blur', this._windowBlurHandler));\n }\n }\n\n ngOnChanges(changes: SimpleChanges) {\n if (changes['position'] && this._positionStrategy) {\n this._setStrategyPositions(this._positionStrategy);\n\n if (this.panelOpen) {\n this._overlayRef!.updatePosition();\n }\n }\n }\n\n ngOnDestroy() {\n const window = this._getWindow();\n\n if (typeof window !== 'undefined') {\n window.removeEventListener('blur', this._windowBlurHandler);\n }\n\n this._viewportSubscription.unsubscribe();\n this._componentDestroyed = true;\n this._destroyPanel();\n this._closeKeyEventStream.complete();\n }\n\n /** Whether or not the autocomplete panel is open. */\n get panelOpen(): boolean {\n return this._overlayAttached && this.autocomplete.showPanel;\n }\n private _overlayAttached: boolean = false;\n\n /** Opens the autocomplete suggestion panel. */\n openPanel(): void {\n this._attachOverlay();\n this._floatLabel();\n }\n\n /** Closes the autocomplete suggestion panel. */\n closePanel(): void {\n this._resetLabel();\n\n if (!this._overlayAttached) {\n return;\n }\n\n if (this.panelOpen) {\n // Only emit if the panel was visible.\n this.autocomplete.closed.emit();\n }\n\n this.autocomplete._isOpen = this._overlayAttached = false;\n\n if (this._overlayRef && this._overlayRef.hasAttached()) {\n this._overlayRef.detach();\n this._closingActionsSubscription.unsubscribe();\n }\n\n // Note that in some cases this can end up being called after the component is destroyed.\n // Add a check to ensure that we don't try to run change detection on a destroyed view.\n if (!this._componentDestroyed) {\n // We need to trigger change detection manually, because\n // `fromEvent` doesn't seem to do it at the proper time.\n // This ensures that the label is reset when the\n // user clicks outside.\n this._changeDetectorRef.detectChanges();\n }\n }\n\n /**\n * Updates the position of the autocomplete suggestion panel to ensure that it fits all options\n * within the viewport.\n */\n updatePosition(): void {\n if (this._overlayAttached) {\n this._overlayRef!.updatePosition();\n }\n }\n\n /**\n * A stream of actions that should close the autocomplete panel, including\n * when an option is selected, on blur, and when TAB is pressed.\n */\n get panelClosingActions(): Observable<MatOptionSelectionChange | null> {\n return merge(\n this.optionSelections,\n this.autocomplete._keyManager.tabOut.pipe(filter(() => this._overlayAttached)),\n this._closeKeyEventStream,\n this._getOutsideClickStream(),\n this._overlayRef\n ? this._overlayRef.detachments().pipe(filter(() => this._overlayAttached))\n : observableOf(),\n ).pipe(\n // Normalize the output so we return a consistent type.\n map(event => (event instanceof MatOptionSelectionChange ? event : null)),\n );\n }\n\n /** Stream of changes to the selection state of the autocomplete options. */\n readonly optionSelections: Observable<MatOptionSelectionChange> = defer(() => {\n const options = this.autocomplete ? this.autocomplete.options : null;\n\n if (options) {\n return options.changes.pipe(\n startWith(options),\n switchMap(() => merge(...options.map(option => option.onSelectionChange))),\n );\n }\n\n // If there are any subscribers before `ngAfterViewInit`, the `autocomplete` will be undefined.\n // Return a stream that we'll replace with the real one once everything is in place.\n return this._zone.onStable.pipe(\n take(1),\n switchMap(() => this.optionSelections),\n );\n }) as Observable<MatOptionSelectionChange>;\n\n /** The currently active option, coerced to MatOption type. */\n get activeOption(): MatOption | null {\n if (this.autocomplete && this.autocomplete._keyManager) {\n return this.autocomplete._keyManager.activeItem;\n }\n\n return null;\n }\n\n /** Stream of clicks outside of the autocomplete panel. */\n private _getOutsideClickStream(): Observable<any> {\n return merge(\n fromEvent(this._document, 'click') as Observable<MouseEvent>,\n fromEvent(this._document, 'auxclick') as Observable<MouseEvent>,\n fromEvent(this._document, 'touchend') as Observable<TouchEvent>,\n ).pipe(\n filter(event => {\n // If we're in the Shadow DOM, the event target will be the shadow root, so we have to\n // fall back to check the first element in the path of the click event.\n const clickTarget = _getEventTarget<HTMLElement>(event)!;\n const formField = this._formField ? this._formField._elementRef.nativeElement : null;\n const customOrigin = this.connectedTo ? this.connectedTo.elementRef.nativeElement : null;\n\n return (\n this._overlayAttached &&\n clickTarget !== this._element.nativeElement &&\n // Normally focus moves inside `mousedown` so this condition will almost always be\n // true. Its main purpose is to handle the case where the input is focused from an\n // outside click which propagates up to the `body` listener within the same sequence\n // and causes the panel to close immediately (see #3106).\n this._document.activeElement !== this._element.nativeElement &&\n (!formField || !formField.contains(clickTarget)) &&\n (!customOrigin || !customOrigin.contains(clickTarget)) &&\n !!this._overlayRef &&\n !this._overlayRef.overlayElement.contains(clickTarget)\n );\n }),\n );\n }\n\n // Implemented as part of ControlValueAccessor.\n writeValue(value: any): void {\n Promise.resolve().then(() => this._setTriggerValue(value));\n }\n\n // Implemented as part of ControlValueAccessor.\n registerOnChange(fn: (value: any) => {}): void {\n this._onChange = fn;\n }\n\n // Implemented as part of ControlValueAccessor.\n registerOnTouched(fn: () => {}) {\n this._onTouched = fn;\n }\n\n // Implemented as part of ControlValueAccessor.\n setDisabledState(isDisabled: boolean) {\n this._element.nativeElement.disabled = isDisabled;\n }\n\n _handleKeydown(event: KeyboardEvent): void {\n const keyCode = event.keyCode;\n const hasModifier = hasModifierKey(event);\n\n // Prevent the default action on all escape key presses. This is here primarily to bring IE\n // in line with other browsers. By default, pressing escape on IE will cause it to revert\n // the input value to the one that it had on focus, however it won't dispatch any events\n // which means that the model value will be out of sync with the view.\n if (keyCode === ESCAPE && !hasModifier) {\n event.preventDefault();\n }\n\n if (this.activeOption && keyCode === ENTER && this.panelOpen && !hasModifier) {\n this.activeOption._selectViaInteraction();\n this._resetActiveItem();\n event.preventDefault();\n } else if (this.autocomplete) {\n const prevActiveItem = this.autocomplete._keyManager.activeItem;\n const isArrowKey = keyCode === UP_ARROW || keyCode === DOWN_ARROW;\n\n if (keyCode === TAB || (isArrowKey && !hasModifier && this.panelOpen)) {\n this.autocomplete._keyManager.onKeydown(event);\n } else if (isArrowKey && this._canOpen()) {\n this.openPanel();\n }\n\n if (isArrowKey || this.autocomplete._keyManager.activeItem !== prevActiveItem) {\n this._scrollToOption(this.autocomplete._keyManager.activeItemIndex || 0);\n }\n }\n }\n\n _handleInput(event: KeyboardEvent): void {\n let target = event.target as HTMLInputElement;\n let value: number | string | null = target.value;\n\n // Based on `NumberValueAccessor` from forms.\n if (target.type === 'number') {\n value = value == '' ? null : parseFloat(value);\n }\n\n // If the input has a placeholder, IE will fire the `input` event on page load,\n // focus and blur, in addition to when the user actually changed the value. To\n // filter out all of the extra events, we save the value on focus and between\n // `input` events, and we check whether it changed.\n // See: https://connect.microsoft.com/IE/feedback/details/885747/\n if (this._previousValue !== value) {\n this._previousValue = value;\n this._onChange(value);\n\n if (this._canOpen() && this._document.activeElement === event.target) {\n this.openPanel();\n }\n }\n }\n\n _handleFocus(): void {\n if (!this._canOpenOnNextFocus) {\n this._canOpenOnNextFocus = true;\n } else if (this._canOpen()) {\n this._previousValue = this._element.nativeElement.value;\n this._attachOverlay();\n this._floatLabel(true);\n }\n }\n\n _handleClick(): void {\n if (this._canOpen() && !this.panelOpen) {\n this.openPanel();\n }\n }\n\n /**\n * In \"auto\" mode, the label will animate down as soon as focus is lost.\n * This causes the value to jump when selecting an option with the mouse.\n * This method manually floats the label until the panel can be closed.\n * @param shouldAnimate Whether the label should be animated when it is floated.\n */\n private _floatLabel(shouldAnimate = false): void {\n if (this._formField && this._formField.floatLabel === 'auto') {\n if (shouldAnimate) {\n this._formField._animateAndLockLabel();\n } else {\n this._formField.floatLabel = 'always';\n }\n\n this._manuallyFloatingLabel = true;\n }\n }\n\n /** If the label has been manually elevated, return it to its normal state. */\n private _resetLabel(): void {\n if (this._manuallyFloatingLabel) {\n this._formField.floatLabel = 'auto';\n this._manuallyFloatingLabel = false;\n }\n }\n\n /**\n * This method listens to a stream of panel closing actions and resets the\n * stream every time the option list changes.\n */\n private _subscribeToClosingActions(): Subscription {\n const firstStable = this._zone.onStable.pipe(take(1));\n const optionChanges = this.autocomplete.options.changes.pipe(\n tap(() => this._positionStrategy.reapplyLastPosition()),\n // Defer emitting to the stream until the next tick, because changing\n // bindings in here will cause \"changed after checked\" errors.\n delay(0),\n );\n\n // When the zone is stable initially, and when the option list changes...\n return (\n merge(firstStable, optionChanges)\n .pipe(\n // create a new stream of panelClosingActions, replacing any previous streams\n // that were created, and flatten it so our stream only emits closing events...\n switchMap(() => {\n const wasOpen = this.panelOpen;\n this._resetActiveItem();\n this.autocomplete._setVisibility();\n this._changeDetectorRef.detectChanges();\n\n if (this.panelOpen) {\n this._overlayRef!.updatePosition();\n\n // If the `panelOpen` state changed, we need to make sure to emit the `opened`\n // event, because we may not have emitted it when the panel was attached. This\n // can happen if the users opens the panel and there are no options, but the\n // options come in slightly later or as a result of the value changing.\n if (wasOpen !== this.panelOpen) {\n this.autocomplete.opened.emit();\n }\n }\n\n return this.panelClosingActions;\n }),\n // when the first closing event occurs...\n take(1),\n )\n // set the value, close the panel, and complete.\n .subscribe(event => this._setValueAndClose(event))\n );\n }\n\n /** Destroys the autocomplete suggestion panel. */\n private _destroyPanel(): void {\n if (this._overlayRef) {\n this.closePanel();\n this._overlayRef.dispose();\n this._overlayRef = null;\n }\n }\n\n private _setTriggerValue(value: any): void {\n const toDisplay =\n this.autocomplete && this.autocomplete.displayWith\n ? this.autocomplete.displayWith(value)\n : value;\n\n // Simply falling back to an empty string if the display value is falsy does not work properly.\n // The display value can also be the number zero and shouldn't fall back to an empty string.\n const inputValue = toDisplay != null ? toDisplay : '';\n\n // If it's used within a `MatFormField`, we should set it through the property so it can go\n // through change detection.\n if (this._formField) {\n this._formField._control.value = inputValue;\n } else {\n this._element.nativeElement.value = inputValue;\n }\n\n this._previousValue = inputValue;\n }\n\n /**\n * This method closes the panel, and if a value is specified, also sets the associated\n * control to that value. It will also mark the control as dirty if this interaction\n * stemmed from the user.\n */\n private _setValueAndClose(event: MatOptionSelectionChange | null): void {\n const source = event && event.source;\n\n if (source) {\n this._clearPreviousSelectedOption(source);\n this._setTriggerValue(source.value);\n this._onChange(source.value);\n this.autocomplete._emitSelectEvent(source);\n this._element.nativeElement.focus();\n }\n\n this.closePanel();\n }\n\n /**\n * Clear any previous selected option and emit a selection change event for this option\n */\n private _clearPreviousSelectedOption(skip: MatOption) {\n this.autocomplete.options.forEach(option => {\n if (option !== skip && option.selected) {\n option.deselect();\n }\n });\n }\n\n private _attachOverlay(): void {\n if (!this.autocomplete && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getMatAutocompleteMissingPanelError();\n }\n\n let overlayRef = this._overlayRef;\n\n if (!overlayRef) {\n this._portal = new TemplatePortal(this.autocomplete.template, this._viewContainerRef, {\n id: this._formField?.getLabelId(),\n });\n overlayRef = this._overlay.create(this._getOverlayConfig());\n this._overlayRef = overlayRef;\n\n // Use the `keydownEvents` in order to take advantage of\n // the overlay event targeting provided by the CDK overlay.\n overlayRef.keydownEvents().subscribe(event => {\n // Close when pressing ESCAPE or ALT + UP_ARROW, based on the a11y guidelines.\n // See: https://www.w3.org/TR/wai-aria-practices-1.1/#textbox-keyboard-interaction\n if (\n (event.keyCode === ESCAPE && !hasModifierKey(event)) ||\n (event.keyCode === UP_ARROW && hasModifierKey(event, 'altKey'))\n ) {\n this._closeKeyEventStream.next();\n this._resetActiveItem();\n\n // We need to stop propagation, otherwise the event will eventually\n // reach the input itself and cause the overlay to be reopened.\n event.stopPropagation();\n event.preventDefault();\n }\n });\n\n this._viewportSubscription = this._viewportRuler.change().subscribe(() => {\n if (this.panelOpen && overlayRef) {\n overlayRef.updateSize({width: this._getPanelWidth()});\n }\n });\n } else {\n // Update the trigger, panel width and direction, in case anything has changed.\n this._positionStrategy.setOrigin(this._getConnectedElement());\n overlayRef.updateSize({width: this._getPanelWidth()});\n }\n\n if (overlayRef && !overlayRef.hasAttached()) {\n overlayRef.attach(this._portal);\n this._closingActionsSubscription = this._subscribeToClosingActions();\n }\n\n const wasOpen = this.panelOpen;\n\n this.autocomplete._setVisibility();\n this.autocomplete._isOpen = this._overlayAttached = true;\n\n // We need to do an extra `panelOpen` check in here, because the\n // autocomplete won't be shown if there are no options.\n if (this.panelOpen && wasOpen !== this.panelOpen) {\n this.autocomplete.opened.emit();\n }\n }\n\n private _getOverlayConfig(): OverlayConfig {\n return new OverlayConfig({\n positionStrategy: this._getOverlayPosition(),\n scrollStrategy: this._scrollStrategy(),\n width: this._getPanelWidth(),\n direction: this._dir,\n panelClass: this._defaults?.overlayPanelClass,\n });\n }\n\n private _getOverlayPosition(): PositionStrategy {\n const strategy = this._overlay\n .position()\n .flexibleConnectedTo(this._getConnectedElement())\n .withFlexibleDimensions(false)\n .withPush(false);\n\n this._setStrategyPositions(strategy);\n this._positionStrategy = strategy;\n return strategy;\n }\n\n /** Sets the positions on a position strategy based on the directive's input state. */\n private _setStrategyPositions(positionStrategy: FlexibleConnectedPositionStrategy) {\n // Note that we provide horizontal fallback positions, even though by default the dropdown\n // width matches the input, because consumers can override the width. See #18854.\n const belowPositions: ConnectedPosition[] = [\n {originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top'},\n {originX: 'end', originY: 'bottom', overlayX: 'end', overlayY: 'top'},\n ];\n\n // The overlay edge connected to the trigger should have squared corners, while\n // the opposite end has rounded corners. We apply a CSS class to swap the\n // border-radius based on the overlay position.\n const panelClass = this._aboveClass;\n const abovePositions: ConnectedPosition[] = [\n {originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom', panelClass},\n {originX: 'end', originY: 'top', overlayX: 'end', overlayY: 'bottom', panelClass},\n ];\n\n let positions: ConnectedPosition[];\n\n if (this.position === 'above') {\n positions = abovePositions;\n } else if (this.position === 'below') {\n positions = belowPositions;\n } else {\n positions = [...belowPositions, ...abovePositions];\n }\n\n positionStrategy.withPositions(positions);\n }\n\n private _getConnectedElement(): ElementRef<HTMLElement> {\n if (this.connectedTo) {\n return this.connectedTo.elementRef;\n }\n\n return this._formField ? this._formField.getConnectedOverlayOrigin() : this._element;\n }\n\n private _getPanelWidth(): number | string {\n return this.autocomplete.panelWidth || this._getHostWidth();\n }\n\n /** Returns the width of the input element, so the panel width can match it. */\n private _getHostWidth(): number {\n return this._getConnectedElement().nativeElement.getBoundingClientRect().width;\n }\n\n /**\n * Resets the active item to -1 so arrow events will activate the\n * correct options, or to 0 if the consumer opted into it.\n */\n private _resetActiveItem(): void {\n const autocomplete = this.autocomplete;\n\n if (autocomplete.autoActiveFirstOption) {\n // Note that we go through `setFirstItemActive`, rather than `setActiveItem(0)`, because\n // the former will find the next enabled option, if the first one is disabled.\n autocomplete._keyManager.setFirstItemActive();\n } else {\n autocomplete._keyManager.setActiveItem(-1);\n }\n }\n\n /** Determines whether the panel can be opened. */\n private _canOpen(): boolean {\n const element = this._element.nativeElement;\n return !element.readOnly && !element.disabled && !this._autocompleteDisabled;\n }\n\n /** Use defaultView of injected document if available or fallback to global window reference */\n private _getWindow(): Window {\n return this._document?.defaultView || window;\n }\n\n /** Scrolls to a particular option in the list. */\n private _scrollToOption(index: number): void {\n // Given that we are not actually focusing active options, we must manually adjust scroll\n // to reveal options below the fold. First, we find the offset of the option from the top\n // of the panel. If that offset is below the fold, the new scrollTop will be the offset -\n // the panel height + the option height, so the active option will be just visible at the\n // bottom of the panel. If that offset is above the top of the visible panel, the new scrollTop\n // will become the offset. If that offset is visible within the panel already, the scrollTop is\n // not adjusted.\n const autocomplete = this.autocomplete;\n const labelCount = _countGroupLabelsBeforeOption(\n index,\n autocomplete.options,\n autocomplete.optionGroups,\n );\n\n if (index === 0 && labelCount === 1) {\n // If we've got one group label before the option and we're at the top option,\n // scroll the list to the top. This is better UX than scrolling the list to the\n // top of the option, because it allows the user to read the top group's label.\n autocomplete._setScrollTop(0);\n } else if (autocomplete.panel) {\n const option = autocomplete.options.toArray()[index];\n\n if (option) {\n const element = option._getHostElement();\n const newScrollPosition = _getOptionScrollPosition(\n element.offsetTop,\n element.offsetHeight,\n autocomplete._getScrollTop(),\n autocomplete.panel.nativeElement.offsetHeight,\n );\n\n autocomplete._setScrollTop(newScrollPosition);\n }\n }\n }\n}\n\n@Directive({\n selector: `input[matAutocomplete], textarea[matAutocomplete]`,\n host: {\n 'class': 'mat-autocomplete-trigger',\n '[attr.autocomplete]': 'autocompleteAttribute',\n '[attr.role]': 'autocompleteDisabled ? null : \"combobox\"',\n '[attr.aria-autocomplete]': 'autocompleteDisabled ? null : \"list\"',\n '[attr.aria-activedescendant]': '(panelOpen && activeOption) ? activeOption.id : null',\n '[attr.aria-expanded]': 'autocompleteDisabled ? null : panelOpen.toString()',\n '[attr.aria-owns]': '(autocompleteDisabled || !panelOpen) ? null : autocomplete?.id',\n '[attr.aria-haspopup]': 'autocompleteDisabled ? null : \"listbox\"',\n // Note: we use `focusin`, as opposed to `focus`, in order to open the panel\n // a little earlier. This avoids issues where IE delays the focusing of the input.\n '(focusin)': '_handleFocus()',\n '(blur)': '_onTouched()',\n '(input)': '_handleInput($event)',\n '(keydown)': '_handleKeydown($event)',\n '(click)': '_handleClick()',\n },\n exportAs: 'matAutocompleteTrigger',\n providers: [MAT_AUTOCOMPLETE_VALUE_ACCESSOR],\n})\nexport class MatAutocompleteTrigger extends _MatAutocompleteTriggerBase {\n protected _aboveClass = 'mat-autocomplete-panel-above';\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 {NgModule} from '@angular/core';\nimport {CommonModule} from '@angular/common';\nimport {OverlayModule} from '@angular/cdk/overlay';\nimport {MatOptionModule, MatCommonModule} from '@angular/material/core';\nimport {CdkScrollableModule} from '@angular/cdk/scrolling';\nimport {MatAutocomplete} from './autocomplete';\nimport {\n MatAutocompleteTrigger,\n MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY_PROVIDER,\n} from './autocomplete-trigger';\nimport {MatAutocompleteOrigin} from './autocomplete-origin';\n\n@NgModule({\n imports: [OverlayModule, MatOptionModule, MatCommonModule, CommonModule],\n exports: [\n MatAutocomplete,\n MatAutocompleteTrigger,\n MatAutocompleteOrigin,\n CdkScrollableModule,\n MatOptionModule,\n MatCommonModule,\n ],\n declarations: [MatAutocomplete, MatAutocompleteTrigger, MatAutocompleteOrigin],\n providers: [MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY_PROVIDER],\n})\nexport class MatAutocompleteModule {}\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 './autocomplete';\nexport * from './autocomplete-module';\nexport * from './autocomplete-trigger';\nexport * from './autocomplete-origin';\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":["observableOf"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;AA0CA;;;;AAIA,IAAI,4BAA4B,GAAG,CAAC,CAAC;AAErC;MACa,4BAA4B;IACvC;;IAES,MAA4B;;IAE5B,MAAsB;QAFtB,WAAM,GAAN,MAAM,CAAsB;QAE5B,WAAM,GAAN,MAAM,CAAgB;KAC3B;CACL;AAWD;AACA;AACA,MAAM,yBAAyB,GAAG,kBAAkB,CAAC;CAAQ,CAAC,CAAC;AAW/D;MACa,gCAAgC,GAAG,IAAI,cAAc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out';
11
11
  import { Breakpoints } from '@angular/cdk/layout';
12
12
  import { _getFocusedElementPierceShadowDom } from '@angular/cdk/platform';
13
13
  import { DOCUMENT } from '@angular/common';
14
- import { trigger, state, style, transition, animate } from '@angular/animations';
14
+ import { trigger, state, style, transition, group, animate, query, animateChild } from '@angular/animations';
15
15
  import { Directionality } from '@angular/cdk/bidi';
16
16
  import { Subject, merge, of } from 'rxjs';
17
17
  import { ESCAPE, hasModifierKey } from '@angular/cdk/keycodes';
@@ -30,8 +30,14 @@ const matBottomSheetAnimations = {
30
30
  bottomSheetState: trigger('state', [
31
31
  state('void, hidden', style({ transform: 'translateY(100%)' })),
32
32
  state('visible', style({ transform: 'translateY(0%)' })),
33
- transition('visible => void, visible => hidden', animate(`${AnimationDurations.COMPLEX} ${AnimationCurves.ACCELERATION_CURVE}`)),
34
- transition('void => visible', animate(`${AnimationDurations.EXITING} ${AnimationCurves.DECELERATION_CURVE}`)),
33
+ transition('visible => void, visible => hidden', group([
34
+ animate(`${AnimationDurations.COMPLEX} ${AnimationCurves.ACCELERATION_CURVE}`),
35
+ query('@*', animateChild(), { optional: true }),
36
+ ])),
37
+ transition('void => visible', group([
38
+ animate(`${AnimationDurations.EXITING} ${AnimationCurves.DECELERATION_CURVE}`),
39
+ query('@*', animateChild(), { optional: true }),
40
+ ])),
35
41
  ]),
36
42
  };
37
43
 
@@ -1 +1 @@
1
- {"version":3,"file":"bottom-sheet.mjs","sources":["../../../../../../src/material/bottom-sheet/bottom-sheet-animations.ts","../../../../../../src/material/bottom-sheet/bottom-sheet-config.ts","../../../../../../src/material/bottom-sheet/bottom-sheet-container.ts","../../../../../../src/material/bottom-sheet/bottom-sheet-container.html","../../../../../../src/material/bottom-sheet/bottom-sheet-module.ts","../../../../../../src/material/bottom-sheet/bottom-sheet-ref.ts","../../../../../../src/material/bottom-sheet/bottom-sheet.ts","../../../../../../src/material/bottom-sheet/public-api.ts","../../../../../../src/material/bottom-sheet/index.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.io/license\n */\nimport {\n animate,\n state,\n style,\n transition,\n trigger,\n AnimationTriggerMetadata,\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 animate(`${AnimationDurations.COMPLEX} ${AnimationCurves.ACCELERATION_CURVE}`),\n ),\n transition(\n 'void => visible',\n animate(`${AnimationDurations.EXITING} ${AnimationCurves.DECELERATION_CURVE}`),\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 {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 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","/**\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 {AnimationEvent} from '@angular/animations';\nimport {FocusTrap, FocusTrapFactory, InteractivityChecker} from '@angular/cdk/a11y';\nimport {coerceArray} from '@angular/cdk/coercion';\nimport {BreakpointObserver, Breakpoints} from '@angular/cdk/layout';\nimport {_getFocusedElementPierceShadowDom} from '@angular/cdk/platform';\nimport {\n BasePortalOutlet,\n CdkPortalOutlet,\n ComponentPortal,\n DomPortal,\n TemplatePortal,\n} from '@angular/cdk/portal';\nimport {DOCUMENT} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ComponentRef,\n ElementRef,\n EmbeddedViewRef,\n EventEmitter,\n Inject,\n NgZone,\n OnDestroy,\n Optional,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport {Subscription} from 'rxjs';\nimport {matBottomSheetAnimations} from './bottom-sheet-animations';\nimport {MatBottomSheetConfig} from './bottom-sheet-config';\n\n// TODO(crisbeto): consolidate some logic between this, MatDialog and MatSnackBar\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 styleUrls: ['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 'role': 'dialog',\n 'aria-modal': 'true',\n '[attr.aria-label]': 'bottomSheetConfig?.ariaLabel',\n '[@state]': '_animationState',\n '(@state.start)': '_onAnimationStart($event)',\n '(@state.done)': '_onAnimationDone($event)',\n },\n})\nexport class MatBottomSheetContainer extends BasePortalOutlet implements OnDestroy {\n private _breakpointSubscription: Subscription;\n\n /** The portal outlet inside of this container into which the content will be loaded. */\n @ViewChild(CdkPortalOutlet, {static: true}) _portalOutlet: CdkPortalOutlet;\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 /** The class that traps and manages focus within the bottom sheet. */\n private _focusTrap: FocusTrap;\n\n /** Element that was focused before the bottom sheet was opened. */\n private _elementFocusedBeforeOpened: HTMLElement | null = null;\n\n /** Server-side rendering-compatible reference to the global document object. */\n private _document: Document;\n\n /** Whether the component has been destroyed. */\n private _destroyed: boolean;\n\n constructor(\n private _elementRef: ElementRef<HTMLElement>,\n private _changeDetectorRef: ChangeDetectorRef,\n private _focusTrapFactory: FocusTrapFactory,\n private readonly _interactivityChecker: InteractivityChecker,\n private readonly _ngZone: NgZone,\n breakpointObserver: BreakpointObserver,\n @Optional() @Inject(DOCUMENT) document: any,\n /** The bottom sheet configuration. */\n public bottomSheetConfig: MatBottomSheetConfig,\n ) {\n super();\n\n this._document = document;\n this._breakpointSubscription = breakpointObserver\n .observe([Breakpoints.Medium, Breakpoints.Large, Breakpoints.XLarge])\n .subscribe(() => {\n this._toggleClass(\n 'mat-bottom-sheet-container-medium',\n breakpointObserver.isMatched(Breakpoints.Medium),\n );\n this._toggleClass(\n 'mat-bottom-sheet-container-large',\n breakpointObserver.isMatched(Breakpoints.Large),\n );\n this._toggleClass(\n 'mat-bottom-sheet-container-xlarge',\n breakpointObserver.isMatched(Breakpoints.XLarge),\n );\n });\n }\n\n /** Attach a component portal as content to this bottom sheet container. */\n attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T> {\n this._validatePortalAttached();\n this._setPanelClass();\n this._savePreviouslyFocusedElement();\n return this._portalOutlet.attachComponentPortal(portal);\n }\n\n /** Attach a template portal as content to this bottom sheet container. */\n attachTemplatePortal<C>(portal: TemplatePortal<C>): EmbeddedViewRef<C> {\n this._validatePortalAttached();\n this._setPanelClass();\n this._savePreviouslyFocusedElement();\n return this._portalOutlet.attachTemplatePortal(portal);\n }\n\n /**\n * Attaches a DOM portal to the bottom sheet container.\n * @deprecated To be turned into a method.\n * @breaking-change 10.0.0\n */\n override attachDomPortal = (portal: DomPortal) => {\n this._validatePortalAttached();\n this._setPanelClass();\n this._savePreviouslyFocusedElement();\n return this._portalOutlet.attachDomPortal(portal);\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.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 ngOnDestroy() {\n this._breakpointSubscription.unsubscribe();\n this._destroyed = true;\n }\n\n _onAnimationDone(event: AnimationEvent) {\n if (event.toState === 'hidden') {\n this._restoreFocus();\n } else 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 private _toggleClass(cssClass: string, add: boolean) {\n this._elementRef.nativeElement.classList.toggle(cssClass, add);\n }\n\n private _validatePortalAttached() {\n if (this._portalOutlet.hasAttached() && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error('Attempting to attach bottom sheet content after content is already attached');\n }\n }\n\n private _setPanelClass() {\n const element: HTMLElement = this._elementRef.nativeElement;\n element.classList.add(...coerceArray(this.bottomSheetConfig.panelClass || []));\n }\n\n /**\n * Focuses the provided element. If the element is not focusable, it will add a tabIndex\n * attribute to forcefully focus it. The attribute is removed after focus is moved.\n * @param element The element to focus.\n */\n private _forceFocus(element: HTMLElement, options?: FocusOptions) {\n if (!this._interactivityChecker.isFocusable(element)) {\n element.tabIndex = -1;\n // The tabindex attribute should be removed to avoid navigating to that element again\n this._ngZone.runOutsideAngular(() => {\n element.addEventListener('blur', () => element.removeAttribute('tabindex'));\n element.addEventListener('mousedown', () => element.removeAttribute('tabindex'));\n });\n }\n element.focus(options);\n }\n\n /**\n * Focuses the first element that matches the given selector within the focus trap.\n * @param selector The CSS selector for the element to set focus to.\n */\n private _focusByCssSelector(selector: string, options?: FocusOptions) {\n let elementToFocus = this._elementRef.nativeElement.querySelector(\n selector,\n ) as HTMLElement | null;\n if (elementToFocus) {\n this._forceFocus(elementToFocus, options);\n }\n }\n\n /**\n * Moves the focus inside the focus trap. When autoFocus is not set to 'bottom-sheet',\n * if focus cannot be moved then focus will go to the bottom sheet container.\n */\n private _trapFocus() {\n const element = this._elementRef.nativeElement;\n\n if (!this._focusTrap) {\n this._focusTrap = this._focusTrapFactory.create(element);\n }\n\n // If were to attempt to focus immediately, then the content of the bottom sheet would not\n // yet be ready in instances where change detection has to run first. To deal with this,\n // we simply wait for the microtask queue to be empty when setting focus when autoFocus\n // isn't set to bottom sheet. If the element inside the bottom sheet can't be focused,\n // then the container is focused so the user can't tab into other elements behind it.\n switch (this.bottomSheetConfig.autoFocus) {\n case false:\n case 'dialog':\n const activeElement = _getFocusedElementPierceShadowDom();\n // Ensure that focus is on the bottom sheet container. It's possible that a different\n // component tried to move focus while the open animation was running. See:\n // https://github.com/angular/components/issues/16215. Note that we only want to do this\n // if the focus isn't inside the bottom sheet already, because it's possible that the\n // consumer specified `autoFocus` in order to move focus themselves.\n if (activeElement !== element && !element.contains(activeElement)) {\n element.focus();\n }\n break;\n case true:\n case 'first-tabbable':\n this._focusTrap.focusInitialElementWhenReady();\n break;\n case 'first-heading':\n this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role=\"heading\"]');\n break;\n default:\n this._focusByCssSelector(this.bottomSheetConfig.autoFocus!);\n break;\n }\n }\n\n /** Restores focus to the element that was focused before the bottom sheet was opened. */\n private _restoreFocus() {\n const toFocus = this._elementFocusedBeforeOpened;\n\n // We need the extra check, because IE can set the `activeElement` to null in some cases.\n if (this.bottomSheetConfig.restoreFocus && toFocus && typeof toFocus.focus === 'function') {\n const activeElement = _getFocusedElementPierceShadowDom();\n const element = this._elementRef.nativeElement;\n\n // Make sure that focus is still inside the bottom sheet or is on the body (usually because a\n // non-focusable element like the backdrop was clicked) before moving it. It's possible that\n // the consumer moved it themselves before the animation was done, in which case we shouldn't\n // do anything.\n if (\n !activeElement ||\n activeElement === this._document.body ||\n activeElement === element ||\n element.contains(activeElement)\n ) {\n toFocus.focus();\n }\n }\n\n if (this._focusTrap) {\n this._focusTrap.destroy();\n }\n }\n\n /** Saves a reference to the element that was focused before the bottom sheet was opened. */\n private _savePreviouslyFocusedElement() {\n this._elementFocusedBeforeOpened = _getFocusedElementPierceShadowDom();\n\n // The `focus` method isn't available during server-side rendering.\n if (this._elementRef.nativeElement.focus) {\n this._ngZone.runOutsideAngular(() => {\n Promise.resolve().then(() => this._elementRef.nativeElement.focus());\n });\n }\n }\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.io/license\n */\n\nimport {OverlayModule} from '@angular/cdk/overlay';\nimport {PortalModule} from '@angular/cdk/portal';\nimport {NgModule} from '@angular/core';\nimport {MatCommonModule} from '@angular/material/core';\nimport {MatBottomSheetContainer} from './bottom-sheet-container';\n\n@NgModule({\n imports: [OverlayModule, MatCommonModule, PortalModule],\n exports: [MatBottomSheetContainer, MatCommonModule],\n declarations: [MatBottomSheetContainer],\n})\nexport class MatBottomSheetModule {}\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 {ESCAPE, hasModifierKey} from '@angular/cdk/keycodes';\nimport {OverlayRef} from '@angular/cdk/overlay';\nimport {merge, Observable, Subject} from 'rxjs';\nimport {filter, take} from 'rxjs/operators';\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 instance: T;\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 been dismissed. */\n private readonly _afterDismissed = new Subject<R | 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: number;\n\n constructor(containerInstance: MatBottomSheetContainer, private _overlayRef: OverlayRef) {\n this.containerInstance = containerInstance;\n this.disableClose = containerInstance.bottomSheetConfig.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 _overlayRef.dispose();\n });\n\n _overlayRef\n .detachments()\n .pipe(take(1))\n .subscribe(() => {\n this._afterDismissed.next(this._result);\n this._afterDismissed.complete();\n });\n\n merge(\n _overlayRef.backdropClick(),\n _overlayRef.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._afterDismissed.closed) {\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._overlayRef.dispose();\n }, event.totalTime + 100);\n\n this._overlayRef.detachBackdrop();\n });\n\n this._result = result;\n this.containerInstance.exit();\n }\n }\n\n /** Gets an observable that is notified when the bottom sheet is finished closing. */\n afterDismissed(): Observable<R | undefined> {\n return this._afterDismissed;\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._overlayRef.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._overlayRef.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.io/license\n */\n\nimport {Directionality} from '@angular/cdk/bidi';\nimport {Overlay, OverlayConfig, OverlayRef} from '@angular/cdk/overlay';\nimport {ComponentPortal, ComponentType, TemplatePortal} from '@angular/cdk/portal';\nimport {\n ComponentRef,\n Injectable,\n Injector,\n Optional,\n SkipSelf,\n TemplateRef,\n InjectionToken,\n Inject,\n OnDestroy,\n StaticProvider,\n InjectFlags,\n} from '@angular/core';\nimport {of as observableOf} from 'rxjs';\nimport {MAT_BOTTOM_SHEET_DATA, MatBottomSheetConfig} from './bottom-sheet-config';\nimport {MatBottomSheetContainer} from './bottom-sheet-container';\nimport {MatBottomSheetModule} from './bottom-sheet-module';\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: MatBottomSheetModule})\nexport class MatBottomSheet implements OnDestroy {\n private _bottomSheetRefAtThisLevel: MatBottomSheetRef<any> | null = null;\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(\n private _overlay: Overlay,\n private _injector: Injector,\n @Optional() @SkipSelf() private _parentBottomSheet: MatBottomSheet,\n @Optional()\n @Inject(MAT_BOTTOM_SHEET_DEFAULT_OPTIONS)\n private _defaultOptions?: MatBottomSheetConfig,\n ) {}\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 = _applyConfigDefaults(\n this._defaultOptions || new MatBottomSheetConfig(),\n config,\n );\n const overlayRef = this._createOverlay(_config);\n const container = this._attachContainer(overlayRef, _config);\n const ref = new MatBottomSheetRef<T, R>(container, overlayRef);\n\n if (componentOrTemplateRef instanceof TemplateRef) {\n container.attachTemplatePortal(\n new TemplatePortal<T>(componentOrTemplateRef, null!, {\n $implicit: _config.data,\n bottomSheetRef: ref,\n } as any),\n );\n } else {\n const portal = new ComponentPortal(\n componentOrTemplateRef,\n undefined,\n this._createInjector(_config, ref),\n );\n const contentRef = container.attachComponentPortal(portal);\n ref.instance = contentRef.instance;\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\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 * Attaches the bottom sheet container component to the overlay.\n */\n private _attachContainer(\n overlayRef: OverlayRef,\n config: MatBottomSheetConfig,\n ): MatBottomSheetContainer {\n const userInjector = config && config.viewContainerRef && config.viewContainerRef.injector;\n const injector = Injector.create({\n parent: userInjector || this._injector,\n providers: [{provide: MatBottomSheetConfig, useValue: config}],\n });\n\n const containerPortal = new ComponentPortal(\n MatBottomSheetContainer,\n config.viewContainerRef,\n injector,\n );\n const containerRef: ComponentRef<MatBottomSheetContainer> = overlayRef.attach(containerPortal);\n return containerRef.instance;\n }\n\n /**\n * Creates a new overlay and places it in the correct location.\n * @param config The user-specified bottom sheet config.\n */\n private _createOverlay(config: MatBottomSheetConfig): OverlayRef {\n const overlayConfig = new OverlayConfig({\n direction: config.direction,\n hasBackdrop: config.hasBackdrop,\n disposeOnNavigation: config.closeOnNavigation,\n maxWidth: '100%',\n scrollStrategy: config.scrollStrategy || this._overlay.scrollStrategies.block(),\n positionStrategy: this._overlay.position().global().centerHorizontally().bottom('0'),\n });\n\n if (config.backdropClass) {\n overlayConfig.backdropClass = config.backdropClass;\n }\n\n return this._overlay.create(overlayConfig);\n }\n\n /**\n * Creates an injector to be used inside of a bottom sheet component.\n * @param config Config that was used to create the bottom sheet.\n * @param bottomSheetRef Reference to the bottom sheet.\n */\n private _createInjector<T>(\n config: MatBottomSheetConfig,\n bottomSheetRef: MatBottomSheetRef<T>,\n ): Injector {\n const userInjector = config && config.viewContainerRef && config.viewContainerRef.injector;\n const providers: StaticProvider[] = [\n {provide: MatBottomSheetRef, useValue: bottomSheetRef},\n {provide: MAT_BOTTOM_SHEET_DATA, useValue: config.data},\n ];\n\n if (\n config.direction &&\n (!userInjector ||\n !userInjector.get<Directionality | null>(Directionality, null, InjectFlags.Optional))\n ) {\n providers.push({\n provide: Directionality,\n useValue: {value: config.direction, change: observableOf()},\n });\n }\n\n return Injector.create({parent: userInjector || this._injector, providers});\n }\n}\n\n/**\n * Applies default options to the bottom sheet config.\n * @param defaults Object containing the default values to which to fall back.\n * @param config The configuration to which the defaults will be applied.\n * @returns The new configuration object with defaults applied.\n */\nfunction _applyConfigDefaults(\n defaults: MatBottomSheetConfig,\n config?: MatBottomSheetConfig,\n): MatBottomSheetConfig {\n return {...defaults, ...config};\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 './bottom-sheet-module';\nexport * from './bottom-sheet';\nexport * from './bottom-sheet-config';\nexport * from './bottom-sheet-container';\nexport * from './bottom-sheet-animations';\nexport * from './bottom-sheet-ref';\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":["observableOf"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;;;;;;;AAiBA;MACa,wBAAwB,GAEjC;;IAEF,gBAAgB,EAAE,OAAO,CAAC,OAAO,EAAE;QACjC,KAAK,CAAC,cAAc,EAAE,KAAK,CAAC,EAAC,SAAS,EA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AC,SAAS;aACf,CAAC,YAAY;gBACZ,CAAC,YAAY,CAAC,GAAG,CAAwB,cAAc,EAAE,IAAI,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC,EACvF;YACA,SAAS,CAAC,IAAI,CAAC;gBACb,OAAO,EAAE,cAAc;gBACvB,QAAQ,EAAE,EAAC,KAAK,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,EAAEA,EAAY,EAAE,EAAC;aAC5D,CAAC,CAAC;SACJ;QAED,OAAO,QAAQ,CAAC,MAAM,CAAC,EAAC,MAAM,EAAE,YAAY,IAAI,IAAI,CAAC,SAAS,EAAE,SAAS,EAAC,CAAC,CAAC;KAC7E;;2GA1LU,cAAc,mEAoB6B,cAAc,6CAE1D,gCAAgC;+GAtB/B,cAAc,cADF,oBAAoB;2FAChC,cAAc;kBAD1B,UAAU;mBAAC,EAAC,UAAU,EAAE,oBAAoB,EAAC;yGAqBU,cAAc;0BAAjE,QAAQ;;0BAAI,QAAQ;;0BACpB,QAAQ;;0BACR,MAAM;2BAAC,gCAAgC;;AAuK5C;;;;;;AAMA,SAAS,oBAAoB,CAC3B,QAA8B,EAC9B,MAA6B;IAE7B,OAAO,EAAC,GAAG,QAAQ,EAAE,GAAG,MAAM,EAAC,CAAC;AAClC;;AC/OA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;"}
1
+ {"version":3,"file":"bottom-sheet.mjs","sources":["../../../../../../src/material/bottom-sheet/bottom-sheet-animations.ts","../../../../../../src/material/bottom-sheet/bottom-sheet-config.ts","../../../../../../src/material/bottom-sheet/bottom-sheet-container.ts","../../../../../../src/material/bottom-sheet/bottom-sheet-container.html","../../../../../../src/material/bottom-sheet/bottom-sheet-module.ts","../../../../../../src/material/bottom-sheet/bottom-sheet-ref.ts","../../../../../../src/material/bottom-sheet/bottom-sheet.ts","../../../../../../src/material/bottom-sheet/public-api.ts","../../../../../../src/material/bottom-sheet/index.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.io/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.io/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 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","/**\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 {AnimationEvent} from '@angular/animations';\nimport {FocusTrap, FocusTrapFactory, InteractivityChecker} from '@angular/cdk/a11y';\nimport {coerceArray} from '@angular/cdk/coercion';\nimport {BreakpointObserver, Breakpoints} from '@angular/cdk/layout';\nimport {_getFocusedElementPierceShadowDom} from '@angular/cdk/platform';\nimport {\n BasePortalOutlet,\n CdkPortalOutlet,\n ComponentPortal,\n DomPortal,\n TemplatePortal,\n} from '@angular/cdk/portal';\nimport {DOCUMENT} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ComponentRef,\n ElementRef,\n EmbeddedViewRef,\n EventEmitter,\n Inject,\n NgZone,\n OnDestroy,\n Optional,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport {Subscription} from 'rxjs';\nimport {matBottomSheetAnimations} from './bottom-sheet-animations';\nimport {MatBottomSheetConfig} from './bottom-sheet-config';\n\n// TODO(crisbeto): consolidate some logic between this, MatDialog and MatSnackBar\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 styleUrls: ['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 'role': 'dialog',\n 'aria-modal': 'true',\n '[attr.aria-label]': 'bottomSheetConfig?.ariaLabel',\n '[@state]': '_animationState',\n '(@state.start)': '_onAnimationStart($event)',\n '(@state.done)': '_onAnimationDone($event)',\n },\n})\nexport class MatBottomSheetContainer extends BasePortalOutlet implements OnDestroy {\n private _breakpointSubscription: Subscription;\n\n /** The portal outlet inside of this container into which the content will be loaded. */\n @ViewChild(CdkPortalOutlet, {static: true}) _portalOutlet: CdkPortalOutlet;\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 /** The class that traps and manages focus within the bottom sheet. */\n private _focusTrap: FocusTrap;\n\n /** Element that was focused before the bottom sheet was opened. */\n private _elementFocusedBeforeOpened: HTMLElement | null = null;\n\n /** Server-side rendering-compatible reference to the global document object. */\n private _document: Document;\n\n /** Whether the component has been destroyed. */\n private _destroyed: boolean;\n\n constructor(\n private _elementRef: ElementRef<HTMLElement>,\n private _changeDetectorRef: ChangeDetectorRef,\n private _focusTrapFactory: FocusTrapFactory,\n private readonly _interactivityChecker: InteractivityChecker,\n private readonly _ngZone: NgZone,\n breakpointObserver: BreakpointObserver,\n @Optional() @Inject(DOCUMENT) document: any,\n /** The bottom sheet configuration. */\n public bottomSheetConfig: MatBottomSheetConfig,\n ) {\n super();\n\n this._document = document;\n this._breakpointSubscription = breakpointObserver\n .observe([Breakpoints.Medium, Breakpoints.Large, Breakpoints.XLarge])\n .subscribe(() => {\n this._toggleClass(\n 'mat-bottom-sheet-container-medium',\n breakpointObserver.isMatched(Breakpoints.Medium),\n );\n this._toggleClass(\n 'mat-bottom-sheet-container-large',\n breakpointObserver.isMatched(Breakpoints.Large),\n );\n this._toggleClass(\n 'mat-bottom-sheet-container-xlarge',\n breakpointObserver.isMatched(Breakpoints.XLarge),\n );\n });\n }\n\n /** Attach a component portal as content to this bottom sheet container. */\n attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T> {\n this._validatePortalAttached();\n this._setPanelClass();\n this._savePreviouslyFocusedElement();\n return this._portalOutlet.attachComponentPortal(portal);\n }\n\n /** Attach a template portal as content to this bottom sheet container. */\n attachTemplatePortal<C>(portal: TemplatePortal<C>): EmbeddedViewRef<C> {\n this._validatePortalAttached();\n this._setPanelClass();\n this._savePreviouslyFocusedElement();\n return this._portalOutlet.attachTemplatePortal(portal);\n }\n\n /**\n * Attaches a DOM portal to the bottom sheet container.\n * @deprecated To be turned into a method.\n * @breaking-change 10.0.0\n */\n override attachDomPortal = (portal: DomPortal) => {\n this._validatePortalAttached();\n this._setPanelClass();\n this._savePreviouslyFocusedElement();\n return this._portalOutlet.attachDomPortal(portal);\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.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 ngOnDestroy() {\n this._breakpointSubscription.unsubscribe();\n this._destroyed = true;\n }\n\n _onAnimationDone(event: AnimationEvent) {\n if (event.toState === 'hidden') {\n this._restoreFocus();\n } else 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 private _toggleClass(cssClass: string, add: boolean) {\n this._elementRef.nativeElement.classList.toggle(cssClass, add);\n }\n\n private _validatePortalAttached() {\n if (this._portalOutlet.hasAttached() && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error('Attempting to attach bottom sheet content after content is already attached');\n }\n }\n\n private _setPanelClass() {\n const element: HTMLElement = this._elementRef.nativeElement;\n element.classList.add(...coerceArray(this.bottomSheetConfig.panelClass || []));\n }\n\n /**\n * Focuses the provided element. If the element is not focusable, it will add a tabIndex\n * attribute to forcefully focus it. The attribute is removed after focus is moved.\n * @param element The element to focus.\n */\n private _forceFocus(element: HTMLElement, options?: FocusOptions) {\n if (!this._interactivityChecker.isFocusable(element)) {\n element.tabIndex = -1;\n // The tabindex attribute should be removed to avoid navigating to that element again\n this._ngZone.runOutsideAngular(() => {\n element.addEventListener('blur', () => element.removeAttribute('tabindex'));\n element.addEventListener('mousedown', () => element.removeAttribute('tabindex'));\n });\n }\n element.focus(options);\n }\n\n /**\n * Focuses the first element that matches the given selector within the focus trap.\n * @param selector The CSS selector for the element to set focus to.\n */\n private _focusByCssSelector(selector: string, options?: FocusOptions) {\n let elementToFocus = this._elementRef.nativeElement.querySelector(\n selector,\n ) as HTMLElement | null;\n if (elementToFocus) {\n this._forceFocus(elementToFocus, options);\n }\n }\n\n /**\n * Moves the focus inside the focus trap. When autoFocus is not set to 'bottom-sheet',\n * if focus cannot be moved then focus will go to the bottom sheet container.\n */\n private _trapFocus() {\n const element = this._elementRef.nativeElement;\n\n if (!this._focusTrap) {\n this._focusTrap = this._focusTrapFactory.create(element);\n }\n\n // If were to attempt to focus immediately, then the content of the bottom sheet would not\n // yet be ready in instances where change detection has to run first. To deal with this,\n // we simply wait for the microtask queue to be empty when setting focus when autoFocus\n // isn't set to bottom sheet. If the element inside the bottom sheet can't be focused,\n // then the container is focused so the user can't tab into other elements behind it.\n switch (this.bottomSheetConfig.autoFocus) {\n case false:\n case 'dialog':\n const activeElement = _getFocusedElementPierceShadowDom();\n // Ensure that focus is on the bottom sheet container. It's possible that a different\n // component tried to move focus while the open animation was running. See:\n // https://github.com/angular/components/issues/16215. Note that we only want to do this\n // if the focus isn't inside the bottom sheet already, because it's possible that the\n // consumer specified `autoFocus` in order to move focus themselves.\n if (activeElement !== element && !element.contains(activeElement)) {\n element.focus();\n }\n break;\n case true:\n case 'first-tabbable':\n this._focusTrap.focusInitialElementWhenReady();\n break;\n case 'first-heading':\n this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role=\"heading\"]');\n break;\n default:\n this._focusByCssSelector(this.bottomSheetConfig.autoFocus!);\n break;\n }\n }\n\n /** Restores focus to the element that was focused before the bottom sheet was opened. */\n private _restoreFocus() {\n const toFocus = this._elementFocusedBeforeOpened;\n\n // We need the extra check, because IE can set the `activeElement` to null in some cases.\n if (this.bottomSheetConfig.restoreFocus && toFocus && typeof toFocus.focus === 'function') {\n const activeElement = _getFocusedElementPierceShadowDom();\n const element = this._elementRef.nativeElement;\n\n // Make sure that focus is still inside the bottom sheet or is on the body (usually because a\n // non-focusable element like the backdrop was clicked) before moving it. It's possible that\n // the consumer moved it themselves before the animation was done, in which case we shouldn't\n // do anything.\n if (\n !activeElement ||\n activeElement === this._document.body ||\n activeElement === element ||\n element.contains(activeElement)\n ) {\n toFocus.focus();\n }\n }\n\n if (this._focusTrap) {\n this._focusTrap.destroy();\n }\n }\n\n /** Saves a reference to the element that was focused before the bottom sheet was opened. */\n private _savePreviouslyFocusedElement() {\n this._elementFocusedBeforeOpened = _getFocusedElementPierceShadowDom();\n\n // The `focus` method isn't available during server-side rendering.\n if (this._elementRef.nativeElement.focus) {\n this._ngZone.runOutsideAngular(() => {\n Promise.resolve().then(() => this._elementRef.nativeElement.focus());\n });\n }\n }\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.io/license\n */\n\nimport {OverlayModule} from '@angular/cdk/overlay';\nimport {PortalModule} from '@angular/cdk/portal';\nimport {NgModule} from '@angular/core';\nimport {MatCommonModule} from '@angular/material/core';\nimport {MatBottomSheetContainer} from './bottom-sheet-container';\n\n@NgModule({\n imports: [OverlayModule, MatCommonModule, PortalModule],\n exports: [MatBottomSheetContainer, MatCommonModule],\n declarations: [MatBottomSheetContainer],\n})\nexport class MatBottomSheetModule {}\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 {ESCAPE, hasModifierKey} from '@angular/cdk/keycodes';\nimport {OverlayRef} from '@angular/cdk/overlay';\nimport {merge, Observable, Subject} from 'rxjs';\nimport {filter, take} from 'rxjs/operators';\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 instance: T;\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 been dismissed. */\n private readonly _afterDismissed = new Subject<R | 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: number;\n\n constructor(containerInstance: MatBottomSheetContainer, private _overlayRef: OverlayRef) {\n this.containerInstance = containerInstance;\n this.disableClose = containerInstance.bottomSheetConfig.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 _overlayRef.dispose();\n });\n\n _overlayRef\n .detachments()\n .pipe(take(1))\n .subscribe(() => {\n this._afterDismissed.next(this._result);\n this._afterDismissed.complete();\n });\n\n merge(\n _overlayRef.backdropClick(),\n _overlayRef.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._afterDismissed.closed) {\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._overlayRef.dispose();\n }, event.totalTime + 100);\n\n this._overlayRef.detachBackdrop();\n });\n\n this._result = result;\n this.containerInstance.exit();\n }\n }\n\n /** Gets an observable that is notified when the bottom sheet is finished closing. */\n afterDismissed(): Observable<R | undefined> {\n return this._afterDismissed;\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._overlayRef.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._overlayRef.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.io/license\n */\n\nimport {Directionality} from '@angular/cdk/bidi';\nimport {Overlay, OverlayConfig, OverlayRef} from '@angular/cdk/overlay';\nimport {ComponentPortal, ComponentType, TemplatePortal} from '@angular/cdk/portal';\nimport {\n ComponentRef,\n Injectable,\n Injector,\n Optional,\n SkipSelf,\n TemplateRef,\n InjectionToken,\n Inject,\n OnDestroy,\n StaticProvider,\n InjectFlags,\n} from '@angular/core';\nimport {of as observableOf} from 'rxjs';\nimport {MAT_BOTTOM_SHEET_DATA, MatBottomSheetConfig} from './bottom-sheet-config';\nimport {MatBottomSheetContainer} from './bottom-sheet-container';\nimport {MatBottomSheetModule} from './bottom-sheet-module';\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: MatBottomSheetModule})\nexport class MatBottomSheet implements OnDestroy {\n private _bottomSheetRefAtThisLevel: MatBottomSheetRef<any> | null = null;\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(\n private _overlay: Overlay,\n private _injector: Injector,\n @Optional() @SkipSelf() private _parentBottomSheet: MatBottomSheet,\n @Optional()\n @Inject(MAT_BOTTOM_SHEET_DEFAULT_OPTIONS)\n private _defaultOptions?: MatBottomSheetConfig,\n ) {}\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 = _applyConfigDefaults(\n this._defaultOptions || new MatBottomSheetConfig(),\n config,\n );\n const overlayRef = this._createOverlay(_config);\n const container = this._attachContainer(overlayRef, _config);\n const ref = new MatBottomSheetRef<T, R>(container, overlayRef);\n\n if (componentOrTemplateRef instanceof TemplateRef) {\n container.attachTemplatePortal(\n new TemplatePortal<T>(componentOrTemplateRef, null!, {\n $implicit: _config.data,\n bottomSheetRef: ref,\n } as any),\n );\n } else {\n const portal = new ComponentPortal(\n componentOrTemplateRef,\n undefined,\n this._createInjector(_config, ref),\n );\n const contentRef = container.attachComponentPortal(portal);\n ref.instance = contentRef.instance;\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\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 * Attaches the bottom sheet container component to the overlay.\n */\n private _attachContainer(\n overlayRef: OverlayRef,\n config: MatBottomSheetConfig,\n ): MatBottomSheetContainer {\n const userInjector = config && config.viewContainerRef && config.viewContainerRef.injector;\n const injector = Injector.create({\n parent: userInjector || this._injector,\n providers: [{provide: MatBottomSheetConfig, useValue: config}],\n });\n\n const containerPortal = new ComponentPortal(\n MatBottomSheetContainer,\n config.viewContainerRef,\n injector,\n );\n const containerRef: ComponentRef<MatBottomSheetContainer> = overlayRef.attach(containerPortal);\n return containerRef.instance;\n }\n\n /**\n * Creates a new overlay and places it in the correct location.\n * @param config The user-specified bottom sheet config.\n */\n private _createOverlay(config: MatBottomSheetConfig): OverlayRef {\n const overlayConfig = new OverlayConfig({\n direction: config.direction,\n hasBackdrop: config.hasBackdrop,\n disposeOnNavigation: config.closeOnNavigation,\n maxWidth: '100%',\n scrollStrategy: config.scrollStrategy || this._overlay.scrollStrategies.block(),\n positionStrategy: this._overlay.position().global().centerHorizontally().bottom('0'),\n });\n\n if (config.backdropClass) {\n overlayConfig.backdropClass = config.backdropClass;\n }\n\n return this._overlay.create(overlayConfig);\n }\n\n /**\n * Creates an injector to be used inside of a bottom sheet component.\n * @param config Config that was used to create the bottom sheet.\n * @param bottomSheetRef Reference to the bottom sheet.\n */\n private _createInjector<T>(\n config: MatBottomSheetConfig,\n bottomSheetRef: MatBottomSheetRef<T>,\n ): Injector {\n const userInjector = config && config.viewContainerRef && config.viewContainerRef.injector;\n const providers: StaticProvider[] = [\n {provide: MatBottomSheetRef, useValue: bottomSheetRef},\n {provide: MAT_BOTTOM_SHEET_DATA, useValue: config.data},\n ];\n\n if (\n config.direction &&\n (!userInjector ||\n !userInjector.get<Directionality | null>(Directionality, null, InjectFlags.Optional))\n ) {\n providers.push({\n provide: Directionality,\n useValue: {value: config.direction, change: observableOf()},\n });\n }\n\n return Injector.create({parent: userInjector || this._injector, providers});\n }\n}\n\n/**\n * Applies default options to the bottom sheet config.\n * @param defaults Object containing the default values to which to fall back.\n * @param config The configuration to which the defaults will be applied.\n * @returns The new configuration object with defaults applied.\n */\nfunction _applyConfigDefaults(\n defaults: MatBottomSheetConfig,\n config?: MatBottomSheetConfig,\n): MatBottomSheetConfig {\n return {...defaults, ...config};\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 './bottom-sheet-module';\nexport * from './bottom-sheet';\nexport * from './bottom-sheet-config';\nexport * from './bottom-sheet-container';\nexport * from './bottom-sheet-animations';\nexport * from './bottom-sheet-ref';\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":["observableOf"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;;;;;;;AAoBA;MACa,wBAAwB,GAEjC;;IAEF,gBAAgB,EAAE,OAAO,CAAC,OAA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