ngx-st-tables 17.0.34 → 17.0.37
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/esm2022/lib/components/material-table/material-table-caption/material-table-caption.component.mjs +1 -1
- package/esm2022/lib/ngx-st-tables.module.mjs +6 -16
- package/esm2022/lib/services/st-tables-translations.service.mjs +14 -5
- package/esm2022/public-api.mjs +3 -11
- package/fesm2022/ngx-st-tables.mjs +58 -477
- package/fesm2022/ngx-st-tables.mjs.map +1 -1
- package/lib/ngx-st-tables.module.d.ts +35 -38
- package/lib/services/st-tables-translations.service.d.ts +5 -1
- package/package.json +1 -1
- package/public-api.d.ts +2 -10
|
@@ -1,52 +1,52 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
3
|
-
import * as
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import * as
|
|
8
|
-
import {
|
|
9
|
-
import * as
|
|
10
|
-
import { RouterModule } from '@angular/router';
|
|
11
|
-
import * as i4$2 from '@angular/common';
|
|
2
|
+
import { signal, Injectable, Optional, Inject, Component, ChangeDetectionStrategy, EventEmitter, Input, Output, ViewEncapsulation, ViewChild, NgModule } from '@angular/core';
|
|
3
|
+
import * as i2 from '@angular/forms';
|
|
4
|
+
import { FormControl, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
5
|
+
import { StSubscribeDestroyComponent, StBaseService, StBaseFunctionsModule } from 'ngx-st-base-functions';
|
|
6
|
+
import { takeUntil, distinctUntilChanged, debounceTime, take, filter } from 'rxjs/operators';
|
|
7
|
+
import * as i1 from '@angular/material/dialog';
|
|
8
|
+
import { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
|
|
9
|
+
import * as i4 from '@angular/common';
|
|
12
10
|
import { CommonModule } from '@angular/common';
|
|
13
|
-
import * as
|
|
11
|
+
import * as i5 from '@angular/material/button';
|
|
14
12
|
import { MatButtonModule } from '@angular/material/button';
|
|
15
|
-
import * as i5 from '@angular/material/icon';
|
|
13
|
+
import * as i5$1 from '@angular/material/icon';
|
|
16
14
|
import { MatIconModule } from '@angular/material/icon';
|
|
17
|
-
import * as
|
|
15
|
+
import * as i7 from '@angular/material/form-field';
|
|
18
16
|
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
19
|
-
import * as
|
|
17
|
+
import * as i8 from '@angular/material/input';
|
|
20
18
|
import { MatInputModule } from '@angular/material/input';
|
|
21
|
-
import * as
|
|
19
|
+
import * as i9 from '@angular/material/tooltip';
|
|
22
20
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
23
|
-
import * as
|
|
24
|
-
import { UntypedFormControl, FormControl, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
25
|
-
import * as i9$1 from '@angular/material/menu';
|
|
26
|
-
import { MatMenuModule } from '@angular/material/menu';
|
|
27
|
-
import * as i10$1 from '@angular/material/checkbox';
|
|
28
|
-
import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
29
|
-
import * as i9 from '@angular/material/select';
|
|
21
|
+
import * as i9$1 from '@angular/material/select';
|
|
30
22
|
import { MatSelectModule } from '@angular/material/select';
|
|
31
|
-
import * as
|
|
23
|
+
import * as i11 from '@angular/material/core';
|
|
32
24
|
import { MatNativeDateModule } from '@angular/material/core';
|
|
33
|
-
import * as
|
|
34
|
-
import { StDateFormatModule } from 'ngx-st-date-format';
|
|
35
|
-
import { StSubscribeDestroyComponent, StBaseService, StBaseFunctionsModule } from 'ngx-st-base-functions';
|
|
36
|
-
import { takeUntil, distinctUntilChanged, debounceTime, take, filter } from 'rxjs/operators';
|
|
37
|
-
import * as i1 from '@angular/material/dialog';
|
|
38
|
-
import { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
|
|
39
|
-
import * as i12$1 from '@angular/material/datepicker';
|
|
25
|
+
import * as i12 from '@angular/material/datepicker';
|
|
40
26
|
import { MatDatepickerModule } from '@angular/material/datepicker';
|
|
41
|
-
import * as i5$
|
|
27
|
+
import * as i5$2 from '@angular/cdk/drag-drop';
|
|
42
28
|
import { moveItemInArray, CdkDropList, CdkDrag } from '@angular/cdk/drag-drop';
|
|
43
|
-
import * as i11 from '@angular/material/badge';
|
|
29
|
+
import * as i11$1 from '@angular/material/badge';
|
|
44
30
|
import { MatBadge } from '@angular/material/badge';
|
|
31
|
+
import * as i7$1 from '@angular/material/paginator';
|
|
32
|
+
import { MatPaginator, MatPaginatorModule } from '@angular/material/paginator';
|
|
33
|
+
import * as i8$2 from '@angular/material/sort';
|
|
34
|
+
import { MatSort, MatSortModule } from '@angular/material/sort';
|
|
35
|
+
import * as i6 from '@angular/material/table';
|
|
36
|
+
import { MatTableDataSource, MatTableModule } from '@angular/material/table';
|
|
45
37
|
import { SelectionModel } from '@angular/cdk/collections';
|
|
46
38
|
import * as i1$1 from 'ngx-st-snack-bar';
|
|
47
39
|
import { StSnackBarModule } from 'ngx-st-snack-bar';
|
|
48
|
-
import * as
|
|
40
|
+
import * as i9$2 from '@angular/material/menu';
|
|
41
|
+
import { MatMenuModule } from '@angular/material/menu';
|
|
42
|
+
import * as i10 from '@angular/material/checkbox';
|
|
43
|
+
import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
44
|
+
import * as i11$3 from '@angular/material/progress-spinner';
|
|
49
45
|
import { MatProgressSpinner } from '@angular/material/progress-spinner';
|
|
46
|
+
import * as i8$1 from '@angular/router';
|
|
47
|
+
import { RouterModule } from '@angular/router';
|
|
48
|
+
import * as i11$2 from 'ngx-st-date-format';
|
|
49
|
+
import { StDateFormatModule } from 'ngx-st-date-format';
|
|
50
50
|
import { MatExpansionModule } from '@angular/material/expansion';
|
|
51
51
|
import { InputTextModule } from 'primeng/inputtext';
|
|
52
52
|
import { PrimeTemplate } from 'primeng/api';
|
|
@@ -54,428 +54,6 @@ import { StQtyInputModule } from 'ngx-st-qty-input';
|
|
|
54
54
|
import { TableModule } from 'primeng/table';
|
|
55
55
|
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
|
|
56
56
|
|
|
57
|
-
class LocalTableService {
|
|
58
|
-
constructor() {
|
|
59
|
-
this.localStorageName = '';
|
|
60
|
-
}
|
|
61
|
-
getConfigs() {
|
|
62
|
-
if (this.checkLocalStorageName()) {
|
|
63
|
-
return JSON.parse(localStorage.getItem(this.localStorageName) || '[]');
|
|
64
|
-
}
|
|
65
|
-
return [];
|
|
66
|
-
}
|
|
67
|
-
saveConfigs(configs) {
|
|
68
|
-
if (this.checkLocalStorageName()) {
|
|
69
|
-
localStorage.setItem(this.localStorageName, JSON.stringify(configs));
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
checkLocalStorageName() {
|
|
73
|
-
if (this.localStorageName) {
|
|
74
|
-
return true;
|
|
75
|
-
}
|
|
76
|
-
else {
|
|
77
|
-
console.warn('Yiu have to add configurationsSettings');
|
|
78
|
-
return false;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: LocalTableService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
82
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: LocalTableService, providedIn: 'root' }); }
|
|
83
|
-
}
|
|
84
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: LocalTableService, decorators: [{
|
|
85
|
-
type: Injectable,
|
|
86
|
-
args: [{
|
|
87
|
-
providedIn: 'root',
|
|
88
|
-
}]
|
|
89
|
-
}], ctorParameters: () => [] });
|
|
90
|
-
|
|
91
|
-
class ConfigurationsComponent {
|
|
92
|
-
set initSelectedConfig(config) {
|
|
93
|
-
this.selectedConfig = config;
|
|
94
|
-
}
|
|
95
|
-
constructor() {
|
|
96
|
-
this.createNewConfig = new EventEmitter();
|
|
97
|
-
this.removeConfig = new EventEmitter();
|
|
98
|
-
this.changeConfig = new EventEmitter();
|
|
99
|
-
this.creatingConfiguration = false;
|
|
100
|
-
this.createConfigurationName = '';
|
|
101
|
-
this.removingConfiguration = false;
|
|
102
|
-
}
|
|
103
|
-
ngOnInit() { }
|
|
104
|
-
showCreateConfiguration() {
|
|
105
|
-
this.creatingConfiguration = true;
|
|
106
|
-
this.createConfigurationName = '';
|
|
107
|
-
}
|
|
108
|
-
hideCreateConfiguration() {
|
|
109
|
-
this.creatingConfiguration = false;
|
|
110
|
-
this.createConfigurationName = '';
|
|
111
|
-
}
|
|
112
|
-
saveCreateConfiguration() {
|
|
113
|
-
this.creatingConfiguration = false;
|
|
114
|
-
this.selectedConfig = null;
|
|
115
|
-
this.createNewConfig.emit(this.createConfigurationName);
|
|
116
|
-
}
|
|
117
|
-
deleteConfiguration() {
|
|
118
|
-
this.removingConfiguration = true;
|
|
119
|
-
}
|
|
120
|
-
acceptDeleteConfiguration() {
|
|
121
|
-
this.removingConfiguration = false;
|
|
122
|
-
this.selectedConfig = null;
|
|
123
|
-
this.removeConfig.emit(this.selectedConfig.configId);
|
|
124
|
-
}
|
|
125
|
-
declineDeleteConfiguration() {
|
|
126
|
-
this.removingConfiguration = false;
|
|
127
|
-
}
|
|
128
|
-
selectedConfigChanged() {
|
|
129
|
-
this.changeConfig.emit(this.selectedConfig?.configId || null);
|
|
130
|
-
}
|
|
131
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ConfigurationsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
132
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: ConfigurationsComponent, selector: "st-configurations[configurationsSettings]", inputs: { configurationsSettings: "configurationsSettings", configurations: "configurations", initSelectedConfig: "initSelectedConfig" }, outputs: { createNewConfig: "createNewConfig", removeConfig: "removeConfig", changeConfig: "changeConfig" }, ngImport: i0, template: "<div class=\"col-auto row align-items-center\" style=\"padding: 0\">\r\n @if (!creatingConfiguration && !removingConfiguration) {\r\n <mat-form-field class=\"col-auto\" style=\"padding-right: 0\">\r\n <mat-label>{{ configurationsSettings.selectLabel }}</mat-label>\r\n <mat-select\r\n [(ngModel)]=\"selectedConfig\"\r\n (ngModelChange)=\"selectedConfigChanged()\"\r\n >\r\n <mat-option [value]=\"null\"></mat-option>\r\n @for (config of configurations; track config) {\r\n <mat-option [value]=\"config\">{{ config.configName }}</mat-option>\r\n }\r\n </mat-select>\r\n </mat-form-field>\r\n <button\r\n mat-icon-button\r\n class=\"col-auto green-icon\"\r\n (click)=\"showCreateConfiguration()\"\r\n >\r\n <mat-icon> add </mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n class=\"col-auto red-icon\"\r\n [disabled]=\"!selectedConfig\"\r\n (click)=\"deleteConfiguration()\"\r\n >\r\n <mat-icon> delete </mat-icon>\r\n </button>\r\n }\r\n\r\n @if (creatingConfiguration) {\r\n <mat-form-field class=\"col-auto\">\r\n <mat-label>{{ configurationsSettings.createLabel }}</mat-label>\r\n <input matInput [(ngModel)]=\"createConfigurationName\" />\r\n </mat-form-field>\r\n <button\r\n mat-icon-button\r\n class=\"col-auto green-icon\"\r\n (click)=\"saveCreateConfiguration()\"\r\n [disabled]=\"!createConfigurationName\"\r\n >\r\n <mat-icon> done </mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n class=\"col-auto red-icon\"\r\n (click)=\"hideCreateConfiguration()\"\r\n >\r\n <mat-icon> close </mat-icon>\r\n </button>\r\n }\r\n\r\n @if (removingConfiguration) {\r\n <p class=\"col-auto\" style=\"margin: 0; font-weight: bold; font-size: 16px\">\r\n {{ configurationsSettings.deleteWarningTitle }}\r\n </p>\r\n <button\r\n mat-icon-button\r\n class=\"col-auto green-icon\"\r\n (click)=\"acceptDeleteConfiguration()\"\r\n >\r\n <mat-icon> done </mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n class=\"col-auto red-icon\"\r\n (click)=\"declineDeleteConfiguration()\"\r\n >\r\n <mat-icon> close </mat-icon>\r\n </button>\r\n }\r\n</div>\r\n", styles: [".green-icon span{color:#2e7d32}.red-icon span{color:#c62828}\n"], dependencies: [{ kind: "component", type: i4.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i9.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"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i7.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }] }); }
|
|
133
|
-
}
|
|
134
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ConfigurationsComponent, decorators: [{
|
|
135
|
-
type: Component,
|
|
136
|
-
args: [{ selector: 'st-configurations[configurationsSettings]', template: "<div class=\"col-auto row align-items-center\" style=\"padding: 0\">\r\n @if (!creatingConfiguration && !removingConfiguration) {\r\n <mat-form-field class=\"col-auto\" style=\"padding-right: 0\">\r\n <mat-label>{{ configurationsSettings.selectLabel }}</mat-label>\r\n <mat-select\r\n [(ngModel)]=\"selectedConfig\"\r\n (ngModelChange)=\"selectedConfigChanged()\"\r\n >\r\n <mat-option [value]=\"null\"></mat-option>\r\n @for (config of configurations; track config) {\r\n <mat-option [value]=\"config\">{{ config.configName }}</mat-option>\r\n }\r\n </mat-select>\r\n </mat-form-field>\r\n <button\r\n mat-icon-button\r\n class=\"col-auto green-icon\"\r\n (click)=\"showCreateConfiguration()\"\r\n >\r\n <mat-icon> add </mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n class=\"col-auto red-icon\"\r\n [disabled]=\"!selectedConfig\"\r\n (click)=\"deleteConfiguration()\"\r\n >\r\n <mat-icon> delete </mat-icon>\r\n </button>\r\n }\r\n\r\n @if (creatingConfiguration) {\r\n <mat-form-field class=\"col-auto\">\r\n <mat-label>{{ configurationsSettings.createLabel }}</mat-label>\r\n <input matInput [(ngModel)]=\"createConfigurationName\" />\r\n </mat-form-field>\r\n <button\r\n mat-icon-button\r\n class=\"col-auto green-icon\"\r\n (click)=\"saveCreateConfiguration()\"\r\n [disabled]=\"!createConfigurationName\"\r\n >\r\n <mat-icon> done </mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n class=\"col-auto red-icon\"\r\n (click)=\"hideCreateConfiguration()\"\r\n >\r\n <mat-icon> close </mat-icon>\r\n </button>\r\n }\r\n\r\n @if (removingConfiguration) {\r\n <p class=\"col-auto\" style=\"margin: 0; font-weight: bold; font-size: 16px\">\r\n {{ configurationsSettings.deleteWarningTitle }}\r\n </p>\r\n <button\r\n mat-icon-button\r\n class=\"col-auto green-icon\"\r\n (click)=\"acceptDeleteConfiguration()\"\r\n >\r\n <mat-icon> done </mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n class=\"col-auto red-icon\"\r\n (click)=\"declineDeleteConfiguration()\"\r\n >\r\n <mat-icon> close </mat-icon>\r\n </button>\r\n }\r\n</div>\r\n", styles: [".green-icon span{color:#2e7d32}.red-icon span{color:#c62828}\n"] }]
|
|
137
|
-
}], ctorParameters: () => [], propDecorators: { configurationsSettings: [{
|
|
138
|
-
type: Input
|
|
139
|
-
}], configurations: [{
|
|
140
|
-
type: Input
|
|
141
|
-
}], initSelectedConfig: [{
|
|
142
|
-
type: Input
|
|
143
|
-
}], createNewConfig: [{
|
|
144
|
-
type: Output
|
|
145
|
-
}], removeConfig: [{
|
|
146
|
-
type: Output
|
|
147
|
-
}], changeConfig: [{
|
|
148
|
-
type: Output
|
|
149
|
-
}] } });
|
|
150
|
-
|
|
151
|
-
class LocalTableComponent {
|
|
152
|
-
set columns(columns) {
|
|
153
|
-
this._columns = columns;
|
|
154
|
-
this.columnsArray = this.getColumnsArray();
|
|
155
|
-
this.setDisplayedColumns();
|
|
156
|
-
}
|
|
157
|
-
get columns() {
|
|
158
|
-
return this._columns;
|
|
159
|
-
}
|
|
160
|
-
set data(data) {
|
|
161
|
-
this._data = data || [];
|
|
162
|
-
this.setTableSource();
|
|
163
|
-
}
|
|
164
|
-
get data() {
|
|
165
|
-
return this._data;
|
|
166
|
-
}
|
|
167
|
-
constructor(localTableService, changeDetectorRef, router, activatedRoute) {
|
|
168
|
-
this.localTableService = localTableService;
|
|
169
|
-
this.changeDetectorRef = changeDetectorRef;
|
|
170
|
-
this.router = router;
|
|
171
|
-
this.activatedRoute = activatedRoute;
|
|
172
|
-
this.pageSize = 10;
|
|
173
|
-
this.allowPickColumns = false;
|
|
174
|
-
this.localStorageName = '';
|
|
175
|
-
this.bindSearchToUrl = false;
|
|
176
|
-
this._columns = {};
|
|
177
|
-
this._data = [];
|
|
178
|
-
this.searchModel = '';
|
|
179
|
-
this.displayedColumns = [];
|
|
180
|
-
this.configurations = [];
|
|
181
|
-
this.initConfig = null;
|
|
182
|
-
this.activeConfig = null;
|
|
183
|
-
this.pageIndex = 0;
|
|
184
|
-
}
|
|
185
|
-
ngOnInit() {
|
|
186
|
-
if (this.localStorageName) {
|
|
187
|
-
const pageSize = localStorage.getItem(this.localStorageName);
|
|
188
|
-
if (pageSize) {
|
|
189
|
-
this.pageSize = parseInt(pageSize);
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
if (this.configurationsSettings) {
|
|
193
|
-
this.localTableService.localStorageName =
|
|
194
|
-
this.configurationsSettings?.localStorageName || '';
|
|
195
|
-
this.loadConfigs();
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
ngAfterViewInit() {
|
|
199
|
-
if (this.configurationsSettings) {
|
|
200
|
-
this.paginator.page.subscribe(res => {
|
|
201
|
-
if (this.activeConfig) {
|
|
202
|
-
this.activeConfig.pageSize = res.pageSize;
|
|
203
|
-
this.updateConfigsToLocalStorage();
|
|
204
|
-
}
|
|
205
|
-
});
|
|
206
|
-
this.sort.sortChange.subscribe(res => {
|
|
207
|
-
if (this.activeConfig) {
|
|
208
|
-
this.activeConfig.sortFieldName = res.active;
|
|
209
|
-
this.activeConfig.sortDirection = res.direction;
|
|
210
|
-
this.updateConfigsToLocalStorage();
|
|
211
|
-
}
|
|
212
|
-
});
|
|
213
|
-
}
|
|
214
|
-
if (this.bindSearchToUrl) {
|
|
215
|
-
const params = new URLSearchParams(location.search);
|
|
216
|
-
this.sort.sortChange.subscribe(res => {
|
|
217
|
-
this.updateSearchToUrl();
|
|
218
|
-
});
|
|
219
|
-
if (params.get('stLocalTablePageIndex')) {
|
|
220
|
-
this.pageIndex = parseInt(params.get('stLocalTablePageIndex') || '');
|
|
221
|
-
}
|
|
222
|
-
if (params.get('stLocalTablePageSize')) {
|
|
223
|
-
this.pageSize = parseInt(params.get('stLocalTablePageSize') || '');
|
|
224
|
-
}
|
|
225
|
-
if (params.get('stLocalTableSortFieldName') &&
|
|
226
|
-
params.get('stLocalTableSortDirection')) {
|
|
227
|
-
this.sort.sort({
|
|
228
|
-
id: params.get('stLocalTableSortFieldName') || '',
|
|
229
|
-
start: params.get('stLocalTableSortDirection') || 'asc',
|
|
230
|
-
disableClear: false,
|
|
231
|
-
});
|
|
232
|
-
}
|
|
233
|
-
this.searchModel = params.get('stLocalTableSearch') || '';
|
|
234
|
-
if (this.searchModel) {
|
|
235
|
-
this.tableSource.filter = this.searchModel.trim().toLowerCase();
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
this.paginator.pageSize = this.pageSize;
|
|
239
|
-
}
|
|
240
|
-
applySearch() {
|
|
241
|
-
this.tableSource.filter = this.searchModel.trim().toLowerCase();
|
|
242
|
-
this.pageIndex = 0;
|
|
243
|
-
this.updateSearchToUrl();
|
|
244
|
-
}
|
|
245
|
-
clearSearch() {
|
|
246
|
-
this.searchModel = '';
|
|
247
|
-
this.tableSource.filter = this.searchModel;
|
|
248
|
-
this.pageIndex = 0;
|
|
249
|
-
this.updateSearchToUrl();
|
|
250
|
-
}
|
|
251
|
-
checkIfActionVisible(row, action) {
|
|
252
|
-
if (action.show) {
|
|
253
|
-
return action.show(row);
|
|
254
|
-
}
|
|
255
|
-
else {
|
|
256
|
-
return true;
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
columnVisibleChanged(column) {
|
|
260
|
-
this.setDisplayedColumns();
|
|
261
|
-
this.updateConfigsToLocalStorage();
|
|
262
|
-
}
|
|
263
|
-
newConfigCreated(name) {
|
|
264
|
-
const newConfig = this.generateNewConfig(name);
|
|
265
|
-
this.configurations.push(newConfig);
|
|
266
|
-
this.updateConfigsToLocalStorage();
|
|
267
|
-
this.initConfig = newConfig;
|
|
268
|
-
}
|
|
269
|
-
configRemoved(configId) {
|
|
270
|
-
this.configurations = this.configurations.filter(config => config.configId !== configId);
|
|
271
|
-
this.updateConfigsToLocalStorage();
|
|
272
|
-
}
|
|
273
|
-
configChanged(configId) {
|
|
274
|
-
this.activeConfig = configId
|
|
275
|
-
? this.configurations.find(config => config.configId === configId)
|
|
276
|
-
: null;
|
|
277
|
-
if (this.activeConfig) {
|
|
278
|
-
this.setTableConfig(this.activeConfig.pageSize, this.activeConfig.columnsDisabled, this.activeConfig.sortFieldName, this.activeConfig.sortDirection);
|
|
279
|
-
}
|
|
280
|
-
else {
|
|
281
|
-
this.setTableConfig(this.pageSize, [], null, null);
|
|
282
|
-
this.clearSearch();
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
pageChanged(event) {
|
|
286
|
-
this.pageIndex = event.pageIndex;
|
|
287
|
-
this.updateSearchToUrl();
|
|
288
|
-
}
|
|
289
|
-
updateSearchToUrl() {
|
|
290
|
-
if (this.bindSearchToUrl) {
|
|
291
|
-
let queryParams = {
|
|
292
|
-
stLocalTableSearch: this.searchModel,
|
|
293
|
-
stLocalTablePageIndex: this.pageIndex,
|
|
294
|
-
stLocalTablePageSize: this.paginator.pageSize,
|
|
295
|
-
stLocalTableSortFieldName: '',
|
|
296
|
-
stLocalTableSortDirection: '',
|
|
297
|
-
};
|
|
298
|
-
if (this.sort.direction && this.sort.active) {
|
|
299
|
-
queryParams = {
|
|
300
|
-
...queryParams,
|
|
301
|
-
stLocalTableSortFieldName: this.sort.active,
|
|
302
|
-
stLocalTableSortDirection: this.sort.direction,
|
|
303
|
-
};
|
|
304
|
-
}
|
|
305
|
-
this.router.navigate(['./'], {
|
|
306
|
-
queryParams: queryParams,
|
|
307
|
-
relativeTo: this.activatedRoute,
|
|
308
|
-
});
|
|
309
|
-
}
|
|
310
|
-
}
|
|
311
|
-
updateConfigsToLocalStorage() {
|
|
312
|
-
this.localTableService.saveConfigs(this.configurations);
|
|
313
|
-
}
|
|
314
|
-
setTableSource() {
|
|
315
|
-
this.tableSource = new MatTableDataSource(this._data);
|
|
316
|
-
this.tableSource.paginator = this.paginator;
|
|
317
|
-
this.tableSource.sort = this.sort;
|
|
318
|
-
this.tableSource.filter = this.searchModel;
|
|
319
|
-
this.changeDetectorRef.markForCheck();
|
|
320
|
-
}
|
|
321
|
-
setDisplayedColumns() {
|
|
322
|
-
this.displayedColumns = Object.keys(this.columns).filter(column => {
|
|
323
|
-
return this._columns[column].visible;
|
|
324
|
-
});
|
|
325
|
-
}
|
|
326
|
-
getColumnsArray() {
|
|
327
|
-
return Object.keys(this._columns).map(column => this._columns[column]);
|
|
328
|
-
}
|
|
329
|
-
loadConfigs() {
|
|
330
|
-
this.configurations = this.localTableService.getConfigs();
|
|
331
|
-
}
|
|
332
|
-
generateNewConfig(configName) {
|
|
333
|
-
return {
|
|
334
|
-
configId: Date.now().toString(),
|
|
335
|
-
configName: configName,
|
|
336
|
-
columnsDisabled: this.columnsArray
|
|
337
|
-
.filter(column => !column.visible)
|
|
338
|
-
.map(column => column.translateColumnName),
|
|
339
|
-
pageSize: this.paginator.pageSize,
|
|
340
|
-
sortFieldName: this.sort.direction && this.sort.active ? this.sort.active : null,
|
|
341
|
-
sortDirection: this.sort.direction || null,
|
|
342
|
-
};
|
|
343
|
-
}
|
|
344
|
-
setTableConfig(pageSize, disabledColumns, sortFieldName, sortDirection) {
|
|
345
|
-
this.paginator.pageSize = pageSize;
|
|
346
|
-
this.sort.sort({
|
|
347
|
-
id: sortFieldName || '',
|
|
348
|
-
start: sortDirection || 'asc',
|
|
349
|
-
disableClear: false,
|
|
350
|
-
});
|
|
351
|
-
this.columnsArray.forEach(column => {
|
|
352
|
-
column.visible =
|
|
353
|
-
disabledColumns.indexOf(column.translateColumnName) === -1;
|
|
354
|
-
});
|
|
355
|
-
this.setDisplayedColumns();
|
|
356
|
-
}
|
|
357
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: LocalTableComponent, deps: [{ token: LocalTableService }, { token: i0.ChangeDetectorRef }, { token: i2$1.Router }, { token: i2$1.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
358
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: LocalTableComponent, selector: "ngx-st-local-table", inputs: { tableSettings: "tableSettings", globalSearchSettings: "globalSearchSettings", pageSize: "pageSize", allowPickColumns: "allowPickColumns", configurationsSettings: "configurationsSettings", localStorageName: "localStorageName", bindSearchToUrl: "bindSearchToUrl", columns: "columns", data: "data" }, viewQueries: [{ propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true }, { propertyName: "sort", first: true, predicate: MatSort, descendants: true }], ngImport: i0, template: "<div class=\"local-table\">\r\n <div class=\"row align-items-center\">\r\n @if (configurationsSettings || allowPickColumns) {\r\n <div class=\"col row align-items-center\" style=\"padding: 0\">\r\n @if (allowPickColumns) {\r\n <div class=\"col-auto\" style=\"padding: 0\">\r\n <button\r\n mat-icon-button\r\n class=\"col-auto\"\r\n [matMenuTriggerFor]=\"columnsMenu\"\r\n >\r\n <mat-icon> view_week </mat-icon>\r\n </button>\r\n <mat-menu #columnsMenu=\"matMenu\" xPosition=\"after\">\r\n @for (column of columnsArray; track column) {\r\n @if (!column.notShowInColumnPick) {\r\n <div mat-menu-item>\r\n <mat-checkbox\r\n [(ngModel)]=\"column.visible\"\r\n (ngModelChange)=\"columnVisibleChanged(column)\"\r\n style=\"margin-top: 5px\"\r\n (click)=\"$event.stopPropagation()\"\r\n >\r\n {{ column.translateColumnName }}\r\n </mat-checkbox>\r\n </div>\r\n }\r\n }\r\n </mat-menu>\r\n </div>\r\n }\r\n @if (configurationsSettings) {\r\n <st-configurations\r\n [configurationsSettings]=\"configurationsSettings\"\r\n [configurations]=\"configurations\"\r\n [initSelectedConfig]=\"initConfig\"\r\n (createNewConfig)=\"newConfigCreated($event)\"\r\n (removeConfig)=\"configRemoved($event)\"\r\n (changeConfig)=\"configChanged($event)\"\r\n ></st-configurations>\r\n }\r\n </div>\r\n }\r\n\r\n @if (globalSearchSettings?.show) {\r\n <div class=\"col\" style=\"padding: 0; margin-bottom: -15px\">\r\n <mat-form-field>\r\n <mat-label>{{ globalSearchSettings?.label || 'Search' }}</mat-label>\r\n <input matInput (keyup)=\"applySearch()\" [(ngModel)]=\"searchModel\" />\r\n <button\r\n matSuffix\r\n mat-icon-button\r\n aria-label=\"Clear\"\r\n (click)=\"clearSearch()\"\r\n >\r\n <mat-icon style=\"font-size: 22px\">close</mat-icon>\r\n </button>\r\n </mat-form-field>\r\n </div>\r\n }\r\n </div>\r\n\r\n <table\r\n [ngClass]=\"{ 'no-hover': !tableSettings?.rowClickAction }\"\r\n mat-table\r\n [dataSource]=\"tableSource\"\r\n matSort\r\n >\r\n @for (column of displayedColumns; track column) {\r\n <ng-container [matColumnDef]=\"column\">\r\n <th\r\n mat-header-cell\r\n *matHeaderCellDef\r\n style=\"{{\r\n columns[column].width ? 'width:' + columns[column].width : ''\r\n }}\"\r\n mat-sort-header\r\n [disabled]=\"!columns[column].sort\"\r\n >\r\n {{ columns[column].translateColumnName }}\r\n @if (columns[column].search) {\r\n <mat-icon\r\n class=\"search-icon\"\r\n [matMenuTriggerFor]=\"menu\"\r\n (click)=\"$event.stopPropagation()\"\r\n >\r\n search\r\n </mat-icon>\r\n }\r\n <mat-menu #menu=\"matMenu\" xPosition=\"before\">\r\n <mat-form-field class=\"col\">\r\n <mat-label>{{\r\n columns[column].searchLabel || 'Search'\r\n }}</mat-label>\r\n <input\r\n matInput\r\n (keyup)=\"applySearch()\"\r\n [(ngModel)]=\"searchModel\"\r\n (click)=\"$event.stopPropagation()\"\r\n />\r\n <button\r\n matSuffix\r\n mat-icon-button\r\n aria-label=\"Clear\"\r\n (click)=\"searchModel = ''\"\r\n >\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n </mat-form-field>\r\n </mat-menu>\r\n </th>\r\n <td\r\n mat-cell\r\n *matCellDef=\"let element\"\r\n style=\"{{\r\n columns[column].width ? 'width:' + columns[column].width : ''\r\n }}\"\r\n >\r\n @if (columns[column].actions && columns[column].actions!.length > 0) {\r\n <div\r\n class=\"actions-container\"\r\n style=\"overflow-y: hidden\"\r\n [ngClass]=\"{ 'justify-content-end': columns[column].flexRight }\"\r\n >\r\n @for (action of columns[column].actions; track action) {\r\n @if (checkIfActionVisible(element, action)) {\r\n @if (!action.url && action.action) {\r\n <button\r\n style=\"padding: 7px 7px; width: 40px; height: 40px\"\r\n class=\"col-auto\"\r\n mat-icon-button\r\n type=\"button\"\r\n matTooltip=\"{{ action.tooltipName || '' }}\"\r\n [matTooltipDisabled]=\"!!!action.tooltipName\"\r\n (click)=\"action.action(element)\"\r\n >\r\n <mat-icon>{{ action.iconName }}</mat-icon>\r\n </button>\r\n }\r\n @if (action.url) {\r\n <a [routerLink]=\"action.url\">\r\n <button\r\n class=\"col-auto\"\r\n mat-icon-button\r\n type=\"button\"\r\n matTooltip=\"{{ action.tooltipName || '' }}\"\r\n [matTooltipDisabled]=\"!!!action.tooltipName\"\r\n >\r\n <mat-icon>{{ action.iconName }}</mat-icon>\r\n </button>\r\n </a>\r\n }\r\n }\r\n }\r\n </div>\r\n }\r\n @if (!columns[column].actions) {\r\n @if (columns[column].translateValue) {\r\n <p style=\"margin: 0; padding: 0\">\r\n {{ columns[column].translateValue![element[column]] || '' }}\r\n </p>\r\n }\r\n @if (!columns[column].translateValue) {\r\n @if (!columns[column].type || columns[column].type === 'string') {\r\n <p style=\"margin: 0; padding: 0\">{{ element[column] }}</p>\r\n }\r\n @if (columns[column].type === 'date') {\r\n <p style=\"margin: 0; padding: 0\">\r\n {{ element[column] | stDateTimeFormatPipe }}\r\n </p>\r\n }\r\n }\r\n }\r\n </td>\r\n </ng-container>\r\n }\r\n\r\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\r\n <tr\r\n mat-row\r\n *matRowDef=\"let row; columns: displayedColumns\"\r\n (click)=\"\r\n tableSettings?.rowClickAction ? tableSettings.rowClickAction(row) : null\r\n \"\r\n ></tr>\r\n </table>\r\n <mat-paginator\r\n [pageIndex]=\"pageIndex\"\r\n [pageSizeOptions]=\"[5, 10, 15, 20, 25]\"\r\n (page)=\"pageChanged($event)\"\r\n [showFirstLastButtons]=\"true\"\r\n ></mat-paginator>\r\n</div>\r\n", styles: ["", ".st-material-table .search-form button{height:40px}.st-material-table .search-form mat-form-field:first-child{padding-left:0}.st-material-table .search-form mat-form-field:last-child{padding-right:0}.st-material-table .search-form .clear{padding:0}.st-material-table .search-form .clear mat-icon{height:20px;width:20px;font-size:20px;cursor:pointer}.st-material-table table{width:100%;box-shadow:none}.st-material-table table th.mat-mdc-header-cell,.st-material-table table td.mat-mdc-cell,.st-material-table table td.mat-mdc-footer-cell{padding:0}.st-material-table table th.mat-mdc-header-cell:first-of-type,.st-material-table table td.mat-mdc-cell:first-of-type,.st-material-table table td.mat-mdc-footer-cell:first-of-type{padding-left:12px}.st-material-table table th.mat-mdc-header-cell:last-of-type,.st-material-table table td.mat-mdc-cell:last-of-type,.st-material-table table td.mat-mdc-footer-cell:last-of-type{padding-right:12px}.st-material-table table thead tr{background-color:#fff9c4;height:40px!important}.st-material-table table thead tr th{border-color:#fdd835;font-size:.9rem;font-weight:600;color:#424242}.st-material-table table tbody{background-color:transparent!important}.st-material-table table tbody>tr{cursor:pointer}.st-material-table table tbody>tr.active{background-color:#a5d6a7}.st-material-table table tbody>tr.active td{border-bottom-color:#81c784!important}.st-material-table table tbody>tr:hover{background-color:#f5f5f5}.st-material-table table tbody>tr.disabled{cursor:not-allowed}.st-material-table table tbody>tr.disabled:hover{background-color:inherit!important}.st-material-table table tbody>tr.detail-row{height:0;cursor:default}.st-material-table table tbody>tr.detail-row:hover{background-color:transparent}.st-material-table table tbody>tr.detail-row .element-detail{overflow:hidden;display:flex}.st-material-table table tbody>tr.detail-row .element-detail p{padding:20px 0;margin-bottom:0;white-space:pre-wrap}.st-material-table table tbody>tr td i.active-row{color:#1b5e20;font-weight:700;font-size:25px;height:25px;width:25px;margin-top:2px}.st-material-table table tbody>tr td>div{max-height:200px;overflow:hidden;overflow-y:auto}.st-material-table table tbody>tr td a button{color:#000}.st-material-table table tbody>tr td a mat-icon{color:#333}.st-material-table table .mat-column-active{width:48px}.st-material-table table.no-hover tbody tr{cursor:default}.st-material-table table.no-hover tbody tr.active{background-color:transparent!important}.st-material-table table.no-hover tbody tr.active td{border-bottom-color:#0000001f!important}.st-material-table table.no-hover tbody tr:hover{background-color:transparent!important}.st-material-table table.no-hover tbody tr:hover td{border-bottom-color:#0000001f!important}.st-material-table table.admin-table .actions-cell{width:100px}.dark-theme .st-material-table table{background-color:transparent!important}.dark-theme .st-material-table table thead tr{background-color:#5e4803!important}.dark-theme .st-material-table table thead tr th{border-color:#816204!important;color:#e0e0e0!important}.dark-theme .st-material-table tbody tr:hover{background-color:var(--primeng-table-hover-background)!important}.dark-theme mat-paginator{background-color:transparent!important}.dark-theme .reorder-column-list .reorder-column-element{background-color:#424242!important;color:#eee!important}.dark-theme .reorder-column-list .reorder-column-element p,.dark-theme .reorder-column-list .reorder-column-element mat-icon{color:#eee!important}.dark-theme .filter .filter-title{color:#eee!important}\n"], dependencies: [{ kind: "directive", type: i4$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i4.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { 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: "component", type: i7$1.MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8.MatLabel, selector: "mat-label" }, { kind: "directive", type: i8.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: i4$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i10.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i12.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i12.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: i9$1.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i9$1.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i9$1.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "component", type: i10$1.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "component", type: ConfigurationsComponent, selector: "st-configurations[configurationsSettings]", inputs: ["configurationsSettings", "configurations", "initSelectedConfig"], outputs: ["createNewConfig", "removeConfig", "changeConfig"] }, { kind: "pipe", type: i16.DateTimeFormatPipe, name: "stDateTimeFormatPipe" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
359
|
-
}
|
|
360
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: LocalTableComponent, decorators: [{
|
|
361
|
-
type: Component,
|
|
362
|
-
args: [{ selector: 'ngx-st-local-table', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"local-table\">\r\n <div class=\"row align-items-center\">\r\n @if (configurationsSettings || allowPickColumns) {\r\n <div class=\"col row align-items-center\" style=\"padding: 0\">\r\n @if (allowPickColumns) {\r\n <div class=\"col-auto\" style=\"padding: 0\">\r\n <button\r\n mat-icon-button\r\n class=\"col-auto\"\r\n [matMenuTriggerFor]=\"columnsMenu\"\r\n >\r\n <mat-icon> view_week </mat-icon>\r\n </button>\r\n <mat-menu #columnsMenu=\"matMenu\" xPosition=\"after\">\r\n @for (column of columnsArray; track column) {\r\n @if (!column.notShowInColumnPick) {\r\n <div mat-menu-item>\r\n <mat-checkbox\r\n [(ngModel)]=\"column.visible\"\r\n (ngModelChange)=\"columnVisibleChanged(column)\"\r\n style=\"margin-top: 5px\"\r\n (click)=\"$event.stopPropagation()\"\r\n >\r\n {{ column.translateColumnName }}\r\n </mat-checkbox>\r\n </div>\r\n }\r\n }\r\n </mat-menu>\r\n </div>\r\n }\r\n @if (configurationsSettings) {\r\n <st-configurations\r\n [configurationsSettings]=\"configurationsSettings\"\r\n [configurations]=\"configurations\"\r\n [initSelectedConfig]=\"initConfig\"\r\n (createNewConfig)=\"newConfigCreated($event)\"\r\n (removeConfig)=\"configRemoved($event)\"\r\n (changeConfig)=\"configChanged($event)\"\r\n ></st-configurations>\r\n }\r\n </div>\r\n }\r\n\r\n @if (globalSearchSettings?.show) {\r\n <div class=\"col\" style=\"padding: 0; margin-bottom: -15px\">\r\n <mat-form-field>\r\n <mat-label>{{ globalSearchSettings?.label || 'Search' }}</mat-label>\r\n <input matInput (keyup)=\"applySearch()\" [(ngModel)]=\"searchModel\" />\r\n <button\r\n matSuffix\r\n mat-icon-button\r\n aria-label=\"Clear\"\r\n (click)=\"clearSearch()\"\r\n >\r\n <mat-icon style=\"font-size: 22px\">close</mat-icon>\r\n </button>\r\n </mat-form-field>\r\n </div>\r\n }\r\n </div>\r\n\r\n <table\r\n [ngClass]=\"{ 'no-hover': !tableSettings?.rowClickAction }\"\r\n mat-table\r\n [dataSource]=\"tableSource\"\r\n matSort\r\n >\r\n @for (column of displayedColumns; track column) {\r\n <ng-container [matColumnDef]=\"column\">\r\n <th\r\n mat-header-cell\r\n *matHeaderCellDef\r\n style=\"{{\r\n columns[column].width ? 'width:' + columns[column].width : ''\r\n }}\"\r\n mat-sort-header\r\n [disabled]=\"!columns[column].sort\"\r\n >\r\n {{ columns[column].translateColumnName }}\r\n @if (columns[column].search) {\r\n <mat-icon\r\n class=\"search-icon\"\r\n [matMenuTriggerFor]=\"menu\"\r\n (click)=\"$event.stopPropagation()\"\r\n >\r\n search\r\n </mat-icon>\r\n }\r\n <mat-menu #menu=\"matMenu\" xPosition=\"before\">\r\n <mat-form-field class=\"col\">\r\n <mat-label>{{\r\n columns[column].searchLabel || 'Search'\r\n }}</mat-label>\r\n <input\r\n matInput\r\n (keyup)=\"applySearch()\"\r\n [(ngModel)]=\"searchModel\"\r\n (click)=\"$event.stopPropagation()\"\r\n />\r\n <button\r\n matSuffix\r\n mat-icon-button\r\n aria-label=\"Clear\"\r\n (click)=\"searchModel = ''\"\r\n >\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n </mat-form-field>\r\n </mat-menu>\r\n </th>\r\n <td\r\n mat-cell\r\n *matCellDef=\"let element\"\r\n style=\"{{\r\n columns[column].width ? 'width:' + columns[column].width : ''\r\n }}\"\r\n >\r\n @if (columns[column].actions && columns[column].actions!.length > 0) {\r\n <div\r\n class=\"actions-container\"\r\n style=\"overflow-y: hidden\"\r\n [ngClass]=\"{ 'justify-content-end': columns[column].flexRight }\"\r\n >\r\n @for (action of columns[column].actions; track action) {\r\n @if (checkIfActionVisible(element, action)) {\r\n @if (!action.url && action.action) {\r\n <button\r\n style=\"padding: 7px 7px; width: 40px; height: 40px\"\r\n class=\"col-auto\"\r\n mat-icon-button\r\n type=\"button\"\r\n matTooltip=\"{{ action.tooltipName || '' }}\"\r\n [matTooltipDisabled]=\"!!!action.tooltipName\"\r\n (click)=\"action.action(element)\"\r\n >\r\n <mat-icon>{{ action.iconName }}</mat-icon>\r\n </button>\r\n }\r\n @if (action.url) {\r\n <a [routerLink]=\"action.url\">\r\n <button\r\n class=\"col-auto\"\r\n mat-icon-button\r\n type=\"button\"\r\n matTooltip=\"{{ action.tooltipName || '' }}\"\r\n [matTooltipDisabled]=\"!!!action.tooltipName\"\r\n >\r\n <mat-icon>{{ action.iconName }}</mat-icon>\r\n </button>\r\n </a>\r\n }\r\n }\r\n }\r\n </div>\r\n }\r\n @if (!columns[column].actions) {\r\n @if (columns[column].translateValue) {\r\n <p style=\"margin: 0; padding: 0\">\r\n {{ columns[column].translateValue![element[column]] || '' }}\r\n </p>\r\n }\r\n @if (!columns[column].translateValue) {\r\n @if (!columns[column].type || columns[column].type === 'string') {\r\n <p style=\"margin: 0; padding: 0\">{{ element[column] }}</p>\r\n }\r\n @if (columns[column].type === 'date') {\r\n <p style=\"margin: 0; padding: 0\">\r\n {{ element[column] | stDateTimeFormatPipe }}\r\n </p>\r\n }\r\n }\r\n }\r\n </td>\r\n </ng-container>\r\n }\r\n\r\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\r\n <tr\r\n mat-row\r\n *matRowDef=\"let row; columns: displayedColumns\"\r\n (click)=\"\r\n tableSettings?.rowClickAction ? tableSettings.rowClickAction(row) : null\r\n \"\r\n ></tr>\r\n </table>\r\n <mat-paginator\r\n [pageIndex]=\"pageIndex\"\r\n [pageSizeOptions]=\"[5, 10, 15, 20, 25]\"\r\n (page)=\"pageChanged($event)\"\r\n [showFirstLastButtons]=\"true\"\r\n ></mat-paginator>\r\n</div>\r\n", styles: [".st-material-table .search-form button{height:40px}.st-material-table .search-form mat-form-field:first-child{padding-left:0}.st-material-table .search-form mat-form-field:last-child{padding-right:0}.st-material-table .search-form .clear{padding:0}.st-material-table .search-form .clear mat-icon{height:20px;width:20px;font-size:20px;cursor:pointer}.st-material-table table{width:100%;box-shadow:none}.st-material-table table th.mat-mdc-header-cell,.st-material-table table td.mat-mdc-cell,.st-material-table table td.mat-mdc-footer-cell{padding:0}.st-material-table table th.mat-mdc-header-cell:first-of-type,.st-material-table table td.mat-mdc-cell:first-of-type,.st-material-table table td.mat-mdc-footer-cell:first-of-type{padding-left:12px}.st-material-table table th.mat-mdc-header-cell:last-of-type,.st-material-table table td.mat-mdc-cell:last-of-type,.st-material-table table td.mat-mdc-footer-cell:last-of-type{padding-right:12px}.st-material-table table thead tr{background-color:#fff9c4;height:40px!important}.st-material-table table thead tr th{border-color:#fdd835;font-size:.9rem;font-weight:600;color:#424242}.st-material-table table tbody{background-color:transparent!important}.st-material-table table tbody>tr{cursor:pointer}.st-material-table table tbody>tr.active{background-color:#a5d6a7}.st-material-table table tbody>tr.active td{border-bottom-color:#81c784!important}.st-material-table table tbody>tr:hover{background-color:#f5f5f5}.st-material-table table tbody>tr.disabled{cursor:not-allowed}.st-material-table table tbody>tr.disabled:hover{background-color:inherit!important}.st-material-table table tbody>tr.detail-row{height:0;cursor:default}.st-material-table table tbody>tr.detail-row:hover{background-color:transparent}.st-material-table table tbody>tr.detail-row .element-detail{overflow:hidden;display:flex}.st-material-table table tbody>tr.detail-row .element-detail p{padding:20px 0;margin-bottom:0;white-space:pre-wrap}.st-material-table table tbody>tr td i.active-row{color:#1b5e20;font-weight:700;font-size:25px;height:25px;width:25px;margin-top:2px}.st-material-table table tbody>tr td>div{max-height:200px;overflow:hidden;overflow-y:auto}.st-material-table table tbody>tr td a button{color:#000}.st-material-table table tbody>tr td a mat-icon{color:#333}.st-material-table table .mat-column-active{width:48px}.st-material-table table.no-hover tbody tr{cursor:default}.st-material-table table.no-hover tbody tr.active{background-color:transparent!important}.st-material-table table.no-hover tbody tr.active td{border-bottom-color:#0000001f!important}.st-material-table table.no-hover tbody tr:hover{background-color:transparent!important}.st-material-table table.no-hover tbody tr:hover td{border-bottom-color:#0000001f!important}.st-material-table table.admin-table .actions-cell{width:100px}.dark-theme .st-material-table table{background-color:transparent!important}.dark-theme .st-material-table table thead tr{background-color:#5e4803!important}.dark-theme .st-material-table table thead tr th{border-color:#816204!important;color:#e0e0e0!important}.dark-theme .st-material-table tbody tr:hover{background-color:var(--primeng-table-hover-background)!important}.dark-theme mat-paginator{background-color:transparent!important}.dark-theme .reorder-column-list .reorder-column-element{background-color:#424242!important;color:#eee!important}.dark-theme .reorder-column-list .reorder-column-element p,.dark-theme .reorder-column-list .reorder-column-element mat-icon{color:#eee!important}.dark-theme .filter .filter-title{color:#eee!important}\n"] }]
|
|
363
|
-
}], ctorParameters: () => [{ type: LocalTableService }, { type: i0.ChangeDetectorRef }, { type: i2$1.Router }, { type: i2$1.ActivatedRoute }], propDecorators: { paginator: [{
|
|
364
|
-
type: ViewChild,
|
|
365
|
-
args: [MatPaginator]
|
|
366
|
-
}], sort: [{
|
|
367
|
-
type: ViewChild,
|
|
368
|
-
args: [MatSort]
|
|
369
|
-
}], tableSettings: [{
|
|
370
|
-
type: Input
|
|
371
|
-
}], globalSearchSettings: [{
|
|
372
|
-
type: Input
|
|
373
|
-
}], pageSize: [{
|
|
374
|
-
type: Input
|
|
375
|
-
}], allowPickColumns: [{
|
|
376
|
-
type: Input
|
|
377
|
-
}], configurationsSettings: [{
|
|
378
|
-
type: Input
|
|
379
|
-
}], localStorageName: [{
|
|
380
|
-
type: Input
|
|
381
|
-
}], bindSearchToUrl: [{
|
|
382
|
-
type: Input
|
|
383
|
-
}], columns: [{
|
|
384
|
-
type: Input
|
|
385
|
-
}], data: [{
|
|
386
|
-
type: Input
|
|
387
|
-
}] } });
|
|
388
|
-
|
|
389
|
-
class SelectTableComponent {
|
|
390
|
-
set setInitColumns(col) {
|
|
391
|
-
this.columns = ['active', ...Object.keys(col)];
|
|
392
|
-
this.initColumns = col;
|
|
393
|
-
}
|
|
394
|
-
set tableData(data) {
|
|
395
|
-
this.tableSource = new MatTableDataSource(data);
|
|
396
|
-
this.tableSource.paginator = this.paginator;
|
|
397
|
-
}
|
|
398
|
-
set validError(error) {
|
|
399
|
-
this._validError = error;
|
|
400
|
-
}
|
|
401
|
-
get validError() {
|
|
402
|
-
return this._validError;
|
|
403
|
-
}
|
|
404
|
-
constructor() {
|
|
405
|
-
this.required = false;
|
|
406
|
-
this.multiple = false;
|
|
407
|
-
this.searchLabel = 'Search';
|
|
408
|
-
this.selectedLabel = 'Selected';
|
|
409
|
-
this._validError = false;
|
|
410
|
-
this.returnRowSelected = new EventEmitter();
|
|
411
|
-
this.search = new UntypedFormControl('');
|
|
412
|
-
this.rowSelected = [];
|
|
413
|
-
}
|
|
414
|
-
ngOnInit() {
|
|
415
|
-
this.search.valueChanges.subscribe(res => {
|
|
416
|
-
this.tableSource.filter = res.trim().toLowerCase();
|
|
417
|
-
});
|
|
418
|
-
setTimeout(() => {
|
|
419
|
-
if (this.initSearchVal) {
|
|
420
|
-
this.search.setValue(this.initSearchVal);
|
|
421
|
-
this.rowClick(this.initSelected);
|
|
422
|
-
}
|
|
423
|
-
}, 1000);
|
|
424
|
-
}
|
|
425
|
-
clearSearch() {
|
|
426
|
-
this.search.setValue('');
|
|
427
|
-
}
|
|
428
|
-
rowClick(row) {
|
|
429
|
-
const found = this.rowSelected.find(tmpRow => tmpRow === row);
|
|
430
|
-
if (found) {
|
|
431
|
-
this.rowSelected = this.rowSelected.filter(tmpRow => tmpRow !== row);
|
|
432
|
-
}
|
|
433
|
-
else {
|
|
434
|
-
if (this.multiple) {
|
|
435
|
-
this.rowSelected.push(row);
|
|
436
|
-
}
|
|
437
|
-
else {
|
|
438
|
-
this.rowSelected = [row];
|
|
439
|
-
}
|
|
440
|
-
}
|
|
441
|
-
this.returnRowSelected.emit(this.rowSelected);
|
|
442
|
-
}
|
|
443
|
-
checkActiveRow(row) {
|
|
444
|
-
return !!this.rowSelected.find(activeRow => activeRow === row);
|
|
445
|
-
}
|
|
446
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SelectTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
447
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: SelectTableComponent, selector: "ngx-st-select-table", inputs: { title: "title", required: "required", multiple: "multiple", initSelected: "initSelected", initSearchVal: "initSearchVal", searchLabel: "searchLabel", selectedLabel: "selectedLabel", setInitColumns: "setInitColumns", tableData: "tableData", validError: "validError" }, outputs: { returnRowSelected: "returnRowSelected" }, viewQueries: [{ propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true }], ngImport: i0, template: "<div class=\"shared-table-selector\">\r\n <p class=\"title\" [ngClass]=\"{ 'error-text': validError }\">\r\n {{ title }} {{ required ? '*' : '' }}\r\n </p>\r\n\r\n <div class=\"search-form row align-items-center\">\r\n <div class=\"col-sm-12 col-md row align-items-center\">\r\n <mat-form-field class=\"col\">\r\n <input\r\n matInput\r\n placeholder=\"{{ searchLabel }}\"\r\n [formControl]=\"search\"\r\n />\r\n </mat-form-field>\r\n <div class=\"clear col-auto\">\r\n <mat-icon (click)=\"clearSearch()\">clear</mat-icon>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <table mat-table [dataSource]=\"tableSource\">\r\n @for (col of columns; track col) {\r\n <ng-container [matColumnDef]=\"col\">\r\n <th mat-header-cell *matHeaderCellDef>\r\n {{ col === 'active' ? selectedLabel : initColumns[col] }}\r\n </th>\r\n <td mat-cell *matCellDef=\"let element\">\r\n @if (col === 'active') {\r\n @if (checkActiveRow(element)) {\r\n <mat-icon class=\"active-row\">done</mat-icon>\r\n }\r\n }\r\n @if (col !== 'active') {\r\n {{ element[col] }}\r\n }\r\n </td>\r\n </ng-container>\r\n }\r\n\r\n <tr mat-header-row *matHeaderRowDef=\"columns\"></tr>\r\n <tr\r\n mat-row\r\n *matRowDef=\"let row; columns: columns\"\r\n (click)=\"rowClick(row)\"\r\n [ngClass]=\"{ active: checkActiveRow(row) }\"\r\n ></tr>\r\n </table>\r\n <mat-paginator [pageSizeOptions]=\"[5]\"></mat-paginator>\r\n</div>\r\n", styles: [".title{margin-bottom:0;margin-top:1rem;font-weight:500}.title.error-text{color:#ef5350}\n", ".st-material-table .search-form button{height:40px}.st-material-table .search-form mat-form-field:first-child{padding-left:0}.st-material-table .search-form mat-form-field:last-child{padding-right:0}.st-material-table .search-form .clear{padding:0}.st-material-table .search-form .clear mat-icon{height:20px;width:20px;font-size:20px;cursor:pointer}.st-material-table table{width:100%;box-shadow:none}.st-material-table table th.mat-mdc-header-cell,.st-material-table table td.mat-mdc-cell,.st-material-table table td.mat-mdc-footer-cell{padding:0}.st-material-table table th.mat-mdc-header-cell:first-of-type,.st-material-table table td.mat-mdc-cell:first-of-type,.st-material-table table td.mat-mdc-footer-cell:first-of-type{padding-left:12px}.st-material-table table th.mat-mdc-header-cell:last-of-type,.st-material-table table td.mat-mdc-cell:last-of-type,.st-material-table table td.mat-mdc-footer-cell:last-of-type{padding-right:12px}.st-material-table table thead tr{background-color:#fff9c4;height:40px!important}.st-material-table table thead tr th{border-color:#fdd835;font-size:.9rem;font-weight:600;color:#424242}.st-material-table table tbody{background-color:transparent!important}.st-material-table table tbody>tr{cursor:pointer}.st-material-table table tbody>tr.active{background-color:#a5d6a7}.st-material-table table tbody>tr.active td{border-bottom-color:#81c784!important}.st-material-table table tbody>tr:hover{background-color:#f5f5f5}.st-material-table table tbody>tr.disabled{cursor:not-allowed}.st-material-table table tbody>tr.disabled:hover{background-color:inherit!important}.st-material-table table tbody>tr.detail-row{height:0;cursor:default}.st-material-table table tbody>tr.detail-row:hover{background-color:transparent}.st-material-table table tbody>tr.detail-row .element-detail{overflow:hidden;display:flex}.st-material-table table tbody>tr.detail-row .element-detail p{padding:20px 0;margin-bottom:0;white-space:pre-wrap}.st-material-table table tbody>tr td i.active-row{color:#1b5e20;font-weight:700;font-size:25px;height:25px;width:25px;margin-top:2px}.st-material-table table tbody>tr td>div{max-height:200px;overflow:hidden;overflow-y:auto}.st-material-table table tbody>tr td a button{color:#000}.st-material-table table tbody>tr td a mat-icon{color:#333}.st-material-table table .mat-column-active{width:48px}.st-material-table table.no-hover tbody tr{cursor:default}.st-material-table table.no-hover tbody tr.active{background-color:transparent!important}.st-material-table table.no-hover tbody tr.active td{border-bottom-color:#0000001f!important}.st-material-table table.no-hover tbody tr:hover{background-color:transparent!important}.st-material-table table.no-hover tbody tr:hover td{border-bottom-color:#0000001f!important}.st-material-table table.admin-table .actions-cell{width:100px}.dark-theme .st-material-table table{background-color:transparent!important}.dark-theme .st-material-table table thead tr{background-color:#5e4803!important}.dark-theme .st-material-table table thead tr th{border-color:#816204!important;color:#e0e0e0!important}.dark-theme .st-material-table tbody tr:hover{background-color:var(--primeng-table-hover-background)!important}.dark-theme mat-paginator{background-color:transparent!important}.dark-theme .reorder-column-list .reorder-column-element{background-color:#424242!important;color:#eee!important}.dark-theme .reorder-column-list .reorder-column-element p,.dark-theme .reorder-column-list .reorder-column-element mat-icon{color:#eee!important}.dark-theme .filter .filter-title{color:#eee!important}\n"], dependencies: [{ kind: "directive", type: i4$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { 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: "component", type: i7$1.MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] }); }
|
|
448
|
-
}
|
|
449
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SelectTableComponent, decorators: [{
|
|
450
|
-
type: Component,
|
|
451
|
-
args: [{ selector: 'ngx-st-select-table', template: "<div class=\"shared-table-selector\">\r\n <p class=\"title\" [ngClass]=\"{ 'error-text': validError }\">\r\n {{ title }} {{ required ? '*' : '' }}\r\n </p>\r\n\r\n <div class=\"search-form row align-items-center\">\r\n <div class=\"col-sm-12 col-md row align-items-center\">\r\n <mat-form-field class=\"col\">\r\n <input\r\n matInput\r\n placeholder=\"{{ searchLabel }}\"\r\n [formControl]=\"search\"\r\n />\r\n </mat-form-field>\r\n <div class=\"clear col-auto\">\r\n <mat-icon (click)=\"clearSearch()\">clear</mat-icon>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <table mat-table [dataSource]=\"tableSource\">\r\n @for (col of columns; track col) {\r\n <ng-container [matColumnDef]=\"col\">\r\n <th mat-header-cell *matHeaderCellDef>\r\n {{ col === 'active' ? selectedLabel : initColumns[col] }}\r\n </th>\r\n <td mat-cell *matCellDef=\"let element\">\r\n @if (col === 'active') {\r\n @if (checkActiveRow(element)) {\r\n <mat-icon class=\"active-row\">done</mat-icon>\r\n }\r\n }\r\n @if (col !== 'active') {\r\n {{ element[col] }}\r\n }\r\n </td>\r\n </ng-container>\r\n }\r\n\r\n <tr mat-header-row *matHeaderRowDef=\"columns\"></tr>\r\n <tr\r\n mat-row\r\n *matRowDef=\"let row; columns: columns\"\r\n (click)=\"rowClick(row)\"\r\n [ngClass]=\"{ active: checkActiveRow(row) }\"\r\n ></tr>\r\n </table>\r\n <mat-paginator [pageSizeOptions]=\"[5]\"></mat-paginator>\r\n</div>\r\n", styles: [".title{margin-bottom:0;margin-top:1rem;font-weight:500}.title.error-text{color:#ef5350}\n", ".st-material-table .search-form button{height:40px}.st-material-table .search-form mat-form-field:first-child{padding-left:0}.st-material-table .search-form mat-form-field:last-child{padding-right:0}.st-material-table .search-form .clear{padding:0}.st-material-table .search-form .clear mat-icon{height:20px;width:20px;font-size:20px;cursor:pointer}.st-material-table table{width:100%;box-shadow:none}.st-material-table table th.mat-mdc-header-cell,.st-material-table table td.mat-mdc-cell,.st-material-table table td.mat-mdc-footer-cell{padding:0}.st-material-table table th.mat-mdc-header-cell:first-of-type,.st-material-table table td.mat-mdc-cell:first-of-type,.st-material-table table td.mat-mdc-footer-cell:first-of-type{padding-left:12px}.st-material-table table th.mat-mdc-header-cell:last-of-type,.st-material-table table td.mat-mdc-cell:last-of-type,.st-material-table table td.mat-mdc-footer-cell:last-of-type{padding-right:12px}.st-material-table table thead tr{background-color:#fff9c4;height:40px!important}.st-material-table table thead tr th{border-color:#fdd835;font-size:.9rem;font-weight:600;color:#424242}.st-material-table table tbody{background-color:transparent!important}.st-material-table table tbody>tr{cursor:pointer}.st-material-table table tbody>tr.active{background-color:#a5d6a7}.st-material-table table tbody>tr.active td{border-bottom-color:#81c784!important}.st-material-table table tbody>tr:hover{background-color:#f5f5f5}.st-material-table table tbody>tr.disabled{cursor:not-allowed}.st-material-table table tbody>tr.disabled:hover{background-color:inherit!important}.st-material-table table tbody>tr.detail-row{height:0;cursor:default}.st-material-table table tbody>tr.detail-row:hover{background-color:transparent}.st-material-table table tbody>tr.detail-row .element-detail{overflow:hidden;display:flex}.st-material-table table tbody>tr.detail-row .element-detail p{padding:20px 0;margin-bottom:0;white-space:pre-wrap}.st-material-table table tbody>tr td i.active-row{color:#1b5e20;font-weight:700;font-size:25px;height:25px;width:25px;margin-top:2px}.st-material-table table tbody>tr td>div{max-height:200px;overflow:hidden;overflow-y:auto}.st-material-table table tbody>tr td a button{color:#000}.st-material-table table tbody>tr td a mat-icon{color:#333}.st-material-table table .mat-column-active{width:48px}.st-material-table table.no-hover tbody tr{cursor:default}.st-material-table table.no-hover tbody tr.active{background-color:transparent!important}.st-material-table table.no-hover tbody tr.active td{border-bottom-color:#0000001f!important}.st-material-table table.no-hover tbody tr:hover{background-color:transparent!important}.st-material-table table.no-hover tbody tr:hover td{border-bottom-color:#0000001f!important}.st-material-table table.admin-table .actions-cell{width:100px}.dark-theme .st-material-table table{background-color:transparent!important}.dark-theme .st-material-table table thead tr{background-color:#5e4803!important}.dark-theme .st-material-table table thead tr th{border-color:#816204!important;color:#e0e0e0!important}.dark-theme .st-material-table tbody tr:hover{background-color:var(--primeng-table-hover-background)!important}.dark-theme mat-paginator{background-color:transparent!important}.dark-theme .reorder-column-list .reorder-column-element{background-color:#424242!important;color:#eee!important}.dark-theme .reorder-column-list .reorder-column-element p,.dark-theme .reorder-column-list .reorder-column-element mat-icon{color:#eee!important}.dark-theme .filter .filter-title{color:#eee!important}\n"] }]
|
|
452
|
-
}], ctorParameters: () => [], propDecorators: { paginator: [{
|
|
453
|
-
type: ViewChild,
|
|
454
|
-
args: [MatPaginator]
|
|
455
|
-
}], title: [{
|
|
456
|
-
type: Input
|
|
457
|
-
}], required: [{
|
|
458
|
-
type: Input
|
|
459
|
-
}], multiple: [{
|
|
460
|
-
type: Input
|
|
461
|
-
}], initSelected: [{
|
|
462
|
-
type: Input
|
|
463
|
-
}], initSearchVal: [{
|
|
464
|
-
type: Input
|
|
465
|
-
}], searchLabel: [{
|
|
466
|
-
type: Input
|
|
467
|
-
}], selectedLabel: [{
|
|
468
|
-
type: Input
|
|
469
|
-
}], setInitColumns: [{
|
|
470
|
-
type: Input
|
|
471
|
-
}], tableData: [{
|
|
472
|
-
type: Input
|
|
473
|
-
}], validError: [{
|
|
474
|
-
type: Input
|
|
475
|
-
}], returnRowSelected: [{
|
|
476
|
-
type: Output
|
|
477
|
-
}] } });
|
|
478
|
-
|
|
479
57
|
const DEFAULT_TRANSLATIONS = {
|
|
480
58
|
globalSearch: 'Search',
|
|
481
59
|
cancel: 'Cancel',
|
|
@@ -502,8 +80,12 @@ const DEFAULT_TRANSLATIONS = {
|
|
|
502
80
|
};
|
|
503
81
|
|
|
504
82
|
class StTablesTranslationsService {
|
|
505
|
-
constructor() {
|
|
83
|
+
constructor(config) {
|
|
84
|
+
this.config = config;
|
|
506
85
|
this.translations = signal(DEFAULT_TRANSLATIONS);
|
|
86
|
+
if (this.config?.translations) {
|
|
87
|
+
this.setTranslations(this.config.translations);
|
|
88
|
+
}
|
|
507
89
|
}
|
|
508
90
|
setTranslations(translations) {
|
|
509
91
|
this.translations.set({
|
|
@@ -514,7 +96,7 @@ class StTablesTranslationsService {
|
|
|
514
96
|
getTranslations() {
|
|
515
97
|
return this.translations;
|
|
516
98
|
}
|
|
517
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: StTablesTranslationsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
99
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: StTablesTranslationsService, deps: [{ token: 'ST_TABLES_CONFIG', optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
518
100
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: StTablesTranslationsService, providedIn: 'root' }); }
|
|
519
101
|
}
|
|
520
102
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: StTablesTranslationsService, decorators: [{
|
|
@@ -522,7 +104,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
522
104
|
args: [{
|
|
523
105
|
providedIn: 'root',
|
|
524
106
|
}]
|
|
525
|
-
}]
|
|
107
|
+
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
108
|
+
type: Optional
|
|
109
|
+
}, {
|
|
110
|
+
type: Inject,
|
|
111
|
+
args: ['ST_TABLES_CONFIG']
|
|
112
|
+
}] }] });
|
|
526
113
|
|
|
527
114
|
class MaterialTableFilterDialogComponent {
|
|
528
115
|
constructor(dialogData, dialogRef, fb, changeDetectorRef, stTableTranslations) {
|
|
@@ -581,7 +168,7 @@ class MaterialTableFilterDialogComponent {
|
|
|
581
168
|
});
|
|
582
169
|
}
|
|
583
170
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MaterialTableFilterDialogComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: i1.MatDialogRef }, { token: i2.NonNullableFormBuilder }, { token: i0.ChangeDetectorRef }, { token: StTablesTranslationsService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
584
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: MaterialTableFilterDialogComponent, selector: "st-material-table-filter-dialog", ngImport: i0, template: "<h3 mat-dialog-title class=\"filters-dialog-title\">\r\n {{ stTableTranslations.getTranslations()().filterTitle }}\r\n <div class=\"filters-show-hide\">\r\n <button\r\n mat-icon-button\r\n (click)=\"showAllFilters()\"\r\n *ngIf=\"!allVisible\"\r\n [matTooltip]=\"stTableTranslations.getTranslations()().expandAllFilters\"\r\n >\r\n <mat-icon>unfold_more</mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n (click)=\"hideAllFilters()\"\r\n *ngIf=\"allVisible\"\r\n [matTooltip]=\"stTableTranslations.getTranslations()().collapseAllFilters\"\r\n >\r\n <mat-icon>unfold_less</mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n (click)=\"clearAllFilters()\"\r\n [matTooltip]=\"stTableTranslations.getTranslations()().clearFilters\"\r\n >\r\n <mat-icon>filter_alt_off</mat-icon>\r\n </button>\r\n </div>\r\n</h3>\r\n\r\n<mat-dialog-content>\r\n <form [formGroup]=\"formGroup\">\r\n @for (column of filterColumns; track column.field) {\r\n @switch (column.filterType || column.type || 'string') {\r\n @case ('string') {\r\n <div class=\"filter\">\r\n <ng-container\r\n *ngTemplateOutlet=\"filterHeader; context: { $implicit: column }\"\r\n ></ng-container>\r\n <div\r\n class=\"filter-content row\"\r\n [ngClass]=\"{ hide: !column.expanded }\"\r\n >\r\n <div class=\"col-auto\">\r\n <mat-form-field appearance=\"outline\" style=\"width: 100px\">\r\n <mat-label>{{\r\n stTableTranslations.getTranslations()().filter\r\n }}</mat-label>\r\n <input\r\n matInput\r\n type=\"text\"\r\n [disabled]=\"true\"\r\n [value]=\"'Contains'\"\r\n />\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"col\">\r\n <mat-form-field appearance=\"outline\">\r\n <mat-label>{{\r\n stTableTranslations.getTranslations()().searchFilter\r\n }}</mat-label>\r\n <input\r\n matInput\r\n type=\"text\"\r\n [disabled]=\"column.visible\"\r\n [formControlName]=\"column.field\"\r\n />\r\n <button\r\n matSuffix\r\n mat-icon-button\r\n aria-label=\"Clear\"\r\n (click)=\"formGroup.controls[column.field].setValue('')\"\r\n >\r\n <mat-icon style=\"font-size: 22px\">close</mat-icon>\r\n </button>\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n @case ('number') {\r\n <div class=\"filter\">\r\n <ng-container\r\n *ngTemplateOutlet=\"filterHeader; context: { $implicit: column }\"\r\n ></ng-container>\r\n <div\r\n class=\"filter-content row\"\r\n [ngClass]=\"{ hide: !column.expanded }\"\r\n >\r\n <div class=\"col-auto\">\r\n <mat-form-field appearance=\"outline\" style=\"width: 100px\">\r\n <mat-label>{{\r\n stTableTranslations.getTranslations()().filter\r\n }}</mat-label>\r\n <input\r\n matInput\r\n type=\"text\"\r\n [disabled]=\"true\"\r\n [value]=\"'Equal'\"\r\n />\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"col\">\r\n <mat-form-field appearance=\"outline\">\r\n <mat-label>{{\r\n stTableTranslations.getTranslations()().filter\r\n }}</mat-label>\r\n <input\r\n matInput\r\n type=\"number\"\r\n [disabled]=\"column.visible\"\r\n [formControlName]=\"column.field\"\r\n />\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n @case ('date') {\r\n <div class=\"filter\">\r\n <ng-container\r\n *ngTemplateOutlet=\"filterHeader; context: { $implicit: column }\"\r\n ></ng-container>\r\n <div\r\n class=\"filter-content row\"\r\n [ngClass]=\"{ hide: !column.expanded }\"\r\n >\r\n <div class=\"col-auto\">\r\n <mat-form-field appearance=\"outline\" style=\"width: 100px\">\r\n <mat-label>{{\r\n stTableTranslations.getTranslations()().filter\r\n }}</mat-label>\r\n <input\r\n matInput\r\n type=\"text\"\r\n [disabled]=\"true\"\r\n [value]=\"'Date is'\"\r\n />\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"col\">\r\n <mat-form-field appearance=\"outline\">\r\n <mat-label>{{\r\n stTableTranslations.getTranslations()().filterChooseDate\r\n }}</mat-label>\r\n <input\r\n matInput\r\n [matDatepicker]=\"picker\"\r\n [disabled]=\"column.visible\"\r\n [formControlName]=\"column.field\"\r\n />\r\n <mat-datepicker-toggle\r\n matIconSuffix\r\n [for]=\"picker\"\r\n ></mat-datepicker-toggle>\r\n <mat-datepicker #picker></mat-datepicker>\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n @case ('boolean') {\r\n <div class=\"filter\">\r\n <ng-container\r\n *ngTemplateOutlet=\"filterHeader; context: { $implicit: column }\"\r\n ></ng-container>\r\n <div\r\n class=\"filter-content row\"\r\n [ngClass]=\"{ hide: !column.expanded }\"\r\n >\r\n <div class=\"col-auto\">\r\n <mat-form-field appearance=\"outline\" style=\"width: 100px\">\r\n <mat-label>{{\r\n stTableTranslations.getTranslations()().filter\r\n }}</mat-label>\r\n <input\r\n matInput\r\n type=\"text\"\r\n [disabled]=\"true\"\r\n [value]=\"'Data is'\"\r\n />\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"col\">\r\n <mat-form-field appearance=\"outline\">\r\n <mat-label>{{\r\n stTableTranslations.getTranslations()().booleanPickValue\r\n }}</mat-label>\r\n <mat-select>\r\n <mat-option value=\"\">{{\r\n stTableTranslations.getTranslations()().booleanNone\r\n }}</mat-option>\r\n <mat-option [value]=\"true\">{{\r\n stTableTranslations.getTranslations()().booleanYes\r\n }}</mat-option>\r\n <mat-option [value]=\"false\">{{\r\n stTableTranslations.getTranslations()().booleanNo\r\n }}</mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n @case ('custom') {\r\n @if (column.customFilterOptions) {}\r\n <div class=\"filter\">\r\n <ng-container\r\n *ngTemplateOutlet=\"filterHeader; context: { $implicit: column }\"\r\n ></ng-container>\r\n <div\r\n class=\"filter-content row\"\r\n [ngClass]=\"{ hide: !column.expanded }\"\r\n >\r\n <div class=\"col-auto\">\r\n <mat-form-field appearance=\"outline\" style=\"width: 100px\">\r\n <mat-label>{{\r\n stTableTranslations.getTranslations()().filter\r\n }}</mat-label>\r\n <input\r\n matInput\r\n type=\"text\"\r\n [disabled]=\"true\"\r\n [value]=\"'Equal'\"\r\n />\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"col\">\r\n <mat-form-field appearance=\"outline\">\r\n <mat-label>{{\r\n stTableTranslations.getTranslations()().customPickValue\r\n }}</mat-label>\r\n <mat-select>\r\n <mat-option value=\"\">{{\r\n stTableTranslations.getTranslations()().customNone\r\n }}</mat-option>\r\n @for (option of column.customFilterOptions; track option) {\r\n <mat-option [value]=\"option.value\">\r\n {{ option.label }}\r\n </mat-option>\r\n }\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n }\r\n }\r\n </form>\r\n</mat-dialog-content>\r\n<mat-dialog-actions>\r\n <div class=\"row justify-content-between\" style=\"width: 100%\">\r\n <button mat-flat-button mat-dialog-close>\r\n {{ stTableTranslations.getTranslations()().cancel }}\r\n </button>\r\n <button mat-flat-button color=\"accent\" (click)=\"saveFilters()\">\r\n {{ stTableTranslations.getTranslations()().save }}\r\n </button>\r\n </div>\r\n</mat-dialog-actions>\r\n\r\n<ng-template #filterHeader let-column>\r\n <div class=\"filter-title row justify-content-between\">\r\n {{ column.header }}\r\n\r\n @if (column.expanded) {\r\n <mat-icon (click)=\"column.expanded = !column.expanded\"\r\n >keyboard_arrow_up</mat-icon\r\n >\r\n } @else {\r\n <mat-icon (click)=\"column.expanded = !column.expanded\"\r\n >keyboard_arrow_down</mat-icon\r\n >\r\n }\r\n </div>\r\n</ng-template>\r\n", styles: [".filters-dialog-title .filters-show-hide{position:absolute;top:6px;right:15px}.filter{width:100%;margin-bottom:1rem;padding-bottom:1rem;border-bottom:1px solid #e0e0e0}.filter .filter-title{padding:.5rem 0;color:#000c;font-size:1rem;font-weight:500}.filter .filter-title mat-icon{cursor:pointer}.filter .filter-content{margin-top:.5rem;gap:.5rem}.filter .filter-content.hide{display:none}.filter .filter-content>div.col-auto,.filter .filter-content>div.col{padding:0!important}.filter .filter-content mat-form-field{width:100%}\n"], dependencies: [{ kind: "directive", type: i4$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i4.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i4.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8.MatLabel, selector: "mat-label" }, { kind: "directive", type: i8.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: i4$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i10.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.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: i2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i9.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"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i7.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: i12$1.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i12$1.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i12$1.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
171
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: MaterialTableFilterDialogComponent, selector: "st-material-table-filter-dialog", ngImport: i0, template: "<h3 mat-dialog-title class=\"filters-dialog-title\">\r\n {{ stTableTranslations.getTranslations()().filterTitle }}\r\n <div class=\"filters-show-hide\">\r\n <button\r\n mat-icon-button\r\n (click)=\"showAllFilters()\"\r\n *ngIf=\"!allVisible\"\r\n [matTooltip]=\"stTableTranslations.getTranslations()().expandAllFilters\"\r\n >\r\n <mat-icon>unfold_more</mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n (click)=\"hideAllFilters()\"\r\n *ngIf=\"allVisible\"\r\n [matTooltip]=\"stTableTranslations.getTranslations()().collapseAllFilters\"\r\n >\r\n <mat-icon>unfold_less</mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n (click)=\"clearAllFilters()\"\r\n [matTooltip]=\"stTableTranslations.getTranslations()().clearFilters\"\r\n >\r\n <mat-icon>filter_alt_off</mat-icon>\r\n </button>\r\n </div>\r\n</h3>\r\n\r\n<mat-dialog-content>\r\n <form [formGroup]=\"formGroup\">\r\n @for (column of filterColumns; track column.field) {\r\n @switch (column.filterType || column.type || 'string') {\r\n @case ('string') {\r\n <div class=\"filter\">\r\n <ng-container\r\n *ngTemplateOutlet=\"filterHeader; context: { $implicit: column }\"\r\n ></ng-container>\r\n <div\r\n class=\"filter-content row\"\r\n [ngClass]=\"{ hide: !column.expanded }\"\r\n >\r\n <div class=\"col-auto\">\r\n <mat-form-field appearance=\"outline\" style=\"width: 100px\">\r\n <mat-label>{{\r\n stTableTranslations.getTranslations()().filter\r\n }}</mat-label>\r\n <input\r\n matInput\r\n type=\"text\"\r\n [disabled]=\"true\"\r\n [value]=\"'Contains'\"\r\n />\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"col\">\r\n <mat-form-field appearance=\"outline\">\r\n <mat-label>{{\r\n stTableTranslations.getTranslations()().searchFilter\r\n }}</mat-label>\r\n <input\r\n matInput\r\n type=\"text\"\r\n [disabled]=\"column.visible\"\r\n [formControlName]=\"column.field\"\r\n />\r\n <button\r\n matSuffix\r\n mat-icon-button\r\n aria-label=\"Clear\"\r\n (click)=\"formGroup.controls[column.field].setValue('')\"\r\n >\r\n <mat-icon style=\"font-size: 22px\">close</mat-icon>\r\n </button>\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n @case ('number') {\r\n <div class=\"filter\">\r\n <ng-container\r\n *ngTemplateOutlet=\"filterHeader; context: { $implicit: column }\"\r\n ></ng-container>\r\n <div\r\n class=\"filter-content row\"\r\n [ngClass]=\"{ hide: !column.expanded }\"\r\n >\r\n <div class=\"col-auto\">\r\n <mat-form-field appearance=\"outline\" style=\"width: 100px\">\r\n <mat-label>{{\r\n stTableTranslations.getTranslations()().filter\r\n }}</mat-label>\r\n <input\r\n matInput\r\n type=\"text\"\r\n [disabled]=\"true\"\r\n [value]=\"'Equal'\"\r\n />\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"col\">\r\n <mat-form-field appearance=\"outline\">\r\n <mat-label>{{\r\n stTableTranslations.getTranslations()().filter\r\n }}</mat-label>\r\n <input\r\n matInput\r\n type=\"number\"\r\n [disabled]=\"column.visible\"\r\n [formControlName]=\"column.field\"\r\n />\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n @case ('date') {\r\n <div class=\"filter\">\r\n <ng-container\r\n *ngTemplateOutlet=\"filterHeader; context: { $implicit: column }\"\r\n ></ng-container>\r\n <div\r\n class=\"filter-content row\"\r\n [ngClass]=\"{ hide: !column.expanded }\"\r\n >\r\n <div class=\"col-auto\">\r\n <mat-form-field appearance=\"outline\" style=\"width: 100px\">\r\n <mat-label>{{\r\n stTableTranslations.getTranslations()().filter\r\n }}</mat-label>\r\n <input\r\n matInput\r\n type=\"text\"\r\n [disabled]=\"true\"\r\n [value]=\"'Date is'\"\r\n />\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"col\">\r\n <mat-form-field appearance=\"outline\">\r\n <mat-label>{{\r\n stTableTranslations.getTranslations()().filterChooseDate\r\n }}</mat-label>\r\n <input\r\n matInput\r\n [matDatepicker]=\"picker\"\r\n [disabled]=\"column.visible\"\r\n [formControlName]=\"column.field\"\r\n />\r\n <mat-datepicker-toggle\r\n matIconSuffix\r\n [for]=\"picker\"\r\n ></mat-datepicker-toggle>\r\n <mat-datepicker #picker></mat-datepicker>\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n @case ('boolean') {\r\n <div class=\"filter\">\r\n <ng-container\r\n *ngTemplateOutlet=\"filterHeader; context: { $implicit: column }\"\r\n ></ng-container>\r\n <div\r\n class=\"filter-content row\"\r\n [ngClass]=\"{ hide: !column.expanded }\"\r\n >\r\n <div class=\"col-auto\">\r\n <mat-form-field appearance=\"outline\" style=\"width: 100px\">\r\n <mat-label>{{\r\n stTableTranslations.getTranslations()().filter\r\n }}</mat-label>\r\n <input\r\n matInput\r\n type=\"text\"\r\n [disabled]=\"true\"\r\n [value]=\"'Data is'\"\r\n />\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"col\">\r\n <mat-form-field appearance=\"outline\">\r\n <mat-label>{{\r\n stTableTranslations.getTranslations()().booleanPickValue\r\n }}</mat-label>\r\n <mat-select>\r\n <mat-option value=\"\">{{\r\n stTableTranslations.getTranslations()().booleanNone\r\n }}</mat-option>\r\n <mat-option [value]=\"true\">{{\r\n stTableTranslations.getTranslations()().booleanYes\r\n }}</mat-option>\r\n <mat-option [value]=\"false\">{{\r\n stTableTranslations.getTranslations()().booleanNo\r\n }}</mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n @case ('custom') {\r\n @if (column.customFilterOptions) {}\r\n <div class=\"filter\">\r\n <ng-container\r\n *ngTemplateOutlet=\"filterHeader; context: { $implicit: column }\"\r\n ></ng-container>\r\n <div\r\n class=\"filter-content row\"\r\n [ngClass]=\"{ hide: !column.expanded }\"\r\n >\r\n <div class=\"col-auto\">\r\n <mat-form-field appearance=\"outline\" style=\"width: 100px\">\r\n <mat-label>{{\r\n stTableTranslations.getTranslations()().filter\r\n }}</mat-label>\r\n <input\r\n matInput\r\n type=\"text\"\r\n [disabled]=\"true\"\r\n [value]=\"'Equal'\"\r\n />\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"col\">\r\n <mat-form-field appearance=\"outline\">\r\n <mat-label>{{\r\n stTableTranslations.getTranslations()().customPickValue\r\n }}</mat-label>\r\n <mat-select>\r\n <mat-option value=\"\">{{\r\n stTableTranslations.getTranslations()().customNone\r\n }}</mat-option>\r\n @for (option of column.customFilterOptions; track option) {\r\n <mat-option [value]=\"option.value\">\r\n {{ option.label }}\r\n </mat-option>\r\n }\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n }\r\n }\r\n </form>\r\n</mat-dialog-content>\r\n<mat-dialog-actions>\r\n <div class=\"row justify-content-between\" style=\"width: 100%\">\r\n <button mat-flat-button mat-dialog-close>\r\n {{ stTableTranslations.getTranslations()().cancel }}\r\n </button>\r\n <button mat-flat-button color=\"accent\" (click)=\"saveFilters()\">\r\n {{ stTableTranslations.getTranslations()().save }}\r\n </button>\r\n </div>\r\n</mat-dialog-actions>\r\n\r\n<ng-template #filterHeader let-column>\r\n <div class=\"filter-title row justify-content-between\">\r\n {{ column.header }}\r\n\r\n @if (column.expanded) {\r\n <mat-icon (click)=\"column.expanded = !column.expanded\"\r\n >keyboard_arrow_up</mat-icon\r\n >\r\n } @else {\r\n <mat-icon (click)=\"column.expanded = !column.expanded\"\r\n >keyboard_arrow_down</mat-icon\r\n >\r\n }\r\n </div>\r\n</ng-template>\r\n", styles: [".filters-dialog-title .filters-show-hide{position:absolute;top:6px;right:15px}.filter{width:100%;margin-bottom:1rem;padding-bottom:1rem;border-bottom:1px solid #e0e0e0}.filter .filter-title{padding:.5rem 0;color:#000c;font-size:1rem;font-weight:500}.filter .filter-title mat-icon{cursor:pointer}.filter .filter-content{margin-top:.5rem;gap:.5rem}.filter .filter-content.hide{display:none}.filter .filter-content>div.col-auto,.filter .filter-content>div.col{padding:0!important}.filter .filter-content mat-form-field{width:100%}\n"], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i5.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i5.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i7.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i7.MatLabel, selector: "mat-label" }, { kind: "directive", type: i7.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: i8.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i9.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.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: i2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i9$1.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"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i11.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: i12.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i12.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i12.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
585
172
|
}
|
|
586
173
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MaterialTableFilterDialogComponent, decorators: [{
|
|
587
174
|
type: Component,
|
|
@@ -610,7 +197,7 @@ class MaterialTableOrderColumnDialogComponent {
|
|
|
610
197
|
});
|
|
611
198
|
}
|
|
612
199
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MaterialTableOrderColumnDialogComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: i1.MatDialogRef }, { token: StTablesTranslationsService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
613
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: MaterialTableOrderColumnDialogComponent, selector: "st-material-table-order-column-dialog", ngImport: i0, template: "<h3 mat-dialog-title>\r\n {{ stTablesTranslations.getTranslations()().reorderColumns }}\r\n</h3>\r\n<mat-dialog-content>\r\n <div\r\n cdkDropList\r\n class=\"reorder-column-list\"\r\n (cdkDropListDropped)=\"drop($event)\"\r\n >\r\n @for (column of columns; track column.field) {\r\n <div class=\"reorder-column-element\" cdkDrag>\r\n <div class=\"row\">\r\n <mat-icon>drag_indicator</mat-icon>\r\n <p>{{ column.selectColumnLabel || column.header }}</p>\r\n </div>\r\n @if (!column.visible) {\r\n <mat-icon class=\"column-hidden\">visibility_off</mat-icon>\r\n }\r\n </div>\r\n }\r\n </div>\r\n</mat-dialog-content>\r\n<mat-dialog-actions>\r\n <div class=\"row justify-content-between\" style=\"width: 100%\">\r\n <button mat-flat-button mat-dialog-close>\r\n {{ stTablesTranslations.getTranslations()().close }}\r\n </button>\r\n <button mat-flat-button color=\"accent\" (click)=\"saveOrder()\">\r\n {{ stTablesTranslations.getTranslations()().save }}\r\n </button>\r\n </div>\r\n</mat-dialog-actions>\r\n", styles: [".reorder-column-list{width:100%;border:solid 1px #ccc}.reorder-column-list .reorder-column-element{width:100%;padding:10px;border-bottom:solid 1px #ccc;color:#000000de;display:flex;flex-direction:row;align-items:center;justify-content:space-between;box-sizing:border-box;cursor:move;background:#fff}.reorder-column-list .reorder-column-element:last-child{border-bottom:none}.reorder-column-list .reorder-column-element .column-hidden{opacity:.3}.reorder-column-list .reorder-column-element p{margin-bottom:0;font-size:1.1rem}.cdk-drag-preview{overflow-y:hidden;padding:10px;border:none;box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag-preview p{margin-top:5px}.cdk-drag-preview mat-icon{display:none}.cdk-drag-placeholder{opacity:0}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}.reorder-column-element:last-child{border:none}.reorder-column-list.cdk-drop-list-dragging .reorder-column-element:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}\n"], dependencies: [{ kind: "component", type:
|
|
200
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: MaterialTableOrderColumnDialogComponent, selector: "st-material-table-order-column-dialog", ngImport: i0, template: "<h3 mat-dialog-title>\r\n {{ stTablesTranslations.getTranslations()().reorderColumns }}\r\n</h3>\r\n<mat-dialog-content>\r\n <div\r\n cdkDropList\r\n class=\"reorder-column-list\"\r\n (cdkDropListDropped)=\"drop($event)\"\r\n >\r\n @for (column of columns; track column.field) {\r\n <div class=\"reorder-column-element\" cdkDrag>\r\n <div class=\"row\">\r\n <mat-icon>drag_indicator</mat-icon>\r\n <p>{{ column.selectColumnLabel || column.header }}</p>\r\n </div>\r\n @if (!column.visible) {\r\n <mat-icon class=\"column-hidden\">visibility_off</mat-icon>\r\n }\r\n </div>\r\n }\r\n </div>\r\n</mat-dialog-content>\r\n<mat-dialog-actions>\r\n <div class=\"row justify-content-between\" style=\"width: 100%\">\r\n <button mat-flat-button mat-dialog-close>\r\n {{ stTablesTranslations.getTranslations()().close }}\r\n </button>\r\n <button mat-flat-button color=\"accent\" (click)=\"saveOrder()\">\r\n {{ stTablesTranslations.getTranslations()().save }}\r\n </button>\r\n </div>\r\n</mat-dialog-actions>\r\n", styles: [".reorder-column-list{width:100%;border:solid 1px #ccc}.reorder-column-list .reorder-column-element{width:100%;padding:10px;border-bottom:solid 1px #ccc;color:#000000de;display:flex;flex-direction:row;align-items:center;justify-content:space-between;box-sizing:border-box;cursor:move;background:#fff}.reorder-column-list .reorder-column-element:last-child{border-bottom:none}.reorder-column-list .reorder-column-element .column-hidden{opacity:.3}.reorder-column-list .reorder-column-element p{margin-bottom:0;font-size:1.1rem}.cdk-drag-preview{overflow-y:hidden;padding:10px;border:none;box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag-preview p{margin-top:5px}.cdk-drag-preview mat-icon{display:none}.cdk-drag-placeholder{opacity:0}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}.reorder-column-element:last-child{border:none}.reorder-column-list.cdk-drop-list-dragging .reorder-column-element:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}\n"], dependencies: [{ kind: "component", type: i5.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i5$2.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i5$2.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }] }); }
|
|
614
201
|
}
|
|
615
202
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MaterialTableOrderColumnDialogComponent, decorators: [{
|
|
616
203
|
type: Component,
|
|
@@ -731,7 +318,7 @@ class MaterialTableCaptionComponent extends StSubscribeDestroyComponent {
|
|
|
731
318
|
filtersKeys.filter(key => this.filters[key]).length || 0;
|
|
732
319
|
}
|
|
733
320
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MaterialTableCaptionComponent, deps: [{ token: StTablesTranslationsService }, { token: i1.MatDialog }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
734
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: MaterialTableCaptionComponent, selector: "st-material-table-caption", inputs: { showGlobalSearch: "showGlobalSearch", tableTitle: "tableTitle", allowPickColumns: "allowPickColumns", allowReorderColumns: "allowReorderColumns", initGlobalSearch: "initGlobalSearch", initFilters: "initFilters", columns: "columns" }, outputs: { captionDataChanged: "captionDataChanged", resetTableSettings: "resetTableSettings" }, usesInheritance: true, ngImport: i0, template: "@if (\r\n allowPickColumns ||\r\n tableTitle ||\r\n allowReorderColumns ||\r\n showGlobalSearch ||\r\n showFilterButton\r\n) {\r\n <div\r\n class=\"st-material-table-caption row align-items-center\"\r\n [ngClass]=\"{\r\n 'justify-content-between':\r\n (allowPickColumns || tableTitle || allowReorderColumns) &&\r\n (showGlobalSearch || showFilterButton),\r\n 'justify-content-end':\r\n !allowPickColumns && !tableTitle && !allowReorderColumns\r\n }\"\r\n >\r\n @if (allowPickColumns || tableTitle || allowReorderColumns) {\r\n <div class=\"col-auto d-flex align-items-center\">\r\n @if (tableTitle) {\r\n <p class=\"table-title\">{{ tableTitle }}</p>\r\n }\r\n\r\n @if (allowPickColumns) {\r\n <mat-form-field appearance=\"outline\">\r\n <mat-select [formControl]=\"selectedColumns\" multiple>\r\n <mat-select-trigger>\r\n {{ selectedColumns.value ? selectedColumns.value!.length : 0 }}\r\n columns selected\r\n </mat-select-trigger>\r\n @for (column of columns; track column.field) {\r\n <mat-option [value]=\"column.field\">{{\r\n column.selectColumnLabel || column.header\r\n }}</mat-option>\r\n }\r\n </mat-select>\r\n </mat-form-field>\r\n }\r\n\r\n @if (allowPickColumns || tableTitle) {\r\n <button mat-icon-button (click)=\"resetTable()\">\r\n <mat-icon class=\"reorder-icon\">refresh</mat-icon>\r\n </button>\r\n }\r\n\r\n @if (allowReorderColumns) {\r\n <button mat-icon-button (click)=\"openReorderColumnsDialog()\">\r\n <mat-icon class=\"reorder-icon\">low_priority</mat-icon>\r\n </button>\r\n }\r\n </div>\r\n }\r\n\r\n @if (showGlobalSearch || showFilterButton) {\r\n <div class=\"col-auto d-flex align-items-center\">\r\n @if (showFilterButton) {\r\n <!-- @if (activeFiltersCount) {-->\r\n <!-- <button-->\r\n <!-- mat-icon-button-->\r\n <!-- (click)=\"clearAllFilters()\"-->\r\n <!-- [matTooltip]=\"'Clear Filters'\"-->\r\n <!-- >-->\r\n <!-- <mat-icon>filter_alt_off</mat-icon>-->\r\n <!-- </button>-->\r\n <!-- }-->\r\n\r\n <button mat-icon-button (click)=\"openFilterDialog()\">\r\n <mat-icon\r\n [matBadge]=\"activeFiltersCount\"\r\n [matBadgeHidden]=\"!activeFiltersCount\"\r\n [matBadgeSize]=\"'small'\"\r\n matBadgePosition=\"before\"\r\n >filter_alt</mat-icon\r\n >\r\n </button>\r\n }\r\n\r\n @if (showGlobalSearch) {\r\n <mat-form-field appearance=\"outline\">\r\n <input\r\n matInput\r\n [formControl]=\"globalSearch\"\r\n [placeholder]=\"\r\n stTableTranslations.getTranslations()().globalSearch\r\n \"\r\n />\r\n <button\r\n matSuffix\r\n mat-icon-button\r\n aria-label=\"Clear\"\r\n (click)=\"globalSearch.setValue('')\"\r\n >\r\n <mat-icon style=\"font-size: 22px\">close</mat-icon>\r\n </button>\r\n </mat-form-field>\r\n }\r\n </div>\r\n }\r\n </div>\r\n}\r\n", styles: [".st-material-table-caption{width:100%;margin-top:5px;margin-bottom:5px;padding:0 5px;min-height:48px}.st-material-table-caption>.col-auto{padding:0}.st-material-table-caption .table-title{font-size:1.4rem;margin-bottom:0}.st-material-table-caption .reorder-icon{transform:scaleX(-1) rotate(90deg)}\n"], dependencies: [{ kind: "directive", type: i4
|
|
321
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: MaterialTableCaptionComponent, selector: "st-material-table-caption", inputs: { showGlobalSearch: "showGlobalSearch", tableTitle: "tableTitle", allowPickColumns: "allowPickColumns", allowReorderColumns: "allowReorderColumns", initGlobalSearch: "initGlobalSearch", initFilters: "initFilters", columns: "columns" }, outputs: { captionDataChanged: "captionDataChanged", resetTableSettings: "resetTableSettings" }, usesInheritance: true, ngImport: i0, template: "@if (\r\n allowPickColumns ||\r\n tableTitle ||\r\n allowReorderColumns ||\r\n showGlobalSearch ||\r\n showFilterButton\r\n) {\r\n <div\r\n class=\"st-material-table-caption row align-items-center\"\r\n [ngClass]=\"{\r\n 'justify-content-between':\r\n (allowPickColumns || tableTitle || allowReorderColumns) &&\r\n (showGlobalSearch || showFilterButton),\r\n 'justify-content-end':\r\n !allowPickColumns && !tableTitle && !allowReorderColumns\r\n }\"\r\n >\r\n @if (allowPickColumns || tableTitle || allowReorderColumns) {\r\n <div class=\"col-auto d-flex align-items-center\">\r\n @if (tableTitle) {\r\n <p class=\"table-title\">{{ tableTitle }}</p>\r\n }\r\n\r\n @if (allowPickColumns) {\r\n <mat-form-field appearance=\"outline\">\r\n <mat-select [formControl]=\"selectedColumns\" multiple>\r\n <mat-select-trigger>\r\n {{ selectedColumns.value ? selectedColumns.value!.length : 0 }}\r\n columns selected\r\n </mat-select-trigger>\r\n @for (column of columns; track column.field) {\r\n <mat-option [value]=\"column.field\">{{\r\n column.selectColumnLabel || column.header\r\n }}</mat-option>\r\n }\r\n </mat-select>\r\n </mat-form-field>\r\n }\r\n\r\n @if (allowPickColumns || tableTitle) {\r\n <button mat-icon-button (click)=\"resetTable()\">\r\n <mat-icon class=\"reorder-icon\">refresh</mat-icon>\r\n </button>\r\n }\r\n\r\n @if (allowReorderColumns) {\r\n <button mat-icon-button (click)=\"openReorderColumnsDialog()\">\r\n <mat-icon class=\"reorder-icon\">low_priority</mat-icon>\r\n </button>\r\n }\r\n </div>\r\n }\r\n\r\n @if (showGlobalSearch || showFilterButton) {\r\n <div class=\"col-auto d-flex align-items-center\">\r\n @if (showFilterButton) {\r\n <!-- @if (activeFiltersCount) {-->\r\n <!-- <button-->\r\n <!-- mat-icon-button-->\r\n <!-- (click)=\"clearAllFilters()\"-->\r\n <!-- [matTooltip]=\"'Clear Filters'\"-->\r\n <!-- >-->\r\n <!-- <mat-icon>filter_alt_off</mat-icon>-->\r\n <!-- </button>-->\r\n <!-- }-->\r\n\r\n <button mat-icon-button (click)=\"openFilterDialog()\">\r\n <mat-icon\r\n [matBadge]=\"activeFiltersCount\"\r\n [matBadgeHidden]=\"!activeFiltersCount\"\r\n [matBadgeSize]=\"'small'\"\r\n matBadgePosition=\"before\"\r\n >filter_alt</mat-icon\r\n >\r\n </button>\r\n }\r\n\r\n @if (showGlobalSearch) {\r\n <mat-form-field appearance=\"outline\">\r\n <input\r\n matInput\r\n [formControl]=\"globalSearch\"\r\n [placeholder]=\"\r\n stTableTranslations.getTranslations()().globalSearch\r\n \"\r\n />\r\n <button\r\n matSuffix\r\n mat-icon-button\r\n aria-label=\"Clear\"\r\n (click)=\"globalSearch.setValue('')\"\r\n >\r\n <mat-icon style=\"font-size: 22px\">close</mat-icon>\r\n </button>\r\n </mat-form-field>\r\n }\r\n </div>\r\n }\r\n </div>\r\n}\r\n", styles: [".st-material-table-caption{width:100%;margin-top:5px;margin-bottom:5px;padding:0 5px;min-height:48px}.st-material-table-caption>.col-auto{padding:0}.st-material-table-caption .table-title{font-size:1.4rem;margin-bottom:0}.st-material-table-caption .reorder-icon{transform:scaleX(-1) rotate(90deg)}\n"], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i5.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i7.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i7.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: i8.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i9$1.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"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "directive", type: i9$1.MatSelectTrigger, selector: "mat-select-trigger" }, { kind: "component", type: i11.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: i11$1.MatBadge, selector: "[matBadge]", inputs: ["matBadgeColor", "matBadgeOverlap", "matBadgeDisabled", "matBadgePosition", "matBadge", "matBadgeDescription", "matBadgeSize", "matBadgeHidden"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
735
322
|
}
|
|
736
323
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MaterialTableCaptionComponent, decorators: [{
|
|
737
324
|
type: Component,
|
|
@@ -801,7 +388,7 @@ class MaterialTableRowCellComponent {
|
|
|
801
388
|
this.changeDetectorRef.markForCheck();
|
|
802
389
|
}
|
|
803
390
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MaterialTableRowCellComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
804
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: MaterialTableRowCellComponent, selector: "st-material-table-row-cell", inputs: { column: "column", rowData: "rowData", rowDataCopy: "rowDataCopy", rowEditing: "rowEditing", rowIsSelected: "rowIsSelected" }, outputs: { saveEditRowEmitter: "saveEditRowEmitter", cancelEditRowEmitter: "cancelEditRowEmitter", editRowEmitter: "editRowEmitter", selectRowChange: "selectRowChange" }, ngImport: i0, template: "@switch (column.type || 'string') {\r\n @case ('custom-template') {\r\n <ng-container\r\n [ngTemplateOutlet]=\"column.customTemplate!\"\r\n [ngTemplateOutletContext]=\"{ data: rowData }\"\r\n ></ng-container>\r\n }\r\n\r\n @case ('actions') {\r\n @if (column.actions) {\r\n @if (\r\n (!column.actionsInMenu && !mobileView) ||\r\n (mobileView && column.actions!.length <= 1)\r\n ) {\r\n <div [ngStyle]=\"{ float: column.flexRight ? 'right' : 'none' }\">\r\n @for (action of column.actions; track action) {\r\n @if ((action.show && action.show(rowData)) || !action.show) {\r\n @if (!action.url && action.action) {\r\n <button\r\n class=\"action-icon-button\"\r\n type=\"button\"\r\n mat-icon-button\r\n [color]=\"\r\n actionIconColorDef[action.iconName]\r\n ? actionIconColorDef[action.iconName]\r\n : action.iconColor\r\n \"\r\n [matTooltip]=\"action.tooltipName || ''\"\r\n [matTooltipDisabled]=\"!action.tooltipName\"\r\n (click)=\"$event.stopPropagation(); action.action(rowData)\"\r\n >\r\n <mat-icon>{{ action.iconName }}</mat-icon>\r\n </button>\r\n }\r\n @if (action.url) {\r\n <a [routerLink]=\"action.url\">\r\n <button\r\n class=\"action-icon-button\"\r\n type=\"button\"\r\n mat-icon-button\r\n [color]=\"\r\n actionIconColorDef[action.iconName]\r\n ? actionIconColorDef[action.iconName]\r\n : action.iconColor\r\n \"\r\n [matTooltip]=\"action.tooltipName || ''\"\r\n [matTooltipDisabled]=\"!action.tooltipName\"\r\n >\r\n <mat-icon>{{ action.iconName }}</mat-icon>\r\n </button>\r\n </a>\r\n }\r\n }\r\n }\r\n </div>\r\n }\r\n @if (column.actionsInMenu || (mobileView && column.actions!.length > 1)) {\r\n <button\r\n mat-icon-button\r\n [matMenuTriggerFor]=\"menu\"\r\n (click)=\"$event.stopPropagation()\"\r\n >\r\n <mat-icon>more_vert</mat-icon>\r\n </button>\r\n <mat-menu #menu=\"matMenu\">\r\n @for (action of column.actions; track action) {\r\n @if ((action.show && action.show(rowData)) || !action.show) {\r\n @if (!action.url && action.action) {\r\n <button\r\n type=\"button\"\r\n mat-menu-item\r\n (click)=\"$event.stopPropagation(); action.action(rowData)\"\r\n >\r\n {{ action.tooltipName }}\r\n </button>\r\n }\r\n @if (action.url) {\r\n <a [routerLink]=\"action.url\">\r\n <button type=\"button\" mat-menu-item>\r\n {{ action.tooltipName }}\r\n </button>\r\n </a>\r\n }\r\n }\r\n }\r\n </mat-menu>\r\n }\r\n }\r\n }\r\n\r\n @case ('string') {\r\n <ng-container\r\n *ngTemplateOutlet=\"baseFieldCell; context: { $implicit: column }\"\r\n ></ng-container>\r\n }\r\n\r\n @case ('number') {\r\n <ng-container\r\n *ngTemplateOutlet=\"baseFieldCell; context: { $implicit: column }\"\r\n ></ng-container>\r\n }\r\n\r\n @case ('boolean') {\r\n <ng-container\r\n *ngTemplateOutlet=\"baseFieldCell; context: { $implicit: column }\"\r\n ></ng-container>\r\n }\r\n\r\n @case ('date') {\r\n {{ rowData[column.field] | stDateTimeFormatPipe }}\r\n }\r\n\r\n @case ('actions-row-editing') {\r\n <div class=\"row justify-content-end\">\r\n @if (rowEditing) {\r\n <button\r\n mat-icon-button\r\n color=\"accent\"\r\n (click)=\"saveRow()\"\r\n [matTooltip]=\"'Save row'\"\r\n >\r\n <mat-icon>done</mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n color=\"warn\"\r\n (click)=\"cancelRow()\"\r\n [matTooltip]=\"'Cancel row'\"\r\n >\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n } @else {\r\n <button\r\n mat-icon-button\r\n color=\"primary\"\r\n (click)=\"editRow()\"\r\n [matTooltip]=\"'Edit row'\"\r\n >\r\n <mat-icon>edit</mat-icon>\r\n </button>\r\n }\r\n </div>\r\n }\r\n\r\n @case ('actions-row-selecting') {\r\n <mat-checkbox\r\n color=\"primary\"\r\n (click)=\"$event.stopPropagation()\"\r\n (change)=\"selectRow($event)\"\r\n [checked]=\"rowIsSelected\"\r\n >\r\n </mat-checkbox>\r\n }\r\n}\r\n\r\n<ng-template #baseFieldCell let-column>\r\n @if (rowEditing && column.allowEditColumn) {\r\n <mat-form-field appearance=\"outline\">\r\n @if (column.type === 'string') {\r\n <input matInput [(ngModel)]=\"rowDataCopy[column.field]\" />\r\n }\r\n @if (column.type === 'number') {\r\n <input matInput type=\"number\" [(ngModel)]=\"rowDataCopy[column.field]\" />\r\n }\r\n @if (column.type === 'boolean') {\r\n <mat-checkbox [(ngModel)]=\"rowDataCopy[column.field]\"></mat-checkbox>\r\n }\r\n </mat-form-field>\r\n } @else {\r\n <div>\r\n @if (column.translateValue) {\r\n {{ column.translateValue![rowData[column.field]] || '' }}\r\n }\r\n @if (column.customValueDisplay) {\r\n {{ column.customValueDisplay(rowData[column.field]) }}\r\n }\r\n @if (!column.translateValue && !column.customValueDisplay) {\r\n {{ rowData[column.field] }}\r\n }\r\n </div>\r\n }\r\n</ng-template>\r\n", styles: [""], dependencies: [{ kind: "directive", type: i4$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i4$2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i4.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i10.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: i2.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: i2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i9$1.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i9$1.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i9$1.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "component", type: i10$1.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "pipe", type: i16.DateTimeFormatPipe, name: "stDateTimeFormatPipe" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
391
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: MaterialTableRowCellComponent, selector: "st-material-table-row-cell", inputs: { column: "column", rowData: "rowData", rowDataCopy: "rowDataCopy", rowEditing: "rowEditing", rowIsSelected: "rowIsSelected" }, outputs: { saveEditRowEmitter: "saveEditRowEmitter", cancelEditRowEmitter: "cancelEditRowEmitter", editRowEmitter: "editRowEmitter", selectRowChange: "selectRowChange" }, ngImport: i0, template: "@switch (column.type || 'string') {\r\n @case ('custom-template') {\r\n <ng-container\r\n [ngTemplateOutlet]=\"column.customTemplate!\"\r\n [ngTemplateOutletContext]=\"{ data: rowData }\"\r\n ></ng-container>\r\n }\r\n\r\n @case ('actions') {\r\n @if (column.actions) {\r\n @if (\r\n (!column.actionsInMenu && !mobileView) ||\r\n (mobileView && column.actions!.length <= 1)\r\n ) {\r\n <div [ngStyle]=\"{ float: column.flexRight ? 'right' : 'none' }\">\r\n @for (action of column.actions; track action) {\r\n @if ((action.show && action.show(rowData)) || !action.show) {\r\n @if (!action.url && action.action) {\r\n <button\r\n class=\"action-icon-button\"\r\n type=\"button\"\r\n mat-icon-button\r\n [color]=\"\r\n actionIconColorDef[action.iconName]\r\n ? actionIconColorDef[action.iconName]\r\n : action.iconColor\r\n \"\r\n [matTooltip]=\"action.tooltipName || ''\"\r\n [matTooltipDisabled]=\"!action.tooltipName\"\r\n (click)=\"$event.stopPropagation(); action.action(rowData)\"\r\n >\r\n <mat-icon>{{ action.iconName }}</mat-icon>\r\n </button>\r\n }\r\n @if (action.url) {\r\n <a [routerLink]=\"action.url\">\r\n <button\r\n class=\"action-icon-button\"\r\n type=\"button\"\r\n mat-icon-button\r\n [color]=\"\r\n actionIconColorDef[action.iconName]\r\n ? actionIconColorDef[action.iconName]\r\n : action.iconColor\r\n \"\r\n [matTooltip]=\"action.tooltipName || ''\"\r\n [matTooltipDisabled]=\"!action.tooltipName\"\r\n >\r\n <mat-icon>{{ action.iconName }}</mat-icon>\r\n </button>\r\n </a>\r\n }\r\n }\r\n }\r\n </div>\r\n }\r\n @if (column.actionsInMenu || (mobileView && column.actions!.length > 1)) {\r\n <button\r\n mat-icon-button\r\n [matMenuTriggerFor]=\"menu\"\r\n (click)=\"$event.stopPropagation()\"\r\n >\r\n <mat-icon>more_vert</mat-icon>\r\n </button>\r\n <mat-menu #menu=\"matMenu\">\r\n @for (action of column.actions; track action) {\r\n @if ((action.show && action.show(rowData)) || !action.show) {\r\n @if (!action.url && action.action) {\r\n <button\r\n type=\"button\"\r\n mat-menu-item\r\n (click)=\"$event.stopPropagation(); action.action(rowData)\"\r\n >\r\n {{ action.tooltipName }}\r\n </button>\r\n }\r\n @if (action.url) {\r\n <a [routerLink]=\"action.url\">\r\n <button type=\"button\" mat-menu-item>\r\n {{ action.tooltipName }}\r\n </button>\r\n </a>\r\n }\r\n }\r\n }\r\n </mat-menu>\r\n }\r\n }\r\n }\r\n\r\n @case ('string') {\r\n <ng-container\r\n *ngTemplateOutlet=\"baseFieldCell; context: { $implicit: column }\"\r\n ></ng-container>\r\n }\r\n\r\n @case ('number') {\r\n <ng-container\r\n *ngTemplateOutlet=\"baseFieldCell; context: { $implicit: column }\"\r\n ></ng-container>\r\n }\r\n\r\n @case ('boolean') {\r\n <ng-container\r\n *ngTemplateOutlet=\"baseFieldCell; context: { $implicit: column }\"\r\n ></ng-container>\r\n }\r\n\r\n @case ('date') {\r\n {{ rowData[column.field] | stDateTimeFormatPipe }}\r\n }\r\n\r\n @case ('actions-row-editing') {\r\n <div class=\"row justify-content-end\">\r\n @if (rowEditing) {\r\n <button\r\n mat-icon-button\r\n color=\"accent\"\r\n (click)=\"saveRow()\"\r\n [matTooltip]=\"'Save row'\"\r\n >\r\n <mat-icon>done</mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n color=\"warn\"\r\n (click)=\"cancelRow()\"\r\n [matTooltip]=\"'Cancel row'\"\r\n >\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n } @else {\r\n <button\r\n mat-icon-button\r\n color=\"primary\"\r\n (click)=\"editRow()\"\r\n [matTooltip]=\"'Edit row'\"\r\n >\r\n <mat-icon>edit</mat-icon>\r\n </button>\r\n }\r\n </div>\r\n }\r\n\r\n @case ('actions-row-selecting') {\r\n <mat-checkbox\r\n color=\"primary\"\r\n (click)=\"$event.stopPropagation()\"\r\n (change)=\"selectRow($event)\"\r\n [checked]=\"rowIsSelected\"\r\n >\r\n </mat-checkbox>\r\n }\r\n}\r\n\r\n<ng-template #baseFieldCell let-column>\r\n @if (rowEditing && column.allowEditColumn) {\r\n <mat-form-field appearance=\"outline\">\r\n @if (column.type === 'string') {\r\n <input matInput [(ngModel)]=\"rowDataCopy[column.field]\" />\r\n }\r\n @if (column.type === 'number') {\r\n <input matInput type=\"number\" [(ngModel)]=\"rowDataCopy[column.field]\" />\r\n }\r\n @if (column.type === 'boolean') {\r\n <mat-checkbox [(ngModel)]=\"rowDataCopy[column.field]\"></mat-checkbox>\r\n }\r\n </mat-form-field>\r\n } @else {\r\n <div>\r\n @if (column.translateValue) {\r\n {{ column.translateValue![rowData[column.field]] || '' }}\r\n }\r\n @if (column.customValueDisplay) {\r\n {{ column.customValueDisplay(rowData[column.field]) }}\r\n }\r\n @if (!column.translateValue && !column.customValueDisplay) {\r\n {{ rowData[column.field] }}\r\n }\r\n </div>\r\n }\r\n</ng-template>\r\n", styles: [""], dependencies: [{ kind: "directive", type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i4.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i5.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i7.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i9.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: i2.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: i2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i8$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i9$2.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i9$2.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i9$2.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "component", type: i10.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "pipe", type: i11$2.DateTimeFormatPipe, name: "stDateTimeFormatPipe" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
805
392
|
}
|
|
806
393
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MaterialTableRowCellComponent, decorators: [{
|
|
807
394
|
type: Component,
|
|
@@ -1176,7 +763,7 @@ class MaterialTableComponent extends StSubscribeDestroyComponent {
|
|
|
1176
763
|
};
|
|
1177
764
|
}
|
|
1178
765
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MaterialTableComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1$1.StSnackBarService }, { token: StTablesTranslationsService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1179
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: MaterialTableComponent, selector: "ngx-st-material-table", inputs: { showGlobalSearch: "showGlobalSearch", tableTitle: "tableTitle", pageSize: "pageSize", dataLength: "dataLength", allowPickColumns: "allowPickColumns", allowReorderColumns: "allowReorderColumns", localStorageName: "localStorageName", lazyLoading: "lazyLoading", isLoading: "isLoading", initColumns: "initColumns", rowClickAction: "rowClickAction", data: "data", rowEditing: "rowEditing", rowSelecting: "rowSelecting", selectionFieldLabel: "selectionFieldLabel" }, outputs: { loadData: "loadData", saveNewRow: "saveNewRow", selectRowChange: "selectRowChange" }, viewQueries: [{ propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true }, { propertyName: "sort", first: true, predicate: MatSort, descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"st-material-table\">\r\n @if (isLoading) {\r\n <div class=\"loading-spinner\">\r\n <mat-spinner color=\"accent\"></mat-spinner>\r\n </div>\r\n }\r\n\r\n @if (showTable) {\r\n <st-material-table-caption\r\n [tableTitle]=\"tableTitle\"\r\n [allowPickColumns]=\"allowPickColumns\"\r\n [showGlobalSearch]=\"showGlobalSearch\"\r\n [allowReorderColumns]=\"allowReorderColumns\"\r\n [columns]=\"columns\"\r\n [initFilters]=\"initFilters\"\r\n [initGlobalSearch]=\"initGlobalSearch\"\r\n (captionDataChanged)=\"captionDataChanged($event)\"\r\n (resetTableSettings)=\"resetTableSettings()\"\r\n ></st-material-table-caption>\r\n }\r\n\r\n <table\r\n [ngClass]=\"{ 'no-hover': !rowClickAction }\"\r\n mat-table\r\n [dataSource]=\"tableSource\"\r\n matSort\r\n >\r\n @for (column of selectedColumns; track column) {\r\n <ng-container [matColumnDef]=\"column.field\">\r\n <th\r\n mat-header-cell\r\n *matHeaderCellDef\r\n style=\"{{ column.width ? 'width:' + column.width : '' }}\"\r\n mat-sort-header\r\n [disabled]=\"!column.sort\"\r\n >\r\n @if (column.type === 'actions-row-selecting') {\r\n <mat-checkbox\r\n color=\"primary\"\r\n (change)=\"$event ? toggleAllRows() : null\"\r\n [checked]=\"selection.hasValue() && isAllSelected()\"\r\n [indeterminate]=\"selection.hasValue() && !isAllSelected()\"\r\n >\r\n </mat-checkbox>\r\n } @else {\r\n {{ column.header }}\r\n }\r\n </th>\r\n <td\r\n mat-cell\r\n *matCellDef=\"let element\"\r\n style=\"{{ column.width ? 'width:' + column.width : '' }}\"\r\n >\r\n <st-material-table-row-cell\r\n [column]=\"column\"\r\n [rowData]=\"element\"\r\n [rowDataCopy]=\"activeRowsEditing[element.id]\"\r\n [rowEditing]=\"!!activeRowsEditing[element.id]\"\r\n [rowIsSelected]=\"selection.isSelected(element)\"\r\n (editRowEmitter)=\"editRow(element, column)\"\r\n (saveEditRowEmitter)=\"saveEditRow(element, column)\"\r\n (cancelEditRowEmitter)=\"cancelEditRow(element, column)\"\r\n (selectRowChange)=\"selectRowChanged($event, element)\"\r\n ></st-material-table-row-cell>\r\n </td>\r\n </ng-container>\r\n }\r\n\r\n <tr mat-header-row *matHeaderRowDef=\"selectedColumnsString\"></tr>\r\n <tr\r\n mat-row\r\n *matRowDef=\"let row; columns: selectedColumnsString\"\r\n (click)=\"rowClickAction ? rowClickAction(row) : null\"\r\n ></tr>\r\n </table>\r\n <mat-paginator\r\n [showFirstLastButtons]=\"true\"\r\n [pageSizeOptions]=\"[5, 10, 15, 20, 25]\"\r\n [length]=\"dataLength\"\r\n ></mat-paginator>\r\n @if (rowSelecting) {\r\n <div class=\"st-material-table-selected-rows\">\r\n <button mat-stroked-button [matMenuTriggerFor]=\"menu\">\r\n {{ selection.selected.length }}\r\n {{ stTableTranslations.getTranslations()().rowSelected }}\r\n </button>\r\n <mat-menu #menu=\"matMenu\">\r\n @for (row of selection.selected; track row) {\r\n <button mat-menu-item (click)=\"removeSelectedRow(row)\">\r\n <div class=\"d-flex\">\r\n {{ row[selectionFieldLabel]\r\n }}<mat-icon style=\"margin-right: 0; margin-left: 10px\"\r\n >delete</mat-icon\r\n >\r\n </div>\r\n </button>\r\n }\r\n </mat-menu>\r\n </div>\r\n }\r\n</div>\r\n", styles: [".st-material-table{position:relative}.st-material-table .loading-spinner{position:absolute;top:0;left:0;width:100%;height:100%;background:#00000026;z-index:1;display:flex;justify-content:center}.st-material-table .loading-spinner mat-spinner{margin-top:5rem}.st-material-table .st-material-table-selected-rows{position:absolute;bottom:12px;left:5px}\n", ".st-material-table .search-form button{height:40px}.st-material-table .search-form mat-form-field:first-child{padding-left:0}.st-material-table .search-form mat-form-field:last-child{padding-right:0}.st-material-table .search-form .clear{padding:0}.st-material-table .search-form .clear mat-icon{height:20px;width:20px;font-size:20px;cursor:pointer}.st-material-table table{width:100%;box-shadow:none}.st-material-table table th.mat-mdc-header-cell,.st-material-table table td.mat-mdc-cell,.st-material-table table td.mat-mdc-footer-cell{padding:0}.st-material-table table th.mat-mdc-header-cell:first-of-type,.st-material-table table td.mat-mdc-cell:first-of-type,.st-material-table table td.mat-mdc-footer-cell:first-of-type{padding-left:12px}.st-material-table table th.mat-mdc-header-cell:last-of-type,.st-material-table table td.mat-mdc-cell:last-of-type,.st-material-table table td.mat-mdc-footer-cell:last-of-type{padding-right:12px}.st-material-table table thead tr{background-color:#fff9c4;height:40px!important}.st-material-table table thead tr th{border-color:#fdd835;font-size:.9rem;font-weight:600;color:#424242}.st-material-table table tbody{background-color:transparent!important}.st-material-table table tbody>tr{cursor:pointer}.st-material-table table tbody>tr.active{background-color:#a5d6a7}.st-material-table table tbody>tr.active td{border-bottom-color:#81c784!important}.st-material-table table tbody>tr:hover{background-color:#f5f5f5}.st-material-table table tbody>tr.disabled{cursor:not-allowed}.st-material-table table tbody>tr.disabled:hover{background-color:inherit!important}.st-material-table table tbody>tr.detail-row{height:0;cursor:default}.st-material-table table tbody>tr.detail-row:hover{background-color:transparent}.st-material-table table tbody>tr.detail-row .element-detail{overflow:hidden;display:flex}.st-material-table table tbody>tr.detail-row .element-detail p{padding:20px 0;margin-bottom:0;white-space:pre-wrap}.st-material-table table tbody>tr td i.active-row{color:#1b5e20;font-weight:700;font-size:25px;height:25px;width:25px;margin-top:2px}.st-material-table table tbody>tr td>div{max-height:200px;overflow:hidden;overflow-y:auto}.st-material-table table tbody>tr td a button{color:#000}.st-material-table table tbody>tr td a mat-icon{color:#333}.st-material-table table .mat-column-active{width:48px}.st-material-table table.no-hover tbody tr{cursor:default}.st-material-table table.no-hover tbody tr.active{background-color:transparent!important}.st-material-table table.no-hover tbody tr.active td{border-bottom-color:#0000001f!important}.st-material-table table.no-hover tbody tr:hover{background-color:transparent!important}.st-material-table table.no-hover tbody tr:hover td{border-bottom-color:#0000001f!important}.st-material-table table.admin-table .actions-cell{width:100px}.dark-theme .st-material-table table{background-color:transparent!important}.dark-theme .st-material-table table thead tr{background-color:#5e4803!important}.dark-theme .st-material-table table thead tr th{border-color:#816204!important;color:#e0e0e0!important}.dark-theme .st-material-table tbody tr:hover{background-color:var(--primeng-table-hover-background)!important}.dark-theme mat-paginator{background-color:transparent!important}.dark-theme .reorder-column-list .reorder-column-element{background-color:#424242!important;color:#eee!important}.dark-theme .reorder-column-list .reorder-column-element p,.dark-theme .reorder-column-list .reorder-column-element mat-icon{color:#eee!important}.dark-theme .filter .filter-title{color:#eee!important}\n"], dependencies: [{ kind: "directive", type: i4$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i4.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { 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: "component", type: i7$1.MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "directive", type: i12.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i12.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: i9$1.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i9$1.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i9$1.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "component", type: i10$1.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "component", type: i11$1.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: MaterialTableCaptionComponent, selector: "st-material-table-caption", inputs: ["showGlobalSearch", "tableTitle", "allowPickColumns", "allowReorderColumns", "initGlobalSearch", "initFilters", "columns"], outputs: ["captionDataChanged", "resetTableSettings"] }, { kind: "component", type: MaterialTableRowCellComponent, selector: "st-material-table-row-cell", inputs: ["column", "rowData", "rowDataCopy", "rowEditing", "rowIsSelected"], outputs: ["saveEditRowEmitter", "cancelEditRowEmitter", "editRowEmitter", "selectRowChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
766
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: MaterialTableComponent, selector: "ngx-st-material-table", inputs: { showGlobalSearch: "showGlobalSearch", tableTitle: "tableTitle", pageSize: "pageSize", dataLength: "dataLength", allowPickColumns: "allowPickColumns", allowReorderColumns: "allowReorderColumns", localStorageName: "localStorageName", lazyLoading: "lazyLoading", isLoading: "isLoading", initColumns: "initColumns", rowClickAction: "rowClickAction", data: "data", rowEditing: "rowEditing", rowSelecting: "rowSelecting", selectionFieldLabel: "selectionFieldLabel" }, outputs: { loadData: "loadData", saveNewRow: "saveNewRow", selectRowChange: "selectRowChange" }, viewQueries: [{ propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true }, { propertyName: "sort", first: true, predicate: MatSort, descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"st-material-table\">\r\n @if (isLoading) {\r\n <div class=\"loading-spinner\">\r\n <mat-spinner color=\"accent\"></mat-spinner>\r\n </div>\r\n }\r\n\r\n @if (showTable) {\r\n <st-material-table-caption\r\n [tableTitle]=\"tableTitle\"\r\n [allowPickColumns]=\"allowPickColumns\"\r\n [showGlobalSearch]=\"showGlobalSearch\"\r\n [allowReorderColumns]=\"allowReorderColumns\"\r\n [columns]=\"columns\"\r\n [initFilters]=\"initFilters\"\r\n [initGlobalSearch]=\"initGlobalSearch\"\r\n (captionDataChanged)=\"captionDataChanged($event)\"\r\n (resetTableSettings)=\"resetTableSettings()\"\r\n ></st-material-table-caption>\r\n }\r\n\r\n <table\r\n [ngClass]=\"{ 'no-hover': !rowClickAction }\"\r\n mat-table\r\n [dataSource]=\"tableSource\"\r\n matSort\r\n >\r\n @for (column of selectedColumns; track column) {\r\n <ng-container [matColumnDef]=\"column.field\">\r\n <th\r\n mat-header-cell\r\n *matHeaderCellDef\r\n style=\"{{ column.width ? 'width:' + column.width : '' }}\"\r\n mat-sort-header\r\n [disabled]=\"!column.sort\"\r\n >\r\n @if (column.type === 'actions-row-selecting') {\r\n <mat-checkbox\r\n color=\"primary\"\r\n (change)=\"$event ? toggleAllRows() : null\"\r\n [checked]=\"selection.hasValue() && isAllSelected()\"\r\n [indeterminate]=\"selection.hasValue() && !isAllSelected()\"\r\n >\r\n </mat-checkbox>\r\n } @else {\r\n {{ column.header }}\r\n }\r\n </th>\r\n <td\r\n mat-cell\r\n *matCellDef=\"let element\"\r\n style=\"{{ column.width ? 'width:' + column.width : '' }}\"\r\n >\r\n <st-material-table-row-cell\r\n [column]=\"column\"\r\n [rowData]=\"element\"\r\n [rowDataCopy]=\"activeRowsEditing[element.id]\"\r\n [rowEditing]=\"!!activeRowsEditing[element.id]\"\r\n [rowIsSelected]=\"selection.isSelected(element)\"\r\n (editRowEmitter)=\"editRow(element, column)\"\r\n (saveEditRowEmitter)=\"saveEditRow(element, column)\"\r\n (cancelEditRowEmitter)=\"cancelEditRow(element, column)\"\r\n (selectRowChange)=\"selectRowChanged($event, element)\"\r\n ></st-material-table-row-cell>\r\n </td>\r\n </ng-container>\r\n }\r\n\r\n <tr mat-header-row *matHeaderRowDef=\"selectedColumnsString\"></tr>\r\n <tr\r\n mat-row\r\n *matRowDef=\"let row; columns: selectedColumnsString\"\r\n (click)=\"rowClickAction ? rowClickAction(row) : null\"\r\n ></tr>\r\n </table>\r\n <mat-paginator\r\n [showFirstLastButtons]=\"true\"\r\n [pageSizeOptions]=\"[5, 10, 15, 20, 25]\"\r\n [length]=\"dataLength\"\r\n ></mat-paginator>\r\n @if (rowSelecting) {\r\n <div class=\"st-material-table-selected-rows\">\r\n <button mat-stroked-button [matMenuTriggerFor]=\"menu\">\r\n {{ selection.selected.length }}\r\n {{ stTableTranslations.getTranslations()().rowSelected }}\r\n </button>\r\n <mat-menu #menu=\"matMenu\">\r\n @for (row of selection.selected; track row) {\r\n <button mat-menu-item (click)=\"removeSelectedRow(row)\">\r\n <div class=\"d-flex\">\r\n {{ row[selectionFieldLabel]\r\n }}<mat-icon style=\"margin-right: 0; margin-left: 10px\"\r\n >delete</mat-icon\r\n >\r\n </div>\r\n </button>\r\n }\r\n </mat-menu>\r\n </div>\r\n }\r\n</div>\r\n", styles: [".st-material-table{position:relative}.st-material-table .loading-spinner{position:absolute;top:0;left:0;width:100%;height:100%;background:#00000026;z-index:1;display:flex;justify-content:center}.st-material-table .loading-spinner mat-spinner{margin-top:5rem}.st-material-table .st-material-table-selected-rows{position:absolute;bottom:12px;left:5px}\n", ".st-material-table .search-form button{height:40px}.st-material-table .search-form mat-form-field:first-child{padding-left:0}.st-material-table .search-form mat-form-field:last-child{padding-right:0}.st-material-table .search-form .clear{padding:0}.st-material-table .search-form .clear mat-icon{height:20px;width:20px;font-size:20px;cursor:pointer}.st-material-table table{width:100%;box-shadow:none}.st-material-table table th.mat-mdc-header-cell,.st-material-table table td.mat-mdc-cell,.st-material-table table td.mat-mdc-footer-cell{padding:0}.st-material-table table th.mat-mdc-header-cell:first-of-type,.st-material-table table td.mat-mdc-cell:first-of-type,.st-material-table table td.mat-mdc-footer-cell:first-of-type{padding-left:12px}.st-material-table table th.mat-mdc-header-cell:last-of-type,.st-material-table table td.mat-mdc-cell:last-of-type,.st-material-table table td.mat-mdc-footer-cell:last-of-type{padding-right:12px}.st-material-table table thead tr{background-color:#fff9c4;height:40px!important}.st-material-table table thead tr th{border-color:#fdd835;font-size:.9rem;font-weight:600;color:#424242}.st-material-table table tbody{background-color:transparent!important}.st-material-table table tbody>tr{cursor:pointer}.st-material-table table tbody>tr.active{background-color:#a5d6a7}.st-material-table table tbody>tr.active td{border-bottom-color:#81c784!important}.st-material-table table tbody>tr:hover{background-color:#f5f5f5}.st-material-table table tbody>tr.disabled{cursor:not-allowed}.st-material-table table tbody>tr.disabled:hover{background-color:inherit!important}.st-material-table table tbody>tr.detail-row{height:0;cursor:default}.st-material-table table tbody>tr.detail-row:hover{background-color:transparent}.st-material-table table tbody>tr.detail-row .element-detail{overflow:hidden;display:flex}.st-material-table table tbody>tr.detail-row .element-detail p{padding:20px 0;margin-bottom:0;white-space:pre-wrap}.st-material-table table tbody>tr td i.active-row{color:#1b5e20;font-weight:700;font-size:25px;height:25px;width:25px;margin-top:2px}.st-material-table table tbody>tr td>div{max-height:200px;overflow:hidden;overflow-y:auto}.st-material-table table tbody>tr td a button{color:#000}.st-material-table table tbody>tr td a mat-icon{color:#333}.st-material-table table .mat-column-active{width:48px}.st-material-table table.no-hover tbody tr{cursor:default}.st-material-table table.no-hover tbody tr.active{background-color:transparent!important}.st-material-table table.no-hover tbody tr.active td{border-bottom-color:#0000001f!important}.st-material-table table.no-hover tbody tr:hover{background-color:transparent!important}.st-material-table table.no-hover tbody tr:hover td{border-bottom-color:#0000001f!important}.st-material-table table.admin-table .actions-cell{width:100px}.dark-theme .st-material-table table{background-color:transparent!important}.dark-theme .st-material-table table thead tr{background-color:#5e4803!important}.dark-theme .st-material-table table thead tr th{border-color:#816204!important;color:#e0e0e0!important}.dark-theme .st-material-table tbody tr:hover{background-color:var(--primeng-table-hover-background)!important}.dark-theme mat-paginator{background-color:transparent!important}.dark-theme .reorder-column-list .reorder-column-element{background-color:#424242!important;color:#eee!important}.dark-theme .reorder-column-list .reorder-column-element p,.dark-theme .reorder-column-list .reorder-column-element mat-icon{color:#eee!important}.dark-theme .filter .filter-title{color:#eee!important}\n"], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i5.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { 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: "component", type: i7$1.MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "directive", type: i8$2.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i8$2.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: i9$2.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i9$2.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i9$2.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "component", type: i10.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "component", type: i11$3.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: MaterialTableCaptionComponent, selector: "st-material-table-caption", inputs: ["showGlobalSearch", "tableTitle", "allowPickColumns", "allowReorderColumns", "initGlobalSearch", "initFilters", "columns"], outputs: ["captionDataChanged", "resetTableSettings"] }, { kind: "component", type: MaterialTableRowCellComponent, selector: "st-material-table-row-cell", inputs: ["column", "rowData", "rowDataCopy", "rowEditing", "rowIsSelected"], outputs: ["saveEditRowEmitter", "cancelEditRowEmitter", "editRowEmitter", "selectRowChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
1180
767
|
}
|
|
1181
768
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MaterialTableComponent, decorators: [{
|
|
1182
769
|
type: Component,
|
|
@@ -1241,11 +828,8 @@ class StTablesModule {
|
|
|
1241
828
|
],
|
|
1242
829
|
};
|
|
1243
830
|
}
|
|
1244
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: StTablesModule, deps: [{ token: i5.MatIconRegistry }], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1245
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: StTablesModule, declarations: [
|
|
1246
|
-
SelectTableComponent,
|
|
1247
|
-
ConfigurationsComponent,
|
|
1248
|
-
MaterialTableCaptionComponent,
|
|
831
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: StTablesModule, deps: [{ token: i5$1.MatIconRegistry }], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
832
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: StTablesModule, declarations: [MaterialTableCaptionComponent,
|
|
1249
833
|
MaterialTableComponent,
|
|
1250
834
|
MaterialTableOrderColumnDialogComponent,
|
|
1251
835
|
MaterialTableFilterDialogComponent,
|
|
@@ -1279,8 +863,8 @@ class StTablesModule {
|
|
|
1279
863
|
MatDatepickerModule,
|
|
1280
864
|
MatSlideToggleModule,
|
|
1281
865
|
MatNativeDateModule,
|
|
1282
|
-
StSnackBarModule], exports: [
|
|
1283
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: StTablesModule, providers: [
|
|
866
|
+
StSnackBarModule], exports: [MaterialTableComponent] }); }
|
|
867
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: StTablesModule, providers: [MatDatepickerModule], imports: [CommonModule,
|
|
1284
868
|
MatButtonModule,
|
|
1285
869
|
MatIconModule,
|
|
1286
870
|
MatTableModule,
|
|
@@ -1312,9 +896,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
1312
896
|
type: NgModule,
|
|
1313
897
|
args: [{
|
|
1314
898
|
declarations: [
|
|
1315
|
-
LocalTableComponent,
|
|
1316
|
-
SelectTableComponent,
|
|
1317
|
-
ConfigurationsComponent,
|
|
1318
899
|
MaterialTableCaptionComponent,
|
|
1319
900
|
MaterialTableComponent,
|
|
1320
901
|
MaterialTableOrderColumnDialogComponent,
|
|
@@ -1354,10 +935,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
1354
935
|
MatNativeDateModule,
|
|
1355
936
|
StSnackBarModule,
|
|
1356
937
|
],
|
|
1357
|
-
exports: [
|
|
1358
|
-
providers: [
|
|
938
|
+
exports: [MaterialTableComponent],
|
|
939
|
+
providers: [MatDatepickerModule],
|
|
1359
940
|
}]
|
|
1360
|
-
}], ctorParameters: () => [{ type: i5.MatIconRegistry }] });
|
|
941
|
+
}], ctorParameters: () => [{ type: i5$1.MatIconRegistry }] });
|
|
1361
942
|
|
|
1362
943
|
/*
|
|
1363
944
|
* Public API Surface of ngx-st-tables
|
|
@@ -1367,5 +948,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
1367
948
|
* Generated bundle index. Do not edit.
|
|
1368
949
|
*/
|
|
1369
950
|
|
|
1370
|
-
export {
|
|
951
|
+
export { MaterialTableCaptionComponent, MaterialTableComponent, StTablesModule, StTablesTranslationsService };
|
|
1371
952
|
//# sourceMappingURL=ngx-st-tables.mjs.map
|