cmat 0.0.110 → 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 +985 -669
  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 +39806 -22071
  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 -92
  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 -5194
@@ -1 +1 @@
1
- {"version":3,"file":"cmat-components-org-chart.mjs","sources":["../../../projects/cmat/components/org-chart/node/chart-node.component.ts","../../../projects/cmat/components/org-chart/node/chart-node.component.html","../../../projects/cmat/components/org-chart/designer/chart-designer.component.ts","../../../projects/cmat/components/org-chart/designer/chart-designer.component.html","../../../projects/cmat/components/org-chart/org-chart.component.ts","../../../projects/cmat/components/org-chart/org-chart.component.html","../../../projects/cmat/components/org-chart/node/node.type.ts","../../../projects/cmat/components/org-chart/cmat-components-org-chart.ts"],"sourcesContent":["import { NgClass } from '@angular/common';\r\nimport { ChangeDetectionStrategy, Component, input, output, computed, ViewEncapsulation } from '@angular/core';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { INode } from './node.type';\r\n\r\n@Component({\r\n selector: 'cmat-org-chart-node',\r\n templateUrl: './chart-node.component.html',\r\n styleUrls: ['./chart-node.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n exportAs: 'cmatOrgChartNode',\r\n imports: [NgClass, MatIconModule, MatButtonModule]\r\n})\r\nexport class CmatChartNodeComponent {\r\n readonly node = input.required<INode>();\r\n readonly hasParent = input<boolean>();\r\n readonly enableControlHeight = input<boolean>();\r\n readonly direction = input<'vertical' | 'horizontal'>('vertical');\r\n readonly detailsBtnTitle = input<string>();\r\n\r\n readonly detailsBtnClick = output<INode>();\r\n\r\n readonly containerClass = computed(() => `cmat-org-connector-${this.direction()} `);\r\n\r\n readonly connectorToParentHeight = computed(() => {\r\n const heightFactor = this.node().heightFactor;\r\n if (this.enableControlHeight() && heightFactor !== undefined && heightFactor > 0) {\r\n const maxHeightEm = 19.2;\r\n let newHeight = heightFactor * maxHeightEm;\r\n if (heightFactor >= 2) {\r\n newHeight -= heightFactor - 1;\r\n }\r\n return `${newHeight}em`;\r\n }\r\n return '1em';\r\n });\r\n}\r\n","<!-- 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}","import { ChangeDetectionStrategy, Component, forwardRef, HostBinding, input, output, computed, ViewEncapsulation } from '@angular/core';\r\nimport { CmatChartNodeComponent } from '../node/chart-node.component';\r\nimport { INode } from '../node/node.type';\r\n\r\n@Component({\r\n selector: 'cmat-org-chart-designer',\r\n templateUrl: './chart-designer.component.html',\r\n styleUrls: ['./chart-designer.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n exportAs: 'cmatOrgChartDesigner',\r\n imports: [CmatChartNodeComponent, forwardRef(() => CmatChartDesignerComponent)]\r\n})\r\nexport class CmatChartDesignerComponent {\r\n readonly node = input.required<INode>();\r\n readonly hasParent = input<boolean>(false);\r\n readonly enableControlHeight = input<boolean>();\r\n readonly direction = input<'vertical' | 'horizontal'>('vertical');\r\n readonly detailsBtnTitle = input<string>();\r\n\r\n readonly detailsBtnClick = output<INode>();\r\n\r\n readonly chartNodeClass = computed(() => `cmat-org-${this.direction()}`);\r\n\r\n\r\n @HostBinding('style.flex-direction')\r\n get hostFlexDirection(): string {\r\n return this.direction() === 'vertical' ? 'column' : '';\r\n }\r\n\r\n @HostBinding('style.width')\r\n get hostWidth(): string {\r\n return this.direction() === 'vertical' ? 'fit-content' : '';\r\n }\r\n\r\n}\r\n","<!-- 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>","import { ChangeDetectionStrategy, Component, input, output, ViewEncapsulation } from '@angular/core';\r\nimport { CmatChartDesignerComponent } from './designer/chart-designer.component';\r\nimport { INode } from './node/node.type';\r\n\r\n\r\n@Component({\r\n selector: 'cmat-org-chart',\r\n templateUrl: './org-chart.component.html',\r\n styleUrls: ['./org-chart.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n exportAs: 'cmatOrgChart',\r\n imports: [CmatChartDesignerComponent]\r\n})\r\nexport class CmatOrgChartComponent {\r\n readonly nodes = input.required<INode[]>();\r\n readonly enableControlHeight = input<boolean>(false);\r\n readonly direction = input<'vertical' | 'horizontal'>('vertical');\r\n readonly detailsBtnTitle = input<string>('查看详细');\r\n\r\n readonly detailsBtnClick = output<INode>();\r\n}","<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>","export interface INode {\r\n name: string;\r\n cssClass: string;\r\n image: string;\r\n title?: string;\r\n color?: string;\r\n showDetail: boolean;\r\n children: INode[];\r\n heightFactor?: number;\r\n}\r\n\r\nexport class ChartNode implements INode {\r\n name: string;\r\n cssClass: string;\r\n image: string;\r\n title?: string;\r\n color?: string;\r\n showDetail: boolean;\r\n children: ChartNode[];\r\n heightFactor?: number;\r\n parent?: ChartNode;\r\n\r\n constructor(structure: string[], parent?: ChartNode) {\r\n this.parent = parent;\r\n const [name, ...reports] = structure;\r\n this.name = name.split('(')[0].trim();\r\n const titleMatch = /\\(([^)]+)\\)/.exec(name);\r\n this.title = titleMatch?.[1].trim();\r\n\r\n this.children = reports.map(r => r.substring(1))\r\n .reduce((previous, current) => {\r\n if (!current.startsWith(' ')) {\r\n previous.push([]);\r\n }\r\n\r\n previous[previous.length - 1].push(current);\r\n return previous;\r\n }, [] as string[][])\r\n .map(r => new ChartNode(r, this)) ?? [];\r\n }\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;MAea,sBAAsB,CAAA;AATnC,IAAA,WAAA,GAAA;QAUa,IAAA,CAAA,IAAI,GAAG,KAAK,CAAC,QAAQ;iFAAS;AAC9B,QAAA,IAAA,CAAA,SAAS,GAAG,KAAK;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,CAAC,CAAC,QAAQ,EAAE,OAAO,KAAI;YAC1B,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE;AAC1B,gBAAA,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;YACrB;AAEA,YAAA,QAAQ,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC;AAC3C,YAAA,OAAO,QAAQ;QACnB,CAAC,EAAE,EAAgB;AAClB,aAAA,GAAG,CAAC,CAAC,IAAI,IAAI,SAAS,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,IAAI,EAAE;IAC/C;AACH;;ACxCD;;AAEG;;"}
1
+ {"version":3,"file":"cmat-components-org-chart.mjs","names":[],"sources":["../../../projects/cmat/components/org-chart/node/chart-node.component.ts","../../../projects/cmat/components/org-chart/node/chart-node.component.html","../../../projects/cmat/components/org-chart/designer/chart-designer.component.ts","../../../projects/cmat/components/org-chart/designer/chart-designer.component.html","../../../projects/cmat/components/org-chart/org-chart.component.ts","../../../projects/cmat/components/org-chart/org-chart.component.html","../../../projects/cmat/components/org-chart/node/node.type.ts"],"sourcesContent":["import { NgClass } from '@angular/common';\r\nimport { ChangeDetectionStrategy, Component, input, output, computed, ViewEncapsulation } from '@angular/core';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { INode } from './node.type';\r\n\r\n@Component({\r\n selector: 'cmat-org-chart-node',\r\n templateUrl: './chart-node.component.html',\r\n styleUrls: ['./chart-node.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n exportAs: 'cmatOrgChartNode',\r\n imports: [NgClass, MatIconModule, MatButtonModule]\r\n})\r\nexport class CmatChartNodeComponent {\r\n readonly node = input.required<INode>();\r\n readonly hasParent = input<boolean>();\r\n readonly enableControlHeight = input<boolean>();\r\n readonly direction = input<'vertical' | 'horizontal'>('vertical');\r\n readonly detailsBtnTitle = input<string>();\r\n\r\n readonly detailsBtnClick = output<INode>();\r\n\r\n readonly containerClass = computed(() => `cmat-org-connector-${this.direction()} `);\r\n\r\n readonly connectorToParentHeight = computed(() => {\r\n const heightFactor = this.node().heightFactor;\r\n if (this.enableControlHeight() && heightFactor !== undefined && heightFactor > 0) {\r\n const maxHeightEm = 19.2;\r\n let newHeight = heightFactor * maxHeightEm;\r\n if (heightFactor >= 2) {\r\n newHeight -= heightFactor - 1;\r\n }\r\n return `${newHeight}em`;\r\n }\r\n return '1em';\r\n });\r\n}\r\n","<!-- 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}","import { ChangeDetectionStrategy, Component, forwardRef, HostBinding, input, output, computed, ViewEncapsulation } from '@angular/core';\r\nimport { CmatChartNodeComponent } from '../node/chart-node.component';\r\nimport { INode } from '../node/node.type';\r\n\r\n@Component({\r\n selector: 'cmat-org-chart-designer',\r\n templateUrl: './chart-designer.component.html',\r\n styleUrls: ['./chart-designer.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n exportAs: 'cmatOrgChartDesigner',\r\n imports: [CmatChartNodeComponent, forwardRef(() => CmatChartDesignerComponent)]\r\n})\r\nexport class CmatChartDesignerComponent {\r\n readonly node = input.required<INode>();\r\n readonly hasParent = input<boolean>(false);\r\n readonly enableControlHeight = input<boolean>();\r\n readonly direction = input<'vertical' | 'horizontal'>('vertical');\r\n readonly detailsBtnTitle = input<string>();\r\n\r\n readonly detailsBtnClick = output<INode>();\r\n\r\n readonly chartNodeClass = computed(() => `cmat-org-${this.direction()}`);\r\n\r\n\r\n @HostBinding('style.flex-direction')\r\n get hostFlexDirection(): string {\r\n return this.direction() === 'vertical' ? 'column' : '';\r\n }\r\n\r\n @HostBinding('style.width')\r\n get hostWidth(): string {\r\n return this.direction() === 'vertical' ? 'fit-content' : '';\r\n }\r\n\r\n}\r\n","<!-- 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>","import { ChangeDetectionStrategy, Component, input, output, ViewEncapsulation } from '@angular/core';\r\nimport { CmatChartDesignerComponent } from './designer/chart-designer.component';\r\nimport { INode } from './node/node.type';\r\n\r\n\r\n@Component({\r\n selector: 'cmat-org-chart',\r\n templateUrl: './org-chart.component.html',\r\n styleUrls: ['./org-chart.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n exportAs: 'cmatOrgChart',\r\n imports: [CmatChartDesignerComponent]\r\n})\r\nexport class CmatOrgChartComponent {\r\n readonly nodes = input.required<INode[]>();\r\n readonly enableControlHeight = input<boolean>(false);\r\n readonly direction = input<'vertical' | 'horizontal'>('vertical');\r\n readonly detailsBtnTitle = input<string>('查看详细');\r\n\r\n readonly detailsBtnClick = output<INode>();\r\n}","<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>","export interface INode {\r\n name: string;\r\n cssClass: string;\r\n image: string;\r\n title?: string;\r\n color?: string;\r\n showDetail: boolean;\r\n children: INode[];\r\n heightFactor?: number;\r\n}\r\n\r\nexport class ChartNode implements INode {\r\n name: string;\r\n cssClass: string;\r\n image: string;\r\n title?: string;\r\n color?: string;\r\n showDetail: boolean;\r\n children: ChartNode[];\r\n heightFactor?: number;\r\n parent?: ChartNode;\r\n\r\n constructor(structure: string[], parent?: ChartNode) {\r\n this.parent = parent;\r\n const [name, ...reports] = structure;\r\n this.name = name.split('(')[0].trim();\r\n const titleMatch = /\\(([^)]+)\\)/.exec(name);\r\n this.title = titleMatch?.[1].trim();\r\n\r\n this.children = reports.map(r => r.substring(1))\r\n .reduce((previous, current) => {\r\n if (!current.startsWith(' ')) {\r\n previous.push([]);\r\n }\r\n\r\n previous[previous.length - 1].push(current);\r\n return previous;\r\n }, [] as string[][])\r\n .map(r => new ChartNode(r, this)) ?? [];\r\n }\r\n}\r\n"],"mappings":";;;;;;;AAeA,IAAa,yBAAb,MAAa,uBAAsB;CATnC,cAAA;EAUa,KAAA,OAAO,MAAM,SAAiB,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;EAC9B,KAAA,YAAY,MAAgB,GAAA,YAAA,CAAA,QAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;EAC5B,KAAA,sBAAsB,MAAgB,GAAA,YAAA,CAAA,QAAA,EAAA,WAAA,sBAAA,CAAA,+BAAA,CAAA,CAAA;EACtC,KAAA,YAAY,MAAiC,YAAW,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;EACxD,KAAA,kBAAkB,MAAe,GAAA,YAAA,CAAA,QAAA,EAAA,WAAA,kBAAA,CAAA,+BAAA,CAAA,CAAA;EAEjC,KAAA,kBAAkB,OAAM;EAExB,KAAA,iBAAiB,eAAe,sBAAsB,KAAK,UAAS,EAAE,IAAI,GAAA,YAAA,CAAA,EAAA,WAAA,iBAAA,CAAA,+BAAA,CAAA,CAAA;EAE1E,KAAA,0BAA0B,eAAc;GAC7C,MAAM,eAAe,KAAK,KAAI,CAAE,CAAC;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K,MAAM,GAAG,CAAC,CAAC,EAAE,CAAC,KAAI;EACnC,MAAM,aAAa,cAAc,KAAK,IAAI;EAC1C,KAAK,QAAQ,aAAa,EAAE,CAAC,KAAI;EAEjC,KAAK,WAAW,QAAQ,KAAI,MAAK,EAAE,UAAU,CAAC,CAAC,CAAC,CAC3C,QAAQ,UAAU,YAAW;GAC1B,IAAI,CAAC,QAAQ,WAAW,GAAG,GACvB,SAAS,KAAK,CAAA,CAAE;GAGpB,SAAS,SAAS,SAAS,EAAE,CAAC,KAAK,OAAO;GAC1C,OAAO;EACX,GAAG,CAAA,CAAgB,CAAC,CACnB,KAAI,MAAK,IAAI,UAAU,GAAG,IAAI,CAAC,KAAK,CAAA;CAC7C;AACH"}
@@ -1,33 +1,142 @@
1
- import { NgClass } from '@angular/common';
2
- import * as i0 from '@angular/core';
3
- import { input, computed, ChangeDetectionStrategy, ViewEncapsulation, Component } from '@angular/core';
4
-
5
- class CmatPageHeaderComponent {
6
- constructor() {
7
- this.title = input('页面标题', /* @ts-ignore */
8
- ...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
9
- this.description = input('', /* @ts-ignore */
10
- ...(ngDevMode ? [{ debugName: "description" }] : /* istanbul ignore next */ []));
11
- this.eyebrow = input('', /* @ts-ignore */
12
- ...(ngDevMode ? [{ debugName: "eyebrow" }] : /* istanbul ignore next */ []));
13
- this.divider = input(true, /* @ts-ignore */
14
- ...(ngDevMode ? [{ debugName: "divider" }] : /* istanbul ignore next */ []));
15
- this.align = input('start', /* @ts-ignore */
16
- ...(ngDevMode ? [{ debugName: "align" }] : /* istanbul ignore next */ []));
17
- this.isCentered = computed(() => this.align() === 'center', /* @ts-ignore */
18
- ...(ngDevMode ? [{ debugName: "isCentered" }] : /* istanbul ignore next */ []));
19
- }
20
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: CmatPageHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
21
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.0", type: CmatPageHeaderComponent, isStandalone: true, selector: "cmat-page-header", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, eyebrow: { classPropertyName: "eyebrow", publicName: "eyebrow", isSignal: true, isRequired: false, transformFunction: null }, divider: { classPropertyName: "divider", publicName: "divider", isSignal: true, isRequired: false, transformFunction: null }, align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<section\r\n class=\"border-b border-default pb-4\"\r\n [ngClass]=\"isCentered() ? 'flex flex-col items-center gap-4 text-center' : 'flex flex-col gap-4 md:flex-row md:items-end md:justify-between'\"\r\n>\r\n <div class=\"min-w-0\">\r\n @if (eyebrow()) {\r\n <p class=\"text-xs font-semibold uppercase tracking-[0.2em] text-primary\">{{ eyebrow() }}</p>\r\n }\r\n\r\n <h1 class=\"mt-1 text-2xl font-semibold text-default\">{{ title() }}</h1>\r\n\r\n @if (description()) {\r\n <p class=\"mt-2 max-w-3xl text-sm leading-6 text-secondary\">{{ description() }}</p>\r\n }\r\n </div>\r\n\r\n <div [ngClass]=\"isCentered() ? 'flex items-center justify-center gap-2' : 'flex items-center gap-2 md:ml-auto'\">\r\n <ng-content select=\"[cmatPageHeaderActions]\"></ng-content>\r\n </div>\r\n</section>\r\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
22
- }
23
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: CmatPageHeaderComponent, decorators: [{
24
- type: Component,
25
- args: [{ selector: 'cmat-page-header', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [NgClass], template: "<section\r\n class=\"border-b border-default pb-4\"\r\n [ngClass]=\"isCentered() ? 'flex flex-col items-center gap-4 text-center' : 'flex flex-col gap-4 md:flex-row md:items-end md:justify-between'\"\r\n>\r\n <div class=\"min-w-0\">\r\n @if (eyebrow()) {\r\n <p class=\"text-xs font-semibold uppercase tracking-[0.2em] text-primary\">{{ eyebrow() }}</p>\r\n }\r\n\r\n <h1 class=\"mt-1 text-2xl font-semibold text-default\">{{ title() }}</h1>\r\n\r\n @if (description()) {\r\n <p class=\"mt-2 max-w-3xl text-sm leading-6 text-secondary\">{{ description() }}</p>\r\n }\r\n </div>\r\n\r\n <div [ngClass]=\"isCentered() ? 'flex items-center justify-center gap-2' : 'flex items-center gap-2 md:ml-auto'\">\r\n <ng-content select=\"[cmatPageHeaderActions]\"></ng-content>\r\n </div>\r\n</section>\r\n", styles: [":host{display:block}\n"] }]
26
- }], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], description: [{ type: i0.Input, args: [{ isSignal: true, alias: "description", required: false }] }], eyebrow: [{ type: i0.Input, args: [{ isSignal: true, alias: "eyebrow", required: false }] }], divider: [{ type: i0.Input, args: [{ isSignal: true, alias: "divider", required: false }] }], align: [{ type: i0.Input, args: [{ isSignal: true, alias: "align", required: false }] }] } });
27
-
28
- /**
29
- * Generated bundle index. Do not edit.
30
- */
31
-
1
+ import { NgClass } from "@angular/common";
2
+ import * as i0 from "@angular/core";
3
+ import { ChangeDetectionStrategy, Component, ViewEncapsulation, computed, input } from "@angular/core";
4
+ var CmatPageHeaderComponent = class CmatPageHeaderComponent {
5
+ constructor() {
6
+ this.title = input("页面标题", ...ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []);
7
+ this.description = input("", ...ngDevMode ? [{ debugName: "description" }] : /* istanbul ignore next */ []);
8
+ this.eyebrow = input("", ...ngDevMode ? [{ debugName: "eyebrow" }] : /* istanbul ignore next */ []);
9
+ this.divider = input(true, ...ngDevMode ? [{ debugName: "divider" }] : /* istanbul ignore next */ []);
10
+ this.align = input("start", ...ngDevMode ? [{ debugName: "align" }] : /* istanbul ignore next */ []);
11
+ this.isCentered = computed(() => this.align() === "center", ...ngDevMode ? [{ debugName: "isCentered" }] : /* istanbul ignore next */ []);
12
+ }
13
+ static {
14
+ this.ɵfac = i0.ɵɵngDeclareFactory({
15
+ minVersion: "12.0.0",
16
+ version: "22.2.3",
17
+ ngImport: i0,
18
+ type: CmatPageHeaderComponent,
19
+ deps: [],
20
+ target: i0.ɵɵFactoryTarget.Component
21
+ });
22
+ }
23
+ static {
24
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
25
+ minVersion: "17.0.0",
26
+ version: "22.2.3",
27
+ type: CmatPageHeaderComponent,
28
+ isStandalone: true,
29
+ selector: "cmat-page-header",
30
+ inputs: {
31
+ title: {
32
+ classPropertyName: "title",
33
+ publicName: "title",
34
+ isSignal: true,
35
+ isRequired: false,
36
+ transformFunction: null
37
+ },
38
+ description: {
39
+ classPropertyName: "description",
40
+ publicName: "description",
41
+ isSignal: true,
42
+ isRequired: false,
43
+ transformFunction: null
44
+ },
45
+ eyebrow: {
46
+ classPropertyName: "eyebrow",
47
+ publicName: "eyebrow",
48
+ isSignal: true,
49
+ isRequired: false,
50
+ transformFunction: null
51
+ },
52
+ divider: {
53
+ classPropertyName: "divider",
54
+ publicName: "divider",
55
+ isSignal: true,
56
+ isRequired: false,
57
+ transformFunction: null
58
+ },
59
+ align: {
60
+ classPropertyName: "align",
61
+ publicName: "align",
62
+ isSignal: true,
63
+ isRequired: false,
64
+ transformFunction: null
65
+ }
66
+ },
67
+ ngImport: i0,
68
+ template: "<section\r\n class=\"border-b border-default pb-4\"\r\n [ngClass]=\"isCentered() ? 'flex flex-col items-center gap-4 text-center' : 'flex flex-col gap-4 md:flex-row md:items-end md:justify-between'\"\r\n>\r\n <div class=\"min-w-0\">\r\n @if (eyebrow()) {\r\n <p class=\"text-xs font-semibold uppercase tracking-[0.2em] text-primary\">{{ eyebrow() }}</p>\r\n }\r\n\r\n <h1 class=\"mt-1 text-2xl font-semibold text-default\">{{ title() }}</h1>\r\n\r\n @if (description()) {\r\n <p class=\"mt-2 max-w-3xl text-sm leading-6 text-secondary\">{{ description() }}</p>\r\n }\r\n </div>\r\n\r\n <div [ngClass]=\"isCentered() ? 'flex items-center justify-center gap-2' : 'flex items-center gap-2 md:ml-auto'\">\r\n <ng-content select=\"[cmatPageHeaderActions]\"></ng-content>\r\n </div>\r\n</section>\r\n",
69
+ styles: [":host{display:block}\n"],
70
+ dependencies: [{
71
+ kind: "directive",
72
+ type: NgClass,
73
+ selector: "[ngClass]",
74
+ inputs: ["class", "ngClass"]
75
+ }],
76
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
77
+ encapsulation: i0.ViewEncapsulation.None
78
+ });
79
+ }
80
+ };
81
+ i0.ɵɵngDeclareClassMetadata({
82
+ minVersion: "12.0.0",
83
+ version: "22.2.3",
84
+ ngImport: i0,
85
+ type: CmatPageHeaderComponent,
86
+ decorators: [{
87
+ type: Component,
88
+ args: [{
89
+ selector: "cmat-page-header",
90
+ encapsulation: ViewEncapsulation.None,
91
+ changeDetection: ChangeDetectionStrategy.OnPush,
92
+ imports: [NgClass],
93
+ template: "<section\r\n class=\"border-b border-default pb-4\"\r\n [ngClass]=\"isCentered() ? 'flex flex-col items-center gap-4 text-center' : 'flex flex-col gap-4 md:flex-row md:items-end md:justify-between'\"\r\n>\r\n <div class=\"min-w-0\">\r\n @if (eyebrow()) {\r\n <p class=\"text-xs font-semibold uppercase tracking-[0.2em] text-primary\">{{ eyebrow() }}</p>\r\n }\r\n\r\n <h1 class=\"mt-1 text-2xl font-semibold text-default\">{{ title() }}</h1>\r\n\r\n @if (description()) {\r\n <p class=\"mt-2 max-w-3xl text-sm leading-6 text-secondary\">{{ description() }}</p>\r\n }\r\n </div>\r\n\r\n <div [ngClass]=\"isCentered() ? 'flex items-center justify-center gap-2' : 'flex items-center gap-2 md:ml-auto'\">\r\n <ng-content select=\"[cmatPageHeaderActions]\"></ng-content>\r\n </div>\r\n</section>\r\n",
94
+ styles: [":host{display:block}\n"]
95
+ }]
96
+ }],
97
+ propDecorators: {
98
+ title: [{
99
+ type: i0.Input,
100
+ args: [{
101
+ isSignal: true,
102
+ alias: "title",
103
+ required: false
104
+ }]
105
+ }],
106
+ description: [{
107
+ type: i0.Input,
108
+ args: [{
109
+ isSignal: true,
110
+ alias: "description",
111
+ required: false
112
+ }]
113
+ }],
114
+ eyebrow: [{
115
+ type: i0.Input,
116
+ args: [{
117
+ isSignal: true,
118
+ alias: "eyebrow",
119
+ required: false
120
+ }]
121
+ }],
122
+ divider: [{
123
+ type: i0.Input,
124
+ args: [{
125
+ isSignal: true,
126
+ alias: "divider",
127
+ required: false
128
+ }]
129
+ }],
130
+ align: [{
131
+ type: i0.Input,
132
+ args: [{
133
+ isSignal: true,
134
+ alias: "align",
135
+ required: false
136
+ }]
137
+ }]
138
+ }
139
+ });
32
140
  export { CmatPageHeaderComponent };
33
- //# sourceMappingURL=cmat-components-page-header.mjs.map
141
+
142
+ //# sourceMappingURL=cmat-components-page-header.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"cmat-components-page-header.mjs","sources":["../../../projects/cmat/components/page-header/page-header.component.ts","../../../projects/cmat/components/page-header/page-header.component.html","../../../projects/cmat/components/page-header/cmat-components-page-header.ts"],"sourcesContent":["import { NgClass } from '@angular/common';\r\nimport { ChangeDetectionStrategy, Component, input, computed, ViewEncapsulation } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'cmat-page-header',\r\n templateUrl: './page-header.component.html',\r\n styleUrls: ['./page-header.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n imports: [NgClass]\r\n})\r\nexport class CmatPageHeaderComponent {\r\n readonly title = input<string>('页面标题');\r\n readonly description = input<string>('');\r\n readonly eyebrow = input<string>('');\r\n readonly divider = input<boolean>(true);\r\n readonly align = input<'start' | 'center'>('start');\r\n\r\n readonly isCentered = computed(() => this.align() === 'center');\r\n}\r\n","<section\r\n class=\"border-b border-default pb-4\"\r\n [ngClass]=\"isCentered() ? 'flex flex-col items-center gap-4 text-center' : 'flex flex-col gap-4 md:flex-row md:items-end md:justify-between'\"\r\n>\r\n <div class=\"min-w-0\">\r\n @if (eyebrow()) {\r\n <p class=\"text-xs font-semibold uppercase tracking-[0.2em] text-primary\">{{ eyebrow() }}</p>\r\n }\r\n\r\n <h1 class=\"mt-1 text-2xl font-semibold text-default\">{{ title() }}</h1>\r\n\r\n @if (description()) {\r\n <p class=\"mt-2 max-w-3xl text-sm leading-6 text-secondary\">{{ description() }}</p>\r\n }\r\n </div>\r\n\r\n <div [ngClass]=\"isCentered() ? 'flex items-center justify-center gap-2' : 'flex items-center gap-2 md:ml-auto'\">\r\n <ng-content select=\"[cmatPageHeaderActions]\"></ng-content>\r\n </div>\r\n</section>\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MAWa,uBAAuB,CAAA;AARpC,IAAA,WAAA,GAAA;QASa,IAAA,CAAA,KAAK,GAAG,KAAK,CAAS,MAAM;kFAAC;QAC7B,IAAA,CAAA,WAAW,GAAG,KAAK,CAAS,EAAE;wFAAC;QAC/B,IAAA,CAAA,OAAO,GAAG,KAAK,CAAS,EAAE;oFAAC;QAC3B,IAAA,CAAA,OAAO,GAAG,KAAK,CAAU,IAAI;oFAAC;QAC9B,IAAA,CAAA,KAAK,GAAG,KAAK,CAAqB,OAAO;kFAAC;QAE1C,IAAA,CAAA,UAAU,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,KAAK,EAAE,KAAK,QAAQ;uFAAC;AAClE,IAAA;8GARY,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAAvB,uBAAuB,EAAA,YAAA,EAAA,IA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b,iBAAiB,CAAC,IAAI,EAAA,eAAA,EACpB,uBAAuB,CAAC,MAAM,EAAA,OAAA,EACtC,CAAC,OAAO,CAAC,EAAA,QAAA,EAAA,82BAAA,EAAA,MAAA,EAAA,CAAA,wBAAA,CAAA,EAAA;;;AETtB;;AAEG;;"}
1
+ {"version":3,"file":"cmat-components-page-header.mjs","names":[],"sources":["../../../projects/cmat/components/page-header/page-header.component.ts","../../../projects/cmat/components/page-header/page-header.component.html"],"sourcesContent":["import { NgClass } from '@angular/common';\r\nimport { ChangeDetectionStrategy, Component, input, computed, ViewEncapsulation } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'cmat-page-header',\r\n templateUrl: './page-header.component.html',\r\n styleUrls: ['./page-header.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n imports: [NgClass]\r\n})\r\nexport class CmatPageHeaderComponent {\r\n readonly title = input<string>('页面标题');\r\n readonly description = input<string>('');\r\n readonly eyebrow = input<string>('');\r\n readonly divider = input<boolean>(true);\r\n readonly align = input<'start' | 'center'>('start');\r\n\r\n readonly isCentered = computed(() => this.align() === 'center');\r\n}\r\n","<section\r\n class=\"border-b border-default pb-4\"\r\n [ngClass]=\"isCentered() ? 'flex flex-col items-center gap-4 text-center' : 'flex flex-col gap-4 md:flex-row md:items-end md:justify-between'\"\r\n>\r\n <div class=\"min-w-0\">\r\n @if (eyebrow()) {\r\n <p class=\"text-xs font-semibold uppercase tracking-[0.2em] text-primary\">{{ eyebrow() }}</p>\r\n }\r\n\r\n <h1 class=\"mt-1 text-2xl font-semibold text-default\">{{ title() }}</h1>\r\n\r\n @if (description()) {\r\n <p class=\"mt-2 max-w-3xl text-sm leading-6 text-secondary\">{{ description() }}</p>\r\n }\r\n </div>\r\n\r\n <div [ngClass]=\"isCentered() ? 'flex items-center justify-center gap-2' : 'flex items-center gap-2 md:ml-auto'\">\r\n <ng-content select=\"[cmatPageHeaderActions]\"></ng-content>\r\n </div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