cmat 0.0.6 → 0.0.8

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 (327) 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/breadcrumb/public-api.d.ts +2 -0
  4. package/components/card/card.component.d.ts +1 -1
  5. package/components/card/public-api.d.ts +1 -0
  6. package/components/cascade/cascade-list/cascade-list.component.d.ts +45 -21
  7. package/components/cascade/public-api.d.ts +1 -0
  8. package/components/chip-input/chip-input.component.d.ts +39 -12
  9. package/components/custom-formly/extension/addons.extension.d.ts +2 -0
  10. package/components/custom-formly/index.d.ts +5 -0
  11. package/components/custom-formly/public-api.d.ts +21 -0
  12. package/components/custom-formly/types/button/button.component.d.ts +18 -0
  13. package/components/custom-formly/types/checklist/checklist.component.d.ts +41 -0
  14. package/components/custom-formly/types/chips/chips.component.d.ts +27 -0
  15. package/components/custom-formly/types/multicheckbox/multicheckbox.component.d.ts +44 -0
  16. package/components/custom-formly/types/number/number.component.d.ts +20 -0
  17. package/components/custom-formly/types/radio/radio.component.d.ts +44 -0
  18. package/components/custom-formly/types/rating/rating.component.d.ts +24 -0
  19. package/components/custom-formly/types/repeat/repeat.component.d.ts +16 -0
  20. package/components/custom-formly/types/select/select.component.d.ts +54 -0
  21. package/components/custom-formly/types/select-tree/select-tree.component.d.ts +43 -0
  22. package/components/custom-formly/types/stepper/horizontal/stepper.component.d.ts +9 -0
  23. package/components/custom-formly/types/stepper/stepper.type.d.ts +6 -0
  24. package/components/custom-formly/types/stepper/vertical/stepper.component.d.ts +9 -0
  25. package/components/custom-formly/types/table/table.component.d.ts +43 -0
  26. package/components/custom-formly/types/tabs/tab.component.d.ts +8 -0
  27. package/components/custom-formly/types/tags/tags.component.d.ts +41 -0
  28. package/components/custom-formly/types/textarea/textarea.component.d.ts +13 -0
  29. package/components/custom-formly/wrappers/addons/addons.component.d.ts +10 -0
  30. package/components/custom-formly/wrappers/card/card.component.d.ts +6 -0
  31. package/components/custom-formly/wrappers/expansion/expansion.component.d.ts +6 -0
  32. package/components/custom-formly/wrappers/panel/panel.component.d.ts +6 -0
  33. package/components/date-range/date-range.component.d.ts +8 -6
  34. package/components/drawer/drawer.component.d.ts +2 -2
  35. package/components/fullscreen/fullscreen.component.d.ts +2 -9
  36. package/components/fullscreen/public-api.d.ts +0 -1
  37. package/components/material-color-picker/material-color-picker.component.d.ts +8 -4
  38. package/components/material-datetimepicker/calendar.d.ts +2 -2
  39. package/components/material-datetimepicker/clock.d.ts +1 -1
  40. package/components/material-datetimepicker/datetimepicker-input.d.ts +1 -1
  41. package/components/material-datetimepicker/datetimepicker-toggle.d.ts +1 -1
  42. package/components/material-datetimepicker/datetimepicker.d.ts +5 -10
  43. package/components/material-datetimepicker/month-view.d.ts +1 -2
  44. package/components/material-datetimepicker/multi-year-view.d.ts +1 -1
  45. package/components/material-datetimepicker/public-api.d.ts +1 -0
  46. package/components/material-datetimepicker/time.d.ts +2 -2
  47. package/components/material-datetimepicker/year-view.d.ts +1 -1
  48. package/components/navigation/horizontal/components/basic/basic.component.d.ts +1 -1
  49. package/components/navigation/horizontal/components/branch/branch.component.d.ts +1 -1
  50. package/components/navigation/horizontal/horizontal.component.d.ts +2 -2
  51. package/components/navigation/vertical/components/aside/aside.component.d.ts +1 -1
  52. package/components/navigation/vertical/components/basic/basic.component.d.ts +1 -7
  53. package/components/navigation/vertical/components/collapsable/collapsable.component.d.ts +1 -1
  54. package/components/navigation/vertical/components/group/group.component.d.ts +1 -1
  55. package/components/navigation/vertical/vertical.component.d.ts +5 -5
  56. package/components/pagination/public-api.d.ts +1 -0
  57. package/components/popover/popover-trigger.d.ts +121 -0
  58. package/components/popover/popover.component.d.ts +3 -3
  59. package/components/popover/popover.target.d.ts +8 -0
  60. package/components/popover/public-api.d.ts +3 -0
  61. package/components/rating/rating.component.d.ts +38 -9
  62. package/components/select-search/select-search.component.d.ts +4 -4
  63. package/components/select-tree/public-api.d.ts +2 -0
  64. package/components/select-tree/select-tree.component.d.ts +50 -21
  65. package/components/toast/public-api.d.ts +4 -0
  66. package/components/toast/toast.component.d.ts +4 -4
  67. package/components/transfer-picker/filter/filter.component.d.ts +1 -1
  68. package/components/transfer-picker/transfer-picker-source/transfer-picker-source.component.d.ts +2 -2
  69. package/components/transfer-picker/transfer-picker.component.d.ts +1 -1
  70. package/components/upload/files.type.d.ts +22 -0
  71. package/components/upload/files.util.service.d.ts +20 -0
  72. package/components/upload/index.d.ts +5 -0
  73. package/components/upload/public-api.d.ts +4 -0
  74. package/components/upload/upload-queue/upload-queue.component.d.ts +39 -0
  75. package/components/upload/upload.component.d.ts +32 -0
  76. package/esm2022/animations/public-api.mjs +2 -2
  77. package/esm2022/components/adapter/dayjs-date-adapter.mjs +6 -6
  78. package/esm2022/components/adapter/dayjs-datetime-adapter.mjs +5 -5
  79. package/esm2022/components/adapter/native-datetime-adapter.mjs +3 -3
  80. package/esm2022/components/breadcrumb/breadcrumb-item.directive.mjs +3 -3
  81. package/esm2022/components/breadcrumb/breadcrumb.component.mjs +6 -6
  82. package/esm2022/components/breadcrumb/breadcrumb.service.mjs +5 -5
  83. package/esm2022/components/breadcrumb/public-api.mjs +3 -1
  84. package/esm2022/components/card/card.component.mjs +5 -5
  85. package/esm2022/components/card/public-api.mjs +2 -1
  86. package/esm2022/components/cascade/cascade-bottom-sheet/cascade-bottom-sheet.component.mjs +7 -7
  87. package/esm2022/components/cascade/cascade-list/cascade-list.component.mjs +207 -114
  88. package/esm2022/components/cascade/cascade-menu/cascade-menu.component.mjs +4 -4
  89. package/esm2022/components/cascade/public-api.mjs +2 -1
  90. package/esm2022/components/chip-input/chip-input.component.mjs +152 -49
  91. package/esm2022/components/custom-formly/cmat-components-custom-formly.mjs +5 -0
  92. package/esm2022/components/custom-formly/extension/addons.extension.mjs +13 -0
  93. package/esm2022/components/custom-formly/public-api.mjs +22 -0
  94. package/esm2022/components/custom-formly/types/button/button.component.mjs +39 -0
  95. package/esm2022/components/custom-formly/types/checklist/checklist.component.mjs +161 -0
  96. package/esm2022/components/custom-formly/types/chips/chips.component.mjs +55 -0
  97. package/esm2022/components/custom-formly/types/multicheckbox/multicheckbox.component.mjs +89 -0
  98. package/esm2022/components/custom-formly/types/number/number.component.mjs +27 -0
  99. package/esm2022/components/custom-formly/types/radio/radio.component.mjs +88 -0
  100. package/esm2022/components/custom-formly/types/rating/rating.component.mjs +27 -0
  101. package/esm2022/components/custom-formly/types/repeat/repeat.component.mjs +28 -0
  102. package/esm2022/components/custom-formly/types/select/select.component.mjs +169 -0
  103. package/esm2022/components/custom-formly/types/select-tree/select-tree.component.mjs +66 -0
  104. package/esm2022/components/custom-formly/types/stepper/horizontal/stepper.component.mjs +31 -0
  105. package/esm2022/components/custom-formly/types/stepper/stepper.type.mjs +2 -0
  106. package/esm2022/components/custom-formly/types/stepper/vertical/stepper.component.mjs +31 -0
  107. package/esm2022/components/custom-formly/types/table/table.component.mjs +116 -0
  108. package/esm2022/components/custom-formly/types/tabs/tab.component.mjs +19 -0
  109. package/esm2022/components/custom-formly/types/tags/tags.component.mjs +149 -0
  110. package/esm2022/components/custom-formly/types/textarea/textarea.component.mjs +25 -0
  111. package/esm2022/components/custom-formly/wrappers/addons/addons.component.mjs +92 -0
  112. package/esm2022/components/custom-formly/wrappers/card/card.component.mjs +14 -0
  113. package/esm2022/components/custom-formly/wrappers/expansion/expansion.component.mjs +14 -0
  114. package/esm2022/components/custom-formly/wrappers/panel/panel.component.mjs +12 -0
  115. package/esm2022/components/date-range/date-range.component.mjs +26 -17
  116. package/esm2022/components/drawer/drawer.component.mjs +5 -5
  117. package/esm2022/components/drawer/drawer.service.mjs +3 -3
  118. package/esm2022/components/fullscreen/fullscreen.component.mjs +16 -73
  119. package/esm2022/components/fullscreen/public-api.mjs +1 -2
  120. package/esm2022/components/highlight/highlight.component.mjs +5 -5
  121. package/esm2022/components/highlight/highlight.service.mjs +3 -3
  122. package/esm2022/components/json-editor/json-editor.component.mjs +3 -3
  123. package/esm2022/components/masonry/masonry.component.mjs +5 -5
  124. package/esm2022/components/material-color-picker/material-color-picker.component.mjs +22 -12
  125. package/esm2022/components/material-datetimepicker/calendar-body.mjs +3 -3
  126. package/esm2022/components/material-datetimepicker/calendar.mjs +11 -12
  127. package/esm2022/components/material-datetimepicker/clock.mjs +5 -5
  128. package/esm2022/components/material-datetimepicker/datetimepicker-input.mjs +4 -5
  129. package/esm2022/components/material-datetimepicker/datetimepicker-intl.mjs +3 -3
  130. package/esm2022/components/material-datetimepicker/datetimepicker-toggle.mjs +9 -9
  131. package/esm2022/components/material-datetimepicker/datetimepicker.mjs +17 -22
  132. package/esm2022/components/material-datetimepicker/month-view.mjs +5 -6
  133. package/esm2022/components/material-datetimepicker/multi-year-view.mjs +7 -8
  134. package/esm2022/components/material-datetimepicker/public-api.mjs +2 -1
  135. package/esm2022/components/material-datetimepicker/time.mjs +8 -8
  136. package/esm2022/components/material-datetimepicker/year-view.mjs +7 -8
  137. package/esm2022/components/navigation/horizontal/components/basic/basic.component.mjs +8 -8
  138. package/esm2022/components/navigation/horizontal/components/branch/branch.component.mjs +8 -8
  139. package/esm2022/components/navigation/horizontal/components/divider/divider.component.mjs +5 -5
  140. package/esm2022/components/navigation/horizontal/components/spacer/spacer.component.mjs +6 -6
  141. package/esm2022/components/navigation/horizontal/horizontal.component.mjs +6 -6
  142. package/esm2022/components/navigation/navigation.service.mjs +3 -3
  143. package/esm2022/components/navigation/vertical/components/aside/aside.component.mjs +11 -11
  144. package/esm2022/components/navigation/vertical/components/basic/basic.component.mjs +7 -24
  145. package/esm2022/components/navigation/vertical/components/collapsable/collapsable.component.mjs +10 -10
  146. package/esm2022/components/navigation/vertical/components/divider/divider.component.mjs +5 -5
  147. package/esm2022/components/navigation/vertical/components/group/group.component.mjs +9 -9
  148. package/esm2022/components/navigation/vertical/components/spacer/spacer.component.mjs +6 -6
  149. package/esm2022/components/navigation/vertical/vertical.component.mjs +11 -11
  150. package/esm2022/components/pagination/pagination.component.mjs +10 -10
  151. package/esm2022/components/pagination/pagination.directive.mjs +4 -4
  152. package/esm2022/components/pagination/pagination.pipe.mjs +4 -4
  153. package/esm2022/components/pagination/pagination.service.mjs +3 -3
  154. package/esm2022/components/pagination/public-api.mjs +2 -1
  155. package/esm2022/components/password-strength/mat-pass-toggle-visibility/mat-pass-toggle-visibility.component.mjs +6 -6
  156. package/esm2022/components/password-strength/mat-password-strength/mat-password-strength.component.mjs +5 -5
  157. package/esm2022/components/password-strength/mat-password-strength-info/mat-password-strength-info.component.mjs +6 -6
  158. package/esm2022/components/popover/popover-trigger.mjs +444 -0
  159. package/esm2022/components/popover/popover.component.mjs +8 -9
  160. package/esm2022/components/popover/popover.target.mjs +18 -0
  161. package/esm2022/components/popover/public-api.mjs +4 -1
  162. package/esm2022/components/progress-bar/progress-bar.component.mjs +6 -6
  163. package/esm2022/components/rating/rating.component.mjs +122 -23
  164. package/esm2022/components/select-search/select-no-entries-found.directive.mjs +3 -3
  165. package/esm2022/components/select-search/select-search-clear.directive.mjs +3 -3
  166. package/esm2022/components/select-search/select-search.component.mjs +15 -15
  167. package/esm2022/components/select-tree/public-api.mjs +3 -1
  168. package/esm2022/components/select-tree/select-tree.component.mjs +281 -157
  169. package/esm2022/components/timeline/timeline-item/timeline-item.component.mjs +9 -9
  170. package/esm2022/components/timeline/timeline.component.mjs +5 -5
  171. package/esm2022/components/toast/public-api.mjs +5 -1
  172. package/esm2022/components/toast/toast-modal.component.mjs +5 -5
  173. package/esm2022/components/toast/toast.component.mjs +6 -6
  174. package/esm2022/components/toast/toast.service.mjs +3 -3
  175. package/esm2022/components/transfer-picker/filter/filter.component.mjs +9 -9
  176. package/esm2022/components/transfer-picker/search/search.component.mjs +6 -6
  177. package/esm2022/components/transfer-picker/transfer-picker-source/transfer-picker-source.component.mjs +11 -11
  178. package/esm2022/components/transfer-picker/transfer-picker-target/transfer-picker-target.component.mjs +5 -5
  179. package/esm2022/components/transfer-picker/transfer-picker.component.mjs +7 -7
  180. package/esm2022/components/transfer-picker/transfer-picker.service.mjs +4 -4
  181. package/esm2022/components/upload/cmat-components-upload.mjs +5 -0
  182. package/esm2022/components/upload/files.type.mjs +2 -0
  183. package/esm2022/components/upload/files.util.service.mjs +100 -0
  184. package/esm2022/components/upload/public-api.mjs +5 -0
  185. package/esm2022/components/upload/upload-queue/upload-queue.component.mjs +154 -0
  186. package/esm2022/components/upload/upload.component.mjs +118 -0
  187. package/esm2022/directives/animate-on-scroll/animate-on-scroll.directive.mjs +3 -3
  188. package/esm2022/directives/animate-on-scroll/scroll.service.mjs +3 -3
  189. package/esm2022/directives/autofocus/autofocus.directive.mjs +3 -3
  190. package/esm2022/directives/debounce/abstract-debounce.directive.mjs +3 -3
  191. package/esm2022/directives/debounce/debounce-click.directive.mjs +3 -3
  192. package/esm2022/directives/debounce/debounce-keyup.directive.mjs +3 -3
  193. package/esm2022/directives/digit-only/digit-only.directive.mjs +3 -3
  194. package/esm2022/directives/digit-only/mask.directive.mjs +3 -3
  195. package/esm2022/directives/equal-validator/equal-validator.directive.mjs +3 -3
  196. package/esm2022/lib/mock-api/mock-api.interceptor.mjs +5 -5
  197. package/esm2022/lib/mock-api/mock-api.service.mjs +3 -3
  198. package/esm2022/pipes/bytes/bytes.pipe.mjs +3 -3
  199. package/esm2022/pipes/date-format/date-format.pipe.mjs +3 -3
  200. package/esm2022/pipes/find-by-key/find-by-key.pipe.mjs +3 -3
  201. package/esm2022/pipes/group-by/group-by.pipe.mjs +3 -3
  202. package/esm2022/pipes/keys/keys.pipe.mjs +3 -3
  203. package/esm2022/pipes/secure/secure-pipe.mjs +5 -5
  204. package/esm2022/pipes/uppercase/uppercase.pipe.mjs +3 -3
  205. package/esm2022/public-api.mjs +1 -1
  206. package/esm2022/services/alert/alert.service.mjs +7 -7
  207. package/esm2022/services/alert/enum.mjs +2 -2
  208. package/esm2022/services/config/config.service.mjs +5 -5
  209. package/esm2022/services/config/urlStateConfig.service.mjs +5 -5
  210. package/esm2022/services/confirmation/confirmation.service.mjs +5 -5
  211. package/esm2022/services/confirmation/dialog/dialog.component.mjs +7 -7
  212. package/esm2022/services/data/data.service.mjs +5 -5
  213. package/esm2022/services/loading/loading.interceptor.mjs +4 -4
  214. package/esm2022/services/loading/loading.service.mjs +3 -3
  215. package/esm2022/services/local-storage/local-storage.service.mjs +3 -3
  216. package/esm2022/services/media-watcher/media-watcher.service.mjs +5 -5
  217. package/esm2022/services/platform/platform.service.mjs +4 -4
  218. package/esm2022/services/splash-screen/splash-screen.service.mjs +6 -6
  219. package/esm2022/services/title/title.service.mjs +4 -4
  220. package/esm2022/services/translation/translation.service.mjs +3 -3
  221. package/esm2022/services/utils/utils.service.mjs +54 -9
  222. package/fesm2022/cmat-animations.mjs +15 -15
  223. package/fesm2022/cmat-animations.mjs.map +1 -1
  224. package/fesm2022/cmat-components-adapter.mjs +11 -11
  225. package/fesm2022/cmat-components-adapter.mjs.map +1 -1
  226. package/fesm2022/cmat-components-breadcrumb.mjs +11 -11
  227. package/fesm2022/cmat-components-breadcrumb.mjs.map +1 -1
  228. package/fesm2022/cmat-components-card.mjs +4 -4
  229. package/fesm2022/cmat-components-card.mjs.map +1 -1
  230. package/fesm2022/cmat-components-cascade.mjs +215 -123
  231. package/fesm2022/cmat-components-cascade.mjs.map +1 -1
  232. package/fesm2022/cmat-components-chip-input.mjs +153 -50
  233. package/fesm2022/cmat-components-chip-input.mjs.map +1 -1
  234. package/fesm2022/cmat-components-custom-formly.mjs +1141 -0
  235. package/fesm2022/cmat-components-custom-formly.mjs.map +1 -0
  236. package/fesm2022/cmat-components-date-range.mjs +27 -18
  237. package/fesm2022/cmat-components-date-range.mjs.map +1 -1
  238. package/fesm2022/cmat-components-drawer.mjs +8 -8
  239. package/fesm2022/cmat-components-drawer.mjs.map +1 -1
  240. package/fesm2022/cmat-components-fullscreen.mjs +16 -73
  241. package/fesm2022/cmat-components-fullscreen.mjs.map +1 -1
  242. package/fesm2022/cmat-components-highlight.mjs +7 -7
  243. package/fesm2022/cmat-components-highlight.mjs.map +1 -1
  244. package/fesm2022/cmat-components-json-editor.mjs +3 -3
  245. package/fesm2022/cmat-components-masonry.mjs +4 -4
  246. package/fesm2022/cmat-components-masonry.mjs.map +1 -1
  247. package/fesm2022/cmat-components-material-color-picker.mjs +21 -11
  248. package/fesm2022/cmat-components-material-color-picker.mjs.map +1 -1
  249. package/fesm2022/cmat-components-material-datetimepicker.mjs +189 -195
  250. package/fesm2022/cmat-components-material-datetimepicker.mjs.map +1 -1
  251. package/fesm2022/cmat-components-navigation.mjs +166 -183
  252. package/fesm2022/cmat-components-navigation.mjs.map +1 -1
  253. package/fesm2022/cmat-components-pagination.mjs +20 -20
  254. package/fesm2022/cmat-components-pagination.mjs.map +1 -1
  255. package/fesm2022/cmat-components-password-strength.mjs +13 -13
  256. package/fesm2022/cmat-components-password-strength.mjs.map +1 -1
  257. package/fesm2022/cmat-components-popover.mjs +464 -10
  258. package/fesm2022/cmat-components-popover.mjs.map +1 -1
  259. package/fesm2022/cmat-components-progress-bar.mjs +6 -6
  260. package/fesm2022/cmat-components-progress-bar.mjs.map +1 -1
  261. package/fesm2022/cmat-components-rating.mjs +121 -22
  262. package/fesm2022/cmat-components-rating.mjs.map +1 -1
  263. package/fesm2022/cmat-components-select-search.mjs +41 -41
  264. package/fesm2022/cmat-components-select-search.mjs.map +1 -1
  265. package/fesm2022/cmat-components-select-tree.mjs +285 -158
  266. package/fesm2022/cmat-components-select-tree.mjs.map +1 -1
  267. package/fesm2022/cmat-components-timeline.mjs +12 -12
  268. package/fesm2022/cmat-components-timeline.mjs.map +1 -1
  269. package/fesm2022/cmat-components-toast.mjs +12 -12
  270. package/fesm2022/cmat-components-toast.mjs.map +1 -1
  271. package/fesm2022/cmat-components-transfer-picker.mjs +33 -33
  272. package/fesm2022/cmat-components-transfer-picker.mjs.map +1 -1
  273. package/fesm2022/cmat-components-upload.mjs +366 -0
  274. package/fesm2022/cmat-components-upload.mjs.map +1 -0
  275. package/fesm2022/cmat-directives-animate-on-scroll.mjs +6 -6
  276. package/fesm2022/cmat-directives-autofocus.mjs +3 -3
  277. package/fesm2022/cmat-directives-debounce.mjs +9 -9
  278. package/fesm2022/cmat-directives-digit-only.mjs +6 -6
  279. package/fesm2022/cmat-directives-equal-validator.mjs +3 -3
  280. package/fesm2022/cmat-lib-mock-api.mjs +6 -6
  281. package/fesm2022/cmat-lib-mock-api.mjs.map +1 -1
  282. package/fesm2022/cmat-pipes-bytes.mjs +3 -3
  283. package/fesm2022/cmat-pipes-date-format.mjs +3 -3
  284. package/fesm2022/cmat-pipes-find-by-key.mjs +3 -3
  285. package/fesm2022/cmat-pipes-group-by.mjs +3 -3
  286. package/fesm2022/cmat-pipes-keys.mjs +3 -3
  287. package/fesm2022/cmat-pipes-secure.mjs +4 -4
  288. package/fesm2022/cmat-pipes-secure.mjs.map +1 -1
  289. package/fesm2022/cmat-pipes-uppercase.mjs +3 -3
  290. package/fesm2022/cmat-services-alert.mjs +6 -6
  291. package/fesm2022/cmat-services-alert.mjs.map +1 -1
  292. package/fesm2022/cmat-services-config.mjs +7 -7
  293. package/fesm2022/cmat-services-config.mjs.map +1 -1
  294. package/fesm2022/cmat-services-confirmation.mjs +11 -11
  295. package/fesm2022/cmat-services-confirmation.mjs.map +1 -1
  296. package/fesm2022/cmat-services-data.mjs +5 -5
  297. package/fesm2022/cmat-services-data.mjs.map +1 -1
  298. package/fesm2022/cmat-services-loading.mjs +6 -6
  299. package/fesm2022/cmat-services-loading.mjs.map +1 -1
  300. package/fesm2022/cmat-services-local-storage.mjs +3 -3
  301. package/fesm2022/cmat-services-media-watcher.mjs +4 -4
  302. package/fesm2022/cmat-services-media-watcher.mjs.map +1 -1
  303. package/fesm2022/cmat-services-platform.mjs +3 -3
  304. package/fesm2022/cmat-services-platform.mjs.map +1 -1
  305. package/fesm2022/cmat-services-splash-screen.mjs +5 -5
  306. package/fesm2022/cmat-services-splash-screen.mjs.map +1 -1
  307. package/fesm2022/cmat-services-title.mjs +3 -3
  308. package/fesm2022/cmat-services-title.mjs.map +1 -1
  309. package/fesm2022/cmat-services-translation.mjs +3 -3
  310. package/fesm2022/cmat-services-utils.mjs +53 -8
  311. package/fesm2022/cmat-services-utils.mjs.map +1 -1
  312. package/package.json +75 -63
  313. package/pipes/secure/secure-pipe.d.ts +1 -1
  314. package/services/alert/enum.d.ts +1 -1
  315. package/services/confirmation/confirmation.service.d.ts +1 -1
  316. package/services/data/data.service.d.ts +1 -1
  317. package/services/media-watcher/media-watcher.service.d.ts +1 -1
  318. package/services/title/title.service.d.ts +1 -1
  319. package/services/utils/utils.service.d.ts +1 -0
  320. package/styles/components/bundle.scss +18 -5
  321. package/styles/overrides/angular-material.scss +51 -52
  322. package/styles/tailwind.scss +2 -8
  323. package/styles/themes.scss +7 -7
  324. package/styles/user-themes.scss +1 -1
  325. package/tailwind/plugins/utilities.js +1 -1
  326. package/components/fullscreen/fullscreen.types.d.ts +0 -13
  327. package/esm2022/components/fullscreen/fullscreen.types.mjs +0 -2
@@ -0,0 +1,1141 @@
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 { NgClass, AsyncPipe, NgStyle, NgTemplateOutlet } from '@angular/common';
17
+ import * as i2 from '@angular/material/checkbox';
18
+ import { MatCheckboxModule, MatCheckbox } from '@angular/material/checkbox';
19
+ import * as i3$1 from '@angular/material/core';
20
+ import { MatRippleModule } from '@angular/material/core';
21
+ import { BehaviorSubject, Subject, takeUntil as takeUntil$1, ReplaySubject, of, take } from 'rxjs';
22
+ import { takeUntil } from 'rxjs/operators';
23
+ import { CmatSecurePipe } from 'cmat/pipes/secure';
24
+ import * as i1$2 from '@angular/common/http';
25
+ import * as i2$1 from '@angular/forms';
26
+ import { ReactiveFormsModule, FormControl, FormGroup, FormsModule } from '@angular/forms';
27
+ import { CmatChipInputComponent } from 'cmat/components/chip-input';
28
+ import * as i3$2 from '@ngx-formly/core/select';
29
+ import { FormlySelectModule } from '@ngx-formly/core/select';
30
+ import * as i1$3 from '@angular/material/input';
31
+ import { MatInputModule } from '@angular/material/input';
32
+ import { CmatDigitOnlyDirective } from 'cmat/directives/digit-only';
33
+ import { CmatRatingComponent } from 'cmat/components/rating';
34
+ import * as i2$2 from '@angular/material/radio';
35
+ import { MatRadioGroup, MatRadioModule } from '@angular/material/radio';
36
+ import * as i2$3 from '@angular/material/select';
37
+ import { MatSelectModule } from '@angular/material/select';
38
+ import { CmatSelectSearchComponent } from 'cmat/components/select-search';
39
+ import { CmatSelectTreeComponent } from 'cmat/components/select-tree';
40
+ import * as i2$4 from '@angular/material/stepper';
41
+ import { MatStepperModule } from '@angular/material/stepper';
42
+ import { CdkDrag } from '@angular/cdk/drag-drop';
43
+ import * as i6 from '@angular/material/dialog';
44
+ import { MatDialog, MatDialogModule } from '@angular/material/dialog';
45
+ import * as i3$3 from '@angular/material/table';
46
+ import { MatTableModule } from '@angular/material/table';
47
+ import * as i7 from '@angular/material/tooltip';
48
+ import { MatTooltipModule } from '@angular/material/tooltip';
49
+ import * as i1$5 from '@angular/material/tabs';
50
+ import { MatTabsModule } from '@angular/material/tabs';
51
+ import { TemplatePortal } from '@angular/cdk/portal';
52
+ import { isArray as isArray$1 } from 'lodash';
53
+ import * as i2$5 from '@angular/cdk/overlay';
54
+
55
+ function addonsExtension(field) {
56
+ if (!field.props || (field.wrappers && field.wrappers.indexOf('addons') !== -1)) {
57
+ return;
58
+ }
59
+ if ((field.props.addonLeft && ((!isNil(field.props.addonLeft.icon) && field.props.addonLeft.icon !== '')
60
+ || (!isNil(field.props.addonLeft.text)) && field.props.addonLeft.text !== ''))
61
+ || (field.props.addonRight && ((!isNil(field.props.addonRight.icon) && field.props.addonRight.icon !== '')
62
+ || (!isNil(field.props.addonRight.text)) && field.props.addonRight.text !== ''))) {
63
+ field.wrappers = [...(field.wrappers || []), 'addons'];
64
+ }
65
+ }
66
+
67
+ class CmatAddonsWrapperComponent extends FieldWrapper {
68
+ ngAfterViewInit() {
69
+ if (this.matPrefix) {
70
+ this.props.prefix = this.matPrefix;
71
+ }
72
+ if (this.matSuffix) {
73
+ this.props.suffix = this.matSuffix;
74
+ }
75
+ }
76
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatAddonsWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
77
+ 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: `
78
+ <ng-template #matPrefix>
79
+ @if(props.addonLeft){
80
+ <span>
81
+ @if(props.addonLeft.icon){
82
+ <mat-icon [svgIcon]="props.addonLeft.icon"></mat-icon>
83
+ }
84
+ @if(props.addonLeft.text){
85
+ <span>{{ props.addonLeft.text }}</span>
86
+ }
87
+
88
+ </span>
89
+ }
90
+ </ng-template>
91
+
92
+ <ng-container #fieldComponent></ng-container>
93
+
94
+ <ng-template #matSuffix>
95
+ @if(props.addonRight){
96
+ <span>
97
+ @if(props.addonRight.icon){
98
+ <mat-icon [svgIcon]="props.addonRight.icon"></mat-icon>
99
+ }
100
+ @if(props.addonRight.text) {
101
+ <span>{{ props.addonRight.text }}</span>
102
+ }
103
+ </span>
104
+ }
105
+ </ng-template>
106
+ `, 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 }] }); }
107
+ }
108
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatAddonsWrapperComponent, decorators: [{
109
+ type: Component,
110
+ args: [{
111
+ selector: 'cmat-addons-wrapper',
112
+ template: `
113
+ <ng-template #matPrefix>
114
+ @if(props.addonLeft){
115
+ <span>
116
+ @if(props.addonLeft.icon){
117
+ <mat-icon [svgIcon]="props.addonLeft.icon"></mat-icon>
118
+ }
119
+ @if(props.addonLeft.text){
120
+ <span>{{ props.addonLeft.text }}</span>
121
+ }
122
+
123
+ </span>
124
+ }
125
+ </ng-template>
126
+
127
+ <ng-container #fieldComponent></ng-container>
128
+
129
+ <ng-template #matSuffix>
130
+ @if(props.addonRight){
131
+ <span>
132
+ @if(props.addonRight.icon){
133
+ <mat-icon [svgIcon]="props.addonRight.icon"></mat-icon>
134
+ }
135
+ @if(props.addonRight.text) {
136
+ <span>{{ props.addonRight.text }}</span>
137
+ }
138
+ </span>
139
+ }
140
+ </ng-template>
141
+ `,
142
+ standalone: true,
143
+ imports: [MatIconModule, FormlyMaterialModule]
144
+ }]
145
+ }], propDecorators: { matPrefix: [{
146
+ type: ViewChild,
147
+ args: ['matPrefix', { static: true }]
148
+ }], matSuffix: [{
149
+ type: ViewChild,
150
+ args: ['matSuffix', { static: true }]
151
+ }] } });
152
+
153
+ class CmatCardWrapperComponent extends FieldWrapper {
154
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatCardWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
155
+ 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 }); }
156
+ }
157
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatCardWrapperComponent, decorators: [{
158
+ type: Component,
159
+ 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>" }]
160
+ }] });
161
+
162
+ class CmatExpansionWrapperComponent extends FieldWrapper {
163
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatExpansionWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
164
+ 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 }); }
165
+ }
166
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatExpansionWrapperComponent, decorators: [{
167
+ type: Component,
168
+ 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>" }]
169
+ }] });
170
+
171
+ class CmatPanelWrapperComponent extends FieldWrapper {
172
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatPanelWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
173
+ 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 }); }
174
+ }
175
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatPanelWrapperComponent, decorators: [{
176
+ type: Component,
177
+ 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>" }]
178
+ }] });
179
+
180
+ // eslint-disable-next-line @typescript-eslint/explicit-function-return-type
181
+ const evilFn = (fn) => {
182
+ const fnc = Function;
183
+ return new fnc(`return ${fn}`)();
184
+ };
185
+ class CmatButtonTypeComponent extends FieldType {
186
+ constructor() {
187
+ super(...arguments);
188
+ this.defaultOptions = {
189
+ props: {
190
+ color: 'primary'
191
+ }
192
+ };
193
+ }
194
+ onClick($event) {
195
+ if (this.props.onClick) {
196
+ if (isString(this.props.onClick)) {
197
+ const func = evilFn(this.props.onClick);
198
+ func();
199
+ }
200
+ else {
201
+ this.props.onClick($event);
202
+ }
203
+ }
204
+ }
205
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatButtonTypeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
206
+ 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 }); }
207
+ }
208
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatButtonTypeComponent, decorators: [{
209
+ type: Component,
210
+ 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>" }]
211
+ }] });
212
+
213
+ class CmatCheckListTypeComponent extends FieldType {
214
+ constructor(_http) {
215
+ super();
216
+ this._http = _http;
217
+ this.isIndeterminate = false;
218
+ this.isChecked = false;
219
+ this.checklist = [];
220
+ this.filteredData = [];
221
+ this._filteredItems = new BehaviorSubject(null);
222
+ this._unsubscribeAll = new Subject();
223
+ }
224
+ get filteredItems$() {
225
+ return this._filteredItems.asObservable();
226
+ }
227
+ get datas() {
228
+ if (isArray(this.field.props?.options)) {
229
+ return this.urlData?.length > 0 ? this.urlData : this.field.props?.options || [];
230
+ }
231
+ else {
232
+ return this.urlData?.length > 0 ? this.urlData : this.optionsData || [];
233
+ }
234
+ }
235
+ ngOnInit() {
236
+ if (this.field.props?.options && !isArray(this.field.props?.options)) {
237
+ this.field.props?.options.pipe(takeUntil(this._unsubscribeAll)).subscribe((data) => {
238
+ this.optionsData = data;
239
+ });
240
+ }
241
+ const url = this.field.props?.domain?.url;
242
+ if (url && this.field.props?.domain?.code && this.field.props?.domain?.key && this.field.props?.domain?.value) {
243
+ this._http.get(url).pipe(takeUntil(this._unsubscribeAll)).subscribe((data) => {
244
+ if (data) {
245
+ const datas = data.filter((i) => {
246
+ if (this.field.props?.domain?.key)
247
+ return i[this.field.props?.domain?.key] === this.field.props?.domain?.code;
248
+ return false;
249
+ });
250
+ if (datas && this.field.props?.domain?.value) {
251
+ this.urlData = datas[0][this.field.props?.domain?.value];
252
+ }
253
+ else {
254
+ this.urlData = [];
255
+ }
256
+ }
257
+ else {
258
+ this.urlData = [];
259
+ }
260
+ this.filteredData = this.datas;
261
+ this._filteredItems.next(this.filteredData);
262
+ });
263
+ }
264
+ else {
265
+ this.urlData = [];
266
+ this.filteredData = this.datas;
267
+ this._filteredItems.next(this.filteredData);
268
+ }
269
+ this.formControl.valueChanges.pipe(takeUntil(this._unsubscribeAll)).subscribe((value) => {
270
+ this.checklist = value || [];
271
+ this._getAllCheckCountState();
272
+ });
273
+ }
274
+ ngOnDestroy() {
275
+ this._unsubscribeAll.next(void (0));
276
+ this._unsubscribeAll.complete();
277
+ }
278
+ trackByFn(index, item) {
279
+ return item.id || index;
280
+ }
281
+ filterByQuery(event) {
282
+ this.filteredData = this.datas.filter(data => data.value.toString().toLowerCase().includes(event) || data.label.toLowerCase().includes(event));
283
+ this._filteredItems.next(this.filteredData);
284
+ this._getAllCheckCountState();
285
+ }
286
+ toggleCheckList(data, event) {
287
+ event.preventDefault();
288
+ if (data.disabled || this.props.disabled)
289
+ return;
290
+ const index = this.checklist.findIndex(item => item.value === data.value);
291
+ if (index > -1) {
292
+ this.checklist.splice(index, 1);
293
+ }
294
+ else {
295
+ this.checklist.push(data);
296
+ }
297
+ this.formControl.setValue(this.checklist);
298
+ }
299
+ allCheckChange(check) {
300
+ if (check) {
301
+ this.filteredData.forEach((t) => {
302
+ const index = this.checklist.findIndex(item => item.value === t.value);
303
+ if (index < 0 && !t.disabled) {
304
+ this.checklist.push(t);
305
+ }
306
+ });
307
+ }
308
+ else {
309
+ this.filteredData.forEach((t) => {
310
+ const index = this.checklist.findIndex(item => item.value === t.value);
311
+ if (index > -1) {
312
+ this.checklist.splice(index, 1);
313
+ }
314
+ });
315
+ }
316
+ this.formControl.setValue(this.checklist);
317
+ }
318
+ isCheck(data) {
319
+ return this.formControl.value?.filter((i) => i.value === data.value).length > 0;
320
+ }
321
+ _getAllCheckCountState() {
322
+ if (this.props.showAllCheck && !this.props.disabled) {
323
+ let allCheckCount = 0;
324
+ if (this.checklist?.length > 0) {
325
+ this.filteredData.forEach((t) => {
326
+ const index = this.checklist.findIndex(item => item.value === t.value && !t.disabled);
327
+ if (index > -1) {
328
+ allCheckCount += 1;
329
+ }
330
+ });
331
+ if (this.filteredData.filter(i => !i.disabled).length === allCheckCount) {
332
+ this.isChecked = true;
333
+ this.isIndeterminate = false;
334
+ }
335
+ else if (allCheckCount === 0) {
336
+ this.isChecked = false;
337
+ this.isIndeterminate = false;
338
+ }
339
+ else {
340
+ this.isChecked = false;
341
+ this.isIndeterminate = true;
342
+ }
343
+ }
344
+ else {
345
+ this.checklist = [];
346
+ this.isChecked = false;
347
+ this.isIndeterminate = false;
348
+ }
349
+ }
350
+ }
351
+ 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 }); }
352
+ 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.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 }); }
353
+ }
354
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatCheckListTypeComponent, decorators: [{
355
+ type: Component,
356
+ 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"] }]
357
+ }], ctorParameters: () => [{ type: i1$2.HttpClient }] });
358
+
359
+ class CmatChipsInputTypeComponent extends FieldType {
360
+ constructor(_http) {
361
+ super();
362
+ this._http = _http;
363
+ this._unsubscribeAll = new Subject();
364
+ }
365
+ get autocompleteText() {
366
+ return this.autocompleteUrlData?.length > 0 ? this.autocompleteUrlData : this.props?.autocompleteText?.split(',') || [];
367
+ }
368
+ ngOnInit() {
369
+ const url = this.props?.domain?.url;
370
+ if (url && this.props?.domain?.code && this.props?.domain?.key && this.props?.domain?.value) {
371
+ this._http.get(url).pipe(takeUntil$1(this._unsubscribeAll)).subscribe((data) => {
372
+ if (data) {
373
+ const datas = data.filter((i) => {
374
+ if (this.field.props?.domain?.key)
375
+ return i[this.field.props?.domain?.key] === this.field.props?.domain?.code;
376
+ return false;
377
+ });
378
+ if (datas && this.field.props?.domain?.value) {
379
+ this.autocompleteUrlData = datas[0][this.field.props?.domain?.value];
380
+ }
381
+ else {
382
+ this.autocompleteUrlData = [];
383
+ }
384
+ }
385
+ else {
386
+ this.autocompleteUrlData = [];
387
+ }
388
+ });
389
+ }
390
+ else {
391
+ this.autocompleteUrlData = [];
392
+ }
393
+ }
394
+ ngOnDestroy() {
395
+ this._unsubscribeAll.next(void 0);
396
+ this._unsubscribeAll.complete();
397
+ }
398
+ 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 }); }
399
+ 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 }); }
400
+ }
401
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatChipsInputTypeComponent, decorators: [{
402
+ type: Component,
403
+ 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"] }]
404
+ }], ctorParameters: () => [{ type: i1$2.HttpClient }] });
405
+
406
+ class CmatMultiCheckboxTypeComponent extends FieldType {
407
+ constructor(_http) {
408
+ super();
409
+ this._http = _http;
410
+ this.defaultOptions = {
411
+ props: {
412
+ hideFieldUnderline: true,
413
+ floatLabel: 'always',
414
+ color: 'accent',
415
+ labelPosition: 'after'
416
+ },
417
+ };
418
+ this._urlData = new BehaviorSubject([]);
419
+ this._unsubscribeAll = new Subject();
420
+ }
421
+ get urlData$() {
422
+ return this._urlData.asObservable();
423
+ }
424
+ onChange(value, checked) {
425
+ this.formControl.markAsDirty();
426
+ if (this.props.type === 'array') {
427
+ this.formControl.patchValue(checked
428
+ ? [...(this.formControl.value || []), value]
429
+ : [...(this.formControl.value || [])].filter(o => o !== value));
430
+ }
431
+ else {
432
+ this.formControl.patchValue({ ...this.formControl.value, [value]: checked });
433
+ }
434
+ this.formControl.markAsTouched();
435
+ }
436
+ ngOnInit() {
437
+ const url = this.field.props?.domain?.url;
438
+ if (url && this.field.props?.domain?.code && this.field.props?.domain?.key && this.field.props?.domain?.value) {
439
+ this._http.get(url).pipe(takeUntil$1(this._unsubscribeAll)).subscribe((data) => {
440
+ if (data) {
441
+ const datas = data.filter((i) => {
442
+ if (this.field.props?.domain?.key)
443
+ return i[this.field.props?.domain?.key] === this.field.props?.domain?.code;
444
+ return false;
445
+ });
446
+ if (datas && this.field.props?.domain?.value) {
447
+ this._urlData.next(datas[0][this.field.props?.domain?.value]);
448
+ }
449
+ else {
450
+ this._urlData.next([]);
451
+ }
452
+ }
453
+ else {
454
+ this._urlData.next([]);
455
+ }
456
+ });
457
+ }
458
+ else {
459
+ this._urlData.next([]);
460
+ }
461
+ }
462
+ ngOnDestroy() {
463
+ this._unsubscribeAll.next(void 0);
464
+ this._unsubscribeAll.complete();
465
+ }
466
+ onContainerClick() { }
467
+ isChecked(option) {
468
+ const value = this.formControl.value;
469
+ return value && (this.props.type === 'array' ? value.indexOf(option.value) !== -1 : value[option.value]);
470
+ }
471
+ trackByFn(index) {
472
+ return index;
473
+ }
474
+ 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 }); }
475
+ 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.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$2.FormlySelectOptionsPipe, name: "formlySelectOptions" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
476
+ }
477
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatMultiCheckboxTypeComponent, decorators: [{
478
+ type: Component,
479
+ 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"] }]
480
+ }], ctorParameters: () => [{ type: i1$2.HttpClient }], propDecorators: { checkboxes: [{
481
+ type: ViewChildren,
482
+ args: [MatCheckbox]
483
+ }] } });
484
+
485
+ class CmatNumberTypeComponent extends FieldType {
486
+ constructor() {
487
+ super(...arguments);
488
+ this.defaultOptions = {
489
+ props: {
490
+ decimal: false,
491
+ min: -Infinity,
492
+ max: Infinity
493
+ },
494
+ };
495
+ }
496
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatNumberTypeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
497
+ 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 }); }
498
+ }
499
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatNumberTypeComponent, decorators: [{
500
+ type: Component,
501
+ 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"] }]
502
+ }] });
503
+
504
+ class CmatRatingTypeComponent extends FieldType {
505
+ constructor() {
506
+ super(...arguments);
507
+ this.defaultOptions = {
508
+ props: {
509
+ stars: 5,
510
+ readonly: false,
511
+ hover: true,
512
+ half: true
513
+ },
514
+ };
515
+ }
516
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatRatingTypeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
517
+ 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 }); }
518
+ }
519
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatRatingTypeComponent, decorators: [{
520
+ type: Component,
521
+ 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"] }]
522
+ }] });
523
+
524
+ class CmatRadioTypeComponent extends FieldType {
525
+ constructor(_http) {
526
+ super();
527
+ this._http = _http;
528
+ this.defaultOptions = {
529
+ props: {
530
+ hideFieldUnderline: true,
531
+ floatLabel: 'always',
532
+ tabindex: -1,
533
+ labelPosition: 'after'
534
+ },
535
+ };
536
+ this._urlData = new BehaviorSubject([]);
537
+ this._unsubscribeAll = new Subject();
538
+ }
539
+ get urlData$() {
540
+ return this._urlData.asObservable();
541
+ }
542
+ ngOnInit() {
543
+ const url = this.field.props?.domain?.url;
544
+ if (url && this.field.props?.domain?.code && this.field.props?.domain?.key && this.field.props?.domain?.value) {
545
+ this._http.get(url).pipe(takeUntil$1(this._unsubscribeAll)).subscribe((data) => {
546
+ if (data) {
547
+ const datas = data.filter((i) => {
548
+ if (this.field.props?.domain?.key)
549
+ return i[this.field.props?.domain?.key] === this.field.props?.domain?.code;
550
+ return false;
551
+ });
552
+ if (datas && this.field.props?.domain?.value) {
553
+ this._urlData.next(datas[0][this.field.props?.domain?.value]);
554
+ }
555
+ else {
556
+ this._urlData.next([]);
557
+ }
558
+ }
559
+ else {
560
+ this._urlData.next([]);
561
+ }
562
+ });
563
+ }
564
+ else {
565
+ this._urlData.next([]);
566
+ }
567
+ }
568
+ ngAfterViewInit() {
569
+ this.focusObserver = _observe(this.field, ['focus'], ({ currentValue }) => {
570
+ if (this.props.tabindex === -1 && currentValue && this.radioGroup._radios.length > 0) {
571
+ setTimeout(() => {
572
+ const radio = this.radioGroup.selected ? this.radioGroup.selected : this.radioGroup._radios.first;
573
+ radio.focus();
574
+ });
575
+ }
576
+ });
577
+ }
578
+ onContainerClick() { }
579
+ ngOnDestroy() {
580
+ super.ngOnDestroy();
581
+ this.focusObserver && this.focusObserver.unsubscribe();
582
+ this._unsubscribeAll.next(void 0);
583
+ this._unsubscribeAll.complete();
584
+ }
585
+ trackByFn(index) {
586
+ return index;
587
+ }
588
+ 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 }); }
589
+ 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$2.MatRadioGroup, selector: "mat-radio-group", inputs: ["color", "name", "labelPosition", "value", "selected", "disabled", "required"], outputs: ["change"], exportAs: ["matRadioGroup"] }, { kind: "component", type: i2$2.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$2.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 }); }
590
+ }
591
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatRadioTypeComponent, decorators: [{
592
+ type: Component,
593
+ 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"] }]
594
+ }], ctorParameters: () => [{ type: i1$2.HttpClient }], propDecorators: { radioGroup: [{
595
+ type: ViewChild,
596
+ args: [MatRadioGroup, { static: true }]
597
+ }] } });
598
+
599
+ class CmatRepeatTypeComponent extends FieldArrayType {
600
+ constructor() {
601
+ super(...arguments);
602
+ this.defaultOptions = {
603
+ props: {
604
+ addText: '新增'
605
+ },
606
+ };
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: CmatRepeatTypeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
612
+ 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 }); }
613
+ }
614
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatRepeatTypeComponent, decorators: [{
615
+ type: Component,
616
+ 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"] }]
617
+ }] });
618
+
619
+ class CmatSelectTypeComponent extends FieldType {
620
+ constructor(_http) {
621
+ super();
622
+ this._http = _http;
623
+ this.defaultOptions = {
624
+ props: {
625
+ search: true,
626
+ canNull: false,
627
+ showToggleAllCheckbox: false
628
+ },
629
+ };
630
+ this.filteredCustomDetails = new ReplaySubject(1);
631
+ this.filteredCache = [];
632
+ this.isIndeterminate = false;
633
+ this.isChecked = false;
634
+ this.multiFilterCtrl = new FormControl('');
635
+ this._urlData = [];
636
+ this._unsubscribeAll = new Subject();
637
+ }
638
+ get datas() {
639
+ if (isArray(this.field.props?.options)) {
640
+ return this._urlData?.length > 0 ? this._urlData : this.field.props?.options || [];
641
+ }
642
+ else {
643
+ return this._urlData?.length > 0 ? this._urlData : this.optionsData || [];
644
+ }
645
+ }
646
+ ngOnInit() {
647
+ if (this.field.props?.options && !isArray(this.field.props?.options)) {
648
+ this.field.props?.options.pipe(takeUntil$1(this._unsubscribeAll)).subscribe((data) => {
649
+ this.optionsData = data;
650
+ });
651
+ }
652
+ const url = this.field.props?.domain?.url;
653
+ if (url && this.field.props?.domain?.code && this.field.props?.domain?.key && this.field.props?.domain?.value) {
654
+ this._http.get(url).pipe(takeUntil$1(this._unsubscribeAll)).subscribe((data) => {
655
+ if (data) {
656
+ const datas = data.filter((i) => {
657
+ if (this.field.props?.domain?.key)
658
+ return i[this.field.props?.domain?.key] === this.field.props?.domain?.code;
659
+ return false;
660
+ });
661
+ if (datas && this.field.props?.domain?.value) {
662
+ this._urlData = datas[0][this.field.props?.domain?.value];
663
+ }
664
+ else {
665
+ this._urlData = [];
666
+ }
667
+ }
668
+ else {
669
+ this._urlData = [];
670
+ }
671
+ this.filteredCache = this.datas.slice();
672
+ this.filteredCustomDetails.next(this.filteredCache);
673
+ });
674
+ }
675
+ else {
676
+ this._urlData = [];
677
+ this.filteredCache = this.datas.slice();
678
+ this.filteredCustomDetails.next(this.filteredCache);
679
+ }
680
+ of(this.props.multiple).pipe(takeUntil$1(this._unsubscribeAll))
681
+ .subscribe(() => {
682
+ if (!isArray(this.formControl.value)) {
683
+ const value = [this.formControl.value];
684
+ this.formControl.setValue(value);
685
+ }
686
+ });
687
+ this.multiFilterCtrl.valueChanges
688
+ .pipe(takeUntil$1(this._unsubscribeAll))
689
+ .subscribe(() => {
690
+ this.filterMulti();
691
+ if (this.props.multiple)
692
+ this.setToggleAllCheckboxState();
693
+ });
694
+ this.formControl.valueChanges
695
+ .pipe(takeUntil$1(this._unsubscribeAll))
696
+ .subscribe(() => {
697
+ if (this.props.multiple)
698
+ this.setToggleAllCheckboxState();
699
+ });
700
+ }
701
+ ngOnDestroy() {
702
+ this._unsubscribeAll.next(void (0));
703
+ this._unsubscribeAll.complete();
704
+ }
705
+ getAriaLabelledby() {
706
+ if (this.props.attributes?.['aria-labelledby']) {
707
+ return this.props.attributes['aria-labelledby'];
708
+ }
709
+ return this.formField?._labelId;
710
+ }
711
+ getAriaLabel() {
712
+ return this.props.attributes?.['aria-label'];
713
+ }
714
+ toggleSelectAll(selectAllValue) {
715
+ this.filteredCustomDetails.pipe(take(1), takeUntil$1(this._unsubscribeAll))
716
+ .subscribe((val) => {
717
+ if (selectAllValue) {
718
+ this.formControl.setValue(val.filter(o => !o.disabled));
719
+ }
720
+ else {
721
+ this.formControl.setValue([]);
722
+ }
723
+ this.formControl.markAsDirty();
724
+ });
725
+ }
726
+ filterMulti() {
727
+ if (!this.datas) {
728
+ return;
729
+ }
730
+ let search = this.multiFilterCtrl.value;
731
+ if (!search) {
732
+ this.filteredCache = this.datas.slice();
733
+ this.filteredCustomDetails.next(this.filteredCache);
734
+ return;
735
+ }
736
+ else {
737
+ search = search.toLowerCase();
738
+ }
739
+ this.filteredCache = this.datas.filter(items => items.value.toString().toLowerCase().indexOf(search) > -1 || items.label.toString().toLowerCase().indexOf(search) > -1);
740
+ this.filteredCustomDetails.next(this.filteredCache);
741
+ }
742
+ setToggleAllCheckboxState() {
743
+ let filteredLength = 0;
744
+ if (this.formControl.value && this.props.search) {
745
+ const cache = this.filteredCache.filter(o => !o.disabled);
746
+ const v = isArray(this.formControl.value) ? this.formControl.value : [this.formControl.value];
747
+ cache.forEach((el) => {
748
+ if (v.findIndex((t) => t.value === el.value && t.label === el.label) > -1) {
749
+ filteredLength++;
750
+ }
751
+ });
752
+ this.isIndeterminate = filteredLength > 0 && filteredLength < cache.length;
753
+ this.isChecked = filteredLength > 0 && filteredLength === cache.length;
754
+ }
755
+ else {
756
+ this.isIndeterminate = false;
757
+ this.isChecked = false;
758
+ }
759
+ }
760
+ trackByFn(index) {
761
+ return index;
762
+ }
763
+ compareWithFn(o1, o2) {
764
+ return o1 && o2 ? o1?.label === o2?.label && o1?.value === o2?.value : o1 === o2;
765
+ }
766
+ 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 }); }
767
+ 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$3.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 }); }
768
+ }
769
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatSelectTypeComponent, decorators: [{
770
+ type: Component,
771
+ 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"] }]
772
+ }], ctorParameters: () => [{ type: i1$2.HttpClient }] });
773
+
774
+ class CmatSelectTreeTypeComponent extends FieldType$1 {
775
+ constructor(_http, _changeDetectorRef) {
776
+ super();
777
+ this._http = _http;
778
+ this._changeDetectorRef = _changeDetectorRef;
779
+ this.defaultOptions = {
780
+ props: {
781
+ multiple: false,
782
+ search: true,
783
+ canNull: false,
784
+ showToggleAllCheckbox: false,
785
+ expandable: true,
786
+ customTriggerLabelTemplate: '${name}'
787
+ },
788
+ };
789
+ this.urlData = [];
790
+ this._unsubscribeAll = new Subject();
791
+ }
792
+ ngOnInit() {
793
+ const url = this.field.props?.domain?.url;
794
+ if (url && this.field.props?.domain?.code && this.field.props?.domain?.key && this.field.props?.domain?.value) {
795
+ this._http.get(url).pipe(takeUntil$1(this._unsubscribeAll)).subscribe((data) => {
796
+ if (data) {
797
+ const datas = data.filter((i) => {
798
+ if (this.field.props?.domain?.key)
799
+ return i[this.field.props?.domain?.key] === this.field.props?.domain?.code;
800
+ return false;
801
+ });
802
+ if (datas && this.field.props?.domain?.value) {
803
+ this.urlData = datas[0][this.field.props?.domain?.value];
804
+ }
805
+ else {
806
+ this.urlData = [];
807
+ }
808
+ }
809
+ else {
810
+ this.urlData = [];
811
+ }
812
+ this._changeDetectorRef.markForCheck();
813
+ });
814
+ }
815
+ else {
816
+ this.urlData = [];
817
+ this._changeDetectorRef.markForCheck();
818
+ }
819
+ }
820
+ ngOnDestroy() {
821
+ this._unsubscribeAll.next(void 0);
822
+ this._unsubscribeAll.complete();
823
+ }
824
+ 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 }); }
825
+ 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 }); }
826
+ }
827
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatSelectTreeTypeComponent, decorators: [{
828
+ type: Component,
829
+ 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"] }]
830
+ }], ctorParameters: () => [{ type: i1$2.HttpClient }, { type: i0.ChangeDetectorRef }] });
831
+
832
+ class CmatStepperHorizontalTypeComponent extends FieldType$2 {
833
+ isValid(field) {
834
+ if (field.key) {
835
+ if (field.formControl)
836
+ return field.formControl.valid;
837
+ return true;
838
+ }
839
+ return field.fieldGroup ? field.fieldGroup.every(f => this.isValid(f)) : true;
840
+ }
841
+ trackByFn(index) {
842
+ return index;
843
+ }
844
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatStepperHorizontalTypeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
845
+ 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$4.MatStep, selector: "mat-step", inputs: ["color"], exportAs: ["matStep"] }, { kind: "directive", type: i2$4.MatStepLabel, selector: "[matStepLabel]" }, { kind: "component", type: i2$4.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$4.MatStepperNext, selector: "button[matStepperNext]" }, { kind: "directive", type: i2$4.MatStepperPrevious, selector: "button[matStepperPrevious]" }, { kind: "directive", type: i2$4.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 }); }
846
+ }
847
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatStepperHorizontalTypeComponent, decorators: [{
848
+ type: Component,
849
+ 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"] }]
850
+ }] });
851
+
852
+ class CmatStepperVerticalTypeComponent extends FieldType$2 {
853
+ isValid(field) {
854
+ if (field.key) {
855
+ if (field.formControl)
856
+ return field.formControl.valid;
857
+ return true;
858
+ }
859
+ return field.fieldGroup ? field.fieldGroup.every(f => this.isValid(f)) : true;
860
+ }
861
+ trackByFn(index) {
862
+ return index;
863
+ }
864
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatStepperVerticalTypeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
865
+ 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$4.MatStep, selector: "mat-step", inputs: ["color"], exportAs: ["matStep"] }, { kind: "directive", type: i2$4.MatStepLabel, selector: "[matStepLabel]" }, { kind: "component", type: i2$4.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$4.MatStepperNext, selector: "button[matStepperNext]" }, { kind: "directive", type: i2$4.MatStepperPrevious, selector: "button[matStepperPrevious]" }, { kind: "directive", type: i2$4.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 }); }
866
+ }
867
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatStepperVerticalTypeComponent, decorators: [{
868
+ type: Component,
869
+ 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"] }]
870
+ }] });
871
+
872
+ class CmatTableTypeComponent extends FieldArrayType {
873
+ constructor(_changeDetectorRef) {
874
+ super();
875
+ this._changeDetectorRef = _changeDetectorRef;
876
+ this.inlineform = new FormGroup({});
877
+ this.currentMode = {};
878
+ this.displayedColumns = [];
879
+ this.dialogType = '';
880
+ this.defaultOptions = {
881
+ props: {
882
+ addText: '新增'
883
+ },
884
+ };
885
+ this._dialog = inject(MatDialog);
886
+ this._viewContainerRef = inject(ViewContainerRef);
887
+ }
888
+ get fieldArray() {
889
+ return this.field.fieldArray.fieldGroup;
890
+ }
891
+ get key() {
892
+ return this.field.fieldArray.fieldGroup[0].id;
893
+ }
894
+ ngOnInit() {
895
+ this.columns = this.field.fieldArray.fieldGroup[0].fieldGroup.
896
+ filter(field => field.props?.showColumn).map(field => ({
897
+ key: field.key,
898
+ label: field.props?.label ?? '',
899
+ }));
900
+ if (this.props.disabled) {
901
+ this.displayedColumns = [...this.columns.map(column => column.key)];
902
+ }
903
+ else {
904
+ this.displayedColumns = [...this.columns.map(column => column.key), '_actions_'];
905
+ }
906
+ }
907
+ addRow() {
908
+ this._dialogRef = this._dialog
909
+ .open(this.dialogRef, {
910
+ panelClass: ['cmat-table-dialog-container'],
911
+ viewContainerRef: this._viewContainerRef
912
+ });
913
+ this._dialogRef.afterClosed()
914
+ .subscribe(() => { this.dialogType = ''; });
915
+ this.dialogType = 'add';
916
+ this.currentMode = {};
917
+ this.inlineform.reset();
918
+ }
919
+ editRow(item, index) {
920
+ this.currentIndex = index;
921
+ this._dialogRef = this._dialog
922
+ .open(this.dialogRef, {
923
+ panelClass: ['cmat-table-dialog-container'],
924
+ viewContainerRef: this._viewContainerRef
925
+ });
926
+ this._dialogRef.afterClosed()
927
+ .subscribe(() => { this.dialogType = ''; });
928
+ this.dialogType = 'edit';
929
+ this.currentMode = {
930
+ [this.key]: item
931
+ };
932
+ }
933
+ deleteRow(id) {
934
+ this.remove(id);
935
+ this.table.renderRows();
936
+ }
937
+ confirm() {
938
+ if (this.inlineform.invalid) {
939
+ this.inlineform.markAllAsTouched();
940
+ return;
941
+ }
942
+ if (this.dialogType == 'add' && this.currentMode[this.key]) {
943
+ this.add(this.model?.length ?? 0, this.currentMode[this.key]);
944
+ }
945
+ else if (this.dialogType == 'edit' && this.currentMode[this.key]) {
946
+ this.model[this.currentIndex] = this.currentMode[this.key];
947
+ }
948
+ this.table.renderRows();
949
+ this._changeDetectorRef.markForCheck();
950
+ this._dialogRef.close();
951
+ }
952
+ trackByFn(index) {
953
+ return index;
954
+ }
955
+ 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 }); }
956
+ 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$3.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i3$3.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i3$3.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i3$3.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i3$3.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i3$3.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i3$3.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i3$3.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i3$3.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i3$3.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 }); }
957
+ }
958
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatTableTypeComponent, decorators: [{
959
+ type: Component,
960
+ args: [{ selector: 'cmat-table-type', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [MatButtonModule, MatIconModule, MatTableModule, FormsModule, FormlyModule, CdkDrag,
961
+ 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"] }]
962
+ }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { dialogRef: [{
963
+ type: ViewChild,
964
+ args: ['dialogRef']
965
+ }], table: [{
966
+ type: ViewChild,
967
+ args: ['table']
968
+ }] } });
969
+
970
+ class CmatTabTypeComponent extends FieldType$1 {
971
+ trackByFn(index) {
972
+ return index;
973
+ }
974
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatTabTypeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
975
+ 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 }); }
976
+ }
977
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatTabTypeComponent, decorators: [{
978
+ type: Component,
979
+ 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"] }]
980
+ }] });
981
+
982
+ class CmatTagsTypeComponent extends FieldType {
983
+ constructor(_http, _overlay, _viewContainerRef, _changeDetectorRef) {
984
+ super();
985
+ this._http = _http;
986
+ this._overlay = _overlay;
987
+ this._viewContainerRef = _viewContainerRef;
988
+ this._changeDetectorRef = _changeDetectorRef;
989
+ this._filteredItems = new BehaviorSubject(null);
990
+ this._unsubscribeAll = new Subject();
991
+ }
992
+ get filteredItems$() {
993
+ return this._filteredItems.asObservable();
994
+ }
995
+ get tags() {
996
+ if (isArray$1(this.field.props?.options)) {
997
+ return this.urlData?.length > 0 ? this.urlData : this.field.props?.options || [];
998
+ }
999
+ else {
1000
+ return this.urlData?.length > 0 ? this.urlData : this.optionsData || [];
1001
+ }
1002
+ }
1003
+ ngOnInit() {
1004
+ if (this.field.props?.options && !isArray$1(this.field.props?.options)) {
1005
+ this.field.props?.options.pipe(takeUntil$1(this._unsubscribeAll)).subscribe((data) => {
1006
+ this.optionsData = data;
1007
+ });
1008
+ }
1009
+ const url = this.field.props?.domain?.url;
1010
+ if (url && this.field.props?.domain?.code && this.field.props?.domain?.key && this.field.props?.domain?.value) {
1011
+ this._http.get(url).pipe(takeUntil$1(this._unsubscribeAll)).subscribe((data) => {
1012
+ if (data) {
1013
+ const datas = data.filter((i) => {
1014
+ if (this.field.props?.domain?.key)
1015
+ return i[this.field.props?.domain?.key] === this.field.props?.domain?.code;
1016
+ return false;
1017
+ });
1018
+ if (datas && this.field.props?.domain?.value) {
1019
+ this.urlData = datas[0][this.field.props?.domain?.value];
1020
+ }
1021
+ else {
1022
+ this.urlData = [];
1023
+ }
1024
+ }
1025
+ else {
1026
+ this.urlData = [];
1027
+ }
1028
+ this._filteredItems.next(this.tags);
1029
+ });
1030
+ }
1031
+ else {
1032
+ this.urlData = [];
1033
+ this._filteredItems.next(this.tags);
1034
+ }
1035
+ }
1036
+ ngOnDestroy() {
1037
+ this._unsubscribeAll.next(void 0);
1038
+ this._unsubscribeAll.complete();
1039
+ }
1040
+ openTagsPanel() {
1041
+ this._tagsPanelOverlayRef = this._overlay.create({
1042
+ backdropClass: '',
1043
+ hasBackdrop: true,
1044
+ scrollStrategy: this._overlay.scrollStrategies.block(),
1045
+ positionStrategy: this._overlay.position()
1046
+ .flexibleConnectedTo(this._tagsPanelOrigin.nativeElement)
1047
+ .withFlexibleDimensions(true)
1048
+ .withViewportMargin(64)
1049
+ .withLockedPosition(true)
1050
+ .withPositions([
1051
+ {
1052
+ originX: 'start',
1053
+ originY: 'bottom',
1054
+ overlayX: 'start',
1055
+ overlayY: 'top'
1056
+ }
1057
+ ])
1058
+ });
1059
+ this._tagsPanelOverlayRef.attachments().subscribe(() => {
1060
+ this._tagsPanelOverlayRef.overlayElement.querySelector('input')?.focus();
1061
+ });
1062
+ const templatePortal = new TemplatePortal(this._tagsPanel, this._viewContainerRef);
1063
+ this._tagsPanelOverlayRef.attach(templatePortal);
1064
+ // Subscribe to the backdrop click
1065
+ this._tagsPanelOverlayRef.backdropClick().subscribe(() => {
1066
+ // If overlay exists and attached...
1067
+ if (this._tagsPanelOverlayRef && this._tagsPanelOverlayRef.hasAttached()) {
1068
+ // Detach it
1069
+ this._tagsPanelOverlayRef.detach();
1070
+ // Reset the tag filter
1071
+ this._filteredItems.next(this.tags);
1072
+ }
1073
+ // If template portal exists and attached...
1074
+ if (templatePortal && templatePortal.isAttached) {
1075
+ // Detach it
1076
+ templatePortal.detach();
1077
+ }
1078
+ });
1079
+ }
1080
+ filterTags(event) {
1081
+ const value = event.target.value.toLowerCase();
1082
+ this._filteredItems.next(this.tags.filter(tag => tag.label.toString().toLowerCase().includes(value) || tag.value.toString().toLowerCase().includes(value)));
1083
+ }
1084
+ toggleTag(tag) {
1085
+ if (tag.disabled)
1086
+ return;
1087
+ const data = this.formControl.value || [];
1088
+ const existsTag = data.findIndex((i) => i.value === tag.value);
1089
+ if (existsTag > -1) {
1090
+ data.splice(existsTag, 1);
1091
+ }
1092
+ else {
1093
+ data.unshift(tag);
1094
+ }
1095
+ this.formControl.setValue(data);
1096
+ this._changeDetectorRef.markForCheck();
1097
+ }
1098
+ trackByFn(index) {
1099
+ return index;
1100
+ }
1101
+ isCheck(tag) {
1102
+ return this.formControl.value?.filter((i) => i.value === tag.value).length > 0;
1103
+ }
1104
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatTagsTypeComponent, deps: [{ token: i1$2.HttpClient }, { token: i2$5.Overlay }, { token: i0.ViewContainerRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
1105
+ 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.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 }); }
1106
+ }
1107
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatTagsTypeComponent, decorators: [{
1108
+ type: Component,
1109
+ 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"] }]
1110
+ }], ctorParameters: () => [{ type: i1$2.HttpClient }, { type: i2$5.Overlay }, { type: i0.ViewContainerRef }, { type: i0.ChangeDetectorRef }], propDecorators: { _tagsPanelOrigin: [{
1111
+ type: ViewChild,
1112
+ args: ['tagsPanelOrigin']
1113
+ }], _tagsPanel: [{
1114
+ type: ViewChild,
1115
+ args: ['tagsPanel']
1116
+ }] } });
1117
+
1118
+ class CmatTextareaTypeComponent extends FieldType$1 {
1119
+ constructor() {
1120
+ super(...arguments);
1121
+ this.defaultOptions = {
1122
+ props: {
1123
+ cols: 1,
1124
+ rows: 3,
1125
+ },
1126
+ };
1127
+ }
1128
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatTextareaTypeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1129
+ 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 }); }
1130
+ }
1131
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatTextareaTypeComponent, decorators: [{
1132
+ type: Component,
1133
+ 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"] }]
1134
+ }] });
1135
+
1136
+ /**
1137
+ * Generated bundle index. Do not edit.
1138
+ */
1139
+
1140
+ export { CmatAddonsWrapperComponent, CmatButtonTypeComponent, CmatCardWrapperComponent, CmatCheckListTypeComponent, CmatChipsInputTypeComponent, CmatExpansionWrapperComponent, CmatMultiCheckboxTypeComponent, CmatNumberTypeComponent, CmatPanelWrapperComponent, CmatRadioTypeComponent, CmatRatingTypeComponent, CmatRepeatTypeComponent, CmatSelectTreeTypeComponent, CmatSelectTypeComponent, CmatStepperHorizontalTypeComponent, CmatStepperVerticalTypeComponent, CmatTabTypeComponent, CmatTableTypeComponent, CmatTagsTypeComponent, CmatTextareaTypeComponent, addonsExtension };
1141
+ //# sourceMappingURL=cmat-components-custom-formly.mjs.map