@ng-matero/extensions 17.0.0 → 17.1.0

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 (195) hide show
  1. package/_index.scss +24 -12
  2. package/alert/alert-module.d.ts +3 -3
  3. package/alert/alert.d.ts +1 -1
  4. package/checkbox-group/checkbox-group-module.d.ts +6 -6
  5. package/checkbox-group/checkbox-group.d.ts +1 -1
  6. package/colorpicker/colorpicker-input.d.ts +1 -1
  7. package/colorpicker/colorpicker-module.d.ts +10 -10
  8. package/colorpicker/colorpicker-toggle.d.ts +2 -2
  9. package/colorpicker/colorpicker.d.ts +3 -3
  10. package/column-resize/column-resize-directives/column-resize-flex.d.ts +1 -1
  11. package/column-resize/column-resize-directives/column-resize.d.ts +1 -1
  12. package/column-resize/column-resize-module.d.ts +1 -1
  13. package/core/color/_all-color.scss +3 -3
  14. package/core/datetime/datetime.module.d.ts +4 -1
  15. package/core/density/_all-density.scss +2 -2
  16. package/core/pipes/is-template-ref.pipe.d.ts +1 -1
  17. package/core/pipes/pipes.module.d.ts +4 -4
  18. package/core/pipes/to-observable.pipe.d.ts +1 -1
  19. package/core/tokens/m2/mdc/_plain-tooltip.scss +6 -6
  20. package/core/tokens/m2/mtx/_select.scss +1 -42
  21. package/core/typography/_all-typography.scss +2 -2
  22. package/datetimepicker/calendar-body.d.ts +1 -1
  23. package/datetimepicker/calendar.d.ts +1 -1
  24. package/datetimepicker/clock.d.ts +1 -1
  25. package/datetimepicker/datetimepicker-input.d.ts +1 -1
  26. package/datetimepicker/datetimepicker-module.d.ts +16 -16
  27. package/datetimepicker/datetimepicker-toggle.d.ts +2 -2
  28. package/datetimepicker/datetimepicker.d.ts +3 -3
  29. package/datetimepicker/month-view.d.ts +1 -1
  30. package/datetimepicker/multi-year-view.d.ts +1 -1
  31. package/datetimepicker/time.d.ts +3 -3
  32. package/datetimepicker/year-view.d.ts +1 -1
  33. package/dialog/dialog-container.d.ts +1 -1
  34. package/dialog/dialog-module.d.ts +7 -7
  35. package/drawer/drawer-container.d.ts +1 -1
  36. package/drawer/drawer-module.d.ts +5 -5
  37. package/esm2022/alert/alert-module.mjs +6 -7
  38. package/esm2022/alert/alert.mjs +5 -5
  39. package/esm2022/button/button-loading.mjs +4 -4
  40. package/esm2022/button/button-module.mjs +4 -4
  41. package/esm2022/checkbox-group/checkbox-group-module.mjs +6 -7
  42. package/esm2022/checkbox-group/checkbox-group.mjs +9 -10
  43. package/esm2022/colorpicker/colorpicker-input.mjs +5 -4
  44. package/esm2022/colorpicker/colorpicker-module.mjs +20 -19
  45. package/esm2022/colorpicker/colorpicker-toggle.mjs +10 -9
  46. package/esm2022/colorpicker/colorpicker.mjs +25 -18
  47. package/esm2022/column-resize/column-resize-directives/column-resize-flex.mjs +5 -4
  48. package/esm2022/column-resize/column-resize-directives/column-resize.mjs +5 -4
  49. package/esm2022/column-resize/column-resize-module.mjs +6 -6
  50. package/esm2022/column-resize/column-resize-notifier.mjs +6 -6
  51. package/esm2022/column-resize/column-resize.mjs +4 -4
  52. package/esm2022/column-resize/column-size-store.mjs +3 -3
  53. package/esm2022/column-resize/event-dispatcher.mjs +4 -4
  54. package/esm2022/column-resize/overlay-handle.mjs +4 -4
  55. package/esm2022/column-resize/polyfill.mjs +1 -1
  56. package/esm2022/column-resize/resizable.mjs +4 -4
  57. package/esm2022/column-resize/resize-strategy.mjs +10 -10
  58. package/esm2022/core/datetime/datetime-adapter.mjs +1 -1
  59. package/esm2022/core/datetime/datetime.module.mjs +19 -23
  60. package/esm2022/core/datetime/native-datetime-adapter.mjs +4 -4
  61. package/esm2022/core/pipes/is-template-ref.pipe.mjs +5 -5
  62. package/esm2022/core/pipes/pipes.module.mjs +6 -7
  63. package/esm2022/core/pipes/to-observable.pipe.mjs +5 -5
  64. package/esm2022/datetimepicker/calendar-body.mjs +5 -5
  65. package/esm2022/datetimepicker/calendar.mjs +19 -12
  66. package/esm2022/datetimepicker/clock.mjs +6 -7
  67. package/esm2022/datetimepicker/datetimepicker-errors.mjs +4 -3
  68. package/esm2022/datetimepicker/datetimepicker-input.mjs +6 -5
  69. package/esm2022/datetimepicker/datetimepicker-intl.mjs +3 -3
  70. package/esm2022/datetimepicker/datetimepicker-module.mjs +28 -11
  71. package/esm2022/datetimepicker/datetimepicker-toggle.mjs +10 -9
  72. package/esm2022/datetimepicker/datetimepicker.mjs +23 -19
  73. package/esm2022/datetimepicker/month-view.mjs +6 -7
  74. package/esm2022/datetimepicker/multi-year-view.mjs +6 -7
  75. package/esm2022/datetimepicker/time.mjs +11 -10
  76. package/esm2022/datetimepicker/year-view.mjs +6 -7
  77. package/esm2022/dialog/dialog-container.mjs +19 -10
  78. package/esm2022/dialog/dialog-module.mjs +23 -7
  79. package/esm2022/dialog/dialog.mjs +6 -5
  80. package/esm2022/drawer/drawer-container.mjs +5 -6
  81. package/esm2022/drawer/drawer-module.mjs +6 -7
  82. package/esm2022/drawer/drawer-ref.mjs +1 -1
  83. package/esm2022/drawer/drawer.mjs +6 -5
  84. package/esm2022/grid/cell.mjs +35 -13
  85. package/esm2022/grid/column-menu.mjs +31 -15
  86. package/esm2022/grid/column-resize/column-resize-directives/column-resize-flex.mjs +5 -4
  87. package/esm2022/grid/column-resize/column-resize-directives/column-resize.mjs +5 -4
  88. package/esm2022/grid/column-resize/column-resize-module.mjs +14 -14
  89. package/esm2022/grid/column-resize/index.mjs +8 -0
  90. package/esm2022/grid/column-resize/overlay-handle.mjs +5 -4
  91. package/esm2022/grid/column-resize/resizable-directives/resizable.mjs +5 -4
  92. package/esm2022/grid/column-resize/resize-strategy.mjs +3 -3
  93. package/esm2022/grid/expansion-toggle.mjs +5 -4
  94. package/esm2022/grid/grid-module.mjs +39 -37
  95. package/esm2022/grid/grid-pipes.mjs +29 -29
  96. package/esm2022/grid/grid-utils.mjs +6 -5
  97. package/esm2022/grid/grid.mjs +108 -76
  98. package/esm2022/loader/loader-module.mjs +6 -7
  99. package/esm2022/loader/loader.mjs +7 -7
  100. package/esm2022/photoviewer/photoviewer-module.mjs +6 -7
  101. package/esm2022/photoviewer/photoviewer.mjs +5 -4
  102. package/esm2022/popover/popover-content.mjs +8 -7
  103. package/esm2022/popover/popover-module.mjs +22 -7
  104. package/esm2022/popover/popover-target.mjs +5 -4
  105. package/esm2022/popover/popover-trigger.mjs +13 -6
  106. package/esm2022/popover/popover.mjs +7 -7
  107. package/esm2022/progress/progress-module.mjs +6 -7
  108. package/esm2022/progress/progress.mjs +6 -6
  109. package/esm2022/select/option.mjs +5 -4
  110. package/esm2022/select/select-module.mjs +20 -9
  111. package/esm2022/select/select.mjs +11 -11
  112. package/esm2022/select/templates.mjs +45 -45
  113. package/esm2022/split/split-module.mjs +6 -7
  114. package/esm2022/split/split-pane.mjs +5 -4
  115. package/esm2022/split/split.mjs +6 -6
  116. package/esm2022/split/utils.mjs +1 -1
  117. package/esm2022/tooltip/tooltip-module.mjs +24 -7
  118. package/esm2022/tooltip/tooltip.mjs +101 -114
  119. package/fesm2022/mtxAlert.mjs +9 -10
  120. package/fesm2022/mtxAlert.mjs.map +1 -1
  121. package/fesm2022/mtxButton.mjs +7 -7
  122. package/fesm2022/mtxButton.mjs.map +1 -1
  123. package/fesm2022/mtxCheckboxGroup.mjs +12 -16
  124. package/fesm2022/mtxCheckboxGroup.mjs.map +1 -1
  125. package/fesm2022/mtxColorpicker.mjs +462 -454
  126. package/fesm2022/mtxColorpicker.mjs.map +1 -1
  127. package/fesm2022/mtxColumnResize.mjs +43 -41
  128. package/fesm2022/mtxColumnResize.mjs.map +1 -1
  129. package/fesm2022/mtxCore.mjs +34 -39
  130. package/fesm2022/mtxCore.mjs.map +1 -1
  131. package/fesm2022/mtxDatetimepicker.mjs +814 -781
  132. package/fesm2022/mtxDatetimepicker.mjs.map +1 -1
  133. package/fesm2022/mtxDialog.mjs +44 -22
  134. package/fesm2022/mtxDialog.mjs.map +1 -1
  135. package/fesm2022/mtxDrawer.mjs +14 -15
  136. package/fesm2022/mtxDrawer.mjs.map +1 -1
  137. package/fesm2022/mtxGrid.mjs +249 -180
  138. package/fesm2022/mtxGrid.mjs.map +1 -1
  139. package/fesm2022/mtxLoader.mjs +11 -14
  140. package/fesm2022/mtxLoader.mjs.map +1 -1
  141. package/fesm2022/mtxPhotoviewer.mjs +9 -9
  142. package/fesm2022/mtxPhotoviewer.mjs.map +1 -1
  143. package/fesm2022/mtxPopover.mjs +52 -29
  144. package/fesm2022/mtxPopover.mjs.map +1 -1
  145. package/fesm2022/mtxProgress.mjs +10 -12
  146. package/fesm2022/mtxProgress.mjs.map +1 -1
  147. package/fesm2022/mtxSelect.mjs +75 -64
  148. package/fesm2022/mtxSelect.mjs.map +1 -1
  149. package/fesm2022/mtxSplit.mjs +14 -15
  150. package/fesm2022/mtxSplit.mjs.map +1 -1
  151. package/fesm2022/mtxTooltip.mjs +124 -121
  152. package/fesm2022/mtxTooltip.mjs.map +1 -1
  153. package/grid/cell.d.ts +1 -1
  154. package/grid/column-menu.d.ts +1 -1
  155. package/grid/column-resize/column-resize-directives/column-resize-flex.d.ts +1 -1
  156. package/grid/column-resize/column-resize-directives/column-resize.d.ts +1 -1
  157. package/grid/column-resize/column-resize-module.d.ts +7 -6
  158. package/grid/column-resize/index.d.ts +7 -0
  159. package/grid/column-resize/overlay-handle.d.ts +1 -1
  160. package/grid/column-resize/resizable-directives/resizable.d.ts +1 -1
  161. package/grid/expansion-toggle.d.ts +1 -1
  162. package/grid/grid-module.d.ts +25 -25
  163. package/grid/grid-pipes.d.ts +7 -7
  164. package/grid/grid.d.ts +24 -24
  165. package/loader/loader-module.d.ts +5 -5
  166. package/loader/loader.d.ts +1 -1
  167. package/package.json +6 -6
  168. package/photoviewer/photoviewer-module.d.ts +1 -1
  169. package/photoviewer/photoviewer.d.ts +1 -1
  170. package/popover/popover-content.d.ts +1 -1
  171. package/popover/popover-module.d.ts +8 -8
  172. package/popover/popover-target.d.ts +1 -1
  173. package/popover/popover-trigger.d.ts +1 -1
  174. package/popover/popover.d.ts +1 -1
  175. package/prebuilt-themes/deeppurple-amber.css +1 -1
  176. package/prebuilt-themes/indigo-pink.css +1 -1
  177. package/prebuilt-themes/pink-bluegrey.css +1 -1
  178. package/prebuilt-themes/purple-green.css +1 -1
  179. package/progress/progress-module.d.ts +3 -3
  180. package/progress/progress.d.ts +1 -1
  181. package/select/option.d.ts +1 -1
  182. package/select/select-module.d.ts +7 -7
  183. package/select/select.d.ts +1 -1
  184. package/select/select.scss +9 -10
  185. package/select/templates.d.ts +11 -11
  186. package/split/split-module.d.ts +4 -4
  187. package/split/split-pane.d.ts +1 -1
  188. package/split/split.d.ts +1 -1
  189. package/tooltip/tooltip-module.d.ts +7 -7
  190. package/tooltip/tooltip.d.ts +30 -44
  191. package/tooltip/tooltip.scss +2 -4
  192. package/core/mdc-helpers/_mdc-helpers.scss +0 -31
  193. package/core/style/_validation.scss +0 -43
  194. package/core/theming/_inspection.scss +0 -303
  195. package/core/theming/_m2-inspection.scss +0 -266
@@ -1,15 +1,11 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { Component, ViewEncapsulation, ChangeDetectionStrategy, Inject, Injectable, NgModule } from '@angular/core';
3
- import * as i2 from '@angular/common';
4
- import { CommonModule } from '@angular/common';
3
+ import { AsyncPipe, NgClass, CommonModule } from '@angular/common';
5
4
  import * as i1 from '@angular/material/dialog';
6
5
  import { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
7
- import * as i3 from '@angular/material/button';
8
- import { MatButtonModule } from '@angular/material/button';
9
- import * as i4 from '@angular/material/icon';
10
- import { MatIconModule } from '@angular/material/icon';
11
- import * as i5 from '@ng-matero/extensions/core';
12
- import { MtxPipesModule } from '@ng-matero/extensions/core';
6
+ import { MatButton, MatIconButton, MatFabButton, MatMiniFabButton, MatButtonModule } from '@angular/material/button';
7
+ import { MatIcon, MatIconModule } from '@angular/material/icon';
8
+ import { MtxToObservablePipe, MtxPipesModule } from '@ng-matero/extensions/core';
13
9
 
14
10
  class MtxDialogContainer {
15
11
  constructor(dialogRef, data) {
@@ -25,14 +21,23 @@ class MtxDialogContainer {
25
21
  _onClose() {
26
22
  this.dialogRef.close();
27
23
  }
28
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.7", ngImport: i0, type: MtxDialogContainer, deps: [{ token: i1.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component }); }
29
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.0.7", type: MtxDialogContainer, selector: "mtx-dialog-container", host: { classAttribute: "mtx-dialog-container" }, exportAs: ["mtxDialogContainer"], ngImport: i0, template: "@if (data.title) {\n <h1 class=\"mtx-dialog-title\">\n <span>{{data.title | toObservable | async}}</span>\n @if (data.showCloseIcon) {\n <button mat-icon-button (click)=\"_onClose()\">\n <mat-icon>close</mat-icon>\n </button>\n }\n </h1>\n}\n@if (data.description) {\n <div class=\"mtx-dialog-content\">\n <p>{{data.description | toObservable | async}}</p>\n </div>\n}\n<div class=\"mtx-dialog-actions\">\n @for (btn of data.buttons; track btn) {\n @switch (btn.type) {\n @case ('raised') {\n @if (btn.focusInitial) {\n <button mat-raised-button cdkFocusInitial\n [color]=\"btn.color\" [ngClass]=\"btn.class!\" (click)=\"_onClick(btn.onClick!)\">\n {{btn.text | toObservable | async}}\n </button>\n } @else {\n <button mat-raised-button\n [color]=\"btn.color\" [ngClass]=\"btn.class!\" (click)=\"_onClick(btn.onClick!)\">\n {{btn.text | toObservable | async}}\n </button>\n }\n }\n @case ('stroked') {\n @if (btn.focusInitial) {\n <button mat-stroked-button cdkFocusInitial\n [color]=\"btn.color\" [ngClass]=\"btn.class!\" (click)=\"_onClick(btn.onClick!)\">\n {{btn.text | toObservable | async}}\n </button>\n } @else {\n <button mat-stroked-button\n [color]=\"btn.color\" [ngClass]=\"btn.class!\" (click)=\"_onClick(btn.onClick!)\">\n {{btn.text | toObservable | async}}\n </button>\n }\n }\n @case ('flat') {\n @if (btn.focusInitial) {\n <button mat-flat-button cdkFocusInitial\n [color]=\"btn.color\" [ngClass]=\"btn.class!\" (click)=\"_onClick(btn.onClick!)\">\n {{btn.text | toObservable | async}}\n </button>\n } @else {\n <button mat-flat-button\n [color]=\"btn.color\" [ngClass]=\"btn.class!\" (click)=\"_onClick(btn.onClick!)\">\n {{btn.text | toObservable | async}}\n </button>\n }\n }\n @default {\n @if (btn.focusInitial) {\n <button mat-button cdkFocusInitial\n [color]=\"btn.color\" [ngClass]=\"btn.class!\" (click)=\"_onClick(btn.onClick!)\">\n {{btn.text | toObservable | async}}\n </button>\n } @else {\n <button mat-button\n [color]=\"btn.color\" [ngClass]=\"btn.class!\" (click)=\"_onClick(btn.onClick!)\">\n {{btn.text | toObservable | async}}\n </button>\n }\n }\n }\n }\n</div>\n", styles: [".mtx-dialog-title{display:flex;justify-content:space-between;align-items:center;padding:8px 24px;margin:0;line-height:48px;font-weight:500;font-size:20px}.mtx-dialog-title .mat-mdc-button-base{margin-right:-16px}[dir=rtl] .mtx-dialog-title .mat-mdc-button-base{margin-right:0;margin-left:-16px}.mtx-dialog-content{display:block;max-height:65vh;padding:0 24px;overflow:auto;-webkit-overflow-scrolling:touch}.mtx-dialog-content p{margin-top:0}.mtx-dialog-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;padding:8px}.mtx-dialog-actions .mat-mdc-button-base{margin-left:8px}[dir=rtl] .mtx-dialog-actions .mat-mdc-button-base{margin-left:0;margin-right:8px}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i3.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.MtxToObservablePipe, name: "toObservable" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
24
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: MtxDialogContainer, deps: [{ token: i1.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component }); }
25
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.0", type: MtxDialogContainer, isStandalone: true, selector: "mtx-dialog-container", host: { classAttribute: "mtx-dialog-container" }, exportAs: ["mtxDialogContainer"], ngImport: i0, template: "@if (data.title) {\n <h1 class=\"mtx-dialog-title\">\n <span>{{data.title | toObservable | async}}</span>\n @if (data.showCloseIcon) {\n <button mat-icon-button (click)=\"_onClose()\">\n <mat-icon>close</mat-icon>\n </button>\n }\n </h1>\n}\n@if (data.description) {\n <div class=\"mtx-dialog-content\">\n <p>{{data.description | toObservable | async}}</p>\n </div>\n}\n<div class=\"mtx-dialog-actions\">\n @for (btn of data.buttons; track btn) {\n @switch (btn.type) {\n @case ('raised') {\n @if (btn.focusInitial) {\n <button mat-raised-button cdkFocusInitial\n [color]=\"btn.color\" [ngClass]=\"btn.class!\" (click)=\"_onClick(btn.onClick!)\">\n {{btn.text | toObservable | async}}\n </button>\n } @else {\n <button mat-raised-button\n [color]=\"btn.color\" [ngClass]=\"btn.class!\" (click)=\"_onClick(btn.onClick!)\">\n {{btn.text | toObservable | async}}\n </button>\n }\n }\n @case ('stroked') {\n @if (btn.focusInitial) {\n <button mat-stroked-button cdkFocusInitial\n [color]=\"btn.color\" [ngClass]=\"btn.class!\" (click)=\"_onClick(btn.onClick!)\">\n {{btn.text | toObservable | async}}\n </button>\n } @else {\n <button mat-stroked-button\n [color]=\"btn.color\" [ngClass]=\"btn.class!\" (click)=\"_onClick(btn.onClick!)\">\n {{btn.text | toObservable | async}}\n </button>\n }\n }\n @case ('flat') {\n @if (btn.focusInitial) {\n <button mat-flat-button cdkFocusInitial\n [color]=\"btn.color\" [ngClass]=\"btn.class!\" (click)=\"_onClick(btn.onClick!)\">\n {{btn.text | toObservable | async}}\n </button>\n } @else {\n <button mat-flat-button\n [color]=\"btn.color\" [ngClass]=\"btn.class!\" (click)=\"_onClick(btn.onClick!)\">\n {{btn.text | toObservable | async}}\n </button>\n }\n }\n @default {\n @if (btn.focusInitial) {\n <button mat-button cdkFocusInitial\n [color]=\"btn.color\" [ngClass]=\"btn.class!\" (click)=\"_onClick(btn.onClick!)\">\n {{btn.text | toObservable | async}}\n </button>\n } @else {\n <button mat-button\n [color]=\"btn.color\" [ngClass]=\"btn.class!\" (click)=\"_onClick(btn.onClick!)\">\n {{btn.text | toObservable | async}}\n </button>\n }\n }\n }\n }\n</div>\n", styles: [".mtx-dialog-title{display:flex;justify-content:space-between;align-items:center;padding:8px 24px;margin:0;line-height:48px;font-weight:500;font-size:20px}.mtx-dialog-title .mat-mdc-button-base{margin-right:-16px}[dir=rtl] .mtx-dialog-title .mat-mdc-button-base{margin-right:0;margin-left:-16px}.mtx-dialog-content{display:block;max-height:65vh;padding:0 24px;overflow:auto;-webkit-overflow-scrolling:touch}.mtx-dialog-content p{margin-top:0}.mtx-dialog-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;padding:8px}.mtx-dialog-actions .mat-mdc-button-base{margin-left:8px}[dir=rtl] .mtx-dialog-actions .mat-mdc-button-base{margin-left:0;margin-right:8px}\n"], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "pipe", type: MtxToObservablePipe, name: "toObservable" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
30
26
  }
31
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.7", ngImport: i0, type: MtxDialogContainer, decorators: [{
27
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: MtxDialogContainer, decorators: [{
32
28
  type: Component,
33
29
  args: [{ selector: 'mtx-dialog-container', exportAs: 'mtxDialogContainer', host: {
34
30
  class: 'mtx-dialog-container',
35
- }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (data.title) {\n <h1 class=\"mtx-dialog-title\">\n <span>{{data.title | toObservable | async}}</span>\n @if (data.showCloseIcon) {\n <button mat-icon-button (click)=\"_onClose()\">\n <mat-icon>close</mat-icon>\n </button>\n }\n </h1>\n}\n@if (data.description) {\n <div class=\"mtx-dialog-content\">\n <p>{{data.description | toObservable | async}}</p>\n </div>\n}\n<div class=\"mtx-dialog-actions\">\n @for (btn of data.buttons; track btn) {\n @switch (btn.type) {\n @case ('raised') {\n @if (btn.focusInitial) {\n <button mat-raised-button cdkFocusInitial\n [color]=\"btn.color\" [ngClass]=\"btn.class!\" (click)=\"_onClick(btn.onClick!)\">\n {{btn.text | toObservable | async}}\n </button>\n } @else {\n <button mat-raised-button\n [color]=\"btn.color\" [ngClass]=\"btn.class!\" (click)=\"_onClick(btn.onClick!)\">\n {{btn.text | toObservable | async}}\n </button>\n }\n }\n @case ('stroked') {\n @if (btn.focusInitial) {\n <button mat-stroked-button cdkFocusInitial\n [color]=\"btn.color\" [ngClass]=\"btn.class!\" (click)=\"_onClick(btn.onClick!)\">\n {{btn.text | toObservable | async}}\n </button>\n } @else {\n <button mat-stroked-button\n [color]=\"btn.color\" [ngClass]=\"btn.class!\" (click)=\"_onClick(btn.onClick!)\">\n {{btn.text | toObservable | async}}\n </button>\n }\n }\n @case ('flat') {\n @if (btn.focusInitial) {\n <button mat-flat-button cdkFocusInitial\n [color]=\"btn.color\" [ngClass]=\"btn.class!\" (click)=\"_onClick(btn.onClick!)\">\n {{btn.text | toObservable | async}}\n </button>\n } @else {\n <button mat-flat-button\n [color]=\"btn.color\" [ngClass]=\"btn.class!\" (click)=\"_onClick(btn.onClick!)\">\n {{btn.text | toObservable | async}}\n </button>\n }\n }\n @default {\n @if (btn.focusInitial) {\n <button mat-button cdkFocusInitial\n [color]=\"btn.color\" [ngClass]=\"btn.class!\" (click)=\"_onClick(btn.onClick!)\">\n {{btn.text | toObservable | async}}\n </button>\n } @else {\n <button mat-button\n [color]=\"btn.color\" [ngClass]=\"btn.class!\" (click)=\"_onClick(btn.onClick!)\">\n {{btn.text | toObservable | async}}\n </button>\n }\n }\n }\n }\n</div>\n", styles: [".mtx-dialog-title{display:flex;justify-content:space-between;align-items:center;padding:8px 24px;margin:0;line-height:48px;font-weight:500;font-size:20px}.mtx-dialog-title .mat-mdc-button-base{margin-right:-16px}[dir=rtl] .mtx-dialog-title .mat-mdc-button-base{margin-right:0;margin-left:-16px}.mtx-dialog-content{display:block;max-height:65vh;padding:0 24px;overflow:auto;-webkit-overflow-scrolling:touch}.mtx-dialog-content p{margin-top:0}.mtx-dialog-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;padding:8px}.mtx-dialog-actions .mat-mdc-button-base{margin-left:8px}[dir=rtl] .mtx-dialog-actions .mat-mdc-button-base{margin-left:0;margin-right:8px}\n"] }]
31
+ }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
32
+ AsyncPipe,
33
+ NgClass,
34
+ MatButton,
35
+ MatIconButton,
36
+ MatFabButton,
37
+ MatMiniFabButton,
38
+ MatIcon,
39
+ MtxToObservablePipe,
40
+ ], template: "@if (data.title) {\n <h1 class=\"mtx-dialog-title\">\n <span>{{data.title | toObservable | async}}</span>\n @if (data.showCloseIcon) {\n <button mat-icon-button (click)=\"_onClose()\">\n <mat-icon>close</mat-icon>\n </button>\n }\n </h1>\n}\n@if (data.description) {\n <div class=\"mtx-dialog-content\">\n <p>{{data.description | toObservable | async}}</p>\n </div>\n}\n<div class=\"mtx-dialog-actions\">\n @for (btn of data.buttons; track btn) {\n @switch (btn.type) {\n @case ('raised') {\n @if (btn.focusInitial) {\n <button mat-raised-button cdkFocusInitial\n [color]=\"btn.color\" [ngClass]=\"btn.class!\" (click)=\"_onClick(btn.onClick!)\">\n {{btn.text | toObservable | async}}\n </button>\n } @else {\n <button mat-raised-button\n [color]=\"btn.color\" [ngClass]=\"btn.class!\" (click)=\"_onClick(btn.onClick!)\">\n {{btn.text | toObservable | async}}\n </button>\n }\n }\n @case ('stroked') {\n @if (btn.focusInitial) {\n <button mat-stroked-button cdkFocusInitial\n [color]=\"btn.color\" [ngClass]=\"btn.class!\" (click)=\"_onClick(btn.onClick!)\">\n {{btn.text | toObservable | async}}\n </button>\n } @else {\n <button mat-stroked-button\n [color]=\"btn.color\" [ngClass]=\"btn.class!\" (click)=\"_onClick(btn.onClick!)\">\n {{btn.text | toObservable | async}}\n </button>\n }\n }\n @case ('flat') {\n @if (btn.focusInitial) {\n <button mat-flat-button cdkFocusInitial\n [color]=\"btn.color\" [ngClass]=\"btn.class!\" (click)=\"_onClick(btn.onClick!)\">\n {{btn.text | toObservable | async}}\n </button>\n } @else {\n <button mat-flat-button\n [color]=\"btn.color\" [ngClass]=\"btn.class!\" (click)=\"_onClick(btn.onClick!)\">\n {{btn.text | toObservable | async}}\n </button>\n }\n }\n @default {\n @if (btn.focusInitial) {\n <button mat-button cdkFocusInitial\n [color]=\"btn.color\" [ngClass]=\"btn.class!\" (click)=\"_onClick(btn.onClick!)\">\n {{btn.text | toObservable | async}}\n </button>\n } @else {\n <button mat-button\n [color]=\"btn.color\" [ngClass]=\"btn.class!\" (click)=\"_onClick(btn.onClick!)\">\n {{btn.text | toObservable | async}}\n </button>\n }\n }\n }\n }\n</div>\n", styles: [".mtx-dialog-title{display:flex;justify-content:space-between;align-items:center;padding:8px 24px;margin:0;line-height:48px;font-weight:500;font-size:20px}.mtx-dialog-title .mat-mdc-button-base{margin-right:-16px}[dir=rtl] .mtx-dialog-title .mat-mdc-button-base{margin-right:0;margin-left:-16px}.mtx-dialog-content{display:block;max-height:65vh;padding:0 24px;overflow:auto;-webkit-overflow-scrolling:touch}.mtx-dialog-content p{margin-top:0}.mtx-dialog-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;padding:8px}.mtx-dialog-actions .mat-mdc-button-base{margin-left:8px}[dir=rtl] .mtx-dialog-actions .mat-mdc-button-base{margin-left:0;margin-right:8px}\n"] }]
36
41
  }], ctorParameters: () => [{ type: i1.MatDialogRef }, { type: undefined, decorators: [{
37
42
  type: Inject,
38
43
  args: [MAT_DIALOG_DATA]
@@ -101,24 +106,41 @@ class MtxDialog {
101
106
  ],
102
107
  });
103
108
  }
104
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.7", ngImport: i0, type: MtxDialog, deps: [{ token: i1.MatDialog }], target: i0.ɵɵFactoryTarget.Injectable }); }
105
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.7", ngImport: i0, type: MtxDialog }); }
109
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: MtxDialog, deps: [{ token: i1.MatDialog }], target: i0.ɵɵFactoryTarget.Injectable }); }
110
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: MtxDialog, providedIn: 'root' }); }
106
111
  }
107
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.7", ngImport: i0, type: MtxDialog, decorators: [{
108
- type: Injectable
112
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: MtxDialog, decorators: [{
113
+ type: Injectable,
114
+ args: [{ providedIn: 'root' }]
109
115
  }], ctorParameters: () => [{ type: i1.MatDialog }] });
110
116
 
111
117
  class MtxDialogModule {
112
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.7", ngImport: i0, type: MtxDialogModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
113
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.7", ngImport: i0, type: MtxDialogModule, declarations: [MtxDialogContainer], imports: [CommonModule, MatDialogModule, MatButtonModule, MatIconModule, MtxPipesModule], exports: [MtxDialogContainer] }); }
114
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.7", ngImport: i0, type: MtxDialogModule, providers: [MtxDialog], imports: [CommonModule, MatDialogModule, MatButtonModule, MatIconModule, MtxPipesModule] }); }
118
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: MtxDialogModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
119
+ /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.1.0", ngImport: i0, type: MtxDialogModule, imports: [CommonModule,
120
+ MatDialogModule,
121
+ MatButtonModule,
122
+ MatIconModule,
123
+ MtxPipesModule,
124
+ MtxDialogContainer], exports: [MtxDialogContainer] }); }
125
+ /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: MtxDialogModule, providers: [MtxDialog], imports: [CommonModule,
126
+ MatDialogModule,
127
+ MatButtonModule,
128
+ MatIconModule,
129
+ MtxPipesModule,
130
+ MtxDialogContainer] }); }
115
131
  }
116
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.7", ngImport: i0, type: MtxDialogModule, decorators: [{
132
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: MtxDialogModule, decorators: [{
117
133
  type: NgModule,
118
134
  args: [{
119
- imports: [CommonModule, MatDialogModule, MatButtonModule, MatIconModule, MtxPipesModule],
135
+ imports: [
136
+ CommonModule,
137
+ MatDialogModule,
138
+ MatButtonModule,
139
+ MatIconModule,
140
+ MtxPipesModule,
141
+ MtxDialogContainer,
142
+ ],
120
143
  exports: [MtxDialogContainer],
121
- declarations: [MtxDialogContainer],
122
144
  providers: [MtxDialog],
123
145
  }]
124
146
  }] });
@@ -1 +1 @@
1
- {"version":3,"file":"mtxDialog.mjs","sources":["../../../projects/extensions/dialog/dialog-container.ts","../../../projects/extensions/dialog/dialog-container.html","../../../projects/extensions/dialog/dialog.ts","../../../projects/extensions/dialog/dialog-module.ts","../../../projects/extensions/dialog/mtxDialog.ts"],"sourcesContent":["import { Component, Inject, ViewEncapsulation, ChangeDetectionStrategy } from '@angular/core';\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\n\nimport { MtxDialogData } from './dialog-config';\n\n@Component({\n selector: 'mtx-dialog-container',\n exportAs: 'mtxDialogContainer',\n templateUrl: './dialog-container.html',\n styleUrls: ['./dialog-container.scss'],\n host: {\n class: 'mtx-dialog-container',\n },\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MtxDialogContainer {\n constructor(\n public dialogRef: MatDialogRef<MtxDialogContainer>,\n @Inject(MAT_DIALOG_DATA) public data: MtxDialogData\n ) {}\n\n _onClick(fn: () => void) {\n if (fn) {\n fn.call(this);\n }\n this._onClose();\n }\n\n _onClose() {\n this.dialogRef.close();\n }\n}\n","@if (data.title) {\n <h1 class=\"mtx-dialog-title\">\n <span>{{data.title | toObservable | async}}</span>\n @if (data.showCloseIcon) {\n <button mat-icon-button (click)=\"_onClose()\">\n <mat-icon>close</mat-icon>\n </button>\n }\n </h1>\n}\n@if (data.description) {\n <div class=\"mtx-dialog-content\">\n <p>{{data.description | toObservable | async}}</p>\n </div>\n}\n<div class=\"mtx-dialog-actions\">\n @for (btn of data.buttons; track btn) {\n @switch (btn.type) {\n @case ('raised') {\n @if (btn.focusInitial) {\n <button mat-raised-button cdkFocusInitial\n [color]=\"btn.color\" [ngClass]=\"btn.class!\" (click)=\"_onClick(btn.onClick!)\">\n {{btn.text | toObservable | async}}\n </button>\n } @else {\n <button mat-raised-button\n [color]=\"btn.color\" [ngClass]=\"btn.class!\" (click)=\"_onClick(btn.onClick!)\">\n {{btn.text | toObservable | async}}\n </button>\n }\n }\n @case ('stroked') {\n @if (btn.focusInitial) {\n <button mat-stroked-button cdkFocusInitial\n [color]=\"btn.color\" [ngClass]=\"btn.class!\" (click)=\"_onClick(btn.onClick!)\">\n {{btn.text | toObservable | async}}\n </button>\n } @else {\n <button mat-stroked-button\n [color]=\"btn.color\" [ngClass]=\"btn.class!\" (click)=\"_onClick(btn.onClick!)\">\n {{btn.text | toObservable | async}}\n </button>\n }\n }\n @case ('flat') {\n @if (btn.focusInitial) {\n <button mat-flat-button cdkFocusInitial\n [color]=\"btn.color\" [ngClass]=\"btn.class!\" (click)=\"_onClick(btn.onClick!)\">\n {{btn.text | toObservable | async}}\n </button>\n } @else {\n <button mat-flat-button\n [color]=\"btn.color\" [ngClass]=\"btn.class!\" (click)=\"_onClick(btn.onClick!)\">\n {{btn.text | toObservable | async}}\n </button>\n }\n }\n @default {\n @if (btn.focusInitial) {\n <button mat-button cdkFocusInitial\n [color]=\"btn.color\" [ngClass]=\"btn.class!\" (click)=\"_onClick(btn.onClick!)\">\n {{btn.text | toObservable | async}}\n </button>\n } @else {\n <button mat-button\n [color]=\"btn.color\" [ngClass]=\"btn.class!\" (click)=\"_onClick(btn.onClick!)\">\n {{btn.text | toObservable | async}}\n </button>\n }\n }\n }\n }\n</div>\n","import { Injectable, TemplateRef } from '@angular/core';\nimport { ComponentType } from '@angular/cdk/portal';\nimport { MatDialog } from '@angular/material/dialog';\nimport { Observable } from 'rxjs';\n\nimport { MtxDialogContainer } from './dialog-container';\nimport { MtxDialogData } from './dialog-config';\n\nconst defaults: MtxDialogData = {\n title: '',\n description: '',\n buttons: [\n {\n color: 'warn',\n text: 'OK',\n focusInitial: true,\n onClick: () => {},\n },\n {\n text: 'CLOSE',\n onClick: () => {},\n },\n ],\n showCloseIcon: false,\n disableClose: true,\n width: '300px',\n};\n\n@Injectable()\nexport class MtxDialog {\n constructor(public dialog: MatDialog) {}\n\n originalOpen(\n componentOrTemplateRef: ComponentType<any> | TemplateRef<any> = MtxDialogContainer,\n config: any\n ) {\n return this.dialog.open(componentOrTemplateRef, config);\n }\n\n open(\n config: MtxDialogData,\n componentOrTemplateRef: ComponentType<any> | TemplateRef<any> = MtxDialogContainer\n ) {\n const data = Object.assign({}, defaults, config);\n return this.dialog.open(componentOrTemplateRef, {\n ...data,\n data,\n });\n }\n\n alert(\n title: string | Observable<string>,\n description: string | Observable<string> = '',\n onOk = () => {}\n ) {\n this.open({\n title,\n description,\n buttons: [\n {\n color: 'warn',\n text: 'OK',\n onClick: () => onOk(),\n },\n ],\n });\n }\n\n confirm(\n title: string | Observable<string>,\n description: string | Observable<string> = '',\n onOk = () => {},\n onClose = () => {}\n ) {\n this.open({\n title,\n description,\n buttons: [\n {\n color: 'warn',\n text: 'OK',\n onClick: () => onOk(),\n },\n {\n text: 'CLOSE',\n onClick: () => onClose(),\n },\n ],\n });\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatIconModule } from '@angular/material/icon';\n\nimport { MtxPipesModule } from '@ng-matero/extensions/core';\nimport { MtxDialogContainer } from './dialog-container';\nimport { MtxDialog } from './dialog';\n\n@NgModule({\n imports: [CommonModule, MatDialogModule, MatButtonModule, MatIconModule, MtxPipesModule],\n exports: [MtxDialogContainer],\n declarations: [MtxDialogContainer],\n providers: [MtxDialog],\n})\nexport class MtxDialogModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;MAgBa,kBAAkB,CAAA;IAC7B,WACS,CAAA,SAA2C,EAClB,IAAmB,EAAA;QAD5C,IAAS,CAAA,SAAA,GAAT,SAAS,CAAkC;QAClB,IAAI,CAAA,IAAA,GAAJ,IAAI,CAAe;KACjD;AAEJ,IAAA,QAAQ,CAAC,EAAc,EAAA;AACrB,QAAA,IAAI,EAAE,EAAE;AACN,YAAA,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,SAAA;QACD,IAAI,CAAC,QAAQ,EAAE,CAAC;KACjB;IAED,QAAQ,GAAA;AACN,QAAA,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC;KACxB;AAfU,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,kBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,8CAGnB,eAAe,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAHd,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,kBAAkB,gJChB/B,6hFAyEA,EAAA,MAAA,EAAA,CAAA,grBAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAA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C7E,kBAAkB,CAAA,EAAA,CAAA,CAAA,EAAA;AAIjB,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,EAFf,SAAA,EAAA,CAAC,SAAS,CAAC,EAHZ,OAAA,EAAA,CAAA,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,aAAa,EAAE,cAAc,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAK5E,eAAe,EAAA,UAAA,EAAA,CAAA;kBAN3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,aAAa,EAAE,cAAc,CAAC;oBACxF,OAAO,EAAE,CAAC,kBAAkB,CAAC;oBAC7B,YAAY,EAAE,CAAC,kBAAkB,CAAC;oBAClC,SAAS,EAAE,CAAC,SAAS,CAAC;AACvB,iBAAA,CAAA;;;ACfD;;AAEG;;;;"}
1
+ {"version":3,"file":"mtxDialog.mjs","sources":["../../../projects/extensions/dialog/dialog-container.ts","../../../projects/extensions/dialog/dialog-container.html","../../../projects/extensions/dialog/dialog.ts","../../../projects/extensions/dialog/dialog-module.ts","../../../projects/extensions/dialog/mtxDialog.ts"],"sourcesContent":["import { AsyncPipe, NgClass } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, Inject, ViewEncapsulation } from '@angular/core';\nimport { MatButton, MatFabButton, MatIconButton, MatMiniFabButton } from '@angular/material/button';\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\nimport { MatIcon } from '@angular/material/icon';\n\nimport { MtxToObservablePipe } from '@ng-matero/extensions/core';\nimport { MtxDialogData } from './dialog-config';\n\n@Component({\n selector: 'mtx-dialog-container',\n exportAs: 'mtxDialogContainer',\n templateUrl: './dialog-container.html',\n styleUrls: ['./dialog-container.scss'],\n host: {\n class: 'mtx-dialog-container',\n },\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n imports: [\n AsyncPipe,\n NgClass,\n MatButton,\n MatIconButton,\n MatFabButton,\n MatMiniFabButton,\n MatIcon,\n MtxToObservablePipe,\n ],\n})\nexport class MtxDialogContainer {\n constructor(\n public dialogRef: MatDialogRef<MtxDialogContainer>,\n @Inject(MAT_DIALOG_DATA) public data: MtxDialogData\n ) {}\n\n _onClick(fn: () => void) {\n if (fn) {\n fn.call(this);\n }\n this._onClose();\n }\n\n _onClose() {\n this.dialogRef.close();\n }\n}\n","@if (data.title) {\n <h1 class=\"mtx-dialog-title\">\n <span>{{data.title | toObservable | async}}</span>\n @if (data.showCloseIcon) {\n <button mat-icon-button (click)=\"_onClose()\">\n <mat-icon>close</mat-icon>\n </button>\n }\n </h1>\n}\n@if (data.description) {\n <div class=\"mtx-dialog-content\">\n <p>{{data.description | toObservable | async}}</p>\n </div>\n}\n<div class=\"mtx-dialog-actions\">\n @for (btn of data.buttons; track btn) {\n @switch (btn.type) {\n @case ('raised') {\n @if (btn.focusInitial) {\n <button mat-raised-button cdkFocusInitial\n [color]=\"btn.color\" [ngClass]=\"btn.class!\" (click)=\"_onClick(btn.onClick!)\">\n {{btn.text | toObservable | async}}\n </button>\n } @else {\n <button mat-raised-button\n [color]=\"btn.color\" [ngClass]=\"btn.class!\" (click)=\"_onClick(btn.onClick!)\">\n {{btn.text | toObservable | async}}\n </button>\n }\n }\n @case ('stroked') {\n @if (btn.focusInitial) {\n <button mat-stroked-button cdkFocusInitial\n [color]=\"btn.color\" [ngClass]=\"btn.class!\" (click)=\"_onClick(btn.onClick!)\">\n {{btn.text | toObservable | async}}\n </button>\n } @else {\n <button mat-stroked-button\n [color]=\"btn.color\" [ngClass]=\"btn.class!\" (click)=\"_onClick(btn.onClick!)\">\n {{btn.text | toObservable | async}}\n </button>\n }\n }\n @case ('flat') {\n @if (btn.focusInitial) {\n <button mat-flat-button cdkFocusInitial\n [color]=\"btn.color\" [ngClass]=\"btn.class!\" (click)=\"_onClick(btn.onClick!)\">\n {{btn.text | toObservable | async}}\n </button>\n } @else {\n <button mat-flat-button\n [color]=\"btn.color\" [ngClass]=\"btn.class!\" (click)=\"_onClick(btn.onClick!)\">\n {{btn.text | toObservable | async}}\n </button>\n }\n }\n @default {\n @if (btn.focusInitial) {\n <button mat-button cdkFocusInitial\n [color]=\"btn.color\" [ngClass]=\"btn.class!\" (click)=\"_onClick(btn.onClick!)\">\n {{btn.text | toObservable | async}}\n </button>\n } @else {\n <button mat-button\n [color]=\"btn.color\" [ngClass]=\"btn.class!\" (click)=\"_onClick(btn.onClick!)\">\n {{btn.text | toObservable | async}}\n </button>\n }\n }\n }\n }\n</div>\n","import { Injectable, TemplateRef } from '@angular/core';\nimport { ComponentType } from '@angular/cdk/portal';\nimport { MatDialog } from '@angular/material/dialog';\nimport { Observable } from 'rxjs';\n\nimport { MtxDialogContainer } from './dialog-container';\nimport { MtxDialogData } from './dialog-config';\n\nconst defaults: MtxDialogData = {\n title: '',\n description: '',\n buttons: [\n {\n color: 'warn',\n text: 'OK',\n focusInitial: true,\n onClick: () => {},\n },\n {\n text: 'CLOSE',\n onClick: () => {},\n },\n ],\n showCloseIcon: false,\n disableClose: true,\n width: '300px',\n};\n\n@Injectable({ providedIn: 'root' })\nexport class MtxDialog {\n constructor(public dialog: MatDialog) {}\n\n originalOpen(\n componentOrTemplateRef: ComponentType<any> | TemplateRef<any> = MtxDialogContainer,\n config: any\n ) {\n return this.dialog.open(componentOrTemplateRef, config);\n }\n\n open(\n config: MtxDialogData,\n componentOrTemplateRef: ComponentType<any> | TemplateRef<any> = MtxDialogContainer\n ) {\n const data = Object.assign({}, defaults, config);\n return this.dialog.open(componentOrTemplateRef, {\n ...data,\n data,\n });\n }\n\n alert(\n title: string | Observable<string>,\n description: string | Observable<string> = '',\n onOk = () => {}\n ) {\n this.open({\n title,\n description,\n buttons: [\n {\n color: 'warn',\n text: 'OK',\n onClick: () => onOk(),\n },\n ],\n });\n }\n\n confirm(\n title: string | Observable<string>,\n description: string | Observable<string> = '',\n onOk = () => {},\n onClose = () => {}\n ) {\n this.open({\n title,\n description,\n buttons: [\n {\n color: 'warn',\n text: 'OK',\n onClick: () => onOk(),\n },\n {\n text: 'CLOSE',\n onClick: () => onClose(),\n },\n ],\n });\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatIconModule } from '@angular/material/icon';\n\nimport { MtxPipesModule } from '@ng-matero/extensions/core';\nimport { MtxDialogContainer } from './dialog-container';\nimport { MtxDialog } from './dialog';\n\n@NgModule({\n imports: [\n CommonModule,\n MatDialogModule,\n MatButtonModule,\n MatIconModule,\n MtxPipesModule,\n MtxDialogContainer,\n ],\n exports: [MtxDialogContainer],\n providers: [MtxDialog],\n})\nexport class MtxDialogModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;MA+Ba,kBAAkB,CAAA;IAC7B,WACS,CAAA,SAA2C,EAClB,IAAmB,EAAA;QAD5C,IAAS,CAAA,SAAA,GAAT,SAAS,CAAkC;QAClB,IAAI,CAAA,IAAA,GAAJ,IAAI,CAAe;KACjD;AAEJ,IAAA,QAAQ,CAAC,EAAc,EAAA;QACrB,IAAI,EAAE,EAAE;AACN,YAAA,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;SACf;QACD,IAAI,CAAC,QAAQ,EAAE,CAAC;KACjB;IAED,QAAQ,GAAA;AACN,QAAA,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC;KACxB;AAfU,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,kBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,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AAC;AACvB,iBAAA,CAAA;;;ACrBD;;AAEG;;;;"}
@@ -1,6 +1,5 @@
1
1
  import * as i1$1 from '@angular/cdk/overlay';
2
2
  import { OverlayConfig, OverlayModule } from '@angular/cdk/overlay';
3
- import * as i4 from '@angular/cdk/portal';
4
3
  import { BasePortalOutlet, CdkPortalOutlet, TemplatePortal, ComponentPortal, PortalModule } from '@angular/cdk/portal';
5
4
  import * as i0 from '@angular/core';
6
5
  import { EventEmitter, Component, ChangeDetectionStrategy, ViewEncapsulation, Optional, Inject, ViewChild, InjectionToken, TemplateRef, Injector, InjectFlags, Injectable, SkipSelf, NgModule } from '@angular/core';
@@ -285,10 +284,10 @@ class MtxDrawerContainer extends BasePortalOutlet {
285
284
  });
286
285
  }
287
286
  }
288
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.7", ngImport: i0, type: MtxDrawerContainer, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1.FocusTrapFactory }, { token: i1.InteractivityChecker }, { token: i0.NgZone }, { token: i2.BreakpointObserver }, { token: DOCUMENT, optional: true }, { token: MtxDrawerConfig }], target: i0.ɵɵFactoryTarget.Component }); }
289
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.7", type: MtxDrawerContainer, selector: "mtx-drawer-container", host: { attributes: { "tabindex": "-1", "role": "dialog", "aria-modal": "true" }, listeners: { "@state.start": "_onAnimationStart($event)", "@state.done": "_onAnimationDone($event)" }, properties: { "class": "_drawerPosition", "attr.aria-label": "drawerConfig?.ariaLabel", "@state": "_animationState" }, classAttribute: "mtx-drawer-container" }, viewQueries: [{ propertyName: "_portalOutlet", first: true, predicate: CdkPortalOutlet, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"mtx-drawer-content-wrapper\" [style]=\"_getDrawerSize()\">\n <ng-template cdkPortalOutlet></ng-template>\n</div>\n", styles: [".mtx-drawer-container{display:block;outline:0;box-shadow:0 8px 10px -5px #0003,0 16px 24px 2px #00000024,0 6px 30px 5px #0000001f;background-color:var(--mtx-drawer-container-background-color);color:var(--mtx-drawer-container-text-color)}.cdk-high-contrast-active .mtx-drawer-container{outline:1px solid}.mtx-drawer-content-wrapper{box-sizing:border-box;padding:8px 16px;overflow:auto}.mtx-drawer-right{transform:translate(100%);border-top-left-radius:var(--mtx-drawer-container-shape);border-bottom-left-radius:var(--mtx-drawer-container-shape)}.mtx-drawer-left{transform:translate(-100%);border-top-right-radius:var(--mtx-drawer-container-shape);border-bottom-right-radius:var(--mtx-drawer-container-shape)}.mtx-drawer-bottom{transform:translateY(100%);border-top-left-radius:var(--mtx-drawer-container-shape);border-top-right-radius:var(--mtx-drawer-container-shape)}.mtx-drawer-top{transform:translateY(-100%);border-bottom-left-radius:var(--mtx-drawer-container-shape);border-bottom-right-radius:var(--mtx-drawer-container-shape)}\n"], dependencies: [{ kind: "directive", type: i4.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }], animations: [mtxDrawerAnimations.drawerState], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None }); }
287
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: MtxDrawerContainer, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1.FocusTrapFactory }, { token: i1.InteractivityChecker }, { token: i0.NgZone }, { token: i2.BreakpointObserver }, { token: DOCUMENT, optional: true }, { token: MtxDrawerConfig }], target: i0.ɵɵFactoryTarget.Component }); }
288
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.0", type: MtxDrawerContainer, isStandalone: true, selector: "mtx-drawer-container", host: { attributes: { "tabindex": "-1", "role": "dialog", "aria-modal": "true" }, listeners: { "@state.start": "_onAnimationStart($event)", "@state.done": "_onAnimationDone($event)" }, properties: { "class": "_drawerPosition", "attr.aria-label": "drawerConfig?.ariaLabel", "@state": "_animationState" }, classAttribute: "mtx-drawer-container" }, viewQueries: [{ propertyName: "_portalOutlet", first: true, predicate: CdkPortalOutlet, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"mtx-drawer-content-wrapper\" [style]=\"_getDrawerSize()\">\n <ng-template cdkPortalOutlet></ng-template>\n</div>\n", styles: [".mtx-drawer-container{display:block;outline:0;box-shadow:0 8px 10px -5px #0003,0 16px 24px 2px #00000024,0 6px 30px 5px #0000001f;background-color:var(--mtx-drawer-container-background-color);color:var(--mtx-drawer-container-text-color)}.cdk-high-contrast-active .mtx-drawer-container{outline:1px solid}.mtx-drawer-content-wrapper{box-sizing:border-box;padding:8px 16px;overflow:auto}.mtx-drawer-right{transform:translate(100%);border-top-left-radius:var(--mtx-drawer-container-shape);border-bottom-left-radius:var(--mtx-drawer-container-shape)}.mtx-drawer-left{transform:translate(-100%);border-top-right-radius:var(--mtx-drawer-container-shape);border-bottom-right-radius:var(--mtx-drawer-container-shape)}.mtx-drawer-bottom{transform:translateY(100%);border-top-left-radius:var(--mtx-drawer-container-shape);border-top-right-radius:var(--mtx-drawer-container-shape)}.mtx-drawer-top{transform:translateY(-100%);border-bottom-left-radius:var(--mtx-drawer-container-shape);border-bottom-right-radius:var(--mtx-drawer-container-shape)}\n"], dependencies: [{ kind: "directive", type: CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }], animations: [mtxDrawerAnimations.drawerState], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None }); }
290
289
  }
291
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.7", ngImport: i0, type: MtxDrawerContainer, decorators: [{
290
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: MtxDrawerContainer, decorators: [{
292
291
  type: Component,
293
292
  args: [{ selector: 'mtx-drawer-container', changeDetection: ChangeDetectionStrategy.Default, encapsulation: ViewEncapsulation.None, animations: [mtxDrawerAnimations.drawerState], host: {
294
293
  'class': 'mtx-drawer-container',
@@ -300,7 +299,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.7", ngImpor
300
299
  '[@state]': '_animationState',
301
300
  '(@state.start)': '_onAnimationStart($event)',
302
301
  '(@state.done)': '_onAnimationDone($event)',
303
- }, template: "<div class=\"mtx-drawer-content-wrapper\" [style]=\"_getDrawerSize()\">\n <ng-template cdkPortalOutlet></ng-template>\n</div>\n", styles: [".mtx-drawer-container{display:block;outline:0;box-shadow:0 8px 10px -5px #0003,0 16px 24px 2px #00000024,0 6px 30px 5px #0000001f;background-color:var(--mtx-drawer-container-background-color);color:var(--mtx-drawer-container-text-color)}.cdk-high-contrast-active .mtx-drawer-container{outline:1px solid}.mtx-drawer-content-wrapper{box-sizing:border-box;padding:8px 16px;overflow:auto}.mtx-drawer-right{transform:translate(100%);border-top-left-radius:var(--mtx-drawer-container-shape);border-bottom-left-radius:var(--mtx-drawer-container-shape)}.mtx-drawer-left{transform:translate(-100%);border-top-right-radius:var(--mtx-drawer-container-shape);border-bottom-right-radius:var(--mtx-drawer-container-shape)}.mtx-drawer-bottom{transform:translateY(100%);border-top-left-radius:var(--mtx-drawer-container-shape);border-top-right-radius:var(--mtx-drawer-container-shape)}.mtx-drawer-top{transform:translateY(-100%);border-bottom-left-radius:var(--mtx-drawer-container-shape);border-bottom-right-radius:var(--mtx-drawer-container-shape)}\n"] }]
302
+ }, standalone: true, imports: [CdkPortalOutlet], template: "<div class=\"mtx-drawer-content-wrapper\" [style]=\"_getDrawerSize()\">\n <ng-template cdkPortalOutlet></ng-template>\n</div>\n", styles: [".mtx-drawer-container{display:block;outline:0;box-shadow:0 8px 10px -5px #0003,0 16px 24px 2px #00000024,0 6px 30px 5px #0000001f;background-color:var(--mtx-drawer-container-background-color);color:var(--mtx-drawer-container-text-color)}.cdk-high-contrast-active .mtx-drawer-container{outline:1px solid}.mtx-drawer-content-wrapper{box-sizing:border-box;padding:8px 16px;overflow:auto}.mtx-drawer-right{transform:translate(100%);border-top-left-radius:var(--mtx-drawer-container-shape);border-bottom-left-radius:var(--mtx-drawer-container-shape)}.mtx-drawer-left{transform:translate(-100%);border-top-right-radius:var(--mtx-drawer-container-shape);border-bottom-right-radius:var(--mtx-drawer-container-shape)}.mtx-drawer-bottom{transform:translateY(100%);border-top-left-radius:var(--mtx-drawer-container-shape);border-top-right-radius:var(--mtx-drawer-container-shape)}.mtx-drawer-top{transform:translateY(-100%);border-bottom-left-radius:var(--mtx-drawer-container-shape);border-bottom-right-radius:var(--mtx-drawer-container-shape)}\n"] }]
304
303
  }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1.FocusTrapFactory }, { type: i1.InteractivityChecker }, { type: i0.NgZone }, { type: i2.BreakpointObserver }, { type: undefined, decorators: [{
305
304
  type: Optional
306
305
  }, {
@@ -528,11 +527,12 @@ class MtxDrawer {
528
527
  }
529
528
  return Injector.create({ parent: userInjector || this._injector, providers });
530
529
  }
531
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.7", ngImport: i0, type: MtxDrawer, deps: [{ token: i1$1.Overlay }, { token: i0.Injector }, { token: MtxDrawer, optional: true, skipSelf: true }, { token: MTX_DRAWER_DEFAULT_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
532
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.7", ngImport: i0, type: MtxDrawer }); }
530
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: MtxDrawer, deps: [{ token: i1$1.Overlay }, { token: i0.Injector }, { token: MtxDrawer, optional: true, skipSelf: true }, { token: MTX_DRAWER_DEFAULT_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
531
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: MtxDrawer, providedIn: 'root' }); }
533
532
  }
534
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.7", ngImport: i0, type: MtxDrawer, decorators: [{
535
- type: Injectable
533
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: MtxDrawer, decorators: [{
534
+ type: Injectable,
535
+ args: [{ providedIn: 'root' }]
536
536
  }], ctorParameters: () => [{ type: i1$1.Overlay }, { type: i0.Injector }, { type: MtxDrawer, decorators: [{
537
537
  type: Optional
538
538
  }, {
@@ -554,16 +554,15 @@ function _applyConfigDefaults(defaults, config) {
554
554
  }
555
555
 
556
556
  class MtxDrawerModule {
557
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.7", ngImport: i0, type: MtxDrawerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
558
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.7", ngImport: i0, type: MtxDrawerModule, declarations: [MtxDrawerContainer], imports: [OverlayModule, PortalModule, MatCommonModule], exports: [MtxDrawerContainer, MatCommonModule] }); }
559
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.7", ngImport: i0, type: MtxDrawerModule, providers: [MtxDrawer], imports: [OverlayModule, PortalModule, MatCommonModule, MatCommonModule] }); }
557
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: MtxDrawerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
558
+ /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.1.0", ngImport: i0, type: MtxDrawerModule, imports: [OverlayModule, PortalModule, MatCommonModule, MtxDrawerContainer], exports: [MtxDrawerContainer, MatCommonModule] }); }
559
+ /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: MtxDrawerModule, providers: [MtxDrawer], imports: [OverlayModule, PortalModule, MatCommonModule, MatCommonModule] }); }
560
560
  }
561
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.7", ngImport: i0, type: MtxDrawerModule, decorators: [{
561
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: MtxDrawerModule, decorators: [{
562
562
  type: NgModule,
563
563
  args: [{
564
- imports: [OverlayModule, PortalModule, MatCommonModule],
564
+ imports: [OverlayModule, PortalModule, MatCommonModule, MtxDrawerContainer],
565
565
  exports: [MtxDrawerContainer, MatCommonModule],
566
- declarations: [MtxDrawerContainer],
567
566
  providers: [MtxDrawer],
568
567
  }]
569
568
  }] });
@@ -1 +1 @@
1
- {"version":3,"file":"mtxDrawer.mjs","sources":["../../../projects/extensions/drawer/drawer-config.ts","../../../projects/extensions/drawer/drawer-animation.ts","../../../projects/extensions/drawer/drawer-container.ts","../../../projects/extensions/drawer/drawer-container.html","../../../projects/extensions/drawer/drawer-ref.ts","../../../projects/extensions/drawer/drawer.ts","../../../projects/extensions/drawer/drawer-module.ts","../../../projects/extensions/drawer/mtxDrawer.ts"],"sourcesContent":["import { Direction } from '@angular/cdk/bidi';\nimport { ScrollStrategy } from '@angular/cdk/overlay';\nimport { ViewContainerRef } from '@angular/core';\n\n/** Options for where to set focus to automatically on dialog open */\nexport type AutoFocusTarget = 'dialog' | 'first-tabbable' | 'first-heading';\n\n/** Possible overrides for a drawer's position. */\nexport type DrawerPosition = 'top' | 'bottom' | 'left' | 'right';\n\n/**\n * Configuration used when opening a drawer.\n */\nexport class MtxDrawerConfig<D = any> {\n /** The view container to place the overlay for the drawer into. */\n viewContainerRef?: ViewContainerRef;\n\n /** Extra CSS classes to be added to the drawer container. */\n panelClass?: string | string[];\n\n /** Text layout direction for the drawer. */\n direction?: Direction;\n\n /** Data being injected into the child component. */\n data?: D | null = null;\n\n /** Whether the drawer 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 drawer. */\n disableClose?: boolean = false;\n\n /** Aria label to assign to the drawer element. */\n ariaLabel?: string | null = null;\n\n /**\n * Whether the drawer 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 /**\n * Where the drawer should focus on open.\n * @breaking-change 14.0.0 Remove boolean option from autoFocus. Use string or\n * AutoFocusTarget instead.\n */\n // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents\n autoFocus?: AutoFocusTarget | string | boolean = 'first-tabbable';\n\n /**\n * Whether the drawer 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 drawer. */\n scrollStrategy?: ScrollStrategy;\n\n /** Position of the drawer */\n position?: DrawerPosition = 'right';\n\n /** Width of the drawer. If a number is provided, assumes pixel units. */\n width?: number | string;\n\n /** Height of the drawer. If a number is provided, assumes pixel units. */\n height?: number | string;\n\n /** Min-width of the drawer. If a number is provided, assumes pixel units. */\n minWidth?: number | string;\n\n /** Min-height of the drawer. If a number is provided, assumes pixel units. */\n minHeight?: number | string;\n\n /** Max-width of the drawer. If a number is provided, assumes pixel units. */\n maxWidth?: number | string;\n\n /** Max-height of the drawer. If a number is provided, assumes pixel units. */\n maxHeight?: number | string;\n}\n","import {\n animate,\n state,\n style,\n transition,\n trigger,\n AnimationTriggerMetadata,\n} from '@angular/animations';\n\n/** Animations used by the drawer. */\nexport const mtxDrawerAnimations: {\n readonly drawerState: AnimationTriggerMetadata;\n} = {\n /** Animation that shows and hides a drawer. */\n drawerState: trigger('state', [\n state(\n 'void, hidden',\n style({\n 'box-shadow': 'none',\n 'visibility': 'hidden',\n })\n ),\n state(\n 'visible',\n style({\n transform: 'none',\n visibility: 'visible',\n })\n ),\n transition(\n 'visible => void, visible => hidden',\n animate('400ms cubic-bezier(0.25, 0.8, 0.25, 1)')\n ),\n transition('void => visible', animate('150ms cubic-bezier(0, 0, 0.2, 1)')),\n ]),\n};\n","import { AnimationEvent } from '@angular/animations';\nimport { FocusTrap, FocusTrapFactory, InteractivityChecker } from '@angular/cdk/a11y';\nimport { coerceArray, coerceCssPixelValue } from '@angular/cdk/coercion';\nimport { BreakpointObserver, Breakpoints } from '@angular/cdk/layout';\nimport { _getFocusedElementPierceShadowDom } from '@angular/cdk/platform';\nimport {\n BasePortalOutlet,\n CdkPortalOutlet,\n ComponentPortal,\n DomPortal,\n TemplatePortal,\n} from '@angular/cdk/portal';\nimport { DOCUMENT } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ComponentRef,\n ElementRef,\n EmbeddedViewRef,\n EventEmitter,\n Inject,\n NgZone,\n OnDestroy,\n Optional,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { Subscription } from 'rxjs';\nimport { mtxDrawerAnimations } from './drawer-animation';\nimport { MtxDrawerConfig } from './drawer-config';\n\n/**\n * Internal component that wraps user-provided drawer content.\n * @docs-private\n */\n@Component({\n selector: 'mtx-drawer-container',\n templateUrl: 'drawer-container.html',\n styleUrls: ['drawer-container.scss'],\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 drawer container be OnPush,\n // because it might cause the sheets that were opened from a template not to be out of date.\n changeDetection: ChangeDetectionStrategy.Default,\n encapsulation: ViewEncapsulation.None,\n animations: [mtxDrawerAnimations.drawerState],\n host: {\n 'class': 'mtx-drawer-container',\n '[class]': '_drawerPosition',\n 'tabindex': '-1',\n 'role': 'dialog',\n 'aria-modal': 'true',\n '[attr.aria-label]': 'drawerConfig?.ariaLabel',\n '[@state]': '_animationState',\n '(@state.start)': '_onAnimationStart($event)',\n '(@state.done)': '_onAnimationDone($event)',\n },\n})\nexport class MtxDrawerContainer 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 drawer 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 drawer. */\n private _focusTrap!: FocusTrap;\n\n /** Element that was focused before the drawer 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 get _drawerPosition() {\n return `mtx-drawer-${this.drawerConfig.position}`;\n }\n\n get _drawerWidth() {\n return this.drawerConfig.position === 'left' || this.drawerConfig.position === 'right'\n ? coerceCssPixelValue(this.drawerConfig.width)\n : '100vw';\n }\n\n get _drawerHeight() {\n return this.drawerConfig.position === 'top' || this.drawerConfig.position === 'bottom'\n ? coerceCssPixelValue(this.drawerConfig.height)\n : '100vh';\n }\n\n _getDrawerSize() {\n return {\n width: this._drawerWidth,\n height: this._drawerHeight,\n minWidth: coerceCssPixelValue(this.drawerConfig.minWidth),\n minHeight: coerceCssPixelValue(this.drawerConfig.minHeight),\n maxWidth: coerceCssPixelValue(this.drawerConfig.maxWidth),\n maxHeight: coerceCssPixelValue(this.drawerConfig.maxHeight),\n };\n }\n\n constructor(\n private _elementRef: ElementRef<HTMLElement>,\n private _changeDetectorRef: ChangeDetectorRef,\n private _focusTrapFactory: FocusTrapFactory,\n private readonly _interactivityChecker: InteractivityChecker,\n private readonly _ngZone: NgZone,\n breakpointObserver: BreakpointObserver,\n @Optional() @Inject(DOCUMENT) document: any,\n /** The drawer configuration. */\n public drawerConfig: MtxDrawerConfig\n ) {\n super();\n\n this._document = document;\n this._breakpointSubscription = breakpointObserver\n .observe([Breakpoints.Medium, Breakpoints.Large, Breakpoints.XLarge])\n .subscribe(() => {});\n }\n\n /** Attach a component portal as content to this drawer 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 drawer 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 drawer 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 drawer 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 drawer exiting from view. */\n exit(): void {\n if (!this._destroyed) {\n this._animationState = 'hidden';\n this._changeDetectorRef.markForCheck();\n }\n }\n\n ngOnDestroy() {\n this._breakpointSubscription.unsubscribe();\n this._destroyed = true;\n }\n\n _onAnimationDone(event: AnimationEvent) {\n if (event.toState === 'hidden') {\n this._restoreFocus();\n } else if (event.toState === 'visible') {\n this._trapFocus();\n }\n\n this._animationStateChanged.emit(event);\n }\n\n _onAnimationStart(event: AnimationEvent) {\n this._animationStateChanged.emit(event);\n }\n\n private _toggleClass(cssClass: string, add: boolean) {\n this._elementRef.nativeElement.classList.toggle(cssClass, add);\n }\n\n private _validatePortalAttached() {\n if (this._portalOutlet.hasAttached()) {\n throw Error('Attempting to attach drawer content after content is already attached');\n }\n }\n\n private _setPanelClass() {\n const element: HTMLElement = this._elementRef.nativeElement;\n element.classList.add(...coerceArray(this.drawerConfig.panelClass || []));\n }\n\n /**\n * Focuses the provided element. If the element is not focusable, it will add a tabIndex\n * attribute to forcefully focus it. The attribute is removed after focus is moved.\n * @param element The element to focus.\n */\n private _forceFocus(element: HTMLElement, options?: FocusOptions) {\n if (!this._interactivityChecker.isFocusable(element)) {\n element.tabIndex = -1;\n // The tabindex attribute should be removed to avoid navigating to that element again\n this._ngZone.runOutsideAngular(() => {\n element.addEventListener('blur', () => element.removeAttribute('tabindex'));\n element.addEventListener('mousedown', () => element.removeAttribute('tabindex'));\n });\n }\n element.focus(options);\n }\n\n /**\n * Focuses the first element that matches the given selector within the focus trap.\n * @param selector The CSS selector for the element to set focus to.\n */\n private _focusByCssSelector(selector: string, options?: FocusOptions) {\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\n const elementToFocus = this._elementRef.nativeElement.querySelector(\n selector\n ) as HTMLElement | null;\n if (elementToFocus) {\n this._forceFocus(elementToFocus, options);\n }\n }\n\n /**\n * Moves the focus inside the focus trap. When autoFocus is not set to 'bottom-sheet',\n * if focus cannot be moved then focus will go to the drawer container.\n */\n private _trapFocus() {\n const element = this._elementRef.nativeElement;\n\n if (!this._focusTrap) {\n this._focusTrap = this._focusTrapFactory.create(element);\n }\n\n // If were to attempt to focus immediately, then the content of the drawer would not\n // yet be ready in instances where change detection has to run first. To deal with this,\n // we simply wait for the microtask queue to be empty when setting focus when autoFocus\n // isn't set to drawer. If the element inside the drawer can't be focused,\n // then the container is focused so the user can't tab into other elements behind it.\n switch (this.drawerConfig.autoFocus) {\n case false:\n case 'dialog':\n // eslint-disable-next-line no-case-declarations\n const activeElement = _getFocusedElementPierceShadowDom();\n // Ensure that focus is on the drawer 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 drawer already, because it's possible that the\n // consumer specified `autoFocus` in order to move focus themselves.\n if (activeElement !== element && !element.contains(activeElement)) {\n element.focus();\n }\n break;\n case true:\n case 'first-tabbable':\n this._focusTrap.focusInitialElementWhenReady();\n break;\n case 'first-heading':\n this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role=\"heading\"]');\n break;\n default:\n this._focusByCssSelector(this.drawerConfig.autoFocus!);\n break;\n }\n }\n\n /** Restores focus to the element that was focused before the drawer 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.drawerConfig.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 drawer or is on the body (usually because a\n // non-focusable element like the backdrop was clicked) before moving it. It's possible that\n // the consumer moved it themselves before the animation was done, in which case we shouldn't\n // do anything.\n if (\n !activeElement ||\n activeElement === this._document.body ||\n activeElement === element ||\n element.contains(activeElement)\n ) {\n toFocus.focus();\n }\n }\n\n if (this._focusTrap) {\n this._focusTrap.destroy();\n }\n }\n\n /** Saves a reference to the element that was focused before the drawer was opened. */\n private _savePreviouslyFocusedElement() {\n this._elementFocusedBeforeOpened = _getFocusedElementPierceShadowDom();\n\n // The `focus` method isn't available during server-side rendering.\n if (this._elementRef.nativeElement.focus) {\n this._ngZone.runOutsideAngular(() => {\n Promise.resolve().then(() => this._elementRef.nativeElement.focus());\n });\n }\n }\n}\n","<div class=\"mtx-drawer-content-wrapper\" [style]=\"_getDrawerSize()\">\n <ng-template cdkPortalOutlet></ng-template>\n</div>\n","import { 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 { MtxDrawerContainer } from './drawer-container';\n\n/**\n * Reference to a drawer dispatched from the drawer service.\n */\nexport class MtxDrawerRef<T = any, R = any> {\n /** Instance of the component making up the content of the drawer. */\n instance!: T;\n\n /**\n * Instance of the component into which the drawer content is projected.\n * @docs-private\n */\n containerInstance: MtxDrawerContainer;\n\n /** Whether the user is allowed to close the drawer. */\n disableClose: boolean | undefined;\n\n /** Subject for notifying the user that the drawer has been dismissed. */\n private readonly _afterDismissed = new Subject<R | undefined>();\n\n /** Subject for notifying the user that the drawer 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!: any;\n\n constructor(containerInstance: MtxDrawerContainer, private _overlayRef: OverlayRef) {\n this.containerInstance = containerInstance;\n this.disableClose = containerInstance.drawerConfig.disableClose;\n // Emit when opening animation completes\n containerInstance._animationStateChanged\n .pipe(\n filter(event => event.phaseName === 'done' && event.toState === 'visible'),\n take(1)\n )\n .subscribe(() => {\n this._afterOpened.next();\n this._afterOpened.complete();\n });\n\n // Dispose overlay when closing animation is complete\n containerInstance._animationStateChanged\n .pipe(\n filter(event => event.phaseName === 'done' && event.toState === 'hidden'),\n take(1)\n )\n .subscribe(() => {\n clearTimeout(this._closeFallbackTimeout);\n _overlayRef.dispose();\n });\n\n _overlayRef\n .detachments()\n .pipe(take(1))\n .subscribe(() => {\n this._afterDismissed.next(this._result);\n this._afterDismissed.complete();\n });\n\n merge(\n _overlayRef.backdropClick(),\n _overlayRef.keydownEvents().pipe(filter(event => event.keyCode === ESCAPE))\n ).subscribe(event => {\n if (\n !this.disableClose &&\n (event.type !== 'keydown' || !hasModifierKey(event as KeyboardEvent))\n ) {\n event.preventDefault();\n this.dismiss();\n }\n });\n }\n\n /**\n * Dismisses the drawer.\n * @param result Data to be passed back to the drawer opener.\n */\n dismiss(result?: R): void {\n if (!this._afterDismissed.closed) {\n // Transition the backdrop in parallel to the drawer.\n this.containerInstance._animationStateChanged\n .pipe(\n filter(event => event.phaseName === 'start'),\n take(1)\n )\n .subscribe(event => {\n // The logic that disposes of the overlay depends on the exit animation completing, however\n // it isn't guaranteed if the parent view is destroyed while it's running. Add a fallback\n // timeout which will clean everything up if the animation hasn't fired within the specified\n // amount of time plus 100ms. We don't need to run this outside the NgZone, because for the\n // vast majority of cases the timeout will have been cleared before it has fired.\n this._closeFallbackTimeout = setTimeout(() => {\n this._overlayRef.dispose();\n }, event.totalTime + 100);\n\n this._overlayRef.detachBackdrop();\n });\n\n this._result = result;\n this.containerInstance.exit();\n }\n }\n\n /** Gets an observable that is notified when the drawer is finished closing. */\n afterDismissed(): Observable<R | undefined> {\n return this._afterDismissed;\n }\n\n /** Gets an observable that is notified when the drawer 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","import { 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 { MtxDrawerConfig } from './drawer-config';\nimport { MtxDrawerContainer } from './drawer-container';\nimport { MtxDrawerRef } from './drawer-ref';\n\n/** Injection token that can be used to access the data that was passed in to a drawer. */\nexport const MTX_DRAWER_DATA = new InjectionToken<any>('MtxDrawerData');\n\n/** Injection token that can be used to specify default drawer options. */\nexport const MTX_DRAWER_DEFAULT_OPTIONS = new InjectionToken<MtxDrawerConfig>(\n 'mtx-drawer-default-options'\n);\n\n/**\n * Service to trigger Material Design bottom sheets.\n */\n@Injectable()\nexport class MtxDrawer implements OnDestroy {\n private _drawerRefAtThisLevel: MtxDrawerRef<any> | null = null;\n\n /** Reference to the currently opened drawer. */\n get _openedDrawerRef(): MtxDrawerRef<any> | null {\n const parent = this._parentDrawer;\n return parent ? parent._openedDrawerRef : this._drawerRefAtThisLevel;\n }\n\n set _openedDrawerRef(value: MtxDrawerRef<any> | null) {\n if (this._parentDrawer) {\n this._parentDrawer._openedDrawerRef = value;\n } else {\n this._drawerRefAtThisLevel = value;\n }\n }\n\n constructor(\n private _overlay: Overlay,\n private _injector: Injector,\n @Optional() @SkipSelf() private _parentDrawer: MtxDrawer,\n @Optional()\n @Inject(MTX_DRAWER_DEFAULT_OPTIONS)\n private _defaultOptions?: MtxDrawerConfig\n ) {}\n\n /**\n * Opens a drawer containing the given component.\n * @param component Type of the component to load into the drawer.\n * @param config Extra configuration options.\n * @returns Reference to the newly-opened drawer.\n */\n open<T, D = any, R = any>(\n component: ComponentType<T>,\n config?: MtxDrawerConfig<D>\n ): MtxDrawerRef<T, R>;\n\n /**\n * Opens a drawer containing the given template.\n * @param template TemplateRef to instantiate as the drawer content.\n * @param config Extra configuration options.\n * @returns Reference to the newly-opened drawer.\n */\n open<T, D = any, R = any>(\n template: TemplateRef<T>,\n config?: MtxDrawerConfig<D>\n ): MtxDrawerRef<T, R>;\n\n open<T, D = any, R = any>(\n componentOrTemplateRef: ComponentType<T> | TemplateRef<T>,\n config?: MtxDrawerConfig<D>\n ): MtxDrawerRef<T, R> {\n const _config = _applyConfigDefaults(this._defaultOptions || new MtxDrawerConfig(), config);\n const overlayRef = this._createOverlay(_config);\n const container = this._attachContainer(overlayRef, _config);\n const ref = new MtxDrawerRef<T, R>(container, overlayRef);\n\n if (componentOrTemplateRef instanceof TemplateRef) {\n container.attachTemplatePortal(\n new TemplatePortal<T>(componentOrTemplateRef, null!, {\n $implicit: _config.data,\n drawerRef: ref,\n } as any)\n );\n } else {\n const portal = new ComponentPortal(\n componentOrTemplateRef,\n undefined,\n this._createInjector(_config, ref)\n );\n const contentRef = container.attachComponentPortal(portal);\n ref.instance = contentRef.instance;\n }\n\n // When the drawer is dismissed, clear the reference to it.\n ref.afterDismissed().subscribe(() => {\n // Clear the drawer ref if it hasn't already been replaced by a newer one.\n if (this._openedDrawerRef == ref) {\n this._openedDrawerRef = null;\n }\n });\n\n if (this._openedDrawerRef) {\n // If a drawer is already in view, dismiss it and enter the\n // new drawer after exit animation is complete.\n this._openedDrawerRef.afterDismissed().subscribe(() => ref.containerInstance.enter());\n this._openedDrawerRef.dismiss();\n } else {\n // If no drawer is in view, enter the new drawer.\n ref.containerInstance.enter();\n }\n\n this._openedDrawerRef = ref;\n\n return ref;\n }\n\n /**\n * Dismisses the currently-visible drawer.\n * @param result Data to pass to the drawer instance.\n */\n dismiss<R = any>(result?: R): void {\n if (this._openedDrawerRef) {\n this._openedDrawerRef.dismiss(result);\n }\n }\n\n ngOnDestroy() {\n if (this._drawerRefAtThisLevel) {\n this._drawerRefAtThisLevel.dismiss();\n }\n }\n\n /**\n * Attaches the drawer container component to the overlay.\n */\n private _attachContainer(overlayRef: OverlayRef, config: MtxDrawerConfig): MtxDrawerContainer {\n const userInjector = config && config.viewContainerRef && config.viewContainerRef.injector;\n const injector = Injector.create({\n parent: userInjector || this._injector,\n providers: [{ provide: MtxDrawerConfig, useValue: config }],\n });\n\n const containerPortal = new ComponentPortal(\n MtxDrawerContainer,\n config.viewContainerRef,\n injector\n );\n const containerRef: ComponentRef<MtxDrawerContainer> = 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 drawer config.\n */\n private _createOverlay(config: MtxDrawerConfig): 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()[config.position!]('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 drawer component.\n * @param config Config that was used to create the drawer.\n * @param drawerRef Reference to the drawer.\n */\n private _createInjector<T>(config: MtxDrawerConfig, drawerRef: MtxDrawerRef<T>): Injector {\n const userInjector = config && config.viewContainerRef && config.viewContainerRef.injector;\n const providers: StaticProvider[] = [\n { provide: MtxDrawerRef, useValue: drawerRef },\n { provide: MTX_DRAWER_DATA, useValue: config.data },\n ];\n\n if (\n config.direction &&\n (!userInjector ||\n !userInjector.get<Directionality | null>(Directionality, null, InjectFlags.Optional))\n ) {\n providers.push({\n provide: Directionality,\n useValue: { value: config.direction, change: observableOf() },\n });\n }\n\n return Injector.create({ parent: userInjector || this._injector, providers });\n }\n}\n\n/**\n * Applies default options to the drawer config.\n * @param defaults Object containing the default values to which to fall back.\n * @param config The configuration to which the defaults will be applied.\n * @returns The new configuration object with defaults applied.\n */\nfunction _applyConfigDefaults(\n defaults: MtxDrawerConfig,\n config?: MtxDrawerConfig\n): MtxDrawerConfig {\n return { ...defaults, ...config };\n}\n","import { OverlayModule } from '@angular/cdk/overlay';\nimport { PortalModule } from '@angular/cdk/portal';\nimport { NgModule } from '@angular/core';\nimport { MatCommonModule } from '@angular/material/core';\nimport { MtxDrawer } from './drawer';\nimport { MtxDrawerContainer } from './drawer-container';\n\n@NgModule({\n imports: [OverlayModule, PortalModule, MatCommonModule],\n exports: [MtxDrawerContainer, MatCommonModule],\n declarations: [MtxDrawerContainer],\n providers: [MtxDrawer],\n})\nexport class MtxDrawerModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i3.MtxDrawerConfig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E,eAAe,CAAC;AACvD,oBAAA,OAAO,EAAE,CAAC,kBAAkB,EAAE,eAAe,CAAC;oBAC9C,YAAY,EAAE,CAAC,kBAAkB,CAAC;oBAClC,SAAS,EAAE,CAAC,SAAS,CAAC;AACvB,iBAAA,CAAA;;;ACZD;;AAEG;;;;"}
1
+ {"version":3,"file":"mtxDrawer.mjs","sources":["../../../projects/extensions/drawer/drawer-config.ts","../../../projects/extensions/drawer/drawer-animation.ts","../../../projects/extensions/drawer/drawer-container.ts","../../../projects/extensions/drawer/drawer-container.html","../../../projects/extensions/drawer/drawer-ref.ts","../../../projects/extensions/drawer/drawer.ts","../../../projects/extensions/drawer/drawer-module.ts","../../../projects/extensions/drawer/mtxDrawer.ts"],"sourcesContent":["import { Direction } from '@angular/cdk/bidi';\nimport { ScrollStrategy } from '@angular/cdk/overlay';\nimport { ViewContainerRef } from '@angular/core';\n\n/** Options for where to set focus to automatically on dialog open */\nexport type AutoFocusTarget = 'dialog' | 'first-tabbable' | 'first-heading';\n\n/** Possible overrides for a drawer's position. */\nexport type DrawerPosition = 'top' | 'bottom' | 'left' | 'right';\n\n/**\n * Configuration used when opening a drawer.\n */\nexport class MtxDrawerConfig<D = any> {\n /** The view container to place the overlay for the drawer into. */\n viewContainerRef?: ViewContainerRef;\n\n /** Extra CSS classes to be added to the drawer container. */\n panelClass?: string | string[];\n\n /** Text layout direction for the drawer. */\n direction?: Direction;\n\n /** Data being injected into the child component. */\n data?: D | null = null;\n\n /** Whether the drawer 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 drawer. */\n disableClose?: boolean = false;\n\n /** Aria label to assign to the drawer element. */\n ariaLabel?: string | null = null;\n\n /**\n * Whether the drawer 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 /**\n * Where the drawer should focus on open.\n * @breaking-change 14.0.0 Remove boolean option from autoFocus. Use string or\n * AutoFocusTarget instead.\n */\n // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents\n autoFocus?: AutoFocusTarget | string | boolean = 'first-tabbable';\n\n /**\n * Whether the drawer 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 drawer. */\n scrollStrategy?: ScrollStrategy;\n\n /** Position of the drawer */\n position?: DrawerPosition = 'right';\n\n /** Width of the drawer. If a number is provided, assumes pixel units. */\n width?: number | string;\n\n /** Height of the drawer. If a number is provided, assumes pixel units. */\n height?: number | string;\n\n /** Min-width of the drawer. If a number is provided, assumes pixel units. */\n minWidth?: number | string;\n\n /** Min-height of the drawer. If a number is provided, assumes pixel units. */\n minHeight?: number | string;\n\n /** Max-width of the drawer. If a number is provided, assumes pixel units. */\n maxWidth?: number | string;\n\n /** Max-height of the drawer. If a number is provided, assumes pixel units. */\n maxHeight?: number | string;\n}\n","import {\n animate,\n state,\n style,\n transition,\n trigger,\n AnimationTriggerMetadata,\n} from '@angular/animations';\n\n/** Animations used by the drawer. */\nexport const mtxDrawerAnimations: {\n readonly drawerState: AnimationTriggerMetadata;\n} = {\n /** Animation that shows and hides a drawer. */\n drawerState: trigger('state', [\n state(\n 'void, hidden',\n style({\n 'box-shadow': 'none',\n 'visibility': 'hidden',\n })\n ),\n state(\n 'visible',\n style({\n transform: 'none',\n visibility: 'visible',\n })\n ),\n transition(\n 'visible => void, visible => hidden',\n animate('400ms cubic-bezier(0.25, 0.8, 0.25, 1)')\n ),\n transition('void => visible', animate('150ms cubic-bezier(0, 0, 0.2, 1)')),\n ]),\n};\n","import { AnimationEvent } from '@angular/animations';\nimport { FocusTrap, FocusTrapFactory, InteractivityChecker } from '@angular/cdk/a11y';\nimport { coerceArray, coerceCssPixelValue } from '@angular/cdk/coercion';\nimport { BreakpointObserver, Breakpoints } from '@angular/cdk/layout';\nimport { _getFocusedElementPierceShadowDom } from '@angular/cdk/platform';\nimport {\n BasePortalOutlet,\n CdkPortalOutlet,\n ComponentPortal,\n DomPortal,\n TemplatePortal,\n} from '@angular/cdk/portal';\nimport { DOCUMENT } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ComponentRef,\n ElementRef,\n EmbeddedViewRef,\n EventEmitter,\n Inject,\n NgZone,\n OnDestroy,\n Optional,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { Subscription } from 'rxjs';\nimport { mtxDrawerAnimations } from './drawer-animation';\nimport { MtxDrawerConfig } from './drawer-config';\n\n/**\n * Internal component that wraps user-provided drawer content.\n * @docs-private\n */\n@Component({\n selector: 'mtx-drawer-container',\n templateUrl: 'drawer-container.html',\n styleUrls: ['drawer-container.scss'],\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 drawer container be OnPush,\n // because it might cause the sheets that were opened from a template not to be out of date.\n changeDetection: ChangeDetectionStrategy.Default,\n encapsulation: ViewEncapsulation.None,\n animations: [mtxDrawerAnimations.drawerState],\n host: {\n 'class': 'mtx-drawer-container',\n '[class]': '_drawerPosition',\n 'tabindex': '-1',\n 'role': 'dialog',\n 'aria-modal': 'true',\n '[attr.aria-label]': 'drawerConfig?.ariaLabel',\n '[@state]': '_animationState',\n '(@state.start)': '_onAnimationStart($event)',\n '(@state.done)': '_onAnimationDone($event)',\n },\n standalone: true,\n imports: [CdkPortalOutlet],\n})\nexport class MtxDrawerContainer 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 drawer 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 drawer. */\n private _focusTrap!: FocusTrap;\n\n /** Element that was focused before the drawer 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 get _drawerPosition() {\n return `mtx-drawer-${this.drawerConfig.position}`;\n }\n\n get _drawerWidth() {\n return this.drawerConfig.position === 'left' || this.drawerConfig.position === 'right'\n ? coerceCssPixelValue(this.drawerConfig.width)\n : '100vw';\n }\n\n get _drawerHeight() {\n return this.drawerConfig.position === 'top' || this.drawerConfig.position === 'bottom'\n ? coerceCssPixelValue(this.drawerConfig.height)\n : '100vh';\n }\n\n _getDrawerSize() {\n return {\n width: this._drawerWidth,\n height: this._drawerHeight,\n minWidth: coerceCssPixelValue(this.drawerConfig.minWidth),\n minHeight: coerceCssPixelValue(this.drawerConfig.minHeight),\n maxWidth: coerceCssPixelValue(this.drawerConfig.maxWidth),\n maxHeight: coerceCssPixelValue(this.drawerConfig.maxHeight),\n };\n }\n\n constructor(\n private _elementRef: ElementRef<HTMLElement>,\n private _changeDetectorRef: ChangeDetectorRef,\n private _focusTrapFactory: FocusTrapFactory,\n private readonly _interactivityChecker: InteractivityChecker,\n private readonly _ngZone: NgZone,\n breakpointObserver: BreakpointObserver,\n @Optional() @Inject(DOCUMENT) document: any,\n /** The drawer configuration. */\n public drawerConfig: MtxDrawerConfig\n ) {\n super();\n\n this._document = document;\n this._breakpointSubscription = breakpointObserver\n .observe([Breakpoints.Medium, Breakpoints.Large, Breakpoints.XLarge])\n .subscribe(() => {});\n }\n\n /** Attach a component portal as content to this drawer 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 drawer 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 drawer 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 drawer 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 drawer exiting from view. */\n exit(): void {\n if (!this._destroyed) {\n this._animationState = 'hidden';\n this._changeDetectorRef.markForCheck();\n }\n }\n\n ngOnDestroy() {\n this._breakpointSubscription.unsubscribe();\n this._destroyed = true;\n }\n\n _onAnimationDone(event: AnimationEvent) {\n if (event.toState === 'hidden') {\n this._restoreFocus();\n } else if (event.toState === 'visible') {\n this._trapFocus();\n }\n\n this._animationStateChanged.emit(event);\n }\n\n _onAnimationStart(event: AnimationEvent) {\n this._animationStateChanged.emit(event);\n }\n\n private _toggleClass(cssClass: string, add: boolean) {\n this._elementRef.nativeElement.classList.toggle(cssClass, add);\n }\n\n private _validatePortalAttached() {\n if (this._portalOutlet.hasAttached()) {\n throw Error('Attempting to attach drawer content after content is already attached');\n }\n }\n\n private _setPanelClass() {\n const element: HTMLElement = this._elementRef.nativeElement;\n element.classList.add(...coerceArray(this.drawerConfig.panelClass || []));\n }\n\n /**\n * Focuses the provided element. If the element is not focusable, it will add a tabIndex\n * attribute to forcefully focus it. The attribute is removed after focus is moved.\n * @param element The element to focus.\n */\n private _forceFocus(element: HTMLElement, options?: FocusOptions) {\n if (!this._interactivityChecker.isFocusable(element)) {\n element.tabIndex = -1;\n // The tabindex attribute should be removed to avoid navigating to that element again\n this._ngZone.runOutsideAngular(() => {\n element.addEventListener('blur', () => element.removeAttribute('tabindex'));\n element.addEventListener('mousedown', () => element.removeAttribute('tabindex'));\n });\n }\n element.focus(options);\n }\n\n /**\n * Focuses the first element that matches the given selector within the focus trap.\n * @param selector The CSS selector for the element to set focus to.\n */\n private _focusByCssSelector(selector: string, options?: FocusOptions) {\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\n const elementToFocus = this._elementRef.nativeElement.querySelector(\n selector\n ) as HTMLElement | null;\n if (elementToFocus) {\n this._forceFocus(elementToFocus, options);\n }\n }\n\n /**\n * Moves the focus inside the focus trap. When autoFocus is not set to 'bottom-sheet',\n * if focus cannot be moved then focus will go to the drawer container.\n */\n private _trapFocus() {\n const element = this._elementRef.nativeElement;\n\n if (!this._focusTrap) {\n this._focusTrap = this._focusTrapFactory.create(element);\n }\n\n // If were to attempt to focus immediately, then the content of the drawer would not\n // yet be ready in instances where change detection has to run first. To deal with this,\n // we simply wait for the microtask queue to be empty when setting focus when autoFocus\n // isn't set to drawer. If the element inside the drawer can't be focused,\n // then the container is focused so the user can't tab into other elements behind it.\n switch (this.drawerConfig.autoFocus) {\n case false:\n case 'dialog':\n // eslint-disable-next-line no-case-declarations\n const activeElement = _getFocusedElementPierceShadowDom();\n // Ensure that focus is on the drawer 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 drawer already, because it's possible that the\n // consumer specified `autoFocus` in order to move focus themselves.\n if (activeElement !== element && !element.contains(activeElement)) {\n element.focus();\n }\n break;\n case true:\n case 'first-tabbable':\n this._focusTrap.focusInitialElementWhenReady();\n break;\n case 'first-heading':\n this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role=\"heading\"]');\n break;\n default:\n this._focusByCssSelector(this.drawerConfig.autoFocus!);\n break;\n }\n }\n\n /** Restores focus to the element that was focused before the drawer 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.drawerConfig.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 drawer or is on the body (usually because a\n // non-focusable element like the backdrop was clicked) before moving it. It's possible that\n // the consumer moved it themselves before the animation was done, in which case we shouldn't\n // do anything.\n if (\n !activeElement ||\n activeElement === this._document.body ||\n activeElement === element ||\n element.contains(activeElement)\n ) {\n toFocus.focus();\n }\n }\n\n if (this._focusTrap) {\n this._focusTrap.destroy();\n }\n }\n\n /** Saves a reference to the element that was focused before the drawer was opened. */\n private _savePreviouslyFocusedElement() {\n this._elementFocusedBeforeOpened = _getFocusedElementPierceShadowDom();\n\n // The `focus` method isn't available during server-side rendering.\n if (this._elementRef.nativeElement.focus) {\n this._ngZone.runOutsideAngular(() => {\n Promise.resolve().then(() => this._elementRef.nativeElement.focus());\n });\n }\n }\n}\n","<div class=\"mtx-drawer-content-wrapper\" [style]=\"_getDrawerSize()\">\n <ng-template cdkPortalOutlet></ng-template>\n</div>\n","import { 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 { MtxDrawerContainer } from './drawer-container';\n\n/**\n * Reference to a drawer dispatched from the drawer service.\n */\nexport class MtxDrawerRef<T = any, R = any> {\n /** Instance of the component making up the content of the drawer. */\n instance!: T;\n\n /**\n * Instance of the component into which the drawer content is projected.\n * @docs-private\n */\n containerInstance: MtxDrawerContainer;\n\n /** Whether the user is allowed to close the drawer. */\n disableClose: boolean | undefined;\n\n /** Subject for notifying the user that the drawer has been dismissed. */\n private readonly _afterDismissed = new Subject<R | undefined>();\n\n /** Subject for notifying the user that the drawer 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!: any;\n\n constructor(containerInstance: MtxDrawerContainer, private _overlayRef: OverlayRef) {\n this.containerInstance = containerInstance;\n this.disableClose = containerInstance.drawerConfig.disableClose;\n // Emit when opening animation completes\n containerInstance._animationStateChanged\n .pipe(\n filter(event => event.phaseName === 'done' && event.toState === 'visible'),\n take(1)\n )\n .subscribe(() => {\n this._afterOpened.next();\n this._afterOpened.complete();\n });\n\n // Dispose overlay when closing animation is complete\n containerInstance._animationStateChanged\n .pipe(\n filter(event => event.phaseName === 'done' && event.toState === 'hidden'),\n take(1)\n )\n .subscribe(() => {\n clearTimeout(this._closeFallbackTimeout);\n _overlayRef.dispose();\n });\n\n _overlayRef\n .detachments()\n .pipe(take(1))\n .subscribe(() => {\n this._afterDismissed.next(this._result);\n this._afterDismissed.complete();\n });\n\n merge(\n _overlayRef.backdropClick(),\n _overlayRef.keydownEvents().pipe(filter(event => event.keyCode === ESCAPE))\n ).subscribe(event => {\n if (\n !this.disableClose &&\n (event.type !== 'keydown' || !hasModifierKey(event as KeyboardEvent))\n ) {\n event.preventDefault();\n this.dismiss();\n }\n });\n }\n\n /**\n * Dismisses the drawer.\n * @param result Data to be passed back to the drawer opener.\n */\n dismiss(result?: R): void {\n if (!this._afterDismissed.closed) {\n // Transition the backdrop in parallel to the drawer.\n this.containerInstance._animationStateChanged\n .pipe(\n filter(event => event.phaseName === 'start'),\n take(1)\n )\n .subscribe(event => {\n // The logic that disposes of the overlay depends on the exit animation completing, however\n // it isn't guaranteed if the parent view is destroyed while it's running. Add a fallback\n // timeout which will clean everything up if the animation hasn't fired within the specified\n // amount of time plus 100ms. We don't need to run this outside the NgZone, because for the\n // vast majority of cases the timeout will have been cleared before it has fired.\n this._closeFallbackTimeout = setTimeout(() => {\n this._overlayRef.dispose();\n }, event.totalTime + 100);\n\n this._overlayRef.detachBackdrop();\n });\n\n this._result = result;\n this.containerInstance.exit();\n }\n }\n\n /** Gets an observable that is notified when the drawer is finished closing. */\n afterDismissed(): Observable<R | undefined> {\n return this._afterDismissed;\n }\n\n /** Gets an observable that is notified when the drawer 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","import { 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 { MtxDrawerConfig } from './drawer-config';\nimport { MtxDrawerContainer } from './drawer-container';\nimport { MtxDrawerRef } from './drawer-ref';\n\n/** Injection token that can be used to access the data that was passed in to a drawer. */\nexport const MTX_DRAWER_DATA = new InjectionToken<any>('MtxDrawerData');\n\n/** Injection token that can be used to specify default drawer options. */\nexport const MTX_DRAWER_DEFAULT_OPTIONS = new InjectionToken<MtxDrawerConfig>(\n 'mtx-drawer-default-options'\n);\n\n/**\n * Service to trigger Material Design bottom sheets.\n */\n@Injectable({ providedIn: 'root' })\nexport class MtxDrawer implements OnDestroy {\n private _drawerRefAtThisLevel: MtxDrawerRef<any> | null = null;\n\n /** Reference to the currently opened drawer. */\n get _openedDrawerRef(): MtxDrawerRef<any> | null {\n const parent = this._parentDrawer;\n return parent ? parent._openedDrawerRef : this._drawerRefAtThisLevel;\n }\n\n set _openedDrawerRef(value: MtxDrawerRef<any> | null) {\n if (this._parentDrawer) {\n this._parentDrawer._openedDrawerRef = value;\n } else {\n this._drawerRefAtThisLevel = value;\n }\n }\n\n constructor(\n private _overlay: Overlay,\n private _injector: Injector,\n @Optional() @SkipSelf() private _parentDrawer: MtxDrawer,\n @Optional()\n @Inject(MTX_DRAWER_DEFAULT_OPTIONS)\n private _defaultOptions?: MtxDrawerConfig\n ) {}\n\n /**\n * Opens a drawer containing the given component.\n * @param component Type of the component to load into the drawer.\n * @param config Extra configuration options.\n * @returns Reference to the newly-opened drawer.\n */\n open<T, D = any, R = any>(\n component: ComponentType<T>,\n config?: MtxDrawerConfig<D>\n ): MtxDrawerRef<T, R>;\n\n /**\n * Opens a drawer containing the given template.\n * @param template TemplateRef to instantiate as the drawer content.\n * @param config Extra configuration options.\n * @returns Reference to the newly-opened drawer.\n */\n open<T, D = any, R = any>(\n template: TemplateRef<T>,\n config?: MtxDrawerConfig<D>\n ): MtxDrawerRef<T, R>;\n\n open<T, D = any, R = any>(\n componentOrTemplateRef: ComponentType<T> | TemplateRef<T>,\n config?: MtxDrawerConfig<D>\n ): MtxDrawerRef<T, R> {\n const _config = _applyConfigDefaults(this._defaultOptions || new MtxDrawerConfig(), config);\n const overlayRef = this._createOverlay(_config);\n const container = this._attachContainer(overlayRef, _config);\n const ref = new MtxDrawerRef<T, R>(container, overlayRef);\n\n if (componentOrTemplateRef instanceof TemplateRef) {\n container.attachTemplatePortal(\n new TemplatePortal<T>(componentOrTemplateRef, null!, {\n $implicit: _config.data,\n drawerRef: ref,\n } as any)\n );\n } else {\n const portal = new ComponentPortal(\n componentOrTemplateRef,\n undefined,\n this._createInjector(_config, ref)\n );\n const contentRef = container.attachComponentPortal(portal);\n ref.instance = contentRef.instance;\n }\n\n // When the drawer is dismissed, clear the reference to it.\n ref.afterDismissed().subscribe(() => {\n // Clear the drawer ref if it hasn't already been replaced by a newer one.\n if (this._openedDrawerRef == ref) {\n this._openedDrawerRef = null;\n }\n });\n\n if (this._openedDrawerRef) {\n // If a drawer is already in view, dismiss it and enter the\n // new drawer after exit animation is complete.\n this._openedDrawerRef.afterDismissed().subscribe(() => ref.containerInstance.enter());\n this._openedDrawerRef.dismiss();\n } else {\n // If no drawer is in view, enter the new drawer.\n ref.containerInstance.enter();\n }\n\n this._openedDrawerRef = ref;\n\n return ref;\n }\n\n /**\n * Dismisses the currently-visible drawer.\n * @param result Data to pass to the drawer instance.\n */\n dismiss<R = any>(result?: R): void {\n if (this._openedDrawerRef) {\n this._openedDrawerRef.dismiss(result);\n }\n }\n\n ngOnDestroy() {\n if (this._drawerRefAtThisLevel) {\n this._drawerRefAtThisLevel.dismiss();\n }\n }\n\n /**\n * Attaches the drawer container component to the overlay.\n */\n private _attachContainer(overlayRef: OverlayRef, config: MtxDrawerConfig): MtxDrawerContainer {\n const userInjector = config && config.viewContainerRef && config.viewContainerRef.injector;\n const injector = Injector.create({\n parent: userInjector || this._injector,\n providers: [{ provide: MtxDrawerConfig, useValue: config }],\n });\n\n const containerPortal = new ComponentPortal(\n MtxDrawerContainer,\n config.viewContainerRef,\n injector\n );\n const containerRef: ComponentRef<MtxDrawerContainer> = 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 drawer config.\n */\n private _createOverlay(config: MtxDrawerConfig): 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()[config.position!]('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 drawer component.\n * @param config Config that was used to create the drawer.\n * @param drawerRef Reference to the drawer.\n */\n private _createInjector<T>(config: MtxDrawerConfig, drawerRef: MtxDrawerRef<T>): Injector {\n const userInjector = config && config.viewContainerRef && config.viewContainerRef.injector;\n const providers: StaticProvider[] = [\n { provide: MtxDrawerRef, useValue: drawerRef },\n { provide: MTX_DRAWER_DATA, useValue: config.data },\n ];\n\n if (\n config.direction &&\n (!userInjector ||\n !userInjector.get<Directionality | null>(Directionality, null, InjectFlags.Optional))\n ) {\n providers.push({\n provide: Directionality,\n useValue: { value: config.direction, change: observableOf() },\n });\n }\n\n return Injector.create({ parent: userInjector || this._injector, providers });\n }\n}\n\n/**\n * Applies default options to the drawer config.\n * @param defaults Object containing the default values to which to fall back.\n * @param config The configuration to which the defaults will be applied.\n * @returns The new configuration object with defaults applied.\n */\nfunction _applyConfigDefaults(\n defaults: MtxDrawerConfig,\n config?: MtxDrawerConfig\n): MtxDrawerConfig {\n return { ...defaults, ...config };\n}\n","import { OverlayModule } from '@angular/cdk/overlay';\nimport { PortalModule } from '@angular/cdk/portal';\nimport { NgModule } from '@angular/core';\nimport { MatCommonModule } from '@angular/material/core';\nimport { MtxDrawer } from './drawer';\nimport { MtxDrawerContainer } from './drawer-container';\n\n@NgModule({\n imports: [OverlayModule, PortalModule, MatCommonModule, MtxDrawerContainer],\n exports: [MtxDrawerContainer, MatCommonModule],\n providers: [MtxDrawer],\n})\nexport class MtxDrawerModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i3.MtxDrawerConfig","observableOf"],"mappings":";;;;;;;;;;;;;;;;;;AAUA;;AAEG;MACU,eAAe,CAAA;AAA5B,IAAA,WAAA,GAAA;;QAWE,IAAI,CAAA,IAAA,GAAc,IAAI,CAAC;;QAGvB,IAAW,CAAA,WAAA,GAAa,IAAI,CAAC;;QAM7B,IAAY,CAAA,YAAA,GAAa,KAAK,CAAC;;QAG/B,IAAS,CAAA,SAAA,GAAmB,IAAI,CAAC;AAEjC;;;;AAIG;QACH,IAAiB,CAAA,iBAAA,GAAa,IAAI,CAAC;AAEnC;;;;AAIG;;QAEH,IAAS,CAAA,SAAA,GAAwC,gBAAgB,CAAC;AAElE;;;AAGG;QACH,IAAY,CAAA,YAAA,GAAa,IAAI,CAAC;;QAM9B,IAAQ,CAAA,QAAA,GAAoB,OAAO,CAAC;KAmBrC;AAAA;;ACzED;AACa,MAAA,mBAAmB,GAE5B;;AAEF,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