cmat 0.0.111 → 0.0.112

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 (256) hide show
  1. package/fesm2022/cmat-components-adapter.mjs +531 -536
  2. package/fesm2022/cmat-components-adapter.mjs.map +1 -1
  3. package/fesm2022/cmat-components-breadcrumb.mjs +521 -356
  4. package/fesm2022/cmat-components-breadcrumb.mjs.map +1 -1
  5. package/fesm2022/cmat-components-card.mjs +150 -42
  6. package/fesm2022/cmat-components-card.mjs.map +1 -1
  7. package/fesm2022/cmat-components-carousel.mjs +1120 -629
  8. package/fesm2022/cmat-components-carousel.mjs.map +1 -1
  9. package/fesm2022/cmat-components-cascade.mjs +861 -441
  10. package/fesm2022/cmat-components-cascade.mjs.map +1 -1
  11. package/fesm2022/cmat-components-chip-input.mjs +580 -335
  12. package/fesm2022/cmat-components-chip-input.mjs.map +1 -1
  13. package/fesm2022/cmat-components-code-editor.mjs +197 -105
  14. package/fesm2022/cmat-components-code-editor.mjs.map +1 -1
  15. package/fesm2022/cmat-components-color-picker.mjs +1762 -825
  16. package/fesm2022/cmat-components-color-picker.mjs.map +1 -1
  17. package/fesm2022/cmat-components-custom-formly.mjs +5196 -2531
  18. package/fesm2022/cmat-components-custom-formly.mjs.map +1 -1
  19. package/fesm2022/cmat-components-data-picker.mjs +1901 -1073
  20. package/fesm2022/cmat-components-data-picker.mjs.map +1 -1
  21. package/fesm2022/cmat-components-date-range.mjs +701 -456
  22. package/fesm2022/cmat-components-date-range.mjs.map +1 -1
  23. package/fesm2022/cmat-components-date-time-display.mjs +137 -30
  24. package/fesm2022/cmat-components-date-time-display.mjs.map +1 -1
  25. package/fesm2022/cmat-components-drawer.mjs +410 -258
  26. package/fesm2022/cmat-components-drawer.mjs.map +1 -1
  27. package/fesm2022/cmat-components-empty-state.mjs +201 -41
  28. package/fesm2022/cmat-components-empty-state.mjs.map +1 -1
  29. package/fesm2022/cmat-components-file-preview.mjs +198 -35
  30. package/fesm2022/cmat-components-file-preview.mjs.map +1 -1
  31. package/fesm2022/cmat-components-filter-toolbar.mjs +320 -72
  32. package/fesm2022/cmat-components-filter-toolbar.mjs.map +1 -1
  33. package/fesm2022/cmat-components-form-actions.mjs +102 -26
  34. package/fesm2022/cmat-components-form-actions.mjs.map +1 -1
  35. package/fesm2022/cmat-components-fullscreen.mjs +167 -47
  36. package/fesm2022/cmat-components-fullscreen.mjs.map +1 -1
  37. package/fesm2022/cmat-components-highlight.mjs +203 -112
  38. package/fesm2022/cmat-components-highlight.mjs.map +1 -1
  39. package/fesm2022/cmat-components-image-viewer.mjs +489 -215
  40. package/fesm2022/cmat-components-image-viewer.mjs.map +1 -1
  41. package/fesm2022/cmat-components-inline-loading.mjs +117 -27
  42. package/fesm2022/cmat-components-inline-loading.mjs.map +1 -1
  43. package/fesm2022/cmat-components-json-editor.mjs +276 -230
  44. package/fesm2022/cmat-components-json-editor.mjs.map +1 -1
  45. package/fesm2022/cmat-components-knob-input.mjs +615 -420
  46. package/fesm2022/cmat-components-knob-input.mjs.map +1 -1
  47. package/fesm2022/cmat-components-loading-overlay.mjs +53 -25
  48. package/fesm2022/cmat-components-loading-overlay.mjs.map +1 -1
  49. package/fesm2022/cmat-components-masonry.mjs +120 -40
  50. package/fesm2022/cmat-components-masonry.mjs.map +1 -1
  51. package/fesm2022/cmat-components-material-color-picker.mjs +332 -155
  52. package/fesm2022/cmat-components-material-color-picker.mjs.map +1 -1
  53. package/fesm2022/cmat-components-material-datetimepicker.mjs +4283 -2504
  54. package/fesm2022/cmat-components-material-datetimepicker.mjs.map +1 -1
  55. package/fesm2022/cmat-components-navigation.mjs +3080 -1404
  56. package/fesm2022/cmat-components-navigation.mjs.map +1 -1
  57. package/fesm2022/cmat-components-opt-input.mjs +540 -466
  58. package/fesm2022/cmat-components-opt-input.mjs.map +1 -1
  59. package/fesm2022/cmat-components-org-chart.mjs +528 -125
  60. package/fesm2022/cmat-components-org-chart.mjs.map +1 -1
  61. package/fesm2022/cmat-components-page-header.mjs +141 -32
  62. package/fesm2022/cmat-components-page-header.mjs.map +1 -1
  63. package/fesm2022/cmat-components-pagination.mjs +866 -534
  64. package/fesm2022/cmat-components-pagination.mjs.map +1 -1
  65. package/fesm2022/cmat-components-password-strength.mjs +873 -434
  66. package/fesm2022/cmat-components-password-strength.mjs.map +1 -1
  67. package/fesm2022/cmat-components-popover.mjs +1012 -731
  68. package/fesm2022/cmat-components-popover.mjs.map +1 -1
  69. package/fesm2022/cmat-components-progress-bar.mjs +98 -35
  70. package/fesm2022/cmat-components-progress-bar.mjs.map +1 -1
  71. package/fesm2022/cmat-components-qrcode.mjs +463 -287
  72. package/fesm2022/cmat-components-qrcode.mjs.map +1 -1
  73. package/fesm2022/cmat-components-rating.mjs +377 -203
  74. package/fesm2022/cmat-components-rating.mjs.map +1 -1
  75. package/fesm2022/cmat-components-rich-text-editor.mjs +153 -39
  76. package/fesm2022/cmat-components-rich-text-editor.mjs.map +1 -1
  77. package/fesm2022/cmat-components-select-search.mjs +926 -496
  78. package/fesm2022/cmat-components-select-search.mjs.map +1 -1
  79. package/fesm2022/cmat-components-select-table.mjs +1280 -842
  80. package/fesm2022/cmat-components-select-table.mjs.map +1 -1
  81. package/fesm2022/cmat-components-select-tree.mjs +998 -690
  82. package/fesm2022/cmat-components-select-tree.mjs.map +1 -1
  83. package/fesm2022/cmat-components-skeleton.mjs +143 -57
  84. package/fesm2022/cmat-components-skeleton.mjs.map +1 -1
  85. package/fesm2022/cmat-components-speed-dial.mjs +457 -303
  86. package/fesm2022/cmat-components-speed-dial.mjs.map +1 -1
  87. package/fesm2022/cmat-components-status-tag.mjs +136 -44
  88. package/fesm2022/cmat-components-status-tag.mjs.map +1 -1
  89. package/fesm2022/cmat-components-table-toolbar.mjs +120 -28
  90. package/fesm2022/cmat-components-table-toolbar.mjs.map +1 -1
  91. package/fesm2022/cmat-components-timeline.mjs +464 -168
  92. package/fesm2022/cmat-components-timeline.mjs.map +1 -1
  93. package/fesm2022/cmat-components-toast.mjs +346 -262
  94. package/fesm2022/cmat-components-toast.mjs.map +1 -1
  95. package/fesm2022/cmat-components-transfer-picker.mjs +1427 -593
  96. package/fesm2022/cmat-components-transfer-picker.mjs.map +1 -1
  97. package/fesm2022/cmat-components-treetable.mjs +372 -112
  98. package/fesm2022/cmat-components-treetable.mjs.map +1 -1
  99. package/fesm2022/cmat-components-upload.mjs +904 -410
  100. package/fesm2022/cmat-components-upload.mjs.map +1 -1
  101. package/fesm2022/cmat-components-x6-angular-shape.mjs +153 -170
  102. package/fesm2022/cmat-components-x6-angular-shape.mjs.map +1 -1
  103. package/fesm2022/cmat-directives-animate-on-scroll.mjs +220 -138
  104. package/fesm2022/cmat-directives-animate-on-scroll.mjs.map +1 -1
  105. package/fesm2022/cmat-directives-arrow-cursor.mjs +246 -193
  106. package/fesm2022/cmat-directives-arrow-cursor.mjs.map +1 -1
  107. package/fesm2022/cmat-directives-autofocus.mjs +43 -25
  108. package/fesm2022/cmat-directives-autofocus.mjs.map +1 -1
  109. package/fesm2022/cmat-directives-data-exporter.mjs +537 -338
  110. package/fesm2022/cmat-directives-data-exporter.mjs.map +1 -1
  111. package/fesm2022/cmat-directives-debounce.mjs +162 -76
  112. package/fesm2022/cmat-directives-debounce.mjs.map +1 -1
  113. package/fesm2022/cmat-directives-digit-only.mjs +457 -356
  114. package/fesm2022/cmat-directives-digit-only.mjs.map +1 -1
  115. package/fesm2022/cmat-directives-equal-validator.mjs +70 -53
  116. package/fesm2022/cmat-directives-equal-validator.mjs.map +1 -1
  117. package/fesm2022/cmat-directives-seamless-auto-scroll.mjs +180 -132
  118. package/fesm2022/cmat-directives-seamless-auto-scroll.mjs.map +1 -1
  119. package/fesm2022/cmat-lib-mock-api.mjs +207 -195
  120. package/fesm2022/cmat-lib-mock-api.mjs.map +1 -1
  121. package/fesm2022/cmat-pipes-bytes.mjs +50 -30
  122. package/fesm2022/cmat-pipes-bytes.mjs.map +1 -1
  123. package/fesm2022/cmat-pipes-date-format.mjs +41 -25
  124. package/fesm2022/cmat-pipes-date-format.mjs.map +1 -1
  125. package/fesm2022/cmat-pipes-find-by-key.mjs +44 -26
  126. package/fesm2022/cmat-pipes-find-by-key.mjs.map +1 -1
  127. package/fesm2022/cmat-pipes-group-by.mjs +50 -38
  128. package/fesm2022/cmat-pipes-group-by.mjs.map +1 -1
  129. package/fesm2022/cmat-pipes-keys.mjs +44 -31
  130. package/fesm2022/cmat-pipes-keys.mjs.map +1 -1
  131. package/fesm2022/cmat-pipes-secure.mjs +60 -49
  132. package/fesm2022/cmat-pipes-secure.mjs.map +1 -1
  133. package/fesm2022/cmat-pipes-uppercase.mjs +39 -22
  134. package/fesm2022/cmat-pipes-uppercase.mjs.map +1 -1
  135. package/fesm2022/cmat-reports.mjs +2751 -0
  136. package/fesm2022/cmat-reports.mjs.map +1 -0
  137. package/fesm2022/cmat-services-alert.mjs +249 -277
  138. package/fesm2022/cmat-services-alert.mjs.map +1 -1
  139. package/fesm2022/cmat-services-config.mjs +110 -81
  140. package/fesm2022/cmat-services-config.mjs.map +1 -1
  141. package/fesm2022/cmat-services-confirmation.mjs +184 -73
  142. package/fesm2022/cmat-services-confirmation.mjs.map +1 -1
  143. package/fesm2022/cmat-services-data.mjs +136 -125
  144. package/fesm2022/cmat-services-data.mjs.map +1 -1
  145. package/fesm2022/cmat-services-export-as.mjs +165 -183
  146. package/fesm2022/cmat-services-export-as.mjs.map +1 -1
  147. package/fesm2022/cmat-services-loading.mjs +116 -95
  148. package/fesm2022/cmat-services-loading.mjs.map +1 -1
  149. package/fesm2022/cmat-services-local-storage.mjs +75 -66
  150. package/fesm2022/cmat-services-local-storage.mjs.map +1 -1
  151. package/fesm2022/cmat-services-media-watcher.mjs +69 -64
  152. package/fesm2022/cmat-services-media-watcher.mjs.map +1 -1
  153. package/fesm2022/cmat-services-platform.mjs +48 -45
  154. package/fesm2022/cmat-services-platform.mjs.map +1 -1
  155. package/fesm2022/cmat-services-print.mjs +984 -1109
  156. package/fesm2022/cmat-services-print.mjs.map +1 -1
  157. package/fesm2022/cmat-services-splash-screen.mjs +53 -38
  158. package/fesm2022/cmat-services-splash-screen.mjs.map +1 -1
  159. package/fesm2022/cmat-services-title.mjs +57 -47
  160. package/fesm2022/cmat-services-title.mjs.map +1 -1
  161. package/fesm2022/cmat-services-translation.mjs +79 -68
  162. package/fesm2022/cmat-services-translation.mjs.map +1 -1
  163. package/fesm2022/cmat-services-utils.mjs +424 -517
  164. package/fesm2022/cmat-services-utils.mjs.map +1 -1
  165. package/fesm2022/cmat-validators.mjs +23 -33
  166. package/fesm2022/cmat-validators.mjs.map +1 -1
  167. package/fesm2022/cmat-version.mjs +12 -16
  168. package/fesm2022/cmat-version.mjs.map +1 -1
  169. package/fesm2022/cmat.mjs +39805 -22511
  170. package/fesm2022/cmat.mjs.map +1 -1
  171. package/package.json +5 -1
  172. package/types/cmat-components-adapter.d.ts +145 -156
  173. package/types/cmat-components-breadcrumb.d.ts +108 -86
  174. package/types/cmat-components-card.d.ts +34 -18
  175. package/types/cmat-components-carousel.d.ts +251 -134
  176. package/types/cmat-components-cascade.d.ts +158 -117
  177. package/types/cmat-components-chip-input.d.ts +105 -71
  178. package/types/cmat-components-code-editor.d.ts +59 -34
  179. package/types/cmat-components-color-picker.d.ts +378 -236
  180. package/types/cmat-components-custom-formly.d.ts +776 -814
  181. package/types/cmat-components-data-picker.d.ts +502 -360
  182. package/types/cmat-components-date-range.d.ts +106 -77
  183. package/types/cmat-components-date-time-display.d.ts +36 -13
  184. package/types/cmat-components-drawer.d.ts +91 -61
  185. package/types/cmat-components-empty-state.d.ts +47 -17
  186. package/types/cmat-components-file-preview.d.ts +42 -14
  187. package/types/cmat-components-filter-toolbar.d.ts +57 -25
  188. package/types/cmat-components-form-actions.d.ts +18 -10
  189. package/types/cmat-components-fullscreen.d.ts +21 -13
  190. package/types/cmat-components-highlight.d.ts +33 -26
  191. package/types/cmat-components-image-viewer.d.ts +119 -58
  192. package/types/cmat-components-inline-loading.d.ts +24 -11
  193. package/types/cmat-components-json-editor.d.ts +39 -28
  194. package/types/cmat-components-knob-input.d.ts +172 -101
  195. package/types/cmat-components-loading-overlay.d.ts +8 -11
  196. package/types/cmat-components-masonry.d.ts +27 -14
  197. package/types/cmat-components-material-color-picker.d.ts +56 -42
  198. package/types/cmat-components-material-datetimepicker.d.ts +817 -454
  199. package/types/cmat-components-navigation.d.ts +295 -221
  200. package/types/cmat-components-opt-input.d.ts +111 -90
  201. package/types/cmat-components-org-chart.d.ts +53 -35
  202. package/types/cmat-components-page-header.d.ts +37 -14
  203. package/types/cmat-components-pagination.d.ts +144 -107
  204. package/types/cmat-components-password-strength.d.ts +197 -86
  205. package/types/cmat-components-popover.d.ts +264 -166
  206. package/types/cmat-components-progress-bar.d.ts +17 -14
  207. package/types/cmat-components-qrcode.d.ts +111 -42
  208. package/types/cmat-components-rating.d.ts +105 -59
  209. package/types/cmat-components-rich-text-editor.d.ts +39 -16
  210. package/types/cmat-components-select-search.d.ts +195 -99
  211. package/types/cmat-components-select-table.d.ts +241 -142
  212. package/types/cmat-components-select-tree.d.ts +185 -118
  213. package/types/cmat-components-skeleton.d.ts +55 -32
  214. package/types/cmat-components-speed-dial.d.ts +86 -61
  215. package/types/cmat-components-status-tag.d.ts +42 -24
  216. package/types/cmat-components-table-toolbar.d.ts +30 -12
  217. package/types/cmat-components-timeline.d.ts +83 -51
  218. package/types/cmat-components-toast.d.ts +84 -85
  219. package/types/cmat-components-transfer-picker.d.ts +228 -181
  220. package/types/cmat-components-treetable.d.ts +63 -39
  221. package/types/cmat-components-upload.d.ts +205 -106
  222. package/types/cmat-components-x6-angular-shape.d.ts +29 -37
  223. package/types/cmat-directives-animate-on-scroll.d.ts +48 -30
  224. package/types/cmat-directives-arrow-cursor.d.ts +55 -35
  225. package/types/cmat-directives-autofocus.d.ts +8 -11
  226. package/types/cmat-directives-data-exporter.d.ts +71 -40
  227. package/types/cmat-directives-debounce.d.ts +31 -28
  228. package/types/cmat-directives-digit-only.d.ts +90 -53
  229. package/types/cmat-directives-equal-validator.d.ts +11 -14
  230. package/types/cmat-directives-seamless-auto-scroll.d.ts +42 -29
  231. package/types/cmat-lib-mock-api.d.ts +46 -55
  232. package/types/cmat-pipes-bytes.d.ts +7 -10
  233. package/types/cmat-pipes-date-format.d.ts +7 -10
  234. package/types/cmat-pipes-find-by-key.d.ts +8 -12
  235. package/types/cmat-pipes-group-by.d.ts +11 -15
  236. package/types/cmat-pipes-keys.d.ts +10 -13
  237. package/types/cmat-pipes-secure.d.ts +14 -17
  238. package/types/cmat-pipes-uppercase.d.ts +7 -10
  239. package/types/cmat-reports.d.ts +1131 -0
  240. package/types/cmat-services-alert.d.ts +80 -87
  241. package/types/cmat-services-config.d.ts +37 -43
  242. package/types/cmat-services-confirmation.d.ts +31 -37
  243. package/types/cmat-services-data.d.ts +18 -21
  244. package/types/cmat-services-export-as.d.ts +28 -33
  245. package/types/cmat-services-loading.d.ts +27 -31
  246. package/types/cmat-services-local-storage.d.ts +17 -21
  247. package/types/cmat-services-media-watcher.d.ts +14 -18
  248. package/types/cmat-services-platform.d.ts +8 -11
  249. package/types/cmat-services-print.d.ts +97 -102
  250. package/types/cmat-services-splash-screen.d.ts +11 -14
  251. package/types/cmat-services-title.d.ts +9 -12
  252. package/types/cmat-services-translation.d.ts +19 -22
  253. package/types/cmat-services-utils.d.ts +76 -80
  254. package/types/cmat-validators.d.ts +5 -8
  255. package/types/cmat-version.d.ts +8 -10
  256. package/types/cmat.d.ts +7551 -5204
@@ -1,126 +1,529 @@
1
- import * as i0 from '@angular/core';
2
- import { input, output, computed, ChangeDetectionStrategy, ViewEncapsulation, Component, HostBinding, forwardRef } from '@angular/core';
3
- import { NgClass } from '@angular/common';
4
- import * as i2 from '@angular/material/button';
5
- import { MatButtonModule } from '@angular/material/button';
6
- import * as i1 from '@angular/material/icon';
7
- import { MatIconModule } from '@angular/material/icon';
8
-
9
- class CmatChartNodeComponent {
10
- constructor() {
11
- this.node = input.required(/* @ts-ignore */
12
- ...(ngDevMode ? [{ debugName: "node" }] : /* istanbul ignore next */ []));
13
- this.hasParent = input(/* @ts-ignore */
14
- ...(ngDevMode ? [undefined, { debugName: "hasParent" }] : /* istanbul ignore next */ []));
15
- this.enableControlHeight = input(/* @ts-ignore */
16
- ...(ngDevMode ? [undefined, { debugName: "enableControlHeight" }] : /* istanbul ignore next */ []));
17
- this.direction = input('vertical', /* @ts-ignore */
18
- ...(ngDevMode ? [{ debugName: "direction" }] : /* istanbul ignore next */ []));
19
- this.detailsBtnTitle = input(/* @ts-ignore */
20
- ...(ngDevMode ? [undefined, { debugName: "detailsBtnTitle" }] : /* istanbul ignore next */ []));
21
- this.detailsBtnClick = output();
22
- this.containerClass = computed(() => `cmat-org-connector-${this.direction()} `, /* @ts-ignore */
23
- ...(ngDevMode ? [{ debugName: "containerClass" }] : /* istanbul ignore next */ []));
24
- this.connectorToParentHeight = computed(() => {
25
- const heightFactor = this.node().heightFactor;
26
- if (this.enableControlHeight() && heightFactor !== undefined && heightFactor > 0) {
27
- const maxHeightEm = 19.2;
28
- let newHeight = heightFactor * maxHeightEm;
29
- if (heightFactor >= 2) {
30
- newHeight -= heightFactor - 1;
31
- }
32
- return `${newHeight}em`;
33
- }
34
- return '1em';
35
- }, /* @ts-ignore */
36
- ...(ngDevMode ? [{ debugName: "connectorToParentHeight" }] : /* istanbul ignore next */ []));
37
- }
38
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: CmatChartNodeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
39
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.0", type: CmatChartNodeComponent, isStandalone: true, selector: "cmat-org-chart-node", inputs: { node: { classPropertyName: "node", publicName: "node", isSignal: true, isRequired: true, transformFunction: null }, hasParent: { classPropertyName: "hasParent", publicName: "hasParent", isSignal: true, isRequired: false, transformFunction: null }, enableControlHeight: { classPropertyName: "enableControlHeight", publicName: "enableControlHeight", isSignal: true, isRequired: false, transformFunction: null }, direction: { classPropertyName: "direction", publicName: "direction", isSignal: true, isRequired: false, transformFunction: null }, detailsBtnTitle: { classPropertyName: "detailsBtnTitle", publicName: "detailsBtnTitle", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { detailsBtnClick: "detailsBtnClick" }, exportAs: ["cmatOrgChartNode"], ngImport: i0, template: "<!-- eslint-disable @angular-eslint/template/no-inline-styles -->\r\n@if(hasParent()){\r\n<div class=\"cmat-org-border\" [ngClass]=\"containerClass()\" [style.height]=\"connectorToParentHeight()\"></div>\r\n}\r\n<div class=\"cmat-org-box cmat-org-border cmat-org-background\" [ngClass]=\"node().cssClass\">\r\n @if(node().image!==''){\r\n <div class=\"cmat-org-image\" [style]=\"{ 'background-image': 'url(\\'' + node().image + '\\')' }\"\r\n [style.border-color]=\"node().color\"></div>\r\n }@else {\r\n <div class=\"text-center\">\r\n <mat-icon class=\"icon-size-16\" [svgIcon]=\"'heroicons_outline:user-circle'\">\r\n </mat-icon>\r\n </div>\r\n }\r\n\r\n <div class=\"cmat-org-container\">\r\n <div class=\"cmat-org-title\" [innerHTML]=\"node().title\" [style.color]=\"node().color\"></div>\r\n <div class=\"cmat-org-name\" [innerHTML]=\"node().name\"></div>\r\n \r\n @if(node().showDetail){\r\n <div class=\"button-container\">\r\n <button matButton=\"filled\" class=\"cmat-org-btn cmat-org-btn-details\" color=\"primary\"\r\n (click)=\"detailsBtnClick.emit(node())\">\r\n {{ detailsBtnTitle() }}\r\n </button>\r\n </div>\r\n }\r\n </div>\r\n<!-- eslint-enable @angular-eslint/template/no-inline-styles -->\r\n</div>\r\n@if(node().children.length){\r\n<div class=\"cmat-org-border\" [ngClass]=\"containerClass()\"></div>\r\n}", styles: ["cmat-org-chart-node{display:flex;align-items:center}.cmat-org-box{width:16em;height:16em;box-sizing:border-box;overflow:overlay;position:relative}.cmat-org-container{display:flex;flex-direction:column;align-items:center}.cmat-org-title,.cmat-org-name,.button-container{flex:1}.cmat-org-title{margin-top:.5em}.cmat-org-name{margin:.3em 0}.button-container{display:flex;flex-direction:row;justify-content:center;align-items:center;position:absolute;bottom:1em;width:100%}.cmat-org-image{background-repeat:round;width:4em;height:4em;background-color:transparent!important;border-radius:50%;padding:.25em;border:3px solid var(--cmat-text-hint);margin:4px auto auto}.cmat-org-title{font-size:1.1rem;font-weight:700;text-align:center}.cmat-org-name{text-align:center;margin-bottom:8px!important}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
40
- }
41
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: CmatChartNodeComponent, decorators: [{
42
- type: Component,
43
- args: [{ selector: 'cmat-org-chart-node', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'cmatOrgChartNode', imports: [NgClass, MatIconModule, MatButtonModule], template: "<!-- eslint-disable @angular-eslint/template/no-inline-styles -->\r\n@if(hasParent()){\r\n<div class=\"cmat-org-border\" [ngClass]=\"containerClass()\" [style.height]=\"connectorToParentHeight()\"></div>\r\n}\r\n<div class=\"cmat-org-box cmat-org-border cmat-org-background\" [ngClass]=\"node().cssClass\">\r\n @if(node().image!==''){\r\n <div class=\"cmat-org-image\" [style]=\"{ 'background-image': 'url(\\'' + node().image + '\\')' }\"\r\n [style.border-color]=\"node().color\"></div>\r\n }@else {\r\n <div class=\"text-center\">\r\n <mat-icon class=\"icon-size-16\" [svgIcon]=\"'heroicons_outline:user-circle'\">\r\n </mat-icon>\r\n </div>\r\n }\r\n\r\n <div class=\"cmat-org-container\">\r\n <div class=\"cmat-org-title\" [innerHTML]=\"node().title\" [style.color]=\"node().color\"></div>\r\n <div class=\"cmat-org-name\" [innerHTML]=\"node().name\"></div>\r\n \r\n @if(node().showDetail){\r\n <div class=\"button-container\">\r\n <button matButton=\"filled\" class=\"cmat-org-btn cmat-org-btn-details\" color=\"primary\"\r\n (click)=\"detailsBtnClick.emit(node())\">\r\n {{ detailsBtnTitle() }}\r\n </button>\r\n </div>\r\n }\r\n </div>\r\n<!-- eslint-enable @angular-eslint/template/no-inline-styles -->\r\n</div>\r\n@if(node().children.length){\r\n<div class=\"cmat-org-border\" [ngClass]=\"containerClass()\"></div>\r\n}", styles: ["cmat-org-chart-node{display:flex;align-items:center}.cmat-org-box{width:16em;height:16em;box-sizing:border-box;overflow:overlay;position:relative}.cmat-org-container{display:flex;flex-direction:column;align-items:center}.cmat-org-title,.cmat-org-name,.button-container{flex:1}.cmat-org-title{margin-top:.5em}.cmat-org-name{margin:.3em 0}.button-container{display:flex;flex-direction:row;justify-content:center;align-items:center;position:absolute;bottom:1em;width:100%}.cmat-org-image{background-repeat:round;width:4em;height:4em;background-color:transparent!important;border-radius:50%;padding:.25em;border:3px solid var(--cmat-text-hint);margin:4px auto auto}.cmat-org-title{font-size:1.1rem;font-weight:700;text-align:center}.cmat-org-name{text-align:center;margin-bottom:8px!important}\n"] }]
44
- }], propDecorators: { node: [{ type: i0.Input, args: [{ isSignal: true, alias: "node", required: true }] }], hasParent: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasParent", required: false }] }], enableControlHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "enableControlHeight", required: false }] }], direction: [{ type: i0.Input, args: [{ isSignal: true, alias: "direction", required: false }] }], detailsBtnTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "detailsBtnTitle", required: false }] }], detailsBtnClick: [{ type: i0.Output, args: ["detailsBtnClick"] }] } });
45
-
46
- class CmatChartDesignerComponent {
47
- constructor() {
48
- this.node = input.required(/* @ts-ignore */
49
- ...(ngDevMode ? [{ debugName: "node" }] : /* istanbul ignore next */ []));
50
- this.hasParent = input(false, /* @ts-ignore */
51
- ...(ngDevMode ? [{ debugName: "hasParent" }] : /* istanbul ignore next */ []));
52
- this.enableControlHeight = input(/* @ts-ignore */
53
- ...(ngDevMode ? [undefined, { debugName: "enableControlHeight" }] : /* istanbul ignore next */ []));
54
- this.direction = input('vertical', /* @ts-ignore */
55
- ...(ngDevMode ? [{ debugName: "direction" }] : /* istanbul ignore next */ []));
56
- this.detailsBtnTitle = input(/* @ts-ignore */
57
- ...(ngDevMode ? [undefined, { debugName: "detailsBtnTitle" }] : /* istanbul ignore next */ []));
58
- this.detailsBtnClick = output();
59
- this.chartNodeClass = computed(() => `cmat-org-${this.direction()}`, /* @ts-ignore */
60
- ...(ngDevMode ? [{ debugName: "chartNodeClass" }] : /* istanbul ignore next */ []));
61
- }
62
- get hostFlexDirection() {
63
- return this.direction() === 'vertical' ? 'column' : '';
64
- }
65
- get hostWidth() {
66
- return this.direction() === 'vertical' ? 'fit-content' : '';
67
- }
68
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: CmatChartDesignerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
69
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.0", type: CmatChartDesignerComponent, isStandalone: true, selector: "cmat-org-chart-designer", inputs: { node: { classPropertyName: "node", publicName: "node", isSignal: true, isRequired: true, transformFunction: null }, hasParent: { classPropertyName: "hasParent", publicName: "hasParent", isSignal: true, isRequired: false, transformFunction: null }, enableControlHeight: { classPropertyName: "enableControlHeight", publicName: "enableControlHeight", isSignal: true, isRequired: false, transformFunction: null }, direction: { classPropertyName: "direction", publicName: "direction", isSignal: true, isRequired: false, transformFunction: null }, detailsBtnTitle: { classPropertyName: "detailsBtnTitle", publicName: "detailsBtnTitle", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { detailsBtnClick: "detailsBtnClick" }, host: { properties: { "style.flex-direction": "this.hostFlexDirection", "style.width": "this.hostWidth" } }, exportAs: ["cmatOrgChartDesigner"], ngImport: i0, template: "<!-- eslint-disable @angular-eslint/template/no-inline-styles -->\r\n<cmat-org-chart-node [class]=\"chartNodeClass()\" [node]=\"node()\" [hasParent]=\"hasParent()\"\r\n [enableControlHeight]=\"enableControlHeight()\" [direction]=\"direction()\" [detailsBtnTitle]=\"detailsBtnTitle()\"\r\n (detailsBtnClick)=\"detailsBtnClick.emit($event)\">\r\n</cmat-org-chart-node>\r\n\r\n<div class=\"cmat-org-reports-{{ direction() }} cmat-org-reports\">\r\n @for (childNode of node().children; track $index) {\r\n <div class=\"cmat-org-org-container cmat-org-org-container-{{ direction() }}\">\r\n <div class=\"cmat-org-connector-container cmat-org-connector-container-{{ direction() }}\">\r\n <div class=\"cmat-org-connector cmat-org-border\" [style.border-color]=\"$first ? 'transparent' : ''\"></div>\r\n <div class=\"cmat-org-border\"></div>\r\n <div class=\"cmat-org-connector cmat-org-border\" [style.border-color]=\"$last ? 'transparent' : ''\"></div>\r\n </div>\r\n <cmat-org-chart-designer [node]=\"childNode\" [hasParent]=\"true\" [enableControlHeight]=\"enableControlHeight()\"\r\n [direction]=\"direction()\" [detailsBtnTitle]=\"detailsBtnTitle()\" (detailsBtnClick)=\"detailsBtnClick.emit($event)\">\r\n </cmat-org-chart-designer>\r\n </div>\r\n }\r\n<!-- eslint-enable @angular-eslint/template/no-inline-styles -->\r\n</div>", styles: ["cmat-org-chart-designer{display:flex;align-items:center;flex:1}.cmat-org-vertical{flex-direction:column}.cmat-org-org-container{display:flex}.cmat-org-org-container-vertical{flex-direction:column}.cmat-org-connector{flex:1}.cmat-org-connector-container{display:flex}.cmat-org-connector-container-horizontal{flex-direction:column}.cmat-org-reports{display:flex;flex:1}.cmat-org-reports-horizontal{flex-direction:column}.cmat-org-reports-vertical{width:100%}\n"], dependencies: [{ kind: "component", type: i0.forwardRef(() => CmatChartDesignerComponent), selector: "cmat-org-chart-designer", inputs: ["node", "hasParent", "enableControlHeight", "direction", "detailsBtnTitle"], outputs: ["detailsBtnClick"], exportAs: ["cmatOrgChartDesigner"] }, { kind: "component", type: i0.forwardRef(() => CmatChartNodeComponent), selector: "cmat-org-chart-node", inputs: ["node", "hasParent", "enableControlHeight", "direction", "detailsBtnTitle"], outputs: ["detailsBtnClick"], exportAs: ["cmatOrgChartNode"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
70
- }
71
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: CmatChartDesignerComponent, decorators: [{
72
- type: Component,
73
- args: [{ selector: 'cmat-org-chart-designer', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'cmatOrgChartDesigner', imports: [CmatChartNodeComponent, forwardRef(() => CmatChartDesignerComponent)], template: "<!-- eslint-disable @angular-eslint/template/no-inline-styles -->\r\n<cmat-org-chart-node [class]=\"chartNodeClass()\" [node]=\"node()\" [hasParent]=\"hasParent()\"\r\n [enableControlHeight]=\"enableControlHeight()\" [direction]=\"direction()\" [detailsBtnTitle]=\"detailsBtnTitle()\"\r\n (detailsBtnClick)=\"detailsBtnClick.emit($event)\">\r\n</cmat-org-chart-node>\r\n\r\n<div class=\"cmat-org-reports-{{ direction() }} cmat-org-reports\">\r\n @for (childNode of node().children; track $index) {\r\n <div class=\"cmat-org-org-container cmat-org-org-container-{{ direction() }}\">\r\n <div class=\"cmat-org-connector-container cmat-org-connector-container-{{ direction() }}\">\r\n <div class=\"cmat-org-connector cmat-org-border\" [style.border-color]=\"$first ? 'transparent' : ''\"></div>\r\n <div class=\"cmat-org-border\"></div>\r\n <div class=\"cmat-org-connector cmat-org-border\" [style.border-color]=\"$last ? 'transparent' : ''\"></div>\r\n </div>\r\n <cmat-org-chart-designer [node]=\"childNode\" [hasParent]=\"true\" [enableControlHeight]=\"enableControlHeight()\"\r\n [direction]=\"direction()\" [detailsBtnTitle]=\"detailsBtnTitle()\" (detailsBtnClick)=\"detailsBtnClick.emit($event)\">\r\n </cmat-org-chart-designer>\r\n </div>\r\n }\r\n<!-- eslint-enable @angular-eslint/template/no-inline-styles -->\r\n</div>", styles: ["cmat-org-chart-designer{display:flex;align-items:center;flex:1}.cmat-org-vertical{flex-direction:column}.cmat-org-org-container{display:flex}.cmat-org-org-container-vertical{flex-direction:column}.cmat-org-connector{flex:1}.cmat-org-connector-container{display:flex}.cmat-org-connector-container-horizontal{flex-direction:column}.cmat-org-reports{display:flex;flex:1}.cmat-org-reports-horizontal{flex-direction:column}.cmat-org-reports-vertical{width:100%}\n"] }]
74
- }], propDecorators: { node: [{ type: i0.Input, args: [{ isSignal: true, alias: "node", required: true }] }], hasParent: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasParent", required: false }] }], enableControlHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "enableControlHeight", required: false }] }], direction: [{ type: i0.Input, args: [{ isSignal: true, alias: "direction", required: false }] }], detailsBtnTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "detailsBtnTitle", required: false }] }], detailsBtnClick: [{ type: i0.Output, args: ["detailsBtnClick"] }], hostFlexDirection: [{
75
- type: HostBinding,
76
- args: ['style.flex-direction']
77
- }], hostWidth: [{
78
- type: HostBinding,
79
- args: ['style.width']
80
- }] } });
81
-
82
- class CmatOrgChartComponent {
83
- constructor() {
84
- this.nodes = input.required(/* @ts-ignore */
85
- ...(ngDevMode ? [{ debugName: "nodes" }] : /* istanbul ignore next */ []));
86
- this.enableControlHeight = input(false, /* @ts-ignore */
87
- ...(ngDevMode ? [{ debugName: "enableControlHeight" }] : /* istanbul ignore next */ []));
88
- this.direction = input('vertical', /* @ts-ignore */
89
- ...(ngDevMode ? [{ debugName: "direction" }] : /* istanbul ignore next */ []));
90
- this.detailsBtnTitle = input('查看详细', /* @ts-ignore */
91
- ...(ngDevMode ? [{ debugName: "detailsBtnTitle" }] : /* istanbul ignore next */ []));
92
- this.detailsBtnClick = output();
93
- }
94
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: CmatOrgChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
95
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.0", type: CmatOrgChartComponent, isStandalone: true, selector: "cmat-org-chart", inputs: { nodes: { classPropertyName: "nodes", publicName: "nodes", isSignal: true, isRequired: true, transformFunction: null }, enableControlHeight: { classPropertyName: "enableControlHeight", publicName: "enableControlHeight", isSignal: true, isRequired: false, transformFunction: null }, direction: { classPropertyName: "direction", publicName: "direction", isSignal: true, isRequired: false, transformFunction: null }, detailsBtnTitle: { classPropertyName: "detailsBtnTitle", publicName: "detailsBtnTitle", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { detailsBtnClick: "detailsBtnClick" }, exportAs: ["cmatOrgChart"], ngImport: i0, template: "<div class=\"cmat-org\">\r\n @for (node of nodes(); track $index) {\r\n <div class=\"cmat-org-self-{{ direction() }}\">\r\n <cmat-org-chart-designer [node]=\"node\" [direction]=\"direction()\" [enableControlHeight]=\"enableControlHeight()\"\r\n [detailsBtnTitle]=\"detailsBtnTitle()\" (detailsBtnClick)=\"detailsBtnClick.emit($event)\"></cmat-org-chart-designer>\r\n </div>\r\n }\r\n</div>", styles: [".cmat-org-horizontal{padding:1em 0}.cmat-org-vertical{padding:0 1em}.cmat-org-border{border:.1em solid var(--cmat-divider);box-sizing:border-box}.cmat-org-box{padding:.5em 1em;border-radius:.2em;box-shadow:0 2px 8px #00000059}.cmat-org-connector-horizontal{width:1em!important;height:0!important}.cmat-org-connector-vertical{width:0!important;height:1em!important}.cmat-org .cmat-org-self-vertical{margin-bottom:2%}\n"], dependencies: [{ kind: "component", type: CmatChartDesignerComponent, selector: "cmat-org-chart-designer", inputs: ["node", "hasParent", "enableControlHeight", "direction", "detailsBtnTitle"], outputs: ["detailsBtnClick"], exportAs: ["cmatOrgChartDesigner"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
96
- }
97
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: CmatOrgChartComponent, decorators: [{
98
- type: Component,
99
- args: [{ selector: 'cmat-org-chart', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'cmatOrgChart', imports: [CmatChartDesignerComponent], template: "<div class=\"cmat-org\">\r\n @for (node of nodes(); track $index) {\r\n <div class=\"cmat-org-self-{{ direction() }}\">\r\n <cmat-org-chart-designer [node]=\"node\" [direction]=\"direction()\" [enableControlHeight]=\"enableControlHeight()\"\r\n [detailsBtnTitle]=\"detailsBtnTitle()\" (detailsBtnClick)=\"detailsBtnClick.emit($event)\"></cmat-org-chart-designer>\r\n </div>\r\n }\r\n</div>", styles: [".cmat-org-horizontal{padding:1em 0}.cmat-org-vertical{padding:0 1em}.cmat-org-border{border:.1em solid var(--cmat-divider);box-sizing:border-box}.cmat-org-box{padding:.5em 1em;border-radius:.2em;box-shadow:0 2px 8px #00000059}.cmat-org-connector-horizontal{width:1em!important;height:0!important}.cmat-org-connector-vertical{width:0!important;height:1em!important}.cmat-org .cmat-org-self-vertical{margin-bottom:2%}\n"] }]
100
- }], propDecorators: { nodes: [{ type: i0.Input, args: [{ isSignal: true, alias: "nodes", required: true }] }], enableControlHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "enableControlHeight", required: false }] }], direction: [{ type: i0.Input, args: [{ isSignal: true, alias: "direction", required: false }] }], detailsBtnTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "detailsBtnTitle", required: false }] }], detailsBtnClick: [{ type: i0.Output, args: ["detailsBtnClick"] }] } });
101
-
102
- class ChartNode {
103
- constructor(structure, parent) {
104
- this.parent = parent;
105
- const [name, ...reports] = structure;
106
- this.name = name.split('(')[0].trim();
107
- const titleMatch = /\(([^)]+)\)/.exec(name);
108
- this.title = titleMatch?.[1].trim();
109
- this.children = reports.map(r => r.substring(1))
110
- .reduce((previous, current) => {
111
- if (!current.startsWith(' ')) {
112
- previous.push([]);
113
- }
114
- previous[previous.length - 1].push(current);
115
- return previous;
116
- }, [])
117
- .map(r => new ChartNode(r, this)) ?? [];
118
- }
119
- }
120
-
121
- /**
122
- * Generated bundle index. Do not edit.
123
- */
124
-
1
+ import * as i0 from "@angular/core";
2
+ import { ChangeDetectionStrategy, Component, HostBinding, ViewEncapsulation, computed, forwardRef, input, output } from "@angular/core";
3
+ import { NgClass } from "@angular/common";
4
+ import * as i2 from "@angular/material/button";
5
+ import { MatButtonModule } from "@angular/material/button";
6
+ import * as i1 from "@angular/material/icon";
7
+ import { MatIconModule } from "@angular/material/icon";
8
+ var CmatChartNodeComponent = class CmatChartNodeComponent {
9
+ constructor() {
10
+ this.node = input.required(...ngDevMode ? [{ debugName: "node" }] : /* istanbul ignore next */ []);
11
+ this.hasParent = input(...ngDevMode ? [void 0, { debugName: "hasParent" }] : /* istanbul ignore next */ []);
12
+ this.enableControlHeight = input(...ngDevMode ? [void 0, { debugName: "enableControlHeight" }] : /* istanbul ignore next */ []);
13
+ this.direction = input("vertical", ...ngDevMode ? [{ debugName: "direction" }] : /* istanbul ignore next */ []);
14
+ this.detailsBtnTitle = input(...ngDevMode ? [void 0, { debugName: "detailsBtnTitle" }] : /* istanbul ignore next */ []);
15
+ this.detailsBtnClick = output();
16
+ this.containerClass = computed(() => `cmat-org-connector-${this.direction()} `, ...ngDevMode ? [{ debugName: "containerClass" }] : /* istanbul ignore next */ []);
17
+ this.connectorToParentHeight = computed(() => {
18
+ const heightFactor = this.node().heightFactor;
19
+ if (this.enableControlHeight() && heightFactor !== void 0 && heightFactor > 0) {
20
+ let newHeight = heightFactor * 19.2;
21
+ if (heightFactor >= 2) newHeight -= heightFactor - 1;
22
+ return `${newHeight}em`;
23
+ }
24
+ return "1em";
25
+ }, ...ngDevMode ? [{ debugName: "connectorToParentHeight" }] : /* istanbul ignore next */ []);
26
+ }
27
+ static {
28
+ this.ɵfac = i0.ɵɵngDeclareFactory({
29
+ minVersion: "12.0.0",
30
+ version: "22.2.3",
31
+ ngImport: i0,
32
+ type: CmatChartNodeComponent,
33
+ deps: [],
34
+ target: i0.ɵɵFactoryTarget.Component
35
+ });
36
+ }
37
+ static {
38
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
39
+ minVersion: "17.0.0",
40
+ version: "22.2.3",
41
+ type: CmatChartNodeComponent,
42
+ isStandalone: true,
43
+ selector: "cmat-org-chart-node",
44
+ inputs: {
45
+ node: {
46
+ classPropertyName: "node",
47
+ publicName: "node",
48
+ isSignal: true,
49
+ isRequired: true,
50
+ transformFunction: null
51
+ },
52
+ hasParent: {
53
+ classPropertyName: "hasParent",
54
+ publicName: "hasParent",
55
+ isSignal: true,
56
+ isRequired: false,
57
+ transformFunction: null
58
+ },
59
+ enableControlHeight: {
60
+ classPropertyName: "enableControlHeight",
61
+ publicName: "enableControlHeight",
62
+ isSignal: true,
63
+ isRequired: false,
64
+ transformFunction: null
65
+ },
66
+ direction: {
67
+ classPropertyName: "direction",
68
+ publicName: "direction",
69
+ isSignal: true,
70
+ isRequired: false,
71
+ transformFunction: null
72
+ },
73
+ detailsBtnTitle: {
74
+ classPropertyName: "detailsBtnTitle",
75
+ publicName: "detailsBtnTitle",
76
+ isSignal: true,
77
+ isRequired: false,
78
+ transformFunction: null
79
+ }
80
+ },
81
+ outputs: { detailsBtnClick: "detailsBtnClick" },
82
+ exportAs: ["cmatOrgChartNode"],
83
+ ngImport: i0,
84
+ template: "<!-- eslint-disable @angular-eslint/template/no-inline-styles -->\r\n@if(hasParent()){\r\n<div class=\"cmat-org-border\" [ngClass]=\"containerClass()\" [style.height]=\"connectorToParentHeight()\"></div>\r\n}\r\n<div class=\"cmat-org-box cmat-org-border cmat-org-background\" [ngClass]=\"node().cssClass\">\r\n @if(node().image!==''){\r\n <div class=\"cmat-org-image\" [style]=\"{ 'background-image': 'url(\\'' + node().image + '\\')' }\"\r\n [style.border-color]=\"node().color\"></div>\r\n }@else {\r\n <div class=\"text-center\">\r\n <mat-icon class=\"icon-size-16\" [svgIcon]=\"'heroicons_outline:user-circle'\">\r\n </mat-icon>\r\n </div>\r\n }\r\n\r\n <div class=\"cmat-org-container\">\r\n <div class=\"cmat-org-title\" [innerHTML]=\"node().title\" [style.color]=\"node().color\"></div>\r\n <div class=\"cmat-org-name\" [innerHTML]=\"node().name\"></div>\r\n \r\n @if(node().showDetail){\r\n <div class=\"button-container\">\r\n <button matButton=\"filled\" class=\"cmat-org-btn cmat-org-btn-details\" color=\"primary\"\r\n (click)=\"detailsBtnClick.emit(node())\">\r\n {{ detailsBtnTitle() }}\r\n </button>\r\n </div>\r\n }\r\n </div>\r\n<!-- eslint-enable @angular-eslint/template/no-inline-styles -->\r\n</div>\r\n@if(node().children.length){\r\n<div class=\"cmat-org-border\" [ngClass]=\"containerClass()\"></div>\r\n}",
85
+ styles: ["cmat-org-chart-node{display:flex;align-items:center}.cmat-org-box{width:16em;height:16em;box-sizing:border-box;overflow:overlay;position:relative}.cmat-org-container{display:flex;flex-direction:column;align-items:center}.cmat-org-title,.cmat-org-name,.button-container{flex:1}.cmat-org-title{margin-top:.5em}.cmat-org-name{margin:.3em 0}.button-container{display:flex;flex-direction:row;justify-content:center;align-items:center;position:absolute;bottom:1em;width:100%}.cmat-org-image{background-repeat:round;width:4em;height:4em;background-color:transparent!important;border-radius:50%;padding:.25em;border:3px solid var(--cmat-text-hint);margin:4px auto auto}.cmat-org-title{font-size:1.1rem;font-weight:700;text-align:center}.cmat-org-name{text-align:center;margin-bottom:8px!important}\n"],
86
+ dependencies: [
87
+ {
88
+ kind: "directive",
89
+ type: NgClass,
90
+ selector: "[ngClass]",
91
+ inputs: ["class", "ngClass"]
92
+ },
93
+ {
94
+ kind: "ngmodule",
95
+ type: MatIconModule
96
+ },
97
+ {
98
+ kind: "component",
99
+ type: i1.MatIcon,
100
+ selector: "mat-icon",
101
+ inputs: [
102
+ "color",
103
+ "inline",
104
+ "svgIcon",
105
+ "fontSet",
106
+ "fontIcon"
107
+ ],
108
+ exportAs: ["matIcon"]
109
+ },
110
+ {
111
+ kind: "ngmodule",
112
+ type: MatButtonModule
113
+ },
114
+ {
115
+ kind: "component",
116
+ type: i2.MatButton,
117
+ selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ",
118
+ inputs: ["matButton"],
119
+ exportAs: ["matButton", "matAnchor"]
120
+ }
121
+ ],
122
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
123
+ encapsulation: i0.ViewEncapsulation.None
124
+ });
125
+ }
126
+ };
127
+ i0.ɵɵngDeclareClassMetadata({
128
+ minVersion: "12.0.0",
129
+ version: "22.2.3",
130
+ ngImport: i0,
131
+ type: CmatChartNodeComponent,
132
+ decorators: [{
133
+ type: Component,
134
+ args: [{
135
+ selector: "cmat-org-chart-node",
136
+ encapsulation: ViewEncapsulation.None,
137
+ changeDetection: ChangeDetectionStrategy.OnPush,
138
+ exportAs: "cmatOrgChartNode",
139
+ imports: [
140
+ NgClass,
141
+ MatIconModule,
142
+ MatButtonModule
143
+ ],
144
+ template: "<!-- eslint-disable @angular-eslint/template/no-inline-styles -->\r\n@if(hasParent()){\r\n<div class=\"cmat-org-border\" [ngClass]=\"containerClass()\" [style.height]=\"connectorToParentHeight()\"></div>\r\n}\r\n<div class=\"cmat-org-box cmat-org-border cmat-org-background\" [ngClass]=\"node().cssClass\">\r\n @if(node().image!==''){\r\n <div class=\"cmat-org-image\" [style]=\"{ 'background-image': 'url(\\'' + node().image + '\\')' }\"\r\n [style.border-color]=\"node().color\"></div>\r\n }@else {\r\n <div class=\"text-center\">\r\n <mat-icon class=\"icon-size-16\" [svgIcon]=\"'heroicons_outline:user-circle'\">\r\n </mat-icon>\r\n </div>\r\n }\r\n\r\n <div class=\"cmat-org-container\">\r\n <div class=\"cmat-org-title\" [innerHTML]=\"node().title\" [style.color]=\"node().color\"></div>\r\n <div class=\"cmat-org-name\" [innerHTML]=\"node().name\"></div>\r\n \r\n @if(node().showDetail){\r\n <div class=\"button-container\">\r\n <button matButton=\"filled\" class=\"cmat-org-btn cmat-org-btn-details\" color=\"primary\"\r\n (click)=\"detailsBtnClick.emit(node())\">\r\n {{ detailsBtnTitle() }}\r\n </button>\r\n </div>\r\n }\r\n </div>\r\n<!-- eslint-enable @angular-eslint/template/no-inline-styles -->\r\n</div>\r\n@if(node().children.length){\r\n<div class=\"cmat-org-border\" [ngClass]=\"containerClass()\"></div>\r\n}",
145
+ styles: ["cmat-org-chart-node{display:flex;align-items:center}.cmat-org-box{width:16em;height:16em;box-sizing:border-box;overflow:overlay;position:relative}.cmat-org-container{display:flex;flex-direction:column;align-items:center}.cmat-org-title,.cmat-org-name,.button-container{flex:1}.cmat-org-title{margin-top:.5em}.cmat-org-name{margin:.3em 0}.button-container{display:flex;flex-direction:row;justify-content:center;align-items:center;position:absolute;bottom:1em;width:100%}.cmat-org-image{background-repeat:round;width:4em;height:4em;background-color:transparent!important;border-radius:50%;padding:.25em;border:3px solid var(--cmat-text-hint);margin:4px auto auto}.cmat-org-title{font-size:1.1rem;font-weight:700;text-align:center}.cmat-org-name{text-align:center;margin-bottom:8px!important}\n"]
146
+ }]
147
+ }],
148
+ propDecorators: {
149
+ node: [{
150
+ type: i0.Input,
151
+ args: [{
152
+ isSignal: true,
153
+ alias: "node",
154
+ required: true
155
+ }]
156
+ }],
157
+ hasParent: [{
158
+ type: i0.Input,
159
+ args: [{
160
+ isSignal: true,
161
+ alias: "hasParent",
162
+ required: false
163
+ }]
164
+ }],
165
+ enableControlHeight: [{
166
+ type: i0.Input,
167
+ args: [{
168
+ isSignal: true,
169
+ alias: "enableControlHeight",
170
+ required: false
171
+ }]
172
+ }],
173
+ direction: [{
174
+ type: i0.Input,
175
+ args: [{
176
+ isSignal: true,
177
+ alias: "direction",
178
+ required: false
179
+ }]
180
+ }],
181
+ detailsBtnTitle: [{
182
+ type: i0.Input,
183
+ args: [{
184
+ isSignal: true,
185
+ alias: "detailsBtnTitle",
186
+ required: false
187
+ }]
188
+ }],
189
+ detailsBtnClick: [{
190
+ type: i0.Output,
191
+ args: ["detailsBtnClick"]
192
+ }]
193
+ }
194
+ });
195
+ var CmatChartDesignerComponent = class CmatChartDesignerComponent {
196
+ constructor() {
197
+ this.node = input.required(...ngDevMode ? [{ debugName: "node" }] : /* istanbul ignore next */ []);
198
+ this.hasParent = input(false, ...ngDevMode ? [{ debugName: "hasParent" }] : /* istanbul ignore next */ []);
199
+ this.enableControlHeight = input(...ngDevMode ? [void 0, { debugName: "enableControlHeight" }] : /* istanbul ignore next */ []);
200
+ this.direction = input("vertical", ...ngDevMode ? [{ debugName: "direction" }] : /* istanbul ignore next */ []);
201
+ this.detailsBtnTitle = input(...ngDevMode ? [void 0, { debugName: "detailsBtnTitle" }] : /* istanbul ignore next */ []);
202
+ this.detailsBtnClick = output();
203
+ this.chartNodeClass = computed(() => `cmat-org-${this.direction()}`, ...ngDevMode ? [{ debugName: "chartNodeClass" }] : /* istanbul ignore next */ []);
204
+ }
205
+ get hostFlexDirection() {
206
+ return this.direction() === "vertical" ? "column" : "";
207
+ }
208
+ get hostWidth() {
209
+ return this.direction() === "vertical" ? "fit-content" : "";
210
+ }
211
+ static {
212
+ this.ɵfac = i0.ɵɵngDeclareFactory({
213
+ minVersion: "12.0.0",
214
+ version: "22.2.3",
215
+ ngImport: i0,
216
+ type: CmatChartDesignerComponent,
217
+ deps: [],
218
+ target: i0.ɵɵFactoryTarget.Component
219
+ });
220
+ }
221
+ static {
222
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
223
+ minVersion: "17.0.0",
224
+ version: "22.2.3",
225
+ type: CmatChartDesignerComponent,
226
+ isStandalone: true,
227
+ selector: "cmat-org-chart-designer",
228
+ inputs: {
229
+ node: {
230
+ classPropertyName: "node",
231
+ publicName: "node",
232
+ isSignal: true,
233
+ isRequired: true,
234
+ transformFunction: null
235
+ },
236
+ hasParent: {
237
+ classPropertyName: "hasParent",
238
+ publicName: "hasParent",
239
+ isSignal: true,
240
+ isRequired: false,
241
+ transformFunction: null
242
+ },
243
+ enableControlHeight: {
244
+ classPropertyName: "enableControlHeight",
245
+ publicName: "enableControlHeight",
246
+ isSignal: true,
247
+ isRequired: false,
248
+ transformFunction: null
249
+ },
250
+ direction: {
251
+ classPropertyName: "direction",
252
+ publicName: "direction",
253
+ isSignal: true,
254
+ isRequired: false,
255
+ transformFunction: null
256
+ },
257
+ detailsBtnTitle: {
258
+ classPropertyName: "detailsBtnTitle",
259
+ publicName: "detailsBtnTitle",
260
+ isSignal: true,
261
+ isRequired: false,
262
+ transformFunction: null
263
+ }
264
+ },
265
+ outputs: { detailsBtnClick: "detailsBtnClick" },
266
+ host: { properties: {
267
+ "style.flex-direction": "this.hostFlexDirection",
268
+ "style.width": "this.hostWidth"
269
+ } },
270
+ exportAs: ["cmatOrgChartDesigner"],
271
+ ngImport: i0,
272
+ template: "<!-- eslint-disable @angular-eslint/template/no-inline-styles -->\r\n<cmat-org-chart-node [class]=\"chartNodeClass()\" [node]=\"node()\" [hasParent]=\"hasParent()\"\r\n [enableControlHeight]=\"enableControlHeight()\" [direction]=\"direction()\" [detailsBtnTitle]=\"detailsBtnTitle()\"\r\n (detailsBtnClick)=\"detailsBtnClick.emit($event)\">\r\n</cmat-org-chart-node>\r\n\r\n<div class=\"cmat-org-reports-{{ direction() }} cmat-org-reports\">\r\n @for (childNode of node().children; track $index) {\r\n <div class=\"cmat-org-org-container cmat-org-org-container-{{ direction() }}\">\r\n <div class=\"cmat-org-connector-container cmat-org-connector-container-{{ direction() }}\">\r\n <div class=\"cmat-org-connector cmat-org-border\" [style.border-color]=\"$first ? 'transparent' : ''\"></div>\r\n <div class=\"cmat-org-border\"></div>\r\n <div class=\"cmat-org-connector cmat-org-border\" [style.border-color]=\"$last ? 'transparent' : ''\"></div>\r\n </div>\r\n <cmat-org-chart-designer [node]=\"childNode\" [hasParent]=\"true\" [enableControlHeight]=\"enableControlHeight()\"\r\n [direction]=\"direction()\" [detailsBtnTitle]=\"detailsBtnTitle()\" (detailsBtnClick)=\"detailsBtnClick.emit($event)\">\r\n </cmat-org-chart-designer>\r\n </div>\r\n }\r\n<!-- eslint-enable @angular-eslint/template/no-inline-styles -->\r\n</div>",
273
+ styles: ["cmat-org-chart-designer{display:flex;align-items:center;flex:1}.cmat-org-vertical{flex-direction:column}.cmat-org-org-container{display:flex}.cmat-org-org-container-vertical{flex-direction:column}.cmat-org-connector{flex:1}.cmat-org-connector-container{display:flex}.cmat-org-connector-container-horizontal{flex-direction:column}.cmat-org-reports{display:flex;flex:1}.cmat-org-reports-horizontal{flex-direction:column}.cmat-org-reports-vertical{width:100%}\n"],
274
+ dependencies: [{
275
+ kind: "component",
276
+ type: i0.forwardRef(() => CmatChartDesignerComponent),
277
+ selector: "cmat-org-chart-designer",
278
+ inputs: [
279
+ "node",
280
+ "hasParent",
281
+ "enableControlHeight",
282
+ "direction",
283
+ "detailsBtnTitle"
284
+ ],
285
+ outputs: ["detailsBtnClick"],
286
+ exportAs: ["cmatOrgChartDesigner"]
287
+ }, {
288
+ kind: "component",
289
+ type: i0.forwardRef(() => CmatChartNodeComponent),
290
+ selector: "cmat-org-chart-node",
291
+ inputs: [
292
+ "node",
293
+ "hasParent",
294
+ "enableControlHeight",
295
+ "direction",
296
+ "detailsBtnTitle"
297
+ ],
298
+ outputs: ["detailsBtnClick"],
299
+ exportAs: ["cmatOrgChartNode"]
300
+ }],
301
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
302
+ encapsulation: i0.ViewEncapsulation.None
303
+ });
304
+ }
305
+ };
306
+ i0.ɵɵngDeclareClassMetadata({
307
+ minVersion: "12.0.0",
308
+ version: "22.2.3",
309
+ ngImport: i0,
310
+ type: CmatChartDesignerComponent,
311
+ decorators: [{
312
+ type: Component,
313
+ args: [{
314
+ selector: "cmat-org-chart-designer",
315
+ encapsulation: ViewEncapsulation.None,
316
+ changeDetection: ChangeDetectionStrategy.OnPush,
317
+ exportAs: "cmatOrgChartDesigner",
318
+ imports: [CmatChartNodeComponent, forwardRef(() => CmatChartDesignerComponent)],
319
+ template: "<!-- eslint-disable @angular-eslint/template/no-inline-styles -->\r\n<cmat-org-chart-node [class]=\"chartNodeClass()\" [node]=\"node()\" [hasParent]=\"hasParent()\"\r\n [enableControlHeight]=\"enableControlHeight()\" [direction]=\"direction()\" [detailsBtnTitle]=\"detailsBtnTitle()\"\r\n (detailsBtnClick)=\"detailsBtnClick.emit($event)\">\r\n</cmat-org-chart-node>\r\n\r\n<div class=\"cmat-org-reports-{{ direction() }} cmat-org-reports\">\r\n @for (childNode of node().children; track $index) {\r\n <div class=\"cmat-org-org-container cmat-org-org-container-{{ direction() }}\">\r\n <div class=\"cmat-org-connector-container cmat-org-connector-container-{{ direction() }}\">\r\n <div class=\"cmat-org-connector cmat-org-border\" [style.border-color]=\"$first ? 'transparent' : ''\"></div>\r\n <div class=\"cmat-org-border\"></div>\r\n <div class=\"cmat-org-connector cmat-org-border\" [style.border-color]=\"$last ? 'transparent' : ''\"></div>\r\n </div>\r\n <cmat-org-chart-designer [node]=\"childNode\" [hasParent]=\"true\" [enableControlHeight]=\"enableControlHeight()\"\r\n [direction]=\"direction()\" [detailsBtnTitle]=\"detailsBtnTitle()\" (detailsBtnClick)=\"detailsBtnClick.emit($event)\">\r\n </cmat-org-chart-designer>\r\n </div>\r\n }\r\n<!-- eslint-enable @angular-eslint/template/no-inline-styles -->\r\n</div>",
320
+ styles: ["cmat-org-chart-designer{display:flex;align-items:center;flex:1}.cmat-org-vertical{flex-direction:column}.cmat-org-org-container{display:flex}.cmat-org-org-container-vertical{flex-direction:column}.cmat-org-connector{flex:1}.cmat-org-connector-container{display:flex}.cmat-org-connector-container-horizontal{flex-direction:column}.cmat-org-reports{display:flex;flex:1}.cmat-org-reports-horizontal{flex-direction:column}.cmat-org-reports-vertical{width:100%}\n"]
321
+ }]
322
+ }],
323
+ propDecorators: {
324
+ node: [{
325
+ type: i0.Input,
326
+ args: [{
327
+ isSignal: true,
328
+ alias: "node",
329
+ required: true
330
+ }]
331
+ }],
332
+ hasParent: [{
333
+ type: i0.Input,
334
+ args: [{
335
+ isSignal: true,
336
+ alias: "hasParent",
337
+ required: false
338
+ }]
339
+ }],
340
+ enableControlHeight: [{
341
+ type: i0.Input,
342
+ args: [{
343
+ isSignal: true,
344
+ alias: "enableControlHeight",
345
+ required: false
346
+ }]
347
+ }],
348
+ direction: [{
349
+ type: i0.Input,
350
+ args: [{
351
+ isSignal: true,
352
+ alias: "direction",
353
+ required: false
354
+ }]
355
+ }],
356
+ detailsBtnTitle: [{
357
+ type: i0.Input,
358
+ args: [{
359
+ isSignal: true,
360
+ alias: "detailsBtnTitle",
361
+ required: false
362
+ }]
363
+ }],
364
+ detailsBtnClick: [{
365
+ type: i0.Output,
366
+ args: ["detailsBtnClick"]
367
+ }],
368
+ hostFlexDirection: [{
369
+ type: HostBinding,
370
+ args: ["style.flex-direction"]
371
+ }],
372
+ hostWidth: [{
373
+ type: HostBinding,
374
+ args: ["style.width"]
375
+ }]
376
+ }
377
+ });
378
+ var CmatOrgChartComponent = class CmatOrgChartComponent {
379
+ constructor() {
380
+ this.nodes = input.required(...ngDevMode ? [{ debugName: "nodes" }] : /* istanbul ignore next */ []);
381
+ this.enableControlHeight = input(false, ...ngDevMode ? [{ debugName: "enableControlHeight" }] : /* istanbul ignore next */ []);
382
+ this.direction = input("vertical", ...ngDevMode ? [{ debugName: "direction" }] : /* istanbul ignore next */ []);
383
+ this.detailsBtnTitle = input("查看详细", ...ngDevMode ? [{ debugName: "detailsBtnTitle" }] : /* istanbul ignore next */ []);
384
+ this.detailsBtnClick = output();
385
+ }
386
+ static {
387
+ this.ɵfac = i0.ɵɵngDeclareFactory({
388
+ minVersion: "12.0.0",
389
+ version: "22.2.3",
390
+ ngImport: i0,
391
+ type: CmatOrgChartComponent,
392
+ deps: [],
393
+ target: i0.ɵɵFactoryTarget.Component
394
+ });
395
+ }
396
+ static {
397
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
398
+ minVersion: "17.0.0",
399
+ version: "22.2.3",
400
+ type: CmatOrgChartComponent,
401
+ isStandalone: true,
402
+ selector: "cmat-org-chart",
403
+ inputs: {
404
+ nodes: {
405
+ classPropertyName: "nodes",
406
+ publicName: "nodes",
407
+ isSignal: true,
408
+ isRequired: true,
409
+ transformFunction: null
410
+ },
411
+ enableControlHeight: {
412
+ classPropertyName: "enableControlHeight",
413
+ publicName: "enableControlHeight",
414
+ isSignal: true,
415
+ isRequired: false,
416
+ transformFunction: null
417
+ },
418
+ direction: {
419
+ classPropertyName: "direction",
420
+ publicName: "direction",
421
+ isSignal: true,
422
+ isRequired: false,
423
+ transformFunction: null
424
+ },
425
+ detailsBtnTitle: {
426
+ classPropertyName: "detailsBtnTitle",
427
+ publicName: "detailsBtnTitle",
428
+ isSignal: true,
429
+ isRequired: false,
430
+ transformFunction: null
431
+ }
432
+ },
433
+ outputs: { detailsBtnClick: "detailsBtnClick" },
434
+ exportAs: ["cmatOrgChart"],
435
+ ngImport: i0,
436
+ template: "<div class=\"cmat-org\">\r\n @for (node of nodes(); track $index) {\r\n <div class=\"cmat-org-self-{{ direction() }}\">\r\n <cmat-org-chart-designer [node]=\"node\" [direction]=\"direction()\" [enableControlHeight]=\"enableControlHeight()\"\r\n [detailsBtnTitle]=\"detailsBtnTitle()\" (detailsBtnClick)=\"detailsBtnClick.emit($event)\"></cmat-org-chart-designer>\r\n </div>\r\n }\r\n</div>",
437
+ styles: [".cmat-org-horizontal{padding:1em 0}.cmat-org-vertical{padding:0 1em}.cmat-org-border{border:.1em solid var(--cmat-divider);box-sizing:border-box}.cmat-org-box{padding:.5em 1em;border-radius:.2em;box-shadow:0 2px 8px #00000059}.cmat-org-connector-horizontal{width:1em!important;height:0!important}.cmat-org-connector-vertical{width:0!important;height:1em!important}.cmat-org .cmat-org-self-vertical{margin-bottom:2%}\n"],
438
+ dependencies: [{
439
+ kind: "component",
440
+ type: CmatChartDesignerComponent,
441
+ selector: "cmat-org-chart-designer",
442
+ inputs: [
443
+ "node",
444
+ "hasParent",
445
+ "enableControlHeight",
446
+ "direction",
447
+ "detailsBtnTitle"
448
+ ],
449
+ outputs: ["detailsBtnClick"],
450
+ exportAs: ["cmatOrgChartDesigner"]
451
+ }],
452
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
453
+ encapsulation: i0.ViewEncapsulation.None
454
+ });
455
+ }
456
+ };
457
+ i0.ɵɵngDeclareClassMetadata({
458
+ minVersion: "12.0.0",
459
+ version: "22.2.3",
460
+ ngImport: i0,
461
+ type: CmatOrgChartComponent,
462
+ decorators: [{
463
+ type: Component,
464
+ args: [{
465
+ selector: "cmat-org-chart",
466
+ encapsulation: ViewEncapsulation.None,
467
+ changeDetection: ChangeDetectionStrategy.OnPush,
468
+ exportAs: "cmatOrgChart",
469
+ imports: [CmatChartDesignerComponent],
470
+ template: "<div class=\"cmat-org\">\r\n @for (node of nodes(); track $index) {\r\n <div class=\"cmat-org-self-{{ direction() }}\">\r\n <cmat-org-chart-designer [node]=\"node\" [direction]=\"direction()\" [enableControlHeight]=\"enableControlHeight()\"\r\n [detailsBtnTitle]=\"detailsBtnTitle()\" (detailsBtnClick)=\"detailsBtnClick.emit($event)\"></cmat-org-chart-designer>\r\n </div>\r\n }\r\n</div>",
471
+ styles: [".cmat-org-horizontal{padding:1em 0}.cmat-org-vertical{padding:0 1em}.cmat-org-border{border:.1em solid var(--cmat-divider);box-sizing:border-box}.cmat-org-box{padding:.5em 1em;border-radius:.2em;box-shadow:0 2px 8px #00000059}.cmat-org-connector-horizontal{width:1em!important;height:0!important}.cmat-org-connector-vertical{width:0!important;height:1em!important}.cmat-org .cmat-org-self-vertical{margin-bottom:2%}\n"]
472
+ }]
473
+ }],
474
+ propDecorators: {
475
+ nodes: [{
476
+ type: i0.Input,
477
+ args: [{
478
+ isSignal: true,
479
+ alias: "nodes",
480
+ required: true
481
+ }]
482
+ }],
483
+ enableControlHeight: [{
484
+ type: i0.Input,
485
+ args: [{
486
+ isSignal: true,
487
+ alias: "enableControlHeight",
488
+ required: false
489
+ }]
490
+ }],
491
+ direction: [{
492
+ type: i0.Input,
493
+ args: [{
494
+ isSignal: true,
495
+ alias: "direction",
496
+ required: false
497
+ }]
498
+ }],
499
+ detailsBtnTitle: [{
500
+ type: i0.Input,
501
+ args: [{
502
+ isSignal: true,
503
+ alias: "detailsBtnTitle",
504
+ required: false
505
+ }]
506
+ }],
507
+ detailsBtnClick: [{
508
+ type: i0.Output,
509
+ args: ["detailsBtnClick"]
510
+ }]
511
+ }
512
+ });
513
+ var ChartNode = class ChartNode {
514
+ constructor(structure, parent) {
515
+ this.parent = parent;
516
+ const [name, ...reports] = structure;
517
+ this.name = name.split("(")[0].trim();
518
+ const titleMatch = /\(([^)]+)\)/.exec(name);
519
+ this.title = titleMatch?.[1].trim();
520
+ this.children = reports.map((r) => r.substring(1)).reduce((previous, current) => {
521
+ if (!current.startsWith(" ")) previous.push([]);
522
+ previous[previous.length - 1].push(current);
523
+ return previous;
524
+ }, []).map((r) => new ChartNode(r, this)) ?? [];
525
+ }
526
+ };
125
527
  export { ChartNode, CmatOrgChartComponent };
126
- //# sourceMappingURL=cmat-components-org-chart.mjs.map
528
+
529
+ //# sourceMappingURL=cmat-components-org-chart.mjs.map