ngx-st-tables 1.1.13 → 1.1.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/README.md +24 -24
  2. package/assets/base-collapse-table.scss +49 -49
  3. package/assets/base-table.scss +155 -155
  4. package/esm2020/lib/components/local-table/configurations/configurations.component.mjs +69 -69
  5. package/esm2020/lib/components/local-table/local-table.component.mjs +259 -259
  6. package/esm2020/lib/components/select-table/select-table.component.mjs +101 -100
  7. package/esm2020/lib/models/st-configurations-settings.model.mjs +1 -1
  8. package/esm2020/lib/models/st-global-search-settings.model.mjs +1 -1
  9. package/esm2020/lib/models/st-local-storage-configuration.model.mjs +1 -1
  10. package/esm2020/lib/models/st-local-table-column.model.mjs +1 -1
  11. package/esm2020/lib/models/st-local-table-columns.model.mjs +1 -1
  12. package/esm2020/lib/models/st-table-settings.model.mjs +1 -1
  13. package/esm2020/lib/ngx-st-tables.module.mjs +89 -89
  14. package/esm2020/lib/services/local-table.service.mjs +36 -36
  15. package/esm2020/ngx-st-tables.mjs +4 -4
  16. package/esm2020/public-api.mjs +15 -15
  17. package/fesm2015/ngx-st-tables.mjs +482 -481
  18. package/fesm2015/ngx-st-tables.mjs.map +1 -1
  19. package/fesm2020/ngx-st-tables.mjs +484 -483
  20. package/fesm2020/ngx-st-tables.mjs.map +1 -1
  21. package/index.d.ts +5 -5
  22. package/lib/components/local-table/configurations/configurations.component.d.ts +27 -27
  23. package/lib/components/local-table/local-table.component.d.ts +63 -63
  24. package/lib/components/select-table/select-table.component.d.ts +37 -37
  25. package/lib/models/st-configurations-settings.model.d.ts +6 -6
  26. package/lib/models/st-global-search-settings.model.d.ts +4 -4
  27. package/lib/models/st-local-storage-configuration.model.d.ts +8 -8
  28. package/lib/models/st-local-table-column.model.d.ts +22 -22
  29. package/lib/models/st-local-table-columns.model.d.ts +4 -4
  30. package/lib/models/st-table-settings.model.d.ts +3 -3
  31. package/lib/ngx-st-tables.module.d.ts +24 -24
  32. package/lib/services/local-table.service.d.ts +11 -11
  33. package/package.json +1 -1
  34. package/public-api.d.ts +11 -11
@@ -32,501 +32,502 @@ import * as i7 from '@angular/material/core';
32
32
  import * as i16 from 'ngx-st-date-format';
33
33
  import { StDateFormatModule } from 'ngx-st-date-format';
34
34
 
35
- class LocalTableService {
36
- constructor() {
37
- this.localStorageName = '';
38
- }
39
- getConfigs() {
40
- if (this.checkLocalStorageName()) {
41
- return JSON.parse(localStorage.getItem(this.localStorageName) || '[]');
42
- }
43
- return [];
44
- }
45
- saveConfigs(configs) {
46
- if (this.checkLocalStorageName()) {
47
- localStorage.setItem(this.localStorageName, JSON.stringify(configs));
48
- }
49
- }
50
- checkLocalStorageName() {
51
- if (this.localStorageName) {
52
- return true;
53
- }
54
- else {
55
- console.warn('Yiu have to add configurationsSettings');
56
- return false;
57
- }
58
- }
59
- }
60
- LocalTableService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: LocalTableService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
61
- LocalTableService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: LocalTableService, providedIn: 'root' });
62
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: LocalTableService, decorators: [{
63
- type: Injectable,
64
- args: [{
65
- providedIn: 'root',
66
- }]
35
+ class LocalTableService {
36
+ constructor() {
37
+ this.localStorageName = '';
38
+ }
39
+ getConfigs() {
40
+ if (this.checkLocalStorageName()) {
41
+ return JSON.parse(localStorage.getItem(this.localStorageName) || '[]');
42
+ }
43
+ return [];
44
+ }
45
+ saveConfigs(configs) {
46
+ if (this.checkLocalStorageName()) {
47
+ localStorage.setItem(this.localStorageName, JSON.stringify(configs));
48
+ }
49
+ }
50
+ checkLocalStorageName() {
51
+ if (this.localStorageName) {
52
+ return true;
53
+ }
54
+ else {
55
+ console.warn('Yiu have to add configurationsSettings');
56
+ return false;
57
+ }
58
+ }
59
+ }
60
+ LocalTableService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: LocalTableService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
61
+ LocalTableService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: LocalTableService, providedIn: 'root' });
62
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: LocalTableService, decorators: [{
63
+ type: Injectable,
64
+ args: [{
65
+ providedIn: 'root',
66
+ }]
67
67
  }], ctorParameters: function () { return []; } });
68
68
 
69
- class ConfigurationsComponent {
70
- constructor() {
71
- this.createNewConfig = new EventEmitter();
72
- this.removeConfig = new EventEmitter();
73
- this.changeConfig = new EventEmitter();
74
- this.creatingConfiguration = false;
75
- this.createConfigurationName = '';
76
- this.removingConfiguration = false;
77
- }
78
- set initSelectedConfig(config) {
79
- this.selectedConfig = config;
80
- }
81
- ngOnInit() { }
82
- showCreateConfiguration() {
83
- this.creatingConfiguration = true;
84
- this.createConfigurationName = '';
85
- }
86
- hideCreateConfiguration() {
87
- this.creatingConfiguration = false;
88
- this.createConfigurationName = '';
89
- }
90
- saveCreateConfiguration() {
91
- this.creatingConfiguration = false;
92
- this.selectedConfig = null;
93
- this.createNewConfig.emit(this.createConfigurationName);
94
- }
95
- deleteConfiguration() {
96
- this.removingConfiguration = true;
97
- }
98
- acceptDeleteConfiguration() {
99
- this.removingConfiguration = false;
100
- this.selectedConfig = null;
101
- this.removeConfig.emit(this.selectedConfig.configId);
102
- }
103
- declineDeleteConfiguration() {
104
- this.removingConfiguration = false;
105
- }
106
- selectedConfigChanged() {
107
- this.changeConfig.emit(this.selectedConfig?.configId || null);
108
- }
109
- }
110
- ConfigurationsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConfigurationsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
111
- ConfigurationsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", 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\">\n <ng-container *ngIf=\"!creatingConfiguration && !removingConfiguration\">\n <mat-form-field class=\"col-auto\" style=\"padding-right: 0\">\n <mat-label>{{ configurationsSettings.selectLabel }}</mat-label>\n <mat-select\n [(ngModel)]=\"selectedConfig\"\n (ngModelChange)=\"selectedConfigChanged()\"\n >\n <mat-option [value]=\"null\"></mat-option>\n <mat-option *ngFor=\"let config of configurations\" [value]=\"config\">{{\n config.configName\n }}</mat-option>\n </mat-select>\n </mat-form-field>\n <button\n mat-icon-button\n class=\"col-auto green-icon\"\n (click)=\"showCreateConfiguration()\"\n >\n <span class=\"material-icons-outlined\"> add </span>\n </button>\n <button\n mat-icon-button\n class=\"col-auto red-icon\"\n [disabled]=\"!selectedConfig\"\n (click)=\"deleteConfiguration()\"\n >\n <span class=\"material-icons-outlined\"> delete </span>\n </button>\n </ng-container>\n\n <ng-container *ngIf=\"creatingConfiguration\">\n <mat-form-field class=\"col-auto\">\n <mat-label>{{ configurationsSettings.createLabel }}</mat-label>\n <input matInput [(ngModel)]=\"createConfigurationName\" />\n </mat-form-field>\n <button\n mat-icon-button\n class=\"col-auto green-icon\"\n (click)=\"saveCreateConfiguration()\"\n [disabled]=\"!createConfigurationName\"\n >\n <span class=\"material-icons-outlined\"> done </span>\n </button>\n <button\n mat-icon-button\n class=\"col-auto red-icon\"\n (click)=\"hideCreateConfiguration()\"\n >\n <span class=\"material-icons-outlined\"> close </span>\n </button>\n </ng-container>\n\n <ng-container *ngIf=\"removingConfiguration\">\n <p class=\"col-auto\" style=\"margin: 0; font-weight: bold; font-size: 16px\">\n {{ configurationsSettings.deleteWarningTitle }}\n </p>\n <button\n mat-icon-button\n class=\"col-auto green-icon\"\n (click)=\"acceptDeleteConfiguration()\"\n >\n <span class=\"material-icons-outlined\"> done </span>\n </button>\n <button\n mat-icon-button\n class=\"col-auto red-icon\"\n (click)=\"declineDeleteConfiguration()\"\n >\n <span class=\"material-icons-outlined\"> close </span>\n </button>\n </ng-container>\n</div>\n", styles: [".green-icon span{color:#2e7d32}.red-icon span{color:#c62828}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4.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: i5.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: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i6.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "component", type: i7.MatOption, selector: "mat-option", exportAs: ["matOption"] }] });
112
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConfigurationsComponent, decorators: [{
113
- type: Component,
114
- args: [{ selector: 'st-configurations[configurationsSettings]', template: "<div class=\"col-auto row align-items-center\" style=\"padding: 0\">\n <ng-container *ngIf=\"!creatingConfiguration && !removingConfiguration\">\n <mat-form-field class=\"col-auto\" style=\"padding-right: 0\">\n <mat-label>{{ configurationsSettings.selectLabel }}</mat-label>\n <mat-select\n [(ngModel)]=\"selectedConfig\"\n (ngModelChange)=\"selectedConfigChanged()\"\n >\n <mat-option [value]=\"null\"></mat-option>\n <mat-option *ngFor=\"let config of configurations\" [value]=\"config\">{{\n config.configName\n }}</mat-option>\n </mat-select>\n </mat-form-field>\n <button\n mat-icon-button\n class=\"col-auto green-icon\"\n (click)=\"showCreateConfiguration()\"\n >\n <span class=\"material-icons-outlined\"> add </span>\n </button>\n <button\n mat-icon-button\n class=\"col-auto red-icon\"\n [disabled]=\"!selectedConfig\"\n (click)=\"deleteConfiguration()\"\n >\n <span class=\"material-icons-outlined\"> delete </span>\n </button>\n </ng-container>\n\n <ng-container *ngIf=\"creatingConfiguration\">\n <mat-form-field class=\"col-auto\">\n <mat-label>{{ configurationsSettings.createLabel }}</mat-label>\n <input matInput [(ngModel)]=\"createConfigurationName\" />\n </mat-form-field>\n <button\n mat-icon-button\n class=\"col-auto green-icon\"\n (click)=\"saveCreateConfiguration()\"\n [disabled]=\"!createConfigurationName\"\n >\n <span class=\"material-icons-outlined\"> done </span>\n </button>\n <button\n mat-icon-button\n class=\"col-auto red-icon\"\n (click)=\"hideCreateConfiguration()\"\n >\n <span class=\"material-icons-outlined\"> close </span>\n </button>\n </ng-container>\n\n <ng-container *ngIf=\"removingConfiguration\">\n <p class=\"col-auto\" style=\"margin: 0; font-weight: bold; font-size: 16px\">\n {{ configurationsSettings.deleteWarningTitle }}\n </p>\n <button\n mat-icon-button\n class=\"col-auto green-icon\"\n (click)=\"acceptDeleteConfiguration()\"\n >\n <span class=\"material-icons-outlined\"> done </span>\n </button>\n <button\n mat-icon-button\n class=\"col-auto red-icon\"\n (click)=\"declineDeleteConfiguration()\"\n >\n <span class=\"material-icons-outlined\"> close </span>\n </button>\n </ng-container>\n</div>\n", styles: [".green-icon span{color:#2e7d32}.red-icon span{color:#c62828}\n"] }]
115
- }], ctorParameters: function () { return []; }, propDecorators: { configurationsSettings: [{
116
- type: Input
117
- }], configurations: [{
118
- type: Input
119
- }], initSelectedConfig: [{
120
- type: Input
121
- }], createNewConfig: [{
122
- type: Output
123
- }], removeConfig: [{
124
- type: Output
125
- }], changeConfig: [{
126
- type: Output
69
+ class ConfigurationsComponent {
70
+ constructor() {
71
+ this.createNewConfig = new EventEmitter();
72
+ this.removeConfig = new EventEmitter();
73
+ this.changeConfig = new EventEmitter();
74
+ this.creatingConfiguration = false;
75
+ this.createConfigurationName = '';
76
+ this.removingConfiguration = false;
77
+ }
78
+ set initSelectedConfig(config) {
79
+ this.selectedConfig = config;
80
+ }
81
+ ngOnInit() { }
82
+ showCreateConfiguration() {
83
+ this.creatingConfiguration = true;
84
+ this.createConfigurationName = '';
85
+ }
86
+ hideCreateConfiguration() {
87
+ this.creatingConfiguration = false;
88
+ this.createConfigurationName = '';
89
+ }
90
+ saveCreateConfiguration() {
91
+ this.creatingConfiguration = false;
92
+ this.selectedConfig = null;
93
+ this.createNewConfig.emit(this.createConfigurationName);
94
+ }
95
+ deleteConfiguration() {
96
+ this.removingConfiguration = true;
97
+ }
98
+ acceptDeleteConfiguration() {
99
+ this.removingConfiguration = false;
100
+ this.selectedConfig = null;
101
+ this.removeConfig.emit(this.selectedConfig.configId);
102
+ }
103
+ declineDeleteConfiguration() {
104
+ this.removingConfiguration = false;
105
+ }
106
+ selectedConfigChanged() {
107
+ this.changeConfig.emit(this.selectedConfig?.configId || null);
108
+ }
109
+ }
110
+ ConfigurationsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConfigurationsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
111
+ ConfigurationsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", 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 <ng-container *ngIf=\"!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 <mat-option *ngFor=\"let config of configurations\" [value]=\"config\">{{\r\n config.configName\r\n }}</mat-option>\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 <span class=\"material-icons-outlined\"> add </span>\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 <span class=\"material-icons-outlined\"> delete </span>\r\n </button>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"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 <span class=\"material-icons-outlined\"> done </span>\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 <span class=\"material-icons-outlined\"> close </span>\r\n </button>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"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 <span class=\"material-icons-outlined\"> done </span>\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 <span class=\"material-icons-outlined\"> close </span>\r\n </button>\r\n </ng-container>\r\n</div>\r\n", styles: [".green-icon span{color:#2e7d32}.red-icon span{color:#c62828}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4.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: i5.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: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i6.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "component", type: i7.MatOption, selector: "mat-option", exportAs: ["matOption"] }] });
112
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConfigurationsComponent, decorators: [{
113
+ type: Component,
114
+ args: [{ selector: 'st-configurations[configurationsSettings]', template: "<div class=\"col-auto row align-items-center\" style=\"padding: 0\">\r\n <ng-container *ngIf=\"!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 <mat-option *ngFor=\"let config of configurations\" [value]=\"config\">{{\r\n config.configName\r\n }}</mat-option>\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 <span class=\"material-icons-outlined\"> add </span>\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 <span class=\"material-icons-outlined\"> delete </span>\r\n </button>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"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 <span class=\"material-icons-outlined\"> done </span>\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 <span class=\"material-icons-outlined\"> close </span>\r\n </button>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"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 <span class=\"material-icons-outlined\"> done </span>\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 <span class=\"material-icons-outlined\"> close </span>\r\n </button>\r\n </ng-container>\r\n</div>\r\n", styles: [".green-icon span{color:#2e7d32}.red-icon span{color:#c62828}\n"] }]
115
+ }], ctorParameters: function () { return []; }, propDecorators: { configurationsSettings: [{
116
+ type: Input
117
+ }], configurations: [{
118
+ type: Input
119
+ }], initSelectedConfig: [{
120
+ type: Input
121
+ }], createNewConfig: [{
122
+ type: Output
123
+ }], removeConfig: [{
124
+ type: Output
125
+ }], changeConfig: [{
126
+ type: Output
127
127
  }] } });
128
128
 
129
- class LocalTableComponent {
130
- constructor(localTableService, changeDetectorRef, router, activatedRoute) {
131
- this.localTableService = localTableService;
132
- this.changeDetectorRef = changeDetectorRef;
133
- this.router = router;
134
- this.activatedRoute = activatedRoute;
135
- this.pageSize = 10;
136
- this.allowPickColumns = false;
137
- this.localStorageName = '';
138
- this.bindSearchToUrl = false;
139
- this._columns = {};
140
- this._data = [];
141
- this.searchModel = '';
142
- this.displayedColumns = [];
143
- this.configurations = [];
144
- this.initConfig = null;
145
- this.activeConfig = null;
146
- this.pageIndex = 0;
147
- }
148
- set columns(columns) {
149
- this._columns = columns;
150
- this.columnsArray = this.getColumnsArray();
151
- this.setDisplayedColumns();
152
- }
153
- get columns() {
154
- return this._columns;
155
- }
156
- set data(data) {
157
- this._data = data || [];
158
- this.setTableSource();
159
- }
160
- get data() {
161
- return this._data;
162
- }
163
- ngOnInit() {
164
- if (this.localStorageName) {
165
- const pageSize = localStorage.getItem(this.localStorageName);
166
- if (pageSize) {
167
- this.pageSize = parseInt(pageSize);
168
- }
169
- }
170
- if (this.configurationsSettings) {
171
- this.localTableService.localStorageName =
172
- this.configurationsSettings?.localStorageName || '';
173
- this.loadConfigs();
174
- }
175
- }
176
- ngAfterViewInit() {
177
- if (this.configurationsSettings) {
178
- this.paginator.page.subscribe(res => {
179
- if (this.activeConfig) {
180
- this.activeConfig.pageSize = res.pageSize;
181
- this.updateConfigsToLocalStorage();
182
- }
183
- });
184
- this.sort.sortChange.subscribe(res => {
185
- if (this.activeConfig) {
186
- this.activeConfig.sortFieldName = res.active;
187
- this.activeConfig.sortDirection = res.direction;
188
- this.updateConfigsToLocalStorage();
189
- }
190
- });
191
- }
192
- if (this.bindSearchToUrl) {
193
- const params = new URLSearchParams(location.search);
194
- this.sort.sortChange.subscribe(res => {
195
- this.updateSearchToUrl();
196
- });
197
- if (params.get('stLocalTablePageIndex')) {
198
- this.pageIndex = parseInt(params.get('stLocalTablePageIndex') || '');
199
- }
200
- if (params.get('stLocalTablePageSize')) {
201
- this.pageSize = parseInt(params.get('stLocalTablePageSize') || '');
202
- }
203
- if (params.get('stLocalTableSortFieldName') &&
204
- params.get('stLocalTableSortDirection')) {
205
- this.sort.sort({
206
- id: params.get('stLocalTableSortFieldName') || '',
207
- start: params.get('stLocalTableSortDirection') || 'asc',
208
- disableClear: false,
209
- });
210
- }
211
- this.searchModel = params.get('stLocalTableSearch') || '';
212
- if (this.searchModel) {
213
- this.tableSource.filter = this.searchModel.trim().toLowerCase();
214
- }
215
- }
216
- this.paginator.pageSize = this.pageSize;
217
- }
218
- applySearch() {
219
- this.tableSource.filter = this.searchModel.trim().toLowerCase();
220
- this.pageIndex = 0;
221
- this.updateSearchToUrl();
222
- }
223
- clearSearch() {
224
- this.searchModel = '';
225
- this.tableSource.filter = this.searchModel;
226
- this.pageIndex = 0;
227
- this.updateSearchToUrl();
228
- }
229
- checkIfActionVisible(row, action) {
230
- if (action.show) {
231
- return action.show(row);
232
- }
233
- else {
234
- return true;
235
- }
236
- }
237
- columnVisibleChanged(column) {
238
- this.setDisplayedColumns();
239
- this.updateConfigsToLocalStorage();
240
- }
241
- newConfigCreated(name) {
242
- const newConfig = this.generateNewConfig(name);
243
- this.configurations.push(newConfig);
244
- this.updateConfigsToLocalStorage();
245
- this.initConfig = newConfig;
246
- }
247
- configRemoved(configId) {
248
- this.configurations = this.configurations.filter(config => config.configId !== configId);
249
- this.updateConfigsToLocalStorage();
250
- }
251
- configChanged(configId) {
252
- this.activeConfig = configId
253
- ? this.configurations.find(config => config.configId === configId)
254
- : null;
255
- if (this.activeConfig) {
256
- this.setTableConfig(this.activeConfig.pageSize, this.activeConfig.columnsDisabled, this.activeConfig.sortFieldName, this.activeConfig.sortDirection);
257
- }
258
- else {
259
- this.setTableConfig(this.pageSize, [], null, null);
260
- this.clearSearch();
261
- }
262
- }
263
- pageChanged(event) {
264
- this.pageIndex = event.pageIndex;
265
- this.updateSearchToUrl();
266
- }
267
- updateSearchToUrl() {
268
- if (this.bindSearchToUrl) {
269
- let queryParams = {
270
- stLocalTableSearch: this.searchModel,
271
- stLocalTablePageIndex: this.pageIndex,
272
- stLocalTablePageSize: this.paginator.pageSize,
273
- stLocalTableSortFieldName: '',
274
- stLocalTableSortDirection: '',
275
- };
276
- if (this.sort.direction && this.sort.active) {
277
- queryParams = {
278
- ...queryParams,
279
- stLocalTableSortFieldName: this.sort.active,
280
- stLocalTableSortDirection: this.sort.direction,
281
- };
282
- }
283
- this.router.navigate(['./'], {
284
- queryParams: queryParams,
285
- relativeTo: this.activatedRoute,
286
- });
287
- }
288
- }
289
- updateConfigsToLocalStorage() {
290
- this.localTableService.saveConfigs(this.configurations);
291
- }
292
- setTableSource() {
293
- this.tableSource = new MatTableDataSource(this._data);
294
- this.tableSource.paginator = this.paginator;
295
- this.tableSource.sort = this.sort;
296
- this.tableSource.filter = this.searchModel;
297
- this.changeDetectorRef.markForCheck();
298
- }
299
- setDisplayedColumns() {
300
- this.displayedColumns = Object.keys(this.columns).filter(column => {
301
- return this._columns[column].visible;
302
- });
303
- }
304
- getColumnsArray() {
305
- return Object.keys(this._columns).map(column => this._columns[column]);
306
- }
307
- loadConfigs() {
308
- this.configurations = this.localTableService.getConfigs();
309
- }
310
- generateNewConfig(configName) {
311
- return {
312
- configId: Date.now().toString(),
313
- configName: configName,
314
- columnsDisabled: this.columnsArray
315
- .filter(column => !column.visible)
316
- .map(column => column.translateColumnName),
317
- pageSize: this.paginator.pageSize,
318
- sortFieldName: this.sort.direction && this.sort.active ? this.sort.active : null,
319
- sortDirection: this.sort.direction || null,
320
- };
321
- }
322
- setTableConfig(pageSize, disabledColumns, sortFieldName, sortDirection) {
323
- this.paginator.pageSize = pageSize;
324
- this.sort.sort({
325
- id: sortFieldName || '',
326
- start: sortDirection || 'asc',
327
- disableClear: false,
328
- });
329
- this.columnsArray.forEach(column => {
330
- column.visible =
331
- disabledColumns.indexOf(column.translateColumnName) === -1;
332
- });
333
- this.setDisplayedColumns();
334
- }
335
- }
336
- LocalTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: LocalTableComponent, deps: [{ token: LocalTableService }, { token: i0.ChangeDetectorRef }, { token: i2$1.Router }, { token: i2$1.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component });
337
- LocalTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", 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\">\n <div class=\"row align-items-center\">\n <div\n class=\"col row align-items-center\"\n style=\"padding: 0\"\n *ngIf=\"configurationsSettings || allowPickColumns\"\n >\n <div class=\"col-auto\" style=\"padding: 0\" *ngIf=\"allowPickColumns\">\n <button\n mat-icon-button\n class=\"col-auto\"\n [matMenuTriggerFor]=\"columnsMenu\"\n >\n <span class=\"material-icons-outlined\"> view_week </span>\n </button>\n <mat-menu #columnsMenu=\"matMenu\" xPosition=\"after\">\n <ng-container *ngFor=\"let column of columnsArray\">\n <div mat-menu-item *ngIf=\"!column.notShowInColumnPick\">\n <mat-checkbox\n [(ngModel)]=\"column.visible\"\n (ngModelChange)=\"columnVisibleChanged(column)\"\n style=\"margin-top: 5px\"\n (click)=\"$event.stopPropagation()\"\n >\n {{ column.translateColumnName }}\n </mat-checkbox>\n </div>\n </ng-container>\n </mat-menu>\n </div>\n\n <st-configurations\n *ngIf=\"configurationsSettings\"\n [configurationsSettings]=\"configurationsSettings\"\n [configurations]=\"configurations\"\n [initSelectedConfig]=\"initConfig\"\n (createNewConfig)=\"newConfigCreated($event)\"\n (removeConfig)=\"configRemoved($event)\"\n (changeConfig)=\"configChanged($event)\"\n ></st-configurations>\n </div>\n\n <div class=\"col\" style=\"padding: 0\" *ngIf=\"globalSearchSettings?.show\">\n <mat-form-field class=\"col\">\n <mat-label>{{ globalSearchSettings?.label || 'Search' }}</mat-label>\n <input matInput (keyup)=\"applySearch()\" [(ngModel)]=\"searchModel\" />\n <button\n matSuffix\n mat-icon-button\n aria-label=\"Clear\"\n (click)=\"clearSearch()\"\n >\n <mat-icon style=\"font-size: 22px\">close</mat-icon>\n </button>\n </mat-form-field>\n </div>\n </div>\n\n <table\n [ngClass]=\"{ 'no-hover': !tableSettings?.rowClickAction }\"\n mat-table\n [dataSource]=\"tableSource\"\n matSort\n >\n <ng-container\n [matColumnDef]=\"column\"\n *ngFor=\"let column of displayedColumns\"\n >\n <th\n mat-header-cell\n *matHeaderCellDef\n style=\"{{\n columns[column].width ? 'width:' + columns[column].width : ''\n }}\"\n mat-sort-header\n [disabled]=\"!columns[column].sort\"\n >\n {{ columns[column].translateColumnName }}\n <span\n class=\"material-icons search-icon\"\n [matMenuTriggerFor]=\"menu\"\n (click)=\"$event.stopPropagation()\"\n *ngIf=\"columns[column].search\"\n >\n search\n </span>\n <mat-menu #menu=\"matMenu\" xPosition=\"before\">\n <mat-form-field class=\"col\">\n <mat-label>{{ columns[column].searchLabel || 'Search' }}</mat-label>\n <input\n matInput\n (keyup)=\"applySearch()\"\n [(ngModel)]=\"searchModel\"\n (click)=\"$event.stopPropagation()\"\n />\n <button\n matSuffix\n mat-icon-button\n aria-label=\"Clear\"\n (click)=\"searchModel = ''\"\n >\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n </mat-menu>\n </th>\n <td\n mat-cell\n *matCellDef=\"let element\"\n style=\"{{\n columns[column].width ? 'width:' + columns[column].width : ''\n }}\"\n >\n <div\n class=\"actions-container\"\n [ngClass]=\"{ 'justify-content-end': columns[column].flexRight }\"\n *ngIf=\"columns[column].actions && columns[column].actions!.length > 0\"\n >\n <ng-container *ngFor=\"let action of columns[column].actions\">\n <ng-container *ngIf=\"checkIfActionVisible(element, action)\">\n <button\n class=\"col-auto\"\n mat-icon-button\n type=\"button\"\n *ngIf=\"!action.url && action.action\"\n matTooltip=\"{{ action.tooltipName || '' }}\"\n [matTooltipDisabled]=\"!!!action.tooltipName\"\n (click)=\"action.action(element)\"\n >\n <span class=\"material-icons\">{{ action.iconName }}</span>\n </button>\n\n <a *ngIf=\"action.url\" [routerLink]=\"action.url\">\n <button\n class=\"col-auto\"\n mat-icon-button\n type=\"button\"\n matTooltip=\"{{ action.tooltipName || '' }}\"\n [matTooltipDisabled]=\"!!!action.tooltipName\"\n >\n <span class=\"material-icons\">{{ action.iconName }}</span>\n </button>\n </a>\n </ng-container>\n </ng-container>\n </div>\n\n <ng-container *ngIf=\"!columns[column].actions\">\n <ng-container *ngIf=\"columns[column].translateValue\">\n <p style=\"margin: 0; padding: 0\">\n {{ columns[column].translateValue![element[column]] || '' }}\n </p>\n </ng-container>\n\n <ng-container *ngIf=\"!columns[column].translateValue\">\n <ng-container\n *ngIf=\"!columns[column].type || columns[column].type === 'string'\"\n >\n <p style=\"margin: 0; padding: 0\">{{ element[column] }}</p>\n </ng-container>\n\n <ng-container *ngIf=\"columns[column].type === 'date'\">\n <p style=\"margin: 0; padding: 0\">\n {{ element[column] | stDateTimeFormatPipe }}\n </p>\n </ng-container>\n </ng-container>\n </ng-container>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr\n mat-row\n *matRowDef=\"let row; columns: displayedColumns\"\n (click)=\"\n tableSettings?.rowClickAction ? tableSettings.rowClickAction(row) : null\n \"\n ></tr>\n </table>\n <mat-paginator\n [pageIndex]=\"pageIndex\"\n [pageSizeOptions]=\"[5, 10, 15, 20, 25]\"\n (page)=\"pageChanged($event)\"\n [showFirstLastButtons]=\"true\"\n ></mat-paginator>\n</div>\n", styles: ["", ".search-form button{height:40px}.search-form mat-form-field:first-child{padding-left:0}.search-form mat-form-field:last-child{padding-right:0}.search-form .clear{padding:0}.search-form .clear i{height:20px;width:20px;font-size:20px;cursor:pointer}table{width:100%;box-shadow:none}table th.mat-header-cell:first-of-type,table td.mat-cell:first-of-type,table td.mat-footer-cell:first-of-type{padding-left:12px}table th.mat-header-cell:last-of-type,table td.mat-cell:last-of-type,table td.mat-footer-cell:last-of-type{padding-right:12px}table::ng-deep thead tr{background-color:#fff9c4}table::ng-deep thead tr th{border-color:#fdd835}table::ng-deep tbody>tr{cursor:pointer}table::ng-deep tbody>tr.active{background-color:#a5d6a7}table::ng-deep tbody>tr:hover{background-color:#a5d6a7}table::ng-deep tbody>tr.disabled{cursor:not-allowed}table::ng-deep tbody>tr.disabled:hover{background-color:inherit}table::ng-deep tbody>tr.detail-row{height:0;cursor:default}table::ng-deep tbody>tr.detail-row:hover{background-color:transparent}table::ng-deep tbody>tr.detail-row .element-detail{overflow:hidden;display:flex}table::ng-deep tbody>tr.detail-row .element-detail p{padding:20px 0;margin-bottom:0;white-space:pre-wrap}table::ng-deep tbody>tr td i.active-row{color:#1b5e20;font-weight:700;font-size:25px;height:25px;width:25px;margin-top:2px}table::ng-deep tbody>tr td>div{max-height:200px;overflow:hidden;overflow-y:auto}table::ng-deep tbody>tr td a button{color:#000}table::ng-deep tbody>tr td a i{color:#333}table::ng-deep .mat-column-active{width:48px}table.no-hover::ng-deep tbody tr{cursor:default}table.no-hover::ng-deep tbody tr.active{background-color:transparent}table.no-hover::ng-deep tbody tr:hover{background-color:transparent}table.admin-table::ng-deep .actions-cell{width:100px}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i6$1.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i6$1.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i6$1.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i6$1.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { kind: "directive", type: i6$1.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i6$1.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i6$1.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i6$1.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i6$1.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i6$1.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i7$1.MatPaginator, selector: "mat-paginator", inputs: ["disabled"], exportAs: ["matPaginator"] }, { kind: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8.MatLabel, selector: "mat-label" }, { kind: "directive", type: i8.MatSuffix, selector: "[matSuffix]" }, { kind: "directive", type: i4.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]", exportAs: ["matTooltip"] }, { kind: "directive", type: i5.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: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2$1.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i12.MatSort, selector: "[matSort]", inputs: ["matSortDisabled", "matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i12.MatSortHeader, selector: "[mat-sort-header]", inputs: ["disabled", "mat-sort-header", "arrowPosition", "start", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: i13.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { kind: "component", type: i13.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i13.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { kind: "component", type: i14.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], 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 });
338
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: LocalTableComponent, decorators: [{
339
- type: Component,
340
- args: [{ selector: 'ngx-st-local-table', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"local-table\">\n <div class=\"row align-items-center\">\n <div\n class=\"col row align-items-center\"\n style=\"padding: 0\"\n *ngIf=\"configurationsSettings || allowPickColumns\"\n >\n <div class=\"col-auto\" style=\"padding: 0\" *ngIf=\"allowPickColumns\">\n <button\n mat-icon-button\n class=\"col-auto\"\n [matMenuTriggerFor]=\"columnsMenu\"\n >\n <span class=\"material-icons-outlined\"> view_week </span>\n </button>\n <mat-menu #columnsMenu=\"matMenu\" xPosition=\"after\">\n <ng-container *ngFor=\"let column of columnsArray\">\n <div mat-menu-item *ngIf=\"!column.notShowInColumnPick\">\n <mat-checkbox\n [(ngModel)]=\"column.visible\"\n (ngModelChange)=\"columnVisibleChanged(column)\"\n style=\"margin-top: 5px\"\n (click)=\"$event.stopPropagation()\"\n >\n {{ column.translateColumnName }}\n </mat-checkbox>\n </div>\n </ng-container>\n </mat-menu>\n </div>\n\n <st-configurations\n *ngIf=\"configurationsSettings\"\n [configurationsSettings]=\"configurationsSettings\"\n [configurations]=\"configurations\"\n [initSelectedConfig]=\"initConfig\"\n (createNewConfig)=\"newConfigCreated($event)\"\n (removeConfig)=\"configRemoved($event)\"\n (changeConfig)=\"configChanged($event)\"\n ></st-configurations>\n </div>\n\n <div class=\"col\" style=\"padding: 0\" *ngIf=\"globalSearchSettings?.show\">\n <mat-form-field class=\"col\">\n <mat-label>{{ globalSearchSettings?.label || 'Search' }}</mat-label>\n <input matInput (keyup)=\"applySearch()\" [(ngModel)]=\"searchModel\" />\n <button\n matSuffix\n mat-icon-button\n aria-label=\"Clear\"\n (click)=\"clearSearch()\"\n >\n <mat-icon style=\"font-size: 22px\">close</mat-icon>\n </button>\n </mat-form-field>\n </div>\n </div>\n\n <table\n [ngClass]=\"{ 'no-hover': !tableSettings?.rowClickAction }\"\n mat-table\n [dataSource]=\"tableSource\"\n matSort\n >\n <ng-container\n [matColumnDef]=\"column\"\n *ngFor=\"let column of displayedColumns\"\n >\n <th\n mat-header-cell\n *matHeaderCellDef\n style=\"{{\n columns[column].width ? 'width:' + columns[column].width : ''\n }}\"\n mat-sort-header\n [disabled]=\"!columns[column].sort\"\n >\n {{ columns[column].translateColumnName }}\n <span\n class=\"material-icons search-icon\"\n [matMenuTriggerFor]=\"menu\"\n (click)=\"$event.stopPropagation()\"\n *ngIf=\"columns[column].search\"\n >\n search\n </span>\n <mat-menu #menu=\"matMenu\" xPosition=\"before\">\n <mat-form-field class=\"col\">\n <mat-label>{{ columns[column].searchLabel || 'Search' }}</mat-label>\n <input\n matInput\n (keyup)=\"applySearch()\"\n [(ngModel)]=\"searchModel\"\n (click)=\"$event.stopPropagation()\"\n />\n <button\n matSuffix\n mat-icon-button\n aria-label=\"Clear\"\n (click)=\"searchModel = ''\"\n >\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n </mat-menu>\n </th>\n <td\n mat-cell\n *matCellDef=\"let element\"\n style=\"{{\n columns[column].width ? 'width:' + columns[column].width : ''\n }}\"\n >\n <div\n class=\"actions-container\"\n [ngClass]=\"{ 'justify-content-end': columns[column].flexRight }\"\n *ngIf=\"columns[column].actions && columns[column].actions!.length > 0\"\n >\n <ng-container *ngFor=\"let action of columns[column].actions\">\n <ng-container *ngIf=\"checkIfActionVisible(element, action)\">\n <button\n class=\"col-auto\"\n mat-icon-button\n type=\"button\"\n *ngIf=\"!action.url && action.action\"\n matTooltip=\"{{ action.tooltipName || '' }}\"\n [matTooltipDisabled]=\"!!!action.tooltipName\"\n (click)=\"action.action(element)\"\n >\n <span class=\"material-icons\">{{ action.iconName }}</span>\n </button>\n\n <a *ngIf=\"action.url\" [routerLink]=\"action.url\">\n <button\n class=\"col-auto\"\n mat-icon-button\n type=\"button\"\n matTooltip=\"{{ action.tooltipName || '' }}\"\n [matTooltipDisabled]=\"!!!action.tooltipName\"\n >\n <span class=\"material-icons\">{{ action.iconName }}</span>\n </button>\n </a>\n </ng-container>\n </ng-container>\n </div>\n\n <ng-container *ngIf=\"!columns[column].actions\">\n <ng-container *ngIf=\"columns[column].translateValue\">\n <p style=\"margin: 0; padding: 0\">\n {{ columns[column].translateValue![element[column]] || '' }}\n </p>\n </ng-container>\n\n <ng-container *ngIf=\"!columns[column].translateValue\">\n <ng-container\n *ngIf=\"!columns[column].type || columns[column].type === 'string'\"\n >\n <p style=\"margin: 0; padding: 0\">{{ element[column] }}</p>\n </ng-container>\n\n <ng-container *ngIf=\"columns[column].type === 'date'\">\n <p style=\"margin: 0; padding: 0\">\n {{ element[column] | stDateTimeFormatPipe }}\n </p>\n </ng-container>\n </ng-container>\n </ng-container>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr\n mat-row\n *matRowDef=\"let row; columns: displayedColumns\"\n (click)=\"\n tableSettings?.rowClickAction ? tableSettings.rowClickAction(row) : null\n \"\n ></tr>\n </table>\n <mat-paginator\n [pageIndex]=\"pageIndex\"\n [pageSizeOptions]=\"[5, 10, 15, 20, 25]\"\n (page)=\"pageChanged($event)\"\n [showFirstLastButtons]=\"true\"\n ></mat-paginator>\n</div>\n", styles: [".search-form button{height:40px}.search-form mat-form-field:first-child{padding-left:0}.search-form mat-form-field:last-child{padding-right:0}.search-form .clear{padding:0}.search-form .clear i{height:20px;width:20px;font-size:20px;cursor:pointer}table{width:100%;box-shadow:none}table th.mat-header-cell:first-of-type,table td.mat-cell:first-of-type,table td.mat-footer-cell:first-of-type{padding-left:12px}table th.mat-header-cell:last-of-type,table td.mat-cell:last-of-type,table td.mat-footer-cell:last-of-type{padding-right:12px}table::ng-deep thead tr{background-color:#fff9c4}table::ng-deep thead tr th{border-color:#fdd835}table::ng-deep tbody>tr{cursor:pointer}table::ng-deep tbody>tr.active{background-color:#a5d6a7}table::ng-deep tbody>tr:hover{background-color:#a5d6a7}table::ng-deep tbody>tr.disabled{cursor:not-allowed}table::ng-deep tbody>tr.disabled:hover{background-color:inherit}table::ng-deep tbody>tr.detail-row{height:0;cursor:default}table::ng-deep tbody>tr.detail-row:hover{background-color:transparent}table::ng-deep tbody>tr.detail-row .element-detail{overflow:hidden;display:flex}table::ng-deep tbody>tr.detail-row .element-detail p{padding:20px 0;margin-bottom:0;white-space:pre-wrap}table::ng-deep tbody>tr td i.active-row{color:#1b5e20;font-weight:700;font-size:25px;height:25px;width:25px;margin-top:2px}table::ng-deep tbody>tr td>div{max-height:200px;overflow:hidden;overflow-y:auto}table::ng-deep tbody>tr td a button{color:#000}table::ng-deep tbody>tr td a i{color:#333}table::ng-deep .mat-column-active{width:48px}table.no-hover::ng-deep tbody tr{cursor:default}table.no-hover::ng-deep tbody tr.active{background-color:transparent}table.no-hover::ng-deep tbody tr:hover{background-color:transparent}table.admin-table::ng-deep .actions-cell{width:100px}\n"] }]
341
- }], ctorParameters: function () { return [{ type: LocalTableService }, { type: i0.ChangeDetectorRef }, { type: i2$1.Router }, { type: i2$1.ActivatedRoute }]; }, propDecorators: { paginator: [{
342
- type: ViewChild,
343
- args: [MatPaginator]
344
- }], sort: [{
345
- type: ViewChild,
346
- args: [MatSort]
347
- }], tableSettings: [{
348
- type: Input
349
- }], globalSearchSettings: [{
350
- type: Input
351
- }], pageSize: [{
352
- type: Input
353
- }], allowPickColumns: [{
354
- type: Input
355
- }], configurationsSettings: [{
356
- type: Input
357
- }], localStorageName: [{
358
- type: Input
359
- }], bindSearchToUrl: [{
360
- type: Input
361
- }], columns: [{
362
- type: Input
363
- }], data: [{
364
- type: Input
129
+ class LocalTableComponent {
130
+ constructor(localTableService, changeDetectorRef, router, activatedRoute) {
131
+ this.localTableService = localTableService;
132
+ this.changeDetectorRef = changeDetectorRef;
133
+ this.router = router;
134
+ this.activatedRoute = activatedRoute;
135
+ this.pageSize = 10;
136
+ this.allowPickColumns = false;
137
+ this.localStorageName = '';
138
+ this.bindSearchToUrl = false;
139
+ this._columns = {};
140
+ this._data = [];
141
+ this.searchModel = '';
142
+ this.displayedColumns = [];
143
+ this.configurations = [];
144
+ this.initConfig = null;
145
+ this.activeConfig = null;
146
+ this.pageIndex = 0;
147
+ }
148
+ set columns(columns) {
149
+ this._columns = columns;
150
+ this.columnsArray = this.getColumnsArray();
151
+ this.setDisplayedColumns();
152
+ }
153
+ get columns() {
154
+ return this._columns;
155
+ }
156
+ set data(data) {
157
+ this._data = data || [];
158
+ this.setTableSource();
159
+ }
160
+ get data() {
161
+ return this._data;
162
+ }
163
+ ngOnInit() {
164
+ if (this.localStorageName) {
165
+ const pageSize = localStorage.getItem(this.localStorageName);
166
+ if (pageSize) {
167
+ this.pageSize = parseInt(pageSize);
168
+ }
169
+ }
170
+ if (this.configurationsSettings) {
171
+ this.localTableService.localStorageName =
172
+ this.configurationsSettings?.localStorageName || '';
173
+ this.loadConfigs();
174
+ }
175
+ }
176
+ ngAfterViewInit() {
177
+ if (this.configurationsSettings) {
178
+ this.paginator.page.subscribe(res => {
179
+ if (this.activeConfig) {
180
+ this.activeConfig.pageSize = res.pageSize;
181
+ this.updateConfigsToLocalStorage();
182
+ }
183
+ });
184
+ this.sort.sortChange.subscribe(res => {
185
+ if (this.activeConfig) {
186
+ this.activeConfig.sortFieldName = res.active;
187
+ this.activeConfig.sortDirection = res.direction;
188
+ this.updateConfigsToLocalStorage();
189
+ }
190
+ });
191
+ }
192
+ if (this.bindSearchToUrl) {
193
+ const params = new URLSearchParams(location.search);
194
+ this.sort.sortChange.subscribe(res => {
195
+ this.updateSearchToUrl();
196
+ });
197
+ if (params.get('stLocalTablePageIndex')) {
198
+ this.pageIndex = parseInt(params.get('stLocalTablePageIndex') || '');
199
+ }
200
+ if (params.get('stLocalTablePageSize')) {
201
+ this.pageSize = parseInt(params.get('stLocalTablePageSize') || '');
202
+ }
203
+ if (params.get('stLocalTableSortFieldName') &&
204
+ params.get('stLocalTableSortDirection')) {
205
+ this.sort.sort({
206
+ id: params.get('stLocalTableSortFieldName') || '',
207
+ start: params.get('stLocalTableSortDirection') || 'asc',
208
+ disableClear: false,
209
+ });
210
+ }
211
+ this.searchModel = params.get('stLocalTableSearch') || '';
212
+ if (this.searchModel) {
213
+ this.tableSource.filter = this.searchModel.trim().toLowerCase();
214
+ }
215
+ }
216
+ this.paginator.pageSize = this.pageSize;
217
+ }
218
+ applySearch() {
219
+ this.tableSource.filter = this.searchModel.trim().toLowerCase();
220
+ this.pageIndex = 0;
221
+ this.updateSearchToUrl();
222
+ }
223
+ clearSearch() {
224
+ this.searchModel = '';
225
+ this.tableSource.filter = this.searchModel;
226
+ this.pageIndex = 0;
227
+ this.updateSearchToUrl();
228
+ }
229
+ checkIfActionVisible(row, action) {
230
+ if (action.show) {
231
+ return action.show(row);
232
+ }
233
+ else {
234
+ return true;
235
+ }
236
+ }
237
+ columnVisibleChanged(column) {
238
+ this.setDisplayedColumns();
239
+ this.updateConfigsToLocalStorage();
240
+ }
241
+ newConfigCreated(name) {
242
+ const newConfig = this.generateNewConfig(name);
243
+ this.configurations.push(newConfig);
244
+ this.updateConfigsToLocalStorage();
245
+ this.initConfig = newConfig;
246
+ }
247
+ configRemoved(configId) {
248
+ this.configurations = this.configurations.filter(config => config.configId !== configId);
249
+ this.updateConfigsToLocalStorage();
250
+ }
251
+ configChanged(configId) {
252
+ this.activeConfig = configId
253
+ ? this.configurations.find(config => config.configId === configId)
254
+ : null;
255
+ if (this.activeConfig) {
256
+ this.setTableConfig(this.activeConfig.pageSize, this.activeConfig.columnsDisabled, this.activeConfig.sortFieldName, this.activeConfig.sortDirection);
257
+ }
258
+ else {
259
+ this.setTableConfig(this.pageSize, [], null, null);
260
+ this.clearSearch();
261
+ }
262
+ }
263
+ pageChanged(event) {
264
+ this.pageIndex = event.pageIndex;
265
+ this.updateSearchToUrl();
266
+ }
267
+ updateSearchToUrl() {
268
+ if (this.bindSearchToUrl) {
269
+ let queryParams = {
270
+ stLocalTableSearch: this.searchModel,
271
+ stLocalTablePageIndex: this.pageIndex,
272
+ stLocalTablePageSize: this.paginator.pageSize,
273
+ stLocalTableSortFieldName: '',
274
+ stLocalTableSortDirection: '',
275
+ };
276
+ if (this.sort.direction && this.sort.active) {
277
+ queryParams = {
278
+ ...queryParams,
279
+ stLocalTableSortFieldName: this.sort.active,
280
+ stLocalTableSortDirection: this.sort.direction,
281
+ };
282
+ }
283
+ this.router.navigate(['./'], {
284
+ queryParams: queryParams,
285
+ relativeTo: this.activatedRoute,
286
+ });
287
+ }
288
+ }
289
+ updateConfigsToLocalStorage() {
290
+ this.localTableService.saveConfigs(this.configurations);
291
+ }
292
+ setTableSource() {
293
+ this.tableSource = new MatTableDataSource(this._data);
294
+ this.tableSource.paginator = this.paginator;
295
+ this.tableSource.sort = this.sort;
296
+ this.tableSource.filter = this.searchModel;
297
+ this.changeDetectorRef.markForCheck();
298
+ }
299
+ setDisplayedColumns() {
300
+ this.displayedColumns = Object.keys(this.columns).filter(column => {
301
+ return this._columns[column].visible;
302
+ });
303
+ }
304
+ getColumnsArray() {
305
+ return Object.keys(this._columns).map(column => this._columns[column]);
306
+ }
307
+ loadConfigs() {
308
+ this.configurations = this.localTableService.getConfigs();
309
+ }
310
+ generateNewConfig(configName) {
311
+ return {
312
+ configId: Date.now().toString(),
313
+ configName: configName,
314
+ columnsDisabled: this.columnsArray
315
+ .filter(column => !column.visible)
316
+ .map(column => column.translateColumnName),
317
+ pageSize: this.paginator.pageSize,
318
+ sortFieldName: this.sort.direction && this.sort.active ? this.sort.active : null,
319
+ sortDirection: this.sort.direction || null,
320
+ };
321
+ }
322
+ setTableConfig(pageSize, disabledColumns, sortFieldName, sortDirection) {
323
+ this.paginator.pageSize = pageSize;
324
+ this.sort.sort({
325
+ id: sortFieldName || '',
326
+ start: sortDirection || 'asc',
327
+ disableClear: false,
328
+ });
329
+ this.columnsArray.forEach(column => {
330
+ column.visible =
331
+ disabledColumns.indexOf(column.translateColumnName) === -1;
332
+ });
333
+ this.setDisplayedColumns();
334
+ }
335
+ }
336
+ LocalTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: LocalTableComponent, deps: [{ token: LocalTableService }, { token: i0.ChangeDetectorRef }, { token: i2$1.Router }, { token: i2$1.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component });
337
+ LocalTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", 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 <div\r\n class=\"col row align-items-center\"\r\n style=\"padding: 0\"\r\n *ngIf=\"configurationsSettings || allowPickColumns\"\r\n >\r\n <div class=\"col-auto\" style=\"padding: 0\" *ngIf=\"allowPickColumns\">\r\n <button\r\n mat-icon-button\r\n class=\"col-auto\"\r\n [matMenuTriggerFor]=\"columnsMenu\"\r\n >\r\n <span class=\"material-icons-outlined\"> view_week </span>\r\n </button>\r\n <mat-menu #columnsMenu=\"matMenu\" xPosition=\"after\">\r\n <ng-container *ngFor=\"let column of columnsArray\">\r\n <div mat-menu-item *ngIf=\"!column.notShowInColumnPick\">\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 </ng-container>\r\n </mat-menu>\r\n </div>\r\n\r\n <st-configurations\r\n *ngIf=\"configurationsSettings\"\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 </div>\r\n\r\n <div class=\"col\" style=\"padding: 0\" *ngIf=\"globalSearchSettings?.show\">\r\n <mat-form-field class=\"col\">\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 </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 <ng-container\r\n [matColumnDef]=\"column\"\r\n *ngFor=\"let column of displayedColumns\"\r\n >\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 <span\r\n class=\"material-icons search-icon\"\r\n [matMenuTriggerFor]=\"menu\"\r\n (click)=\"$event.stopPropagation()\"\r\n *ngIf=\"columns[column].search\"\r\n >\r\n search\r\n </span>\r\n <mat-menu #menu=\"matMenu\" xPosition=\"before\">\r\n <mat-form-field class=\"col\">\r\n <mat-label>{{ columns[column].searchLabel || 'Search' }}</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 <div\r\n class=\"actions-container\"\r\n [ngClass]=\"{ 'justify-content-end': columns[column].flexRight }\"\r\n *ngIf=\"columns[column].actions && columns[column].actions!.length > 0\"\r\n >\r\n <ng-container *ngFor=\"let action of columns[column].actions\">\r\n <ng-container *ngIf=\"checkIfActionVisible(element, action)\">\r\n <button\r\n class=\"col-auto\"\r\n mat-icon-button\r\n type=\"button\"\r\n *ngIf=\"!action.url && action.action\"\r\n matTooltip=\"{{ action.tooltipName || '' }}\"\r\n [matTooltipDisabled]=\"!!!action.tooltipName\"\r\n (click)=\"action.action(element)\"\r\n >\r\n <span class=\"material-icons\">{{ action.iconName }}</span>\r\n </button>\r\n\r\n <a *ngIf=\"action.url\" [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 <span class=\"material-icons\">{{ action.iconName }}</span>\r\n </button>\r\n </a>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n\r\n <ng-container *ngIf=\"!columns[column].actions\">\r\n <ng-container *ngIf=\"columns[column].translateValue\">\r\n <p style=\"margin: 0; padding: 0\">\r\n {{ columns[column].translateValue![element[column]] || '' }}\r\n </p>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"!columns[column].translateValue\">\r\n <ng-container\r\n *ngIf=\"!columns[column].type || columns[column].type === 'string'\"\r\n >\r\n <p style=\"margin: 0; padding: 0\">{{ element[column] }}</p>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"columns[column].type === 'date'\">\r\n <p style=\"margin: 0; padding: 0\">\r\n {{ element[column] | stDateTimeFormatPipe }}\r\n </p>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </td>\r\n </ng-container>\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: ["", ".search-form button{height:40px}.search-form mat-form-field:first-child{padding-left:0}.search-form mat-form-field:last-child{padding-right:0}.search-form .clear{padding:0}.search-form .clear i{height:20px;width:20px;font-size:20px;cursor:pointer}table{width:100%;box-shadow:none}table th.mat-header-cell:first-of-type,table td.mat-cell:first-of-type,table td.mat-footer-cell:first-of-type{padding-left:12px}table th.mat-header-cell:last-of-type,table td.mat-cell:last-of-type,table td.mat-footer-cell:last-of-type{padding-right:12px}table::ng-deep thead tr{background-color:#fff9c4}table::ng-deep thead tr th{border-color:#fdd835}table::ng-deep tbody>tr{cursor:pointer}table::ng-deep tbody>tr.active{background-color:#a5d6a7}table::ng-deep tbody>tr:hover{background-color:#a5d6a7}table::ng-deep tbody>tr.disabled{cursor:not-allowed}table::ng-deep tbody>tr.disabled:hover{background-color:inherit}table::ng-deep tbody>tr.detail-row{height:0;cursor:default}table::ng-deep tbody>tr.detail-row:hover{background-color:transparent}table::ng-deep tbody>tr.detail-row .element-detail{overflow:hidden;display:flex}table::ng-deep tbody>tr.detail-row .element-detail p{padding:20px 0;margin-bottom:0;white-space:pre-wrap}table::ng-deep tbody>tr td i.active-row{color:#1b5e20;font-weight:700;font-size:25px;height:25px;width:25px;margin-top:2px}table::ng-deep tbody>tr td>div{max-height:200px;overflow:hidden;overflow-y:auto}table::ng-deep tbody>tr td a button{color:#000}table::ng-deep tbody>tr td a i{color:#333}table::ng-deep .mat-column-active{width:48px}table.no-hover::ng-deep tbody tr{cursor:default}table.no-hover::ng-deep tbody tr.active{background-color:transparent}table.no-hover::ng-deep tbody tr:hover{background-color:transparent}table.admin-table::ng-deep .actions-cell{width:100px}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i6$1.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i6$1.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i6$1.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i6$1.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { kind: "directive", type: i6$1.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i6$1.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i6$1.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i6$1.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i6$1.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i6$1.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i7$1.MatPaginator, selector: "mat-paginator", inputs: ["disabled"], exportAs: ["matPaginator"] }, { kind: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8.MatLabel, selector: "mat-label" }, { kind: "directive", type: i8.MatSuffix, selector: "[matSuffix]" }, { kind: "directive", type: i4.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]", exportAs: ["matTooltip"] }, { kind: "directive", type: i5.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: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2$1.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i12.MatSort, selector: "[matSort]", inputs: ["matSortDisabled", "matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i12.MatSortHeader, selector: "[mat-sort-header]", inputs: ["disabled", "mat-sort-header", "arrowPosition", "start", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: i13.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { kind: "component", type: i13.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i13.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { kind: "component", type: i14.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], 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 });
338
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: LocalTableComponent, decorators: [{
339
+ type: Component,
340
+ args: [{ selector: 'ngx-st-local-table', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"local-table\">\r\n <div class=\"row align-items-center\">\r\n <div\r\n class=\"col row align-items-center\"\r\n style=\"padding: 0\"\r\n *ngIf=\"configurationsSettings || allowPickColumns\"\r\n >\r\n <div class=\"col-auto\" style=\"padding: 0\" *ngIf=\"allowPickColumns\">\r\n <button\r\n mat-icon-button\r\n class=\"col-auto\"\r\n [matMenuTriggerFor]=\"columnsMenu\"\r\n >\r\n <span class=\"material-icons-outlined\"> view_week </span>\r\n </button>\r\n <mat-menu #columnsMenu=\"matMenu\" xPosition=\"after\">\r\n <ng-container *ngFor=\"let column of columnsArray\">\r\n <div mat-menu-item *ngIf=\"!column.notShowInColumnPick\">\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 </ng-container>\r\n </mat-menu>\r\n </div>\r\n\r\n <st-configurations\r\n *ngIf=\"configurationsSettings\"\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 </div>\r\n\r\n <div class=\"col\" style=\"padding: 0\" *ngIf=\"globalSearchSettings?.show\">\r\n <mat-form-field class=\"col\">\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 </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 <ng-container\r\n [matColumnDef]=\"column\"\r\n *ngFor=\"let column of displayedColumns\"\r\n >\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 <span\r\n class=\"material-icons search-icon\"\r\n [matMenuTriggerFor]=\"menu\"\r\n (click)=\"$event.stopPropagation()\"\r\n *ngIf=\"columns[column].search\"\r\n >\r\n search\r\n </span>\r\n <mat-menu #menu=\"matMenu\" xPosition=\"before\">\r\n <mat-form-field class=\"col\">\r\n <mat-label>{{ columns[column].searchLabel || 'Search' }}</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 <div\r\n class=\"actions-container\"\r\n [ngClass]=\"{ 'justify-content-end': columns[column].flexRight }\"\r\n *ngIf=\"columns[column].actions && columns[column].actions!.length > 0\"\r\n >\r\n <ng-container *ngFor=\"let action of columns[column].actions\">\r\n <ng-container *ngIf=\"checkIfActionVisible(element, action)\">\r\n <button\r\n class=\"col-auto\"\r\n mat-icon-button\r\n type=\"button\"\r\n *ngIf=\"!action.url && action.action\"\r\n matTooltip=\"{{ action.tooltipName || '' }}\"\r\n [matTooltipDisabled]=\"!!!action.tooltipName\"\r\n (click)=\"action.action(element)\"\r\n >\r\n <span class=\"material-icons\">{{ action.iconName }}</span>\r\n </button>\r\n\r\n <a *ngIf=\"action.url\" [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 <span class=\"material-icons\">{{ action.iconName }}</span>\r\n </button>\r\n </a>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n\r\n <ng-container *ngIf=\"!columns[column].actions\">\r\n <ng-container *ngIf=\"columns[column].translateValue\">\r\n <p style=\"margin: 0; padding: 0\">\r\n {{ columns[column].translateValue![element[column]] || '' }}\r\n </p>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"!columns[column].translateValue\">\r\n <ng-container\r\n *ngIf=\"!columns[column].type || columns[column].type === 'string'\"\r\n >\r\n <p style=\"margin: 0; padding: 0\">{{ element[column] }}</p>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"columns[column].type === 'date'\">\r\n <p style=\"margin: 0; padding: 0\">\r\n {{ element[column] | stDateTimeFormatPipe }}\r\n </p>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </td>\r\n </ng-container>\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: [".search-form button{height:40px}.search-form mat-form-field:first-child{padding-left:0}.search-form mat-form-field:last-child{padding-right:0}.search-form .clear{padding:0}.search-form .clear i{height:20px;width:20px;font-size:20px;cursor:pointer}table{width:100%;box-shadow:none}table th.mat-header-cell:first-of-type,table td.mat-cell:first-of-type,table td.mat-footer-cell:first-of-type{padding-left:12px}table th.mat-header-cell:last-of-type,table td.mat-cell:last-of-type,table td.mat-footer-cell:last-of-type{padding-right:12px}table::ng-deep thead tr{background-color:#fff9c4}table::ng-deep thead tr th{border-color:#fdd835}table::ng-deep tbody>tr{cursor:pointer}table::ng-deep tbody>tr.active{background-color:#a5d6a7}table::ng-deep tbody>tr:hover{background-color:#a5d6a7}table::ng-deep tbody>tr.disabled{cursor:not-allowed}table::ng-deep tbody>tr.disabled:hover{background-color:inherit}table::ng-deep tbody>tr.detail-row{height:0;cursor:default}table::ng-deep tbody>tr.detail-row:hover{background-color:transparent}table::ng-deep tbody>tr.detail-row .element-detail{overflow:hidden;display:flex}table::ng-deep tbody>tr.detail-row .element-detail p{padding:20px 0;margin-bottom:0;white-space:pre-wrap}table::ng-deep tbody>tr td i.active-row{color:#1b5e20;font-weight:700;font-size:25px;height:25px;width:25px;margin-top:2px}table::ng-deep tbody>tr td>div{max-height:200px;overflow:hidden;overflow-y:auto}table::ng-deep tbody>tr td a button{color:#000}table::ng-deep tbody>tr td a i{color:#333}table::ng-deep .mat-column-active{width:48px}table.no-hover::ng-deep tbody tr{cursor:default}table.no-hover::ng-deep tbody tr.active{background-color:transparent}table.no-hover::ng-deep tbody tr:hover{background-color:transparent}table.admin-table::ng-deep .actions-cell{width:100px}\n"] }]
341
+ }], ctorParameters: function () { return [{ type: LocalTableService }, { type: i0.ChangeDetectorRef }, { type: i2$1.Router }, { type: i2$1.ActivatedRoute }]; }, propDecorators: { paginator: [{
342
+ type: ViewChild,
343
+ args: [MatPaginator]
344
+ }], sort: [{
345
+ type: ViewChild,
346
+ args: [MatSort]
347
+ }], tableSettings: [{
348
+ type: Input
349
+ }], globalSearchSettings: [{
350
+ type: Input
351
+ }], pageSize: [{
352
+ type: Input
353
+ }], allowPickColumns: [{
354
+ type: Input
355
+ }], configurationsSettings: [{
356
+ type: Input
357
+ }], localStorageName: [{
358
+ type: Input
359
+ }], bindSearchToUrl: [{
360
+ type: Input
361
+ }], columns: [{
362
+ type: Input
363
+ }], data: [{
364
+ type: Input
365
365
  }] } });
366
366
 
367
- class SelectTableComponent {
368
- constructor() {
369
- this.required = false;
370
- this.multiple = false;
371
- this.searchLabel = 'Search';
372
- this.selectedLabel = 'Selected';
373
- this._validError = false;
374
- this.search = new UntypedFormControl('');
375
- this.rowSelected = [];
376
- }
377
- set setInitColumns(col) {
378
- this.columns = ['active', ...Object.keys(col)];
379
- this.initColumns = col;
380
- }
381
- set tableData(data) {
382
- this.tableSource = new MatTableDataSource(data);
383
- this.tableSource.paginator = this.paginator;
384
- }
385
- set validError(error) {
386
- this._validError = error;
387
- }
388
- get validError() {
389
- return this._validError;
390
- }
391
- ngOnInit() {
392
- this.search.valueChanges.subscribe(res => {
393
- this.tableSource.filter = res.trim().toLowerCase();
394
- });
395
- setTimeout(() => {
396
- if (this.initSearchVal) {
397
- this.search.setValue(this.initSearchVal);
398
- this.rowClick(this.initSelected);
399
- }
400
- }, 1000);
401
- }
402
- clearSearch() {
403
- this.search.setValue('');
404
- }
405
- rowClick(row) {
406
- const found = this.rowSelected.find(tmpRow => tmpRow === row);
407
- if (found) {
408
- this.rowSelected = this.rowSelected.filter(tmpRow => tmpRow !== row);
409
- }
410
- else {
411
- if (this.multiple) {
412
- this.rowSelected.push(row);
413
- }
414
- else {
415
- this.rowSelected = [row];
416
- }
417
- }
418
- this.returnRowSelected.emit(this.rowSelected);
419
- }
420
- checkActiveRow(row) {
421
- return !!this.rowSelected.find(activeRow => activeRow === row);
422
- }
423
- }
424
- SelectTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SelectTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
425
- SelectTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", 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\">\n <p class=\"title\" [ngClass]=\"{ 'error-text': validError }\">\n {{ title }} {{ required ? '*' : '' }}\n </p>\n\n <div class=\"search-form row align-items-center\">\n <div class=\"col-sm-12 col-md row align-items-center\">\n <mat-form-field class=\"col\">\n <input\n matInput\n placeholder=\"{{ searchLabel }}\"\n [formControl]=\"search\"\n />\n </mat-form-field>\n <div class=\"clear col-auto\">\n <i class=\"material-icons\" (click)=\"clearSearch()\">clear</i>\n </div>\n </div>\n </div>\n\n <table mat-table [dataSource]=\"tableSource\">\n <ng-container *ngFor=\"let col of columns\" [matColumnDef]=\"col\">\n <th mat-header-cell *matHeaderCellDef>\n {{ col === 'active' ? selectedLabel : initColumns[col] }}\n </th>\n <td mat-cell *matCellDef=\"let element\">\n <ng-container *ngIf=\"col === 'active'\">\n <i *ngIf=\"checkActiveRow(element)\" class=\"material-icons active-row\"\n >done</i\n >\n </ng-container>\n\n <ng-container *ngIf=\"col !== 'active'\">\n {{ element[col] }}\n </ng-container>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"columns\"></tr>\n <tr\n mat-row\n *matRowDef=\"let row; columns: columns\"\n (click)=\"rowClick(row)\"\n [ngClass]=\"{ active: checkActiveRow(row) }\"\n ></tr>\n </table>\n <mat-paginator [pageSizeOptions]=\"[5]\"></mat-paginator>\n</div>\n", styles: [".title{margin-bottom:0;margin-top:1rem;font-weight:500}.title.error-text{color:#ef5350}\n", ".search-form button{height:40px}.search-form mat-form-field:first-child{padding-left:0}.search-form mat-form-field:last-child{padding-right:0}.search-form .clear{padding:0}.search-form .clear i{height:20px;width:20px;font-size:20px;cursor:pointer}table{width:100%;box-shadow:none}table th.mat-header-cell:first-of-type,table td.mat-cell:first-of-type,table td.mat-footer-cell:first-of-type{padding-left:12px}table th.mat-header-cell:last-of-type,table td.mat-cell:last-of-type,table td.mat-footer-cell:last-of-type{padding-right:12px}table::ng-deep thead tr{background-color:#fff9c4}table::ng-deep thead tr th{border-color:#fdd835}table::ng-deep tbody>tr{cursor:pointer}table::ng-deep tbody>tr.active{background-color:#a5d6a7}table::ng-deep tbody>tr:hover{background-color:#a5d6a7}table::ng-deep tbody>tr.disabled{cursor:not-allowed}table::ng-deep tbody>tr.disabled:hover{background-color:inherit}table::ng-deep tbody>tr.detail-row{height:0;cursor:default}table::ng-deep tbody>tr.detail-row:hover{background-color:transparent}table::ng-deep tbody>tr.detail-row .element-detail{overflow:hidden;display:flex}table::ng-deep tbody>tr.detail-row .element-detail p{padding:20px 0;margin-bottom:0;white-space:pre-wrap}table::ng-deep tbody>tr td i.active-row{color:#1b5e20;font-weight:700;font-size:25px;height:25px;width:25px;margin-top:2px}table::ng-deep tbody>tr td>div{max-height:200px;overflow:hidden;overflow-y:auto}table::ng-deep tbody>tr td a button{color:#000}table::ng-deep tbody>tr td a i{color:#333}table::ng-deep .mat-column-active{width:48px}table.no-hover::ng-deep tbody tr{cursor:default}table.no-hover::ng-deep tbody tr.active{background-color:transparent}table.no-hover::ng-deep tbody tr:hover{background-color:transparent}table.admin-table::ng-deep .actions-cell{width:100px}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6$1.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i6$1.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i6$1.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i6$1.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { kind: "directive", type: i6$1.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i6$1.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i6$1.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i6$1.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i6$1.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i6$1.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i7$1.MatPaginator, selector: "mat-paginator", inputs: ["disabled"], exportAs: ["matPaginator"] }, { kind: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.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: i5.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: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
426
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SelectTableComponent, decorators: [{
427
- type: Component,
428
- args: [{ selector: 'ngx-st-select-table', template: "<div class=\"shared-table-selector\">\n <p class=\"title\" [ngClass]=\"{ 'error-text': validError }\">\n {{ title }} {{ required ? '*' : '' }}\n </p>\n\n <div class=\"search-form row align-items-center\">\n <div class=\"col-sm-12 col-md row align-items-center\">\n <mat-form-field class=\"col\">\n <input\n matInput\n placeholder=\"{{ searchLabel }}\"\n [formControl]=\"search\"\n />\n </mat-form-field>\n <div class=\"clear col-auto\">\n <i class=\"material-icons\" (click)=\"clearSearch()\">clear</i>\n </div>\n </div>\n </div>\n\n <table mat-table [dataSource]=\"tableSource\">\n <ng-container *ngFor=\"let col of columns\" [matColumnDef]=\"col\">\n <th mat-header-cell *matHeaderCellDef>\n {{ col === 'active' ? selectedLabel : initColumns[col] }}\n </th>\n <td mat-cell *matCellDef=\"let element\">\n <ng-container *ngIf=\"col === 'active'\">\n <i *ngIf=\"checkActiveRow(element)\" class=\"material-icons active-row\"\n >done</i\n >\n </ng-container>\n\n <ng-container *ngIf=\"col !== 'active'\">\n {{ element[col] }}\n </ng-container>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"columns\"></tr>\n <tr\n mat-row\n *matRowDef=\"let row; columns: columns\"\n (click)=\"rowClick(row)\"\n [ngClass]=\"{ active: checkActiveRow(row) }\"\n ></tr>\n </table>\n <mat-paginator [pageSizeOptions]=\"[5]\"></mat-paginator>\n</div>\n", styles: [".title{margin-bottom:0;margin-top:1rem;font-weight:500}.title.error-text{color:#ef5350}\n", ".search-form button{height:40px}.search-form mat-form-field:first-child{padding-left:0}.search-form mat-form-field:last-child{padding-right:0}.search-form .clear{padding:0}.search-form .clear i{height:20px;width:20px;font-size:20px;cursor:pointer}table{width:100%;box-shadow:none}table th.mat-header-cell:first-of-type,table td.mat-cell:first-of-type,table td.mat-footer-cell:first-of-type{padding-left:12px}table th.mat-header-cell:last-of-type,table td.mat-cell:last-of-type,table td.mat-footer-cell:last-of-type{padding-right:12px}table::ng-deep thead tr{background-color:#fff9c4}table::ng-deep thead tr th{border-color:#fdd835}table::ng-deep tbody>tr{cursor:pointer}table::ng-deep tbody>tr.active{background-color:#a5d6a7}table::ng-deep tbody>tr:hover{background-color:#a5d6a7}table::ng-deep tbody>tr.disabled{cursor:not-allowed}table::ng-deep tbody>tr.disabled:hover{background-color:inherit}table::ng-deep tbody>tr.detail-row{height:0;cursor:default}table::ng-deep tbody>tr.detail-row:hover{background-color:transparent}table::ng-deep tbody>tr.detail-row .element-detail{overflow:hidden;display:flex}table::ng-deep tbody>tr.detail-row .element-detail p{padding:20px 0;margin-bottom:0;white-space:pre-wrap}table::ng-deep tbody>tr td i.active-row{color:#1b5e20;font-weight:700;font-size:25px;height:25px;width:25px;margin-top:2px}table::ng-deep tbody>tr td>div{max-height:200px;overflow:hidden;overflow-y:auto}table::ng-deep tbody>tr td a button{color:#000}table::ng-deep tbody>tr td a i{color:#333}table::ng-deep .mat-column-active{width:48px}table.no-hover::ng-deep tbody tr{cursor:default}table.no-hover::ng-deep tbody tr.active{background-color:transparent}table.no-hover::ng-deep tbody tr:hover{background-color:transparent}table.admin-table::ng-deep .actions-cell{width:100px}\n"] }]
429
- }], ctorParameters: function () { return []; }, propDecorators: { paginator: [{
430
- type: ViewChild,
431
- args: [MatPaginator]
432
- }], title: [{
433
- type: Input
434
- }], required: [{
435
- type: Input
436
- }], multiple: [{
437
- type: Input
438
- }], initSelected: [{
439
- type: Input
440
- }], initSearchVal: [{
441
- type: Input
442
- }], searchLabel: [{
443
- type: Input
444
- }], selectedLabel: [{
445
- type: Input
446
- }], setInitColumns: [{
447
- type: Input
448
- }], tableData: [{
449
- type: Input
450
- }], validError: [{
451
- type: Input
452
- }], returnRowSelected: [{
453
- type: Output
367
+ class SelectTableComponent {
368
+ constructor() {
369
+ this.required = false;
370
+ this.multiple = false;
371
+ this.searchLabel = 'Search';
372
+ this.selectedLabel = 'Selected';
373
+ this._validError = false;
374
+ this.returnRowSelected = new EventEmitter();
375
+ this.search = new UntypedFormControl('');
376
+ this.rowSelected = [];
377
+ }
378
+ set setInitColumns(col) {
379
+ this.columns = ['active', ...Object.keys(col)];
380
+ this.initColumns = col;
381
+ }
382
+ set tableData(data) {
383
+ this.tableSource = new MatTableDataSource(data);
384
+ this.tableSource.paginator = this.paginator;
385
+ }
386
+ set validError(error) {
387
+ this._validError = error;
388
+ }
389
+ get validError() {
390
+ return this._validError;
391
+ }
392
+ ngOnInit() {
393
+ this.search.valueChanges.subscribe(res => {
394
+ this.tableSource.filter = res.trim().toLowerCase();
395
+ });
396
+ setTimeout(() => {
397
+ if (this.initSearchVal) {
398
+ this.search.setValue(this.initSearchVal);
399
+ this.rowClick(this.initSelected);
400
+ }
401
+ }, 1000);
402
+ }
403
+ clearSearch() {
404
+ this.search.setValue('');
405
+ }
406
+ rowClick(row) {
407
+ const found = this.rowSelected.find(tmpRow => tmpRow === row);
408
+ if (found) {
409
+ this.rowSelected = this.rowSelected.filter(tmpRow => tmpRow !== row);
410
+ }
411
+ else {
412
+ if (this.multiple) {
413
+ this.rowSelected.push(row);
414
+ }
415
+ else {
416
+ this.rowSelected = [row];
417
+ }
418
+ }
419
+ this.returnRowSelected.emit(this.rowSelected);
420
+ }
421
+ checkActiveRow(row) {
422
+ return !!this.rowSelected.find(activeRow => activeRow === row);
423
+ }
424
+ }
425
+ SelectTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SelectTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
426
+ SelectTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", 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 <i class=\"material-icons\" (click)=\"clearSearch()\">clear</i>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <table mat-table [dataSource]=\"tableSource\">\r\n <ng-container *ngFor=\"let col of columns\" [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 <ng-container *ngIf=\"col === 'active'\">\r\n <i *ngIf=\"checkActiveRow(element)\" class=\"material-icons active-row\"\r\n >done</i\r\n >\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"col !== 'active'\">\r\n {{ element[col] }}\r\n </ng-container>\r\n </td>\r\n </ng-container>\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", ".search-form button{height:40px}.search-form mat-form-field:first-child{padding-left:0}.search-form mat-form-field:last-child{padding-right:0}.search-form .clear{padding:0}.search-form .clear i{height:20px;width:20px;font-size:20px;cursor:pointer}table{width:100%;box-shadow:none}table th.mat-header-cell:first-of-type,table td.mat-cell:first-of-type,table td.mat-footer-cell:first-of-type{padding-left:12px}table th.mat-header-cell:last-of-type,table td.mat-cell:last-of-type,table td.mat-footer-cell:last-of-type{padding-right:12px}table::ng-deep thead tr{background-color:#fff9c4}table::ng-deep thead tr th{border-color:#fdd835}table::ng-deep tbody>tr{cursor:pointer}table::ng-deep tbody>tr.active{background-color:#a5d6a7}table::ng-deep tbody>tr:hover{background-color:#a5d6a7}table::ng-deep tbody>tr.disabled{cursor:not-allowed}table::ng-deep tbody>tr.disabled:hover{background-color:inherit}table::ng-deep tbody>tr.detail-row{height:0;cursor:default}table::ng-deep tbody>tr.detail-row:hover{background-color:transparent}table::ng-deep tbody>tr.detail-row .element-detail{overflow:hidden;display:flex}table::ng-deep tbody>tr.detail-row .element-detail p{padding:20px 0;margin-bottom:0;white-space:pre-wrap}table::ng-deep tbody>tr td i.active-row{color:#1b5e20;font-weight:700;font-size:25px;height:25px;width:25px;margin-top:2px}table::ng-deep tbody>tr td>div{max-height:200px;overflow:hidden;overflow-y:auto}table::ng-deep tbody>tr td a button{color:#000}table::ng-deep tbody>tr td a i{color:#333}table::ng-deep .mat-column-active{width:48px}table.no-hover::ng-deep tbody tr{cursor:default}table.no-hover::ng-deep tbody tr.active{background-color:transparent}table.no-hover::ng-deep tbody tr:hover{background-color:transparent}table.admin-table::ng-deep .actions-cell{width:100px}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6$1.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i6$1.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i6$1.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i6$1.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { kind: "directive", type: i6$1.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i6$1.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i6$1.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i6$1.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i6$1.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i6$1.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i7$1.MatPaginator, selector: "mat-paginator", inputs: ["disabled"], exportAs: ["matPaginator"] }, { kind: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.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: i5.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: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
427
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SelectTableComponent, decorators: [{
428
+ type: Component,
429
+ 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 <i class=\"material-icons\" (click)=\"clearSearch()\">clear</i>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <table mat-table [dataSource]=\"tableSource\">\r\n <ng-container *ngFor=\"let col of columns\" [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 <ng-container *ngIf=\"col === 'active'\">\r\n <i *ngIf=\"checkActiveRow(element)\" class=\"material-icons active-row\"\r\n >done</i\r\n >\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"col !== 'active'\">\r\n {{ element[col] }}\r\n </ng-container>\r\n </td>\r\n </ng-container>\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", ".search-form button{height:40px}.search-form mat-form-field:first-child{padding-left:0}.search-form mat-form-field:last-child{padding-right:0}.search-form .clear{padding:0}.search-form .clear i{height:20px;width:20px;font-size:20px;cursor:pointer}table{width:100%;box-shadow:none}table th.mat-header-cell:first-of-type,table td.mat-cell:first-of-type,table td.mat-footer-cell:first-of-type{padding-left:12px}table th.mat-header-cell:last-of-type,table td.mat-cell:last-of-type,table td.mat-footer-cell:last-of-type{padding-right:12px}table::ng-deep thead tr{background-color:#fff9c4}table::ng-deep thead tr th{border-color:#fdd835}table::ng-deep tbody>tr{cursor:pointer}table::ng-deep tbody>tr.active{background-color:#a5d6a7}table::ng-deep tbody>tr:hover{background-color:#a5d6a7}table::ng-deep tbody>tr.disabled{cursor:not-allowed}table::ng-deep tbody>tr.disabled:hover{background-color:inherit}table::ng-deep tbody>tr.detail-row{height:0;cursor:default}table::ng-deep tbody>tr.detail-row:hover{background-color:transparent}table::ng-deep tbody>tr.detail-row .element-detail{overflow:hidden;display:flex}table::ng-deep tbody>tr.detail-row .element-detail p{padding:20px 0;margin-bottom:0;white-space:pre-wrap}table::ng-deep tbody>tr td i.active-row{color:#1b5e20;font-weight:700;font-size:25px;height:25px;width:25px;margin-top:2px}table::ng-deep tbody>tr td>div{max-height:200px;overflow:hidden;overflow-y:auto}table::ng-deep tbody>tr td a button{color:#000}table::ng-deep tbody>tr td a i{color:#333}table::ng-deep .mat-column-active{width:48px}table.no-hover::ng-deep tbody tr{cursor:default}table.no-hover::ng-deep tbody tr.active{background-color:transparent}table.no-hover::ng-deep tbody tr:hover{background-color:transparent}table.admin-table::ng-deep .actions-cell{width:100px}\n"] }]
430
+ }], ctorParameters: function () { return []; }, propDecorators: { paginator: [{
431
+ type: ViewChild,
432
+ args: [MatPaginator]
433
+ }], title: [{
434
+ type: Input
435
+ }], required: [{
436
+ type: Input
437
+ }], multiple: [{
438
+ type: Input
439
+ }], initSelected: [{
440
+ type: Input
441
+ }], initSearchVal: [{
442
+ type: Input
443
+ }], searchLabel: [{
444
+ type: Input
445
+ }], selectedLabel: [{
446
+ type: Input
447
+ }], setInitColumns: [{
448
+ type: Input
449
+ }], tableData: [{
450
+ type: Input
451
+ }], validError: [{
452
+ type: Input
453
+ }], returnRowSelected: [{
454
+ type: Output
454
455
  }] } });
455
456
 
456
- class StTablesModule {
457
- }
458
- StTablesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: StTablesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
459
- StTablesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: StTablesModule, declarations: [LocalTableComponent,
460
- SelectTableComponent,
461
- ConfigurationsComponent], imports: [CommonModule,
462
- MatButtonModule,
463
- MatIconModule,
464
- MatTableModule,
465
- MatPaginatorModule,
466
- MatFormFieldModule,
467
- MatInputModule,
468
- MatTooltipModule,
469
- FormsModule,
470
- ReactiveFormsModule,
471
- RouterModule,
472
- StDateFormatModule,
473
- MatSortModule,
474
- MatMenuModule,
475
- MatSelectModule,
476
- MatCheckboxModule], exports: [LocalTableComponent, SelectTableComponent] });
477
- StTablesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: StTablesModule, providers: [LocalTableService], imports: [CommonModule,
478
- MatButtonModule,
479
- MatIconModule,
480
- MatTableModule,
481
- MatPaginatorModule,
482
- MatFormFieldModule,
483
- MatInputModule,
484
- MatTooltipModule,
485
- FormsModule,
486
- ReactiveFormsModule,
487
- RouterModule,
488
- StDateFormatModule,
489
- MatSortModule,
490
- MatMenuModule,
491
- MatSelectModule,
492
- MatCheckboxModule] });
493
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: StTablesModule, decorators: [{
494
- type: NgModule,
495
- args: [{
496
- declarations: [
497
- LocalTableComponent,
498
- SelectTableComponent,
499
- ConfigurationsComponent,
500
- ],
501
- imports: [
502
- CommonModule,
503
- MatButtonModule,
504
- MatIconModule,
505
- MatTableModule,
506
- MatPaginatorModule,
507
- MatFormFieldModule,
508
- MatInputModule,
509
- MatTooltipModule,
510
- FormsModule,
511
- ReactiveFormsModule,
512
- RouterModule,
513
- StDateFormatModule,
514
- MatSortModule,
515
- MatMenuModule,
516
- MatSelectModule,
517
- MatCheckboxModule,
518
- ],
519
- exports: [LocalTableComponent, SelectTableComponent],
520
- providers: [LocalTableService],
521
- }]
457
+ class StTablesModule {
458
+ }
459
+ StTablesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: StTablesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
460
+ StTablesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: StTablesModule, declarations: [LocalTableComponent,
461
+ SelectTableComponent,
462
+ ConfigurationsComponent], imports: [CommonModule,
463
+ MatButtonModule,
464
+ MatIconModule,
465
+ MatTableModule,
466
+ MatPaginatorModule,
467
+ MatFormFieldModule,
468
+ MatInputModule,
469
+ MatTooltipModule,
470
+ FormsModule,
471
+ ReactiveFormsModule,
472
+ RouterModule,
473
+ StDateFormatModule,
474
+ MatSortModule,
475
+ MatMenuModule,
476
+ MatSelectModule,
477
+ MatCheckboxModule], exports: [LocalTableComponent, SelectTableComponent] });
478
+ StTablesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: StTablesModule, providers: [LocalTableService], imports: [CommonModule,
479
+ MatButtonModule,
480
+ MatIconModule,
481
+ MatTableModule,
482
+ MatPaginatorModule,
483
+ MatFormFieldModule,
484
+ MatInputModule,
485
+ MatTooltipModule,
486
+ FormsModule,
487
+ ReactiveFormsModule,
488
+ RouterModule,
489
+ StDateFormatModule,
490
+ MatSortModule,
491
+ MatMenuModule,
492
+ MatSelectModule,
493
+ MatCheckboxModule] });
494
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: StTablesModule, decorators: [{
495
+ type: NgModule,
496
+ args: [{
497
+ declarations: [
498
+ LocalTableComponent,
499
+ SelectTableComponent,
500
+ ConfigurationsComponent,
501
+ ],
502
+ imports: [
503
+ CommonModule,
504
+ MatButtonModule,
505
+ MatIconModule,
506
+ MatTableModule,
507
+ MatPaginatorModule,
508
+ MatFormFieldModule,
509
+ MatInputModule,
510
+ MatTooltipModule,
511
+ FormsModule,
512
+ ReactiveFormsModule,
513
+ RouterModule,
514
+ StDateFormatModule,
515
+ MatSortModule,
516
+ MatMenuModule,
517
+ MatSelectModule,
518
+ MatCheckboxModule,
519
+ ],
520
+ exports: [LocalTableComponent, SelectTableComponent],
521
+ providers: [LocalTableService],
522
+ }]
522
523
  }] });
523
524
 
524
- /*
525
- * Public API Surface of ngx-st-tables
525
+ /*
526
+ * Public API Surface of ngx-st-tables
526
527
  */
527
528
 
528
- /**
529
- * Generated bundle index. Do not edit.
529
+ /**
530
+ * Generated bundle index. Do not edit.
530
531
  */
531
532
 
532
533
  export { ConfigurationsComponent, LocalTableComponent, LocalTableService, SelectTableComponent, StTablesModule };