keevo-components 1.8.308 → 1.8.310
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/lib/components/kv-stepper/kv-stepper.component.mjs +43 -22
- package/esm2022/lib/components/kv-stepper/kv-stepper.module.mjs +11 -3
- package/esm2022/lib/components/kv-tree-table/kv-tree-table.component.mjs +6 -3
- package/fesm2022/keevo-components.mjs +156 -128
- package/fesm2022/keevo-components.mjs.map +1 -1
- package/lib/components/kv-stepper/kv-stepper.component.d.ts +21 -14
- package/lib/components/kv-stepper/kv-stepper.module.d.ts +3 -1
- package/lib/components/kv-table/kv-table.component.d.ts +1 -1
- package/lib/components/kv-table-expandable/kv-table-expandable.component.d.ts +1 -1
- package/lib/components/kv-tree-table/kv-tree-table.component.d.ts +2 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { EventEmitter, Component, Input, Output, ViewChild, Injectable, Directive, Pipe, ViewChildren, ContentChildren, forwardRef, HostListener, NgModule, signal, input, viewChild, computed, model, contentChildren, ChangeDetectionStrategy,
|
|
2
|
+
import { EventEmitter, Component, Input, Output, ViewChild, Injectable, Directive, Pipe, ViewChildren, ContentChildren, forwardRef, HostListener, NgModule, signal, input, viewChild, computed, model, contentChildren, ChangeDetectionStrategy, HostBinding, Injector } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/common';
|
|
4
4
|
import { DatePipe, CommonModule, NgClass } from '@angular/common';
|
|
5
5
|
import * as i1$1 from 'primeng/button';
|
|
@@ -106,7 +106,7 @@ import * as i1$6 from 'primeng/tree';
|
|
|
106
106
|
import { TreeModule } from 'primeng/tree';
|
|
107
107
|
import * as i2$3 from 'primeng/selectbutton';
|
|
108
108
|
import { SelectButtonModule } from 'primeng/selectbutton';
|
|
109
|
-
import * as
|
|
109
|
+
import * as i3$3 from 'primeng/stepper';
|
|
110
110
|
import { StepperModule } from 'primeng/stepper';
|
|
111
111
|
import { InputGroupModule } from 'primeng/inputgroup';
|
|
112
112
|
import { InputGroupAddonModule } from 'primeng/inputgroupaddon';
|
|
@@ -1961,6 +1961,7 @@ class KvTreetableComponent {
|
|
|
1961
1961
|
this.transferArrayItem = false;
|
|
1962
1962
|
this.textoEmptyMessage = 'Nenhum registro encontrado';
|
|
1963
1963
|
this.childrenRecoil = true;
|
|
1964
|
+
this.showHeader = true;
|
|
1964
1965
|
this.onFilter = new EventEmitter();
|
|
1965
1966
|
this.onPaginate = new EventEmitter();
|
|
1966
1967
|
this.onActiveItem = new EventEmitter();
|
|
@@ -2161,11 +2162,11 @@ class KvTreetableComponent {
|
|
|
2161
2162
|
this.inputBusca.nativeElement.value = '';
|
|
2162
2163
|
}
|
|
2163
2164
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvTreetableComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2164
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.8", type: KvTreetableComponent, selector: "kv-tree-table", inputs: { config: "config", dataSource: "dataSource", gridLines: "gridLines", tableCaptalized: "tableCaptalized", selectedItems: "selectedItems", paginator: "paginator", rows: "rows", treeTableDraggable: "treeTableDraggable", transferArrayItem: "transferArrayItem", ordenacao: "ordenacao", totalRecords: "totalRecords", textoEmptyMessage: "textoEmptyMessage", childrenRecoil: "childrenRecoil", pageLinksOptions: "pageLinksOptions", pageLinks: "pageLinks", showFirstLastIcon: "showFirstLastIcon", _templates: ["templates", "_templates"] }, outputs: { onFilter: "onFilter", onPaginate: "onPaginate", onActiveItem: "onActiveItem", onActiveItemLote: "onActiveItemLote", doubleClickEvent: "doubleClickEvent", onNodeSelect: "onNodeSelect", onNodeUnselect: "onNodeUnselect", onDropItem: "onDropItem" }, host: { listeners: { "window:resize": "onWindowResize($event)" } }, queries: [{ propertyName: "templates", predicate: TemplateDirective }], viewQueries: [{ propertyName: "pTreeTable", first: true, predicate: TreeTable, descendants: true }, { propertyName: "inputBusca", first: true, predicate: ["inputBusca"], descendants: true }], ngImport: i0, template: "<div *ngIf=\"!treeTableDraggable\">\r\n <p-treeTable\r\n #tt\r\n [value]=\"dataSource\"\r\n [columns]=\"config.columns\"\r\n [resizableColumns]=\"true\"\r\n [tableStyle]=\"{ 'min-width': '50rem' }\"\r\n [resizableColumns]=\"true\"\r\n [paginator]=\"paginator\"\r\n [rows]=\"rows\"\r\n [totalRecords]=\"totalRecords\"\r\n [rowsPerPageOptions]=\"[5, 10, 25, 50]\"\r\n [showFirstLastIcon]=\"tamanhoTela > 960 ? true : false\"\r\n [pageLinks]=\"tamanhoTela > 960 ? 2 : 1\"\r\n [styleClass]=\"gridLines ? 'p-treetable-gridlines' : ''\"\r\n [(selection)]=\"selectedItems\"\r\n [lazy]=\"config.lazy\"\r\n (onLazyLoad)=\"paginate($event)\"\r\n (onNodeSelect)=\"onNodeSelected($event)\"\r\n (onNodeUnselect)=\"onNodeUnselected($event)\"\r\n [showCurrentPageReport]=\"true\"\r\n currentPageReportTemplate=\"{first} - {last} de {totalRecords}\"\r\n >\r\n <ng-template pTemplate=\"caption\" *ngIf=\"config.enableCation\">\r\n <div\r\n class=\"flex flex-row flex-wrap justify-content-between align-items-center grid formgrid p-fluid col-12 m-0\"\r\n style=\"background-color: #eaeaea\"\r\n >\r\n <div class=\"col-12 flex flex-column\">\r\n <div *ngIf=\"config.title\" class=\"text-md font-bold my-3\">\r\n {{ config.title }}\r\n </div>\r\n <div *ngIf=\"config.subtitle\" class=\"text-sm mb-4 font-medium\">\r\n {{ config.subtitle }}\r\n </div>\r\n </div>\r\n\r\n <div\r\n class=\"flex flex-row align-items-center col-10 p-0 md:col-6 lg:col-4 justify-content-center {{\r\n tamanhoTela < 768 ? '' : 'input-search'\r\n }}\"\r\n >\r\n <span *ngIf=\"config.enableFilter\" class=\"p-input-icon-left\">\r\n <i class=\"pi pi-search\"></i>\r\n\r\n <input\r\n pInputText\r\n pAutoFocus\r\n [autofocus]=\"true\"\r\n type=\"text\"\r\n (input)=\"onGlobalFilter(tt, $event)\"\r\n placeholder=\"Pesquisar...\"\r\n class=\"h-2rem\"\r\n #inputBusca\r\n />\r\n </span>\r\n </div>\r\n\r\n <div class=\"flex flex-row col-1 justify-content-end p-0\">\r\n <div class=\"flex flex-row gap-2 btns-options\">\r\n @for (action of config.actionsLote; track $index) {\r\n @if((selectedItems.length > 0 || action.showAcoesLote) &&\r\n exibirCampo(action, this.action)) {\r\n <kv-button\r\n (onClick)=\"action?.command(); activeItemLote(selectedItems)\"\r\n [pTooltip]=\"getOrExecute(action.tooltip, selectedItems)\"\r\n [tooltipPosition]=\"'bottom'\"\r\n [disabled]=\"getOrExecute(action.disabled, selectedItems) || false\"\r\n [icon]=\"getOrExecute(action.icon, selectedItems)\"\r\n [severity]=\"action.severity || 'tertiary'\"\r\n />\r\n } }\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n @for(col of columns; track $index){\r\n <th\r\n [ttSortableColumn]=\"col.field\"\r\n [ttSortableColumnDisabled]=\"col.sortable === false\"\r\n class=\"text-sm\"\r\n [style.width]=\"col.width\"\r\n >\r\n <div>\r\n <div [ngClass]=\"{ flex: $index == 0, 'gap-3': $index == 0 }\">\r\n <div *ngIf=\"$index == 0 && config.enableSelect\">\r\n <p-treeTableHeaderCheckbox\r\n (click)=\"activeItemLote(selectedItems)\"\r\n />\r\n </div>\r\n\r\n <div class=\"flex flex-row align-items-center {{ align(col) }}\">\r\n <span>{{ col.header }}</span>\r\n\r\n @if(col.sortable) {\r\n <p-treeTableSortIcon [field]=\"col.field\" />\r\n\r\n }\r\n\r\n <span\r\n *ngIf=\"col.headerTooltip\"\r\n class=\"material-symbols-outlined flex align-items-center\"\r\n [pTooltip]=\"col.headerTooltip\"\r\n >info</span\r\n >\r\n </div>\r\n </div>\r\n </div>\r\n </th>\r\n @if (config.actions?.length ?? 0 > 0) {\r\n <th [style.width]=\"5\"></th>\r\n } }\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n @for (col of columns; track $index) {\r\n <th\r\n [ttSortableColumn]=\"col.field\"\r\n [ttSortableColumnDisabled]=\"col.sortable === false\"\r\n [style.width]=\"col.width\"\r\n >\r\n <div class=\"flex flex-row align-items-center {{ align(col) }}\">\r\n <span>{{ col.header }}</span>\r\n\r\n @if(col.sortable) {\r\n <p-treeTableSortIcon [field]=\"col.field\" />\r\n }\r\n </div>\r\n </th>\r\n } @if (config.actions?.length ?? 0 > 0) {\r\n <th [style.width]=\"5\"></th>\r\n }\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template\r\n pTemplate=\"body\"\r\n let-rowNode\r\n let-rowData=\"rowData\"\r\n let-columns=\"columns\"\r\n >\r\n <tr\r\n [ttRow]=\"rowNode\"\r\n (dblclick)=\"doubleClick($event, rowData)\"\r\n [ngClass]=\"{ capitalize: tableCaptalized }\"\r\n >\r\n @for(col of columns; track $index){\r\n <td\r\n [style.position]=\"rowNode.level !== 0 ? 'sticky' : null\"\r\n [style.left.px]=\"\r\n childrenRecoil && rowNode.level !== 0 ? rowNode.level * 30 : null\r\n \"\r\n [style.borderRight]=\"rowNode.level === 0 ? 'none' : ''\"\r\n [style.borderLeft]=\"\r\n rowNode.level === 0 && col.field != config.columns[0].field\r\n ? 'none'\r\n : ''\r\n \"\r\n >\r\n <div class=\"flex flex-row {{ align(col) }}\">\r\n <div\r\n class=\"w-full-h-full flex align-items-center\"\r\n *ngIf=\"$index == 0\"\r\n >\r\n <p-treeTableToggler class=\"hiddenVisible\" [rowNode]=\"rowNode\" />\r\n\r\n @if(config.enableSelect) {\r\n <p-treeTableCheckbox\r\n [disabled]=\"isDisabledCheckbox(rowData, rowNode)\"\r\n (click)=\"activeItemLote(selectedItems)\"\r\n [value]=\"rowNode\"\r\n [ngStyle]=\"{\r\n 'display': isSelectEnabled(rowData, rowNode) ? 'block' : 'none',\r\n 'margin-left': config.visibleCheckboxFunction ? '-34px' : '0px'\r\n }\"\r\n />\r\n }\r\n\r\n </div>\r\n\r\n <div class=\"flex flex-row align-items-center\">\r\n <div\r\n class=\"flex flex-row align-items-center justify-content-center gap-2\"\r\n >\r\n @if(col.tagColor) {\r\n <div\r\n class=\"tag\"\r\n [pTooltip]=\"\r\n col.tooltipTag &&\r\n col.tooltipTag(rowData, col, rowData[col.field])\r\n \"\r\n [style.background-color]=\"\r\n col.tagColor(rowData, col, rowData[col.field])\r\n \"\r\n ></div>\r\n\r\n }\r\n <i\r\n *ngIf=\"col.boolean\"\r\n class=\"pi {{\r\n rowData[col.field] ? 'pi-check text-green-300' : ''\r\n }}\"\r\n style=\"font-size: 1.1rem\"\r\n ></i>\r\n\r\n <div class=\"flex flex-column\" *ngIf=\"!col.boolean\">\r\n <span class=\"m-0\">{{ rowData[col.field] }}</span>\r\n\r\n <p *ngIf=\"col.subtitle\" class=\"m-0 text-xs font-semibold\">\r\n {{ rowData[col.subtitle] }}\r\n </p>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <span *ngIf=\"col.template && validateShowTemplate(rowNode, col)\">\r\n <ng-container\r\n *ngIf=\"getCustomTemplate(col.template.name)\"\r\n [ngTemplateOutlet]=\"getCustomTemplate(col.template.name)\"\r\n [ngTemplateOutletContext]=\"{ $implicit: rowData }\"\r\n >\r\n </ng-container>\r\n </span>\r\n </td>\r\n }\r\n\r\n <td\r\n style=\"border-left: none; text-align: end\"\r\n *ngIf=\"(config.actions?.length ?? 0 > 0) || config.actionsPai\"\r\n >\r\n <div\r\n *ngIf=\"\r\n (config.actions?.length ?? 0 > 0) &&\r\n validateActionPosition(rowNode)\r\n \"\r\n >\r\n <span\r\n class=\"material-symbols-outlined cursor-pointer icon-more-horiz p-1\"\r\n style=\"font-size: 25px\"\r\n (click)=\"menu.toggle($event); activeItem(rowData)\"\r\n >\r\n more_horiz\r\n </span>\r\n\r\n @for(action of config.actions; track $index) {\r\n {{ criarMenusModal(rowData) }}\r\n }\r\n\r\n <p-menu\r\n #menu\r\n [popup]=\"true\"\r\n [model]=\"menuItems\"\r\n appendTo=\"body\"\r\n ></p-menu>\r\n </div>\r\n\r\n @if(config.actionsPai?.length ?? 0 > 0 && rowNode.level == 0){\r\n <div class=\"flex justify-content-end\">\r\n @for (actionPai of config.actionsPai; track $index) { @if\r\n (getOrExecute(actionPai.visible, rowData) ?? true) {\r\n <kv-button\r\n (onClick)=\"activeItem(rowData); actionPai.command($event)\"\r\n [icon]=\"actionPai.icon\"\r\n [severity]=\"actionPai.severity || 'tertiary'\"\r\n />\r\n } }\r\n </div>\r\n }\r\n </td>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"emptymessage\">\r\n <tr>\r\n <td\r\n [attr.colspan]=\"config.columns.length + 1\"\r\n style=\"text-align: center\"\r\n >\r\n {{ textoEmptyMessage }}\r\n </td>\r\n </tr>\r\n </ng-template>\r\n </p-treeTable>\r\n</div>\r\n\r\n<div\r\n *ngIf=\"treeTableDraggable\"\r\n cdkDropList\r\n class=\"example-list\"\r\n (cdkDropListDropped)=\"drop($event)\"\r\n>\r\n <p-treeTable\r\n #tt\r\n [value]=\"dataSource\"\r\n [columns]=\"config.columns\"\r\n [resizableColumns]=\"true\"\r\n [tableStyle]=\"{ 'min-width': '50rem' }\"\r\n [resizableColumns]=\"true\"\r\n [paginator]=\"paginator\"\r\n [rows]=\"rows\"\r\n [pageLinks]=\"pageLinks\"\r\n [totalRecords]=\"totalRecords\"\r\n [rowsPerPageOptions]=\"[5, 10, 25, 50]\"\r\n [showFirstLastIcon]=\"tamanhoTela > 960 ? true : false\"\r\n [pageLinks]=\"tamanhoTela > 960 ? 2 : 1\"\r\n [styleClass]=\"gridLines ? 'p-treetable-gridlines' : ''\"\r\n [(selection)]=\"selectedItems\"\r\n [lazy]=\"config.lazy\"\r\n (onLazyLoad)=\"paginate($event)\"\r\n currentPageReportTemplate=\"{first} - {last} de {{ totalRecords }}\"\r\n >\r\n <ng-template pTemplate=\"caption\" *ngIf=\"config.enableCation\">\r\n <div\r\n class=\"flex flex-row flex-wrap justify-content-between align-items-center grid formgrid p-fluid col-12 m-0\"\r\n style=\"background-color: #eaeaea\"\r\n >\r\n <div class=\"col-12 flex flex-column\">\r\n <div *ngIf=\"config.title\" class=\"text-md font-bold my-3\">\r\n {{ config.title }}\r\n </div>\r\n <div *ngIf=\"config.subtitle\" class=\"text-sm mb-4 font-medium\">\r\n {{ config.subtitle }}\r\n </div>\r\n </div>\r\n\r\n <div\r\n class=\"flex flex-row align-items-center col-10 p-0 md:col-6 lg:col-4 justify-content-center {{\r\n tamanhoTela < 768 ? '' : 'input-search'\r\n }}\"\r\n >\r\n <span *ngIf=\"config.enableFilter\" class=\"p-input-icon-left\">\r\n <i class=\"pi pi-search\"></i>\r\n\r\n <input\r\n pInputText\r\n pAutoFocus\r\n [autofocus]=\"true\"\r\n type=\"text\"\r\n (input)=\"onGlobalFilter(tt, $event)\"\r\n placeholder=\"Pesquisar...\"\r\n class=\"h-2rem\"\r\n #inputBusca\r\n />\r\n </span>\r\n </div>\r\n\r\n <div class=\"flex flex-row col-1 justify-content-end p-0\">\r\n <div class=\"flex flex-row gap-2 btns-options\">\r\n @for (action of config.actionsLote; track $index) {\r\n @if((selectedItems.length > 0 || action.showAcoesLote) &&\r\n exibirCampo(action, this.action)) {\r\n <kv-button\r\n (onClick)=\"action?.command(); activeItemLote(selectedItems)\"\r\n [pTooltip]=\"getOrExecute(action.tooltip, selectedItems)\"\r\n [tooltipPosition]=\"'bottom'\"\r\n [disabled]=\"getOrExecute(action.disabled, selectedItems) || false\"\r\n [icon]=\"getOrExecute(action.icon, selectedItems)\"\r\n [severity]=\"action.severity || 'tertiary'\"\r\n />\r\n } }\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n @for(col of columns; track $index){\r\n <th\r\n [ttSortableColumn]=\"col.field\"\r\n [ttSortableColumnDisabled]=\"col.sortable === false\"\r\n class=\"text-sm\"\r\n [style.width]=\"col.width\"\r\n >\r\n <div>\r\n <div [ngClass]=\"{ flex: $index == 0, 'gap-3': $index == 0 }\">\r\n <div *ngIf=\"$index == 0 && config.enableSelect\">\r\n <p-treeTableHeaderCheckbox\r\n (click)=\"activeItemLote(selectedItems)\"\r\n />\r\n </div>\r\n\r\n <div class=\"flex flex-row align-items-center {{ align(col) }}\">\r\n <span>{{ col.header }}</span>\r\n\r\n @if(col.sortable) {\r\n <p-treeTableSortIcon [field]=\"col.field\" />\r\n\r\n }\r\n\r\n <span\r\n *ngIf=\"col.headerTooltip\"\r\n class=\"material-symbols-outlined flex align-items-center\"\r\n [pTooltip]=\"col.headerTooltip\"\r\n >info</span\r\n >\r\n </div>\r\n </div>\r\n </div>\r\n </th>\r\n }\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n @for (col of columns; track $index) {\r\n <th\r\n [ttSortableColumn]=\"col.field\"\r\n [ttSortableColumnDisabled]=\"col.sortable === false\"\r\n [style.width]=\"col.width\"\r\n >\r\n <div class=\"flex flex-row align-items-center {{ align(col) }}\">\r\n <span>{{ col.header }}</span>\r\n\r\n @if(col.sortable) {\r\n <p-treeTableSortIcon [field]=\"col.field\" />\r\n\r\n }\r\n </div>\r\n </th>\r\n }\r\n <th [style.width]=\"5\"></th>\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template\r\n pTemplate=\"body\"\r\n let-rowNode\r\n let-rowData=\"rowData\"\r\n let-columns=\"columns\"\r\n >\r\n <tr\r\n cdkDrag\r\n [cdkDragData]=\"rowNode\"\r\n [ttRow]=\"rowNode\"\r\n (dblclick)=\"doubleClick($event, rowData)\"\r\n [ngClass]=\"{ capitalize: tableCaptalized }\"\r\n >\r\n @for(col of columns; track $index){\r\n <td\r\n [style.position]=\"rowNode.level !== 0 ? 'sticky' : null\"\r\n [style.left.px]=\"\r\n childrenRecoil && rowNode.level !== 0 ? rowNode.level * 30 : null\r\n \"\r\n >\r\n <div class=\"flex flex-row {{ align(col) }}\">\r\n <div\r\n class=\"w-full-h-full flex align-items-center\"\r\n *ngIf=\"$index == 0\"\r\n \r\n >\r\n \r\n <p-treeTableToggler \r\n class=\"hiddenVisible\" \r\n [rowNode]=\"rowNode\"\r\n />\r\n\r\n @if(config.enableSelect) {\r\n <p-treeTableCheckbox\r\n [disabled]=\"isDisabledCheckbox(rowData, rowNode)\"\r\n (click)=\"activeItemLote(selectedItems)\"\r\n [value]=\"rowNode\"\r\n [ngStyle]=\"{\r\n 'display': isSelectEnabled(rowData, rowNode) ? 'block' : 'none',\r\n 'margin-left': config.visibleCheckboxFunction ? '-34px' : '0px'\r\n }\"\r\n />\r\n }\r\n \r\n </div>\r\n\r\n <div class=\"flex flex-row align-items-center\">\r\n <div\r\n class=\"flex flex-row align-items-center justify-content-center gap-2\"\r\n >\r\n @if(col.tagColor) {\r\n <div\r\n class=\"tag\"\r\n [pTooltip]=\"\r\n col.tooltipTag &&\r\n col.tooltipTag(rowData, col, rowData[col.field])\r\n \"\r\n [style.background-color]=\"\r\n col.tagColor(rowData, col, rowData[col.field])\r\n \"\r\n ></div>\r\n\r\n }\r\n\r\n <i\r\n *ngIf=\"col.boolean\"\r\n class=\"pi {{\r\n rowData[col.field] ? 'pi-check text-green-300' : ''\r\n }}\"\r\n style=\"font-size: 1.1rem\"\r\n ></i>\r\n\r\n <div class=\"flex flex-column\" *ngIf=\"!col.boolean\">\r\n <span class=\"m-0\">{{ rowData[col.field] }}</span>\r\n\r\n <p *ngIf=\"col.subtitle\" class=\"m-0 text-xs font-semibold\">\r\n {{ rowData[col.subtitle] }}\r\n </p>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <span *ngIf=\"col.template && validateShowTemplate(rowNode, col)\">\r\n <ng-container\r\n *ngIf=\"getCustomTemplate(col.template.name)\"\r\n [ngTemplateOutlet]=\"getCustomTemplate(col.template.name)\"\r\n [ngTemplateOutletContext]=\"{ $implicit: rowData }\"\r\n >\r\n </ng-container>\r\n </span>\r\n </td>\r\n }\r\n\r\n <td\r\n style=\"border-left: none; text-align: end\"\r\n *ngIf=\"(config.actions?.length ?? 0 > 0) || config.actionsPai\"\r\n [style.borderRight]=\"rowNode.level === 0 ? 'none' : ''\"\r\n [style.borderLeft]=\"rowNode.level === 0 ? 'none' : ''\"\r\n >\r\n <div\r\n *ngIf=\"\r\n (config.actions?.length ?? 0 > 0) &&\r\n validateActionPosition(rowNode)\r\n \"\r\n >\r\n <span\r\n class=\"material-symbols-outlined cursor-pointer icon-more-horiz p-1\"\r\n style=\"font-size: 25px\"\r\n (click)=\"menu.toggle($event); activeItem(rowData)\"\r\n >\r\n more_horiz\r\n </span>\r\n\r\n @for(action of config.actions; track $index) {\r\n {{ criarMenusModal(rowData) }}\r\n }\r\n\r\n <p-menu\r\n #menu\r\n [popup]=\"true\"\r\n [model]=\"menuItems\"\r\n appendTo=\"body\"\r\n ></p-menu>\r\n </div>\r\n\r\n @if(config.actionsPai?.length ?? 0 > 0 && rowNode.level == 0){\r\n <div class=\"flex justify-content-end\">\r\n @for (actionPai of config.actionsPai; track $index) {\r\n @if(getOrExecute(actionPai.visible, rowData) ?? true) {\r\n <kv-button\r\n (onClick)=\"activeItem(rowData); actionPai.command($event)\"\r\n [icon]=\"actionPai.icon\"\r\n [severity]=\"actionPai.severity || 'tertiary'\"\r\n />\r\n } }\r\n </div>\r\n }\r\n </td>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"emptymessage\">\r\n <tr>\r\n <td\r\n [attr.colspan]=\"config.columns.length + 1\"\r\n style=\"text-align: center\"\r\n >\r\n {{ textoEmptyMessage }}\r\n </td>\r\n </tr>\r\n </ng-template>\r\n </p-treeTable>\r\n</div>\r\n", styles: ["::ng-deep .p-treetable .p-treetable-tbody>tr>td{padding:.4rem}::ng-deep .p-treetable .p-treetable-header{padding:0rem}span{font-size:14px}:host ::ng-deep .p-treetable table{table-layout:auto!important}.icon-more-horiz:hover,.icon-more-horiz:focus{color:#5e5e5e;transform:scale(1.2);transition:color .3s,transform .3s;background-color:#eaeaea;border-radius:50%}::ng-deep .p-treetable .p-treetable-thead>tr>th{background-color:#eaeaea}.tag{width:5px;height:20px;border-radius:.25rem}.cdk-drag-preview{display:flex;align-items:center;justify-content:space-between;border-radius:10px!important}.cdk-drop-list-dragging{cursor:grabbing}:host ::ng-deep .cdk-drop-list-dragging .cdk-drag{transition:transform .25s cubic-bezier(0,0,.2,1)}:host ::ng-deep .cdk-drag-animating{transition:transform .3s cubic-bezier(0,0,.2,1)}::ng-deep svg.p-icon{width:.7rem;height:1rem}::ng-deep .p-checkbox .p-checkbox-box.p-highlight{border-color:#004172;background:#004172}::ng-deep .p-checkbox .p-checkbox-box.p-highlight:hover{background-color:#002542}::ng-deep .p-checkbox .p-checkbox-box.p-highlight:active{background-color:#002542}::ng-deep .p-checkbox .p-checkbox-box.p-highlight:disabled{background-color:#002542;opacity:.4;cursor:auto}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i1$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i5$2.AutoFocus, selector: "[pAutoFocus]", inputs: ["autofocus"] }, { kind: "directive", type: i6.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "directive", type: i9.InputText, selector: "[pInputText]", inputs: ["variant"] }, { kind: "component", type: i5.Menu, selector: "p-menu", inputs: ["model", "popup", "style", "styleClass", "appendTo", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "ariaLabel", "ariaLabelledBy", "id", "tabindex"], outputs: ["onShow", "onHide", "onBlur", "onFocus"] }, { kind: "directive", type: i7.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i7.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "component", type: i8$2.TreeTable, selector: "p-treeTable", inputs: ["columns", "style", "styleClass", "tableStyle", "tableStyleClass", "autoLayout", "lazy", "lazyLoadOnInit", "paginator", "rows", "first", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "customSort", "selectionMode", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "compareSelectionBy", "rowHover", "loading", "loadingIcon", "showLoader", "scrollable", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "frozenColumns", "resizableColumns", "columnResizeMode", "reorderableColumns", "contextMenu", "rowTrackBy", "filters", "globalFilterFields", "filterDelay", "filterMode", "filterLocale", "paginatorLocale", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "value", "virtualRowHeight", "selectionKeys"], outputs: ["selectionChange", "contextMenuSelectionChange", "onFilter", "onNodeExpand", "onNodeCollapse", "onPage", "onSort", "onLazyLoad", "sortFunction", "onColResize", "onColReorder", "onNodeSelect", "onNodeUnselect", "onContextMenuSelect", "onHeaderCheckboxToggle", "onEditInit", "onEditComplete", "onEditCancel", "selectionKeysChange"] }, { kind: "component", type: i8$2.TreeTableToggler, selector: "p-treeTableToggler", inputs: ["rowNode"] }, { kind: "directive", type: i8$2.TTSortableColumn, selector: "[ttSortableColumn]", inputs: ["ttSortableColumn", "ttSortableColumnDisabled"] }, { kind: "component", type: i8$2.TTSortIcon, selector: "p-treeTableSortIcon", inputs: ["field", "ariaLabelDesc", "ariaLabelAsc"] }, { kind: "directive", type: i8$2.TTRow, selector: "[ttRow]", inputs: ["ttRow"] }, { kind: "component", type: i8$2.TTCheckbox, selector: "p-treeTableCheckbox", inputs: ["disabled", "value"] }, { kind: "component", type: i8$2.TTHeaderCheckbox, selector: "p-treeTableHeaderCheckbox" }, { kind: "component", type: KvButtonComponent, selector: "kv-button", inputs: ["label", "icon", "loading", "disabled", "severity", "size", "fullWidth"], outputs: ["onClick"] }] }); }
|
|
2165
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.8", type: KvTreetableComponent, selector: "kv-tree-table", inputs: { config: "config", dataSource: "dataSource", gridLines: "gridLines", tableCaptalized: "tableCaptalized", selectedItems: "selectedItems", paginator: "paginator", rows: "rows", treeTableDraggable: "treeTableDraggable", transferArrayItem: "transferArrayItem", ordenacao: "ordenacao", totalRecords: "totalRecords", textoEmptyMessage: "textoEmptyMessage", childrenRecoil: "childrenRecoil", showHeader: "showHeader", pageLinksOptions: "pageLinksOptions", pageLinks: "pageLinks", showFirstLastIcon: "showFirstLastIcon", _templates: ["templates", "_templates"] }, outputs: { onFilter: "onFilter", onPaginate: "onPaginate", onActiveItem: "onActiveItem", onActiveItemLote: "onActiveItemLote", doubleClickEvent: "doubleClickEvent", onNodeSelect: "onNodeSelect", onNodeUnselect: "onNodeUnselect", onDropItem: "onDropItem" }, host: { listeners: { "window:resize": "onWindowResize($event)" } }, queries: [{ propertyName: "templates", predicate: TemplateDirective }], viewQueries: [{ propertyName: "pTreeTable", first: true, predicate: TreeTable, descendants: true }, { propertyName: "inputBusca", first: true, predicate: ["inputBusca"], descendants: true }], ngImport: i0, template: "<div *ngIf=\"!treeTableDraggable\">\r\n <p-treeTable\r\n #tt\r\n [value]=\"dataSource\"\r\n [columns]=\"config.columns\"\r\n [resizableColumns]=\"true\"\r\n [tableStyle]=\"{ 'min-width': '50rem' }\"\r\n [resizableColumns]=\"true\"\r\n [paginator]=\"paginator\"\r\n [rows]=\"rows\"\r\n [totalRecords]=\"totalRecords\"\r\n [rowsPerPageOptions]=\"[5, 10, 25, 50]\"\r\n [showFirstLastIcon]=\"tamanhoTela > 960 ? true : false\"\r\n [pageLinks]=\"tamanhoTela > 960 ? 2 : 1\"\r\n [styleClass]=\"gridLines ? 'p-treetable-gridlines' : ''\"\r\n [(selection)]=\"selectedItems\"\r\n [lazy]=\"config.lazy\"\r\n (onLazyLoad)=\"paginate($event)\"\r\n (onNodeSelect)=\"onNodeSelected($event)\"\r\n (onNodeUnselect)=\"onNodeUnselected($event)\"\r\n [showCurrentPageReport]=\"true\"\r\n currentPageReportTemplate=\"{first} - {last} de {totalRecords}\"\r\n >\r\n <ng-template pTemplate=\"caption\" *ngIf=\"config.enableCation\">\r\n <div\r\n class=\"flex flex-row flex-wrap justify-content-between align-items-center grid formgrid p-fluid col-12 m-0\"\r\n style=\"background-color: #eaeaea\"\r\n >\r\n <div class=\"col-12 flex flex-column\">\r\n <div *ngIf=\"config.title\" class=\"text-md font-bold my-3\">\r\n {{ config.title }}\r\n </div>\r\n <div *ngIf=\"config.subtitle\" class=\"text-sm mb-4 font-medium\">\r\n {{ config.subtitle }}\r\n </div>\r\n </div>\r\n\r\n <div\r\n class=\"flex flex-row align-items-center col-10 p-0 md:col-6 lg:col-4 justify-content-center {{\r\n tamanhoTela < 768 ? '' : 'input-search'\r\n }}\"\r\n >\r\n <span *ngIf=\"config.enableFilter\" class=\"p-input-icon-left\">\r\n <i class=\"pi pi-search\"></i>\r\n\r\n <input\r\n pInputText\r\n pAutoFocus\r\n [autofocus]=\"true\"\r\n type=\"text\"\r\n (input)=\"onGlobalFilter(tt, $event)\"\r\n placeholder=\"Pesquisar...\"\r\n class=\"h-2rem\"\r\n #inputBusca\r\n />\r\n </span>\r\n </div>\r\n\r\n <div class=\"flex flex-row col-1 justify-content-end p-0\">\r\n <div class=\"flex flex-row gap-2 btns-options\">\r\n @for (action of config.actionsLote; track $index) {\r\n @if((selectedItems.length > 0 || action.showAcoesLote) &&\r\n exibirCampo(action, this.action)) {\r\n <kv-button\r\n (onClick)=\"action?.command(); activeItemLote(selectedItems)\"\r\n [pTooltip]=\"getOrExecute(action.tooltip, selectedItems)\"\r\n [tooltipPosition]=\"'bottom'\"\r\n [disabled]=\"getOrExecute(action.disabled, selectedItems) || false\"\r\n [icon]=\"getOrExecute(action.icon, selectedItems)\"\r\n [severity]=\"action.severity || 'tertiary'\"\r\n />\r\n } }\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n @if(showHeader){\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n @for(col of columns; track $index){\r\n <th\r\n [ttSortableColumn]=\"col.field\"\r\n [ttSortableColumnDisabled]=\"col.sortable === false\"\r\n class=\"text-sm\"\r\n [style.width]=\"col.width\"\r\n >\r\n <div>\r\n <div [ngClass]=\"{ flex: $index == 0, 'gap-3': $index == 0 }\">\r\n <div *ngIf=\"$index == 0 && config.enableSelect\">\r\n <p-treeTableHeaderCheckbox\r\n (click)=\"activeItemLote(selectedItems)\"\r\n />\r\n </div>\r\n \r\n <div class=\"flex flex-row align-items-center {{ align(col) }}\">\r\n <span>{{ col.header }}</span>\r\n \r\n @if(col.sortable) {\r\n <p-treeTableSortIcon [field]=\"col.field\" />\r\n \r\n }\r\n \r\n <span\r\n *ngIf=\"col.headerTooltip\"\r\n class=\"material-symbols-outlined flex align-items-center\"\r\n [pTooltip]=\"col.headerTooltip\"\r\n >info</span\r\n >\r\n </div>\r\n </div>\r\n </div>\r\n </th>\r\n @if (config.actions?.length ?? 0 > 0) {\r\n <th [style.width]=\"5\"></th>\r\n } }\r\n </tr>\r\n </ng-template>\r\n \r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n @for (col of columns; track $index) {\r\n <th\r\n [ttSortableColumn]=\"col.field\"\r\n [ttSortableColumnDisabled]=\"col.sortable === false\"\r\n [style.width]=\"col.width\"\r\n >\r\n <div class=\"flex flex-row align-items-center {{ align(col) }}\">\r\n <span>{{ col.header }}</span>\r\n \r\n @if(col.sortable) {\r\n <p-treeTableSortIcon [field]=\"col.field\" />\r\n }\r\n </div>\r\n </th>\r\n } @if (config.actions?.length ?? 0 > 0) {\r\n <th [style.width]=\"5\"></th>\r\n }\r\n </tr>\r\n </ng-template>\r\n }\r\n\r\n\r\n <ng-template\r\n pTemplate=\"body\"\r\n let-rowNode\r\n let-rowData=\"rowData\"\r\n let-columns=\"columns\"\r\n >\r\n <tr\r\n [ttRow]=\"rowNode\"\r\n (dblclick)=\"doubleClick($event, rowData)\"\r\n [ngClass]=\"{ capitalize: tableCaptalized }\"\r\n >\r\n @for(col of columns; track $index){\r\n <td\r\n [style.position]=\"rowNode.level !== 0 ? 'sticky' : null\"\r\n [style.left.px]=\"\r\n childrenRecoil && rowNode.level !== 0 ? rowNode.level * 30 : null\r\n \"\r\n [style.borderRight]=\"rowNode.level === 0 ? 'none' : ''\"\r\n [style.borderLeft]=\"\r\n rowNode.level === 0 && col.field != config.columns[0].field\r\n ? 'none'\r\n : ''\r\n \"\r\n >\r\n <div class=\"flex flex-row {{ align(col) }}\">\r\n <div\r\n class=\"w-full-h-full flex align-items-center\"\r\n *ngIf=\"$index == 0\"\r\n >\r\n <p-treeTableToggler class=\"hiddenVisible\" [rowNode]=\"rowNode\" />\r\n\r\n @if(config.enableSelect) {\r\n <p-treeTableCheckbox\r\n [disabled]=\"isDisabledCheckbox(rowData, rowNode)\"\r\n (click)=\"activeItemLote(selectedItems)\"\r\n [value]=\"rowNode\"\r\n [ngStyle]=\"{\r\n 'display': isSelectEnabled(rowData, rowNode) ? 'block' : 'none',\r\n 'margin-left': config.visibleCheckboxFunction ? '-34px' : '0px'\r\n }\"\r\n />\r\n }\r\n\r\n </div>\r\n\r\n <div class=\"flex flex-row align-items-center\">\r\n <div\r\n class=\"flex flex-row align-items-center justify-content-center gap-2\"\r\n >\r\n @if(col.tagColor) {\r\n <div\r\n class=\"tag\"\r\n [pTooltip]=\"\r\n col.tooltipTag &&\r\n col.tooltipTag(rowData, col, rowData[col.field])\r\n \"\r\n [style.background-color]=\"\r\n col.tagColor(rowData, col, rowData[col.field])\r\n \"\r\n ></div>\r\n\r\n }\r\n <i\r\n *ngIf=\"col.boolean\"\r\n class=\"pi {{\r\n rowData[col.field] ? 'pi-check text-green-300' : ''\r\n }}\"\r\n style=\"font-size: 1.1rem\"\r\n ></i>\r\n\r\n <div class=\"flex flex-column\" *ngIf=\"!col.boolean\">\r\n <span class=\"m-0\">{{ rowData[col.field] }}</span>\r\n\r\n <p *ngIf=\"col.subtitle\" class=\"m-0 text-xs font-semibold\">\r\n {{ rowData[col.subtitle] }}\r\n </p>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <span *ngIf=\"col.template && validateShowTemplate(rowNode, col)\">\r\n <ng-container\r\n *ngIf=\"getCustomTemplate(col.template.name)\"\r\n [ngTemplateOutlet]=\"getCustomTemplate(col.template.name)\"\r\n [ngTemplateOutletContext]=\"{ $implicit: rowData }\"\r\n >\r\n </ng-container>\r\n </span>\r\n </td>\r\n }\r\n\r\n <td\r\n style=\"border-left: none; text-align: end\"\r\n *ngIf=\"(config.actions?.length ?? 0 > 0) || config.actionsPai\"\r\n >\r\n <div\r\n *ngIf=\"\r\n (config.actions?.length ?? 0 > 0) &&\r\n validateActionPosition(rowNode)\r\n \"\r\n >\r\n <span\r\n class=\"material-symbols-outlined cursor-pointer icon-more-horiz p-1\"\r\n style=\"font-size: 25px\"\r\n (click)=\"menu.toggle($event); activeItem(rowData)\"\r\n >\r\n more_horiz\r\n </span>\r\n\r\n @for(action of config.actions; track $index) {\r\n {{ criarMenusModal(rowData) }}\r\n }\r\n\r\n <p-menu\r\n #menu\r\n [popup]=\"true\"\r\n [model]=\"menuItems\"\r\n appendTo=\"body\"\r\n ></p-menu>\r\n </div>\r\n\r\n @if(config.actionsPai?.length ?? 0 > 0 && rowNode.level == 0){\r\n <div class=\"flex justify-content-end\">\r\n @for (actionPai of config.actionsPai; track $index) { @if\r\n (getOrExecute(actionPai.visible, rowData) ?? true) {\r\n <kv-button\r\n (onClick)=\"activeItem(rowData); actionPai.command($event)\"\r\n [icon]=\"actionPai.icon\"\r\n [severity]=\"actionPai.severity || 'tertiary'\"\r\n />\r\n } }\r\n </div>\r\n }\r\n </td>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"emptymessage\">\r\n <tr>\r\n <td\r\n [attr.colspan]=\"config.columns.length + 1\"\r\n style=\"text-align: center\"\r\n >\r\n {{ textoEmptyMessage }}\r\n </td>\r\n </tr>\r\n </ng-template>\r\n </p-treeTable>\r\n</div>\r\n\r\n<div\r\n *ngIf=\"treeTableDraggable\"\r\n cdkDropList\r\n class=\"example-list\"\r\n (cdkDropListDropped)=\"drop($event)\"\r\n>\r\n <p-treeTable\r\n #tt\r\n [value]=\"dataSource\"\r\n [columns]=\"config.columns\"\r\n [resizableColumns]=\"true\"\r\n [tableStyle]=\"{ 'min-width': '50rem' }\"\r\n [resizableColumns]=\"true\"\r\n [paginator]=\"paginator\"\r\n [rows]=\"rows\"\r\n [pageLinks]=\"pageLinks\"\r\n [totalRecords]=\"totalRecords\"\r\n [rowsPerPageOptions]=\"[5, 10, 25, 50]\"\r\n [showFirstLastIcon]=\"tamanhoTela > 960 ? true : false\"\r\n [pageLinks]=\"tamanhoTela > 960 ? 2 : 1\"\r\n [styleClass]=\"gridLines ? 'p-treetable-gridlines' : ''\"\r\n [(selection)]=\"selectedItems\"\r\n [lazy]=\"config.lazy\"\r\n (onLazyLoad)=\"paginate($event)\"\r\n currentPageReportTemplate=\"{first} - {last} de {{ totalRecords }}\"\r\n >\r\n <ng-template pTemplate=\"caption\" *ngIf=\"config.enableCation\">\r\n <div\r\n class=\"flex flex-row flex-wrap justify-content-between align-items-center grid formgrid p-fluid col-12 m-0\"\r\n style=\"background-color: #eaeaea\"\r\n >\r\n <div class=\"col-12 flex flex-column\">\r\n <div *ngIf=\"config.title\" class=\"text-md font-bold my-3\">\r\n {{ config.title }}\r\n </div>\r\n <div *ngIf=\"config.subtitle\" class=\"text-sm mb-4 font-medium\">\r\n {{ config.subtitle }}\r\n </div>\r\n </div>\r\n\r\n <div\r\n class=\"flex flex-row align-items-center col-10 p-0 md:col-6 lg:col-4 justify-content-center {{\r\n tamanhoTela < 768 ? '' : 'input-search'\r\n }}\"\r\n >\r\n <span *ngIf=\"config.enableFilter\" class=\"p-input-icon-left\">\r\n <i class=\"pi pi-search\"></i>\r\n\r\n <input\r\n pInputText\r\n pAutoFocus\r\n [autofocus]=\"true\"\r\n type=\"text\"\r\n (input)=\"onGlobalFilter(tt, $event)\"\r\n placeholder=\"Pesquisar...\"\r\n class=\"h-2rem\"\r\n #inputBusca\r\n />\r\n </span>\r\n </div>\r\n\r\n <div class=\"flex flex-row col-1 justify-content-end p-0\">\r\n <div class=\"flex flex-row gap-2 btns-options\">\r\n @for (action of config.actionsLote; track $index) {\r\n @if((selectedItems.length > 0 || action.showAcoesLote) &&\r\n exibirCampo(action, this.action)) {\r\n <kv-button\r\n (onClick)=\"action?.command(); activeItemLote(selectedItems)\"\r\n [pTooltip]=\"getOrExecute(action.tooltip, selectedItems)\"\r\n [tooltipPosition]=\"'bottom'\"\r\n [disabled]=\"getOrExecute(action.disabled, selectedItems) || false\"\r\n [icon]=\"getOrExecute(action.icon, selectedItems)\"\r\n [severity]=\"action.severity || 'tertiary'\"\r\n />\r\n } }\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n @if(showHeader){\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n @for(col of columns; track $index){\r\n <th\r\n [ttSortableColumn]=\"col.field\"\r\n [ttSortableColumnDisabled]=\"col.sortable === false\"\r\n class=\"text-sm\"\r\n [style.width]=\"col.width\"\r\n >\r\n <div>\r\n <div [ngClass]=\"{ flex: $index == 0, 'gap-3': $index == 0 }\">\r\n <div *ngIf=\"$index == 0 && config.enableSelect\">\r\n <p-treeTableHeaderCheckbox\r\n (click)=\"activeItemLote(selectedItems)\"\r\n />\r\n </div>\r\n \r\n <div class=\"flex flex-row align-items-center {{ align(col) }}\">\r\n <span>{{ col.header }}</span>\r\n \r\n @if(col.sortable) {\r\n <p-treeTableSortIcon [field]=\"col.field\" />\r\n \r\n }\r\n \r\n <span\r\n *ngIf=\"col.headerTooltip\"\r\n class=\"material-symbols-outlined flex align-items-center\"\r\n [pTooltip]=\"col.headerTooltip\"\r\n >info</span\r\n >\r\n </div>\r\n </div>\r\n </div>\r\n </th>\r\n }\r\n </tr>\r\n </ng-template>\r\n \r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n @for (col of columns; track $index) {\r\n <th\r\n [ttSortableColumn]=\"col.field\"\r\n [ttSortableColumnDisabled]=\"col.sortable === false\"\r\n [style.width]=\"col.width\"\r\n >\r\n <div class=\"flex flex-row align-items-center {{ align(col) }}\">\r\n <span>{{ col.header }}</span>\r\n \r\n @if(col.sortable) {\r\n <p-treeTableSortIcon [field]=\"col.field\" />\r\n \r\n }\r\n </div>\r\n </th>\r\n }\r\n <th [style.width]=\"5\"></th>\r\n </tr>\r\n </ng-template> \r\n }\r\n\r\n\r\n <ng-template\r\n pTemplate=\"body\"\r\n let-rowNode\r\n let-rowData=\"rowData\"\r\n let-columns=\"columns\"\r\n >\r\n <tr\r\n cdkDrag\r\n [cdkDragData]=\"rowNode\"\r\n [ttRow]=\"rowNode\"\r\n (dblclick)=\"doubleClick($event, rowData)\"\r\n [ngClass]=\"{ capitalize: tableCaptalized }\"\r\n >\r\n @for(col of columns; track $index){\r\n <td\r\n [style.position]=\"rowNode.level !== 0 ? 'sticky' : null\"\r\n [style.left.px]=\"\r\n childrenRecoil && rowNode.level !== 0 ? rowNode.level * 30 : null\r\n \"\r\n >\r\n <div class=\"flex flex-row {{ align(col) }}\">\r\n <div\r\n class=\"w-full-h-full flex align-items-center\"\r\n *ngIf=\"$index == 0\"\r\n \r\n >\r\n \r\n <p-treeTableToggler \r\n class=\"hiddenVisible\" \r\n [rowNode]=\"rowNode\"\r\n />\r\n\r\n @if(config.enableSelect) {\r\n <p-treeTableCheckbox\r\n [disabled]=\"isDisabledCheckbox(rowData, rowNode)\"\r\n (click)=\"activeItemLote(selectedItems)\"\r\n [value]=\"rowNode\"\r\n [ngStyle]=\"{\r\n 'display': isSelectEnabled(rowData, rowNode) ? 'block' : 'none',\r\n 'margin-left': config.visibleCheckboxFunction ? '-34px' : '0px'\r\n }\"\r\n />\r\n }\r\n \r\n </div>\r\n\r\n <div class=\"flex flex-row align-items-center\">\r\n <div\r\n class=\"flex flex-row align-items-center justify-content-center gap-2\"\r\n >\r\n @if(col.tagColor) {\r\n <div\r\n class=\"tag\"\r\n [pTooltip]=\"\r\n col.tooltipTag &&\r\n col.tooltipTag(rowData, col, rowData[col.field])\r\n \"\r\n [style.background-color]=\"\r\n col.tagColor(rowData, col, rowData[col.field])\r\n \"\r\n ></div>\r\n\r\n }\r\n\r\n <i\r\n *ngIf=\"col.boolean\"\r\n class=\"pi {{\r\n rowData[col.field] ? 'pi-check text-green-300' : ''\r\n }}\"\r\n style=\"font-size: 1.1rem\"\r\n ></i>\r\n\r\n <div class=\"flex flex-column\" *ngIf=\"!col.boolean\">\r\n <span class=\"m-0\">{{ rowData[col.field] }}</span>\r\n\r\n <p *ngIf=\"col.subtitle\" class=\"m-0 text-xs font-semibold\">\r\n {{ rowData[col.subtitle] }}\r\n </p>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <span *ngIf=\"col.template && validateShowTemplate(rowNode, col)\">\r\n <ng-container\r\n *ngIf=\"getCustomTemplate(col.template.name)\"\r\n [ngTemplateOutlet]=\"getCustomTemplate(col.template.name)\"\r\n [ngTemplateOutletContext]=\"{ $implicit: rowData }\"\r\n >\r\n </ng-container>\r\n </span>\r\n </td>\r\n }\r\n\r\n <td\r\n style=\"border-left: none; text-align: end\"\r\n *ngIf=\"(config.actions?.length ?? 0 > 0) || config.actionsPai\"\r\n [style.borderRight]=\"rowNode.level === 0 ? 'none' : ''\"\r\n [style.borderLeft]=\"rowNode.level === 0 ? 'none' : ''\"\r\n >\r\n <div\r\n *ngIf=\"\r\n (config.actions?.length ?? 0 > 0) &&\r\n validateActionPosition(rowNode)\r\n \"\r\n >\r\n <span\r\n class=\"material-symbols-outlined cursor-pointer icon-more-horiz p-1\"\r\n style=\"font-size: 25px\"\r\n (click)=\"menu.toggle($event); activeItem(rowData)\"\r\n >\r\n more_horiz\r\n </span>\r\n\r\n @for(action of config.actions; track $index) {\r\n {{ criarMenusModal(rowData) }}\r\n }\r\n\r\n <p-menu\r\n #menu\r\n [popup]=\"true\"\r\n [model]=\"menuItems\"\r\n appendTo=\"body\"\r\n ></p-menu>\r\n </div>\r\n\r\n @if(config.actionsPai?.length ?? 0 > 0 && rowNode.level == 0){\r\n <div class=\"flex justify-content-end\">\r\n @for (actionPai of config.actionsPai; track $index) {\r\n @if(getOrExecute(actionPai.visible, rowData) ?? true) {\r\n <kv-button\r\n (onClick)=\"activeItem(rowData); actionPai.command($event)\"\r\n [icon]=\"actionPai.icon\"\r\n [severity]=\"actionPai.severity || 'tertiary'\"\r\n />\r\n } }\r\n </div>\r\n }\r\n </td>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"emptymessage\">\r\n <tr>\r\n <td\r\n [attr.colspan]=\"config.columns.length + 1\"\r\n style=\"text-align: center\"\r\n >\r\n {{ textoEmptyMessage }}\r\n </td>\r\n </tr>\r\n </ng-template>\r\n </p-treeTable>\r\n</div>\r\n", styles: ["::ng-deep .p-treetable .p-treetable-tbody>tr>td{padding:.4rem}::ng-deep .p-treetable .p-treetable-header{padding:0rem}span{font-size:14px}:host ::ng-deep .p-treetable table{table-layout:auto!important}.icon-more-horiz:hover,.icon-more-horiz:focus{color:#5e5e5e;transform:scale(1.2);transition:color .3s,transform .3s;background-color:#eaeaea;border-radius:50%}::ng-deep .p-treetable .p-treetable-thead>tr>th{background-color:#eaeaea}.tag{width:5px;height:20px;border-radius:.25rem}.cdk-drag-preview{display:flex;align-items:center;justify-content:space-between;border-radius:10px!important}.cdk-drop-list-dragging{cursor:grabbing}:host ::ng-deep .cdk-drop-list-dragging .cdk-drag{transition:transform .25s cubic-bezier(0,0,.2,1)}:host ::ng-deep .cdk-drag-animating{transition:transform .3s cubic-bezier(0,0,.2,1)}::ng-deep svg.p-icon{width:.7rem;height:1rem}::ng-deep .p-checkbox .p-checkbox-box.p-highlight{border-color:#004172;background:#004172}::ng-deep .p-checkbox .p-checkbox-box.p-highlight:hover{background-color:#002542}::ng-deep .p-checkbox .p-checkbox-box.p-highlight:active{background-color:#002542}::ng-deep .p-checkbox .p-checkbox-box.p-highlight:disabled{background-color:#002542;opacity:.4;cursor:auto}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i1$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i5$2.AutoFocus, selector: "[pAutoFocus]", inputs: ["autofocus"] }, { kind: "directive", type: i6.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "directive", type: i9.InputText, selector: "[pInputText]", inputs: ["variant"] }, { kind: "component", type: i5.Menu, selector: "p-menu", inputs: ["model", "popup", "style", "styleClass", "appendTo", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "ariaLabel", "ariaLabelledBy", "id", "tabindex"], outputs: ["onShow", "onHide", "onBlur", "onFocus"] }, { kind: "directive", type: i7.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i7.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "component", type: i8$2.TreeTable, selector: "p-treeTable", inputs: ["columns", "style", "styleClass", "tableStyle", "tableStyleClass", "autoLayout", "lazy", "lazyLoadOnInit", "paginator", "rows", "first", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "customSort", "selectionMode", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "compareSelectionBy", "rowHover", "loading", "loadingIcon", "showLoader", "scrollable", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "frozenColumns", "resizableColumns", "columnResizeMode", "reorderableColumns", "contextMenu", "rowTrackBy", "filters", "globalFilterFields", "filterDelay", "filterMode", "filterLocale", "paginatorLocale", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "value", "virtualRowHeight", "selectionKeys"], outputs: ["selectionChange", "contextMenuSelectionChange", "onFilter", "onNodeExpand", "onNodeCollapse", "onPage", "onSort", "onLazyLoad", "sortFunction", "onColResize", "onColReorder", "onNodeSelect", "onNodeUnselect", "onContextMenuSelect", "onHeaderCheckboxToggle", "onEditInit", "onEditComplete", "onEditCancel", "selectionKeysChange"] }, { kind: "component", type: i8$2.TreeTableToggler, selector: "p-treeTableToggler", inputs: ["rowNode"] }, { kind: "directive", type: i8$2.TTSortableColumn, selector: "[ttSortableColumn]", inputs: ["ttSortableColumn", "ttSortableColumnDisabled"] }, { kind: "component", type: i8$2.TTSortIcon, selector: "p-treeTableSortIcon", inputs: ["field", "ariaLabelDesc", "ariaLabelAsc"] }, { kind: "directive", type: i8$2.TTRow, selector: "[ttRow]", inputs: ["ttRow"] }, { kind: "component", type: i8$2.TTCheckbox, selector: "p-treeTableCheckbox", inputs: ["disabled", "value"] }, { kind: "component", type: i8$2.TTHeaderCheckbox, selector: "p-treeTableHeaderCheckbox" }, { kind: "component", type: KvButtonComponent, selector: "kv-button", inputs: ["label", "icon", "loading", "disabled", "severity", "size", "fullWidth"], outputs: ["onClick"] }] }); }
|
|
2165
2166
|
}
|
|
2166
2167
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvTreetableComponent, decorators: [{
|
|
2167
2168
|
type: Component,
|
|
2168
|
-
args: [{ selector: 'kv-tree-table', template: "<div *ngIf=\"!treeTableDraggable\">\r\n <p-treeTable\r\n #tt\r\n [value]=\"dataSource\"\r\n [columns]=\"config.columns\"\r\n [resizableColumns]=\"true\"\r\n [tableStyle]=\"{ 'min-width': '50rem' }\"\r\n [resizableColumns]=\"true\"\r\n [paginator]=\"paginator\"\r\n [rows]=\"rows\"\r\n [totalRecords]=\"totalRecords\"\r\n [rowsPerPageOptions]=\"[5, 10, 25, 50]\"\r\n [showFirstLastIcon]=\"tamanhoTela > 960 ? true : false\"\r\n [pageLinks]=\"tamanhoTela > 960 ? 2 : 1\"\r\n [styleClass]=\"gridLines ? 'p-treetable-gridlines' : ''\"\r\n [(selection)]=\"selectedItems\"\r\n [lazy]=\"config.lazy\"\r\n (onLazyLoad)=\"paginate($event)\"\r\n (onNodeSelect)=\"onNodeSelected($event)\"\r\n (onNodeUnselect)=\"onNodeUnselected($event)\"\r\n [showCurrentPageReport]=\"true\"\r\n currentPageReportTemplate=\"{first} - {last} de {totalRecords}\"\r\n >\r\n <ng-template pTemplate=\"caption\" *ngIf=\"config.enableCation\">\r\n <div\r\n class=\"flex flex-row flex-wrap justify-content-between align-items-center grid formgrid p-fluid col-12 m-0\"\r\n style=\"background-color: #eaeaea\"\r\n >\r\n <div class=\"col-12 flex flex-column\">\r\n <div *ngIf=\"config.title\" class=\"text-md font-bold my-3\">\r\n {{ config.title }}\r\n </div>\r\n <div *ngIf=\"config.subtitle\" class=\"text-sm mb-4 font-medium\">\r\n {{ config.subtitle }}\r\n </div>\r\n </div>\r\n\r\n <div\r\n class=\"flex flex-row align-items-center col-10 p-0 md:col-6 lg:col-4 justify-content-center {{\r\n tamanhoTela < 768 ? '' : 'input-search'\r\n }}\"\r\n >\r\n <span *ngIf=\"config.enableFilter\" class=\"p-input-icon-left\">\r\n <i class=\"pi pi-search\"></i>\r\n\r\n <input\r\n pInputText\r\n pAutoFocus\r\n [autofocus]=\"true\"\r\n type=\"text\"\r\n (input)=\"onGlobalFilter(tt, $event)\"\r\n placeholder=\"Pesquisar...\"\r\n class=\"h-2rem\"\r\n #inputBusca\r\n />\r\n </span>\r\n </div>\r\n\r\n <div class=\"flex flex-row col-1 justify-content-end p-0\">\r\n <div class=\"flex flex-row gap-2 btns-options\">\r\n @for (action of config.actionsLote; track $index) {\r\n @if((selectedItems.length > 0 || action.showAcoesLote) &&\r\n exibirCampo(action, this.action)) {\r\n <kv-button\r\n (onClick)=\"action?.command(); activeItemLote(selectedItems)\"\r\n [pTooltip]=\"getOrExecute(action.tooltip, selectedItems)\"\r\n [tooltipPosition]=\"'bottom'\"\r\n [disabled]=\"getOrExecute(action.disabled, selectedItems) || false\"\r\n [icon]=\"getOrExecute(action.icon, selectedItems)\"\r\n [severity]=\"action.severity || 'tertiary'\"\r\n />\r\n } }\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n @for(col of columns; track $index){\r\n <th\r\n [ttSortableColumn]=\"col.field\"\r\n [ttSortableColumnDisabled]=\"col.sortable === false\"\r\n class=\"text-sm\"\r\n [style.width]=\"col.width\"\r\n >\r\n <div>\r\n <div [ngClass]=\"{ flex: $index == 0, 'gap-3': $index == 0 }\">\r\n <div *ngIf=\"$index == 0 && config.enableSelect\">\r\n <p-treeTableHeaderCheckbox\r\n (click)=\"activeItemLote(selectedItems)\"\r\n />\r\n </div>\r\n\r\n <div class=\"flex flex-row align-items-center {{ align(col) }}\">\r\n <span>{{ col.header }}</span>\r\n\r\n @if(col.sortable) {\r\n <p-treeTableSortIcon [field]=\"col.field\" />\r\n\r\n }\r\n\r\n <span\r\n *ngIf=\"col.headerTooltip\"\r\n class=\"material-symbols-outlined flex align-items-center\"\r\n [pTooltip]=\"col.headerTooltip\"\r\n >info</span\r\n >\r\n </div>\r\n </div>\r\n </div>\r\n </th>\r\n @if (config.actions?.length ?? 0 > 0) {\r\n <th [style.width]=\"5\"></th>\r\n } }\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n @for (col of columns; track $index) {\r\n <th\r\n [ttSortableColumn]=\"col.field\"\r\n [ttSortableColumnDisabled]=\"col.sortable === false\"\r\n [style.width]=\"col.width\"\r\n >\r\n <div class=\"flex flex-row align-items-center {{ align(col) }}\">\r\n <span>{{ col.header }}</span>\r\n\r\n @if(col.sortable) {\r\n <p-treeTableSortIcon [field]=\"col.field\" />\r\n }\r\n </div>\r\n </th>\r\n } @if (config.actions?.length ?? 0 > 0) {\r\n <th [style.width]=\"5\"></th>\r\n }\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template\r\n pTemplate=\"body\"\r\n let-rowNode\r\n let-rowData=\"rowData\"\r\n let-columns=\"columns\"\r\n >\r\n <tr\r\n [ttRow]=\"rowNode\"\r\n (dblclick)=\"doubleClick($event, rowData)\"\r\n [ngClass]=\"{ capitalize: tableCaptalized }\"\r\n >\r\n @for(col of columns; track $index){\r\n <td\r\n [style.position]=\"rowNode.level !== 0 ? 'sticky' : null\"\r\n [style.left.px]=\"\r\n childrenRecoil && rowNode.level !== 0 ? rowNode.level * 30 : null\r\n \"\r\n [style.borderRight]=\"rowNode.level === 0 ? 'none' : ''\"\r\n [style.borderLeft]=\"\r\n rowNode.level === 0 && col.field != config.columns[0].field\r\n ? 'none'\r\n : ''\r\n \"\r\n >\r\n <div class=\"flex flex-row {{ align(col) }}\">\r\n <div\r\n class=\"w-full-h-full flex align-items-center\"\r\n *ngIf=\"$index == 0\"\r\n >\r\n <p-treeTableToggler class=\"hiddenVisible\" [rowNode]=\"rowNode\" />\r\n\r\n @if(config.enableSelect) {\r\n <p-treeTableCheckbox\r\n [disabled]=\"isDisabledCheckbox(rowData, rowNode)\"\r\n (click)=\"activeItemLote(selectedItems)\"\r\n [value]=\"rowNode\"\r\n [ngStyle]=\"{\r\n 'display': isSelectEnabled(rowData, rowNode) ? 'block' : 'none',\r\n 'margin-left': config.visibleCheckboxFunction ? '-34px' : '0px'\r\n }\"\r\n />\r\n }\r\n\r\n </div>\r\n\r\n <div class=\"flex flex-row align-items-center\">\r\n <div\r\n class=\"flex flex-row align-items-center justify-content-center gap-2\"\r\n >\r\n @if(col.tagColor) {\r\n <div\r\n class=\"tag\"\r\n [pTooltip]=\"\r\n col.tooltipTag &&\r\n col.tooltipTag(rowData, col, rowData[col.field])\r\n \"\r\n [style.background-color]=\"\r\n col.tagColor(rowData, col, rowData[col.field])\r\n \"\r\n ></div>\r\n\r\n }\r\n <i\r\n *ngIf=\"col.boolean\"\r\n class=\"pi {{\r\n rowData[col.field] ? 'pi-check text-green-300' : ''\r\n }}\"\r\n style=\"font-size: 1.1rem\"\r\n ></i>\r\n\r\n <div class=\"flex flex-column\" *ngIf=\"!col.boolean\">\r\n <span class=\"m-0\">{{ rowData[col.field] }}</span>\r\n\r\n <p *ngIf=\"col.subtitle\" class=\"m-0 text-xs font-semibold\">\r\n {{ rowData[col.subtitle] }}\r\n </p>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <span *ngIf=\"col.template && validateShowTemplate(rowNode, col)\">\r\n <ng-container\r\n *ngIf=\"getCustomTemplate(col.template.name)\"\r\n [ngTemplateOutlet]=\"getCustomTemplate(col.template.name)\"\r\n [ngTemplateOutletContext]=\"{ $implicit: rowData }\"\r\n >\r\n </ng-container>\r\n </span>\r\n </td>\r\n }\r\n\r\n <td\r\n style=\"border-left: none; text-align: end\"\r\n *ngIf=\"(config.actions?.length ?? 0 > 0) || config.actionsPai\"\r\n >\r\n <div\r\n *ngIf=\"\r\n (config.actions?.length ?? 0 > 0) &&\r\n validateActionPosition(rowNode)\r\n \"\r\n >\r\n <span\r\n class=\"material-symbols-outlined cursor-pointer icon-more-horiz p-1\"\r\n style=\"font-size: 25px\"\r\n (click)=\"menu.toggle($event); activeItem(rowData)\"\r\n >\r\n more_horiz\r\n </span>\r\n\r\n @for(action of config.actions; track $index) {\r\n {{ criarMenusModal(rowData) }}\r\n }\r\n\r\n <p-menu\r\n #menu\r\n [popup]=\"true\"\r\n [model]=\"menuItems\"\r\n appendTo=\"body\"\r\n ></p-menu>\r\n </div>\r\n\r\n @if(config.actionsPai?.length ?? 0 > 0 && rowNode.level == 0){\r\n <div class=\"flex justify-content-end\">\r\n @for (actionPai of config.actionsPai; track $index) { @if\r\n (getOrExecute(actionPai.visible, rowData) ?? true) {\r\n <kv-button\r\n (onClick)=\"activeItem(rowData); actionPai.command($event)\"\r\n [icon]=\"actionPai.icon\"\r\n [severity]=\"actionPai.severity || 'tertiary'\"\r\n />\r\n } }\r\n </div>\r\n }\r\n </td>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"emptymessage\">\r\n <tr>\r\n <td\r\n [attr.colspan]=\"config.columns.length + 1\"\r\n style=\"text-align: center\"\r\n >\r\n {{ textoEmptyMessage }}\r\n </td>\r\n </tr>\r\n </ng-template>\r\n </p-treeTable>\r\n</div>\r\n\r\n<div\r\n *ngIf=\"treeTableDraggable\"\r\n cdkDropList\r\n class=\"example-list\"\r\n (cdkDropListDropped)=\"drop($event)\"\r\n>\r\n <p-treeTable\r\n #tt\r\n [value]=\"dataSource\"\r\n [columns]=\"config.columns\"\r\n [resizableColumns]=\"true\"\r\n [tableStyle]=\"{ 'min-width': '50rem' }\"\r\n [resizableColumns]=\"true\"\r\n [paginator]=\"paginator\"\r\n [rows]=\"rows\"\r\n [pageLinks]=\"pageLinks\"\r\n [totalRecords]=\"totalRecords\"\r\n [rowsPerPageOptions]=\"[5, 10, 25, 50]\"\r\n [showFirstLastIcon]=\"tamanhoTela > 960 ? true : false\"\r\n [pageLinks]=\"tamanhoTela > 960 ? 2 : 1\"\r\n [styleClass]=\"gridLines ? 'p-treetable-gridlines' : ''\"\r\n [(selection)]=\"selectedItems\"\r\n [lazy]=\"config.lazy\"\r\n (onLazyLoad)=\"paginate($event)\"\r\n currentPageReportTemplate=\"{first} - {last} de {{ totalRecords }}\"\r\n >\r\n <ng-template pTemplate=\"caption\" *ngIf=\"config.enableCation\">\r\n <div\r\n class=\"flex flex-row flex-wrap justify-content-between align-items-center grid formgrid p-fluid col-12 m-0\"\r\n style=\"background-color: #eaeaea\"\r\n >\r\n <div class=\"col-12 flex flex-column\">\r\n <div *ngIf=\"config.title\" class=\"text-md font-bold my-3\">\r\n {{ config.title }}\r\n </div>\r\n <div *ngIf=\"config.subtitle\" class=\"text-sm mb-4 font-medium\">\r\n {{ config.subtitle }}\r\n </div>\r\n </div>\r\n\r\n <div\r\n class=\"flex flex-row align-items-center col-10 p-0 md:col-6 lg:col-4 justify-content-center {{\r\n tamanhoTela < 768 ? '' : 'input-search'\r\n }}\"\r\n >\r\n <span *ngIf=\"config.enableFilter\" class=\"p-input-icon-left\">\r\n <i class=\"pi pi-search\"></i>\r\n\r\n <input\r\n pInputText\r\n pAutoFocus\r\n [autofocus]=\"true\"\r\n type=\"text\"\r\n (input)=\"onGlobalFilter(tt, $event)\"\r\n placeholder=\"Pesquisar...\"\r\n class=\"h-2rem\"\r\n #inputBusca\r\n />\r\n </span>\r\n </div>\r\n\r\n <div class=\"flex flex-row col-1 justify-content-end p-0\">\r\n <div class=\"flex flex-row gap-2 btns-options\">\r\n @for (action of config.actionsLote; track $index) {\r\n @if((selectedItems.length > 0 || action.showAcoesLote) &&\r\n exibirCampo(action, this.action)) {\r\n <kv-button\r\n (onClick)=\"action?.command(); activeItemLote(selectedItems)\"\r\n [pTooltip]=\"getOrExecute(action.tooltip, selectedItems)\"\r\n [tooltipPosition]=\"'bottom'\"\r\n [disabled]=\"getOrExecute(action.disabled, selectedItems) || false\"\r\n [icon]=\"getOrExecute(action.icon, selectedItems)\"\r\n [severity]=\"action.severity || 'tertiary'\"\r\n />\r\n } }\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n @for(col of columns; track $index){\r\n <th\r\n [ttSortableColumn]=\"col.field\"\r\n [ttSortableColumnDisabled]=\"col.sortable === false\"\r\n class=\"text-sm\"\r\n [style.width]=\"col.width\"\r\n >\r\n <div>\r\n <div [ngClass]=\"{ flex: $index == 0, 'gap-3': $index == 0 }\">\r\n <div *ngIf=\"$index == 0 && config.enableSelect\">\r\n <p-treeTableHeaderCheckbox\r\n (click)=\"activeItemLote(selectedItems)\"\r\n />\r\n </div>\r\n\r\n <div class=\"flex flex-row align-items-center {{ align(col) }}\">\r\n <span>{{ col.header }}</span>\r\n\r\n @if(col.sortable) {\r\n <p-treeTableSortIcon [field]=\"col.field\" />\r\n\r\n }\r\n\r\n <span\r\n *ngIf=\"col.headerTooltip\"\r\n class=\"material-symbols-outlined flex align-items-center\"\r\n [pTooltip]=\"col.headerTooltip\"\r\n >info</span\r\n >\r\n </div>\r\n </div>\r\n </div>\r\n </th>\r\n }\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n @for (col of columns; track $index) {\r\n <th\r\n [ttSortableColumn]=\"col.field\"\r\n [ttSortableColumnDisabled]=\"col.sortable === false\"\r\n [style.width]=\"col.width\"\r\n >\r\n <div class=\"flex flex-row align-items-center {{ align(col) }}\">\r\n <span>{{ col.header }}</span>\r\n\r\n @if(col.sortable) {\r\n <p-treeTableSortIcon [field]=\"col.field\" />\r\n\r\n }\r\n </div>\r\n </th>\r\n }\r\n <th [style.width]=\"5\"></th>\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template\r\n pTemplate=\"body\"\r\n let-rowNode\r\n let-rowData=\"rowData\"\r\n let-columns=\"columns\"\r\n >\r\n <tr\r\n cdkDrag\r\n [cdkDragData]=\"rowNode\"\r\n [ttRow]=\"rowNode\"\r\n (dblclick)=\"doubleClick($event, rowData)\"\r\n [ngClass]=\"{ capitalize: tableCaptalized }\"\r\n >\r\n @for(col of columns; track $index){\r\n <td\r\n [style.position]=\"rowNode.level !== 0 ? 'sticky' : null\"\r\n [style.left.px]=\"\r\n childrenRecoil && rowNode.level !== 0 ? rowNode.level * 30 : null\r\n \"\r\n >\r\n <div class=\"flex flex-row {{ align(col) }}\">\r\n <div\r\n class=\"w-full-h-full flex align-items-center\"\r\n *ngIf=\"$index == 0\"\r\n \r\n >\r\n \r\n <p-treeTableToggler \r\n class=\"hiddenVisible\" \r\n [rowNode]=\"rowNode\"\r\n />\r\n\r\n @if(config.enableSelect) {\r\n <p-treeTableCheckbox\r\n [disabled]=\"isDisabledCheckbox(rowData, rowNode)\"\r\n (click)=\"activeItemLote(selectedItems)\"\r\n [value]=\"rowNode\"\r\n [ngStyle]=\"{\r\n 'display': isSelectEnabled(rowData, rowNode) ? 'block' : 'none',\r\n 'margin-left': config.visibleCheckboxFunction ? '-34px' : '0px'\r\n }\"\r\n />\r\n }\r\n \r\n </div>\r\n\r\n <div class=\"flex flex-row align-items-center\">\r\n <div\r\n class=\"flex flex-row align-items-center justify-content-center gap-2\"\r\n >\r\n @if(col.tagColor) {\r\n <div\r\n class=\"tag\"\r\n [pTooltip]=\"\r\n col.tooltipTag &&\r\n col.tooltipTag(rowData, col, rowData[col.field])\r\n \"\r\n [style.background-color]=\"\r\n col.tagColor(rowData, col, rowData[col.field])\r\n \"\r\n ></div>\r\n\r\n }\r\n\r\n <i\r\n *ngIf=\"col.boolean\"\r\n class=\"pi {{\r\n rowData[col.field] ? 'pi-check text-green-300' : ''\r\n }}\"\r\n style=\"font-size: 1.1rem\"\r\n ></i>\r\n\r\n <div class=\"flex flex-column\" *ngIf=\"!col.boolean\">\r\n <span class=\"m-0\">{{ rowData[col.field] }}</span>\r\n\r\n <p *ngIf=\"col.subtitle\" class=\"m-0 text-xs font-semibold\">\r\n {{ rowData[col.subtitle] }}\r\n </p>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <span *ngIf=\"col.template && validateShowTemplate(rowNode, col)\">\r\n <ng-container\r\n *ngIf=\"getCustomTemplate(col.template.name)\"\r\n [ngTemplateOutlet]=\"getCustomTemplate(col.template.name)\"\r\n [ngTemplateOutletContext]=\"{ $implicit: rowData }\"\r\n >\r\n </ng-container>\r\n </span>\r\n </td>\r\n }\r\n\r\n <td\r\n style=\"border-left: none; text-align: end\"\r\n *ngIf=\"(config.actions?.length ?? 0 > 0) || config.actionsPai\"\r\n [style.borderRight]=\"rowNode.level === 0 ? 'none' : ''\"\r\n [style.borderLeft]=\"rowNode.level === 0 ? 'none' : ''\"\r\n >\r\n <div\r\n *ngIf=\"\r\n (config.actions?.length ?? 0 > 0) &&\r\n validateActionPosition(rowNode)\r\n \"\r\n >\r\n <span\r\n class=\"material-symbols-outlined cursor-pointer icon-more-horiz p-1\"\r\n style=\"font-size: 25px\"\r\n (click)=\"menu.toggle($event); activeItem(rowData)\"\r\n >\r\n more_horiz\r\n </span>\r\n\r\n @for(action of config.actions; track $index) {\r\n {{ criarMenusModal(rowData) }}\r\n }\r\n\r\n <p-menu\r\n #menu\r\n [popup]=\"true\"\r\n [model]=\"menuItems\"\r\n appendTo=\"body\"\r\n ></p-menu>\r\n </div>\r\n\r\n @if(config.actionsPai?.length ?? 0 > 0 && rowNode.level == 0){\r\n <div class=\"flex justify-content-end\">\r\n @for (actionPai of config.actionsPai; track $index) {\r\n @if(getOrExecute(actionPai.visible, rowData) ?? true) {\r\n <kv-button\r\n (onClick)=\"activeItem(rowData); actionPai.command($event)\"\r\n [icon]=\"actionPai.icon\"\r\n [severity]=\"actionPai.severity || 'tertiary'\"\r\n />\r\n } }\r\n </div>\r\n }\r\n </td>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"emptymessage\">\r\n <tr>\r\n <td\r\n [attr.colspan]=\"config.columns.length + 1\"\r\n style=\"text-align: center\"\r\n >\r\n {{ textoEmptyMessage }}\r\n </td>\r\n </tr>\r\n </ng-template>\r\n </p-treeTable>\r\n</div>\r\n", styles: ["::ng-deep .p-treetable .p-treetable-tbody>tr>td{padding:.4rem}::ng-deep .p-treetable .p-treetable-header{padding:0rem}span{font-size:14px}:host ::ng-deep .p-treetable table{table-layout:auto!important}.icon-more-horiz:hover,.icon-more-horiz:focus{color:#5e5e5e;transform:scale(1.2);transition:color .3s,transform .3s;background-color:#eaeaea;border-radius:50%}::ng-deep .p-treetable .p-treetable-thead>tr>th{background-color:#eaeaea}.tag{width:5px;height:20px;border-radius:.25rem}.cdk-drag-preview{display:flex;align-items:center;justify-content:space-between;border-radius:10px!important}.cdk-drop-list-dragging{cursor:grabbing}:host ::ng-deep .cdk-drop-list-dragging .cdk-drag{transition:transform .25s cubic-bezier(0,0,.2,1)}:host ::ng-deep .cdk-drag-animating{transition:transform .3s cubic-bezier(0,0,.2,1)}::ng-deep svg.p-icon{width:.7rem;height:1rem}::ng-deep .p-checkbox .p-checkbox-box.p-highlight{border-color:#004172;background:#004172}::ng-deep .p-checkbox .p-checkbox-box.p-highlight:hover{background-color:#002542}::ng-deep .p-checkbox .p-checkbox-box.p-highlight:active{background-color:#002542}::ng-deep .p-checkbox .p-checkbox-box.p-highlight:disabled{background-color:#002542;opacity:.4;cursor:auto}\n"] }]
|
|
2169
|
+
args: [{ selector: 'kv-tree-table', template: "<div *ngIf=\"!treeTableDraggable\">\r\n <p-treeTable\r\n #tt\r\n [value]=\"dataSource\"\r\n [columns]=\"config.columns\"\r\n [resizableColumns]=\"true\"\r\n [tableStyle]=\"{ 'min-width': '50rem' }\"\r\n [resizableColumns]=\"true\"\r\n [paginator]=\"paginator\"\r\n [rows]=\"rows\"\r\n [totalRecords]=\"totalRecords\"\r\n [rowsPerPageOptions]=\"[5, 10, 25, 50]\"\r\n [showFirstLastIcon]=\"tamanhoTela > 960 ? true : false\"\r\n [pageLinks]=\"tamanhoTela > 960 ? 2 : 1\"\r\n [styleClass]=\"gridLines ? 'p-treetable-gridlines' : ''\"\r\n [(selection)]=\"selectedItems\"\r\n [lazy]=\"config.lazy\"\r\n (onLazyLoad)=\"paginate($event)\"\r\n (onNodeSelect)=\"onNodeSelected($event)\"\r\n (onNodeUnselect)=\"onNodeUnselected($event)\"\r\n [showCurrentPageReport]=\"true\"\r\n currentPageReportTemplate=\"{first} - {last} de {totalRecords}\"\r\n >\r\n <ng-template pTemplate=\"caption\" *ngIf=\"config.enableCation\">\r\n <div\r\n class=\"flex flex-row flex-wrap justify-content-between align-items-center grid formgrid p-fluid col-12 m-0\"\r\n style=\"background-color: #eaeaea\"\r\n >\r\n <div class=\"col-12 flex flex-column\">\r\n <div *ngIf=\"config.title\" class=\"text-md font-bold my-3\">\r\n {{ config.title }}\r\n </div>\r\n <div *ngIf=\"config.subtitle\" class=\"text-sm mb-4 font-medium\">\r\n {{ config.subtitle }}\r\n </div>\r\n </div>\r\n\r\n <div\r\n class=\"flex flex-row align-items-center col-10 p-0 md:col-6 lg:col-4 justify-content-center {{\r\n tamanhoTela < 768 ? '' : 'input-search'\r\n }}\"\r\n >\r\n <span *ngIf=\"config.enableFilter\" class=\"p-input-icon-left\">\r\n <i class=\"pi pi-search\"></i>\r\n\r\n <input\r\n pInputText\r\n pAutoFocus\r\n [autofocus]=\"true\"\r\n type=\"text\"\r\n (input)=\"onGlobalFilter(tt, $event)\"\r\n placeholder=\"Pesquisar...\"\r\n class=\"h-2rem\"\r\n #inputBusca\r\n />\r\n </span>\r\n </div>\r\n\r\n <div class=\"flex flex-row col-1 justify-content-end p-0\">\r\n <div class=\"flex flex-row gap-2 btns-options\">\r\n @for (action of config.actionsLote; track $index) {\r\n @if((selectedItems.length > 0 || action.showAcoesLote) &&\r\n exibirCampo(action, this.action)) {\r\n <kv-button\r\n (onClick)=\"action?.command(); activeItemLote(selectedItems)\"\r\n [pTooltip]=\"getOrExecute(action.tooltip, selectedItems)\"\r\n [tooltipPosition]=\"'bottom'\"\r\n [disabled]=\"getOrExecute(action.disabled, selectedItems) || false\"\r\n [icon]=\"getOrExecute(action.icon, selectedItems)\"\r\n [severity]=\"action.severity || 'tertiary'\"\r\n />\r\n } }\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n @if(showHeader){\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n @for(col of columns; track $index){\r\n <th\r\n [ttSortableColumn]=\"col.field\"\r\n [ttSortableColumnDisabled]=\"col.sortable === false\"\r\n class=\"text-sm\"\r\n [style.width]=\"col.width\"\r\n >\r\n <div>\r\n <div [ngClass]=\"{ flex: $index == 0, 'gap-3': $index == 0 }\">\r\n <div *ngIf=\"$index == 0 && config.enableSelect\">\r\n <p-treeTableHeaderCheckbox\r\n (click)=\"activeItemLote(selectedItems)\"\r\n />\r\n </div>\r\n \r\n <div class=\"flex flex-row align-items-center {{ align(col) }}\">\r\n <span>{{ col.header }}</span>\r\n \r\n @if(col.sortable) {\r\n <p-treeTableSortIcon [field]=\"col.field\" />\r\n \r\n }\r\n \r\n <span\r\n *ngIf=\"col.headerTooltip\"\r\n class=\"material-symbols-outlined flex align-items-center\"\r\n [pTooltip]=\"col.headerTooltip\"\r\n >info</span\r\n >\r\n </div>\r\n </div>\r\n </div>\r\n </th>\r\n @if (config.actions?.length ?? 0 > 0) {\r\n <th [style.width]=\"5\"></th>\r\n } }\r\n </tr>\r\n </ng-template>\r\n \r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n @for (col of columns; track $index) {\r\n <th\r\n [ttSortableColumn]=\"col.field\"\r\n [ttSortableColumnDisabled]=\"col.sortable === false\"\r\n [style.width]=\"col.width\"\r\n >\r\n <div class=\"flex flex-row align-items-center {{ align(col) }}\">\r\n <span>{{ col.header }}</span>\r\n \r\n @if(col.sortable) {\r\n <p-treeTableSortIcon [field]=\"col.field\" />\r\n }\r\n </div>\r\n </th>\r\n } @if (config.actions?.length ?? 0 > 0) {\r\n <th [style.width]=\"5\"></th>\r\n }\r\n </tr>\r\n </ng-template>\r\n }\r\n\r\n\r\n <ng-template\r\n pTemplate=\"body\"\r\n let-rowNode\r\n let-rowData=\"rowData\"\r\n let-columns=\"columns\"\r\n >\r\n <tr\r\n [ttRow]=\"rowNode\"\r\n (dblclick)=\"doubleClick($event, rowData)\"\r\n [ngClass]=\"{ capitalize: tableCaptalized }\"\r\n >\r\n @for(col of columns; track $index){\r\n <td\r\n [style.position]=\"rowNode.level !== 0 ? 'sticky' : null\"\r\n [style.left.px]=\"\r\n childrenRecoil && rowNode.level !== 0 ? rowNode.level * 30 : null\r\n \"\r\n [style.borderRight]=\"rowNode.level === 0 ? 'none' : ''\"\r\n [style.borderLeft]=\"\r\n rowNode.level === 0 && col.field != config.columns[0].field\r\n ? 'none'\r\n : ''\r\n \"\r\n >\r\n <div class=\"flex flex-row {{ align(col) }}\">\r\n <div\r\n class=\"w-full-h-full flex align-items-center\"\r\n *ngIf=\"$index == 0\"\r\n >\r\n <p-treeTableToggler class=\"hiddenVisible\" [rowNode]=\"rowNode\" />\r\n\r\n @if(config.enableSelect) {\r\n <p-treeTableCheckbox\r\n [disabled]=\"isDisabledCheckbox(rowData, rowNode)\"\r\n (click)=\"activeItemLote(selectedItems)\"\r\n [value]=\"rowNode\"\r\n [ngStyle]=\"{\r\n 'display': isSelectEnabled(rowData, rowNode) ? 'block' : 'none',\r\n 'margin-left': config.visibleCheckboxFunction ? '-34px' : '0px'\r\n }\"\r\n />\r\n }\r\n\r\n </div>\r\n\r\n <div class=\"flex flex-row align-items-center\">\r\n <div\r\n class=\"flex flex-row align-items-center justify-content-center gap-2\"\r\n >\r\n @if(col.tagColor) {\r\n <div\r\n class=\"tag\"\r\n [pTooltip]=\"\r\n col.tooltipTag &&\r\n col.tooltipTag(rowData, col, rowData[col.field])\r\n \"\r\n [style.background-color]=\"\r\n col.tagColor(rowData, col, rowData[col.field])\r\n \"\r\n ></div>\r\n\r\n }\r\n <i\r\n *ngIf=\"col.boolean\"\r\n class=\"pi {{\r\n rowData[col.field] ? 'pi-check text-green-300' : ''\r\n }}\"\r\n style=\"font-size: 1.1rem\"\r\n ></i>\r\n\r\n <div class=\"flex flex-column\" *ngIf=\"!col.boolean\">\r\n <span class=\"m-0\">{{ rowData[col.field] }}</span>\r\n\r\n <p *ngIf=\"col.subtitle\" class=\"m-0 text-xs font-semibold\">\r\n {{ rowData[col.subtitle] }}\r\n </p>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <span *ngIf=\"col.template && validateShowTemplate(rowNode, col)\">\r\n <ng-container\r\n *ngIf=\"getCustomTemplate(col.template.name)\"\r\n [ngTemplateOutlet]=\"getCustomTemplate(col.template.name)\"\r\n [ngTemplateOutletContext]=\"{ $implicit: rowData }\"\r\n >\r\n </ng-container>\r\n </span>\r\n </td>\r\n }\r\n\r\n <td\r\n style=\"border-left: none; text-align: end\"\r\n *ngIf=\"(config.actions?.length ?? 0 > 0) || config.actionsPai\"\r\n >\r\n <div\r\n *ngIf=\"\r\n (config.actions?.length ?? 0 > 0) &&\r\n validateActionPosition(rowNode)\r\n \"\r\n >\r\n <span\r\n class=\"material-symbols-outlined cursor-pointer icon-more-horiz p-1\"\r\n style=\"font-size: 25px\"\r\n (click)=\"menu.toggle($event); activeItem(rowData)\"\r\n >\r\n more_horiz\r\n </span>\r\n\r\n @for(action of config.actions; track $index) {\r\n {{ criarMenusModal(rowData) }}\r\n }\r\n\r\n <p-menu\r\n #menu\r\n [popup]=\"true\"\r\n [model]=\"menuItems\"\r\n appendTo=\"body\"\r\n ></p-menu>\r\n </div>\r\n\r\n @if(config.actionsPai?.length ?? 0 > 0 && rowNode.level == 0){\r\n <div class=\"flex justify-content-end\">\r\n @for (actionPai of config.actionsPai; track $index) { @if\r\n (getOrExecute(actionPai.visible, rowData) ?? true) {\r\n <kv-button\r\n (onClick)=\"activeItem(rowData); actionPai.command($event)\"\r\n [icon]=\"actionPai.icon\"\r\n [severity]=\"actionPai.severity || 'tertiary'\"\r\n />\r\n } }\r\n </div>\r\n }\r\n </td>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"emptymessage\">\r\n <tr>\r\n <td\r\n [attr.colspan]=\"config.columns.length + 1\"\r\n style=\"text-align: center\"\r\n >\r\n {{ textoEmptyMessage }}\r\n </td>\r\n </tr>\r\n </ng-template>\r\n </p-treeTable>\r\n</div>\r\n\r\n<div\r\n *ngIf=\"treeTableDraggable\"\r\n cdkDropList\r\n class=\"example-list\"\r\n (cdkDropListDropped)=\"drop($event)\"\r\n>\r\n <p-treeTable\r\n #tt\r\n [value]=\"dataSource\"\r\n [columns]=\"config.columns\"\r\n [resizableColumns]=\"true\"\r\n [tableStyle]=\"{ 'min-width': '50rem' }\"\r\n [resizableColumns]=\"true\"\r\n [paginator]=\"paginator\"\r\n [rows]=\"rows\"\r\n [pageLinks]=\"pageLinks\"\r\n [totalRecords]=\"totalRecords\"\r\n [rowsPerPageOptions]=\"[5, 10, 25, 50]\"\r\n [showFirstLastIcon]=\"tamanhoTela > 960 ? true : false\"\r\n [pageLinks]=\"tamanhoTela > 960 ? 2 : 1\"\r\n [styleClass]=\"gridLines ? 'p-treetable-gridlines' : ''\"\r\n [(selection)]=\"selectedItems\"\r\n [lazy]=\"config.lazy\"\r\n (onLazyLoad)=\"paginate($event)\"\r\n currentPageReportTemplate=\"{first} - {last} de {{ totalRecords }}\"\r\n >\r\n <ng-template pTemplate=\"caption\" *ngIf=\"config.enableCation\">\r\n <div\r\n class=\"flex flex-row flex-wrap justify-content-between align-items-center grid formgrid p-fluid col-12 m-0\"\r\n style=\"background-color: #eaeaea\"\r\n >\r\n <div class=\"col-12 flex flex-column\">\r\n <div *ngIf=\"config.title\" class=\"text-md font-bold my-3\">\r\n {{ config.title }}\r\n </div>\r\n <div *ngIf=\"config.subtitle\" class=\"text-sm mb-4 font-medium\">\r\n {{ config.subtitle }}\r\n </div>\r\n </div>\r\n\r\n <div\r\n class=\"flex flex-row align-items-center col-10 p-0 md:col-6 lg:col-4 justify-content-center {{\r\n tamanhoTela < 768 ? '' : 'input-search'\r\n }}\"\r\n >\r\n <span *ngIf=\"config.enableFilter\" class=\"p-input-icon-left\">\r\n <i class=\"pi pi-search\"></i>\r\n\r\n <input\r\n pInputText\r\n pAutoFocus\r\n [autofocus]=\"true\"\r\n type=\"text\"\r\n (input)=\"onGlobalFilter(tt, $event)\"\r\n placeholder=\"Pesquisar...\"\r\n class=\"h-2rem\"\r\n #inputBusca\r\n />\r\n </span>\r\n </div>\r\n\r\n <div class=\"flex flex-row col-1 justify-content-end p-0\">\r\n <div class=\"flex flex-row gap-2 btns-options\">\r\n @for (action of config.actionsLote; track $index) {\r\n @if((selectedItems.length > 0 || action.showAcoesLote) &&\r\n exibirCampo(action, this.action)) {\r\n <kv-button\r\n (onClick)=\"action?.command(); activeItemLote(selectedItems)\"\r\n [pTooltip]=\"getOrExecute(action.tooltip, selectedItems)\"\r\n [tooltipPosition]=\"'bottom'\"\r\n [disabled]=\"getOrExecute(action.disabled, selectedItems) || false\"\r\n [icon]=\"getOrExecute(action.icon, selectedItems)\"\r\n [severity]=\"action.severity || 'tertiary'\"\r\n />\r\n } }\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n @if(showHeader){\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n @for(col of columns; track $index){\r\n <th\r\n [ttSortableColumn]=\"col.field\"\r\n [ttSortableColumnDisabled]=\"col.sortable === false\"\r\n class=\"text-sm\"\r\n [style.width]=\"col.width\"\r\n >\r\n <div>\r\n <div [ngClass]=\"{ flex: $index == 0, 'gap-3': $index == 0 }\">\r\n <div *ngIf=\"$index == 0 && config.enableSelect\">\r\n <p-treeTableHeaderCheckbox\r\n (click)=\"activeItemLote(selectedItems)\"\r\n />\r\n </div>\r\n \r\n <div class=\"flex flex-row align-items-center {{ align(col) }}\">\r\n <span>{{ col.header }}</span>\r\n \r\n @if(col.sortable) {\r\n <p-treeTableSortIcon [field]=\"col.field\" />\r\n \r\n }\r\n \r\n <span\r\n *ngIf=\"col.headerTooltip\"\r\n class=\"material-symbols-outlined flex align-items-center\"\r\n [pTooltip]=\"col.headerTooltip\"\r\n >info</span\r\n >\r\n </div>\r\n </div>\r\n </div>\r\n </th>\r\n }\r\n </tr>\r\n </ng-template>\r\n \r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n @for (col of columns; track $index) {\r\n <th\r\n [ttSortableColumn]=\"col.field\"\r\n [ttSortableColumnDisabled]=\"col.sortable === false\"\r\n [style.width]=\"col.width\"\r\n >\r\n <div class=\"flex flex-row align-items-center {{ align(col) }}\">\r\n <span>{{ col.header }}</span>\r\n \r\n @if(col.sortable) {\r\n <p-treeTableSortIcon [field]=\"col.field\" />\r\n \r\n }\r\n </div>\r\n </th>\r\n }\r\n <th [style.width]=\"5\"></th>\r\n </tr>\r\n </ng-template> \r\n }\r\n\r\n\r\n <ng-template\r\n pTemplate=\"body\"\r\n let-rowNode\r\n let-rowData=\"rowData\"\r\n let-columns=\"columns\"\r\n >\r\n <tr\r\n cdkDrag\r\n [cdkDragData]=\"rowNode\"\r\n [ttRow]=\"rowNode\"\r\n (dblclick)=\"doubleClick($event, rowData)\"\r\n [ngClass]=\"{ capitalize: tableCaptalized }\"\r\n >\r\n @for(col of columns; track $index){\r\n <td\r\n [style.position]=\"rowNode.level !== 0 ? 'sticky' : null\"\r\n [style.left.px]=\"\r\n childrenRecoil && rowNode.level !== 0 ? rowNode.level * 30 : null\r\n \"\r\n >\r\n <div class=\"flex flex-row {{ align(col) }}\">\r\n <div\r\n class=\"w-full-h-full flex align-items-center\"\r\n *ngIf=\"$index == 0\"\r\n \r\n >\r\n \r\n <p-treeTableToggler \r\n class=\"hiddenVisible\" \r\n [rowNode]=\"rowNode\"\r\n />\r\n\r\n @if(config.enableSelect) {\r\n <p-treeTableCheckbox\r\n [disabled]=\"isDisabledCheckbox(rowData, rowNode)\"\r\n (click)=\"activeItemLote(selectedItems)\"\r\n [value]=\"rowNode\"\r\n [ngStyle]=\"{\r\n 'display': isSelectEnabled(rowData, rowNode) ? 'block' : 'none',\r\n 'margin-left': config.visibleCheckboxFunction ? '-34px' : '0px'\r\n }\"\r\n />\r\n }\r\n \r\n </div>\r\n\r\n <div class=\"flex flex-row align-items-center\">\r\n <div\r\n class=\"flex flex-row align-items-center justify-content-center gap-2\"\r\n >\r\n @if(col.tagColor) {\r\n <div\r\n class=\"tag\"\r\n [pTooltip]=\"\r\n col.tooltipTag &&\r\n col.tooltipTag(rowData, col, rowData[col.field])\r\n \"\r\n [style.background-color]=\"\r\n col.tagColor(rowData, col, rowData[col.field])\r\n \"\r\n ></div>\r\n\r\n }\r\n\r\n <i\r\n *ngIf=\"col.boolean\"\r\n class=\"pi {{\r\n rowData[col.field] ? 'pi-check text-green-300' : ''\r\n }}\"\r\n style=\"font-size: 1.1rem\"\r\n ></i>\r\n\r\n <div class=\"flex flex-column\" *ngIf=\"!col.boolean\">\r\n <span class=\"m-0\">{{ rowData[col.field] }}</span>\r\n\r\n <p *ngIf=\"col.subtitle\" class=\"m-0 text-xs font-semibold\">\r\n {{ rowData[col.subtitle] }}\r\n </p>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <span *ngIf=\"col.template && validateShowTemplate(rowNode, col)\">\r\n <ng-container\r\n *ngIf=\"getCustomTemplate(col.template.name)\"\r\n [ngTemplateOutlet]=\"getCustomTemplate(col.template.name)\"\r\n [ngTemplateOutletContext]=\"{ $implicit: rowData }\"\r\n >\r\n </ng-container>\r\n </span>\r\n </td>\r\n }\r\n\r\n <td\r\n style=\"border-left: none; text-align: end\"\r\n *ngIf=\"(config.actions?.length ?? 0 > 0) || config.actionsPai\"\r\n [style.borderRight]=\"rowNode.level === 0 ? 'none' : ''\"\r\n [style.borderLeft]=\"rowNode.level === 0 ? 'none' : ''\"\r\n >\r\n <div\r\n *ngIf=\"\r\n (config.actions?.length ?? 0 > 0) &&\r\n validateActionPosition(rowNode)\r\n \"\r\n >\r\n <span\r\n class=\"material-symbols-outlined cursor-pointer icon-more-horiz p-1\"\r\n style=\"font-size: 25px\"\r\n (click)=\"menu.toggle($event); activeItem(rowData)\"\r\n >\r\n more_horiz\r\n </span>\r\n\r\n @for(action of config.actions; track $index) {\r\n {{ criarMenusModal(rowData) }}\r\n }\r\n\r\n <p-menu\r\n #menu\r\n [popup]=\"true\"\r\n [model]=\"menuItems\"\r\n appendTo=\"body\"\r\n ></p-menu>\r\n </div>\r\n\r\n @if(config.actionsPai?.length ?? 0 > 0 && rowNode.level == 0){\r\n <div class=\"flex justify-content-end\">\r\n @for (actionPai of config.actionsPai; track $index) {\r\n @if(getOrExecute(actionPai.visible, rowData) ?? true) {\r\n <kv-button\r\n (onClick)=\"activeItem(rowData); actionPai.command($event)\"\r\n [icon]=\"actionPai.icon\"\r\n [severity]=\"actionPai.severity || 'tertiary'\"\r\n />\r\n } }\r\n </div>\r\n }\r\n </td>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"emptymessage\">\r\n <tr>\r\n <td\r\n [attr.colspan]=\"config.columns.length + 1\"\r\n style=\"text-align: center\"\r\n >\r\n {{ textoEmptyMessage }}\r\n </td>\r\n </tr>\r\n </ng-template>\r\n </p-treeTable>\r\n</div>\r\n", styles: ["::ng-deep .p-treetable .p-treetable-tbody>tr>td{padding:.4rem}::ng-deep .p-treetable .p-treetable-header{padding:0rem}span{font-size:14px}:host ::ng-deep .p-treetable table{table-layout:auto!important}.icon-more-horiz:hover,.icon-more-horiz:focus{color:#5e5e5e;transform:scale(1.2);transition:color .3s,transform .3s;background-color:#eaeaea;border-radius:50%}::ng-deep .p-treetable .p-treetable-thead>tr>th{background-color:#eaeaea}.tag{width:5px;height:20px;border-radius:.25rem}.cdk-drag-preview{display:flex;align-items:center;justify-content:space-between;border-radius:10px!important}.cdk-drop-list-dragging{cursor:grabbing}:host ::ng-deep .cdk-drop-list-dragging .cdk-drag{transition:transform .25s cubic-bezier(0,0,.2,1)}:host ::ng-deep .cdk-drag-animating{transition:transform .3s cubic-bezier(0,0,.2,1)}::ng-deep svg.p-icon{width:.7rem;height:1rem}::ng-deep .p-checkbox .p-checkbox-box.p-highlight{border-color:#004172;background:#004172}::ng-deep .p-checkbox .p-checkbox-box.p-highlight:hover{background-color:#002542}::ng-deep .p-checkbox .p-checkbox-box.p-highlight:active{background-color:#002542}::ng-deep .p-checkbox .p-checkbox-box.p-highlight:disabled{background-color:#002542;opacity:.4;cursor:auto}\n"] }]
|
|
2169
2170
|
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { config: [{
|
|
2170
2171
|
type: Input
|
|
2171
2172
|
}], dataSource: [{
|
|
@@ -2192,6 +2193,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImpor
|
|
|
2192
2193
|
type: Input
|
|
2193
2194
|
}], childrenRecoil: [{
|
|
2194
2195
|
type: Input
|
|
2196
|
+
}], showHeader: [{
|
|
2197
|
+
type: Input
|
|
2195
2198
|
}], pageLinksOptions: [{
|
|
2196
2199
|
type: Input
|
|
2197
2200
|
}], pageLinks: [{
|
|
@@ -6712,9 +6715,35 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImpor
|
|
|
6712
6715
|
}]
|
|
6713
6716
|
}] });
|
|
6714
6717
|
|
|
6715
|
-
|
|
6716
|
-
|
|
6717
|
-
|
|
6718
|
+
class DynamicInputDirective {
|
|
6719
|
+
set dynamicComponent({ component, inputs }) {
|
|
6720
|
+
if (component) {
|
|
6721
|
+
const componentRef = this.vcr.createComponent(component);
|
|
6722
|
+
this.applyInputs(componentRef, inputs);
|
|
6723
|
+
}
|
|
6724
|
+
}
|
|
6725
|
+
constructor(vcr) {
|
|
6726
|
+
this.vcr = vcr;
|
|
6727
|
+
}
|
|
6728
|
+
applyInputs(componentRef, inputs) {
|
|
6729
|
+
if (inputs) {
|
|
6730
|
+
for (const key of Object.keys(inputs)) {
|
|
6731
|
+
componentRef.instance[key] = inputs[key];
|
|
6732
|
+
}
|
|
6733
|
+
}
|
|
6734
|
+
}
|
|
6735
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: DynamicInputDirective, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
6736
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.8", type: DynamicInputDirective, selector: "[dynamicComponent]", inputs: { dynamicComponent: "dynamicComponent" }, ngImport: i0 }); }
|
|
6737
|
+
}
|
|
6738
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: DynamicInputDirective, decorators: [{
|
|
6739
|
+
type: Directive,
|
|
6740
|
+
args: [{
|
|
6741
|
+
selector: '[dynamicComponent]'
|
|
6742
|
+
}]
|
|
6743
|
+
}], ctorParameters: () => [{ type: i0.ViewContainerRef }], propDecorators: { dynamicComponent: [{
|
|
6744
|
+
type: Input
|
|
6745
|
+
}] } });
|
|
6746
|
+
|
|
6718
6747
|
class KvStepperComponent {
|
|
6719
6748
|
onActiveStepChange(step) {
|
|
6720
6749
|
this.activeStep = step;
|
|
@@ -6726,48 +6755,149 @@ class KvStepperComponent {
|
|
|
6726
6755
|
});
|
|
6727
6756
|
}
|
|
6728
6757
|
constructor() {
|
|
6729
|
-
/**
|
|
6730
|
-
* @deprecated Use kv-page-stepper
|
|
6731
|
-
*/
|
|
6732
6758
|
this.panels = [];
|
|
6733
6759
|
this.activeStep = 0;
|
|
6734
|
-
this.orientation = 'horizontal';
|
|
6735
|
-
this.
|
|
6736
|
-
this.
|
|
6760
|
+
this.orientation = input('horizontal');
|
|
6761
|
+
this.buttonsAlign = input('end');
|
|
6762
|
+
this.linear = input(false);
|
|
6737
6763
|
this.activeStepChange = new EventEmitter();
|
|
6738
6764
|
this.concluirCallback = new EventEmitter();
|
|
6765
|
+
this.onSave = new EventEmitter();
|
|
6766
|
+
this.onNext = new EventEmitter();
|
|
6767
|
+
this.onBack = new EventEmitter();
|
|
6768
|
+
this.onCancel = new EventEmitter();
|
|
6769
|
+
this.iconBtnCancel = input('pi pi-fw pi-times');
|
|
6770
|
+
this.showBtnCancel = input(true);
|
|
6771
|
+
this.txtBtnCancel = input("Cancelar");
|
|
6772
|
+
this.iconBtnSave = input('pi pi-save');
|
|
6773
|
+
this.showBtnSave = input(true);
|
|
6774
|
+
this.txtBtnSave = input("Salvar");
|
|
6775
|
+
this.disableBtnSave = input(false);
|
|
6739
6776
|
this.assignIdsToPanels();
|
|
6740
6777
|
}
|
|
6778
|
+
cancel(event) {
|
|
6779
|
+
this.onCancel.emit(event);
|
|
6780
|
+
}
|
|
6781
|
+
save(event) {
|
|
6782
|
+
this.onSave.emit(event);
|
|
6783
|
+
}
|
|
6784
|
+
next(event) {
|
|
6785
|
+
this.onNext.emit(event);
|
|
6786
|
+
}
|
|
6787
|
+
back(event) {
|
|
6788
|
+
this.onBack.emit(event);
|
|
6789
|
+
}
|
|
6741
6790
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvStepperComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
6742
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
6791
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "17.3.8", type: KvStepperComponent, selector: "kv-stepper", inputs: { panels: { classPropertyName: "panels", publicName: "panels", isSignal: false, isRequired: false, transformFunction: null }, activeStep: { classPropertyName: "activeStep", publicName: "activeStep", isSignal: false, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, buttonsAlign: { classPropertyName: "buttonsAlign", publicName: "buttonsAlign", isSignal: true, isRequired: false, transformFunction: null }, linear: { classPropertyName: "linear", publicName: "linear", isSignal: true, isRequired: false, transformFunction: null }, iconBtnCancel: { classPropertyName: "iconBtnCancel", publicName: "iconBtnCancel", isSignal: true, isRequired: false, transformFunction: null }, showBtnCancel: { classPropertyName: "showBtnCancel", publicName: "showBtnCancel", isSignal: true, isRequired: false, transformFunction: null }, txtBtnCancel: { classPropertyName: "txtBtnCancel", publicName: "txtBtnCancel", isSignal: true, isRequired: false, transformFunction: null }, iconBtnSave: { classPropertyName: "iconBtnSave", publicName: "iconBtnSave", isSignal: true, isRequired: false, transformFunction: null }, showBtnSave: { classPropertyName: "showBtnSave", publicName: "showBtnSave", isSignal: true, isRequired: false, transformFunction: null }, txtBtnSave: { classPropertyName: "txtBtnSave", publicName: "txtBtnSave", isSignal: true, isRequired: false, transformFunction: null }, disableBtnSave: { classPropertyName: "disableBtnSave", publicName: "disableBtnSave", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { activeStepChange: "activeStepChange", concluirCallback: "concluirCallback", onSave: "onSave", onNext: "onNext", onBack: "onBack", onCancel: "onCancel" }, ngImport: i0, template: "<p-stepper\r\n [activeStep]=\"activeStep\"\r\n [orientation]=\"orientation()\"\r\n [linear]=\"linear()\"\r\n (activeStepChange)=\"onActiveStepChange($event)\"\r\n>\r\n <ng-container *ngFor=\"let panel of panels; let i = index\">\r\n <p-stepperPanel [header]=\"panel.header\">\r\n <ng-template\r\n pTemplate=\"content\"\r\n let-nextCallback=\"nextCallback\"\r\n let-prevCallback=\"prevCallback\"\r\n >\r\n <div class=\"flex flex-column p-2\">\r\n <div\r\n class=\"content-panel\"\r\n [dynamicComponent]=\"{\r\n component: panel.contentTemplate,\r\n inputs: panel.inputs || {}\r\n }\"\r\n ></div>\r\n </div>\r\n\r\n <div\r\n class=\"flex flex-column align-items-center lg:flex-row justify-content-{{\r\n buttonsAlign()\r\n }} col-12 gap-2 grid grid-nogutter p-fluid\"\r\n >\r\n <kv-button-secondary\r\n *ngIf=\"showBtnCancel()\"\r\n [label]=\"txtBtnCancel()\"\r\n [icon]=\"iconBtnCancel()\"\r\n (click)=\"cancel($event)\"\r\n class=\"w-full lg:w-auto\"\r\n >\r\n </kv-button-secondary>\r\n\r\n <kv-button-personalize\r\n class=\"w-full lg:w-auto\"\r\n [label]=\"'Voltar'\"\r\n color=\"#002542\"\r\n [disabled]=\"panel.id == 0\"\r\n [icon]=\"'pi pi-arrow-left'\"\r\n (onClick)=\"prevCallback.emit(); back($event)\"\r\n >\r\n </kv-button-personalize>\r\n\r\n <kv-button-success\r\n (click)=\"\r\n panel.id != panels.length - 1 ? nextCallback.emit() : save($event)\r\n ;\r\n next($event)\r\n \"\r\n class=\"w-full lg:w-auto\"\r\n [icon]=\"'pi pi-arrow-right'\"\r\n [label]=\"panel.id != panels.length - 1 ? 'Avan\u00E7ar ' : txtBtnSave()\"\r\n iconPos=\"right\"\r\n ></kv-button-success>\r\n </div>\r\n </ng-template>\r\n </p-stepperPanel>\r\n </ng-container>\r\n</p-stepper>\r\n", styles: [".kv-stepper{display:flex;flex-direction:column}:host ::ng-deep .p-stepper .p-stepper-header.p-highlight .p-stepper-number{background-color:#002542;color:#fff}:host ::ng-deep .p-stepper .p-stepper-header:has(~.p-highlight) .p-stepper-separator{background-color:#002542}.btn-success{background-color:#29b92d!important;color:#fff!important;height:35px}.btn-success:hover{background-color:#229925!important}.btn-success:disabled{pointer-events:none}.btn-secondary{background-color:#f2f3f5!important;color:#000000de!important;height:35px}.btn-secondary:hover{background-color:#d8d9db!important}.btn-secondary:disabled{pointer-events:none}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i3$3.Stepper, selector: "p-stepper", inputs: ["activeStep", "orientation", "linear", "transitionOptions"], outputs: ["onClick", "activeStepChange"] }, { kind: "component", type: i3$3.StepperPanel, selector: "p-stepperPanel", inputs: ["header"] }, { kind: "component", type: KvButtonSecondaryComponent, selector: "kv-button-secondary" }, { kind: "component", type: KvButtonSuccessComponent, selector: "kv-button-success" }, { kind: "component", type: KvButtonPersonalizeComponent, selector: "kv-button-personalize", inputs: ["colorHover", "textColor"] }, { kind: "directive", type: DynamicInputDirective, selector: "[dynamicComponent]", inputs: ["dynamicComponent"] }] }); }
|
|
6743
6792
|
}
|
|
6744
6793
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvStepperComponent, decorators: [{
|
|
6745
6794
|
type: Component,
|
|
6746
|
-
args: [{ selector: 'kv-stepper', template: "<p-stepper\r\n [activeStep]=\"activeStep\"\r\n [orientation]=\"orientation\"\r\n [linear]=\"linear\"\r\n (activeStepChange)=\"onActiveStepChange($event)\"\r\n>\r\n <ng-container *ngFor=\"let panel of panels; let i = index\">\r\n <p-stepperPanel [header]=\"panel.header\">\r\n
|
|
6795
|
+
args: [{ selector: 'kv-stepper', template: "<p-stepper\r\n [activeStep]=\"activeStep\"\r\n [orientation]=\"orientation()\"\r\n [linear]=\"linear()\"\r\n (activeStepChange)=\"onActiveStepChange($event)\"\r\n>\r\n <ng-container *ngFor=\"let panel of panels; let i = index\">\r\n <p-stepperPanel [header]=\"panel.header\">\r\n <ng-template\r\n pTemplate=\"content\"\r\n let-nextCallback=\"nextCallback\"\r\n let-prevCallback=\"prevCallback\"\r\n >\r\n <div class=\"flex flex-column p-2\">\r\n <div\r\n class=\"content-panel\"\r\n [dynamicComponent]=\"{\r\n component: panel.contentTemplate,\r\n inputs: panel.inputs || {}\r\n }\"\r\n ></div>\r\n </div>\r\n\r\n <div\r\n class=\"flex flex-column align-items-center lg:flex-row justify-content-{{\r\n buttonsAlign()\r\n }} col-12 gap-2 grid grid-nogutter p-fluid\"\r\n >\r\n <kv-button-secondary\r\n *ngIf=\"showBtnCancel()\"\r\n [label]=\"txtBtnCancel()\"\r\n [icon]=\"iconBtnCancel()\"\r\n (click)=\"cancel($event)\"\r\n class=\"w-full lg:w-auto\"\r\n >\r\n </kv-button-secondary>\r\n\r\n <kv-button-personalize\r\n class=\"w-full lg:w-auto\"\r\n [label]=\"'Voltar'\"\r\n color=\"#002542\"\r\n [disabled]=\"panel.id == 0\"\r\n [icon]=\"'pi pi-arrow-left'\"\r\n (onClick)=\"prevCallback.emit(); back($event)\"\r\n >\r\n </kv-button-personalize>\r\n\r\n <kv-button-success\r\n (click)=\"\r\n panel.id != panels.length - 1 ? nextCallback.emit() : save($event)\r\n ;\r\n next($event)\r\n \"\r\n class=\"w-full lg:w-auto\"\r\n [icon]=\"'pi pi-arrow-right'\"\r\n [label]=\"panel.id != panels.length - 1 ? 'Avan\u00E7ar ' : txtBtnSave()\"\r\n iconPos=\"right\"\r\n ></kv-button-success>\r\n </div>\r\n </ng-template>\r\n </p-stepperPanel>\r\n </ng-container>\r\n</p-stepper>\r\n", styles: [".kv-stepper{display:flex;flex-direction:column}:host ::ng-deep .p-stepper .p-stepper-header.p-highlight .p-stepper-number{background-color:#002542;color:#fff}:host ::ng-deep .p-stepper .p-stepper-header:has(~.p-highlight) .p-stepper-separator{background-color:#002542}.btn-success{background-color:#29b92d!important;color:#fff!important;height:35px}.btn-success:hover{background-color:#229925!important}.btn-success:disabled{pointer-events:none}.btn-secondary{background-color:#f2f3f5!important;color:#000000de!important;height:35px}.btn-secondary:hover{background-color:#d8d9db!important}.btn-secondary:disabled{pointer-events:none}\n"] }]
|
|
6747
6796
|
}], ctorParameters: () => [], propDecorators: { panels: [{
|
|
6748
6797
|
type: Input
|
|
6749
6798
|
}], activeStep: [{
|
|
6750
6799
|
type: Input
|
|
6751
|
-
}], orientation: [{
|
|
6752
|
-
type: Input
|
|
6753
|
-
}], linear: [{
|
|
6754
|
-
type: Input
|
|
6755
|
-
}], btnConcluir: [{
|
|
6756
|
-
type: Input
|
|
6757
6800
|
}], activeStepChange: [{
|
|
6758
6801
|
type: Output
|
|
6759
6802
|
}], concluirCallback: [{
|
|
6760
6803
|
type: Output
|
|
6804
|
+
}], onSave: [{
|
|
6805
|
+
type: Output
|
|
6806
|
+
}], onNext: [{
|
|
6807
|
+
type: Output
|
|
6808
|
+
}], onBack: [{
|
|
6809
|
+
type: Output
|
|
6810
|
+
}], onCancel: [{
|
|
6811
|
+
type: Output
|
|
6812
|
+
}] } });
|
|
6813
|
+
|
|
6814
|
+
class DragDirective {
|
|
6815
|
+
constructor() {
|
|
6816
|
+
this.fileDropped = new EventEmitter();
|
|
6817
|
+
}
|
|
6818
|
+
// Dragover listener
|
|
6819
|
+
onDragOver(evt) {
|
|
6820
|
+
evt.preventDefault();
|
|
6821
|
+
evt.stopPropagation();
|
|
6822
|
+
this.fileOver = true;
|
|
6823
|
+
}
|
|
6824
|
+
// Dragleave listener
|
|
6825
|
+
onDragLeave(evt) {
|
|
6826
|
+
evt.preventDefault();
|
|
6827
|
+
evt.stopPropagation();
|
|
6828
|
+
this.fileOver = false;
|
|
6829
|
+
}
|
|
6830
|
+
// Drop listener
|
|
6831
|
+
ondrop(evt) {
|
|
6832
|
+
evt.preventDefault();
|
|
6833
|
+
evt.stopPropagation();
|
|
6834
|
+
this.fileOver = false;
|
|
6835
|
+
let files = evt.dataTransfer.files;
|
|
6836
|
+
if (files.length > 0) {
|
|
6837
|
+
this.fileDropped.emit(files);
|
|
6838
|
+
}
|
|
6839
|
+
}
|
|
6840
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: DragDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
6841
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.8", type: DragDirective, selector: "[appDrag]", outputs: { fileDropped: "fileDropped" }, host: { listeners: { "dragover": "onDragOver($event)", "dragleave": "onDragLeave($event)", "drop": "ondrop($event)" }, properties: { "class.fileover": "this.fileOver" } }, ngImport: i0 }); }
|
|
6842
|
+
}
|
|
6843
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: DragDirective, decorators: [{
|
|
6844
|
+
type: Directive,
|
|
6845
|
+
args: [{
|
|
6846
|
+
selector: '[appDrag]'
|
|
6847
|
+
}]
|
|
6848
|
+
}], propDecorators: { fileOver: [{
|
|
6849
|
+
type: HostBinding,
|
|
6850
|
+
args: ['class.fileover']
|
|
6851
|
+
}], fileDropped: [{
|
|
6852
|
+
type: Output
|
|
6853
|
+
}], onDragOver: [{
|
|
6854
|
+
type: HostListener,
|
|
6855
|
+
args: ['dragover', ['$event']]
|
|
6856
|
+
}], onDragLeave: [{
|
|
6857
|
+
type: HostListener,
|
|
6858
|
+
args: ['dragleave', ['$event']]
|
|
6859
|
+
}], ondrop: [{
|
|
6860
|
+
type: HostListener,
|
|
6861
|
+
args: ['drop', ['$event']]
|
|
6761
6862
|
}] } });
|
|
6762
6863
|
|
|
6864
|
+
class DirectiveModule {
|
|
6865
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: DirectiveModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
6866
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.8", ngImport: i0, type: DirectiveModule, declarations: [DragDirective,
|
|
6867
|
+
TemplateDirective,
|
|
6868
|
+
DynamicInputDirective], exports: [DragDirective,
|
|
6869
|
+
TemplateDirective,
|
|
6870
|
+
DynamicInputDirective] }); }
|
|
6871
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: DirectiveModule }); }
|
|
6872
|
+
}
|
|
6873
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: DirectiveModule, decorators: [{
|
|
6874
|
+
type: NgModule,
|
|
6875
|
+
args: [{
|
|
6876
|
+
declarations: [
|
|
6877
|
+
DragDirective,
|
|
6878
|
+
TemplateDirective,
|
|
6879
|
+
DynamicInputDirective
|
|
6880
|
+
],
|
|
6881
|
+
exports: [
|
|
6882
|
+
DragDirective,
|
|
6883
|
+
TemplateDirective,
|
|
6884
|
+
DynamicInputDirective
|
|
6885
|
+
]
|
|
6886
|
+
}]
|
|
6887
|
+
}] });
|
|
6888
|
+
|
|
6763
6889
|
class KvStepperModule {
|
|
6764
6890
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvStepperModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
6765
6891
|
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.8", ngImport: i0, type: KvStepperModule, declarations: [KvStepperComponent], imports: [CommonModule,
|
|
6766
6892
|
PrimeNgModule,
|
|
6767
|
-
StepperModule
|
|
6893
|
+
StepperModule,
|
|
6894
|
+
KvButtonsModule,
|
|
6895
|
+
DirectiveModule], exports: [KvStepperComponent] }); }
|
|
6768
6896
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvStepperModule, imports: [CommonModule,
|
|
6769
6897
|
PrimeNgModule,
|
|
6770
|
-
StepperModule
|
|
6898
|
+
StepperModule,
|
|
6899
|
+
KvButtonsModule,
|
|
6900
|
+
DirectiveModule] }); }
|
|
6771
6901
|
}
|
|
6772
6902
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvStepperModule, decorators: [{
|
|
6773
6903
|
type: NgModule,
|
|
@@ -6779,6 +6909,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImpor
|
|
|
6779
6909
|
CommonModule,
|
|
6780
6910
|
PrimeNgModule,
|
|
6781
6911
|
StepperModule,
|
|
6912
|
+
KvButtonsModule,
|
|
6913
|
+
DirectiveModule
|
|
6782
6914
|
],
|
|
6783
6915
|
exports: [
|
|
6784
6916
|
KvStepperComponent
|
|
@@ -7718,35 +7850,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImpor
|
|
|
7718
7850
|
}]
|
|
7719
7851
|
}] });
|
|
7720
7852
|
|
|
7721
|
-
class DynamicInputDirective {
|
|
7722
|
-
set dynamicComponent({ component, inputs }) {
|
|
7723
|
-
if (component) {
|
|
7724
|
-
const componentRef = this.vcr.createComponent(component);
|
|
7725
|
-
this.applyInputs(componentRef, inputs);
|
|
7726
|
-
}
|
|
7727
|
-
}
|
|
7728
|
-
constructor(vcr) {
|
|
7729
|
-
this.vcr = vcr;
|
|
7730
|
-
}
|
|
7731
|
-
applyInputs(componentRef, inputs) {
|
|
7732
|
-
if (inputs) {
|
|
7733
|
-
for (const key of Object.keys(inputs)) {
|
|
7734
|
-
componentRef.instance[key] = inputs[key];
|
|
7735
|
-
}
|
|
7736
|
-
}
|
|
7737
|
-
}
|
|
7738
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: DynamicInputDirective, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
7739
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.8", type: DynamicInputDirective, selector: "[dynamicComponent]", inputs: { dynamicComponent: "dynamicComponent" }, ngImport: i0 }); }
|
|
7740
|
-
}
|
|
7741
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: DynamicInputDirective, decorators: [{
|
|
7742
|
-
type: Directive,
|
|
7743
|
-
args: [{
|
|
7744
|
-
selector: '[dynamicComponent]'
|
|
7745
|
-
}]
|
|
7746
|
-
}], ctorParameters: () => [{ type: i0.ViewContainerRef }], propDecorators: { dynamicComponent: [{
|
|
7747
|
-
type: Input
|
|
7748
|
-
}] } });
|
|
7749
|
-
|
|
7750
7853
|
class KvPageStepperComponent {
|
|
7751
7854
|
// @Output() concluirCallback = new EventEmitter<void>();
|
|
7752
7855
|
onActiveStepChange(step) {
|
|
@@ -7894,7 +7997,7 @@ class KvPageStepperComponent {
|
|
|
7894
7997
|
}
|
|
7895
7998
|
}
|
|
7896
7999
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvPageStepperComponent, deps: [{ token: i2$1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
7897
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.8", type: KvPageStepperComponent, selector: "kv-page-stepper", inputs: { panels: "panels", activeStep: "activeStep", orientation: "orientation", linear: "linear", formGroup: "formGroup", TituloForm: "TituloForm", SubTituloForm: "SubTituloForm", isSaveLoading: "isSaveLoading", popup: "popup", locationUseComponent: "locationUseComponent", iconBtnCancel: "iconBtnCancel", showBtnCancel: "showBtnCancel", txtBtnCancel: "txtBtnCancel", iconBtnSave: "iconBtnSave", showBtnSave: "showBtnSave", txtBtnSave: "txtBtnSave", disableBtnSave: "disableBtnSave", disableBtnSair: "disableBtnSair" }, outputs: { activeStepChange: "activeStepChange", onSave: "onSave", onCancel: "onCancel" }, ngImport: i0, template: "<!-- [formGroup]=\"formGroup\" -->\r\n<div\r\n class=\"grid-nogutter m-0\"\r\n id=\"page-form-container\"\r\n>\r\n\r\n <!-- Renderiza\u00E7\u00E3o do form -->\r\n <div class=\"col-12 p-0\" id=\"page-form-content\">\r\n\r\n\r\n\r\n<!--______________________________________________________________________________________________________-->\r\n\r\n\r\n\r\n <p-stepper\r\n [activeStep]=\"activeStep\"\r\n [orientation]=\"orientation\"\r\n [linear]=\"linear\"\r\n (activeStepChange)=\"onActiveStepChange($event)\"\r\n >\r\n <ng-container *ngFor=\"let panel of panels; let i = index\">\r\n <p-stepperPanel [header]=\"panel.header\">\r\n\r\n <ng-template\r\n pTemplate=\"content\"\r\n let-nextCallback=\"nextCallback\"\r\n let-prevCallback=\"prevCallback\"\r\n >\r\n\r\n <div class=\"flex flex-column\">\r\n <div class=\"content-panel\" [dynamicComponent]=\"{ component: panel.contentTemplate, inputs: panel.inputs || {} }\">\r\n <!-- <ng-container\r\n *ngComponentOutlet=\"panel.contentTemplate\"\r\n ></ng-container> -->\r\n\r\n\r\n\r\n </div>\r\n </div>\r\n\r\n <div\r\n class=\"flex pt-4\"\r\n [ngClass]=\"{\r\n 'justify-content-between': panel.id !== 0,\r\n 'justify-content-end': panel.id === 0,\r\n 'justify-content-start': orientation === 'vertical'\r\n }\"\r\n >\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n <div class=\"flex flex-column lg:flex-row justify-content-end col-12 gap-2 barra-acoes grid grid-nogutter p-fluid\">\r\n\r\n\r\n\r\n <kv-button-secondary\r\n *ngIf=\"showBtnCancel\"\r\n [label]=\"txtBtnCancel\"\r\n [icon]=\"iconBtnCancel\"\r\n [disabled]=\"isSaveLoading\"\r\n (click)=\"cancel($event)\"\r\n class=\"w-full lg:w-auto\"\r\n >\r\n </kv-button-secondary>\r\n\r\n <!-- panel.id !== 0 -->\r\n @if(true){\r\n <kv-button-personalize\r\n class=\"w-full lg:w-auto\"\r\n [label]=\"'Voltar'\"\r\n color=\"#002542\"\r\n [disabled]=\"panel.id == 0\"\r\n [icon]=\"'pi pi-arrow-left'\"\r\n (onClick)=\"prevCallback.emit()\"\r\n >\r\n </kv-button-personalize>\r\n }\r\n\r\n\r\n <!-- panel.id !== panels.length - 1 -->\r\n @if(true){\r\n <kv-button-success\r\n (click)=\" panel.id != panels.length-1 ? nextCallback.emit() : save($event)\"\r\n class=\"w-full lg:w-auto\"\r\n [icon]=\"'pi pi-arrow-right'\"\r\n [label]=\"panel.id != panels.length-1 ? 'Avan\u00E7ar ' : txtBtnSave\"\r\n iconPos=\"right\"\r\n ></kv-button-success>\r\n }\r\n<!--\r\n <kv-button-success\r\n *ngIf=\"showBtnSave && panel.id === panels.length - 1 \"\r\n [label]=\"txtBtnSave\"\r\n [icon]=\"iconBtnSave\"\r\n [disabled]=\"disableBtnSave || panel.id !== panels.length - 1\"\r\n [loading]=\"isSaveLoading\"\r\n (click)=\"nextCallback.emit()\"\r\n (click)=\"!disableBtnSave ? save($event) : ''\"\r\n class=\"w-full lg:w-auto\"\r\n /> -->\r\n\r\n\r\n\r\n <!-- @if(positionBtnToogle == 'start'){\r\n <kv-button-popup\r\n *ngIf=\"actionsToogle && showBtnToogle\"\r\n [label]=\"txtBtnToogle\"\r\n [icon]=\"iconBtnToogle\"\r\n (click)=\"menuToogle.toggle($event)\"\r\n [disabled]=\"disableBtnToogle\"\r\n class=\"w-full lg:w-auto\"\r\n classBtn=\"{{classBtnToogle}}\"\r\n >\r\n </kv-button-popup>\r\n <p-menu\r\n #menuToogle\r\n [popup]=\"true\"\r\n [model]=\"actionsToogle\"\r\n appendTo=\"body\"\r\n class=\"w-full lg:w-auto\"\r\n ></p-menu>\r\n } -->\r\n\r\n <!-- <kv-button-popup\r\n *ngIf=\"actionsCancelToogle && showBtnCancelToogle\"\r\n [label]=\"txtBtnCancelToogle\"\r\n [icon]=\"iconBtnCancelToogle\"\r\n (click)=\"menuCancel.toggle($event)\"\r\n class=\"w-full lg:w-auto\"\r\n [classBtn]=\"'btn-secondary border-300'\"\r\n >\r\n </kv-button-popup>\r\n <p-menu\r\n #menuCancel\r\n [popup]=\"true\"\r\n [model]=\"actionsCancelToogle\"\r\n appendTo=\"body\"\r\n class=\"w-full lg:w-auto\"\r\n ></p-menu> -->\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n <!-- <kv-button-popup\r\n *ngIf=\"actionsSaveToogle && showBtnSaveToogle\"\r\n [label]=\"txtBtnSaveToogle\"\r\n [icon]=\"iconBtnSaveToogle\"\r\n (click)=\"menuSave.toggle($event)\"\r\n [loading]=\"isSaveLoading\"\r\n class=\"w-full lg:w-auto\"\r\n [classBtn]=\"'btn-success border-green-500'\"\r\n >\r\n </kv-button-popup>\r\n\r\n <p-menu\r\n #menuSave\r\n [popup]=\"true\"\r\n [model]=\"actionsSaveToogle\"\r\n appendTo=\"body\"\r\n class=\"w-full lg:w-auto\"\r\n ></p-menu> -->\r\n\r\n\r\n <!-- @if(positionBtnToogle == 'end'){\r\n <kv-button-popup\r\n *ngIf=\"actionsToogle && showBtnToogle\"\r\n [label]=\"txtBtnToogle\"\r\n [icon]=\"iconBtnToogle\"\r\n (click)=\"menuToogle.toggle($event)\"\r\n [disabled]=\"disableBtnToogle\"\r\n class=\"w-full lg:w-auto\"\r\n classBtn=\"{{classBtnToogle}}\"\r\n >\r\n </kv-button-popup>\r\n <p-menu\r\n #menuToogle\r\n [popup]=\"true\"\r\n [model]=\"actionsToogle\"\r\n appendTo=\"body\"\r\n class=\"w-full lg:w-auto\"\r\n ></p-menu>\r\n } -->\r\n\r\n </div>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n </div>\r\n\r\n </ng-template>\r\n\r\n </p-stepperPanel>\r\n </ng-container>\r\n </p-stepper>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<!--______________________________________________________________________________________________________-->\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n </div>\r\n\r\n\r\n</div>\r\n", styles: ["::ng-deep .p-dialog .p-dialog-header{color:#fff!important;background:#002542!important;display:flex!important;flex-wrap:wrap}::ng-deep .p-dialog .p-dialog-content{padding-top:1rem}::ng-deep .p-dialog{min-width:320px}.sub-title{color:#ff0;position:relative;bottom:25px;z-index:1}::ng-deep .p-dialog-content{overflow-x:hidden}::ng-deep .p-dialog-content::-webkit-scrollbar{width:8px}::ng-deep .p-dialog-content::-webkit-scrollbar:hover{background-color:#dededebf}::ng-deep .p-dialog-content::-webkit-scrollbar-thumb{border-radius:4px;background-color:transparent}::ng-deep .p-dialog-content:hover::-webkit-scrollbar-thumb{border-left:2px solid white;background-color:#00000080}::ng-deep .p-dialog-content::-webkit-scrollbar-track{border-left:2px solid white;background-color:#dededebf}*{padding-bottom:0rem;padding-top:0rem}.barra-acoes{position:fixed;bottom:0;left:0;right:0;background-color:#fff;padding:10px;z-index:999}#page-form-container{padding-bottom:40px}@media screen and (max-width: 991px){#page-form-container{padding-bottom:100px}}.kv-stepper{display:flex;flex-direction:column}:host ::ng-deep .p-stepper .p-stepper-header.p-highlight .p-stepper-number{color:#f2f3f5!important;background-color:#002542!important}:host ::ng-deep .p-stepper .p-stepper-header:has(~.p-highlight) .p-stepper-separator{color:#002542;background-color:#f2f3f5}:host ::ng-deep .p-stepper .p-stepper-header .p-stepper-action .p-stepper-number{color:#002542;background-color:#f2f3f5}:host ::ng-deep .p-stepper.p-stepper-vertical .p-stepper-panel .p-stepper-separator{background-color:#f2f3f5}.btn-secondary{background-color:#f2f3f5!important;color:#000000de!important;height:35px}.btn-secondary:hover{background-color:#d8d9db!important}.btn-secondary:disabled{pointer-events:none}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i5$9.Stepper, selector: "p-stepper", inputs: ["activeStep", "orientation", "linear", "transitionOptions"], outputs: ["onClick", "activeStepChange"] }, { kind: "component", type: i5$9.StepperPanel, selector: "p-stepperPanel", inputs: ["header"] }, { kind: "component", type: KvButtonSecondaryComponent, selector: "kv-button-secondary" }, { kind: "component", type: KvButtonSuccessComponent, selector: "kv-button-success" }, { kind: "component", type: KvButtonPersonalizeComponent, selector: "kv-button-personalize", inputs: ["colorHover", "textColor"] }, { kind: "directive", type: DynamicInputDirective, selector: "[dynamicComponent]", inputs: ["dynamicComponent"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
8000
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.8", type: KvPageStepperComponent, selector: "kv-page-stepper", inputs: { panels: "panels", activeStep: "activeStep", orientation: "orientation", linear: "linear", formGroup: "formGroup", TituloForm: "TituloForm", SubTituloForm: "SubTituloForm", isSaveLoading: "isSaveLoading", popup: "popup", locationUseComponent: "locationUseComponent", iconBtnCancel: "iconBtnCancel", showBtnCancel: "showBtnCancel", txtBtnCancel: "txtBtnCancel", iconBtnSave: "iconBtnSave", showBtnSave: "showBtnSave", txtBtnSave: "txtBtnSave", disableBtnSave: "disableBtnSave", disableBtnSair: "disableBtnSair" }, outputs: { activeStepChange: "activeStepChange", onSave: "onSave", onCancel: "onCancel" }, ngImport: i0, template: "<!-- [formGroup]=\"formGroup\" -->\r\n<div\r\n class=\"grid-nogutter m-0\"\r\n id=\"page-form-container\"\r\n>\r\n\r\n <!-- Renderiza\u00E7\u00E3o do form -->\r\n <div class=\"col-12 p-0\" id=\"page-form-content\">\r\n\r\n\r\n\r\n<!--______________________________________________________________________________________________________-->\r\n\r\n\r\n\r\n <p-stepper\r\n [activeStep]=\"activeStep\"\r\n [orientation]=\"orientation\"\r\n [linear]=\"linear\"\r\n (activeStepChange)=\"onActiveStepChange($event)\"\r\n >\r\n <ng-container *ngFor=\"let panel of panels; let i = index\">\r\n <p-stepperPanel [header]=\"panel.header\">\r\n\r\n <ng-template\r\n pTemplate=\"content\"\r\n let-nextCallback=\"nextCallback\"\r\n let-prevCallback=\"prevCallback\"\r\n >\r\n\r\n <div class=\"flex flex-column\">\r\n <div class=\"content-panel\" [dynamicComponent]=\"{ component: panel.contentTemplate, inputs: panel.inputs || {} }\">\r\n <!-- <ng-container\r\n *ngComponentOutlet=\"panel.contentTemplate\"\r\n ></ng-container> -->\r\n\r\n\r\n\r\n </div>\r\n </div>\r\n\r\n <div\r\n class=\"flex pt-4\"\r\n [ngClass]=\"{\r\n 'justify-content-between': panel.id !== 0,\r\n 'justify-content-end': panel.id === 0,\r\n 'justify-content-start': orientation === 'vertical'\r\n }\"\r\n >\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n <div class=\"flex flex-column lg:flex-row justify-content-end col-12 gap-2 barra-acoes grid grid-nogutter p-fluid\">\r\n\r\n\r\n\r\n <kv-button-secondary\r\n *ngIf=\"showBtnCancel\"\r\n [label]=\"txtBtnCancel\"\r\n [icon]=\"iconBtnCancel\"\r\n [disabled]=\"isSaveLoading\"\r\n (click)=\"cancel($event)\"\r\n class=\"w-full lg:w-auto\"\r\n >\r\n </kv-button-secondary>\r\n\r\n <!-- panel.id !== 0 -->\r\n @if(true){\r\n <kv-button-personalize\r\n class=\"w-full lg:w-auto\"\r\n [label]=\"'Voltar'\"\r\n color=\"#002542\"\r\n [disabled]=\"panel.id == 0\"\r\n [icon]=\"'pi pi-arrow-left'\"\r\n (onClick)=\"prevCallback.emit()\"\r\n >\r\n </kv-button-personalize>\r\n }\r\n\r\n\r\n <!-- panel.id !== panels.length - 1 -->\r\n @if(true){\r\n <kv-button-success\r\n (click)=\" panel.id != panels.length-1 ? nextCallback.emit() : save($event)\"\r\n class=\"w-full lg:w-auto\"\r\n [icon]=\"'pi pi-arrow-right'\"\r\n [label]=\"panel.id != panels.length-1 ? 'Avan\u00E7ar ' : txtBtnSave\"\r\n iconPos=\"right\"\r\n ></kv-button-success>\r\n }\r\n<!--\r\n <kv-button-success\r\n *ngIf=\"showBtnSave && panel.id === panels.length - 1 \"\r\n [label]=\"txtBtnSave\"\r\n [icon]=\"iconBtnSave\"\r\n [disabled]=\"disableBtnSave || panel.id !== panels.length - 1\"\r\n [loading]=\"isSaveLoading\"\r\n (click)=\"nextCallback.emit()\"\r\n (click)=\"!disableBtnSave ? save($event) : ''\"\r\n class=\"w-full lg:w-auto\"\r\n /> -->\r\n\r\n\r\n\r\n <!-- @if(positionBtnToogle == 'start'){\r\n <kv-button-popup\r\n *ngIf=\"actionsToogle && showBtnToogle\"\r\n [label]=\"txtBtnToogle\"\r\n [icon]=\"iconBtnToogle\"\r\n (click)=\"menuToogle.toggle($event)\"\r\n [disabled]=\"disableBtnToogle\"\r\n class=\"w-full lg:w-auto\"\r\n classBtn=\"{{classBtnToogle}}\"\r\n >\r\n </kv-button-popup>\r\n <p-menu\r\n #menuToogle\r\n [popup]=\"true\"\r\n [model]=\"actionsToogle\"\r\n appendTo=\"body\"\r\n class=\"w-full lg:w-auto\"\r\n ></p-menu>\r\n } -->\r\n\r\n <!-- <kv-button-popup\r\n *ngIf=\"actionsCancelToogle && showBtnCancelToogle\"\r\n [label]=\"txtBtnCancelToogle\"\r\n [icon]=\"iconBtnCancelToogle\"\r\n (click)=\"menuCancel.toggle($event)\"\r\n class=\"w-full lg:w-auto\"\r\n [classBtn]=\"'btn-secondary border-300'\"\r\n >\r\n </kv-button-popup>\r\n <p-menu\r\n #menuCancel\r\n [popup]=\"true\"\r\n [model]=\"actionsCancelToogle\"\r\n appendTo=\"body\"\r\n class=\"w-full lg:w-auto\"\r\n ></p-menu> -->\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n <!-- <kv-button-popup\r\n *ngIf=\"actionsSaveToogle && showBtnSaveToogle\"\r\n [label]=\"txtBtnSaveToogle\"\r\n [icon]=\"iconBtnSaveToogle\"\r\n (click)=\"menuSave.toggle($event)\"\r\n [loading]=\"isSaveLoading\"\r\n class=\"w-full lg:w-auto\"\r\n [classBtn]=\"'btn-success border-green-500'\"\r\n >\r\n </kv-button-popup>\r\n\r\n <p-menu\r\n #menuSave\r\n [popup]=\"true\"\r\n [model]=\"actionsSaveToogle\"\r\n appendTo=\"body\"\r\n class=\"w-full lg:w-auto\"\r\n ></p-menu> -->\r\n\r\n\r\n <!-- @if(positionBtnToogle == 'end'){\r\n <kv-button-popup\r\n *ngIf=\"actionsToogle && showBtnToogle\"\r\n [label]=\"txtBtnToogle\"\r\n [icon]=\"iconBtnToogle\"\r\n (click)=\"menuToogle.toggle($event)\"\r\n [disabled]=\"disableBtnToogle\"\r\n class=\"w-full lg:w-auto\"\r\n classBtn=\"{{classBtnToogle}}\"\r\n >\r\n </kv-button-popup>\r\n <p-menu\r\n #menuToogle\r\n [popup]=\"true\"\r\n [model]=\"actionsToogle\"\r\n appendTo=\"body\"\r\n class=\"w-full lg:w-auto\"\r\n ></p-menu>\r\n } -->\r\n\r\n </div>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n </div>\r\n\r\n </ng-template>\r\n\r\n </p-stepperPanel>\r\n </ng-container>\r\n </p-stepper>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<!--______________________________________________________________________________________________________-->\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n </div>\r\n\r\n\r\n</div>\r\n", styles: ["::ng-deep .p-dialog .p-dialog-header{color:#fff!important;background:#002542!important;display:flex!important;flex-wrap:wrap}::ng-deep .p-dialog .p-dialog-content{padding-top:1rem}::ng-deep .p-dialog{min-width:320px}.sub-title{color:#ff0;position:relative;bottom:25px;z-index:1}::ng-deep .p-dialog-content{overflow-x:hidden}::ng-deep .p-dialog-content::-webkit-scrollbar{width:8px}::ng-deep .p-dialog-content::-webkit-scrollbar:hover{background-color:#dededebf}::ng-deep .p-dialog-content::-webkit-scrollbar-thumb{border-radius:4px;background-color:transparent}::ng-deep .p-dialog-content:hover::-webkit-scrollbar-thumb{border-left:2px solid white;background-color:#00000080}::ng-deep .p-dialog-content::-webkit-scrollbar-track{border-left:2px solid white;background-color:#dededebf}*{padding-bottom:0rem;padding-top:0rem}.barra-acoes{position:fixed;bottom:0;left:0;right:0;background-color:#fff;padding:10px;z-index:999}#page-form-container{padding-bottom:40px}@media screen and (max-width: 991px){#page-form-container{padding-bottom:100px}}.kv-stepper{display:flex;flex-direction:column}:host ::ng-deep .p-stepper .p-stepper-header.p-highlight .p-stepper-number{color:#f2f3f5!important;background-color:#002542!important}:host ::ng-deep .p-stepper .p-stepper-header:has(~.p-highlight) .p-stepper-separator{color:#002542;background-color:#f2f3f5}:host ::ng-deep .p-stepper .p-stepper-header .p-stepper-action .p-stepper-number{color:#002542;background-color:#f2f3f5}:host ::ng-deep .p-stepper.p-stepper-vertical .p-stepper-panel .p-stepper-separator{background-color:#f2f3f5}.btn-secondary{background-color:#f2f3f5!important;color:#000000de!important;height:35px}.btn-secondary:hover{background-color:#d8d9db!important}.btn-secondary:disabled{pointer-events:none}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i3$3.Stepper, selector: "p-stepper", inputs: ["activeStep", "orientation", "linear", "transitionOptions"], outputs: ["onClick", "activeStepChange"] }, { kind: "component", type: i3$3.StepperPanel, selector: "p-stepperPanel", inputs: ["header"] }, { kind: "component", type: KvButtonSecondaryComponent, selector: "kv-button-secondary" }, { kind: "component", type: KvButtonSuccessComponent, selector: "kv-button-success" }, { kind: "component", type: KvButtonPersonalizeComponent, selector: "kv-button-personalize", inputs: ["colorHover", "textColor"] }, { kind: "directive", type: DynamicInputDirective, selector: "[dynamicComponent]", inputs: ["dynamicComponent"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
7898
8001
|
}
|
|
7899
8002
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvPageStepperComponent, decorators: [{
|
|
7900
8003
|
type: Component,
|
|
@@ -7943,81 +8046,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImpor
|
|
|
7943
8046
|
type: Output
|
|
7944
8047
|
}] } });
|
|
7945
8048
|
|
|
7946
|
-
class DragDirective {
|
|
7947
|
-
constructor() {
|
|
7948
|
-
this.fileDropped = new EventEmitter();
|
|
7949
|
-
}
|
|
7950
|
-
// Dragover listener
|
|
7951
|
-
onDragOver(evt) {
|
|
7952
|
-
evt.preventDefault();
|
|
7953
|
-
evt.stopPropagation();
|
|
7954
|
-
this.fileOver = true;
|
|
7955
|
-
}
|
|
7956
|
-
// Dragleave listener
|
|
7957
|
-
onDragLeave(evt) {
|
|
7958
|
-
evt.preventDefault();
|
|
7959
|
-
evt.stopPropagation();
|
|
7960
|
-
this.fileOver = false;
|
|
7961
|
-
}
|
|
7962
|
-
// Drop listener
|
|
7963
|
-
ondrop(evt) {
|
|
7964
|
-
evt.preventDefault();
|
|
7965
|
-
evt.stopPropagation();
|
|
7966
|
-
this.fileOver = false;
|
|
7967
|
-
let files = evt.dataTransfer.files;
|
|
7968
|
-
if (files.length > 0) {
|
|
7969
|
-
this.fileDropped.emit(files);
|
|
7970
|
-
}
|
|
7971
|
-
}
|
|
7972
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: DragDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
7973
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.8", type: DragDirective, selector: "[appDrag]", outputs: { fileDropped: "fileDropped" }, host: { listeners: { "dragover": "onDragOver($event)", "dragleave": "onDragLeave($event)", "drop": "ondrop($event)" }, properties: { "class.fileover": "this.fileOver" } }, ngImport: i0 }); }
|
|
7974
|
-
}
|
|
7975
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: DragDirective, decorators: [{
|
|
7976
|
-
type: Directive,
|
|
7977
|
-
args: [{
|
|
7978
|
-
selector: '[appDrag]'
|
|
7979
|
-
}]
|
|
7980
|
-
}], propDecorators: { fileOver: [{
|
|
7981
|
-
type: HostBinding,
|
|
7982
|
-
args: ['class.fileover']
|
|
7983
|
-
}], fileDropped: [{
|
|
7984
|
-
type: Output
|
|
7985
|
-
}], onDragOver: [{
|
|
7986
|
-
type: HostListener,
|
|
7987
|
-
args: ['dragover', ['$event']]
|
|
7988
|
-
}], onDragLeave: [{
|
|
7989
|
-
type: HostListener,
|
|
7990
|
-
args: ['dragleave', ['$event']]
|
|
7991
|
-
}], ondrop: [{
|
|
7992
|
-
type: HostListener,
|
|
7993
|
-
args: ['drop', ['$event']]
|
|
7994
|
-
}] } });
|
|
7995
|
-
|
|
7996
|
-
class DirectiveModule {
|
|
7997
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: DirectiveModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
7998
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.8", ngImport: i0, type: DirectiveModule, declarations: [DragDirective,
|
|
7999
|
-
TemplateDirective,
|
|
8000
|
-
DynamicInputDirective], exports: [DragDirective,
|
|
8001
|
-
TemplateDirective,
|
|
8002
|
-
DynamicInputDirective] }); }
|
|
8003
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: DirectiveModule }); }
|
|
8004
|
-
}
|
|
8005
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: DirectiveModule, decorators: [{
|
|
8006
|
-
type: NgModule,
|
|
8007
|
-
args: [{
|
|
8008
|
-
declarations: [
|
|
8009
|
-
DragDirective,
|
|
8010
|
-
TemplateDirective,
|
|
8011
|
-
DynamicInputDirective
|
|
8012
|
-
],
|
|
8013
|
-
exports: [
|
|
8014
|
-
DragDirective,
|
|
8015
|
-
TemplateDirective,
|
|
8016
|
-
DynamicInputDirective
|
|
8017
|
-
]
|
|
8018
|
-
}]
|
|
8019
|
-
}] });
|
|
8020
|
-
|
|
8021
8049
|
class KvPageStepperodule {
|
|
8022
8050
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvPageStepperodule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
8023
8051
|
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.8", ngImport: i0, type: KvPageStepperodule, declarations: [KvPageStepperComponent], imports: [CommonModule,
|