cmat 0.0.110 → 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 +985 -669
  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 +39806 -22071
  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 -92
  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 -5194
@@ -1,443 +1,863 @@
1
- import * as i0 from '@angular/core';
2
- import { inject, signal, computed, ChangeDetectionStrategy, ViewEncapsulation, Component, input, viewChild, DestroyRef, effect, Input } from '@angular/core';
3
- import { MAT_BOTTOM_SHEET_DATA, MatBottomSheetRef, MatBottomSheet } from '@angular/material/bottom-sheet';
4
- import * as i1 from '@angular/material/button';
5
- import { MatButtonModule } from '@angular/material/button';
6
- import * as i4 from '@angular/material/icon';
7
- import { MatIconModule } from '@angular/material/icon';
8
- import * as i3 from '@angular/material/list';
9
- import { MatListModule } from '@angular/material/list';
10
- import * as i2 from '@angular/material/tabs';
11
- import { MatTabsModule } from '@angular/material/tabs';
12
- import { coerceBooleanProperty } from '@angular/cdk/coercion';
13
- import { BreakpointObserver, Breakpoints } from '@angular/cdk/layout';
14
- import * as i3$1 from '@angular/cdk/overlay';
15
- import { CdkOverlayOrigin, Overlay, OverlayConfig, OverlayModule } from '@angular/cdk/overlay';
16
- import * as i4$1 from '@angular/cdk/portal';
17
- import { CdkPortal, PortalModule } from '@angular/cdk/portal';
18
- import { NgClass } from '@angular/common';
19
- import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
20
- import { NgControl } from '@angular/forms';
21
- import { MatFormFieldControl } from '@angular/material/form-field';
22
- import * as i2$1 from '@angular/material/input';
23
- import { MatInputModule } from '@angular/material/input';
24
- import { Subject } from 'rxjs';
25
- import { map } from 'rxjs/operators';
26
-
27
- class CmatCascadeBottomSheetComponent {
28
- constructor() {
29
- this.data = inject(MAT_BOTTOM_SHEET_DATA);
30
- this.selectedTab = signal(0, /* @ts-ignore */
31
- ...(ngDevMode ? [{ debugName: "selectedTab" }] : /* istanbul ignore next */ []));
32
- this.labels = computed(() => {
33
- return this.data.steps().map((step) => {
34
- const activeItem = step.find((item) => item.active);
35
- return activeItem?.label ?? '选择';
36
- });
37
- }, /* @ts-ignore */
38
- ...(ngDevMode ? [{ debugName: "labels" }] : /* istanbul ignore next */ []));
39
- this._bottomSheetRef = inject((MatBottomSheetRef));
40
- this.resetTabIndex();
41
- }
42
- resetTabIndex() {
43
- const hasValue = this.data.currentLabels().length > 0;
44
- this.selectedTab.set(hasValue ? this.data.currentLabels().length - 1 : 0);
45
- }
46
- clickHandle(event) {
47
- event.stopPropagation();
48
- }
49
- dismiss() {
50
- this._bottomSheetRef.dismiss();
51
- }
52
- select(disabled) {
53
- if (!disabled) {
54
- const currentIndex = this.selectedTab();
55
- if (currentIndex < this.data.steps().length - 1) {
56
- this.selectedTab.set(currentIndex + 1);
57
- }
58
- }
59
- }
60
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: CmatCascadeBottomSheetComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
61
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.0", type: CmatCascadeBottomSheetComponent, isStandalone: true, selector: "cmat-cascade-bottom-sheet", exportAs: ["cmatCascadeBottomSheet"], ngImport: i0, template: "<div role=\"presentation\" class=\"cmat-cascade-bottom-sheet\" (click)=\"clickHandle($event)\">\r\n <div class=\"sheet-header flex items-center\">\r\n <p class=\"sheet-title\">{{data.placeholder}}</p>\r\n <button type=\"button\" matIconButton (click)=\"dismiss()\">\r\n <mat-icon [svgIcon]=\"'heroicons_outline:x-mark'\"></mat-icon>\r\n </button>\r\n </div>\r\n <mat-tab-group [selectedIndex]=\"selectedTab()\" (selectedIndexChange)=\"selectedTab.set($event)\">\r\n @for (menuItem of data.steps(); track $index; let step = $index) {\r\n <mat-tab [label]=\"labels()[step]\">\r\n <mat-list class=\"menu-list overflow-y-auto scrollbar-custom\">\r\n @for (listItem of menuItem; track listItem.value; let i = $index) {\r\n <mat-list-item class=\"menu-item\"\r\n [class.active]=\"listItem.active\" [class.disabled]=\"listItem.disabled\"\r\n (click)=\"data.selectHandle($event, step, i); select(listItem.disabled);\">\r\n <div matLine>{{listItem.label}}</div>\r\n </mat-list-item>\r\n }\r\n </mat-list>\r\n </mat-tab>\r\n }\r\n </mat-tab-group>\r\n</div>", styles: [".cmat-cascade-bottom-sheet{padding:0;margin:-8px -16px}.cmat-cascade-bottom-sheet .sheet-header{display:flex;flex:1 1 0%;align-items:center;font-size:1rem;border-bottom-width:1px;padding:12px 16px}.cmat-cascade-bottom-sheet .sheet-header .sheet-title{margin:0;padding:0;letter-spacing:.05rem;text-align:center;flex-grow:1}.cmat-cascade-bottom-sheet .menu-list{vertical-align:top;box-sizing:border-box;margin:0;padding:0;width:100%;overflow:hidden;position:relative;height:204px}.cmat-cascade-bottom-sheet .menu-item{padding:0 16px;text-overflow:ellipsis;box-sizing:border-box;cursor:pointer!important;font-size:14px;line-height:3em}.cmat-cascade-bottom-sheet .menu-item.disabled{cursor:not-allowed!important;pointer-events:none}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatTabsModule }, { kind: "component", type: i2.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby", "labelClass", "bodyClass", "id"], exportAs: ["matTab"] }, { kind: "component", type: i2.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "fitInkBarToContent", "mat-stretch-tabs", "mat-align-tabs", "dynamicHeight", "selectedIndex", "headerPosition", "animationDuration", "contentTabIndex", "disablePagination", "disableRipple", "preserveContent", "backgroundColor", "aria-label", "aria-labelledby"], outputs: ["selectedIndexChange", "focusChange", "animationDone", "selectedTabChange"], exportAs: ["matTabGroup"] }, { kind: "ngmodule", type: MatListModule }, { kind: "component", type: i3.MatList, selector: "mat-list", exportAs: ["matList"] }, { kind: "component", type: i3.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
62
- }
63
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: CmatCascadeBottomSheetComponent, decorators: [{
64
- type: Component,
65
- args: [{ selector: 'cmat-cascade-bottom-sheet', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'cmatCascadeBottomSheet', imports: [MatButtonModule, MatTabsModule, MatListModule, MatIconModule], template: "<div role=\"presentation\" class=\"cmat-cascade-bottom-sheet\" (click)=\"clickHandle($event)\">\r\n <div class=\"sheet-header flex items-center\">\r\n <p class=\"sheet-title\">{{data.placeholder}}</p>\r\n <button type=\"button\" matIconButton (click)=\"dismiss()\">\r\n <mat-icon [svgIcon]=\"'heroicons_outline:x-mark'\"></mat-icon>\r\n </button>\r\n </div>\r\n <mat-tab-group [selectedIndex]=\"selectedTab()\" (selectedIndexChange)=\"selectedTab.set($event)\">\r\n @for (menuItem of data.steps(); track $index; let step = $index) {\r\n <mat-tab [label]=\"labels()[step]\">\r\n <mat-list class=\"menu-list overflow-y-auto scrollbar-custom\">\r\n @for (listItem of menuItem; track listItem.value; let i = $index) {\r\n <mat-list-item class=\"menu-item\"\r\n [class.active]=\"listItem.active\" [class.disabled]=\"listItem.disabled\"\r\n (click)=\"data.selectHandle($event, step, i); select(listItem.disabled);\">\r\n <div matLine>{{listItem.label}}</div>\r\n </mat-list-item>\r\n }\r\n </mat-list>\r\n </mat-tab>\r\n }\r\n </mat-tab-group>\r\n</div>", styles: [".cmat-cascade-bottom-sheet{padding:0;margin:-8px -16px}.cmat-cascade-bottom-sheet .sheet-header{display:flex;flex:1 1 0%;align-items:center;font-size:1rem;border-bottom-width:1px;padding:12px 16px}.cmat-cascade-bottom-sheet .sheet-header .sheet-title{margin:0;padding:0;letter-spacing:.05rem;text-align:center;flex-grow:1}.cmat-cascade-bottom-sheet .menu-list{vertical-align:top;box-sizing:border-box;margin:0;padding:0;width:100%;overflow:hidden;position:relative;height:204px}.cmat-cascade-bottom-sheet .menu-item{padding:0 16px;text-overflow:ellipsis;box-sizing:border-box;cursor:pointer!important;font-size:14px;line-height:3em}.cmat-cascade-bottom-sheet .menu-item.disabled{cursor:not-allowed!important;pointer-events:none}\n"] }]
66
- }], ctorParameters: () => [] });
67
-
68
- class CmatCascadeMenuComponent {
69
- constructor() {
70
- this.root = inject(CmatCascadeListComponent, { optional: true });
71
- }
72
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: CmatCascadeMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
73
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.0", type: CmatCascadeMenuComponent, isStandalone: true, selector: "cmat-cascade-menu", exportAs: ["cmatCascadeMenu"], ngImport: i0, template: "@for (menuItem of root.steps(); track $index; let step = $index) {\r\n <mat-list class=\"menu-list overflow-y-auto scrollbar-custom\">\r\n @for (listItem of menuItem; track listItem.value; let i = $index) {\r\n <mat-list-item class=\"menu-item\"\r\n [class.active]=\"listItem.active\" [class.disabled]=\"listItem.disabled\"\r\n (click)=\"root.selectHandle($event, step, i);\">\r\n <div matLine>{{listItem.label}}</div>\r\n @if (listItem.children && listItem.children.length) {\r\n <mat-icon class=\"item-icon\" [svgIcon]=\"'mat_outline:chevron_right'\"></mat-icon>\r\n }\r\n </mat-list-item>\r\n }\r\n </mat-list>\r\n}", styles: ["cmat-cascade-menu{height:200px;z-index:2007;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f;white-space:nowrap}cmat-cascade-menu .menu-list{display:inline-block;border-right-width:1px;box-sizing:border-box;margin:0;padding:.5rem;overflow:hidden;position:relative;height:200px;min-width:200px;vertical-align:top}cmat-cascade-menu .menu-list:last-child{border-right-width:0px}cmat-cascade-menu .menu-item{line-height:3rem;padding:0 16px;position:relative;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;box-sizing:border-box;cursor:pointer!important}cmat-cascade-menu .menu-item.disabled{cursor:not-allowed!important}cmat-cascade-menu .menu-item .item-icon{position:absolute;justify-items:center;top:50%;bottom:50%;right:0;transform:translateY(-50%)}\n"], dependencies: [{ kind: "ngmodule", type: MatListModule }, { kind: "component", type: i3.MatList, selector: "mat-list", exportAs: ["matList"] }, { kind: "component", type: i3.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
74
- }
75
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: CmatCascadeMenuComponent, decorators: [{
76
- type: Component,
77
- args: [{ selector: 'cmat-cascade-menu', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'cmatCascadeMenu', imports: [MatListModule, MatIconModule], template: "@for (menuItem of root.steps(); track $index; let step = $index) {\r\n <mat-list class=\"menu-list overflow-y-auto scrollbar-custom\">\r\n @for (listItem of menuItem; track listItem.value; let i = $index) {\r\n <mat-list-item class=\"menu-item\"\r\n [class.active]=\"listItem.active\" [class.disabled]=\"listItem.disabled\"\r\n (click)=\"root.selectHandle($event, step, i);\">\r\n <div matLine>{{listItem.label}}</div>\r\n @if (listItem.children && listItem.children.length) {\r\n <mat-icon class=\"item-icon\" [svgIcon]=\"'mat_outline:chevron_right'\"></mat-icon>\r\n }\r\n </mat-list-item>\r\n }\r\n </mat-list>\r\n}", styles: ["cmat-cascade-menu{height:200px;z-index:2007;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f;white-space:nowrap}cmat-cascade-menu .menu-list{display:inline-block;border-right-width:1px;box-sizing:border-box;margin:0;padding:.5rem;overflow:hidden;position:relative;height:200px;min-width:200px;vertical-align:top}cmat-cascade-menu .menu-list:last-child{border-right-width:0px}cmat-cascade-menu .menu-item{line-height:3rem;padding:0 16px;position:relative;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;box-sizing:border-box;cursor:pointer!important}cmat-cascade-menu .menu-item.disabled{cursor:not-allowed!important}cmat-cascade-menu .menu-item .item-icon{position:absolute;justify-items:center;top:50%;bottom:50%;right:0;transform:translateY(-50%)}\n"] }]
78
- }] });
79
-
80
- /* eslint-disable @typescript-eslint/member-ordering */
1
+ import * as i0 from "@angular/core";
2
+ import { ChangeDetectionStrategy, Component, DestroyRef, Input, ViewEncapsulation, computed, effect, inject, input, signal, viewChild } from "@angular/core";
3
+ import { MAT_BOTTOM_SHEET_DATA, MatBottomSheet, MatBottomSheetRef } from "@angular/material/bottom-sheet";
4
+ import * as i1 from "@angular/material/button";
5
+ import { MatButtonModule } from "@angular/material/button";
6
+ import * as i4$1 from "@angular/material/icon";
7
+ import { MatIconModule } from "@angular/material/icon";
8
+ import * as i3$1 from "@angular/material/list";
9
+ import { MatListModule } from "@angular/material/list";
10
+ import * as i2$1 from "@angular/material/tabs";
11
+ import { MatTabsModule } from "@angular/material/tabs";
12
+ import { coerceBooleanProperty } from "@angular/cdk/coercion";
13
+ import { BreakpointObserver, Breakpoints } from "@angular/cdk/layout";
14
+ import * as i3 from "@angular/cdk/overlay";
15
+ import { CdkOverlayOrigin, Overlay, OverlayConfig, OverlayModule } from "@angular/cdk/overlay";
16
+ import * as i4 from "@angular/cdk/portal";
17
+ import { CdkPortal, PortalModule } from "@angular/cdk/portal";
18
+ import { NgClass } from "@angular/common";
19
+ import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
20
+ import { NgControl } from "@angular/forms";
21
+ import { MatFormFieldControl } from "@angular/material/form-field";
22
+ import * as i2 from "@angular/material/input";
23
+ import { MatInputModule } from "@angular/material/input";
24
+ import { Subject } from "rxjs";
25
+ import { map } from "rxjs/operators";
26
+ var CmatCascadeBottomSheetComponent = class CmatCascadeBottomSheetComponent {
27
+ constructor() {
28
+ this.data = inject(MAT_BOTTOM_SHEET_DATA);
29
+ this.selectedTab = signal(0, ...ngDevMode ? [{ debugName: "selectedTab" }] : /* istanbul ignore next */ []);
30
+ this.labels = computed(() => {
31
+ return this.data.steps().map((step) => {
32
+ return step.find((item) => item.active)?.label ?? "选择";
33
+ });
34
+ }, ...ngDevMode ? [{ debugName: "labels" }] : /* istanbul ignore next */ []);
35
+ this._bottomSheetRef = inject(MatBottomSheetRef);
36
+ this.resetTabIndex();
37
+ }
38
+ resetTabIndex() {
39
+ const hasValue = this.data.currentLabels().length > 0;
40
+ this.selectedTab.set(hasValue ? this.data.currentLabels().length - 1 : 0);
41
+ }
42
+ clickHandle(event) {
43
+ event.stopPropagation();
44
+ }
45
+ dismiss() {
46
+ this._bottomSheetRef.dismiss();
47
+ }
48
+ select(disabled) {
49
+ if (!disabled) {
50
+ const currentIndex = this.selectedTab();
51
+ if (currentIndex < this.data.steps().length - 1) this.selectedTab.set(currentIndex + 1);
52
+ }
53
+ }
54
+ static {
55
+ this.ɵfac = i0.ɵɵngDeclareFactory({
56
+ minVersion: "12.0.0",
57
+ version: "22.2.3",
58
+ ngImport: i0,
59
+ type: CmatCascadeBottomSheetComponent,
60
+ deps: [],
61
+ target: i0.ɵɵFactoryTarget.Component
62
+ });
63
+ }
64
+ static {
65
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
66
+ minVersion: "17.0.0",
67
+ version: "22.2.3",
68
+ type: CmatCascadeBottomSheetComponent,
69
+ isStandalone: true,
70
+ selector: "cmat-cascade-bottom-sheet",
71
+ exportAs: ["cmatCascadeBottomSheet"],
72
+ ngImport: i0,
73
+ template: "<div role=\"presentation\" class=\"cmat-cascade-bottom-sheet\" (click)=\"clickHandle($event)\">\r\n <div class=\"sheet-header flex items-center\">\r\n <p class=\"sheet-title\">{{data.placeholder}}</p>\r\n <button type=\"button\" matIconButton (click)=\"dismiss()\">\r\n <mat-icon [svgIcon]=\"'heroicons_outline:x-mark'\"></mat-icon>\r\n </button>\r\n </div>\r\n <mat-tab-group [selectedIndex]=\"selectedTab()\" (selectedIndexChange)=\"selectedTab.set($event)\">\r\n @for (menuItem of data.steps(); track $index; let step = $index) {\r\n <mat-tab [label]=\"labels()[step]\">\r\n <mat-list class=\"menu-list overflow-y-auto scrollbar-custom\">\r\n @for (listItem of menuItem; track listItem.value; let i = $index) {\r\n <mat-list-item class=\"menu-item\"\r\n [class.active]=\"listItem.active\" [class.disabled]=\"listItem.disabled\"\r\n (click)=\"data.selectHandle($event, step, i); select(listItem.disabled);\">\r\n <div matLine>{{listItem.label}}</div>\r\n </mat-list-item>\r\n }\r\n </mat-list>\r\n </mat-tab>\r\n }\r\n </mat-tab-group>\r\n</div>",
74
+ styles: [".cmat-cascade-bottom-sheet{padding:0;margin:-8px -16px}.cmat-cascade-bottom-sheet .sheet-header{display:flex;flex:1 1 0%;align-items:center;font-size:1rem;border-bottom-width:1px;padding:12px 16px}.cmat-cascade-bottom-sheet .sheet-header .sheet-title{margin:0;padding:0;letter-spacing:.05rem;text-align:center;flex-grow:1}.cmat-cascade-bottom-sheet .menu-list{vertical-align:top;box-sizing:border-box;margin:0;padding:0;width:100%;overflow:hidden;position:relative;height:204px}.cmat-cascade-bottom-sheet .menu-item{padding:0 16px;text-overflow:ellipsis;box-sizing:border-box;cursor:pointer!important;font-size:14px;line-height:3em}.cmat-cascade-bottom-sheet .menu-item.disabled{cursor:not-allowed!important;pointer-events:none}\n"],
75
+ dependencies: [
76
+ {
77
+ kind: "ngmodule",
78
+ type: MatButtonModule
79
+ },
80
+ {
81
+ kind: "component",
82
+ type: i1.MatIconButton,
83
+ selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]",
84
+ exportAs: ["matButton", "matAnchor"]
85
+ },
86
+ {
87
+ kind: "ngmodule",
88
+ type: MatTabsModule
89
+ },
90
+ {
91
+ kind: "component",
92
+ type: i2$1.MatTab,
93
+ selector: "mat-tab",
94
+ inputs: [
95
+ "disabled",
96
+ "label",
97
+ "aria-label",
98
+ "aria-labelledby",
99
+ "labelClass",
100
+ "bodyClass",
101
+ "id"
102
+ ],
103
+ exportAs: ["matTab"]
104
+ },
105
+ {
106
+ kind: "component",
107
+ type: i2$1.MatTabGroup,
108
+ selector: "mat-tab-group",
109
+ inputs: [
110
+ "color",
111
+ "fitInkBarToContent",
112
+ "mat-stretch-tabs",
113
+ "mat-align-tabs",
114
+ "dynamicHeight",
115
+ "selectedIndex",
116
+ "headerPosition",
117
+ "animationDuration",
118
+ "contentTabIndex",
119
+ "disablePagination",
120
+ "disableRipple",
121
+ "preserveContent",
122
+ "backgroundColor",
123
+ "aria-label",
124
+ "aria-labelledby"
125
+ ],
126
+ outputs: [
127
+ "selectedIndexChange",
128
+ "focusChange",
129
+ "animationDone",
130
+ "selectedTabChange"
131
+ ],
132
+ exportAs: ["matTabGroup"]
133
+ },
134
+ {
135
+ kind: "ngmodule",
136
+ type: MatListModule
137
+ },
138
+ {
139
+ kind: "component",
140
+ type: i3$1.MatList,
141
+ selector: "mat-list",
142
+ exportAs: ["matList"]
143
+ },
144
+ {
145
+ kind: "component",
146
+ type: i3$1.MatListItem,
147
+ selector: "mat-list-item, a[mat-list-item], button[mat-list-item]",
148
+ inputs: ["activated"],
149
+ exportAs: ["matListItem"]
150
+ },
151
+ {
152
+ kind: "ngmodule",
153
+ type: MatIconModule
154
+ },
155
+ {
156
+ kind: "component",
157
+ type: i4$1.MatIcon,
158
+ selector: "mat-icon",
159
+ inputs: [
160
+ "color",
161
+ "inline",
162
+ "svgIcon",
163
+ "fontSet",
164
+ "fontIcon"
165
+ ],
166
+ exportAs: ["matIcon"]
167
+ }
168
+ ],
169
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
170
+ encapsulation: i0.ViewEncapsulation.None
171
+ });
172
+ }
173
+ };
174
+ i0.ɵɵngDeclareClassMetadata({
175
+ minVersion: "12.0.0",
176
+ version: "22.2.3",
177
+ ngImport: i0,
178
+ type: CmatCascadeBottomSheetComponent,
179
+ decorators: [{
180
+ type: Component,
181
+ args: [{
182
+ selector: "cmat-cascade-bottom-sheet",
183
+ encapsulation: ViewEncapsulation.None,
184
+ changeDetection: ChangeDetectionStrategy.OnPush,
185
+ exportAs: "cmatCascadeBottomSheet",
186
+ imports: [
187
+ MatButtonModule,
188
+ MatTabsModule,
189
+ MatListModule,
190
+ MatIconModule
191
+ ],
192
+ template: "<div role=\"presentation\" class=\"cmat-cascade-bottom-sheet\" (click)=\"clickHandle($event)\">\r\n <div class=\"sheet-header flex items-center\">\r\n <p class=\"sheet-title\">{{data.placeholder}}</p>\r\n <button type=\"button\" matIconButton (click)=\"dismiss()\">\r\n <mat-icon [svgIcon]=\"'heroicons_outline:x-mark'\"></mat-icon>\r\n </button>\r\n </div>\r\n <mat-tab-group [selectedIndex]=\"selectedTab()\" (selectedIndexChange)=\"selectedTab.set($event)\">\r\n @for (menuItem of data.steps(); track $index; let step = $index) {\r\n <mat-tab [label]=\"labels()[step]\">\r\n <mat-list class=\"menu-list overflow-y-auto scrollbar-custom\">\r\n @for (listItem of menuItem; track listItem.value; let i = $index) {\r\n <mat-list-item class=\"menu-item\"\r\n [class.active]=\"listItem.active\" [class.disabled]=\"listItem.disabled\"\r\n (click)=\"data.selectHandle($event, step, i); select(listItem.disabled);\">\r\n <div matLine>{{listItem.label}}</div>\r\n </mat-list-item>\r\n }\r\n </mat-list>\r\n </mat-tab>\r\n }\r\n </mat-tab-group>\r\n</div>",
193
+ styles: [".cmat-cascade-bottom-sheet{padding:0;margin:-8px -16px}.cmat-cascade-bottom-sheet .sheet-header{display:flex;flex:1 1 0%;align-items:center;font-size:1rem;border-bottom-width:1px;padding:12px 16px}.cmat-cascade-bottom-sheet .sheet-header .sheet-title{margin:0;padding:0;letter-spacing:.05rem;text-align:center;flex-grow:1}.cmat-cascade-bottom-sheet .menu-list{vertical-align:top;box-sizing:border-box;margin:0;padding:0;width:100%;overflow:hidden;position:relative;height:204px}.cmat-cascade-bottom-sheet .menu-item{padding:0 16px;text-overflow:ellipsis;box-sizing:border-box;cursor:pointer!important;font-size:14px;line-height:3em}.cmat-cascade-bottom-sheet .menu-item.disabled{cursor:not-allowed!important;pointer-events:none}\n"]
194
+ }]
195
+ }],
196
+ ctorParameters: () => []
197
+ });
198
+ var CmatCascadeMenuComponent = class CmatCascadeMenuComponent {
199
+ constructor() {
200
+ this.root = inject(CmatCascadeListComponent, { optional: true });
201
+ }
202
+ static {
203
+ this.ɵfac = i0.ɵɵngDeclareFactory({
204
+ minVersion: "12.0.0",
205
+ version: "22.2.3",
206
+ ngImport: i0,
207
+ type: CmatCascadeMenuComponent,
208
+ deps: [],
209
+ target: i0.ɵɵFactoryTarget.Component
210
+ });
211
+ }
212
+ static {
213
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
214
+ minVersion: "17.0.0",
215
+ version: "22.2.3",
216
+ type: CmatCascadeMenuComponent,
217
+ isStandalone: true,
218
+ selector: "cmat-cascade-menu",
219
+ exportAs: ["cmatCascadeMenu"],
220
+ ngImport: i0,
221
+ template: "@for (menuItem of root.steps(); track $index; let step = $index) {\r\n <mat-list class=\"menu-list overflow-y-auto scrollbar-custom\">\r\n @for (listItem of menuItem; track listItem.value; let i = $index) {\r\n <mat-list-item class=\"menu-item\"\r\n [class.active]=\"listItem.active\" [class.disabled]=\"listItem.disabled\"\r\n (click)=\"root.selectHandle($event, step, i);\">\r\n <div matLine>{{listItem.label}}</div>\r\n @if (listItem.children && listItem.children.length) {\r\n <mat-icon class=\"item-icon\" [svgIcon]=\"'mat_outline:chevron_right'\"></mat-icon>\r\n }\r\n </mat-list-item>\r\n }\r\n </mat-list>\r\n}",
222
+ styles: ["cmat-cascade-menu{height:200px;z-index:2007;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f;white-space:nowrap}cmat-cascade-menu .menu-list{display:inline-block;border-right-width:1px;box-sizing:border-box;margin:0;padding:.5rem;overflow:hidden;position:relative;height:200px;min-width:200px;vertical-align:top}cmat-cascade-menu .menu-list:last-child{border-right-width:0px}cmat-cascade-menu .menu-item{line-height:3rem;padding:0 16px;position:relative;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;box-sizing:border-box;cursor:pointer!important}cmat-cascade-menu .menu-item.disabled{cursor:not-allowed!important}cmat-cascade-menu .menu-item .item-icon{position:absolute;justify-items:center;top:50%;bottom:50%;right:0;transform:translateY(-50%)}\n"],
223
+ dependencies: [
224
+ {
225
+ kind: "ngmodule",
226
+ type: MatListModule
227
+ },
228
+ {
229
+ kind: "component",
230
+ type: i3$1.MatList,
231
+ selector: "mat-list",
232
+ exportAs: ["matList"]
233
+ },
234
+ {
235
+ kind: "component",
236
+ type: i3$1.MatListItem,
237
+ selector: "mat-list-item, a[mat-list-item], button[mat-list-item]",
238
+ inputs: ["activated"],
239
+ exportAs: ["matListItem"]
240
+ },
241
+ {
242
+ kind: "ngmodule",
243
+ type: MatIconModule
244
+ },
245
+ {
246
+ kind: "component",
247
+ type: i4$1.MatIcon,
248
+ selector: "mat-icon",
249
+ inputs: [
250
+ "color",
251
+ "inline",
252
+ "svgIcon",
253
+ "fontSet",
254
+ "fontIcon"
255
+ ],
256
+ exportAs: ["matIcon"]
257
+ }
258
+ ],
259
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
260
+ encapsulation: i0.ViewEncapsulation.None
261
+ });
262
+ }
263
+ };
264
+ i0.ɵɵngDeclareClassMetadata({
265
+ minVersion: "12.0.0",
266
+ version: "22.2.3",
267
+ ngImport: i0,
268
+ type: CmatCascadeMenuComponent,
269
+ decorators: [{
270
+ type: Component,
271
+ args: [{
272
+ selector: "cmat-cascade-menu",
273
+ encapsulation: ViewEncapsulation.None,
274
+ changeDetection: ChangeDetectionStrategy.OnPush,
275
+ exportAs: "cmatCascadeMenu",
276
+ imports: [MatListModule, MatIconModule],
277
+ template: "@for (menuItem of root.steps(); track $index; let step = $index) {\r\n <mat-list class=\"menu-list overflow-y-auto scrollbar-custom\">\r\n @for (listItem of menuItem; track listItem.value; let i = $index) {\r\n <mat-list-item class=\"menu-item\"\r\n [class.active]=\"listItem.active\" [class.disabled]=\"listItem.disabled\"\r\n (click)=\"root.selectHandle($event, step, i);\">\r\n <div matLine>{{listItem.label}}</div>\r\n @if (listItem.children && listItem.children.length) {\r\n <mat-icon class=\"item-icon\" [svgIcon]=\"'mat_outline:chevron_right'\"></mat-icon>\r\n }\r\n </mat-list-item>\r\n }\r\n </mat-list>\r\n}",
278
+ styles: ["cmat-cascade-menu{height:200px;z-index:2007;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f;white-space:nowrap}cmat-cascade-menu .menu-list{display:inline-block;border-right-width:1px;box-sizing:border-box;margin:0;padding:.5rem;overflow:hidden;position:relative;height:200px;min-width:200px;vertical-align:top}cmat-cascade-menu .menu-list:last-child{border-right-width:0px}cmat-cascade-menu .menu-item{line-height:3rem;padding:0 16px;position:relative;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;box-sizing:border-box;cursor:pointer!important}cmat-cascade-menu .menu-item.disabled{cursor:not-allowed!important}cmat-cascade-menu .menu-item .item-icon{position:absolute;justify-items:center;top:50%;bottom:50%;right:0;transform:translateY(-50%)}\n"]
279
+ }]
280
+ }]
281
+ });
81
282
  let NEXT_ID = 0;
82
- class CmatCascadeListComponent {
83
- get placeholder() {
84
- return this._placeholderSignal();
85
- }
86
- set placeholder(value) {
87
- this._placeholderSignal.set(value);
88
- this.stateChanges.next();
89
- }
90
- get disabled() {
91
- if (this.ngControl?.disabled != null) {
92
- return this.ngControl.disabled;
93
- }
94
- return this._disabledSignal();
95
- }
96
- set disabled(value) {
97
- this._disabledSignal.set(coerceBooleanProperty(value));
98
- this.stateChanges.next();
99
- }
100
- get required() {
101
- return this._requiredSignal();
102
- }
103
- set required(value) {
104
- this._requiredSignal.set(coerceBooleanProperty(value));
105
- }
106
- get empty() {
107
- return !this._value();
108
- }
109
- get shouldLabelFloat() {
110
- return this.focused || !this.empty;
111
- }
112
- get errorState() {
113
- if (this.ngControl == null) {
114
- return false;
115
- }
116
- return (this.touched && this.ngControl.invalid) ?? false;
117
- }
118
- ;
119
- constructor() {
120
- this.id = `cmat-cascade-list-${NEXT_ID++}`;
121
- this.options = input.required(/* @ts-ignore */
122
- ...(ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []));
123
- this.clearable = input(false, /* @ts-ignore */
124
- ...(ngDevMode ? [{ debugName: "clearable" }] : /* istanbul ignore next */ []));
125
- this.fullLevels = input(true, /* @ts-ignore */
126
- ...(ngDevMode ? [{ debugName: "fullLevels" }] : /* istanbul ignore next */ []));
127
- this.changeOnSelect = input(false, /* @ts-ignore */
128
- ...(ngDevMode ? [{ debugName: "changeOnSelect" }] : /* istanbul ignore next */ []));
129
- this.allowLabelValue = input(false, /* @ts-ignore */
130
- ...(ngDevMode ? [{ debugName: "allowLabelValue" }] : /* istanbul ignore next */ []));
131
- this.touchUi = input(false, { ...(ngDevMode ? { debugName: "touchUi" } : /* istanbul ignore next */ {}), transform: coerceBooleanProperty });
132
- this.overlayOrigin = viewChild.required(CdkOverlayOrigin, /* @ts-ignore */
133
- ...(ngDevMode ? [{ debugName: "overlayOrigin" }] : /* istanbul ignore next */ []));
134
- this.menuTemplate = viewChild.required(CdkPortal, /* @ts-ignore */
135
- ...(ngDevMode ? [{ debugName: "menuTemplate" }] : /* istanbul ignore next */ []));
136
- this._inputElement = viewChild('inputElement', /* @ts-ignore */
137
- ...(ngDevMode ? [{ debugName: "_inputElement" }] : /* istanbul ignore next */ []));
138
- this._placeholderSignal = signal('请选择', /* @ts-ignore */
139
- ...(ngDevMode ? [{ debugName: "_placeholderSignal" }] : /* istanbul ignore next */ []));
140
- this._disabledSignal = signal(false, /* @ts-ignore */
141
- ...(ngDevMode ? [{ debugName: "_disabledSignal" }] : /* istanbul ignore next */ []));
142
- this._requiredSignal = signal(false, /* @ts-ignore */
143
- ...(ngDevMode ? [{ debugName: "_requiredSignal" }] : /* istanbul ignore next */ []));
144
- this.ngControl = inject(NgControl, { optional: true, self: true });
145
- this.stateChanges = new Subject();
146
- this.controlType = 'cmat-cascade-list';
147
- this._overlay = inject(Overlay);
148
- this._breakpointObserver = inject(BreakpointObserver);
149
- this._bottomSheet = inject(MatBottomSheet);
150
- this._destroyRef = inject(DestroyRef);
151
- this._value = signal(null, /* @ts-ignore */
152
- ...(ngDevMode ? [{ debugName: "_value" }] : /* istanbul ignore next */ []));
153
- this._focused = signal(false, /* @ts-ignore */
154
- ...(ngDevMode ? [{ debugName: "_focused" }] : /* istanbul ignore next */ []));
155
- this._touched = signal(false, /* @ts-ignore */
156
- ...(ngDevMode ? [{ debugName: "_touched" }] : /* istanbul ignore next */ []));
157
- this.currentLabels = computed(() => {
158
- const value = this._value();
159
- const opts = this.options();
160
- if (!value?.length || !opts.length) {
161
- return [];
162
- }
163
- return this._findLabelsByValue(value, opts);
164
- }, /* @ts-ignore */
165
- ...(ngDevMode ? [{ debugName: "currentLabels" }] : /* istanbul ignore next */ []));
166
- this.steps = computed(() => {
167
- const labels = this.currentLabels();
168
- const opts = this.options();
169
- if (!labels.length) {
170
- const step1 = opts.map(item => ({ ...item, active: false }));
171
- return [step1];
172
- }
173
- return this._buildStepsFromLabels(labels, opts);
174
- }, /* @ts-ignore */
175
- ...(ngDevMode ? [{ debugName: "steps" }] : /* istanbul ignore next */ []));
176
- this.showClearIcon = computed(() => {
177
- return this.clearable() && this.currentLabels().length > 0 && !this.disabled;
178
- }, /* @ts-ignore */
179
- ...(ngDevMode ? [{ debugName: "showClearIcon" }] : /* istanbul ignore next */ []));
180
- this.menuVisible = computed(() => {
181
- return !this.touchUi() && (this.overlayRef?.hasAttached() ?? false);
182
- }, /* @ts-ignore */
183
- ...(ngDevMode ? [{ debugName: "menuVisible" }] : /* istanbul ignore next */ []));
184
- // eslint-disable-next-line @typescript-eslint/no-empty-function
185
- this._onChange = () => { };
186
- // eslint-disable-next-line @typescript-eslint/no-empty-function
187
- this._onTouched = () => { };
188
- if (this.ngControl != null) {
189
- this.ngControl.valueAccessor = this;
190
- }
191
- effect(() => {
192
- const labels = this.currentLabels();
193
- if (this._inputElement()?.nativeElement.value !== this._getLabelText(labels)) {
194
- this._updateInputValue(labels);
195
- }
196
- });
197
- }
198
- get value() {
199
- return this._value();
200
- }
201
- set value(val) {
202
- this._value.set(val);
203
- }
204
- get focused() {
205
- return this._focused();
206
- }
207
- set focused(val) {
208
- this._focused.set(val);
209
- this.stateChanges.next();
210
- }
211
- get touched() {
212
- return this._touched();
213
- }
214
- set touched(val) {
215
- this._touched.set(val);
216
- }
217
- ngOnInit() {
218
- const config = new OverlayConfig({
219
- hasBackdrop: true,
220
- backdropClass: 'cdk-overlay-transparent-backdrop',
221
- scrollStrategy: this._overlay.scrollStrategies.reposition(),
222
- positionStrategy: this._overlay
223
- .position()
224
- .flexibleConnectedTo(this.overlayOrigin().elementRef)
225
- .withPositions([
226
- { originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top' },
227
- { originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom' }
228
- ])
229
- });
230
- this._breakpointObserver.observe(Breakpoints.Handset).pipe(takeUntilDestroyed(this._destroyRef), map(match => match.matches)).subscribe((matches) => {
231
- if (this.touchUi() !== matches) {
232
- if (!matches && this.bottomSheetRef) {
233
- // 从移动切换到桌面:关闭 BottomSheet
234
- this.bottomSheetRef.dismiss();
235
- // 可选:自动打开 Overlay
236
- if (this.focused) {
237
- setTimeout(() => this.overlayRef.attach(this.menuTemplate()));
238
- }
239
- }
240
- else if (matches && this.overlayRef?.hasAttached()) {
241
- // 从桌面切换到移动:关闭 Overlay
242
- this.overlayRef.detach();
243
- // 可选:自动打开 BottomSheet
244
- this._openBottomSheet();
245
- }
246
- }
247
- });
248
- this.overlayRef = this._overlay.create(config);
249
- this.overlayRef.backdropClick().subscribe(() => {
250
- this.overlayRef.detach();
251
- });
252
- }
253
- ngOnDestroy() {
254
- this.stateChanges.complete();
255
- if (this.overlayRef) {
256
- this.overlayRef.dispose();
257
- }
258
- }
259
- writeValue(value) {
260
- this._value.set(value);
261
- }
262
- registerOnChange(fn) {
263
- this._onChange = fn;
264
- }
265
- registerOnTouched(fn) {
266
- this._onTouched = fn;
267
- }
268
- setDisabledState(isDisabled) {
269
- this._disabledSignal.set(isDisabled);
270
- }
271
- setDescribedByIds(ids) {
272
- if (ids.length) {
273
- this._inputElement()?.nativeElement.setAttribute('aria-describedby', ids.join(' '));
274
- }
275
- else {
276
- this._inputElement()?.nativeElement.removeAttribute('aria-describedby');
277
- }
278
- }
279
- onContainerClick() {
280
- if (!this.focused) {
281
- this._inputElement()?.nativeElement.focus();
282
- }
283
- }
284
- clickHandle(event) {
285
- if (this.disabled || this.options().length === 0) {
286
- return;
287
- }
288
- const element = event.target;
289
- const cascadeListElement = this._inputElement()?.nativeElement.closest('.cmat-cascade-list');
290
- if (!cascadeListElement?.contains(element)) {
291
- return;
292
- }
293
- if (this.touchUi()) {
294
- if (this.overlayRef?.hasAttached()) {
295
- this.overlayRef.detach();
296
- }
297
- this._openBottomSheet();
298
- }
299
- else {
300
- this.overlayRef.attach(this.menuTemplate());
301
- }
302
- }
303
- clearValue(event) {
304
- if (event) {
305
- event.stopPropagation();
306
- event.preventDefault();
307
- }
308
- this._value.set(null);
309
- this._onChange(null);
310
- this._onTouched();
311
- }
312
- selectHandle(event, step, index) {
313
- event.stopPropagation();
314
- const currentSteps = this.steps();
315
- const selectedItem = currentSteps[step][index];
316
- if (selectedItem.disabled) {
317
- return;
318
- }
319
- this._value.update((values) => {
320
- const newValues = values ? values.slice(0, step) : [];
321
- newValues.push({
322
- value: selectedItem.value,
323
- label: selectedItem.label
324
- });
325
- return newValues;
326
- });
327
- this._onChange(this._value());
328
- this._onTouched();
329
- if (selectedItem.children?.length && !this.changeOnSelect()) {
330
- return;
331
- }
332
- if (this.overlayRef?.hasAttached()) {
333
- this.overlayRef.detach();
334
- }
335
- if (this.touchUi() && this.bottomSheetRef) {
336
- this.bottomSheetRef.dismiss();
337
- }
338
- }
339
- onFocusIn() {
340
- if (!this.focused) {
341
- this.focused = true;
342
- }
343
- }
344
- onFocusOut(event) {
345
- const relatedTarget = event.relatedTarget;
346
- const isMenuClick = relatedTarget?.closest('.cmat-cascade-menu, .cmat-cascade-bottom-sheet');
347
- if (!isMenuClick && !this._inputElement()?.nativeElement.contains(relatedTarget)) {
348
- this.touched = true;
349
- this.focused = false;
350
- this._onTouched();
351
- }
352
- }
353
- _findLabelsByValue(value, options) {
354
- const result = [];
355
- let currentOptions = options;
356
- for (const val of value) {
357
- const found = this.allowLabelValue()
358
- ? currentOptions.find(item => item.value === val.value || item.label === val.label)
359
- : currentOptions.find(item => item.value === val.value);
360
- if (found) {
361
- result.push(found);
362
- currentOptions = found.children ?? [];
363
- }
364
- else {
365
- break;
366
- }
367
- }
368
- return result;
369
- }
370
- _buildStepsFromLabels(labels, rootOptions) {
371
- const steps = [];
372
- let currentOptions = rootOptions;
373
- for (const label of labels) {
374
- const stepItems = currentOptions.map(item => ({
375
- ...item,
376
- active: item.value === label.value
377
- }));
378
- steps.push(stepItems);
379
- currentOptions = label.children ?? [];
380
- }
381
- if (currentOptions.length > 0) {
382
- steps.push(currentOptions.map(item => ({ ...item, active: false })));
383
- }
384
- return steps;
385
- }
386
- _updateInputValue(labels) {
387
- if (!this._inputElement) {
388
- return;
389
- }
390
- let text;
391
- if (this.fullLevels()) {
392
- text = labels.map((l, i) => `${l.label}${i < labels.length - 1 ? ' / ' : ''}`).join('');
393
- }
394
- else {
395
- text = labels[labels.length - 1]?.label ?? '';
396
- }
397
- this._inputElement().nativeElement.value = text;
398
- }
399
- _openBottomSheet() {
400
- const data = {
401
- options: this.options(),
402
- steps: this.steps,
403
- currentLabels: this.currentLabels,
404
- selectHandle: this.selectHandle.bind(this),
405
- changeOnSelect: this.changeOnSelect(),
406
- placeholder: this.placeholder
407
- };
408
- this.bottomSheetRef = this._bottomSheet.open(CmatCascadeBottomSheetComponent, {
409
- data
410
- });
411
- }
412
- _getLabelText(labels) {
413
- if (this.fullLevels()) {
414
- return labels.map((l, i) => `${l.label}${i < labels.length - 1 ? ' / ' : ''}`).join('');
415
- }
416
- return labels[labels.length - 1]?.label ?? '';
417
- }
418
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: CmatCascadeListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
419
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.0", type: CmatCascadeListComponent, isStandalone: true, selector: "cmat-cascade-list", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: true, transformFunction: null }, clearable: { classPropertyName: "clearable", publicName: "clearable", isSignal: true, isRequired: false, transformFunction: null }, fullLevels: { classPropertyName: "fullLevels", publicName: "fullLevels", isSignal: true, isRequired: false, transformFunction: null }, changeOnSelect: { classPropertyName: "changeOnSelect", publicName: "changeOnSelect", isSignal: true, isRequired: false, transformFunction: null }, allowLabelValue: { classPropertyName: "allowLabelValue", publicName: "allowLabelValue", isSignal: true, isRequired: false, transformFunction: null }, touchUi: { classPropertyName: "touchUi", publicName: "touchUi", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: false, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: false, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: false, isRequired: false, transformFunction: null } }, host: { properties: { "attr.id": "id" } }, providers: [{ provide: MatFormFieldControl, useExisting: CmatCascadeListComponent }], viewQueries: [{ propertyName: "overlayOrigin", first: true, predicate: CdkOverlayOrigin, descendants: true, isSignal: true }, { propertyName: "menuTemplate", first: true, predicate: CdkPortal, descendants: true, isSignal: true }, { propertyName: "_inputElement", first: true, predicate: ["inputElement"], descendants: true, isSignal: true }], exportAs: ["cmatCascadeList"], ngImport: i0, template: "<span role=\"presentation\" class=\"cmat-cascade-list\" cdk-overlay-origin\r\n [ngClass]=\"{'opened': menuVisible(), 'disabled': disabled, 'error-state': errorState}\">\r\n <input #inputElement matInput readonly [required]='required' [placeholder]=\"currentLabels().length>0 ? '' : placeholder\" (click)=\"clickHandle($event)\"\r\n (focusin)=\"onFocusIn()\" (focusout)=\"onFocusOut($event)\">\r\n\r\n @if (showClearIcon()) {\r\n <button type=\"button\" matSuffix matIconButton aria-label=\"Clear\" (click)=\"clearValue($event)\">\r\n <mat-icon [svgIcon]=\"'heroicons_outline:x-mark'\"></mat-icon>\r\n </button>\r\n }\r\n @else {\r\n <mat-icon matSuffix [svgIcon]=\"'mat_outline:arrow_drop_down'\"></mat-icon>\r\n }\r\n</span>\r\n\r\n<ng-template #menuTemplate=\"cdkPortal\" cdkPortal>\r\n <cmat-cascade-menu></cmat-cascade-menu>\r\n</ng-template>", styles: ["cmat-cascade-list{width:100%}.cmat-cascade-list{position:relative;display:flex;width:100%;line-height:2;align-items:center}.cmat-cascade-list mat-form-field{width:100%}.cmat-cascade-list input{cursor:pointer}.cmat-cascade-list.disabled .cascade-label{z-index:2}\n"], dependencies: [{ kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: CmatCascadeMenuComponent, selector: "cmat-cascade-menu", exportAs: ["cmatCascadeMenu"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i2$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "directive", type: i2$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: OverlayModule }, { kind: "directive", type: i3$1.CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "ngmodule", type: PortalModule }, { kind: "directive", type: i4$1.CdkPortal, selector: "[cdkPortal]", exportAs: ["cdkPortal"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
420
- }
421
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: CmatCascadeListComponent, decorators: [{
422
- type: Component,
423
- args: [{ selector: 'cmat-cascade-list', providers: [{ provide: MatFormFieldControl, useExisting: CmatCascadeListComponent }], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'cmatCascadeList', imports: [MatIconModule, NgClass, CmatCascadeMenuComponent, MatInputModule,
424
- OverlayModule, PortalModule, MatButtonModule], host: {
425
- // eslint-disable-next-line @typescript-eslint/naming-convention
426
- '[attr.id]': 'id',
427
- }, template: "<span role=\"presentation\" class=\"cmat-cascade-list\" cdk-overlay-origin\r\n [ngClass]=\"{'opened': menuVisible(), 'disabled': disabled, 'error-state': errorState}\">\r\n <input #inputElement matInput readonly [required]='required' [placeholder]=\"currentLabels().length>0 ? '' : placeholder\" (click)=\"clickHandle($event)\"\r\n (focusin)=\"onFocusIn()\" (focusout)=\"onFocusOut($event)\">\r\n\r\n @if (showClearIcon()) {\r\n <button type=\"button\" matSuffix matIconButton aria-label=\"Clear\" (click)=\"clearValue($event)\">\r\n <mat-icon [svgIcon]=\"'heroicons_outline:x-mark'\"></mat-icon>\r\n </button>\r\n }\r\n @else {\r\n <mat-icon matSuffix [svgIcon]=\"'mat_outline:arrow_drop_down'\"></mat-icon>\r\n }\r\n</span>\r\n\r\n<ng-template #menuTemplate=\"cdkPortal\" cdkPortal>\r\n <cmat-cascade-menu></cmat-cascade-menu>\r\n</ng-template>", styles: ["cmat-cascade-list{width:100%}.cmat-cascade-list{position:relative;display:flex;width:100%;line-height:2;align-items:center}.cmat-cascade-list mat-form-field{width:100%}.cmat-cascade-list input{cursor:pointer}.cmat-cascade-list.disabled .cascade-label{z-index:2}\n"] }]
428
- }], ctorParameters: () => [], propDecorators: { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: true }] }], clearable: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearable", required: false }] }], fullLevels: [{ type: i0.Input, args: [{ isSignal: true, alias: "fullLevels", required: false }] }], changeOnSelect: [{ type: i0.Input, args: [{ isSignal: true, alias: "changeOnSelect", required: false }] }], allowLabelValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowLabelValue", required: false }] }], touchUi: [{ type: i0.Input, args: [{ isSignal: true, alias: "touchUi", required: false }] }], overlayOrigin: [{ type: i0.ViewChild, args: [i0.forwardRef(() => CdkOverlayOrigin), { isSignal: true }] }], menuTemplate: [{ type: i0.ViewChild, args: [i0.forwardRef(() => CdkPortal), { isSignal: true }] }], _inputElement: [{ type: i0.ViewChild, args: ['inputElement', { isSignal: true }] }], placeholder: [{
429
- type: Input
430
- }], disabled: [{
431
- type: Input
432
- }], required: [{
433
- type: Input
434
- }], value: [{
435
- type: Input
436
- }] } });
437
-
438
- /**
439
- * Generated bundle index. Do not edit.
440
- */
441
-
283
+ var CmatCascadeListComponent = class CmatCascadeListComponent {
284
+ get placeholder() {
285
+ return this._placeholderSignal();
286
+ }
287
+ set placeholder(value) {
288
+ this._placeholderSignal.set(value);
289
+ this.stateChanges.next();
290
+ }
291
+ get disabled() {
292
+ if (this.ngControl?.disabled != null) return this.ngControl.disabled;
293
+ return this._disabledSignal();
294
+ }
295
+ set disabled(value) {
296
+ this._disabledSignal.set(coerceBooleanProperty(value));
297
+ this.stateChanges.next();
298
+ }
299
+ get required() {
300
+ return this._requiredSignal();
301
+ }
302
+ set required(value) {
303
+ this._requiredSignal.set(coerceBooleanProperty(value));
304
+ }
305
+ get empty() {
306
+ return !this._value();
307
+ }
308
+ get shouldLabelFloat() {
309
+ return this.focused || !this.empty;
310
+ }
311
+ get errorState() {
312
+ if (this.ngControl == null) return false;
313
+ return (this.touched && this.ngControl.invalid) ?? false;
314
+ }
315
+ constructor() {
316
+ this.id = `cmat-cascade-list-${NEXT_ID++}`;
317
+ this.options = input.required(...ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []);
318
+ this.clearable = input(false, ...ngDevMode ? [{ debugName: "clearable" }] : /* istanbul ignore next */ []);
319
+ this.fullLevels = input(true, ...ngDevMode ? [{ debugName: "fullLevels" }] : /* istanbul ignore next */ []);
320
+ this.changeOnSelect = input(false, ...ngDevMode ? [{ debugName: "changeOnSelect" }] : /* istanbul ignore next */ []);
321
+ this.allowLabelValue = input(false, ...ngDevMode ? [{ debugName: "allowLabelValue" }] : /* istanbul ignore next */ []);
322
+ this.touchUi = input(false, {
323
+ ...ngDevMode ? { debugName: "touchUi" } : /* istanbul ignore next */ {},
324
+ transform: coerceBooleanProperty
325
+ });
326
+ this.overlayOrigin = viewChild.required(CdkOverlayOrigin, ...ngDevMode ? [{ debugName: "overlayOrigin" }] : /* istanbul ignore next */ []);
327
+ this.menuTemplate = viewChild.required(CdkPortal, ...ngDevMode ? [{ debugName: "menuTemplate" }] : /* istanbul ignore next */ []);
328
+ this._inputElement = viewChild("inputElement", ...ngDevMode ? [{ debugName: "_inputElement" }] : /* istanbul ignore next */ []);
329
+ this._placeholderSignal = signal("请选择", ...ngDevMode ? [{ debugName: "_placeholderSignal" }] : /* istanbul ignore next */ []);
330
+ this._disabledSignal = signal(false, ...ngDevMode ? [{ debugName: "_disabledSignal" }] : /* istanbul ignore next */ []);
331
+ this._requiredSignal = signal(false, ...ngDevMode ? [{ debugName: "_requiredSignal" }] : /* istanbul ignore next */ []);
332
+ this.ngControl = inject(NgControl, {
333
+ optional: true,
334
+ self: true
335
+ });
336
+ this.stateChanges = new Subject();
337
+ this.controlType = "cmat-cascade-list";
338
+ this._overlay = inject(Overlay);
339
+ this._breakpointObserver = inject(BreakpointObserver);
340
+ this._bottomSheet = inject(MatBottomSheet);
341
+ this._destroyRef = inject(DestroyRef);
342
+ this._value = signal(null, ...ngDevMode ? [{ debugName: "_value" }] : /* istanbul ignore next */ []);
343
+ this._focused = signal(false, ...ngDevMode ? [{ debugName: "_focused" }] : /* istanbul ignore next */ []);
344
+ this._touched = signal(false, ...ngDevMode ? [{ debugName: "_touched" }] : /* istanbul ignore next */ []);
345
+ this.currentLabels = computed(() => {
346
+ const value = this._value();
347
+ const opts = this.options();
348
+ if (!value?.length || !opts.length) return [];
349
+ return this._findLabelsByValue(value, opts);
350
+ }, ...ngDevMode ? [{ debugName: "currentLabels" }] : /* istanbul ignore next */ []);
351
+ this.steps = computed(() => {
352
+ const labels = this.currentLabels();
353
+ const opts = this.options();
354
+ if (!labels.length) return [opts.map((item) => ({
355
+ ...item,
356
+ active: false
357
+ }))];
358
+ return this._buildStepsFromLabels(labels, opts);
359
+ }, ...ngDevMode ? [{ debugName: "steps" }] : /* istanbul ignore next */ []);
360
+ this.showClearIcon = computed(() => {
361
+ return this.clearable() && this.currentLabels().length > 0 && !this.disabled;
362
+ }, ...ngDevMode ? [{ debugName: "showClearIcon" }] : /* istanbul ignore next */ []);
363
+ this.menuVisible = computed(() => {
364
+ return !this.touchUi() && (this.overlayRef?.hasAttached() ?? false);
365
+ }, ...ngDevMode ? [{ debugName: "menuVisible" }] : /* istanbul ignore next */ []);
366
+ this._onChange = () => {};
367
+ this._onTouched = () => {};
368
+ if (this.ngControl != null) this.ngControl.valueAccessor = this;
369
+ effect(() => {
370
+ const labels = this.currentLabels();
371
+ if (this._inputElement()?.nativeElement.value !== this._getLabelText(labels)) this._updateInputValue(labels);
372
+ });
373
+ }
374
+ get value() {
375
+ return this._value();
376
+ }
377
+ set value(val) {
378
+ this._value.set(val);
379
+ }
380
+ get focused() {
381
+ return this._focused();
382
+ }
383
+ set focused(val) {
384
+ this._focused.set(val);
385
+ this.stateChanges.next();
386
+ }
387
+ get touched() {
388
+ return this._touched();
389
+ }
390
+ set touched(val) {
391
+ this._touched.set(val);
392
+ }
393
+ ngOnInit() {
394
+ const config = new OverlayConfig({
395
+ hasBackdrop: true,
396
+ backdropClass: "cdk-overlay-transparent-backdrop",
397
+ scrollStrategy: this._overlay.scrollStrategies.reposition(),
398
+ positionStrategy: this._overlay.position().flexibleConnectedTo(this.overlayOrigin().elementRef).withPositions([{
399
+ originX: "start",
400
+ originY: "bottom",
401
+ overlayX: "start",
402
+ overlayY: "top"
403
+ }, {
404
+ originX: "start",
405
+ originY: "top",
406
+ overlayX: "start",
407
+ overlayY: "bottom"
408
+ }])
409
+ });
410
+ this._breakpointObserver.observe(Breakpoints.Handset).pipe(takeUntilDestroyed(this._destroyRef), map((match) => match.matches)).subscribe((matches) => {
411
+ if (this.touchUi() !== matches) {
412
+ if (!matches && this.bottomSheetRef) {
413
+ this.bottomSheetRef.dismiss();
414
+ if (this.focused) setTimeout(() => this.overlayRef.attach(this.menuTemplate()));
415
+ } else if (matches && this.overlayRef?.hasAttached()) {
416
+ this.overlayRef.detach();
417
+ this._openBottomSheet();
418
+ }
419
+ }
420
+ });
421
+ this.overlayRef = this._overlay.create(config);
422
+ this.overlayRef.backdropClick().subscribe(() => {
423
+ this.overlayRef.detach();
424
+ });
425
+ }
426
+ ngOnDestroy() {
427
+ this.stateChanges.complete();
428
+ if (this.overlayRef) this.overlayRef.dispose();
429
+ }
430
+ writeValue(value) {
431
+ this._value.set(value);
432
+ }
433
+ registerOnChange(fn) {
434
+ this._onChange = fn;
435
+ }
436
+ registerOnTouched(fn) {
437
+ this._onTouched = fn;
438
+ }
439
+ setDisabledState(isDisabled) {
440
+ this._disabledSignal.set(isDisabled);
441
+ }
442
+ setDescribedByIds(ids) {
443
+ if (ids.length) this._inputElement()?.nativeElement.setAttribute("aria-describedby", ids.join(" "));
444
+ else this._inputElement()?.nativeElement.removeAttribute("aria-describedby");
445
+ }
446
+ onContainerClick() {
447
+ if (!this.focused) this._inputElement()?.nativeElement.focus();
448
+ }
449
+ clickHandle(event) {
450
+ if (this.disabled || this.options().length === 0) return;
451
+ const element = event.target;
452
+ if (!(this._inputElement()?.nativeElement.closest(".cmat-cascade-list"))?.contains(element)) return;
453
+ if (this.touchUi()) {
454
+ if (this.overlayRef?.hasAttached()) this.overlayRef.detach();
455
+ this._openBottomSheet();
456
+ } else this.overlayRef.attach(this.menuTemplate());
457
+ }
458
+ clearValue(event) {
459
+ if (event) {
460
+ event.stopPropagation();
461
+ event.preventDefault();
462
+ }
463
+ this._value.set(null);
464
+ this._onChange(null);
465
+ this._onTouched();
466
+ }
467
+ selectHandle(event, step, index) {
468
+ event.stopPropagation();
469
+ const selectedItem = this.steps()[step][index];
470
+ if (selectedItem.disabled) return;
471
+ this._value.update((values) => {
472
+ const newValues = values ? values.slice(0, step) : [];
473
+ newValues.push({
474
+ value: selectedItem.value,
475
+ label: selectedItem.label
476
+ });
477
+ return newValues;
478
+ });
479
+ this._onChange(this._value());
480
+ this._onTouched();
481
+ if (selectedItem.children?.length && !this.changeOnSelect()) return;
482
+ if (this.overlayRef?.hasAttached()) this.overlayRef.detach();
483
+ if (this.touchUi() && this.bottomSheetRef) this.bottomSheetRef.dismiss();
484
+ }
485
+ onFocusIn() {
486
+ if (!this.focused) this.focused = true;
487
+ }
488
+ onFocusOut(event) {
489
+ const relatedTarget = event.relatedTarget;
490
+ if (!relatedTarget?.closest(".cmat-cascade-menu, .cmat-cascade-bottom-sheet") && !this._inputElement()?.nativeElement.contains(relatedTarget)) {
491
+ this.touched = true;
492
+ this.focused = false;
493
+ this._onTouched();
494
+ }
495
+ }
496
+ _findLabelsByValue(value, options) {
497
+ const result = [];
498
+ let currentOptions = options;
499
+ for (const val of value) {
500
+ const found = this.allowLabelValue() ? currentOptions.find((item) => item.value === val.value || item.label === val.label) : currentOptions.find((item) => item.value === val.value);
501
+ if (found) {
502
+ result.push(found);
503
+ currentOptions = found.children ?? [];
504
+ } else break;
505
+ }
506
+ return result;
507
+ }
508
+ _buildStepsFromLabels(labels, rootOptions) {
509
+ const steps = [];
510
+ let currentOptions = rootOptions;
511
+ for (const label of labels) {
512
+ const stepItems = currentOptions.map((item) => ({
513
+ ...item,
514
+ active: item.value === label.value
515
+ }));
516
+ steps.push(stepItems);
517
+ currentOptions = label.children ?? [];
518
+ }
519
+ if (currentOptions.length > 0) steps.push(currentOptions.map((item) => ({
520
+ ...item,
521
+ active: false
522
+ })));
523
+ return steps;
524
+ }
525
+ _updateInputValue(labels) {
526
+ if (!this._inputElement) return;
527
+ let text;
528
+ if (this.fullLevels()) text = labels.map((l, i) => `${l.label}${i < labels.length - 1 ? " / " : ""}`).join("");
529
+ else text = labels[labels.length - 1]?.label ?? "";
530
+ this._inputElement().nativeElement.value = text;
531
+ }
532
+ _openBottomSheet() {
533
+ const data = {
534
+ options: this.options(),
535
+ steps: this.steps,
536
+ currentLabels: this.currentLabels,
537
+ selectHandle: this.selectHandle.bind(this),
538
+ changeOnSelect: this.changeOnSelect(),
539
+ placeholder: this.placeholder
540
+ };
541
+ this.bottomSheetRef = this._bottomSheet.open(CmatCascadeBottomSheetComponent, { data });
542
+ }
543
+ _getLabelText(labels) {
544
+ if (this.fullLevels()) return labels.map((l, i) => `${l.label}${i < labels.length - 1 ? " / " : ""}`).join("");
545
+ return labels[labels.length - 1]?.label ?? "";
546
+ }
547
+ static {
548
+ this.ɵfac = i0.ɵɵngDeclareFactory({
549
+ minVersion: "12.0.0",
550
+ version: "22.2.3",
551
+ ngImport: i0,
552
+ type: CmatCascadeListComponent,
553
+ deps: [],
554
+ target: i0.ɵɵFactoryTarget.Component
555
+ });
556
+ }
557
+ static {
558
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
559
+ minVersion: "17.0.0",
560
+ version: "22.2.3",
561
+ type: CmatCascadeListComponent,
562
+ isStandalone: true,
563
+ selector: "cmat-cascade-list",
564
+ inputs: {
565
+ options: {
566
+ classPropertyName: "options",
567
+ publicName: "options",
568
+ isSignal: true,
569
+ isRequired: true,
570
+ transformFunction: null
571
+ },
572
+ clearable: {
573
+ classPropertyName: "clearable",
574
+ publicName: "clearable",
575
+ isSignal: true,
576
+ isRequired: false,
577
+ transformFunction: null
578
+ },
579
+ fullLevels: {
580
+ classPropertyName: "fullLevels",
581
+ publicName: "fullLevels",
582
+ isSignal: true,
583
+ isRequired: false,
584
+ transformFunction: null
585
+ },
586
+ changeOnSelect: {
587
+ classPropertyName: "changeOnSelect",
588
+ publicName: "changeOnSelect",
589
+ isSignal: true,
590
+ isRequired: false,
591
+ transformFunction: null
592
+ },
593
+ allowLabelValue: {
594
+ classPropertyName: "allowLabelValue",
595
+ publicName: "allowLabelValue",
596
+ isSignal: true,
597
+ isRequired: false,
598
+ transformFunction: null
599
+ },
600
+ touchUi: {
601
+ classPropertyName: "touchUi",
602
+ publicName: "touchUi",
603
+ isSignal: true,
604
+ isRequired: false,
605
+ transformFunction: null
606
+ },
607
+ placeholder: {
608
+ classPropertyName: "placeholder",
609
+ publicName: "placeholder",
610
+ isSignal: false,
611
+ isRequired: false,
612
+ transformFunction: null
613
+ },
614
+ disabled: {
615
+ classPropertyName: "disabled",
616
+ publicName: "disabled",
617
+ isSignal: false,
618
+ isRequired: false,
619
+ transformFunction: null
620
+ },
621
+ required: {
622
+ classPropertyName: "required",
623
+ publicName: "required",
624
+ isSignal: false,
625
+ isRequired: false,
626
+ transformFunction: null
627
+ },
628
+ value: {
629
+ classPropertyName: "value",
630
+ publicName: "value",
631
+ isSignal: false,
632
+ isRequired: false,
633
+ transformFunction: null
634
+ }
635
+ },
636
+ host: { properties: { "attr.id": "id" } },
637
+ providers: [{
638
+ provide: MatFormFieldControl,
639
+ useExisting: CmatCascadeListComponent
640
+ }],
641
+ viewQueries: [
642
+ {
643
+ propertyName: "overlayOrigin",
644
+ first: true,
645
+ predicate: CdkOverlayOrigin,
646
+ descendants: true,
647
+ isSignal: true
648
+ },
649
+ {
650
+ propertyName: "menuTemplate",
651
+ first: true,
652
+ predicate: CdkPortal,
653
+ descendants: true,
654
+ isSignal: true
655
+ },
656
+ {
657
+ propertyName: "_inputElement",
658
+ first: true,
659
+ predicate: ["inputElement"],
660
+ descendants: true,
661
+ isSignal: true
662
+ }
663
+ ],
664
+ exportAs: ["cmatCascadeList"],
665
+ ngImport: i0,
666
+ template: "<span role=\"presentation\" class=\"cmat-cascade-list\" cdk-overlay-origin\r\n [ngClass]=\"{'opened': menuVisible(), 'disabled': disabled, 'error-state': errorState}\">\r\n <input #inputElement matInput readonly [required]='required' [placeholder]=\"currentLabels().length>0 ? '' : placeholder\" (click)=\"clickHandle($event)\"\r\n (focusin)=\"onFocusIn()\" (focusout)=\"onFocusOut($event)\">\r\n\r\n @if (showClearIcon()) {\r\n <button type=\"button\" matSuffix matIconButton aria-label=\"Clear\" (click)=\"clearValue($event)\">\r\n <mat-icon [svgIcon]=\"'heroicons_outline:x-mark'\"></mat-icon>\r\n </button>\r\n }\r\n @else {\r\n <mat-icon matSuffix [svgIcon]=\"'mat_outline:arrow_drop_down'\"></mat-icon>\r\n }\r\n</span>\r\n\r\n<ng-template #menuTemplate=\"cdkPortal\" cdkPortal>\r\n <cmat-cascade-menu></cmat-cascade-menu>\r\n</ng-template>",
667
+ styles: ["cmat-cascade-list{width:100%}.cmat-cascade-list{position:relative;display:flex;width:100%;line-height:2;align-items:center}.cmat-cascade-list mat-form-field{width:100%}.cmat-cascade-list input{cursor:pointer}.cmat-cascade-list.disabled .cascade-label{z-index:2}\n"],
668
+ dependencies: [
669
+ {
670
+ kind: "ngmodule",
671
+ type: MatIconModule
672
+ },
673
+ {
674
+ kind: "component",
675
+ type: i4$1.MatIcon,
676
+ selector: "mat-icon",
677
+ inputs: [
678
+ "color",
679
+ "inline",
680
+ "svgIcon",
681
+ "fontSet",
682
+ "fontIcon"
683
+ ],
684
+ exportAs: ["matIcon"]
685
+ },
686
+ {
687
+ kind: "directive",
688
+ type: NgClass,
689
+ selector: "[ngClass]",
690
+ inputs: ["class", "ngClass"]
691
+ },
692
+ {
693
+ kind: "component",
694
+ type: CmatCascadeMenuComponent,
695
+ selector: "cmat-cascade-menu",
696
+ exportAs: ["cmatCascadeMenu"]
697
+ },
698
+ {
699
+ kind: "ngmodule",
700
+ type: MatInputModule
701
+ },
702
+ {
703
+ kind: "directive",
704
+ type: i2.MatInput,
705
+ selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]",
706
+ inputs: [
707
+ "disabled",
708
+ "id",
709
+ "placeholder",
710
+ "name",
711
+ "required",
712
+ "type",
713
+ "errorStateMatcher",
714
+ "aria-describedby",
715
+ "value",
716
+ "readonly",
717
+ "disabledInteractive"
718
+ ],
719
+ exportAs: ["matInput"]
720
+ },
721
+ {
722
+ kind: "directive",
723
+ type: i2.MatSuffix,
724
+ selector: "[matSuffix], [matIconSuffix], [matTextSuffix]",
725
+ inputs: ["matTextSuffix"]
726
+ },
727
+ {
728
+ kind: "ngmodule",
729
+ type: OverlayModule
730
+ },
731
+ {
732
+ kind: "directive",
733
+ type: i3.CdkOverlayOrigin,
734
+ selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]",
735
+ exportAs: ["cdkOverlayOrigin"]
736
+ },
737
+ {
738
+ kind: "ngmodule",
739
+ type: PortalModule
740
+ },
741
+ {
742
+ kind: "directive",
743
+ type: i4.CdkPortal,
744
+ selector: "[cdkPortal]",
745
+ exportAs: ["cdkPortal"]
746
+ },
747
+ {
748
+ kind: "ngmodule",
749
+ type: MatButtonModule
750
+ },
751
+ {
752
+ kind: "component",
753
+ type: i1.MatIconButton,
754
+ selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]",
755
+ exportAs: ["matButton", "matAnchor"]
756
+ }
757
+ ],
758
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
759
+ encapsulation: i0.ViewEncapsulation.None
760
+ });
761
+ }
762
+ };
763
+ i0.ɵɵngDeclareClassMetadata({
764
+ minVersion: "12.0.0",
765
+ version: "22.2.3",
766
+ ngImport: i0,
767
+ type: CmatCascadeListComponent,
768
+ decorators: [{
769
+ type: Component,
770
+ args: [{
771
+ selector: "cmat-cascade-list",
772
+ providers: [{
773
+ provide: MatFormFieldControl,
774
+ useExisting: CmatCascadeListComponent
775
+ }],
776
+ encapsulation: ViewEncapsulation.None,
777
+ changeDetection: ChangeDetectionStrategy.OnPush,
778
+ exportAs: "cmatCascadeList",
779
+ imports: [
780
+ MatIconModule,
781
+ NgClass,
782
+ CmatCascadeMenuComponent,
783
+ MatInputModule,
784
+ OverlayModule,
785
+ PortalModule,
786
+ MatButtonModule
787
+ ],
788
+ host: { "[attr.id]": "id" },
789
+ template: "<span role=\"presentation\" class=\"cmat-cascade-list\" cdk-overlay-origin\r\n [ngClass]=\"{'opened': menuVisible(), 'disabled': disabled, 'error-state': errorState}\">\r\n <input #inputElement matInput readonly [required]='required' [placeholder]=\"currentLabels().length>0 ? '' : placeholder\" (click)=\"clickHandle($event)\"\r\n (focusin)=\"onFocusIn()\" (focusout)=\"onFocusOut($event)\">\r\n\r\n @if (showClearIcon()) {\r\n <button type=\"button\" matSuffix matIconButton aria-label=\"Clear\" (click)=\"clearValue($event)\">\r\n <mat-icon [svgIcon]=\"'heroicons_outline:x-mark'\"></mat-icon>\r\n </button>\r\n }\r\n @else {\r\n <mat-icon matSuffix [svgIcon]=\"'mat_outline:arrow_drop_down'\"></mat-icon>\r\n }\r\n</span>\r\n\r\n<ng-template #menuTemplate=\"cdkPortal\" cdkPortal>\r\n <cmat-cascade-menu></cmat-cascade-menu>\r\n</ng-template>",
790
+ styles: ["cmat-cascade-list{width:100%}.cmat-cascade-list{position:relative;display:flex;width:100%;line-height:2;align-items:center}.cmat-cascade-list mat-form-field{width:100%}.cmat-cascade-list input{cursor:pointer}.cmat-cascade-list.disabled .cascade-label{z-index:2}\n"]
791
+ }]
792
+ }],
793
+ ctorParameters: () => [],
794
+ propDecorators: {
795
+ options: [{
796
+ type: i0.Input,
797
+ args: [{
798
+ isSignal: true,
799
+ alias: "options",
800
+ required: true
801
+ }]
802
+ }],
803
+ clearable: [{
804
+ type: i0.Input,
805
+ args: [{
806
+ isSignal: true,
807
+ alias: "clearable",
808
+ required: false
809
+ }]
810
+ }],
811
+ fullLevels: [{
812
+ type: i0.Input,
813
+ args: [{
814
+ isSignal: true,
815
+ alias: "fullLevels",
816
+ required: false
817
+ }]
818
+ }],
819
+ changeOnSelect: [{
820
+ type: i0.Input,
821
+ args: [{
822
+ isSignal: true,
823
+ alias: "changeOnSelect",
824
+ required: false
825
+ }]
826
+ }],
827
+ allowLabelValue: [{
828
+ type: i0.Input,
829
+ args: [{
830
+ isSignal: true,
831
+ alias: "allowLabelValue",
832
+ required: false
833
+ }]
834
+ }],
835
+ touchUi: [{
836
+ type: i0.Input,
837
+ args: [{
838
+ isSignal: true,
839
+ alias: "touchUi",
840
+ required: false
841
+ }]
842
+ }],
843
+ overlayOrigin: [{
844
+ type: i0.ViewChild,
845
+ args: [i0.forwardRef(() => CdkOverlayOrigin), { isSignal: true }]
846
+ }],
847
+ menuTemplate: [{
848
+ type: i0.ViewChild,
849
+ args: [i0.forwardRef(() => CdkPortal), { isSignal: true }]
850
+ }],
851
+ _inputElement: [{
852
+ type: i0.ViewChild,
853
+ args: ["inputElement", { isSignal: true }]
854
+ }],
855
+ placeholder: [{ type: Input }],
856
+ disabled: [{ type: Input }],
857
+ required: [{ type: Input }],
858
+ value: [{ type: Input }]
859
+ }
860
+ });
442
861
  export { CmatCascadeBottomSheetComponent, CmatCascadeListComponent };
443
- //# sourceMappingURL=cmat-components-cascade.mjs.map
862
+
863
+ //# sourceMappingURL=cmat-components-cascade.mjs.map