cmat 0.0.87 → 0.0.88

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 (228) hide show
  1. package/fesm2022/cmat-components-adapter.mjs +9 -9
  2. package/fesm2022/cmat-components-adapter.mjs.map +1 -1
  3. package/fesm2022/cmat-components-breadcrumb.mjs +98 -80
  4. package/fesm2022/cmat-components-breadcrumb.mjs.map +1 -1
  5. package/fesm2022/cmat-components-card.mjs +26 -34
  6. package/fesm2022/cmat-components-card.mjs.map +1 -1
  7. package/fesm2022/cmat-components-carousel.mjs +467 -556
  8. package/fesm2022/cmat-components-carousel.mjs.map +1 -1
  9. package/fesm2022/cmat-components-cascade.mjs +270 -259
  10. package/fesm2022/cmat-components-cascade.mjs.map +1 -1
  11. package/fesm2022/cmat-components-chip-input.mjs +200 -116
  12. package/fesm2022/cmat-components-chip-input.mjs.map +1 -1
  13. package/fesm2022/cmat-components-code-editor.mjs +85 -38
  14. package/fesm2022/cmat-components-code-editor.mjs.map +1 -1
  15. package/fesm2022/cmat-components-color-picker.mjs +841 -0
  16. package/fesm2022/cmat-components-color-picker.mjs.map +1 -0
  17. package/fesm2022/cmat-components-custom-formly.mjs +1395 -838
  18. package/fesm2022/cmat-components-custom-formly.mjs.map +1 -1
  19. package/fesm2022/cmat-components-data-picker.mjs +996 -0
  20. package/fesm2022/cmat-components-data-picker.mjs.map +1 -0
  21. package/fesm2022/cmat-components-date-range.mjs +310 -264
  22. package/fesm2022/cmat-components-date-range.mjs.map +1 -1
  23. package/fesm2022/cmat-components-date-time-display.mjs +16 -20
  24. package/fesm2022/cmat-components-date-time-display.mjs.map +1 -1
  25. package/fesm2022/cmat-components-drawer.mjs +120 -137
  26. package/fesm2022/cmat-components-drawer.mjs.map +1 -1
  27. package/fesm2022/cmat-components-empty-state.mjs +17 -24
  28. package/fesm2022/cmat-components-empty-state.mjs.map +1 -1
  29. package/fesm2022/cmat-components-file-preview.mjs +18 -24
  30. package/fesm2022/cmat-components-file-preview.mjs.map +1 -1
  31. package/fesm2022/cmat-components-filter-toolbar.mjs +30 -39
  32. package/fesm2022/cmat-components-filter-toolbar.mjs.map +1 -1
  33. package/fesm2022/cmat-components-form-actions.mjs +12 -12
  34. package/fesm2022/cmat-components-form-actions.mjs.map +1 -1
  35. package/fesm2022/cmat-components-fullscreen.mjs +10 -10
  36. package/fesm2022/cmat-components-fullscreen.mjs.map +1 -1
  37. package/fesm2022/cmat-components-highlight.mjs +48 -41
  38. package/fesm2022/cmat-components-highlight.mjs.map +1 -1
  39. package/fesm2022/cmat-components-image-viewer.mjs +104 -107
  40. package/fesm2022/cmat-components-image-viewer.mjs.map +1 -1
  41. package/fesm2022/cmat-components-inline-loading.mjs +12 -15
  42. package/fesm2022/cmat-components-inline-loading.mjs.map +1 -1
  43. package/fesm2022/cmat-components-json-editor.mjs +118 -75
  44. package/fesm2022/cmat-components-json-editor.mjs.map +1 -1
  45. package/fesm2022/cmat-components-knob-input.mjs +196 -178
  46. package/fesm2022/cmat-components-knob-input.mjs.map +1 -1
  47. package/fesm2022/cmat-components-masonry.mjs +26 -41
  48. package/fesm2022/cmat-components-masonry.mjs.map +1 -1
  49. package/fesm2022/cmat-components-material-color-picker.mjs +81 -80
  50. package/fesm2022/cmat-components-material-color-picker.mjs.map +1 -1
  51. package/fesm2022/cmat-components-material-datetimepicker.mjs +1212 -1287
  52. package/fesm2022/cmat-components-material-datetimepicker.mjs.map +1 -1
  53. package/fesm2022/cmat-components-navigation.mjs +467 -450
  54. package/fesm2022/cmat-components-navigation.mjs.map +1 -1
  55. package/fesm2022/cmat-components-opt-input.mjs +143 -132
  56. package/fesm2022/cmat-components-opt-input.mjs.map +1 -1
  57. package/fesm2022/cmat-components-org-chart.mjs +68 -83
  58. package/fesm2022/cmat-components-org-chart.mjs.map +1 -1
  59. package/fesm2022/cmat-components-page-header.mjs +18 -24
  60. package/fesm2022/cmat-components-page-header.mjs.map +1 -1
  61. package/fesm2022/cmat-components-pagination.mjs +220 -136
  62. package/fesm2022/cmat-components-pagination.mjs.map +1 -1
  63. package/fesm2022/cmat-components-password-strength.mjs +262 -215
  64. package/fesm2022/cmat-components-password-strength.mjs.map +1 -1
  65. package/fesm2022/cmat-components-popover.mjs +227 -195
  66. package/fesm2022/cmat-components-popover.mjs.map +1 -1
  67. package/fesm2022/cmat-components-progress-bar.mjs +15 -34
  68. package/fesm2022/cmat-components-progress-bar.mjs.map +1 -1
  69. package/fesm2022/cmat-components-qrcode.mjs +95 -88
  70. package/fesm2022/cmat-components-qrcode.mjs.map +1 -1
  71. package/fesm2022/cmat-components-rating.mjs +70 -67
  72. package/fesm2022/cmat-components-rating.mjs.map +1 -1
  73. package/fesm2022/cmat-components-rich-text-editor.mjs +23 -26
  74. package/fesm2022/cmat-components-rich-text-editor.mjs.map +1 -1
  75. package/fesm2022/cmat-components-select-search.mjs +190 -159
  76. package/fesm2022/cmat-components-select-search.mjs.map +1 -1
  77. package/fesm2022/cmat-components-select-table.mjs +276 -213
  78. package/fesm2022/cmat-components-select-table.mjs.map +1 -1
  79. package/fesm2022/cmat-components-select-tree.mjs +178 -128
  80. package/fesm2022/cmat-components-select-tree.mjs.map +1 -1
  81. package/fesm2022/cmat-components-skeleton.mjs +44 -28
  82. package/fesm2022/cmat-components-skeleton.mjs.map +1 -1
  83. package/fesm2022/cmat-components-speed-dial.mjs +107 -163
  84. package/fesm2022/cmat-components-speed-dial.mjs.map +1 -1
  85. package/fesm2022/cmat-components-status-tag.mjs +29 -36
  86. package/fesm2022/cmat-components-status-tag.mjs.map +1 -1
  87. package/fesm2022/cmat-components-table-toolbar.mjs +14 -18
  88. package/fesm2022/cmat-components-table-toolbar.mjs.map +1 -1
  89. package/fesm2022/cmat-components-timeline.mjs +111 -118
  90. package/fesm2022/cmat-components-timeline.mjs.map +1 -1
  91. package/fesm2022/cmat-components-toast.mjs +65 -66
  92. package/fesm2022/cmat-components-toast.mjs.map +1 -1
  93. package/fesm2022/cmat-components-transfer-picker.mjs +130 -160
  94. package/fesm2022/cmat-components-transfer-picker.mjs.map +1 -1
  95. package/fesm2022/cmat-components-treetable.mjs +32 -39
  96. package/fesm2022/cmat-components-treetable.mjs.map +1 -1
  97. package/fesm2022/cmat-components-upload.mjs +186 -176
  98. package/fesm2022/cmat-components-upload.mjs.map +1 -1
  99. package/fesm2022/cmat-directives-animate-on-scroll.mjs +25 -28
  100. package/fesm2022/cmat-directives-animate-on-scroll.mjs.map +1 -1
  101. package/fesm2022/cmat-directives-arrow-cursor.mjs +85 -92
  102. package/fesm2022/cmat-directives-arrow-cursor.mjs.map +1 -1
  103. package/fesm2022/cmat-directives-autofocus.mjs +3 -3
  104. package/fesm2022/cmat-directives-autofocus.mjs.map +1 -1
  105. package/fesm2022/cmat-directives-data-exporter.mjs +49 -50
  106. package/fesm2022/cmat-directives-data-exporter.mjs.map +1 -1
  107. package/fesm2022/cmat-directives-debounce.mjs +16 -19
  108. package/fesm2022/cmat-directives-debounce.mjs.map +1 -1
  109. package/fesm2022/cmat-directives-digit-only.mjs +60 -69
  110. package/fesm2022/cmat-directives-digit-only.mjs.map +1 -1
  111. package/fesm2022/cmat-directives-equal-validator.mjs +3 -3
  112. package/fesm2022/cmat-directives-equal-validator.mjs.map +1 -1
  113. package/fesm2022/cmat-directives-seamless-auto-scroll.mjs +31 -30
  114. package/fesm2022/cmat-directives-seamless-auto-scroll.mjs.map +1 -1
  115. package/fesm2022/cmat-lib-mock-api.mjs +6 -6
  116. package/fesm2022/cmat-lib-mock-api.mjs.map +1 -1
  117. package/fesm2022/cmat-pipes-bytes.mjs +3 -3
  118. package/fesm2022/cmat-pipes-bytes.mjs.map +1 -1
  119. package/fesm2022/cmat-pipes-date-format.mjs +3 -3
  120. package/fesm2022/cmat-pipes-date-format.mjs.map +1 -1
  121. package/fesm2022/cmat-pipes-find-by-key.mjs +3 -3
  122. package/fesm2022/cmat-pipes-find-by-key.mjs.map +1 -1
  123. package/fesm2022/cmat-pipes-group-by.mjs +3 -3
  124. package/fesm2022/cmat-pipes-group-by.mjs.map +1 -1
  125. package/fesm2022/cmat-pipes-keys.mjs +3 -3
  126. package/fesm2022/cmat-pipes-keys.mjs.map +1 -1
  127. package/fesm2022/cmat-pipes-secure.mjs +7 -13
  128. package/fesm2022/cmat-pipes-secure.mjs.map +1 -1
  129. package/fesm2022/cmat-pipes-uppercase.mjs +3 -3
  130. package/fesm2022/cmat-pipes-uppercase.mjs.map +1 -1
  131. package/fesm2022/cmat-services-alert.mjs +26 -27
  132. package/fesm2022/cmat-services-alert.mjs.map +1 -1
  133. package/fesm2022/cmat-services-config.mjs +14 -23
  134. package/fesm2022/cmat-services-config.mjs.map +1 -1
  135. package/fesm2022/cmat-services-confirmation.mjs +8 -8
  136. package/fesm2022/cmat-services-confirmation.mjs.map +1 -1
  137. package/fesm2022/cmat-services-data.mjs +6 -10
  138. package/fesm2022/cmat-services-data.mjs.map +1 -1
  139. package/fesm2022/cmat-services-export-as.mjs +3 -3
  140. package/fesm2022/cmat-services-export-as.mjs.map +1 -1
  141. package/fesm2022/cmat-services-loading.mjs +30 -47
  142. package/fesm2022/cmat-services-loading.mjs.map +1 -1
  143. package/fesm2022/cmat-services-local-storage.mjs +3 -3
  144. package/fesm2022/cmat-services-local-storage.mjs.map +1 -1
  145. package/fesm2022/cmat-services-media-watcher.mjs +43 -34
  146. package/fesm2022/cmat-services-media-watcher.mjs.map +1 -1
  147. package/fesm2022/cmat-services-platform.mjs +3 -3
  148. package/fesm2022/cmat-services-platform.mjs.map +1 -1
  149. package/fesm2022/cmat-services-splash-screen.mjs +3 -3
  150. package/fesm2022/cmat-services-splash-screen.mjs.map +1 -1
  151. package/fesm2022/cmat-services-title.mjs +3 -3
  152. package/fesm2022/cmat-services-title.mjs.map +1 -1
  153. package/fesm2022/cmat-services-translation.mjs +11 -11
  154. package/fesm2022/cmat-services-translation.mjs.map +1 -1
  155. package/fesm2022/cmat-services-utils.mjs +3 -3
  156. package/fesm2022/cmat-services-utils.mjs.map +1 -1
  157. package/fesm2022/cmat.mjs +9228 -7507
  158. package/fesm2022/cmat.mjs.map +1 -1
  159. package/icons/material-icons/heroicons-outline.svg +3 -0
  160. package/icons/material-icons/heroicons-solid.svg +3 -0
  161. package/package.json +10 -1
  162. package/styles/components/bundle.scss +21 -0
  163. package/styles/overrides/angular-material.scss +22 -1
  164. package/tailwind/plugins/theming.js +183 -183
  165. package/types/cmat-components-breadcrumb.d.ts +40 -37
  166. package/types/cmat-components-card.d.ts +11 -13
  167. package/types/cmat-components-carousel.d.ts +87 -113
  168. package/types/cmat-components-cascade.d.ts +84 -65
  169. package/types/cmat-components-chip-input.d.ts +29 -24
  170. package/types/cmat-components-code-editor.d.ts +28 -12
  171. package/types/cmat-components-color-picker.d.ts +236 -0
  172. package/types/cmat-components-custom-formly.d.ts +316 -184
  173. package/types/cmat-components-data-picker.d.ts +372 -0
  174. package/types/cmat-components-date-range.d.ts +31 -36
  175. package/types/cmat-components-date-time-display.d.ts +8 -8
  176. package/types/cmat-components-drawer.d.ts +30 -32
  177. package/types/cmat-components-empty-state.d.ts +9 -10
  178. package/types/cmat-components-file-preview.d.ts +9 -9
  179. package/types/cmat-components-filter-toolbar.d.ts +15 -15
  180. package/types/cmat-components-form-actions.d.ts +5 -5
  181. package/types/cmat-components-fullscreen.d.ts +5 -5
  182. package/types/cmat-components-highlight.d.ts +13 -14
  183. package/types/cmat-components-image-viewer.d.ts +29 -33
  184. package/types/cmat-components-inline-loading.d.ts +6 -6
  185. package/types/cmat-components-json-editor.d.ts +15 -17
  186. package/types/cmat-components-knob-input.d.ts +58 -55
  187. package/types/cmat-components-masonry.d.ts +9 -12
  188. package/types/cmat-components-material-color-picker.d.ts +16 -21
  189. package/types/cmat-components-material-datetimepicker.d.ts +174 -216
  190. package/types/cmat-components-navigation.d.ts +34 -39
  191. package/types/cmat-components-opt-input.d.ts +35 -33
  192. package/types/cmat-components-org-chart.d.ts +8 -9
  193. package/types/cmat-components-page-header.d.ts +9 -9
  194. package/types/cmat-components-pagination.d.ts +36 -40
  195. package/types/cmat-components-password-strength.d.ts +58 -64
  196. package/types/cmat-components-popover.d.ts +22 -32
  197. package/types/cmat-components-progress-bar.d.ts +7 -10
  198. package/types/cmat-components-qrcode.d.ts +22 -22
  199. package/types/cmat-components-rating.d.ts +17 -19
  200. package/types/cmat-components-rich-text-editor.d.ts +11 -12
  201. package/types/cmat-components-select-search.d.ts +48 -36
  202. package/types/cmat-components-select-table.d.ts +38 -34
  203. package/types/cmat-components-select-tree.d.ts +17 -15
  204. package/types/cmat-components-skeleton.d.ts +27 -10
  205. package/types/cmat-components-speed-dial.d.ts +24 -33
  206. package/types/cmat-components-status-tag.d.ts +19 -9
  207. package/types/cmat-components-table-toolbar.d.ts +7 -7
  208. package/types/cmat-components-timeline.d.ts +33 -34
  209. package/types/cmat-components-toast.d.ts +26 -30
  210. package/types/cmat-components-transfer-picker.d.ts +51 -56
  211. package/types/cmat-components-treetable.d.ts +12 -13
  212. package/types/cmat-components-upload.d.ts +33 -38
  213. package/types/cmat-components-x6-angular-shape.d.ts +1 -1
  214. package/types/cmat-directives-animate-on-scroll.d.ts +7 -7
  215. package/types/cmat-directives-arrow-cursor.d.ts +18 -20
  216. package/types/cmat-directives-data-exporter.d.ts +10 -10
  217. package/types/cmat-directives-debounce.d.ts +5 -5
  218. package/types/cmat-directives-digit-only.d.ts +13 -13
  219. package/types/cmat-directives-seamless-auto-scroll.d.ts +7 -7
  220. package/types/cmat-pipes-secure.d.ts +1 -3
  221. package/types/cmat-services-alert.d.ts +11 -12
  222. package/types/cmat-services-config.d.ts +2 -7
  223. package/types/cmat-services-confirmation.d.ts +2 -2
  224. package/types/cmat-services-data.d.ts +0 -1
  225. package/types/cmat-services-loading.d.ts +14 -22
  226. package/types/cmat-services-media-watcher.d.ts +5 -5
  227. package/types/cmat-services-translation.d.ts +4 -5
  228. package/types/cmat.d.ts +2167 -1746
@@ -2,7 +2,7 @@ import { coerceBooleanProperty } from '@angular/cdk/coercion';
2
2
  import { SelectionModel } from '@angular/cdk/collections';
3
3
  import { NgClass } from '@angular/common';
4
4
  import * as i0 from '@angular/core';
5
- import { signal, inject, DestroyRef, Input, HostListener, ViewChild, HostBinding, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
5
+ import { input, signal, inject, DestroyRef, viewChild, effect, untracked, Input, HostListener, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
6
6
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
7
7
  import * as i3 from '@angular/forms';
8
8
  import { FormControl, NgControl, ReactiveFormsModule } from '@angular/forms';
@@ -18,7 +18,7 @@ import { MatSelectModule } from '@angular/material/select';
18
18
  import * as i4 from '@angular/material/tree';
19
19
  import { MatTreeModule } from '@angular/material/tree';
20
20
  import { CmatSelectSearchComponent } from 'cmat/components/select-search';
21
- import { isUndefined, isNil } from 'lodash-es';
21
+ import { isNil } from 'lodash-es';
22
22
  import { Subject, debounceTime } from 'rxjs';
23
23
 
24
24
  class CmatSelectTreeFlatNode {
@@ -29,34 +29,61 @@ let NEXT_ID = 0;
29
29
  class CmatSelectTreeComponent {
30
30
  constructor() {
31
31
  this.id = `cmat-select-tree-${NEXT_ID++}`;
32
- this.noEntriesFoundLabel = '无结果';
33
- this.showNoFoundLabel = true;
34
- this.multiple = false;
35
- this.overallSearchEnabled = true;
36
- this.canNull = false;
37
- this.showToggleAllCheckbox = false;
38
- this.compareWith = (o1, o2) => {
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) => {
39
53
  return o1 && o2 ? o1?.name === o2?.name && o1?.id === o2?.id : o1 === o2;
40
- };
54
+ }, /* @ts-ignore */
55
+ ...(ngDevMode ? [{ debugName: "compareWith" }] : /* istanbul ignore next */ []));
41
56
  this.flatNodeMap = new Map();
42
57
  this.nestedNodeMap = new Map();
43
58
  this._flatNodeById = new Map();
44
59
  this._parentFlatNodeById = new Map();
45
60
  this._selectedFlatNodeIds = new Set();
46
61
  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 */ []));
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 */ []));
49
66
  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 */ []));
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 */ []));
53
73
  this.selectControl = new FormControl();
54
- this.matSelectData = signal([], ...(ngDevMode ? [{ debugName: "matSelectData" }] : /* istanbul ignore next */ []));
74
+ this.matSelectData = signal([], /* @ts-ignore */
75
+ ...(ngDevMode ? [{ debugName: "matSelectData" }] : /* istanbul ignore next */ []));
55
76
  this.stateChanges = new Subject();
56
77
  this.focused = false;
57
78
  this.touched = false;
58
79
  this.ngControl = inject(NgControl, { optional: true, self: true });
59
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 */ []));
60
87
  this.getLevel = (dataNode) => dataNode.level;
61
88
  this.childrenAccessor = (node) => node.children ?? [];
62
89
  this.hasChild = (_, node) => !!node.children && node.children.length > 0;
@@ -86,14 +113,41 @@ class CmatSelectTreeComponent {
86
113
  if (this.ngControl != null) {
87
114
  this.ngControl.valueAccessor = this;
88
115
  }
89
- }
90
- set matSelect(m) {
91
- const existsSelect = !isUndefined(this._matSelect);
92
- this._matSelect = m;
93
- if (!existsSelect) {
94
- this._init(this.value);
95
- this._matSelect.setDisabledState(this.disabled);
96
- }
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
+ });
97
151
  }
98
152
  clickedOut() {
99
153
  if (!this._matSelect?.panelOpen) {
@@ -108,51 +162,36 @@ class CmatSelectTreeComponent {
108
162
  this.nestedNodeMap.clear();
109
163
  this._flatNodeById.clear();
110
164
  this._parentFlatNodeById.clear();
111
- this.treeDataSource.set(this.dataSource);
112
- this.dataFlatNodes.set(this._getFlattenNodes(this.dataSource));
165
+ const dataSource = this.dataSource();
166
+ this.treeDataSource.set(dataSource);
167
+ this.dataFlatNodes.set(this._getFlattenNodes(dataSource));
113
168
  this.matSelectData.set([...this.dataFlatNodes()]);
114
- if (this.dataSource.length > 0) {
169
+ if (dataSource.length > 0) {
115
170
  this._init(this.value);
116
171
  }
117
172
  }
118
173
  }
119
174
  ngAfterViewInit() {
120
- // 初始化下拉面板样式,并监听筛选输入变化
121
- let panelClass = ['overflow-y-auto', 'scrollbar-custom'];
122
- if (this._matSelect.panelClass) {
123
- if (Array.isArray(this._matSelect.panelClass)) {
124
- this._matSelect.panelClass = [this.matSelect.panelClass, ...panelClass];
125
- }
126
- else if (typeof this._matSelect.panelClass === 'string') {
127
- this._matSelect.panelClass = [this._matSelect.panelClass, ...panelClass];
128
- }
129
- else if (typeof this._matSelect.panelClass === 'object') {
130
- const panelClassEntries = this._matSelect.panelClass;
131
- panelClass.forEach((i) => {
132
- panelClassEntries[i] = true;
133
- });
134
- }
135
- }
136
- else {
137
- this._matSelect.panelClass = panelClass;
138
- }
139
175
  this.overallFilterControl.valueChanges
140
176
  .pipe(takeUntilDestroyed(this._destroyRef), debounceTime(200))
141
177
  .subscribe(() => {
142
178
  const filterValue = `${this.overallFilterControl.value ?? ''}`.toLowerCase();
143
- const dataClone = this._cloneTreeNodes(this.dataSource);
179
+ const dataClone = this._cloneTreeNodes(this.dataSource());
144
180
  const arr = [];
145
181
  for (let i = dataClone.length - 1; i >= 0; i--) {
146
182
  if (!this._applyColumnLevelFilters(dataClone[i], filterValue)) {
147
183
  arr.push(i);
148
184
  }
149
185
  }
150
- arr.forEach((v) => { dataClone.splice(v, 1); });
186
+ arr.forEach((v) => {
187
+ dataClone.splice(v, 1);
188
+ });
151
189
  this.treeDataSource.set(dataClone);
152
190
  this.dataFlatNodes.set(this._getFlattenNodes(dataClone));
153
191
  this.matSelectData.set([...this.dataFlatNodes()]);
154
- if (this.expandable) {
155
- this.tree.expandAll();
192
+ const treeInstance = this.tree();
193
+ if (treeInstance && this.expandable()) {
194
+ treeInstance.expandAll();
156
195
  }
157
196
  this._updateSelect(this.checklistSelection.selected);
158
197
  });
@@ -171,7 +210,7 @@ class CmatSelectTreeComponent {
171
210
  return this._value;
172
211
  }
173
212
  set value(value) {
174
- if (value !== this.value) {
213
+ if (value !== this._value) {
175
214
  this._value = value;
176
215
  this.stateChanges.next();
177
216
  this._onModelChange(value);
@@ -188,7 +227,9 @@ class CmatSelectTreeComponent {
188
227
  get shouldLabelFloat() {
189
228
  return this.focused || !this.empty;
190
229
  }
191
- get required() { return this._required; }
230
+ get required() {
231
+ return this._required;
232
+ }
192
233
  set required(value) {
193
234
  this._required = coerceBooleanProperty(value);
194
235
  this.stateChanges.next();
@@ -205,6 +246,7 @@ class CmatSelectTreeComponent {
205
246
  this.focused = false;
206
247
  this.stateChanges.next();
207
248
  }
249
+ this._matSelect?.setDisabledState(this._disabled);
208
250
  }
209
251
  registerOnChange(fn) {
210
252
  this._onModelChange = fn;
@@ -231,8 +273,9 @@ class CmatSelectTreeComponent {
231
273
  }
232
274
  onFocusOut(event) {
233
275
  const relatedTarget = event.relatedTarget;
234
- const panelElement = this._matSelect.panel.nativeElement;
235
- if (!(relatedTarget instanceof Element) || !panelElement.contains(relatedTarget)) {
276
+ const panelElement = this._matSelect?.panel?.nativeElement;
277
+ if (!(relatedTarget instanceof Element) ||
278
+ !panelElement?.contains(relatedTarget)) {
236
279
  this.touched = true;
237
280
  this.focused = false;
238
281
  this._onTouchedChange();
@@ -243,20 +286,26 @@ class CmatSelectTreeComponent {
243
286
  this._init(value);
244
287
  }
245
288
  simpleTriggerLabelFn(value) {
246
- return value.map((node) => {
289
+ return value
290
+ .map((node) => {
247
291
  if (isNil(node)) {
248
292
  return '';
249
293
  }
250
- if (isNil(this.customTriggerLabelTemplate)
251
- || typeof this.customTriggerLabelTemplate !== 'string'
252
- || this.customTriggerLabelTemplate.trim().length === 0) {
294
+ const customTriggerLabelTemplate = this.customTriggerLabelTemplate();
295
+ if (isNil(customTriggerLabelTemplate) ||
296
+ typeof customTriggerLabelTemplate !== 'string' ||
297
+ customTriggerLabelTemplate.trim().length === 0) {
253
298
  return `${node.id}`;
254
299
  }
255
300
  let atLeastPartialSubstitution = false;
256
301
  const nodeRecord = node;
257
- const substitution = this.customTriggerLabelTemplate.replace(/[$][{]([^}]+)[}]/g, (_, key) => {
302
+ const substitution = customTriggerLabelTemplate.replace(/[$][{]([^}]+)[}]/g, (_, key) => {
258
303
  const nodeValue = nodeRecord[key];
259
- if (isNil(nodeValue) || (typeof nodeValue !== 'string' && typeof nodeValue !== 'number' && typeof nodeValue !== 'boolean' && typeof nodeValue !== 'bigint')) {
304
+ if (isNil(nodeValue) ||
305
+ (typeof nodeValue !== 'string' &&
306
+ typeof nodeValue !== 'number' &&
307
+ typeof nodeValue !== 'boolean' &&
308
+ typeof nodeValue !== 'bigint')) {
260
309
  return '';
261
310
  }
262
311
  atLeastPartialSubstitution = true;
@@ -266,12 +315,13 @@ class CmatSelectTreeComponent {
266
315
  return `${node.id}`;
267
316
  }
268
317
  return substitution.trim();
269
- }).join(', ');
318
+ })
319
+ .join(', ');
270
320
  }
271
321
  openedChange(opened) {
272
322
  // 面板打开/关闭时,同步树节点和选中值
273
323
  if (opened) {
274
- if (this.multiple) {
324
+ if (this.multiple()) {
275
325
  this.checklistSelection.selected.forEach((node) => {
276
326
  if (node.expandable) {
277
327
  const descendants = this._getDescendants(node);
@@ -280,33 +330,39 @@ class CmatSelectTreeComponent {
280
330
  });
281
331
  this._updateSelect(this.checklistSelection.selected);
282
332
  }
283
- if (this.expandable) {
284
- this.tree.expandAll();
333
+ const treeInstance = this.tree();
334
+ if (treeInstance && this.expandable()) {
335
+ treeInstance.expandAll();
285
336
  }
286
337
  }
287
338
  else {
288
339
  setTimeout(() => {
289
340
  if (!isNil(this.checklistSelection.selected)) {
290
- if (this.multiple) {
341
+ if (this.multiple()) {
291
342
  const findOutNode = [];
292
343
  this.checklistSelection.selected.forEach((node) => {
293
344
  const parentNode = this._getParentNode(node);
294
- if (parentNode && this.checklistSelection.isSelected(parentNode)) {
345
+ if (parentNode &&
346
+ this.checklistSelection.isSelected(parentNode)) {
295
347
  findOutNode.push(node);
296
348
  }
297
349
  });
298
350
  findOutNode.forEach((node) => {
299
351
  this.checklistSelection.deselect(node);
300
352
  });
301
- this.value = this.checklistSelection.selected.length > 0 ? [...this.checklistSelection.selected] : null;
353
+ this.value =
354
+ this.checklistSelection.selected.length > 0
355
+ ? [...this.checklistSelection.selected]
356
+ : null;
302
357
  }
303
358
  else {
304
- if (this.checklistSelection.selected && this.checklistSelection.selected.length > 0) {
359
+ if (this.checklistSelection.selected &&
360
+ this.checklistSelection.selected.length > 0) {
305
361
  this.value = { ...this.checklistSelection.selected[0] };
306
362
  }
307
363
  }
308
- this._matSelect.writeValue(this.value);
309
- this._matSelect._onChange(this.value);
364
+ this._matSelect?.writeValue(this.value);
365
+ this._matSelect?._onChange(this.value);
310
366
  }
311
367
  }, 100);
312
368
  }
@@ -320,12 +376,13 @@ class CmatSelectTreeComponent {
320
376
  // 判断当前节点是否处于半选状态
321
377
  const descendants = this._getDescendants(node);
322
378
  const result = descendants.some(child => this._selectedFlatNodeIds.has(child.id));
323
- return result && !descendants.every(child => this._selectedFlatNodeIds.has(child.id));
379
+ return (result &&
380
+ !descendants.every(child => this._selectedFlatNodeIds.has(child.id)));
324
381
  }
325
382
  todoItemSelectionToggle(event, node) {
326
383
  // 切换分支节点的选中状态
327
384
  event.stopPropagation();
328
- if (this.multiple) {
385
+ if (this.multiple()) {
329
386
  this.checklistSelection.toggle(node);
330
387
  const descendants = this._getDescendants(node);
331
388
  if (this.checklistSelection.isSelected(node)) {
@@ -342,13 +399,13 @@ class CmatSelectTreeComponent {
342
399
  this.checklistSelection.clear();
343
400
  this.checklistSelection.select(node);
344
401
  this._syncSelectedFlatNodeIds();
345
- this._matSelect.close();
402
+ this._matSelect?.close();
346
403
  }
347
404
  }
348
405
  todoLeafItemSelectionToggle(event, node) {
349
406
  // 切换叶子节点的选中状态
350
407
  event.stopPropagation();
351
- if (this.multiple) {
408
+ if (this.multiple()) {
352
409
  this.checklistSelection.toggle(node);
353
410
  this._checkAllParentsSelection(node);
354
411
  this._syncSelectedFlatNodeIds();
@@ -358,7 +415,7 @@ class CmatSelectTreeComponent {
358
415
  this.checklistSelection.clear();
359
416
  this.checklistSelection.select(node);
360
417
  this._syncSelectedFlatNodeIds();
361
- this._matSelect.close();
418
+ this._matSelect?.close();
362
419
  }
363
420
  }
364
421
  clearSelection() {
@@ -369,8 +426,8 @@ class CmatSelectTreeComponent {
369
426
  this.checkCount.set(0);
370
427
  this._selectedFlatNodeIds.clear();
371
428
  this.value = null;
372
- this._matSelect.writeValue(null);
373
- this._matSelect._onChange(null);
429
+ this._matSelect?.writeValue(null);
430
+ this._matSelect?._onChange(null);
374
431
  }
375
432
  toggleSelectAll(selectAllValue) {
376
433
  // 全选或取消全选
@@ -395,9 +452,12 @@ class CmatSelectTreeComponent {
395
452
  }
396
453
  _init(v) {
397
454
  // 初始化内部值和选中状态
398
- if (this.dataSource.length > 0 && this.treeDataSource().length > 0 && this._matSelect) {
399
- if (this.expandable) {
400
- this.tree.expandAll();
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();
401
461
  }
402
462
  if (!isNil(v)) {
403
463
  this._updateChecklistSelection(v);
@@ -406,7 +466,7 @@ class CmatSelectTreeComponent {
406
466
  this.checklistSelection.clear();
407
467
  }
408
468
  if (Array.isArray(v) && v.length > 0) {
409
- if (this.multiple) {
469
+ if (this.multiple()) {
410
470
  const findOutNode = [];
411
471
  this.checklistSelection.selected.forEach((node) => {
412
472
  const parentNode = this._getParentNode(node);
@@ -420,14 +480,19 @@ class CmatSelectTreeComponent {
420
480
  this.value = [...this.checklistSelection.selected];
421
481
  }
422
482
  else {
423
- this.value = this.checklistSelection.selected.length > 0 ? { ...this.checklistSelection.selected[0] } : null;
483
+ this.value =
484
+ this.checklistSelection.selected.length > 0
485
+ ? { ...this.checklistSelection.selected[0] }
486
+ : null;
424
487
  }
425
488
  }
426
489
  else {
427
490
  this.value = v;
428
491
  }
429
- this._matSelect.writeValue(this.value);
430
- this._matSelect._onChange(this.value);
492
+ if (this._matSelect) {
493
+ this._matSelect.writeValue(this.value);
494
+ this._matSelect._onChange(this.value);
495
+ }
431
496
  this._updateCheckState();
432
497
  }
433
498
  else {
@@ -439,7 +504,10 @@ class CmatSelectTreeComponent {
439
504
  let parent = this._getParentNode(node);
440
505
  while (parent) {
441
506
  parent.expandable = true;
442
- this.tree.expand(this.flatNodeMap.get(parent));
507
+ const treeInstance = this.tree();
508
+ if (treeInstance) {
509
+ treeInstance.expand(this.flatNodeMap.get(parent));
510
+ }
443
511
  this._checkRootNodeSelection(parent);
444
512
  parent = this._getParentNode(parent);
445
513
  }
@@ -480,7 +548,7 @@ class CmatSelectTreeComponent {
480
548
  // 根据当前值同步显示选择
481
549
  if (!isNil(value)) {
482
550
  const valueArray = !Array.isArray(value) ? [value] : value;
483
- if (this.overallSearchEnabled) // 有搜索功能时,将选中节点转换为当前数据源节点
551
+ if (this.overallSearchEnabled()) // 有搜索功能时,将选中节点转换为当前数据源节点
484
552
  {
485
553
  valueArray.forEach((item) => {
486
554
  const nodeFound = this._flatNodeById.get(item.id);
@@ -491,7 +559,7 @@ class CmatSelectTreeComponent {
491
559
  this.checklistSelection.select(nodeFound);
492
560
  });
493
561
  }
494
- if (this.multiple) {
562
+ if (this.multiple()) {
495
563
  this.checklistSelection.selected.forEach((item) => {
496
564
  this._checkAllParentsSelection(item);
497
565
  });
@@ -523,7 +591,7 @@ class CmatSelectTreeComponent {
523
591
  }
524
592
  _updateCheckState() {
525
593
  // 更新全选与半选状态
526
- if (this.showToggleAllCheckbox && this.dataSource.length > 0) {
594
+ if (this.showToggleAllCheckbox() && this.dataSource().length > 0) {
527
595
  const selectedCount = this._selectedFlatNodeIds.size;
528
596
  this.checkCount.set(selectedCount);
529
597
  this.isIndeterminate.set(selectedCount < this.dataFlatNodes().length && selectedCount > 0);
@@ -546,7 +614,7 @@ class CmatSelectTreeComponent {
546
614
  return nodes.map(node => ({
547
615
  id: node.id,
548
616
  name: node.name,
549
- children: node.children ? this._cloneTreeNodes(node.children) : null
617
+ children: node.children ? this._cloneTreeNodes(node.children) : null,
550
618
  }));
551
619
  }
552
620
  _syncSelectedFlatNodeIds() {
@@ -578,47 +646,29 @@ class CmatSelectTreeComponent {
578
646
  collect(node.children);
579
647
  return descendants;
580
648
  }
581
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: CmatSelectTreeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
582
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: CmatSelectTreeComponent, isStandalone: true, selector: "cmat-select-tree", inputs: { id: "id", dataSource: "dataSource", noEntriesFoundLabel: "noEntriesFoundLabel", showNoFoundLabel: "showNoFoundLabel", multiple: "multiple", overallSearchEnabled: "overallSearchEnabled", canNull: "canNull", customTriggerLabelFn: "customTriggerLabelFn", customTriggerLabelTemplate: "customTriggerLabelTemplate", expandable: "expandable", showToggleAllCheckbox: "showToggleAllCheckbox", compareWith: "compareWith", placeholder: "placeholder", value: "value", required: "required", disabled: "disabled" }, host: { listeners: { "document:click": "clickedOut()" }, properties: { "attr.id": "this.id" } }, providers: [{ provide: MatFormFieldControl, useExisting: CmatSelectTreeComponent }], viewQueries: [{ propertyName: "tree", first: true, predicate: ["componentTree"], descendants: true }, { propertyName: "matSelect", first: true, predicate: ["componentSelect"], descendants: true }], exportAs: ["cmatSelectTree"], usesOnChanges: true, ngImport: i0, template: "@if(multiple){\r\n<mat-select #componentSelect multiple [placeholder]=\"placeholder\" [required]=\"required\"\r\n [formControl]=\"selectControl\" [compareWith]=\"compareWith\" (openedChange)=\"openedChange($event)\" (focusin)=\"onFocusIn()\">\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 [showNoFoundLabel]=\"showNoFoundLabel\" [noEntriesFoundLabel]=\"noEntriesFoundLabel\"\r\n [formControl]=\"overallFilterControl\" [clearSearchInput]=\"true\"\r\n [toggleAllCheckboxIndeterminate]=\"isIndeterminate()\" [toggleAllCheckboxChecked]=\"isChecked()\"\r\n [showToggleAllCheckbox]=\"showToggleAllCheckbox&&multiple\" (toggleAll)=\"toggleSelectAll($event)\">\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\">{{selectData.name}}</mat-option>\r\n }\r\n <mat-tree #componentTree [dataSource]=\"treeDataSource()\" [childrenAccessor]=\"childrenAccessor\">\r\n <mat-tree-node *matTreeNodeDef=\"let node\" matTreeNodePadding\r\n [ngClass]=\"getChecklistSelectionIsSelected(node)?'selected':''\"\r\n (click)=\"todoLeafItemSelectionToggle($event,nestedNodeMap.get(node)!)\">\r\n <button type=\"button\" matIconButton disabled>\r\n\r\n </button>\r\n <mat-checkbox class=\"checklist-leaf-node text-current\" [color]=\"'primary'\"\r\n [checked]=\"getChecklistSelectionIsSelected(node)\">{{node.name}}</mat-checkbox>\r\n\r\n </mat-tree-node>\r\n\r\n <mat-tree-node *matTreeNodeDef=\"let node; when: hasChild\" matTreeNodePadding\r\n [ngClass]=\"getChecklistSelectionIsSelected(node)?'selected':''\"\r\n (click)=\"todoItemSelectionToggle($event,nestedNodeMap.get(node)!)\">\r\n <button type=\"button\" matIconButton matTreeNodeToggle [attr.aria-label]=\"'toggle ' + node.name\">\r\n <mat-icon class=\"mat-icon-rtl-mirror\"\r\n [svgIcon]=\"componentTree.isExpanded(node) ? 'mat_outline:expand_more' : 'mat_outline:chevron_right'\">\r\n </mat-icon>\r\n </button>\r\n\r\n <mat-checkbox class=\"text-current\" [checked]=\"descendantsAllSelected(nestedNodeMap.get(node)!)\"\r\n [color]=\"'primary'\"\r\n [indeterminate]=\"descendantsPartiallySelected(nestedNodeMap.get(node)!)\">{{node.name}}</mat-checkbox>\r\n\r\n </mat-tree-node>\r\n </mat-tree>\r\n </div>\r\n</mat-select>\r\n}\r\n@else {\r\n<mat-select #componentSelect [placeholder]=\"placeholder\"\r\n [required]=\"required\" [formControl]=\"selectControl\" [compareWith]=\"compareWith\" (focusin)=\"onFocusIn()\" (openedChange)=\"openedChange($event)\">\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 [showNoFoundLabel]=\"showNoFoundLabel\" [noEntriesFoundLabel]=\"noEntriesFoundLabel\"\r\n [formControl]=\"overallFilterControl\" [clearSearchInput]=\"true\"\r\n [toggleAllCheckboxIndeterminate]=\"isIndeterminate()\" [toggleAllCheckboxChecked]=\"isChecked()\"\r\n [showToggleAllCheckbox]=\"false\" (toggleAll)=\"toggleSelectAll($event)\">\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\">{{selectData.name}}</mat-option>\r\n }\r\n\r\n <mat-tree #componentTree [dataSource]=\"treeDataSource()\" [childrenAccessor]=\"childrenAccessor\">\r\n <mat-tree-node *matTreeNodeDef=\"let node\" matTreeNodePadding\r\n [ngClass]=\"getChecklistSelectionIsSelected(node)?'selected':''\"\r\n (click)=\"todoLeafItemSelectionToggle($event,nestedNodeMap.get(node)!)\">\r\n <button type=\"button\" matIconButton disabled>\r\n\r\n </button>\r\n <span class=\"text-current\">{{node.name}}</span>\r\n\r\n </mat-tree-node>\r\n\r\n <mat-tree-node *matTreeNodeDef=\"let node; when: hasChild\" matTreeNodePadding\r\n [ngClass]=\"getChecklistSelectionIsSelected(node)?'selected':''\"\r\n (click)=\"todoItemSelectionToggle($event,nestedNodeMap.get(node)!)\">\r\n <button type=\"button\" matIconButton matTreeNodeToggle [attr.aria-label]=\"'toggle ' + node.name\">\r\n <mat-icon class=\"mat-icon-rtl-mirror\"\r\n [svgIcon]=\"componentTree.isExpanded(node) ? 'mat_outline:expand_more' : 'mat_outline:chevron_right'\">\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"], 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 }); }
649
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: CmatSelectTreeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
650
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.2", 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 }); }
583
653
  }
584
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: CmatSelectTreeComponent, decorators: [{
654
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: CmatSelectTreeComponent, decorators: [{
585
655
  type: Component,
586
- args: [{ selector: 'cmat-select-tree', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [{ provide: MatFormFieldControl, useExisting: CmatSelectTreeComponent }], exportAs: 'cmatSelectTree', imports: [MatIconModule, MatSelectModule, CmatSelectSearchComponent,
587
- ReactiveFormsModule, MatTreeModule, NgClass, MatButtonModule, MatCheckboxModule], template: "@if(multiple){\r\n<mat-select #componentSelect multiple [placeholder]=\"placeholder\" [required]=\"required\"\r\n [formControl]=\"selectControl\" [compareWith]=\"compareWith\" (openedChange)=\"openedChange($event)\" (focusin)=\"onFocusIn()\">\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 [showNoFoundLabel]=\"showNoFoundLabel\" [noEntriesFoundLabel]=\"noEntriesFoundLabel\"\r\n [formControl]=\"overallFilterControl\" [clearSearchInput]=\"true\"\r\n [toggleAllCheckboxIndeterminate]=\"isIndeterminate()\" [toggleAllCheckboxChecked]=\"isChecked()\"\r\n [showToggleAllCheckbox]=\"showToggleAllCheckbox&&multiple\" (toggleAll)=\"toggleSelectAll($event)\">\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\">{{selectData.name}}</mat-option>\r\n }\r\n <mat-tree #componentTree [dataSource]=\"treeDataSource()\" [childrenAccessor]=\"childrenAccessor\">\r\n <mat-tree-node *matTreeNodeDef=\"let node\" matTreeNodePadding\r\n [ngClass]=\"getChecklistSelectionIsSelected(node)?'selected':''\"\r\n (click)=\"todoLeafItemSelectionToggle($event,nestedNodeMap.get(node)!)\">\r\n <button type=\"button\" matIconButton disabled>\r\n\r\n </button>\r\n <mat-checkbox class=\"checklist-leaf-node text-current\" [color]=\"'primary'\"\r\n [checked]=\"getChecklistSelectionIsSelected(node)\">{{node.name}}</mat-checkbox>\r\n\r\n </mat-tree-node>\r\n\r\n <mat-tree-node *matTreeNodeDef=\"let node; when: hasChild\" matTreeNodePadding\r\n [ngClass]=\"getChecklistSelectionIsSelected(node)?'selected':''\"\r\n (click)=\"todoItemSelectionToggle($event,nestedNodeMap.get(node)!)\">\r\n <button type=\"button\" matIconButton matTreeNodeToggle [attr.aria-label]=\"'toggle ' + node.name\">\r\n <mat-icon class=\"mat-icon-rtl-mirror\"\r\n [svgIcon]=\"componentTree.isExpanded(node) ? 'mat_outline:expand_more' : 'mat_outline:chevron_right'\">\r\n </mat-icon>\r\n </button>\r\n\r\n <mat-checkbox class=\"text-current\" [checked]=\"descendantsAllSelected(nestedNodeMap.get(node)!)\"\r\n [color]=\"'primary'\"\r\n [indeterminate]=\"descendantsPartiallySelected(nestedNodeMap.get(node)!)\">{{node.name}}</mat-checkbox>\r\n\r\n </mat-tree-node>\r\n </mat-tree>\r\n </div>\r\n</mat-select>\r\n}\r\n@else {\r\n<mat-select #componentSelect [placeholder]=\"placeholder\"\r\n [required]=\"required\" [formControl]=\"selectControl\" [compareWith]=\"compareWith\" (focusin)=\"onFocusIn()\" (openedChange)=\"openedChange($event)\">\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 [showNoFoundLabel]=\"showNoFoundLabel\" [noEntriesFoundLabel]=\"noEntriesFoundLabel\"\r\n [formControl]=\"overallFilterControl\" [clearSearchInput]=\"true\"\r\n [toggleAllCheckboxIndeterminate]=\"isIndeterminate()\" [toggleAllCheckboxChecked]=\"isChecked()\"\r\n [showToggleAllCheckbox]=\"false\" (toggleAll)=\"toggleSelectAll($event)\">\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\">{{selectData.name}}</mat-option>\r\n }\r\n\r\n <mat-tree #componentTree [dataSource]=\"treeDataSource()\" [childrenAccessor]=\"childrenAccessor\">\r\n <mat-tree-node *matTreeNodeDef=\"let node\" matTreeNodePadding\r\n [ngClass]=\"getChecklistSelectionIsSelected(node)?'selected':''\"\r\n (click)=\"todoLeafItemSelectionToggle($event,nestedNodeMap.get(node)!)\">\r\n <button type=\"button\" matIconButton disabled>\r\n\r\n </button>\r\n <span class=\"text-current\">{{node.name}}</span>\r\n\r\n </mat-tree-node>\r\n\r\n <mat-tree-node *matTreeNodeDef=\"let node; when: hasChild\" matTreeNodePadding\r\n [ngClass]=\"getChecklistSelectionIsSelected(node)?'selected':''\"\r\n (click)=\"todoItemSelectionToggle($event,nestedNodeMap.get(node)!)\">\r\n <button type=\"button\" matIconButton matTreeNodeToggle [attr.aria-label]=\"'toggle ' + node.name\">\r\n <mat-icon class=\"mat-icon-rtl-mirror\"\r\n [svgIcon]=\"componentTree.isExpanded(node) ? 'mat_outline:expand_more' : 'mat_outline:chevron_right'\">\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"] }]
588
- }], ctorParameters: () => [], propDecorators: { id: [{
589
- type: HostBinding,
590
- args: ['attr.id']
591
- }, {
592
- type: Input
593
- }], dataSource: [{
594
- type: Input
595
- }], noEntriesFoundLabel: [{
596
- type: Input
597
- }], showNoFoundLabel: [{
598
- type: Input
599
- }], multiple: [{
600
- type: Input
601
- }], overallSearchEnabled: [{
602
- type: Input
603
- }], canNull: [{
604
- type: Input
605
- }], customTriggerLabelFn: [{
606
- type: Input
607
- }], customTriggerLabelTemplate: [{
608
- type: Input
609
- }], expandable: [{
610
- type: Input
611
- }], showToggleAllCheckbox: [{
612
- type: Input
613
- }], compareWith: [{
614
- type: Input
615
- }], tree: [{
616
- type: ViewChild,
617
- args: ['componentTree', { static: false }]
618
- }], matSelect: [{
619
- type: ViewChild,
620
- args: ['componentSelect', { static: false }]
621
- }], clickedOut: [{
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: [{
622
672
  type: HostListener,
623
673
  args: ['document:click']
624
674
  }], placeholder: [{