@ng-matero/extensions 15.5.0 → 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 (325) 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 +68 -68
  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/select/select.scss +0 -7
  142. package/slider/slider.d.ts +1 -1
  143. package/split/split-pane.d.ts +1 -1
  144. package/split/split.d.ts +1 -1
  145. package/tooltip/tooltip.d.ts +1 -1
  146. package/tooltip/tooltip.scss +1 -4
  147. package/esm2020/alert/alert-module.mjs +0 -18
  148. package/esm2020/alert/alert.mjs +0 -52
  149. package/esm2020/button/button-loading.mjs +0 -76
  150. package/esm2020/button/button-module.mjs +0 -20
  151. package/esm2020/checkbox-group/checkbox-group-module.mjs +0 -21
  152. package/esm2020/checkbox-group/checkbox-group.mjs +0 -233
  153. package/esm2020/colorpicker/colorpicker-input.mjs +0 -228
  154. package/esm2020/colorpicker/colorpicker-module.mjs +0 -63
  155. package/esm2020/colorpicker/colorpicker-toggle.mjs +0 -101
  156. package/esm2020/colorpicker/colorpicker.mjs +0 -365
  157. package/esm2020/column-resize/column-resize-directives/column-resize-flex.mjs +0 -45
  158. package/esm2020/column-resize/column-resize-directives/column-resize.mjs +0 -45
  159. package/esm2020/column-resize/column-resize-module.mjs +0 -28
  160. package/esm2020/column-resize/column-resize-notifier.mjs +0 -47
  161. package/esm2020/column-resize/column-resize.mjs +0 -82
  162. package/esm2020/column-resize/column-size-store.mjs +0 -20
  163. package/esm2020/column-resize/event-dispatcher.mjs +0 -67
  164. package/esm2020/column-resize/overlay-handle.mjs +0 -146
  165. package/esm2020/column-resize/resizable.mjs +0 -199
  166. package/esm2020/column-resize/resize-strategy.mjs +0 -232
  167. package/esm2020/core/datetime/datetime.module.mjs +0 -42
  168. package/esm2020/core/datetime/native-datetime-adapter.mjs +0 -138
  169. package/esm2020/core/pipes/is-template-ref.pipe.mjs +0 -14
  170. package/esm2020/core/pipes/pipes.module.mjs +0 -19
  171. package/esm2020/core/pipes/to-observable.pipe.mjs +0 -15
  172. package/esm2020/datetimepicker/calendar-body.mjs +0 -78
  173. package/esm2020/datetimepicker/calendar.mjs +0 -671
  174. package/esm2020/datetimepicker/clock.mjs +0 -349
  175. package/esm2020/datetimepicker/datetimepicker-input.mjs +0 -349
  176. package/esm2020/datetimepicker/datetimepicker-intl.mjs +0 -63
  177. package/esm2020/datetimepicker/datetimepicker-module.mjs +0 -82
  178. package/esm2020/datetimepicker/datetimepicker-toggle.mjs +0 -104
  179. package/esm2020/datetimepicker/datetimepicker.mjs +0 -527
  180. package/esm2020/datetimepicker/month-view.mjs +0 -148
  181. package/esm2020/datetimepicker/multi-year-view.mjs +0 -214
  182. package/esm2020/datetimepicker/time.mjs +0 -456
  183. package/esm2020/datetimepicker/year-view.mjs +0 -138
  184. package/esm2020/dialog/dialog-container.mjs +0 -35
  185. package/esm2020/dialog/dialog-module.mjs +0 -24
  186. package/esm2020/dialog/dialog.mjs +0 -74
  187. package/esm2020/drawer/drawer-container.mjs +0 -252
  188. package/esm2020/drawer/drawer-module.mjs +0 -22
  189. package/esm2020/drawer/drawer.mjs +0 -166
  190. package/esm2020/grid/cell.mjs +0 -116
  191. package/esm2020/grid/column-resize/column-resize-directives/column-resize-flex.mjs +0 -37
  192. package/esm2020/grid/column-resize/column-resize-directives/column-resize.mjs +0 -37
  193. package/esm2020/grid/column-resize/column-resize-module.mjs +0 -42
  194. package/esm2020/grid/column-resize/overlay-handle.mjs +0 -60
  195. package/esm2020/grid/column-resize/resizable-directives/resizable.mjs +0 -62
  196. package/esm2020/grid/column-resize/resize-strategy.mjs +0 -42
  197. package/esm2020/grid/expansion-toggle.mjs +0 -64
  198. package/esm2020/grid/grid-module.mjs +0 -136
  199. package/esm2020/grid/grid-pipes.mjs +0 -108
  200. package/esm2020/grid/grid-utils.mjs +0 -63
  201. package/esm2020/grid/grid.mjs +0 -628
  202. package/esm2020/loader/loader-module.mjs +0 -20
  203. package/esm2020/loader/loader.mjs +0 -69
  204. package/esm2020/popover/popover-content.mjs +0 -90
  205. package/esm2020/popover/popover-module.mjs +0 -24
  206. package/esm2020/popover/popover-target.mjs +0 -17
  207. package/esm2020/popover/popover-trigger.mjs +0 -471
  208. package/esm2020/popover/popover.mjs +0 -383
  209. package/esm2020/progress/progress-module.mjs +0 -18
  210. package/esm2020/progress/progress.mjs +0 -55
  211. package/esm2020/select/option.mjs +0 -57
  212. package/esm2020/select/select-module.mjs +0 -74
  213. package/esm2020/select/select.mjs +0 -560
  214. package/esm2020/select/templates.mjs +0 -124
  215. package/esm2020/slider/slider-module.mjs +0 -19
  216. package/esm2020/slider/slider.mjs +0 -1115
  217. package/esm2020/split/split-module.mjs +0 -19
  218. package/esm2020/split/split-pane.mjs +0 -149
  219. package/esm2020/split/split.mjs +0 -634
  220. package/esm2020/tooltip/tooltip-module.mjs +0 -24
  221. package/esm2020/tooltip/tooltip.mjs +0 -926
  222. package/fesm2015/mtxAlert.mjs +0 -74
  223. package/fesm2015/mtxAlert.mjs.map +0 -1
  224. package/fesm2015/mtxButton.mjs +0 -99
  225. package/fesm2015/mtxCheckboxGroup.mjs +0 -256
  226. package/fesm2015/mtxCheckboxGroup.mjs.map +0 -1
  227. package/fesm2015/mtxColorpicker.mjs +0 -767
  228. package/fesm2015/mtxColorpicker.mjs.map +0 -1
  229. package/fesm2015/mtxColumnResize.mjs +0 -959
  230. package/fesm2015/mtxCore.mjs +0 -374
  231. package/fesm2015/mtxCore.mjs.map +0 -1
  232. package/fesm2015/mtxDatetimepicker.mjs +0 -3164
  233. package/fesm2015/mtxDatetimepicker.mjs.map +0 -1
  234. package/fesm2015/mtxDialog.mjs +0 -130
  235. package/fesm2015/mtxDrawer.mjs +0 -578
  236. package/fesm2015/mtxDrawer.mjs.map +0 -1
  237. package/fesm2015/mtxGrid.mjs +0 -1514
  238. package/fesm2015/mtxGrid.mjs.map +0 -1
  239. package/fesm2015/mtxLoader.mjs +0 -93
  240. package/fesm2015/mtxLoader.mjs.map +0 -1
  241. package/fesm2015/mtxPopover.mjs +0 -1027
  242. package/fesm2015/mtxPopover.mjs.map +0 -1
  243. package/fesm2015/mtxProgress.mjs +0 -77
  244. package/fesm2015/mtxSelect.mjs +0 -814
  245. package/fesm2015/mtxSlider.mjs +0 -1139
  246. package/fesm2015/mtxSlider.mjs.map +0 -1
  247. package/fesm2015/mtxSplit.mjs +0 -1025
  248. package/fesm2015/mtxSplit.mjs.map +0 -1
  249. package/fesm2015/mtxTooltip.mjs +0 -982
  250. package/fesm2020/mtxButton.mjs.map +0 -1
  251. package/fesm2020/mtxColumnResize.mjs.map +0 -1
  252. package/fesm2020/mtxCore.mjs.map +0 -1
  253. package/fesm2020/mtxDatetimepicker.mjs.map +0 -1
  254. package/fesm2020/mtxDialog.mjs.map +0 -1
  255. package/fesm2020/mtxProgress.mjs.map +0 -1
  256. package/fesm2020/mtxSelect.mjs.map +0 -1
  257. package/fesm2020/mtxTooltip.mjs.map +0 -1
  258. package/fesm2020/ng-matero-extensions.mjs +0 -9
  259. package/fesm2020/ng-matero-extensions.mjs.map +0 -1
  260. /package/{esm2020 → esm2022}/alert/mtxAlert.mjs +0 -0
  261. /package/{esm2020 → esm2022}/alert/public-api.mjs +0 -0
  262. /package/{esm2020 → esm2022}/button/mtxButton.mjs +0 -0
  263. /package/{esm2020 → esm2022}/button/public-api.mjs +0 -0
  264. /package/{esm2020 → esm2022}/checkbox-group/interfaces.mjs +0 -0
  265. /package/{esm2020 → esm2022}/checkbox-group/mtxCheckboxGroup.mjs +0 -0
  266. /package/{esm2020 → esm2022}/checkbox-group/public-api.mjs +0 -0
  267. /package/{esm2020 → esm2022}/colorpicker/colorpicker-animations.mjs +0 -0
  268. /package/{esm2020 → esm2022}/colorpicker/mtxColorpicker.mjs +0 -0
  269. /package/{esm2020 → esm2022}/colorpicker/public-api.mjs +0 -0
  270. /package/{esm2020 → esm2022}/column-resize/column-resize-directives/constants.mjs +0 -0
  271. /package/{esm2020 → esm2022}/column-resize/mtxColumnResize.mjs +0 -0
  272. /package/{esm2020 → esm2022}/column-resize/polyfill.mjs +0 -0
  273. /package/{esm2020 → esm2022}/column-resize/public-api.mjs +0 -0
  274. /package/{esm2020 → esm2022}/column-resize/resize-ref.mjs +0 -0
  275. /package/{esm2020 → esm2022}/column-resize/selectors.mjs +0 -0
  276. /package/{esm2020 → esm2022}/core/datetime/datetime-formats.mjs +0 -0
  277. /package/{esm2020 → esm2022}/core/datetime/index.mjs +0 -0
  278. /package/{esm2020 → esm2022}/core/datetime/native-datetime-formats.mjs +0 -0
  279. /package/{esm2020 → esm2022}/core/mtxCore.mjs +0 -0
  280. /package/{esm2020 → esm2022}/core/pipes/index.mjs +0 -0
  281. /package/{esm2020 → esm2022}/core/public-api.mjs +0 -0
  282. /package/{esm2020 → esm2022}/datetimepicker/datetimepicker-animations.mjs +0 -0
  283. /package/{esm2020 → esm2022}/datetimepicker/datetimepicker-errors.mjs +0 -0
  284. /package/{esm2020 → esm2022}/datetimepicker/datetimepicker-filtertype.mjs +0 -0
  285. /package/{esm2020 → esm2022}/datetimepicker/datetimepicker-types.mjs +0 -0
  286. /package/{esm2020 → esm2022}/datetimepicker/mtxDatetimepicker.mjs +0 -0
  287. /package/{esm2020 → esm2022}/datetimepicker/public-api.mjs +0 -0
  288. /package/{esm2020 → esm2022}/dialog/dialog-config.mjs +0 -0
  289. /package/{esm2020 → esm2022}/dialog/mtxDialog.mjs +0 -0
  290. /package/{esm2020 → esm2022}/dialog/public-api.mjs +0 -0
  291. /package/{esm2020 → esm2022}/drawer/drawer-animation.mjs +0 -0
  292. /package/{esm2020 → esm2022}/drawer/drawer-config.mjs +0 -0
  293. /package/{esm2020 → esm2022}/drawer/drawer-ref.mjs +0 -0
  294. /package/{esm2020 → esm2022}/drawer/mtxDrawer.mjs +0 -0
  295. /package/{esm2020 → esm2022}/drawer/public-api.mjs +0 -0
  296. /package/{esm2020 → esm2022}/grid/column-resize/column-resize-directives/common.mjs +0 -0
  297. /package/{esm2020 → esm2022}/grid/column-resize/resizable-directives/common.mjs +0 -0
  298. /package/{esm2020 → esm2022}/grid/interfaces.mjs +0 -0
  299. /package/{esm2020 → esm2022}/grid/mtxGrid.mjs +0 -0
  300. /package/{esm2020 → esm2022}/grid/public-api.mjs +0 -0
  301. /package/{esm2020 → esm2022}/loader/mtxLoader.mjs +0 -0
  302. /package/{esm2020 → esm2022}/loader/public-api.mjs +0 -0
  303. /package/{esm2020 → esm2022}/ng-matero-extensions.mjs +0 -0
  304. /package/{esm2020 → esm2022}/popover/mtxPopover.mjs +0 -0
  305. /package/{esm2020 → esm2022}/popover/popover-animations.mjs +0 -0
  306. /package/{esm2020 → esm2022}/popover/popover-errors.mjs +0 -0
  307. /package/{esm2020 → esm2022}/popover/popover-interfaces.mjs +0 -0
  308. /package/{esm2020 → esm2022}/popover/popover-types.mjs +0 -0
  309. /package/{esm2020 → esm2022}/popover/public-api.mjs +0 -0
  310. /package/{esm2020 → esm2022}/progress/mtxProgress.mjs +0 -0
  311. /package/{esm2020 → esm2022}/progress/public-api.mjs +0 -0
  312. /package/{esm2020 → esm2022}/public-api.mjs +0 -0
  313. /package/{esm2020 → esm2022}/select/mtxSelect.mjs +0 -0
  314. /package/{esm2020 → esm2022}/select/public-api.mjs +0 -0
  315. /package/{esm2020 → esm2022}/slider/mtxSlider.mjs +0 -0
  316. /package/{esm2020 → esm2022}/slider/public-api.mjs +0 -0
  317. /package/{esm2020 → esm2022}/split/interfaces.mjs +0 -0
  318. /package/{esm2020 → esm2022}/split/mtxSplit.mjs +0 -0
  319. /package/{esm2020 → esm2022}/split/public-api.mjs +0 -0
  320. /package/{esm2020 → esm2022}/split/utils.mjs +0 -0
  321. /package/{esm2020 → esm2022}/tooltip/mtxTooltip.mjs +0 -0
  322. /package/{esm2020 → esm2022}/tooltip/public-api.mjs +0 -0
  323. /package/{esm2020 → esm2022}/tooltip/tooltip-animations.mjs +0 -0
  324. /package/{fesm2015 → fesm2022}/ng-matero-extensions.mjs +0 -0
  325. /package/{fesm2015 → fesm2022}/ng-matero-extensions.mjs.map +0 -0
@@ -1,1139 +0,0 @@
1
- import * as i3 from '@angular/common';
2
- import { CommonModule } from '@angular/common';
3
- import * as i0 from '@angular/core';
4
- import { forwardRef, EventEmitter, Component, ViewEncapsulation, ChangeDetectionStrategy, Optional, Attribute, Inject, Input, Output, ViewChild, NgModule } from '@angular/core';
5
- import { mixinTabIndex, mixinColor, mixinDisabled, MatCommonModule } from '@angular/material/core';
6
- import { coerceBooleanProperty, coerceNumberProperty } from '@angular/cdk/coercion';
7
- import { DOWN_ARROW, RIGHT_ARROW, UP_ARROW, LEFT_ARROW, HOME, END, PAGE_DOWN, PAGE_UP } from '@angular/cdk/keycodes';
8
- import { normalizePassiveListenerOptions } from '@angular/cdk/platform';
9
- import { NG_VALUE_ACCESSOR } from '@angular/forms';
10
- import { ANIMATION_MODULE_TYPE } from '@angular/platform-browser/animations';
11
- import { Subscription } from 'rxjs';
12
- import * as i1 from '@angular/cdk/a11y';
13
- import * as i2 from '@angular/cdk/bidi';
14
-
15
- const activeEventOptions = normalizePassiveListenerOptions({ passive: false });
16
- /**
17
- * Visually, a 30px separation between tick marks looks best. This is very subjective but it is
18
- * the default separation we chose.
19
- */
20
- const MIN_AUTO_TICK_SEPARATION = 30;
21
- /** The thumb gap size for a disabled slider. */
22
- const DISABLED_THUMB_GAP = 0;
23
- /** The thumb gap size for a non-active slider at its minimum value. */
24
- const MIN_VALUE_NONACTIVE_THUMB_GAP = 7;
25
- /** The thumb gap size for an active slider at its minimum value. */
26
- const MIN_VALUE_ACTIVE_THUMB_GAP = 10;
27
- /**
28
- * Provider Expression that allows mtx-slider to register as a ControlValueAccessor.
29
- * This allows it to support [(ngModel)] and [formControl].
30
- */
31
- const MTX_SLIDER_VALUE_ACCESSOR = {
32
- provide: NG_VALUE_ACCESSOR,
33
- useExisting: forwardRef(() => MtxSlider),
34
- multi: true,
35
- };
36
- /** A simple change event emitted by the MtxSlider component. */
37
- class MtxSliderChange {
38
- }
39
- // Boilerplate for applying mixins to MtxSlider.
40
- /** @docs-private */
41
- const _MtxSliderBase = mixinTabIndex(mixinColor(mixinDisabled(class {
42
- constructor(_elementRef) {
43
- this._elementRef = _elementRef;
44
- }
45
- }), 'accent'));
46
- /**
47
- * Allows users to select from a range of values by moving the slider thumb. It is similar in
48
- * behavior to the native `<input type="range">` element.
49
- */
50
- class MtxSlider extends _MtxSliderBase {
51
- /** Whether the slider is inverted. */
52
- get invert() {
53
- return this._invert;
54
- }
55
- set invert(value) {
56
- this._invert = coerceBooleanProperty(value);
57
- }
58
- /** The maximum value that the slider can have. */
59
- get max() {
60
- return this._max;
61
- }
62
- set max(v) {
63
- this._max = coerceNumberProperty(v, this._max);
64
- this._percent = this._calculatePercentage(this._value);
65
- // Since this also modifies the percentage, we need to let the change detection know.
66
- this._changeDetectorRef.markForCheck();
67
- }
68
- /** The minimum value that the slider can have. */
69
- get min() {
70
- return this._min;
71
- }
72
- set min(v) {
73
- this._min = coerceNumberProperty(v, this._min);
74
- // If the value wasn't explicitly set by the user, set it to the min.
75
- if (this._value === null) {
76
- this.value = this._min;
77
- }
78
- this._percent = this._calculatePercentage(this._value);
79
- // Since this also modifies the percentage, we need to let the change detection know.
80
- this._changeDetectorRef.markForCheck();
81
- }
82
- /** The values at which the thumb will snap. */
83
- get step() {
84
- return this._step;
85
- }
86
- set step(v) {
87
- this._step = coerceNumberProperty(v, this._step);
88
- if (this._step % 1 !== 0) {
89
- this._roundToDecimal = this._step.toString().split('.').pop().length;
90
- }
91
- // Since this could modify the label, we need to notify the change detection.
92
- this._changeDetectorRef.markForCheck();
93
- }
94
- /** Whether or not to show the thumb label. */
95
- get thumbLabel() {
96
- return this._thumbLabel;
97
- }
98
- set thumbLabel(value) {
99
- this._thumbLabel = coerceBooleanProperty(value);
100
- }
101
- /**
102
- * How often to show ticks. Relative to the step so that a tick always appears on a step.
103
- * Ex: Tick interval of 4 with a step of 3 will draw a tick every 4 steps (every 12 values).
104
- */
105
- get tickInterval() {
106
- return this._tickInterval;
107
- }
108
- set tickInterval(value) {
109
- if (value === 'auto') {
110
- this._tickInterval = 'auto';
111
- }
112
- else if (typeof value === 'number' || typeof value === 'string') {
113
- this._tickInterval = coerceNumberProperty(value, this._tickInterval);
114
- }
115
- else {
116
- this._tickInterval = 0;
117
- }
118
- }
119
- /** Value of the slider. */
120
- get value() {
121
- // If the value needs to be read and it is still uninitialized, initialize it to the min.
122
- if (this._value === null) {
123
- this.value = this._min;
124
- }
125
- return this._value;
126
- }
127
- set value(v) {
128
- if (v !== this._value ||
129
- (v instanceof Array &&
130
- this._value != null &&
131
- (v[0] !== this._value[0] || v[1] !== this._value[1]))) {
132
- let value = null;
133
- if (v instanceof Array) {
134
- value = [coerceNumberProperty(v[0]), coerceNumberProperty(v[1])];
135
- value = [Math.min(value[0], value[1]), Math.max(value[1], value[0])];
136
- }
137
- else {
138
- value = coerceNumberProperty(v);
139
- }
140
- // While incrementing by a decimal we can end up with values like 33.300000000000004.
141
- // Truncate it to ensure that it matches the label and to make it easier to work with.
142
- if (this._roundToDecimal) {
143
- if (v instanceof Array) {
144
- value = [
145
- parseFloat(value[0].toFixed(this._roundToDecimal)),
146
- parseFloat(value[1].toFixed(this._roundToDecimal)),
147
- ];
148
- }
149
- else {
150
- value = parseFloat(Number(value).toFixed(this._roundToDecimal));
151
- }
152
- }
153
- this._value = value;
154
- this._percent = this._calculatePercentage(this._value);
155
- // Since this also modifies the percentage, we need to let the change detection know.
156
- this._changeDetectorRef.markForCheck();
157
- }
158
- }
159
- /** Whether the slider is vertical. */
160
- get vertical() {
161
- return this._vertical;
162
- }
163
- set vertical(value) {
164
- this._vertical = coerceBooleanProperty(value);
165
- }
166
- /** The value to be used for display purposes. */
167
- get displayValue() {
168
- if (this.value == null) {
169
- return '';
170
- }
171
- if (this.displayWith) {
172
- if (this.value instanceof Array) {
173
- return this.displayWith(this.value[0]);
174
- }
175
- else {
176
- return this.displayWith(this.value);
177
- }
178
- }
179
- // Note that this could be improved further by rounding something like 0.999 to 1 or
180
- // 0.899 to 0.9, however it is very performance sensitive, because it gets called on
181
- // every change detection cycle.
182
- if (this.value instanceof Array) {
183
- if (this._roundToDecimal &&
184
- this.value &&
185
- (this.value[0] % 1 !== 0 || this.value[1] % 1 !== 0)) {
186
- return this.value[0].toFixed(this._roundToDecimal);
187
- }
188
- }
189
- else {
190
- if (this._roundToDecimal && this.value && this.value % 1 !== 0) {
191
- return this.value.toFixed(this._roundToDecimal);
192
- }
193
- }
194
- if (this.value instanceof Array) {
195
- return this.value[0] || 0;
196
- }
197
- else {
198
- return this.value || 0;
199
- }
200
- }
201
- /** The value to be used for display purposes. */
202
- get displayValueRight() {
203
- if (this.value == null) {
204
- return '';
205
- }
206
- if (this.displayWith) {
207
- return this.displayWith(this.value[1]);
208
- }
209
- // Note that this could be improved further by rounding something like 0.999 to 1 or
210
- // 0.899 to 0.9, however it is very performance sensitive, because it gets called on
211
- // every change detection cycle.
212
- if (this._roundToDecimal &&
213
- this.value &&
214
- this.value != null &&
215
- this.value[1] % 1 !== 0) {
216
- return this.value[1].toFixed(this._roundToDecimal);
217
- }
218
- return this.value[1] || 0;
219
- }
220
- /** set focus to the host element */
221
- focus() {
222
- this._focusHostElement();
223
- }
224
- /** blur the host element */
225
- blur() {
226
- this._blurHostElement();
227
- }
228
- /** The percentage of the slider that coincides with the value. */
229
- get percent() {
230
- return this._clamp(this._percent);
231
- }
232
- /**
233
- * Whether the axis of the slider is inverted.
234
- * (i.e. whether moving the thumb in the positive x or y direction decreases the slider's
235
- * value).
236
- */
237
- get _invertAxis() {
238
- // Standard non-inverted mode for a vertical slider should be dragging the thumb from bottom
239
- // to top. However from a y-axis standpoint this is inverted.
240
- return this.vertical ? !this.invert : this.invert;
241
- }
242
- /** Whether the slider is at its minimum value. */
243
- get _isMinValue() {
244
- if (this.value instanceof Array) {
245
- return this.percent[0] === 0;
246
- }
247
- else {
248
- return this.percent === 0;
249
- }
250
- }
251
- /**
252
- * The amount of space to leave between the slider thumb and the track fill & track background
253
- * elements.
254
- */
255
- get _thumbGap() {
256
- if (this.disabled) {
257
- return DISABLED_THUMB_GAP;
258
- }
259
- if (this._isMinValue && !this.thumbLabel) {
260
- return this._isActive ? MIN_VALUE_ACTIVE_THUMB_GAP : MIN_VALUE_NONACTIVE_THUMB_GAP;
261
- }
262
- return 0;
263
- }
264
- /** CSS styles for the track background element. */
265
- get _trackBackgroundStylesLeft() {
266
- const axis = this.vertical ? 'Y' : 'X';
267
- let scale = '';
268
- if (this.percent instanceof Array) {
269
- scale = this.vertical ? `1, ${this.percent[0]}, 1` : `${this.percent[0]}, 1, 1`;
270
- }
271
- else {
272
- scale = this.vertical ? `1, ${this.percent}, 1` : `${this.percent}, 1, 1`;
273
- }
274
- const sign = this._shouldInvertMouseCoords() ? '' : '-';
275
- return {
276
- // scale3d avoids some rendering issues in Chrome. See #12071.
277
- transform: `translate${axis}(${sign}${this._thumbGap}px) scale3d(${scale})`,
278
- };
279
- }
280
- get _trackBackgroundStylesRight() {
281
- const axis = this.vertical ? 'Y' : 'X';
282
- let scale = '';
283
- if (this.percent instanceof Array) {
284
- scale = this.vertical ? `1, ${1 - this.percent[1]}, 1` : `${1 - this.percent[1]}, 1, 1`;
285
- }
286
- else {
287
- scale = this.vertical ? `1, ${1 - this.percent}, 1` : `${1 - this.percent}, 1, 1`;
288
- }
289
- const sign = this._shouldInvertMouseCoords() ? '-' : '';
290
- return {
291
- // scale3d avoids some rendering issues in Chrome. See #12071.
292
- transform: `translate${axis}(${sign}${this._thumbGap}px) scale3d(${scale})`,
293
- };
294
- }
295
- /** CSS styles for the track fill element. */
296
- get _trackFillStyles() {
297
- const axis = this.vertical ? 'Y' : 'X';
298
- let scale = '';
299
- if (this.percent instanceof Array) {
300
- scale = this.vertical
301
- ? `1, ${this.percent[1] - this.percent[0]}, 1`
302
- : `${this.percent[1] - this.percent[0]}, 1, 1`;
303
- }
304
- else {
305
- scale = this.vertical ? `1, ${this.percent}, 1` : `${this.percent}, 1, 1`;
306
- }
307
- const invertOffset = this._getDirection() === 'rtl' && !this.vertical ? !this._invertAxis : this._invertAxis;
308
- let offset = 0;
309
- if (this.percent instanceof Array) {
310
- offset = (invertOffset ? 1 - this.percent[1] : this.percent[0]) * 100;
311
- }
312
- else {
313
- offset = 0;
314
- }
315
- const sign = this._shouldInvertMouseCoords() ? '' : '-';
316
- if (this.isRangeSlider()) {
317
- return {
318
- // scale3d avoids some rendering issues in Chrome. See #12071.
319
- transform: `translate${axis}(${offset}%) scale3d(${scale})`,
320
- };
321
- }
322
- else {
323
- return {
324
- // scale3d avoids some rendering issues in Chrome. See #12071.
325
- transform: `translate${axis}(${sign}${this._thumbGap}px) scale3d(${scale})`,
326
- };
327
- }
328
- }
329
- /** CSS styles for the ticks container element. */
330
- get _ticksContainerStyles() {
331
- const axis = this.vertical ? 'Y' : 'X';
332
- // For a horizontal slider in RTL languages we push the ticks container off the left edge
333
- // instead of the right edge to avoid causing a horizontal scrollbar to appear.
334
- const sign = !this.vertical && this._getDirection() === 'rtl' ? '' : '-';
335
- const offset = (this._tickIntervalPercent / 2) * 100;
336
- return {
337
- transform: `translate${axis}(${sign}${offset}%)`,
338
- };
339
- }
340
- /** CSS styles for the ticks element. */
341
- get _ticksStyles() {
342
- const tickSize = this._tickIntervalPercent * 100;
343
- const backgroundSize = this.vertical ? `2px ${tickSize}%` : `${tickSize}% 2px`;
344
- const axis = this.vertical ? 'Y' : 'X';
345
- // Depending on the direction we pushed the ticks container, push the ticks the opposite
346
- // direction to re-center them but clip off the end edge. In RTL languages we need to flip
347
- // the ticks 180 degrees so we're really cutting off the end edge abd not the start.
348
- const sign = !this.vertical && this._getDirection() === 'rtl' ? '-' : '';
349
- const rotate = !this.vertical && this._getDirection() === 'rtl' ? ' rotate(180deg)' : '';
350
- const styles = {
351
- backgroundSize,
352
- // Without translateZ ticks sometimes jitter as the slider moves on Chrome & Firefox.
353
- transform: `translateZ(0) translate${axis}(${sign}${tickSize / 2}%)${rotate}`,
354
- };
355
- if (this._isMinValue && this._thumbGap) {
356
- const side = this.vertical
357
- ? this._invertAxis
358
- ? 'Bottom'
359
- : 'Top'
360
- : this._invertAxis
361
- ? 'Right'
362
- : 'Left';
363
- styles[`padding${side}`] = `${this._thumbGap}px`;
364
- }
365
- return styles;
366
- }
367
- get _thumbContainerStylesLeft() {
368
- const axis = this.vertical ? 'Y' : 'X';
369
- // For a horizontal slider in RTL languages we push the thumb container off the left edge
370
- // instead of the right edge to avoid causing a horizontal scrollbar to appear.
371
- const invertOffset = this._getDirection() === 'rtl' && !this.vertical ? !this._invertAxis : this._invertAxis;
372
- let offset = 0;
373
- if (this.percent instanceof Array) {
374
- offset = (invertOffset ? this.percent[0] : 1 - this.percent[0]) * 100;
375
- }
376
- else {
377
- offset = (invertOffset ? this.percent : 1 - this.percent) * 100;
378
- }
379
- return {
380
- transform: `translate${axis}(-${offset}%)`,
381
- };
382
- }
383
- get _thumbContainerStylesRight() {
384
- const axis = this.vertical ? 'Y' : 'X';
385
- // For a horizontal slider in RTL languages we push the thumb container off the left edge
386
- // instead of the right edge to avoid causing a horizontal scrollbar to appear.
387
- const invertOffset = this._getDirection() === 'rtl' && !this.vertical ? !this._invertAxis : this._invertAxis;
388
- let offset = 0;
389
- if (this.percent instanceof Array) {
390
- offset = (invertOffset ? this.percent[1] : 1 - this.percent[1]) * 100;
391
- }
392
- else {
393
- offset = (invertOffset ? this.percent : 1 - this.percent) * 100;
394
- }
395
- return {
396
- transform: `translate${axis}(-${offset}%)`,
397
- };
398
- }
399
- /**
400
- * Whether mouse events should be converted to a slider position by calculating their distance
401
- * from the right or bottom edge of the slider as opposed to the top or left.
402
- */
403
- _shouldInvertMouseCoords() {
404
- return this._getDirection() === 'rtl' && !this.vertical ? !this._invertAxis : this._invertAxis;
405
- }
406
- /** The language direction for this slider element. */
407
- _getDirection() {
408
- return this._dir && this._dir.value === 'rtl' ? 'rtl' : 'ltr';
409
- }
410
- constructor(elementRef, _focusMonitor, _changeDetectorRef, _dir, tabIndex,
411
- // @breaking-change 7.0.0 `_animationMode` parameter to be made required.
412
- _animationMode, _ngZone) {
413
- super(elementRef);
414
- this._focusMonitor = _focusMonitor;
415
- this._changeDetectorRef = _changeDetectorRef;
416
- this._dir = _dir;
417
- this._animationMode = _animationMode;
418
- this._ngZone = _ngZone;
419
- this._invert = false;
420
- this._max = 100;
421
- this._min = 0;
422
- this._step = 1;
423
- this._thumbLabel = false;
424
- this._tickInterval = 0;
425
- this._value = null;
426
- this._vertical = false;
427
- /** Event emitted when the slider value has changed. */
428
- this.change = new EventEmitter();
429
- /** Event emitted when the slider thumb moves. */
430
- this.input = new EventEmitter();
431
- /**
432
- * Emits when the raw value of the slider changes. This is here primarily
433
- * to facilitate the two-way binding for the `value` input.
434
- * @docs-private
435
- */
436
- this.valueChange = new EventEmitter();
437
- /** onTouch function registered via registerOnTouch (ControlValueAccessor). */
438
- this.onTouched = () => { };
439
- this._percent = 0;
440
- /**
441
- * Whether or not the thumb is sliding.
442
- * Used to determine if there should be a transition for the thumb and fill track.
443
- */
444
- this._isSliding = false;
445
- /**
446
- * Whether or not the slider is active (clicked or sliding).
447
- * Used to shrink and grow the thumb as according to the Material Design spec.
448
- */
449
- this._isActive = false;
450
- /** The size of a tick interval as a percentage of the size of the track. */
451
- this._tickIntervalPercent = 0;
452
- /** The dimensions of the slider. */
453
- this._sliderDimensions = null;
454
- this._controlValueAccessorChangeFn = () => { };
455
- /** Subscription to the Directionality change EventEmitter. */
456
- this._dirChangeSubscription = Subscription.EMPTY;
457
- /** The slider thumb which is currently used (left or right) */
458
- this._currentSliderDir = 'l';
459
- /** Called when the user has put their pointer down on the slider. */
460
- this._pointerDown = (event) => {
461
- // Don't do anything if the slider is disabled or the
462
- // user is using anything other than the main mouse button.
463
- if (this.disabled || this._isSliding || (!isTouchEvent(event) && event.button !== 0)) {
464
- return;
465
- }
466
- this.calculateInitialSlideDirection(event);
467
- this._runInsideZone(() => {
468
- const oldValue = this.value;
469
- const pointerPosition = getPointerPositionOnPage(event);
470
- this._isSliding = true;
471
- event.preventDefault();
472
- this._focusHostElement();
473
- this._onMouseenter(); // Simulate mouseenter in case this is a mobile device.
474
- this._bindGlobalEvents(event);
475
- this._focusHostElement();
476
- // TODO:
477
- // this._updateValueFromPosition(pointerPosition);
478
- if (this.value instanceof Array) {
479
- if (this._currentSliderDir === 'l') {
480
- this._updateValueFromPositionLeft(pointerPosition);
481
- }
482
- else if (this._currentSliderDir === 'r') {
483
- this._updateValueFromPositionRight(pointerPosition);
484
- }
485
- }
486
- else {
487
- this._updateValueFromPositionLeft(pointerPosition);
488
- }
489
- this._valueOnSlideStart = this.value;
490
- this._pointerPositionOnStart = pointerPosition;
491
- // Emit a change and input event if the value changed.
492
- if (oldValue !== this.value) {
493
- this._emitInputEvent();
494
- this._emitChangeEvent();
495
- }
496
- });
497
- };
498
- /**
499
- * Called when the user has moved their pointer after
500
- * starting to drag. Bound on the document level.
501
- */
502
- this._pointerMove = (event) => {
503
- if (this._isSliding) {
504
- this.calculateInitialSlideDirection(event);
505
- // Prevent the slide from selecting anything else.
506
- event.preventDefault();
507
- const oldValue = this.value;
508
- // TODO:
509
- // this._updateValueFromPosition(getPointerPositionOnPage(event));
510
- const pointerPosition = getPointerPositionOnPage(event);
511
- if (this._currentSliderDir === 'l') {
512
- this._updateValueFromPositionLeft(pointerPosition);
513
- }
514
- else if (this._currentSliderDir === 'r') {
515
- this._updateValueFromPositionRight(pointerPosition);
516
- }
517
- else {
518
- if (!this.isRangeSlider()) {
519
- this._updateValueFromPositionLeft(pointerPosition);
520
- }
521
- }
522
- // Native range elements always emit `input` events when the value changed while sliding.
523
- if (oldValue !== this.value) {
524
- this._emitInputEvent();
525
- }
526
- }
527
- };
528
- /** Called when the user has lifted their pointer. Bound on the document level. */
529
- this._pointerUp = (event) => {
530
- if (this._isSliding) {
531
- const pointerPositionOnStart = this._pointerPositionOnStart;
532
- const currentPointerPosition = getPointerPositionOnPage(event);
533
- event.preventDefault();
534
- this._removeGlobalEvents();
535
- this._valueOnSlideStart = this._pointerPositionOnStart = null;
536
- this._isSliding = false;
537
- if (this._valueOnSlideStart !== this.value &&
538
- !this.disabled &&
539
- pointerPositionOnStart &&
540
- (pointerPositionOnStart.x !== currentPointerPosition.x ||
541
- pointerPositionOnStart.y !== currentPointerPosition.y)) {
542
- this._emitChangeEvent();
543
- }
544
- }
545
- };
546
- this.tabIndex = parseInt(tabIndex, 10) || 0;
547
- this._runOutsizeZone(() => {
548
- const element = elementRef.nativeElement;
549
- element.addEventListener('mousedown', this._pointerDown, activeEventOptions);
550
- element.addEventListener('touchstart', this._pointerDown, activeEventOptions);
551
- });
552
- }
553
- ngOnInit() {
554
- this._focusMonitor.monitor(this._elementRef, true).subscribe((origin) => {
555
- this._isActive = !!origin && origin !== 'keyboard';
556
- this._changeDetectorRef.detectChanges();
557
- });
558
- if (this._dir) {
559
- this._dirChangeSubscription = this._dir.change.subscribe(() => {
560
- this._changeDetectorRef.markForCheck();
561
- });
562
- }
563
- }
564
- ngOnDestroy() {
565
- const element = this._elementRef.nativeElement;
566
- element.removeEventListener('mousedown', this._pointerDown, activeEventOptions);
567
- element.removeEventListener('touchstart', this._pointerDown, activeEventOptions);
568
- this._removeGlobalEvents();
569
- this._focusMonitor.stopMonitoring(this._elementRef);
570
- this._dirChangeSubscription.unsubscribe();
571
- }
572
- _onMouseenter() {
573
- if (this.disabled) {
574
- return;
575
- }
576
- // We save the dimensions of the slider here so we can use them to update the spacing of the
577
- // ticks and determine where on the slider click and slide events happen.
578
- this._sliderDimensions = this._getSliderDimensions();
579
- this._updateTickIntervalPercent();
580
- }
581
- _onClick(event) {
582
- if (this.disabled) {
583
- return;
584
- }
585
- let oldValue;
586
- if (this.value instanceof Array) {
587
- oldValue = [this.value[0], this.value[1]];
588
- }
589
- else {
590
- oldValue = this.value;
591
- }
592
- this._isSliding = false;
593
- this._focusHostElement();
594
- if (!this._sliderDimensions) {
595
- return;
596
- }
597
- const offset = this.vertical ? this._sliderDimensions.top : this._sliderDimensions.left;
598
- const size = this.vertical ? this._sliderDimensions.height : this._sliderDimensions.width;
599
- const posComponent = this.vertical ? event.clientY : event.clientX;
600
- // The exact value is calculated from the event and used to find the closest snap value.
601
- let percent = Number(this._clamp((posComponent - offset) / size));
602
- if (this._shouldInvertMouseCoords()) {
603
- percent = 1 - percent;
604
- }
605
- if (percent <=
606
- this.percent[0] +
607
- (this.percent[1] - this.percent[0]) / 2) {
608
- this._currentSliderDir = 'l';
609
- }
610
- else {
611
- this._currentSliderDir = 'r';
612
- }
613
- if (this._currentSliderDir === 'l') {
614
- this._updateValueFromPositionLeft({ x: event.clientX, y: event.clientY });
615
- }
616
- else {
617
- this._updateValueFromPositionRight({ x: event.clientX, y: event.clientY });
618
- }
619
- // Emit a change and input event if the value changed.
620
- if (this.value instanceof Array) {
621
- if (oldValue[0] !== this.value[0] ||
622
- oldValue[1] !== this.value[1]) {
623
- this._emitInputEvent();
624
- this._emitChangeEvent();
625
- }
626
- }
627
- else {
628
- if (oldValue !== this.value) {
629
- this._emitInputEvent();
630
- this._emitChangeEvent();
631
- }
632
- }
633
- }
634
- _onFocus() {
635
- // We save the dimensions of the slider here so we can use them to update the spacing of the
636
- // ticks and determine where on the slider click and slide events happen.
637
- this._sliderDimensions = this._getSliderDimensions();
638
- this._updateTickIntervalPercent();
639
- }
640
- _onBlur() {
641
- this.onTouched();
642
- }
643
- _onKeydown(event) {
644
- if (this.disabled) {
645
- return;
646
- }
647
- let oldValue;
648
- if (this.value instanceof Array) {
649
- oldValue = [this.value[0], this.value[1]];
650
- }
651
- else {
652
- oldValue = this.value;
653
- }
654
- switch (event.keyCode) {
655
- case PAGE_UP:
656
- this._increment(10);
657
- break;
658
- case PAGE_DOWN:
659
- this._increment(-10);
660
- break;
661
- case END:
662
- this.value = this.max;
663
- break;
664
- case HOME:
665
- this.value = this.min;
666
- break;
667
- case LEFT_ARROW:
668
- // NOTE: For a sighted user it would make more sense that when they press an arrow
669
- // key on an inverted slider the thumb moves in that direction. However for a blind
670
- // user, nothing about the slider indicates that it is inverted. They will expect
671
- // left to be decrement, regardless of how it appears on the screen. For speakers
672
- // ofRTL languages, they probably expect left to mean increment. Therefore we flip
673
- // the meaning of the side arrow keys for RTL. For inverted sliders we prefer a
674
- // good a11y experience to having it "look right" for sighted users, therefore we do
675
- // not swap the meaning.
676
- this._increment(this._getDirection() === 'rtl' ? 1 : -1);
677
- break;
678
- case UP_ARROW:
679
- this._increment(1);
680
- break;
681
- case RIGHT_ARROW:
682
- // See comment on LEFT_ARROW about the conditions under which we flip the meaning.
683
- this._increment(this._getDirection() === 'rtl' ? -1 : 1);
684
- break;
685
- case DOWN_ARROW:
686
- this._increment(-1);
687
- break;
688
- default:
689
- // Return if the key is not one that we explicitly handle to avoid calling
690
- // preventDefault on it.
691
- return;
692
- }
693
- if (this.value instanceof Array) {
694
- if (oldValue[0] !== this.value[0] ||
695
- oldValue[1] !== this.value[1]) {
696
- this._emitInputEvent();
697
- this._emitChangeEvent();
698
- }
699
- }
700
- else {
701
- if (oldValue !== this.value) {
702
- this._emitInputEvent();
703
- this._emitChangeEvent();
704
- }
705
- }
706
- this._isSliding = true;
707
- event.preventDefault();
708
- }
709
- _onKeyup() {
710
- this._isSliding = false;
711
- }
712
- /**
713
- * Binds our global move and end events. They're bound at the document level and only while
714
- * dragging so that the user doesn't have to keep their pointer exactly over the slider
715
- * as they're swiping across the screen.
716
- */
717
- _bindGlobalEvents(triggerEvent) {
718
- if (typeof document !== 'undefined' && document) {
719
- const isTouch = isTouchEvent(triggerEvent);
720
- const moveEventName = isTouch ? 'touchmove' : 'mousemove';
721
- const endEventName = isTouch ? 'touchend' : 'mouseup';
722
- document.body.addEventListener(moveEventName, this._pointerMove, activeEventOptions);
723
- document.body.addEventListener(endEventName, this._pointerUp, activeEventOptions);
724
- }
725
- }
726
- /** Removes any global event listeners that we may have added. */
727
- _removeGlobalEvents() {
728
- if (typeof document !== 'undefined' && document) {
729
- document.body.removeEventListener('mousemove', this._pointerMove, activeEventOptions);
730
- document.body.removeEventListener('mouseup', this._pointerUp, activeEventOptions);
731
- document.body.removeEventListener('touchmove', this._pointerMove, activeEventOptions);
732
- document.body.removeEventListener('touchend', this._pointerUp, activeEventOptions);
733
- }
734
- }
735
- /** Increments the slider by the given number of steps (negative number decrements). */
736
- _increment(numSteps) {
737
- if (this.value instanceof Array) {
738
- this.value = this._clamp([(this.value[0] || 0) + this.step * numSteps, (this.value[1] || 0) + this.step * numSteps], this.min, this.max);
739
- }
740
- else {
741
- this.value = this._clamp((this.value || 0) + this.step * numSteps, this.min, this.max);
742
- }
743
- }
744
- /** Calculate the new value from the new physical location. The value will always be snapped. */
745
- _updateValueFromPosition(pos) {
746
- if (!this._sliderDimensions) {
747
- return;
748
- }
749
- const offset = this.vertical ? this._sliderDimensions.top : this._sliderDimensions.left;
750
- const size = this.vertical ? this._sliderDimensions.height : this._sliderDimensions.width;
751
- const posComponent = this.vertical ? pos.y : pos.x;
752
- // The exact value is calculated from the event and used to find the closest snap value.
753
- let percent = this._clamp((posComponent - offset) / size);
754
- if (this._shouldInvertMouseCoords()) {
755
- percent = 1 - percent;
756
- }
757
- // Since the steps may not divide cleanly into the max value, if the user
758
- // slid to 0 or 100 percent, we jump to the min/max value. This approach
759
- // is slightly more intuitive than using `Math.ceil` below, because it
760
- // follows the user's pointer closer.
761
- if (percent === 0) {
762
- this.value = this.min;
763
- }
764
- else if (percent === 1) {
765
- this.value = this.max;
766
- }
767
- else {
768
- const exactValue = this._calculateValue(percent);
769
- // This calculation finds the closest step by finding the closest
770
- // whole number divisible by the step relative to the min.
771
- const closestValue = Math.round((exactValue - this.min) / this.step) * this.step + this.min;
772
- // The value needs to snap to the min and max.
773
- this.value = this._clamp(closestValue, this.min, this.max);
774
- }
775
- }
776
- /** Calculate the new value from the new physical location. The value will always be snapped. */
777
- _updateValueFromPositionLeft(pos) {
778
- if (!this._sliderDimensions) {
779
- return;
780
- }
781
- const offset = this.vertical ? this._sliderDimensions.top : this._sliderDimensions.left;
782
- const size = this.vertical ? this._sliderDimensions.height : this._sliderDimensions.width;
783
- const posComponent = this.vertical ? pos.y : pos.x;
784
- // The exact value is calculated from the event and used to find the closest snap value.
785
- let percent = Number(this._clamp((posComponent - offset) / size));
786
- if (this._shouldInvertMouseCoords()) {
787
- percent = 1 - percent;
788
- }
789
- // Since the steps may not divide cleanly into the max value, if the user
790
- // slid to 0 or 100 percent, we jump to the min/max value. This approach
791
- // is slightly more intuitive than using `Math.ceil` below, because it
792
- // follows the user's pointer closer.
793
- if (percent === 0) {
794
- if (this.value instanceof Array) {
795
- this.value = [this.min, this.value[1]];
796
- }
797
- else {
798
- this.value = this.min;
799
- }
800
- }
801
- else if (percent === 1) {
802
- if (this.value instanceof Array) {
803
- this.value = [this.max, this.value[1]];
804
- }
805
- else {
806
- this.value = this.max;
807
- }
808
- }
809
- else {
810
- const exactValue = this._calculateValue(percent);
811
- // This calculation finds the closest step by finding the closest
812
- // whole number divisible by the step relative to the min.
813
- const closestValue = Math.round((Number(exactValue) - this.min) / this.step) * this.step + this.min;
814
- // The value needs to snap to the min and max.
815
- if (this.value instanceof Array) {
816
- this.value = [Number(this._clamp(closestValue, this.min, this.max)), this.value[1]];
817
- }
818
- else {
819
- this.value = this._clamp(closestValue, this.min, this.max);
820
- }
821
- }
822
- }
823
- /** Calculate the new value from the new physical location. The value will always be snapped. */
824
- _updateValueFromPositionRight(pos) {
825
- if (!this._sliderDimensions) {
826
- return;
827
- }
828
- const offset = this.vertical ? this._sliderDimensions.top : this._sliderDimensions.left;
829
- const size = this.vertical ? this._sliderDimensions.height : this._sliderDimensions.width;
830
- const posComponent = this.vertical ? pos.y : pos.x;
831
- // The exact value is calculated from the event and used to find the closest snap value.
832
- let percent = Number(this._clamp((posComponent - offset) / size));
833
- if (this._shouldInvertMouseCoords()) {
834
- percent = 1 - percent;
835
- }
836
- // Since the steps may not divide cleanly into the max value, if the user
837
- // slid to 0 or 100 percent, we jump to the min/max value. This approach
838
- // is slightly more intuitive than using `Math.ceil` below, because it
839
- // follows the user's pointer closer.
840
- if (percent === 0) {
841
- if (this.value instanceof Array) {
842
- this.value = [this.value[0], this.min];
843
- }
844
- else {
845
- this.value = this.min;
846
- }
847
- }
848
- else if (percent === 1) {
849
- if (this.value instanceof Array) {
850
- this.value = [this.value[0], this.max];
851
- }
852
- else {
853
- this.value = this.max;
854
- }
855
- }
856
- else {
857
- const exactValue = this._calculateValue(percent);
858
- // This calculation finds the closest step by finding the closest
859
- // whole number divisible by the step relative to the min.
860
- const closestValue = Math.round((Number(exactValue) - this.min) / this.step) * this.step + this.min;
861
- // The value needs to snap to the min and max.
862
- if (this.value instanceof Array) {
863
- this.value = [this.value[0], Number(this._clamp(closestValue, this.min, this.max))];
864
- }
865
- else {
866
- this.value = this._clamp(closestValue, this.min, this.max);
867
- }
868
- }
869
- }
870
- /** Emits a change event if the current value is different from the last emitted value. */
871
- _emitChangeEvent() {
872
- this._controlValueAccessorChangeFn(this.value);
873
- this.valueChange.emit(this.value);
874
- this.change.emit(this._createChangeEvent());
875
- }
876
- /** Emits an input event when the current value is different from the last emitted value. */
877
- _emitInputEvent() {
878
- this.input.emit(this._createChangeEvent());
879
- }
880
- /** Updates the amount of space between ticks as a percentage of the width of the slider. */
881
- _updateTickIntervalPercent() {
882
- if (!this.tickInterval || !this._sliderDimensions) {
883
- return;
884
- }
885
- if (this.tickInterval === 'auto') {
886
- const trackSize = this.vertical
887
- ? this._sliderDimensions.height
888
- : this._sliderDimensions.width;
889
- const pixelsPerStep = (trackSize * this.step) / (this.max - this.min);
890
- const stepsPerTick = Math.ceil(MIN_AUTO_TICK_SEPARATION / pixelsPerStep);
891
- const pixelsPerTick = stepsPerTick * this.step;
892
- this._tickIntervalPercent = pixelsPerTick / trackSize;
893
- }
894
- else {
895
- this._tickIntervalPercent = (this.tickInterval * this.step) / (this.max - this.min);
896
- }
897
- }
898
- /** Creates a slider change object from the specified value. */
899
- _createChangeEvent(value = this.value) {
900
- const event = new MtxSliderChange();
901
- event.source = this;
902
- event.value = value;
903
- return event;
904
- }
905
- /** Calculates the percentage of the slider that a value is. */
906
- _calculatePercentage(value) {
907
- if (value instanceof Array) {
908
- return [
909
- ((value[0] || 0) - this.min) / (this.max - this.min),
910
- ((value[1] || 0) - this.min) / (this.max - this.min),
911
- ];
912
- }
913
- else {
914
- return ((value || 0) - this.min) / (this.max - this.min);
915
- }
916
- }
917
- /** Calculates the value a percentage of the slider corresponds to. */
918
- _calculateValue(percentage) {
919
- if (percentage instanceof Array) {
920
- return [
921
- this.min + percentage[0] * (this.max - this.min),
922
- this.min + percentage[1] * (this.max - this.min),
923
- ];
924
- }
925
- else {
926
- return this.min + percentage * (this.max - this.min);
927
- }
928
- }
929
- /** Return a number between two numbers. */
930
- _clamp(value, min = 0, max = 1) {
931
- if (value instanceof Array) {
932
- return [Math.max(min, Math.min(value[0], max)), Math.max(min, Math.min(value[1], max))];
933
- }
934
- else {
935
- return Math.max(min, Math.min(value, max));
936
- }
937
- }
938
- /**
939
- * Get the bounding client rect of the slider track element.
940
- * The track is used rather than the native element to ignore the extra space that the thumb can
941
- * take up.
942
- */
943
- _getSliderDimensions() {
944
- return this._sliderWrapper ? this._sliderWrapper.nativeElement.getBoundingClientRect() : null;
945
- }
946
- /**
947
- * Focuses the native element.
948
- * Currently only used to allow a blur event to fire but will be used with keyboard input later.
949
- */
950
- _focusHostElement() {
951
- this._elementRef.nativeElement.focus();
952
- }
953
- /** Blurs the native element. */
954
- _blurHostElement() {
955
- this._elementRef.nativeElement.blur();
956
- }
957
- /** Runs a callback outside of the NgZone, if possible. */
958
- _runOutsizeZone(fn) {
959
- // @breaking-change 9.0.0 Remove this function once `_ngZone` is a required parameter.
960
- this._ngZone ? this._ngZone.runOutsideAngular(fn) : fn();
961
- }
962
- /** Runs a callback inside of the NgZone, if possible. */
963
- _runInsideZone(fn) {
964
- // @breaking-change 9.0.0 Remove this function once `_ngZone` is a required parameter.
965
- this._ngZone ? this._ngZone.run(fn) : fn();
966
- }
967
- /**
968
- * Sets the model value. Implemented as part of ControlValueAccessor.
969
- * @param value
970
- */
971
- writeValue(value) {
972
- this.value = value;
973
- }
974
- /**
975
- * Registers a callback to be triggered when the value has changed.
976
- * Implemented as part of ControlValueAccessor.
977
- * @param fn Callback to be registered.
978
- */
979
- registerOnChange(fn) {
980
- this._controlValueAccessorChangeFn = fn;
981
- }
982
- /**
983
- * Registers a callback to be triggered when the component is touched.
984
- * Implemented as part of ControlValueAccessor.
985
- * @param fn Callback to be registered.
986
- */
987
- registerOnTouched(fn) {
988
- this.onTouched = fn;
989
- }
990
- /**
991
- * Sets whether the component should be disabled.
992
- * Implemented as part of ControlValueAccessor.
993
- * @param isDisabled
994
- */
995
- setDisabledState(isDisabled) {
996
- this.disabled = isDisabled;
997
- }
998
- isRangeSlider() {
999
- return this.value instanceof Array;
1000
- }
1001
- calculateInitialSlideDirection(event) {
1002
- if (!this._sliderDimensions) {
1003
- return;
1004
- }
1005
- const offset = this.vertical ? this._sliderDimensions.top : this._sliderDimensions.left;
1006
- const size = this.vertical ? this._sliderDimensions.height : this._sliderDimensions.width;
1007
- const pointerPosition = getPointerPositionOnPage(event);
1008
- const posComponent = this.vertical ? pointerPosition.y : pointerPosition.x;
1009
- // The exact value is calculated from the event and used to find the closest snap value.
1010
- let percent = Number(this._clamp((posComponent - offset) / size));
1011
- if (this._shouldInvertMouseCoords()) {
1012
- percent = 1 - percent;
1013
- }
1014
- if (percent <=
1015
- this.percent[0] +
1016
- (this.percent[1] - this.percent[0]) / 2) {
1017
- this._currentSliderDir = 'l';
1018
- }
1019
- else {
1020
- this._currentSliderDir = 'r';
1021
- }
1022
- }
1023
- }
1024
- /** @nocollapse */ MtxSlider.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: MtxSlider, deps: [{ token: i0.ElementRef }, { token: i1.FocusMonitor }, { token: i0.ChangeDetectorRef }, { token: i2.Directionality, optional: true }, { token: 'tabindex', attribute: true }, { token: ANIMATION_MODULE_TYPE, optional: true }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
1025
- /** @nocollapse */ MtxSlider.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.1", type: MtxSlider, selector: "mtx-slider", inputs: { disabled: "disabled", color: "color", tabIndex: "tabIndex", invert: "invert", max: "max", min: "min", step: "step", thumbLabel: "thumbLabel", tickInterval: "tickInterval", value: "value", displayWith: "displayWith", valueText: "valueText", vertical: "vertical" }, outputs: { change: "change", input: "input", valueChange: "valueChange" }, host: { attributes: { "role": "slider" }, listeners: { "focus": "_onFocus()", "blur": "_onBlur()", "click": "_onClick($event)", "keydown": "_onKeydown($event)", "keyup": "_onKeyup()", "mouseenter": "_onMouseenter()", "selectstart": "$event.preventDefault()" }, properties: { "tabIndex": "tabIndex", "attr.aria-disabled": "disabled", "attr.aria-valuemax": "max", "attr.aria-valuemin": "min", "attr.aria-valuenow": "value", "attr.aria-valuetext": "valueText == null ? displayValue : valueText", "attr.aria-orientation": "vertical ? \"vertical\" : \"horizontal\"", "class.mtx-slider-disabled": "disabled", "class.mtx-slider-has-ticks": "tickInterval", "class.mtx-slider-horizontal": "!vertical", "class.mtx-slider-axis-inverted": "_invertAxis", "class.mtx-slider-sliding": "_isSliding", "class.mtx-slider-thumb-label-showing": "thumbLabel", "class.mtx-slider-vertical": "vertical", "class.mtx-slider-min-value": "_isMinValue", "class.mtx-range-slider": "isRangeSlider()", "class.mtx-slider-hide-last-tick": "disabled || _isMinValue && _thumbGap && _invertAxis", "class._mtx-animation-noopable": "_animationMode === \"NoopAnimations\"" }, classAttribute: "mtx-slider mat-focus-indicator" }, providers: [MTX_SLIDER_VALUE_ACCESSOR], viewQueries: [{ propertyName: "_sliderWrapper", first: true, predicate: ["sliderWrapper"], descendants: true }], exportAs: ["mtxSlider"], usesInheritance: true, ngImport: i0, template: "<div class=\"mtx-slider-wrapper\" #sliderWrapper>\n <div class=\"mtx-slider-track-wrapper\">\n <div *ngIf=\"isRangeSlider()\"\n class=\"mtx-slider-track-background mtx-slider-track-background-left\"\n [ngStyle]=\"_trackBackgroundStylesLeft\"></div>\n <div class=\"mtx-slider-track-background mtx-slider-track-background-right\"\n [ngStyle]=\"_trackBackgroundStylesRight\"></div>\n <div class=\"mtx-slider-track-fill\" [ngClass]=\"{'mtx-range-slider-fill': isRangeSlider()}\"\n [ngStyle]=\"_trackFillStyles\"></div>\n </div>\n <div class=\"mtx-slider-ticks-container\" [ngStyle]=\"_ticksContainerStyles\">\n <div class=\"mtx-slider-ticks\" [ngStyle]=\"_ticksStyles\"></div>\n </div>\n <div class=\"mtx-slider-thumb-container\" #leftSlider\n [ngStyle]=\"_thumbContainerStylesLeft\">\n <div class=\"mtx-slider-focus-ring\"></div>\n <div class=\"mtx-slider-thumb left\"></div>\n <div class=\"mtx-slider-thumb-label\">\n <span class=\"mtx-slider-thumb-label-text\">{{displayValue}}</span>\n </div>\n </div>\n <div *ngIf=\"isRangeSlider()\"\n class=\"mtx-slider-thumb-container\" #rightSlider\n [ngStyle]=\"_thumbContainerStylesRight\">\n <div class=\"mtx-slider-focus-ring\"></div>\n <div class=\"mtx-slider-thumb right\"></div>\n <div class=\"mtx-slider-thumb-label\">\n <span class=\"mtx-slider-thumb-label-text\">{{displayValueRight}}</span>\n </div>\n </div>\n</div>\n", styles: [".mtx-slider{display:inline-block;position:relative;box-sizing:border-box;padding:8px;outline:none;vertical-align:middle}.mtx-slider:not(.mtx-slider-disabled):active,.mtx-slider.mtx-slider-sliding:not(.mtx-slider-disabled){cursor:grabbing}.mtx-slider-wrapper{-webkit-print-color-adjust:exact;print-color-adjust:exact;position:absolute}.mtx-slider-track-wrapper{position:absolute;top:0;left:0;overflow:hidden}.mtx-slider-track-fill,.mtx-slider-track-background-left{position:absolute;transform-origin:0 0;transition:transform .4s cubic-bezier(.25,.8,.25,1),background-color .4s cubic-bezier(.25,.8,.25,1)}.mtx-slider-track-background-right{position:absolute;transform-origin:100% 100%;transition:transform .4s cubic-bezier(.25,.8,.25,1),background-color .4s cubic-bezier(.25,.8,.25,1)}.mtx-slider-ticks-container{position:absolute;left:0;top:0;overflow:hidden}.mtx-slider-ticks{-webkit-background-clip:content-box;background-repeat:repeat;background-clip:content-box;box-sizing:border-box;opacity:0;transition:opacity .4s cubic-bezier(.25,.8,.25,1)}.mtx-slider-thumb-container{position:absolute;z-index:1;transition:transform .4s cubic-bezier(.25,.8,.25,1)}.mtx-slider-focus-ring{position:absolute;width:30px;height:30px;border-radius:50%;transform:scale(0);opacity:0;transition:transform .4s cubic-bezier(.25,.8,.25,1),background-color .4s cubic-bezier(.25,.8,.25,1),opacity .4s cubic-bezier(.25,.8,.25,1)}.mtx-slider.cdk-keyboard-focused .mtx-slider-focus-ring,.mtx-slider.cdk-program-focused .mtx-slider-focus-ring{transform:scale(1);opacity:1}.mtx-slider:not(.mtx-slider-disabled,.mtx-slider-sliding) .mtx-slider-thumb-label,.mtx-slider:not(.mtx-slider-disabled,.mtx-slider-sliding) .mtx-slider-thumb{cursor:grab}.mtx-slider-thumb{position:absolute;right:-10px;bottom:-10px;box-sizing:border-box;width:20px;height:20px;border:3px solid transparent;border-radius:50%;transform:scale(.7);transition:transform .4s cubic-bezier(.25,.8,.25,1),background-color .4s cubic-bezier(.25,.8,.25,1),border-color .4s cubic-bezier(.25,.8,.25,1)}.mtx-slider-thumb-label{display:none;align-items:center;justify-content:center;position:absolute;width:28px;height:28px;border-radius:50%;transition:transform .4s cubic-bezier(.25,.8,.25,1),border-radius .4s cubic-bezier(.25,.8,.25,1),background-color .4s cubic-bezier(.25,.8,.25,1)}.cdk-high-contrast-active .mtx-slider-thumb-label{outline:solid 1px}.mtx-slider-thumb-label-text{z-index:1;opacity:0;transition:opacity .4s cubic-bezier(.25,.8,.25,1)}.mtx-slider-sliding .mtx-slider-track-fill,.mtx-slider-sliding .mtx-slider-track-background-left,.mtx-slider-sliding .mtx-slider-track-background-right,.mtx-slider-sliding .mtx-slider-thumb-container{transition-duration:0ms}.mtx-slider-has-ticks .mtx-slider-wrapper:after{content:\"\";position:absolute;border-width:0;border-style:solid;opacity:0;transition:opacity .4s cubic-bezier(.25,.8,.25,1)}.mtx-slider-has-ticks.cdk-focused:not(.mtx-slider-hide-last-tick) .mtx-slider-wrapper:after,.mtx-slider-has-ticks:hover:not(.mtx-slider-hide-last-tick) .mtx-slider-wrapper:after{opacity:1}.mtx-slider-has-ticks.cdk-focused:not(.mtx-slider-disabled) .mtx-slider-ticks,.mtx-slider-has-ticks:hover:not(.mtx-slider-disabled) .mtx-slider-ticks{opacity:1}.mtx-slider-thumb-label-showing .mtx-slider-focus-ring{display:none}.mtx-slider-thumb-label-showing .mtx-slider-thumb-label{display:flex}.mtx-slider-axis-inverted .mtx-slider-track-fill{transform-origin:100% 100%}.mtx-slider-axis-inverted .mtx-slider-track-fill.mtx-range-slider-fill{transform-origin:0 0}.mtx-slider-axis-inverted .mtx-slider-track-background-left{transform-origin:100% 100%}.mtx-slider-axis-inverted .mtx-slider-track-background-right{transform-origin:0 0}.mtx-slider:not(.mtx-slider-disabled).cdk-focused.mtx-slider-thumb-label-showing .mtx-slider-thumb{transform:scale(0)}.mtx-slider:not(.mtx-slider-disabled).cdk-focused .mtx-slider-thumb-label{border-radius:50% 50% 0}.mtx-slider:not(.mtx-slider-disabled).cdk-focused .mtx-slider-thumb-label-text{opacity:1}.mtx-slider:not(.mtx-slider-disabled).cdk-mouse-focused .mtx-slider-thumb,.mtx-slider:not(.mtx-slider-disabled).cdk-touch-focused .mtx-slider-thumb,.mtx-slider:not(.mtx-slider-disabled).cdk-program-focused .mtx-slider-thumb{border-width:2px;transform:scale(1)}.mtx-slider-disabled .mtx-slider-focus-ring{transform:scale(0);opacity:0}.mtx-slider-disabled .mtx-slider-thumb{border-width:4px;transform:scale(.5)}.mtx-slider-disabled .mtx-slider-thumb-label{display:none}.mtx-slider-horizontal{height:48px;min-width:128px}.mtx-slider-horizontal .mtx-slider-wrapper{height:2px;top:23px;left:8px;right:8px}.mtx-slider-horizontal .mtx-slider-wrapper:after{height:2px;border-left-width:2px;right:0;top:0}.mtx-slider-horizontal .mtx-slider-track-wrapper{height:2px;width:100%}.mtx-slider-horizontal .mtx-slider-track-fill{height:2px;width:100%;transform:scaleX(0)}.mtx-slider-horizontal .mtx-slider-track-background-left,.mtx-slider-horizontal .mtx-slider-track-background-right{height:2px;width:100%;transform:scaleX(1)}.mtx-slider-horizontal .mtx-slider-ticks-container{height:2px;width:100%}.cdk-high-contrast-active .mtx-slider-horizontal .mtx-slider-ticks-container{height:0;outline:solid 2px;top:1px}.mtx-slider-horizontal .mtx-slider-ticks{height:2px;width:100%}.mtx-slider-horizontal .mtx-slider-thumb-container{width:100%;height:0;top:50%}.mtx-slider-horizontal .mtx-slider-focus-ring{top:-15px;right:-15px}.mtx-slider-horizontal .mtx-slider-thumb-label{right:-14px;top:-40px;transform:translateY(26px) scale(.01) rotate(45deg)}.mtx-slider-horizontal .mtx-slider-thumb-label-text{transform:rotate(-45deg)}.mtx-slider-horizontal.cdk-focused .mtx-slider-thumb-label{transform:rotate(45deg)}.cdk-high-contrast-active .mtx-slider-horizontal.cdk-focused .mtx-slider-thumb-label,.cdk-high-contrast-active .mtx-slider-horizontal.cdk-focused .mtx-slider-thumb-label-text{transform:none}.mtx-slider-vertical{width:48px;min-height:128px}.mtx-slider-vertical .mtx-slider-wrapper{width:2px;top:8px;bottom:8px;left:23px}.mtx-slider-vertical .mtx-slider-wrapper:after{width:2px;border-top-width:2px;bottom:0;left:0}.mtx-slider-vertical .mtx-slider-track-wrapper{height:100%;width:2px}.mtx-slider-vertical .mtx-slider-track-fill{height:100%;width:2px;transform:scaleY(0)}.mtx-slider-vertical .mtx-slider-track-background-left,.mtx-slider-vertical .mtx-slider-track-background-right{height:100%;width:2px;transform:scaleY(1)}.mtx-slider-vertical .mtx-slider-ticks-container{width:2px;height:100%}.cdk-high-contrast-active .mtx-slider-vertical .mtx-slider-ticks-container{width:0;outline:solid 2px;left:1px}.mtx-slider-vertical .mtx-slider-focus-ring{bottom:-15px;left:-15px}.mtx-slider-vertical .mtx-slider-ticks{width:2px;height:100%}.mtx-slider-vertical .mtx-slider-thumb-container{height:100%;width:0;left:50%}.mtx-slider-vertical .mtx-slider-thumb{-webkit-backface-visibility:hidden;backface-visibility:hidden}.mtx-slider-vertical .mtx-slider-thumb-label{bottom:-14px;left:-40px;transform:translate(26px) scale(.01) rotate(-45deg)}.mtx-slider-vertical .mtx-slider-thumb-label-text{transform:rotate(45deg)}.mtx-slider-vertical.cdk-focused .mtx-slider-thumb-label{transform:rotate(-45deg)}[dir=rtl] .mtx-slider-wrapper:after{left:0;right:auto}[dir=rtl] .mtx-slider-horizontal .mtx-slider-track-fill:not(.mtx-range-slider-fill){transform-origin:100% 100%}[dir=rtl] .mtx-slider-horizontal .mtx-slider-track-background-left{transform-origin:100% 100%}[dir=rtl] .mtx-slider-horizontal .mtx-slider-track-background-right,[dir=rtl] .mtx-slider-horizontal.mtx-slider-axis-inverted .mtx-slider-track-fill,[dir=rtl] .mtx-slider-horizontal.mtx-slider-axis-inverted .mtx-slider-track-background-left{transform-origin:0 0}[dir=rtl] .mtx-slider-horizontal.mtx-slider-axis-inverted .mtx-slider-track-background-right{transform-origin:100% 100%}.mtx-slider._mtx-animation-noopable .mtx-slider-track-fill,.mtx-slider._mtx-animation-noopable .mtx-slider-track-background-left,.mtx-slider._mtx-animation-noopable .mtx-slider-track-background-right,.mtx-slider._mtx-animation-noopable .mtx-slider-ticks,.mtx-slider._mtx-animation-noopable .mtx-slider-thumb-container,.mtx-slider._mtx-animation-noopable .mtx-slider-focus-ring,.mtx-slider._mtx-animation-noopable .mtx-slider-thumb,.mtx-slider._mtx-animation-noopable .mtx-slider-thumb-label,.mtx-slider._mtx-animation-noopable .mtx-slider-thumb-label-text,.mtx-slider._mtx-animation-noopable .mtx-slider-has-ticks .mtx-slider-wrapper:after{transition:none}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
1026
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: MtxSlider, decorators: [{
1027
- type: Component,
1028
- args: [{ selector: 'mtx-slider', exportAs: 'mtxSlider', providers: [MTX_SLIDER_VALUE_ACCESSOR], host: {
1029
- '(focus)': '_onFocus()',
1030
- '(blur)': '_onBlur()',
1031
- '(click)': '_onClick($event)',
1032
- '(keydown)': '_onKeydown($event)',
1033
- '(keyup)': '_onKeyup()',
1034
- '(mouseenter)': '_onMouseenter()',
1035
- // On Safari starting to slide temporarily triggers text selection mode which
1036
- // show the wrong cursor. We prevent it by stopping the `selectstart` event.
1037
- '(selectstart)': '$event.preventDefault()',
1038
- 'class': 'mtx-slider mat-focus-indicator',
1039
- 'role': 'slider',
1040
- '[tabIndex]': 'tabIndex',
1041
- '[attr.aria-disabled]': 'disabled',
1042
- '[attr.aria-valuemax]': 'max',
1043
- '[attr.aria-valuemin]': 'min',
1044
- '[attr.aria-valuenow]': 'value',
1045
- // NVDA and Jaws appear to announce the `aria-valuenow` by calculating its percentage based
1046
- // on its value between `aria-valuemin` and `aria-valuemax`. Due to how decimals are handled,
1047
- // it can cause the slider to read out a very long value like 0.20000068 if the current value
1048
- // is 0.2 with a min of 0 and max of 1. We work around the issue by setting `aria-valuetext`
1049
- // to the same value that we set on the slider's thumb which will be truncated.
1050
- '[attr.aria-valuetext]': 'valueText == null ? displayValue : valueText',
1051
- '[attr.aria-orientation]': 'vertical ? "vertical" : "horizontal"',
1052
- '[class.mtx-slider-disabled]': 'disabled',
1053
- '[class.mtx-slider-has-ticks]': 'tickInterval',
1054
- '[class.mtx-slider-horizontal]': '!vertical',
1055
- '[class.mtx-slider-axis-inverted]': '_invertAxis',
1056
- '[class.mtx-slider-sliding]': '_isSliding',
1057
- '[class.mtx-slider-thumb-label-showing]': 'thumbLabel',
1058
- '[class.mtx-slider-vertical]': 'vertical',
1059
- '[class.mtx-slider-min-value]': '_isMinValue',
1060
- '[class.mtx-range-slider]': 'isRangeSlider()',
1061
- '[class.mtx-slider-hide-last-tick]': 'disabled || _isMinValue && _thumbGap && _invertAxis',
1062
- '[class._mtx-animation-noopable]': '_animationMode === "NoopAnimations"',
1063
- }, inputs: ['disabled', 'color', 'tabIndex'], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"mtx-slider-wrapper\" #sliderWrapper>\n <div class=\"mtx-slider-track-wrapper\">\n <div *ngIf=\"isRangeSlider()\"\n class=\"mtx-slider-track-background mtx-slider-track-background-left\"\n [ngStyle]=\"_trackBackgroundStylesLeft\"></div>\n <div class=\"mtx-slider-track-background mtx-slider-track-background-right\"\n [ngStyle]=\"_trackBackgroundStylesRight\"></div>\n <div class=\"mtx-slider-track-fill\" [ngClass]=\"{'mtx-range-slider-fill': isRangeSlider()}\"\n [ngStyle]=\"_trackFillStyles\"></div>\n </div>\n <div class=\"mtx-slider-ticks-container\" [ngStyle]=\"_ticksContainerStyles\">\n <div class=\"mtx-slider-ticks\" [ngStyle]=\"_ticksStyles\"></div>\n </div>\n <div class=\"mtx-slider-thumb-container\" #leftSlider\n [ngStyle]=\"_thumbContainerStylesLeft\">\n <div class=\"mtx-slider-focus-ring\"></div>\n <div class=\"mtx-slider-thumb left\"></div>\n <div class=\"mtx-slider-thumb-label\">\n <span class=\"mtx-slider-thumb-label-text\">{{displayValue}}</span>\n </div>\n </div>\n <div *ngIf=\"isRangeSlider()\"\n class=\"mtx-slider-thumb-container\" #rightSlider\n [ngStyle]=\"_thumbContainerStylesRight\">\n <div class=\"mtx-slider-focus-ring\"></div>\n <div class=\"mtx-slider-thumb right\"></div>\n <div class=\"mtx-slider-thumb-label\">\n <span class=\"mtx-slider-thumb-label-text\">{{displayValueRight}}</span>\n </div>\n </div>\n</div>\n", styles: [".mtx-slider{display:inline-block;position:relative;box-sizing:border-box;padding:8px;outline:none;vertical-align:middle}.mtx-slider:not(.mtx-slider-disabled):active,.mtx-slider.mtx-slider-sliding:not(.mtx-slider-disabled){cursor:grabbing}.mtx-slider-wrapper{-webkit-print-color-adjust:exact;print-color-adjust:exact;position:absolute}.mtx-slider-track-wrapper{position:absolute;top:0;left:0;overflow:hidden}.mtx-slider-track-fill,.mtx-slider-track-background-left{position:absolute;transform-origin:0 0;transition:transform .4s cubic-bezier(.25,.8,.25,1),background-color .4s cubic-bezier(.25,.8,.25,1)}.mtx-slider-track-background-right{position:absolute;transform-origin:100% 100%;transition:transform .4s cubic-bezier(.25,.8,.25,1),background-color .4s cubic-bezier(.25,.8,.25,1)}.mtx-slider-ticks-container{position:absolute;left:0;top:0;overflow:hidden}.mtx-slider-ticks{-webkit-background-clip:content-box;background-repeat:repeat;background-clip:content-box;box-sizing:border-box;opacity:0;transition:opacity .4s cubic-bezier(.25,.8,.25,1)}.mtx-slider-thumb-container{position:absolute;z-index:1;transition:transform .4s cubic-bezier(.25,.8,.25,1)}.mtx-slider-focus-ring{position:absolute;width:30px;height:30px;border-radius:50%;transform:scale(0);opacity:0;transition:transform .4s cubic-bezier(.25,.8,.25,1),background-color .4s cubic-bezier(.25,.8,.25,1),opacity .4s cubic-bezier(.25,.8,.25,1)}.mtx-slider.cdk-keyboard-focused .mtx-slider-focus-ring,.mtx-slider.cdk-program-focused .mtx-slider-focus-ring{transform:scale(1);opacity:1}.mtx-slider:not(.mtx-slider-disabled,.mtx-slider-sliding) .mtx-slider-thumb-label,.mtx-slider:not(.mtx-slider-disabled,.mtx-slider-sliding) .mtx-slider-thumb{cursor:grab}.mtx-slider-thumb{position:absolute;right:-10px;bottom:-10px;box-sizing:border-box;width:20px;height:20px;border:3px solid transparent;border-radius:50%;transform:scale(.7);transition:transform .4s cubic-bezier(.25,.8,.25,1),background-color .4s cubic-bezier(.25,.8,.25,1),border-color .4s cubic-bezier(.25,.8,.25,1)}.mtx-slider-thumb-label{display:none;align-items:center;justify-content:center;position:absolute;width:28px;height:28px;border-radius:50%;transition:transform .4s cubic-bezier(.25,.8,.25,1),border-radius .4s cubic-bezier(.25,.8,.25,1),background-color .4s cubic-bezier(.25,.8,.25,1)}.cdk-high-contrast-active .mtx-slider-thumb-label{outline:solid 1px}.mtx-slider-thumb-label-text{z-index:1;opacity:0;transition:opacity .4s cubic-bezier(.25,.8,.25,1)}.mtx-slider-sliding .mtx-slider-track-fill,.mtx-slider-sliding .mtx-slider-track-background-left,.mtx-slider-sliding .mtx-slider-track-background-right,.mtx-slider-sliding .mtx-slider-thumb-container{transition-duration:0ms}.mtx-slider-has-ticks .mtx-slider-wrapper:after{content:\"\";position:absolute;border-width:0;border-style:solid;opacity:0;transition:opacity .4s cubic-bezier(.25,.8,.25,1)}.mtx-slider-has-ticks.cdk-focused:not(.mtx-slider-hide-last-tick) .mtx-slider-wrapper:after,.mtx-slider-has-ticks:hover:not(.mtx-slider-hide-last-tick) .mtx-slider-wrapper:after{opacity:1}.mtx-slider-has-ticks.cdk-focused:not(.mtx-slider-disabled) .mtx-slider-ticks,.mtx-slider-has-ticks:hover:not(.mtx-slider-disabled) .mtx-slider-ticks{opacity:1}.mtx-slider-thumb-label-showing .mtx-slider-focus-ring{display:none}.mtx-slider-thumb-label-showing .mtx-slider-thumb-label{display:flex}.mtx-slider-axis-inverted .mtx-slider-track-fill{transform-origin:100% 100%}.mtx-slider-axis-inverted .mtx-slider-track-fill.mtx-range-slider-fill{transform-origin:0 0}.mtx-slider-axis-inverted .mtx-slider-track-background-left{transform-origin:100% 100%}.mtx-slider-axis-inverted .mtx-slider-track-background-right{transform-origin:0 0}.mtx-slider:not(.mtx-slider-disabled).cdk-focused.mtx-slider-thumb-label-showing .mtx-slider-thumb{transform:scale(0)}.mtx-slider:not(.mtx-slider-disabled).cdk-focused .mtx-slider-thumb-label{border-radius:50% 50% 0}.mtx-slider:not(.mtx-slider-disabled).cdk-focused .mtx-slider-thumb-label-text{opacity:1}.mtx-slider:not(.mtx-slider-disabled).cdk-mouse-focused .mtx-slider-thumb,.mtx-slider:not(.mtx-slider-disabled).cdk-touch-focused .mtx-slider-thumb,.mtx-slider:not(.mtx-slider-disabled).cdk-program-focused .mtx-slider-thumb{border-width:2px;transform:scale(1)}.mtx-slider-disabled .mtx-slider-focus-ring{transform:scale(0);opacity:0}.mtx-slider-disabled .mtx-slider-thumb{border-width:4px;transform:scale(.5)}.mtx-slider-disabled .mtx-slider-thumb-label{display:none}.mtx-slider-horizontal{height:48px;min-width:128px}.mtx-slider-horizontal .mtx-slider-wrapper{height:2px;top:23px;left:8px;right:8px}.mtx-slider-horizontal .mtx-slider-wrapper:after{height:2px;border-left-width:2px;right:0;top:0}.mtx-slider-horizontal .mtx-slider-track-wrapper{height:2px;width:100%}.mtx-slider-horizontal .mtx-slider-track-fill{height:2px;width:100%;transform:scaleX(0)}.mtx-slider-horizontal .mtx-slider-track-background-left,.mtx-slider-horizontal .mtx-slider-track-background-right{height:2px;width:100%;transform:scaleX(1)}.mtx-slider-horizontal .mtx-slider-ticks-container{height:2px;width:100%}.cdk-high-contrast-active .mtx-slider-horizontal .mtx-slider-ticks-container{height:0;outline:solid 2px;top:1px}.mtx-slider-horizontal .mtx-slider-ticks{height:2px;width:100%}.mtx-slider-horizontal .mtx-slider-thumb-container{width:100%;height:0;top:50%}.mtx-slider-horizontal .mtx-slider-focus-ring{top:-15px;right:-15px}.mtx-slider-horizontal .mtx-slider-thumb-label{right:-14px;top:-40px;transform:translateY(26px) scale(.01) rotate(45deg)}.mtx-slider-horizontal .mtx-slider-thumb-label-text{transform:rotate(-45deg)}.mtx-slider-horizontal.cdk-focused .mtx-slider-thumb-label{transform:rotate(45deg)}.cdk-high-contrast-active .mtx-slider-horizontal.cdk-focused .mtx-slider-thumb-label,.cdk-high-contrast-active .mtx-slider-horizontal.cdk-focused .mtx-slider-thumb-label-text{transform:none}.mtx-slider-vertical{width:48px;min-height:128px}.mtx-slider-vertical .mtx-slider-wrapper{width:2px;top:8px;bottom:8px;left:23px}.mtx-slider-vertical .mtx-slider-wrapper:after{width:2px;border-top-width:2px;bottom:0;left:0}.mtx-slider-vertical .mtx-slider-track-wrapper{height:100%;width:2px}.mtx-slider-vertical .mtx-slider-track-fill{height:100%;width:2px;transform:scaleY(0)}.mtx-slider-vertical .mtx-slider-track-background-left,.mtx-slider-vertical .mtx-slider-track-background-right{height:100%;width:2px;transform:scaleY(1)}.mtx-slider-vertical .mtx-slider-ticks-container{width:2px;height:100%}.cdk-high-contrast-active .mtx-slider-vertical .mtx-slider-ticks-container{width:0;outline:solid 2px;left:1px}.mtx-slider-vertical .mtx-slider-focus-ring{bottom:-15px;left:-15px}.mtx-slider-vertical .mtx-slider-ticks{width:2px;height:100%}.mtx-slider-vertical .mtx-slider-thumb-container{height:100%;width:0;left:50%}.mtx-slider-vertical .mtx-slider-thumb{-webkit-backface-visibility:hidden;backface-visibility:hidden}.mtx-slider-vertical .mtx-slider-thumb-label{bottom:-14px;left:-40px;transform:translate(26px) scale(.01) rotate(-45deg)}.mtx-slider-vertical .mtx-slider-thumb-label-text{transform:rotate(45deg)}.mtx-slider-vertical.cdk-focused .mtx-slider-thumb-label{transform:rotate(-45deg)}[dir=rtl] .mtx-slider-wrapper:after{left:0;right:auto}[dir=rtl] .mtx-slider-horizontal .mtx-slider-track-fill:not(.mtx-range-slider-fill){transform-origin:100% 100%}[dir=rtl] .mtx-slider-horizontal .mtx-slider-track-background-left{transform-origin:100% 100%}[dir=rtl] .mtx-slider-horizontal .mtx-slider-track-background-right,[dir=rtl] .mtx-slider-horizontal.mtx-slider-axis-inverted .mtx-slider-track-fill,[dir=rtl] .mtx-slider-horizontal.mtx-slider-axis-inverted .mtx-slider-track-background-left{transform-origin:0 0}[dir=rtl] .mtx-slider-horizontal.mtx-slider-axis-inverted .mtx-slider-track-background-right{transform-origin:100% 100%}.mtx-slider._mtx-animation-noopable .mtx-slider-track-fill,.mtx-slider._mtx-animation-noopable .mtx-slider-track-background-left,.mtx-slider._mtx-animation-noopable .mtx-slider-track-background-right,.mtx-slider._mtx-animation-noopable .mtx-slider-ticks,.mtx-slider._mtx-animation-noopable .mtx-slider-thumb-container,.mtx-slider._mtx-animation-noopable .mtx-slider-focus-ring,.mtx-slider._mtx-animation-noopable .mtx-slider-thumb,.mtx-slider._mtx-animation-noopable .mtx-slider-thumb-label,.mtx-slider._mtx-animation-noopable .mtx-slider-thumb-label-text,.mtx-slider._mtx-animation-noopable .mtx-slider-has-ticks .mtx-slider-wrapper:after{transition:none}\n"] }]
1064
- }], ctorParameters: function () {
1065
- return [{ type: i0.ElementRef }, { type: i1.FocusMonitor }, { type: i0.ChangeDetectorRef }, { type: i2.Directionality, decorators: [{
1066
- type: Optional
1067
- }] }, { type: undefined, decorators: [{
1068
- type: Attribute,
1069
- args: ['tabindex']
1070
- }] }, { type: undefined, decorators: [{
1071
- type: Optional
1072
- }, {
1073
- type: Inject,
1074
- args: [ANIMATION_MODULE_TYPE]
1075
- }] }, { type: i0.NgZone }];
1076
- }, propDecorators: { invert: [{
1077
- type: Input
1078
- }], max: [{
1079
- type: Input
1080
- }], min: [{
1081
- type: Input
1082
- }], step: [{
1083
- type: Input
1084
- }], thumbLabel: [{
1085
- type: Input
1086
- }], tickInterval: [{
1087
- type: Input
1088
- }], value: [{
1089
- type: Input
1090
- }], displayWith: [{
1091
- type: Input
1092
- }], valueText: [{
1093
- type: Input
1094
- }], vertical: [{
1095
- type: Input
1096
- }], change: [{
1097
- type: Output
1098
- }], input: [{
1099
- type: Output
1100
- }], valueChange: [{
1101
- type: Output
1102
- }], _sliderWrapper: [{
1103
- type: ViewChild,
1104
- args: ['sliderWrapper']
1105
- }] } });
1106
- /** Returns whether an event is a touch event. */
1107
- function isTouchEvent(event) {
1108
- // This function is called for every pixel that the user has dragged so we need it to be
1109
- // as fast as possible. Since we only bind mouse events and touch events, we can assume
1110
- // that if the event's name starts with `t`, it's a touch event.
1111
- return event.type[0] === 't';
1112
- }
1113
- /** Gets the coordinates of a touch or mouse event relative to the viewport. */
1114
- function getPointerPositionOnPage(event) {
1115
- // `touches` will be empty for start/end events so we have to fall back to `changedTouches`.
1116
- const point = isTouchEvent(event) ? event.touches[0] || event.changedTouches[0] : event;
1117
- return { x: point.clientX, y: point.clientY };
1118
- }
1119
-
1120
- class MtxSliderModule {
1121
- }
1122
- /** @nocollapse */ MtxSliderModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: MtxSliderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1123
- /** @nocollapse */ MtxSliderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.1", ngImport: i0, type: MtxSliderModule, declarations: [MtxSlider], imports: [CommonModule, MatCommonModule], exports: [MtxSlider, MatCommonModule] });
1124
- /** @nocollapse */ MtxSliderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: MtxSliderModule, imports: [CommonModule, MatCommonModule, MatCommonModule] });
1125
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: MtxSliderModule, decorators: [{
1126
- type: NgModule,
1127
- args: [{
1128
- imports: [CommonModule, MatCommonModule],
1129
- exports: [MtxSlider, MatCommonModule],
1130
- declarations: [MtxSlider],
1131
- }]
1132
- }] });
1133
-
1134
- /**
1135
- * Generated bundle index. Do not edit.
1136
- */
1137
-
1138
- export { MTX_SLIDER_VALUE_ACCESSOR, MtxSlider, MtxSliderChange, MtxSliderModule };
1139
- //# sourceMappingURL=mtxSlider.mjs.map