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 +1 @@
1
- {"version":3,"file":"cmat-components-drawer.mjs","sources":["../../../projects/cmat/components/drawer/drawer.service.ts","../../../projects/cmat/components/drawer/drawer.component.ts","../../../projects/cmat/components/drawer/drawer.component.html","../../../projects/cmat/components/drawer/cmat-components-drawer.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\r\nimport { CmatDrawerComponent } from './drawer.component';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class CmatDrawerService {\r\n private _componentRegistry: Map<string, CmatDrawerComponent> = new Map<string, CmatDrawerComponent>();\r\n \r\n registerComponent(name: string, component: CmatDrawerComponent): void {\r\n this._componentRegistry.set(name, component);\r\n }\r\n\r\n \r\n deregisterComponent(name: string): void {\r\n this._componentRegistry.delete(name);\r\n }\r\n\r\n \r\n getComponent(name: string): CmatDrawerComponent | void {\r\n return this._componentRegistry.get(name);\r\n }\r\n}\r\n","/* eslint-disable @typescript-eslint/naming-convention */\r\nimport { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';\r\nimport {\r\n ChangeDetectionStrategy,\r\n Component,\r\n ElementRef,\r\n inject,\r\n input,\r\n output,\r\n OnInit,\r\n OnDestroy,\r\n effect,\r\n Renderer2,\r\n ViewEncapsulation,\r\n signal,\r\n untracked,\r\n} from '@angular/core';\r\nimport { CmatUtilsService } from 'cmat/services/utils';\r\nimport { CmatDrawerService } from './drawer.service';\r\nimport { CmatDrawerMode, CmatDrawerPosition } from './drawer.types';\r\n\r\n@Component({\r\n selector: 'cmat-drawer',\r\n templateUrl: './drawer.component.html',\r\n styleUrls: ['./drawer.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n exportAs: 'cmatDrawer',\r\n host: {\r\n '[class.cmat-drawer-animations-enabled]': '_animationsEnabled()',\r\n '[class.cmat-drawer-fixed]': 'fixed()',\r\n '[class.cmat-drawer-hover]': '_hovered()',\r\n '[class.cmat-drawer-opened]': 'opened()',\r\n '[class.cmat-drawer-mode-side]': 'mode() === \\'side\\'',\r\n '[class.cmat-drawer-mode-over]': 'mode() === \\'over\\'',\r\n '[class.cmat-drawer-position-left]': 'position() === \\'left\\'',\r\n '[class.cmat-drawer-position-right]': 'position() === \\'right\\'',\r\n '[style.visibility]': 'opened() ? \"visible\" : \"hidden\"',\r\n '(mouseenter)': 'onMouseenter()',\r\n '(mouseleave)': 'onMouseleave()'\r\n }\r\n})\r\nexport class CmatDrawerComponent implements OnInit, OnDestroy {\r\n readonly refreshVersion = signal(0);\r\n\r\n readonly fixed = input<boolean, BooleanInput>(false, {\r\n transform: coerceBooleanProperty\r\n });\r\n readonly mode = input<CmatDrawerMode>('side');\r\n readonly name = input<string>();\r\n readonly opened = input<boolean, BooleanInput>(false, {\r\n transform: coerceBooleanProperty\r\n });\r\n readonly position = input<CmatDrawerPosition>('left');\r\n readonly transparentOverlay = input<boolean, BooleanInput>(false, {\r\n transform: coerceBooleanProperty\r\n });\r\n\r\n readonly fixedChanged = output<boolean>();\r\n readonly modeChanged = output<CmatDrawerMode>();\r\n readonly openedChanged = output<boolean>();\r\n readonly positionChanged = output<CmatDrawerPosition>();\r\n\r\n\r\n private readonly _utilsService = inject(CmatUtilsService);\r\n private readonly _elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\r\n private readonly _renderer2 = inject(Renderer2);\r\n private readonly _cmatDrawerService = inject(CmatDrawerService);\r\n\r\n private readonly _resolvedName = signal<string>('');\r\n private readonly _animationsEnabled = signal<boolean>(false);\r\n private readonly _hovered = signal<boolean>(false);\r\n\r\n private _overlay: HTMLElement | null = null;\r\n private _overlayClickDestroyFn: (() => void) | null = null;\r\n private _overlayLeaveTimeoutId: number | null = null;\r\n private _modeChangeTimeoutId: number | null = null;\r\n\r\n constructor() {\r\n effect(() => {\r\n this.fixedChanged.emit(this.fixed());\r\n });\r\n\r\n let previousMode: CmatDrawerMode | undefined;\r\n effect(() => {\r\n const currentMode = this.mode();\r\n untracked(() => {\r\n if (previousMode !== undefined && previousMode !== currentMode) {\r\n this._handleModeChange(previousMode, currentMode);\r\n }\r\n previousMode = currentMode;\r\n this.modeChanged.emit(currentMode);\r\n });\r\n });\r\n\r\n effect(() => {\r\n this.positionChanged.emit(this.position());\r\n });\r\n\r\n let previousOpened: boolean | undefined;\r\n effect(() => {\r\n const isOpen = this.opened();\r\n untracked(() => {\r\n if (previousOpened !== undefined && previousOpened !== isOpen) {\r\n this._toggleOpened(isOpen);\r\n }\r\n previousOpened = isOpen;\r\n });\r\n });\r\n }\r\n\r\n ngOnInit(): void {\r\n const providedName = this.name();\r\n const finalName = providedName ?? this._utilsService.randomId();\r\n this._resolvedName.set(finalName);\r\n\r\n this._cmatDrawerService.registerComponent(finalName, this);\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this._cmatDrawerService.deregisterComponent(this._resolvedName());\r\n this._cleanupOverlay();\r\n if (this._modeChangeTimeoutId !== null) {\r\n clearTimeout(this._modeChangeTimeoutId);\r\n this._modeChangeTimeoutId = null;\r\n }\r\n }\r\n\r\n open(): void {\r\n if (this.opened()) {\r\n return;\r\n }\r\n this._toggleOpened(true);\r\n }\r\n\r\n close(): void {\r\n if (!this.opened()) {\r\n return;\r\n }\r\n this._toggleOpened(false);\r\n }\r\n\r\n toggle(): void {\r\n if (this.opened()) {\r\n this.close();\r\n } else {\r\n this.open();\r\n }\r\n }\r\n\r\n onMouseenter(): void {\r\n this._enableAnimations();\r\n this._hovered.set(true);\r\n }\r\n\r\n onMouseleave(): void {\r\n this._enableAnimations();\r\n this._hovered.set(false);\r\n }\r\n\r\n private _handleModeChange(previousMode: CmatDrawerMode, currentMode: CmatDrawerMode): void {\r\n this._disableAnimations();\r\n\r\n if (previousMode === 'over' && currentMode === 'side') {\r\n this._hideOverlay();\r\n }\r\n\r\n if (previousMode === 'side' && currentMode === 'over') {\r\n if (this.opened()) {\r\n this._showOverlay();\r\n }\r\n }\r\n\r\n this._modeChangeTimeoutId = window.setTimeout(() => {\r\n this._modeChangeTimeoutId = null;\r\n this._enableAnimations();\r\n }, 500);\r\n }\r\n\r\n private _toggleOpened(open: boolean): void {\r\n this._enableAnimations();\r\n\r\n if (this.mode() === 'over') {\r\n if (open) {\r\n this._showOverlay();\r\n } else {\r\n this._hideOverlay();\r\n }\r\n }\r\n\r\n this.refreshVersion.update(value => value + 1);\r\n this.openedChanged.emit(open);\r\n }\r\n\r\n private _removeOverlayElement(): void {\r\n if (this._overlayClickDestroyFn) {\r\n this._overlayClickDestroyFn();\r\n this._overlayClickDestroyFn = null;\r\n }\r\n if (this._overlay) {\r\n this._overlay.parentNode?.removeChild(this._overlay);\r\n this._overlay = null;\r\n }\r\n }\r\n\r\n private _cleanupOverlay(): void {\r\n this._clearOverlayLeaveTimeout();\r\n this._removeOverlayElement();\r\n }\r\n\r\n private _clearOverlayLeaveTimeout(): void {\r\n if (this._overlayLeaveTimeoutId !== null) {\r\n clearTimeout(this._overlayLeaveTimeoutId);\r\n this._overlayLeaveTimeoutId = null;\r\n }\r\n }\r\n\r\n private _enableAnimations(): void {\r\n if (this._animationsEnabled()) {\r\n return;\r\n }\r\n this._animationsEnabled.set(true);\r\n }\r\n\r\n private _disableAnimations(): void {\r\n if (!this._animationsEnabled()) {\r\n return;\r\n }\r\n this._animationsEnabled.set(false);\r\n }\r\n\r\n private _showOverlay(): void {\r\n this._cleanupOverlay();\r\n\r\n this._overlay = this._renderer2.createElement('div') as HTMLElement;\r\n if (!this._overlay) {\r\n return;\r\n }\r\n this._overlay.classList.add('cmat-drawer-overlay');\r\n if (this.fixed()) {\r\n this._overlay.classList.add('cmat-drawer-overlay-fixed');\r\n }\r\n if (this.transparentOverlay()) {\r\n this._overlay.classList.add('cmat-drawer-overlay-transparent');\r\n }\r\n\r\n const parentEl = this._elementRef.nativeElement.parentElement;\r\n if (parentEl) {\r\n this._renderer2.appendChild(parentEl, this._overlay);\r\n }\r\n\r\n this._overlay.classList.add('cmat-drawer-overlay-enter');\r\n\r\n this._overlayClickDestroyFn = this._renderer2.listen(this._overlay, 'click', () => {\r\n this.close();\r\n });\r\n }\r\n\r\n private _hideOverlay(): void {\r\n if (!this._overlay) {\r\n return;\r\n }\r\n\r\n this._overlay.classList.remove('cmat-drawer-overlay-enter');\r\n\r\n const overlay = this._overlay;\r\n const handleAnimationEnd = (event: AnimationEvent): void => {\r\n if (event.animationName === 'drawer-overlay-leave') {\r\n overlay.removeEventListener('animationend', handleAnimationEnd);\r\n this._clearOverlayLeaveTimeout();\r\n this._removeOverlayElement();\r\n }\r\n };\r\n\r\n overlay.addEventListener('animationend', handleAnimationEnd);\r\n overlay.classList.add('cmat-drawer-overlay-leave');\r\n\r\n this._overlayLeaveTimeoutId = window.setTimeout(() => {\r\n this._overlayLeaveTimeoutId = null;\r\n overlay.removeEventListener('animationend', handleAnimationEnd);\r\n this._removeOverlayElement();\r\n }, 400);\r\n }\r\n}","<div class=\"cmat-drawer-content\">\r\n <ng-content></ng-content>\r\n</div>\r\n<div class=\"cmat-drawer-wrapper\" [attr.data-refresh]=\"refreshVersion()\" [class.cmat-drawer-opened]=\"opened()\">\r\n</div>\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MAMa,iBAAiB,CAAA;AAH9B,IAAA,WAAA,GAAA;AAIY,QAAA,IAAA,CAAA,kBAAkB,GAAqC,IAAI,GAAG,EAA+B;AAexG,IAAA;IAbG,iBAAiB,CAAC,IAAY,EAAE,SAA8B,EAAA;QAC1D,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,IAAI,EAAE,SAAS,CAAC;IAChD;AAGA,IAAA,mBAAmB,CAAC,IAAY,EAAA;AAC5B,QAAA,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,IAAI,CAAC;IACxC;AAGA,IAAA,YAAY,CAAC,IAAY,EAAA;QACrB,OAAO,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,IAAI,CAAC;IAC5C;8GAfS,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAjB,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,cAFd,MAAM,EAAA,CAAA,CAAA;;2FAET,iBAAiB,EAAA,UAAA,EAAA,CAAA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AAA,EAAA,mBAAmB,kjDC1ChC,sNAKA,EAAA,MAAA,EAAA,CAAA,2vEAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;2FDqCa,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBArB/B,SAAS;+BACI,aAAa,EAAA,aAAA,EAGR,iBAAiB,CAAC,IAAI,EAAA,eAAA,EACpB,uBAAuB,CAAC,MAAM,EAAA,QAAA,EACrC,YAAY,EAAA,IAAA,EAChB;AACF,wBAAA,wCAAwC,EAAE,sBAAsB;AAChE,wBAAA,2BAA2B,EAAE,SAAS;AACtC,wBAAA,2BAA2B,EAAE,YAAY;AACzC,wBAAA,4BAA4B,EAAE,UAAU;AACxC,wBAAA,+BAA+B,EAAE,qBAAqB;AACtD,wBAAA,+BAA+B,EAAE,qBAAqB;AACtD,wBAAA,mCAAmC,EAAE,yBAAyB;AAC9D,wBAAA,oCAAoC,EAAE,0BAA0B;AAChE,wBAAA,oBAAoB,EAAE,iCAAiC;AACvD,wBAAA,cAAc,EAAE,gBAAgB;AAChC,wBAAA,cAAc,EAAE;AACnB,qBAAA,EAAA,QAAA,EAAA,sNAAA,EAAA,MAAA,EAAA,CAAA,2vEAAA,CAAA,EAAA;;;AExCL;;AAEG;;"}
1
+ {"version":3,"file":"cmat-components-drawer.mjs","names":[],"sources":["../../../projects/cmat/components/drawer/drawer.service.ts","../../../projects/cmat/components/drawer/drawer.component.ts","../../../projects/cmat/components/drawer/drawer.component.html"],"sourcesContent":["import { Injectable } from '@angular/core';\r\nimport { CmatDrawerComponent } from './drawer.component';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class CmatDrawerService {\r\n private _componentRegistry: Map<string, CmatDrawerComponent> = new Map<string, CmatDrawerComponent>();\r\n \r\n registerComponent(name: string, component: CmatDrawerComponent): void {\r\n this._componentRegistry.set(name, component);\r\n }\r\n\r\n \r\n deregisterComponent(name: string): void {\r\n this._componentRegistry.delete(name);\r\n }\r\n\r\n \r\n getComponent(name: string): CmatDrawerComponent | void {\r\n return this._componentRegistry.get(name);\r\n }\r\n}\r\n","/* eslint-disable @typescript-eslint/naming-convention */\r\nimport { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';\r\nimport {\r\n ChangeDetectionStrategy,\r\n Component,\r\n ElementRef,\r\n inject,\r\n input,\r\n output,\r\n OnInit,\r\n OnDestroy,\r\n effect,\r\n Renderer2,\r\n ViewEncapsulation,\r\n signal,\r\n untracked,\r\n} from '@angular/core';\r\nimport { CmatUtilsService } from 'cmat/services/utils';\r\nimport { CmatDrawerService } from './drawer.service';\r\nimport { CmatDrawerMode, CmatDrawerPosition } from './drawer.types';\r\n\r\n@Component({\r\n selector: 'cmat-drawer',\r\n templateUrl: './drawer.component.html',\r\n styleUrls: ['./drawer.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n exportAs: 'cmatDrawer',\r\n host: {\r\n '[class.cmat-drawer-animations-enabled]': '_animationsEnabled()',\r\n '[class.cmat-drawer-fixed]': 'fixed()',\r\n '[class.cmat-drawer-hover]': '_hovered()',\r\n '[class.cmat-drawer-opened]': 'opened()',\r\n '[class.cmat-drawer-mode-side]': 'mode() === \\'side\\'',\r\n '[class.cmat-drawer-mode-over]': 'mode() === \\'over\\'',\r\n '[class.cmat-drawer-position-left]': 'position() === \\'left\\'',\r\n '[class.cmat-drawer-position-right]': 'position() === \\'right\\'',\r\n '[style.visibility]': 'opened() ? \"visible\" : \"hidden\"',\r\n '(mouseenter)': 'onMouseenter()',\r\n '(mouseleave)': 'onMouseleave()'\r\n }\r\n})\r\nexport class CmatDrawerComponent implements OnInit, OnDestroy {\r\n readonly refreshVersion = signal(0);\r\n\r\n readonly fixed = input<boolean, BooleanInput>(false, {\r\n transform: coerceBooleanProperty\r\n });\r\n readonly mode = input<CmatDrawerMode>('side');\r\n readonly name = input<string>();\r\n readonly opened = input<boolean, BooleanInput>(false, {\r\n transform: coerceBooleanProperty\r\n });\r\n readonly position = input<CmatDrawerPosition>('left');\r\n readonly transparentOverlay = input<boolean, BooleanInput>(false, {\r\n transform: coerceBooleanProperty\r\n });\r\n\r\n readonly fixedChanged = output<boolean>();\r\n readonly modeChanged = output<CmatDrawerMode>();\r\n readonly openedChanged = output<boolean>();\r\n readonly positionChanged = output<CmatDrawerPosition>();\r\n\r\n\r\n private readonly _utilsService = inject(CmatUtilsService);\r\n private readonly _elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\r\n private readonly _renderer2 = inject(Renderer2);\r\n private readonly _cmatDrawerService = inject(CmatDrawerService);\r\n\r\n private readonly _resolvedName = signal<string>('');\r\n private readonly _animationsEnabled = signal<boolean>(false);\r\n private readonly _hovered = signal<boolean>(false);\r\n\r\n private _overlay: HTMLElement | null = null;\r\n private _overlayClickDestroyFn: (() => void) | null = null;\r\n private _overlayLeaveTimeoutId: number | null = null;\r\n private _modeChangeTimeoutId: number | null = null;\r\n\r\n constructor() {\r\n effect(() => {\r\n this.fixedChanged.emit(this.fixed());\r\n });\r\n\r\n let previousMode: CmatDrawerMode | undefined;\r\n effect(() => {\r\n const currentMode = this.mode();\r\n untracked(() => {\r\n if (previousMode !== undefined && previousMode !== currentMode) {\r\n this._handleModeChange(previousMode, currentMode);\r\n }\r\n previousMode = currentMode;\r\n this.modeChanged.emit(currentMode);\r\n });\r\n });\r\n\r\n effect(() => {\r\n this.positionChanged.emit(this.position());\r\n });\r\n\r\n let previousOpened: boolean | undefined;\r\n effect(() => {\r\n const isOpen = this.opened();\r\n untracked(() => {\r\n if (previousOpened !== undefined && previousOpened !== isOpen) {\r\n this._toggleOpened(isOpen);\r\n }\r\n previousOpened = isOpen;\r\n });\r\n });\r\n }\r\n\r\n ngOnInit(): void {\r\n const providedName = this.name();\r\n const finalName = providedName ?? this._utilsService.randomId();\r\n this._resolvedName.set(finalName);\r\n\r\n this._cmatDrawerService.registerComponent(finalName, this);\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this._cmatDrawerService.deregisterComponent(this._resolvedName());\r\n this._cleanupOverlay();\r\n if (this._modeChangeTimeoutId !== null) {\r\n clearTimeout(this._modeChangeTimeoutId);\r\n this._modeChangeTimeoutId = null;\r\n }\r\n }\r\n\r\n open(): void {\r\n if (this.opened()) {\r\n return;\r\n }\r\n this._toggleOpened(true);\r\n }\r\n\r\n close(): void {\r\n if (!this.opened()) {\r\n return;\r\n }\r\n this._toggleOpened(false);\r\n }\r\n\r\n toggle(): void {\r\n if (this.opened()) {\r\n this.close();\r\n } else {\r\n this.open();\r\n }\r\n }\r\n\r\n onMouseenter(): void {\r\n this._enableAnimations();\r\n this._hovered.set(true);\r\n }\r\n\r\n onMouseleave(): void {\r\n this._enableAnimations();\r\n this._hovered.set(false);\r\n }\r\n\r\n private _handleModeChange(previousMode: CmatDrawerMode, currentMode: CmatDrawerMode): void {\r\n this._disableAnimations();\r\n\r\n if (previousMode === 'over' && currentMode === 'side') {\r\n this._hideOverlay();\r\n }\r\n\r\n if (previousMode === 'side' && currentMode === 'over') {\r\n if (this.opened()) {\r\n this._showOverlay();\r\n }\r\n }\r\n\r\n this._modeChangeTimeoutId = window.setTimeout(() => {\r\n this._modeChangeTimeoutId = null;\r\n this._enableAnimations();\r\n }, 500);\r\n }\r\n\r\n private _toggleOpened(open: boolean): void {\r\n this._enableAnimations();\r\n\r\n if (this.mode() === 'over') {\r\n if (open) {\r\n this._showOverlay();\r\n } else {\r\n this._hideOverlay();\r\n }\r\n }\r\n\r\n this.refreshVersion.update(value => value + 1);\r\n this.openedChanged.emit(open);\r\n }\r\n\r\n private _removeOverlayElement(): void {\r\n if (this._overlayClickDestroyFn) {\r\n this._overlayClickDestroyFn();\r\n this._overlayClickDestroyFn = null;\r\n }\r\n if (this._overlay) {\r\n this._overlay.parentNode?.removeChild(this._overlay);\r\n this._overlay = null;\r\n }\r\n }\r\n\r\n private _cleanupOverlay(): void {\r\n this._clearOverlayLeaveTimeout();\r\n this._removeOverlayElement();\r\n }\r\n\r\n private _clearOverlayLeaveTimeout(): void {\r\n if (this._overlayLeaveTimeoutId !== null) {\r\n clearTimeout(this._overlayLeaveTimeoutId);\r\n this._overlayLeaveTimeoutId = null;\r\n }\r\n }\r\n\r\n private _enableAnimations(): void {\r\n if (this._animationsEnabled()) {\r\n return;\r\n }\r\n this._animationsEnabled.set(true);\r\n }\r\n\r\n private _disableAnimations(): void {\r\n if (!this._animationsEnabled()) {\r\n return;\r\n }\r\n this._animationsEnabled.set(false);\r\n }\r\n\r\n private _showOverlay(): void {\r\n this._cleanupOverlay();\r\n\r\n this._overlay = this._renderer2.createElement('div') as HTMLElement;\r\n if (!this._overlay) {\r\n return;\r\n }\r\n this._overlay.classList.add('cmat-drawer-overlay');\r\n if (this.fixed()) {\r\n this._overlay.classList.add('cmat-drawer-overlay-fixed');\r\n }\r\n if (this.transparentOverlay()) {\r\n this._overlay.classList.add('cmat-drawer-overlay-transparent');\r\n }\r\n\r\n const parentEl = this._elementRef.nativeElement.parentElement;\r\n if (parentEl) {\r\n this._renderer2.appendChild(parentEl, this._overlay);\r\n }\r\n\r\n this._overlay.classList.add('cmat-drawer-overlay-enter');\r\n\r\n this._overlayClickDestroyFn = this._renderer2.listen(this._overlay, 'click', () => {\r\n this.close();\r\n });\r\n }\r\n\r\n private _hideOverlay(): void {\r\n if (!this._overlay) {\r\n return;\r\n }\r\n\r\n this._overlay.classList.remove('cmat-drawer-overlay-enter');\r\n\r\n const overlay = this._overlay;\r\n const handleAnimationEnd = (event: AnimationEvent): void => {\r\n if (event.animationName === 'drawer-overlay-leave') {\r\n overlay.removeEventListener('animationend', handleAnimationEnd);\r\n this._clearOverlayLeaveTimeout();\r\n this._removeOverlayElement();\r\n }\r\n };\r\n\r\n overlay.addEventListener('animationend', handleAnimationEnd);\r\n overlay.classList.add('cmat-drawer-overlay-leave');\r\n\r\n this._overlayLeaveTimeoutId = window.setTimeout(() => {\r\n this._overlayLeaveTimeoutId = null;\r\n overlay.removeEventListener('animationend', handleAnimationEnd);\r\n this._removeOverlayElement();\r\n }, 400);\r\n }\r\n}","<div class=\"cmat-drawer-content\">\r\n <ng-content></ng-content>\r\n</div>\r\n<div class=\"cmat-drawer-wrapper\" [attr.data-refresh]=\"refreshVersion()\" [class.cmat-drawer-opened]=\"opened()\">\r\n</div>\r\n"],"mappings":";;;;AAMA,IAAa,oBAAb,MAAa,kBAAiB;CAH9B,cAAA;EAIY,KAAA,qCAAuD,IAAI,IAAG;CAezE;CAbG,kBAAkB,MAAc,WAA8B;EAC1D,KAAK,mBAAmB,IAAI,MAAM,SAAS;CAC/C;CAGA,oBAAoB,MAAY;EAC5B,KAAK,mBAAmB,OAAO,IAAI;CACvC;CAGA,aAAa,MAAY;EACrB,OAAO,KAAK,mBAAmB,IAAI,IAAI;CAC3C;CAfS;EAAA,KAAA,OAAA,GAAA,mBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAiB,MAAA,CAAA;GAAA,QAAA,GAAA,gBAAA;EAAA,CAAA;CAAA;CAAjB;EAAA,KAAA,QAAA,GAAA,sBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAiB,YAFd;EAAM,CAAA;CAAA;;AAET,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAiB,YAAA,CAAA;EAH7B,MAAA;EAAW,MAAA,CAAA,EACR,YAAY,OACf,CAAA;;;ACqCD,IAAa,sBAAb,MAAa,oBAAmB;CAoC5B,cAAA;EAnCS,KAAA,iBAAiB,OAAO,GAAE,GAAA,YAAA,CAAA,EAAA,WAAA,iBAAA,CAAA,+BAAA,CAAA,CAAA;EAE1B,KAAA,QAAQ,MAA6B,OAAK;GAAA,GAAA,YAAA,EAAA,WAAA,QAAA,+BAAA,CAAA;GAC/C,WAAW;EAAqB,CAAA;EAE3B,KAA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,UAAA;KAAA,YAAA;KAAA,mBAAA;IAAA;IAAA,oBAAA;KAAA,mBAAA;KAAA,YAAA;KAAA,UAAA;KAAA,YAAA;KAAA,mBAAA;IAAA;GAAA;GAAA,SAAA;IAAA,cAAA;IAAA,aAAA;IAAA,eAAA;IAAA,iBAAA;GAAA;GAAA,MAAA;IAAA,WAAA;KAAA,cAAA;KAAA,cAAA;IAAA;IAAA,YAAA;KAAA,wCAAA;KAAA,2BAAA;KAAA,2BAAA;KAAA,4BAAA;KAAA,+BAAA;KAAA,+BAAA;KAAA,mCAAA;KAAA,oCAAA;KAAA,oBAAA;IAAA;GAAA;GAAA,UAAA,CAAA,YAAA;GAAA,UAAA;GAAA,UC1ChC;GAKA,QAAA,CAAA,2vEAAA;GAAA,iBAAA,GAAA,wBAAA;GAAA,eAAA,GAAA,kBAAA;EAAA,CAAA;CAAA;;ADqCa,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAmB,YAAA,CAAA;EArB/B,MAAA;EACa,MAAA,CAAA;GAAA,UAAA;GAAa,eAGR,kBAAkB;GAAI,iBACpB,wBAAwB;GAAM,UACrC;GAAY,MAChB;IACF,0CAA0C;IAC1C,6BAA6B;IAC7B,6BAA6B;IAC7B,8BAA8B;IAC9B,iCAAiC;IACjC,iCAAiC;IACjC,qCAAqC;IACrC,sCAAsC;IACtC,sBAAsB;IACtB,gBAAgB;IAChB,gBAAgB;GACnB;GAAA,UAAA;GAAA,QAAA,CAAA,2vEAAA;EAAA,CAAA"}
@@ -1,42 +1,202 @@
1
- import { NgClass } from '@angular/common';
2
- import * as i0 from '@angular/core';
3
- import { input, output, ChangeDetectionStrategy, Component } from '@angular/core';
4
- import * as i1 from '@angular/material/button';
5
- import { MatButtonModule } from '@angular/material/button';
6
- import * as i2 from '@angular/material/icon';
7
- import { MatIconModule } from '@angular/material/icon';
8
-
9
- class CmatEmptyStateComponent {
10
- constructor() {
11
- this.icon = input('mat_outline:inbox', /* @ts-ignore */
12
- ...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
13
- this.title = input('暂无内容', /* @ts-ignore */
14
- ...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
15
- this.description = input('当前没有可显示的数据。', /* @ts-ignore */
16
- ...(ngDevMode ? [{ debugName: "description" }] : /* istanbul ignore next */ []));
17
- this.ctaLabel = input('', /* @ts-ignore */
18
- ...(ngDevMode ? [{ debugName: "ctaLabel" }] : /* istanbul ignore next */ []));
19
- this.ctaDisabled = input(false, /* @ts-ignore */
20
- ...(ngDevMode ? [{ debugName: "ctaDisabled" }] : /* istanbul ignore next */ []));
21
- /** 是否渲染卡片边框背景,嵌套在已有卡片内时应设为 false 避免双重包裹 */
22
- this.bordered = input(true, /* @ts-ignore */
23
- ...(ngDevMode ? [{ debugName: "bordered" }] : /* istanbul ignore next */ []));
24
- this.ctaClick = output();
25
- }
26
- emitAction() {
27
- this.ctaClick.emit();
28
- }
29
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: CmatEmptyStateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
30
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.0", type: CmatEmptyStateComponent, isStandalone: true, selector: "cmat-empty-state", inputs: { icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, ctaLabel: { classPropertyName: "ctaLabel", publicName: "ctaLabel", isSignal: true, isRequired: false, transformFunction: null }, ctaDisabled: { classPropertyName: "ctaDisabled", publicName: "ctaDisabled", isSignal: true, isRequired: false, transformFunction: null }, bordered: { classPropertyName: "bordered", publicName: "bordered", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { ctaClick: "ctaClick" }, ngImport: i0, template: "<div\r\n class=\"flex h-full w-full flex-col items-center justify-center px-6 py-10 text-center\"\r\n [ngClass]=\"bordered() ? 'rounded-xl border border-slate-200 dark:border-slate-700 bg-card dark:bg-transparent' : 'bg-transparent'\"\r\n>\r\n @if (icon()) {\r\n <div\r\n class=\"flex h-16 w-16 items-center justify-center rounded-full bg-slate-100 dark:bg-slate-600 text-slate-500 dark:text-slate-300\"\r\n >\r\n <mat-icon [svgIcon]=\"icon()\"></mat-icon>\r\n </div>\r\n }\r\n\r\n <h3 class=\"mt-4 text-lg font-semibold text-secondary\">{{ title() }}</h3>\r\n\r\n @if (description()) {\r\n <p\r\n class=\"mt-2 max-w-xl text-sm leading-6 text-hint\"\r\n >\r\n {{ description() }}\r\n </p>\r\n }\r\n\r\n @if (ctaLabel()) {\r\n <div class=\"mt-4\">\r\n <button\r\n matButton=\"outlined\"\r\n type=\"button\"\r\n [disabled]=\"ctaDisabled()\"\r\n (click)=\"emitAction()\"\r\n >\r\n {{ ctaLabel() }}\r\n </button>\r\n </div>\r\n }\r\n</div>\r\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.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"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
31
- }
32
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: CmatEmptyStateComponent, decorators: [{
33
- type: Component,
34
- args: [{ selector: 'cmat-empty-state', changeDetection: ChangeDetectionStrategy.OnPush, imports: [NgClass, MatButtonModule, MatIconModule], template: "<div\r\n class=\"flex h-full w-full flex-col items-center justify-center px-6 py-10 text-center\"\r\n [ngClass]=\"bordered() ? 'rounded-xl border border-slate-200 dark:border-slate-700 bg-card dark:bg-transparent' : 'bg-transparent'\"\r\n>\r\n @if (icon()) {\r\n <div\r\n class=\"flex h-16 w-16 items-center justify-center rounded-full bg-slate-100 dark:bg-slate-600 text-slate-500 dark:text-slate-300\"\r\n >\r\n <mat-icon [svgIcon]=\"icon()\"></mat-icon>\r\n </div>\r\n }\r\n\r\n <h3 class=\"mt-4 text-lg font-semibold text-secondary\">{{ title() }}</h3>\r\n\r\n @if (description()) {\r\n <p\r\n class=\"mt-2 max-w-xl text-sm leading-6 text-hint\"\r\n >\r\n {{ description() }}\r\n </p>\r\n }\r\n\r\n @if (ctaLabel()) {\r\n <div class=\"mt-4\">\r\n <button\r\n matButton=\"outlined\"\r\n type=\"button\"\r\n [disabled]=\"ctaDisabled()\"\r\n (click)=\"emitAction()\"\r\n >\r\n {{ ctaLabel() }}\r\n </button>\r\n </div>\r\n }\r\n</div>\r\n", styles: [":host{display:block}\n"] }]
35
- }], propDecorators: { icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], description: [{ type: i0.Input, args: [{ isSignal: true, alias: "description", required: false }] }], ctaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ctaLabel", required: false }] }], ctaDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "ctaDisabled", required: false }] }], bordered: [{ type: i0.Input, args: [{ isSignal: true, alias: "bordered", required: false }] }], ctaClick: [{ type: i0.Output, args: ["ctaClick"] }] } });
36
-
37
- /**
38
- * Generated bundle index. Do not edit.
39
- */
40
-
1
+ import { NgClass } from "@angular/common";
2
+ import * as i0 from "@angular/core";
3
+ import { ChangeDetectionStrategy, Component, input, output } from "@angular/core";
4
+ import * as i1 from "@angular/material/button";
5
+ import { MatButtonModule } from "@angular/material/button";
6
+ import * as i2 from "@angular/material/icon";
7
+ import { MatIconModule } from "@angular/material/icon";
8
+ var CmatEmptyStateComponent = class CmatEmptyStateComponent {
9
+ constructor() {
10
+ this.icon = input("mat_outline:inbox", ...ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []);
11
+ this.title = input("暂无内容", ...ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []);
12
+ this.description = input("当前没有可显示的数据。", ...ngDevMode ? [{ debugName: "description" }] : /* istanbul ignore next */ []);
13
+ this.ctaLabel = input("", ...ngDevMode ? [{ debugName: "ctaLabel" }] : /* istanbul ignore next */ []);
14
+ this.ctaDisabled = input(false, ...ngDevMode ? [{ debugName: "ctaDisabled" }] : /* istanbul ignore next */ []);
15
+ this.bordered = input(true, ...ngDevMode ? [{ debugName: "bordered" }] : /* istanbul ignore next */ []);
16
+ this.ctaClick = output();
17
+ }
18
+ emitAction() {
19
+ this.ctaClick.emit();
20
+ }
21
+ static {
22
+ this.ɵfac = i0.ɵɵngDeclareFactory({
23
+ minVersion: "12.0.0",
24
+ version: "22.2.3",
25
+ ngImport: i0,
26
+ type: CmatEmptyStateComponent,
27
+ deps: [],
28
+ target: i0.ɵɵFactoryTarget.Component
29
+ });
30
+ }
31
+ static {
32
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
33
+ minVersion: "17.0.0",
34
+ version: "22.2.3",
35
+ type: CmatEmptyStateComponent,
36
+ isStandalone: true,
37
+ selector: "cmat-empty-state",
38
+ inputs: {
39
+ icon: {
40
+ classPropertyName: "icon",
41
+ publicName: "icon",
42
+ isSignal: true,
43
+ isRequired: false,
44
+ transformFunction: null
45
+ },
46
+ title: {
47
+ classPropertyName: "title",
48
+ publicName: "title",
49
+ isSignal: true,
50
+ isRequired: false,
51
+ transformFunction: null
52
+ },
53
+ description: {
54
+ classPropertyName: "description",
55
+ publicName: "description",
56
+ isSignal: true,
57
+ isRequired: false,
58
+ transformFunction: null
59
+ },
60
+ ctaLabel: {
61
+ classPropertyName: "ctaLabel",
62
+ publicName: "ctaLabel",
63
+ isSignal: true,
64
+ isRequired: false,
65
+ transformFunction: null
66
+ },
67
+ ctaDisabled: {
68
+ classPropertyName: "ctaDisabled",
69
+ publicName: "ctaDisabled",
70
+ isSignal: true,
71
+ isRequired: false,
72
+ transformFunction: null
73
+ },
74
+ bordered: {
75
+ classPropertyName: "bordered",
76
+ publicName: "bordered",
77
+ isSignal: true,
78
+ isRequired: false,
79
+ transformFunction: null
80
+ }
81
+ },
82
+ outputs: { ctaClick: "ctaClick" },
83
+ ngImport: i0,
84
+ template: "<div\r\n class=\"flex h-full w-full flex-col items-center justify-center px-6 py-10 text-center\"\r\n [ngClass]=\"bordered() ? 'rounded-xl border border-slate-200 dark:border-slate-700 bg-card dark:bg-transparent' : 'bg-transparent'\"\r\n>\r\n @if (icon()) {\r\n <div\r\n class=\"flex h-16 w-16 items-center justify-center rounded-full bg-slate-100 dark:bg-slate-600 text-slate-500 dark:text-slate-300\"\r\n >\r\n <mat-icon [svgIcon]=\"icon()\"></mat-icon>\r\n </div>\r\n }\r\n\r\n <h3 class=\"mt-4 text-lg font-semibold text-secondary\">{{ title() }}</h3>\r\n\r\n @if (description()) {\r\n <p\r\n class=\"mt-2 max-w-xl text-sm leading-6 text-hint\"\r\n >\r\n {{ description() }}\r\n </p>\r\n }\r\n\r\n @if (ctaLabel()) {\r\n <div class=\"mt-4\">\r\n <button\r\n matButton=\"outlined\"\r\n type=\"button\"\r\n [disabled]=\"ctaDisabled()\"\r\n (click)=\"emitAction()\"\r\n >\r\n {{ ctaLabel() }}\r\n </button>\r\n </div>\r\n }\r\n</div>\r\n",
85
+ styles: [":host{display:block}\n"],
86
+ dependencies: [
87
+ {
88
+ kind: "directive",
89
+ type: NgClass,
90
+ selector: "[ngClass]",
91
+ inputs: ["class", "ngClass"]
92
+ },
93
+ {
94
+ kind: "ngmodule",
95
+ type: MatButtonModule
96
+ },
97
+ {
98
+ kind: "component",
99
+ type: i1.MatButton,
100
+ 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] ",
101
+ inputs: ["matButton"],
102
+ exportAs: ["matButton", "matAnchor"]
103
+ },
104
+ {
105
+ kind: "ngmodule",
106
+ type: MatIconModule
107
+ },
108
+ {
109
+ kind: "component",
110
+ type: i2.MatIcon,
111
+ selector: "mat-icon",
112
+ inputs: [
113
+ "color",
114
+ "inline",
115
+ "svgIcon",
116
+ "fontSet",
117
+ "fontIcon"
118
+ ],
119
+ exportAs: ["matIcon"]
120
+ }
121
+ ],
122
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
123
+ });
124
+ }
125
+ };
126
+ i0.ɵɵngDeclareClassMetadata({
127
+ minVersion: "12.0.0",
128
+ version: "22.2.3",
129
+ ngImport: i0,
130
+ type: CmatEmptyStateComponent,
131
+ decorators: [{
132
+ type: Component,
133
+ args: [{
134
+ selector: "cmat-empty-state",
135
+ changeDetection: ChangeDetectionStrategy.OnPush,
136
+ imports: [
137
+ NgClass,
138
+ MatButtonModule,
139
+ MatIconModule
140
+ ],
141
+ template: "<div\r\n class=\"flex h-full w-full flex-col items-center justify-center px-6 py-10 text-center\"\r\n [ngClass]=\"bordered() ? 'rounded-xl border border-slate-200 dark:border-slate-700 bg-card dark:bg-transparent' : 'bg-transparent'\"\r\n>\r\n @if (icon()) {\r\n <div\r\n class=\"flex h-16 w-16 items-center justify-center rounded-full bg-slate-100 dark:bg-slate-600 text-slate-500 dark:text-slate-300\"\r\n >\r\n <mat-icon [svgIcon]=\"icon()\"></mat-icon>\r\n </div>\r\n }\r\n\r\n <h3 class=\"mt-4 text-lg font-semibold text-secondary\">{{ title() }}</h3>\r\n\r\n @if (description()) {\r\n <p\r\n class=\"mt-2 max-w-xl text-sm leading-6 text-hint\"\r\n >\r\n {{ description() }}\r\n </p>\r\n }\r\n\r\n @if (ctaLabel()) {\r\n <div class=\"mt-4\">\r\n <button\r\n matButton=\"outlined\"\r\n type=\"button\"\r\n [disabled]=\"ctaDisabled()\"\r\n (click)=\"emitAction()\"\r\n >\r\n {{ ctaLabel() }}\r\n </button>\r\n </div>\r\n }\r\n</div>\r\n",
142
+ styles: [":host{display:block}\n"]
143
+ }]
144
+ }],
145
+ propDecorators: {
146
+ icon: [{
147
+ type: i0.Input,
148
+ args: [{
149
+ isSignal: true,
150
+ alias: "icon",
151
+ required: false
152
+ }]
153
+ }],
154
+ title: [{
155
+ type: i0.Input,
156
+ args: [{
157
+ isSignal: true,
158
+ alias: "title",
159
+ required: false
160
+ }]
161
+ }],
162
+ description: [{
163
+ type: i0.Input,
164
+ args: [{
165
+ isSignal: true,
166
+ alias: "description",
167
+ required: false
168
+ }]
169
+ }],
170
+ ctaLabel: [{
171
+ type: i0.Input,
172
+ args: [{
173
+ isSignal: true,
174
+ alias: "ctaLabel",
175
+ required: false
176
+ }]
177
+ }],
178
+ ctaDisabled: [{
179
+ type: i0.Input,
180
+ args: [{
181
+ isSignal: true,
182
+ alias: "ctaDisabled",
183
+ required: false
184
+ }]
185
+ }],
186
+ bordered: [{
187
+ type: i0.Input,
188
+ args: [{
189
+ isSignal: true,
190
+ alias: "bordered",
191
+ required: false
192
+ }]
193
+ }],
194
+ ctaClick: [{
195
+ type: i0.Output,
196
+ args: ["ctaClick"]
197
+ }]
198
+ }
199
+ });
41
200
  export { CmatEmptyStateComponent };
42
- //# sourceMappingURL=cmat-components-empty-state.mjs.map
201
+
202
+ //# sourceMappingURL=cmat-components-empty-state.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"cmat-components-empty-state.mjs","sources":["../../../projects/cmat/components/empty-state/empty-state.component.ts","../../../projects/cmat/components/empty-state/empty-state.component.html","../../../projects/cmat/components/empty-state/cmat-components-empty-state.ts"],"sourcesContent":["import { NgClass } from '@angular/common';\r\nimport { ChangeDetectionStrategy, Component, input, output } from '@angular/core';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatIconModule } from '@angular/material/icon';\r\n\r\n@Component({\r\n selector: 'cmat-empty-state',\r\n templateUrl: './empty-state.component.html',\r\n styleUrls: ['./empty-state.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n imports: [NgClass, MatButtonModule, MatIconModule],\r\n})\r\nexport class CmatEmptyStateComponent {\r\n readonly icon = input<string>('mat_outline:inbox');\r\n\r\n readonly title = input<string>('暂无内容');\r\n readonly description = input<string>('当前没有可显示的数据。');\r\n readonly ctaLabel = input<string>('');\r\n readonly ctaDisabled = input<boolean>(false);\r\n /** 是否渲染卡片边框背景,嵌套在已有卡片内时应设为 false 避免双重包裹 */\r\n readonly bordered = input<boolean>(true);\r\n readonly ctaClick = output<void>();\r\n\r\n emitAction(): void {\r\n this.ctaClick.emit();\r\n }\r\n}\r\n","<div\r\n class=\"flex h-full w-full flex-col items-center justify-center px-6 py-10 text-center\"\r\n [ngClass]=\"bordered() ? 'rounded-xl border border-slate-200 dark:border-slate-700 bg-card dark:bg-transparent' : 'bg-transparent'\"\r\n>\r\n @if (icon()) {\r\n <div\r\n class=\"flex h-16 w-16 items-center justify-center rounded-full bg-slate-100 dark:bg-slate-600 text-slate-500 dark:text-slate-300\"\r\n >\r\n <mat-icon [svgIcon]=\"icon()\"></mat-icon>\r\n </div>\r\n }\r\n\r\n <h3 class=\"mt-4 text-lg font-semibold text-secondary\">{{ title() }}</h3>\r\n\r\n @if (description()) {\r\n <p\r\n class=\"mt-2 max-w-xl text-sm leading-6 text-hint\"\r\n >\r\n {{ description() }}\r\n </p>\r\n }\r\n\r\n @if (ctaLabel()) {\r\n <div class=\"mt-4\">\r\n <button\r\n matButton=\"outlined\"\r\n type=\"button\"\r\n [disabled]=\"ctaDisabled()\"\r\n (click)=\"emitAction()\"\r\n >\r\n {{ ctaLabel() }}\r\n </button>\r\n </div>\r\n }\r\n</div>\r\n","/**\n * Generated bundle index. Do not edit.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A,SAAA,EAAA,SAAA,EAAA,UAAA,CAAA,EAAA,QAAA,EAAA,CAAA,SAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAEtC,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAPnC,SAAS;+BACE,kBAAkB,EAAA,eAAA,EAGX,uBAAuB,CAAC,MAAM,EAAA,OAAA,EACtC,CAAC,OAAO,EAAE,eAAe,EAAE,aAAa,CAAC,EAAA,QAAA,EAAA,ohCAAA,EAAA,MAAA,EAAA,CAAA,wBAAA,CAAA,EAAA;;;AEVpD;;AAEG;;"}
1
+ {"version":3,"file":"cmat-components-empty-state.mjs","names":[],"sources":["../../../projects/cmat/components/empty-state/empty-state.component.ts","../../../projects/cmat/components/empty-state/empty-state.component.html"],"sourcesContent":["import { NgClass } from '@angular/common';\r\nimport { ChangeDetectionStrategy, Component, input, output } from '@angular/core';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatIconModule } from '@angular/material/icon';\r\n\r\n@Component({\r\n selector: 'cmat-empty-state',\r\n templateUrl: './empty-state.component.html',\r\n styleUrls: ['./empty-state.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n imports: [NgClass, MatButtonModule, MatIconModule],\r\n})\r\nexport class CmatEmptyStateComponent {\r\n readonly icon = input<string>('mat_outline:inbox');\r\n\r\n readonly title = input<string>('暂无内容');\r\n readonly description = input<string>('当前没有可显示的数据。');\r\n readonly ctaLabel = input<string>('');\r\n readonly ctaDisabled = input<boolean>(false);\r\n /** 是否渲染卡片边框背景,嵌套在已有卡片内时应设为 false 避免双重包裹 */\r\n readonly bordered = input<boolean>(true);\r\n readonly ctaClick = output<void>();\r\n\r\n emitAction(): void {\r\n this.ctaClick.emit();\r\n }\r\n}\r\n","<div\r\n class=\"flex h-full w-full flex-col items-center justify-center px-6 py-10 text-center\"\r\n [ngClass]=\"bordered() ? 'rounded-xl border border-slate-200 dark:border-slate-700 bg-card dark:bg-transparent' : 'bg-transparent'\"\r\n>\r\n @if (icon()) {\r\n <div\r\n class=\"flex h-16 w-16 items-center justify-center rounded-full bg-slate-100 dark:bg-slate-600 text-slate-500 dark:text-slate-300\"\r\n >\r\n <mat-icon [svgIcon]=\"icon()\"></mat-icon>\r\n </div>\r\n }\r\n\r\n <h3 class=\"mt-4 text-lg font-semibold text-secondary\">{{ title() }}</h3>\r\n\r\n @if (description()) {\r\n <p\r\n class=\"mt-2 max-w-xl text-sm leading-6 text-hint\"\r\n >\r\n {{ description() }}\r\n </p>\r\n }\r\n\r\n @if (ctaLabel()) {\r\n <div class=\"mt-4\">\r\n <button\r\n matButton=\"outlined\"\r\n type=\"button\"\r\n [disabled]=\"ctaDisabled()\"\r\n (click)=\"emitAction()\"\r\n >\r\n {{ ctaLabel() }}\r\n </button>\r\n </div>\r\n }\r\n</div>\r\n"],"mappings":";;;;;;;AAYA,IAAa,0BAAb,MAAa,wBAAuB;CAPpC,cAAA;EAQW,KAAA,OAAO,MAAc,qBAAoB,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;EAEzC,KAAA,QAAQ,MAAc,QAAO,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;EAC7B,KAAA,cAAc,MAAc,eAAc,GAAA,YAAA,CAAA,EAAA,WAAA,cAAA,CAAA,+BAAA,CAAA,CAAA;EAC1C,KAAA,WAAW,MAAc,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;EAC5B,KAAA,cAAc,MAAe,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,cAAA,CAAA,+BAAA,CAAA,CAAA;EAEnC,KAAA,WAAW,MAAe,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;EAC/B,KAAA,WAAW,OAAM;CAK3B;CAHC,aAAU;EAC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UAAA,CAAA,SAAA;IAAA;GAAA;GAAA,iBAAA,GAAA,wBAAA;EAAA,CAAA;CAAA;;AAEtC,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAuB,YAAA,CAAA;EAPnC,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAkB,iBAGX,wBAAwB;GAAM,SACtC;IAAC;IAAS;IAAiB;GAAa;GAAC,UAAA;GAAA,QAAA,CAAA,wBAAA;EAAA,CAAA"}
@@ -1,36 +1,199 @@
1
- import { CommonModule } from '@angular/common';
2
- import * as i0 from '@angular/core';
3
- import { input, ChangeDetectionStrategy, Component } from '@angular/core';
4
- import * as i1 from '@angular/material/icon';
5
- import { MatIconModule } from '@angular/material/icon';
6
- import { CmatImageComponent } from 'cmat/components/image-viewer';
7
-
8
- class CmatFilePreviewComponent {
9
- constructor() {
10
- this.name = input('', /* @ts-ignore */
11
- ...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
12
- this.description = input('', /* @ts-ignore */
13
- ...(ngDevMode ? [{ debugName: "description" }] : /* istanbul ignore next */ []));
14
- this.fileType = input('file', /* @ts-ignore */
15
- ...(ngDevMode ? [{ debugName: "fileType" }] : /* istanbul ignore next */ []));
16
- this.size = input('', /* @ts-ignore */
17
- ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
18
- this.src = input('', /* @ts-ignore */
19
- ...(ngDevMode ? [{ debugName: "src" }] : /* istanbul ignore next */ []));
20
- this.previewImage = input(true, /* @ts-ignore */
21
- ...(ngDevMode ? [{ debugName: "previewImage" }] : /* istanbul ignore next */ []));
22
- }
23
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: CmatFilePreviewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
24
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.0", type: CmatFilePreviewComponent, isStandalone: true, selector: "cmat-file-preview", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, fileType: { classPropertyName: "fileType", publicName: "fileType", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, src: { classPropertyName: "src", publicName: "src", isSignal: true, isRequired: false, transformFunction: null }, previewImage: { classPropertyName: "previewImage", publicName: "previewImage", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"flex flex-col gap-4 rounded-2xl bg-card p-4 shadow-sm md:flex-row md:items-start\">\r\n <div\r\n class=\"flex h-24 w-24 flex-none items-center justify-center overflow-hidden rounded-xl bg-slate-200 dark:bg-slate-600 text-slate-300 dark:text-slate-500\">\r\n @if (previewImage() && src()) {\r\n <cmat-image class=\"h-full w-full object-cover\" [src]=\"src()\" [alt]=\"name()\" [preview]=\"true\"></cmat-image>\r\n } @else {\r\n <mat-icon [svgIcon]=\"'mat_outline:description'\"></mat-icon>\r\n }\r\n </div>\r\n\r\n <div class=\"min-w-0 flex-1\">\r\n <div class=\"flex flex-col gap-1\">\r\n <div class=\"truncate text-base font-semibold\">{{ name() }}</div>\r\n\r\n @if (description()) {\r\n <div class=\"text-sm leading-6 text-slate-500 dark:text-slate-300\">{{ description() }}</div>\r\n }\r\n </div>\r\n\r\n <div class=\"mt-3 flex flex-wrap items-center gap-3 text-sm \">\r\n @if (fileType()) {\r\n <span class=\"rounded-full bg-slate-100 dark:bg-slate-600 px-2 py-0.5\">{{ fileType() }}</span>\r\n }\r\n @if (size()) {\r\n <span class=\" text-slate-500 dark:text-slate-300\">{{ size() }}</span>\r\n }\r\n </div>\r\n </div>\r\n</div>", styles: [":host{display:block}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: CmatImageComponent, selector: "cmat-image", inputs: ["imageClass", "imageStyle", "src", "srcSet", "previewImageSrc", "previewImageSrcSet", "alt", "width", "height", "loading", "appendTo", "preview"], outputs: ["previewShowChange", "imageErrorEvent"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
25
- }
26
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: CmatFilePreviewComponent, decorators: [{
27
- type: Component,
28
- args: [{ selector: 'cmat-file-preview', changeDetection: ChangeDetectionStrategy.OnPush, imports: [CommonModule, CmatImageComponent, MatIconModule], template: "<div class=\"flex flex-col gap-4 rounded-2xl bg-card p-4 shadow-sm md:flex-row md:items-start\">\r\n <div\r\n class=\"flex h-24 w-24 flex-none items-center justify-center overflow-hidden rounded-xl bg-slate-200 dark:bg-slate-600 text-slate-300 dark:text-slate-500\">\r\n @if (previewImage() && src()) {\r\n <cmat-image class=\"h-full w-full object-cover\" [src]=\"src()\" [alt]=\"name()\" [preview]=\"true\"></cmat-image>\r\n } @else {\r\n <mat-icon [svgIcon]=\"'mat_outline:description'\"></mat-icon>\r\n }\r\n </div>\r\n\r\n <div class=\"min-w-0 flex-1\">\r\n <div class=\"flex flex-col gap-1\">\r\n <div class=\"truncate text-base font-semibold\">{{ name() }}</div>\r\n\r\n @if (description()) {\r\n <div class=\"text-sm leading-6 text-slate-500 dark:text-slate-300\">{{ description() }}</div>\r\n }\r\n </div>\r\n\r\n <div class=\"mt-3 flex flex-wrap items-center gap-3 text-sm \">\r\n @if (fileType()) {\r\n <span class=\"rounded-full bg-slate-100 dark:bg-slate-600 px-2 py-0.5\">{{ fileType() }}</span>\r\n }\r\n @if (size()) {\r\n <span class=\" text-slate-500 dark:text-slate-300\">{{ size() }}</span>\r\n }\r\n </div>\r\n </div>\r\n</div>", styles: [":host{display:block}\n"] }]
29
- }], propDecorators: { name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], description: [{ type: i0.Input, args: [{ isSignal: true, alias: "description", required: false }] }], fileType: [{ type: i0.Input, args: [{ isSignal: true, alias: "fileType", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], src: [{ type: i0.Input, args: [{ isSignal: true, alias: "src", required: false }] }], previewImage: [{ type: i0.Input, args: [{ isSignal: true, alias: "previewImage", required: false }] }] } });
30
-
31
- /**
32
- * Generated bundle index. Do not edit.
33
- */
34
-
1
+ import { CommonModule } from "@angular/common";
2
+ import * as i0 from "@angular/core";
3
+ import { ChangeDetectionStrategy, Component, input } from "@angular/core";
4
+ import * as i1 from "@angular/material/icon";
5
+ import { MatIconModule } from "@angular/material/icon";
6
+ import { CmatImageComponent } from "cmat/components/image-viewer";
7
+ var CmatFilePreviewComponent = class CmatFilePreviewComponent {
8
+ constructor() {
9
+ this.name = input("", ...ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []);
10
+ this.description = input("", ...ngDevMode ? [{ debugName: "description" }] : /* istanbul ignore next */ []);
11
+ this.fileType = input("file", ...ngDevMode ? [{ debugName: "fileType" }] : /* istanbul ignore next */ []);
12
+ this.size = input("", ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
13
+ this.src = input("", ...ngDevMode ? [{ debugName: "src" }] : /* istanbul ignore next */ []);
14
+ this.previewImage = input(true, ...ngDevMode ? [{ debugName: "previewImage" }] : /* istanbul ignore next */ []);
15
+ }
16
+ static {
17
+ this.ɵfac = i0.ɵɵngDeclareFactory({
18
+ minVersion: "12.0.0",
19
+ version: "22.2.3",
20
+ ngImport: i0,
21
+ type: CmatFilePreviewComponent,
22
+ deps: [],
23
+ target: i0.ɵɵFactoryTarget.Component
24
+ });
25
+ }
26
+ static {
27
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
28
+ minVersion: "17.0.0",
29
+ version: "22.2.3",
30
+ type: CmatFilePreviewComponent,
31
+ isStandalone: true,
32
+ selector: "cmat-file-preview",
33
+ inputs: {
34
+ name: {
35
+ classPropertyName: "name",
36
+ publicName: "name",
37
+ isSignal: true,
38
+ isRequired: false,
39
+ transformFunction: null
40
+ },
41
+ description: {
42
+ classPropertyName: "description",
43
+ publicName: "description",
44
+ isSignal: true,
45
+ isRequired: false,
46
+ transformFunction: null
47
+ },
48
+ fileType: {
49
+ classPropertyName: "fileType",
50
+ publicName: "fileType",
51
+ isSignal: true,
52
+ isRequired: false,
53
+ transformFunction: null
54
+ },
55
+ size: {
56
+ classPropertyName: "size",
57
+ publicName: "size",
58
+ isSignal: true,
59
+ isRequired: false,
60
+ transformFunction: null
61
+ },
62
+ src: {
63
+ classPropertyName: "src",
64
+ publicName: "src",
65
+ isSignal: true,
66
+ isRequired: false,
67
+ transformFunction: null
68
+ },
69
+ previewImage: {
70
+ classPropertyName: "previewImage",
71
+ publicName: "previewImage",
72
+ isSignal: true,
73
+ isRequired: false,
74
+ transformFunction: null
75
+ }
76
+ },
77
+ ngImport: i0,
78
+ template: "<div class=\"flex flex-col gap-4 rounded-2xl bg-card p-4 shadow-sm md:flex-row md:items-start\">\r\n <div\r\n class=\"flex h-24 w-24 flex-none items-center justify-center overflow-hidden rounded-xl bg-slate-200 dark:bg-slate-600 text-slate-300 dark:text-slate-500\">\r\n @if (previewImage() && src()) {\r\n <cmat-image class=\"h-full w-full object-cover\" [src]=\"src()\" [alt]=\"name()\" [preview]=\"true\"></cmat-image>\r\n } @else {\r\n <mat-icon [svgIcon]=\"'mat_outline:description'\"></mat-icon>\r\n }\r\n </div>\r\n\r\n <div class=\"min-w-0 flex-1\">\r\n <div class=\"flex flex-col gap-1\">\r\n <div class=\"truncate text-base font-semibold\">{{ name() }}</div>\r\n\r\n @if (description()) {\r\n <div class=\"text-sm leading-6 text-slate-500 dark:text-slate-300\">{{ description() }}</div>\r\n }\r\n </div>\r\n\r\n <div class=\"mt-3 flex flex-wrap items-center gap-3 text-sm \">\r\n @if (fileType()) {\r\n <span class=\"rounded-full bg-slate-100 dark:bg-slate-600 px-2 py-0.5\">{{ fileType() }}</span>\r\n }\r\n @if (size()) {\r\n <span class=\" text-slate-500 dark:text-slate-300\">{{ size() }}</span>\r\n }\r\n </div>\r\n </div>\r\n</div>",
79
+ styles: [":host{display:block}\n"],
80
+ dependencies: [
81
+ {
82
+ kind: "ngmodule",
83
+ type: CommonModule
84
+ },
85
+ {
86
+ kind: "component",
87
+ type: CmatImageComponent,
88
+ selector: "cmat-image",
89
+ inputs: [
90
+ "imageClass",
91
+ "imageStyle",
92
+ "src",
93
+ "srcSet",
94
+ "previewImageSrc",
95
+ "previewImageSrcSet",
96
+ "alt",
97
+ "width",
98
+ "height",
99
+ "loading",
100
+ "appendTo",
101
+ "preview"
102
+ ],
103
+ outputs: ["previewShowChange", "imageErrorEvent"]
104
+ },
105
+ {
106
+ kind: "ngmodule",
107
+ type: MatIconModule
108
+ },
109
+ {
110
+ kind: "component",
111
+ type: i1.MatIcon,
112
+ selector: "mat-icon",
113
+ inputs: [
114
+ "color",
115
+ "inline",
116
+ "svgIcon",
117
+ "fontSet",
118
+ "fontIcon"
119
+ ],
120
+ exportAs: ["matIcon"]
121
+ }
122
+ ],
123
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
124
+ });
125
+ }
126
+ };
127
+ i0.ɵɵngDeclareClassMetadata({
128
+ minVersion: "12.0.0",
129
+ version: "22.2.3",
130
+ ngImport: i0,
131
+ type: CmatFilePreviewComponent,
132
+ decorators: [{
133
+ type: Component,
134
+ args: [{
135
+ selector: "cmat-file-preview",
136
+ changeDetection: ChangeDetectionStrategy.OnPush,
137
+ imports: [
138
+ CommonModule,
139
+ CmatImageComponent,
140
+ MatIconModule
141
+ ],
142
+ template: "<div class=\"flex flex-col gap-4 rounded-2xl bg-card p-4 shadow-sm md:flex-row md:items-start\">\r\n <div\r\n class=\"flex h-24 w-24 flex-none items-center justify-center overflow-hidden rounded-xl bg-slate-200 dark:bg-slate-600 text-slate-300 dark:text-slate-500\">\r\n @if (previewImage() && src()) {\r\n <cmat-image class=\"h-full w-full object-cover\" [src]=\"src()\" [alt]=\"name()\" [preview]=\"true\"></cmat-image>\r\n } @else {\r\n <mat-icon [svgIcon]=\"'mat_outline:description'\"></mat-icon>\r\n }\r\n </div>\r\n\r\n <div class=\"min-w-0 flex-1\">\r\n <div class=\"flex flex-col gap-1\">\r\n <div class=\"truncate text-base font-semibold\">{{ name() }}</div>\r\n\r\n @if (description()) {\r\n <div class=\"text-sm leading-6 text-slate-500 dark:text-slate-300\">{{ description() }}</div>\r\n }\r\n </div>\r\n\r\n <div class=\"mt-3 flex flex-wrap items-center gap-3 text-sm \">\r\n @if (fileType()) {\r\n <span class=\"rounded-full bg-slate-100 dark:bg-slate-600 px-2 py-0.5\">{{ fileType() }}</span>\r\n }\r\n @if (size()) {\r\n <span class=\" text-slate-500 dark:text-slate-300\">{{ size() }}</span>\r\n }\r\n </div>\r\n </div>\r\n</div>",
143
+ styles: [":host{display:block}\n"]
144
+ }]
145
+ }],
146
+ propDecorators: {
147
+ name: [{
148
+ type: i0.Input,
149
+ args: [{
150
+ isSignal: true,
151
+ alias: "name",
152
+ required: false
153
+ }]
154
+ }],
155
+ description: [{
156
+ type: i0.Input,
157
+ args: [{
158
+ isSignal: true,
159
+ alias: "description",
160
+ required: false
161
+ }]
162
+ }],
163
+ fileType: [{
164
+ type: i0.Input,
165
+ args: [{
166
+ isSignal: true,
167
+ alias: "fileType",
168
+ required: false
169
+ }]
170
+ }],
171
+ size: [{
172
+ type: i0.Input,
173
+ args: [{
174
+ isSignal: true,
175
+ alias: "size",
176
+ required: false
177
+ }]
178
+ }],
179
+ src: [{
180
+ type: i0.Input,
181
+ args: [{
182
+ isSignal: true,
183
+ alias: "src",
184
+ required: false
185
+ }]
186
+ }],
187
+ previewImage: [{
188
+ type: i0.Input,
189
+ args: [{
190
+ isSignal: true,
191
+ alias: "previewImage",
192
+ required: false
193
+ }]
194
+ }]
195
+ }
196
+ });
35
197
  export { CmatFilePreviewComponent };
36
- //# sourceMappingURL=cmat-components-file-preview.mjs.map
198
+
199
+ //# sourceMappingURL=cmat-components-file-preview.mjs.map