cmat 0.0.117 → 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 (203) 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 +43 -40
  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 -39579
  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-breadcrumb.d.ts +1 -1
  136. package/types/cmat-components-chip-input.d.ts +3 -3
  137. package/types/cmat-components-custom-formly.d.ts +2 -857
  138. package/types/cmat-components-data-picker.d.ts +12 -6
  139. package/types/cmat-components-date-range.d.ts +1 -1
  140. package/types/cmat-components-drawer.d.ts +1 -1
  141. package/types/cmat-components-form-actions.d.ts +1 -1
  142. package/types/cmat-components-knob-input.d.ts +1 -1
  143. package/types/cmat-components-masonry.d.ts +2 -1
  144. package/types/cmat-components-material-color-picker.d.ts +1 -1
  145. package/types/cmat-components-material-datetimepicker.d.ts +2 -836
  146. package/types/cmat-components-navigation.d.ts +1 -1
  147. package/types/cmat-components-opt-input.d.ts +2 -113
  148. package/types/cmat-components-org-chart.d.ts +1 -1
  149. package/types/cmat-components-page-header.d.ts +1 -1
  150. package/types/cmat-components-password-strength.d.ts +2 -201
  151. package/types/cmat-components-popover.d.ts +2 -270
  152. package/types/cmat-components-qrcode.d.ts +2 -113
  153. package/types/cmat-components-rating.d.ts +1 -1
  154. package/types/cmat-components-rich-text-editor.d.ts +1 -1
  155. package/types/cmat-components-select-search.d.ts +2 -200
  156. package/types/cmat-components-select-table.d.ts +3 -3
  157. package/types/cmat-components-select-tree.d.ts +6 -5
  158. package/types/cmat-components-status-tag.d.ts +2 -2
  159. package/types/cmat-components-toast.d.ts +2 -1
  160. package/types/cmat-components-transfer-picker.d.ts +2 -2
  161. package/types/cmat-components-upload.d.ts +1 -1
  162. package/types/cmat-components-x6-angular-shape.d.ts +1 -1
  163. package/types/cmat-directives-data-exporter.d.ts +1 -1
  164. package/types/cmat-directives-debounce.d.ts +2 -34
  165. package/types/cmat-directives-equal-validator.d.ts +1 -1
  166. package/types/cmat-directives-seamless-auto-scroll.d.ts +1 -1
  167. package/types/cmat-lib-mock-api.d.ts +3 -2
  168. package/types/cmat-pipes-secure.d.ts +1 -1
  169. package/types/cmat-reports.d.ts +6 -6
  170. package/types/cmat-services-alert.d.ts +1 -1
  171. package/types/cmat-services-confirmation.d.ts +2 -36
  172. package/types/cmat-services-data.d.ts +1 -1
  173. package/types/cmat-services-export-as.d.ts +1 -1
  174. package/types/cmat-services-loading.d.ts +1 -1
  175. package/types/cmat-services-translation.d.ts +1 -1
  176. package/types/cmat-services-utils.d.ts +2 -2
  177. package/types/cmat.d.ts +78 -7676
  178. package/types/public-api-BFGGDRK3.d.ts +201 -0
  179. package/types/public-api-BXS379ev.d.ts +202 -0
  180. package/types/public-api-C4CvABGO.d.ts +114 -0
  181. package/types/public-api-CSYz4G5Z.d.ts +271 -0
  182. package/types/public-api-NSrmlKKH.d.ts +114 -0
  183. package/types/public-api-PfNpHSSm.d.ts +837 -0
  184. package/types/public-api-f3WtygQS.d.ts +35 -0
  185. package/types/public-api-nBuSXSMJ.d.ts +858 -0
  186. package/types/public-api-yYeZrUAV.d.ts +37 -0
  187. package/fesm2022/cmat-components-cascade.mjs.map +0 -1
  188. package/fesm2022/cmat-components-custom-formly-quill-docx-exporter-BwwGX2Ie.mjs +0 -294
  189. package/fesm2022/cmat-components-custom-formly-quill-docx-exporter-BwwGX2Ie.mjs.map +0 -1
  190. package/fesm2022/cmat-components-material-color-picker.mjs.map +0 -1
  191. package/fesm2022/cmat-components-material-datetimepicker.mjs.map +0 -1
  192. package/fesm2022/cmat-components-navigation.mjs.map +0 -1
  193. package/fesm2022/cmat-components-opt-input.mjs.map +0 -1
  194. package/fesm2022/cmat-components-org-chart.mjs.map +0 -1
  195. package/fesm2022/cmat-components-password-strength.mjs.map +0 -1
  196. package/fesm2022/cmat-components-popover.mjs.map +0 -1
  197. package/fesm2022/cmat-components-select-search.mjs.map +0 -1
  198. package/fesm2022/cmat-directives-animate-on-scroll.mjs.map +0 -1
  199. package/fesm2022/cmat-directives-data-exporter.mjs.map +0 -1
  200. package/fesm2022/cmat-directives-debounce.mjs.map +0 -1
  201. package/fesm2022/cmat-quill-docx-exporter-D9Eo73Wq.mjs.map +0 -1
  202. package/fesm2022/cmat-services-confirmation.mjs.map +0 -1
  203. package/fesm2022/cmat.mjs.map +0 -1
@@ -1,930 +1 @@
1
- import { ViewportRuler } from "@angular/cdk/scrolling";
2
- import { NgClass } from "@angular/common";
3
- import * as i0 from "@angular/core";
4
- import { ChangeDetectionStrategy, Component, DestroyRef, Directive, HostBinding, InjectionToken, ViewEncapsulation, computed, contentChild, effect, forwardRef, inject, input, output, signal, viewChild } from "@angular/core";
5
- import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
6
- import * as i5 from "@angular/forms";
7
- import { FormControl, FormsModule, NG_VALUE_ACCESSOR, ReactiveFormsModule } from "@angular/forms";
8
- import * as i7 from "@angular/material/button";
9
- import { MatButtonModule } from "@angular/material/button";
10
- import * as i2 from "@angular/material/checkbox";
11
- import { MatCheckboxModule } from "@angular/material/checkbox";
12
- import { MatOption, _countGroupLabelsBeforeOption } from "@angular/material/core";
13
- import { MatFormField, MatFormFieldModule } from "@angular/material/form-field";
14
- import * as i4 from "@angular/material/icon";
15
- import { MatIconModule } from "@angular/material/icon";
16
- import * as i1 from "@angular/material/input";
17
- import { MatInputModule } from "@angular/material/input";
18
- import * as i6 from "@angular/material/progress-spinner";
19
- import { MatProgressSpinnerModule } from "@angular/material/progress-spinner";
20
- import { MatSelect } from "@angular/material/select";
21
- import * as i3 from "@angular/material/tooltip";
22
- import { MatTooltipModule } from "@angular/material/tooltip";
23
- import { debounceTime, delay, filter, startWith, take, tap } from "rxjs/operators";
24
- const configurableDefaultOptions = [
25
- "ariaLabel",
26
- "clearSearchInput",
27
- "disableInitialFocus",
28
- "disableScrollToActiveOnOptionsChanged",
29
- "enableClearOnEscapePressed",
30
- "hideClearSearchButton",
31
- "noEntriesFoundLabel",
32
- "placeholderLabel",
33
- "preventHomeEndKeyPropagation",
34
- "searching"
35
- ];
36
- const MAT_SELECTSEARCH_DEFAULT_OPTIONS = new InjectionToken("mat-selectsearch-default-options");
37
- var CmatSelectNoEntriesFoundDirective = class CmatSelectNoEntriesFoundDirective {
38
- static {
39
- this.ɵfac = i0.ɵɵngDeclareFactory({
40
- minVersion: "12.0.0",
41
- version: "22.2.4",
42
- ngImport: i0,
43
- type: CmatSelectNoEntriesFoundDirective,
44
- deps: [],
45
- target: i0.ɵɵFactoryTarget.Directive
46
- });
47
- }
48
- static {
49
- this.ɵdir = i0.ɵɵngDeclareDirective({
50
- minVersion: "14.0.0",
51
- version: "22.2.4",
52
- type: CmatSelectNoEntriesFoundDirective,
53
- isStandalone: true,
54
- selector: "[cmatSelectNoEntriesFound]",
55
- ngImport: i0
56
- });
57
- }
58
- };
59
- i0.ɵɵngDeclareClassMetadata({
60
- minVersion: "12.0.0",
61
- version: "22.2.4",
62
- ngImport: i0,
63
- type: CmatSelectNoEntriesFoundDirective,
64
- decorators: [{
65
- type: Directive,
66
- args: [{ selector: "[cmatSelectNoEntriesFound]" }]
67
- }]
68
- });
69
- var CmatSelectSearchClearDirective = class CmatSelectSearchClearDirective {
70
- static {
71
- this.ɵfac = i0.ɵɵngDeclareFactory({
72
- minVersion: "12.0.0",
73
- version: "22.2.4",
74
- ngImport: i0,
75
- type: CmatSelectSearchClearDirective,
76
- deps: [],
77
- target: i0.ɵɵFactoryTarget.Directive
78
- });
79
- }
80
- static {
81
- this.ɵdir = i0.ɵɵngDeclareDirective({
82
- minVersion: "14.0.0",
83
- version: "22.2.4",
84
- type: CmatSelectSearchClearDirective,
85
- isStandalone: true,
86
- selector: "[cmatSelectSearchClear]",
87
- ngImport: i0
88
- });
89
- }
90
- };
91
- i0.ɵɵngDeclareClassMetadata({
92
- minVersion: "12.0.0",
93
- version: "22.2.4",
94
- ngImport: i0,
95
- type: CmatSelectSearchClearDirective,
96
- decorators: [{
97
- type: Directive,
98
- args: [{ selector: "[cmatSelectSearchClear]" }]
99
- }]
100
- });
101
- const SELECT_PANEL_MAX_HEIGHT = 256;
102
- var CmatSelectSearchComponent = class CmatSelectSearchComponent {
103
- constructor() {
104
- this.toggleAll = output();
105
- this.searchSelectInput = viewChild.required("searchSelectInput", ...ngDevMode ? [{ debugName: "searchSelectInput" }] : /* istanbul ignore next */ []);
106
- this.innerSelectSearch = viewChild.required("innerSelectSearch", ...ngDevMode ? [{ debugName: "innerSelectSearch" }] : /* istanbul ignore next */ []);
107
- this.clearIcon = contentChild(CmatSelectSearchClearDirective, ...ngDevMode ? [{ debugName: "clearIcon" }] : /* istanbul ignore next */ []);
108
- this.noEntriesFound = contentChild(CmatSelectNoEntriesFoundDirective, ...ngDevMode ? [{ debugName: "noEntriesFound" }] : /* istanbul ignore next */ []);
109
- this.formControl = new FormControl("");
110
- this.placeholderLabel = input("搜索", ...ngDevMode ? [{ debugName: "placeholderLabel" }] : /* istanbul ignore next */ []);
111
- this.type = input("text", ...ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []);
112
- this.noEntriesFoundLabel = input("无结果", ...ngDevMode ? [{ debugName: "noEntriesFoundLabel" }] : /* istanbul ignore next */ []);
113
- this.showNoFoundLabel = input(true, ...ngDevMode ? [{ debugName: "showNoFoundLabel" }] : /* istanbul ignore next */ []);
114
- this.clearSearchInput = input(true, ...ngDevMode ? [{ debugName: "clearSearchInput" }] : /* istanbul ignore next */ []);
115
- this.searching = input(false, ...ngDevMode ? [{ debugName: "searching" }] : /* istanbul ignore next */ []);
116
- this.disableInitialFocus = input(false, ...ngDevMode ? [{ debugName: "disableInitialFocus" }] : /* istanbul ignore next */ []);
117
- this.enableClearOnEscapePressed = input(false, ...ngDevMode ? [{ debugName: "enableClearOnEscapePressed" }] : /* istanbul ignore next */ []);
118
- this.preventHomeEndKeyPropagation = input(false, ...ngDevMode ? [{ debugName: "preventHomeEndKeyPropagation" }] : /* istanbul ignore next */ []);
119
- this.disableScrollToActiveOnOptionsChanged = input(false, ...ngDevMode ? [{ debugName: "disableScrollToActiveOnOptionsChanged" }] : /* istanbul ignore next */ []);
120
- this.ariaLabel = input("下拉搜索", ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
121
- this.showToggleAllCheckbox = input(false, ...ngDevMode ? [{ debugName: "showToggleAllCheckbox" }] : /* istanbul ignore next */ []);
122
- this.toggleAllCheckboxChecked = input(false, ...ngDevMode ? [{ debugName: "toggleAllCheckboxChecked" }] : /* istanbul ignore next */ []);
123
- this.toggleAllCheckboxIndeterminate = input(false, ...ngDevMode ? [{ debugName: "toggleAllCheckboxIndeterminate" }] : /* istanbul ignore next */ []);
124
- this.toggleAllCheckboxTooltipMessage = input("", ...ngDevMode ? [{ debugName: "toggleAllCheckboxTooltipMessage" }] : /* istanbul ignore next */ []);
125
- this.toggleAllCheckboxTooltipPosition = input("below", ...ngDevMode ? [{ debugName: "toggleAllCheckboxTooltipPosition" }] : /* istanbul ignore next */ []);
126
- this.hideClearSearchButton = input(false, ...ngDevMode ? [{ debugName: "hideClearSearchButton" }] : /* istanbul ignore next */ []);
127
- this.alwaysRestoreSelectedOptionsMulti = input(false, ...ngDevMode ? [{ debugName: "alwaysRestoreSelectedOptionsMulti" }] : /* istanbul ignore next */ []);
128
- this.debounceTime = input(300, ...ngDevMode ? [{ debugName: "debounceTime" }] : /* istanbul ignore next */ []);
129
- this.optionsCount = input(null, ...ngDevMode ? [{ debugName: "optionsCount" }] : /* istanbul ignore next */ []);
130
- this.matSelect = inject(MatSelect);
131
- this.matFormField = inject(MatFormField, { optional: true }) ?? null;
132
- this._viewportRuler = inject(ViewportRuler);
133
- this._matOption = inject(MatOption, { optional: true }) ?? null;
134
- this._defaultOptions = inject(MAT_SELECTSEARCH_DEFAULT_OPTIONS, { optional: true });
135
- this._destroyRef = inject(DestroyRef);
136
- this._options$ = signal(null, ...ngDevMode ? [{ debugName: "_options$" }] : /* istanbul ignore next */ []);
137
- this._previousSelectedValues = [];
138
- this._valueSignal = signal("", ...ngDevMode ? [{ debugName: "_valueSignal" }] : /* istanbul ignore next */ []);
139
- this.onTouched = () => {};
140
- this._applyDefaultOptions(this._defaultOptions);
141
- this.showNoEntriesFound = computed(() => {
142
- const optionsCount = this.optionsCount() ?? this.matSelect?.options?.length ?? 0;
143
- const offset = this._getOptionsLengthOffset();
144
- const hasSearchValue = !!this._valueSignal();
145
- return !!this.noEntriesFoundLabel() && hasSearchValue && optionsCount <= offset;
146
- }, ...ngDevMode ? [{ debugName: "showNoEntriesFound" }] : /* istanbul ignore next */ []);
147
- let valueChanges$ = this.formControl.valueChanges.pipe(startWith(this.formControl.value));
148
- if (this.debounceTime() > 0) valueChanges$ = valueChanges$.pipe(debounceTime(this.debounceTime()));
149
- valueChanges$.pipe(takeUntilDestroyed(this._destroyRef)).subscribe((value) => {
150
- this._valueSignal.set(value ?? "");
151
- });
152
- effect(() => {
153
- const show = this.showNoEntriesFound();
154
- if (this._matOption) {
155
- const el = this._matOption._getHostElement();
156
- if (show) el.classList.add("cmat-select-search-no-entries-found");
157
- else el.classList.remove("cmat-select-search-no-entries-found");
158
- }
159
- });
160
- }
161
- get isInsideMatOption() {
162
- return !!this._matOption;
163
- }
164
- get value() {
165
- return this._valueSignal();
166
- }
167
- get _options() {
168
- return this._options$();
169
- }
170
- set _options(_options) {
171
- this._options$.set(_options);
172
- }
173
- ngOnInit() {
174
- const panelClass = "cmat-select-search-panel";
175
- if (this.matSelect.panelClass) {
176
- if (Array.isArray(this.matSelect.panelClass)) this.matSelect.panelClass.push(panelClass);
177
- else if (typeof this.matSelect.panelClass === "string") this.matSelect.panelClass = [this.matSelect.panelClass, panelClass];
178
- else if (typeof this.matSelect.panelClass === "object") this.matSelect.panelClass[panelClass] = true;
179
- } else this.matSelect.panelClass = panelClass;
180
- if (this._matOption) {
181
- this._matOption.disabled = true;
182
- this._matOption._getHostElement().classList.add("contains-cmat-select-search");
183
- this._matOption._getHostElement().setAttribute("aria-hidden", "true");
184
- } else console.error("<cmat-select-search> must be placed inside a <mat-option> element");
185
- this.matSelect.openedChange.pipe(delay(1), takeUntilDestroyed(this._destroyRef)).subscribe((opened) => {
186
- if (opened) {
187
- this.updateInputWidth();
188
- if (!this.disableInitialFocus()) this.focus();
189
- } else if (this.clearSearchInput()) this.reset();
190
- });
191
- this.matSelect.openedChange.pipe(take(1)).pipe(takeUntilDestroyed(this._destroyRef)).subscribe(() => {
192
- if (this.matSelect._keyManager) this.matSelect._keyManager.change.pipe(takeUntilDestroyed(this._destroyRef)).subscribe(() => this._adjustScrollTopToFitActiveOptionIntoView());
193
- else console.warn("_keyManager was not initialized.");
194
- this._options = this.matSelect.options;
195
- let previousFirstOption = this._options.toArray()[this._getOptionsLengthOffset()];
196
- this._options.changes.pipe(takeUntilDestroyed(this._destroyRef)).subscribe(() => {
197
- setTimeout(() => {
198
- if (this._options) {
199
- const options = this._options.toArray();
200
- const currentFirstOption = options[this._getOptionsLengthOffset()];
201
- const keyManager = this.matSelect._keyManager;
202
- if (keyManager && this.matSelect.panelOpen) {
203
- if (!this.matSelect.compareWith(previousFirstOption, currentFirstOption) || !keyManager.activeItem || !options.find((option) => this.matSelect.compareWith(option, keyManager.activeItem))) keyManager.setFirstItemActive();
204
- setTimeout(() => {
205
- this.updateInputWidth();
206
- });
207
- if (!this.disableScrollToActiveOnOptionsChanged()) this._adjustScrollTopToFitActiveOptionIntoView();
208
- }
209
- previousFirstOption = currentFirstOption;
210
- }
211
- });
212
- });
213
- });
214
- this._viewportRuler.change().pipe(takeUntilDestroyed(this._destroyRef)).subscribe(() => {
215
- if (this.matSelect.panelOpen) this.updateInputWidth();
216
- });
217
- this._initMultipleHandling();
218
- }
219
- emitSelectAllBooleanToParent(state) {
220
- this.toggleAll.emit(state);
221
- }
222
- isToggleAllCheckboxVisible() {
223
- return this.matSelect.multiple && this.showToggleAllCheckbox();
224
- }
225
- handleKeydown(event) {
226
- if (event.key?.length === 1 || this.preventHomeEndKeyPropagation() && (event.code === "Home" || event.code === "End")) event.stopPropagation();
227
- if (this.matSelect.multiple && event.key && event.code === "Enter") setTimeout(() => this.focus());
228
- if (this.enableClearOnEscapePressed() === true && event.code === "Escape" && this.value) {
229
- this.reset(true);
230
- event.stopPropagation();
231
- }
232
- }
233
- handleKeyup(event) {
234
- if (event.code === "ArrowUp" || event.code === "ArrowDown") {
235
- const ariaActiveDescendantId = this.matSelect._getAriaActiveDescendant();
236
- const index = this._options?.toArray().findIndex((item) => item.id === ariaActiveDescendantId) ?? -1;
237
- if (index >= 0) {
238
- this._unselectActiveDescendant();
239
- this._activeDescendant = this._options?.toArray()[index]._getHostElement();
240
- this._activeDescendant?.setAttribute("aria-selected", "true");
241
- if (ariaActiveDescendantId) this.searchSelectInput().nativeElement.setAttribute("aria-activedescendant", ariaActiveDescendantId);
242
- else this.searchSelectInput().nativeElement.removeAttribute("aria-activedescendant");
243
- }
244
- }
245
- }
246
- writeValue(value) {
247
- this._lastExternalInputValue = value;
248
- this.formControl.setValue(value);
249
- }
250
- onBlur() {
251
- this._unselectActiveDescendant();
252
- this.onTouched();
253
- }
254
- registerOnChange(fn) {
255
- this.formControl.valueChanges.pipe(filter((value) => value !== this._lastExternalInputValue), tap(() => this._lastExternalInputValue = void 0), takeUntilDestroyed(this._destroyRef)).subscribe(fn);
256
- }
257
- registerOnTouched(fn) {
258
- this.onTouched = fn;
259
- }
260
- focus() {
261
- if (!this.searchSelectInput() || !this.matSelect.panel) return;
262
- const panel = this.matSelect.panel.nativeElement;
263
- const scrollTop = panel.scrollTop;
264
- this.searchSelectInput().nativeElement.focus();
265
- panel.scrollTop = scrollTop;
266
- }
267
- reset(focus) {
268
- this.formControl.setValue("");
269
- if (focus) this.focus();
270
- }
271
- updateInputWidth() {
272
- const innerEl = this.innerSelectSearch();
273
- if (!innerEl?.nativeElement) return;
274
- let currentElement = innerEl.nativeElement;
275
- let panelElement = null;
276
- while (currentElement?.parentElement) {
277
- currentElement = currentElement.parentElement;
278
- if (currentElement.classList.contains("mat-select-panel")) {
279
- panelElement = currentElement;
280
- break;
281
- }
282
- }
283
- if (panelElement) innerEl.nativeElement.style.width = panelElement.clientWidth + "px";
284
- }
285
- _getMatOptionHeight() {
286
- if (this.matSelect.options.length > 0) return this.matSelect.options.first._getHostElement().getBoundingClientRect().height;
287
- return 0;
288
- }
289
- _getOptionsLengthOffset() {
290
- if (this._matOption) return 1;
291
- else return 0;
292
- }
293
- _unselectActiveDescendant() {
294
- this._activeDescendant?.removeAttribute("aria-selected");
295
- this.searchSelectInput().nativeElement.removeAttribute("aria-activedescendant");
296
- }
297
- _applyDefaultOptions(defaultOptions) {
298
- if (!defaultOptions) return;
299
- const options = defaultOptions;
300
- Object.assign(this, options);
301
- }
302
- _initMultipleHandling() {
303
- if (!this.matSelect.ngControl) {
304
- if (this.matSelect.multiple) console.error("the mat-select containing cmat-select-search must have a ngModel or formControl directive when multiple=true");
305
- return;
306
- }
307
- this._previousSelectedValues = this.matSelect.ngControl.value;
308
- this.matSelect.ngControl.valueChanges?.pipe(takeUntilDestroyed(this._destroyRef)).subscribe((values) => {
309
- let restoreSelectedValues = false;
310
- let currentValues = Array.isArray(values) ? values : [];
311
- if (this.matSelect.multiple) {
312
- if ((this.alwaysRestoreSelectedOptionsMulti() || this._valueSignal().length) && this._previousSelectedValues && Array.isArray(this._previousSelectedValues)) {
313
- const optionValues = this.matSelect.options.map((option) => option.value);
314
- this._previousSelectedValues.forEach((previousValue) => {
315
- if (!currentValues.some((v) => this.matSelect.compareWith(v, previousValue)) && !optionValues.some((v) => this.matSelect.compareWith(v, previousValue))) {
316
- currentValues.push(previousValue);
317
- restoreSelectedValues = true;
318
- }
319
- });
320
- }
321
- }
322
- this._previousSelectedValues = currentValues;
323
- if (restoreSelectedValues) this.matSelect._onChange(currentValues);
324
- });
325
- }
326
- _adjustScrollTopToFitActiveOptionIntoView() {
327
- if (this.matSelect.panel && this.matSelect.options.length > 0) {
328
- const matOptionHeight = this._getMatOptionHeight();
329
- const activeOptionIndex = this.matSelect._keyManager.activeItemIndex ?? 0;
330
- const labelCount = _countGroupLabelsBeforeOption(activeOptionIndex, this.matSelect.options, this.matSelect.optionGroups);
331
- const indexOfOptionToFitIntoView = (this._matOption ? -1 : 0) + labelCount + activeOptionIndex;
332
- const currentScrollTop = this.matSelect.panel.nativeElement.scrollTop;
333
- const searchInputHeight = this.innerSelectSearch().nativeElement.offsetHeight;
334
- const amountOfVisibleOptions = Math.floor((SELECT_PANEL_MAX_HEIGHT - searchInputHeight) / matOptionHeight);
335
- const indexOfFirstVisibleOption = Math.round((currentScrollTop + searchInputHeight) / matOptionHeight) - 1;
336
- if (indexOfFirstVisibleOption >= indexOfOptionToFitIntoView) this.matSelect.panel.nativeElement.scrollTop = indexOfOptionToFitIntoView * matOptionHeight;
337
- else if (indexOfFirstVisibleOption + amountOfVisibleOptions <= indexOfOptionToFitIntoView) this.matSelect.panel.nativeElement.scrollTop = (indexOfOptionToFitIntoView + 1) * matOptionHeight - (SELECT_PANEL_MAX_HEIGHT - searchInputHeight);
338
- }
339
- }
340
- static {
341
- this.ɵfac = i0.ɵɵngDeclareFactory({
342
- minVersion: "12.0.0",
343
- version: "22.2.4",
344
- ngImport: i0,
345
- type: CmatSelectSearchComponent,
346
- deps: [],
347
- target: i0.ɵɵFactoryTarget.Component
348
- });
349
- }
350
- static {
351
- this.ɵcmp = i0.ɵɵngDeclareComponent({
352
- minVersion: "17.0.0",
353
- version: "22.2.4",
354
- type: CmatSelectSearchComponent,
355
- isStandalone: true,
356
- selector: "cmat-select-search",
357
- inputs: {
358
- placeholderLabel: {
359
- classPropertyName: "placeholderLabel",
360
- publicName: "placeholderLabel",
361
- isSignal: true,
362
- isRequired: false,
363
- transformFunction: null
364
- },
365
- type: {
366
- classPropertyName: "type",
367
- publicName: "type",
368
- isSignal: true,
369
- isRequired: false,
370
- transformFunction: null
371
- },
372
- noEntriesFoundLabel: {
373
- classPropertyName: "noEntriesFoundLabel",
374
- publicName: "noEntriesFoundLabel",
375
- isSignal: true,
376
- isRequired: false,
377
- transformFunction: null
378
- },
379
- showNoFoundLabel: {
380
- classPropertyName: "showNoFoundLabel",
381
- publicName: "showNoFoundLabel",
382
- isSignal: true,
383
- isRequired: false,
384
- transformFunction: null
385
- },
386
- clearSearchInput: {
387
- classPropertyName: "clearSearchInput",
388
- publicName: "clearSearchInput",
389
- isSignal: true,
390
- isRequired: false,
391
- transformFunction: null
392
- },
393
- searching: {
394
- classPropertyName: "searching",
395
- publicName: "searching",
396
- isSignal: true,
397
- isRequired: false,
398
- transformFunction: null
399
- },
400
- disableInitialFocus: {
401
- classPropertyName: "disableInitialFocus",
402
- publicName: "disableInitialFocus",
403
- isSignal: true,
404
- isRequired: false,
405
- transformFunction: null
406
- },
407
- enableClearOnEscapePressed: {
408
- classPropertyName: "enableClearOnEscapePressed",
409
- publicName: "enableClearOnEscapePressed",
410
- isSignal: true,
411
- isRequired: false,
412
- transformFunction: null
413
- },
414
- preventHomeEndKeyPropagation: {
415
- classPropertyName: "preventHomeEndKeyPropagation",
416
- publicName: "preventHomeEndKeyPropagation",
417
- isSignal: true,
418
- isRequired: false,
419
- transformFunction: null
420
- },
421
- disableScrollToActiveOnOptionsChanged: {
422
- classPropertyName: "disableScrollToActiveOnOptionsChanged",
423
- publicName: "disableScrollToActiveOnOptionsChanged",
424
- isSignal: true,
425
- isRequired: false,
426
- transformFunction: null
427
- },
428
- ariaLabel: {
429
- classPropertyName: "ariaLabel",
430
- publicName: "ariaLabel",
431
- isSignal: true,
432
- isRequired: false,
433
- transformFunction: null
434
- },
435
- showToggleAllCheckbox: {
436
- classPropertyName: "showToggleAllCheckbox",
437
- publicName: "showToggleAllCheckbox",
438
- isSignal: true,
439
- isRequired: false,
440
- transformFunction: null
441
- },
442
- toggleAllCheckboxChecked: {
443
- classPropertyName: "toggleAllCheckboxChecked",
444
- publicName: "toggleAllCheckboxChecked",
445
- isSignal: true,
446
- isRequired: false,
447
- transformFunction: null
448
- },
449
- toggleAllCheckboxIndeterminate: {
450
- classPropertyName: "toggleAllCheckboxIndeterminate",
451
- publicName: "toggleAllCheckboxIndeterminate",
452
- isSignal: true,
453
- isRequired: false,
454
- transformFunction: null
455
- },
456
- toggleAllCheckboxTooltipMessage: {
457
- classPropertyName: "toggleAllCheckboxTooltipMessage",
458
- publicName: "toggleAllCheckboxTooltipMessage",
459
- isSignal: true,
460
- isRequired: false,
461
- transformFunction: null
462
- },
463
- toggleAllCheckboxTooltipPosition: {
464
- classPropertyName: "toggleAllCheckboxTooltipPosition",
465
- publicName: "toggleAllCheckboxTooltipPosition",
466
- isSignal: true,
467
- isRequired: false,
468
- transformFunction: null
469
- },
470
- hideClearSearchButton: {
471
- classPropertyName: "hideClearSearchButton",
472
- publicName: "hideClearSearchButton",
473
- isSignal: true,
474
- isRequired: false,
475
- transformFunction: null
476
- },
477
- alwaysRestoreSelectedOptionsMulti: {
478
- classPropertyName: "alwaysRestoreSelectedOptionsMulti",
479
- publicName: "alwaysRestoreSelectedOptionsMulti",
480
- isSignal: true,
481
- isRequired: false,
482
- transformFunction: null
483
- },
484
- debounceTime: {
485
- classPropertyName: "debounceTime",
486
- publicName: "debounceTime",
487
- isSignal: true,
488
- isRequired: false,
489
- transformFunction: null
490
- },
491
- optionsCount: {
492
- classPropertyName: "optionsCount",
493
- publicName: "optionsCount",
494
- isSignal: true,
495
- isRequired: false,
496
- transformFunction: null
497
- }
498
- },
499
- outputs: { toggleAll: "toggleAll" },
500
- host: { properties: { "class.cmat-select-search-inside-mat-option": "this.isInsideMatOption" } },
501
- providers: [{
502
- provide: NG_VALUE_ACCESSOR,
503
- useExisting: forwardRef(() => CmatSelectSearchComponent),
504
- multi: true
505
- }],
506
- queries: [{
507
- propertyName: "clearIcon",
508
- first: true,
509
- predicate: CmatSelectSearchClearDirective,
510
- descendants: true,
511
- isSignal: true
512
- }, {
513
- propertyName: "noEntriesFound",
514
- first: true,
515
- predicate: CmatSelectNoEntriesFoundDirective,
516
- descendants: true,
517
- isSignal: true
518
- }],
519
- viewQueries: [{
520
- propertyName: "searchSelectInput",
521
- first: true,
522
- predicate: ["searchSelectInput"],
523
- descendants: true,
524
- isSignal: true
525
- }, {
526
- propertyName: "innerSelectSearch",
527
- first: true,
528
- predicate: ["innerSelectSearch"],
529
- descendants: true,
530
- isSignal: true
531
- }],
532
- exportAs: ["cmatSelectSearch"],
533
- ngImport: i0,
534
- template: "<input matInput class=\"cmat-select-search-input cmat-select-search-hidden\" />\r\n\r\n<div\r\n #innerSelectSearch\r\n class=\"cmat-select-search-inner mat-typography mat-tab-header\"\r\n [ngClass]=\"{\r\n 'cmat-select-search-inner-multiple': matSelect.multiple,\r\n 'cmat-select-search-inner-toggle-all': isToggleAllCheckboxVisible(),\r\n }\"\r\n>\r\n @if (isToggleAllCheckboxVisible()) {\r\n <mat-checkbox\r\n class=\"cmat-select-search-toggle-all-checkbox -mr-4\"\r\n matTooltipClass=\"cmat-select-search-toggle-all-tooltip\"\r\n [color]=\"matFormField?.color\"\r\n [checked]=\"toggleAllCheckboxChecked()\"\r\n [indeterminate]=\"toggleAllCheckboxIndeterminate()\"\r\n [matTooltip]=\"toggleAllCheckboxTooltipMessage()\"\r\n [matTooltipPosition]=\"toggleAllCheckboxTooltipPosition()\"\r\n (change)=\"emitSelectAllBooleanToParent($event.checked)\"\r\n >\r\n </mat-checkbox>\r\n }\r\n <span matPrefix class=\"flex flex-col justify-center pl-2\">\r\n <mat-icon\r\n class=\"cmat-select-search-icon\"\r\n color=\"primary\"\r\n svgIcon=\"heroicons_outline:magnifying-glass\"\r\n ></mat-icon>\r\n </span>\r\n <input\r\n #searchSelectInput\r\n matInput\r\n class=\"cmat-select-search-input cmat-input-element\"\r\n autocomplete=\"off\"\r\n [type]=\"type()\"\r\n [formControl]=\"formControl\"\r\n [placeholder]=\"placeholderLabel()\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n (keydown)=\"handleKeydown($event)\"\r\n (keyup)=\"handleKeyup($event)\"\r\n (blur)=\"onBlur()\"\r\n />\r\n @if (searching()) {\r\n <mat-spinner class=\"cmat-select-search-spinner\" diameter=\"16\"></mat-spinner>\r\n }\r\n\r\n @if (!hideClearSearchButton() && value && !searching()) {\r\n <button\r\n type=\"button\"\r\n matIconButton\r\n aria-label=\"Clear\"\r\n class=\"cmat-select-search-clear\"\r\n (click)=\"reset(true)\"\r\n >\r\n @if (clearIcon()) {\r\n <ng-content select=\"[cmatSelectSearchClear]\"></ng-content>\r\n } @else {\r\n <mat-icon svgIcon=\"mat_outline:close\"></mat-icon>\r\n }\r\n </button>\r\n }\r\n\r\n <ng-content select=\".cmat-select-search-custom-header-content\"></ng-content>\r\n</div>\r\n\r\n@if (showNoEntriesFound()) {\r\n <div class=\"cmat-select-search-no-entries-found\">\r\n @if (noEntriesFound()) {\r\n <ng-content select=\"[cmatSelectNoEntriesFound]\"></ng-content>\r\n } @else {\r\n {{ noEntriesFoundLabel() }}\r\n }\r\n </div>\r\n}\r\n",
535
- styles: ["cmat-select-search .cmat-select-search-hidden{visibility:hidden}cmat-select-search .cmat-select-search-inner{position:absolute;top:0;left:0;width:100%;z-index:100;font-size:inherit;box-shadow:none;display:flex;border-bottom-width:1px;border-bottom-style:solid}cmat-select-search .cmat-select-search-inner.cmat-select-search-inner-multiple.cmat-select-search-inner-toggle-all{display:flex;align-items:center}cmat-select-search .cmat-select-search-inner .cmat-input-element{flex-basis:auto;vertical-align:middle!important}cmat-select-search .cmat-select-search-input{box-sizing:border-box;width:100%;border:none;font-family:inherit;font-size:inherit;color:currentColor;outline:none;background:none;padding:0 44px 0 16px;height:47px!important;line-height:47px!important}:host-context([dir=rtl]) cmat-select-search .cmat-select-search-input{padding-right:16px;padding-left:44px}cmat-select-search .cmat-select-search-no-entries-found{padding-top:8px}cmat-select-search .cmat-select-search-clear{position:absolute;right:4px;top:5px}:host-context([dir=rtl]) cmat-select-search .cmat-select-search-clear{right:auto;left:4px}cmat-select-search .cmat-select-search-spinner{position:absolute;right:16px;top:calc(50% - 8px)}:host-context([dir=rtl]) cmat-select-search .cmat-select-search-spinner{right:auto;left:16px}cmat-select-search .cmat-select-search-toggle-all-checkbox{padding-left:5px;padding-bottom:2px}:host-context([dir=rtl]) cmat-select-search .cmat-select-search-toggle-all-checkbox{padding-left:0;padding-right:5px}cmat-select-search .cmat-select-search-toggle-all-checkbox .mdc-checkbox{opacity:1!important}.mat-mdc-option[aria-disabled=true].contains-cmat-select-search{position:sticky;top:0;z-index:1;opacity:1;pointer-events:all;background:var(--mat-select-panel-background-color)}.mat-mdc-option[aria-disabled=true].contains-cmat-select-search .mat-icon{margin-right:0;margin-left:0}.mat-mdc-option[aria-disabled=true].contains-cmat-select-search mat-pseudo-checkbox{display:none}.mat-mdc-option[aria-disabled=true].contains-cmat-select-search .mdc-list-item__primary-text{opacity:1}.mat-mdc-option[aria-disabled=true].contains-cmat-select-search.cmat-select-search-no-entries-found{height:96px}.cmat-select-search-panel{transform:none!important;overflow-x:hidden;position:relative;padding:0!important}\n"],
536
- dependencies: [
537
- {
538
- kind: "ngmodule",
539
- type: MatInputModule
540
- },
541
- {
542
- kind: "directive",
543
- type: i1.MatInput,
544
- selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]",
545
- inputs: [
546
- "disabled",
547
- "id",
548
- "placeholder",
549
- "name",
550
- "required",
551
- "type",
552
- "errorStateMatcher",
553
- "aria-describedby",
554
- "value",
555
- "readonly",
556
- "disabledInteractive"
557
- ],
558
- exportAs: ["matInput"]
559
- },
560
- {
561
- kind: "directive",
562
- type: i1.MatPrefix,
563
- selector: "[matPrefix], [matIconPrefix], [matTextPrefix]",
564
- inputs: ["matTextPrefix"]
565
- },
566
- {
567
- kind: "directive",
568
- type: NgClass,
569
- selector: "[ngClass]",
570
- inputs: ["class", "ngClass"]
571
- },
572
- {
573
- kind: "ngmodule",
574
- type: MatCheckboxModule
575
- },
576
- {
577
- kind: "component",
578
- type: i2.MatCheckbox,
579
- selector: "mat-checkbox",
580
- inputs: [
581
- "aria-label",
582
- "aria-labelledby",
583
- "aria-describedby",
584
- "aria-expanded",
585
- "aria-controls",
586
- "aria-owns",
587
- "id",
588
- "required",
589
- "labelPosition",
590
- "name",
591
- "value",
592
- "disableRipple",
593
- "tabIndex",
594
- "color",
595
- "disabledInteractive",
596
- "checked",
597
- "disabled",
598
- "indeterminate"
599
- ],
600
- outputs: ["change", "indeterminateChange"],
601
- exportAs: ["matCheckbox"]
602
- },
603
- {
604
- kind: "ngmodule",
605
- type: MatTooltipModule
606
- },
607
- {
608
- kind: "directive",
609
- type: i3.MatTooltip,
610
- selector: "[matTooltip]",
611
- inputs: [
612
- "matTooltipPosition",
613
- "matTooltipPositionAtOrigin",
614
- "matTooltipDisabled",
615
- "matTooltipShowDelay",
616
- "matTooltipHideDelay",
617
- "matTooltipTouchGestures",
618
- "matTooltip",
619
- "matTooltipClass"
620
- ],
621
- exportAs: ["matTooltip"]
622
- },
623
- {
624
- kind: "ngmodule",
625
- type: MatFormFieldModule
626
- },
627
- {
628
- kind: "ngmodule",
629
- type: MatIconModule
630
- },
631
- {
632
- kind: "component",
633
- type: i4.MatIcon,
634
- selector: "mat-icon",
635
- inputs: [
636
- "color",
637
- "inline",
638
- "svgIcon",
639
- "fontSet",
640
- "fontIcon"
641
- ],
642
- exportAs: ["matIcon"]
643
- },
644
- {
645
- kind: "ngmodule",
646
- type: FormsModule
647
- },
648
- {
649
- kind: "directive",
650
- type: i5.DefaultValueAccessor,
651
- selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]"
652
- },
653
- {
654
- kind: "directive",
655
- type: i5.NgControlStatus,
656
- selector: "[formControlName],[ngModel],[formControl]"
657
- },
658
- {
659
- kind: "ngmodule",
660
- type: ReactiveFormsModule
661
- },
662
- {
663
- kind: "directive",
664
- type: i5.FormControlDirective,
665
- selector: "[formControl]",
666
- inputs: [
667
- "formControl",
668
- "disabled",
669
- "ngModel"
670
- ],
671
- outputs: ["ngModelChange"],
672
- exportAs: ["ngForm"]
673
- },
674
- {
675
- kind: "ngmodule",
676
- type: MatProgressSpinnerModule
677
- },
678
- {
679
- kind: "component",
680
- type: i6.MatProgressSpinner,
681
- selector: "mat-progress-spinner, mat-spinner",
682
- inputs: [
683
- "color",
684
- "mode",
685
- "value",
686
- "diameter",
687
- "strokeWidth"
688
- ],
689
- exportAs: ["matProgressSpinner"]
690
- },
691
- {
692
- kind: "ngmodule",
693
- type: MatButtonModule
694
- },
695
- {
696
- kind: "component",
697
- type: i7.MatIconButton,
698
- selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]",
699
- exportAs: ["matButton", "matAnchor"]
700
- }
701
- ],
702
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
703
- encapsulation: i0.ViewEncapsulation.None
704
- });
705
- }
706
- };
707
- i0.ɵɵngDeclareClassMetadata({
708
- minVersion: "12.0.0",
709
- version: "22.2.4",
710
- ngImport: i0,
711
- type: CmatSelectSearchComponent,
712
- decorators: [{
713
- type: Component,
714
- args: [{
715
- selector: "cmat-select-search",
716
- providers: [{
717
- provide: NG_VALUE_ACCESSOR,
718
- useExisting: forwardRef(() => CmatSelectSearchComponent),
719
- multi: true
720
- }],
721
- encapsulation: ViewEncapsulation.None,
722
- changeDetection: ChangeDetectionStrategy.OnPush,
723
- exportAs: "cmatSelectSearch",
724
- imports: [
725
- MatInputModule,
726
- NgClass,
727
- MatCheckboxModule,
728
- MatTooltipModule,
729
- MatFormFieldModule,
730
- MatIconModule,
731
- FormsModule,
732
- ReactiveFormsModule,
733
- MatProgressSpinnerModule,
734
- MatButtonModule
735
- ],
736
- template: "<input matInput class=\"cmat-select-search-input cmat-select-search-hidden\" />\r\n\r\n<div\r\n #innerSelectSearch\r\n class=\"cmat-select-search-inner mat-typography mat-tab-header\"\r\n [ngClass]=\"{\r\n 'cmat-select-search-inner-multiple': matSelect.multiple,\r\n 'cmat-select-search-inner-toggle-all': isToggleAllCheckboxVisible(),\r\n }\"\r\n>\r\n @if (isToggleAllCheckboxVisible()) {\r\n <mat-checkbox\r\n class=\"cmat-select-search-toggle-all-checkbox -mr-4\"\r\n matTooltipClass=\"cmat-select-search-toggle-all-tooltip\"\r\n [color]=\"matFormField?.color\"\r\n [checked]=\"toggleAllCheckboxChecked()\"\r\n [indeterminate]=\"toggleAllCheckboxIndeterminate()\"\r\n [matTooltip]=\"toggleAllCheckboxTooltipMessage()\"\r\n [matTooltipPosition]=\"toggleAllCheckboxTooltipPosition()\"\r\n (change)=\"emitSelectAllBooleanToParent($event.checked)\"\r\n >\r\n </mat-checkbox>\r\n }\r\n <span matPrefix class=\"flex flex-col justify-center pl-2\">\r\n <mat-icon\r\n class=\"cmat-select-search-icon\"\r\n color=\"primary\"\r\n svgIcon=\"heroicons_outline:magnifying-glass\"\r\n ></mat-icon>\r\n </span>\r\n <input\r\n #searchSelectInput\r\n matInput\r\n class=\"cmat-select-search-input cmat-input-element\"\r\n autocomplete=\"off\"\r\n [type]=\"type()\"\r\n [formControl]=\"formControl\"\r\n [placeholder]=\"placeholderLabel()\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n (keydown)=\"handleKeydown($event)\"\r\n (keyup)=\"handleKeyup($event)\"\r\n (blur)=\"onBlur()\"\r\n />\r\n @if (searching()) {\r\n <mat-spinner class=\"cmat-select-search-spinner\" diameter=\"16\"></mat-spinner>\r\n }\r\n\r\n @if (!hideClearSearchButton() && value && !searching()) {\r\n <button\r\n type=\"button\"\r\n matIconButton\r\n aria-label=\"Clear\"\r\n class=\"cmat-select-search-clear\"\r\n (click)=\"reset(true)\"\r\n >\r\n @if (clearIcon()) {\r\n <ng-content select=\"[cmatSelectSearchClear]\"></ng-content>\r\n } @else {\r\n <mat-icon svgIcon=\"mat_outline:close\"></mat-icon>\r\n }\r\n </button>\r\n }\r\n\r\n <ng-content select=\".cmat-select-search-custom-header-content\"></ng-content>\r\n</div>\r\n\r\n@if (showNoEntriesFound()) {\r\n <div class=\"cmat-select-search-no-entries-found\">\r\n @if (noEntriesFound()) {\r\n <ng-content select=\"[cmatSelectNoEntriesFound]\"></ng-content>\r\n } @else {\r\n {{ noEntriesFoundLabel() }}\r\n }\r\n </div>\r\n}\r\n",
737
- styles: ["cmat-select-search .cmat-select-search-hidden{visibility:hidden}cmat-select-search .cmat-select-search-inner{position:absolute;top:0;left:0;width:100%;z-index:100;font-size:inherit;box-shadow:none;display:flex;border-bottom-width:1px;border-bottom-style:solid}cmat-select-search .cmat-select-search-inner.cmat-select-search-inner-multiple.cmat-select-search-inner-toggle-all{display:flex;align-items:center}cmat-select-search .cmat-select-search-inner .cmat-input-element{flex-basis:auto;vertical-align:middle!important}cmat-select-search .cmat-select-search-input{box-sizing:border-box;width:100%;border:none;font-family:inherit;font-size:inherit;color:currentColor;outline:none;background:none;padding:0 44px 0 16px;height:47px!important;line-height:47px!important}:host-context([dir=rtl]) cmat-select-search .cmat-select-search-input{padding-right:16px;padding-left:44px}cmat-select-search .cmat-select-search-no-entries-found{padding-top:8px}cmat-select-search .cmat-select-search-clear{position:absolute;right:4px;top:5px}:host-context([dir=rtl]) cmat-select-search .cmat-select-search-clear{right:auto;left:4px}cmat-select-search .cmat-select-search-spinner{position:absolute;right:16px;top:calc(50% - 8px)}:host-context([dir=rtl]) cmat-select-search .cmat-select-search-spinner{right:auto;left:16px}cmat-select-search .cmat-select-search-toggle-all-checkbox{padding-left:5px;padding-bottom:2px}:host-context([dir=rtl]) cmat-select-search .cmat-select-search-toggle-all-checkbox{padding-left:0;padding-right:5px}cmat-select-search .cmat-select-search-toggle-all-checkbox .mdc-checkbox{opacity:1!important}.mat-mdc-option[aria-disabled=true].contains-cmat-select-search{position:sticky;top:0;z-index:1;opacity:1;pointer-events:all;background:var(--mat-select-panel-background-color)}.mat-mdc-option[aria-disabled=true].contains-cmat-select-search .mat-icon{margin-right:0;margin-left:0}.mat-mdc-option[aria-disabled=true].contains-cmat-select-search mat-pseudo-checkbox{display:none}.mat-mdc-option[aria-disabled=true].contains-cmat-select-search .mdc-list-item__primary-text{opacity:1}.mat-mdc-option[aria-disabled=true].contains-cmat-select-search.cmat-select-search-no-entries-found{height:96px}.cmat-select-search-panel{transform:none!important;overflow-x:hidden;position:relative;padding:0!important}\n"]
738
- }]
739
- }],
740
- ctorParameters: () => [],
741
- propDecorators: {
742
- toggleAll: [{
743
- type: i0.Output,
744
- args: ["toggleAll"]
745
- }],
746
- searchSelectInput: [{
747
- type: i0.ViewChild,
748
- args: ["searchSelectInput", { isSignal: true }]
749
- }],
750
- innerSelectSearch: [{
751
- type: i0.ViewChild,
752
- args: ["innerSelectSearch", { isSignal: true }]
753
- }],
754
- clearIcon: [{
755
- type: i0.ContentChild,
756
- args: [i0.forwardRef(() => CmatSelectSearchClearDirective), { isSignal: true }]
757
- }],
758
- noEntriesFound: [{
759
- type: i0.ContentChild,
760
- args: [i0.forwardRef(() => CmatSelectNoEntriesFoundDirective), { isSignal: true }]
761
- }],
762
- placeholderLabel: [{
763
- type: i0.Input,
764
- args: [{
765
- isSignal: true,
766
- alias: "placeholderLabel",
767
- required: false
768
- }]
769
- }],
770
- type: [{
771
- type: i0.Input,
772
- args: [{
773
- isSignal: true,
774
- alias: "type",
775
- required: false
776
- }]
777
- }],
778
- noEntriesFoundLabel: [{
779
- type: i0.Input,
780
- args: [{
781
- isSignal: true,
782
- alias: "noEntriesFoundLabel",
783
- required: false
784
- }]
785
- }],
786
- showNoFoundLabel: [{
787
- type: i0.Input,
788
- args: [{
789
- isSignal: true,
790
- alias: "showNoFoundLabel",
791
- required: false
792
- }]
793
- }],
794
- clearSearchInput: [{
795
- type: i0.Input,
796
- args: [{
797
- isSignal: true,
798
- alias: "clearSearchInput",
799
- required: false
800
- }]
801
- }],
802
- searching: [{
803
- type: i0.Input,
804
- args: [{
805
- isSignal: true,
806
- alias: "searching",
807
- required: false
808
- }]
809
- }],
810
- disableInitialFocus: [{
811
- type: i0.Input,
812
- args: [{
813
- isSignal: true,
814
- alias: "disableInitialFocus",
815
- required: false
816
- }]
817
- }],
818
- enableClearOnEscapePressed: [{
819
- type: i0.Input,
820
- args: [{
821
- isSignal: true,
822
- alias: "enableClearOnEscapePressed",
823
- required: false
824
- }]
825
- }],
826
- preventHomeEndKeyPropagation: [{
827
- type: i0.Input,
828
- args: [{
829
- isSignal: true,
830
- alias: "preventHomeEndKeyPropagation",
831
- required: false
832
- }]
833
- }],
834
- disableScrollToActiveOnOptionsChanged: [{
835
- type: i0.Input,
836
- args: [{
837
- isSignal: true,
838
- alias: "disableScrollToActiveOnOptionsChanged",
839
- required: false
840
- }]
841
- }],
842
- ariaLabel: [{
843
- type: i0.Input,
844
- args: [{
845
- isSignal: true,
846
- alias: "ariaLabel",
847
- required: false
848
- }]
849
- }],
850
- showToggleAllCheckbox: [{
851
- type: i0.Input,
852
- args: [{
853
- isSignal: true,
854
- alias: "showToggleAllCheckbox",
855
- required: false
856
- }]
857
- }],
858
- toggleAllCheckboxChecked: [{
859
- type: i0.Input,
860
- args: [{
861
- isSignal: true,
862
- alias: "toggleAllCheckboxChecked",
863
- required: false
864
- }]
865
- }],
866
- toggleAllCheckboxIndeterminate: [{
867
- type: i0.Input,
868
- args: [{
869
- isSignal: true,
870
- alias: "toggleAllCheckboxIndeterminate",
871
- required: false
872
- }]
873
- }],
874
- toggleAllCheckboxTooltipMessage: [{
875
- type: i0.Input,
876
- args: [{
877
- isSignal: true,
878
- alias: "toggleAllCheckboxTooltipMessage",
879
- required: false
880
- }]
881
- }],
882
- toggleAllCheckboxTooltipPosition: [{
883
- type: i0.Input,
884
- args: [{
885
- isSignal: true,
886
- alias: "toggleAllCheckboxTooltipPosition",
887
- required: false
888
- }]
889
- }],
890
- hideClearSearchButton: [{
891
- type: i0.Input,
892
- args: [{
893
- isSignal: true,
894
- alias: "hideClearSearchButton",
895
- required: false
896
- }]
897
- }],
898
- alwaysRestoreSelectedOptionsMulti: [{
899
- type: i0.Input,
900
- args: [{
901
- isSignal: true,
902
- alias: "alwaysRestoreSelectedOptionsMulti",
903
- required: false
904
- }]
905
- }],
906
- debounceTime: [{
907
- type: i0.Input,
908
- args: [{
909
- isSignal: true,
910
- alias: "debounceTime",
911
- required: false
912
- }]
913
- }],
914
- optionsCount: [{
915
- type: i0.Input,
916
- args: [{
917
- isSignal: true,
918
- alias: "optionsCount",
919
- required: false
920
- }]
921
- }],
922
- isInsideMatOption: [{
923
- type: HostBinding,
924
- args: ["class.cmat-select-search-inside-mat-option"]
925
- }]
926
- }
927
- });
928
- export { CmatSelectSearchComponent, MAT_SELECTSEARCH_DEFAULT_OPTIONS, configurableDefaultOptions };
929
-
930
- //# sourceMappingURL=cmat-components-select-search.mjs.map
1
+ export { t as CmatSelectSearchComponent, n as MAT_SELECTSEARCH_DEFAULT_OPTIONS, r as configurableDefaultOptions } from "./public-api-BE83BHd7.mjs";