@angular/material 12.1.0-next.0 → 12.1.1

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 (227) hide show
  1. package/badge/_badge-theme.scss +67 -45
  2. package/bottom-sheet/index.metadata.json +1 -1
  3. package/bundles/material-bottom-sheet.umd.js +2 -2
  4. package/bundles/material-bottom-sheet.umd.js.map +1 -1
  5. package/bundles/material-checkbox.umd.js.map +1 -1
  6. package/bundles/material-chips-testing.umd.js.map +1 -1
  7. package/bundles/material-chips.umd.js +4 -8
  8. package/bundles/material-chips.umd.js.map +1 -1
  9. package/bundles/material-core.umd.js +9 -7
  10. package/bundles/material-core.umd.js.map +1 -1
  11. package/bundles/material-datepicker.umd.js +12 -20
  12. package/bundles/material-datepicker.umd.js.map +1 -1
  13. package/bundles/material-dialog.umd.js +2 -2
  14. package/bundles/material-dialog.umd.js.map +1 -1
  15. package/bundles/material-expansion.umd.js.map +1 -1
  16. package/bundles/material-form-field.umd.js +2 -3
  17. package/bundles/material-form-field.umd.js.map +1 -1
  18. package/bundles/material-grid-list.umd.js +2 -4
  19. package/bundles/material-grid-list.umd.js.map +1 -1
  20. package/bundles/material-input.umd.js +1 -4
  21. package/bundles/material-input.umd.js.map +1 -1
  22. package/bundles/material-list-testing.umd.js.map +1 -1
  23. package/bundles/material-menu-testing.umd.js.map +1 -1
  24. package/bundles/material-menu.umd.js.map +1 -1
  25. package/bundles/material-progress-bar.umd.js +2 -3
  26. package/bundles/material-progress-bar.umd.js.map +1 -1
  27. package/bundles/material-progress-spinner.umd.js +2 -3
  28. package/bundles/material-progress-spinner.umd.js.map +1 -1
  29. package/bundles/material-radio.umd.js +12 -13
  30. package/bundles/material-radio.umd.js.map +1 -1
  31. package/bundles/material-select.umd.js +0 -1
  32. package/bundles/material-select.umd.js.map +1 -1
  33. package/bundles/material-sidenav.umd.js.map +1 -1
  34. package/bundles/material-slide-toggle.umd.js +1 -1
  35. package/bundles/material-slider.umd.js +1 -5
  36. package/bundles/material-slider.umd.js.map +1 -1
  37. package/bundles/material-snack-bar.umd.js.map +1 -1
  38. package/bundles/material-stepper-testing.umd.js.map +1 -1
  39. package/bundles/material-stepper.umd.js.map +1 -1
  40. package/bundles/material-table-testing.umd.js.map +1 -1
  41. package/bundles/material-table.umd.js.map +1 -1
  42. package/bundles/material-tabs-testing.umd.js.map +1 -1
  43. package/bundles/material-tabs.umd.js +6 -0
  44. package/bundles/material-tabs.umd.js.map +1 -1
  45. package/bundles/material-tooltip.umd.js +7 -0
  46. package/bundles/material-tooltip.umd.js.map +1 -1
  47. package/bundles/material-tree.umd.js +6 -11
  48. package/bundles/material-tree.umd.js.map +1 -1
  49. package/chips/chip-list.d.ts +1 -5
  50. package/chips/chip.d.ts +1 -2
  51. package/chips/index.metadata.json +1 -1
  52. package/core/common-behaviors/error-state.d.ts +5 -1
  53. package/core/index.metadata.json +1 -1
  54. package/datepicker/date-range-input-parts.d.ts +0 -3
  55. package/datepicker/datepicker-input.d.ts +0 -1
  56. package/datepicker/index.metadata.json +1 -1
  57. package/dialog/index.metadata.json +1 -1
  58. package/esm2015/bottom-sheet/bottom-sheet-container.js +1 -1
  59. package/esm2015/bottom-sheet/bottom-sheet.js +4 -4
  60. package/esm2015/checkbox/checkbox.js +1 -1
  61. package/esm2015/chips/chip-list.js +2 -5
  62. package/esm2015/chips/chip.js +4 -5
  63. package/esm2015/chips/testing/chip-option-harness.js +1 -1
  64. package/esm2015/core/common-behaviors/common-module.js +1 -1
  65. package/esm2015/core/common-behaviors/error-state.js +8 -6
  66. package/esm2015/core/datetime/native-date-adapter.js +1 -1
  67. package/esm2015/core/version.js +1 -1
  68. package/esm2015/datepicker/calendar-body.js +2 -4
  69. package/esm2015/datepicker/calendar.js +6 -14
  70. package/esm2015/datepicker/date-range-input-parts.js +1 -1
  71. package/esm2015/datepicker/date-range-input.js +4 -2
  72. package/esm2015/datepicker/date-range-picker.js +1 -1
  73. package/esm2015/datepicker/datepicker-input.js +1 -1
  74. package/esm2015/datepicker/month-view.js +2 -2
  75. package/esm2015/datepicker/multi-year-view.js +2 -2
  76. package/esm2015/datepicker/year-view.js +2 -2
  77. package/esm2015/dialog/dialog-container.js +1 -1
  78. package/esm2015/dialog/dialog.js +4 -4
  79. package/esm2015/expansion/accordion.js +1 -1
  80. package/esm2015/expansion/expansion-panel.js +1 -1
  81. package/esm2015/form-field/form-field.js +3 -4
  82. package/esm2015/grid-list/tile-styler.js +1 -1
  83. package/esm2015/input/input.js +2 -5
  84. package/esm2015/list/testing/action-list-harness.js +1 -1
  85. package/esm2015/list/testing/list-harness.js +1 -1
  86. package/esm2015/list/testing/nav-list-harness.js +1 -1
  87. package/esm2015/list/testing/selection-list-harness.js +1 -1
  88. package/esm2015/menu/menu.js +1 -1
  89. package/esm2015/menu/testing/menu-harness.js +1 -1
  90. package/esm2015/progress-bar/progress-bar.js +3 -4
  91. package/esm2015/progress-spinner/progress-spinner.js +3 -4
  92. package/esm2015/radio/radio.js +13 -14
  93. package/esm2015/select/select.js +1 -2
  94. package/esm2015/sidenav/sidenav.js +1 -1
  95. package/esm2015/slide-toggle/slide-toggle.js +1 -1
  96. package/esm2015/slider/slider.js +2 -6
  97. package/esm2015/snack-bar/snack-bar-container.js +1 -1
  98. package/esm2015/stepper/step-header.js +1 -1
  99. package/esm2015/stepper/stepper.js +1 -1
  100. package/esm2015/stepper/testing/step-harness.js +1 -1
  101. package/esm2015/table/cell.js +1 -1
  102. package/esm2015/table/row.js +1 -1
  103. package/esm2015/table/table.js +1 -1
  104. package/esm2015/table/testing/cell-harness.js +1 -1
  105. package/esm2015/tabs/tab-body.js +1 -1
  106. package/esm2015/tabs/tab-nav-bar/tab-nav-bar.js +7 -1
  107. package/esm2015/tabs/testing/tab-harness.js +1 -1
  108. package/esm2015/tooltip/tooltip.js +8 -1
  109. package/esm2015/tree/node.js +7 -12
  110. package/esm2015/tree/padding.js +1 -1
  111. package/esm2015/tree/toggle.js +1 -1
  112. package/esm2015/tree/tree.js +1 -1
  113. package/fesm2015/bottom-sheet.js +3 -3
  114. package/fesm2015/bottom-sheet.js.map +1 -1
  115. package/fesm2015/checkbox.js.map +1 -1
  116. package/fesm2015/chips/testing.js.map +1 -1
  117. package/fesm2015/chips.js +4 -8
  118. package/fesm2015/chips.js.map +1 -1
  119. package/fesm2015/core.js +9 -7
  120. package/fesm2015/core.js.map +1 -1
  121. package/fesm2015/datepicker.js +12 -20
  122. package/fesm2015/datepicker.js.map +1 -1
  123. package/fesm2015/dialog.js +3 -3
  124. package/fesm2015/dialog.js.map +1 -1
  125. package/fesm2015/expansion.js.map +1 -1
  126. package/fesm2015/form-field.js +2 -3
  127. package/fesm2015/form-field.js.map +1 -1
  128. package/fesm2015/grid-list.js.map +1 -1
  129. package/fesm2015/input.js +1 -4
  130. package/fesm2015/input.js.map +1 -1
  131. package/fesm2015/list/testing.js.map +1 -1
  132. package/fesm2015/menu/testing.js.map +1 -1
  133. package/fesm2015/menu.js.map +1 -1
  134. package/fesm2015/progress-bar.js +2 -3
  135. package/fesm2015/progress-bar.js.map +1 -1
  136. package/fesm2015/progress-spinner.js +2 -3
  137. package/fesm2015/progress-spinner.js.map +1 -1
  138. package/fesm2015/radio.js +12 -13
  139. package/fesm2015/radio.js.map +1 -1
  140. package/fesm2015/select.js +0 -1
  141. package/fesm2015/select.js.map +1 -1
  142. package/fesm2015/sidenav.js.map +1 -1
  143. package/fesm2015/slide-toggle.js +1 -1
  144. package/fesm2015/slider.js +1 -5
  145. package/fesm2015/slider.js.map +1 -1
  146. package/fesm2015/snack-bar.js.map +1 -1
  147. package/fesm2015/stepper/testing.js.map +1 -1
  148. package/fesm2015/stepper.js.map +1 -1
  149. package/fesm2015/table/testing.js.map +1 -1
  150. package/fesm2015/table.js.map +1 -1
  151. package/fesm2015/tabs/testing.js.map +1 -1
  152. package/fesm2015/tabs.js +6 -0
  153. package/fesm2015/tabs.js.map +1 -1
  154. package/fesm2015/tooltip.js +7 -0
  155. package/fesm2015/tooltip.js.map +1 -1
  156. package/fesm2015/tree.js +6 -11
  157. package/fesm2015/tree.js.map +1 -1
  158. package/form-field/form-field.d.ts +1 -2
  159. package/form-field/index.metadata.json +1 -1
  160. package/input/index.metadata.json +1 -1
  161. package/input/input.d.ts +1 -5
  162. package/package.json +2 -2
  163. package/prebuilt-themes/deeppurple-amber.css +1 -1
  164. package/prebuilt-themes/indigo-pink.css +1 -1
  165. package/prebuilt-themes/pink-bluegrey.css +1 -1
  166. package/prebuilt-themes/purple-green.css +1 -1
  167. package/progress-bar/index.metadata.json +1 -1
  168. package/progress-bar/progress-bar.d.ts +1 -2
  169. package/progress-spinner/progress-spinner.d.ts +1 -2
  170. package/radio/index.metadata.json +1 -1
  171. package/radio/radio.d.ts +2 -5
  172. package/schematics/migration.json +5 -0
  173. package/schematics/ng-add/index.js +1 -1
  174. package/schematics/ng-add/index.mjs +1 -1
  175. package/schematics/ng-add/package-config.js +5 -2
  176. package/schematics/ng-add/package-config.mjs +5 -2
  177. package/schematics/ng-update/index.d.ts +2 -0
  178. package/schematics/ng-update/index.js +7 -2
  179. package/schematics/ng-update/index.mjs +7 -2
  180. package/schematics/ng-update/migrations/hammer-gestures-v9/find-hammer-script-tags.d.ts +1 -1
  181. package/schematics/ng-update/migrations/hammer-gestures-v9/find-hammer-script-tags.js +1 -1
  182. package/schematics/ng-update/migrations/hammer-gestures-v9/find-hammer-script-tags.mjs +1 -1
  183. package/schematics/ng-update/migrations/hammer-gestures-v9/hammer-gestures-migration.js +4 -4
  184. package/schematics/ng-update/migrations/hammer-gestures-v9/hammer-gestures-migration.mjs +4 -4
  185. package/schematics/ng-update/migrations/hammer-gestures-v9/hammer-template-check.js +2 -2
  186. package/schematics/ng-update/migrations/hammer-gestures-v9/hammer-template-check.mjs +2 -2
  187. package/schematics/ng-update/migrations/hammer-gestures-v9/remove-element-from-html.d.ts +1 -1
  188. package/schematics/ng-update/migrations/hammer-gestures-v9/remove-element-from-html.js +1 -1
  189. package/schematics/ng-update/migrations/hammer-gestures-v9/remove-element-from-html.mjs +1 -1
  190. package/schematics/ng-update/migrations/misc-checks/misc-class-inheritance.js +1 -1
  191. package/schematics/ng-update/migrations/misc-checks/misc-class-inheritance.mjs +1 -1
  192. package/schematics/ng-update/migrations/misc-checks/misc-class-names.js +1 -1
  193. package/schematics/ng-update/migrations/misc-checks/misc-class-names.mjs +1 -1
  194. package/schematics/ng-update/migrations/misc-checks/misc-imports.js +1 -1
  195. package/schematics/ng-update/migrations/misc-checks/misc-imports.mjs +1 -1
  196. package/schematics/ng-update/migrations/misc-checks/misc-property-names.js +1 -1
  197. package/schematics/ng-update/migrations/misc-checks/misc-property-names.mjs +1 -1
  198. package/schematics/ng-update/migrations/misc-checks/misc-template.js +1 -1
  199. package/schematics/ng-update/migrations/misc-checks/misc-template.mjs +1 -1
  200. package/schematics/ng-update/migrations/misc-ripples-v7/ripple-speed-factor-migration.js +1 -1
  201. package/schematics/ng-update/migrations/misc-ripples-v7/ripple-speed-factor-migration.mjs +1 -1
  202. package/schematics/ng-update/migrations/package-imports-v8/secondary-entry-points-migration.js +2 -2
  203. package/schematics/ng-update/migrations/package-imports-v8/secondary-entry-points-migration.mjs +2 -2
  204. package/schematics/ng-update/migrations/theming-api-v12/config.js +4 -1
  205. package/schematics/ng-update/migrations/theming-api-v12/config.mjs +4 -1
  206. package/schematics/ng-update/migrations/theming-api-v12/migration.js +24 -28
  207. package/schematics/ng-update/migrations/theming-api-v12/migration.mjs +24 -28
  208. package/schematics/ng-update/migrations/theming-api-v12/theming-api-migration.js +1 -1
  209. package/schematics/ng-update/migrations/theming-api-v12/theming-api-migration.mjs +1 -1
  210. package/schematics/tsconfig.json +4 -0
  211. package/select/index.metadata.json +1 -1
  212. package/select/select.d.ts +0 -1
  213. package/sidenav/sidenav.d.ts +0 -1
  214. package/slide-toggle/index.metadata.json +1 -1
  215. package/slider/index.metadata.json +1 -1
  216. package/slider/slider.d.ts +2 -2
  217. package/stepper/index.metadata.json +1 -1
  218. package/stepper/stepper.d.ts +0 -5
  219. package/table/cell.d.ts +0 -2
  220. package/table/index.metadata.json +1 -1
  221. package/table/row.d.ts +0 -3
  222. package/tabs/index.metadata.json +1 -1
  223. package/tabs/tab-nav-bar/tab-nav-bar.d.ts +1 -0
  224. package/tooltip/index.metadata.json +1 -1
  225. package/tooltip/tooltip.d.ts +6 -0
  226. package/tree/index.metadata.json +1 -1
  227. package/tree/node.d.ts +2 -7
@@ -1 +1 @@
1
- {"version":3,"file":"bottom-sheet.js","sources":["../../../../../../src/material/bottom-sheet/bottom-sheet-config.ts","../../../../../../src/material/bottom-sheet/bottom-sheet-animations.ts","../../../../../../src/material/bottom-sheet/bottom-sheet-container.ts","../../../../../../src/material/bottom-sheet/bottom-sheet-module.ts","../../../../../../src/material/bottom-sheet/bottom-sheet-ref.ts","../../../../../../src/material/bottom-sheet/bottom-sheet.ts","../../../../../../src/material/bottom-sheet/public-api.ts","../../../../../../src/material/bottom-sheet/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Direction} from '@angular/cdk/bidi';\nimport {ScrollStrategy} from '@angular/cdk/overlay';\nimport {InjectionToken, ViewContainerRef} from '@angular/core';\n\n/** Injection token that can be used to access the data that was passed in to a bottom sheet. */\nexport const MAT_BOTTOM_SHEET_DATA = new InjectionToken<any>('MatBottomSheetData');\n\n/**\n * Configuration used when opening a bottom sheet.\n */\nexport class MatBottomSheetConfig<D = any> {\n /** The view container to place the overlay for the bottom sheet into. */\n viewContainerRef?: ViewContainerRef;\n\n /** Extra CSS classes to be added to the bottom sheet container. */\n panelClass?: string | string[];\n\n /** Text layout direction for the bottom sheet. */\n direction?: Direction;\n\n /** Data being injected into the child component. */\n data?: D | null = null;\n\n /** Whether the bottom sheet has a backdrop. */\n hasBackdrop?: boolean = true;\n\n /** Custom class for the backdrop. */\n backdropClass?: string;\n\n /** Whether the user can use escape or clicking outside to close the bottom sheet. */\n disableClose?: boolean = false;\n\n /** Aria label to assign to the bottom sheet element. */\n ariaLabel?: string | null = null;\n\n /**\n * Whether the bottom sheet should close when the user goes backwards/forwards in history.\n * Note that this usually doesn't include clicking on links (unless the user is using\n * the `HashLocationStrategy`).\n */\n closeOnNavigation?: boolean = true;\n\n // Note that this is disabled by default, because while the a11y recommendations are to focus\n // the first focusable element, doing so prevents screen readers from reading out the\n // rest of the bottom sheet content.\n /** Whether the bottom sheet should focus the first focusable element on open. */\n autoFocus?: boolean = false;\n\n /**\n * Whether the bottom sheet should restore focus to the\n * previously-focused element, after it's closed.\n */\n restoreFocus?: boolean = true;\n\n /** Scroll strategy to be used for the bottom sheet. */\n scrollStrategy?: ScrollStrategy;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {\n animate,\n state,\n style,\n transition,\n trigger,\n AnimationTriggerMetadata,\n} from '@angular/animations';\nimport {AnimationCurves, AnimationDurations} from '@angular/material/core';\n\n/** Animations used by the Material bottom sheet. */\nexport const matBottomSheetAnimations: {\n readonly bottomSheetState: AnimationTriggerMetadata;\n} = {\n /** Animation that shows and hides a bottom sheet. */\n bottomSheetState: trigger('state', [\n state('void, hidden', style({transform: 'translateY(100%)'})),\n state('visible', style({transform: 'translateY(0%)'})),\n transition('visible => void, visible => hidden',\n animate(`${AnimationDurations.COMPLEX} ${AnimationCurves.ACCELERATION_CURVE}`)),\n transition('void => visible',\n animate(`${AnimationDurations.EXITING} ${AnimationCurves.DECELERATION_CURVE}`)),\n ])\n};\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {\n Component,\n ComponentRef,\n EmbeddedViewRef,\n ViewChild,\n OnDestroy,\n ElementRef,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n ChangeDetectorRef,\n EventEmitter,\n Inject,\n Optional,\n} from '@angular/core';\nimport {AnimationEvent} from '@angular/animations';\nimport {\n BasePortalOutlet,\n ComponentPortal,\n TemplatePortal,\n CdkPortalOutlet,\n DomPortal,\n} from '@angular/cdk/portal';\nimport {BreakpointObserver, Breakpoints} from '@angular/cdk/layout';\nimport {MatBottomSheetConfig} from './bottom-sheet-config';\nimport {matBottomSheetAnimations} from './bottom-sheet-animations';\nimport {Subscription} from 'rxjs';\nimport {DOCUMENT} from '@angular/common';\nimport {FocusTrap, FocusTrapFactory} from '@angular/cdk/a11y';\nimport {_getFocusedElementPierceShadowDom} from '@angular/cdk/platform';\n\n// TODO(crisbeto): consolidate some logic between this, MatDialog and MatSnackBar\n\n/**\n * Internal component that wraps user-provided bottom sheet content.\n * @docs-private\n */\n@Component({\n selector: 'mat-bottom-sheet-container',\n templateUrl: 'bottom-sheet-container.html',\n styleUrls: ['bottom-sheet-container.css'],\n // In Ivy embedded views will be change detected from their declaration place, rather than where\n // they were stamped out. This means that we can't have the bottom sheet container be OnPush,\n // because it might cause the sheets that were opened from a template not to be out of date.\n // tslint:disable-next-line:validate-decorators\n changeDetection: ChangeDetectionStrategy.Default,\n encapsulation: ViewEncapsulation.None,\n animations: [matBottomSheetAnimations.bottomSheetState],\n host: {\n 'class': 'mat-bottom-sheet-container',\n 'tabindex': '-1',\n 'role': 'dialog',\n 'aria-modal': 'true',\n '[attr.aria-label]': 'bottomSheetConfig?.ariaLabel',\n '[@state]': '_animationState',\n '(@state.start)': '_onAnimationStart($event)',\n '(@state.done)': '_onAnimationDone($event)'\n },\n})\nexport class MatBottomSheetContainer extends BasePortalOutlet implements OnDestroy {\n private _breakpointSubscription: Subscription;\n\n /** The portal outlet inside of this container into which the content will be loaded. */\n @ViewChild(CdkPortalOutlet, {static: true}) _portalOutlet: CdkPortalOutlet;\n\n /** The state of the bottom sheet animations. */\n _animationState: 'void' | 'visible' | 'hidden' = 'void';\n\n /** Emits whenever the state of the animation changes. */\n _animationStateChanged = new EventEmitter<AnimationEvent>();\n\n /** The class that traps and manages focus within the bottom sheet. */\n private _focusTrap: FocusTrap;\n\n /** Element that was focused before the bottom sheet was opened. */\n private _elementFocusedBeforeOpened: HTMLElement | null = null;\n\n /** Server-side rendering-compatible reference to the global document object. */\n private _document: Document;\n\n /** Whether the component has been destroyed. */\n private _destroyed: boolean;\n\n constructor(\n private _elementRef: ElementRef<HTMLElement>,\n private _changeDetectorRef: ChangeDetectorRef,\n private _focusTrapFactory: FocusTrapFactory,\n breakpointObserver: BreakpointObserver,\n @Optional() @Inject(DOCUMENT) document: any,\n /** The bottom sheet configuration. */\n public bottomSheetConfig: MatBottomSheetConfig) {\n super();\n\n this._document = document;\n this._breakpointSubscription = breakpointObserver\n .observe([Breakpoints.Medium, Breakpoints.Large, Breakpoints.XLarge])\n .subscribe(() => {\n this._toggleClass('mat-bottom-sheet-container-medium',\n breakpointObserver.isMatched(Breakpoints.Medium));\n this._toggleClass('mat-bottom-sheet-container-large',\n breakpointObserver.isMatched(Breakpoints.Large));\n this._toggleClass('mat-bottom-sheet-container-xlarge',\n breakpointObserver.isMatched(Breakpoints.XLarge));\n });\n }\n\n /** Attach a component portal as content to this bottom sheet container. */\n attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T> {\n this._validatePortalAttached();\n this._setPanelClass();\n this._savePreviouslyFocusedElement();\n return this._portalOutlet.attachComponentPortal(portal);\n }\n\n /** Attach a template portal as content to this bottom sheet container. */\n attachTemplatePortal<C>(portal: TemplatePortal<C>): EmbeddedViewRef<C> {\n this._validatePortalAttached();\n this._setPanelClass();\n this._savePreviouslyFocusedElement();\n return this._portalOutlet.attachTemplatePortal(portal);\n }\n\n /**\n * Attaches a DOM portal to the bottom sheet container.\n * @deprecated To be turned into a method.\n * @breaking-change 10.0.0\n */\n attachDomPortal = (portal: DomPortal) => {\n this._validatePortalAttached();\n this._setPanelClass();\n this._savePreviouslyFocusedElement();\n return this._portalOutlet.attachDomPortal(portal);\n }\n\n /** Begin animation of bottom sheet entrance into view. */\n enter(): void {\n if (!this._destroyed) {\n this._animationState = 'visible';\n this._changeDetectorRef.detectChanges();\n }\n }\n\n /** Begin animation of the bottom sheet exiting from view. */\n exit(): void {\n if (!this._destroyed) {\n this._animationState = 'hidden';\n this._changeDetectorRef.markForCheck();\n }\n }\n\n ngOnDestroy() {\n this._breakpointSubscription.unsubscribe();\n this._destroyed = true;\n }\n\n _onAnimationDone(event: AnimationEvent) {\n if (event.toState === 'hidden') {\n this._restoreFocus();\n } else if (event.toState === 'visible') {\n this._trapFocus();\n }\n\n this._animationStateChanged.emit(event);\n }\n\n _onAnimationStart(event: AnimationEvent) {\n this._animationStateChanged.emit(event);\n }\n\n private _toggleClass(cssClass: string, add: boolean) {\n const classList = this._elementRef.nativeElement.classList;\n add ? classList.add(cssClass) : classList.remove(cssClass);\n }\n\n private _validatePortalAttached() {\n if (this._portalOutlet.hasAttached() && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error('Attempting to attach bottom sheet content after content is already attached');\n }\n }\n\n private _setPanelClass() {\n const element: HTMLElement = this._elementRef.nativeElement;\n const panelClass = this.bottomSheetConfig.panelClass;\n\n if (Array.isArray(panelClass)) {\n // Note that we can't use a spread here, because IE doesn't support multiple arguments.\n panelClass.forEach(cssClass => element.classList.add(cssClass));\n } else if (panelClass) {\n element.classList.add(panelClass);\n }\n }\n\n /** Moves the focus inside the focus trap. */\n private _trapFocus() {\n const element = this._elementRef.nativeElement;\n\n if (!this._focusTrap) {\n this._focusTrap = this._focusTrapFactory.create(element);\n }\n\n if (this.bottomSheetConfig.autoFocus) {\n this._focusTrap.focusInitialElementWhenReady();\n } else {\n const activeElement = _getFocusedElementPierceShadowDom();\n\n // Otherwise ensure that focus is on the container. It's possible that a different\n // component tried to move focus while the open animation was running. See:\n // https://github.com/angular/components/issues/16215. Note that we only want to do this\n // if the focus isn't inside the bottom sheet already, because it's possible that the\n // consumer turned off `autoFocus` in order to move focus themselves.\n if (activeElement !== element && !element.contains(activeElement)) {\n element.focus();\n }\n }\n }\n\n /** Restores focus to the element that was focused before the bottom sheet was opened. */\n private _restoreFocus() {\n const toFocus = this._elementFocusedBeforeOpened;\n\n // We need the extra check, because IE can set the `activeElement` to null in some cases.\n if (this.bottomSheetConfig.restoreFocus && toFocus && typeof toFocus.focus === 'function') {\n const activeElement = _getFocusedElementPierceShadowDom();\n const element = this._elementRef.nativeElement;\n\n // Make sure that focus is still inside the bottom sheet or is on the body (usually because a\n // non-focusable element like the backdrop was clicked) before moving it. It's possible that\n // the consumer moved it themselves before the animation was done, in which case we shouldn't\n // do anything.\n if (!activeElement || activeElement === this._document.body || activeElement === element ||\n element.contains(activeElement)) {\n toFocus.focus();\n }\n }\n\n if (this._focusTrap) {\n this._focusTrap.destroy();\n }\n }\n\n /** Saves a reference to the element that was focused before the bottom sheet was opened. */\n private _savePreviouslyFocusedElement() {\n this._elementFocusedBeforeOpened = _getFocusedElementPierceShadowDom();\n\n // The `focus` method isn't available during server-side rendering.\n if (this._elementRef.nativeElement.focus) {\n Promise.resolve().then(() => this._elementRef.nativeElement.focus());\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {OverlayModule} from '@angular/cdk/overlay';\nimport {PortalModule} from '@angular/cdk/portal';\nimport {NgModule} from '@angular/core';\nimport {MatCommonModule} from '@angular/material/core';\nimport {MatBottomSheetContainer} from './bottom-sheet-container';\n\n\n@NgModule({\n imports: [\n OverlayModule,\n MatCommonModule,\n PortalModule,\n ],\n exports: [MatBottomSheetContainer, MatCommonModule],\n declarations: [MatBottomSheetContainer],\n entryComponents: [MatBottomSheetContainer],\n})\nexport class MatBottomSheetModule {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ESCAPE, hasModifierKey} from '@angular/cdk/keycodes';\nimport {OverlayRef} from '@angular/cdk/overlay';\nimport {merge, Observable, Subject} from 'rxjs';\nimport {filter, take} from 'rxjs/operators';\nimport {MatBottomSheetContainer} from './bottom-sheet-container';\n\n\n/**\n * Reference to a bottom sheet dispatched from the bottom sheet service.\n */\nexport class MatBottomSheetRef<T = any, R = any> {\n /** Instance of the component making up the content of the bottom sheet. */\n instance: T;\n\n /**\n * Instance of the component into which the bottom sheet content is projected.\n * @docs-private\n */\n containerInstance: MatBottomSheetContainer;\n\n /** Whether the user is allowed to close the bottom sheet. */\n disableClose: boolean | undefined;\n\n /** Subject for notifying the user that the bottom sheet has been dismissed. */\n private readonly _afterDismissed = new Subject<R | undefined>();\n\n /** Subject for notifying the user that the bottom sheet has opened and appeared. */\n private readonly _afterOpened = new Subject<void>();\n\n /** Result to be passed down to the `afterDismissed` stream. */\n private _result: R | undefined;\n\n /** Handle to the timeout that's running as a fallback in case the exit animation doesn't fire. */\n private _closeFallbackTimeout: number;\n\n constructor(\n containerInstance: MatBottomSheetContainer,\n private _overlayRef: OverlayRef) {\n this.containerInstance = containerInstance;\n this.disableClose = containerInstance.bottomSheetConfig.disableClose;\n\n // Emit when opening animation completes\n containerInstance._animationStateChanged.pipe(\n filter(event => event.phaseName === 'done' && event.toState === 'visible'),\n take(1)\n )\n .subscribe(() => {\n this._afterOpened.next();\n this._afterOpened.complete();\n });\n\n // Dispose overlay when closing animation is complete\n containerInstance._animationStateChanged\n .pipe(filter(event => event.phaseName === 'done' && event.toState === 'hidden'), take(1))\n .subscribe(() => {\n clearTimeout(this._closeFallbackTimeout);\n _overlayRef.dispose();\n });\n\n _overlayRef.detachments().pipe(take(1)).subscribe(() => {\n this._afterDismissed.next(this._result);\n this._afterDismissed.complete();\n });\n\n merge(\n _overlayRef.backdropClick(),\n _overlayRef.keydownEvents().pipe(filter(event => event.keyCode === ESCAPE))\n ).subscribe(event => {\n if (!this.disableClose &&\n (event.type !== 'keydown' || !hasModifierKey(event as KeyboardEvent))) {\n event.preventDefault();\n this.dismiss();\n }\n });\n }\n\n /**\n * Dismisses the bottom sheet.\n * @param result Data to be passed back to the bottom sheet opener.\n */\n dismiss(result?: R): void {\n if (!this._afterDismissed.closed) {\n // Transition the backdrop in parallel to the bottom sheet.\n this.containerInstance._animationStateChanged.pipe(\n filter(event => event.phaseName === 'start'),\n take(1)\n ).subscribe(event => {\n // The logic that disposes of the overlay depends on the exit animation completing, however\n // it isn't guaranteed if the parent view is destroyed while it's running. Add a fallback\n // timeout which will clean everything up if the animation hasn't fired within the specified\n // amount of time plus 100ms. We don't need to run this outside the NgZone, because for the\n // vast majority of cases the timeout will have been cleared before it has fired.\n this._closeFallbackTimeout = setTimeout(() => {\n this._overlayRef.dispose();\n }, event.totalTime + 100);\n\n this._overlayRef.detachBackdrop();\n });\n\n this._result = result;\n this.containerInstance.exit();\n }\n }\n\n /** Gets an observable that is notified when the bottom sheet is finished closing. */\n afterDismissed(): Observable<R | undefined> {\n return this._afterDismissed;\n }\n\n /** Gets an observable that is notified when the bottom sheet has opened and appeared. */\n afterOpened(): Observable<void> {\n return this._afterOpened;\n }\n\n /**\n * Gets an observable that emits when the overlay's backdrop has been clicked.\n */\n backdropClick(): Observable<MouseEvent> {\n return this._overlayRef.backdropClick();\n }\n\n /**\n * Gets an observable that emits when keydown events are targeted on the overlay.\n */\n keydownEvents(): Observable<KeyboardEvent> {\n return this._overlayRef.keydownEvents();\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directionality} from '@angular/cdk/bidi';\nimport {Overlay, OverlayConfig, OverlayRef} from '@angular/cdk/overlay';\nimport {ComponentPortal, ComponentType, TemplatePortal} from '@angular/cdk/portal';\nimport {\n ComponentRef,\n Injectable,\n Injector,\n Optional,\n SkipSelf,\n TemplateRef,\n InjectionToken,\n Inject,\n OnDestroy,\n StaticProvider,\n} from '@angular/core';\nimport {of as observableOf} from 'rxjs';\nimport {MAT_BOTTOM_SHEET_DATA, MatBottomSheetConfig} from './bottom-sheet-config';\nimport {MatBottomSheetContainer} from './bottom-sheet-container';\nimport {MatBottomSheetModule} from './bottom-sheet-module';\nimport {MatBottomSheetRef} from './bottom-sheet-ref';\n\n\n/** Injection token that can be used to specify default bottom sheet options. */\nexport const MAT_BOTTOM_SHEET_DEFAULT_OPTIONS =\n new InjectionToken<MatBottomSheetConfig>('mat-bottom-sheet-default-options');\n\n/**\n * Service to trigger Material Design bottom sheets.\n */\n@Injectable({providedIn: MatBottomSheetModule})\nexport class MatBottomSheet implements OnDestroy {\n private _bottomSheetRefAtThisLevel: MatBottomSheetRef<any> | null = null;\n\n /** Reference to the currently opened bottom sheet. */\n get _openedBottomSheetRef(): MatBottomSheetRef<any> | null {\n const parent = this._parentBottomSheet;\n return parent ? parent._openedBottomSheetRef : this._bottomSheetRefAtThisLevel;\n }\n\n set _openedBottomSheetRef(value: MatBottomSheetRef<any> | null) {\n if (this._parentBottomSheet) {\n this._parentBottomSheet._openedBottomSheetRef = value;\n } else {\n this._bottomSheetRefAtThisLevel = value;\n }\n }\n\n constructor(\n private _overlay: Overlay,\n private _injector: Injector,\n @Optional() @SkipSelf() private _parentBottomSheet: MatBottomSheet,\n @Optional() @Inject(MAT_BOTTOM_SHEET_DEFAULT_OPTIONS)\n private _defaultOptions?: MatBottomSheetConfig) {}\n\n /**\n * Opens a bottom sheet containing the given component.\n * @param component Type of the component to load into the bottom sheet.\n * @param config Extra configuration options.\n * @returns Reference to the newly-opened bottom sheet.\n */\n open<T, D = any, R = any>(component: ComponentType<T>,\n config?: MatBottomSheetConfig<D>): MatBottomSheetRef<T, R>;\n\n /**\n * Opens a bottom sheet containing the given template.\n * @param template TemplateRef to instantiate as the bottom sheet content.\n * @param config Extra configuration options.\n * @returns Reference to the newly-opened bottom sheet.\n */\n open<T, D = any, R = any>(template: TemplateRef<T>,\n config?: MatBottomSheetConfig<D>): MatBottomSheetRef<T, R>;\n\n open<T, D = any, R = any>(componentOrTemplateRef: ComponentType<T> | TemplateRef<T>,\n config?: MatBottomSheetConfig<D>): MatBottomSheetRef<T, R> {\n\n const _config =\n _applyConfigDefaults(this._defaultOptions || new MatBottomSheetConfig(), config);\n const overlayRef = this._createOverlay(_config);\n const container = this._attachContainer(overlayRef, _config);\n const ref = new MatBottomSheetRef<T, R>(container, overlayRef);\n\n if (componentOrTemplateRef instanceof TemplateRef) {\n container.attachTemplatePortal(new TemplatePortal<T>(componentOrTemplateRef, null!, {\n $implicit: _config.data,\n bottomSheetRef: ref\n } as any));\n } else {\n const portal = new ComponentPortal(componentOrTemplateRef, undefined,\n this._createInjector(_config, ref));\n const contentRef = container.attachComponentPortal(portal);\n ref.instance = contentRef.instance;\n }\n\n // When the bottom sheet is dismissed, clear the reference to it.\n ref.afterDismissed().subscribe(() => {\n // Clear the bottom sheet ref if it hasn't already been replaced by a newer one.\n if (this._openedBottomSheetRef == ref) {\n this._openedBottomSheetRef = null;\n }\n });\n\n if (this._openedBottomSheetRef) {\n // If a bottom sheet is already in view, dismiss it and enter the\n // new bottom sheet after exit animation is complete.\n this._openedBottomSheetRef.afterDismissed().subscribe(() => ref.containerInstance.enter());\n this._openedBottomSheetRef.dismiss();\n } else {\n // If no bottom sheet is in view, enter the new bottom sheet.\n ref.containerInstance.enter();\n }\n\n this._openedBottomSheetRef = ref;\n\n return ref;\n }\n\n /**\n * Dismisses the currently-visible bottom sheet.\n * @param result Data to pass to the bottom sheet instance.\n */\n dismiss<R = any>(result?: R): void {\n if (this._openedBottomSheetRef) {\n this._openedBottomSheetRef.dismiss(result);\n }\n }\n\n ngOnDestroy() {\n if (this._bottomSheetRefAtThisLevel) {\n this._bottomSheetRefAtThisLevel.dismiss();\n }\n }\n\n /**\n * Attaches the bottom sheet container component to the overlay.\n */\n private _attachContainer(overlayRef: OverlayRef,\n config: MatBottomSheetConfig): MatBottomSheetContainer {\n\n const userInjector = config && config.viewContainerRef && config.viewContainerRef.injector;\n const injector = Injector.create({\n parent: userInjector || this._injector,\n providers: [{provide: MatBottomSheetConfig, useValue: config}]\n });\n\n const containerPortal =\n new ComponentPortal(MatBottomSheetContainer, config.viewContainerRef, injector);\n const containerRef: ComponentRef<MatBottomSheetContainer> = overlayRef.attach(containerPortal);\n return containerRef.instance;\n }\n\n /**\n * Creates a new overlay and places it in the correct location.\n * @param config The user-specified bottom sheet config.\n */\n private _createOverlay(config: MatBottomSheetConfig): OverlayRef {\n const overlayConfig = new OverlayConfig({\n direction: config.direction,\n hasBackdrop: config.hasBackdrop,\n disposeOnNavigation: config.closeOnNavigation,\n maxWidth: '100%',\n scrollStrategy: config.scrollStrategy || this._overlay.scrollStrategies.block(),\n positionStrategy: this._overlay.position().global().centerHorizontally().bottom('0')\n });\n\n if (config.backdropClass) {\n overlayConfig.backdropClass = config.backdropClass;\n }\n\n return this._overlay.create(overlayConfig);\n }\n\n /**\n * Creates an injector to be used inside of a bottom sheet component.\n * @param config Config that was used to create the bottom sheet.\n * @param bottomSheetRef Reference to the bottom sheet.\n */\n private _createInjector<T>(config: MatBottomSheetConfig,\n bottomSheetRef: MatBottomSheetRef<T>): Injector {\n\n const userInjector = config && config.viewContainerRef && config.viewContainerRef.injector;\n const providers: StaticProvider[] = [\n {provide: MatBottomSheetRef, useValue: bottomSheetRef},\n {provide: MAT_BOTTOM_SHEET_DATA, useValue: config.data}\n ];\n\n if (config.direction &&\n (!userInjector || !userInjector.get<Directionality | null>(Directionality, null))) {\n providers.push({\n provide: Directionality,\n useValue: {value: config.direction, change: observableOf()}\n });\n }\n\n return Injector.create({parent: userInjector || this._injector, providers});\n }\n}\n\n/**\n * Applies default options to the bottom sheet config.\n * @param defaults Object containing the default values to which to fall back.\n * @param config The configuration to which the defaults will be applied.\n * @returns The new configuration object with defaults applied.\n */\nfunction _applyConfigDefaults(defaults: MatBottomSheetConfig,\n config?: MatBottomSheetConfig): MatBottomSheetConfig {\n return {...defaults, ...config};\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './bottom-sheet-module';\nexport * from './bottom-sheet';\nexport * from './bottom-sheet-config';\nexport * from './bottom-sheet-container';\nexport * from './bottom-sheet-animations';\nexport * from './bottom-sheet-ref';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["observableOf"],"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;AAYA;MACa,qBAAqB,GAAG,IAAI,cAAc,CAAM,oBAAoB,EAAE;AAEnF;;;MAGa,oBAAoB;IAAjC;;QAWE,SAAI,GAAc,IAAI,CAAC;;QAGvB,gBAAW,GAAa,IAAI,CAAC;;QAM7B,iBAAY,GAAa,KAAK,CAAC;;QAG/B,cAAS,GAAmB,IAAI,CAAC;;;;;;QAOjC,sBAAiB,GAAa,IAAI,CAAC;;;;;QAMnC,cAAS,GAAa,KAAK,CAAC;;;;;QAM5B,iBAAY,GAAa,IAAI,CAAC;KAI/B;;;AChED;;;;;;;AAiBA;MACa,wBAAwB,GAEjC;;IAEF,gBAAgB,EAAE,OAAO,CAAC,OAAO,EAAE;QACjC,KAAK,CAAC,cAAc,EAAE,KAAK,CAAC,EAAC,SAAS,EAAE,kBAAkB,EAAC,CAAC,CAAC;QAC7D,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,EAAC,SAAS,EAAE,gBAAgB,EAAC,CAAC,CAAC;QACtD,UAAU,CAAC,oCAAoC,EAC3C,OAAO,CAAC,GAAG,kBAAkB,CAAC,OAAO,IAAI,eAAe,CAAC,kBAAkB,EAAE,CAAC,CAAC;QACnF,UAAU,CAAC,iBAAiB,EACxB,OAAO,CAAC,GAAG,kBAAkB,CAAC,OAAO,IAAI,eAAe,CAAC,kBAAkB,EAAE,CAAC,CAAC;KACpF,CAAC;;;AC7BJ;;;;;;;AAsCA;AAEA;;;;MA0Ba,uBAAwB,SAAQ,gBAAgB;IAwB3D,YACU,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AAkJ1D;;;;;;AAMA,SAAS,oBAAoB,CAAC,QAA8B,EAC9B,MAA6B;IACzD,uCAAW,QAAQ,GAAK,MAAM,EAAE;AAClC;;ACtNA;;;;;;;;ACAA;;;;;;"}
1
+ {"version":3,"file":"bottom-sheet.js","sources":["../../../../../../src/material/bottom-sheet/bottom-sheet-config.ts","../../../../../../src/material/bottom-sheet/bottom-sheet-animations.ts","../../../../../../src/material/bottom-sheet/bottom-sheet-container.ts","../../../../../../src/material/bottom-sheet/bottom-sheet-module.ts","../../../../../../src/material/bottom-sheet/bottom-sheet-ref.ts","../../../../../../src/material/bottom-sheet/bottom-sheet.ts","../../../../../../src/material/bottom-sheet/public-api.ts","../../../../../../src/material/bottom-sheet/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Direction} from '@angular/cdk/bidi';\nimport {ScrollStrategy} from '@angular/cdk/overlay';\nimport {InjectionToken, ViewContainerRef} from '@angular/core';\n\n/** Injection token that can be used to access the data that was passed in to a bottom sheet. */\nexport const MAT_BOTTOM_SHEET_DATA = new InjectionToken<any>('MatBottomSheetData');\n\n/**\n * Configuration used when opening a bottom sheet.\n */\nexport class MatBottomSheetConfig<D = any> {\n /** The view container to place the overlay for the bottom sheet into. */\n viewContainerRef?: ViewContainerRef;\n\n /** Extra CSS classes to be added to the bottom sheet container. */\n panelClass?: string | string[];\n\n /** Text layout direction for the bottom sheet. */\n direction?: Direction;\n\n /** Data being injected into the child component. */\n data?: D | null = null;\n\n /** Whether the bottom sheet has a backdrop. */\n hasBackdrop?: boolean = true;\n\n /** Custom class for the backdrop. */\n backdropClass?: string;\n\n /** Whether the user can use escape or clicking outside to close the bottom sheet. */\n disableClose?: boolean = false;\n\n /** Aria label to assign to the bottom sheet element. */\n ariaLabel?: string | null = null;\n\n /**\n * Whether the bottom sheet should close when the user goes backwards/forwards in history.\n * Note that this usually doesn't include clicking on links (unless the user is using\n * the `HashLocationStrategy`).\n */\n closeOnNavigation?: boolean = true;\n\n // Note that this is disabled by default, because while the a11y recommendations are to focus\n // the first focusable element, doing so prevents screen readers from reading out the\n // rest of the bottom sheet content.\n /** Whether the bottom sheet should focus the first focusable element on open. */\n autoFocus?: boolean = false;\n\n /**\n * Whether the bottom sheet should restore focus to the\n * previously-focused element, after it's closed.\n */\n restoreFocus?: boolean = true;\n\n /** Scroll strategy to be used for the bottom sheet. */\n scrollStrategy?: ScrollStrategy;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {\n animate,\n state,\n style,\n transition,\n trigger,\n AnimationTriggerMetadata,\n} from '@angular/animations';\nimport {AnimationCurves, AnimationDurations} from '@angular/material/core';\n\n/** Animations used by the Material bottom sheet. */\nexport const matBottomSheetAnimations: {\n readonly bottomSheetState: AnimationTriggerMetadata;\n} = {\n /** Animation that shows and hides a bottom sheet. */\n bottomSheetState: trigger('state', [\n state('void, hidden', style({transform: 'translateY(100%)'})),\n state('visible', style({transform: 'translateY(0%)'})),\n transition('visible => void, visible => hidden',\n animate(`${AnimationDurations.COMPLEX} ${AnimationCurves.ACCELERATION_CURVE}`)),\n transition('void => visible',\n animate(`${AnimationDurations.EXITING} ${AnimationCurves.DECELERATION_CURVE}`)),\n ])\n};\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {\n Component,\n ComponentRef,\n EmbeddedViewRef,\n ViewChild,\n OnDestroy,\n ElementRef,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n ChangeDetectorRef,\n EventEmitter,\n Inject,\n Optional,\n} from '@angular/core';\nimport {AnimationEvent} from '@angular/animations';\nimport {\n BasePortalOutlet,\n ComponentPortal,\n TemplatePortal,\n CdkPortalOutlet,\n DomPortal,\n} from '@angular/cdk/portal';\nimport {BreakpointObserver, Breakpoints} from '@angular/cdk/layout';\nimport {MatBottomSheetConfig} from './bottom-sheet-config';\nimport {matBottomSheetAnimations} from './bottom-sheet-animations';\nimport {Subscription} from 'rxjs';\nimport {DOCUMENT} from '@angular/common';\nimport {FocusTrap, FocusTrapFactory} from '@angular/cdk/a11y';\nimport {_getFocusedElementPierceShadowDom} from '@angular/cdk/platform';\n\n// TODO(crisbeto): consolidate some logic between this, MatDialog and MatSnackBar\n\n/**\n * Internal component that wraps user-provided bottom sheet content.\n * @docs-private\n */\n@Component({\n selector: 'mat-bottom-sheet-container',\n templateUrl: 'bottom-sheet-container.html',\n styleUrls: ['bottom-sheet-container.css'],\n // In Ivy embedded views will be change detected from their declaration place, rather than where\n // they were stamped out. This means that we can't have the bottom sheet container be OnPush,\n // because it might cause the sheets that were opened from a template not to be out of date.\n // tslint:disable-next-line:validate-decorators\n changeDetection: ChangeDetectionStrategy.Default,\n encapsulation: ViewEncapsulation.None,\n animations: [matBottomSheetAnimations.bottomSheetState],\n host: {\n 'class': 'mat-bottom-sheet-container',\n 'tabindex': '-1',\n 'role': 'dialog',\n 'aria-modal': 'true',\n '[attr.aria-label]': 'bottomSheetConfig?.ariaLabel',\n '[@state]': '_animationState',\n '(@state.start)': '_onAnimationStart($event)',\n '(@state.done)': '_onAnimationDone($event)'\n },\n})\nexport class MatBottomSheetContainer extends BasePortalOutlet implements OnDestroy {\n private _breakpointSubscription: Subscription;\n\n /** The portal outlet inside of this container into which the content will be loaded. */\n @ViewChild(CdkPortalOutlet, {static: true}) _portalOutlet: CdkPortalOutlet;\n\n /** The state of the bottom sheet animations. */\n _animationState: 'void' | 'visible' | 'hidden' = 'void';\n\n /** Emits whenever the state of the animation changes. */\n _animationStateChanged = new EventEmitter<AnimationEvent>();\n\n /** The class that traps and manages focus within the bottom sheet. */\n private _focusTrap: FocusTrap;\n\n /** Element that was focused before the bottom sheet was opened. */\n private _elementFocusedBeforeOpened: HTMLElement | null = null;\n\n /** Server-side rendering-compatible reference to the global document object. */\n private _document: Document;\n\n /** Whether the component has been destroyed. */\n private _destroyed: boolean;\n\n constructor(\n private _elementRef: ElementRef<HTMLElement>,\n private _changeDetectorRef: ChangeDetectorRef,\n private _focusTrapFactory: FocusTrapFactory,\n breakpointObserver: BreakpointObserver,\n @Optional() @Inject(DOCUMENT) document: any,\n /** The bottom sheet configuration. */\n public bottomSheetConfig: MatBottomSheetConfig) {\n super();\n\n this._document = document;\n this._breakpointSubscription = breakpointObserver\n .observe([Breakpoints.Medium, Breakpoints.Large, Breakpoints.XLarge])\n .subscribe(() => {\n this._toggleClass('mat-bottom-sheet-container-medium',\n breakpointObserver.isMatched(Breakpoints.Medium));\n this._toggleClass('mat-bottom-sheet-container-large',\n breakpointObserver.isMatched(Breakpoints.Large));\n this._toggleClass('mat-bottom-sheet-container-xlarge',\n breakpointObserver.isMatched(Breakpoints.XLarge));\n });\n }\n\n /** Attach a component portal as content to this bottom sheet container. */\n attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T> {\n this._validatePortalAttached();\n this._setPanelClass();\n this._savePreviouslyFocusedElement();\n return this._portalOutlet.attachComponentPortal(portal);\n }\n\n /** Attach a template portal as content to this bottom sheet container. */\n attachTemplatePortal<C>(portal: TemplatePortal<C>): EmbeddedViewRef<C> {\n this._validatePortalAttached();\n this._setPanelClass();\n this._savePreviouslyFocusedElement();\n return this._portalOutlet.attachTemplatePortal(portal);\n }\n\n /**\n * Attaches a DOM portal to the bottom sheet container.\n * @deprecated To be turned into a method.\n * @breaking-change 10.0.0\n */\n override attachDomPortal = (portal: DomPortal) => {\n this._validatePortalAttached();\n this._setPanelClass();\n this._savePreviouslyFocusedElement();\n return this._portalOutlet.attachDomPortal(portal);\n }\n\n /** Begin animation of bottom sheet entrance into view. */\n enter(): void {\n if (!this._destroyed) {\n this._animationState = 'visible';\n this._changeDetectorRef.detectChanges();\n }\n }\n\n /** Begin animation of the bottom sheet exiting from view. */\n exit(): void {\n if (!this._destroyed) {\n this._animationState = 'hidden';\n this._changeDetectorRef.markForCheck();\n }\n }\n\n ngOnDestroy() {\n this._breakpointSubscription.unsubscribe();\n this._destroyed = true;\n }\n\n _onAnimationDone(event: AnimationEvent) {\n if (event.toState === 'hidden') {\n this._restoreFocus();\n } else if (event.toState === 'visible') {\n this._trapFocus();\n }\n\n this._animationStateChanged.emit(event);\n }\n\n _onAnimationStart(event: AnimationEvent) {\n this._animationStateChanged.emit(event);\n }\n\n private _toggleClass(cssClass: string, add: boolean) {\n const classList = this._elementRef.nativeElement.classList;\n add ? classList.add(cssClass) : classList.remove(cssClass);\n }\n\n private _validatePortalAttached() {\n if (this._portalOutlet.hasAttached() && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error('Attempting to attach bottom sheet content after content is already attached');\n }\n }\n\n private _setPanelClass() {\n const element: HTMLElement = this._elementRef.nativeElement;\n const panelClass = this.bottomSheetConfig.panelClass;\n\n if (Array.isArray(panelClass)) {\n // Note that we can't use a spread here, because IE doesn't support multiple arguments.\n panelClass.forEach(cssClass => element.classList.add(cssClass));\n } else if (panelClass) {\n element.classList.add(panelClass);\n }\n }\n\n /** Moves the focus inside the focus trap. */\n private _trapFocus() {\n const element = this._elementRef.nativeElement;\n\n if (!this._focusTrap) {\n this._focusTrap = this._focusTrapFactory.create(element);\n }\n\n if (this.bottomSheetConfig.autoFocus) {\n this._focusTrap.focusInitialElementWhenReady();\n } else {\n const activeElement = _getFocusedElementPierceShadowDom();\n\n // Otherwise ensure that focus is on the container. It's possible that a different\n // component tried to move focus while the open animation was running. See:\n // https://github.com/angular/components/issues/16215. Note that we only want to do this\n // if the focus isn't inside the bottom sheet already, because it's possible that the\n // consumer turned off `autoFocus` in order to move focus themselves.\n if (activeElement !== element && !element.contains(activeElement)) {\n element.focus();\n }\n }\n }\n\n /** Restores focus to the element that was focused before the bottom sheet was opened. */\n private _restoreFocus() {\n const toFocus = this._elementFocusedBeforeOpened;\n\n // We need the extra check, because IE can set the `activeElement` to null in some cases.\n if (this.bottomSheetConfig.restoreFocus && toFocus && typeof toFocus.focus === 'function') {\n const activeElement = _getFocusedElementPierceShadowDom();\n const element = this._elementRef.nativeElement;\n\n // Make sure that focus is still inside the bottom sheet or is on the body (usually because a\n // non-focusable element like the backdrop was clicked) before moving it. It's possible that\n // the consumer moved it themselves before the animation was done, in which case we shouldn't\n // do anything.\n if (!activeElement || activeElement === this._document.body || activeElement === element ||\n element.contains(activeElement)) {\n toFocus.focus();\n }\n }\n\n if (this._focusTrap) {\n this._focusTrap.destroy();\n }\n }\n\n /** Saves a reference to the element that was focused before the bottom sheet was opened. */\n private _savePreviouslyFocusedElement() {\n this._elementFocusedBeforeOpened = _getFocusedElementPierceShadowDom();\n\n // The `focus` method isn't available during server-side rendering.\n if (this._elementRef.nativeElement.focus) {\n Promise.resolve().then(() => this._elementRef.nativeElement.focus());\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {OverlayModule} from '@angular/cdk/overlay';\nimport {PortalModule} from '@angular/cdk/portal';\nimport {NgModule} from '@angular/core';\nimport {MatCommonModule} from '@angular/material/core';\nimport {MatBottomSheetContainer} from './bottom-sheet-container';\n\n\n@NgModule({\n imports: [\n OverlayModule,\n MatCommonModule,\n PortalModule,\n ],\n exports: [MatBottomSheetContainer, MatCommonModule],\n declarations: [MatBottomSheetContainer],\n entryComponents: [MatBottomSheetContainer],\n})\nexport class MatBottomSheetModule {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ESCAPE, hasModifierKey} from '@angular/cdk/keycodes';\nimport {OverlayRef} from '@angular/cdk/overlay';\nimport {merge, Observable, Subject} from 'rxjs';\nimport {filter, take} from 'rxjs/operators';\nimport {MatBottomSheetContainer} from './bottom-sheet-container';\n\n\n/**\n * Reference to a bottom sheet dispatched from the bottom sheet service.\n */\nexport class MatBottomSheetRef<T = any, R = any> {\n /** Instance of the component making up the content of the bottom sheet. */\n instance: T;\n\n /**\n * Instance of the component into which the bottom sheet content is projected.\n * @docs-private\n */\n containerInstance: MatBottomSheetContainer;\n\n /** Whether the user is allowed to close the bottom sheet. */\n disableClose: boolean | undefined;\n\n /** Subject for notifying the user that the bottom sheet has been dismissed. */\n private readonly _afterDismissed = new Subject<R | undefined>();\n\n /** Subject for notifying the user that the bottom sheet has opened and appeared. */\n private readonly _afterOpened = new Subject<void>();\n\n /** Result to be passed down to the `afterDismissed` stream. */\n private _result: R | undefined;\n\n /** Handle to the timeout that's running as a fallback in case the exit animation doesn't fire. */\n private _closeFallbackTimeout: number;\n\n constructor(\n containerInstance: MatBottomSheetContainer,\n private _overlayRef: OverlayRef) {\n this.containerInstance = containerInstance;\n this.disableClose = containerInstance.bottomSheetConfig.disableClose;\n\n // Emit when opening animation completes\n containerInstance._animationStateChanged.pipe(\n filter(event => event.phaseName === 'done' && event.toState === 'visible'),\n take(1)\n )\n .subscribe(() => {\n this._afterOpened.next();\n this._afterOpened.complete();\n });\n\n // Dispose overlay when closing animation is complete\n containerInstance._animationStateChanged\n .pipe(filter(event => event.phaseName === 'done' && event.toState === 'hidden'), take(1))\n .subscribe(() => {\n clearTimeout(this._closeFallbackTimeout);\n _overlayRef.dispose();\n });\n\n _overlayRef.detachments().pipe(take(1)).subscribe(() => {\n this._afterDismissed.next(this._result);\n this._afterDismissed.complete();\n });\n\n merge(\n _overlayRef.backdropClick(),\n _overlayRef.keydownEvents().pipe(filter(event => event.keyCode === ESCAPE))\n ).subscribe(event => {\n if (!this.disableClose &&\n (event.type !== 'keydown' || !hasModifierKey(event as KeyboardEvent))) {\n event.preventDefault();\n this.dismiss();\n }\n });\n }\n\n /**\n * Dismisses the bottom sheet.\n * @param result Data to be passed back to the bottom sheet opener.\n */\n dismiss(result?: R): void {\n if (!this._afterDismissed.closed) {\n // Transition the backdrop in parallel to the bottom sheet.\n this.containerInstance._animationStateChanged.pipe(\n filter(event => event.phaseName === 'start'),\n take(1)\n ).subscribe(event => {\n // The logic that disposes of the overlay depends on the exit animation completing, however\n // it isn't guaranteed if the parent view is destroyed while it's running. Add a fallback\n // timeout which will clean everything up if the animation hasn't fired within the specified\n // amount of time plus 100ms. We don't need to run this outside the NgZone, because for the\n // vast majority of cases the timeout will have been cleared before it has fired.\n this._closeFallbackTimeout = setTimeout(() => {\n this._overlayRef.dispose();\n }, event.totalTime + 100);\n\n this._overlayRef.detachBackdrop();\n });\n\n this._result = result;\n this.containerInstance.exit();\n }\n }\n\n /** Gets an observable that is notified when the bottom sheet is finished closing. */\n afterDismissed(): Observable<R | undefined> {\n return this._afterDismissed;\n }\n\n /** Gets an observable that is notified when the bottom sheet has opened and appeared. */\n afterOpened(): Observable<void> {\n return this._afterOpened;\n }\n\n /**\n * Gets an observable that emits when the overlay's backdrop has been clicked.\n */\n backdropClick(): Observable<MouseEvent> {\n return this._overlayRef.backdropClick();\n }\n\n /**\n * Gets an observable that emits when keydown events are targeted on the overlay.\n */\n keydownEvents(): Observable<KeyboardEvent> {\n return this._overlayRef.keydownEvents();\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directionality} from '@angular/cdk/bidi';\nimport {Overlay, OverlayConfig, OverlayRef} from '@angular/cdk/overlay';\nimport {ComponentPortal, ComponentType, TemplatePortal} from '@angular/cdk/portal';\nimport {\n ComponentRef,\n Injectable,\n Injector,\n Optional,\n SkipSelf,\n TemplateRef,\n InjectionToken,\n Inject,\n OnDestroy,\n StaticProvider,\n InjectFlags,\n} from '@angular/core';\nimport {of as observableOf} from 'rxjs';\nimport {MAT_BOTTOM_SHEET_DATA, MatBottomSheetConfig} from './bottom-sheet-config';\nimport {MatBottomSheetContainer} from './bottom-sheet-container';\nimport {MatBottomSheetModule} from './bottom-sheet-module';\nimport {MatBottomSheetRef} from './bottom-sheet-ref';\n\n\n/** Injection token that can be used to specify default bottom sheet options. */\nexport const MAT_BOTTOM_SHEET_DEFAULT_OPTIONS =\n new InjectionToken<MatBottomSheetConfig>('mat-bottom-sheet-default-options');\n\n/**\n * Service to trigger Material Design bottom sheets.\n */\n@Injectable({providedIn: MatBottomSheetModule})\nexport class MatBottomSheet implements OnDestroy {\n private _bottomSheetRefAtThisLevel: MatBottomSheetRef<any> | null = null;\n\n /** Reference to the currently opened bottom sheet. */\n get _openedBottomSheetRef(): MatBottomSheetRef<any> | null {\n const parent = this._parentBottomSheet;\n return parent ? parent._openedBottomSheetRef : this._bottomSheetRefAtThisLevel;\n }\n\n set _openedBottomSheetRef(value: MatBottomSheetRef<any> | null) {\n if (this._parentBottomSheet) {\n this._parentBottomSheet._openedBottomSheetRef = value;\n } else {\n this._bottomSheetRefAtThisLevel = value;\n }\n }\n\n constructor(\n private _overlay: Overlay,\n private _injector: Injector,\n @Optional() @SkipSelf() private _parentBottomSheet: MatBottomSheet,\n @Optional() @Inject(MAT_BOTTOM_SHEET_DEFAULT_OPTIONS)\n private _defaultOptions?: MatBottomSheetConfig) {}\n\n /**\n * Opens a bottom sheet containing the given component.\n * @param component Type of the component to load into the bottom sheet.\n * @param config Extra configuration options.\n * @returns Reference to the newly-opened bottom sheet.\n */\n open<T, D = any, R = any>(component: ComponentType<T>,\n config?: MatBottomSheetConfig<D>): MatBottomSheetRef<T, R>;\n\n /**\n * Opens a bottom sheet containing the given template.\n * @param template TemplateRef to instantiate as the bottom sheet content.\n * @param config Extra configuration options.\n * @returns Reference to the newly-opened bottom sheet.\n */\n open<T, D = any, R = any>(template: TemplateRef<T>,\n config?: MatBottomSheetConfig<D>): MatBottomSheetRef<T, R>;\n\n open<T, D = any, R = any>(componentOrTemplateRef: ComponentType<T> | TemplateRef<T>,\n config?: MatBottomSheetConfig<D>): MatBottomSheetRef<T, R> {\n\n const _config =\n _applyConfigDefaults(this._defaultOptions || new MatBottomSheetConfig(), config);\n const overlayRef = this._createOverlay(_config);\n const container = this._attachContainer(overlayRef, _config);\n const ref = new MatBottomSheetRef<T, R>(container, overlayRef);\n\n if (componentOrTemplateRef instanceof TemplateRef) {\n container.attachTemplatePortal(new TemplatePortal<T>(componentOrTemplateRef, null!, {\n $implicit: _config.data,\n bottomSheetRef: ref\n } as any));\n } else {\n const portal = new ComponentPortal(componentOrTemplateRef, undefined,\n this._createInjector(_config, ref));\n const contentRef = container.attachComponentPortal(portal);\n ref.instance = contentRef.instance;\n }\n\n // When the bottom sheet is dismissed, clear the reference to it.\n ref.afterDismissed().subscribe(() => {\n // Clear the bottom sheet ref if it hasn't already been replaced by a newer one.\n if (this._openedBottomSheetRef == ref) {\n this._openedBottomSheetRef = null;\n }\n });\n\n if (this._openedBottomSheetRef) {\n // If a bottom sheet is already in view, dismiss it and enter the\n // new bottom sheet after exit animation is complete.\n this._openedBottomSheetRef.afterDismissed().subscribe(() => ref.containerInstance.enter());\n this._openedBottomSheetRef.dismiss();\n } else {\n // If no bottom sheet is in view, enter the new bottom sheet.\n ref.containerInstance.enter();\n }\n\n this._openedBottomSheetRef = ref;\n\n return ref;\n }\n\n /**\n * Dismisses the currently-visible bottom sheet.\n * @param result Data to pass to the bottom sheet instance.\n */\n dismiss<R = any>(result?: R): void {\n if (this._openedBottomSheetRef) {\n this._openedBottomSheetRef.dismiss(result);\n }\n }\n\n ngOnDestroy() {\n if (this._bottomSheetRefAtThisLevel) {\n this._bottomSheetRefAtThisLevel.dismiss();\n }\n }\n\n /**\n * Attaches the bottom sheet container component to the overlay.\n */\n private _attachContainer(overlayRef: OverlayRef,\n config: MatBottomSheetConfig): MatBottomSheetContainer {\n\n const userInjector = config && config.viewContainerRef && config.viewContainerRef.injector;\n const injector = Injector.create({\n parent: userInjector || this._injector,\n providers: [{provide: MatBottomSheetConfig, useValue: config}]\n });\n\n const containerPortal =\n new ComponentPortal(MatBottomSheetContainer, config.viewContainerRef, injector);\n const containerRef: ComponentRef<MatBottomSheetContainer> = overlayRef.attach(containerPortal);\n return containerRef.instance;\n }\n\n /**\n * Creates a new overlay and places it in the correct location.\n * @param config The user-specified bottom sheet config.\n */\n private _createOverlay(config: MatBottomSheetConfig): OverlayRef {\n const overlayConfig = new OverlayConfig({\n direction: config.direction,\n hasBackdrop: config.hasBackdrop,\n disposeOnNavigation: config.closeOnNavigation,\n maxWidth: '100%',\n scrollStrategy: config.scrollStrategy || this._overlay.scrollStrategies.block(),\n positionStrategy: this._overlay.position().global().centerHorizontally().bottom('0')\n });\n\n if (config.backdropClass) {\n overlayConfig.backdropClass = config.backdropClass;\n }\n\n return this._overlay.create(overlayConfig);\n }\n\n /**\n * Creates an injector to be used inside of a bottom sheet component.\n * @param config Config that was used to create the bottom sheet.\n * @param bottomSheetRef Reference to the bottom sheet.\n */\n private _createInjector<T>(config: MatBottomSheetConfig,\n bottomSheetRef: MatBottomSheetRef<T>): Injector {\n\n const userInjector = config && config.viewContainerRef && config.viewContainerRef.injector;\n const providers: StaticProvider[] = [\n {provide: MatBottomSheetRef, useValue: bottomSheetRef},\n {provide: MAT_BOTTOM_SHEET_DATA, useValue: config.data}\n ];\n\n if (config.direction && (!userInjector ||\n !userInjector.get<Directionality | null>(Directionality, null, InjectFlags.Optional))) {\n providers.push({\n provide: Directionality,\n useValue: {value: config.direction, change: observableOf()}\n });\n }\n\n return Injector.create({parent: userInjector || this._injector, providers});\n }\n}\n\n/**\n * Applies default options to the bottom sheet config.\n * @param defaults Object containing the default values to which to fall back.\n * @param config The configuration to which the defaults will be applied.\n * @returns The new configuration object with defaults applied.\n */\nfunction _applyConfigDefaults(defaults: MatBottomSheetConfig,\n config?: MatBottomSheetConfig): MatBottomSheetConfig {\n return {...defaults, ...config};\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './bottom-sheet-module';\nexport * from './bottom-sheet';\nexport * from './bottom-sheet-config';\nexport * from './bottom-sheet-container';\nexport * from './bottom-sheet-animations';\nexport * from './bottom-sheet-ref';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["observableOf"],"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;AAYA;MACa,qBAAqB,GAAG,IAAI,cAAc,CAAM,oBAAoB,EAAE;AAEnF;;;MAGa,oBAAoB;IAAjC;;QAWE,SAAI,GAAc,IAAI,CAAC;;QAGvB,gBAAW,GAAa,IAAI,CAAC;;QAM7B,iBAAY,GAAa,KAAK,CAAC;;QAG/B,cAAS,GAAmB,IAAI,CAAC;;;;;;QAOjC,sBAAiB,GAAa,IAAI,CAAC;;;;;QAMnC,cAAS,GAAa,KAAK,CAAC;;;;;QAM5B,iBAAY,GAAa,IAAI,CAAC;KAI/B;;;AChED;;;;;;;AAiBA;MACa,wBAAwB,GAEjC;;IAEF,gBAAgB,EAAE,OAAO,CAAC,OAAO,EAAE;QACjC,KAAK,CAAC,cAAc,EAAE,KAAK,CAAC,EAAC,SAAS,EAAE,kBAAkB,EAAC,CAAC,CAAC;QAC7D,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,EAAC,SAAS,EAAE,gBAAgB,EAAC,CAAC,CAAC;QACtD,UAAU,CAAC,oCAAoC,EAC3C,OAAO,CAAC,GAAG,kBAAkB,CAAC,OAAO,IAAI,eAAe,CAAC,kBAAkB,EAAE,CAAC,CAAC;QACnF,UAAU,CAAC,iBAAiB,EACxB,OAAO,CAAC,GAAG,kBAAkB,CAAC,OAAO,IAAI,eAAe,CAAC,kBAAkB,EAAE,CAAC,CAAC;KACpF,CAAC;;;AC7BJ;;;;;;;AAsCA;AAEA;;;;MA0Ba,uBAAwB,SAAQ,gBAAgB;IAwB3D,YACU,WAAoC,EACpC,kBAAqC,EACrC,iBAAmC,EAC3C,kBAAsC,EACR,QAAa;;IAEpC,iBAAuC;QAC9C,KAAK,EAAE,CAAC;QAPA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,GAAK,MAAM,EAAE;AAClC;;ACvNA;;;;;;;;ACAA;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"checkbox.js","sources":["../../../../../../src/material/checkbox/checkbox-config.ts","../../../../../../src/material/checkbox/checkbox.ts","../../../../../../src/material/checkbox/checkbox-required-validator.ts","../../../../../../src/material/checkbox/checkbox-module.ts","../../../../../../src/material/checkbox/public-api.ts","../../../../../../src/material/checkbox/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {InjectionToken} from '@angular/core';\nimport {ThemePalette} from '@angular/material/core';\n\n/** Default `mat-checkbox` options that can be overridden. */\nexport interface MatCheckboxDefaultOptions {\n /** Default theme color palette to be used for checkboxes. */\n color?: ThemePalette;\n /** Default checkbox click action for checkboxes. */\n clickAction?: MatCheckboxClickAction;\n}\n\n/** Injection token to be used to override the default options for `mat-checkbox`. */\nexport const MAT_CHECKBOX_DEFAULT_OPTIONS =\n new InjectionToken<MatCheckboxDefaultOptions>('mat-checkbox-default-options', {\n providedIn: 'root',\n factory: MAT_CHECKBOX_DEFAULT_OPTIONS_FACTORY\n });\n\n/** @docs-private */\nexport function MAT_CHECKBOX_DEFAULT_OPTIONS_FACTORY(): MatCheckboxDefaultOptions {\n return {\n color: 'accent',\n clickAction: 'check-indeterminate',\n };\n}\n\n/**\n * Checkbox click action when user click on input element.\n * noop: Do not toggle checked or indeterminate.\n * check: Only toggle checked status, ignore indeterminate.\n * check-indeterminate: Toggle checked status, set indeterminate to false. Default behavior.\n * undefined: Same as `check-indeterminate`.\n */\nexport type MatCheckboxClickAction = 'noop' | 'check' | 'check-indeterminate' | undefined;\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 {FocusableOption, FocusMonitor, FocusOrigin} from '@angular/cdk/a11y';\nimport {BooleanInput, coerceBooleanProperty, NumberInput} from '@angular/cdk/coercion';\nimport {\n AfterViewChecked,\n Attribute,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n forwardRef,\n Inject,\n Input,\n NgZone,\n OnDestroy,\n Optional,\n Output,\n ViewChild,\n ViewEncapsulation,\n AfterViewInit,\n} from '@angular/core';\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from '@angular/forms';\nimport {\n CanColor,\n CanDisable,\n CanDisableRipple,\n HasTabIndex,\n MatRipple,\n mixinColor,\n mixinDisabled,\n mixinDisableRipple,\n mixinTabIndex,\n} from '@angular/material/core';\nimport {ANIMATION_MODULE_TYPE} from '@angular/platform-browser/animations';\nimport {\n MAT_CHECKBOX_DEFAULT_OPTIONS,\n MatCheckboxDefaultOptions,\n MAT_CHECKBOX_DEFAULT_OPTIONS_FACTORY,\n} from './checkbox-config';\n\n\n// Increasing integer for generating unique ids for checkbox components.\nlet nextUniqueId = 0;\n\n// Default checkbox configuration.\nconst defaults = MAT_CHECKBOX_DEFAULT_OPTIONS_FACTORY();\n\n/**\n * Provider Expression that allows mat-checkbox to register as a ControlValueAccessor.\n * This allows it to support [(ngModel)].\n * @docs-private\n */\nexport const MAT_CHECKBOX_CONTROL_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => MatCheckbox),\n multi: true\n};\n\n/**\n * Represents the different states that require custom transitions between them.\n * @docs-private\n */\nexport const enum TransitionCheckState {\n /** The initial state of the component before any user interaction. */\n Init,\n /** The state representing the component when it's becoming checked. */\n Checked,\n /** The state representing the component when it's becoming unchecked. */\n Unchecked,\n /** The state representing the component when it's becoming indeterminate. */\n Indeterminate\n}\n\n/** Change event object emitted by MatCheckbox. */\nexport class MatCheckboxChange {\n /** The source MatCheckbox of the event. */\n source: MatCheckbox;\n /** The new `checked` value of the checkbox. */\n checked: boolean;\n}\n\n// Boilerplate for applying mixins to MatCheckbox.\n/** @docs-private */\nconst _MatCheckboxBase = mixinTabIndex(mixinColor(mixinDisableRipple(mixinDisabled(class {\n constructor(public _elementRef: ElementRef) {}\n}))));\n\n\n/**\n * A material design checkbox component. Supports all of the functionality of an HTML5 checkbox,\n * and exposes a similar API. A MatCheckbox can be either checked, unchecked, indeterminate, or\n * disabled. Note that all additional accessibility attributes are taken care of by the component,\n * so there is no need to provide them yourself. However, if you want to omit a label and still\n * have the checkbox be accessible, you may supply an [aria-label] input.\n * See: https://material.io/design/components/selection-controls.html\n */\n@Component({\n selector: 'mat-checkbox',\n templateUrl: 'checkbox.html',\n styleUrls: ['checkbox.css'],\n exportAs: 'matCheckbox',\n host: {\n 'class': 'mat-checkbox',\n '[id]': 'id',\n '[attr.tabindex]': 'null',\n '[class.mat-checkbox-indeterminate]': 'indeterminate',\n '[class.mat-checkbox-checked]': 'checked',\n '[class.mat-checkbox-disabled]': 'disabled',\n '[class.mat-checkbox-label-before]': 'labelPosition == \"before\"',\n '[class._mat-animation-noopable]': `_animationMode === 'NoopAnimations'`,\n },\n providers: [MAT_CHECKBOX_CONTROL_VALUE_ACCESSOR],\n inputs: ['disableRipple', 'color', 'tabIndex'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class MatCheckbox extends _MatCheckboxBase implements ControlValueAccessor,\n AfterViewInit, AfterViewChecked, OnDestroy, CanColor, CanDisable, HasTabIndex, CanDisableRipple,\n FocusableOption {\n\n /**\n * Attached to the aria-label attribute of the host element. In most cases, aria-labelledby will\n * take precedence so this may be omitted.\n */\n @Input('aria-label') ariaLabel: string = '';\n\n /**\n * Users can specify the `aria-labelledby` attribute which will be forwarded to the input element\n */\n @Input('aria-labelledby') ariaLabelledby: string | null = null;\n\n /** The 'aria-describedby' attribute is read after the element's label and field type. */\n @Input('aria-describedby') ariaDescribedby: string;\n\n private _uniqueId: string = `mat-checkbox-${++nextUniqueId}`;\n\n /** A unique id for the checkbox input. If none is supplied, it will be auto-generated. */\n @Input() id: string = this._uniqueId;\n\n /** Returns the unique id for the visual hidden input. */\n get inputId(): string { return `${this.id || this._uniqueId}-input`; }\n\n /** Whether the checkbox is required. */\n @Input()\n get required(): boolean { return this._required; }\n set required(value: boolean) { this._required = coerceBooleanProperty(value); }\n private _required: boolean;\n\n /** Whether the label should appear after or before the checkbox. Defaults to 'after' */\n @Input() labelPosition: 'before' | 'after' = 'after';\n\n /** Name value will be applied to the input element if present */\n @Input() name: string | null = null;\n\n /** Event emitted when the checkbox's `checked` value changes. */\n @Output() readonly change: EventEmitter<MatCheckboxChange> =\n new EventEmitter<MatCheckboxChange>();\n\n /** Event emitted when the checkbox's `indeterminate` value changes. */\n @Output() readonly indeterminateChange: EventEmitter<boolean> = new EventEmitter<boolean>();\n\n /** The value attribute of the native input element */\n @Input() value: string;\n\n /** The native `<input type=\"checkbox\">` element */\n @ViewChild('input') _inputElement: ElementRef<HTMLInputElement>;\n\n /** Reference to the ripple instance of the checkbox. */\n @ViewChild(MatRipple) ripple: MatRipple;\n\n /**\n * Called when the checkbox is blurred. Needed to properly implement ControlValueAccessor.\n * @docs-private\n */\n _onTouched: () => any = () => {};\n\n private _currentAnimationClass: string = '';\n\n private _currentCheckState: TransitionCheckState = TransitionCheckState.Init;\n\n private _controlValueAccessorChangeFn: (value: any) => void = () => {};\n\n constructor(elementRef: ElementRef<HTMLElement>,\n private _changeDetectorRef: ChangeDetectorRef,\n private _focusMonitor: FocusMonitor,\n private _ngZone: NgZone,\n @Attribute('tabindex') tabIndex: string,\n @Optional() @Inject(ANIMATION_MODULE_TYPE) public _animationMode?: string,\n @Optional() @Inject(MAT_CHECKBOX_DEFAULT_OPTIONS)\n private _options?: MatCheckboxDefaultOptions) {\n super(elementRef);\n this._options = this._options || defaults;\n this.color = this.defaultColor = this._options.color || defaults.color;\n this.tabIndex = parseInt(tabIndex) || 0;\n }\n\n ngAfterViewInit() {\n this._focusMonitor.monitor(this._elementRef, true).subscribe(focusOrigin => {\n if (!focusOrigin) {\n // When a focused element becomes disabled, the browser *immediately* fires a blur event.\n // Angular does not expect events to be raised during change detection, so any state change\n // (such as a form control's 'ng-touched') will cause a changed-after-checked error.\n // See https://github.com/angular/angular/issues/17793. To work around this, we defer\n // telling the form control it has been touched until the next tick.\n Promise.resolve().then(() => {\n this._onTouched();\n this._changeDetectorRef.markForCheck();\n });\n }\n });\n\n this._syncIndeterminate(this._indeterminate);\n }\n\n // TODO: Delete next major revision.\n ngAfterViewChecked() {}\n\n ngOnDestroy() {\n this._focusMonitor.stopMonitoring(this._elementRef);\n }\n\n /**\n * Whether the checkbox is checked.\n */\n @Input()\n get checked(): boolean { return this._checked; }\n set checked(value: boolean) {\n if (value != this.checked) {\n this._checked = value;\n this._changeDetectorRef.markForCheck();\n }\n }\n private _checked: boolean = false;\n\n /**\n * Whether the checkbox is disabled. This fully overrides the implementation provided by\n * mixinDisabled, but the mixin is still required because mixinTabIndex requires it.\n */\n @Input()\n get disabled() { return this._disabled; }\n set disabled(value: any) {\n const newValue = coerceBooleanProperty(value);\n\n if (newValue !== this.disabled) {\n this._disabled = newValue;\n this._changeDetectorRef.markForCheck();\n }\n }\n private _disabled: boolean = false;\n\n /**\n * Whether the checkbox is indeterminate. This is also known as \"mixed\" mode and can be used to\n * represent a checkbox with three states, e.g. a checkbox that represents a nested list of\n * checkable items. Note that whenever checkbox is manually clicked, indeterminate is immediately\n * set to false.\n */\n @Input()\n get indeterminate(): boolean { return this._indeterminate; }\n set indeterminate(value: boolean) {\n const changed = value != this._indeterminate;\n this._indeterminate = coerceBooleanProperty(value);\n\n if (changed) {\n if (this._indeterminate) {\n this._transitionCheckState(TransitionCheckState.Indeterminate);\n } else {\n this._transitionCheckState(\n this.checked ? TransitionCheckState.Checked : TransitionCheckState.Unchecked);\n }\n this.indeterminateChange.emit(this._indeterminate);\n }\n\n this._syncIndeterminate(this._indeterminate);\n }\n private _indeterminate: boolean = false;\n\n _isRippleDisabled() {\n return this.disableRipple || this.disabled;\n }\n\n /** Method being called whenever the label text changes. */\n _onLabelTextChange() {\n // Since the event of the `cdkObserveContent` directive runs outside of the zone, the checkbox\n // component will be only marked for check, but no actual change detection runs automatically.\n // Instead of going back into the zone in order to trigger a change detection which causes\n // *all* components to be checked (if explicitly marked or not using OnPush), we only trigger\n // an explicit change detection for the checkbox view and its children.\n this._changeDetectorRef.detectChanges();\n }\n\n // Implemented as part of ControlValueAccessor.\n writeValue(value: any) {\n this.checked = !!value;\n }\n\n // Implemented as part of ControlValueAccessor.\n registerOnChange(fn: (value: any) => void) {\n this._controlValueAccessorChangeFn = fn;\n }\n\n // Implemented as part of ControlValueAccessor.\n registerOnTouched(fn: any) {\n this._onTouched = fn;\n }\n\n // Implemented as part of ControlValueAccessor.\n setDisabledState(isDisabled: boolean) {\n this.disabled = isDisabled;\n }\n\n _getAriaChecked(): 'true' | 'false' | 'mixed' {\n if (this.checked) {\n return 'true';\n }\n\n return this.indeterminate ? 'mixed' : 'false';\n }\n\n private _transitionCheckState(newState: TransitionCheckState) {\n let oldState = this._currentCheckState;\n let element: HTMLElement = this._elementRef.nativeElement;\n\n if (oldState === newState) {\n return;\n }\n if (this._currentAnimationClass.length > 0) {\n element.classList.remove(this._currentAnimationClass);\n }\n\n this._currentAnimationClass = this._getAnimationClassForCheckStateTransition(\n oldState, newState);\n this._currentCheckState = newState;\n\n if (this._currentAnimationClass.length > 0) {\n element.classList.add(this._currentAnimationClass);\n\n // Remove the animation class to avoid animation when the checkbox is moved between containers\n const animationClass = this._currentAnimationClass;\n\n this._ngZone.runOutsideAngular(() => {\n setTimeout(() => {\n element.classList.remove(animationClass);\n }, 1000);\n });\n }\n }\n\n private _emitChangeEvent() {\n const event = new MatCheckboxChange();\n event.source = this;\n event.checked = this.checked;\n\n this._controlValueAccessorChangeFn(this.checked);\n this.change.emit(event);\n\n // Assigning the value again here is redundant, but we have to do it in case it was\n // changed inside the `change` listener which will cause the input to be out of sync.\n if (this._inputElement) {\n this._inputElement.nativeElement.checked = this.checked;\n }\n }\n\n /** Toggles the `checked` state of the checkbox. */\n toggle(): void {\n this.checked = !this.checked;\n }\n\n /**\n * Event handler for checkbox input element.\n * Toggles checked state if element is not disabled.\n * Do not toggle on (change) event since IE doesn't fire change event when\n * indeterminate checkbox is clicked.\n * @param event\n */\n _onInputClick(event: Event) {\n const clickAction = this._options?.clickAction;\n\n // We have to stop propagation for click events on the visual hidden input element.\n // By default, when a user clicks on a label element, a generated click event will be\n // dispatched on the associated input element. Since we are using a label element as our\n // root container, the click event on the `checkbox` will be executed twice.\n // The real click event will bubble up, and the generated click event also tries to bubble up.\n // This will lead to multiple click events.\n // Preventing bubbling for the second event will solve that issue.\n event.stopPropagation();\n\n // If resetIndeterminate is false, and the current state is indeterminate, do nothing on click\n if (!this.disabled && clickAction !== 'noop') {\n // When user manually click on the checkbox, `indeterminate` is set to false.\n if (this.indeterminate && clickAction !== 'check') {\n\n Promise.resolve().then(() => {\n this._indeterminate = false;\n this.indeterminateChange.emit(this._indeterminate);\n });\n }\n\n this.toggle();\n this._transitionCheckState(\n this._checked ? TransitionCheckState.Checked : TransitionCheckState.Unchecked);\n\n // Emit our custom change event if the native input emitted one.\n // It is important to only emit it, if the native input triggered one, because\n // we don't want to trigger a change event, when the `checked` variable changes for example.\n this._emitChangeEvent();\n } else if (!this.disabled && clickAction === 'noop') {\n // Reset native input when clicked with noop. The native checkbox becomes checked after\n // click, reset it to be align with `checked` value of `mat-checkbox`.\n this._inputElement.nativeElement.checked = this.checked;\n this._inputElement.nativeElement.indeterminate = this.indeterminate;\n }\n }\n\n /** Focuses the checkbox. */\n focus(origin?: FocusOrigin, options?: FocusOptions): void {\n if (origin) {\n this._focusMonitor.focusVia(this._inputElement, origin, options);\n } else {\n this._inputElement.nativeElement.focus(options);\n }\n }\n\n _onInteractionEvent(event: Event) {\n // We always have to stop propagation on the change event.\n // Otherwise the change event, from the input element, will bubble up and\n // emit its event object to the `change` output.\n event.stopPropagation();\n }\n\n private _getAnimationClassForCheckStateTransition(\n oldState: TransitionCheckState, newState: TransitionCheckState): string {\n // Don't transition if animations are disabled.\n if (this._animationMode === 'NoopAnimations') {\n return '';\n }\n\n let animSuffix: string = '';\n\n switch (oldState) {\n case TransitionCheckState.Init:\n // Handle edge case where user interacts with checkbox that does not have [(ngModel)] or\n // [checked] bound to it.\n if (newState === TransitionCheckState.Checked) {\n animSuffix = 'unchecked-checked';\n } else if (newState == TransitionCheckState.Indeterminate) {\n animSuffix = 'unchecked-indeterminate';\n } else {\n return '';\n }\n break;\n case TransitionCheckState.Unchecked:\n animSuffix = newState === TransitionCheckState.Checked ?\n 'unchecked-checked' : 'unchecked-indeterminate';\n break;\n case TransitionCheckState.Checked:\n animSuffix = newState === TransitionCheckState.Unchecked ?\n 'checked-unchecked' : 'checked-indeterminate';\n break;\n case TransitionCheckState.Indeterminate:\n animSuffix = newState === TransitionCheckState.Checked ?\n 'indeterminate-checked' : 'indeterminate-unchecked';\n break;\n }\n\n return `mat-checkbox-anim-${animSuffix}`;\n }\n\n /**\n * Syncs the indeterminate value with the checkbox DOM node.\n *\n * We sync `indeterminate` directly on the DOM node, because in Ivy the check for whether a\n * property is supported on an element boils down to `if (propName in element)`. Domino's\n * HTMLInputElement doesn't have an `indeterminate` property so Ivy will warn during\n * server-side rendering.\n */\n private _syncIndeterminate(value: boolean) {\n const nativeCheckbox = this._inputElement;\n\n if (nativeCheckbox) {\n nativeCheckbox.nativeElement.indeterminate = value;\n }\n }\n\n static ngAcceptInputType_disabled: BooleanInput;\n static ngAcceptInputType_required: BooleanInput;\n static ngAcceptInputType_disableRipple: BooleanInput;\n static ngAcceptInputType_indeterminate: BooleanInput;\n static ngAcceptInputType_tabIndex: NumberInput;\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 Directive,\n forwardRef,\n Provider,\n} from '@angular/core';\nimport {\n CheckboxRequiredValidator,\n NG_VALIDATORS,\n} from '@angular/forms';\n\nexport const MAT_CHECKBOX_REQUIRED_VALIDATOR: Provider = {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => MatCheckboxRequiredValidator),\n multi: true\n};\n\n/**\n * Validator for Material checkbox's required attribute in template-driven checkbox.\n * Current CheckboxRequiredValidator only work with `input type=checkbox` and does not\n * work with `mat-checkbox`.\n */\n@Directive({\n selector: `mat-checkbox[required][formControlName],\n mat-checkbox[required][formControl], mat-checkbox[required][ngModel]`,\n providers: [MAT_CHECKBOX_REQUIRED_VALIDATOR],\n})\nexport class MatCheckboxRequiredValidator extends CheckboxRequiredValidator {}\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 {ObserversModule} from '@angular/cdk/observers';\nimport {NgModule} from '@angular/core';\nimport {MatCommonModule, MatRippleModule} from '@angular/material/core';\nimport {MatCheckbox} from './checkbox';\nimport {MatCheckboxRequiredValidator} from './checkbox-required-validator';\n\n/** This module is used by both original and MDC-based checkbox implementations. */\n@NgModule({\n exports: [MatCheckboxRequiredValidator],\n declarations: [MatCheckboxRequiredValidator],\n})\nexport class _MatCheckboxRequiredValidatorModule {\n}\n\n@NgModule({\n imports: [\n MatRippleModule, MatCommonModule, ObserversModule,\n _MatCheckboxRequiredValidatorModule\n ],\n exports: [MatCheckbox, MatCommonModule, _MatCheckboxRequiredValidatorModule],\n declarations: [MatCheckbox],\n})\nexport class MatCheckboxModule {\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './checkbox';\nexport * from './checkbox-config';\nexport * from './checkbox-module';\nexport * from './checkbox-required-validator';\n\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;AAAA;;;;;;;AAkBA;MACa,4BAA4B,GACrC,IAAI,cAA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AGjB,SAAS,SAAC,SAAS;sBAwDnB,KAAK;uBAcL,KAAK;4BAkBL,KAAK;;;ACxQR;;;;;;;MAkBa,+BAA+B,GAAa;IACvD,OAAO,EAAE,aAAa;IACtB,WAAW,EAAE,UAAU,CAAC,MAAM,4BAA4B,CAAC;IAC3D,KAAK,EAAE,IAAI;EACX;AAEF;;;;;MAUa,4BAA6B,SAAQ,yBAAyB;;;YAL1E,SAAS,SAAC;gBACT,QAAQ,EAAE;kFACsE;gBAChF,SAAS,EAAE,CAAC,+BAA+B,CAAC;aAC7C;;;ACjCD;;;;;;;AAcA;MAKa,mCAAmC;;;YAJ/C,QAAQ,SAAC;gBACR,OAAO,EAAE,CAAC,4BAA4B,CAAC;gBACvC,YAAY,EAAE,CAAC,4BAA4B,CAAC;aAC7C;;MAYY,iBAAiB;;;YAR7B,QAAQ,SAAC;gBACR,OAAO,EAAE;oBACP,eAAe,EAAE,eAAe,EAAE,eAAe;oBACjD,mCAAmC;iBACpC;gBACD,OAAO,EAAE,CAAC,WAAW,EAAE,eAAe,EAAE,mCAAmC,CAAC;gBAC5E,YAAY,EAAE,CAAC,WAAW,CAAC;aAC5B;;;AC7BD;;;;;;;;ACAA;;;;;;"}
1
+ {"version":3,"file":"checkbox.js","sources":["../../../../../../src/material/checkbox/checkbox-config.ts","../../../../../../src/material/checkbox/checkbox.ts","../../../../../../src/material/checkbox/checkbox-required-validator.ts","../../../../../../src/material/checkbox/checkbox-module.ts","../../../../../../src/material/checkbox/public-api.ts","../../../../../../src/material/checkbox/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {InjectionToken} from '@angular/core';\nimport {ThemePalette} from '@angular/material/core';\n\n/** Default `mat-checkbox` options that can be overridden. */\nexport interface MatCheckboxDefaultOptions {\n /** Default theme color palette to be used for checkboxes. */\n color?: ThemePalette;\n /** Default checkbox click action for checkboxes. */\n clickAction?: MatCheckboxClickAction;\n}\n\n/** Injection token to be used to override the default options for `mat-checkbox`. */\nexport const MAT_CHECKBOX_DEFAULT_OPTIONS =\n new InjectionToken<MatCheckboxDefaultOptions>('mat-checkbox-default-options', {\n providedIn: 'root',\n factory: MAT_CHECKBOX_DEFAULT_OPTIONS_FACTORY\n });\n\n/** @docs-private */\nexport function MAT_CHECKBOX_DEFAULT_OPTIONS_FACTORY(): MatCheckboxDefaultOptions {\n return {\n color: 'accent',\n clickAction: 'check-indeterminate',\n };\n}\n\n/**\n * Checkbox click action when user click on input element.\n * noop: Do not toggle checked or indeterminate.\n * check: Only toggle checked status, ignore indeterminate.\n * check-indeterminate: Toggle checked status, set indeterminate to false. Default behavior.\n * undefined: Same as `check-indeterminate`.\n */\nexport type MatCheckboxClickAction = 'noop' | 'check' | 'check-indeterminate' | undefined;\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 {FocusableOption, FocusMonitor, FocusOrigin} from '@angular/cdk/a11y';\nimport {BooleanInput, coerceBooleanProperty, NumberInput} from '@angular/cdk/coercion';\nimport {\n AfterViewChecked,\n Attribute,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n forwardRef,\n Inject,\n Input,\n NgZone,\n OnDestroy,\n Optional,\n Output,\n ViewChild,\n ViewEncapsulation,\n AfterViewInit,\n} from '@angular/core';\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from '@angular/forms';\nimport {\n CanColor,\n CanDisable,\n CanDisableRipple,\n HasTabIndex,\n MatRipple,\n mixinColor,\n mixinDisabled,\n mixinDisableRipple,\n mixinTabIndex,\n} from '@angular/material/core';\nimport {ANIMATION_MODULE_TYPE} from '@angular/platform-browser/animations';\nimport {\n MAT_CHECKBOX_DEFAULT_OPTIONS,\n MatCheckboxDefaultOptions,\n MAT_CHECKBOX_DEFAULT_OPTIONS_FACTORY,\n} from './checkbox-config';\n\n\n// Increasing integer for generating unique ids for checkbox components.\nlet nextUniqueId = 0;\n\n// Default checkbox configuration.\nconst defaults = MAT_CHECKBOX_DEFAULT_OPTIONS_FACTORY();\n\n/**\n * Provider Expression that allows mat-checkbox to register as a ControlValueAccessor.\n * This allows it to support [(ngModel)].\n * @docs-private\n */\nexport const MAT_CHECKBOX_CONTROL_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => MatCheckbox),\n multi: true\n};\n\n/**\n * Represents the different states that require custom transitions between them.\n * @docs-private\n */\nexport const enum TransitionCheckState {\n /** The initial state of the component before any user interaction. */\n Init,\n /** The state representing the component when it's becoming checked. */\n Checked,\n /** The state representing the component when it's becoming unchecked. */\n Unchecked,\n /** The state representing the component when it's becoming indeterminate. */\n Indeterminate\n}\n\n/** Change event object emitted by MatCheckbox. */\nexport class MatCheckboxChange {\n /** The source MatCheckbox of the event. */\n source: MatCheckbox;\n /** The new `checked` value of the checkbox. */\n checked: boolean;\n}\n\n// Boilerplate for applying mixins to MatCheckbox.\n/** @docs-private */\nconst _MatCheckboxBase = mixinTabIndex(mixinColor(mixinDisableRipple(mixinDisabled(class {\n constructor(public _elementRef: ElementRef) {}\n}))));\n\n\n/**\n * A material design checkbox component. Supports all of the functionality of an HTML5 checkbox,\n * and exposes a similar API. A MatCheckbox can be either checked, unchecked, indeterminate, or\n * disabled. Note that all additional accessibility attributes are taken care of by the component,\n * so there is no need to provide them yourself. However, if you want to omit a label and still\n * have the checkbox be accessible, you may supply an [aria-label] input.\n * See: https://material.io/design/components/selection-controls.html\n */\n@Component({\n selector: 'mat-checkbox',\n templateUrl: 'checkbox.html',\n styleUrls: ['checkbox.css'],\n exportAs: 'matCheckbox',\n host: {\n 'class': 'mat-checkbox',\n '[id]': 'id',\n '[attr.tabindex]': 'null',\n '[class.mat-checkbox-indeterminate]': 'indeterminate',\n '[class.mat-checkbox-checked]': 'checked',\n '[class.mat-checkbox-disabled]': 'disabled',\n '[class.mat-checkbox-label-before]': 'labelPosition == \"before\"',\n '[class._mat-animation-noopable]': `_animationMode === 'NoopAnimations'`,\n },\n providers: [MAT_CHECKBOX_CONTROL_VALUE_ACCESSOR],\n inputs: ['disableRipple', 'color', 'tabIndex'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class MatCheckbox extends _MatCheckboxBase implements ControlValueAccessor,\n AfterViewInit, AfterViewChecked, OnDestroy, CanColor, CanDisable, HasTabIndex, CanDisableRipple,\n FocusableOption {\n\n /**\n * Attached to the aria-label attribute of the host element. In most cases, aria-labelledby will\n * take precedence so this may be omitted.\n */\n @Input('aria-label') ariaLabel: string = '';\n\n /**\n * Users can specify the `aria-labelledby` attribute which will be forwarded to the input element\n */\n @Input('aria-labelledby') ariaLabelledby: string | null = null;\n\n /** The 'aria-describedby' attribute is read after the element's label and field type. */\n @Input('aria-describedby') ariaDescribedby: string;\n\n private _uniqueId: string = `mat-checkbox-${++nextUniqueId}`;\n\n /** A unique id for the checkbox input. If none is supplied, it will be auto-generated. */\n @Input() id: string = this._uniqueId;\n\n /** Returns the unique id for the visual hidden input. */\n get inputId(): string { return `${this.id || this._uniqueId}-input`; }\n\n /** Whether the checkbox is required. */\n @Input()\n get required(): boolean { return this._required; }\n set required(value: boolean) { this._required = coerceBooleanProperty(value); }\n private _required: boolean;\n\n /** Whether the label should appear after or before the checkbox. Defaults to 'after' */\n @Input() labelPosition: 'before' | 'after' = 'after';\n\n /** Name value will be applied to the input element if present */\n @Input() name: string | null = null;\n\n /** Event emitted when the checkbox's `checked` value changes. */\n @Output() readonly change: EventEmitter<MatCheckboxChange> =\n new EventEmitter<MatCheckboxChange>();\n\n /** Event emitted when the checkbox's `indeterminate` value changes. */\n @Output() readonly indeterminateChange: EventEmitter<boolean> = new EventEmitter<boolean>();\n\n /** The value attribute of the native input element */\n @Input() value: string;\n\n /** The native `<input type=\"checkbox\">` element */\n @ViewChild('input') _inputElement: ElementRef<HTMLInputElement>;\n\n /** Reference to the ripple instance of the checkbox. */\n @ViewChild(MatRipple) ripple: MatRipple;\n\n /**\n * Called when the checkbox is blurred. Needed to properly implement ControlValueAccessor.\n * @docs-private\n */\n _onTouched: () => any = () => {};\n\n private _currentAnimationClass: string = '';\n\n private _currentCheckState: TransitionCheckState = TransitionCheckState.Init;\n\n private _controlValueAccessorChangeFn: (value: any) => void = () => {};\n\n constructor(elementRef: ElementRef<HTMLElement>,\n private _changeDetectorRef: ChangeDetectorRef,\n private _focusMonitor: FocusMonitor,\n private _ngZone: NgZone,\n @Attribute('tabindex') tabIndex: string,\n @Optional() @Inject(ANIMATION_MODULE_TYPE) public _animationMode?: string,\n @Optional() @Inject(MAT_CHECKBOX_DEFAULT_OPTIONS)\n private _options?: MatCheckboxDefaultOptions) {\n super(elementRef);\n this._options = this._options || defaults;\n this.color = this.defaultColor = this._options.color || defaults.color;\n this.tabIndex = parseInt(tabIndex) || 0;\n }\n\n ngAfterViewInit() {\n this._focusMonitor.monitor(this._elementRef, true).subscribe(focusOrigin => {\n if (!focusOrigin) {\n // When a focused element becomes disabled, the browser *immediately* fires a blur event.\n // Angular does not expect events to be raised during change detection, so any state change\n // (such as a form control's 'ng-touched') will cause a changed-after-checked error.\n // See https://github.com/angular/angular/issues/17793. To work around this, we defer\n // telling the form control it has been touched until the next tick.\n Promise.resolve().then(() => {\n this._onTouched();\n this._changeDetectorRef.markForCheck();\n });\n }\n });\n\n this._syncIndeterminate(this._indeterminate);\n }\n\n // TODO: Delete next major revision.\n ngAfterViewChecked() {}\n\n ngOnDestroy() {\n this._focusMonitor.stopMonitoring(this._elementRef);\n }\n\n /**\n * Whether the checkbox is checked.\n */\n @Input()\n get checked(): boolean { return this._checked; }\n set checked(value: boolean) {\n if (value != this.checked) {\n this._checked = value;\n this._changeDetectorRef.markForCheck();\n }\n }\n private _checked: boolean = false;\n\n /**\n * Whether the checkbox is disabled. This fully overrides the implementation provided by\n * mixinDisabled, but the mixin is still required because mixinTabIndex requires it.\n */\n @Input()\n override get disabled() { return this._disabled; }\n override set disabled(value: any) {\n const newValue = coerceBooleanProperty(value);\n\n if (newValue !== this.disabled) {\n this._disabled = newValue;\n this._changeDetectorRef.markForCheck();\n }\n }\n private _disabled: boolean = false;\n\n /**\n * Whether the checkbox is indeterminate. This is also known as \"mixed\" mode and can be used to\n * represent a checkbox with three states, e.g. a checkbox that represents a nested list of\n * checkable items. Note that whenever checkbox is manually clicked, indeterminate is immediately\n * set to false.\n */\n @Input()\n get indeterminate(): boolean { return this._indeterminate; }\n set indeterminate(value: boolean) {\n const changed = value != this._indeterminate;\n this._indeterminate = coerceBooleanProperty(value);\n\n if (changed) {\n if (this._indeterminate) {\n this._transitionCheckState(TransitionCheckState.Indeterminate);\n } else {\n this._transitionCheckState(\n this.checked ? TransitionCheckState.Checked : TransitionCheckState.Unchecked);\n }\n this.indeterminateChange.emit(this._indeterminate);\n }\n\n this._syncIndeterminate(this._indeterminate);\n }\n private _indeterminate: boolean = false;\n\n _isRippleDisabled() {\n return this.disableRipple || this.disabled;\n }\n\n /** Method being called whenever the label text changes. */\n _onLabelTextChange() {\n // Since the event of the `cdkObserveContent` directive runs outside of the zone, the checkbox\n // component will be only marked for check, but no actual change detection runs automatically.\n // Instead of going back into the zone in order to trigger a change detection which causes\n // *all* components to be checked (if explicitly marked or not using OnPush), we only trigger\n // an explicit change detection for the checkbox view and its children.\n this._changeDetectorRef.detectChanges();\n }\n\n // Implemented as part of ControlValueAccessor.\n writeValue(value: any) {\n this.checked = !!value;\n }\n\n // Implemented as part of ControlValueAccessor.\n registerOnChange(fn: (value: any) => void) {\n this._controlValueAccessorChangeFn = fn;\n }\n\n // Implemented as part of ControlValueAccessor.\n registerOnTouched(fn: any) {\n this._onTouched = fn;\n }\n\n // Implemented as part of ControlValueAccessor.\n setDisabledState(isDisabled: boolean) {\n this.disabled = isDisabled;\n }\n\n _getAriaChecked(): 'true' | 'false' | 'mixed' {\n if (this.checked) {\n return 'true';\n }\n\n return this.indeterminate ? 'mixed' : 'false';\n }\n\n private _transitionCheckState(newState: TransitionCheckState) {\n let oldState = this._currentCheckState;\n let element: HTMLElement = this._elementRef.nativeElement;\n\n if (oldState === newState) {\n return;\n }\n if (this._currentAnimationClass.length > 0) {\n element.classList.remove(this._currentAnimationClass);\n }\n\n this._currentAnimationClass = this._getAnimationClassForCheckStateTransition(\n oldState, newState);\n this._currentCheckState = newState;\n\n if (this._currentAnimationClass.length > 0) {\n element.classList.add(this._currentAnimationClass);\n\n // Remove the animation class to avoid animation when the checkbox is moved between containers\n const animationClass = this._currentAnimationClass;\n\n this._ngZone.runOutsideAngular(() => {\n setTimeout(() => {\n element.classList.remove(animationClass);\n }, 1000);\n });\n }\n }\n\n private _emitChangeEvent() {\n const event = new MatCheckboxChange();\n event.source = this;\n event.checked = this.checked;\n\n this._controlValueAccessorChangeFn(this.checked);\n this.change.emit(event);\n\n // Assigning the value again here is redundant, but we have to do it in case it was\n // changed inside the `change` listener which will cause the input to be out of sync.\n if (this._inputElement) {\n this._inputElement.nativeElement.checked = this.checked;\n }\n }\n\n /** Toggles the `checked` state of the checkbox. */\n toggle(): void {\n this.checked = !this.checked;\n }\n\n /**\n * Event handler for checkbox input element.\n * Toggles checked state if element is not disabled.\n * Do not toggle on (change) event since IE doesn't fire change event when\n * indeterminate checkbox is clicked.\n * @param event\n */\n _onInputClick(event: Event) {\n const clickAction = this._options?.clickAction;\n\n // We have to stop propagation for click events on the visual hidden input element.\n // By default, when a user clicks on a label element, a generated click event will be\n // dispatched on the associated input element. Since we are using a label element as our\n // root container, the click event on the `checkbox` will be executed twice.\n // The real click event will bubble up, and the generated click event also tries to bubble up.\n // This will lead to multiple click events.\n // Preventing bubbling for the second event will solve that issue.\n event.stopPropagation();\n\n // If resetIndeterminate is false, and the current state is indeterminate, do nothing on click\n if (!this.disabled && clickAction !== 'noop') {\n // When user manually click on the checkbox, `indeterminate` is set to false.\n if (this.indeterminate && clickAction !== 'check') {\n\n Promise.resolve().then(() => {\n this._indeterminate = false;\n this.indeterminateChange.emit(this._indeterminate);\n });\n }\n\n this.toggle();\n this._transitionCheckState(\n this._checked ? TransitionCheckState.Checked : TransitionCheckState.Unchecked);\n\n // Emit our custom change event if the native input emitted one.\n // It is important to only emit it, if the native input triggered one, because\n // we don't want to trigger a change event, when the `checked` variable changes for example.\n this._emitChangeEvent();\n } else if (!this.disabled && clickAction === 'noop') {\n // Reset native input when clicked with noop. The native checkbox becomes checked after\n // click, reset it to be align with `checked` value of `mat-checkbox`.\n this._inputElement.nativeElement.checked = this.checked;\n this._inputElement.nativeElement.indeterminate = this.indeterminate;\n }\n }\n\n /** Focuses the checkbox. */\n focus(origin?: FocusOrigin, options?: FocusOptions): void {\n if (origin) {\n this._focusMonitor.focusVia(this._inputElement, origin, options);\n } else {\n this._inputElement.nativeElement.focus(options);\n }\n }\n\n _onInteractionEvent(event: Event) {\n // We always have to stop propagation on the change event.\n // Otherwise the change event, from the input element, will bubble up and\n // emit its event object to the `change` output.\n event.stopPropagation();\n }\n\n private _getAnimationClassForCheckStateTransition(\n oldState: TransitionCheckState, newState: TransitionCheckState): string {\n // Don't transition if animations are disabled.\n if (this._animationMode === 'NoopAnimations') {\n return '';\n }\n\n let animSuffix: string = '';\n\n switch (oldState) {\n case TransitionCheckState.Init:\n // Handle edge case where user interacts with checkbox that does not have [(ngModel)] or\n // [checked] bound to it.\n if (newState === TransitionCheckState.Checked) {\n animSuffix = 'unchecked-checked';\n } else if (newState == TransitionCheckState.Indeterminate) {\n animSuffix = 'unchecked-indeterminate';\n } else {\n return '';\n }\n break;\n case TransitionCheckState.Unchecked:\n animSuffix = newState === TransitionCheckState.Checked ?\n 'unchecked-checked' : 'unchecked-indeterminate';\n break;\n case TransitionCheckState.Checked:\n animSuffix = newState === TransitionCheckState.Unchecked ?\n 'checked-unchecked' : 'checked-indeterminate';\n break;\n case TransitionCheckState.Indeterminate:\n animSuffix = newState === TransitionCheckState.Checked ?\n 'indeterminate-checked' : 'indeterminate-unchecked';\n break;\n }\n\n return `mat-checkbox-anim-${animSuffix}`;\n }\n\n /**\n * Syncs the indeterminate value with the checkbox DOM node.\n *\n * We sync `indeterminate` directly on the DOM node, because in Ivy the check for whether a\n * property is supported on an element boils down to `if (propName in element)`. Domino's\n * HTMLInputElement doesn't have an `indeterminate` property so Ivy will warn during\n * server-side rendering.\n */\n private _syncIndeterminate(value: boolean) {\n const nativeCheckbox = this._inputElement;\n\n if (nativeCheckbox) {\n nativeCheckbox.nativeElement.indeterminate = value;\n }\n }\n\n static ngAcceptInputType_disabled: BooleanInput;\n static ngAcceptInputType_required: BooleanInput;\n static ngAcceptInputType_disableRipple: BooleanInput;\n static ngAcceptInputType_indeterminate: BooleanInput;\n static ngAcceptInputType_tabIndex: NumberInput;\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 Directive,\n forwardRef,\n Provider,\n} from '@angular/core';\nimport {\n CheckboxRequiredValidator,\n NG_VALIDATORS,\n} from '@angular/forms';\n\nexport const MAT_CHECKBOX_REQUIRED_VALIDATOR: Provider = {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => MatCheckboxRequiredValidator),\n multi: true\n};\n\n/**\n * Validator for Material checkbox's required attribute in template-driven checkbox.\n * Current CheckboxRequiredValidator only work with `input type=checkbox` and does not\n * work with `mat-checkbox`.\n */\n@Directive({\n selector: `mat-checkbox[required][formControlName],\n mat-checkbox[required][formControl], mat-checkbox[required][ngModel]`,\n providers: [MAT_CHECKBOX_REQUIRED_VALIDATOR],\n})\nexport class MatCheckboxRequiredValidator extends CheckboxRequiredValidator {}\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 {ObserversModule} from '@angular/cdk/observers';\nimport {NgModule} from '@angular/core';\nimport {MatCommonModule, MatRippleModule} from '@angular/material/core';\nimport {MatCheckbox} from './checkbox';\nimport {MatCheckboxRequiredValidator} from './checkbox-required-validator';\n\n/** This module is used by both original and MDC-based checkbox implementations. */\n@NgModule({\n exports: [MatCheckboxRequiredValidator],\n declarations: [MatCheckboxRequiredValidator],\n})\nexport class _MatCheckboxRequiredValidatorModule {\n}\n\n@NgModule({\n imports: [\n MatRippleModule, MatCommonModule, ObserversModule,\n _MatCheckboxRequiredValidatorModule\n ],\n exports: [MatCheckbox, MatCommonModule, _MatCheckboxRequiredValidatorModule],\n declarations: [MatCheckbox],\n})\nexport class MatCheckboxModule {\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './checkbox';\nexport * from './checkbox-config';\nexport * from './checkbox-module';\nexport * from './checkbox-required-validator';\n\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;AAAA;;;;;;;AAkBA;MACa,4BAA4B,GACrC,IAAI,cAAc,CAA4B,8BAA8B,EAAE;IAC5E,UAAU,EAAE,MAAM;IAClB,OAAO,EAAE,oCAAoC;CAC9C,EAAE;AAEP;SACgB,oCAAoC;IAClD,OAAO;QACL,KAAK,EAAE,QAAQ;QACf,WAAW,EAAE,qBAAqB;KACnC,CAAC;AACJ;;AC/BA;;;;;;;AAiDA;AACA,IAAI,YAAY,GAAG,CAAC,CAAC;AAErB;AACA,MAAM,QAAQ,GAAG,oCAAoC,EAAE,CAAC;AAExD;;;;;MAKa,mCAAmC,GAAQ;IACtD,OAAO,EAAE,iBAAiB;IAC1B,WAAW,EAAE,UAAU,CAAC,MAAM,WAAW,CAAC;IAC1C,KAAK,EAAE,IAAI;EACX;AAiBF;MACa,iBAAiB;CAK7B;AAED;AACA;AACA,MAAM,gBAAgB,GAAG,aAAa,CAAC,UAAU,CAAC,kBAAkB,CAAC,aAAa,CAAC;IAC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oBACP,eAAe,EAAE,eAAe,EAAE,eAAe;oBACjD,mCAAmC;iBACpC;gBACD,OAAO,EAAE,CAAC,WAAW,EAAE,eAAe,EAAE,mCAAmC,CAAC;gBAC5E,YAAY,EAAE,CAAC,WAAW,CAAC;aAC5B;;;AC7BD;;;;;;;;ACAA;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"chips__testing.js","sources":["../../../../../../src/material/chips/testing/chip-remove-harness.ts","../../../../../../src/material/chips/testing/chip-harness.ts","../../../../../../src/material/chips/testing/chip-input-harness.ts","../../../../../../src/material/chips/testing/chip-list-harness.ts","../../../../../../src/material/chips/testing/chip-option-harness.ts","../../../../../../src/material/chips/testing/chip-listbox-harness.ts","../../../../../../src/material/chips/testing/public-api.ts","../../../../../../src/material/chips/testing/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {HarnessPredicate, ComponentHarness} from '@angular/cdk/testing';\nimport {ChipRemoveHarnessFilters} from './chip-harness-filters';\n\n/** Harness for interacting with a standard Material chip remove button in tests. */\nexport class MatChipRemoveHarness extends ComponentHarness {\n static hostSelector = '.mat-chip-remove';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatChipRemoveHarness` that meets\n * certain criteria.\n * @param options Options for filtering which input instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: ChipRemoveHarnessFilters = {}): HarnessPredicate<MatChipRemoveHarness> {\n return new HarnessPredicate(MatChipRemoveHarness, options);\n }\n\n /** Clicks the remove button. */\n async click(): Promise<void> {\n return (await this.host()).click();\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ComponentHarness, HarnessPredicate, TestKey} from '@angular/cdk/testing';\nimport {ChipHarnessFilters, ChipRemoveHarnessFilters} from './chip-harness-filters';\nimport {MatChipRemoveHarness} from './chip-remove-harness';\n\n/** Harness for interacting with a standard selectable Angular Material chip in tests. */\nexport class MatChipHarness extends ComponentHarness {\n /** The selector for the host element of a `MatChip` instance. */\n static hostSelector = '.mat-chip';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatChipHarness` that meets\n * certain criteria.\n * @param options Options for filtering which chip instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: ChipHarnessFilters = {}): HarnessPredicate<MatChipHarness> {\n return new HarnessPredicate(MatChipHarness, options)\n .addOption('text', options.text,\n (harness, label) => HarnessPredicate.stringMatches(harness.getText(), label))\n .addOption('selected', options.selected,\n async (harness, selected) => (await harness.isSelected()) === selected);\n }\n\n /** Gets the text of the chip. */\n async getText(): Promise<string> {\n return (await this.host()).text({\n exclude: '.mat-chip-avatar, .mat-chip-trailing-icon, .mat-icon'\n });\n }\n\n /**\n * Whether the chip is selected.\n * @deprecated Use `MatChipOptionHarness.isSelected` instead.\n * @breaking-change 12.0.0\n */\n async isSelected(): Promise<boolean> {\n return (await this.host()).hasClass('mat-chip-selected');\n }\n\n /** Whether the chip is disabled. */\n async isDisabled(): Promise<boolean> {\n return (await this.host()).hasClass('mat-chip-disabled');\n }\n\n /**\n * Selects the given chip. Only applies if it's selectable.\n * @deprecated Use `MatChipOptionHarness.select` instead.\n * @breaking-change 12.0.0\n */\n async select(): Promise<void> {\n if (!(await this.isSelected())) {\n await this.toggle();\n }\n }\n\n /**\n * Deselects the given chip. Only applies if it's selectable.\n * @deprecated Use `MatChipOptionHarness.deselect` instead.\n * @breaking-change 12.0.0\n */\n async deselect(): Promise<void> {\n if (await this.isSelected()) {\n await this.toggle();\n }\n }\n\n /**\n * Toggles the selected state of the given chip. Only applies if it's selectable.\n * @deprecated Use `MatChipOptionHarness.toggle` instead.\n * @breaking-change 12.0.0\n */\n async toggle(): Promise<void> {\n return (await this.host()).sendKeys(' ');\n }\n\n /** Removes the given chip. Only applies if it's removable. */\n async remove(): Promise<void> {\n await (await this.host()).sendKeys(TestKey.DELETE);\n }\n\n /**\n * Gets the remove button inside of a chip.\n * @param filter Optionally filters which chips are included.\n */\n async getRemoveButton(filter: ChipRemoveHarnessFilters = {}): Promise<MatChipRemoveHarness> {\n return this.locatorFor(MatChipRemoveHarness.with(filter))();\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {HarnessPredicate, ComponentHarness, TestKey} from '@angular/cdk/testing';\nimport {ChipInputHarnessFilters} from './chip-harness-filters';\n\n/** Harness for interacting with a standard Material chip inputs in tests. */\nexport class MatChipInputHarness extends ComponentHarness {\n static hostSelector = '.mat-chip-input';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatChipInputHarness` that meets\n * certain criteria.\n * @param options Options for filtering which input instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: ChipInputHarnessFilters = {}): HarnessPredicate<MatChipInputHarness> {\n return new HarnessPredicate(MatChipInputHarness, options)\n .addOption('value', options.value, async (harness, value) => {\n return (await harness.getValue()) === value;\n })\n .addOption('placeholder', options.placeholder, async (harness, placeholder) => {\n return (await harness.getPlaceholder()) === placeholder;\n });\n }\n\n /** Whether the input is disabled. */\n async isDisabled(): Promise<boolean> {\n return (await this.host()).getProperty('disabled')!;\n }\n\n /** Whether the input is required. */\n async isRequired(): Promise<boolean> {\n return (await this.host()).getProperty('required')!;\n }\n\n /** Gets the value of the input. */\n async getValue(): Promise<string> {\n // The \"value\" property of the native input is never undefined.\n return (await (await this.host()).getProperty('value'))!;\n }\n\n /** Gets the placeholder of the input. */\n async getPlaceholder(): Promise<string> {\n return (await (await this.host()).getProperty('placeholder'));\n }\n\n /**\n * Focuses the input and returns a promise that indicates when the\n * action is complete.\n */\n async focus(): Promise<void> {\n return (await this.host()).focus();\n }\n\n /**\n * Blurs the input and returns a promise that indicates when the\n * action is complete.\n */\n async blur(): Promise<void> {\n return (await this.host()).blur();\n }\n\n /** Whether the input is focused. */\n async isFocused(): Promise<boolean> {\n return (await this.host()).isFocused();\n }\n\n /**\n * Sets the value of the input. The value will be set by simulating\n * keypresses that correspond to the given value.\n */\n async setValue(newValue: string): Promise<void> {\n const inputEl = await this.host();\n await inputEl.clear();\n\n // We don't want to send keys for the value if the value is an empty\n // string in order to clear the value. Sending keys with an empty string\n // still results in unnecessary focus events.\n if (newValue) {\n await inputEl.sendKeys(newValue);\n }\n }\n\n /** Sends a chip separator key to the input element. */\n async sendSeparatorKey(key: TestKey | string): Promise<void> {\n const inputEl = await this.host();\n return inputEl.sendKeys(key);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ComponentHarness, HarnessPredicate, parallel} from '@angular/cdk/testing';\nimport {MatChipHarness} from './chip-harness';\nimport {MatChipInputHarness} from './chip-input-harness';\nimport {\n ChipListHarnessFilters,\n ChipHarnessFilters,\n ChipInputHarnessFilters,\n} from './chip-harness-filters';\n\n/** Base class for chip list harnesses. */\nexport abstract class _MatChipListHarnessBase extends ComponentHarness {\n /** Gets whether the chip list is disabled. */\n async isDisabled(): Promise<boolean> {\n return await (await this.host()).getAttribute('aria-disabled') === 'true';\n }\n\n /** Gets whether the chip list is required. */\n async isRequired(): Promise<boolean> {\n return await (await this.host()).getAttribute('aria-required') === 'true';\n }\n\n /** Gets whether the chip list is invalid. */\n async isInvalid(): Promise<boolean> {\n return await (await this.host()).getAttribute('aria-invalid') === 'true';\n }\n\n /** Gets whether the chip list is in multi selection mode. */\n async isMultiple(): Promise<boolean> {\n return await (await this.host()).getAttribute('aria-multiselectable') === 'true';\n }\n\n /** Gets whether the orientation of the chip list. */\n async getOrientation(): Promise<'horizontal' | 'vertical'> {\n const orientation = await (await this.host()).getAttribute('aria-orientation');\n return orientation === 'vertical' ? 'vertical' : 'horizontal';\n }\n}\n\n/** Harness for interacting with a standard chip list in tests. */\nexport class MatChipListHarness extends _MatChipListHarnessBase {\n /** The selector for the host element of a `MatChipList` instance. */\n static hostSelector = '.mat-chip-list';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatChipListHarness` that meets\n * certain criteria.\n * @param options Options for filtering which chip list instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: ChipListHarnessFilters = {}): HarnessPredicate<MatChipListHarness> {\n return new HarnessPredicate(MatChipListHarness, options);\n }\n\n /**\n * Gets the list of chips inside the chip list.\n * @param filter Optionally filters which chips are included.\n */\n async getChips(filter: ChipHarnessFilters = {}): Promise<MatChipHarness[]> {\n return this.locatorForAll(MatChipHarness.with(filter))();\n }\n\n /**\n * Selects a chip inside the chip list.\n * @param filter An optional filter to apply to the child chips.\n * All the chips matching the filter will be selected.\n * @deprecated Use `MatChipListboxHarness.selectChips` instead.\n * @breaking-change 12.0.0\n */\n async selectChips(filter: ChipHarnessFilters = {}): Promise<void> {\n const chips = await this.getChips(filter);\n if (!chips.length) {\n throw Error(`Cannot find chip matching filter ${JSON.stringify(filter)}`);\n }\n await parallel(() => chips.map(chip => chip.select()));\n }\n\n /**\n * Gets the `MatChipInput` inside the chip list.\n * @param filter Optionally filters which chip input is included.\n */\n async getInput(filter: ChipInputHarnessFilters = {}): Promise<MatChipInputHarness> {\n // The input isn't required to be a descendant of the chip list so we have to look it up by id.\n const inputId = await (await this.host()).getAttribute('data-mat-chip-input');\n\n if (!inputId) {\n throw Error(`Chip list is not associated with an input`);\n }\n\n return this.documentRootLocatorFactory().locatorFor(\n MatChipInputHarness.with({...filter, selector: `#${inputId}`}))();\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {HarnessPredicate} from '@angular/cdk/testing';\nimport {MatChipHarness} from './chip-harness';\nimport {ChipOptionHarnessFilters} from './chip-harness-filters';\n\nexport class MatChipOptionHarness extends MatChipHarness {\n /** The selector for the host element of a selectable chip instance. */\n static hostSelector = '.mat-chip';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatChipOptionHarness`\n * that meets certain criteria.\n * @param options Options for filtering which chip instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: ChipOptionHarnessFilters = {}):\n HarnessPredicate<MatChipOptionHarness> {\n return new HarnessPredicate(MatChipOptionHarness, options)\n .addOption('text', options.text,\n (harness, label) => HarnessPredicate.stringMatches(harness.getText(), label))\n .addOption('selected', options.selected,\n async (harness, selected) => (await harness.isSelected()) === selected);\n }\n\n /** Whether the chip is selected. */\n async isSelected(): Promise<boolean> {\n return (await this.host()).hasClass('mat-chip-selected');\n }\n\n /** Selects the given chip. Only applies if it's selectable. */\n async select(): Promise<void> {\n if (!(await this.isSelected())) {\n await this.toggle();\n }\n }\n\n /** Deselects the given chip. Only applies if it's selectable. */\n async deselect(): Promise<void> {\n if (await this.isSelected()) {\n await this.toggle();\n }\n }\n\n /** Toggles the selected state of the given chip. */\n async toggle(): Promise<void> {\n return (await this.host()).sendKeys(' ');\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {HarnessPredicate, parallel} from '@angular/cdk/testing';\nimport {MatChipOptionHarness} from './chip-option-harness';\nimport {\n ChipListboxHarnessFilters,\n ChipOptionHarnessFilters,\n} from './chip-harness-filters';\nimport {_MatChipListHarnessBase} from './chip-list-harness';\n\n/** Harness for interacting with a standard selectable chip list in tests. */\nexport class MatChipListboxHarness extends _MatChipListHarnessBase {\n /** The selector for the host element of a `MatChipList` instance. */\n static hostSelector = '.mat-chip-list';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatChipListHarness` that meets\n * certain criteria.\n * @param options Options for filtering which chip list instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: ChipListboxHarnessFilters = {}):\n HarnessPredicate<MatChipListboxHarness> {\n return new HarnessPredicate(MatChipListboxHarness, options);\n }\n\n /**\n * Gets the list of chips inside the chip list.\n * @param filter Optionally filters which chips are included.\n */\n async getChips(filter: ChipOptionHarnessFilters = {}): Promise<MatChipOptionHarness[]> {\n return this.locatorForAll(MatChipOptionHarness.with(filter))();\n }\n\n /**\n * Selects a chip inside the chip list.\n * @param filter An optional filter to apply to the child chips.\n * All the chips matching the filter will be selected.\n */\n async selectChips(filter: ChipOptionHarnessFilters = {}): Promise<void> {\n const chips = await this.getChips(filter);\n if (!chips.length) {\n throw Error(`Cannot find chip matching filter ${JSON.stringify(filter)}`);\n }\n await parallel(() => chips.map(chip => chip.select()));\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './chip-harness';\nexport * from './chip-harness-filters';\nexport {MatChipListHarness} from './chip-list-harness';\nexport * from './chip-input-harness';\nexport * from './chip-remove-harness';\nexport * from './chip-option-harness';\nexport * from './chip-listbox-harness';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;AAAA;;;;;;;AAWA;MACa,oBAAqB,SAAQ,gBAAgB;;;;;;;IASxD,OAAO,IAAI,CAAC,UAAoC,EAAE;QAChD,OAAO,IAAI,gBAAgB,CAAC,oBAAoB,EAAE,OAAO,CAAC,CAAC;KAC5D;;IAGK,KAAK;;YACT,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,CAAC;SACpC;KAAA;;AAfM,iCAAY,GAAG,kBAAkB;;ACb1C;;;;;;;AAYA;MACa,cAAe,SAAQ,gBAAgB;;;;;;;IAUlD,OAAO,IAAI,CAAC,U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CAAC,qBAAqB,EAAE,OAAO,CAAC,CAAC;KAC7D;;;;;IAMK,QAAQ,CAAC,SAAmC,EAAE;;YAClD,OAAO,IAAI,CAAC,aAAa,CAAC,oBAAoB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC;SAChE;KAAA;;;;;;IAOK,WAAW,CAAC,SAAmC,EAAE;;YACrD,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;YAC1C,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE;gBACjB,MAAM,KAAK,CAAC,oCAAoC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;aAC3E;YACD,MAAM,QAAQ,CAAC,MAAM,KAAK,CAAC,GAAG,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;SACxD;KAAA;;AAjCD;AACO,kCAAY,GAAG,gBAAgB;;ACnBxC;;;;;;;;ACAA;;;;;;;;;;"}
1
+ {"version":3,"file":"chips__testing.js","sources":["../../../../../../src/material/chips/testing/chip-remove-harness.ts","../../../../../../src/material/chips/testing/chip-harness.ts","../../../../../../src/material/chips/testing/chip-input-harness.ts","../../../../../../src/material/chips/testing/chip-list-harness.ts","../../../../../../src/material/chips/testing/chip-option-harness.ts","../../../../../../src/material/chips/testing/chip-listbox-harness.ts","../../../../../../src/material/chips/testing/public-api.ts","../../../../../../src/material/chips/testing/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {HarnessPredicate, ComponentHarness} from '@angular/cdk/testing';\nimport {ChipRemoveHarnessFilters} from './chip-harness-filters';\n\n/** Harness for interacting with a standard Material chip remove button in tests. */\nexport class MatChipRemoveHarness extends ComponentHarness {\n static hostSelector = '.mat-chip-remove';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatChipRemoveHarness` that meets\n * certain criteria.\n * @param options Options for filtering which input instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: ChipRemoveHarnessFilters = {}): HarnessPredicate<MatChipRemoveHarness> {\n return new HarnessPredicate(MatChipRemoveHarness, options);\n }\n\n /** Clicks the remove button. */\n async click(): Promise<void> {\n return (await this.host()).click();\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ComponentHarness, HarnessPredicate, TestKey} from '@angular/cdk/testing';\nimport {ChipHarnessFilters, ChipRemoveHarnessFilters} from './chip-harness-filters';\nimport {MatChipRemoveHarness} from './chip-remove-harness';\n\n/** Harness for interacting with a standard selectable Angular Material chip in tests. */\nexport class MatChipHarness extends ComponentHarness {\n /** The selector for the host element of a `MatChip` instance. */\n static hostSelector = '.mat-chip';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatChipHarness` that meets\n * certain criteria.\n * @param options Options for filtering which chip instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: ChipHarnessFilters = {}): HarnessPredicate<MatChipHarness> {\n return new HarnessPredicate(MatChipHarness, options)\n .addOption('text', options.text,\n (harness, label) => HarnessPredicate.stringMatches(harness.getText(), label))\n .addOption('selected', options.selected,\n async (harness, selected) => (await harness.isSelected()) === selected);\n }\n\n /** Gets the text of the chip. */\n async getText(): Promise<string> {\n return (await this.host()).text({\n exclude: '.mat-chip-avatar, .mat-chip-trailing-icon, .mat-icon'\n });\n }\n\n /**\n * Whether the chip is selected.\n * @deprecated Use `MatChipOptionHarness.isSelected` instead.\n * @breaking-change 12.0.0\n */\n async isSelected(): Promise<boolean> {\n return (await this.host()).hasClass('mat-chip-selected');\n }\n\n /** Whether the chip is disabled. */\n async isDisabled(): Promise<boolean> {\n return (await this.host()).hasClass('mat-chip-disabled');\n }\n\n /**\n * Selects the given chip. Only applies if it's selectable.\n * @deprecated Use `MatChipOptionHarness.select` instead.\n * @breaking-change 12.0.0\n */\n async select(): Promise<void> {\n if (!(await this.isSelected())) {\n await this.toggle();\n }\n }\n\n /**\n * Deselects the given chip. Only applies if it's selectable.\n * @deprecated Use `MatChipOptionHarness.deselect` instead.\n * @breaking-change 12.0.0\n */\n async deselect(): Promise<void> {\n if (await this.isSelected()) {\n await this.toggle();\n }\n }\n\n /**\n * Toggles the selected state of the given chip. Only applies if it's selectable.\n * @deprecated Use `MatChipOptionHarness.toggle` instead.\n * @breaking-change 12.0.0\n */\n async toggle(): Promise<void> {\n return (await this.host()).sendKeys(' ');\n }\n\n /** Removes the given chip. Only applies if it's removable. */\n async remove(): Promise<void> {\n await (await this.host()).sendKeys(TestKey.DELETE);\n }\n\n /**\n * Gets the remove button inside of a chip.\n * @param filter Optionally filters which chips are included.\n */\n async getRemoveButton(filter: ChipRemoveHarnessFilters = {}): Promise<MatChipRemoveHarness> {\n return this.locatorFor(MatChipRemoveHarness.with(filter))();\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {HarnessPredicate, ComponentHarness, TestKey} from '@angular/cdk/testing';\nimport {ChipInputHarnessFilters} from './chip-harness-filters';\n\n/** Harness for interacting with a standard Material chip inputs in tests. */\nexport class MatChipInputHarness extends ComponentHarness {\n static hostSelector = '.mat-chip-input';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatChipInputHarness` that meets\n * certain criteria.\n * @param options Options for filtering which input instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: ChipInputHarnessFilters = {}): HarnessPredicate<MatChipInputHarness> {\n return new HarnessPredicate(MatChipInputHarness, options)\n .addOption('value', options.value, async (harness, value) => {\n return (await harness.getValue()) === value;\n })\n .addOption('placeholder', options.placeholder, async (harness, placeholder) => {\n return (await harness.getPlaceholder()) === placeholder;\n });\n }\n\n /** Whether the input is disabled. */\n async isDisabled(): Promise<boolean> {\n return (await this.host()).getProperty('disabled')!;\n }\n\n /** Whether the input is required. */\n async isRequired(): Promise<boolean> {\n return (await this.host()).getProperty('required')!;\n }\n\n /** Gets the value of the input. */\n async getValue(): Promise<string> {\n // The \"value\" property of the native input is never undefined.\n return (await (await this.host()).getProperty('value'))!;\n }\n\n /** Gets the placeholder of the input. */\n async getPlaceholder(): Promise<string> {\n return (await (await this.host()).getProperty('placeholder'));\n }\n\n /**\n * Focuses the input and returns a promise that indicates when the\n * action is complete.\n */\n async focus(): Promise<void> {\n return (await this.host()).focus();\n }\n\n /**\n * Blurs the input and returns a promise that indicates when the\n * action is complete.\n */\n async blur(): Promise<void> {\n return (await this.host()).blur();\n }\n\n /** Whether the input is focused. */\n async isFocused(): Promise<boolean> {\n return (await this.host()).isFocused();\n }\n\n /**\n * Sets the value of the input. The value will be set by simulating\n * keypresses that correspond to the given value.\n */\n async setValue(newValue: string): Promise<void> {\n const inputEl = await this.host();\n await inputEl.clear();\n\n // We don't want to send keys for the value if the value is an empty\n // string in order to clear the value. Sending keys with an empty string\n // still results in unnecessary focus events.\n if (newValue) {\n await inputEl.sendKeys(newValue);\n }\n }\n\n /** Sends a chip separator key to the input element. */\n async sendSeparatorKey(key: TestKey | string): Promise<void> {\n const inputEl = await this.host();\n return inputEl.sendKeys(key);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ComponentHarness, HarnessPredicate, parallel} from '@angular/cdk/testing';\nimport {MatChipHarness} from './chip-harness';\nimport {MatChipInputHarness} from './chip-input-harness';\nimport {\n ChipListHarnessFilters,\n ChipHarnessFilters,\n ChipInputHarnessFilters,\n} from './chip-harness-filters';\n\n/** Base class for chip list harnesses. */\nexport abstract class _MatChipListHarnessBase extends ComponentHarness {\n /** Gets whether the chip list is disabled. */\n async isDisabled(): Promise<boolean> {\n return await (await this.host()).getAttribute('aria-disabled') === 'true';\n }\n\n /** Gets whether the chip list is required. */\n async isRequired(): Promise<boolean> {\n return await (await this.host()).getAttribute('aria-required') === 'true';\n }\n\n /** Gets whether the chip list is invalid. */\n async isInvalid(): Promise<boolean> {\n return await (await this.host()).getAttribute('aria-invalid') === 'true';\n }\n\n /** Gets whether the chip list is in multi selection mode. */\n async isMultiple(): Promise<boolean> {\n return await (await this.host()).getAttribute('aria-multiselectable') === 'true';\n }\n\n /** Gets whether the orientation of the chip list. */\n async getOrientation(): Promise<'horizontal' | 'vertical'> {\n const orientation = await (await this.host()).getAttribute('aria-orientation');\n return orientation === 'vertical' ? 'vertical' : 'horizontal';\n }\n}\n\n/** Harness for interacting with a standard chip list in tests. */\nexport class MatChipListHarness extends _MatChipListHarnessBase {\n /** The selector for the host element of a `MatChipList` instance. */\n static hostSelector = '.mat-chip-list';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatChipListHarness` that meets\n * certain criteria.\n * @param options Options for filtering which chip list instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: ChipListHarnessFilters = {}): HarnessPredicate<MatChipListHarness> {\n return new HarnessPredicate(MatChipListHarness, options);\n }\n\n /**\n * Gets the list of chips inside the chip list.\n * @param filter Optionally filters which chips are included.\n */\n async getChips(filter: ChipHarnessFilters = {}): Promise<MatChipHarness[]> {\n return this.locatorForAll(MatChipHarness.with(filter))();\n }\n\n /**\n * Selects a chip inside the chip list.\n * @param filter An optional filter to apply to the child chips.\n * All the chips matching the filter will be selected.\n * @deprecated Use `MatChipListboxHarness.selectChips` instead.\n * @breaking-change 12.0.0\n */\n async selectChips(filter: ChipHarnessFilters = {}): Promise<void> {\n const chips = await this.getChips(filter);\n if (!chips.length) {\n throw Error(`Cannot find chip matching filter ${JSON.stringify(filter)}`);\n }\n await parallel(() => chips.map(chip => chip.select()));\n }\n\n /**\n * Gets the `MatChipInput` inside the chip list.\n * @param filter Optionally filters which chip input is included.\n */\n async getInput(filter: ChipInputHarnessFilters = {}): Promise<MatChipInputHarness> {\n // The input isn't required to be a descendant of the chip list so we have to look it up by id.\n const inputId = await (await this.host()).getAttribute('data-mat-chip-input');\n\n if (!inputId) {\n throw Error(`Chip list is not associated with an input`);\n }\n\n return this.documentRootLocatorFactory().locatorFor(\n MatChipInputHarness.with({...filter, selector: `#${inputId}`}))();\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {HarnessPredicate} from '@angular/cdk/testing';\nimport {MatChipHarness} from './chip-harness';\nimport {ChipOptionHarnessFilters} from './chip-harness-filters';\n\nexport class MatChipOptionHarness extends MatChipHarness {\n /** The selector for the host element of a selectable chip instance. */\n static override hostSelector = '.mat-chip';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatChipOptionHarness`\n * that meets certain criteria.\n * @param options Options for filtering which chip instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static override with(options: ChipOptionHarnessFilters = {}):\n HarnessPredicate<MatChipOptionHarness> {\n return new HarnessPredicate(MatChipOptionHarness, options)\n .addOption('text', options.text,\n (harness, label) => HarnessPredicate.stringMatches(harness.getText(), label))\n .addOption('selected', options.selected,\n async (harness, selected) => (await harness.isSelected()) === selected);\n }\n\n /** Whether the chip is selected. */\n override async isSelected(): Promise<boolean> {\n return (await this.host()).hasClass('mat-chip-selected');\n }\n\n /** Selects the given chip. Only applies if it's selectable. */\n override async select(): Promise<void> {\n if (!(await this.isSelected())) {\n await this.toggle();\n }\n }\n\n /** Deselects the given chip. Only applies if it's selectable. */\n override async deselect(): Promise<void> {\n if (await this.isSelected()) {\n await this.toggle();\n }\n }\n\n /** Toggles the selected state of the given chip. */\n override async toggle(): Promise<void> {\n return (await this.host()).sendKeys(' ');\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {HarnessPredicate, parallel} from '@angular/cdk/testing';\nimport {MatChipOptionHarness} from './chip-option-harness';\nimport {\n ChipListboxHarnessFilters,\n ChipOptionHarnessFilters,\n} from './chip-harness-filters';\nimport {_MatChipListHarnessBase} from './chip-list-harness';\n\n/** Harness for interacting with a standard selectable chip list in tests. */\nexport class MatChipListboxHarness extends _MatChipListHarnessBase {\n /** The selector for the host element of a `MatChipList` instance. */\n static hostSelector = '.mat-chip-list';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatChipListHarness` that meets\n * certain criteria.\n * @param options Options for filtering which chip list instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: ChipListboxHarnessFilters = {}):\n HarnessPredicate<MatChipListboxHarness> {\n return new HarnessPredicate(MatChipListboxHarness, options);\n }\n\n /**\n * Gets the list of chips inside the chip list.\n * @param filter Optionally filters which chips are included.\n */\n async getChips(filter: ChipOptionHarnessFilters = {}): Promise<MatChipOptionHarness[]> {\n return this.locatorForAll(MatChipOptionHarness.with(filter))();\n }\n\n /**\n * Selects a chip inside the chip list.\n * @param filter An optional filter to apply to the child chips.\n * All the chips matching the filter will be selected.\n */\n async selectChips(filter: ChipOptionHarnessFilters = {}): Promise<void> {\n const chips = await this.getChips(filter);\n if (!chips.length) {\n throw Error(`Cannot find chip matching filter ${JSON.stringify(filter)}`);\n }\n await parallel(() => chips.map(chip => chip.select()));\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './chip-harness';\nexport * from './chip-harness-filters';\nexport {MatChipListHarness} from './chip-list-harness';\nexport * from './chip-input-harness';\nexport * from './chip-remove-harness';\nexport * from './chip-option-harness';\nexport * from './chip-listbox-harness';\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 LICENS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MAAM,EAAE,CAAC;aACrB;SACF;KAAA;;IAGc,QAAQ;;YACrB,IAAI,MAAM,IAAI,CAAC,UAAU,EAAE,EAAE;gBAC3B,MAAM,IAAI,CAAC,MAAM,EAAE,CAAC;aACrB;SACF;KAAA;;IAGc,MAAM;;YACnB,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC;SAC1C;KAAA;;AAxCD;AACgB,iCAAY,GAAG,WAAW;;ACd5C;;;;;;;AAgBA;MACa,qBAAsB,SAAQ,uBAAuB;;;;;;;IAUhE,OAAO,IAAI,CAAC,UAAqC,EAAE;QAEjD,OAAO,IAAI,gBAAgB,CAAC,qBAAqB,EAAE,OAAO,CAAC,CAAC;KAC7D;;;;;IAMK,QAAQ,CAAC,SAAmC,EAAE;;YAClD,OAAO,IAAI,CAAC,aAAa,CAAC,oBAAoB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC;SAChE;KAAA;;;;;;IAOK,WAAW,CAAC,SAAmC,EAAE;;YACrD,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;YAC1C,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE;gBACjB,MAAM,KAAK,CAAC,oCAAoC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;aAC3E;YACD,MAAM,QAAQ,CAAC,MAAM,KAAK,CAAC,GAAG,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;SACxD;KAAA;;AAjCD;AACO,kCAAY,GAAG,gBAAgB;;ACnBxC;;;;;;;;ACAA;;;;;;;;;;"}
package/fesm2015/chips.js CHANGED
@@ -90,9 +90,8 @@ MatChipTrailingIcon.decorators = [
90
90
  * Material design styled Chip component. Used inside the MatChipList component.
91
91
  */
92
92
  class MatChip extends _MatChipMixinBase {
93
- constructor(_elementRef, _ngZone, platform, globalRippleOptions, _changeDetectorRef, _document, animationMode, tabIndex) {
94
- super(_elementRef);
95
- this._elementRef = _elementRef;
93
+ constructor(elementRef, _ngZone, platform, globalRippleOptions, _changeDetectorRef, _document, animationMode, tabIndex) {
94
+ super(elementRef);
96
95
  this._ngZone = _ngZone;
97
96
  this._changeDetectorRef = _changeDetectorRef;
98
97
  /** Whether the chip has focus. */
@@ -125,7 +124,7 @@ class MatChip extends _MatChipMixinBase {
125
124
  this._chipRippleTarget.classList.add('mat-chip-ripple');
126
125
  this._elementRef.nativeElement.appendChild(this._chipRippleTarget);
127
126
  this._chipRipple = new RippleRenderer(this, _ngZone, this._chipRippleTarget, platform);
128
- this._chipRipple.setupTriggerEvents(_elementRef);
127
+ this._chipRipple.setupTriggerEvents(elementRef);
129
128
  this.rippleConfig = globalRippleOptions || {};
130
129
  this._animationsDisabled = animationMode === 'NoopAnimations';
131
130
  this.tabIndex = tabIndex != null ? (parseInt(tabIndex) || -1) : -1;
@@ -445,14 +444,11 @@ class MatChipListChange {
445
444
  * A material design chips component (named ChipList for its similarity to the List component).
446
445
  */
447
446
  class MatChipList extends _MatChipListBase {
448
- constructor(_elementRef, _changeDetectorRef, _dir, _parentForm, _parentFormGroup, _defaultErrorStateMatcher,
449
- /** @docs-private */
450
- ngControl) {
447
+ constructor(_elementRef, _changeDetectorRef, _dir, _parentForm, _parentFormGroup, _defaultErrorStateMatcher, ngControl) {
451
448
  super(_defaultErrorStateMatcher, _parentForm, _parentFormGroup, ngControl);
452
449
  this._elementRef = _elementRef;
453
450
  this._changeDetectorRef = _changeDetectorRef;
454
451
  this._dir = _dir;
455
- this.ngControl = ngControl;
456
452
  /**
457
453
  * Implemented as part of MatFormFieldControl.
458
454
  * @docs-private