@ng-matero/extensions 12.7.0 → 13.0.2

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 (537) hide show
  1. package/README.md +2 -16
  2. package/_all-color.scss +1 -1
  3. package/_index.scss +1 -1
  4. package/_theming.scss +1 -1
  5. package/alert/_alert-theme.scss +2 -2
  6. package/alert/alert.component.d.ts +3 -0
  7. package/alert/alert.module.d.ts +6 -0
  8. package/alert/mtxAlert.d.ts +1 -0
  9. package/alert/package.json +5 -6
  10. package/button/button-loading.directive.d.ts +3 -0
  11. package/button/button.module.d.ts +8 -0
  12. package/button/mtxButton.d.ts +1 -0
  13. package/button/package.json +5 -6
  14. package/checkbox-group/checkbox-group.component.d.ts +3 -0
  15. package/checkbox-group/checkbox-group.module.d.ts +9 -0
  16. package/checkbox-group/mtxCheckboxGroup.d.ts +1 -0
  17. package/checkbox-group/package.json +5 -6
  18. package/colorpicker/_colorpicker-theme.scss +2 -2
  19. package/colorpicker/colorpicker-input.d.ts +3 -0
  20. package/colorpicker/colorpicker-module.d.ts +13 -0
  21. package/colorpicker/colorpicker-toggle.d.ts +5 -0
  22. package/colorpicker/colorpicker.d.ts +6 -1
  23. package/colorpicker/mtxColorpicker.d.ts +1 -0
  24. package/colorpicker/package.json +5 -6
  25. package/column-resize/column-resize-directives/column-resize-flex.d.ts +3 -0
  26. package/column-resize/column-resize-directives/column-resize.d.ts +3 -0
  27. package/column-resize/column-resize-module.d.ts +6 -7
  28. package/column-resize/column-resize-notifier.d.ts +5 -7
  29. package/column-resize/column-resize.d.ts +3 -0
  30. package/column-resize/column-size-store.d.ts +3 -7
  31. package/column-resize/event-dispatcher.d.ts +3 -0
  32. package/column-resize/mtxColumnResize.d.ts +1 -0
  33. package/column-resize/overlay-handle.d.ts +3 -0
  34. package/column-resize/package.json +5 -6
  35. package/column-resize/resizable.d.ts +3 -0
  36. package/column-resize/resize-strategy.d.ts +7 -0
  37. package/core/datetime/datetime.module.d.ts +8 -0
  38. package/core/datetime/native-datetime-adapter.d.ts +3 -0
  39. package/core/density/private/_compatibility.scss +74 -0
  40. package/core/mtxCore.d.ts +1 -0
  41. package/core/package.json +5 -6
  42. package/{pipes/public-api.d.ts → core/pipes/index.d.ts} +0 -0
  43. package/core/pipes/pipes.module.d.ts +8 -0
  44. package/{pipes → core/pipes}/to-observable.pipe.d.ts +3 -0
  45. package/core/public-api.d.ts +1 -0
  46. package/core/style/_elevation.scss +197 -0
  47. package/core/style/_private.scss +41 -0
  48. package/core/style/_variables.scss +44 -0
  49. package/core/style/_vendor-prefixes.scss +60 -0
  50. package/core/theming/_palette.scss +746 -0
  51. package/core/theming/_theming.scss +430 -0
  52. package/core/typography/_typography-utils.scss +101 -0
  53. package/core/typography/_typography.scss +273 -0
  54. package/datetimepicker/_datetimepicker-theme.scss +5 -5
  55. package/datetimepicker/calendar-body.d.ts +3 -0
  56. package/datetimepicker/calendar-body.scss +5 -4
  57. package/datetimepicker/calendar.d.ts +4 -1
  58. package/datetimepicker/clock.d.ts +3 -0
  59. package/datetimepicker/datetimepicker-input.d.ts +3 -0
  60. package/datetimepicker/datetimepicker-module.d.ts +18 -0
  61. package/datetimepicker/datetimepicker-toggle.d.ts +5 -0
  62. package/datetimepicker/datetimepicker-types.d.ts +1 -0
  63. package/datetimepicker/datetimepicker.d.ts +7 -2
  64. package/datetimepicker/month-view.d.ts +4 -1
  65. package/datetimepicker/mtxDatetimepicker.d.ts +1 -0
  66. package/datetimepicker/multi-year-view.d.ts +4 -1
  67. package/datetimepicker/package.json +5 -6
  68. package/datetimepicker/public-api.d.ts +1 -0
  69. package/datetimepicker/year-view.d.ts +4 -1
  70. package/dialog/dialog.component.d.ts +3 -0
  71. package/dialog/dialog.d.ts +3 -0
  72. package/dialog/dialog.module.d.ts +10 -0
  73. package/dialog/mtxDialog.d.ts +1 -0
  74. package/dialog/package.json +5 -6
  75. package/esm2020/alert/alert.component.mjs +52 -0
  76. package/esm2020/alert/alert.module.mjs +18 -0
  77. package/{esm2015/alert/mtxAlert.js → esm2020/alert/mtxAlert.mjs} +0 -0
  78. package/{esm2015/alert/public-api.js → esm2020/alert/public-api.mjs} +0 -0
  79. package/esm2020/button/button-loading.directive.mjs +79 -0
  80. package/esm2020/button/button.module.mjs +20 -0
  81. package/{esm2015/button/mtxButton.js → esm2020/button/mtxButton.mjs} +0 -0
  82. package/{esm2015/button/public-api.js → esm2020/button/public-api.mjs} +0 -0
  83. package/esm2020/checkbox-group/checkbox-group.component.mjs +234 -0
  84. package/{esm2015/checkbox-group/checkbox-group.interface.js → esm2020/checkbox-group/checkbox-group.interface.mjs} +0 -0
  85. package/esm2020/checkbox-group/checkbox-group.module.mjs +21 -0
  86. package/{esm2015/checkbox-group/mtxCheckboxGroup.js → esm2020/checkbox-group/mtxCheckboxGroup.mjs} +0 -0
  87. package/{esm2015/checkbox-group/public-api.js → esm2020/checkbox-group/public-api.mjs} +0 -0
  88. package/{esm2015/colorpicker/colorpicker-animations.js → esm2020/colorpicker/colorpicker-animations.mjs} +0 -0
  89. package/esm2020/colorpicker/colorpicker-input.mjs +228 -0
  90. package/esm2020/colorpicker/colorpicker-module.mjs +65 -0
  91. package/esm2020/colorpicker/colorpicker-toggle.mjs +90 -0
  92. package/esm2020/colorpicker/colorpicker.mjs +363 -0
  93. package/{esm2015/colorpicker/mtxColorpicker.js → esm2020/colorpicker/mtxColorpicker.mjs} +0 -0
  94. package/{esm2015/colorpicker/public-api.js → esm2020/colorpicker/public-api.mjs} +0 -0
  95. package/esm2020/column-resize/column-resize-directives/column-resize-flex.mjs +45 -0
  96. package/esm2020/column-resize/column-resize-directives/column-resize.mjs +45 -0
  97. package/{esm2015/column-resize/column-resize-directives/constants.js → esm2020/column-resize/column-resize-directives/constants.mjs} +0 -0
  98. package/esm2020/column-resize/column-resize-module.mjs +28 -0
  99. package/esm2020/column-resize/column-resize-notifier.mjs +47 -0
  100. package/esm2020/column-resize/column-resize.mjs +82 -0
  101. package/esm2020/column-resize/column-size-store.mjs +20 -0
  102. package/esm2020/column-resize/event-dispatcher.mjs +67 -0
  103. package/{esm2015/column-resize/mtxColumnResize.js → esm2020/column-resize/mtxColumnResize.mjs} +0 -0
  104. package/esm2020/column-resize/overlay-handle.mjs +146 -0
  105. package/{esm2015/column-resize/polyfill.js → esm2020/column-resize/polyfill.mjs} +0 -0
  106. package/{esm2015/column-resize/public-api.js → esm2020/column-resize/public-api.mjs} +0 -0
  107. package/esm2020/column-resize/resizable.mjs +199 -0
  108. package/{esm2015/column-resize/resize-ref.js → esm2020/column-resize/resize-ref.mjs} +0 -0
  109. package/esm2020/column-resize/resize-strategy.mjs +232 -0
  110. package/{esm2015/column-resize/selectors.js → esm2020/column-resize/selectors.mjs} +0 -0
  111. package/{esm2015/core/datetime/datetime-adapter.js → esm2020/core/datetime/datetime-adapter.mjs} +0 -0
  112. package/{esm2015/core/datetime/datetime-formats.js → esm2020/core/datetime/datetime-formats.mjs} +0 -0
  113. package/esm2020/core/datetime/datetime.module.mjs +42 -0
  114. package/{esm2015/core/datetime/index.js → esm2020/core/datetime/index.mjs} +0 -0
  115. package/esm2020/core/datetime/native-datetime-adapter.mjs +138 -0
  116. package/{esm2015/core/datetime/native-datetime-formats.js → esm2020/core/datetime/native-datetime-formats.mjs} +0 -0
  117. package/{esm2015/core/mtxCore.js → esm2020/core/mtxCore.mjs} +0 -0
  118. package/esm2020/core/pipes/index.mjs +3 -0
  119. package/esm2020/core/pipes/pipes.module.mjs +18 -0
  120. package/esm2020/core/pipes/to-observable.pipe.mjs +15 -0
  121. package/{esm2015/core/public-api.js → esm2020/core/public-api.mjs} +2 -1
  122. package/esm2020/datetimepicker/calendar-body.mjs +78 -0
  123. package/esm2020/datetimepicker/calendar.mjs +618 -0
  124. package/esm2020/datetimepicker/clock.mjs +277 -0
  125. package/{esm2015/datetimepicker/datetimepicker-animations.js → esm2020/datetimepicker/datetimepicker-animations.mjs} +0 -0
  126. package/{esm2015/datetimepicker/datetimepicker-errors.js → esm2020/datetimepicker/datetimepicker-errors.mjs} +0 -0
  127. package/{esm2015/datetimepicker/datetimepicker-filtertype.js → esm2020/datetimepicker/datetimepicker-filtertype.mjs} +0 -0
  128. package/esm2020/datetimepicker/datetimepicker-input.mjs +344 -0
  129. package/esm2020/datetimepicker/datetimepicker-module.mjs +75 -0
  130. package/esm2020/datetimepicker/datetimepicker-toggle.mjs +94 -0
  131. package/esm2020/datetimepicker/datetimepicker-types.mjs +2 -0
  132. package/esm2020/datetimepicker/datetimepicker.mjs +492 -0
  133. package/esm2020/datetimepicker/month-view.mjs +148 -0
  134. package/{esm2015/datetimepicker/mtxDatetimepicker.js → esm2020/datetimepicker/mtxDatetimepicker.mjs} +0 -0
  135. package/esm2020/datetimepicker/multi-year-view.mjs +214 -0
  136. package/{esm2015/datetimepicker/public-api.js → esm2020/datetimepicker/public-api.mjs} +2 -1
  137. package/esm2020/datetimepicker/year-view.mjs +138 -0
  138. package/{esm2015/dialog/dialog-config.js → esm2020/dialog/dialog-config.mjs} +0 -0
  139. package/esm2020/dialog/dialog.component.mjs +33 -0
  140. package/esm2020/dialog/dialog.mjs +74 -0
  141. package/esm2020/dialog/dialog.module.mjs +24 -0
  142. package/{esm2015/dialog/mtxDialog.js → esm2020/dialog/mtxDialog.mjs} +0 -0
  143. package/{esm2015/dialog/public-api.js → esm2020/dialog/public-api.mjs} +0 -0
  144. package/esm2020/form-group/form-group.component.mjs +37 -0
  145. package/esm2020/form-group/form-group.module.mjs +18 -0
  146. package/{esm2015/form-group/mtxFormGroup.js → esm2020/form-group/mtxFormGroup.mjs} +0 -0
  147. package/{esm2015/form-group/public-api.js → esm2020/form-group/public-api.mjs} +0 -0
  148. package/esm2020/grid/cell.component.mjs +108 -0
  149. package/esm2020/grid/column-menu.component.mjs +95 -0
  150. package/esm2020/grid/column-resize/column-resize-directives/column-resize-flex.mjs +37 -0
  151. package/esm2020/grid/column-resize/column-resize-directives/column-resize.mjs +37 -0
  152. package/{esm2015/grid/column-resize/column-resize-directives/common.js → esm2020/grid/column-resize/column-resize-directives/common.mjs} +0 -0
  153. package/esm2020/grid/column-resize/column-resize-module.mjs +42 -0
  154. package/esm2020/grid/column-resize/overlay-handle.mjs +60 -0
  155. package/{esm2015/grid/column-resize/resizable-directives/common.js → esm2020/grid/column-resize/resizable-directives/common.mjs} +0 -0
  156. package/esm2020/grid/column-resize/resizable-directives/resizable.mjs +62 -0
  157. package/esm2020/grid/column-resize/resize-strategy.mjs +42 -0
  158. package/esm2020/grid/expansion-toggle.directive.mjs +64 -0
  159. package/esm2020/grid/grid.component.mjs +556 -0
  160. package/{esm2015/grid/grid.interface.js → esm2020/grid/grid.interface.mjs} +0 -0
  161. package/esm2020/grid/grid.module.mjs +117 -0
  162. package/esm2020/grid/grid.service.mjs +44 -0
  163. package/{esm2015/grid/mtxGrid.js → esm2020/grid/mtxGrid.mjs} +0 -0
  164. package/esm2020/grid/public-api.mjs +16 -0
  165. package/esm2020/loader/loader.component.mjs +63 -0
  166. package/esm2020/loader/loader.module.mjs +20 -0
  167. package/{esm2015/loader/mtxLoader.js → esm2020/loader/mtxLoader.mjs} +0 -0
  168. package/{esm2015/loader/public-api.js → esm2020/loader/public-api.mjs} +0 -0
  169. package/esm2020/ng-matero-extensions.mjs +5 -0
  170. package/{esm2015/popover/mtxPopover.js → esm2020/popover/mtxPopover.mjs} +0 -0
  171. package/{esm2015/popover/popover-animations.js → esm2020/popover/popover-animations.mjs} +0 -0
  172. package/{esm2015/popover/popover-errors.js → esm2020/popover/popover-errors.mjs} +0 -0
  173. package/{esm2015/popover/popover-interfaces.js → esm2020/popover/popover-interfaces.mjs} +0 -0
  174. package/esm2020/popover/popover-module.mjs +22 -0
  175. package/esm2020/popover/popover-target.mjs +17 -0
  176. package/esm2020/popover/popover-trigger.mjs +441 -0
  177. package/{esm2015/popover/popover-types.js → esm2020/popover/popover-types.mjs} +0 -0
  178. package/esm2020/popover/popover.mjs +334 -0
  179. package/{esm2015/popover/public-api.js → esm2020/popover/public-api.mjs} +0 -0
  180. package/{esm2015/progress/mtxProgress.js → esm2020/progress/mtxProgress.mjs} +0 -0
  181. package/esm2020/progress/progress.component.mjs +55 -0
  182. package/esm2020/progress/progress.module.mjs +18 -0
  183. package/{esm2015/progress/public-api.js → esm2020/progress/public-api.mjs} +0 -0
  184. package/esm2020/public-api.mjs +5 -0
  185. package/{esm2015/select/mtxSelect.js → esm2020/select/mtxSelect.mjs} +0 -0
  186. package/{esm2015/select/option.component.js → esm2020/select/option.component.mjs} +18 -26
  187. package/{esm2015/select/public-api.js → esm2020/select/public-api.mjs} +0 -0
  188. package/esm2020/select/select.component.mjs +459 -0
  189. package/esm2020/select/select.module.mjs +74 -0
  190. package/esm2020/select/templates.directive.mjs +124 -0
  191. package/{esm2015/slider/mtxSlider.js → esm2020/slider/mtxSlider.mjs} +0 -0
  192. package/{esm2015/slider/public-api.js → esm2020/slider/public-api.mjs} +0 -0
  193. package/esm2020/slider/slider-module.mjs +19 -0
  194. package/esm2020/slider/slider.mjs +1115 -0
  195. package/{esm2015/split/interface.js → esm2020/split/interface.mjs} +0 -0
  196. package/{esm2015/split/mtxSplit.js → esm2020/split/mtxSplit.mjs} +0 -0
  197. package/{esm2015/split/public-api.js → esm2020/split/public-api.mjs} +0 -0
  198. package/esm2020/split/split-pane.directive.mjs +149 -0
  199. package/esm2020/split/split.component.mjs +619 -0
  200. package/esm2020/split/split.module.mjs +19 -0
  201. package/{esm2015/split/utils.js → esm2020/split/utils.mjs} +0 -0
  202. package/{esm2015/text3d/mtxText3d.js → esm2020/text3d/mtxText3d.mjs} +0 -0
  203. package/{esm2015/text3d/public-api.js → esm2020/text3d/public-api.mjs} +0 -0
  204. package/esm2020/text3d/text3d.component.mjs +45 -0
  205. package/esm2020/text3d/text3d.module.mjs +18 -0
  206. package/{esm2015/tooltip/mtxTooltip.js → esm2020/tooltip/mtxTooltip.mjs} +0 -0
  207. package/{esm2015/tooltip/public-api.js → esm2020/tooltip/public-api.mjs} +0 -0
  208. package/{esm2015/tooltip/tooltip-animations.js → esm2020/tooltip/tooltip-animations.mjs} +0 -0
  209. package/esm2020/tooltip/tooltip-module.mjs +23 -0
  210. package/esm2020/tooltip/tooltip.mjs +674 -0
  211. package/fesm2015/mtxAlert.mjs +74 -0
  212. package/fesm2015/mtxAlert.mjs.map +1 -0
  213. package/fesm2015/mtxButton.mjs +102 -0
  214. package/fesm2015/mtxButton.mjs.map +1 -0
  215. package/fesm2015/mtxCheckboxGroup.mjs +257 -0
  216. package/fesm2015/mtxCheckboxGroup.mjs.map +1 -0
  217. package/fesm2015/mtxColorpicker.mjs +754 -0
  218. package/fesm2015/mtxColorpicker.mjs.map +1 -0
  219. package/fesm2015/{mtxColumnResize.js → mtxColumnResize.mjs} +108 -145
  220. package/fesm2015/mtxColumnResize.mjs.map +1 -0
  221. package/fesm2015/mtxCore.mjs +362 -0
  222. package/fesm2015/mtxCore.mjs.map +1 -0
  223. package/fesm2015/mtxDatetimepicker.mjs +2474 -0
  224. package/fesm2015/mtxDatetimepicker.mjs.map +1 -0
  225. package/fesm2015/mtxDialog.mjs +128 -0
  226. package/fesm2015/mtxDialog.mjs.map +1 -0
  227. package/fesm2015/mtxFormGroup.mjs +59 -0
  228. package/fesm2015/mtxFormGroup.mjs.map +1 -0
  229. package/fesm2015/mtxGrid.mjs +1271 -0
  230. package/fesm2015/mtxGrid.mjs.map +1 -0
  231. package/fesm2015/mtxLoader.mjs +87 -0
  232. package/fesm2015/mtxLoader.mjs.map +1 -0
  233. package/fesm2015/mtxPopover.mjs +865 -0
  234. package/fesm2015/mtxPopover.mjs.map +1 -0
  235. package/fesm2015/mtxProgress.mjs +77 -0
  236. package/fesm2015/mtxProgress.mjs.map +1 -0
  237. package/fesm2015/mtxSelect.mjs +713 -0
  238. package/fesm2015/mtxSelect.mjs.map +1 -0
  239. package/fesm2015/mtxSlider.mjs +1139 -0
  240. package/fesm2015/mtxSlider.mjs.map +1 -0
  241. package/fesm2015/{mtxSplit.js → mtxSplit.mjs} +75 -85
  242. package/fesm2015/mtxSplit.mjs.map +1 -0
  243. package/fesm2015/mtxText3d.mjs +67 -0
  244. package/fesm2015/mtxText3d.mjs.map +1 -0
  245. package/fesm2015/{mtxTooltip.js → mtxTooltip.mjs} +83 -86
  246. package/fesm2015/mtxTooltip.mjs.map +1 -0
  247. package/fesm2015/ng-matero-extensions.mjs +9 -0
  248. package/fesm2015/ng-matero-extensions.mjs.map +1 -0
  249. package/fesm2020/mtxAlert.mjs +74 -0
  250. package/fesm2020/mtxAlert.mjs.map +1 -0
  251. package/fesm2020/mtxButton.mjs +102 -0
  252. package/fesm2020/mtxButton.mjs.map +1 -0
  253. package/fesm2020/mtxCheckboxGroup.mjs +257 -0
  254. package/fesm2020/mtxCheckboxGroup.mjs.map +1 -0
  255. package/{fesm2015/mtxColorpicker.js → fesm2020/mtxColorpicker.mjs} +420 -413
  256. package/fesm2020/mtxColorpicker.mjs.map +1 -0
  257. package/fesm2020/mtxColumnResize.mjs +953 -0
  258. package/fesm2020/mtxColumnResize.mjs.map +1 -0
  259. package/{fesm2015/mtxCore.js → fesm2020/mtxCore.mjs} +75 -42
  260. package/fesm2020/mtxCore.mjs.map +1 -0
  261. package/{fesm2015/mtxDatetimepicker.js → fesm2020/mtxDatetimepicker.mjs} +1300 -1306
  262. package/fesm2020/mtxDatetimepicker.mjs.map +1 -0
  263. package/fesm2020/mtxDialog.mjs +129 -0
  264. package/fesm2020/mtxDialog.mjs.map +1 -0
  265. package/fesm2020/mtxFormGroup.mjs +59 -0
  266. package/fesm2020/mtxFormGroup.mjs.map +1 -0
  267. package/fesm2020/mtxGrid.mjs +1259 -0
  268. package/fesm2020/mtxGrid.mjs.map +1 -0
  269. package/fesm2020/mtxLoader.mjs +87 -0
  270. package/fesm2020/mtxLoader.mjs.map +1 -0
  271. package/{fesm2015/mtxPopover.js → fesm2020/mtxPopover.mjs} +120 -111
  272. package/fesm2020/mtxPopover.mjs.map +1 -0
  273. package/fesm2020/mtxProgress.mjs +77 -0
  274. package/fesm2020/mtxProgress.mjs.map +1 -0
  275. package/fesm2020/mtxSelect.mjs +710 -0
  276. package/fesm2020/mtxSelect.mjs.map +1 -0
  277. package/{fesm2015/mtxSlider.js → fesm2020/mtxSlider.mjs} +97 -94
  278. package/fesm2020/mtxSlider.mjs.map +1 -0
  279. package/fesm2020/mtxSplit.mjs +1007 -0
  280. package/fesm2020/mtxSplit.mjs.map +1 -0
  281. package/fesm2020/mtxText3d.mjs +67 -0
  282. package/fesm2020/mtxText3d.mjs.map +1 -0
  283. package/fesm2020/mtxTooltip.mjs +718 -0
  284. package/fesm2020/mtxTooltip.mjs.map +1 -0
  285. package/fesm2020/ng-matero-extensions.mjs +9 -0
  286. package/fesm2020/ng-matero-extensions.mjs.map +1 -0
  287. package/form-group/_form-group-theme.scss +1 -1
  288. package/form-group/form-group.component.d.ts +3 -0
  289. package/form-group/form-group.module.d.ts +6 -0
  290. package/form-group/mtxFormGroup.d.ts +1 -0
  291. package/form-group/package.json +5 -6
  292. package/grid/_grid-theme.scss +1 -1
  293. package/grid/cell.component.d.ts +3 -0
  294. package/grid/column-menu.component.d.ts +3 -0
  295. package/grid/column-menu.component.scss +1 -1
  296. package/grid/column-resize/_column-resize.scss +3 -3
  297. package/grid/column-resize/column-resize-directives/column-resize-flex.d.ts +3 -0
  298. package/grid/column-resize/column-resize-directives/column-resize.d.ts +3 -0
  299. package/grid/column-resize/column-resize-module.d.ts +12 -7
  300. package/grid/column-resize/overlay-handle.d.ts +3 -0
  301. package/grid/column-resize/resizable-directives/resizable.d.ts +3 -0
  302. package/grid/column-resize/resize-strategy.d.ts +3 -0
  303. package/grid/expansion-toggle.directive.d.ts +3 -0
  304. package/grid/grid.component.d.ts +20 -1
  305. package/grid/grid.module.d.ts +26 -0
  306. package/grid/grid.service.d.ts +3 -0
  307. package/grid/mtxGrid.d.ts +1 -0
  308. package/grid/package.json +5 -6
  309. package/grid/public-api.d.ts +0 -1
  310. package/loader/_loader-theme.scss +1 -1
  311. package/loader/loader.component.d.ts +3 -0
  312. package/loader/loader.module.d.ts +8 -0
  313. package/loader/mtxLoader.d.ts +1 -0
  314. package/loader/package.json +5 -6
  315. package/{extensions.d.ts → ng-matero-extensions.d.ts} +1 -0
  316. package/package.json +178 -15
  317. package/popover/_popover-theme.scss +1 -1
  318. package/popover/mtxPopover.d.ts +1 -0
  319. package/popover/package.json +5 -6
  320. package/popover/popover-module.d.ts +10 -0
  321. package/popover/popover-target.d.ts +3 -0
  322. package/popover/popover-trigger.d.ts +3 -0
  323. package/popover/popover.d.ts +3 -0
  324. package/progress/_progress-theme.scss +2 -2
  325. package/progress/mtxProgress.d.ts +1 -0
  326. package/progress/package.json +5 -6
  327. package/progress/progress.component.d.ts +3 -0
  328. package/progress/progress.module.d.ts +6 -0
  329. package/public-api.d.ts +2 -19
  330. package/select/_select-theme.scss +1 -1
  331. package/select/mtxSelect.d.ts +1 -0
  332. package/select/option.component.d.ts +3 -0
  333. package/select/package.json +5 -6
  334. package/select/select.component.d.ts +3 -0
  335. package/select/select.component.scss +1 -1
  336. package/select/select.module.d.ts +10 -0
  337. package/select/templates.directive.d.ts +23 -0
  338. package/slider/_slider-theme.scss +4 -4
  339. package/slider/mtxSlider.d.ts +1 -0
  340. package/slider/package.json +5 -6
  341. package/slider/slider-module.d.ts +7 -0
  342. package/slider/slider.d.ts +4 -1
  343. package/slider/slider.scss +7 -7
  344. package/split/_split-theme.scss +1 -1
  345. package/split/mtxSplit.d.ts +1 -0
  346. package/split/package.json +5 -6
  347. package/split/split-pane.directive.d.ts +3 -0
  348. package/split/split.component.d.ts +4 -1
  349. package/split/split.module.d.ts +7 -0
  350. package/text3d/_text3d-theme.scss +2 -2
  351. package/text3d/mtxText3d.d.ts +1 -0
  352. package/text3d/package.json +5 -6
  353. package/text3d/text3d.component.d.ts +3 -0
  354. package/text3d/text3d.module.d.ts +6 -0
  355. package/tooltip/_tooltip-theme.scss +3 -3
  356. package/tooltip/mtxTooltip.d.ts +1 -0
  357. package/tooltip/package.json +5 -6
  358. package/tooltip/tooltip-module.d.ts +10 -0
  359. package/tooltip/tooltip.d.ts +5 -0
  360. package/tooltip/tooltip.scss +1 -1
  361. package/alert/mtxAlert.metadata.json +0 -1
  362. package/bundles/extensions.umd.js +0 -164
  363. package/bundles/extensions.umd.js.map +0 -1
  364. package/bundles/mtxAlert.umd.js +0 -101
  365. package/bundles/mtxAlert.umd.js.map +0 -1
  366. package/bundles/mtxButton.umd.js +0 -119
  367. package/bundles/mtxButton.umd.js.map +0 -1
  368. package/bundles/mtxCheckboxGroup.umd.js +0 -284
  369. package/bundles/mtxCheckboxGroup.umd.js.map +0 -1
  370. package/bundles/mtxColorpicker.umd.js +0 -1123
  371. package/bundles/mtxColorpicker.umd.js.map +0 -1
  372. package/bundles/mtxColumnResize.umd.js +0 -1339
  373. package/bundles/mtxColumnResize.umd.js.map +0 -1
  374. package/bundles/mtxCore.umd.js +0 -670
  375. package/bundles/mtxCore.umd.js.map +0 -1
  376. package/bundles/mtxDatetimepicker.umd.js +0 -3045
  377. package/bundles/mtxDatetimepicker.umd.js.map +0 -1
  378. package/bundles/mtxDialog.umd.js +0 -158
  379. package/bundles/mtxDialog.umd.js.map +0 -1
  380. package/bundles/mtxFormGroup.umd.js +0 -73
  381. package/bundles/mtxFormGroup.umd.js.map +0 -1
  382. package/bundles/mtxGrid.umd.js +0 -1581
  383. package/bundles/mtxGrid.umd.js.map +0 -1
  384. package/bundles/mtxLoader.umd.js +0 -107
  385. package/bundles/mtxLoader.umd.js.map +0 -1
  386. package/bundles/mtxPipes.umd.js +0 -44
  387. package/bundles/mtxPipes.umd.js.map +0 -1
  388. package/bundles/mtxPopover.umd.js +0 -1260
  389. package/bundles/mtxPopover.umd.js.map +0 -1
  390. package/bundles/mtxProgress.umd.js +0 -92
  391. package/bundles/mtxProgress.umd.js.map +0 -1
  392. package/bundles/mtxSelect.umd.js +0 -1097
  393. package/bundles/mtxSelect.umd.js.map +0 -1
  394. package/bundles/mtxSlider.umd.js +0 -1551
  395. package/bundles/mtxSlider.umd.js.map +0 -1
  396. package/bundles/mtxSplit.umd.js +0 -1431
  397. package/bundles/mtxSplit.umd.js.map +0 -1
  398. package/bundles/mtxText3d.umd.js +0 -84
  399. package/bundles/mtxText3d.umd.js.map +0 -1
  400. package/bundles/mtxTooltip.umd.js +0 -1083
  401. package/bundles/mtxTooltip.umd.js.map +0 -1
  402. package/button/mtxButton.metadata.json +0 -1
  403. package/checkbox-group/mtxCheckboxGroup.metadata.json +0 -1
  404. package/colorpicker/mtxColorpicker.metadata.json +0 -1
  405. package/column-resize/mtxColumnResize.metadata.json +0 -1
  406. package/core/mtxCore.metadata.json +0 -1
  407. package/datetimepicker/mtxDatetimepicker.metadata.json +0 -1
  408. package/dialog/mtxDialog.metadata.json +0 -1
  409. package/esm2015/alert/alert.component.js +0 -63
  410. package/esm2015/alert/alert.module.js +0 -14
  411. package/esm2015/button/button-loading.directive.js +0 -89
  412. package/esm2015/button/button.module.js +0 -16
  413. package/esm2015/checkbox-group/checkbox-group.component.js +0 -235
  414. package/esm2015/checkbox-group/checkbox-group.module.js +0 -17
  415. package/esm2015/colorpicker/colorpicker-input.js +0 -228
  416. package/esm2015/colorpicker/colorpicker-module.js +0 -41
  417. package/esm2015/colorpicker/colorpicker-toggle.js +0 -97
  418. package/esm2015/colorpicker/colorpicker.js +0 -372
  419. package/esm2015/column-resize/column-resize-directives/column-resize-flex.js +0 -54
  420. package/esm2015/column-resize/column-resize-directives/column-resize.js +0 -54
  421. package/esm2015/column-resize/column-resize-module.js +0 -24
  422. package/esm2015/column-resize/column-resize-notifier.js +0 -54
  423. package/esm2015/column-resize/column-resize.js +0 -80
  424. package/esm2015/column-resize/column-size-store.js +0 -18
  425. package/esm2015/column-resize/event-dispatcher.js +0 -75
  426. package/esm2015/column-resize/overlay-handle.js +0 -144
  427. package/esm2015/column-resize/resizable.js +0 -197
  428. package/esm2015/column-resize/resize-strategy.js +0 -245
  429. package/esm2015/core/datetime/datetime.module.js +0 -32
  430. package/esm2015/core/datetime/native-datetime-adapter.js +0 -144
  431. package/esm2015/datetimepicker/calendar-body.js +0 -76
  432. package/esm2015/datetimepicker/calendar.js +0 -614
  433. package/esm2015/datetimepicker/clock.js +0 -283
  434. package/esm2015/datetimepicker/datetimepicker-input.js +0 -336
  435. package/esm2015/datetimepicker/datetimepicker-module.js +0 -52
  436. package/esm2015/datetimepicker/datetimepicker-toggle.js +0 -103
  437. package/esm2015/datetimepicker/datetimepicker.js +0 -490
  438. package/esm2015/datetimepicker/month-view.js +0 -150
  439. package/esm2015/datetimepicker/multi-year-view.js +0 -215
  440. package/esm2015/datetimepicker/year-view.js +0 -141
  441. package/esm2015/dialog/dialog.component.js +0 -40
  442. package/esm2015/dialog/dialog.js +0 -81
  443. package/esm2015/dialog/dialog.module.js +0 -21
  444. package/esm2015/extensions-experimental.module.js +0 -13
  445. package/esm2015/extensions.js +0 -5
  446. package/esm2015/extensions.module.js +0 -40
  447. package/esm2015/form-group/form-group.component.js +0 -40
  448. package/esm2015/form-group/form-group.module.js +0 -14
  449. package/esm2015/grid/cell-selection.directive.js +0 -62
  450. package/esm2015/grid/cell.component.js +0 -115
  451. package/esm2015/grid/column-menu.component.js +0 -72
  452. package/esm2015/grid/column-resize/column-resize-directives/column-resize-flex.js +0 -47
  453. package/esm2015/grid/column-resize/column-resize-directives/column-resize.js +0 -47
  454. package/esm2015/grid/column-resize/column-resize-module.js +0 -36
  455. package/esm2015/grid/column-resize/overlay-handle.js +0 -68
  456. package/esm2015/grid/column-resize/resizable-directives/resizable.js +0 -75
  457. package/esm2015/grid/column-resize/resize-strategy.js +0 -45
  458. package/esm2015/grid/expansion-toggle.directive.js +0 -62
  459. package/esm2015/grid/grid.component.js +0 -418
  460. package/esm2015/grid/grid.module.js +0 -69
  461. package/esm2015/grid/grid.service.js +0 -50
  462. package/esm2015/grid/public-api.js +0 -17
  463. package/esm2015/loader/loader.component.js +0 -69
  464. package/esm2015/loader/loader.module.js +0 -16
  465. package/esm2015/pipes/mtxPipes.js +0 -5
  466. package/esm2015/pipes/pipes.module.js +0 -14
  467. package/esm2015/pipes/public-api.js +0 -3
  468. package/esm2015/pipes/to-observable.pipe.js +0 -12
  469. package/esm2015/popover/popover-module.js +0 -18
  470. package/esm2015/popover/popover-target.js +0 -24
  471. package/esm2015/popover/popover-trigger.js +0 -434
  472. package/esm2015/popover/popover.js +0 -326
  473. package/esm2015/progress/progress.component.js +0 -54
  474. package/esm2015/progress/progress.module.js +0 -14
  475. package/esm2015/public-api.js +0 -23
  476. package/esm2015/select/select.component.js +0 -380
  477. package/esm2015/select/select.module.js +0 -46
  478. package/esm2015/select/templates.directive.js +0 -211
  479. package/esm2015/slider/slider-module.js +0 -15
  480. package/esm2015/slider/slider.js +0 -1115
  481. package/esm2015/split/split-pane.directive.js +0 -156
  482. package/esm2015/split/split.component.js +0 -624
  483. package/esm2015/split/split.module.js +0 -15
  484. package/esm2015/text3d/text3d.component.js +0 -45
  485. package/esm2015/text3d/text3d.module.js +0 -14
  486. package/esm2015/tooltip/tooltip-module.js +0 -20
  487. package/esm2015/tooltip/tooltip.js +0 -683
  488. package/extensions-experimental.module.d.ts +0 -2
  489. package/extensions.metadata.json +0 -1
  490. package/extensions.module.d.ts +0 -2
  491. package/fesm2015/extensions.js +0 -80
  492. package/fesm2015/extensions.js.map +0 -1
  493. package/fesm2015/mtxAlert.js +0 -82
  494. package/fesm2015/mtxAlert.js.map +0 -1
  495. package/fesm2015/mtxButton.js +0 -108
  496. package/fesm2015/mtxButton.js.map +0 -1
  497. package/fesm2015/mtxCheckboxGroup.js +0 -255
  498. package/fesm2015/mtxCheckboxGroup.js.map +0 -1
  499. package/fesm2015/mtxColorpicker.js.map +0 -1
  500. package/fesm2015/mtxColumnResize.js.map +0 -1
  501. package/fesm2015/mtxCore.js.map +0 -1
  502. package/fesm2015/mtxDatetimepicker.js.map +0 -1
  503. package/fesm2015/mtxDialog.js +0 -141
  504. package/fesm2015/mtxDialog.js.map +0 -1
  505. package/fesm2015/mtxFormGroup.js +0 -59
  506. package/fesm2015/mtxFormGroup.js.map +0 -1
  507. package/fesm2015/mtxGrid.js +0 -1186
  508. package/fesm2015/mtxGrid.js.map +0 -1
  509. package/fesm2015/mtxLoader.js +0 -90
  510. package/fesm2015/mtxLoader.js.map +0 -1
  511. package/fesm2015/mtxPipes.js +0 -31
  512. package/fesm2015/mtxPipes.js.map +0 -1
  513. package/fesm2015/mtxPopover.js.map +0 -1
  514. package/fesm2015/mtxProgress.js +0 -73
  515. package/fesm2015/mtxProgress.js.map +0 -1
  516. package/fesm2015/mtxSelect.js +0 -700
  517. package/fesm2015/mtxSelect.js.map +0 -1
  518. package/fesm2015/mtxSlider.js.map +0 -1
  519. package/fesm2015/mtxSplit.js.map +0 -1
  520. package/fesm2015/mtxText3d.js +0 -64
  521. package/fesm2015/mtxText3d.js.map +0 -1
  522. package/fesm2015/mtxTooltip.js.map +0 -1
  523. package/form-group/mtxFormGroup.metadata.json +0 -1
  524. package/grid/cell-selection.directive.d.ts +0 -17
  525. package/grid/mtxGrid.metadata.json +0 -1
  526. package/loader/mtxLoader.metadata.json +0 -1
  527. package/pipes/mtxPipes.d.ts +0 -4
  528. package/pipes/mtxPipes.metadata.json +0 -1
  529. package/pipes/package.json +0 -11
  530. package/pipes/pipes.module.d.ts +0 -2
  531. package/popover/mtxPopover.metadata.json +0 -1
  532. package/progress/mtxProgress.metadata.json +0 -1
  533. package/select/mtxSelect.metadata.json +0 -1
  534. package/slider/mtxSlider.metadata.json +0 -1
  535. package/split/mtxSplit.metadata.json +0 -1
  536. package/text3d/mtxText3d.metadata.json +0 -1
  537. package/tooltip/mtxTooltip.metadata.json +0 -1
@@ -1,1431 +0,0 @@
1
- (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/material/core'), require('rxjs'), require('rxjs/operators')) :
3
- typeof define === 'function' && define.amd ? define('@ng-matero/extensions/split', ['exports', '@angular/core', '@angular/common', '@angular/material/core', 'rxjs', 'rxjs/operators'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global["ng-matero"] = global["ng-matero"] || {}, global["ng-matero"].extensions = global["ng-matero"].extensions || {}, global["ng-matero"].extensions.split = {}), global.ng.core, global.ng.common, global.ng.material.core, global.rxjs, global.rxjs.operators));
5
- })(this, (function (exports, core$1, common, core, rxjs, operators) { 'use strict';
6
-
7
- function getPointFromEvent(event) {
8
- // TouchEvent
9
- if (event.changedTouches !== undefined &&
10
- event.changedTouches.length > 0) {
11
- return {
12
- x: event.changedTouches[0].clientX,
13
- y: event.changedTouches[0].clientY,
14
- };
15
- }
16
- // MouseEvent
17
- else if (event.clientX !== undefined &&
18
- event.clientY !== undefined) {
19
- return {
20
- x: event.clientX,
21
- y: event.clientY,
22
- };
23
- }
24
- return null;
25
- }
26
- function getElementPixelSize(elRef, direction) {
27
- var rect = elRef.nativeElement.getBoundingClientRect();
28
- return direction === 'horizontal' ? rect.width : rect.height;
29
- }
30
- function getInputBoolean(v) {
31
- return typeof v === 'boolean' ? v : v === 'false' ? false : true;
32
- }
33
- function getInputPositiveNumber(v, defaultValue) {
34
- if (v === null || v === undefined) {
35
- return defaultValue;
36
- }
37
- v = Number(v);
38
- return !isNaN(v) && v >= 0 ? v : defaultValue;
39
- }
40
- function isUserSizesValid(unit, sizes) {
41
- // All sizes have to be not null and total should be 100
42
- if (unit === 'percent') {
43
- var total = sizes.reduce(function (_total, s) { return (s !== null ? _total + s : _total); }, 0);
44
- return sizes.every(function (s) { return s !== null; }) && total && total > 99.9 && total < 100.1;
45
- }
46
- // A size at null is mandatory but only one.
47
- if (unit === 'pixel') {
48
- return sizes.filter(function (s) { return s === null; }).length === 1;
49
- }
50
- }
51
- function getAreaMinSize(a) {
52
- if (a.size === null) {
53
- return null;
54
- }
55
- if (a.component.lockSize === true) {
56
- return a.size;
57
- }
58
- if (a.component.minSize === null) {
59
- return null;
60
- }
61
- if (a.component.minSize > a.size) {
62
- return a.size;
63
- }
64
- return a.component.minSize;
65
- }
66
- function getAreaMaxSize(a) {
67
- if (a.size === null) {
68
- return null;
69
- }
70
- if (a.component.lockSize === true) {
71
- return a.size;
72
- }
73
- if (a.component.maxSize === null) {
74
- return null;
75
- }
76
- if (a.component.maxSize < a.size) {
77
- return a.size;
78
- }
79
- return a.component.maxSize;
80
- }
81
- function getGutterSideAbsorptionCapacity(unit, sideAreas, pixels, allAreasSizePixel) {
82
- return sideAreas.reduce(function (acc, area) {
83
- var res = getAreaAbsorptionCapacity(unit, area, acc.remain, allAreasSizePixel);
84
- acc.list.push(res);
85
- acc.remain = res && res.pixelRemain;
86
- return acc;
87
- }, { remain: pixels, list: [] });
88
- }
89
- function getAreaAbsorptionCapacity(unit, areaSnapshot, pixels, allAreasSizePixel) {
90
- // No pain no gain
91
- if (pixels === 0) {
92
- return {
93
- areaSnapshot: areaSnapshot,
94
- pixelAbsorb: 0,
95
- percentAfterAbsorption: areaSnapshot.sizePercentAtStart,
96
- pixelRemain: 0,
97
- };
98
- }
99
- // Area start at zero and need to be reduced, not possible
100
- if (areaSnapshot.sizePixelAtStart === 0 && pixels < 0) {
101
- return {
102
- areaSnapshot: areaSnapshot,
103
- pixelAbsorb: 0,
104
- percentAfterAbsorption: 0,
105
- pixelRemain: pixels,
106
- };
107
- }
108
- if (unit === 'percent') {
109
- return getAreaAbsorptionCapacityPercent(areaSnapshot, pixels, allAreasSizePixel);
110
- }
111
- if (unit === 'pixel') {
112
- return getAreaAbsorptionCapacityPixel(areaSnapshot, pixels, allAreasSizePixel);
113
- }
114
- }
115
- function getAreaAbsorptionCapacityPercent(areaSnapshot, pixels, allAreasSizePixel) {
116
- var tempPixelSize = areaSnapshot.sizePixelAtStart + pixels;
117
- var tempPercentSize = (tempPixelSize / allAreasSizePixel) * 100;
118
- // ENLARGE AREA
119
- if (pixels > 0) {
120
- // If maxSize & newSize bigger than it > absorb to max and return remaining pixels
121
- if (areaSnapshot.area.maxSize !== null && tempPercentSize > areaSnapshot.area.maxSize) {
122
- // Use area.area.maxSize as newPercentSize and return calculate pixels remaining
123
- var maxSizePixel = (areaSnapshot.area.maxSize / 100) * allAreasSizePixel;
124
- return {
125
- areaSnapshot: areaSnapshot,
126
- pixelAbsorb: maxSizePixel,
127
- percentAfterAbsorption: areaSnapshot.area.maxSize,
128
- pixelRemain: areaSnapshot.sizePixelAtStart + pixels - maxSizePixel,
129
- };
130
- }
131
- return {
132
- areaSnapshot: areaSnapshot,
133
- pixelAbsorb: pixels,
134
- percentAfterAbsorption: tempPercentSize > 100 ? 100 : tempPercentSize,
135
- pixelRemain: 0,
136
- };
137
- }
138
- // REDUCE AREA
139
- else if (pixels < 0) {
140
- // If minSize & newSize smaller than it > absorb to min and return remaining pixels
141
- if (areaSnapshot.area.minSize !== null && tempPercentSize < areaSnapshot.area.minSize) {
142
- // Use area.area.minSize as newPercentSize and return calculate pixels remaining
143
- var minSizePixel = (areaSnapshot.area.minSize / 100) * allAreasSizePixel;
144
- return {
145
- areaSnapshot: areaSnapshot,
146
- pixelAbsorb: minSizePixel,
147
- percentAfterAbsorption: areaSnapshot.area.minSize,
148
- pixelRemain: areaSnapshot.sizePixelAtStart + pixels - minSizePixel,
149
- };
150
- }
151
- // If reduced under zero > return remaining pixels
152
- else if (tempPercentSize < 0) {
153
- // Use 0 as newPercentSize and return calculate pixels remaining
154
- return {
155
- areaSnapshot: areaSnapshot,
156
- pixelAbsorb: -areaSnapshot.sizePixelAtStart,
157
- percentAfterAbsorption: 0,
158
- pixelRemain: pixels + areaSnapshot.sizePixelAtStart,
159
- };
160
- }
161
- return {
162
- areaSnapshot: areaSnapshot,
163
- pixelAbsorb: pixels,
164
- percentAfterAbsorption: tempPercentSize,
165
- pixelRemain: 0,
166
- };
167
- }
168
- }
169
- function getAreaAbsorptionCapacityPixel(areaSnapshot, pixels, containerSizePixel) {
170
- var tempPixelSize = areaSnapshot.sizePixelAtStart + pixels;
171
- // ENLARGE AREA
172
- if (pixels > 0) {
173
- // If maxSize & newSize bigger than it > absorb to max and return remaining pixels
174
- if (areaSnapshot.area.maxSize !== null && tempPixelSize > areaSnapshot.area.maxSize) {
175
- return {
176
- areaSnapshot: areaSnapshot,
177
- pixelAbsorb: areaSnapshot.area.maxSize - areaSnapshot.sizePixelAtStart,
178
- percentAfterAbsorption: -1,
179
- pixelRemain: tempPixelSize - areaSnapshot.area.maxSize,
180
- };
181
- }
182
- return {
183
- areaSnapshot: areaSnapshot,
184
- pixelAbsorb: pixels,
185
- percentAfterAbsorption: -1,
186
- pixelRemain: 0,
187
- };
188
- }
189
- // REDUCE AREA
190
- else if (pixels < 0) {
191
- // If minSize & newSize smaller than it > absorb to min and return remaining pixels
192
- if (areaSnapshot.area.minSize !== null && tempPixelSize < areaSnapshot.area.minSize) {
193
- return {
194
- areaSnapshot: areaSnapshot,
195
- pixelAbsorb: areaSnapshot.area.minSize + pixels - tempPixelSize,
196
- percentAfterAbsorption: -1,
197
- pixelRemain: tempPixelSize - areaSnapshot.area.minSize,
198
- };
199
- }
200
- // If reduced under zero > return remaining pixels
201
- else if (tempPixelSize < 0) {
202
- return {
203
- areaSnapshot: areaSnapshot,
204
- pixelAbsorb: -areaSnapshot.sizePixelAtStart,
205
- percentAfterAbsorption: -1,
206
- pixelRemain: pixels + areaSnapshot.sizePixelAtStart,
207
- };
208
- }
209
- return {
210
- areaSnapshot: areaSnapshot,
211
- pixelAbsorb: pixels,
212
- percentAfterAbsorption: -1,
213
- pixelRemain: 0,
214
- };
215
- }
216
- }
217
- function updateAreaSize(unit, item) {
218
- if (unit === 'percent') {
219
- item.areaSnapshot.area.size = item.percentAfterAbsorption;
220
- }
221
- else if (unit === 'pixel') {
222
- // Update size except for the wildcard size area
223
- if (item.areaSnapshot.area.size !== null) {
224
- item.areaSnapshot.area.size = item.areaSnapshot.sizePixelAtStart + item.pixelAbsorb;
225
- }
226
- }
227
- }
228
-
229
- /*! *****************************************************************************
230
- Copyright (c) Microsoft Corporation.
231
-
232
- Permission to use, copy, modify, and/or distribute this software for any
233
- purpose with or without fee is hereby granted.
234
-
235
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
236
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
237
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
238
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
239
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
240
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
241
- PERFORMANCE OF THIS SOFTWARE.
242
- ***************************************************************************** */
243
- /* global Reflect, Promise */
244
- var extendStatics = function (d, b) {
245
- extendStatics = Object.setPrototypeOf ||
246
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
247
- function (d, b) { for (var p in b)
248
- if (Object.prototype.hasOwnProperty.call(b, p))
249
- d[p] = b[p]; };
250
- return extendStatics(d, b);
251
- };
252
- function __extends(d, b) {
253
- if (typeof b !== "function" && b !== null)
254
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
255
- extendStatics(d, b);
256
- function __() { this.constructor = d; }
257
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
258
- }
259
- var __assign = function () {
260
- __assign = Object.assign || function __assign(t) {
261
- for (var s, i = 1, n = arguments.length; i < n; i++) {
262
- s = arguments[i];
263
- for (var p in s)
264
- if (Object.prototype.hasOwnProperty.call(s, p))
265
- t[p] = s[p];
266
- }
267
- return t;
268
- };
269
- return __assign.apply(this, arguments);
270
- };
271
- function __rest(s, e) {
272
- var t = {};
273
- for (var p in s)
274
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
275
- t[p] = s[p];
276
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
277
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
278
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
279
- t[p[i]] = s[p[i]];
280
- }
281
- return t;
282
- }
283
- function __decorate(decorators, target, key, desc) {
284
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
285
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
286
- r = Reflect.decorate(decorators, target, key, desc);
287
- else
288
- for (var i = decorators.length - 1; i >= 0; i--)
289
- if (d = decorators[i])
290
- r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
291
- return c > 3 && r && Object.defineProperty(target, key, r), r;
292
- }
293
- function __param(paramIndex, decorator) {
294
- return function (target, key) { decorator(target, key, paramIndex); };
295
- }
296
- function __metadata(metadataKey, metadataValue) {
297
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
298
- return Reflect.metadata(metadataKey, metadataValue);
299
- }
300
- function __awaiter(thisArg, _arguments, P, generator) {
301
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
302
- return new (P || (P = Promise))(function (resolve, reject) {
303
- function fulfilled(value) { try {
304
- step(generator.next(value));
305
- }
306
- catch (e) {
307
- reject(e);
308
- } }
309
- function rejected(value) { try {
310
- step(generator["throw"](value));
311
- }
312
- catch (e) {
313
- reject(e);
314
- } }
315
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
316
- step((generator = generator.apply(thisArg, _arguments || [])).next());
317
- });
318
- }
319
- function __generator(thisArg, body) {
320
- var _ = { label: 0, sent: function () { if (t[0] & 1)
321
- throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
322
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
323
- function verb(n) { return function (v) { return step([n, v]); }; }
324
- function step(op) {
325
- if (f)
326
- throw new TypeError("Generator is already executing.");
327
- while (_)
328
- try {
329
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
330
- return t;
331
- if (y = 0, t)
332
- op = [op[0] & 2, t.value];
333
- switch (op[0]) {
334
- case 0:
335
- case 1:
336
- t = op;
337
- break;
338
- case 4:
339
- _.label++;
340
- return { value: op[1], done: false };
341
- case 5:
342
- _.label++;
343
- y = op[1];
344
- op = [0];
345
- continue;
346
- case 7:
347
- op = _.ops.pop();
348
- _.trys.pop();
349
- continue;
350
- default:
351
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
352
- _ = 0;
353
- continue;
354
- }
355
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
356
- _.label = op[1];
357
- break;
358
- }
359
- if (op[0] === 6 && _.label < t[1]) {
360
- _.label = t[1];
361
- t = op;
362
- break;
363
- }
364
- if (t && _.label < t[2]) {
365
- _.label = t[2];
366
- _.ops.push(op);
367
- break;
368
- }
369
- if (t[2])
370
- _.ops.pop();
371
- _.trys.pop();
372
- continue;
373
- }
374
- op = body.call(thisArg, _);
375
- }
376
- catch (e) {
377
- op = [6, e];
378
- y = 0;
379
- }
380
- finally {
381
- f = t = 0;
382
- }
383
- if (op[0] & 5)
384
- throw op[1];
385
- return { value: op[0] ? op[1] : void 0, done: true };
386
- }
387
- }
388
- var __createBinding = Object.create ? (function (o, m, k, k2) {
389
- if (k2 === undefined)
390
- k2 = k;
391
- Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
392
- }) : (function (o, m, k, k2) {
393
- if (k2 === undefined)
394
- k2 = k;
395
- o[k2] = m[k];
396
- });
397
- function __exportStar(m, o) {
398
- for (var p in m)
399
- if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
400
- __createBinding(o, m, p);
401
- }
402
- function __values(o) {
403
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
404
- if (m)
405
- return m.call(o);
406
- if (o && typeof o.length === "number")
407
- return {
408
- next: function () {
409
- if (o && i >= o.length)
410
- o = void 0;
411
- return { value: o && o[i++], done: !o };
412
- }
413
- };
414
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
415
- }
416
- function __read(o, n) {
417
- var m = typeof Symbol === "function" && o[Symbol.iterator];
418
- if (!m)
419
- return o;
420
- var i = m.call(o), r, ar = [], e;
421
- try {
422
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
423
- ar.push(r.value);
424
- }
425
- catch (error) {
426
- e = { error: error };
427
- }
428
- finally {
429
- try {
430
- if (r && !r.done && (m = i["return"]))
431
- m.call(i);
432
- }
433
- finally {
434
- if (e)
435
- throw e.error;
436
- }
437
- }
438
- return ar;
439
- }
440
- /** @deprecated */
441
- function __spread() {
442
- for (var ar = [], i = 0; i < arguments.length; i++)
443
- ar = ar.concat(__read(arguments[i]));
444
- return ar;
445
- }
446
- /** @deprecated */
447
- function __spreadArrays() {
448
- for (var s = 0, i = 0, il = arguments.length; i < il; i++)
449
- s += arguments[i].length;
450
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
451
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
452
- r[k] = a[j];
453
- return r;
454
- }
455
- function __spreadArray(to, from, pack) {
456
- if (pack || arguments.length === 2)
457
- for (var i = 0, l = from.length, ar; i < l; i++) {
458
- if (ar || !(i in from)) {
459
- if (!ar)
460
- ar = Array.prototype.slice.call(from, 0, i);
461
- ar[i] = from[i];
462
- }
463
- }
464
- return to.concat(ar || from);
465
- }
466
- function __await(v) {
467
- return this instanceof __await ? (this.v = v, this) : new __await(v);
468
- }
469
- function __asyncGenerator(thisArg, _arguments, generator) {
470
- if (!Symbol.asyncIterator)
471
- throw new TypeError("Symbol.asyncIterator is not defined.");
472
- var g = generator.apply(thisArg, _arguments || []), i, q = [];
473
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
474
- function verb(n) { if (g[n])
475
- i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
476
- function resume(n, v) { try {
477
- step(g[n](v));
478
- }
479
- catch (e) {
480
- settle(q[0][3], e);
481
- } }
482
- function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
483
- function fulfill(value) { resume("next", value); }
484
- function reject(value) { resume("throw", value); }
485
- function settle(f, v) { if (f(v), q.shift(), q.length)
486
- resume(q[0][0], q[0][1]); }
487
- }
488
- function __asyncDelegator(o) {
489
- var i, p;
490
- return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
491
- function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
492
- }
493
- function __asyncValues(o) {
494
- if (!Symbol.asyncIterator)
495
- throw new TypeError("Symbol.asyncIterator is not defined.");
496
- var m = o[Symbol.asyncIterator], i;
497
- return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
498
- function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
499
- function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
500
- }
501
- function __makeTemplateObject(cooked, raw) {
502
- if (Object.defineProperty) {
503
- Object.defineProperty(cooked, "raw", { value: raw });
504
- }
505
- else {
506
- cooked.raw = raw;
507
- }
508
- return cooked;
509
- }
510
- ;
511
- var __setModuleDefault = Object.create ? (function (o, v) {
512
- Object.defineProperty(o, "default", { enumerable: true, value: v });
513
- }) : function (o, v) {
514
- o["default"] = v;
515
- };
516
- function __importStar(mod) {
517
- if (mod && mod.__esModule)
518
- return mod;
519
- var result = {};
520
- if (mod != null)
521
- for (var k in mod)
522
- if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
523
- __createBinding(result, mod, k);
524
- __setModuleDefault(result, mod);
525
- return result;
526
- }
527
- function __importDefault(mod) {
528
- return (mod && mod.__esModule) ? mod : { default: mod };
529
- }
530
- function __classPrivateFieldGet(receiver, state, kind, f) {
531
- if (kind === "a" && !f)
532
- throw new TypeError("Private accessor was defined without a getter");
533
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
534
- throw new TypeError("Cannot read private member from an object whose class did not declare it");
535
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
536
- }
537
- function __classPrivateFieldSet(receiver, state, value, kind, f) {
538
- if (kind === "m")
539
- throw new TypeError("Private method is not writable");
540
- if (kind === "a" && !f)
541
- throw new TypeError("Private accessor was defined without a setter");
542
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
543
- throw new TypeError("Cannot write private member to an object whose class did not declare it");
544
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
545
- }
546
-
547
- // Boilerplate for applying mixins to _MtxSplitComponentBase.
548
- /** @docs-private */
549
- var _MtxSplitComponentBase = core.mixinColor(/** @class */ (function () {
550
- function class_1(_elementRef) {
551
- this._elementRef = _elementRef;
552
- }
553
- return class_1;
554
- }()));
555
- /**
556
- * mtx-split
557
- *
558
- *
559
- * PERCENT MODE ([unit]="'percent'")
560
- * ___________________________________________________________________________________________
561
- * | A [g1] B [g2] C [g3] D [g4] E |
562
- * |-------------------------------------------------------------------------------------------|
563
- * | 20 30 20 15 15 | <-- [size]="x"
564
- * | 10px 10px 10px 10px | <-- [gutterSize]="10"
565
- * |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)
566
- * | 152px 228px 152px 114px 114px | <-- el.getBoundingClientRect().width
567
- * |___________________________________________________________________________________________|
568
- * 800px <-- el.getBoundingClientRect().width
569
- * flex-basis = calc( { area.size }% - { area.size/100 * nbGutter*gutterSize }px );
570
- *
571
- *
572
- * PIXEL MODE ([unit]="'pixel'")
573
- * ___________________________________________________________________________________________
574
- * | A [g1] B [g2] C [g3] D [g4] E |
575
- * |-------------------------------------------------------------------------------------------|
576
- * | 100 250 * 150 100 | <-- [size]="y"
577
- * | 10px 10px 10px 10px | <-- [gutterSize]="10"
578
- * | 0 0 100px 0 0 250px 1 1 auto 0 0 150px 0 0 100px | <-- CSS flex property (flex-grow/flex-shrink/flex-basis)
579
- * | 100px 250px 200px 150px 100px | <-- el.getBoundingClientRect().width
580
- * |___________________________________________________________________________________________|
581
- * 800px <-- el.getBoundingClientRect().width
582
- *
583
- */
584
- var MtxSplitComponent = /** @class */ (function (_super) {
585
- __extends(MtxSplitComponent, _super);
586
- function MtxSplitComponent(ngZone, elRef, cdRef, renderer) {
587
- var _this = _super.call(this, elRef) || this;
588
- _this.ngZone = ngZone;
589
- _this.elRef = elRef;
590
- _this.cdRef = cdRef;
591
- _this.renderer = renderer;
592
- _this._direction = 'horizontal';
593
- ////
594
- _this._unit = 'percent';
595
- ////
596
- _this._gutterSize = 4;
597
- ////
598
- _this._gutterStep = 1;
599
- ////
600
- _this._restrictMove = false;
601
- ////
602
- _this._useTransition = false;
603
- ////
604
- _this._disabled = false;
605
- ////
606
- _this._dir = 'ltr';
607
- ////
608
- _this._gutterDblClickDuration = 0;
609
- ////
610
- _this.dragStart = new core$1.EventEmitter(false);
611
- _this.dragEnd = new core$1.EventEmitter(false);
612
- _this.gutterClick = new core$1.EventEmitter(false);
613
- _this.gutterDblClick = new core$1.EventEmitter(false);
614
- _this.dragProgressSubject = new rxjs.Subject();
615
- _this.dragProgress$ = _this.dragProgressSubject.asObservable();
616
- ////
617
- _this.isDragging = false;
618
- _this.dragListeners = [];
619
- _this.snapshot = null;
620
- _this.startPoint = null;
621
- _this.endPoint = null;
622
- _this.displayedAreas = [];
623
- _this.hidedAreas = [];
624
- _this._clickTimeout = null;
625
- // To force adding default class, could be override by user @Input() or not
626
- _this.direction = _this._direction;
627
- return _this;
628
- }
629
- Object.defineProperty(MtxSplitComponent.prototype, "direction", {
630
- get: function () {
631
- return this._direction;
632
- },
633
- set: function (v) {
634
- this._direction = v === 'vertical' ? 'vertical' : 'horizontal';
635
- this.renderer.addClass(this.elRef.nativeElement, "mtx-split-" + this._direction);
636
- this.renderer.removeClass(this.elRef.nativeElement, "mtx-split-" + (this._direction === 'vertical' ? 'horizontal' : 'vertical'));
637
- this.build(false, false);
638
- },
639
- enumerable: false,
640
- configurable: true
641
- });
642
- Object.defineProperty(MtxSplitComponent.prototype, "unit", {
643
- get: function () {
644
- return this._unit;
645
- },
646
- set: function (v) {
647
- this._unit = v === 'pixel' ? 'pixel' : 'percent';
648
- this.renderer.addClass(this.elRef.nativeElement, "mtx-split-" + this._unit);
649
- this.renderer.removeClass(this.elRef.nativeElement, "mtx-split-" + (this._unit === 'pixel' ? 'percent' : 'pixel'));
650
- this.build(false, true);
651
- },
652
- enumerable: false,
653
- configurable: true
654
- });
655
- Object.defineProperty(MtxSplitComponent.prototype, "gutterSize", {
656
- get: function () {
657
- return this._gutterSize;
658
- },
659
- set: function (v) {
660
- this._gutterSize = getInputPositiveNumber(v, 11);
661
- this.build(false, false);
662
- },
663
- enumerable: false,
664
- configurable: true
665
- });
666
- Object.defineProperty(MtxSplitComponent.prototype, "gutterStep", {
667
- get: function () {
668
- return this._gutterStep;
669
- },
670
- set: function (v) {
671
- this._gutterStep = getInputPositiveNumber(v, 1);
672
- },
673
- enumerable: false,
674
- configurable: true
675
- });
676
- Object.defineProperty(MtxSplitComponent.prototype, "restrictMove", {
677
- get: function () {
678
- return this._restrictMove;
679
- },
680
- set: function (v) {
681
- this._restrictMove = getInputBoolean(v);
682
- },
683
- enumerable: false,
684
- configurable: true
685
- });
686
- Object.defineProperty(MtxSplitComponent.prototype, "useTransition", {
687
- get: function () {
688
- return this._useTransition;
689
- },
690
- set: function (v) {
691
- this._useTransition = getInputBoolean(v);
692
- if (this._useTransition) {
693
- this.renderer.addClass(this.elRef.nativeElement, 'mtx-split-transition');
694
- }
695
- else {
696
- this.renderer.removeClass(this.elRef.nativeElement, 'mtx-split-transition');
697
- }
698
- },
699
- enumerable: false,
700
- configurable: true
701
- });
702
- Object.defineProperty(MtxSplitComponent.prototype, "disabled", {
703
- get: function () {
704
- return this._disabled;
705
- },
706
- set: function (v) {
707
- this._disabled = getInputBoolean(v);
708
- if (this._disabled) {
709
- this.renderer.addClass(this.elRef.nativeElement, 'mtx-split-disabled');
710
- }
711
- else {
712
- this.renderer.removeClass(this.elRef.nativeElement, 'mtx-split-disabled');
713
- }
714
- },
715
- enumerable: false,
716
- configurable: true
717
- });
718
- Object.defineProperty(MtxSplitComponent.prototype, "dir", {
719
- get: function () {
720
- return this._dir;
721
- },
722
- set: function (v) {
723
- this._dir = v === 'rtl' ? 'rtl' : 'ltr';
724
- this.renderer.setAttribute(this.elRef.nativeElement, 'dir', this._dir);
725
- },
726
- enumerable: false,
727
- configurable: true
728
- });
729
- Object.defineProperty(MtxSplitComponent.prototype, "gutterDblClickDuration", {
730
- get: function () {
731
- return this._gutterDblClickDuration;
732
- },
733
- set: function (v) {
734
- this._gutterDblClickDuration = getInputPositiveNumber(v, 0);
735
- },
736
- enumerable: false,
737
- configurable: true
738
- });
739
- Object.defineProperty(MtxSplitComponent.prototype, "transitionEnd", {
740
- get: function () {
741
- var _this = this;
742
- return new rxjs.Observable(function (subscriber) { return (_this.transitionEndSubscriber = subscriber); }).pipe(operators.debounceTime(20));
743
- },
744
- enumerable: false,
745
- configurable: true
746
- });
747
- MtxSplitComponent.prototype.ngAfterViewInit = function () {
748
- var _this = this;
749
- this.ngZone.runOutsideAngular(function () {
750
- // To avoid transition at first rendering
751
- setTimeout(function () { return _this.renderer.addClass(_this.elRef.nativeElement, 'mtx-split-init'); });
752
- });
753
- };
754
- MtxSplitComponent.prototype.getNbGutters = function () {
755
- return this.displayedAreas.length === 0 ? 0 : this.displayedAreas.length - 1;
756
- };
757
- MtxSplitComponent.prototype.addArea = function (component) {
758
- var newArea = {
759
- component: component,
760
- order: 0,
761
- size: 0,
762
- minSize: null,
763
- maxSize: null,
764
- };
765
- if (component.visible === true) {
766
- this.displayedAreas.push(newArea);
767
- this.build(true, true);
768
- }
769
- else {
770
- this.hidedAreas.push(newArea);
771
- }
772
- };
773
- MtxSplitComponent.prototype.removeArea = function (component) {
774
- if (this.displayedAreas.some(function (a) { return a.component === component; })) {
775
- var area = this.displayedAreas.find(function (a) { return a.component === component; });
776
- this.displayedAreas.splice(this.displayedAreas.indexOf(area), 1);
777
- this.build(true, true);
778
- }
779
- else if (this.hidedAreas.some(function (a) { return a.component === component; })) {
780
- var area = this.hidedAreas.find(function (a) { return a.component === component; });
781
- this.hidedAreas.splice(this.hidedAreas.indexOf(area), 1);
782
- }
783
- };
784
- MtxSplitComponent.prototype.updateArea = function (component, resetOrders, resetSizes) {
785
- if (component.visible === true) {
786
- this.build(resetOrders, resetSizes);
787
- }
788
- };
789
- MtxSplitComponent.prototype.showArea = function (component) {
790
- var _a;
791
- var area = this.hidedAreas.find(function (a) { return a.component === component; });
792
- if (area === undefined) {
793
- return;
794
- }
795
- var areas = this.hidedAreas.splice(this.hidedAreas.indexOf(area), 1);
796
- (_a = this.displayedAreas).push.apply(_a, __spreadArray([], __read(areas)));
797
- this.build(true, true);
798
- };
799
- MtxSplitComponent.prototype.hideArea = function (comp) {
800
- var _a;
801
- var area = this.displayedAreas.find(function (a) { return a.component === comp; });
802
- if (area === undefined) {
803
- return;
804
- }
805
- var areas = this.displayedAreas.splice(this.displayedAreas.indexOf(area), 1);
806
- areas.forEach(function (_area) {
807
- _area.order = 0;
808
- _area.size = 0;
809
- });
810
- (_a = this.hidedAreas).push.apply(_a, __spreadArray([], __read(areas)));
811
- this.build(true, true);
812
- };
813
- MtxSplitComponent.prototype.getVisibleAreaSizes = function () {
814
- return this.displayedAreas.map(function (a) { return (a.size === null ? '*' : a.size); });
815
- };
816
- MtxSplitComponent.prototype.setVisibleAreaSizes = function (sizes) {
817
- if (sizes.length !== this.displayedAreas.length) {
818
- return false;
819
- }
820
- var formatedSizes = sizes.map(function (s) { return getInputPositiveNumber(s, null); });
821
- var isValid = isUserSizesValid(this.unit, formatedSizes);
822
- if (isValid === false) {
823
- return false;
824
- }
825
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
826
- // @ts-ignore
827
- this.displayedAreas.forEach(function (area, i) { return (area.component._size = formatedSizes[i]); });
828
- this.build(false, true);
829
- return true;
830
- };
831
- MtxSplitComponent.prototype.build = function (resetOrders, resetSizes) {
832
- this.stopDragging();
833
- // ¤ AREAS ORDER
834
- if (resetOrders === true) {
835
- // If user provided 'order' for each area, use it to sort them.
836
- if (this.displayedAreas.every(function (a) { return a.component.order !== null; })) {
837
- this.displayedAreas.sort(function (a, b) { return (a.component.order - b.component.order); });
838
- }
839
- // Then set real order with multiples of 2, numbers between will be used by gutters.
840
- this.displayedAreas.forEach(function (area, i) {
841
- area.order = i * 2;
842
- area.component.setStyleOrder(area.order);
843
- });
844
- }
845
- // ¤ AREAS SIZE
846
- if (resetSizes === true) {
847
- var useUserSizes_1 = isUserSizesValid(this.unit, this.displayedAreas.map(function (a) { return a.component.size; }));
848
- switch (this.unit) {
849
- case 'percent': {
850
- var defaultSize_1 = 100 / this.displayedAreas.length;
851
- this.displayedAreas.forEach(function (area) {
852
- area.size = useUserSizes_1 ? area.component.size : defaultSize_1;
853
- area.minSize = getAreaMinSize(area);
854
- area.maxSize = getAreaMaxSize(area);
855
- });
856
- break;
857
- }
858
- case 'pixel': {
859
- if (useUserSizes_1) {
860
- this.displayedAreas.forEach(function (area) {
861
- area.size = area.component.size;
862
- area.minSize = getAreaMinSize(area);
863
- area.maxSize = getAreaMaxSize(area);
864
- });
865
- }
866
- else {
867
- var wildcardSizeAreas = this.displayedAreas.filter(function (a) { return a.component.size === null; });
868
- // No wildcard area > Need to select one arbitrarily > first
869
- if (wildcardSizeAreas.length === 0 && this.displayedAreas.length > 0) {
870
- this.displayedAreas.forEach(function (area, i) {
871
- area.size = i === 0 ? null : area.component.size;
872
- area.minSize = i === 0 ? null : getAreaMinSize(area);
873
- area.maxSize = i === 0 ? null : getAreaMaxSize(area);
874
- });
875
- }
876
- // More than one wildcard area > Need to keep only one arbitrarly > first
877
- else if (wildcardSizeAreas.length > 1) {
878
- var alreadyGotOne_1 = false;
879
- this.displayedAreas.forEach(function (area) {
880
- if (area.component.size === null) {
881
- if (alreadyGotOne_1 === false) {
882
- area.size = null;
883
- area.minSize = null;
884
- area.maxSize = null;
885
- alreadyGotOne_1 = true;
886
- }
887
- else {
888
- area.size = 100;
889
- area.minSize = null;
890
- area.maxSize = null;
891
- }
892
- }
893
- else {
894
- area.size = area.component.size;
895
- area.minSize = getAreaMinSize(area);
896
- area.maxSize = getAreaMaxSize(area);
897
- }
898
- });
899
- }
900
- }
901
- break;
902
- }
903
- }
904
- }
905
- this.refreshStyleSizes();
906
- this.cdRef.markForCheck();
907
- };
908
- MtxSplitComponent.prototype.refreshStyleSizes = function () {
909
- var _this = this;
910
- ///////////////////////////////////////////
911
- // PERCENT MODE
912
- if (this.unit === 'percent') {
913
- // Only one area > flex-basis 100%
914
- if (this.displayedAreas.length === 1) {
915
- this.displayedAreas[0].component.setStyleFlex(0, 0, "100%", false, false);
916
- }
917
- // Multiple areas > use each percent basis
918
- else {
919
- var sumGutterSize_1 = this.getNbGutters() * this.gutterSize;
920
- this.displayedAreas.forEach(function (area) {
921
- area.component.setStyleFlex(0, 0, "calc( " + area.size + "% - " + (area.size / 100) * sumGutterSize_1 + "px )", area.minSize !== null && area.minSize === area.size ? true : false, area.maxSize !== null && area.maxSize === area.size ? true : false);
922
- });
923
- }
924
- }
925
- ///////////////////////////////////////////
926
- // PIXEL MODE
927
- else if (this.unit === 'pixel') {
928
- this.displayedAreas.forEach(function (area) {
929
- // Area with wildcard size
930
- if (area.size === null) {
931
- if (_this.displayedAreas.length === 1) {
932
- area.component.setStyleFlex(1, 1, "100%", false, false);
933
- }
934
- else {
935
- area.component.setStyleFlex(1, 1, "auto", false, false);
936
- }
937
- }
938
- // Area with pixel size
939
- else {
940
- // Only one area > flex-basis 100%
941
- if (_this.displayedAreas.length === 1) {
942
- area.component.setStyleFlex(0, 0, "100%", false, false);
943
- }
944
- // Multiple areas > use each pixel basis
945
- else {
946
- 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);
947
- }
948
- }
949
- });
950
- }
951
- };
952
- MtxSplitComponent.prototype.clickGutter = function (event, gutterNum) {
953
- var _this = this;
954
- var tempPoint = getPointFromEvent(event);
955
- // Be sure mouseup/touchend happened at same point as mousedown/touchstart to trigger click/dblclick
956
- if (this.startPoint && this.startPoint.x === tempPoint.x && this.startPoint.y === tempPoint.y) {
957
- // If timeout in progress and new click > clearTimeout & dblClickEvent
958
- if (this._clickTimeout !== null) {
959
- window.clearTimeout(this._clickTimeout);
960
- this._clickTimeout = null;
961
- this.notify('dblclick', gutterNum);
962
- this.stopDragging();
963
- }
964
- // Else start timeout to call clickEvent at end
965
- else {
966
- this._clickTimeout = window.setTimeout(function () {
967
- _this._clickTimeout = null;
968
- _this.notify('click', gutterNum);
969
- _this.stopDragging();
970
- }, this.gutterDblClickDuration);
971
- }
972
- }
973
- };
974
- MtxSplitComponent.prototype.startDragging = function (event, gutterOrder, gutterNum) {
975
- var _this = this;
976
- event.preventDefault();
977
- event.stopPropagation();
978
- this.startPoint = getPointFromEvent(event);
979
- if (this.startPoint === null || this.disabled === true) {
980
- return;
981
- }
982
- this.snapshot = {
983
- gutterNum: gutterNum,
984
- lastSteppedOffset: 0,
985
- allAreasSizePixel: getElementPixelSize(this.elRef, this.direction) - this.getNbGutters() * this.gutterSize,
986
- allInvolvedAreasSizePercent: 100,
987
- areasBeforeGutter: [],
988
- areasAfterGutter: [],
989
- };
990
- this.displayedAreas.forEach(function (area) {
991
- var areaSnapshot = {
992
- area: area,
993
- sizePixelAtStart: getElementPixelSize(area.component.elRef, _this.direction),
994
- sizePercentAtStart: (_this.unit === 'percent' ? area.size : -1), // If pixel mode, anyway, will not be used.
995
- };
996
- if (area.order < gutterOrder) {
997
- if (_this.restrictMove === true) {
998
- _this.snapshot.areasBeforeGutter = [areaSnapshot];
999
- }
1000
- else {
1001
- _this.snapshot.areasBeforeGutter.unshift(areaSnapshot);
1002
- }
1003
- }
1004
- else if (area.order > gutterOrder) {
1005
- if (_this.restrictMove === true) {
1006
- if (_this.snapshot.areasAfterGutter.length === 0) {
1007
- _this.snapshot.areasAfterGutter = [areaSnapshot];
1008
- }
1009
- }
1010
- else {
1011
- _this.snapshot.areasAfterGutter.push(areaSnapshot);
1012
- }
1013
- }
1014
- });
1015
- this.snapshot.allInvolvedAreasSizePercent = __spreadArray(__spreadArray([], __read(this.snapshot.areasBeforeGutter)), __read(this.snapshot.areasAfterGutter)).reduce(function (t, a) { return t + a.sizePercentAtStart; }, 0);
1016
- if (this.snapshot.areasBeforeGutter.length === 0 ||
1017
- this.snapshot.areasAfterGutter.length === 0) {
1018
- return;
1019
- }
1020
- this.dragListeners.push(this.renderer.listen('document', 'mouseup', this.stopDragging.bind(this)));
1021
- this.dragListeners.push(this.renderer.listen('document', 'touchend', this.stopDragging.bind(this)));
1022
- this.dragListeners.push(this.renderer.listen('document', 'touchcancel', this.stopDragging.bind(this)));
1023
- this.ngZone.runOutsideAngular(function () {
1024
- _this.dragListeners.push(_this.renderer.listen('document', 'mousemove', _this.dragEvent.bind(_this)));
1025
- _this.dragListeners.push(_this.renderer.listen('document', 'touchmove', _this.dragEvent.bind(_this)));
1026
- });
1027
- this.displayedAreas.forEach(function (area) { return area.component.lockEvents(); });
1028
- this.isDragging = true;
1029
- this.renderer.addClass(this.elRef.nativeElement, 'mtx-dragging');
1030
- this.renderer.addClass(this.gutterEls.toArray()[this.snapshot.gutterNum - 1].nativeElement, 'mtx-dragged');
1031
- this.notify('start', this.snapshot.gutterNum);
1032
- };
1033
- MtxSplitComponent.prototype.dragEvent = function (event) {
1034
- var _this = this;
1035
- event.preventDefault();
1036
- event.stopPropagation();
1037
- if (this._clickTimeout !== null) {
1038
- window.clearTimeout(this._clickTimeout);
1039
- this._clickTimeout = null;
1040
- }
1041
- if (this.isDragging === false) {
1042
- return;
1043
- }
1044
- this.endPoint = getPointFromEvent(event);
1045
- if (this.endPoint === null) {
1046
- return;
1047
- }
1048
- // Calculate steppedOffset
1049
- var offset = this.direction === 'horizontal'
1050
- ? this.startPoint.x - this.endPoint.x
1051
- : this.startPoint.y - this.endPoint.y;
1052
- if (this.dir === 'rtl') {
1053
- offset = -offset;
1054
- }
1055
- var steppedOffset = Math.round(offset / this.gutterStep) * this.gutterStep;
1056
- if (steppedOffset === this.snapshot.lastSteppedOffset) {
1057
- return;
1058
- }
1059
- this.snapshot.lastSteppedOffset = steppedOffset;
1060
- // Need to know if each gutter side areas could reacts to steppedOffset
1061
- var areasBefore = getGutterSideAbsorptionCapacity(this.unit, this.snapshot.areasBeforeGutter, -steppedOffset, this.snapshot.allAreasSizePixel);
1062
- var areasAfter = getGutterSideAbsorptionCapacity(this.unit, this.snapshot.areasAfterGutter, steppedOffset, this.snapshot.allAreasSizePixel);
1063
- // Each gutter side areas can't absorb all offset
1064
- if (areasBefore.remain !== 0 && areasAfter.remain !== 0) {
1065
- if (Math.abs(areasBefore.remain) === Math.abs(areasAfter.remain)) {
1066
- /** */
1067
- }
1068
- else if (Math.abs(areasBefore.remain) > Math.abs(areasAfter.remain)) {
1069
- areasAfter = getGutterSideAbsorptionCapacity(this.unit, this.snapshot.areasAfterGutter, steppedOffset + areasBefore.remain, this.snapshot.allAreasSizePixel);
1070
- }
1071
- else {
1072
- areasBefore = getGutterSideAbsorptionCapacity(this.unit, this.snapshot.areasBeforeGutter, -(steppedOffset - areasAfter.remain), this.snapshot.allAreasSizePixel);
1073
- }
1074
- }
1075
- // Areas before gutter can't absorbs all offset > need to recalculate sizes for areas after gutter.
1076
- else if (areasBefore.remain !== 0) {
1077
- areasAfter = getGutterSideAbsorptionCapacity(this.unit, this.snapshot.areasAfterGutter, steppedOffset + areasBefore.remain, this.snapshot.allAreasSizePixel);
1078
- }
1079
- // Areas after gutter can't absorbs all offset > need to recalculate sizes for areas before gutter.
1080
- else if (areasAfter.remain !== 0) {
1081
- areasBefore = getGutterSideAbsorptionCapacity(this.unit, this.snapshot.areasBeforeGutter, -(steppedOffset - areasAfter.remain), this.snapshot.allAreasSizePixel);
1082
- }
1083
- if (this.unit === 'percent') {
1084
- // Hack because of browser messing up with sizes using calc(X% - Ypx) -> el.getBoundingClientRect()
1085
- // If not there, playing with gutters makes total going down to 99.99875% then 99.99286%, 99.98986%,..
1086
- var all = __spreadArray(__spreadArray([], __read(areasBefore.list)), __read(areasAfter.list));
1087
- var areaToReset_1 = all.find(function (a) { return a.percentAfterAbsorption !== 0 &&
1088
- a.percentAfterAbsorption !== a.areaSnapshot.area.minSize &&
1089
- a.percentAfterAbsorption !== a.areaSnapshot.area.maxSize; });
1090
- if (areaToReset_1) {
1091
- areaToReset_1.percentAfterAbsorption =
1092
- this.snapshot.allInvolvedAreasSizePercent -
1093
- all
1094
- .filter(function (a) { return a !== areaToReset_1; })
1095
- .reduce(function (total, a) { return total + a.percentAfterAbsorption; }, 0);
1096
- }
1097
- }
1098
- // Now we know areas could absorb steppedOffset, time to really update sizes
1099
- areasBefore.list.forEach(function (item) { return updateAreaSize(_this.unit, item); });
1100
- areasAfter.list.forEach(function (item) { return updateAreaSize(_this.unit, item); });
1101
- this.refreshStyleSizes();
1102
- this.notify('progress', this.snapshot.gutterNum);
1103
- };
1104
- MtxSplitComponent.prototype.stopDragging = function (event) {
1105
- var _this = this;
1106
- if (event) {
1107
- event.preventDefault();
1108
- event.stopPropagation();
1109
- }
1110
- if (this.isDragging === false) {
1111
- return;
1112
- }
1113
- this.displayedAreas.forEach(function (area) { return area.component.unlockEvents(); });
1114
- while (this.dragListeners.length > 0) {
1115
- var fct = this.dragListeners.pop();
1116
- if (fct) {
1117
- fct();
1118
- }
1119
- }
1120
- // Warning: Have to be before "notify('end')"
1121
- // because "notify('end')"" can be linked to "[size]='x'" > "build()" > "stopDragging()"
1122
- this.isDragging = false;
1123
- // If moved from starting point, notify end
1124
- if (this.endPoint &&
1125
- (this.startPoint.x !== this.endPoint.x ||
1126
- this.startPoint.y !== this.endPoint.y)) {
1127
- this.notify('end', this.snapshot.gutterNum);
1128
- }
1129
- this.renderer.removeClass(this.elRef.nativeElement, 'mtx-dragging');
1130
- this.renderer.removeClass(this.gutterEls.toArray()[this.snapshot.gutterNum - 1].nativeElement, 'mtx-dragged');
1131
- this.snapshot = null;
1132
- // Needed to let (click)="clickGutter(...)" event run and verify if mouse moved or not
1133
- this.ngZone.runOutsideAngular(function () {
1134
- setTimeout(function () {
1135
- _this.startPoint = null;
1136
- _this.endPoint = null;
1137
- });
1138
- });
1139
- };
1140
- MtxSplitComponent.prototype.notify = function (type, gutterNum) {
1141
- var _this = this;
1142
- var sizes = this.getVisibleAreaSizes();
1143
- if (type === 'start') {
1144
- this.dragStart.emit({ gutterNum: gutterNum, sizes: sizes });
1145
- }
1146
- else if (type === 'end') {
1147
- this.dragEnd.emit({ gutterNum: gutterNum, sizes: sizes });
1148
- }
1149
- else if (type === 'click') {
1150
- this.gutterClick.emit({ gutterNum: gutterNum, sizes: sizes });
1151
- }
1152
- else if (type === 'dblclick') {
1153
- this.gutterDblClick.emit({ gutterNum: gutterNum, sizes: sizes });
1154
- }
1155
- else if (type === 'transitionEnd') {
1156
- if (this.transitionEndSubscriber) {
1157
- this.ngZone.run(function () { return _this.transitionEndSubscriber.next(sizes); });
1158
- }
1159
- }
1160
- else if (type === 'progress') {
1161
- // Stay outside zone to allow users do what they want about change detection mechanism.
1162
- this.dragProgressSubject.next({ gutterNum: gutterNum, sizes: sizes });
1163
- }
1164
- };
1165
- MtxSplitComponent.prototype.ngOnDestroy = function () {
1166
- this.stopDragging();
1167
- };
1168
- return MtxSplitComponent;
1169
- }(_MtxSplitComponentBase));
1170
- /** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
1171
- MtxSplitComponent.decorators = [
1172
- { type: core$1.Component, args: [{
1173
- selector: 'mtx-split',
1174
- exportAs: 'mtxSplit',
1175
- host: {
1176
- class: 'mtx-split',
1177
- },
1178
- encapsulation: core$1.ViewEncapsulation.None,
1179
- changeDetection: core$1.ChangeDetectionStrategy.OnPush,
1180
- 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",
1181
- inputs: ['color'],
1182
- 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"]
1183
- },] }
1184
- ];
1185
- /**
1186
- * @type {function(): !Array<(null|{
1187
- * type: ?,
1188
- * decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>),
1189
- * })>}
1190
- * @nocollapse
1191
- */
1192
- MtxSplitComponent.ctorParameters = function () { return [
1193
- { type: core$1.NgZone },
1194
- { type: core$1.ElementRef },
1195
- { type: core$1.ChangeDetectorRef },
1196
- { type: core$1.Renderer2 }
1197
- ]; };
1198
- /** @type {!Object<string, !Array<{type: !Function, args: (undefined|!Array<?>)}>>} */
1199
- MtxSplitComponent.propDecorators = {
1200
- direction: [{ type: core$1.Input }],
1201
- unit: [{ type: core$1.Input }],
1202
- gutterSize: [{ type: core$1.Input }],
1203
- gutterStep: [{ type: core$1.Input }],
1204
- restrictMove: [{ type: core$1.Input }],
1205
- useTransition: [{ type: core$1.Input }],
1206
- disabled: [{ type: core$1.Input }],
1207
- dir: [{ type: core$1.Input }],
1208
- gutterDblClickDuration: [{ type: core$1.Input }],
1209
- dragStart: [{ type: core$1.Output }],
1210
- dragEnd: [{ type: core$1.Output }],
1211
- gutterClick: [{ type: core$1.Output }],
1212
- gutterDblClick: [{ type: core$1.Output }],
1213
- transitionEnd: [{ type: core$1.Output }],
1214
- gutterEls: [{ type: core$1.ViewChildren, args: ['gutterEls',] }]
1215
- };
1216
-
1217
- var MtxSplitPaneDirective = /** @class */ (function () {
1218
- function MtxSplitPaneDirective(ngZone, elRef, renderer, split) {
1219
- this.ngZone = ngZone;
1220
- this.elRef = elRef;
1221
- this.renderer = renderer;
1222
- this.split = split;
1223
- this._order = null;
1224
- ////
1225
- this._size = null;
1226
- ////
1227
- this._minSize = null;
1228
- ////
1229
- this._maxSize = null;
1230
- ////
1231
- this._lockSize = false;
1232
- ////
1233
- this._visible = true;
1234
- this.lockListeners = [];
1235
- this.renderer.addClass(this.elRef.nativeElement, 'mtx-split-pane');
1236
- }
1237
- Object.defineProperty(MtxSplitPaneDirective.prototype, "order", {
1238
- get: function () {
1239
- return this._order;
1240
- },
1241
- set: function (v) {
1242
- this._order = getInputPositiveNumber(v, null);
1243
- this.split.updateArea(this, true, false);
1244
- },
1245
- enumerable: false,
1246
- configurable: true
1247
- });
1248
- Object.defineProperty(MtxSplitPaneDirective.prototype, "size", {
1249
- get: function () {
1250
- return this._size;
1251
- },
1252
- set: function (v) {
1253
- this._size = getInputPositiveNumber(v, null);
1254
- this.split.updateArea(this, false, true);
1255
- },
1256
- enumerable: false,
1257
- configurable: true
1258
- });
1259
- Object.defineProperty(MtxSplitPaneDirective.prototype, "minSize", {
1260
- get: function () {
1261
- return this._minSize;
1262
- },
1263
- set: function (v) {
1264
- this._minSize = getInputPositiveNumber(v, null);
1265
- this.split.updateArea(this, false, true);
1266
- },
1267
- enumerable: false,
1268
- configurable: true
1269
- });
1270
- Object.defineProperty(MtxSplitPaneDirective.prototype, "maxSize", {
1271
- get: function () {
1272
- return this._maxSize;
1273
- },
1274
- set: function (v) {
1275
- this._maxSize = getInputPositiveNumber(v, null);
1276
- this.split.updateArea(this, false, true);
1277
- },
1278
- enumerable: false,
1279
- configurable: true
1280
- });
1281
- Object.defineProperty(MtxSplitPaneDirective.prototype, "lockSize", {
1282
- get: function () {
1283
- return this._lockSize;
1284
- },
1285
- set: function (v) {
1286
- this._lockSize = getInputBoolean(v);
1287
- this.split.updateArea(this, false, true);
1288
- },
1289
- enumerable: false,
1290
- configurable: true
1291
- });
1292
- Object.defineProperty(MtxSplitPaneDirective.prototype, "visible", {
1293
- get: function () {
1294
- return this._visible;
1295
- },
1296
- set: function (v) {
1297
- this._visible = getInputBoolean(v);
1298
- if (this._visible) {
1299
- this.split.showArea(this);
1300
- this.renderer.removeClass(this.elRef.nativeElement, 'mtx-split-pane-hidden');
1301
- }
1302
- else {
1303
- this.split.hideArea(this);
1304
- this.renderer.addClass(this.elRef.nativeElement, 'mtx-split-pane-hidden');
1305
- }
1306
- },
1307
- enumerable: false,
1308
- configurable: true
1309
- });
1310
- MtxSplitPaneDirective.prototype.ngOnInit = function () {
1311
- var _this = this;
1312
- this.split.addArea(this);
1313
- this.ngZone.runOutsideAngular(function () {
1314
- _this.transitionListener = _this.renderer.listen(_this.elRef.nativeElement, 'transitionend', function (event) {
1315
- // Limit only flex-basis transition to trigger the event
1316
- if (event.propertyName === 'flex-basis') {
1317
- _this.split.notify('transitionEnd', -1);
1318
- }
1319
- });
1320
- });
1321
- };
1322
- MtxSplitPaneDirective.prototype.setStyleOrder = function (value) {
1323
- this.renderer.setStyle(this.elRef.nativeElement, 'order', value);
1324
- };
1325
- MtxSplitPaneDirective.prototype.setStyleFlex = function (grow, shrink, basis, isMin, isMax) {
1326
- // Need 3 separated properties to work on IE11 (https://github.com/angular/flex-layout/issues/323)
1327
- this.renderer.setStyle(this.elRef.nativeElement, 'flex-grow', grow);
1328
- this.renderer.setStyle(this.elRef.nativeElement, 'flex-shrink', shrink);
1329
- this.renderer.setStyle(this.elRef.nativeElement, 'flex-basis', basis);
1330
- if (isMin === true) {
1331
- this.renderer.addClass(this.elRef.nativeElement, 'mtx-min');
1332
- }
1333
- else {
1334
- this.renderer.removeClass(this.elRef.nativeElement, 'mtx-min');
1335
- }
1336
- if (isMax === true) {
1337
- this.renderer.addClass(this.elRef.nativeElement, 'mtx-max');
1338
- }
1339
- else {
1340
- this.renderer.removeClass(this.elRef.nativeElement, 'mtx-max');
1341
- }
1342
- };
1343
- MtxSplitPaneDirective.prototype.lockEvents = function () {
1344
- var _this = this;
1345
- this.ngZone.runOutsideAngular(function () {
1346
- _this.lockListeners.push(_this.renderer.listen(_this.elRef.nativeElement, 'selectstart', function (e) { return false; }));
1347
- _this.lockListeners.push(_this.renderer.listen(_this.elRef.nativeElement, 'dragstart', function (e) { return false; }));
1348
- });
1349
- };
1350
- MtxSplitPaneDirective.prototype.unlockEvents = function () {
1351
- while (this.lockListeners.length > 0) {
1352
- var fct = this.lockListeners.pop();
1353
- if (fct) {
1354
- fct();
1355
- }
1356
- }
1357
- };
1358
- MtxSplitPaneDirective.prototype.ngOnDestroy = function () {
1359
- this.unlockEvents();
1360
- if (this.transitionListener) {
1361
- this.transitionListener();
1362
- }
1363
- this.split.removeArea(this);
1364
- };
1365
- return MtxSplitPaneDirective;
1366
- }());
1367
- /** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
1368
- MtxSplitPaneDirective.decorators = [
1369
- { type: core$1.Directive, args: [{
1370
- selector: 'mtx-split-pane, [mtx-split-pane]',
1371
- exportAs: 'mtxSplitPane',
1372
- },] }
1373
- ];
1374
- /**
1375
- * @type {function(): !Array<(null|{
1376
- * type: ?,
1377
- * decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>),
1378
- * })>}
1379
- * @nocollapse
1380
- */
1381
- MtxSplitPaneDirective.ctorParameters = function () { return [
1382
- { type: core$1.NgZone },
1383
- { type: core$1.ElementRef },
1384
- { type: core$1.Renderer2 },
1385
- { type: MtxSplitComponent }
1386
- ]; };
1387
- /** @type {!Object<string, !Array<{type: !Function, args: (undefined|!Array<?>)}>>} */
1388
- MtxSplitPaneDirective.propDecorators = {
1389
- order: [{ type: core$1.Input }],
1390
- size: [{ type: core$1.Input }],
1391
- minSize: [{ type: core$1.Input }],
1392
- maxSize: [{ type: core$1.Input }],
1393
- lockSize: [{ type: core$1.Input }],
1394
- visible: [{ type: core$1.Input }]
1395
- };
1396
-
1397
- var MtxSplitModule = /** @class */ (function () {
1398
- function MtxSplitModule() {
1399
- }
1400
- return MtxSplitModule;
1401
- }());
1402
- /** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
1403
- MtxSplitModule.decorators = [
1404
- { type: core$1.NgModule, args: [{
1405
- imports: [common.CommonModule],
1406
- declarations: [MtxSplitComponent, MtxSplitPaneDirective],
1407
- exports: [MtxSplitComponent, MtxSplitPaneDirective],
1408
- },] }
1409
- ];
1410
-
1411
- /**
1412
- * Generated bundle index. Do not edit.
1413
- */
1414
-
1415
- exports.MtxSplitComponent = MtxSplitComponent;
1416
- exports.MtxSplitModule = MtxSplitModule;
1417
- exports.MtxSplitPaneDirective = MtxSplitPaneDirective;
1418
- exports.getAreaMaxSize = getAreaMaxSize;
1419
- exports.getAreaMinSize = getAreaMinSize;
1420
- exports.getElementPixelSize = getElementPixelSize;
1421
- exports.getGutterSideAbsorptionCapacity = getGutterSideAbsorptionCapacity;
1422
- exports.getInputBoolean = getInputBoolean;
1423
- exports.getInputPositiveNumber = getInputPositiveNumber;
1424
- exports.getPointFromEvent = getPointFromEvent;
1425
- exports.isUserSizesValid = isUserSizesValid;
1426
- exports.updateAreaSize = updateAreaSize;
1427
-
1428
- Object.defineProperty(exports, '__esModule', { value: true });
1429
-
1430
- }));
1431
- //# sourceMappingURL=mtxSplit.umd.js.map