ngx-st-tables 17.0.29 → 17.0.30

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.
@@ -1,10 +1,10 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { Injectable, EventEmitter, Component, Input, Output, ChangeDetectionStrategy, ViewChild, Inject, ViewEncapsulation, NgModule } from '@angular/core';
3
- import * as i4$1 from '@angular/material/paginator';
3
+ import * as i7$2 from '@angular/material/paginator';
4
4
  import { MatPaginator, MatPaginatorModule } from '@angular/material/paginator';
5
5
  import * as i12 from '@angular/material/sort';
6
6
  import { MatSort, MatSortModule } from '@angular/material/sort';
7
- import * as i3$1 from '@angular/material/table';
7
+ import * as i6$1 from '@angular/material/table';
8
8
  import { MatTableDataSource, MatTableModule } from '@angular/material/table';
9
9
  import * as i2$1 from '@angular/router';
10
10
  import { RouterModule } from '@angular/router';
@@ -38,13 +38,14 @@ import * as i1 from '@angular/material/dialog';
38
38
  import { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
39
39
  import * as i11 from '@angular/material/datepicker';
40
40
  import { MatDatepickerModule } from '@angular/material/datepicker';
41
- import * as i4$2 from '@angular/cdk/drag-drop';
41
+ import * as i4$1 from '@angular/cdk/drag-drop';
42
42
  import { moveItemInArray, CdkDropList, CdkDrag } from '@angular/cdk/drag-drop';
43
43
  import * as i10$1 from '@angular/material/badge';
44
44
  import { MatBadge } from '@angular/material/badge';
45
+ import { SelectionModel } from '@angular/cdk/collections';
45
46
  import * as i1$1 from 'ngx-st-snack-bar';
46
47
  import { StSnackBarModule } from 'ngx-st-snack-bar';
47
- import * as i6$1 from '@angular/material/progress-spinner';
48
+ import * as i10$2 from '@angular/material/progress-spinner';
48
49
  import { MatProgressSpinner } from '@angular/material/progress-spinner';
49
50
  import { MatExpansionModule } from '@angular/material/expansion';
50
51
  import { InputTextModule } from 'primeng/inputtext';
@@ -128,11 +129,11 @@ class ConfigurationsComponent {
128
129
  this.changeConfig.emit(this.selectedConfig?.configId || null);
129
130
  }
130
131
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ConfigurationsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
131
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: ConfigurationsComponent, selector: "st-configurations[configurationsSettings]", inputs: { configurationsSettings: "configurationsSettings", configurations: "configurations", initSelectedConfig: "initSelectedConfig" }, outputs: { createNewConfig: "createNewConfig", removeConfig: "removeConfig", changeConfig: "changeConfig" }, ngImport: i0, template: "<div class=\"col-auto row align-items-center\" style=\"padding: 0\">\n @if (!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 @for (config of configurations; track config) {\n <mat-option [value]=\"config\">{{ config.configName }}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n <button\n mat-icon-button\n class=\"col-auto green-icon\"\n (click)=\"showCreateConfiguration()\"\n >\n <mat-icon> add </mat-icon>\n </button>\n <button\n mat-icon-button\n class=\"col-auto red-icon\"\n [disabled]=\"!selectedConfig\"\n (click)=\"deleteConfiguration()\"\n >\n <mat-icon> delete </mat-icon>\n </button>\n }\n\n @if (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 <mat-icon> done </mat-icon>\n </button>\n <button\n mat-icon-button\n class=\"col-auto red-icon\"\n (click)=\"hideCreateConfiguration()\"\n >\n <mat-icon> close </mat-icon>\n </button>\n }\n\n @if (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 <mat-icon> done </mat-icon>\n </button>\n <button\n mat-icon-button\n class=\"col-auto red-icon\"\n (click)=\"declineDeleteConfiguration()\"\n >\n <mat-icon> close </mat-icon>\n </button>\n }\n</div>\n", styles: [".green-icon span{color:#2e7d32}.red-icon span{color:#c62828}\n"], dependencies: [{ kind: "component", type: i4.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8.MatLabel, selector: "mat-label" }, { kind: "directive", type: i6.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: i7.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: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i8$1.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i7$1.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }] }); }
132
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: ConfigurationsComponent, selector: "st-configurations[configurationsSettings]", inputs: { configurationsSettings: "configurationsSettings", configurations: "configurations", initSelectedConfig: "initSelectedConfig" }, outputs: { createNewConfig: "createNewConfig", removeConfig: "removeConfig", changeConfig: "changeConfig" }, ngImport: i0, template: "<div class=\"col-auto row align-items-center\" style=\"padding: 0\">\r\n @if (!creatingConfiguration && !removingConfiguration) {\r\n <mat-form-field class=\"col-auto\" style=\"padding-right: 0\">\r\n <mat-label>{{ configurationsSettings.selectLabel }}</mat-label>\r\n <mat-select\r\n [(ngModel)]=\"selectedConfig\"\r\n (ngModelChange)=\"selectedConfigChanged()\"\r\n >\r\n <mat-option [value]=\"null\"></mat-option>\r\n @for (config of configurations; track config) {\r\n <mat-option [value]=\"config\">{{ config.configName }}</mat-option>\r\n }\r\n </mat-select>\r\n </mat-form-field>\r\n <button\r\n mat-icon-button\r\n class=\"col-auto green-icon\"\r\n (click)=\"showCreateConfiguration()\"\r\n >\r\n <mat-icon> add </mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n class=\"col-auto red-icon\"\r\n [disabled]=\"!selectedConfig\"\r\n (click)=\"deleteConfiguration()\"\r\n >\r\n <mat-icon> delete </mat-icon>\r\n </button>\r\n }\r\n\r\n @if (creatingConfiguration) {\r\n <mat-form-field class=\"col-auto\">\r\n <mat-label>{{ configurationsSettings.createLabel }}</mat-label>\r\n <input matInput [(ngModel)]=\"createConfigurationName\" />\r\n </mat-form-field>\r\n <button\r\n mat-icon-button\r\n class=\"col-auto green-icon\"\r\n (click)=\"saveCreateConfiguration()\"\r\n [disabled]=\"!createConfigurationName\"\r\n >\r\n <mat-icon> done </mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n class=\"col-auto red-icon\"\r\n (click)=\"hideCreateConfiguration()\"\r\n >\r\n <mat-icon> close </mat-icon>\r\n </button>\r\n }\r\n\r\n @if (removingConfiguration) {\r\n <p class=\"col-auto\" style=\"margin: 0; font-weight: bold; font-size: 16px\">\r\n {{ configurationsSettings.deleteWarningTitle }}\r\n </p>\r\n <button\r\n mat-icon-button\r\n class=\"col-auto green-icon\"\r\n (click)=\"acceptDeleteConfiguration()\"\r\n >\r\n <mat-icon> done </mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n class=\"col-auto red-icon\"\r\n (click)=\"declineDeleteConfiguration()\"\r\n >\r\n <mat-icon> close </mat-icon>\r\n </button>\r\n }\r\n</div>\r\n", styles: [".green-icon span{color:#2e7d32}.red-icon span{color:#c62828}\n"], dependencies: [{ kind: "component", type: i4.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8.MatLabel, selector: "mat-label" }, { kind: "directive", type: i6.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: i7.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: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i8$1.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i7$1.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }] }); }
132
133
  }
133
134
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ConfigurationsComponent, decorators: [{
134
135
  type: Component,
135
- args: [{ selector: 'st-configurations[configurationsSettings]', template: "<div class=\"col-auto row align-items-center\" style=\"padding: 0\">\n @if (!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 @for (config of configurations; track config) {\n <mat-option [value]=\"config\">{{ config.configName }}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n <button\n mat-icon-button\n class=\"col-auto green-icon\"\n (click)=\"showCreateConfiguration()\"\n >\n <mat-icon> add </mat-icon>\n </button>\n <button\n mat-icon-button\n class=\"col-auto red-icon\"\n [disabled]=\"!selectedConfig\"\n (click)=\"deleteConfiguration()\"\n >\n <mat-icon> delete </mat-icon>\n </button>\n }\n\n @if (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 <mat-icon> done </mat-icon>\n </button>\n <button\n mat-icon-button\n class=\"col-auto red-icon\"\n (click)=\"hideCreateConfiguration()\"\n >\n <mat-icon> close </mat-icon>\n </button>\n }\n\n @if (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 <mat-icon> done </mat-icon>\n </button>\n <button\n mat-icon-button\n class=\"col-auto red-icon\"\n (click)=\"declineDeleteConfiguration()\"\n >\n <mat-icon> close </mat-icon>\n </button>\n }\n</div>\n", styles: [".green-icon span{color:#2e7d32}.red-icon span{color:#c62828}\n"] }]
136
+ args: [{ selector: 'st-configurations[configurationsSettings]', template: "<div class=\"col-auto row align-items-center\" style=\"padding: 0\">\r\n @if (!creatingConfiguration && !removingConfiguration) {\r\n <mat-form-field class=\"col-auto\" style=\"padding-right: 0\">\r\n <mat-label>{{ configurationsSettings.selectLabel }}</mat-label>\r\n <mat-select\r\n [(ngModel)]=\"selectedConfig\"\r\n (ngModelChange)=\"selectedConfigChanged()\"\r\n >\r\n <mat-option [value]=\"null\"></mat-option>\r\n @for (config of configurations; track config) {\r\n <mat-option [value]=\"config\">{{ config.configName }}</mat-option>\r\n }\r\n </mat-select>\r\n </mat-form-field>\r\n <button\r\n mat-icon-button\r\n class=\"col-auto green-icon\"\r\n (click)=\"showCreateConfiguration()\"\r\n >\r\n <mat-icon> add </mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n class=\"col-auto red-icon\"\r\n [disabled]=\"!selectedConfig\"\r\n (click)=\"deleteConfiguration()\"\r\n >\r\n <mat-icon> delete </mat-icon>\r\n </button>\r\n }\r\n\r\n @if (creatingConfiguration) {\r\n <mat-form-field class=\"col-auto\">\r\n <mat-label>{{ configurationsSettings.createLabel }}</mat-label>\r\n <input matInput [(ngModel)]=\"createConfigurationName\" />\r\n </mat-form-field>\r\n <button\r\n mat-icon-button\r\n class=\"col-auto green-icon\"\r\n (click)=\"saveCreateConfiguration()\"\r\n [disabled]=\"!createConfigurationName\"\r\n >\r\n <mat-icon> done </mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n class=\"col-auto red-icon\"\r\n (click)=\"hideCreateConfiguration()\"\r\n >\r\n <mat-icon> close </mat-icon>\r\n </button>\r\n }\r\n\r\n @if (removingConfiguration) {\r\n <p class=\"col-auto\" style=\"margin: 0; font-weight: bold; font-size: 16px\">\r\n {{ configurationsSettings.deleteWarningTitle }}\r\n </p>\r\n <button\r\n mat-icon-button\r\n class=\"col-auto green-icon\"\r\n (click)=\"acceptDeleteConfiguration()\"\r\n >\r\n <mat-icon> done </mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n class=\"col-auto red-icon\"\r\n (click)=\"declineDeleteConfiguration()\"\r\n >\r\n <mat-icon> close </mat-icon>\r\n </button>\r\n }\r\n</div>\r\n", styles: [".green-icon span{color:#2e7d32}.red-icon span{color:#c62828}\n"] }]
136
137
  }], ctorParameters: () => [], propDecorators: { configurationsSettings: [{
137
138
  type: Input
138
139
  }], configurations: [{
@@ -354,11 +355,11 @@ class LocalTableComponent {
354
355
  this.setDisplayedColumns();
355
356
  }
356
357
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: LocalTableComponent, deps: [{ token: LocalTableService }, { token: i0.ChangeDetectorRef }, { token: i2$1.Router }, { token: i2$1.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component }); }
357
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: LocalTableComponent, selector: "ngx-st-local-table", inputs: { tableSettings: "tableSettings", globalSearchSettings: "globalSearchSettings", pageSize: "pageSize", allowPickColumns: "allowPickColumns", configurationsSettings: "configurationsSettings", localStorageName: "localStorageName", bindSearchToUrl: "bindSearchToUrl", columns: "columns", data: "data" }, viewQueries: [{ propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true }, { propertyName: "sort", first: true, predicate: MatSort, descendants: true }], ngImport: i0, template: "<div class=\"local-table\">\n <div class=\"row align-items-center\">\n @if (configurationsSettings || allowPickColumns) {\n <div class=\"col row align-items-center\" style=\"padding: 0\">\n @if (allowPickColumns) {\n <div class=\"col-auto\" style=\"padding: 0\">\n <button\n mat-icon-button\n class=\"col-auto\"\n [matMenuTriggerFor]=\"columnsMenu\"\n >\n <mat-icon> view_week </mat-icon>\n </button>\n <mat-menu #columnsMenu=\"matMenu\" xPosition=\"after\">\n @for (column of columnsArray; track column) {\n @if (!column.notShowInColumnPick) {\n <div mat-menu-item>\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 }\n }\n </mat-menu>\n </div>\n }\n @if (configurationsSettings) {\n <st-configurations\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 }\n </div>\n }\n\n @if (globalSearchSettings?.show) {\n <div class=\"col\" style=\"padding: 0; margin-bottom: -15px\">\n <mat-form-field>\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 }\n </div>\n\n <table\n [ngClass]=\"{ 'no-hover': !tableSettings?.rowClickAction }\"\n mat-table\n [dataSource]=\"tableSource\"\n matSort\n >\n @for (column of displayedColumns; track column) {\n <ng-container [matColumnDef]=\"column\">\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 @if (columns[column].search) {\n <mat-icon\n class=\"search-icon\"\n [matMenuTriggerFor]=\"menu\"\n (click)=\"$event.stopPropagation()\"\n >\n search\n </mat-icon>\n }\n <mat-menu #menu=\"matMenu\" xPosition=\"before\">\n <mat-form-field class=\"col\">\n <mat-label>{{\n columns[column].searchLabel || 'Search'\n }}</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 @if (columns[column].actions && columns[column].actions!.length > 0) {\n <div\n class=\"actions-container\"\n style=\"overflow-y: hidden\"\n [ngClass]=\"{ 'justify-content-end': columns[column].flexRight }\"\n >\n @for (action of columns[column].actions; track action) {\n @if (checkIfActionVisible(element, action)) {\n @if (!action.url && action.action) {\n <button\n style=\"padding: 7px 7px; width: 40px; height: 40px\"\n class=\"col-auto\"\n mat-icon-button\n type=\"button\"\n matTooltip=\"{{ action.tooltipName || '' }}\"\n [matTooltipDisabled]=\"!!!action.tooltipName\"\n (click)=\"action.action(element)\"\n >\n <mat-icon>{{ action.iconName }}</mat-icon>\n </button>\n }\n @if (action.url) {\n <a [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 <mat-icon>{{ action.iconName }}</mat-icon>\n </button>\n </a>\n }\n }\n }\n </div>\n }\n @if (!columns[column].actions) {\n @if (columns[column].translateValue) {\n <p style=\"margin: 0; padding: 0\">\n {{ columns[column].translateValue![element[column]] || '' }}\n </p>\n }\n @if (!columns[column].translateValue) {\n @if (!columns[column].type || columns[column].type === 'string') {\n <p style=\"margin: 0; padding: 0\">{{ element[column] }}</p>\n }\n @if (columns[column].type === 'date') {\n <p style=\"margin: 0; padding: 0\">\n {{ element[column] | stDateTimeFormatPipe }}\n </p>\n }\n }\n }\n </td>\n </ng-container>\n }\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: ["", ".st-material-table .search-form button{height:40px}.st-material-table .search-form mat-form-field:first-child{padding-left:0}.st-material-table .search-form mat-form-field:last-child{padding-right:0}.st-material-table .search-form .clear{padding:0}.st-material-table .search-form .clear mat-icon{height:20px;width:20px;font-size:20px;cursor:pointer}.st-material-table table{width:100%;box-shadow:none}.st-material-table table th.mat-mdc-header-cell,.st-material-table table td.mat-mdc-cell,.st-material-table table td.mat-mdc-footer-cell{padding:0}.st-material-table table th.mat-mdc-header-cell:first-of-type,.st-material-table table td.mat-mdc-cell:first-of-type,.st-material-table table td.mat-mdc-footer-cell:first-of-type{padding-left:12px}.st-material-table table th.mat-mdc-header-cell:last-of-type,.st-material-table table td.mat-mdc-cell:last-of-type,.st-material-table table td.mat-mdc-footer-cell:last-of-type{padding-right:12px}.st-material-table table thead tr{background-color:#fff9c4;height:40px!important}.st-material-table table thead tr th{border-color:#fdd835;font-size:.9rem;font-weight:600;color:#424242}.st-material-table table tbody{background-color:transparent!important}.st-material-table table tbody>tr{cursor:pointer}.st-material-table table tbody>tr.active{background-color:#a5d6a7}.st-material-table table tbody>tr.active td{border-bottom-color:#81c784!important}.st-material-table table tbody>tr:hover{background-color:#f5f5f5}.st-material-table table tbody>tr.disabled{cursor:not-allowed}.st-material-table table tbody>tr.disabled:hover{background-color:inherit!important}.st-material-table table tbody>tr.detail-row{height:0;cursor:default}.st-material-table table tbody>tr.detail-row:hover{background-color:transparent}.st-material-table table tbody>tr.detail-row .element-detail{overflow:hidden;display:flex}.st-material-table table tbody>tr.detail-row .element-detail p{padding:20px 0;margin-bottom:0;white-space:pre-wrap}.st-material-table table tbody>tr td i.active-row{color:#1b5e20;font-weight:700;font-size:25px;height:25px;width:25px;margin-top:2px}.st-material-table table tbody>tr td>div{max-height:200px;overflow:hidden;overflow-y:auto}.st-material-table table tbody>tr td a button{color:#000}.st-material-table table tbody>tr td a mat-icon{color:#333}.st-material-table table .mat-column-active{width:48px}.st-material-table table.no-hover tbody tr{cursor:default}.st-material-table table.no-hover tbody tr.active{background-color:transparent!important}.st-material-table table.no-hover tbody tr.active td{border-bottom-color:#0000001f!important}.st-material-table table.no-hover tbody tr:hover{background-color:transparent!important}.st-material-table table.no-hover tbody tr:hover td{border-bottom-color:#0000001f!important}.st-material-table table.admin-table .actions-cell{width:100px}.dark-theme .st-material-table table{background-color:transparent!important}.dark-theme .st-material-table table thead tr{background-color:#5e4803!important}.dark-theme .st-material-table table thead tr th{border-color:#816204!important;color:#e0e0e0!important}.dark-theme .st-material-table tbody tr:hover{background-color:var(--primeng-table-hover-background)!important}.dark-theme mat-paginator{background-color:transparent!important}.dark-theme .reorder-column-list .reorder-column-element{background-color:#424242!important;color:#eee!important}.dark-theme .reorder-column-list .reorder-column-element p,.dark-theme .reorder-column-list .reorder-column-element mat-icon{color:#eee!important}.dark-theme .filter .filter-title{color:#eee!important}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i4.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i3$1.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i3$1.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i3$1.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i3$1.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i3$1.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i3$1.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i3$1.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i3$1.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i3$1.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i3$1.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i4$1.MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8.MatLabel, selector: "mat-label" }, { kind: "directive", type: i8.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: i6.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i10.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: i7.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: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i12.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i12.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: i13.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i13.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i13.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "component", type: i14.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "component", type: ConfigurationsComponent, selector: "st-configurations[configurationsSettings]", inputs: ["configurationsSettings", "configurations", "initSelectedConfig"], outputs: ["createNewConfig", "removeConfig", "changeConfig"] }, { kind: "pipe", type: i16.DateTimeFormatPipe, name: "stDateTimeFormatPipe" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
358
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: LocalTableComponent, selector: "ngx-st-local-table", inputs: { tableSettings: "tableSettings", globalSearchSettings: "globalSearchSettings", pageSize: "pageSize", allowPickColumns: "allowPickColumns", configurationsSettings: "configurationsSettings", localStorageName: "localStorageName", bindSearchToUrl: "bindSearchToUrl", columns: "columns", data: "data" }, viewQueries: [{ propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true }, { propertyName: "sort", first: true, predicate: MatSort, descendants: true }], ngImport: i0, template: "<div class=\"local-table\">\r\n <div class=\"row align-items-center\">\r\n @if (configurationsSettings || allowPickColumns) {\r\n <div class=\"col row align-items-center\" style=\"padding: 0\">\r\n @if (allowPickColumns) {\r\n <div class=\"col-auto\" style=\"padding: 0\">\r\n <button\r\n mat-icon-button\r\n class=\"col-auto\"\r\n [matMenuTriggerFor]=\"columnsMenu\"\r\n >\r\n <mat-icon> view_week </mat-icon>\r\n </button>\r\n <mat-menu #columnsMenu=\"matMenu\" xPosition=\"after\">\r\n @for (column of columnsArray; track column) {\r\n @if (!column.notShowInColumnPick) {\r\n <div mat-menu-item>\r\n <mat-checkbox\r\n [(ngModel)]=\"column.visible\"\r\n (ngModelChange)=\"columnVisibleChanged(column)\"\r\n style=\"margin-top: 5px\"\r\n (click)=\"$event.stopPropagation()\"\r\n >\r\n {{ column.translateColumnName }}\r\n </mat-checkbox>\r\n </div>\r\n }\r\n }\r\n </mat-menu>\r\n </div>\r\n }\r\n @if (configurationsSettings) {\r\n <st-configurations\r\n [configurationsSettings]=\"configurationsSettings\"\r\n [configurations]=\"configurations\"\r\n [initSelectedConfig]=\"initConfig\"\r\n (createNewConfig)=\"newConfigCreated($event)\"\r\n (removeConfig)=\"configRemoved($event)\"\r\n (changeConfig)=\"configChanged($event)\"\r\n ></st-configurations>\r\n }\r\n </div>\r\n }\r\n\r\n @if (globalSearchSettings?.show) {\r\n <div class=\"col\" style=\"padding: 0; margin-bottom: -15px\">\r\n <mat-form-field>\r\n <mat-label>{{ globalSearchSettings?.label || 'Search' }}</mat-label>\r\n <input matInput (keyup)=\"applySearch()\" [(ngModel)]=\"searchModel\" />\r\n <button\r\n matSuffix\r\n mat-icon-button\r\n aria-label=\"Clear\"\r\n (click)=\"clearSearch()\"\r\n >\r\n <mat-icon style=\"font-size: 22px\">close</mat-icon>\r\n </button>\r\n </mat-form-field>\r\n </div>\r\n }\r\n </div>\r\n\r\n <table\r\n [ngClass]=\"{ 'no-hover': !tableSettings?.rowClickAction }\"\r\n mat-table\r\n [dataSource]=\"tableSource\"\r\n matSort\r\n >\r\n @for (column of displayedColumns; track column) {\r\n <ng-container [matColumnDef]=\"column\">\r\n <th\r\n mat-header-cell\r\n *matHeaderCellDef\r\n style=\"{{\r\n columns[column].width ? 'width:' + columns[column].width : ''\r\n }}\"\r\n mat-sort-header\r\n [disabled]=\"!columns[column].sort\"\r\n >\r\n {{ columns[column].translateColumnName }}\r\n @if (columns[column].search) {\r\n <mat-icon\r\n class=\"search-icon\"\r\n [matMenuTriggerFor]=\"menu\"\r\n (click)=\"$event.stopPropagation()\"\r\n >\r\n search\r\n </mat-icon>\r\n }\r\n <mat-menu #menu=\"matMenu\" xPosition=\"before\">\r\n <mat-form-field class=\"col\">\r\n <mat-label>{{\r\n columns[column].searchLabel || 'Search'\r\n }}</mat-label>\r\n <input\r\n matInput\r\n (keyup)=\"applySearch()\"\r\n [(ngModel)]=\"searchModel\"\r\n (click)=\"$event.stopPropagation()\"\r\n />\r\n <button\r\n matSuffix\r\n mat-icon-button\r\n aria-label=\"Clear\"\r\n (click)=\"searchModel = ''\"\r\n >\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n </mat-form-field>\r\n </mat-menu>\r\n </th>\r\n <td\r\n mat-cell\r\n *matCellDef=\"let element\"\r\n style=\"{{\r\n columns[column].width ? 'width:' + columns[column].width : ''\r\n }}\"\r\n >\r\n @if (columns[column].actions && columns[column].actions!.length > 0) {\r\n <div\r\n class=\"actions-container\"\r\n style=\"overflow-y: hidden\"\r\n [ngClass]=\"{ 'justify-content-end': columns[column].flexRight }\"\r\n >\r\n @for (action of columns[column].actions; track action) {\r\n @if (checkIfActionVisible(element, action)) {\r\n @if (!action.url && action.action) {\r\n <button\r\n style=\"padding: 7px 7px; width: 40px; height: 40px\"\r\n class=\"col-auto\"\r\n mat-icon-button\r\n type=\"button\"\r\n matTooltip=\"{{ action.tooltipName || '' }}\"\r\n [matTooltipDisabled]=\"!!!action.tooltipName\"\r\n (click)=\"action.action(element)\"\r\n >\r\n <mat-icon>{{ action.iconName }}</mat-icon>\r\n </button>\r\n }\r\n @if (action.url) {\r\n <a [routerLink]=\"action.url\">\r\n <button\r\n class=\"col-auto\"\r\n mat-icon-button\r\n type=\"button\"\r\n matTooltip=\"{{ action.tooltipName || '' }}\"\r\n [matTooltipDisabled]=\"!!!action.tooltipName\"\r\n >\r\n <mat-icon>{{ action.iconName }}</mat-icon>\r\n </button>\r\n </a>\r\n }\r\n }\r\n }\r\n </div>\r\n }\r\n @if (!columns[column].actions) {\r\n @if (columns[column].translateValue) {\r\n <p style=\"margin: 0; padding: 0\">\r\n {{ columns[column].translateValue![element[column]] || '' }}\r\n </p>\r\n }\r\n @if (!columns[column].translateValue) {\r\n @if (!columns[column].type || columns[column].type === 'string') {\r\n <p style=\"margin: 0; padding: 0\">{{ element[column] }}</p>\r\n }\r\n @if (columns[column].type === 'date') {\r\n <p style=\"margin: 0; padding: 0\">\r\n {{ element[column] | stDateTimeFormatPipe }}\r\n </p>\r\n }\r\n }\r\n }\r\n </td>\r\n </ng-container>\r\n }\r\n\r\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\r\n <tr\r\n mat-row\r\n *matRowDef=\"let row; columns: displayedColumns\"\r\n (click)=\"\r\n tableSettings?.rowClickAction ? tableSettings.rowClickAction(row) : null\r\n \"\r\n ></tr>\r\n </table>\r\n <mat-paginator\r\n [pageIndex]=\"pageIndex\"\r\n [pageSizeOptions]=\"[5, 10, 15, 20, 25]\"\r\n (page)=\"pageChanged($event)\"\r\n [showFirstLastButtons]=\"true\"\r\n ></mat-paginator>\r\n</div>\r\n", styles: ["", ".st-material-table .search-form button{height:40px}.st-material-table .search-form mat-form-field:first-child{padding-left:0}.st-material-table .search-form mat-form-field:last-child{padding-right:0}.st-material-table .search-form .clear{padding:0}.st-material-table .search-form .clear mat-icon{height:20px;width:20px;font-size:20px;cursor:pointer}.st-material-table table{width:100%;box-shadow:none}.st-material-table table th.mat-mdc-header-cell,.st-material-table table td.mat-mdc-cell,.st-material-table table td.mat-mdc-footer-cell{padding:0}.st-material-table table th.mat-mdc-header-cell:first-of-type,.st-material-table table td.mat-mdc-cell:first-of-type,.st-material-table table td.mat-mdc-footer-cell:first-of-type{padding-left:12px}.st-material-table table th.mat-mdc-header-cell:last-of-type,.st-material-table table td.mat-mdc-cell:last-of-type,.st-material-table table td.mat-mdc-footer-cell:last-of-type{padding-right:12px}.st-material-table table thead tr{background-color:#fff9c4;height:40px!important}.st-material-table table thead tr th{border-color:#fdd835;font-size:.9rem;font-weight:600;color:#424242}.st-material-table table tbody{background-color:transparent!important}.st-material-table table tbody>tr{cursor:pointer}.st-material-table table tbody>tr.active{background-color:#a5d6a7}.st-material-table table tbody>tr.active td{border-bottom-color:#81c784!important}.st-material-table table tbody>tr:hover{background-color:#f5f5f5}.st-material-table table tbody>tr.disabled{cursor:not-allowed}.st-material-table table tbody>tr.disabled:hover{background-color:inherit!important}.st-material-table table tbody>tr.detail-row{height:0;cursor:default}.st-material-table table tbody>tr.detail-row:hover{background-color:transparent}.st-material-table table tbody>tr.detail-row .element-detail{overflow:hidden;display:flex}.st-material-table table tbody>tr.detail-row .element-detail p{padding:20px 0;margin-bottom:0;white-space:pre-wrap}.st-material-table table tbody>tr td i.active-row{color:#1b5e20;font-weight:700;font-size:25px;height:25px;width:25px;margin-top:2px}.st-material-table table tbody>tr td>div{max-height:200px;overflow:hidden;overflow-y:auto}.st-material-table table tbody>tr td a button{color:#000}.st-material-table table tbody>tr td a mat-icon{color:#333}.st-material-table table .mat-column-active{width:48px}.st-material-table table.no-hover tbody tr{cursor:default}.st-material-table table.no-hover tbody tr.active{background-color:transparent!important}.st-material-table table.no-hover tbody tr.active td{border-bottom-color:#0000001f!important}.st-material-table table.no-hover tbody tr:hover{background-color:transparent!important}.st-material-table table.no-hover tbody tr:hover td{border-bottom-color:#0000001f!important}.st-material-table table.admin-table .actions-cell{width:100px}.dark-theme .st-material-table table{background-color:transparent!important}.dark-theme .st-material-table table thead tr{background-color:#5e4803!important}.dark-theme .st-material-table table thead tr th{border-color:#816204!important;color:#e0e0e0!important}.dark-theme .st-material-table tbody tr:hover{background-color:var(--primeng-table-hover-background)!important}.dark-theme mat-paginator{background-color:transparent!important}.dark-theme .reorder-column-list .reorder-column-element{background-color:#424242!important;color:#eee!important}.dark-theme .reorder-column-list .reorder-column-element p,.dark-theme .reorder-column-list .reorder-column-element mat-icon{color:#eee!important}.dark-theme .filter .filter-title{color:#eee!important}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i4.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i2.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: ["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$2.MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8.MatLabel, selector: "mat-label" }, { kind: "directive", type: i8.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: i6.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i10.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: i7.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: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i12.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i12.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: i13.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i13.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i13.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "component", type: i14.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "component", type: ConfigurationsComponent, selector: "st-configurations[configurationsSettings]", inputs: ["configurationsSettings", "configurations", "initSelectedConfig"], outputs: ["createNewConfig", "removeConfig", "changeConfig"] }, { kind: "pipe", type: i16.DateTimeFormatPipe, name: "stDateTimeFormatPipe" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
358
359
  }
359
360
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: LocalTableComponent, decorators: [{
360
361
  type: Component,
361
- args: [{ selector: 'ngx-st-local-table', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"local-table\">\n <div class=\"row align-items-center\">\n @if (configurationsSettings || allowPickColumns) {\n <div class=\"col row align-items-center\" style=\"padding: 0\">\n @if (allowPickColumns) {\n <div class=\"col-auto\" style=\"padding: 0\">\n <button\n mat-icon-button\n class=\"col-auto\"\n [matMenuTriggerFor]=\"columnsMenu\"\n >\n <mat-icon> view_week </mat-icon>\n </button>\n <mat-menu #columnsMenu=\"matMenu\" xPosition=\"after\">\n @for (column of columnsArray; track column) {\n @if (!column.notShowInColumnPick) {\n <div mat-menu-item>\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 }\n }\n </mat-menu>\n </div>\n }\n @if (configurationsSettings) {\n <st-configurations\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 }\n </div>\n }\n\n @if (globalSearchSettings?.show) {\n <div class=\"col\" style=\"padding: 0; margin-bottom: -15px\">\n <mat-form-field>\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 }\n </div>\n\n <table\n [ngClass]=\"{ 'no-hover': !tableSettings?.rowClickAction }\"\n mat-table\n [dataSource]=\"tableSource\"\n matSort\n >\n @for (column of displayedColumns; track column) {\n <ng-container [matColumnDef]=\"column\">\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 @if (columns[column].search) {\n <mat-icon\n class=\"search-icon\"\n [matMenuTriggerFor]=\"menu\"\n (click)=\"$event.stopPropagation()\"\n >\n search\n </mat-icon>\n }\n <mat-menu #menu=\"matMenu\" xPosition=\"before\">\n <mat-form-field class=\"col\">\n <mat-label>{{\n columns[column].searchLabel || 'Search'\n }}</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 @if (columns[column].actions && columns[column].actions!.length > 0) {\n <div\n class=\"actions-container\"\n style=\"overflow-y: hidden\"\n [ngClass]=\"{ 'justify-content-end': columns[column].flexRight }\"\n >\n @for (action of columns[column].actions; track action) {\n @if (checkIfActionVisible(element, action)) {\n @if (!action.url && action.action) {\n <button\n style=\"padding: 7px 7px; width: 40px; height: 40px\"\n class=\"col-auto\"\n mat-icon-button\n type=\"button\"\n matTooltip=\"{{ action.tooltipName || '' }}\"\n [matTooltipDisabled]=\"!!!action.tooltipName\"\n (click)=\"action.action(element)\"\n >\n <mat-icon>{{ action.iconName }}</mat-icon>\n </button>\n }\n @if (action.url) {\n <a [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 <mat-icon>{{ action.iconName }}</mat-icon>\n </button>\n </a>\n }\n }\n }\n </div>\n }\n @if (!columns[column].actions) {\n @if (columns[column].translateValue) {\n <p style=\"margin: 0; padding: 0\">\n {{ columns[column].translateValue![element[column]] || '' }}\n </p>\n }\n @if (!columns[column].translateValue) {\n @if (!columns[column].type || columns[column].type === 'string') {\n <p style=\"margin: 0; padding: 0\">{{ element[column] }}</p>\n }\n @if (columns[column].type === 'date') {\n <p style=\"margin: 0; padding: 0\">\n {{ element[column] | stDateTimeFormatPipe }}\n </p>\n }\n }\n }\n </td>\n </ng-container>\n }\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: [".st-material-table .search-form button{height:40px}.st-material-table .search-form mat-form-field:first-child{padding-left:0}.st-material-table .search-form mat-form-field:last-child{padding-right:0}.st-material-table .search-form .clear{padding:0}.st-material-table .search-form .clear mat-icon{height:20px;width:20px;font-size:20px;cursor:pointer}.st-material-table table{width:100%;box-shadow:none}.st-material-table table th.mat-mdc-header-cell,.st-material-table table td.mat-mdc-cell,.st-material-table table td.mat-mdc-footer-cell{padding:0}.st-material-table table th.mat-mdc-header-cell:first-of-type,.st-material-table table td.mat-mdc-cell:first-of-type,.st-material-table table td.mat-mdc-footer-cell:first-of-type{padding-left:12px}.st-material-table table th.mat-mdc-header-cell:last-of-type,.st-material-table table td.mat-mdc-cell:last-of-type,.st-material-table table td.mat-mdc-footer-cell:last-of-type{padding-right:12px}.st-material-table table thead tr{background-color:#fff9c4;height:40px!important}.st-material-table table thead tr th{border-color:#fdd835;font-size:.9rem;font-weight:600;color:#424242}.st-material-table table tbody{background-color:transparent!important}.st-material-table table tbody>tr{cursor:pointer}.st-material-table table tbody>tr.active{background-color:#a5d6a7}.st-material-table table tbody>tr.active td{border-bottom-color:#81c784!important}.st-material-table table tbody>tr:hover{background-color:#f5f5f5}.st-material-table table tbody>tr.disabled{cursor:not-allowed}.st-material-table table tbody>tr.disabled:hover{background-color:inherit!important}.st-material-table table tbody>tr.detail-row{height:0;cursor:default}.st-material-table table tbody>tr.detail-row:hover{background-color:transparent}.st-material-table table tbody>tr.detail-row .element-detail{overflow:hidden;display:flex}.st-material-table table tbody>tr.detail-row .element-detail p{padding:20px 0;margin-bottom:0;white-space:pre-wrap}.st-material-table table tbody>tr td i.active-row{color:#1b5e20;font-weight:700;font-size:25px;height:25px;width:25px;margin-top:2px}.st-material-table table tbody>tr td>div{max-height:200px;overflow:hidden;overflow-y:auto}.st-material-table table tbody>tr td a button{color:#000}.st-material-table table tbody>tr td a mat-icon{color:#333}.st-material-table table .mat-column-active{width:48px}.st-material-table table.no-hover tbody tr{cursor:default}.st-material-table table.no-hover tbody tr.active{background-color:transparent!important}.st-material-table table.no-hover tbody tr.active td{border-bottom-color:#0000001f!important}.st-material-table table.no-hover tbody tr:hover{background-color:transparent!important}.st-material-table table.no-hover tbody tr:hover td{border-bottom-color:#0000001f!important}.st-material-table table.admin-table .actions-cell{width:100px}.dark-theme .st-material-table table{background-color:transparent!important}.dark-theme .st-material-table table thead tr{background-color:#5e4803!important}.dark-theme .st-material-table table thead tr th{border-color:#816204!important;color:#e0e0e0!important}.dark-theme .st-material-table tbody tr:hover{background-color:var(--primeng-table-hover-background)!important}.dark-theme mat-paginator{background-color:transparent!important}.dark-theme .reorder-column-list .reorder-column-element{background-color:#424242!important;color:#eee!important}.dark-theme .reorder-column-list .reorder-column-element p,.dark-theme .reorder-column-list .reorder-column-element mat-icon{color:#eee!important}.dark-theme .filter .filter-title{color:#eee!important}\n"] }]
362
+ args: [{ selector: 'ngx-st-local-table', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"local-table\">\r\n <div class=\"row align-items-center\">\r\n @if (configurationsSettings || allowPickColumns) {\r\n <div class=\"col row align-items-center\" style=\"padding: 0\">\r\n @if (allowPickColumns) {\r\n <div class=\"col-auto\" style=\"padding: 0\">\r\n <button\r\n mat-icon-button\r\n class=\"col-auto\"\r\n [matMenuTriggerFor]=\"columnsMenu\"\r\n >\r\n <mat-icon> view_week </mat-icon>\r\n </button>\r\n <mat-menu #columnsMenu=\"matMenu\" xPosition=\"after\">\r\n @for (column of columnsArray; track column) {\r\n @if (!column.notShowInColumnPick) {\r\n <div mat-menu-item>\r\n <mat-checkbox\r\n [(ngModel)]=\"column.visible\"\r\n (ngModelChange)=\"columnVisibleChanged(column)\"\r\n style=\"margin-top: 5px\"\r\n (click)=\"$event.stopPropagation()\"\r\n >\r\n {{ column.translateColumnName }}\r\n </mat-checkbox>\r\n </div>\r\n }\r\n }\r\n </mat-menu>\r\n </div>\r\n }\r\n @if (configurationsSettings) {\r\n <st-configurations\r\n [configurationsSettings]=\"configurationsSettings\"\r\n [configurations]=\"configurations\"\r\n [initSelectedConfig]=\"initConfig\"\r\n (createNewConfig)=\"newConfigCreated($event)\"\r\n (removeConfig)=\"configRemoved($event)\"\r\n (changeConfig)=\"configChanged($event)\"\r\n ></st-configurations>\r\n }\r\n </div>\r\n }\r\n\r\n @if (globalSearchSettings?.show) {\r\n <div class=\"col\" style=\"padding: 0; margin-bottom: -15px\">\r\n <mat-form-field>\r\n <mat-label>{{ globalSearchSettings?.label || 'Search' }}</mat-label>\r\n <input matInput (keyup)=\"applySearch()\" [(ngModel)]=\"searchModel\" />\r\n <button\r\n matSuffix\r\n mat-icon-button\r\n aria-label=\"Clear\"\r\n (click)=\"clearSearch()\"\r\n >\r\n <mat-icon style=\"font-size: 22px\">close</mat-icon>\r\n </button>\r\n </mat-form-field>\r\n </div>\r\n }\r\n </div>\r\n\r\n <table\r\n [ngClass]=\"{ 'no-hover': !tableSettings?.rowClickAction }\"\r\n mat-table\r\n [dataSource]=\"tableSource\"\r\n matSort\r\n >\r\n @for (column of displayedColumns; track column) {\r\n <ng-container [matColumnDef]=\"column\">\r\n <th\r\n mat-header-cell\r\n *matHeaderCellDef\r\n style=\"{{\r\n columns[column].width ? 'width:' + columns[column].width : ''\r\n }}\"\r\n mat-sort-header\r\n [disabled]=\"!columns[column].sort\"\r\n >\r\n {{ columns[column].translateColumnName }}\r\n @if (columns[column].search) {\r\n <mat-icon\r\n class=\"search-icon\"\r\n [matMenuTriggerFor]=\"menu\"\r\n (click)=\"$event.stopPropagation()\"\r\n >\r\n search\r\n </mat-icon>\r\n }\r\n <mat-menu #menu=\"matMenu\" xPosition=\"before\">\r\n <mat-form-field class=\"col\">\r\n <mat-label>{{\r\n columns[column].searchLabel || 'Search'\r\n }}</mat-label>\r\n <input\r\n matInput\r\n (keyup)=\"applySearch()\"\r\n [(ngModel)]=\"searchModel\"\r\n (click)=\"$event.stopPropagation()\"\r\n />\r\n <button\r\n matSuffix\r\n mat-icon-button\r\n aria-label=\"Clear\"\r\n (click)=\"searchModel = ''\"\r\n >\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n </mat-form-field>\r\n </mat-menu>\r\n </th>\r\n <td\r\n mat-cell\r\n *matCellDef=\"let element\"\r\n style=\"{{\r\n columns[column].width ? 'width:' + columns[column].width : ''\r\n }}\"\r\n >\r\n @if (columns[column].actions && columns[column].actions!.length > 0) {\r\n <div\r\n class=\"actions-container\"\r\n style=\"overflow-y: hidden\"\r\n [ngClass]=\"{ 'justify-content-end': columns[column].flexRight }\"\r\n >\r\n @for (action of columns[column].actions; track action) {\r\n @if (checkIfActionVisible(element, action)) {\r\n @if (!action.url && action.action) {\r\n <button\r\n style=\"padding: 7px 7px; width: 40px; height: 40px\"\r\n class=\"col-auto\"\r\n mat-icon-button\r\n type=\"button\"\r\n matTooltip=\"{{ action.tooltipName || '' }}\"\r\n [matTooltipDisabled]=\"!!!action.tooltipName\"\r\n (click)=\"action.action(element)\"\r\n >\r\n <mat-icon>{{ action.iconName }}</mat-icon>\r\n </button>\r\n }\r\n @if (action.url) {\r\n <a [routerLink]=\"action.url\">\r\n <button\r\n class=\"col-auto\"\r\n mat-icon-button\r\n type=\"button\"\r\n matTooltip=\"{{ action.tooltipName || '' }}\"\r\n [matTooltipDisabled]=\"!!!action.tooltipName\"\r\n >\r\n <mat-icon>{{ action.iconName }}</mat-icon>\r\n </button>\r\n </a>\r\n }\r\n }\r\n }\r\n </div>\r\n }\r\n @if (!columns[column].actions) {\r\n @if (columns[column].translateValue) {\r\n <p style=\"margin: 0; padding: 0\">\r\n {{ columns[column].translateValue![element[column]] || '' }}\r\n </p>\r\n }\r\n @if (!columns[column].translateValue) {\r\n @if (!columns[column].type || columns[column].type === 'string') {\r\n <p style=\"margin: 0; padding: 0\">{{ element[column] }}</p>\r\n }\r\n @if (columns[column].type === 'date') {\r\n <p style=\"margin: 0; padding: 0\">\r\n {{ element[column] | stDateTimeFormatPipe }}\r\n </p>\r\n }\r\n }\r\n }\r\n </td>\r\n </ng-container>\r\n }\r\n\r\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\r\n <tr\r\n mat-row\r\n *matRowDef=\"let row; columns: displayedColumns\"\r\n (click)=\"\r\n tableSettings?.rowClickAction ? tableSettings.rowClickAction(row) : null\r\n \"\r\n ></tr>\r\n </table>\r\n <mat-paginator\r\n [pageIndex]=\"pageIndex\"\r\n [pageSizeOptions]=\"[5, 10, 15, 20, 25]\"\r\n (page)=\"pageChanged($event)\"\r\n [showFirstLastButtons]=\"true\"\r\n ></mat-paginator>\r\n</div>\r\n", styles: [".st-material-table .search-form button{height:40px}.st-material-table .search-form mat-form-field:first-child{padding-left:0}.st-material-table .search-form mat-form-field:last-child{padding-right:0}.st-material-table .search-form .clear{padding:0}.st-material-table .search-form .clear mat-icon{height:20px;width:20px;font-size:20px;cursor:pointer}.st-material-table table{width:100%;box-shadow:none}.st-material-table table th.mat-mdc-header-cell,.st-material-table table td.mat-mdc-cell,.st-material-table table td.mat-mdc-footer-cell{padding:0}.st-material-table table th.mat-mdc-header-cell:first-of-type,.st-material-table table td.mat-mdc-cell:first-of-type,.st-material-table table td.mat-mdc-footer-cell:first-of-type{padding-left:12px}.st-material-table table th.mat-mdc-header-cell:last-of-type,.st-material-table table td.mat-mdc-cell:last-of-type,.st-material-table table td.mat-mdc-footer-cell:last-of-type{padding-right:12px}.st-material-table table thead tr{background-color:#fff9c4;height:40px!important}.st-material-table table thead tr th{border-color:#fdd835;font-size:.9rem;font-weight:600;color:#424242}.st-material-table table tbody{background-color:transparent!important}.st-material-table table tbody>tr{cursor:pointer}.st-material-table table tbody>tr.active{background-color:#a5d6a7}.st-material-table table tbody>tr.active td{border-bottom-color:#81c784!important}.st-material-table table tbody>tr:hover{background-color:#f5f5f5}.st-material-table table tbody>tr.disabled{cursor:not-allowed}.st-material-table table tbody>tr.disabled:hover{background-color:inherit!important}.st-material-table table tbody>tr.detail-row{height:0;cursor:default}.st-material-table table tbody>tr.detail-row:hover{background-color:transparent}.st-material-table table tbody>tr.detail-row .element-detail{overflow:hidden;display:flex}.st-material-table table tbody>tr.detail-row .element-detail p{padding:20px 0;margin-bottom:0;white-space:pre-wrap}.st-material-table table tbody>tr td i.active-row{color:#1b5e20;font-weight:700;font-size:25px;height:25px;width:25px;margin-top:2px}.st-material-table table tbody>tr td>div{max-height:200px;overflow:hidden;overflow-y:auto}.st-material-table table tbody>tr td a button{color:#000}.st-material-table table tbody>tr td a mat-icon{color:#333}.st-material-table table .mat-column-active{width:48px}.st-material-table table.no-hover tbody tr{cursor:default}.st-material-table table.no-hover tbody tr.active{background-color:transparent!important}.st-material-table table.no-hover tbody tr.active td{border-bottom-color:#0000001f!important}.st-material-table table.no-hover tbody tr:hover{background-color:transparent!important}.st-material-table table.no-hover tbody tr:hover td{border-bottom-color:#0000001f!important}.st-material-table table.admin-table .actions-cell{width:100px}.dark-theme .st-material-table table{background-color:transparent!important}.dark-theme .st-material-table table thead tr{background-color:#5e4803!important}.dark-theme .st-material-table table thead tr th{border-color:#816204!important;color:#e0e0e0!important}.dark-theme .st-material-table tbody tr:hover{background-color:var(--primeng-table-hover-background)!important}.dark-theme mat-paginator{background-color:transparent!important}.dark-theme .reorder-column-list .reorder-column-element{background-color:#424242!important;color:#eee!important}.dark-theme .reorder-column-list .reorder-column-element p,.dark-theme .reorder-column-list .reorder-column-element mat-icon{color:#eee!important}.dark-theme .filter .filter-title{color:#eee!important}\n"] }]
362
363
  }], ctorParameters: () => [{ type: LocalTableService }, { type: i0.ChangeDetectorRef }, { type: i2$1.Router }, { type: i2$1.ActivatedRoute }], propDecorators: { paginator: [{
363
364
  type: ViewChild,
364
365
  args: [MatPaginator]
@@ -443,11 +444,11 @@ class SelectTableComponent {
443
444
  return !!this.rowSelected.find(activeRow => activeRow === row);
444
445
  }
445
446
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SelectTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
446
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: SelectTableComponent, selector: "ngx-st-select-table", inputs: { title: "title", required: "required", multiple: "multiple", initSelected: "initSelected", initSearchVal: "initSearchVal", searchLabel: "searchLabel", selectedLabel: "selectedLabel", setInitColumns: "setInitColumns", tableData: "tableData", validError: "validError" }, outputs: { returnRowSelected: "returnRowSelected" }, viewQueries: [{ propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true }], ngImport: i0, template: "<div class=\"shared-table-selector\">\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 <mat-icon (click)=\"clearSearch()\">clear</mat-icon>\n </div>\n </div>\n </div>\n\n <table mat-table [dataSource]=\"tableSource\">\n @for (col of columns; track col) {\n <ng-container [matColumnDef]=\"col\">\n <th mat-header-cell *matHeaderCellDef>\n {{ col === 'active' ? selectedLabel : initColumns[col] }}\n </th>\n <td mat-cell *matCellDef=\"let element\">\n @if (col === 'active') {\n @if (checkActiveRow(element)) {\n <mat-icon class=\"active-row\">done</mat-icon>\n }\n }\n @if (col !== 'active') {\n {{ element[col] }}\n }\n </td>\n </ng-container>\n }\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", ".st-material-table .search-form button{height:40px}.st-material-table .search-form mat-form-field:first-child{padding-left:0}.st-material-table .search-form mat-form-field:last-child{padding-right:0}.st-material-table .search-form .clear{padding:0}.st-material-table .search-form .clear mat-icon{height:20px;width:20px;font-size:20px;cursor:pointer}.st-material-table table{width:100%;box-shadow:none}.st-material-table table th.mat-mdc-header-cell,.st-material-table table td.mat-mdc-cell,.st-material-table table td.mat-mdc-footer-cell{padding:0}.st-material-table table th.mat-mdc-header-cell:first-of-type,.st-material-table table td.mat-mdc-cell:first-of-type,.st-material-table table td.mat-mdc-footer-cell:first-of-type{padding-left:12px}.st-material-table table th.mat-mdc-header-cell:last-of-type,.st-material-table table td.mat-mdc-cell:last-of-type,.st-material-table table td.mat-mdc-footer-cell:last-of-type{padding-right:12px}.st-material-table table thead tr{background-color:#fff9c4;height:40px!important}.st-material-table table thead tr th{border-color:#fdd835;font-size:.9rem;font-weight:600;color:#424242}.st-material-table table tbody{background-color:transparent!important}.st-material-table table tbody>tr{cursor:pointer}.st-material-table table tbody>tr.active{background-color:#a5d6a7}.st-material-table table tbody>tr.active td{border-bottom-color:#81c784!important}.st-material-table table tbody>tr:hover{background-color:#f5f5f5}.st-material-table table tbody>tr.disabled{cursor:not-allowed}.st-material-table table tbody>tr.disabled:hover{background-color:inherit!important}.st-material-table table tbody>tr.detail-row{height:0;cursor:default}.st-material-table table tbody>tr.detail-row:hover{background-color:transparent}.st-material-table table tbody>tr.detail-row .element-detail{overflow:hidden;display:flex}.st-material-table table tbody>tr.detail-row .element-detail p{padding:20px 0;margin-bottom:0;white-space:pre-wrap}.st-material-table table tbody>tr td i.active-row{color:#1b5e20;font-weight:700;font-size:25px;height:25px;width:25px;margin-top:2px}.st-material-table table tbody>tr td>div{max-height:200px;overflow:hidden;overflow-y:auto}.st-material-table table tbody>tr td a button{color:#000}.st-material-table table tbody>tr td a mat-icon{color:#333}.st-material-table table .mat-column-active{width:48px}.st-material-table table.no-hover tbody tr{cursor:default}.st-material-table table.no-hover tbody tr.active{background-color:transparent!important}.st-material-table table.no-hover tbody tr.active td{border-bottom-color:#0000001f!important}.st-material-table table.no-hover tbody tr:hover{background-color:transparent!important}.st-material-table table.no-hover tbody tr:hover td{border-bottom-color:#0000001f!important}.st-material-table table.admin-table .actions-cell{width:100px}.dark-theme .st-material-table table{background-color:transparent!important}.dark-theme .st-material-table table thead tr{background-color:#5e4803!important}.dark-theme .st-material-table table thead tr th{border-color:#816204!important;color:#e0e0e0!important}.dark-theme .st-material-table tbody tr:hover{background-color:var(--primeng-table-hover-background)!important}.dark-theme mat-paginator{background-color:transparent!important}.dark-theme .reorder-column-list .reorder-column-element{background-color:#424242!important;color:#eee!important}.dark-theme .reorder-column-list .reorder-column-element p,.dark-theme .reorder-column-list .reorder-column-element mat-icon{color:#eee!important}.dark-theme .filter .filter-title{color:#eee!important}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i3$1.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i3$1.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i3$1.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i3$1.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i3$1.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i3$1.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i3$1.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i3$1.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i3$1.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i3$1.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i4$1.MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6.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: i7.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: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] }); }
447
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: SelectTableComponent, selector: "ngx-st-select-table", inputs: { title: "title", required: "required", multiple: "multiple", initSelected: "initSelected", initSearchVal: "initSearchVal", searchLabel: "searchLabel", selectedLabel: "selectedLabel", setInitColumns: "setInitColumns", tableData: "tableData", validError: "validError" }, outputs: { returnRowSelected: "returnRowSelected" }, viewQueries: [{ propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true }], ngImport: i0, template: "<div class=\"shared-table-selector\">\r\n <p class=\"title\" [ngClass]=\"{ 'error-text': validError }\">\r\n {{ title }} {{ required ? '*' : '' }}\r\n </p>\r\n\r\n <div class=\"search-form row align-items-center\">\r\n <div class=\"col-sm-12 col-md row align-items-center\">\r\n <mat-form-field class=\"col\">\r\n <input\r\n matInput\r\n placeholder=\"{{ searchLabel }}\"\r\n [formControl]=\"search\"\r\n />\r\n </mat-form-field>\r\n <div class=\"clear col-auto\">\r\n <mat-icon (click)=\"clearSearch()\">clear</mat-icon>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <table mat-table [dataSource]=\"tableSource\">\r\n @for (col of columns; track col) {\r\n <ng-container [matColumnDef]=\"col\">\r\n <th mat-header-cell *matHeaderCellDef>\r\n {{ col === 'active' ? selectedLabel : initColumns[col] }}\r\n </th>\r\n <td mat-cell *matCellDef=\"let element\">\r\n @if (col === 'active') {\r\n @if (checkActiveRow(element)) {\r\n <mat-icon class=\"active-row\">done</mat-icon>\r\n }\r\n }\r\n @if (col !== 'active') {\r\n {{ element[col] }}\r\n }\r\n </td>\r\n </ng-container>\r\n }\r\n\r\n <tr mat-header-row *matHeaderRowDef=\"columns\"></tr>\r\n <tr\r\n mat-row\r\n *matRowDef=\"let row; columns: columns\"\r\n (click)=\"rowClick(row)\"\r\n [ngClass]=\"{ active: checkActiveRow(row) }\"\r\n ></tr>\r\n </table>\r\n <mat-paginator [pageSizeOptions]=\"[5]\"></mat-paginator>\r\n</div>\r\n", styles: [".title{margin-bottom:0;margin-top:1rem;font-weight:500}.title.error-text{color:#ef5350}\n", ".st-material-table .search-form button{height:40px}.st-material-table .search-form mat-form-field:first-child{padding-left:0}.st-material-table .search-form mat-form-field:last-child{padding-right:0}.st-material-table .search-form .clear{padding:0}.st-material-table .search-form .clear mat-icon{height:20px;width:20px;font-size:20px;cursor:pointer}.st-material-table table{width:100%;box-shadow:none}.st-material-table table th.mat-mdc-header-cell,.st-material-table table td.mat-mdc-cell,.st-material-table table td.mat-mdc-footer-cell{padding:0}.st-material-table table th.mat-mdc-header-cell:first-of-type,.st-material-table table td.mat-mdc-cell:first-of-type,.st-material-table table td.mat-mdc-footer-cell:first-of-type{padding-left:12px}.st-material-table table th.mat-mdc-header-cell:last-of-type,.st-material-table table td.mat-mdc-cell:last-of-type,.st-material-table table td.mat-mdc-footer-cell:last-of-type{padding-right:12px}.st-material-table table thead tr{background-color:#fff9c4;height:40px!important}.st-material-table table thead tr th{border-color:#fdd835;font-size:.9rem;font-weight:600;color:#424242}.st-material-table table tbody{background-color:transparent!important}.st-material-table table tbody>tr{cursor:pointer}.st-material-table table tbody>tr.active{background-color:#a5d6a7}.st-material-table table tbody>tr.active td{border-bottom-color:#81c784!important}.st-material-table table tbody>tr:hover{background-color:#f5f5f5}.st-material-table table tbody>tr.disabled{cursor:not-allowed}.st-material-table table tbody>tr.disabled:hover{background-color:inherit!important}.st-material-table table tbody>tr.detail-row{height:0;cursor:default}.st-material-table table tbody>tr.detail-row:hover{background-color:transparent}.st-material-table table tbody>tr.detail-row .element-detail{overflow:hidden;display:flex}.st-material-table table tbody>tr.detail-row .element-detail p{padding:20px 0;margin-bottom:0;white-space:pre-wrap}.st-material-table table tbody>tr td i.active-row{color:#1b5e20;font-weight:700;font-size:25px;height:25px;width:25px;margin-top:2px}.st-material-table table tbody>tr td>div{max-height:200px;overflow:hidden;overflow-y:auto}.st-material-table table tbody>tr td a button{color:#000}.st-material-table table tbody>tr td a mat-icon{color:#333}.st-material-table table .mat-column-active{width:48px}.st-material-table table.no-hover tbody tr{cursor:default}.st-material-table table.no-hover tbody tr.active{background-color:transparent!important}.st-material-table table.no-hover tbody tr.active td{border-bottom-color:#0000001f!important}.st-material-table table.no-hover tbody tr:hover{background-color:transparent!important}.st-material-table table.no-hover tbody tr:hover td{border-bottom-color:#0000001f!important}.st-material-table table.admin-table .actions-cell{width:100px}.dark-theme .st-material-table table{background-color:transparent!important}.dark-theme .st-material-table table thead tr{background-color:#5e4803!important}.dark-theme .st-material-table table thead tr th{border-color:#816204!important;color:#e0e0e0!important}.dark-theme .st-material-table tbody tr:hover{background-color:var(--primeng-table-hover-background)!important}.dark-theme mat-paginator{background-color:transparent!important}.dark-theme .reorder-column-list .reorder-column-element{background-color:#424242!important;color:#eee!important}.dark-theme .reorder-column-list .reorder-column-element p,.dark-theme .reorder-column-list .reorder-column-element mat-icon{color:#eee!important}.dark-theme .filter .filter-title{color:#eee!important}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i2.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: ["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$2.MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6.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: i7.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: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] }); }
447
448
  }
448
449
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SelectTableComponent, decorators: [{
449
450
  type: Component,
450
- 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 <mat-icon (click)=\"clearSearch()\">clear</mat-icon>\n </div>\n </div>\n </div>\n\n <table mat-table [dataSource]=\"tableSource\">\n @for (col of columns; track col) {\n <ng-container [matColumnDef]=\"col\">\n <th mat-header-cell *matHeaderCellDef>\n {{ col === 'active' ? selectedLabel : initColumns[col] }}\n </th>\n <td mat-cell *matCellDef=\"let element\">\n @if (col === 'active') {\n @if (checkActiveRow(element)) {\n <mat-icon class=\"active-row\">done</mat-icon>\n }\n }\n @if (col !== 'active') {\n {{ element[col] }}\n }\n </td>\n </ng-container>\n }\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", ".st-material-table .search-form button{height:40px}.st-material-table .search-form mat-form-field:first-child{padding-left:0}.st-material-table .search-form mat-form-field:last-child{padding-right:0}.st-material-table .search-form .clear{padding:0}.st-material-table .search-form .clear mat-icon{height:20px;width:20px;font-size:20px;cursor:pointer}.st-material-table table{width:100%;box-shadow:none}.st-material-table table th.mat-mdc-header-cell,.st-material-table table td.mat-mdc-cell,.st-material-table table td.mat-mdc-footer-cell{padding:0}.st-material-table table th.mat-mdc-header-cell:first-of-type,.st-material-table table td.mat-mdc-cell:first-of-type,.st-material-table table td.mat-mdc-footer-cell:first-of-type{padding-left:12px}.st-material-table table th.mat-mdc-header-cell:last-of-type,.st-material-table table td.mat-mdc-cell:last-of-type,.st-material-table table td.mat-mdc-footer-cell:last-of-type{padding-right:12px}.st-material-table table thead tr{background-color:#fff9c4;height:40px!important}.st-material-table table thead tr th{border-color:#fdd835;font-size:.9rem;font-weight:600;color:#424242}.st-material-table table tbody{background-color:transparent!important}.st-material-table table tbody>tr{cursor:pointer}.st-material-table table tbody>tr.active{background-color:#a5d6a7}.st-material-table table tbody>tr.active td{border-bottom-color:#81c784!important}.st-material-table table tbody>tr:hover{background-color:#f5f5f5}.st-material-table table tbody>tr.disabled{cursor:not-allowed}.st-material-table table tbody>tr.disabled:hover{background-color:inherit!important}.st-material-table table tbody>tr.detail-row{height:0;cursor:default}.st-material-table table tbody>tr.detail-row:hover{background-color:transparent}.st-material-table table tbody>tr.detail-row .element-detail{overflow:hidden;display:flex}.st-material-table table tbody>tr.detail-row .element-detail p{padding:20px 0;margin-bottom:0;white-space:pre-wrap}.st-material-table table tbody>tr td i.active-row{color:#1b5e20;font-weight:700;font-size:25px;height:25px;width:25px;margin-top:2px}.st-material-table table tbody>tr td>div{max-height:200px;overflow:hidden;overflow-y:auto}.st-material-table table tbody>tr td a button{color:#000}.st-material-table table tbody>tr td a mat-icon{color:#333}.st-material-table table .mat-column-active{width:48px}.st-material-table table.no-hover tbody tr{cursor:default}.st-material-table table.no-hover tbody tr.active{background-color:transparent!important}.st-material-table table.no-hover tbody tr.active td{border-bottom-color:#0000001f!important}.st-material-table table.no-hover tbody tr:hover{background-color:transparent!important}.st-material-table table.no-hover tbody tr:hover td{border-bottom-color:#0000001f!important}.st-material-table table.admin-table .actions-cell{width:100px}.dark-theme .st-material-table table{background-color:transparent!important}.dark-theme .st-material-table table thead tr{background-color:#5e4803!important}.dark-theme .st-material-table table thead tr th{border-color:#816204!important;color:#e0e0e0!important}.dark-theme .st-material-table tbody tr:hover{background-color:var(--primeng-table-hover-background)!important}.dark-theme mat-paginator{background-color:transparent!important}.dark-theme .reorder-column-list .reorder-column-element{background-color:#424242!important;color:#eee!important}.dark-theme .reorder-column-list .reorder-column-element p,.dark-theme .reorder-column-list .reorder-column-element mat-icon{color:#eee!important}.dark-theme .filter .filter-title{color:#eee!important}\n"] }]
451
+ args: [{ selector: 'ngx-st-select-table', template: "<div class=\"shared-table-selector\">\r\n <p class=\"title\" [ngClass]=\"{ 'error-text': validError }\">\r\n {{ title }} {{ required ? '*' : '' }}\r\n </p>\r\n\r\n <div class=\"search-form row align-items-center\">\r\n <div class=\"col-sm-12 col-md row align-items-center\">\r\n <mat-form-field class=\"col\">\r\n <input\r\n matInput\r\n placeholder=\"{{ searchLabel }}\"\r\n [formControl]=\"search\"\r\n />\r\n </mat-form-field>\r\n <div class=\"clear col-auto\">\r\n <mat-icon (click)=\"clearSearch()\">clear</mat-icon>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <table mat-table [dataSource]=\"tableSource\">\r\n @for (col of columns; track col) {\r\n <ng-container [matColumnDef]=\"col\">\r\n <th mat-header-cell *matHeaderCellDef>\r\n {{ col === 'active' ? selectedLabel : initColumns[col] }}\r\n </th>\r\n <td mat-cell *matCellDef=\"let element\">\r\n @if (col === 'active') {\r\n @if (checkActiveRow(element)) {\r\n <mat-icon class=\"active-row\">done</mat-icon>\r\n }\r\n }\r\n @if (col !== 'active') {\r\n {{ element[col] }}\r\n }\r\n </td>\r\n </ng-container>\r\n }\r\n\r\n <tr mat-header-row *matHeaderRowDef=\"columns\"></tr>\r\n <tr\r\n mat-row\r\n *matRowDef=\"let row; columns: columns\"\r\n (click)=\"rowClick(row)\"\r\n [ngClass]=\"{ active: checkActiveRow(row) }\"\r\n ></tr>\r\n </table>\r\n <mat-paginator [pageSizeOptions]=\"[5]\"></mat-paginator>\r\n</div>\r\n", styles: [".title{margin-bottom:0;margin-top:1rem;font-weight:500}.title.error-text{color:#ef5350}\n", ".st-material-table .search-form button{height:40px}.st-material-table .search-form mat-form-field:first-child{padding-left:0}.st-material-table .search-form mat-form-field:last-child{padding-right:0}.st-material-table .search-form .clear{padding:0}.st-material-table .search-form .clear mat-icon{height:20px;width:20px;font-size:20px;cursor:pointer}.st-material-table table{width:100%;box-shadow:none}.st-material-table table th.mat-mdc-header-cell,.st-material-table table td.mat-mdc-cell,.st-material-table table td.mat-mdc-footer-cell{padding:0}.st-material-table table th.mat-mdc-header-cell:first-of-type,.st-material-table table td.mat-mdc-cell:first-of-type,.st-material-table table td.mat-mdc-footer-cell:first-of-type{padding-left:12px}.st-material-table table th.mat-mdc-header-cell:last-of-type,.st-material-table table td.mat-mdc-cell:last-of-type,.st-material-table table td.mat-mdc-footer-cell:last-of-type{padding-right:12px}.st-material-table table thead tr{background-color:#fff9c4;height:40px!important}.st-material-table table thead tr th{border-color:#fdd835;font-size:.9rem;font-weight:600;color:#424242}.st-material-table table tbody{background-color:transparent!important}.st-material-table table tbody>tr{cursor:pointer}.st-material-table table tbody>tr.active{background-color:#a5d6a7}.st-material-table table tbody>tr.active td{border-bottom-color:#81c784!important}.st-material-table table tbody>tr:hover{background-color:#f5f5f5}.st-material-table table tbody>tr.disabled{cursor:not-allowed}.st-material-table table tbody>tr.disabled:hover{background-color:inherit!important}.st-material-table table tbody>tr.detail-row{height:0;cursor:default}.st-material-table table tbody>tr.detail-row:hover{background-color:transparent}.st-material-table table tbody>tr.detail-row .element-detail{overflow:hidden;display:flex}.st-material-table table tbody>tr.detail-row .element-detail p{padding:20px 0;margin-bottom:0;white-space:pre-wrap}.st-material-table table tbody>tr td i.active-row{color:#1b5e20;font-weight:700;font-size:25px;height:25px;width:25px;margin-top:2px}.st-material-table table tbody>tr td>div{max-height:200px;overflow:hidden;overflow-y:auto}.st-material-table table tbody>tr td a button{color:#000}.st-material-table table tbody>tr td a mat-icon{color:#333}.st-material-table table .mat-column-active{width:48px}.st-material-table table.no-hover tbody tr{cursor:default}.st-material-table table.no-hover tbody tr.active{background-color:transparent!important}.st-material-table table.no-hover tbody tr.active td{border-bottom-color:#0000001f!important}.st-material-table table.no-hover tbody tr:hover{background-color:transparent!important}.st-material-table table.no-hover tbody tr:hover td{border-bottom-color:#0000001f!important}.st-material-table table.admin-table .actions-cell{width:100px}.dark-theme .st-material-table table{background-color:transparent!important}.dark-theme .st-material-table table thead tr{background-color:#5e4803!important}.dark-theme .st-material-table table thead tr th{border-color:#816204!important;color:#e0e0e0!important}.dark-theme .st-material-table tbody tr:hover{background-color:var(--primeng-table-hover-background)!important}.dark-theme mat-paginator{background-color:transparent!important}.dark-theme .reorder-column-list .reorder-column-element{background-color:#424242!important;color:#eee!important}.dark-theme .reorder-column-list .reorder-column-element p,.dark-theme .reorder-column-list .reorder-column-element mat-icon{color:#eee!important}.dark-theme .filter .filter-title{color:#eee!important}\n"] }]
451
452
  }], ctorParameters: () => [], propDecorators: { paginator: [{
452
453
  type: ViewChild,
453
454
  args: [MatPaginator]
@@ -559,7 +560,7 @@ class MaterialTableOrderColumnDialogComponent {
559
560
  });
560
561
  }
561
562
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MaterialTableOrderColumnDialogComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: i1.MatDialogRef }], target: i0.ɵɵFactoryTarget.Component }); }
562
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: MaterialTableOrderColumnDialogComponent, selector: "st-material-table-order-column-dialog", ngImport: i0, template: "<h3 mat-dialog-title>Reorder Columns</h3>\r\n<mat-dialog-content>\r\n <div\r\n cdkDropList\r\n class=\"reorder-column-list\"\r\n (cdkDropListDropped)=\"drop($event)\"\r\n >\r\n @for (column of columns; track column.field) {\r\n <div class=\"reorder-column-element\" cdkDrag>\r\n <div class=\"row\">\r\n <mat-icon>drag_indicator</mat-icon>\r\n <p>{{ column.selectColumnLabel || column.header }}</p>\r\n </div>\r\n @if (!column.visible) {\r\n <mat-icon class=\"column-hidden\">visibility_off</mat-icon>\r\n }\r\n </div>\r\n }\r\n </div>\r\n</mat-dialog-content>\r\n<mat-dialog-actions>\r\n <div class=\"row justify-content-between\" style=\"width: 100%\">\r\n <button mat-flat-button mat-dialog-close>Cancel</button>\r\n <button mat-flat-button color=\"accent\" (click)=\"saveOrder()\">Save</button>\r\n </div>\r\n</mat-dialog-actions>\r\n", styles: [".reorder-column-list{width:100%;border:solid 1px #ccc}.reorder-column-list .reorder-column-element{width:100%;padding:10px;border-bottom:solid 1px #ccc;color:#000000de;display:flex;flex-direction:row;align-items:center;justify-content:space-between;box-sizing:border-box;cursor:move;background:#fff}.reorder-column-list .reorder-column-element:last-child{border-bottom:none}.reorder-column-list .reorder-column-element .column-hidden{opacity:.3}.reorder-column-list .reorder-column-element p{margin-bottom:0;font-size:1.1rem}.cdk-drag-preview{overflow-y:hidden;padding:10px;border:none;box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag-preview p{margin-top:5px}.cdk-drag-preview mat-icon{display:none}.cdk-drag-placeholder{opacity:0}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}.reorder-column-element:last-child{border:none}.reorder-column-list.cdk-drop-list-dragging .reorder-column-element:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}\n"], dependencies: [{ kind: "component", type: i4.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i4$2.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i4$2.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }] }); }
563
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: MaterialTableOrderColumnDialogComponent, selector: "st-material-table-order-column-dialog", ngImport: i0, template: "<h3 mat-dialog-title>Reorder Columns</h3>\r\n<mat-dialog-content>\r\n <div\r\n cdkDropList\r\n class=\"reorder-column-list\"\r\n (cdkDropListDropped)=\"drop($event)\"\r\n >\r\n @for (column of columns; track column.field) {\r\n <div class=\"reorder-column-element\" cdkDrag>\r\n <div class=\"row\">\r\n <mat-icon>drag_indicator</mat-icon>\r\n <p>{{ column.selectColumnLabel || column.header }}</p>\r\n </div>\r\n @if (!column.visible) {\r\n <mat-icon class=\"column-hidden\">visibility_off</mat-icon>\r\n }\r\n </div>\r\n }\r\n </div>\r\n</mat-dialog-content>\r\n<mat-dialog-actions>\r\n <div class=\"row justify-content-between\" style=\"width: 100%\">\r\n <button mat-flat-button mat-dialog-close>Cancel</button>\r\n <button mat-flat-button color=\"accent\" (click)=\"saveOrder()\">Save</button>\r\n </div>\r\n</mat-dialog-actions>\r\n", styles: [".reorder-column-list{width:100%;border:solid 1px #ccc}.reorder-column-list .reorder-column-element{width:100%;padding:10px;border-bottom:solid 1px #ccc;color:#000000de;display:flex;flex-direction:row;align-items:center;justify-content:space-between;box-sizing:border-box;cursor:move;background:#fff}.reorder-column-list .reorder-column-element:last-child{border-bottom:none}.reorder-column-list .reorder-column-element .column-hidden{opacity:.3}.reorder-column-list .reorder-column-element p{margin-bottom:0;font-size:1.1rem}.cdk-drag-preview{overflow-y:hidden;padding:10px;border:none;box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag-preview p{margin-top:5px}.cdk-drag-preview mat-icon{display:none}.cdk-drag-placeholder{opacity:0}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}.reorder-column-element:last-child{border:none}.reorder-column-list.cdk-drop-list-dragging .reorder-column-element:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}\n"], dependencies: [{ kind: "component", type: i4.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i4$1.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i4$1.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }] }); }
563
564
  }
564
565
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MaterialTableOrderColumnDialogComponent, decorators: [{
565
566
  type: Component,
@@ -679,11 +680,11 @@ class MaterialTableCaptionComponent extends StSubscribeDestroyComponent {
679
680
  filtersKeys.filter(key => this.filters[key]).length || 0;
680
681
  }
681
682
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MaterialTableCaptionComponent, deps: [{ token: i1.MatDialog }], target: i0.ɵɵFactoryTarget.Component }); }
682
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: MaterialTableCaptionComponent, selector: "st-material-table-caption", inputs: { showGlobalSearch: "showGlobalSearch", tableTitle: "tableTitle", allowPickColumns: "allowPickColumns", allowReorderColumns: "allowReorderColumns", initGlobalSearch: "initGlobalSearch", initFilters: "initFilters", columns: "columns" }, outputs: { captionDataChanged: "captionDataChanged", resetTableSettings: "resetTableSettings" }, usesInheritance: true, ngImport: i0, template: "@if (\r\n allowPickColumns ||\r\n tableTitle ||\r\n allowReorderColumns ||\r\n showGlobalSearch ||\r\n showFilterButton\r\n) {\r\n <div\r\n class=\"st-material-table-caption row align-items-center\"\r\n [ngClass]=\"{\r\n 'justify-content-between':\r\n (allowPickColumns || tableTitle || allowReorderColumns) &&\r\n (showGlobalSearch || showFilterButton),\r\n 'justify-content-end':\r\n !allowPickColumns && !tableTitle && !allowReorderColumns\r\n }\"\r\n >\r\n @if (allowPickColumns || tableTitle || allowReorderColumns) {\r\n <div class=\"col-auto d-flex align-items-center\">\r\n @if (tableTitle) {\r\n <p class=\"table-title\">{{ tableTitle }}</p>\r\n }\r\n\r\n @if (allowPickColumns) {\r\n <mat-form-field appearance=\"outline\">\r\n <mat-select [formControl]=\"selectedColumns\" multiple>\r\n <mat-select-trigger>\r\n {{ selectedColumns.value ? selectedColumns.value.length : 0 }}\r\n columns selected\r\n </mat-select-trigger>\r\n @for (column of columns; track column.field) {\r\n <mat-option [value]=\"column.field\">{{\r\n column.selectColumnLabel || column.header\r\n }}</mat-option>\r\n }\r\n </mat-select>\r\n </mat-form-field>\r\n }\r\n\r\n @if (allowPickColumns || tableTitle) {\r\n <button mat-icon-button (click)=\"resetTable()\">\r\n <mat-icon class=\"reorder-icon\">refresh</mat-icon>\r\n </button>\r\n }\r\n\r\n @if (allowReorderColumns) {\r\n <button mat-icon-button (click)=\"openReorderColumnsDialog()\">\r\n <mat-icon class=\"reorder-icon\">low_priority</mat-icon>\r\n </button>\r\n }\r\n </div>\r\n }\r\n\r\n @if (showGlobalSearch || showFilterButton) {\r\n <div class=\"col-auto d-flex align-items-center\">\r\n @if (showFilterButton) {\r\n <!-- @if (activeFiltersCount) {-->\r\n <!-- <button-->\r\n <!-- mat-icon-button-->\r\n <!-- (click)=\"clearAllFilters()\"-->\r\n <!-- [matTooltip]=\"'Clear Filters'\"-->\r\n <!-- >-->\r\n <!-- <mat-icon>filter_alt_off</mat-icon>-->\r\n <!-- </button>-->\r\n <!-- }-->\r\n\r\n <button mat-icon-button (click)=\"openFilterDialog()\">\r\n <mat-icon\r\n [matBadge]=\"activeFiltersCount\"\r\n [matBadgeHidden]=\"!activeFiltersCount\"\r\n [matBadgeSize]=\"'small'\"\r\n matBadgePosition=\"before\"\r\n >filter_alt</mat-icon\r\n >\r\n </button>\r\n }\r\n\r\n @if (showGlobalSearch) {\r\n <mat-form-field appearance=\"outline\">\r\n <input\r\n matInput\r\n [formControl]=\"globalSearch\"\r\n [placeholder]=\"'Search'\"\r\n />\r\n <button\r\n matSuffix\r\n mat-icon-button\r\n aria-label=\"Clear\"\r\n (click)=\"globalSearch.setValue('')\"\r\n >\r\n <mat-icon style=\"font-size: 22px\">close</mat-icon>\r\n </button>\r\n </mat-form-field>\r\n }\r\n </div>\r\n }\r\n </div>\r\n}\r\n", styles: [".st-material-table-caption{width:100%;margin-top:5px;padding:0 5px;min-height:48px}.st-material-table-caption>.col-auto{padding:0}.st-material-table-caption .table-title{font-size:1.4rem;margin-bottom:0}.st-material-table-caption .reorder-icon{transform:scaleX(-1) rotate(90deg)}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i4.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: i6.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: i7.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: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i8$1.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "directive", type: i8$1.MatSelectTrigger, selector: "mat-select-trigger" }, { kind: "component", type: i7$1.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: i10$1.MatBadge, selector: "[matBadge]", inputs: ["matBadgeColor", "matBadgeOverlap", "matBadgeDisabled", "matBadgePosition", "matBadge", "matBadgeDescription", "matBadgeSize", "matBadgeHidden"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
683
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: MaterialTableCaptionComponent, selector: "st-material-table-caption", inputs: { showGlobalSearch: "showGlobalSearch", tableTitle: "tableTitle", allowPickColumns: "allowPickColumns", allowReorderColumns: "allowReorderColumns", initGlobalSearch: "initGlobalSearch", initFilters: "initFilters", columns: "columns" }, outputs: { captionDataChanged: "captionDataChanged", resetTableSettings: "resetTableSettings" }, usesInheritance: true, ngImport: i0, template: "@if (\r\n allowPickColumns ||\r\n tableTitle ||\r\n allowReorderColumns ||\r\n showGlobalSearch ||\r\n showFilterButton\r\n) {\r\n <div\r\n class=\"st-material-table-caption row align-items-center\"\r\n [ngClass]=\"{\r\n 'justify-content-between':\r\n (allowPickColumns || tableTitle || allowReorderColumns) &&\r\n (showGlobalSearch || showFilterButton),\r\n 'justify-content-end':\r\n !allowPickColumns && !tableTitle && !allowReorderColumns\r\n }\"\r\n >\r\n @if (allowPickColumns || tableTitle || allowReorderColumns) {\r\n <div class=\"col-auto d-flex align-items-center\">\r\n @if (tableTitle) {\r\n <p class=\"table-title\">{{ tableTitle }}</p>\r\n }\r\n\r\n @if (allowPickColumns) {\r\n <mat-form-field appearance=\"outline\">\r\n <mat-select [formControl]=\"selectedColumns\" multiple>\r\n <mat-select-trigger>\r\n {{ selectedColumns.value ? selectedColumns.value!.length : 0 }}\r\n columns selected\r\n </mat-select-trigger>\r\n @for (column of columns; track column.field) {\r\n <mat-option [value]=\"column.field\">{{\r\n column.selectColumnLabel || column.header\r\n }}</mat-option>\r\n }\r\n </mat-select>\r\n </mat-form-field>\r\n }\r\n\r\n @if (allowPickColumns || tableTitle) {\r\n <button mat-icon-button (click)=\"resetTable()\">\r\n <mat-icon class=\"reorder-icon\">refresh</mat-icon>\r\n </button>\r\n }\r\n\r\n @if (allowReorderColumns) {\r\n <button mat-icon-button (click)=\"openReorderColumnsDialog()\">\r\n <mat-icon class=\"reorder-icon\">low_priority</mat-icon>\r\n </button>\r\n }\r\n </div>\r\n }\r\n\r\n @if (showGlobalSearch || showFilterButton) {\r\n <div class=\"col-auto d-flex align-items-center\">\r\n @if (showFilterButton) {\r\n <!-- @if (activeFiltersCount) {-->\r\n <!-- <button-->\r\n <!-- mat-icon-button-->\r\n <!-- (click)=\"clearAllFilters()\"-->\r\n <!-- [matTooltip]=\"'Clear Filters'\"-->\r\n <!-- >-->\r\n <!-- <mat-icon>filter_alt_off</mat-icon>-->\r\n <!-- </button>-->\r\n <!-- }-->\r\n\r\n <button mat-icon-button (click)=\"openFilterDialog()\">\r\n <mat-icon\r\n [matBadge]=\"activeFiltersCount\"\r\n [matBadgeHidden]=\"!activeFiltersCount\"\r\n [matBadgeSize]=\"'small'\"\r\n matBadgePosition=\"before\"\r\n >filter_alt</mat-icon\r\n >\r\n </button>\r\n }\r\n\r\n @if (showGlobalSearch) {\r\n <mat-form-field appearance=\"outline\">\r\n <input\r\n matInput\r\n [formControl]=\"globalSearch\"\r\n [placeholder]=\"'Search'\"\r\n />\r\n <button\r\n matSuffix\r\n mat-icon-button\r\n aria-label=\"Clear\"\r\n (click)=\"globalSearch.setValue('')\"\r\n >\r\n <mat-icon style=\"font-size: 22px\">close</mat-icon>\r\n </button>\r\n </mat-form-field>\r\n }\r\n </div>\r\n }\r\n </div>\r\n}\r\n", styles: [".st-material-table-caption{width:100%;margin-top:5px;padding:0 5px;min-height:48px}.st-material-table-caption>.col-auto{padding:0}.st-material-table-caption .table-title{font-size:1.4rem;margin-bottom:0}.st-material-table-caption .reorder-icon{transform:scaleX(-1) rotate(90deg)}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i4.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: i6.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: i7.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: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i8$1.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "directive", type: i8$1.MatSelectTrigger, selector: "mat-select-trigger" }, { kind: "component", type: i7$1.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: i10$1.MatBadge, selector: "[matBadge]", inputs: ["matBadgeColor", "matBadgeOverlap", "matBadgeDisabled", "matBadgePosition", "matBadge", "matBadgeDescription", "matBadgeSize", "matBadgeHidden"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
683
684
  }
684
685
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MaterialTableCaptionComponent, decorators: [{
685
686
  type: Component,
686
- args: [{ selector: 'st-material-table-caption', changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (\r\n allowPickColumns ||\r\n tableTitle ||\r\n allowReorderColumns ||\r\n showGlobalSearch ||\r\n showFilterButton\r\n) {\r\n <div\r\n class=\"st-material-table-caption row align-items-center\"\r\n [ngClass]=\"{\r\n 'justify-content-between':\r\n (allowPickColumns || tableTitle || allowReorderColumns) &&\r\n (showGlobalSearch || showFilterButton),\r\n 'justify-content-end':\r\n !allowPickColumns && !tableTitle && !allowReorderColumns\r\n }\"\r\n >\r\n @if (allowPickColumns || tableTitle || allowReorderColumns) {\r\n <div class=\"col-auto d-flex align-items-center\">\r\n @if (tableTitle) {\r\n <p class=\"table-title\">{{ tableTitle }}</p>\r\n }\r\n\r\n @if (allowPickColumns) {\r\n <mat-form-field appearance=\"outline\">\r\n <mat-select [formControl]=\"selectedColumns\" multiple>\r\n <mat-select-trigger>\r\n {{ selectedColumns.value ? selectedColumns.value.length : 0 }}\r\n columns selected\r\n </mat-select-trigger>\r\n @for (column of columns; track column.field) {\r\n <mat-option [value]=\"column.field\">{{\r\n column.selectColumnLabel || column.header\r\n }}</mat-option>\r\n }\r\n </mat-select>\r\n </mat-form-field>\r\n }\r\n\r\n @if (allowPickColumns || tableTitle) {\r\n <button mat-icon-button (click)=\"resetTable()\">\r\n <mat-icon class=\"reorder-icon\">refresh</mat-icon>\r\n </button>\r\n }\r\n\r\n @if (allowReorderColumns) {\r\n <button mat-icon-button (click)=\"openReorderColumnsDialog()\">\r\n <mat-icon class=\"reorder-icon\">low_priority</mat-icon>\r\n </button>\r\n }\r\n </div>\r\n }\r\n\r\n @if (showGlobalSearch || showFilterButton) {\r\n <div class=\"col-auto d-flex align-items-center\">\r\n @if (showFilterButton) {\r\n <!-- @if (activeFiltersCount) {-->\r\n <!-- <button-->\r\n <!-- mat-icon-button-->\r\n <!-- (click)=\"clearAllFilters()\"-->\r\n <!-- [matTooltip]=\"'Clear Filters'\"-->\r\n <!-- >-->\r\n <!-- <mat-icon>filter_alt_off</mat-icon>-->\r\n <!-- </button>-->\r\n <!-- }-->\r\n\r\n <button mat-icon-button (click)=\"openFilterDialog()\">\r\n <mat-icon\r\n [matBadge]=\"activeFiltersCount\"\r\n [matBadgeHidden]=\"!activeFiltersCount\"\r\n [matBadgeSize]=\"'small'\"\r\n matBadgePosition=\"before\"\r\n >filter_alt</mat-icon\r\n >\r\n </button>\r\n }\r\n\r\n @if (showGlobalSearch) {\r\n <mat-form-field appearance=\"outline\">\r\n <input\r\n matInput\r\n [formControl]=\"globalSearch\"\r\n [placeholder]=\"'Search'\"\r\n />\r\n <button\r\n matSuffix\r\n mat-icon-button\r\n aria-label=\"Clear\"\r\n (click)=\"globalSearch.setValue('')\"\r\n >\r\n <mat-icon style=\"font-size: 22px\">close</mat-icon>\r\n </button>\r\n </mat-form-field>\r\n }\r\n </div>\r\n }\r\n </div>\r\n}\r\n", styles: [".st-material-table-caption{width:100%;margin-top:5px;padding:0 5px;min-height:48px}.st-material-table-caption>.col-auto{padding:0}.st-material-table-caption .table-title{font-size:1.4rem;margin-bottom:0}.st-material-table-caption .reorder-icon{transform:scaleX(-1) rotate(90deg)}\n"] }]
687
+ args: [{ selector: 'st-material-table-caption', changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (\r\n allowPickColumns ||\r\n tableTitle ||\r\n allowReorderColumns ||\r\n showGlobalSearch ||\r\n showFilterButton\r\n) {\r\n <div\r\n class=\"st-material-table-caption row align-items-center\"\r\n [ngClass]=\"{\r\n 'justify-content-between':\r\n (allowPickColumns || tableTitle || allowReorderColumns) &&\r\n (showGlobalSearch || showFilterButton),\r\n 'justify-content-end':\r\n !allowPickColumns && !tableTitle && !allowReorderColumns\r\n }\"\r\n >\r\n @if (allowPickColumns || tableTitle || allowReorderColumns) {\r\n <div class=\"col-auto d-flex align-items-center\">\r\n @if (tableTitle) {\r\n <p class=\"table-title\">{{ tableTitle }}</p>\r\n }\r\n\r\n @if (allowPickColumns) {\r\n <mat-form-field appearance=\"outline\">\r\n <mat-select [formControl]=\"selectedColumns\" multiple>\r\n <mat-select-trigger>\r\n {{ selectedColumns.value ? selectedColumns.value!.length : 0 }}\r\n columns selected\r\n </mat-select-trigger>\r\n @for (column of columns; track column.field) {\r\n <mat-option [value]=\"column.field\">{{\r\n column.selectColumnLabel || column.header\r\n }}</mat-option>\r\n }\r\n </mat-select>\r\n </mat-form-field>\r\n }\r\n\r\n @if (allowPickColumns || tableTitle) {\r\n <button mat-icon-button (click)=\"resetTable()\">\r\n <mat-icon class=\"reorder-icon\">refresh</mat-icon>\r\n </button>\r\n }\r\n\r\n @if (allowReorderColumns) {\r\n <button mat-icon-button (click)=\"openReorderColumnsDialog()\">\r\n <mat-icon class=\"reorder-icon\">low_priority</mat-icon>\r\n </button>\r\n }\r\n </div>\r\n }\r\n\r\n @if (showGlobalSearch || showFilterButton) {\r\n <div class=\"col-auto d-flex align-items-center\">\r\n @if (showFilterButton) {\r\n <!-- @if (activeFiltersCount) {-->\r\n <!-- <button-->\r\n <!-- mat-icon-button-->\r\n <!-- (click)=\"clearAllFilters()\"-->\r\n <!-- [matTooltip]=\"'Clear Filters'\"-->\r\n <!-- >-->\r\n <!-- <mat-icon>filter_alt_off</mat-icon>-->\r\n <!-- </button>-->\r\n <!-- }-->\r\n\r\n <button mat-icon-button (click)=\"openFilterDialog()\">\r\n <mat-icon\r\n [matBadge]=\"activeFiltersCount\"\r\n [matBadgeHidden]=\"!activeFiltersCount\"\r\n [matBadgeSize]=\"'small'\"\r\n matBadgePosition=\"before\"\r\n >filter_alt</mat-icon\r\n >\r\n </button>\r\n }\r\n\r\n @if (showGlobalSearch) {\r\n <mat-form-field appearance=\"outline\">\r\n <input\r\n matInput\r\n [formControl]=\"globalSearch\"\r\n [placeholder]=\"'Search'\"\r\n />\r\n <button\r\n matSuffix\r\n mat-icon-button\r\n aria-label=\"Clear\"\r\n (click)=\"globalSearch.setValue('')\"\r\n >\r\n <mat-icon style=\"font-size: 22px\">close</mat-icon>\r\n </button>\r\n </mat-form-field>\r\n }\r\n </div>\r\n }\r\n </div>\r\n}\r\n", styles: [".st-material-table-caption{width:100%;margin-top:5px;padding:0 5px;min-height:48px}.st-material-table-caption>.col-auto{padding:0}.st-material-table-caption .table-title{font-size:1.4rem;margin-bottom:0}.st-material-table-caption .reorder-icon{transform:scaleX(-1) rotate(90deg)}\n"] }]
687
688
  }], ctorParameters: () => [{ type: i1.MatDialog }], propDecorators: { showGlobalSearch: [{
688
689
  type: Input
689
690
  }], tableTitle: [{
@@ -714,9 +715,11 @@ class MaterialTableRowCellComponent {
714
715
  constructor(changeDetectorRef) {
715
716
  this.changeDetectorRef = changeDetectorRef;
716
717
  this._rowEditing = false;
718
+ this.rowIsSelected = false;
717
719
  this.saveEditRowEmitter = new EventEmitter();
718
720
  this.cancelEditRowEmitter = new EventEmitter();
719
721
  this.editRowEmitter = new EventEmitter();
722
+ this.selectRowChange = new EventEmitter();
720
723
  this.mobileView = false;
721
724
  this.actionIconColorDef = {
722
725
  edit: 'primary',
@@ -737,16 +740,21 @@ class MaterialTableRowCellComponent {
737
740
  editRow() {
738
741
  this.editRowEmitter.emit();
739
742
  }
743
+ selectRow(event) {
744
+ if (event) {
745
+ this.selectRowChange.emit(event.checked);
746
+ }
747
+ }
740
748
  checkWidthSize() {
741
749
  this.mobileView = document.body.clientWidth <= 1100;
742
750
  this.changeDetectorRef.markForCheck();
743
751
  }
744
752
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MaterialTableRowCellComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
745
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: MaterialTableRowCellComponent, selector: "st-material-table-row-cell", inputs: { column: "column", rowData: "rowData", rowDataCopy: "rowDataCopy", rowEditing: "rowEditing" }, outputs: { saveEditRowEmitter: "saveEditRowEmitter", cancelEditRowEmitter: "cancelEditRowEmitter", editRowEmitter: "editRowEmitter" }, ngImport: i0, template: "@switch (column.type || 'string') {\r\n @case ('custom-template') {\r\n <ng-container\r\n [ngTemplateOutlet]=\"column.customTemplate!\"\r\n [ngTemplateOutletContext]=\"{ data: rowData }\"\r\n ></ng-container>\r\n }\r\n\r\n @case ('actions') {\r\n @if (column.actions) {\r\n @if (\r\n (!column.actionsInMenu && !mobileView) ||\r\n (mobileView && column.actions!.length <= 1)\r\n ) {\r\n <div [ngStyle]=\"{ float: column.flexRight ? 'right' : 'none' }\">\r\n @for (action of column.actions; track action) {\r\n @if ((action.show && action.show(rowData)) || !action.show) {\r\n @if (!action.url && action.action) {\r\n <button\r\n class=\"action-icon-button\"\r\n type=\"button\"\r\n mat-icon-button\r\n [color]=\"\r\n actionIconColorDef[action.iconName]\r\n ? actionIconColorDef[action.iconName]\r\n : action.iconColor\r\n \"\r\n [matTooltip]=\"action.tooltipName || ''\"\r\n [matTooltipDisabled]=\"!action.tooltipName\"\r\n (click)=\"$event.stopPropagation(); action.action(rowData)\"\r\n >\r\n <mat-icon>{{ action.iconName }}</mat-icon>\r\n </button>\r\n }\r\n @if (action.url) {\r\n <a [routerLink]=\"action.url\">\r\n <button\r\n class=\"action-icon-button\"\r\n type=\"button\"\r\n mat-icon-button\r\n [color]=\"\r\n actionIconColorDef[action.iconName]\r\n ? actionIconColorDef[action.iconName]\r\n : action.iconColor\r\n \"\r\n [matTooltip]=\"action.tooltipName || ''\"\r\n [matTooltipDisabled]=\"!action.tooltipName\"\r\n >\r\n <mat-icon>{{ action.iconName }}</mat-icon>\r\n </button>\r\n </a>\r\n }\r\n }\r\n }\r\n </div>\r\n }\r\n @if (column.actionsInMenu || (mobileView && column.actions!.length > 1)) {\r\n <button\r\n mat-icon-button\r\n [matMenuTriggerFor]=\"menu\"\r\n (click)=\"$event.stopPropagation()\"\r\n >\r\n <mat-icon>more_vert</mat-icon>\r\n </button>\r\n <mat-menu #menu=\"matMenu\">\r\n @for (action of column.actions; track action) {\r\n @if ((action.show && action.show(rowData)) || !action.show) {\r\n @if (!action.url && action.action) {\r\n <button\r\n type=\"button\"\r\n mat-menu-item\r\n (click)=\"$event.stopPropagation(); action.action(rowData)\"\r\n >\r\n {{ action.tooltipName }}\r\n </button>\r\n }\r\n @if (action.url) {\r\n <a [routerLink]=\"action.url\">\r\n <button type=\"button\" mat-menu-item>\r\n {{ action.tooltipName }}\r\n </button>\r\n </a>\r\n }\r\n }\r\n }\r\n </mat-menu>\r\n }\r\n }\r\n }\r\n\r\n @case ('string') {\r\n <ng-container\r\n *ngTemplateOutlet=\"baseFieldCell; context: { $implicit: column }\"\r\n ></ng-container>\r\n }\r\n\r\n @case ('number') {\r\n <ng-container\r\n *ngTemplateOutlet=\"baseFieldCell; context: { $implicit: column }\"\r\n ></ng-container>\r\n }\r\n\r\n @case ('boolean') {\r\n <ng-container\r\n *ngTemplateOutlet=\"baseFieldCell; context: { $implicit: column }\"\r\n ></ng-container>\r\n }\r\n\r\n @case ('date') {\r\n {{ rowData[column.field] | stDateTimeFormatPipe }}\r\n }\r\n\r\n @case ('actions-row-editing') {\r\n <div class=\"row justify-content-end\">\r\n @if (rowEditing) {\r\n <button\r\n mat-icon-button\r\n color=\"accent\"\r\n (click)=\"saveRow()\"\r\n [matTooltip]=\"'Save row'\"\r\n >\r\n <mat-icon>done</mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n color=\"warn\"\r\n (click)=\"cancelRow()\"\r\n [matTooltip]=\"'Cancel row'\"\r\n >\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n } @else {\r\n <button\r\n mat-icon-button\r\n color=\"primary\"\r\n (click)=\"editRow()\"\r\n [matTooltip]=\"'Edit row'\"\r\n >\r\n <mat-icon>edit</mat-icon>\r\n </button>\r\n }\r\n </div>\r\n }\r\n}\r\n\r\n<ng-template #baseFieldCell let-column>\r\n @if (rowEditing && column.allowEditColumn) {\r\n <mat-form-field appearance=\"outline\">\r\n @if (column.type === 'string') {\r\n <input matInput [(ngModel)]=\"rowDataCopy[column.field]\" />\r\n }\r\n @if (column.type === 'number') {\r\n <input matInput type=\"number\" [(ngModel)]=\"rowDataCopy[column.field]\" />\r\n }\r\n @if (column.type === 'boolean') {\r\n <mat-checkbox [(ngModel)]=\"rowDataCopy[column.field]\"></mat-checkbox>\r\n }\r\n </mat-form-field>\r\n } @else {\r\n <div>\r\n @if (column.translateValue) {\r\n {{ column.translateValue![rowData[column.field]] || '' }}\r\n }\r\n @if (column.customValueDisplay) {\r\n {{ column.customValueDisplay(rowData[column.field]) }}\r\n }\r\n @if (!column.translateValue && !column.customValueDisplay) {\r\n {{ rowData[column.field] }}\r\n }\r\n </div>\r\n }\r\n</ng-template>\r\n", styles: [""], dependencies: [{ kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i4.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i10.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: i7.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: i7.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i13.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i13.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i13.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "component", type: i14.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "pipe", type: i16.DateTimeFormatPipe, name: "stDateTimeFormatPipe" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
753
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: MaterialTableRowCellComponent, selector: "st-material-table-row-cell", inputs: { column: "column", rowData: "rowData", rowDataCopy: "rowDataCopy", rowEditing: "rowEditing", rowIsSelected: "rowIsSelected" }, outputs: { saveEditRowEmitter: "saveEditRowEmitter", cancelEditRowEmitter: "cancelEditRowEmitter", editRowEmitter: "editRowEmitter", selectRowChange: "selectRowChange" }, ngImport: i0, template: "@switch (column.type || 'string') {\r\n @case ('custom-template') {\r\n <ng-container\r\n [ngTemplateOutlet]=\"column.customTemplate!\"\r\n [ngTemplateOutletContext]=\"{ data: rowData }\"\r\n ></ng-container>\r\n }\r\n\r\n @case ('actions') {\r\n @if (column.actions) {\r\n @if (\r\n (!column.actionsInMenu && !mobileView) ||\r\n (mobileView && column.actions!.length <= 1)\r\n ) {\r\n <div [ngStyle]=\"{ float: column.flexRight ? 'right' : 'none' }\">\r\n @for (action of column.actions; track action) {\r\n @if ((action.show && action.show(rowData)) || !action.show) {\r\n @if (!action.url && action.action) {\r\n <button\r\n class=\"action-icon-button\"\r\n type=\"button\"\r\n mat-icon-button\r\n [color]=\"\r\n actionIconColorDef[action.iconName]\r\n ? actionIconColorDef[action.iconName]\r\n : action.iconColor\r\n \"\r\n [matTooltip]=\"action.tooltipName || ''\"\r\n [matTooltipDisabled]=\"!action.tooltipName\"\r\n (click)=\"$event.stopPropagation(); action.action(rowData)\"\r\n >\r\n <mat-icon>{{ action.iconName }}</mat-icon>\r\n </button>\r\n }\r\n @if (action.url) {\r\n <a [routerLink]=\"action.url\">\r\n <button\r\n class=\"action-icon-button\"\r\n type=\"button\"\r\n mat-icon-button\r\n [color]=\"\r\n actionIconColorDef[action.iconName]\r\n ? actionIconColorDef[action.iconName]\r\n : action.iconColor\r\n \"\r\n [matTooltip]=\"action.tooltipName || ''\"\r\n [matTooltipDisabled]=\"!action.tooltipName\"\r\n >\r\n <mat-icon>{{ action.iconName }}</mat-icon>\r\n </button>\r\n </a>\r\n }\r\n }\r\n }\r\n </div>\r\n }\r\n @if (column.actionsInMenu || (mobileView && column.actions!.length > 1)) {\r\n <button\r\n mat-icon-button\r\n [matMenuTriggerFor]=\"menu\"\r\n (click)=\"$event.stopPropagation()\"\r\n >\r\n <mat-icon>more_vert</mat-icon>\r\n </button>\r\n <mat-menu #menu=\"matMenu\">\r\n @for (action of column.actions; track action) {\r\n @if ((action.show && action.show(rowData)) || !action.show) {\r\n @if (!action.url && action.action) {\r\n <button\r\n type=\"button\"\r\n mat-menu-item\r\n (click)=\"$event.stopPropagation(); action.action(rowData)\"\r\n >\r\n {{ action.tooltipName }}\r\n </button>\r\n }\r\n @if (action.url) {\r\n <a [routerLink]=\"action.url\">\r\n <button type=\"button\" mat-menu-item>\r\n {{ action.tooltipName }}\r\n </button>\r\n </a>\r\n }\r\n }\r\n }\r\n </mat-menu>\r\n }\r\n }\r\n }\r\n\r\n @case ('string') {\r\n <ng-container\r\n *ngTemplateOutlet=\"baseFieldCell; context: { $implicit: column }\"\r\n ></ng-container>\r\n }\r\n\r\n @case ('number') {\r\n <ng-container\r\n *ngTemplateOutlet=\"baseFieldCell; context: { $implicit: column }\"\r\n ></ng-container>\r\n }\r\n\r\n @case ('boolean') {\r\n <ng-container\r\n *ngTemplateOutlet=\"baseFieldCell; context: { $implicit: column }\"\r\n ></ng-container>\r\n }\r\n\r\n @case ('date') {\r\n {{ rowData[column.field] | stDateTimeFormatPipe }}\r\n }\r\n\r\n @case ('actions-row-editing') {\r\n <div class=\"row justify-content-end\">\r\n @if (rowEditing) {\r\n <button\r\n mat-icon-button\r\n color=\"accent\"\r\n (click)=\"saveRow()\"\r\n [matTooltip]=\"'Save row'\"\r\n >\r\n <mat-icon>done</mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n color=\"warn\"\r\n (click)=\"cancelRow()\"\r\n [matTooltip]=\"'Cancel row'\"\r\n >\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n } @else {\r\n <button\r\n mat-icon-button\r\n color=\"primary\"\r\n (click)=\"editRow()\"\r\n [matTooltip]=\"'Edit row'\"\r\n >\r\n <mat-icon>edit</mat-icon>\r\n </button>\r\n }\r\n </div>\r\n }\r\n\r\n @case ('actions-row-selecting') {\r\n <mat-checkbox\r\n color=\"primary\"\r\n (click)=\"$event.stopPropagation()\"\r\n (change)=\"selectRow($event)\"\r\n [checked]=\"rowIsSelected\"\r\n >\r\n </mat-checkbox>\r\n }\r\n}\r\n\r\n<ng-template #baseFieldCell let-column>\r\n @if (rowEditing && column.allowEditColumn) {\r\n <mat-form-field appearance=\"outline\">\r\n @if (column.type === 'string') {\r\n <input matInput [(ngModel)]=\"rowDataCopy[column.field]\" />\r\n }\r\n @if (column.type === 'number') {\r\n <input matInput type=\"number\" [(ngModel)]=\"rowDataCopy[column.field]\" />\r\n }\r\n @if (column.type === 'boolean') {\r\n <mat-checkbox [(ngModel)]=\"rowDataCopy[column.field]\"></mat-checkbox>\r\n }\r\n </mat-form-field>\r\n } @else {\r\n <div>\r\n @if (column.translateValue) {\r\n {{ column.translateValue![rowData[column.field]] || '' }}\r\n }\r\n @if (column.customValueDisplay) {\r\n {{ column.customValueDisplay(rowData[column.field]) }}\r\n }\r\n @if (!column.translateValue && !column.customValueDisplay) {\r\n {{ rowData[column.field] }}\r\n }\r\n </div>\r\n }\r\n</ng-template>\r\n", styles: [""], dependencies: [{ kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i4.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i10.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: i7.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: i7.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i13.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i13.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i13.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "component", type: i14.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "pipe", type: i16.DateTimeFormatPipe, name: "stDateTimeFormatPipe" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
746
754
  }
747
755
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MaterialTableRowCellComponent, decorators: [{
748
756
  type: Component,
749
- args: [{ selector: 'st-material-table-row-cell', changeDetection: ChangeDetectionStrategy.OnPush, template: "@switch (column.type || 'string') {\r\n @case ('custom-template') {\r\n <ng-container\r\n [ngTemplateOutlet]=\"column.customTemplate!\"\r\n [ngTemplateOutletContext]=\"{ data: rowData }\"\r\n ></ng-container>\r\n }\r\n\r\n @case ('actions') {\r\n @if (column.actions) {\r\n @if (\r\n (!column.actionsInMenu && !mobileView) ||\r\n (mobileView && column.actions!.length <= 1)\r\n ) {\r\n <div [ngStyle]=\"{ float: column.flexRight ? 'right' : 'none' }\">\r\n @for (action of column.actions; track action) {\r\n @if ((action.show && action.show(rowData)) || !action.show) {\r\n @if (!action.url && action.action) {\r\n <button\r\n class=\"action-icon-button\"\r\n type=\"button\"\r\n mat-icon-button\r\n [color]=\"\r\n actionIconColorDef[action.iconName]\r\n ? actionIconColorDef[action.iconName]\r\n : action.iconColor\r\n \"\r\n [matTooltip]=\"action.tooltipName || ''\"\r\n [matTooltipDisabled]=\"!action.tooltipName\"\r\n (click)=\"$event.stopPropagation(); action.action(rowData)\"\r\n >\r\n <mat-icon>{{ action.iconName }}</mat-icon>\r\n </button>\r\n }\r\n @if (action.url) {\r\n <a [routerLink]=\"action.url\">\r\n <button\r\n class=\"action-icon-button\"\r\n type=\"button\"\r\n mat-icon-button\r\n [color]=\"\r\n actionIconColorDef[action.iconName]\r\n ? actionIconColorDef[action.iconName]\r\n : action.iconColor\r\n \"\r\n [matTooltip]=\"action.tooltipName || ''\"\r\n [matTooltipDisabled]=\"!action.tooltipName\"\r\n >\r\n <mat-icon>{{ action.iconName }}</mat-icon>\r\n </button>\r\n </a>\r\n }\r\n }\r\n }\r\n </div>\r\n }\r\n @if (column.actionsInMenu || (mobileView && column.actions!.length > 1)) {\r\n <button\r\n mat-icon-button\r\n [matMenuTriggerFor]=\"menu\"\r\n (click)=\"$event.stopPropagation()\"\r\n >\r\n <mat-icon>more_vert</mat-icon>\r\n </button>\r\n <mat-menu #menu=\"matMenu\">\r\n @for (action of column.actions; track action) {\r\n @if ((action.show && action.show(rowData)) || !action.show) {\r\n @if (!action.url && action.action) {\r\n <button\r\n type=\"button\"\r\n mat-menu-item\r\n (click)=\"$event.stopPropagation(); action.action(rowData)\"\r\n >\r\n {{ action.tooltipName }}\r\n </button>\r\n }\r\n @if (action.url) {\r\n <a [routerLink]=\"action.url\">\r\n <button type=\"button\" mat-menu-item>\r\n {{ action.tooltipName }}\r\n </button>\r\n </a>\r\n }\r\n }\r\n }\r\n </mat-menu>\r\n }\r\n }\r\n }\r\n\r\n @case ('string') {\r\n <ng-container\r\n *ngTemplateOutlet=\"baseFieldCell; context: { $implicit: column }\"\r\n ></ng-container>\r\n }\r\n\r\n @case ('number') {\r\n <ng-container\r\n *ngTemplateOutlet=\"baseFieldCell; context: { $implicit: column }\"\r\n ></ng-container>\r\n }\r\n\r\n @case ('boolean') {\r\n <ng-container\r\n *ngTemplateOutlet=\"baseFieldCell; context: { $implicit: column }\"\r\n ></ng-container>\r\n }\r\n\r\n @case ('date') {\r\n {{ rowData[column.field] | stDateTimeFormatPipe }}\r\n }\r\n\r\n @case ('actions-row-editing') {\r\n <div class=\"row justify-content-end\">\r\n @if (rowEditing) {\r\n <button\r\n mat-icon-button\r\n color=\"accent\"\r\n (click)=\"saveRow()\"\r\n [matTooltip]=\"'Save row'\"\r\n >\r\n <mat-icon>done</mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n color=\"warn\"\r\n (click)=\"cancelRow()\"\r\n [matTooltip]=\"'Cancel row'\"\r\n >\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n } @else {\r\n <button\r\n mat-icon-button\r\n color=\"primary\"\r\n (click)=\"editRow()\"\r\n [matTooltip]=\"'Edit row'\"\r\n >\r\n <mat-icon>edit</mat-icon>\r\n </button>\r\n }\r\n </div>\r\n }\r\n}\r\n\r\n<ng-template #baseFieldCell let-column>\r\n @if (rowEditing && column.allowEditColumn) {\r\n <mat-form-field appearance=\"outline\">\r\n @if (column.type === 'string') {\r\n <input matInput [(ngModel)]=\"rowDataCopy[column.field]\" />\r\n }\r\n @if (column.type === 'number') {\r\n <input matInput type=\"number\" [(ngModel)]=\"rowDataCopy[column.field]\" />\r\n }\r\n @if (column.type === 'boolean') {\r\n <mat-checkbox [(ngModel)]=\"rowDataCopy[column.field]\"></mat-checkbox>\r\n }\r\n </mat-form-field>\r\n } @else {\r\n <div>\r\n @if (column.translateValue) {\r\n {{ column.translateValue![rowData[column.field]] || '' }}\r\n }\r\n @if (column.customValueDisplay) {\r\n {{ column.customValueDisplay(rowData[column.field]) }}\r\n }\r\n @if (!column.translateValue && !column.customValueDisplay) {\r\n {{ rowData[column.field] }}\r\n }\r\n </div>\r\n }\r\n</ng-template>\r\n" }]
757
+ args: [{ selector: 'st-material-table-row-cell', changeDetection: ChangeDetectionStrategy.OnPush, template: "@switch (column.type || 'string') {\r\n @case ('custom-template') {\r\n <ng-container\r\n [ngTemplateOutlet]=\"column.customTemplate!\"\r\n [ngTemplateOutletContext]=\"{ data: rowData }\"\r\n ></ng-container>\r\n }\r\n\r\n @case ('actions') {\r\n @if (column.actions) {\r\n @if (\r\n (!column.actionsInMenu && !mobileView) ||\r\n (mobileView && column.actions!.length <= 1)\r\n ) {\r\n <div [ngStyle]=\"{ float: column.flexRight ? 'right' : 'none' }\">\r\n @for (action of column.actions; track action) {\r\n @if ((action.show && action.show(rowData)) || !action.show) {\r\n @if (!action.url && action.action) {\r\n <button\r\n class=\"action-icon-button\"\r\n type=\"button\"\r\n mat-icon-button\r\n [color]=\"\r\n actionIconColorDef[action.iconName]\r\n ? actionIconColorDef[action.iconName]\r\n : action.iconColor\r\n \"\r\n [matTooltip]=\"action.tooltipName || ''\"\r\n [matTooltipDisabled]=\"!action.tooltipName\"\r\n (click)=\"$event.stopPropagation(); action.action(rowData)\"\r\n >\r\n <mat-icon>{{ action.iconName }}</mat-icon>\r\n </button>\r\n }\r\n @if (action.url) {\r\n <a [routerLink]=\"action.url\">\r\n <button\r\n class=\"action-icon-button\"\r\n type=\"button\"\r\n mat-icon-button\r\n [color]=\"\r\n actionIconColorDef[action.iconName]\r\n ? actionIconColorDef[action.iconName]\r\n : action.iconColor\r\n \"\r\n [matTooltip]=\"action.tooltipName || ''\"\r\n [matTooltipDisabled]=\"!action.tooltipName\"\r\n >\r\n <mat-icon>{{ action.iconName }}</mat-icon>\r\n </button>\r\n </a>\r\n }\r\n }\r\n }\r\n </div>\r\n }\r\n @if (column.actionsInMenu || (mobileView && column.actions!.length > 1)) {\r\n <button\r\n mat-icon-button\r\n [matMenuTriggerFor]=\"menu\"\r\n (click)=\"$event.stopPropagation()\"\r\n >\r\n <mat-icon>more_vert</mat-icon>\r\n </button>\r\n <mat-menu #menu=\"matMenu\">\r\n @for (action of column.actions; track action) {\r\n @if ((action.show && action.show(rowData)) || !action.show) {\r\n @if (!action.url && action.action) {\r\n <button\r\n type=\"button\"\r\n mat-menu-item\r\n (click)=\"$event.stopPropagation(); action.action(rowData)\"\r\n >\r\n {{ action.tooltipName }}\r\n </button>\r\n }\r\n @if (action.url) {\r\n <a [routerLink]=\"action.url\">\r\n <button type=\"button\" mat-menu-item>\r\n {{ action.tooltipName }}\r\n </button>\r\n </a>\r\n }\r\n }\r\n }\r\n </mat-menu>\r\n }\r\n }\r\n }\r\n\r\n @case ('string') {\r\n <ng-container\r\n *ngTemplateOutlet=\"baseFieldCell; context: { $implicit: column }\"\r\n ></ng-container>\r\n }\r\n\r\n @case ('number') {\r\n <ng-container\r\n *ngTemplateOutlet=\"baseFieldCell; context: { $implicit: column }\"\r\n ></ng-container>\r\n }\r\n\r\n @case ('boolean') {\r\n <ng-container\r\n *ngTemplateOutlet=\"baseFieldCell; context: { $implicit: column }\"\r\n ></ng-container>\r\n }\r\n\r\n @case ('date') {\r\n {{ rowData[column.field] | stDateTimeFormatPipe }}\r\n }\r\n\r\n @case ('actions-row-editing') {\r\n <div class=\"row justify-content-end\">\r\n @if (rowEditing) {\r\n <button\r\n mat-icon-button\r\n color=\"accent\"\r\n (click)=\"saveRow()\"\r\n [matTooltip]=\"'Save row'\"\r\n >\r\n <mat-icon>done</mat-icon>\r\n </button>\r\n <button\r\n mat-icon-button\r\n color=\"warn\"\r\n (click)=\"cancelRow()\"\r\n [matTooltip]=\"'Cancel row'\"\r\n >\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n } @else {\r\n <button\r\n mat-icon-button\r\n color=\"primary\"\r\n (click)=\"editRow()\"\r\n [matTooltip]=\"'Edit row'\"\r\n >\r\n <mat-icon>edit</mat-icon>\r\n </button>\r\n }\r\n </div>\r\n }\r\n\r\n @case ('actions-row-selecting') {\r\n <mat-checkbox\r\n color=\"primary\"\r\n (click)=\"$event.stopPropagation()\"\r\n (change)=\"selectRow($event)\"\r\n [checked]=\"rowIsSelected\"\r\n >\r\n </mat-checkbox>\r\n }\r\n}\r\n\r\n<ng-template #baseFieldCell let-column>\r\n @if (rowEditing && column.allowEditColumn) {\r\n <mat-form-field appearance=\"outline\">\r\n @if (column.type === 'string') {\r\n <input matInput [(ngModel)]=\"rowDataCopy[column.field]\" />\r\n }\r\n @if (column.type === 'number') {\r\n <input matInput type=\"number\" [(ngModel)]=\"rowDataCopy[column.field]\" />\r\n }\r\n @if (column.type === 'boolean') {\r\n <mat-checkbox [(ngModel)]=\"rowDataCopy[column.field]\"></mat-checkbox>\r\n }\r\n </mat-form-field>\r\n } @else {\r\n <div>\r\n @if (column.translateValue) {\r\n {{ column.translateValue![rowData[column.field]] || '' }}\r\n }\r\n @if (column.customValueDisplay) {\r\n {{ column.customValueDisplay(rowData[column.field]) }}\r\n }\r\n @if (!column.translateValue && !column.customValueDisplay) {\r\n {{ rowData[column.field] }}\r\n }\r\n </div>\r\n }\r\n</ng-template>\r\n" }]
750
758
  }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { column: [{
751
759
  type: Input
752
760
  }], rowData: [{
@@ -755,17 +763,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
755
763
  type: Input
756
764
  }], rowEditing: [{
757
765
  type: Input
766
+ }], rowIsSelected: [{
767
+ type: Input
758
768
  }], saveEditRowEmitter: [{
759
769
  type: Output
760
770
  }], cancelEditRowEmitter: [{
761
771
  type: Output
762
772
  }], editRowEmitter: [{
763
773
  type: Output
774
+ }], selectRowChange: [{
775
+ type: Output
764
776
  }] } });
765
777
 
766
778
  class MaterialTableComponent extends StSubscribeDestroyComponent {
767
779
  set data(data) {
768
- if (this.rowEditing) {
780
+ if (this.rowEditing || this.rowSelecting) {
769
781
  if (data.length > 0 && !data[0].id) {
770
782
  data = data.map(row => {
771
783
  return {
@@ -804,8 +816,11 @@ class MaterialTableComponent extends StSubscribeDestroyComponent {
804
816
  this.isLoading = false;
805
817
  this.initColumns = [];
806
818
  this.rowEditing = false;
819
+ this.rowSelecting = false;
820
+ this.selectionFieldLabel = '';
807
821
  this.loadData = new EventEmitter();
808
822
  this.saveNewRow = new EventEmitter();
823
+ this.selectRowChange = new EventEmitter();
809
824
  this._data = [];
810
825
  this.columns = [];
811
826
  this.selectedColumns = [];
@@ -814,8 +829,20 @@ class MaterialTableComponent extends StSubscribeDestroyComponent {
814
829
  this.initGlobalSearch = '';
815
830
  this.showTable = true;
816
831
  this.activeRowsEditing = {};
832
+ this.selection = new SelectionModel(true, []);
817
833
  }
818
834
  ngOnInit() {
835
+ if (this.rowSelecting) {
836
+ this.initColumns.unshift({
837
+ field: 'actions-row-selecting',
838
+ header: '',
839
+ type: 'actions-row-selecting',
840
+ sort: false,
841
+ filter: false,
842
+ width: '60px',
843
+ selectColumnLabel: 'Row Select',
844
+ });
845
+ }
819
846
  if (this.rowEditing) {
820
847
  this.initColumns.push({
821
848
  field: 'actions-row-editing',
@@ -902,6 +929,33 @@ class MaterialTableComponent extends StSubscribeDestroyComponent {
902
929
  cancelEditRow(row, column) {
903
930
  delete this.activeRowsEditing[row.id];
904
931
  }
932
+ isAllSelected() {
933
+ const numSelected = this.selection.selected.length;
934
+ const numRows = this.tableSource.data.length;
935
+ return numSelected === numRows;
936
+ }
937
+ toggleAllRows() {
938
+ if (this.isAllSelected()) {
939
+ this.selection.clear();
940
+ return;
941
+ }
942
+ this.selection.select(...this.tableSource.data);
943
+ this.selectRowChange.emit(this.selection.selected);
944
+ }
945
+ removeSelectedRow(row) {
946
+ this.selection.deselect(row);
947
+ this.selectRowChange.emit(this.selection.selected);
948
+ }
949
+ selectRowChanged(value, row) {
950
+ if (value) {
951
+ this.selection.select(row);
952
+ }
953
+ else {
954
+ this.selection.deselect(row);
955
+ }
956
+ this.changeDetectorRef.markForCheck();
957
+ this.selectRowChange.emit(this.selection.selected);
958
+ }
905
959
  createCustomFilterForLocalTable() {
906
960
  let filterFunction = (data, filter) => {
907
961
  const searchTerms = JSON.parse(filter);
@@ -1070,11 +1124,11 @@ class MaterialTableComponent extends StSubscribeDestroyComponent {
1070
1124
  };
1071
1125
  }
1072
1126
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MaterialTableComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1$1.StSnackBarService }], target: i0.ɵɵFactoryTarget.Component }); }
1073
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: MaterialTableComponent, selector: "ngx-st-material-table", inputs: { showGlobalSearch: "showGlobalSearch", tableTitle: "tableTitle", pageSize: "pageSize", dataLength: "dataLength", allowPickColumns: "allowPickColumns", allowReorderColumns: "allowReorderColumns", localStorageName: "localStorageName", lazyLoading: "lazyLoading", isLoading: "isLoading", initColumns: "initColumns", rowClickAction: "rowClickAction", data: "data", rowEditing: "rowEditing" }, outputs: { loadData: "loadData", saveNewRow: "saveNewRow" }, viewQueries: [{ propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true }, { propertyName: "sort", first: true, predicate: MatSort, descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"st-material-table\">\n @if (isLoading) {\n <div class=\"loading-spinner\">\n <mat-spinner color=\"accent\"></mat-spinner>\n </div>\n }\n\n @if (showTable) {\n <st-material-table-caption\n [tableTitle]=\"tableTitle\"\n [allowPickColumns]=\"allowPickColumns\"\n [showGlobalSearch]=\"showGlobalSearch\"\n [columns]=\"columns\"\n [initFilters]=\"initFilters\"\n [initGlobalSearch]=\"initGlobalSearch\"\n (captionDataChanged)=\"captionDataChanged($event)\"\n (resetTableSettings)=\"resetTableSettings()\"\n ></st-material-table-caption>\n }\n\n <table\n [ngClass]=\"{ 'no-hover': !rowClickAction }\"\n mat-table\n [dataSource]=\"tableSource\"\n matSort\n >\n @for (column of selectedColumns; track column) {\n <ng-container [matColumnDef]=\"column.field\">\n <th\n mat-header-cell\n *matHeaderCellDef\n style=\"{{ column.width ? 'width:' + column.width : '' }}\"\n mat-sort-header\n [disabled]=\"!column.sort\"\n >\n {{ column.header }}\n </th>\n <td\n mat-cell\n *matCellDef=\"let element\"\n style=\"{{ column.width ? 'width:' + column.width : '' }}\"\n >\n <st-material-table-row-cell\n [column]=\"column\"\n [rowData]=\"element\"\n [rowDataCopy]=\"activeRowsEditing[element.id]\"\n [rowEditing]=\"!!activeRowsEditing[element.id]\"\n (editRowEmitter)=\"editRow(element, column)\"\n (saveEditRowEmitter)=\"saveEditRow(element, column)\"\n (cancelEditRowEmitter)=\"cancelEditRow(element, column)\"\n ></st-material-table-row-cell>\n </td>\n </ng-container>\n }\n\n <tr mat-header-row *matHeaderRowDef=\"selectedColumnsString\"></tr>\n <tr\n mat-row\n *matRowDef=\"let row; columns: selectedColumnsString\"\n (click)=\"rowClickAction ? rowClickAction(row) : null\"\n ></tr>\n </table>\n <mat-paginator\n [showFirstLastButtons]=\"true\"\n [pageSizeOptions]=\"[5, 10, 15, 20, 25]\"\n [length]=\"dataLength\"\n ></mat-paginator>\n</div>\n", styles: [".st-material-table{position:relative}.st-material-table .loading-spinner{position:absolute;top:0;left:0;width:100%;height:100%;background:#00000026;z-index:1;display:flex;justify-content:center}.st-material-table .loading-spinner mat-spinner{margin-top:5rem}\n", ".st-material-table .search-form button{height:40px}.st-material-table .search-form mat-form-field:first-child{padding-left:0}.st-material-table .search-form mat-form-field:last-child{padding-right:0}.st-material-table .search-form .clear{padding:0}.st-material-table .search-form .clear mat-icon{height:20px;width:20px;font-size:20px;cursor:pointer}.st-material-table table{width:100%;box-shadow:none}.st-material-table table th.mat-mdc-header-cell,.st-material-table table td.mat-mdc-cell,.st-material-table table td.mat-mdc-footer-cell{padding:0}.st-material-table table th.mat-mdc-header-cell:first-of-type,.st-material-table table td.mat-mdc-cell:first-of-type,.st-material-table table td.mat-mdc-footer-cell:first-of-type{padding-left:12px}.st-material-table table th.mat-mdc-header-cell:last-of-type,.st-material-table table td.mat-mdc-cell:last-of-type,.st-material-table table td.mat-mdc-footer-cell:last-of-type{padding-right:12px}.st-material-table table thead tr{background-color:#fff9c4;height:40px!important}.st-material-table table thead tr th{border-color:#fdd835;font-size:.9rem;font-weight:600;color:#424242}.st-material-table table tbody{background-color:transparent!important}.st-material-table table tbody>tr{cursor:pointer}.st-material-table table tbody>tr.active{background-color:#a5d6a7}.st-material-table table tbody>tr.active td{border-bottom-color:#81c784!important}.st-material-table table tbody>tr:hover{background-color:#f5f5f5}.st-material-table table tbody>tr.disabled{cursor:not-allowed}.st-material-table table tbody>tr.disabled:hover{background-color:inherit!important}.st-material-table table tbody>tr.detail-row{height:0;cursor:default}.st-material-table table tbody>tr.detail-row:hover{background-color:transparent}.st-material-table table tbody>tr.detail-row .element-detail{overflow:hidden;display:flex}.st-material-table table tbody>tr.detail-row .element-detail p{padding:20px 0;margin-bottom:0;white-space:pre-wrap}.st-material-table table tbody>tr td i.active-row{color:#1b5e20;font-weight:700;font-size:25px;height:25px;width:25px;margin-top:2px}.st-material-table table tbody>tr td>div{max-height:200px;overflow:hidden;overflow-y:auto}.st-material-table table tbody>tr td a button{color:#000}.st-material-table table tbody>tr td a mat-icon{color:#333}.st-material-table table .mat-column-active{width:48px}.st-material-table table.no-hover tbody tr{cursor:default}.st-material-table table.no-hover tbody tr.active{background-color:transparent!important}.st-material-table table.no-hover tbody tr.active td{border-bottom-color:#0000001f!important}.st-material-table table.no-hover tbody tr:hover{background-color:transparent!important}.st-material-table table.no-hover tbody tr:hover td{border-bottom-color:#0000001f!important}.st-material-table table.admin-table .actions-cell{width:100px}.dark-theme .st-material-table table{background-color:transparent!important}.dark-theme .st-material-table table thead tr{background-color:#5e4803!important}.dark-theme .st-material-table table thead tr th{border-color:#816204!important;color:#e0e0e0!important}.dark-theme .st-material-table tbody tr:hover{background-color:var(--primeng-table-hover-background)!important}.dark-theme mat-paginator{background-color:transparent!important}.dark-theme .reorder-column-list .reorder-column-element{background-color:#424242!important;color:#eee!important}.dark-theme .reorder-column-list .reorder-column-element p,.dark-theme .reorder-column-list .reorder-column-element mat-icon{color:#eee!important}.dark-theme .filter .filter-title{color:#eee!important}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i3$1.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i3$1.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i3$1.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i3$1.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i3$1.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i3$1.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i3$1.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i3$1.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i3$1.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i3$1.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i4$1.MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "directive", type: i12.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i12.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: i6$1.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: MaterialTableCaptionComponent, selector: "st-material-table-caption", inputs: ["showGlobalSearch", "tableTitle", "allowPickColumns", "allowReorderColumns", "initGlobalSearch", "initFilters", "columns"], outputs: ["captionDataChanged", "resetTableSettings"] }, { kind: "component", type: MaterialTableRowCellComponent, selector: "st-material-table-row-cell", inputs: ["column", "rowData", "rowDataCopy", "rowEditing"], outputs: ["saveEditRowEmitter", "cancelEditRowEmitter", "editRowEmitter"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
1127
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: MaterialTableComponent, selector: "ngx-st-material-table", inputs: { showGlobalSearch: "showGlobalSearch", tableTitle: "tableTitle", pageSize: "pageSize", dataLength: "dataLength", allowPickColumns: "allowPickColumns", allowReorderColumns: "allowReorderColumns", localStorageName: "localStorageName", lazyLoading: "lazyLoading", isLoading: "isLoading", initColumns: "initColumns", rowClickAction: "rowClickAction", data: "data", rowEditing: "rowEditing", rowSelecting: "rowSelecting", selectionFieldLabel: "selectionFieldLabel" }, outputs: { loadData: "loadData", saveNewRow: "saveNewRow", selectRowChange: "selectRowChange" }, viewQueries: [{ propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true }, { propertyName: "sort", first: true, predicate: MatSort, descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"st-material-table\">\r\n @if (isLoading) {\r\n <div class=\"loading-spinner\">\r\n <mat-spinner color=\"accent\"></mat-spinner>\r\n </div>\r\n }\r\n\r\n @if (showTable) {\r\n <st-material-table-caption\r\n [tableTitle]=\"tableTitle\"\r\n [allowPickColumns]=\"allowPickColumns\"\r\n [showGlobalSearch]=\"showGlobalSearch\"\r\n [columns]=\"columns\"\r\n [initFilters]=\"initFilters\"\r\n [initGlobalSearch]=\"initGlobalSearch\"\r\n (captionDataChanged)=\"captionDataChanged($event)\"\r\n (resetTableSettings)=\"resetTableSettings()\"\r\n ></st-material-table-caption>\r\n }\r\n\r\n <table\r\n [ngClass]=\"{ 'no-hover': !rowClickAction }\"\r\n mat-table\r\n [dataSource]=\"tableSource\"\r\n matSort\r\n >\r\n @for (column of selectedColumns; track column) {\r\n <ng-container [matColumnDef]=\"column.field\">\r\n <th\r\n mat-header-cell\r\n *matHeaderCellDef\r\n style=\"{{ column.width ? 'width:' + column.width : '' }}\"\r\n mat-sort-header\r\n [disabled]=\"!column.sort\"\r\n >\r\n @if (column.type === 'actions-row-selecting') {\r\n <mat-checkbox\r\n color=\"primary\"\r\n (change)=\"$event ? toggleAllRows() : null\"\r\n [checked]=\"selection.hasValue() && isAllSelected()\"\r\n [indeterminate]=\"selection.hasValue() && !isAllSelected()\"\r\n >\r\n </mat-checkbox>\r\n } @else {\r\n {{ column.header }}\r\n }\r\n </th>\r\n <td\r\n mat-cell\r\n *matCellDef=\"let element\"\r\n style=\"{{ column.width ? 'width:' + column.width : '' }}\"\r\n >\r\n <st-material-table-row-cell\r\n [column]=\"column\"\r\n [rowData]=\"element\"\r\n [rowDataCopy]=\"activeRowsEditing[element.id]\"\r\n [rowEditing]=\"!!activeRowsEditing[element.id]\"\r\n [rowIsSelected]=\"selection.isSelected(element)\"\r\n (editRowEmitter)=\"editRow(element, column)\"\r\n (saveEditRowEmitter)=\"saveEditRow(element, column)\"\r\n (cancelEditRowEmitter)=\"cancelEditRow(element, column)\"\r\n (selectRowChange)=\"selectRowChanged($event, element)\"\r\n ></st-material-table-row-cell>\r\n </td>\r\n </ng-container>\r\n }\r\n\r\n <tr mat-header-row *matHeaderRowDef=\"selectedColumnsString\"></tr>\r\n <tr\r\n mat-row\r\n *matRowDef=\"let row; columns: selectedColumnsString\"\r\n (click)=\"rowClickAction ? rowClickAction(row) : null\"\r\n ></tr>\r\n </table>\r\n <mat-paginator\r\n [showFirstLastButtons]=\"true\"\r\n [pageSizeOptions]=\"[5, 10, 15, 20, 25]\"\r\n [length]=\"dataLength\"\r\n ></mat-paginator>\r\n @if (rowSelecting) {\r\n <div class=\"st-material-table-selected-rows\">\r\n <button mat-stroked-button [matMenuTriggerFor]=\"menu\">\r\n {{ selection.selected.length }} row selected\r\n </button>\r\n <mat-menu #menu=\"matMenu\">\r\n @for (row of selection.selected; track row) {\r\n <button mat-menu-item (click)=\"removeSelectedRow(row)\">\r\n <div class=\"d-flex\">\r\n {{ row[selectionFieldLabel]\r\n }}<mat-icon style=\"margin-right: 0; margin-left: 10px\"\r\n >delete</mat-icon\r\n >\r\n </div>\r\n </button>\r\n }\r\n </mat-menu>\r\n </div>\r\n }\r\n</div>\r\n", styles: [".st-material-table{position:relative}.st-material-table .loading-spinner{position:absolute;top:0;left:0;width:100%;height:100%;background:#00000026;z-index:1;display:flex;justify-content:center}.st-material-table .loading-spinner mat-spinner{margin-top:5rem}.st-material-table .st-material-table-selected-rows{position:absolute;bottom:12px;left:5px}\n", ".st-material-table .search-form button{height:40px}.st-material-table .search-form mat-form-field:first-child{padding-left:0}.st-material-table .search-form mat-form-field:last-child{padding-right:0}.st-material-table .search-form .clear{padding:0}.st-material-table .search-form .clear mat-icon{height:20px;width:20px;font-size:20px;cursor:pointer}.st-material-table table{width:100%;box-shadow:none}.st-material-table table th.mat-mdc-header-cell,.st-material-table table td.mat-mdc-cell,.st-material-table table td.mat-mdc-footer-cell{padding:0}.st-material-table table th.mat-mdc-header-cell:first-of-type,.st-material-table table td.mat-mdc-cell:first-of-type,.st-material-table table td.mat-mdc-footer-cell:first-of-type{padding-left:12px}.st-material-table table th.mat-mdc-header-cell:last-of-type,.st-material-table table td.mat-mdc-cell:last-of-type,.st-material-table table td.mat-mdc-footer-cell:last-of-type{padding-right:12px}.st-material-table table thead tr{background-color:#fff9c4;height:40px!important}.st-material-table table thead tr th{border-color:#fdd835;font-size:.9rem;font-weight:600;color:#424242}.st-material-table table tbody{background-color:transparent!important}.st-material-table table tbody>tr{cursor:pointer}.st-material-table table tbody>tr.active{background-color:#a5d6a7}.st-material-table table tbody>tr.active td{border-bottom-color:#81c784!important}.st-material-table table tbody>tr:hover{background-color:#f5f5f5}.st-material-table table tbody>tr.disabled{cursor:not-allowed}.st-material-table table tbody>tr.disabled:hover{background-color:inherit!important}.st-material-table table tbody>tr.detail-row{height:0;cursor:default}.st-material-table table tbody>tr.detail-row:hover{background-color:transparent}.st-material-table table tbody>tr.detail-row .element-detail{overflow:hidden;display:flex}.st-material-table table tbody>tr.detail-row .element-detail p{padding:20px 0;margin-bottom:0;white-space:pre-wrap}.st-material-table table tbody>tr td i.active-row{color:#1b5e20;font-weight:700;font-size:25px;height:25px;width:25px;margin-top:2px}.st-material-table table tbody>tr td>div{max-height:200px;overflow:hidden;overflow-y:auto}.st-material-table table tbody>tr td a button{color:#000}.st-material-table table tbody>tr td a mat-icon{color:#333}.st-material-table table .mat-column-active{width:48px}.st-material-table table.no-hover tbody tr{cursor:default}.st-material-table table.no-hover tbody tr.active{background-color:transparent!important}.st-material-table table.no-hover tbody tr.active td{border-bottom-color:#0000001f!important}.st-material-table table.no-hover tbody tr:hover{background-color:transparent!important}.st-material-table table.no-hover tbody tr:hover td{border-bottom-color:#0000001f!important}.st-material-table table.admin-table .actions-cell{width:100px}.dark-theme .st-material-table table{background-color:transparent!important}.dark-theme .st-material-table table thead tr{background-color:#5e4803!important}.dark-theme .st-material-table table thead tr th{border-color:#816204!important;color:#e0e0e0!important}.dark-theme .st-material-table tbody tr:hover{background-color:var(--primeng-table-hover-background)!important}.dark-theme mat-paginator{background-color:transparent!important}.dark-theme .reorder-column-list .reorder-column-element{background-color:#424242!important;color:#eee!important}.dark-theme .reorder-column-list .reorder-column-element p,.dark-theme .reorder-column-list .reorder-column-element mat-icon{color:#eee!important}.dark-theme .filter .filter-title{color:#eee!important}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i4.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i2.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: ["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$2.MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "directive", type: i12.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i12.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: i13.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i13.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i13.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "component", type: i14.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "component", type: i10$2.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: MaterialTableCaptionComponent, selector: "st-material-table-caption", inputs: ["showGlobalSearch", "tableTitle", "allowPickColumns", "allowReorderColumns", "initGlobalSearch", "initFilters", "columns"], outputs: ["captionDataChanged", "resetTableSettings"] }, { kind: "component", type: MaterialTableRowCellComponent, selector: "st-material-table-row-cell", inputs: ["column", "rowData", "rowDataCopy", "rowEditing", "rowIsSelected"], outputs: ["saveEditRowEmitter", "cancelEditRowEmitter", "editRowEmitter", "selectRowChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
1074
1128
  }
1075
1129
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MaterialTableComponent, decorators: [{
1076
1130
  type: Component,
1077
- args: [{ selector: 'ngx-st-material-table', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div class=\"st-material-table\">\n @if (isLoading) {\n <div class=\"loading-spinner\">\n <mat-spinner color=\"accent\"></mat-spinner>\n </div>\n }\n\n @if (showTable) {\n <st-material-table-caption\n [tableTitle]=\"tableTitle\"\n [allowPickColumns]=\"allowPickColumns\"\n [showGlobalSearch]=\"showGlobalSearch\"\n [columns]=\"columns\"\n [initFilters]=\"initFilters\"\n [initGlobalSearch]=\"initGlobalSearch\"\n (captionDataChanged)=\"captionDataChanged($event)\"\n (resetTableSettings)=\"resetTableSettings()\"\n ></st-material-table-caption>\n }\n\n <table\n [ngClass]=\"{ 'no-hover': !rowClickAction }\"\n mat-table\n [dataSource]=\"tableSource\"\n matSort\n >\n @for (column of selectedColumns; track column) {\n <ng-container [matColumnDef]=\"column.field\">\n <th\n mat-header-cell\n *matHeaderCellDef\n style=\"{{ column.width ? 'width:' + column.width : '' }}\"\n mat-sort-header\n [disabled]=\"!column.sort\"\n >\n {{ column.header }}\n </th>\n <td\n mat-cell\n *matCellDef=\"let element\"\n style=\"{{ column.width ? 'width:' + column.width : '' }}\"\n >\n <st-material-table-row-cell\n [column]=\"column\"\n [rowData]=\"element\"\n [rowDataCopy]=\"activeRowsEditing[element.id]\"\n [rowEditing]=\"!!activeRowsEditing[element.id]\"\n (editRowEmitter)=\"editRow(element, column)\"\n (saveEditRowEmitter)=\"saveEditRow(element, column)\"\n (cancelEditRowEmitter)=\"cancelEditRow(element, column)\"\n ></st-material-table-row-cell>\n </td>\n </ng-container>\n }\n\n <tr mat-header-row *matHeaderRowDef=\"selectedColumnsString\"></tr>\n <tr\n mat-row\n *matRowDef=\"let row; columns: selectedColumnsString\"\n (click)=\"rowClickAction ? rowClickAction(row) : null\"\n ></tr>\n </table>\n <mat-paginator\n [showFirstLastButtons]=\"true\"\n [pageSizeOptions]=\"[5, 10, 15, 20, 25]\"\n [length]=\"dataLength\"\n ></mat-paginator>\n</div>\n", styles: [".st-material-table{position:relative}.st-material-table .loading-spinner{position:absolute;top:0;left:0;width:100%;height:100%;background:#00000026;z-index:1;display:flex;justify-content:center}.st-material-table .loading-spinner mat-spinner{margin-top:5rem}\n", ".st-material-table .search-form button{height:40px}.st-material-table .search-form mat-form-field:first-child{padding-left:0}.st-material-table .search-form mat-form-field:last-child{padding-right:0}.st-material-table .search-form .clear{padding:0}.st-material-table .search-form .clear mat-icon{height:20px;width:20px;font-size:20px;cursor:pointer}.st-material-table table{width:100%;box-shadow:none}.st-material-table table th.mat-mdc-header-cell,.st-material-table table td.mat-mdc-cell,.st-material-table table td.mat-mdc-footer-cell{padding:0}.st-material-table table th.mat-mdc-header-cell:first-of-type,.st-material-table table td.mat-mdc-cell:first-of-type,.st-material-table table td.mat-mdc-footer-cell:first-of-type{padding-left:12px}.st-material-table table th.mat-mdc-header-cell:last-of-type,.st-material-table table td.mat-mdc-cell:last-of-type,.st-material-table table td.mat-mdc-footer-cell:last-of-type{padding-right:12px}.st-material-table table thead tr{background-color:#fff9c4;height:40px!important}.st-material-table table thead tr th{border-color:#fdd835;font-size:.9rem;font-weight:600;color:#424242}.st-material-table table tbody{background-color:transparent!important}.st-material-table table tbody>tr{cursor:pointer}.st-material-table table tbody>tr.active{background-color:#a5d6a7}.st-material-table table tbody>tr.active td{border-bottom-color:#81c784!important}.st-material-table table tbody>tr:hover{background-color:#f5f5f5}.st-material-table table tbody>tr.disabled{cursor:not-allowed}.st-material-table table tbody>tr.disabled:hover{background-color:inherit!important}.st-material-table table tbody>tr.detail-row{height:0;cursor:default}.st-material-table table tbody>tr.detail-row:hover{background-color:transparent}.st-material-table table tbody>tr.detail-row .element-detail{overflow:hidden;display:flex}.st-material-table table tbody>tr.detail-row .element-detail p{padding:20px 0;margin-bottom:0;white-space:pre-wrap}.st-material-table table tbody>tr td i.active-row{color:#1b5e20;font-weight:700;font-size:25px;height:25px;width:25px;margin-top:2px}.st-material-table table tbody>tr td>div{max-height:200px;overflow:hidden;overflow-y:auto}.st-material-table table tbody>tr td a button{color:#000}.st-material-table table tbody>tr td a mat-icon{color:#333}.st-material-table table .mat-column-active{width:48px}.st-material-table table.no-hover tbody tr{cursor:default}.st-material-table table.no-hover tbody tr.active{background-color:transparent!important}.st-material-table table.no-hover tbody tr.active td{border-bottom-color:#0000001f!important}.st-material-table table.no-hover tbody tr:hover{background-color:transparent!important}.st-material-table table.no-hover tbody tr:hover td{border-bottom-color:#0000001f!important}.st-material-table table.admin-table .actions-cell{width:100px}.dark-theme .st-material-table table{background-color:transparent!important}.dark-theme .st-material-table table thead tr{background-color:#5e4803!important}.dark-theme .st-material-table table thead tr th{border-color:#816204!important;color:#e0e0e0!important}.dark-theme .st-material-table tbody tr:hover{background-color:var(--primeng-table-hover-background)!important}.dark-theme mat-paginator{background-color:transparent!important}.dark-theme .reorder-column-list .reorder-column-element{background-color:#424242!important;color:#eee!important}.dark-theme .reorder-column-list .reorder-column-element p,.dark-theme .reorder-column-list .reorder-column-element mat-icon{color:#eee!important}.dark-theme .filter .filter-title{color:#eee!important}\n"] }]
1131
+ args: [{ selector: 'ngx-st-material-table', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div class=\"st-material-table\">\r\n @if (isLoading) {\r\n <div class=\"loading-spinner\">\r\n <mat-spinner color=\"accent\"></mat-spinner>\r\n </div>\r\n }\r\n\r\n @if (showTable) {\r\n <st-material-table-caption\r\n [tableTitle]=\"tableTitle\"\r\n [allowPickColumns]=\"allowPickColumns\"\r\n [showGlobalSearch]=\"showGlobalSearch\"\r\n [columns]=\"columns\"\r\n [initFilters]=\"initFilters\"\r\n [initGlobalSearch]=\"initGlobalSearch\"\r\n (captionDataChanged)=\"captionDataChanged($event)\"\r\n (resetTableSettings)=\"resetTableSettings()\"\r\n ></st-material-table-caption>\r\n }\r\n\r\n <table\r\n [ngClass]=\"{ 'no-hover': !rowClickAction }\"\r\n mat-table\r\n [dataSource]=\"tableSource\"\r\n matSort\r\n >\r\n @for (column of selectedColumns; track column) {\r\n <ng-container [matColumnDef]=\"column.field\">\r\n <th\r\n mat-header-cell\r\n *matHeaderCellDef\r\n style=\"{{ column.width ? 'width:' + column.width : '' }}\"\r\n mat-sort-header\r\n [disabled]=\"!column.sort\"\r\n >\r\n @if (column.type === 'actions-row-selecting') {\r\n <mat-checkbox\r\n color=\"primary\"\r\n (change)=\"$event ? toggleAllRows() : null\"\r\n [checked]=\"selection.hasValue() && isAllSelected()\"\r\n [indeterminate]=\"selection.hasValue() && !isAllSelected()\"\r\n >\r\n </mat-checkbox>\r\n } @else {\r\n {{ column.header }}\r\n }\r\n </th>\r\n <td\r\n mat-cell\r\n *matCellDef=\"let element\"\r\n style=\"{{ column.width ? 'width:' + column.width : '' }}\"\r\n >\r\n <st-material-table-row-cell\r\n [column]=\"column\"\r\n [rowData]=\"element\"\r\n [rowDataCopy]=\"activeRowsEditing[element.id]\"\r\n [rowEditing]=\"!!activeRowsEditing[element.id]\"\r\n [rowIsSelected]=\"selection.isSelected(element)\"\r\n (editRowEmitter)=\"editRow(element, column)\"\r\n (saveEditRowEmitter)=\"saveEditRow(element, column)\"\r\n (cancelEditRowEmitter)=\"cancelEditRow(element, column)\"\r\n (selectRowChange)=\"selectRowChanged($event, element)\"\r\n ></st-material-table-row-cell>\r\n </td>\r\n </ng-container>\r\n }\r\n\r\n <tr mat-header-row *matHeaderRowDef=\"selectedColumnsString\"></tr>\r\n <tr\r\n mat-row\r\n *matRowDef=\"let row; columns: selectedColumnsString\"\r\n (click)=\"rowClickAction ? rowClickAction(row) : null\"\r\n ></tr>\r\n </table>\r\n <mat-paginator\r\n [showFirstLastButtons]=\"true\"\r\n [pageSizeOptions]=\"[5, 10, 15, 20, 25]\"\r\n [length]=\"dataLength\"\r\n ></mat-paginator>\r\n @if (rowSelecting) {\r\n <div class=\"st-material-table-selected-rows\">\r\n <button mat-stroked-button [matMenuTriggerFor]=\"menu\">\r\n {{ selection.selected.length }} row selected\r\n </button>\r\n <mat-menu #menu=\"matMenu\">\r\n @for (row of selection.selected; track row) {\r\n <button mat-menu-item (click)=\"removeSelectedRow(row)\">\r\n <div class=\"d-flex\">\r\n {{ row[selectionFieldLabel]\r\n }}<mat-icon style=\"margin-right: 0; margin-left: 10px\"\r\n >delete</mat-icon\r\n >\r\n </div>\r\n </button>\r\n }\r\n </mat-menu>\r\n </div>\r\n }\r\n</div>\r\n", styles: [".st-material-table{position:relative}.st-material-table .loading-spinner{position:absolute;top:0;left:0;width:100%;height:100%;background:#00000026;z-index:1;display:flex;justify-content:center}.st-material-table .loading-spinner mat-spinner{margin-top:5rem}.st-material-table .st-material-table-selected-rows{position:absolute;bottom:12px;left:5px}\n", ".st-material-table .search-form button{height:40px}.st-material-table .search-form mat-form-field:first-child{padding-left:0}.st-material-table .search-form mat-form-field:last-child{padding-right:0}.st-material-table .search-form .clear{padding:0}.st-material-table .search-form .clear mat-icon{height:20px;width:20px;font-size:20px;cursor:pointer}.st-material-table table{width:100%;box-shadow:none}.st-material-table table th.mat-mdc-header-cell,.st-material-table table td.mat-mdc-cell,.st-material-table table td.mat-mdc-footer-cell{padding:0}.st-material-table table th.mat-mdc-header-cell:first-of-type,.st-material-table table td.mat-mdc-cell:first-of-type,.st-material-table table td.mat-mdc-footer-cell:first-of-type{padding-left:12px}.st-material-table table th.mat-mdc-header-cell:last-of-type,.st-material-table table td.mat-mdc-cell:last-of-type,.st-material-table table td.mat-mdc-footer-cell:last-of-type{padding-right:12px}.st-material-table table thead tr{background-color:#fff9c4;height:40px!important}.st-material-table table thead tr th{border-color:#fdd835;font-size:.9rem;font-weight:600;color:#424242}.st-material-table table tbody{background-color:transparent!important}.st-material-table table tbody>tr{cursor:pointer}.st-material-table table tbody>tr.active{background-color:#a5d6a7}.st-material-table table tbody>tr.active td{border-bottom-color:#81c784!important}.st-material-table table tbody>tr:hover{background-color:#f5f5f5}.st-material-table table tbody>tr.disabled{cursor:not-allowed}.st-material-table table tbody>tr.disabled:hover{background-color:inherit!important}.st-material-table table tbody>tr.detail-row{height:0;cursor:default}.st-material-table table tbody>tr.detail-row:hover{background-color:transparent}.st-material-table table tbody>tr.detail-row .element-detail{overflow:hidden;display:flex}.st-material-table table tbody>tr.detail-row .element-detail p{padding:20px 0;margin-bottom:0;white-space:pre-wrap}.st-material-table table tbody>tr td i.active-row{color:#1b5e20;font-weight:700;font-size:25px;height:25px;width:25px;margin-top:2px}.st-material-table table tbody>tr td>div{max-height:200px;overflow:hidden;overflow-y:auto}.st-material-table table tbody>tr td a button{color:#000}.st-material-table table tbody>tr td a mat-icon{color:#333}.st-material-table table .mat-column-active{width:48px}.st-material-table table.no-hover tbody tr{cursor:default}.st-material-table table.no-hover tbody tr.active{background-color:transparent!important}.st-material-table table.no-hover tbody tr.active td{border-bottom-color:#0000001f!important}.st-material-table table.no-hover tbody tr:hover{background-color:transparent!important}.st-material-table table.no-hover tbody tr:hover td{border-bottom-color:#0000001f!important}.st-material-table table.admin-table .actions-cell{width:100px}.dark-theme .st-material-table table{background-color:transparent!important}.dark-theme .st-material-table table thead tr{background-color:#5e4803!important}.dark-theme .st-material-table table thead tr th{border-color:#816204!important;color:#e0e0e0!important}.dark-theme .st-material-table tbody tr:hover{background-color:var(--primeng-table-hover-background)!important}.dark-theme mat-paginator{background-color:transparent!important}.dark-theme .reorder-column-list .reorder-column-element{background-color:#424242!important;color:#eee!important}.dark-theme .reorder-column-list .reorder-column-element p,.dark-theme .reorder-column-list .reorder-column-element mat-icon{color:#eee!important}.dark-theme .filter .filter-title{color:#eee!important}\n"] }]
1078
1132
  }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i1$1.StSnackBarService }], propDecorators: { paginator: [{
1079
1133
  type: ViewChild,
1080
1134
  args: [MatPaginator]
@@ -1107,10 +1161,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
1107
1161
  type: Input
1108
1162
  }], rowEditing: [{
1109
1163
  type: Input
1164
+ }], rowSelecting: [{
1165
+ type: Input
1166
+ }], selectionFieldLabel: [{
1167
+ type: Input
1110
1168
  }], loadData: [{
1111
1169
  type: Output
1112
1170
  }], saveNewRow: [{
1113
1171
  type: Output
1172
+ }], selectRowChange: [{
1173
+ type: Output
1114
1174
  }] } });
1115
1175
 
1116
1176
  class StTablesModule {