ngx-st-tables 17.0.5 → 17.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (22) hide show
  1. package/assets/base-table.scss +2 -2
  2. package/esm2022/lib/components/local-table/local-table.component.mjs +2 -2
  3. package/esm2022/lib/components/material-table/material-table-caption/material-table-caption.component.mjs +137 -0
  4. package/esm2022/lib/components/material-table/material-table-caption/material-table-filter-dialog/material-table-filter-dialog.component.mjs +68 -0
  5. package/esm2022/lib/components/material-table/material-table-caption/material-table-order-column-dialog/material-table-order-column-dialog.component.mjs +36 -0
  6. package/esm2022/lib/components/material-table/material-table.component.mjs +298 -0
  7. package/esm2022/lib/components/select-table/select-table.component.mjs +2 -2
  8. package/esm2022/lib/models/st-material-table-column.model.mjs +2 -0
  9. package/esm2022/lib/models/view/view-st-material-table-column.model.mjs +2 -0
  10. package/esm2022/lib/ngx-st-tables.module.mjs +41 -5
  11. package/esm2022/public-api.mjs +4 -1
  12. package/fesm2022/ngx-st-tables.mjs +542 -19
  13. package/fesm2022/ngx-st-tables.mjs.map +1 -1
  14. package/lib/components/material-table/material-table-caption/material-table-caption.component.d.ts +44 -0
  15. package/lib/components/material-table/material-table-caption/material-table-filter-dialog/material-table-filter-dialog.component.d.ts +36 -0
  16. package/lib/components/material-table/material-table-caption/material-table-order-column-dialog/material-table-order-column-dialog.component.d.ts +23 -0
  17. package/lib/components/material-table/material-table.component.d.ts +74 -0
  18. package/lib/models/st-material-table-column.model.d.ts +28 -0
  19. package/lib/models/view/view-st-material-table-column.model.d.ts +6 -0
  20. package/lib/ngx-st-tables.module.d.ts +26 -16
  21. package/package.json +3 -2
  22. package/public-api.d.ts +3 -0
@@ -16,7 +16,7 @@
16
16
  .clear {
17
17
  padding: 0;
18
18
 
19
- i {
19
+ mat-icon {
20
20
  height: 20px;
21
21
  width: 20px;
22
22
  font-size: 20px;
@@ -131,7 +131,7 @@ table {
131
131
  color: #000;
132
132
  }
133
133
 
134
- i {
134
+ mat-icon {
135
135
  color: #333;
136
136
  }
137
137
  }
@@ -226,11 +226,11 @@ export class LocalTableComponent {
226
226
  this.setDisplayedColumns();
227
227
  }
228
228
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: LocalTableComponent, deps: [{ token: i1.LocalTableService }, { token: i0.ChangeDetectorRef }, { token: i2.Router }, { token: i2.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component }); }
229
- 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: ["", ".search-form button{height:40px}.search-form mat-form-field:first-child{padding-left:0}.search-form mat-form-field:last-child{padding-right:0}.search-form .clear{padding:0}.search-form .clear i{height:20px;width:20px;font-size:20px;cursor:pointer}table{width:100%;box-shadow:none}table th.mat-mdc-header-cell,table td.mat-mdc-cell,table td.mat-mdc-footer-cell{padding:0}table th.mat-mdc-header-cell:first-of-type,table td.mat-mdc-cell:first-of-type,table td.mat-mdc-footer-cell:first-of-type{padding-left:12px}table th.mat-mdc-header-cell:last-of-type,table td.mat-mdc-cell:last-of-type,table td.mat-mdc-footer-cell:last-of-type{padding-right:12px}table::ng-deep thead tr{background-color:#fff9c4;height:40px!important}table::ng-deep thead tr th{border-color:#fdd835;color:#0000008a;font-size:12px}table::ng-deep tbody>tr{cursor:pointer}table::ng-deep tbody>tr.active{background-color:#a5d6a7}table::ng-deep tbody>tr.active td{border-bottom-color:#81c784!important}table::ng-deep tbody>tr:hover{background-color:#a5d6a7!important}table::ng-deep tbody>tr:hover td{border-bottom-color:#81c784!important}table::ng-deep tbody>tr.disabled{cursor:not-allowed}table::ng-deep tbody>tr.disabled:hover{background-color:inherit!important}table::ng-deep tbody>tr.detail-row{height:0;cursor:default}table::ng-deep tbody>tr.detail-row:hover{background-color:transparent}table::ng-deep tbody>tr.detail-row .element-detail{overflow:hidden;display:flex}table::ng-deep tbody>tr.detail-row .element-detail p{padding:20px 0;margin-bottom:0;white-space:pre-wrap}table::ng-deep tbody>tr td i.active-row{color:#1b5e20;font-weight:700;font-size:25px;height:25px;width:25px;margin-top:2px}table::ng-deep tbody>tr td>div{max-height:200px;overflow:hidden;overflow-y:auto}table::ng-deep tbody>tr td a button{color:#000}table::ng-deep tbody>tr td a i{color:#333}table::ng-deep .mat-column-active{width:48px}table.no-hover::ng-deep tbody tr{cursor:default}table.no-hover::ng-deep tbody tr.active{background-color:transparent!important}table.no-hover::ng-deep tbody tr.active td{border-bottom-color:#0000001f!important}table.no-hover::ng-deep tbody tr:hover{background-color:transparent!important}table.no-hover::ng-deep tbody tr:hover td{border-bottom-color:#0000001f!important}table.admin-table::ng-deep .actions-cell{width:100px}\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: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i6.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i6.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i6.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i6.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i6.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i6.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i6.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i6.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i6.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i6.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i7.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: i9.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: i11.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: i11.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i11.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2.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: i15.ConfigurationsComponent, selector: "st-configurations[configurationsSettings]", inputs: ["configurationsSettings", "configurations", "initSelectedConfig"], outputs: ["createNewConfig", "removeConfig", "changeConfig"] }, { kind: "pipe", type: i16.DateTimeFormatPipe, name: "stDateTimeFormatPipe" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
229
+ 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: ["", ".search-form button{height:40px}.search-form mat-form-field:first-child{padding-left:0}.search-form mat-form-field:last-child{padding-right:0}.search-form .clear{padding:0}.search-form .clear mat-icon{height:20px;width:20px;font-size:20px;cursor:pointer}table{width:100%;box-shadow:none}table th.mat-mdc-header-cell,table td.mat-mdc-cell,table td.mat-mdc-footer-cell{padding:0}table th.mat-mdc-header-cell:first-of-type,table td.mat-mdc-cell:first-of-type,table td.mat-mdc-footer-cell:first-of-type{padding-left:12px}table th.mat-mdc-header-cell:last-of-type,table td.mat-mdc-cell:last-of-type,table td.mat-mdc-footer-cell:last-of-type{padding-right:12px}table::ng-deep thead tr{background-color:#fff9c4;height:40px!important}table::ng-deep thead tr th{border-color:#fdd835;color:#0000008a;font-size:12px}table::ng-deep tbody>tr{cursor:pointer}table::ng-deep tbody>tr.active{background-color:#a5d6a7}table::ng-deep tbody>tr.active td{border-bottom-color:#81c784!important}table::ng-deep tbody>tr:hover{background-color:#a5d6a7!important}table::ng-deep tbody>tr:hover td{border-bottom-color:#81c784!important}table::ng-deep tbody>tr.disabled{cursor:not-allowed}table::ng-deep tbody>tr.disabled:hover{background-color:inherit!important}table::ng-deep tbody>tr.detail-row{height:0;cursor:default}table::ng-deep tbody>tr.detail-row:hover{background-color:transparent}table::ng-deep tbody>tr.detail-row .element-detail{overflow:hidden;display:flex}table::ng-deep tbody>tr.detail-row .element-detail p{padding:20px 0;margin-bottom:0;white-space:pre-wrap}table::ng-deep tbody>tr td i.active-row{color:#1b5e20;font-weight:700;font-size:25px;height:25px;width:25px;margin-top:2px}table::ng-deep tbody>tr td>div{max-height:200px;overflow:hidden;overflow-y:auto}table::ng-deep tbody>tr td a button{color:#000}table::ng-deep tbody>tr td a mat-icon{color:#333}table::ng-deep .mat-column-active{width:48px}table.no-hover::ng-deep tbody tr{cursor:default}table.no-hover::ng-deep tbody tr.active{background-color:transparent!important}table.no-hover::ng-deep tbody tr.active td{border-bottom-color:#0000001f!important}table.no-hover::ng-deep tbody tr:hover{background-color:transparent!important}table.no-hover::ng-deep tbody tr:hover td{border-bottom-color:#0000001f!important}table.admin-table::ng-deep .actions-cell{width:100px}\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: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i6.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i6.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i6.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i6.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i6.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i6.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i6.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i6.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i6.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i6.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i7.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: i9.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: i11.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: i11.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i11.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2.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: i15.ConfigurationsComponent, selector: "st-configurations[configurationsSettings]", inputs: ["configurationsSettings", "configurations", "initSelectedConfig"], outputs: ["createNewConfig", "removeConfig", "changeConfig"] }, { kind: "pipe", type: i16.DateTimeFormatPipe, name: "stDateTimeFormatPipe" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
230
230
  }
231
231
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: LocalTableComponent, decorators: [{
232
232
  type: Component,
233
- 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: [".search-form button{height:40px}.search-form mat-form-field:first-child{padding-left:0}.search-form mat-form-field:last-child{padding-right:0}.search-form .clear{padding:0}.search-form .clear i{height:20px;width:20px;font-size:20px;cursor:pointer}table{width:100%;box-shadow:none}table th.mat-mdc-header-cell,table td.mat-mdc-cell,table td.mat-mdc-footer-cell{padding:0}table th.mat-mdc-header-cell:first-of-type,table td.mat-mdc-cell:first-of-type,table td.mat-mdc-footer-cell:first-of-type{padding-left:12px}table th.mat-mdc-header-cell:last-of-type,table td.mat-mdc-cell:last-of-type,table td.mat-mdc-footer-cell:last-of-type{padding-right:12px}table::ng-deep thead tr{background-color:#fff9c4;height:40px!important}table::ng-deep thead tr th{border-color:#fdd835;color:#0000008a;font-size:12px}table::ng-deep tbody>tr{cursor:pointer}table::ng-deep tbody>tr.active{background-color:#a5d6a7}table::ng-deep tbody>tr.active td{border-bottom-color:#81c784!important}table::ng-deep tbody>tr:hover{background-color:#a5d6a7!important}table::ng-deep tbody>tr:hover td{border-bottom-color:#81c784!important}table::ng-deep tbody>tr.disabled{cursor:not-allowed}table::ng-deep tbody>tr.disabled:hover{background-color:inherit!important}table::ng-deep tbody>tr.detail-row{height:0;cursor:default}table::ng-deep tbody>tr.detail-row:hover{background-color:transparent}table::ng-deep tbody>tr.detail-row .element-detail{overflow:hidden;display:flex}table::ng-deep tbody>tr.detail-row .element-detail p{padding:20px 0;margin-bottom:0;white-space:pre-wrap}table::ng-deep tbody>tr td i.active-row{color:#1b5e20;font-weight:700;font-size:25px;height:25px;width:25px;margin-top:2px}table::ng-deep tbody>tr td>div{max-height:200px;overflow:hidden;overflow-y:auto}table::ng-deep tbody>tr td a button{color:#000}table::ng-deep tbody>tr td a i{color:#333}table::ng-deep .mat-column-active{width:48px}table.no-hover::ng-deep tbody tr{cursor:default}table.no-hover::ng-deep tbody tr.active{background-color:transparent!important}table.no-hover::ng-deep tbody tr.active td{border-bottom-color:#0000001f!important}table.no-hover::ng-deep tbody tr:hover{background-color:transparent!important}table.no-hover::ng-deep tbody tr:hover td{border-bottom-color:#0000001f!important}table.admin-table::ng-deep .actions-cell{width:100px}\n"] }]
233
+ 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: [".search-form button{height:40px}.search-form mat-form-field:first-child{padding-left:0}.search-form mat-form-field:last-child{padding-right:0}.search-form .clear{padding:0}.search-form .clear mat-icon{height:20px;width:20px;font-size:20px;cursor:pointer}table{width:100%;box-shadow:none}table th.mat-mdc-header-cell,table td.mat-mdc-cell,table td.mat-mdc-footer-cell{padding:0}table th.mat-mdc-header-cell:first-of-type,table td.mat-mdc-cell:first-of-type,table td.mat-mdc-footer-cell:first-of-type{padding-left:12px}table th.mat-mdc-header-cell:last-of-type,table td.mat-mdc-cell:last-of-type,table td.mat-mdc-footer-cell:last-of-type{padding-right:12px}table::ng-deep thead tr{background-color:#fff9c4;height:40px!important}table::ng-deep thead tr th{border-color:#fdd835;color:#0000008a;font-size:12px}table::ng-deep tbody>tr{cursor:pointer}table::ng-deep tbody>tr.active{background-color:#a5d6a7}table::ng-deep tbody>tr.active td{border-bottom-color:#81c784!important}table::ng-deep tbody>tr:hover{background-color:#a5d6a7!important}table::ng-deep tbody>tr:hover td{border-bottom-color:#81c784!important}table::ng-deep tbody>tr.disabled{cursor:not-allowed}table::ng-deep tbody>tr.disabled:hover{background-color:inherit!important}table::ng-deep tbody>tr.detail-row{height:0;cursor:default}table::ng-deep tbody>tr.detail-row:hover{background-color:transparent}table::ng-deep tbody>tr.detail-row .element-detail{overflow:hidden;display:flex}table::ng-deep tbody>tr.detail-row .element-detail p{padding:20px 0;margin-bottom:0;white-space:pre-wrap}table::ng-deep tbody>tr td i.active-row{color:#1b5e20;font-weight:700;font-size:25px;height:25px;width:25px;margin-top:2px}table::ng-deep tbody>tr td>div{max-height:200px;overflow:hidden;overflow-y:auto}table::ng-deep tbody>tr td a button{color:#000}table::ng-deep tbody>tr td a mat-icon{color:#333}table::ng-deep .mat-column-active{width:48px}table.no-hover::ng-deep tbody tr{cursor:default}table.no-hover::ng-deep tbody tr.active{background-color:transparent!important}table.no-hover::ng-deep tbody tr.active td{border-bottom-color:#0000001f!important}table.no-hover::ng-deep tbody tr:hover{background-color:transparent!important}table.no-hover::ng-deep tbody tr:hover td{border-bottom-color:#0000001f!important}table.admin-table::ng-deep .actions-cell{width:100px}\n"] }]
234
234
  }], ctorParameters: () => [{ type: i1.LocalTableService }, { type: i0.ChangeDetectorRef }, { type: i2.Router }, { type: i2.ActivatedRoute }], propDecorators: { paginator: [{
235
235
  type: ViewChild,
236
236
  args: [MatPaginator]
@@ -0,0 +1,137 @@
1
+ import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output, } from '@angular/core';
2
+ import { FormControl } from '@angular/forms';
3
+ import { StBaseService, StSubscribeDestroyComponent, } from 'ngx-st-base-functions';
4
+ import { debounceTime, distinctUntilChanged, filter, take, takeUntil, } from 'rxjs/operators';
5
+ import { MaterialTableFilterDialogComponent, } from './material-table-filter-dialog/material-table-filter-dialog.component';
6
+ import { MaterialTableOrderColumnDialogComponent } from './material-table-order-column-dialog/material-table-order-column-dialog.component';
7
+ import * as i0 from "@angular/core";
8
+ import * as i1 from "@angular/material/dialog";
9
+ import * as i2 from "@angular/common";
10
+ import * as i3 from "@angular/material/button";
11
+ import * as i4 from "@angular/material/icon";
12
+ import * as i5 from "@angular/material/form-field";
13
+ import * as i6 from "@angular/material/input";
14
+ import * as i7 from "@angular/forms";
15
+ import * as i8 from "@angular/material/select";
16
+ import * as i9 from "@angular/material/core";
17
+ import * as i10 from "@angular/material/badge";
18
+ export class MaterialTableCaptionComponent extends StSubscribeDestroyComponent {
19
+ set columns(data) {
20
+ this._columns = data ? data : [];
21
+ this.updateColumns();
22
+ }
23
+ get columns() {
24
+ return this._columns;
25
+ }
26
+ constructor(dialog) {
27
+ super();
28
+ this.dialog = dialog;
29
+ this.allowPickColumns = true;
30
+ this.allowReorderColumns = true;
31
+ this.initGlobalSearch = '';
32
+ this.initFilters = {};
33
+ this._columns = [];
34
+ this.captionDataChanged = new EventEmitter();
35
+ this.showFilterButton = false;
36
+ this.selectedColumns = new FormControl([]);
37
+ this.globalSearch = new FormControl('');
38
+ this.activeFiltersCount = 0;
39
+ this.columnsOrder = [];
40
+ this.filters = {};
41
+ }
42
+ ngOnInit() {
43
+ this.globalSearch.setValue(this.initGlobalSearch || '');
44
+ this.filters = this.initFilters || {};
45
+ this.setActiveFiltersCount();
46
+ this.selectedColumns.valueChanges
47
+ .pipe(takeUntil(this.ngDestroyed$), distinctUntilChanged((prev, curr) => JSON.stringify(prev) === JSON.stringify(curr)), debounceTime(400))
48
+ .subscribe(value => {
49
+ console.log('selectedColumnsChanged');
50
+ this.emitCaptionDataChanged();
51
+ });
52
+ this.globalSearch.valueChanges
53
+ .pipe(takeUntil(this.ngDestroyed$), distinctUntilChanged((prev, curr) => JSON.stringify(prev) === JSON.stringify(curr)), debounceTime(400))
54
+ .subscribe(value => {
55
+ console.log('globalSearchChanged');
56
+ this.emitCaptionDataChanged();
57
+ });
58
+ }
59
+ openFilterDialog() {
60
+ this.dialog
61
+ .open(MaterialTableFilterDialogComponent, {
62
+ data: {
63
+ initFilters: this.filters,
64
+ columns: this.columns,
65
+ },
66
+ maxWidth: '450px',
67
+ width: '100%',
68
+ autoFocus: false,
69
+ })
70
+ .afterClosed()
71
+ .pipe(take(1), filter(StBaseService.notNull))
72
+ .subscribe((res) => {
73
+ this.filters = res.filters;
74
+ this.setActiveFiltersCount();
75
+ console.log('filtersChanged');
76
+ this.emitCaptionDataChanged();
77
+ });
78
+ }
79
+ openReorderColumnsDialog() {
80
+ this.dialog
81
+ .open(MaterialTableOrderColumnDialogComponent, {
82
+ data: {
83
+ columns: this.columns,
84
+ },
85
+ maxWidth: '450px',
86
+ width: '100%',
87
+ autoFocus: false,
88
+ })
89
+ .afterClosed()
90
+ .pipe(take(1), filter(StBaseService.notNull))
91
+ .subscribe((result) => {
92
+ this.columnsOrder = result.columnsOrder;
93
+ console.log('columnsOrderChanged');
94
+ this.emitCaptionDataChanged();
95
+ });
96
+ }
97
+ emitCaptionDataChanged() {
98
+ this.captionDataChanged.emit({
99
+ selectedColumns: this.selectedColumns.value || [],
100
+ globalSearch: this.globalSearch.value || '',
101
+ columnsOrder: this.columnsOrder || [],
102
+ filters: this.filters,
103
+ });
104
+ }
105
+ updateColumns() {
106
+ const columnsFilters = this._columns.filter(column => column.filter);
107
+ this.showFilterButton = columnsFilters.length > 0;
108
+ this.selectedColumns.setValue(this._columns.filter(col => col.visible).map(col => col.field) || []);
109
+ this.columnsOrder = this._columns.map(col => col.field) || [];
110
+ }
111
+ setActiveFiltersCount() {
112
+ const filtersKeys = Object.keys(this.filters);
113
+ this.activeFiltersCount =
114
+ filtersKeys.filter(key => this.filters[key]).length || 0;
115
+ }
116
+ 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 }); }
117
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: MaterialTableCaptionComponent, selector: "st-material-table-caption", inputs: { globalSearchSettings: "globalSearchSettings", allowPickColumns: "allowPickColumns", allowReorderColumns: "allowReorderColumns", initGlobalSearch: "initGlobalSearch", initFilters: "initFilters", columns: "columns" }, outputs: { captionDataChanged: "captionDataChanged" }, usesInheritance: true, ngImport: i0, template: "<div\r\n class=\"st-material-table-caption row align-items-center\"\r\n [ngClass]=\"{\r\n 'justify-content-between': allowPickColumns && globalSearchSettings?.show,\r\n 'justify-content-end': !allowPickColumns && globalSearchSettings?.show\r\n }\"\r\n>\r\n @if (allowPickColumns) {\r\n <div class=\"col-auto d-flex align-items-center\">\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.translateColumnName || column.field\r\n }}</mat-option>\r\n }\r\n </mat-select>\r\n </mat-form-field>\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 (globalSearchSettings?.show) {\r\n <div class=\"col-auto d-flex align-items-center\">\r\n @if (showFilterButton) {\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 <mat-form-field appearance=\"outline\">\r\n <input\r\n matInput\r\n [formControl]=\"globalSearch\"\r\n [placeholder]=\"globalSearchSettings?.label || 'Global 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 </div>\r\n }\r\n</div>\r\n", styles: [".st-material-table-caption{width:100%;margin-top:5px}.st-material-table-caption .reorder-icon{transform:scaleX(-1) rotate(90deg)}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i3.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i5.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i5.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.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.MatSelectTrigger, selector: "mat-select-trigger" }, { kind: "component", type: i9.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: i10.MatBadge, selector: "[matBadge]", inputs: ["matBadgeColor", "matBadgeOverlap", "matBadgeDisabled", "matBadgePosition", "matBadge", "matBadgeDescription", "matBadgeSize", "matBadgeHidden"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
118
+ }
119
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MaterialTableCaptionComponent, decorators: [{
120
+ type: Component,
121
+ args: [{ selector: 'st-material-table-caption', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\r\n class=\"st-material-table-caption row align-items-center\"\r\n [ngClass]=\"{\r\n 'justify-content-between': allowPickColumns && globalSearchSettings?.show,\r\n 'justify-content-end': !allowPickColumns && globalSearchSettings?.show\r\n }\"\r\n>\r\n @if (allowPickColumns) {\r\n <div class=\"col-auto d-flex align-items-center\">\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.translateColumnName || column.field\r\n }}</mat-option>\r\n }\r\n </mat-select>\r\n </mat-form-field>\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 (globalSearchSettings?.show) {\r\n <div class=\"col-auto d-flex align-items-center\">\r\n @if (showFilterButton) {\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 <mat-form-field appearance=\"outline\">\r\n <input\r\n matInput\r\n [formControl]=\"globalSearch\"\r\n [placeholder]=\"globalSearchSettings?.label || 'Global 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 </div>\r\n }\r\n</div>\r\n", styles: [".st-material-table-caption{width:100%;margin-top:5px}.st-material-table-caption .reorder-icon{transform:scaleX(-1) rotate(90deg)}\n"] }]
122
+ }], ctorParameters: () => [{ type: i1.MatDialog }], propDecorators: { globalSearchSettings: [{
123
+ type: Input
124
+ }], allowPickColumns: [{
125
+ type: Input
126
+ }], allowReorderColumns: [{
127
+ type: Input
128
+ }], initGlobalSearch: [{
129
+ type: Input
130
+ }], initFilters: [{
131
+ type: Input
132
+ }], columns: [{
133
+ type: Input
134
+ }], captionDataChanged: [{
135
+ type: Output
136
+ }] } });
137
+ //# sourceMappingURL=data:application/json;base64,eyJ2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uICAgICAgICAvPlxyXG4gICAgICAgIDxidXR0b25cclxuICAgICAgICAgIG1hdFN1ZmZpeFxyXG4gICAgICAgICAgbWF0LWljb24tYnV0dG9uXHJcbiAgICAgICAgICBhcmlhLWxhYmVsPVwiQ2xlYXJcIlxyXG4gICAgICAgICAgKGNsaWNrKT1cImdsb2JhbFNlYXJjaC5zZXRWYWx1ZSgnJylcIlxyXG4gICAgICAgID5cclxuICAgICAgICAgIDxtYXQtaWNvbiBzdHlsZT1cImZvbnQtc2l6ZTogMjJweFwiPmNsb3NlPC9tYXQtaWNvbj5cclxuICAgICAgICA8L2J1dHRvbj5cclxuICAgICAgPC9tYXQtZm9ybS1maWVsZD5cclxuICAgIDwvZGl2PlxyXG4gIH1cclxuPC9kaXY+XHJcbiJdfQ==
@@ -0,0 +1,68 @@
1
+ import { ChangeDetectionStrategy, Component, Inject, } from '@angular/core';
2
+ import { MAT_DIALOG_DATA } from '@angular/material/dialog';
3
+ import * as i0 from "@angular/core";
4
+ import * as i1 from "@angular/material/dialog";
5
+ import * as i2 from "@angular/forms";
6
+ import * as i3 from "@angular/common";
7
+ import * as i4 from "@angular/material/button";
8
+ import * as i5 from "@angular/material/icon";
9
+ import * as i6 from "@angular/material/form-field";
10
+ import * as i7 from "@angular/material/input";
11
+ export class MaterialTableFilterDialogComponent {
12
+ constructor(dialogData, dialogRef, fb, changeDetectorRef) {
13
+ this.dialogData = dialogData;
14
+ this.dialogRef = dialogRef;
15
+ this.fb = fb;
16
+ this.changeDetectorRef = changeDetectorRef;
17
+ this.filterColumns = [];
18
+ this.formGroup = this.fb.group({});
19
+ this.allVisible = true;
20
+ }
21
+ ngOnInit() {
22
+ this.filterColumns = this.dialogData.columns
23
+ .filter(column => column.filter)
24
+ .map(col => {
25
+ this.formGroup.addControl(col.field, this.fb.control(''));
26
+ return {
27
+ ...col,
28
+ };
29
+ });
30
+ if (this.dialogData.initFilters) {
31
+ const filtersKeys = Object.keys(this.dialogData.initFilters);
32
+ filtersKeys.forEach(key => {
33
+ if (this.formGroup.get(key)) {
34
+ this.formGroup.get(key)?.setValue(this.dialogData.initFilters[key]);
35
+ }
36
+ });
37
+ }
38
+ }
39
+ showAllFilters() {
40
+ this.filterColumns.forEach(column => {
41
+ column.expanded = true;
42
+ });
43
+ this.allVisible = true;
44
+ this.changeDetectorRef.markForCheck();
45
+ }
46
+ hideAllFilters() {
47
+ this.filterColumns.forEach(column => {
48
+ column.expanded = false;
49
+ });
50
+ this.allVisible = false;
51
+ this.changeDetectorRef.markForCheck();
52
+ }
53
+ saveFilters() {
54
+ this.dialogRef.close({
55
+ filters: this.formGroup.getRawValue(),
56
+ });
57
+ }
58
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MaterialTableFilterDialogComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: i1.MatDialogRef }, { token: i2.NonNullableFormBuilder }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
59
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: MaterialTableFilterDialogComponent, selector: "st-material-table-filter-dialog", ngImport: i0, template: "<div mat-dialog-title class=\"filters-dialog-title-container\">\r\n <div class=\"row justify-content-between align-items-center\">\r\n <div class=\"col-auto\">\r\n <h3>Filters</h3>\r\n </div>\r\n <div class=\"col-auto\">\r\n <button mat-icon-button (click)=\"showAllFilters()\" *ngIf=\"!allVisible\">\r\n <mat-icon>unfold_more</mat-icon>\r\n </button>\r\n <button mat-icon-button (click)=\"hideAllFilters()\" *ngIf=\"allVisible\">\r\n <mat-icon>unfold_less</mat-icon>\r\n </button>\r\n </div>\r\n </div>\r\n <hr />\r\n</div>\r\n\r\n<mat-dialog-content>\r\n <form [formGroup]=\"formGroup\">\r\n @for (column of filterColumns; track column.field) {\r\n @switch (column.type) {\r\n @case ('string') {\r\n <div class=\"filter\">\r\n <div class=\"filter-title row justify-content-between\">\r\n {{ column.translateColumnName || column.field }}\r\n\r\n @if (column.expanded) {\r\n <mat-icon (click)=\"column.expanded = !column.expanded\"\r\n >keyboard_arrow_up</mat-icon\r\n >\r\n } @else {\r\n <mat-icon (click)=\"column.expanded = !column.expanded\"\r\n >keyboard_arrow_down</mat-icon\r\n >\r\n }\r\n </div>\r\n <div\r\n class=\"filter-content row\"\r\n [ngClass]=\"{ hide: !column.expanded }\"\r\n >\r\n <div class=\"col-auto\">\r\n <mat-form-field appearance=\"outline\" style=\"width: 100px\">\r\n <mat-label>Filter</mat-label>\r\n <input\r\n matInput\r\n type=\"text\"\r\n [disabled]=\"true\"\r\n [value]=\"'Contains'\"\r\n />\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"col\">\r\n <mat-form-field appearance=\"outline\">\r\n <mat-label>Search</mat-label>\r\n <input\r\n matInput\r\n type=\"text\"\r\n [disabled]=\"column.visible\"\r\n [formControlName]=\"column.field\"\r\n />\r\n <button\r\n matSuffix\r\n mat-icon-button\r\n aria-label=\"Clear\"\r\n (click)=\"formGroup.controls[column.field].setValue('')\"\r\n >\r\n <mat-icon style=\"font-size: 22px\">close</mat-icon>\r\n </button>\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n }\r\n }\r\n </form>\r\n</mat-dialog-content>\r\n<mat-dialog-actions>\r\n <div class=\"row justify-content-between\">\r\n <button mat-flat-button mat-dialog-close>Cancel</button>\r\n <button mat-flat-button color=\"accent\" (click)=\"saveFilters()\">Save</button>\r\n </div>\r\n</mat-dialog-actions>\r\n", styles: [".filters-dialog-title-container{display:flex;align-items:center;flex-direction:column;padding-bottom:0;margin-bottom:0}.filters-dialog-title-container:before{display:none!important}.filters-dialog-title-container div.row>div.col-auto{padding:0!important}.filters-dialog-title-container div.row>div.col-auto h3{margin-bottom:0}.filters-dialog-title-container hr{margin-top:.5rem}.filter{width:100%;margin-bottom:1rem;padding-bottom:.5rem;border-bottom:1px solid #e0e0e0}.filter .filter-title{padding:.5rem 0;color:#000c;font-size:1rem;font-weight:500}.filter .filter-title mat-icon{cursor:pointer}.filter .filter-content{margin-top:.5rem;gap:.5rem}.filter .filter-content.hide{display:none}.filter .filter-content>div.col-auto,.filter .filter-content>div.col{padding:0!important}.filter .filter-content mat-form-field{width:100%}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i4.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i6.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6.MatLabel, selector: "mat-label" }, { kind: "directive", type: i6.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: i7.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "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]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
60
+ }
61
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MaterialTableFilterDialogComponent, decorators: [{
62
+ type: Component,
63
+ args: [{ selector: 'st-material-table-filter-dialog', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div mat-dialog-title class=\"filters-dialog-title-container\">\r\n <div class=\"row justify-content-between align-items-center\">\r\n <div class=\"col-auto\">\r\n <h3>Filters</h3>\r\n </div>\r\n <div class=\"col-auto\">\r\n <button mat-icon-button (click)=\"showAllFilters()\" *ngIf=\"!allVisible\">\r\n <mat-icon>unfold_more</mat-icon>\r\n </button>\r\n <button mat-icon-button (click)=\"hideAllFilters()\" *ngIf=\"allVisible\">\r\n <mat-icon>unfold_less</mat-icon>\r\n </button>\r\n </div>\r\n </div>\r\n <hr />\r\n</div>\r\n\r\n<mat-dialog-content>\r\n <form [formGroup]=\"formGroup\">\r\n @for (column of filterColumns; track column.field) {\r\n @switch (column.type) {\r\n @case ('string') {\r\n <div class=\"filter\">\r\n <div class=\"filter-title row justify-content-between\">\r\n {{ column.translateColumnName || column.field }}\r\n\r\n @if (column.expanded) {\r\n <mat-icon (click)=\"column.expanded = !column.expanded\"\r\n >keyboard_arrow_up</mat-icon\r\n >\r\n } @else {\r\n <mat-icon (click)=\"column.expanded = !column.expanded\"\r\n >keyboard_arrow_down</mat-icon\r\n >\r\n }\r\n </div>\r\n <div\r\n class=\"filter-content row\"\r\n [ngClass]=\"{ hide: !column.expanded }\"\r\n >\r\n <div class=\"col-auto\">\r\n <mat-form-field appearance=\"outline\" style=\"width: 100px\">\r\n <mat-label>Filter</mat-label>\r\n <input\r\n matInput\r\n type=\"text\"\r\n [disabled]=\"true\"\r\n [value]=\"'Contains'\"\r\n />\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"col\">\r\n <mat-form-field appearance=\"outline\">\r\n <mat-label>Search</mat-label>\r\n <input\r\n matInput\r\n type=\"text\"\r\n [disabled]=\"column.visible\"\r\n [formControlName]=\"column.field\"\r\n />\r\n <button\r\n matSuffix\r\n mat-icon-button\r\n aria-label=\"Clear\"\r\n (click)=\"formGroup.controls[column.field].setValue('')\"\r\n >\r\n <mat-icon style=\"font-size: 22px\">close</mat-icon>\r\n </button>\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n }\r\n }\r\n </form>\r\n</mat-dialog-content>\r\n<mat-dialog-actions>\r\n <div class=\"row justify-content-between\">\r\n <button mat-flat-button mat-dialog-close>Cancel</button>\r\n <button mat-flat-button color=\"accent\" (click)=\"saveFilters()\">Save</button>\r\n </div>\r\n</mat-dialog-actions>\r\n", styles: [".filters-dialog-title-container{display:flex;align-items:center;flex-direction:column;padding-bottom:0;margin-bottom:0}.filters-dialog-title-container:before{display:none!important}.filters-dialog-title-container div.row>div.col-auto{padding:0!important}.filters-dialog-title-container div.row>div.col-auto h3{margin-bottom:0}.filters-dialog-title-container hr{margin-top:.5rem}.filter{width:100%;margin-bottom:1rem;padding-bottom:.5rem;border-bottom:1px solid #e0e0e0}.filter .filter-title{padding:.5rem 0;color:#000c;font-size:1rem;font-weight:500}.filter .filter-title mat-icon{cursor:pointer}.filter .filter-content{margin-top:.5rem;gap:.5rem}.filter .filter-content.hide{display:none}.filter .filter-content>div.col-auto,.filter .filter-content>div.col{padding:0!important}.filter .filter-content mat-form-field{width:100%}\n"] }]
64
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
65
+ type: Inject,
66
+ args: [MAT_DIALOG_DATA]
67
+ }] }, { type: i1.MatDialogRef }, { type: i2.NonNullableFormBuilder }, { type: i0.ChangeDetectorRef }] });
68
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWF0ZXJpYWwtdGFibGUtZmlsdGVyLWRpYWxvZy5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9uZ3gtc3QtdGFibGVzL3NyYy9saWIvY29tcG9uZW50cy9tYXRlcmlhbC10YWJsZS9tYXRlcmlhbC10YWJsZS1jYXB0aW9uL21hdGVyaWFsLXRhYmxlLWZpbHRlci1kaWFsb2cvbWF0ZXJpYWwtdGFibGUtZmlsdGVyLWRpYWxvZy5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9uZ3gtc3QtdGFibGVzL3NyYy9saWIvY29tcG9uZW50cy9tYXRlcmlhbC10YWJsZS9tYXRlcmlhbC10YWJsZS1jYXB0aW9uL21hdGVyaWFsLXRhYmxlLWZpbHRlci1kaWFsb2cvbWF0ZXJpYWwtdGFibGUtZmlsdGVyLWRpYWxvZy5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQ0wsdUJBQXVCLEVBRXZCLFNBQVMsRUFDVCxNQUFNLEdBRVAsTUFBTSxlQUFl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Wljb24+dW5mb2xkX2xlc3M8L21hdC1pY29uPlxyXG4gICAgICA8L2J1dHRvbj5cclxuICAgIDwvZGl2PlxyXG4gIDwvZGl2PlxyXG4gIDxociAvPlxyXG48L2Rpdj5cclxuXHJcbjxtYXQtZGlhbG9nLWNvbnRlbnQ+XHJcbiAgPGZvcm0gW2Zvcm1Hcm91cF09XCJmb3JtR3JvdXBcIj5cclxuICAgIEBmb3IgKGNvbHVtbiBvZiBmaWx0ZXJDb2x1bW5zOyB0cmFjayBjb2x1bW4uZmllbGQpIHtcclxuICAgICAgQHN3aXRjaCAoY29sdW1uLnR5cGUpIHtcclxuICAgICAgICBAY2FzZSAoJ3N0cmluZycpIHtcclxuICAgICAgICAgIDxkaXYgY2xhc3M9XCJmaWx0ZXJcIj5cclxuICAgICAgICAgICAgPGRpdiBjbGFzcz1cImZpbHRlci10aXRsZSByb3cganVzdGlmeS1jb250ZW50LWJldHdlZW5cIj5cclxuICAgICAgICAgICAgICB7eyBjb2x1bW4udHJhbnNsYXRlQ29sdW1uTmFtZSB8fCBjb2x1bW4uZmllbGQgfX1cclxuXHJcbiAgICAgICAgICAgICAgQGlmIChjb2x1bW4uZXhwYW5kZWQpIHtcclxuICAgICAgICAgICAgICAgIDxtYXQtaWNvbiAoY2xpY2spPVwiY29sdW1uLmV4cGFuZGVkID0gIWNvbHVtbi5leHBhbmRlZFwiXHJcbiAgICAgICAgICAgICAgICAgID5rZXlib2FyZF9hcnJvd191cDwvbWF0LWljb25cclxuICAgICAgICAgICAgICAgID5cclxuICAgICAgICAgICAgICB9IEBlbHNlIHtcclxuICAgICAgICAgICAgICAgIDxtYXQtaWNvbiAoY2xpY2spPVwiY29sdW1uLmV4cGFuZGVkID0gIWNvbHVtbi5leHBhbmRlZFwiXHJcbiAgICAgICAgICAgICAgICAgID5rZXlib2FyZF9hcnJvd19kb3duPC9tYXQtaWNvblxyXG4gICAgICAgICAgICAgICAgPlxyXG4gICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgPC9kaXY+XHJcbiAgICAgICAgICAgIDxkaXZcclxuICAgICAgICAgICAgICBjbGFzcz1cImZpbHRlci1jb250ZW50IHJvd1wiXHJcbiAgICAgICAgICAgICAgW25nQ2xhc3NdPVwieyBoaWRlOiAhY29sdW1uLmV4cGFuZGVkIH1cIlxyXG4gICAgICAgICAgICA+XHJcbiAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImNvbC1hdXRvXCI+XHJcbiAgICAgICAgICAgICAgICA8bWF0LWZvcm0tZmllbGQgYXBwZWFyYW5jZT1cIm91dGxpbmVcIiBzdHlsZT1cIndpZHRoOiAxMDBweFwiPlxyXG4gICAgICAgICAgICAgICAgICA8bWF0LWxhYmVsPkZpbHRlcjwvbWF0LWxhYmVsPlxyXG4gICAgICAgICAgICAgICAgICA8aW5wdXRcclxuICAgICAgICAgICAgICAgICAgICBtYXRJbnB1dFxyXG4gICAgICAgICAgICAgICAgICAgIHR5cGU9XCJ0ZXh0XCJcclxuICAgICAgICAgICAgICAgICAgICBbZGlzYWJsZWRdPVwidHJ1ZVwiXHJcbiAgICAgICAgICAgICAgICAgICAgW3ZhbHVlXT1cIidDb250YWlucydcIlxyXG4gICAgICAgICAgICAgICAgICAvPlxyXG4gICAgICAgICAgICAgICAgPC9tYXQtZm9ybS1maWVsZD5cclxuICAgICAgICAgICAgICA8L2Rpdj5cclxuXHJcbiAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImNvbFwiPlxyXG4gICAgICAgICAgICAgICAgPG1hdC1mb3JtLWZpZWxkIGFwcGVhcmFuY2U9XCJvdXRsaW5lXCI+XHJcbiAgICAgICAgICAgICAgICAgIDxtYXQtbGFiZWw+U2VhcmNoPC9tYXQtbGFiZWw+XHJcbiAgICAgICAgICAgICAgICAgIDxpbnB1dFxyXG4gICAgICAgICAgICAgICAgICAgIG1hdElucHV0XHJcbiAgICAgICAgICAgICAgICAgICAgdHlwZT1cInRleHRcIlxyXG4gICAgICAgICAgICAgICAgICAgIFtkaXNhYmxlZF09XCJjb2x1bW4udmlzaWJsZVwiXHJcbiAgICAgICAgICAgICAgICAgICAgW2Zvcm1Db250cm9sTmFtZV09XCJjb2x1bW4uZmllbGRcIlxyXG4gICAgICAgICAgICAgICAgICAvPlxyXG4gICAgICAgICAgICAgICAgICA8YnV0dG9uXHJcbiAgICAgICAgICAgICAgICAgICAgbWF0U3VmZml4XHJcbiAgICAgICAgICAgICAgICAgICAgbWF0LWljb24tYnV0dG9uXHJcbiAgICAgICAgICAgICAgICAgICAgYXJpYS1sYWJlbD1cIkNsZWFyXCJcclxuICAgICAgICAgICAgICAgICAgICAoY2xpY2spPVwiZm9ybUdyb3VwLmNvbnRyb2xzW2NvbHVtbi5maWVsZF0uc2V0VmFsdWUoJycpXCJcclxuICAgICAgICAgICAgICAgICAgPlxyXG4gICAgICAgICAgICAgICAgICAgIDxtYXQtaWNvbiBzdHlsZT1cImZvbnQtc2l6ZTogMjJweFwiPmNsb3NlPC9tYXQtaWNvbj5cclxuICAgICAgICAgICAgICAgICAgPC9idXR0b24+XHJcbiAgICAgICAgICAgICAgICA8L21hdC1mb3JtLWZpZWxkPlxyXG4gICAgICAgICAgICAgIDwvZGl2PlxyXG4gICAgICAgICAgICA8L2Rpdj5cclxuICAgICAgICAgIDwvZGl2PlxyXG4gICAgICAgIH1cclxuICAgICAgfVxyXG4gICAgfVxyXG4gIDwvZm9ybT5cclxuPC9tYXQtZGlhbG9nLWNvbnRlbnQ+XHJcbjxtYXQtZGlhbG9nLWFjdGlvbnM+XHJcbiAgPGRpdiBjbGFzcz1cInJvdyBqdXN0aWZ5LWNvbnRlbnQtYmV0d2VlblwiPlxyXG4gICAgPGJ1dHRvbiBtYXQtZmxhdC1idXR0b24gbWF0LWRpYWxvZy1jbG9zZT5DYW5jZWw8L2J1dHRvbj5cclxuICAgIDxidXR0b24gbWF0LWZsYXQtYnV0dG9uIGNvbG9yPVwiYWNjZW50XCIgKGNsaWNrKT1cInNhdmVGaWx0ZXJzKClcIj5TYXZlPC9idXR0b24+XHJcbiAgPC9kaXY+XHJcbjwvbWF0LWRpYWxvZy1hY3Rpb25zPlxyXG4iXX0=
@@ -0,0 +1,36 @@
1
+ import { Component, Inject } from '@angular/core';
2
+ import { MAT_DIALOG_DATA } from '@angular/material/dialog';
3
+ import { moveItemInArray } from '@angular/cdk/drag-drop';
4
+ import * as i0 from "@angular/core";
5
+ import * as i1 from "@angular/material/dialog";
6
+ import * as i2 from "@angular/material/button";
7
+ import * as i3 from "@angular/material/icon";
8
+ import * as i4 from "@angular/cdk/drag-drop";
9
+ export class MaterialTableOrderColumnDialogComponent {
10
+ constructor(dialogData, dialogRef) {
11
+ this.dialogData = dialogData;
12
+ this.dialogRef = dialogRef;
13
+ this.columns = [];
14
+ }
15
+ ngOnInit() {
16
+ this.columns = this.dialogData.columns.map(column => ({ ...column }));
17
+ }
18
+ drop(event) {
19
+ moveItemInArray(this.columns, event.previousIndex, event.currentIndex);
20
+ }
21
+ saveOrder() {
22
+ this.dialogRef.close({
23
+ columnsOrder: this.columns.map(column => column.field),
24
+ });
25
+ }
26
+ 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 }); }
27
+ 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.translateColumnName || column.field }}</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\">\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:20px 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;margin-top:1px}.cdk-drag-preview{overflow-y:hidden;padding:20px 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: i2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i3.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.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.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }] }); }
28
+ }
29
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MaterialTableOrderColumnDialogComponent, decorators: [{
30
+ type: Component,
31
+ args: [{ selector: 'st-material-table-order-column-dialog', 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.translateColumnName || column.field }}</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\">\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:20px 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;margin-top:1px}.cdk-drag-preview{overflow-y:hidden;padding:20px 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"] }]
32
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
33
+ type: Inject,
34
+ args: [MAT_DIALOG_DATA]
35
+ }] }, { type: i1.MatDialogRef }] });
36
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWF0ZXJpYWwtdGFibGUtb3JkZXItY29sdW1uLWRpYWxvZy5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9uZ3gtc3QtdGFibGVzL3NyYy9saWIvY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