cmat 0.0.118 → 0.0.119

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 (245) hide show
  1. package/fesm2022/cmat-components-adapter.mjs +9 -9
  2. package/fesm2022/cmat-components-breadcrumb.mjs +10 -9
  3. package/fesm2022/cmat-components-breadcrumb.mjs.map +1 -1
  4. package/fesm2022/cmat-components-card.mjs +6 -6
  5. package/fesm2022/cmat-components-card.mjs.map +1 -1
  6. package/fesm2022/cmat-components-carousel.mjs +16 -16
  7. package/fesm2022/cmat-components-carousel.mjs.map +1 -1
  8. package/fesm2022/cmat-components-cascade.mjs +1 -863
  9. package/fesm2022/cmat-components-chip-input.mjs +11 -11
  10. package/fesm2022/cmat-components-code-editor.mjs +3 -3
  11. package/fesm2022/cmat-components-color-picker.mjs +45 -45
  12. package/fesm2022/cmat-components-color-picker.mjs.map +1 -1
  13. package/fesm2022/cmat-components-custom-formly.mjs +214 -214
  14. package/fesm2022/cmat-components-custom-formly.mjs.map +1 -1
  15. package/fesm2022/cmat-components-data-picker.mjs +38 -38
  16. package/fesm2022/cmat-components-data-picker.mjs.map +1 -1
  17. package/fesm2022/cmat-components-date-range.mjs +15 -16
  18. package/fesm2022/cmat-components-date-range.mjs.map +1 -1
  19. package/fesm2022/cmat-components-date-time-display.mjs +4 -4
  20. package/fesm2022/cmat-components-drawer.mjs +9 -9
  21. package/fesm2022/cmat-components-drawer.mjs.map +1 -1
  22. package/fesm2022/cmat-components-empty-state.mjs +4 -4
  23. package/fesm2022/cmat-components-file-preview.mjs +4 -4
  24. package/fesm2022/cmat-components-filter-toolbar.mjs +12 -13
  25. package/fesm2022/cmat-components-filter-toolbar.mjs.map +1 -1
  26. package/fesm2022/cmat-components-form-actions.mjs +6 -6
  27. package/fesm2022/cmat-components-fullscreen.mjs +4 -4
  28. package/fesm2022/cmat-components-highlight.mjs +7 -7
  29. package/fesm2022/cmat-components-image-viewer.mjs +7 -7
  30. package/fesm2022/cmat-components-image-viewer.mjs.map +1 -1
  31. package/fesm2022/cmat-components-inline-loading.mjs +3 -3
  32. package/fesm2022/cmat-components-json-editor.mjs +7 -7
  33. package/fesm2022/cmat-components-json-editor.mjs.map +1 -1
  34. package/fesm2022/cmat-components-knob-input.mjs +6 -6
  35. package/fesm2022/cmat-components-loading-overlay.mjs +5 -5
  36. package/fesm2022/cmat-components-loading-overlay.mjs.map +1 -1
  37. package/fesm2022/cmat-components-masonry.mjs +4 -4
  38. package/fesm2022/cmat-components-material-color-picker.mjs +1 -337
  39. package/fesm2022/cmat-components-material-datetimepicker.mjs +1 -4312
  40. package/fesm2022/cmat-components-navigation.mjs +1 -3081
  41. package/fesm2022/cmat-components-opt-input.mjs +1 -542
  42. package/fesm2022/cmat-components-org-chart.mjs +1 -529
  43. package/fesm2022/cmat-components-page-header.mjs +4 -4
  44. package/fesm2022/cmat-components-pagination.mjs +21 -21
  45. package/fesm2022/cmat-components-pagination.mjs.map +1 -1
  46. package/fesm2022/cmat-components-password-strength.mjs +1 -880
  47. package/fesm2022/cmat-components-popover.mjs +1 -1022
  48. package/fesm2022/cmat-components-progress-bar.mjs +4 -4
  49. package/fesm2022/cmat-components-qrcode.mjs +3 -3
  50. package/fesm2022/cmat-components-rating.mjs +8 -8
  51. package/fesm2022/cmat-components-rich-text-editor.mjs +3 -3
  52. package/fesm2022/cmat-components-select-search.mjs +1 -930
  53. package/fesm2022/cmat-components-select-table.mjs +39 -39
  54. package/fesm2022/cmat-components-select-table.mjs.map +1 -1
  55. package/fesm2022/cmat-components-select-tree.mjs +28 -27
  56. package/fesm2022/cmat-components-select-tree.mjs.map +1 -1
  57. package/fesm2022/cmat-components-skeleton.mjs +5 -5
  58. package/fesm2022/cmat-components-skeleton.mjs.map +1 -1
  59. package/fesm2022/cmat-components-speed-dial.mjs +12 -12
  60. package/fesm2022/cmat-components-speed-dial.mjs.map +1 -1
  61. package/fesm2022/cmat-components-status-tag.mjs +6 -6
  62. package/fesm2022/cmat-components-status-tag.mjs.map +1 -1
  63. package/fesm2022/cmat-components-table-toolbar.mjs +4 -4
  64. package/fesm2022/cmat-components-timeline.mjs +19 -19
  65. package/fesm2022/cmat-components-timeline.mjs.map +1 -1
  66. package/fesm2022/cmat-components-toast.mjs +14 -14
  67. package/fesm2022/cmat-components-toast.mjs.map +1 -1
  68. package/fesm2022/cmat-components-transfer-picker.mjs +48 -49
  69. package/fesm2022/cmat-components-transfer-picker.mjs.map +1 -1
  70. package/fesm2022/cmat-components-treetable.mjs +8 -8
  71. package/fesm2022/cmat-components-upload.mjs +17 -17
  72. package/fesm2022/cmat-components-x6-angular-shape.mjs +1 -1
  73. package/fesm2022/cmat-directives-animate-on-scroll.mjs +1 -221
  74. package/fesm2022/cmat-directives-arrow-cursor.mjs +3 -3
  75. package/fesm2022/cmat-directives-autofocus.mjs +3 -3
  76. package/fesm2022/cmat-directives-data-exporter.mjs +1 -544
  77. package/fesm2022/cmat-directives-debounce.mjs +1 -163
  78. package/fesm2022/cmat-directives-digit-only.mjs +6 -6
  79. package/fesm2022/cmat-directives-equal-validator.mjs +3 -3
  80. package/fesm2022/cmat-directives-seamless-auto-scroll.mjs +3 -3
  81. package/fesm2022/cmat-lib-mock-api.mjs +8 -8
  82. package/fesm2022/cmat-pipes-bytes.mjs +3 -3
  83. package/fesm2022/cmat-pipes-date-format.mjs +3 -3
  84. package/fesm2022/cmat-pipes-find-by-key.mjs +3 -3
  85. package/fesm2022/cmat-pipes-group-by.mjs +3 -3
  86. package/fesm2022/cmat-pipes-keys.mjs +3 -3
  87. package/fesm2022/cmat-pipes-secure.mjs +6 -6
  88. package/fesm2022/cmat-pipes-uppercase.mjs +3 -3
  89. package/fesm2022/cmat-reports.mjs +86 -80
  90. package/fesm2022/cmat-reports.mjs.map +1 -1
  91. package/fesm2022/cmat-services-alert.mjs +4 -4
  92. package/fesm2022/cmat-services-config.mjs +6 -6
  93. package/fesm2022/cmat-services-confirmation.mjs +1 -185
  94. package/fesm2022/cmat-services-data.mjs +5 -5
  95. package/fesm2022/cmat-services-export-as.mjs +4 -4
  96. package/fesm2022/cmat-services-loading.mjs +6 -6
  97. package/fesm2022/cmat-services-local-storage.mjs +3 -3
  98. package/fesm2022/cmat-services-media-watcher.mjs +4 -4
  99. package/fesm2022/cmat-services-platform.mjs +4 -4
  100. package/fesm2022/cmat-services-print.mjs +3 -3
  101. package/fesm2022/cmat-services-splash-screen.mjs +4 -4
  102. package/fesm2022/cmat-services-title.mjs +6 -6
  103. package/fesm2022/cmat-services-translation.mjs +4 -4
  104. package/fesm2022/cmat-services-utils.mjs +7 -7
  105. package/fesm2022/cmat.mjs +77 -39582
  106. package/fesm2022/public-api-BE83BHd7.mjs +930 -0
  107. package/fesm2022/public-api-BE83BHd7.mjs.map +1 -0
  108. package/fesm2022/public-api-BcmOSkgf.mjs +542 -0
  109. package/fesm2022/public-api-BcmOSkgf.mjs.map +1 -0
  110. package/fesm2022/public-api-BmMqKDzm.mjs +4312 -0
  111. package/fesm2022/public-api-BmMqKDzm.mjs.map +1 -0
  112. package/fesm2022/public-api-BnRFazGR.mjs +221 -0
  113. package/fesm2022/public-api-BnRFazGR.mjs.map +1 -0
  114. package/fesm2022/public-api-C9N9rKkB.mjs +185 -0
  115. package/fesm2022/public-api-C9N9rKkB.mjs.map +1 -0
  116. package/fesm2022/public-api-CXmCX9ZQ.mjs +863 -0
  117. package/fesm2022/public-api-CXmCX9ZQ.mjs.map +1 -0
  118. package/fesm2022/public-api-CfILyvuV.mjs +880 -0
  119. package/fesm2022/public-api-CfILyvuV.mjs.map +1 -0
  120. package/fesm2022/public-api-CgtBw-7O.mjs +163 -0
  121. package/fesm2022/public-api-CgtBw-7O.mjs.map +1 -0
  122. package/fesm2022/public-api-DEtzrfqy.mjs +544 -0
  123. package/fesm2022/public-api-DEtzrfqy.mjs.map +1 -0
  124. package/fesm2022/public-api-EK51WC1y.mjs +1022 -0
  125. package/fesm2022/public-api-EK51WC1y.mjs.map +1 -0
  126. package/fesm2022/public-api-IpTsAgZ4.mjs +3081 -0
  127. package/fesm2022/public-api-IpTsAgZ4.mjs.map +1 -0
  128. package/fesm2022/public-api-iRaKIVmd.mjs +338 -0
  129. package/fesm2022/public-api-iRaKIVmd.mjs.map +1 -0
  130. package/fesm2022/public-api-nzzDLiDj.mjs +529 -0
  131. package/fesm2022/public-api-nzzDLiDj.mjs.map +1 -0
  132. package/fesm2022/{cmat-quill-docx-exporter-D9Eo73Wq.mjs → quill-docx-exporter-D9Eo73Wq.mjs} +1 -1
  133. package/fesm2022/quill-docx-exporter-D9Eo73Wq.mjs.map +1 -0
  134. package/package.json +23 -22
  135. package/types/cmat-components-adapter.d.ts +0 -3
  136. package/types/cmat-components-breadcrumb.d.ts +1 -4
  137. package/types/cmat-components-card.d.ts +0 -3
  138. package/types/cmat-components-carousel.d.ts +0 -3
  139. package/types/cmat-components-cascade.d.ts +0 -3
  140. package/types/cmat-components-chip-input.d.ts +3 -6
  141. package/types/cmat-components-code-editor.d.ts +0 -3
  142. package/types/cmat-components-color-picker.d.ts +0 -3
  143. package/types/cmat-components-custom-formly.d.ts +2 -861
  144. package/types/cmat-components-data-picker.d.ts +6 -9
  145. package/types/cmat-components-date-range.d.ts +1 -4
  146. package/types/cmat-components-date-time-display.d.ts +0 -3
  147. package/types/cmat-components-drawer.d.ts +1 -4
  148. package/types/cmat-components-empty-state.d.ts +0 -3
  149. package/types/cmat-components-file-preview.d.ts +0 -3
  150. package/types/cmat-components-filter-toolbar.d.ts +0 -3
  151. package/types/cmat-components-form-actions.d.ts +1 -4
  152. package/types/cmat-components-fullscreen.d.ts +0 -3
  153. package/types/cmat-components-highlight.d.ts +0 -3
  154. package/types/cmat-components-image-viewer.d.ts +0 -3
  155. package/types/cmat-components-inline-loading.d.ts +0 -3
  156. package/types/cmat-components-json-editor.d.ts +0 -3
  157. package/types/cmat-components-knob-input.d.ts +1 -4
  158. package/types/cmat-components-loading-overlay.d.ts +0 -3
  159. package/types/cmat-components-masonry.d.ts +0 -3
  160. package/types/cmat-components-material-color-picker.d.ts +1 -4
  161. package/types/cmat-components-material-datetimepicker.d.ts +2 -840
  162. package/types/cmat-components-navigation.d.ts +1 -4
  163. package/types/cmat-components-opt-input.d.ts +2 -117
  164. package/types/cmat-components-org-chart.d.ts +1 -4
  165. package/types/cmat-components-page-header.d.ts +1 -4
  166. package/types/cmat-components-pagination.d.ts +0 -3
  167. package/types/cmat-components-password-strength.d.ts +2 -205
  168. package/types/cmat-components-popover.d.ts +2 -274
  169. package/types/cmat-components-progress-bar.d.ts +0 -3
  170. package/types/cmat-components-qrcode.d.ts +2 -117
  171. package/types/cmat-components-rating.d.ts +1 -4
  172. package/types/cmat-components-rich-text-editor.d.ts +1 -4
  173. package/types/cmat-components-select-search.d.ts +2 -204
  174. package/types/cmat-components-select-table.d.ts +3 -6
  175. package/types/cmat-components-select-tree.d.ts +4 -7
  176. package/types/cmat-components-skeleton.d.ts +0 -3
  177. package/types/cmat-components-speed-dial.d.ts +0 -3
  178. package/types/cmat-components-status-tag.d.ts +2 -5
  179. package/types/cmat-components-table-toolbar.d.ts +0 -3
  180. package/types/cmat-components-timeline.d.ts +0 -3
  181. package/types/cmat-components-toast.d.ts +0 -3
  182. package/types/cmat-components-transfer-picker.d.ts +2 -5
  183. package/types/cmat-components-treetable.d.ts +0 -3
  184. package/types/cmat-components-upload.d.ts +1 -4
  185. package/types/cmat-components-x6-angular-shape.d.ts +1 -4
  186. package/types/cmat-directives-animate-on-scroll.d.ts +0 -3
  187. package/types/cmat-directives-arrow-cursor.d.ts +0 -3
  188. package/types/cmat-directives-autofocus.d.ts +0 -3
  189. package/types/cmat-directives-data-exporter.d.ts +1 -4
  190. package/types/cmat-directives-debounce.d.ts +2 -38
  191. package/types/cmat-directives-digit-only.d.ts +0 -3
  192. package/types/cmat-directives-equal-validator.d.ts +1 -4
  193. package/types/cmat-directives-seamless-auto-scroll.d.ts +1 -4
  194. package/types/cmat-lib-mock-api.d.ts +1 -4
  195. package/types/cmat-pipes-bytes.d.ts +0 -3
  196. package/types/cmat-pipes-date-format.d.ts +0 -3
  197. package/types/cmat-pipes-find-by-key.d.ts +0 -3
  198. package/types/cmat-pipes-group-by.d.ts +0 -3
  199. package/types/cmat-pipes-keys.d.ts +0 -3
  200. package/types/cmat-pipes-secure.d.ts +1 -4
  201. package/types/cmat-pipes-uppercase.d.ts +0 -3
  202. package/types/cmat-reports.d.ts +6 -9
  203. package/types/cmat-services-alert.d.ts +1 -4
  204. package/types/cmat-services-config.d.ts +0 -3
  205. package/types/cmat-services-confirmation.d.ts +2 -40
  206. package/types/cmat-services-data.d.ts +1 -4
  207. package/types/cmat-services-export-as.d.ts +1 -4
  208. package/types/cmat-services-loading.d.ts +1 -4
  209. package/types/cmat-services-local-storage.d.ts +0 -3
  210. package/types/cmat-services-media-watcher.d.ts +0 -3
  211. package/types/cmat-services-platform.d.ts +0 -3
  212. package/types/cmat-services-print.d.ts +0 -3
  213. package/types/cmat-services-splash-screen.d.ts +0 -3
  214. package/types/cmat-services-title.d.ts +0 -3
  215. package/types/cmat-services-translation.d.ts +1 -4
  216. package/types/cmat-services-utils.d.ts +2 -5
  217. package/types/cmat-validators.d.ts +0 -3
  218. package/types/cmat-version.d.ts +0 -3
  219. package/types/cmat.d.ts +78 -7686
  220. package/types/public-api-BFGGDRK3.d.ts +201 -0
  221. package/types/public-api-BXS379ev.d.ts +202 -0
  222. package/types/public-api-C4CvABGO.d.ts +114 -0
  223. package/types/public-api-CSYz4G5Z.d.ts +271 -0
  224. package/types/public-api-NSrmlKKH.d.ts +114 -0
  225. package/types/public-api-PfNpHSSm.d.ts +837 -0
  226. package/types/public-api-f3WtygQS.d.ts +35 -0
  227. package/types/public-api-nBuSXSMJ.d.ts +858 -0
  228. package/types/public-api-yYeZrUAV.d.ts +37 -0
  229. package/fesm2022/cmat-components-cascade.mjs.map +0 -1
  230. package/fesm2022/cmat-components-custom-formly-quill-docx-exporter-BwwGX2Ie.mjs +0 -294
  231. package/fesm2022/cmat-components-custom-formly-quill-docx-exporter-BwwGX2Ie.mjs.map +0 -1
  232. package/fesm2022/cmat-components-material-color-picker.mjs.map +0 -1
  233. package/fesm2022/cmat-components-material-datetimepicker.mjs.map +0 -1
  234. package/fesm2022/cmat-components-navigation.mjs.map +0 -1
  235. package/fesm2022/cmat-components-opt-input.mjs.map +0 -1
  236. package/fesm2022/cmat-components-org-chart.mjs.map +0 -1
  237. package/fesm2022/cmat-components-password-strength.mjs.map +0 -1
  238. package/fesm2022/cmat-components-popover.mjs.map +0 -1
  239. package/fesm2022/cmat-components-select-search.mjs.map +0 -1
  240. package/fesm2022/cmat-directives-animate-on-scroll.mjs.map +0 -1
  241. package/fesm2022/cmat-directives-data-exporter.mjs.map +0 -1
  242. package/fesm2022/cmat-directives-debounce.mjs.map +0 -1
  243. package/fesm2022/cmat-quill-docx-exporter-D9Eo73Wq.mjs.map +0 -1
  244. package/fesm2022/cmat-services-confirmation.mjs.map +0 -1
  245. package/fesm2022/cmat.mjs.map +0 -1
@@ -1,863 +1 @@
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.6",
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.6",
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.6",
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.6",
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.6",
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.6",
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
- });
282
- let NEXT_ID = 0;
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.6",
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.6",
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.6",
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
- });
861
- export { CmatCascadeBottomSheetComponent, CmatCascadeListComponent };
862
-
863
- //# sourceMappingURL=cmat-components-cascade.mjs.map
1
+ export { n as CmatCascadeBottomSheetComponent, t as CmatCascadeListComponent } from "./public-api-CXmCX9ZQ.mjs";