@koalarx/ui 13.0.8 → 13.0.9

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.
@@ -12,6 +12,7 @@ import { FormAbstract, KoalaFormModule } from '@koalarx/ui/form';
12
12
  import * as i8 from '@angular/material/table';
13
13
  import { MatTableDataSource, MatTableModule } from '@angular/material/table';
14
14
  import { delay } from '@koalarx/utils/operators/delay';
15
+ import { randomString } from '@koalarx/utils/operators/string';
15
16
  import * as i1 from '@angular/forms';
16
17
  import { FormControl } from '@angular/forms';
17
18
  import * as i10 from '@angular/material/sort';
@@ -181,6 +182,7 @@ class ListAbstract extends FormAbstract {
181
182
  this.typeRequest = 'onDemand';
182
183
  this.filterParams = new BehaviorSubject(null);
183
184
  this.filterError$ = new BehaviorSubject(null);
185
+ this.tableId = randomString(20, { uppercase: true, lowercase: true });
184
186
  }
185
187
  selectAll() {
186
188
  this.isAllSelected() ?
@@ -265,6 +267,7 @@ class ListAbstract extends FormAbstract {
265
267
  observe.next(true);
266
268
  })), debounceTime(300), switchMap(() => this.runRequestFunction()), map((response) => {
267
269
  this.loading(false);
270
+ this.scrollTableToTop();
268
271
  return this.requestResponseFunction(response);
269
272
  })).subscribe();
270
273
  }
@@ -273,6 +276,7 @@ class ListAbstract extends FormAbstract {
273
276
  this.dataSource.paginator = this.paginator;
274
277
  this.subscriptionList = this.filterParams.pipe(startWith({}), debounceTime(300), switchMap(() => this.runRequestFunction()), map((response) => {
275
278
  this.loading(false);
279
+ this.scrollTableToTop();
276
280
  return this.requestResponseFunction(response);
277
281
  })).subscribe();
278
282
  }
@@ -317,6 +321,12 @@ class ListAbstract extends FormAbstract {
317
321
  });
318
322
  });
319
323
  }
324
+ scrollTableToTop() {
325
+ const table = document.getElementById(this.tableId);
326
+ if (table) {
327
+ table.scrollTop = 0;
328
+ }
329
+ }
320
330
  }
321
331
 
322
332
  class ListComponent extends ListAbstract {
@@ -439,7 +449,7 @@ class ListComponent extends ListAbstract {
439
449
  }
440
450
  }
441
451
  ListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ListComponent, deps: [{ token: i1.FormBuilder }, { token: i2.KoalaDynamicFormService }, { token: i3.DeviceDetectorService }], target: i0.ɵɵFactoryTarget.Component });
442
- ListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: ListComponent, selector: "koala-list", inputs: { config: "config" }, viewQueries: [{ propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true }, { propertyName: "sort", first: true, predicate: MatSort, descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"list-container\" [ngClass]=\"customClass\">\n <div *ngIf=\"filterFormConfig\" class=\"list-filter\">\n <form (ngSubmit)=\"filterSubmit()\" [formGroup]=\"formFilter\">\n <div class=\"main\">\n <koala-dynamic-form\n *ngIf=\"filterFormConfig.main\"\n [form]=\"filterFormConfig.main.form\"\n [formConfig]=\"filterFormConfig.main.formConfig\"\n [setValues]=\"filterFormConfig.main.setValues\"\n [showFields]=\"filterFormConfig.main.showFields\">\n </koala-dynamic-form>\n <ul>\n <li *ngIf=\"filterFormConfig.advanced\" class=\"option\">\n <button (click)=\"toogleFilter()\" color=\"primary\" mat-icon-button matTooltip=\"Filtro Avan\u00E7ado\"\n matTooltipPosition=\"below\" type=\"button\">\n <mat-icon>tune</mat-icon>\n </button>\n </li>\n <li *ngIf=\"filterFormConfig.checkAndSearch\" class=\"checkbox-filter\">\n <mat-checkbox (click)=\"filterSubmit()\"\n [formControlName]=\"filterFormConfig.checkAndSearch.formControlName\">\n {{filterFormConfig.checkAndSearch.label}}\n </mat-checkbox>\n </li>\n <li class=\"option\">\n <koala-submit\n [btnSubmitDisabled]=\"btnSubmitDisabled\"\n [fg]=\"formFilter\"\n [iconButton]=\"true\"\n [loader]=\"loader\"\n icon=\"search\">\n </koala-submit>\n </li>\n </ul>\n </div>\n <div *ngIf=\"filterFormConfig.advanced\" [ngClass]=\"{'show': showAdvancedFilter}\" class=\"advanced\">\n <div class=\"container-filter\">\n <koala-dynamic-form\n [form]=\"filterFormConfig.advanced.form\"\n [formConfig]=\"filterFormConfig.advanced.formConfig\"\n [setValues]=\"filterFormConfig.advanced.setValues\"\n [showFields]=\"filterFormConfig.advanced.showFields\">\n </koala-dynamic-form>\n </div>\n </div>\n </form>\n </div>\n <nav class=\"menu-list\">\n <ul class=\"menu\">\n <li *ngIf=\"selection.hasValue()\">\n <ng-content select=\"[itemsSelectList]\"></ng-content>\n </li>\n <li *ngIf=\"selection.hasValue()\" class=\"text-center\">|</li>\n <li>\n <ng-content select=\"[itemsList]\"></ng-content>\n </li>\n </ul>\n </nav>\n <div *ngIf=\"loader | async\" class=\"spinner-container\" [ngClass]=\"{\n 'no-filter': !filterFormConfig\n }\">\n <mat-spinner diameter=\"40\"></mat-spinner>\n </div>\n <div class=\"list\">\n <table\n *ngIf=\"!emptyListComponent || (emptyListComponent && dataSource?.data?.length > 0) else emptyList\"\n [dataSource]=\"dataSource\"\n [matSortActive]=\"columnSort\"\n multiTemplateDataRows\n class=\"table-hover\"\n mat-table\n matSort\n [matSortDirection]=\"sortDirection\" matSortDisableClear>\n <ng-container matColumnDef=\"select\">\n <th *matHeaderCellDef mat-header-cell>\n <mat-checkbox (change)=\"$event ? selectAll() : null\"\n [checked]=\"selection.hasValue() && allSelected$ | async\"\n [indeterminate]=\"selection.hasValue() && !(allSelected$ | async)\">\n </mat-checkbox>\n </th>\n <td *matCellDef=\"let item\" mat-cell>\n <mat-checkbox *ngIf=\"disabledCheckboxItemList ? !disabledCheckboxItemList(item) : true\"\n (change)=\"$event ? selection.toggle(item) : null\"\n (click)=\"$event.stopPropagation(); selectItem();\"\n [checked]=\"selection.isSelected(item)\">\n </mat-checkbox>\n </td>\n <td *matFooterCellDef mat-footer-cell></td>\n </ng-container>\n\n <ng-container *ngIf=\"subListConfig && btnCollapseSubListConfig\" matColumnDef=\"collapseButton\">\n <th *matHeaderCellDef mat-header-cell></th>\n <td *matCellDef=\"let item\" mat-cell>\n <koala-button\n *ngIf=\"btnCollapseSubListConfig.show(item)\"\n (click)=\"expandedElement = expandedElement === item ? null : item\"\n [koalaIcon]=\"btnCollapseSubListConfig.koalaIcon\"\n [icon]=\"btnCollapseSubListConfig.icon\"\n [tooltip]=\"btnCollapseSubListConfig.tooltip\"\n [color]=\"btnCollapseSubListConfig.iconColor\"\n [backgroundColor]=\"btnCollapseSubListConfig.backgroundColor\"\n [koalaIconSize]=\"22\">\n </koala-button>\n </td>\n <td *matFooterCellDef mat-footer-cell></td>\n </ng-container>\n\n <ng-container *ngFor=\"let itemList of itemsList\" [matColumnDef]=\"itemList.columnDef\">\n <th *matHeaderCellDef [mat-sort-header]=\"itemList.sortHeader\" [disabled]=\"!itemList.sortHeader\" mat-header-cell>{{itemList.label}}</th>\n <td (dblclick)=\"itemList.dblClick(item)\" *matCellDef=\"let item\" mat-cell>\n\t <koala-dynamic-component *ngIf=\"itemList.itemComponent else itemText\"\n\t [dynamicComponent]=\"itemList.itemComponent(item)\"></koala-dynamic-component>\n\t <ng-template #itemText>\n\t {{itemList.itemNameProperty(item)}}\n\t </ng-template>\n </td>\n <td *matFooterCellDef mat-footer-cell>\n <koala-dynamic-component *ngIf=\"itemList.footer?.itemComponent else itemFooterText\"\n [dynamicComponent]=\"itemList.footer?.itemComponent(responseRequest)\"></koala-dynamic-component>\n <ng-template #itemFooterText>\n {{itemList.footer?.itemNameProperty(responseRequest)}}\n </ng-template>\n </td>\n </ng-container>\n\n <ng-container *ngIf=\"subListConfig && btnCollapseSubListConfig\" matColumnDef=\"koalaListDetails\">\n <th *matHeaderCellDef mat-header-cell></th>\n <td *matCellDef=\"let item\" [attr.colspan]=\"columnsToShowInList.length\" mat-cell>\n <div class=\"item-detail\" [@detailExpand]=\"item == expandedElement ? 'expanded' : 'collapsed'\">\n <koala-list [config]=\"subListConfig(item)\"></koala-list>\n </div>\n </td>\n <td *matFooterCellDef mat-footer-cell></td>\n </ng-container>\n\n <ng-container matColumnDef=\"options\">\n <th *matHeaderCellDef mat-header-cell></th>\n <td *matCellDef=\"let item\" mat-cell>\n <div *ngIf=\"haveOptionsOnItemLine(item)\">\n <button [matMenuTriggerFor]=\"options\" mat-icon-button type=\"button\">\n <i class='material-icons'>more_vert</i>\n </button>\n <mat-menu #options=\"matMenu\" class=\"menu-list\" yPosition=\"below\">\n\t <div *ngFor=\"let option of itemsMenuListOptions\">\n\t <button\n\t\t (click)=\"option.action(item)\"\n\t\t *ngIf=\"option.havePermission && (\n\t\t !option.showByItemList ||\n\t\t option.showByItemList(item)\n\t )\"\n\t\t mat-menu-item>\n\t <mat-icon>{{option.icon}}</mat-icon>\n\t <span>{{option.name}}</span>\n\t </button>\n\t </div>\n </mat-menu>\n </div>\n </td>\n <td *matFooterCellDef mat-footer-cell></td>\n </ng-container>\n\n <tr *matHeaderRowDef=\"columnsToShowInList; sticky: true\" mat-header-row></tr>\n <tr *matRowDef=\"let item; columns: columnsToShowInList;\" mat-row></tr>\n <ng-container *ngIf=\"subListConfig && btnCollapseSubListConfig\">\n <tr mat-row *matRowDef=\"let row; columns: ['koalaListDetails']\" class=\"item-detail-row\"></tr>\n </ng-container>\n <ng-container *ngIf=\"hasFooter()\">\n <tr *matFooterRowDef=\"columnsToShowInList; sticky: true\" mat-footer-row></tr>\n </ng-container>\n </table>\n <ng-template #emptyList>\n <koala-dynamic-component *ngIf=\"!(filterError$ | async) else errorList\" [dynamicComponent]=\"emptyListComponent\"></koala-dynamic-component>\n <ng-template #errorList>\n <koala-dynamic-component [dynamicComponent]=\"errorListComponent\"></koala-dynamic-component>\n </ng-template>\n </ng-template>\n </div>\n <div *ngIf=\"!hidePaginator\" class=\"content-paginator\">\n <mat-paginator\n [length]=\"qtdListResult\"\n [pageSizeOptions]=\"limitOptions\"\n [pageSize]=\"pageSize\"\n showFirstLastButtons>\n </mat-paginator>\n </div>\n</div>\n", styles: [".list-container{border-radius:10px;margin:0 auto;overflow-x:hidden;width:calc(100% - 40px);position:relative}.list-container .spinner-container{position:absolute;width:100%;height:calc(100vh - 320px);top:100px;left:0;background:rgba(0,0,0,.15);z-index:2;display:flex;align-items:center;justify-content:center}.list-container .spinner-container.no-filter{top:40px}.list-container .list{display:block;height:calc(100vh - 320px);overflow-y:auto;position:relative;top:0;width:100%;z-index:1}.list-container .list table:not(.table-not-selection) .mat-header-cell:first-child,.list-container .list .mat-header-cell:last-child,.list-container .list .mat-header-cell.mat-column-collapseButton{width:5%}.list-container .list .mat-header-cell:last-child{text-align:center}.list-container .list .mat-header-row,.list-container .list .mat-row,.list-container .list .mat-footer-row{height:35px}.list-container .list .mat-row .mat-icon-button{height:35px;line-height:35px;width:35px}.list-container .list tr.detail-row:not(.expanded-row){height:0}.list-container .list .element-detail{display:flex;overflow:hidden}.list-container .list table{position:relative;width:100%;font-family:OpenSans,sans-serif;font-size:1em}.list-container .list table.table-hover tr{cursor:pointer;transition:.2s}.list-container .list table th:first-child,.list-container .list table td:first-child{padding:0 8px 0 20px}.list-container .list table th{font-size:.7em;padding:0 8px;font-family:OpenSans,sans-serif;line-height:1em}.list-container .list table td{font-size:.8em;padding:0 8px;font-family:OpenSans,sans-serif}.list-container .list table th:last-child,.list-container .list table td:last-child{padding:0 20px 0 8px}.list-container .list .mat-list-item-content,.list-container .list .mat-list-item-content .mat-list-text{padding:0}.list-container .list-filter{box-shadow:0 1px 3px #0000004d;height:60px;position:relative;z-index:3}.list-container .list-filter .main{display:flex;justify-content:space-between;font-size:1.05em;height:60px;overflow:hidden;padding-left:2.5px;position:relative;width:100%}.list-container .list-filter .main koala-dynamic-form{width:100%}.list-container .list-filter .main mat-form-field{display:inline-block}.list-container .list-filter .main .mat-form-field-appearance-fill .mat-form-field-flex{background:transparent}.list-container .list-filter .main .mat-form-field .mat-form-field-wrapper{padding-bottom:0}.list-container .list-filter .main .mat-form-field-underline,.list-container .list-filter .main .mat-form-field-appearance-legacy .mat-form-field-subscript-wrapper,.list-container .list-filter .main .mat-form-field-wrapper .mat-form-field-subscript-wrapper{display:none}.list-container .list-filter ul{display:flex;align-items:center;font-size:0;list-style:none;margin:0;padding:0 15px 0 0;position:relative;text-align:right}.list-container .list-filter ul li{display:inline-block;font-size:14px;padding:5px;position:relative}.list-container .list-filter ul li.option button{transition:.2s}.list-container .list-filter ul li.option button:hover{background:rgba(0,0,0,.1)}.list-container .list-filter ul li.checkbox-filter{text-align:center}.list-container .list-filter ul li.checkbox-filter .checkbox-inline{top:-5px}.list-container .list-filter ul li.checkbox-filter input[type=checkbox]{margin-left:0}.list-container .list-filter ul li.checkbox-filter label{padding:0!important;width:auto}.list-container .list-filter .advanced{border-top:1px solid #dddddd;box-shadow:0 3px 10px #0000004d;height:0;overflow-x:hidden;overflow-y:auto;position:absolute;top:60px;transition:.2s;width:100%;z-index:1}.list-container .list-filter .advanced .container-filter{padding:15px}.list-container .list-filter .advanced.show{height:360px}.list-container nav.menu-list{height:40px;margin:0;padding:3px 0;position:relative;transition:.2s;width:100%;z-index:2;box-sizing:border-box}.list-container nav.menu-list ul.menu{float:left;font-size:0;list-style:none;margin:0;padding:0 10px;position:relative;text-align:left}.list-container nav.menu-list ul.menu li{color:#616161;display:inline-block;font-size:16px;padding:0 4px}.list-container nav.menu-list ul.menu li button.mat-button,.list-container nav.menu-list ul.menu li button.koala-icon-button{display:inline-block}.list-container .content-paginator mat-paginator .mat-paginator-container{height:40px!important;min-height:40px!important}.list-container .content-paginator mat-paginator .mat-paginator-container .mat-paginator-page-size-select{height:40px;margin-top:0!important}.list-container .content-paginator mat-paginator .mat-paginator-container .mat-paginator-range-label{margin-top:3px}.list-container .content-paginator{position:relative;background:transparent!important;z-index:2;box-shadow:-3px 1px 3px #0000004d}.list-container .item-detail{overflow:hidden}.list-container tr.item-detail-row{height:0!important}.list-container tr.item-detail-row .list-container{width:100%!important}.list-container tr.item-detail-row .list-container .list{height:auto!important;max-height:250px!important}.list-container tr.item-detail-row .list-container nav.menu-list{display:none}@media (max-width: 900px){.list-container{width:100%;box-shadow:none!important;padding:15px 10px 15px 15px;box-sizing:border-box}.list-container .list{height:auto;overflow:unset}.list-container .list-filter .main{justify-content:flex-end}}\n"], components: [{ type: i2.DynamicFormComponent, selector: "koala-dynamic-form", inputs: ["form", "formConfig", "showFields", "showFieldsMoreItensConfig", "setValues", "tabIndexStart"] }, { type: i4.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i6.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { type: i2.BtnSubmitComponent, selector: "koala-submit", inputs: ["fg", "color", "btnLabel", "btnSubmitDisabled", "loader", "iconButton", "icon", "iconColor"] }, { type: i7.MatSpinner, selector: "mat-spinner", inputs: ["color"] }, { type: i8.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { type: i9.ButtonComponent, selector: "koala-button", inputs: ["color", "backgroundColor", "icon", "text", "tooltip", "disabled", "koalaIcon", "koalaIconSize"] }, { type: i10.MatSortHeader, selector: "[mat-sort-header]", inputs: ["disabled", "mat-sort-header", "arrowPosition", "start", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { type: i11.KoalaDynamicComponentFactory, selector: "koala-dynamic-component", inputs: ["dynamicComponent"] }, { type: ListComponent, selector: "koala-list", inputs: ["config"] }, { type: i12.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { type: i12.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }, { type: i8.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { type: i8.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { type: i8.MatFooterRow, selector: "mat-footer-row, tr[mat-footer-row]", exportAs: ["matFooterRow"] }, { type: i13.MatPaginator, selector: "mat-paginator", inputs: ["disabled"], exportAs: ["matPaginator"] }], directives: [{ type: i14.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i14.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i15.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { type: i10.MatSort, selector: "[matSort]", inputs: ["matSortDisabled", "matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { type: i8.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { type: i8.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { type: i8.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { type: i8.MatCellDef, selector: "[matCellDef]" }, { type: i8.MatCell, selector: "mat-cell, td[mat-cell]" }, { type: i8.MatFooterCellDef, selector: "[matFooterCellDef]" }, { type: i8.MatFooterCell, selector: "mat-footer-cell, td[mat-footer-cell]" }, { type: i14.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i12.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { type: i8.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { type: i8.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { type: i8.MatFooterRowDef, selector: "[matFooterRowDef]", inputs: ["matFooterRowDef", "matFooterRowDefSticky"] }], pipes: { "async": i14.AsyncPipe }, animations: [
452
+ ListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: ListComponent, selector: "koala-list", inputs: { config: "config" }, viewQueries: [{ propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true }, { propertyName: "sort", first: true, predicate: MatSort, descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"list-container\" [ngClass]=\"customClass\">\n <div *ngIf=\"filterFormConfig\" class=\"list-filter\">\n <form (ngSubmit)=\"filterSubmit()\" [formGroup]=\"formFilter\">\n <div class=\"main\">\n <koala-dynamic-form\n *ngIf=\"filterFormConfig.main\"\n [form]=\"filterFormConfig.main.form\"\n [formConfig]=\"filterFormConfig.main.formConfig\"\n [setValues]=\"filterFormConfig.main.setValues\"\n [showFields]=\"filterFormConfig.main.showFields\">\n </koala-dynamic-form>\n <ul>\n <li *ngIf=\"filterFormConfig.advanced\" class=\"option\">\n <button (click)=\"toogleFilter()\" color=\"primary\" mat-icon-button matTooltip=\"Filtro Avan\u00E7ado\"\n matTooltipPosition=\"below\" type=\"button\">\n <mat-icon>tune</mat-icon>\n </button>\n </li>\n <li *ngIf=\"filterFormConfig.checkAndSearch\" class=\"checkbox-filter\">\n <mat-checkbox (click)=\"filterSubmit()\"\n [formControlName]=\"filterFormConfig.checkAndSearch.formControlName\">\n {{filterFormConfig.checkAndSearch.label}}\n </mat-checkbox>\n </li>\n <li class=\"option\">\n <koala-submit\n [btnSubmitDisabled]=\"btnSubmitDisabled\"\n [fg]=\"formFilter\"\n [iconButton]=\"true\"\n [loader]=\"loader\"\n icon=\"search\">\n </koala-submit>\n </li>\n </ul>\n </div>\n <div *ngIf=\"filterFormConfig.advanced\" [ngClass]=\"{'show': showAdvancedFilter}\" class=\"advanced\">\n <div class=\"container-filter\">\n <koala-dynamic-form\n [form]=\"filterFormConfig.advanced.form\"\n [formConfig]=\"filterFormConfig.advanced.formConfig\"\n [setValues]=\"filterFormConfig.advanced.setValues\"\n [showFields]=\"filterFormConfig.advanced.showFields\">\n </koala-dynamic-form>\n </div>\n </div>\n </form>\n </div>\n <nav class=\"menu-list\">\n <ul class=\"menu\">\n <li *ngIf=\"selection.hasValue()\">\n <ng-content select=\"[itemsSelectList]\"></ng-content>\n </li>\n <li *ngIf=\"selection.hasValue()\" class=\"text-center\">|</li>\n <li>\n <ng-content select=\"[itemsList]\"></ng-content>\n </li>\n </ul>\n </nav>\n <div *ngIf=\"loader | async\" class=\"spinner-container\" [ngClass]=\"{\n 'no-filter': !filterFormConfig\n }\">\n <mat-spinner diameter=\"40\"></mat-spinner>\n </div>\n <div class=\"list\">\n <table\n *ngIf=\"!emptyListComponent || (emptyListComponent && dataSource?.data?.length > 0) else emptyList\"\n [dataSource]=\"dataSource\"\n [matSortActive]=\"columnSort\"\n [id]=\"tableId\"\n multiTemplateDataRows\n class=\"table-hover\"\n mat-table\n matSort\n [matSortDirection]=\"sortDirection\" matSortDisableClear>\n <ng-container matColumnDef=\"select\">\n <th *matHeaderCellDef mat-header-cell>\n <mat-checkbox (change)=\"$event ? selectAll() : null\"\n [checked]=\"selection.hasValue() && allSelected$ | async\"\n [indeterminate]=\"selection.hasValue() && !(allSelected$ | async)\">\n </mat-checkbox>\n </th>\n <td *matCellDef=\"let item\" mat-cell>\n <mat-checkbox *ngIf=\"disabledCheckboxItemList ? !disabledCheckboxItemList(item) : true\"\n (change)=\"$event ? selection.toggle(item) : null\"\n (click)=\"$event.stopPropagation(); selectItem();\"\n [checked]=\"selection.isSelected(item)\">\n </mat-checkbox>\n </td>\n <td *matFooterCellDef mat-footer-cell></td>\n </ng-container>\n\n <ng-container *ngIf=\"subListConfig && btnCollapseSubListConfig\" matColumnDef=\"collapseButton\">\n <th *matHeaderCellDef mat-header-cell></th>\n <td *matCellDef=\"let item\" mat-cell>\n <koala-button\n *ngIf=\"btnCollapseSubListConfig.show(item)\"\n (click)=\"expandedElement = expandedElement === item ? null : item\"\n [koalaIcon]=\"btnCollapseSubListConfig.koalaIcon\"\n [icon]=\"btnCollapseSubListConfig.icon\"\n [tooltip]=\"btnCollapseSubListConfig.tooltip\"\n [color]=\"btnCollapseSubListConfig.iconColor\"\n [backgroundColor]=\"btnCollapseSubListConfig.backgroundColor\"\n [koalaIconSize]=\"22\">\n </koala-button>\n </td>\n <td *matFooterCellDef mat-footer-cell></td>\n </ng-container>\n\n <ng-container *ngFor=\"let itemList of itemsList\" [matColumnDef]=\"itemList.columnDef\">\n <th *matHeaderCellDef [mat-sort-header]=\"itemList.sortHeader\" [disabled]=\"!itemList.sortHeader\" mat-header-cell>{{itemList.label}}</th>\n <td (dblclick)=\"itemList.dblClick(item)\" *matCellDef=\"let item\" mat-cell>\n\t <koala-dynamic-component *ngIf=\"itemList.itemComponent else itemText\"\n\t [dynamicComponent]=\"itemList.itemComponent(item)\"></koala-dynamic-component>\n\t <ng-template #itemText>\n\t {{itemList.itemNameProperty(item)}}\n\t </ng-template>\n </td>\n <td *matFooterCellDef mat-footer-cell>\n <koala-dynamic-component *ngIf=\"itemList.footer?.itemComponent else itemFooterText\"\n [dynamicComponent]=\"itemList.footer?.itemComponent(responseRequest)\"></koala-dynamic-component>\n <ng-template #itemFooterText>\n {{itemList.footer?.itemNameProperty(responseRequest)}}\n </ng-template>\n </td>\n </ng-container>\n\n <ng-container *ngIf=\"subListConfig && btnCollapseSubListConfig\" matColumnDef=\"koalaListDetails\">\n <th *matHeaderCellDef mat-header-cell></th>\n <td *matCellDef=\"let item\" [attr.colspan]=\"columnsToShowInList.length\" mat-cell>\n <div class=\"item-detail\" [@detailExpand]=\"item == expandedElement ? 'expanded' : 'collapsed'\">\n <koala-list [config]=\"subListConfig(item)\"></koala-list>\n </div>\n </td>\n <td *matFooterCellDef mat-footer-cell></td>\n </ng-container>\n\n <ng-container matColumnDef=\"options\">\n <th *matHeaderCellDef mat-header-cell></th>\n <td *matCellDef=\"let item\" mat-cell>\n <div *ngIf=\"haveOptionsOnItemLine(item)\">\n <button [matMenuTriggerFor]=\"options\" mat-icon-button type=\"button\">\n <i class='material-icons'>more_vert</i>\n </button>\n <mat-menu #options=\"matMenu\" class=\"menu-list\" yPosition=\"below\">\n\t <div *ngFor=\"let option of itemsMenuListOptions\">\n\t <button\n\t\t (click)=\"option.action(item)\"\n\t\t *ngIf=\"option.havePermission && (\n\t\t !option.showByItemList ||\n\t\t option.showByItemList(item)\n\t )\"\n\t\t mat-menu-item>\n\t <mat-icon>{{option.icon}}</mat-icon>\n\t <span>{{option.name}}</span>\n\t </button>\n\t </div>\n </mat-menu>\n </div>\n </td>\n <td *matFooterCellDef mat-footer-cell></td>\n </ng-container>\n\n <tr *matHeaderRowDef=\"columnsToShowInList; sticky: true\" mat-header-row></tr>\n <tr *matRowDef=\"let item; columns: columnsToShowInList;\" mat-row></tr>\n <ng-container *ngIf=\"subListConfig && btnCollapseSubListConfig\">\n <tr mat-row *matRowDef=\"let row; columns: ['koalaListDetails']\" class=\"item-detail-row\"></tr>\n </ng-container>\n <ng-container *ngIf=\"hasFooter()\">\n <tr *matFooterRowDef=\"columnsToShowInList; sticky: true\" mat-footer-row></tr>\n </ng-container>\n </table>\n <ng-template #emptyList>\n <koala-dynamic-component *ngIf=\"!(filterError$ | async) else errorList\" [dynamicComponent]=\"emptyListComponent\"></koala-dynamic-component>\n <ng-template #errorList>\n <koala-dynamic-component [dynamicComponent]=\"errorListComponent\"></koala-dynamic-component>\n </ng-template>\n </ng-template>\n </div>\n <div *ngIf=\"!hidePaginator\" class=\"content-paginator\">\n <mat-paginator\n [length]=\"qtdListResult\"\n [pageSizeOptions]=\"limitOptions\"\n [pageSize]=\"pageSize\"\n showFirstLastButtons>\n </mat-paginator>\n </div>\n</div>\n", styles: [".list-container{border-radius:10px;margin:0 auto;overflow-x:hidden;width:calc(100% - 40px);position:relative}.list-container .spinner-container{position:absolute;width:100%;height:calc(100vh - 320px);top:100px;left:0;background:rgba(0,0,0,.15);z-index:2;display:flex;align-items:center;justify-content:center}.list-container .spinner-container.no-filter{top:40px}.list-container .list{display:block;height:calc(100vh - 320px);overflow-y:auto;position:relative;top:0;width:100%;z-index:1}.list-container .list table:not(.table-not-selection) .mat-header-cell:first-child,.list-container .list .mat-header-cell:last-child,.list-container .list .mat-header-cell.mat-column-collapseButton{width:5%}.list-container .list .mat-header-cell:last-child{text-align:center}.list-container .list .mat-header-row,.list-container .list .mat-row,.list-container .list .mat-footer-row{height:35px}.list-container .list .mat-row .mat-icon-button{height:35px;line-height:35px;width:35px}.list-container .list tr.detail-row:not(.expanded-row){height:0}.list-container .list .element-detail{display:flex;overflow:hidden}.list-container .list table{position:relative;width:100%;font-family:OpenSans,sans-serif;font-size:1em}.list-container .list table.table-hover tr{cursor:pointer;transition:.2s}.list-container .list table th:first-child,.list-container .list table td:first-child{padding:0 8px 0 20px}.list-container .list table th{font-size:.7em;padding:0 8px;font-family:OpenSans,sans-serif;line-height:1em}.list-container .list table td{font-size:.8em;padding:0 8px;font-family:OpenSans,sans-serif}.list-container .list table th:last-child,.list-container .list table td:last-child{padding:0 20px 0 8px}.list-container .list .mat-list-item-content,.list-container .list .mat-list-item-content .mat-list-text{padding:0}.list-container .list-filter{box-shadow:0 1px 3px #0000004d;height:60px;position:relative;z-index:3}.list-container .list-filter .main{display:flex;justify-content:space-between;font-size:1.05em;height:60px;overflow:hidden;padding-left:2.5px;position:relative;width:100%}.list-container .list-filter .main koala-dynamic-form{width:100%}.list-container .list-filter .main mat-form-field{display:inline-block}.list-container .list-filter .main .mat-form-field-appearance-fill .mat-form-field-flex{background:transparent}.list-container .list-filter .main .mat-form-field .mat-form-field-wrapper{padding-bottom:0}.list-container .list-filter .main .mat-form-field-underline,.list-container .list-filter .main .mat-form-field-appearance-legacy .mat-form-field-subscript-wrapper,.list-container .list-filter .main .mat-form-field-wrapper .mat-form-field-subscript-wrapper{display:none}.list-container .list-filter ul{display:flex;align-items:center;font-size:0;list-style:none;margin:0;padding:0 15px 0 0;position:relative;text-align:right}.list-container .list-filter ul li{display:inline-block;font-size:14px;padding:5px;position:relative}.list-container .list-filter ul li.option button{transition:.2s}.list-container .list-filter ul li.option button:hover{background:rgba(0,0,0,.1)}.list-container .list-filter ul li.checkbox-filter{text-align:center}.list-container .list-filter ul li.checkbox-filter .checkbox-inline{top:-5px}.list-container .list-filter ul li.checkbox-filter input[type=checkbox]{margin-left:0}.list-container .list-filter ul li.checkbox-filter label{padding:0!important;width:auto}.list-container .list-filter .advanced{border-top:1px solid #dddddd;box-shadow:0 3px 10px #0000004d;height:0;overflow-x:hidden;overflow-y:auto;position:absolute;top:60px;transition:.2s;width:100%;z-index:1}.list-container .list-filter .advanced .container-filter{padding:15px}.list-container .list-filter .advanced.show{height:360px}.list-container nav.menu-list{height:40px;margin:0;padding:3px 0;position:relative;transition:.2s;width:100%;z-index:2;box-sizing:border-box}.list-container nav.menu-list ul.menu{float:left;font-size:0;list-style:none;margin:0;padding:0 10px;position:relative;text-align:left}.list-container nav.menu-list ul.menu li{color:#616161;display:inline-block;font-size:16px;padding:0 4px}.list-container nav.menu-list ul.menu li button.mat-button,.list-container nav.menu-list ul.menu li button.koala-icon-button{display:inline-block}.list-container .content-paginator mat-paginator .mat-paginator-container{height:40px!important;min-height:40px!important}.list-container .content-paginator mat-paginator .mat-paginator-container .mat-paginator-page-size-select{height:40px;margin-top:0!important}.list-container .content-paginator mat-paginator .mat-paginator-container .mat-paginator-range-label{margin-top:3px}.list-container .content-paginator{position:relative;background:transparent!important;z-index:2;box-shadow:-3px 1px 3px #0000004d}.list-container .item-detail{overflow:hidden}.list-container tr.item-detail-row{height:0!important}.list-container tr.item-detail-row .list-container{width:100%!important}.list-container tr.item-detail-row .list-container .list{height:auto!important;max-height:250px!important}.list-container tr.item-detail-row .list-container nav.menu-list{display:none}@media (max-width: 900px){.list-container{width:100%;box-shadow:none!important;padding:15px 10px 15px 15px;box-sizing:border-box}.list-container .list{height:auto;overflow:unset}.list-container .list-filter .main{justify-content:flex-end}}\n"], components: [{ type: i2.DynamicFormComponent, selector: "koala-dynamic-form", inputs: ["form", "formConfig", "showFields", "showFieldsMoreItensConfig", "setValues", "tabIndexStart"] }, { type: i4.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i6.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { type: i2.BtnSubmitComponent, selector: "koala-submit", inputs: ["fg", "color", "btnLabel", "btnSubmitDisabled", "loader", "iconButton", "icon", "iconColor"] }, { type: i7.MatSpinner, selector: "mat-spinner", inputs: ["color"] }, { type: i8.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { type: i9.ButtonComponent, selector: "koala-button", inputs: ["color", "backgroundColor", "icon", "text", "tooltip", "disabled", "koalaIcon", "koalaIconSize"] }, { type: i10.MatSortHeader, selector: "[mat-sort-header]", inputs: ["disabled", "mat-sort-header", "arrowPosition", "start", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { type: i11.KoalaDynamicComponentFactory, selector: "koala-dynamic-component", inputs: ["dynamicComponent"] }, { type: ListComponent, selector: "koala-list", inputs: ["config"] }, { type: i12.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { type: i12.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }, { type: i8.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { type: i8.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { type: i8.MatFooterRow, selector: "mat-footer-row, tr[mat-footer-row]", exportAs: ["matFooterRow"] }, { type: i13.MatPaginator, selector: "mat-paginator", inputs: ["disabled"], exportAs: ["matPaginator"] }], directives: [{ type: i14.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i14.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i15.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { type: i10.MatSort, selector: "[matSort]", inputs: ["matSortDisabled", "matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { type: i8.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { type: i8.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { type: i8.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { type: i8.MatCellDef, selector: "[matCellDef]" }, { type: i8.MatCell, selector: "mat-cell, td[mat-cell]" }, { type: i8.MatFooterCellDef, selector: "[matFooterCellDef]" }, { type: i8.MatFooterCell, selector: "mat-footer-cell, td[mat-footer-cell]" }, { type: i14.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i12.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { type: i8.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { type: i8.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { type: i8.MatFooterRowDef, selector: "[matFooterRowDef]", inputs: ["matFooterRowDef", "matFooterRowDefSticky"] }], pipes: { "async": i14.AsyncPipe }, animations: [
443
453
  trigger('detailExpand', [
444
454
  state('collapsed', style({ height: '0px', minHeight: '0' })),
445
455
  state('expanded', style({ height: '*' })),
@@ -454,7 +464,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
454
464
  state('expanded', style({ height: '*' })),
455
465
  transition('expanded <=> collapsed', animate('225ms cubic-bezier(0.4, 0.0, 0.2, 1)')),
456
466
  ]),
457
- ], template: "<div class=\"list-container\" [ngClass]=\"customClass\">\n <div *ngIf=\"filterFormConfig\" class=\"list-filter\">\n <form (ngSubmit)=\"filterSubmit()\" [formGroup]=\"formFilter\">\n <div class=\"main\">\n <koala-dynamic-form\n *ngIf=\"filterFormConfig.main\"\n [form]=\"filterFormConfig.main.form\"\n [formConfig]=\"filterFormConfig.main.formConfig\"\n [setValues]=\"filterFormConfig.main.setValues\"\n [showFields]=\"filterFormConfig.main.showFields\">\n </koala-dynamic-form>\n <ul>\n <li *ngIf=\"filterFormConfig.advanced\" class=\"option\">\n <button (click)=\"toogleFilter()\" color=\"primary\" mat-icon-button matTooltip=\"Filtro Avan\u00E7ado\"\n matTooltipPosition=\"below\" type=\"button\">\n <mat-icon>tune</mat-icon>\n </button>\n </li>\n <li *ngIf=\"filterFormConfig.checkAndSearch\" class=\"checkbox-filter\">\n <mat-checkbox (click)=\"filterSubmit()\"\n [formControlName]=\"filterFormConfig.checkAndSearch.formControlName\">\n {{filterFormConfig.checkAndSearch.label}}\n </mat-checkbox>\n </li>\n <li class=\"option\">\n <koala-submit\n [btnSubmitDisabled]=\"btnSubmitDisabled\"\n [fg]=\"formFilter\"\n [iconButton]=\"true\"\n [loader]=\"loader\"\n icon=\"search\">\n </koala-submit>\n </li>\n </ul>\n </div>\n <div *ngIf=\"filterFormConfig.advanced\" [ngClass]=\"{'show': showAdvancedFilter}\" class=\"advanced\">\n <div class=\"container-filter\">\n <koala-dynamic-form\n [form]=\"filterFormConfig.advanced.form\"\n [formConfig]=\"filterFormConfig.advanced.formConfig\"\n [setValues]=\"filterFormConfig.advanced.setValues\"\n [showFields]=\"filterFormConfig.advanced.showFields\">\n </koala-dynamic-form>\n </div>\n </div>\n </form>\n </div>\n <nav class=\"menu-list\">\n <ul class=\"menu\">\n <li *ngIf=\"selection.hasValue()\">\n <ng-content select=\"[itemsSelectList]\"></ng-content>\n </li>\n <li *ngIf=\"selection.hasValue()\" class=\"text-center\">|</li>\n <li>\n <ng-content select=\"[itemsList]\"></ng-content>\n </li>\n </ul>\n </nav>\n <div *ngIf=\"loader | async\" class=\"spinner-container\" [ngClass]=\"{\n 'no-filter': !filterFormConfig\n }\">\n <mat-spinner diameter=\"40\"></mat-spinner>\n </div>\n <div class=\"list\">\n <table\n *ngIf=\"!emptyListComponent || (emptyListComponent && dataSource?.data?.length > 0) else emptyList\"\n [dataSource]=\"dataSource\"\n [matSortActive]=\"columnSort\"\n multiTemplateDataRows\n class=\"table-hover\"\n mat-table\n matSort\n [matSortDirection]=\"sortDirection\" matSortDisableClear>\n <ng-container matColumnDef=\"select\">\n <th *matHeaderCellDef mat-header-cell>\n <mat-checkbox (change)=\"$event ? selectAll() : null\"\n [checked]=\"selection.hasValue() && allSelected$ | async\"\n [indeterminate]=\"selection.hasValue() && !(allSelected$ | async)\">\n </mat-checkbox>\n </th>\n <td *matCellDef=\"let item\" mat-cell>\n <mat-checkbox *ngIf=\"disabledCheckboxItemList ? !disabledCheckboxItemList(item) : true\"\n (change)=\"$event ? selection.toggle(item) : null\"\n (click)=\"$event.stopPropagation(); selectItem();\"\n [checked]=\"selection.isSelected(item)\">\n </mat-checkbox>\n </td>\n <td *matFooterCellDef mat-footer-cell></td>\n </ng-container>\n\n <ng-container *ngIf=\"subListConfig && btnCollapseSubListConfig\" matColumnDef=\"collapseButton\">\n <th *matHeaderCellDef mat-header-cell></th>\n <td *matCellDef=\"let item\" mat-cell>\n <koala-button\n *ngIf=\"btnCollapseSubListConfig.show(item)\"\n (click)=\"expandedElement = expandedElement === item ? null : item\"\n [koalaIcon]=\"btnCollapseSubListConfig.koalaIcon\"\n [icon]=\"btnCollapseSubListConfig.icon\"\n [tooltip]=\"btnCollapseSubListConfig.tooltip\"\n [color]=\"btnCollapseSubListConfig.iconColor\"\n [backgroundColor]=\"btnCollapseSubListConfig.backgroundColor\"\n [koalaIconSize]=\"22\">\n </koala-button>\n </td>\n <td *matFooterCellDef mat-footer-cell></td>\n </ng-container>\n\n <ng-container *ngFor=\"let itemList of itemsList\" [matColumnDef]=\"itemList.columnDef\">\n <th *matHeaderCellDef [mat-sort-header]=\"itemList.sortHeader\" [disabled]=\"!itemList.sortHeader\" mat-header-cell>{{itemList.label}}</th>\n <td (dblclick)=\"itemList.dblClick(item)\" *matCellDef=\"let item\" mat-cell>\n\t <koala-dynamic-component *ngIf=\"itemList.itemComponent else itemText\"\n\t [dynamicComponent]=\"itemList.itemComponent(item)\"></koala-dynamic-component>\n\t <ng-template #itemText>\n\t {{itemList.itemNameProperty(item)}}\n\t </ng-template>\n </td>\n <td *matFooterCellDef mat-footer-cell>\n <koala-dynamic-component *ngIf=\"itemList.footer?.itemComponent else itemFooterText\"\n [dynamicComponent]=\"itemList.footer?.itemComponent(responseRequest)\"></koala-dynamic-component>\n <ng-template #itemFooterText>\n {{itemList.footer?.itemNameProperty(responseRequest)}}\n </ng-template>\n </td>\n </ng-container>\n\n <ng-container *ngIf=\"subListConfig && btnCollapseSubListConfig\" matColumnDef=\"koalaListDetails\">\n <th *matHeaderCellDef mat-header-cell></th>\n <td *matCellDef=\"let item\" [attr.colspan]=\"columnsToShowInList.length\" mat-cell>\n <div class=\"item-detail\" [@detailExpand]=\"item == expandedElement ? 'expanded' : 'collapsed'\">\n <koala-list [config]=\"subListConfig(item)\"></koala-list>\n </div>\n </td>\n <td *matFooterCellDef mat-footer-cell></td>\n </ng-container>\n\n <ng-container matColumnDef=\"options\">\n <th *matHeaderCellDef mat-header-cell></th>\n <td *matCellDef=\"let item\" mat-cell>\n <div *ngIf=\"haveOptionsOnItemLine(item)\">\n <button [matMenuTriggerFor]=\"options\" mat-icon-button type=\"button\">\n <i class='material-icons'>more_vert</i>\n </button>\n <mat-menu #options=\"matMenu\" class=\"menu-list\" yPosition=\"below\">\n\t <div *ngFor=\"let option of itemsMenuListOptions\">\n\t <button\n\t\t (click)=\"option.action(item)\"\n\t\t *ngIf=\"option.havePermission && (\n\t\t !option.showByItemList ||\n\t\t option.showByItemList(item)\n\t )\"\n\t\t mat-menu-item>\n\t <mat-icon>{{option.icon}}</mat-icon>\n\t <span>{{option.name}}</span>\n\t </button>\n\t </div>\n </mat-menu>\n </div>\n </td>\n <td *matFooterCellDef mat-footer-cell></td>\n </ng-container>\n\n <tr *matHeaderRowDef=\"columnsToShowInList; sticky: true\" mat-header-row></tr>\n <tr *matRowDef=\"let item; columns: columnsToShowInList;\" mat-row></tr>\n <ng-container *ngIf=\"subListConfig && btnCollapseSubListConfig\">\n <tr mat-row *matRowDef=\"let row; columns: ['koalaListDetails']\" class=\"item-detail-row\"></tr>\n </ng-container>\n <ng-container *ngIf=\"hasFooter()\">\n <tr *matFooterRowDef=\"columnsToShowInList; sticky: true\" mat-footer-row></tr>\n </ng-container>\n </table>\n <ng-template #emptyList>\n <koala-dynamic-component *ngIf=\"!(filterError$ | async) else errorList\" [dynamicComponent]=\"emptyListComponent\"></koala-dynamic-component>\n <ng-template #errorList>\n <koala-dynamic-component [dynamicComponent]=\"errorListComponent\"></koala-dynamic-component>\n </ng-template>\n </ng-template>\n </div>\n <div *ngIf=\"!hidePaginator\" class=\"content-paginator\">\n <mat-paginator\n [length]=\"qtdListResult\"\n [pageSizeOptions]=\"limitOptions\"\n [pageSize]=\"pageSize\"\n showFirstLastButtons>\n </mat-paginator>\n </div>\n</div>\n", styles: [".list-container{border-radius:10px;margin:0 auto;overflow-x:hidden;width:calc(100% - 40px);position:relative}.list-container .spinner-container{position:absolute;width:100%;height:calc(100vh - 320px);top:100px;left:0;background:rgba(0,0,0,.15);z-index:2;display:flex;align-items:center;justify-content:center}.list-container .spinner-container.no-filter{top:40px}.list-container .list{display:block;height:calc(100vh - 320px);overflow-y:auto;position:relative;top:0;width:100%;z-index:1}.list-container .list table:not(.table-not-selection) .mat-header-cell:first-child,.list-container .list .mat-header-cell:last-child,.list-container .list .mat-header-cell.mat-column-collapseButton{width:5%}.list-container .list .mat-header-cell:last-child{text-align:center}.list-container .list .mat-header-row,.list-container .list .mat-row,.list-container .list .mat-footer-row{height:35px}.list-container .list .mat-row .mat-icon-button{height:35px;line-height:35px;width:35px}.list-container .list tr.detail-row:not(.expanded-row){height:0}.list-container .list .element-detail{display:flex;overflow:hidden}.list-container .list table{position:relative;width:100%;font-family:OpenSans,sans-serif;font-size:1em}.list-container .list table.table-hover tr{cursor:pointer;transition:.2s}.list-container .list table th:first-child,.list-container .list table td:first-child{padding:0 8px 0 20px}.list-container .list table th{font-size:.7em;padding:0 8px;font-family:OpenSans,sans-serif;line-height:1em}.list-container .list table td{font-size:.8em;padding:0 8px;font-family:OpenSans,sans-serif}.list-container .list table th:last-child,.list-container .list table td:last-child{padding:0 20px 0 8px}.list-container .list .mat-list-item-content,.list-container .list .mat-list-item-content .mat-list-text{padding:0}.list-container .list-filter{box-shadow:0 1px 3px #0000004d;height:60px;position:relative;z-index:3}.list-container .list-filter .main{display:flex;justify-content:space-between;font-size:1.05em;height:60px;overflow:hidden;padding-left:2.5px;position:relative;width:100%}.list-container .list-filter .main koala-dynamic-form{width:100%}.list-container .list-filter .main mat-form-field{display:inline-block}.list-container .list-filter .main .mat-form-field-appearance-fill .mat-form-field-flex{background:transparent}.list-container .list-filter .main .mat-form-field .mat-form-field-wrapper{padding-bottom:0}.list-container .list-filter .main .mat-form-field-underline,.list-container .list-filter .main .mat-form-field-appearance-legacy .mat-form-field-subscript-wrapper,.list-container .list-filter .main .mat-form-field-wrapper .mat-form-field-subscript-wrapper{display:none}.list-container .list-filter ul{display:flex;align-items:center;font-size:0;list-style:none;margin:0;padding:0 15px 0 0;position:relative;text-align:right}.list-container .list-filter ul li{display:inline-block;font-size:14px;padding:5px;position:relative}.list-container .list-filter ul li.option button{transition:.2s}.list-container .list-filter ul li.option button:hover{background:rgba(0,0,0,.1)}.list-container .list-filter ul li.checkbox-filter{text-align:center}.list-container .list-filter ul li.checkbox-filter .checkbox-inline{top:-5px}.list-container .list-filter ul li.checkbox-filter input[type=checkbox]{margin-left:0}.list-container .list-filter ul li.checkbox-filter label{padding:0!important;width:auto}.list-container .list-filter .advanced{border-top:1px solid #dddddd;box-shadow:0 3px 10px #0000004d;height:0;overflow-x:hidden;overflow-y:auto;position:absolute;top:60px;transition:.2s;width:100%;z-index:1}.list-container .list-filter .advanced .container-filter{padding:15px}.list-container .list-filter .advanced.show{height:360px}.list-container nav.menu-list{height:40px;margin:0;padding:3px 0;position:relative;transition:.2s;width:100%;z-index:2;box-sizing:border-box}.list-container nav.menu-list ul.menu{float:left;font-size:0;list-style:none;margin:0;padding:0 10px;position:relative;text-align:left}.list-container nav.menu-list ul.menu li{color:#616161;display:inline-block;font-size:16px;padding:0 4px}.list-container nav.menu-list ul.menu li button.mat-button,.list-container nav.menu-list ul.menu li button.koala-icon-button{display:inline-block}.list-container .content-paginator mat-paginator .mat-paginator-container{height:40px!important;min-height:40px!important}.list-container .content-paginator mat-paginator .mat-paginator-container .mat-paginator-page-size-select{height:40px;margin-top:0!important}.list-container .content-paginator mat-paginator .mat-paginator-container .mat-paginator-range-label{margin-top:3px}.list-container .content-paginator{position:relative;background:transparent!important;z-index:2;box-shadow:-3px 1px 3px #0000004d}.list-container .item-detail{overflow:hidden}.list-container tr.item-detail-row{height:0!important}.list-container tr.item-detail-row .list-container{width:100%!important}.list-container tr.item-detail-row .list-container .list{height:auto!important;max-height:250px!important}.list-container tr.item-detail-row .list-container nav.menu-list{display:none}@media (max-width: 900px){.list-container{width:100%;box-shadow:none!important;padding:15px 10px 15px 15px;box-sizing:border-box}.list-container .list{height:auto;overflow:unset}.list-container .list-filter .main{justify-content:flex-end}}\n"] }]
467
+ ], template: "<div class=\"list-container\" [ngClass]=\"customClass\">\n <div *ngIf=\"filterFormConfig\" class=\"list-filter\">\n <form (ngSubmit)=\"filterSubmit()\" [formGroup]=\"formFilter\">\n <div class=\"main\">\n <koala-dynamic-form\n *ngIf=\"filterFormConfig.main\"\n [form]=\"filterFormConfig.main.form\"\n [formConfig]=\"filterFormConfig.main.formConfig\"\n [setValues]=\"filterFormConfig.main.setValues\"\n [showFields]=\"filterFormConfig.main.showFields\">\n </koala-dynamic-form>\n <ul>\n <li *ngIf=\"filterFormConfig.advanced\" class=\"option\">\n <button (click)=\"toogleFilter()\" color=\"primary\" mat-icon-button matTooltip=\"Filtro Avan\u00E7ado\"\n matTooltipPosition=\"below\" type=\"button\">\n <mat-icon>tune</mat-icon>\n </button>\n </li>\n <li *ngIf=\"filterFormConfig.checkAndSearch\" class=\"checkbox-filter\">\n <mat-checkbox (click)=\"filterSubmit()\"\n [formControlName]=\"filterFormConfig.checkAndSearch.formControlName\">\n {{filterFormConfig.checkAndSearch.label}}\n </mat-checkbox>\n </li>\n <li class=\"option\">\n <koala-submit\n [btnSubmitDisabled]=\"btnSubmitDisabled\"\n [fg]=\"formFilter\"\n [iconButton]=\"true\"\n [loader]=\"loader\"\n icon=\"search\">\n </koala-submit>\n </li>\n </ul>\n </div>\n <div *ngIf=\"filterFormConfig.advanced\" [ngClass]=\"{'show': showAdvancedFilter}\" class=\"advanced\">\n <div class=\"container-filter\">\n <koala-dynamic-form\n [form]=\"filterFormConfig.advanced.form\"\n [formConfig]=\"filterFormConfig.advanced.formConfig\"\n [setValues]=\"filterFormConfig.advanced.setValues\"\n [showFields]=\"filterFormConfig.advanced.showFields\">\n </koala-dynamic-form>\n </div>\n </div>\n </form>\n </div>\n <nav class=\"menu-list\">\n <ul class=\"menu\">\n <li *ngIf=\"selection.hasValue()\">\n <ng-content select=\"[itemsSelectList]\"></ng-content>\n </li>\n <li *ngIf=\"selection.hasValue()\" class=\"text-center\">|</li>\n <li>\n <ng-content select=\"[itemsList]\"></ng-content>\n </li>\n </ul>\n </nav>\n <div *ngIf=\"loader | async\" class=\"spinner-container\" [ngClass]=\"{\n 'no-filter': !filterFormConfig\n }\">\n <mat-spinner diameter=\"40\"></mat-spinner>\n </div>\n <div class=\"list\">\n <table\n *ngIf=\"!emptyListComponent || (emptyListComponent && dataSource?.data?.length > 0) else emptyList\"\n [dataSource]=\"dataSource\"\n [matSortActive]=\"columnSort\"\n [id]=\"tableId\"\n multiTemplateDataRows\n class=\"table-hover\"\n mat-table\n matSort\n [matSortDirection]=\"sortDirection\" matSortDisableClear>\n <ng-container matColumnDef=\"select\">\n <th *matHeaderCellDef mat-header-cell>\n <mat-checkbox (change)=\"$event ? selectAll() : null\"\n [checked]=\"selection.hasValue() && allSelected$ | async\"\n [indeterminate]=\"selection.hasValue() && !(allSelected$ | async)\">\n </mat-checkbox>\n </th>\n <td *matCellDef=\"let item\" mat-cell>\n <mat-checkbox *ngIf=\"disabledCheckboxItemList ? !disabledCheckboxItemList(item) : true\"\n (change)=\"$event ? selection.toggle(item) : null\"\n (click)=\"$event.stopPropagation(); selectItem();\"\n [checked]=\"selection.isSelected(item)\">\n </mat-checkbox>\n </td>\n <td *matFooterCellDef mat-footer-cell></td>\n </ng-container>\n\n <ng-container *ngIf=\"subListConfig && btnCollapseSubListConfig\" matColumnDef=\"collapseButton\">\n <th *matHeaderCellDef mat-header-cell></th>\n <td *matCellDef=\"let item\" mat-cell>\n <koala-button\n *ngIf=\"btnCollapseSubListConfig.show(item)\"\n (click)=\"expandedElement = expandedElement === item ? null : item\"\n [koalaIcon]=\"btnCollapseSubListConfig.koalaIcon\"\n [icon]=\"btnCollapseSubListConfig.icon\"\n [tooltip]=\"btnCollapseSubListConfig.tooltip\"\n [color]=\"btnCollapseSubListConfig.iconColor\"\n [backgroundColor]=\"btnCollapseSubListConfig.backgroundColor\"\n [koalaIconSize]=\"22\">\n </koala-button>\n </td>\n <td *matFooterCellDef mat-footer-cell></td>\n </ng-container>\n\n <ng-container *ngFor=\"let itemList of itemsList\" [matColumnDef]=\"itemList.columnDef\">\n <th *matHeaderCellDef [mat-sort-header]=\"itemList.sortHeader\" [disabled]=\"!itemList.sortHeader\" mat-header-cell>{{itemList.label}}</th>\n <td (dblclick)=\"itemList.dblClick(item)\" *matCellDef=\"let item\" mat-cell>\n\t <koala-dynamic-component *ngIf=\"itemList.itemComponent else itemText\"\n\t [dynamicComponent]=\"itemList.itemComponent(item)\"></koala-dynamic-component>\n\t <ng-template #itemText>\n\t {{itemList.itemNameProperty(item)}}\n\t </ng-template>\n </td>\n <td *matFooterCellDef mat-footer-cell>\n <koala-dynamic-component *ngIf=\"itemList.footer?.itemComponent else itemFooterText\"\n [dynamicComponent]=\"itemList.footer?.itemComponent(responseRequest)\"></koala-dynamic-component>\n <ng-template #itemFooterText>\n {{itemList.footer?.itemNameProperty(responseRequest)}}\n </ng-template>\n </td>\n </ng-container>\n\n <ng-container *ngIf=\"subListConfig && btnCollapseSubListConfig\" matColumnDef=\"koalaListDetails\">\n <th *matHeaderCellDef mat-header-cell></th>\n <td *matCellDef=\"let item\" [attr.colspan]=\"columnsToShowInList.length\" mat-cell>\n <div class=\"item-detail\" [@detailExpand]=\"item == expandedElement ? 'expanded' : 'collapsed'\">\n <koala-list [config]=\"subListConfig(item)\"></koala-list>\n </div>\n </td>\n <td *matFooterCellDef mat-footer-cell></td>\n </ng-container>\n\n <ng-container matColumnDef=\"options\">\n <th *matHeaderCellDef mat-header-cell></th>\n <td *matCellDef=\"let item\" mat-cell>\n <div *ngIf=\"haveOptionsOnItemLine(item)\">\n <button [matMenuTriggerFor]=\"options\" mat-icon-button type=\"button\">\n <i class='material-icons'>more_vert</i>\n </button>\n <mat-menu #options=\"matMenu\" class=\"menu-list\" yPosition=\"below\">\n\t <div *ngFor=\"let option of itemsMenuListOptions\">\n\t <button\n\t\t (click)=\"option.action(item)\"\n\t\t *ngIf=\"option.havePermission && (\n\t\t !option.showByItemList ||\n\t\t option.showByItemList(item)\n\t )\"\n\t\t mat-menu-item>\n\t <mat-icon>{{option.icon}}</mat-icon>\n\t <span>{{option.name}}</span>\n\t </button>\n\t </div>\n </mat-menu>\n </div>\n </td>\n <td *matFooterCellDef mat-footer-cell></td>\n </ng-container>\n\n <tr *matHeaderRowDef=\"columnsToShowInList; sticky: true\" mat-header-row></tr>\n <tr *matRowDef=\"let item; columns: columnsToShowInList;\" mat-row></tr>\n <ng-container *ngIf=\"subListConfig && btnCollapseSubListConfig\">\n <tr mat-row *matRowDef=\"let row; columns: ['koalaListDetails']\" class=\"item-detail-row\"></tr>\n </ng-container>\n <ng-container *ngIf=\"hasFooter()\">\n <tr *matFooterRowDef=\"columnsToShowInList; sticky: true\" mat-footer-row></tr>\n </ng-container>\n </table>\n <ng-template #emptyList>\n <koala-dynamic-component *ngIf=\"!(filterError$ | async) else errorList\" [dynamicComponent]=\"emptyListComponent\"></koala-dynamic-component>\n <ng-template #errorList>\n <koala-dynamic-component [dynamicComponent]=\"errorListComponent\"></koala-dynamic-component>\n </ng-template>\n </ng-template>\n </div>\n <div *ngIf=\"!hidePaginator\" class=\"content-paginator\">\n <mat-paginator\n [length]=\"qtdListResult\"\n [pageSizeOptions]=\"limitOptions\"\n [pageSize]=\"pageSize\"\n showFirstLastButtons>\n </mat-paginator>\n </div>\n</div>\n", styles: [".list-container{border-radius:10px;margin:0 auto;overflow-x:hidden;width:calc(100% - 40px);position:relative}.list-container .spinner-container{position:absolute;width:100%;height:calc(100vh - 320px);top:100px;left:0;background:rgba(0,0,0,.15);z-index:2;display:flex;align-items:center;justify-content:center}.list-container .spinner-container.no-filter{top:40px}.list-container .list{display:block;height:calc(100vh - 320px);overflow-y:auto;position:relative;top:0;width:100%;z-index:1}.list-container .list table:not(.table-not-selection) .mat-header-cell:first-child,.list-container .list .mat-header-cell:last-child,.list-container .list .mat-header-cell.mat-column-collapseButton{width:5%}.list-container .list .mat-header-cell:last-child{text-align:center}.list-container .list .mat-header-row,.list-container .list .mat-row,.list-container .list .mat-footer-row{height:35px}.list-container .list .mat-row .mat-icon-button{height:35px;line-height:35px;width:35px}.list-container .list tr.detail-row:not(.expanded-row){height:0}.list-container .list .element-detail{display:flex;overflow:hidden}.list-container .list table{position:relative;width:100%;font-family:OpenSans,sans-serif;font-size:1em}.list-container .list table.table-hover tr{cursor:pointer;transition:.2s}.list-container .list table th:first-child,.list-container .list table td:first-child{padding:0 8px 0 20px}.list-container .list table th{font-size:.7em;padding:0 8px;font-family:OpenSans,sans-serif;line-height:1em}.list-container .list table td{font-size:.8em;padding:0 8px;font-family:OpenSans,sans-serif}.list-container .list table th:last-child,.list-container .list table td:last-child{padding:0 20px 0 8px}.list-container .list .mat-list-item-content,.list-container .list .mat-list-item-content .mat-list-text{padding:0}.list-container .list-filter{box-shadow:0 1px 3px #0000004d;height:60px;position:relative;z-index:3}.list-container .list-filter .main{display:flex;justify-content:space-between;font-size:1.05em;height:60px;overflow:hidden;padding-left:2.5px;position:relative;width:100%}.list-container .list-filter .main koala-dynamic-form{width:100%}.list-container .list-filter .main mat-form-field{display:inline-block}.list-container .list-filter .main .mat-form-field-appearance-fill .mat-form-field-flex{background:transparent}.list-container .list-filter .main .mat-form-field .mat-form-field-wrapper{padding-bottom:0}.list-container .list-filter .main .mat-form-field-underline,.list-container .list-filter .main .mat-form-field-appearance-legacy .mat-form-field-subscript-wrapper,.list-container .list-filter .main .mat-form-field-wrapper .mat-form-field-subscript-wrapper{display:none}.list-container .list-filter ul{display:flex;align-items:center;font-size:0;list-style:none;margin:0;padding:0 15px 0 0;position:relative;text-align:right}.list-container .list-filter ul li{display:inline-block;font-size:14px;padding:5px;position:relative}.list-container .list-filter ul li.option button{transition:.2s}.list-container .list-filter ul li.option button:hover{background:rgba(0,0,0,.1)}.list-container .list-filter ul li.checkbox-filter{text-align:center}.list-container .list-filter ul li.checkbox-filter .checkbox-inline{top:-5px}.list-container .list-filter ul li.checkbox-filter input[type=checkbox]{margin-left:0}.list-container .list-filter ul li.checkbox-filter label{padding:0!important;width:auto}.list-container .list-filter .advanced{border-top:1px solid #dddddd;box-shadow:0 3px 10px #0000004d;height:0;overflow-x:hidden;overflow-y:auto;position:absolute;top:60px;transition:.2s;width:100%;z-index:1}.list-container .list-filter .advanced .container-filter{padding:15px}.list-container .list-filter .advanced.show{height:360px}.list-container nav.menu-list{height:40px;margin:0;padding:3px 0;position:relative;transition:.2s;width:100%;z-index:2;box-sizing:border-box}.list-container nav.menu-list ul.menu{float:left;font-size:0;list-style:none;margin:0;padding:0 10px;position:relative;text-align:left}.list-container nav.menu-list ul.menu li{color:#616161;display:inline-block;font-size:16px;padding:0 4px}.list-container nav.menu-list ul.menu li button.mat-button,.list-container nav.menu-list ul.menu li button.koala-icon-button{display:inline-block}.list-container .content-paginator mat-paginator .mat-paginator-container{height:40px!important;min-height:40px!important}.list-container .content-paginator mat-paginator .mat-paginator-container .mat-paginator-page-size-select{height:40px;margin-top:0!important}.list-container .content-paginator mat-paginator .mat-paginator-container .mat-paginator-range-label{margin-top:3px}.list-container .content-paginator{position:relative;background:transparent!important;z-index:2;box-shadow:-3px 1px 3px #0000004d}.list-container .item-detail{overflow:hidden}.list-container tr.item-detail-row{height:0!important}.list-container tr.item-detail-row .list-container{width:100%!important}.list-container tr.item-detail-row .list-container .list{height:auto!important;max-height:250px!important}.list-container tr.item-detail-row .list-container nav.menu-list{display:none}@media (max-width: 900px){.list-container{width:100%;box-shadow:none!important;padding:15px 10px 15px 15px;box-sizing:border-box}.list-container .list{height:auto;overflow:unset}.list-container .list-filter .main{justify-content:flex-end}}\n"] }]
458
468
  }], ctorParameters: function () { return [{ type: i1.FormBuilder }, { type: i2.KoalaDynamicFormService }, { type: i3.DeviceDetectorService }]; }, propDecorators: { config: [{
459
469
  type: Input
460
470
  }], paginator: [{
@@ -1 +1 @@
1
- {"version":3,"file":"koalarx-ui-list.mjs","sources":["../../../projects/list/src/lib/providers/pagination/pagination.provider.ts","../../../projects/list/src/lib/list-builder/list.builder.ts","../../../projects/list/src/lib/koala.list.service.ts","../../../projects/list/src/lib/list.abstract.ts","../../../projects/list/src/lib/list.component.ts","../../../projects/list/src/lib/list.component.html","../../../projects/list/src/lib/koala.list.module.ts","../../../projects/list/src/koalarx-ui-list.ts"],"sourcesContent":["import { MatPaginatorIntl } from '@angular/material/paginator';\nimport { Injectable } from '@angular/core';\n\n@Injectable()\nexport class PaginationProvider extends MatPaginatorIntl {\n constructor() {\n super();\n this.getAndInitTranslations();\n }\n\n public getAndInitTranslations() {\n this.itemsPerPageLabel = \"Itens por Página\";\n this.firstPageLabel = \"Primeira Página\";\n this.nextPageLabel = \"Próxima Página\";\n this.previousPageLabel = \"Página Anterior\";\n this.lastPageLabel = \"Última Página\";\n this.changes.next();\n }\n\n public getRangeLabel = (page: number, pageSize: number, length: number) => {\n if (length === 0 || pageSize === 0) {\n return `0 / ${length}`;\n }\n length = Math.max(length, 0);\n const startIndex = page * pageSize;\n const endIndex = startIndex < length ? Math.min(startIndex + pageSize, length) : startIndex + pageSize;\n return `${startIndex + 1} - ${endIndex} / ${length}`;\n }\n}\n","import { KoalaListConfigInterface } from \"../koala.list-config.interface\";\nimport { KoalaListItemInterface } from \"../koala-list-item.interface\";\nimport { Type } from \"@angular/core\";\nimport { KoalaDynamicComponent } from \"@koalarx/ui/dynamic-component\";\nimport { KoalaListFilterInterface } from \"../koala-list-filter.interface\";\nimport { BehaviorSubject, Observable } from \"rxjs\";\nimport { KoalaListFormFilterInterface } from \"../koala-list-form-filter.interface\";\nimport { KoalaListItemMenuOptionInterface } from \"../koala-list-item-menu-option.interface\";\nimport { SelectionModel } from \"@angular/cdk/collections\";\nimport { KoalaListPageSize } from \"../list.abstract\";\nimport { first } from \"rxjs/operators\";\nimport { KoalaListBtnCollapseSubListConfigInterface } from \"../koala-list-btn-collapse-sub-list-config.interface\";\n\nexport class ListBuilder<DataType> {\n private config = {} as KoalaListConfigInterface;\n\n public service(\n service: (filter: BehaviorSubject<KoalaListFormFilterInterface>) => Observable<any> | Promise<any>,\n type: 'all' | 'onDemand' = \"all\",\n resultIndexName?: string,\n qtdResultIndexName?: string\n ) {\n this.config.typeRequest = type;\n this.config.responseIndexName = resultIndexName;\n this.config.responseQtdResultIndexName = response => response[qtdResultIndexName ?? ''] ?? [];\n this.config.columnSort = this.config?.filterParams?.getValue()?.sort;\n this.config.sortDirection = this.config?.filterParams?.getValue()?.order ?? 'asc';\n\n const response = service(this.config.filterParams ?? null);\n\n if (response instanceof Promise) {\n this.config.request = new Observable<any>(observe => {\n response.then(response => observe.next(response))\n .catch(error => observe.error(error));\n }).pipe(first());\n } else {\n this.config.request = new Observable<any>(observe => {\n (service(this.config.filterParams ?? null) as Observable<any>).pipe(first()).subscribe(observe);\n }).pipe(first());\n }\n\n return this;\n }\n\n public filterConfig(config: KoalaListFilterInterface) {\n this.config.filterFormConfig = config;\n return this;\n }\n\n public defaultFilter(config: KoalaListFormFilterInterface) {\n this.config.filterParams = new BehaviorSubject<KoalaListFormFilterInterface>(config);\n return this;\n }\n\n public pageSize(size: KoalaListPageSize) {\n this.config.pageSize = size;\n return this;\n }\n\n public columns(columns: string[]) {\n this.config.columnsToShowInList = columns;\n return this;\n }\n\n public itemColumn(item: KoalaListItemInterface<DataType>) {\n (this.config.itemsList?.length > 0) ?\n this.config.itemsList.push(item) :\n this.config.itemsList = [item];\n\n return this;\n }\n\n public actionList(item: KoalaListItemMenuOptionInterface<DataType>) {\n (this.config.itemsMenuListOptions?.length ?? 0 > 0) ?\n this.config.itemsMenuListOptions?.push(item) :\n this.config.itemsMenuListOptions = [item];\n\n return this;\n }\n\n public getDataSource(fn: (dataSource: DataType[]) => void) {\n this.config.getDataSource = fn;\n return this;\n }\n\n public getSelectionList(fn: (selection: SelectionModel<DataType>) => void) {\n this.config.getSelectionList = fn;\n return this;\n }\n\n public emptyListComponent(component: Type<any>, data?: any) {\n this.config.emptyListComponent = new KoalaDynamicComponent(component, data);\n return this;\n }\n\n public errorListComponent(component: Type<any>, data?: any) {\n this.config.errorListComponent = new KoalaDynamicComponent(component, data);\n return this;\n }\n\n public disableCheckboxItemList(fn: (item: DataType) => boolean) {\n this.config.disabledCheckboxItemList = fn;\n return this;\n }\n\n public setSubList(config: (item: DataType) => KoalaListConfigInterface) {\n this.config.subListConfig = config;\n return this;\n }\n\n public defineBtnCollapseSubListConfig(config: KoalaListBtnCollapseSubListConfigInterface<DataType>) {\n this.config.btnCollapseSubListConfig = config;\n return this;\n }\n\n public hidePaginator(hide: boolean = true) {\n this.config.hidePaginator = hide;\n return this;\n }\n\n public setCustomClass(className: string) {\n this.config.customClass = className;\n return this;\n }\n\n public getConfig(): KoalaListConfigInterface {\n this.config.reload = new BehaviorSubject<boolean>(false);\n return this.config;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { ListBuilder } from \"./list-builder/list.builder\";\n\n@Injectable({providedIn: \"any\"})\nexport class KoalaListService {\n\n public build<DataType>() {\n return new ListBuilder<DataType>();\n }\n}\n","import { SelectionModel } from '@angular/cdk/collections';\nimport { MatPaginator } from '@angular/material/paginator';\nimport { MatSort } from '@angular/material/sort';\nimport { BehaviorSubject, merge, Observable, Subscription } from 'rxjs';\nimport { FormAbstract } from '@koalarx/ui/form';\nimport { FormGroup } from '@angular/forms';\nimport { debounceTime, first, map, startWith, switchMap } from 'rxjs/operators';\nimport { MatTableDataSource } from '@angular/material/table';\nimport { KoalaListFormFilterInterface } from './koala-list-form-filter.interface';\nimport { KoalaDynamicComponent } from \"@koalarx/ui/dynamic-component\";\nimport { delay } from \"@koalarx/utils/operators/delay\";\nimport { KoalaListConfigInterface } from \"./koala.list-config.interface\";\n\nexport type KoalaListPageSize = 10 | 20 | 30 | 50 | 100;\n\nexport abstract class ListAbstract extends FormAbstract {\n public selection = new SelectionModel<object>(true, []);\n public limitOptions: number[] = [10, 20, 30, 50, 100];\n public showMenuList: boolean = false;\n public allSelected$ = new BehaviorSubject<boolean>(false);\n public dataSource = new MatTableDataSource<any>([]);\n public typeRequest: 'all' | 'onDemand' = 'onDemand';\n public filterParams = new BehaviorSubject<KoalaListFormFilterInterface|null>(null);\n public filterError$ = new BehaviorSubject<any>(null);\n public emptyListComponent?: KoalaDynamicComponent;\n public errorListComponent?: KoalaDynamicComponent;\n public pageSize: KoalaListPageSize;\n\n protected config?: KoalaListConfigInterface;\n protected paginator?: MatPaginator;\n protected sort?: MatSort;\n\n private subscriptionList?: Subscription;\n private subscriptionSortList?: Subscription;\n private intervalSortList: any;\n\n protected constructor(\n private requestFunction: () => Observable<any>,\n private requestResponseFunction: <T>(results: T[]) => void,\n formSearch: () => FormGroup\n ) {\n super(formSearch);\n }\n\n public selectAll() {\n this.isAllSelected() ?\n this.selection.clear() :\n this.dataSource.data.forEach(item => {\n if (\n (this.config?.disabledCheckboxItemList && !this.config.disabledCheckboxItemList(item)) ||\n !this.config?.disabledCheckboxItemList\n ) {\n this.selection.select(item);\n }\n });\n\n this.isAllSelected();\n }\n\n public defineStatusSelectAll(status: boolean) {\n this.allSelected$.next(status);\n return this.allSelected$.getValue();\n }\n\n public selectItem() {\n setTimeout(() => {\n this.showMenuList = this.selection.hasValue();\n this.isAllSelected();\n }, 50);\n }\n\n public async search(filter?: any) {\n this.loading(true);\n this.selection.clear();\n if (this.paginator) {\n this.paginator.firstPage();\n }\n this.filterParams.next({\n params: filter,\n sort: this.sort?.active ?? '',\n order: this.sort?.direction ?? 'asc',\n page: this.paginator?.pageIndex ?? 0,\n limit: this.paginator?.pageSize ?? 30\n });\n }\n\n protected onDestroy() {\n this.subscriptionSortList?.unsubscribe();\n this.subscriptionList?.unsubscribe();\n clearInterval(this.intervalSortList);\n }\n\n protected async afterViewInit() {\n let tentativas = 0;\n let stop = false;\n do {\n tentativas++;\n await delay(400);\n if (this.sort || this.emptyListComponent) {\n this.prepareSearch().then();\n if (this.emptyListComponent) stop = true;\n } else if (tentativas > 10) {\n stop = true;\n }\n } while (!this.sort && !stop);\n }\n\n private async prepareSearch() {\n this.intervalSortList = setInterval(() => {\n if (this.sort && !this.subscriptionSortList) {\n this.subscriptionSortList = this.sort.sortChange.subscribe(() => {\n const filter = this.filterParams.value ?? {} as any;\n filter.sort = this.sort?.active ?? '';\n filter.order = this.sort?.direction ?? '';\n this.filterParams.next(filter);\n });\n } else if (!this.sort && this.subscriptionSortList) {\n this.subscriptionSortList.unsubscribe();\n }\n }, 50);\n\n if (this.typeRequest === 'onDemand') {\n this.subscriptionList = merge(this.paginator?.page ?? new Observable(), this.filterParams).pipe(\n startWith({}),\n switchMap(() => new Observable(observe => {\n this.loading(true);\n this.selection.clear();\n if (this.filterParams.value) {\n this.filterParams.value.sort = this.sort?.active ?? this.config?.columnSort ?? '';\n this.filterParams.value.order = this.sort?.direction ?? this.config?.sortDirection ?? '';\n this.filterParams.value.page = this.paginator?.pageIndex ?? 0;\n this.filterParams.value.limit = this.paginator?.pageSize ?? 30;\n }\n observe.next(true);\n })),\n debounceTime(300),\n switchMap(() => this.runRequestFunction()),\n map((response) => {\n this.loading(false);\n return this.requestResponseFunction(response);\n })\n ).subscribe();\n } else {\n if (this.paginator) this.dataSource.paginator = this.paginator;\n this.subscriptionList = this.filterParams.pipe(\n startWith({}),\n debounceTime(300),\n switchMap(() => this.runRequestFunction()),\n map((response) => {\n this.loading(false);\n return this.requestResponseFunction(response);\n })\n ).subscribe();\n }\n\n if (this.emptyListComponent) {\n do {\n await delay(301);\n if (this.sort) {\n if (this.typeRequest === \"onDemand\") {\n this.sort.sortChange.subscribe(() => {\n if (this.paginator) this.paginator.pageIndex = 0\n });\n } else {\n this.dataSource.sort = this.sort;\n }\n }\n } while (!this.sort);\n }\n }\n\n private isAllSelected() {\n const numSelected = this.selection.selected.length;\n const numRows = (this.config?.disabledCheckboxItemList ?\n this.dataSource.data.filter(item => !(this.config?.disabledCheckboxItemList\n ? this.config.disabledCheckboxItemList(item)\n : '')) :\n this.dataSource.data).length;\n\n return this.defineStatusSelectAll(numSelected === numRows);\n }\n\n private runRequestFunction() {\n return new Observable<unknown[]>(observe => {\n this.requestFunction().pipe(first()).subscribe({\n next: response => observe.next(response),\n error: err => {\n if (this.errorListComponent) {\n this.filterError$.next(err);\n this.errorListComponent.data = err;\n }\n this.loading(false);\n observe.next([]);\n }\n })\n })\n }\n}\n","import { AfterViewInit, ChangeDetectionStrategy, Component, Input, OnDestroy, OnInit, ViewChild } from '@angular/core';\nimport { ListAbstract } from './list.abstract';\nimport { KoalaListItemMenuOptionInterface } from './koala-list-item-menu-option.interface';\nimport { FormBuilder, FormControl, FormGroup } from '@angular/forms';\nimport { BehaviorSubject, Observable } from 'rxjs';\nimport { KoalaListFilterInterface } from './koala-list-filter.interface';\nimport { KoalaDynamicFormService, KoalaDynamicFormConfigInterface } from '@koalarx/ui/form';\nimport { KoalaListItemInterface } from './koala-list-item.interface';\nimport { KoalaListFormFilterInterface } from \"./koala-list-form-filter.interface\";\nimport { MatSort, SortDirection } from \"@angular/material/sort\";\nimport { delay } from \"@koalarx/utils/operators/delay\";\nimport { koala } from \"@koalarx/utils\";\nimport { DeviceDetectorService } from \"ngx-device-detector\";\nimport { KoalaListConfigInterface } from \"./koala.list-config.interface\";\nimport { MatPaginator } from \"@angular/material/paginator\";\nimport { KoalaListBtnCollapseSubListConfigInterface } from \"./koala-list-btn-collapse-sub-list-config.interface\";\nimport { animate, state, style, transition, trigger } from \"@angular/animations\";\n\n@Component({\n selector: 'koala-list',\n templateUrl: 'list.component.html',\n styleUrls: ['list.component.css'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n animations: [\n trigger('detailExpand', [\n state('collapsed', style({height: '0px', minHeight: '0'})),\n state('expanded', style({height: '*'})),\n transition('expanded <=> collapsed', animate('225ms cubic-bezier(0.4, 0.0, 0.2, 1)')),\n ]),\n ],\n})\nexport class ListComponent extends ListAbstract implements OnInit, AfterViewInit, OnDestroy {\n @Input() public config?: KoalaListConfigInterface;\n\n @ViewChild(MatPaginator) protected paginator: MatPaginator;\n @ViewChild(MatSort, {static: false}) protected sort: MatSort;\n\n public customClass?: string;\n public columnsToShowInList?: string[];\n public hidePaginator?: boolean = false;\n public columnSort?: string;\n public sortDirection: SortDirection = 'asc';\n public itemsMenuListOptions?: KoalaListItemMenuOptionInterface<any>[];\n public itemsList?: KoalaListItemInterface<any>[];\n public request?: Observable<any>;\n public responseIndexName?: string;\n public responseQtdResultIndexName?: (response: any) => number;\n public responseRequest?: any;\n public typeRequest: 'all' | 'onDemand' = 'all'\n public filterFormConfig?: KoalaListFilterInterface;\n public reload?: BehaviorSubject<boolean>;\n public formFilter?: FormGroup;\n public showAdvancedFilter: boolean = false;\n public qtdListResult = 0;\n public disabledCheckboxItemList?: (item: any) => boolean;\n public expandedElement = false;\n public btnCollapseSubListConfig?: KoalaListBtnCollapseSubListConfigInterface<any>;\n public subListConfig?: (item: any) => KoalaListConfigInterface;\n\n constructor(\n private fb: FormBuilder,\n private dynamicFormService: KoalaDynamicFormService,\n private deviceService: DeviceDetectorService\n ) {\n super(\n () => this.config?.request ?? new Observable<any>(),\n (response) => {\n this.responseRequest = response;\n this.dataSource.data = this.config?.responseIndexName\n ? (this.config.responseIndexName\n ? response[this.config.responseIndexName]\n : [])\n : response;\n if (this.config?.getDataSource) this.config?.getDataSource(this.dataSource.data);\n this.qtdListResult = this.config?.responseQtdResultIndexName\n ? this.config.responseQtdResultIndexName(response) ?? 0\n : this.dataSource.data?.length ?? 0;\n },\n () => this.formFilter ?? fb.group({})\n );\n }\n\n ngOnInit() {\n this.initConfig();\n this.formFilter = this.fb.group({\n formSearch: this.filterFormConfig?.main?.form ?? [''],\n formAdvancedSearch: this.filterFormConfig?.advanced?.form ?? ['']\n });\n this.loading(true);\n if (this.filterFormConfig) {\n this.filterFormConfig?.main?.formConfig?.map(item => {\n item.class += ' padding-none w-99';\n return item;\n });\n this.filterFormConfig?.advanced?.formConfig?.map(item => {\n item.class += ' padding-none';\n return item;\n });\n if (this.filterFormConfig?.checkAndSearch) {\n this.formFilter.addControl(this.filterFormConfig.checkAndSearch.formControlName, new FormControl(this.filterFormConfig.checkAndSearch.isChecked ?? false));\n }\n }\n\n if (this.config.getSelectionList) this.config.getSelectionList(this.selection);\n\n if (this.reload) {\n this.reload.subscribe(async reload => {\n if (reload) {\n await this.filterSubmit();\n }\n });\n }\n }\n\n ngOnDestroy() {\n super.onDestroy();\n }\n\n ngAfterViewInit() {\n super.afterViewInit().then();\n }\n\n public async filterSubmit() {\n this.showAdvancedFilter = false;\n await delay(1);\n let dados = koala(\n this.filterFormConfig?.main?.form\n ? this.dynamicFormService.emitData(this.filterFormConfig?.main?.form)\n : {}\n )\n .object()\n .merge(\n this.filterFormConfig?.advanced?.form\n ? this.dynamicFormService.emitData(this.filterFormConfig?.advanced?.form)\n : {})\n .getValue();\n\n if (this.filterFormConfig?.checkAndSearch) {\n const controlName = this.filterFormConfig.checkAndSearch.formControlName;\n dados[controlName] = this.formFilter.get(controlName).value;\n }\n await super.search(dados);\n }\n\n public toogleFilter() {\n this.showAdvancedFilter = !this.showAdvancedFilter;\n }\n\n public haveOptionsOnItemLine(item: any) {\n return this.itemsMenuListOptions.filter(option => option.havePermission && (\n !option.showByItemList ||\n option.showByItemList(item)\n )).length > 0\n }\n\n public hasFooter() {\n return !!this.itemsList.find(item => !!item.footer);\n }\n\n private initConfig() {\n this.columnSort = this.config.columnSort ?? null;\n this.sortDirection = this.config.sortDirection ?? 'asc';\n this.itemsMenuListOptions = this.config.itemsMenuListOptions ?? [];\n this.typeRequest = this.config.typeRequest ?? 'all';\n this.qtdListResult = this.config.qtdListResult ?? 0;\n this.columnsToShowInList = this.config.columnsToShowInList;\n this.itemsList = this.config.itemsList.map(item => {\n if (!item.dblClick) {\n item.dblClick = () => {\n };\n }\n return item;\n });\n this.showAdvancedFilter = this.config.showAdvancedFilter;\n this.filterFormConfig = this.config.filterFormConfig;\n this.request = this.config.request;\n this.reload = this.config.reload;\n this.responseIndexName = this.config.responseIndexName;\n this.responseQtdResultIndexName = this.config.responseQtdResultIndexName;\n this.filterParams = this.config.filterParams ?? new BehaviorSubject<KoalaListFormFilterInterface>(null);\n this.emptyListComponent = this.config.emptyListComponent;\n this.errorListComponent = this.config.errorListComponent;\n this.pageSize = this.config.pageSize ?? 30;\n this.disabledCheckboxItemList = this.config.disabledCheckboxItemList;\n this.subListConfig = this.config.subListConfig;\n this.btnCollapseSubListConfig = this.config.btnCollapseSubListConfig;\n this.hidePaginator = this.config.hidePaginator;\n this.customClass = this.config.customClass;\n }\n}\n","<div class=\"list-container\" [ngClass]=\"customClass\">\n <div *ngIf=\"filterFormConfig\" class=\"list-filter\">\n <form (ngSubmit)=\"filterSubmit()\" [formGroup]=\"formFilter\">\n <div class=\"main\">\n <koala-dynamic-form\n *ngIf=\"filterFormConfig.main\"\n [form]=\"filterFormConfig.main.form\"\n [formConfig]=\"filterFormConfig.main.formConfig\"\n [setValues]=\"filterFormConfig.main.setValues\"\n [showFields]=\"filterFormConfig.main.showFields\">\n </koala-dynamic-form>\n <ul>\n <li *ngIf=\"filterFormConfig.advanced\" class=\"option\">\n <button (click)=\"toogleFilter()\" color=\"primary\" mat-icon-button matTooltip=\"Filtro Avançado\"\n matTooltipPosition=\"below\" type=\"button\">\n <mat-icon>tune</mat-icon>\n </button>\n </li>\n <li *ngIf=\"filterFormConfig.checkAndSearch\" class=\"checkbox-filter\">\n <mat-checkbox (click)=\"filterSubmit()\"\n [formControlName]=\"filterFormConfig.checkAndSearch.formControlName\">\n {{filterFormConfig.checkAndSearch.label}}\n </mat-checkbox>\n </li>\n <li class=\"option\">\n <koala-submit\n [btnSubmitDisabled]=\"btnSubmitDisabled\"\n [fg]=\"formFilter\"\n [iconButton]=\"true\"\n [loader]=\"loader\"\n icon=\"search\">\n </koala-submit>\n </li>\n </ul>\n </div>\n <div *ngIf=\"filterFormConfig.advanced\" [ngClass]=\"{'show': showAdvancedFilter}\" class=\"advanced\">\n <div class=\"container-filter\">\n <koala-dynamic-form\n [form]=\"filterFormConfig.advanced.form\"\n [formConfig]=\"filterFormConfig.advanced.formConfig\"\n [setValues]=\"filterFormConfig.advanced.setValues\"\n [showFields]=\"filterFormConfig.advanced.showFields\">\n </koala-dynamic-form>\n </div>\n </div>\n </form>\n </div>\n <nav class=\"menu-list\">\n <ul class=\"menu\">\n <li *ngIf=\"selection.hasValue()\">\n <ng-content select=\"[itemsSelectList]\"></ng-content>\n </li>\n <li *ngIf=\"selection.hasValue()\" class=\"text-center\">|</li>\n <li>\n <ng-content select=\"[itemsList]\"></ng-content>\n </li>\n </ul>\n </nav>\n <div *ngIf=\"loader | async\" class=\"spinner-container\" [ngClass]=\"{\n 'no-filter': !filterFormConfig\n }\">\n <mat-spinner diameter=\"40\"></mat-spinner>\n </div>\n <div class=\"list\">\n <table\n *ngIf=\"!emptyListComponent || (emptyListComponent && dataSource?.data?.length > 0) else emptyList\"\n [dataSource]=\"dataSource\"\n [matSortActive]=\"columnSort\"\n multiTemplateDataRows\n class=\"table-hover\"\n mat-table\n matSort\n [matSortDirection]=\"sortDirection\" matSortDisableClear>\n <ng-container matColumnDef=\"select\">\n <th *matHeaderCellDef mat-header-cell>\n <mat-checkbox (change)=\"$event ? selectAll() : null\"\n [checked]=\"selection.hasValue() && allSelected$ | async\"\n [indeterminate]=\"selection.hasValue() && !(allSelected$ | async)\">\n </mat-checkbox>\n </th>\n <td *matCellDef=\"let item\" mat-cell>\n <mat-checkbox *ngIf=\"disabledCheckboxItemList ? !disabledCheckboxItemList(item) : true\"\n (change)=\"$event ? selection.toggle(item) : null\"\n (click)=\"$event.stopPropagation(); selectItem();\"\n [checked]=\"selection.isSelected(item)\">\n </mat-checkbox>\n </td>\n <td *matFooterCellDef mat-footer-cell></td>\n </ng-container>\n\n <ng-container *ngIf=\"subListConfig && btnCollapseSubListConfig\" matColumnDef=\"collapseButton\">\n <th *matHeaderCellDef mat-header-cell></th>\n <td *matCellDef=\"let item\" mat-cell>\n <koala-button\n *ngIf=\"btnCollapseSubListConfig.show(item)\"\n (click)=\"expandedElement = expandedElement === item ? null : item\"\n [koalaIcon]=\"btnCollapseSubListConfig.koalaIcon\"\n [icon]=\"btnCollapseSubListConfig.icon\"\n [tooltip]=\"btnCollapseSubListConfig.tooltip\"\n [color]=\"btnCollapseSubListConfig.iconColor\"\n [backgroundColor]=\"btnCollapseSubListConfig.backgroundColor\"\n [koalaIconSize]=\"22\">\n </koala-button>\n </td>\n <td *matFooterCellDef mat-footer-cell></td>\n </ng-container>\n\n <ng-container *ngFor=\"let itemList of itemsList\" [matColumnDef]=\"itemList.columnDef\">\n <th *matHeaderCellDef [mat-sort-header]=\"itemList.sortHeader\" [disabled]=\"!itemList.sortHeader\" mat-header-cell>{{itemList.label}}</th>\n <td (dblclick)=\"itemList.dblClick(item)\" *matCellDef=\"let item\" mat-cell>\n\t <koala-dynamic-component *ngIf=\"itemList.itemComponent else itemText\"\n\t [dynamicComponent]=\"itemList.itemComponent(item)\"></koala-dynamic-component>\n\t <ng-template #itemText>\n\t {{itemList.itemNameProperty(item)}}\n\t </ng-template>\n </td>\n <td *matFooterCellDef mat-footer-cell>\n <koala-dynamic-component *ngIf=\"itemList.footer?.itemComponent else itemFooterText\"\n [dynamicComponent]=\"itemList.footer?.itemComponent(responseRequest)\"></koala-dynamic-component>\n <ng-template #itemFooterText>\n {{itemList.footer?.itemNameProperty(responseRequest)}}\n </ng-template>\n </td>\n </ng-container>\n\n <ng-container *ngIf=\"subListConfig && btnCollapseSubListConfig\" matColumnDef=\"koalaListDetails\">\n <th *matHeaderCellDef mat-header-cell></th>\n <td *matCellDef=\"let item\" [attr.colspan]=\"columnsToShowInList.length\" mat-cell>\n <div class=\"item-detail\" [@detailExpand]=\"item == expandedElement ? 'expanded' : 'collapsed'\">\n <koala-list [config]=\"subListConfig(item)\"></koala-list>\n </div>\n </td>\n <td *matFooterCellDef mat-footer-cell></td>\n </ng-container>\n\n <ng-container matColumnDef=\"options\">\n <th *matHeaderCellDef mat-header-cell></th>\n <td *matCellDef=\"let item\" mat-cell>\n <div *ngIf=\"haveOptionsOnItemLine(item)\">\n <button [matMenuTriggerFor]=\"options\" mat-icon-button type=\"button\">\n <i class='material-icons'>more_vert</i>\n </button>\n <mat-menu #options=\"matMenu\" class=\"menu-list\" yPosition=\"below\">\n\t <div *ngFor=\"let option of itemsMenuListOptions\">\n\t <button\n\t\t (click)=\"option.action(item)\"\n\t\t *ngIf=\"option.havePermission && (\n\t\t !option.showByItemList ||\n\t\t option.showByItemList(item)\n\t )\"\n\t\t mat-menu-item>\n\t <mat-icon>{{option.icon}}</mat-icon>\n\t <span>{{option.name}}</span>\n\t </button>\n\t </div>\n </mat-menu>\n </div>\n </td>\n <td *matFooterCellDef mat-footer-cell></td>\n </ng-container>\n\n <tr *matHeaderRowDef=\"columnsToShowInList; sticky: true\" mat-header-row></tr>\n <tr *matRowDef=\"let item; columns: columnsToShowInList;\" mat-row></tr>\n <ng-container *ngIf=\"subListConfig && btnCollapseSubListConfig\">\n <tr mat-row *matRowDef=\"let row; columns: ['koalaListDetails']\" class=\"item-detail-row\"></tr>\n </ng-container>\n <ng-container *ngIf=\"hasFooter()\">\n <tr *matFooterRowDef=\"columnsToShowInList; sticky: true\" mat-footer-row></tr>\n </ng-container>\n </table>\n <ng-template #emptyList>\n <koala-dynamic-component *ngIf=\"!(filterError$ | async) else errorList\" [dynamicComponent]=\"emptyListComponent\"></koala-dynamic-component>\n <ng-template #errorList>\n <koala-dynamic-component [dynamicComponent]=\"errorListComponent\"></koala-dynamic-component>\n </ng-template>\n </ng-template>\n </div>\n <div *ngIf=\"!hidePaginator\" class=\"content-paginator\">\n <mat-paginator\n [length]=\"qtdListResult\"\n [pageSizeOptions]=\"limitOptions\"\n [pageSize]=\"pageSize\"\n showFirstLastButtons>\n </mat-paginator>\n </div>\n</div>\n","import { NgModule } from '@angular/core';\nimport { ListComponent } from './list.component';\nimport { MatTableModule } from '@angular/material/table';\nimport { MatSortModule } from '@angular/material/sort';\nimport { MatPaginatorIntl, MatPaginatorModule } from '@angular/material/paginator';\nimport { CommonModule } from '@angular/common';\nimport { KoalaFormModule } from '@koalarx/ui/form';\nimport { MatMenuModule } from '@angular/material/menu';\nimport { PaginationProvider } from './providers/pagination/pagination.provider';\nimport { KoalaFolderPageModule } from '@koalarx/ui/folder-page';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { KoalaDynamicComponentModule } from '@koalarx/ui/dynamic-component';\nimport { KoalaButtonModule } from \"@koalarx/ui/button\";\n\n@NgModule({\n declarations: [\n ListComponent\n ],\n imports: [\n CommonModule,\n KoalaFolderPageModule,\n KoalaFormModule,\n KoalaDynamicComponentModule,\n KoalaButtonModule,\n MatMenuModule,\n MatTableModule,\n MatSortModule,\n MatTooltipModule,\n MatPaginatorModule\n ],\n exports: [\n ListComponent\n ],\n providers: [{\n provide: MatPaginatorIntl,\n useClass: PaginationProvider\n }]\n})\nexport class KoalaListModule {\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAIa,kBAAmB,SAAQ,gBAAgB;IACtD;QACE,KAAK,EAAE,CAAC;QAaH,kBAAa,GAAG,CAAC,IAAY,EAAE,QAAgB,EAAE,MAAc;YACpE,IAAI,MAAM,KAAK,CAAC,IAAI,QAAQ,KAAK,CAAC,EAAE;gBAClC,OAAO,OAAO,MAAM,EAAE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,CAAC,CAAC;4BAC1D,KAAK,CAAC,UAAU,EAAE,KAAK,CAAC,EAAC,MAAM,EAAE,GAAG,EAAC,CAAC,CAAC;4BACvC,UAAU,CAAC,wBAAwB,EAAE,OAAO,CAAC,sCAAsC,CAAC,CAAC;yBACtF,CAAC;qBACH;4KAGe,MAAM;sBAArB,KAAK;gBAE6B,SAAS;sBAA3C,SAAS;uBAAC,YAAY;gBACwB,IAAI;sBAAlD,SAAS;uBAAC,OAAO,EAAE,EAAC,MAAM,EAAE,KAAK,EAAC;;;MEGxB,eAAe;;4GAAf,eAAe;6GAAf,eAAe,iBAtBxB,aAAa,aAGb,YAAY;QACZ,qBAAqB;QACrB,eAAe;QACf,2BAA2B;QAC3B,iBAAiB;QACjB,aAAa;QACb,cAAc;QACd,aAAa;QACb,gBAAgB;QAChB,kBAAkB,aAGlB,aAAa;6GAOJ,eAAe,aALf,CAAC;YACV,OAAO,EAAE,gBAAgB;YACzB,QAAQ,EAAE,kBAAkB;SAC7B,CAAC,YAlBO;YACP,YAAY;YACZ,qBAAqB;YACrB,eAAe;YACf,2BAA2B;YAC3B,iBAAiB;YACjB,aAAa;YACb,cAAc;YACd,aAAa;YACb,gBAAgB;YAChB,kBAAkB;SACnB;2FASU,eAAe;kBAxB3B,QAAQ;mBAAC;oBACR,YAAY,EAAE;wBACZ,aAAa;qBACd;oBACD,OAAO,EAAE;wBACP,YAAY;wBACZ,qBAAqB;wBACrB,eAAe;wBACf,2BAA2B;wBAC3B,iBAAiB;wBACjB,aAAa;wBACb,cAAc;wBACd,aAAa;wBACb,gBAAgB;wBAChB,kBAAkB;qBACnB;oBACD,OAAO,EAAE;wBACP,aAAa;qBACd;oBACD,SAAS,EAAE,CAAC;4BACV,OAAO,EAAE,gBAAgB;4BACzB,QAAQ,EAAE,kBAAkB;yBAC7B,CAAC;iBACH;;;ACrCD;;;;;;"}
1
+ {"version":3,"file":"koalarx-ui-list.mjs","sources":["../../../projects/list/src/lib/providers/pagination/pagination.provider.ts","../../../projects/list/src/lib/list-builder/list.builder.ts","../../../projects/list/src/lib/koala.list.service.ts","../../../projects/list/src/lib/list.abstract.ts","../../../projects/list/src/lib/list.component.ts","../../../projects/list/src/lib/list.component.html","../../../projects/list/src/lib/koala.list.module.ts","../../../projects/list/src/koalarx-ui-list.ts"],"sourcesContent":["import { MatPaginatorIntl } from '@angular/material/paginator';\nimport { Injectable } from '@angular/core';\n\n@Injectable()\nexport class PaginationProvider extends MatPaginatorIntl {\n constructor() {\n super();\n this.getAndInitTranslations();\n }\n\n public getAndInitTranslations() {\n this.itemsPerPageLabel = \"Itens por Página\";\n this.firstPageLabel = \"Primeira Página\";\n this.nextPageLabel = \"Próxima Página\";\n this.previousPageLabel = \"Página Anterior\";\n this.lastPageLabel = \"Última Página\";\n this.changes.next();\n }\n\n public getRangeLabel = (page: number, pageSize: number, length: number) => {\n if (length === 0 || pageSize === 0) {\n return `0 / ${length}`;\n }\n length = Math.max(length, 0);\n const startIndex = page * pageSize;\n const endIndex = startIndex < length ? Math.min(startIndex + pageSize, length) : startIndex + pageSize;\n return `${startIndex + 1} - ${endIndex} / ${length}`;\n }\n}\n","import { KoalaListConfigInterface } from \"../koala.list-config.interface\";\nimport { KoalaListItemInterface } from \"../koala-list-item.interface\";\nimport { Type } from \"@angular/core\";\nimport { KoalaDynamicComponent } from \"@koalarx/ui/dynamic-component\";\nimport { KoalaListFilterInterface } from \"../koala-list-filter.interface\";\nimport { BehaviorSubject, Observable } from \"rxjs\";\nimport { KoalaListFormFilterInterface } from \"../koala-list-form-filter.interface\";\nimport { KoalaListItemMenuOptionInterface } from \"../koala-list-item-menu-option.interface\";\nimport { SelectionModel } from \"@angular/cdk/collections\";\nimport { KoalaListPageSize } from \"../list.abstract\";\nimport { first } from \"rxjs/operators\";\nimport { KoalaListBtnCollapseSubListConfigInterface } from \"../koala-list-btn-collapse-sub-list-config.interface\";\n\nexport class ListBuilder<DataType> {\n private config = {} as KoalaListConfigInterface;\n\n public service(\n service: (filter: BehaviorSubject<KoalaListFormFilterInterface>) => Observable<any> | Promise<any>,\n type: 'all' | 'onDemand' = \"all\",\n resultIndexName?: string,\n qtdResultIndexName?: string\n ) {\n this.config.typeRequest = type;\n this.config.responseIndexName = resultIndexName;\n this.config.responseQtdResultIndexName = response => response[qtdResultIndexName ?? ''] ?? [];\n this.config.columnSort = this.config?.filterParams?.getValue()?.sort;\n this.config.sortDirection = this.config?.filterParams?.getValue()?.order ?? 'asc';\n\n const response = service(this.config.filterParams ?? null);\n\n if (response instanceof Promise) {\n this.config.request = new Observable<any>(observe => {\n response.then(response => observe.next(response))\n .catch(error => observe.error(error));\n }).pipe(first());\n } else {\n this.config.request = new Observable<any>(observe => {\n (service(this.config.filterParams ?? null) as Observable<any>).pipe(first()).subscribe(observe);\n }).pipe(first());\n }\n\n return this;\n }\n\n public filterConfig(config: KoalaListFilterInterface) {\n this.config.filterFormConfig = config;\n return this;\n }\n\n public defaultFilter(config: KoalaListFormFilterInterface) {\n this.config.filterParams = new BehaviorSubject<KoalaListFormFilterInterface>(config);\n return this;\n }\n\n public pageSize(size: KoalaListPageSize) {\n this.config.pageSize = size;\n return this;\n }\n\n public columns(columns: string[]) {\n this.config.columnsToShowInList = columns;\n return this;\n }\n\n public itemColumn(item: KoalaListItemInterface<DataType>) {\n (this.config.itemsList?.length > 0) ?\n this.config.itemsList.push(item) :\n this.config.itemsList = [item];\n\n return this;\n }\n\n public actionList(item: KoalaListItemMenuOptionInterface<DataType>) {\n (this.config.itemsMenuListOptions?.length ?? 0 > 0) ?\n this.config.itemsMenuListOptions?.push(item) :\n this.config.itemsMenuListOptions = [item];\n\n return this;\n }\n\n public getDataSource(fn: (dataSource: DataType[]) => void) {\n this.config.getDataSource = fn;\n return this;\n }\n\n public getSelectionList(fn: (selection: SelectionModel<DataType>) => void) {\n this.config.getSelectionList = fn;\n return this;\n }\n\n public emptyListComponent(component: Type<any>, data?: any) {\n this.config.emptyListComponent = new KoalaDynamicComponent(component, data);\n return this;\n }\n\n public errorListComponent(component: Type<any>, data?: any) {\n this.config.errorListComponent = new KoalaDynamicComponent(component, data);\n return this;\n }\n\n public disableCheckboxItemList(fn: (item: DataType) => boolean) {\n this.config.disabledCheckboxItemList = fn;\n return this;\n }\n\n public setSubList(config: (item: DataType) => KoalaListConfigInterface) {\n this.config.subListConfig = config;\n return this;\n }\n\n public defineBtnCollapseSubListConfig(config: KoalaListBtnCollapseSubListConfigInterface<DataType>) {\n this.config.btnCollapseSubListConfig = config;\n return this;\n }\n\n public hidePaginator(hide: boolean = true) {\n this.config.hidePaginator = hide;\n return this;\n }\n\n public setCustomClass(className: string) {\n this.config.customClass = className;\n return this;\n }\n\n public getConfig(): KoalaListConfigInterface {\n this.config.reload = new BehaviorSubject<boolean>(false);\n return this.config;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { ListBuilder } from \"./list-builder/list.builder\";\n\n@Injectable({providedIn: \"any\"})\nexport class KoalaListService {\n\n public build<DataType>() {\n return new ListBuilder<DataType>();\n }\n}\n","import { SelectionModel } from '@angular/cdk/collections';\nimport { MatPaginator } from '@angular/material/paginator';\nimport { MatSort } from '@angular/material/sort';\nimport { BehaviorSubject, merge, Observable, Subscription } from 'rxjs';\nimport { FormAbstract } from '@koalarx/ui/form';\nimport { FormGroup } from '@angular/forms';\nimport { debounceTime, first, map, startWith, switchMap } from 'rxjs/operators';\nimport { MatTableDataSource } from '@angular/material/table';\nimport { KoalaListFormFilterInterface } from './koala-list-form-filter.interface';\nimport { KoalaDynamicComponent } from \"@koalarx/ui/dynamic-component\";\nimport { delay } from \"@koalarx/utils/operators/delay\";\nimport { KoalaListConfigInterface } from \"./koala.list-config.interface\";\nimport { randomString } from \"@koalarx/utils/operators/string\";\n\nexport type KoalaListPageSize = 10 | 20 | 30 | 50 | 100;\n\nexport abstract class ListAbstract extends FormAbstract {\n public selection = new SelectionModel<object>(true, []);\n public limitOptions: number[] = [10, 20, 30, 50, 100];\n public showMenuList: boolean = false;\n public allSelected$ = new BehaviorSubject<boolean>(false);\n public dataSource = new MatTableDataSource<any>([]);\n public typeRequest: 'all' | 'onDemand' = 'onDemand';\n public filterParams = new BehaviorSubject<KoalaListFormFilterInterface|null>(null);\n public filterError$ = new BehaviorSubject<any>(null);\n public emptyListComponent?: KoalaDynamicComponent;\n public errorListComponent?: KoalaDynamicComponent;\n public pageSize: KoalaListPageSize;\n public tableId = randomString(20, {uppercase: true, lowercase: true});\n\n protected config?: KoalaListConfigInterface;\n protected paginator?: MatPaginator;\n protected sort?: MatSort;\n\n private subscriptionList?: Subscription;\n private subscriptionSortList?: Subscription;\n private intervalSortList: any;\n\n protected constructor(\n private requestFunction: () => Observable<any>,\n private requestResponseFunction: <T>(results: T[]) => void,\n formSearch: () => FormGroup\n ) {\n super(formSearch);\n }\n\n public selectAll() {\n this.isAllSelected() ?\n this.selection.clear() :\n this.dataSource.data.forEach(item => {\n if (\n (this.config?.disabledCheckboxItemList && !this.config.disabledCheckboxItemList(item)) ||\n !this.config?.disabledCheckboxItemList\n ) {\n this.selection.select(item);\n }\n });\n\n this.isAllSelected();\n }\n\n public defineStatusSelectAll(status: boolean) {\n this.allSelected$.next(status);\n return this.allSelected$.getValue();\n }\n\n public selectItem() {\n setTimeout(() => {\n this.showMenuList = this.selection.hasValue();\n this.isAllSelected();\n }, 50);\n }\n\n public async search(filter?: any) {\n this.loading(true);\n this.selection.clear();\n if (this.paginator) {\n this.paginator.firstPage();\n }\n this.filterParams.next({\n params: filter,\n sort: this.sort?.active ?? '',\n order: this.sort?.direction ?? 'asc',\n page: this.paginator?.pageIndex ?? 0,\n limit: this.paginator?.pageSize ?? 30\n });\n }\n\n protected onDestroy() {\n this.subscriptionSortList?.unsubscribe();\n this.subscriptionList?.unsubscribe();\n clearInterval(this.intervalSortList);\n }\n\n protected async afterViewInit() {\n let tentativas = 0;\n let stop = false;\n do {\n tentativas++;\n await delay(400);\n if (this.sort || this.emptyListComponent) {\n this.prepareSearch().then();\n if (this.emptyListComponent) stop = true;\n } else if (tentativas > 10) {\n stop = true;\n }\n } while (!this.sort && !stop);\n }\n\n private async prepareSearch() {\n this.intervalSortList = setInterval(() => {\n if (this.sort && !this.subscriptionSortList) {\n this.subscriptionSortList = this.sort.sortChange.subscribe(() => {\n const filter = this.filterParams.value ?? {} as any;\n filter.sort = this.sort?.active ?? '';\n filter.order = this.sort?.direction ?? '';\n this.filterParams.next(filter);\n });\n } else if (!this.sort && this.subscriptionSortList) {\n this.subscriptionSortList.unsubscribe();\n }\n }, 50);\n\n if (this.typeRequest === 'onDemand') {\n this.subscriptionList = merge(this.paginator?.page ?? new Observable(), this.filterParams).pipe(\n startWith({}),\n switchMap(() => new Observable(observe => {\n this.loading(true);\n this.selection.clear();\n if (this.filterParams.value) {\n this.filterParams.value.sort = this.sort?.active ?? this.config?.columnSort ?? '';\n this.filterParams.value.order = this.sort?.direction ?? this.config?.sortDirection ?? '';\n this.filterParams.value.page = this.paginator?.pageIndex ?? 0;\n this.filterParams.value.limit = this.paginator?.pageSize ?? 30;\n }\n observe.next(true);\n })),\n debounceTime(300),\n switchMap(() => this.runRequestFunction()),\n map((response) => {\n this.loading(false);\n this.scrollTableToTop();\n return this.requestResponseFunction(response);\n })\n ).subscribe();\n } else {\n if (this.paginator) this.dataSource.paginator = this.paginator;\n this.subscriptionList = this.filterParams.pipe(\n startWith({}),\n debounceTime(300),\n switchMap(() => this.runRequestFunction()),\n map((response) => {\n this.loading(false);\n this.scrollTableToTop();\n return this.requestResponseFunction(response);\n })\n ).subscribe();\n }\n\n if (this.emptyListComponent) {\n do {\n await delay(301);\n if (this.sort) {\n if (this.typeRequest === \"onDemand\") {\n this.sort.sortChange.subscribe(() => {\n if (this.paginator) this.paginator.pageIndex = 0\n });\n } else {\n this.dataSource.sort = this.sort;\n }\n }\n } while (!this.sort);\n }\n }\n\n private isAllSelected() {\n const numSelected = this.selection.selected.length;\n const numRows = (this.config?.disabledCheckboxItemList ?\n this.dataSource.data.filter(item => !(this.config?.disabledCheckboxItemList\n ? this.config.disabledCheckboxItemList(item)\n : '')) :\n this.dataSource.data).length;\n\n return this.defineStatusSelectAll(numSelected === numRows);\n }\n\n private runRequestFunction() {\n return new Observable<unknown[]>(observe => {\n this.requestFunction().pipe(first()).subscribe({\n next: response => observe.next(response),\n error: err => {\n if (this.errorListComponent) {\n this.filterError$.next(err);\n this.errorListComponent.data = err;\n }\n this.loading(false);\n observe.next([]);\n }\n })\n })\n }\n\n private scrollTableToTop() {\n const table = document.getElementById(this.tableId);\n if (table) {\n table.scrollTop = 0;\n }\n }\n}\n","import { AfterViewInit, ChangeDetectionStrategy, Component, Input, OnDestroy, OnInit, ViewChild } from '@angular/core';\nimport { ListAbstract } from './list.abstract';\nimport { KoalaListItemMenuOptionInterface } from './koala-list-item-menu-option.interface';\nimport { FormBuilder, FormControl, FormGroup } from '@angular/forms';\nimport { BehaviorSubject, Observable } from 'rxjs';\nimport { KoalaListFilterInterface } from './koala-list-filter.interface';\nimport { KoalaDynamicFormService } from '@koalarx/ui/form';\nimport { KoalaListItemInterface } from './koala-list-item.interface';\nimport { KoalaListFormFilterInterface } from \"./koala-list-form-filter.interface\";\nimport { MatSort, SortDirection } from \"@angular/material/sort\";\nimport { delay } from \"@koalarx/utils/operators/delay\";\nimport { koala } from \"@koalarx/utils\";\nimport { DeviceDetectorService } from \"ngx-device-detector\";\nimport { KoalaListConfigInterface } from \"./koala.list-config.interface\";\nimport { MatPaginator } from \"@angular/material/paginator\";\nimport { KoalaListBtnCollapseSubListConfigInterface } from \"./koala-list-btn-collapse-sub-list-config.interface\";\nimport { animate, state, style, transition, trigger } from \"@angular/animations\";\nimport { randomString } from \"@koalarx/utils/operators/string\";\n\n@Component({\n selector: 'koala-list',\n templateUrl: 'list.component.html',\n styleUrls: ['list.component.css'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n animations: [\n trigger('detailExpand', [\n state('collapsed', style({height: '0px', minHeight: '0'})),\n state('expanded', style({height: '*'})),\n transition('expanded <=> collapsed', animate('225ms cubic-bezier(0.4, 0.0, 0.2, 1)')),\n ]),\n ],\n})\nexport class ListComponent extends ListAbstract implements OnInit, AfterViewInit, OnDestroy {\n @Input() public config?: KoalaListConfigInterface;\n\n @ViewChild(MatPaginator) protected paginator: MatPaginator;\n @ViewChild(MatSort, {static: false}) protected sort: MatSort;\n\n public customClass?: string;\n public columnsToShowInList?: string[];\n public hidePaginator?: boolean = false;\n public columnSort?: string;\n public sortDirection: SortDirection = 'asc';\n public itemsMenuListOptions?: KoalaListItemMenuOptionInterface<any>[];\n public itemsList?: KoalaListItemInterface<any>[];\n public request?: Observable<any>;\n public responseIndexName?: string;\n public responseQtdResultIndexName?: (response: any) => number;\n public responseRequest?: any;\n public typeRequest: 'all' | 'onDemand' = 'all'\n public filterFormConfig?: KoalaListFilterInterface;\n public reload?: BehaviorSubject<boolean>;\n public formFilter?: FormGroup;\n public showAdvancedFilter: boolean = false;\n public qtdListResult = 0;\n public disabledCheckboxItemList?: (item: any) => boolean;\n public expandedElement = false;\n public btnCollapseSubListConfig?: KoalaListBtnCollapseSubListConfigInterface<any>;\n public subListConfig?: (item: any) => KoalaListConfigInterface;\n\n constructor(\n private fb: FormBuilder,\n private dynamicFormService: KoalaDynamicFormService,\n private deviceService: DeviceDetectorService\n ) {\n super(\n () => this.config?.request ?? new Observable<any>(),\n (response) => {\n this.responseRequest = response;\n this.dataSource.data = this.config?.responseIndexName\n ? (this.config.responseIndexName\n ? response[this.config.responseIndexName]\n : [])\n : response;\n if (this.config?.getDataSource) this.config?.getDataSource(this.dataSource.data);\n this.qtdListResult = this.config?.responseQtdResultIndexName\n ? this.config.responseQtdResultIndexName(response) ?? 0\n : this.dataSource.data?.length ?? 0;\n },\n () => this.formFilter ?? fb.group({})\n );\n }\n\n ngOnInit() {\n this.initConfig();\n this.formFilter = this.fb.group({\n formSearch: this.filterFormConfig?.main?.form ?? [''],\n formAdvancedSearch: this.filterFormConfig?.advanced?.form ?? ['']\n });\n this.loading(true);\n if (this.filterFormConfig) {\n this.filterFormConfig?.main?.formConfig?.map(item => {\n item.class += ' padding-none w-99';\n return item;\n });\n this.filterFormConfig?.advanced?.formConfig?.map(item => {\n item.class += ' padding-none';\n return item;\n });\n if (this.filterFormConfig?.checkAndSearch) {\n this.formFilter.addControl(this.filterFormConfig.checkAndSearch.formControlName, new FormControl(this.filterFormConfig.checkAndSearch.isChecked ?? false));\n }\n }\n\n if (this.config.getSelectionList) this.config.getSelectionList(this.selection);\n\n if (this.reload) {\n this.reload.subscribe(async reload => {\n if (reload) {\n await this.filterSubmit();\n }\n });\n }\n }\n\n ngOnDestroy() {\n super.onDestroy();\n }\n\n ngAfterViewInit() {\n super.afterViewInit().then();\n }\n\n public async filterSubmit() {\n this.showAdvancedFilter = false;\n await delay(1);\n let dados = koala(\n this.filterFormConfig?.main?.form\n ? this.dynamicFormService.emitData(this.filterFormConfig?.main?.form)\n : {}\n )\n .object()\n .merge(\n this.filterFormConfig?.advanced?.form\n ? this.dynamicFormService.emitData(this.filterFormConfig?.advanced?.form)\n : {})\n .getValue();\n\n if (this.filterFormConfig?.checkAndSearch) {\n const controlName = this.filterFormConfig.checkAndSearch.formControlName;\n dados[controlName] = this.formFilter.get(controlName).value;\n }\n await super.search(dados);\n }\n\n public toogleFilter() {\n this.showAdvancedFilter = !this.showAdvancedFilter;\n }\n\n public haveOptionsOnItemLine(item: any) {\n return this.itemsMenuListOptions.filter(option => option.havePermission && (\n !option.showByItemList ||\n option.showByItemList(item)\n )).length > 0\n }\n\n public hasFooter() {\n return !!this.itemsList.find(item => !!item.footer);\n }\n\n private initConfig() {\n this.columnSort = this.config.columnSort ?? null;\n this.sortDirection = this.config.sortDirection ?? 'asc';\n this.itemsMenuListOptions = this.config.itemsMenuListOptions ?? [];\n this.typeRequest = this.config.typeRequest ?? 'all';\n this.qtdListResult = this.config.qtdListResult ?? 0;\n this.columnsToShowInList = this.config.columnsToShowInList;\n this.itemsList = this.config.itemsList.map(item => {\n if (!item.dblClick) {\n item.dblClick = () => {\n };\n }\n return item;\n });\n this.showAdvancedFilter = this.config.showAdvancedFilter;\n this.filterFormConfig = this.config.filterFormConfig;\n this.request = this.config.request;\n this.reload = this.config.reload;\n this.responseIndexName = this.config.responseIndexName;\n this.responseQtdResultIndexName = this.config.responseQtdResultIndexName;\n this.filterParams = this.config.filterParams ?? new BehaviorSubject<KoalaListFormFilterInterface>(null);\n this.emptyListComponent = this.config.emptyListComponent;\n this.errorListComponent = this.config.errorListComponent;\n this.pageSize = this.config.pageSize ?? 30;\n this.disabledCheckboxItemList = this.config.disabledCheckboxItemList;\n this.subListConfig = this.config.subListConfig;\n this.btnCollapseSubListConfig = this.config.btnCollapseSubListConfig;\n this.hidePaginator = this.config.hidePaginator;\n this.customClass = this.config.customClass;\n }\n}\n","<div class=\"list-container\" [ngClass]=\"customClass\">\n <div *ngIf=\"filterFormConfig\" class=\"list-filter\">\n <form (ngSubmit)=\"filterSubmit()\" [formGroup]=\"formFilter\">\n <div class=\"main\">\n <koala-dynamic-form\n *ngIf=\"filterFormConfig.main\"\n [form]=\"filterFormConfig.main.form\"\n [formConfig]=\"filterFormConfig.main.formConfig\"\n [setValues]=\"filterFormConfig.main.setValues\"\n [showFields]=\"filterFormConfig.main.showFields\">\n </koala-dynamic-form>\n <ul>\n <li *ngIf=\"filterFormConfig.advanced\" class=\"option\">\n <button (click)=\"toogleFilter()\" color=\"primary\" mat-icon-button matTooltip=\"Filtro Avançado\"\n matTooltipPosition=\"below\" type=\"button\">\n <mat-icon>tune</mat-icon>\n </button>\n </li>\n <li *ngIf=\"filterFormConfig.checkAndSearch\" class=\"checkbox-filter\">\n <mat-checkbox (click)=\"filterSubmit()\"\n [formControlName]=\"filterFormConfig.checkAndSearch.formControlName\">\n {{filterFormConfig.checkAndSearch.label}}\n </mat-checkbox>\n </li>\n <li class=\"option\">\n <koala-submit\n [btnSubmitDisabled]=\"btnSubmitDisabled\"\n [fg]=\"formFilter\"\n [iconButton]=\"true\"\n [loader]=\"loader\"\n icon=\"search\">\n </koala-submit>\n </li>\n </ul>\n </div>\n <div *ngIf=\"filterFormConfig.advanced\" [ngClass]=\"{'show': showAdvancedFilter}\" class=\"advanced\">\n <div class=\"container-filter\">\n <koala-dynamic-form\n [form]=\"filterFormConfig.advanced.form\"\n [formConfig]=\"filterFormConfig.advanced.formConfig\"\n [setValues]=\"filterFormConfig.advanced.setValues\"\n [showFields]=\"filterFormConfig.advanced.showFields\">\n </koala-dynamic-form>\n </div>\n </div>\n </form>\n </div>\n <nav class=\"menu-list\">\n <ul class=\"menu\">\n <li *ngIf=\"selection.hasValue()\">\n <ng-content select=\"[itemsSelectList]\"></ng-content>\n </li>\n <li *ngIf=\"selection.hasValue()\" class=\"text-center\">|</li>\n <li>\n <ng-content select=\"[itemsList]\"></ng-content>\n </li>\n </ul>\n </nav>\n <div *ngIf=\"loader | async\" class=\"spinner-container\" [ngClass]=\"{\n 'no-filter': !filterFormConfig\n }\">\n <mat-spinner diameter=\"40\"></mat-spinner>\n </div>\n <div class=\"list\">\n <table\n *ngIf=\"!emptyListComponent || (emptyListComponent && dataSource?.data?.length > 0) else emptyList\"\n [dataSource]=\"dataSource\"\n [matSortActive]=\"columnSort\"\n [id]=\"tableId\"\n multiTemplateDataRows\n class=\"table-hover\"\n mat-table\n matSort\n [matSortDirection]=\"sortDirection\" matSortDisableClear>\n <ng-container matColumnDef=\"select\">\n <th *matHeaderCellDef mat-header-cell>\n <mat-checkbox (change)=\"$event ? selectAll() : null\"\n [checked]=\"selection.hasValue() && allSelected$ | async\"\n [indeterminate]=\"selection.hasValue() && !(allSelected$ | async)\">\n </mat-checkbox>\n </th>\n <td *matCellDef=\"let item\" mat-cell>\n <mat-checkbox *ngIf=\"disabledCheckboxItemList ? !disabledCheckboxItemList(item) : true\"\n (change)=\"$event ? selection.toggle(item) : null\"\n (click)=\"$event.stopPropagation(); selectItem();\"\n [checked]=\"selection.isSelected(item)\">\n </mat-checkbox>\n </td>\n <td *matFooterCellDef mat-footer-cell></td>\n </ng-container>\n\n <ng-container *ngIf=\"subListConfig && btnCollapseSubListConfig\" matColumnDef=\"collapseButton\">\n <th *matHeaderCellDef mat-header-cell></th>\n <td *matCellDef=\"let item\" mat-cell>\n <koala-button\n *ngIf=\"btnCollapseSubListConfig.show(item)\"\n (click)=\"expandedElement = expandedElement === item ? null : item\"\n [koalaIcon]=\"btnCollapseSubListConfig.koalaIcon\"\n [icon]=\"btnCollapseSubListConfig.icon\"\n [tooltip]=\"btnCollapseSubListConfig.tooltip\"\n [color]=\"btnCollapseSubListConfig.iconColor\"\n [backgroundColor]=\"btnCollapseSubListConfig.backgroundColor\"\n [koalaIconSize]=\"22\">\n </koala-button>\n </td>\n <td *matFooterCellDef mat-footer-cell></td>\n </ng-container>\n\n <ng-container *ngFor=\"let itemList of itemsList\" [matColumnDef]=\"itemList.columnDef\">\n <th *matHeaderCellDef [mat-sort-header]=\"itemList.sortHeader\" [disabled]=\"!itemList.sortHeader\" mat-header-cell>{{itemList.label}}</th>\n <td (dblclick)=\"itemList.dblClick(item)\" *matCellDef=\"let item\" mat-cell>\n\t <koala-dynamic-component *ngIf=\"itemList.itemComponent else itemText\"\n\t [dynamicComponent]=\"itemList.itemComponent(item)\"></koala-dynamic-component>\n\t <ng-template #itemText>\n\t {{itemList.itemNameProperty(item)}}\n\t </ng-template>\n </td>\n <td *matFooterCellDef mat-footer-cell>\n <koala-dynamic-component *ngIf=\"itemList.footer?.itemComponent else itemFooterText\"\n [dynamicComponent]=\"itemList.footer?.itemComponent(responseRequest)\"></koala-dynamic-component>\n <ng-template #itemFooterText>\n {{itemList.footer?.itemNameProperty(responseRequest)}}\n </ng-template>\n </td>\n </ng-container>\n\n <ng-container *ngIf=\"subListConfig && btnCollapseSubListConfig\" matColumnDef=\"koalaListDetails\">\n <th *matHeaderCellDef mat-header-cell></th>\n <td *matCellDef=\"let item\" [attr.colspan]=\"columnsToShowInList.length\" mat-cell>\n <div class=\"item-detail\" [@detailExpand]=\"item == expandedElement ? 'expanded' : 'collapsed'\">\n <koala-list [config]=\"subListConfig(item)\"></koala-list>\n </div>\n </td>\n <td *matFooterCellDef mat-footer-cell></td>\n </ng-container>\n\n <ng-container matColumnDef=\"options\">\n <th *matHeaderCellDef mat-header-cell></th>\n <td *matCellDef=\"let item\" mat-cell>\n <div *ngIf=\"haveOptionsOnItemLine(item)\">\n <button [matMenuTriggerFor]=\"options\" mat-icon-button type=\"button\">\n <i class='material-icons'>more_vert</i>\n </button>\n <mat-menu #options=\"matMenu\" class=\"menu-list\" yPosition=\"below\">\n\t <div *ngFor=\"let option of itemsMenuListOptions\">\n\t <button\n\t\t (click)=\"option.action(item)\"\n\t\t *ngIf=\"option.havePermission && (\n\t\t !option.showByItemList ||\n\t\t option.showByItemList(item)\n\t )\"\n\t\t mat-menu-item>\n\t <mat-icon>{{option.icon}}</mat-icon>\n\t <span>{{option.name}}</span>\n\t </button>\n\t </div>\n </mat-menu>\n </div>\n </td>\n <td *matFooterCellDef mat-footer-cell></td>\n </ng-container>\n\n <tr *matHeaderRowDef=\"columnsToShowInList; sticky: true\" mat-header-row></tr>\n <tr *matRowDef=\"let item; columns: columnsToShowInList;\" mat-row></tr>\n <ng-container *ngIf=\"subListConfig && btnCollapseSubListConfig\">\n <tr mat-row *matRowDef=\"let row; columns: ['koalaListDetails']\" class=\"item-detail-row\"></tr>\n </ng-container>\n <ng-container *ngIf=\"hasFooter()\">\n <tr *matFooterRowDef=\"columnsToShowInList; sticky: true\" mat-footer-row></tr>\n </ng-container>\n </table>\n <ng-template #emptyList>\n <koala-dynamic-component *ngIf=\"!(filterError$ | async) else errorList\" [dynamicComponent]=\"emptyListComponent\"></koala-dynamic-component>\n <ng-template #errorList>\n <koala-dynamic-component [dynamicComponent]=\"errorListComponent\"></koala-dynamic-component>\n </ng-template>\n </ng-template>\n </div>\n <div *ngIf=\"!hidePaginator\" class=\"content-paginator\">\n <mat-paginator\n [length]=\"qtdListResult\"\n [pageSizeOptions]=\"limitOptions\"\n [pageSize]=\"pageSize\"\n showFirstLastButtons>\n </mat-paginator>\n </div>\n</div>\n","import { NgModule } from '@angular/core';\nimport { ListComponent } from './list.component';\nimport { MatTableModule } from '@angular/material/table';\nimport { MatSortModule } from '@angular/material/sort';\nimport { MatPaginatorIntl, MatPaginatorModule } from '@angular/material/paginator';\nimport { CommonModule } from '@angular/common';\nimport { KoalaFormModule } from '@koalarx/ui/form';\nimport { MatMenuModule } from '@angular/material/menu';\nimport { PaginationProvider } from './providers/pagination/pagination.provider';\nimport { KoalaFolderPageModule } from '@koalarx/ui/folder-page';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { KoalaDynamicComponentModule } from '@koalarx/ui/dynamic-component';\nimport { KoalaButtonModule } from \"@koalarx/ui/button\";\n\n@NgModule({\n declarations: [\n ListComponent\n ],\n imports: [\n CommonModule,\n KoalaFolderPageModule,\n KoalaFormModule,\n KoalaDynamicComponentModule,\n KoalaButtonModule,\n MatMenuModule,\n MatTableModule,\n MatSortModule,\n MatTooltipModule,\n MatPaginatorModule\n ],\n exports: [\n ListComponent\n ],\n providers: [{\n provide: MatPaginatorIntl,\n useClass: PaginationProvider\n }]\n})\nexport class KoalaListModule {\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAIa,kBAAmB,SAAQ,gBAAgB;IACtD;QACE,KAAK,EAAE,CAAC;QAaH,kBAAa,GAAG,CAAC,IAAY,EAAE,QAAgB,EAAE,MAAc;YACpE,IAAI,MAAM,KAAK,CAAC,IAAI,QAAQ,KAAK,CAAC,EAAE;gBAClC,OAAO,OAAO,MAAM,EAAE,CAAC;aACxB;YACD,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;YAC7B,MAAM,UAAU,GAAG,IAAI,GAAG,QAAQ,CAAC;YACnC,MAAM,QAAQ,GAAG,UAAU,GAAG,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,UAAU,GAAG,Q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,QAAQ,EAAE,kBAAkB;yBAC7B,CAAC;iBACH;;;ACrCD;;;;;;"}
@@ -23,6 +23,7 @@ export declare abstract class ListAbstract extends FormAbstract {
23
23
  emptyListComponent?: KoalaDynamicComponent;
24
24
  errorListComponent?: KoalaDynamicComponent;
25
25
  pageSize: KoalaListPageSize;
26
+ tableId: string;
26
27
  protected config?: KoalaListConfigInterface;
27
28
  protected paginator?: MatPaginator;
28
29
  protected sort?: MatSort;
@@ -39,4 +40,5 @@ export declare abstract class ListAbstract extends FormAbstract {
39
40
  private prepareSearch;
40
41
  private isAllSelected;
41
42
  private runRequestFunction;
43
+ private scrollTableToTop;
42
44
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@koalarx/ui",
3
- "version": "13.0.8",
3
+ "version": "13.0.9",
4
4
  "description": "Koala UI is a Design System developed in Angular whose objective is to facilitate and make your development faster and simpler, making this framework your greatest ally.",
5
5
  "repository": {
6
6
  "type": "git",