cmat 0.0.111 → 0.0.112

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (256) hide show
  1. package/fesm2022/cmat-components-adapter.mjs +531 -536
  2. package/fesm2022/cmat-components-adapter.mjs.map +1 -1
  3. package/fesm2022/cmat-components-breadcrumb.mjs +521 -356
  4. package/fesm2022/cmat-components-breadcrumb.mjs.map +1 -1
  5. package/fesm2022/cmat-components-card.mjs +150 -42
  6. package/fesm2022/cmat-components-card.mjs.map +1 -1
  7. package/fesm2022/cmat-components-carousel.mjs +1120 -629
  8. package/fesm2022/cmat-components-carousel.mjs.map +1 -1
  9. package/fesm2022/cmat-components-cascade.mjs +861 -441
  10. package/fesm2022/cmat-components-cascade.mjs.map +1 -1
  11. package/fesm2022/cmat-components-chip-input.mjs +580 -335
  12. package/fesm2022/cmat-components-chip-input.mjs.map +1 -1
  13. package/fesm2022/cmat-components-code-editor.mjs +197 -105
  14. package/fesm2022/cmat-components-code-editor.mjs.map +1 -1
  15. package/fesm2022/cmat-components-color-picker.mjs +1762 -825
  16. package/fesm2022/cmat-components-color-picker.mjs.map +1 -1
  17. package/fesm2022/cmat-components-custom-formly.mjs +5196 -2531
  18. package/fesm2022/cmat-components-custom-formly.mjs.map +1 -1
  19. package/fesm2022/cmat-components-data-picker.mjs +1901 -1073
  20. package/fesm2022/cmat-components-data-picker.mjs.map +1 -1
  21. package/fesm2022/cmat-components-date-range.mjs +701 -456
  22. package/fesm2022/cmat-components-date-range.mjs.map +1 -1
  23. package/fesm2022/cmat-components-date-time-display.mjs +137 -30
  24. package/fesm2022/cmat-components-date-time-display.mjs.map +1 -1
  25. package/fesm2022/cmat-components-drawer.mjs +410 -258
  26. package/fesm2022/cmat-components-drawer.mjs.map +1 -1
  27. package/fesm2022/cmat-components-empty-state.mjs +201 -41
  28. package/fesm2022/cmat-components-empty-state.mjs.map +1 -1
  29. package/fesm2022/cmat-components-file-preview.mjs +198 -35
  30. package/fesm2022/cmat-components-file-preview.mjs.map +1 -1
  31. package/fesm2022/cmat-components-filter-toolbar.mjs +320 -72
  32. package/fesm2022/cmat-components-filter-toolbar.mjs.map +1 -1
  33. package/fesm2022/cmat-components-form-actions.mjs +102 -26
  34. package/fesm2022/cmat-components-form-actions.mjs.map +1 -1
  35. package/fesm2022/cmat-components-fullscreen.mjs +167 -47
  36. package/fesm2022/cmat-components-fullscreen.mjs.map +1 -1
  37. package/fesm2022/cmat-components-highlight.mjs +203 -112
  38. package/fesm2022/cmat-components-highlight.mjs.map +1 -1
  39. package/fesm2022/cmat-components-image-viewer.mjs +489 -215
  40. package/fesm2022/cmat-components-image-viewer.mjs.map +1 -1
  41. package/fesm2022/cmat-components-inline-loading.mjs +117 -27
  42. package/fesm2022/cmat-components-inline-loading.mjs.map +1 -1
  43. package/fesm2022/cmat-components-json-editor.mjs +276 -230
  44. package/fesm2022/cmat-components-json-editor.mjs.map +1 -1
  45. package/fesm2022/cmat-components-knob-input.mjs +615 -420
  46. package/fesm2022/cmat-components-knob-input.mjs.map +1 -1
  47. package/fesm2022/cmat-components-loading-overlay.mjs +53 -25
  48. package/fesm2022/cmat-components-loading-overlay.mjs.map +1 -1
  49. package/fesm2022/cmat-components-masonry.mjs +120 -40
  50. package/fesm2022/cmat-components-masonry.mjs.map +1 -1
  51. package/fesm2022/cmat-components-material-color-picker.mjs +332 -155
  52. package/fesm2022/cmat-components-material-color-picker.mjs.map +1 -1
  53. package/fesm2022/cmat-components-material-datetimepicker.mjs +4283 -2504
  54. package/fesm2022/cmat-components-material-datetimepicker.mjs.map +1 -1
  55. package/fesm2022/cmat-components-navigation.mjs +3080 -1404
  56. package/fesm2022/cmat-components-navigation.mjs.map +1 -1
  57. package/fesm2022/cmat-components-opt-input.mjs +540 -466
  58. package/fesm2022/cmat-components-opt-input.mjs.map +1 -1
  59. package/fesm2022/cmat-components-org-chart.mjs +528 -125
  60. package/fesm2022/cmat-components-org-chart.mjs.map +1 -1
  61. package/fesm2022/cmat-components-page-header.mjs +141 -32
  62. package/fesm2022/cmat-components-page-header.mjs.map +1 -1
  63. package/fesm2022/cmat-components-pagination.mjs +866 -534
  64. package/fesm2022/cmat-components-pagination.mjs.map +1 -1
  65. package/fesm2022/cmat-components-password-strength.mjs +873 -434
  66. package/fesm2022/cmat-components-password-strength.mjs.map +1 -1
  67. package/fesm2022/cmat-components-popover.mjs +1012 -731
  68. package/fesm2022/cmat-components-popover.mjs.map +1 -1
  69. package/fesm2022/cmat-components-progress-bar.mjs +98 -35
  70. package/fesm2022/cmat-components-progress-bar.mjs.map +1 -1
  71. package/fesm2022/cmat-components-qrcode.mjs +463 -287
  72. package/fesm2022/cmat-components-qrcode.mjs.map +1 -1
  73. package/fesm2022/cmat-components-rating.mjs +377 -203
  74. package/fesm2022/cmat-components-rating.mjs.map +1 -1
  75. package/fesm2022/cmat-components-rich-text-editor.mjs +153 -39
  76. package/fesm2022/cmat-components-rich-text-editor.mjs.map +1 -1
  77. package/fesm2022/cmat-components-select-search.mjs +926 -496
  78. package/fesm2022/cmat-components-select-search.mjs.map +1 -1
  79. package/fesm2022/cmat-components-select-table.mjs +1280 -842
  80. package/fesm2022/cmat-components-select-table.mjs.map +1 -1
  81. package/fesm2022/cmat-components-select-tree.mjs +998 -690
  82. package/fesm2022/cmat-components-select-tree.mjs.map +1 -1
  83. package/fesm2022/cmat-components-skeleton.mjs +143 -57
  84. package/fesm2022/cmat-components-skeleton.mjs.map +1 -1
  85. package/fesm2022/cmat-components-speed-dial.mjs +457 -303
  86. package/fesm2022/cmat-components-speed-dial.mjs.map +1 -1
  87. package/fesm2022/cmat-components-status-tag.mjs +136 -44
  88. package/fesm2022/cmat-components-status-tag.mjs.map +1 -1
  89. package/fesm2022/cmat-components-table-toolbar.mjs +120 -28
  90. package/fesm2022/cmat-components-table-toolbar.mjs.map +1 -1
  91. package/fesm2022/cmat-components-timeline.mjs +464 -168
  92. package/fesm2022/cmat-components-timeline.mjs.map +1 -1
  93. package/fesm2022/cmat-components-toast.mjs +346 -262
  94. package/fesm2022/cmat-components-toast.mjs.map +1 -1
  95. package/fesm2022/cmat-components-transfer-picker.mjs +1427 -593
  96. package/fesm2022/cmat-components-transfer-picker.mjs.map +1 -1
  97. package/fesm2022/cmat-components-treetable.mjs +372 -112
  98. package/fesm2022/cmat-components-treetable.mjs.map +1 -1
  99. package/fesm2022/cmat-components-upload.mjs +904 -410
  100. package/fesm2022/cmat-components-upload.mjs.map +1 -1
  101. package/fesm2022/cmat-components-x6-angular-shape.mjs +153 -170
  102. package/fesm2022/cmat-components-x6-angular-shape.mjs.map +1 -1
  103. package/fesm2022/cmat-directives-animate-on-scroll.mjs +220 -138
  104. package/fesm2022/cmat-directives-animate-on-scroll.mjs.map +1 -1
  105. package/fesm2022/cmat-directives-arrow-cursor.mjs +246 -193
  106. package/fesm2022/cmat-directives-arrow-cursor.mjs.map +1 -1
  107. package/fesm2022/cmat-directives-autofocus.mjs +43 -25
  108. package/fesm2022/cmat-directives-autofocus.mjs.map +1 -1
  109. package/fesm2022/cmat-directives-data-exporter.mjs +537 -338
  110. package/fesm2022/cmat-directives-data-exporter.mjs.map +1 -1
  111. package/fesm2022/cmat-directives-debounce.mjs +162 -76
  112. package/fesm2022/cmat-directives-debounce.mjs.map +1 -1
  113. package/fesm2022/cmat-directives-digit-only.mjs +457 -356
  114. package/fesm2022/cmat-directives-digit-only.mjs.map +1 -1
  115. package/fesm2022/cmat-directives-equal-validator.mjs +70 -53
  116. package/fesm2022/cmat-directives-equal-validator.mjs.map +1 -1
  117. package/fesm2022/cmat-directives-seamless-auto-scroll.mjs +180 -132
  118. package/fesm2022/cmat-directives-seamless-auto-scroll.mjs.map +1 -1
  119. package/fesm2022/cmat-lib-mock-api.mjs +207 -195
  120. package/fesm2022/cmat-lib-mock-api.mjs.map +1 -1
  121. package/fesm2022/cmat-pipes-bytes.mjs +50 -30
  122. package/fesm2022/cmat-pipes-bytes.mjs.map +1 -1
  123. package/fesm2022/cmat-pipes-date-format.mjs +41 -25
  124. package/fesm2022/cmat-pipes-date-format.mjs.map +1 -1
  125. package/fesm2022/cmat-pipes-find-by-key.mjs +44 -26
  126. package/fesm2022/cmat-pipes-find-by-key.mjs.map +1 -1
  127. package/fesm2022/cmat-pipes-group-by.mjs +50 -38
  128. package/fesm2022/cmat-pipes-group-by.mjs.map +1 -1
  129. package/fesm2022/cmat-pipes-keys.mjs +44 -31
  130. package/fesm2022/cmat-pipes-keys.mjs.map +1 -1
  131. package/fesm2022/cmat-pipes-secure.mjs +60 -49
  132. package/fesm2022/cmat-pipes-secure.mjs.map +1 -1
  133. package/fesm2022/cmat-pipes-uppercase.mjs +39 -22
  134. package/fesm2022/cmat-pipes-uppercase.mjs.map +1 -1
  135. package/fesm2022/cmat-reports.mjs +2751 -0
  136. package/fesm2022/cmat-reports.mjs.map +1 -0
  137. package/fesm2022/cmat-services-alert.mjs +249 -277
  138. package/fesm2022/cmat-services-alert.mjs.map +1 -1
  139. package/fesm2022/cmat-services-config.mjs +110 -81
  140. package/fesm2022/cmat-services-config.mjs.map +1 -1
  141. package/fesm2022/cmat-services-confirmation.mjs +184 -73
  142. package/fesm2022/cmat-services-confirmation.mjs.map +1 -1
  143. package/fesm2022/cmat-services-data.mjs +136 -125
  144. package/fesm2022/cmat-services-data.mjs.map +1 -1
  145. package/fesm2022/cmat-services-export-as.mjs +165 -183
  146. package/fesm2022/cmat-services-export-as.mjs.map +1 -1
  147. package/fesm2022/cmat-services-loading.mjs +116 -95
  148. package/fesm2022/cmat-services-loading.mjs.map +1 -1
  149. package/fesm2022/cmat-services-local-storage.mjs +75 -66
  150. package/fesm2022/cmat-services-local-storage.mjs.map +1 -1
  151. package/fesm2022/cmat-services-media-watcher.mjs +69 -64
  152. package/fesm2022/cmat-services-media-watcher.mjs.map +1 -1
  153. package/fesm2022/cmat-services-platform.mjs +48 -45
  154. package/fesm2022/cmat-services-platform.mjs.map +1 -1
  155. package/fesm2022/cmat-services-print.mjs +984 -1109
  156. package/fesm2022/cmat-services-print.mjs.map +1 -1
  157. package/fesm2022/cmat-services-splash-screen.mjs +53 -38
  158. package/fesm2022/cmat-services-splash-screen.mjs.map +1 -1
  159. package/fesm2022/cmat-services-title.mjs +57 -47
  160. package/fesm2022/cmat-services-title.mjs.map +1 -1
  161. package/fesm2022/cmat-services-translation.mjs +79 -68
  162. package/fesm2022/cmat-services-translation.mjs.map +1 -1
  163. package/fesm2022/cmat-services-utils.mjs +424 -517
  164. package/fesm2022/cmat-services-utils.mjs.map +1 -1
  165. package/fesm2022/cmat-validators.mjs +23 -33
  166. package/fesm2022/cmat-validators.mjs.map +1 -1
  167. package/fesm2022/cmat-version.mjs +12 -16
  168. package/fesm2022/cmat-version.mjs.map +1 -1
  169. package/fesm2022/cmat.mjs +39805 -22511
  170. package/fesm2022/cmat.mjs.map +1 -1
  171. package/package.json +5 -1
  172. package/types/cmat-components-adapter.d.ts +145 -156
  173. package/types/cmat-components-breadcrumb.d.ts +108 -86
  174. package/types/cmat-components-card.d.ts +34 -18
  175. package/types/cmat-components-carousel.d.ts +251 -134
  176. package/types/cmat-components-cascade.d.ts +158 -117
  177. package/types/cmat-components-chip-input.d.ts +105 -71
  178. package/types/cmat-components-code-editor.d.ts +59 -34
  179. package/types/cmat-components-color-picker.d.ts +378 -236
  180. package/types/cmat-components-custom-formly.d.ts +776 -814
  181. package/types/cmat-components-data-picker.d.ts +502 -360
  182. package/types/cmat-components-date-range.d.ts +106 -77
  183. package/types/cmat-components-date-time-display.d.ts +36 -13
  184. package/types/cmat-components-drawer.d.ts +91 -61
  185. package/types/cmat-components-empty-state.d.ts +47 -17
  186. package/types/cmat-components-file-preview.d.ts +42 -14
  187. package/types/cmat-components-filter-toolbar.d.ts +57 -25
  188. package/types/cmat-components-form-actions.d.ts +18 -10
  189. package/types/cmat-components-fullscreen.d.ts +21 -13
  190. package/types/cmat-components-highlight.d.ts +33 -26
  191. package/types/cmat-components-image-viewer.d.ts +119 -58
  192. package/types/cmat-components-inline-loading.d.ts +24 -11
  193. package/types/cmat-components-json-editor.d.ts +39 -28
  194. package/types/cmat-components-knob-input.d.ts +172 -101
  195. package/types/cmat-components-loading-overlay.d.ts +8 -11
  196. package/types/cmat-components-masonry.d.ts +27 -14
  197. package/types/cmat-components-material-color-picker.d.ts +56 -42
  198. package/types/cmat-components-material-datetimepicker.d.ts +817 -454
  199. package/types/cmat-components-navigation.d.ts +295 -221
  200. package/types/cmat-components-opt-input.d.ts +111 -90
  201. package/types/cmat-components-org-chart.d.ts +53 -35
  202. package/types/cmat-components-page-header.d.ts +37 -14
  203. package/types/cmat-components-pagination.d.ts +144 -107
  204. package/types/cmat-components-password-strength.d.ts +197 -86
  205. package/types/cmat-components-popover.d.ts +264 -166
  206. package/types/cmat-components-progress-bar.d.ts +17 -14
  207. package/types/cmat-components-qrcode.d.ts +111 -42
  208. package/types/cmat-components-rating.d.ts +105 -59
  209. package/types/cmat-components-rich-text-editor.d.ts +39 -16
  210. package/types/cmat-components-select-search.d.ts +195 -99
  211. package/types/cmat-components-select-table.d.ts +241 -142
  212. package/types/cmat-components-select-tree.d.ts +185 -118
  213. package/types/cmat-components-skeleton.d.ts +55 -32
  214. package/types/cmat-components-speed-dial.d.ts +86 -61
  215. package/types/cmat-components-status-tag.d.ts +42 -24
  216. package/types/cmat-components-table-toolbar.d.ts +30 -12
  217. package/types/cmat-components-timeline.d.ts +83 -51
  218. package/types/cmat-components-toast.d.ts +84 -85
  219. package/types/cmat-components-transfer-picker.d.ts +228 -181
  220. package/types/cmat-components-treetable.d.ts +63 -39
  221. package/types/cmat-components-upload.d.ts +205 -106
  222. package/types/cmat-components-x6-angular-shape.d.ts +29 -37
  223. package/types/cmat-directives-animate-on-scroll.d.ts +48 -30
  224. package/types/cmat-directives-arrow-cursor.d.ts +55 -35
  225. package/types/cmat-directives-autofocus.d.ts +8 -11
  226. package/types/cmat-directives-data-exporter.d.ts +71 -40
  227. package/types/cmat-directives-debounce.d.ts +31 -28
  228. package/types/cmat-directives-digit-only.d.ts +90 -53
  229. package/types/cmat-directives-equal-validator.d.ts +11 -14
  230. package/types/cmat-directives-seamless-auto-scroll.d.ts +42 -29
  231. package/types/cmat-lib-mock-api.d.ts +46 -55
  232. package/types/cmat-pipes-bytes.d.ts +7 -10
  233. package/types/cmat-pipes-date-format.d.ts +7 -10
  234. package/types/cmat-pipes-find-by-key.d.ts +8 -12
  235. package/types/cmat-pipes-group-by.d.ts +11 -15
  236. package/types/cmat-pipes-keys.d.ts +10 -13
  237. package/types/cmat-pipes-secure.d.ts +14 -17
  238. package/types/cmat-pipes-uppercase.d.ts +7 -10
  239. package/types/cmat-reports.d.ts +1131 -0
  240. package/types/cmat-services-alert.d.ts +80 -87
  241. package/types/cmat-services-config.d.ts +37 -43
  242. package/types/cmat-services-confirmation.d.ts +31 -37
  243. package/types/cmat-services-data.d.ts +18 -21
  244. package/types/cmat-services-export-as.d.ts +28 -33
  245. package/types/cmat-services-loading.d.ts +27 -31
  246. package/types/cmat-services-local-storage.d.ts +17 -21
  247. package/types/cmat-services-media-watcher.d.ts +14 -18
  248. package/types/cmat-services-platform.d.ts +8 -11
  249. package/types/cmat-services-print.d.ts +97 -102
  250. package/types/cmat-services-splash-screen.d.ts +11 -14
  251. package/types/cmat-services-title.d.ts +9 -12
  252. package/types/cmat-services-translation.d.ts +19 -22
  253. package/types/cmat-services-utils.d.ts +76 -80
  254. package/types/cmat-validators.d.ts +5 -8
  255. package/types/cmat-version.d.ts +8 -10
  256. package/types/cmat.d.ts +7551 -5204
@@ -1,692 +1,1000 @@
1
- import { coerceBooleanProperty } from '@angular/cdk/coercion';
2
- import { SelectionModel } from '@angular/cdk/collections';
3
- import { NgClass } from '@angular/common';
4
- import * as i0 from '@angular/core';
5
- import { input, signal, inject, DestroyRef, viewChild, effect, untracked, Input, HostListener, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
6
- import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
7
- import * as i3 from '@angular/forms';
8
- import { FormControl, NgControl, ReactiveFormsModule } from '@angular/forms';
9
- import * as i5 from '@angular/material/button';
10
- import { MatButtonModule } from '@angular/material/button';
11
- import * as i6 from '@angular/material/checkbox';
12
- import { MatCheckboxModule } from '@angular/material/checkbox';
13
- import { MatFormFieldControl } from '@angular/material/form-field';
14
- import * as i1 from '@angular/material/icon';
15
- import { MatIconModule } from '@angular/material/icon';
16
- import * as i2 from '@angular/material/select';
17
- import { MatSelectModule } from '@angular/material/select';
18
- import * as i4 from '@angular/material/tree';
19
- import { MatTreeModule } from '@angular/material/tree';
20
- import { CmatSelectSearchComponent } from 'cmat/components/select-search';
21
- import { isNil } from 'lodash-es';
22
- import { Subject, debounceTime } from 'rxjs';
23
-
24
- class CmatSelectTreeFlatNode {
25
- }
26
-
27
- /* eslint-disable @typescript-eslint/member-ordering */
1
+ import { coerceBooleanProperty } from "@angular/cdk/coercion";
2
+ import { SelectionModel } from "@angular/cdk/collections";
3
+ import { NgClass } from "@angular/common";
4
+ import * as i0 from "@angular/core";
5
+ import { ChangeDetectionStrategy, Component, DestroyRef, HostListener, Input, ViewEncapsulation, effect, inject, input, signal, untracked, viewChild } from "@angular/core";
6
+ import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
7
+ import * as i3 from "@angular/forms";
8
+ import { FormControl, NgControl, ReactiveFormsModule } from "@angular/forms";
9
+ import * as i5 from "@angular/material/button";
10
+ import { MatButtonModule } from "@angular/material/button";
11
+ import * as i6 from "@angular/material/checkbox";
12
+ import { MatCheckboxModule } from "@angular/material/checkbox";
13
+ import { MatFormFieldControl } from "@angular/material/form-field";
14
+ import * as i1 from "@angular/material/icon";
15
+ import { MatIconModule } from "@angular/material/icon";
16
+ import * as i2 from "@angular/material/select";
17
+ import { MatSelectModule } from "@angular/material/select";
18
+ import * as i4 from "@angular/material/tree";
19
+ import { MatTreeModule } from "@angular/material/tree";
20
+ import { CmatSelectSearchComponent } from "cmat/components/select-search";
21
+ import { isNil } from "lodash-es";
22
+ import { Subject, debounceTime } from "rxjs";
23
+ var CmatSelectTreeFlatNode = class {};
28
24
  let NEXT_ID = 0;
29
- class CmatSelectTreeComponent {
30
- constructor() {
31
- this.id = `cmat-select-tree-${NEXT_ID++}`;
32
- this.dataSource = input([], /* @ts-ignore */
33
- ...(ngDevMode ? [{ debugName: "dataSource" }] : /* istanbul ignore next */ []));
34
- this.noEntriesFoundLabel = input('无结果', /* @ts-ignore */
35
- ...(ngDevMode ? [{ debugName: "noEntriesFoundLabel" }] : /* istanbul ignore next */ []));
36
- this.showNoFoundLabel = input(true, /* @ts-ignore */
37
- ...(ngDevMode ? [{ debugName: "showNoFoundLabel" }] : /* istanbul ignore next */ []));
38
- this.multiple = input(false, /* @ts-ignore */
39
- ...(ngDevMode ? [{ debugName: "multiple" }] : /* istanbul ignore next */ []));
40
- this.overallSearchEnabled = input(true, /* @ts-ignore */
41
- ...(ngDevMode ? [{ debugName: "overallSearchEnabled" }] : /* istanbul ignore next */ []));
42
- this.canNull = input(false, /* @ts-ignore */
43
- ...(ngDevMode ? [{ debugName: "canNull" }] : /* istanbul ignore next */ []));
44
- this.customTriggerLabelFn = input(/* @ts-ignore */
45
- ...(ngDevMode ? [undefined, { debugName: "customTriggerLabelFn" }] : /* istanbul ignore next */ []));
46
- this.customTriggerLabelTemplate = input(/* @ts-ignore */
47
- ...(ngDevMode ? [undefined, { debugName: "customTriggerLabelTemplate" }] : /* istanbul ignore next */ []));
48
- this.expandable = input(/* @ts-ignore */
49
- ...(ngDevMode ? [undefined, { debugName: "expandable" }] : /* istanbul ignore next */ []));
50
- this.showToggleAllCheckbox = input(false, /* @ts-ignore */
51
- ...(ngDevMode ? [{ debugName: "showToggleAllCheckbox" }] : /* istanbul ignore next */ []));
52
- this.compareWith = input((o1, o2) => {
53
- return o1 && o2 ? o1?.name === o2?.name && o1?.id === o2?.id : o1 === o2;
54
- }, /* @ts-ignore */
55
- ...(ngDevMode ? [{ debugName: "compareWith" }] : /* istanbul ignore next */ []));
56
- this.flatNodeMap = new Map();
57
- this.nestedNodeMap = new Map();
58
- this._flatNodeById = new Map();
59
- this._parentFlatNodeById = new Map();
60
- this._selectedFlatNodeIds = new Set();
61
- this.checklistSelection = new SelectionModel(true);
62
- this.treeDataSource = signal([], /* @ts-ignore */
63
- ...(ngDevMode ? [{ debugName: "treeDataSource" }] : /* istanbul ignore next */ []));
64
- this.dataFlatNodes = signal([], /* @ts-ignore */
65
- ...(ngDevMode ? [{ debugName: "dataFlatNodes" }] : /* istanbul ignore next */ []));
66
- this.overallFilterControl = new FormControl();
67
- this.isIndeterminate = signal(false, /* @ts-ignore */
68
- ...(ngDevMode ? [{ debugName: "isIndeterminate" }] : /* istanbul ignore next */ []));
69
- this.isChecked = signal(false, /* @ts-ignore */
70
- ...(ngDevMode ? [{ debugName: "isChecked" }] : /* istanbul ignore next */ []));
71
- this.checkCount = signal(0, /* @ts-ignore */
72
- ...(ngDevMode ? [{ debugName: "checkCount" }] : /* istanbul ignore next */ []));
73
- this.selectControl = new FormControl();
74
- this.matSelectData = signal([], /* @ts-ignore */
75
- ...(ngDevMode ? [{ debugName: "matSelectData" }] : /* istanbul ignore next */ []));
76
- this.stateChanges = new Subject();
77
- this.focused = false;
78
- this.touched = false;
79
- this.ngControl = inject(NgControl, { optional: true, self: true });
80
- this._destroyRef = inject(DestroyRef);
81
- this.tree = viewChild('componentTree', /* @ts-ignore */
82
- ...(ngDevMode ? [{ debugName: "tree" }] : /* istanbul ignore next */ []));
83
- this._matSelectSignal = viewChild('componentSelect', /* @ts-ignore */
84
- ...(ngDevMode ? [{ debugName: "_matSelectSignal" }] : /* istanbul ignore next */ []));
85
- this._matSelectSearch = viewChild(CmatSelectSearchComponent, /* @ts-ignore */
86
- ...(ngDevMode ? [{ debugName: "_matSelectSearch" }] : /* istanbul ignore next */ []));
87
- this.getLevel = (dataNode) => dataNode.level;
88
- this.childrenAccessor = (node) => node.children ?? [];
89
- this.hasChild = (_, node) => !!node.children && node.children.length > 0;
90
- this._placeholder = '';
91
- this._required = false;
92
- this._disabled = false;
93
- // eslint-disable-next-line @typescript-eslint/no-empty-function
94
- this._onModelChange = () => { };
95
- // eslint-disable-next-line @typescript-eslint/no-empty-function
96
- this._onTouchedChange = () => { };
97
- this._transformer = (node, level, parent = null) => {
98
- // 构建平铺节点并缓存映射关系
99
- const existingNode = this.nestedNodeMap.get(node);
100
- const flatNode = existingNode?.name === node.name
101
- ? existingNode
102
- : new CmatSelectTreeFlatNode();
103
- flatNode.id = node.id;
104
- flatNode.name = node.name;
105
- flatNode.level = level;
106
- flatNode.expandable = !!node.children && node.children.length > 0;
107
- this.flatNodeMap.set(flatNode, node);
108
- this.nestedNodeMap.set(node, flatNode);
109
- this._flatNodeById.set(flatNode.id, flatNode);
110
- this._parentFlatNodeById.set(flatNode.id, parent);
111
- return flatNode;
112
- };
113
- if (this.ngControl != null) {
114
- this.ngControl.valueAccessor = this;
115
- }
116
- // 监听 matSelect 变化并初始化
117
- effect(() => {
118
- const matSelect = this._matSelectSignal();
119
- if (matSelect && !this._matSelect) {
120
- const existsSelect = false;
121
- this._matSelect = matSelect;
122
- if (!existsSelect) {
123
- untracked(() => {
124
- this._init(this.value);
125
- });
126
- this._matSelect.setDisabledState(this.disabled);
127
- let panelClass = ['overflow-y-auto', 'scrollbar-custom'];
128
- if (this._matSelect.panelClass) {
129
- if (Array.isArray(this._matSelect.panelClass)) {
130
- this._matSelect.panelClass = [this._matSelect.panelClass, ...panelClass];
131
- }
132
- else if (typeof this._matSelect.panelClass === 'string') {
133
- this._matSelect.panelClass = [
134
- this._matSelect.panelClass,
135
- ...panelClass,
136
- ];
137
- }
138
- else if (typeof this._matSelect.panelClass === 'object') {
139
- const panelClassEntries = this._matSelect.panelClass;
140
- panelClass.forEach((i) => {
141
- panelClassEntries[i] = true;
142
- });
143
- }
144
- }
145
- else {
146
- this._matSelect.panelClass = panelClass;
147
- }
148
- }
149
- }
150
- });
151
- }
152
- clickedOut() {
153
- if (!this._matSelect?.panelOpen) {
154
- this.focused = false;
155
- this.stateChanges.next();
156
- }
157
- }
158
- ngOnChanges(changes) {
159
- // 数据源变化时,重建节点索引和缓存
160
- if (changes['dataSource']) {
161
- this.flatNodeMap.clear();
162
- this.nestedNodeMap.clear();
163
- this._flatNodeById.clear();
164
- this._parentFlatNodeById.clear();
165
- const dataSource = this.dataSource();
166
- this.treeDataSource.set(dataSource);
167
- this.dataFlatNodes.set(this._getFlattenNodes(dataSource));
168
- this.matSelectData.set([...this.dataFlatNodes()]);
169
- if (dataSource.length > 0) {
170
- this._init(this.value);
171
- }
172
- }
173
- }
174
- ngAfterViewInit() {
175
- this.overallFilterControl.valueChanges
176
- .pipe(takeUntilDestroyed(this._destroyRef), debounceTime(200))
177
- .subscribe(() => {
178
- const filterValue = `${this.overallFilterControl.value ?? ''}`.toLowerCase();
179
- const dataClone = this._cloneTreeNodes(this.dataSource());
180
- const arr = [];
181
- for (let i = dataClone.length - 1; i >= 0; i--) {
182
- if (!this._applyColumnLevelFilters(dataClone[i], filterValue)) {
183
- arr.push(i);
184
- }
185
- }
186
- arr.forEach((v) => {
187
- dataClone.splice(v, 1);
188
- });
189
- this.treeDataSource.set(dataClone);
190
- this.dataFlatNodes.set(this._getFlattenNodes(dataClone));
191
- this.matSelectData.set([...this.dataFlatNodes()]);
192
- const treeInstance = this.tree();
193
- if (treeInstance && this.expandable()) {
194
- treeInstance.expandAll();
195
- }
196
- this._updateSelect(this.checklistSelection.selected);
197
- });
198
- }
199
- ngOnDestroy() {
200
- this.stateChanges.complete();
201
- }
202
- get placeholder() {
203
- return this._placeholder;
204
- }
205
- set placeholder(value) {
206
- this._placeholder = value;
207
- this.stateChanges.next();
208
- }
209
- get value() {
210
- return this._value;
211
- }
212
- set value(value) {
213
- if (value !== this._value) {
214
- this._value = value;
215
- this.stateChanges.next();
216
- this._onModelChange(value);
217
- }
218
- }
219
- get empty() {
220
- return !this._value;
221
- }
222
- get errorState() {
223
- if (this.ngControl == null)
224
- return false;
225
- return (this.touched && this.ngControl?.invalid) ?? false;
226
- }
227
- get shouldLabelFloat() {
228
- return this.focused || !this.empty;
229
- }
230
- get required() {
231
- return this._required;
232
- }
233
- set required(value) {
234
- this._required = coerceBooleanProperty(value);
235
- this.stateChanges.next();
236
- }
237
- get disabled() {
238
- if (!isNil(this.ngControl?.disabled)) {
239
- return this.ngControl.disabled;
240
- }
241
- return this._disabled;
242
- }
243
- set disabled(value) {
244
- this._disabled = coerceBooleanProperty(value);
245
- if (this.focused) {
246
- this.focused = false;
247
- this.stateChanges.next();
248
- }
249
- this._matSelect?.setDisabledState(this._disabled);
250
- }
251
- registerOnChange(fn) {
252
- this._onModelChange = fn;
253
- }
254
- registerOnTouched(fn) {
255
- this._onTouchedChange = fn;
256
- }
257
- setDisabledState(isDisabled) {
258
- this._matSelect?.setDisabledState(isDisabled);
259
- }
260
- setDescribedByIds(ids) {
261
- this._matSelect?.setDescribedByIds(ids);
262
- }
263
- onContainerClick() {
264
- if (!this.focused) {
265
- this._matSelect?.focus();
266
- }
267
- }
268
- onFocusIn() {
269
- if (!this.focused) {
270
- this.focused = true;
271
- this.stateChanges.next();
272
- }
273
- }
274
- onFocusOut(event) {
275
- const relatedTarget = event.relatedTarget;
276
- const panelElement = this._matSelect?.panel?.nativeElement;
277
- if (!(relatedTarget instanceof Element) ||
278
- !panelElement?.contains(relatedTarget)) {
279
- this.touched = true;
280
- this.focused = false;
281
- this._onTouchedChange();
282
- this.stateChanges.next();
283
- }
284
- }
285
- writeValue(value) {
286
- this._init(value);
287
- }
288
- simpleTriggerLabelFn(value) {
289
- return value
290
- .map((node) => {
291
- if (isNil(node)) {
292
- return '';
293
- }
294
- const customTriggerLabelTemplate = this.customTriggerLabelTemplate();
295
- if (isNil(customTriggerLabelTemplate) ||
296
- typeof customTriggerLabelTemplate !== 'string' ||
297
- customTriggerLabelTemplate.trim().length === 0) {
298
- return `${node.id}`;
299
- }
300
- let atLeastPartialSubstitution = false;
301
- const nodeRecord = node;
302
- const substitution = customTriggerLabelTemplate.replace(/[$][{]([^}]+)[}]/g, (_, key) => {
303
- const nodeValue = nodeRecord[key];
304
- if (isNil(nodeValue) ||
305
- (typeof nodeValue !== 'string' &&
306
- typeof nodeValue !== 'number' &&
307
- typeof nodeValue !== 'boolean' &&
308
- typeof nodeValue !== 'bigint')) {
309
- return '';
310
- }
311
- atLeastPartialSubstitution = true;
312
- return String(nodeValue);
313
- });
314
- if (atLeastPartialSubstitution === false) {
315
- return `${node.id}`;
316
- }
317
- return substitution.trim();
318
- })
319
- .join(', ');
320
- }
321
- openedChange(opened) {
322
- // 面板打开/关闭时,同步树节点和选中值
323
- if (opened) {
324
- if (this.multiple()) {
325
- this.checklistSelection.selected.forEach((node) => {
326
- if (node.expandable) {
327
- const descendants = this._getDescendants(node);
328
- this.checklistSelection.select(...descendants);
329
- }
330
- });
331
- this._updateSelect(this.checklistSelection.selected);
332
- }
333
- const treeInstance = this.tree();
334
- if (treeInstance && this.expandable()) {
335
- treeInstance.expandAll();
336
- }
337
- }
338
- else {
339
- setTimeout(() => {
340
- if (!isNil(this.checklistSelection.selected)) {
341
- if (this.multiple()) {
342
- const findOutNode = [];
343
- this.checklistSelection.selected.forEach((node) => {
344
- const parentNode = this._getParentNode(node);
345
- if (parentNode &&
346
- this.checklistSelection.isSelected(parentNode)) {
347
- findOutNode.push(node);
348
- }
349
- });
350
- findOutNode.forEach((node) => {
351
- this.checklistSelection.deselect(node);
352
- });
353
- this.value =
354
- this.checklistSelection.selected.length > 0
355
- ? [...this.checklistSelection.selected]
356
- : null;
357
- }
358
- else {
359
- if (this.checklistSelection.selected &&
360
- this.checklistSelection.selected.length > 0) {
361
- this.value = { ...this.checklistSelection.selected[0] };
362
- }
363
- }
364
- this._matSelect?.writeValue(this.value);
365
- this._matSelect?._onChange(this.value);
366
- }
367
- }, 100);
368
- }
369
- }
370
- descendantsAllSelected(node) {
371
- // 判断当前节点的所有后代是否都已选中
372
- const descendants = this._getDescendants(node);
373
- return descendants.every(child => this._selectedFlatNodeIds.has(child.id));
374
- }
375
- descendantsPartiallySelected(node) {
376
- // 判断当前节点是否处于半选状态
377
- const descendants = this._getDescendants(node);
378
- const result = descendants.some(child => this._selectedFlatNodeIds.has(child.id));
379
- return (result &&
380
- !descendants.every(child => this._selectedFlatNodeIds.has(child.id)));
381
- }
382
- todoItemSelectionToggle(event, node) {
383
- // 切换分支节点的选中状态
384
- event.stopPropagation();
385
- if (this.multiple()) {
386
- this.checklistSelection.toggle(node);
387
- const descendants = this._getDescendants(node);
388
- if (this.checklistSelection.isSelected(node)) {
389
- this.checklistSelection.select(...descendants);
390
- }
391
- else {
392
- this.checklistSelection.deselect(...descendants);
393
- }
394
- this._checkAllParentsSelection(node);
395
- this._syncSelectedFlatNodeIds();
396
- this._updateCheckState();
397
- }
398
- else {
399
- this.checklistSelection.clear();
400
- this.checklistSelection.select(node);
401
- this._syncSelectedFlatNodeIds();
402
- this._matSelect?.close();
403
- }
404
- }
405
- todoLeafItemSelectionToggle(event, node) {
406
- // 切换叶子节点的选中状态
407
- event.stopPropagation();
408
- if (this.multiple()) {
409
- this.checklistSelection.toggle(node);
410
- this._checkAllParentsSelection(node);
411
- this._syncSelectedFlatNodeIds();
412
- this._updateCheckState();
413
- }
414
- else {
415
- this.checklistSelection.clear();
416
- this.checklistSelection.select(node);
417
- this._syncSelectedFlatNodeIds();
418
- this._matSelect?.close();
419
- }
420
- }
421
- clearSelection() {
422
- // 清空所有选择
423
- this.checklistSelection.clear();
424
- this.isChecked.set(false);
425
- this.isIndeterminate.set(false);
426
- this.checkCount.set(0);
427
- this._selectedFlatNodeIds.clear();
428
- this.value = null;
429
- this._matSelect?.writeValue(null);
430
- this._matSelect?._onChange(null);
431
- }
432
- toggleSelectAll(selectAllValue) {
433
- // 全选或取消全选
434
- if (selectAllValue) {
435
- this.checklistSelection.select(...this.dataFlatNodes());
436
- this.isIndeterminate.set(false);
437
- this.isChecked.set(true);
438
- this._syncSelectedFlatNodeIds();
439
- }
440
- else {
441
- this.checklistSelection.clear();
442
- this.isChecked.set(false);
443
- this.isIndeterminate.set(false);
444
- this.checkCount.set(0);
445
- this._selectedFlatNodeIds.clear();
446
- }
447
- }
448
- getChecklistSelectionIsSelected(i) {
449
- // 根据原始节点判断是否已选中
450
- const flatNode = this.nestedNodeMap.get(i);
451
- return !!flatNode && this._selectedFlatNodeIds.has(flatNode.id);
452
- }
453
- _init(v) {
454
- // 初始化内部值和选中状态
455
- if (this.dataSource().length > 0 &&
456
- this.treeDataSource().length > 0 &&
457
- this._matSelect) {
458
- const treeInstance = this.tree();
459
- if (treeInstance && this.expandable()) {
460
- treeInstance.expandAll();
461
- }
462
- if (!isNil(v)) {
463
- this._updateChecklistSelection(v);
464
- }
465
- else {
466
- this.checklistSelection.clear();
467
- }
468
- if (Array.isArray(v) && v.length > 0) {
469
- if (this.multiple()) {
470
- const findOutNode = [];
471
- this.checklistSelection.selected.forEach((node) => {
472
- const parentNode = this._getParentNode(node);
473
- if (parentNode && this.checklistSelection.isSelected(parentNode)) {
474
- findOutNode.push(node);
475
- }
476
- });
477
- findOutNode.forEach((node) => {
478
- this.checklistSelection.deselect(node);
479
- });
480
- this.value = [...this.checklistSelection.selected];
481
- }
482
- else {
483
- this.value =
484
- this.checklistSelection.selected.length > 0
485
- ? { ...this.checklistSelection.selected[0] }
486
- : null;
487
- }
488
- }
489
- else {
490
- this.value = v;
491
- }
492
- if (this._matSelect) {
493
- this._matSelect.writeValue(this.value);
494
- this._matSelect._onChange(this.value);
495
- }
496
- this._updateCheckState();
497
- }
498
- else {
499
- this.value = v;
500
- }
501
- }
502
- _checkAllParentsSelection(node) {
503
- // 级联更新父节点的选中状态
504
- let parent = this._getParentNode(node);
505
- while (parent) {
506
- parent.expandable = true;
507
- const treeInstance = this.tree();
508
- if (treeInstance) {
509
- treeInstance.expand(this.flatNodeMap.get(parent));
510
- }
511
- this._checkRootNodeSelection(parent);
512
- parent = this._getParentNode(parent);
513
- }
514
- }
515
- _checkRootNodeSelection(node) {
516
- // 根据子节点状态同步父节点选中状态
517
- const nodeSelected = this.checklistSelection.isSelected(node);
518
- const descendants = this._getDescendants(node);
519
- const descAllSelected = descendants.every(child => this.checklistSelection.isSelected(child));
520
- if (nodeSelected && !descAllSelected) {
521
- this.checklistSelection.deselect(node);
522
- }
523
- else if (!nodeSelected && (descAllSelected || descendants.length === 0)) {
524
- this.checklistSelection.select(node);
525
- }
526
- this._updateCheckState();
527
- }
528
- _getParentNode(node) {
529
- // 通过缓存获取父节点
530
- return this._parentFlatNodeById.get(node.id) ?? null;
531
- }
532
- _updateChecklistSelection(value) {
533
- // 根据外部值同步内部选择状态
534
- this.checklistSelection.clear();
535
- if (!isNil(value)) {
536
- const valueArray = !Array.isArray(value) ? [value] : value;
537
- valueArray.forEach((item) => {
538
- const nodeFound = this._flatNodeById.get(item.id);
539
- if (isNil(nodeFound)) {
540
- return;
541
- }
542
- this.checklistSelection.select(nodeFound);
543
- });
544
- this._syncSelectedFlatNodeIds();
545
- }
546
- }
547
- _updateSelect(value) {
548
- // 根据当前值同步显示选择
549
- if (!isNil(value)) {
550
- const valueArray = !Array.isArray(value) ? [value] : value;
551
- if (this.overallSearchEnabled()) // 有搜索功能时,将选中节点转换为当前数据源节点
552
- {
553
- valueArray.forEach((item) => {
554
- const nodeFound = this._flatNodeById.get(item.id);
555
- if (isNil(nodeFound)) {
556
- return;
557
- }
558
- this.checklistSelection.deselect(item);
559
- this.checklistSelection.select(nodeFound);
560
- });
561
- }
562
- if (this.multiple()) {
563
- this.checklistSelection.selected.forEach((item) => {
564
- this._checkAllParentsSelection(item);
565
- });
566
- }
567
- this._syncSelectedFlatNodeIds();
568
- this._updateCheckState();
569
- }
570
- }
571
- _applyColumnLevelFilters(node, filter) {
572
- // 递归过滤节点及其子节点
573
- let result = false;
574
- if (node?.children && node.children.length > 0) {
575
- for (let i = node.children.length - 1; i >= 0; i--) {
576
- const resultTemp = this._applyColumnLevelFilters(node.children[i], filter);
577
- if (!resultTemp) {
578
- node.children.splice(i, 1);
579
- }
580
- result = resultTemp || result;
581
- }
582
- }
583
- if (node?.children?.length === 0) {
584
- node.children = null;
585
- }
586
- const cellValue = node.name.toLowerCase();
587
- if (cellValue.includes(filter)) {
588
- result = true;
589
- }
590
- return result;
591
- }
592
- _updateCheckState() {
593
- // 更新全选与半选状态
594
- if (this.showToggleAllCheckbox() && this.dataSource().length > 0) {
595
- const selectedCount = this._selectedFlatNodeIds.size;
596
- this.checkCount.set(selectedCount);
597
- this.isIndeterminate.set(selectedCount < this.dataFlatNodes().length && selectedCount > 0);
598
- this.isChecked.set(selectedCount === this.dataFlatNodes().length && selectedCount > 0);
599
- }
600
- }
601
- _getFlattenNodes(nodes, i = 0, parent = null) {
602
- // 将树结构平铺为节点列表
603
- const flattenedNodes = [];
604
- for (const node of nodes) {
605
- const flatNode = this._transformer(node, i, parent);
606
- flattenedNodes.push(flatNode);
607
- if (node.children) {
608
- flattenedNodes.push(...this._getFlattenNodes(node.children, i + 1, flatNode));
609
- }
610
- }
611
- return flattenedNodes;
612
- }
613
- _cloneTreeNodes(nodes) {
614
- return nodes.map(node => ({
615
- id: node.id,
616
- name: node.name,
617
- children: node.children ? this._cloneTreeNodes(node.children) : null,
618
- }));
619
- }
620
- _syncSelectedFlatNodeIds() {
621
- // 同步选中节点 ID 缓存
622
- this._selectedFlatNodeIds.clear();
623
- this.checklistSelection.selected.forEach((node) => {
624
- this._selectedFlatNodeIds.add(node.id);
625
- });
626
- this.checkCount.set(this._selectedFlatNodeIds.size);
627
- }
628
- _getDescendants(dataNode) {
629
- // 收集当前节点的所有后代
630
- const node = this.flatNodeMap.get(dataNode);
631
- if (!node?.children?.length) {
632
- return [];
633
- }
634
- const descendants = [];
635
- const collect = (children) => {
636
- for (const child of children) {
637
- const flatNode = this.nestedNodeMap.get(child);
638
- if (flatNode) {
639
- descendants.push(flatNode);
640
- }
641
- if (child.children?.length) {
642
- collect(child.children);
643
- }
644
- }
645
- };
646
- collect(node.children);
647
- return descendants;
648
- }
649
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: CmatSelectTreeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
650
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.0", type: CmatSelectTreeComponent, isStandalone: true, selector: "cmat-select-tree", inputs: { dataSource: { classPropertyName: "dataSource", publicName: "dataSource", isSignal: true, isRequired: false, transformFunction: null }, noEntriesFoundLabel: { classPropertyName: "noEntriesFoundLabel", publicName: "noEntriesFoundLabel", isSignal: true, isRequired: false, transformFunction: null }, showNoFoundLabel: { classPropertyName: "showNoFoundLabel", publicName: "showNoFoundLabel", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, overallSearchEnabled: { classPropertyName: "overallSearchEnabled", publicName: "overallSearchEnabled", isSignal: true, isRequired: false, transformFunction: null }, canNull: { classPropertyName: "canNull", publicName: "canNull", isSignal: true, isRequired: false, transformFunction: null }, customTriggerLabelFn: { classPropertyName: "customTriggerLabelFn", publicName: "customTriggerLabelFn", isSignal: true, isRequired: false, transformFunction: null }, customTriggerLabelTemplate: { classPropertyName: "customTriggerLabelTemplate", publicName: "customTriggerLabelTemplate", isSignal: true, isRequired: false, transformFunction: null }, expandable: { classPropertyName: "expandable", publicName: "expandable", isSignal: true, isRequired: false, transformFunction: null }, showToggleAllCheckbox: { classPropertyName: "showToggleAllCheckbox", publicName: "showToggleAllCheckbox", isSignal: true, isRequired: false, transformFunction: null }, compareWith: { classPropertyName: "compareWith", publicName: "compareWith", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: false, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: false, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: false, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: null } }, host: { listeners: { "document:click": "clickedOut()" }, properties: { "attr.id": "id" } }, providers: [
651
- { provide: MatFormFieldControl, useExisting: CmatSelectTreeComponent },
652
- ], viewQueries: [{ propertyName: "tree", first: true, predicate: ["componentTree"], descendants: true, isSignal: true }, { propertyName: "_matSelectSignal", first: true, predicate: ["componentSelect"], descendants: true, isSignal: true }, { propertyName: "_matSelectSearch", first: true, predicate: CmatSelectSearchComponent, descendants: true, isSignal: true }], exportAs: ["cmatSelectTree"], usesOnChanges: true, ngImport: i0, template: " \r\n@if (multiple()) {\r\n <mat-select\r\n #componentSelect\r\n multiple\r\n [placeholder]=\"placeholder\"\r\n [required]=\"required\"\r\n [formControl]=\"selectControl\"\r\n [compareWith]=\"compareWith()\"\r\n (openedChange)=\"openedChange($event)\"\r\n (focusin)=\"onFocusIn()\"\r\n >\r\n <mat-select-trigger>\r\n @if (!customTriggerLabelFn()) {\r\n {{ simpleTriggerLabelFn(checklistSelection.selected) }}\r\n } @else {\r\n {{ customTriggerLabelFn()!(checklistSelection.selected) }}\r\n }\r\n </mat-select-trigger>\r\n\r\n <div (focusout)=\"onFocusOut($event)\">\r\n @if (overallSearchEnabled()) {\r\n <mat-option>\r\n <cmat-select-search\r\n #searchComponent\r\n [showNoFoundLabel]=\"showNoFoundLabel()\"\r\n [noEntriesFoundLabel]=\"noEntriesFoundLabel()\"\r\n [formControl]=\"overallFilterControl\"\r\n [clearSearchInput]=\"true\"\r\n [toggleAllCheckboxIndeterminate]=\"isIndeterminate()\"\r\n [toggleAllCheckboxChecked]=\"isChecked()\"\r\n [showToggleAllCheckbox]=\"showToggleAllCheckbox() && multiple()\"\r\n (toggleAll)=\"toggleSelectAll($event)\"\r\n >\r\n </cmat-select-search>\r\n </mat-option>\r\n }\r\n @for (selectData of matSelectData(); track selectData.id) {\r\n <mat-option class=\"hidden\" [value]=\"selectData\">{{\r\n selectData.name\r\n }}</mat-option>\r\n }\r\n <mat-tree\r\n #componentTree\r\n [dataSource]=\"treeDataSource()\"\r\n [childrenAccessor]=\"childrenAccessor\"\r\n >\r\n <mat-tree-node\r\n *matTreeNodeDef=\"let node\"\r\n matTreeNodePadding\r\n [ngClass]=\"getChecklistSelectionIsSelected(node) ? 'selected' : ''\"\r\n (click)=\"\r\n todoLeafItemSelectionToggle($event, nestedNodeMap.get(node)!)\r\n \"\r\n >\r\n <button type=\"button\" matIconButton disabled></button>\r\n <mat-checkbox\r\n class=\"checklist-leaf-node text-current\"\r\n [color]=\"'primary'\"\r\n [checked]=\"getChecklistSelectionIsSelected(node)\"\r\n >{{ node.name }}</mat-checkbox\r\n >\r\n </mat-tree-node>\r\n\r\n <mat-tree-node\r\n *matTreeNodeDef=\"let node; when: hasChild\"\r\n matTreeNodePadding\r\n [ngClass]=\"getChecklistSelectionIsSelected(node) ? 'selected' : ''\"\r\n (click)=\"todoItemSelectionToggle($event, nestedNodeMap.get(node)!)\"\r\n >\r\n <button\r\n type=\"button\"\r\n matIconButton\r\n matTreeNodeToggle\r\n [attr.aria-label]=\"'toggle ' + node.name\"\r\n >\r\n <mat-icon\r\n class=\"mat-icon-rtl-mirror\"\r\n [svgIcon]=\"\r\n componentTree.isExpanded(node)\r\n ? 'mat_outline:expand_more'\r\n : 'mat_outline:chevron_right'\r\n \"\r\n >\r\n </mat-icon>\r\n </button>\r\n\r\n <mat-checkbox\r\n class=\"text-current\"\r\n [checked]=\"descendantsAllSelected(nestedNodeMap.get(node)!)\"\r\n [color]=\"'primary'\"\r\n [indeterminate]=\"\r\n descendantsPartiallySelected(nestedNodeMap.get(node)!)\r\n \"\r\n >{{ node.name }}</mat-checkbox\r\n >\r\n </mat-tree-node>\r\n </mat-tree>\r\n </div>\r\n </mat-select>\r\n} @else {\r\n <mat-select\r\n #componentSelect\r\n [placeholder]=\"placeholder\"\r\n [required]=\"required\"\r\n [formControl]=\"selectControl\"\r\n [compareWith]=\"compareWith()\"\r\n (focusin)=\"onFocusIn()\"\r\n (openedChange)=\"openedChange($event)\"\r\n >\r\n <mat-select-trigger>\r\n @if (!customTriggerLabelFn()) {\r\n {{ simpleTriggerLabelFn(checklistSelection.selected) }}\r\n } @else {\r\n {{ customTriggerLabelFn()!(checklistSelection.selected) }}\r\n }\r\n </mat-select-trigger>\r\n\r\n <div (focusout)=\"onFocusOut($event)\">\r\n @if (overallSearchEnabled()) {\r\n <mat-option>\r\n <cmat-select-search\r\n [showNoFoundLabel]=\"showNoFoundLabel()\"\r\n [noEntriesFoundLabel]=\"noEntriesFoundLabel()\"\r\n [formControl]=\"overallFilterControl\"\r\n [clearSearchInput]=\"true\"\r\n [toggleAllCheckboxIndeterminate]=\"isIndeterminate()\"\r\n [toggleAllCheckboxChecked]=\"isChecked()\"\r\n [showToggleAllCheckbox]=\"false\"\r\n (toggleAll)=\"toggleSelectAll($event)\"\r\n >\r\n </cmat-select-search>\r\n </mat-option>\r\n }\r\n @if (canNull() && treeDataSource().length !== 0) {\r\n <mat-option class=\"pl-10\" (click)=\"clearSelection()\">\u7A7A</mat-option>\r\n }\r\n @for (selectData of matSelectData(); track selectData.id) {\r\n <mat-option class=\"hidden\" [value]=\"selectData\">{{\r\n selectData.name\r\n }}</mat-option>\r\n }\r\n\r\n <mat-tree\r\n #componentTree\r\n [dataSource]=\"treeDataSource()\"\r\n [childrenAccessor]=\"childrenAccessor\"\r\n >\r\n <mat-tree-node\r\n *matTreeNodeDef=\"let node\"\r\n matTreeNodePadding\r\n [ngClass]=\"getChecklistSelectionIsSelected(node) ? 'selected' : ''\"\r\n (click)=\"\r\n todoLeafItemSelectionToggle($event, nestedNodeMap.get(node)!)\r\n \"\r\n >\r\n <button type=\"button\" matIconButton disabled></button>\r\n <span class=\"text-current\">{{ node.name }}</span>\r\n </mat-tree-node>\r\n\r\n <mat-tree-node\r\n *matTreeNodeDef=\"let node; when: hasChild\"\r\n matTreeNodePadding\r\n [ngClass]=\"getChecklistSelectionIsSelected(node) ? 'selected' : ''\"\r\n (click)=\"todoItemSelectionToggle($event, nestedNodeMap.get(node)!)\"\r\n >\r\n <button\r\n type=\"button\"\r\n matIconButton\r\n matTreeNodeToggle\r\n [attr.aria-label]=\"'toggle ' + node.name\"\r\n >\r\n <mat-icon\r\n class=\"mat-icon-rtl-mirror\"\r\n [svgIcon]=\"\r\n componentTree.isExpanded(node)\r\n ? 'mat_outline:expand_more'\r\n : 'mat_outline:chevron_right'\r\n \"\r\n >\r\n </mat-icon>\r\n </button>\r\n <span class=\"text-current\">{{ node.name }}</span>\r\n </mat-tree-node>\r\n </mat-tree>\r\n </div>\r\n </mat-select>\r\n}\r\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:47px!important;line-height:47px!important}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: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i2.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", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "directive", type: i2.MatSelectTrigger, selector: "mat-select-trigger" }, { kind: "component", type: i2.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", "debounceTime", "optionsCount"], outputs: ["toggleAll"], exportAs: ["cmatSelectSearch"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatTreeModule }, { kind: "directive", type: i4.MatTreeNodeDef, selector: "[matTreeNodeDef]", inputs: ["matTreeNodeDefWhen", "matTreeNode"] }, { kind: "directive", type: i4.MatTreeNodePadding, selector: "[matTreeNodePadding]", inputs: ["matTreeNodePadding", "matTreeNodePaddingIndent"] }, { kind: "directive", type: i4.MatTreeNodeToggle, selector: "[matTreeNodeToggle]", inputs: ["matTreeNodeToggleRecursive"] }, { kind: "component", type: i4.MatTree, selector: "mat-tree", exportAs: ["matTree"] }, { kind: "directive", type: i4.MatTreeNode, selector: "mat-tree-node", inputs: ["tabIndex", "disabled"], outputs: ["activation", "expandedChange"], exportAs: ["matTreeNode"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i5.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i6.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
653
- }
654
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: CmatSelectTreeComponent, decorators: [{
655
- type: Component,
656
- args: [{ selector: 'cmat-select-tree', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [
657
- { provide: MatFormFieldControl, useExisting: CmatSelectTreeComponent },
658
- ], exportAs: 'cmatSelectTree', imports: [
659
- MatIconModule,
660
- MatSelectModule,
661
- CmatSelectSearchComponent,
662
- ReactiveFormsModule,
663
- MatTreeModule,
664
- NgClass,
665
- MatButtonModule,
666
- MatCheckboxModule,
667
- ], host: {
668
- // eslint-disable-next-line @typescript-eslint/naming-convention
669
- '[attr.id]': 'id',
670
- }, template: " \r\n@if (multiple()) {\r\n <mat-select\r\n #componentSelect\r\n multiple\r\n [placeholder]=\"placeholder\"\r\n [required]=\"required\"\r\n [formControl]=\"selectControl\"\r\n [compareWith]=\"compareWith()\"\r\n (openedChange)=\"openedChange($event)\"\r\n (focusin)=\"onFocusIn()\"\r\n >\r\n <mat-select-trigger>\r\n @if (!customTriggerLabelFn()) {\r\n {{ simpleTriggerLabelFn(checklistSelection.selected) }}\r\n } @else {\r\n {{ customTriggerLabelFn()!(checklistSelection.selected) }}\r\n }\r\n </mat-select-trigger>\r\n\r\n <div (focusout)=\"onFocusOut($event)\">\r\n @if (overallSearchEnabled()) {\r\n <mat-option>\r\n <cmat-select-search\r\n #searchComponent\r\n [showNoFoundLabel]=\"showNoFoundLabel()\"\r\n [noEntriesFoundLabel]=\"noEntriesFoundLabel()\"\r\n [formControl]=\"overallFilterControl\"\r\n [clearSearchInput]=\"true\"\r\n [toggleAllCheckboxIndeterminate]=\"isIndeterminate()\"\r\n [toggleAllCheckboxChecked]=\"isChecked()\"\r\n [showToggleAllCheckbox]=\"showToggleAllCheckbox() && multiple()\"\r\n (toggleAll)=\"toggleSelectAll($event)\"\r\n >\r\n </cmat-select-search>\r\n </mat-option>\r\n }\r\n @for (selectData of matSelectData(); track selectData.id) {\r\n <mat-option class=\"hidden\" [value]=\"selectData\">{{\r\n selectData.name\r\n }}</mat-option>\r\n }\r\n <mat-tree\r\n #componentTree\r\n [dataSource]=\"treeDataSource()\"\r\n [childrenAccessor]=\"childrenAccessor\"\r\n >\r\n <mat-tree-node\r\n *matTreeNodeDef=\"let node\"\r\n matTreeNodePadding\r\n [ngClass]=\"getChecklistSelectionIsSelected(node) ? 'selected' : ''\"\r\n (click)=\"\r\n todoLeafItemSelectionToggle($event, nestedNodeMap.get(node)!)\r\n \"\r\n >\r\n <button type=\"button\" matIconButton disabled></button>\r\n <mat-checkbox\r\n class=\"checklist-leaf-node text-current\"\r\n [color]=\"'primary'\"\r\n [checked]=\"getChecklistSelectionIsSelected(node)\"\r\n >{{ node.name }}</mat-checkbox\r\n >\r\n </mat-tree-node>\r\n\r\n <mat-tree-node\r\n *matTreeNodeDef=\"let node; when: hasChild\"\r\n matTreeNodePadding\r\n [ngClass]=\"getChecklistSelectionIsSelected(node) ? 'selected' : ''\"\r\n (click)=\"todoItemSelectionToggle($event, nestedNodeMap.get(node)!)\"\r\n >\r\n <button\r\n type=\"button\"\r\n matIconButton\r\n matTreeNodeToggle\r\n [attr.aria-label]=\"'toggle ' + node.name\"\r\n >\r\n <mat-icon\r\n class=\"mat-icon-rtl-mirror\"\r\n [svgIcon]=\"\r\n componentTree.isExpanded(node)\r\n ? 'mat_outline:expand_more'\r\n : 'mat_outline:chevron_right'\r\n \"\r\n >\r\n </mat-icon>\r\n </button>\r\n\r\n <mat-checkbox\r\n class=\"text-current\"\r\n [checked]=\"descendantsAllSelected(nestedNodeMap.get(node)!)\"\r\n [color]=\"'primary'\"\r\n [indeterminate]=\"\r\n descendantsPartiallySelected(nestedNodeMap.get(node)!)\r\n \"\r\n >{{ node.name }}</mat-checkbox\r\n >\r\n </mat-tree-node>\r\n </mat-tree>\r\n </div>\r\n </mat-select>\r\n} @else {\r\n <mat-select\r\n #componentSelect\r\n [placeholder]=\"placeholder\"\r\n [required]=\"required\"\r\n [formControl]=\"selectControl\"\r\n [compareWith]=\"compareWith()\"\r\n (focusin)=\"onFocusIn()\"\r\n (openedChange)=\"openedChange($event)\"\r\n >\r\n <mat-select-trigger>\r\n @if (!customTriggerLabelFn()) {\r\n {{ simpleTriggerLabelFn(checklistSelection.selected) }}\r\n } @else {\r\n {{ customTriggerLabelFn()!(checklistSelection.selected) }}\r\n }\r\n </mat-select-trigger>\r\n\r\n <div (focusout)=\"onFocusOut($event)\">\r\n @if (overallSearchEnabled()) {\r\n <mat-option>\r\n <cmat-select-search\r\n [showNoFoundLabel]=\"showNoFoundLabel()\"\r\n [noEntriesFoundLabel]=\"noEntriesFoundLabel()\"\r\n [formControl]=\"overallFilterControl\"\r\n [clearSearchInput]=\"true\"\r\n [toggleAllCheckboxIndeterminate]=\"isIndeterminate()\"\r\n [toggleAllCheckboxChecked]=\"isChecked()\"\r\n [showToggleAllCheckbox]=\"false\"\r\n (toggleAll)=\"toggleSelectAll($event)\"\r\n >\r\n </cmat-select-search>\r\n </mat-option>\r\n }\r\n @if (canNull() && treeDataSource().length !== 0) {\r\n <mat-option class=\"pl-10\" (click)=\"clearSelection()\">\u7A7A</mat-option>\r\n }\r\n @for (selectData of matSelectData(); track selectData.id) {\r\n <mat-option class=\"hidden\" [value]=\"selectData\">{{\r\n selectData.name\r\n }}</mat-option>\r\n }\r\n\r\n <mat-tree\r\n #componentTree\r\n [dataSource]=\"treeDataSource()\"\r\n [childrenAccessor]=\"childrenAccessor\"\r\n >\r\n <mat-tree-node\r\n *matTreeNodeDef=\"let node\"\r\n matTreeNodePadding\r\n [ngClass]=\"getChecklistSelectionIsSelected(node) ? 'selected' : ''\"\r\n (click)=\"\r\n todoLeafItemSelectionToggle($event, nestedNodeMap.get(node)!)\r\n \"\r\n >\r\n <button type=\"button\" matIconButton disabled></button>\r\n <span class=\"text-current\">{{ node.name }}</span>\r\n </mat-tree-node>\r\n\r\n <mat-tree-node\r\n *matTreeNodeDef=\"let node; when: hasChild\"\r\n matTreeNodePadding\r\n [ngClass]=\"getChecklistSelectionIsSelected(node) ? 'selected' : ''\"\r\n (click)=\"todoItemSelectionToggle($event, nestedNodeMap.get(node)!)\"\r\n >\r\n <button\r\n type=\"button\"\r\n matIconButton\r\n matTreeNodeToggle\r\n [attr.aria-label]=\"'toggle ' + node.name\"\r\n >\r\n <mat-icon\r\n class=\"mat-icon-rtl-mirror\"\r\n [svgIcon]=\"\r\n componentTree.isExpanded(node)\r\n ? 'mat_outline:expand_more'\r\n : 'mat_outline:chevron_right'\r\n \"\r\n >\r\n </mat-icon>\r\n </button>\r\n <span class=\"text-current\">{{ node.name }}</span>\r\n </mat-tree-node>\r\n </mat-tree>\r\n </div>\r\n </mat-select>\r\n}\r\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:47px!important;line-height:47px!important}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"] }]
671
- }], ctorParameters: () => [], propDecorators: { dataSource: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataSource", required: false }] }], noEntriesFoundLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "noEntriesFoundLabel", required: false }] }], showNoFoundLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "showNoFoundLabel", required: false }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], overallSearchEnabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "overallSearchEnabled", required: false }] }], canNull: [{ type: i0.Input, args: [{ isSignal: true, alias: "canNull", required: false }] }], customTriggerLabelFn: [{ type: i0.Input, args: [{ isSignal: true, alias: "customTriggerLabelFn", required: false }] }], customTriggerLabelTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "customTriggerLabelTemplate", required: false }] }], expandable: [{ type: i0.Input, args: [{ isSignal: true, alias: "expandable", required: false }] }], showToggleAllCheckbox: [{ type: i0.Input, args: [{ isSignal: true, alias: "showToggleAllCheckbox", required: false }] }], compareWith: [{ type: i0.Input, args: [{ isSignal: true, alias: "compareWith", required: false }] }], tree: [{ type: i0.ViewChild, args: ['componentTree', { isSignal: true }] }], _matSelectSignal: [{ type: i0.ViewChild, args: ['componentSelect', { isSignal: true }] }], _matSelectSearch: [{ type: i0.ViewChild, args: [i0.forwardRef(() => CmatSelectSearchComponent), { isSignal: true }] }], clickedOut: [{
672
- type: HostListener,
673
- args: ['document:click']
674
- }], placeholder: [{
675
- type: Input
676
- }], value: [{
677
- type: Input
678
- }], required: [{
679
- type: Input
680
- }], disabled: [{
681
- type: Input
682
- }] } });
683
-
684
- class CmatSelectTreeNode {
685
- }
686
-
687
- /**
688
- * Generated bundle index. Do not edit.
689
- */
690
-
25
+ var CmatSelectTreeComponent = class CmatSelectTreeComponent {
26
+ constructor() {
27
+ this.id = `cmat-select-tree-${NEXT_ID++}`;
28
+ this.dataSource = input([], ...ngDevMode ? [{ debugName: "dataSource" }] : /* istanbul ignore next */ []);
29
+ this.noEntriesFoundLabel = input("无结果", ...ngDevMode ? [{ debugName: "noEntriesFoundLabel" }] : /* istanbul ignore next */ []);
30
+ this.showNoFoundLabel = input(true, ...ngDevMode ? [{ debugName: "showNoFoundLabel" }] : /* istanbul ignore next */ []);
31
+ this.multiple = input(false, ...ngDevMode ? [{ debugName: "multiple" }] : /* istanbul ignore next */ []);
32
+ this.overallSearchEnabled = input(true, ...ngDevMode ? [{ debugName: "overallSearchEnabled" }] : /* istanbul ignore next */ []);
33
+ this.canNull = input(false, ...ngDevMode ? [{ debugName: "canNull" }] : /* istanbul ignore next */ []);
34
+ this.customTriggerLabelFn = input(...ngDevMode ? [void 0, { debugName: "customTriggerLabelFn" }] : /* istanbul ignore next */ []);
35
+ this.customTriggerLabelTemplate = input(...ngDevMode ? [void 0, { debugName: "customTriggerLabelTemplate" }] : /* istanbul ignore next */ []);
36
+ this.expandable = input(...ngDevMode ? [void 0, { debugName: "expandable" }] : /* istanbul ignore next */ []);
37
+ this.showToggleAllCheckbox = input(false, ...ngDevMode ? [{ debugName: "showToggleAllCheckbox" }] : /* istanbul ignore next */ []);
38
+ this.compareWith = input((o1, o2) => {
39
+ return o1 && o2 ? o1?.name === o2?.name && o1?.id === o2?.id : o1 === o2;
40
+ }, ...ngDevMode ? [{ debugName: "compareWith" }] : /* istanbul ignore next */ []);
41
+ this.flatNodeMap = /* @__PURE__ */ new Map();
42
+ this.nestedNodeMap = /* @__PURE__ */ new Map();
43
+ this._flatNodeById = /* @__PURE__ */ new Map();
44
+ this._parentFlatNodeById = /* @__PURE__ */ new Map();
45
+ this._selectedFlatNodeIds = /* @__PURE__ */ new Set();
46
+ this.checklistSelection = new SelectionModel(true);
47
+ this.treeDataSource = signal([], ...ngDevMode ? [{ debugName: "treeDataSource" }] : /* istanbul ignore next */ []);
48
+ this.dataFlatNodes = signal([], ...ngDevMode ? [{ debugName: "dataFlatNodes" }] : /* istanbul ignore next */ []);
49
+ this.overallFilterControl = new FormControl();
50
+ this.isIndeterminate = signal(false, ...ngDevMode ? [{ debugName: "isIndeterminate" }] : /* istanbul ignore next */ []);
51
+ this.isChecked = signal(false, ...ngDevMode ? [{ debugName: "isChecked" }] : /* istanbul ignore next */ []);
52
+ this.checkCount = signal(0, ...ngDevMode ? [{ debugName: "checkCount" }] : /* istanbul ignore next */ []);
53
+ this.selectControl = new FormControl();
54
+ this.matSelectData = signal([], ...ngDevMode ? [{ debugName: "matSelectData" }] : /* istanbul ignore next */ []);
55
+ this.stateChanges = new Subject();
56
+ this.focused = false;
57
+ this.touched = false;
58
+ this.ngControl = inject(NgControl, {
59
+ optional: true,
60
+ self: true
61
+ });
62
+ this._destroyRef = inject(DestroyRef);
63
+ this.tree = viewChild("componentTree", ...ngDevMode ? [{ debugName: "tree" }] : /* istanbul ignore next */ []);
64
+ this._matSelectSignal = viewChild("componentSelect", ...ngDevMode ? [{ debugName: "_matSelectSignal" }] : /* istanbul ignore next */ []);
65
+ this._matSelectSearch = viewChild(CmatSelectSearchComponent, ...ngDevMode ? [{ debugName: "_matSelectSearch" }] : /* istanbul ignore next */ []);
66
+ this.getLevel = (dataNode) => dataNode.level;
67
+ this.childrenAccessor = (node) => node.children ?? [];
68
+ this.hasChild = (_, node) => !!node.children && node.children.length > 0;
69
+ this._placeholder = "";
70
+ this._required = false;
71
+ this._disabled = false;
72
+ this._onModelChange = () => {};
73
+ this._onTouchedChange = () => {};
74
+ this._transformer = (node, level, parent = null) => {
75
+ const existingNode = this.nestedNodeMap.get(node);
76
+ const flatNode = existingNode?.name === node.name ? existingNode : new CmatSelectTreeFlatNode();
77
+ flatNode.id = node.id;
78
+ flatNode.name = node.name;
79
+ flatNode.level = level;
80
+ flatNode.expandable = !!node.children && node.children.length > 0;
81
+ this.flatNodeMap.set(flatNode, node);
82
+ this.nestedNodeMap.set(node, flatNode);
83
+ this._flatNodeById.set(flatNode.id, flatNode);
84
+ this._parentFlatNodeById.set(flatNode.id, parent);
85
+ return flatNode;
86
+ };
87
+ if (this.ngControl != null) this.ngControl.valueAccessor = this;
88
+ effect(() => {
89
+ const matSelect = this._matSelectSignal();
90
+ if (matSelect && !this._matSelect) {
91
+ this._matSelect = matSelect;
92
+ {
93
+ untracked(() => {
94
+ this._init(this.value);
95
+ });
96
+ this._matSelect.setDisabledState(this.disabled);
97
+ let panelClass = ["overflow-y-auto", "scrollbar-custom"];
98
+ if (this._matSelect.panelClass) {
99
+ if (Array.isArray(this._matSelect.panelClass)) this._matSelect.panelClass = [this._matSelect.panelClass, ...panelClass];
100
+ else if (typeof this._matSelect.panelClass === "string") this._matSelect.panelClass = [this._matSelect.panelClass, ...panelClass];
101
+ else if (typeof this._matSelect.panelClass === "object") {
102
+ const panelClassEntries = this._matSelect.panelClass;
103
+ panelClass.forEach((i) => {
104
+ panelClassEntries[i] = true;
105
+ });
106
+ }
107
+ } else this._matSelect.panelClass = panelClass;
108
+ }
109
+ }
110
+ });
111
+ }
112
+ clickedOut() {
113
+ if (!this._matSelect?.panelOpen) {
114
+ this.focused = false;
115
+ this.stateChanges.next();
116
+ }
117
+ }
118
+ ngOnChanges(changes) {
119
+ if (changes["dataSource"]) {
120
+ this.flatNodeMap.clear();
121
+ this.nestedNodeMap.clear();
122
+ this._flatNodeById.clear();
123
+ this._parentFlatNodeById.clear();
124
+ const dataSource = this.dataSource();
125
+ this.treeDataSource.set(dataSource);
126
+ this.dataFlatNodes.set(this._getFlattenNodes(dataSource));
127
+ this.matSelectData.set([...this.dataFlatNodes()]);
128
+ if (dataSource.length > 0) this._init(this.value);
129
+ }
130
+ }
131
+ ngAfterViewInit() {
132
+ this.overallFilterControl.valueChanges.pipe(takeUntilDestroyed(this._destroyRef), debounceTime(200)).subscribe(() => {
133
+ const filterValue = `${this.overallFilterControl.value ?? ""}`.toLowerCase();
134
+ const dataClone = this._cloneTreeNodes(this.dataSource());
135
+ const arr = [];
136
+ for (let i = dataClone.length - 1; i >= 0; i--) if (!this._applyColumnLevelFilters(dataClone[i], filterValue)) arr.push(i);
137
+ arr.forEach((v) => {
138
+ dataClone.splice(v, 1);
139
+ });
140
+ this.treeDataSource.set(dataClone);
141
+ this.dataFlatNodes.set(this._getFlattenNodes(dataClone));
142
+ this.matSelectData.set([...this.dataFlatNodes()]);
143
+ const treeInstance = this.tree();
144
+ if (treeInstance && this.expandable()) treeInstance.expandAll();
145
+ this._updateSelect(this.checklistSelection.selected);
146
+ });
147
+ }
148
+ ngOnDestroy() {
149
+ this.stateChanges.complete();
150
+ }
151
+ get placeholder() {
152
+ return this._placeholder;
153
+ }
154
+ set placeholder(value) {
155
+ this._placeholder = value;
156
+ this.stateChanges.next();
157
+ }
158
+ get value() {
159
+ return this._value;
160
+ }
161
+ set value(value) {
162
+ if (value !== this._value) {
163
+ this._value = value;
164
+ this.stateChanges.next();
165
+ this._onModelChange(value);
166
+ }
167
+ }
168
+ get empty() {
169
+ return !this._value;
170
+ }
171
+ get errorState() {
172
+ if (this.ngControl == null) return false;
173
+ return (this.touched && this.ngControl?.invalid) ?? false;
174
+ }
175
+ get shouldLabelFloat() {
176
+ return this.focused || !this.empty;
177
+ }
178
+ get required() {
179
+ return this._required;
180
+ }
181
+ set required(value) {
182
+ this._required = coerceBooleanProperty(value);
183
+ this.stateChanges.next();
184
+ }
185
+ get disabled() {
186
+ if (!isNil(this.ngControl?.disabled)) return this.ngControl.disabled;
187
+ return this._disabled;
188
+ }
189
+ set disabled(value) {
190
+ this._disabled = coerceBooleanProperty(value);
191
+ if (this.focused) {
192
+ this.focused = false;
193
+ this.stateChanges.next();
194
+ }
195
+ this._matSelect?.setDisabledState(this._disabled);
196
+ }
197
+ registerOnChange(fn) {
198
+ this._onModelChange = fn;
199
+ }
200
+ registerOnTouched(fn) {
201
+ this._onTouchedChange = fn;
202
+ }
203
+ setDisabledState(isDisabled) {
204
+ this._matSelect?.setDisabledState(isDisabled);
205
+ }
206
+ setDescribedByIds(ids) {
207
+ this._matSelect?.setDescribedByIds(ids);
208
+ }
209
+ onContainerClick() {
210
+ if (!this.focused) this._matSelect?.focus();
211
+ }
212
+ onFocusIn() {
213
+ if (!this.focused) {
214
+ this.focused = true;
215
+ this.stateChanges.next();
216
+ }
217
+ }
218
+ onFocusOut(event) {
219
+ const relatedTarget = event.relatedTarget;
220
+ const panelElement = this._matSelect?.panel?.nativeElement;
221
+ if (!(relatedTarget instanceof Element) || !panelElement?.contains(relatedTarget)) {
222
+ this.touched = true;
223
+ this.focused = false;
224
+ this._onTouchedChange();
225
+ this.stateChanges.next();
226
+ }
227
+ }
228
+ writeValue(value) {
229
+ this._init(value);
230
+ }
231
+ simpleTriggerLabelFn(value) {
232
+ return value.map((node) => {
233
+ if (isNil(node)) return "";
234
+ const customTriggerLabelTemplate = this.customTriggerLabelTemplate();
235
+ if (isNil(customTriggerLabelTemplate) || typeof customTriggerLabelTemplate !== "string" || customTriggerLabelTemplate.trim().length === 0) return `${node.id}`;
236
+ let atLeastPartialSubstitution = false;
237
+ const nodeRecord = node;
238
+ const substitution = customTriggerLabelTemplate.replace(/[$][{]([^}]+)[}]/g, (_, key) => {
239
+ const nodeValue = nodeRecord[key];
240
+ if (isNil(nodeValue) || typeof nodeValue !== "string" && typeof nodeValue !== "number" && typeof nodeValue !== "boolean" && typeof nodeValue !== "bigint") return "";
241
+ atLeastPartialSubstitution = true;
242
+ return String(nodeValue);
243
+ });
244
+ if (atLeastPartialSubstitution === false) return `${node.id}`;
245
+ return substitution.trim();
246
+ }).join(", ");
247
+ }
248
+ openedChange(opened) {
249
+ if (opened) {
250
+ if (this.multiple()) {
251
+ this.checklistSelection.selected.forEach((node) => {
252
+ if (node.expandable) {
253
+ const descendants = this._getDescendants(node);
254
+ this.checklistSelection.select(...descendants);
255
+ }
256
+ });
257
+ this._updateSelect(this.checklistSelection.selected);
258
+ }
259
+ const treeInstance = this.tree();
260
+ if (treeInstance && this.expandable()) treeInstance.expandAll();
261
+ } else setTimeout(() => {
262
+ if (!isNil(this.checklistSelection.selected)) {
263
+ if (this.multiple()) {
264
+ const findOutNode = [];
265
+ this.checklistSelection.selected.forEach((node) => {
266
+ const parentNode = this._getParentNode(node);
267
+ if (parentNode && this.checklistSelection.isSelected(parentNode)) findOutNode.push(node);
268
+ });
269
+ findOutNode.forEach((node) => {
270
+ this.checklistSelection.deselect(node);
271
+ });
272
+ this.value = this.checklistSelection.selected.length > 0 ? [...this.checklistSelection.selected] : null;
273
+ } else if (this.checklistSelection.selected && this.checklistSelection.selected.length > 0) this.value = { ...this.checklistSelection.selected[0] };
274
+ this._matSelect?.writeValue(this.value);
275
+ this._matSelect?._onChange(this.value);
276
+ }
277
+ }, 100);
278
+ }
279
+ descendantsAllSelected(node) {
280
+ return this._getDescendants(node).every((child) => this._selectedFlatNodeIds.has(child.id));
281
+ }
282
+ descendantsPartiallySelected(node) {
283
+ const descendants = this._getDescendants(node);
284
+ return descendants.some((child) => this._selectedFlatNodeIds.has(child.id)) && !descendants.every((child) => this._selectedFlatNodeIds.has(child.id));
285
+ }
286
+ todoItemSelectionToggle(event, node) {
287
+ event.stopPropagation();
288
+ if (this.multiple()) {
289
+ this.checklistSelection.toggle(node);
290
+ const descendants = this._getDescendants(node);
291
+ if (this.checklistSelection.isSelected(node)) this.checklistSelection.select(...descendants);
292
+ else this.checklistSelection.deselect(...descendants);
293
+ this._checkAllParentsSelection(node);
294
+ this._syncSelectedFlatNodeIds();
295
+ this._updateCheckState();
296
+ } else {
297
+ this.checklistSelection.clear();
298
+ this.checklistSelection.select(node);
299
+ this._syncSelectedFlatNodeIds();
300
+ this._matSelect?.close();
301
+ }
302
+ }
303
+ todoLeafItemSelectionToggle(event, node) {
304
+ event.stopPropagation();
305
+ if (this.multiple()) {
306
+ this.checklistSelection.toggle(node);
307
+ this._checkAllParentsSelection(node);
308
+ this._syncSelectedFlatNodeIds();
309
+ this._updateCheckState();
310
+ } else {
311
+ this.checklistSelection.clear();
312
+ this.checklistSelection.select(node);
313
+ this._syncSelectedFlatNodeIds();
314
+ this._matSelect?.close();
315
+ }
316
+ }
317
+ clearSelection() {
318
+ this.checklistSelection.clear();
319
+ this.isChecked.set(false);
320
+ this.isIndeterminate.set(false);
321
+ this.checkCount.set(0);
322
+ this._selectedFlatNodeIds.clear();
323
+ this.value = null;
324
+ this._matSelect?.writeValue(null);
325
+ this._matSelect?._onChange(null);
326
+ }
327
+ toggleSelectAll(selectAllValue) {
328
+ if (selectAllValue) {
329
+ this.checklistSelection.select(...this.dataFlatNodes());
330
+ this.isIndeterminate.set(false);
331
+ this.isChecked.set(true);
332
+ this._syncSelectedFlatNodeIds();
333
+ } else {
334
+ this.checklistSelection.clear();
335
+ this.isChecked.set(false);
336
+ this.isIndeterminate.set(false);
337
+ this.checkCount.set(0);
338
+ this._selectedFlatNodeIds.clear();
339
+ }
340
+ }
341
+ getChecklistSelectionIsSelected(i) {
342
+ const flatNode = this.nestedNodeMap.get(i);
343
+ return !!flatNode && this._selectedFlatNodeIds.has(flatNode.id);
344
+ }
345
+ _init(v) {
346
+ if (this.dataSource().length > 0 && this.treeDataSource().length > 0 && this._matSelect) {
347
+ const treeInstance = this.tree();
348
+ if (treeInstance && this.expandable()) treeInstance.expandAll();
349
+ if (!isNil(v)) this._updateChecklistSelection(v);
350
+ else this.checklistSelection.clear();
351
+ if (Array.isArray(v) && v.length > 0) {
352
+ if (this.multiple()) {
353
+ const findOutNode = [];
354
+ this.checklistSelection.selected.forEach((node) => {
355
+ const parentNode = this._getParentNode(node);
356
+ if (parentNode && this.checklistSelection.isSelected(parentNode)) findOutNode.push(node);
357
+ });
358
+ findOutNode.forEach((node) => {
359
+ this.checklistSelection.deselect(node);
360
+ });
361
+ this.value = [...this.checklistSelection.selected];
362
+ } else this.value = this.checklistSelection.selected.length > 0 ? { ...this.checklistSelection.selected[0] } : null;
363
+ } else this.value = v;
364
+ if (this._matSelect) {
365
+ this._matSelect.writeValue(this.value);
366
+ this._matSelect._onChange(this.value);
367
+ }
368
+ this._updateCheckState();
369
+ } else this.value = v;
370
+ }
371
+ _checkAllParentsSelection(node) {
372
+ let parent = this._getParentNode(node);
373
+ while (parent) {
374
+ parent.expandable = true;
375
+ const treeInstance = this.tree();
376
+ if (treeInstance) treeInstance.expand(this.flatNodeMap.get(parent));
377
+ this._checkRootNodeSelection(parent);
378
+ parent = this._getParentNode(parent);
379
+ }
380
+ }
381
+ _checkRootNodeSelection(node) {
382
+ const nodeSelected = this.checklistSelection.isSelected(node);
383
+ const descendants = this._getDescendants(node);
384
+ const descAllSelected = descendants.every((child) => this.checklistSelection.isSelected(child));
385
+ if (nodeSelected && !descAllSelected) this.checklistSelection.deselect(node);
386
+ else if (!nodeSelected && (descAllSelected || descendants.length === 0)) this.checklistSelection.select(node);
387
+ this._updateCheckState();
388
+ }
389
+ _getParentNode(node) {
390
+ return this._parentFlatNodeById.get(node.id) ?? null;
391
+ }
392
+ _updateChecklistSelection(value) {
393
+ this.checklistSelection.clear();
394
+ if (!isNil(value)) {
395
+ (!Array.isArray(value) ? [value] : value).forEach((item) => {
396
+ const nodeFound = this._flatNodeById.get(item.id);
397
+ if (isNil(nodeFound)) return;
398
+ this.checklistSelection.select(nodeFound);
399
+ });
400
+ this._syncSelectedFlatNodeIds();
401
+ }
402
+ }
403
+ _updateSelect(value) {
404
+ if (!isNil(value)) {
405
+ const valueArray = !Array.isArray(value) ? [value] : value;
406
+ if (this.overallSearchEnabled()) valueArray.forEach((item) => {
407
+ const nodeFound = this._flatNodeById.get(item.id);
408
+ if (isNil(nodeFound)) return;
409
+ this.checklistSelection.deselect(item);
410
+ this.checklistSelection.select(nodeFound);
411
+ });
412
+ if (this.multiple()) this.checklistSelection.selected.forEach((item) => {
413
+ this._checkAllParentsSelection(item);
414
+ });
415
+ this._syncSelectedFlatNodeIds();
416
+ this._updateCheckState();
417
+ }
418
+ }
419
+ _applyColumnLevelFilters(node, filter) {
420
+ let result = false;
421
+ if (node?.children && node.children.length > 0) for (let i = node.children.length - 1; i >= 0; i--) {
422
+ const resultTemp = this._applyColumnLevelFilters(node.children[i], filter);
423
+ if (!resultTemp) node.children.splice(i, 1);
424
+ result = resultTemp || result;
425
+ }
426
+ if (node?.children?.length === 0) node.children = null;
427
+ if (node.name.toLowerCase().includes(filter)) result = true;
428
+ return result;
429
+ }
430
+ _updateCheckState() {
431
+ if (this.showToggleAllCheckbox() && this.dataSource().length > 0) {
432
+ const selectedCount = this._selectedFlatNodeIds.size;
433
+ this.checkCount.set(selectedCount);
434
+ this.isIndeterminate.set(selectedCount < this.dataFlatNodes().length && selectedCount > 0);
435
+ this.isChecked.set(selectedCount === this.dataFlatNodes().length && selectedCount > 0);
436
+ }
437
+ }
438
+ _getFlattenNodes(nodes, i = 0, parent = null) {
439
+ const flattenedNodes = [];
440
+ for (const node of nodes) {
441
+ const flatNode = this._transformer(node, i, parent);
442
+ flattenedNodes.push(flatNode);
443
+ if (node.children) flattenedNodes.push(...this._getFlattenNodes(node.children, i + 1, flatNode));
444
+ }
445
+ return flattenedNodes;
446
+ }
447
+ _cloneTreeNodes(nodes) {
448
+ return nodes.map((node) => ({
449
+ id: node.id,
450
+ name: node.name,
451
+ children: node.children ? this._cloneTreeNodes(node.children) : null
452
+ }));
453
+ }
454
+ _syncSelectedFlatNodeIds() {
455
+ this._selectedFlatNodeIds.clear();
456
+ this.checklistSelection.selected.forEach((node) => {
457
+ this._selectedFlatNodeIds.add(node.id);
458
+ });
459
+ this.checkCount.set(this._selectedFlatNodeIds.size);
460
+ }
461
+ _getDescendants(dataNode) {
462
+ const node = this.flatNodeMap.get(dataNode);
463
+ if (!node?.children?.length) return [];
464
+ const descendants = [];
465
+ const collect = (children) => {
466
+ for (const child of children) {
467
+ const flatNode = this.nestedNodeMap.get(child);
468
+ if (flatNode) descendants.push(flatNode);
469
+ if (child.children?.length) collect(child.children);
470
+ }
471
+ };
472
+ collect(node.children);
473
+ return descendants;
474
+ }
475
+ static {
476
+ this.ɵfac = i0.ɵɵngDeclareFactory({
477
+ minVersion: "12.0.0",
478
+ version: "22.2.3",
479
+ ngImport: i0,
480
+ type: CmatSelectTreeComponent,
481
+ deps: [],
482
+ target: i0.ɵɵFactoryTarget.Component
483
+ });
484
+ }
485
+ static {
486
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
487
+ minVersion: "17.0.0",
488
+ version: "22.2.3",
489
+ type: CmatSelectTreeComponent,
490
+ isStandalone: true,
491
+ selector: "cmat-select-tree",
492
+ inputs: {
493
+ dataSource: {
494
+ classPropertyName: "dataSource",
495
+ publicName: "dataSource",
496
+ isSignal: true,
497
+ isRequired: false,
498
+ transformFunction: null
499
+ },
500
+ noEntriesFoundLabel: {
501
+ classPropertyName: "noEntriesFoundLabel",
502
+ publicName: "noEntriesFoundLabel",
503
+ isSignal: true,
504
+ isRequired: false,
505
+ transformFunction: null
506
+ },
507
+ showNoFoundLabel: {
508
+ classPropertyName: "showNoFoundLabel",
509
+ publicName: "showNoFoundLabel",
510
+ isSignal: true,
511
+ isRequired: false,
512
+ transformFunction: null
513
+ },
514
+ multiple: {
515
+ classPropertyName: "multiple",
516
+ publicName: "multiple",
517
+ isSignal: true,
518
+ isRequired: false,
519
+ transformFunction: null
520
+ },
521
+ overallSearchEnabled: {
522
+ classPropertyName: "overallSearchEnabled",
523
+ publicName: "overallSearchEnabled",
524
+ isSignal: true,
525
+ isRequired: false,
526
+ transformFunction: null
527
+ },
528
+ canNull: {
529
+ classPropertyName: "canNull",
530
+ publicName: "canNull",
531
+ isSignal: true,
532
+ isRequired: false,
533
+ transformFunction: null
534
+ },
535
+ customTriggerLabelFn: {
536
+ classPropertyName: "customTriggerLabelFn",
537
+ publicName: "customTriggerLabelFn",
538
+ isSignal: true,
539
+ isRequired: false,
540
+ transformFunction: null
541
+ },
542
+ customTriggerLabelTemplate: {
543
+ classPropertyName: "customTriggerLabelTemplate",
544
+ publicName: "customTriggerLabelTemplate",
545
+ isSignal: true,
546
+ isRequired: false,
547
+ transformFunction: null
548
+ },
549
+ expandable: {
550
+ classPropertyName: "expandable",
551
+ publicName: "expandable",
552
+ isSignal: true,
553
+ isRequired: false,
554
+ transformFunction: null
555
+ },
556
+ showToggleAllCheckbox: {
557
+ classPropertyName: "showToggleAllCheckbox",
558
+ publicName: "showToggleAllCheckbox",
559
+ isSignal: true,
560
+ isRequired: false,
561
+ transformFunction: null
562
+ },
563
+ compareWith: {
564
+ classPropertyName: "compareWith",
565
+ publicName: "compareWith",
566
+ isSignal: true,
567
+ isRequired: false,
568
+ transformFunction: null
569
+ },
570
+ placeholder: {
571
+ classPropertyName: "placeholder",
572
+ publicName: "placeholder",
573
+ isSignal: false,
574
+ isRequired: false,
575
+ transformFunction: null
576
+ },
577
+ value: {
578
+ classPropertyName: "value",
579
+ publicName: "value",
580
+ isSignal: false,
581
+ isRequired: false,
582
+ transformFunction: null
583
+ },
584
+ required: {
585
+ classPropertyName: "required",
586
+ publicName: "required",
587
+ isSignal: false,
588
+ isRequired: false,
589
+ transformFunction: null
590
+ },
591
+ disabled: {
592
+ classPropertyName: "disabled",
593
+ publicName: "disabled",
594
+ isSignal: false,
595
+ isRequired: false,
596
+ transformFunction: null
597
+ }
598
+ },
599
+ host: {
600
+ listeners: { "document:click": "clickedOut()" },
601
+ properties: { "attr.id": "id" }
602
+ },
603
+ providers: [{
604
+ provide: MatFormFieldControl,
605
+ useExisting: CmatSelectTreeComponent
606
+ }],
607
+ viewQueries: [
608
+ {
609
+ propertyName: "tree",
610
+ first: true,
611
+ predicate: ["componentTree"],
612
+ descendants: true,
613
+ isSignal: true
614
+ },
615
+ {
616
+ propertyName: "_matSelectSignal",
617
+ first: true,
618
+ predicate: ["componentSelect"],
619
+ descendants: true,
620
+ isSignal: true
621
+ },
622
+ {
623
+ propertyName: "_matSelectSearch",
624
+ first: true,
625
+ predicate: CmatSelectSearchComponent,
626
+ descendants: true,
627
+ isSignal: true
628
+ }
629
+ ],
630
+ exportAs: ["cmatSelectTree"],
631
+ usesOnChanges: true,
632
+ ngImport: i0,
633
+ template: " \r\n@if (multiple()) {\r\n <mat-select\r\n #componentSelect\r\n multiple\r\n [placeholder]=\"placeholder\"\r\n [required]=\"required\"\r\n [formControl]=\"selectControl\"\r\n [compareWith]=\"compareWith()\"\r\n (openedChange)=\"openedChange($event)\"\r\n (focusin)=\"onFocusIn()\"\r\n >\r\n <mat-select-trigger>\r\n @if (!customTriggerLabelFn()) {\r\n {{ simpleTriggerLabelFn(checklistSelection.selected) }}\r\n } @else {\r\n {{ customTriggerLabelFn()!(checklistSelection.selected) }}\r\n }\r\n </mat-select-trigger>\r\n\r\n <div (focusout)=\"onFocusOut($event)\">\r\n @if (overallSearchEnabled()) {\r\n <mat-option>\r\n <cmat-select-search\r\n #searchComponent\r\n [showNoFoundLabel]=\"showNoFoundLabel()\"\r\n [noEntriesFoundLabel]=\"noEntriesFoundLabel()\"\r\n [formControl]=\"overallFilterControl\"\r\n [clearSearchInput]=\"true\"\r\n [toggleAllCheckboxIndeterminate]=\"isIndeterminate()\"\r\n [toggleAllCheckboxChecked]=\"isChecked()\"\r\n [showToggleAllCheckbox]=\"showToggleAllCheckbox() && multiple()\"\r\n (toggleAll)=\"toggleSelectAll($event)\"\r\n >\r\n </cmat-select-search>\r\n </mat-option>\r\n }\r\n @for (selectData of matSelectData(); track selectData.id) {\r\n <mat-option class=\"hidden\" [value]=\"selectData\">{{\r\n selectData.name\r\n }}</mat-option>\r\n }\r\n <mat-tree\r\n #componentTree\r\n [dataSource]=\"treeDataSource()\"\r\n [childrenAccessor]=\"childrenAccessor\"\r\n >\r\n <mat-tree-node\r\n *matTreeNodeDef=\"let node\"\r\n matTreeNodePadding\r\n [ngClass]=\"getChecklistSelectionIsSelected(node) ? 'selected' : ''\"\r\n (click)=\"\r\n todoLeafItemSelectionToggle($event, nestedNodeMap.get(node)!)\r\n \"\r\n >\r\n <button type=\"button\" matIconButton disabled></button>\r\n <mat-checkbox\r\n class=\"checklist-leaf-node text-current\"\r\n [color]=\"'primary'\"\r\n [checked]=\"getChecklistSelectionIsSelected(node)\"\r\n >{{ node.name }}</mat-checkbox\r\n >\r\n </mat-tree-node>\r\n\r\n <mat-tree-node\r\n *matTreeNodeDef=\"let node; when: hasChild\"\r\n matTreeNodePadding\r\n [ngClass]=\"getChecklistSelectionIsSelected(node) ? 'selected' : ''\"\r\n (click)=\"todoItemSelectionToggle($event, nestedNodeMap.get(node)!)\"\r\n >\r\n <button\r\n type=\"button\"\r\n matIconButton\r\n matTreeNodeToggle\r\n [attr.aria-label]=\"'toggle ' + node.name\"\r\n >\r\n <mat-icon\r\n class=\"mat-icon-rtl-mirror\"\r\n [svgIcon]=\"\r\n componentTree.isExpanded(node)\r\n ? 'mat_outline:expand_more'\r\n : 'mat_outline:chevron_right'\r\n \"\r\n >\r\n </mat-icon>\r\n </button>\r\n\r\n <mat-checkbox\r\n class=\"text-current\"\r\n [checked]=\"descendantsAllSelected(nestedNodeMap.get(node)!)\"\r\n [color]=\"'primary'\"\r\n [indeterminate]=\"\r\n descendantsPartiallySelected(nestedNodeMap.get(node)!)\r\n \"\r\n >{{ node.name }}</mat-checkbox\r\n >\r\n </mat-tree-node>\r\n </mat-tree>\r\n </div>\r\n </mat-select>\r\n} @else {\r\n <mat-select\r\n #componentSelect\r\n [placeholder]=\"placeholder\"\r\n [required]=\"required\"\r\n [formControl]=\"selectControl\"\r\n [compareWith]=\"compareWith()\"\r\n (focusin)=\"onFocusIn()\"\r\n (openedChange)=\"openedChange($event)\"\r\n >\r\n <mat-select-trigger>\r\n @if (!customTriggerLabelFn()) {\r\n {{ simpleTriggerLabelFn(checklistSelection.selected) }}\r\n } @else {\r\n {{ customTriggerLabelFn()!(checklistSelection.selected) }}\r\n }\r\n </mat-select-trigger>\r\n\r\n <div (focusout)=\"onFocusOut($event)\">\r\n @if (overallSearchEnabled()) {\r\n <mat-option>\r\n <cmat-select-search\r\n [showNoFoundLabel]=\"showNoFoundLabel()\"\r\n [noEntriesFoundLabel]=\"noEntriesFoundLabel()\"\r\n [formControl]=\"overallFilterControl\"\r\n [clearSearchInput]=\"true\"\r\n [toggleAllCheckboxIndeterminate]=\"isIndeterminate()\"\r\n [toggleAllCheckboxChecked]=\"isChecked()\"\r\n [showToggleAllCheckbox]=\"false\"\r\n (toggleAll)=\"toggleSelectAll($event)\"\r\n >\r\n </cmat-select-search>\r\n </mat-option>\r\n }\r\n @if (canNull() && treeDataSource().length !== 0) {\r\n <mat-option class=\"pl-10\" (click)=\"clearSelection()\">空</mat-option>\r\n }\r\n @for (selectData of matSelectData(); track selectData.id) {\r\n <mat-option class=\"hidden\" [value]=\"selectData\">{{\r\n selectData.name\r\n }}</mat-option>\r\n }\r\n\r\n <mat-tree\r\n #componentTree\r\n [dataSource]=\"treeDataSource()\"\r\n [childrenAccessor]=\"childrenAccessor\"\r\n >\r\n <mat-tree-node\r\n *matTreeNodeDef=\"let node\"\r\n matTreeNodePadding\r\n [ngClass]=\"getChecklistSelectionIsSelected(node) ? 'selected' : ''\"\r\n (click)=\"\r\n todoLeafItemSelectionToggle($event, nestedNodeMap.get(node)!)\r\n \"\r\n >\r\n <button type=\"button\" matIconButton disabled></button>\r\n <span class=\"text-current\">{{ node.name }}</span>\r\n </mat-tree-node>\r\n\r\n <mat-tree-node\r\n *matTreeNodeDef=\"let node; when: hasChild\"\r\n matTreeNodePadding\r\n [ngClass]=\"getChecklistSelectionIsSelected(node) ? 'selected' : ''\"\r\n (click)=\"todoItemSelectionToggle($event, nestedNodeMap.get(node)!)\"\r\n >\r\n <button\r\n type=\"button\"\r\n matIconButton\r\n matTreeNodeToggle\r\n [attr.aria-label]=\"'toggle ' + node.name\"\r\n >\r\n <mat-icon\r\n class=\"mat-icon-rtl-mirror\"\r\n [svgIcon]=\"\r\n componentTree.isExpanded(node)\r\n ? 'mat_outline:expand_more'\r\n : 'mat_outline:chevron_right'\r\n \"\r\n >\r\n </mat-icon>\r\n </button>\r\n <span class=\"text-current\">{{ node.name }}</span>\r\n </mat-tree-node>\r\n </mat-tree>\r\n </div>\r\n </mat-select>\r\n}\r\n",
634
+ 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:47px!important;line-height:47px!important}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"],
635
+ dependencies: [
636
+ {
637
+ kind: "ngmodule",
638
+ type: MatIconModule
639
+ },
640
+ {
641
+ kind: "component",
642
+ type: i1.MatIcon,
643
+ selector: "mat-icon",
644
+ inputs: [
645
+ "color",
646
+ "inline",
647
+ "svgIcon",
648
+ "fontSet",
649
+ "fontIcon"
650
+ ],
651
+ exportAs: ["matIcon"]
652
+ },
653
+ {
654
+ kind: "ngmodule",
655
+ type: MatSelectModule
656
+ },
657
+ {
658
+ kind: "component",
659
+ type: i2.MatSelect,
660
+ selector: "mat-select",
661
+ inputs: [
662
+ "aria-describedby",
663
+ "panelClass",
664
+ "disabled",
665
+ "disableRipple",
666
+ "tabIndex",
667
+ "hideSingleSelectionIndicator",
668
+ "placeholder",
669
+ "required",
670
+ "multiple",
671
+ "disableOptionCentering",
672
+ "compareWith",
673
+ "value",
674
+ "aria-label",
675
+ "aria-labelledby",
676
+ "errorStateMatcher",
677
+ "typeaheadDebounceInterval",
678
+ "sortComparator",
679
+ "id",
680
+ "panelWidth",
681
+ "canSelectNullableOptions"
682
+ ],
683
+ outputs: [
684
+ "openedChange",
685
+ "opened",
686
+ "closed",
687
+ "selectionChange",
688
+ "valueChange"
689
+ ],
690
+ exportAs: ["matSelect"]
691
+ },
692
+ {
693
+ kind: "directive",
694
+ type: i2.MatSelectTrigger,
695
+ selector: "mat-select-trigger"
696
+ },
697
+ {
698
+ kind: "component",
699
+ type: i2.MatOption,
700
+ selector: "mat-option",
701
+ inputs: [
702
+ "value",
703
+ "id",
704
+ "disabled"
705
+ ],
706
+ outputs: ["onSelectionChange"],
707
+ exportAs: ["matOption"]
708
+ },
709
+ {
710
+ kind: "component",
711
+ type: CmatSelectSearchComponent,
712
+ selector: "cmat-select-search",
713
+ inputs: [
714
+ "placeholderLabel",
715
+ "type",
716
+ "noEntriesFoundLabel",
717
+ "showNoFoundLabel",
718
+ "clearSearchInput",
719
+ "searching",
720
+ "disableInitialFocus",
721
+ "enableClearOnEscapePressed",
722
+ "preventHomeEndKeyPropagation",
723
+ "disableScrollToActiveOnOptionsChanged",
724
+ "ariaLabel",
725
+ "showToggleAllCheckbox",
726
+ "toggleAllCheckboxChecked",
727
+ "toggleAllCheckboxIndeterminate",
728
+ "toggleAllCheckboxTooltipMessage",
729
+ "toggleAllCheckboxTooltipPosition",
730
+ "hideClearSearchButton",
731
+ "alwaysRestoreSelectedOptionsMulti",
732
+ "debounceTime",
733
+ "optionsCount"
734
+ ],
735
+ outputs: ["toggleAll"],
736
+ exportAs: ["cmatSelectSearch"]
737
+ },
738
+ {
739
+ kind: "ngmodule",
740
+ type: ReactiveFormsModule
741
+ },
742
+ {
743
+ kind: "directive",
744
+ type: i3.NgControlStatus,
745
+ selector: "[formControlName],[ngModel],[formControl]"
746
+ },
747
+ {
748
+ kind: "directive",
749
+ type: i3.RequiredValidator,
750
+ selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]",
751
+ inputs: ["required"]
752
+ },
753
+ {
754
+ kind: "directive",
755
+ type: i3.FormControlDirective,
756
+ selector: "[formControl]",
757
+ inputs: [
758
+ "formControl",
759
+ "disabled",
760
+ "ngModel"
761
+ ],
762
+ outputs: ["ngModelChange"],
763
+ exportAs: ["ngForm"]
764
+ },
765
+ {
766
+ kind: "ngmodule",
767
+ type: MatTreeModule
768
+ },
769
+ {
770
+ kind: "directive",
771
+ type: i4.MatTreeNodeDef,
772
+ selector: "[matTreeNodeDef]",
773
+ inputs: ["matTreeNodeDefWhen", "matTreeNode"]
774
+ },
775
+ {
776
+ kind: "directive",
777
+ type: i4.MatTreeNodePadding,
778
+ selector: "[matTreeNodePadding]",
779
+ inputs: ["matTreeNodePadding", "matTreeNodePaddingIndent"]
780
+ },
781
+ {
782
+ kind: "directive",
783
+ type: i4.MatTreeNodeToggle,
784
+ selector: "[matTreeNodeToggle]",
785
+ inputs: ["matTreeNodeToggleRecursive"]
786
+ },
787
+ {
788
+ kind: "component",
789
+ type: i4.MatTree,
790
+ selector: "mat-tree",
791
+ exportAs: ["matTree"]
792
+ },
793
+ {
794
+ kind: "directive",
795
+ type: i4.MatTreeNode,
796
+ selector: "mat-tree-node",
797
+ inputs: ["tabIndex", "disabled"],
798
+ outputs: ["activation", "expandedChange"],
799
+ exportAs: ["matTreeNode"]
800
+ },
801
+ {
802
+ kind: "directive",
803
+ type: NgClass,
804
+ selector: "[ngClass]",
805
+ inputs: ["class", "ngClass"]
806
+ },
807
+ {
808
+ kind: "ngmodule",
809
+ type: MatButtonModule
810
+ },
811
+ {
812
+ kind: "component",
813
+ type: i5.MatIconButton,
814
+ selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]",
815
+ exportAs: ["matButton", "matAnchor"]
816
+ },
817
+ {
818
+ kind: "ngmodule",
819
+ type: MatCheckboxModule
820
+ },
821
+ {
822
+ kind: "component",
823
+ type: i6.MatCheckbox,
824
+ selector: "mat-checkbox",
825
+ inputs: [
826
+ "aria-label",
827
+ "aria-labelledby",
828
+ "aria-describedby",
829
+ "aria-expanded",
830
+ "aria-controls",
831
+ "aria-owns",
832
+ "id",
833
+ "required",
834
+ "labelPosition",
835
+ "name",
836
+ "value",
837
+ "disableRipple",
838
+ "tabIndex",
839
+ "color",
840
+ "disabledInteractive",
841
+ "checked",
842
+ "disabled",
843
+ "indeterminate"
844
+ ],
845
+ outputs: ["change", "indeterminateChange"],
846
+ exportAs: ["matCheckbox"]
847
+ }
848
+ ],
849
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
850
+ encapsulation: i0.ViewEncapsulation.None
851
+ });
852
+ }
853
+ };
854
+ i0.ɵɵngDeclareClassMetadata({
855
+ minVersion: "12.0.0",
856
+ version: "22.2.3",
857
+ ngImport: i0,
858
+ type: CmatSelectTreeComponent,
859
+ decorators: [{
860
+ type: Component,
861
+ args: [{
862
+ selector: "cmat-select-tree",
863
+ changeDetection: ChangeDetectionStrategy.OnPush,
864
+ encapsulation: ViewEncapsulation.None,
865
+ providers: [{
866
+ provide: MatFormFieldControl,
867
+ useExisting: CmatSelectTreeComponent
868
+ }],
869
+ exportAs: "cmatSelectTree",
870
+ imports: [
871
+ MatIconModule,
872
+ MatSelectModule,
873
+ CmatSelectSearchComponent,
874
+ ReactiveFormsModule,
875
+ MatTreeModule,
876
+ NgClass,
877
+ MatButtonModule,
878
+ MatCheckboxModule
879
+ ],
880
+ host: { "[attr.id]": "id" },
881
+ template: " \r\n@if (multiple()) {\r\n <mat-select\r\n #componentSelect\r\n multiple\r\n [placeholder]=\"placeholder\"\r\n [required]=\"required\"\r\n [formControl]=\"selectControl\"\r\n [compareWith]=\"compareWith()\"\r\n (openedChange)=\"openedChange($event)\"\r\n (focusin)=\"onFocusIn()\"\r\n >\r\n <mat-select-trigger>\r\n @if (!customTriggerLabelFn()) {\r\n {{ simpleTriggerLabelFn(checklistSelection.selected) }}\r\n } @else {\r\n {{ customTriggerLabelFn()!(checklistSelection.selected) }}\r\n }\r\n </mat-select-trigger>\r\n\r\n <div (focusout)=\"onFocusOut($event)\">\r\n @if (overallSearchEnabled()) {\r\n <mat-option>\r\n <cmat-select-search\r\n #searchComponent\r\n [showNoFoundLabel]=\"showNoFoundLabel()\"\r\n [noEntriesFoundLabel]=\"noEntriesFoundLabel()\"\r\n [formControl]=\"overallFilterControl\"\r\n [clearSearchInput]=\"true\"\r\n [toggleAllCheckboxIndeterminate]=\"isIndeterminate()\"\r\n [toggleAllCheckboxChecked]=\"isChecked()\"\r\n [showToggleAllCheckbox]=\"showToggleAllCheckbox() && multiple()\"\r\n (toggleAll)=\"toggleSelectAll($event)\"\r\n >\r\n </cmat-select-search>\r\n </mat-option>\r\n }\r\n @for (selectData of matSelectData(); track selectData.id) {\r\n <mat-option class=\"hidden\" [value]=\"selectData\">{{\r\n selectData.name\r\n }}</mat-option>\r\n }\r\n <mat-tree\r\n #componentTree\r\n [dataSource]=\"treeDataSource()\"\r\n [childrenAccessor]=\"childrenAccessor\"\r\n >\r\n <mat-tree-node\r\n *matTreeNodeDef=\"let node\"\r\n matTreeNodePadding\r\n [ngClass]=\"getChecklistSelectionIsSelected(node) ? 'selected' : ''\"\r\n (click)=\"\r\n todoLeafItemSelectionToggle($event, nestedNodeMap.get(node)!)\r\n \"\r\n >\r\n <button type=\"button\" matIconButton disabled></button>\r\n <mat-checkbox\r\n class=\"checklist-leaf-node text-current\"\r\n [color]=\"'primary'\"\r\n [checked]=\"getChecklistSelectionIsSelected(node)\"\r\n >{{ node.name }}</mat-checkbox\r\n >\r\n </mat-tree-node>\r\n\r\n <mat-tree-node\r\n *matTreeNodeDef=\"let node; when: hasChild\"\r\n matTreeNodePadding\r\n [ngClass]=\"getChecklistSelectionIsSelected(node) ? 'selected' : ''\"\r\n (click)=\"todoItemSelectionToggle($event, nestedNodeMap.get(node)!)\"\r\n >\r\n <button\r\n type=\"button\"\r\n matIconButton\r\n matTreeNodeToggle\r\n [attr.aria-label]=\"'toggle ' + node.name\"\r\n >\r\n <mat-icon\r\n class=\"mat-icon-rtl-mirror\"\r\n [svgIcon]=\"\r\n componentTree.isExpanded(node)\r\n ? 'mat_outline:expand_more'\r\n : 'mat_outline:chevron_right'\r\n \"\r\n >\r\n </mat-icon>\r\n </button>\r\n\r\n <mat-checkbox\r\n class=\"text-current\"\r\n [checked]=\"descendantsAllSelected(nestedNodeMap.get(node)!)\"\r\n [color]=\"'primary'\"\r\n [indeterminate]=\"\r\n descendantsPartiallySelected(nestedNodeMap.get(node)!)\r\n \"\r\n >{{ node.name }}</mat-checkbox\r\n >\r\n </mat-tree-node>\r\n </mat-tree>\r\n </div>\r\n </mat-select>\r\n} @else {\r\n <mat-select\r\n #componentSelect\r\n [placeholder]=\"placeholder\"\r\n [required]=\"required\"\r\n [formControl]=\"selectControl\"\r\n [compareWith]=\"compareWith()\"\r\n (focusin)=\"onFocusIn()\"\r\n (openedChange)=\"openedChange($event)\"\r\n >\r\n <mat-select-trigger>\r\n @if (!customTriggerLabelFn()) {\r\n {{ simpleTriggerLabelFn(checklistSelection.selected) }}\r\n } @else {\r\n {{ customTriggerLabelFn()!(checklistSelection.selected) }}\r\n }\r\n </mat-select-trigger>\r\n\r\n <div (focusout)=\"onFocusOut($event)\">\r\n @if (overallSearchEnabled()) {\r\n <mat-option>\r\n <cmat-select-search\r\n [showNoFoundLabel]=\"showNoFoundLabel()\"\r\n [noEntriesFoundLabel]=\"noEntriesFoundLabel()\"\r\n [formControl]=\"overallFilterControl\"\r\n [clearSearchInput]=\"true\"\r\n [toggleAllCheckboxIndeterminate]=\"isIndeterminate()\"\r\n [toggleAllCheckboxChecked]=\"isChecked()\"\r\n [showToggleAllCheckbox]=\"false\"\r\n (toggleAll)=\"toggleSelectAll($event)\"\r\n >\r\n </cmat-select-search>\r\n </mat-option>\r\n }\r\n @if (canNull() && treeDataSource().length !== 0) {\r\n <mat-option class=\"pl-10\" (click)=\"clearSelection()\">空</mat-option>\r\n }\r\n @for (selectData of matSelectData(); track selectData.id) {\r\n <mat-option class=\"hidden\" [value]=\"selectData\">{{\r\n selectData.name\r\n }}</mat-option>\r\n }\r\n\r\n <mat-tree\r\n #componentTree\r\n [dataSource]=\"treeDataSource()\"\r\n [childrenAccessor]=\"childrenAccessor\"\r\n >\r\n <mat-tree-node\r\n *matTreeNodeDef=\"let node\"\r\n matTreeNodePadding\r\n [ngClass]=\"getChecklistSelectionIsSelected(node) ? 'selected' : ''\"\r\n (click)=\"\r\n todoLeafItemSelectionToggle($event, nestedNodeMap.get(node)!)\r\n \"\r\n >\r\n <button type=\"button\" matIconButton disabled></button>\r\n <span class=\"text-current\">{{ node.name }}</span>\r\n </mat-tree-node>\r\n\r\n <mat-tree-node\r\n *matTreeNodeDef=\"let node; when: hasChild\"\r\n matTreeNodePadding\r\n [ngClass]=\"getChecklistSelectionIsSelected(node) ? 'selected' : ''\"\r\n (click)=\"todoItemSelectionToggle($event, nestedNodeMap.get(node)!)\"\r\n >\r\n <button\r\n type=\"button\"\r\n matIconButton\r\n matTreeNodeToggle\r\n [attr.aria-label]=\"'toggle ' + node.name\"\r\n >\r\n <mat-icon\r\n class=\"mat-icon-rtl-mirror\"\r\n [svgIcon]=\"\r\n componentTree.isExpanded(node)\r\n ? 'mat_outline:expand_more'\r\n : 'mat_outline:chevron_right'\r\n \"\r\n >\r\n </mat-icon>\r\n </button>\r\n <span class=\"text-current\">{{ node.name }}</span>\r\n </mat-tree-node>\r\n </mat-tree>\r\n </div>\r\n </mat-select>\r\n}\r\n",
882
+ 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:47px!important;line-height:47px!important}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"]
883
+ }]
884
+ }],
885
+ ctorParameters: () => [],
886
+ propDecorators: {
887
+ dataSource: [{
888
+ type: i0.Input,
889
+ args: [{
890
+ isSignal: true,
891
+ alias: "dataSource",
892
+ required: false
893
+ }]
894
+ }],
895
+ noEntriesFoundLabel: [{
896
+ type: i0.Input,
897
+ args: [{
898
+ isSignal: true,
899
+ alias: "noEntriesFoundLabel",
900
+ required: false
901
+ }]
902
+ }],
903
+ showNoFoundLabel: [{
904
+ type: i0.Input,
905
+ args: [{
906
+ isSignal: true,
907
+ alias: "showNoFoundLabel",
908
+ required: false
909
+ }]
910
+ }],
911
+ multiple: [{
912
+ type: i0.Input,
913
+ args: [{
914
+ isSignal: true,
915
+ alias: "multiple",
916
+ required: false
917
+ }]
918
+ }],
919
+ overallSearchEnabled: [{
920
+ type: i0.Input,
921
+ args: [{
922
+ isSignal: true,
923
+ alias: "overallSearchEnabled",
924
+ required: false
925
+ }]
926
+ }],
927
+ canNull: [{
928
+ type: i0.Input,
929
+ args: [{
930
+ isSignal: true,
931
+ alias: "canNull",
932
+ required: false
933
+ }]
934
+ }],
935
+ customTriggerLabelFn: [{
936
+ type: i0.Input,
937
+ args: [{
938
+ isSignal: true,
939
+ alias: "customTriggerLabelFn",
940
+ required: false
941
+ }]
942
+ }],
943
+ customTriggerLabelTemplate: [{
944
+ type: i0.Input,
945
+ args: [{
946
+ isSignal: true,
947
+ alias: "customTriggerLabelTemplate",
948
+ required: false
949
+ }]
950
+ }],
951
+ expandable: [{
952
+ type: i0.Input,
953
+ args: [{
954
+ isSignal: true,
955
+ alias: "expandable",
956
+ required: false
957
+ }]
958
+ }],
959
+ showToggleAllCheckbox: [{
960
+ type: i0.Input,
961
+ args: [{
962
+ isSignal: true,
963
+ alias: "showToggleAllCheckbox",
964
+ required: false
965
+ }]
966
+ }],
967
+ compareWith: [{
968
+ type: i0.Input,
969
+ args: [{
970
+ isSignal: true,
971
+ alias: "compareWith",
972
+ required: false
973
+ }]
974
+ }],
975
+ tree: [{
976
+ type: i0.ViewChild,
977
+ args: ["componentTree", { isSignal: true }]
978
+ }],
979
+ _matSelectSignal: [{
980
+ type: i0.ViewChild,
981
+ args: ["componentSelect", { isSignal: true }]
982
+ }],
983
+ _matSelectSearch: [{
984
+ type: i0.ViewChild,
985
+ args: [i0.forwardRef(() => CmatSelectSearchComponent), { isSignal: true }]
986
+ }],
987
+ clickedOut: [{
988
+ type: HostListener,
989
+ args: ["document:click"]
990
+ }],
991
+ placeholder: [{ type: Input }],
992
+ value: [{ type: Input }],
993
+ required: [{ type: Input }],
994
+ disabled: [{ type: Input }]
995
+ }
996
+ });
997
+ var CmatSelectTreeNode = class {};
691
998
  export { CmatSelectTreeComponent, CmatSelectTreeFlatNode, CmatSelectTreeNode };
692
- //# sourceMappingURL=cmat-components-select-tree.mjs.map
999
+
1000
+ //# sourceMappingURL=cmat-components-select-tree.mjs.map