keevo-components 1.8.275 → 1.8.277
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-avatar/kv-avatar.component.mjs +41 -47
- package/esm2022/lib/components/kv-avatar/kv-avatar.module.mjs +5 -7
- package/esm2022/lib/components/kv-avatar/kv-crop-image/kv-crop-image.component.mjs +222 -0
- package/esm2022/lib/components/kv-layout/layout/kv-layout.component.mjs +9 -4
- package/esm2022/lib/components/kv-tree-table/kv-tree-table.component.mjs +3 -3
- package/esm2022/public-api.mjs +7 -6
- package/fesm2022/keevo-components.mjs +394 -186
- package/fesm2022/keevo-components.mjs.map +1 -1
- package/lib/components/kv-avatar/kv-avatar.component.d.ts +10 -8
- package/lib/components/kv-avatar/kv-avatar.module.d.ts +2 -2
- package/lib/components/kv-avatar/kv-crop-image/kv-crop-image.component.d.ts +39 -0
- package/package.json +1 -1
- package/public-api.d.ts +6 -5
|
@@ -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,
|
|
2
|
+
import { EventEmitter, Component, Input, Output, ViewChild, Injectable, Directive, Pipe, ViewChildren, ContentChildren, forwardRef, HostListener, NgModule, input, signal, viewChild, computed, ChangeDetectionStrategy, Injector, HostBinding } 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';
|
|
@@ -86,7 +86,7 @@ import { PasswordModule } from 'primeng/password';
|
|
|
86
86
|
import * as i3$2 from 'primeng/picklist';
|
|
87
87
|
import { PickListModule } from 'primeng/picklist';
|
|
88
88
|
import { ProgressBarModule } from 'primeng/progressbar';
|
|
89
|
-
import * as i6$
|
|
89
|
+
import * as i6$2 from 'primeng/radiobutton';
|
|
90
90
|
import { RadioButtonModule } from 'primeng/radiobutton';
|
|
91
91
|
import { RatingModule } from 'primeng/rating';
|
|
92
92
|
import * as i12 from 'primeng/sidebar';
|
|
@@ -102,7 +102,7 @@ import { TagModule } from 'primeng/tag';
|
|
|
102
102
|
import * as i15 from 'primeng/toast';
|
|
103
103
|
import { ToastModule } from 'primeng/toast';
|
|
104
104
|
import { ToolbarModule } from 'primeng/toolbar';
|
|
105
|
-
import * as i1$
|
|
105
|
+
import * as i1$7 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';
|
|
@@ -110,16 +110,19 @@ import * as i5$8 from 'primeng/stepper';
|
|
|
110
110
|
import { StepperModule } from 'primeng/stepper';
|
|
111
111
|
import { InputGroupModule } from 'primeng/inputgroup';
|
|
112
112
|
import { InputGroupAddonModule } from 'primeng/inputgroupaddon';
|
|
113
|
+
import * as i6$1 from 'primeng/slider';
|
|
113
114
|
import { SliderModule } from 'primeng/slider';
|
|
115
|
+
import * as i1$5 from 'projects/keevo-components/src/public-api';
|
|
116
|
+
import { BaseComponentCrud as BaseComponentCrud$1, KvModalModule as KvModalModule$1, PrimeNgModule as PrimeNgModule$1 } from 'projects/keevo-components/src/public-api';
|
|
114
117
|
import Quill from 'quill';
|
|
115
|
-
import * as i1$
|
|
118
|
+
import * as i1$6 from 'ngx-loading';
|
|
116
119
|
import { NgxLoadingModule } from 'ngx-loading';
|
|
117
120
|
import { ProgressSpinnerModule } from 'primeng/progressspinner';
|
|
118
121
|
import { OrgChart } from 'd3-org-chart';
|
|
119
122
|
import * as d3 from 'd3';
|
|
120
123
|
import { AutoCompleteModule } from 'primeng/autocomplete';
|
|
121
124
|
import * as vkbeautify from 'vkbeautify';
|
|
122
|
-
import * as i1$
|
|
125
|
+
import * as i1$8 from '@angular/platform-browser';
|
|
123
126
|
|
|
124
127
|
class BaseComponentButton {
|
|
125
128
|
constructor() {
|
|
@@ -2160,11 +2163,11 @@ class KvTreetableComponent {
|
|
|
2160
2163
|
this.inputBusca.nativeElement.value = '';
|
|
2161
2164
|
}
|
|
2162
2165
|
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 }); }
|
|
2163
|
-
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 [ngStyle]=\"{'display': isSelectEnabled(rowData, rowNode) ? 'block' : 'none'}\"\r\n [disabled]=\"isDisabledCheckbox(rowData, rowNode)\"\r\n (click)=\"activeItemLote(selectedItems)\"\r\n [value]=\"rowNode\"\r\n ></p-treeTableCheckbox>\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 <p-treeTableToggler class=\"hiddenVisible\" [rowNode]=\"rowNode\" />\r\n\r\n <p-treeTableCheckbox\r\n [disabled]=\"isDisabledCheckbox(rowData, rowNode)\"\r\n (click)=\"activeItemLote(selectedItems)\"\r\n [value]=\"rowNode\"\r\n [ngStyle]=\"{'display': isSelectEnabled(rowData, rowNode) ? 'block' : 'none'}\"\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$1.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"] }] }); }
|
|
2166
|
+
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 [ngStyle]=\"{'display': isSelectEnabled(rowData, rowNode) ? 'block' : 'none'}\"\r\n [disabled]=\"isDisabledCheckbox(rowData, rowNode)\"\r\n (click)=\"activeItemLote(selectedItems)\"\r\n [value]=\"rowNode\"\r\n ></p-treeTableCheckbox>\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 <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]=\"{'display': isSelectEnabled(rowData, rowNode) ? 'block' : 'none'}\"\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$1.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"] }] }); }
|
|
2164
2167
|
}
|
|
2165
2168
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvTreetableComponent, decorators: [{
|
|
2166
2169
|
type: Component,
|
|
2167
|
-
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 [ngStyle]=\"{'display': isSelectEnabled(rowData, rowNode) ? 'block' : 'none'}\"\r\n [disabled]=\"isDisabledCheckbox(rowData, rowNode)\"\r\n (click)=\"activeItemLote(selectedItems)\"\r\n [value]=\"rowNode\"\r\n ></p-treeTableCheckbox>\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 <p-treeTableToggler class=\"hiddenVisible\" [rowNode]=\"rowNode\" />\r\n\r\n <p-treeTableCheckbox\r\n [disabled]=\"isDisabledCheckbox(rowData, rowNode)\"\r\n (click)=\"activeItemLote(selectedItems)\"\r\n [value]=\"rowNode\"\r\n [ngStyle]=\"{'display': isSelectEnabled(rowData, rowNode) ? 'block' : 'none'}\"\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"] }]
|
|
2170
|
+
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 [ngStyle]=\"{'display': isSelectEnabled(rowData, rowNode) ? 'block' : 'none'}\"\r\n [disabled]=\"isDisabledCheckbox(rowData, rowNode)\"\r\n (click)=\"activeItemLote(selectedItems)\"\r\n [value]=\"rowNode\"\r\n ></p-treeTableCheckbox>\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 <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]=\"{'display': isSelectEnabled(rowData, rowNode) ? 'block' : 'none'}\"\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"] }]
|
|
2168
2171
|
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { config: [{
|
|
2169
2172
|
type: Input
|
|
2170
2173
|
}], dataSource: [{
|
|
@@ -3738,162 +3741,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImpor
|
|
|
3738
3741
|
}]
|
|
3739
3742
|
}] });
|
|
3740
3743
|
|
|
3741
|
-
// import { KvCropImageComponent } from './kv-crop-image/kv-crop-image.component';
|
|
3742
|
-
class KvAvatarComponent extends BaseComponentCrud {
|
|
3743
|
-
constructor(imageService, notificationService, dialogService, dynamicDialogRef) {
|
|
3744
|
-
super(dialogService, notificationService);
|
|
3745
|
-
this.imageService = imageService;
|
|
3746
|
-
this.notificationService = notificationService;
|
|
3747
|
-
this.dialogService = dialogService;
|
|
3748
|
-
this.dynamicDialogRef = dynamicDialogRef;
|
|
3749
|
-
this.borderColor = '#002542';
|
|
3750
|
-
this.btnsColor = '#002542';
|
|
3751
|
-
this.width = 135;
|
|
3752
|
-
this.height = 135;
|
|
3753
|
-
this.imageUrlChange = new EventEmitter();
|
|
3754
|
-
this.removerFotoEvent = new EventEmitter();
|
|
3755
|
-
this.onModalOpen = new EventEmitter();
|
|
3756
|
-
this.btnAlterarFoto = false;
|
|
3757
|
-
this.existeLogo = false;
|
|
3758
|
-
this.selectedImage = '';
|
|
3759
|
-
}
|
|
3760
|
-
getImageSrc() {
|
|
3761
|
-
if (this.imageUrl && (this.imageUrl.startsWith('data:image') || this.imageUrl.startsWith('http') || this.imageUrl.startsWith('https'))) {
|
|
3762
|
-
this.existeLogo = true;
|
|
3763
|
-
return this.imageUrl;
|
|
3764
|
-
}
|
|
3765
|
-
else if (this.imageUrl) {
|
|
3766
|
-
this.existeLogo = true;
|
|
3767
|
-
return 'data:image/jpg;base64,' + this.imageUrl;
|
|
3768
|
-
}
|
|
3769
|
-
else {
|
|
3770
|
-
this.existeLogo = false;
|
|
3771
|
-
return this.imageService.userDefaultImage();
|
|
3772
|
-
}
|
|
3773
|
-
}
|
|
3774
|
-
openFile() {
|
|
3775
|
-
const inputElement = document.getElementById('fotoEscolhida');
|
|
3776
|
-
if (inputElement) {
|
|
3777
|
-
inputElement.click();
|
|
3778
|
-
}
|
|
3779
|
-
}
|
|
3780
|
-
selectFotoSelecionada(event) {
|
|
3781
|
-
const file = event.target.files[0];
|
|
3782
|
-
if (file) {
|
|
3783
|
-
const reader = new FileReader();
|
|
3784
|
-
reader.readAsDataURL(file);
|
|
3785
|
-
reader.onload = () => {
|
|
3786
|
-
this.selectedImage = reader.result;
|
|
3787
|
-
this.existeLogo = true;
|
|
3788
|
-
// this.abrirModalRecortarFoto();
|
|
3789
|
-
};
|
|
3790
|
-
}
|
|
3791
|
-
}
|
|
3792
|
-
questionRemoverFoto() {
|
|
3793
|
-
const msg = '<h3>Você tem certeza que deseja retirar a foto desse usuário?</h3>';
|
|
3794
|
-
this.notificationService.question({
|
|
3795
|
-
type: 'question',
|
|
3796
|
-
message: msg,
|
|
3797
|
-
accept: (data) => {
|
|
3798
|
-
this.removerFoto();
|
|
3799
|
-
},
|
|
3800
|
-
reject: (data) => {
|
|
3801
|
-
}
|
|
3802
|
-
});
|
|
3803
|
-
}
|
|
3804
|
-
removerFoto() {
|
|
3805
|
-
this.imageUrl = '';
|
|
3806
|
-
this.removerFotoEvent.emit();
|
|
3807
|
-
this.existeLogo = false;
|
|
3808
|
-
this.imageUrlChange.emit(this.imageUrl);
|
|
3809
|
-
this.fileInput.nativeElement.value = '';
|
|
3810
|
-
}
|
|
3811
|
-
handleImageError(event) {
|
|
3812
|
-
event.target.src = this.imageService.userDefaultImage();
|
|
3813
|
-
}
|
|
3814
|
-
// abrirModalRecortarFoto() {
|
|
3815
|
-
// this.openDialog(
|
|
3816
|
-
// KvCropImageComponent,
|
|
3817
|
-
// () => {
|
|
3818
|
-
// this.imageUrl = this.receberDados();
|
|
3819
|
-
// this.imageUrlChange.emit(this.imageUrl);
|
|
3820
|
-
// },
|
|
3821
|
-
// {
|
|
3822
|
-
// maximizable: false,
|
|
3823
|
-
// popup: true,
|
|
3824
|
-
// width: '60%',
|
|
3825
|
-
// header: 'Recortar',
|
|
3826
|
-
// id:{imagemSelecionada: this.selectedImage, imagemCortada: ''}
|
|
3827
|
-
// }
|
|
3828
|
-
// )
|
|
3829
|
-
// const arr: Map<DynamicDialogRef<any>, ComponentRef<any>> = this.dialogService.dialogComponentRefMap
|
|
3830
|
-
// const entries = arr.entries();
|
|
3831
|
-
// const firstEntry = entries.next().value;
|
|
3832
|
-
// const [firstKey, firstValue] = firstEntry;
|
|
3833
|
-
// const instance = this.dialogService.getInstance(firstKey)
|
|
3834
|
-
// instance.config.showHeader = false
|
|
3835
|
-
// instance.config.contentStyle = {'border-radius': '12px'}
|
|
3836
|
-
// }
|
|
3837
|
-
receberDados() {
|
|
3838
|
-
const arr = this.dialogService.dialogComponentRefMap;
|
|
3839
|
-
const entries = arr.entries();
|
|
3840
|
-
const firstEntry = entries.next().value;
|
|
3841
|
-
const [firstKey, firstValue] = firstEntry;
|
|
3842
|
-
const instance = this.dialogService.getInstance(firstKey);
|
|
3843
|
-
return instance.config.data.id.imagemCortada;
|
|
3844
|
-
}
|
|
3845
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvAvatarComponent, deps: [{ token: ImagensService }, { token: NotificationService }, { token: i1$3.DialogService }, { token: i1$3.DynamicDialogRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3846
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.8", type: KvAvatarComponent, selector: "kv-avatar", inputs: { imageUrl: "imageUrl", borderColor: "borderColor", btnsColor: "btnsColor", width: "width", height: "height", btnAlterarFoto: "btnAlterarFoto" }, outputs: { imageUrlChange: "imageUrlChange", removerFotoEvent: "removerFotoEvent", onModalOpen: "onModalOpen" }, viewQueries: [{ propertyName: "fileInput", first: true, predicate: ["fileInput"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"image-container\">\r\n <img [src]=\"getImageSrc() || imageService.userDefaultImage()\" alt=\"Foto\" class=\"container-foto\" [style.border-color]=\"borderColor\" [style.width.px]=\"width\" [style.height.px]=\"height\" (error)=\"handleImageError($event)\" (click)=\"openFile()\">\r\n <div class=\"btn\">\r\n <input #fileInput *ngIf=\"btnAlterarFoto\" id=\"fotoEscolhida\" type=\"file\" accept=\"image/*\" style=\"display:none\" (change)=\"selectFotoSelecionada($any($event))\">\r\n <button *ngIf=\"btnAlterarFoto && !existeLogo\" class=\"botao-alterar-foto border-circle\" [style.background-color]=\"btnsColor\" (click)=\"openFile()\">\r\n <i class=\"material-symbols-outlined\">photo_camera</i>\r\n </button>\r\n \r\n <button *ngIf=\"btnAlterarFoto && existeLogo\" [style.background-color]=\"btnsColor\" class=\"botao-excluir-foto border-circle\" (click)=\"questionRemoverFoto()\">\r\n <i class=\"material-symbols-outlined\">delete</i>\r\n </button>\r\n </div>\r\n</div>\r\n", styles: ["@charset \"UTF-8\";@import\"https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap\";@import\"https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap\";@import\"https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0\";.material-symbols-outlined{font-family:Material Symbols Outlined!important}*{font-family:Inter var,Inter,sans-serif!important}::ng-deep .p-accordion,::ng-deep .p-accordion-header,::ng-deep .p-accordion-content,::ng-deep .p-badge,::ng-deep .p-overlay-badge,::ng-deep .p-breadcrumb,::ng-deep .p-breadcrumb-item,::ng-deep .p-breadcrumb-link,::ng-deep .p-button,::ng-deep .p-calendar,::ng-deep .p-card,::ng-deep .p-card-title,::ng-deep .p-card-subtitle,::ng-deep .p-card-content,::ng-deep .p-checkbox,::ng-deep .p-chip,::ng-deep .p-confirm-dialog,::ng-deep .p-confirm-dialog-message,::ng-deep .p-contextmenu,::ng-deep .p-contextmenu-item,::ng-deep .p-dataview,::ng-deep .p-dataview-content,::ng-deep .p-dialog,::ng-deep .p-dialog-title,::ng-deep .p-dialog-content,::ng-deep .p-dropdown,::ng-deep .p-dropdown-label,::ng-deep .p-dropdown-item,::ng-deep .p-dynamic-dialog,::ng-deep .p-dynamic-dialog-title,::ng-deep .p-dynamic-dialog-content,::ng-deep .p-editor,::ng-deep .p-fieldset,::ng-deep .p-fieldset-legend,::ng-deep .p-fieldset-content,::ng-deep .p-fileupload,::ng-deep .p-inputmask,::ng-deep .p-inputnumber,::ng-deep .p-inputtextarea,::ng-deep .p-inputtext,::ng-deep .p-menu,::ng-deep .p-menuitem,::ng-deep .p-menuitem-text,::ng-deep .p-message,::ng-deep .p-messages,::ng-deep .p-multiselect,::ng-deep .p-multiselect-label,::ng-deep .p-multiselect-item,::ng-deep .p-panelmenu,::ng-deep .p-panelmenu-header,::ng-deep .p-panelmenu-content,::ng-deep .p-panel,::ng-deep .p-panel-header,::ng-deep .p-panel-content,::ng-deep .p-password,::ng-deep .p-picklist,::ng-deep .p-progressbar,::ng-deep .p-radiobutton,::ng-deep .p-rating,::ng-deep .p-sidebar,::ng-deep .p-splitbutton,::ng-deep .p-steps,::ng-deep .p-step,::ng-deep .p-table,::ng-deep .p-datatable,::ng-deep .p-tabview,::ng-deep .p-tabpanel,::ng-deep .p-tag,::ng-deep .p-toast,::ng-deep .p-toolbar,::ng-deep .p-tooltip,::ng-deep .p-tree,::ng-deep .p-treetable,::ng-deep .p-selectbutton,::ng-deep .p-stepper,::ng-deep .p-inputgroup,::ng-deep .p-inputgroup-addon,::ng-deep .p-text{font-family:Inter var,Inter,sans-serif!important}:host ::ng-deep .inputs{height:35px}:root{--kv-primary-color: #29b92d, --kv-secondary-color: #002542, --kv-terciary-color: #f2f3f5, --kv-primary-hover-color: #249a29, --kv-secondary-hover-color: #002038, --kv-terciary-hover-color: #d9dadb, --kv-primary-active-color: #1c801f, --kv-secondary-active-color: #001729, --kv-terciary-active-color: #c0c1c2, --kv-primary-disable-color: #1c801f, --kv-secondary-disable-color: #001729, --kv-terciary-disable-color: #c0c1c2, }::ng-deep .p-dialog .p-dialog-header{color:#fff!important;background:#002542!important;display:flex!important;flex-wrap:wrap;word-wrap:break-word}::ng-deep .p-dialog .p-dialog-content{padding-top:1rem}::ng-deep .p-dialog{min-width:320px}::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}::ng-deep .p-dialog-footer{display:flex;justify-content:flex-end;padding:10px;gap:10px}::ng-deep .p-dialog .p-dialog-header .p-dialog-header-icon{display:none}img{border-style:solid;border-width:2px;border-radius:50%;object-fit:cover}i{font-size:22px}.botao-alterar-foto{border-style:none;width:max-content;background-color:#002542;color:#000;font-weight:700;cursor:pointer;padding:7px 9px}.botao-alterar-foto i{color:#fff}.botao-excluir-foto{border-style:none;width:max-content;background-color:#002542;color:#000;font-weight:700;cursor:pointer;padding:7px 9px}.botao-excluir-foto i{color:#fff}.btn{position:absolute;top:87%;left:87%;transform:translate(-50%,-50%)}.image-container{display:inline-block;position:relative}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
|
|
3847
|
-
}
|
|
3848
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvAvatarComponent, decorators: [{
|
|
3849
|
-
type: Component,
|
|
3850
|
-
args: [{ selector: 'kv-avatar', template: "<div class=\"image-container\">\r\n <img [src]=\"getImageSrc() || imageService.userDefaultImage()\" alt=\"Foto\" class=\"container-foto\" [style.border-color]=\"borderColor\" [style.width.px]=\"width\" [style.height.px]=\"height\" (error)=\"handleImageError($event)\" (click)=\"openFile()\">\r\n <div class=\"btn\">\r\n <input #fileInput *ngIf=\"btnAlterarFoto\" id=\"fotoEscolhida\" type=\"file\" accept=\"image/*\" style=\"display:none\" (change)=\"selectFotoSelecionada($any($event))\">\r\n <button *ngIf=\"btnAlterarFoto && !existeLogo\" class=\"botao-alterar-foto border-circle\" [style.background-color]=\"btnsColor\" (click)=\"openFile()\">\r\n <i class=\"material-symbols-outlined\">photo_camera</i>\r\n </button>\r\n \r\n <button *ngIf=\"btnAlterarFoto && existeLogo\" [style.background-color]=\"btnsColor\" class=\"botao-excluir-foto border-circle\" (click)=\"questionRemoverFoto()\">\r\n <i class=\"material-symbols-outlined\">delete</i>\r\n </button>\r\n </div>\r\n</div>\r\n", styles: ["@charset \"UTF-8\";@import\"https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap\";@import\"https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap\";@import\"https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0\";.material-symbols-outlined{font-family:Material Symbols Outlined!important}*{font-family:Inter var,Inter,sans-serif!important}::ng-deep .p-accordion,::ng-deep .p-accordion-header,::ng-deep .p-accordion-content,::ng-deep .p-badge,::ng-deep .p-overlay-badge,::ng-deep .p-breadcrumb,::ng-deep .p-breadcrumb-item,::ng-deep .p-breadcrumb-link,::ng-deep .p-button,::ng-deep .p-calendar,::ng-deep .p-card,::ng-deep .p-card-title,::ng-deep .p-card-subtitle,::ng-deep .p-card-content,::ng-deep .p-checkbox,::ng-deep .p-chip,::ng-deep .p-confirm-dialog,::ng-deep .p-confirm-dialog-message,::ng-deep .p-contextmenu,::ng-deep .p-contextmenu-item,::ng-deep .p-dataview,::ng-deep .p-dataview-content,::ng-deep .p-dialog,::ng-deep .p-dialog-title,::ng-deep .p-dialog-content,::ng-deep .p-dropdown,::ng-deep .p-dropdown-label,::ng-deep .p-dropdown-item,::ng-deep .p-dynamic-dialog,::ng-deep .p-dynamic-dialog-title,::ng-deep .p-dynamic-dialog-content,::ng-deep .p-editor,::ng-deep .p-fieldset,::ng-deep .p-fieldset-legend,::ng-deep .p-fieldset-content,::ng-deep .p-fileupload,::ng-deep .p-inputmask,::ng-deep .p-inputnumber,::ng-deep .p-inputtextarea,::ng-deep .p-inputtext,::ng-deep .p-menu,::ng-deep .p-menuitem,::ng-deep .p-menuitem-text,::ng-deep .p-message,::ng-deep .p-messages,::ng-deep .p-multiselect,::ng-deep .p-multiselect-label,::ng-deep .p-multiselect-item,::ng-deep .p-panelmenu,::ng-deep .p-panelmenu-header,::ng-deep .p-panelmenu-content,::ng-deep .p-panel,::ng-deep .p-panel-header,::ng-deep .p-panel-content,::ng-deep .p-password,::ng-deep .p-picklist,::ng-deep .p-progressbar,::ng-deep .p-radiobutton,::ng-deep .p-rating,::ng-deep .p-sidebar,::ng-deep .p-splitbutton,::ng-deep .p-steps,::ng-deep .p-step,::ng-deep .p-table,::ng-deep .p-datatable,::ng-deep .p-tabview,::ng-deep .p-tabpanel,::ng-deep .p-tag,::ng-deep .p-toast,::ng-deep .p-toolbar,::ng-deep .p-tooltip,::ng-deep .p-tree,::ng-deep .p-treetable,::ng-deep .p-selectbutton,::ng-deep .p-stepper,::ng-deep .p-inputgroup,::ng-deep .p-inputgroup-addon,::ng-deep .p-text{font-family:Inter var,Inter,sans-serif!important}:host ::ng-deep .inputs{height:35px}:root{--kv-primary-color: #29b92d, --kv-secondary-color: #002542, --kv-terciary-color: #f2f3f5, --kv-primary-hover-color: #249a29, --kv-secondary-hover-color: #002038, --kv-terciary-hover-color: #d9dadb, --kv-primary-active-color: #1c801f, --kv-secondary-active-color: #001729, --kv-terciary-active-color: #c0c1c2, --kv-primary-disable-color: #1c801f, --kv-secondary-disable-color: #001729, --kv-terciary-disable-color: #c0c1c2, }::ng-deep .p-dialog .p-dialog-header{color:#fff!important;background:#002542!important;display:flex!important;flex-wrap:wrap;word-wrap:break-word}::ng-deep .p-dialog .p-dialog-content{padding-top:1rem}::ng-deep .p-dialog{min-width:320px}::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}::ng-deep .p-dialog-footer{display:flex;justify-content:flex-end;padding:10px;gap:10px}::ng-deep .p-dialog .p-dialog-header .p-dialog-header-icon{display:none}img{border-style:solid;border-width:2px;border-radius:50%;object-fit:cover}i{font-size:22px}.botao-alterar-foto{border-style:none;width:max-content;background-color:#002542;color:#000;font-weight:700;cursor:pointer;padding:7px 9px}.botao-alterar-foto i{color:#fff}.botao-excluir-foto{border-style:none;width:max-content;background-color:#002542;color:#000;font-weight:700;cursor:pointer;padding:7px 9px}.botao-excluir-foto i{color:#fff}.btn{position:absolute;top:87%;left:87%;transform:translate(-50%,-50%)}.image-container{display:inline-block;position:relative}\n"] }]
|
|
3851
|
-
}], ctorParameters: () => [{ type: ImagensService }, { type: NotificationService }, { type: i1$3.DialogService }, { type: i1$3.DynamicDialogRef }], propDecorators: { imageUrl: [{
|
|
3852
|
-
type: Input
|
|
3853
|
-
}], borderColor: [{
|
|
3854
|
-
type: Input
|
|
3855
|
-
}], btnsColor: [{
|
|
3856
|
-
type: Input
|
|
3857
|
-
}], width: [{
|
|
3858
|
-
type: Input
|
|
3859
|
-
}], height: [{
|
|
3860
|
-
type: Input
|
|
3861
|
-
}], imageUrlChange: [{
|
|
3862
|
-
type: Output
|
|
3863
|
-
}], removerFotoEvent: [{
|
|
3864
|
-
type: Output
|
|
3865
|
-
}], onModalOpen: [{
|
|
3866
|
-
type: Output
|
|
3867
|
-
}], btnAlterarFoto: [{
|
|
3868
|
-
type: Input
|
|
3869
|
-
}], fileInput: [{
|
|
3870
|
-
type: ViewChild,
|
|
3871
|
-
args: ['fileInput']
|
|
3872
|
-
}] } });
|
|
3873
|
-
|
|
3874
|
-
class KvButtonModule {
|
|
3875
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
3876
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.8", ngImport: i0, type: KvButtonModule, declarations: [KvButtonComponent], imports: [CommonModule,
|
|
3877
|
-
PrimeNgModule], exports: [KvButtonComponent] }); }
|
|
3878
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvButtonModule, imports: [CommonModule,
|
|
3879
|
-
PrimeNgModule] }); }
|
|
3880
|
-
}
|
|
3881
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvButtonModule, decorators: [{
|
|
3882
|
-
type: NgModule,
|
|
3883
|
-
args: [{
|
|
3884
|
-
declarations: [
|
|
3885
|
-
KvButtonComponent
|
|
3886
|
-
],
|
|
3887
|
-
imports: [
|
|
3888
|
-
CommonModule,
|
|
3889
|
-
PrimeNgModule
|
|
3890
|
-
],
|
|
3891
|
-
exports: [
|
|
3892
|
-
KvButtonComponent
|
|
3893
|
-
]
|
|
3894
|
-
}]
|
|
3895
|
-
}] });
|
|
3896
|
-
|
|
3897
3744
|
class KvLabelModule {
|
|
3898
3745
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvLabelModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
3899
3746
|
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.8", ngImport: i0, type: KvLabelModule, declarations: [KvLabelComponent], imports: [CommonModule], exports: [KvLabelComponent] }); }
|
|
@@ -4006,21 +3853,364 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImpor
|
|
|
4006
3853
|
args: ['window:resize', ['$event']]
|
|
4007
3854
|
}] } });
|
|
4008
3855
|
|
|
4009
|
-
class
|
|
4010
|
-
|
|
4011
|
-
|
|
4012
|
-
|
|
3856
|
+
class KvCropImageComponent extends BaseComponentCrud$1 {
|
|
3857
|
+
onWindowResize() {
|
|
3858
|
+
this.widthTela = window.innerWidth;
|
|
3859
|
+
this.updateCanvasSize();
|
|
3860
|
+
}
|
|
3861
|
+
constructor(imageService, notificationService, dialogService, dynamicDialogRef, dynamicDialogConfig) {
|
|
3862
|
+
super(dialogService, notificationService);
|
|
3863
|
+
this.imageService = imageService;
|
|
3864
|
+
this.notificationService = notificationService;
|
|
3865
|
+
this.dialogService = dialogService;
|
|
3866
|
+
this.dynamicDialogRef = dynamicDialogRef;
|
|
3867
|
+
this.dynamicDialogConfig = dynamicDialogConfig;
|
|
3868
|
+
this.imageLoaded = false;
|
|
3869
|
+
this.imageX = 0;
|
|
3870
|
+
this.imageY = 0;
|
|
3871
|
+
this.startX = 0;
|
|
3872
|
+
this.startY = 0;
|
|
3873
|
+
this.valueZoom = 50;
|
|
3874
|
+
this.scaleFactor = 1;
|
|
3875
|
+
this.selectedImage = '';
|
|
3876
|
+
this.actionsModal = [
|
|
3877
|
+
{
|
|
3878
|
+
label: 'Cancelar',
|
|
3879
|
+
severity: 'tertiary',
|
|
3880
|
+
icon: 'cancel',
|
|
3881
|
+
command: (e) => {
|
|
3882
|
+
this.dynamicDialogRef.close();
|
|
3883
|
+
},
|
|
3884
|
+
},
|
|
3885
|
+
{
|
|
3886
|
+
label: 'Recortar',
|
|
3887
|
+
severity: 'primary',
|
|
3888
|
+
icon: 'crop',
|
|
3889
|
+
command: (e) => {
|
|
3890
|
+
this.cropImage();
|
|
3891
|
+
},
|
|
3892
|
+
},
|
|
3893
|
+
];
|
|
3894
|
+
this.widthTela = window.innerWidth;
|
|
3895
|
+
this.selectedImage = this.dynamicDialogConfig.data.id.imagemSelecionada;
|
|
3896
|
+
this.openCropModal();
|
|
3897
|
+
}
|
|
3898
|
+
openCropModal() {
|
|
3899
|
+
setTimeout(() => {
|
|
3900
|
+
const canvas = this.cropCanvas.nativeElement;
|
|
3901
|
+
const ctx = canvas.getContext('2d');
|
|
3902
|
+
const img = new Image();
|
|
3903
|
+
img.src = this.selectedImage;
|
|
3904
|
+
img.onload = () => {
|
|
3905
|
+
this.imageLoaded = true;
|
|
3906
|
+
this.imageX = (canvas.width - img.width * this.scaleFactor) / 2;
|
|
3907
|
+
this.imageY = (canvas.height - img.height * this.scaleFactor) / 2;
|
|
3908
|
+
canvas.width = this.retornaTamanhoCanvas();
|
|
3909
|
+
canvas.height = 400;
|
|
3910
|
+
this.redrawCanvas(ctx, img);
|
|
3911
|
+
this.initializeImageMove(canvas, ctx, img);
|
|
3912
|
+
this.initializeMouseWheel(canvas, ctx, img);
|
|
3913
|
+
};
|
|
3914
|
+
}, 0);
|
|
3915
|
+
}
|
|
3916
|
+
redrawCanvas(ctx, img) {
|
|
3917
|
+
if (!ctx)
|
|
3918
|
+
return;
|
|
3919
|
+
ctx.clearRect(0, 0, ctx.canvas.width, ctx.canvas.height);
|
|
3920
|
+
ctx.filter = 'blur(5px) opacity(0.9)';
|
|
3921
|
+
ctx.drawImage(img, this.imageX, this.imageY, img.width * this.scaleFactor, img.height * this.scaleFactor);
|
|
3922
|
+
ctx.filter = 'none';
|
|
3923
|
+
this.drawImageInCropArea(ctx, img);
|
|
3924
|
+
this.drawCropArea(ctx);
|
|
3925
|
+
}
|
|
3926
|
+
initializeImageMove(canvas, ctx, img) {
|
|
3927
|
+
let isDragging = false;
|
|
3928
|
+
canvas.style.cursor = 'grab';
|
|
3929
|
+
canvas.onmousedown = (e) => {
|
|
3930
|
+
isDragging = true;
|
|
3931
|
+
canvas.style.cursor = 'grabbing';
|
|
3932
|
+
this.startX = e.offsetX - this.imageX;
|
|
3933
|
+
this.startY = e.offsetY - this.imageY;
|
|
3934
|
+
};
|
|
3935
|
+
canvas.onmousemove = (e) => {
|
|
3936
|
+
if (isDragging) {
|
|
3937
|
+
this.imageX = e.offsetX - this.startX;
|
|
3938
|
+
this.imageY = e.offsetY - this.startY;
|
|
3939
|
+
this.redrawCanvas(ctx, img);
|
|
3940
|
+
}
|
|
3941
|
+
};
|
|
3942
|
+
canvas.onmouseup = () => {
|
|
3943
|
+
isDragging = false;
|
|
3944
|
+
canvas.style.cursor = 'grab';
|
|
3945
|
+
};
|
|
3946
|
+
canvas.onmouseout = () => {
|
|
3947
|
+
isDragging = false;
|
|
3948
|
+
canvas.style.cursor = 'grab';
|
|
3949
|
+
};
|
|
3950
|
+
}
|
|
3951
|
+
initializeMouseWheel(canvas, ctx, img) {
|
|
3952
|
+
canvas.onwheel = (e) => {
|
|
3953
|
+
e.preventDefault();
|
|
3954
|
+
const delta = e.deltaY > 0 ? -0.1 : 0.1;
|
|
3955
|
+
this.scaleFactor = Math.min(Math.max(this.scaleFactor + delta, 0.1), 5); // limita o fator de escala entre 0.1 e 5
|
|
3956
|
+
this.redrawCanvas(ctx, img);
|
|
3957
|
+
this.valueZoom = this.scaleFactor * 50;
|
|
3958
|
+
};
|
|
3959
|
+
}
|
|
3960
|
+
drawImageInCropArea(ctx, img) {
|
|
3961
|
+
if (!ctx)
|
|
3962
|
+
return;
|
|
3963
|
+
// Calcula a posição da área de corte
|
|
3964
|
+
const cropX = (ctx.canvas.width - 225) / 2;
|
|
3965
|
+
const cropY = (ctx.canvas.height - 225) / 2;
|
|
3966
|
+
// Desenha a imagem de não desfocada dentro da área de corte
|
|
3967
|
+
ctx.save();
|
|
3968
|
+
ctx.beginPath();
|
|
3969
|
+
ctx.arc(cropX + 112.5, cropY + 112.5, 112.5, 0, Math.PI * 2, true);
|
|
3970
|
+
ctx.clip();
|
|
3971
|
+
ctx.drawImage(img, this.imageX, this.imageY, img.width * this.scaleFactor, img.height * this.scaleFactor);
|
|
3972
|
+
ctx.restore();
|
|
3973
|
+
}
|
|
3974
|
+
drawCropArea(ctx) {
|
|
3975
|
+
if (!ctx)
|
|
3976
|
+
return;
|
|
3977
|
+
ctx.beginPath();
|
|
3978
|
+
const cropX = (ctx.canvas.width - 225) / 2;
|
|
3979
|
+
const cropY = (ctx.canvas.height - 225) / 2;
|
|
3980
|
+
ctx.arc(cropX + 112.5, cropY + 112.5, 112.5, 0, Math.PI * 2, true);
|
|
3981
|
+
ctx.strokeStyle = 'transparent';
|
|
3982
|
+
ctx.lineWidth = 2;
|
|
3983
|
+
ctx.stroke();
|
|
3984
|
+
}
|
|
3985
|
+
updateCanvasSize() {
|
|
3986
|
+
const canvas = this.cropCanvas.nativeElement;
|
|
3987
|
+
const ctx = canvas.getContext('2d');
|
|
3988
|
+
const img = new Image();
|
|
3989
|
+
img.src = this.selectedImage;
|
|
3990
|
+
img.onload = () => {
|
|
3991
|
+
this.imageLoaded = true;
|
|
3992
|
+
this.imageX = (canvas.width - img.width * this.scaleFactor) / 2;
|
|
3993
|
+
this.imageY = (canvas.height - img.height * this.scaleFactor) / 2;
|
|
3994
|
+
canvas.width = this.retornaTamanhoCanvas();
|
|
3995
|
+
canvas.height = 400;
|
|
3996
|
+
this.redrawCanvas(ctx, img);
|
|
3997
|
+
};
|
|
3998
|
+
}
|
|
3999
|
+
onZoomChange(event) {
|
|
4000
|
+
const canvas = this.cropCanvas.nativeElement;
|
|
4001
|
+
const ctx = canvas.getContext('2d');
|
|
4002
|
+
const img = new Image();
|
|
4003
|
+
img.src = this.selectedImage;
|
|
4004
|
+
img.onload = () => {
|
|
4005
|
+
this.scaleFactor = event.value / 50;
|
|
4006
|
+
this.redrawCanvas(ctx, img);
|
|
4007
|
+
};
|
|
4008
|
+
}
|
|
4009
|
+
cropImage() {
|
|
4010
|
+
const canvas = this.cropCanvas.nativeElement;
|
|
4011
|
+
const ctx = canvas.getContext('2d');
|
|
4012
|
+
if (ctx) {
|
|
4013
|
+
const centerX = canvas.width / 2;
|
|
4014
|
+
const centerY = canvas.height / 2;
|
|
4015
|
+
const radius = 100;
|
|
4016
|
+
const imageData = ctx.getImageData(centerX - radius, centerY - radius, radius * 2, radius * 2);
|
|
4017
|
+
const newCanvas = document.createElement('canvas');
|
|
4018
|
+
const newCtx = newCanvas.getContext('2d');
|
|
4019
|
+
newCanvas.width = radius * 2;
|
|
4020
|
+
newCanvas.height = radius * 2;
|
|
4021
|
+
newCtx?.putImageData(imageData, 0, 0);
|
|
4022
|
+
this.selectedImage = newCanvas.toDataURL();
|
|
4023
|
+
this.enviarDados();
|
|
4024
|
+
this.dynamicDialogRef.close(this.selectedImage);
|
|
4025
|
+
}
|
|
4026
|
+
}
|
|
4027
|
+
enviarDados() {
|
|
4028
|
+
const arr = this.dialogService.dialogComponentRefMap;
|
|
4029
|
+
const entries = arr.entries();
|
|
4030
|
+
const firstEntry = entries.next().value;
|
|
4031
|
+
const [firstKey, firstValue] = firstEntry;
|
|
4032
|
+
const instance = this.dialogService.getInstance(firstKey);
|
|
4033
|
+
instance.config.data.id.imagemCortada = this.selectedImage;
|
|
4034
|
+
}
|
|
4035
|
+
retornaTamanhoCanvas() {
|
|
4036
|
+
if (this.widthTela < 500) {
|
|
4037
|
+
return this.widthTela * 0.7;
|
|
4038
|
+
}
|
|
4039
|
+
return this.widthTela * 0.4;
|
|
4040
|
+
}
|
|
4041
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvCropImageComponent, deps: [{ token: i1$5.ImagensService }, { token: i1$5.NotificationService }, { token: i1$3.DialogService }, { token: i1$3.DynamicDialogRef }, { token: i1$3.DynamicDialogConfig }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4042
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.8", type: KvCropImageComponent, isStandalone: true, selector: "kv-crop-image", host: { listeners: { "window:resize": "onWindowResize($event)" } }, viewQueries: [{ propertyName: "cropCanvas", first: true, predicate: ["cropCanvas"], descendants: true }, { propertyName: "fileInput", first: true, predicate: ["fileInput"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<kv-modal [actions]=\"actionsModal\">\r\n <div class=\"crop-container\">\r\n <canvas #cropCanvas class=\"crop-canvas\"></canvas>\r\n <div class=\"crop-border\"></div>\r\n </div>\r\n \r\n <div class=\"w-full zoom-container\">\r\n <kv-label label=\"Zoom\" style=\"text-align: left;\"/>\r\n <p-slider [(ngModel)]=\"valueZoom\" (onChange)=\"onZoomChange($event)\"></p-slider>\r\n </div>\r\n</kv-modal>\r\n", styles: [".crop-container{display:flex;justify-content:center;align-items:center}.crop-canvas{border:1px solid black;border-radius:12px}.crop-border{position:absolute;width:225px;height:225px;border:2px solid black;border-radius:50%;pointer-events:none}.zoom-container{padding-top:20px;padding-bottom:20px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: KvModalModule$1 }, { kind: "component", type: KvModalComponent, selector: "kv-modal", inputs: ["actions", "actionsPosition", "subtitle", "subHeader"] }, { kind: "ngmodule", type: PrimeNgModule$1 }, { kind: "ngmodule", type: KvLabelModule }, { kind: "component", type: KvLabelComponent, selector: "kv-label", inputs: ["componentId", "label"] }, { kind: "ngmodule", type: SliderModule }, { kind: "component", type: i6$1.Slider, selector: "p-slider", inputs: ["animate", "disabled", "min", "max", "orientation", "step", "range", "style", "styleClass", "ariaLabel", "ariaLabelledBy", "tabindex", "autofocus"], outputs: ["onChange", "onSlideEnd"] }] }); }
|
|
4013
4043
|
}
|
|
4014
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type:
|
|
4044
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvCropImageComponent, decorators: [{
|
|
4045
|
+
type: Component,
|
|
4046
|
+
args: [{ selector: 'kv-crop-image', standalone: true, imports: [
|
|
4047
|
+
CommonModule,
|
|
4048
|
+
FormsModule,
|
|
4049
|
+
KvModalModule$1,
|
|
4050
|
+
PrimeNgModule$1,
|
|
4051
|
+
KvLabelModule,
|
|
4052
|
+
SliderModule
|
|
4053
|
+
], template: "<kv-modal [actions]=\"actionsModal\">\r\n <div class=\"crop-container\">\r\n <canvas #cropCanvas class=\"crop-canvas\"></canvas>\r\n <div class=\"crop-border\"></div>\r\n </div>\r\n \r\n <div class=\"w-full zoom-container\">\r\n <kv-label label=\"Zoom\" style=\"text-align: left;\"/>\r\n <p-slider [(ngModel)]=\"valueZoom\" (onChange)=\"onZoomChange($event)\"></p-slider>\r\n </div>\r\n</kv-modal>\r\n", styles: [".crop-container{display:flex;justify-content:center;align-items:center}.crop-canvas{border:1px solid black;border-radius:12px}.crop-border{position:absolute;width:225px;height:225px;border:2px solid black;border-radius:50%;pointer-events:none}.zoom-container{padding-top:20px;padding-bottom:20px}\n"] }]
|
|
4054
|
+
}], ctorParameters: () => [{ type: i1$5.ImagensService }, { type: i1$5.NotificationService }, { type: i1$3.DialogService }, { type: i1$3.DynamicDialogRef }, { type: i1$3.DynamicDialogConfig }], propDecorators: { onWindowResize: [{
|
|
4055
|
+
type: HostListener,
|
|
4056
|
+
args: ['window:resize', ['$event']]
|
|
4057
|
+
}], cropCanvas: [{
|
|
4058
|
+
type: ViewChild,
|
|
4059
|
+
args: ['cropCanvas']
|
|
4060
|
+
}], fileInput: [{
|
|
4061
|
+
type: ViewChild,
|
|
4062
|
+
args: ['fileInput']
|
|
4063
|
+
}] } });
|
|
4064
|
+
|
|
4065
|
+
class KvAvatarComponent extends BaseComponentCrud {
|
|
4066
|
+
constructor(imageService, notificationService, dialogService) {
|
|
4067
|
+
super(dialogService, notificationService);
|
|
4068
|
+
this.imageService = imageService;
|
|
4069
|
+
this.notificationService = notificationService;
|
|
4070
|
+
this.dialogService = dialogService;
|
|
4071
|
+
this.borderColor = '#002542';
|
|
4072
|
+
this.btnsColor = '#002542';
|
|
4073
|
+
this.width = 135;
|
|
4074
|
+
this.height = 135;
|
|
4075
|
+
this.imageUrlChange = new EventEmitter();
|
|
4076
|
+
this.removerFotoEvent = new EventEmitter();
|
|
4077
|
+
this.onModalOpen = new EventEmitter();
|
|
4078
|
+
this.btnAlterarFoto = false;
|
|
4079
|
+
this.existeLogo = false;
|
|
4080
|
+
this.selectedImage = '';
|
|
4081
|
+
this.imageUrl = input(this.imageService.userDefaultImage());
|
|
4082
|
+
this.imageSource = signal(this.imageService.userDefaultImage());
|
|
4083
|
+
}
|
|
4084
|
+
ngOnInit() {
|
|
4085
|
+
this.imageSource.set(this.imageUrl());
|
|
4086
|
+
this.getImageSrc();
|
|
4087
|
+
}
|
|
4088
|
+
getImageSrc() {
|
|
4089
|
+
if (this.imageUrl && (this.imageUrl().startsWith('data:image') || this.imageUrl().startsWith('http') || this.imageUrl().startsWith('https'))) {
|
|
4090
|
+
this.existeLogo = true;
|
|
4091
|
+
}
|
|
4092
|
+
else if (this.imageUrl.length > 0) {
|
|
4093
|
+
this.existeLogo = true;
|
|
4094
|
+
this.imageSource.set('data:image/jpg;base64,' + this.imageUrl);
|
|
4095
|
+
}
|
|
4096
|
+
else {
|
|
4097
|
+
this.existeLogo = false;
|
|
4098
|
+
this.imageSource.set(this.imageService.userDefaultImage());
|
|
4099
|
+
}
|
|
4100
|
+
}
|
|
4101
|
+
openFile() {
|
|
4102
|
+
const inputElement = document.getElementById('fotoEscolhida');
|
|
4103
|
+
if (inputElement) {
|
|
4104
|
+
inputElement.click();
|
|
4105
|
+
}
|
|
4106
|
+
}
|
|
4107
|
+
selectFotoSelecionada(event) {
|
|
4108
|
+
const file = event.target.files[0];
|
|
4109
|
+
if (file) {
|
|
4110
|
+
const reader = new FileReader();
|
|
4111
|
+
reader.readAsDataURL(file);
|
|
4112
|
+
reader.onload = () => {
|
|
4113
|
+
this.selectedImage = reader.result;
|
|
4114
|
+
this.abrirModalRecortarFoto();
|
|
4115
|
+
this.existeLogo = false;
|
|
4116
|
+
};
|
|
4117
|
+
}
|
|
4118
|
+
}
|
|
4119
|
+
questionRemoverFoto() {
|
|
4120
|
+
const msg = '<h3>Você tem certeza que deseja retirar a foto desse usuário?</h3>';
|
|
4121
|
+
this.notificationService.question({
|
|
4122
|
+
type: 'question',
|
|
4123
|
+
message: msg,
|
|
4124
|
+
accept: (data) => {
|
|
4125
|
+
this.removerFoto();
|
|
4126
|
+
},
|
|
4127
|
+
reject: (data) => {
|
|
4128
|
+
}
|
|
4129
|
+
});
|
|
4130
|
+
}
|
|
4131
|
+
removerFoto() {
|
|
4132
|
+
this.imageSource.set('');
|
|
4133
|
+
this.removerFotoEvent.emit();
|
|
4134
|
+
this.existeLogo = false;
|
|
4135
|
+
this.imageUrlChange.emit(this.imageSource());
|
|
4136
|
+
this.fileInput.nativeElement.value = '';
|
|
4137
|
+
}
|
|
4138
|
+
handleImageError(event) {
|
|
4139
|
+
event.target.src = this.imageService.userDefaultImage();
|
|
4140
|
+
}
|
|
4141
|
+
abrirModalRecortarFoto() {
|
|
4142
|
+
this.openDialog(KvCropImageComponent, () => {
|
|
4143
|
+
this.imageUrl = this.receberDados();
|
|
4144
|
+
this.imageSource.set(this.receberDados());
|
|
4145
|
+
this.imageUrlChange.emit(this.imageSource());
|
|
4146
|
+
this.existeLogo = true;
|
|
4147
|
+
}, {
|
|
4148
|
+
maximizable: false,
|
|
4149
|
+
popup: true,
|
|
4150
|
+
width: '60%',
|
|
4151
|
+
header: 'Recortar',
|
|
4152
|
+
id: { imagemSelecionada: this.selectedImage, imagemCortada: '' }
|
|
4153
|
+
});
|
|
4154
|
+
const [firstKey] = this.dialogService.dialogComponentRefMap.entries().next().value;
|
|
4155
|
+
const instance = this.dialogService.getInstance(firstKey);
|
|
4156
|
+
instance.config.showHeader = false;
|
|
4157
|
+
instance.config.contentStyle = { 'border-radius': '12px' };
|
|
4158
|
+
}
|
|
4159
|
+
receberDados() {
|
|
4160
|
+
const [firstKey] = this.dialogService.dialogComponentRefMap.entries().next().value;
|
|
4161
|
+
const instance = this.dialogService.getInstance(firstKey);
|
|
4162
|
+
return instance.config.data.id.imagemCortada;
|
|
4163
|
+
}
|
|
4164
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvAvatarComponent, deps: [{ token: ImagensService }, { token: NotificationService }, { token: i1$3.DialogService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4165
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "17.3.8", type: KvAvatarComponent, selector: "kv-avatar", inputs: { borderColor: { classPropertyName: "borderColor", publicName: "borderColor", isSignal: false, isRequired: false, transformFunction: null }, btnsColor: { classPropertyName: "btnsColor", publicName: "btnsColor", isSignal: false, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: false, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: false, isRequired: false, transformFunction: null }, btnAlterarFoto: { classPropertyName: "btnAlterarFoto", publicName: "btnAlterarFoto", isSignal: false, isRequired: false, transformFunction: null }, imageUrl: { classPropertyName: "imageUrl", publicName: "imageUrl", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { imageUrlChange: "imageUrlChange", removerFotoEvent: "removerFotoEvent", onModalOpen: "onModalOpen" }, viewQueries: [{ propertyName: "fileInput", first: true, predicate: ["fileInput"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"image-container\">\r\n <!-- <img [src]=\"getImageSrc() || imageService.userDefaultImage()\" alt=\"Foto\" class=\"container-foto\" [style.border-color]=\"borderColor\" [style.width.px]=\"width\" [style.height.px]=\"height\" (error)=\"handleImageError($event)\" (click)=\"openFile()\"> -->\r\n\r\n <img [src]=\"imageSource()\" alt=\"Foto\" class=\"container-foto\" [style.border-color]=\"borderColor\" [style.width.px]=\"width\" [style.height.px]=\"height\" (error)=\"handleImageError($event)\">\r\n <div class=\"btn\">\r\n <input #fileInput *ngIf=\"btnAlterarFoto\" id=\"fotoEscolhida\" type=\"file\" accept=\"image/*\" style=\"display:none\" (change)=\"selectFotoSelecionada($any($event))\">\r\n <button *ngIf=\"btnAlterarFoto && !existeLogo\" class=\"botao-alterar-foto border-circle\" [style.background-color]=\"btnsColor\" (click)=\"openFile()\">\r\n <i class=\"material-symbols-outlined\">photo_camera</i>\r\n </button>\r\n \r\n <button *ngIf=\"btnAlterarFoto && existeLogo\" [style.background-color]=\"btnsColor\"\r\n class=\"botao-excluir-foto border-circle\r\n hover:shadow-3\r\n active:shadow-5\"\r\n (click)=\"questionRemoverFoto()\">\r\n <i class=\"material-symbols-outlined\">delete</i>\r\n </button>\r\n </div>\r\n</div>\r\n", styles: ["@charset \"UTF-8\";@import\"https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap\";@import\"https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap\";@import\"https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0\";.material-symbols-outlined{font-family:Material Symbols Outlined!important}*{font-family:Inter var,Inter,sans-serif!important}::ng-deep .p-accordion,::ng-deep .p-accordion-header,::ng-deep .p-accordion-content,::ng-deep .p-badge,::ng-deep .p-overlay-badge,::ng-deep .p-breadcrumb,::ng-deep .p-breadcrumb-item,::ng-deep .p-breadcrumb-link,::ng-deep .p-button,::ng-deep .p-calendar,::ng-deep .p-card,::ng-deep .p-card-title,::ng-deep .p-card-subtitle,::ng-deep .p-card-content,::ng-deep .p-checkbox,::ng-deep .p-chip,::ng-deep .p-confirm-dialog,::ng-deep .p-confirm-dialog-message,::ng-deep .p-contextmenu,::ng-deep .p-contextmenu-item,::ng-deep .p-dataview,::ng-deep .p-dataview-content,::ng-deep .p-dialog,::ng-deep .p-dialog-title,::ng-deep .p-dialog-content,::ng-deep .p-dropdown,::ng-deep .p-dropdown-label,::ng-deep .p-dropdown-item,::ng-deep .p-dynamic-dialog,::ng-deep .p-dynamic-dialog-title,::ng-deep .p-dynamic-dialog-content,::ng-deep .p-editor,::ng-deep .p-fieldset,::ng-deep .p-fieldset-legend,::ng-deep .p-fieldset-content,::ng-deep .p-fileupload,::ng-deep .p-inputmask,::ng-deep .p-inputnumber,::ng-deep .p-inputtextarea,::ng-deep .p-inputtext,::ng-deep .p-menu,::ng-deep .p-menuitem,::ng-deep .p-menuitem-text,::ng-deep .p-message,::ng-deep .p-messages,::ng-deep .p-multiselect,::ng-deep .p-multiselect-label,::ng-deep .p-multiselect-item,::ng-deep .p-panelmenu,::ng-deep .p-panelmenu-header,::ng-deep .p-panelmenu-content,::ng-deep .p-panel,::ng-deep .p-panel-header,::ng-deep .p-panel-content,::ng-deep .p-password,::ng-deep .p-picklist,::ng-deep .p-progressbar,::ng-deep .p-radiobutton,::ng-deep .p-rating,::ng-deep .p-sidebar,::ng-deep .p-splitbutton,::ng-deep .p-steps,::ng-deep .p-step,::ng-deep .p-table,::ng-deep .p-datatable,::ng-deep .p-tabview,::ng-deep .p-tabpanel,::ng-deep .p-tag,::ng-deep .p-toast,::ng-deep .p-toolbar,::ng-deep .p-tooltip,::ng-deep .p-tree,::ng-deep .p-treetable,::ng-deep .p-selectbutton,::ng-deep .p-stepper,::ng-deep .p-inputgroup,::ng-deep .p-inputgroup-addon,::ng-deep .p-text{font-family:Inter var,Inter,sans-serif!important}:host ::ng-deep .inputs{height:35px}:root{--kv-primary-color: #29b92d, --kv-secondary-color: #002542, --kv-terciary-color: #f2f3f5, --kv-primary-hover-color: #249a29, --kv-secondary-hover-color: #002038, --kv-terciary-hover-color: #d9dadb, --kv-primary-active-color: #1c801f, --kv-secondary-active-color: #001729, --kv-terciary-active-color: #c0c1c2, --kv-primary-disable-color: #1c801f, --kv-secondary-disable-color: #001729, --kv-terciary-disable-color: #c0c1c2, }::ng-deep .p-dialog .p-dialog-header{color:#fff!important;background:#002542!important;display:flex!important;flex-wrap:wrap;word-wrap:break-word}::ng-deep .p-dialog .p-dialog-content{padding-top:1rem}::ng-deep .p-dialog{min-width:320px}::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}::ng-deep .p-dialog-footer{display:flex;justify-content:flex-end;padding:10px;gap:10px}::ng-deep .p-dialog .p-dialog-header .p-dialog-header-icon{display:none}img{border-style:solid;border-width:2px;border-radius:50%;object-fit:cover}i{font-size:22px}.botao-alterar-foto{border-style:none;width:max-content;background-color:#002542;color:#000;font-weight:700;cursor:pointer;padding:7px 9px}.botao-alterar-foto i{color:#fff}.botao-excluir-foto{border-style:none;width:max-content;background-color:#002542;color:#000;font-weight:700;cursor:pointer;padding:7px 9px}.botao-excluir-foto i{color:#fff}.btn{position:absolute;top:87%;left:87%;transform:translate(-50%,-50%)}.image-container{display:inline-block;position:relative}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
|
|
4166
|
+
}
|
|
4167
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvAvatarComponent, decorators: [{
|
|
4168
|
+
type: Component,
|
|
4169
|
+
args: [{ selector: 'kv-avatar', template: "<div class=\"image-container\">\r\n <!-- <img [src]=\"getImageSrc() || imageService.userDefaultImage()\" alt=\"Foto\" class=\"container-foto\" [style.border-color]=\"borderColor\" [style.width.px]=\"width\" [style.height.px]=\"height\" (error)=\"handleImageError($event)\" (click)=\"openFile()\"> -->\r\n\r\n <img [src]=\"imageSource()\" alt=\"Foto\" class=\"container-foto\" [style.border-color]=\"borderColor\" [style.width.px]=\"width\" [style.height.px]=\"height\" (error)=\"handleImageError($event)\">\r\n <div class=\"btn\">\r\n <input #fileInput *ngIf=\"btnAlterarFoto\" id=\"fotoEscolhida\" type=\"file\" accept=\"image/*\" style=\"display:none\" (change)=\"selectFotoSelecionada($any($event))\">\r\n <button *ngIf=\"btnAlterarFoto && !existeLogo\" class=\"botao-alterar-foto border-circle\" [style.background-color]=\"btnsColor\" (click)=\"openFile()\">\r\n <i class=\"material-symbols-outlined\">photo_camera</i>\r\n </button>\r\n \r\n <button *ngIf=\"btnAlterarFoto && existeLogo\" [style.background-color]=\"btnsColor\"\r\n class=\"botao-excluir-foto border-circle\r\n hover:shadow-3\r\n active:shadow-5\"\r\n (click)=\"questionRemoverFoto()\">\r\n <i class=\"material-symbols-outlined\">delete</i>\r\n </button>\r\n </div>\r\n</div>\r\n", styles: ["@charset \"UTF-8\";@import\"https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap\";@import\"https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap\";@import\"https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0\";.material-symbols-outlined{font-family:Material Symbols Outlined!important}*{font-family:Inter var,Inter,sans-serif!important}::ng-deep .p-accordion,::ng-deep .p-accordion-header,::ng-deep .p-accordion-content,::ng-deep .p-badge,::ng-deep .p-overlay-badge,::ng-deep .p-breadcrumb,::ng-deep .p-breadcrumb-item,::ng-deep .p-breadcrumb-link,::ng-deep .p-button,::ng-deep .p-calendar,::ng-deep .p-card,::ng-deep .p-card-title,::ng-deep .p-card-subtitle,::ng-deep .p-card-content,::ng-deep .p-checkbox,::ng-deep .p-chip,::ng-deep .p-confirm-dialog,::ng-deep .p-confirm-dialog-message,::ng-deep .p-contextmenu,::ng-deep .p-contextmenu-item,::ng-deep .p-dataview,::ng-deep .p-dataview-content,::ng-deep .p-dialog,::ng-deep .p-dialog-title,::ng-deep .p-dialog-content,::ng-deep .p-dropdown,::ng-deep .p-dropdown-label,::ng-deep .p-dropdown-item,::ng-deep .p-dynamic-dialog,::ng-deep .p-dynamic-dialog-title,::ng-deep .p-dynamic-dialog-content,::ng-deep .p-editor,::ng-deep .p-fieldset,::ng-deep .p-fieldset-legend,::ng-deep .p-fieldset-content,::ng-deep .p-fileupload,::ng-deep .p-inputmask,::ng-deep .p-inputnumber,::ng-deep .p-inputtextarea,::ng-deep .p-inputtext,::ng-deep .p-menu,::ng-deep .p-menuitem,::ng-deep .p-menuitem-text,::ng-deep .p-message,::ng-deep .p-messages,::ng-deep .p-multiselect,::ng-deep .p-multiselect-label,::ng-deep .p-multiselect-item,::ng-deep .p-panelmenu,::ng-deep .p-panelmenu-header,::ng-deep .p-panelmenu-content,::ng-deep .p-panel,::ng-deep .p-panel-header,::ng-deep .p-panel-content,::ng-deep .p-password,::ng-deep .p-picklist,::ng-deep .p-progressbar,::ng-deep .p-radiobutton,::ng-deep .p-rating,::ng-deep .p-sidebar,::ng-deep .p-splitbutton,::ng-deep .p-steps,::ng-deep .p-step,::ng-deep .p-table,::ng-deep .p-datatable,::ng-deep .p-tabview,::ng-deep .p-tabpanel,::ng-deep .p-tag,::ng-deep .p-toast,::ng-deep .p-toolbar,::ng-deep .p-tooltip,::ng-deep .p-tree,::ng-deep .p-treetable,::ng-deep .p-selectbutton,::ng-deep .p-stepper,::ng-deep .p-inputgroup,::ng-deep .p-inputgroup-addon,::ng-deep .p-text{font-family:Inter var,Inter,sans-serif!important}:host ::ng-deep .inputs{height:35px}:root{--kv-primary-color: #29b92d, --kv-secondary-color: #002542, --kv-terciary-color: #f2f3f5, --kv-primary-hover-color: #249a29, --kv-secondary-hover-color: #002038, --kv-terciary-hover-color: #d9dadb, --kv-primary-active-color: #1c801f, --kv-secondary-active-color: #001729, --kv-terciary-active-color: #c0c1c2, --kv-primary-disable-color: #1c801f, --kv-secondary-disable-color: #001729, --kv-terciary-disable-color: #c0c1c2, }::ng-deep .p-dialog .p-dialog-header{color:#fff!important;background:#002542!important;display:flex!important;flex-wrap:wrap;word-wrap:break-word}::ng-deep .p-dialog .p-dialog-content{padding-top:1rem}::ng-deep .p-dialog{min-width:320px}::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}::ng-deep .p-dialog-footer{display:flex;justify-content:flex-end;padding:10px;gap:10px}::ng-deep .p-dialog .p-dialog-header .p-dialog-header-icon{display:none}img{border-style:solid;border-width:2px;border-radius:50%;object-fit:cover}i{font-size:22px}.botao-alterar-foto{border-style:none;width:max-content;background-color:#002542;color:#000;font-weight:700;cursor:pointer;padding:7px 9px}.botao-alterar-foto i{color:#fff}.botao-excluir-foto{border-style:none;width:max-content;background-color:#002542;color:#000;font-weight:700;cursor:pointer;padding:7px 9px}.botao-excluir-foto i{color:#fff}.btn{position:absolute;top:87%;left:87%;transform:translate(-50%,-50%)}.image-container{display:inline-block;position:relative}\n"] }]
|
|
4170
|
+
}], ctorParameters: () => [{ type: ImagensService }, { type: NotificationService }, { type: i1$3.DialogService }], propDecorators: { borderColor: [{
|
|
4171
|
+
type: Input
|
|
4172
|
+
}], btnsColor: [{
|
|
4173
|
+
type: Input
|
|
4174
|
+
}], width: [{
|
|
4175
|
+
type: Input
|
|
4176
|
+
}], height: [{
|
|
4177
|
+
type: Input
|
|
4178
|
+
}], imageUrlChange: [{
|
|
4179
|
+
type: Output
|
|
4180
|
+
}], removerFotoEvent: [{
|
|
4181
|
+
type: Output
|
|
4182
|
+
}], onModalOpen: [{
|
|
4183
|
+
type: Output
|
|
4184
|
+
}], btnAlterarFoto: [{
|
|
4185
|
+
type: Input
|
|
4186
|
+
}], fileInput: [{
|
|
4187
|
+
type: ViewChild,
|
|
4188
|
+
args: ['fileInput']
|
|
4189
|
+
}] } });
|
|
4190
|
+
|
|
4191
|
+
class KvButtonModule {
|
|
4192
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
4193
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.8", ngImport: i0, type: KvButtonModule, declarations: [KvButtonComponent], imports: [CommonModule,
|
|
4194
|
+
PrimeNgModule], exports: [KvButtonComponent] }); }
|
|
4195
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvButtonModule, imports: [CommonModule,
|
|
4196
|
+
PrimeNgModule] }); }
|
|
4197
|
+
}
|
|
4198
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvButtonModule, decorators: [{
|
|
4015
4199
|
type: NgModule,
|
|
4016
4200
|
args: [{
|
|
4017
|
-
declarations: [
|
|
4018
|
-
|
|
4019
|
-
|
|
4201
|
+
declarations: [
|
|
4202
|
+
KvButtonComponent
|
|
4203
|
+
],
|
|
4204
|
+
imports: [
|
|
4205
|
+
CommonModule,
|
|
4206
|
+
PrimeNgModule
|
|
4207
|
+
],
|
|
4208
|
+
exports: [
|
|
4209
|
+
KvButtonComponent
|
|
4210
|
+
]
|
|
4020
4211
|
}]
|
|
4021
4212
|
}] });
|
|
4022
4213
|
|
|
4023
|
-
// import { KvCropImageComponent } from './kv-crop-image/kv-crop-image.component';
|
|
4024
4214
|
class KvAvatarModule {
|
|
4025
4215
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvAvatarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
4026
4216
|
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.8", ngImport: i0, type: KvAvatarModule, declarations: [KvAvatarComponent], imports: [CommonModule,
|
|
@@ -4031,7 +4221,7 @@ class KvAvatarModule {
|
|
|
4031
4221
|
ReactiveFormsModule,
|
|
4032
4222
|
KvButtonModule,
|
|
4033
4223
|
KvLabelModule,
|
|
4034
|
-
|
|
4224
|
+
KvCropImageComponent], exports: [KvAvatarComponent] }); }
|
|
4035
4225
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvAvatarModule, imports: [CommonModule,
|
|
4036
4226
|
ButtonModule,
|
|
4037
4227
|
FileUploadModule,
|
|
@@ -4040,14 +4230,13 @@ class KvAvatarModule {
|
|
|
4040
4230
|
ReactiveFormsModule,
|
|
4041
4231
|
KvButtonModule,
|
|
4042
4232
|
KvLabelModule,
|
|
4043
|
-
|
|
4233
|
+
KvCropImageComponent] }); }
|
|
4044
4234
|
}
|
|
4045
4235
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvAvatarModule, decorators: [{
|
|
4046
4236
|
type: NgModule,
|
|
4047
4237
|
args: [{
|
|
4048
4238
|
declarations: [
|
|
4049
4239
|
KvAvatarComponent,
|
|
4050
|
-
// KvCropImageComponent
|
|
4051
4240
|
],
|
|
4052
4241
|
imports: [
|
|
4053
4242
|
CommonModule,
|
|
@@ -4058,7 +4247,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImpor
|
|
|
4058
4247
|
ReactiveFormsModule,
|
|
4059
4248
|
KvButtonModule,
|
|
4060
4249
|
KvLabelModule,
|
|
4061
|
-
|
|
4250
|
+
KvCropImageComponent
|
|
4062
4251
|
],
|
|
4063
4252
|
exports: [
|
|
4064
4253
|
KvAvatarComponent
|
|
@@ -4737,7 +4926,7 @@ class KvRadioGroupComponent extends BaseComponentInput {
|
|
|
4737
4926
|
this.onSelectedOption.emit(event.value[this.optionValue]);
|
|
4738
4927
|
}
|
|
4739
4928
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvRadioGroupComponent, deps: [{ token: ComponentService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4740
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.8", type: KvRadioGroupComponent, selector: "kv-radio-group", inputs: { options: "options", optionValue: "optionValue", optionLabel: "optionLabel", optionValueDefault: "optionValueDefault", vertical: "vertical" }, outputs: { onSelectedOption: "onSelectedOption" }, providers: ComponentProviders(KvRadioGroupComponent), usesInheritance: true, ngImport: i0, template: "<kv-label [label]=\"label && label + (showAsterisk ? '*' : '')\" />\r\n<div [class.vertical-radio-group]=\"vertical\">\r\n <div class=\"option\" *ngFor=\"let option of options; let isFirst = first\">\r\n <p-radioButton\r\n [inputId]=\"option[optionValue]\"\r\n name=\"option\"\r\n [value]=\"option\"\r\n [(ngModel)]=\"selectedOpt\"\r\n (onClick)=\"selectedOption($event)\"\r\n [disabled]=\"disabled\"\r\n [class.ml-3]=\"!isFirst && !vertical\"\r\n >\r\n </p-radioButton>\r\n <label [for]=\"option[optionValue]\" class=\"radio-option-label\">\r\n {{ option[optionLabel] }}</label\r\n >\r\n </div>\r\n <kv-error [hasError]=\"hasControlError()\">{{ erroMessage() }}</kv-error>\r\n</div>\r\n", styles: [".option{display:inline-block;margin:0;height:35px;padding-top:.75rem}.vertical-radio-group{display:flex;flex-direction:column}.radio-option-label{font-size:1rem}::ng-deep .p-radiobutton .p-radiobutton-box.p-highlight{border-color:#004172;background:#004172}\n", "@charset \"UTF-8\";@import\"https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap\";@import\"https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap\";@import\"https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0\";.material-symbols-outlined{font-family:Material Symbols Outlined!important}*{font-family:Inter var,Inter,sans-serif!important}::ng-deep .p-accordion,::ng-deep .p-accordion-header,::ng-deep .p-accordion-content,::ng-deep .p-badge,::ng-deep .p-overlay-badge,::ng-deep .p-breadcrumb,::ng-deep .p-breadcrumb-item,::ng-deep .p-breadcrumb-link,::ng-deep .p-button,::ng-deep .p-calendar,::ng-deep .p-card,::ng-deep .p-card-title,::ng-deep .p-card-subtitle,::ng-deep .p-card-content,::ng-deep .p-checkbox,::ng-deep .p-chip,::ng-deep .p-confirm-dialog,::ng-deep .p-confirm-dialog-message,::ng-deep .p-contextmenu,::ng-deep .p-contextmenu-item,::ng-deep .p-dataview,::ng-deep .p-dataview-content,::ng-deep .p-dialog,::ng-deep .p-dialog-title,::ng-deep .p-dialog-content,::ng-deep .p-dropdown,::ng-deep .p-dropdown-label,::ng-deep .p-dropdown-item,::ng-deep .p-dynamic-dialog,::ng-deep .p-dynamic-dialog-title,::ng-deep .p-dynamic-dialog-content,::ng-deep .p-editor,::ng-deep .p-fieldset,::ng-deep .p-fieldset-legend,::ng-deep .p-fieldset-content,::ng-deep .p-fileupload,::ng-deep .p-inputmask,::ng-deep .p-inputnumber,::ng-deep .p-inputtextarea,::ng-deep .p-inputtext,::ng-deep .p-menu,::ng-deep .p-menuitem,::ng-deep .p-menuitem-text,::ng-deep .p-message,::ng-deep .p-messages,::ng-deep .p-multiselect,::ng-deep .p-multiselect-label,::ng-deep .p-multiselect-item,::ng-deep .p-panelmenu,::ng-deep .p-panelmenu-header,::ng-deep .p-panelmenu-content,::ng-deep .p-panel,::ng-deep .p-panel-header,::ng-deep .p-panel-content,::ng-deep .p-password,::ng-deep .p-picklist,::ng-deep .p-progressbar,::ng-deep .p-radiobutton,::ng-deep .p-rating,::ng-deep .p-sidebar,::ng-deep .p-splitbutton,::ng-deep .p-steps,::ng-deep .p-step,::ng-deep .p-table,::ng-deep .p-datatable,::ng-deep .p-tabview,::ng-deep .p-tabpanel,::ng-deep .p-tag,::ng-deep .p-toast,::ng-deep .p-toolbar,::ng-deep .p-tooltip,::ng-deep .p-tree,::ng-deep .p-treetable,::ng-deep .p-selectbutton,::ng-deep .p-stepper,::ng-deep .p-inputgroup,::ng-deep .p-inputgroup-addon,::ng-deep .p-text{font-family:Inter var,Inter,sans-serif!important}:host ::ng-deep .inputs{height:35px}:root{--kv-primary-color: #29b92d, --kv-secondary-color: #002542, --kv-terciary-color: #f2f3f5, --kv-primary-hover-color: #249a29, --kv-secondary-hover-color: #002038, --kv-terciary-hover-color: #d9dadb, --kv-primary-active-color: #1c801f, --kv-secondary-active-color: #001729, --kv-terciary-active-color: #c0c1c2, --kv-primary-disable-color: #1c801f, --kv-secondary-disable-color: #001729, --kv-terciary-disable-color: #c0c1c2, }::ng-deep .p-dialog .p-dialog-header{color:#fff!important;background:#002542!important;display:flex!important;flex-wrap:wrap;word-wrap:break-word}::ng-deep .p-dialog .p-dialog-content{padding-top:1rem}::ng-deep .p-dialog{min-width:320px}::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}::ng-deep .p-dialog-footer{display:flex;justify-content:flex-end;padding:10px;gap:10px}::ng-deep .p-dialog .p-dialog-header .p-dialog-header-icon{display:none}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: KvErrorComponent, selector: "kv-error", inputs: ["formControl", "hasError"] }, { kind: "component", type: KvLabelComponent, selector: "kv-label", inputs: ["componentId", "label"] }, { kind: "component", type: i6$
|
|
4929
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.8", type: KvRadioGroupComponent, selector: "kv-radio-group", inputs: { options: "options", optionValue: "optionValue", optionLabel: "optionLabel", optionValueDefault: "optionValueDefault", vertical: "vertical" }, outputs: { onSelectedOption: "onSelectedOption" }, providers: ComponentProviders(KvRadioGroupComponent), usesInheritance: true, ngImport: i0, template: "<kv-label [label]=\"label && label + (showAsterisk ? '*' : '')\" />\r\n<div [class.vertical-radio-group]=\"vertical\">\r\n <div class=\"option\" *ngFor=\"let option of options; let isFirst = first\">\r\n <p-radioButton\r\n [inputId]=\"option[optionValue]\"\r\n name=\"option\"\r\n [value]=\"option\"\r\n [(ngModel)]=\"selectedOpt\"\r\n (onClick)=\"selectedOption($event)\"\r\n [disabled]=\"disabled\"\r\n [class.ml-3]=\"!isFirst && !vertical\"\r\n >\r\n </p-radioButton>\r\n <label [for]=\"option[optionValue]\" class=\"radio-option-label\">\r\n {{ option[optionLabel] }}</label\r\n >\r\n </div>\r\n <kv-error [hasError]=\"hasControlError()\">{{ erroMessage() }}</kv-error>\r\n</div>\r\n", styles: [".option{display:inline-block;margin:0;height:35px;padding-top:.75rem}.vertical-radio-group{display:flex;flex-direction:column}.radio-option-label{font-size:1rem}::ng-deep .p-radiobutton .p-radiobutton-box.p-highlight{border-color:#004172;background:#004172}\n", "@charset \"UTF-8\";@import\"https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap\";@import\"https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap\";@import\"https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0\";.material-symbols-outlined{font-family:Material Symbols Outlined!important}*{font-family:Inter var,Inter,sans-serif!important}::ng-deep .p-accordion,::ng-deep .p-accordion-header,::ng-deep .p-accordion-content,::ng-deep .p-badge,::ng-deep .p-overlay-badge,::ng-deep .p-breadcrumb,::ng-deep .p-breadcrumb-item,::ng-deep .p-breadcrumb-link,::ng-deep .p-button,::ng-deep .p-calendar,::ng-deep .p-card,::ng-deep .p-card-title,::ng-deep .p-card-subtitle,::ng-deep .p-card-content,::ng-deep .p-checkbox,::ng-deep .p-chip,::ng-deep .p-confirm-dialog,::ng-deep .p-confirm-dialog-message,::ng-deep .p-contextmenu,::ng-deep .p-contextmenu-item,::ng-deep .p-dataview,::ng-deep .p-dataview-content,::ng-deep .p-dialog,::ng-deep .p-dialog-title,::ng-deep .p-dialog-content,::ng-deep .p-dropdown,::ng-deep .p-dropdown-label,::ng-deep .p-dropdown-item,::ng-deep .p-dynamic-dialog,::ng-deep .p-dynamic-dialog-title,::ng-deep .p-dynamic-dialog-content,::ng-deep .p-editor,::ng-deep .p-fieldset,::ng-deep .p-fieldset-legend,::ng-deep .p-fieldset-content,::ng-deep .p-fileupload,::ng-deep .p-inputmask,::ng-deep .p-inputnumber,::ng-deep .p-inputtextarea,::ng-deep .p-inputtext,::ng-deep .p-menu,::ng-deep .p-menuitem,::ng-deep .p-menuitem-text,::ng-deep .p-message,::ng-deep .p-messages,::ng-deep .p-multiselect,::ng-deep .p-multiselect-label,::ng-deep .p-multiselect-item,::ng-deep .p-panelmenu,::ng-deep .p-panelmenu-header,::ng-deep .p-panelmenu-content,::ng-deep .p-panel,::ng-deep .p-panel-header,::ng-deep .p-panel-content,::ng-deep .p-password,::ng-deep .p-picklist,::ng-deep .p-progressbar,::ng-deep .p-radiobutton,::ng-deep .p-rating,::ng-deep .p-sidebar,::ng-deep .p-splitbutton,::ng-deep .p-steps,::ng-deep .p-step,::ng-deep .p-table,::ng-deep .p-datatable,::ng-deep .p-tabview,::ng-deep .p-tabpanel,::ng-deep .p-tag,::ng-deep .p-toast,::ng-deep .p-toolbar,::ng-deep .p-tooltip,::ng-deep .p-tree,::ng-deep .p-treetable,::ng-deep .p-selectbutton,::ng-deep .p-stepper,::ng-deep .p-inputgroup,::ng-deep .p-inputgroup-addon,::ng-deep .p-text{font-family:Inter var,Inter,sans-serif!important}:host ::ng-deep .inputs{height:35px}:root{--kv-primary-color: #29b92d, --kv-secondary-color: #002542, --kv-terciary-color: #f2f3f5, --kv-primary-hover-color: #249a29, --kv-secondary-hover-color: #002038, --kv-terciary-hover-color: #d9dadb, --kv-primary-active-color: #1c801f, --kv-secondary-active-color: #001729, --kv-terciary-active-color: #c0c1c2, --kv-primary-disable-color: #1c801f, --kv-secondary-disable-color: #001729, --kv-terciary-disable-color: #c0c1c2, }::ng-deep .p-dialog .p-dialog-header{color:#fff!important;background:#002542!important;display:flex!important;flex-wrap:wrap;word-wrap:break-word}::ng-deep .p-dialog .p-dialog-content{padding-top:1rem}::ng-deep .p-dialog{min-width:320px}::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}::ng-deep .p-dialog-footer{display:flex;justify-content:flex-end;padding:10px;gap:10px}::ng-deep .p-dialog .p-dialog-header .p-dialog-header-icon{display:none}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: KvErrorComponent, selector: "kv-error", inputs: ["formControl", "hasError"] }, { kind: "component", type: KvLabelComponent, selector: "kv-label", inputs: ["componentId", "label"] }, { kind: "component", type: i6$2.RadioButton, selector: "p-radioButton", inputs: ["value", "formControlName", "name", "disabled", "label", "variant", "tabindex", "inputId", "ariaLabelledBy", "ariaLabel", "style", "styleClass", "labelStyleClass", "autofocus"], outputs: ["onClick", "onFocus", "onBlur"] }] }); }
|
|
4741
4930
|
}
|
|
4742
4931
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvRadioGroupComponent, decorators: [{
|
|
4743
4932
|
type: Component,
|
|
@@ -4927,7 +5116,7 @@ class KvLoaderComponent {
|
|
|
4927
5116
|
this.loading = KvLoaderService.isLoading;
|
|
4928
5117
|
}
|
|
4929
5118
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvLoaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4930
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.8", type: KvLoaderComponent, selector: "kv-loader", ngImport: i0, template: "<ngx-loading [show]=\"(loading | async) || false\"></ngx-loading>\r\n", dependencies: [{ kind: "component", type: i1$
|
|
5119
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.8", type: KvLoaderComponent, selector: "kv-loader", ngImport: i0, template: "<ngx-loading [show]=\"(loading | async) || false\"></ngx-loading>\r\n", dependencies: [{ kind: "component", type: i1$6.NgxLoadingComponent, selector: "ngx-loading", inputs: ["show", "config", "template"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }] }); }
|
|
4931
5120
|
}
|
|
4932
5121
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvLoaderComponent, decorators: [{
|
|
4933
5122
|
type: Component,
|
|
@@ -4936,7 +5125,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImpor
|
|
|
4936
5125
|
|
|
4937
5126
|
class KvLoaderModule {
|
|
4938
5127
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvLoaderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
4939
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.8", ngImport: i0, type: KvLoaderModule, declarations: [KvLoaderComponent], imports: [CommonModule, i1$
|
|
5128
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.8", ngImport: i0, type: KvLoaderModule, declarations: [KvLoaderComponent], imports: [CommonModule, i1$6.NgxLoadingModule], exports: [KvLoaderComponent] }); }
|
|
4940
5129
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvLoaderModule, imports: [CommonModule,
|
|
4941
5130
|
NgxLoadingModule.forRoot({
|
|
4942
5131
|
fullScreenBackdrop: true
|
|
@@ -5203,17 +5392,22 @@ class KvLayoutComponent {
|
|
|
5203
5392
|
this.menus = this.menus.map((menu) => {
|
|
5204
5393
|
return {
|
|
5205
5394
|
...menu,
|
|
5206
|
-
bgColor: menu.link ==
|
|
5395
|
+
bgColor: menu.link ==
|
|
5396
|
+
`/${this.breadCrumbItems[this.breadCrumbItems?.length - 1]?.routerLink}`
|
|
5207
5397
|
? 'bg-green-600'
|
|
5208
5398
|
: '',
|
|
5209
|
-
textColor: menu.link ==
|
|
5399
|
+
textColor: menu.link ==
|
|
5400
|
+
`/${this.breadCrumbItems[this.breadCrumbItems?.length - 1]?.routerLink}`
|
|
5210
5401
|
? 'text-white'
|
|
5211
5402
|
: '',
|
|
5212
5403
|
};
|
|
5213
5404
|
});
|
|
5405
|
+
console.log(this.menus, 'menus');
|
|
5214
5406
|
this.menuSelecionado = this.menus.find((menu) => {
|
|
5215
|
-
return menu.link ==
|
|
5407
|
+
return (menu.link ==
|
|
5408
|
+
`/${this.breadCrumbItems[this.breadCrumbItems?.length - 1]?.routerLink}`);
|
|
5216
5409
|
});
|
|
5410
|
+
console.log(this.menuSelecionado, 'menuSelecionado');
|
|
5217
5411
|
}
|
|
5218
5412
|
returnMenuChild(idmenu) {
|
|
5219
5413
|
return this.menus.filter((x) => x.idmenupai == idmenu);
|
|
@@ -5342,6 +5536,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImpor
|
|
|
5342
5536
|
}]
|
|
5343
5537
|
}] });
|
|
5344
5538
|
|
|
5539
|
+
class KvModalModule {
|
|
5540
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvModalModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
5541
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.8", ngImport: i0, type: KvModalModule, declarations: [KvModalComponent], imports: [CommonModule, PrimeNgModule, KvButtonModule], exports: [KvModalComponent] }); }
|
|
5542
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvModalModule, imports: [CommonModule, PrimeNgModule, KvButtonModule] }); }
|
|
5543
|
+
}
|
|
5544
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvModalModule, decorators: [{
|
|
5545
|
+
type: NgModule,
|
|
5546
|
+
args: [{
|
|
5547
|
+
declarations: [KvModalComponent],
|
|
5548
|
+
imports: [CommonModule, PrimeNgModule, KvButtonModule],
|
|
5549
|
+
exports: [KvModalComponent],
|
|
5550
|
+
}]
|
|
5551
|
+
}] });
|
|
5552
|
+
|
|
5345
5553
|
class KvOrgchartComponent {
|
|
5346
5554
|
constructor(renderer) {
|
|
5347
5555
|
this.renderer = renderer;
|
|
@@ -6255,7 +6463,7 @@ class KvTreeViewComponent {
|
|
|
6255
6463
|
this.selectedItems.emit(this.selectedFiles);
|
|
6256
6464
|
}
|
|
6257
6465
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvTreeViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
6258
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.8", type: KvTreeViewComponent, selector: "kv-tree-view", inputs: { selectedFiles: "selectedFiles", selectionMode: "selectionMode", treeViewData: "treeViewData" }, outputs: { selectedItems: "selectedItems" }, ngImport: i0, template: "<div class=\"card flex flex-column align-items-center justify-content-center\">\r\n <p-tree\r\n [value]=\"treeViewData\"\r\n [selectionMode]=\"selectionMode\"\r\n class=\"w-full\"\r\n [(selection)]=\"selectedFiles\"\r\n (selectionChange)=\"onSelectionChange()\"\r\n ></p-tree>\r\n</div>", styles: [""], dependencies: [{ kind: "component", type: i1$
|
|
6466
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.8", type: KvTreeViewComponent, selector: "kv-tree-view", inputs: { selectedFiles: "selectedFiles", selectionMode: "selectionMode", treeViewData: "treeViewData" }, outputs: { selectedItems: "selectedItems" }, ngImport: i0, template: "<div class=\"card flex flex-column align-items-center justify-content-center\">\r\n <p-tree\r\n [value]=\"treeViewData\"\r\n [selectionMode]=\"selectionMode\"\r\n class=\"w-full\"\r\n [(selection)]=\"selectedFiles\"\r\n (selectionChange)=\"onSelectionChange()\"\r\n ></p-tree>\r\n</div>", styles: [""], dependencies: [{ kind: "component", type: i1$7.Tree, selector: "p-tree", inputs: ["value", "selectionMode", "loadingMode", "selection", "style", "styleClass", "contextMenu", "layout", "draggableScope", "droppableScope", "draggableNodes", "droppableNodes", "metaKeySelection", "propagateSelectionUp", "propagateSelectionDown", "loading", "loadingIcon", "emptyMessage", "ariaLabel", "togglerAriaLabel", "ariaLabelledBy", "validateDrop", "filter", "filterBy", "filterMode", "filterPlaceholder", "filteredNodes", "filterLocale", "scrollHeight", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "indentation", "_templateMap", "trackBy", "virtualNodeHeight"], outputs: ["selectionChange", "onNodeSelect", "onNodeUnselect", "onNodeExpand", "onNodeCollapse", "onNodeContextMenuSelect", "onNodeDrop", "onLazyLoad", "onScroll", "onScrollIndexChange", "onFilter"] }] }); }
|
|
6259
6467
|
}
|
|
6260
6468
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvTreeViewComponent, decorators: [{
|
|
6261
6469
|
type: Component,
|
|
@@ -7307,13 +7515,13 @@ class KvFileViewerComponent {
|
|
|
7307
7515
|
const text = await new Response(this.blob).text();
|
|
7308
7516
|
this.xmlFormat = vkbeautify.xml(text);
|
|
7309
7517
|
}
|
|
7310
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvFileViewerComponent, deps: [{ token: i1$
|
|
7518
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvFileViewerComponent, deps: [{ token: i1$8.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
7311
7519
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.8", type: KvFileViewerComponent, selector: "kv-file-viewer", inputs: { arquivo: "arquivo", type: "type", blob: "blob" }, usesOnChanges: true, ngImport: i0, template: "<img class=\"img\" *ngIf=\"type.match('image')\" [src]=\"sanitizedPdfSrc\" />\r\n\r\n<iframe\r\n class=\"txt-pdf\"\r\n *ngIf=\"type == 'text/plain' || type == 'application/pdf'\"\r\n [src]=\"sanitizedPdfSrc\"\r\n width=\"100%\"\r\n height=\"700px\"\r\n>\r\n</iframe>\r\n\r\n<div *ngIf=\"xmlFormat\" class=\"txt-pdf xml-viewer\">\r\n <pre lang=\"xml\">\r\n {{ xmlFormat }}\r\n </pre>\r\n</div>\r\n", styles: [".img{width:100%;height:100%;overflow:auto}.txt-pdf{width:100%;height:600px}.xml-viewer{overflow:auto;font-size:13px}.xml-viewer .tag{color:#6f517e}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
|
|
7312
7520
|
}
|
|
7313
7521
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvFileViewerComponent, decorators: [{
|
|
7314
7522
|
type: Component,
|
|
7315
7523
|
args: [{ selector: 'kv-file-viewer', template: "<img class=\"img\" *ngIf=\"type.match('image')\" [src]=\"sanitizedPdfSrc\" />\r\n\r\n<iframe\r\n class=\"txt-pdf\"\r\n *ngIf=\"type == 'text/plain' || type == 'application/pdf'\"\r\n [src]=\"sanitizedPdfSrc\"\r\n width=\"100%\"\r\n height=\"700px\"\r\n>\r\n</iframe>\r\n\r\n<div *ngIf=\"xmlFormat\" class=\"txt-pdf xml-viewer\">\r\n <pre lang=\"xml\">\r\n {{ xmlFormat }}\r\n </pre>\r\n</div>\r\n", styles: [".img{width:100%;height:100%;overflow:auto}.txt-pdf{width:100%;height:600px}.xml-viewer{overflow:auto;font-size:13px}.xml-viewer .tag{color:#6f517e}\n"] }]
|
|
7316
|
-
}], ctorParameters: () => [{ type: i1$
|
|
7524
|
+
}], ctorParameters: () => [{ type: i1$8.DomSanitizer }], propDecorators: { arquivo: [{
|
|
7317
7525
|
type: Input
|
|
7318
7526
|
}], type: [{
|
|
7319
7527
|
type: Input
|
|
@@ -8140,5 +8348,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImpor
|
|
|
8140
8348
|
* Generated bundle index. Do not edit.
|
|
8141
8349
|
*/
|
|
8142
8350
|
|
|
8143
|
-
export { BaseApiService, BaseChartComponent, BaseComponent, BaseComponentButton, BaseComponentCrud, BaseComponentCrudForm, BaseComponentCrudList, BaseComponentDropDown, BaseComponentDropDownExternal, BaseComponentInput, BaseComponentMultiSelect, BasecomponentTable, BreadcrumbsService, CapitalizePipe, ComponentProviders, ComponentService, CpfCnpjPipe, DocsService, DragDirective, DynamicInputDirective, FormService, ImagensService, KeevoComponentsModule, KeevoValidators, KvAvatarComponent, KvAvatarModule, KvButtonComponent, KvButtonModule, KvButtonPersonalizeComponent, KvButtonPopupComponent, KvButtonSecondaryComponent, KvButtonSuccessComponent, KvButtonsModule, KvCarouselComponent, KvCarouselModule, KvChartComponent, KvChartModule, KvCheckComponent, KvDropdownComponent, KvEditorComponent, KvErrorComponent, KvFileUploadComponent, KvFileUploadModule, KvFileViewerComponent, KvFileViewerModule, KvFilterCardComponent, KvFilterCardModule, KvFilterFieldsetComponent, KvFilterFieldsetModule, KvGIconComponent, KvGIconModule, KvHomeCardComponent, KvHomeCardModule, KvImageUploadComponent, KvImageUploadModule, KvInputCalendarComponent, KvInputMaskComponent, KvInputNumberComponent, KvInputPasswordComponent, KvInputTextCheckboxComponent, KvInputTextComponent, KvInputTextareaComponent, KvInputTimeComponent, KvInputsModule, KvLayoutComponent, KvLayoutModule, KvLoaderComponent, KvLoaderModule, KvLoaderService, KvLoginComponent, KvLoginModule, KvModalComponent, KvModalModule, KvMultiSelectComponent, KvOrgchartComponent, KvOrgchartModule, KvPageFormComponent, KvPageFormModule, KvPageStepperComponent, KvPageStepperodule, KvPickListComponent, KvPickListModule, KvProgressBarModule, KvRadioGroupComponent, KvReportComponent, KvReportModule, KvSelectButtonComponent, KvSelectButtonsComponent, KvStepperComponent, KvStepperModule, KvSwitchComponent, KvTableComponent, KvTableEditComponent, KvTableEditModule, KvTableExpandableComponent, KvTableExpandableModule, KvTableModule, KvTreeViewComponent, KvTreetableComponent, KvTreetableModule, KvWorkspaceModule, KvtreeViewModule, MaskPipe, NotificationService, ObjectService, PeriodosChart, PipesModule, PrimeNgModule, ProgressBarComponent, TablePaginate, TelefonePipe, TemplateDirective, TranslatePrimeng, WorkspaceComponent, getOrExecute, kvErrorModule, loading, mapToMenuItem };
|
|
8351
|
+
export { BaseApiService, BaseChartComponent, BaseComponent, BaseComponentButton, BaseComponentCrud, BaseComponentCrudForm, BaseComponentCrudList, BaseComponentDropDown, BaseComponentDropDownExternal, BaseComponentInput, BaseComponentMultiSelect, BasecomponentTable, BreadcrumbsService, CapitalizePipe, ComponentProviders, ComponentService, CpfCnpjPipe, DocsService, DragDirective, DynamicInputDirective, FormService, ImagensService, KeevoComponentsModule, KeevoValidators, KvAvatarComponent, KvAvatarModule, KvButtonComponent, KvButtonModule, KvButtonPersonalizeComponent, KvButtonPopupComponent, KvButtonSecondaryComponent, KvButtonSuccessComponent, KvButtonsModule, KvCarouselComponent, KvCarouselModule, KvChartComponent, KvChartModule, KvCheckComponent, KvCropImageComponent, KvDropdownComponent, KvEditorComponent, KvErrorComponent, KvFileUploadComponent, KvFileUploadModule, KvFileViewerComponent, KvFileViewerModule, KvFilterCardComponent, KvFilterCardModule, KvFilterFieldsetComponent, KvFilterFieldsetModule, KvGIconComponent, KvGIconModule, KvHomeCardComponent, KvHomeCardModule, KvImageUploadComponent, KvImageUploadModule, KvInputCalendarComponent, KvInputMaskComponent, KvInputNumberComponent, KvInputPasswordComponent, KvInputTextCheckboxComponent, KvInputTextComponent, KvInputTextareaComponent, KvInputTimeComponent, KvInputsModule, KvLayoutComponent, KvLayoutModule, KvLoaderComponent, KvLoaderModule, KvLoaderService, KvLoginComponent, KvLoginModule, KvModalComponent, KvModalModule, KvMultiSelectComponent, KvOrgchartComponent, KvOrgchartModule, KvPageFormComponent, KvPageFormModule, KvPageStepperComponent, KvPageStepperodule, KvPickListComponent, KvPickListModule, KvProgressBarModule, KvRadioGroupComponent, KvReportComponent, KvReportModule, KvSelectButtonComponent, KvSelectButtonsComponent, KvStepperComponent, KvStepperModule, KvSwitchComponent, KvTableComponent, KvTableEditComponent, KvTableEditModule, KvTableExpandableComponent, KvTableExpandableModule, KvTableModule, KvTreeViewComponent, KvTreetableComponent, KvTreetableModule, KvWorkspaceModule, KvtreeViewModule, MaskPipe, NotificationService, ObjectService, PeriodosChart, PipesModule, PrimeNgModule, ProgressBarComponent, TablePaginate, TelefonePipe, TemplateDirective, TranslatePrimeng, WorkspaceComponent, getOrExecute, kvErrorModule, loading, mapToMenuItem };
|
|
8144
8352
|
//# sourceMappingURL=keevo-components.mjs.map
|