@angular/material 5.2.1 → 5.2.5

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 (191) hide show
  1. package/_theming.scss +13 -10
  2. package/autocomplete/typings/index.metadata.json +1 -1
  3. package/bundles/material-autocomplete.umd.js +1 -1
  4. package/bundles/material-autocomplete.umd.js.map +1 -1
  5. package/bundles/material-autocomplete.umd.min.js +1 -1
  6. package/bundles/material-autocomplete.umd.min.js.map +1 -1
  7. package/bundles/material-button.umd.js +2 -2
  8. package/bundles/material-button.umd.js.map +1 -1
  9. package/bundles/material-button.umd.min.js +1 -1
  10. package/bundles/material-button.umd.min.js.map +1 -1
  11. package/bundles/material-chips.umd.js +4 -0
  12. package/bundles/material-chips.umd.js.map +1 -1
  13. package/bundles/material-chips.umd.min.js +1 -1
  14. package/bundles/material-chips.umd.min.js.map +1 -1
  15. package/bundles/material-core.umd.js +64 -33
  16. package/bundles/material-core.umd.js.map +1 -1
  17. package/bundles/material-core.umd.min.js +1 -1
  18. package/bundles/material-core.umd.min.js.map +1 -1
  19. package/bundles/material-dialog.umd.js +12 -9
  20. package/bundles/material-dialog.umd.js.map +1 -1
  21. package/bundles/material-dialog.umd.min.js +1 -1
  22. package/bundles/material-dialog.umd.min.js.map +1 -1
  23. package/bundles/material-expansion.umd.js +1 -1
  24. package/bundles/material-expansion.umd.js.map +1 -1
  25. package/bundles/material-expansion.umd.min.js +1 -1
  26. package/bundles/material-expansion.umd.min.js.map +1 -1
  27. package/bundles/material-grid-list.umd.js +7 -7
  28. package/bundles/material-grid-list.umd.js.map +1 -1
  29. package/bundles/material-grid-list.umd.min.js +1 -1
  30. package/bundles/material-grid-list.umd.min.js.map +1 -1
  31. package/bundles/material-list.umd.js +46 -41
  32. package/bundles/material-list.umd.js.map +1 -1
  33. package/bundles/material-list.umd.min.js +3 -3
  34. package/bundles/material-list.umd.min.js.map +1 -1
  35. package/bundles/material-menu.umd.js +5 -5
  36. package/bundles/material-menu.umd.js.map +1 -1
  37. package/bundles/material-menu.umd.min.js +1 -1
  38. package/bundles/material-menu.umd.min.js.map +1 -1
  39. package/bundles/material-paginator.umd.js +2 -2
  40. package/bundles/material-paginator.umd.js.map +1 -1
  41. package/bundles/material-paginator.umd.min.js +1 -1
  42. package/bundles/material-paginator.umd.min.js.map +1 -1
  43. package/bundles/material-progress-spinner.umd.js +7 -3
  44. package/bundles/material-progress-spinner.umd.js.map +1 -1
  45. package/bundles/material-progress-spinner.umd.min.js +1 -1
  46. package/bundles/material-progress-spinner.umd.min.js.map +1 -1
  47. package/bundles/material-select.umd.js +3 -3
  48. package/bundles/material-select.umd.js.map +1 -1
  49. package/bundles/material-select.umd.min.js +1 -1
  50. package/bundles/material-select.umd.min.js.map +1 -1
  51. package/bundles/material-sidenav.umd.js +22 -31
  52. package/bundles/material-sidenav.umd.js.map +1 -1
  53. package/bundles/material-sidenav.umd.min.js +1 -1
  54. package/bundles/material-sidenav.umd.min.js.map +1 -1
  55. package/bundles/material-tabs.umd.js +13 -13
  56. package/bundles/material-tabs.umd.js.map +1 -1
  57. package/bundles/material-tabs.umd.min.js +1 -1
  58. package/bundles/material-tabs.umd.min.js.map +1 -1
  59. package/bundles/material.umd.js +186 -148
  60. package/bundles/material.umd.js.map +1 -1
  61. package/bundles/material.umd.min.js +17 -17
  62. package/bundles/material.umd.min.js.map +1 -1
  63. package/button/typings/index.metadata.json +1 -1
  64. package/core/typings/datetime/native-date-adapter.d.ts +17 -0
  65. package/core/typings/index.metadata.json +1 -1
  66. package/core/typings/ripple/ripple-renderer.d.ts +4 -1
  67. package/core/typings/ripple/ripple.d.ts +12 -2
  68. package/dialog/typings/index.metadata.json +1 -1
  69. package/esm2015/autocomplete.js +1 -1
  70. package/esm2015/autocomplete.js.map +1 -1
  71. package/esm2015/button.js +2 -2
  72. package/esm2015/button.js.map +1 -1
  73. package/esm2015/chips.js +4 -0
  74. package/esm2015/chips.js.map +1 -1
  75. package/esm2015/core.js +43 -26
  76. package/esm2015/core.js.map +1 -1
  77. package/esm2015/dialog.js +12 -9
  78. package/esm2015/dialog.js.map +1 -1
  79. package/esm2015/expansion.js +1 -1
  80. package/esm2015/expansion.js.map +1 -1
  81. package/esm2015/grid-list.js +7 -7
  82. package/esm2015/grid-list.js.map +1 -1
  83. package/esm2015/list.js +45 -36
  84. package/esm2015/list.js.map +1 -1
  85. package/esm2015/material.js +4 -4
  86. package/esm2015/material.js.map +1 -1
  87. package/esm2015/menu.js +2 -2
  88. package/esm2015/menu.js.map +1 -1
  89. package/esm2015/paginator.js +2 -2
  90. package/esm2015/paginator.js.map +1 -1
  91. package/esm2015/progress-spinner.js +13 -9
  92. package/esm2015/progress-spinner.js.map +1 -1
  93. package/esm2015/select.js +3 -3
  94. package/esm2015/select.js.map +1 -1
  95. package/esm2015/sidenav.js +18 -17
  96. package/esm2015/sidenav.js.map +1 -1
  97. package/esm2015/tabs.js +4 -4
  98. package/esm2015/tabs.js.map +1 -1
  99. package/esm5/autocomplete.es5.js +1 -1
  100. package/esm5/autocomplete.es5.js.map +1 -1
  101. package/esm5/button.es5.js +2 -2
  102. package/esm5/button.es5.js.map +1 -1
  103. package/esm5/chips.es5.js +4 -0
  104. package/esm5/chips.es5.js.map +1 -1
  105. package/esm5/core.es5.js +64 -33
  106. package/esm5/core.es5.js.map +1 -1
  107. package/esm5/dialog.es5.js +12 -9
  108. package/esm5/dialog.es5.js.map +1 -1
  109. package/esm5/expansion.es5.js +1 -1
  110. package/esm5/expansion.es5.js.map +1 -1
  111. package/esm5/grid-list.es5.js +7 -7
  112. package/esm5/grid-list.es5.js.map +1 -1
  113. package/esm5/list.es5.js +47 -42
  114. package/esm5/list.es5.js.map +1 -1
  115. package/esm5/material.es5.js +4 -4
  116. package/esm5/material.es5.js.map +1 -1
  117. package/esm5/menu.es5.js +2 -2
  118. package/esm5/menu.es5.js.map +1 -1
  119. package/esm5/paginator.es5.js +2 -2
  120. package/esm5/paginator.es5.js.map +1 -1
  121. package/esm5/progress-spinner.es5.js +7 -3
  122. package/esm5/progress-spinner.es5.js.map +1 -1
  123. package/esm5/select.es5.js +3 -3
  124. package/esm5/select.es5.js.map +1 -1
  125. package/esm5/sidenav.es5.js +19 -27
  126. package/esm5/sidenav.es5.js.map +1 -1
  127. package/esm5/tabs.es5.js +4 -4
  128. package/esm5/tabs.es5.js.map +1 -1
  129. package/expansion/typings/index.metadata.json +1 -1
  130. package/list/typings/index.metadata.json +1 -1
  131. package/list/typings/list.d.ts +1 -2
  132. package/list/typings/selection-list.d.ts +10 -7
  133. package/menu/typings/index.d.ts +2 -2
  134. package/menu/typings/index.metadata.json +1 -1
  135. package/package.json +4 -4
  136. package/paginator/typings/index.metadata.json +1 -1
  137. package/prebuilt-themes/deeppurple-amber.css +1 -1
  138. package/prebuilt-themes/indigo-pink.css +1 -1
  139. package/prebuilt-themes/pink-bluegrey.css +1 -1
  140. package/prebuilt-themes/purple-green.css +1 -1
  141. package/progress-spinner/typings/index.metadata.json +1 -1
  142. package/select/typings/index.metadata.json +1 -1
  143. package/select/typings/select.d.ts +1 -1
  144. package/sidenav/typings/drawer.d.ts +2 -6
  145. package/sidenav/typings/index.metadata.json +1 -1
  146. package/tabs/typings/index.d.ts +4 -4
  147. package/tabs/typings/index.metadata.json +1 -1
  148. package/typings/autocomplete/index.metadata.json +1 -1
  149. package/typings/button/index.metadata.json +1 -1
  150. package/typings/core/datetime/native-date-adapter.d.ts +17 -0
  151. package/typings/core/index.metadata.json +1 -1
  152. package/typings/core/ripple/ripple-renderer.d.ts +4 -1
  153. package/typings/core/ripple/ripple.d.ts +12 -2
  154. package/typings/dialog/index.metadata.json +1 -1
  155. package/typings/esm5/autocomplete/index.metadata.json +1 -1
  156. package/typings/esm5/button/index.metadata.json +1 -1
  157. package/typings/esm5/core/datetime/native-date-adapter.d.ts +17 -0
  158. package/typings/esm5/core/index.metadata.json +1 -1
  159. package/typings/esm5/core/ripple/ripple-renderer.d.ts +4 -1
  160. package/typings/esm5/core/ripple/ripple.d.ts +12 -2
  161. package/typings/esm5/dialog/index.metadata.json +1 -1
  162. package/typings/esm5/expansion/index.metadata.json +1 -1
  163. package/typings/esm5/index.metadata.json +1 -1
  164. package/typings/esm5/list/index.metadata.json +1 -1
  165. package/typings/esm5/list/list.d.ts +1 -2
  166. package/typings/esm5/list/selection-list.d.ts +10 -7
  167. package/typings/esm5/menu/index.d.ts +2 -2
  168. package/typings/esm5/menu/index.metadata.json +1 -1
  169. package/typings/esm5/paginator/index.metadata.json +1 -1
  170. package/typings/esm5/progress-spinner/index.metadata.json +1 -1
  171. package/typings/esm5/select/index.metadata.json +1 -1
  172. package/typings/esm5/select/select.d.ts +1 -1
  173. package/typings/esm5/sidenav/drawer.d.ts +2 -6
  174. package/typings/esm5/sidenav/index.metadata.json +1 -1
  175. package/typings/esm5/tabs/index.d.ts +4 -4
  176. package/typings/esm5/tabs/index.metadata.json +1 -1
  177. package/typings/expansion/index.metadata.json +1 -1
  178. package/typings/index.metadata.json +1 -1
  179. package/typings/list/index.metadata.json +1 -1
  180. package/typings/list/list.d.ts +1 -2
  181. package/typings/list/selection-list.d.ts +10 -7
  182. package/typings/menu/index.d.ts +2 -2
  183. package/typings/menu/index.metadata.json +1 -1
  184. package/typings/paginator/index.metadata.json +1 -1
  185. package/typings/progress-spinner/index.metadata.json +1 -1
  186. package/typings/select/index.metadata.json +1 -1
  187. package/typings/select/select.d.ts +1 -1
  188. package/typings/sidenav/drawer.d.ts +2 -6
  189. package/typings/sidenav/index.metadata.json +1 -1
  190. package/typings/tabs/index.d.ts +4 -4
  191. package/typings/tabs/index.metadata.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"select.js","sources":["../../../src/lib/select/index.ts","../../../src/lib/select/public-api.ts","../../../src/lib/select/select-module.ts","../../../src/lib/select/select.ts","../../../src/lib/select/select-errors.ts","../../../src/lib/select/select-animations.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\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 './select-module';\nexport * from './select';\nexport * from './select-animations';\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 {NgModule} from '@angular/core';\nimport {CommonModule} from '@angular/common';\nimport {MatSelect, MatSelectTrigger, MAT_SELECT_SCROLL_STRATEGY_PROVIDER} from './select';\nimport {MatCommonModule, MatOptionModule} from '@angular/material/core';\nimport {OverlayModule} from '@angular/cdk/overlay';\nimport {MatFormFieldModule} from '@angular/material/form-field';\nimport {ErrorStateMatcher} from '@angular/material/core';\n\n\n@NgModule({\n imports: [\n CommonModule,\n OverlayModule,\n MatOptionModule,\n MatCommonModule,\n ],\n exports: [MatFormFieldModule, MatSelect, MatSelectTrigger, MatOptionModule, MatCommonModule],\n declarations: [MatSelect, MatSelectTrigger],\n providers: [MAT_SELECT_SCROLL_STRATEGY_PROVIDER, ErrorStateMatcher]\n})\nexport class MatSelectModule {}\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 {ActiveDescendantKeyManager} from '@angular/cdk/a11y';\nimport {Directionality} from '@angular/cdk/bidi';\nimport {coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {SelectionModel} from '@angular/cdk/collections';\nimport {\n DOWN_ARROW,\n END,\n ENTER,\n HOME,\n SPACE,\n UP_ARROW,\n LEFT_ARROW,\n RIGHT_ARROW,\n} from '@angular/cdk/keycodes';\nimport {\n CdkConnectedOverlay,\n Overlay,\n RepositionScrollStrategy,\n ScrollStrategy,\n ViewportRuler,\n} from '@angular/cdk/overlay';\nimport {filter} from 'rxjs/operators/filter';\nimport {take} from 'rxjs/operators/take';\nimport {map} from 'rxjs/operators/map';\nimport {switchMap} from 'rxjs/operators/switchMap';\nimport {startWith} from 'rxjs/operators/startWith';\nimport {takeUntil} from 'rxjs/operators/takeUntil';\nimport {\n AfterContentInit,\n Attribute,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChild,\n ContentChildren,\n Directive,\n DoCheck,\n ElementRef,\n EventEmitter,\n Inject,\n InjectionToken,\n Input,\n isDevMode,\n NgZone,\n OnChanges,\n OnDestroy,\n OnInit,\n Optional,\n Output,\n QueryList,\n Self,\n SimpleChanges,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport {\n ControlValueAccessor,\n FormGroupDirective,\n NgControl,\n NgForm\n} from '@angular/forms';\nimport {\n CanDisable,\n ErrorStateMatcher,\n CanUpdateErrorState,\n mixinErrorState,\n HasTabIndex,\n MatOptgroup,\n MatOption,\n MatOptionSelectionChange,\n mixinDisabled,\n mixinTabIndex,\n MAT_OPTION_PARENT_COMPONENT,\n mixinDisableRipple,\n CanDisableRipple,\n _countGroupLabelsBeforeOption,\n _getOptionScrollPosition,\n} from '@angular/material/core';\nimport {MatFormField, MatFormFieldControl} from '@angular/material/form-field';\nimport {Observable} from 'rxjs/Observable';\nimport {merge} from 'rxjs/observable/merge';\nimport {Subject} from 'rxjs/Subject';\nimport {defer} from 'rxjs/observable/defer';\nimport {matSelectAnimations} from './select-animations';\nimport {\n getMatSelectDynamicMultipleError,\n getMatSelectNonArrayValueError,\n getMatSelectNonFunctionValueError,\n} from './select-errors';\n\n\nlet nextUniqueId = 0;\n\n/**\n * The following style constants are necessary to save here in order\n * to properly calculate the alignment of the selected option over\n * the trigger element.\n */\n\n/** The max height of the select's overlay panel */\nexport const SELECT_PANEL_MAX_HEIGHT = 256;\n\n/** The panel's padding on the x-axis */\nexport const SELECT_PANEL_PADDING_X = 16;\n\n/** The panel's x axis padding if it is indented (e.g. there is an option group). */\nexport const SELECT_PANEL_INDENT_PADDING_X = SELECT_PANEL_PADDING_X * 2;\n\n/** The height of the select items in `em` units. */\nexport const SELECT_ITEM_HEIGHT_EM = 3;\n\n/**\n * Distance between the panel edge and the option text in\n * multi-selection mode.\n *\n * (SELECT_PANEL_PADDING_X * 1.5) + 20 = 44\n * The padding is multiplied by 1.5 because the checkbox's margin is half the padding.\n * The checkbox width is 20px.\n */\nexport const SELECT_MULTIPLE_PANEL_PADDING_X = SELECT_PANEL_PADDING_X * 1.5 + 20;\n\n/**\n * The select panel will only \"fit\" inside the viewport if it is positioned at\n * this value or more away from the viewport boundary.\n */\nexport const SELECT_PANEL_VIEWPORT_PADDING = 8;\n\n/** Injection token that determines the scroll handling while a select is open. */\nexport const MAT_SELECT_SCROLL_STRATEGY =\n new InjectionToken<() => ScrollStrategy>('mat-select-scroll-strategy');\n\n/** @docs-private */\nexport function MAT_SELECT_SCROLL_STRATEGY_PROVIDER_FACTORY(overlay: Overlay):\n () => RepositionScrollStrategy {\n return () => overlay.scrollStrategies.reposition();\n}\n\n/** @docs-private */\nexport const MAT_SELECT_SCROLL_STRATEGY_PROVIDER = {\n provide: MAT_SELECT_SCROLL_STRATEGY,\n deps: [Overlay],\n useFactory: MAT_SELECT_SCROLL_STRATEGY_PROVIDER_FACTORY,\n};\n\n/** Change event object that is emitted when the select value has changed. */\nexport class MatSelectChange {\n constructor(\n /** Reference to the select that emitted the change event. */\n public source: MatSelect,\n /** Current value of the select that emitted the event. */\n public value: any) { }\n}\n\n// Boilerplate for applying mixins to MatSelect.\n/** @docs-private */\nexport class MatSelectBase {\n constructor(public _elementRef: ElementRef,\n public _defaultErrorStateMatcher: ErrorStateMatcher,\n public _parentForm: NgForm,\n public _parentFormGroup: FormGroupDirective,\n public ngControl: NgControl) {}\n}\nexport const _MatSelectMixinBase = mixinDisableRipple(\n mixinTabIndex(mixinDisabled(mixinErrorState(MatSelectBase))));\n\n\n/**\n * Allows the user to customize the trigger that is displayed when the select has a value.\n */\n@Directive({\n selector: 'mat-select-trigger'\n})\nexport class MatSelectTrigger {}\n\n\n@Component({\n moduleId: module.id,\n selector: 'mat-select',\n exportAs: 'matSelect',\n templateUrl: 'select.html',\n styleUrls: ['select.css'],\n inputs: ['disabled', 'disableRipple', 'tabIndex'],\n encapsulation: ViewEncapsulation.None,\n preserveWhitespaces: false,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n 'role': 'listbox',\n '[attr.id]': 'id',\n '[attr.tabindex]': 'tabIndex',\n '[attr.aria-label]': '_ariaLabel',\n '[attr.aria-labelledby]': 'ariaLabelledby',\n '[attr.aria-required]': 'required.toString()',\n '[attr.aria-disabled]': 'disabled.toString()',\n '[attr.aria-invalid]': 'errorState',\n '[attr.aria-owns]': 'panelOpen ? _optionIds : null',\n '[attr.aria-multiselectable]': 'multiple',\n '[attr.aria-describedby]': '_ariaDescribedby || null',\n '[attr.aria-activedescendant]': '_getAriaActiveDescendant()',\n '[class.mat-select-disabled]': 'disabled',\n '[class.mat-select-invalid]': 'errorState',\n '[class.mat-select-required]': 'required',\n 'class': 'mat-select',\n '(keydown)': '_handleKeydown($event)',\n '(focus)': '_onFocus()',\n '(blur)': '_onBlur()',\n },\n animations: [\n matSelectAnimations.transformPanel,\n matSelectAnimations.fadeInContent\n ],\n providers: [\n {provide: MatFormFieldControl, useExisting: MatSelect},\n {provide: MAT_OPTION_PARENT_COMPONENT, useExisting: MatSelect}\n ],\n})\nexport class MatSelect extends _MatSelectMixinBase implements AfterContentInit, OnChanges,\n OnDestroy, OnInit, DoCheck, ControlValueAccessor, CanDisable, HasTabIndex,\n MatFormFieldControl<any>, CanUpdateErrorState, CanDisableRipple {\n /** Whether or not the overlay panel is open. */\n private _panelOpen = false;\n\n /** Whether filling out the select is required in the form. */\n private _required: boolean = false;\n\n /** The scroll position of the overlay panel, calculated to center the selected option. */\n private _scrollTop = 0;\n\n /** The placeholder displayed in the trigger of the select. */\n private _placeholder: string;\n\n /** Whether the component is in multiple selection mode. */\n private _multiple: boolean = false;\n\n /** Comparison function to specify which option is displayed. Defaults to object equality. */\n private _compareWith = (o1: any, o2: any) => o1 === o2;\n\n /** Unique id for this input. */\n private _uid = `mat-select-${nextUniqueId++}`;\n\n /** Emits whenever the component is destroyed. */\n private readonly _destroy = new Subject<void>();\n\n /** The last measured value for the trigger's client bounding rect. */\n _triggerRect: ClientRect;\n\n /** The aria-describedby attribute on the select for improved a11y. */\n _ariaDescribedby: string;\n\n /** The cached font-size of the trigger element. */\n _triggerFontSize = 0;\n\n /** Deals with the selection logic. */\n _selectionModel: SelectionModel<MatOption>;\n\n /** Manages keyboard events for options in the panel. */\n _keyManager: ActiveDescendantKeyManager<MatOption>;\n\n /** `View -> model callback called when value changes` */\n _onChange: (value: any) => void = () => {};\n\n /** `View -> model callback called when select has been touched` */\n _onTouched = () => {};\n\n /** The IDs of child options to be passed to the aria-owns attribute. */\n _optionIds: string = '';\n\n /** The value of the select panel's transform-origin property. */\n _transformOrigin: string = 'top';\n\n /** Whether the panel's animation is done. */\n _panelDoneAnimating: boolean = false;\n\n /** Strategy that will be used to handle scrolling while the select panel is open. */\n _scrollStrategy = this._scrollStrategyFactory();\n\n /**\n * The y-offset of the overlay panel in relation to the trigger's top start corner.\n * This must be adjusted to align the selected option text over the trigger text.\n * when the panel opens. Will change based on the y-position of the selected option.\n */\n _offsetY = 0;\n\n /**\n * This position config ensures that the top \"start\" corner of the overlay\n * is aligned with with the top \"start\" of the origin by default (overlapping\n * the trigger completely). If the panel cannot fit below the trigger, it\n * will fall back to a position above the trigger.\n */\n _positions = [\n {\n originX: 'start',\n originY: 'top',\n overlayX: 'start',\n overlayY: 'top',\n },\n {\n originX: 'start',\n originY: 'bottom',\n overlayX: 'start',\n overlayY: 'bottom',\n },\n ];\n\n /** Whether the select is focused. */\n focused: boolean = false;\n\n /** A name for this control that can be used by `mat-form-field`. */\n controlType = 'mat-select';\n\n /** Trigger that opens the select. */\n @ViewChild('trigger') trigger: ElementRef;\n\n /** Panel containing the select options. */\n @ViewChild('panel') panel: ElementRef;\n\n /** Overlay pane containing the options. */\n @ViewChild(CdkConnectedOverlay) overlayDir: CdkConnectedOverlay;\n\n /** All of the defined select options. */\n @ContentChildren(MatOption, { descendants: true }) options: QueryList<MatOption>;\n\n /** All of the defined groups of options. */\n @ContentChildren(MatOptgroup) optionGroups: QueryList<MatOptgroup>;\n\n /** Classes to be passed to the select panel. Supports the same syntax as `ngClass`. */\n @Input() panelClass: string|string[]|Set<string>|{[key: string]: any};\n\n /** User-supplied override of the trigger element. */\n @ContentChild(MatSelectTrigger) customTrigger: MatSelectTrigger;\n\n /** Placeholder to be shown if no value has been selected. */\n @Input()\n get placeholder(): string { return this._placeholder; }\n set placeholder(value: string) {\n this._placeholder = value;\n this.stateChanges.next();\n }\n\n /** Whether the component is required. */\n @Input()\n get required(): boolean { return this._required; }\n set required(value: boolean) {\n this._required = coerceBooleanProperty(value);\n this.stateChanges.next();\n }\n\n /** Whether the user should be allowed to select multiple options. */\n @Input()\n get multiple(): boolean { return this._multiple; }\n set multiple(value: boolean) {\n if (this._selectionModel) {\n throw getMatSelectDynamicMultipleError();\n }\n\n this._multiple = coerceBooleanProperty(value);\n }\n\n /**\n * A function to compare the option values with the selected values. The first argument\n * is a value from an option. The second is a value from the selection. A boolean\n * should be returned.\n */\n @Input()\n get compareWith() { return this._compareWith; }\n set compareWith(fn: (o1: any, o2: any) => boolean) {\n if (typeof fn !== 'function') {\n throw getMatSelectNonFunctionValueError();\n }\n this._compareWith = fn;\n if (this._selectionModel) {\n // A different comparator means the selection could change.\n this._initializeSelection();\n }\n }\n\n /** Value of the select control. */\n @Input()\n get value(): any { return this._value; }\n set value(newValue: any) {\n if (newValue !== this._value) {\n this.writeValue(newValue);\n this._value = newValue;\n }\n }\n private _value: any;\n\n /** Aria label of the select. If not specified, the placeholder will be used as label. */\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 /** An object used to control when error messages are shown. */\n @Input() errorStateMatcher: ErrorStateMatcher;\n\n /** Unique id of the element. */\n @Input()\n get id(): string { return this._id; }\n set id(value: string) {\n this._id = value || this._uid;\n this.stateChanges.next();\n }\n private _id: string;\n\n /** Combined stream of all of the child options' change events. */\n readonly optionSelectionChanges: Observable<MatOptionSelectionChange> = defer(() => {\n if (this.options) {\n return merge(...this.options.map(option => option.onSelectionChange));\n }\n\n return this._ngZone.onStable\n .asObservable()\n .pipe(take(1), switchMap(() => this.optionSelectionChanges));\n });\n\n /** Event emitted when the select has been opened. */\n @Output() readonly openedChange: EventEmitter<boolean> = new EventEmitter<boolean>();\n\n /** Event emitted when the select has been opened. */\n @Output('opened')\n get _openedStream(): Observable<void> {\n return this.openedChange.pipe(filter(o => o), map(() => {}));\n }\n\n /** Event emitted when the select has been closed. */\n @Output('closed')\n get _closedStream(): Observable<void> {\n return this.openedChange.pipe(filter(o => !o), map(() => {}));\n }\n\n /**\n * Event emitted when the select has been opened.\n * @deprecated Use `openedChange` instead.\n * @deletion-target 6.0.0\n */\n @Output() readonly onOpen: Observable<void> = this._openedStream;\n\n /**\n * Event emitted when the select has been closed.\n * @deprecated Use `openedChange` instead.\n * @deletion-target 6.0.0\n */\n @Output() readonly onClose: Observable<void> = this._closedStream;\n\n /** Event emitted when the selected value has been changed by the user. */\n @Output() readonly selectionChange: EventEmitter<MatSelectChange> =\n new EventEmitter<MatSelectChange>();\n\n /**\n * Event emitted when the selected value has been changed by the user.\n * @deprecated Use `selectionChange` instead.\n * @deletion-target 6.0.0\n */\n @Output() readonly change: EventEmitter<MatSelectChange> = this.selectionChange;\n\n /**\n * Event that emits whenever the raw value of the select changes. This is here primarily\n * to facilitate the two-way binding for the `value` input.\n * @docs-private\n */\n @Output() readonly valueChange: EventEmitter<any> = new EventEmitter<any>();\n\n constructor(\n private _viewportRuler: ViewportRuler,\n private _changeDetectorRef: ChangeDetectorRef,\n private _ngZone: NgZone,\n _defaultErrorStateMatcher: ErrorStateMatcher,\n elementRef: ElementRef,\n @Optional() private _dir: Directionality,\n @Optional() _parentForm: NgForm,\n @Optional() _parentFormGroup: FormGroupDirective,\n @Optional() private _parentFormField: MatFormField,\n @Self() @Optional() public ngControl: NgControl,\n @Attribute('tabindex') tabIndex: string,\n @Inject(MAT_SELECT_SCROLL_STRATEGY) private _scrollStrategyFactory) {\n super(elementRef, _defaultErrorStateMatcher, _parentForm,\n _parentFormGroup, ngControl);\n\n if (this.ngControl) {\n // Note: we provide the value accessor through here, instead of\n // the `providers` to avoid running into a circular import.\n this.ngControl.valueAccessor = this;\n }\n\n this.tabIndex = parseInt(tabIndex) || 0;\n\n // Force setter to be called in case id was not specified.\n this.id = this.id;\n }\n\n ngOnInit() {\n this._selectionModel = new SelectionModel<MatOption>(this.multiple, undefined, false);\n this.stateChanges.next();\n }\n\n ngAfterContentInit() {\n this._initKeyManager();\n\n this.options.changes.pipe(startWith(null), takeUntil(this._destroy)).subscribe(() => {\n this._resetOptions();\n this._initializeSelection();\n });\n }\n\n ngDoCheck() {\n if (this.ngControl) {\n this.updateErrorState();\n }\n }\n\n ngOnChanges(changes: SimpleChanges) {\n // Updating the disabled state is handled by `mixinDisabled`, but we need to additionally let\n // the parent form field know to run change detection when the disabled state changes.\n if (changes.disabled) {\n this.stateChanges.next();\n }\n }\n\n ngOnDestroy() {\n this._destroy.next();\n this._destroy.complete();\n this.stateChanges.complete();\n }\n\n /** Toggles the overlay panel open or closed. */\n toggle(): void {\n this.panelOpen ? this.close() : this.open();\n }\n\n /** Opens the overlay panel. */\n open(): void {\n if (this.disabled || !this.options || !this.options.length) {\n return;\n }\n\n this._triggerRect = this.trigger.nativeElement.getBoundingClientRect();\n // Note: The computed font-size will be a string pixel value (e.g. \"16px\").\n // `parseInt` ignores the trailing 'px' and converts this to a number.\n this._triggerFontSize = parseInt(getComputedStyle(this.trigger.nativeElement)['font-size']);\n\n this._panelOpen = true;\n this._keyManager.withHorizontalOrientation(null);\n this._calculateOverlayPosition();\n this._highlightCorrectOption();\n this._changeDetectorRef.markForCheck();\n\n // Set the font size on the panel element once it exists.\n this._ngZone.onStable.asObservable().pipe(take(1)).subscribe(() => {\n if (this._triggerFontSize && this.overlayDir.overlayRef &&\n this.overlayDir.overlayRef.overlayElement) {\n this.overlayDir.overlayRef.overlayElement.style.fontSize = `${this._triggerFontSize}px`;\n }\n });\n }\n\n /** Closes the overlay panel and focuses the host element. */\n close(): void {\n if (this._panelOpen) {\n this._panelOpen = false;\n this._keyManager.withHorizontalOrientation(this._isRtl() ? 'rtl' : 'ltr');\n this._changeDetectorRef.markForCheck();\n this._onTouched();\n }\n }\n\n /**\n * Sets the select's value. Part of the ControlValueAccessor interface\n * required to integrate with Angular's core forms API.\n *\n * @param value New value to be written to the model.\n */\n writeValue(value: any): void {\n if (this.options) {\n this._setSelectionByValue(value);\n }\n }\n\n /**\n * Saves a callback function to be invoked when the select's value\n * changes from user input. Part of the ControlValueAccessor interface\n * required to integrate with Angular's core forms API.\n *\n * @param fn Callback to be triggered when the value changes.\n */\n registerOnChange(fn: (value: any) => void): void {\n this._onChange = fn;\n }\n\n /**\n * Saves a callback function to be invoked when the select is blurred\n * by the user. Part of the ControlValueAccessor interface required\n * to integrate with Angular's core forms API.\n *\n * @param fn Callback to be triggered when the component has been touched.\n */\n registerOnTouched(fn: () => {}): void {\n this._onTouched = fn;\n }\n\n /**\n * Disables the select. Part of the ControlValueAccessor interface required\n * to integrate with Angular's core forms API.\n *\n * @param isDisabled Sets whether the component is disabled.\n */\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n this._changeDetectorRef.markForCheck();\n this.stateChanges.next();\n }\n\n /** Whether or not the overlay panel is open. */\n get panelOpen(): boolean {\n return this._panelOpen;\n }\n\n /** The currently selected option. */\n get selected(): MatOption | MatOption[] {\n return this.multiple ? this._selectionModel.selected : this._selectionModel.selected[0];\n }\n\n /** The value displayed in the trigger. */\n get triggerValue(): string {\n if (this.empty) {\n return '';\n }\n\n if (this._multiple) {\n const selectedOptions = this._selectionModel.selected.map(option => option.viewValue);\n\n if (this._isRtl()) {\n selectedOptions.reverse();\n }\n\n // TODO(crisbeto): delimiter should be configurable for proper localization.\n return selectedOptions.join(', ');\n }\n\n return this._selectionModel.selected[0].viewValue;\n }\n\n /** Whether the element is in RTL mode. */\n _isRtl(): boolean {\n return this._dir ? this._dir.value === 'rtl' : false;\n }\n\n /** Handles all keydown events on the select. */\n _handleKeydown(event: KeyboardEvent): void {\n if (!this.disabled) {\n this.panelOpen ? this._handleOpenKeydown(event) : this._handleClosedKeydown(event);\n }\n }\n\n /** Handles keyboard events while the select is closed. */\n private _handleClosedKeydown(event: KeyboardEvent): void {\n const keyCode = event.keyCode;\n const isArrowKey = keyCode === DOWN_ARROW || keyCode === UP_ARROW ||\n keyCode === LEFT_ARROW || keyCode === RIGHT_ARROW;\n const isOpenKey = keyCode === ENTER || keyCode === SPACE;\n\n // Open the select on ALT + arrow key to match the native <select>\n if (isOpenKey || ((this.multiple || event.altKey) && isArrowKey)) {\n event.preventDefault(); // prevents the page from scrolling down when pressing space\n this.open();\n } else if (!this.multiple) {\n this._keyManager.onKeydown(event);\n }\n }\n\n /** Handles keyboard events when the selected is open. */\n private _handleOpenKeydown(event: KeyboardEvent): void {\n const keyCode = event.keyCode;\n const isArrowKey = keyCode === DOWN_ARROW || keyCode === UP_ARROW;\n const manager = this._keyManager;\n\n if (keyCode === HOME || keyCode === END) {\n event.preventDefault();\n keyCode === HOME ? manager.setFirstItemActive() : manager.setLastItemActive();\n } else if (isArrowKey && event.altKey) {\n // Close the select on ALT + arrow key to match the native <select>\n event.preventDefault();\n this.close();\n } else if ((keyCode === ENTER || keyCode === SPACE) && manager.activeItem) {\n event.preventDefault();\n manager.activeItem._selectViaInteraction();\n } else {\n const previouslyFocusedIndex = manager.activeItemIndex;\n\n manager.onKeydown(event);\n\n if (this._multiple && isArrowKey && event.shiftKey && manager.activeItem &&\n manager.activeItemIndex !== previouslyFocusedIndex) {\n manager.activeItem._selectViaInteraction();\n }\n }\n }\n\n /**\n * When the panel element is finished transforming in (though not fading in), it\n * emits an event and focuses an option if the panel is open.\n */\n _onPanelDone(): void {\n if (this.panelOpen) {\n this._scrollTop = 0;\n this.openedChange.emit(true);\n } else {\n this.openedChange.emit(false);\n this._panelDoneAnimating = false;\n this.overlayDir.offsetX = 0;\n this._changeDetectorRef.markForCheck();\n }\n }\n\n /**\n * When the panel content is done fading in, the _panelDoneAnimating property is\n * set so the proper class can be added to the panel.\n */\n _onFadeInDone(): void {\n this._panelDoneAnimating = this.panelOpen;\n this._changeDetectorRef.markForCheck();\n }\n\n _onFocus() {\n if (!this.disabled) {\n this.focused = true;\n this.stateChanges.next();\n }\n }\n\n /**\n * Calls the touched callback only if the panel is closed. Otherwise, the trigger will\n * \"blur\" to the panel when it opens, causing a false positive.\n */\n _onBlur() {\n this.focused = false;\n\n if (!this.disabled && !this.panelOpen) {\n this._onTouched();\n this._changeDetectorRef.markForCheck();\n this.stateChanges.next();\n }\n }\n\n /**\n * Callback that is invoked when the overlay panel has been attached.\n */\n _onAttached(): void {\n this.overlayDir.positionChange.pipe(take(1)).subscribe(() => {\n this._changeDetectorRef.detectChanges();\n this._calculateOverlayOffsetX();\n this.panel.nativeElement.scrollTop = this._scrollTop;\n });\n }\n\n /** Returns the theme to be used on the panel. */\n _getPanelTheme(): string {\n return this._parentFormField ? `mat-${this._parentFormField.color}` : '';\n }\n\n /** Whether the select has a value. */\n get empty(): boolean {\n return !this._selectionModel || this._selectionModel.isEmpty();\n }\n\n private _initializeSelection(): void {\n // Defer setting the value in order to avoid the \"Expression\n // has changed after it was checked\" errors from Angular.\n Promise.resolve().then(() => {\n this._setSelectionByValue(this.ngControl ? this.ngControl.value : this._value);\n });\n }\n\n /**\n * Sets the selected option based on a value. If no option can be\n * found with the designated value, the select trigger is cleared.\n */\n private _setSelectionByValue(value: any | any[], isUserInput = false): void {\n if (this.multiple && value) {\n if (!Array.isArray(value)) {\n throw getMatSelectNonArrayValueError();\n }\n\n this._clearSelection();\n value.forEach((currentValue: any) => this._selectValue(currentValue, isUserInput));\n this._sortValues();\n } else {\n this._clearSelection();\n\n const correspondingOption = this._selectValue(value, isUserInput);\n\n // Shift focus to the active item. Note that we shouldn't do this in multiple\n // mode, because we don't know what option the user interacted with last.\n if (correspondingOption) {\n this._keyManager.setActiveItem(this.options.toArray().indexOf(correspondingOption));\n }\n }\n\n this._changeDetectorRef.markForCheck();\n }\n\n /**\n * Finds and selects and option based on its value.\n * @returns Option that has the corresponding value.\n */\n private _selectValue(value: any, isUserInput = false): MatOption | undefined {\n const correspondingOption = this.options.find((option: MatOption) => {\n try {\n // Treat null as a special reset value.\n return option.value != null && this._compareWith(option.value, value);\n } catch (error) {\n if (isDevMode()) {\n // Notify developers of errors in their comparator.\n console.warn(error);\n }\n return false;\n }\n });\n\n if (correspondingOption) {\n isUserInput ? correspondingOption._selectViaInteraction() : correspondingOption.select();\n this._selectionModel.select(correspondingOption);\n this.stateChanges.next();\n }\n\n return correspondingOption;\n }\n\n\n /**\n * Clears the select trigger and deselects every option in the list.\n * @param skip Option that should not be deselected.\n */\n private _clearSelection(skip?: MatOption): void {\n this._selectionModel.clear();\n this.options.forEach(option => {\n if (option !== skip) {\n option.deselect();\n }\n });\n this.stateChanges.next();\n }\n\n /** Sets up a key manager to listen to keyboard events on the overlay panel. */\n private _initKeyManager() {\n this._keyManager = new ActiveDescendantKeyManager<MatOption>(this.options)\n .withTypeAhead()\n .withVerticalOrientation()\n .withHorizontalOrientation(this._isRtl() ? 'rtl' : 'ltr');\n\n this._keyManager.tabOut.pipe(takeUntil(this._destroy)).subscribe(() => this.close());\n this._keyManager.change.pipe(takeUntil(this._destroy)).subscribe(() => {\n if (this._panelOpen && this.panel) {\n this._scrollActiveOptionIntoView();\n } else if (!this._panelOpen && !this.multiple && this._keyManager.activeItem) {\n this._keyManager.activeItem._selectViaInteraction();\n }\n });\n }\n\n /** Drops current option subscriptions and IDs and resets from scratch. */\n private _resetOptions(): void {\n const changedOrDestroyed = merge(this.options.changes, this._destroy);\n\n this.optionSelectionChanges\n .pipe(takeUntil(changedOrDestroyed), filter(event => event.isUserInput))\n .subscribe(event => {\n this._onSelect(event.source);\n\n if (!this.multiple && this._panelOpen) {\n this.close();\n this.focus();\n }\n });\n\n // Listen to changes in the internal state of the options and react accordingly.\n // Handles cases like the labels of the selected options changing.\n merge(...this.options.map(option => option._stateChanges))\n .pipe(takeUntil(changedOrDestroyed))\n .subscribe(() => {\n this._changeDetectorRef.markForCheck();\n this.stateChanges.next();\n });\n\n this._setOptionIds();\n }\n\n /** Invoked when an option is clicked. */\n private _onSelect(option: MatOption): void {\n const wasSelected = this._selectionModel.isSelected(option);\n\n // TODO(crisbeto): handle blank/null options inside multi-select.\n if (this.multiple) {\n this._selectionModel.toggle(option);\n this.stateChanges.next();\n wasSelected ? option.deselect() : option.select();\n this._keyManager.setActiveItem(this._getOptionIndex(option)!);\n this._sortValues();\n } else {\n this._clearSelection(option.value == null ? undefined : option);\n\n if (option.value == null) {\n this._propagateChanges(option.value);\n } else {\n this._selectionModel.select(option);\n this.stateChanges.next();\n }\n }\n\n if (wasSelected !== this._selectionModel.isSelected(option)) {\n this._propagateChanges();\n }\n }\n\n /**\n * Sorts the model values, ensuring that they keep the same\n * order that they have in the panel.\n */\n private _sortValues(): void {\n if (this._multiple) {\n this._selectionModel.clear();\n\n this.options.forEach(option => {\n if (option.selected) {\n this._selectionModel.select(option);\n }\n });\n this.stateChanges.next();\n }\n }\n\n /** Emits change event to set the model value. */\n private _propagateChanges(fallbackValue?: any): void {\n let valueToEmit: any = null;\n\n if (this.multiple) {\n valueToEmit = (this.selected as MatOption[]).map(option => option.value);\n } else {\n valueToEmit = this.selected ? (this.selected as MatOption).value : fallbackValue;\n }\n\n this._value = valueToEmit;\n this.valueChange.emit(valueToEmit);\n this._onChange(valueToEmit);\n this.selectionChange.emit(new MatSelectChange(this, valueToEmit));\n this._changeDetectorRef.markForCheck();\n }\n\n /** Records option IDs to pass to the aria-owns property. */\n private _setOptionIds() {\n this._optionIds = this.options.map(option => option.id).join(' ');\n }\n\n /**\n * Highlights the selected item. If no option is selected, it will highlight\n * the first item instead.\n */\n private _highlightCorrectOption(): void {\n if (this._keyManager) {\n if (this.empty) {\n this._keyManager.setFirstItemActive();\n } else {\n this._keyManager.setActiveItem(this._getOptionIndex(this._selectionModel.selected[0])!);\n }\n }\n }\n\n /** Scrolls the active option into view. */\n private _scrollActiveOptionIntoView(): void {\n const activeOptionIndex = this._keyManager.activeItemIndex || 0;\n const labelCount = _countGroupLabelsBeforeOption(activeOptionIndex, this.options,\n this.optionGroups);\n\n this.panel.nativeElement.scrollTop = _getOptionScrollPosition(\n activeOptionIndex + labelCount,\n this._getItemHeight(),\n this.panel.nativeElement.scrollTop,\n SELECT_PANEL_MAX_HEIGHT\n );\n }\n\n /** Focuses the select element. */\n focus(): void {\n this._elementRef.nativeElement.focus();\n }\n\n /** Gets the index of the provided option in the option list. */\n private _getOptionIndex(option: MatOption): number | undefined {\n return this.options.reduce((result: number, current: MatOption, index: number) => {\n return result === undefined ? (option === current ? index : undefined) : result;\n }, undefined);\n }\n\n /** Calculates the scroll position and x- and y-offsets of the overlay panel. */\n private _calculateOverlayPosition(): void {\n const itemHeight = this._getItemHeight();\n const items = this._getItemCount();\n const panelHeight = Math.min(items * itemHeight, SELECT_PANEL_MAX_HEIGHT);\n const scrollContainerHeight = items * itemHeight;\n\n // The farthest the panel can be scrolled before it hits the bottom\n const maxScroll = scrollContainerHeight - panelHeight;\n\n // If no value is selected we open the popup to the first item.\n let selectedOptionOffset =\n this.empty ? 0 : this._getOptionIndex(this._selectionModel.selected[0])!;\n\n selectedOptionOffset += _countGroupLabelsBeforeOption(selectedOptionOffset, this.options,\n this.optionGroups);\n\n // We must maintain a scroll buffer so the selected option will be scrolled to the\n // center of the overlay panel rather than the top.\n const scrollBuffer = panelHeight / 2;\n this._scrollTop = this._calculateOverlayScroll(selectedOptionOffset, scrollBuffer, maxScroll);\n this._offsetY = this._calculateOverlayOffsetY(selectedOptionOffset, scrollBuffer, maxScroll);\n\n this._checkOverlayWithinViewport(maxScroll);\n }\n\n /**\n * Calculates the scroll position of the select's overlay panel.\n *\n * Attempts to center the selected option in the panel. If the option is\n * too high or too low in the panel to be scrolled to the center, it clamps the\n * scroll position to the min or max scroll positions respectively.\n */\n _calculateOverlayScroll(selectedIndex: number, scrollBuffer: number,\n maxScroll: number): number {\n const itemHeight = this._getItemHeight();\n const optionOffsetFromScrollTop = itemHeight * selectedIndex;\n const halfOptionHeight = itemHeight / 2;\n\n // Starts at the optionOffsetFromScrollTop, which scrolls the option to the top of the\n // scroll container, then subtracts the scroll buffer to scroll the option down to\n // the center of the overlay panel. Half the option height must be re-added to the\n // scrollTop so the option is centered based on its middle, not its top edge.\n const optimalScrollPosition = optionOffsetFromScrollTop - scrollBuffer + halfOptionHeight;\n return Math.min(Math.max(0, optimalScrollPosition), maxScroll);\n }\n\n /** Returns the aria-label of the select component. */\n get _ariaLabel(): string | null {\n // If an ariaLabelledby value has been set, the select should not overwrite the\n // `aria-labelledby` value by setting the ariaLabel to the placeholder.\n return this.ariaLabelledby ? null : this.ariaLabel || this.placeholder;\n }\n\n /** Determines the `aria-activedescendant` to be set on the host. */\n _getAriaActiveDescendant(): string | null {\n if (this.panelOpen && this._keyManager && this._keyManager.activeItem) {\n return this._keyManager.activeItem.id;\n }\n\n return null;\n }\n\n /**\n * Sets the x-offset of the overlay panel in relation to the trigger's top start corner.\n * This must be adjusted to align the selected option text over the trigger text when\n * the panel opens. Will change based on LTR or RTL text direction. Note that the offset\n * can't be calculated until the panel has been attached, because we need to know the\n * content width in order to constrain the panel within the viewport.\n */\n private _calculateOverlayOffsetX(): void {\n const overlayRect = this.overlayDir.overlayRef.overlayElement.getBoundingClientRect();\n const viewportSize = this._viewportRuler.getViewportSize();\n const isRtl = this._isRtl();\n const paddingWidth = this.multiple ? SELECT_MULTIPLE_PANEL_PADDING_X + SELECT_PANEL_PADDING_X :\n SELECT_PANEL_PADDING_X * 2;\n let offsetX: number;\n\n // Adjust the offset, depending on the option padding.\n if (this.multiple) {\n offsetX = SELECT_MULTIPLE_PANEL_PADDING_X;\n } else {\n let selected = this._selectionModel.selected[0] || this.options.first;\n offsetX = selected && selected.group ? SELECT_PANEL_INDENT_PADDING_X : SELECT_PANEL_PADDING_X;\n }\n\n // Invert the offset in LTR.\n if (!isRtl) {\n offsetX *= -1;\n }\n\n // Determine how much the select overflows on each side.\n const leftOverflow = 0 - (overlayRect.left + offsetX - (isRtl ? paddingWidth : 0));\n const rightOverflow = overlayRect.right + offsetX - viewportSize.width\n + (isRtl ? 0 : paddingWidth);\n\n // If the element overflows on either side, reduce the offset to allow it to fit.\n if (leftOverflow > 0) {\n offsetX += leftOverflow + SELECT_PANEL_VIEWPORT_PADDING;\n } else if (rightOverflow > 0) {\n offsetX -= rightOverflow + SELECT_PANEL_VIEWPORT_PADDING;\n }\n\n // Set the offset directly in order to avoid having to go through change detection and\n // potentially triggering \"changed after it was checked\" errors.\n this.overlayDir.offsetX = offsetX;\n this.overlayDir.overlayRef.updatePosition();\n }\n\n /**\n * Calculates the y-offset of the select's overlay panel in relation to the\n * top start corner of the trigger. It has to be adjusted in order for the\n * selected option to be aligned over the trigger when the panel opens.\n */\n private _calculateOverlayOffsetY(selectedIndex: number, scrollBuffer: number,\n maxScroll: number): number {\n const itemHeight = this._getItemHeight();\n const optionHeightAdjustment = (itemHeight - this._triggerRect.height) / 2;\n const maxOptionsDisplayed = Math.floor(SELECT_PANEL_MAX_HEIGHT / itemHeight);\n let optionOffsetFromPanelTop: number;\n\n if (this._scrollTop === 0) {\n optionOffsetFromPanelTop = selectedIndex * itemHeight;\n } else if (this._scrollTop === maxScroll) {\n const firstDisplayedIndex = this._getItemCount() - maxOptionsDisplayed;\n const selectedDisplayIndex = selectedIndex - firstDisplayedIndex;\n\n // The first item is partially out of the viewport. Therefore we need to calculate what\n // portion of it is shown in the viewport and account for it in our offset.\n let partialItemHeight =\n itemHeight - (this._getItemCount() * itemHeight - SELECT_PANEL_MAX_HEIGHT) % itemHeight;\n\n // Because the panel height is longer than the height of the options alone,\n // there is always extra padding at the top or bottom of the panel. When\n // scrolled to the very bottom, this padding is at the top of the panel and\n // must be added to the offset.\n optionOffsetFromPanelTop = selectedDisplayIndex * itemHeight + partialItemHeight;\n } else {\n // If the option was scrolled to the middle of the panel using a scroll buffer,\n // its offset will be the scroll buffer minus the half height that was added to\n // center it.\n optionOffsetFromPanelTop = scrollBuffer - itemHeight / 2;\n }\n\n // The final offset is the option's offset from the top, adjusted for the height\n // difference, multiplied by -1 to ensure that the overlay moves in the correct\n // direction up the page.\n return optionOffsetFromPanelTop * -1 - optionHeightAdjustment;\n }\n\n /**\n * Checks that the attempted overlay position will fit within the viewport.\n * If it will not fit, tries to adjust the scroll position and the associated\n * y-offset so the panel can open fully on-screen. If it still won't fit,\n * sets the offset back to 0 to allow the fallback position to take over.\n */\n private _checkOverlayWithinViewport(maxScroll: number): void {\n const itemHeight = this._getItemHeight();\n const viewportSize = this._viewportRuler.getViewportSize();\n\n const topSpaceAvailable = this._triggerRect.top - SELECT_PANEL_VIEWPORT_PADDING;\n const bottomSpaceAvailable =\n viewportSize.height - this._triggerRect.bottom - SELECT_PANEL_VIEWPORT_PADDING;\n\n const panelHeightTop = Math.abs(this._offsetY);\n const totalPanelHeight =\n Math.min(this._getItemCount() * itemHeight, SELECT_PANEL_MAX_HEIGHT);\n const panelHeightBottom = totalPanelHeight - panelHeightTop - this._triggerRect.height;\n\n if (panelHeightBottom > bottomSpaceAvailable) {\n this._adjustPanelUp(panelHeightBottom, bottomSpaceAvailable);\n } else if (panelHeightTop > topSpaceAvailable) {\n this._adjustPanelDown(panelHeightTop, topSpaceAvailable, maxScroll);\n } else {\n this._transformOrigin = this._getOriginBasedOnOption();\n }\n }\n\n /** Adjusts the overlay panel up to fit in the viewport. */\n private _adjustPanelUp(panelHeightBottom: number, bottomSpaceAvailable: number) {\n // Browsers ignore fractional scroll offsets, so we need to round.\n const distanceBelowViewport = Math.round(panelHeightBottom - bottomSpaceAvailable);\n\n // Scrolls the panel up by the distance it was extending past the boundary, then\n // adjusts the offset by that amount to move the panel up into the viewport.\n this._scrollTop -= distanceBelowViewport;\n this._offsetY -= distanceBelowViewport;\n this._transformOrigin = this._getOriginBasedOnOption();\n\n // If the panel is scrolled to the very top, it won't be able to fit the panel\n // by scrolling, so set the offset to 0 to allow the fallback position to take\n // effect.\n if (this._scrollTop <= 0) {\n this._scrollTop = 0;\n this._offsetY = 0;\n this._transformOrigin = `50% bottom 0px`;\n }\n }\n\n /** Adjusts the overlay panel down to fit in the viewport. */\n private _adjustPanelDown(panelHeightTop: number, topSpaceAvailable: number,\n maxScroll: number) {\n // Browsers ignore fractional scroll offsets, so we need to round.\n const distanceAboveViewport = Math.round(panelHeightTop - topSpaceAvailable);\n\n // Scrolls the panel down by the distance it was extending past the boundary, then\n // adjusts the offset by that amount to move the panel down into the viewport.\n this._scrollTop += distanceAboveViewport;\n this._offsetY += distanceAboveViewport;\n this._transformOrigin = this._getOriginBasedOnOption();\n\n // If the panel is scrolled to the very bottom, it won't be able to fit the\n // panel by scrolling, so set the offset to 0 to allow the fallback position\n // to take effect.\n if (this._scrollTop >= maxScroll) {\n this._scrollTop = maxScroll;\n this._offsetY = 0;\n this._transformOrigin = `50% top 0px`;\n return;\n }\n }\n\n /** Sets the transform origin point based on the selected option. */\n private _getOriginBasedOnOption(): string {\n const itemHeight = this._getItemHeight();\n const optionHeightAdjustment = (itemHeight - this._triggerRect.height) / 2;\n const originY = Math.abs(this._offsetY) - optionHeightAdjustment + itemHeight / 2;\n return `50% ${originY}px 0px`;\n }\n\n /** Calculates the amount of items in the select. This includes options and group labels. */\n private _getItemCount(): number {\n return this.options.length + this.optionGroups.length;\n }\n\n /** Calculates the height of the select's options. */\n private _getItemHeight(): number {\n return this._triggerFontSize * SELECT_ITEM_HEIGHT_EM;\n }\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n setDescribedByIds(ids: string[]) {\n this._ariaDescribedby = ids.join(' ');\n }\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n onContainerClick() {\n this.focus();\n this.open();\n }\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n get shouldPlaceholderFloat(): boolean {\n return this._panelOpen || !this.empty;\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\n/**\n * Returns an exception to be thrown when attempting to change a select's `multiple` option\n * after initialization.\n * @docs-private\n */\nexport function getMatSelectDynamicMultipleError(): Error {\n return Error('Cannot change `multiple` mode of select after initialization.');\n}\n\n/**\n * Returns an exception to be thrown when attempting to assign a non-array value to a select\n * in `multiple` mode. Note that `undefined` and `null` are still valid values to allow for\n * resetting the value.\n * @docs-private\n */\nexport function getMatSelectNonArrayValueError(): Error {\n return Error('Value must be an array in multiple-selection mode.');\n}\n\n/**\n * Returns an exception to be thrown when assigning a non-function value to the comparator\n * used to determine if a value corresponds to an option. Note that whether the function\n * actually takes two values and returns a boolean is not checked.\n */\nexport function getMatSelectNonFunctionValueError(): Error {\n return Error('`compareWith` must be a function.');\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 {\n animate,\n AnimationTriggerMetadata,\n state,\n style,\n transition,\n trigger,\n} from '@angular/animations';\n\n/**\n * The following are all the animations for the mat-select component, with each\n * const containing the metadata for one animation.\n *\n * The values below match the implementation of the AngularJS Material mat-select animation.\n */\nexport const matSelectAnimations: {\n readonly transformPanel: AnimationTriggerMetadata;\n readonly fadeInContent: AnimationTriggerMetadata;\n} = {\n /**\n * This animation transforms the select's overlay panel on and off the page.\n *\n * When the panel is attached to the DOM, it expands its width by the amount of padding, scales it\n * up to 100% on the Y axis, fades in its border, and translates slightly up and to the\n * side to ensure the option text correctly overlaps the trigger text.\n *\n * When the panel is removed from the DOM, it simply fades out linearly.\n */\n transformPanel: trigger('transformPanel', [\n state('showing', style({\n opacity: 1,\n minWidth: 'calc(100% + 32px)', // 32px = 2 * 16px padding\n transform: 'scaleY(1)'\n })),\n state('showing-multiple', style({\n opacity: 1,\n minWidth: 'calc(100% + 64px)', // 64px = 48px padding on the left + 16px padding on the right\n transform: 'scaleY(1)'\n })),\n transition('void => *', [\n style({\n opacity: 0,\n minWidth: '100%',\n transform: 'scaleY(0)'\n }),\n animate('150ms cubic-bezier(0.25, 0.8, 0.25, 1)')\n ]),\n transition('* => void', [\n animate('250ms 100ms linear', style({opacity: 0}))\n ])\n ]),\n\n /**\n * This animation fades in the background color and text content of the\n * select's options. It is time delayed to occur 100ms after the overlay\n * panel has transformed in.\n */\n fadeInContent: trigger('fadeInContent', [\n state('showing', style({opacity: 1})),\n transition('void => showing', [\n style({opacity: 0}),\n animate('150ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)')\n ])\n ])\n};\n\n\n/**\n * @deprecated\n * @deletion-target 7.0.0\n */\nexport const transformPanel = matSelectAnimations.transformPanel;\n\n/**\n * @deprecated\n * @deletion-target 7.0.0\n */\nexport const fadeInContent = matSelectAnimations.fadeInContent;\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AKQA;;;;;;AAeA,AAAO,MAAM,mBAAmB,GAG5B;;;;;;;;;;IAUF,cAAc,EAAE,OAAO,CAAC,gBAAgB,EAAE;QACxC,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC;YACrB,OAAO,EAAE,CAAC;YACV,QAAQ,EAAE,mBAAmB;;YAC7B,SAAS,EAAE,WAAW;SACvB,CAAC,CAAC;QACH,KAAK,CAAC,kBAAkB,EAAE,KAAK,CAAC;YAC9B,OAAO,EAAE,CAAC;YACV,QAAQ,EAAE,mBAAmB;;YAC7B,SAAS,EAAE,WAAW;SACvB,CAAC,CAAC;QACH,UAAU,CAAC,WAAW,EAAE;YACtB,KAAK,CAAC;gBACJ,OAAO,EAAE,CAAC;gBACV,QAAQ,EAAE,MAAM;gBAChB,SAA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C,kBAAkB,EAAE,SAAS,EAAE,gBAAgB,EAAE,eAAe,EAAE,eAAe,CAAC;gBAC5F,YAAY,EAAE,CAAC,SAAS,EAAE,gBAAgB,CAAC;gBAC3C,SAAS,EAAE,CAAC,mCAAmC,EAAE,iBAAiB,CAAC;aACpE,EAAD,EAAA;;;;;;;;GDlBA,AACA,AACA,AAAoC;;;;;;;;GDNpC,AAA6B;;"}
1
+ {"version":3,"file":"select.js","sources":["../../../src/lib/select/index.ts","../../../src/lib/select/public-api.ts","../../../src/lib/select/select-module.ts","../../../src/lib/select/select.ts","../../../src/lib/select/select-errors.ts","../../../src/lib/select/select-animations.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\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 './select-module';\nexport * from './select';\nexport * from './select-animations';\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 {NgModule} from '@angular/core';\nimport {CommonModule} from '@angular/common';\nimport {MatSelect, MatSelectTrigger, MAT_SELECT_SCROLL_STRATEGY_PROVIDER} from './select';\nimport {MatCommonModule, MatOptionModule} from '@angular/material/core';\nimport {OverlayModule} from '@angular/cdk/overlay';\nimport {MatFormFieldModule} from '@angular/material/form-field';\nimport {ErrorStateMatcher} from '@angular/material/core';\n\n\n@NgModule({\n imports: [\n CommonModule,\n OverlayModule,\n MatOptionModule,\n MatCommonModule,\n ],\n exports: [MatFormFieldModule, MatSelect, MatSelectTrigger, MatOptionModule, MatCommonModule],\n declarations: [MatSelect, MatSelectTrigger],\n providers: [MAT_SELECT_SCROLL_STRATEGY_PROVIDER, ErrorStateMatcher]\n})\nexport class MatSelectModule {}\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 {ActiveDescendantKeyManager} from '@angular/cdk/a11y';\nimport {Directionality} from '@angular/cdk/bidi';\nimport {coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {SelectionModel} from '@angular/cdk/collections';\nimport {\n DOWN_ARROW,\n END,\n ENTER,\n HOME,\n SPACE,\n UP_ARROW,\n LEFT_ARROW,\n RIGHT_ARROW,\n} from '@angular/cdk/keycodes';\nimport {\n CdkConnectedOverlay,\n Overlay,\n RepositionScrollStrategy,\n ScrollStrategy,\n ViewportRuler,\n} from '@angular/cdk/overlay';\nimport {filter} from 'rxjs/operators/filter';\nimport {take} from 'rxjs/operators/take';\nimport {map} from 'rxjs/operators/map';\nimport {switchMap} from 'rxjs/operators/switchMap';\nimport {startWith} from 'rxjs/operators/startWith';\nimport {takeUntil} from 'rxjs/operators/takeUntil';\nimport {\n AfterContentInit,\n Attribute,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChild,\n ContentChildren,\n Directive,\n DoCheck,\n ElementRef,\n EventEmitter,\n Inject,\n InjectionToken,\n Input,\n isDevMode,\n NgZone,\n OnChanges,\n OnDestroy,\n OnInit,\n Optional,\n Output,\n QueryList,\n Self,\n SimpleChanges,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport {\n ControlValueAccessor,\n FormGroupDirective,\n NgControl,\n NgForm\n} from '@angular/forms';\nimport {\n CanDisable,\n ErrorStateMatcher,\n CanUpdateErrorState,\n mixinErrorState,\n HasTabIndex,\n MatOptgroup,\n MatOption,\n MatOptionSelectionChange,\n mixinDisabled,\n mixinTabIndex,\n MAT_OPTION_PARENT_COMPONENT,\n mixinDisableRipple,\n CanDisableRipple,\n _countGroupLabelsBeforeOption,\n _getOptionScrollPosition,\n} from '@angular/material/core';\nimport {MatFormField, MatFormFieldControl} from '@angular/material/form-field';\nimport {Observable} from 'rxjs/Observable';\nimport {merge} from 'rxjs/observable/merge';\nimport {Subject} from 'rxjs/Subject';\nimport {defer} from 'rxjs/observable/defer';\nimport {matSelectAnimations} from './select-animations';\nimport {\n getMatSelectDynamicMultipleError,\n getMatSelectNonArrayValueError,\n getMatSelectNonFunctionValueError,\n} from './select-errors';\n\n\nlet nextUniqueId = 0;\n\n/**\n * The following style constants are necessary to save here in order\n * to properly calculate the alignment of the selected option over\n * the trigger element.\n */\n\n/** The max height of the select's overlay panel */\nexport const SELECT_PANEL_MAX_HEIGHT = 256;\n\n/** The panel's padding on the x-axis */\nexport const SELECT_PANEL_PADDING_X = 16;\n\n/** The panel's x axis padding if it is indented (e.g. there is an option group). */\nexport const SELECT_PANEL_INDENT_PADDING_X = SELECT_PANEL_PADDING_X * 2;\n\n/** The height of the select items in `em` units. */\nexport const SELECT_ITEM_HEIGHT_EM = 3;\n\n/**\n * Distance between the panel edge and the option text in\n * multi-selection mode.\n *\n * (SELECT_PANEL_PADDING_X * 1.5) + 20 = 44\n * The padding is multiplied by 1.5 because the checkbox's margin is half the padding.\n * The checkbox width is 20px.\n */\nexport const SELECT_MULTIPLE_PANEL_PADDING_X = SELECT_PANEL_PADDING_X * 1.5 + 20;\n\n/**\n * The select panel will only \"fit\" inside the viewport if it is positioned at\n * this value or more away from the viewport boundary.\n */\nexport const SELECT_PANEL_VIEWPORT_PADDING = 8;\n\n/** Injection token that determines the scroll handling while a select is open. */\nexport const MAT_SELECT_SCROLL_STRATEGY =\n new InjectionToken<() => ScrollStrategy>('mat-select-scroll-strategy');\n\n/** @docs-private */\nexport function MAT_SELECT_SCROLL_STRATEGY_PROVIDER_FACTORY(overlay: Overlay):\n () => RepositionScrollStrategy {\n return () => overlay.scrollStrategies.reposition();\n}\n\n/** @docs-private */\nexport const MAT_SELECT_SCROLL_STRATEGY_PROVIDER = {\n provide: MAT_SELECT_SCROLL_STRATEGY,\n deps: [Overlay],\n useFactory: MAT_SELECT_SCROLL_STRATEGY_PROVIDER_FACTORY,\n};\n\n/** Change event object that is emitted when the select value has changed. */\nexport class MatSelectChange {\n constructor(\n /** Reference to the select that emitted the change event. */\n public source: MatSelect,\n /** Current value of the select that emitted the event. */\n public value: any) { }\n}\n\n// Boilerplate for applying mixins to MatSelect.\n/** @docs-private */\nexport class MatSelectBase {\n constructor(public _elementRef: ElementRef,\n public _defaultErrorStateMatcher: ErrorStateMatcher,\n public _parentForm: NgForm,\n public _parentFormGroup: FormGroupDirective,\n public ngControl: NgControl) {}\n}\nexport const _MatSelectMixinBase = mixinDisableRipple(\n mixinTabIndex(mixinDisabled(mixinErrorState(MatSelectBase))));\n\n\n/**\n * Allows the user to customize the trigger that is displayed when the select has a value.\n */\n@Directive({\n selector: 'mat-select-trigger'\n})\nexport class MatSelectTrigger {}\n\n\n@Component({\n moduleId: module.id,\n selector: 'mat-select',\n exportAs: 'matSelect',\n templateUrl: 'select.html',\n styleUrls: ['select.css'],\n inputs: ['disabled', 'disableRipple', 'tabIndex'],\n encapsulation: ViewEncapsulation.None,\n preserveWhitespaces: false,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n 'role': 'listbox',\n '[attr.id]': 'id',\n '[attr.tabindex]': 'tabIndex',\n '[attr.aria-label]': '_ariaLabel',\n '[attr.aria-labelledby]': 'ariaLabelledby',\n '[attr.aria-required]': 'required.toString()',\n '[attr.aria-disabled]': 'disabled.toString()',\n '[attr.aria-invalid]': 'errorState',\n '[attr.aria-owns]': 'panelOpen ? _optionIds : null',\n '[attr.aria-multiselectable]': 'multiple',\n '[attr.aria-describedby]': '_ariaDescribedby || null',\n '[attr.aria-activedescendant]': '_getAriaActiveDescendant()',\n '[class.mat-select-disabled]': 'disabled',\n '[class.mat-select-invalid]': 'errorState',\n '[class.mat-select-required]': 'required',\n 'class': 'mat-select',\n '(keydown)': '_handleKeydown($event)',\n '(focus)': '_onFocus()',\n '(blur)': '_onBlur()',\n },\n animations: [\n matSelectAnimations.transformPanel,\n matSelectAnimations.fadeInContent\n ],\n providers: [\n {provide: MatFormFieldControl, useExisting: MatSelect},\n {provide: MAT_OPTION_PARENT_COMPONENT, useExisting: MatSelect}\n ],\n})\nexport class MatSelect extends _MatSelectMixinBase implements AfterContentInit, OnChanges,\n OnDestroy, OnInit, DoCheck, ControlValueAccessor, CanDisable, HasTabIndex,\n MatFormFieldControl<any>, CanUpdateErrorState, CanDisableRipple {\n /** Whether or not the overlay panel is open. */\n private _panelOpen = false;\n\n /** Whether filling out the select is required in the form. */\n private _required: boolean = false;\n\n /** The scroll position of the overlay panel, calculated to center the selected option. */\n private _scrollTop = 0;\n\n /** The placeholder displayed in the trigger of the select. */\n private _placeholder: string;\n\n /** Whether the component is in multiple selection mode. */\n private _multiple: boolean = false;\n\n /** Comparison function to specify which option is displayed. Defaults to object equality. */\n private _compareWith = (o1: any, o2: any) => o1 === o2;\n\n /** Unique id for this input. */\n private _uid = `mat-select-${nextUniqueId++}`;\n\n /** Emits whenever the component is destroyed. */\n private readonly _destroy = new Subject<void>();\n\n /** The last measured value for the trigger's client bounding rect. */\n _triggerRect: ClientRect;\n\n /** The aria-describedby attribute on the select for improved a11y. */\n _ariaDescribedby: string;\n\n /** The cached font-size of the trigger element. */\n _triggerFontSize = 0;\n\n /** Deals with the selection logic. */\n _selectionModel: SelectionModel<MatOption>;\n\n /** Manages keyboard events for options in the panel. */\n _keyManager: ActiveDescendantKeyManager<MatOption>;\n\n /** `View -> model callback called when value changes` */\n _onChange: (value: any) => void = () => {};\n\n /** `View -> model callback called when select has been touched` */\n _onTouched = () => {};\n\n /** The IDs of child options to be passed to the aria-owns attribute. */\n _optionIds: string = '';\n\n /** The value of the select panel's transform-origin property. */\n _transformOrigin: string = 'top';\n\n /** Whether the panel's animation is done. */\n _panelDoneAnimating: boolean = false;\n\n /** Strategy that will be used to handle scrolling while the select panel is open. */\n _scrollStrategy = this._scrollStrategyFactory();\n\n /**\n * The y-offset of the overlay panel in relation to the trigger's top start corner.\n * This must be adjusted to align the selected option text over the trigger text.\n * when the panel opens. Will change based on the y-position of the selected option.\n */\n _offsetY = 0;\n\n /**\n * This position config ensures that the top \"start\" corner of the overlay\n * is aligned with with the top \"start\" of the origin by default (overlapping\n * the trigger completely). If the panel cannot fit below the trigger, it\n * will fall back to a position above the trigger.\n */\n _positions = [\n {\n originX: 'start',\n originY: 'top',\n overlayX: 'start',\n overlayY: 'top',\n },\n {\n originX: 'start',\n originY: 'bottom',\n overlayX: 'start',\n overlayY: 'bottom',\n },\n ];\n\n /** Whether the select is focused. */\n focused: boolean = false;\n\n /** A name for this control that can be used by `mat-form-field`. */\n controlType = 'mat-select';\n\n /** Trigger that opens the select. */\n @ViewChild('trigger') trigger: ElementRef;\n\n /** Panel containing the select options. */\n @ViewChild('panel') panel: ElementRef;\n\n /** Overlay pane containing the options. */\n @ViewChild(CdkConnectedOverlay) overlayDir: CdkConnectedOverlay;\n\n /** All of the defined select options. */\n @ContentChildren(MatOption, { descendants: true }) options: QueryList<MatOption>;\n\n /** All of the defined groups of options. */\n @ContentChildren(MatOptgroup) optionGroups: QueryList<MatOptgroup>;\n\n /** Classes to be passed to the select panel. Supports the same syntax as `ngClass`. */\n @Input() panelClass: string|string[]|Set<string>|{[key: string]: any};\n\n /** User-supplied override of the trigger element. */\n @ContentChild(MatSelectTrigger) customTrigger: MatSelectTrigger;\n\n /** Placeholder to be shown if no value has been selected. */\n @Input()\n get placeholder(): string { return this._placeholder; }\n set placeholder(value: string) {\n this._placeholder = value;\n this.stateChanges.next();\n }\n\n /** Whether the component is required. */\n @Input()\n get required(): boolean { return this._required; }\n set required(value: boolean) {\n this._required = coerceBooleanProperty(value);\n this.stateChanges.next();\n }\n\n /** Whether the user should be allowed to select multiple options. */\n @Input()\n get multiple(): boolean { return this._multiple; }\n set multiple(value: boolean) {\n if (this._selectionModel) {\n throw getMatSelectDynamicMultipleError();\n }\n\n this._multiple = coerceBooleanProperty(value);\n }\n\n /**\n * A function to compare the option values with the selected values. The first argument\n * is a value from an option. The second is a value from the selection. A boolean\n * should be returned.\n */\n @Input()\n get compareWith() { return this._compareWith; }\n set compareWith(fn: (o1: any, o2: any) => boolean) {\n if (typeof fn !== 'function') {\n throw getMatSelectNonFunctionValueError();\n }\n this._compareWith = fn;\n if (this._selectionModel) {\n // A different comparator means the selection could change.\n this._initializeSelection();\n }\n }\n\n /** Value of the select control. */\n @Input()\n get value(): any { return this._value; }\n set value(newValue: any) {\n if (newValue !== this._value) {\n this.writeValue(newValue);\n this._value = newValue;\n }\n }\n private _value: any;\n\n /** Aria label of the select. If not specified, the placeholder will be used as label. */\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 /** An object used to control when error messages are shown. */\n @Input() errorStateMatcher: ErrorStateMatcher;\n\n /** Unique id of the element. */\n @Input()\n get id(): string { return this._id; }\n set id(value: string) {\n this._id = value || this._uid;\n this.stateChanges.next();\n }\n private _id: string;\n\n /** Combined stream of all of the child options' change events. */\n readonly optionSelectionChanges: Observable<MatOptionSelectionChange> = defer(() => {\n if (this.options) {\n return merge(...this.options.map(option => option.onSelectionChange));\n }\n\n return this._ngZone.onStable\n .asObservable()\n .pipe(take(1), switchMap(() => this.optionSelectionChanges));\n });\n\n /** Event emitted when the select panel has been toggled. */\n @Output() readonly openedChange: EventEmitter<boolean> = new EventEmitter<boolean>();\n\n /** Event emitted when the select has been opened. */\n @Output('opened')\n get _openedStream(): Observable<void> {\n return this.openedChange.pipe(filter(o => o), map(() => {}));\n }\n\n /** Event emitted when the select has been closed. */\n @Output('closed')\n get _closedStream(): Observable<void> {\n return this.openedChange.pipe(filter(o => !o), map(() => {}));\n }\n\n /**\n * Event emitted when the select has been opened.\n * @deprecated Use `openedChange` instead.\n * @deletion-target 6.0.0\n */\n @Output() readonly onOpen: Observable<void> = this._openedStream;\n\n /**\n * Event emitted when the select has been closed.\n * @deprecated Use `openedChange` instead.\n * @deletion-target 6.0.0\n */\n @Output() readonly onClose: Observable<void> = this._closedStream;\n\n /** Event emitted when the selected value has been changed by the user. */\n @Output() readonly selectionChange: EventEmitter<MatSelectChange> =\n new EventEmitter<MatSelectChange>();\n\n /**\n * Event emitted when the selected value has been changed by the user.\n * @deprecated Use `selectionChange` instead.\n * @deletion-target 6.0.0\n */\n @Output() readonly change: EventEmitter<MatSelectChange> = this.selectionChange;\n\n /**\n * Event that emits whenever the raw value of the select changes. This is here primarily\n * to facilitate the two-way binding for the `value` input.\n * @docs-private\n */\n @Output() readonly valueChange: EventEmitter<any> = new EventEmitter<any>();\n\n constructor(\n private _viewportRuler: ViewportRuler,\n private _changeDetectorRef: ChangeDetectorRef,\n private _ngZone: NgZone,\n _defaultErrorStateMatcher: ErrorStateMatcher,\n elementRef: ElementRef,\n @Optional() private _dir: Directionality,\n @Optional() _parentForm: NgForm,\n @Optional() _parentFormGroup: FormGroupDirective,\n @Optional() private _parentFormField: MatFormField,\n @Self() @Optional() public ngControl: NgControl,\n @Attribute('tabindex') tabIndex: string,\n @Inject(MAT_SELECT_SCROLL_STRATEGY) private _scrollStrategyFactory) {\n super(elementRef, _defaultErrorStateMatcher, _parentForm,\n _parentFormGroup, ngControl);\n\n if (this.ngControl) {\n // Note: we provide the value accessor through here, instead of\n // the `providers` to avoid running into a circular import.\n this.ngControl.valueAccessor = this;\n }\n\n this.tabIndex = parseInt(tabIndex) || 0;\n\n // Force setter to be called in case id was not specified.\n this.id = this.id;\n }\n\n ngOnInit() {\n this._selectionModel = new SelectionModel<MatOption>(this.multiple, undefined, false);\n this.stateChanges.next();\n }\n\n ngAfterContentInit() {\n this._initKeyManager();\n\n this.options.changes.pipe(startWith(null), takeUntil(this._destroy)).subscribe(() => {\n this._resetOptions();\n this._initializeSelection();\n });\n }\n\n ngDoCheck() {\n if (this.ngControl) {\n this.updateErrorState();\n }\n }\n\n ngOnChanges(changes: SimpleChanges) {\n // Updating the disabled state is handled by `mixinDisabled`, but we need to additionally let\n // the parent form field know to run change detection when the disabled state changes.\n if (changes.disabled) {\n this.stateChanges.next();\n }\n }\n\n ngOnDestroy() {\n this._destroy.next();\n this._destroy.complete();\n this.stateChanges.complete();\n }\n\n /** Toggles the overlay panel open or closed. */\n toggle(): void {\n this.panelOpen ? this.close() : this.open();\n }\n\n /** Opens the overlay panel. */\n open(): void {\n if (this.disabled || !this.options || !this.options.length) {\n return;\n }\n\n this._triggerRect = this.trigger.nativeElement.getBoundingClientRect();\n // Note: The computed font-size will be a string pixel value (e.g. \"16px\").\n // `parseInt` ignores the trailing 'px' and converts this to a number.\n this._triggerFontSize = parseInt(getComputedStyle(this.trigger.nativeElement)['font-size']);\n\n this._panelOpen = true;\n this._keyManager.withHorizontalOrientation(null);\n this._calculateOverlayPosition();\n this._highlightCorrectOption();\n this._changeDetectorRef.markForCheck();\n\n // Set the font size on the panel element once it exists.\n this._ngZone.onStable.asObservable().pipe(take(1)).subscribe(() => {\n if (this._triggerFontSize && this.overlayDir.overlayRef &&\n this.overlayDir.overlayRef.overlayElement) {\n this.overlayDir.overlayRef.overlayElement.style.fontSize = `${this._triggerFontSize}px`;\n }\n });\n }\n\n /** Closes the overlay panel and focuses the host element. */\n close(): void {\n if (this._panelOpen) {\n this._panelOpen = false;\n this._keyManager.withHorizontalOrientation(this._isRtl() ? 'rtl' : 'ltr');\n this._changeDetectorRef.markForCheck();\n this._onTouched();\n }\n }\n\n /**\n * Sets the select's value. Part of the ControlValueAccessor interface\n * required to integrate with Angular's core forms API.\n *\n * @param value New value to be written to the model.\n */\n writeValue(value: any): void {\n if (this.options) {\n this._setSelectionByValue(value);\n }\n }\n\n /**\n * Saves a callback function to be invoked when the select's value\n * changes from user input. Part of the ControlValueAccessor interface\n * required to integrate with Angular's core forms API.\n *\n * @param fn Callback to be triggered when the value changes.\n */\n registerOnChange(fn: (value: any) => void): void {\n this._onChange = fn;\n }\n\n /**\n * Saves a callback function to be invoked when the select is blurred\n * by the user. Part of the ControlValueAccessor interface required\n * to integrate with Angular's core forms API.\n *\n * @param fn Callback to be triggered when the component has been touched.\n */\n registerOnTouched(fn: () => {}): void {\n this._onTouched = fn;\n }\n\n /**\n * Disables the select. Part of the ControlValueAccessor interface required\n * to integrate with Angular's core forms API.\n *\n * @param isDisabled Sets whether the component is disabled.\n */\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n this._changeDetectorRef.markForCheck();\n this.stateChanges.next();\n }\n\n /** Whether or not the overlay panel is open. */\n get panelOpen(): boolean {\n return this._panelOpen;\n }\n\n /** The currently selected option. */\n get selected(): MatOption | MatOption[] {\n return this.multiple ? this._selectionModel.selected : this._selectionModel.selected[0];\n }\n\n /** The value displayed in the trigger. */\n get triggerValue(): string {\n if (this.empty) {\n return '';\n }\n\n if (this._multiple) {\n const selectedOptions = this._selectionModel.selected.map(option => option.viewValue);\n\n if (this._isRtl()) {\n selectedOptions.reverse();\n }\n\n // TODO(crisbeto): delimiter should be configurable for proper localization.\n return selectedOptions.join(', ');\n }\n\n return this._selectionModel.selected[0].viewValue;\n }\n\n /** Whether the element is in RTL mode. */\n _isRtl(): boolean {\n return this._dir ? this._dir.value === 'rtl' : false;\n }\n\n /** Handles all keydown events on the select. */\n _handleKeydown(event: KeyboardEvent): void {\n if (!this.disabled) {\n this.panelOpen ? this._handleOpenKeydown(event) : this._handleClosedKeydown(event);\n }\n }\n\n /** Handles keyboard events while the select is closed. */\n private _handleClosedKeydown(event: KeyboardEvent): void {\n const keyCode = event.keyCode;\n const isArrowKey = keyCode === DOWN_ARROW || keyCode === UP_ARROW ||\n keyCode === LEFT_ARROW || keyCode === RIGHT_ARROW;\n const isOpenKey = keyCode === ENTER || keyCode === SPACE;\n\n // Open the select on ALT + arrow key to match the native <select>\n if (isOpenKey || ((this.multiple || event.altKey) && isArrowKey)) {\n event.preventDefault(); // prevents the page from scrolling down when pressing space\n this.open();\n } else if (!this.multiple) {\n this._keyManager.onKeydown(event);\n }\n }\n\n /** Handles keyboard events when the selected is open. */\n private _handleOpenKeydown(event: KeyboardEvent): void {\n const keyCode = event.keyCode;\n const isArrowKey = keyCode === DOWN_ARROW || keyCode === UP_ARROW;\n const manager = this._keyManager;\n\n if (keyCode === HOME || keyCode === END) {\n event.preventDefault();\n keyCode === HOME ? manager.setFirstItemActive() : manager.setLastItemActive();\n } else if (isArrowKey && event.altKey) {\n // Close the select on ALT + arrow key to match the native <select>\n event.preventDefault();\n this.close();\n } else if ((keyCode === ENTER || keyCode === SPACE) && manager.activeItem) {\n event.preventDefault();\n manager.activeItem._selectViaInteraction();\n } else {\n const previouslyFocusedIndex = manager.activeItemIndex;\n\n manager.onKeydown(event);\n\n if (this._multiple && isArrowKey && event.shiftKey && manager.activeItem &&\n manager.activeItemIndex !== previouslyFocusedIndex) {\n manager.activeItem._selectViaInteraction();\n }\n }\n }\n\n /**\n * When the panel element is finished transforming in (though not fading in), it\n * emits an event and focuses an option if the panel is open.\n */\n _onPanelDone(): void {\n if (this.panelOpen) {\n this._scrollTop = 0;\n this.openedChange.emit(true);\n } else {\n this.openedChange.emit(false);\n this._panelDoneAnimating = false;\n this.overlayDir.offsetX = 0;\n this._changeDetectorRef.markForCheck();\n }\n }\n\n /**\n * When the panel content is done fading in, the _panelDoneAnimating property is\n * set so the proper class can be added to the panel.\n */\n _onFadeInDone(): void {\n this._panelDoneAnimating = this.panelOpen;\n this._changeDetectorRef.markForCheck();\n }\n\n _onFocus() {\n if (!this.disabled) {\n this.focused = true;\n this.stateChanges.next();\n }\n }\n\n /**\n * Calls the touched callback only if the panel is closed. Otherwise, the trigger will\n * \"blur\" to the panel when it opens, causing a false positive.\n */\n _onBlur() {\n this.focused = false;\n\n if (!this.disabled && !this.panelOpen) {\n this._onTouched();\n this._changeDetectorRef.markForCheck();\n this.stateChanges.next();\n }\n }\n\n /**\n * Callback that is invoked when the overlay panel has been attached.\n */\n _onAttached(): void {\n this.overlayDir.positionChange.pipe(take(1)).subscribe(() => {\n this._changeDetectorRef.detectChanges();\n this._calculateOverlayOffsetX();\n this.panel.nativeElement.scrollTop = this._scrollTop;\n });\n }\n\n /** Returns the theme to be used on the panel. */\n _getPanelTheme(): string {\n return this._parentFormField ? `mat-${this._parentFormField.color}` : '';\n }\n\n /** Whether the select has a value. */\n get empty(): boolean {\n return !this._selectionModel || this._selectionModel.isEmpty();\n }\n\n private _initializeSelection(): void {\n // Defer setting the value in order to avoid the \"Expression\n // has changed after it was checked\" errors from Angular.\n Promise.resolve().then(() => {\n this._setSelectionByValue(this.ngControl ? this.ngControl.value : this._value);\n });\n }\n\n /**\n * Sets the selected option based on a value. If no option can be\n * found with the designated value, the select trigger is cleared.\n */\n private _setSelectionByValue(value: any | any[], isUserInput = false): void {\n if (this.multiple && value) {\n if (!Array.isArray(value)) {\n throw getMatSelectNonArrayValueError();\n }\n\n this._clearSelection();\n value.forEach((currentValue: any) => this._selectValue(currentValue, isUserInput));\n this._sortValues();\n } else {\n this._clearSelection();\n\n const correspondingOption = this._selectValue(value, isUserInput);\n\n // Shift focus to the active item. Note that we shouldn't do this in multiple\n // mode, because we don't know what option the user interacted with last.\n if (correspondingOption) {\n this._keyManager.setActiveItem(this.options.toArray().indexOf(correspondingOption));\n }\n }\n\n this._changeDetectorRef.markForCheck();\n }\n\n /**\n * Finds and selects and option based on its value.\n * @returns Option that has the corresponding value.\n */\n private _selectValue(value: any, isUserInput = false): MatOption | undefined {\n const correspondingOption = this.options.find((option: MatOption) => {\n try {\n // Treat null as a special reset value.\n return option.value != null && this._compareWith(option.value, value);\n } catch (error) {\n if (isDevMode()) {\n // Notify developers of errors in their comparator.\n console.warn(error);\n }\n return false;\n }\n });\n\n if (correspondingOption) {\n isUserInput ? correspondingOption._selectViaInteraction() : correspondingOption.select();\n this._selectionModel.select(correspondingOption);\n this.stateChanges.next();\n }\n\n return correspondingOption;\n }\n\n\n /**\n * Clears the select trigger and deselects every option in the list.\n * @param skip Option that should not be deselected.\n */\n private _clearSelection(skip?: MatOption): void {\n this._selectionModel.clear();\n this.options.forEach(option => {\n if (option !== skip) {\n option.deselect();\n }\n });\n this.stateChanges.next();\n }\n\n /** Sets up a key manager to listen to keyboard events on the overlay panel. */\n private _initKeyManager() {\n this._keyManager = new ActiveDescendantKeyManager<MatOption>(this.options)\n .withTypeAhead()\n .withVerticalOrientation()\n .withHorizontalOrientation(this._isRtl() ? 'rtl' : 'ltr');\n\n this._keyManager.tabOut.pipe(takeUntil(this._destroy)).subscribe(() => this.close());\n this._keyManager.change.pipe(takeUntil(this._destroy)).subscribe(() => {\n if (this._panelOpen && this.panel) {\n this._scrollActiveOptionIntoView();\n } else if (!this._panelOpen && !this.multiple && this._keyManager.activeItem) {\n this._keyManager.activeItem._selectViaInteraction();\n }\n });\n }\n\n /** Drops current option subscriptions and IDs and resets from scratch. */\n private _resetOptions(): void {\n const changedOrDestroyed = merge(this.options.changes, this._destroy);\n\n this.optionSelectionChanges\n .pipe(takeUntil(changedOrDestroyed), filter(event => event.isUserInput))\n .subscribe(event => {\n this._onSelect(event.source);\n\n if (!this.multiple && this._panelOpen) {\n this.close();\n this.focus();\n }\n });\n\n // Listen to changes in the internal state of the options and react accordingly.\n // Handles cases like the labels of the selected options changing.\n merge(...this.options.map(option => option._stateChanges))\n .pipe(takeUntil(changedOrDestroyed))\n .subscribe(() => {\n this._changeDetectorRef.markForCheck();\n this.stateChanges.next();\n });\n\n this._setOptionIds();\n }\n\n /** Invoked when an option is clicked. */\n private _onSelect(option: MatOption): void {\n const wasSelected = this._selectionModel.isSelected(option);\n\n // TODO(crisbeto): handle blank/null options inside multi-select.\n if (this.multiple) {\n this._selectionModel.toggle(option);\n this.stateChanges.next();\n wasSelected ? option.deselect() : option.select();\n this._keyManager.setActiveItem(this._getOptionIndex(option)!);\n this._sortValues();\n } else {\n this._clearSelection(option.value == null ? undefined : option);\n\n if (option.value == null) {\n this._propagateChanges(option.value);\n } else {\n this._selectionModel.select(option);\n this.stateChanges.next();\n }\n }\n\n if (wasSelected !== this._selectionModel.isSelected(option)) {\n this._propagateChanges();\n }\n }\n\n /**\n * Sorts the model values, ensuring that they keep the same\n * order that they have in the panel.\n */\n private _sortValues(): void {\n if (this._multiple) {\n this._selectionModel.clear();\n\n this.options.forEach(option => {\n if (option.selected) {\n this._selectionModel.select(option);\n }\n });\n this.stateChanges.next();\n }\n }\n\n /** Emits change event to set the model value. */\n private _propagateChanges(fallbackValue?: any): void {\n let valueToEmit: any = null;\n\n if (this.multiple) {\n valueToEmit = (this.selected as MatOption[]).map(option => option.value);\n } else {\n valueToEmit = this.selected ? (this.selected as MatOption).value : fallbackValue;\n }\n\n this._value = valueToEmit;\n this.valueChange.emit(valueToEmit);\n this._onChange(valueToEmit);\n this.selectionChange.emit(new MatSelectChange(this, valueToEmit));\n this._changeDetectorRef.markForCheck();\n }\n\n /** Records option IDs to pass to the aria-owns property. */\n private _setOptionIds() {\n this._optionIds = this.options.map(option => option.id).join(' ');\n }\n\n /**\n * Highlights the selected item. If no option is selected, it will highlight\n * the first item instead.\n */\n private _highlightCorrectOption(): void {\n if (this._keyManager) {\n if (this.empty) {\n this._keyManager.setFirstItemActive();\n } else {\n this._keyManager.setActiveItem(this._getOptionIndex(this._selectionModel.selected[0])!);\n }\n }\n }\n\n /** Scrolls the active option into view. */\n private _scrollActiveOptionIntoView(): void {\n const activeOptionIndex = this._keyManager.activeItemIndex || 0;\n const labelCount = _countGroupLabelsBeforeOption(activeOptionIndex, this.options,\n this.optionGroups);\n\n this.panel.nativeElement.scrollTop = _getOptionScrollPosition(\n activeOptionIndex + labelCount,\n this._getItemHeight(),\n this.panel.nativeElement.scrollTop,\n SELECT_PANEL_MAX_HEIGHT\n );\n }\n\n /** Focuses the select element. */\n focus(): void {\n this._elementRef.nativeElement.focus();\n }\n\n /** Gets the index of the provided option in the option list. */\n private _getOptionIndex(option: MatOption): number | undefined {\n return this.options.reduce((result: number, current: MatOption, index: number) => {\n return result === undefined ? (option === current ? index : undefined) : result;\n }, undefined);\n }\n\n /** Calculates the scroll position and x- and y-offsets of the overlay panel. */\n private _calculateOverlayPosition(): void {\n const itemHeight = this._getItemHeight();\n const items = this._getItemCount();\n const panelHeight = Math.min(items * itemHeight, SELECT_PANEL_MAX_HEIGHT);\n const scrollContainerHeight = items * itemHeight;\n\n // The farthest the panel can be scrolled before it hits the bottom\n const maxScroll = scrollContainerHeight - panelHeight;\n\n // If no value is selected we open the popup to the first item.\n let selectedOptionOffset =\n this.empty ? 0 : this._getOptionIndex(this._selectionModel.selected[0])!;\n\n selectedOptionOffset += _countGroupLabelsBeforeOption(selectedOptionOffset, this.options,\n this.optionGroups);\n\n // We must maintain a scroll buffer so the selected option will be scrolled to the\n // center of the overlay panel rather than the top.\n const scrollBuffer = panelHeight / 2;\n this._scrollTop = this._calculateOverlayScroll(selectedOptionOffset, scrollBuffer, maxScroll);\n this._offsetY = this._calculateOverlayOffsetY(selectedOptionOffset, scrollBuffer, maxScroll);\n\n this._checkOverlayWithinViewport(maxScroll);\n }\n\n /**\n * Calculates the scroll position of the select's overlay panel.\n *\n * Attempts to center the selected option in the panel. If the option is\n * too high or too low in the panel to be scrolled to the center, it clamps the\n * scroll position to the min or max scroll positions respectively.\n */\n _calculateOverlayScroll(selectedIndex: number, scrollBuffer: number,\n maxScroll: number): number {\n const itemHeight = this._getItemHeight();\n const optionOffsetFromScrollTop = itemHeight * selectedIndex;\n const halfOptionHeight = itemHeight / 2;\n\n // Starts at the optionOffsetFromScrollTop, which scrolls the option to the top of the\n // scroll container, then subtracts the scroll buffer to scroll the option down to\n // the center of the overlay panel. Half the option height must be re-added to the\n // scrollTop so the option is centered based on its middle, not its top edge.\n const optimalScrollPosition = optionOffsetFromScrollTop - scrollBuffer + halfOptionHeight;\n return Math.min(Math.max(0, optimalScrollPosition), maxScroll);\n }\n\n /** Returns the aria-label of the select component. */\n get _ariaLabel(): string | null {\n // If an ariaLabelledby value has been set, the select should not overwrite the\n // `aria-labelledby` value by setting the ariaLabel to the placeholder.\n return this.ariaLabelledby ? null : this.ariaLabel || this.placeholder;\n }\n\n /** Determines the `aria-activedescendant` to be set on the host. */\n _getAriaActiveDescendant(): string | null {\n if (this.panelOpen && this._keyManager && this._keyManager.activeItem) {\n return this._keyManager.activeItem.id;\n }\n\n return null;\n }\n\n /**\n * Sets the x-offset of the overlay panel in relation to the trigger's top start corner.\n * This must be adjusted to align the selected option text over the trigger text when\n * the panel opens. Will change based on LTR or RTL text direction. Note that the offset\n * can't be calculated until the panel has been attached, because we need to know the\n * content width in order to constrain the panel within the viewport.\n */\n private _calculateOverlayOffsetX(): void {\n const overlayRect = this.overlayDir.overlayRef.overlayElement.getBoundingClientRect();\n const viewportSize = this._viewportRuler.getViewportSize();\n const isRtl = this._isRtl();\n const paddingWidth = this.multiple ? SELECT_MULTIPLE_PANEL_PADDING_X + SELECT_PANEL_PADDING_X :\n SELECT_PANEL_PADDING_X * 2;\n let offsetX: number;\n\n // Adjust the offset, depending on the option padding.\n if (this.multiple) {\n offsetX = SELECT_MULTIPLE_PANEL_PADDING_X;\n } else {\n let selected = this._selectionModel.selected[0] || this.options.first;\n offsetX = selected && selected.group ? SELECT_PANEL_INDENT_PADDING_X : SELECT_PANEL_PADDING_X;\n }\n\n // Invert the offset in LTR.\n if (!isRtl) {\n offsetX *= -1;\n }\n\n // Determine how much the select overflows on each side.\n const leftOverflow = 0 - (overlayRect.left + offsetX - (isRtl ? paddingWidth : 0));\n const rightOverflow = overlayRect.right + offsetX - viewportSize.width\n + (isRtl ? 0 : paddingWidth);\n\n // If the element overflows on either side, reduce the offset to allow it to fit.\n if (leftOverflow > 0) {\n offsetX += leftOverflow + SELECT_PANEL_VIEWPORT_PADDING;\n } else if (rightOverflow > 0) {\n offsetX -= rightOverflow + SELECT_PANEL_VIEWPORT_PADDING;\n }\n\n // Set the offset directly in order to avoid having to go through change detection and\n // potentially triggering \"changed after it was checked\" errors.\n this.overlayDir.offsetX = offsetX;\n this.overlayDir.overlayRef.updatePosition();\n }\n\n /**\n * Calculates the y-offset of the select's overlay panel in relation to the\n * top start corner of the trigger. It has to be adjusted in order for the\n * selected option to be aligned over the trigger when the panel opens.\n */\n private _calculateOverlayOffsetY(selectedIndex: number, scrollBuffer: number,\n maxScroll: number): number {\n const itemHeight = this._getItemHeight();\n const optionHeightAdjustment = (itemHeight - this._triggerRect.height) / 2;\n const maxOptionsDisplayed = Math.floor(SELECT_PANEL_MAX_HEIGHT / itemHeight);\n let optionOffsetFromPanelTop: number;\n\n if (this._scrollTop === 0) {\n optionOffsetFromPanelTop = selectedIndex * itemHeight;\n } else if (this._scrollTop === maxScroll) {\n const firstDisplayedIndex = this._getItemCount() - maxOptionsDisplayed;\n const selectedDisplayIndex = selectedIndex - firstDisplayedIndex;\n\n // The first item is partially out of the viewport. Therefore we need to calculate what\n // portion of it is shown in the viewport and account for it in our offset.\n let partialItemHeight =\n itemHeight - (this._getItemCount() * itemHeight - SELECT_PANEL_MAX_HEIGHT) % itemHeight;\n\n // Because the panel height is longer than the height of the options alone,\n // there is always extra padding at the top or bottom of the panel. When\n // scrolled to the very bottom, this padding is at the top of the panel and\n // must be added to the offset.\n optionOffsetFromPanelTop = selectedDisplayIndex * itemHeight + partialItemHeight;\n } else {\n // If the option was scrolled to the middle of the panel using a scroll buffer,\n // its offset will be the scroll buffer minus the half height that was added to\n // center it.\n optionOffsetFromPanelTop = scrollBuffer - itemHeight / 2;\n }\n\n // The final offset is the option's offset from the top, adjusted for the height\n // difference, multiplied by -1 to ensure that the overlay moves in the correct\n // direction up the page.\n return optionOffsetFromPanelTop * -1 - optionHeightAdjustment;\n }\n\n /**\n * Checks that the attempted overlay position will fit within the viewport.\n * If it will not fit, tries to adjust the scroll position and the associated\n * y-offset so the panel can open fully on-screen. If it still won't fit,\n * sets the offset back to 0 to allow the fallback position to take over.\n */\n private _checkOverlayWithinViewport(maxScroll: number): void {\n const itemHeight = this._getItemHeight();\n const viewportSize = this._viewportRuler.getViewportSize();\n\n const topSpaceAvailable = this._triggerRect.top - SELECT_PANEL_VIEWPORT_PADDING;\n const bottomSpaceAvailable =\n viewportSize.height - this._triggerRect.bottom - SELECT_PANEL_VIEWPORT_PADDING;\n\n const panelHeightTop = Math.abs(this._offsetY);\n const totalPanelHeight =\n Math.min(this._getItemCount() * itemHeight, SELECT_PANEL_MAX_HEIGHT);\n const panelHeightBottom = totalPanelHeight - panelHeightTop - this._triggerRect.height;\n\n if (panelHeightBottom > bottomSpaceAvailable) {\n this._adjustPanelUp(panelHeightBottom, bottomSpaceAvailable);\n } else if (panelHeightTop > topSpaceAvailable) {\n this._adjustPanelDown(panelHeightTop, topSpaceAvailable, maxScroll);\n } else {\n this._transformOrigin = this._getOriginBasedOnOption();\n }\n }\n\n /** Adjusts the overlay panel up to fit in the viewport. */\n private _adjustPanelUp(panelHeightBottom: number, bottomSpaceAvailable: number) {\n // Browsers ignore fractional scroll offsets, so we need to round.\n const distanceBelowViewport = Math.round(panelHeightBottom - bottomSpaceAvailable);\n\n // Scrolls the panel up by the distance it was extending past the boundary, then\n // adjusts the offset by that amount to move the panel up into the viewport.\n this._scrollTop -= distanceBelowViewport;\n this._offsetY -= distanceBelowViewport;\n this._transformOrigin = this._getOriginBasedOnOption();\n\n // If the panel is scrolled to the very top, it won't be able to fit the panel\n // by scrolling, so set the offset to 0 to allow the fallback position to take\n // effect.\n if (this._scrollTop <= 0) {\n this._scrollTop = 0;\n this._offsetY = 0;\n this._transformOrigin = `50% bottom 0px`;\n }\n }\n\n /** Adjusts the overlay panel down to fit in the viewport. */\n private _adjustPanelDown(panelHeightTop: number, topSpaceAvailable: number,\n maxScroll: number) {\n // Browsers ignore fractional scroll offsets, so we need to round.\n const distanceAboveViewport = Math.round(panelHeightTop - topSpaceAvailable);\n\n // Scrolls the panel down by the distance it was extending past the boundary, then\n // adjusts the offset by that amount to move the panel down into the viewport.\n this._scrollTop += distanceAboveViewport;\n this._offsetY += distanceAboveViewport;\n this._transformOrigin = this._getOriginBasedOnOption();\n\n // If the panel is scrolled to the very bottom, it won't be able to fit the\n // panel by scrolling, so set the offset to 0 to allow the fallback position\n // to take effect.\n if (this._scrollTop >= maxScroll) {\n this._scrollTop = maxScroll;\n this._offsetY = 0;\n this._transformOrigin = `50% top 0px`;\n return;\n }\n }\n\n /** Sets the transform origin point based on the selected option. */\n private _getOriginBasedOnOption(): string {\n const itemHeight = this._getItemHeight();\n const optionHeightAdjustment = (itemHeight - this._triggerRect.height) / 2;\n const originY = Math.abs(this._offsetY) - optionHeightAdjustment + itemHeight / 2;\n return `50% ${originY}px 0px`;\n }\n\n /** Calculates the amount of items in the select. This includes options and group labels. */\n private _getItemCount(): number {\n return this.options.length + this.optionGroups.length;\n }\n\n /** Calculates the height of the select's options. */\n private _getItemHeight(): number {\n return this._triggerFontSize * SELECT_ITEM_HEIGHT_EM;\n }\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n setDescribedByIds(ids: string[]) {\n this._ariaDescribedby = ids.join(' ');\n }\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n onContainerClick() {\n this.focus();\n this.open();\n }\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n get shouldPlaceholderFloat(): boolean {\n return this._panelOpen || !this.empty;\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\n/**\n * Returns an exception to be thrown when attempting to change a select's `multiple` option\n * after initialization.\n * @docs-private\n */\nexport function getMatSelectDynamicMultipleError(): Error {\n return Error('Cannot change `multiple` mode of select after initialization.');\n}\n\n/**\n * Returns an exception to be thrown when attempting to assign a non-array value to a select\n * in `multiple` mode. Note that `undefined` and `null` are still valid values to allow for\n * resetting the value.\n * @docs-private\n */\nexport function getMatSelectNonArrayValueError(): Error {\n return Error('Value must be an array in multiple-selection mode.');\n}\n\n/**\n * Returns an exception to be thrown when assigning a non-function value to the comparator\n * used to determine if a value corresponds to an option. Note that whether the function\n * actually takes two values and returns a boolean is not checked.\n */\nexport function getMatSelectNonFunctionValueError(): Error {\n return Error('`compareWith` must be a function.');\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 {\n animate,\n AnimationTriggerMetadata,\n state,\n style,\n transition,\n trigger,\n} from '@angular/animations';\n\n/**\n * The following are all the animations for the mat-select component, with each\n * const containing the metadata for one animation.\n *\n * The values below match the implementation of the AngularJS Material mat-select animation.\n */\nexport const matSelectAnimations: {\n readonly transformPanel: AnimationTriggerMetadata;\n readonly fadeInContent: AnimationTriggerMetadata;\n} = {\n /**\n * This animation transforms the select's overlay panel on and off the page.\n *\n * When the panel is attached to the DOM, it expands its width by the amount of padding, scales it\n * up to 100% on the Y axis, fades in its border, and translates slightly up and to the\n * side to ensure the option text correctly overlaps the trigger text.\n *\n * When the panel is removed from the DOM, it simply fades out linearly.\n */\n transformPanel: trigger('transformPanel', [\n state('showing', style({\n opacity: 1,\n minWidth: 'calc(100% + 32px)', // 32px = 2 * 16px padding\n transform: 'scaleY(1)'\n })),\n state('showing-multiple', style({\n opacity: 1,\n minWidth: 'calc(100% + 64px)', // 64px = 48px padding on the left + 16px padding on the right\n transform: 'scaleY(1)'\n })),\n transition('void => *', [\n style({\n opacity: 0,\n minWidth: '100%',\n transform: 'scaleY(0)'\n }),\n animate('150ms cubic-bezier(0.25, 0.8, 0.25, 1)')\n ]),\n transition('* => void', [\n animate('250ms 100ms linear', style({opacity: 0}))\n ])\n ]),\n\n /**\n * This animation fades in the background color and text content of the\n * select's options. It is time delayed to occur 100ms after the overlay\n * panel has transformed in.\n */\n fadeInContent: trigger('fadeInContent', [\n state('showing', style({opacity: 1})),\n transition('void => showing', [\n style({opacity: 0}),\n animate('150ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)')\n ])\n ])\n};\n\n\n/**\n * @deprecated\n * @deletion-target 7.0.0\n */\nexport const transformPanel = matSelectAnimations.transformPanel;\n\n/**\n * @deprecated\n * @deletion-target 7.0.0\n */\nexport const fadeInContent = matSelectAnimations.fadeInContent;\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AKQA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,SAAA,EAAA,CAAA,EAAA,IAAA,EAAA,MAAG,EAAH,EAAA;IAUA,iBAAA,EAAG,CAAH,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA;IAOA,QAAA,EAAA,CAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA;IAGA,aAAA,EAAA,CAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAS;CAQT,CAAA,AAOA;;;;;;AD5cA,AACA,AACA,AACA,AACA,AACA,AACA,AAcA,AAAA,MAAA,eAAA,CAAA;;;IAXA,EAAA,IAAA,EAAC,QAAQ,EAAT,IAAA,EAAA,CAAU;gBACR,OAAO,EAAE;oBACP,YAAY;oBACZ,aAAa;oBACb,eAAe;oBACf,eAAe;iBAChB;gBACD,OAAO,EAAE,CAAC,kBAAkB,EAAE,SAAS,EAAE,gBAAgB,EAAE,eAAe,EAAE,eAAe,CAAC;gBAC5F,YAAY,EAAE,CAAC,SAAS,EAAE,gBAAgB,CAAC;gBAC3C,SAAS,EAAE,CAAC,mCAAmC,EAAE,iBAAiB,CAAC;aACpE,EAAD,EAAA;;;;;;;;GDlBA,AACA,AACA,AAAoC;;;;;;;;GDNpC,AAA6B;;"}
@@ -22,6 +22,7 @@ import { startWith } from 'rxjs/operators/startWith';
22
22
  import { takeUntil } from 'rxjs/operators/takeUntil';
23
23
  import { debounceTime } from 'rxjs/operators/debounceTime';
24
24
  import { map } from 'rxjs/operators/map';
25
+ import { fromEvent } from 'rxjs/observable/fromEvent';
25
26
  import { Subject } from 'rxjs/Subject';
26
27
  import 'rxjs/Observable';
27
28
  import { animate, state, style, transition, trigger } from '@angular/animations';
@@ -131,13 +132,15 @@ class MatDrawer {
131
132
  * @param {?} _focusTrapFactory
132
133
  * @param {?} _focusMonitor
133
134
  * @param {?} _platform
135
+ * @param {?} _ngZone
134
136
  * @param {?} _doc
135
137
  */
136
- constructor(_elementRef, _focusTrapFactory, _focusMonitor, _platform, _doc) {
138
+ constructor(_elementRef, _focusTrapFactory, _focusMonitor, _platform, _ngZone, _doc) {
137
139
  this._elementRef = _elementRef;
138
140
  this._focusTrapFactory = _focusTrapFactory;
139
141
  this._focusMonitor = _focusMonitor;
140
142
  this._platform = _platform;
143
+ this._ngZone = _ngZone;
141
144
  this._doc = _doc;
142
145
  this._elementFocusedBeforeDrawerWasOpened = null;
143
146
  /**
@@ -201,6 +204,17 @@ class MatDrawer {
201
204
  this._restoreFocus();
202
205
  }
203
206
  });
207
+ /**
208
+ * Listen to `keydown` events outside the zone so that change detection is not run every
209
+ * time a key is pressed. Instead we re-enter the zone only if the `ESC` key is pressed
210
+ * and we don't have close disabled.
211
+ */
212
+ this._ngZone.runOutsideAngular(() => {
213
+ fromEvent(this._elementRef.nativeElement, 'keydown').pipe(filter((event) => event.keyCode === ESCAPE && !this.disableClose)).subscribe((event) => this._ngZone.run(() => {
214
+ this.close();
215
+ event.stopPropagation();
216
+ }));
217
+ });
204
218
  }
205
219
  /**
206
220
  * The side that the drawer is attached to.
@@ -403,18 +417,6 @@ class MatDrawer {
403
417
  });
404
418
  });
405
419
  }
406
- /**
407
- * Handles the keyboard events.
408
- * \@docs-private
409
- * @param {?} event
410
- * @return {?}
411
- */
412
- handleKeydown(event) {
413
- if (event.keyCode === ESCAPE && !this.disableClose) {
414
- this.close();
415
- event.stopPropagation();
416
- }
417
- }
418
420
  /**
419
421
  * @param {?} event
420
422
  * @return {?}
@@ -450,7 +452,6 @@ MatDrawer.decorators = [
450
452
  '[@transform]': '_animationState',
451
453
  '(@transform.start)': '_onAnimationStart($event)',
452
454
  '(@transform.done)': '_onAnimationEnd($event)',
453
- '(keydown)': 'handleKeydown($event)',
454
455
  // must prevent the browser from aligning text based on value
455
456
  '[attr.align]': 'null',
456
457
  '[class.mat-drawer-end]': 'position === "end"',
@@ -470,6 +471,7 @@ MatDrawer.ctorParameters = () => [
470
471
  { type: FocusTrapFactory, },
471
472
  { type: FocusMonitor, },
472
473
  { type: Platform, },
474
+ { type: NgZone, },
473
475
  { type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [DOCUMENT,] },] },
474
476
  ];
475
477
  MatDrawer.propDecorators = {
@@ -788,7 +790,7 @@ MatDrawerContainer.decorators = [
788
790
  { type: Component, args: [{selector: 'mat-drawer-container',
789
791
  exportAs: 'matDrawerContainer',
790
792
  template: "<div class=\"mat-drawer-backdrop\" (click)=\"_onBackdropClicked()\" [class.mat-drawer-shown]=\"_isShowingBackdrop()\"></div><ng-content select=\"mat-drawer\"></ng-content><ng-content select=\"mat-drawer-content\"></ng-content><mat-drawer-content *ngIf=\"!_content\" cdkScrollable><ng-content></ng-content></mat-drawer-content>",
791
- styles: [".mat-drawer-container{position:relative;z-index:1;box-sizing:border-box;-webkit-overflow-scrolling:touch;display:block;overflow:hidden}.mat-drawer-container[fullscreen]{top:0;left:0;right:0;bottom:0;position:absolute}.mat-drawer-container[fullscreen].mat-drawer-opened{overflow:hidden}.mat-drawer-backdrop{top:0;left:0;right:0;bottom:0;position:absolute;display:block;z-index:3;visibility:hidden}.mat-drawer-backdrop.mat-drawer-shown{visibility:visible}.mat-drawer-transition .mat-drawer-backdrop{transition-duration:.4s;transition-timing-function:cubic-bezier(.25,.8,.25,1);transition-property:background-color,visibility}@media screen and (-ms-high-contrast:active){.mat-drawer-backdrop{opacity:.5}}.mat-drawer-content{-webkit-backface-visibility:hidden;backface-visibility:hidden;position:relative;z-index:1;display:block;height:100%;overflow:auto}.mat-drawer-transition .mat-drawer-content{transition-duration:.4s;transition-timing-function:cubic-bezier(.25,.8,.25,1);transition-property:transform,margin-left,margin-right}.mat-drawer{position:relative;z-index:4;display:block;position:absolute;top:0;bottom:0;z-index:3;outline:0;box-sizing:border-box;overflow-y:auto;transform:translate3d(-100%,0,0)}.mat-drawer.mat-drawer-side{z-index:2}.mat-drawer.mat-drawer-end{right:0;transform:translate3d(100%,0,0)}[dir=rtl] .mat-drawer{transform:translate3d(100%,0,0)}[dir=rtl] .mat-drawer.mat-drawer-end{left:0;right:auto;transform:translate3d(-100%,0,0)}.mat-drawer:not(.mat-drawer-side){box-shadow:0 8px 10px -5px rgba(0,0,0,.2),0 16px 24px 2px rgba(0,0,0,.14),0 6px 30px 5px rgba(0,0,0,.12)}.mat-sidenav-fixed{position:fixed}"],
793
+ styles: [".mat-drawer-container{position:relative;z-index:1;box-sizing:border-box;-webkit-overflow-scrolling:touch;display:block;overflow:hidden}.mat-drawer-container[fullscreen]{top:0;left:0;right:0;bottom:0;position:absolute}.mat-drawer-container[fullscreen].mat-drawer-opened{overflow:hidden}.mat-drawer-backdrop{top:0;left:0;right:0;bottom:0;position:absolute;display:block;z-index:3;visibility:hidden}.mat-drawer-backdrop.mat-drawer-shown{visibility:visible}.mat-drawer-transition .mat-drawer-backdrop{transition-duration:.4s;transition-timing-function:cubic-bezier(.25,.8,.25,1);transition-property:background-color,visibility}@media screen and (-ms-high-contrast:active){.mat-drawer-backdrop{opacity:.5}}.mat-drawer-content{position:relative;z-index:1;display:block;height:100%;overflow:auto}.mat-drawer-transition .mat-drawer-content{transition-duration:.4s;transition-timing-function:cubic-bezier(.25,.8,.25,1);transition-property:transform,margin-left,margin-right}.mat-drawer{position:relative;z-index:4;display:block;position:absolute;top:0;bottom:0;z-index:3;outline:0;box-sizing:border-box;overflow-y:auto;transform:translate3d(-100%,0,0)}.mat-drawer.mat-drawer-side{z-index:2}.mat-drawer.mat-drawer-end{right:0;transform:translate3d(100%,0,0)}[dir=rtl] .mat-drawer{transform:translate3d(100%,0,0)}[dir=rtl] .mat-drawer.mat-drawer-end{left:0;right:auto;transform:translate3d(-100%,0,0)}.mat-drawer:not(.mat-drawer-side){box-shadow:0 8px 10px -5px rgba(0,0,0,.2),0 16px 24px 2px rgba(0,0,0,.14),0 6px 30px 5px rgba(0,0,0,.12)}.mat-sidenav-fixed{position:fixed}"],
792
794
  host: {
793
795
  'class': 'mat-drawer-container',
794
796
  },
@@ -896,7 +898,6 @@ MatSidenav.decorators = [
896
898
  '[@transform]': '_animationState',
897
899
  '(@transform.start)': '_onAnimationStart($event)',
898
900
  '(@transform.done)': '_onAnimationEnd($event)',
899
- '(keydown)': 'handleKeydown($event)',
900
901
  // must prevent the browser from aligning text based on value
901
902
  '[attr.align]': 'null',
902
903
  '[class.mat-drawer-end]': 'position === "end"',
@@ -925,7 +926,7 @@ MatSidenavContainer.decorators = [
925
926
  { type: Component, args: [{selector: 'mat-sidenav-container',
926
927
  exportAs: 'matSidenavContainer',
927
928
  template: "<div class=\"mat-drawer-backdrop\" (click)=\"_onBackdropClicked()\" [class.mat-drawer-shown]=\"_isShowingBackdrop()\"></div><ng-content select=\"mat-sidenav\"></ng-content><ng-content select=\"mat-sidenav-content\"></ng-content><mat-sidenav-content *ngIf=\"!_content\" cdkScrollable><ng-content></ng-content></mat-sidenav-content>",
928
- styles: [".mat-drawer-container{position:relative;z-index:1;box-sizing:border-box;-webkit-overflow-scrolling:touch;display:block;overflow:hidden}.mat-drawer-container[fullscreen]{top:0;left:0;right:0;bottom:0;position:absolute}.mat-drawer-container[fullscreen].mat-drawer-opened{overflow:hidden}.mat-drawer-backdrop{top:0;left:0;right:0;bottom:0;position:absolute;display:block;z-index:3;visibility:hidden}.mat-drawer-backdrop.mat-drawer-shown{visibility:visible}.mat-drawer-transition .mat-drawer-backdrop{transition-duration:.4s;transition-timing-function:cubic-bezier(.25,.8,.25,1);transition-property:background-color,visibility}@media screen and (-ms-high-contrast:active){.mat-drawer-backdrop{opacity:.5}}.mat-drawer-content{-webkit-backface-visibility:hidden;backface-visibility:hidden;position:relative;z-index:1;display:block;height:100%;overflow:auto}.mat-drawer-transition .mat-drawer-content{transition-duration:.4s;transition-timing-function:cubic-bezier(.25,.8,.25,1);transition-property:transform,margin-left,margin-right}.mat-drawer{position:relative;z-index:4;display:block;position:absolute;top:0;bottom:0;z-index:3;outline:0;box-sizing:border-box;overflow-y:auto;transform:translate3d(-100%,0,0)}.mat-drawer.mat-drawer-side{z-index:2}.mat-drawer.mat-drawer-end{right:0;transform:translate3d(100%,0,0)}[dir=rtl] .mat-drawer{transform:translate3d(100%,0,0)}[dir=rtl] .mat-drawer.mat-drawer-end{left:0;right:auto;transform:translate3d(-100%,0,0)}.mat-drawer:not(.mat-drawer-side){box-shadow:0 8px 10px -5px rgba(0,0,0,.2),0 16px 24px 2px rgba(0,0,0,.14),0 6px 30px 5px rgba(0,0,0,.12)}.mat-sidenav-fixed{position:fixed}"],
929
+ styles: [".mat-drawer-container{position:relative;z-index:1;box-sizing:border-box;-webkit-overflow-scrolling:touch;display:block;overflow:hidden}.mat-drawer-container[fullscreen]{top:0;left:0;right:0;bottom:0;position:absolute}.mat-drawer-container[fullscreen].mat-drawer-opened{overflow:hidden}.mat-drawer-backdrop{top:0;left:0;right:0;bottom:0;position:absolute;display:block;z-index:3;visibility:hidden}.mat-drawer-backdrop.mat-drawer-shown{visibility:visible}.mat-drawer-transition .mat-drawer-backdrop{transition-duration:.4s;transition-timing-function:cubic-bezier(.25,.8,.25,1);transition-property:background-color,visibility}@media screen and (-ms-high-contrast:active){.mat-drawer-backdrop{opacity:.5}}.mat-drawer-content{position:relative;z-index:1;display:block;height:100%;overflow:auto}.mat-drawer-transition .mat-drawer-content{transition-duration:.4s;transition-timing-function:cubic-bezier(.25,.8,.25,1);transition-property:transform,margin-left,margin-right}.mat-drawer{position:relative;z-index:4;display:block;position:absolute;top:0;bottom:0;z-index:3;outline:0;box-sizing:border-box;overflow-y:auto;transform:translate3d(-100%,0,0)}.mat-drawer.mat-drawer-side{z-index:2}.mat-drawer.mat-drawer-end{right:0;transform:translate3d(100%,0,0)}[dir=rtl] .mat-drawer{transform:translate3d(100%,0,0)}[dir=rtl] .mat-drawer.mat-drawer-end{left:0;right:auto;transform:translate3d(-100%,0,0)}.mat-drawer:not(.mat-drawer-side){box-shadow:0 8px 10px -5px rgba(0,0,0,.2),0 16px 24px 2px rgba(0,0,0,.14),0 6px 30px 5px rgba(0,0,0,.12)}.mat-sidenav-fixed{position:fixed}"],
929
930
  host: {
930
931
  'class': 'mat-drawer-container mat-sidenav-container',
931
932
  },