@ptsecurity/mosaic 12.1.0 → 12.3.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 (302) hide show
  1. package/_theming.scss +38 -157
  2. package/_visual.scss +0 -1
  3. package/bundles/ptsecurity-mosaic-autocomplete.umd.js +18 -20
  4. package/bundles/ptsecurity-mosaic-autocomplete.umd.js.map +1 -1
  5. package/bundles/ptsecurity-mosaic-button-toggle.umd.js +15 -17
  6. package/bundles/ptsecurity-mosaic-button-toggle.umd.js.map +1 -1
  7. package/bundles/ptsecurity-mosaic-button.umd.js +17 -19
  8. package/bundles/ptsecurity-mosaic-button.umd.js.map +1 -1
  9. package/bundles/ptsecurity-mosaic-card.umd.js +11 -13
  10. package/bundles/ptsecurity-mosaic-card.umd.js.map +1 -1
  11. package/bundles/ptsecurity-mosaic-checkbox.umd.js +14 -16
  12. package/bundles/ptsecurity-mosaic-checkbox.umd.js.map +1 -1
  13. package/bundles/ptsecurity-mosaic-core.umd.js +122 -168
  14. package/bundles/ptsecurity-mosaic-core.umd.js.map +1 -1
  15. package/bundles/ptsecurity-mosaic-datepicker.umd.js +53 -48
  16. package/bundles/ptsecurity-mosaic-datepicker.umd.js.map +1 -1
  17. package/bundles/ptsecurity-mosaic-design-tokens.umd.js +3 -4
  18. package/bundles/ptsecurity-mosaic-design-tokens.umd.js.map +1 -1
  19. package/bundles/ptsecurity-mosaic-divider.umd.js +11 -13
  20. package/bundles/ptsecurity-mosaic-divider.umd.js.map +1 -1
  21. package/bundles/ptsecurity-mosaic-dropdown.umd.js +36 -23
  22. package/bundles/ptsecurity-mosaic-dropdown.umd.js.map +1 -1
  23. package/bundles/ptsecurity-mosaic-form-field.umd.js +737 -738
  24. package/bundles/ptsecurity-mosaic-form-field.umd.js.map +1 -1
  25. package/bundles/ptsecurity-mosaic-icon.umd.js +14 -16
  26. package/bundles/ptsecurity-mosaic-icon.umd.js.map +1 -1
  27. package/bundles/ptsecurity-mosaic-input.umd.js +45 -33
  28. package/bundles/ptsecurity-mosaic-input.umd.js.map +1 -1
  29. package/bundles/ptsecurity-mosaic-link.umd.js +11 -13
  30. package/bundles/ptsecurity-mosaic-link.umd.js.map +1 -1
  31. package/bundles/ptsecurity-mosaic-list.umd.js +37 -36
  32. package/bundles/ptsecurity-mosaic-list.umd.js.map +1 -1
  33. package/bundles/ptsecurity-mosaic-modal.umd.js +52 -44
  34. package/bundles/ptsecurity-mosaic-modal.umd.js.map +1 -1
  35. package/bundles/ptsecurity-mosaic-navbar.umd.js +40 -42
  36. package/bundles/ptsecurity-mosaic-navbar.umd.js.map +1 -1
  37. package/bundles/ptsecurity-mosaic-popover.umd.js +215 -34
  38. package/bundles/ptsecurity-mosaic-popover.umd.js.map +1 -1
  39. package/bundles/ptsecurity-mosaic-progress-bar.umd.js +12 -14
  40. package/bundles/ptsecurity-mosaic-progress-bar.umd.js.map +1 -1
  41. package/bundles/ptsecurity-mosaic-progress-spinner.umd.js +12 -14
  42. package/bundles/ptsecurity-mosaic-progress-spinner.umd.js.map +1 -1
  43. package/bundles/ptsecurity-mosaic-radio.umd.js +14 -16
  44. package/bundles/ptsecurity-mosaic-radio.umd.js.map +1 -1
  45. package/bundles/ptsecurity-mosaic-select.umd.js +22 -24
  46. package/bundles/ptsecurity-mosaic-select.umd.js.map +1 -1
  47. package/bundles/ptsecurity-mosaic-sidebar.umd.js +17 -19
  48. package/bundles/ptsecurity-mosaic-sidebar.umd.js.map +1 -1
  49. package/bundles/ptsecurity-mosaic-sidepanel.umd.js +62 -58
  50. package/bundles/ptsecurity-mosaic-sidepanel.umd.js.map +1 -1
  51. package/bundles/ptsecurity-mosaic-splitter.umd.js +245 -48
  52. package/bundles/ptsecurity-mosaic-splitter.umd.js.map +1 -1
  53. package/bundles/ptsecurity-mosaic-table.umd.js +11 -13
  54. package/bundles/ptsecurity-mosaic-table.umd.js.map +1 -1
  55. package/bundles/ptsecurity-mosaic-tabs.umd.js +56 -58
  56. package/bundles/ptsecurity-mosaic-tabs.umd.js.map +1 -1
  57. package/bundles/ptsecurity-mosaic-tags.umd.js +77 -73
  58. package/bundles/ptsecurity-mosaic-tags.umd.js.map +1 -1
  59. package/bundles/ptsecurity-mosaic-textarea.umd.js +12 -14
  60. package/bundles/ptsecurity-mosaic-textarea.umd.js.map +1 -1
  61. package/bundles/ptsecurity-mosaic-timepicker.umd.js +15 -16
  62. package/bundles/ptsecurity-mosaic-timepicker.umd.js.map +1 -1
  63. package/bundles/ptsecurity-mosaic-toggle.umd.js +11 -13
  64. package/bundles/ptsecurity-mosaic-toggle.umd.js.map +1 -1
  65. package/bundles/ptsecurity-mosaic-tooltip.umd.js +72 -23
  66. package/bundles/ptsecurity-mosaic-tooltip.umd.js.map +1 -1
  67. package/bundles/ptsecurity-mosaic-tree-select.umd.js +17 -18
  68. package/bundles/ptsecurity-mosaic-tree-select.umd.js.map +1 -1
  69. package/bundles/ptsecurity-mosaic-tree.umd.js +45 -53
  70. package/bundles/ptsecurity-mosaic-tree.umd.js.map +1 -1
  71. package/bundles/ptsecurity-mosaic.umd.js +2 -2
  72. package/core/pop-up/pop-up-trigger.d.ts +9 -12
  73. package/design-tokens/style-dictionary/build.js +6 -0
  74. package/design-tokens/style-dictionary/configs/index.js +2 -1
  75. package/design-tokens/tokens.d.ts +0 -1
  76. package/dropdown/dropdown-item.component.d.ts +1 -0
  77. package/esm2015/autocomplete/autocomplete-origin.directive.js +4 -4
  78. package/esm2015/autocomplete/autocomplete-trigger.directive.js +4 -4
  79. package/esm2015/autocomplete/autocomplete.component.js +4 -4
  80. package/esm2015/autocomplete/autocomplete.module.js +5 -5
  81. package/esm2015/button/button.component.js +10 -10
  82. package/esm2015/button/button.module.js +5 -5
  83. package/esm2015/button-toggle/button-toggle.component.js +7 -7
  84. package/esm2015/button-toggle/button-toggle.module.js +5 -5
  85. package/esm2015/card/card.component.js +4 -4
  86. package/esm2015/card/card.module.js +5 -5
  87. package/esm2015/checkbox/checkbox-module.js +5 -5
  88. package/esm2015/checkbox/checkbox-required-validator.js +4 -4
  89. package/esm2015/checkbox/checkbox.js +4 -4
  90. package/esm2015/core/common-behaviors/common-module.js +5 -5
  91. package/esm2015/core/error/error-options.js +7 -7
  92. package/esm2015/core/formatters/date/formatter.js +6 -5
  93. package/esm2015/core/formatters/index.js +5 -5
  94. package/esm2015/core/formatters/number/formatter.js +5 -5
  95. package/esm2015/core/forms/forms-module.js +5 -5
  96. package/esm2015/core/forms/forms.directive.js +7 -7
  97. package/esm2015/core/highlight/highlight.pipe.js +4 -4
  98. package/esm2015/core/highlight/index.js +5 -5
  99. package/esm2015/core/line/line.js +8 -8
  100. package/esm2015/core/option/action.js +4 -4
  101. package/esm2015/core/option/optgroup.js +4 -4
  102. package/esm2015/core/option/option-module.js +5 -5
  103. package/esm2015/core/option/option.js +4 -4
  104. package/esm2015/core/pop-up/pop-up-trigger.js +32 -66
  105. package/esm2015/core/pop-up/pop-up.js +4 -4
  106. package/esm2015/core/selection/pseudo-checkbox/pseudo-checkbox.js +4 -4
  107. package/esm2015/core/selection/pseudo-checkbox/pseudo-checkbox.module.js +5 -5
  108. package/esm2015/core/services/measure-scrollbar.service.js +4 -4
  109. package/esm2015/datepicker/calendar-body.component.js +4 -4
  110. package/esm2015/datepicker/calendar.component.js +7 -7
  111. package/esm2015/datepicker/datepicker-input.directive.js +12 -5
  112. package/esm2015/datepicker/datepicker-intl.js +4 -4
  113. package/esm2015/datepicker/datepicker-module.js +5 -5
  114. package/esm2015/datepicker/datepicker-toggle.component.js +7 -7
  115. package/esm2015/datepicker/datepicker.component.js +7 -7
  116. package/esm2015/datepicker/month-view.component.js +4 -4
  117. package/esm2015/datepicker/multi-year-view.component.js +4 -4
  118. package/esm2015/datepicker/year-view.component.js +4 -4
  119. package/esm2015/design-tokens/tokens.js +1 -2
  120. package/esm2015/divider/divider.component.js +4 -4
  121. package/esm2015/divider/divider.module.js +5 -5
  122. package/esm2015/dropdown/dropdown-content.directive.js +4 -4
  123. package/esm2015/dropdown/dropdown-item.component.js +11 -4
  124. package/esm2015/dropdown/dropdown-trigger.directive.js +13 -5
  125. package/esm2015/dropdown/dropdown.component.js +4 -4
  126. package/esm2015/dropdown/dropdown.module.js +5 -5
  127. package/esm2015/form-field/cleaner.js +9 -5
  128. package/esm2015/form-field/form-field.js +7 -7
  129. package/esm2015/form-field/form-field.module.js +5 -5
  130. package/esm2015/form-field/hint.js +4 -4
  131. package/esm2015/form-field/prefix.js +4 -4
  132. package/esm2015/form-field/stepper.js +4 -4
  133. package/esm2015/form-field/suffix.js +4 -4
  134. package/esm2015/icon/icon.component.js +7 -7
  135. package/esm2015/icon/icon.module.js +5 -5
  136. package/esm2015/input/input-number-validators.js +28 -14
  137. package/esm2015/input/input-number.js +4 -4
  138. package/esm2015/input/input.js +7 -7
  139. package/esm2015/input/input.module.js +5 -5
  140. package/esm2015/link/link.component.js +4 -4
  141. package/esm2015/link/link.module.js +5 -5
  142. package/esm2015/list/list-selection.component.js +24 -21
  143. package/esm2015/list/list.component.js +7 -7
  144. package/esm2015/list/list.module.js +5 -5
  145. package/esm2015/modal/css-unit.pipe.js +4 -4
  146. package/esm2015/modal/modal-control.service.js +4 -4
  147. package/esm2015/modal/modal.component.js +6 -4
  148. package/esm2015/modal/modal.directive.js +13 -13
  149. package/esm2015/modal/modal.module.js +9 -7
  150. package/esm2015/modal/modal.service.js +16 -9
  151. package/esm2015/navbar/navbar-item.component.js +21 -21
  152. package/esm2015/navbar/navbar.component.js +7 -7
  153. package/esm2015/navbar/navbar.module.js +5 -5
  154. package/esm2015/navbar/vertical-navbar.component.js +7 -7
  155. package/esm2015/popover/popover-confirm.component.js +116 -0
  156. package/esm2015/popover/popover.component.js +63 -20
  157. package/esm2015/popover/popover.module.js +13 -10
  158. package/esm2015/popover/public-api.js +2 -1
  159. package/esm2015/progress-bar/progress-bar.component.js +4 -4
  160. package/esm2015/progress-bar/progress-bar.module.js +5 -5
  161. package/esm2015/progress-spinner/progress-spinner.component.js +4 -4
  162. package/esm2015/progress-spinner/progress-spinner.module.js +5 -5
  163. package/esm2015/radio/radio.component.js +7 -7
  164. package/esm2015/radio/radio.module.js +5 -5
  165. package/esm2015/select/select.component.js +14 -14
  166. package/esm2015/select/select.module.js +5 -5
  167. package/esm2015/sidebar/sidebar.component.js +10 -10
  168. package/esm2015/sidebar/sidebar.module.js +5 -5
  169. package/esm2015/sidepanel/sidepanel-container.component.js +14 -13
  170. package/esm2015/sidepanel/sidepanel-directives.js +22 -18
  171. package/esm2015/sidepanel/sidepanel.module.js +12 -8
  172. package/esm2015/sidepanel/sidepanel.service.js +6 -5
  173. package/esm2015/splitter/splitter.component.js +198 -40
  174. package/esm2015/splitter/splitter.module.js +8 -6
  175. package/esm2015/table/table.component.js +4 -4
  176. package/esm2015/table/table.module.js +5 -5
  177. package/esm2015/tabs/paginated-tab-header.js +4 -4
  178. package/esm2015/tabs/tab-body.component.js +7 -7
  179. package/esm2015/tabs/tab-content.directive.js +4 -4
  180. package/esm2015/tabs/tab-group.component.js +19 -19
  181. package/esm2015/tabs/tab-header.component.js +4 -4
  182. package/esm2015/tabs/tab-label-wrapper.directive.js +4 -4
  183. package/esm2015/tabs/tab-label.directive.js +4 -4
  184. package/esm2015/tabs/tab-nav-bar/tab-nav-bar.js +7 -7
  185. package/esm2015/tabs/tab.component.js +4 -4
  186. package/esm2015/tabs/tabs.module.js +5 -5
  187. package/esm2015/tags/tag-input.js +4 -4
  188. package/esm2015/tags/tag-list.component.js +4 -4
  189. package/esm2015/tags/tag.component.js +61 -57
  190. package/esm2015/tags/tag.module.js +5 -5
  191. package/esm2015/textarea/textarea.component.js +4 -4
  192. package/esm2015/textarea/textarea.module.js +5 -5
  193. package/esm2015/timepicker/timepicker.directive.js +8 -7
  194. package/esm2015/timepicker/timepicker.module.js +5 -5
  195. package/esm2015/toggle/toggle.component.js +4 -4
  196. package/esm2015/toggle/toggle.module.js +5 -5
  197. package/esm2015/tooltip/tooltip.component.js +55 -16
  198. package/esm2015/tooltip/tooltip.module.js +5 -5
  199. package/esm2015/tree/node.js +4 -4
  200. package/esm2015/tree/outlet.js +4 -4
  201. package/esm2015/tree/padding.directive.js +5 -8
  202. package/esm2015/tree/toggle.js +11 -11
  203. package/esm2015/tree/tree-base.js +7 -7
  204. package/esm2015/tree/tree-option.component.js +5 -5
  205. package/esm2015/tree/tree-selection.component.js +4 -4
  206. package/esm2015/tree/tree.js +4 -4
  207. package/esm2015/tree/tree.module.js +5 -8
  208. package/esm2015/tree-select/tree-select.component.js +9 -8
  209. package/esm2015/tree-select/tree-select.module.js +5 -5
  210. package/fesm2015/ptsecurity-mosaic-autocomplete.js +13 -13
  211. package/fesm2015/ptsecurity-mosaic-autocomplete.js.map +1 -1
  212. package/fesm2015/ptsecurity-mosaic-button-toggle.js +10 -10
  213. package/fesm2015/ptsecurity-mosaic-button-toggle.js.map +1 -1
  214. package/fesm2015/ptsecurity-mosaic-button.js +13 -13
  215. package/fesm2015/ptsecurity-mosaic-button.js.map +1 -1
  216. package/fesm2015/ptsecurity-mosaic-card.js +7 -7
  217. package/fesm2015/ptsecurity-mosaic-card.js.map +1 -1
  218. package/fesm2015/ptsecurity-mosaic-checkbox.js +10 -10
  219. package/fesm2015/ptsecurity-mosaic-checkbox.js.map +1 -1
  220. package/fesm2015/ptsecurity-mosaic-core.js +102 -136
  221. package/fesm2015/ptsecurity-mosaic-core.js.map +1 -1
  222. package/fesm2015/ptsecurity-mosaic-datepicker.js +48 -41
  223. package/fesm2015/ptsecurity-mosaic-datepicker.js.map +1 -1
  224. package/fesm2015/ptsecurity-mosaic-design-tokens.js +0 -1
  225. package/fesm2015/ptsecurity-mosaic-design-tokens.js.map +1 -1
  226. package/fesm2015/ptsecurity-mosaic-divider.js +7 -7
  227. package/fesm2015/ptsecurity-mosaic-divider.js.map +1 -1
  228. package/fesm2015/ptsecurity-mosaic-dropdown.js +32 -17
  229. package/fesm2015/ptsecurity-mosaic-dropdown.js.map +1 -1
  230. package/fesm2015/ptsecurity-mosaic-form-field.js +30 -27
  231. package/fesm2015/ptsecurity-mosaic-form-field.js.map +1 -1
  232. package/fesm2015/ptsecurity-mosaic-icon.js +10 -10
  233. package/fesm2015/ptsecurity-mosaic-icon.js.map +1 -1
  234. package/fesm2015/ptsecurity-mosaic-input.js +40 -26
  235. package/fesm2015/ptsecurity-mosaic-input.js.map +1 -1
  236. package/fesm2015/ptsecurity-mosaic-link.js +7 -7
  237. package/fesm2015/ptsecurity-mosaic-link.js.map +1 -1
  238. package/fesm2015/ptsecurity-mosaic-list.js +33 -30
  239. package/fesm2015/ptsecurity-mosaic-list.js.map +1 -1
  240. package/fesm2015/ptsecurity-mosaic-modal.js +46 -35
  241. package/fesm2015/ptsecurity-mosaic-modal.js.map +1 -1
  242. package/fesm2015/ptsecurity-mosaic-navbar.js +36 -36
  243. package/fesm2015/ptsecurity-mosaic-navbar.js.map +1 -1
  244. package/fesm2015/ptsecurity-mosaic-popover.js +179 -30
  245. package/fesm2015/ptsecurity-mosaic-popover.js.map +1 -1
  246. package/fesm2015/ptsecurity-mosaic-progress-bar.js +7 -7
  247. package/fesm2015/ptsecurity-mosaic-progress-bar.js.map +1 -1
  248. package/fesm2015/ptsecurity-mosaic-progress-spinner.js +7 -7
  249. package/fesm2015/ptsecurity-mosaic-progress-spinner.js.map +1 -1
  250. package/fesm2015/ptsecurity-mosaic-radio.js +10 -10
  251. package/fesm2015/ptsecurity-mosaic-radio.js.map +1 -1
  252. package/fesm2015/ptsecurity-mosaic-select.js +17 -17
  253. package/fesm2015/ptsecurity-mosaic-select.js.map +1 -1
  254. package/fesm2015/ptsecurity-mosaic-sidebar.js +13 -13
  255. package/fesm2015/ptsecurity-mosaic-sidebar.js.map +1 -1
  256. package/fesm2015/ptsecurity-mosaic-sidepanel.js +50 -41
  257. package/fesm2015/ptsecurity-mosaic-sidepanel.js.map +1 -1
  258. package/fesm2015/ptsecurity-mosaic-splitter.js +204 -44
  259. package/fesm2015/ptsecurity-mosaic-splitter.js.map +1 -1
  260. package/fesm2015/ptsecurity-mosaic-table.js +7 -7
  261. package/fesm2015/ptsecurity-mosaic-table.js.map +1 -1
  262. package/fesm2015/ptsecurity-mosaic-tabs.js +52 -52
  263. package/fesm2015/ptsecurity-mosaic-tabs.js.map +1 -1
  264. package/fesm2015/ptsecurity-mosaic-tags.js +70 -66
  265. package/fesm2015/ptsecurity-mosaic-tags.js.map +1 -1
  266. package/fesm2015/ptsecurity-mosaic-textarea.js +7 -7
  267. package/fesm2015/ptsecurity-mosaic-textarea.js.map +1 -1
  268. package/fesm2015/ptsecurity-mosaic-timepicker.js +11 -10
  269. package/fesm2015/ptsecurity-mosaic-timepicker.js.map +1 -1
  270. package/fesm2015/ptsecurity-mosaic-toggle.js +7 -7
  271. package/fesm2015/ptsecurity-mosaic-toggle.js.map +1 -1
  272. package/fesm2015/ptsecurity-mosaic-tooltip.js +57 -18
  273. package/fesm2015/ptsecurity-mosaic-tooltip.js.map +1 -1
  274. package/fesm2015/ptsecurity-mosaic-tree-select.js +12 -11
  275. package/fesm2015/ptsecurity-mosaic-tree-select.js.map +1 -1
  276. package/fesm2015/ptsecurity-mosaic-tree.js +40 -46
  277. package/fesm2015/ptsecurity-mosaic-tree.js.map +1 -1
  278. package/form-field/cleaner.d.ts +2 -0
  279. package/input/input-number-validators.d.ts +2 -2
  280. package/modal/modal.component.d.ts +2 -0
  281. package/modal/modal.module.d.ts +1 -1
  282. package/package.json +5 -5
  283. package/popover/popover-confirm.component.d.ts +33 -0
  284. package/popover/popover.component.d.ts +14 -4
  285. package/popover/popover.module.d.ts +6 -3
  286. package/popover/public-api.d.ts +1 -0
  287. package/prebuilt-themes/dark-theme.css +1 -1
  288. package/prebuilt-themes/default-theme.css +1 -1
  289. package/prebuilt-visual/default-visual.css +1 -1
  290. package/select/select.component.d.ts +2 -7
  291. package/sidepanel/sidepanel-directives.d.ts +2 -0
  292. package/sidepanel/sidepanel.module.d.ts +2 -1
  293. package/splitter/splitter.component.d.ts +46 -5
  294. package/splitter/splitter.module.d.ts +1 -1
  295. package/tags/tag.component.d.ts +20 -20
  296. package/tooltip/tooltip.component.d.ts +12 -3
  297. package/tree/padding.directive.d.ts +1 -1
  298. package/tree/toggle.d.ts +1 -1
  299. package/tree/tree-option.component.d.ts +1 -1
  300. package/tree/tree-selection.component.d.ts +2 -2
  301. package/tree/tree.module.d.ts +1 -1
  302. package/tree-select/tree-select.component.d.ts +2 -7
@@ -1,7 +1,7 @@
1
1
  import * as i1 from '@angular/common';
2
2
  import { CommonModule } from '@angular/common';
3
3
  import * as i0 from '@angular/core';
4
- import { Directive, Input, Component, ViewEncapsulation, ChangeDetectionStrategy, ViewChildren, NgModule } from '@angular/core';
4
+ import { Directive, Input, EventEmitter, Component, ViewEncapsulation, ChangeDetectionStrategy, Output, ViewChildren, ViewChild, NgModule } from '@angular/core';
5
5
  import { McIconModule } from '@ptsecurity/mosaic/icon';
6
6
  import { coerceNumberProperty, coerceCssPixelValue, coerceBooleanProperty } from '@angular/cdk/coercion';
7
7
 
@@ -37,32 +37,38 @@ class McGutterDirective {
37
37
  set size(size) {
38
38
  this._size = coerceNumberProperty(size);
39
39
  }
40
+ get isVertical() {
41
+ return this._direction === Direction.Vertical;
42
+ }
40
43
  ngOnInit() {
41
44
  this.setStyle("flex-basis" /* FlexBasis */, coerceCssPixelValue(this.size));
42
- this.setStyle(this.isVertical() ? "height" /* Height */ : "width" /* Width */, coerceCssPixelValue(this.size));
45
+ this.setStyle(this.isVertical ? "height" /* Height */ : "width" /* Width */, coerceCssPixelValue(this.size));
43
46
  this.setStyle("order" /* Order */, this.order);
44
- if (!this.isVertical()) {
47
+ if (!this.isVertical) {
45
48
  this.setStyle("height" /* Height */, '100%');
46
49
  }
47
50
  // fix IE issue with gutter icon. flex-direction is requied for flex alignment options
48
- this.setStyle("flex-direction" /* FlexDirection */, this.isVertical() ? 'row' : 'column');
51
+ this.setStyle("flex-direction" /* FlexDirection */, this.isVertical ? 'row' : 'column');
49
52
  }
50
- isVertical() {
51
- return this.direction === Direction.Vertical;
53
+ getPosition() {
54
+ return {
55
+ x: this.elementRef.nativeElement.offsetLeft,
56
+ y: this.elementRef.nativeElement.offsetTop
57
+ };
52
58
  }
53
59
  setStyle(property, value) {
54
60
  this.renderer.setStyle(this.elementRef.nativeElement, property, value);
55
61
  }
56
62
  }
57
- /** @nocollapse */ McGutterDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0, type: McGutterDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
58
- /** @nocollapse */ McGutterDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.5", type: McGutterDirective, selector: "mc-gutter", inputs: { direction: "direction", order: "order", size: "size" }, host: { listeners: { "mousedown": "dragged = true" }, properties: { "class.mc-gutter_vertical": "isVertical()", "class.mc-gutter_dragged": "dragged" }, classAttribute: "mc-gutter" }, ngImport: i0 });
59
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0, type: McGutterDirective, decorators: [{
63
+ /** @nocollapse */ McGutterDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: McGutterDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
64
+ /** @nocollapse */ McGutterDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.13", type: McGutterDirective, selector: "mc-gutter", inputs: { direction: "direction", order: "order", size: "size" }, host: { listeners: { "mousedown": "dragged = true" }, properties: { "class.mc-gutter_vertical": "isVertical", "class.mc-gutter_dragged": "dragged" }, classAttribute: "mc-gutter" }, ngImport: i0 });
65
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: McGutterDirective, decorators: [{
60
66
  type: Directive,
61
67
  args: [{
62
68
  selector: 'mc-gutter',
63
69
  host: {
64
70
  class: 'mc-gutter',
65
- '[class.mc-gutter_vertical]': 'isVertical()',
71
+ '[class.mc-gutter_vertical]': 'isVertical',
66
72
  '[class.mc-gutter_dragged]': 'dragged',
67
73
  '(mousedown)': 'dragged = true'
68
74
  }
@@ -74,19 +80,96 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImpor
74
80
  }], size: [{
75
81
  type: Input
76
82
  }] } });
83
+ class McGutterGhostDirective {
84
+ constructor(elementRef, renderer) {
85
+ this.elementRef = elementRef;
86
+ this.renderer = renderer;
87
+ this._x = 0;
88
+ this._y = 0;
89
+ this._direction = Direction.Vertical;
90
+ this._size = 6;
91
+ }
92
+ get x() {
93
+ return this._x;
94
+ }
95
+ set x(x) {
96
+ this._x = x;
97
+ this.setStyle("left" /* Left */, coerceCssPixelValue(x));
98
+ }
99
+ get y() {
100
+ return this._y;
101
+ }
102
+ set y(y) {
103
+ this._y = y;
104
+ this.setStyle("top" /* Top */, coerceCssPixelValue(y));
105
+ }
106
+ get direction() {
107
+ return this._direction;
108
+ }
109
+ set direction(direction) {
110
+ this._direction = direction;
111
+ this.updateDimensions();
112
+ }
113
+ get size() {
114
+ return this._size;
115
+ }
116
+ set size(size) {
117
+ this._size = coerceNumberProperty(size);
118
+ this.updateDimensions();
119
+ }
120
+ get isVertical() {
121
+ return this.direction === Direction.Vertical;
122
+ }
123
+ updateDimensions() {
124
+ this.setStyle(this.isVertical ? "width" /* Width */ : "height" /* Height */, '100%');
125
+ this.setStyle(this.isVertical ? "height" /* Height */ : "width" /* Width */, coerceCssPixelValue(this.size));
126
+ }
127
+ setStyle(property, value) {
128
+ this.renderer.setStyle(this.elementRef.nativeElement, property, value);
129
+ }
130
+ }
131
+ /** @nocollapse */ McGutterGhostDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: McGutterGhostDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
132
+ /** @nocollapse */ McGutterGhostDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.13", type: McGutterGhostDirective, selector: "mc-gutter-ghost", inputs: { visible: "visible", x: "x", y: "y", direction: "direction", size: "size" }, host: { properties: { "class.mc-gutter-ghost_vertical": "isVertical", "class.mc-gutter-ghost_visible": "visible" }, classAttribute: "mc-gutter-ghost" }, ngImport: i0 });
133
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: McGutterGhostDirective, decorators: [{
134
+ type: Directive,
135
+ args: [{
136
+ selector: 'mc-gutter-ghost',
137
+ host: {
138
+ class: 'mc-gutter-ghost',
139
+ '[class.mc-gutter-ghost_vertical]': 'isVertical',
140
+ '[class.mc-gutter-ghost_visible]': 'visible'
141
+ }
142
+ }]
143
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { visible: [{
144
+ type: Input
145
+ }], x: [{
146
+ type: Input
147
+ }], y: [{
148
+ type: Input
149
+ }], direction: [{
150
+ type: Input
151
+ }], size: [{
152
+ type: Input
153
+ }] } });
77
154
  class McSplitterComponent {
78
155
  constructor(elementRef, changeDetectorRef, ngZone, renderer) {
79
156
  this.elementRef = elementRef;
80
157
  this.changeDetectorRef = changeDetectorRef;
81
158
  this.ngZone = ngZone;
82
159
  this.renderer = renderer;
160
+ this.gutterPositionChange = new EventEmitter();
83
161
  this.areas = [];
84
- this.isDragging = false;
162
+ this._isDragging = false;
85
163
  this.areaPositionDivider = 2;
86
164
  this.listeners = [];
87
165
  this._hideGutters = false;
88
166
  this._disabled = false;
167
+ this._useGhost = false;
89
168
  this._gutterSize = 6;
169
+ this._resizing = false;
170
+ }
171
+ get isDragging() {
172
+ return this._isDragging;
90
173
  }
91
174
  get hideGutters() {
92
175
  return this._hideGutters;
@@ -106,6 +189,12 @@ class McSplitterComponent {
106
189
  set disabled(disabled) {
107
190
  this._disabled = coerceBooleanProperty(disabled);
108
191
  }
192
+ get useGhost() {
193
+ return this._useGhost;
194
+ }
195
+ set useGhost(useGhost) {
196
+ this._useGhost = coerceBooleanProperty(useGhost);
197
+ }
109
198
  get gutterSize() {
110
199
  return this._gutterSize;
111
200
  }
@@ -113,6 +202,9 @@ class McSplitterComponent {
113
202
  const size = coerceNumberProperty(gutterSize);
114
203
  this._gutterSize = size > 0 ? size : this.gutterSize;
115
204
  }
205
+ get resizing() {
206
+ return this._resizing;
207
+ }
116
208
  addArea(area) {
117
209
  const index = this.areas.length;
118
210
  const order = index * this.areaPositionDivider;
@@ -136,26 +228,41 @@ class McSplitterComponent {
136
228
  return;
137
229
  }
138
230
  event.preventDefault();
139
- const leftArea = this.areas[leftAreaIndex];
140
- const rightArea = this.areas[rightAreaIndex];
141
231
  const startPoint = {
142
232
  x: event.screenX,
143
233
  y: event.screenY
144
234
  };
235
+ const leftArea = this.areas[leftAreaIndex];
236
+ const rightArea = this.areas[rightAreaIndex];
145
237
  leftArea.initialSize = leftArea.area.getSize();
146
238
  rightArea.initialSize = rightArea.area.getSize();
147
- this.areas.forEach((item) => {
148
- const size = item.area.getSize();
149
- item.area.disableFlex();
150
- item.area.setSize(size);
151
- });
152
- this.ngZone.runOutsideAngular(() => {
153
- this.listeners.push(this.renderer.listen('document', 'mouseup', () => this.onMouseUp()));
154
- });
239
+ let currentGutter;
240
+ if (this.useGhost) {
241
+ // tslint:disable-next-line:no-magic-numbers
242
+ const gutterOrder = leftAreaIndex * 2 + 1;
243
+ currentGutter = this.gutters.find((gutter) => gutter.order === gutterOrder);
244
+ if (currentGutter) {
245
+ const gutterPosition = currentGutter.getPosition();
246
+ this.ghost.direction = currentGutter.direction;
247
+ this.ghost.size = currentGutter.size;
248
+ this.ghost.x = gutterPosition.x;
249
+ this.ghost.y = gutterPosition.y;
250
+ this.ghost.visible = true;
251
+ this.setStyle("cursor" /* Cursor */, currentGutter.direction === Direction.Vertical ? 'row-resize' : 'col-resize');
252
+ }
253
+ }
254
+ else {
255
+ this.areas.forEach((item) => {
256
+ const size = item.area.getSize();
257
+ item.area.disableFlex();
258
+ item.area.setSize(size);
259
+ });
260
+ }
261
+ this.listeners.push(this.renderer.listen('document', 'mouseup', () => this.onMouseUp(leftArea, rightArea, currentGutter)));
155
262
  this.ngZone.runOutsideAngular(() => {
156
- this.listeners.push(this.renderer.listen('document', 'mousemove', (e) => this.onMouseMove(e, startPoint, leftArea, rightArea)));
263
+ this.listeners.push(this.renderer.listen('document', 'mousemove', (e) => this.onMouseMove(e, startPoint, leftArea, rightArea, currentGutter)));
157
264
  });
158
- this.isDragging = true;
265
+ this._isDragging = true;
159
266
  }
160
267
  removeArea(area) {
161
268
  let indexToRemove = -1;
@@ -182,7 +289,7 @@ class McSplitterComponent {
182
289
  }
183
290
  });
184
291
  }
185
- onMouseMove(event, startPoint, leftArea, rightArea) {
292
+ onMouseMove(event, startPoint, leftArea, rightArea, currentGutter) {
186
293
  if (!this.isDragging || this.disabled) {
187
294
  return;
188
295
  }
@@ -193,11 +300,28 @@ class McSplitterComponent {
193
300
  const offset = this.isVertical()
194
301
  ? startPoint.y - endPoint.y
195
302
  : startPoint.x - endPoint.x;
196
- const newLeftAreaSize = leftArea.initialSize - offset;
197
- const newRightAreaSize = rightArea.initialSize + offset;
303
+ if (this.useGhost && currentGutter) {
304
+ const gutterPosition = currentGutter.getPosition();
305
+ const leftPos = leftArea.area.getPosition();
306
+ const rightPos = rightArea.area.getPosition();
307
+ const rightMin = rightArea.area.getMinSize() || 0;
308
+ const leftMin = leftArea.area.getMinSize() || 0;
309
+ const key = this.isVertical() ? 'y' : 'x';
310
+ const minPos = leftPos[key] - leftMin;
311
+ const maxPos = rightPos[key] + (rightArea.area.getSize() || 0) - rightMin - currentGutter.size;
312
+ const newPos = gutterPosition[key] - offset;
313
+ this.ghost[key] = newPos < minPos ? minPos : Math.min(newPos, maxPos);
314
+ }
315
+ else {
316
+ this.resizeAreas(leftArea, rightArea, offset);
317
+ }
318
+ }
319
+ resizeAreas(leftArea, rightArea, sizeOffset) {
320
+ const newLeftAreaSize = leftArea.initialSize - sizeOffset;
321
+ const newRightAreaSize = rightArea.initialSize + sizeOffset;
198
322
  const minLeftAreaSize = leftArea.area.getMinSize();
199
323
  const minRightAreaSize = rightArea.area.getMinSize();
200
- if (newLeftAreaSize <= minLeftAreaSize || newRightAreaSize <= minRightAreaSize) {
324
+ if (newLeftAreaSize < minLeftAreaSize || newRightAreaSize < minRightAreaSize) {
201
325
  return;
202
326
  }
203
327
  else if (newLeftAreaSize <= 0) {
@@ -213,23 +337,33 @@ class McSplitterComponent {
213
337
  rightArea.area.setSize(newRightAreaSize);
214
338
  }
215
339
  }
216
- onMouseUp() {
340
+ onMouseUp(leftArea, rightArea, currentGutter) {
217
341
  while (this.listeners.length > 0) {
218
342
  const unsubscribe = this.listeners.pop();
219
343
  if (unsubscribe) {
220
344
  unsubscribe();
221
345
  }
222
346
  }
223
- this.isDragging = false;
347
+ if (this.useGhost && currentGutter) {
348
+ const gutterPosition = currentGutter.getPosition();
349
+ const offset = this.ghost.direction === Direction.Vertical ?
350
+ gutterPosition.y - this.ghost.y :
351
+ gutterPosition.x - this.ghost.x;
352
+ this.resizeAreas(leftArea, rightArea, offset);
353
+ this.ghost.visible = false;
354
+ this.setStyle("cursor" /* Cursor */, 'unset');
355
+ }
356
+ this._isDragging = false;
224
357
  this.updateGutter();
358
+ this.gutterPositionChange.emit();
225
359
  }
226
360
  setStyle(property, value) {
227
361
  this.renderer.setStyle(this.elementRef.nativeElement, property, value);
228
362
  }
229
363
  }
230
- /** @nocollapse */ McSplitterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0, type: McSplitterComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
231
- /** @nocollapse */ McSplitterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.5", type: McSplitterComponent, selector: "mc-splitter", inputs: { hideGutters: "hideGutters", direction: "direction", disabled: "disabled", gutterSize: "gutterSize" }, host: { classAttribute: "mc-splitter" }, viewQueries: [{ propertyName: "gutters", predicate: McGutterDirective, descendants: true }], exportAs: ["mcSplitter"], ngImport: i0, template: "<ng-content></ng-content>\n\n<ng-template ngFor let-area [ngForOf]=\"areas\" let-index=\"index\" let-last=\"last\">\n <mc-gutter *ngIf=\"last === false\"\n [direction]=\"direction\"\n [attr.disabled]=\"disabled || null\"\n [style.display]=\"hideGutters ? 'none' : 'flex'\"\n [size]=\"gutterSize\"\n [order]=\"index * 2 + 1\"\n (mousedown)=\"onMouseDown($event, index, index + 1)\">\n </mc-gutter>\n</ng-template>\n", styles: [".mc-splitter{display:flex;flex-wrap:nowrap;align-items:stretch;overflow:hidden}.mc-splitter .mc-splitter-area{overflow:hidden}.mc-gutter{display:flex;flex-grow:0;flex-shrink:0;justify-content:center;align-items:center;overflow:hidden}.mc-gutter.mc-gutter_vertical>.mc-icon{transform:rotate(90deg)}\n"], directives: [{ type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: McGutterDirective, selector: "mc-gutter", inputs: ["direction", "order", "size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
232
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0, type: McSplitterComponent, decorators: [{
364
+ /** @nocollapse */ McSplitterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: McSplitterComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
365
+ /** @nocollapse */ McSplitterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: McSplitterComponent, selector: "mc-splitter", inputs: { hideGutters: "hideGutters", direction: "direction", disabled: "disabled", useGhost: "useGhost", gutterSize: "gutterSize" }, outputs: { gutterPositionChange: "gutterPositionChange" }, host: { classAttribute: "mc-splitter" }, viewQueries: [{ propertyName: "ghost", first: true, predicate: McGutterGhostDirective, descendants: true }, { propertyName: "gutters", predicate: McGutterDirective, descendants: true }], exportAs: ["mcSplitter"], ngImport: i0, template: "<ng-content></ng-content>\n\n<ng-template ngFor let-area [ngForOf]=\"areas\" let-index=\"index\" let-last=\"last\">\n <mc-gutter *ngIf=\"last === false\"\n [direction]=\"direction\"\n [attr.disabled]=\"disabled || null\"\n [style.display]=\"hideGutters ? 'none' : 'flex'\"\n [size]=\"gutterSize\"\n [order]=\"index * 2 + 1\"\n (mousedown)=\"onMouseDown($event, index, index + 1)\">\n </mc-gutter>\n</ng-template>\n\n<mc-gutter-ghost *ngIf=\"useGhost\"></mc-gutter-ghost>\n", styles: [".mc-splitter{display:flex;position:relative;flex-wrap:nowrap;align-items:stretch;overflow:hidden}.mc-splitter .mc-splitter-area{overflow:hidden}.mc-splitter .mc-splitter-area_resizing{pointer-events:none}.mc-gutter{display:flex;flex-grow:0;flex-shrink:0;justify-content:center;align-items:center;overflow:hidden}.mc-gutter.mc-gutter_vertical>.mc-icon{transform:rotate(90deg)}.mc-gutter-ghost{position:absolute;z-index:999;display:none;overflow:hidden}.mc-gutter-ghost.mc-gutter-ghost_vertical>.mc-icon{transform:rotate(90deg)}.mc-gutter-ghost.mc-gutter-ghost_visible{display:block}\n"], directives: [{ type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: McGutterDirective, selector: "mc-gutter", inputs: ["direction", "order", "size"] }, { type: McGutterGhostDirective, selector: "mc-gutter-ghost", inputs: ["visible", "x", "y", "direction", "size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
366
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: McSplitterComponent, decorators: [{
233
367
  type: Component,
234
368
  args: [{
235
369
  selector: 'mc-splitter',
@@ -243,15 +377,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImpor
243
377
  encapsulation: ViewEncapsulation.None,
244
378
  changeDetection: ChangeDetectionStrategy.OnPush
245
379
  }]
246
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: i0.Renderer2 }]; }, propDecorators: { gutters: [{
380
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: i0.Renderer2 }]; }, propDecorators: { gutterPositionChange: [{
381
+ type: Output
382
+ }], gutters: [{
247
383
  type: ViewChildren,
248
384
  args: [McGutterDirective]
385
+ }], ghost: [{
386
+ type: ViewChild,
387
+ args: [McGutterGhostDirective]
249
388
  }], hideGutters: [{
250
389
  type: Input
251
390
  }], direction: [{
252
391
  type: Input
253
392
  }], disabled: [{
254
393
  type: Input
394
+ }], useGhost: [{
395
+ type: Input
255
396
  }], gutterSize: [{
256
397
  type: Input
257
398
  }] } });
@@ -260,6 +401,10 @@ class McSplitterAreaDirective {
260
401
  this.elementRef = elementRef;
261
402
  this.renderer = renderer;
262
403
  this.splitter = splitter;
404
+ this.sizeChange = new EventEmitter();
405
+ }
406
+ isResizing() {
407
+ return this.splitter.isDragging;
263
408
  }
264
409
  disableFlex() {
265
410
  this.renderer.removeStyle(this.elementRef.nativeElement, 'flex');
@@ -275,6 +420,7 @@ class McSplitterAreaDirective {
275
420
  this.setStyle("height" /* Height */, '100%');
276
421
  this.removeStyle("width" /* Width */);
277
422
  }
423
+ this.splitter.gutterPositionChange.subscribe(() => this.emitSizeChange());
278
424
  }
279
425
  ngOnDestroy() {
280
426
  this.splitter.removeArea(this);
@@ -283,7 +429,7 @@ class McSplitterAreaDirective {
283
429
  this.setStyle("order" /* Order */, order);
284
430
  }
285
431
  setSize(size) {
286
- if (size) {
432
+ if (!isNaN(size)) {
287
433
  const sz = coerceNumberProperty(size);
288
434
  this.setStyle(this.getSizeProperty(), coerceCssPixelValue(sz));
289
435
  }
@@ -291,6 +437,12 @@ class McSplitterAreaDirective {
291
437
  getSize() {
292
438
  return this.elementRef.nativeElement[this.getOffsetSizeProperty()];
293
439
  }
440
+ getPosition() {
441
+ return {
442
+ x: this.elementRef.nativeElement.offsetLeft,
443
+ y: this.elementRef.nativeElement.offsetTop
444
+ };
445
+ }
294
446
  getMinSize() {
295
447
  const styles = getComputedStyle(this.elementRef.nativeElement);
296
448
  return parseFloat(styles[this.getMinSizeProperty()]);
@@ -319,33 +471,40 @@ class McSplitterAreaDirective {
319
471
  removeStyle(style) {
320
472
  this.renderer.removeStyle(this.elementRef.nativeElement, style);
321
473
  }
474
+ emitSizeChange() {
475
+ this.sizeChange.emit(this.getSize());
476
+ }
322
477
  }
323
- /** @nocollapse */ McSplitterAreaDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0, type: McSplitterAreaDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: McSplitterComponent }], target: i0.ɵɵFactoryTarget.Directive });
324
- /** @nocollapse */ McSplitterAreaDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.5", type: McSplitterAreaDirective, selector: "[mc-splitter-area]", host: { classAttribute: "mc-splitter-area" }, ngImport: i0 });
325
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0, type: McSplitterAreaDirective, decorators: [{
478
+ /** @nocollapse */ McSplitterAreaDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: McSplitterAreaDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: McSplitterComponent }], target: i0.ɵɵFactoryTarget.Directive });
479
+ /** @nocollapse */ McSplitterAreaDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.13", type: McSplitterAreaDirective, selector: "[mc-splitter-area]", outputs: { sizeChange: "sizeChange" }, host: { properties: { "class.mc-splitter-area_resizing": "isResizing()" }, classAttribute: "mc-splitter-area" }, ngImport: i0 });
480
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: McSplitterAreaDirective, decorators: [{
326
481
  type: Directive,
327
482
  args: [{
328
483
  selector: '[mc-splitter-area]',
329
484
  host: {
330
- class: 'mc-splitter-area'
485
+ class: 'mc-splitter-area',
486
+ '[class.mc-splitter-area_resizing]': 'isResizing()'
331
487
  }
332
488
  }]
333
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: McSplitterComponent }]; } });
489
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: McSplitterComponent }]; }, propDecorators: { sizeChange: [{
490
+ type: Output
491
+ }] } });
334
492
 
335
493
  class McSplitterModule {
336
494
  }
337
- /** @nocollapse */ McSplitterModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0, type: McSplitterModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
338
- /** @nocollapse */ McSplitterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0, type: McSplitterModule, declarations: [McGutterDirective,
495
+ /** @nocollapse */ McSplitterModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: McSplitterModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
496
+ /** @nocollapse */ McSplitterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: McSplitterModule, declarations: [McGutterDirective,
497
+ McGutterGhostDirective,
339
498
  McSplitterAreaDirective,
340
499
  McSplitterComponent], imports: [CommonModule,
341
500
  McIconModule], exports: [McGutterDirective,
342
501
  McSplitterAreaDirective,
343
502
  McSplitterComponent] });
344
- /** @nocollapse */ McSplitterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0, type: McSplitterModule, imports: [[
503
+ /** @nocollapse */ McSplitterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: McSplitterModule, imports: [[
345
504
  CommonModule,
346
505
  McIconModule
347
506
  ]] });
348
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0, type: McSplitterModule, decorators: [{
507
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: McSplitterModule, decorators: [{
349
508
  type: NgModule,
350
509
  args: [{
351
510
  imports: [
@@ -359,6 +518,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImpor
359
518
  ],
360
519
  declarations: [
361
520
  McGutterDirective,
521
+ McGutterGhostDirective,
362
522
  McSplitterAreaDirective,
363
523
  McSplitterComponent
364
524
  ]
@@ -369,5 +529,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImpor
369
529
  * Generated bundle index. Do not edit.
370
530
  */
371
531
 
372
- export { Direction, McGutterDirective, McSplitterAreaDirective, McSplitterComponent, McSplitterModule };
532
+ export { Direction, McGutterDirective, McGutterGhostDirective, McSplitterAreaDirective, McSplitterComponent, McSplitterModule };
373
533
  //# sourceMappingURL=ptsecurity-mosaic-splitter.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ptsecurity-mosaic-splitter.js","sources":["../../../packages/mosaic/splitter/splitter.component.ts","../../../packages/mosaic/splitter/splitter.component.html","../../../packages/mosaic/splitter/splitter.module.ts","../../../packages/mosaic/splitter/ptsecurity-mosaic-splitter.ts"],"sourcesContent":["import { coerceBooleanProperty, coerceCssPixelValue, coerceNumberProperty } from '@angular/cdk/coercion';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n Directive,\n ElementRef,\n Input,\n NgZone,\n OnDestroy,\n OnInit,\n QueryList,\n Renderer2,\n ViewChildren,\n ViewEncapsulation\n} from '@angular/core';\n\n\ninterface IArea {\n area: McSplitterAreaDirective;\n index: number;\n order: number;\n initialSize: number;\n}\n\ninterface IPoint {\n x: number;\n y: number;\n}\n\nconst enum StyleProperty {\n Flex = 'flex',\n FlexBasis = 'flex-basis',\n FlexDirection = 'flex-direction',\n Height = 'height',\n MaxWidth = 'max-width',\n MinHeight = 'min-height',\n MinWidth = 'minWidth',\n OffsetHeight = 'offsetHeight',\n OffsetWidth = 'offsetWidth',\n Order = 'order',\n Width = 'width'\n}\n\nexport enum Direction {\n Horizontal = 'horizontal',\n Vertical = 'vertical'\n}\n\n\n@Directive({\n selector: 'mc-gutter',\n host: {\n class: 'mc-gutter',\n '[class.mc-gutter_vertical]': 'isVertical()',\n '[class.mc-gutter_dragged]': 'dragged',\n '(mousedown)': 'dragged = true'\n }\n})\nexport class McGutterDirective implements OnInit {\n get direction(): Direction {\n return this._direction;\n }\n\n @Input()\n set direction(direction: Direction) {\n this._direction = direction;\n }\n\n private _direction: Direction = Direction.Vertical;\n\n get order(): number {\n return this._order;\n }\n\n @Input()\n set order(order: number) {\n this._order = coerceNumberProperty(order);\n }\n\n private _order: number = 0;\n\n get size(): number {\n return this._size;\n }\n\n @Input()\n set size(size: number) {\n this._size = coerceNumberProperty(size);\n }\n\n private _size: number = 6;\n\n dragged: boolean = false;\n\n constructor(\n private elementRef: ElementRef,\n private renderer: Renderer2\n ) {}\n\n ngOnInit(): void {\n this.setStyle(StyleProperty.FlexBasis, coerceCssPixelValue(this.size));\n this.setStyle(this.isVertical() ? StyleProperty.Height : StyleProperty.Width, coerceCssPixelValue(this.size));\n this.setStyle(StyleProperty.Order, this.order);\n\n if (!this.isVertical()) {\n this.setStyle(StyleProperty.Height, '100%');\n }\n\n // fix IE issue with gutter icon. flex-direction is requied for flex alignment options\n this.setStyle(StyleProperty.FlexDirection, this.isVertical() ? 'row' : 'column');\n }\n\n isVertical(): boolean {\n return this.direction === Direction.Vertical;\n }\n\n private setStyle(property: StyleProperty, value: string | number) {\n this.renderer.setStyle(this.elementRef.nativeElement, property, value);\n }\n}\n\n\n@Component({\n selector: 'mc-splitter',\n exportAs: 'mcSplitter',\n host: {\n class: 'mc-splitter'\n },\n preserveWhitespaces: false,\n styleUrls: ['splitter.scss'],\n templateUrl: './splitter.component.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class McSplitterComponent implements OnInit {\n readonly areas: IArea[] = [];\n\n @ViewChildren(McGutterDirective) gutters: QueryList<McGutterDirective>;\n\n private isDragging: boolean = false;\n\n private readonly areaPositionDivider: number = 2;\n private readonly listeners: (() => void)[] = [];\n\n get hideGutters(): boolean {\n return this._hideGutters;\n }\n\n @Input()\n set hideGutters(value: boolean) {\n this._hideGutters = coerceBooleanProperty(value);\n }\n\n private _hideGutters: boolean = false;\n\n get direction(): Direction {\n return this._direction;\n }\n\n @Input()\n set direction(direction: Direction) {\n this._direction = direction;\n }\n\n private _direction: Direction;\n\n get disabled(): boolean {\n return this._disabled;\n }\n\n @Input()\n set disabled(disabled: boolean) {\n this._disabled = coerceBooleanProperty(disabled);\n }\n\n private _disabled: boolean = false;\n\n get gutterSize(): number {\n return this._gutterSize;\n }\n\n @Input()\n set gutterSize(gutterSize: number) {\n const size = coerceNumberProperty(gutterSize);\n this._gutterSize = size > 0 ? size : this.gutterSize;\n }\n\n private _gutterSize: number = 6;\n\n constructor(\n public elementRef: ElementRef,\n public changeDetectorRef: ChangeDetectorRef,\n private ngZone: NgZone,\n private renderer: Renderer2\n ) {}\n\n addArea(area: McSplitterAreaDirective): void {\n const index: number = this.areas.length;\n const order: number = index * this.areaPositionDivider;\n const size: number = area.getSize();\n\n area.setOrder(order);\n\n this.areas.push({\n area,\n index,\n order,\n initialSize: size\n });\n }\n\n ngOnInit(): void {\n if (!this.direction) {\n this.direction = Direction.Horizontal;\n }\n\n this.setStyle(StyleProperty.FlexDirection, this.isVertical() ? 'column' : 'row');\n }\n\n onMouseDown(event: MouseEvent, leftAreaIndex: number, rightAreaIndex: number) {\n if (this.disabled) { return; }\n\n event.preventDefault();\n\n const leftArea = this.areas[leftAreaIndex];\n const rightArea = this.areas[rightAreaIndex];\n\n const startPoint: IPoint = {\n x: event.screenX,\n y: event.screenY\n };\n\n leftArea.initialSize = leftArea.area.getSize();\n rightArea.initialSize = rightArea.area.getSize();\n\n this.areas.forEach((item) => {\n const size = item.area.getSize();\n item.area.disableFlex();\n item.area.setSize(size);\n });\n\n this.ngZone.runOutsideAngular(() => {\n this.listeners.push(\n this.renderer.listen(\n 'document',\n 'mouseup',\n () => this.onMouseUp()\n )\n );\n });\n\n this.ngZone.runOutsideAngular(() => {\n this.listeners.push(\n this.renderer.listen(\n 'document',\n 'mousemove',\n (e: MouseEvent) => this.onMouseMove(e, startPoint, leftArea, rightArea)\n )\n );\n });\n\n this.isDragging = true;\n }\n\n removeArea(area: McSplitterAreaDirective): void {\n let indexToRemove: number = -1;\n\n this.areas.some((item, index) => {\n if (item.area === area) {\n indexToRemove = index;\n\n return true;\n }\n\n return false;\n });\n\n if (indexToRemove === -1) {\n return;\n }\n\n this.areas.splice(indexToRemove, 1);\n }\n\n isVertical(): boolean {\n return this.direction === Direction.Vertical;\n }\n\n private updateGutter(): void {\n this.gutters.forEach((gutter) => {\n if (gutter.dragged) {\n gutter.dragged = false;\n\n this.changeDetectorRef.detectChanges();\n }\n });\n\n }\n\n private onMouseMove(event: MouseEvent, startPoint: IPoint, leftArea: IArea, rightArea: IArea) {\n if (!this.isDragging || this.disabled) { return; }\n\n const endPoint: IPoint = {\n x: event.screenX,\n y: event.screenY\n };\n\n const offset = this.isVertical()\n ? startPoint.y - endPoint.y\n : startPoint.x - endPoint.x;\n\n const newLeftAreaSize = leftArea.initialSize - offset;\n const newRightAreaSize = rightArea.initialSize + offset;\n\n const minLeftAreaSize = leftArea.area.getMinSize();\n const minRightAreaSize = rightArea.area.getMinSize();\n\n if (newLeftAreaSize <= minLeftAreaSize || newRightAreaSize <= minRightAreaSize) {\n return;\n } else if (newLeftAreaSize <= 0) {\n leftArea.area.setSize(0);\n rightArea.area.setSize(rightArea.initialSize + leftArea.initialSize);\n } else if (newRightAreaSize <= 0) {\n leftArea.area.setSize(rightArea.initialSize + leftArea.initialSize);\n rightArea.area.setSize(0);\n } else {\n leftArea.area.setSize(newLeftAreaSize);\n rightArea.area.setSize(newRightAreaSize);\n }\n }\n\n private onMouseUp() {\n while (this.listeners.length > 0) {\n const unsubscribe = this.listeners.pop();\n\n if (unsubscribe) {\n unsubscribe();\n }\n }\n\n this.isDragging = false;\n\n this.updateGutter();\n }\n\n private setStyle(property: StyleProperty, value: string | number) {\n this.renderer.setStyle(this.elementRef.nativeElement, property, value);\n }\n}\n\n@Directive({\n selector: '[mc-splitter-area]',\n host: {\n class: 'mc-splitter-area'\n }\n})\nexport class McSplitterAreaDirective implements OnInit, OnDestroy {\n constructor(\n private elementRef: ElementRef,\n private renderer: Renderer2,\n private splitter: McSplitterComponent\n ) {}\n\n disableFlex(): void {\n this.renderer.removeStyle(this.elementRef.nativeElement, 'flex');\n }\n\n ngOnInit(): void {\n this.splitter.addArea(this);\n\n this.removeStyle(StyleProperty.MaxWidth);\n\n if (this.splitter.direction === Direction.Vertical) {\n this.setStyle(StyleProperty.Width, '100%');\n this.removeStyle(StyleProperty.Height);\n } else {\n this.setStyle(StyleProperty.Height, '100%');\n this.removeStyle(StyleProperty.Width);\n }\n }\n\n ngOnDestroy(): void {\n this.splitter.removeArea(this);\n }\n\n setOrder(order: number): void {\n this.setStyle(StyleProperty.Order, order);\n }\n\n setSize(size: number): void {\n if (size) {\n const sz = coerceNumberProperty(size);\n this.setStyle(this.getSizeProperty(), coerceCssPixelValue(sz));\n }\n }\n\n getSize(): number {\n return this.elementRef.nativeElement[this.getOffsetSizeProperty()];\n }\n\n getMinSize(): number {\n const styles = getComputedStyle(this.elementRef.nativeElement);\n\n return parseFloat(styles[this.getMinSizeProperty()]);\n }\n\n private isVertical(): boolean {\n return this.splitter.direction === Direction.Vertical;\n }\n\n private getMinSizeProperty(): StyleProperty {\n return this.isVertical()\n ? StyleProperty.MinHeight\n : StyleProperty.MinWidth;\n }\n\n private getOffsetSizeProperty(): StyleProperty {\n return this.isVertical()\n ? StyleProperty.OffsetHeight\n : StyleProperty.OffsetWidth;\n }\n\n private getSizeProperty(): StyleProperty {\n return this.isVertical()\n ? StyleProperty.Height\n : StyleProperty.Width;\n }\n\n private setStyle(style: StyleProperty, value: string | number) {\n this.renderer.setStyle(this.elementRef.nativeElement, style, value);\n }\n\n private removeStyle(style: StyleProperty) {\n this.renderer.removeStyle(this.elementRef.nativeElement, style);\n }\n}\n","<ng-content></ng-content>\n\n<ng-template ngFor let-area [ngForOf]=\"areas\" let-index=\"index\" let-last=\"last\">\n <mc-gutter *ngIf=\"last === false\"\n [direction]=\"direction\"\n [attr.disabled]=\"disabled || null\"\n [style.display]=\"hideGutters ? 'none' : 'flex'\"\n [size]=\"gutterSize\"\n [order]=\"index * 2 + 1\"\n (mousedown)=\"onMouseDown($event, index, index + 1)\">\n </mc-gutter>\n</ng-template>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { McIconModule } from '@ptsecurity/mosaic/icon';\n\nimport { McGutterDirective, McSplitterAreaDirective, McSplitterComponent } from './splitter.component';\n\n\n@NgModule({\n imports: [\n CommonModule,\n McIconModule\n ],\n exports: [\n McGutterDirective,\n McSplitterAreaDirective,\n McSplitterComponent\n ],\n declarations: [\n McGutterDirective,\n McSplitterAreaDirective,\n McSplitterComponent\n ]\n})\nexport class McSplitterModule {\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;IA4CY;AAAZ,WAAY,SAAS;IACjB,sCAAyB,CAAA;IACzB,kCAAqB,CAAA;AACzB,CAAC,EAHW,SAAS,KAAT,SAAS,QAGpB;MAYY,iBAAiB;IAoC1B,YACY,UAAsB,EACtB,QAAmB;QADnB,eAAU,GAAV,UAAU,CAAY;QACtB,aAAQ,GAAR,QAAQ,CAAW;QA5BvB,eAAU,GAAc,SAAS,CAAC,QAAQ,CAAC;QAW3C,WAAM,GAAW,CAAC,CAAC;QAWnB,UAAK,GAAW,CAAC,CAAC;QAE1B,YAAO,GAAY,KAAK,CAAC;KAKrB;IAtCJ,IAAI,SAAS;QACT,OAAO,IAAI,CAAC,UAAU,CAAC;KAC1B;IAED,IACI,SAAS,CAAC,SAAoB;QAC9B,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;KAC/B;IAID,IAAI,KAAK;QACL,OAAO,IAAI,CAAC,MAAM,CAAC;KACtB;IAED,IACI,KAAK,CAAC,KAAa;QACnB,IAAI,CAAC,MAAM,GAAG,oBAAoB,CAAC,KAAK,CAAC,CAAC;KAC7C;IAID,IAAI,IAAI;QACJ,OAAO,IAAI,CAAC,KAAK,CAAC;KACrB;IAED,IACI,IAAI,CAAC,IAAY;QACjB,IAAI,CAAC,KAAK,GAAG,oBAAoB,CAAC,IAAI,CAAC,CAAC;KAC3C;IAWD,QAAQ;QACJ,IAAI,CAAC,QAAQ,+BAA0B,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QACvE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,UAAU,EAAE,gDAA+C,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QAC9G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UAAU,CAAC,aAAa,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;KACvE;IAEO,WAAW,CAAC,KAAoB;QACpC,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,EAAE,KAAK,CAAC,CAAC;KACnE;;uIA9EQ,uBAAuB,qEAIV,mBAAmB;2HAJhC,uBAAuB;2FAAvB,uBAAuB;kBANnC,SAAS;mBAAC;oBACP,QAAQ,EAAE,oBAAoB;oBAC9B,IAAI,EAAE;wBACF,KAAK,EAAE,kBAAkB;qBAC5B;iBACJ;2GAKyB,mBAAmB;;MElVhC,gBAAgB;;gIAAhB,gBAAgB;iIAAhB,gBAAgB,iBALrB,iBAAiB;QACjB,uBAAuB;QACvB,mBAAmB,aAXnB,YAAY;QACZ,YAAY,aAGZ,iBAAiB;QACjB,uBAAuB;QACvB,mBAAmB;iIAQd,gBAAgB,YAfhB;YACL,YAAY;YACZ,YAAY;SACf;2FAYQ,gBAAgB;kBAhB5B,QAAQ;mBAAC;oBACN,OAAO,EAAE;wBACL,YAAY;wBACZ,YAAY;qBACf;oBACD,OAAO,EAAE;wBACL,iBAAiB;wBACjB,uBAAuB;wBACvB,mBAAmB;qBACtB;oBACD,YAAY,EAAE;wBACV,iBAAiB;wBACjB,uBAAuB;wBACvB,mBAAmB;qBACtB;iBACJ;;;ACtBD;;;;;;"}
1
+ {"version":3,"file":"ptsecurity-mosaic-splitter.js","sources":["../../../packages/mosaic/splitter/splitter.component.ts","../../../packages/mosaic/splitter/splitter.component.html","../../../packages/mosaic/splitter/splitter.module.ts","../../../packages/mosaic/splitter/ptsecurity-mosaic-splitter.ts"],"sourcesContent":["import { coerceBooleanProperty, coerceCssPixelValue, coerceNumberProperty } from '@angular/cdk/coercion';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n Directive,\n ElementRef,\n EventEmitter,\n Input,\n NgZone,\n OnDestroy,\n OnInit,\n Output,\n QueryList,\n Renderer2,\n ViewChild,\n ViewChildren,\n ViewEncapsulation\n} from '@angular/core';\n\n\ninterface IArea {\n area: McSplitterAreaDirective;\n index: number;\n order: number;\n initialSize: number;\n}\n\ninterface IPoint {\n x: number;\n y: number;\n}\n\nconst enum StyleProperty {\n Flex = 'flex',\n FlexBasis = 'flex-basis',\n FlexDirection = 'flex-direction',\n Height = 'height',\n MaxWidth = 'max-width',\n MinHeight = 'min-height',\n MinWidth = 'minWidth',\n OffsetHeight = 'offsetHeight',\n OffsetWidth = 'offsetWidth',\n Order = 'order',\n Width = 'width',\n Top = 'top',\n Left = 'left',\n Cursor = 'cursor'\n}\n\nexport enum Direction {\n Horizontal = 'horizontal',\n Vertical = 'vertical'\n}\n\n@Directive({\n selector: 'mc-gutter',\n host: {\n class: 'mc-gutter',\n '[class.mc-gutter_vertical]': 'isVertical',\n '[class.mc-gutter_dragged]': 'dragged',\n '(mousedown)': 'dragged = true'\n }\n})\nexport class McGutterDirective implements OnInit {\n get direction(): Direction {\n return this._direction;\n }\n\n @Input()\n set direction(direction: Direction) {\n this._direction = direction;\n }\n\n private _direction: Direction = Direction.Vertical;\n\n get order(): number {\n return this._order;\n }\n\n @Input()\n set order(order: number) {\n this._order = coerceNumberProperty(order);\n }\n\n private _order: number = 0;\n\n get size(): number {\n return this._size;\n }\n\n @Input()\n set size(size: number) {\n this._size = coerceNumberProperty(size);\n }\n\n private _size: number = 6;\n\n get isVertical(): boolean {\n return this._direction === Direction.Vertical;\n }\n\n dragged: boolean = false;\n\n constructor(\n private elementRef: ElementRef,\n private renderer: Renderer2\n ) {}\n\n ngOnInit(): void {\n this.setStyle(StyleProperty.FlexBasis, coerceCssPixelValue(this.size));\n this.setStyle(this.isVertical ? StyleProperty.Height : StyleProperty.Width, coerceCssPixelValue(this.size));\n this.setStyle(StyleProperty.Order, this.order);\n\n if (!this.isVertical) {\n this.setStyle(StyleProperty.Height, '100%');\n }\n\n // fix IE issue with gutter icon. flex-direction is requied for flex alignment options\n this.setStyle(StyleProperty.FlexDirection, this.isVertical ? 'row' : 'column');\n }\n\n getPosition(): IPoint {\n return {\n x: this.elementRef.nativeElement.offsetLeft,\n y: this.elementRef.nativeElement.offsetTop\n };\n }\n\n private setStyle(property: StyleProperty, value: string | number): void {\n this.renderer.setStyle(this.elementRef.nativeElement, property, value);\n }\n}\n\n@Directive({\n selector: 'mc-gutter-ghost',\n host: {\n class: 'mc-gutter-ghost',\n '[class.mc-gutter-ghost_vertical]': 'isVertical',\n '[class.mc-gutter-ghost_visible]': 'visible'\n }\n})\nexport class McGutterGhostDirective {\n @Input() visible: boolean;\n\n get x(): number {\n return this._x;\n }\n\n @Input()\n set x(x: number) {\n this._x = x;\n this.setStyle(StyleProperty.Left, coerceCssPixelValue(x));\n }\n\n private _x: number = 0;\n\n get y(): number {\n return this._y;\n }\n\n @Input()\n set y(y: number) {\n this._y = y;\n this.setStyle(StyleProperty.Top, coerceCssPixelValue(y));\n }\n\n private _y: number = 0;\n\n\n get direction(): Direction {\n return this._direction;\n }\n\n @Input()\n set direction(direction: Direction) {\n this._direction = direction;\n this.updateDimensions();\n }\n\n private _direction: Direction = Direction.Vertical;\n\n get size(): number {\n return this._size;\n }\n\n @Input()\n set size(size: number) {\n this._size = coerceNumberProperty(size);\n this.updateDimensions();\n }\n\n private _size: number = 6;\n\n get isVertical(): boolean {\n return this.direction === Direction.Vertical;\n }\n\n constructor(\n private elementRef: ElementRef,\n private renderer: Renderer2\n ) {}\n\n private updateDimensions(): void {\n this.setStyle(this.isVertical ? StyleProperty.Width : StyleProperty.Height, '100%');\n this.setStyle(this.isVertical ? StyleProperty.Height : StyleProperty.Width, coerceCssPixelValue(this.size));\n }\n\n private setStyle(property: StyleProperty, value: string | number): void {\n this.renderer.setStyle(this.elementRef.nativeElement, property, value);\n }\n}\n\n\n@Component({\n selector: 'mc-splitter',\n exportAs: 'mcSplitter',\n host: {\n class: 'mc-splitter'\n },\n preserveWhitespaces: false,\n styleUrls: ['splitter.scss'],\n templateUrl: './splitter.component.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class McSplitterComponent implements OnInit {\n @Output() gutterPositionChange: EventEmitter<void> = new EventEmitter<void>();\n\n readonly areas: IArea[] = [];\n\n @ViewChildren(McGutterDirective) gutters: QueryList<McGutterDirective>;\n @ViewChild(McGutterGhostDirective) ghost: McGutterGhostDirective;\n\n get isDragging(): boolean {\n return this._isDragging;\n }\n private _isDragging: boolean = false;\n\n private readonly areaPositionDivider: number = 2;\n private readonly listeners: (() => void)[] = [];\n\n get hideGutters(): boolean {\n return this._hideGutters;\n }\n\n @Input()\n set hideGutters(value: boolean) {\n this._hideGutters = coerceBooleanProperty(value);\n }\n\n private _hideGutters: boolean = false;\n\n get direction(): Direction {\n return this._direction;\n }\n\n @Input()\n set direction(direction: Direction) {\n this._direction = direction;\n }\n\n private _direction: Direction;\n\n get disabled(): boolean {\n return this._disabled;\n }\n\n @Input()\n set disabled(disabled: boolean) {\n this._disabled = coerceBooleanProperty(disabled);\n }\n\n private _disabled: boolean = false;\n\n get useGhost(): boolean {\n return this._useGhost;\n }\n\n @Input()\n set useGhost(useGhost: boolean) {\n this._useGhost = coerceBooleanProperty(useGhost);\n }\n\n private _useGhost: boolean = false;\n\n get gutterSize(): number {\n return this._gutterSize;\n }\n\n @Input()\n set gutterSize(gutterSize: number) {\n const size = coerceNumberProperty(gutterSize);\n this._gutterSize = size > 0 ? size : this.gutterSize;\n }\n\n private _gutterSize: number = 6;\n\n get resizing(): boolean {\n return this._resizing;\n }\n\n private _resizing: boolean = false;\n\n constructor(\n public elementRef: ElementRef,\n public changeDetectorRef: ChangeDetectorRef,\n private ngZone: NgZone,\n private renderer: Renderer2\n ) {}\n\n addArea(area: McSplitterAreaDirective): void {\n const index: number = this.areas.length;\n const order: number = index * this.areaPositionDivider;\n const size: number = area.getSize();\n\n area.setOrder(order);\n\n this.areas.push({\n area,\n index,\n order,\n initialSize: size\n });\n }\n\n ngOnInit(): void {\n if (!this.direction) {\n this.direction = Direction.Horizontal;\n }\n\n this.setStyle(StyleProperty.FlexDirection, this.isVertical() ? 'column' : 'row');\n }\n\n onMouseDown(event: MouseEvent, leftAreaIndex: number, rightAreaIndex: number) {\n if (this.disabled) { return; }\n\n event.preventDefault();\n\n const startPoint: IPoint = {\n x: event.screenX,\n y: event.screenY\n };\n\n const leftArea = this.areas[leftAreaIndex];\n const rightArea = this.areas[rightAreaIndex];\n leftArea.initialSize = leftArea.area.getSize();\n rightArea.initialSize = rightArea.area.getSize();\n let currentGutter: McGutterDirective | undefined;\n\n if (this.useGhost) {\n // tslint:disable-next-line:no-magic-numbers\n const gutterOrder = leftAreaIndex * 2 + 1;\n currentGutter = this.gutters.find((gutter: McGutterDirective) => gutter.order === gutterOrder);\n\n if (currentGutter) {\n const gutterPosition = currentGutter.getPosition();\n\n this.ghost.direction = currentGutter.direction;\n this.ghost.size = currentGutter.size;\n this.ghost.x = gutterPosition.x;\n this.ghost.y = gutterPosition.y;\n\n this.ghost.visible = true;\n this.setStyle(StyleProperty.Cursor, currentGutter.direction === Direction.Vertical ? 'row-resize' : 'col-resize');\n }\n } else {\n this.areas.forEach((item) => {\n const size = item.area.getSize();\n item.area.disableFlex();\n item.area.setSize(size);\n });\n }\n\n\n this.listeners.push(\n this.renderer.listen(\n 'document',\n 'mouseup',\n () => this.onMouseUp(leftArea, rightArea, currentGutter)\n )\n );\n\n this.ngZone.runOutsideAngular(() => {\n this.listeners.push(\n this.renderer.listen(\n 'document',\n 'mousemove',\n (e: MouseEvent) => this.onMouseMove(e, startPoint, leftArea, rightArea, currentGutter)\n )\n );\n });\n\n this._isDragging = true;\n }\n\n removeArea(area: McSplitterAreaDirective): void {\n let indexToRemove: number = -1;\n\n this.areas.some((item, index) => {\n if (item.area === area) {\n indexToRemove = index;\n\n return true;\n }\n\n return false;\n });\n\n if (indexToRemove === -1) {\n return;\n }\n\n this.areas.splice(indexToRemove, 1);\n }\n\n isVertical(): boolean {\n return this.direction === Direction.Vertical;\n }\n\n private updateGutter(): void {\n this.gutters.forEach((gutter) => {\n if (gutter.dragged) {\n gutter.dragged = false;\n\n this.changeDetectorRef.detectChanges();\n }\n });\n }\n\n private onMouseMove(event: MouseEvent,\n startPoint: IPoint,\n leftArea: IArea,\n rightArea: IArea,\n currentGutter: McGutterDirective | undefined) {\n if (!this.isDragging || this.disabled) { return; }\n\n const endPoint: IPoint = {\n x: event.screenX,\n y: event.screenY\n };\n\n const offset = this.isVertical()\n ? startPoint.y - endPoint.y\n : startPoint.x - endPoint.x;\n\n if (this.useGhost && currentGutter) {\n const gutterPosition = currentGutter.getPosition();\n const leftPos = leftArea.area.getPosition();\n const rightPos = rightArea.area.getPosition();\n const rightMin = rightArea.area.getMinSize() || 0;\n const leftMin = leftArea.area.getMinSize() || 0;\n\n const key = this.isVertical() ? 'y' : 'x';\n\n const minPos = leftPos[key] - leftMin;\n\n const maxPos = rightPos[key] + (rightArea.area.getSize() || 0) - rightMin - currentGutter.size;\n\n const newPos = gutterPosition[key] - offset;\n\n this.ghost[key] = newPos < minPos ? minPos : Math.min(newPos, maxPos);\n\n } else {\n this.resizeAreas(leftArea, rightArea, offset);\n }\n }\n\n private resizeAreas(leftArea: IArea, rightArea: IArea, sizeOffset: number): void {\n const newLeftAreaSize = leftArea.initialSize - sizeOffset;\n const newRightAreaSize = rightArea.initialSize + sizeOffset;\n\n const minLeftAreaSize = leftArea.area.getMinSize();\n const minRightAreaSize = rightArea.area.getMinSize();\n\n if (newLeftAreaSize < minLeftAreaSize || newRightAreaSize < minRightAreaSize) {\n return;\n } else if (newLeftAreaSize <= 0) {\n leftArea.area.setSize(0);\n rightArea.area.setSize(rightArea.initialSize + leftArea.initialSize);\n } else if (newRightAreaSize <= 0) {\n leftArea.area.setSize(rightArea.initialSize + leftArea.initialSize);\n rightArea.area.setSize(0);\n } else {\n leftArea.area.setSize(newLeftAreaSize);\n rightArea.area.setSize(newRightAreaSize);\n }\n }\n\n private onMouseUp(leftArea: IArea,\n rightArea: IArea,\n currentGutter: McGutterDirective | undefined) {\n while (this.listeners.length > 0) {\n const unsubscribe = this.listeners.pop();\n\n if (unsubscribe) {\n unsubscribe();\n }\n }\n if (this.useGhost && currentGutter) {\n const gutterPosition = currentGutter.getPosition();\n const offset = this.ghost.direction === Direction.Vertical ?\n gutterPosition.y - this.ghost.y :\n gutterPosition.x - this.ghost.x;\n this.resizeAreas(leftArea, rightArea, offset);\n this.ghost.visible = false;\n this.setStyle(StyleProperty.Cursor, 'unset');\n }\n this._isDragging = false;\n\n this.updateGutter();\n\n this.gutterPositionChange.emit();\n }\n\n private setStyle(property: StyleProperty, value: string | number) {\n this.renderer.setStyle(this.elementRef.nativeElement, property, value);\n }\n}\n\n@Directive({\n selector: '[mc-splitter-area]',\n host: {\n class: 'mc-splitter-area',\n '[class.mc-splitter-area_resizing]': 'isResizing()'\n }\n})\nexport class McSplitterAreaDirective implements OnInit, OnDestroy {\n @Output() sizeChange: EventEmitter<number> = new EventEmitter<number>();\n\n constructor(\n private elementRef: ElementRef,\n private renderer: Renderer2,\n private splitter: McSplitterComponent\n ) { }\n\n isResizing(): boolean {\n return this.splitter.isDragging;\n }\n\n disableFlex(): void {\n this.renderer.removeStyle(this.elementRef.nativeElement, 'flex');\n }\n\n ngOnInit(): void {\n this.splitter.addArea(this);\n\n this.removeStyle(StyleProperty.MaxWidth);\n\n if (this.splitter.direction === Direction.Vertical) {\n this.setStyle(StyleProperty.Width, '100%');\n this.removeStyle(StyleProperty.Height);\n } else {\n this.setStyle(StyleProperty.Height, '100%');\n this.removeStyle(StyleProperty.Width);\n }\n\n this.splitter.gutterPositionChange.subscribe(() => this.emitSizeChange());\n }\n\n ngOnDestroy(): void {\n this.splitter.removeArea(this);\n }\n\n setOrder(order: number): void {\n this.setStyle(StyleProperty.Order, order);\n }\n\n setSize(size: number): void {\n if (!isNaN(size)) {\n const sz = coerceNumberProperty(size);\n this.setStyle(this.getSizeProperty(), coerceCssPixelValue(sz));\n }\n }\n\n getSize(): number {\n return this.elementRef.nativeElement[this.getOffsetSizeProperty()];\n }\n\n getPosition(): IPoint {\n return {\n x: this.elementRef.nativeElement.offsetLeft,\n y: this.elementRef.nativeElement.offsetTop\n };\n }\n\n getMinSize(): number {\n const styles = getComputedStyle(this.elementRef.nativeElement);\n\n return parseFloat(styles[this.getMinSizeProperty()]);\n }\n\n private isVertical(): boolean {\n return this.splitter.direction === Direction.Vertical;\n }\n\n private getMinSizeProperty(): StyleProperty {\n return this.isVertical()\n ? StyleProperty.MinHeight\n : StyleProperty.MinWidth;\n }\n\n private getOffsetSizeProperty(): StyleProperty {\n return this.isVertical()\n ? StyleProperty.OffsetHeight\n : StyleProperty.OffsetWidth;\n }\n\n private getSizeProperty(): StyleProperty {\n return this.isVertical()\n ? StyleProperty.Height\n : StyleProperty.Width;\n }\n\n private setStyle(style: StyleProperty, value: string | number) {\n this.renderer.setStyle(this.elementRef.nativeElement, style, value);\n }\n\n private removeStyle(style: StyleProperty) {\n this.renderer.removeStyle(this.elementRef.nativeElement, style);\n }\n\n private emitSizeChange(): void {\n this.sizeChange.emit(this.getSize());\n }\n}\n","<ng-content></ng-content>\n\n<ng-template ngFor let-area [ngForOf]=\"areas\" let-index=\"index\" let-last=\"last\">\n <mc-gutter *ngIf=\"last === false\"\n [direction]=\"direction\"\n [attr.disabled]=\"disabled || null\"\n [style.display]=\"hideGutters ? 'none' : 'flex'\"\n [size]=\"gutterSize\"\n [order]=\"index * 2 + 1\"\n (mousedown)=\"onMouseDown($event, index, index + 1)\">\n </mc-gutter>\n</ng-template>\n\n<mc-gutter-ghost *ngIf=\"useGhost\"></mc-gutter-ghost>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { McIconModule } from '@ptsecurity/mosaic/icon';\n\nimport {\n McGutterDirective,\n McGutterGhostDirective,\n McSplitterAreaDirective,\n McSplitterComponent\n} from './splitter.component';\n\n\n@NgModule({\n imports: [\n CommonModule,\n McIconModule\n ],\n exports: [\n McGutterDirective,\n McSplitterAreaDirective,\n McSplitterComponent\n ],\n declarations: [\n McGutterDirective,\n McGutterGhostDirective,\n McSplitterAreaDirective,\n McSplitterComponent\n ]\n})\nexport class McSplitterModule {\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;IAkDY;AAAZ,WAAY,SAAS;IACjB,sCAAyB,CAAA;IACzB,kCAAqB,CAAA;AACzB,CAAC,EAHW,SAAS,KAAT,SAAS,QAGpB;MAWY,iBAAiB;IAwC1B,YACY,UAAsB,EACtB,QAAmB;QADnB,eAAU,GAAV,UAAU,CAAY;QACtB,aAAQ,GAAR,QAAQ,CAAW;QAhCvB,eAAU,GAAc,SAAS,CAAC,QAAQ,CAAC;QAW3C,WAAM,GAAW,CAAC,CAAC;QAWnB,UAAK,GAAW,CAAC,CAAC;QAM1B,YAAO,GAAY,KAAK,CAAC;KAKrB;IA1CJ,IAAI,SAAS;QACT,OAAO,IAAI,CAAC,UAAU,CAAC;KAC1B;IAED,IACI,SAAS,CAAC,SAAoB;QAC9B,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;KAC/B;IAID,IAAI,KAAK;QACL,OAAO,IAAI,CAAC,MAAM,CAAC;KACtB;IAED,IACI,KAAK,CAAC,KAAa;QACnB,IAAI,CAAC,MAAM,GAAG,oBAAoB,CAAC,KAAK,CAAC,CAAC;KAC7C;IAID,IAAI,IAAI;QACJ,OAAO,IAAI,CAAC,KAAK,CAAC;KACrB;IAED,IACI,IAAI,CAAC,IAAY;QACjB,IAAI,CAAC,KAAK,GAAG,oBAAoB,CAAC,IAAI,CAAC,CAAC;KAC3C;IAID,IAAI,UAAU;QACV,OAAO,IAAI,CAAC,UAAU,KAAK,SAAS,CAAC,QAAQ,CAAC;KACjD;IASD,QAAQ;QACJ,IAAI,CAAC,QAAQ,+BAA0B,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QACvE,IAAI,CAAC,QAAQ,CAAC,IAAI,CA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ACN,OAAO,EAAE;wBACL,YAAY;wBACZ,YAAY;qBACf;oBACD,OAAO,EAAE;wBACL,iBAAiB;wBACjB,uBAAuB;wBACvB,mBAAmB;qBACtB;oBACD,YAAY,EAAE;wBACV,iBAAiB;wBACjB,sBAAsB;wBACtB,uBAAuB;wBACvB,mBAAmB;qBACtB;iBACJ;;;AC5BD;;;;;;"}
@@ -6,9 +6,9 @@ import { Directive, NgModule } from '@angular/core';
6
6
 
7
7
  class McTable {
8
8
  }
9
- /** @nocollapse */ McTable.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0, type: McTable, deps: [], target: i0.ɵɵFactoryTarget.Directive });
10
- /** @nocollapse */ McTable.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.5", type: McTable, selector: "table[mc-table]", host: { classAttribute: "mc-table" }, ngImport: i0 });
11
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0, type: McTable, decorators: [{
9
+ /** @nocollapse */ McTable.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: McTable, deps: [], target: i0.ɵɵFactoryTarget.Directive });
10
+ /** @nocollapse */ McTable.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.13", type: McTable, selector: "table[mc-table]", host: { classAttribute: "mc-table" }, ngImport: i0 });
11
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: McTable, decorators: [{
12
12
  type: Directive,
13
13
  args: [{
14
14
  selector: 'table[mc-table]',
@@ -20,16 +20,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImpor
20
20
 
21
21
  class McTableModule {
22
22
  }
23
- /** @nocollapse */ McTableModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0, type: McTableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
24
- /** @nocollapse */ McTableModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0, type: McTableModule, declarations: [McTable], imports: [CommonModule,
23
+ /** @nocollapse */ McTableModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: McTableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
24
+ /** @nocollapse */ McTableModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: McTableModule, declarations: [McTable], imports: [CommonModule,
25
25
  A11yModule,
26
26
  PlatformModule], exports: [McTable] });
27
- /** @nocollapse */ McTableModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0, type: McTableModule, imports: [[
27
+ /** @nocollapse */ McTableModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: McTableModule, imports: [[
28
28
  CommonModule,
29
29
  A11yModule,
30
30
  PlatformModule
31
31
  ]] });
32
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0, type: McTableModule, decorators: [{
32
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: McTableModule, decorators: [{
33
33
  type: NgModule,
34
34
  args: [{
35
35
  imports: [
@@ -1 +1 @@
1
- {"version":3,"file":"ptsecurity-mosaic-table.js","sources":["../../../packages/mosaic/table/table.component.ts","../../../packages/mosaic/table/table.module.ts","../../../packages/mosaic/table/ptsecurity-mosaic-table.ts"],"sourcesContent":["import { Directive } from '@angular/core';\n\n\n@Directive({\n selector: 'table[mc-table]',\n host: {\n class: 'mc-table'\n }\n})\nexport class McTable {}\n\n","import { A11yModule } from '@angular/cdk/a11y';\nimport { PlatformModule } from '@angular/cdk/platform';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { McTable } from './table.component';\n\n\n@NgModule({\n imports: [\n CommonModule,\n A11yModule,\n PlatformModule\n ],\n exports: [McTable],\n declarations: [McTable]\n})\nexport class McTableModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MASa,OAAO;;uHAAP,OAAO;2GAAP,OAAO;2FAAP,OAAO;kBANnB,SAAS;mBAAC;oBACP,QAAQ,EAAE,iBAAiB;oBAC3B,IAAI,EAAE;wBACF,KAAK,EAAE,UAAU;qBACpB;iBACJ;;;MCSY,aAAa;;6HAAb,aAAa;8HAAb,aAAa,iBAFP,OAAO,aALlB,YAAY;QACZ,UAAU;QACV,cAAc,aAER,OAAO;8HAGR,aAAa,YARb;YACL,YAAY;YACZ,UAAU;YACV,cAAc;SACjB;2FAIQ,aAAa;kBATzB,QAAQ;mBAAC;oBACN,OAAO,EAAE;wBACL,YAAY;wBACZ,UAAU;wBACV,cAAc;qBACjB;oBACD,OAAO,EAAE,CAAC,OAAO,CAAC;oBAClB,YAAY,EAAE,CAAC,OAAO,CAAC;iBAC1B;;;AChBD;;;;;;"}
1
+ {"version":3,"file":"ptsecurity-mosaic-table.js","sources":["../../../packages/mosaic/table/table.component.ts","../../../packages/mosaic/table/table.module.ts","../../../packages/mosaic/table/ptsecurity-mosaic-table.ts"],"sourcesContent":["import { Directive } from '@angular/core';\n\n\n@Directive({\n selector: 'table[mc-table]',\n host: {\n class: 'mc-table'\n }\n})\nexport class McTable {}\n\n","import { A11yModule } from '@angular/cdk/a11y';\nimport { PlatformModule } from '@angular/cdk/platform';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { McTable } from './table.component';\n\n\n@NgModule({\n imports: [\n CommonModule,\n A11yModule,\n PlatformModule\n ],\n exports: [McTable],\n declarations: [McTable]\n})\nexport class McTableModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MASa,OAAO;;wHAAP,OAAO;4GAAP,OAAO;4FAAP,OAAO;kBANnB,SAAS;mBAAC;oBACP,QAAQ,EAAE,iBAAiB;oBAC3B,IAAI,EAAE;wBACF,KAAK,EAAE,UAAU;qBACpB;iBACJ;;;MCSY,aAAa;;8HAAb,aAAa;+HAAb,aAAa,iBAFP,OAAO,aALlB,YAAY;QACZ,UAAU;QACV,cAAc,aAER,OAAO;+HAGR,aAAa,YARb;YACL,YAAY;YACZ,UAAU;YACV,cAAc;SACjB;4FAIQ,aAAa;kBATzB,QAAQ;mBAAC;oBACN,OAAO,EAAE;wBACL,YAAY;wBACZ,UAAU;wBACV,cAAc;qBACjB;oBACD,OAAO,EAAE,CAAC,OAAO,CAAC;oBAClB,YAAY,EAAE,CAAC,OAAO,CAAC;iBAC1B;;;AChBD;;;;;;"}