cmat 0.0.87 → 0.0.88
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/cmat-components-adapter.mjs +9 -9
- package/fesm2022/cmat-components-adapter.mjs.map +1 -1
- package/fesm2022/cmat-components-breadcrumb.mjs +98 -80
- package/fesm2022/cmat-components-breadcrumb.mjs.map +1 -1
- package/fesm2022/cmat-components-card.mjs +26 -34
- package/fesm2022/cmat-components-card.mjs.map +1 -1
- package/fesm2022/cmat-components-carousel.mjs +467 -556
- package/fesm2022/cmat-components-carousel.mjs.map +1 -1
- package/fesm2022/cmat-components-cascade.mjs +270 -259
- package/fesm2022/cmat-components-cascade.mjs.map +1 -1
- package/fesm2022/cmat-components-chip-input.mjs +200 -116
- package/fesm2022/cmat-components-chip-input.mjs.map +1 -1
- package/fesm2022/cmat-components-code-editor.mjs +85 -38
- package/fesm2022/cmat-components-code-editor.mjs.map +1 -1
- package/fesm2022/cmat-components-color-picker.mjs +841 -0
- package/fesm2022/cmat-components-color-picker.mjs.map +1 -0
- package/fesm2022/cmat-components-custom-formly.mjs +1395 -838
- package/fesm2022/cmat-components-custom-formly.mjs.map +1 -1
- package/fesm2022/cmat-components-data-picker.mjs +996 -0
- package/fesm2022/cmat-components-data-picker.mjs.map +1 -0
- package/fesm2022/cmat-components-date-range.mjs +310 -264
- package/fesm2022/cmat-components-date-range.mjs.map +1 -1
- package/fesm2022/cmat-components-date-time-display.mjs +16 -20
- package/fesm2022/cmat-components-date-time-display.mjs.map +1 -1
- package/fesm2022/cmat-components-drawer.mjs +120 -137
- package/fesm2022/cmat-components-drawer.mjs.map +1 -1
- package/fesm2022/cmat-components-empty-state.mjs +17 -24
- package/fesm2022/cmat-components-empty-state.mjs.map +1 -1
- package/fesm2022/cmat-components-file-preview.mjs +18 -24
- package/fesm2022/cmat-components-file-preview.mjs.map +1 -1
- package/fesm2022/cmat-components-filter-toolbar.mjs +30 -39
- package/fesm2022/cmat-components-filter-toolbar.mjs.map +1 -1
- package/fesm2022/cmat-components-form-actions.mjs +12 -12
- package/fesm2022/cmat-components-form-actions.mjs.map +1 -1
- package/fesm2022/cmat-components-fullscreen.mjs +10 -10
- package/fesm2022/cmat-components-fullscreen.mjs.map +1 -1
- package/fesm2022/cmat-components-highlight.mjs +48 -41
- package/fesm2022/cmat-components-highlight.mjs.map +1 -1
- package/fesm2022/cmat-components-image-viewer.mjs +104 -107
- package/fesm2022/cmat-components-image-viewer.mjs.map +1 -1
- package/fesm2022/cmat-components-inline-loading.mjs +12 -15
- package/fesm2022/cmat-components-inline-loading.mjs.map +1 -1
- package/fesm2022/cmat-components-json-editor.mjs +118 -75
- package/fesm2022/cmat-components-json-editor.mjs.map +1 -1
- package/fesm2022/cmat-components-knob-input.mjs +196 -178
- package/fesm2022/cmat-components-knob-input.mjs.map +1 -1
- package/fesm2022/cmat-components-masonry.mjs +26 -41
- package/fesm2022/cmat-components-masonry.mjs.map +1 -1
- package/fesm2022/cmat-components-material-color-picker.mjs +81 -80
- package/fesm2022/cmat-components-material-color-picker.mjs.map +1 -1
- package/fesm2022/cmat-components-material-datetimepicker.mjs +1212 -1287
- package/fesm2022/cmat-components-material-datetimepicker.mjs.map +1 -1
- package/fesm2022/cmat-components-navigation.mjs +467 -450
- package/fesm2022/cmat-components-navigation.mjs.map +1 -1
- package/fesm2022/cmat-components-opt-input.mjs +143 -132
- package/fesm2022/cmat-components-opt-input.mjs.map +1 -1
- package/fesm2022/cmat-components-org-chart.mjs +68 -83
- package/fesm2022/cmat-components-org-chart.mjs.map +1 -1
- package/fesm2022/cmat-components-page-header.mjs +18 -24
- package/fesm2022/cmat-components-page-header.mjs.map +1 -1
- package/fesm2022/cmat-components-pagination.mjs +220 -136
- package/fesm2022/cmat-components-pagination.mjs.map +1 -1
- package/fesm2022/cmat-components-password-strength.mjs +262 -215
- package/fesm2022/cmat-components-password-strength.mjs.map +1 -1
- package/fesm2022/cmat-components-popover.mjs +227 -195
- package/fesm2022/cmat-components-popover.mjs.map +1 -1
- package/fesm2022/cmat-components-progress-bar.mjs +15 -34
- package/fesm2022/cmat-components-progress-bar.mjs.map +1 -1
- package/fesm2022/cmat-components-qrcode.mjs +95 -88
- package/fesm2022/cmat-components-qrcode.mjs.map +1 -1
- package/fesm2022/cmat-components-rating.mjs +70 -67
- package/fesm2022/cmat-components-rating.mjs.map +1 -1
- package/fesm2022/cmat-components-rich-text-editor.mjs +23 -26
- package/fesm2022/cmat-components-rich-text-editor.mjs.map +1 -1
- package/fesm2022/cmat-components-select-search.mjs +190 -159
- package/fesm2022/cmat-components-select-search.mjs.map +1 -1
- package/fesm2022/cmat-components-select-table.mjs +276 -213
- package/fesm2022/cmat-components-select-table.mjs.map +1 -1
- package/fesm2022/cmat-components-select-tree.mjs +178 -128
- package/fesm2022/cmat-components-select-tree.mjs.map +1 -1
- package/fesm2022/cmat-components-skeleton.mjs +44 -28
- package/fesm2022/cmat-components-skeleton.mjs.map +1 -1
- package/fesm2022/cmat-components-speed-dial.mjs +107 -163
- package/fesm2022/cmat-components-speed-dial.mjs.map +1 -1
- package/fesm2022/cmat-components-status-tag.mjs +29 -36
- package/fesm2022/cmat-components-status-tag.mjs.map +1 -1
- package/fesm2022/cmat-components-table-toolbar.mjs +14 -18
- package/fesm2022/cmat-components-table-toolbar.mjs.map +1 -1
- package/fesm2022/cmat-components-timeline.mjs +111 -118
- package/fesm2022/cmat-components-timeline.mjs.map +1 -1
- package/fesm2022/cmat-components-toast.mjs +65 -66
- package/fesm2022/cmat-components-toast.mjs.map +1 -1
- package/fesm2022/cmat-components-transfer-picker.mjs +130 -160
- package/fesm2022/cmat-components-transfer-picker.mjs.map +1 -1
- package/fesm2022/cmat-components-treetable.mjs +32 -39
- package/fesm2022/cmat-components-treetable.mjs.map +1 -1
- package/fesm2022/cmat-components-upload.mjs +186 -176
- package/fesm2022/cmat-components-upload.mjs.map +1 -1
- package/fesm2022/cmat-directives-animate-on-scroll.mjs +25 -28
- package/fesm2022/cmat-directives-animate-on-scroll.mjs.map +1 -1
- package/fesm2022/cmat-directives-arrow-cursor.mjs +85 -92
- package/fesm2022/cmat-directives-arrow-cursor.mjs.map +1 -1
- package/fesm2022/cmat-directives-autofocus.mjs +3 -3
- package/fesm2022/cmat-directives-autofocus.mjs.map +1 -1
- package/fesm2022/cmat-directives-data-exporter.mjs +49 -50
- package/fesm2022/cmat-directives-data-exporter.mjs.map +1 -1
- package/fesm2022/cmat-directives-debounce.mjs +16 -19
- package/fesm2022/cmat-directives-debounce.mjs.map +1 -1
- package/fesm2022/cmat-directives-digit-only.mjs +60 -69
- package/fesm2022/cmat-directives-digit-only.mjs.map +1 -1
- package/fesm2022/cmat-directives-equal-validator.mjs +3 -3
- package/fesm2022/cmat-directives-equal-validator.mjs.map +1 -1
- package/fesm2022/cmat-directives-seamless-auto-scroll.mjs +31 -30
- package/fesm2022/cmat-directives-seamless-auto-scroll.mjs.map +1 -1
- package/fesm2022/cmat-lib-mock-api.mjs +6 -6
- package/fesm2022/cmat-lib-mock-api.mjs.map +1 -1
- package/fesm2022/cmat-pipes-bytes.mjs +3 -3
- package/fesm2022/cmat-pipes-bytes.mjs.map +1 -1
- package/fesm2022/cmat-pipes-date-format.mjs +3 -3
- package/fesm2022/cmat-pipes-date-format.mjs.map +1 -1
- package/fesm2022/cmat-pipes-find-by-key.mjs +3 -3
- package/fesm2022/cmat-pipes-find-by-key.mjs.map +1 -1
- package/fesm2022/cmat-pipes-group-by.mjs +3 -3
- package/fesm2022/cmat-pipes-group-by.mjs.map +1 -1
- package/fesm2022/cmat-pipes-keys.mjs +3 -3
- package/fesm2022/cmat-pipes-keys.mjs.map +1 -1
- package/fesm2022/cmat-pipes-secure.mjs +7 -13
- package/fesm2022/cmat-pipes-secure.mjs.map +1 -1
- package/fesm2022/cmat-pipes-uppercase.mjs +3 -3
- package/fesm2022/cmat-pipes-uppercase.mjs.map +1 -1
- package/fesm2022/cmat-services-alert.mjs +26 -27
- package/fesm2022/cmat-services-alert.mjs.map +1 -1
- package/fesm2022/cmat-services-config.mjs +14 -23
- package/fesm2022/cmat-services-config.mjs.map +1 -1
- package/fesm2022/cmat-services-confirmation.mjs +8 -8
- package/fesm2022/cmat-services-confirmation.mjs.map +1 -1
- package/fesm2022/cmat-services-data.mjs +6 -10
- package/fesm2022/cmat-services-data.mjs.map +1 -1
- package/fesm2022/cmat-services-export-as.mjs +3 -3
- package/fesm2022/cmat-services-export-as.mjs.map +1 -1
- package/fesm2022/cmat-services-loading.mjs +30 -47
- package/fesm2022/cmat-services-loading.mjs.map +1 -1
- package/fesm2022/cmat-services-local-storage.mjs +3 -3
- package/fesm2022/cmat-services-local-storage.mjs.map +1 -1
- package/fesm2022/cmat-services-media-watcher.mjs +43 -34
- package/fesm2022/cmat-services-media-watcher.mjs.map +1 -1
- package/fesm2022/cmat-services-platform.mjs +3 -3
- package/fesm2022/cmat-services-platform.mjs.map +1 -1
- package/fesm2022/cmat-services-splash-screen.mjs +3 -3
- package/fesm2022/cmat-services-splash-screen.mjs.map +1 -1
- package/fesm2022/cmat-services-title.mjs +3 -3
- package/fesm2022/cmat-services-title.mjs.map +1 -1
- package/fesm2022/cmat-services-translation.mjs +11 -11
- package/fesm2022/cmat-services-translation.mjs.map +1 -1
- package/fesm2022/cmat-services-utils.mjs +3 -3
- package/fesm2022/cmat-services-utils.mjs.map +1 -1
- package/fesm2022/cmat.mjs +9228 -7507
- package/fesm2022/cmat.mjs.map +1 -1
- package/icons/material-icons/heroicons-outline.svg +3 -0
- package/icons/material-icons/heroicons-solid.svg +3 -0
- package/package.json +10 -1
- package/styles/components/bundle.scss +21 -0
- package/styles/overrides/angular-material.scss +22 -1
- package/tailwind/plugins/theming.js +183 -183
- package/types/cmat-components-breadcrumb.d.ts +40 -37
- package/types/cmat-components-card.d.ts +11 -13
- package/types/cmat-components-carousel.d.ts +87 -113
- package/types/cmat-components-cascade.d.ts +84 -65
- package/types/cmat-components-chip-input.d.ts +29 -24
- package/types/cmat-components-code-editor.d.ts +28 -12
- package/types/cmat-components-color-picker.d.ts +236 -0
- package/types/cmat-components-custom-formly.d.ts +316 -184
- package/types/cmat-components-data-picker.d.ts +372 -0
- package/types/cmat-components-date-range.d.ts +31 -36
- package/types/cmat-components-date-time-display.d.ts +8 -8
- package/types/cmat-components-drawer.d.ts +30 -32
- package/types/cmat-components-empty-state.d.ts +9 -10
- package/types/cmat-components-file-preview.d.ts +9 -9
- package/types/cmat-components-filter-toolbar.d.ts +15 -15
- package/types/cmat-components-form-actions.d.ts +5 -5
- package/types/cmat-components-fullscreen.d.ts +5 -5
- package/types/cmat-components-highlight.d.ts +13 -14
- package/types/cmat-components-image-viewer.d.ts +29 -33
- package/types/cmat-components-inline-loading.d.ts +6 -6
- package/types/cmat-components-json-editor.d.ts +15 -17
- package/types/cmat-components-knob-input.d.ts +58 -55
- package/types/cmat-components-masonry.d.ts +9 -12
- package/types/cmat-components-material-color-picker.d.ts +16 -21
- package/types/cmat-components-material-datetimepicker.d.ts +174 -216
- package/types/cmat-components-navigation.d.ts +34 -39
- package/types/cmat-components-opt-input.d.ts +35 -33
- package/types/cmat-components-org-chart.d.ts +8 -9
- package/types/cmat-components-page-header.d.ts +9 -9
- package/types/cmat-components-pagination.d.ts +36 -40
- package/types/cmat-components-password-strength.d.ts +58 -64
- package/types/cmat-components-popover.d.ts +22 -32
- package/types/cmat-components-progress-bar.d.ts +7 -10
- package/types/cmat-components-qrcode.d.ts +22 -22
- package/types/cmat-components-rating.d.ts +17 -19
- package/types/cmat-components-rich-text-editor.d.ts +11 -12
- package/types/cmat-components-select-search.d.ts +48 -36
- package/types/cmat-components-select-table.d.ts +38 -34
- package/types/cmat-components-select-tree.d.ts +17 -15
- package/types/cmat-components-skeleton.d.ts +27 -10
- package/types/cmat-components-speed-dial.d.ts +24 -33
- package/types/cmat-components-status-tag.d.ts +19 -9
- package/types/cmat-components-table-toolbar.d.ts +7 -7
- package/types/cmat-components-timeline.d.ts +33 -34
- package/types/cmat-components-toast.d.ts +26 -30
- package/types/cmat-components-transfer-picker.d.ts +51 -56
- package/types/cmat-components-treetable.d.ts +12 -13
- package/types/cmat-components-upload.d.ts +33 -38
- package/types/cmat-components-x6-angular-shape.d.ts +1 -1
- package/types/cmat-directives-animate-on-scroll.d.ts +7 -7
- package/types/cmat-directives-arrow-cursor.d.ts +18 -20
- package/types/cmat-directives-data-exporter.d.ts +10 -10
- package/types/cmat-directives-debounce.d.ts +5 -5
- package/types/cmat-directives-digit-only.d.ts +13 -13
- package/types/cmat-directives-seamless-auto-scroll.d.ts +7 -7
- package/types/cmat-pipes-secure.d.ts +1 -3
- package/types/cmat-services-alert.d.ts +11 -12
- package/types/cmat-services-config.d.ts +2 -7
- package/types/cmat-services-confirmation.d.ts +2 -2
- package/types/cmat-services-data.d.ts +0 -1
- package/types/cmat-services-loading.d.ts +14 -22
- package/types/cmat-services-media-watcher.d.ts +5 -5
- package/types/cmat-services-translation.d.ts +4 -5
- package/types/cmat.d.ts +2167 -1746
|
@@ -2,7 +2,7 @@ import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
|
2
2
|
import * as i4 from '@angular/common';
|
|
3
3
|
import { CommonModule } from '@angular/common';
|
|
4
4
|
import * as i0 from '@angular/core';
|
|
5
|
-
import {
|
|
5
|
+
import { input, output, viewChild, viewChildren, signal, inject, DestroyRef, effect, untracked, Input, HostListener, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
6
6
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
7
7
|
import * as i3 from '@angular/forms';
|
|
8
8
|
import { FormControl, NgControl, FormGroup, ReactiveFormsModule } from '@angular/forms';
|
|
@@ -13,52 +13,102 @@ import { MatIconModule } from '@angular/material/icon';
|
|
|
13
13
|
import * as i7 from '@angular/material/input';
|
|
14
14
|
import { MatInputModule } from '@angular/material/input';
|
|
15
15
|
import * as i2 from '@angular/material/select';
|
|
16
|
-
import {
|
|
16
|
+
import { MatOption, MatSelectModule } from '@angular/material/select';
|
|
17
17
|
import * as i8 from '@angular/material/sort';
|
|
18
|
-
import {
|
|
18
|
+
import { MatSort, MatSortModule } from '@angular/material/sort';
|
|
19
19
|
import * as i6 from '@angular/material/table';
|
|
20
|
-
import {
|
|
20
|
+
import { MatTable, MatTableModule } from '@angular/material/table';
|
|
21
21
|
import { CmatSelectSearchComponent } from 'cmat/components/select-search';
|
|
22
22
|
import { CmatDigitOnlyDirective } from 'cmat/directives/digit-only';
|
|
23
|
-
import {
|
|
23
|
+
import { isNil, isArray, isNumber, isString } from 'lodash-es';
|
|
24
24
|
import { Subject, merge, debounceTime } from 'rxjs';
|
|
25
25
|
|
|
26
26
|
/* eslint-disable @typescript-eslint/member-ordering */
|
|
27
27
|
const MAX_SAFE_INTEGER = 9007199254740991;
|
|
28
28
|
let NEXT_ID = 0;
|
|
29
29
|
class CmatSelectTableComponent {
|
|
30
|
+
get focused() {
|
|
31
|
+
return this._focusedSignal();
|
|
32
|
+
}
|
|
33
|
+
get touched() {
|
|
34
|
+
return this._touchedSignal();
|
|
35
|
+
}
|
|
30
36
|
constructor() {
|
|
31
37
|
this.id = `cmat-select-table-${NEXT_ID++}`;
|
|
32
|
-
this.
|
|
33
|
-
|
|
34
|
-
this.
|
|
35
|
-
|
|
36
|
-
this.
|
|
37
|
-
|
|
38
|
-
this.
|
|
38
|
+
this.dataSource = input(/* @ts-ignore */
|
|
39
|
+
...(ngDevMode ? [undefined, { debugName: "dataSource" }] : /* istanbul ignore next */ []));
|
|
40
|
+
this.noEntriesFoundLabel = input('无结果', /* @ts-ignore */
|
|
41
|
+
...(ngDevMode ? [{ debugName: "noEntriesFoundLabel" }] : /* istanbul ignore next */ []));
|
|
42
|
+
this.showNoFoundLabel = input(true, /* @ts-ignore */
|
|
43
|
+
...(ngDevMode ? [{ debugName: "showNoFoundLabel" }] : /* istanbul ignore next */ []));
|
|
44
|
+
this.isPhone = input(false, /* @ts-ignore */
|
|
45
|
+
...(ngDevMode ? [{ debugName: "isPhone" }] : /* istanbul ignore next */ []));
|
|
46
|
+
this.multiple = input(false, /* @ts-ignore */
|
|
47
|
+
...(ngDevMode ? [{ debugName: "multiple" }] : /* istanbul ignore next */ []));
|
|
48
|
+
this.overallSearchEnabled = input(true, /* @ts-ignore */
|
|
49
|
+
...(ngDevMode ? [{ debugName: "overallSearchEnabled" }] : /* istanbul ignore next */ []));
|
|
50
|
+
this.overallSearchVisible = input(/* @ts-ignore */
|
|
51
|
+
...(ngDevMode ? [undefined, { debugName: "overallSearchVisible" }] : /* istanbul ignore next */ []));
|
|
52
|
+
this.resetSortOnOpen = input(/* @ts-ignore */
|
|
53
|
+
...(ngDevMode ? [undefined, { debugName: "resetSortOnOpen" }] : /* istanbul ignore next */ []));
|
|
54
|
+
this.resetFiltersOnOpen = input(/* @ts-ignore */
|
|
55
|
+
...(ngDevMode ? [undefined, { debugName: "resetFiltersOnOpen" }] : /* istanbul ignore next */ []));
|
|
56
|
+
this.customTriggerLabelFn = input(/* @ts-ignore */
|
|
57
|
+
...(ngDevMode ? [undefined, { debugName: "customTriggerLabelFn" }] : /* istanbul ignore next */ []));
|
|
58
|
+
this.triggerLabelSort = input(/* @ts-ignore */
|
|
59
|
+
...(ngDevMode ? [undefined, { debugName: "triggerLabelSort" }] : /* istanbul ignore next */ []));
|
|
60
|
+
this.customTriggerLabelTemplate = input(/* @ts-ignore */
|
|
61
|
+
...(ngDevMode ? [undefined, { debugName: "customTriggerLabelTemplate" }] : /* istanbul ignore next */ []));
|
|
62
|
+
this.canNull = input(/* @ts-ignore */
|
|
63
|
+
...(ngDevMode ? [undefined, { debugName: "canNull" }] : /* istanbul ignore next */ []));
|
|
64
|
+
this.defaultSort = input(/* @ts-ignore */
|
|
65
|
+
...(ngDevMode ? [undefined, { debugName: "defaultSort" }] : /* istanbul ignore next */ []));
|
|
66
|
+
this.resetOptionAction = input(/* @ts-ignore */
|
|
67
|
+
...(ngDevMode ? [undefined, { debugName: "resetOptionAction" }] : /* istanbul ignore next */ []));
|
|
68
|
+
this.keyParam = input('id', /* @ts-ignore */
|
|
69
|
+
...(ngDevMode ? [{ debugName: "keyParam" }] : /* istanbul ignore next */ []));
|
|
70
|
+
this.compareWith = input((o1, o2) => {
|
|
39
71
|
return o1 && o2 ? o1?.name === o2?.name && o1?.id === o2?.id : o1 === o2;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
this.
|
|
43
|
-
this.
|
|
72
|
+
}, /* @ts-ignore */
|
|
73
|
+
...(ngDevMode ? [{ debugName: "compareWith" }] : /* istanbul ignore next */ []));
|
|
74
|
+
this.closed = output();
|
|
75
|
+
this._matSelectSearch = viewChild(CmatSelectSearchComponent, /* @ts-ignore */
|
|
76
|
+
...(ngDevMode ? [{ debugName: "_matSelectSearch" }] : /* istanbul ignore next */ []));
|
|
77
|
+
this._sort = viewChild(MatSort, /* @ts-ignore */
|
|
78
|
+
...(ngDevMode ? [{ debugName: "_sort" }] : /* istanbul ignore next */ []));
|
|
79
|
+
this._table = viewChild(MatTable, /* @ts-ignore */
|
|
80
|
+
...(ngDevMode ? [{ debugName: "_table" }] : /* istanbul ignore next */ []));
|
|
81
|
+
this._matOptions = viewChildren(MatOption, /* @ts-ignore */
|
|
82
|
+
...(ngDevMode ? [{ debugName: "_matOptions" }] : /* istanbul ignore next */ []));
|
|
83
|
+
this._matSelectSignal = viewChild('componentSelect', /* @ts-ignore */
|
|
84
|
+
...(ngDevMode ? [{ debugName: "_matSelectSignal" }] : /* istanbul ignore next */ []));
|
|
85
|
+
this.tableDataSource = signal([], /* @ts-ignore */
|
|
86
|
+
...(ngDevMode ? [{ debugName: "tableDataSource" }] : /* istanbul ignore next */ []));
|
|
87
|
+
this.tableColumns = signal([], /* @ts-ignore */
|
|
88
|
+
...(ngDevMode ? [{ debugName: "tableColumns" }] : /* istanbul ignore next */ []));
|
|
44
89
|
this._rowById = new Map();
|
|
45
90
|
this._columnKeys = [];
|
|
46
91
|
this.completeRowList = [];
|
|
47
|
-
this.overallSearchVisibleState = signal(false,
|
|
92
|
+
this.overallSearchVisibleState = signal(false, /* @ts-ignore */
|
|
93
|
+
...(ngDevMode ? [{ debugName: "overallSearchVisibleState" }] : /* istanbul ignore next */ []));
|
|
48
94
|
this.overallFilterControl = new FormControl('');
|
|
49
95
|
this.selectControl = new FormControl();
|
|
50
96
|
this.stateChanges = new Subject();
|
|
51
|
-
this.
|
|
52
|
-
|
|
97
|
+
this._focusedSignal = signal(false, /* @ts-ignore */
|
|
98
|
+
...(ngDevMode ? [{ debugName: "_focusedSignal" }] : /* istanbul ignore next */ []));
|
|
99
|
+
this._touchedSignal = signal(false, /* @ts-ignore */
|
|
100
|
+
...(ngDevMode ? [{ debugName: "_touchedSignal" }] : /* istanbul ignore next */ []));
|
|
101
|
+
this._placeholderSignal = signal('', /* @ts-ignore */
|
|
102
|
+
...(ngDevMode ? [{ debugName: "_placeholderSignal" }] : /* istanbul ignore next */ []));
|
|
103
|
+
this._disabledSignal = signal(false, /* @ts-ignore */
|
|
104
|
+
...(ngDevMode ? [{ debugName: "_disabledSignal" }] : /* istanbul ignore next */ []));
|
|
105
|
+
this._requiredSignal = signal(false, /* @ts-ignore */
|
|
106
|
+
...(ngDevMode ? [{ debugName: "_requiredSignal" }] : /* istanbul ignore next */ []));
|
|
53
107
|
this.ngControl = inject(NgControl, { optional: true, self: true });
|
|
54
108
|
this._destroyRef = inject(DestroyRef);
|
|
55
109
|
this._nullRow = { id: null };
|
|
56
110
|
this._completeValueList = [];
|
|
57
|
-
this._placeholder = '';
|
|
58
111
|
this._value = null;
|
|
59
|
-
this._required = false;
|
|
60
|
-
this._disabled = false;
|
|
61
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
62
112
|
this._onModelChange = () => { };
|
|
63
113
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
64
114
|
this._onTouchedChange = () => { };
|
|
@@ -67,96 +117,72 @@ class CmatSelectTableComponent {
|
|
|
67
117
|
}
|
|
68
118
|
this.tableColumnsMap = new Map();
|
|
69
119
|
this._filterControls = new FormGroup({});
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
120
|
+
effect(() => {
|
|
121
|
+
const matSelect = this._matSelectSignal();
|
|
122
|
+
if (matSelect && !this._matSelect) {
|
|
123
|
+
this._matSelect = matSelect;
|
|
124
|
+
untracked(() => {
|
|
125
|
+
this._init(this.value);
|
|
126
|
+
});
|
|
127
|
+
this._matSelect.setDisabledState(this._disabledSignal());
|
|
128
|
+
this._setPanelClass();
|
|
129
|
+
}
|
|
130
|
+
else if (matSelect && this._matSelect !== matSelect) {
|
|
131
|
+
this._matSelect = matSelect;
|
|
132
|
+
this._setPanelClass();
|
|
133
|
+
}
|
|
134
|
+
});
|
|
78
135
|
}
|
|
79
136
|
clickedOut() {
|
|
80
137
|
if (!this._matSelect?.panelOpen) {
|
|
81
|
-
this.
|
|
138
|
+
this._focusedSignal.set(false);
|
|
82
139
|
this.stateChanges.next();
|
|
83
140
|
}
|
|
84
141
|
}
|
|
85
142
|
ngAfterViewInit() {
|
|
86
|
-
|
|
87
|
-
if (
|
|
88
|
-
|
|
89
|
-
this._matSelect.panelClass = [this.matSelect.panelClass, ...panelClass];
|
|
90
|
-
}
|
|
91
|
-
else if (typeof this._matSelect.panelClass === 'string') {
|
|
92
|
-
this._matSelect.panelClass = [this._matSelect.panelClass, ...panelClass];
|
|
93
|
-
}
|
|
94
|
-
else if (typeof this._matSelect.panelClass === 'object') {
|
|
95
|
-
const panelClassObject = this._matSelect.panelClass;
|
|
96
|
-
panelClass.forEach((i) => {
|
|
97
|
-
panelClassObject[i] = true;
|
|
98
|
-
});
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
else {
|
|
102
|
-
this._matSelect.panelClass = panelClass;
|
|
143
|
+
const sortInstance = this._sort();
|
|
144
|
+
if (!sortInstance) {
|
|
145
|
+
return;
|
|
103
146
|
}
|
|
104
147
|
merge(...[
|
|
105
|
-
|
|
148
|
+
sortInstance.sortChange,
|
|
106
149
|
this._filterControls.valueChanges,
|
|
107
|
-
this.overallFilterControl.valueChanges
|
|
150
|
+
this.overallFilterControl.valueChanges,
|
|
108
151
|
])
|
|
109
|
-
.pipe(takeUntilDestroyed(this._destroyRef), debounceTime(
|
|
152
|
+
.pipe(takeUntilDestroyed(this._destroyRef), debounceTime(300))
|
|
110
153
|
.subscribe(() => {
|
|
111
|
-
const dataClone = [
|
|
154
|
+
const dataClone = [
|
|
155
|
+
...((this.dataSource() ?? { data: [] }).data || []),
|
|
156
|
+
];
|
|
112
157
|
if (this.addNullRow()) {
|
|
113
158
|
dataClone.unshift(this._nullRow);
|
|
114
159
|
}
|
|
115
|
-
if (this.overallSearchEnabled && this.overallSearchVisibleState()) {
|
|
160
|
+
if (this.overallSearchEnabled() && this.overallSearchVisibleState()) {
|
|
116
161
|
this._applyOverallFilter(dataClone);
|
|
117
162
|
}
|
|
118
163
|
else {
|
|
119
164
|
this._applyColumnLevelFilters(dataClone);
|
|
120
165
|
}
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
dataClone : this._sortData(dataClone, this._sort.active, this._sort.direction));
|
|
127
|
-
});
|
|
128
|
-
this._matOptions.changes.pipe(takeUntilDestroyed(this._destroyRef)).subscribe(() => {
|
|
129
|
-
const options = {};
|
|
130
|
-
this._matOptions
|
|
131
|
-
.toArray()
|
|
132
|
-
.filter(option => !isNil(option) && !isNil(option.value) && !option._getHostElement().classList.contains('contains-cmat-select-search'))
|
|
133
|
-
.forEach((option) => {
|
|
134
|
-
const row = option.value;
|
|
135
|
-
options[`${row.id}`] = option;
|
|
136
|
-
});
|
|
137
|
-
const tableOptions = this._buildTableOptions(options);
|
|
138
|
-
this._matSelect?.options.reset(this._matSelectSearch ? [this._matOptions.first, ...tableOptions] : tableOptions);
|
|
139
|
-
try {
|
|
140
|
-
this._matSelect?.options.notifyOnChanges();
|
|
141
|
-
const value = this.multiple
|
|
142
|
-
? (this.completeRowList.length > 0 ? [...this.completeRowList] : null)
|
|
143
|
-
: (this.completeRowList.length > 0 ? { ...this.completeRowList[0] } : null);
|
|
144
|
-
this._matSelect.writeValue(value);
|
|
145
|
-
this._matSelect._onChange(value);
|
|
146
|
-
}
|
|
147
|
-
catch {
|
|
148
|
-
return;
|
|
166
|
+
const currentSort = this._sort();
|
|
167
|
+
const defaultSort = this.defaultSort();
|
|
168
|
+
if (currentSort && !currentSort.active && !isNil(defaultSort) && defaultSort.active) {
|
|
169
|
+
currentSort.active = defaultSort.active;
|
|
170
|
+
currentSort.direction = defaultSort.direction;
|
|
149
171
|
}
|
|
172
|
+
const sortedData = !currentSort?.active
|
|
173
|
+
? dataClone
|
|
174
|
+
: this._sortData(dataClone, currentSort.active, currentSort.direction);
|
|
175
|
+
this.tableDataSource.set(sortedData);
|
|
150
176
|
});
|
|
151
177
|
}
|
|
152
178
|
ngOnDestroy() {
|
|
153
179
|
this.stateChanges.complete();
|
|
154
180
|
}
|
|
155
181
|
get placeholder() {
|
|
156
|
-
return this.
|
|
182
|
+
return this._placeholderSignal();
|
|
157
183
|
}
|
|
158
184
|
set placeholder(value) {
|
|
159
|
-
this.
|
|
185
|
+
this._placeholderSignal.set(value);
|
|
160
186
|
this.stateChanges.next();
|
|
161
187
|
}
|
|
162
188
|
get value() {
|
|
@@ -178,23 +204,26 @@ class CmatSelectTableComponent {
|
|
|
178
204
|
return (this.touched && this.ngControl?.invalid) ?? false;
|
|
179
205
|
}
|
|
180
206
|
get shouldLabelFloat() {
|
|
181
|
-
return this.
|
|
207
|
+
return this._focusedSignal() || !this.empty;
|
|
208
|
+
}
|
|
209
|
+
get required() {
|
|
210
|
+
return this._requiredSignal();
|
|
182
211
|
}
|
|
183
|
-
get required() { return this._required; }
|
|
184
212
|
set required(value) {
|
|
185
|
-
this.
|
|
213
|
+
this._requiredSignal.set(coerceBooleanProperty(value));
|
|
186
214
|
this.stateChanges.next();
|
|
187
215
|
}
|
|
188
216
|
get disabled() {
|
|
189
217
|
if (!isNil(this.ngControl?.disabled)) {
|
|
190
218
|
return this.ngControl.disabled;
|
|
191
219
|
}
|
|
192
|
-
return this.
|
|
220
|
+
return this._disabledSignal();
|
|
193
221
|
}
|
|
194
222
|
set disabled(value) {
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
223
|
+
const isDisabled = coerceBooleanProperty(value);
|
|
224
|
+
this._disabledSignal.set(isDisabled);
|
|
225
|
+
if (this._focusedSignal() && isDisabled) {
|
|
226
|
+
this._focusedSignal.set(false);
|
|
198
227
|
this.stateChanges.next();
|
|
199
228
|
}
|
|
200
229
|
}
|
|
@@ -206,26 +235,29 @@ class CmatSelectTableComponent {
|
|
|
206
235
|
this._matSelect?.registerOnTouched(fn);
|
|
207
236
|
}
|
|
208
237
|
setDisabledState(isDisabled) {
|
|
238
|
+
this._disabledSignal.set(isDisabled);
|
|
209
239
|
this._matSelect?.setDisabledState(isDisabled);
|
|
210
240
|
}
|
|
211
241
|
setDescribedByIds(ids) {
|
|
212
242
|
this._matSelect?.setDescribedByIds(ids);
|
|
213
243
|
}
|
|
214
244
|
onContainerClick() {
|
|
215
|
-
if (!this.
|
|
245
|
+
if (!this._focusedSignal()) {
|
|
216
246
|
this._matSelect?.focus();
|
|
217
247
|
}
|
|
218
248
|
}
|
|
219
249
|
onFocusIn() {
|
|
220
|
-
if (!this.
|
|
221
|
-
this.
|
|
250
|
+
if (!this._focusedSignal()) {
|
|
251
|
+
this._focusedSignal.set(true);
|
|
222
252
|
this.stateChanges.next();
|
|
223
253
|
}
|
|
224
254
|
}
|
|
225
255
|
onFocusOut(event) {
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
256
|
+
const matSelectPanel = this._matSelect?.panel?.nativeElement;
|
|
257
|
+
if (matSelectPanel &&
|
|
258
|
+
!(matSelectPanel).contains(event.relatedTarget)) {
|
|
259
|
+
this._touchedSignal.set(true);
|
|
260
|
+
this._focusedSignal.set(false);
|
|
229
261
|
this._onTouchedChange();
|
|
230
262
|
this.stateChanges.next();
|
|
231
263
|
}
|
|
@@ -234,11 +266,13 @@ class CmatSelectTableComponent {
|
|
|
234
266
|
this._init(value);
|
|
235
267
|
}
|
|
236
268
|
ngOnChanges(changes) {
|
|
237
|
-
if (!isNil(changes.resetFiltersOnOpen) &&
|
|
269
|
+
if (!isNil(changes.resetFiltersOnOpen) &&
|
|
270
|
+
changes.resetFiltersOnOpen.currentValue !== false) {
|
|
238
271
|
this._resetFilters();
|
|
239
272
|
}
|
|
240
273
|
if (!isNil(changes.dataSource) && !isNil(changes.dataSource.currentValue)) {
|
|
241
|
-
const currentDataSource = changes.dataSource
|
|
274
|
+
const currentDataSource = changes.dataSource
|
|
275
|
+
.currentValue;
|
|
242
276
|
if (!isArray(currentDataSource.data)) {
|
|
243
277
|
return;
|
|
244
278
|
}
|
|
@@ -268,7 +302,9 @@ class CmatSelectTableComponent {
|
|
|
268
302
|
return;
|
|
269
303
|
}
|
|
270
304
|
let rowElement = event.target;
|
|
271
|
-
while (rowElement != null &&
|
|
305
|
+
while (rowElement != null &&
|
|
306
|
+
rowElement instanceof HTMLElement &&
|
|
307
|
+
rowElement.tagName.toLowerCase() !== 'tr') {
|
|
272
308
|
rowElement = rowElement.parentElement;
|
|
273
309
|
}
|
|
274
310
|
if (rowElement === null) {
|
|
@@ -285,10 +321,15 @@ class CmatSelectTableComponent {
|
|
|
285
321
|
if (!option) {
|
|
286
322
|
return;
|
|
287
323
|
}
|
|
288
|
-
|
|
324
|
+
const multiple = this.multiple();
|
|
325
|
+
if (multiple && this._matSelect.panelOpen) {
|
|
289
326
|
this._updateCompleteRowList(option.value, option.selected);
|
|
327
|
+
// 同步更新 selectControl 以触发 UI 更新
|
|
328
|
+
if (this.selectControl) {
|
|
329
|
+
this.selectControl.setValue([...this.completeRowList], { emitEvent: false });
|
|
330
|
+
}
|
|
290
331
|
}
|
|
291
|
-
if (!
|
|
332
|
+
if (!multiple) {
|
|
292
333
|
this.completeRowList.splice(0);
|
|
293
334
|
this._completeValueList.splice(0);
|
|
294
335
|
if (option.value) {
|
|
@@ -299,12 +340,18 @@ class CmatSelectTableComponent {
|
|
|
299
340
|
}
|
|
300
341
|
}
|
|
301
342
|
openedChange(opened) {
|
|
302
|
-
|
|
343
|
+
const overallSearchEnabled = this.overallSearchEnabled();
|
|
344
|
+
if (this.resetFiltersOnOpen() !== false ||
|
|
345
|
+
(!this._matOptions().length && overallSearchEnabled) ||
|
|
346
|
+
(overallSearchEnabled && this._matOptions().length === 1)) {
|
|
303
347
|
this._resetFilters();
|
|
304
348
|
}
|
|
305
|
-
this.overallSearchVisibleState.set(!!this.overallSearchVisible);
|
|
306
|
-
if (this.resetSortOnOpen !== false) {
|
|
307
|
-
this._sort
|
|
349
|
+
this.overallSearchVisibleState.set(!!this.overallSearchVisible());
|
|
350
|
+
if (this.resetSortOnOpen() !== false) {
|
|
351
|
+
const sortInstance = this._sort();
|
|
352
|
+
if (sortInstance) {
|
|
353
|
+
sortInstance.sort({ id: '', start: 'asc', disableClear: false });
|
|
354
|
+
}
|
|
308
355
|
}
|
|
309
356
|
if (!opened) {
|
|
310
357
|
this.value = this._getCommittedValue();
|
|
@@ -317,8 +364,11 @@ class CmatSelectTableComponent {
|
|
|
317
364
|
this.closed.emit(!opened);
|
|
318
365
|
return;
|
|
319
366
|
}
|
|
320
|
-
const
|
|
321
|
-
|
|
367
|
+
const tableInstance = this._table();
|
|
368
|
+
if (tableInstance) {
|
|
369
|
+
const table = tableInstance;
|
|
370
|
+
table._headerRowDefChanged = true;
|
|
371
|
+
}
|
|
322
372
|
setTimeout(() => this._expandPanelForTableRows(), 1);
|
|
323
373
|
}
|
|
324
374
|
filterFormControl(key) {
|
|
@@ -332,17 +382,21 @@ class CmatSelectTableComponent {
|
|
|
332
382
|
return rows.map(row => this._resolveTriggerLabel(row)).join(', ');
|
|
333
383
|
}
|
|
334
384
|
getTriggerLabel() {
|
|
335
|
-
return this.customTriggerLabelFn?.(this.completeRowList) ??
|
|
385
|
+
return (this.customTriggerLabelFn()?.(this.completeRowList) ??
|
|
386
|
+
this.simpleTriggerLabelFn(this.completeRowList));
|
|
336
387
|
}
|
|
337
388
|
toggleOverallSearch() {
|
|
338
389
|
this.overallSearchVisibleState.update(value => !value);
|
|
339
390
|
this._resetFilters();
|
|
340
391
|
if (this.overallSearchVisibleState()) {
|
|
341
|
-
|
|
392
|
+
const searchInstance = this._matSelectSearch();
|
|
393
|
+
if (searchInstance) {
|
|
394
|
+
setTimeout(() => searchInstance.focus());
|
|
395
|
+
}
|
|
342
396
|
}
|
|
343
397
|
}
|
|
344
398
|
addNullRow() {
|
|
345
|
-
return !this.multiple && this.canNull;
|
|
399
|
+
return !this.multiple() && (this.canNull() ?? false);
|
|
346
400
|
}
|
|
347
401
|
get hasNullRow() {
|
|
348
402
|
return this.addNullRow();
|
|
@@ -351,18 +405,24 @@ class CmatSelectTableComponent {
|
|
|
351
405
|
this.completeRowList.splice(0);
|
|
352
406
|
this._completeValueList.splice(0);
|
|
353
407
|
if (value) {
|
|
354
|
-
|
|
408
|
+
const multiple = this.multiple();
|
|
409
|
+
if (multiple && Array.isArray(value)) {
|
|
355
410
|
value.forEach((v) => this._updateCompleteRowList(v, true));
|
|
356
411
|
}
|
|
357
|
-
else if (!
|
|
412
|
+
else if (!multiple) {
|
|
358
413
|
this._updateCompleteRowList(value, true);
|
|
359
414
|
}
|
|
360
415
|
}
|
|
361
|
-
this.value =
|
|
416
|
+
this.value =
|
|
417
|
+
this.completeRowList.length > 0 ? [...this.completeRowList] : value;
|
|
362
418
|
if (this._matSelect) {
|
|
363
419
|
this._matSelect.writeValue(this.value);
|
|
364
420
|
this._matSelect._onChange(this.value);
|
|
365
421
|
}
|
|
422
|
+
// 确保 selectControl 与当前值同步
|
|
423
|
+
if (this.selectControl) {
|
|
424
|
+
this.selectControl.setValue(this.value, { emitEvent: false });
|
|
425
|
+
}
|
|
366
426
|
}
|
|
367
427
|
_updateCompleteRowList(value, selected) {
|
|
368
428
|
if (isNil(value)) {
|
|
@@ -377,7 +437,7 @@ class CmatSelectTableComponent {
|
|
|
377
437
|
if (!row) {
|
|
378
438
|
return;
|
|
379
439
|
}
|
|
380
|
-
const exists = this.completeRowList.some(item => item[this.keyParam] === row[this.keyParam]);
|
|
440
|
+
const exists = this.completeRowList.some(item => item[this.keyParam()] === row[this.keyParam()]);
|
|
381
441
|
if (!exists) {
|
|
382
442
|
this.completeRowList.push(row);
|
|
383
443
|
this._completeValueList.push(row.id);
|
|
@@ -403,17 +463,17 @@ class CmatSelectTableComponent {
|
|
|
403
463
|
.filter((key) => {
|
|
404
464
|
const filterControl = this._filterControls.get(key);
|
|
405
465
|
const value = filterControl?.value;
|
|
406
|
-
return !isNil(value)
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
466
|
+
return (!isNil(value) &&
|
|
467
|
+
((isArray(value) && value.length > 0) ||
|
|
468
|
+
(typeof value === 'string' && value.trim().length > 0) ||
|
|
469
|
+
(typeof value === 'number' && `${value}`.trim().length > 0)));
|
|
410
470
|
})
|
|
411
471
|
.forEach((key) => {
|
|
412
472
|
const column = this.tableColumnsMap.get(key);
|
|
413
473
|
const filterControl = this._filterControls.get(key);
|
|
414
474
|
filters[key] = {
|
|
415
475
|
filter: column?.filter,
|
|
416
|
-
value: filterControl?.value
|
|
476
|
+
value: filterControl?.value,
|
|
417
477
|
};
|
|
418
478
|
});
|
|
419
479
|
const filterKeys = Object.keys(filters);
|
|
@@ -455,7 +515,9 @@ class CmatSelectTableComponent {
|
|
|
455
515
|
}
|
|
456
516
|
const cellValueLC = typeof cellValue === 'string'
|
|
457
517
|
? cellValue.toLowerCase()
|
|
458
|
-
: typeof cellValue === 'number' ||
|
|
518
|
+
: typeof cellValue === 'number' ||
|
|
519
|
+
typeof cellValue === 'boolean' ||
|
|
520
|
+
typeof cellValue === 'bigint'
|
|
459
521
|
? String(cellValue).toLowerCase()
|
|
460
522
|
: '';
|
|
461
523
|
if (cellValueLC.includes(filterValueLC)) {
|
|
@@ -470,8 +532,7 @@ class CmatSelectTableComponent {
|
|
|
470
532
|
}
|
|
471
533
|
_resetFilters() {
|
|
472
534
|
this.overallFilterControl.setValue('');
|
|
473
|
-
Object.keys(this._filterControls.controls)
|
|
474
|
-
.forEach(key => this._filterControls.get(key)?.setValue(''));
|
|
535
|
+
Object.keys(this._filterControls.controls).forEach(key => this._filterControls.get(key)?.setValue(''));
|
|
475
536
|
}
|
|
476
537
|
_sortingDataAccessor(data, active) {
|
|
477
538
|
const value = data[active];
|
|
@@ -510,23 +571,26 @@ class CmatSelectTableComponent {
|
|
|
510
571
|
bValue = bValue.getTime();
|
|
511
572
|
}
|
|
512
573
|
if (isString(aValue) && isString(bValue)) {
|
|
513
|
-
return
|
|
574
|
+
return aValue.localeCompare(bValue) * (direction === 'asc' ? 1 : -1);
|
|
514
575
|
}
|
|
515
576
|
aValue = isNaN(aValue) ? `${aValue}` : +aValue;
|
|
516
577
|
bValue = isNaN(bValue) ? `${bValue}` : +bValue;
|
|
517
578
|
if (isString(aValue) && isNumber(bValue)) {
|
|
518
|
-
return
|
|
579
|
+
return 1 * (direction === 'asc' ? 1 : -1);
|
|
519
580
|
}
|
|
520
581
|
if (isNumber(aValue) && isString(bValue)) {
|
|
521
|
-
return
|
|
582
|
+
return -1 * (direction === 'asc' ? 1 : -1);
|
|
522
583
|
}
|
|
523
584
|
return (aValue > bValue ? 1 : -1) * (direction === 'asc' ? 1 : -1);
|
|
524
585
|
});
|
|
525
586
|
}
|
|
526
587
|
_checkAndResetSelection() {
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
this.
|
|
588
|
+
const resetOptionAction = this.resetOptionAction();
|
|
589
|
+
if (this._matSelect.value &&
|
|
590
|
+
isArray(this._matSelect.value) &&
|
|
591
|
+
this._matSelect.value.length < 1 &&
|
|
592
|
+
!isNil(resetOptionAction)) {
|
|
593
|
+
resetOptionAction();
|
|
530
594
|
}
|
|
531
595
|
}
|
|
532
596
|
_matchesColumnFilter(row, filterKey, filter) {
|
|
@@ -556,7 +620,8 @@ class CmatSelectTableComponent {
|
|
|
556
620
|
if (isNil(comparator) || comparator === 'equals') {
|
|
557
621
|
return normalizedFilterValue === cellValue;
|
|
558
622
|
}
|
|
559
|
-
if (typeof cellValue !== 'string' ||
|
|
623
|
+
if (typeof cellValue !== 'string' ||
|
|
624
|
+
typeof normalizedFilterValue !== 'string') {
|
|
560
625
|
return false;
|
|
561
626
|
}
|
|
562
627
|
const cellValueLC = cellValue.toLowerCase();
|
|
@@ -578,18 +643,8 @@ class CmatSelectTableComponent {
|
|
|
578
643
|
}
|
|
579
644
|
return true;
|
|
580
645
|
}
|
|
581
|
-
_buildTableOptions(options) {
|
|
582
|
-
const tableOptions = [];
|
|
583
|
-
for (const row of this.tableDataSource()) {
|
|
584
|
-
const rowOption = options[String(row.id)];
|
|
585
|
-
if (!isNil(rowOption)) {
|
|
586
|
-
tableOptions.push(rowOption);
|
|
587
|
-
}
|
|
588
|
-
}
|
|
589
|
-
return tableOptions;
|
|
590
|
-
}
|
|
591
646
|
_getMatOptionById(id) {
|
|
592
|
-
return this._matOptions.find(option => option.id === id);
|
|
647
|
+
return this._matOptions().find(option => option.id === id);
|
|
593
648
|
}
|
|
594
649
|
getFilterContext(column) {
|
|
595
650
|
return { column };
|
|
@@ -599,9 +654,20 @@ class CmatSelectTableComponent {
|
|
|
599
654
|
}
|
|
600
655
|
_expandPanelForTableRows() {
|
|
601
656
|
let tableAdditionalHeight = 0;
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
657
|
+
const tableInstance = this._table();
|
|
658
|
+
if (!tableInstance) {
|
|
659
|
+
return;
|
|
660
|
+
}
|
|
661
|
+
tableInstance
|
|
662
|
+
._getRenderedRows(tableInstance._headerRowOutlet)
|
|
663
|
+
.forEach(row => (tableAdditionalHeight += row.getBoundingClientRect().height));
|
|
664
|
+
tableInstance
|
|
665
|
+
._getRenderedRows(tableInstance._footerRowOutlet)
|
|
666
|
+
.forEach(row => (tableAdditionalHeight += row.getBoundingClientRect().height));
|
|
667
|
+
const panelElement = this._matSelect?.panel?.nativeElement;
|
|
668
|
+
if (!panelElement) {
|
|
669
|
+
return;
|
|
670
|
+
}
|
|
605
671
|
const panelHeight = panelElement.getBoundingClientRect().height;
|
|
606
672
|
if (!isNaN(panelHeight)) {
|
|
607
673
|
panelElement.style.maxHeight = `${panelHeight + tableAdditionalHeight}px`;
|
|
@@ -611,20 +677,27 @@ class CmatSelectTableComponent {
|
|
|
611
677
|
if (this.completeRowList.length === 0) {
|
|
612
678
|
return null;
|
|
613
679
|
}
|
|
614
|
-
return this.multiple
|
|
680
|
+
return this.multiple()
|
|
681
|
+
? [...this.completeRowList]
|
|
682
|
+
: { ...this.completeRowList[0] };
|
|
615
683
|
}
|
|
616
684
|
_syncMatSelectValue(value) {
|
|
617
685
|
this._matSelect.writeValue(value);
|
|
618
686
|
this._matSelect._onChange(value);
|
|
619
687
|
}
|
|
620
688
|
_removeFilteredRow(data, index) {
|
|
621
|
-
data
|
|
689
|
+
data
|
|
690
|
+
.splice(index, 1)
|
|
691
|
+
.forEach(item => (this.filteredOutRows[`${item.id}`] = item));
|
|
622
692
|
}
|
|
623
693
|
_resolveTriggerLabel(row) {
|
|
624
694
|
if (isNil(row)) {
|
|
625
695
|
return '';
|
|
626
696
|
}
|
|
627
|
-
const
|
|
697
|
+
const customTriggerLabelTemplate = this.customTriggerLabelTemplate();
|
|
698
|
+
const template = typeof customTriggerLabelTemplate === 'string'
|
|
699
|
+
? customTriggerLabelTemplate.trim()
|
|
700
|
+
: '';
|
|
628
701
|
if (template.length === 0) {
|
|
629
702
|
return `${row.id}`;
|
|
630
703
|
}
|
|
@@ -635,7 +708,10 @@ class CmatSelectTableComponent {
|
|
|
635
708
|
if (isNil(value)) {
|
|
636
709
|
return '';
|
|
637
710
|
}
|
|
638
|
-
if (typeof value !== 'string' &&
|
|
711
|
+
if (typeof value !== 'string' &&
|
|
712
|
+
typeof value !== 'number' &&
|
|
713
|
+
typeof value !== 'boolean' &&
|
|
714
|
+
typeof value !== 'bigint') {
|
|
639
715
|
return '';
|
|
640
716
|
}
|
|
641
717
|
hasMatch = true;
|
|
@@ -644,76 +720,63 @@ class CmatSelectTableComponent {
|
|
|
644
720
|
return hasMatch ? substitution.trim() : `${row.id}`;
|
|
645
721
|
}
|
|
646
722
|
_getTriggerRows(value) {
|
|
647
|
-
|
|
723
|
+
const triggerLabelSort = this.triggerLabelSort();
|
|
724
|
+
if (isNil(triggerLabelSort)) {
|
|
648
725
|
return value;
|
|
649
726
|
}
|
|
650
|
-
return this._sortData([...value],
|
|
727
|
+
return this._sortData([...value], triggerLabelSort.active, triggerLabelSort.direction);
|
|
651
728
|
}
|
|
652
|
-
|
|
653
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: CmatSelectTableComponent, isStandalone: true, selector: "cmat-select-table", inputs: { id: "id", dataSource: "dataSource", noEntriesFoundLabel: "noEntriesFoundLabel", showNoFoundLabel: "showNoFoundLabel", isPhone: "isPhone", multiple: "multiple", overallSearchEnabled: "overallSearchEnabled", overallSearchVisible: "overallSearchVisible", resetSortOnOpen: "resetSortOnOpen", resetFiltersOnOpen: "resetFiltersOnOpen", customTriggerLabelFn: "customTriggerLabelFn", triggerLabelSort: "triggerLabelSort", customTriggerLabelTemplate: "customTriggerLabelTemplate", canNull: "canNull", defaultSort: "defaultSort", resetOptionAction: "resetOptionAction", keyParam: "keyParam", compareWith: "compareWith", placeholder: "placeholder", value: "value", required: "required", disabled: "disabled" }, outputs: { closed: "closed" }, host: { listeners: { "document:click": "clickedOut()" }, properties: { "attr.id": "this.id" } }, providers: [{ provide: MatFormFieldControl, useExisting: CmatSelectTableComponent }], viewQueries: [{ propertyName: "_matSelectSearch", first: true, predicate: CmatSelectSearchComponent, descendants: true }, { propertyName: "_sort", first: true, predicate: MatSort, descendants: true }, { propertyName: "_table", first: true, predicate: MatTable, descendants: true }, { propertyName: "matSelect", first: true, predicate: ["componentSelect"], descendants: true }, { propertyName: "_matOptions", predicate: MatOption, descendants: true }], exportAs: ["cmatSelectTable"], usesOnChanges: true, ngImport: i0, template: "@if(multiple){\r\n<mat-select #componentSelect multiple disableRipple \r\n [placeholder]=\"placeholder\" [required]=\"required\" [formControl]=\"selectControl\" [compareWith]=\"compareWith\"\r\n (focusin)=\"onFocusIn()\" (openedChange)=\"openedChange($event)\">\r\n <mat-select-trigger>\r\n @let triggerLabel = getTriggerLabel();\r\n {{ triggerLabel }}\r\n </mat-select-trigger>\r\n\r\n <div class=\"h-full overflow-y-auto scrollbar-custom\" [ngClass]=\"{'hidden-header': overallSearchVisibleState()}\"\r\n (focusout)=\"onFocusOut($event)\">\r\n @if(overallSearchEnabled){\r\n <mat-option [ngClass]=\"{'hidden':!overallSearchVisibleState() === true}\">\r\n <cmat-select-search [showNoFoundLabel]=\"showNoFoundLabel\" [noEntriesFoundLabel]=\"noEntriesFoundLabel\"\r\n [formControl]=\"overallFilterControl\" [clearSearchInput]=\"resetFiltersOnOpen\">\r\n </cmat-select-search>\r\n </mat-option>\r\n\r\n @if(!isPhone){\r\n <div class=\"overall-search-toggle\" [ngStyle]=\"{ height: overallSearchVisibleState() ? '48px' : '55.4px' }\">\r\n <mat-icon color=\"primary\"\r\n [svgIcon]=\"overallSearchVisibleState() ? 'mat_outline:arrow_back' : 'mat_outline:search'\"\r\n (click)=\"toggleOverallSearch()\">\r\n </mat-icon>\r\n </div>\r\n }@else{\r\n <div class=\"overall-search-toggle\" [ngStyle]=\"{ height: overallSearchVisibleState() ? '48px' : '55.4px' }\">\r\n <mat-icon color=\"primary\" [svgIcon]=\"'mat_outline:search'\">\r\n </mat-icon>\r\n </div>\r\n }\r\n }\r\n <table #table mat-table matSort [dataSource]=\"tableDataSource()\">\r\n @for (columnKey of tableColumns(); track $index) {\r\n @let column = tableColumnsMap.get(columnKey);\r\n @switch (columnKey) {\r\n @case ('_selection') {\r\n <ng-container [matColumnDef]=\"columnKey\">\r\n <th *matHeaderCellDef mat-header-cell [ngClass]=\"{selection: true, hidden: !multiple}\"></th>\r\n <td *matCellDef=\"let row\" mat-cell [ngClass]=\"{selection: true, hidden: !multiple}\">\r\n <mat-option [value]=\"row\"></mat-option>\r\n </td>\r\n </ng-container>\r\n }\r\n @default {\r\n <ng-container [matColumnDef]=\"columnKey\">\r\n <th *matHeaderCellDef mat-header-cell mat-sort-header\r\n [disabled]=\"!column?.sortable\">\r\n @if(!column?.sortable){\r\n <div>{{column?.name}}</div>\r\n }@else {\r\n @switch (column?.filter?.type) {\r\n @case ('string') {\r\n <ng-container [ngTemplateOutlet]=\"filterTypeString\"\r\n [ngTemplateOutletContext]=\"getFilterContext(column)\"></ng-container>\r\n }\r\n @case('number'){\r\n <ng-container [ngTemplateOutlet]=\"filterTypeNumber\"\r\n [ngTemplateOutletContext]=\"getFilterContext(column)\"></ng-container>\r\n }\r\n @default {\r\n <div>{{column?.name}}</div>\r\n }\r\n }\r\n }\r\n </th>\r\n <td *matCellDef=\"let row\" mat-cell>\r\n <div class=\" has-label-on-mobile\" [attr.data-label]=\"column?.name+':'\">\r\n {{getCellValue(row, columnKey)}}\r\n </div>\r\n\r\n </td>\r\n </ng-container>\r\n }\r\n }\r\n }\r\n\r\n <tr *matHeaderRowDef=\"tableColumns(); sticky: true\" mat-header-row></tr>\r\n <tr *matRowDef=\"let row; columns: tableColumns();\" mat-row (click)=\"emulateMatOptionClick($event)\"></tr>\r\n </table>\r\n </div>\r\n</mat-select>\r\n}@else {\r\n<mat-select #componentSelect disableRipple \r\n [placeholder]=\"placeholder\" [required]=\"required\" [formControl]=\"selectControl\" [compareWith]=\"compareWith\"\r\n (focusin)=\"onFocusIn()\" (openedChange)=\"openedChange($event)\">\r\n <mat-select-trigger>\r\n @if(!customTriggerLabelFn){\r\n {{simpleTriggerLabelFn(completeRowList)}}\r\n }@else {\r\n {{customTriggerLabelFn(completeRowList)}}\r\n }\r\n </mat-select-trigger>\r\n\r\n <div class=\"h-full overflow-y-auto scrollbar-custom\" [ngClass]=\"{'hidden-header': overallSearchVisibleState()}\"\r\n (focusout)=\"onFocusOut($event)\">\r\n @if(overallSearchEnabled){\r\n <mat-option [ngClass]=\"{'hidden':!overallSearchVisibleState() === true}\">\r\n <cmat-select-search [showNoFoundLabel]=\"showNoFoundLabel\" [noEntriesFoundLabel]=\"noEntriesFoundLabel\"\r\n [formControl]=\"overallFilterControl\" [clearSearchInput]=\"resetFiltersOnOpen\">\r\n </cmat-select-search>\r\n </mat-option>\r\n\r\n @if(!isPhone){\r\n <div class=\"overall-search-toggle\" [ngStyle]=\"{ height: overallSearchVisibleState() ? '48px' : '55.4px' }\">\r\n <mat-icon color=\"primary\"\r\n [svgIcon]=\"overallSearchVisibleState() ? 'mat_outline:arrow_back' : 'mat_outline:search'\"\r\n (click)=\"toggleOverallSearch()\">\r\n </mat-icon>\r\n </div>\r\n }@else{\r\n <div class=\"overall-search-toggle\" [ngStyle]=\"{ height: overallSearchVisibleState() ? '48px' : '55.4px' }\">\r\n <mat-icon color=\"primary\" [svgIcon]=\"'mat_outline:search'\">\r\n </mat-icon>\r\n </div>\r\n }\r\n }\r\n <table #table mat-table matSort [dataSource]=\"tableDataSource()\">\r\n @for (columnKey of tableColumns(); track $index) {\r\n @let column = tableColumnsMap.get(columnKey);\r\n @switch (columnKey) {\r\n @case ('_selection') {\r\n <ng-container [matColumnDef]=\"columnKey\">\r\n <th *matHeaderCellDef mat-header-cell class=\"selection\"></th>\r\n <td *matCellDef=\"let row\" mat-cell class=\"selection\">\r\n @if(row.id===null){\r\n <mat-option></mat-option>\r\n }@else {\r\n <mat-option [value]=\"row\"></mat-option>\r\n }\r\n </td>\r\n </ng-container>\r\n }\r\n @default {\r\n <ng-container [matColumnDef]=\"columnKey\">\r\n <th *matHeaderCellDef mat-header-cell mat-sort-header\r\n [disabled]=\"!column?.sortable\">\r\n @if(!column?.sortable){\r\n <div>{{column?.name}}</div>\r\n }@else {\r\n @switch (column?.filter?.type) {\r\n @case ('string') {\r\n <ng-container [ngTemplateOutlet]=\"filterTypeString\"\r\n [ngTemplateOutletContext]=\"getFilterContext(column)\"></ng-container>\r\n }\r\n @case('number'){\r\n <ng-container [ngTemplateOutlet]=\"filterTypeNumber\"\r\n [ngTemplateOutletContext]=\"getFilterContext(column)\"></ng-container>\r\n }\r\n @default {\r\n <div>{{column?.name}}</div>\r\n }\r\n }\r\n }\r\n </th>\r\n <td *matCellDef=\"let row\" mat-cell\r\n [colSpan]=\"hasNullRow && row.id === null && $index === 1 ? tableColumns.length : 1\"\r\n [ngStyle]=\"{display: hasNullRow && row.id === null && $index !== 1 ? 'none' : ''}\">\r\n <div class=\" has-label-on-mobile\" [attr.data-label]=\"column?.name+':'\">\r\n {{hasNullRow && row.id === null && $index === 1 ? '\u7A7A' : getCellValue(row, columnKey)}}\r\n </div> \r\n </td>\r\n </ng-container>\r\n }\r\n }\r\n }\r\n\r\n <tr *matHeaderRowDef=\"tableColumns(); sticky: true\" mat-header-row></tr>\r\n <tr *matRowDef=\"let row; columns: tableColumns();\" mat-row (click)=\"emulateMatOptionClick($event)\"></tr>\r\n </table>\r\n </div>\r\n</mat-select>\r\n}\r\n<ng-template #filterTypeString let-column='column'>\r\n <mat-form-field class=\"filter\" (click)=\"$event.stopPropagation()\">\r\n <input matInput [formControl]=\"filterFormControl(column.key)\" [placeholder]=\"column.name\"\r\n (keydown)=\"$event.stopPropagation()\" (keyup)=\"$event.stopPropagation()\"\r\n (keypress)=\"$event.stopPropagation()\" />\r\n </mat-form-field>\r\n</ng-template>\r\n\r\n<ng-template #filterTypeNumber let-column='column'>\r\n <mat-form-field class=\"filter\" (click)=\"$event.stopPropagation()\">\r\n <input matInput cmatDigitOnly [min]=\"0\" [formControl]=\"filterFormControl(column.key)\"\r\n [placeholder]=\"column.name\" (keydown)=\"$event.stopPropagation()\" (keyup)=\"$event.stopPropagation()\"\r\n (keypress)=\"$event.stopPropagation()\" />\r\n </mat-form-field>\r\n</ng-template>\r\n", styles: ["cmat-select-table{display:block;width:100%}.cmat-select-search-table-panel{min-width:max-content;max-width:100%;min-height:240px;padding-top:0!important}.cmat-select-search-table-panel .overall-search-toggle{z-index:102;display:flex;cursor:pointer;position:absolute;width:48px;height:48px;align-items:center;left:12px;top:0}.cmat-select-search-table-panel .hidden-header table thead{display:none}.cmat-select-search-table-panel table{width:100%}.cmat-select-search-table-panel table tr{cursor:pointer;height:48px;max-height:48px}.cmat-select-search-table-panel table tr mat-option{height:48px;max-height:48px}.cmat-select-search-table-panel table tr td{-webkit-user-select:none;user-select:none;border-bottom:0!important;box-shadow:inset 0 -1px var(--cmat-border)}.cmat-select-search-table-panel table tr th .mat-sort-header-container{height:55px}.cmat-select-search-table-panel table tr th .mat-sort-header-container mat-form-field .mat-form-field-infix{width:initial}.cmat-select-search-table-panel table tr th[aria-sort] .mat-sort-header-arrow{opacity:1!important}.cmat-select-search-table-panel table tr td mat-option,.cmat-select-search-table-panel table tr th mat-option{background:transparent!important}.cmat-select-search-table-panel table tr td.selection,.cmat-select-search-table-panel table tr th.selection{width:48px;padding:0;margin:0}.cmat-select-search-table-panel table tr:has(td:first-child mat-option[aria-selected=true]){background-color:var(--mat-option-hover-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-hover-state-layer-opacity) * 100%), transparent))!important;color:rgba(var(--cmat-primary-rgb),1)!important}.cmat-select-search-table-panel .cmat-select-search-inner>span{visibility:hidden}\n"], dependencies: [{ kind: "component", type: CmatSelectSearchComponent, selector: "cmat-select-search", inputs: ["placeholderLabel", "type", "noEntriesFoundLabel", "showNoFoundLabel", "clearSearchInput", "searching", "disableInitialFocus", "enableClearOnEscapePressed", "preventHomeEndKeyPropagation", "disableScrollToActiveOnOptionsChanged", "ariaLabel", "showToggleAllCheckbox", "toggleAllCheckboxChecked", "toggleAllCheckboxIndeterminate", "toggleAllCheckboxTooltipMessage", "toggleAllCheckboxTooltipPosition", "hideClearSearchButton", "alwaysRestoreSelectedOptionsMulti"], outputs: ["toggleAll"], exportAs: ["cmatSelectSearch"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i2.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "directive", type: i2.MatSelectTrigger, selector: "mat-select-trigger" }, { kind: "component", type: i2.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i4.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i6.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i6.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i6.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i6.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i6.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i6.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i6.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i6.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i6.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i6.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i7.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatSortModule }, { kind: "directive", type: i8.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i8.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "directive", type: CmatDigitOnlyDirective, selector: "[cmatDigitOnly]", inputs: ["decimal", "decimalSeparator", "allowNegatives", "allowPaste", "negativeSign", "min", "max", "pattern"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
729
|
+
_setPanelClass() {
|
|
730
|
+
let panelClass = [
|
|
731
|
+
'overflow-hidden',
|
|
732
|
+
'cmat-select-search-table-panel',
|
|
733
|
+
];
|
|
734
|
+
if (this._matSelect.panelClass) {
|
|
735
|
+
if (Array.isArray(this._matSelect.panelClass)) {
|
|
736
|
+
this._matSelect.panelClass = [this._matSelect.panelClass, ...panelClass];
|
|
737
|
+
}
|
|
738
|
+
else if (typeof this._matSelect.panelClass === 'string') {
|
|
739
|
+
this._matSelect.panelClass = [
|
|
740
|
+
this._matSelect.panelClass,
|
|
741
|
+
...panelClass,
|
|
742
|
+
];
|
|
743
|
+
}
|
|
744
|
+
else if (typeof this._matSelect.panelClass === 'object') {
|
|
745
|
+
const panelClassObject = this._matSelect.panelClass;
|
|
746
|
+
panelClass.forEach((i) => {
|
|
747
|
+
panelClassObject[i] = true;
|
|
748
|
+
});
|
|
749
|
+
}
|
|
750
|
+
}
|
|
751
|
+
else {
|
|
752
|
+
this._matSelect.panelClass = panelClass;
|
|
753
|
+
}
|
|
754
|
+
}
|
|
755
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: CmatSelectTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
756
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.2", type: CmatSelectTableComponent, isStandalone: true, selector: "cmat-select-table", inputs: { dataSource: { classPropertyName: "dataSource", publicName: "dataSource", isSignal: true, isRequired: false, transformFunction: null }, noEntriesFoundLabel: { classPropertyName: "noEntriesFoundLabel", publicName: "noEntriesFoundLabel", isSignal: true, isRequired: false, transformFunction: null }, showNoFoundLabel: { classPropertyName: "showNoFoundLabel", publicName: "showNoFoundLabel", isSignal: true, isRequired: false, transformFunction: null }, isPhone: { classPropertyName: "isPhone", publicName: "isPhone", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, overallSearchEnabled: { classPropertyName: "overallSearchEnabled", publicName: "overallSearchEnabled", isSignal: true, isRequired: false, transformFunction: null }, overallSearchVisible: { classPropertyName: "overallSearchVisible", publicName: "overallSearchVisible", isSignal: true, isRequired: false, transformFunction: null }, resetSortOnOpen: { classPropertyName: "resetSortOnOpen", publicName: "resetSortOnOpen", isSignal: true, isRequired: false, transformFunction: null }, resetFiltersOnOpen: { classPropertyName: "resetFiltersOnOpen", publicName: "resetFiltersOnOpen", isSignal: true, isRequired: false, transformFunction: null }, customTriggerLabelFn: { classPropertyName: "customTriggerLabelFn", publicName: "customTriggerLabelFn", isSignal: true, isRequired: false, transformFunction: null }, triggerLabelSort: { classPropertyName: "triggerLabelSort", publicName: "triggerLabelSort", isSignal: true, isRequired: false, transformFunction: null }, customTriggerLabelTemplate: { classPropertyName: "customTriggerLabelTemplate", publicName: "customTriggerLabelTemplate", isSignal: true, isRequired: false, transformFunction: null }, canNull: { classPropertyName: "canNull", publicName: "canNull", isSignal: true, isRequired: false, transformFunction: null }, defaultSort: { classPropertyName: "defaultSort", publicName: "defaultSort", isSignal: true, isRequired: false, transformFunction: null }, resetOptionAction: { classPropertyName: "resetOptionAction", publicName: "resetOptionAction", isSignal: true, isRequired: false, transformFunction: null }, keyParam: { classPropertyName: "keyParam", publicName: "keyParam", isSignal: true, isRequired: false, transformFunction: null }, compareWith: { classPropertyName: "compareWith", publicName: "compareWith", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: false, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: false, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: false, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { closed: "closed" }, host: { listeners: { "document:click": "clickedOut()" }, properties: { "attr.id": "id" } }, providers: [
|
|
757
|
+
{ provide: MatFormFieldControl, useExisting: CmatSelectTableComponent },
|
|
758
|
+
], viewQueries: [{ propertyName: "_matSelectSearch", first: true, predicate: CmatSelectSearchComponent, descendants: true, isSignal: true }, { propertyName: "_sort", first: true, predicate: MatSort, descendants: true, isSignal: true }, { propertyName: "_table", first: true, predicate: MatTable, descendants: true, isSignal: true }, { propertyName: "_matOptions", predicate: MatOption, descendants: true, isSignal: true }, { propertyName: "_matSelectSignal", first: true, predicate: ["componentSelect"], descendants: true, isSignal: true }], exportAs: ["cmatSelectTable"], usesOnChanges: true, ngImport: i0, template: "@if (multiple()) {\r\n<mat-select #componentSelect multiple disableRipple [placeholder]=\"placeholder\" [required]=\"required\"\r\n [formControl]=\"selectControl\" [compareWith]=\"compareWith()\" (focusin)=\"onFocusIn()\"\r\n (openedChange)=\"openedChange($event)\">\r\n <mat-select-trigger>\r\n @let triggerLabel = getTriggerLabel();\r\n {{ triggerLabel }}\r\n </mat-select-trigger>\r\n\r\n <div class=\"h-full overflow-y-auto scrollbar-custom\" [ngClass]=\"{ 'hidden-header': overallSearchVisibleState() }\"\r\n (focusout)=\"onFocusOut($event)\">\r\n @if (overallSearchEnabled()) {\r\n <mat-option [ngClass]=\"{ hidden: !overallSearchVisibleState() === true }\">\r\n <cmat-select-search \r\n [showNoFoundLabel]=\"showNoFoundLabel()\" \r\n [noEntriesFoundLabel]=\"noEntriesFoundLabel()\"\r\n [formControl]=\"overallFilterControl\" \r\n [clearSearchInput]=\"resetFiltersOnOpen()??false\">\r\n </cmat-select-search>\r\n </mat-option>\r\n\r\n @if (!isPhone()) {\r\n <div class=\"overall-search-toggle\" [ngStyle]=\"{\r\n height: overallSearchVisibleState() ? '48px' : '55.4px',\r\n }\">\r\n <mat-icon color=\"primary\" [svgIcon]=\"\r\n overallSearchVisibleState()\r\n ? 'mat_outline:arrow_back'\r\n : 'mat_outline:search'\r\n \" (click)=\"toggleOverallSearch()\">\r\n </mat-icon>\r\n </div>\r\n }\r\n }\r\n <table #table mat-table matSort [dataSource]=\"tableDataSource()\">\r\n @for (columnKey of tableColumns(); track $index) {\r\n @let column = tableColumnsMap.get(columnKey);\r\n @switch (columnKey) {\r\n @case (\"_selection\") {\r\n <ng-container [matColumnDef]=\"columnKey\">\r\n <th *matHeaderCellDef mat-header-cell [ngClass]=\"{ selection: true, hidden: !multiple() }\"></th>\r\n <td *matCellDef=\"let row\" mat-cell [ngClass]=\"{ selection: true, hidden: !multiple() }\">\r\n <mat-option [value]=\"row\"></mat-option>\r\n </td>\r\n </ng-container>\r\n }\r\n @default {\r\n <ng-container [matColumnDef]=\"columnKey\">\r\n <th *matHeaderCellDef mat-header-cell mat-sort-header [disabled]=\"!column?.sortable\">\r\n @if (!column?.sortable) {\r\n <div>{{ column?.name }}</div>\r\n } @else {\r\n @switch (column?.filter.type) {\r\n @case (\"string\") {\r\n <ng-container [ngTemplateOutlet]=\"filterTypeString\"\r\n [ngTemplateOutletContext]=\"getFilterContext(column)\"></ng-container>\r\n }\r\n @case (\"number\") {\r\n <ng-container [ngTemplateOutlet]=\"filterTypeNumber\"\r\n [ngTemplateOutletContext]=\"getFilterContext(column)\"></ng-container>\r\n }\r\n @default {\r\n <div>{{ column?.name }}</div>\r\n }\r\n }\r\n }\r\n </th>\r\n <td *matCellDef=\"let row\" mat-cell>\r\n <div class=\"has-label-on-mobile\" [attr.data-label]=\"column?.name + ':'\">\r\n {{ getCellValue(row, columnKey) }}\r\n </div>\r\n </td>\r\n </ng-container>\r\n }\r\n }\r\n }\r\n \r\n <tr *matHeaderRowDef=\"tableColumns(); sticky: true\" mat-header-row></tr>\r\n <tr *matRowDef=\"let row; columns: tableColumns()\" mat-row (click)=\"emulateMatOptionClick($event)\"></tr>\r\n </table>\r\n </div>\r\n</mat-select>\r\n} @else {\r\n<mat-select #componentSelect disableRipple [placeholder]=\"placeholder\" [required]=\"required\"\r\n [formControl]=\"selectControl\" [compareWith]=\"compareWith()\" (focusin)=\"onFocusIn()\"\r\n (openedChange)=\"openedChange($event)\">\r\n <mat-select-trigger>\r\n @if (!customTriggerLabelFn()) {\r\n {{ simpleTriggerLabelFn(completeRowList) }}\r\n } @else {\r\n {{ customTriggerLabelFn()!(completeRowList) }}\r\n }\r\n </mat-select-trigger>\r\n\r\n <div class=\"h-full overflow-y-auto scrollbar-custom\" [ngClass]=\"{ 'hidden-header': overallSearchVisibleState() }\"\r\n (focusout)=\"onFocusOut($event)\">\r\n @if (overallSearchEnabled()) {\r\n <mat-option [ngClass]=\"{ hidden: !overallSearchVisibleState() === true }\">\r\n <cmat-select-search [showNoFoundLabel]=\"showNoFoundLabel()\" [noEntriesFoundLabel]=\"noEntriesFoundLabel()\"\r\n [formControl]=\"overallFilterControl\" [clearSearchInput]=\"resetFiltersOnOpen()??false\">\r\n </cmat-select-search>\r\n </mat-option>\r\n\r\n @if (!isPhone()) {\r\n <div class=\"overall-search-toggle\" [ngStyle]=\"{\r\n height: overallSearchVisibleState() ? '48px' : '55.4px',\r\n }\">\r\n <mat-icon color=\"primary\" [svgIcon]=\"\r\n overallSearchVisibleState()\r\n ? 'mat_outline:arrow_back'\r\n : 'mat_outline:search'\r\n \" (click)=\"toggleOverallSearch()\">\r\n </mat-icon>\r\n </div>\r\n }\r\n }\r\n <table #table mat-table matSort [dataSource]=\"tableDataSource()\">\r\n @for (columnKey of tableColumns(); track $index) {\r\n @let column = tableColumnsMap.get(columnKey);\r\n @switch (columnKey) {\r\n @case (\"_selection\") {\r\n <ng-container [matColumnDef]=\"columnKey\">\r\n <th *matHeaderCellDef mat-header-cell class=\"selection\"></th>\r\n <td *matCellDef=\"let row\" mat-cell class=\"selection\">\r\n @if (row.id === null) {\r\n <mat-option></mat-option>\r\n } @else {\r\n <mat-option [value]=\"row\"></mat-option>\r\n }\r\n </td>\r\n </ng-container>\r\n }\r\n @default {\r\n <ng-container [matColumnDef]=\"columnKey\">\r\n <th *matHeaderCellDef mat-header-cell mat-sort-header [disabled]=\"!column?.sortable\">\r\n @if (!column?.sortable) {\r\n <div>{{ column?.name }}</div>\r\n } @else {\r\n @switch (column?.filter.type) {\r\n @case (\"string\") {\r\n <ng-container [ngTemplateOutlet]=\"filterTypeString\"\r\n [ngTemplateOutletContext]=\"getFilterContext(column)\"></ng-container>\r\n }\r\n @case (\"number\") {\r\n <ng-container [ngTemplateOutlet]=\"filterTypeNumber\"\r\n [ngTemplateOutletContext]=\"getFilterContext(column)\"></ng-container>\r\n }\r\n @default {\r\n <div>{{ column?.name }}</div>\r\n }\r\n }\r\n }\r\n </th>\r\n <td *matCellDef=\"let row\" mat-cell [colSpan]=\"\r\n hasNullRow && row.id === null && $index === 1\r\n ? tableColumns.length\r\n : 1\r\n \" [ngStyle]=\"{\r\n display:\r\n hasNullRow && row.id === null && $index !== 1\r\n ? 'none'\r\n : '',\r\n }\">\r\n <div class=\"has-label-on-mobile\" [attr.data-label]=\"column?.name + ':'\">\r\n {{\r\n hasNullRow && row.id === null && $index === 1\r\n ? \"\u7A7A\"\r\n : getCellValue(row, columnKey)\r\n }}\r\n </div>\r\n </td>\r\n </ng-container>\r\n }\r\n }\r\n }\r\n\r\n <tr *matHeaderRowDef=\"tableColumns(); sticky: true\" mat-header-row></tr>\r\n <tr *matRowDef=\"let row; columns: tableColumns()\" mat-row (click)=\"emulateMatOptionClick($event)\"></tr>\r\n </table>\r\n </div>\r\n</mat-select>\r\n}\r\n<ng-template #filterTypeString let-column=\"column\">\r\n <mat-form-field appearance=\"fill\" class=\"filter\" (click)=\"$event.stopPropagation()\">\r\n <input matInput [formControl]=\"filterFormControl(column.key)\" [placeholder]=\"column.name\"\r\n (keydown)=\"$event.stopPropagation()\" (keyup)=\"$event.stopPropagation()\" (keypress)=\"$event.stopPropagation()\" />\r\n </mat-form-field>\r\n</ng-template>\r\n\r\n<ng-template #filterTypeNumber let-column=\"column\">\r\n <mat-form-field appearance=\"fill\" class=\"filter\" (click)=\"$event.stopPropagation()\">\r\n <input matInput cmatDigitOnly [min]=\"0\" [formControl]=\"filterFormControl(column.key)\" [placeholder]=\"column.name\"\r\n (keydown)=\"$event.stopPropagation()\" (keyup)=\"$event.stopPropagation()\" (keypress)=\"$event.stopPropagation()\" />\r\n </mat-form-field>\r\n</ng-template>", styles: ["cmat-select-table{display:block;width:100%}.cmat-select-search-table-panel{min-width:max-content;max-width:100%;min-height:240px;padding-top:0!important}.cmat-select-search-table-panel .overall-search-toggle{z-index:102;display:flex;cursor:pointer;position:absolute;width:48px;height:48px;align-items:center;left:12px;top:0;pointer-events:auto}.cmat-select-search-table-panel .overall-search-toggle mat-icon{pointer-events:auto;-webkit-user-select:none;user-select:none}.cmat-select-search-table-panel .hidden-header table thead{display:none}.cmat-select-search-table-panel table{width:100%}.cmat-select-search-table-panel table tr{cursor:pointer;height:48px;max-height:48px}.cmat-select-search-table-panel table tr mat-option{height:48px;max-height:48px}.cmat-select-search-table-panel table tr td{-webkit-user-select:none;user-select:none;border-bottom:0!important;box-shadow:inset 0 -1px var(--cmat-border)}.cmat-select-search-table-panel table tr th .mat-sort-header-container{height:55px}.cmat-select-search-table-panel table tr th .mat-sort-header-container mat-form-field .mat-form-field-infix{width:initial}.cmat-select-search-table-panel table tr th[aria-sort] .mat-sort-header-arrow{opacity:1!important}.cmat-select-search-table-panel table tr td mat-option,.cmat-select-search-table-panel table tr th mat-option{background:transparent!important}.cmat-select-search-table-panel table tr td.selection,.cmat-select-search-table-panel table tr th.selection{width:48px;padding:0;margin:0}.cmat-select-search-table-panel table tr:has(td:first-child mat-option[aria-selected=true]){background-color:var(--mat-option-hover-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-hover-state-layer-opacity) * 100%), transparent))!important;color:rgba(var(--cmat-primary-rgb),1)!important}.cmat-select-search-table-panel .cmat-select-search-inner>span{visibility:hidden}\n"], dependencies: [{ kind: "component", type: CmatSelectSearchComponent, selector: "cmat-select-search", inputs: ["placeholderLabel", "type", "noEntriesFoundLabel", "showNoFoundLabel", "clearSearchInput", "searching", "disableInitialFocus", "enableClearOnEscapePressed", "preventHomeEndKeyPropagation", "disableScrollToActiveOnOptionsChanged", "ariaLabel", "showToggleAllCheckbox", "toggleAllCheckboxChecked", "toggleAllCheckboxIndeterminate", "toggleAllCheckboxTooltipMessage", "toggleAllCheckboxTooltipPosition", "hideClearSearchButton", "alwaysRestoreSelectedOptionsMulti", "debounceTime", "optionsCount"], outputs: ["toggleAll"], exportAs: ["cmatSelectSearch"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i2.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "directive", type: i2.MatSelectTrigger, selector: "mat-select-trigger" }, { kind: "component", type: i2.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i3.DefaultValueAccessor, 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]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i4.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i6.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i6.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i6.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i6.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i6.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i6.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i6.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i6.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i6.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i6.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i7.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatSortModule }, { kind: "directive", type: i8.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i8.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "directive", type: CmatDigitOnlyDirective, selector: "[cmatDigitOnly]", inputs: ["decimal", "decimalSeparator", "allowNegatives", "allowPaste", "negativeSign", "min", "max", "pattern"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
654
759
|
}
|
|
655
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
760
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: CmatSelectTableComponent, decorators: [{
|
|
656
761
|
type: Component,
|
|
657
|
-
args: [{ selector: 'cmat-select-table', exportAs: 'cmatSelectTable', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [
|
|
658
|
-
|
|
659
|
-
], template: "@if(multiple){\r\n<mat-select #componentSelect multiple disableRipple \r\n [placeholder]=\"placeholder\" [required]=\"required\" [formControl]=\"selectControl\" [compareWith]=\"compareWith\"\r\n (focusin)=\"onFocusIn()\" (openedChange)=\"openedChange($event)\">\r\n <mat-select-trigger>\r\n @let triggerLabel = getTriggerLabel();\r\n {{ triggerLabel }}\r\n </mat-select-trigger>\r\n\r\n <div class=\"h-full overflow-y-auto scrollbar-custom\" [ngClass]=\"{'hidden-header': overallSearchVisibleState()}\"\r\n (focusout)=\"onFocusOut($event)\">\r\n @if(overallSearchEnabled){\r\n <mat-option [ngClass]=\"{'hidden':!overallSearchVisibleState() === true}\">\r\n <cmat-select-search [showNoFoundLabel]=\"showNoFoundLabel\" [noEntriesFoundLabel]=\"noEntriesFoundLabel\"\r\n [formControl]=\"overallFilterControl\" [clearSearchInput]=\"resetFiltersOnOpen\">\r\n </cmat-select-search>\r\n </mat-option>\r\n\r\n @if(!isPhone){\r\n <div class=\"overall-search-toggle\" [ngStyle]=\"{ height: overallSearchVisibleState() ? '48px' : '55.4px' }\">\r\n <mat-icon color=\"primary\"\r\n [svgIcon]=\"overallSearchVisibleState() ? 'mat_outline:arrow_back' : 'mat_outline:search'\"\r\n (click)=\"toggleOverallSearch()\">\r\n </mat-icon>\r\n </div>\r\n }@else{\r\n <div class=\"overall-search-toggle\" [ngStyle]=\"{ height: overallSearchVisibleState() ? '48px' : '55.4px' }\">\r\n <mat-icon color=\"primary\" [svgIcon]=\"'mat_outline:search'\">\r\n </mat-icon>\r\n </div>\r\n }\r\n }\r\n <table #table mat-table matSort [dataSource]=\"tableDataSource()\">\r\n @for (columnKey of tableColumns(); track $index) {\r\n @let column = tableColumnsMap.get(columnKey);\r\n @switch (columnKey) {\r\n @case ('_selection') {\r\n <ng-container [matColumnDef]=\"columnKey\">\r\n <th *matHeaderCellDef mat-header-cell [ngClass]=\"{selection: true, hidden: !multiple}\"></th>\r\n <td *matCellDef=\"let row\" mat-cell [ngClass]=\"{selection: true, hidden: !multiple}\">\r\n <mat-option [value]=\"row\"></mat-option>\r\n </td>\r\n </ng-container>\r\n }\r\n @default {\r\n <ng-container [matColumnDef]=\"columnKey\">\r\n <th *matHeaderCellDef mat-header-cell mat-sort-header\r\n [disabled]=\"!column?.sortable\">\r\n @if(!column?.sortable){\r\n <div>{{column?.name}}</div>\r\n }@else {\r\n @switch (column?.filter?.type) {\r\n @case ('string') {\r\n <ng-container [ngTemplateOutlet]=\"filterTypeString\"\r\n [ngTemplateOutletContext]=\"getFilterContext(column)\"></ng-container>\r\n }\r\n @case('number'){\r\n <ng-container [ngTemplateOutlet]=\"filterTypeNumber\"\r\n [ngTemplateOutletContext]=\"getFilterContext(column)\"></ng-container>\r\n }\r\n @default {\r\n <div>{{column?.name}}</div>\r\n }\r\n }\r\n }\r\n </th>\r\n <td *matCellDef=\"let row\" mat-cell>\r\n <div class=\" has-label-on-mobile\" [attr.data-label]=\"column?.name+':'\">\r\n {{getCellValue(row, columnKey)}}\r\n </div>\r\n\r\n </td>\r\n </ng-container>\r\n }\r\n }\r\n }\r\n\r\n <tr *matHeaderRowDef=\"tableColumns(); sticky: true\" mat-header-row></tr>\r\n <tr *matRowDef=\"let row; columns: tableColumns();\" mat-row (click)=\"emulateMatOptionClick($event)\"></tr>\r\n </table>\r\n </div>\r\n</mat-select>\r\n}@else {\r\n<mat-select #componentSelect disableRipple \r\n [placeholder]=\"placeholder\" [required]=\"required\" [formControl]=\"selectControl\" [compareWith]=\"compareWith\"\r\n (focusin)=\"onFocusIn()\" (openedChange)=\"openedChange($event)\">\r\n <mat-select-trigger>\r\n @if(!customTriggerLabelFn){\r\n {{simpleTriggerLabelFn(completeRowList)}}\r\n }@else {\r\n {{customTriggerLabelFn(completeRowList)}}\r\n }\r\n </mat-select-trigger>\r\n\r\n <div class=\"h-full overflow-y-auto scrollbar-custom\" [ngClass]=\"{'hidden-header': overallSearchVisibleState()}\"\r\n (focusout)=\"onFocusOut($event)\">\r\n @if(overallSearchEnabled){\r\n <mat-option [ngClass]=\"{'hidden':!overallSearchVisibleState() === true}\">\r\n <cmat-select-search [showNoFoundLabel]=\"showNoFoundLabel\" [noEntriesFoundLabel]=\"noEntriesFoundLabel\"\r\n [formControl]=\"overallFilterControl\" [clearSearchInput]=\"resetFiltersOnOpen\">\r\n </cmat-select-search>\r\n </mat-option>\r\n\r\n @if(!isPhone){\r\n <div class=\"overall-search-toggle\" [ngStyle]=\"{ height: overallSearchVisibleState() ? '48px' : '55.4px' }\">\r\n <mat-icon color=\"primary\"\r\n [svgIcon]=\"overallSearchVisibleState() ? 'mat_outline:arrow_back' : 'mat_outline:search'\"\r\n (click)=\"toggleOverallSearch()\">\r\n </mat-icon>\r\n </div>\r\n }@else{\r\n <div class=\"overall-search-toggle\" [ngStyle]=\"{ height: overallSearchVisibleState() ? '48px' : '55.4px' }\">\r\n <mat-icon color=\"primary\" [svgIcon]=\"'mat_outline:search'\">\r\n </mat-icon>\r\n </div>\r\n }\r\n }\r\n <table #table mat-table matSort [dataSource]=\"tableDataSource()\">\r\n @for (columnKey of tableColumns(); track $index) {\r\n @let column = tableColumnsMap.get(columnKey);\r\n @switch (columnKey) {\r\n @case ('_selection') {\r\n <ng-container [matColumnDef]=\"columnKey\">\r\n <th *matHeaderCellDef mat-header-cell class=\"selection\"></th>\r\n <td *matCellDef=\"let row\" mat-cell class=\"selection\">\r\n @if(row.id===null){\r\n <mat-option></mat-option>\r\n }@else {\r\n <mat-option [value]=\"row\"></mat-option>\r\n }\r\n </td>\r\n </ng-container>\r\n }\r\n @default {\r\n <ng-container [matColumnDef]=\"columnKey\">\r\n <th *matHeaderCellDef mat-header-cell mat-sort-header\r\n [disabled]=\"!column?.sortable\">\r\n @if(!column?.sortable){\r\n <div>{{column?.name}}</div>\r\n }@else {\r\n @switch (column?.filter?.type) {\r\n @case ('string') {\r\n <ng-container [ngTemplateOutlet]=\"filterTypeString\"\r\n [ngTemplateOutletContext]=\"getFilterContext(column)\"></ng-container>\r\n }\r\n @case('number'){\r\n <ng-container [ngTemplateOutlet]=\"filterTypeNumber\"\r\n [ngTemplateOutletContext]=\"getFilterContext(column)\"></ng-container>\r\n }\r\n @default {\r\n <div>{{column?.name}}</div>\r\n }\r\n }\r\n }\r\n </th>\r\n <td *matCellDef=\"let row\" mat-cell\r\n [colSpan]=\"hasNullRow && row.id === null && $index === 1 ? tableColumns.length : 1\"\r\n [ngStyle]=\"{display: hasNullRow && row.id === null && $index !== 1 ? 'none' : ''}\">\r\n <div class=\" has-label-on-mobile\" [attr.data-label]=\"column?.name+':'\">\r\n {{hasNullRow && row.id === null && $index === 1 ? '\u7A7A' : getCellValue(row, columnKey)}}\r\n </div> \r\n </td>\r\n </ng-container>\r\n }\r\n }\r\n }\r\n\r\n <tr *matHeaderRowDef=\"tableColumns(); sticky: true\" mat-header-row></tr>\r\n <tr *matRowDef=\"let row; columns: tableColumns();\" mat-row (click)=\"emulateMatOptionClick($event)\"></tr>\r\n </table>\r\n </div>\r\n</mat-select>\r\n}\r\n<ng-template #filterTypeString let-column='column'>\r\n <mat-form-field class=\"filter\" (click)=\"$event.stopPropagation()\">\r\n <input matInput [formControl]=\"filterFormControl(column.key)\" [placeholder]=\"column.name\"\r\n (keydown)=\"$event.stopPropagation()\" (keyup)=\"$event.stopPropagation()\"\r\n (keypress)=\"$event.stopPropagation()\" />\r\n </mat-form-field>\r\n</ng-template>\r\n\r\n<ng-template #filterTypeNumber let-column='column'>\r\n <mat-form-field class=\"filter\" (click)=\"$event.stopPropagation()\">\r\n <input matInput cmatDigitOnly [min]=\"0\" [formControl]=\"filterFormControl(column.key)\"\r\n [placeholder]=\"column.name\" (keydown)=\"$event.stopPropagation()\" (keyup)=\"$event.stopPropagation()\"\r\n (keypress)=\"$event.stopPropagation()\" />\r\n </mat-form-field>\r\n</ng-template>\r\n", styles: ["cmat-select-table{display:block;width:100%}.cmat-select-search-table-panel{min-width:max-content;max-width:100%;min-height:240px;padding-top:0!important}.cmat-select-search-table-panel .overall-search-toggle{z-index:102;display:flex;cursor:pointer;position:absolute;width:48px;height:48px;align-items:center;left:12px;top:0}.cmat-select-search-table-panel .hidden-header table thead{display:none}.cmat-select-search-table-panel table{width:100%}.cmat-select-search-table-panel table tr{cursor:pointer;height:48px;max-height:48px}.cmat-select-search-table-panel table tr mat-option{height:48px;max-height:48px}.cmat-select-search-table-panel table tr td{-webkit-user-select:none;user-select:none;border-bottom:0!important;box-shadow:inset 0 -1px var(--cmat-border)}.cmat-select-search-table-panel table tr th .mat-sort-header-container{height:55px}.cmat-select-search-table-panel table tr th .mat-sort-header-container mat-form-field .mat-form-field-infix{width:initial}.cmat-select-search-table-panel table tr th[aria-sort] .mat-sort-header-arrow{opacity:1!important}.cmat-select-search-table-panel table tr td mat-option,.cmat-select-search-table-panel table tr th mat-option{background:transparent!important}.cmat-select-search-table-panel table tr td.selection,.cmat-select-search-table-panel table tr th.selection{width:48px;padding:0;margin:0}.cmat-select-search-table-panel table tr:has(td:first-child mat-option[aria-selected=true]){background-color:var(--mat-option-hover-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-hover-state-layer-opacity) * 100%), transparent))!important;color:rgba(var(--cmat-primary-rgb),1)!important}.cmat-select-search-table-panel .cmat-select-search-inner>span{visibility:hidden}\n"] }]
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
}], multiple: [{
|
|
674
|
-
|
|
675
|
-
}], overallSearchEnabled: [{
|
|
676
|
-
type: Input
|
|
677
|
-
}], overallSearchVisible: [{
|
|
678
|
-
type: Input
|
|
679
|
-
}], resetSortOnOpen: [{
|
|
680
|
-
type: Input
|
|
681
|
-
}], resetFiltersOnOpen: [{
|
|
682
|
-
type: Input
|
|
683
|
-
}], customTriggerLabelFn: [{
|
|
684
|
-
type: Input
|
|
685
|
-
}], triggerLabelSort: [{
|
|
686
|
-
type: Input
|
|
687
|
-
}], customTriggerLabelTemplate: [{
|
|
688
|
-
type: Input
|
|
689
|
-
}], canNull: [{
|
|
690
|
-
type: Input
|
|
691
|
-
}], defaultSort: [{
|
|
692
|
-
type: Input
|
|
693
|
-
}], resetOptionAction: [{
|
|
694
|
-
type: Input
|
|
695
|
-
}], keyParam: [{
|
|
696
|
-
type: Input
|
|
697
|
-
}], compareWith: [{
|
|
698
|
-
type: Input
|
|
699
|
-
}], closed: [{
|
|
700
|
-
type: Output
|
|
701
|
-
}], _matSelectSearch: [{
|
|
702
|
-
type: ViewChild,
|
|
703
|
-
args: [CmatSelectSearchComponent, { static: false }]
|
|
704
|
-
}], _sort: [{
|
|
705
|
-
type: ViewChild,
|
|
706
|
-
args: [MatSort, { static: false }]
|
|
707
|
-
}], _table: [{
|
|
708
|
-
type: ViewChild,
|
|
709
|
-
args: [MatTable, { static: false }]
|
|
710
|
-
}], _matOptions: [{
|
|
711
|
-
type: ViewChildren,
|
|
712
|
-
args: [MatOption]
|
|
713
|
-
}], matSelect: [{
|
|
714
|
-
type: ViewChild,
|
|
715
|
-
args: ['componentSelect', { static: false }]
|
|
716
|
-
}], clickedOut: [{
|
|
762
|
+
args: [{ selector: 'cmat-select-table', exportAs: 'cmatSelectTable', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [
|
|
763
|
+
{ provide: MatFormFieldControl, useExisting: CmatSelectTableComponent },
|
|
764
|
+
], imports: [
|
|
765
|
+
CmatSelectSearchComponent,
|
|
766
|
+
MatFormFieldModule,
|
|
767
|
+
MatSelectModule,
|
|
768
|
+
ReactiveFormsModule,
|
|
769
|
+
CommonModule,
|
|
770
|
+
MatIconModule,
|
|
771
|
+
MatTableModule,
|
|
772
|
+
MatInputModule,
|
|
773
|
+
MatSortModule,
|
|
774
|
+
CmatDigitOnlyDirective,
|
|
775
|
+
], host: {
|
|
776
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
777
|
+
'[attr.id]': 'id',
|
|
778
|
+
}, template: "@if (multiple()) {\r\n<mat-select #componentSelect multiple disableRipple [placeholder]=\"placeholder\" [required]=\"required\"\r\n [formControl]=\"selectControl\" [compareWith]=\"compareWith()\" (focusin)=\"onFocusIn()\"\r\n (openedChange)=\"openedChange($event)\">\r\n <mat-select-trigger>\r\n @let triggerLabel = getTriggerLabel();\r\n {{ triggerLabel }}\r\n </mat-select-trigger>\r\n\r\n <div class=\"h-full overflow-y-auto scrollbar-custom\" [ngClass]=\"{ 'hidden-header': overallSearchVisibleState() }\"\r\n (focusout)=\"onFocusOut($event)\">\r\n @if (overallSearchEnabled()) {\r\n <mat-option [ngClass]=\"{ hidden: !overallSearchVisibleState() === true }\">\r\n <cmat-select-search \r\n [showNoFoundLabel]=\"showNoFoundLabel()\" \r\n [noEntriesFoundLabel]=\"noEntriesFoundLabel()\"\r\n [formControl]=\"overallFilterControl\" \r\n [clearSearchInput]=\"resetFiltersOnOpen()??false\">\r\n </cmat-select-search>\r\n </mat-option>\r\n\r\n @if (!isPhone()) {\r\n <div class=\"overall-search-toggle\" [ngStyle]=\"{\r\n height: overallSearchVisibleState() ? '48px' : '55.4px',\r\n }\">\r\n <mat-icon color=\"primary\" [svgIcon]=\"\r\n overallSearchVisibleState()\r\n ? 'mat_outline:arrow_back'\r\n : 'mat_outline:search'\r\n \" (click)=\"toggleOverallSearch()\">\r\n </mat-icon>\r\n </div>\r\n }\r\n }\r\n <table #table mat-table matSort [dataSource]=\"tableDataSource()\">\r\n @for (columnKey of tableColumns(); track $index) {\r\n @let column = tableColumnsMap.get(columnKey);\r\n @switch (columnKey) {\r\n @case (\"_selection\") {\r\n <ng-container [matColumnDef]=\"columnKey\">\r\n <th *matHeaderCellDef mat-header-cell [ngClass]=\"{ selection: true, hidden: !multiple() }\"></th>\r\n <td *matCellDef=\"let row\" mat-cell [ngClass]=\"{ selection: true, hidden: !multiple() }\">\r\n <mat-option [value]=\"row\"></mat-option>\r\n </td>\r\n </ng-container>\r\n }\r\n @default {\r\n <ng-container [matColumnDef]=\"columnKey\">\r\n <th *matHeaderCellDef mat-header-cell mat-sort-header [disabled]=\"!column?.sortable\">\r\n @if (!column?.sortable) {\r\n <div>{{ column?.name }}</div>\r\n } @else {\r\n @switch (column?.filter.type) {\r\n @case (\"string\") {\r\n <ng-container [ngTemplateOutlet]=\"filterTypeString\"\r\n [ngTemplateOutletContext]=\"getFilterContext(column)\"></ng-container>\r\n }\r\n @case (\"number\") {\r\n <ng-container [ngTemplateOutlet]=\"filterTypeNumber\"\r\n [ngTemplateOutletContext]=\"getFilterContext(column)\"></ng-container>\r\n }\r\n @default {\r\n <div>{{ column?.name }}</div>\r\n }\r\n }\r\n }\r\n </th>\r\n <td *matCellDef=\"let row\" mat-cell>\r\n <div class=\"has-label-on-mobile\" [attr.data-label]=\"column?.name + ':'\">\r\n {{ getCellValue(row, columnKey) }}\r\n </div>\r\n </td>\r\n </ng-container>\r\n }\r\n }\r\n }\r\n \r\n <tr *matHeaderRowDef=\"tableColumns(); sticky: true\" mat-header-row></tr>\r\n <tr *matRowDef=\"let row; columns: tableColumns()\" mat-row (click)=\"emulateMatOptionClick($event)\"></tr>\r\n </table>\r\n </div>\r\n</mat-select>\r\n} @else {\r\n<mat-select #componentSelect disableRipple [placeholder]=\"placeholder\" [required]=\"required\"\r\n [formControl]=\"selectControl\" [compareWith]=\"compareWith()\" (focusin)=\"onFocusIn()\"\r\n (openedChange)=\"openedChange($event)\">\r\n <mat-select-trigger>\r\n @if (!customTriggerLabelFn()) {\r\n {{ simpleTriggerLabelFn(completeRowList) }}\r\n } @else {\r\n {{ customTriggerLabelFn()!(completeRowList) }}\r\n }\r\n </mat-select-trigger>\r\n\r\n <div class=\"h-full overflow-y-auto scrollbar-custom\" [ngClass]=\"{ 'hidden-header': overallSearchVisibleState() }\"\r\n (focusout)=\"onFocusOut($event)\">\r\n @if (overallSearchEnabled()) {\r\n <mat-option [ngClass]=\"{ hidden: !overallSearchVisibleState() === true }\">\r\n <cmat-select-search [showNoFoundLabel]=\"showNoFoundLabel()\" [noEntriesFoundLabel]=\"noEntriesFoundLabel()\"\r\n [formControl]=\"overallFilterControl\" [clearSearchInput]=\"resetFiltersOnOpen()??false\">\r\n </cmat-select-search>\r\n </mat-option>\r\n\r\n @if (!isPhone()) {\r\n <div class=\"overall-search-toggle\" [ngStyle]=\"{\r\n height: overallSearchVisibleState() ? '48px' : '55.4px',\r\n }\">\r\n <mat-icon color=\"primary\" [svgIcon]=\"\r\n overallSearchVisibleState()\r\n ? 'mat_outline:arrow_back'\r\n : 'mat_outline:search'\r\n \" (click)=\"toggleOverallSearch()\">\r\n </mat-icon>\r\n </div>\r\n }\r\n }\r\n <table #table mat-table matSort [dataSource]=\"tableDataSource()\">\r\n @for (columnKey of tableColumns(); track $index) {\r\n @let column = tableColumnsMap.get(columnKey);\r\n @switch (columnKey) {\r\n @case (\"_selection\") {\r\n <ng-container [matColumnDef]=\"columnKey\">\r\n <th *matHeaderCellDef mat-header-cell class=\"selection\"></th>\r\n <td *matCellDef=\"let row\" mat-cell class=\"selection\">\r\n @if (row.id === null) {\r\n <mat-option></mat-option>\r\n } @else {\r\n <mat-option [value]=\"row\"></mat-option>\r\n }\r\n </td>\r\n </ng-container>\r\n }\r\n @default {\r\n <ng-container [matColumnDef]=\"columnKey\">\r\n <th *matHeaderCellDef mat-header-cell mat-sort-header [disabled]=\"!column?.sortable\">\r\n @if (!column?.sortable) {\r\n <div>{{ column?.name }}</div>\r\n } @else {\r\n @switch (column?.filter.type) {\r\n @case (\"string\") {\r\n <ng-container [ngTemplateOutlet]=\"filterTypeString\"\r\n [ngTemplateOutletContext]=\"getFilterContext(column)\"></ng-container>\r\n }\r\n @case (\"number\") {\r\n <ng-container [ngTemplateOutlet]=\"filterTypeNumber\"\r\n [ngTemplateOutletContext]=\"getFilterContext(column)\"></ng-container>\r\n }\r\n @default {\r\n <div>{{ column?.name }}</div>\r\n }\r\n }\r\n }\r\n </th>\r\n <td *matCellDef=\"let row\" mat-cell [colSpan]=\"\r\n hasNullRow && row.id === null && $index === 1\r\n ? tableColumns.length\r\n : 1\r\n \" [ngStyle]=\"{\r\n display:\r\n hasNullRow && row.id === null && $index !== 1\r\n ? 'none'\r\n : '',\r\n }\">\r\n <div class=\"has-label-on-mobile\" [attr.data-label]=\"column?.name + ':'\">\r\n {{\r\n hasNullRow && row.id === null && $index === 1\r\n ? \"\u7A7A\"\r\n : getCellValue(row, columnKey)\r\n }}\r\n </div>\r\n </td>\r\n </ng-container>\r\n }\r\n }\r\n }\r\n\r\n <tr *matHeaderRowDef=\"tableColumns(); sticky: true\" mat-header-row></tr>\r\n <tr *matRowDef=\"let row; columns: tableColumns()\" mat-row (click)=\"emulateMatOptionClick($event)\"></tr>\r\n </table>\r\n </div>\r\n</mat-select>\r\n}\r\n<ng-template #filterTypeString let-column=\"column\">\r\n <mat-form-field appearance=\"fill\" class=\"filter\" (click)=\"$event.stopPropagation()\">\r\n <input matInput [formControl]=\"filterFormControl(column.key)\" [placeholder]=\"column.name\"\r\n (keydown)=\"$event.stopPropagation()\" (keyup)=\"$event.stopPropagation()\" (keypress)=\"$event.stopPropagation()\" />\r\n </mat-form-field>\r\n</ng-template>\r\n\r\n<ng-template #filterTypeNumber let-column=\"column\">\r\n <mat-form-field appearance=\"fill\" class=\"filter\" (click)=\"$event.stopPropagation()\">\r\n <input matInput cmatDigitOnly [min]=\"0\" [formControl]=\"filterFormControl(column.key)\" [placeholder]=\"column.name\"\r\n (keydown)=\"$event.stopPropagation()\" (keyup)=\"$event.stopPropagation()\" (keypress)=\"$event.stopPropagation()\" />\r\n </mat-form-field>\r\n</ng-template>", styles: ["cmat-select-table{display:block;width:100%}.cmat-select-search-table-panel{min-width:max-content;max-width:100%;min-height:240px;padding-top:0!important}.cmat-select-search-table-panel .overall-search-toggle{z-index:102;display:flex;cursor:pointer;position:absolute;width:48px;height:48px;align-items:center;left:12px;top:0;pointer-events:auto}.cmat-select-search-table-panel .overall-search-toggle mat-icon{pointer-events:auto;-webkit-user-select:none;user-select:none}.cmat-select-search-table-panel .hidden-header table thead{display:none}.cmat-select-search-table-panel table{width:100%}.cmat-select-search-table-panel table tr{cursor:pointer;height:48px;max-height:48px}.cmat-select-search-table-panel table tr mat-option{height:48px;max-height:48px}.cmat-select-search-table-panel table tr td{-webkit-user-select:none;user-select:none;border-bottom:0!important;box-shadow:inset 0 -1px var(--cmat-border)}.cmat-select-search-table-panel table tr th .mat-sort-header-container{height:55px}.cmat-select-search-table-panel table tr th .mat-sort-header-container mat-form-field .mat-form-field-infix{width:initial}.cmat-select-search-table-panel table tr th[aria-sort] .mat-sort-header-arrow{opacity:1!important}.cmat-select-search-table-panel table tr td mat-option,.cmat-select-search-table-panel table tr th mat-option{background:transparent!important}.cmat-select-search-table-panel table tr td.selection,.cmat-select-search-table-panel table tr th.selection{width:48px;padding:0;margin:0}.cmat-select-search-table-panel table tr:has(td:first-child mat-option[aria-selected=true]){background-color:var(--mat-option-hover-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-hover-state-layer-opacity) * 100%), transparent))!important;color:rgba(var(--cmat-primary-rgb),1)!important}.cmat-select-search-table-panel .cmat-select-search-inner>span{visibility:hidden}\n"] }]
|
|
779
|
+
}], ctorParameters: () => [], propDecorators: { dataSource: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataSource", required: false }] }], noEntriesFoundLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "noEntriesFoundLabel", required: false }] }], showNoFoundLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "showNoFoundLabel", required: false }] }], isPhone: [{ type: i0.Input, args: [{ isSignal: true, alias: "isPhone", required: false }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], overallSearchEnabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "overallSearchEnabled", required: false }] }], overallSearchVisible: [{ type: i0.Input, args: [{ isSignal: true, alias: "overallSearchVisible", required: false }] }], resetSortOnOpen: [{ type: i0.Input, args: [{ isSignal: true, alias: "resetSortOnOpen", required: false }] }], resetFiltersOnOpen: [{ type: i0.Input, args: [{ isSignal: true, alias: "resetFiltersOnOpen", required: false }] }], customTriggerLabelFn: [{ type: i0.Input, args: [{ isSignal: true, alias: "customTriggerLabelFn", required: false }] }], triggerLabelSort: [{ type: i0.Input, args: [{ isSignal: true, alias: "triggerLabelSort", required: false }] }], customTriggerLabelTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "customTriggerLabelTemplate", required: false }] }], canNull: [{ type: i0.Input, args: [{ isSignal: true, alias: "canNull", required: false }] }], defaultSort: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultSort", required: false }] }], resetOptionAction: [{ type: i0.Input, args: [{ isSignal: true, alias: "resetOptionAction", required: false }] }], keyParam: [{ type: i0.Input, args: [{ isSignal: true, alias: "keyParam", required: false }] }], compareWith: [{ type: i0.Input, args: [{ isSignal: true, alias: "compareWith", required: false }] }], closed: [{ type: i0.Output, args: ["closed"] }], _matSelectSearch: [{ type: i0.ViewChild, args: [i0.forwardRef(() => CmatSelectSearchComponent), { isSignal: true }] }], _sort: [{ type: i0.ViewChild, args: [i0.forwardRef(() => MatSort), { isSignal: true }] }], _table: [{ type: i0.ViewChild, args: [i0.forwardRef(() => MatTable), { isSignal: true }] }], _matOptions: [{ type: i0.ViewChildren, args: [i0.forwardRef(() => MatOption), { isSignal: true }] }], _matSelectSignal: [{ type: i0.ViewChild, args: ['componentSelect', { isSignal: true }] }], clickedOut: [{
|
|
717
780
|
type: HostListener,
|
|
718
781
|
args: ['document:click']
|
|
719
782
|
}], placeholder: [{
|