@ptsecurity/mosaic 12.0.2 → 12.2.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 (336) hide show
  1. package/_theming.scss +475 -101
  2. package/_visual.scss +131 -13
  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 +259 -172
  14. package/bundles/ptsecurity-mosaic-core.umd.js.map +1 -1
  15. package/bundles/ptsecurity-mosaic-datepicker.umd.js +47 -48
  16. package/bundles/ptsecurity-mosaic-datepicker.umd.js.map +1 -1
  17. package/bundles/ptsecurity-mosaic-design-tokens.umd.js +231 -26
  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 +67 -59
  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 +177 -89
  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 +46 -43
  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 +31 -21
  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 +150 -74
  56. package/bundles/ptsecurity-mosaic-tabs.umd.js.map +1 -1
  57. package/bundles/ptsecurity-mosaic-tags.umd.js +28 -29
  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 +16 -17
  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 +24 -29
  68. package/bundles/ptsecurity-mosaic-tree-select.umd.js.map +1 -1
  69. package/bundles/ptsecurity-mosaic-tree.umd.js +1018 -261
  70. package/bundles/ptsecurity-mosaic-tree.umd.js.map +1 -1
  71. package/bundles/ptsecurity-mosaic.umd.js +2 -2
  72. package/core/option/action.d.ts +42 -0
  73. package/core/option/index.d.ts +1 -0
  74. package/core/option/option-module.d.ts +4 -3
  75. package/core/pop-up/pop-up-trigger.d.ts +9 -12
  76. package/design-tokens/style-dictionary/build.js +6 -0
  77. package/design-tokens/style-dictionary/configs/index.js +2 -1
  78. package/design-tokens/tokens/components/badge.json5 +177 -7
  79. package/design-tokens/tokens/components/list.json5 +0 -4
  80. package/design-tokens/tokens/components/tree.json5 +3 -3
  81. package/design-tokens/tokens/properties/globals.json5 +1 -1
  82. package/design-tokens/tokens/properties/typography.json5 +16 -0
  83. package/design-tokens/tokens.d.ts +115 -13
  84. package/dropdown/dropdown-item.component.d.ts +1 -0
  85. package/dropdown/dropdown-trigger.directive.d.ts +3 -8
  86. package/dropdown/dropdown.component.d.ts +1 -0
  87. package/esm2015/autocomplete/autocomplete-origin.directive.js +4 -4
  88. package/esm2015/autocomplete/autocomplete-trigger.directive.js +4 -4
  89. package/esm2015/autocomplete/autocomplete.component.js +4 -4
  90. package/esm2015/autocomplete/autocomplete.module.js +5 -5
  91. package/esm2015/button/button.component.js +10 -10
  92. package/esm2015/button/button.module.js +5 -5
  93. package/esm2015/button-toggle/button-toggle.component.js +7 -7
  94. package/esm2015/button-toggle/button-toggle.module.js +5 -5
  95. package/esm2015/card/card.component.js +4 -4
  96. package/esm2015/card/card.module.js +5 -5
  97. package/esm2015/checkbox/checkbox-module.js +5 -5
  98. package/esm2015/checkbox/checkbox-required-validator.js +4 -4
  99. package/esm2015/checkbox/checkbox.js +4 -4
  100. package/esm2015/core/common-behaviors/common-module.js +5 -5
  101. package/esm2015/core/error/error-options.js +7 -7
  102. package/esm2015/core/formatters/date/formatter.js +6 -5
  103. package/esm2015/core/formatters/index.js +5 -5
  104. package/esm2015/core/formatters/number/formatter.js +5 -5
  105. package/esm2015/core/forms/forms-module.js +5 -5
  106. package/esm2015/core/forms/forms.directive.js +7 -7
  107. package/esm2015/core/highlight/highlight.pipe.js +4 -4
  108. package/esm2015/core/highlight/index.js +5 -5
  109. package/esm2015/core/line/line.js +8 -8
  110. package/esm2015/core/option/action.js +131 -0
  111. package/esm2015/core/option/index.js +2 -1
  112. package/esm2015/core/option/optgroup.js +4 -4
  113. package/esm2015/core/option/option-module.js +8 -7
  114. package/esm2015/core/option/option.js +4 -4
  115. package/esm2015/core/pop-up/pop-up-trigger.js +32 -64
  116. package/esm2015/core/pop-up/pop-up.js +4 -4
  117. package/esm2015/core/selection/pseudo-checkbox/pseudo-checkbox.js +4 -4
  118. package/esm2015/core/selection/pseudo-checkbox/pseudo-checkbox.module.js +5 -5
  119. package/esm2015/core/services/measure-scrollbar.service.js +4 -4
  120. package/esm2015/datepicker/calendar-body.component.js +4 -4
  121. package/esm2015/datepicker/calendar.component.js +7 -7
  122. package/esm2015/datepicker/datepicker-input.directive.js +6 -5
  123. package/esm2015/datepicker/datepicker-intl.js +4 -4
  124. package/esm2015/datepicker/datepicker-module.js +5 -5
  125. package/esm2015/datepicker/datepicker-toggle.component.js +7 -7
  126. package/esm2015/datepicker/datepicker.component.js +7 -7
  127. package/esm2015/datepicker/month-view.component.js +4 -4
  128. package/esm2015/datepicker/multi-year-view.component.js +4 -4
  129. package/esm2015/datepicker/year-view.component.js +4 -4
  130. package/esm2015/design-tokens/tokens.js +116 -14
  131. package/esm2015/divider/divider.component.js +4 -4
  132. package/esm2015/divider/divider.module.js +5 -5
  133. package/esm2015/dropdown/dropdown-content.directive.js +4 -4
  134. package/esm2015/dropdown/dropdown-item.component.js +11 -4
  135. package/esm2015/dropdown/dropdown-trigger.directive.js +39 -39
  136. package/esm2015/dropdown/dropdown.component.js +9 -5
  137. package/esm2015/dropdown/dropdown.module.js +5 -5
  138. package/esm2015/form-field/cleaner.js +9 -5
  139. package/esm2015/form-field/form-field.js +7 -7
  140. package/esm2015/form-field/form-field.module.js +5 -5
  141. package/esm2015/form-field/hint.js +4 -4
  142. package/esm2015/form-field/prefix.js +4 -4
  143. package/esm2015/form-field/stepper.js +4 -4
  144. package/esm2015/form-field/suffix.js +4 -4
  145. package/esm2015/icon/icon.component.js +7 -7
  146. package/esm2015/icon/icon.module.js +5 -5
  147. package/esm2015/input/input-number-validators.js +28 -14
  148. package/esm2015/input/input-number.js +4 -4
  149. package/esm2015/input/input.js +7 -7
  150. package/esm2015/input/input.module.js +5 -5
  151. package/esm2015/link/link.component.js +4 -4
  152. package/esm2015/link/link.module.js +5 -5
  153. package/esm2015/list/list-selection.component.js +155 -66
  154. package/esm2015/list/list.component.js +7 -7
  155. package/esm2015/list/list.module.js +5 -5
  156. package/esm2015/modal/css-unit.pipe.js +4 -4
  157. package/esm2015/modal/modal-control.service.js +4 -4
  158. package/esm2015/modal/modal.component.js +6 -4
  159. package/esm2015/modal/modal.directive.js +13 -13
  160. package/esm2015/modal/modal.module.js +9 -7
  161. package/esm2015/modal/modal.service.js +16 -9
  162. package/esm2015/navbar/navbar-item.component.js +21 -21
  163. package/esm2015/navbar/navbar.component.js +7 -7
  164. package/esm2015/navbar/navbar.module.js +5 -5
  165. package/esm2015/navbar/vertical-navbar.component.js +14 -9
  166. package/esm2015/popover/popover-confirm.component.js +116 -0
  167. package/esm2015/popover/popover.component.js +63 -20
  168. package/esm2015/popover/popover.module.js +13 -10
  169. package/esm2015/popover/public-api.js +2 -1
  170. package/esm2015/progress-bar/progress-bar.component.js +4 -4
  171. package/esm2015/progress-bar/progress-bar.module.js +5 -5
  172. package/esm2015/progress-spinner/progress-spinner.component.js +4 -4
  173. package/esm2015/progress-spinner/progress-spinner.module.js +5 -5
  174. package/esm2015/radio/radio.component.js +7 -7
  175. package/esm2015/radio/radio.module.js +5 -5
  176. package/esm2015/select/select.component.js +14 -14
  177. package/esm2015/select/select.module.js +5 -5
  178. package/esm2015/sidebar/sidebar.component.js +10 -10
  179. package/esm2015/sidebar/sidebar.module.js +5 -5
  180. package/esm2015/sidepanel/sidepanel-container.component.js +14 -13
  181. package/esm2015/sidepanel/sidepanel-directives.js +22 -18
  182. package/esm2015/sidepanel/sidepanel.module.js +12 -8
  183. package/esm2015/sidepanel/sidepanel.service.js +6 -5
  184. package/esm2015/splitter/splitter.component.js +24 -13
  185. package/esm2015/splitter/splitter.module.js +5 -5
  186. package/esm2015/table/table.component.js +4 -4
  187. package/esm2015/table/table.module.js +5 -5
  188. package/esm2015/tabs/paginated-tab-header.js +5 -5
  189. package/esm2015/tabs/tab-body.component.js +7 -7
  190. package/esm2015/tabs/tab-content.directive.js +4 -4
  191. package/esm2015/tabs/tab-group.component.js +56 -26
  192. package/esm2015/tabs/tab-header.component.js +4 -4
  193. package/esm2015/tabs/tab-label-wrapper.directive.js +21 -6
  194. package/esm2015/tabs/tab-label.directive.js +4 -4
  195. package/esm2015/tabs/tab-nav-bar/tab-nav-bar.js +7 -7
  196. package/esm2015/tabs/tab.component.js +36 -13
  197. package/esm2015/tabs/tabs.module.js +5 -5
  198. package/esm2015/tags/tag-input.js +4 -4
  199. package/esm2015/tags/tag-list.component.js +4 -4
  200. package/esm2015/tags/tag.component.js +14 -13
  201. package/esm2015/tags/tag.module.js +5 -5
  202. package/esm2015/textarea/textarea.component.js +4 -4
  203. package/esm2015/textarea/textarea.module.js +5 -5
  204. package/esm2015/timepicker/timepicker.directive.js +9 -8
  205. package/esm2015/timepicker/timepicker.module.js +5 -5
  206. package/esm2015/toggle/toggle.component.js +4 -4
  207. package/esm2015/toggle/toggle.module.js +5 -5
  208. package/esm2015/tooltip/tooltip.component.js +55 -16
  209. package/esm2015/tooltip/tooltip.module.js +5 -5
  210. package/esm2015/tree/control/base-tree-control.js +60 -0
  211. package/esm2015/tree/control/flat-tree-control.js +123 -0
  212. package/esm2015/tree/control/nested-tree-control.js +41 -0
  213. package/esm2015/tree/control/tree-control.js +2 -0
  214. package/esm2015/tree/data-source/flat-data-source.js +1 -1
  215. package/esm2015/tree/node.js +31 -0
  216. package/esm2015/tree/outlet.js +15 -0
  217. package/esm2015/tree/padding.directive.js +90 -23
  218. package/esm2015/tree/public-api.js +9 -2
  219. package/esm2015/tree/toggle.js +46 -52
  220. package/esm2015/tree/tree-base.js +243 -0
  221. package/esm2015/tree/tree-errors.js +36 -0
  222. package/esm2015/tree/tree-option.component.js +75 -32
  223. package/esm2015/tree/tree-selection.component.js +122 -73
  224. package/esm2015/tree/tree.js +23 -0
  225. package/esm2015/tree/tree.module.js +24 -13
  226. package/esm2015/tree-select/tree-select.component.js +11 -12
  227. package/esm2015/tree-select/tree-select.module.js +5 -9
  228. package/fesm2015/ptsecurity-mosaic-autocomplete.js +13 -13
  229. package/fesm2015/ptsecurity-mosaic-autocomplete.js.map +1 -1
  230. package/fesm2015/ptsecurity-mosaic-button-toggle.js +10 -10
  231. package/fesm2015/ptsecurity-mosaic-button-toggle.js.map +1 -1
  232. package/fesm2015/ptsecurity-mosaic-button.js +13 -13
  233. package/fesm2015/ptsecurity-mosaic-button.js.map +1 -1
  234. package/fesm2015/ptsecurity-mosaic-card.js +7 -7
  235. package/fesm2015/ptsecurity-mosaic-card.js.map +1 -1
  236. package/fesm2015/ptsecurity-mosaic-checkbox.js +10 -10
  237. package/fesm2015/ptsecurity-mosaic-checkbox.js.map +1 -1
  238. package/fesm2015/ptsecurity-mosaic-core.js +231 -140
  239. package/fesm2015/ptsecurity-mosaic-core.js.map +1 -1
  240. package/fesm2015/ptsecurity-mosaic-datepicker.js +42 -41
  241. package/fesm2015/ptsecurity-mosaic-datepicker.js.map +1 -1
  242. package/fesm2015/ptsecurity-mosaic-design-tokens.js +116 -14
  243. package/fesm2015/ptsecurity-mosaic-design-tokens.js.map +1 -1
  244. package/fesm2015/ptsecurity-mosaic-divider.js +7 -7
  245. package/fesm2015/ptsecurity-mosaic-divider.js.map +1 -1
  246. package/fesm2015/ptsecurity-mosaic-dropdown.js +63 -52
  247. package/fesm2015/ptsecurity-mosaic-dropdown.js.map +1 -1
  248. package/fesm2015/ptsecurity-mosaic-form-field.js +30 -27
  249. package/fesm2015/ptsecurity-mosaic-form-field.js.map +1 -1
  250. package/fesm2015/ptsecurity-mosaic-icon.js +10 -10
  251. package/fesm2015/ptsecurity-mosaic-icon.js.map +1 -1
  252. package/fesm2015/ptsecurity-mosaic-input.js +40 -26
  253. package/fesm2015/ptsecurity-mosaic-input.js.map +1 -1
  254. package/fesm2015/ptsecurity-mosaic-link.js +7 -7
  255. package/fesm2015/ptsecurity-mosaic-link.js.map +1 -1
  256. package/fesm2015/ptsecurity-mosaic-list.js +164 -76
  257. package/fesm2015/ptsecurity-mosaic-list.js.map +1 -1
  258. package/fesm2015/ptsecurity-mosaic-modal.js +46 -35
  259. package/fesm2015/ptsecurity-mosaic-modal.js.map +1 -1
  260. package/fesm2015/ptsecurity-mosaic-navbar.js +43 -38
  261. package/fesm2015/ptsecurity-mosaic-navbar.js.map +1 -1
  262. package/fesm2015/ptsecurity-mosaic-popover.js +179 -30
  263. package/fesm2015/ptsecurity-mosaic-popover.js.map +1 -1
  264. package/fesm2015/ptsecurity-mosaic-progress-bar.js +7 -7
  265. package/fesm2015/ptsecurity-mosaic-progress-bar.js.map +1 -1
  266. package/fesm2015/ptsecurity-mosaic-progress-spinner.js +7 -7
  267. package/fesm2015/ptsecurity-mosaic-progress-spinner.js.map +1 -1
  268. package/fesm2015/ptsecurity-mosaic-radio.js +10 -10
  269. package/fesm2015/ptsecurity-mosaic-radio.js.map +1 -1
  270. package/fesm2015/ptsecurity-mosaic-select.js +17 -17
  271. package/fesm2015/ptsecurity-mosaic-select.js.map +1 -1
  272. package/fesm2015/ptsecurity-mosaic-sidebar.js +13 -13
  273. package/fesm2015/ptsecurity-mosaic-sidebar.js.map +1 -1
  274. package/fesm2015/ptsecurity-mosaic-sidepanel.js +50 -41
  275. package/fesm2015/ptsecurity-mosaic-sidepanel.js.map +1 -1
  276. package/fesm2015/ptsecurity-mosaic-splitter.js +27 -16
  277. package/fesm2015/ptsecurity-mosaic-splitter.js.map +1 -1
  278. package/fesm2015/ptsecurity-mosaic-table.js +7 -7
  279. package/fesm2015/ptsecurity-mosaic-table.js.map +1 -1
  280. package/fesm2015/ptsecurity-mosaic-tabs.js +240 -174
  281. package/fesm2015/ptsecurity-mosaic-tabs.js.map +1 -1
  282. package/fesm2015/ptsecurity-mosaic-tags.js +23 -22
  283. package/fesm2015/ptsecurity-mosaic-tags.js.map +1 -1
  284. package/fesm2015/ptsecurity-mosaic-textarea.js +7 -7
  285. package/fesm2015/ptsecurity-mosaic-textarea.js.map +1 -1
  286. package/fesm2015/ptsecurity-mosaic-timepicker.js +12 -11
  287. package/fesm2015/ptsecurity-mosaic-timepicker.js.map +1 -1
  288. package/fesm2015/ptsecurity-mosaic-toggle.js +7 -7
  289. package/fesm2015/ptsecurity-mosaic-toggle.js.map +1 -1
  290. package/fesm2015/ptsecurity-mosaic-tooltip.js +57 -18
  291. package/fesm2015/ptsecurity-mosaic-tooltip.js.map +1 -1
  292. package/fesm2015/ptsecurity-mosaic-tree-select.js +14 -18
  293. package/fesm2015/ptsecurity-mosaic-tree-select.js.map +1 -1
  294. package/fesm2015/ptsecurity-mosaic-tree.js +874 -190
  295. package/fesm2015/ptsecurity-mosaic-tree.js.map +1 -1
  296. package/form-field/cleaner.d.ts +2 -0
  297. package/input/input-number-validators.d.ts +2 -2
  298. package/list/list-selection.component.d.ts +28 -6
  299. package/modal/modal.component.d.ts +2 -0
  300. package/modal/modal.module.d.ts +1 -1
  301. package/package.json +5 -5
  302. package/popover/popover-confirm.component.d.ts +33 -0
  303. package/popover/popover.component.d.ts +14 -4
  304. package/popover/popover.module.d.ts +6 -3
  305. package/popover/public-api.d.ts +1 -0
  306. package/prebuilt-themes/dark-theme.css +1 -1
  307. package/prebuilt-themes/default-theme.css +1 -1
  308. package/prebuilt-visual/default-visual.css +1 -1
  309. package/select/select.component.d.ts +2 -7
  310. package/sidepanel/sidepanel-directives.d.ts +2 -0
  311. package/sidepanel/sidepanel.module.d.ts +2 -1
  312. package/splitter/splitter.component.d.ts +6 -3
  313. package/tabs/tab-group.component.d.ts +11 -4
  314. package/tabs/tab-label-wrapper.directive.d.ts +7 -1
  315. package/tabs/tab.component.d.ts +10 -4
  316. package/tooltip/tooltip.component.d.ts +12 -3
  317. package/tree/control/base-tree-control.d.ts +40 -0
  318. package/tree/control/flat-tree-control.d.ts +48 -0
  319. package/tree/control/nested-tree-control.d.ts +19 -0
  320. package/tree/control/tree-control.d.ts +44 -0
  321. package/tree/data-source/flat-data-source.d.ts +2 -1
  322. package/tree/node.d.ts +34 -0
  323. package/tree/outlet.d.ts +9 -0
  324. package/tree/padding.directive.d.ts +35 -7
  325. package/tree/public-api.d.ts +8 -1
  326. package/tree/toggle.d.ts +17 -17
  327. package/tree/tree-base.d.ts +97 -0
  328. package/tree/tree-errors.d.ts +25 -0
  329. package/tree/tree-option.component.d.ts +13 -5
  330. package/tree/tree-selection.component.d.ts +32 -13
  331. package/tree/tree.d.ts +6 -0
  332. package/tree/tree.module.d.ts +10 -8
  333. package/tree-select/tree-select.component.d.ts +2 -7
  334. package/tree-select/tree-select.module.d.ts +5 -6
  335. package/esm2015/tree/node.directive.js +0 -19
  336. package/tree/node.directive.d.ts +0 -7
@@ -1,16 +1,18 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { InjectionToken, EventEmitter, Component, ChangeDetectionStrategy, ViewEncapsulation, Inject, ViewChild, TemplateRef, Injectable, Optional, SkipSelf, Directive, Input, NgModule } from '@angular/core';
3
+ import { AnimationCurves, ThemePalette, McCommonModule } from '@ptsecurity/mosaic/core';
3
4
  import { ESCAPE } from '@ptsecurity/cdk/keycodes';
4
5
  import { Subject, merge } from 'rxjs';
5
6
  import { filter, take } from 'rxjs/operators';
6
7
  import { trigger, state, style, transition, animate } from '@angular/animations';
7
- import { AnimationCurves, McCommonModule } from '@ptsecurity/mosaic/core';
8
8
  import * as i1 from '@angular/cdk/overlay';
9
9
  import { OverlayConfig, OverlayModule } from '@angular/cdk/overlay';
10
- import * as i3 from '@angular/cdk/portal';
10
+ import * as i4 from '@angular/cdk/portal';
11
11
  import { BasePortalOutlet, CdkPortalOutlet, TemplatePortal, ComponentPortal, PortalInjector, PortalModule } from '@angular/cdk/portal';
12
12
  import * as i2 from '@angular/common';
13
13
  import { CommonModule } from '@angular/common';
14
+ import * as i3 from '@angular/cdk/a11y';
15
+ import { A11yModule } from '@angular/cdk/a11y';
14
16
  import * as i3$1 from '@ptsecurity/mosaic/icon';
15
17
  import { McIconModule } from '@ptsecurity/mosaic/icon';
16
18
  import { McButtonModule } from '@ptsecurity/mosaic/button';
@@ -146,17 +148,19 @@ class McSidepanelContainerComponent extends BasePortalOutlet {
146
148
  }
147
149
  /** Begin animation of the sidepanel entrance into view. */
148
150
  enter() {
149
- if (!this.destroyed) {
150
- this.animationState = McSidepanelAnimationState.Visible;
151
- this.changeDetectorRef.detectChanges();
151
+ if (this.destroyed) {
152
+ return;
152
153
  }
154
+ this.animationState = McSidepanelAnimationState.Visible;
155
+ this.changeDetectorRef.detectChanges();
153
156
  }
154
157
  /** Begin animation of the sidepanel exiting from view. */
155
158
  exit() {
156
- if (!this.destroyed) {
157
- this.animationState = McSidepanelAnimationState.Hidden;
158
- this.changeDetectorRef.markForCheck();
159
+ if (this.destroyed) {
160
+ return;
159
161
  }
162
+ this.animationState = McSidepanelAnimationState.Hidden;
163
+ this.changeDetectorRef.markForCheck();
160
164
  }
161
165
  onAnimation(event) {
162
166
  this.animationStateChanged.emit(event);
@@ -179,9 +183,9 @@ class McSidepanelContainerComponent extends BasePortalOutlet {
179
183
  }
180
184
  }
181
185
  }
182
- /** @nocollapse */ McSidepanelContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0, type: McSidepanelContainerComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: McSidepanelConfig }, { token: MC_SIDEPANEL_WITH_INDENT }, { token: MC_SIDEPANEL_WITH_SHADOW }], target: i0.ɵɵFactoryTarget.Component });
183
- /** @nocollapse */ McSidepanelContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.5", type: McSidepanelContainerComponent, selector: "mc-sidepanel-container", host: { attributes: { "role": "dialog", "aria-modal": "true" }, listeners: { "@state.start": "onAnimation($event)", "@state.done": "onAnimation($event)" }, properties: { "class.mc-sidepanel_nested": "withIndent", "class.mc-sidepanel-container_shadowed": "withShadow", "attr.id": "id", "attr.tabindex": "-1", "@state": "{\n value: animationState,\n params: animationTransform\n }" }, classAttribute: "mc-sidepanel-container" }, viewQueries: [{ propertyName: "portalOutlet", first: true, predicate: CdkPortalOutlet, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"mc-sidepanel-wrapper\">\n\n <div *ngIf=\"withIndent\" class=\"mc-sidepanel-indent\" (click)=\"exit()\"></div>\n\n <div class=\"mc-sidepanel-content\">\n <ng-template cdkPortalOutlet></ng-template>\n </div>\n</div>\n", styles: [".mc-no-select{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}.mc-sidepanel-container{outline:none;display:flex;flex:1;position:fixed;min-height:0}.mc-sidepanel-container .flex{min-height:0}.mc-sidepanel-container_left,.mc-sidepanel-container_right{width:33%;min-width:400px;height:100%;top:0}.mc-sidepanel-container_left .mc-sidepanel-indent,.mc-sidepanel-container_right .mc-sidepanel-indent{width:16px;height:100%}.mc-sidepanel-container_right{right:0;transform:translate(100%)}.mc-sidepanel-container_right .mc-sidepanel-wrapper{flex-direction:row}.mc-sidepanel-container_left{left:0;transform:translate(-100%)}.mc-sidepanel-container_left .mc-sidepanel-wrapper{flex-direction:row-reverse}.mc-sidepanel-container_top,.mc-sidepanel-container_bottom{flex-direction:column;height:33%;min-height:400px;width:100%;left:0}.mc-sidepanel-container_top .mc-sidepanel-indent,.mc-sidepanel-container_bottom .mc-sidepanel-indent{height:16px;width:100%}.mc-sidepanel-container_top{top:0;transform:translateY(-100%)}.mc-sidepanel-container_top .mc-sidepanel-wrapper{flex-direction:column-reverse}.mc-sidepanel-container_bottom{bottom:0;transform:translateY(100%)}.mc-sidepanel-container_bottom .mc-sidepanel-wrapper{flex-direction:column}.mc-sidepanel-wrapper{display:flex;flex:1;min-height:0;width:100%}.mc-sidepanel-indent{display:flex;flex:0 0 auto}.mc-sidepanel-indent .mc-sidepanel-close{width:100%;height:100%;-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;background:transparent;padding:0}.mc-sidepanel-content{display:flex;flex-direction:column;flex:1;min-height:0;width:100%}.mc-sidepanel-header{padding:14px 16px;padding:var(--mc-sidepanel-header-size-padding, 14px 16px);display:flex;flex-flow:row nowrap;justify-content:space-between;align-items:center;flex:0 0 auto}.mc-sidepanel-header .mc-sidepanel-close{-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;background:transparent;padding:0 0 0 8px;padding:var(--mc-sidepanel-header-size-close-padding, 0 0 0 8px)}.mc-sidepanel-title{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mc-sidepanel-body{overflow-y:auto;display:flex;flex:1;flex-direction:column;min-height:0}.mc-sidepanel-footer{padding:16px;padding:var(--mc-sidepanel-footer-size-padding, 16px);display:flex;flex-flow:row nowrap;justify-content:space-between;align-items:center;flex:0 0 auto}.mc-sidepanel-footer .mc-sidepanel-actions{display:flex;align-items:center;flex-direction:row;flex:1}.mc-sidepanel-footer .mc-sidepanel-actions[align=left]{justify-content:start}.mc-sidepanel-footer .mc-sidepanel-actions[align=right]{justify-content:flex-end}.mc-sidepanel-footer button+button{margin-left:16px}\n"], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }], animations: [mcSidepanelAnimations.sidepanelState], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
184
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0, type: McSidepanelContainerComponent, decorators: [{
186
+ /** @nocollapse */ McSidepanelContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: McSidepanelContainerComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: McSidepanelConfig }, { token: MC_SIDEPANEL_WITH_INDENT }, { token: MC_SIDEPANEL_WITH_SHADOW }], target: i0.ɵɵFactoryTarget.Component });
187
+ /** @nocollapse */ McSidepanelContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: McSidepanelContainerComponent, selector: "mc-sidepanel-container", host: { listeners: { "@state.start": "onAnimation($event)", "@state.done": "onAnimation($event)" }, properties: { "class.mc-sidepanel_nested": "withIndent", "class.mc-sidepanel-container_shadowed": "withShadow", "attr.id": "id", "attr.tabindex": "-1", "@state": "{\n value: animationState,\n params: animationTransform\n }" }, classAttribute: "mc-sidepanel-container" }, viewQueries: [{ propertyName: "portalOutlet", first: true, predicate: CdkPortalOutlet, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"mc-sidepanel-wrapper\">\n\n <div *ngIf=\"withIndent\" class=\"mc-sidepanel-indent\" (click)=\"exit()\"></div>\n\n <div class=\"mc-sidepanel-content\" cdkTrapFocus cdkTrapFocusAutoCapture>\n <ng-template cdkPortalOutlet></ng-template>\n </div>\n</div>\n", styles: [".mc-no-select{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}.mc-sidepanel-container{outline:none;display:flex;flex:1;position:fixed;min-height:0}.mc-sidepanel-container .flex{min-height:0}.mc-sidepanel-container_left,.mc-sidepanel-container_right{width:33%;min-width:400px;height:100%;top:0}.mc-sidepanel-container_left .mc-sidepanel-indent,.mc-sidepanel-container_right .mc-sidepanel-indent{width:16px;height:100%}.mc-sidepanel-container_right{right:0;transform:translate(100%)}.mc-sidepanel-container_right .mc-sidepanel-wrapper{flex-direction:row}.mc-sidepanel-container_left{left:0;transform:translate(-100%)}.mc-sidepanel-container_left .mc-sidepanel-wrapper{flex-direction:row-reverse}.mc-sidepanel-container_top,.mc-sidepanel-container_bottom{flex-direction:column;height:33%;min-height:400px;width:100%;left:0}.mc-sidepanel-container_top .mc-sidepanel-indent,.mc-sidepanel-container_bottom .mc-sidepanel-indent{height:16px;width:100%}.mc-sidepanel-container_top{top:0;transform:translateY(-100%)}.mc-sidepanel-container_top .mc-sidepanel-wrapper{flex-direction:column-reverse}.mc-sidepanel-container_bottom{bottom:0;transform:translateY(100%)}.mc-sidepanel-container_bottom .mc-sidepanel-wrapper{flex-direction:column}.mc-sidepanel-wrapper{display:flex;flex:1;min-height:0;width:100%}.mc-sidepanel-indent{display:flex;flex:0 0 auto}.mc-sidepanel-indent .mc-sidepanel-close{width:100%;height:100%;-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;background:transparent;padding:0}.mc-sidepanel-content{display:flex;flex-direction:column;flex:1;min-height:0;min-width:0;width:100%}.mc-sidepanel-header{padding:14px 16px;padding:var(--mc-sidepanel-header-size-padding, 14px 16px);display:flex;flex-flow:row nowrap;justify-content:space-between;align-items:center;flex:0 0 auto}.mc-sidepanel-header .mc-sidepanel-close{-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;background:transparent;padding:0 0 0 8px;padding:var(--mc-sidepanel-header-size-close-padding, 0 0 0 8px)}.mc-sidepanel-title{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mc-sidepanel-body{overflow-y:auto;display:flex;flex:1;flex-direction:column;min-height:0}.mc-sidepanel-footer{padding:16px;padding:var(--mc-sidepanel-footer-size-padding, 16px);display:flex;flex-flow:row nowrap;justify-content:space-between;align-items:center;flex:0 0 auto}.mc-sidepanel-footer .mc-sidepanel-actions{display:flex;align-items:center;flex-direction:row;flex:1}.mc-sidepanel-footer .mc-sidepanel-actions[align=left]{justify-content:start}.mc-sidepanel-footer .mc-sidepanel-actions[align=right]{justify-content:flex-end}.mc-sidepanel-footer button+button{margin-left:16px}\n"], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { type: i4.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }], animations: [mcSidepanelAnimations.sidepanelState], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
188
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: McSidepanelContainerComponent, decorators: [{
185
189
  type: Component,
186
190
  args: [{
187
191
  selector: 'mc-sidepanel-container',
@@ -194,8 +198,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImpor
194
198
  class: 'mc-sidepanel-container',
195
199
  '[class.mc-sidepanel_nested]': 'withIndent',
196
200
  '[class.mc-sidepanel-container_shadowed]': 'withShadow',
197
- role: 'dialog',
198
- 'aria-modal': 'true',
199
201
  '[attr.id]': 'id',
200
202
  '[attr.tabindex]': '-1',
201
203
  '[@state]': `{
@@ -258,7 +260,8 @@ class McSidepanelService {
258
260
  ref.instance = contentRef.instance;
259
261
  }
260
262
  this.openedSidepanels.push(ref);
261
- ref.afterClosed().subscribe(() => this.removeOpenSidepanel(ref));
263
+ ref.afterClosed()
264
+ .subscribe(() => this.removeOpenSidepanel(ref));
262
265
  container.enter();
263
266
  return ref;
264
267
  }
@@ -356,9 +359,9 @@ class McSidepanelService {
356
359
  }
357
360
  }
358
361
  }
359
- /** @nocollapse */ McSidepanelService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0, type: McSidepanelService, deps: [{ token: i1.Overlay }, { token: i0.Injector }, { token: MC_SIDEPANEL_DEFAULT_OPTIONS, optional: true }, { token: McSidepanelService, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.Injectable });
360
- /** @nocollapse */ McSidepanelService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0, type: McSidepanelService });
361
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0, type: McSidepanelService, decorators: [{
362
+ /** @nocollapse */ McSidepanelService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: McSidepanelService, deps: [{ token: i1.Overlay }, { token: i0.Injector }, { token: MC_SIDEPANEL_DEFAULT_OPTIONS, optional: true }, { token: McSidepanelService, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.Injectable });
363
+ /** @nocollapse */ McSidepanelService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: McSidepanelService });
364
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: McSidepanelService, decorators: [{
362
365
  type: Injectable
363
366
  }], ctorParameters: function () { return [{ type: i1.Overlay }, { type: i0.Injector }, { type: McSidepanelConfig, decorators: [{
364
367
  type: Optional
@@ -400,9 +403,9 @@ class McSidepanelClose {
400
403
  }
401
404
  }
402
405
  }
403
- /** @nocollapse */ McSidepanelClose.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0, type: McSidepanelClose, deps: [{ token: McSidepanelRef, optional: true }, { token: i0.ElementRef }, { token: McSidepanelService }], target: i0.ɵɵFactoryTarget.Directive });
404
- /** @nocollapse */ McSidepanelClose.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.5", type: McSidepanelClose, selector: "button[mc-sidepanel-close], button[mcSidepanelClose]", inputs: { sidepanelResult: ["mc-sidepanel-close", "sidepanelResult"], mcSidepanelClose: "mcSidepanelClose" }, host: { listeners: { "click": "sidepanelRef.close(sidepanelResult)" }, classAttribute: "mc-sidepanel-close" }, usesOnChanges: true, ngImport: i0 });
405
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0, type: McSidepanelClose, decorators: [{
406
+ /** @nocollapse */ McSidepanelClose.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: McSidepanelClose, deps: [{ token: McSidepanelRef, optional: true }, { token: i0.ElementRef }, { token: McSidepanelService }], target: i0.ɵɵFactoryTarget.Directive });
407
+ /** @nocollapse */ McSidepanelClose.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.13", type: McSidepanelClose, selector: "button[mc-sidepanel-close], button[mcSidepanelClose]", inputs: { sidepanelResult: ["mc-sidepanel-close", "sidepanelResult"], mcSidepanelClose: "mcSidepanelClose" }, host: { listeners: { "click": "sidepanelRef.close(sidepanelResult)" }, classAttribute: "mc-sidepanel-close" }, usesOnChanges: true, ngImport: i0 });
408
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: McSidepanelClose, decorators: [{
406
409
  type: Directive,
407
410
  args: [{
408
411
  selector: 'button[mc-sidepanel-close], button[mcSidepanelClose]',
@@ -424,19 +427,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImpor
424
427
  * Header of a sidepanel.
425
428
  */
426
429
  class McSidepanelHeader {
430
+ constructor() {
431
+ this.themePalette = ThemePalette;
432
+ }
427
433
  }
428
- /** @nocollapse */ McSidepanelHeader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0, type: McSidepanelHeader, deps: [], target: i0.ɵɵFactoryTarget.Component });
429
- /** @nocollapse */ McSidepanelHeader.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.5", type: McSidepanelHeader, selector: "mc-sidepanel-header", inputs: { closeable: "closeable" }, host: { classAttribute: "mc-sidepanel-header" }, ngImport: i0, template: `
434
+ /** @nocollapse */ McSidepanelHeader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: McSidepanelHeader, deps: [], target: i0.ɵɵFactoryTarget.Component });
435
+ /** @nocollapse */ McSidepanelHeader.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: McSidepanelHeader, selector: "mc-sidepanel-header", inputs: { closeable: "closeable" }, host: { classAttribute: "mc-sidepanel-header" }, ngImport: i0, template: `
430
436
  <div class="mc-sidepanel-title">
431
437
  <ng-content></ng-content>
432
438
  </div>
433
439
  <button *ngIf="closeable" mc-sidepanel-close>
434
440
  <span class="mc-sidepanel-close-x">
435
- <i mc-icon="mc-close-L_16" class="mc-icon mc-icon_light" [color]="'second'"></i>
441
+ <i mc-icon="mc-close-L_16" class="mc-icon mc-icon_light" [color]="themePalette.Primary"></i>
436
442
  </span>
437
443
  </button>
438
444
  `, isInline: true, components: [{ type: i3$1.McIcon, selector: "[mc-icon]", inputs: ["color"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: McSidepanelClose, selector: "button[mc-sidepanel-close], button[mcSidepanelClose]", inputs: ["mc-sidepanel-close", "mcSidepanelClose"] }, { type: i3$1.McIconCSSStyler, selector: "[mc-icon]" }] });
439
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0, type: McSidepanelHeader, decorators: [{
445
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: McSidepanelHeader, decorators: [{
440
446
  type: Component,
441
447
  args: [{
442
448
  selector: 'mc-sidepanel-header',
@@ -446,7 +452,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImpor
446
452
  </div>
447
453
  <button *ngIf="closeable" mc-sidepanel-close>
448
454
  <span class="mc-sidepanel-close-x">
449
- <i mc-icon="mc-close-L_16" class="mc-icon mc-icon_light" [color]="'second'"></i>
455
+ <i mc-icon="mc-close-L_16" class="mc-icon mc-icon_light" [color]="themePalette.Primary"></i>
450
456
  </span>
451
457
  </button>
452
458
  `,
@@ -462,9 +468,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImpor
462
468
  */
463
469
  class McSidepanelBody {
464
470
  }
465
- /** @nocollapse */ McSidepanelBody.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0, type: McSidepanelBody, deps: [], target: i0.ɵɵFactoryTarget.Directive });
466
- /** @nocollapse */ McSidepanelBody.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.5", type: McSidepanelBody, selector: "mc-sidepanel-body, [mc-sidepanel-body], mcSidepanelBody", host: { classAttribute: "mc-sidepanel-body" }, ngImport: i0 });
467
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0, type: McSidepanelBody, decorators: [{
471
+ /** @nocollapse */ McSidepanelBody.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: McSidepanelBody, deps: [], target: i0.ɵɵFactoryTarget.Directive });
472
+ /** @nocollapse */ McSidepanelBody.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.13", type: McSidepanelBody, selector: "mc-sidepanel-body, [mc-sidepanel-body], mcSidepanelBody", host: { classAttribute: "mc-sidepanel-body" }, ngImport: i0 });
473
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: McSidepanelBody, decorators: [{
468
474
  type: Directive,
469
475
  args: [{
470
476
  selector: 'mc-sidepanel-body, [mc-sidepanel-body], mcSidepanelBody',
@@ -478,9 +484,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImpor
478
484
  */
479
485
  class McSidepanelFooter {
480
486
  }
481
- /** @nocollapse */ McSidepanelFooter.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0, type: McSidepanelFooter, deps: [], target: i0.ɵɵFactoryTarget.Directive });
482
- /** @nocollapse */ McSidepanelFooter.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.5", type: McSidepanelFooter, selector: "mc-sidepanel-footer, [mc-sidepanel-footer], mcSidepanelFooter", host: { classAttribute: "mc-sidepanel-footer" }, ngImport: i0 });
483
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0, type: McSidepanelFooter, decorators: [{
487
+ /** @nocollapse */ McSidepanelFooter.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: McSidepanelFooter, deps: [], target: i0.ɵɵFactoryTarget.Directive });
488
+ /** @nocollapse */ McSidepanelFooter.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.13", type: McSidepanelFooter, selector: "mc-sidepanel-footer, [mc-sidepanel-footer], mcSidepanelFooter", host: { classAttribute: "mc-sidepanel-footer" }, ngImport: i0 });
489
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: McSidepanelFooter, decorators: [{
484
490
  type: Directive,
485
491
  args: [{
486
492
  selector: 'mc-sidepanel-footer, [mc-sidepanel-footer], mcSidepanelFooter',
@@ -494,9 +500,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImpor
494
500
  */
495
501
  class McSidepanelActions {
496
502
  }
497
- /** @nocollapse */ McSidepanelActions.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0, type: McSidepanelActions, deps: [], target: i0.ɵɵFactoryTarget.Directive });
498
- /** @nocollapse */ McSidepanelActions.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.5", type: McSidepanelActions, selector: "mc-sidepanel-actions, [mc-sidepanel-actions], mcSidepanelActions", host: { classAttribute: "mc-sidepanel-actions" }, ngImport: i0 });
499
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0, type: McSidepanelActions, decorators: [{
503
+ /** @nocollapse */ McSidepanelActions.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: McSidepanelActions, deps: [], target: i0.ɵɵFactoryTarget.Directive });
504
+ /** @nocollapse */ McSidepanelActions.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.13", type: McSidepanelActions, selector: "mc-sidepanel-actions, [mc-sidepanel-actions], mcSidepanelActions", host: { classAttribute: "mc-sidepanel-actions" }, ngImport: i0 });
505
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: McSidepanelActions, decorators: [{
500
506
  type: Directive,
501
507
  args: [{
502
508
  selector: 'mc-sidepanel-actions, [mc-sidepanel-actions], mcSidepanelActions',
@@ -520,8 +526,8 @@ function getClosestSidepanel(element, openSidepanels) {
520
526
 
521
527
  class McSidepanelModule {
522
528
  }
523
- /** @nocollapse */ McSidepanelModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0, type: McSidepanelModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
524
- /** @nocollapse */ McSidepanelModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0, type: McSidepanelModule, declarations: [McSidepanelContainerComponent,
529
+ /** @nocollapse */ McSidepanelModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: McSidepanelModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
530
+ /** @nocollapse */ McSidepanelModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: McSidepanelModule, declarations: [McSidepanelContainerComponent,
525
531
  McSidepanelClose,
526
532
  McSidepanelHeader,
527
533
  McSidepanelBody,
@@ -531,21 +537,23 @@ class McSidepanelModule {
531
537
  PortalModule,
532
538
  McCommonModule,
533
539
  McButtonModule,
534
- McIconModule], exports: [McSidepanelContainerComponent,
540
+ McIconModule,
541
+ A11yModule], exports: [McSidepanelContainerComponent,
535
542
  McSidepanelClose,
536
543
  McSidepanelHeader,
537
544
  McSidepanelBody,
538
545
  McSidepanelFooter,
539
546
  McSidepanelActions] });
540
- /** @nocollapse */ McSidepanelModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0, type: McSidepanelModule, providers: [McSidepanelService], imports: [[
547
+ /** @nocollapse */ McSidepanelModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: McSidepanelModule, providers: [McSidepanelService], imports: [[
541
548
  CommonModule,
542
549
  OverlayModule,
543
550
  PortalModule,
544
551
  McCommonModule,
545
552
  McButtonModule,
546
- McIconModule
553
+ McIconModule,
554
+ A11yModule
547
555
  ]] });
548
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0, type: McSidepanelModule, decorators: [{
556
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: McSidepanelModule, decorators: [{
549
557
  type: NgModule,
550
558
  args: [{
551
559
  imports: [
@@ -554,7 +562,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImpor
554
562
  PortalModule,
555
563
  McCommonModule,
556
564
  McButtonModule,
557
- McIconModule
565
+ McIconModule,
566
+ A11yModule
558
567
  ],
559
568
  providers: [McSidepanelService],
560
569
  declarations: [
@@ -1 +1 @@
1
- {"version":3,"file":"ptsecurity-mosaic-sidepanel.js","sources":["../../../packages/mosaic/sidepanel/sidepanel-config.ts","../../../packages/mosaic/sidepanel/sidepanel-animations.ts","../../../packages/mosaic/sidepanel/sidepanel-ref.ts","../../../packages/mosaic/sidepanel/sidepanel-container.component.ts","../../../packages/mosaic/sidepanel/sidepanel-container.component.html","../../../packages/mosaic/sidepanel/sidepanel.service.ts","../../../packages/mosaic/sidepanel/sidepanel-directives.ts","../../../packages/mosaic/sidepanel/sidepanel.module.ts","../../../packages/mosaic/sidepanel/ptsecurity-mosaic-sidepanel.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\n\n/** Injection token that can be used to access the data that was passed in to a sidepanel. */\nexport const MC_SIDEPANEL_DATA = new InjectionToken<any>('McSidepanelData');\n\nexport enum McSidepanelPosition {\n Right = 'right',\n Left = 'left',\n Top = 'top',\n Bottom = 'bottom'\n}\n\nexport class McSidepanelConfig<D = any> {\n /** ID for the sidepanel. If omitted, a unique one will be generated. */\n id?: string;\n\n /** Data being injected into the child component. */\n data?: D | null = null;\n\n position?: McSidepanelPosition = McSidepanelPosition.Right;\n\n /** Whether the sidepanel has a backdrop. */\n hasBackdrop?: boolean = true;\n\n backdropClass?: string;\n\n /** When we open multiple sidepanels, backdrop appears only once, except cases then this flag is true. */\n requiredBackdrop?: boolean = false;\n\n /** Whether the user can use escape or clicking outside to close the sidepanel. */\n disableClose?: boolean = false;\n\n /** Custom class for the overlay pane. */\n overlayPanelClass?: string | string[] = '';\n}\n","import { animate, AnimationTriggerMetadata, state, style, transition, trigger } from '@angular/animations';\nimport { AnimationCurves } from '@ptsecurity/mosaic/core';\n\nimport { McSidepanelPosition } from './sidepanel-config';\n\n\nexport enum McSidepanelAnimationState {\n Void = 'void',\n Visible = 'visible',\n Hidden = 'hidden'\n}\n\n// TODO Find a way to use dynamic keys and avoid error \"Expression form not supported.\"\n// tslint:disable-next-line\nexport const mcSidepanelTransformAnimation: Record<McSidepanelPosition, { in: string; out: string }> = {\n right: { in: 'translateX(100%)', out: 'translateX(0%)' },\n left: { in: 'translateX(-100%)', out: 'translateX(0%)' },\n top: { in: 'translateY(-100%)', out: 'translateY(0%)' },\n bottom: { in: 'translateY(100%)', out: 'translateY(0%)' }\n};\n\nexport const mcSidepanelAnimations: { readonly sidepanelState: AnimationTriggerMetadata } = {\n sidepanelState: trigger('state', [\n state(\n 'hidden',\n style({ transform: '{{transformIn}}' }),\n { params: { transformIn: mcSidepanelTransformAnimation[McSidepanelPosition.Right].in }}\n ),\n state(\n 'visible',\n style({ transform: '{{transformOut}}' }),\n { params: { transformOut: mcSidepanelTransformAnimation[McSidepanelPosition.Right].out }}\n ),\n transition(\n 'visible => void, visible => hidden',\n animate(`200ms ${AnimationCurves.AccelerationCurve}`)\n ),\n transition(\n 'void => visible',\n animate(`200ms ${AnimationCurves.DecelerationCurve}`)\n )\n ])\n};\n","import { OverlayRef } from '@angular/cdk/overlay';\nimport { ESCAPE } from '@ptsecurity/cdk/keycodes';\nimport { merge, Observable, Subject } from 'rxjs';\nimport { filter, take } from 'rxjs/operators';\n\nimport { McSidepanelAnimationState } from './sidepanel-animations';\nimport { McSidepanelConfig } from './sidepanel-config';\nimport { McSidepanelContainerComponent } from './sidepanel-container.component';\n\n\n// Counter for unique sidepanel ids.\nlet uniqueId = 0;\n\nexport class McSidepanelRef<T = any, R = any> {\n readonly id: string;\n\n /** Instance of the component making up the content of the sidepanel. */\n instance: T;\n\n /** Subject for notifying the user that the sidepanel has been closed and dismissed. */\n private readonly afterClosed$ = new Subject<R | undefined>();\n\n /** Subject for notifying the user that the sidepanel has opened and appeared. */\n private readonly afterOpened$ = new Subject<void>();\n\n /** Result to be passed down to the `afterDismissed` stream. */\n private result: R | undefined;\n\n constructor(\n public containerInstance: McSidepanelContainerComponent,\n private overlayRef: OverlayRef,\n public config: McSidepanelConfig) {\n\n this.id = this.config.id || `mc-sidepanel-${uniqueId++}`;\n this.containerInstance.id = this.id;\n\n // Emit when opening animation completes\n containerInstance.animationStateChanged.pipe(\n filter(\n (event) => event.phaseName === 'done' && event.toState === McSidepanelAnimationState.Visible\n ),\n take(1)\n ).subscribe(() => {\n this.afterOpened$.next();\n this.afterOpened$.complete();\n });\n\n // Dispose overlay when closing animation is complete\n containerInstance.animationStateChanged.pipe(\n filter(\n (event) => event.phaseName === 'done' && event.toState === McSidepanelAnimationState.Hidden\n ),\n take(1)\n ).subscribe(() => {\n overlayRef.dispose();\n this.afterClosed$.next(this.result);\n this.afterClosed$.complete();\n });\n\n if (!containerInstance.sidepanelConfig.disableClose) {\n merge(\n overlayRef.backdropClick(),\n overlayRef.keydownEvents().pipe(\n // tslint:disable:deprecation\n // keyCode is deprecated, but IE11 and Edge don't support code property, which we need use instead\n filter((event) => event.keyCode === ESCAPE)\n )\n ).subscribe(() => this.close());\n }\n }\n\n close(result?: R): void {\n if (!this.afterClosed$.closed) {\n // Transition the backdrop in parallel to the sidepanel.\n this.containerInstance.animationStateChanged.pipe(\n filter((event) => event.phaseName === 'done'),\n take(1)\n ).subscribe(() => this.overlayRef.detachBackdrop());\n\n this.result = result;\n this.containerInstance.exit();\n }\n }\n\n /** Gets an observable that is notified when the sidepanel is finished closing. */\n afterClosed(): Observable<R | undefined> {\n return this.afterClosed$.asObservable();\n }\n\n /** Gets an observable that is notified when the sidepanel has opened and appeared. */\n afterOpened(): Observable<void> {\n return this.afterOpened$.asObservable();\n }\n}\n","import { AnimationEvent } from '@angular/animations';\nimport { BasePortalOutlet, CdkPortalOutlet, ComponentPortal, TemplatePortal } from '@angular/cdk/portal';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ComponentRef,\n ElementRef,\n EmbeddedViewRef,\n EventEmitter,\n Inject,\n InjectionToken,\n OnDestroy,\n ViewChild,\n ViewEncapsulation\n} from '@angular/core';\n\nimport {\n mcSidepanelAnimations,\n McSidepanelAnimationState,\n mcSidepanelTransformAnimation\n} from './sidepanel-animations';\nimport { McSidepanelConfig, McSidepanelPosition } from './sidepanel-config';\n\n\nexport const MC_SIDEPANEL_WITH_INDENT = new InjectionToken<boolean>('mc-sidepanel-with-indent');\n\nexport const MC_SIDEPANEL_WITH_SHADOW = new InjectionToken<boolean>('mc-sidepanel-with-shadow');\n\n@Component({\n selector: 'mc-sidepanel-container',\n templateUrl: './sidepanel-container.component.html',\n styleUrls: ['./sidepanel.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n animations: [mcSidepanelAnimations.sidepanelState],\n host: {\n class: 'mc-sidepanel-container',\n '[class.mc-sidepanel_nested]': 'withIndent',\n '[class.mc-sidepanel-container_shadowed]': 'withShadow',\n role: 'dialog',\n 'aria-modal': 'true',\n '[attr.id]': 'id',\n '[attr.tabindex]': '-1',\n '[@state]': `{\n value: animationState,\n params: animationTransform\n }`,\n '(@state.start)': 'onAnimation($event)',\n '(@state.done)': 'onAnimation($event)'\n }\n})\nexport class McSidepanelContainerComponent extends BasePortalOutlet implements OnDestroy {\n /** ID for the container DOM element. */\n id: string;\n\n /** The portal outlet inside of this container into which the content will be loaded. */\n @ViewChild(CdkPortalOutlet, {static: true}) portalOutlet: CdkPortalOutlet;\n\n /** The state of the sidepanel animations. */\n animationState: McSidepanelAnimationState = McSidepanelAnimationState.Void;\n\n animationTransform: { transformIn: string; transformOut: string };\n\n /** Emits whenever the state of the animation changes. */\n animationStateChanged = new EventEmitter<AnimationEvent>();\n\n /** Whether the component has been destroyed. */\n private destroyed: boolean;\n\n constructor(\n private elementRef: ElementRef<HTMLElement>,\n private changeDetectorRef: ChangeDetectorRef,\n public sidepanelConfig: McSidepanelConfig,\n @Inject(MC_SIDEPANEL_WITH_INDENT) public withIndent: boolean,\n @Inject(MC_SIDEPANEL_WITH_SHADOW) public withShadow: boolean\n ) {\n super();\n }\n\n ngOnDestroy(): void {\n this.destroyed = true;\n }\n\n /** Attach a component portal as content to this sidepanel container. */\n attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T> {\n this.validatePortalAttached();\n this.setAnimation();\n this.setPanelClass();\n\n return this.portalOutlet.attachComponentPortal(portal);\n }\n\n /** Attach a template portal as content to this sidepanel container. */\n attachTemplatePortal<C>(portal: TemplatePortal<C>): EmbeddedViewRef<C> {\n this.validatePortalAttached();\n this.setAnimation();\n this.setPanelClass();\n\n return this.portalOutlet.attachTemplatePortal(portal);\n }\n\n /** Begin animation of the sidepanel entrance into view. */\n enter(): void {\n if (!this.destroyed) {\n this.animationState = McSidepanelAnimationState.Visible;\n this.changeDetectorRef.detectChanges();\n }\n }\n\n /** Begin animation of the sidepanel exiting from view. */\n exit(): void {\n if (!this.destroyed) {\n this.animationState = McSidepanelAnimationState.Hidden;\n this.changeDetectorRef.markForCheck();\n }\n }\n\n onAnimation(event: AnimationEvent) {\n this.animationStateChanged.emit(event);\n }\n\n private setAnimation() {\n const position: McSidepanelPosition = this.sidepanelConfig.position!;\n\n this.animationTransform = {\n transformIn: mcSidepanelTransformAnimation[position].in,\n transformOut: mcSidepanelTransformAnimation[position].out\n };\n }\n\n private setPanelClass() {\n const element: HTMLElement = this.elementRef.nativeElement;\n const position: McSidepanelPosition = this.sidepanelConfig.position!;\n\n element.classList.add(`mc-sidepanel-container_${position}`);\n }\n\n private validatePortalAttached() {\n if (this.portalOutlet.hasAttached()) {\n throw Error('Attempting to attach sidepanel content after content is already attached');\n }\n }\n}\n","<div class=\"mc-sidepanel-wrapper\">\n\n <div *ngIf=\"withIndent\" class=\"mc-sidepanel-indent\" (click)=\"exit()\"></div>\n\n <div class=\"mc-sidepanel-content\">\n <ng-template cdkPortalOutlet></ng-template>\n </div>\n</div>\n","import { Overlay, OverlayConfig, OverlayRef } from '@angular/cdk/overlay';\nimport { ComponentPortal, ComponentType, PortalInjector, TemplatePortal } from '@angular/cdk/portal';\nimport {\n ComponentRef,\n Inject,\n Injectable,\n InjectionToken,\n Injector, OnDestroy,\n Optional,\n SkipSelf,\n TemplateRef\n} from '@angular/core';\n\nimport { MC_SIDEPANEL_DATA, McSidepanelConfig } from './sidepanel-config';\nimport {\n McSidepanelContainerComponent,\n MC_SIDEPANEL_WITH_INDENT,\n MC_SIDEPANEL_WITH_SHADOW\n} from './sidepanel-container.component';\nimport { McSidepanelRef } from './sidepanel-ref';\n\n\n/** Injection token that can be used to specify default sidepanel options. */\nexport const MC_SIDEPANEL_DEFAULT_OPTIONS =\n new InjectionToken<McSidepanelConfig>('mc-sidepanel-default-options');\n\n@Injectable()\nexport class McSidepanelService implements OnDestroy {\n private openedSidepanelsAtThisLevel: McSidepanelRef[] = [];\n\n /** Keeps track of the currently-open sidepanels. */\n get openedSidepanels(): McSidepanelRef[] {\n return this.parentSidepanelService ? this.parentSidepanelService.openedSidepanels :\n this.openedSidepanelsAtThisLevel;\n }\n\n constructor(\n private overlay: Overlay,\n private injector: Injector,\n @Optional() @Inject(MC_SIDEPANEL_DEFAULT_OPTIONS) private defaultOptions: McSidepanelConfig,\n @Optional() @SkipSelf() private parentSidepanelService: McSidepanelService) {\n }\n\n ngOnDestroy() {\n // Only close the sidepanels at this level on destroy\n // since the parent service may still be active.\n this.closeSidepanels(this.openedSidepanelsAtThisLevel);\n }\n\n open<T, D = any>(\n componentOrTemplateRef: ComponentType<T> | TemplateRef<T>,\n config?: McSidepanelConfig<D>\n ): McSidepanelRef<T> {\n const fullConfig = {\n ...(this.defaultOptions || new McSidepanelConfig()),\n ...config\n };\n\n if (fullConfig.id && this.getSidepanelById(fullConfig.id)) {\n throw Error(`Sidepanel with id \"${fullConfig.id}\" exists already. The sidepanel id must be unique.`);\n }\n\n const overlayRef = this.createOverlay(fullConfig);\n const container = this.attachContainer(overlayRef, fullConfig);\n const ref = new McSidepanelRef(container, overlayRef, fullConfig);\n\n if (componentOrTemplateRef instanceof TemplateRef) {\n container.attachTemplatePortal(new TemplatePortal<T>(componentOrTemplateRef, null!, {\n $implicit: fullConfig.data,\n sidepanelRef: ref\n } as any));\n } else {\n const injector = this.createInjector(fullConfig, ref, container);\n const portal = new ComponentPortal(componentOrTemplateRef, undefined, injector);\n const contentRef = container.attachComponentPortal(portal);\n\n ref.instance = contentRef.instance;\n }\n\n this.openedSidepanels.push(ref);\n ref.afterClosed().subscribe(() => this.removeOpenSidepanel(ref));\n container.enter();\n\n return ref;\n }\n\n /**\n * Closes all of the currently-open sidepanels.\n */\n closeAll(): void {\n this.closeSidepanels(this.openedSidepanels);\n }\n\n /**\n * Finds an open sidepanel by its id.\n * @param id ID to use when looking up the sidepanel.\n */\n getSidepanelById(id: string): McSidepanelRef | undefined {\n return this.openedSidepanels.find((sidepanel) => sidepanel.id === id);\n }\n\n /**\n * Attaches the sidepanel container component to the overlay.\n */\n private attachContainer(overlayRef: OverlayRef, config: McSidepanelConfig): McSidepanelContainerComponent {\n const openedSidepanelsWithSamePosition = this.getOpenedSidepanelsWithSamePosition(config);\n\n // tslint:disable-next-line:deprecation\n const injector = new PortalInjector(this.injector, new WeakMap<any>([\n [McSidepanelConfig, config],\n [MC_SIDEPANEL_WITH_INDENT, openedSidepanelsWithSamePosition.length >= 1],\n [MC_SIDEPANEL_WITH_SHADOW, openedSidepanelsWithSamePosition.length < 2] // tslint:disable-line\n ]));\n\n const containerPortal = new ComponentPortal(McSidepanelContainerComponent, undefined, injector);\n const containerRef: ComponentRef<McSidepanelContainerComponent> = overlayRef.attach(containerPortal);\n\n return containerRef.instance;\n }\n\n /**\n * Creates a custom injector to be used inside the sidepanel. This allows a component loaded inside\n * of a sidepanel to close itself and, optionally, to return a value.\n * @param config Config object that is used to construct the sidepanel.\n * @param sidepanelRef Reference to the sidepanel.\n * @param sidepanelContainer Sidepanel container element that wraps all of the contents.\n * @returns The custom injector that can be used inside the sidepanel.\n */\n private createInjector<T>(\n config: McSidepanelConfig,\n sidepanelRef: McSidepanelRef<T>,\n // tslint:disable-next-line:deprecation\n sidepanelContainer: McSidepanelContainerComponent): PortalInjector {\n\n // The McSidepanelContainerComponent is injected in the portal as the McSidepanelContainerComponent and\n // the sidepanel's content are created out of the same ViewContainerRef and as such, are siblings for injector\n // purposes. To allow the hierarchy that is expected, the McSidepanelContainerComponent is explicitly\n // added to the injection tokens.\n const injectionTokens = new WeakMap<any>([\n [McSidepanelContainerComponent, sidepanelContainer],\n [MC_SIDEPANEL_DATA, config.data],\n [McSidepanelRef, sidepanelRef]\n ]);\n\n // tslint:disable-next-line:deprecation\n return new PortalInjector(this.injector, injectionTokens);\n }\n\n /**\n * Creates a new overlay and places it in the correct location.\n * @param config The user-specified sidepanel config.\n */\n private createOverlay(config: McSidepanelConfig): OverlayRef {\n const overlayConfig = new OverlayConfig({\n hasBackdrop: config.hasBackdrop,\n backdropClass: this.getBackdropClass(config),\n maxWidth: '100%',\n panelClass: config.overlayPanelClass,\n scrollStrategy: this.overlay.scrollStrategies.block(),\n positionStrategy: this.overlay.position().global()\n });\n\n return this.overlay.create(overlayConfig);\n }\n\n private closeSidepanels(sidepanels: McSidepanelRef[]) {\n const reversedOpenedSidepanels = [...sidepanels.reverse()];\n\n reversedOpenedSidepanels.forEach((sidepanelRef: McSidepanelRef) => {\n sidepanelRef.close();\n });\n }\n\n private getBackdropClass(config: McSidepanelConfig): string {\n if (config.hasBackdrop && config.backdropClass) {\n return config.backdropClass;\n }\n\n const hasOpenedSidepanelWithBackdrop =\n this.openedSidepanels.some((sidepanelRef) => sidepanelRef.config.hasBackdrop!);\n\n return config.requiredBackdrop || !hasOpenedSidepanelWithBackdrop ? 'cdk-overlay-dark-backdrop' :\n 'cdk-overlay-transparent-backdrop';\n }\n\n private getOpenedSidepanelsWithSamePosition(config: McSidepanelConfig): McSidepanelRef[] {\n return this.openedSidepanels.filter((sidepanelRef) => sidepanelRef.config.position === config.position);\n }\n\n /**\n * Removes a sidepanel from the array of open sidepanels.\n * @param sidepanelRef Sidepanel to be removed.\n */\n private removeOpenSidepanel(sidepanelRef: McSidepanelRef) {\n const index = this.openedSidepanels.indexOf(sidepanelRef);\n\n if (index > -1) {\n this.openedSidepanels.splice(index, 1);\n }\n }\n}\n","import { Component, Directive, ElementRef, Input, OnChanges, OnInit, Optional, SimpleChanges } from '@angular/core';\n\nimport { McSidepanelRef } from './sidepanel-ref';\nimport { McSidepanelService } from './sidepanel.service';\n\n\n/**\n * Button that will close the current sidepanel.\n */\n@Directive({\n selector: 'button[mc-sidepanel-close], button[mcSidepanelClose]',\n host: {\n '(click)': 'sidepanelRef.close(sidepanelResult)',\n class: 'mc-sidepanel-close'\n }\n})\nexport class McSidepanelClose implements OnInit, OnChanges {\n @Input('mc-sidepanel-close') sidepanelResult: any;\n\n @Input('mcSidepanelClose') mcSidepanelClose: any;\n\n constructor(\n @Optional() public sidepanelRef: McSidepanelRef,\n private elementRef: ElementRef<HTMLElement>,\n private sidepanelService: McSidepanelService\n ) {}\n\n ngOnInit() {\n if (!this.sidepanelRef) {\n // When this directive is included in a sidepanel via TemplateRef (rather than being\n // in a Component), the SidepanelRef isn't available via injection because embedded\n // views cannot be given a custom injector. Instead, we look up the SidepanelRef by\n // ID.\n // This must occur in `onInit`, as the ID binding for the sidepanel container won't\n // be resolved at constructor time. We use setTimeout by same reason.\n setTimeout(() => {\n this.sidepanelRef = getClosestSidepanel(this.elementRef, this.sidepanelService.openedSidepanels)!;\n });\n }\n }\n\n ngOnChanges(changes: SimpleChanges) {\n const proxiedChange = changes.mcSidepanelClose || changes.sidepanelResult;\n\n if (proxiedChange) {\n this.sidepanelResult = proxiedChange.currentValue;\n }\n }\n}\n\n/**\n * Header of a sidepanel.\n */\n@Component({\n selector: 'mc-sidepanel-header',\n template: `\n <div class=\"mc-sidepanel-title\">\n <ng-content></ng-content>\n </div>\n <button *ngIf=\"closeable\" mc-sidepanel-close>\n <span class=\"mc-sidepanel-close-x\">\n <i mc-icon=\"mc-close-L_16\" class=\"mc-icon mc-icon_light\" [color]=\"'second'\"></i>\n </span>\n </button>\n `,\n host: {\n class: 'mc-sidepanel-header'\n }\n})\nexport class McSidepanelHeader {\n @Input() closeable: boolean;\n}\n\n/**\n * Scrollable content container of a sidepanel.\n */\n@Directive({\n selector: 'mc-sidepanel-body, [mc-sidepanel-body], mcSidepanelBody',\n host: {\n class: 'mc-sidepanel-body'\n }\n})\nexport class McSidepanelBody {}\n\n/**\n * Footer of a sidepanel.\n */\n@Directive({\n selector: 'mc-sidepanel-footer, [mc-sidepanel-footer], mcSidepanelFooter',\n host: {\n class: 'mc-sidepanel-footer'\n }\n})\nexport class McSidepanelFooter {}\n\n/**\n * Actions block of a sidepanel footer.\n */\n@Directive({\n selector: 'mc-sidepanel-actions, [mc-sidepanel-actions], mcSidepanelActions',\n host: {\n class: 'mc-sidepanel-actions'\n }\n})\nexport class McSidepanelActions {}\n\n/**\n * Finds the closest McSidepanelRef to an element by looking at the DOM.\n * @param element Element relative to which to look for a sidepanel.\n * @param openSidepanels References to the currently-open sidepanels.\n */\nfunction getClosestSidepanel(element: ElementRef<HTMLElement>, openSidepanels: McSidepanelRef[]) {\n let parent: HTMLElement | null = element.nativeElement.parentElement;\n\n while (parent && !parent.classList.contains('mc-sidepanel-container')) {\n parent = parent.parentElement;\n }\n\n return parent ? openSidepanels.find((sidepanel) => sidepanel.id === parent!.id) : null;\n}\n","import { OverlayModule } from '@angular/cdk/overlay';\nimport { PortalModule } from '@angular/cdk/portal';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { McButtonModule } from '@ptsecurity/mosaic/button';\nimport { McCommonModule } from '@ptsecurity/mosaic/core';\nimport { McIconModule } from '@ptsecurity/mosaic/icon';\n\nimport { McSidepanelContainerComponent } from './sidepanel-container.component';\nimport {\n McSidepanelActions,\n McSidepanelBody,\n McSidepanelClose,\n McSidepanelFooter,\n McSidepanelHeader\n} from './sidepanel-directives';\nimport { McSidepanelService } from './sidepanel.service';\n\n\n@NgModule({\n imports: [\n CommonModule,\n OverlayModule,\n PortalModule,\n McCommonModule,\n McButtonModule,\n McIconModule\n ],\n providers: [McSidepanelService],\n declarations: [\n McSidepanelContainerComponent,\n McSidepanelClose,\n McSidepanelHeader,\n McSidepanelBody,\n McSidepanelFooter,\n McSidepanelActions\n ],\n entryComponents: [McSidepanelContainerComponent],\n exports: [\n McSidepanelContainerComponent,\n McSidepanelClose,\n McSidepanelHeader,\n McSidepanelBody,\n McSidepanelFooter,\n McSidepanelActions\n ]\n})\nexport class McSidepanelModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAGA;MACa,iBAAiB,GAAG,IAAI,cAAc,CAAM,iBAAiB,EAAE;IAEhE;AAAZ,WAAY,mBAAmB;IAC3B,sCAAe,CAAA;IACf,oCAAa,CAAA;IACb,kCAAW,CAAA;IACX,wCAAiB,CAAA;AACrB,CAAC,EALW,mBAAmB,KAAnB,mBAAmB,QAK9B;MAEY,iBAAiB;IAA9B;;QAKI,SAAI,GAAc,IAAI,CAAC;QAEvB,aAAQ,GAAyB,mBAAmB,CAAC,KAAK,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wBACd,cAAc;wBACd,YAAY;qBACf;oBACD,SAAS,EAAE,CAAC,kBAAkB,CAAC;oBAC/B,YAAY,EAAE;wBACV,6BAA6B;wBAC7B,gBAAgB;wBAChB,iBAAiB;wBACjB,eAAe;wBACf,iBAAiB;wBACjB,kBAAkB;qBACrB;oBACD,eAAe,EAAE,CAAC,6BAA6B,CAAC;oBAChD,OAAO,EAAE;wBACL,6BAA6B;wBAC7B,gBAAgB;wBAChB,iBAAiB;wBACjB,eAAe;wBACf,iBAAiB;wBACjB,kBAAkB;qBACrB;iBACJ;;;AC9CD;;;;;;"}
1
+ {"version":3,"file":"ptsecurity-mosaic-sidepanel.js","sources":["../../../packages/mosaic/sidepanel/sidepanel-config.ts","../../../packages/mosaic/sidepanel/sidepanel-animations.ts","../../../packages/mosaic/sidepanel/sidepanel-ref.ts","../../../packages/mosaic/sidepanel/sidepanel-container.component.ts","../../../packages/mosaic/sidepanel/sidepanel-container.component.html","../../../packages/mosaic/sidepanel/sidepanel.service.ts","../../../packages/mosaic/sidepanel/sidepanel-directives.ts","../../../packages/mosaic/sidepanel/sidepanel.module.ts","../../../packages/mosaic/sidepanel/ptsecurity-mosaic-sidepanel.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\n\n/** Injection token that can be used to access the data that was passed in to a sidepanel. */\nexport const MC_SIDEPANEL_DATA = new InjectionToken<any>('McSidepanelData');\n\nexport enum McSidepanelPosition {\n Right = 'right',\n Left = 'left',\n Top = 'top',\n Bottom = 'bottom'\n}\n\nexport class McSidepanelConfig<D = any> {\n /** ID for the sidepanel. If omitted, a unique one will be generated. */\n id?: string;\n\n /** Data being injected into the child component. */\n data?: D | null = null;\n\n position?: McSidepanelPosition = McSidepanelPosition.Right;\n\n /** Whether the sidepanel has a backdrop. */\n hasBackdrop?: boolean = true;\n\n backdropClass?: string;\n\n /** When we open multiple sidepanels, backdrop appears only once, except cases then this flag is true. */\n requiredBackdrop?: boolean = false;\n\n /** Whether the user can use escape or clicking outside to close the sidepanel. */\n disableClose?: boolean = false;\n\n /** Custom class for the overlay pane. */\n overlayPanelClass?: string | string[] = '';\n}\n","import { animate, AnimationTriggerMetadata, state, style, transition, trigger } from '@angular/animations';\nimport { AnimationCurves } from '@ptsecurity/mosaic/core';\n\nimport { McSidepanelPosition } from './sidepanel-config';\n\n\nexport enum McSidepanelAnimationState {\n Void = 'void',\n Visible = 'visible',\n Hidden = 'hidden'\n}\n\n// TODO Find a way to use dynamic keys and avoid error \"Expression form not supported.\"\n// tslint:disable-next-line\nexport const mcSidepanelTransformAnimation: Record<McSidepanelPosition, { in: string; out: string }> = {\n right: { in: 'translateX(100%)', out: 'translateX(0%)' },\n left: { in: 'translateX(-100%)', out: 'translateX(0%)' },\n top: { in: 'translateY(-100%)', out: 'translateY(0%)' },\n bottom: { in: 'translateY(100%)', out: 'translateY(0%)' }\n};\n\nexport const mcSidepanelAnimations: { readonly sidepanelState: AnimationTriggerMetadata } = {\n sidepanelState: trigger('state', [\n state(\n 'hidden',\n style({ transform: '{{transformIn}}' }),\n { params: { transformIn: mcSidepanelTransformAnimation[McSidepanelPosition.Right].in }}\n ),\n state(\n 'visible',\n style({ transform: '{{transformOut}}' }),\n { params: { transformOut: mcSidepanelTransformAnimation[McSidepanelPosition.Right].out }}\n ),\n transition(\n 'visible => void, visible => hidden',\n animate(`200ms ${AnimationCurves.AccelerationCurve}`)\n ),\n transition(\n 'void => visible',\n animate(`200ms ${AnimationCurves.DecelerationCurve}`)\n )\n ])\n};\n","import { OverlayRef } from '@angular/cdk/overlay';\nimport { ESCAPE } from '@ptsecurity/cdk/keycodes';\nimport { merge, Observable, Subject } from 'rxjs';\nimport { filter, take } from 'rxjs/operators';\n\nimport { McSidepanelAnimationState } from './sidepanel-animations';\nimport { McSidepanelConfig } from './sidepanel-config';\nimport { McSidepanelContainerComponent } from './sidepanel-container.component';\n\n\n// Counter for unique sidepanel ids.\nlet uniqueId = 0;\n\nexport class McSidepanelRef<T = any, R = any> {\n readonly id: string;\n\n /** Instance of the component making up the content of the sidepanel. */\n instance: T;\n\n /** Subject for notifying the user that the sidepanel has been closed and dismissed. */\n private readonly afterClosed$ = new Subject<R | undefined>();\n\n /** Subject for notifying the user that the sidepanel has opened and appeared. */\n private readonly afterOpened$ = new Subject<void>();\n\n /** Result to be passed down to the `afterDismissed` stream. */\n private result: R | undefined;\n\n constructor(\n public containerInstance: McSidepanelContainerComponent,\n private overlayRef: OverlayRef,\n public config: McSidepanelConfig) {\n\n this.id = this.config.id || `mc-sidepanel-${uniqueId++}`;\n this.containerInstance.id = this.id;\n\n // Emit when opening animation completes\n containerInstance.animationStateChanged.pipe(\n filter(\n (event) => event.phaseName === 'done' && event.toState === McSidepanelAnimationState.Visible\n ),\n take(1)\n ).subscribe(() => {\n this.afterOpened$.next();\n this.afterOpened$.complete();\n });\n\n // Dispose overlay when closing animation is complete\n containerInstance.animationStateChanged.pipe(\n filter(\n (event) => event.phaseName === 'done' && event.toState === McSidepanelAnimationState.Hidden\n ),\n take(1)\n ).subscribe(() => {\n overlayRef.dispose();\n this.afterClosed$.next(this.result);\n this.afterClosed$.complete();\n });\n\n if (!containerInstance.sidepanelConfig.disableClose) {\n merge(\n overlayRef.backdropClick(),\n overlayRef.keydownEvents().pipe(\n // tslint:disable:deprecation\n // keyCode is deprecated, but IE11 and Edge don't support code property, which we need use instead\n filter((event) => event.keyCode === ESCAPE)\n )\n ).subscribe(() => this.close());\n }\n }\n\n close(result?: R): void {\n if (!this.afterClosed$.closed) {\n // Transition the backdrop in parallel to the sidepanel.\n this.containerInstance.animationStateChanged.pipe(\n filter((event) => event.phaseName === 'done'),\n take(1)\n ).subscribe(() => this.overlayRef.detachBackdrop());\n\n this.result = result;\n this.containerInstance.exit();\n }\n }\n\n /** Gets an observable that is notified when the sidepanel is finished closing. */\n afterClosed(): Observable<R | undefined> {\n return this.afterClosed$.asObservable();\n }\n\n /** Gets an observable that is notified when the sidepanel has opened and appeared. */\n afterOpened(): Observable<void> {\n return this.afterOpened$.asObservable();\n }\n}\n","import { AnimationEvent } from '@angular/animations';\nimport { BasePortalOutlet, CdkPortalOutlet, ComponentPortal, TemplatePortal } from '@angular/cdk/portal';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ComponentRef,\n ElementRef,\n EmbeddedViewRef,\n EventEmitter,\n Inject,\n InjectionToken,\n OnDestroy,\n ViewChild,\n ViewEncapsulation\n} from '@angular/core';\n\nimport {\n mcSidepanelAnimations,\n McSidepanelAnimationState,\n mcSidepanelTransformAnimation\n} from './sidepanel-animations';\nimport { McSidepanelConfig, McSidepanelPosition } from './sidepanel-config';\n\n\nexport const MC_SIDEPANEL_WITH_INDENT = new InjectionToken<boolean>('mc-sidepanel-with-indent');\n\nexport const MC_SIDEPANEL_WITH_SHADOW = new InjectionToken<boolean>('mc-sidepanel-with-shadow');\n\n@Component({\n selector: 'mc-sidepanel-container',\n templateUrl: './sidepanel-container.component.html',\n styleUrls: ['./sidepanel.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n animations: [mcSidepanelAnimations.sidepanelState],\n host: {\n class: 'mc-sidepanel-container',\n '[class.mc-sidepanel_nested]': 'withIndent',\n '[class.mc-sidepanel-container_shadowed]': 'withShadow',\n '[attr.id]': 'id',\n '[attr.tabindex]': '-1',\n '[@state]': `{\n value: animationState,\n params: animationTransform\n }`,\n '(@state.start)': 'onAnimation($event)',\n '(@state.done)': 'onAnimation($event)'\n }\n})\nexport class McSidepanelContainerComponent extends BasePortalOutlet implements OnDestroy {\n /** ID for the container DOM element. */\n id: string;\n\n /** The portal outlet inside of this container into which the content will be loaded. */\n @ViewChild(CdkPortalOutlet, { static: true }) portalOutlet: CdkPortalOutlet;\n\n /** The state of the sidepanel animations. */\n animationState: McSidepanelAnimationState = McSidepanelAnimationState.Void;\n\n animationTransform: { transformIn: string; transformOut: string };\n\n /** Emits whenever the state of the animation changes. */\n animationStateChanged = new EventEmitter<AnimationEvent>();\n\n /** Whether the component has been destroyed. */\n private destroyed: boolean;\n\n constructor(\n private elementRef: ElementRef<HTMLElement>,\n private changeDetectorRef: ChangeDetectorRef,\n public sidepanelConfig: McSidepanelConfig,\n @Inject(MC_SIDEPANEL_WITH_INDENT) public withIndent: boolean,\n @Inject(MC_SIDEPANEL_WITH_SHADOW) public withShadow: boolean\n ) {\n super();\n }\n\n ngOnDestroy(): void {\n this.destroyed = true;\n }\n\n /** Attach a component portal as content to this sidepanel container. */\n attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T> {\n this.validatePortalAttached();\n this.setAnimation();\n this.setPanelClass();\n\n return this.portalOutlet.attachComponentPortal(portal);\n }\n\n /** Attach a template portal as content to this sidepanel container. */\n attachTemplatePortal<C>(portal: TemplatePortal<C>): EmbeddedViewRef<C> {\n this.validatePortalAttached();\n this.setAnimation();\n this.setPanelClass();\n\n return this.portalOutlet.attachTemplatePortal(portal);\n }\n\n /** Begin animation of the sidepanel entrance into view. */\n enter(): void {\n if (this.destroyed) { return; }\n\n this.animationState = McSidepanelAnimationState.Visible;\n this.changeDetectorRef.detectChanges();\n }\n\n /** Begin animation of the sidepanel exiting from view. */\n exit(): void {\n if (this.destroyed) { return; }\n\n this.animationState = McSidepanelAnimationState.Hidden;\n this.changeDetectorRef.markForCheck();\n }\n\n onAnimation(event: AnimationEvent) {\n this.animationStateChanged.emit(event);\n }\n\n private setAnimation() {\n const position: McSidepanelPosition = this.sidepanelConfig.position!;\n\n this.animationTransform = {\n transformIn: mcSidepanelTransformAnimation[position].in,\n transformOut: mcSidepanelTransformAnimation[position].out\n };\n }\n\n private setPanelClass() {\n const element: HTMLElement = this.elementRef.nativeElement;\n const position: McSidepanelPosition = this.sidepanelConfig.position!;\n\n element.classList.add(`mc-sidepanel-container_${position}`);\n }\n\n private validatePortalAttached() {\n if (this.portalOutlet.hasAttached()) {\n throw Error('Attempting to attach sidepanel content after content is already attached');\n }\n }\n}\n","<div class=\"mc-sidepanel-wrapper\">\n\n <div *ngIf=\"withIndent\" class=\"mc-sidepanel-indent\" (click)=\"exit()\"></div>\n\n <div class=\"mc-sidepanel-content\" cdkTrapFocus cdkTrapFocusAutoCapture>\n <ng-template cdkPortalOutlet></ng-template>\n </div>\n</div>\n","import { Overlay, OverlayConfig, OverlayRef } from '@angular/cdk/overlay';\nimport { ComponentPortal, ComponentType, PortalInjector, TemplatePortal } from '@angular/cdk/portal';\nimport {\n ComponentRef,\n Inject,\n Injectable,\n InjectionToken,\n Injector, OnDestroy,\n Optional,\n SkipSelf,\n TemplateRef\n} from '@angular/core';\n\nimport { MC_SIDEPANEL_DATA, McSidepanelConfig } from './sidepanel-config';\nimport {\n McSidepanelContainerComponent,\n MC_SIDEPANEL_WITH_INDENT,\n MC_SIDEPANEL_WITH_SHADOW\n} from './sidepanel-container.component';\nimport { McSidepanelRef } from './sidepanel-ref';\n\n\n/** Injection token that can be used to specify default sidepanel options. */\nexport const MC_SIDEPANEL_DEFAULT_OPTIONS =\n new InjectionToken<McSidepanelConfig>('mc-sidepanel-default-options');\n\n@Injectable()\nexport class McSidepanelService implements OnDestroy {\n private openedSidepanelsAtThisLevel: McSidepanelRef[] = [];\n\n /** Keeps track of the currently-open sidepanels. */\n get openedSidepanels(): McSidepanelRef[] {\n return this.parentSidepanelService ? this.parentSidepanelService.openedSidepanels :\n this.openedSidepanelsAtThisLevel;\n }\n\n constructor(\n private overlay: Overlay,\n private injector: Injector,\n @Optional() @Inject(MC_SIDEPANEL_DEFAULT_OPTIONS) private defaultOptions: McSidepanelConfig,\n @Optional() @SkipSelf() private parentSidepanelService: McSidepanelService) {\n }\n\n ngOnDestroy() {\n // Only close the sidepanels at this level on destroy\n // since the parent service may still be active.\n this.closeSidepanels(this.openedSidepanelsAtThisLevel);\n }\n\n open<T, D = any>(\n componentOrTemplateRef: ComponentType<T> | TemplateRef<T>, config?: McSidepanelConfig<D>\n ): McSidepanelRef<T> {\n const fullConfig = {\n ...(this.defaultOptions || new McSidepanelConfig()),\n ...config\n };\n\n if (fullConfig.id && this.getSidepanelById(fullConfig.id)) {\n throw Error(`Sidepanel with id \"${fullConfig.id}\" exists already. The sidepanel id must be unique.`);\n }\n\n const overlayRef = this.createOverlay(fullConfig);\n const container = this.attachContainer(overlayRef, fullConfig);\n const ref = new McSidepanelRef(container, overlayRef, fullConfig);\n\n if (componentOrTemplateRef instanceof TemplateRef) {\n container.attachTemplatePortal(new TemplatePortal<T>(componentOrTemplateRef, null!, {\n $implicit: fullConfig.data,\n sidepanelRef: ref\n } as any));\n } else {\n const injector = this.createInjector(fullConfig, ref, container);\n const portal = new ComponentPortal(componentOrTemplateRef, undefined, injector);\n const contentRef = container.attachComponentPortal(portal);\n\n ref.instance = contentRef.instance;\n }\n\n this.openedSidepanels.push(ref);\n ref.afterClosed()\n .subscribe(() => this.removeOpenSidepanel(ref));\n\n container.enter();\n\n return ref;\n }\n\n /**\n * Closes all of the currently-open sidepanels.\n */\n closeAll(): void {\n this.closeSidepanels(this.openedSidepanels);\n }\n\n /**\n * Finds an open sidepanel by its id.\n * @param id ID to use when looking up the sidepanel.\n */\n getSidepanelById(id: string): McSidepanelRef | undefined {\n return this.openedSidepanels.find((sidepanel) => sidepanel.id === id);\n }\n\n /**\n * Attaches the sidepanel container component to the overlay.\n */\n private attachContainer(overlayRef: OverlayRef, config: McSidepanelConfig): McSidepanelContainerComponent {\n const openedSidepanelsWithSamePosition = this.getOpenedSidepanelsWithSamePosition(config);\n\n // tslint:disable-next-line:deprecation\n const injector = new PortalInjector(this.injector, new WeakMap<any>([\n [McSidepanelConfig, config],\n [MC_SIDEPANEL_WITH_INDENT, openedSidepanelsWithSamePosition.length >= 1],\n [MC_SIDEPANEL_WITH_SHADOW, openedSidepanelsWithSamePosition.length < 2] // tslint:disable-line\n ]));\n\n const containerPortal = new ComponentPortal(McSidepanelContainerComponent, undefined, injector);\n const containerRef: ComponentRef<McSidepanelContainerComponent> = overlayRef.attach(containerPortal);\n\n return containerRef.instance;\n }\n\n /**\n * Creates a custom injector to be used inside the sidepanel. This allows a component loaded inside\n * of a sidepanel to close itself and, optionally, to return a value.\n * @param config Config object that is used to construct the sidepanel.\n * @param sidepanelRef Reference to the sidepanel.\n * @param sidepanelContainer Sidepanel container element that wraps all of the contents.\n * @returns The custom injector that can be used inside the sidepanel.\n */\n private createInjector<T>(\n config: McSidepanelConfig,\n sidepanelRef: McSidepanelRef<T>,\n // tslint:disable-next-line:deprecation\n sidepanelContainer: McSidepanelContainerComponent): PortalInjector {\n\n // The McSidepanelContainerComponent is injected in the portal as the McSidepanelContainerComponent and\n // the sidepanel's content are created out of the same ViewContainerRef and as such, are siblings for injector\n // purposes. To allow the hierarchy that is expected, the McSidepanelContainerComponent is explicitly\n // added to the injection tokens.\n const injectionTokens = new WeakMap<any>([\n [McSidepanelContainerComponent, sidepanelContainer],\n [MC_SIDEPANEL_DATA, config.data],\n [McSidepanelRef, sidepanelRef]\n ]);\n\n // tslint:disable-next-line:deprecation\n return new PortalInjector(this.injector, injectionTokens);\n }\n\n /**\n * Creates a new overlay and places it in the correct location.\n * @param config The user-specified sidepanel config.\n */\n private createOverlay(config: McSidepanelConfig): OverlayRef {\n const overlayConfig = new OverlayConfig({\n hasBackdrop: config.hasBackdrop,\n backdropClass: this.getBackdropClass(config),\n maxWidth: '100%',\n panelClass: config.overlayPanelClass,\n scrollStrategy: this.overlay.scrollStrategies.block(),\n positionStrategy: this.overlay.position().global()\n });\n\n return this.overlay.create(overlayConfig);\n }\n\n private closeSidepanels(sidepanels: McSidepanelRef[]) {\n const reversedOpenedSidepanels = [...sidepanels.reverse()];\n\n reversedOpenedSidepanels.forEach((sidepanelRef: McSidepanelRef) => {\n sidepanelRef.close();\n });\n }\n\n private getBackdropClass(config: McSidepanelConfig): string {\n if (config.hasBackdrop && config.backdropClass) {\n return config.backdropClass;\n }\n\n const hasOpenedSidepanelWithBackdrop =\n this.openedSidepanels.some((sidepanelRef) => sidepanelRef.config.hasBackdrop!);\n\n return config.requiredBackdrop || !hasOpenedSidepanelWithBackdrop ? 'cdk-overlay-dark-backdrop' :\n 'cdk-overlay-transparent-backdrop';\n }\n\n private getOpenedSidepanelsWithSamePosition(config: McSidepanelConfig): McSidepanelRef[] {\n return this.openedSidepanels.filter((sidepanelRef) => sidepanelRef.config.position === config.position);\n }\n\n /**\n * Removes a sidepanel from the array of open sidepanels.\n * @param sidepanelRef Sidepanel to be removed.\n */\n private removeOpenSidepanel(sidepanelRef: McSidepanelRef) {\n const index = this.openedSidepanels.indexOf(sidepanelRef);\n\n if (index > -1) {\n this.openedSidepanels.splice(index, 1);\n }\n }\n}\n","import {\n Component,\n Directive,\n ElementRef,\n Input,\n OnChanges,\n OnInit,\n Optional,\n SimpleChanges\n} from '@angular/core';\nimport { ThemePalette } from '@ptsecurity/mosaic/core';\n\nimport { McSidepanelRef } from './sidepanel-ref';\nimport { McSidepanelService } from './sidepanel.service';\n\n\n/**\n * Button that will close the current sidepanel.\n */\n@Directive({\n selector: 'button[mc-sidepanel-close], button[mcSidepanelClose]',\n host: {\n '(click)': 'sidepanelRef.close(sidepanelResult)',\n class: 'mc-sidepanel-close'\n }\n})\nexport class McSidepanelClose implements OnInit, OnChanges {\n @Input('mc-sidepanel-close') sidepanelResult: any;\n\n @Input('mcSidepanelClose') mcSidepanelClose: any;\n\n constructor(\n @Optional() public sidepanelRef: McSidepanelRef,\n private elementRef: ElementRef<HTMLElement>,\n private sidepanelService: McSidepanelService\n ) {}\n\n ngOnInit() {\n if (!this.sidepanelRef) {\n // When this directive is included in a sidepanel via TemplateRef (rather than being\n // in a Component), the SidepanelRef isn't available via injection because embedded\n // views cannot be given a custom injector. Instead, we look up the SidepanelRef by\n // ID.\n // This must occur in `onInit`, as the ID binding for the sidepanel container won't\n // be resolved at constructor time. We use setTimeout by same reason.\n setTimeout(() => {\n this.sidepanelRef = getClosestSidepanel(this.elementRef, this.sidepanelService.openedSidepanels)!;\n });\n }\n }\n\n ngOnChanges(changes: SimpleChanges) {\n const proxiedChange = changes.mcSidepanelClose || changes.sidepanelResult;\n\n if (proxiedChange) {\n this.sidepanelResult = proxiedChange.currentValue;\n }\n }\n}\n\n/**\n * Header of a sidepanel.\n */\n@Component({\n selector: 'mc-sidepanel-header',\n template: `\n <div class=\"mc-sidepanel-title\">\n <ng-content></ng-content>\n </div>\n <button *ngIf=\"closeable\" mc-sidepanel-close>\n <span class=\"mc-sidepanel-close-x\">\n <i mc-icon=\"mc-close-L_16\" class=\"mc-icon mc-icon_light\" [color]=\"themePalette.Primary\"></i>\n </span>\n </button>\n `,\n host: {\n class: 'mc-sidepanel-header'\n }\n})\nexport class McSidepanelHeader {\n themePalette = ThemePalette;\n\n @Input() closeable: boolean;\n}\n\n/**\n * Scrollable content container of a sidepanel.\n */\n@Directive({\n selector: 'mc-sidepanel-body, [mc-sidepanel-body], mcSidepanelBody',\n host: {\n class: 'mc-sidepanel-body'\n }\n})\nexport class McSidepanelBody {}\n\n/**\n * Footer of a sidepanel.\n */\n@Directive({\n selector: 'mc-sidepanel-footer, [mc-sidepanel-footer], mcSidepanelFooter',\n host: {\n class: 'mc-sidepanel-footer'\n }\n})\nexport class McSidepanelFooter {}\n\n/**\n * Actions block of a sidepanel footer.\n */\n@Directive({\n selector: 'mc-sidepanel-actions, [mc-sidepanel-actions], mcSidepanelActions',\n host: {\n class: 'mc-sidepanel-actions'\n }\n})\nexport class McSidepanelActions {}\n\n/**\n * Finds the closest McSidepanelRef to an element by looking at the DOM.\n * @param element Element relative to which to look for a sidepanel.\n * @param openSidepanels References to the currently-open sidepanels.\n */\nfunction getClosestSidepanel(element: ElementRef<HTMLElement>, openSidepanels: McSidepanelRef[]) {\n let parent: HTMLElement | null = element.nativeElement.parentElement;\n\n while (parent && !parent.classList.contains('mc-sidepanel-container')) {\n parent = parent.parentElement;\n }\n\n return parent ? openSidepanels.find((sidepanel) => sidepanel.id === parent!.id) : null;\n}\n","import { A11yModule } from '@angular/cdk/a11y';\nimport { OverlayModule } from '@angular/cdk/overlay';\nimport { PortalModule } from '@angular/cdk/portal';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { McButtonModule } from '@ptsecurity/mosaic/button';\nimport { McCommonModule } from '@ptsecurity/mosaic/core';\nimport { McIconModule } from '@ptsecurity/mosaic/icon';\n\nimport { McSidepanelContainerComponent } from './sidepanel-container.component';\nimport {\n McSidepanelActions,\n McSidepanelBody,\n McSidepanelClose,\n McSidepanelFooter,\n McSidepanelHeader\n} from './sidepanel-directives';\nimport { McSidepanelService } from './sidepanel.service';\n\n\n@NgModule({\n imports: [\n CommonModule,\n OverlayModule,\n PortalModule,\n McCommonModule,\n McButtonModule,\n McIconModule,\n A11yModule\n ],\n providers: [McSidepanelService],\n declarations: [\n McSidepanelContainerComponent,\n McSidepanelClose,\n McSidepanelHeader,\n McSidepanelBody,\n McSidepanelFooter,\n McSidepanelActions\n ],\n entryComponents: [McSidepanelContainerComponent],\n exports: [\n McSidepanelContainerComponent,\n McSidepanelClose,\n McSidepanelHeader,\n McSidepanelBody,\n McSidepanelFooter,\n McSidepanelActions\n ]\n})\nexport class McSidepanelModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAGA;MACa,iBAAiB,GAAG,IAAI,cAAc,CAAM,iBAAiB,EAAE;IAEhE;AAAZ,WAAY,mBAAmB;IAC3B,sCAAe,CAAA;IACf,oCAAa,CAAA;IACb,kCAAW,CAAA;IACX,wCAAiB,CAAA;AACrB,CAAC,EALW,mBAAmB,KAAnB,mBAAmB,QAK9B;MAEY,iBAAiB;IAA9B;;QAKI,SAAI,GAAc,IAAI,CAAC;QAEvB,aAAQ,GAAyB,mBAAmB,CAAC,KAAK,CAAC;;QAG3D,gBAAW,GAAa,IAAI,CAAC;;QAK7B,qBAAgB,GAAa,KAAK,CAAC;;QAGnC,iBAAY,GAAa,KAAK,CAAC;;QAG/B,sBAAiB,GAAuB,EAAE,CAAC;KAC9C;;;AC7BD,IAAY,yBAIX;AAJD,W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AAe;wBACf,iBAAiB;wBACjB,kBAAkB;qBACrB;oBACD,eAAe,EAAE,CAAC,6BAA6B,CAAC;oBAChD,OAAO,EAAE;wBACL,6BAA6B;wBAC7B,gBAAgB;wBAChB,iBAAiB;wBACjB,eAAe;wBACf,iBAAiB;wBACjB,kBAAkB;qBACrB;iBACJ;;;AChDD;;;;;;"}
@@ -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, NgModule } from '@angular/core';
5
5
  import { McIconModule } from '@ptsecurity/mosaic/icon';
6
6
  import { coerceNumberProperty, coerceCssPixelValue, coerceBooleanProperty } from '@angular/cdk/coercion';
7
7
 
@@ -54,9 +54,9 @@ class McGutterDirective {
54
54
  this.renderer.setStyle(this.elementRef.nativeElement, property, value);
55
55
  }
56
56
  }
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: [{
57
+ /** @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 });
58
+ /** @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 });
59
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: McGutterDirective, decorators: [{
60
60
  type: Directive,
61
61
  args: [{
62
62
  selector: 'mc-gutter',
@@ -80,6 +80,7 @@ class McSplitterComponent {
80
80
  this.changeDetectorRef = changeDetectorRef;
81
81
  this.ngZone = ngZone;
82
82
  this.renderer = renderer;
83
+ this.gutterPositionChange = new EventEmitter();
83
84
  this.areas = [];
84
85
  this.isDragging = false;
85
86
  this.areaPositionDivider = 2;
@@ -222,14 +223,15 @@ class McSplitterComponent {
222
223
  }
223
224
  this.isDragging = false;
224
225
  this.updateGutter();
226
+ this.gutterPositionChange.emit();
225
227
  }
226
228
  setStyle(property, value) {
227
229
  this.renderer.setStyle(this.elementRef.nativeElement, property, value);
228
230
  }
229
231
  }
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: [{
232
+ /** @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 });
233
+ /** @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", gutterSize: "gutterSize" }, outputs: { gutterPositionChange: "gutterPositionChange" }, 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 });
234
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: McSplitterComponent, decorators: [{
233
235
  type: Component,
234
236
  args: [{
235
237
  selector: 'mc-splitter',
@@ -243,7 +245,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImpor
243
245
  encapsulation: ViewEncapsulation.None,
244
246
  changeDetection: ChangeDetectionStrategy.OnPush
245
247
  }]
246
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: i0.Renderer2 }]; }, propDecorators: { gutters: [{
248
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: i0.Renderer2 }]; }, propDecorators: { gutterPositionChange: [{
249
+ type: Output
250
+ }], gutters: [{
247
251
  type: ViewChildren,
248
252
  args: [McGutterDirective]
249
253
  }], hideGutters: [{
@@ -260,6 +264,7 @@ class McSplitterAreaDirective {
260
264
  this.elementRef = elementRef;
261
265
  this.renderer = renderer;
262
266
  this.splitter = splitter;
267
+ this.sizeChange = new EventEmitter();
263
268
  }
264
269
  disableFlex() {
265
270
  this.renderer.removeStyle(this.elementRef.nativeElement, 'flex');
@@ -275,6 +280,7 @@ class McSplitterAreaDirective {
275
280
  this.setStyle("height" /* Height */, '100%');
276
281
  this.removeStyle("width" /* Width */);
277
282
  }
283
+ this.splitter.gutterPositionChange.subscribe(() => this.emitSizeChange());
278
284
  }
279
285
  ngOnDestroy() {
280
286
  this.splitter.removeArea(this);
@@ -319,10 +325,13 @@ class McSplitterAreaDirective {
319
325
  removeStyle(style) {
320
326
  this.renderer.removeStyle(this.elementRef.nativeElement, style);
321
327
  }
328
+ emitSizeChange() {
329
+ this.sizeChange.emit(this.getSize());
330
+ }
322
331
  }
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: [{
332
+ /** @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 });
333
+ /** @nocollapse */ McSplitterAreaDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.13", type: McSplitterAreaDirective, selector: "[mc-splitter-area]", outputs: { sizeChange: "sizeChange" }, host: { classAttribute: "mc-splitter-area" }, ngImport: i0 });
334
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: McSplitterAreaDirective, decorators: [{
326
335
  type: Directive,
327
336
  args: [{
328
337
  selector: '[mc-splitter-area]',
@@ -330,22 +339,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImpor
330
339
  class: 'mc-splitter-area'
331
340
  }
332
341
  }]
333
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: McSplitterComponent }]; } });
342
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: McSplitterComponent }]; }, propDecorators: { sizeChange: [{
343
+ type: Output
344
+ }] } });
334
345
 
335
346
  class McSplitterModule {
336
347
  }
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,
348
+ /** @nocollapse */ McSplitterModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: McSplitterModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
349
+ /** @nocollapse */ McSplitterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: McSplitterModule, declarations: [McGutterDirective,
339
350
  McSplitterAreaDirective,
340
351
  McSplitterComponent], imports: [CommonModule,
341
352
  McIconModule], exports: [McGutterDirective,
342
353
  McSplitterAreaDirective,
343
354
  McSplitterComponent] });
344
- /** @nocollapse */ McSplitterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0, type: McSplitterModule, imports: [[
355
+ /** @nocollapse */ McSplitterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: McSplitterModule, imports: [[
345
356
  CommonModule,
346
357
  McIconModule
347
358
  ]] });
348
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0, type: McSplitterModule, decorators: [{
359
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: McSplitterModule, decorators: [{
349
360
  type: NgModule,
350
361
  args: [{
351
362
  imports: [