cmat 0.0.7 → 0.0.9

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 (320) hide show
  1. package/components/adapter/dayjs-datetime-adapter.d.ts +1 -1
  2. package/components/breadcrumb/breadcrumb.service.d.ts +1 -1
  3. package/components/card/card.component.d.ts +1 -1
  4. package/components/cascade/cascade-list/cascade-list.component.d.ts +45 -21
  5. package/components/chip-input/chip-input.component.d.ts +39 -12
  6. package/components/custom-formly/extension/addons.extension.d.ts +2 -0
  7. package/components/custom-formly/index.d.ts +5 -0
  8. package/components/custom-formly/public-api.d.ts +26 -0
  9. package/components/custom-formly/types/button/button.component.d.ts +18 -0
  10. package/components/custom-formly/types/cascade/cascade.component.d.ts +38 -0
  11. package/components/custom-formly/types/checklist/checklist.component.d.ts +41 -0
  12. package/components/custom-formly/types/chips/chips.component.d.ts +27 -0
  13. package/components/custom-formly/types/color-picker/color-picker.component.d.ts +7 -0
  14. package/components/custom-formly/types/date-range/date-range.component.d.ts +20 -0
  15. package/components/custom-formly/types/datepicker/datepicker.component.d.ts +41 -0
  16. package/components/custom-formly/types/multicheckbox/multicheckbox.component.d.ts +44 -0
  17. package/components/custom-formly/types/number/number.component.d.ts +20 -0
  18. package/components/custom-formly/types/radio/radio.component.d.ts +44 -0
  19. package/components/custom-formly/types/rating/rating.component.d.ts +24 -0
  20. package/components/custom-formly/types/repeat/repeat.component.d.ts +16 -0
  21. package/components/custom-formly/types/select/select.component.d.ts +54 -0
  22. package/components/custom-formly/types/select-tree/select-tree.component.d.ts +43 -0
  23. package/components/custom-formly/types/stepper/horizontal/stepper.component.d.ts +9 -0
  24. package/components/custom-formly/types/stepper/stepper.type.d.ts +6 -0
  25. package/components/custom-formly/types/stepper/vertical/stepper.component.d.ts +9 -0
  26. package/components/custom-formly/types/table/table.component.d.ts +43 -0
  27. package/components/custom-formly/types/tabs/tab.component.d.ts +8 -0
  28. package/components/custom-formly/types/tags/tags.component.d.ts +41 -0
  29. package/components/custom-formly/types/textarea/textarea.component.d.ts +13 -0
  30. package/components/custom-formly/types/upload/upload.component.d.ts +31 -0
  31. package/components/custom-formly/wrappers/addons/addons.component.d.ts +10 -0
  32. package/components/custom-formly/wrappers/card/card.component.d.ts +6 -0
  33. package/components/custom-formly/wrappers/expansion/expansion.component.d.ts +6 -0
  34. package/components/custom-formly/wrappers/panel/panel.component.d.ts +6 -0
  35. package/components/date-range/date-range.component.d.ts +8 -6
  36. package/components/drawer/drawer.component.d.ts +2 -2
  37. package/components/fullscreen/fullscreen.component.d.ts +2 -9
  38. package/components/fullscreen/public-api.d.ts +0 -1
  39. package/components/material-color-picker/material-color-picker.component.d.ts +8 -4
  40. package/components/material-datetimepicker/calendar.d.ts +2 -2
  41. package/components/material-datetimepicker/clock.d.ts +1 -1
  42. package/components/material-datetimepicker/datetimepicker-input.d.ts +1 -1
  43. package/components/material-datetimepicker/datetimepicker-toggle.d.ts +1 -1
  44. package/components/material-datetimepicker/datetimepicker.d.ts +5 -10
  45. package/components/material-datetimepicker/month-view.d.ts +1 -2
  46. package/components/material-datetimepicker/multi-year-view.d.ts +1 -1
  47. package/components/material-datetimepicker/time.d.ts +2 -2
  48. package/components/material-datetimepicker/year-view.d.ts +1 -1
  49. package/components/navigation/horizontal/components/basic/basic.component.d.ts +1 -1
  50. package/components/navigation/horizontal/components/branch/branch.component.d.ts +1 -1
  51. package/components/navigation/horizontal/horizontal.component.d.ts +2 -2
  52. package/components/navigation/vertical/components/aside/aside.component.d.ts +1 -1
  53. package/components/navigation/vertical/components/basic/basic.component.d.ts +1 -7
  54. package/components/navigation/vertical/components/collapsable/collapsable.component.d.ts +1 -1
  55. package/components/navigation/vertical/components/group/group.component.d.ts +1 -1
  56. package/components/navigation/vertical/vertical.component.d.ts +5 -5
  57. package/components/popover/popover-trigger.d.ts +1 -1
  58. package/components/popover/popover.component.d.ts +3 -3
  59. package/components/rating/rating.component.d.ts +38 -9
  60. package/components/select-search/select-search.component.d.ts +4 -4
  61. package/components/select-tree/select-tree.component.d.ts +50 -21
  62. package/components/toast/toast.component.d.ts +4 -4
  63. package/components/transfer-picker/filter/filter.component.d.ts +1 -1
  64. package/components/transfer-picker/transfer-picker-source/transfer-picker-source.component.d.ts +2 -2
  65. package/components/transfer-picker/transfer-picker.component.d.ts +1 -1
  66. package/components/upload/files.type.d.ts +22 -0
  67. package/components/upload/files.util.service.d.ts +20 -0
  68. package/components/upload/index.d.ts +5 -0
  69. package/components/upload/public-api.d.ts +4 -0
  70. package/components/upload/upload-queue/upload-queue.component.d.ts +39 -0
  71. package/components/upload/upload.component.d.ts +32 -0
  72. package/esm2022/animations/public-api.mjs +2 -2
  73. package/esm2022/components/adapter/dayjs-date-adapter.mjs +6 -6
  74. package/esm2022/components/adapter/dayjs-datetime-adapter.mjs +5 -5
  75. package/esm2022/components/adapter/native-datetime-adapter.mjs +3 -3
  76. package/esm2022/components/breadcrumb/breadcrumb-item.directive.mjs +3 -3
  77. package/esm2022/components/breadcrumb/breadcrumb.component.mjs +6 -6
  78. package/esm2022/components/breadcrumb/breadcrumb.service.mjs +5 -5
  79. package/esm2022/components/card/card.component.mjs +5 -5
  80. package/esm2022/components/cascade/cascade-bottom-sheet/cascade-bottom-sheet.component.mjs +7 -7
  81. package/esm2022/components/cascade/cascade-list/cascade-list.component.mjs +207 -114
  82. package/esm2022/components/cascade/cascade-menu/cascade-menu.component.mjs +4 -4
  83. package/esm2022/components/chip-input/chip-input.component.mjs +152 -49
  84. package/esm2022/components/custom-formly/cmat-components-custom-formly.mjs +5 -0
  85. package/esm2022/components/custom-formly/extension/addons.extension.mjs +13 -0
  86. package/esm2022/components/custom-formly/public-api.mjs +27 -0
  87. package/esm2022/components/custom-formly/types/button/button.component.mjs +39 -0
  88. package/esm2022/components/custom-formly/types/cascade/cascade.component.mjs +71 -0
  89. package/esm2022/components/custom-formly/types/checklist/checklist.component.mjs +161 -0
  90. package/esm2022/components/custom-formly/types/chips/chips.component.mjs +55 -0
  91. package/esm2022/components/custom-formly/types/color-picker/color-picker.component.mjs +15 -0
  92. package/esm2022/components/custom-formly/types/date-range/date-range.component.mjs +25 -0
  93. package/esm2022/components/custom-formly/types/datepicker/datepicker.component.mjs +51 -0
  94. package/esm2022/components/custom-formly/types/multicheckbox/multicheckbox.component.mjs +89 -0
  95. package/esm2022/components/custom-formly/types/number/number.component.mjs +27 -0
  96. package/esm2022/components/custom-formly/types/radio/radio.component.mjs +88 -0
  97. package/esm2022/components/custom-formly/types/rating/rating.component.mjs +27 -0
  98. package/esm2022/components/custom-formly/types/repeat/repeat.component.mjs +28 -0
  99. package/esm2022/components/custom-formly/types/select/select.component.mjs +169 -0
  100. package/esm2022/components/custom-formly/types/select-tree/select-tree.component.mjs +66 -0
  101. package/esm2022/components/custom-formly/types/stepper/horizontal/stepper.component.mjs +31 -0
  102. package/esm2022/components/custom-formly/types/stepper/stepper.type.mjs +2 -0
  103. package/esm2022/components/custom-formly/types/stepper/vertical/stepper.component.mjs +31 -0
  104. package/esm2022/components/custom-formly/types/table/table.component.mjs +116 -0
  105. package/esm2022/components/custom-formly/types/tabs/tab.component.mjs +19 -0
  106. package/esm2022/components/custom-formly/types/tags/tags.component.mjs +149 -0
  107. package/esm2022/components/custom-formly/types/textarea/textarea.component.mjs +25 -0
  108. package/esm2022/components/custom-formly/types/upload/upload.component.mjs +58 -0
  109. package/esm2022/components/custom-formly/wrappers/addons/addons.component.mjs +92 -0
  110. package/esm2022/components/custom-formly/wrappers/card/card.component.mjs +14 -0
  111. package/esm2022/components/custom-formly/wrappers/expansion/expansion.component.mjs +14 -0
  112. package/esm2022/components/custom-formly/wrappers/panel/panel.component.mjs +12 -0
  113. package/esm2022/components/date-range/date-range.component.mjs +26 -17
  114. package/esm2022/components/drawer/drawer.component.mjs +5 -5
  115. package/esm2022/components/drawer/drawer.service.mjs +3 -3
  116. package/esm2022/components/fullscreen/fullscreen.component.mjs +16 -73
  117. package/esm2022/components/fullscreen/public-api.mjs +1 -2
  118. package/esm2022/components/highlight/highlight.component.mjs +5 -5
  119. package/esm2022/components/highlight/highlight.service.mjs +3 -3
  120. package/esm2022/components/json-editor/json-editor.component.mjs +3 -3
  121. package/esm2022/components/masonry/masonry.component.mjs +5 -5
  122. package/esm2022/components/material-color-picker/material-color-picker.component.mjs +22 -12
  123. package/esm2022/components/material-datetimepicker/calendar-body.mjs +3 -3
  124. package/esm2022/components/material-datetimepicker/calendar.mjs +11 -12
  125. package/esm2022/components/material-datetimepicker/clock.mjs +5 -5
  126. package/esm2022/components/material-datetimepicker/datetimepicker-input.mjs +4 -5
  127. package/esm2022/components/material-datetimepicker/datetimepicker-intl.mjs +3 -3
  128. package/esm2022/components/material-datetimepicker/datetimepicker-toggle.mjs +9 -9
  129. package/esm2022/components/material-datetimepicker/datetimepicker.mjs +17 -22
  130. package/esm2022/components/material-datetimepicker/month-view.mjs +5 -6
  131. package/esm2022/components/material-datetimepicker/multi-year-view.mjs +7 -8
  132. package/esm2022/components/material-datetimepicker/time.mjs +8 -8
  133. package/esm2022/components/material-datetimepicker/year-view.mjs +7 -8
  134. package/esm2022/components/navigation/horizontal/components/basic/basic.component.mjs +8 -8
  135. package/esm2022/components/navigation/horizontal/components/branch/branch.component.mjs +8 -8
  136. package/esm2022/components/navigation/horizontal/components/divider/divider.component.mjs +5 -5
  137. package/esm2022/components/navigation/horizontal/components/spacer/spacer.component.mjs +6 -6
  138. package/esm2022/components/navigation/horizontal/horizontal.component.mjs +6 -6
  139. package/esm2022/components/navigation/navigation.service.mjs +3 -3
  140. package/esm2022/components/navigation/vertical/components/aside/aside.component.mjs +11 -11
  141. package/esm2022/components/navigation/vertical/components/basic/basic.component.mjs +7 -24
  142. package/esm2022/components/navigation/vertical/components/collapsable/collapsable.component.mjs +10 -10
  143. package/esm2022/components/navigation/vertical/components/divider/divider.component.mjs +5 -5
  144. package/esm2022/components/navigation/vertical/components/group/group.component.mjs +9 -9
  145. package/esm2022/components/navigation/vertical/components/spacer/spacer.component.mjs +6 -6
  146. package/esm2022/components/navigation/vertical/vertical.component.mjs +11 -11
  147. package/esm2022/components/pagination/pagination.component.mjs +10 -10
  148. package/esm2022/components/pagination/pagination.directive.mjs +4 -4
  149. package/esm2022/components/pagination/pagination.pipe.mjs +4 -4
  150. package/esm2022/components/pagination/pagination.service.mjs +3 -3
  151. package/esm2022/components/password-strength/mat-pass-toggle-visibility/mat-pass-toggle-visibility.component.mjs +6 -6
  152. package/esm2022/components/password-strength/mat-password-strength/mat-password-strength.component.mjs +5 -5
  153. package/esm2022/components/password-strength/mat-password-strength-info/mat-password-strength-info.component.mjs +6 -6
  154. package/esm2022/components/popover/popover-trigger.mjs +5 -5
  155. package/esm2022/components/popover/popover.component.mjs +8 -9
  156. package/esm2022/components/popover/popover.target.mjs +3 -3
  157. package/esm2022/components/progress-bar/progress-bar.component.mjs +6 -6
  158. package/esm2022/components/rating/rating.component.mjs +122 -23
  159. package/esm2022/components/select-search/select-no-entries-found.directive.mjs +3 -3
  160. package/esm2022/components/select-search/select-search-clear.directive.mjs +3 -3
  161. package/esm2022/components/select-search/select-search.component.mjs +15 -15
  162. package/esm2022/components/select-tree/select-tree.component.mjs +281 -157
  163. package/esm2022/components/timeline/timeline-item/timeline-item.component.mjs +9 -9
  164. package/esm2022/components/timeline/timeline.component.mjs +5 -5
  165. package/esm2022/components/toast/toast-modal.component.mjs +5 -5
  166. package/esm2022/components/toast/toast.component.mjs +6 -6
  167. package/esm2022/components/toast/toast.service.mjs +3 -3
  168. package/esm2022/components/transfer-picker/filter/filter.component.mjs +9 -9
  169. package/esm2022/components/transfer-picker/search/search.component.mjs +6 -6
  170. package/esm2022/components/transfer-picker/transfer-picker-source/transfer-picker-source.component.mjs +11 -11
  171. package/esm2022/components/transfer-picker/transfer-picker-target/transfer-picker-target.component.mjs +5 -5
  172. package/esm2022/components/transfer-picker/transfer-picker.component.mjs +7 -7
  173. package/esm2022/components/transfer-picker/transfer-picker.service.mjs +4 -4
  174. package/esm2022/components/upload/cmat-components-upload.mjs +5 -0
  175. package/esm2022/components/upload/files.type.mjs +2 -0
  176. package/esm2022/components/upload/files.util.service.mjs +100 -0
  177. package/esm2022/components/upload/public-api.mjs +5 -0
  178. package/esm2022/components/upload/upload-queue/upload-queue.component.mjs +154 -0
  179. package/esm2022/components/upload/upload.component.mjs +118 -0
  180. package/esm2022/directives/animate-on-scroll/animate-on-scroll.directive.mjs +3 -3
  181. package/esm2022/directives/animate-on-scroll/scroll.service.mjs +3 -3
  182. package/esm2022/directives/autofocus/autofocus.directive.mjs +3 -3
  183. package/esm2022/directives/debounce/abstract-debounce.directive.mjs +3 -3
  184. package/esm2022/directives/debounce/debounce-click.directive.mjs +3 -3
  185. package/esm2022/directives/debounce/debounce-keyup.directive.mjs +3 -3
  186. package/esm2022/directives/digit-only/digit-only.directive.mjs +3 -3
  187. package/esm2022/directives/digit-only/mask.directive.mjs +3 -3
  188. package/esm2022/directives/equal-validator/equal-validator.directive.mjs +3 -3
  189. package/esm2022/lib/mock-api/mock-api.interceptor.mjs +5 -5
  190. package/esm2022/lib/mock-api/mock-api.service.mjs +3 -3
  191. package/esm2022/pipes/bytes/bytes.pipe.mjs +3 -3
  192. package/esm2022/pipes/date-format/date-format.pipe.mjs +3 -3
  193. package/esm2022/pipes/find-by-key/find-by-key.pipe.mjs +3 -3
  194. package/esm2022/pipes/group-by/group-by.pipe.mjs +3 -3
  195. package/esm2022/pipes/keys/keys.pipe.mjs +3 -3
  196. package/esm2022/pipes/secure/secure-pipe.mjs +5 -5
  197. package/esm2022/pipes/uppercase/uppercase.pipe.mjs +3 -3
  198. package/esm2022/public-api.mjs +1 -1
  199. package/esm2022/services/alert/alert.service.mjs +7 -7
  200. package/esm2022/services/alert/enum.mjs +2 -2
  201. package/esm2022/services/config/config.service.mjs +5 -5
  202. package/esm2022/services/config/urlStateConfig.service.mjs +5 -5
  203. package/esm2022/services/confirmation/confirmation.service.mjs +5 -5
  204. package/esm2022/services/confirmation/dialog/dialog.component.mjs +7 -7
  205. package/esm2022/services/data/data.service.mjs +5 -5
  206. package/esm2022/services/loading/loading.interceptor.mjs +4 -4
  207. package/esm2022/services/loading/loading.service.mjs +3 -3
  208. package/esm2022/services/local-storage/local-storage.service.mjs +3 -3
  209. package/esm2022/services/media-watcher/media-watcher.service.mjs +5 -5
  210. package/esm2022/services/platform/platform.service.mjs +4 -4
  211. package/esm2022/services/splash-screen/splash-screen.service.mjs +6 -6
  212. package/esm2022/services/title/title.service.mjs +4 -4
  213. package/esm2022/services/translation/translation.service.mjs +3 -3
  214. package/esm2022/services/utils/utils.service.mjs +54 -9
  215. package/fesm2022/cmat-animations.mjs +15 -15
  216. package/fesm2022/cmat-animations.mjs.map +1 -1
  217. package/fesm2022/cmat-components-adapter.mjs +11 -11
  218. package/fesm2022/cmat-components-adapter.mjs.map +1 -1
  219. package/fesm2022/cmat-components-breadcrumb.mjs +11 -11
  220. package/fesm2022/cmat-components-breadcrumb.mjs.map +1 -1
  221. package/fesm2022/cmat-components-card.mjs +4 -4
  222. package/fesm2022/cmat-components-card.mjs.map +1 -1
  223. package/fesm2022/cmat-components-cascade.mjs +215 -123
  224. package/fesm2022/cmat-components-cascade.mjs.map +1 -1
  225. package/fesm2022/cmat-components-chip-input.mjs +153 -50
  226. package/fesm2022/cmat-components-chip-input.mjs.map +1 -1
  227. package/fesm2022/cmat-components-custom-formly.mjs +1331 -0
  228. package/fesm2022/cmat-components-custom-formly.mjs.map +1 -0
  229. package/fesm2022/cmat-components-date-range.mjs +27 -18
  230. package/fesm2022/cmat-components-date-range.mjs.map +1 -1
  231. package/fesm2022/cmat-components-drawer.mjs +8 -8
  232. package/fesm2022/cmat-components-drawer.mjs.map +1 -1
  233. package/fesm2022/cmat-components-fullscreen.mjs +16 -73
  234. package/fesm2022/cmat-components-fullscreen.mjs.map +1 -1
  235. package/fesm2022/cmat-components-highlight.mjs +7 -7
  236. package/fesm2022/cmat-components-highlight.mjs.map +1 -1
  237. package/fesm2022/cmat-components-json-editor.mjs +3 -3
  238. package/fesm2022/cmat-components-masonry.mjs +4 -4
  239. package/fesm2022/cmat-components-masonry.mjs.map +1 -1
  240. package/fesm2022/cmat-components-material-color-picker.mjs +21 -11
  241. package/fesm2022/cmat-components-material-color-picker.mjs.map +1 -1
  242. package/fesm2022/cmat-components-material-datetimepicker.mjs +189 -195
  243. package/fesm2022/cmat-components-material-datetimepicker.mjs.map +1 -1
  244. package/fesm2022/cmat-components-navigation.mjs +166 -183
  245. package/fesm2022/cmat-components-navigation.mjs.map +1 -1
  246. package/fesm2022/cmat-components-pagination.mjs +20 -20
  247. package/fesm2022/cmat-components-pagination.mjs.map +1 -1
  248. package/fesm2022/cmat-components-password-strength.mjs +13 -13
  249. package/fesm2022/cmat-components-password-strength.mjs.map +1 -1
  250. package/fesm2022/cmat-components-popover.mjs +13 -14
  251. package/fesm2022/cmat-components-popover.mjs.map +1 -1
  252. package/fesm2022/cmat-components-progress-bar.mjs +6 -6
  253. package/fesm2022/cmat-components-progress-bar.mjs.map +1 -1
  254. package/fesm2022/cmat-components-rating.mjs +121 -22
  255. package/fesm2022/cmat-components-rating.mjs.map +1 -1
  256. package/fesm2022/cmat-components-select-search.mjs +41 -41
  257. package/fesm2022/cmat-components-select-search.mjs.map +1 -1
  258. package/fesm2022/cmat-components-select-tree.mjs +281 -157
  259. package/fesm2022/cmat-components-select-tree.mjs.map +1 -1
  260. package/fesm2022/cmat-components-timeline.mjs +12 -12
  261. package/fesm2022/cmat-components-timeline.mjs.map +1 -1
  262. package/fesm2022/cmat-components-toast.mjs +12 -12
  263. package/fesm2022/cmat-components-toast.mjs.map +1 -1
  264. package/fesm2022/cmat-components-transfer-picker.mjs +33 -33
  265. package/fesm2022/cmat-components-transfer-picker.mjs.map +1 -1
  266. package/fesm2022/cmat-components-upload.mjs +366 -0
  267. package/fesm2022/cmat-components-upload.mjs.map +1 -0
  268. package/fesm2022/cmat-directives-animate-on-scroll.mjs +6 -6
  269. package/fesm2022/cmat-directives-autofocus.mjs +3 -3
  270. package/fesm2022/cmat-directives-debounce.mjs +9 -9
  271. package/fesm2022/cmat-directives-digit-only.mjs +6 -6
  272. package/fesm2022/cmat-directives-equal-validator.mjs +3 -3
  273. package/fesm2022/cmat-lib-mock-api.mjs +6 -6
  274. package/fesm2022/cmat-lib-mock-api.mjs.map +1 -1
  275. package/fesm2022/cmat-pipes-bytes.mjs +3 -3
  276. package/fesm2022/cmat-pipes-date-format.mjs +3 -3
  277. package/fesm2022/cmat-pipes-find-by-key.mjs +3 -3
  278. package/fesm2022/cmat-pipes-group-by.mjs +3 -3
  279. package/fesm2022/cmat-pipes-keys.mjs +3 -3
  280. package/fesm2022/cmat-pipes-secure.mjs +4 -4
  281. package/fesm2022/cmat-pipes-secure.mjs.map +1 -1
  282. package/fesm2022/cmat-pipes-uppercase.mjs +3 -3
  283. package/fesm2022/cmat-services-alert.mjs +6 -6
  284. package/fesm2022/cmat-services-alert.mjs.map +1 -1
  285. package/fesm2022/cmat-services-config.mjs +7 -7
  286. package/fesm2022/cmat-services-config.mjs.map +1 -1
  287. package/fesm2022/cmat-services-confirmation.mjs +11 -11
  288. package/fesm2022/cmat-services-confirmation.mjs.map +1 -1
  289. package/fesm2022/cmat-services-data.mjs +5 -5
  290. package/fesm2022/cmat-services-data.mjs.map +1 -1
  291. package/fesm2022/cmat-services-loading.mjs +6 -6
  292. package/fesm2022/cmat-services-loading.mjs.map +1 -1
  293. package/fesm2022/cmat-services-local-storage.mjs +3 -3
  294. package/fesm2022/cmat-services-media-watcher.mjs +4 -4
  295. package/fesm2022/cmat-services-media-watcher.mjs.map +1 -1
  296. package/fesm2022/cmat-services-platform.mjs +3 -3
  297. package/fesm2022/cmat-services-platform.mjs.map +1 -1
  298. package/fesm2022/cmat-services-splash-screen.mjs +5 -5
  299. package/fesm2022/cmat-services-splash-screen.mjs.map +1 -1
  300. package/fesm2022/cmat-services-title.mjs +3 -3
  301. package/fesm2022/cmat-services-title.mjs.map +1 -1
  302. package/fesm2022/cmat-services-translation.mjs +3 -3
  303. package/fesm2022/cmat-services-utils.mjs +53 -8
  304. package/fesm2022/cmat-services-utils.mjs.map +1 -1
  305. package/package.json +30 -18
  306. package/pipes/secure/secure-pipe.d.ts +1 -1
  307. package/services/alert/enum.d.ts +1 -1
  308. package/services/confirmation/confirmation.service.d.ts +1 -1
  309. package/services/data/data.service.d.ts +1 -1
  310. package/services/media-watcher/media-watcher.service.d.ts +1 -1
  311. package/services/title/title.service.d.ts +1 -1
  312. package/services/utils/utils.service.d.ts +1 -0
  313. package/styles/components/bundle.scss +18 -5
  314. package/styles/overrides/angular-material.scss +51 -52
  315. package/styles/tailwind.scss +2 -8
  316. package/styles/themes.scss +7 -7
  317. package/styles/user-themes.scss +1 -1
  318. package/tailwind/plugins/utilities.js +1 -1
  319. package/components/fullscreen/fullscreen.types.d.ts +0 -13
  320. package/esm2022/components/fullscreen/fullscreen.types.mjs +0 -2
@@ -0,0 +1,1331 @@
1
+ import { isNil, isString, isArray } from 'lodash-es';
2
+ import * as i0 from '@angular/core';
3
+ import { Component, ViewChild, ChangeDetectionStrategy, ViewEncapsulation, ViewChildren, inject, ViewContainerRef } from '@angular/core';
4
+ import * as i4 from '@angular/material/icon';
5
+ import { MatIconModule } from '@angular/material/icon';
6
+ import * as i1$4 from '@ngx-formly/core';
7
+ import { FieldWrapper, ɵobserve as _observe, FieldArrayType, FormlyModule, FieldType as FieldType$2 } from '@ngx-formly/core';
8
+ import { FormlyMaterialModule, FieldType as FieldType$1 } from '@ngx-formly/material';
9
+ import * as i1 from '@angular/material/card';
10
+ import { MatCardModule } from '@angular/material/card';
11
+ import * as i1$1 from '@angular/material/expansion';
12
+ import { MatExpansionModule } from '@angular/material/expansion';
13
+ import * as i3 from '@angular/material/button';
14
+ import { MatButtonModule } from '@angular/material/button';
15
+ import { FieldType } from '@ngx-formly/material/form-field';
16
+ import * as i2$1 from '@angular/forms';
17
+ import { ReactiveFormsModule, FormsModule, FormControl, FormGroup } from '@angular/forms';
18
+ import { Subject, takeUntil, BehaviorSubject, ReplaySubject, of, take } from 'rxjs';
19
+ import { CmatCascadeListComponent } from 'cmat/components/cascade';
20
+ import * as i1$2 from '@angular/common/http';
21
+ import * as i2 from 'cmat/services/media-watcher';
22
+ import { NgClass, AsyncPipe, NgStyle, NgTemplateOutlet } from '@angular/common';
23
+ import * as i2$2 from '@angular/material/checkbox';
24
+ import { MatCheckboxModule, MatCheckbox } from '@angular/material/checkbox';
25
+ import * as i3$1 from '@angular/material/core';
26
+ import { MatRippleModule } from '@angular/material/core';
27
+ import { takeUntil as takeUntil$1 } from 'rxjs/operators';
28
+ import { CmatSecurePipe } from 'cmat/pipes/secure';
29
+ import { CmatChipInputComponent } from 'cmat/components/chip-input';
30
+ import { CmatMaterialColorPickerComponent } from 'cmat/components/material-color-picker';
31
+ import { CmatDateRangeComponent } from 'cmat/components/date-range';
32
+ import * as i1$3 from '@angular/material/input';
33
+ import { MatInputModule } from '@angular/material/input';
34
+ import { CmatDatetimepickerToggleComponent, CmatDatetimepickerInputDirective, CmatDatetimepickerComponent } from 'cmat/components/material-datetimepicker';
35
+ import * as i3$2 from '@angular/material/form-field';
36
+ import * as i3$3 from '@ngx-formly/core/select';
37
+ import { FormlySelectModule } from '@ngx-formly/core/select';
38
+ import { CmatDigitOnlyDirective } from 'cmat/directives/digit-only';
39
+ import { CmatRatingComponent } from 'cmat/components/rating';
40
+ import * as i2$3 from '@angular/material/radio';
41
+ import { MatRadioGroup, MatRadioModule } from '@angular/material/radio';
42
+ import * as i2$4 from '@angular/material/select';
43
+ import { MatSelectModule } from '@angular/material/select';
44
+ import { CmatSelectSearchComponent } from 'cmat/components/select-search';
45
+ import { CmatSelectTreeComponent } from 'cmat/components/select-tree';
46
+ import * as i2$5 from '@angular/material/stepper';
47
+ import { MatStepperModule } from '@angular/material/stepper';
48
+ import { CdkDrag } from '@angular/cdk/drag-drop';
49
+ import * as i6 from '@angular/material/dialog';
50
+ import { MatDialog, MatDialogModule } from '@angular/material/dialog';
51
+ import * as i3$4 from '@angular/material/table';
52
+ import { MatTableModule } from '@angular/material/table';
53
+ import * as i7 from '@angular/material/tooltip';
54
+ import { MatTooltipModule } from '@angular/material/tooltip';
55
+ import * as i1$5 from '@angular/material/tabs';
56
+ import { MatTabsModule } from '@angular/material/tabs';
57
+ import { TemplatePortal } from '@angular/cdk/portal';
58
+ import { isArray as isArray$1 } from 'lodash';
59
+ import * as i2$6 from '@angular/cdk/overlay';
60
+ import { CmatUploadQueueComponent } from 'cmat/components/upload';
61
+
62
+ function addonsExtension(field) {
63
+ if (!field.props || (field.wrappers && field.wrappers.indexOf('addons') !== -1)) {
64
+ return;
65
+ }
66
+ if ((field.props.addonLeft && ((!isNil(field.props.addonLeft.icon) && field.props.addonLeft.icon !== '')
67
+ || (!isNil(field.props.addonLeft.text)) && field.props.addonLeft.text !== ''))
68
+ || (field.props.addonRight && ((!isNil(field.props.addonRight.icon) && field.props.addonRight.icon !== '')
69
+ || (!isNil(field.props.addonRight.text)) && field.props.addonRight.text !== ''))) {
70
+ field.wrappers = [...(field.wrappers || []), 'addons'];
71
+ }
72
+ }
73
+
74
+ class CmatAddonsWrapperComponent extends FieldWrapper {
75
+ ngAfterViewInit() {
76
+ if (this.matPrefix) {
77
+ this.props.prefix = this.matPrefix;
78
+ }
79
+ if (this.matSuffix) {
80
+ this.props.suffix = this.matSuffix;
81
+ }
82
+ }
83
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatAddonsWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
84
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.7", type: CmatAddonsWrapperComponent, isStandalone: true, selector: "cmat-addons-wrapper", viewQueries: [{ propertyName: "matPrefix", first: true, predicate: ["matPrefix"], descendants: true, static: true }, { propertyName: "matSuffix", first: true, predicate: ["matSuffix"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: `
85
+ <ng-template #matPrefix>
86
+ @if(props.addonLeft){
87
+ <span>
88
+ @if(props.addonLeft.icon){
89
+ <mat-icon [svgIcon]="props.addonLeft.icon"></mat-icon>
90
+ }
91
+ @if(props.addonLeft.text){
92
+ <span>{{ props.addonLeft.text }}</span>
93
+ }
94
+
95
+ </span>
96
+ }
97
+ </ng-template>
98
+
99
+ <ng-container #fieldComponent></ng-container>
100
+
101
+ <ng-template #matSuffix>
102
+ @if(props.addonRight){
103
+ <span>
104
+ @if(props.addonRight.icon){
105
+ <mat-icon [svgIcon]="props.addonRight.icon"></mat-icon>
106
+ }
107
+ @if(props.addonRight.text) {
108
+ <span>{{ props.addonRight.text }}</span>
109
+ }
110
+ </span>
111
+ }
112
+ </ng-template>
113
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: FormlyMaterialModule }] }); }
114
+ }
115
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatAddonsWrapperComponent, decorators: [{
116
+ type: Component,
117
+ args: [{
118
+ selector: 'cmat-addons-wrapper',
119
+ template: `
120
+ <ng-template #matPrefix>
121
+ @if(props.addonLeft){
122
+ <span>
123
+ @if(props.addonLeft.icon){
124
+ <mat-icon [svgIcon]="props.addonLeft.icon"></mat-icon>
125
+ }
126
+ @if(props.addonLeft.text){
127
+ <span>{{ props.addonLeft.text }}</span>
128
+ }
129
+
130
+ </span>
131
+ }
132
+ </ng-template>
133
+
134
+ <ng-container #fieldComponent></ng-container>
135
+
136
+ <ng-template #matSuffix>
137
+ @if(props.addonRight){
138
+ <span>
139
+ @if(props.addonRight.icon){
140
+ <mat-icon [svgIcon]="props.addonRight.icon"></mat-icon>
141
+ }
142
+ @if(props.addonRight.text) {
143
+ <span>{{ props.addonRight.text }}</span>
144
+ }
145
+ </span>
146
+ }
147
+ </ng-template>
148
+ `,
149
+ standalone: true,
150
+ imports: [MatIconModule, FormlyMaterialModule]
151
+ }]
152
+ }], propDecorators: { matPrefix: [{
153
+ type: ViewChild,
154
+ args: ['matPrefix', { static: true }]
155
+ }], matSuffix: [{
156
+ type: ViewChild,
157
+ args: ['matSuffix', { static: true }]
158
+ }] } });
159
+
160
+ class CmatCardWrapperComponent extends FieldWrapper {
161
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatCardWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
162
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.7", type: CmatCardWrapperComponent, isStandalone: true, selector: "cmat-card-wrapper", usesInheritance: true, ngImport: i0, template: "<mat-card class=\"dark:bg-white dark:bg-opacity-5\">\r\n @if(props.label){\r\n <mat-card-title class=\"p-4\">{{ props.label }}</mat-card-title>\r\n }\r\n \r\n <mat-card-content>\r\n <ng-container #fieldComponent></ng-container>\r\n </mat-card-content> \r\n</mat-card>", dependencies: [{ kind: "ngmodule", type: MatCardModule }, { kind: "component", type: i1.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i1.MatCardContent, selector: "mat-card-content" }, { kind: "directive", type: i1.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
163
+ }
164
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatCardWrapperComponent, decorators: [{
165
+ type: Component,
166
+ args: [{ selector: 'cmat-card-wrapper', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [MatCardModule], template: "<mat-card class=\"dark:bg-white dark:bg-opacity-5\">\r\n @if(props.label){\r\n <mat-card-title class=\"p-4\">{{ props.label }}</mat-card-title>\r\n }\r\n \r\n <mat-card-content>\r\n <ng-container #fieldComponent></ng-container>\r\n </mat-card-content> \r\n</mat-card>" }]
167
+ }] });
168
+
169
+ class CmatExpansionWrapperComponent extends FieldWrapper {
170
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatExpansionWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
171
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.7", type: CmatExpansionWrapperComponent, isStandalone: true, selector: "cmat-expansion-wrapper", usesInheritance: true, ngImport: i0, template: "<mat-expansion-panel [expanded]=\"true\">\r\n <mat-expansion-panel-header>\r\n <mat-panel-title>\r\n {{ to.label }}\r\n </mat-panel-title>\r\n <mat-panel-description>\r\n {{ to.description }}\r\n </mat-panel-description>\r\n </mat-expansion-panel-header>\r\n <ng-template matExpansionPanelContent #fieldComponent></ng-template>\r\n</mat-expansion-panel>", dependencies: [{ kind: "ngmodule", type: MatExpansionModule }, { kind: "component", type: i1$1.MatExpansionPanel, selector: "mat-expansion-panel", inputs: ["hideToggle", "togglePosition"], outputs: ["afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { kind: "component", type: i1$1.MatExpansionPanelHeader, selector: "mat-expansion-panel-header", inputs: ["expandedHeight", "collapsedHeight", "tabIndex"] }, { kind: "directive", type: i1$1.MatExpansionPanelTitle, selector: "mat-panel-title" }, { kind: "directive", type: i1$1.MatExpansionPanelDescription, selector: "mat-panel-description" }, { kind: "directive", type: i1$1.MatExpansionPanelContent, selector: "ng-template[matExpansionPanelContent]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
172
+ }
173
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatExpansionWrapperComponent, decorators: [{
174
+ type: Component,
175
+ args: [{ selector: 'cmat-expansion-wrapper', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [MatExpansionModule], template: "<mat-expansion-panel [expanded]=\"true\">\r\n <mat-expansion-panel-header>\r\n <mat-panel-title>\r\n {{ to.label }}\r\n </mat-panel-title>\r\n <mat-panel-description>\r\n {{ to.description }}\r\n </mat-panel-description>\r\n </mat-expansion-panel-header>\r\n <ng-template matExpansionPanelContent #fieldComponent></ng-template>\r\n</mat-expansion-panel>" }]
176
+ }] });
177
+
178
+ class CmatPanelWrapperComponent extends FieldWrapper {
179
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatPanelWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
180
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.7", type: CmatPanelWrapperComponent, isStandalone: true, selector: "cmat-panel-wrapper", usesInheritance: true, ngImport: i0, template: "<h3 class=\"px-2\">{{ to.label }}</h3>\r\n<div>\r\n <ng-container #fieldComponent></ng-container>\r\n</div>", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
181
+ }
182
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatPanelWrapperComponent, decorators: [{
183
+ type: Component,
184
+ args: [{ selector: 'cmat-panel-wrapper', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [], template: "<h3 class=\"px-2\">{{ to.label }}</h3>\r\n<div>\r\n <ng-container #fieldComponent></ng-container>\r\n</div>" }]
185
+ }] });
186
+
187
+ // eslint-disable-next-line @typescript-eslint/explicit-function-return-type
188
+ const evilFn = (fn) => {
189
+ const fnc = Function;
190
+ return new fnc(`return ${fn}`)();
191
+ };
192
+ class CmatButtonTypeComponent extends FieldType {
193
+ constructor() {
194
+ super(...arguments);
195
+ this.defaultOptions = {
196
+ props: {
197
+ color: 'primary'
198
+ }
199
+ };
200
+ }
201
+ onClick($event) {
202
+ if (this.props.onClick) {
203
+ if (isString(this.props.onClick)) {
204
+ const func = evilFn(this.props.onClick);
205
+ func();
206
+ }
207
+ else {
208
+ this.props.onClick($event);
209
+ }
210
+ }
211
+ }
212
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatButtonTypeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
213
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.7", type: CmatButtonTypeComponent, isStandalone: true, selector: "cmat-button-type", usesInheritance: true, ngImport: i0, template: "<button class=\"print:hidden\" mat-raised-button [type]=\"props.type\" [color]=\"props.color\" [disabled]=\"disabled\" (click)=\"onClick($event)\">\r\n {{ to.label }}\r\n</button>", dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
214
+ }
215
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatButtonTypeComponent, decorators: [{
216
+ type: Component,
217
+ args: [{ selector: 'cmat-button-type', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [MatButtonModule], template: "<button class=\"print:hidden\" mat-raised-button [type]=\"props.type\" [color]=\"props.color\" [disabled]=\"disabled\" (click)=\"onClick($event)\">\r\n {{ to.label }}\r\n</button>" }]
218
+ }] });
219
+
220
+ class CmatCascadeTypeComponent extends FieldType {
221
+ constructor(_http, _changeDetectorRef, _cmatMediaWatcherService) {
222
+ super();
223
+ this._http = _http;
224
+ this._changeDetectorRef = _changeDetectorRef;
225
+ this._cmatMediaWatcherService = _cmatMediaWatcherService;
226
+ this.defaultOptions = {
227
+ props: {
228
+ clearable: false,
229
+ fullLevels: true,
230
+ changeOnSelect: false
231
+ },
232
+ };
233
+ this.urlData = [];
234
+ this._unsubscribeAll = new Subject();
235
+ }
236
+ ngOnInit() {
237
+ const url = this.props?.domain?.url;
238
+ if (url && this.props?.domain?.code && this.props?.domain?.key && this.props?.domain?.value) {
239
+ this._http.get(url).pipe(takeUntil(this._unsubscribeAll)).subscribe((data) => {
240
+ if (data) {
241
+ const datas = data.filter((i) => {
242
+ if (this.field.props?.domain?.key)
243
+ return i[this.field.props?.domain?.key] === this.field.props?.domain?.code;
244
+ return false;
245
+ });
246
+ if (datas && this.field.props?.domain?.value) {
247
+ this.urlData = datas[0][this.field.props?.domain?.value];
248
+ }
249
+ else {
250
+ this.urlData = [];
251
+ }
252
+ }
253
+ else {
254
+ this.urlData = [];
255
+ }
256
+ this._changeDetectorRef.markForCheck();
257
+ });
258
+ }
259
+ else {
260
+ this.urlData = [];
261
+ this._changeDetectorRef.markForCheck();
262
+ }
263
+ this._cmatMediaWatcherService.onMediaChange$
264
+ .pipe(takeUntil(this._unsubscribeAll))
265
+ .subscribe(({ matchingAliases }) => {
266
+ this.isHandSet = !matchingAliases.includes('lg');
267
+ this._changeDetectorRef.markForCheck();
268
+ });
269
+ }
270
+ ngOnDestroy() {
271
+ this._unsubscribeAll.next(void 0);
272
+ this._unsubscribeAll.complete();
273
+ }
274
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatCascadeTypeComponent, deps: [{ token: i1$2.HttpClient }, { token: i0.ChangeDetectorRef }, { token: i2.CmatMediaWatcherService }], target: i0.ɵɵFactoryTarget.Component }); }
275
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.7", type: CmatCascadeTypeComponent, isStandalone: true, selector: "cmat-cascade-type", usesInheritance: true, ngImport: i0, template: "<cmat-cascade-list [formControl]=\"formControl\" [clearable]=\"props.clearable\" [fullLevels]=\"props.fullLevels\"\r\n [changeOnSelect]=\"props.changeOnSelect\" [placeholder]=\"placeholder\" [options]=\"urlData\" [tabIndex]=\"props.tabindex\"\r\n [required]=\"required\" [touchUi]=\"isHandSet\"></cmat-cascade-list>", styles: [":host{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: CmatCascadeListComponent, selector: "cmat-cascade-list", inputs: ["id", "options", "clearable", "fullLevels", "changeOnSelect", "touchUi", "placeholder", "value", "required", "disabled"], exportAs: ["cmatCascadeList"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
276
+ }
277
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatCascadeTypeComponent, decorators: [{
278
+ type: Component,
279
+ args: [{ selector: 'cmat-cascade-type', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [ReactiveFormsModule, CmatCascadeListComponent], template: "<cmat-cascade-list [formControl]=\"formControl\" [clearable]=\"props.clearable\" [fullLevels]=\"props.fullLevels\"\r\n [changeOnSelect]=\"props.changeOnSelect\" [placeholder]=\"placeholder\" [options]=\"urlData\" [tabIndex]=\"props.tabindex\"\r\n [required]=\"required\" [touchUi]=\"isHandSet\"></cmat-cascade-list>", styles: [":host{width:100%}\n"] }]
280
+ }], ctorParameters: () => [{ type: i1$2.HttpClient }, { type: i0.ChangeDetectorRef }, { type: i2.CmatMediaWatcherService }] });
281
+
282
+ class CmatCheckListTypeComponent extends FieldType {
283
+ constructor(_http) {
284
+ super();
285
+ this._http = _http;
286
+ this.isIndeterminate = false;
287
+ this.isChecked = false;
288
+ this.checklist = [];
289
+ this.filteredData = [];
290
+ this._filteredItems = new BehaviorSubject(null);
291
+ this._unsubscribeAll = new Subject();
292
+ }
293
+ get filteredItems$() {
294
+ return this._filteredItems.asObservable();
295
+ }
296
+ get datas() {
297
+ if (isArray(this.field.props?.options)) {
298
+ return this.urlData?.length > 0 ? this.urlData : this.field.props?.options || [];
299
+ }
300
+ else {
301
+ return this.urlData?.length > 0 ? this.urlData : this.optionsData || [];
302
+ }
303
+ }
304
+ ngOnInit() {
305
+ if (this.field.props?.options && !isArray(this.field.props?.options)) {
306
+ this.field.props?.options.pipe(takeUntil$1(this._unsubscribeAll)).subscribe((data) => {
307
+ this.optionsData = data;
308
+ });
309
+ }
310
+ const url = this.field.props?.domain?.url;
311
+ if (url && this.field.props?.domain?.code && this.field.props?.domain?.key && this.field.props?.domain?.value) {
312
+ this._http.get(url).pipe(takeUntil$1(this._unsubscribeAll)).subscribe((data) => {
313
+ if (data) {
314
+ const datas = data.filter((i) => {
315
+ if (this.field.props?.domain?.key)
316
+ return i[this.field.props?.domain?.key] === this.field.props?.domain?.code;
317
+ return false;
318
+ });
319
+ if (datas && this.field.props?.domain?.value) {
320
+ this.urlData = datas[0][this.field.props?.domain?.value];
321
+ }
322
+ else {
323
+ this.urlData = [];
324
+ }
325
+ }
326
+ else {
327
+ this.urlData = [];
328
+ }
329
+ this.filteredData = this.datas;
330
+ this._filteredItems.next(this.filteredData);
331
+ });
332
+ }
333
+ else {
334
+ this.urlData = [];
335
+ this.filteredData = this.datas;
336
+ this._filteredItems.next(this.filteredData);
337
+ }
338
+ this.formControl.valueChanges.pipe(takeUntil$1(this._unsubscribeAll)).subscribe((value) => {
339
+ this.checklist = value || [];
340
+ this._getAllCheckCountState();
341
+ });
342
+ }
343
+ ngOnDestroy() {
344
+ this._unsubscribeAll.next(void (0));
345
+ this._unsubscribeAll.complete();
346
+ }
347
+ trackByFn(index, item) {
348
+ return item.id || index;
349
+ }
350
+ filterByQuery(event) {
351
+ this.filteredData = this.datas.filter(data => data.value.toString().toLowerCase().includes(event) || data.label.toLowerCase().includes(event));
352
+ this._filteredItems.next(this.filteredData);
353
+ this._getAllCheckCountState();
354
+ }
355
+ toggleCheckList(data, event) {
356
+ event.preventDefault();
357
+ if (data.disabled || this.props.disabled)
358
+ return;
359
+ const index = this.checklist.findIndex(item => item.value === data.value);
360
+ if (index > -1) {
361
+ this.checklist.splice(index, 1);
362
+ }
363
+ else {
364
+ this.checklist.push(data);
365
+ }
366
+ this.formControl.setValue(this.checklist);
367
+ }
368
+ allCheckChange(check) {
369
+ if (check) {
370
+ this.filteredData.forEach((t) => {
371
+ const index = this.checklist.findIndex(item => item.value === t.value);
372
+ if (index < 0 && !t.disabled) {
373
+ this.checklist.push(t);
374
+ }
375
+ });
376
+ }
377
+ else {
378
+ this.filteredData.forEach((t) => {
379
+ const index = this.checklist.findIndex(item => item.value === t.value);
380
+ if (index > -1) {
381
+ this.checklist.splice(index, 1);
382
+ }
383
+ });
384
+ }
385
+ this.formControl.setValue(this.checklist);
386
+ }
387
+ isCheck(data) {
388
+ return this.formControl.value?.filter((i) => i.value === data.value).length > 0;
389
+ }
390
+ _getAllCheckCountState() {
391
+ if (this.props.showAllCheck && !this.props.disabled) {
392
+ let allCheckCount = 0;
393
+ if (this.checklist?.length > 0) {
394
+ this.filteredData.forEach((t) => {
395
+ const index = this.checklist.findIndex(item => item.value === t.value && !t.disabled);
396
+ if (index > -1) {
397
+ allCheckCount += 1;
398
+ }
399
+ });
400
+ if (this.filteredData.filter(i => !i.disabled).length === allCheckCount) {
401
+ this.isChecked = true;
402
+ this.isIndeterminate = false;
403
+ }
404
+ else if (allCheckCount === 0) {
405
+ this.isChecked = false;
406
+ this.isIndeterminate = false;
407
+ }
408
+ else {
409
+ this.isChecked = false;
410
+ this.isIndeterminate = true;
411
+ }
412
+ }
413
+ else {
414
+ this.checklist = [];
415
+ this.isChecked = false;
416
+ this.isIndeterminate = false;
417
+ }
418
+ }
419
+ }
420
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatCheckListTypeComponent, deps: [{ token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Component }); }
421
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.7", type: CmatCheckListTypeComponent, isStandalone: true, selector: "cmat-checklist-type", usesInheritance: true, ngImport: i0, template: "<div class=\"flex flex-col\">\r\n <div class=\"p-2\">\r\n @if(props.label){\r\n <legend class=\"text-lg\">\r\n {{ props.label }}\r\n @if(props.required){\r\n <span>*</span>\r\n }\r\n </legend>\r\n }\r\n @if(props.description){\r\n <p>{{ props.description }}</p>\r\n }\r\n </div>\r\n\r\n <div class=\"w-full h-full rounded border shadow bg-card\" [tabIndex]=\"props.tabindex\">\r\n <div class=\"flex items-center m-1 mr-2 min-h-12 print:hidden\">\r\n @if (props.showAllCheck&&!props.disabled) {\r\n <div>\r\n <mat-checkbox class=\"flex items-center h-10 min-h-10 m-1\" [color]=\"'primary'\" [checked]=\"isChecked\"\r\n [indeterminate]=\"isIndeterminate\" (change)=\"allCheckChange($event.checked)\">\r\n </mat-checkbox>\r\n </div>\r\n }\r\n <div class=\"flex items-center w-full\">\r\n <mat-icon class=\"icon-size-5\" [svgIcon]=\"'heroicons_solid:magnifying-glass'\"></mat-icon>\r\n <div class=\"ml-2\">\r\n <input class=\"w-full min-w-0 py-1 border-0\" type=\"text\" placeholder=\"\u8F93\u5165\u8FC7\u6EE4\u4FE1\u606F\"\r\n (input)=\"filterByQuery(query.value)\" #query>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"border-t overflow-y-auto lg:overflow-y-hidden lg:hover:overflow-y-auto scrollbar-custom\"\r\n [ngClass]=\"props.controlMaxHeight?'max-h-64 sm:max-h-128 lg:max-h-64':''\">\r\n @if ((filteredItems$ | async); as filteredItems) {\r\n @if(filteredItems.length>0){\r\n @for (data of filteredItems; track trackByFn($index, data)) {\r\n <div role=\"presentation\" class=\"flex items-center pl-2 pr-4 py-2 cursor-pointer hover:bg-hover\" matRipple\r\n (click)=\"toggleCheckList(data,$event)\">\r\n <mat-checkbox class=\"flex items-center h-10 min-h-10 pointer-events-none\" [color]=\"'primary'\" disableRipple\r\n [checked]=\"isCheck(data)\" [value]=\"data\" [disabled]=\"data.disabled||props.disabled\">\r\n <div class=\"flex flex-col flex-auto\">\r\n <div class=\"font-medium leading-5 truncate\">{{data.label}}</div>\r\n </div>\r\n </mat-checkbox>\r\n </div>\r\n }\r\n } @else {\r\n <div\r\n class=\"flex flex-auto flex-col items-center justify-center bg-slate-100 dark:bg-transparent h-64 sm:h-128 lg:h-64\">\r\n <mat-icon class=\"icon-size-24\" [svgIcon]=\"'heroicons_outline:document-magnifying-glass'\"></mat-icon>\r\n <div class=\"mt-4 text-2xl font-bold tracking-tight text-secondary\">\u6CA1\u6709\u6570\u636E!</div>\r\n </div>\r\n }\r\n }\r\n </div>\r\n </div>\r\n</div>", styles: [":host{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i2$2.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatRippleModule }, { kind: "directive", type: i3$1.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
422
+ }
423
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatCheckListTypeComponent, decorators: [{
424
+ type: Component,
425
+ args: [{ selector: 'cmat-checklist-type', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [MatCheckboxModule, MatIconModule, NgClass, MatRippleModule, AsyncPipe, CmatSecurePipe], template: "<div class=\"flex flex-col\">\r\n <div class=\"p-2\">\r\n @if(props.label){\r\n <legend class=\"text-lg\">\r\n {{ props.label }}\r\n @if(props.required){\r\n <span>*</span>\r\n }\r\n </legend>\r\n }\r\n @if(props.description){\r\n <p>{{ props.description }}</p>\r\n }\r\n </div>\r\n\r\n <div class=\"w-full h-full rounded border shadow bg-card\" [tabIndex]=\"props.tabindex\">\r\n <div class=\"flex items-center m-1 mr-2 min-h-12 print:hidden\">\r\n @if (props.showAllCheck&&!props.disabled) {\r\n <div>\r\n <mat-checkbox class=\"flex items-center h-10 min-h-10 m-1\" [color]=\"'primary'\" [checked]=\"isChecked\"\r\n [indeterminate]=\"isIndeterminate\" (change)=\"allCheckChange($event.checked)\">\r\n </mat-checkbox>\r\n </div>\r\n }\r\n <div class=\"flex items-center w-full\">\r\n <mat-icon class=\"icon-size-5\" [svgIcon]=\"'heroicons_solid:magnifying-glass'\"></mat-icon>\r\n <div class=\"ml-2\">\r\n <input class=\"w-full min-w-0 py-1 border-0\" type=\"text\" placeholder=\"\u8F93\u5165\u8FC7\u6EE4\u4FE1\u606F\"\r\n (input)=\"filterByQuery(query.value)\" #query>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"border-t overflow-y-auto lg:overflow-y-hidden lg:hover:overflow-y-auto scrollbar-custom\"\r\n [ngClass]=\"props.controlMaxHeight?'max-h-64 sm:max-h-128 lg:max-h-64':''\">\r\n @if ((filteredItems$ | async); as filteredItems) {\r\n @if(filteredItems.length>0){\r\n @for (data of filteredItems; track trackByFn($index, data)) {\r\n <div role=\"presentation\" class=\"flex items-center pl-2 pr-4 py-2 cursor-pointer hover:bg-hover\" matRipple\r\n (click)=\"toggleCheckList(data,$event)\">\r\n <mat-checkbox class=\"flex items-center h-10 min-h-10 pointer-events-none\" [color]=\"'primary'\" disableRipple\r\n [checked]=\"isCheck(data)\" [value]=\"data\" [disabled]=\"data.disabled||props.disabled\">\r\n <div class=\"flex flex-col flex-auto\">\r\n <div class=\"font-medium leading-5 truncate\">{{data.label}}</div>\r\n </div>\r\n </mat-checkbox>\r\n </div>\r\n }\r\n } @else {\r\n <div\r\n class=\"flex flex-auto flex-col items-center justify-center bg-slate-100 dark:bg-transparent h-64 sm:h-128 lg:h-64\">\r\n <mat-icon class=\"icon-size-24\" [svgIcon]=\"'heroicons_outline:document-magnifying-glass'\"></mat-icon>\r\n <div class=\"mt-4 text-2xl font-bold tracking-tight text-secondary\">\u6CA1\u6709\u6570\u636E!</div>\r\n </div>\r\n }\r\n }\r\n </div>\r\n </div>\r\n</div>", styles: [":host{width:100%}\n"] }]
426
+ }], ctorParameters: () => [{ type: i1$2.HttpClient }] });
427
+
428
+ class CmatChipsInputTypeComponent extends FieldType {
429
+ constructor(_http) {
430
+ super();
431
+ this._http = _http;
432
+ this._unsubscribeAll = new Subject();
433
+ }
434
+ get autocompleteText() {
435
+ return this.autocompleteUrlData?.length > 0 ? this.autocompleteUrlData : this.props?.autocompleteText?.split(',') || [];
436
+ }
437
+ ngOnInit() {
438
+ const url = this.props?.domain?.url;
439
+ if (url && this.props?.domain?.code && this.props?.domain?.key && this.props?.domain?.value) {
440
+ this._http.get(url).pipe(takeUntil(this._unsubscribeAll)).subscribe((data) => {
441
+ if (data) {
442
+ const datas = data.filter((i) => {
443
+ if (this.field.props?.domain?.key)
444
+ return i[this.field.props?.domain?.key] === this.field.props?.domain?.code;
445
+ return false;
446
+ });
447
+ if (datas && this.field.props?.domain?.value) {
448
+ this.autocompleteUrlData = datas[0][this.field.props?.domain?.value];
449
+ }
450
+ else {
451
+ this.autocompleteUrlData = [];
452
+ }
453
+ }
454
+ else {
455
+ this.autocompleteUrlData = [];
456
+ }
457
+ });
458
+ }
459
+ else {
460
+ this.autocompleteUrlData = [];
461
+ }
462
+ }
463
+ ngOnDestroy() {
464
+ this._unsubscribeAll.next(void 0);
465
+ this._unsubscribeAll.complete();
466
+ }
467
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatChipsInputTypeComponent, deps: [{ token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Component }); }
468
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.7", type: CmatChipsInputTypeComponent, isStandalone: true, selector: "cmat-chips-input-type", usesInheritance: true, ngImport: i0, template: "<cmat-chip-input [hasAutocomplete]=\"props.hasAutocomplete??false\" [formControl]=\"formControl\"\r\n [placeholder]=\"placeholder\" [selectableOptions]=\"autocompleteText\" [tabIndex]=\"props.tabindex\" [required]=\"required\"></cmat-chip-input>", styles: [":host{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: CmatChipInputComponent, selector: "cmat-chip-input", inputs: ["id", "selectableOptions", "hasAutocomplete", "outputIsString", "separatorKey", "placeholder", "value", "required", "disabled"], exportAs: ["cmatChipInput"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
469
+ }
470
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatChipsInputTypeComponent, decorators: [{
471
+ type: Component,
472
+ args: [{ selector: 'cmat-chips-input-type', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [ReactiveFormsModule, CmatChipInputComponent], template: "<cmat-chip-input [hasAutocomplete]=\"props.hasAutocomplete??false\" [formControl]=\"formControl\"\r\n [placeholder]=\"placeholder\" [selectableOptions]=\"autocompleteText\" [tabIndex]=\"props.tabindex\" [required]=\"required\"></cmat-chip-input>", styles: [":host{width:100%}\n"] }]
473
+ }], ctorParameters: () => [{ type: i1$2.HttpClient }] });
474
+
475
+ class CmatColorPickerTypeComponent extends FieldType$1 {
476
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatColorPickerTypeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
477
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.7", type: CmatColorPickerTypeComponent, isStandalone: true, selector: "cmat-color-picker-type", usesInheritance: true, ngImport: i0, template: "<cmat-material-color-picker [title]=\"props.label??''\" [formControl]=\"formControl\" [readonly]=\"disabled\"\r\n [tabindex]=\"props.tabindex\"></cmat-material-color-picker>", styles: [":host{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: CmatMaterialColorPickerComponent, selector: "cmat-material-color-picker", inputs: ["color", "title", "readonly"], outputs: ["colorChanged"], exportAs: ["cmatMaterialColorPicker"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
478
+ }
479
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatColorPickerTypeComponent, decorators: [{
480
+ type: Component,
481
+ args: [{ selector: 'cmat-color-picker-type', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [ReactiveFormsModule, CmatMaterialColorPickerComponent], template: "<cmat-material-color-picker [title]=\"props.label??''\" [formControl]=\"formControl\" [readonly]=\"disabled\"\r\n [tabindex]=\"props.tabindex\"></cmat-material-color-picker>", styles: [":host{width:100%}\n"] }]
482
+ }] });
483
+
484
+ class CmatDateRangeTypeComponent extends FieldType {
485
+ constructor() {
486
+ super(...arguments);
487
+ this.defaultOptions = {
488
+ props: {
489
+ dateFormat: 'YYYY/MM/DD',
490
+ timeFormat: '24',
491
+ timeRange: true
492
+ },
493
+ };
494
+ }
495
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatDateRangeTypeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
496
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.7", type: CmatDateRangeTypeComponent, isStandalone: true, selector: "cmat-date-range-type", usesInheritance: true, ngImport: i0, template: "<cmat-date-range [dateFormat]=\"props.dateFormat\" [timeFormat]=\"props.timeFormat\" [timeRange]=\"props.timeRange\" \r\n[formControl]=\"formControl\" [tabindex]=\"props.tabindex\" [readonly]=\"disabled\">\r\n</cmat-date-range>", styles: [":host{width:100%}\n"], dependencies: [{ kind: "component", type: CmatDateRangeComponent, selector: "cmat-date-range", inputs: ["readonly", "dateFormat", "timeFormat", "timeRange", "range"], outputs: ["rangeChanged"], exportAs: ["cmatDateRange"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
497
+ }
498
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatDateRangeTypeComponent, decorators: [{
499
+ type: Component,
500
+ args: [{ selector: 'cmat-date-range-type', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [CmatDateRangeComponent, ReactiveFormsModule], template: "<cmat-date-range [dateFormat]=\"props.dateFormat\" [timeFormat]=\"props.timeFormat\" [timeRange]=\"props.timeRange\" \r\n[formControl]=\"formControl\" [tabindex]=\"props.tabindex\" [readonly]=\"disabled\">\r\n</cmat-date-range>", styles: [":host{width:100%}\n"] }]
501
+ }] });
502
+
503
+ class CmatDatepickerTypeComponent extends FieldType {
504
+ constructor(_changeDetectorRef, _cmatMediaWatcherService) {
505
+ super();
506
+ this._changeDetectorRef = _changeDetectorRef;
507
+ this._cmatMediaWatcherService = _cmatMediaWatcherService;
508
+ this.defaultOptions = {
509
+ props: {
510
+ startView: 'month',
511
+ mode: 'auto',
512
+ togglePosition: 'left',
513
+ timeInterval: 5,
514
+ type: 'datetime',
515
+ multiYearSelector: false,
516
+ disabled: false,
517
+ timeInput: true,
518
+ twelvehour: false
519
+ }
520
+ };
521
+ this._unsubscribeAll = new Subject();
522
+ }
523
+ ngOnInit() {
524
+ this._cmatMediaWatcherService.onMediaChange$
525
+ .pipe(takeUntil(this._unsubscribeAll))
526
+ .subscribe(({ matchingAliases }) => {
527
+ this.isHandSet = !matchingAliases.includes('lg');
528
+ this._changeDetectorRef.markForCheck();
529
+ });
530
+ }
531
+ ngOnDestroy() {
532
+ this._unsubscribeAll.next(void 0);
533
+ this._unsubscribeAll.complete();
534
+ }
535
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatDatepickerTypeComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i2.CmatMediaWatcherService }], target: i0.ɵɵFactoryTarget.Component }); }
536
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.7", type: CmatDatepickerTypeComponent, isStandalone: true, selector: "cmat-datepicker-type", usesInheritance: true, ngImport: i0, template: "@if(props.togglePosition==='left'){\r\n<cmat-datetimepicker-toggle [for]=\"datetimePicker\" [disabled]=\"disabled\" matPrefix></cmat-datetimepicker-toggle>\r\n}\r\n\r\n<cmat-datetimepicker #datetimePicker openOnFocus=\"true\" [startView]=\"props.startView\" [mode]=\"props.mode\"\r\n [timeInterval]=\"props.timeInterval\" [twelvehour]=\"props.twelvehour\" [type]=\"props.type\"\r\n [multiYearSelector]=\"props.multiYearSelector\" [timeInput]=\"props.timeInput\" [touchUi]=\"isHandSet\"\r\n [disabled]=\"disabled\"></cmat-datetimepicker>\r\n\r\n<input [cmatDatetimepicker]=\"datetimePicker\" [required]=\"required\" [formControl]=\"formControl\" autocomplete=\"false\"\r\n [placeholder]=\"placeholder\" matInput />\r\n\r\n@if(props.togglePosition==='right'){\r\n<cmat-datetimepicker-toggle [for]=\"datetimePicker\" [disabled]=\"disabled\" matSuffix></cmat-datetimepicker-toggle>\r\n}", dependencies: [{ kind: "component", type: CmatDatetimepickerToggleComponent, selector: "cmat-datetimepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disableRipple", "disabled"], exportAs: ["cmatDatetimepickerToggle"] }, { kind: "directive", type: CmatDatetimepickerInputDirective, selector: "input[cmatDatetimepicker]", inputs: ["cmatDatetimepicker", "cmatDatepickerFilter", "value", "min", "max", "disabled"], outputs: ["dateChange", "dateInput"], exportAs: ["cmatDatepickerInput"] }, { kind: "component", type: CmatDatetimepickerComponent, selector: "cmat-datetimepicker", inputs: ["startView", "mode", "timeInterval", "preventSameDateTimeSelection", "xPosition", "yPosition", "multiYearSelector", "twelvehour", "panelClass", "opened", "color", "startAt", "type", "timeInput", "touchUi", "disabled", "restoreFocus"], outputs: ["selectedChanged", "openedStream", "closedStream", "viewChanged"], exportAs: ["cmatDatetimepicker"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i1$3.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i3$2.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i3$2.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
537
+ }
538
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatDatepickerTypeComponent, decorators: [{
539
+ type: Component,
540
+ args: [{ selector: 'cmat-datepicker-type', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [CmatDatetimepickerToggleComponent, CmatDatetimepickerInputDirective, CmatDatetimepickerComponent, MatInputModule, FormsModule, ReactiveFormsModule], template: "@if(props.togglePosition==='left'){\r\n<cmat-datetimepicker-toggle [for]=\"datetimePicker\" [disabled]=\"disabled\" matPrefix></cmat-datetimepicker-toggle>\r\n}\r\n\r\n<cmat-datetimepicker #datetimePicker openOnFocus=\"true\" [startView]=\"props.startView\" [mode]=\"props.mode\"\r\n [timeInterval]=\"props.timeInterval\" [twelvehour]=\"props.twelvehour\" [type]=\"props.type\"\r\n [multiYearSelector]=\"props.multiYearSelector\" [timeInput]=\"props.timeInput\" [touchUi]=\"isHandSet\"\r\n [disabled]=\"disabled\"></cmat-datetimepicker>\r\n\r\n<input [cmatDatetimepicker]=\"datetimePicker\" [required]=\"required\" [formControl]=\"formControl\" autocomplete=\"false\"\r\n [placeholder]=\"placeholder\" matInput />\r\n\r\n@if(props.togglePosition==='right'){\r\n<cmat-datetimepicker-toggle [for]=\"datetimePicker\" [disabled]=\"disabled\" matSuffix></cmat-datetimepicker-toggle>\r\n}" }]
541
+ }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i2.CmatMediaWatcherService }] });
542
+
543
+ class CmatMultiCheckboxTypeComponent extends FieldType {
544
+ constructor(_http) {
545
+ super();
546
+ this._http = _http;
547
+ this.defaultOptions = {
548
+ props: {
549
+ hideFieldUnderline: true,
550
+ floatLabel: 'always',
551
+ color: 'accent',
552
+ labelPosition: 'after'
553
+ },
554
+ };
555
+ this._urlData = new BehaviorSubject([]);
556
+ this._unsubscribeAll = new Subject();
557
+ }
558
+ get urlData$() {
559
+ return this._urlData.asObservable();
560
+ }
561
+ onChange(value, checked) {
562
+ this.formControl.markAsDirty();
563
+ if (this.props.type === 'array') {
564
+ this.formControl.patchValue(checked
565
+ ? [...(this.formControl.value || []), value]
566
+ : [...(this.formControl.value || [])].filter(o => o !== value));
567
+ }
568
+ else {
569
+ this.formControl.patchValue({ ...this.formControl.value, [value]: checked });
570
+ }
571
+ this.formControl.markAsTouched();
572
+ }
573
+ ngOnInit() {
574
+ const url = this.field.props?.domain?.url;
575
+ if (url && this.field.props?.domain?.code && this.field.props?.domain?.key && this.field.props?.domain?.value) {
576
+ this._http.get(url).pipe(takeUntil(this._unsubscribeAll)).subscribe((data) => {
577
+ if (data) {
578
+ const datas = data.filter((i) => {
579
+ if (this.field.props?.domain?.key)
580
+ return i[this.field.props?.domain?.key] === this.field.props?.domain?.code;
581
+ return false;
582
+ });
583
+ if (datas && this.field.props?.domain?.value) {
584
+ this._urlData.next(datas[0][this.field.props?.domain?.value]);
585
+ }
586
+ else {
587
+ this._urlData.next([]);
588
+ }
589
+ }
590
+ else {
591
+ this._urlData.next([]);
592
+ }
593
+ });
594
+ }
595
+ else {
596
+ this._urlData.next([]);
597
+ }
598
+ }
599
+ ngOnDestroy() {
600
+ this._unsubscribeAll.next(void 0);
601
+ this._unsubscribeAll.complete();
602
+ }
603
+ onContainerClick() { }
604
+ isChecked(option) {
605
+ const value = this.formControl.value;
606
+ return value && (this.props.type === 'array' ? value.indexOf(option.value) !== -1 : value[option.value]);
607
+ }
608
+ trackByFn(index) {
609
+ return index;
610
+ }
611
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatMultiCheckboxTypeComponent, deps: [{ token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Component }); }
612
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.7", type: CmatMultiCheckboxTypeComponent, isStandalone: true, selector: "cmat-multicheckbox-type", viewQueries: [{ propertyName: "checkboxes", predicate: MatCheckbox, descendants: true }], usesInheritance: true, ngImport: i0, template: "@if ((urlData$ | async); as urlData) {\r\n@for (option of (urlData.length > 0 ? urlData : (props.options | formlySelectOptions : field | async)); track\r\ntrackByFn($index)) {\r\n<mat-checkbox [tabIndex]=\"props.tabindex\" [color]=\"props.color\" [labelPosition]=\"props.labelPosition\"\r\n [checked]=\"isChecked(option)\" [disabled]=\"formControl.disabled || option.disabled\"\r\n (change)=\"onChange(option.value, $event.checked)\">\r\n {{ option.label }}\r\n</mat-checkbox>\r\n}\r\n}", styles: [":host{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i2$2.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "ngmodule", type: FormlySelectModule }, { kind: "pipe", type: i3$3.FormlySelectOptionsPipe, name: "formlySelectOptions" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
613
+ }
614
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatMultiCheckboxTypeComponent, decorators: [{
615
+ type: Component,
616
+ args: [{ selector: 'cmat-multicheckbox-type', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [MatCheckboxModule, AsyncPipe, FormlySelectModule], template: "@if ((urlData$ | async); as urlData) {\r\n@for (option of (urlData.length > 0 ? urlData : (props.options | formlySelectOptions : field | async)); track\r\ntrackByFn($index)) {\r\n<mat-checkbox [tabIndex]=\"props.tabindex\" [color]=\"props.color\" [labelPosition]=\"props.labelPosition\"\r\n [checked]=\"isChecked(option)\" [disabled]=\"formControl.disabled || option.disabled\"\r\n (change)=\"onChange(option.value, $event.checked)\">\r\n {{ option.label }}\r\n</mat-checkbox>\r\n}\r\n}", styles: [":host{width:100%}\n"] }]
617
+ }], ctorParameters: () => [{ type: i1$2.HttpClient }], propDecorators: { checkboxes: [{
618
+ type: ViewChildren,
619
+ args: [MatCheckbox]
620
+ }] } });
621
+
622
+ class CmatNumberTypeComponent extends FieldType {
623
+ constructor() {
624
+ super(...arguments);
625
+ this.defaultOptions = {
626
+ props: {
627
+ decimal: false,
628
+ min: -Infinity,
629
+ max: Infinity
630
+ },
631
+ };
632
+ }
633
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatNumberTypeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
634
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.7", type: CmatNumberTypeComponent, isStandalone: true, selector: "cmat-number-type", usesInheritance: true, ngImport: i0, template: "<input matInput [formControl]=\"formControl\" [readonly]=\"props.readonly\" [placeholder]=\"placeholder\" [tabIndex]=\"props.tabindex\" [required]=\"required\" [decimal]=\"props.decimal\" [allowNegatives]=\"true\" [allowPaste]=\"true\" [min]=\"props.min\"\r\n [max]=\"props.max\" [errorStateMatcher]=\"errorStateMatcher\" cmatDigitOnly>\r\n\r\n", styles: [":host{width:100%}\n"], dependencies: [{ kind: "directive", type: CmatDigitOnlyDirective, selector: "[cmatDigitOnly]", inputs: ["decimal", "decimalSeparator", "allowNegatives", "allowPaste", "negativeSign", "min", "max", "pattern"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i1$3.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
635
+ }
636
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatNumberTypeComponent, decorators: [{
637
+ type: Component,
638
+ args: [{ selector: 'cmat-number-type', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [CmatDigitOnlyDirective, MatInputModule, ReactiveFormsModule], template: "<input matInput [formControl]=\"formControl\" [readonly]=\"props.readonly\" [placeholder]=\"placeholder\" [tabIndex]=\"props.tabindex\" [required]=\"required\" [decimal]=\"props.decimal\" [allowNegatives]=\"true\" [allowPaste]=\"true\" [min]=\"props.min\"\r\n [max]=\"props.max\" [errorStateMatcher]=\"errorStateMatcher\" cmatDigitOnly>\r\n\r\n", styles: [":host{width:100%}\n"] }]
639
+ }] });
640
+
641
+ class CmatRatingTypeComponent extends FieldType {
642
+ constructor() {
643
+ super(...arguments);
644
+ this.defaultOptions = {
645
+ props: {
646
+ stars: 5,
647
+ readonly: false,
648
+ hover: true,
649
+ half: true
650
+ },
651
+ };
652
+ }
653
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatRatingTypeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
654
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.7", type: CmatRatingTypeComponent, isStandalone: true, selector: "cmat-rating-type", usesInheritance: true, ngImport: i0, template: "@if(props.customColor&&props.customColor.indexOf('#')>-1){\r\n<div [ngStyle]=\"{'color': props.customColor}\">\r\n <cmat-rating [formControl]=\"formControl\" [tabIndex]=\"props.tabindex\" [stars]=\"props.stars\"\r\n [readonly]=\"props.readonly\" [hover]=\"props.hover\" [half]=\"props.half\" [showMode]=\"props.showMode\"></cmat-rating>\r\n</div>\r\n}@else{\r\n<cmat-rating [formControl]=\"formControl\" [tabIndex]=\"props.tabindex\" [stars]=\"props.stars\" [readonly]=\"props.readonly\"\r\n [hover]=\"props.hover\" [half]=\"props.half\" [color]=\"props.customColor\" [showMode]=\"props.showMode\"></cmat-rating>\r\n}", styles: [":host{width:100%}\n"], dependencies: [{ kind: "component", type: CmatRatingComponent, selector: "cmat-rating", inputs: ["id", "stars", "readonly", "hover", "half", "color", "showMode", "placeholder", "value", "required", "disabled"], outputs: ["valueChange"], exportAs: ["cmatRating"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
655
+ }
656
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatRatingTypeComponent, decorators: [{
657
+ type: Component,
658
+ args: [{ selector: 'cmat-rating-type', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [CmatRatingComponent, ReactiveFormsModule, NgStyle], template: "@if(props.customColor&&props.customColor.indexOf('#')>-1){\r\n<div [ngStyle]=\"{'color': props.customColor}\">\r\n <cmat-rating [formControl]=\"formControl\" [tabIndex]=\"props.tabindex\" [stars]=\"props.stars\"\r\n [readonly]=\"props.readonly\" [hover]=\"props.hover\" [half]=\"props.half\" [showMode]=\"props.showMode\"></cmat-rating>\r\n</div>\r\n}@else{\r\n<cmat-rating [formControl]=\"formControl\" [tabIndex]=\"props.tabindex\" [stars]=\"props.stars\" [readonly]=\"props.readonly\"\r\n [hover]=\"props.hover\" [half]=\"props.half\" [color]=\"props.customColor\" [showMode]=\"props.showMode\"></cmat-rating>\r\n}", styles: [":host{width:100%}\n"] }]
659
+ }] });
660
+
661
+ class CmatRadioTypeComponent extends FieldType {
662
+ constructor(_http) {
663
+ super();
664
+ this._http = _http;
665
+ this.defaultOptions = {
666
+ props: {
667
+ hideFieldUnderline: true,
668
+ floatLabel: 'always',
669
+ tabindex: -1,
670
+ labelPosition: 'after'
671
+ },
672
+ };
673
+ this._urlData = new BehaviorSubject([]);
674
+ this._unsubscribeAll = new Subject();
675
+ }
676
+ get urlData$() {
677
+ return this._urlData.asObservable();
678
+ }
679
+ ngOnInit() {
680
+ const url = this.field.props?.domain?.url;
681
+ if (url && this.field.props?.domain?.code && this.field.props?.domain?.key && this.field.props?.domain?.value) {
682
+ this._http.get(url).pipe(takeUntil(this._unsubscribeAll)).subscribe((data) => {
683
+ if (data) {
684
+ const datas = data.filter((i) => {
685
+ if (this.field.props?.domain?.key)
686
+ return i[this.field.props?.domain?.key] === this.field.props?.domain?.code;
687
+ return false;
688
+ });
689
+ if (datas && this.field.props?.domain?.value) {
690
+ this._urlData.next(datas[0][this.field.props?.domain?.value]);
691
+ }
692
+ else {
693
+ this._urlData.next([]);
694
+ }
695
+ }
696
+ else {
697
+ this._urlData.next([]);
698
+ }
699
+ });
700
+ }
701
+ else {
702
+ this._urlData.next([]);
703
+ }
704
+ }
705
+ ngAfterViewInit() {
706
+ this.focusObserver = _observe(this.field, ['focus'], ({ currentValue }) => {
707
+ if (this.props.tabindex === -1 && currentValue && this.radioGroup._radios.length > 0) {
708
+ setTimeout(() => {
709
+ const radio = this.radioGroup.selected ? this.radioGroup.selected : this.radioGroup._radios.first;
710
+ radio.focus();
711
+ });
712
+ }
713
+ });
714
+ }
715
+ onContainerClick() { }
716
+ ngOnDestroy() {
717
+ super.ngOnDestroy();
718
+ this.focusObserver && this.focusObserver.unsubscribe();
719
+ this._unsubscribeAll.next(void 0);
720
+ this._unsubscribeAll.complete();
721
+ }
722
+ trackByFn(index) {
723
+ return index;
724
+ }
725
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatRadioTypeComponent, deps: [{ token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Component }); }
726
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.7", type: CmatRadioTypeComponent, isStandalone: true, selector: "cmat-radio-type", viewQueries: [{ propertyName: "radioGroup", first: true, predicate: MatRadioGroup, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<mat-radio-group [formControl]=\"formControl\" [required]=\"required\" [tabindex]=\"props.tabindex\">\r\n @if ((urlData$ | async); as urlData) {\r\n @for (option of (urlData.length > 0 ? urlData : (props.options | formlySelectOptions : field | async)); track\r\n trackByFn($index)) {\r\n <mat-radio-button [color]=\"props.color\" [labelPosition]=\"props.labelPosition\" [disabled]=\"option.disabled\"\r\n [value]=\"option.value\">\r\n {{ option.label }}\r\n </mat-radio-button>\r\n }\r\n }\r\n</mat-radio-group>", styles: [":host{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: MatRadioModule }, { kind: "directive", type: i2$3.MatRadioGroup, selector: "mat-radio-group", inputs: ["color", "name", "labelPosition", "value", "selected", "disabled", "required"], outputs: ["change"], exportAs: ["matRadioGroup"] }, { kind: "component", type: i2$3.MatRadioButton, selector: "mat-radio-button", inputs: ["id", "name", "aria-label", "aria-labelledby", "aria-describedby", "disableRipple", "tabIndex", "checked", "value", "labelPosition", "disabled", "required", "color"], outputs: ["change"], exportAs: ["matRadioButton"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "ngmodule", type: FormlySelectModule }, { kind: "pipe", type: i3$3.FormlySelectOptionsPipe, name: "formlySelectOptions" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
727
+ }
728
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatRadioTypeComponent, decorators: [{
729
+ type: Component,
730
+ args: [{ selector: 'cmat-radio-type', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [MatRadioModule, AsyncPipe, FormlySelectModule, ReactiveFormsModule], template: "<mat-radio-group [formControl]=\"formControl\" [required]=\"required\" [tabindex]=\"props.tabindex\">\r\n @if ((urlData$ | async); as urlData) {\r\n @for (option of (urlData.length > 0 ? urlData : (props.options | formlySelectOptions : field | async)); track\r\n trackByFn($index)) {\r\n <mat-radio-button [color]=\"props.color\" [labelPosition]=\"props.labelPosition\" [disabled]=\"option.disabled\"\r\n [value]=\"option.value\">\r\n {{ option.label }}\r\n </mat-radio-button>\r\n }\r\n }\r\n</mat-radio-group>", styles: [":host{width:100%}\n"] }]
731
+ }], ctorParameters: () => [{ type: i1$2.HttpClient }], propDecorators: { radioGroup: [{
732
+ type: ViewChild,
733
+ args: [MatRadioGroup, { static: true }]
734
+ }] } });
735
+
736
+ class CmatRepeatTypeComponent extends FieldArrayType {
737
+ constructor() {
738
+ super(...arguments);
739
+ this.defaultOptions = {
740
+ props: {
741
+ addText: '新增'
742
+ },
743
+ };
744
+ }
745
+ trackByFn(index) {
746
+ return index;
747
+ }
748
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatRepeatTypeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
749
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.7", type: CmatRepeatTypeComponent, isStandalone: true, selector: "cmat-repeat-type", usesInheritance: true, ngImport: i0, template: "<div class=\"mb-2\" [tabIndex]=\"props.tabindex\">\r\n @if(props.label){\r\n <legend class=\"text-lg\">\r\n {{ props.label }}\r\n @if(props.required){\r\n <span>*</span>\r\n }\r\n </legend>\r\n }\r\n\r\n @if(props.description){\r\n <p>{{ props.description }}</p>\r\n }\r\n\r\n <div class=\"mb-2 h-1 border-solid border-b-2\"></div>\r\n <div class=\"flex flex-col repeat-body\">\r\n @for (field of field.fieldGroup; track trackByFn($index)) {\r\n <div class=\"flex flex-row repeat-item\">\r\n <formly-field [field]=\"field\" class=\"repeat-field\"></formly-field>\r\n @if(!props.disabled){\r\n <div class=\"flex items-center pl-2 print:hidden\">\r\n <button mat-icon-button color=\"warn\" (click)=\"remove($index)\" matTooltip=\"\u5220\u9664\">\r\n <mat-icon color=\"warn\" [svgIcon]=\"'heroicons_outline:trash'\"></mat-icon>\r\n </button>\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n\r\n @if(!props.disabled){\r\n <div class=\"mt-2 print:hidden\">\r\n <button mat-raised-button color=\"primary\" (click)=\"add()\">{{ props.addText}}</button>\r\n </div>\r\n }\r\n\r\n</div>", styles: [":host{width:100%}::ng-deep .repeat-body .repeat-item:not(:first-child) .repeat-field .mat-mdc-form-field-infix .mat-mdc-floating-label{display:none!important}::ng-deep .repeat-body .repeat-item:not(:first-child) .repeat-field .mat-mdc-form-field-subscript-wrapper{display:none!important}::ng-deep .repeat-body .repeat-item:not(:first-child) .repeat-field .mat-mdc-text-field-wrapper{margin-top:8px}\n"], dependencies: [{ kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i1$4.FormlyField, selector: "formly-field", inputs: ["field"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i3.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
750
+ }
751
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatRepeatTypeComponent, decorators: [{
752
+ type: Component,
753
+ args: [{ selector: 'cmat-repeat-type', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [FormlyModule, MatIconModule, MatButtonModule], template: "<div class=\"mb-2\" [tabIndex]=\"props.tabindex\">\r\n @if(props.label){\r\n <legend class=\"text-lg\">\r\n {{ props.label }}\r\n @if(props.required){\r\n <span>*</span>\r\n }\r\n </legend>\r\n }\r\n\r\n @if(props.description){\r\n <p>{{ props.description }}</p>\r\n }\r\n\r\n <div class=\"mb-2 h-1 border-solid border-b-2\"></div>\r\n <div class=\"flex flex-col repeat-body\">\r\n @for (field of field.fieldGroup; track trackByFn($index)) {\r\n <div class=\"flex flex-row repeat-item\">\r\n <formly-field [field]=\"field\" class=\"repeat-field\"></formly-field>\r\n @if(!props.disabled){\r\n <div class=\"flex items-center pl-2 print:hidden\">\r\n <button mat-icon-button color=\"warn\" (click)=\"remove($index)\" matTooltip=\"\u5220\u9664\">\r\n <mat-icon color=\"warn\" [svgIcon]=\"'heroicons_outline:trash'\"></mat-icon>\r\n </button>\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n\r\n @if(!props.disabled){\r\n <div class=\"mt-2 print:hidden\">\r\n <button mat-raised-button color=\"primary\" (click)=\"add()\">{{ props.addText}}</button>\r\n </div>\r\n }\r\n\r\n</div>", styles: [":host{width:100%}::ng-deep .repeat-body .repeat-item:not(:first-child) .repeat-field .mat-mdc-form-field-infix .mat-mdc-floating-label{display:none!important}::ng-deep .repeat-body .repeat-item:not(:first-child) .repeat-field .mat-mdc-form-field-subscript-wrapper{display:none!important}::ng-deep .repeat-body .repeat-item:not(:first-child) .repeat-field .mat-mdc-text-field-wrapper{margin-top:8px}\n"] }]
754
+ }] });
755
+
756
+ class CmatSelectTypeComponent extends FieldType {
757
+ constructor(_http) {
758
+ super();
759
+ this._http = _http;
760
+ this.defaultOptions = {
761
+ props: {
762
+ search: true,
763
+ canNull: false,
764
+ showToggleAllCheckbox: false
765
+ },
766
+ };
767
+ this.filteredCustomDetails = new ReplaySubject(1);
768
+ this.filteredCache = [];
769
+ this.isIndeterminate = false;
770
+ this.isChecked = false;
771
+ this.multiFilterCtrl = new FormControl('');
772
+ this._urlData = [];
773
+ this._unsubscribeAll = new Subject();
774
+ }
775
+ get datas() {
776
+ if (isArray(this.field.props?.options)) {
777
+ return this._urlData?.length > 0 ? this._urlData : this.field.props?.options || [];
778
+ }
779
+ else {
780
+ return this._urlData?.length > 0 ? this._urlData : this.optionsData || [];
781
+ }
782
+ }
783
+ ngOnInit() {
784
+ if (this.field.props?.options && !isArray(this.field.props?.options)) {
785
+ this.field.props?.options.pipe(takeUntil(this._unsubscribeAll)).subscribe((data) => {
786
+ this.optionsData = data;
787
+ });
788
+ }
789
+ const url = this.field.props?.domain?.url;
790
+ if (url && this.field.props?.domain?.code && this.field.props?.domain?.key && this.field.props?.domain?.value) {
791
+ this._http.get(url).pipe(takeUntil(this._unsubscribeAll)).subscribe((data) => {
792
+ if (data) {
793
+ const datas = data.filter((i) => {
794
+ if (this.field.props?.domain?.key)
795
+ return i[this.field.props?.domain?.key] === this.field.props?.domain?.code;
796
+ return false;
797
+ });
798
+ if (datas && this.field.props?.domain?.value) {
799
+ this._urlData = datas[0][this.field.props?.domain?.value];
800
+ }
801
+ else {
802
+ this._urlData = [];
803
+ }
804
+ }
805
+ else {
806
+ this._urlData = [];
807
+ }
808
+ this.filteredCache = this.datas.slice();
809
+ this.filteredCustomDetails.next(this.filteredCache);
810
+ });
811
+ }
812
+ else {
813
+ this._urlData = [];
814
+ this.filteredCache = this.datas.slice();
815
+ this.filteredCustomDetails.next(this.filteredCache);
816
+ }
817
+ of(this.props.multiple).pipe(takeUntil(this._unsubscribeAll))
818
+ .subscribe(() => {
819
+ if (!isArray(this.formControl.value)) {
820
+ const value = [this.formControl.value];
821
+ this.formControl.setValue(value);
822
+ }
823
+ });
824
+ this.multiFilterCtrl.valueChanges
825
+ .pipe(takeUntil(this._unsubscribeAll))
826
+ .subscribe(() => {
827
+ this.filterMulti();
828
+ if (this.props.multiple)
829
+ this.setToggleAllCheckboxState();
830
+ });
831
+ this.formControl.valueChanges
832
+ .pipe(takeUntil(this._unsubscribeAll))
833
+ .subscribe(() => {
834
+ if (this.props.multiple)
835
+ this.setToggleAllCheckboxState();
836
+ });
837
+ }
838
+ ngOnDestroy() {
839
+ this._unsubscribeAll.next(void (0));
840
+ this._unsubscribeAll.complete();
841
+ }
842
+ getAriaLabelledby() {
843
+ if (this.props.attributes?.['aria-labelledby']) {
844
+ return this.props.attributes['aria-labelledby'];
845
+ }
846
+ return this.formField?._labelId;
847
+ }
848
+ getAriaLabel() {
849
+ return this.props.attributes?.['aria-label'];
850
+ }
851
+ toggleSelectAll(selectAllValue) {
852
+ this.filteredCustomDetails.pipe(take(1), takeUntil(this._unsubscribeAll))
853
+ .subscribe((val) => {
854
+ if (selectAllValue) {
855
+ this.formControl.setValue(val.filter(o => !o.disabled));
856
+ }
857
+ else {
858
+ this.formControl.setValue([]);
859
+ }
860
+ this.formControl.markAsDirty();
861
+ });
862
+ }
863
+ filterMulti() {
864
+ if (!this.datas) {
865
+ return;
866
+ }
867
+ let search = this.multiFilterCtrl.value;
868
+ if (!search) {
869
+ this.filteredCache = this.datas.slice();
870
+ this.filteredCustomDetails.next(this.filteredCache);
871
+ return;
872
+ }
873
+ else {
874
+ search = search.toLowerCase();
875
+ }
876
+ this.filteredCache = this.datas.filter(items => items.value.toString().toLowerCase().indexOf(search) > -1 || items.label.toString().toLowerCase().indexOf(search) > -1);
877
+ this.filteredCustomDetails.next(this.filteredCache);
878
+ }
879
+ setToggleAllCheckboxState() {
880
+ let filteredLength = 0;
881
+ if (this.formControl.value && this.props.search) {
882
+ const cache = this.filteredCache.filter(o => !o.disabled);
883
+ const v = isArray(this.formControl.value) ? this.formControl.value : [this.formControl.value];
884
+ cache.forEach((el) => {
885
+ if (v.findIndex((t) => t.value === el.value && t.label === el.label) > -1) {
886
+ filteredLength++;
887
+ }
888
+ });
889
+ this.isIndeterminate = filteredLength > 0 && filteredLength < cache.length;
890
+ this.isChecked = filteredLength > 0 && filteredLength === cache.length;
891
+ }
892
+ else {
893
+ this.isIndeterminate = false;
894
+ this.isChecked = false;
895
+ }
896
+ }
897
+ trackByFn(index) {
898
+ return index;
899
+ }
900
+ compareWithFn(o1, o2) {
901
+ return o1 && o2 ? o1?.label === o2?.label && o1?.value === o2?.value : o1 === o2;
902
+ }
903
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatSelectTypeComponent, deps: [{ token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Component }); }
904
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.7", type: CmatSelectTypeComponent, isStandalone: true, selector: "cmat-select-search-type", usesInheritance: true, ngImport: i0, template: "@if(props.multiple){\r\n<mat-select #multiSelect [id]=\"id\" [formControl]=\"formControl\" [placeholder]=\"props.placeholder??''\" multiple\r\n [required]=\"required\" [tabIndex]=\"props.tabindex\" [compareWith]=\"compareWithFn\"\r\n [errorStateMatcher]=\"errorStateMatcher\" [aria-label]=\"getAriaLabel()\" [aria-labelledby]=\"getAriaLabelledby()\"\r\n [disableOptionCentering]=\"props.disableOptionCentering\"\r\n [typeaheadDebounceInterval]=\"props.typeaheadDebounceInterval\"\r\n [panelClass]=\"'overflow-y-auto lg:overflow-y-hidden lg:hover:overflow-y-auto scrollbar-custom'\">\r\n @if ((filteredCustomDetails | async); as customDetails) {\r\n @if (props.search) { \r\n <mat-option>\r\n <cmat-select-search [formControl]=\"multiFilterCtrl\" [showToggleAllCheckbox]=\"props.showToggleAllCheckbox\"\r\n [toggleAllCheckboxIndeterminate]=\"isIndeterminate\" [toggleAllCheckboxChecked]=\"isChecked\"\r\n (toggleAll)=\"toggleSelectAll($event)\">\r\n </cmat-select-search>\r\n </mat-option>\r\n }\r\n @if (props.canNull) {\r\n <mat-option>\u7A7A</mat-option>\r\n }\r\n @for (i of customDetails; track trackByFn($index)) {\r\n @if(i.group){\r\n <mat-optgroup [label]=\"i.label\">\r\n @for (child of i.group; track trackByFn($index)) {\r\n <mat-option [value]=\"child\" [disabled]=\"child.disabled\">\r\n {{ child.label }}\r\n </mat-option>\r\n }\r\n </mat-optgroup>\r\n }@else {\r\n <mat-option [value]=\"i\" [disabled]=\"i.disabled\">{{i.label}}</mat-option>\r\n }\r\n }\r\n }\r\n</mat-select>\r\n}@else {\r\n<mat-select #multiSelect [id]=\"id\" [formControl]=\"formControl\" [placeholder]=\"props.placeholder??''\"\r\n [required]=\"required\" [tabIndex]=\"props.tabindex\" [compareWith]=\"compareWithFn\"\r\n [errorStateMatcher]=\"errorStateMatcher\" [aria-label]=\"getAriaLabel()\" [aria-labelledby]=\"getAriaLabelledby()\"\r\n [disableOptionCentering]=\"props.disableOptionCentering\"\r\n [typeaheadDebounceInterval]=\"props.typeaheadDebounceInterval\"\r\n [panelClass]=\"'overflow-y-auto lg:overflow-y-hidden lg:hover:overflow-y-auto scrollbar-custom'\">\r\n @if ((filteredCustomDetails | async); as customDetails) {\r\n @if (props.search) {\r\n <mat-option>\r\n <cmat-select-search [formControl]=\"multiFilterCtrl\" [showToggleAllCheckbox]=\"props.showToggleAllCheckbox\"\r\n [toggleAllCheckboxIndeterminate]=\"isIndeterminate\" [toggleAllCheckboxChecked]=\"isChecked\"\r\n (toggleAll)=\"toggleSelectAll($event)\">\r\n </cmat-select-search>\r\n </mat-option>\r\n }\r\n @if (props.canNull) {\r\n <mat-option>\u7A7A</mat-option>\r\n }\r\n @for (i of customDetails; track trackByFn($index)) {\r\n @if(i.group){\r\n <mat-optgroup [label]=\"i.label\">\r\n @for (child of i.group; track trackByFn($index)) {\r\n <mat-option [value]=\"child\" [disabled]=\"child.disabled\">\r\n {{ child.label }}\r\n </mat-option>\r\n }\r\n </mat-optgroup>\r\n }@else {\r\n <mat-option [value]=\"i\" [disabled]=\"i.disabled\">{{i.label}}</mat-option>\r\n }\r\n }\r\n }\r\n</mat-select>\r\n}\r\n", styles: [":host{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: MatCheckboxModule }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i2$4.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i3$1.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: i3$1.MatOptgroup, selector: "mat-optgroup", inputs: ["label", "disabled"], exportAs: ["matOptgroup"] }, { kind: "component", type: CmatSelectSearchComponent, selector: "cmat-select-search", inputs: ["placeholderLabel", "type", "noEntriesFoundLabel", "showNoFoundLabel", "clearSearchInput", "searching", "disableInitialFocus", "enableClearOnEscapePressed", "preventHomeEndKeyPropagation", "disableScrollToActiveOnOptionsChanged", "ariaLabel", "showToggleAllCheckbox", "toggleAllCheckboxChecked", "toggleAllCheckboxIndeterminate", "toggleAllCheckboxTooltipMessage", "toggleAllCheckboxTooltipPosition", "hideClearSearchButton", "alwaysRestoreSelectedOptionsMulti"], outputs: ["toggleAll"], exportAs: ["cmatSelectSearch"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
905
+ }
906
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatSelectTypeComponent, decorators: [{
907
+ type: Component,
908
+ args: [{ selector: 'cmat-select-search-type', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [MatCheckboxModule, MatSelectModule, CmatSelectSearchComponent, ReactiveFormsModule, AsyncPipe], template: "@if(props.multiple){\r\n<mat-select #multiSelect [id]=\"id\" [formControl]=\"formControl\" [placeholder]=\"props.placeholder??''\" multiple\r\n [required]=\"required\" [tabIndex]=\"props.tabindex\" [compareWith]=\"compareWithFn\"\r\n [errorStateMatcher]=\"errorStateMatcher\" [aria-label]=\"getAriaLabel()\" [aria-labelledby]=\"getAriaLabelledby()\"\r\n [disableOptionCentering]=\"props.disableOptionCentering\"\r\n [typeaheadDebounceInterval]=\"props.typeaheadDebounceInterval\"\r\n [panelClass]=\"'overflow-y-auto lg:overflow-y-hidden lg:hover:overflow-y-auto scrollbar-custom'\">\r\n @if ((filteredCustomDetails | async); as customDetails) {\r\n @if (props.search) { \r\n <mat-option>\r\n <cmat-select-search [formControl]=\"multiFilterCtrl\" [showToggleAllCheckbox]=\"props.showToggleAllCheckbox\"\r\n [toggleAllCheckboxIndeterminate]=\"isIndeterminate\" [toggleAllCheckboxChecked]=\"isChecked\"\r\n (toggleAll)=\"toggleSelectAll($event)\">\r\n </cmat-select-search>\r\n </mat-option>\r\n }\r\n @if (props.canNull) {\r\n <mat-option>\u7A7A</mat-option>\r\n }\r\n @for (i of customDetails; track trackByFn($index)) {\r\n @if(i.group){\r\n <mat-optgroup [label]=\"i.label\">\r\n @for (child of i.group; track trackByFn($index)) {\r\n <mat-option [value]=\"child\" [disabled]=\"child.disabled\">\r\n {{ child.label }}\r\n </mat-option>\r\n }\r\n </mat-optgroup>\r\n }@else {\r\n <mat-option [value]=\"i\" [disabled]=\"i.disabled\">{{i.label}}</mat-option>\r\n }\r\n }\r\n }\r\n</mat-select>\r\n}@else {\r\n<mat-select #multiSelect [id]=\"id\" [formControl]=\"formControl\" [placeholder]=\"props.placeholder??''\"\r\n [required]=\"required\" [tabIndex]=\"props.tabindex\" [compareWith]=\"compareWithFn\"\r\n [errorStateMatcher]=\"errorStateMatcher\" [aria-label]=\"getAriaLabel()\" [aria-labelledby]=\"getAriaLabelledby()\"\r\n [disableOptionCentering]=\"props.disableOptionCentering\"\r\n [typeaheadDebounceInterval]=\"props.typeaheadDebounceInterval\"\r\n [panelClass]=\"'overflow-y-auto lg:overflow-y-hidden lg:hover:overflow-y-auto scrollbar-custom'\">\r\n @if ((filteredCustomDetails | async); as customDetails) {\r\n @if (props.search) {\r\n <mat-option>\r\n <cmat-select-search [formControl]=\"multiFilterCtrl\" [showToggleAllCheckbox]=\"props.showToggleAllCheckbox\"\r\n [toggleAllCheckboxIndeterminate]=\"isIndeterminate\" [toggleAllCheckboxChecked]=\"isChecked\"\r\n (toggleAll)=\"toggleSelectAll($event)\">\r\n </cmat-select-search>\r\n </mat-option>\r\n }\r\n @if (props.canNull) {\r\n <mat-option>\u7A7A</mat-option>\r\n }\r\n @for (i of customDetails; track trackByFn($index)) {\r\n @if(i.group){\r\n <mat-optgroup [label]=\"i.label\">\r\n @for (child of i.group; track trackByFn($index)) {\r\n <mat-option [value]=\"child\" [disabled]=\"child.disabled\">\r\n {{ child.label }}\r\n </mat-option>\r\n }\r\n </mat-optgroup>\r\n }@else {\r\n <mat-option [value]=\"i\" [disabled]=\"i.disabled\">{{i.label}}</mat-option>\r\n }\r\n }\r\n }\r\n</mat-select>\r\n}\r\n", styles: [":host{width:100%}\n"] }]
909
+ }], ctorParameters: () => [{ type: i1$2.HttpClient }] });
910
+
911
+ class CmatSelectTreeTypeComponent extends FieldType$1 {
912
+ constructor(_http, _changeDetectorRef) {
913
+ super();
914
+ this._http = _http;
915
+ this._changeDetectorRef = _changeDetectorRef;
916
+ this.defaultOptions = {
917
+ props: {
918
+ multiple: false,
919
+ search: true,
920
+ canNull: false,
921
+ showToggleAllCheckbox: false,
922
+ expandable: true,
923
+ customTriggerLabelTemplate: '${name}'
924
+ },
925
+ };
926
+ this.urlData = [];
927
+ this._unsubscribeAll = new Subject();
928
+ }
929
+ ngOnInit() {
930
+ const url = this.field.props?.domain?.url;
931
+ if (url && this.field.props?.domain?.code && this.field.props?.domain?.key && this.field.props?.domain?.value) {
932
+ this._http.get(url).pipe(takeUntil(this._unsubscribeAll)).subscribe((data) => {
933
+ if (data) {
934
+ const datas = data.filter((i) => {
935
+ if (this.field.props?.domain?.key)
936
+ return i[this.field.props?.domain?.key] === this.field.props?.domain?.code;
937
+ return false;
938
+ });
939
+ if (datas && this.field.props?.domain?.value) {
940
+ this.urlData = datas[0][this.field.props?.domain?.value];
941
+ }
942
+ else {
943
+ this.urlData = [];
944
+ }
945
+ }
946
+ else {
947
+ this.urlData = [];
948
+ }
949
+ this._changeDetectorRef.markForCheck();
950
+ });
951
+ }
952
+ else {
953
+ this.urlData = [];
954
+ this._changeDetectorRef.markForCheck();
955
+ }
956
+ }
957
+ ngOnDestroy() {
958
+ this._unsubscribeAll.next(void 0);
959
+ this._unsubscribeAll.complete();
960
+ }
961
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatSelectTreeTypeComponent, deps: [{ token: i1$2.HttpClient }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
962
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.7", type: CmatSelectTreeTypeComponent, isStandalone: true, selector: "cmat-select-tree-type", usesInheritance: true, ngImport: i0, template: "<cmat-select-tree [formControl]=\"formControl\" [dataSource]=\"urlData\" [customTriggerLabelTemplate]=\"'${name}'\"\r\n [multiple]=\"props.multiple\" [overallSearchEnabled]=\"props.search\" [canNull]=\"props.canNull\"\r\n [showToggleAllCheckbox]=\"props.showToggleAllCheckbox\" [expandable]=\"props.expandable\" [placeholder]=\"placeholder\"\r\n [tabIndex]=\"props.tabindex\" [required]=\"required\"></cmat-select-tree>", styles: [":host{width:100%}cmat-select-tree-type{display:block;z-index:101}cmat-select-tree-type.hidden{display:none}cmat-select-tree-type .cmat-select-search-inner{overflow:hidden;position:fixed;line-height:45px;display:flex;flex-direction:row}cmat-select-tree-type .cmat-select-search-inner span{display:flex;place-items:center}cmat-select-tree-type .cmat-select-search-no-entries-found{width:100%;text-align:center;border-radius:.25rem;box-shadow:0 2px 8px #00000059}cmat-select-tree-type .cmat-select-search-input{padding-top:0;padding-bottom:0;height:48px;line-height:48px}cmat-select-tree-type .cmat-select-search-clear{top:3px;margin:0 10px}cmat-select-tree-type .cmat-select-search-icon{margin-right:0;margin-left:10px}cmat-select-tree-type .mat-mdc-option-pseudo-checkbox{display:none}cmat-select-tree-type .mat-tree-node{cursor:pointer}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: CmatSelectTreeComponent, selector: "cmat-select-tree", inputs: ["id", "dataSource", "noEntriesFoundLabel", "showNoFoundLabel", "multiple", "overallSearchEnabled", "canNull", "customTriggerLabelFn", "customTriggerLabelTemplate", "expandable", "showToggleAllCheckbox", "placeholder", "value", "required", "disabled"], exportAs: ["cmatSelectTree"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
963
+ }
964
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatSelectTreeTypeComponent, decorators: [{
965
+ type: Component,
966
+ args: [{ selector: 'cmat-select-tree-type', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [ReactiveFormsModule, CmatSelectTreeComponent], template: "<cmat-select-tree [formControl]=\"formControl\" [dataSource]=\"urlData\" [customTriggerLabelTemplate]=\"'${name}'\"\r\n [multiple]=\"props.multiple\" [overallSearchEnabled]=\"props.search\" [canNull]=\"props.canNull\"\r\n [showToggleAllCheckbox]=\"props.showToggleAllCheckbox\" [expandable]=\"props.expandable\" [placeholder]=\"placeholder\"\r\n [tabIndex]=\"props.tabindex\" [required]=\"required\"></cmat-select-tree>", styles: [":host{width:100%}cmat-select-tree-type{display:block;z-index:101}cmat-select-tree-type.hidden{display:none}cmat-select-tree-type .cmat-select-search-inner{overflow:hidden;position:fixed;line-height:45px;display:flex;flex-direction:row}cmat-select-tree-type .cmat-select-search-inner span{display:flex;place-items:center}cmat-select-tree-type .cmat-select-search-no-entries-found{width:100%;text-align:center;border-radius:.25rem;box-shadow:0 2px 8px #00000059}cmat-select-tree-type .cmat-select-search-input{padding-top:0;padding-bottom:0;height:48px;line-height:48px}cmat-select-tree-type .cmat-select-search-clear{top:3px;margin:0 10px}cmat-select-tree-type .cmat-select-search-icon{margin-right:0;margin-left:10px}cmat-select-tree-type .mat-mdc-option-pseudo-checkbox{display:none}cmat-select-tree-type .mat-tree-node{cursor:pointer}\n"] }]
967
+ }], ctorParameters: () => [{ type: i1$2.HttpClient }, { type: i0.ChangeDetectorRef }] });
968
+
969
+ class CmatStepperHorizontalTypeComponent extends FieldType$2 {
970
+ isValid(field) {
971
+ if (field.key) {
972
+ if (field.formControl)
973
+ return field.formControl.valid;
974
+ return true;
975
+ }
976
+ return field.fieldGroup ? field.fieldGroup.every(f => this.isValid(f)) : true;
977
+ }
978
+ trackByFn(index) {
979
+ return index;
980
+ }
981
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatStepperHorizontalTypeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
982
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.7", type: CmatStepperHorizontalTypeComponent, isStandalone: true, selector: "cmat-stepper-horizontal-type", usesInheritance: true, ngImport: i0, template: "<mat-horizontal-stepper [linear]=\"props.isLinear\" [tabIndex]=\"props.tabindex\">\r\n\r\n <ng-template matStepperIcon=\"edit\">\r\n <mat-icon [svgIcon]=\"'heroicons_solid:pencil'\" class=\"icon-size-4\"></mat-icon>\r\n </ng-template>\r\n <ng-template matStepperIcon=\"done\">\r\n <mat-icon [svgIcon]=\"'heroicons_outline:check'\" class=\"icon-size-4\"></mat-icon>\r\n </ng-template>\r\n\r\n @for (step of field.fieldGroup; track trackByFn($index)) {\r\n <mat-step [stepControl]=\"step.formControl!\" [editable]=\"step.props?.isEditable||$last\" [optional]=\"step.props?.isOptional\">\r\n <ng-template matStepLabel>{{ step.props?.label||'' }}</ng-template>\r\n <div class=\"py-2\">\r\n <formly-field [field]=\"step\"></formly-field>\r\n </div>\r\n <div class=\"mt-2 space-x-2\">\r\n @if($index !== 0){\r\n <button matStepperPrevious mat-raised-button color=\"primary\" type=\"button\">\u4E0A\u4E00\u6B65</button>\r\n }\r\n\r\n @if(!$last){\r\n <button matStepperNext mat-raised-button color=\"primary\" type=\"button\" [disabled]=\"!isValid(step)\">\r\n \u4E0B\u4E00\u6B65\r\n </button>\r\n }\r\n </div>\r\n </mat-step>\r\n }\r\n\r\n</mat-horizontal-stepper>", styles: [":host{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i1$4.FormlyField, selector: "formly-field", inputs: ["field"] }, { kind: "ngmodule", type: MatStepperModule }, { kind: "component", type: i2$5.MatStep, selector: "mat-step", inputs: ["color"], exportAs: ["matStep"] }, { kind: "directive", type: i2$5.MatStepLabel, selector: "[matStepLabel]" }, { kind: "component", type: i2$5.MatStepper, selector: "mat-stepper, mat-vertical-stepper, mat-horizontal-stepper, [matStepper]", inputs: ["disableRipple", "color", "labelPosition", "headerPosition", "animationDuration"], outputs: ["animationDone"], exportAs: ["matStepper", "matVerticalStepper", "matHorizontalStepper"] }, { kind: "directive", type: i2$5.MatStepperNext, selector: "button[matStepperNext]" }, { kind: "directive", type: i2$5.MatStepperPrevious, selector: "button[matStepperPrevious]" }, { kind: "directive", type: i2$5.MatStepperIcon, selector: "ng-template[matStepperIcon]", inputs: ["matStepperIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
983
+ }
984
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatStepperHorizontalTypeComponent, decorators: [{
985
+ type: Component,
986
+ args: [{ selector: 'cmat-stepper-horizontal-type', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [FormlyModule, MatStepperModule, MatButtonModule, ReactiveFormsModule, MatIconModule], template: "<mat-horizontal-stepper [linear]=\"props.isLinear\" [tabIndex]=\"props.tabindex\">\r\n\r\n <ng-template matStepperIcon=\"edit\">\r\n <mat-icon [svgIcon]=\"'heroicons_solid:pencil'\" class=\"icon-size-4\"></mat-icon>\r\n </ng-template>\r\n <ng-template matStepperIcon=\"done\">\r\n <mat-icon [svgIcon]=\"'heroicons_outline:check'\" class=\"icon-size-4\"></mat-icon>\r\n </ng-template>\r\n\r\n @for (step of field.fieldGroup; track trackByFn($index)) {\r\n <mat-step [stepControl]=\"step.formControl!\" [editable]=\"step.props?.isEditable||$last\" [optional]=\"step.props?.isOptional\">\r\n <ng-template matStepLabel>{{ step.props?.label||'' }}</ng-template>\r\n <div class=\"py-2\">\r\n <formly-field [field]=\"step\"></formly-field>\r\n </div>\r\n <div class=\"mt-2 space-x-2\">\r\n @if($index !== 0){\r\n <button matStepperPrevious mat-raised-button color=\"primary\" type=\"button\">\u4E0A\u4E00\u6B65</button>\r\n }\r\n\r\n @if(!$last){\r\n <button matStepperNext mat-raised-button color=\"primary\" type=\"button\" [disabled]=\"!isValid(step)\">\r\n \u4E0B\u4E00\u6B65\r\n </button>\r\n }\r\n </div>\r\n </mat-step>\r\n }\r\n\r\n</mat-horizontal-stepper>", styles: [":host{width:100%}\n"] }]
987
+ }] });
988
+
989
+ class CmatStepperVerticalTypeComponent extends FieldType$2 {
990
+ isValid(field) {
991
+ if (field.key) {
992
+ if (field.formControl)
993
+ return field.formControl.valid;
994
+ return true;
995
+ }
996
+ return field.fieldGroup ? field.fieldGroup.every(f => this.isValid(f)) : true;
997
+ }
998
+ trackByFn(index) {
999
+ return index;
1000
+ }
1001
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatStepperVerticalTypeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1002
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.7", type: CmatStepperVerticalTypeComponent, isStandalone: true, selector: "cmat-stepper-vertical-type", usesInheritance: true, ngImport: i0, template: "<mat-vertical-stepper [linear]=\"props.isLinear\" [tabIndex]=\"props.tabindex\">\r\n <ng-template matStepperIcon=\"edit\">\r\n <mat-icon [svgIcon]=\"'heroicons_solid:pencil'\" class=\"icon-size-4\"></mat-icon>\r\n </ng-template>\r\n <ng-template matStepperIcon=\"done\">\r\n <mat-icon [svgIcon]=\"'heroicons_outline:check'\" class=\"icon-size-4\"></mat-icon>\r\n </ng-template>\r\n\r\n @for (step of field.fieldGroup; track trackByFn($index)) {\r\n <mat-step [stepControl]=\"step.formControl!\" [editable]=\"step.props?.isEditable||$last\" [optional]=\"step.props?.isOptional\">\r\n <ng-template matStepLabel>{{ step.props?.label||'' }}</ng-template>\r\n <div class=\"py-2\">\r\n <formly-field [field]=\"step\"></formly-field>\r\n </div>\r\n\r\n <div class=\"mt-2 space-x-2\">\r\n @if($index!==0){\r\n <button matStepperPrevious mat-raised-button color=\"primary\" type=\"button\">\u4E0A\u4E00\u6B65</button>\r\n }\r\n\r\n @if(!$last){\r\n <button matStepperNext mat-raised-button color=\"primary\" type=\"button\" [disabled]=\"!isValid(step)\">\r\n \u4E0B\u4E00\u6B65\r\n </button>\r\n }\r\n </div>\r\n </mat-step>\r\n }\r\n</mat-vertical-stepper>", styles: [":host{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i1$4.FormlyField, selector: "formly-field", inputs: ["field"] }, { kind: "ngmodule", type: MatStepperModule }, { kind: "component", type: i2$5.MatStep, selector: "mat-step", inputs: ["color"], exportAs: ["matStep"] }, { kind: "directive", type: i2$5.MatStepLabel, selector: "[matStepLabel]" }, { kind: "component", type: i2$5.MatStepper, selector: "mat-stepper, mat-vertical-stepper, mat-horizontal-stepper, [matStepper]", inputs: ["disableRipple", "color", "labelPosition", "headerPosition", "animationDuration"], outputs: ["animationDone"], exportAs: ["matStepper", "matVerticalStepper", "matHorizontalStepper"] }, { kind: "directive", type: i2$5.MatStepperNext, selector: "button[matStepperNext]" }, { kind: "directive", type: i2$5.MatStepperPrevious, selector: "button[matStepperPrevious]" }, { kind: "directive", type: i2$5.MatStepperIcon, selector: "ng-template[matStepperIcon]", inputs: ["matStepperIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1003
+ }
1004
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatStepperVerticalTypeComponent, decorators: [{
1005
+ type: Component,
1006
+ args: [{ selector: 'cmat-stepper-vertical-type', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [FormlyModule, MatStepperModule, MatButtonModule, ReactiveFormsModule, MatIconModule], template: "<mat-vertical-stepper [linear]=\"props.isLinear\" [tabIndex]=\"props.tabindex\">\r\n <ng-template matStepperIcon=\"edit\">\r\n <mat-icon [svgIcon]=\"'heroicons_solid:pencil'\" class=\"icon-size-4\"></mat-icon>\r\n </ng-template>\r\n <ng-template matStepperIcon=\"done\">\r\n <mat-icon [svgIcon]=\"'heroicons_outline:check'\" class=\"icon-size-4\"></mat-icon>\r\n </ng-template>\r\n\r\n @for (step of field.fieldGroup; track trackByFn($index)) {\r\n <mat-step [stepControl]=\"step.formControl!\" [editable]=\"step.props?.isEditable||$last\" [optional]=\"step.props?.isOptional\">\r\n <ng-template matStepLabel>{{ step.props?.label||'' }}</ng-template>\r\n <div class=\"py-2\">\r\n <formly-field [field]=\"step\"></formly-field>\r\n </div>\r\n\r\n <div class=\"mt-2 space-x-2\">\r\n @if($index!==0){\r\n <button matStepperPrevious mat-raised-button color=\"primary\" type=\"button\">\u4E0A\u4E00\u6B65</button>\r\n }\r\n\r\n @if(!$last){\r\n <button matStepperNext mat-raised-button color=\"primary\" type=\"button\" [disabled]=\"!isValid(step)\">\r\n \u4E0B\u4E00\u6B65\r\n </button>\r\n }\r\n </div>\r\n </mat-step>\r\n }\r\n</mat-vertical-stepper>", styles: [":host{width:100%}\n"] }]
1007
+ }] });
1008
+
1009
+ class CmatTableTypeComponent extends FieldArrayType {
1010
+ constructor(_changeDetectorRef) {
1011
+ super();
1012
+ this._changeDetectorRef = _changeDetectorRef;
1013
+ this.inlineform = new FormGroup({});
1014
+ this.currentMode = {};
1015
+ this.displayedColumns = [];
1016
+ this.dialogType = '';
1017
+ this.defaultOptions = {
1018
+ props: {
1019
+ addText: '新增'
1020
+ },
1021
+ };
1022
+ this._dialog = inject(MatDialog);
1023
+ this._viewContainerRef = inject(ViewContainerRef);
1024
+ }
1025
+ get fieldArray() {
1026
+ return this.field.fieldArray.fieldGroup;
1027
+ }
1028
+ get key() {
1029
+ return this.field.fieldArray.fieldGroup[0].id;
1030
+ }
1031
+ ngOnInit() {
1032
+ this.columns = this.field.fieldArray.fieldGroup[0].fieldGroup.
1033
+ filter(field => field.props?.showColumn).map(field => ({
1034
+ key: field.key,
1035
+ label: field.props?.label ?? '',
1036
+ }));
1037
+ if (this.props.disabled) {
1038
+ this.displayedColumns = [...this.columns.map(column => column.key)];
1039
+ }
1040
+ else {
1041
+ this.displayedColumns = [...this.columns.map(column => column.key), '_actions_'];
1042
+ }
1043
+ }
1044
+ addRow() {
1045
+ this._dialogRef = this._dialog
1046
+ .open(this.dialogRef, {
1047
+ panelClass: ['cmat-table-dialog-container'],
1048
+ viewContainerRef: this._viewContainerRef
1049
+ });
1050
+ this._dialogRef.afterClosed()
1051
+ .subscribe(() => { this.dialogType = ''; });
1052
+ this.dialogType = 'add';
1053
+ this.currentMode = {};
1054
+ this.inlineform.reset();
1055
+ }
1056
+ editRow(item, index) {
1057
+ this.currentIndex = index;
1058
+ this._dialogRef = this._dialog
1059
+ .open(this.dialogRef, {
1060
+ panelClass: ['cmat-table-dialog-container'],
1061
+ viewContainerRef: this._viewContainerRef
1062
+ });
1063
+ this._dialogRef.afterClosed()
1064
+ .subscribe(() => { this.dialogType = ''; });
1065
+ this.dialogType = 'edit';
1066
+ this.currentMode = {
1067
+ [this.key]: item
1068
+ };
1069
+ }
1070
+ deleteRow(id) {
1071
+ this.remove(id);
1072
+ this.table.renderRows();
1073
+ }
1074
+ confirm() {
1075
+ if (this.inlineform.invalid) {
1076
+ this.inlineform.markAllAsTouched();
1077
+ return;
1078
+ }
1079
+ if (this.dialogType == 'add' && this.currentMode[this.key]) {
1080
+ this.add(this.model?.length ?? 0, this.currentMode[this.key]);
1081
+ }
1082
+ else if (this.dialogType == 'edit' && this.currentMode[this.key]) {
1083
+ this.model[this.currentIndex] = this.currentMode[this.key];
1084
+ }
1085
+ this.table.renderRows();
1086
+ this._changeDetectorRef.markForCheck();
1087
+ this._dialogRef.close();
1088
+ }
1089
+ trackByFn(index) {
1090
+ return index;
1091
+ }
1092
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatTableTypeComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
1093
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.7", type: CmatTableTypeComponent, isStandalone: true, selector: "cmat-table-type", viewQueries: [{ propertyName: "dialogRef", first: true, predicate: ["dialogRef"], descendants: true }, { propertyName: "table", first: true, predicate: ["table"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"relative flex flex-col sm:flex-row flex-0 sm:items-center sm:justify-between p-2 border-b mb-1\">\r\n <div>\r\n @if(props.label){\r\n <legend class=\"text-lg\">\r\n {{ props.label }}\r\n @if(props.required){\r\n <span>*</span>\r\n }\r\n </legend>\r\n }\r\n @if(props.description){\r\n <p>{{ props.description }}</p>\r\n }\r\n </div>\r\n\r\n @if(!props.disabled){\r\n <div class=\"flex flex-shrink-0 items-center mt-6 sm:mt-0 sm:ml-4 print:hidden\">\r\n <button class=\"ml-4\" mat-flat-button [color]=\"'primary'\" (click)=\"addRow()\">\r\n <mat-icon [svgIcon]=\"'heroicons_outline:plus'\"></mat-icon>\r\n <span class=\"ml-2\">{{props.addText}}</span>\r\n </button>\r\n </div>\r\n }\r\n</div>\r\n\r\n<table mat-table [dataSource]=\"model||[]\" class=\"mat-elevation-z w-full\" [tabIndex]=\"props.tabindex\" #table>\r\n @for (column of columns; track trackByFn($index)) {\r\n <ng-container [matColumnDef]=\"column.key\">\r\n <th mat-header-cell *matHeaderCellDef> {{ column.label }} </th>\r\n <td mat-cell *matCellDef=\"let element; let i = index\">{{element[column.key]}}</td>\r\n </ng-container>\r\n }\r\n\r\n <ng-container matColumnDef=\"_actions_\">\r\n <th mat-header-cell *matHeaderCellDef class=\"print:hidden\">\u64CD\u4F5C</th>\r\n <td mat-cell *matCellDef=\"let element; let i = index\" class=\"print:hidden\">\r\n <button type=\"button\" class=\"w-8 min-h-8 h-8 max-w-8 lg:opacity-0 lg:group-hover:opacity-100\"\r\n mat-icon-button (click)=\"editRow(element,i)\" [matTooltip]=\"'\u7F16\u8F91'\">\r\n <mat-icon class=\"icon-size-5\" color=\"primary\" [svgIcon]=\"'heroicons_solid:pencil-square'\">\r\n </mat-icon>\r\n </button>\r\n\r\n <button type=\"button\" class=\"w-8 min-h-8 h-8 max-w-8 lg:opacity-0 lg:group-hover:opacity-100\"\r\n mat-icon-button (click)=\"deleteRow(i)\" [matTooltip]=\"'\u79FB\u9664'\">\r\n <mat-icon class=\"icon-size-5\" color=\"warn\" [svgIcon]=\"'heroicons_solid:trash'\"></mat-icon>\r\n </button>\r\n </td>\r\n </ng-container>\r\n\r\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\r\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\" class=\"group\"></tr>\r\n</table>\r\n\r\n\r\n<ng-template #inlineTable>\r\n <div class=\"overflow-y-auto lg:overflow-y-hidden lg:hover:overflow-y-auto scrollbar-custom w-full\">\r\n <form [formGroup]=\"inlineform\">\r\n <formly-form [fields]=\"fieldArray\" [model]=\"currentMode\" [form]=\"inlineform\"></formly-form>\r\n </form>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #dialogRef>\r\n <div mat-dialog-title cdkDrag class=\"-mt-6\" cdkDragRootElement=\".cdk-overlay-pane\" cdkDragHandle>\r\n <h2 class=\"pointer-events-none text-xl\">{{ props.label +'\u8BE6\u7EC6\u9875'}}</h2>\r\n </div>\r\n\r\n <mat-dialog-content>\r\n <ng-container *ngTemplateOutlet=\"inlineTable\"></ng-container>\r\n </mat-dialog-content>\r\n\r\n <mat-dialog-actions>\r\n <div class=\"w-full flex justify-end items-center\">\r\n <button mat-raised-button color=\"primary\" cdkFocusInitial (click)=\"confirm()\">\r\n \u786E\u5B9A\r\n </button>\r\n <button mat-button mat-dialog-close>\r\n \u53D6\u6D88\r\n </button>\r\n </div>\r\n </mat-dialog-actions>\r\n</ng-template>", styles: [":host{width:100%}.mat-column-_actions_{width:8rem;text-align:center}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i3.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i3$4.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i3$4.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i3$4.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i3$4.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i3$4.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i3$4.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i3$4.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i3$4.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i3$4.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i3$4.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i1$4.FormlyForm, selector: "formly-form", inputs: ["form", "model", "fields", "options"], outputs: ["modelChange"] }, { kind: "directive", type: CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatDialogModule }, { kind: "directive", type: i6.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i6.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i6.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i6.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i7.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1094
+ }
1095
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatTableTypeComponent, decorators: [{
1096
+ type: Component,
1097
+ args: [{ selector: 'cmat-table-type', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [MatButtonModule, MatIconModule, MatTableModule, FormsModule, FormlyModule, CdkDrag,
1098
+ ReactiveFormsModule, MatDialogModule, NgTemplateOutlet, MatTooltipModule], template: "<div class=\"relative flex flex-col sm:flex-row flex-0 sm:items-center sm:justify-between p-2 border-b mb-1\">\r\n <div>\r\n @if(props.label){\r\n <legend class=\"text-lg\">\r\n {{ props.label }}\r\n @if(props.required){\r\n <span>*</span>\r\n }\r\n </legend>\r\n }\r\n @if(props.description){\r\n <p>{{ props.description }}</p>\r\n }\r\n </div>\r\n\r\n @if(!props.disabled){\r\n <div class=\"flex flex-shrink-0 items-center mt-6 sm:mt-0 sm:ml-4 print:hidden\">\r\n <button class=\"ml-4\" mat-flat-button [color]=\"'primary'\" (click)=\"addRow()\">\r\n <mat-icon [svgIcon]=\"'heroicons_outline:plus'\"></mat-icon>\r\n <span class=\"ml-2\">{{props.addText}}</span>\r\n </button>\r\n </div>\r\n }\r\n</div>\r\n\r\n<table mat-table [dataSource]=\"model||[]\" class=\"mat-elevation-z w-full\" [tabIndex]=\"props.tabindex\" #table>\r\n @for (column of columns; track trackByFn($index)) {\r\n <ng-container [matColumnDef]=\"column.key\">\r\n <th mat-header-cell *matHeaderCellDef> {{ column.label }} </th>\r\n <td mat-cell *matCellDef=\"let element; let i = index\">{{element[column.key]}}</td>\r\n </ng-container>\r\n }\r\n\r\n <ng-container matColumnDef=\"_actions_\">\r\n <th mat-header-cell *matHeaderCellDef class=\"print:hidden\">\u64CD\u4F5C</th>\r\n <td mat-cell *matCellDef=\"let element; let i = index\" class=\"print:hidden\">\r\n <button type=\"button\" class=\"w-8 min-h-8 h-8 max-w-8 lg:opacity-0 lg:group-hover:opacity-100\"\r\n mat-icon-button (click)=\"editRow(element,i)\" [matTooltip]=\"'\u7F16\u8F91'\">\r\n <mat-icon class=\"icon-size-5\" color=\"primary\" [svgIcon]=\"'heroicons_solid:pencil-square'\">\r\n </mat-icon>\r\n </button>\r\n\r\n <button type=\"button\" class=\"w-8 min-h-8 h-8 max-w-8 lg:opacity-0 lg:group-hover:opacity-100\"\r\n mat-icon-button (click)=\"deleteRow(i)\" [matTooltip]=\"'\u79FB\u9664'\">\r\n <mat-icon class=\"icon-size-5\" color=\"warn\" [svgIcon]=\"'heroicons_solid:trash'\"></mat-icon>\r\n </button>\r\n </td>\r\n </ng-container>\r\n\r\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\r\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\" class=\"group\"></tr>\r\n</table>\r\n\r\n\r\n<ng-template #inlineTable>\r\n <div class=\"overflow-y-auto lg:overflow-y-hidden lg:hover:overflow-y-auto scrollbar-custom w-full\">\r\n <form [formGroup]=\"inlineform\">\r\n <formly-form [fields]=\"fieldArray\" [model]=\"currentMode\" [form]=\"inlineform\"></formly-form>\r\n </form>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #dialogRef>\r\n <div mat-dialog-title cdkDrag class=\"-mt-6\" cdkDragRootElement=\".cdk-overlay-pane\" cdkDragHandle>\r\n <h2 class=\"pointer-events-none text-xl\">{{ props.label +'\u8BE6\u7EC6\u9875'}}</h2>\r\n </div>\r\n\r\n <mat-dialog-content>\r\n <ng-container *ngTemplateOutlet=\"inlineTable\"></ng-container>\r\n </mat-dialog-content>\r\n\r\n <mat-dialog-actions>\r\n <div class=\"w-full flex justify-end items-center\">\r\n <button mat-raised-button color=\"primary\" cdkFocusInitial (click)=\"confirm()\">\r\n \u786E\u5B9A\r\n </button>\r\n <button mat-button mat-dialog-close>\r\n \u53D6\u6D88\r\n </button>\r\n </div>\r\n </mat-dialog-actions>\r\n</ng-template>", styles: [":host{width:100%}.mat-column-_actions_{width:8rem;text-align:center}\n"] }]
1099
+ }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { dialogRef: [{
1100
+ type: ViewChild,
1101
+ args: ['dialogRef']
1102
+ }], table: [{
1103
+ type: ViewChild,
1104
+ args: ['table']
1105
+ }] } });
1106
+
1107
+ class CmatTabTypeComponent extends FieldType$1 {
1108
+ trackByFn(index) {
1109
+ return index;
1110
+ }
1111
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatTabTypeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1112
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.7", type: CmatTabTypeComponent, isStandalone: true, selector: "cmat-tab-type", usesInheritance: true, ngImport: i0, template: "<mat-tab-group [tabIndex]=\"props.tabindex\">\r\n @for (tab of field.fieldGroup; track trackByFn($index)) {\r\n <mat-tab [label]=\"tab.props?.label||''\" [disabled]=\"tab.props?.disabled\">\r\n <div class=\"py-2\">\r\n <formly-field [field]=\"tab\"></formly-field>\r\n </div>\r\n </mat-tab>\r\n }\r\n</mat-tab-group>", styles: [":host{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: MatTabsModule }, { kind: "component", type: i1$5.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby", "labelClass", "bodyClass"], exportAs: ["matTab"] }, { kind: "component", type: i1$5.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "fitInkBarToContent", "mat-stretch-tabs", "dynamicHeight", "selectedIndex", "headerPosition", "animationDuration", "contentTabIndex", "disablePagination", "disableRipple", "preserveContent", "backgroundColor"], outputs: ["selectedIndexChange", "focusChange", "animationDone", "selectedTabChange"], exportAs: ["matTabGroup"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i1$4.FormlyField, selector: "formly-field", inputs: ["field"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1113
+ }
1114
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatTabTypeComponent, decorators: [{
1115
+ type: Component,
1116
+ args: [{ selector: 'cmat-tab-type', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [MatTabsModule, FormlyModule], template: "<mat-tab-group [tabIndex]=\"props.tabindex\">\r\n @for (tab of field.fieldGroup; track trackByFn($index)) {\r\n <mat-tab [label]=\"tab.props?.label||''\" [disabled]=\"tab.props?.disabled\">\r\n <div class=\"py-2\">\r\n <formly-field [field]=\"tab\"></formly-field>\r\n </div>\r\n </mat-tab>\r\n }\r\n</mat-tab-group>", styles: [":host{width:100%}\n"] }]
1117
+ }] });
1118
+
1119
+ class CmatTagsTypeComponent extends FieldType {
1120
+ constructor(_http, _overlay, _viewContainerRef, _changeDetectorRef) {
1121
+ super();
1122
+ this._http = _http;
1123
+ this._overlay = _overlay;
1124
+ this._viewContainerRef = _viewContainerRef;
1125
+ this._changeDetectorRef = _changeDetectorRef;
1126
+ this._filteredItems = new BehaviorSubject(null);
1127
+ this._unsubscribeAll = new Subject();
1128
+ }
1129
+ get filteredItems$() {
1130
+ return this._filteredItems.asObservable();
1131
+ }
1132
+ get tags() {
1133
+ if (isArray$1(this.field.props?.options)) {
1134
+ return this.urlData?.length > 0 ? this.urlData : this.field.props?.options || [];
1135
+ }
1136
+ else {
1137
+ return this.urlData?.length > 0 ? this.urlData : this.optionsData || [];
1138
+ }
1139
+ }
1140
+ ngOnInit() {
1141
+ if (this.field.props?.options && !isArray$1(this.field.props?.options)) {
1142
+ this.field.props?.options.pipe(takeUntil(this._unsubscribeAll)).subscribe((data) => {
1143
+ this.optionsData = data;
1144
+ });
1145
+ }
1146
+ const url = this.field.props?.domain?.url;
1147
+ if (url && this.field.props?.domain?.code && this.field.props?.domain?.key && this.field.props?.domain?.value) {
1148
+ this._http.get(url).pipe(takeUntil(this._unsubscribeAll)).subscribe((data) => {
1149
+ if (data) {
1150
+ const datas = data.filter((i) => {
1151
+ if (this.field.props?.domain?.key)
1152
+ return i[this.field.props?.domain?.key] === this.field.props?.domain?.code;
1153
+ return false;
1154
+ });
1155
+ if (datas && this.field.props?.domain?.value) {
1156
+ this.urlData = datas[0][this.field.props?.domain?.value];
1157
+ }
1158
+ else {
1159
+ this.urlData = [];
1160
+ }
1161
+ }
1162
+ else {
1163
+ this.urlData = [];
1164
+ }
1165
+ this._filteredItems.next(this.tags);
1166
+ });
1167
+ }
1168
+ else {
1169
+ this.urlData = [];
1170
+ this._filteredItems.next(this.tags);
1171
+ }
1172
+ }
1173
+ ngOnDestroy() {
1174
+ this._unsubscribeAll.next(void 0);
1175
+ this._unsubscribeAll.complete();
1176
+ }
1177
+ openTagsPanel() {
1178
+ this._tagsPanelOverlayRef = this._overlay.create({
1179
+ backdropClass: '',
1180
+ hasBackdrop: true,
1181
+ scrollStrategy: this._overlay.scrollStrategies.block(),
1182
+ positionStrategy: this._overlay.position()
1183
+ .flexibleConnectedTo(this._tagsPanelOrigin.nativeElement)
1184
+ .withFlexibleDimensions(true)
1185
+ .withViewportMargin(64)
1186
+ .withLockedPosition(true)
1187
+ .withPositions([
1188
+ {
1189
+ originX: 'start',
1190
+ originY: 'bottom',
1191
+ overlayX: 'start',
1192
+ overlayY: 'top'
1193
+ }
1194
+ ])
1195
+ });
1196
+ this._tagsPanelOverlayRef.attachments().subscribe(() => {
1197
+ this._tagsPanelOverlayRef.overlayElement.querySelector('input')?.focus();
1198
+ });
1199
+ const templatePortal = new TemplatePortal(this._tagsPanel, this._viewContainerRef);
1200
+ this._tagsPanelOverlayRef.attach(templatePortal);
1201
+ // Subscribe to the backdrop click
1202
+ this._tagsPanelOverlayRef.backdropClick().subscribe(() => {
1203
+ // If overlay exists and attached...
1204
+ if (this._tagsPanelOverlayRef && this._tagsPanelOverlayRef.hasAttached()) {
1205
+ // Detach it
1206
+ this._tagsPanelOverlayRef.detach();
1207
+ // Reset the tag filter
1208
+ this._filteredItems.next(this.tags);
1209
+ }
1210
+ // If template portal exists and attached...
1211
+ if (templatePortal && templatePortal.isAttached) {
1212
+ // Detach it
1213
+ templatePortal.detach();
1214
+ }
1215
+ });
1216
+ }
1217
+ filterTags(event) {
1218
+ const value = event.target.value.toLowerCase();
1219
+ this._filteredItems.next(this.tags.filter(tag => tag.label.toString().toLowerCase().includes(value) || tag.value.toString().toLowerCase().includes(value)));
1220
+ }
1221
+ toggleTag(tag) {
1222
+ if (tag.disabled)
1223
+ return;
1224
+ const data = this.formControl.value || [];
1225
+ const existsTag = data.findIndex((i) => i.value === tag.value);
1226
+ if (existsTag > -1) {
1227
+ data.splice(existsTag, 1);
1228
+ }
1229
+ else {
1230
+ data.unshift(tag);
1231
+ }
1232
+ this.formControl.setValue(data);
1233
+ this._changeDetectorRef.markForCheck();
1234
+ }
1235
+ trackByFn(index) {
1236
+ return index;
1237
+ }
1238
+ isCheck(tag) {
1239
+ return this.formControl.value?.filter((i) => i.value === tag.value).length > 0;
1240
+ }
1241
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatTagsTypeComponent, deps: [{ token: i1$2.HttpClient }, { token: i2$6.Overlay }, { token: i0.ViewContainerRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
1242
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.7", type: CmatTagsTypeComponent, isStandalone: true, selector: "cmat-tags-type", viewQueries: [{ propertyName: "_tagsPanelOrigin", first: true, predicate: ["tagsPanelOrigin"], descendants: true }, { propertyName: "_tagsPanel", first: true, predicate: ["tagsPanel"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"text-lg mb-2\">\r\n {{ props.label }}\r\n @if(props.required){\r\n <span>*</span>\r\n }\r\n</div>\r\n<div class=\"flex flex-wrap items-center -m-2\" [tabIndex]=\"props.tabindex\">\r\n <ng-container>\r\n @for (selectedItem of formControl.value; track trackByFn($index)) {\r\n <div\r\n class=\"flex items-center justify-center px-4 m-1.5 rounded-full leading-9 text-gray-500 bg-slate-100 dark:text-gray-300 dark:bg-slate-700\">\r\n <span class=\"text-md font-medium whitespace-nowrap\">{{selectedItem.label}}</span>\r\n </div>\r\n }\r\n\r\n <div class=\"flex items-center justify-center px-4 m-1.5 rounded-full leading-9 cursor-pointer text-gray-500 bg-slate-100 dark:text-gray-300 dark:bg-slate-700 print:hidden\"\r\n (click)=\"openTagsPanel()\" role=\"presentation\" #tagsPanelOrigin>\r\n\r\n @if(formControl.value?.length&&!disabled){\r\n <mat-icon class=\"icon-size-5\" [svgIcon]=\"'heroicons_solid:pencil-square'\"></mat-icon>\r\n <span class=\"ml-1.5 text-md font-medium whitespace-nowrap\">\u7F16\u8F91</span>\r\n }\r\n\r\n @if(!formControl.value?.length&&!disabled){\r\n <mat-icon class=\"icon-size-5\" [svgIcon]=\"'heroicons_solid:plus-circle'\"></mat-icon>\r\n <span class=\"ml-1.5 text-md font-medium whitespace-nowrap\">\u65B0\u589E</span>\r\n }\r\n\r\n <ng-template #tagsPanel>\r\n <div class=\"w-60 rounded border shadow-md bg-card\">\r\n <div class=\"flex items-center m-3 mr-2\">\r\n <div class=\"flex items-center\">\r\n <mat-icon class=\"icon-size-5\" [svgIcon]=\"'heroicons_solid:magnifying-glass'\">\r\n </mat-icon>\r\n <div class=\"ml-2\">\r\n <input class=\"w-full min-w-0 py-1 border-0\" type=\"text\" placeholder=\"\u8F93\u5165\u6807\u7B7E\u540D\"\r\n (input)=\"filterTags($event)\" [maxLength]=\"30\">\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"flex flex-col max-h-64 py-2 border-t overflow-y-auto\">\r\n @if ((filteredItems$ | async); as filteredItems) {\r\n @if(filteredItems.length>0){\r\n @for (tag of filteredItems; track trackByFn($index)) {\r\n <div role=\"presentation\"\r\n class=\"flex items-center h-10 min-h-10 pl-1 pr-4 cursor-pointer hover:bg-hover\"\r\n (click)=\"toggleTag(tag)\" matRipple>\r\n <mat-checkbox class=\"flex items-center h-10 min-h-10\" [color]=\"'primary'\"\r\n [disabled]=\"tag.disabled\" [checked]=\"isCheck(tag)\">\r\n {{tag.label}}\r\n </mat-checkbox>\r\n </div>\r\n }\r\n }@else {\r\n <div class=\"flex flex-auto flex-col justify-center px-4 h-10 min-h-10\">\r\n \u65E0\u7ED3\u679C\r\n </div>\r\n }\r\n }\r\n </div>\r\n </div>\r\n </ng-template>\r\n </div>\r\n </ng-container>\r\n</div>", styles: [":host{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i2$2.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1243
+ }
1244
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatTagsTypeComponent, decorators: [{
1245
+ type: Component,
1246
+ args: [{ selector: 'cmat-tags-type', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [MatIconModule, MatCheckboxModule, AsyncPipe], template: "<div class=\"text-lg mb-2\">\r\n {{ props.label }}\r\n @if(props.required){\r\n <span>*</span>\r\n }\r\n</div>\r\n<div class=\"flex flex-wrap items-center -m-2\" [tabIndex]=\"props.tabindex\">\r\n <ng-container>\r\n @for (selectedItem of formControl.value; track trackByFn($index)) {\r\n <div\r\n class=\"flex items-center justify-center px-4 m-1.5 rounded-full leading-9 text-gray-500 bg-slate-100 dark:text-gray-300 dark:bg-slate-700\">\r\n <span class=\"text-md font-medium whitespace-nowrap\">{{selectedItem.label}}</span>\r\n </div>\r\n }\r\n\r\n <div class=\"flex items-center justify-center px-4 m-1.5 rounded-full leading-9 cursor-pointer text-gray-500 bg-slate-100 dark:text-gray-300 dark:bg-slate-700 print:hidden\"\r\n (click)=\"openTagsPanel()\" role=\"presentation\" #tagsPanelOrigin>\r\n\r\n @if(formControl.value?.length&&!disabled){\r\n <mat-icon class=\"icon-size-5\" [svgIcon]=\"'heroicons_solid:pencil-square'\"></mat-icon>\r\n <span class=\"ml-1.5 text-md font-medium whitespace-nowrap\">\u7F16\u8F91</span>\r\n }\r\n\r\n @if(!formControl.value?.length&&!disabled){\r\n <mat-icon class=\"icon-size-5\" [svgIcon]=\"'heroicons_solid:plus-circle'\"></mat-icon>\r\n <span class=\"ml-1.5 text-md font-medium whitespace-nowrap\">\u65B0\u589E</span>\r\n }\r\n\r\n <ng-template #tagsPanel>\r\n <div class=\"w-60 rounded border shadow-md bg-card\">\r\n <div class=\"flex items-center m-3 mr-2\">\r\n <div class=\"flex items-center\">\r\n <mat-icon class=\"icon-size-5\" [svgIcon]=\"'heroicons_solid:magnifying-glass'\">\r\n </mat-icon>\r\n <div class=\"ml-2\">\r\n <input class=\"w-full min-w-0 py-1 border-0\" type=\"text\" placeholder=\"\u8F93\u5165\u6807\u7B7E\u540D\"\r\n (input)=\"filterTags($event)\" [maxLength]=\"30\">\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"flex flex-col max-h-64 py-2 border-t overflow-y-auto\">\r\n @if ((filteredItems$ | async); as filteredItems) {\r\n @if(filteredItems.length>0){\r\n @for (tag of filteredItems; track trackByFn($index)) {\r\n <div role=\"presentation\"\r\n class=\"flex items-center h-10 min-h-10 pl-1 pr-4 cursor-pointer hover:bg-hover\"\r\n (click)=\"toggleTag(tag)\" matRipple>\r\n <mat-checkbox class=\"flex items-center h-10 min-h-10\" [color]=\"'primary'\"\r\n [disabled]=\"tag.disabled\" [checked]=\"isCheck(tag)\">\r\n {{tag.label}}\r\n </mat-checkbox>\r\n </div>\r\n }\r\n }@else {\r\n <div class=\"flex flex-auto flex-col justify-center px-4 h-10 min-h-10\">\r\n \u65E0\u7ED3\u679C\r\n </div>\r\n }\r\n }\r\n </div>\r\n </div>\r\n </ng-template>\r\n </div>\r\n </ng-container>\r\n</div>", styles: [":host{width:100%}\n"] }]
1247
+ }], ctorParameters: () => [{ type: i1$2.HttpClient }, { type: i2$6.Overlay }, { type: i0.ViewContainerRef }, { type: i0.ChangeDetectorRef }], propDecorators: { _tagsPanelOrigin: [{
1248
+ type: ViewChild,
1249
+ args: ['tagsPanelOrigin']
1250
+ }], _tagsPanel: [{
1251
+ type: ViewChild,
1252
+ args: ['tagsPanel']
1253
+ }] } });
1254
+
1255
+ class CmatTextareaTypeComponent extends FieldType$1 {
1256
+ constructor() {
1257
+ super(...arguments);
1258
+ this.defaultOptions = {
1259
+ props: {
1260
+ cols: 1,
1261
+ rows: 3,
1262
+ },
1263
+ };
1264
+ }
1265
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatTextareaTypeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1266
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.7", type: CmatTextareaTypeComponent, isStandalone: true, selector: "cmat-textarea-type", usesInheritance: true, ngImport: i0, template: "<textarea matInput [placeholder]=\"placeholder\" \r\n [readonly]=\"props.readonly\" [errorStateMatcher]=\"errorStateMatcher\"\r\n [cols]=\"props.cols\"\r\n [rows]=\"props.rows\"\r\n [tabindex]=\"props.tabindex\"\r\n [formControl]=\"formControl\" [required]=\"required\">\r\n</textarea>", styles: [":host{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i1$3.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1267
+ }
1268
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatTextareaTypeComponent, decorators: [{
1269
+ type: Component,
1270
+ args: [{ selector: 'cmat-textarea-type', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [MatInputModule, ReactiveFormsModule], template: "<textarea matInput [placeholder]=\"placeholder\" \r\n [readonly]=\"props.readonly\" [errorStateMatcher]=\"errorStateMatcher\"\r\n [cols]=\"props.cols\"\r\n [rows]=\"props.rows\"\r\n [tabindex]=\"props.tabindex\"\r\n [formControl]=\"formControl\" [required]=\"required\">\r\n</textarea>", styles: [":host{width:100%}\n"] }]
1271
+ }] });
1272
+
1273
+ class CmatUploadTypeComponent extends FieldType {
1274
+ constructor() {
1275
+ super(...arguments);
1276
+ this.defaultOptions = {
1277
+ props: {
1278
+ fileAlias: 'fileData',
1279
+ filePath: 'path',
1280
+ fileCategory: '分类',
1281
+ multiple: true,
1282
+ accept: '',
1283
+ editMode: true,
1284
+ autoUpload: true
1285
+ }
1286
+ };
1287
+ }
1288
+ upload(id) {
1289
+ if (this.model['uploadId']) {
1290
+ this.model['uploadId'].push(id);
1291
+ }
1292
+ else {
1293
+ this.model['uploadId'] = [id];
1294
+ }
1295
+ }
1296
+ remove(id) {
1297
+ if (this.model['removeId']) {
1298
+ this.model['removeId'].push(id);
1299
+ }
1300
+ else {
1301
+ this.model['removeId'] = [id];
1302
+ }
1303
+ }
1304
+ updateData(i) {
1305
+ const data = Array.isArray(i) ? i : [];
1306
+ this.formControl.setValue(data.map((j) => {
1307
+ if (j.id)
1308
+ return {
1309
+ id: j.id,
1310
+ name: j.name,
1311
+ type: j.type,
1312
+ size: j.size
1313
+ };
1314
+ else
1315
+ return j;
1316
+ }));
1317
+ }
1318
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatUploadTypeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1319
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.7", type: CmatUploadTypeComponent, isStandalone: true, selector: "cmat-upload-type", usesInheritance: true, ngImport: i0, template: "<cmat-upload-queue [tabindex]=\"props.tabindex\" [fileAlias]=\"props.fileAlias\"\r\n [filePath]=\"props.filePath\" [required]=\"required\" [fileCategory]=\"props.fileCategory\" [multiple]=\"props.multiple\"\r\n [accept]=\"props.accept\" [title]=\"props.label??'\u9644\u4EF6'\" [editMode]=\"props.editMode&&!disabled\" [filesData]=\"formControl.value\"\r\n [autoUpload]=\"props.autoUpload\" (outputUploadIdEvent)=\"upload($event)\" (outputRemoveIdEvent)=\"remove($event)\" (outputFilesDataEvent)=\"updateData($event)\">\r\n</cmat-upload-queue>", styles: [":host{width:100%}\n"], dependencies: [{ kind: "component", type: CmatUploadQueueComponent, selector: "cmat-upload-queue", inputs: ["fileAlias", "filePath", "fileCategory", "required", "autoUpload", "multiple", "accept", "title", "editMode", "filesData"], outputs: ["outputRemoveIdEvent", "outputUploadIdEvent", "outputFilesDataEvent"], exportAs: ["cmatUploadQueue"] }, { kind: "ngmodule", type: ReactiveFormsModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1320
+ }
1321
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatUploadTypeComponent, decorators: [{
1322
+ type: Component,
1323
+ args: [{ selector: 'cmat-upload-type', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [CmatUploadQueueComponent, ReactiveFormsModule], template: "<cmat-upload-queue [tabindex]=\"props.tabindex\" [fileAlias]=\"props.fileAlias\"\r\n [filePath]=\"props.filePath\" [required]=\"required\" [fileCategory]=\"props.fileCategory\" [multiple]=\"props.multiple\"\r\n [accept]=\"props.accept\" [title]=\"props.label??'\u9644\u4EF6'\" [editMode]=\"props.editMode&&!disabled\" [filesData]=\"formControl.value\"\r\n [autoUpload]=\"props.autoUpload\" (outputUploadIdEvent)=\"upload($event)\" (outputRemoveIdEvent)=\"remove($event)\" (outputFilesDataEvent)=\"updateData($event)\">\r\n</cmat-upload-queue>", styles: [":host{width:100%}\n"] }]
1324
+ }] });
1325
+
1326
+ /**
1327
+ * Generated bundle index. Do not edit.
1328
+ */
1329
+
1330
+ export { CmatAddonsWrapperComponent, CmatButtonTypeComponent, CmatCardWrapperComponent, CmatCascadeTypeComponent, CmatCheckListTypeComponent, CmatChipsInputTypeComponent, CmatColorPickerTypeComponent, CmatDateRangeTypeComponent, CmatDatepickerTypeComponent, CmatExpansionWrapperComponent, CmatMultiCheckboxTypeComponent, CmatNumberTypeComponent, CmatPanelWrapperComponent, CmatRadioTypeComponent, CmatRatingTypeComponent, CmatRepeatTypeComponent, CmatSelectTreeTypeComponent, CmatSelectTypeComponent, CmatStepperHorizontalTypeComponent, CmatStepperVerticalTypeComponent, CmatTabTypeComponent, CmatTableTypeComponent, CmatTagsTypeComponent, CmatTextareaTypeComponent, CmatUploadTypeComponent, addonsExtension };
1331
+ //# sourceMappingURL=cmat-components-custom-formly.mjs.map