@ng-matero/extensions 15.5.1 → 16.0.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 (324) hide show
  1. package/alert/alert.d.ts +1 -1
  2. package/button/button-loading.d.ts +1 -1
  3. package/checkbox-group/checkbox-group.d.ts +1 -1
  4. package/colorpicker/colorpicker-input.d.ts +1 -1
  5. package/colorpicker/colorpicker-toggle.d.ts +1 -1
  6. package/colorpicker/colorpicker.d.ts +2 -2
  7. package/datetimepicker/calendar-body.d.ts +1 -1
  8. package/datetimepicker/calendar.d.ts +1 -1
  9. package/datetimepicker/clock.d.ts +1 -1
  10. package/datetimepicker/clock.scss +1 -4
  11. package/datetimepicker/datetimepicker-input.d.ts +1 -1
  12. package/datetimepicker/datetimepicker-toggle.d.ts +1 -1
  13. package/datetimepicker/datetimepicker.d.ts +2 -2
  14. package/datetimepicker/month-view.d.ts +1 -1
  15. package/datetimepicker/multi-year-view.d.ts +1 -1
  16. package/datetimepicker/time.d.ts +2 -2
  17. package/datetimepicker/year-view.d.ts +1 -1
  18. package/esm2022/alert/alert-module.mjs +19 -0
  19. package/esm2022/alert/alert.mjs +53 -0
  20. package/esm2022/button/button-loading.mjs +77 -0
  21. package/esm2022/button/button-module.mjs +21 -0
  22. package/esm2022/checkbox-group/checkbox-group-module.mjs +22 -0
  23. package/esm2022/checkbox-group/checkbox-group.mjs +234 -0
  24. package/esm2022/colorpicker/colorpicker-input.mjs +229 -0
  25. package/esm2022/colorpicker/colorpicker-module.mjs +64 -0
  26. package/esm2022/colorpicker/colorpicker-toggle.mjs +103 -0
  27. package/esm2022/colorpicker/colorpicker.mjs +367 -0
  28. package/esm2022/column-resize/column-resize-directives/column-resize-flex.mjs +46 -0
  29. package/esm2022/column-resize/column-resize-directives/column-resize.mjs +46 -0
  30. package/esm2022/column-resize/column-resize-module.mjs +29 -0
  31. package/esm2022/column-resize/column-resize-notifier.mjs +49 -0
  32. package/esm2022/column-resize/column-resize.mjs +83 -0
  33. package/esm2022/column-resize/column-size-store.mjs +21 -0
  34. package/esm2022/column-resize/event-dispatcher.mjs +68 -0
  35. package/esm2022/column-resize/overlay-handle.mjs +147 -0
  36. package/esm2022/column-resize/resizable.mjs +200 -0
  37. package/esm2022/column-resize/resize-strategy.mjs +235 -0
  38. package/{esm2020 → esm2022}/core/datetime/datetime-adapter.mjs +1 -1
  39. package/esm2022/core/datetime/datetime.module.mjs +44 -0
  40. package/esm2022/core/datetime/native-datetime-adapter.mjs +139 -0
  41. package/esm2022/core/pipes/is-template-ref.pipe.mjs +15 -0
  42. package/esm2022/core/pipes/pipes.module.mjs +20 -0
  43. package/esm2022/core/pipes/to-observable.pipe.mjs +16 -0
  44. package/esm2022/datetimepicker/calendar-body.mjs +79 -0
  45. package/esm2022/datetimepicker/calendar.mjs +672 -0
  46. package/esm2022/datetimepicker/clock.mjs +354 -0
  47. package/esm2022/datetimepicker/datetimepicker-input.mjs +350 -0
  48. package/esm2022/datetimepicker/datetimepicker-intl.mjs +64 -0
  49. package/esm2022/datetimepicker/datetimepicker-module.mjs +83 -0
  50. package/esm2022/datetimepicker/datetimepicker-toggle.mjs +106 -0
  51. package/esm2022/datetimepicker/datetimepicker.mjs +529 -0
  52. package/esm2022/datetimepicker/month-view.mjs +149 -0
  53. package/esm2022/datetimepicker/multi-year-view.mjs +215 -0
  54. package/esm2022/datetimepicker/time.mjs +458 -0
  55. package/esm2022/datetimepicker/year-view.mjs +139 -0
  56. package/esm2022/dialog/dialog-container.mjs +36 -0
  57. package/esm2022/dialog/dialog-module.mjs +25 -0
  58. package/esm2022/dialog/dialog.mjs +75 -0
  59. package/esm2022/drawer/drawer-container.mjs +253 -0
  60. package/esm2022/drawer/drawer-module.mjs +23 -0
  61. package/esm2022/drawer/drawer.mjs +167 -0
  62. package/esm2022/grid/cell.mjs +117 -0
  63. package/{esm2020 → esm2022}/grid/column-menu.mjs +6 -5
  64. package/esm2022/grid/column-resize/column-resize-directives/column-resize-flex.mjs +38 -0
  65. package/esm2022/grid/column-resize/column-resize-directives/column-resize.mjs +38 -0
  66. package/esm2022/grid/column-resize/column-resize-module.mjs +44 -0
  67. package/esm2022/grid/column-resize/overlay-handle.mjs +61 -0
  68. package/esm2022/grid/column-resize/resizable-directives/resizable.mjs +63 -0
  69. package/esm2022/grid/column-resize/resize-strategy.mjs +43 -0
  70. package/esm2022/grid/expansion-toggle.mjs +65 -0
  71. package/esm2022/grid/grid-module.mjs +137 -0
  72. package/esm2022/grid/grid-pipes.mjs +113 -0
  73. package/esm2022/grid/grid-utils.mjs +64 -0
  74. package/esm2022/grid/grid.mjs +630 -0
  75. package/esm2022/loader/loader-module.mjs +21 -0
  76. package/esm2022/loader/loader.mjs +70 -0
  77. package/esm2022/popover/popover-content.mjs +92 -0
  78. package/esm2022/popover/popover-module.mjs +25 -0
  79. package/esm2022/popover/popover-target.mjs +18 -0
  80. package/esm2022/popover/popover-trigger.mjs +472 -0
  81. package/esm2022/popover/popover.mjs +384 -0
  82. package/esm2022/progress/progress-module.mjs +19 -0
  83. package/esm2022/progress/progress.mjs +56 -0
  84. package/esm2022/select/option.mjs +58 -0
  85. package/esm2022/select/select-module.mjs +75 -0
  86. package/esm2022/select/select.mjs +561 -0
  87. package/esm2022/select/templates.mjs +135 -0
  88. package/esm2022/slider/slider-module.mjs +20 -0
  89. package/esm2022/slider/slider.mjs +1116 -0
  90. package/esm2022/split/split-module.mjs +20 -0
  91. package/esm2022/split/split-pane.mjs +150 -0
  92. package/esm2022/split/split.mjs +635 -0
  93. package/esm2022/tooltip/tooltip-module.mjs +25 -0
  94. package/esm2022/tooltip/tooltip.mjs +930 -0
  95. package/{fesm2020 → fesm2022}/mtxAlert.mjs +7 -7
  96. package/{fesm2020 → fesm2022}/mtxAlert.mjs.map +1 -1
  97. package/{fesm2020 → fesm2022}/mtxButton.mjs +7 -7
  98. package/{fesm2015 → fesm2022}/mtxButton.mjs.map +1 -1
  99. package/{fesm2020 → fesm2022}/mtxCheckboxGroup.mjs +13 -13
  100. package/{fesm2020 → fesm2022}/mtxCheckboxGroup.mjs.map +1 -1
  101. package/{fesm2020 → fesm2022}/mtxColorpicker.mjs +41 -41
  102. package/{fesm2020 → fesm2022}/mtxColorpicker.mjs.map +1 -1
  103. package/{fesm2020 → fesm2022}/mtxColumnResize.mjs +46 -46
  104. package/{fesm2015 → fesm2022}/mtxColumnResize.mjs.map +1 -1
  105. package/{fesm2020 → fesm2022}/mtxCore.mjs +26 -26
  106. package/fesm2022/mtxCore.mjs.map +1 -0
  107. package/{fesm2020 → fesm2022}/mtxDatetimepicker.mjs +84 -80
  108. package/fesm2022/mtxDatetimepicker.mjs.map +1 -0
  109. package/{fesm2020 → fesm2022}/mtxDialog.mjs +10 -10
  110. package/{fesm2015 → fesm2022}/mtxDialog.mjs.map +1 -1
  111. package/{fesm2020 → fesm2022}/mtxDrawer.mjs +10 -10
  112. package/{fesm2020 → fesm2022}/mtxDrawer.mjs.map +1 -1
  113. package/{fesm2020 → fesm2022}/mtxGrid.mjs +120 -120
  114. package/{fesm2020 → fesm2022}/mtxGrid.mjs.map +1 -1
  115. package/{fesm2020 → fesm2022}/mtxLoader.mjs +7 -7
  116. package/{fesm2020 → fesm2022}/mtxLoader.mjs.map +1 -1
  117. package/{fesm2020 → fesm2022}/mtxPopover.mjs +19 -19
  118. package/{fesm2020 → fesm2022}/mtxPopover.mjs.map +1 -1
  119. package/{fesm2020 → fesm2022}/mtxProgress.mjs +7 -7
  120. package/{fesm2015 → fesm2022}/mtxProgress.mjs.map +1 -1
  121. package/{fesm2020 → fesm2022}/mtxSelect.mjs +67 -67
  122. package/{fesm2015 → fesm2022}/mtxSelect.mjs.map +1 -1
  123. package/{fesm2020 → fesm2022}/mtxSlider.mjs +7 -7
  124. package/{fesm2020 → fesm2022}/mtxSlider.mjs.map +1 -1
  125. package/{fesm2020 → fesm2022}/mtxSplit.mjs +10 -10
  126. package/{fesm2020 → fesm2022}/mtxSplit.mjs.map +1 -1
  127. package/{fesm2020 → fesm2022}/mtxTooltip.mjs +16 -16
  128. package/{fesm2015 → fesm2022}/mtxTooltip.mjs.map +1 -1
  129. package/grid/cell.d.ts +1 -1
  130. package/grid/column-menu.d.ts +1 -1
  131. package/grid/column-resize/resizable-directives/resizable.d.ts +1 -1
  132. package/grid/expansion-toggle.d.ts +1 -1
  133. package/grid/grid.d.ts +2 -2
  134. package/loader/loader.d.ts +1 -1
  135. package/package.json +69 -109
  136. package/popover/popover-trigger.d.ts +1 -1
  137. package/popover/popover.d.ts +1 -1
  138. package/progress/progress.d.ts +1 -1
  139. package/select/option.d.ts +1 -1
  140. package/select/select.d.ts +1 -1
  141. package/slider/slider.d.ts +1 -1
  142. package/split/split-pane.d.ts +1 -1
  143. package/split/split.d.ts +1 -1
  144. package/tooltip/tooltip.d.ts +1 -1
  145. package/tooltip/tooltip.scss +1 -4
  146. package/esm2020/alert/alert-module.mjs +0 -18
  147. package/esm2020/alert/alert.mjs +0 -52
  148. package/esm2020/button/button-loading.mjs +0 -76
  149. package/esm2020/button/button-module.mjs +0 -20
  150. package/esm2020/checkbox-group/checkbox-group-module.mjs +0 -21
  151. package/esm2020/checkbox-group/checkbox-group.mjs +0 -233
  152. package/esm2020/colorpicker/colorpicker-input.mjs +0 -228
  153. package/esm2020/colorpicker/colorpicker-module.mjs +0 -63
  154. package/esm2020/colorpicker/colorpicker-toggle.mjs +0 -101
  155. package/esm2020/colorpicker/colorpicker.mjs +0 -365
  156. package/esm2020/column-resize/column-resize-directives/column-resize-flex.mjs +0 -45
  157. package/esm2020/column-resize/column-resize-directives/column-resize.mjs +0 -45
  158. package/esm2020/column-resize/column-resize-module.mjs +0 -28
  159. package/esm2020/column-resize/column-resize-notifier.mjs +0 -47
  160. package/esm2020/column-resize/column-resize.mjs +0 -82
  161. package/esm2020/column-resize/column-size-store.mjs +0 -20
  162. package/esm2020/column-resize/event-dispatcher.mjs +0 -67
  163. package/esm2020/column-resize/overlay-handle.mjs +0 -146
  164. package/esm2020/column-resize/resizable.mjs +0 -199
  165. package/esm2020/column-resize/resize-strategy.mjs +0 -232
  166. package/esm2020/core/datetime/datetime.module.mjs +0 -42
  167. package/esm2020/core/datetime/native-datetime-adapter.mjs +0 -138
  168. package/esm2020/core/pipes/is-template-ref.pipe.mjs +0 -14
  169. package/esm2020/core/pipes/pipes.module.mjs +0 -19
  170. package/esm2020/core/pipes/to-observable.pipe.mjs +0 -15
  171. package/esm2020/datetimepicker/calendar-body.mjs +0 -78
  172. package/esm2020/datetimepicker/calendar.mjs +0 -671
  173. package/esm2020/datetimepicker/clock.mjs +0 -349
  174. package/esm2020/datetimepicker/datetimepicker-input.mjs +0 -349
  175. package/esm2020/datetimepicker/datetimepicker-intl.mjs +0 -63
  176. package/esm2020/datetimepicker/datetimepicker-module.mjs +0 -82
  177. package/esm2020/datetimepicker/datetimepicker-toggle.mjs +0 -104
  178. package/esm2020/datetimepicker/datetimepicker.mjs +0 -527
  179. package/esm2020/datetimepicker/month-view.mjs +0 -148
  180. package/esm2020/datetimepicker/multi-year-view.mjs +0 -214
  181. package/esm2020/datetimepicker/time.mjs +0 -456
  182. package/esm2020/datetimepicker/year-view.mjs +0 -138
  183. package/esm2020/dialog/dialog-container.mjs +0 -35
  184. package/esm2020/dialog/dialog-module.mjs +0 -24
  185. package/esm2020/dialog/dialog.mjs +0 -74
  186. package/esm2020/drawer/drawer-container.mjs +0 -252
  187. package/esm2020/drawer/drawer-module.mjs +0 -22
  188. package/esm2020/drawer/drawer.mjs +0 -166
  189. package/esm2020/grid/cell.mjs +0 -116
  190. package/esm2020/grid/column-resize/column-resize-directives/column-resize-flex.mjs +0 -37
  191. package/esm2020/grid/column-resize/column-resize-directives/column-resize.mjs +0 -37
  192. package/esm2020/grid/column-resize/column-resize-module.mjs +0 -42
  193. package/esm2020/grid/column-resize/overlay-handle.mjs +0 -60
  194. package/esm2020/grid/column-resize/resizable-directives/resizable.mjs +0 -62
  195. package/esm2020/grid/column-resize/resize-strategy.mjs +0 -42
  196. package/esm2020/grid/expansion-toggle.mjs +0 -64
  197. package/esm2020/grid/grid-module.mjs +0 -136
  198. package/esm2020/grid/grid-pipes.mjs +0 -108
  199. package/esm2020/grid/grid-utils.mjs +0 -63
  200. package/esm2020/grid/grid.mjs +0 -628
  201. package/esm2020/loader/loader-module.mjs +0 -20
  202. package/esm2020/loader/loader.mjs +0 -69
  203. package/esm2020/popover/popover-content.mjs +0 -90
  204. package/esm2020/popover/popover-module.mjs +0 -24
  205. package/esm2020/popover/popover-target.mjs +0 -17
  206. package/esm2020/popover/popover-trigger.mjs +0 -471
  207. package/esm2020/popover/popover.mjs +0 -383
  208. package/esm2020/progress/progress-module.mjs +0 -18
  209. package/esm2020/progress/progress.mjs +0 -55
  210. package/esm2020/select/option.mjs +0 -57
  211. package/esm2020/select/select-module.mjs +0 -74
  212. package/esm2020/select/select.mjs +0 -560
  213. package/esm2020/select/templates.mjs +0 -124
  214. package/esm2020/slider/slider-module.mjs +0 -19
  215. package/esm2020/slider/slider.mjs +0 -1115
  216. package/esm2020/split/split-module.mjs +0 -19
  217. package/esm2020/split/split-pane.mjs +0 -149
  218. package/esm2020/split/split.mjs +0 -634
  219. package/esm2020/tooltip/tooltip-module.mjs +0 -24
  220. package/esm2020/tooltip/tooltip.mjs +0 -926
  221. package/fesm2015/mtxAlert.mjs +0 -74
  222. package/fesm2015/mtxAlert.mjs.map +0 -1
  223. package/fesm2015/mtxButton.mjs +0 -99
  224. package/fesm2015/mtxCheckboxGroup.mjs +0 -256
  225. package/fesm2015/mtxCheckboxGroup.mjs.map +0 -1
  226. package/fesm2015/mtxColorpicker.mjs +0 -767
  227. package/fesm2015/mtxColorpicker.mjs.map +0 -1
  228. package/fesm2015/mtxColumnResize.mjs +0 -959
  229. package/fesm2015/mtxCore.mjs +0 -374
  230. package/fesm2015/mtxCore.mjs.map +0 -1
  231. package/fesm2015/mtxDatetimepicker.mjs +0 -3164
  232. package/fesm2015/mtxDatetimepicker.mjs.map +0 -1
  233. package/fesm2015/mtxDialog.mjs +0 -130
  234. package/fesm2015/mtxDrawer.mjs +0 -578
  235. package/fesm2015/mtxDrawer.mjs.map +0 -1
  236. package/fesm2015/mtxGrid.mjs +0 -1514
  237. package/fesm2015/mtxGrid.mjs.map +0 -1
  238. package/fesm2015/mtxLoader.mjs +0 -93
  239. package/fesm2015/mtxLoader.mjs.map +0 -1
  240. package/fesm2015/mtxPopover.mjs +0 -1027
  241. package/fesm2015/mtxPopover.mjs.map +0 -1
  242. package/fesm2015/mtxProgress.mjs +0 -77
  243. package/fesm2015/mtxSelect.mjs +0 -814
  244. package/fesm2015/mtxSlider.mjs +0 -1139
  245. package/fesm2015/mtxSlider.mjs.map +0 -1
  246. package/fesm2015/mtxSplit.mjs +0 -1025
  247. package/fesm2015/mtxSplit.mjs.map +0 -1
  248. package/fesm2015/mtxTooltip.mjs +0 -982
  249. package/fesm2020/mtxButton.mjs.map +0 -1
  250. package/fesm2020/mtxColumnResize.mjs.map +0 -1
  251. package/fesm2020/mtxCore.mjs.map +0 -1
  252. package/fesm2020/mtxDatetimepicker.mjs.map +0 -1
  253. package/fesm2020/mtxDialog.mjs.map +0 -1
  254. package/fesm2020/mtxProgress.mjs.map +0 -1
  255. package/fesm2020/mtxSelect.mjs.map +0 -1
  256. package/fesm2020/mtxTooltip.mjs.map +0 -1
  257. package/fesm2020/ng-matero-extensions.mjs +0 -9
  258. package/fesm2020/ng-matero-extensions.mjs.map +0 -1
  259. /package/{esm2020 → esm2022}/alert/mtxAlert.mjs +0 -0
  260. /package/{esm2020 → esm2022}/alert/public-api.mjs +0 -0
  261. /package/{esm2020 → esm2022}/button/mtxButton.mjs +0 -0
  262. /package/{esm2020 → esm2022}/button/public-api.mjs +0 -0
  263. /package/{esm2020 → esm2022}/checkbox-group/interfaces.mjs +0 -0
  264. /package/{esm2020 → esm2022}/checkbox-group/mtxCheckboxGroup.mjs +0 -0
  265. /package/{esm2020 → esm2022}/checkbox-group/public-api.mjs +0 -0
  266. /package/{esm2020 → esm2022}/colorpicker/colorpicker-animations.mjs +0 -0
  267. /package/{esm2020 → esm2022}/colorpicker/mtxColorpicker.mjs +0 -0
  268. /package/{esm2020 → esm2022}/colorpicker/public-api.mjs +0 -0
  269. /package/{esm2020 → esm2022}/column-resize/column-resize-directives/constants.mjs +0 -0
  270. /package/{esm2020 → esm2022}/column-resize/mtxColumnResize.mjs +0 -0
  271. /package/{esm2020 → esm2022}/column-resize/polyfill.mjs +0 -0
  272. /package/{esm2020 → esm2022}/column-resize/public-api.mjs +0 -0
  273. /package/{esm2020 → esm2022}/column-resize/resize-ref.mjs +0 -0
  274. /package/{esm2020 → esm2022}/column-resize/selectors.mjs +0 -0
  275. /package/{esm2020 → esm2022}/core/datetime/datetime-formats.mjs +0 -0
  276. /package/{esm2020 → esm2022}/core/datetime/index.mjs +0 -0
  277. /package/{esm2020 → esm2022}/core/datetime/native-datetime-formats.mjs +0 -0
  278. /package/{esm2020 → esm2022}/core/mtxCore.mjs +0 -0
  279. /package/{esm2020 → esm2022}/core/pipes/index.mjs +0 -0
  280. /package/{esm2020 → esm2022}/core/public-api.mjs +0 -0
  281. /package/{esm2020 → esm2022}/datetimepicker/datetimepicker-animations.mjs +0 -0
  282. /package/{esm2020 → esm2022}/datetimepicker/datetimepicker-errors.mjs +0 -0
  283. /package/{esm2020 → esm2022}/datetimepicker/datetimepicker-filtertype.mjs +0 -0
  284. /package/{esm2020 → esm2022}/datetimepicker/datetimepicker-types.mjs +0 -0
  285. /package/{esm2020 → esm2022}/datetimepicker/mtxDatetimepicker.mjs +0 -0
  286. /package/{esm2020 → esm2022}/datetimepicker/public-api.mjs +0 -0
  287. /package/{esm2020 → esm2022}/dialog/dialog-config.mjs +0 -0
  288. /package/{esm2020 → esm2022}/dialog/mtxDialog.mjs +0 -0
  289. /package/{esm2020 → esm2022}/dialog/public-api.mjs +0 -0
  290. /package/{esm2020 → esm2022}/drawer/drawer-animation.mjs +0 -0
  291. /package/{esm2020 → esm2022}/drawer/drawer-config.mjs +0 -0
  292. /package/{esm2020 → esm2022}/drawer/drawer-ref.mjs +0 -0
  293. /package/{esm2020 → esm2022}/drawer/mtxDrawer.mjs +0 -0
  294. /package/{esm2020 → esm2022}/drawer/public-api.mjs +0 -0
  295. /package/{esm2020 → esm2022}/grid/column-resize/column-resize-directives/common.mjs +0 -0
  296. /package/{esm2020 → esm2022}/grid/column-resize/resizable-directives/common.mjs +0 -0
  297. /package/{esm2020 → esm2022}/grid/interfaces.mjs +0 -0
  298. /package/{esm2020 → esm2022}/grid/mtxGrid.mjs +0 -0
  299. /package/{esm2020 → esm2022}/grid/public-api.mjs +0 -0
  300. /package/{esm2020 → esm2022}/loader/mtxLoader.mjs +0 -0
  301. /package/{esm2020 → esm2022}/loader/public-api.mjs +0 -0
  302. /package/{esm2020 → esm2022}/ng-matero-extensions.mjs +0 -0
  303. /package/{esm2020 → esm2022}/popover/mtxPopover.mjs +0 -0
  304. /package/{esm2020 → esm2022}/popover/popover-animations.mjs +0 -0
  305. /package/{esm2020 → esm2022}/popover/popover-errors.mjs +0 -0
  306. /package/{esm2020 → esm2022}/popover/popover-interfaces.mjs +0 -0
  307. /package/{esm2020 → esm2022}/popover/popover-types.mjs +0 -0
  308. /package/{esm2020 → esm2022}/popover/public-api.mjs +0 -0
  309. /package/{esm2020 → esm2022}/progress/mtxProgress.mjs +0 -0
  310. /package/{esm2020 → esm2022}/progress/public-api.mjs +0 -0
  311. /package/{esm2020 → esm2022}/public-api.mjs +0 -0
  312. /package/{esm2020 → esm2022}/select/mtxSelect.mjs +0 -0
  313. /package/{esm2020 → esm2022}/select/public-api.mjs +0 -0
  314. /package/{esm2020 → esm2022}/slider/mtxSlider.mjs +0 -0
  315. /package/{esm2020 → esm2022}/slider/public-api.mjs +0 -0
  316. /package/{esm2020 → esm2022}/split/interfaces.mjs +0 -0
  317. /package/{esm2020 → esm2022}/split/mtxSplit.mjs +0 -0
  318. /package/{esm2020 → esm2022}/split/public-api.mjs +0 -0
  319. /package/{esm2020 → esm2022}/split/utils.mjs +0 -0
  320. /package/{esm2020 → esm2022}/tooltip/mtxTooltip.mjs +0 -0
  321. /package/{esm2020 → esm2022}/tooltip/public-api.mjs +0 -0
  322. /package/{esm2020 → esm2022}/tooltip/tooltip-animations.mjs +0 -0
  323. /package/{fesm2015 → fesm2022}/ng-matero-extensions.mjs +0 -0
  324. /package/{fesm2015 → fesm2022}/ng-matero-extensions.mjs.map +0 -0
@@ -1,1027 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { InjectionToken, Directive, Inject, EventEmitter, TemplateRef, Component, ChangeDetectionStrategy, ViewEncapsulation, Input, Output, ViewChild, ContentChild, Optional, NgModule } from '@angular/core';
3
- import * as i1 from '@angular/common';
4
- import { DOCUMENT, CommonModule } from '@angular/common';
5
- import * as i1$1 from '@angular/cdk/overlay';
6
- import { Overlay, OverlayConfig, OverlayModule } from '@angular/cdk/overlay';
7
- import * as i3 from '@angular/cdk/a11y';
8
- import { isFakeMousedownFromScreenReader, A11yModule } from '@angular/cdk/a11y';
9
- import { coerceBooleanProperty } from '@angular/cdk/coercion';
10
- import { ESCAPE, hasModifierKey, ENTER, SPACE } from '@angular/cdk/keycodes';
11
- import { Subject, Subscription, of, merge } from 'rxjs';
12
- import { trigger, state, style, transition, animate } from '@angular/animations';
13
- import { TemplatePortal, DomPortalOutlet } from '@angular/cdk/portal';
14
- import { filter, take, takeUntil } from 'rxjs/operators';
15
- import * as i2 from '@angular/cdk/bidi';
16
-
17
- /**
18
- * Below are all the animations for the mtx-popover component.
19
- * Animation duration and timing values are based on AngularJS Material.
20
- */
21
- /**
22
- * This animation controls the popover panel's entry and exit from the page.
23
- *
24
- * When the popover panel is added to the DOM, it scales in and fades in its border.
25
- *
26
- * When the popover panel is removed from the DOM, it simply fades out after a brief
27
- * delay to display the ripple.
28
- */
29
- const transformPopover = trigger('transformPopover', [
30
- state('void', style({
31
- opacity: 0,
32
- transform: 'scale(0.8)',
33
- })),
34
- transition('void => enter', animate('120ms cubic-bezier(0, 0, 0.2, 1)', style({
35
- opacity: 1,
36
- transform: 'scale(1)',
37
- }))),
38
- transition('* => void', animate('100ms 25ms linear', style({ opacity: 0 }))),
39
- ]);
40
-
41
- /**
42
- * Injection token that can be used to reference instances of `MtxPopoverContent`. It serves
43
- * as alternative token to the actual `MtxPopoverContent` class which could cause unnecessary
44
- * retention of the class and its directive metadata.
45
- */
46
- const MTX_POPOVER_CONTENT = new InjectionToken('MtxPopoverContent');
47
- class _MtxPopoverContentBase {
48
- constructor(_template, _componentFactoryResolver, _appRef, _injector, _viewContainerRef, _document, _changeDetectorRef) {
49
- this._template = _template;
50
- this._componentFactoryResolver = _componentFactoryResolver;
51
- this._appRef = _appRef;
52
- this._injector = _injector;
53
- this._viewContainerRef = _viewContainerRef;
54
- this._document = _document;
55
- this._changeDetectorRef = _changeDetectorRef;
56
- /** Emits when the popover content has been attached. */
57
- this._attached = new Subject();
58
- }
59
- /**
60
- * Attaches the content with a particular context.
61
- * @docs-private
62
- */
63
- attach(context = {}) {
64
- if (!this._portal) {
65
- this._portal = new TemplatePortal(this._template, this._viewContainerRef);
66
- }
67
- this.detach();
68
- if (!this._outlet) {
69
- this._outlet = new DomPortalOutlet(this._document.createElement('div'), this._componentFactoryResolver, this._appRef, this._injector);
70
- }
71
- const element = this._template.elementRef.nativeElement;
72
- // Because we support opening the same popover from different triggers (which in turn have their
73
- // own `OverlayRef` panel), we have to re-insert the host element every time, otherwise we
74
- // risk it staying attached to a pane that's no longer in the DOM.
75
- element.parentNode.insertBefore(this._outlet.outletElement, element);
76
- // When `MtxPopoverContent` is used in an `OnPush` component, the insertion of the popover
77
- // content via `createEmbeddedView` does not cause the content to be seen as "dirty"
78
- // by Angular. This causes the `@ContentChildren` for popover items within the popover to
79
- // not be updated by Angular. By explicitly marking for check here, we tell Angular that
80
- // it needs to check for new popover items and update the `@ContentChild` in `MtxPopover`.
81
- // @breaking-change 9.0.0 Make change detector ref required
82
- if (this._changeDetectorRef) {
83
- this._changeDetectorRef.markForCheck();
84
- }
85
- this._portal.attach(this._outlet, context);
86
- this._attached.next();
87
- }
88
- /**
89
- * Detaches the content.
90
- * @docs-private
91
- */
92
- detach() {
93
- if (this._portal.isAttached) {
94
- this._portal.detach();
95
- }
96
- }
97
- ngOnDestroy() {
98
- if (this._outlet) {
99
- this._outlet.dispose();
100
- }
101
- }
102
- }
103
- /** @nocollapse */ _MtxPopoverContentBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: _MtxPopoverContentBase, deps: [{ token: i0.TemplateRef }, { token: i0.ComponentFactoryResolver }, { token: i0.ApplicationRef }, { token: i0.Injector }, { token: i0.ViewContainerRef }, { token: DOCUMENT }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
104
- /** @nocollapse */ _MtxPopoverContentBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.1", type: _MtxPopoverContentBase, ngImport: i0 });
105
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: _MtxPopoverContentBase, decorators: [{
106
- type: Directive
107
- }], ctorParameters: function () {
108
- return [{ type: i0.TemplateRef }, { type: i0.ComponentFactoryResolver }, { type: i0.ApplicationRef }, { type: i0.Injector }, { type: i0.ViewContainerRef }, { type: undefined, decorators: [{
109
- type: Inject,
110
- args: [DOCUMENT]
111
- }] }, { type: i0.ChangeDetectorRef }];
112
- } });
113
- /**
114
- * Popover content that will be rendered lazily once the popover is opened.
115
- */
116
- class MtxPopoverContent extends _MtxPopoverContentBase {
117
- }
118
- /** @nocollapse */ MtxPopoverContent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: MtxPopoverContent, deps: null, target: i0.ɵɵFactoryTarget.Directive });
119
- /** @nocollapse */ MtxPopoverContent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.1", type: MtxPopoverContent, selector: "ng-template[mtxPopoverContent]", providers: [{ provide: MTX_POPOVER_CONTENT, useExisting: MtxPopoverContent }], usesInheritance: true, ngImport: i0 });
120
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: MtxPopoverContent, decorators: [{
121
- type: Directive,
122
- args: [{
123
- selector: 'ng-template[mtxPopoverContent]',
124
- providers: [{ provide: MTX_POPOVER_CONTENT, useExisting: MtxPopoverContent }],
125
- }]
126
- }] });
127
-
128
- /**
129
- * Throws an exception for the case when popover trigger doesn't have a valid mtx-popover instance
130
- */
131
- function throwMtxPopoverMissingError() {
132
- throw Error(`mtx-popover-trigger: must pass in an mtx-popover instance.
133
-
134
- Example:
135
- <mtx-popover #popover="mtxPopover"></mtx-popover>
136
- <button [mtxPopoverTriggerFor]="popover"></button>`);
137
- }
138
- /**
139
- * Throws an exception for the case when popover's mtxPopoverPosition[0] value isn't valid.
140
- * In other words, it doesn't match 'above', 'below', 'before' or 'after'.
141
- */
142
- function throwMtxPopoverInvalidPositionStart() {
143
- throw Error(`mtxPopoverPosition[0] value must be either 'above', 'below', 'before' or 'after'.
144
- Example: <mtx-popover [position]="['below', 'after']" #popover="mtxPopover"></mtx-popover>`);
145
- }
146
- /**
147
- * Throws an exception for the case when popover's mtxPopoverPosition[1] value isn't valid.
148
- * In other words, it doesn't match 'above', 'below', 'before', 'after' or 'center'.
149
- */
150
- function throwMtxPopoverInvalidPositionEnd() {
151
- throw Error(`mtxPopoverPosition[1] value must be either 'above', 'below', 'before', 'after' or 'center'.
152
- Example: <mtx-popover [position]="['below', 'after']" #popover="mtxPopover"></mtx-popover>`);
153
- }
154
-
155
- /** Injection token to be used to override the default options for `mtx-popover`. */
156
- const MTX_POPOVER_DEFAULT_OPTIONS = new InjectionToken('mtx-popover-default-options', {
157
- providedIn: 'root',
158
- factory: MTX_POPOVER_DEFAULT_OPTIONS_FACTORY,
159
- });
160
- /** @docs-private */
161
- function MTX_POPOVER_DEFAULT_OPTIONS_FACTORY() {
162
- return {
163
- backdropClass: 'cdk-overlay-transparent-backdrop',
164
- };
165
- }
166
- let popoverPanelUid = 0;
167
- class MtxPopover {
168
- /** Popover's trigger event. */
169
- get triggerEvent() {
170
- return this._triggerEvent;
171
- }
172
- set triggerEvent(value) {
173
- this._triggerEvent = value;
174
- }
175
- /** Popover's enter delay. */
176
- get enterDelay() {
177
- return this._enterDelay;
178
- }
179
- set enterDelay(value) {
180
- this._enterDelay = value;
181
- }
182
- /** Popover's leave delay. */
183
- get leaveDelay() {
184
- return this._leaveDelay;
185
- }
186
- set leaveDelay(value) {
187
- this._leaveDelay = value;
188
- }
189
- /** Popover's position. */
190
- get position() {
191
- return this._position;
192
- }
193
- set position(value) {
194
- if (!['before', 'after', 'above', 'below'].includes(value[0])) {
195
- throwMtxPopoverInvalidPositionStart();
196
- }
197
- if (!['before', 'after', 'above', 'below', 'center'].includes(value[1])) {
198
- throwMtxPopoverInvalidPositionEnd();
199
- }
200
- this._position = value;
201
- this.setPositionClasses();
202
- }
203
- /** Popover-panel's X offset. */
204
- get xOffset() {
205
- return this._panelOffsetX;
206
- }
207
- set xOffset(value) {
208
- this._panelOffsetX = value;
209
- }
210
- /** Popover-panel's Y offset. */
211
- get yOffset() {
212
- return this._panelOffsetY;
213
- }
214
- set yOffset(value) {
215
- this._panelOffsetY = value;
216
- }
217
- /** Popover-arrow's width. */
218
- get arrowWidth() {
219
- return this._arrowWidth;
220
- }
221
- set arrowWidth(value) {
222
- this._arrowWidth = value;
223
- }
224
- /** Popover-arrow's height. */
225
- get arrowHeight() {
226
- return this._arrowHeight;
227
- }
228
- set arrowHeight(value) {
229
- this._arrowHeight = value;
230
- }
231
- /** Popover-arrow's X offset. */
232
- get arrowOffsetX() {
233
- return this._arrowOffsetX;
234
- }
235
- set arrowOffsetX(value) {
236
- this._arrowOffsetX = value;
237
- }
238
- /** Popover-arrow's Y offset. */
239
- get arrowOffsetY() {
240
- return this._arrowOffsetY;
241
- }
242
- set arrowOffsetY(value) {
243
- this._arrowOffsetY = value;
244
- }
245
- /** Whether popover can be closed when click the popover-panel. */
246
- get closeOnPanelClick() {
247
- return this._closeOnPanelClick;
248
- }
249
- set closeOnPanelClick(value) {
250
- this._closeOnPanelClick = coerceBooleanProperty(value);
251
- }
252
- /** Whether popover can be closed when click the backdrop. */
253
- get closeOnBackdropClick() {
254
- return this._closeOnBackdropClick;
255
- }
256
- set closeOnBackdropClick(value) {
257
- this._closeOnBackdropClick = coerceBooleanProperty(value);
258
- }
259
- /** Whether enable focus trap using `cdkTrapFocus`. */
260
- get focusTrapEnabled() {
261
- return this._focusTrapEnabled;
262
- }
263
- set focusTrapEnabled(value) {
264
- this._focusTrapEnabled = coerceBooleanProperty(value);
265
- }
266
- /** Whether enable focus trap auto capture using `cdkTrapFocusAutoCapture`. */
267
- get focusTrapAutoCaptureEnabled() {
268
- return this._focusTrapAutoCaptureEnabled;
269
- }
270
- set focusTrapAutoCaptureEnabled(value) {
271
- this._focusTrapAutoCaptureEnabled = coerceBooleanProperty(value);
272
- }
273
- /** Whether the popover has a backdrop. It will always be false if the trigger event is hover. */
274
- get hasBackdrop() {
275
- return this._hasBackdrop;
276
- }
277
- set hasBackdrop(value) {
278
- this._hasBackdrop = coerceBooleanProperty(value);
279
- }
280
- /** Popover-panel's elevation (0~24). */
281
- get elevation() {
282
- return Math.max(0, Math.min(Math.round(this._elevation), 24));
283
- }
284
- set elevation(value) {
285
- this._elevation = value;
286
- }
287
- /**
288
- * This method takes classes set on the host md-popover element and applies them on the
289
- * popover template that displays in the overlay container. Otherwise, it's difficult
290
- * to style the containing popover from outside the component.
291
- * @param classes list of class names
292
- */
293
- set panelClass(classes) {
294
- if (classes && classes.length) {
295
- this._classList = classes.split(' ').reduce((obj, className) => {
296
- obj[className] = true;
297
- return obj;
298
- }, {});
299
- this._elementRef.nativeElement.className = '';
300
- this.setPositionClasses();
301
- }
302
- }
303
- /**
304
- * This method takes classes set on the host md-popover element and applies them on the
305
- * popover template that displays in the overlay container. Otherwise, it's difficult
306
- * to style the containing popover from outside the component.
307
- * @deprecated Use `panelClass` instead.
308
- * @breaking-change 8.0.0
309
- */
310
- get classList() {
311
- return this.panelClass;
312
- }
313
- set classList(classes) {
314
- this.panelClass = classes;
315
- }
316
- constructor(_elementRef, _ngZone, _defaultOptions) {
317
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
318
- this._elementRef = _elementRef;
319
- this._ngZone = _ngZone;
320
- this._defaultOptions = _defaultOptions;
321
- this._triggerEvent = (_a = this._defaultOptions.triggerEvent) !== null && _a !== void 0 ? _a : 'hover';
322
- this._enterDelay = (_b = this._defaultOptions.enterDelay) !== null && _b !== void 0 ? _b : 100;
323
- this._leaveDelay = (_c = this._defaultOptions.leaveDelay) !== null && _c !== void 0 ? _c : 100;
324
- this._position = (_d = this._defaultOptions.position) !== null && _d !== void 0 ? _d : ['below', 'after'];
325
- this._panelOffsetX = (_e = this._defaultOptions.xOffset) !== null && _e !== void 0 ? _e : 0;
326
- this._panelOffsetY = (_f = this._defaultOptions.yOffset) !== null && _f !== void 0 ? _f : 0;
327
- this._arrowWidth = (_g = this._defaultOptions.arrowWidth) !== null && _g !== void 0 ? _g : 16;
328
- this._arrowHeight = (_h = this._defaultOptions.arrowHeight) !== null && _h !== void 0 ? _h : 16;
329
- this._arrowOffsetX = (_j = this._defaultOptions.arrowOffsetX) !== null && _j !== void 0 ? _j : 20;
330
- this._arrowOffsetY = (_k = this._defaultOptions.arrowOffsetY) !== null && _k !== void 0 ? _k : 20;
331
- this._closeOnPanelClick = (_l = this._defaultOptions.closeOnPanelClick) !== null && _l !== void 0 ? _l : false;
332
- this._closeOnBackdropClick = (_m = this._defaultOptions.closeOnBackdropClick) !== null && _m !== void 0 ? _m : true;
333
- this._focusTrapEnabled = (_o = this._defaultOptions.focusTrapEnabled) !== null && _o !== void 0 ? _o : false;
334
- this._focusTrapAutoCaptureEnabled = (_p = this._defaultOptions.focusTrapAutoCaptureEnabled) !== null && _p !== void 0 ? _p : false;
335
- this._hasBackdrop = this._defaultOptions.hasBackdrop;
336
- this._elevation = (_q = this._defaultOptions.elevation) !== null && _q !== void 0 ? _q : 8;
337
- this._elevationPrefix = 'mat-elevation-z';
338
- /** Config object to be passed into the popover's ngClass. */
339
- this._classList = {};
340
- /** Current state of the panel animation. */
341
- this._panelAnimationState = 'void';
342
- /** Emits whenever an animation on the popover completes. */
343
- this._animationDone = new Subject();
344
- /** Whether the popover is animating. */
345
- this._isAnimating = false;
346
- /** Closing disabled on popover */
347
- this.closeDisabled = false;
348
- /** Class or list of classes to be added to the overlay panel. */
349
- this.overlayPanelClass = this._defaultOptions.overlayPanelClass || '';
350
- /** Class to be added to the backdrop element. */
351
- this.backdropClass = this._defaultOptions.backdropClass;
352
- /** Event emitted when the popover is closed. */
353
- this.closed = new EventEmitter();
354
- this.panelId = `mtx-popover-panel-${popoverPanelUid++}`;
355
- }
356
- ngOnInit() {
357
- this.setPositionClasses();
358
- }
359
- ngOnDestroy() {
360
- this.closed.complete();
361
- }
362
- /** Handle a keyboard event from the popover, delegating to the appropriate action. */
363
- _handleKeydown(event) {
364
- const keyCode = event.keyCode;
365
- switch (keyCode) {
366
- case ESCAPE:
367
- if (!hasModifierKey(event)) {
368
- event.preventDefault();
369
- this.closed.emit('keydown');
370
- }
371
- break;
372
- }
373
- }
374
- /** Close popover on click if `closeOnPanelClick` is true. */
375
- _handleClick() {
376
- if (this.closeOnPanelClick) {
377
- this.closed.emit('click');
378
- }
379
- }
380
- /** Disables close of popover when leaving trigger element and mouse over the popover. */
381
- _handleMouseOver() {
382
- if (this.triggerEvent === 'hover') {
383
- this.closeDisabled = true;
384
- }
385
- }
386
- /** Enables close of popover when mouse leaving popover element. */
387
- _handleMouseLeave() {
388
- if (this.triggerEvent === 'hover') {
389
- setTimeout(() => {
390
- this.closeDisabled = false;
391
- this.closed.emit();
392
- }, this.leaveDelay);
393
- }
394
- }
395
- /** Sets the current styles for the popover to allow for dynamically changing settings. */
396
- setCurrentStyles(pos = this.position) {
397
- const left = pos[1] === 'after'
398
- ? `${this.arrowOffsetX - this.arrowWidth / 2}px`
399
- : pos[1] === 'center'
400
- ? `calc(50% - ${this.arrowWidth / 2}px)`
401
- : '';
402
- const right = pos[1] === 'before' ? `${this.arrowOffsetX - this.arrowWidth / 2}px` : '';
403
- const bottom = pos[1] === 'above'
404
- ? `${this.arrowOffsetY - this.arrowHeight / 2}px`
405
- : pos[1] === 'center'
406
- ? `calc(50% - ${this.arrowHeight / 2}px)`
407
- : '';
408
- const top = pos[1] === 'below' ? `${this.arrowOffsetY - this.arrowHeight / 2}px` : '';
409
- this.arrowStyles =
410
- pos[0] === 'above' || pos[0] === 'below'
411
- ? {
412
- left: this.direction === 'ltr' ? left : right,
413
- right: this.direction === 'ltr' ? right : left,
414
- }
415
- : { top, bottom };
416
- }
417
- /**
418
- * It's necessary to set position-based classes to ensure the popover panel animation
419
- * folds out from the correct direction.
420
- */
421
- setPositionClasses(pos = this.position) {
422
- this._classList['mtx-popover-before-above'] = pos[0] === 'before' && pos[1] === 'above';
423
- this._classList['mtx-popover-before-center'] = pos[0] === 'before' && pos[1] === 'center';
424
- this._classList['mtx-popover-before-below'] = pos[0] === 'before' && pos[1] === 'below';
425
- this._classList['mtx-popover-after-above'] = pos[0] === 'after' && pos[1] === 'above';
426
- this._classList['mtx-popover-after-center'] = pos[0] === 'after' && pos[1] === 'center';
427
- this._classList['mtx-popover-after-below'] = pos[0] === 'after' && pos[1] === 'below';
428
- this._classList['mtx-popover-above-before'] = pos[0] === 'above' && pos[1] === 'before';
429
- this._classList['mtx-popover-above-center'] = pos[0] === 'above' && pos[1] === 'center';
430
- this._classList['mtx-popover-above-after'] = pos[0] === 'above' && pos[1] === 'after';
431
- this._classList['mtx-popover-below-before'] = pos[0] === 'below' && pos[1] === 'before';
432
- this._classList['mtx-popover-below-center'] = pos[0] === 'below' && pos[1] === 'center';
433
- this._classList['mtx-popover-below-after'] = pos[0] === 'below' && pos[1] === 'after';
434
- }
435
- /** Sets the popover-panel's elevation. */
436
- setElevation() {
437
- const newElevation = `${this._elevationPrefix}${this.elevation}`;
438
- if (this._previousElevation) {
439
- this._classList[this._previousElevation] = false;
440
- }
441
- this._classList[newElevation] = true;
442
- this._previousElevation = newElevation;
443
- }
444
- /** Starts the enter animation. */
445
- _startAnimation() {
446
- // @breaking-change 8.0.0 Combine with _resetAnimation.
447
- this._panelAnimationState = 'enter';
448
- }
449
- /** Resets the panel animation to its initial state. */
450
- _resetAnimation() {
451
- // @breaking-change 8.0.0 Combine with _startAnimation.
452
- this._panelAnimationState = 'void';
453
- }
454
- /** Callback that is invoked when the panel animation completes. */
455
- _onAnimationDone(event) {
456
- this._animationDone.next(event);
457
- this._isAnimating = false;
458
- }
459
- _onAnimationStart(event) {
460
- this._isAnimating = true;
461
- }
462
- }
463
- /** @nocollapse */ MtxPopover.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: MtxPopover, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: MTX_POPOVER_DEFAULT_OPTIONS }], target: i0.ɵɵFactoryTarget.Component });
464
- /** @nocollapse */ MtxPopover.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.1", type: MtxPopover, selector: "mtx-popover", inputs: { backdropClass: "backdropClass", ariaLabel: ["aria-label", "ariaLabel"], ariaLabelledby: ["aria-labelledby", "ariaLabelledby"], ariaDescribedby: ["aria-describedby", "ariaDescribedby"], triggerEvent: "triggerEvent", enterDelay: "enterDelay", leaveDelay: "leaveDelay", position: "position", xOffset: "xOffset", yOffset: "yOffset", arrowWidth: "arrowWidth", arrowHeight: "arrowHeight", arrowOffsetX: "arrowOffsetX", arrowOffsetY: "arrowOffsetY", closeOnPanelClick: "closeOnPanelClick", closeOnBackdropClick: "closeOnBackdropClick", focusTrapEnabled: "focusTrapEnabled", focusTrapAutoCaptureEnabled: "focusTrapAutoCaptureEnabled", hasBackdrop: "hasBackdrop", elevation: "elevation", panelClass: ["class", "panelClass"], classList: "classList" }, outputs: { closed: "closed" }, queries: [{ propertyName: "lazyContent", first: true, predicate: MTX_POPOVER_CONTENT, descendants: true }], viewQueries: [{ propertyName: "templateRef", first: true, predicate: TemplateRef, descendants: true }], exportAs: ["mtxPopover"], ngImport: i0, template: "<ng-template>\r\n <div class=\"mtx-popover-panel\"\r\n [id]=\"panelId\"\r\n [ngClass]=\"_classList\"\r\n (keydown)=\"_handleKeydown($event)\"\r\n (click)=\"_handleClick()\"\r\n (mouseover)=\"_handleMouseOver()\"\r\n (mouseleave)=\"_handleMouseLeave()\"\r\n [@transformPopover]=\"_panelAnimationState\"\r\n (@transformPopover.start)=\"_onAnimationStart($event)\"\r\n (@transformPopover.done)=\"_onAnimationDone($event)\"\r\n tabindex=\"-1\"\r\n role=\"dialog\"\r\n [attr.aria-label]=\"ariaLabel || null\"\r\n [attr.aria-labelledby]=\"ariaLabelledby || null\"\r\n [attr.aria-describedby]=\"ariaDescribedby || null\"\r\n [cdkTrapFocus]=\"focusTrapEnabled\"\r\n [cdkTrapFocusAutoCapture]=\"focusTrapAutoCaptureEnabled\">\r\n <div class=\"mtx-popover-content\">\r\n <ng-content></ng-content>\r\n </div>\r\n <div class=\"mtx-popover-direction-arrow\" [ngStyle]=\"arrowStyles\"></div>\r\n </div>\r\n</ng-template>\r\n", styles: [".mtx-popover-panel{position:relative;max-height:calc(100vh - 48px);padding:8px;border-radius:4px;font-size:16px;outline:0}.mtx-popover-panel[class*=mtx-popover-below]{margin-top:calc(.5em + 2px)}.mtx-popover-panel[class*=mtx-popover-above]{margin-bottom:calc(.5em + 2px)}.mtx-popover-panel[class*=mtx-popover-before]{margin-right:calc(.5em + 2px)}[dir=rtl] .mtx-popover-panel[class*=mtx-popover-before]{margin-right:auto;margin-left:calc(.5em + 2px)}.mtx-popover-panel[class*=mtx-popover-after]{margin-left:calc(.5em + 2px)}[dir=rtl] .mtx-popover-panel[class*=mtx-popover-after]{margin-left:auto;margin-right:calc(.5em + 2px)}.mtx-popover-direction-arrow{position:absolute}.mtx-popover-direction-arrow:before,.mtx-popover-direction-arrow:after{position:absolute;display:inline-block;content:\"\";border-width:.5em;border-style:solid}.mtx-popover-direction-arrow:after{border-width:calc(.5em - 1px)}[class*=mtx-popover-below] .mtx-popover-direction-arrow,[class*=mtx-popover-above] .mtx-popover-direction-arrow{width:1em}[class*=mtx-popover-below] .mtx-popover-direction-arrow:after,[class*=mtx-popover-above] .mtx-popover-direction-arrow:after{left:1px}[dir=rtl] [class*=mtx-popover-below] .mtx-popover-direction-arrow:after,[dir=rtl] [class*=mtx-popover-above] .mtx-popover-direction-arrow:after{right:1px;left:auto}[class*=mtx-popover-below] .mtx-popover-direction-arrow{top:0}[class*=mtx-popover-below] .mtx-popover-direction-arrow:before,[class*=mtx-popover-below] .mtx-popover-direction-arrow:after{bottom:0;border-top-width:0}[class*=mtx-popover-above] .mtx-popover-direction-arrow{bottom:0}[class*=mtx-popover-above] .mtx-popover-direction-arrow:before,[class*=mtx-popover-above] .mtx-popover-direction-arrow:after{top:0;border-bottom-width:0}[class*=mtx-popover-before] .mtx-popover-direction-arrow,[class*=mtx-popover-after] .mtx-popover-direction-arrow{height:1em}[class*=mtx-popover-before] .mtx-popover-direction-arrow:after,[class*=mtx-popover-after] .mtx-popover-direction-arrow:after{top:1px}[class*=mtx-popover-before] .mtx-popover-direction-arrow{right:0}[class*=mtx-popover-before] .mtx-popover-direction-arrow:before,[class*=mtx-popover-before] .mtx-popover-direction-arrow:after{left:0;border-right-width:0}[dir=rtl] [class*=mtx-popover-before] .mtx-popover-direction-arrow{right:auto;left:0}[dir=rtl] [class*=mtx-popover-before] .mtx-popover-direction-arrow:before,[dir=rtl] [class*=mtx-popover-before] .mtx-popover-direction-arrow:after{left:auto;right:0;border-left-width:0}[dir=rtl] [class*=mtx-popover-before] .mtx-popover-direction-arrow:before{border-right-width:.5em}[dir=rtl] [class*=mtx-popover-before] .mtx-popover-direction-arrow:after{border-right-width:calc(.5em - 1px)}[class*=mtx-popover-after] .mtx-popover-direction-arrow{left:0}[class*=mtx-popover-after] .mtx-popover-direction-arrow:before,[class*=mtx-popover-after] .mtx-popover-direction-arrow:after{right:0;border-left-width:0}[dir=rtl] [class*=mtx-popover-after] .mtx-popover-direction-arrow{left:auto;right:0}[dir=rtl] [class*=mtx-popover-after] .mtx-popover-direction-arrow:before,[dir=rtl] [class*=mtx-popover-after] .mtx-popover-direction-arrow:after{right:auto;left:0;border-right-width:0}[dir=rtl] [class*=mtx-popover-after] .mtx-popover-direction-arrow:before{border-left-width:.5em}[dir=rtl] [class*=mtx-popover-after] .mtx-popover-direction-arrow:after{border-left-width:calc(.5em - 1px)}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i3.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }], animations: [transformPopover], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
465
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: MtxPopover, decorators: [{
466
- type: Component,
467
- args: [{ selector: 'mtx-popover', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, animations: [transformPopover], exportAs: 'mtxPopover', template: "<ng-template>\r\n <div class=\"mtx-popover-panel\"\r\n [id]=\"panelId\"\r\n [ngClass]=\"_classList\"\r\n (keydown)=\"_handleKeydown($event)\"\r\n (click)=\"_handleClick()\"\r\n (mouseover)=\"_handleMouseOver()\"\r\n (mouseleave)=\"_handleMouseLeave()\"\r\n [@transformPopover]=\"_panelAnimationState\"\r\n (@transformPopover.start)=\"_onAnimationStart($event)\"\r\n (@transformPopover.done)=\"_onAnimationDone($event)\"\r\n tabindex=\"-1\"\r\n role=\"dialog\"\r\n [attr.aria-label]=\"ariaLabel || null\"\r\n [attr.aria-labelledby]=\"ariaLabelledby || null\"\r\n [attr.aria-describedby]=\"ariaDescribedby || null\"\r\n [cdkTrapFocus]=\"focusTrapEnabled\"\r\n [cdkTrapFocusAutoCapture]=\"focusTrapAutoCaptureEnabled\">\r\n <div class=\"mtx-popover-content\">\r\n <ng-content></ng-content>\r\n </div>\r\n <div class=\"mtx-popover-direction-arrow\" [ngStyle]=\"arrowStyles\"></div>\r\n </div>\r\n</ng-template>\r\n", styles: [".mtx-popover-panel{position:relative;max-height:calc(100vh - 48px);padding:8px;border-radius:4px;font-size:16px;outline:0}.mtx-popover-panel[class*=mtx-popover-below]{margin-top:calc(.5em + 2px)}.mtx-popover-panel[class*=mtx-popover-above]{margin-bottom:calc(.5em + 2px)}.mtx-popover-panel[class*=mtx-popover-before]{margin-right:calc(.5em + 2px)}[dir=rtl] .mtx-popover-panel[class*=mtx-popover-before]{margin-right:auto;margin-left:calc(.5em + 2px)}.mtx-popover-panel[class*=mtx-popover-after]{margin-left:calc(.5em + 2px)}[dir=rtl] .mtx-popover-panel[class*=mtx-popover-after]{margin-left:auto;margin-right:calc(.5em + 2px)}.mtx-popover-direction-arrow{position:absolute}.mtx-popover-direction-arrow:before,.mtx-popover-direction-arrow:after{position:absolute;display:inline-block;content:\"\";border-width:.5em;border-style:solid}.mtx-popover-direction-arrow:after{border-width:calc(.5em - 1px)}[class*=mtx-popover-below] .mtx-popover-direction-arrow,[class*=mtx-popover-above] .mtx-popover-direction-arrow{width:1em}[class*=mtx-popover-below] .mtx-popover-direction-arrow:after,[class*=mtx-popover-above] .mtx-popover-direction-arrow:after{left:1px}[dir=rtl] [class*=mtx-popover-below] .mtx-popover-direction-arrow:after,[dir=rtl] [class*=mtx-popover-above] .mtx-popover-direction-arrow:after{right:1px;left:auto}[class*=mtx-popover-below] .mtx-popover-direction-arrow{top:0}[class*=mtx-popover-below] .mtx-popover-direction-arrow:before,[class*=mtx-popover-below] .mtx-popover-direction-arrow:after{bottom:0;border-top-width:0}[class*=mtx-popover-above] .mtx-popover-direction-arrow{bottom:0}[class*=mtx-popover-above] .mtx-popover-direction-arrow:before,[class*=mtx-popover-above] .mtx-popover-direction-arrow:after{top:0;border-bottom-width:0}[class*=mtx-popover-before] .mtx-popover-direction-arrow,[class*=mtx-popover-after] .mtx-popover-direction-arrow{height:1em}[class*=mtx-popover-before] .mtx-popover-direction-arrow:after,[class*=mtx-popover-after] .mtx-popover-direction-arrow:after{top:1px}[class*=mtx-popover-before] .mtx-popover-direction-arrow{right:0}[class*=mtx-popover-before] .mtx-popover-direction-arrow:before,[class*=mtx-popover-before] .mtx-popover-direction-arrow:after{left:0;border-right-width:0}[dir=rtl] [class*=mtx-popover-before] .mtx-popover-direction-arrow{right:auto;left:0}[dir=rtl] [class*=mtx-popover-before] .mtx-popover-direction-arrow:before,[dir=rtl] [class*=mtx-popover-before] .mtx-popover-direction-arrow:after{left:auto;right:0;border-left-width:0}[dir=rtl] [class*=mtx-popover-before] .mtx-popover-direction-arrow:before{border-right-width:.5em}[dir=rtl] [class*=mtx-popover-before] .mtx-popover-direction-arrow:after{border-right-width:calc(.5em - 1px)}[class*=mtx-popover-after] .mtx-popover-direction-arrow{left:0}[class*=mtx-popover-after] .mtx-popover-direction-arrow:before,[class*=mtx-popover-after] .mtx-popover-direction-arrow:after{right:0;border-left-width:0}[dir=rtl] [class*=mtx-popover-after] .mtx-popover-direction-arrow{left:auto;right:0}[dir=rtl] [class*=mtx-popover-after] .mtx-popover-direction-arrow:before,[dir=rtl] [class*=mtx-popover-after] .mtx-popover-direction-arrow:after{right:auto;left:0;border-right-width:0}[dir=rtl] [class*=mtx-popover-after] .mtx-popover-direction-arrow:before{border-left-width:.5em}[dir=rtl] [class*=mtx-popover-after] .mtx-popover-direction-arrow:after{border-left-width:calc(.5em - 1px)}\n"] }]
468
- }], ctorParameters: function () {
469
- return [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: undefined, decorators: [{
470
- type: Inject,
471
- args: [MTX_POPOVER_DEFAULT_OPTIONS]
472
- }] }];
473
- }, propDecorators: { backdropClass: [{
474
- type: Input
475
- }], ariaLabel: [{
476
- type: Input,
477
- args: ['aria-label']
478
- }], ariaLabelledby: [{
479
- type: Input,
480
- args: ['aria-labelledby']
481
- }], ariaDescribedby: [{
482
- type: Input,
483
- args: ['aria-describedby']
484
- }], triggerEvent: [{
485
- type: Input
486
- }], enterDelay: [{
487
- type: Input
488
- }], leaveDelay: [{
489
- type: Input
490
- }], position: [{
491
- type: Input
492
- }], xOffset: [{
493
- type: Input
494
- }], yOffset: [{
495
- type: Input
496
- }], arrowWidth: [{
497
- type: Input
498
- }], arrowHeight: [{
499
- type: Input
500
- }], arrowOffsetX: [{
501
- type: Input
502
- }], arrowOffsetY: [{
503
- type: Input
504
- }], closeOnPanelClick: [{
505
- type: Input
506
- }], closeOnBackdropClick: [{
507
- type: Input
508
- }], focusTrapEnabled: [{
509
- type: Input
510
- }], focusTrapAutoCaptureEnabled: [{
511
- type: Input
512
- }], hasBackdrop: [{
513
- type: Input
514
- }], elevation: [{
515
- type: Input
516
- }], panelClass: [{
517
- type: Input,
518
- args: ['class']
519
- }], classList: [{
520
- type: Input
521
- }], closed: [{
522
- type: Output
523
- }], templateRef: [{
524
- type: ViewChild,
525
- args: [TemplateRef]
526
- }], lazyContent: [{
527
- type: ContentChild,
528
- args: [MTX_POPOVER_CONTENT]
529
- }] } });
530
-
531
- /** Injection token that determines the scroll handling while the popover is open. */
532
- const MTX_POPOVER_SCROLL_STRATEGY = new InjectionToken('mtx-popover-scroll-strategy');
533
- /** @docs-private */
534
- function MTX_POPOVER_SCROLL_STRATEGY_FACTORY(overlay) {
535
- return () => overlay.scrollStrategies.reposition();
536
- }
537
- /** @docs-private */
538
- const MTX_POPOVER_SCROLL_STRATEGY_FACTORY_PROVIDER = {
539
- provide: MTX_POPOVER_SCROLL_STRATEGY,
540
- deps: [Overlay],
541
- useFactory: MTX_POPOVER_SCROLL_STRATEGY_FACTORY,
542
- };
543
- /**
544
- * This directive is intended to be used in conjunction with an `mtx-popover` tag. It is
545
- * responsible for toggling the display of the provided popover instance.
546
- */
547
- class MtxPopoverTrigger {
548
- /** References the popover instance that the trigger is associated with. */
549
- get popover() {
550
- return this._popover;
551
- }
552
- set popover(popover) {
553
- if (popover === this._popover) {
554
- return;
555
- }
556
- this._popover = popover;
557
- this._popoverCloseSubscription.unsubscribe();
558
- if (popover) {
559
- this._popoverCloseSubscription = popover.closed.subscribe((reason) => {
560
- this._destroyPopover();
561
- });
562
- }
563
- }
564
- constructor(_overlay, _elementRef, _viewContainerRef, scrollStrategy, _dir, _changeDetectorRef, _focusMonitor) {
565
- this._overlay = _overlay;
566
- this._elementRef = _elementRef;
567
- this._viewContainerRef = _viewContainerRef;
568
- this._dir = _dir;
569
- this._changeDetectorRef = _changeDetectorRef;
570
- this._focusMonitor = _focusMonitor;
571
- this._overlayRef = null;
572
- this._popoverOpen = false;
573
- this._halt = false;
574
- this._positionSubscription = Subscription.EMPTY;
575
- this._popoverCloseSubscription = Subscription.EMPTY;
576
- this._closingActionsSubscription = Subscription.EMPTY;
577
- // Tracking input type is necessary so it's possible to only auto-focus
578
- // the first item of the list when the popover is opened via the keyboard
579
- this._openedBy = undefined;
580
- /** Event emitted when the associated popover is opened. */
581
- this.popoverOpened = new EventEmitter();
582
- /** Event emitted when the associated popover is closed. */
583
- this.popoverClosed = new EventEmitter();
584
- this._scrollStrategy = scrollStrategy;
585
- }
586
- ngAfterContentInit() {
587
- this._checkPopover();
588
- this._setCurrentConfig();
589
- }
590
- ngOnDestroy() {
591
- if (this._overlayRef) {
592
- this._overlayRef.dispose();
593
- this._overlayRef = null;
594
- }
595
- this._positionSubscription.unsubscribe();
596
- this._popoverCloseSubscription.unsubscribe();
597
- this._closingActionsSubscription.unsubscribe();
598
- }
599
- _setCurrentConfig() {
600
- if (this.triggerEvent) {
601
- this.popover.triggerEvent = this.triggerEvent;
602
- }
603
- this.popover.setCurrentStyles();
604
- }
605
- /** Whether the popover is open. */
606
- get popoverOpen() {
607
- return this._popoverOpen;
608
- }
609
- /** The text direction of the containing app. */
610
- get dir() {
611
- return this._dir && this._dir.value === 'rtl' ? 'rtl' : 'ltr';
612
- }
613
- /** Handles mouse click on the trigger. */
614
- _handleClick(event) {
615
- if (this.popover.triggerEvent === 'click') {
616
- this.togglePopover();
617
- }
618
- }
619
- /** Handles mouse enter on the trigger. */
620
- _handleMouseEnter(event) {
621
- this._halt = false;
622
- if (this.popover.triggerEvent === 'hover') {
623
- this._mouseoverTimer = setTimeout(() => {
624
- this.openPopover();
625
- }, this.popover.enterDelay);
626
- }
627
- }
628
- /** Handles mouse leave on the trigger. */
629
- _handleMouseLeave(event) {
630
- if (this.popover.triggerEvent === 'hover') {
631
- if (this._mouseoverTimer) {
632
- clearTimeout(this._mouseoverTimer);
633
- this._mouseoverTimer = null;
634
- }
635
- if (this._popoverOpen) {
636
- setTimeout(() => {
637
- if (!this.popover.closeDisabled) {
638
- this.closePopover();
639
- }
640
- }, this.popover.leaveDelay);
641
- }
642
- else {
643
- this._halt = true;
644
- }
645
- }
646
- }
647
- /** Handles mouse presses on the trigger. */
648
- _handleMousedown(event) {
649
- if (!isFakeMousedownFromScreenReader(event)) {
650
- // Since right or middle button clicks won't trigger the `click` event,
651
- // we shouldn't consider the popover as opened by mouse in those cases.
652
- this._openedBy = event.button === 0 ? 'mouse' : undefined;
653
- }
654
- }
655
- /** Handles key presses on the trigger. */
656
- _handleKeydown(event) {
657
- const keyCode = event.keyCode;
658
- // Pressing enter on the trigger will trigger the click handler later.
659
- if (keyCode === ENTER || keyCode === SPACE) {
660
- this._openedBy = 'keyboard';
661
- }
662
- }
663
- /** Toggles the popover between the open and closed states. */
664
- togglePopover() {
665
- return this._popoverOpen ? this.closePopover() : this.openPopover();
666
- }
667
- /** Opens the popover. */
668
- openPopover() {
669
- var _a;
670
- if (this._popoverOpen || this._halt) {
671
- return;
672
- }
673
- this._checkPopover();
674
- const overlayRef = this._createOverlay();
675
- const overlayConfig = overlayRef.getConfig();
676
- this._setPosition(overlayConfig.positionStrategy);
677
- if (this.popover.triggerEvent === 'click') {
678
- overlayConfig.hasBackdrop = (_a = this.popover.hasBackdrop) !== null && _a !== void 0 ? _a : true;
679
- }
680
- overlayRef.attach(this._getPortal());
681
- if (this.popover.lazyContent) {
682
- this.popover.lazyContent.attach(this.popoverData);
683
- }
684
- this._closingActionsSubscription = this._popoverClosingActions().subscribe(() => this.closePopover());
685
- this._initPopover();
686
- if (this.popover instanceof MtxPopover) {
687
- this.popover._startAnimation();
688
- }
689
- }
690
- /** Closes the popover. */
691
- closePopover() {
692
- this.popover.closed.emit();
693
- }
694
- /**
695
- * Focuses the popover trigger.
696
- * @param origin Source of the popover trigger's focus.
697
- */
698
- focus(origin, options) {
699
- if (this._focusMonitor && origin) {
700
- this._focusMonitor.focusVia(this._elementRef, origin, options);
701
- }
702
- else {
703
- this._elementRef.nativeElement.focus(options);
704
- }
705
- }
706
- /** Removes the popover from the DOM. */
707
- _destroyPopover(reason) {
708
- if (!this._overlayRef || !this.popoverOpen) {
709
- return;
710
- }
711
- // Clear the timeout for hover event.
712
- if (this._mouseoverTimer) {
713
- clearTimeout(this._mouseoverTimer);
714
- this._mouseoverTimer = null;
715
- }
716
- const popover = this.popover;
717
- this._closingActionsSubscription.unsubscribe();
718
- this._overlayRef.detach();
719
- this._openedBy = undefined;
720
- if (popover instanceof MtxPopover) {
721
- popover._resetAnimation();
722
- if (popover.lazyContent) {
723
- // Wait for the exit animation to finish before detaching the content.
724
- popover._animationDone
725
- .pipe(filter(event => event.toState === 'void'), take(1),
726
- // Interrupt if the content got re-attached.
727
- takeUntil(popover.lazyContent._attached))
728
- .subscribe({
729
- next: () => popover.lazyContent.detach(),
730
- // No matter whether the content got re-attached, reset the popover.
731
- complete: () => this._setIsPopoverOpen(false),
732
- });
733
- }
734
- else {
735
- this._setIsPopoverOpen(false);
736
- }
737
- }
738
- else {
739
- this._setIsPopoverOpen(false);
740
- if (popover.lazyContent) {
741
- popover.lazyContent.detach();
742
- }
743
- }
744
- }
745
- /**
746
- * This method sets the popover state to open.
747
- */
748
- _initPopover() {
749
- this.popover.direction = this.dir;
750
- this.popover.setElevation();
751
- this._setIsPopoverOpen(true);
752
- }
753
- // set state rather than toggle to support triggers sharing a popover
754
- _setIsPopoverOpen(isOpen) {
755
- this._popoverOpen = isOpen;
756
- this._popoverOpen ? this.popoverOpened.emit() : this.popoverClosed.emit();
757
- }
758
- /**
759
- * This method checks that a valid instance of MdPopover has been passed into
760
- * `mtxPopoverTriggerFor`. If not, an exception is thrown.
761
- */
762
- _checkPopover() {
763
- if (!this.popover) {
764
- throwMtxPopoverMissingError();
765
- }
766
- }
767
- /**
768
- * This method creates the overlay from the provided popover's template and saves its
769
- * OverlayRef so that it can be attached to the DOM when openPopover is called.
770
- */
771
- _createOverlay() {
772
- if (!this._overlayRef) {
773
- const config = this._getOverlayConfig();
774
- this._subscribeToPositions(config.positionStrategy);
775
- this._overlayRef = this._overlay.create(config);
776
- }
777
- else {
778
- const overlayConfig = this._overlayRef.getConfig();
779
- const positionStrategy = overlayConfig.positionStrategy;
780
- positionStrategy.setOrigin(this._getTargetElement());
781
- }
782
- return this._overlayRef;
783
- }
784
- /**
785
- * This method builds the configuration object needed to create the overlay, the OverlayConfig.
786
- * @returns OverlayConfig
787
- */
788
- _getOverlayConfig() {
789
- return new OverlayConfig({
790
- positionStrategy: this._overlay
791
- .position()
792
- .flexibleConnectedTo(this._getTargetElement())
793
- .withLockedPosition()
794
- .withGrowAfterOpen()
795
- .withTransformOriginOn('.mtx-popover-panel'),
796
- backdropClass: this.popover.backdropClass || 'cdk-overlay-transparent-backdrop',
797
- panelClass: this.popover.overlayPanelClass,
798
- scrollStrategy: this._scrollStrategy(),
799
- direction: this._dir,
800
- });
801
- }
802
- _getTargetElement() {
803
- if (this.targetElement) {
804
- return this.targetElement.elementRef;
805
- }
806
- return this._elementRef;
807
- }
808
- /**
809
- * Listens to changes in the position of the overlay and sets the correct classes
810
- * on the popover based on the new position. This ensures the animation origin is always
811
- * correct, even if a fallback position is used for the overlay.
812
- */
813
- _subscribeToPositions(position) {
814
- this._positionSubscription = position.positionChanges.subscribe(change => {
815
- const posX = change.connectionPair.overlayX === 'start'
816
- ? 'after'
817
- : change.connectionPair.overlayX === 'end'
818
- ? 'before'
819
- : 'center';
820
- const posY = change.connectionPair.overlayY === 'top'
821
- ? 'below'
822
- : change.connectionPair.overlayY === 'bottom'
823
- ? 'above'
824
- : 'center';
825
- const pos = this.popover.position[0] === 'above' || this.popover.position[0] === 'below'
826
- ? [posY, posX]
827
- : [posX, posY];
828
- // required for ChangeDetectionStrategy.OnPush
829
- this._changeDetectorRef.markForCheck();
830
- this.popover.setCurrentStyles(pos);
831
- this.popover.setPositionClasses(pos);
832
- });
833
- }
834
- /**
835
- * Sets the appropriate positions on a position strategy
836
- * so the overlay connects with the trigger correctly.
837
- * @param positionStrategy Strategy whose position to update.
838
- */
839
- _setPosition(positionStrategy) {
840
- const [originX, origin2ndX, origin3rdX] = this.popover.position[0] === 'before' || this.popover.position[1] === 'after'
841
- ? ['start', 'center', 'end']
842
- : this.popover.position[0] === 'after' || this.popover.position[1] === 'before'
843
- ? ['end', 'center', 'start']
844
- : ['center', 'start', 'end'];
845
- const [originY, origin2ndY, origin3rdY] = this.popover.position[0] === 'above' || this.popover.position[1] === 'below'
846
- ? ['top', 'center', 'bottom']
847
- : this.popover.position[0] === 'below' || this.popover.position[1] === 'above'
848
- ? ['bottom', 'center', 'top']
849
- : ['center', 'top', 'bottom'];
850
- const [overlayX, overlayFallbackX] = this.popover.position[0] === 'below' || this.popover.position[0] === 'above'
851
- ? [originX, originX]
852
- : this.popover.position[0] === 'before'
853
- ? ['end', 'start']
854
- : ['start', 'end'];
855
- const [overlayY, overlayFallbackY] = this.popover.position[0] === 'before' || this.popover.position[0] === 'after'
856
- ? [originY, originY]
857
- : this.popover.position[0] === 'below'
858
- ? ['top', 'bottom']
859
- : ['bottom', 'top'];
860
- const originFallbackX = overlayX;
861
- const originFallbackY = overlayY;
862
- const offsetX = this.popover.xOffset && !isNaN(Number(this.popover.xOffset))
863
- ? Number(this.dir === 'ltr' ? this.popover.xOffset : -this.popover.xOffset)
864
- : 0;
865
- const offsetY = this.popover.yOffset && !isNaN(Number(this.popover.yOffset))
866
- ? Number(this.popover.yOffset)
867
- : 0;
868
- let positions = [{ originX, originY, overlayX, overlayY }];
869
- if (this.popover.position[0] === 'above' || this.popover.position[0] === 'below') {
870
- positions = [
871
- { originX, originY, overlayX, overlayY, offsetY },
872
- { originX: origin2ndX, originY, overlayX: origin2ndX, overlayY, offsetY },
873
- { originX: origin3rdX, originY, overlayX: origin3rdX, overlayY, offsetY },
874
- {
875
- originX,
876
- originY: originFallbackY,
877
- overlayX,
878
- overlayY: overlayFallbackY,
879
- offsetY: -offsetY,
880
- },
881
- {
882
- originX: origin2ndX,
883
- originY: originFallbackY,
884
- overlayX: origin2ndX,
885
- overlayY: overlayFallbackY,
886
- offsetY: -offsetY,
887
- },
888
- {
889
- originX: origin3rdX,
890
- originY: originFallbackY,
891
- overlayX: origin3rdX,
892
- overlayY: overlayFallbackY,
893
- offsetY: -offsetY,
894
- },
895
- ];
896
- }
897
- if (this.popover.position[0] === 'before' || this.popover.position[0] === 'after') {
898
- positions = [
899
- { originX, originY, overlayX, overlayY, offsetX },
900
- { originX, originY: origin2ndY, overlayX, overlayY: origin2ndY, offsetX },
901
- { originX, originY: origin3rdY, overlayX, overlayY: origin3rdY, offsetX },
902
- {
903
- originX: originFallbackX,
904
- originY,
905
- overlayX: overlayFallbackX,
906
- overlayY,
907
- offsetX: -offsetX,
908
- },
909
- {
910
- originX: originFallbackX,
911
- originY: origin2ndY,
912
- overlayX: overlayFallbackX,
913
- overlayY: origin2ndY,
914
- offsetX: -offsetX,
915
- },
916
- {
917
- originX: originFallbackX,
918
- originY: origin3rdY,
919
- overlayX: overlayFallbackX,
920
- overlayY: origin3rdY,
921
- offsetX: -offsetX,
922
- },
923
- ];
924
- }
925
- positionStrategy
926
- .withPositions(positions)
927
- .withDefaultOffsetX(offsetX)
928
- .withDefaultOffsetY(offsetY);
929
- }
930
- /** Returns a stream that emits whenever an action that should close the popover occurs. */
931
- _popoverClosingActions() {
932
- const backdrop = this.popover.triggerEvent === 'click' && this.popover.closeOnBackdropClick === true
933
- ? this._overlayRef.backdropClick()
934
- : of();
935
- const detachments = this._overlayRef.detachments();
936
- return merge(backdrop, detachments);
937
- }
938
- /** Gets the portal that should be attached to the overlay. */
939
- _getPortal() {
940
- // Note that we can avoid this check by keeping the portal on the popover panel.
941
- // While it would be cleaner, we'd have to introduce another required method on
942
- // `MtxPopoverPanel`, making it harder to consume.
943
- if (!this._portal || this._portal.templateRef !== this.popover.templateRef) {
944
- this._portal = new TemplatePortal(this.popover.templateRef, this._viewContainerRef);
945
- }
946
- return this._portal;
947
- }
948
- }
949
- /** @nocollapse */ MtxPopoverTrigger.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: MtxPopoverTrigger, deps: [{ token: i1$1.Overlay }, { token: i0.ElementRef }, { token: i0.ViewContainerRef }, { token: MTX_POPOVER_SCROLL_STRATEGY }, { token: i2.Directionality, optional: true }, { token: i0.ChangeDetectorRef }, { token: i3.FocusMonitor }], target: i0.ɵɵFactoryTarget.Directive });
950
- /** @nocollapse */ MtxPopoverTrigger.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.1", type: MtxPopoverTrigger, selector: "[mtx-popover-trigger-for], [mtxPopoverTriggerFor]", inputs: { popover: ["mtxPopoverTriggerFor", "popover"], popoverData: ["mtxPopoverTriggerData", "popoverData"], targetElement: ["mtxPopoverTargetAt", "targetElement"], triggerEvent: ["mtxPopoverTriggerOn", "triggerEvent"] }, outputs: { popoverOpened: "popoverOpened", popoverClosed: "popoverClosed" }, host: { attributes: { "aria-haspopup": "true" }, listeners: { "click": "_handleClick($event)", "mouseenter": "_handleMouseEnter($event)", "mouseleave": "_handleMouseLeave($event)", "mousedown": "_handleMousedown($event)", "keydown": "_handleKeydown($event)" }, properties: { "attr.aria-expanded": "popoverOpen || null", "attr.aria-controls": "popoverOpen ? popover.panelId : null" } }, exportAs: ["mtxPopoverTrigger"], ngImport: i0 });
951
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: MtxPopoverTrigger, decorators: [{
952
- type: Directive,
953
- args: [{
954
- selector: '[mtx-popover-trigger-for], [mtxPopoverTriggerFor]',
955
- exportAs: 'mtxPopoverTrigger',
956
- host: {
957
- 'aria-haspopup': 'true',
958
- '[attr.aria-expanded]': 'popoverOpen || null',
959
- '[attr.aria-controls]': 'popoverOpen ? popover.panelId : null',
960
- '(click)': '_handleClick($event)',
961
- '(mouseenter)': '_handleMouseEnter($event)',
962
- '(mouseleave)': '_handleMouseLeave($event)',
963
- '(mousedown)': '_handleMousedown($event)',
964
- '(keydown)': '_handleKeydown($event)',
965
- },
966
- }]
967
- }], ctorParameters: function () {
968
- return [{ type: i1$1.Overlay }, { type: i0.ElementRef }, { type: i0.ViewContainerRef }, { type: undefined, decorators: [{
969
- type: Inject,
970
- args: [MTX_POPOVER_SCROLL_STRATEGY]
971
- }] }, { type: i2.Directionality, decorators: [{
972
- type: Optional
973
- }] }, { type: i0.ChangeDetectorRef }, { type: i3.FocusMonitor }];
974
- }, propDecorators: { popover: [{
975
- type: Input,
976
- args: ['mtxPopoverTriggerFor']
977
- }], popoverData: [{
978
- type: Input,
979
- args: ['mtxPopoverTriggerData']
980
- }], targetElement: [{
981
- type: Input,
982
- args: ['mtxPopoverTargetAt']
983
- }], triggerEvent: [{
984
- type: Input,
985
- args: ['mtxPopoverTriggerOn']
986
- }], popoverOpened: [{
987
- type: Output
988
- }], popoverClosed: [{
989
- type: Output
990
- }] } });
991
-
992
- class MtxPopoverTarget {
993
- constructor(elementRef) {
994
- this.elementRef = elementRef;
995
- }
996
- }
997
- /** @nocollapse */ MtxPopoverTarget.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: MtxPopoverTarget, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
998
- /** @nocollapse */ MtxPopoverTarget.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.1", type: MtxPopoverTarget, selector: "mtx-popover-target, [mtxPopoverTarget]", exportAs: ["mtxPopoverTarget"], ngImport: i0 });
999
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: MtxPopoverTarget, decorators: [{
1000
- type: Directive,
1001
- args: [{
1002
- selector: 'mtx-popover-target, [mtxPopoverTarget]',
1003
- exportAs: 'mtxPopoverTarget',
1004
- }]
1005
- }], ctorParameters: function () { return [{ type: i0.ElementRef }]; } });
1006
-
1007
- class MtxPopoverModule {
1008
- }
1009
- /** @nocollapse */ MtxPopoverModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: MtxPopoverModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1010
- /** @nocollapse */ MtxPopoverModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.1", ngImport: i0, type: MtxPopoverModule, declarations: [MtxPopover, MtxPopoverTrigger, MtxPopoverTarget, MtxPopoverContent], imports: [CommonModule, OverlayModule, A11yModule], exports: [MtxPopover, MtxPopoverTrigger, MtxPopoverTarget, MtxPopoverContent] });
1011
- /** @nocollapse */ MtxPopoverModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: MtxPopoverModule, providers: [MTX_POPOVER_SCROLL_STRATEGY_FACTORY_PROVIDER], imports: [CommonModule, OverlayModule, A11yModule] });
1012
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: MtxPopoverModule, decorators: [{
1013
- type: NgModule,
1014
- args: [{
1015
- imports: [CommonModule, OverlayModule, A11yModule],
1016
- exports: [MtxPopover, MtxPopoverTrigger, MtxPopoverTarget, MtxPopoverContent],
1017
- declarations: [MtxPopover, MtxPopoverTrigger, MtxPopoverTarget, MtxPopoverContent],
1018
- providers: [MTX_POPOVER_SCROLL_STRATEGY_FACTORY_PROVIDER],
1019
- }]
1020
- }] });
1021
-
1022
- /**
1023
- * Generated bundle index. Do not edit.
1024
- */
1025
-
1026
- export { MTX_POPOVER_CONTENT, MTX_POPOVER_DEFAULT_OPTIONS, MTX_POPOVER_DEFAULT_OPTIONS_FACTORY, MTX_POPOVER_SCROLL_STRATEGY, MTX_POPOVER_SCROLL_STRATEGY_FACTORY, MTX_POPOVER_SCROLL_STRATEGY_FACTORY_PROVIDER, MtxPopover, MtxPopoverContent, MtxPopoverModule, MtxPopoverTarget, MtxPopoverTrigger, _MtxPopoverContentBase, transformPopover };
1027
- //# sourceMappingURL=mtxPopover.mjs.map