cmat 0.0.7 → 0.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (320) hide show
  1. package/components/adapter/dayjs-datetime-adapter.d.ts +1 -1
  2. package/components/breadcrumb/breadcrumb.service.d.ts +1 -1
  3. package/components/card/card.component.d.ts +1 -1
  4. package/components/cascade/cascade-list/cascade-list.component.d.ts +45 -21
  5. package/components/chip-input/chip-input.component.d.ts +39 -12
  6. package/components/custom-formly/extension/addons.extension.d.ts +2 -0
  7. package/components/custom-formly/index.d.ts +5 -0
  8. package/components/custom-formly/public-api.d.ts +26 -0
  9. package/components/custom-formly/types/button/button.component.d.ts +18 -0
  10. package/components/custom-formly/types/cascade/cascade.component.d.ts +38 -0
  11. package/components/custom-formly/types/checklist/checklist.component.d.ts +41 -0
  12. package/components/custom-formly/types/chips/chips.component.d.ts +27 -0
  13. package/components/custom-formly/types/color-picker/color-picker.component.d.ts +7 -0
  14. package/components/custom-formly/types/date-range/date-range.component.d.ts +20 -0
  15. package/components/custom-formly/types/datepicker/datepicker.component.d.ts +41 -0
  16. package/components/custom-formly/types/multicheckbox/multicheckbox.component.d.ts +44 -0
  17. package/components/custom-formly/types/number/number.component.d.ts +20 -0
  18. package/components/custom-formly/types/radio/radio.component.d.ts +44 -0
  19. package/components/custom-formly/types/rating/rating.component.d.ts +24 -0
  20. package/components/custom-formly/types/repeat/repeat.component.d.ts +16 -0
  21. package/components/custom-formly/types/select/select.component.d.ts +54 -0
  22. package/components/custom-formly/types/select-tree/select-tree.component.d.ts +43 -0
  23. package/components/custom-formly/types/stepper/horizontal/stepper.component.d.ts +9 -0
  24. package/components/custom-formly/types/stepper/stepper.type.d.ts +6 -0
  25. package/components/custom-formly/types/stepper/vertical/stepper.component.d.ts +9 -0
  26. package/components/custom-formly/types/table/table.component.d.ts +43 -0
  27. package/components/custom-formly/types/tabs/tab.component.d.ts +8 -0
  28. package/components/custom-formly/types/tags/tags.component.d.ts +41 -0
  29. package/components/custom-formly/types/textarea/textarea.component.d.ts +13 -0
  30. package/components/custom-formly/types/upload/upload.component.d.ts +31 -0
  31. package/components/custom-formly/wrappers/addons/addons.component.d.ts +10 -0
  32. package/components/custom-formly/wrappers/card/card.component.d.ts +6 -0
  33. package/components/custom-formly/wrappers/expansion/expansion.component.d.ts +6 -0
  34. package/components/custom-formly/wrappers/panel/panel.component.d.ts +6 -0
  35. package/components/date-range/date-range.component.d.ts +8 -6
  36. package/components/drawer/drawer.component.d.ts +2 -2
  37. package/components/fullscreen/fullscreen.component.d.ts +2 -9
  38. package/components/fullscreen/public-api.d.ts +0 -1
  39. package/components/material-color-picker/material-color-picker.component.d.ts +8 -4
  40. package/components/material-datetimepicker/calendar.d.ts +2 -2
  41. package/components/material-datetimepicker/clock.d.ts +1 -1
  42. package/components/material-datetimepicker/datetimepicker-input.d.ts +1 -1
  43. package/components/material-datetimepicker/datetimepicker-toggle.d.ts +1 -1
  44. package/components/material-datetimepicker/datetimepicker.d.ts +5 -10
  45. package/components/material-datetimepicker/month-view.d.ts +1 -2
  46. package/components/material-datetimepicker/multi-year-view.d.ts +1 -1
  47. package/components/material-datetimepicker/time.d.ts +2 -2
  48. package/components/material-datetimepicker/year-view.d.ts +1 -1
  49. package/components/navigation/horizontal/components/basic/basic.component.d.ts +1 -1
  50. package/components/navigation/horizontal/components/branch/branch.component.d.ts +1 -1
  51. package/components/navigation/horizontal/horizontal.component.d.ts +2 -2
  52. package/components/navigation/vertical/components/aside/aside.component.d.ts +1 -1
  53. package/components/navigation/vertical/components/basic/basic.component.d.ts +1 -7
  54. package/components/navigation/vertical/components/collapsable/collapsable.component.d.ts +1 -1
  55. package/components/navigation/vertical/components/group/group.component.d.ts +1 -1
  56. package/components/navigation/vertical/vertical.component.d.ts +5 -5
  57. package/components/popover/popover-trigger.d.ts +1 -1
  58. package/components/popover/popover.component.d.ts +3 -3
  59. package/components/rating/rating.component.d.ts +38 -9
  60. package/components/select-search/select-search.component.d.ts +4 -4
  61. package/components/select-tree/select-tree.component.d.ts +50 -21
  62. package/components/toast/toast.component.d.ts +4 -4
  63. package/components/transfer-picker/filter/filter.component.d.ts +1 -1
  64. package/components/transfer-picker/transfer-picker-source/transfer-picker-source.component.d.ts +2 -2
  65. package/components/transfer-picker/transfer-picker.component.d.ts +1 -1
  66. package/components/upload/files.type.d.ts +22 -0
  67. package/components/upload/files.util.service.d.ts +20 -0
  68. package/components/upload/index.d.ts +5 -0
  69. package/components/upload/public-api.d.ts +4 -0
  70. package/components/upload/upload-queue/upload-queue.component.d.ts +39 -0
  71. package/components/upload/upload.component.d.ts +32 -0
  72. package/esm2022/animations/public-api.mjs +2 -2
  73. package/esm2022/components/adapter/dayjs-date-adapter.mjs +6 -6
  74. package/esm2022/components/adapter/dayjs-datetime-adapter.mjs +5 -5
  75. package/esm2022/components/adapter/native-datetime-adapter.mjs +3 -3
  76. package/esm2022/components/breadcrumb/breadcrumb-item.directive.mjs +3 -3
  77. package/esm2022/components/breadcrumb/breadcrumb.component.mjs +6 -6
  78. package/esm2022/components/breadcrumb/breadcrumb.service.mjs +5 -5
  79. package/esm2022/components/card/card.component.mjs +5 -5
  80. package/esm2022/components/cascade/cascade-bottom-sheet/cascade-bottom-sheet.component.mjs +7 -7
  81. package/esm2022/components/cascade/cascade-list/cascade-list.component.mjs +207 -114
  82. package/esm2022/components/cascade/cascade-menu/cascade-menu.component.mjs +4 -4
  83. package/esm2022/components/chip-input/chip-input.component.mjs +152 -49
  84. package/esm2022/components/custom-formly/cmat-components-custom-formly.mjs +5 -0
  85. package/esm2022/components/custom-formly/extension/addons.extension.mjs +13 -0
  86. package/esm2022/components/custom-formly/public-api.mjs +27 -0
  87. package/esm2022/components/custom-formly/types/button/button.component.mjs +39 -0
  88. package/esm2022/components/custom-formly/types/cascade/cascade.component.mjs +71 -0
  89. package/esm2022/components/custom-formly/types/checklist/checklist.component.mjs +161 -0
  90. package/esm2022/components/custom-formly/types/chips/chips.component.mjs +55 -0
  91. package/esm2022/components/custom-formly/types/color-picker/color-picker.component.mjs +15 -0
  92. package/esm2022/components/custom-formly/types/date-range/date-range.component.mjs +25 -0
  93. package/esm2022/components/custom-formly/types/datepicker/datepicker.component.mjs +51 -0
  94. package/esm2022/components/custom-formly/types/multicheckbox/multicheckbox.component.mjs +89 -0
  95. package/esm2022/components/custom-formly/types/number/number.component.mjs +27 -0
  96. package/esm2022/components/custom-formly/types/radio/radio.component.mjs +88 -0
  97. package/esm2022/components/custom-formly/types/rating/rating.component.mjs +27 -0
  98. package/esm2022/components/custom-formly/types/repeat/repeat.component.mjs +28 -0
  99. package/esm2022/components/custom-formly/types/select/select.component.mjs +169 -0
  100. package/esm2022/components/custom-formly/types/select-tree/select-tree.component.mjs +66 -0
  101. package/esm2022/components/custom-formly/types/stepper/horizontal/stepper.component.mjs +31 -0
  102. package/esm2022/components/custom-formly/types/stepper/stepper.type.mjs +2 -0
  103. package/esm2022/components/custom-formly/types/stepper/vertical/stepper.component.mjs +31 -0
  104. package/esm2022/components/custom-formly/types/table/table.component.mjs +116 -0
  105. package/esm2022/components/custom-formly/types/tabs/tab.component.mjs +19 -0
  106. package/esm2022/components/custom-formly/types/tags/tags.component.mjs +149 -0
  107. package/esm2022/components/custom-formly/types/textarea/textarea.component.mjs +25 -0
  108. package/esm2022/components/custom-formly/types/upload/upload.component.mjs +58 -0
  109. package/esm2022/components/custom-formly/wrappers/addons/addons.component.mjs +92 -0
  110. package/esm2022/components/custom-formly/wrappers/card/card.component.mjs +14 -0
  111. package/esm2022/components/custom-formly/wrappers/expansion/expansion.component.mjs +14 -0
  112. package/esm2022/components/custom-formly/wrappers/panel/panel.component.mjs +12 -0
  113. package/esm2022/components/date-range/date-range.component.mjs +26 -17
  114. package/esm2022/components/drawer/drawer.component.mjs +5 -5
  115. package/esm2022/components/drawer/drawer.service.mjs +3 -3
  116. package/esm2022/components/fullscreen/fullscreen.component.mjs +16 -73
  117. package/esm2022/components/fullscreen/public-api.mjs +1 -2
  118. package/esm2022/components/highlight/highlight.component.mjs +5 -5
  119. package/esm2022/components/highlight/highlight.service.mjs +3 -3
  120. package/esm2022/components/json-editor/json-editor.component.mjs +3 -3
  121. package/esm2022/components/masonry/masonry.component.mjs +5 -5
  122. package/esm2022/components/material-color-picker/material-color-picker.component.mjs +22 -12
  123. package/esm2022/components/material-datetimepicker/calendar-body.mjs +3 -3
  124. package/esm2022/components/material-datetimepicker/calendar.mjs +11 -12
  125. package/esm2022/components/material-datetimepicker/clock.mjs +5 -5
  126. package/esm2022/components/material-datetimepicker/datetimepicker-input.mjs +4 -5
  127. package/esm2022/components/material-datetimepicker/datetimepicker-intl.mjs +3 -3
  128. package/esm2022/components/material-datetimepicker/datetimepicker-toggle.mjs +9 -9
  129. package/esm2022/components/material-datetimepicker/datetimepicker.mjs +17 -22
  130. package/esm2022/components/material-datetimepicker/month-view.mjs +5 -6
  131. package/esm2022/components/material-datetimepicker/multi-year-view.mjs +7 -8
  132. package/esm2022/components/material-datetimepicker/time.mjs +8 -8
  133. package/esm2022/components/material-datetimepicker/year-view.mjs +7 -8
  134. package/esm2022/components/navigation/horizontal/components/basic/basic.component.mjs +8 -8
  135. package/esm2022/components/navigation/horizontal/components/branch/branch.component.mjs +8 -8
  136. package/esm2022/components/navigation/horizontal/components/divider/divider.component.mjs +5 -5
  137. package/esm2022/components/navigation/horizontal/components/spacer/spacer.component.mjs +6 -6
  138. package/esm2022/components/navigation/horizontal/horizontal.component.mjs +6 -6
  139. package/esm2022/components/navigation/navigation.service.mjs +3 -3
  140. package/esm2022/components/navigation/vertical/components/aside/aside.component.mjs +11 -11
  141. package/esm2022/components/navigation/vertical/components/basic/basic.component.mjs +7 -24
  142. package/esm2022/components/navigation/vertical/components/collapsable/collapsable.component.mjs +10 -10
  143. package/esm2022/components/navigation/vertical/components/divider/divider.component.mjs +5 -5
  144. package/esm2022/components/navigation/vertical/components/group/group.component.mjs +9 -9
  145. package/esm2022/components/navigation/vertical/components/spacer/spacer.component.mjs +6 -6
  146. package/esm2022/components/navigation/vertical/vertical.component.mjs +11 -11
  147. package/esm2022/components/pagination/pagination.component.mjs +10 -10
  148. package/esm2022/components/pagination/pagination.directive.mjs +4 -4
  149. package/esm2022/components/pagination/pagination.pipe.mjs +4 -4
  150. package/esm2022/components/pagination/pagination.service.mjs +3 -3
  151. package/esm2022/components/password-strength/mat-pass-toggle-visibility/mat-pass-toggle-visibility.component.mjs +6 -6
  152. package/esm2022/components/password-strength/mat-password-strength/mat-password-strength.component.mjs +5 -5
  153. package/esm2022/components/password-strength/mat-password-strength-info/mat-password-strength-info.component.mjs +6 -6
  154. package/esm2022/components/popover/popover-trigger.mjs +5 -5
  155. package/esm2022/components/popover/popover.component.mjs +8 -9
  156. package/esm2022/components/popover/popover.target.mjs +3 -3
  157. package/esm2022/components/progress-bar/progress-bar.component.mjs +6 -6
  158. package/esm2022/components/rating/rating.component.mjs +122 -23
  159. package/esm2022/components/select-search/select-no-entries-found.directive.mjs +3 -3
  160. package/esm2022/components/select-search/select-search-clear.directive.mjs +3 -3
  161. package/esm2022/components/select-search/select-search.component.mjs +15 -15
  162. package/esm2022/components/select-tree/select-tree.component.mjs +281 -157
  163. package/esm2022/components/timeline/timeline-item/timeline-item.component.mjs +9 -9
  164. package/esm2022/components/timeline/timeline.component.mjs +5 -5
  165. package/esm2022/components/toast/toast-modal.component.mjs +5 -5
  166. package/esm2022/components/toast/toast.component.mjs +6 -6
  167. package/esm2022/components/toast/toast.service.mjs +3 -3
  168. package/esm2022/components/transfer-picker/filter/filter.component.mjs +9 -9
  169. package/esm2022/components/transfer-picker/search/search.component.mjs +6 -6
  170. package/esm2022/components/transfer-picker/transfer-picker-source/transfer-picker-source.component.mjs +11 -11
  171. package/esm2022/components/transfer-picker/transfer-picker-target/transfer-picker-target.component.mjs +5 -5
  172. package/esm2022/components/transfer-picker/transfer-picker.component.mjs +7 -7
  173. package/esm2022/components/transfer-picker/transfer-picker.service.mjs +4 -4
  174. package/esm2022/components/upload/cmat-components-upload.mjs +5 -0
  175. package/esm2022/components/upload/files.type.mjs +2 -0
  176. package/esm2022/components/upload/files.util.service.mjs +100 -0
  177. package/esm2022/components/upload/public-api.mjs +5 -0
  178. package/esm2022/components/upload/upload-queue/upload-queue.component.mjs +154 -0
  179. package/esm2022/components/upload/upload.component.mjs +118 -0
  180. package/esm2022/directives/animate-on-scroll/animate-on-scroll.directive.mjs +3 -3
  181. package/esm2022/directives/animate-on-scroll/scroll.service.mjs +3 -3
  182. package/esm2022/directives/autofocus/autofocus.directive.mjs +3 -3
  183. package/esm2022/directives/debounce/abstract-debounce.directive.mjs +3 -3
  184. package/esm2022/directives/debounce/debounce-click.directive.mjs +3 -3
  185. package/esm2022/directives/debounce/debounce-keyup.directive.mjs +3 -3
  186. package/esm2022/directives/digit-only/digit-only.directive.mjs +3 -3
  187. package/esm2022/directives/digit-only/mask.directive.mjs +3 -3
  188. package/esm2022/directives/equal-validator/equal-validator.directive.mjs +3 -3
  189. package/esm2022/lib/mock-api/mock-api.interceptor.mjs +5 -5
  190. package/esm2022/lib/mock-api/mock-api.service.mjs +3 -3
  191. package/esm2022/pipes/bytes/bytes.pipe.mjs +3 -3
  192. package/esm2022/pipes/date-format/date-format.pipe.mjs +3 -3
  193. package/esm2022/pipes/find-by-key/find-by-key.pipe.mjs +3 -3
  194. package/esm2022/pipes/group-by/group-by.pipe.mjs +3 -3
  195. package/esm2022/pipes/keys/keys.pipe.mjs +3 -3
  196. package/esm2022/pipes/secure/secure-pipe.mjs +5 -5
  197. package/esm2022/pipes/uppercase/uppercase.pipe.mjs +3 -3
  198. package/esm2022/public-api.mjs +1 -1
  199. package/esm2022/services/alert/alert.service.mjs +7 -7
  200. package/esm2022/services/alert/enum.mjs +2 -2
  201. package/esm2022/services/config/config.service.mjs +5 -5
  202. package/esm2022/services/config/urlStateConfig.service.mjs +5 -5
  203. package/esm2022/services/confirmation/confirmation.service.mjs +5 -5
  204. package/esm2022/services/confirmation/dialog/dialog.component.mjs +7 -7
  205. package/esm2022/services/data/data.service.mjs +5 -5
  206. package/esm2022/services/loading/loading.interceptor.mjs +4 -4
  207. package/esm2022/services/loading/loading.service.mjs +3 -3
  208. package/esm2022/services/local-storage/local-storage.service.mjs +3 -3
  209. package/esm2022/services/media-watcher/media-watcher.service.mjs +5 -5
  210. package/esm2022/services/platform/platform.service.mjs +4 -4
  211. package/esm2022/services/splash-screen/splash-screen.service.mjs +6 -6
  212. package/esm2022/services/title/title.service.mjs +4 -4
  213. package/esm2022/services/translation/translation.service.mjs +3 -3
  214. package/esm2022/services/utils/utils.service.mjs +54 -9
  215. package/fesm2022/cmat-animations.mjs +15 -15
  216. package/fesm2022/cmat-animations.mjs.map +1 -1
  217. package/fesm2022/cmat-components-adapter.mjs +11 -11
  218. package/fesm2022/cmat-components-adapter.mjs.map +1 -1
  219. package/fesm2022/cmat-components-breadcrumb.mjs +11 -11
  220. package/fesm2022/cmat-components-breadcrumb.mjs.map +1 -1
  221. package/fesm2022/cmat-components-card.mjs +4 -4
  222. package/fesm2022/cmat-components-card.mjs.map +1 -1
  223. package/fesm2022/cmat-components-cascade.mjs +215 -123
  224. package/fesm2022/cmat-components-cascade.mjs.map +1 -1
  225. package/fesm2022/cmat-components-chip-input.mjs +153 -50
  226. package/fesm2022/cmat-components-chip-input.mjs.map +1 -1
  227. package/fesm2022/cmat-components-custom-formly.mjs +1331 -0
  228. package/fesm2022/cmat-components-custom-formly.mjs.map +1 -0
  229. package/fesm2022/cmat-components-date-range.mjs +27 -18
  230. package/fesm2022/cmat-components-date-range.mjs.map +1 -1
  231. package/fesm2022/cmat-components-drawer.mjs +8 -8
  232. package/fesm2022/cmat-components-drawer.mjs.map +1 -1
  233. package/fesm2022/cmat-components-fullscreen.mjs +16 -73
  234. package/fesm2022/cmat-components-fullscreen.mjs.map +1 -1
  235. package/fesm2022/cmat-components-highlight.mjs +7 -7
  236. package/fesm2022/cmat-components-highlight.mjs.map +1 -1
  237. package/fesm2022/cmat-components-json-editor.mjs +3 -3
  238. package/fesm2022/cmat-components-masonry.mjs +4 -4
  239. package/fesm2022/cmat-components-masonry.mjs.map +1 -1
  240. package/fesm2022/cmat-components-material-color-picker.mjs +21 -11
  241. package/fesm2022/cmat-components-material-color-picker.mjs.map +1 -1
  242. package/fesm2022/cmat-components-material-datetimepicker.mjs +189 -195
  243. package/fesm2022/cmat-components-material-datetimepicker.mjs.map +1 -1
  244. package/fesm2022/cmat-components-navigation.mjs +166 -183
  245. package/fesm2022/cmat-components-navigation.mjs.map +1 -1
  246. package/fesm2022/cmat-components-pagination.mjs +20 -20
  247. package/fesm2022/cmat-components-pagination.mjs.map +1 -1
  248. package/fesm2022/cmat-components-password-strength.mjs +13 -13
  249. package/fesm2022/cmat-components-password-strength.mjs.map +1 -1
  250. package/fesm2022/cmat-components-popover.mjs +13 -14
  251. package/fesm2022/cmat-components-popover.mjs.map +1 -1
  252. package/fesm2022/cmat-components-progress-bar.mjs +6 -6
  253. package/fesm2022/cmat-components-progress-bar.mjs.map +1 -1
  254. package/fesm2022/cmat-components-rating.mjs +121 -22
  255. package/fesm2022/cmat-components-rating.mjs.map +1 -1
  256. package/fesm2022/cmat-components-select-search.mjs +41 -41
  257. package/fesm2022/cmat-components-select-search.mjs.map +1 -1
  258. package/fesm2022/cmat-components-select-tree.mjs +281 -157
  259. package/fesm2022/cmat-components-select-tree.mjs.map +1 -1
  260. package/fesm2022/cmat-components-timeline.mjs +12 -12
  261. package/fesm2022/cmat-components-timeline.mjs.map +1 -1
  262. package/fesm2022/cmat-components-toast.mjs +12 -12
  263. package/fesm2022/cmat-components-toast.mjs.map +1 -1
  264. package/fesm2022/cmat-components-transfer-picker.mjs +33 -33
  265. package/fesm2022/cmat-components-transfer-picker.mjs.map +1 -1
  266. package/fesm2022/cmat-components-upload.mjs +366 -0
  267. package/fesm2022/cmat-components-upload.mjs.map +1 -0
  268. package/fesm2022/cmat-directives-animate-on-scroll.mjs +6 -6
  269. package/fesm2022/cmat-directives-autofocus.mjs +3 -3
  270. package/fesm2022/cmat-directives-debounce.mjs +9 -9
  271. package/fesm2022/cmat-directives-digit-only.mjs +6 -6
  272. package/fesm2022/cmat-directives-equal-validator.mjs +3 -3
  273. package/fesm2022/cmat-lib-mock-api.mjs +6 -6
  274. package/fesm2022/cmat-lib-mock-api.mjs.map +1 -1
  275. package/fesm2022/cmat-pipes-bytes.mjs +3 -3
  276. package/fesm2022/cmat-pipes-date-format.mjs +3 -3
  277. package/fesm2022/cmat-pipes-find-by-key.mjs +3 -3
  278. package/fesm2022/cmat-pipes-group-by.mjs +3 -3
  279. package/fesm2022/cmat-pipes-keys.mjs +3 -3
  280. package/fesm2022/cmat-pipes-secure.mjs +4 -4
  281. package/fesm2022/cmat-pipes-secure.mjs.map +1 -1
  282. package/fesm2022/cmat-pipes-uppercase.mjs +3 -3
  283. package/fesm2022/cmat-services-alert.mjs +6 -6
  284. package/fesm2022/cmat-services-alert.mjs.map +1 -1
  285. package/fesm2022/cmat-services-config.mjs +7 -7
  286. package/fesm2022/cmat-services-config.mjs.map +1 -1
  287. package/fesm2022/cmat-services-confirmation.mjs +11 -11
  288. package/fesm2022/cmat-services-confirmation.mjs.map +1 -1
  289. package/fesm2022/cmat-services-data.mjs +5 -5
  290. package/fesm2022/cmat-services-data.mjs.map +1 -1
  291. package/fesm2022/cmat-services-loading.mjs +6 -6
  292. package/fesm2022/cmat-services-loading.mjs.map +1 -1
  293. package/fesm2022/cmat-services-local-storage.mjs +3 -3
  294. package/fesm2022/cmat-services-media-watcher.mjs +4 -4
  295. package/fesm2022/cmat-services-media-watcher.mjs.map +1 -1
  296. package/fesm2022/cmat-services-platform.mjs +3 -3
  297. package/fesm2022/cmat-services-platform.mjs.map +1 -1
  298. package/fesm2022/cmat-services-splash-screen.mjs +5 -5
  299. package/fesm2022/cmat-services-splash-screen.mjs.map +1 -1
  300. package/fesm2022/cmat-services-title.mjs +3 -3
  301. package/fesm2022/cmat-services-title.mjs.map +1 -1
  302. package/fesm2022/cmat-services-translation.mjs +3 -3
  303. package/fesm2022/cmat-services-utils.mjs +53 -8
  304. package/fesm2022/cmat-services-utils.mjs.map +1 -1
  305. package/package.json +30 -18
  306. package/pipes/secure/secure-pipe.d.ts +1 -1
  307. package/services/alert/enum.d.ts +1 -1
  308. package/services/confirmation/confirmation.service.d.ts +1 -1
  309. package/services/data/data.service.d.ts +1 -1
  310. package/services/media-watcher/media-watcher.service.d.ts +1 -1
  311. package/services/title/title.service.d.ts +1 -1
  312. package/services/utils/utils.service.d.ts +1 -0
  313. package/styles/components/bundle.scss +18 -5
  314. package/styles/overrides/angular-material.scss +51 -52
  315. package/styles/tailwind.scss +2 -8
  316. package/styles/themes.scss +7 -7
  317. package/styles/user-themes.scss +1 -1
  318. package/tailwind/plugins/utilities.js +1 -1
  319. package/components/fullscreen/fullscreen.types.d.ts +0 -13
  320. package/esm2022/components/fullscreen/fullscreen.types.mjs +0 -2
@@ -1,39 +1,41 @@
1
- import * as i0 from '@angular/core';
2
- import { forwardRef, Component, ChangeDetectionStrategy, ViewEncapsulation, Input, ViewChild } from '@angular/core';
3
- import * as i5 from '@angular/forms';
4
- import { FormControl, NG_VALUE_ACCESSOR, FormsModule, ReactiveFormsModule } from '@angular/forms';
5
- import { ReplaySubject, Subject, merge } from 'rxjs';
6
- import { takeUntil, debounceTime } from 'rxjs/operators';
1
+ import { coerceBooleanProperty } from '@angular/cdk/coercion';
7
2
  import { SelectionModel } from '@angular/cdk/collections';
8
3
  import { FlatTreeControl } from '@angular/cdk/tree';
9
- import * as i6 from '@angular/material/tree';
10
- import { MatTreeFlattener, MatTreeFlatDataSource, MatTreeModule } from '@angular/material/tree';
11
- import * as i3 from '@angular/material/select';
12
- import { MatSelectModule } from '@angular/material/select';
13
- import * as i8 from '@angular/material/checkbox';
14
- import { MatCheckboxModule } from '@angular/material/checkbox';
15
- import * as i7 from '@angular/material/button';
4
+ import { NgClass, AsyncPipe, NgStyle } from '@angular/common';
5
+ import * as i0 from '@angular/core';
6
+ import { Component, ChangeDetectionStrategy, ViewEncapsulation, Optional, Self, HostBinding, Input, ViewChild, HostListener } from '@angular/core';
7
+ import * as i1 from '@angular/forms';
8
+ import { FormControl, ReactiveFormsModule } from '@angular/forms';
9
+ import * as i6 from '@angular/material/button';
16
10
  import { MatButtonModule } from '@angular/material/button';
17
- import { CmatSelectSearchComponent } from 'cmat/components/select-search';
11
+ import * as i7 from '@angular/material/checkbox';
12
+ import { MatCheckboxModule } from '@angular/material/checkbox';
13
+ import { MatFormFieldControl } from '@angular/material/form-field';
18
14
  import * as i2 from '@angular/material/icon';
19
15
  import { MatIconModule } from '@angular/material/icon';
20
- import { NgClass, AsyncPipe, NgStyle } from '@angular/common';
21
- import * as i1 from '@angular/material/form-field';
22
- import { MatFormFieldModule } from '@angular/material/form-field';
23
- import { isNil } from 'lodash-es';
16
+ import * as i3 from '@angular/material/select';
17
+ import { MatSelectModule } from '@angular/material/select';
18
+ import * as i5 from '@angular/material/tree';
19
+ import { MatTreeFlattener, MatTreeFlatDataSource, MatTreeModule } from '@angular/material/tree';
20
+ import { isUndefined, isNil } from 'lodash-es';
21
+ import { ReplaySubject, Subject, merge } from 'rxjs';
22
+ import { takeUntil, debounceTime } from 'rxjs/operators';
23
+ import { CmatSelectSearchComponent } from 'cmat/components/select-search';
24
24
  import * as i4 from '@angular/material/core';
25
25
 
26
26
  class CmatSelectTreeFlatNode {
27
27
  }
28
28
 
29
+ /* eslint-disable @typescript-eslint/member-ordering */
30
+ let NEXT_ID = 0;
29
31
  class CmatSelectTreeComponent {
30
- constructor(_cd) {
31
- this._cd = _cd;
32
- this.showLabel = true;
32
+ constructor(ngControl, _changeDetectorRef) {
33
+ this.ngControl = ngControl;
34
+ this._changeDetectorRef = _changeDetectorRef;
35
+ this.id = `cmat-select-tree-${NEXT_ID++}`;
33
36
  this.noEntriesFoundLabel = '无结果';
34
37
  this.showNoFoundLabel = true;
35
- this.placeholder = '部门';
36
- this.prefixIcon = 'heroicons_outline:building-library';
38
+ this.multiple = false;
37
39
  this.overallSearchEnabled = true;
38
40
  this.canNull = false;
39
41
  this.showToggleAllCheckbox = false;
@@ -41,11 +43,16 @@ class CmatSelectTreeComponent {
41
43
  this.nestedNodeMap = new Map();
42
44
  this.selectedParent = null;
43
45
  this.checklistSelection = new SelectionModel(true);
46
+ this.overallFilterControl = new FormControl();
44
47
  this.isIndeterminate = false;
45
48
  this.isChecked = false;
46
- this.dataCount = 0;
49
+ this.checkCount = 0;
47
50
  this.selectControl = new FormControl();
48
51
  this.matSelectData = new ReplaySubject(1);
52
+ this.stateChanges = new Subject();
53
+ this.focused = false;
54
+ this.touched = false;
55
+ this.controlType = 'cmat-select-tree';
49
56
  this._unsubscribeAll = new Subject();
50
57
  this.getLevel = (node) => node.level;
51
58
  this.isExpandable = (node) => node.expandable;
@@ -65,20 +72,41 @@ class CmatSelectTreeComponent {
65
72
  this.nestedNodeMap.set(node, flatNode);
66
73
  return flatNode;
67
74
  };
68
- this.overallFilterControl = new FormControl();
75
+ this._placeholder = '';
76
+ this._required = false;
77
+ this._disabled = false;
78
+ this._onModelChange = () => { };
79
+ this._onTouchedChange = () => { };
80
+ if (this.ngControl != null) {
81
+ this.ngControl.valueAccessor = this;
82
+ }
69
83
  this.treeFlattener = new MatTreeFlattener(this.transformer, this.getLevel, this.isExpandable, this.getChildren);
70
84
  this.treeControl = new FlatTreeControl(this.getLevel, this.isExpandable);
71
85
  this.treeDataSource = new MatTreeFlatDataSource(this.treeControl, this.treeFlattener);
72
86
  }
73
- ngOnInit() {
74
- this.multiple = this.multiple || false;
75
- this.required = this.required || false;
76
- this.treeDataSource.data = this.dataSource;
77
- this.dataCount = this.treeControl.dataNodes.length;
78
- this.matSelectData.next(this.treeControl.dataNodes);
79
- if (this.expandable) {
80
- this.treeControl.expandAll();
87
+ set matSelect(m) {
88
+ const existsSelect = !isUndefined(this._matSelect);
89
+ this._matSelect = m;
90
+ if (!existsSelect) {
91
+ this._init(this.value);
92
+ }
93
+ }
94
+ clickedOut() {
95
+ if (!this._matSelect?.panelOpen) {
96
+ this.focused = false;
97
+ this.stateChanges.next();
98
+ }
99
+ }
100
+ ngOnChanges(changes) {
101
+ if (changes['dataSource']) {
102
+ this.treeDataSource.data = this.dataSource;
103
+ this.matSelectData.next(this.treeControl.dataNodes);
104
+ if (this.dataSource.length > 0) {
105
+ this._init(this.value);
106
+ }
81
107
  }
108
+ }
109
+ ngAfterViewInit() {
82
110
  let panelClass = '';
83
111
  if (!this.overallSearchEnabled) {
84
112
  panelClass = 'cmat-select-search-panel overflow-y-auto lg:overflow-y-hidden lg:hover:overflow-y-auto scrollbar-custom';
@@ -109,15 +137,12 @@ class CmatSelectTreeComponent {
109
137
  });
110
138
  }
111
139
  if (!opened) {
112
- if (this.overallSearchEnabled) {
113
- this._resetFilters();
114
- }
115
140
  setTimeout(() => {
116
141
  if (!isNil(this.checklistSelection.selected)) {
117
142
  if (this.multiple) {
118
143
  const findOutNode = [];
119
144
  this.checklistSelection.selected.forEach((node) => {
120
- const parentNode = this.getParentNode(node);
145
+ const parentNode = this._getParentNode(node);
121
146
  if (parentNode && this.checklistSelection.isSelected(parentNode)) {
122
147
  findOutNode.push(node);
123
148
  }
@@ -125,83 +150,126 @@ class CmatSelectTreeComponent {
125
150
  findOutNode.forEach((node) => {
126
151
  this.checklistSelection.deselect(node);
127
152
  });
128
- this._matSelect.writeValue(this.checklistSelection.selected);
129
- if (this._matSelect.value !== this.checklistSelection.selected) {
130
- this._matSelect.value = this.checklistSelection.selected;
131
- }
132
- this._matSelect._onChange(this.checklistSelection.selected);
153
+ this.value = this.checklistSelection.selected;
133
154
  }
134
155
  else {
135
156
  if (this.checklistSelection.selected && this.checklistSelection.selected.length > 0) {
136
- this._matSelect.writeValue(this.checklistSelection.selected[0]);
137
- if (this._matSelect.value !== this.checklistSelection.selected[0]) {
138
- this._matSelect.value = this.checklistSelection.selected[0];
139
- }
140
- this._matSelect._onChange(this.checklistSelection.selected[0]);
157
+ this.value = this.checklistSelection.selected[0];
141
158
  }
142
159
  }
160
+ this._matSelect.writeValue(this.value);
161
+ this._matSelect._onChange(this.value);
143
162
  }
144
163
  }, 200);
145
164
  }
146
165
  });
147
- }
148
- ngAfterViewInit() {
149
166
  merge(this.overallFilterControl.valueChanges)
150
167
  .pipe(takeUntil(this._unsubscribeAll), debounceTime(200))
151
168
  .subscribe(() => {
152
- const dataClone = JSON.parse(JSON.stringify([...this.dataSource]));
153
- const arr = [];
154
- for (let i = dataClone.length - 1; i >= 0; i--) {
155
- if (!this._applyColumnLevelFilters(dataClone[i], this.overallFilterControl.value.toLowerCase())) {
156
- arr.push(i);
169
+ if (this._matSelect.panelOpen) {
170
+ const dataClone = JSON.parse(JSON.stringify([...this.dataSource]));
171
+ const arr = [];
172
+ for (let i = dataClone.length - 1; i >= 0; i--) {
173
+ if (!this._applyColumnLevelFilters(dataClone[i], this.overallFilterControl.value.toLowerCase())) {
174
+ arr.push(i);
175
+ }
157
176
  }
177
+ arr.forEach((v) => { dataClone.splice(v, 1); });
178
+ this.treeDataSource.data = dataClone;
179
+ this.matSelectData.next(this.treeControl.dataNodes);
180
+ if (this.expandable) {
181
+ this.treeControl.expandAll();
182
+ }
183
+ this._updateSelect(this.checklistSelection.selected);
184
+ this._changeDetectorRef.detectChanges();
158
185
  }
159
- arr.forEach((v) => { dataClone.splice(v, 1); });
160
- this.treeDataSource.data = dataClone;
161
- this.matSelectData.next(this.treeControl.dataNodes);
162
- if (this.expandable) {
163
- this.treeControl.expandAll();
164
- }
165
- this._updateSelect(this.checklistSelection.selected);
166
- this._cd.detectChanges();
167
186
  });
168
187
  }
169
188
  ngOnDestroy() {
189
+ this.stateChanges.complete();
170
190
  this._unsubscribeAll.next(void 0);
171
191
  this._unsubscribeAll.complete();
172
192
  }
193
+ get placeholder() {
194
+ return this._placeholder;
195
+ }
196
+ set placeholder(value) {
197
+ this._placeholder = value;
198
+ this.stateChanges.next();
199
+ }
200
+ get value() {
201
+ return this._value;
202
+ }
203
+ set value(value) {
204
+ if (value !== this.value) {
205
+ this._value = value;
206
+ this.stateChanges.next();
207
+ this._onModelChange(value);
208
+ }
209
+ }
210
+ get empty() {
211
+ return !this._value;
212
+ }
213
+ get errorState() {
214
+ if (this.ngControl == null)
215
+ return false;
216
+ return (this.touched && this.ngControl?.invalid) ?? false;
217
+ }
218
+ get shouldLabelFloat() {
219
+ return this.focused || !this.empty;
220
+ }
221
+ get required() { return this._required; }
222
+ set required(value) {
223
+ this._required = coerceBooleanProperty(value);
224
+ this.stateChanges.next();
225
+ }
226
+ get disabled() {
227
+ if (this.ngControl && this.ngControl.disabled !== null) {
228
+ return this.ngControl.disabled;
229
+ }
230
+ return this._disabled;
231
+ }
232
+ set disabled(value) {
233
+ this._disabled = coerceBooleanProperty(value);
234
+ if (this.focused) {
235
+ this.focused = false;
236
+ this.stateChanges.next();
237
+ }
238
+ }
173
239
  registerOnChange(fn) {
174
- const proxyFn = (value) => {
175
- fn(value);
176
- };
177
- this._matSelect.registerOnChange(proxyFn);
240
+ this._onModelChange = fn;
178
241
  }
179
242
  registerOnTouched(fn) {
180
- this._matSelect.registerOnTouched(fn);
243
+ this._onTouchedChange = fn;
181
244
  }
182
245
  setDisabledState(isDisabled) {
183
- this._matSelect.setDisabledState(isDisabled);
246
+ this._matSelect?.setDisabledState(isDisabled);
184
247
  }
185
- writeValue(value) {
186
- if (!isNil(value)) {
187
- this._updateChecklistSelection(value);
188
- }
189
- else {
190
- this.checklistSelection.clear();
248
+ setDescribedByIds(ids) {
249
+ this._matSelect?.setDescribedByIds(ids);
250
+ }
251
+ onContainerClick() {
252
+ if (!this.focused) {
253
+ this._matSelect?.focus();
191
254
  }
192
- if (this.multiple) {
193
- this._matSelect.writeValue(this.checklistSelection.selected);
194
- if (this._matSelect.value !== this.checklistSelection.selected) {
195
- this._matSelect.value = this.checklistSelection.selected;
196
- }
255
+ }
256
+ onFocusIn() {
257
+ if (!this.focused) {
258
+ this.focused = true;
259
+ this.stateChanges.next();
197
260
  }
198
- else {
199
- this._matSelect.writeValue(this.checklistSelection.selected[0]);
200
- if (this._matSelect.value !== this.checklistSelection.selected[0]) {
201
- this._matSelect.value = this.checklistSelection.selected[0];
202
- }
261
+ }
262
+ onFocusOut(event) {
263
+ if (!this._matSelect.panel.nativeElement.contains(event.relatedTarget)) {
264
+ this.touched = true;
265
+ this.focused = false;
266
+ this._onTouchedChange();
267
+ this.stateChanges.next();
203
268
  }
204
269
  }
270
+ writeValue(value) {
271
+ this._init(value);
272
+ }
205
273
  simpleTriggerLabelFn(value) {
206
274
  return value.map((node) => {
207
275
  if (isNil(node)) {
@@ -229,7 +297,7 @@ class CmatSelectTreeComponent {
229
297
  descendantsPartiallySelected(node) {
230
298
  const descendants = this.treeControl.getDescendants(node);
231
299
  const result = descendants.some(child => this.checklistSelection.isSelected(child));
232
- return result && !this.descendantsAllSelected(node);
300
+ return result && !descendants.every(child => this.checklistSelection.isSelected(child));
233
301
  }
234
302
  /** Toggle the to-do item selection. Select/deselect all the descendants node */
235
303
  todoItemSelectionToggle(event, node) {
@@ -237,12 +305,17 @@ class CmatSelectTreeComponent {
237
305
  if (this.multiple) {
238
306
  this.checklistSelection.toggle(node);
239
307
  const descendants = this.treeControl.getDescendants(node);
240
- this.checklistSelection.isSelected(node) ? this.checklistSelection.select(...descendants) : this.checklistSelection.deselect(...descendants);
241
- this.checkAllParentsSelection(node);
242
- if (this.showToggleAllCheckbox) {
243
- this.isIndeterminate = this.checklistSelection.selected.length < this.dataCount && this.checklistSelection.selected.length > 0;
244
- this.isChecked = this.checklistSelection.selected.length === this.dataCount;
308
+ const diffCount = descendants.filter(child => this.checklistSelection.isSelected(child)).length;
309
+ if (this.checklistSelection.isSelected(node)) {
310
+ this.checklistSelection.select(...descendants);
311
+ this.checkCount = this.checkCount + 1 + descendants.length - diffCount;
312
+ }
313
+ else {
314
+ this.checklistSelection.deselect(...descendants);
315
+ this.checkCount = this.checkCount - 1 - descendants.length;
245
316
  }
317
+ this._checkAllParentsSelection(node);
318
+ this._updateCheckState();
246
319
  }
247
320
  else {
248
321
  this.checklistSelection.clear();
@@ -255,11 +328,9 @@ class CmatSelectTreeComponent {
255
328
  event.stopPropagation();
256
329
  if (this.multiple) {
257
330
  this.checklistSelection.toggle(node);
258
- this.checkAllParentsSelection(node);
259
- if (this.showToggleAllCheckbox) {
260
- this.isIndeterminate = this.checklistSelection.selected.length < this.dataCount && this.checklistSelection.selected.length > 0;
261
- this.isChecked = this.checklistSelection.selected.length === this.dataCount;
262
- }
331
+ this.checklistSelection.isSelected(node) ? this.checkCount += 1 : this.checkCount -= 1;
332
+ this._checkAllParentsSelection(node);
333
+ this._updateCheckState();
263
334
  }
264
335
  else {
265
336
  this.checklistSelection.clear();
@@ -269,31 +340,105 @@ class CmatSelectTreeComponent {
269
340
  }
270
341
  clearSelection() {
271
342
  this.checklistSelection.clear();
343
+ this.isChecked = false;
344
+ this.isIndeterminate = false;
345
+ this.checkCount = 0;
346
+ this.value = null;
347
+ this._matSelect.writeValue(null);
348
+ this._matSelect._onChange(null);
349
+ }
350
+ toggleSelectAll(selectAllValue) {
351
+ if (selectAllValue) {
352
+ this.treeControl.dataNodes.forEach((node) => {
353
+ this.checklistSelection.select(node);
354
+ });
355
+ this.isIndeterminate = false;
356
+ this.isChecked = true;
357
+ this.checkCount = this.checklistSelection.selected.length;
358
+ }
359
+ else {
360
+ this.checklistSelection.clear();
361
+ this.isChecked = false;
362
+ this.isIndeterminate = false;
363
+ this.checkCount = 0;
364
+ }
365
+ }
366
+ compareObjects(o1, o2) {
367
+ return o1 && o2 ? o1?.name === o2?.name && o1?.id === o2?.id : o1 === o2;
368
+ }
369
+ trackByFn(index, item) {
370
+ return index || item;
371
+ }
372
+ _init(v) {
373
+ if (this.dataSource.length > 0 && this.treeControl.dataNodes && this._matSelect) {
374
+ if (this.expandable) {
375
+ this.treeControl.expandAll();
376
+ }
377
+ if (!isNil(v)) {
378
+ this._updateChecklistSelection(v);
379
+ }
380
+ else {
381
+ this.checklistSelection.clear();
382
+ }
383
+ if (v && v.length > 0) {
384
+ if (this.multiple) {
385
+ const findOutNode = [];
386
+ this.checklistSelection.selected.forEach((node) => {
387
+ const parentNode = this._getParentNode(node);
388
+ if (parentNode && this.checklistSelection.isSelected(parentNode)) {
389
+ findOutNode.push(node);
390
+ }
391
+ });
392
+ findOutNode.forEach((node) => {
393
+ this.checklistSelection.deselect(node);
394
+ });
395
+ this.value = this.checklistSelection.selected;
396
+ this.checkCount = this.checklistSelection.selected.length;
397
+ }
398
+ else {
399
+ this.value = this.checklistSelection.selected;
400
+ this.checkCount = 1;
401
+ }
402
+ }
403
+ else {
404
+ this.value = v;
405
+ this.checkCount = 0;
406
+ }
407
+ this._matSelect.writeValue(this.value);
408
+ this._matSelect._onChange(this.value);
409
+ this._updateCheckState();
410
+ this._changeDetectorRef.markForCheck();
411
+ }
412
+ else {
413
+ this.value = v;
414
+ }
272
415
  }
273
416
  /* Checks all the parents when a leaf node is selected/unselected */
274
- checkAllParentsSelection(node) {
275
- let parent = this.getParentNode(node);
417
+ _checkAllParentsSelection(node) {
418
+ let parent = this._getParentNode(node);
276
419
  while (parent) {
277
420
  parent.expandable = true;
278
421
  this.treeControl.expand(parent);
279
- this.checkRootNodeSelection(parent);
280
- parent = this.getParentNode(parent);
422
+ this._checkRootNodeSelection(parent);
423
+ parent = this._getParentNode(parent);
281
424
  }
282
425
  }
283
426
  /** Check root node checked state and change it accordingly */
284
- checkRootNodeSelection(node) {
427
+ _checkRootNodeSelection(node) {
285
428
  const nodeSelected = this.checklistSelection.isSelected(node);
286
429
  const descendants = this.treeControl.getDescendants(node);
287
430
  const descAllSelected = descendants.every(child => this.checklistSelection.isSelected(child));
288
431
  if (nodeSelected && !descAllSelected) {
289
432
  this.checklistSelection.deselect(node);
433
+ this.checkCount -= 1;
290
434
  }
291
435
  else if (!nodeSelected && (descAllSelected || descendants.length === 0)) {
292
436
  this.checklistSelection.select(node);
437
+ this.checkCount += 1;
293
438
  }
294
439
  }
295
440
  /* Get the parent node of a node */
296
- getParentNode(node) {
441
+ _getParentNode(node) {
297
442
  const currentLevel = this.getLevel(node);
298
443
  if (currentLevel < 1) {
299
444
  return null;
@@ -307,27 +452,6 @@ class CmatSelectTreeComponent {
307
452
  }
308
453
  return null;
309
454
  }
310
- toggleSelectAll(selectAllValue) {
311
- if (selectAllValue) {
312
- this.treeControl.dataNodes.forEach((node) => {
313
- this.checklistSelection.select(node);
314
- this.checkAllParentsSelection(node);
315
- });
316
- this.isIndeterminate = this.checklistSelection.selected.length < this.dataCount && this.checklistSelection.selected.length > 0;
317
- this.isChecked = this.checklistSelection.selected.length === this.dataCount;
318
- }
319
- else {
320
- this.checklistSelection.clear();
321
- this.isChecked = false;
322
- this.isIndeterminate = false;
323
- }
324
- }
325
- compareObjects(o1, o2) {
326
- return o1 && o2 ? o1?.name === o2?.name && o1?.id === o2?.id : o1 === o2;
327
- }
328
- trackByFn(index, item) {
329
- return index || item;
330
- }
331
455
  _updateChecklistSelection(value) {
332
456
  this.checklistSelection.clear();
333
457
  if (!isNil(value)) {
@@ -344,6 +468,7 @@ class CmatSelectTreeComponent {
344
468
  _updateSelect(value) {
345
469
  if (!isNil(value)) {
346
470
  const valueArray = !Array.isArray(value) ? [value] : value;
471
+ this.checkCount = 0;
347
472
  if (this.overallSearchEnabled) //有搜索功能,转化选中节点为当前数据源节点
348
473
  {
349
474
  valueArray.forEach((item) => {
@@ -351,19 +476,17 @@ class CmatSelectTreeComponent {
351
476
  if (isNil(nodeFound)) {
352
477
  return;
353
478
  }
479
+ this.checkCount += 1;
354
480
  this.checklistSelection.deselect(item);
355
481
  this.checklistSelection.select(nodeFound);
356
482
  });
357
483
  }
358
484
  if (this.multiple) {
359
485
  this.checklistSelection.selected.forEach((item) => {
360
- this.checkAllParentsSelection(item);
486
+ this._checkAllParentsSelection(item);
361
487
  });
362
488
  }
363
- if (this.showToggleAllCheckbox) {
364
- this.isIndeterminate = this.checklistSelection.selected.length < this.dataCount && this.checklistSelection.selected.length > 0;
365
- this.isChecked = this.checklistSelection.selected.length === this.dataCount;
366
- }
489
+ this._updateCheckState();
367
490
  }
368
491
  }
369
492
  _applyColumnLevelFilters(node, filter) {
@@ -386,46 +509,36 @@ class CmatSelectTreeComponent {
386
509
  }
387
510
  return result;
388
511
  }
389
- _resetFilters() {
390
- if (this.overallSearchEnabled) {
391
- this.overallFilterControl.setValue('');
512
+ _updateCheckState() {
513
+ if (this.showToggleAllCheckbox && this.dataSource.length > 0) {
514
+ this.isIndeterminate = this.checkCount < this.treeControl.dataNodes.length && this.checkCount > 0;
515
+ this.isChecked = this.checkCount === this.treeControl.dataNodes.length && this.checkCount > 0;
392
516
  }
393
517
  }
394
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.4", ngImport: i0, type: CmatSelectTreeComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
395
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.2.4", type: CmatSelectTreeComponent, isStandalone: true, selector: "cmat-select-tree", inputs: { dataSource: "dataSource", showLabel: "showLabel", noEntriesFoundLabel: "noEntriesFoundLabel", showNoFoundLabel: "showNoFoundLabel", placeholder: "placeholder", prefixIcon: "prefixIcon", multiple: "multiple", required: "required", overallSearchEnabled: "overallSearchEnabled", canNull: "canNull", customTriggerLabelFn: "customTriggerLabelFn", customTriggerLabelTemplate: "customTriggerLabelTemplate", expandable: "expandable", showToggleAllCheckbox: "showToggleAllCheckbox" }, providers: [
396
- {
397
- provide: NG_VALUE_ACCESSOR,
398
- useExisting: forwardRef(() => CmatSelectTreeComponent),
399
- multi: true
400
- }
401
- ], viewQueries: [{ propertyName: "_matSelect", first: true, predicate: ["componentSelect"], descendants: true, static: true }], ngImport: i0, template: "<mat-form-field class=\"w-full\">\n @if (showLabel) {\n <mat-label>{{placeholder}}</mat-label>\n }\n <mat-icon class=\"icon-size-5\" [svgIcon]=\"prefixIcon\" matPrefix></mat-icon>\n <mat-select #componentSelect [formControl]=\"selectControl\" [placeholder]=\"placeholder\" [multiple]=\"multiple\" [required]=\"required\"\n [compareWith]=\"compareObjects\" panelClass=\"scrollbar-custom\">\n <mat-select-trigger>\n @if (!customTriggerLabelFn) {\n {{simpleTriggerLabelFn(checklistSelection.selected)}}\n }\n @else{\n {{customTriggerLabelFn}}\n }\n </mat-select-trigger>\n\n <div>\n @if (overallSearchEnabled) {\n <mat-option>\n <cmat-select-search [showNoFoundLabel]=\"showNoFoundLabel\" [noEntriesFoundLabel]=\"noEntriesFoundLabel\"\n [formControl]=\"overallFilterControl\" [clearSearchInput]=\"true\"\n [toggleAllCheckboxIndeterminate]=\"isIndeterminate\" [toggleAllCheckboxChecked]=\"isChecked\"\n (toggleAll)=\"toggleSelectAll($event)\" [showToggleAllCheckbox]=\"showToggleAllCheckbox\">\n </cmat-select-search>\n </mat-option>\n }\n @if (canNull&&treeDataSource.data.length!==0) {\n <mat-option (click)=\"clearSelection()\">\u7A7A</mat-option>\n }\n @for (selectData of matSelectData | async ; track trackByFn($index, selectData)) {\n <mat-option class=\"hidden\"\n [value]=\"selectData\">{{selectData.name}}</mat-option>\n }\n\n <mat-tree [dataSource]=\"treeDataSource\" [treeControl]=\"treeControl\">\n <mat-tree-node *matTreeNodeDef=\"let node\" matTreeNodeToggle matTreeNodePadding\n [ngClass]=\"checklistSelection.isSelected(node)?'selected':''\"\n (click)=\"todoLeafItemSelectionToggle($event,node)\">\n <button type=\"button\" mat-icon-button disabled>\n\n </button>\n @if (multiple) {\n <mat-checkbox class=\"checklist-leaf-node text-current\"\n [checked]=\"checklistSelection.isSelected(node)\">{{node.name}}</mat-checkbox>\n }\n @if (!multiple) {\n <span class=\"text-current\">{{node.name}}</span>\n }\n </mat-tree-node>\n\n <mat-tree-node *matTreeNodeDef=\"let node; when: hasChild\" matTreeNodePadding\n [ngClass]=\"checklistSelection.isSelected(node)?'selected':''\"\n (click)=\"todoItemSelectionToggle($event,node)\">\n <button type=\"button\" mat-icon-button matTreeNodeToggle\n [attr.aria-label]=\"'toggle ' + node.filename\">\n <mat-icon class=\"mat-icon-rtl-mirror\"\n [svgIcon]=\"treeControl.isExpanded(node) ? 'mat_outline:expand_more' : 'mat_outline:chevron_right'\">\n </mat-icon>\n </button>\n @if (multiple) {\n <mat-checkbox [checked]=\"descendantsAllSelected(node)\"\n [indeterminate]=\"descendantsPartiallySelected(node)\" class=\"text-current\">{{node.name}}</mat-checkbox>\n }\n @if (!multiple) {\n <span class=\"text-current\">{{node.name}}</span>\n }\n </mat-tree-node>\n </mat-tree>\n </div>\n </mat-select>\n</mat-form-field>", styles: ["cmat-select-tree{display:block;z-index:101}cmat-select-tree.hidden{display:none}cmat-select-tree .cmat-select-search-inner{overflow:hidden;position:fixed;line-height:45px;display:flex;flex-direction:row}cmat-select-tree .cmat-select-search-inner span{display:flex;place-items:center}cmat-select-tree .cmat-select-search-no-entries-found{width:100%;text-align:center;border-radius:.25rem;box-shadow:0 2px 8px #00000059}cmat-select-tree .cmat-select-search-input{padding-top:0;padding-bottom:0;height:48px;line-height:48px}cmat-select-tree .cmat-select-search-clear{top:3px;margin:0 10px}cmat-select-tree .cmat-select-search-icon{margin-right:0;margin-left:10px}cmat-select-tree .mat-mdc-option-pseudo-checkbox{display:none}cmat-select-tree .mat-tree-node{cursor:pointer}\n"], dependencies: [{ kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i1.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i3.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: "directive", type: i3.MatSelectTrigger, selector: "mat-select-trigger" }, { kind: "component", type: i4.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { 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: FormsModule }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i5.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatTreeModule }, { kind: "directive", type: i6.MatTreeNodeDef, selector: "[matTreeNodeDef]", inputs: ["matTreeNodeDefWhen", "matTreeNode"] }, { kind: "directive", type: i6.MatTreeNodePadding, selector: "[matTreeNodePadding]", inputs: ["matTreeNodePadding", "matTreeNodePaddingIndent"] }, { kind: "directive", type: i6.MatTreeNodeToggle, selector: "[matTreeNodeToggle]", inputs: ["matTreeNodeToggleRecursive"] }, { kind: "component", type: i6.MatTree, selector: "mat-tree", exportAs: ["matTree"] }, { kind: "directive", type: i6.MatTreeNode, selector: "mat-tree-node", inputs: ["disabled", "tabIndex"], exportAs: ["matTreeNode"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i7.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i8.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, encapsulation: i0.ViewEncapsulation.None }); }
518
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatSelectTreeComponent, deps: [{ token: i1.NgControl, optional: true, self: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
519
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.7", type: CmatSelectTreeComponent, isStandalone: true, selector: "cmat-select-tree", inputs: { id: "id", dataSource: "dataSource", noEntriesFoundLabel: "noEntriesFoundLabel", showNoFoundLabel: "showNoFoundLabel", multiple: "multiple", overallSearchEnabled: "overallSearchEnabled", canNull: "canNull", customTriggerLabelFn: "customTriggerLabelFn", customTriggerLabelTemplate: "customTriggerLabelTemplate", expandable: "expandable", showToggleAllCheckbox: "showToggleAllCheckbox", placeholder: "placeholder", value: "value", required: "required", disabled: "disabled" }, host: { listeners: { "document:click": "clickedOut()" }, properties: { "attr.id": "this.id" } }, providers: [{ provide: MatFormFieldControl, useExisting: CmatSelectTreeComponent }], viewQueries: [{ propertyName: "matSelect", first: true, predicate: ["componentSelect"], descendants: true }], exportAs: ["cmatSelectTree"], usesOnChanges: true, ngImport: i0, template: "@if(multiple){\n<mat-select #componentSelect [placeholder]=\"placeholder\" multiple [required]=\"required\" [formControl]=\"selectControl\"\n [compareWith]=\"compareObjects\" (focusin)=\"onFocusIn()\"\n panelClass=\"overflow-y-auto lg:overflow-y-hidden lg:hover:overflow-y-auto scrollbar-custom\">\n <mat-select-trigger>\n @if (!customTriggerLabelFn) {\n {{simpleTriggerLabelFn(checklistSelection.selected)}}\n }\n @else{\n {{customTriggerLabelFn}}\n }\n </mat-select-trigger>\n\n <div (focusout)=\"onFocusOut($event)\">\n @if (overallSearchEnabled) {\n <mat-option>\n <cmat-select-search [showNoFoundLabel]=\"showNoFoundLabel\" [noEntriesFoundLabel]=\"noEntriesFoundLabel\"\n [formControl]=\"overallFilterControl\" [clearSearchInput]=\"true\"\n [toggleAllCheckboxIndeterminate]=\"isIndeterminate\" [toggleAllCheckboxChecked]=\"isChecked\"\n (toggleAll)=\"toggleSelectAll($event)\" [showToggleAllCheckbox]=\"showToggleAllCheckbox&&multiple\">\n </cmat-select-search>\n </mat-option>\n }\n @if (canNull&&treeDataSource.data.length!==0) {\n <mat-option (click)=\"clearSelection()\" class=\"pl-10\">\u7A7A</mat-option>\n }\n @for (selectData of matSelectData | async ; track trackByFn($index, selectData)) {\n <mat-option class=\"hidden\" [value]=\"selectData\">{{selectData.name}}</mat-option>\n }\n\n <mat-tree [dataSource]=\"treeDataSource\" [treeControl]=\"treeControl\">\n <mat-tree-node *matTreeNodeDef=\"let node\" matTreeNodeToggle matTreeNodePadding\n [ngClass]=\"checklistSelection.isSelected(node)?'selected':''\"\n (click)=\"todoLeafItemSelectionToggle($event,node)\">\n <button type=\"button\" mat-icon-button disabled>\n\n </button>\n @if (multiple) {\n <mat-checkbox class=\"checklist-leaf-node text-current\" [color]=\"'primary'\"\n [checked]=\"checklistSelection.isSelected(node)\">{{node.name}}</mat-checkbox>\n }\n @else{\n <span class=\"text-current\">{{node.name}}</span>\n }\n </mat-tree-node>\n\n <mat-tree-node *matTreeNodeDef=\"let node; when: hasChild\" matTreeNodePadding\n [ngClass]=\"checklistSelection.isSelected(node)?'selected':''\" (click)=\"todoItemSelectionToggle($event,node)\">\n <button type=\"button\" mat-icon-button matTreeNodeToggle [attr.aria-label]=\"'toggle ' + node.name\">\n <mat-icon class=\"mat-icon-rtl-mirror\"\n [svgIcon]=\"treeControl.isExpanded(node) ? 'mat_outline:expand_more' : 'mat_outline:chevron_right'\">\n </mat-icon>\n </button>\n @if (multiple) {\n <mat-checkbox [checked]=\"descendantsAllSelected(node)\" [color]=\"'primary'\"\n [indeterminate]=\"descendantsPartiallySelected(node)\" class=\"text-current\">{{node.name}}</mat-checkbox>\n }\n @else {\n <span class=\"text-current\">{{node.name}}</span>\n }\n </mat-tree-node>\n </mat-tree>\n </div>\n</mat-select>\n}\n@else {\n<mat-select #componentSelect [placeholder]=\"placeholder\" [required]=\"required\" [formControl]=\"selectControl\"\n [compareWith]=\"compareObjects\" (focusin)=\"onFocusIn()\"\n panelClass=\"overflow-y-auto lg:overflow-y-hidden lg:hover:overflow-y-auto scrollbar-custom\">\n <mat-select-trigger>\n @if (!customTriggerLabelFn) {\n {{simpleTriggerLabelFn(checklistSelection.selected)}}\n }\n @else{\n {{customTriggerLabelFn}}\n }\n </mat-select-trigger>\n\n <div (focusout)=\"onFocusOut($event)\">\n @if (overallSearchEnabled) {\n <mat-option>\n <cmat-select-search [showNoFoundLabel]=\"showNoFoundLabel\" [noEntriesFoundLabel]=\"noEntriesFoundLabel\"\n [formControl]=\"overallFilterControl\" [clearSearchInput]=\"true\"\n [toggleAllCheckboxIndeterminate]=\"isIndeterminate\" [toggleAllCheckboxChecked]=\"isChecked\"\n (toggleAll)=\"toggleSelectAll($event)\" [showToggleAllCheckbox]=\"showToggleAllCheckbox&&multiple\">\n </cmat-select-search>\n </mat-option>\n }\n @if (canNull&&treeDataSource.data.length!==0) {\n <mat-option (click)=\"clearSelection()\" class=\"pl-10\">\u7A7A</mat-option>\n }\n @for (selectData of matSelectData | async ; track trackByFn($index, selectData)) {\n <mat-option class=\"hidden\" [value]=\"selectData\">{{selectData.name}}</mat-option>\n }\n\n <mat-tree [dataSource]=\"treeDataSource\" [treeControl]=\"treeControl\">\n <mat-tree-node *matTreeNodeDef=\"let node\" matTreeNodeToggle matTreeNodePadding\n [ngClass]=\"checklistSelection.isSelected(node)?'selected':''\"\n (click)=\"todoLeafItemSelectionToggle($event,node)\">\n <button type=\"button\" mat-icon-button disabled>\n\n </button>\n @if (multiple) {\n <mat-checkbox class=\"checklist-leaf-node text-current\" [color]=\"'primary'\"\n [checked]=\"checklistSelection.isSelected(node)\">{{node.name}}</mat-checkbox>\n }\n @else{\n <span class=\"text-current\">{{node.name}}</span>\n }\n </mat-tree-node>\n\n <mat-tree-node *matTreeNodeDef=\"let node; when: hasChild\" matTreeNodePadding\n [ngClass]=\"checklistSelection.isSelected(node)?'selected':''\" (click)=\"todoItemSelectionToggle($event,node)\">\n <button type=\"button\" mat-icon-button matTreeNodeToggle [attr.aria-label]=\"'toggle ' + node.name\">\n <mat-icon class=\"mat-icon-rtl-mirror\"\n [svgIcon]=\"treeControl.isExpanded(node) ? 'mat_outline:expand_more' : 'mat_outline:chevron_right'\">\n </mat-icon>\n </button>\n @if (multiple) {\n <mat-checkbox [checked]=\"descendantsAllSelected(node)\" [color]=\"'primary'\"\n [indeterminate]=\"descendantsPartiallySelected(node)\" class=\"text-current\">{{node.name}}</mat-checkbox>\n }\n @else {\n <span class=\"text-current\">{{node.name}}</span>\n }\n </mat-tree-node>\n </mat-tree>\n </div>\n</mat-select>\n}", styles: ["cmat-select-tree{display:block;width:100%;z-index:101}cmat-select-tree.hidden{display:none}cmat-select-tree .cmat-select-search-inner{overflow:hidden;position:fixed;line-height:45px;display:flex;flex-direction:row}cmat-select-tree .cmat-select-search-inner span{display:flex;place-items:center}cmat-select-tree .cmat-select-search-no-entries-found{width:100%;text-align:center;border-radius:.25rem;box-shadow:0 2px 8px #00000059}cmat-select-tree .cmat-select-search-input{padding-top:0;padding-bottom:0;height:48px;line-height:48px}cmat-select-tree .cmat-select-search-clear{top:3px;margin:0 10px}cmat-select-tree .cmat-select-search-icon{margin-right:0;margin-left:10px}cmat-select-tree .mat-mdc-option-pseudo-checkbox{display:none}cmat-select-tree .mat-tree-node{cursor:pointer}\n"], dependencies: [{ kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i3.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: "directive", type: i3.MatSelectTrigger, selector: "mat-select-trigger" }, { kind: "component", type: i4.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { 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: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatTreeModule }, { kind: "directive", type: i5.MatTreeNodeDef, selector: "[matTreeNodeDef]", inputs: ["matTreeNodeDefWhen", "matTreeNode"] }, { kind: "directive", type: i5.MatTreeNodePadding, selector: "[matTreeNodePadding]", inputs: ["matTreeNodePadding", "matTreeNodePaddingIndent"] }, { kind: "directive", type: i5.MatTreeNodeToggle, selector: "[matTreeNodeToggle]", inputs: ["matTreeNodeToggleRecursive"] }, { kind: "component", type: i5.MatTree, selector: "mat-tree", exportAs: ["matTree"] }, { kind: "directive", type: i5.MatTreeNode, selector: "mat-tree-node", inputs: ["disabled", "tabIndex"], exportAs: ["matTreeNode"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i6.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i7.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, encapsulation: i0.ViewEncapsulation.None }); }
402
520
  }
403
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.4", ngImport: i0, type: CmatSelectTreeComponent, decorators: [{
521
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: CmatSelectTreeComponent, decorators: [{
404
522
  type: Component,
405
- args: [{ selector: 'cmat-select-tree', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [
406
- {
407
- provide: NG_VALUE_ACCESSOR,
408
- useExisting: forwardRef(() => CmatSelectTreeComponent),
409
- multi: true
410
- }
411
- ], standalone: true, imports: [MatFormFieldModule, MatIconModule, MatSelectModule, CmatSelectSearchComponent, FormsModule,
412
- ReactiveFormsModule, MatTreeModule, NgClass, MatButtonModule, MatCheckboxModule, AsyncPipe, NgStyle], template: "<mat-form-field class=\"w-full\">\n @if (showLabel) {\n <mat-label>{{placeholder}}</mat-label>\n }\n <mat-icon class=\"icon-size-5\" [svgIcon]=\"prefixIcon\" matPrefix></mat-icon>\n <mat-select #componentSelect [formControl]=\"selectControl\" [placeholder]=\"placeholder\" [multiple]=\"multiple\" [required]=\"required\"\n [compareWith]=\"compareObjects\" panelClass=\"scrollbar-custom\">\n <mat-select-trigger>\n @if (!customTriggerLabelFn) {\n {{simpleTriggerLabelFn(checklistSelection.selected)}}\n }\n @else{\n {{customTriggerLabelFn}}\n }\n </mat-select-trigger>\n\n <div>\n @if (overallSearchEnabled) {\n <mat-option>\n <cmat-select-search [showNoFoundLabel]=\"showNoFoundLabel\" [noEntriesFoundLabel]=\"noEntriesFoundLabel\"\n [formControl]=\"overallFilterControl\" [clearSearchInput]=\"true\"\n [toggleAllCheckboxIndeterminate]=\"isIndeterminate\" [toggleAllCheckboxChecked]=\"isChecked\"\n (toggleAll)=\"toggleSelectAll($event)\" [showToggleAllCheckbox]=\"showToggleAllCheckbox\">\n </cmat-select-search>\n </mat-option>\n }\n @if (canNull&&treeDataSource.data.length!==0) {\n <mat-option (click)=\"clearSelection()\">\u7A7A</mat-option>\n }\n @for (selectData of matSelectData | async ; track trackByFn($index, selectData)) {\n <mat-option class=\"hidden\"\n [value]=\"selectData\">{{selectData.name}}</mat-option>\n }\n\n <mat-tree [dataSource]=\"treeDataSource\" [treeControl]=\"treeControl\">\n <mat-tree-node *matTreeNodeDef=\"let node\" matTreeNodeToggle matTreeNodePadding\n [ngClass]=\"checklistSelection.isSelected(node)?'selected':''\"\n (click)=\"todoLeafItemSelectionToggle($event,node)\">\n <button type=\"button\" mat-icon-button disabled>\n\n </button>\n @if (multiple) {\n <mat-checkbox class=\"checklist-leaf-node text-current\"\n [checked]=\"checklistSelection.isSelected(node)\">{{node.name}}</mat-checkbox>\n }\n @if (!multiple) {\n <span class=\"text-current\">{{node.name}}</span>\n }\n </mat-tree-node>\n\n <mat-tree-node *matTreeNodeDef=\"let node; when: hasChild\" matTreeNodePadding\n [ngClass]=\"checklistSelection.isSelected(node)?'selected':''\"\n (click)=\"todoItemSelectionToggle($event,node)\">\n <button type=\"button\" mat-icon-button matTreeNodeToggle\n [attr.aria-label]=\"'toggle ' + node.filename\">\n <mat-icon class=\"mat-icon-rtl-mirror\"\n [svgIcon]=\"treeControl.isExpanded(node) ? 'mat_outline:expand_more' : 'mat_outline:chevron_right'\">\n </mat-icon>\n </button>\n @if (multiple) {\n <mat-checkbox [checked]=\"descendantsAllSelected(node)\"\n [indeterminate]=\"descendantsPartiallySelected(node)\" class=\"text-current\">{{node.name}}</mat-checkbox>\n }\n @if (!multiple) {\n <span class=\"text-current\">{{node.name}}</span>\n }\n </mat-tree-node>\n </mat-tree>\n </div>\n </mat-select>\n</mat-form-field>", styles: ["cmat-select-tree{display:block;z-index:101}cmat-select-tree.hidden{display:none}cmat-select-tree .cmat-select-search-inner{overflow:hidden;position:fixed;line-height:45px;display:flex;flex-direction:row}cmat-select-tree .cmat-select-search-inner span{display:flex;place-items:center}cmat-select-tree .cmat-select-search-no-entries-found{width:100%;text-align:center;border-radius:.25rem;box-shadow:0 2px 8px #00000059}cmat-select-tree .cmat-select-search-input{padding-top:0;padding-bottom:0;height:48px;line-height:48px}cmat-select-tree .cmat-select-search-clear{top:3px;margin:0 10px}cmat-select-tree .cmat-select-search-icon{margin-right:0;margin-left:10px}cmat-select-tree .mat-mdc-option-pseudo-checkbox{display:none}cmat-select-tree .mat-tree-node{cursor:pointer}\n"] }]
413
- }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { dataSource: [{
523
+ args: [{ selector: 'cmat-select-tree', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [{ provide: MatFormFieldControl, useExisting: CmatSelectTreeComponent }], exportAs: 'cmatSelectTree', standalone: true, imports: [MatIconModule, MatSelectModule, CmatSelectSearchComponent,
524
+ ReactiveFormsModule, MatTreeModule, NgClass, MatButtonModule, MatCheckboxModule, AsyncPipe, NgStyle], template: "@if(multiple){\n<mat-select #componentSelect [placeholder]=\"placeholder\" multiple [required]=\"required\" [formControl]=\"selectControl\"\n [compareWith]=\"compareObjects\" (focusin)=\"onFocusIn()\"\n panelClass=\"overflow-y-auto lg:overflow-y-hidden lg:hover:overflow-y-auto scrollbar-custom\">\n <mat-select-trigger>\n @if (!customTriggerLabelFn) {\n {{simpleTriggerLabelFn(checklistSelection.selected)}}\n }\n @else{\n {{customTriggerLabelFn}}\n }\n </mat-select-trigger>\n\n <div (focusout)=\"onFocusOut($event)\">\n @if (overallSearchEnabled) {\n <mat-option>\n <cmat-select-search [showNoFoundLabel]=\"showNoFoundLabel\" [noEntriesFoundLabel]=\"noEntriesFoundLabel\"\n [formControl]=\"overallFilterControl\" [clearSearchInput]=\"true\"\n [toggleAllCheckboxIndeterminate]=\"isIndeterminate\" [toggleAllCheckboxChecked]=\"isChecked\"\n (toggleAll)=\"toggleSelectAll($event)\" [showToggleAllCheckbox]=\"showToggleAllCheckbox&&multiple\">\n </cmat-select-search>\n </mat-option>\n }\n @if (canNull&&treeDataSource.data.length!==0) {\n <mat-option (click)=\"clearSelection()\" class=\"pl-10\">\u7A7A</mat-option>\n }\n @for (selectData of matSelectData | async ; track trackByFn($index, selectData)) {\n <mat-option class=\"hidden\" [value]=\"selectData\">{{selectData.name}}</mat-option>\n }\n\n <mat-tree [dataSource]=\"treeDataSource\" [treeControl]=\"treeControl\">\n <mat-tree-node *matTreeNodeDef=\"let node\" matTreeNodeToggle matTreeNodePadding\n [ngClass]=\"checklistSelection.isSelected(node)?'selected':''\"\n (click)=\"todoLeafItemSelectionToggle($event,node)\">\n <button type=\"button\" mat-icon-button disabled>\n\n </button>\n @if (multiple) {\n <mat-checkbox class=\"checklist-leaf-node text-current\" [color]=\"'primary'\"\n [checked]=\"checklistSelection.isSelected(node)\">{{node.name}}</mat-checkbox>\n }\n @else{\n <span class=\"text-current\">{{node.name}}</span>\n }\n </mat-tree-node>\n\n <mat-tree-node *matTreeNodeDef=\"let node; when: hasChild\" matTreeNodePadding\n [ngClass]=\"checklistSelection.isSelected(node)?'selected':''\" (click)=\"todoItemSelectionToggle($event,node)\">\n <button type=\"button\" mat-icon-button matTreeNodeToggle [attr.aria-label]=\"'toggle ' + node.name\">\n <mat-icon class=\"mat-icon-rtl-mirror\"\n [svgIcon]=\"treeControl.isExpanded(node) ? 'mat_outline:expand_more' : 'mat_outline:chevron_right'\">\n </mat-icon>\n </button>\n @if (multiple) {\n <mat-checkbox [checked]=\"descendantsAllSelected(node)\" [color]=\"'primary'\"\n [indeterminate]=\"descendantsPartiallySelected(node)\" class=\"text-current\">{{node.name}}</mat-checkbox>\n }\n @else {\n <span class=\"text-current\">{{node.name}}</span>\n }\n </mat-tree-node>\n </mat-tree>\n </div>\n</mat-select>\n}\n@else {\n<mat-select #componentSelect [placeholder]=\"placeholder\" [required]=\"required\" [formControl]=\"selectControl\"\n [compareWith]=\"compareObjects\" (focusin)=\"onFocusIn()\"\n panelClass=\"overflow-y-auto lg:overflow-y-hidden lg:hover:overflow-y-auto scrollbar-custom\">\n <mat-select-trigger>\n @if (!customTriggerLabelFn) {\n {{simpleTriggerLabelFn(checklistSelection.selected)}}\n }\n @else{\n {{customTriggerLabelFn}}\n }\n </mat-select-trigger>\n\n <div (focusout)=\"onFocusOut($event)\">\n @if (overallSearchEnabled) {\n <mat-option>\n <cmat-select-search [showNoFoundLabel]=\"showNoFoundLabel\" [noEntriesFoundLabel]=\"noEntriesFoundLabel\"\n [formControl]=\"overallFilterControl\" [clearSearchInput]=\"true\"\n [toggleAllCheckboxIndeterminate]=\"isIndeterminate\" [toggleAllCheckboxChecked]=\"isChecked\"\n (toggleAll)=\"toggleSelectAll($event)\" [showToggleAllCheckbox]=\"showToggleAllCheckbox&&multiple\">\n </cmat-select-search>\n </mat-option>\n }\n @if (canNull&&treeDataSource.data.length!==0) {\n <mat-option (click)=\"clearSelection()\" class=\"pl-10\">\u7A7A</mat-option>\n }\n @for (selectData of matSelectData | async ; track trackByFn($index, selectData)) {\n <mat-option class=\"hidden\" [value]=\"selectData\">{{selectData.name}}</mat-option>\n }\n\n <mat-tree [dataSource]=\"treeDataSource\" [treeControl]=\"treeControl\">\n <mat-tree-node *matTreeNodeDef=\"let node\" matTreeNodeToggle matTreeNodePadding\n [ngClass]=\"checklistSelection.isSelected(node)?'selected':''\"\n (click)=\"todoLeafItemSelectionToggle($event,node)\">\n <button type=\"button\" mat-icon-button disabled>\n\n </button>\n @if (multiple) {\n <mat-checkbox class=\"checklist-leaf-node text-current\" [color]=\"'primary'\"\n [checked]=\"checklistSelection.isSelected(node)\">{{node.name}}</mat-checkbox>\n }\n @else{\n <span class=\"text-current\">{{node.name}}</span>\n }\n </mat-tree-node>\n\n <mat-tree-node *matTreeNodeDef=\"let node; when: hasChild\" matTreeNodePadding\n [ngClass]=\"checklistSelection.isSelected(node)?'selected':''\" (click)=\"todoItemSelectionToggle($event,node)\">\n <button type=\"button\" mat-icon-button matTreeNodeToggle [attr.aria-label]=\"'toggle ' + node.name\">\n <mat-icon class=\"mat-icon-rtl-mirror\"\n [svgIcon]=\"treeControl.isExpanded(node) ? 'mat_outline:expand_more' : 'mat_outline:chevron_right'\">\n </mat-icon>\n </button>\n @if (multiple) {\n <mat-checkbox [checked]=\"descendantsAllSelected(node)\" [color]=\"'primary'\"\n [indeterminate]=\"descendantsPartiallySelected(node)\" class=\"text-current\">{{node.name}}</mat-checkbox>\n }\n @else {\n <span class=\"text-current\">{{node.name}}</span>\n }\n </mat-tree-node>\n </mat-tree>\n </div>\n</mat-select>\n}", styles: ["cmat-select-tree{display:block;width:100%;z-index:101}cmat-select-tree.hidden{display:none}cmat-select-tree .cmat-select-search-inner{overflow:hidden;position:fixed;line-height:45px;display:flex;flex-direction:row}cmat-select-tree .cmat-select-search-inner span{display:flex;place-items:center}cmat-select-tree .cmat-select-search-no-entries-found{width:100%;text-align:center;border-radius:.25rem;box-shadow:0 2px 8px #00000059}cmat-select-tree .cmat-select-search-input{padding-top:0;padding-bottom:0;height:48px;line-height:48px}cmat-select-tree .cmat-select-search-clear{top:3px;margin:0 10px}cmat-select-tree .cmat-select-search-icon{margin-right:0;margin-left:10px}cmat-select-tree .mat-mdc-option-pseudo-checkbox{display:none}cmat-select-tree .mat-tree-node{cursor:pointer}\n"] }]
525
+ }], ctorParameters: () => [{ type: i1.NgControl, decorators: [{
526
+ type: Optional
527
+ }, {
528
+ type: Self
529
+ }] }, { type: i0.ChangeDetectorRef }], propDecorators: { id: [{
530
+ type: HostBinding,
531
+ args: ['attr.id']
532
+ }, {
414
533
  type: Input
415
- }], showLabel: [{
534
+ }], dataSource: [{
416
535
  type: Input
417
536
  }], noEntriesFoundLabel: [{
418
537
  type: Input
419
538
  }], showNoFoundLabel: [{
420
539
  type: Input
421
- }], placeholder: [{
422
- type: Input
423
- }], prefixIcon: [{
424
- type: Input
425
540
  }], multiple: [{
426
541
  type: Input
427
- }], required: [{
428
- type: Input
429
542
  }], overallSearchEnabled: [{
430
543
  type: Input
431
544
  }], canNull: [{
@@ -438,9 +551,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.4", ngImpor
438
551
  type: Input
439
552
  }], showToggleAllCheckbox: [{
440
553
  type: Input
441
- }], _matSelect: [{
554
+ }], matSelect: [{
442
555
  type: ViewChild,
443
- args: ['componentSelect', { static: true }]
556
+ args: ['componentSelect', { static: false }]
557
+ }], clickedOut: [{
558
+ type: HostListener,
559
+ args: ['document:click']
560
+ }], placeholder: [{
561
+ type: Input
562
+ }], value: [{
563
+ type: Input
564
+ }], required: [{
565
+ type: Input
566
+ }], disabled: [{
567
+ type: Input
444
568
  }] } });
445
569
 
446
570
  class CmatSelectTreeNode {