cmat 0.0.110 → 0.0.112
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/cmat-components-adapter.mjs +531 -536
- package/fesm2022/cmat-components-adapter.mjs.map +1 -1
- package/fesm2022/cmat-components-breadcrumb.mjs +521 -356
- package/fesm2022/cmat-components-breadcrumb.mjs.map +1 -1
- package/fesm2022/cmat-components-card.mjs +150 -42
- package/fesm2022/cmat-components-card.mjs.map +1 -1
- package/fesm2022/cmat-components-carousel.mjs +1120 -629
- package/fesm2022/cmat-components-carousel.mjs.map +1 -1
- package/fesm2022/cmat-components-cascade.mjs +861 -441
- package/fesm2022/cmat-components-cascade.mjs.map +1 -1
- package/fesm2022/cmat-components-chip-input.mjs +580 -335
- package/fesm2022/cmat-components-chip-input.mjs.map +1 -1
- package/fesm2022/cmat-components-code-editor.mjs +197 -105
- package/fesm2022/cmat-components-code-editor.mjs.map +1 -1
- package/fesm2022/cmat-components-color-picker.mjs +1762 -825
- package/fesm2022/cmat-components-color-picker.mjs.map +1 -1
- package/fesm2022/cmat-components-custom-formly.mjs +5196 -2531
- package/fesm2022/cmat-components-custom-formly.mjs.map +1 -1
- package/fesm2022/cmat-components-data-picker.mjs +1901 -1073
- package/fesm2022/cmat-components-data-picker.mjs.map +1 -1
- package/fesm2022/cmat-components-date-range.mjs +701 -456
- package/fesm2022/cmat-components-date-range.mjs.map +1 -1
- package/fesm2022/cmat-components-date-time-display.mjs +137 -30
- package/fesm2022/cmat-components-date-time-display.mjs.map +1 -1
- package/fesm2022/cmat-components-drawer.mjs +410 -258
- package/fesm2022/cmat-components-drawer.mjs.map +1 -1
- package/fesm2022/cmat-components-empty-state.mjs +201 -41
- package/fesm2022/cmat-components-empty-state.mjs.map +1 -1
- package/fesm2022/cmat-components-file-preview.mjs +198 -35
- package/fesm2022/cmat-components-file-preview.mjs.map +1 -1
- package/fesm2022/cmat-components-filter-toolbar.mjs +320 -72
- package/fesm2022/cmat-components-filter-toolbar.mjs.map +1 -1
- package/fesm2022/cmat-components-form-actions.mjs +102 -26
- package/fesm2022/cmat-components-form-actions.mjs.map +1 -1
- package/fesm2022/cmat-components-fullscreen.mjs +167 -47
- package/fesm2022/cmat-components-fullscreen.mjs.map +1 -1
- package/fesm2022/cmat-components-highlight.mjs +203 -112
- package/fesm2022/cmat-components-highlight.mjs.map +1 -1
- package/fesm2022/cmat-components-image-viewer.mjs +489 -215
- package/fesm2022/cmat-components-image-viewer.mjs.map +1 -1
- package/fesm2022/cmat-components-inline-loading.mjs +117 -27
- package/fesm2022/cmat-components-inline-loading.mjs.map +1 -1
- package/fesm2022/cmat-components-json-editor.mjs +276 -230
- package/fesm2022/cmat-components-json-editor.mjs.map +1 -1
- package/fesm2022/cmat-components-knob-input.mjs +615 -420
- package/fesm2022/cmat-components-knob-input.mjs.map +1 -1
- package/fesm2022/cmat-components-loading-overlay.mjs +53 -25
- package/fesm2022/cmat-components-loading-overlay.mjs.map +1 -1
- package/fesm2022/cmat-components-masonry.mjs +120 -40
- package/fesm2022/cmat-components-masonry.mjs.map +1 -1
- package/fesm2022/cmat-components-material-color-picker.mjs +332 -155
- package/fesm2022/cmat-components-material-color-picker.mjs.map +1 -1
- package/fesm2022/cmat-components-material-datetimepicker.mjs +4283 -2504
- package/fesm2022/cmat-components-material-datetimepicker.mjs.map +1 -1
- package/fesm2022/cmat-components-navigation.mjs +3080 -1404
- package/fesm2022/cmat-components-navigation.mjs.map +1 -1
- package/fesm2022/cmat-components-opt-input.mjs +540 -466
- package/fesm2022/cmat-components-opt-input.mjs.map +1 -1
- package/fesm2022/cmat-components-org-chart.mjs +528 -125
- package/fesm2022/cmat-components-org-chart.mjs.map +1 -1
- package/fesm2022/cmat-components-page-header.mjs +141 -32
- package/fesm2022/cmat-components-page-header.mjs.map +1 -1
- package/fesm2022/cmat-components-pagination.mjs +866 -534
- package/fesm2022/cmat-components-pagination.mjs.map +1 -1
- package/fesm2022/cmat-components-password-strength.mjs +873 -434
- package/fesm2022/cmat-components-password-strength.mjs.map +1 -1
- package/fesm2022/cmat-components-popover.mjs +1012 -731
- package/fesm2022/cmat-components-popover.mjs.map +1 -1
- package/fesm2022/cmat-components-progress-bar.mjs +98 -35
- package/fesm2022/cmat-components-progress-bar.mjs.map +1 -1
- package/fesm2022/cmat-components-qrcode.mjs +463 -287
- package/fesm2022/cmat-components-qrcode.mjs.map +1 -1
- package/fesm2022/cmat-components-rating.mjs +377 -203
- package/fesm2022/cmat-components-rating.mjs.map +1 -1
- package/fesm2022/cmat-components-rich-text-editor.mjs +153 -39
- package/fesm2022/cmat-components-rich-text-editor.mjs.map +1 -1
- package/fesm2022/cmat-components-select-search.mjs +926 -496
- package/fesm2022/cmat-components-select-search.mjs.map +1 -1
- package/fesm2022/cmat-components-select-table.mjs +1280 -842
- package/fesm2022/cmat-components-select-table.mjs.map +1 -1
- package/fesm2022/cmat-components-select-tree.mjs +998 -690
- package/fesm2022/cmat-components-select-tree.mjs.map +1 -1
- package/fesm2022/cmat-components-skeleton.mjs +143 -57
- package/fesm2022/cmat-components-skeleton.mjs.map +1 -1
- package/fesm2022/cmat-components-speed-dial.mjs +457 -303
- package/fesm2022/cmat-components-speed-dial.mjs.map +1 -1
- package/fesm2022/cmat-components-status-tag.mjs +136 -44
- package/fesm2022/cmat-components-status-tag.mjs.map +1 -1
- package/fesm2022/cmat-components-table-toolbar.mjs +120 -28
- package/fesm2022/cmat-components-table-toolbar.mjs.map +1 -1
- package/fesm2022/cmat-components-timeline.mjs +464 -168
- package/fesm2022/cmat-components-timeline.mjs.map +1 -1
- package/fesm2022/cmat-components-toast.mjs +346 -262
- package/fesm2022/cmat-components-toast.mjs.map +1 -1
- package/fesm2022/cmat-components-transfer-picker.mjs +1427 -593
- package/fesm2022/cmat-components-transfer-picker.mjs.map +1 -1
- package/fesm2022/cmat-components-treetable.mjs +372 -112
- package/fesm2022/cmat-components-treetable.mjs.map +1 -1
- package/fesm2022/cmat-components-upload.mjs +904 -410
- package/fesm2022/cmat-components-upload.mjs.map +1 -1
- package/fesm2022/cmat-components-x6-angular-shape.mjs +153 -170
- package/fesm2022/cmat-components-x6-angular-shape.mjs.map +1 -1
- package/fesm2022/cmat-directives-animate-on-scroll.mjs +220 -138
- package/fesm2022/cmat-directives-animate-on-scroll.mjs.map +1 -1
- package/fesm2022/cmat-directives-arrow-cursor.mjs +246 -193
- package/fesm2022/cmat-directives-arrow-cursor.mjs.map +1 -1
- package/fesm2022/cmat-directives-autofocus.mjs +43 -25
- package/fesm2022/cmat-directives-autofocus.mjs.map +1 -1
- package/fesm2022/cmat-directives-data-exporter.mjs +537 -338
- package/fesm2022/cmat-directives-data-exporter.mjs.map +1 -1
- package/fesm2022/cmat-directives-debounce.mjs +162 -76
- package/fesm2022/cmat-directives-debounce.mjs.map +1 -1
- package/fesm2022/cmat-directives-digit-only.mjs +457 -356
- package/fesm2022/cmat-directives-digit-only.mjs.map +1 -1
- package/fesm2022/cmat-directives-equal-validator.mjs +70 -53
- package/fesm2022/cmat-directives-equal-validator.mjs.map +1 -1
- package/fesm2022/cmat-directives-seamless-auto-scroll.mjs +180 -132
- package/fesm2022/cmat-directives-seamless-auto-scroll.mjs.map +1 -1
- package/fesm2022/cmat-lib-mock-api.mjs +207 -195
- package/fesm2022/cmat-lib-mock-api.mjs.map +1 -1
- package/fesm2022/cmat-pipes-bytes.mjs +50 -30
- package/fesm2022/cmat-pipes-bytes.mjs.map +1 -1
- package/fesm2022/cmat-pipes-date-format.mjs +41 -25
- package/fesm2022/cmat-pipes-date-format.mjs.map +1 -1
- package/fesm2022/cmat-pipes-find-by-key.mjs +44 -26
- package/fesm2022/cmat-pipes-find-by-key.mjs.map +1 -1
- package/fesm2022/cmat-pipes-group-by.mjs +50 -38
- package/fesm2022/cmat-pipes-group-by.mjs.map +1 -1
- package/fesm2022/cmat-pipes-keys.mjs +44 -31
- package/fesm2022/cmat-pipes-keys.mjs.map +1 -1
- package/fesm2022/cmat-pipes-secure.mjs +60 -49
- package/fesm2022/cmat-pipes-secure.mjs.map +1 -1
- package/fesm2022/cmat-pipes-uppercase.mjs +39 -22
- package/fesm2022/cmat-pipes-uppercase.mjs.map +1 -1
- package/fesm2022/cmat-reports.mjs +2751 -0
- package/fesm2022/cmat-reports.mjs.map +1 -0
- package/fesm2022/cmat-services-alert.mjs +249 -277
- package/fesm2022/cmat-services-alert.mjs.map +1 -1
- package/fesm2022/cmat-services-config.mjs +110 -81
- package/fesm2022/cmat-services-config.mjs.map +1 -1
- package/fesm2022/cmat-services-confirmation.mjs +184 -73
- package/fesm2022/cmat-services-confirmation.mjs.map +1 -1
- package/fesm2022/cmat-services-data.mjs +136 -125
- package/fesm2022/cmat-services-data.mjs.map +1 -1
- package/fesm2022/cmat-services-export-as.mjs +165 -183
- package/fesm2022/cmat-services-export-as.mjs.map +1 -1
- package/fesm2022/cmat-services-loading.mjs +116 -95
- package/fesm2022/cmat-services-loading.mjs.map +1 -1
- package/fesm2022/cmat-services-local-storage.mjs +75 -66
- package/fesm2022/cmat-services-local-storage.mjs.map +1 -1
- package/fesm2022/cmat-services-media-watcher.mjs +69 -64
- package/fesm2022/cmat-services-media-watcher.mjs.map +1 -1
- package/fesm2022/cmat-services-platform.mjs +48 -45
- package/fesm2022/cmat-services-platform.mjs.map +1 -1
- package/fesm2022/cmat-services-print.mjs +985 -669
- package/fesm2022/cmat-services-print.mjs.map +1 -1
- package/fesm2022/cmat-services-splash-screen.mjs +53 -38
- package/fesm2022/cmat-services-splash-screen.mjs.map +1 -1
- package/fesm2022/cmat-services-title.mjs +57 -47
- package/fesm2022/cmat-services-title.mjs.map +1 -1
- package/fesm2022/cmat-services-translation.mjs +79 -68
- package/fesm2022/cmat-services-translation.mjs.map +1 -1
- package/fesm2022/cmat-services-utils.mjs +424 -517
- package/fesm2022/cmat-services-utils.mjs.map +1 -1
- package/fesm2022/cmat-validators.mjs +23 -33
- package/fesm2022/cmat-validators.mjs.map +1 -1
- package/fesm2022/cmat-version.mjs +12 -16
- package/fesm2022/cmat-version.mjs.map +1 -1
- package/fesm2022/cmat.mjs +39806 -22071
- package/fesm2022/cmat.mjs.map +1 -1
- package/package.json +5 -1
- package/types/cmat-components-adapter.d.ts +145 -156
- package/types/cmat-components-breadcrumb.d.ts +108 -86
- package/types/cmat-components-card.d.ts +34 -18
- package/types/cmat-components-carousel.d.ts +251 -134
- package/types/cmat-components-cascade.d.ts +158 -117
- package/types/cmat-components-chip-input.d.ts +105 -71
- package/types/cmat-components-code-editor.d.ts +59 -34
- package/types/cmat-components-color-picker.d.ts +378 -236
- package/types/cmat-components-custom-formly.d.ts +776 -814
- package/types/cmat-components-data-picker.d.ts +502 -360
- package/types/cmat-components-date-range.d.ts +106 -77
- package/types/cmat-components-date-time-display.d.ts +36 -13
- package/types/cmat-components-drawer.d.ts +91 -61
- package/types/cmat-components-empty-state.d.ts +47 -17
- package/types/cmat-components-file-preview.d.ts +42 -14
- package/types/cmat-components-filter-toolbar.d.ts +57 -25
- package/types/cmat-components-form-actions.d.ts +18 -10
- package/types/cmat-components-fullscreen.d.ts +21 -13
- package/types/cmat-components-highlight.d.ts +33 -26
- package/types/cmat-components-image-viewer.d.ts +119 -58
- package/types/cmat-components-inline-loading.d.ts +24 -11
- package/types/cmat-components-json-editor.d.ts +39 -28
- package/types/cmat-components-knob-input.d.ts +172 -101
- package/types/cmat-components-loading-overlay.d.ts +8 -11
- package/types/cmat-components-masonry.d.ts +27 -14
- package/types/cmat-components-material-color-picker.d.ts +56 -42
- package/types/cmat-components-material-datetimepicker.d.ts +817 -454
- package/types/cmat-components-navigation.d.ts +295 -221
- package/types/cmat-components-opt-input.d.ts +111 -90
- package/types/cmat-components-org-chart.d.ts +53 -35
- package/types/cmat-components-page-header.d.ts +37 -14
- package/types/cmat-components-pagination.d.ts +144 -107
- package/types/cmat-components-password-strength.d.ts +197 -86
- package/types/cmat-components-popover.d.ts +264 -166
- package/types/cmat-components-progress-bar.d.ts +17 -14
- package/types/cmat-components-qrcode.d.ts +111 -42
- package/types/cmat-components-rating.d.ts +105 -59
- package/types/cmat-components-rich-text-editor.d.ts +39 -16
- package/types/cmat-components-select-search.d.ts +195 -99
- package/types/cmat-components-select-table.d.ts +241 -142
- package/types/cmat-components-select-tree.d.ts +185 -118
- package/types/cmat-components-skeleton.d.ts +55 -32
- package/types/cmat-components-speed-dial.d.ts +86 -61
- package/types/cmat-components-status-tag.d.ts +42 -24
- package/types/cmat-components-table-toolbar.d.ts +30 -12
- package/types/cmat-components-timeline.d.ts +83 -51
- package/types/cmat-components-toast.d.ts +84 -85
- package/types/cmat-components-transfer-picker.d.ts +228 -181
- package/types/cmat-components-treetable.d.ts +63 -39
- package/types/cmat-components-upload.d.ts +205 -106
- package/types/cmat-components-x6-angular-shape.d.ts +29 -37
- package/types/cmat-directives-animate-on-scroll.d.ts +48 -30
- package/types/cmat-directives-arrow-cursor.d.ts +55 -35
- package/types/cmat-directives-autofocus.d.ts +8 -11
- package/types/cmat-directives-data-exporter.d.ts +71 -40
- package/types/cmat-directives-debounce.d.ts +31 -28
- package/types/cmat-directives-digit-only.d.ts +90 -53
- package/types/cmat-directives-equal-validator.d.ts +11 -14
- package/types/cmat-directives-seamless-auto-scroll.d.ts +42 -29
- package/types/cmat-lib-mock-api.d.ts +46 -55
- package/types/cmat-pipes-bytes.d.ts +7 -10
- package/types/cmat-pipes-date-format.d.ts +7 -10
- package/types/cmat-pipes-find-by-key.d.ts +8 -12
- package/types/cmat-pipes-group-by.d.ts +11 -15
- package/types/cmat-pipes-keys.d.ts +10 -13
- package/types/cmat-pipes-secure.d.ts +14 -17
- package/types/cmat-pipes-uppercase.d.ts +7 -10
- package/types/cmat-reports.d.ts +1131 -0
- package/types/cmat-services-alert.d.ts +80 -87
- package/types/cmat-services-config.d.ts +37 -43
- package/types/cmat-services-confirmation.d.ts +31 -37
- package/types/cmat-services-data.d.ts +18 -21
- package/types/cmat-services-export-as.d.ts +28 -33
- package/types/cmat-services-loading.d.ts +27 -31
- package/types/cmat-services-local-storage.d.ts +17 -21
- package/types/cmat-services-media-watcher.d.ts +14 -18
- package/types/cmat-services-platform.d.ts +8 -11
- package/types/cmat-services-print.d.ts +97 -92
- package/types/cmat-services-splash-screen.d.ts +11 -14
- package/types/cmat-services-title.d.ts +9 -12
- package/types/cmat-services-translation.d.ts +19 -22
- package/types/cmat-services-utils.d.ts +76 -80
- package/types/cmat-validators.d.ts +5 -8
- package/types/cmat-version.d.ts +8 -10
- package/types/cmat.d.ts +7551 -5194
|
@@ -1,500 +1,930 @@
|
|
|
1
|
-
import { ViewportRuler } from
|
|
2
|
-
import { NgClass } from
|
|
3
|
-
import * as i0 from
|
|
4
|
-
import {
|
|
5
|
-
import { takeUntilDestroyed } from
|
|
6
|
-
import * as i5 from
|
|
7
|
-
import { FormControl, FormsModule,
|
|
8
|
-
import * as i7 from
|
|
9
|
-
import { MatButtonModule } from
|
|
10
|
-
import * as i2 from
|
|
11
|
-
import { MatCheckboxModule } from
|
|
12
|
-
import { MatOption, _countGroupLabelsBeforeOption } from
|
|
13
|
-
import { MatFormField, MatFormFieldModule } from
|
|
14
|
-
import * as i4 from
|
|
15
|
-
import { MatIconModule } from
|
|
16
|
-
import * as i1 from
|
|
17
|
-
import { MatInputModule } from
|
|
18
|
-
import * as i6 from
|
|
19
|
-
import { MatProgressSpinnerModule } from
|
|
20
|
-
import { MatSelect } from
|
|
21
|
-
import * as i3 from
|
|
22
|
-
import { MatTooltipModule } from
|
|
23
|
-
import {
|
|
24
|
-
|
|
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";
|
|
25
24
|
const configurableDefaultOptions = [
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
25
|
+
"ariaLabel",
|
|
26
|
+
"clearSearchInput",
|
|
27
|
+
"disableInitialFocus",
|
|
28
|
+
"disableScrollToActiveOnOptionsChanged",
|
|
29
|
+
"enableClearOnEscapePressed",
|
|
30
|
+
"hideClearSearchButton",
|
|
31
|
+
"noEntriesFoundLabel",
|
|
32
|
+
"placeholderLabel",
|
|
33
|
+
"preventHomeEndKeyPropagation",
|
|
34
|
+
"searching"
|
|
36
35
|
];
|
|
37
|
-
const MAT_SELECTSEARCH_DEFAULT_OPTIONS = new InjectionToken(
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
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.3",
|
|
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.3",
|
|
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.3",
|
|
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.3",
|
|
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.3",
|
|
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.3",
|
|
94
|
+
ngImport: i0,
|
|
95
|
+
type: CmatSelectSearchClearDirective,
|
|
96
|
+
decorators: [{
|
|
97
|
+
type: Directive,
|
|
98
|
+
args: [{ selector: "[cmatSelectSearchClear]" }]
|
|
99
|
+
}]
|
|
100
|
+
});
|
|
61
101
|
const SELECT_PANEL_MAX_HEIGHT = 256;
|
|
62
|
-
class CmatSelectSearchComponent {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
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.3",
|
|
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.3",
|
|
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.3",
|
|
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
|
+
});
|
|
499
928
|
export { CmatSelectSearchComponent, MAT_SELECTSEARCH_DEFAULT_OPTIONS, configurableDefaultOptions };
|
|
500
|
-
|
|
929
|
+
|
|
930
|
+
//# sourceMappingURL=cmat-components-select-search.mjs.map
|