@ng-matero/extensions 15.5.1 → 16.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (324) hide show
  1. package/alert/alert.d.ts +1 -1
  2. package/button/button-loading.d.ts +1 -1
  3. package/checkbox-group/checkbox-group.d.ts +1 -1
  4. package/colorpicker/colorpicker-input.d.ts +1 -1
  5. package/colorpicker/colorpicker-toggle.d.ts +1 -1
  6. package/colorpicker/colorpicker.d.ts +2 -2
  7. package/datetimepicker/calendar-body.d.ts +1 -1
  8. package/datetimepicker/calendar.d.ts +1 -1
  9. package/datetimepicker/clock.d.ts +1 -1
  10. package/datetimepicker/clock.scss +1 -4
  11. package/datetimepicker/datetimepicker-input.d.ts +1 -1
  12. package/datetimepicker/datetimepicker-toggle.d.ts +1 -1
  13. package/datetimepicker/datetimepicker.d.ts +2 -2
  14. package/datetimepicker/month-view.d.ts +1 -1
  15. package/datetimepicker/multi-year-view.d.ts +1 -1
  16. package/datetimepicker/time.d.ts +2 -2
  17. package/datetimepicker/year-view.d.ts +1 -1
  18. package/esm2022/alert/alert-module.mjs +19 -0
  19. package/esm2022/alert/alert.mjs +53 -0
  20. package/esm2022/button/button-loading.mjs +77 -0
  21. package/esm2022/button/button-module.mjs +21 -0
  22. package/esm2022/checkbox-group/checkbox-group-module.mjs +22 -0
  23. package/esm2022/checkbox-group/checkbox-group.mjs +234 -0
  24. package/esm2022/colorpicker/colorpicker-input.mjs +229 -0
  25. package/esm2022/colorpicker/colorpicker-module.mjs +64 -0
  26. package/esm2022/colorpicker/colorpicker-toggle.mjs +103 -0
  27. package/esm2022/colorpicker/colorpicker.mjs +367 -0
  28. package/esm2022/column-resize/column-resize-directives/column-resize-flex.mjs +46 -0
  29. package/esm2022/column-resize/column-resize-directives/column-resize.mjs +46 -0
  30. package/esm2022/column-resize/column-resize-module.mjs +29 -0
  31. package/esm2022/column-resize/column-resize-notifier.mjs +49 -0
  32. package/esm2022/column-resize/column-resize.mjs +83 -0
  33. package/esm2022/column-resize/column-size-store.mjs +21 -0
  34. package/esm2022/column-resize/event-dispatcher.mjs +68 -0
  35. package/esm2022/column-resize/overlay-handle.mjs +147 -0
  36. package/esm2022/column-resize/resizable.mjs +200 -0
  37. package/esm2022/column-resize/resize-strategy.mjs +235 -0
  38. package/{esm2020 → esm2022}/core/datetime/datetime-adapter.mjs +1 -1
  39. package/esm2022/core/datetime/datetime.module.mjs +44 -0
  40. package/esm2022/core/datetime/native-datetime-adapter.mjs +139 -0
  41. package/esm2022/core/pipes/is-template-ref.pipe.mjs +15 -0
  42. package/esm2022/core/pipes/pipes.module.mjs +20 -0
  43. package/esm2022/core/pipes/to-observable.pipe.mjs +16 -0
  44. package/esm2022/datetimepicker/calendar-body.mjs +79 -0
  45. package/esm2022/datetimepicker/calendar.mjs +672 -0
  46. package/esm2022/datetimepicker/clock.mjs +354 -0
  47. package/esm2022/datetimepicker/datetimepicker-input.mjs +350 -0
  48. package/esm2022/datetimepicker/datetimepicker-intl.mjs +64 -0
  49. package/esm2022/datetimepicker/datetimepicker-module.mjs +83 -0
  50. package/esm2022/datetimepicker/datetimepicker-toggle.mjs +106 -0
  51. package/esm2022/datetimepicker/datetimepicker.mjs +529 -0
  52. package/esm2022/datetimepicker/month-view.mjs +149 -0
  53. package/esm2022/datetimepicker/multi-year-view.mjs +215 -0
  54. package/esm2022/datetimepicker/time.mjs +458 -0
  55. package/esm2022/datetimepicker/year-view.mjs +139 -0
  56. package/esm2022/dialog/dialog-container.mjs +36 -0
  57. package/esm2022/dialog/dialog-module.mjs +25 -0
  58. package/esm2022/dialog/dialog.mjs +75 -0
  59. package/esm2022/drawer/drawer-container.mjs +253 -0
  60. package/esm2022/drawer/drawer-module.mjs +23 -0
  61. package/esm2022/drawer/drawer.mjs +167 -0
  62. package/esm2022/grid/cell.mjs +117 -0
  63. package/{esm2020 → esm2022}/grid/column-menu.mjs +6 -5
  64. package/esm2022/grid/column-resize/column-resize-directives/column-resize-flex.mjs +38 -0
  65. package/esm2022/grid/column-resize/column-resize-directives/column-resize.mjs +38 -0
  66. package/esm2022/grid/column-resize/column-resize-module.mjs +44 -0
  67. package/esm2022/grid/column-resize/overlay-handle.mjs +61 -0
  68. package/esm2022/grid/column-resize/resizable-directives/resizable.mjs +63 -0
  69. package/esm2022/grid/column-resize/resize-strategy.mjs +43 -0
  70. package/esm2022/grid/expansion-toggle.mjs +65 -0
  71. package/esm2022/grid/grid-module.mjs +137 -0
  72. package/esm2022/grid/grid-pipes.mjs +113 -0
  73. package/esm2022/grid/grid-utils.mjs +64 -0
  74. package/esm2022/grid/grid.mjs +630 -0
  75. package/esm2022/loader/loader-module.mjs +21 -0
  76. package/esm2022/loader/loader.mjs +70 -0
  77. package/esm2022/popover/popover-content.mjs +92 -0
  78. package/esm2022/popover/popover-module.mjs +25 -0
  79. package/esm2022/popover/popover-target.mjs +18 -0
  80. package/esm2022/popover/popover-trigger.mjs +472 -0
  81. package/esm2022/popover/popover.mjs +384 -0
  82. package/esm2022/progress/progress-module.mjs +19 -0
  83. package/esm2022/progress/progress.mjs +56 -0
  84. package/esm2022/select/option.mjs +58 -0
  85. package/esm2022/select/select-module.mjs +75 -0
  86. package/esm2022/select/select.mjs +561 -0
  87. package/esm2022/select/templates.mjs +135 -0
  88. package/esm2022/slider/slider-module.mjs +20 -0
  89. package/esm2022/slider/slider.mjs +1116 -0
  90. package/esm2022/split/split-module.mjs +20 -0
  91. package/esm2022/split/split-pane.mjs +150 -0
  92. package/esm2022/split/split.mjs +635 -0
  93. package/esm2022/tooltip/tooltip-module.mjs +25 -0
  94. package/esm2022/tooltip/tooltip.mjs +930 -0
  95. package/{fesm2020 → fesm2022}/mtxAlert.mjs +7 -7
  96. package/{fesm2020 → fesm2022}/mtxAlert.mjs.map +1 -1
  97. package/{fesm2020 → fesm2022}/mtxButton.mjs +7 -7
  98. package/{fesm2015 → fesm2022}/mtxButton.mjs.map +1 -1
  99. package/{fesm2020 → fesm2022}/mtxCheckboxGroup.mjs +13 -13
  100. package/{fesm2020 → fesm2022}/mtxCheckboxGroup.mjs.map +1 -1
  101. package/{fesm2020 → fesm2022}/mtxColorpicker.mjs +41 -41
  102. package/{fesm2020 → fesm2022}/mtxColorpicker.mjs.map +1 -1
  103. package/{fesm2020 → fesm2022}/mtxColumnResize.mjs +46 -46
  104. package/{fesm2015 → fesm2022}/mtxColumnResize.mjs.map +1 -1
  105. package/{fesm2020 → fesm2022}/mtxCore.mjs +26 -26
  106. package/fesm2022/mtxCore.mjs.map +1 -0
  107. package/{fesm2020 → fesm2022}/mtxDatetimepicker.mjs +84 -80
  108. package/fesm2022/mtxDatetimepicker.mjs.map +1 -0
  109. package/{fesm2020 → fesm2022}/mtxDialog.mjs +10 -10
  110. package/{fesm2015 → fesm2022}/mtxDialog.mjs.map +1 -1
  111. package/{fesm2020 → fesm2022}/mtxDrawer.mjs +10 -10
  112. package/{fesm2020 → fesm2022}/mtxDrawer.mjs.map +1 -1
  113. package/{fesm2020 → fesm2022}/mtxGrid.mjs +120 -120
  114. package/{fesm2020 → fesm2022}/mtxGrid.mjs.map +1 -1
  115. package/{fesm2020 → fesm2022}/mtxLoader.mjs +7 -7
  116. package/{fesm2020 → fesm2022}/mtxLoader.mjs.map +1 -1
  117. package/{fesm2020 → fesm2022}/mtxPopover.mjs +19 -19
  118. package/{fesm2020 → fesm2022}/mtxPopover.mjs.map +1 -1
  119. package/{fesm2020 → fesm2022}/mtxProgress.mjs +7 -7
  120. package/{fesm2015 → fesm2022}/mtxProgress.mjs.map +1 -1
  121. package/{fesm2020 → fesm2022}/mtxSelect.mjs +67 -67
  122. package/{fesm2015 → fesm2022}/mtxSelect.mjs.map +1 -1
  123. package/{fesm2020 → fesm2022}/mtxSlider.mjs +7 -7
  124. package/{fesm2020 → fesm2022}/mtxSlider.mjs.map +1 -1
  125. package/{fesm2020 → fesm2022}/mtxSplit.mjs +10 -10
  126. package/{fesm2020 → fesm2022}/mtxSplit.mjs.map +1 -1
  127. package/{fesm2020 → fesm2022}/mtxTooltip.mjs +16 -16
  128. package/{fesm2015 → fesm2022}/mtxTooltip.mjs.map +1 -1
  129. package/grid/cell.d.ts +1 -1
  130. package/grid/column-menu.d.ts +1 -1
  131. package/grid/column-resize/resizable-directives/resizable.d.ts +1 -1
  132. package/grid/expansion-toggle.d.ts +1 -1
  133. package/grid/grid.d.ts +2 -2
  134. package/loader/loader.d.ts +1 -1
  135. package/package.json +69 -109
  136. package/popover/popover-trigger.d.ts +1 -1
  137. package/popover/popover.d.ts +1 -1
  138. package/progress/progress.d.ts +1 -1
  139. package/select/option.d.ts +1 -1
  140. package/select/select.d.ts +1 -1
  141. package/slider/slider.d.ts +1 -1
  142. package/split/split-pane.d.ts +1 -1
  143. package/split/split.d.ts +1 -1
  144. package/tooltip/tooltip.d.ts +1 -1
  145. package/tooltip/tooltip.scss +1 -4
  146. package/esm2020/alert/alert-module.mjs +0 -18
  147. package/esm2020/alert/alert.mjs +0 -52
  148. package/esm2020/button/button-loading.mjs +0 -76
  149. package/esm2020/button/button-module.mjs +0 -20
  150. package/esm2020/checkbox-group/checkbox-group-module.mjs +0 -21
  151. package/esm2020/checkbox-group/checkbox-group.mjs +0 -233
  152. package/esm2020/colorpicker/colorpicker-input.mjs +0 -228
  153. package/esm2020/colorpicker/colorpicker-module.mjs +0 -63
  154. package/esm2020/colorpicker/colorpicker-toggle.mjs +0 -101
  155. package/esm2020/colorpicker/colorpicker.mjs +0 -365
  156. package/esm2020/column-resize/column-resize-directives/column-resize-flex.mjs +0 -45
  157. package/esm2020/column-resize/column-resize-directives/column-resize.mjs +0 -45
  158. package/esm2020/column-resize/column-resize-module.mjs +0 -28
  159. package/esm2020/column-resize/column-resize-notifier.mjs +0 -47
  160. package/esm2020/column-resize/column-resize.mjs +0 -82
  161. package/esm2020/column-resize/column-size-store.mjs +0 -20
  162. package/esm2020/column-resize/event-dispatcher.mjs +0 -67
  163. package/esm2020/column-resize/overlay-handle.mjs +0 -146
  164. package/esm2020/column-resize/resizable.mjs +0 -199
  165. package/esm2020/column-resize/resize-strategy.mjs +0 -232
  166. package/esm2020/core/datetime/datetime.module.mjs +0 -42
  167. package/esm2020/core/datetime/native-datetime-adapter.mjs +0 -138
  168. package/esm2020/core/pipes/is-template-ref.pipe.mjs +0 -14
  169. package/esm2020/core/pipes/pipes.module.mjs +0 -19
  170. package/esm2020/core/pipes/to-observable.pipe.mjs +0 -15
  171. package/esm2020/datetimepicker/calendar-body.mjs +0 -78
  172. package/esm2020/datetimepicker/calendar.mjs +0 -671
  173. package/esm2020/datetimepicker/clock.mjs +0 -349
  174. package/esm2020/datetimepicker/datetimepicker-input.mjs +0 -349
  175. package/esm2020/datetimepicker/datetimepicker-intl.mjs +0 -63
  176. package/esm2020/datetimepicker/datetimepicker-module.mjs +0 -82
  177. package/esm2020/datetimepicker/datetimepicker-toggle.mjs +0 -104
  178. package/esm2020/datetimepicker/datetimepicker.mjs +0 -527
  179. package/esm2020/datetimepicker/month-view.mjs +0 -148
  180. package/esm2020/datetimepicker/multi-year-view.mjs +0 -214
  181. package/esm2020/datetimepicker/time.mjs +0 -456
  182. package/esm2020/datetimepicker/year-view.mjs +0 -138
  183. package/esm2020/dialog/dialog-container.mjs +0 -35
  184. package/esm2020/dialog/dialog-module.mjs +0 -24
  185. package/esm2020/dialog/dialog.mjs +0 -74
  186. package/esm2020/drawer/drawer-container.mjs +0 -252
  187. package/esm2020/drawer/drawer-module.mjs +0 -22
  188. package/esm2020/drawer/drawer.mjs +0 -166
  189. package/esm2020/grid/cell.mjs +0 -116
  190. package/esm2020/grid/column-resize/column-resize-directives/column-resize-flex.mjs +0 -37
  191. package/esm2020/grid/column-resize/column-resize-directives/column-resize.mjs +0 -37
  192. package/esm2020/grid/column-resize/column-resize-module.mjs +0 -42
  193. package/esm2020/grid/column-resize/overlay-handle.mjs +0 -60
  194. package/esm2020/grid/column-resize/resizable-directives/resizable.mjs +0 -62
  195. package/esm2020/grid/column-resize/resize-strategy.mjs +0 -42
  196. package/esm2020/grid/expansion-toggle.mjs +0 -64
  197. package/esm2020/grid/grid-module.mjs +0 -136
  198. package/esm2020/grid/grid-pipes.mjs +0 -108
  199. package/esm2020/grid/grid-utils.mjs +0 -63
  200. package/esm2020/grid/grid.mjs +0 -628
  201. package/esm2020/loader/loader-module.mjs +0 -20
  202. package/esm2020/loader/loader.mjs +0 -69
  203. package/esm2020/popover/popover-content.mjs +0 -90
  204. package/esm2020/popover/popover-module.mjs +0 -24
  205. package/esm2020/popover/popover-target.mjs +0 -17
  206. package/esm2020/popover/popover-trigger.mjs +0 -471
  207. package/esm2020/popover/popover.mjs +0 -383
  208. package/esm2020/progress/progress-module.mjs +0 -18
  209. package/esm2020/progress/progress.mjs +0 -55
  210. package/esm2020/select/option.mjs +0 -57
  211. package/esm2020/select/select-module.mjs +0 -74
  212. package/esm2020/select/select.mjs +0 -560
  213. package/esm2020/select/templates.mjs +0 -124
  214. package/esm2020/slider/slider-module.mjs +0 -19
  215. package/esm2020/slider/slider.mjs +0 -1115
  216. package/esm2020/split/split-module.mjs +0 -19
  217. package/esm2020/split/split-pane.mjs +0 -149
  218. package/esm2020/split/split.mjs +0 -634
  219. package/esm2020/tooltip/tooltip-module.mjs +0 -24
  220. package/esm2020/tooltip/tooltip.mjs +0 -926
  221. package/fesm2015/mtxAlert.mjs +0 -74
  222. package/fesm2015/mtxAlert.mjs.map +0 -1
  223. package/fesm2015/mtxButton.mjs +0 -99
  224. package/fesm2015/mtxCheckboxGroup.mjs +0 -256
  225. package/fesm2015/mtxCheckboxGroup.mjs.map +0 -1
  226. package/fesm2015/mtxColorpicker.mjs +0 -767
  227. package/fesm2015/mtxColorpicker.mjs.map +0 -1
  228. package/fesm2015/mtxColumnResize.mjs +0 -959
  229. package/fesm2015/mtxCore.mjs +0 -374
  230. package/fesm2015/mtxCore.mjs.map +0 -1
  231. package/fesm2015/mtxDatetimepicker.mjs +0 -3164
  232. package/fesm2015/mtxDatetimepicker.mjs.map +0 -1
  233. package/fesm2015/mtxDialog.mjs +0 -130
  234. package/fesm2015/mtxDrawer.mjs +0 -578
  235. package/fesm2015/mtxDrawer.mjs.map +0 -1
  236. package/fesm2015/mtxGrid.mjs +0 -1514
  237. package/fesm2015/mtxGrid.mjs.map +0 -1
  238. package/fesm2015/mtxLoader.mjs +0 -93
  239. package/fesm2015/mtxLoader.mjs.map +0 -1
  240. package/fesm2015/mtxPopover.mjs +0 -1027
  241. package/fesm2015/mtxPopover.mjs.map +0 -1
  242. package/fesm2015/mtxProgress.mjs +0 -77
  243. package/fesm2015/mtxSelect.mjs +0 -814
  244. package/fesm2015/mtxSlider.mjs +0 -1139
  245. package/fesm2015/mtxSlider.mjs.map +0 -1
  246. package/fesm2015/mtxSplit.mjs +0 -1025
  247. package/fesm2015/mtxSplit.mjs.map +0 -1
  248. package/fesm2015/mtxTooltip.mjs +0 -982
  249. package/fesm2020/mtxButton.mjs.map +0 -1
  250. package/fesm2020/mtxColumnResize.mjs.map +0 -1
  251. package/fesm2020/mtxCore.mjs.map +0 -1
  252. package/fesm2020/mtxDatetimepicker.mjs.map +0 -1
  253. package/fesm2020/mtxDialog.mjs.map +0 -1
  254. package/fesm2020/mtxProgress.mjs.map +0 -1
  255. package/fesm2020/mtxSelect.mjs.map +0 -1
  256. package/fesm2020/mtxTooltip.mjs.map +0 -1
  257. package/fesm2020/ng-matero-extensions.mjs +0 -9
  258. package/fesm2020/ng-matero-extensions.mjs.map +0 -1
  259. /package/{esm2020 → esm2022}/alert/mtxAlert.mjs +0 -0
  260. /package/{esm2020 → esm2022}/alert/public-api.mjs +0 -0
  261. /package/{esm2020 → esm2022}/button/mtxButton.mjs +0 -0
  262. /package/{esm2020 → esm2022}/button/public-api.mjs +0 -0
  263. /package/{esm2020 → esm2022}/checkbox-group/interfaces.mjs +0 -0
  264. /package/{esm2020 → esm2022}/checkbox-group/mtxCheckboxGroup.mjs +0 -0
  265. /package/{esm2020 → esm2022}/checkbox-group/public-api.mjs +0 -0
  266. /package/{esm2020 → esm2022}/colorpicker/colorpicker-animations.mjs +0 -0
  267. /package/{esm2020 → esm2022}/colorpicker/mtxColorpicker.mjs +0 -0
  268. /package/{esm2020 → esm2022}/colorpicker/public-api.mjs +0 -0
  269. /package/{esm2020 → esm2022}/column-resize/column-resize-directives/constants.mjs +0 -0
  270. /package/{esm2020 → esm2022}/column-resize/mtxColumnResize.mjs +0 -0
  271. /package/{esm2020 → esm2022}/column-resize/polyfill.mjs +0 -0
  272. /package/{esm2020 → esm2022}/column-resize/public-api.mjs +0 -0
  273. /package/{esm2020 → esm2022}/column-resize/resize-ref.mjs +0 -0
  274. /package/{esm2020 → esm2022}/column-resize/selectors.mjs +0 -0
  275. /package/{esm2020 → esm2022}/core/datetime/datetime-formats.mjs +0 -0
  276. /package/{esm2020 → esm2022}/core/datetime/index.mjs +0 -0
  277. /package/{esm2020 → esm2022}/core/datetime/native-datetime-formats.mjs +0 -0
  278. /package/{esm2020 → esm2022}/core/mtxCore.mjs +0 -0
  279. /package/{esm2020 → esm2022}/core/pipes/index.mjs +0 -0
  280. /package/{esm2020 → esm2022}/core/public-api.mjs +0 -0
  281. /package/{esm2020 → esm2022}/datetimepicker/datetimepicker-animations.mjs +0 -0
  282. /package/{esm2020 → esm2022}/datetimepicker/datetimepicker-errors.mjs +0 -0
  283. /package/{esm2020 → esm2022}/datetimepicker/datetimepicker-filtertype.mjs +0 -0
  284. /package/{esm2020 → esm2022}/datetimepicker/datetimepicker-types.mjs +0 -0
  285. /package/{esm2020 → esm2022}/datetimepicker/mtxDatetimepicker.mjs +0 -0
  286. /package/{esm2020 → esm2022}/datetimepicker/public-api.mjs +0 -0
  287. /package/{esm2020 → esm2022}/dialog/dialog-config.mjs +0 -0
  288. /package/{esm2020 → esm2022}/dialog/mtxDialog.mjs +0 -0
  289. /package/{esm2020 → esm2022}/dialog/public-api.mjs +0 -0
  290. /package/{esm2020 → esm2022}/drawer/drawer-animation.mjs +0 -0
  291. /package/{esm2020 → esm2022}/drawer/drawer-config.mjs +0 -0
  292. /package/{esm2020 → esm2022}/drawer/drawer-ref.mjs +0 -0
  293. /package/{esm2020 → esm2022}/drawer/mtxDrawer.mjs +0 -0
  294. /package/{esm2020 → esm2022}/drawer/public-api.mjs +0 -0
  295. /package/{esm2020 → esm2022}/grid/column-resize/column-resize-directives/common.mjs +0 -0
  296. /package/{esm2020 → esm2022}/grid/column-resize/resizable-directives/common.mjs +0 -0
  297. /package/{esm2020 → esm2022}/grid/interfaces.mjs +0 -0
  298. /package/{esm2020 → esm2022}/grid/mtxGrid.mjs +0 -0
  299. /package/{esm2020 → esm2022}/grid/public-api.mjs +0 -0
  300. /package/{esm2020 → esm2022}/loader/mtxLoader.mjs +0 -0
  301. /package/{esm2020 → esm2022}/loader/public-api.mjs +0 -0
  302. /package/{esm2020 → esm2022}/ng-matero-extensions.mjs +0 -0
  303. /package/{esm2020 → esm2022}/popover/mtxPopover.mjs +0 -0
  304. /package/{esm2020 → esm2022}/popover/popover-animations.mjs +0 -0
  305. /package/{esm2020 → esm2022}/popover/popover-errors.mjs +0 -0
  306. /package/{esm2020 → esm2022}/popover/popover-interfaces.mjs +0 -0
  307. /package/{esm2020 → esm2022}/popover/popover-types.mjs +0 -0
  308. /package/{esm2020 → esm2022}/popover/public-api.mjs +0 -0
  309. /package/{esm2020 → esm2022}/progress/mtxProgress.mjs +0 -0
  310. /package/{esm2020 → esm2022}/progress/public-api.mjs +0 -0
  311. /package/{esm2020 → esm2022}/public-api.mjs +0 -0
  312. /package/{esm2020 → esm2022}/select/mtxSelect.mjs +0 -0
  313. /package/{esm2020 → esm2022}/select/public-api.mjs +0 -0
  314. /package/{esm2020 → esm2022}/slider/mtxSlider.mjs +0 -0
  315. /package/{esm2020 → esm2022}/slider/public-api.mjs +0 -0
  316. /package/{esm2020 → esm2022}/split/interfaces.mjs +0 -0
  317. /package/{esm2020 → esm2022}/split/mtxSplit.mjs +0 -0
  318. /package/{esm2020 → esm2022}/split/public-api.mjs +0 -0
  319. /package/{esm2020 → esm2022}/split/utils.mjs +0 -0
  320. /package/{esm2020 → esm2022}/tooltip/mtxTooltip.mjs +0 -0
  321. /package/{esm2020 → esm2022}/tooltip/public-api.mjs +0 -0
  322. /package/{esm2020 → esm2022}/tooltip/tooltip-animations.mjs +0 -0
  323. /package/{fesm2015 → fesm2022}/ng-matero-extensions.mjs +0 -0
  324. /package/{fesm2015 → fesm2022}/ng-matero-extensions.mjs.map +0 -0
@@ -1,1025 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { InjectionToken, EventEmitter, Component, ViewEncapsulation, ChangeDetectionStrategy, Optional, Inject, Input, Output, ViewChildren, Directive, NgModule } from '@angular/core';
3
- import * as i1 from '@angular/common';
4
- import { CommonModule } from '@angular/common';
5
- import { mixinColor } from '@angular/material/core';
6
- import { Observable, Subject } from 'rxjs';
7
- import { debounceTime } from 'rxjs/operators';
8
-
9
- function getPointFromEvent(event) {
10
- // TouchEvent
11
- if (event.changedTouches !== undefined &&
12
- event.changedTouches.length > 0) {
13
- return {
14
- x: event.changedTouches[0].clientX,
15
- y: event.changedTouches[0].clientY,
16
- };
17
- }
18
- // MouseEvent
19
- else if (event.clientX !== undefined &&
20
- event.clientY !== undefined) {
21
- return {
22
- x: event.clientX,
23
- y: event.clientY,
24
- };
25
- }
26
- return null;
27
- }
28
- function getElementPixelSize(elRef, direction) {
29
- const rect = elRef.nativeElement.getBoundingClientRect();
30
- return direction === 'horizontal' ? rect.width : rect.height;
31
- }
32
- function getInputBoolean(v) {
33
- return typeof v === 'boolean' ? v : v === 'false' ? false : true;
34
- }
35
- function getInputPositiveNumber(v, defaultValue) {
36
- if (v === null || v === undefined) {
37
- return defaultValue;
38
- }
39
- v = Number(v);
40
- return !isNaN(v) && v >= 0 ? v : defaultValue;
41
- }
42
- function isUserSizesValid(unit, sizes) {
43
- // All sizes have to be not null and total should be 100
44
- if (unit === 'percent') {
45
- const total = sizes.reduce((_total, s) => (s !== null ? _total + s : _total), 0);
46
- return sizes.every(s => s !== null) && total && total > 99.9 && total < 100.1;
47
- }
48
- // A size at null is mandatory but only one.
49
- if (unit === 'pixel') {
50
- return sizes.filter(s => s === null).length === 1;
51
- }
52
- }
53
- function getAreaMinSize(a) {
54
- if (a.size === null) {
55
- return null;
56
- }
57
- if (a.component.lockSize === true) {
58
- return a.size;
59
- }
60
- if (a.component.minSize === null) {
61
- return null;
62
- }
63
- if (a.component.minSize > a.size) {
64
- return a.size;
65
- }
66
- return a.component.minSize;
67
- }
68
- function getAreaMaxSize(a) {
69
- if (a.size === null) {
70
- return null;
71
- }
72
- if (a.component.lockSize === true) {
73
- return a.size;
74
- }
75
- if (a.component.maxSize === null) {
76
- return null;
77
- }
78
- if (a.component.maxSize < a.size) {
79
- return a.size;
80
- }
81
- return a.component.maxSize;
82
- }
83
- function getGutterSideAbsorptionCapacity(unit, sideAreas, pixels, allAreasSizePixel) {
84
- return sideAreas.reduce((acc, area) => {
85
- const res = getAreaAbsorptionCapacity(unit, area, acc.remain, allAreasSizePixel);
86
- acc.list.push(res);
87
- acc.remain = res && res.pixelRemain;
88
- return acc;
89
- }, { remain: pixels, list: [] });
90
- }
91
- function getAreaAbsorptionCapacity(unit, areaSnapshot, pixels, allAreasSizePixel) {
92
- // No pain no gain
93
- if (pixels === 0) {
94
- return {
95
- areaSnapshot,
96
- pixelAbsorb: 0,
97
- percentAfterAbsorption: areaSnapshot.sizePercentAtStart,
98
- pixelRemain: 0,
99
- };
100
- }
101
- // Area start at zero and need to be reduced, not possible
102
- if (areaSnapshot.sizePixelAtStart === 0 && pixels < 0) {
103
- return {
104
- areaSnapshot,
105
- pixelAbsorb: 0,
106
- percentAfterAbsorption: 0,
107
- pixelRemain: pixels,
108
- };
109
- }
110
- if (unit === 'percent') {
111
- return getAreaAbsorptionCapacityPercent(areaSnapshot, pixels, allAreasSizePixel);
112
- }
113
- if (unit === 'pixel') {
114
- return getAreaAbsorptionCapacityPixel(areaSnapshot, pixels, allAreasSizePixel);
115
- }
116
- }
117
- function getAreaAbsorptionCapacityPercent(areaSnapshot, pixels, allAreasSizePixel) {
118
- const tempPixelSize = areaSnapshot.sizePixelAtStart + pixels;
119
- const tempPercentSize = (tempPixelSize / allAreasSizePixel) * 100;
120
- // ENLARGE AREA
121
- if (pixels > 0) {
122
- // If maxSize & newSize bigger than it > absorb to max and return remaining pixels
123
- if (areaSnapshot.area.maxSize !== null && tempPercentSize > areaSnapshot.area.maxSize) {
124
- // Use area.area.maxSize as newPercentSize and return calculate pixels remaining
125
- const maxSizePixel = (areaSnapshot.area.maxSize / 100) * allAreasSizePixel;
126
- return {
127
- areaSnapshot,
128
- pixelAbsorb: maxSizePixel,
129
- percentAfterAbsorption: areaSnapshot.area.maxSize,
130
- pixelRemain: areaSnapshot.sizePixelAtStart + pixels - maxSizePixel,
131
- };
132
- }
133
- return {
134
- areaSnapshot,
135
- pixelAbsorb: pixels,
136
- percentAfterAbsorption: tempPercentSize > 100 ? 100 : tempPercentSize,
137
- pixelRemain: 0,
138
- };
139
- }
140
- // REDUCE AREA
141
- else if (pixels < 0) {
142
- // If minSize & newSize smaller than it > absorb to min and return remaining pixels
143
- if (areaSnapshot.area.minSize !== null && tempPercentSize < areaSnapshot.area.minSize) {
144
- // Use area.area.minSize as newPercentSize and return calculate pixels remaining
145
- const minSizePixel = (areaSnapshot.area.minSize / 100) * allAreasSizePixel;
146
- return {
147
- areaSnapshot,
148
- pixelAbsorb: minSizePixel,
149
- percentAfterAbsorption: areaSnapshot.area.minSize,
150
- pixelRemain: areaSnapshot.sizePixelAtStart + pixels - minSizePixel,
151
- };
152
- }
153
- // If reduced under zero > return remaining pixels
154
- else if (tempPercentSize < 0) {
155
- // Use 0 as newPercentSize and return calculate pixels remaining
156
- return {
157
- areaSnapshot,
158
- pixelAbsorb: -areaSnapshot.sizePixelAtStart,
159
- percentAfterAbsorption: 0,
160
- pixelRemain: pixels + areaSnapshot.sizePixelAtStart,
161
- };
162
- }
163
- return {
164
- areaSnapshot,
165
- pixelAbsorb: pixels,
166
- percentAfterAbsorption: tempPercentSize,
167
- pixelRemain: 0,
168
- };
169
- }
170
- }
171
- function getAreaAbsorptionCapacityPixel(areaSnapshot, pixels, containerSizePixel) {
172
- const tempPixelSize = areaSnapshot.sizePixelAtStart + pixels;
173
- // ENLARGE AREA
174
- if (pixels > 0) {
175
- // If maxSize & newSize bigger than it > absorb to max and return remaining pixels
176
- if (areaSnapshot.area.maxSize !== null && tempPixelSize > areaSnapshot.area.maxSize) {
177
- return {
178
- areaSnapshot,
179
- pixelAbsorb: areaSnapshot.area.maxSize - areaSnapshot.sizePixelAtStart,
180
- percentAfterAbsorption: -1,
181
- pixelRemain: tempPixelSize - areaSnapshot.area.maxSize,
182
- };
183
- }
184
- return {
185
- areaSnapshot,
186
- pixelAbsorb: pixels,
187
- percentAfterAbsorption: -1,
188
- pixelRemain: 0,
189
- };
190
- }
191
- // REDUCE AREA
192
- else if (pixels < 0) {
193
- // If minSize & newSize smaller than it > absorb to min and return remaining pixels
194
- if (areaSnapshot.area.minSize !== null && tempPixelSize < areaSnapshot.area.minSize) {
195
- return {
196
- areaSnapshot,
197
- pixelAbsorb: areaSnapshot.area.minSize + pixels - tempPixelSize,
198
- percentAfterAbsorption: -1,
199
- pixelRemain: tempPixelSize - areaSnapshot.area.minSize,
200
- };
201
- }
202
- // If reduced under zero > return remaining pixels
203
- else if (tempPixelSize < 0) {
204
- return {
205
- areaSnapshot,
206
- pixelAbsorb: -areaSnapshot.sizePixelAtStart,
207
- percentAfterAbsorption: -1,
208
- pixelRemain: pixels + areaSnapshot.sizePixelAtStart,
209
- };
210
- }
211
- return {
212
- areaSnapshot,
213
- pixelAbsorb: pixels,
214
- percentAfterAbsorption: -1,
215
- pixelRemain: 0,
216
- };
217
- }
218
- }
219
- function updateAreaSize(unit, item) {
220
- if (unit === 'percent') {
221
- item.areaSnapshot.area.size = item.percentAfterAbsorption;
222
- }
223
- else if (unit === 'pixel') {
224
- // Update size except for the wildcard size area
225
- if (item.areaSnapshot.area.size !== null) {
226
- item.areaSnapshot.area.size = item.areaSnapshot.sizePixelAtStart + item.pixelAbsorb;
227
- }
228
- }
229
- }
230
-
231
- /** Injection token that can be used to specify default split options. */
232
- const MTX_SPLIT_DEFAULT_OPTIONS = new InjectionToken('mtx-split-default-options');
233
- // Boilerplate for applying mixins to _MtxSplitBase.
234
- /** @docs-private */
235
- const _MtxSplitBase = mixinColor(class {
236
- constructor(_elementRef) {
237
- this._elementRef = _elementRef;
238
- }
239
- });
240
- /**
241
- * mtx-split
242
- *
243
- *
244
- * PERCENT MODE ([unit]="'percent'")
245
- * ___________________________________________________________________________________________
246
- * | A [g1] B [g2] C [g3] D [g4] E |
247
- * |-------------------------------------------------------------------------------------------|
248
- * | 20 30 20 15 15 | <-- [size]="x"
249
- * | 10px 10px 10px 10px | <-- [gutterSize]="10"
250
- * |calc(20% - 8px) calc(30% - 12px) calc(20% - 8px) calc(15% - 6px) calc(15% - 6px)| <-- CSS flex-basis property (with flex-grow&shrink at 0)
251
- * | 152px 228px 152px 114px 114px | <-- el.getBoundingClientRect().width
252
- * |___________________________________________________________________________________________|
253
- * 800px <-- el.getBoundingClientRect().width
254
- * flex-basis = calc( { area.size }% - { area.size/100 * nbGutter*gutterSize }px );
255
- *
256
- *
257
- * PIXEL MODE ([unit]="'pixel'")
258
- * ___________________________________________________________________________________________
259
- * | A [g1] B [g2] C [g3] D [g4] E |
260
- * |-------------------------------------------------------------------------------------------|
261
- * | 100 250 * 150 100 | <-- [size]="y"
262
- * | 10px 10px 10px 10px | <-- [gutterSize]="10"
263
- * | 0 0 100px 0 0 250px 1 1 auto 0 0 150px 0 0 100px | <-- CSS flex property (flex-grow/flex-shrink/flex-basis)
264
- * | 100px 250px 200px 150px 100px | <-- el.getBoundingClientRect().width
265
- * |___________________________________________________________________________________________|
266
- * 800px <-- el.getBoundingClientRect().width
267
- *
268
- */
269
- class MtxSplit extends _MtxSplitBase {
270
- set direction(v) {
271
- this._direction = v === 'vertical' ? 'vertical' : 'horizontal';
272
- this.renderer.addClass(this.elRef.nativeElement, `mtx-split-${this._direction}`);
273
- this.renderer.removeClass(this.elRef.nativeElement, `mtx-split-${this._direction === 'vertical' ? 'horizontal' : 'vertical'}`);
274
- this.build(false, false);
275
- }
276
- get direction() {
277
- return this._direction;
278
- }
279
- set unit(v) {
280
- this._unit = v === 'pixel' ? 'pixel' : 'percent';
281
- this.renderer.addClass(this.elRef.nativeElement, `mtx-split-${this._unit}`);
282
- this.renderer.removeClass(this.elRef.nativeElement, `mtx-split-${this._unit === 'pixel' ? 'percent' : 'pixel'}`);
283
- this.build(false, true);
284
- }
285
- get unit() {
286
- return this._unit;
287
- }
288
- set gutterSize(v) {
289
- this._gutterSize = getInputPositiveNumber(v, 11);
290
- this.build(false, false);
291
- }
292
- get gutterSize() {
293
- return this._gutterSize;
294
- }
295
- set gutterStep(v) {
296
- this._gutterStep = getInputPositiveNumber(v, 1);
297
- }
298
- get gutterStep() {
299
- return this._gutterStep;
300
- }
301
- set restrictMove(v) {
302
- this._restrictMove = getInputBoolean(v);
303
- }
304
- get restrictMove() {
305
- return this._restrictMove;
306
- }
307
- set useTransition(v) {
308
- this._useTransition = getInputBoolean(v);
309
- if (this._useTransition) {
310
- this.renderer.addClass(this.elRef.nativeElement, 'mtx-split-transition');
311
- }
312
- else {
313
- this.renderer.removeClass(this.elRef.nativeElement, 'mtx-split-transition');
314
- }
315
- }
316
- get useTransition() {
317
- return this._useTransition;
318
- }
319
- set disabled(v) {
320
- this._disabled = getInputBoolean(v);
321
- if (this._disabled) {
322
- this.renderer.addClass(this.elRef.nativeElement, 'mtx-split-disabled');
323
- }
324
- else {
325
- this.renderer.removeClass(this.elRef.nativeElement, 'mtx-split-disabled');
326
- }
327
- }
328
- get disabled() {
329
- return this._disabled;
330
- }
331
- set dir(v) {
332
- this._dir = v === 'rtl' ? 'rtl' : 'ltr';
333
- this.renderer.setAttribute(this.elRef.nativeElement, 'dir', this._dir);
334
- }
335
- get dir() {
336
- return this._dir;
337
- }
338
- set gutterDblClickDuration(v) {
339
- this._gutterDblClickDuration = getInputPositiveNumber(v, 0);
340
- }
341
- get gutterDblClickDuration() {
342
- return this._gutterDblClickDuration;
343
- }
344
- get transitionEnd() {
345
- return new Observable(subscriber => (this.transitionEndSubscriber = subscriber)).pipe(debounceTime(20));
346
- }
347
- constructor(ngZone, elRef, cdRef, renderer, _defaultOptions) {
348
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
349
- super(elRef);
350
- this.ngZone = ngZone;
351
- this.elRef = elRef;
352
- this.cdRef = cdRef;
353
- this.renderer = renderer;
354
- this._defaultOptions = _defaultOptions;
355
- this._direction = 'horizontal';
356
- ////
357
- this._unit = 'percent';
358
- ////
359
- this._gutterSize = 4;
360
- ////
361
- this._gutterStep = 1;
362
- ////
363
- this._restrictMove = false;
364
- ////
365
- this._useTransition = false;
366
- ////
367
- this._disabled = false;
368
- ////
369
- this._dir = 'ltr';
370
- ////
371
- this._gutterDblClickDuration = 0;
372
- ////
373
- this.dragStart = new EventEmitter(false);
374
- this.dragEnd = new EventEmitter(false);
375
- this.gutterClick = new EventEmitter(false);
376
- this.gutterDblClick = new EventEmitter(false);
377
- this.dragProgressSubject = new Subject();
378
- this.dragProgress$ = this.dragProgressSubject.asObservable();
379
- ////
380
- this.isDragging = false;
381
- this.dragListeners = [];
382
- this.snapshot = null;
383
- this.startPoint = null;
384
- this.endPoint = null;
385
- this.displayedAreas = [];
386
- this.hidedAreas = [];
387
- this._clickTimeout = null;
388
- this.color = (_a = _defaultOptions === null || _defaultOptions === void 0 ? void 0 : _defaultOptions.color) !== null && _a !== void 0 ? _a : 'primary';
389
- this.direction = (_b = _defaultOptions === null || _defaultOptions === void 0 ? void 0 : _defaultOptions.direction) !== null && _b !== void 0 ? _b : 'horizontal';
390
- this.dir = (_c = _defaultOptions === null || _defaultOptions === void 0 ? void 0 : _defaultOptions.dir) !== null && _c !== void 0 ? _c : 'ltr';
391
- this.unit = (_d = _defaultOptions === null || _defaultOptions === void 0 ? void 0 : _defaultOptions.unit) !== null && _d !== void 0 ? _d : 'percent';
392
- this.gutterDblClickDuration = (_e = _defaultOptions === null || _defaultOptions === void 0 ? void 0 : _defaultOptions.gutterDblClickDuration) !== null && _e !== void 0 ? _e : 0;
393
- this.gutterSize = (_f = _defaultOptions === null || _defaultOptions === void 0 ? void 0 : _defaultOptions.gutterSize) !== null && _f !== void 0 ? _f : 4;
394
- this.gutterStep = (_g = _defaultOptions === null || _defaultOptions === void 0 ? void 0 : _defaultOptions.gutterStep) !== null && _g !== void 0 ? _g : 1;
395
- this.restrictMove = (_h = _defaultOptions === null || _defaultOptions === void 0 ? void 0 : _defaultOptions.restrictMove) !== null && _h !== void 0 ? _h : false;
396
- this.useTransition = (_j = _defaultOptions === null || _defaultOptions === void 0 ? void 0 : _defaultOptions.useTransition) !== null && _j !== void 0 ? _j : false;
397
- }
398
- ngAfterViewInit() {
399
- this.ngZone.runOutsideAngular(() => {
400
- // To avoid transition at first rendering
401
- setTimeout(() => this.renderer.addClass(this.elRef.nativeElement, 'mtx-split-init'));
402
- });
403
- }
404
- getNbGutters() {
405
- return this.displayedAreas.length === 0 ? 0 : this.displayedAreas.length - 1;
406
- }
407
- addArea(component) {
408
- const newArea = {
409
- component,
410
- order: 0,
411
- size: 0,
412
- minSize: null,
413
- maxSize: null,
414
- };
415
- if (component.visible === true) {
416
- this.displayedAreas.push(newArea);
417
- this.build(true, true);
418
- }
419
- else {
420
- this.hidedAreas.push(newArea);
421
- }
422
- }
423
- removeArea(component) {
424
- if (this.displayedAreas.some(a => a.component === component)) {
425
- const area = this.displayedAreas.find(a => a.component === component);
426
- this.displayedAreas.splice(this.displayedAreas.indexOf(area), 1);
427
- this.build(true, true);
428
- }
429
- else if (this.hidedAreas.some(a => a.component === component)) {
430
- const area = this.hidedAreas.find(a => a.component === component);
431
- this.hidedAreas.splice(this.hidedAreas.indexOf(area), 1);
432
- }
433
- }
434
- updateArea(component, resetOrders, resetSizes) {
435
- if (component.visible === true) {
436
- this.build(resetOrders, resetSizes);
437
- }
438
- }
439
- showArea(component) {
440
- const area = this.hidedAreas.find(a => a.component === component);
441
- if (area === undefined) {
442
- return;
443
- }
444
- const areas = this.hidedAreas.splice(this.hidedAreas.indexOf(area), 1);
445
- this.displayedAreas.push(...areas);
446
- this.build(true, true);
447
- }
448
- hideArea(comp) {
449
- const area = this.displayedAreas.find(a => a.component === comp);
450
- if (area === undefined) {
451
- return;
452
- }
453
- const areas = this.displayedAreas.splice(this.displayedAreas.indexOf(area), 1);
454
- areas.forEach(_area => {
455
- _area.order = 0;
456
- _area.size = 0;
457
- });
458
- this.hidedAreas.push(...areas);
459
- this.build(true, true);
460
- }
461
- getVisibleAreaSizes() {
462
- return this.displayedAreas.map(a => (a.size === null ? '*' : a.size));
463
- }
464
- setVisibleAreaSizes(sizes) {
465
- if (sizes.length !== this.displayedAreas.length) {
466
- return false;
467
- }
468
- const formatedSizes = sizes.map(s => getInputPositiveNumber(s, null));
469
- const isValid = isUserSizesValid(this.unit, formatedSizes);
470
- if (isValid === false) {
471
- return false;
472
- }
473
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
474
- // @ts-ignore
475
- this.displayedAreas.forEach((area, i) => (area.component._size = formatedSizes[i]));
476
- this.build(false, true);
477
- return true;
478
- }
479
- build(resetOrders, resetSizes) {
480
- this.stopDragging();
481
- // ¤ AREAS ORDER
482
- if (resetOrders === true) {
483
- // If user provided 'order' for each area, use it to sort them.
484
- if (this.displayedAreas.every(a => a.component.order !== null)) {
485
- this.displayedAreas.sort((a, b) => (a.component.order - b.component.order));
486
- }
487
- // Then set real order with multiples of 2, numbers between will be used by gutters.
488
- this.displayedAreas.forEach((area, i) => {
489
- area.order = i * 2;
490
- area.component.setStyleOrder(area.order);
491
- });
492
- }
493
- // ¤ AREAS SIZE
494
- if (resetSizes === true) {
495
- const useUserSizes = isUserSizesValid(this.unit, this.displayedAreas.map(a => a.component.size));
496
- switch (this.unit) {
497
- case 'percent': {
498
- const defaultSize = 100 / this.displayedAreas.length;
499
- this.displayedAreas.forEach(area => {
500
- area.size = useUserSizes ? area.component.size : defaultSize;
501
- area.minSize = getAreaMinSize(area);
502
- area.maxSize = getAreaMaxSize(area);
503
- });
504
- break;
505
- }
506
- case 'pixel': {
507
- if (useUserSizes) {
508
- this.displayedAreas.forEach(area => {
509
- area.size = area.component.size;
510
- area.minSize = getAreaMinSize(area);
511
- area.maxSize = getAreaMaxSize(area);
512
- });
513
- }
514
- else {
515
- const wildcardSizeAreas = this.displayedAreas.filter(a => a.component.size === null);
516
- // No wildcard area > Need to select one arbitrarily > first
517
- if (wildcardSizeAreas.length === 0 && this.displayedAreas.length > 0) {
518
- this.displayedAreas.forEach((area, i) => {
519
- area.size = i === 0 ? null : area.component.size;
520
- area.minSize = i === 0 ? null : getAreaMinSize(area);
521
- area.maxSize = i === 0 ? null : getAreaMaxSize(area);
522
- });
523
- }
524
- // More than one wildcard area > Need to keep only one arbitrarly > first
525
- else if (wildcardSizeAreas.length > 1) {
526
- let alreadyGotOne = false;
527
- this.displayedAreas.forEach(area => {
528
- if (area.component.size === null) {
529
- if (alreadyGotOne === false) {
530
- area.size = null;
531
- area.minSize = null;
532
- area.maxSize = null;
533
- alreadyGotOne = true;
534
- }
535
- else {
536
- area.size = 100;
537
- area.minSize = null;
538
- area.maxSize = null;
539
- }
540
- }
541
- else {
542
- area.size = area.component.size;
543
- area.minSize = getAreaMinSize(area);
544
- area.maxSize = getAreaMaxSize(area);
545
- }
546
- });
547
- }
548
- }
549
- break;
550
- }
551
- }
552
- }
553
- this.refreshStyleSizes();
554
- this.cdRef.markForCheck();
555
- }
556
- refreshStyleSizes() {
557
- ///////////////////////////////////////////
558
- // PERCENT MODE
559
- if (this.unit === 'percent') {
560
- // Only one area > flex-basis 100%
561
- if (this.displayedAreas.length === 1) {
562
- this.displayedAreas[0].component.setStyleFlex(0, 0, `100%`, false, false);
563
- }
564
- // Multiple areas > use each percent basis
565
- else {
566
- const sumGutterSize = this.getNbGutters() * this.gutterSize;
567
- this.displayedAreas.forEach(area => {
568
- area.component.setStyleFlex(0, 0, `calc( ${area.size}% - ${(area.size / 100) * sumGutterSize}px )`, area.minSize !== null && area.minSize === area.size ? true : false, area.maxSize !== null && area.maxSize === area.size ? true : false);
569
- });
570
- }
571
- }
572
- ///////////////////////////////////////////
573
- // PIXEL MODE
574
- else if (this.unit === 'pixel') {
575
- this.displayedAreas.forEach(area => {
576
- // Area with wildcard size
577
- if (area.size === null) {
578
- if (this.displayedAreas.length === 1) {
579
- area.component.setStyleFlex(1, 1, `100%`, false, false);
580
- }
581
- else {
582
- area.component.setStyleFlex(1, 1, `auto`, false, false);
583
- }
584
- }
585
- // Area with pixel size
586
- else {
587
- // Only one area > flex-basis 100%
588
- if (this.displayedAreas.length === 1) {
589
- area.component.setStyleFlex(0, 0, `100%`, false, false);
590
- }
591
- // Multiple areas > use each pixel basis
592
- else {
593
- area.component.setStyleFlex(0, 0, `${area.size}px`, area.minSize !== null && area.minSize === area.size ? true : false, area.maxSize !== null && area.maxSize === area.size ? true : false);
594
- }
595
- }
596
- });
597
- }
598
- }
599
- clickGutter(event, gutterNum) {
600
- const tempPoint = getPointFromEvent(event);
601
- // Be sure mouseup/touchend happened at same point as mousedown/touchstart to trigger click/dblclick
602
- if (this.startPoint && this.startPoint.x === tempPoint.x && this.startPoint.y === tempPoint.y) {
603
- // If timeout in progress and new click > clearTimeout & dblClickEvent
604
- if (this._clickTimeout !== null) {
605
- window.clearTimeout(this._clickTimeout);
606
- this._clickTimeout = null;
607
- this.notify('dblclick', gutterNum);
608
- this.stopDragging();
609
- }
610
- // Else start timeout to call clickEvent at end
611
- else {
612
- this._clickTimeout = window.setTimeout(() => {
613
- this._clickTimeout = null;
614
- this.notify('click', gutterNum);
615
- this.stopDragging();
616
- }, this.gutterDblClickDuration);
617
- }
618
- }
619
- }
620
- startDragging(event, gutterOrder, gutterNum) {
621
- event.preventDefault();
622
- event.stopPropagation();
623
- this.startPoint = getPointFromEvent(event);
624
- if (this.startPoint === null || this.disabled === true) {
625
- return;
626
- }
627
- this.snapshot = {
628
- gutterNum,
629
- lastSteppedOffset: 0,
630
- allAreasSizePixel: getElementPixelSize(this.elRef, this.direction) - this.getNbGutters() * this.gutterSize,
631
- allInvolvedAreasSizePercent: 100,
632
- areasBeforeGutter: [],
633
- areasAfterGutter: [],
634
- };
635
- this.displayedAreas.forEach(area => {
636
- const areaSnapshot = {
637
- area,
638
- sizePixelAtStart: getElementPixelSize(area.component.elRef, this.direction),
639
- sizePercentAtStart: (this.unit === 'percent' ? area.size : -1), // If pixel mode, anyway, will not be used.
640
- };
641
- if (area.order < gutterOrder) {
642
- if (this.restrictMove === true) {
643
- this.snapshot.areasBeforeGutter = [areaSnapshot];
644
- }
645
- else {
646
- this.snapshot.areasBeforeGutter.unshift(areaSnapshot);
647
- }
648
- }
649
- else if (area.order > gutterOrder) {
650
- if (this.restrictMove === true) {
651
- if (this.snapshot.areasAfterGutter.length === 0) {
652
- this.snapshot.areasAfterGutter = [areaSnapshot];
653
- }
654
- }
655
- else {
656
- this.snapshot.areasAfterGutter.push(areaSnapshot);
657
- }
658
- }
659
- });
660
- this.snapshot.allInvolvedAreasSizePercent = [
661
- ...this.snapshot.areasBeforeGutter,
662
- ...this.snapshot.areasAfterGutter,
663
- ].reduce((t, a) => t + a.sizePercentAtStart, 0);
664
- if (this.snapshot.areasBeforeGutter.length === 0 ||
665
- this.snapshot.areasAfterGutter.length === 0) {
666
- return;
667
- }
668
- this.dragListeners.push(this.renderer.listen('document', 'mouseup', this.stopDragging.bind(this)));
669
- this.dragListeners.push(this.renderer.listen('document', 'touchend', this.stopDragging.bind(this)));
670
- this.dragListeners.push(this.renderer.listen('document', 'touchcancel', this.stopDragging.bind(this)));
671
- this.ngZone.runOutsideAngular(() => {
672
- this.dragListeners.push(this.renderer.listen('document', 'mousemove', this.dragEvent.bind(this)));
673
- this.dragListeners.push(this.renderer.listen('document', 'touchmove', this.dragEvent.bind(this)));
674
- });
675
- this.displayedAreas.forEach(area => area.component.lockEvents());
676
- this.isDragging = true;
677
- this.renderer.addClass(this.elRef.nativeElement, 'mtx-dragging');
678
- this.renderer.addClass(this.gutterEls.toArray()[this.snapshot.gutterNum - 1].nativeElement, 'mtx-dragged');
679
- this.notify('start', this.snapshot.gutterNum);
680
- }
681
- dragEvent(event) {
682
- event.preventDefault();
683
- event.stopPropagation();
684
- if (this._clickTimeout !== null) {
685
- window.clearTimeout(this._clickTimeout);
686
- this._clickTimeout = null;
687
- }
688
- if (this.isDragging === false) {
689
- return;
690
- }
691
- this.endPoint = getPointFromEvent(event);
692
- if (this.endPoint === null) {
693
- return;
694
- }
695
- // Calculate steppedOffset
696
- let offset = this.direction === 'horizontal'
697
- ? this.startPoint.x - this.endPoint.x
698
- : this.startPoint.y - this.endPoint.y;
699
- if (this.dir === 'rtl' && this.direction === 'horizontal') {
700
- offset = -offset;
701
- }
702
- const steppedOffset = Math.round(offset / this.gutterStep) * this.gutterStep;
703
- if (steppedOffset === this.snapshot.lastSteppedOffset) {
704
- return;
705
- }
706
- this.snapshot.lastSteppedOffset = steppedOffset;
707
- // Need to know if each gutter side areas could reacts to steppedOffset
708
- let areasBefore = getGutterSideAbsorptionCapacity(this.unit, this.snapshot.areasBeforeGutter, -steppedOffset, this.snapshot.allAreasSizePixel);
709
- let areasAfter = getGutterSideAbsorptionCapacity(this.unit, this.snapshot.areasAfterGutter, steppedOffset, this.snapshot.allAreasSizePixel);
710
- // Each gutter side areas can't absorb all offset
711
- if (areasBefore.remain !== 0 && areasAfter.remain !== 0) {
712
- if (Math.abs(areasBefore.remain) === Math.abs(areasAfter.remain)) {
713
- /** */
714
- }
715
- else if (Math.abs(areasBefore.remain) > Math.abs(areasAfter.remain)) {
716
- areasAfter = getGutterSideAbsorptionCapacity(this.unit, this.snapshot.areasAfterGutter, steppedOffset + areasBefore.remain, this.snapshot.allAreasSizePixel);
717
- }
718
- else {
719
- areasBefore = getGutterSideAbsorptionCapacity(this.unit, this.snapshot.areasBeforeGutter, -(steppedOffset - areasAfter.remain), this.snapshot.allAreasSizePixel);
720
- }
721
- }
722
- // Areas before gutter can't absorbs all offset > need to recalculate sizes for areas after gutter.
723
- else if (areasBefore.remain !== 0) {
724
- areasAfter = getGutterSideAbsorptionCapacity(this.unit, this.snapshot.areasAfterGutter, steppedOffset + areasBefore.remain, this.snapshot.allAreasSizePixel);
725
- }
726
- // Areas after gutter can't absorbs all offset > need to recalculate sizes for areas before gutter.
727
- else if (areasAfter.remain !== 0) {
728
- areasBefore = getGutterSideAbsorptionCapacity(this.unit, this.snapshot.areasBeforeGutter, -(steppedOffset - areasAfter.remain), this.snapshot.allAreasSizePixel);
729
- }
730
- if (this.unit === 'percent') {
731
- // Hack because of browser messing up with sizes using calc(X% - Ypx) -> el.getBoundingClientRect()
732
- // If not there, playing with gutters makes total going down to 99.99875% then 99.99286%, 99.98986%,..
733
- const all = [...areasBefore.list, ...areasAfter.list];
734
- const areaToReset = all.find(a => a.percentAfterAbsorption !== 0 &&
735
- a.percentAfterAbsorption !== a.areaSnapshot.area.minSize &&
736
- a.percentAfterAbsorption !== a.areaSnapshot.area.maxSize);
737
- if (areaToReset) {
738
- areaToReset.percentAfterAbsorption =
739
- this.snapshot.allInvolvedAreasSizePercent -
740
- all
741
- .filter(a => a !== areaToReset)
742
- .reduce((total, a) => total + a.percentAfterAbsorption, 0);
743
- }
744
- }
745
- // Now we know areas could absorb steppedOffset, time to really update sizes
746
- areasBefore.list.forEach(item => updateAreaSize(this.unit, item));
747
- areasAfter.list.forEach(item => updateAreaSize(this.unit, item));
748
- this.refreshStyleSizes();
749
- this.notify('progress', this.snapshot.gutterNum);
750
- }
751
- stopDragging(event) {
752
- if (event) {
753
- event.preventDefault();
754
- event.stopPropagation();
755
- }
756
- if (this.isDragging === false) {
757
- return;
758
- }
759
- this.displayedAreas.forEach(area => area.component.unlockEvents());
760
- while (this.dragListeners.length > 0) {
761
- const fct = this.dragListeners.pop();
762
- if (fct) {
763
- fct();
764
- }
765
- }
766
- // Warning: Have to be before "notify('end')"
767
- // because "notify('end')"" can be linked to "[size]='x'" > "build()" > "stopDragging()"
768
- this.isDragging = false;
769
- // If moved from starting point, notify end
770
- if (this.endPoint &&
771
- (this.startPoint.x !== this.endPoint.x ||
772
- this.startPoint.y !== this.endPoint.y)) {
773
- this.notify('end', this.snapshot.gutterNum);
774
- }
775
- this.renderer.removeClass(this.elRef.nativeElement, 'mtx-dragging');
776
- this.renderer.removeClass(this.gutterEls.toArray()[this.snapshot.gutterNum - 1].nativeElement, 'mtx-dragged');
777
- this.snapshot = null;
778
- // Needed to let (click)="clickGutter(...)" event run and verify if mouse moved or not
779
- this.ngZone.runOutsideAngular(() => {
780
- setTimeout(() => {
781
- this.startPoint = null;
782
- this.endPoint = null;
783
- });
784
- });
785
- }
786
- notify(type, gutterNum) {
787
- const sizes = this.getVisibleAreaSizes();
788
- if (type === 'start') {
789
- this.dragStart.emit({ gutterNum, sizes });
790
- }
791
- else if (type === 'end') {
792
- this.dragEnd.emit({ gutterNum, sizes });
793
- }
794
- else if (type === 'click') {
795
- this.gutterClick.emit({ gutterNum, sizes });
796
- }
797
- else if (type === 'dblclick') {
798
- this.gutterDblClick.emit({ gutterNum, sizes });
799
- }
800
- else if (type === 'transitionEnd') {
801
- if (this.transitionEndSubscriber) {
802
- this.ngZone.run(() => this.transitionEndSubscriber.next(sizes));
803
- }
804
- }
805
- else if (type === 'progress') {
806
- // Stay outside zone to allow users do what they want about change detection mechanism.
807
- this.dragProgressSubject.next({ gutterNum, sizes });
808
- }
809
- }
810
- ngOnDestroy() {
811
- this.stopDragging();
812
- }
813
- }
814
- /** @nocollapse */ MtxSplit.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: MtxSplit, deps: [{ token: i0.NgZone }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }, { token: MTX_SPLIT_DEFAULT_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Component });
815
- /** @nocollapse */ MtxSplit.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.1", type: MtxSplit, selector: "mtx-split", inputs: { color: "color", direction: "direction", unit: "unit", gutterSize: "gutterSize", gutterStep: "gutterStep", restrictMove: "restrictMove", useTransition: "useTransition", disabled: "disabled", dir: "dir", gutterDblClickDuration: "gutterDblClickDuration" }, outputs: { dragStart: "dragStart", dragEnd: "dragEnd", gutterClick: "gutterClick", gutterDblClick: "gutterDblClick", transitionEnd: "transitionEnd" }, host: { classAttribute: "mtx-split" }, viewQueries: [{ propertyName: "gutterEls", predicate: ["gutterEls"], descendants: true }], exportAs: ["mtxSplit"], usesInheritance: true, ngImport: i0, template: "<ng-content></ng-content>\r\n<ng-template ngFor [ngForOf]=\"displayedAreas\" let-index=\"index\" let-last=\"last\">\r\n <div #gutterEls class=\"mtx-split-gutter\" [ngClass]=\"['mat-' + color]\"\r\n *ngIf=\"last === false\"\r\n [style.flex-basis.px]=\"gutterSize\"\r\n [style.order]=\"index * 2 + 1\"\r\n (mousedown)=\"startDragging($event, index * 2 + 1, index + 1)\"\r\n (touchstart)=\"startDragging($event, index * 2 + 1, index + 1)\"\r\n (mouseup)=\"clickGutter($event, index + 1)\"\r\n (touchend)=\"clickGutter($event, index + 1)\">\r\n <div class=\"mtx-split-gutter-handle\"></div>\r\n </div>\r\n</ng-template>\r\n", styles: [".mtx-split{display:flex;flex-wrap:nowrap;justify-content:flex-start;align-items:stretch;overflow:hidden;width:100%;height:100%}.mtx-split>.mtx-split-gutter{position:relative;display:flex;flex-grow:0;flex-shrink:0;align-items:center;justify-content:center}.mtx-split>.mtx-split-gutter>.mtx-split-gutter-handle{position:absolute;opacity:0}.mtx-split>.mtx-split-pane{flex-grow:0;flex-shrink:0;overflow-x:hidden;overflow-y:auto}.mtx-split>.mtx-split-pane.mtx-split-pane-hidden{flex:0 1 0!important;overflow-x:hidden;overflow-y:hidden}.mtx-split.mtx-split-horizontal{flex-direction:row}.mtx-split.mtx-split-horizontal>.mtx-split-gutter{flex-direction:row;height:100%;cursor:col-resize}.mtx-split.mtx-split-horizontal>.mtx-split-gutter>.mtx-split-gutter-handle{width:8px;height:100%;left:-2px;right:2px}.mtx-split.mtx-split-horizontal>.mtx-split-pane{height:100%}.mtx-split.mtx-split-vertical{flex-direction:column}.mtx-split.mtx-split-vertical>.mtx-split-gutter{flex-direction:column;width:100%;cursor:row-resize}.mtx-split.mtx-split-vertical>.mtx-split-gutter>.mtx-split-gutter-handle{width:100%;height:8px;top:-2px;bottom:2px}.mtx-split.mtx-split-vertical>.mtx-split-pane{width:100%}.mtx-split.mtx-split-vertical>.mtx-split-pane.mtx-split-pane-hidden{max-width:0}.mtx-split.mtx-split-disabled>.mtx-split-gutter{cursor:default}.mtx-split.mtx-split-disabled>.mtx-split-gutter .mtx-split-gutter-handle{background-image:none}.mtx-split.mtx-split-transition.mtx-split-init:not(.mtx-dragging)>.mtx-split-gutter,.mtx-split.mtx-split-transition.mtx-split-init:not(.mtx-dragging)>.mtx-split-pane{transition:flex-basis .3s}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
816
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: MtxSplit, decorators: [{
817
- type: Component,
818
- args: [{ selector: 'mtx-split', exportAs: 'mtxSplit', host: {
819
- class: 'mtx-split',
820
- }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, inputs: ['color'], template: "<ng-content></ng-content>\r\n<ng-template ngFor [ngForOf]=\"displayedAreas\" let-index=\"index\" let-last=\"last\">\r\n <div #gutterEls class=\"mtx-split-gutter\" [ngClass]=\"['mat-' + color]\"\r\n *ngIf=\"last === false\"\r\n [style.flex-basis.px]=\"gutterSize\"\r\n [style.order]=\"index * 2 + 1\"\r\n (mousedown)=\"startDragging($event, index * 2 + 1, index + 1)\"\r\n (touchstart)=\"startDragging($event, index * 2 + 1, index + 1)\"\r\n (mouseup)=\"clickGutter($event, index + 1)\"\r\n (touchend)=\"clickGutter($event, index + 1)\">\r\n <div class=\"mtx-split-gutter-handle\"></div>\r\n </div>\r\n</ng-template>\r\n", styles: [".mtx-split{display:flex;flex-wrap:nowrap;justify-content:flex-start;align-items:stretch;overflow:hidden;width:100%;height:100%}.mtx-split>.mtx-split-gutter{position:relative;display:flex;flex-grow:0;flex-shrink:0;align-items:center;justify-content:center}.mtx-split>.mtx-split-gutter>.mtx-split-gutter-handle{position:absolute;opacity:0}.mtx-split>.mtx-split-pane{flex-grow:0;flex-shrink:0;overflow-x:hidden;overflow-y:auto}.mtx-split>.mtx-split-pane.mtx-split-pane-hidden{flex:0 1 0!important;overflow-x:hidden;overflow-y:hidden}.mtx-split.mtx-split-horizontal{flex-direction:row}.mtx-split.mtx-split-horizontal>.mtx-split-gutter{flex-direction:row;height:100%;cursor:col-resize}.mtx-split.mtx-split-horizontal>.mtx-split-gutter>.mtx-split-gutter-handle{width:8px;height:100%;left:-2px;right:2px}.mtx-split.mtx-split-horizontal>.mtx-split-pane{height:100%}.mtx-split.mtx-split-vertical{flex-direction:column}.mtx-split.mtx-split-vertical>.mtx-split-gutter{flex-direction:column;width:100%;cursor:row-resize}.mtx-split.mtx-split-vertical>.mtx-split-gutter>.mtx-split-gutter-handle{width:100%;height:8px;top:-2px;bottom:2px}.mtx-split.mtx-split-vertical>.mtx-split-pane{width:100%}.mtx-split.mtx-split-vertical>.mtx-split-pane.mtx-split-pane-hidden{max-width:0}.mtx-split.mtx-split-disabled>.mtx-split-gutter{cursor:default}.mtx-split.mtx-split-disabled>.mtx-split-gutter .mtx-split-gutter-handle{background-image:none}.mtx-split.mtx-split-transition.mtx-split-init:not(.mtx-dragging)>.mtx-split-gutter,.mtx-split.mtx-split-transition.mtx-split-init:not(.mtx-dragging)>.mtx-split-pane{transition:flex-basis .3s}\n"] }]
821
- }], ctorParameters: function () {
822
- return [{ type: i0.NgZone }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i0.Renderer2 }, { type: undefined, decorators: [{
823
- type: Optional
824
- }, {
825
- type: Inject,
826
- args: [MTX_SPLIT_DEFAULT_OPTIONS]
827
- }] }];
828
- }, propDecorators: { direction: [{
829
- type: Input
830
- }], unit: [{
831
- type: Input
832
- }], gutterSize: [{
833
- type: Input
834
- }], gutterStep: [{
835
- type: Input
836
- }], restrictMove: [{
837
- type: Input
838
- }], useTransition: [{
839
- type: Input
840
- }], disabled: [{
841
- type: Input
842
- }], dir: [{
843
- type: Input
844
- }], gutterDblClickDuration: [{
845
- type: Input
846
- }], dragStart: [{
847
- type: Output
848
- }], dragEnd: [{
849
- type: Output
850
- }], gutterClick: [{
851
- type: Output
852
- }], gutterDblClick: [{
853
- type: Output
854
- }], transitionEnd: [{
855
- type: Output
856
- }], gutterEls: [{
857
- type: ViewChildren,
858
- args: ['gutterEls']
859
- }] } });
860
-
861
- class MtxSplitPane {
862
- set order(v) {
863
- this._order = getInputPositiveNumber(v, null);
864
- this.split.updateArea(this, true, false);
865
- }
866
- get order() {
867
- return this._order;
868
- }
869
- set size(v) {
870
- this._size = getInputPositiveNumber(v, null);
871
- this.split.updateArea(this, false, true);
872
- }
873
- get size() {
874
- return this._size;
875
- }
876
- set minSize(v) {
877
- this._minSize = getInputPositiveNumber(v, null);
878
- this.split.updateArea(this, false, true);
879
- }
880
- get minSize() {
881
- return this._minSize;
882
- }
883
- set maxSize(v) {
884
- this._maxSize = getInputPositiveNumber(v, null);
885
- this.split.updateArea(this, false, true);
886
- }
887
- get maxSize() {
888
- return this._maxSize;
889
- }
890
- set lockSize(v) {
891
- this._lockSize = getInputBoolean(v);
892
- this.split.updateArea(this, false, true);
893
- }
894
- get lockSize() {
895
- return this._lockSize;
896
- }
897
- set visible(v) {
898
- this._visible = getInputBoolean(v);
899
- if (this._visible) {
900
- this.split.showArea(this);
901
- this.renderer.removeClass(this.elRef.nativeElement, 'mtx-split-pane-hidden');
902
- }
903
- else {
904
- this.split.hideArea(this);
905
- this.renderer.addClass(this.elRef.nativeElement, 'mtx-split-pane-hidden');
906
- }
907
- }
908
- get visible() {
909
- return this._visible;
910
- }
911
- constructor(ngZone, elRef, renderer, split) {
912
- this.ngZone = ngZone;
913
- this.elRef = elRef;
914
- this.renderer = renderer;
915
- this.split = split;
916
- this._order = null;
917
- ////
918
- this._size = null;
919
- ////
920
- this._minSize = null;
921
- ////
922
- this._maxSize = null;
923
- ////
924
- this._lockSize = false;
925
- ////
926
- this._visible = true;
927
- this.lockListeners = [];
928
- this.renderer.addClass(this.elRef.nativeElement, 'mtx-split-pane');
929
- }
930
- ngOnInit() {
931
- this.split.addArea(this);
932
- this.ngZone.runOutsideAngular(() => {
933
- this.transitionListener = this.renderer.listen(this.elRef.nativeElement, 'transitionend', (event) => {
934
- // Limit only flex-basis transition to trigger the event
935
- if (event.propertyName === 'flex-basis') {
936
- this.split.notify('transitionEnd', -1);
937
- }
938
- });
939
- });
940
- }
941
- setStyleOrder(value) {
942
- this.renderer.setStyle(this.elRef.nativeElement, 'order', value);
943
- }
944
- setStyleFlex(grow, shrink, basis, isMin, isMax) {
945
- // Need 3 separated properties to work on IE11 (https://github.com/angular/flex-layout/issues/323)
946
- this.renderer.setStyle(this.elRef.nativeElement, 'flex-grow', grow);
947
- this.renderer.setStyle(this.elRef.nativeElement, 'flex-shrink', shrink);
948
- this.renderer.setStyle(this.elRef.nativeElement, 'flex-basis', basis);
949
- if (isMin === true) {
950
- this.renderer.addClass(this.elRef.nativeElement, 'mtx-min');
951
- }
952
- else {
953
- this.renderer.removeClass(this.elRef.nativeElement, 'mtx-min');
954
- }
955
- if (isMax === true) {
956
- this.renderer.addClass(this.elRef.nativeElement, 'mtx-max');
957
- }
958
- else {
959
- this.renderer.removeClass(this.elRef.nativeElement, 'mtx-max');
960
- }
961
- }
962
- lockEvents() {
963
- this.ngZone.runOutsideAngular(() => {
964
- this.lockListeners.push(this.renderer.listen(this.elRef.nativeElement, 'selectstart', (e) => false));
965
- this.lockListeners.push(this.renderer.listen(this.elRef.nativeElement, 'dragstart', (e) => false));
966
- });
967
- }
968
- unlockEvents() {
969
- while (this.lockListeners.length > 0) {
970
- const fct = this.lockListeners.pop();
971
- if (fct) {
972
- fct();
973
- }
974
- }
975
- }
976
- ngOnDestroy() {
977
- this.unlockEvents();
978
- if (this.transitionListener) {
979
- this.transitionListener();
980
- }
981
- this.split.removeArea(this);
982
- }
983
- }
984
- /** @nocollapse */ MtxSplitPane.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: MtxSplitPane, deps: [{ token: i0.NgZone }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: MtxSplit }], target: i0.ɵɵFactoryTarget.Directive });
985
- /** @nocollapse */ MtxSplitPane.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.1", type: MtxSplitPane, selector: "mtx-split-pane, [mtx-split-pane]", inputs: { order: "order", size: "size", minSize: "minSize", maxSize: "maxSize", lockSize: "lockSize", visible: "visible" }, exportAs: ["mtxSplitPane"], ngImport: i0 });
986
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: MtxSplitPane, decorators: [{
987
- type: Directive,
988
- args: [{
989
- selector: 'mtx-split-pane, [mtx-split-pane]',
990
- exportAs: 'mtxSplitPane',
991
- }]
992
- }], ctorParameters: function () { return [{ type: i0.NgZone }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: MtxSplit }]; }, propDecorators: { order: [{
993
- type: Input
994
- }], size: [{
995
- type: Input
996
- }], minSize: [{
997
- type: Input
998
- }], maxSize: [{
999
- type: Input
1000
- }], lockSize: [{
1001
- type: Input
1002
- }], visible: [{
1003
- type: Input
1004
- }] } });
1005
-
1006
- class MtxSplitModule {
1007
- }
1008
- /** @nocollapse */ MtxSplitModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: MtxSplitModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1009
- /** @nocollapse */ MtxSplitModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.1", ngImport: i0, type: MtxSplitModule, declarations: [MtxSplit, MtxSplitPane], imports: [CommonModule], exports: [MtxSplit, MtxSplitPane] });
1010
- /** @nocollapse */ MtxSplitModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: MtxSplitModule, imports: [CommonModule] });
1011
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: MtxSplitModule, decorators: [{
1012
- type: NgModule,
1013
- args: [{
1014
- imports: [CommonModule],
1015
- declarations: [MtxSplit, MtxSplitPane],
1016
- exports: [MtxSplit, MtxSplitPane],
1017
- }]
1018
- }] });
1019
-
1020
- /**
1021
- * Generated bundle index. Do not edit.
1022
- */
1023
-
1024
- export { MTX_SPLIT_DEFAULT_OPTIONS, MtxSplit, MtxSplitModule, MtxSplitPane, getAreaAbsorptionCapacity, getAreaAbsorptionCapacityPercent, getAreaAbsorptionCapacityPixel, getAreaMaxSize, getAreaMinSize, getElementPixelSize, getGutterSideAbsorptionCapacity, getInputBoolean, getInputPositiveNumber, getPointFromEvent, isUserSizesValid, updateAreaSize };
1025
- //# sourceMappingURL=mtxSplit.mjs.map