keevo-components 1.8.31 → 1.8.33

Sign up to get free protection for your applications and to get access to all the features.
@@ -1630,6 +1630,14 @@ class KeevoValidators {
1630
1630
  return null;
1631
1631
  };
1632
1632
  }
1633
+ static nome() {
1634
+ return (c) => {
1635
+ let palavras = c.value.trim().split(' ');
1636
+ if (palavras?.length > 1)
1637
+ return { nome: true, erroMessage: 'Digite seu nome completo.' };
1638
+ return null;
1639
+ };
1640
+ }
1633
1641
  }
1634
1642
 
1635
1643
  class CodigoFipePipe {
@@ -5101,23 +5109,23 @@ class TreetableComponent {
5101
5109
  getCustomTemplate(templatename) {
5102
5110
  return this._templates[templatename];
5103
5111
  }
5104
- validateShowTemplate(rowNode) {
5105
- if (this.config.templateOnly) {
5106
- if (this.config.templateOnly === 'pai') {
5112
+ validateShowTemplate(rowNode, col) {
5113
+ if (col.templateOnly) {
5114
+ if (col.templateOnly === 'pai') {
5107
5115
  return rowNode.level === 0;
5108
5116
  }
5109
- if (this.config.templateOnly === 'filho') {
5117
+ if (col.templateOnly === 'filho') {
5110
5118
  return rowNode.level === 1;
5111
5119
  }
5112
5120
  }
5113
5121
  return true;
5114
5122
  }
5115
5123
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TreetableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
5116
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TreetableComponent, selector: "kv-tree-table", inputs: { config: "config", dataSource: "dataSource", gridLines: "gridLines", acoesLinhaTabela: "acoesLinhaTabela", _templates: ["templates", "_templates"] }, outputs: { onFilter: "onFilter", onPaginate: "onPaginate", onActiveItem: "onActiveItem", onActiveItemLote: "onActiveItemLote", doubleClickEvent: "doubleClickEvent" }, host: { listeners: { "window:resize": "onWindowResize($event)" } }, queries: [{ propertyName: "templates", predicate: TemplateDirective }], ngImport: i0, template: "<div>\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 [styleClass]=\"gridLines ? 'p-treetable-gridlines' : ''\"\r\n (onLazyLoad)=\"paginate($event)\"\r\n >\r\n\r\n <ng-template\r\n pTemplate=\"caption\"\r\n *ngIf=\"config.enableCation\"\r\n >\r\n <div\r\n class=\"flex flex-row flex-wrap justify-content-between align-items-center grid formgrid p-fluid col-12\">\r\n <div class=\"col-12 flex flex-column\">\r\n <div\r\n *ngIf=\"config.title\"\r\n class=\"text-md font-bold my-3\"\r\n >\r\n {{ config.title }}\r\n </div>\r\n <div\r\n *ngIf=\"config.subtitle\"\r\n class=\"text-sm mb-4 font-medium\"\r\n >\r\n {{ config.subtitle }}\r\n </div>\r\n </div>\r\n\r\n <div [class]=\"\r\n tamanhoTela < 768\r\n ? 'flex flex-row align-items-center col-10 md:col-6 lg:col-4 justify-content-center'\r\n : 'flex flex-row align-items-center col-12 md:col-6 lg:col-4 justify-content-center input-search'\r\n \">\r\n\r\n <span\r\n *ngIf=\"config.enableFilter\"\r\n class=\"p-input-icon-left\"\r\n >\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-2.5rem\"\r\n />\r\n </span>\r\n\r\n </div>\r\n\r\n <div class=\"flex flex-row col-1 justify-content-end p-0\">\r\n <div\r\n *ngFor=\"let action of config.actionsLote\"\r\n class=\"btns-options\"\r\n >\r\n <button\r\n id=\"actionLoteBtns\"\r\n pButton\r\n *ngIf=\"\r\n (selectedItems.length > 0 || action.showAcoesLote) &&\r\n exibirCampo(action, this.action)\r\n \"\r\n class=\"actionLoteBtns p-button-raised p-button-text\"\r\n (click)=\"action?.command(commandEvent); activeItemLote(selectedItems)\"\r\n [pTooltip]=\"retornarCampo(action, selectedItems, 'tooltip')\"\r\n [tooltipPosition]=\"'bottom'\"\r\n [style.backgroundColor]=\"\r\n retornarCampo(action, selectedItems, 'btnColor')\r\n \"\r\n [disabled]=\"retornarCampo(action, selectedItems, 'disabled')\"\r\n >\r\n <span\r\n class=\"material-symbols-outlined md-22\"\r\n [style.color]=\"\r\n retornarCampo(action, selectedItems, 'iconBtnColor')\r\n \"\r\n >\r\n {{ retornarCampo(action, selectedItems, \"icon\") }}\r\n </span>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template\r\n pTemplate=\"header\"\r\n let-columns\r\n >\r\n <tr>\r\n <th\r\n *ngFor=\"let col of columns; index as i\"\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: i == 0, 'gap-3': i == 0 }\">\r\n <div *ngIf=\"i == 0 && config.enableSelect\">\r\n <p-treeTableHeaderCheckbox\r\n (click)=\"activeItemLote(selectedItems)\"></p-treeTableHeaderCheckbox>\r\n </div>\r\n\r\n <div\r\n [class]=\"\r\n centralizarColunas(col) && alignColunasHeader(col) == ''\r\n ? 'flex flex-row justify-content-center'\r\n : 'flex flex-row'\r\n \"\r\n [style]=\"alignColunasHeader(col)\"\r\n >\r\n <span>{{ col.header }}</span>\r\n <p-sortIcon\r\n *ngIf=\"col.sortable === true\"\r\n [field]=\"col.field\"\r\n style=\"font-size: 10px\"\r\n ></p-sortIcon>\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 </div>\r\n </div>\r\n </div>\r\n </th>\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template\r\n pTemplate=\"header\"\r\n let-columns\r\n >\r\n <tr>\r\n <th\r\n *ngFor=\"let col of columns\"\r\n ttResizableColumn\r\n [style.width]=\"col.width\"\r\n [style]=\"col.centralize ? 'text-align: center;' : ''\"\r\n >\r\n {{ col.header }} <br>\r\n </th>\r\n\r\n <th\r\n [style.width]=\"5\"\r\n *ngIf=\"config.actions.length > 0\"\r\n ></th>\r\n </tr>\r\n </ng-template>\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 >\r\n <td\r\n *ngFor=\"let col of columns; let i = index\"\r\n [style]=\"returnStyleRow(col, rowNode)\"\r\n [style.position]=\"rowNode.level !== 0 ? 'sticky' : null\"\r\n [style.left.px]=\"rowNode.level !== 0 ? rowNode.level*30 : null\"\r\n >\r\n\r\n <div class=\"flex flex-row {{col.boolean ? 'justify-content-center' : '' }}\">\r\n <div\r\n class=\"w-full-h-full flex align-items-center\"\r\n *ngIf=\"i == 0\"\r\n >\r\n <p-treeTableCheckbox\r\n [disabled]=\"isDisabledCheckbox(rowData, rowNode)\"\r\n (click)=\"activeItemLote(selectedItems)\"\r\n [value]=\"rowNode\"\r\n *ngIf=\"config.enableSelect == true\"\r\n ></p-treeTableCheckbox>\r\n\r\n <p-treeTableToggler\r\n class=\"hiddenVisible\"\r\n [rowNode]=\"rowNode\"\r\n ></p-treeTableToggler>\r\n <!-- \r\n <p-treeTableToggler\r\n [rowNode]=\"rowNode\"\r\n *ngIf=\"!rightCollapse\"\r\n ></p-treeTableToggler>\r\n <p-treeTableToggler\r\n class=\"hiddenVisible\"\r\n [rowNode]=\"rowNode\"\r\n *ngIf=\"rightCollapse\"\r\n ></p-treeTableToggler> -->\r\n </div>\r\n\r\n\r\n <div class=\"flex flex-row align-items-center\">\r\n <div class=\"flex flex-row align-items-center justify-content-center\">\r\n\r\n <i\r\n *ngIf=\"col.boolean\"\r\n class=\"pi {{rowData[col.field] ? 'pi-check text-green-300' : ''}}\"\r\n style=\"font-size: 1.1rem;\"\r\n ></i>\r\n\r\n\r\n <div\r\n class=\"flex flex-column\"\r\n *ngIf=\"!col.boolean\"\r\n >\r\n <span class=\"m-0\">{{ rowData[col.field] }}</span>\r\n\r\n <p\r\n *ngIf=\"col.subtitle\"\r\n class=\"m-0 text-xs font-semibold\"\r\n >{{rowData[col.subtitle]}}</p>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n\r\n </div>\r\n\r\n\r\n <span *ngIf=\"col.template && validateShowTemplate(rowNode)\">\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\r\n </td>\r\n\r\n\r\n <td\r\n style=\"border-left: none;\"\r\n *ngIf=\"config.actions.length > 0 || config.actionsPai\"\r\n >\r\n\r\n <div *ngIf=\"config.actions.length > 0 && validateActionPosition(rowNode)\">\r\n <div\r\n class=\"flex flex-row justify-content-center gap-1\"\r\n *ngIf=\"acoesLinhaTabela\"\r\n >\r\n <p-button\r\n *ngFor=\"let action of config.actions\"\r\n icon=\"pi {{action.icon}}\"\r\n [rounded]=\"true\"\r\n [severity]=\"action.severity ? action.severity : 'secondary'\"\r\n [style]=\"{width: '2rem', height: '2rem'}\"\r\n (onClick)=\"action.command($event)\"\r\n ></p-button>\r\n\r\n </div>\r\n\r\n <span\r\n *ngIf=\"!acoesLinhaTabela\"\r\n class=\"material-symbols-outlined cursor-pointer icon-more-horiz\"\r\n style=\"font-size: 22px\"\r\n (click)=\"menu.toggle($event); activeItem(rowData)\"\r\n >\r\n more_horiz\r\n </span>\r\n\r\n <div *ngFor=\"let action of config.actions\">\r\n {{ criarMenusModal(rowData) }}\r\n </div>\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\r\n </div>\r\n\r\n <div *ngIf=\"config.actionsPai?.length > 0 && rowNode.level == 0\">\r\n\r\n <div\r\n *ngFor=\"let actionPai of config.actionsPai\"\r\n class=\"flex justify-content-end\"\r\n >\r\n\r\n <p-button\r\n icon=\"pi {{actionPai.icon}}\"\r\n [rounded]=\"true\"\r\n [severity]=\"actionPai.severity ? actionPai.severity : 'secondary'\"\r\n [style]=\"{width: '2rem', height: '2rem'}\"\r\n (onClick)=\"activeItem(rowData);actionPai.command($event);\"\r\n ></p-button>\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n </td>\r\n\r\n </tr>\r\n </ng-template>\r\n\r\n </p-treeTable>\r\n</div>", styles: ["@charset \"UTF-8\";:host ::ng-deep .p-treetable table{border-spacing:0 3px}#botaoFiltro:hover{color:#d4d4d4}:host ::ng-deep .p-treetable .p-treetable-header{background-color:#d1d1d1;padding:2px 0 0!important;border-radius:5px!important}:host ::ng-deep .p-treetable .p-treetable-thead>tr>th{background-color:#eaeaea;padding:.5rem!important;margin-bottom:-5px!important}:host ::ng-deep .p-treetable .p-treetable-tbody>tr>td{padding:.5rem!important}:host ::ng-deep .p-treetable .p-treetable-thead{border-spacing:0 1px!important}:host ::ng-deep .p-treetable .p-treetable-thead>tr>th:first-of-type{background-color:#eaeaea;padding:.5rem!important;border-radius:5px!important}:host ::ng-deep .p-treetable .p-treetable-thead>tr>th:last-child{background-color:#eaeaea;padding:.5rem!important;border-radius:0 5px 5px 0!important;-webkit-border-radius:0 5px 5px 0!important;-moz-border-radius:0 5px 5px 0!important;-ms-border-radius:0 5px 5px 0!important;-o-border-radius:0 5px 5px 0!important}:host ::ng-deep .p-treetable-scrollable-header-box{padding:0!important}:host ::ng-deep .p-treetable.p-treetable-sm .p-treetable-thead>tr>th{background-color:#f2f2f2}:host ::ng-deep .p-treetable.p-treetable-sm .p-treetable-thead>tr>th:first-of-type{border-radius:5px 0 0 5px}:host ::ng-deep .p-treetable.p-treetable-sm .p-treetable-thead>tr>th:last-child{border-radius:0 5px 5px 0}:host ::ng-deep .p-treetable .p-treetable-tbody>tr>td{border-bottom:1px solid #ddd!important;border-top:1px solid #ddd!important}:host ::ng-deep #tr-style{border-left:solid 4px #5289B4!important;border-radius:10px!important;display:block}:host ::ng-deep .p-treetable .p-treetable-tbody>tr>td:first-of-type{border-left:solid 4px #5289B4!important;border-right:none!important;border-radius:10px 0 0 10px!important;-webkit-border-radius:10px 0 0 10px!important;-moz-border-radius:10px 0 0 10px!important;-ms-border-radius:10px 0 0 10px!important;-o-border-radius:10px 0 0 10px!important}:host ::ng-deep .p-treetable .p-treetable-tbody>tr>td:last-child{border-radius:0 10px 10px 0!important;border-right:1px solid #ddd!important;-webkit-border-radius:0 10px 10px 0!important;-moz-border-radius:0 10px 10px 0!important;-ms-border-radius:0 10px 10px 0!important;-o-border-radius:0 10px 10px 0!important}:host ::ng-deep .actionBtns,:host ::ng-deep .actionLoteBtns{border-radius:50%;box-shadow:#0000003d 0 3px 8px;width:2.5rem!important;height:2.5rem!important;display:flex;align-items:center;justify-content:center}:host ::ng-deep .p-treetable table{border-collapse:separate!important;table-layout:auto!important}.icon-more-horiz:hover,.icon-more-horiz:focus{color:#5e5e5e;transform:scale(1.1);transition:color .3s,transform .3s}\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.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i4$8.AutoFocus, selector: "[pAutoFocus]", inputs: ["autofocus"] }, { kind: "directive", type: i1$1.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { kind: "component", type: i1$1.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "size", "style", "styleClass", "badgeClass", "ariaLabel"], outputs: ["onClick", "onFocus", "onBlur"] }, { 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: i6$1.InputText, selector: "[pInputText]" }, { 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: "component", type: i12.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "component", type: i9$1.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"], outputs: ["selectionChange", "contextMenuSelectionChange", "onFilter", "onNodeExpand", "onNodeCollapse", "onPage", "onSort", "onLazyLoad", "sortFunction", "onColResize", "onColReorder", "onNodeSelect", "onNodeUnselect", "onContextMenuSelect", "onHeaderCheckboxToggle", "onEditInit", "onEditComplete", "onEditCancel"] }, { kind: "component", type: i9$1.TreeTableToggler, selector: "p-treeTableToggler", inputs: ["rowNode"] }, { kind: "directive", type: i9$1.TTSortableColumn, selector: "[ttSortableColumn]", inputs: ["ttSortableColumn", "ttSortableColumnDisabled"] }, { kind: "directive", type: i9$1.TTResizableColumn, selector: "[ttResizableColumn]", inputs: ["ttResizableColumnDisabled"] }, { kind: "directive", type: i9$1.TTRow, selector: "[ttRow]", inputs: ["ttRow"] }, { kind: "component", type: i9$1.TTCheckbox, selector: "p-treeTableCheckbox", inputs: ["disabled", "value"] }, { kind: "component", type: i9$1.TTHeaderCheckbox, selector: "p-treeTableHeaderCheckbox" }] }); }
5124
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TreetableComponent, selector: "kv-tree-table", inputs: { config: "config", dataSource: "dataSource", gridLines: "gridLines", acoesLinhaTabela: "acoesLinhaTabela", _templates: ["templates", "_templates"] }, outputs: { onFilter: "onFilter", onPaginate: "onPaginate", onActiveItem: "onActiveItem", onActiveItemLote: "onActiveItemLote", doubleClickEvent: "doubleClickEvent" }, host: { listeners: { "window:resize": "onWindowResize($event)" } }, queries: [{ propertyName: "templates", predicate: TemplateDirective }], ngImport: i0, template: "<div>\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 [styleClass]=\"gridLines ? 'p-treetable-gridlines' : ''\"\r\n (onLazyLoad)=\"paginate($event)\"\r\n >\r\n\r\n <ng-template\r\n pTemplate=\"caption\"\r\n *ngIf=\"config.enableCation\"\r\n >\r\n <div\r\n class=\"flex flex-row flex-wrap justify-content-between align-items-center grid formgrid p-fluid col-12\">\r\n <div class=\"col-12 flex flex-column\">\r\n <div\r\n *ngIf=\"config.title\"\r\n class=\"text-md font-bold my-3\"\r\n >\r\n {{ config.title }}\r\n </div>\r\n <div\r\n *ngIf=\"config.subtitle\"\r\n class=\"text-sm mb-4 font-medium\"\r\n >\r\n {{ config.subtitle }}\r\n </div>\r\n </div>\r\n\r\n <div [class]=\"\r\n tamanhoTela < 768\r\n ? 'flex flex-row align-items-center col-10 md:col-6 lg:col-4 justify-content-center'\r\n : 'flex flex-row align-items-center col-12 md:col-6 lg:col-4 justify-content-center input-search'\r\n \">\r\n\r\n <span\r\n *ngIf=\"config.enableFilter\"\r\n class=\"p-input-icon-left\"\r\n >\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-2.5rem\"\r\n />\r\n </span>\r\n\r\n </div>\r\n\r\n <div class=\"flex flex-row col-1 justify-content-end p-0\">\r\n <div\r\n *ngFor=\"let action of config.actionsLote\"\r\n class=\"btns-options\"\r\n >\r\n <button\r\n id=\"actionLoteBtns\"\r\n pButton\r\n *ngIf=\"\r\n (selectedItems.length > 0 || action.showAcoesLote) &&\r\n exibirCampo(action, this.action)\r\n \"\r\n class=\"actionLoteBtns p-button-raised p-button-text\"\r\n (click)=\"action?.command(commandEvent); activeItemLote(selectedItems)\"\r\n [pTooltip]=\"retornarCampo(action, selectedItems, 'tooltip')\"\r\n [tooltipPosition]=\"'bottom'\"\r\n [style.backgroundColor]=\"\r\n retornarCampo(action, selectedItems, 'btnColor')\r\n \"\r\n [disabled]=\"retornarCampo(action, selectedItems, 'disabled')\"\r\n >\r\n <span\r\n class=\"material-symbols-outlined md-22\"\r\n [style.color]=\"\r\n retornarCampo(action, selectedItems, 'iconBtnColor')\r\n \"\r\n >\r\n {{ retornarCampo(action, selectedItems, \"icon\") }}\r\n </span>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template\r\n pTemplate=\"header\"\r\n let-columns\r\n >\r\n <tr>\r\n <th\r\n *ngFor=\"let col of columns; index as i\"\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: i == 0, 'gap-3': i == 0 }\">\r\n <div *ngIf=\"i == 0 && config.enableSelect\">\r\n <p-treeTableHeaderCheckbox\r\n (click)=\"activeItemLote(selectedItems)\"></p-treeTableHeaderCheckbox>\r\n </div>\r\n\r\n <div\r\n [class]=\"\r\n centralizarColunas(col) && alignColunasHeader(col) == ''\r\n ? 'flex flex-row justify-content-center'\r\n : 'flex flex-row'\r\n \"\r\n [style]=\"alignColunasHeader(col)\"\r\n >\r\n <span>{{ col.header }}</span>\r\n <p-sortIcon\r\n *ngIf=\"col.sortable === true\"\r\n [field]=\"col.field\"\r\n style=\"font-size: 10px\"\r\n ></p-sortIcon>\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 </div>\r\n </div>\r\n </div>\r\n </th>\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template\r\n pTemplate=\"header\"\r\n let-columns\r\n >\r\n <tr>\r\n <th\r\n *ngFor=\"let col of columns\"\r\n ttResizableColumn\r\n [style.width]=\"col.width\"\r\n [style]=\"col.centralize ? 'text-align: center;' : ''\"\r\n >\r\n {{ col.header }} <br>\r\n </th>\r\n\r\n <th\r\n [style.width]=\"5\"\r\n *ngIf=\"config.actions.length > 0\"\r\n ></th>\r\n </tr>\r\n </ng-template>\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 >\r\n <td\r\n *ngFor=\"let col of columns; let i = index\"\r\n [style]=\"returnStyleRow(col, rowNode)\"\r\n [style.position]=\"rowNode.level !== 0 ? 'sticky' : null\"\r\n [style.left.px]=\"rowNode.level !== 0 ? rowNode.level*30 : null\"\r\n >\r\n\r\n <div class=\"flex flex-row {{col.boolean ? 'justify-content-center' : '' }}\">\r\n <div\r\n class=\"w-full-h-full flex align-items-center\"\r\n *ngIf=\"i == 0\"\r\n >\r\n <p-treeTableCheckbox\r\n [disabled]=\"isDisabledCheckbox(rowData, rowNode)\"\r\n (click)=\"activeItemLote(selectedItems)\"\r\n [value]=\"rowNode\"\r\n *ngIf=\"config.enableSelect == true\"\r\n ></p-treeTableCheckbox>\r\n\r\n <p-treeTableToggler\r\n class=\"hiddenVisible\"\r\n [rowNode]=\"rowNode\"\r\n ></p-treeTableToggler>\r\n <!-- \r\n <p-treeTableToggler\r\n [rowNode]=\"rowNode\"\r\n *ngIf=\"!rightCollapse\"\r\n ></p-treeTableToggler>\r\n <p-treeTableToggler\r\n class=\"hiddenVisible\"\r\n [rowNode]=\"rowNode\"\r\n *ngIf=\"rightCollapse\"\r\n ></p-treeTableToggler> -->\r\n </div>\r\n\r\n\r\n <div class=\"flex flex-row align-items-center\">\r\n <div class=\"flex flex-row align-items-center justify-content-center\">\r\n\r\n <i\r\n *ngIf=\"col.boolean\"\r\n class=\"pi {{rowData[col.field] ? 'pi-check text-green-300' : ''}}\"\r\n style=\"font-size: 1.1rem;\"\r\n ></i>\r\n\r\n\r\n <div\r\n class=\"flex flex-column\"\r\n *ngIf=\"!col.boolean\"\r\n >\r\n <span class=\"m-0\">{{ rowData[col.field] }}</span>\r\n\r\n <p\r\n *ngIf=\"col.subtitle\"\r\n class=\"m-0 text-xs font-semibold\"\r\n >{{rowData[col.subtitle]}}</p>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n\r\n </div>\r\n\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\r\n </td>\r\n\r\n\r\n <td\r\n style=\"border-left: none;\"\r\n *ngIf=\"config.actions.length > 0 || config.actionsPai\"\r\n >\r\n\r\n <div *ngIf=\"config.actions.length > 0 && validateActionPosition(rowNode)\">\r\n <div\r\n class=\"flex flex-row justify-content-center gap-1\"\r\n *ngIf=\"acoesLinhaTabela\"\r\n >\r\n <p-button\r\n *ngFor=\"let action of config.actions\"\r\n icon=\"pi {{action.icon}}\"\r\n [rounded]=\"true\"\r\n [severity]=\"action.severity ? action.severity : 'secondary'\"\r\n [style]=\"{width: '2rem', height: '2rem'}\"\r\n (onClick)=\"action.command($event)\"\r\n ></p-button>\r\n\r\n </div>\r\n\r\n <span\r\n *ngIf=\"!acoesLinhaTabela\"\r\n class=\"material-symbols-outlined cursor-pointer icon-more-horiz\"\r\n style=\"font-size: 22px\"\r\n (click)=\"menu.toggle($event); activeItem(rowData)\"\r\n >\r\n more_horiz\r\n </span>\r\n\r\n <div *ngFor=\"let action of config.actions\">\r\n {{ criarMenusModal(rowData) }}\r\n </div>\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\r\n </div>\r\n\r\n <div *ngIf=\"config.actionsPai?.length > 0 && rowNode.level == 0\">\r\n\r\n <div\r\n *ngFor=\"let actionPai of config.actionsPai\"\r\n class=\"flex justify-content-end\"\r\n >\r\n\r\n <p-button\r\n icon=\"pi {{actionPai.icon}}\"\r\n [rounded]=\"true\"\r\n [severity]=\"actionPai.severity ? actionPai.severity : 'secondary'\"\r\n [style]=\"{width: '2rem', height: '2rem'}\"\r\n (onClick)=\"activeItem(rowData);actionPai.command($event);\"\r\n ></p-button>\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n </td>\r\n\r\n </tr>\r\n </ng-template>\r\n\r\n </p-treeTable>\r\n</div>", styles: ["@charset \"UTF-8\";:host ::ng-deep .p-treetable table{border-spacing:0 3px}#botaoFiltro:hover{color:#d4d4d4}:host ::ng-deep .p-treetable .p-treetable-header{background-color:#d1d1d1;padding:2px 0 0!important;border-radius:5px!important}:host ::ng-deep .p-treetable .p-treetable-thead>tr>th{background-color:#eaeaea;padding:.5rem!important;margin-bottom:-5px!important}:host ::ng-deep .p-treetable .p-treetable-tbody>tr>td{padding:.5rem!important}:host ::ng-deep .p-treetable .p-treetable-thead{border-spacing:0 1px!important}:host ::ng-deep .p-treetable .p-treetable-thead>tr>th:first-of-type{background-color:#eaeaea;padding:.5rem!important;border-radius:5px!important}:host ::ng-deep .p-treetable .p-treetable-thead>tr>th:last-child{background-color:#eaeaea;padding:.5rem!important;border-radius:0 5px 5px 0!important;-webkit-border-radius:0 5px 5px 0!important;-moz-border-radius:0 5px 5px 0!important;-ms-border-radius:0 5px 5px 0!important;-o-border-radius:0 5px 5px 0!important}:host ::ng-deep .p-treetable-scrollable-header-box{padding:0!important}:host ::ng-deep .p-treetable.p-treetable-sm .p-treetable-thead>tr>th{background-color:#f2f2f2}:host ::ng-deep .p-treetable.p-treetable-sm .p-treetable-thead>tr>th:first-of-type{border-radius:5px 0 0 5px}:host ::ng-deep .p-treetable.p-treetable-sm .p-treetable-thead>tr>th:last-child{border-radius:0 5px 5px 0}:host ::ng-deep .p-treetable .p-treetable-tbody>tr>td{border-bottom:1px solid #ddd!important;border-top:1px solid #ddd!important}:host ::ng-deep #tr-style{border-left:solid 4px #5289B4!important;border-radius:10px!important;display:block}:host ::ng-deep .p-treetable .p-treetable-tbody>tr>td:first-of-type{border-left:solid 4px #5289B4!important;border-right:none!important;border-radius:10px 0 0 10px!important;-webkit-border-radius:10px 0 0 10px!important;-moz-border-radius:10px 0 0 10px!important;-ms-border-radius:10px 0 0 10px!important;-o-border-radius:10px 0 0 10px!important}:host ::ng-deep .p-treetable .p-treetable-tbody>tr>td:last-child{border-radius:0 10px 10px 0!important;border-right:1px solid #ddd!important;-webkit-border-radius:0 10px 10px 0!important;-moz-border-radius:0 10px 10px 0!important;-ms-border-radius:0 10px 10px 0!important;-o-border-radius:0 10px 10px 0!important}:host ::ng-deep .actionBtns,:host ::ng-deep .actionLoteBtns{border-radius:50%;box-shadow:#0000003d 0 3px 8px;width:2.5rem!important;height:2.5rem!important;display:flex;align-items:center;justify-content:center}:host ::ng-deep .p-treetable table{border-collapse:separate!important;table-layout:auto!important}.icon-more-horiz:hover,.icon-more-horiz:focus{color:#5e5e5e;transform:scale(1.1);transition:color .3s,transform .3s}\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.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i4$8.AutoFocus, selector: "[pAutoFocus]", inputs: ["autofocus"] }, { kind: "directive", type: i1$1.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { kind: "component", type: i1$1.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "size", "style", "styleClass", "badgeClass", "ariaLabel"], outputs: ["onClick", "onFocus", "onBlur"] }, { 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: i6$1.InputText, selector: "[pInputText]" }, { 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: "component", type: i12.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "component", type: i9$1.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"], outputs: ["selectionChange", "contextMenuSelectionChange", "onFilter", "onNodeExpand", "onNodeCollapse", "onPage", "onSort", "onLazyLoad", "sortFunction", "onColResize", "onColReorder", "onNodeSelect", "onNodeUnselect", "onContextMenuSelect", "onHeaderCheckboxToggle", "onEditInit", "onEditComplete", "onEditCancel"] }, { kind: "component", type: i9$1.TreeTableToggler, selector: "p-treeTableToggler", inputs: ["rowNode"] }, { kind: "directive", type: i9$1.TTSortableColumn, selector: "[ttSortableColumn]", inputs: ["ttSortableColumn", "ttSortableColumnDisabled"] }, { kind: "directive", type: i9$1.TTResizableColumn, selector: "[ttResizableColumn]", inputs: ["ttResizableColumnDisabled"] }, { kind: "directive", type: i9$1.TTRow, selector: "[ttRow]", inputs: ["ttRow"] }, { kind: "component", type: i9$1.TTCheckbox, selector: "p-treeTableCheckbox", inputs: ["disabled", "value"] }, { kind: "component", type: i9$1.TTHeaderCheckbox, selector: "p-treeTableHeaderCheckbox" }] }); }
5117
5125
  }
5118
5126
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TreetableComponent, decorators: [{
5119
5127
  type: Component,
5120
- args: [{ selector: 'kv-tree-table', template: "<div>\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 [styleClass]=\"gridLines ? 'p-treetable-gridlines' : ''\"\r\n (onLazyLoad)=\"paginate($event)\"\r\n >\r\n\r\n <ng-template\r\n pTemplate=\"caption\"\r\n *ngIf=\"config.enableCation\"\r\n >\r\n <div\r\n class=\"flex flex-row flex-wrap justify-content-between align-items-center grid formgrid p-fluid col-12\">\r\n <div class=\"col-12 flex flex-column\">\r\n <div\r\n *ngIf=\"config.title\"\r\n class=\"text-md font-bold my-3\"\r\n >\r\n {{ config.title }}\r\n </div>\r\n <div\r\n *ngIf=\"config.subtitle\"\r\n class=\"text-sm mb-4 font-medium\"\r\n >\r\n {{ config.subtitle }}\r\n </div>\r\n </div>\r\n\r\n <div [class]=\"\r\n tamanhoTela < 768\r\n ? 'flex flex-row align-items-center col-10 md:col-6 lg:col-4 justify-content-center'\r\n : 'flex flex-row align-items-center col-12 md:col-6 lg:col-4 justify-content-center input-search'\r\n \">\r\n\r\n <span\r\n *ngIf=\"config.enableFilter\"\r\n class=\"p-input-icon-left\"\r\n >\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-2.5rem\"\r\n />\r\n </span>\r\n\r\n </div>\r\n\r\n <div class=\"flex flex-row col-1 justify-content-end p-0\">\r\n <div\r\n *ngFor=\"let action of config.actionsLote\"\r\n class=\"btns-options\"\r\n >\r\n <button\r\n id=\"actionLoteBtns\"\r\n pButton\r\n *ngIf=\"\r\n (selectedItems.length > 0 || action.showAcoesLote) &&\r\n exibirCampo(action, this.action)\r\n \"\r\n class=\"actionLoteBtns p-button-raised p-button-text\"\r\n (click)=\"action?.command(commandEvent); activeItemLote(selectedItems)\"\r\n [pTooltip]=\"retornarCampo(action, selectedItems, 'tooltip')\"\r\n [tooltipPosition]=\"'bottom'\"\r\n [style.backgroundColor]=\"\r\n retornarCampo(action, selectedItems, 'btnColor')\r\n \"\r\n [disabled]=\"retornarCampo(action, selectedItems, 'disabled')\"\r\n >\r\n <span\r\n class=\"material-symbols-outlined md-22\"\r\n [style.color]=\"\r\n retornarCampo(action, selectedItems, 'iconBtnColor')\r\n \"\r\n >\r\n {{ retornarCampo(action, selectedItems, \"icon\") }}\r\n </span>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template\r\n pTemplate=\"header\"\r\n let-columns\r\n >\r\n <tr>\r\n <th\r\n *ngFor=\"let col of columns; index as i\"\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: i == 0, 'gap-3': i == 0 }\">\r\n <div *ngIf=\"i == 0 && config.enableSelect\">\r\n <p-treeTableHeaderCheckbox\r\n (click)=\"activeItemLote(selectedItems)\"></p-treeTableHeaderCheckbox>\r\n </div>\r\n\r\n <div\r\n [class]=\"\r\n centralizarColunas(col) && alignColunasHeader(col) == ''\r\n ? 'flex flex-row justify-content-center'\r\n : 'flex flex-row'\r\n \"\r\n [style]=\"alignColunasHeader(col)\"\r\n >\r\n <span>{{ col.header }}</span>\r\n <p-sortIcon\r\n *ngIf=\"col.sortable === true\"\r\n [field]=\"col.field\"\r\n style=\"font-size: 10px\"\r\n ></p-sortIcon>\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 </div>\r\n </div>\r\n </div>\r\n </th>\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template\r\n pTemplate=\"header\"\r\n let-columns\r\n >\r\n <tr>\r\n <th\r\n *ngFor=\"let col of columns\"\r\n ttResizableColumn\r\n [style.width]=\"col.width\"\r\n [style]=\"col.centralize ? 'text-align: center;' : ''\"\r\n >\r\n {{ col.header }} <br>\r\n </th>\r\n\r\n <th\r\n [style.width]=\"5\"\r\n *ngIf=\"config.actions.length > 0\"\r\n ></th>\r\n </tr>\r\n </ng-template>\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 >\r\n <td\r\n *ngFor=\"let col of columns; let i = index\"\r\n [style]=\"returnStyleRow(col, rowNode)\"\r\n [style.position]=\"rowNode.level !== 0 ? 'sticky' : null\"\r\n [style.left.px]=\"rowNode.level !== 0 ? rowNode.level*30 : null\"\r\n >\r\n\r\n <div class=\"flex flex-row {{col.boolean ? 'justify-content-center' : '' }}\">\r\n <div\r\n class=\"w-full-h-full flex align-items-center\"\r\n *ngIf=\"i == 0\"\r\n >\r\n <p-treeTableCheckbox\r\n [disabled]=\"isDisabledCheckbox(rowData, rowNode)\"\r\n (click)=\"activeItemLote(selectedItems)\"\r\n [value]=\"rowNode\"\r\n *ngIf=\"config.enableSelect == true\"\r\n ></p-treeTableCheckbox>\r\n\r\n <p-treeTableToggler\r\n class=\"hiddenVisible\"\r\n [rowNode]=\"rowNode\"\r\n ></p-treeTableToggler>\r\n <!-- \r\n <p-treeTableToggler\r\n [rowNode]=\"rowNode\"\r\n *ngIf=\"!rightCollapse\"\r\n ></p-treeTableToggler>\r\n <p-treeTableToggler\r\n class=\"hiddenVisible\"\r\n [rowNode]=\"rowNode\"\r\n *ngIf=\"rightCollapse\"\r\n ></p-treeTableToggler> -->\r\n </div>\r\n\r\n\r\n <div class=\"flex flex-row align-items-center\">\r\n <div class=\"flex flex-row align-items-center justify-content-center\">\r\n\r\n <i\r\n *ngIf=\"col.boolean\"\r\n class=\"pi {{rowData[col.field] ? 'pi-check text-green-300' : ''}}\"\r\n style=\"font-size: 1.1rem;\"\r\n ></i>\r\n\r\n\r\n <div\r\n class=\"flex flex-column\"\r\n *ngIf=\"!col.boolean\"\r\n >\r\n <span class=\"m-0\">{{ rowData[col.field] }}</span>\r\n\r\n <p\r\n *ngIf=\"col.subtitle\"\r\n class=\"m-0 text-xs font-semibold\"\r\n >{{rowData[col.subtitle]}}</p>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n\r\n </div>\r\n\r\n\r\n <span *ngIf=\"col.template && validateShowTemplate(rowNode)\">\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\r\n </td>\r\n\r\n\r\n <td\r\n style=\"border-left: none;\"\r\n *ngIf=\"config.actions.length > 0 || config.actionsPai\"\r\n >\r\n\r\n <div *ngIf=\"config.actions.length > 0 && validateActionPosition(rowNode)\">\r\n <div\r\n class=\"flex flex-row justify-content-center gap-1\"\r\n *ngIf=\"acoesLinhaTabela\"\r\n >\r\n <p-button\r\n *ngFor=\"let action of config.actions\"\r\n icon=\"pi {{action.icon}}\"\r\n [rounded]=\"true\"\r\n [severity]=\"action.severity ? action.severity : 'secondary'\"\r\n [style]=\"{width: '2rem', height: '2rem'}\"\r\n (onClick)=\"action.command($event)\"\r\n ></p-button>\r\n\r\n </div>\r\n\r\n <span\r\n *ngIf=\"!acoesLinhaTabela\"\r\n class=\"material-symbols-outlined cursor-pointer icon-more-horiz\"\r\n style=\"font-size: 22px\"\r\n (click)=\"menu.toggle($event); activeItem(rowData)\"\r\n >\r\n more_horiz\r\n </span>\r\n\r\n <div *ngFor=\"let action of config.actions\">\r\n {{ criarMenusModal(rowData) }}\r\n </div>\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\r\n </div>\r\n\r\n <div *ngIf=\"config.actionsPai?.length > 0 && rowNode.level == 0\">\r\n\r\n <div\r\n *ngFor=\"let actionPai of config.actionsPai\"\r\n class=\"flex justify-content-end\"\r\n >\r\n\r\n <p-button\r\n icon=\"pi {{actionPai.icon}}\"\r\n [rounded]=\"true\"\r\n [severity]=\"actionPai.severity ? actionPai.severity : 'secondary'\"\r\n [style]=\"{width: '2rem', height: '2rem'}\"\r\n (onClick)=\"activeItem(rowData);actionPai.command($event);\"\r\n ></p-button>\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n </td>\r\n\r\n </tr>\r\n </ng-template>\r\n\r\n </p-treeTable>\r\n</div>", styles: ["@charset \"UTF-8\";:host ::ng-deep .p-treetable table{border-spacing:0 3px}#botaoFiltro:hover{color:#d4d4d4}:host ::ng-deep .p-treetable .p-treetable-header{background-color:#d1d1d1;padding:2px 0 0!important;border-radius:5px!important}:host ::ng-deep .p-treetable .p-treetable-thead>tr>th{background-color:#eaeaea;padding:.5rem!important;margin-bottom:-5px!important}:host ::ng-deep .p-treetable .p-treetable-tbody>tr>td{padding:.5rem!important}:host ::ng-deep .p-treetable .p-treetable-thead{border-spacing:0 1px!important}:host ::ng-deep .p-treetable .p-treetable-thead>tr>th:first-of-type{background-color:#eaeaea;padding:.5rem!important;border-radius:5px!important}:host ::ng-deep .p-treetable .p-treetable-thead>tr>th:last-child{background-color:#eaeaea;padding:.5rem!important;border-radius:0 5px 5px 0!important;-webkit-border-radius:0 5px 5px 0!important;-moz-border-radius:0 5px 5px 0!important;-ms-border-radius:0 5px 5px 0!important;-o-border-radius:0 5px 5px 0!important}:host ::ng-deep .p-treetable-scrollable-header-box{padding:0!important}:host ::ng-deep .p-treetable.p-treetable-sm .p-treetable-thead>tr>th{background-color:#f2f2f2}:host ::ng-deep .p-treetable.p-treetable-sm .p-treetable-thead>tr>th:first-of-type{border-radius:5px 0 0 5px}:host ::ng-deep .p-treetable.p-treetable-sm .p-treetable-thead>tr>th:last-child{border-radius:0 5px 5px 0}:host ::ng-deep .p-treetable .p-treetable-tbody>tr>td{border-bottom:1px solid #ddd!important;border-top:1px solid #ddd!important}:host ::ng-deep #tr-style{border-left:solid 4px #5289B4!important;border-radius:10px!important;display:block}:host ::ng-deep .p-treetable .p-treetable-tbody>tr>td:first-of-type{border-left:solid 4px #5289B4!important;border-right:none!important;border-radius:10px 0 0 10px!important;-webkit-border-radius:10px 0 0 10px!important;-moz-border-radius:10px 0 0 10px!important;-ms-border-radius:10px 0 0 10px!important;-o-border-radius:10px 0 0 10px!important}:host ::ng-deep .p-treetable .p-treetable-tbody>tr>td:last-child{border-radius:0 10px 10px 0!important;border-right:1px solid #ddd!important;-webkit-border-radius:0 10px 10px 0!important;-moz-border-radius:0 10px 10px 0!important;-ms-border-radius:0 10px 10px 0!important;-o-border-radius:0 10px 10px 0!important}:host ::ng-deep .actionBtns,:host ::ng-deep .actionLoteBtns{border-radius:50%;box-shadow:#0000003d 0 3px 8px;width:2.5rem!important;height:2.5rem!important;display:flex;align-items:center;justify-content:center}:host ::ng-deep .p-treetable table{border-collapse:separate!important;table-layout:auto!important}.icon-more-horiz:hover,.icon-more-horiz:focus{color:#5e5e5e;transform:scale(1.1);transition:color .3s,transform .3s}\n"] }]
5128
+ args: [{ selector: 'kv-tree-table', template: "<div>\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 [styleClass]=\"gridLines ? 'p-treetable-gridlines' : ''\"\r\n (onLazyLoad)=\"paginate($event)\"\r\n >\r\n\r\n <ng-template\r\n pTemplate=\"caption\"\r\n *ngIf=\"config.enableCation\"\r\n >\r\n <div\r\n class=\"flex flex-row flex-wrap justify-content-between align-items-center grid formgrid p-fluid col-12\">\r\n <div class=\"col-12 flex flex-column\">\r\n <div\r\n *ngIf=\"config.title\"\r\n class=\"text-md font-bold my-3\"\r\n >\r\n {{ config.title }}\r\n </div>\r\n <div\r\n *ngIf=\"config.subtitle\"\r\n class=\"text-sm mb-4 font-medium\"\r\n >\r\n {{ config.subtitle }}\r\n </div>\r\n </div>\r\n\r\n <div [class]=\"\r\n tamanhoTela < 768\r\n ? 'flex flex-row align-items-center col-10 md:col-6 lg:col-4 justify-content-center'\r\n : 'flex flex-row align-items-center col-12 md:col-6 lg:col-4 justify-content-center input-search'\r\n \">\r\n\r\n <span\r\n *ngIf=\"config.enableFilter\"\r\n class=\"p-input-icon-left\"\r\n >\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-2.5rem\"\r\n />\r\n </span>\r\n\r\n </div>\r\n\r\n <div class=\"flex flex-row col-1 justify-content-end p-0\">\r\n <div\r\n *ngFor=\"let action of config.actionsLote\"\r\n class=\"btns-options\"\r\n >\r\n <button\r\n id=\"actionLoteBtns\"\r\n pButton\r\n *ngIf=\"\r\n (selectedItems.length > 0 || action.showAcoesLote) &&\r\n exibirCampo(action, this.action)\r\n \"\r\n class=\"actionLoteBtns p-button-raised p-button-text\"\r\n (click)=\"action?.command(commandEvent); activeItemLote(selectedItems)\"\r\n [pTooltip]=\"retornarCampo(action, selectedItems, 'tooltip')\"\r\n [tooltipPosition]=\"'bottom'\"\r\n [style.backgroundColor]=\"\r\n retornarCampo(action, selectedItems, 'btnColor')\r\n \"\r\n [disabled]=\"retornarCampo(action, selectedItems, 'disabled')\"\r\n >\r\n <span\r\n class=\"material-symbols-outlined md-22\"\r\n [style.color]=\"\r\n retornarCampo(action, selectedItems, 'iconBtnColor')\r\n \"\r\n >\r\n {{ retornarCampo(action, selectedItems, \"icon\") }}\r\n </span>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template\r\n pTemplate=\"header\"\r\n let-columns\r\n >\r\n <tr>\r\n <th\r\n *ngFor=\"let col of columns; index as i\"\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: i == 0, 'gap-3': i == 0 }\">\r\n <div *ngIf=\"i == 0 && config.enableSelect\">\r\n <p-treeTableHeaderCheckbox\r\n (click)=\"activeItemLote(selectedItems)\"></p-treeTableHeaderCheckbox>\r\n </div>\r\n\r\n <div\r\n [class]=\"\r\n centralizarColunas(col) && alignColunasHeader(col) == ''\r\n ? 'flex flex-row justify-content-center'\r\n : 'flex flex-row'\r\n \"\r\n [style]=\"alignColunasHeader(col)\"\r\n >\r\n <span>{{ col.header }}</span>\r\n <p-sortIcon\r\n *ngIf=\"col.sortable === true\"\r\n [field]=\"col.field\"\r\n style=\"font-size: 10px\"\r\n ></p-sortIcon>\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 </div>\r\n </div>\r\n </div>\r\n </th>\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template\r\n pTemplate=\"header\"\r\n let-columns\r\n >\r\n <tr>\r\n <th\r\n *ngFor=\"let col of columns\"\r\n ttResizableColumn\r\n [style.width]=\"col.width\"\r\n [style]=\"col.centralize ? 'text-align: center;' : ''\"\r\n >\r\n {{ col.header }} <br>\r\n </th>\r\n\r\n <th\r\n [style.width]=\"5\"\r\n *ngIf=\"config.actions.length > 0\"\r\n ></th>\r\n </tr>\r\n </ng-template>\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 >\r\n <td\r\n *ngFor=\"let col of columns; let i = index\"\r\n [style]=\"returnStyleRow(col, rowNode)\"\r\n [style.position]=\"rowNode.level !== 0 ? 'sticky' : null\"\r\n [style.left.px]=\"rowNode.level !== 0 ? rowNode.level*30 : null\"\r\n >\r\n\r\n <div class=\"flex flex-row {{col.boolean ? 'justify-content-center' : '' }}\">\r\n <div\r\n class=\"w-full-h-full flex align-items-center\"\r\n *ngIf=\"i == 0\"\r\n >\r\n <p-treeTableCheckbox\r\n [disabled]=\"isDisabledCheckbox(rowData, rowNode)\"\r\n (click)=\"activeItemLote(selectedItems)\"\r\n [value]=\"rowNode\"\r\n *ngIf=\"config.enableSelect == true\"\r\n ></p-treeTableCheckbox>\r\n\r\n <p-treeTableToggler\r\n class=\"hiddenVisible\"\r\n [rowNode]=\"rowNode\"\r\n ></p-treeTableToggler>\r\n <!-- \r\n <p-treeTableToggler\r\n [rowNode]=\"rowNode\"\r\n *ngIf=\"!rightCollapse\"\r\n ></p-treeTableToggler>\r\n <p-treeTableToggler\r\n class=\"hiddenVisible\"\r\n [rowNode]=\"rowNode\"\r\n *ngIf=\"rightCollapse\"\r\n ></p-treeTableToggler> -->\r\n </div>\r\n\r\n\r\n <div class=\"flex flex-row align-items-center\">\r\n <div class=\"flex flex-row align-items-center justify-content-center\">\r\n\r\n <i\r\n *ngIf=\"col.boolean\"\r\n class=\"pi {{rowData[col.field] ? 'pi-check text-green-300' : ''}}\"\r\n style=\"font-size: 1.1rem;\"\r\n ></i>\r\n\r\n\r\n <div\r\n class=\"flex flex-column\"\r\n *ngIf=\"!col.boolean\"\r\n >\r\n <span class=\"m-0\">{{ rowData[col.field] }}</span>\r\n\r\n <p\r\n *ngIf=\"col.subtitle\"\r\n class=\"m-0 text-xs font-semibold\"\r\n >{{rowData[col.subtitle]}}</p>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n\r\n </div>\r\n\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\r\n </td>\r\n\r\n\r\n <td\r\n style=\"border-left: none;\"\r\n *ngIf=\"config.actions.length > 0 || config.actionsPai\"\r\n >\r\n\r\n <div *ngIf=\"config.actions.length > 0 && validateActionPosition(rowNode)\">\r\n <div\r\n class=\"flex flex-row justify-content-center gap-1\"\r\n *ngIf=\"acoesLinhaTabela\"\r\n >\r\n <p-button\r\n *ngFor=\"let action of config.actions\"\r\n icon=\"pi {{action.icon}}\"\r\n [rounded]=\"true\"\r\n [severity]=\"action.severity ? action.severity : 'secondary'\"\r\n [style]=\"{width: '2rem', height: '2rem'}\"\r\n (onClick)=\"action.command($event)\"\r\n ></p-button>\r\n\r\n </div>\r\n\r\n <span\r\n *ngIf=\"!acoesLinhaTabela\"\r\n class=\"material-symbols-outlined cursor-pointer icon-more-horiz\"\r\n style=\"font-size: 22px\"\r\n (click)=\"menu.toggle($event); activeItem(rowData)\"\r\n >\r\n more_horiz\r\n </span>\r\n\r\n <div *ngFor=\"let action of config.actions\">\r\n {{ criarMenusModal(rowData) }}\r\n </div>\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\r\n </div>\r\n\r\n <div *ngIf=\"config.actionsPai?.length > 0 && rowNode.level == 0\">\r\n\r\n <div\r\n *ngFor=\"let actionPai of config.actionsPai\"\r\n class=\"flex justify-content-end\"\r\n >\r\n\r\n <p-button\r\n icon=\"pi {{actionPai.icon}}\"\r\n [rounded]=\"true\"\r\n [severity]=\"actionPai.severity ? actionPai.severity : 'secondary'\"\r\n [style]=\"{width: '2rem', height: '2rem'}\"\r\n (onClick)=\"activeItem(rowData);actionPai.command($event);\"\r\n ></p-button>\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n </td>\r\n\r\n </tr>\r\n </ng-template>\r\n\r\n </p-treeTable>\r\n</div>", styles: ["@charset \"UTF-8\";:host ::ng-deep .p-treetable table{border-spacing:0 3px}#botaoFiltro:hover{color:#d4d4d4}:host ::ng-deep .p-treetable .p-treetable-header{background-color:#d1d1d1;padding:2px 0 0!important;border-radius:5px!important}:host ::ng-deep .p-treetable .p-treetable-thead>tr>th{background-color:#eaeaea;padding:.5rem!important;margin-bottom:-5px!important}:host ::ng-deep .p-treetable .p-treetable-tbody>tr>td{padding:.5rem!important}:host ::ng-deep .p-treetable .p-treetable-thead{border-spacing:0 1px!important}:host ::ng-deep .p-treetable .p-treetable-thead>tr>th:first-of-type{background-color:#eaeaea;padding:.5rem!important;border-radius:5px!important}:host ::ng-deep .p-treetable .p-treetable-thead>tr>th:last-child{background-color:#eaeaea;padding:.5rem!important;border-radius:0 5px 5px 0!important;-webkit-border-radius:0 5px 5px 0!important;-moz-border-radius:0 5px 5px 0!important;-ms-border-radius:0 5px 5px 0!important;-o-border-radius:0 5px 5px 0!important}:host ::ng-deep .p-treetable-scrollable-header-box{padding:0!important}:host ::ng-deep .p-treetable.p-treetable-sm .p-treetable-thead>tr>th{background-color:#f2f2f2}:host ::ng-deep .p-treetable.p-treetable-sm .p-treetable-thead>tr>th:first-of-type{border-radius:5px 0 0 5px}:host ::ng-deep .p-treetable.p-treetable-sm .p-treetable-thead>tr>th:last-child{border-radius:0 5px 5px 0}:host ::ng-deep .p-treetable .p-treetable-tbody>tr>td{border-bottom:1px solid #ddd!important;border-top:1px solid #ddd!important}:host ::ng-deep #tr-style{border-left:solid 4px #5289B4!important;border-radius:10px!important;display:block}:host ::ng-deep .p-treetable .p-treetable-tbody>tr>td:first-of-type{border-left:solid 4px #5289B4!important;border-right:none!important;border-radius:10px 0 0 10px!important;-webkit-border-radius:10px 0 0 10px!important;-moz-border-radius:10px 0 0 10px!important;-ms-border-radius:10px 0 0 10px!important;-o-border-radius:10px 0 0 10px!important}:host ::ng-deep .p-treetable .p-treetable-tbody>tr>td:last-child{border-radius:0 10px 10px 0!important;border-right:1px solid #ddd!important;-webkit-border-radius:0 10px 10px 0!important;-moz-border-radius:0 10px 10px 0!important;-ms-border-radius:0 10px 10px 0!important;-o-border-radius:0 10px 10px 0!important}:host ::ng-deep .actionBtns,:host ::ng-deep .actionLoteBtns{border-radius:50%;box-shadow:#0000003d 0 3px 8px;width:2.5rem!important;height:2.5rem!important;display:flex;align-items:center;justify-content:center}:host ::ng-deep .p-treetable table{border-collapse:separate!important;table-layout:auto!important}.icon-more-horiz:hover,.icon-more-horiz:focus{color:#5e5e5e;transform:scale(1.1);transition:color .3s,transform .3s}\n"] }]
5121
5129
  }], propDecorators: { config: [{
5122
5130
  type: Input
5123
5131
  }], dataSource: [{