@ng-matero/extensions 12.5.3 → 13.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (559) hide show
  1. package/README.md +2 -16
  2. package/_all-color.scss +1 -1
  3. package/_all-theme.scss +2 -0
  4. package/_index.scss +3 -1
  5. package/_theming.scss +3 -1
  6. package/alert/_alert-theme.scss +2 -2
  7. package/alert/alert.component.d.ts +3 -0
  8. package/alert/alert.module.d.ts +6 -0
  9. package/alert/mtxAlert.d.ts +1 -0
  10. package/alert/package.json +5 -6
  11. package/button/button-loading.directive.d.ts +3 -0
  12. package/button/button.module.d.ts +8 -0
  13. package/button/mtxButton.d.ts +1 -0
  14. package/button/package.json +5 -6
  15. package/checkbox-group/checkbox-group.component.d.ts +3 -0
  16. package/checkbox-group/checkbox-group.module.d.ts +9 -0
  17. package/checkbox-group/mtxCheckboxGroup.d.ts +1 -0
  18. package/checkbox-group/package.json +5 -6
  19. package/colorpicker/_colorpicker-theme.import.scss +2 -0
  20. package/colorpicker/_colorpicker-theme.scss +43 -0
  21. package/colorpicker/colorpicker-animations.d.ts +8 -0
  22. package/colorpicker/colorpicker-content.scss +4 -0
  23. package/colorpicker/colorpicker-input.d.ts +92 -0
  24. package/colorpicker/colorpicker-module.d.ts +15 -0
  25. package/colorpicker/colorpicker-toggle.d.ts +38 -0
  26. package/colorpicker/colorpicker-toggle.scss +23 -0
  27. package/colorpicker/colorpicker.d.ts +131 -0
  28. package/{extensions.d.ts → colorpicker/mtxColorpicker.d.ts} +1 -0
  29. package/colorpicker/package.json +10 -0
  30. package/colorpicker/public-api.d.ts +5 -0
  31. package/column-resize/column-resize-directives/column-resize-flex.d.ts +3 -0
  32. package/column-resize/column-resize-directives/column-resize.d.ts +3 -0
  33. package/column-resize/column-resize-module.d.ts +6 -7
  34. package/column-resize/column-resize-notifier.d.ts +5 -7
  35. package/column-resize/column-resize.d.ts +3 -0
  36. package/column-resize/column-size-store.d.ts +3 -7
  37. package/column-resize/event-dispatcher.d.ts +3 -0
  38. package/column-resize/mtxColumnResize.d.ts +1 -0
  39. package/column-resize/overlay-handle.d.ts +3 -0
  40. package/column-resize/package.json +5 -6
  41. package/column-resize/resizable.d.ts +3 -0
  42. package/column-resize/resize-strategy.d.ts +7 -0
  43. package/core/datetime/datetime.module.d.ts +8 -0
  44. package/core/datetime/native-datetime-adapter.d.ts +3 -0
  45. package/core/density/private/_compatibility.scss +74 -0
  46. package/core/mtxCore.d.ts +1 -0
  47. package/core/package.json +5 -6
  48. package/{pipes/public-api.d.ts → core/pipes/index.d.ts} +0 -0
  49. package/core/pipes/pipes.module.d.ts +8 -0
  50. package/{pipes → core/pipes}/to-observable.pipe.d.ts +3 -0
  51. package/core/public-api.d.ts +1 -0
  52. package/core/style/_elevation.scss +197 -0
  53. package/core/style/_private.scss +41 -0
  54. package/core/style/_variables.scss +44 -0
  55. package/core/style/_vendor-prefixes.scss +60 -0
  56. package/core/theming/_palette.scss +746 -0
  57. package/core/theming/_theming.scss +430 -0
  58. package/core/typography/_typography-utils.scss +101 -0
  59. package/core/typography/_typography.scss +273 -0
  60. package/datetimepicker/_datetimepicker-theme.scss +17 -5
  61. package/datetimepicker/calendar-body.d.ts +3 -0
  62. package/datetimepicker/calendar-body.scss +5 -4
  63. package/datetimepicker/calendar.d.ts +6 -11
  64. package/datetimepicker/clock.d.ts +13 -9
  65. package/datetimepicker/datetimepicker-animations.d.ts +7 -5
  66. package/datetimepicker/datetimepicker-input.d.ts +7 -2
  67. package/datetimepicker/datetimepicker-module.d.ts +20 -0
  68. package/datetimepicker/datetimepicker-toggle.d.ts +20 -2
  69. package/datetimepicker/datetimepicker-toggle.scss +23 -0
  70. package/datetimepicker/datetimepicker-types.d.ts +1 -0
  71. package/datetimepicker/datetimepicker.d.ts +73 -25
  72. package/datetimepicker/month-view.d.ts +7 -4
  73. package/datetimepicker/mtxDatetimepicker.d.ts +1 -2
  74. package/datetimepicker/multi-year-view.d.ts +7 -4
  75. package/datetimepicker/package.json +5 -6
  76. package/datetimepicker/public-api.d.ts +4 -1
  77. package/datetimepicker/year-view.d.ts +7 -4
  78. package/dialog/{dialog.config.d.ts → dialog-config.d.ts} +0 -0
  79. package/dialog/dialog.component.d.ts +4 -1
  80. package/dialog/dialog.d.ts +4 -1
  81. package/dialog/dialog.module.d.ts +10 -0
  82. package/dialog/mtxDialog.d.ts +1 -0
  83. package/dialog/package.json +5 -6
  84. package/dialog/public-api.d.ts +2 -2
  85. package/esm2020/alert/alert.component.mjs +52 -0
  86. package/esm2020/alert/alert.module.mjs +18 -0
  87. package/{esm2015/alert/mtxAlert.js → esm2020/alert/mtxAlert.mjs} +0 -0
  88. package/{esm2015/alert/public-api.js → esm2020/alert/public-api.mjs} +0 -0
  89. package/esm2020/button/button-loading.directive.mjs +79 -0
  90. package/esm2020/button/button.module.mjs +20 -0
  91. package/{esm2015/button/mtxButton.js → esm2020/button/mtxButton.mjs} +0 -0
  92. package/{esm2015/button/public-api.js → esm2020/button/public-api.mjs} +0 -0
  93. package/esm2020/checkbox-group/checkbox-group.component.mjs +234 -0
  94. package/{esm2015/checkbox-group/checkbox-group.interface.js → esm2020/checkbox-group/checkbox-group.interface.mjs} +0 -0
  95. package/esm2020/checkbox-group/checkbox-group.module.mjs +21 -0
  96. package/{esm2015/checkbox-group/mtxCheckboxGroup.js → esm2020/checkbox-group/mtxCheckboxGroup.mjs} +0 -0
  97. package/{esm2015/checkbox-group/public-api.js → esm2020/checkbox-group/public-api.mjs} +0 -0
  98. package/esm2020/colorpicker/colorpicker-animations.mjs +16 -0
  99. package/esm2020/colorpicker/colorpicker-input.mjs +228 -0
  100. package/esm2020/colorpicker/colorpicker-module.mjs +65 -0
  101. package/esm2020/colorpicker/colorpicker-toggle.mjs +90 -0
  102. package/esm2020/colorpicker/colorpicker.mjs +363 -0
  103. package/esm2020/colorpicker/mtxColorpicker.mjs +5 -0
  104. package/esm2020/colorpicker/public-api.mjs +6 -0
  105. package/esm2020/column-resize/column-resize-directives/column-resize-flex.mjs +45 -0
  106. package/esm2020/column-resize/column-resize-directives/column-resize.mjs +45 -0
  107. package/{esm2015/column-resize/column-resize-directives/constants.js → esm2020/column-resize/column-resize-directives/constants.mjs} +0 -0
  108. package/esm2020/column-resize/column-resize-module.mjs +28 -0
  109. package/esm2020/column-resize/column-resize-notifier.mjs +47 -0
  110. package/esm2020/column-resize/column-resize.mjs +82 -0
  111. package/esm2020/column-resize/column-size-store.mjs +20 -0
  112. package/esm2020/column-resize/event-dispatcher.mjs +67 -0
  113. package/{esm2015/column-resize/mtxColumnResize.js → esm2020/column-resize/mtxColumnResize.mjs} +0 -0
  114. package/esm2020/column-resize/overlay-handle.mjs +146 -0
  115. package/{esm2015/column-resize/polyfill.js → esm2020/column-resize/polyfill.mjs} +0 -0
  116. package/{esm2015/column-resize/public-api.js → esm2020/column-resize/public-api.mjs} +0 -0
  117. package/esm2020/column-resize/resizable.mjs +199 -0
  118. package/{esm2015/column-resize/resize-ref.js → esm2020/column-resize/resize-ref.mjs} +0 -0
  119. package/esm2020/column-resize/resize-strategy.mjs +232 -0
  120. package/{esm2015/column-resize/selectors.js → esm2020/column-resize/selectors.mjs} +0 -0
  121. package/{esm2015/core/datetime/datetime-adapter.js → esm2020/core/datetime/datetime-adapter.mjs} +0 -0
  122. package/{esm2015/core/datetime/datetime-formats.js → esm2020/core/datetime/datetime-formats.mjs} +0 -0
  123. package/esm2020/core/datetime/datetime.module.mjs +42 -0
  124. package/{esm2015/core/datetime/index.js → esm2020/core/datetime/index.mjs} +0 -0
  125. package/esm2020/core/datetime/native-datetime-adapter.mjs +138 -0
  126. package/{esm2015/core/datetime/native-datetime-formats.js → esm2020/core/datetime/native-datetime-formats.mjs} +0 -0
  127. package/{esm2015/core/mtxCore.js → esm2020/core/mtxCore.mjs} +0 -0
  128. package/esm2020/core/pipes/index.mjs +3 -0
  129. package/esm2020/core/pipes/pipes.module.mjs +18 -0
  130. package/esm2020/core/pipes/to-observable.pipe.mjs +15 -0
  131. package/{esm2015/core/public-api.js → esm2020/core/public-api.mjs} +2 -1
  132. package/esm2020/datetimepicker/calendar-body.mjs +78 -0
  133. package/esm2020/datetimepicker/calendar.mjs +618 -0
  134. package/esm2020/datetimepicker/clock.mjs +277 -0
  135. package/esm2020/datetimepicker/datetimepicker-animations.mjs +44 -0
  136. package/{esm2015/datetimepicker/datetimepicker-errors.js → esm2020/datetimepicker/datetimepicker-errors.mjs} +0 -0
  137. package/{esm2015/datetimepicker/datetimepicker-filtertype.js → esm2020/datetimepicker/datetimepicker-filtertype.mjs} +0 -0
  138. package/esm2020/datetimepicker/datetimepicker-input.mjs +344 -0
  139. package/esm2020/datetimepicker/datetimepicker-module.mjs +75 -0
  140. package/esm2020/datetimepicker/datetimepicker-toggle.mjs +94 -0
  141. package/esm2020/datetimepicker/datetimepicker-types.mjs +2 -0
  142. package/esm2020/datetimepicker/datetimepicker.mjs +492 -0
  143. package/esm2020/datetimepicker/month-view.mjs +148 -0
  144. package/esm2020/datetimepicker/mtxDatetimepicker.mjs +5 -0
  145. package/esm2020/datetimepicker/multi-year-view.mjs +214 -0
  146. package/esm2020/datetimepicker/public-api.mjs +14 -0
  147. package/esm2020/datetimepicker/year-view.mjs +138 -0
  148. package/{esm2015/dialog/dialog.config.js → esm2020/dialog/dialog-config.mjs} +1 -1
  149. package/esm2020/dialog/dialog.component.mjs +33 -0
  150. package/esm2020/dialog/dialog.mjs +74 -0
  151. package/esm2020/dialog/dialog.module.mjs +24 -0
  152. package/{esm2015/dialog/mtxDialog.js → esm2020/dialog/mtxDialog.mjs} +0 -0
  153. package/esm2020/dialog/public-api.mjs +5 -0
  154. package/esm2020/form-group/form-group.component.mjs +37 -0
  155. package/esm2020/form-group/form-group.module.mjs +18 -0
  156. package/{esm2015/form-group/mtxFormGroup.js → esm2020/form-group/mtxFormGroup.mjs} +0 -0
  157. package/{esm2015/form-group/public-api.js → esm2020/form-group/public-api.mjs} +0 -0
  158. package/esm2020/grid/cell.component.mjs +108 -0
  159. package/esm2020/grid/column-menu.component.mjs +95 -0
  160. package/esm2020/grid/column-resize/column-resize-directives/column-resize-flex.mjs +37 -0
  161. package/esm2020/grid/column-resize/column-resize-directives/column-resize.mjs +37 -0
  162. package/{esm2015/grid/column-resize/column-resize-directives/common.js → esm2020/grid/column-resize/column-resize-directives/common.mjs} +0 -0
  163. package/esm2020/grid/column-resize/column-resize-module.mjs +42 -0
  164. package/esm2020/grid/column-resize/overlay-handle.mjs +60 -0
  165. package/{esm2015/grid/column-resize/resizable-directives/common.js → esm2020/grid/column-resize/resizable-directives/common.mjs} +0 -0
  166. package/esm2020/grid/column-resize/resizable-directives/resizable.mjs +62 -0
  167. package/esm2020/grid/column-resize/resize-strategy.mjs +42 -0
  168. package/esm2020/grid/expansion-toggle.directive.mjs +64 -0
  169. package/esm2020/grid/grid.component.mjs +556 -0
  170. package/{esm2015/grid/grid.interface.js → esm2020/grid/grid.interface.mjs} +0 -0
  171. package/esm2020/grid/grid.module.mjs +117 -0
  172. package/esm2020/grid/grid.service.mjs +44 -0
  173. package/{esm2015/grid/mtxGrid.js → esm2020/grid/mtxGrid.mjs} +0 -0
  174. package/esm2020/grid/public-api.mjs +16 -0
  175. package/esm2020/loader/loader.component.mjs +63 -0
  176. package/esm2020/loader/loader.module.mjs +20 -0
  177. package/{esm2015/loader/mtxLoader.js → esm2020/loader/mtxLoader.mjs} +0 -0
  178. package/{esm2015/loader/public-api.js → esm2020/loader/public-api.mjs} +0 -0
  179. package/esm2020/ng-matero-extensions.mjs +5 -0
  180. package/{esm2015/popover/mtxPopover.js → esm2020/popover/mtxPopover.mjs} +0 -0
  181. package/{esm2015/popover/popover-animations.js → esm2020/popover/popover-animations.mjs} +0 -0
  182. package/{esm2015/popover/popover-errors.js → esm2020/popover/popover-errors.mjs} +0 -0
  183. package/{esm2015/popover/popover-interfaces.js → esm2020/popover/popover-interfaces.mjs} +0 -0
  184. package/esm2020/popover/popover-module.mjs +22 -0
  185. package/esm2020/popover/popover-target.mjs +17 -0
  186. package/esm2020/popover/popover-trigger.mjs +441 -0
  187. package/{esm2015/popover/popover-types.js → esm2020/popover/popover-types.mjs} +0 -0
  188. package/esm2020/popover/popover.mjs +334 -0
  189. package/{esm2015/popover/public-api.js → esm2020/popover/public-api.mjs} +0 -0
  190. package/{esm2015/progress/mtxProgress.js → esm2020/progress/mtxProgress.mjs} +0 -0
  191. package/esm2020/progress/progress.component.mjs +55 -0
  192. package/esm2020/progress/progress.module.mjs +18 -0
  193. package/{esm2015/progress/public-api.js → esm2020/progress/public-api.mjs} +0 -0
  194. package/esm2020/public-api.mjs +5 -0
  195. package/{esm2015/select/mtxSelect.js → esm2020/select/mtxSelect.mjs} +0 -0
  196. package/{esm2015/select/option.component.js → esm2020/select/option.component.mjs} +18 -26
  197. package/{esm2015/select/public-api.js → esm2020/select/public-api.mjs} +0 -0
  198. package/esm2020/select/select.component.mjs +458 -0
  199. package/esm2020/select/select.module.mjs +74 -0
  200. package/esm2020/select/templates.directive.mjs +124 -0
  201. package/{esm2015/slider/mtxSlider.js → esm2020/slider/mtxSlider.mjs} +0 -0
  202. package/{esm2015/slider/public-api.js → esm2020/slider/public-api.mjs} +0 -0
  203. package/esm2020/slider/slider-module.mjs +19 -0
  204. package/esm2020/slider/slider.mjs +1115 -0
  205. package/{esm2015/split/interface.js → esm2020/split/interface.mjs} +0 -0
  206. package/{esm2015/split/mtxSplit.js → esm2020/split/mtxSplit.mjs} +0 -0
  207. package/{esm2015/split/public-api.js → esm2020/split/public-api.mjs} +0 -0
  208. package/esm2020/split/split-pane.directive.mjs +149 -0
  209. package/esm2020/split/split.component.mjs +619 -0
  210. package/esm2020/split/split.module.mjs +19 -0
  211. package/esm2020/split/utils.mjs +222 -0
  212. package/{esm2015/text3d/mtxText3d.js → esm2020/text3d/mtxText3d.mjs} +0 -0
  213. package/{esm2015/text3d/public-api.js → esm2020/text3d/public-api.mjs} +0 -0
  214. package/esm2020/text3d/text3d.component.mjs +45 -0
  215. package/esm2020/text3d/text3d.module.mjs +18 -0
  216. package/{esm2015/tooltip/mtxTooltip.js → esm2020/tooltip/mtxTooltip.mjs} +0 -0
  217. package/{esm2015/tooltip/public-api.js → esm2020/tooltip/public-api.mjs} +0 -0
  218. package/{esm2015/tooltip/tooltip-animations.js → esm2020/tooltip/tooltip-animations.mjs} +0 -0
  219. package/esm2020/tooltip/tooltip-module.mjs +23 -0
  220. package/esm2020/tooltip/tooltip.mjs +674 -0
  221. package/fesm2015/mtxAlert.mjs +74 -0
  222. package/fesm2015/mtxAlert.mjs.map +1 -0
  223. package/fesm2015/mtxButton.mjs +102 -0
  224. package/fesm2015/mtxButton.mjs.map +1 -0
  225. package/fesm2015/mtxCheckboxGroup.mjs +257 -0
  226. package/fesm2015/mtxCheckboxGroup.mjs.map +1 -0
  227. package/fesm2015/mtxColorpicker.mjs +754 -0
  228. package/fesm2015/mtxColorpicker.mjs.map +1 -0
  229. package/fesm2015/{mtxColumnResize.js → mtxColumnResize.mjs} +108 -145
  230. package/fesm2015/mtxColumnResize.mjs.map +1 -0
  231. package/fesm2015/mtxCore.mjs +362 -0
  232. package/fesm2015/mtxCore.mjs.map +1 -0
  233. package/fesm2015/mtxDatetimepicker.mjs +2474 -0
  234. package/fesm2015/mtxDatetimepicker.mjs.map +1 -0
  235. package/fesm2015/mtxDialog.mjs +128 -0
  236. package/fesm2015/mtxDialog.mjs.map +1 -0
  237. package/fesm2015/mtxFormGroup.mjs +59 -0
  238. package/fesm2015/mtxFormGroup.mjs.map +1 -0
  239. package/fesm2015/mtxGrid.mjs +1271 -0
  240. package/fesm2015/mtxGrid.mjs.map +1 -0
  241. package/fesm2015/mtxLoader.mjs +87 -0
  242. package/fesm2015/mtxLoader.mjs.map +1 -0
  243. package/fesm2015/mtxPopover.mjs +865 -0
  244. package/fesm2015/mtxPopover.mjs.map +1 -0
  245. package/fesm2015/mtxProgress.mjs +77 -0
  246. package/fesm2015/mtxProgress.mjs.map +1 -0
  247. package/fesm2015/mtxSelect.mjs +712 -0
  248. package/fesm2015/mtxSelect.mjs.map +1 -0
  249. package/fesm2015/mtxSlider.mjs +1139 -0
  250. package/fesm2015/mtxSlider.mjs.map +1 -0
  251. package/fesm2015/{mtxSplit.js → mtxSplit.mjs} +85 -98
  252. package/fesm2015/mtxSplit.mjs.map +1 -0
  253. package/fesm2015/mtxText3d.mjs +67 -0
  254. package/fesm2015/mtxText3d.mjs.map +1 -0
  255. package/fesm2015/{mtxTooltip.js → mtxTooltip.mjs} +85 -86
  256. package/fesm2015/mtxTooltip.mjs.map +1 -0
  257. package/fesm2015/ng-matero-extensions.mjs +9 -0
  258. package/fesm2015/ng-matero-extensions.mjs.map +1 -0
  259. package/fesm2020/mtxAlert.mjs +74 -0
  260. package/fesm2020/mtxAlert.mjs.map +1 -0
  261. package/fesm2020/mtxButton.mjs +102 -0
  262. package/fesm2020/mtxButton.mjs.map +1 -0
  263. package/fesm2020/mtxCheckboxGroup.mjs +257 -0
  264. package/fesm2020/mtxCheckboxGroup.mjs.map +1 -0
  265. package/fesm2020/mtxColorpicker.mjs +750 -0
  266. package/fesm2020/mtxColorpicker.mjs.map +1 -0
  267. package/fesm2020/mtxColumnResize.mjs +953 -0
  268. package/fesm2020/mtxColumnResize.mjs.map +1 -0
  269. package/{fesm2015/mtxCore.js → fesm2020/mtxCore.mjs} +75 -42
  270. package/fesm2020/mtxCore.mjs.map +1 -0
  271. package/fesm2020/mtxDatetimepicker.mjs +2462 -0
  272. package/fesm2020/mtxDatetimepicker.mjs.map +1 -0
  273. package/fesm2020/mtxDialog.mjs +129 -0
  274. package/fesm2020/mtxDialog.mjs.map +1 -0
  275. package/fesm2020/mtxFormGroup.mjs +59 -0
  276. package/fesm2020/mtxFormGroup.mjs.map +1 -0
  277. package/fesm2020/mtxGrid.mjs +1259 -0
  278. package/fesm2020/mtxGrid.mjs.map +1 -0
  279. package/fesm2020/mtxLoader.mjs +87 -0
  280. package/fesm2020/mtxLoader.mjs.map +1 -0
  281. package/{fesm2015/mtxPopover.js → fesm2020/mtxPopover.mjs} +120 -111
  282. package/fesm2020/mtxPopover.mjs.map +1 -0
  283. package/fesm2020/mtxProgress.mjs +77 -0
  284. package/fesm2020/mtxProgress.mjs.map +1 -0
  285. package/fesm2020/mtxSelect.mjs +709 -0
  286. package/fesm2020/mtxSelect.mjs.map +1 -0
  287. package/{fesm2015/mtxSlider.js → fesm2020/mtxSlider.mjs} +97 -94
  288. package/fesm2020/mtxSlider.mjs.map +1 -0
  289. package/fesm2020/mtxSplit.mjs +1007 -0
  290. package/fesm2020/mtxSplit.mjs.map +1 -0
  291. package/fesm2020/mtxText3d.mjs +67 -0
  292. package/fesm2020/mtxText3d.mjs.map +1 -0
  293. package/fesm2020/mtxTooltip.mjs +718 -0
  294. package/fesm2020/mtxTooltip.mjs.map +1 -0
  295. package/fesm2020/ng-matero-extensions.mjs +9 -0
  296. package/fesm2020/ng-matero-extensions.mjs.map +1 -0
  297. package/form-group/_form-group-theme.scss +1 -1
  298. package/form-group/form-group.component.d.ts +5 -4
  299. package/form-group/form-group.module.d.ts +6 -0
  300. package/form-group/mtxFormGroup.d.ts +1 -0
  301. package/form-group/package.json +5 -6
  302. package/grid/_grid-theme.scss +1 -1
  303. package/grid/cell.component.d.ts +3 -0
  304. package/grid/column-menu.component.d.ts +3 -0
  305. package/grid/column-menu.component.scss +1 -1
  306. package/grid/column-resize/_column-resize.scss +3 -3
  307. package/grid/column-resize/column-resize-directives/column-resize-flex.d.ts +3 -0
  308. package/grid/column-resize/column-resize-directives/column-resize.d.ts +3 -0
  309. package/grid/column-resize/column-resize-module.d.ts +12 -7
  310. package/grid/column-resize/overlay-handle.d.ts +3 -0
  311. package/grid/column-resize/resizable-directives/resizable.d.ts +3 -0
  312. package/grid/column-resize/resize-strategy.d.ts +3 -0
  313. package/grid/expansion-toggle.directive.d.ts +3 -0
  314. package/grid/grid.component.d.ts +20 -1
  315. package/grid/grid.module.d.ts +26 -0
  316. package/grid/grid.service.d.ts +3 -0
  317. package/grid/mtxGrid.d.ts +1 -0
  318. package/grid/package.json +5 -6
  319. package/grid/public-api.d.ts +0 -1
  320. package/loader/_loader-theme.scss +1 -1
  321. package/loader/loader.component.d.ts +7 -1
  322. package/loader/loader.module.d.ts +8 -0
  323. package/loader/mtxLoader.d.ts +1 -0
  324. package/loader/package.json +5 -6
  325. package/{color-picker/mtxColorPicker.d.ts → ng-matero-extensions.d.ts} +1 -0
  326. package/package.json +178 -15
  327. package/popover/_popover-theme.scss +1 -1
  328. package/popover/mtxPopover.d.ts +1 -0
  329. package/popover/package.json +5 -6
  330. package/popover/popover-module.d.ts +10 -0
  331. package/popover/popover-target.d.ts +3 -0
  332. package/popover/popover-trigger.d.ts +3 -0
  333. package/popover/popover.d.ts +3 -0
  334. package/progress/_progress-theme.scss +2 -2
  335. package/progress/mtxProgress.d.ts +1 -0
  336. package/progress/package.json +5 -6
  337. package/progress/progress.component.d.ts +3 -0
  338. package/progress/progress.module.d.ts +6 -0
  339. package/public-api.d.ts +2 -19
  340. package/select/_select-theme.scss +1 -1
  341. package/select/mtxSelect.d.ts +1 -0
  342. package/select/option.component.d.ts +3 -0
  343. package/select/package.json +5 -6
  344. package/select/select.component.d.ts +3 -0
  345. package/select/select.component.scss +1 -1
  346. package/select/select.module.d.ts +10 -0
  347. package/select/templates.directive.d.ts +23 -0
  348. package/slider/_slider-theme.scss +4 -4
  349. package/slider/mtxSlider.d.ts +1 -0
  350. package/slider/package.json +5 -6
  351. package/slider/slider-module.d.ts +7 -0
  352. package/slider/slider.d.ts +4 -1
  353. package/slider/slider.scss +7 -7
  354. package/split/_split-theme.scss +10 -3
  355. package/split/mtxSplit.d.ts +1 -0
  356. package/split/package.json +5 -6
  357. package/split/split-pane.directive.d.ts +3 -0
  358. package/split/split.component.d.ts +12 -1
  359. package/split/split.module.d.ts +7 -0
  360. package/text3d/_text3d-theme.scss +2 -2
  361. package/text3d/mtxText3d.d.ts +1 -0
  362. package/text3d/package.json +5 -6
  363. package/text3d/text3d.component.d.ts +3 -1
  364. package/text3d/text3d.module.d.ts +6 -0
  365. package/tooltip/_tooltip-theme.scss +3 -3
  366. package/tooltip/mtxTooltip.d.ts +1 -0
  367. package/tooltip/package.json +5 -6
  368. package/tooltip/tooltip-module.d.ts +10 -0
  369. package/tooltip/tooltip.d.ts +5 -0
  370. package/tooltip/tooltip.scss +1 -1
  371. package/alert/mtxAlert.metadata.json +0 -1
  372. package/bundles/extensions.umd.js +0 -164
  373. package/bundles/extensions.umd.js.map +0 -1
  374. package/bundles/mtxAlert.umd.js +0 -101
  375. package/bundles/mtxAlert.umd.js.map +0 -1
  376. package/bundles/mtxButton.umd.js +0 -119
  377. package/bundles/mtxButton.umd.js.map +0 -1
  378. package/bundles/mtxCheckboxGroup.umd.js +0 -284
  379. package/bundles/mtxCheckboxGroup.umd.js.map +0 -1
  380. package/bundles/mtxColorPicker.umd.js +0 -337
  381. package/bundles/mtxColorPicker.umd.js.map +0 -1
  382. package/bundles/mtxColumnResize.umd.js +0 -1339
  383. package/bundles/mtxColumnResize.umd.js.map +0 -1
  384. package/bundles/mtxCore.umd.js +0 -670
  385. package/bundles/mtxCore.umd.js.map +0 -1
  386. package/bundles/mtxDatetimepicker.umd.js +0 -2590
  387. package/bundles/mtxDatetimepicker.umd.js.map +0 -1
  388. package/bundles/mtxDialog.umd.js +0 -160
  389. package/bundles/mtxDialog.umd.js.map +0 -1
  390. package/bundles/mtxFormGroup.umd.js +0 -80
  391. package/bundles/mtxFormGroup.umd.js.map +0 -1
  392. package/bundles/mtxGrid.umd.js +0 -1581
  393. package/bundles/mtxGrid.umd.js.map +0 -1
  394. package/bundles/mtxLoader.umd.js +0 -104
  395. package/bundles/mtxLoader.umd.js.map +0 -1
  396. package/bundles/mtxPipes.umd.js +0 -44
  397. package/bundles/mtxPipes.umd.js.map +0 -1
  398. package/bundles/mtxPopover.umd.js +0 -1260
  399. package/bundles/mtxPopover.umd.js.map +0 -1
  400. package/bundles/mtxProgress.umd.js +0 -92
  401. package/bundles/mtxProgress.umd.js.map +0 -1
  402. package/bundles/mtxSelect.umd.js +0 -1097
  403. package/bundles/mtxSelect.umd.js.map +0 -1
  404. package/bundles/mtxSlider.umd.js +0 -1551
  405. package/bundles/mtxSlider.umd.js.map +0 -1
  406. package/bundles/mtxSplit.umd.js +0 -1432
  407. package/bundles/mtxSplit.umd.js.map +0 -1
  408. package/bundles/mtxText3d.umd.js +0 -92
  409. package/bundles/mtxText3d.umd.js.map +0 -1
  410. package/bundles/mtxTooltip.umd.js +0 -1081
  411. package/bundles/mtxTooltip.umd.js.map +0 -1
  412. package/button/mtxButton.metadata.json +0 -1
  413. package/checkbox-group/mtxCheckboxGroup.metadata.json +0 -1
  414. package/color-picker/color-picker.component.d.ts +0 -120
  415. package/color-picker/color-picker.module.d.ts +0 -2
  416. package/color-picker/mtxColorPicker.metadata.json +0 -1
  417. package/color-picker/package.json +0 -11
  418. package/color-picker/public-api.d.ts +0 -2
  419. package/column-resize/mtxColumnResize.metadata.json +0 -1
  420. package/core/mtxCore.metadata.json +0 -1
  421. package/datetimepicker/datetimepicker.module.d.ts +0 -2
  422. package/datetimepicker/mtxDatetimepicker.metadata.json +0 -1
  423. package/dialog/mtxDialog.metadata.json +0 -1
  424. package/esm2015/alert/alert.component.js +0 -63
  425. package/esm2015/alert/alert.module.js +0 -14
  426. package/esm2015/button/button-loading.directive.js +0 -89
  427. package/esm2015/button/button.module.js +0 -16
  428. package/esm2015/checkbox-group/checkbox-group.component.js +0 -235
  429. package/esm2015/checkbox-group/checkbox-group.module.js +0 -17
  430. package/esm2015/color-picker/color-picker.component.js +0 -268
  431. package/esm2015/color-picker/color-picker.module.js +0 -26
  432. package/esm2015/color-picker/mtxColorPicker.js +0 -5
  433. package/esm2015/color-picker/public-api.js +0 -3
  434. package/esm2015/column-resize/column-resize-directives/column-resize-flex.js +0 -54
  435. package/esm2015/column-resize/column-resize-directives/column-resize.js +0 -54
  436. package/esm2015/column-resize/column-resize-module.js +0 -24
  437. package/esm2015/column-resize/column-resize-notifier.js +0 -54
  438. package/esm2015/column-resize/column-resize.js +0 -80
  439. package/esm2015/column-resize/column-size-store.js +0 -18
  440. package/esm2015/column-resize/event-dispatcher.js +0 -75
  441. package/esm2015/column-resize/overlay-handle.js +0 -144
  442. package/esm2015/column-resize/resizable.js +0 -197
  443. package/esm2015/column-resize/resize-strategy.js +0 -245
  444. package/esm2015/core/datetime/datetime.module.js +0 -32
  445. package/esm2015/core/datetime/native-datetime-adapter.js +0 -144
  446. package/esm2015/datetimepicker/calendar-body.js +0 -75
  447. package/esm2015/datetimepicker/calendar.js +0 -629
  448. package/esm2015/datetimepicker/clock.js +0 -283
  449. package/esm2015/datetimepicker/datetimepicker-animations.js +0 -30
  450. package/esm2015/datetimepicker/datetimepicker-input.js +0 -333
  451. package/esm2015/datetimepicker/datetimepicker-toggle.js +0 -81
  452. package/esm2015/datetimepicker/datetimepicker.js +0 -411
  453. package/esm2015/datetimepicker/datetimepicker.module.js +0 -49
  454. package/esm2015/datetimepicker/month-view.js +0 -149
  455. package/esm2015/datetimepicker/mtxDatetimepicker.js +0 -7
  456. package/esm2015/datetimepicker/multi-year-view.js +0 -214
  457. package/esm2015/datetimepicker/public-api.js +0 -11
  458. package/esm2015/datetimepicker/year-view.js +0 -140
  459. package/esm2015/dialog/dialog.component.js +0 -40
  460. package/esm2015/dialog/dialog.js +0 -81
  461. package/esm2015/dialog/dialog.module.js +0 -21
  462. package/esm2015/dialog/public-api.js +0 -5
  463. package/esm2015/extensions-experimental.module.js +0 -13
  464. package/esm2015/extensions.js +0 -5
  465. package/esm2015/extensions.module.js +0 -40
  466. package/esm2015/form-group/form-group.component.js +0 -47
  467. package/esm2015/form-group/form-group.module.js +0 -14
  468. package/esm2015/grid/cell-selection.directive.js +0 -62
  469. package/esm2015/grid/cell.component.js +0 -115
  470. package/esm2015/grid/column-menu.component.js +0 -72
  471. package/esm2015/grid/column-resize/column-resize-directives/column-resize-flex.js +0 -47
  472. package/esm2015/grid/column-resize/column-resize-directives/column-resize.js +0 -47
  473. package/esm2015/grid/column-resize/column-resize-module.js +0 -36
  474. package/esm2015/grid/column-resize/overlay-handle.js +0 -68
  475. package/esm2015/grid/column-resize/resizable-directives/resizable.js +0 -75
  476. package/esm2015/grid/column-resize/resize-strategy.js +0 -45
  477. package/esm2015/grid/expansion-toggle.directive.js +0 -62
  478. package/esm2015/grid/grid.component.js +0 -418
  479. package/esm2015/grid/grid.module.js +0 -69
  480. package/esm2015/grid/grid.service.js +0 -50
  481. package/esm2015/grid/public-api.js +0 -17
  482. package/esm2015/loader/loader.component.js +0 -66
  483. package/esm2015/loader/loader.module.js +0 -16
  484. package/esm2015/pipes/mtxPipes.js +0 -5
  485. package/esm2015/pipes/pipes.module.js +0 -14
  486. package/esm2015/pipes/public-api.js +0 -3
  487. package/esm2015/pipes/to-observable.pipe.js +0 -12
  488. package/esm2015/popover/popover-module.js +0 -18
  489. package/esm2015/popover/popover-target.js +0 -24
  490. package/esm2015/popover/popover-trigger.js +0 -434
  491. package/esm2015/popover/popover.js +0 -326
  492. package/esm2015/progress/progress.component.js +0 -54
  493. package/esm2015/progress/progress.module.js +0 -14
  494. package/esm2015/public-api.js +0 -23
  495. package/esm2015/select/select.component.js +0 -380
  496. package/esm2015/select/select.module.js +0 -46
  497. package/esm2015/select/templates.directive.js +0 -211
  498. package/esm2015/slider/slider-module.js +0 -15
  499. package/esm2015/slider/slider.js +0 -1115
  500. package/esm2015/split/split-pane.directive.js +0 -156
  501. package/esm2015/split/split.component.js +0 -622
  502. package/esm2015/split/split.module.js +0 -15
  503. package/esm2015/split/utils.js +0 -227
  504. package/esm2015/text3d/text3d.component.js +0 -53
  505. package/esm2015/text3d/text3d.module.js +0 -14
  506. package/esm2015/tooltip/tooltip-module.js +0 -20
  507. package/esm2015/tooltip/tooltip.js +0 -681
  508. package/extensions-experimental.module.d.ts +0 -2
  509. package/extensions.metadata.json +0 -1
  510. package/extensions.module.d.ts +0 -2
  511. package/fesm2015/extensions.js +0 -80
  512. package/fesm2015/extensions.js.map +0 -1
  513. package/fesm2015/mtxAlert.js +0 -82
  514. package/fesm2015/mtxAlert.js.map +0 -1
  515. package/fesm2015/mtxButton.js +0 -108
  516. package/fesm2015/mtxButton.js.map +0 -1
  517. package/fesm2015/mtxCheckboxGroup.js +0 -255
  518. package/fesm2015/mtxCheckboxGroup.js.map +0 -1
  519. package/fesm2015/mtxColorPicker.js +0 -295
  520. package/fesm2015/mtxColorPicker.js.map +0 -1
  521. package/fesm2015/mtxColumnResize.js.map +0 -1
  522. package/fesm2015/mtxCore.js.map +0 -1
  523. package/fesm2015/mtxDatetimepicker.js +0 -2355
  524. package/fesm2015/mtxDatetimepicker.js.map +0 -1
  525. package/fesm2015/mtxDialog.js +0 -141
  526. package/fesm2015/mtxDialog.js.map +0 -1
  527. package/fesm2015/mtxFormGroup.js +0 -66
  528. package/fesm2015/mtxFormGroup.js.map +0 -1
  529. package/fesm2015/mtxGrid.js +0 -1186
  530. package/fesm2015/mtxGrid.js.map +0 -1
  531. package/fesm2015/mtxLoader.js +0 -87
  532. package/fesm2015/mtxLoader.js.map +0 -1
  533. package/fesm2015/mtxPipes.js +0 -31
  534. package/fesm2015/mtxPipes.js.map +0 -1
  535. package/fesm2015/mtxPopover.js.map +0 -1
  536. package/fesm2015/mtxProgress.js +0 -73
  537. package/fesm2015/mtxProgress.js.map +0 -1
  538. package/fesm2015/mtxSelect.js +0 -700
  539. package/fesm2015/mtxSelect.js.map +0 -1
  540. package/fesm2015/mtxSlider.js.map +0 -1
  541. package/fesm2015/mtxSplit.js.map +0 -1
  542. package/fesm2015/mtxText3d.js +0 -72
  543. package/fesm2015/mtxText3d.js.map +0 -1
  544. package/fesm2015/mtxTooltip.js.map +0 -1
  545. package/form-group/mtxFormGroup.metadata.json +0 -1
  546. package/grid/cell-selection.directive.d.ts +0 -17
  547. package/grid/mtxGrid.metadata.json +0 -1
  548. package/loader/mtxLoader.metadata.json +0 -1
  549. package/pipes/mtxPipes.d.ts +0 -4
  550. package/pipes/mtxPipes.metadata.json +0 -1
  551. package/pipes/package.json +0 -11
  552. package/pipes/pipes.module.d.ts +0 -2
  553. package/popover/mtxPopover.metadata.json +0 -1
  554. package/progress/mtxProgress.metadata.json +0 -1
  555. package/select/mtxSelect.metadata.json +0 -1
  556. package/slider/mtxSlider.metadata.json +0 -1
  557. package/split/mtxSplit.metadata.json +0 -1
  558. package/text3d/mtxText3d.metadata.json +0 -1
  559. package/tooltip/mtxTooltip.metadata.json +0 -1
@@ -0,0 +1,953 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Directive, Injectable, Inject, NgModule, Injector } from '@angular/core';
3
+ import { Subject, fromEvent, merge, combineLatest, Observable } from 'rxjs';
4
+ import { map, takeUntil, filter, mapTo, take, startWith, pairwise, distinctUntilChanged, share, skip } from 'rxjs/operators';
5
+ import { DOCUMENT } from '@angular/common';
6
+ import { coerceCssPixelValue } from '@angular/cdk/coercion';
7
+ import * as i2 from '@angular/cdk/table';
8
+ import { _COALESCED_STYLE_SCHEDULER } from '@angular/cdk/table';
9
+ import { ComponentPortal } from '@angular/cdk/portal';
10
+ import { ESCAPE } from '@angular/cdk/keycodes';
11
+
12
+ /**
13
+ * @license
14
+ * Copyright Google LLC All Rights Reserved.
15
+ *
16
+ * Use of this source code is governed by an MIT-style license that can be
17
+ * found in the LICENSE file at https://angular.io/license
18
+ */
19
+ // TODO: Figure out how to remove `mat-` classes from the CDK part of the
20
+ // column resize implementation.
21
+ const HEADER_CELL_SELECTOR = '.cdk-header-cell, .mat-header-cell';
22
+ const HEADER_ROW_SELECTOR = '.cdk-header-row, .mat-header-row';
23
+ const RESIZE_OVERLAY_SELECTOR = '.mat-column-resize-overlay-thumb';
24
+
25
+ /**
26
+ * @license
27
+ * Copyright Google LLC All Rights Reserved.
28
+ *
29
+ * Use of this source code is governed by an MIT-style license that can be
30
+ * found in the LICENSE file at https://angular.io/license
31
+ */
32
+ /** IE 11 compatible matches implementation. */
33
+ function matches(element, selector) {
34
+ return element.matches ? element.matches(selector) : element.msMatchesSelector(selector);
35
+ }
36
+ /** IE 11 compatible closest implementation that is able to start from non-Element Nodes. */
37
+ function closest(element, selector) {
38
+ if (!(element instanceof Node)) {
39
+ return null;
40
+ }
41
+ let curr = element;
42
+ while (curr != null && !(curr instanceof Element)) {
43
+ curr = curr.parentNode;
44
+ }
45
+ return (curr &&
46
+ (hasNativeClosest
47
+ ? curr.closest(selector)
48
+ : polyfillClosest(curr, selector)));
49
+ }
50
+ /** Polyfill for browsers without Element.closest. */
51
+ function polyfillClosest(element, selector) {
52
+ let curr = element;
53
+ while (curr != null && !(curr instanceof Element && matches(curr, selector))) {
54
+ curr = curr.parentNode;
55
+ }
56
+ return (curr || null);
57
+ }
58
+ const hasNativeClosest = !!Element.prototype.closest;
59
+
60
+ /**
61
+ * @license
62
+ * Copyright Google LLC All Rights Reserved.
63
+ *
64
+ * Use of this source code is governed by an MIT-style license that can be
65
+ * found in the LICENSE file at https://angular.io/license
66
+ */
67
+ const HOVER_OR_ACTIVE_CLASS = 'cdk-column-resize-hover-or-active';
68
+ const WITH_RESIZED_COLUMN_CLASS = 'cdk-column-resize-with-resized-column';
69
+ let nextId = 0;
70
+ /**
71
+ * Base class for ColumnResize directives which attach to mat-table elements to
72
+ * provide common events and services for column resizing.
73
+ */
74
+ class ColumnResize {
75
+ constructor() {
76
+ this.destroyed = new Subject();
77
+ /** Unique ID for this table instance. */
78
+ this.selectorId = `${++nextId}`;
79
+ }
80
+ ngAfterViewInit() {
81
+ this.elementRef.nativeElement.classList.add(this.getUniqueCssClass());
82
+ this._listenForRowHoverEvents();
83
+ this._listenForResizeActivity();
84
+ this._listenForHoverActivity();
85
+ }
86
+ ngOnDestroy() {
87
+ this.destroyed.next();
88
+ this.destroyed.complete();
89
+ }
90
+ /** Gets the unique CSS class name for this table instance. */
91
+ getUniqueCssClass() {
92
+ return `cdk-column-resize-${this.selectorId}`;
93
+ }
94
+ /** Called when a column in the table is resized. Applies a css class to the table element. */
95
+ setResized() {
96
+ this.elementRef.nativeElement.classList.add(WITH_RESIZED_COLUMN_CLASS);
97
+ }
98
+ _listenForRowHoverEvents() {
99
+ this.ngZone.runOutsideAngular(() => {
100
+ const element = this.elementRef.nativeElement;
101
+ fromEvent(element, 'mouseover')
102
+ .pipe(map(event => closest(event.target, HEADER_CELL_SELECTOR)), takeUntil(this.destroyed))
103
+ .subscribe(this.eventDispatcher.headerCellHovered);
104
+ fromEvent(element, 'mouseleave')
105
+ .pipe(filter(event => !!event.relatedTarget &&
106
+ !matches(event.relatedTarget, RESIZE_OVERLAY_SELECTOR)), mapTo(null), takeUntil(this.destroyed))
107
+ .subscribe(this.eventDispatcher.headerCellHovered);
108
+ });
109
+ }
110
+ _listenForResizeActivity() {
111
+ merge(this.eventDispatcher.overlayHandleActiveForCell.pipe(mapTo(undefined)), this.notifier.triggerResize.pipe(mapTo(undefined)), this.notifier.resizeCompleted.pipe(mapTo(undefined)))
112
+ .pipe(take(1), takeUntil(this.destroyed))
113
+ .subscribe(() => {
114
+ this.setResized();
115
+ });
116
+ }
117
+ _listenForHoverActivity() {
118
+ this.eventDispatcher.headerRowHoveredOrActiveDistinct
119
+ .pipe(startWith(null), pairwise(), takeUntil(this.destroyed))
120
+ .subscribe(([previousRow, hoveredRow]) => {
121
+ if (hoveredRow) {
122
+ hoveredRow.classList.add(HOVER_OR_ACTIVE_CLASS);
123
+ }
124
+ if (previousRow) {
125
+ previousRow.classList.remove(HOVER_OR_ACTIVE_CLASS);
126
+ }
127
+ });
128
+ }
129
+ }
130
+ /** @nocollapse */ /** @nocollapse */ ColumnResize.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: ColumnResize, deps: [], target: i0.ɵɵFactoryTarget.Directive });
131
+ /** @nocollapse */ /** @nocollapse */ ColumnResize.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.0", type: ColumnResize, ngImport: i0 });
132
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: ColumnResize, decorators: [{
133
+ type: Directive
134
+ }] });
135
+
136
+ /**
137
+ * @license
138
+ * Copyright Google LLC All Rights Reserved.
139
+ *
140
+ * Use of this source code is governed by an MIT-style license that can be
141
+ * found in the LICENSE file at https://angular.io/license
142
+ */
143
+ /**
144
+ * Originating source of column resize events within a table.
145
+ * @docs-private
146
+ */
147
+ class ColumnResizeNotifierSource {
148
+ constructor() {
149
+ /** Emits when an in-progress resize is canceled. */
150
+ this.resizeCanceled = new Subject();
151
+ /** Emits when a resize is applied. */
152
+ this.resizeCompleted = new Subject();
153
+ /** Triggers a resize action. */
154
+ this.triggerResize = new Subject();
155
+ }
156
+ }
157
+ /** @nocollapse */ /** @nocollapse */ ColumnResizeNotifierSource.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: ColumnResizeNotifierSource, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
158
+ /** @nocollapse */ /** @nocollapse */ ColumnResizeNotifierSource.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: ColumnResizeNotifierSource });
159
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: ColumnResizeNotifierSource, decorators: [{
160
+ type: Injectable
161
+ }] });
162
+ /** Service for triggering column resizes imperatively or being notified of them. */
163
+ class ColumnResizeNotifier {
164
+ constructor(_source) {
165
+ this._source = _source;
166
+ /** Emits whenever a column is resized. */
167
+ this.resizeCompleted = this._source.resizeCompleted;
168
+ }
169
+ /** Instantly resizes the specified column. */
170
+ resize(columnId, size) {
171
+ this._source.triggerResize.next({ columnId, size, completeImmediately: true, isStickyColumn: true });
172
+ }
173
+ }
174
+ /** @nocollapse */ /** @nocollapse */ ColumnResizeNotifier.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: ColumnResizeNotifier, deps: [{ token: ColumnResizeNotifierSource }], target: i0.ɵɵFactoryTarget.Injectable });
175
+ /** @nocollapse */ /** @nocollapse */ ColumnResizeNotifier.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: ColumnResizeNotifier });
176
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: ColumnResizeNotifier, decorators: [{
177
+ type: Injectable
178
+ }], ctorParameters: function () { return [{ type: ColumnResizeNotifierSource }]; } });
179
+
180
+ /**
181
+ * @license
182
+ * Copyright Google LLC All Rights Reserved.
183
+ *
184
+ * Use of this source code is governed by an MIT-style license that can be
185
+ * found in the LICENSE file at https://angular.io/license
186
+ */
187
+ /** Coordinates events between the column resize directives. */
188
+ class HeaderRowEventDispatcher {
189
+ constructor(_ngZone) {
190
+ this._ngZone = _ngZone;
191
+ /**
192
+ * Emits the currently hovered header cell or null when no header cells are hovered.
193
+ * Exposed publicly for events to feed in, but subscribers should use headerCellHoveredDistinct,
194
+ * defined below.
195
+ */
196
+ this.headerCellHovered = new Subject();
197
+ /**
198
+ * Emits the header cell for which a user-triggered resize is active or null
199
+ * when no resize is in progress.
200
+ */
201
+ this.overlayHandleActiveForCell = new Subject();
202
+ /** Distinct and shared version of headerCellHovered. */
203
+ this.headerCellHoveredDistinct = this.headerCellHovered.pipe(distinctUntilChanged(), share());
204
+ /**
205
+ * Emits the header that is currently hovered or hosting an active resize event (with active
206
+ * taking precedence).
207
+ */
208
+ this.headerRowHoveredOrActiveDistinct = combineLatest(this.headerCellHoveredDistinct.pipe(map(cell => closest(cell, HEADER_ROW_SELECTOR)), startWith(null), distinctUntilChanged()), this.overlayHandleActiveForCell.pipe(map(cell => closest(cell, HEADER_ROW_SELECTOR)), startWith(null), distinctUntilChanged())).pipe(skip(1), // Ignore initial [null, null] emission.
209
+ map(([hovered, active]) => active || hovered), distinctUntilChanged(), share());
210
+ this._headerRowHoveredOrActiveDistinctReenterZone = this.headerRowHoveredOrActiveDistinct.pipe(this._enterZone(), share());
211
+ // Optimization: Share row events observable with subsequent callers.
212
+ // At startup, calls will be sequential by row (and typically there's only one).
213
+ this._lastSeenRow = null;
214
+ this._lastSeenRowHover = null;
215
+ }
216
+ /**
217
+ * Emits whether the specified row should show its overlay controls.
218
+ * Emission occurs within the NgZone.
219
+ */
220
+ resizeOverlayVisibleForHeaderRow(row) {
221
+ if (row !== this._lastSeenRow) {
222
+ this._lastSeenRow = row;
223
+ this._lastSeenRowHover = this._headerRowHoveredOrActiveDistinctReenterZone.pipe(map(hoveredRow => hoveredRow === row), distinctUntilChanged(), share());
224
+ }
225
+ return this._lastSeenRowHover;
226
+ }
227
+ _enterZone() {
228
+ return (source) => new Observable(observer => source.subscribe({
229
+ next: value => this._ngZone.run(() => observer.next(value)),
230
+ error: err => observer.error(err),
231
+ complete: () => observer.complete(),
232
+ }));
233
+ }
234
+ }
235
+ /** @nocollapse */ /** @nocollapse */ HeaderRowEventDispatcher.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: HeaderRowEventDispatcher, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
236
+ /** @nocollapse */ /** @nocollapse */ HeaderRowEventDispatcher.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: HeaderRowEventDispatcher });
237
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: HeaderRowEventDispatcher, decorators: [{
238
+ type: Injectable
239
+ }], ctorParameters: function () { return [{ type: i0.NgZone }]; } });
240
+
241
+ /**
242
+ * @license
243
+ * Copyright Google LLC All Rights Reserved.
244
+ *
245
+ * Use of this source code is governed by an MIT-style license that can be
246
+ * found in the LICENSE file at https://angular.io/license
247
+ */
248
+ /**
249
+ * Provides an implementation for resizing a column.
250
+ * The details of how resizing works for tables for flex mat-tables are quite different.
251
+ */
252
+ class ResizeStrategy {
253
+ constructor() {
254
+ this._pendingResizeDelta = null;
255
+ }
256
+ /** Adjusts the width of the table element by the specified delta. */
257
+ updateTableWidthAndStickyColumns(delta) {
258
+ if (this._pendingResizeDelta === null) {
259
+ const tableElement = this.columnResize.elementRef.nativeElement;
260
+ const tableWidth = getElementWidth(tableElement);
261
+ this.styleScheduler.schedule(() => {
262
+ tableElement.style.width = coerceCssPixelValue(tableWidth + this._pendingResizeDelta);
263
+ this._pendingResizeDelta = null;
264
+ });
265
+ this.styleScheduler.scheduleEnd(() => {
266
+ this.table.updateStickyColumnStyles();
267
+ });
268
+ }
269
+ this._pendingResizeDelta = (this._pendingResizeDelta ?? 0) + delta;
270
+ }
271
+ }
272
+ /** @nocollapse */ /** @nocollapse */ ResizeStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: ResizeStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
273
+ /** @nocollapse */ /** @nocollapse */ ResizeStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: ResizeStrategy });
274
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: ResizeStrategy, decorators: [{
275
+ type: Injectable
276
+ }] });
277
+ /**
278
+ * The optimially performing resize strategy for <table> elements with table-layout: fixed.
279
+ * Tested against and outperformed:
280
+ * CSS selector
281
+ * CSS selector w/ CSS variable
282
+ * Updating all cell nodes
283
+ */
284
+ class TableLayoutFixedResizeStrategy extends ResizeStrategy {
285
+ constructor(columnResize, styleScheduler, table) {
286
+ super();
287
+ this.columnResize = columnResize;
288
+ this.styleScheduler = styleScheduler;
289
+ this.table = table;
290
+ }
291
+ applyColumnSize(_, columnHeader, sizeInPx, previousSizeInPx) {
292
+ const delta = sizeInPx - (previousSizeInPx ?? getElementWidth(columnHeader));
293
+ if (delta === 0) {
294
+ return;
295
+ }
296
+ this.styleScheduler.schedule(() => {
297
+ columnHeader.style.width = coerceCssPixelValue(sizeInPx);
298
+ });
299
+ this.updateTableWidthAndStickyColumns(delta);
300
+ }
301
+ applyMinColumnSize(_, columnHeader, sizeInPx) {
302
+ const currentWidth = getElementWidth(columnHeader);
303
+ const newWidth = Math.max(currentWidth, sizeInPx);
304
+ this.applyColumnSize(_, columnHeader, newWidth, currentWidth);
305
+ }
306
+ applyMaxColumnSize(_, columnHeader, sizeInPx) {
307
+ const currentWidth = getElementWidth(columnHeader);
308
+ const newWidth = Math.min(currentWidth, sizeInPx);
309
+ this.applyColumnSize(_, columnHeader, newWidth, currentWidth);
310
+ }
311
+ }
312
+ /** @nocollapse */ /** @nocollapse */ TableLayoutFixedResizeStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: TableLayoutFixedResizeStrategy, deps: [{ token: ColumnResize }, { token: _COALESCED_STYLE_SCHEDULER }, { token: i2.CdkTable }], target: i0.ɵɵFactoryTarget.Injectable });
313
+ /** @nocollapse */ /** @nocollapse */ TableLayoutFixedResizeStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: TableLayoutFixedResizeStrategy });
314
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: TableLayoutFixedResizeStrategy, decorators: [{
315
+ type: Injectable
316
+ }], ctorParameters: function () { return [{ type: ColumnResize }, { type: i2._CoalescedStyleScheduler, decorators: [{
317
+ type: Inject,
318
+ args: [_COALESCED_STYLE_SCHEDULER]
319
+ }] }, { type: i2.CdkTable }]; } });
320
+ /**
321
+ * The optimally performing resize strategy for flex mat-tables.
322
+ * Tested against and outperformed:
323
+ * CSS selector w/ CSS variable
324
+ * Updating all mat-cell nodes
325
+ */
326
+ class CdkFlexTableResizeStrategy extends ResizeStrategy {
327
+ constructor(columnResize, styleScheduler, table, document) {
328
+ super();
329
+ this.columnResize = columnResize;
330
+ this.styleScheduler = styleScheduler;
331
+ this.table = table;
332
+ this._columnIndexes = new Map();
333
+ this._columnProperties = new Map();
334
+ this._indexSequence = 0;
335
+ this.defaultMinSize = 0;
336
+ this.defaultMaxSize = Number.MAX_SAFE_INTEGER;
337
+ this._document = document;
338
+ }
339
+ applyColumnSize(cssFriendlyColumnName, columnHeader, sizeInPx, previousSizeInPx) {
340
+ // Optimization: Check applied width first as we probably set it already before reading
341
+ // offsetWidth which triggers layout.
342
+ const delta = sizeInPx -
343
+ (previousSizeInPx ??
344
+ (this._getAppliedWidth(cssFriendlyColumnName) || columnHeader.offsetWidth));
345
+ if (delta === 0) {
346
+ return;
347
+ }
348
+ const cssSize = coerceCssPixelValue(sizeInPx);
349
+ this._applyProperty(cssFriendlyColumnName, 'flex', `0 0.01 ${cssSize}`);
350
+ this.updateTableWidthAndStickyColumns(delta);
351
+ }
352
+ applyMinColumnSize(cssFriendlyColumnName, _, sizeInPx) {
353
+ const cssSize = coerceCssPixelValue(sizeInPx);
354
+ this._applyProperty(cssFriendlyColumnName, 'min-width', cssSize, sizeInPx !== this.defaultMinSize);
355
+ this.updateTableWidthAndStickyColumns(0);
356
+ }
357
+ applyMaxColumnSize(cssFriendlyColumnName, _, sizeInPx) {
358
+ const cssSize = coerceCssPixelValue(sizeInPx);
359
+ this._applyProperty(cssFriendlyColumnName, 'max-width', cssSize, sizeInPx !== this.defaultMaxSize);
360
+ this.updateTableWidthAndStickyColumns(0);
361
+ }
362
+ getColumnCssClass(cssFriendlyColumnName) {
363
+ return `cdk-column-${cssFriendlyColumnName}`;
364
+ }
365
+ ngOnDestroy() {
366
+ // TODO: Use remove() once we're off IE11.
367
+ if (this._styleElement && this._styleElement.parentNode) {
368
+ this._styleElement.parentNode.removeChild(this._styleElement);
369
+ this._styleElement = undefined;
370
+ }
371
+ }
372
+ _getPropertyValue(cssFriendlyColumnName, key) {
373
+ const properties = this._getColumnPropertiesMap(cssFriendlyColumnName);
374
+ return properties.get(key);
375
+ }
376
+ _getAppliedWidth(cssFriendslyColumnName) {
377
+ return coercePixelsFromFlexValue(this._getPropertyValue(cssFriendslyColumnName, 'flex'));
378
+ }
379
+ _applyProperty(cssFriendlyColumnName, key, value, enable = true) {
380
+ const properties = this._getColumnPropertiesMap(cssFriendlyColumnName);
381
+ this.styleScheduler.schedule(() => {
382
+ if (enable) {
383
+ properties.set(key, value);
384
+ }
385
+ else {
386
+ properties.delete(key);
387
+ }
388
+ this._applySizeCss(cssFriendlyColumnName);
389
+ });
390
+ }
391
+ _getStyleSheet() {
392
+ if (!this._styleElement) {
393
+ this._styleElement = this._document.createElement('style');
394
+ this._styleElement.appendChild(this._document.createTextNode(''));
395
+ this._document.head.appendChild(this._styleElement);
396
+ }
397
+ return this._styleElement.sheet;
398
+ }
399
+ _getColumnPropertiesMap(cssFriendlyColumnName) {
400
+ let properties = this._columnProperties.get(cssFriendlyColumnName);
401
+ if (properties === undefined) {
402
+ properties = new Map();
403
+ this._columnProperties.set(cssFriendlyColumnName, properties);
404
+ }
405
+ return properties;
406
+ }
407
+ _applySizeCss(cssFriendlyColumnName) {
408
+ const properties = this._getColumnPropertiesMap(cssFriendlyColumnName);
409
+ const propertyKeys = Array.from(properties.keys());
410
+ let index = this._columnIndexes.get(cssFriendlyColumnName);
411
+ if (index === undefined) {
412
+ if (!propertyKeys.length) {
413
+ // Nothing to set or unset.
414
+ return;
415
+ }
416
+ index = this._indexSequence++;
417
+ this._columnIndexes.set(cssFriendlyColumnName, index);
418
+ }
419
+ else {
420
+ this._getStyleSheet().deleteRule(index);
421
+ }
422
+ const columnClassName = this.getColumnCssClass(cssFriendlyColumnName);
423
+ const tableClassName = this.columnResize.getUniqueCssClass();
424
+ const selector = `.${tableClassName} .${columnClassName}`;
425
+ const body = propertyKeys.map(key => `${key}:${properties.get(key)}`).join(';');
426
+ this._getStyleSheet().insertRule(`${selector} {${body}}`, index);
427
+ }
428
+ }
429
+ /** @nocollapse */ /** @nocollapse */ CdkFlexTableResizeStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: CdkFlexTableResizeStrategy, deps: [{ token: ColumnResize }, { token: _COALESCED_STYLE_SCHEDULER }, { token: i2.CdkTable }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
430
+ /** @nocollapse */ /** @nocollapse */ CdkFlexTableResizeStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: CdkFlexTableResizeStrategy });
431
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: CdkFlexTableResizeStrategy, decorators: [{
432
+ type: Injectable
433
+ }], ctorParameters: function () { return [{ type: ColumnResize }, { type: i2._CoalescedStyleScheduler, decorators: [{
434
+ type: Inject,
435
+ args: [_COALESCED_STYLE_SCHEDULER]
436
+ }] }, { type: i2.CdkTable }, { type: undefined, decorators: [{
437
+ type: Inject,
438
+ args: [DOCUMENT]
439
+ }] }]; } });
440
+ /** Converts CSS pixel values to numbers, eg "123px" to 123. Returns NaN for non pixel values. */
441
+ function coercePixelsFromCssValue(cssValue) {
442
+ return Number(cssValue.match(/(\d+)px/)?.[1]);
443
+ }
444
+ /** Gets the style.width pixels on the specified element if present, otherwise its offsetWidth. */
445
+ function getElementWidth(element) {
446
+ // Optimization: Check style.width first as we probably set it already before reading
447
+ // offsetWidth which triggers layout.
448
+ return coercePixelsFromCssValue(element.style.width) || element.offsetWidth;
449
+ }
450
+ /**
451
+ * Converts CSS flex values as set in CdkFlexTableResizeStrategy to numbers,
452
+ * eg "0 0.01 123px" to 123.
453
+ */
454
+ function coercePixelsFromFlexValue(flexValue) {
455
+ return Number(flexValue?.match(/0 0\.01 (\d+)px/)?.[1]);
456
+ }
457
+ const TABLE_LAYOUT_FIXED_RESIZE_STRATEGY_PROVIDER = {
458
+ provide: ResizeStrategy,
459
+ useClass: TableLayoutFixedResizeStrategy,
460
+ };
461
+ const FLEX_RESIZE_STRATEGY_PROVIDER = {
462
+ provide: ResizeStrategy,
463
+ useClass: CdkFlexTableResizeStrategy,
464
+ };
465
+
466
+ /**
467
+ * @license
468
+ * Copyright Google LLC All Rights Reserved.
469
+ *
470
+ * Use of this source code is governed by an MIT-style license that can be
471
+ * found in the LICENSE file at https://angular.io/license
472
+ */
473
+ const PROVIDERS = [
474
+ ColumnResizeNotifier,
475
+ HeaderRowEventDispatcher,
476
+ ColumnResizeNotifierSource,
477
+ ];
478
+ const TABLE_PROVIDERS = [
479
+ ...PROVIDERS,
480
+ TABLE_LAYOUT_FIXED_RESIZE_STRATEGY_PROVIDER,
481
+ ];
482
+ const FLEX_PROVIDERS = [...PROVIDERS, FLEX_RESIZE_STRATEGY_PROVIDER];
483
+
484
+ /**
485
+ * @license
486
+ * Copyright Google LLC All Rights Reserved.
487
+ *
488
+ * Use of this source code is governed by an MIT-style license that can be
489
+ * found in the LICENSE file at https://angular.io/license
490
+ */
491
+ /**
492
+ * Explicitly enables column resizing for a table-based cdk-table.
493
+ * Individual columns must be annotated specifically.
494
+ */
495
+ class CdkColumnResize extends ColumnResize {
496
+ constructor(columnResizeNotifier, elementRef, eventDispatcher, ngZone, notifier, table) {
497
+ super();
498
+ this.columnResizeNotifier = columnResizeNotifier;
499
+ this.elementRef = elementRef;
500
+ this.eventDispatcher = eventDispatcher;
501
+ this.ngZone = ngZone;
502
+ this.notifier = notifier;
503
+ this.table = table;
504
+ }
505
+ }
506
+ /** @nocollapse */ /** @nocollapse */ CdkColumnResize.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: CdkColumnResize, deps: [{ token: ColumnResizeNotifier }, { token: i0.ElementRef }, { token: HeaderRowEventDispatcher }, { token: i0.NgZone }, { token: ColumnResizeNotifierSource }, { token: i2.CdkTable }], target: i0.ɵɵFactoryTarget.Directive });
507
+ /** @nocollapse */ /** @nocollapse */ CdkColumnResize.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.0", type: CdkColumnResize, selector: "table[cdk-table][columnResize]", providers: [
508
+ ...TABLE_PROVIDERS,
509
+ { provide: ColumnResize, useExisting: CdkColumnResize },
510
+ ], usesInheritance: true, ngImport: i0 });
511
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: CdkColumnResize, decorators: [{
512
+ type: Directive,
513
+ args: [{
514
+ selector: 'table[cdk-table][columnResize]',
515
+ providers: [
516
+ ...TABLE_PROVIDERS,
517
+ { provide: ColumnResize, useExisting: CdkColumnResize },
518
+ ],
519
+ }]
520
+ }], ctorParameters: function () { return [{ type: ColumnResizeNotifier }, { type: i0.ElementRef }, { type: HeaderRowEventDispatcher }, { type: i0.NgZone }, { type: ColumnResizeNotifierSource }, { type: i2.CdkTable }]; } });
521
+
522
+ /**
523
+ * @license
524
+ * Copyright Google LLC All Rights Reserved.
525
+ *
526
+ * Use of this source code is governed by an MIT-style license that can be
527
+ * found in the LICENSE file at https://angular.io/license
528
+ */
529
+ /**
530
+ * Explicitly enables column resizing for a flexbox-based cdk-table.
531
+ * Individual columns must be annotated specifically.
532
+ */
533
+ class CdkColumnResizeFlex extends ColumnResize {
534
+ constructor(columnResizeNotifier, elementRef, eventDispatcher, ngZone, notifier, table) {
535
+ super();
536
+ this.columnResizeNotifier = columnResizeNotifier;
537
+ this.elementRef = elementRef;
538
+ this.eventDispatcher = eventDispatcher;
539
+ this.ngZone = ngZone;
540
+ this.notifier = notifier;
541
+ this.table = table;
542
+ }
543
+ }
544
+ /** @nocollapse */ /** @nocollapse */ CdkColumnResizeFlex.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: CdkColumnResizeFlex, deps: [{ token: ColumnResizeNotifier }, { token: i0.ElementRef }, { token: HeaderRowEventDispatcher }, { token: i0.NgZone }, { token: ColumnResizeNotifierSource }, { token: i2.CdkTable }], target: i0.ɵɵFactoryTarget.Directive });
545
+ /** @nocollapse */ /** @nocollapse */ CdkColumnResizeFlex.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.0", type: CdkColumnResizeFlex, selector: "cdk-table[columnResize]", providers: [
546
+ ...FLEX_PROVIDERS,
547
+ { provide: ColumnResize, useExisting: CdkColumnResizeFlex },
548
+ ], usesInheritance: true, ngImport: i0 });
549
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: CdkColumnResizeFlex, decorators: [{
550
+ type: Directive,
551
+ args: [{
552
+ selector: 'cdk-table[columnResize]',
553
+ providers: [
554
+ ...FLEX_PROVIDERS,
555
+ { provide: ColumnResize, useExisting: CdkColumnResizeFlex },
556
+ ],
557
+ }]
558
+ }], ctorParameters: function () { return [{ type: ColumnResizeNotifier }, { type: i0.ElementRef }, { type: HeaderRowEventDispatcher }, { type: i0.NgZone }, { type: ColumnResizeNotifierSource }, { type: i2.CdkTable }]; } });
559
+
560
+ /**
561
+ * @license
562
+ * Copyright Google LLC All Rights Reserved.
563
+ *
564
+ * Use of this source code is governed by an MIT-style license that can be
565
+ * found in the LICENSE file at https://angular.io/license
566
+ */
567
+ /**
568
+ * One of two NgModules for use with CdkColumnResize.
569
+ * When using this module, columns are not resizable by default.
570
+ */
571
+ class CdkColumnResizeModule {
572
+ }
573
+ /** @nocollapse */ /** @nocollapse */ CdkColumnResizeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: CdkColumnResizeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
574
+ /** @nocollapse */ /** @nocollapse */ CdkColumnResizeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: CdkColumnResizeModule, declarations: [CdkColumnResize, CdkColumnResizeFlex], exports: [CdkColumnResize, CdkColumnResizeFlex] });
575
+ /** @nocollapse */ /** @nocollapse */ CdkColumnResizeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: CdkColumnResizeModule });
576
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: CdkColumnResizeModule, decorators: [{
577
+ type: NgModule,
578
+ args: [{
579
+ declarations: [CdkColumnResize, CdkColumnResizeFlex],
580
+ exports: [CdkColumnResize, CdkColumnResizeFlex],
581
+ }]
582
+ }] });
583
+
584
+ /**
585
+ * @license
586
+ * Copyright Google LLC All Rights Reserved.
587
+ *
588
+ * Use of this source code is governed by an MIT-style license that can be
589
+ * found in the LICENSE file at https://angular.io/license
590
+ */
591
+ /**
592
+ * Can be provided by the host application to enable persistence of column resize state.
593
+ */
594
+ class ColumnSizeStore {
595
+ }
596
+ /** @nocollapse */ /** @nocollapse */ ColumnSizeStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: ColumnSizeStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
597
+ /** @nocollapse */ /** @nocollapse */ ColumnSizeStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: ColumnSizeStore });
598
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: ColumnSizeStore, decorators: [{
599
+ type: Injectable
600
+ }] });
601
+
602
+ /**
603
+ * @license
604
+ * Copyright Google LLC All Rights Reserved.
605
+ *
606
+ * Use of this source code is governed by an MIT-style license that can be
607
+ * found in the LICENSE file at https://angular.io/license
608
+ */
609
+ /** Tracks state of resize events in progress. */
610
+ class ResizeRef {
611
+ constructor(origin, overlayRef, minWidthPx, maxWidthPx) {
612
+ this.origin = origin;
613
+ this.overlayRef = overlayRef;
614
+ this.minWidthPx = minWidthPx;
615
+ this.maxWidthPx = maxWidthPx;
616
+ }
617
+ }
618
+
619
+ const OVERLAY_ACTIVE_CLASS = 'cdk-resizable-overlay-thumb-active';
620
+ /**
621
+ * Base class for Resizable directives which are applied to column headers to make those columns
622
+ * resizable.
623
+ */
624
+ class Resizable {
625
+ constructor() {
626
+ this.isResizable = true;
627
+ this.minWidthPxInternal = 0;
628
+ this.maxWidthPxInternal = Number.MAX_SAFE_INTEGER;
629
+ this.destroyed = new Subject();
630
+ this._viewInitialized = false;
631
+ }
632
+ /** The minimum width to allow the column to be sized to. */
633
+ get minWidthPx() {
634
+ return this.minWidthPxInternal;
635
+ }
636
+ set minWidthPx(value) {
637
+ if (value) {
638
+ this.minWidthPxInternal = value;
639
+ }
640
+ this.columnResize.setResized();
641
+ if (this.elementRef.nativeElement && this._viewInitialized) {
642
+ this._applyMinWidthPx();
643
+ }
644
+ }
645
+ /** The maximum width to allow the column to be sized to. */
646
+ get maxWidthPx() {
647
+ return this.maxWidthPxInternal;
648
+ }
649
+ set maxWidthPx(value) {
650
+ if (value) {
651
+ this.maxWidthPxInternal = value;
652
+ }
653
+ this.columnResize.setResized();
654
+ if (this.elementRef.nativeElement && this._viewInitialized) {
655
+ this._applyMaxWidthPx();
656
+ }
657
+ }
658
+ ngAfterViewInit() {
659
+ if (this.isResizable) {
660
+ this._listenForRowHoverEvents();
661
+ this._listenForResizeEvents();
662
+ this._appendInlineHandle();
663
+ this.styleScheduler.scheduleEnd(() => {
664
+ this._viewInitialized = true;
665
+ this._applyMinWidthPx();
666
+ this._applyMaxWidthPx();
667
+ });
668
+ }
669
+ }
670
+ ngOnDestroy() {
671
+ this.destroyed.next();
672
+ this.destroyed.complete();
673
+ if (this.inlineHandle) {
674
+ this.elementRef.nativeElement.removeChild(this.inlineHandle);
675
+ }
676
+ if (this.overlayRef) {
677
+ this.overlayRef.dispose();
678
+ }
679
+ }
680
+ _createOverlayForHandle() {
681
+ // Use of overlays allows us to properly capture click events spanning parts
682
+ // of two table cells and is also useful for displaying a resize thumb
683
+ // over both cells and extending it down the table as needed.
684
+ const isRtl = this.directionality.value === 'rtl';
685
+ const positionStrategy = this.overlay
686
+ .position()
687
+ .flexibleConnectedTo(this.elementRef.nativeElement)
688
+ .withFlexibleDimensions(false)
689
+ .withGrowAfterOpen(false)
690
+ .withPush(false)
691
+ .withDefaultOffsetX(isRtl ? 1 : 0)
692
+ .withPositions([
693
+ {
694
+ originX: isRtl ? 'start' : 'end',
695
+ originY: 'top',
696
+ overlayX: 'center',
697
+ overlayY: 'top',
698
+ },
699
+ ]);
700
+ return this.overlay.create({
701
+ // Always position the overlay based on left-indexed coordinates.
702
+ direction: 'ltr',
703
+ disposeOnNavigation: true,
704
+ positionStrategy,
705
+ scrollStrategy: this.overlay.scrollStrategies.reposition(),
706
+ width: '16px',
707
+ });
708
+ }
709
+ _listenForRowHoverEvents() {
710
+ const element = this.elementRef.nativeElement;
711
+ const takeUntilDestroyed = takeUntil(this.destroyed);
712
+ this.eventDispatcher
713
+ .resizeOverlayVisibleForHeaderRow(closest(element, HEADER_ROW_SELECTOR))
714
+ .pipe(takeUntilDestroyed)
715
+ .subscribe(hoveringRow => {
716
+ if (hoveringRow) {
717
+ if (!this.overlayRef) {
718
+ this.overlayRef = this._createOverlayForHandle();
719
+ }
720
+ this._showHandleOverlay();
721
+ }
722
+ else if (this.overlayRef) {
723
+ // todo - can't detach during an active resize - need to work that out
724
+ this.overlayRef.detach();
725
+ }
726
+ });
727
+ }
728
+ _listenForResizeEvents() {
729
+ const takeUntilDestroyed = takeUntil(this.destroyed);
730
+ merge(this.resizeNotifier.resizeCanceled, this.resizeNotifier.triggerResize)
731
+ .pipe(takeUntilDestroyed, filter(columnSize => columnSize.columnId === this.columnDef.name))
732
+ .subscribe(({ size, previousSize, completeImmediately }) => {
733
+ this.elementRef.nativeElement.classList.add(OVERLAY_ACTIVE_CLASS);
734
+ this._applySize(size, previousSize);
735
+ if (completeImmediately) {
736
+ this._completeResizeOperation();
737
+ }
738
+ });
739
+ merge(this.resizeNotifier.resizeCanceled, this.resizeNotifier.resizeCompleted)
740
+ .pipe(takeUntilDestroyed)
741
+ .subscribe(columnSize => {
742
+ this._cleanUpAfterResize(columnSize);
743
+ });
744
+ }
745
+ _completeResizeOperation() {
746
+ this.ngZone.run(() => {
747
+ this.resizeNotifier.resizeCompleted.next({
748
+ columnId: this.columnDef.name,
749
+ size: this.elementRef.nativeElement.offsetWidth,
750
+ });
751
+ });
752
+ }
753
+ _cleanUpAfterResize(columnSize) {
754
+ this.elementRef.nativeElement.classList.remove(OVERLAY_ACTIVE_CLASS);
755
+ if (this.overlayRef && this.overlayRef.hasAttached()) {
756
+ this._updateOverlayHandleHeight();
757
+ this.overlayRef.updatePosition();
758
+ if (columnSize.columnId === this.columnDef.name) {
759
+ this.inlineHandle.focus();
760
+ }
761
+ }
762
+ }
763
+ _createHandlePortal() {
764
+ const injector = Injector.create({
765
+ parent: this.injector,
766
+ providers: [
767
+ {
768
+ provide: ResizeRef,
769
+ useValue: new ResizeRef(this.elementRef, this.overlayRef, this.minWidthPx, this.maxWidthPx),
770
+ },
771
+ ],
772
+ });
773
+ return new ComponentPortal(this.getOverlayHandleComponentType(), this.viewContainerRef, injector);
774
+ }
775
+ _showHandleOverlay() {
776
+ this._updateOverlayHandleHeight();
777
+ this.overlayRef.attach(this._createHandlePortal());
778
+ // Needed to ensure that all of the lifecycle hooks inside the overlay run immediately.
779
+ this.changeDetectorRef.markForCheck();
780
+ }
781
+ _updateOverlayHandleHeight() {
782
+ this.overlayRef.updateSize({ height: this.elementRef.nativeElement.offsetHeight });
783
+ }
784
+ _applySize(sizeInPixels, previousSize) {
785
+ const sizeToApply = Math.min(Math.max(sizeInPixels, this.minWidthPx, 0), this.maxWidthPx);
786
+ this.resizeStrategy.applyColumnSize(this.columnDef.cssClassFriendlyName, this.elementRef.nativeElement, sizeToApply, previousSize);
787
+ }
788
+ _applyMinWidthPx() {
789
+ this.resizeStrategy.applyMinColumnSize(this.columnDef.cssClassFriendlyName, this.elementRef.nativeElement, this.minWidthPx);
790
+ }
791
+ _applyMaxWidthPx() {
792
+ this.resizeStrategy.applyMaxColumnSize(this.columnDef.cssClassFriendlyName, this.elementRef.nativeElement, this.maxWidthPx);
793
+ }
794
+ _appendInlineHandle() {
795
+ this.styleScheduler.schedule(() => {
796
+ this.inlineHandle = this.document.createElement('div');
797
+ this.inlineHandle.tabIndex = 0;
798
+ this.inlineHandle.className = this.getInlineHandleCssClassName();
799
+ // TODO: Apply correct aria role (probably slider) after a11y spec questions resolved.
800
+ this.elementRef.nativeElement.appendChild(this.inlineHandle);
801
+ });
802
+ }
803
+ }
804
+ /** @nocollapse */ /** @nocollapse */ Resizable.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: Resizable, deps: [], target: i0.ɵɵFactoryTarget.Directive });
805
+ /** @nocollapse */ /** @nocollapse */ Resizable.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.0", type: Resizable, ngImport: i0 });
806
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: Resizable, decorators: [{
807
+ type: Directive
808
+ }] });
809
+
810
+ /**
811
+ * @license
812
+ * Copyright Google LLC All Rights Reserved.
813
+ *
814
+ * Use of this source code is governed by an MIT-style license that can be
815
+ * found in the LICENSE file at https://angular.io/license
816
+ */
817
+ // TODO: Take another look at using cdk drag drop. IIRC I ran into a couple
818
+ // good reasons for not using it but I don't remember what they were at this point.
819
+ /**
820
+ * Base class for a component shown over the edge of a resizable column that is responsible
821
+ * for handling column resize mouse events and displaying any visible UI on the column edge.
822
+ */
823
+ class ResizeOverlayHandle {
824
+ constructor() {
825
+ this.destroyed = new Subject();
826
+ }
827
+ ngAfterViewInit() {
828
+ this._listenForMouseEvents();
829
+ }
830
+ ngOnDestroy() {
831
+ this.destroyed.next();
832
+ this.destroyed.complete();
833
+ }
834
+ _listenForMouseEvents() {
835
+ this.ngZone.runOutsideAngular(() => {
836
+ fromEvent(this.elementRef.nativeElement, 'mouseenter')
837
+ .pipe(mapTo(this.resizeRef.origin.nativeElement), takeUntil(this.destroyed))
838
+ .subscribe(cell => this.eventDispatcher.headerCellHovered.next(cell));
839
+ fromEvent(this.elementRef.nativeElement, 'mouseleave')
840
+ .pipe(map(event => event.relatedTarget && closest(event.relatedTarget, HEADER_CELL_SELECTOR)), takeUntil(this.destroyed))
841
+ .subscribe(cell => this.eventDispatcher.headerCellHovered.next(cell));
842
+ fromEvent(this.elementRef.nativeElement, 'mousedown')
843
+ .pipe(takeUntil(this.destroyed))
844
+ .subscribe(mousedownEvent => {
845
+ this._dragStarted(mousedownEvent);
846
+ });
847
+ });
848
+ }
849
+ _dragStarted(mousedownEvent) {
850
+ // Only allow dragging using the left mouse button.
851
+ if (mousedownEvent.button !== 0) {
852
+ return;
853
+ }
854
+ const mouseup = fromEvent(this.document, 'mouseup');
855
+ const mousemove = fromEvent(this.document, 'mousemove');
856
+ const escape = fromEvent(this.document, 'keyup').pipe(filter(event => event.keyCode === ESCAPE));
857
+ const startX = mousedownEvent.screenX;
858
+ const initialSize = this._getOriginWidth();
859
+ let overlayOffset = 0;
860
+ let originOffset = this._getOriginOffset();
861
+ let size = initialSize;
862
+ let overshot = 0;
863
+ this.updateResizeActive(true);
864
+ mouseup.pipe(takeUntil(merge(escape, this.destroyed))).subscribe(({ screenX }) => {
865
+ this.styleScheduler.scheduleEnd(() => {
866
+ this._notifyResizeEnded(size, screenX !== startX);
867
+ });
868
+ });
869
+ escape.pipe(takeUntil(merge(mouseup, this.destroyed))).subscribe(() => {
870
+ this._notifyResizeEnded(initialSize);
871
+ });
872
+ mousemove
873
+ .pipe(map(({ screenX }) => screenX), startWith(startX), distinctUntilChanged(), pairwise(), takeUntil(merge(mouseup, escape, this.destroyed)))
874
+ .subscribe(([prevX, currX]) => {
875
+ let deltaX = currX - prevX;
876
+ // If the mouse moved further than the resize was able to match, limit the
877
+ // movement of the overlay to match the actual size and position of the origin.
878
+ if (overshot !== 0) {
879
+ if ((overshot < 0 && deltaX < 0) || (overshot > 0 && deltaX > 0)) {
880
+ overshot += deltaX;
881
+ return;
882
+ }
883
+ else {
884
+ const remainingOvershot = overshot + deltaX;
885
+ overshot =
886
+ overshot > 0 ? Math.max(remainingOvershot, 0) : Math.min(remainingOvershot, 0);
887
+ deltaX = remainingOvershot - overshot;
888
+ if (deltaX === 0) {
889
+ return;
890
+ }
891
+ }
892
+ }
893
+ let computedNewSize = size + (this._isLtr() ? deltaX : -deltaX);
894
+ computedNewSize = Math.min(Math.max(computedNewSize, this.resizeRef.minWidthPx, 0), this.resizeRef.maxWidthPx);
895
+ this.resizeNotifier.triggerResize.next({
896
+ columnId: this.columnDef.name,
897
+ size: computedNewSize,
898
+ previousSize: size,
899
+ isStickyColumn: this.columnDef.sticky || this.columnDef.stickyEnd,
900
+ });
901
+ this.styleScheduler.scheduleEnd(() => {
902
+ const originNewSize = this._getOriginWidth();
903
+ const originNewOffset = this._getOriginOffset();
904
+ const originOffsetDeltaX = originNewOffset - originOffset;
905
+ const originSizeDeltaX = originNewSize - size;
906
+ size = originNewSize;
907
+ originOffset = originNewOffset;
908
+ overshot += deltaX + (this._isLtr() ? -originSizeDeltaX : originSizeDeltaX);
909
+ overlayOffset += originOffsetDeltaX + (this._isLtr() ? originSizeDeltaX : 0);
910
+ this._updateOverlayOffset(overlayOffset);
911
+ });
912
+ });
913
+ }
914
+ updateResizeActive(active) {
915
+ this.eventDispatcher.overlayHandleActiveForCell.next(active ? this.resizeRef.origin.nativeElement : null);
916
+ }
917
+ _getOriginWidth() {
918
+ return this.resizeRef.origin.nativeElement.offsetWidth;
919
+ }
920
+ _getOriginOffset() {
921
+ return this.resizeRef.origin.nativeElement.offsetLeft;
922
+ }
923
+ _updateOverlayOffset(offset) {
924
+ this.resizeRef.overlayRef.overlayElement.style.transform = `translateX(${coerceCssPixelValue(offset)})`;
925
+ }
926
+ _isLtr() {
927
+ return this.directionality.value === 'ltr';
928
+ }
929
+ _notifyResizeEnded(size, completedSuccessfully = false) {
930
+ this.updateResizeActive(false);
931
+ this.ngZone.run(() => {
932
+ const sizeMessage = { columnId: this.columnDef.name, size };
933
+ if (completedSuccessfully) {
934
+ this.resizeNotifier.resizeCompleted.next(sizeMessage);
935
+ }
936
+ else {
937
+ this.resizeNotifier.resizeCanceled.next(sizeMessage);
938
+ }
939
+ });
940
+ }
941
+ }
942
+ /** @nocollapse */ /** @nocollapse */ ResizeOverlayHandle.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: ResizeOverlayHandle, deps: [], target: i0.ɵɵFactoryTarget.Directive });
943
+ /** @nocollapse */ /** @nocollapse */ ResizeOverlayHandle.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.0", type: ResizeOverlayHandle, ngImport: i0 });
944
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: ResizeOverlayHandle, decorators: [{
945
+ type: Directive
946
+ }] });
947
+
948
+ /**
949
+ * Generated bundle index. Do not edit.
950
+ */
951
+
952
+ export { CdkColumnResize, CdkColumnResizeFlex, CdkColumnResizeModule, CdkFlexTableResizeStrategy, ColumnResize, ColumnResizeNotifier, ColumnResizeNotifierSource, ColumnSizeStore, FLEX_PROVIDERS, FLEX_RESIZE_STRATEGY_PROVIDER, HeaderRowEventDispatcher, Resizable, ResizeOverlayHandle, ResizeRef, ResizeStrategy, TABLE_LAYOUT_FIXED_RESIZE_STRATEGY_PROVIDER, TABLE_PROVIDERS, TableLayoutFixedResizeStrategy };
953
+ //# sourceMappingURL=mtxColumnResize.mjs.map