keevo-components 1.8.417 → 1.8.419
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/api/base-components/base-component-dropdown.mjs +2 -2
- package/esm2022/lib/api/base-components/base-component-multi-select.mjs +12 -9
- package/esm2022/lib/api/components/table/table.config.mjs +1 -1
- package/esm2022/lib/api/components/table/table.paginate.mjs +2 -2
- package/esm2022/lib/api/pipes/capitalize.pipe.mjs +7 -1
- package/esm2022/lib/components/kv-content-viewer/kv-content-viewer.component.mjs +45 -3
- package/esm2022/lib/components/kv-layout/dropdown-master/dropdown-master.component.mjs +3 -3
- package/esm2022/lib/components/kv-layout/layout/kv-layout.component.mjs +3 -3
- package/esm2022/lib/components/kv-table/kv-table.component.mjs +9 -3
- package/esm2022/lib/components/kv-table-edit/kv-table-edit.component.mjs +6 -3
- package/esm2022/lib/components/kv-table-expandable/kv-table-expandable.component.mjs +20 -4
- package/esm2022/lib/components/kv-tree-table/kv-tree-table.component.mjs +3 -3
- package/fesm2022/keevo-components.mjs +101 -25
- package/fesm2022/keevo-components.mjs.map +1 -1
- package/lib/api/base-components/base-component-multi-select.d.ts +1 -0
- package/lib/api/components/table/table.config.d.ts +1 -0
- package/lib/api/pipes/capitalize.pipe.d.ts +1 -0
- package/lib/components/kv-content-viewer/kv-content-viewer.component.d.ts +3 -1
- package/lib/components/kv-table/kv-table.component.d.ts +2 -1
- package/lib/components/kv-table-edit/kv-table-edit.component.d.ts +2 -1
- package/lib/components/kv-table-expandable/kv-table-expandable.component.d.ts +6 -3
- package/package.json +1 -1
|
@@ -982,7 +982,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImpor
|
|
|
982
982
|
class TablePaginate {
|
|
983
983
|
constructor() {
|
|
984
984
|
this.paginaInicial = 1;
|
|
985
|
-
this.tamanhoPagina =
|
|
985
|
+
this.tamanhoPagina = 15;
|
|
986
986
|
this.termoPesquisa = '';
|
|
987
987
|
this.ordenacao = '';
|
|
988
988
|
this.ordernacaoGroup = { column: '', direction: '' };
|
|
@@ -1423,6 +1423,9 @@ class KvTableComponent {
|
|
|
1423
1423
|
'I', 'II', 'III', 'IV', 'V', 'VI', 'VII', 'VIII', 'IX', 'X', 'XI', 'XII', 'XIII', 'XIV', 'XV',
|
|
1424
1424
|
'XVI', 'XVII', 'XVIII', 'XIX', 'XX'
|
|
1425
1425
|
];
|
|
1426
|
+
this.siglas = [
|
|
1427
|
+
'UI', 'UX', 'TI'
|
|
1428
|
+
];
|
|
1426
1429
|
this.menuFiltro = false;
|
|
1427
1430
|
this.checkboxClicked = false;
|
|
1428
1431
|
this.collapsed = false;
|
|
@@ -1715,6 +1718,9 @@ class KvTableComponent {
|
|
|
1715
1718
|
if (this.romanNumerals.includes(word.toUpperCase())) {
|
|
1716
1719
|
return word;
|
|
1717
1720
|
}
|
|
1721
|
+
if (this.siglas.includes(word.toUpperCase())) {
|
|
1722
|
+
return word;
|
|
1723
|
+
}
|
|
1718
1724
|
if (index !== 0 && this.prepositions.includes(word.toLocaleLowerCase())) {
|
|
1719
1725
|
return word.toLocaleLowerCase();
|
|
1720
1726
|
}
|
|
@@ -1899,11 +1905,11 @@ class KvTableComponent {
|
|
|
1899
1905
|
return this.tableConfig();
|
|
1900
1906
|
}
|
|
1901
1907
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvTableComponent, deps: [{ token: i1.DatePipe }, { token: i1.DecimalPipe }, { token: CpfCnpjPipe }, { token: TelefonePipe }, { token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1902
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.8", type: KvTableComponent, selector: "kv-table", inputs: { _templates: { classPropertyName: "_templates", publicName: "templates", isSignal: false, isRequired: false, transformFunction: null }, setConfig: { classPropertyName: "setConfig", publicName: "config", isSignal: false, isRequired: false, transformFunction: null }, first: { classPropertyName: "first", publicName: "first", isSignal: true, isRequired: false, transformFunction: null }, rows: { classPropertyName: "rows", publicName: "rows", isSignal: true, isRequired: false, transformFunction: null }, defaultSortField: { classPropertyName: "defaultSortField", publicName: "defaultSortField", isSignal: false, isRequired: false, transformFunction: null }, dataSource: { classPropertyName: "dataSource", publicName: "dataSource", isSignal: false, isRequired: false, transformFunction: null }, selectedItems: { classPropertyName: "selectedItems", publicName: "selectedItems", isSignal: false, isRequired: false, transformFunction: null }, totalRecords: { classPropertyName: "totalRecords", publicName: "totalRecords", isSignal: false, isRequired: false, transformFunction: null }, paginator: { classPropertyName: "paginator", publicName: "paginator", isSignal: false, isRequired: false, transformFunction: null }, rowsPerPageOptions: { classPropertyName: "rowsPerPageOptions", publicName: "rowsPerPageOptions", isSignal: false, isRequired: false, transformFunction: null }, tableSize: { classPropertyName: "tableSize", publicName: "tableSize", isSignal: false, isRequired: false, transformFunction: null }, filterColumnsBtn: { classPropertyName: "filterColumnsBtn", publicName: "filterColumnsBtn", isSignal: false, isRequired: false, transformFunction: null }, replaceEmptyValues: { classPropertyName: "replaceEmptyValues", publicName: "replaceEmptyValues", isSignal: false, isRequired: false, transformFunction: null }, filtrosAvancados: { classPropertyName: "filtrosAvancados", publicName: "filtrosAvancados", isSignal: false, isRequired: false, transformFunction: null }, scrollHeight: { classPropertyName: "scrollHeight", publicName: "scrollHeight", isSignal: false, isRequired: false, transformFunction: null }, isTableScrollable: { classPropertyName: "isTableScrollable", publicName: "isTableScrollable", isSignal: false, isRequired: false, transformFunction: null }, tableCaptalized: { classPropertyName: "tableCaptalized", publicName: "tableCaptalized", isSignal: false, isRequired: false, transformFunction: null }, rowTrackBy: { classPropertyName: "rowTrackBy", publicName: "rowTrackBy", isSignal: false, isRequired: false, transformFunction: null }, responsiveLayout: { classPropertyName: "responsiveLayout", publicName: "responsiveLayout", isSignal: false, isRequired: false, transformFunction: null }, disabledHeaderCheckbox: { classPropertyName: "disabledHeaderCheckbox", publicName: "disabledHeaderCheckbox", isSignal: false, isRequired: false, transformFunction: null }, applyStyle: { classPropertyName: "applyStyle", publicName: "applyStyle", isSignal: false, isRequired: false, transformFunction: null }, pageLinksOptions: { classPropertyName: "pageLinksOptions", publicName: "pageLinksOptions", isSignal: false, isRequired: false, transformFunction: null }, showFirstLastIcon: { classPropertyName: "showFirstLastIcon", publicName: "showFirstLastIcon", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { first: "firstChange", rows: "rowsChange", onActiveItem: "onActiveItem", onActiveItemLote: "onActiveItemLote", onPaginate: "onPaginate", onSelectionChange: "onSelectionChange", doubleClickEvent: "doubleClickEvent", filterField: "filterField", onSwitchTableChange: "onSwitchTableChange" }, host: { listeners: { "window:resize": "onWindowResize($event)", "document:keydown.escape": "onEscapeKey($event)", "document:click": "onClickEvent($event)" } }, queries: [{ propertyName: "templates", predicate: TemplateDirective }], viewQueries: [{ propertyName: "table", first: true, predicate: ["table"], descendants: true }, { propertyName: "ptable", first: true, predicate: Table, descendants: true }, { propertyName: "menuFiltroDiv", first: true, predicate: ["menuFiltroDiv"], descendants: true }, { propertyName: "botaoFiltro", first: true, predicate: ["botaoFiltro"], descendants: true }, { propertyName: "inputField", first: true, predicate: ["inputField"], descendants: true }], ngImport: i0, template: "<div>\r\n @if (config) {\r\n <p-table\r\n #dt\r\n styleClass=\"p-datatable-sm\"\r\n [value]=\"dataSource\"\r\n [(selection)]=\"selectedItems\"\r\n [rowSelectable]=\"isRowSelectable\"\r\n [columns]=\"config.columns\"\r\n [globalFilterFields]=\"globalFilterFields\"\r\n [rows]=\"rows()\"\r\n [paginator]=\"paginator\"\r\n [rowsPerPageOptions]=\"rowsPerPageOptions\"\r\n [showCurrentPageReport]=\"true\"\r\n currentPageReportTemplate=\"{first} - {last} de {totalRecords}\"\r\n [rowHover]=\"true\"\r\n [totalRecords]=\"totalRecords\"\r\n [lazy]=\"config.lazy\"\r\n [first]=\"first()\"\r\n (onLazyLoad)=\"paginate($event)\"\r\n (selectionChange)=\"selectionChange($event)\"\r\n (onSort)=\"onSort($event)\"\r\n (onPage)=\"onPage($event)\"\r\n rowGroupMode=\"rowspan\"\r\n [groupRowsBy]=\"config.fieldGroup\"\r\n [showFirstLastIcon]=\"widthPage() > 960 ? true : false\"\r\n [pageLinks]=\"widthPage() > 960 ? 2 : 1\"\r\n [responsive]=\"true\"\r\n [responsiveLayout]=\"responsiveLayout ? 'stack' : ''\"\r\n [scrollable]=\"isTableScrollable\"\r\n [scrollHeight]=\"scrollHeight\"\r\n [rowTrackBy]=\"rowTrackBy\"\r\n >\r\n @if (config?.enableCation) {\r\n <ng-template pTemplate=\"caption\">\r\n <div\r\n class=\"flex flex-row flex-wrap justify-content-between grid formgrid p-fluid col-12 p-2 m-0\"\r\n [style.background-color]=\"'#f1f1f1'\"\r\n >\r\n <div class=\"col-12 flex flex-column\">\r\n @if (config.title) {\r\n <div class=\"text-md font-bold my-3\">\r\n {{ config.title }}\r\n </div>\r\n } @if (config.subtitle) {\r\n <div class=\"text-sm mb-4 font-medium\">\r\n {{ config.subtitle }}\r\n </div>\r\n }\r\n </div>\r\n\r\n <div\r\n class=\"flex flex-row align-items-center md:col-6 lg:col-4 {{\r\n widthPage() < 768 ? 'col-10' : 'col-12'\r\n }} gap-1 p-0\"\r\n >\r\n @if (config?.enableFilter) {\r\n <span class=\"p-input-icon-left\">\r\n <i class=\"pi pi-search text-sm\"></i>\r\n\r\n <input\r\n pInputText\r\n pAutoFocus\r\n [autofocus]=\"widthPage() > 800\"\r\n type=\"text\"\r\n (input)=\"onGlobalFilter(dt, $event)\"\r\n placeholder=\"Pesquisar...\"\r\n autocomplete=\"off\"\r\n #inputField\r\n class=\"text-sm\"\r\n />\r\n </span>\r\n } @if(filterColumnsBtn) {\r\n <div #botaoFiltro>\r\n <kv-button\r\n id=\"botaoFiltro\"\r\n [icon]=\"'align_vertical_top'\"\r\n (onClick)=\"abrirMenuFiltro($event)\"\r\n severity=\"tertiary\"\r\n pTooltip=\"Ocultar/Exibir colunas\"\r\n >\r\n </kv-button>\r\n </div>\r\n\r\n <div\r\n #menuFiltroDiv\r\n id=\"menuFiltroDiv\"\r\n [style.visibility]=\"'hidden'\"\r\n class=\"absolute z-4 bg-gray-200 menu-columns-filtro\"\r\n >\r\n <p-card styleClass=\"p-1\">\r\n <div\r\n class=\"flex flex-column text-medium w-15rem p-1\"\r\n *ngFor=\"let col of columnsFilter()\"\r\n >\r\n {{ checkMenuFiltro(col) }}\r\n <p-checkbox\r\n #filterColumns\r\n [label]=\"col.header\"\r\n [binary]=\"true\"\r\n class=\"checkbox-container\"\r\n (onChange)=\"dinamicColumnSet($event, col)\"\r\n [(ngModel)]=\"col.checked\"\r\n *ngIf=\"!dinamicDisableColumn(col)\"\r\n ></p-checkbox>\r\n </div>\r\n </p-card>\r\n </div>\r\n }\r\n </div>\r\n\r\n <div class=\"flex flex-row col-2 justify-content-end gap-2 p-0\">\r\n @for (action of config.actionsLote; track i; let i = $index) {\r\n <div class=\"flex align-items-center justify-content-center\">\r\n @if ((selectedItems.length > 0 || action.showAcoesLote) &&\r\n (getOrExecute(action.visible, selectedItems) ?? true)) {\r\n <kv-button\r\n (onClick)=\"action?.command(); activeItemLote(selectedItems)\"\r\n [pTooltip]=\"getOrExecute(action.tooltip, selectedItems)\"\r\n [tooltipPosition]=\"\r\n (getOrExecute(action.tooltip, selectedItems)?.length ??\r\n 0 > 7) &&\r\n config.actionsLote &&\r\n i == config.actionsLote.length - 1\r\n ? 'left'\r\n : 'bottom'\r\n \"\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 }\r\n </div>\r\n </div>\r\n </ng-template>\r\n }\r\n\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n @if (config.enableSelect) {\r\n <th>\r\n <p-tableHeaderCheckbox\r\n (click)=\"activeItemLote(selectedItems)\"\r\n [disabled]=\"disabledHeaderCheckbox\"\r\n ></p-tableHeaderCheckbox>\r\n </th>\r\n } @for (col of columns; track $index) {\r\n <th\r\n [pSortableColumn]=\"col.field\"\r\n [pSortableColumnDisabled]=\"col.sortable === false\"\r\n [style.width]=\"col.width\"\r\n >\r\n <div\r\n class=\"flex flex-row align-items-center {{\r\n col.centralize && 'justify-content-center'\r\n }}\"\r\n >\r\n <span class=\"text-xs font-medium\">{{ col.header }}</span>\r\n @if (col.sortable) {\r\n <p-sortIcon [field]=\"col.field\" class=\"pb-1\"></p-sortIcon>\r\n } @if (col.headerTooltip) {\r\n <span\r\n class=\"material-symbols-outlined flex align-items-center\"\r\n [pTooltip]=\"col.headerTooltip\"\r\n >info</span\r\n >\r\n }\r\n </div>\r\n </th>\r\n } @if (config.actions && config.actions.length > 0) {\r\n <th></th>\r\n }\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template\r\n pTemplate=\"body\"\r\n let-rowData\r\n let-columns=\"columns\"\r\n let-rowgroup=\"rowgroup\"\r\n let-rowspan=\"rowspan\"\r\n let-rowIndex=\"rowIndex\"\r\n >\r\n <tr\r\n (dblclick)=\"doubleClick($event, rowData)\"\r\n [ngClass]=\"{\r\n capitalize: tableCaptalized,\r\n last: rowIndex === dataSource.length - 1\r\n }\"\r\n class=\"tr-td {{ isDisabledRow(rowData) ? 'disabled-row' : '' }}\"\r\n >\r\n @if (config.enableSelect) {\r\n <td style=\"width: 8px !important\">\r\n <p-tableCheckbox\r\n [value]=\"rowData\"\r\n [disabled]=\"isDisabledCheckbox(rowData)\"\r\n (click)=\"activeItemLote(selectedItems)\"\r\n ></p-tableCheckbox>\r\n </td>\r\n } @for (col of columns; track $index) {\r\n <ng-container>\r\n @if (rowgroup && !col.template) {\r\n <td\r\n [attr.rowspan]=\"rowgroup && col.grouped ? rowspan : null\"\r\n [pTooltip]=\"returnTooltipRow(rowData, col)\"\r\n class=\"{{\r\n col.styleClass\r\n ? col.styleClass(rowData, col, rowData[col.field])\r\n : ''\r\n }} \"\r\n >\r\n <span class=\"p-column-title\">{{ col.header }}:</span>\r\n\r\n <span\r\n *ngIf=\"!isBooleanField(rowData, col); else booleanField\"\r\n [class]=\"returnRowClass(rowData, col)\"\r\n >\r\n @if (!isChipField(col) && !col.iconField && !isImageField(col)) {\r\n <span\r\n class=\"flex flex-row gap-2 align-items-center {{\r\n col.centralize && 'justify-content-center'\r\n }} text-xs\"\r\n [pTooltip]=\"\r\n col.tooltip && col.tooltip(rowData, col, rowData[col.field])\r\n \"\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 } @if (col.icon) {\r\n <i [class]=\"col.icon + ' mr-2'\"></i>\r\n }\r\n {{ transformValue(rowData, col) }}\r\n </span>\r\n } @if (isChipField(col) && !col.iconField) {\r\n <div>\r\n <span\r\n [class]=\"returnClassChip(rowData, col)\"\r\n [pTooltip]=\"returnTooltipIcon(rowData, col)\"\r\n class=\"text-xs\"\r\n >{{ transformValue(rowData, col) }}</span\r\n >\r\n </div>\r\n }\r\n </span>\r\n\r\n @if (isImageField(col)) {\r\n <span>\r\n <span>\r\n <img class=\"image\" [src]=\"loadImage(rowData, col)\" />\r\n </span>\r\n </span>\r\n } @if (col.iconField) {\r\n <i\r\n [ngClass]=\"{\r\n 'material-icons': col.indIconMaterial,\r\n 'material-symbols-outlined mr-2': !col.indIconMaterial\r\n }\"\r\n [pTooltip]=\"returnTooltipIcon(rowData, col)\"\r\n >\r\n {{ returnClassIcon(rowData, col) }}\r\n </i>\r\n }\r\n\r\n <ng-template #booleanField>\r\n @if (!col.iconField && !isSwitchField(col)) {\r\n <div\r\n class=\"flex flex-row gap-2 align-items-center {{\r\n col.centralize && 'justify-content-center'\r\n }}\"\r\n [pTooltip]=\"\r\n col.tooltip && col.tooltip(rowData, col, rowData[col.field])\r\n \"\r\n >\r\n <i\r\n [ngClass]=\"\r\n rowData[col.field] ? 'text-green-500' : 'text-red-500'\r\n \"\r\n ><span\r\n class=\"material-symbols-outlined text-lg font-semibold\"\r\n >\r\n {{ rowData[col.field] ? \"check\" : \"close\" }}\r\n </span>\r\n </i>\r\n </div>\r\n\r\n } @if (isSwitchField(col)) {\r\n <span\r\n [class]=\"\r\n returnRowClass(rowData, col) +\r\n ' flex flex-row align-items-center justify-content-center'\r\n \"\r\n > \r\n\r\n @if(col.switchDisable){\r\n <kv-switch\r\n (onSwitchChange)=\"onSwitchChange($event, rowData, col)\"\r\n [disabled]=\"col.switchDisable(rowData, col)\"\r\n [switchValue]=\"transformValue(rowData, col)\"\r\n >\r\n </kv-switch>\r\n }\r\n @else {\r\n <kv-switch\r\n (onSwitchChange)=\"onSwitchChange($event, rowData, col)\"\r\n [disabled]=\"col?.onlyReadField ?? true\"\r\n [switchValue]=\"transformValue(rowData, col)\"\r\n >\r\n </kv-switch>\r\n }\r\n </span>\r\n }\r\n </ng-template>\r\n </td>\r\n } @if (!rowgroup && !col.grouped && !col.template) {\r\n <td\r\n class=\"rowTable {{\r\n col.styleClass\r\n ? col.styleClass(rowData, col, rowData[col.field])\r\n : ''\r\n }} \"\r\n [pTooltip]=\"returnTooltipRow(rowData, col)\"\r\n >\r\n <span class=\"p-column-title\">{{ col.header }}:</span>\r\n\r\n <span\r\n *ngIf=\"!isBooleanField(rowData, col); else booleanField\"\r\n [class]=\"\r\n returnRowClass(rowData, col) +\r\n ' flex flex-row gap-2 align-items-center ' +\r\n (col.centralize && 'justify-content-center')\r\n \"\r\n [pTooltip]=\"\r\n col.tooltip && col.tooltip(rowData, col, rowData[col.field])\r\n \"\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 } @if (!isChipField(col) && !col.iconField && !isImageField(col)){\r\n <span class=\"text-xs\">\r\n @if (col.icon) {\r\n <i [class]=\"col.icon + ' mr-2'\"></i>\r\n }\r\n {{ transformValue(rowData, col) }}\r\n </span>\r\n } @if (isChipField(col) && !col.iconField) {\r\n <div>\r\n <span\r\n [class]=\"returnClassChip(rowData, col)\"\r\n [pTooltip]=\"returnTooltipIcon(rowData, col)\"\r\n class=\"text-xs\"\r\n >\r\n {{ transformValue(rowData, col) }}</span\r\n >\r\n </div>\r\n }\r\n </span>\r\n\r\n @if (isImageField(col)) {\r\n <span>\r\n <span>\r\n <img class=\"image\" [src]=\"loadImage(rowData, col)\" />\r\n </span>\r\n </span>\r\n } @if (col.iconField) {\r\n <i\r\n [ngClass]=\"{\r\n 'material-icons': col.indIconMaterial,\r\n 'material-symbols-outlined mr-2': !col.indIconMaterial\r\n }\"\r\n [pTooltip]=\"returnTooltipIcon(rowData, col)\"\r\n >\r\n {{ returnClassIcon(rowData, col) }}\r\n </i>\r\n }\r\n\r\n <ng-template #booleanField>\r\n @if (!col.iconField && !isSwitchField(col)) {\r\n <div\r\n class=\"flex flex-row gap-2 align-items-center {{\r\n col.centralize && 'justify-content-center'\r\n }}\"\r\n [pTooltip]=\"\r\n col.tooltip && col.tooltip(rowData, col, rowData[col.field])\r\n \"\r\n >\r\n <i\r\n [ngClass]=\"\r\n rowData[col.field] ? 'text-green-500' : 'text-red-500'\r\n \"\r\n ><span\r\n class=\"material-symbols-outlined text-lg font-semibold\"\r\n >\r\n {{ rowData[col.field] ? \"check\" : \"close\" }}\r\n </span>\r\n </i>\r\n </div>\r\n } @if (isSwitchField(col)) {\r\n <span\r\n [class]=\"\r\n returnRowClass(rowData, col) +\r\n ' flex flex-row align-items-center justify-content-center'\r\n \"\r\n >\r\n @if(col.switchDisable){\r\n <kv-switch\r\n (onSwitchChange)=\"onSwitchChange($event, rowData, col)\"\r\n [disabled]=\"col.switchDisable(rowData, col)\"\r\n [switchValue]=\"transformValue(rowData, col)\"\r\n >\r\n </kv-switch>\r\n }\r\n @else {\r\n <kv-switch\r\n (onSwitchChange)=\"onSwitchChange($event, rowData, col)\"\r\n [disabled]=\"col?.onlyReadField ?? true\"\r\n [switchValue]=\"transformValue(rowData, col)\"\r\n >\r\n </kv-switch>\r\n }\r\n \r\n </span>\r\n }\r\n </ng-template>\r\n </td>\r\n } @if (col.template) {\r\n <td\r\n class=\"rowTable {{\r\n col.styleClass\r\n ? col.styleClass(rowData, col, rowData[col.field])\r\n : ''\r\n }} \"\r\n >\r\n <span class=\"p-column-title\">{{ col.header }}:</span>\r\n @if (getCustomTemplate(col.template.name)) {\r\n\r\n <div\r\n class=\"flex flex-row gap-2 align-items-center {{\r\n col.centralize && ' justify-content-center'\r\n }}\"\r\n [pTooltip]=\"\r\n col.tooltip && col.tooltip(rowData, col, rowData[col.field])\r\n \"\r\n >\r\n @if(col.tagColor) {\r\n <div\r\n class=\"tag\"\r\n [pTooltip]=\"col.tooltipTag && col.tooltipTag(rowData, col)\"\r\n [style.background-color]=\"col.tagColor(rowData, col)\"\r\n ></div>\r\n }\r\n\r\n <div class=\"w-full\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"getCustomTemplate(col.template.name)\"\r\n [ngTemplateOutletContext]=\"{ $implicit: rowData }\"\r\n />\r\n </div>\r\n </div>\r\n }\r\n </td>\r\n }\r\n </ng-container>\r\n } @if (config.actions && config.actions.length > 0) {\r\n <td>\r\n <div class=\"flex flex-row justify-content-end w-full\">\r\n <span\r\n class=\"material-symbols-outlined cursor-pointer icon-more-horiz p-1\"\r\n style=\"font-size: 20px\"\r\n (click)=\"menu.toggle($event); activeItem(rowData)\"\r\n >\r\n more_horiz\r\n </span>\r\n\r\n <p-tieredMenu\r\n #menu\r\n [popup]=\"true\"\r\n [model]=\"tableActions[rowIndex - actionsOffset]\"\r\n appendTo=\"body\"\r\n ></p-tieredMenu>\r\n </div>\r\n </td>\r\n }\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"emptymessage\" let-columns>\r\n <tr>\r\n <td\r\n [attr.colspan]=\"columns.length + 2\"\r\n style=\"text-align: center; border-radius: 10px !important\"\r\n >\r\n <p class=\"font-medium m-0 text-sm\">Nenhum registro encontrado</p>\r\n </td>\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n }\r\n</div>\r\n\r\n<link\r\n rel=\"stylesheet\"\r\n href=\"https://fonts.googleapis.com/icon?family=Material+Icons\"\r\n/>\r\n\r\n<link\r\n rel=\"stylesheet\"\r\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@48,400,0,0\"\r\n/>\r\n", styles: ["::ng-deep .p-datatable>.p-datatable-wrapper::-webkit-scrollbar{width:6px}::ng-deep .p-datatable>.p-datatable-wrapper::-webkit-scrollbar:hover{background-color:#dededebf}::ng-deep .p-datatable>.p-datatable-wrapper::-webkit-scrollbar-thumb{border-radius:4px;background-color:transparent}::ng-deep .p-datatable>.p-datatable-wrapper:hover::-webkit-scrollbar-thumb{border-left:2px solid white;background-color:#00000080}::ng-deep .p-datatable>.p-datatable-wrapper::-webkit-scrollbar-track{border-left:2px solid white;background-color:#dededebf}.tag{width:5px;height:20px;border-radius:.25rem}::ng-deep .p-panel .p-panel-header{border:none!important}:host ::ng-deep .p-datatable-header{background-color:#f1f1f1!important;padding:0!important;border-radius:5px!important}::ng-deep .p-panel.p-panel-toggleable .p-panel-header{background-color:#f1f1f1}::ng-deep .p-datatable.p-datatable-sm .p-datatable-thead>tr>th{background-color:#f1f1f1;padding:.35rem}.icon-more-horiz{font-weight:700}.icon-more-horiz:hover,.icon-more-horiz:focus{color:#5e5e5e;transition:color .3s,transform .3s;background-color:#eaeaea;border-radius:50%}.tr-td{overflow-wrap:anywhere}.tr-td:hover{box-shadow:#3c40434d 0 1px 2px,#3c404326 0 2px 6px 2px;background-color:#fff;transition:color .3s,transform .3s;transform:scale(1)}.tr-td:hover.last{box-shadow:-1px -1px 9px -3px #000000bf;-webkit-box-shadow:-1px -1px 9px -3px rgba(0,0,0,.75);-moz-box-shadow:-1px -1px 9px -3px rgba(0,0,0,.75)}.disabled-row{pointer-events:none;opacity:.6;background-color:#dddddd8e}::ng-deep .p-tooltip{pointer-events:auto}.btn-table{background-color:#29b92d;padding:12px}.btn-table:hover{background-color:#249a29}.btn-table:active{background-color:#1c801f}.btn-table:disabled{background-color:#29b92d}::ng-deep svg.p-icon{width:.65rem;height:.65rem}::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}input{height:1.875rem}::ng-deep .p-checkbox .p-checkbox-box{width:1.125rem;height:1.125rem}::ng-deep .p-checkbox{display:flex;align-items:center}::ng-deep .p-checkbox-label{font-size:.875rem}::ng-deep .p-datatable .p-paginator-bottom{scale:.8}::ng-deep .p-menuitem-text{font-size:.875rem}::ng-deep .p-tieredmenu .p-menuitem>.p-menuitem-content .p-menuitem-link{padding:.5rem .75rem}::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody>tr>td{padding:.35rem}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i5$2.AutoFocus, selector: "[pAutoFocus]", inputs: ["autofocus"] }, { kind: "directive", type: i6.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "component", type: i8.Card, selector: "p-card", inputs: ["header", "subheader", "style", "styleClass"] }, { kind: "component", type: i8$1.Checkbox, selector: "p-checkbox", inputs: ["value", "name", "disabled", "binary", "label", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "style", "styleClass", "labelStyleClass", "formControl", "checkboxIcon", "readonly", "required", "autofocus", "trueValue", "falseValue", "variant"], outputs: ["onChange", "onFocus", "onBlur"] }, { kind: "directive", type: i5$3.InputText, selector: "[pInputText]", inputs: ["variant"] }, { kind: "component", type: i13.TieredMenu, selector: "p-tieredMenu", inputs: ["model", "popup", "style", "styleClass", "appendTo", "autoZIndex", "baseZIndex", "autoDisplay", "showTransitionOptions", "hideTransitionOptions", "id", "ariaLabel", "ariaLabelledBy", "disabled", "tabindex"], outputs: ["onShow", "onHide"] }, { kind: "component", type: i14.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll", "virtualRowHeight"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i14.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "component", type: i14.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "component", type: i14.TableCheckbox, selector: "p-tableCheckbox", inputs: ["disabled", "value", "index", "inputId", "name", "required", "ariaLabel"] }, { kind: "component", type: i14.TableHeaderCheckbox, selector: "p-tableHeaderCheckbox", inputs: ["disabled", "inputId", "name", "ariaLabel"] }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: KvSwitchComponent, selector: "kv-switch", inputs: ["readonly", "switchValue"], outputs: ["onSwitchChange"] }, { kind: "component", type: KvButtonComponent, selector: "kv-button", inputs: ["fullWidth", "type", "loading", "severity", "size", "icon", "label", "disabled"], outputs: ["onClick"] }] }); }
|
|
1908
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.8", type: KvTableComponent, selector: "kv-table", inputs: { _templates: { classPropertyName: "_templates", publicName: "templates", isSignal: false, isRequired: false, transformFunction: null }, setConfig: { classPropertyName: "setConfig", publicName: "config", isSignal: false, isRequired: false, transformFunction: null }, first: { classPropertyName: "first", publicName: "first", isSignal: true, isRequired: false, transformFunction: null }, rows: { classPropertyName: "rows", publicName: "rows", isSignal: true, isRequired: false, transformFunction: null }, defaultSortField: { classPropertyName: "defaultSortField", publicName: "defaultSortField", isSignal: false, isRequired: false, transformFunction: null }, dataSource: { classPropertyName: "dataSource", publicName: "dataSource", isSignal: false, isRequired: false, transformFunction: null }, selectedItems: { classPropertyName: "selectedItems", publicName: "selectedItems", isSignal: false, isRequired: false, transformFunction: null }, totalRecords: { classPropertyName: "totalRecords", publicName: "totalRecords", isSignal: false, isRequired: false, transformFunction: null }, paginator: { classPropertyName: "paginator", publicName: "paginator", isSignal: false, isRequired: false, transformFunction: null }, rowsPerPageOptions: { classPropertyName: "rowsPerPageOptions", publicName: "rowsPerPageOptions", isSignal: false, isRequired: false, transformFunction: null }, tableSize: { classPropertyName: "tableSize", publicName: "tableSize", isSignal: false, isRequired: false, transformFunction: null }, filterColumnsBtn: { classPropertyName: "filterColumnsBtn", publicName: "filterColumnsBtn", isSignal: false, isRequired: false, transformFunction: null }, replaceEmptyValues: { classPropertyName: "replaceEmptyValues", publicName: "replaceEmptyValues", isSignal: false, isRequired: false, transformFunction: null }, filtrosAvancados: { classPropertyName: "filtrosAvancados", publicName: "filtrosAvancados", isSignal: false, isRequired: false, transformFunction: null }, scrollHeight: { classPropertyName: "scrollHeight", publicName: "scrollHeight", isSignal: false, isRequired: false, transformFunction: null }, isTableScrollable: { classPropertyName: "isTableScrollable", publicName: "isTableScrollable", isSignal: false, isRequired: false, transformFunction: null }, tableCaptalized: { classPropertyName: "tableCaptalized", publicName: "tableCaptalized", isSignal: false, isRequired: false, transformFunction: null }, rowTrackBy: { classPropertyName: "rowTrackBy", publicName: "rowTrackBy", isSignal: false, isRequired: false, transformFunction: null }, responsiveLayout: { classPropertyName: "responsiveLayout", publicName: "responsiveLayout", isSignal: false, isRequired: false, transformFunction: null }, disabledHeaderCheckbox: { classPropertyName: "disabledHeaderCheckbox", publicName: "disabledHeaderCheckbox", isSignal: false, isRequired: false, transformFunction: null }, applyStyle: { classPropertyName: "applyStyle", publicName: "applyStyle", isSignal: false, isRequired: false, transformFunction: null }, pageLinksOptions: { classPropertyName: "pageLinksOptions", publicName: "pageLinksOptions", isSignal: false, isRequired: false, transformFunction: null }, showFirstLastIcon: { classPropertyName: "showFirstLastIcon", publicName: "showFirstLastIcon", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { first: "firstChange", rows: "rowsChange", onActiveItem: "onActiveItem", onActiveItemLote: "onActiveItemLote", onPaginate: "onPaginate", onSelectionChange: "onSelectionChange", doubleClickEvent: "doubleClickEvent", filterField: "filterField", onSwitchTableChange: "onSwitchTableChange" }, host: { listeners: { "window:resize": "onWindowResize($event)", "document:keydown.escape": "onEscapeKey($event)", "document:click": "onClickEvent($event)" } }, queries: [{ propertyName: "templates", predicate: TemplateDirective }], viewQueries: [{ propertyName: "table", first: true, predicate: ["table"], descendants: true }, { propertyName: "ptable", first: true, predicate: Table, descendants: true }, { propertyName: "menuFiltroDiv", first: true, predicate: ["menuFiltroDiv"], descendants: true }, { propertyName: "botaoFiltro", first: true, predicate: ["botaoFiltro"], descendants: true }, { propertyName: "inputField", first: true, predicate: ["inputField"], descendants: true }], ngImport: i0, template: "<div>\r\n @if (config) {\r\n <p-table\r\n #dt\r\n styleClass=\"p-datatable-sm\"\r\n [value]=\"dataSource\"\r\n [(selection)]=\"selectedItems\"\r\n [rowSelectable]=\"isRowSelectable\"\r\n [columns]=\"config.columns\"\r\n [globalFilterFields]=\"globalFilterFields\"\r\n [rows]=\"rows()\"\r\n [paginator]=\"paginator\"\r\n [rowsPerPageOptions]=\"rowsPerPageOptions\"\r\n [showCurrentPageReport]=\"true\"\r\n currentPageReportTemplate=\"{first} - {last} de {totalRecords}\"\r\n [rowHover]=\"true\"\r\n [totalRecords]=\"totalRecords\"\r\n [lazy]=\"config.lazy\"\r\n [first]=\"first()\"\r\n (onLazyLoad)=\"paginate($event)\"\r\n (selectionChange)=\"selectionChange($event)\"\r\n (onSort)=\"onSort($event)\"\r\n (onPage)=\"onPage($event)\"\r\n rowGroupMode=\"rowspan\"\r\n [groupRowsBy]=\"config.fieldGroup\"\r\n [showFirstLastIcon]=\"widthPage() > 960 ? true : false\"\r\n [pageLinks]=\"widthPage() > 960 ? 2 : 1\"\r\n [responsive]=\"true\"\r\n [responsiveLayout]=\"responsiveLayout ? 'stack' : ''\"\r\n [scrollable]=\"isTableScrollable\"\r\n [scrollHeight]=\"scrollHeight\"\r\n [rowTrackBy]=\"rowTrackBy\"\r\n >\r\n @if (config?.enableCation) {\r\n <ng-template pTemplate=\"caption\">\r\n <div\r\n class=\"flex flex-row flex-wrap justify-content-between grid formgrid p-fluid col-12 p-1 m-0\"\r\n [style.background-color]=\"'#f1f1f1'\"\r\n >\r\n <div class=\"col-12 flex flex-column\">\r\n @if (config.title) {\r\n <div class=\"text-md font-bold my-3\">\r\n {{ config.title }}\r\n </div>\r\n } @if (config.subtitle) {\r\n <div class=\"text-sm mb-4 font-medium\">\r\n {{ config.subtitle }}\r\n </div>\r\n }\r\n </div>\r\n\r\n <div\r\n class=\"flex flex-row align-items-center md:col-6 lg:col-4 {{\r\n widthPage() < 768 ? 'col-10' : 'col-12'\r\n }} gap-1 p-0\"\r\n >\r\n @if (config?.enableFilter) {\r\n <span class=\"p-input-icon-left\">\r\n <i class=\"pi pi-search text-sm\"></i>\r\n\r\n <input\r\n pInputText\r\n pAutoFocus\r\n [autofocus]=\"widthPage() > 800\"\r\n type=\"text\"\r\n (input)=\"onGlobalFilter(dt, $event)\"\r\n placeholder=\"Pesquisar...\"\r\n autocomplete=\"off\"\r\n #inputField\r\n class=\"text-sm\"\r\n />\r\n </span>\r\n } @if(filterColumnsBtn) {\r\n <div #botaoFiltro>\r\n <kv-button\r\n id=\"botaoFiltro\"\r\n [icon]=\"'align_vertical_top'\"\r\n (onClick)=\"abrirMenuFiltro($event)\"\r\n severity=\"tertiary\"\r\n pTooltip=\"Ocultar/Exibir colunas\"\r\n >\r\n </kv-button>\r\n </div>\r\n\r\n <div\r\n #menuFiltroDiv\r\n id=\"menuFiltroDiv\"\r\n [style.visibility]=\"'hidden'\"\r\n class=\"absolute z-4 bg-gray-200 menu-columns-filtro\"\r\n >\r\n <p-card styleClass=\"p-1\">\r\n <div\r\n class=\"flex flex-column text-medium w-15rem p-1\"\r\n *ngFor=\"let col of columnsFilter()\"\r\n >\r\n {{ checkMenuFiltro(col) }}\r\n <p-checkbox\r\n #filterColumns\r\n [label]=\"col.header\"\r\n [binary]=\"true\"\r\n class=\"checkbox-container\"\r\n (onChange)=\"dinamicColumnSet($event, col)\"\r\n [(ngModel)]=\"col.checked\"\r\n *ngIf=\"!dinamicDisableColumn(col)\"\r\n ></p-checkbox>\r\n </div>\r\n </p-card>\r\n </div>\r\n }\r\n </div>\r\n\r\n <div class=\"flex flex-row col-2 justify-content-end gap-2 p-0\">\r\n @for (action of config.actionsLote; track i; let i = $index) {\r\n <div class=\"flex align-items-center justify-content-center\">\r\n @if ((selectedItems.length > 0 || action.showAcoesLote) &&\r\n (getOrExecute(action.visible, selectedItems) ?? true)) {\r\n <kv-button\r\n (onClick)=\"action?.command(); activeItemLote(selectedItems)\"\r\n [pTooltip]=\"getOrExecute(action.tooltip, selectedItems)\"\r\n [tooltipPosition]=\"\r\n (getOrExecute(action.tooltip, selectedItems)?.length ??\r\n 0 > 7) &&\r\n config.actionsLote &&\r\n i == config.actionsLote.length - 1\r\n ? 'left'\r\n : 'bottom'\r\n \"\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 }\r\n </div>\r\n </div>\r\n </ng-template>\r\n }\r\n\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n @if (config.enableSelect) {\r\n <th>\r\n <p-tableHeaderCheckbox\r\n (click)=\"activeItemLote(selectedItems)\"\r\n [disabled]=\"disabledHeaderCheckbox\"\r\n ></p-tableHeaderCheckbox>\r\n </th>\r\n } @for (col of columns; track $index) {\r\n <th\r\n [pSortableColumn]=\"col.field\"\r\n [pSortableColumnDisabled]=\"col.sortable === false\"\r\n [style.width]=\"col.width\"\r\n >\r\n <div\r\n class=\"flex flex-row align-items-center {{\r\n col.centralize && 'justify-content-center'\r\n }}\"\r\n >\r\n <span class=\"text-xs font-medium\">{{ col.header }}</span>\r\n @if (col.sortable) {\r\n <p-sortIcon [field]=\"col.field\" class=\"pb-1\"></p-sortIcon>\r\n } @if (col.headerTooltip) {\r\n <span\r\n class=\"material-symbols-outlined flex align-items-center\"\r\n [pTooltip]=\"col.headerTooltip\"\r\n >info</span\r\n >\r\n }\r\n </div>\r\n </th>\r\n } @if (config.actions && config.actions.length > 0) {\r\n <th></th>\r\n }\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template\r\n pTemplate=\"body\"\r\n let-rowData\r\n let-columns=\"columns\"\r\n let-rowgroup=\"rowgroup\"\r\n let-rowspan=\"rowspan\"\r\n let-rowIndex=\"rowIndex\"\r\n >\r\n <tr\r\n (dblclick)=\"doubleClick($event, rowData)\"\r\n [ngClass]=\"{\r\n capitalize: tableCaptalized,\r\n last: rowIndex === dataSource.length - 1\r\n }\"\r\n class=\"tr-td {{ isDisabledRow(rowData) ? 'disabled-row' : '' }}\"\r\n >\r\n @if (config.enableSelect) {\r\n <td style=\"width: 8px !important\">\r\n <p-tableCheckbox\r\n [value]=\"rowData\"\r\n [disabled]=\"isDisabledCheckbox(rowData)\"\r\n (click)=\"activeItemLote(selectedItems)\"\r\n ></p-tableCheckbox>\r\n </td>\r\n } @for (col of columns; track $index) {\r\n <ng-container>\r\n @if (rowgroup && !col.template) {\r\n <td\r\n [attr.rowspan]=\"rowgroup && col.grouped ? rowspan : null\"\r\n [pTooltip]=\"returnTooltipRow(rowData, col)\"\r\n class=\"{{\r\n col.styleClass\r\n ? col.styleClass(rowData, col, rowData[col.field])\r\n : ''\r\n }} \"\r\n >\r\n <span class=\"p-column-title\">{{ col.header }}:</span>\r\n\r\n <span\r\n *ngIf=\"!isBooleanField(rowData, col); else booleanField\"\r\n [class]=\"returnRowClass(rowData, col)\"\r\n >\r\n @if (!isChipField(col) && !col.iconField && !isImageField(col)) {\r\n <span\r\n class=\"flex flex-row gap-2 align-items-center {{\r\n col.centralize && 'justify-content-center'\r\n }} text-xs\"\r\n [pTooltip]=\"\r\n col.tooltip && col.tooltip(rowData, col, rowData[col.field])\r\n \"\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 } @if (col.icon) {\r\n <i [class]=\"col.icon + ' mr-2'\"></i>\r\n }\r\n {{ transformValue(rowData, col) }}\r\n </span>\r\n } @if (isChipField(col) && !col.iconField) {\r\n <div>\r\n <span\r\n [class]=\"returnClassChip(rowData, col)\"\r\n [pTooltip]=\"returnTooltipIcon(rowData, col)\"\r\n class=\"text-xs\"\r\n >{{ transformValue(rowData, col) }}</span\r\n >\r\n </div>\r\n }\r\n </span>\r\n\r\n @if (isImageField(col)) {\r\n <span>\r\n <span>\r\n <img class=\"image\" [src]=\"loadImage(rowData, col)\" />\r\n </span>\r\n </span>\r\n } @if (col.iconField) {\r\n <i\r\n [ngClass]=\"{\r\n 'material-icons': col.indIconMaterial,\r\n 'material-symbols-outlined mr-2': !col.indIconMaterial\r\n }\"\r\n [pTooltip]=\"returnTooltipIcon(rowData, col)\"\r\n >\r\n {{ returnClassIcon(rowData, col) }}\r\n </i>\r\n }\r\n\r\n <ng-template #booleanField>\r\n @if (!col.iconField && !isSwitchField(col)) {\r\n <div\r\n class=\"flex flex-row gap-2 align-items-center {{\r\n col.centralize && 'justify-content-center'\r\n }}\"\r\n [pTooltip]=\"\r\n col.tooltip && col.tooltip(rowData, col, rowData[col.field])\r\n \"\r\n >\r\n <i\r\n [ngClass]=\"\r\n rowData[col.field] ? 'text-green-500' : 'text-red-500'\r\n \"\r\n ><span\r\n class=\"material-symbols-outlined text-lg font-semibold\"\r\n >\r\n {{ rowData[col.field] ? \"check\" : \"close\" }}\r\n </span>\r\n </i>\r\n </div>\r\n\r\n } @if (isSwitchField(col)) {\r\n <span\r\n [class]=\"\r\n returnRowClass(rowData, col) +\r\n ' flex flex-row align-items-center justify-content-center'\r\n \"\r\n > \r\n\r\n @if(col.switchDisable){\r\n <kv-switch\r\n (onSwitchChange)=\"onSwitchChange($event, rowData, col)\"\r\n [disabled]=\"col.switchDisable(rowData, col)\"\r\n [switchValue]=\"transformValue(rowData, col)\"\r\n >\r\n </kv-switch>\r\n }\r\n @else {\r\n <kv-switch\r\n (onSwitchChange)=\"onSwitchChange($event, rowData, col)\"\r\n [disabled]=\"col?.onlyReadField ?? true\"\r\n [switchValue]=\"transformValue(rowData, col)\"\r\n >\r\n </kv-switch>\r\n }\r\n </span>\r\n }\r\n </ng-template>\r\n </td>\r\n } @if (!rowgroup && !col.grouped && !col.template) {\r\n <td\r\n class=\"rowTable {{\r\n col.styleClass\r\n ? col.styleClass(rowData, col, rowData[col.field])\r\n : ''\r\n }} \"\r\n [pTooltip]=\"returnTooltipRow(rowData, col)\"\r\n >\r\n <span class=\"p-column-title\">{{ col.header }}:</span>\r\n\r\n <span\r\n *ngIf=\"!isBooleanField(rowData, col); else booleanField\"\r\n [class]=\"\r\n returnRowClass(rowData, col) +\r\n ' flex flex-row gap-2 align-items-center ' +\r\n (col.centralize && 'justify-content-center')\r\n \"\r\n [pTooltip]=\"\r\n col.tooltip && col.tooltip(rowData, col, rowData[col.field])\r\n \"\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 } @if (!isChipField(col) && !col.iconField && !isImageField(col)){\r\n <span class=\"text-xs\">\r\n @if (col.icon) {\r\n <i [class]=\"col.icon + ' mr-2'\"></i>\r\n }\r\n {{ transformValue(rowData, col) }}\r\n </span>\r\n } @if (isChipField(col) && !col.iconField) {\r\n <div>\r\n <span\r\n [class]=\"returnClassChip(rowData, col)\"\r\n [pTooltip]=\"returnTooltipIcon(rowData, col)\"\r\n class=\"text-xs\"\r\n >\r\n {{ transformValue(rowData, col) }}</span\r\n >\r\n </div>\r\n }\r\n </span>\r\n\r\n @if (isImageField(col)) {\r\n <span>\r\n <span>\r\n <img class=\"image\" [src]=\"loadImage(rowData, col)\" />\r\n </span>\r\n </span>\r\n } @if (col.iconField) {\r\n <i\r\n [ngClass]=\"{\r\n 'material-icons': col.indIconMaterial,\r\n 'material-symbols-outlined mr-2': !col.indIconMaterial\r\n }\"\r\n [pTooltip]=\"returnTooltipIcon(rowData, col)\"\r\n >\r\n {{ returnClassIcon(rowData, col) }}\r\n </i>\r\n }\r\n\r\n <ng-template #booleanField>\r\n @if (!col.iconField && !isSwitchField(col)) {\r\n <div\r\n class=\"flex flex-row gap-2 align-items-center {{\r\n col.centralize && 'justify-content-center'\r\n }}\"\r\n [pTooltip]=\"\r\n col.tooltip && col.tooltip(rowData, col, rowData[col.field])\r\n \"\r\n >\r\n <i\r\n [ngClass]=\"\r\n rowData[col.field] ? 'text-green-500' : 'text-red-500'\r\n \"\r\n ><span\r\n class=\"material-symbols-outlined text-lg font-semibold\"\r\n >\r\n {{ rowData[col.field] ? \"check\" : \"close\" }}\r\n </span>\r\n </i>\r\n </div>\r\n } @if (isSwitchField(col)) {\r\n <span\r\n [class]=\"\r\n returnRowClass(rowData, col) +\r\n ' flex flex-row align-items-center justify-content-center'\r\n \"\r\n >\r\n @if(col.switchDisable){\r\n <kv-switch\r\n (onSwitchChange)=\"onSwitchChange($event, rowData, col)\"\r\n [disabled]=\"col.switchDisable(rowData, col)\"\r\n [switchValue]=\"transformValue(rowData, col)\"\r\n >\r\n </kv-switch>\r\n }\r\n @else {\r\n <kv-switch\r\n (onSwitchChange)=\"onSwitchChange($event, rowData, col)\"\r\n [disabled]=\"col?.onlyReadField ?? true\"\r\n [switchValue]=\"transformValue(rowData, col)\"\r\n >\r\n </kv-switch>\r\n }\r\n \r\n </span>\r\n }\r\n </ng-template>\r\n </td>\r\n } @if (col.template) {\r\n <td\r\n class=\"rowTable {{\r\n col.styleClass\r\n ? col.styleClass(rowData, col, rowData[col.field])\r\n : ''\r\n }} \"\r\n >\r\n <span class=\"p-column-title\">{{ col.header }}:</span>\r\n @if (getCustomTemplate(col.template.name)) {\r\n\r\n <div\r\n class=\"flex flex-row gap-2 align-items-center {{\r\n col.centralize && ' justify-content-center'\r\n }}\"\r\n [pTooltip]=\"\r\n col.tooltip && col.tooltip(rowData, col, rowData[col.field])\r\n \"\r\n >\r\n @if(col.tagColor) {\r\n <div\r\n class=\"tag\"\r\n [pTooltip]=\"col.tooltipTag && col.tooltipTag(rowData, col)\"\r\n [style.background-color]=\"col.tagColor(rowData, col)\"\r\n ></div>\r\n }\r\n\r\n <div class=\"w-full\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"getCustomTemplate(col.template.name)\"\r\n [ngTemplateOutletContext]=\"{ $implicit: rowData }\"\r\n />\r\n </div>\r\n </div>\r\n }\r\n </td>\r\n }\r\n </ng-container>\r\n } @if (config.actions && config.actions.length > 0) {\r\n <td>\r\n <div class=\"flex flex-row justify-content-end w-full\">\r\n <span\r\n class=\"material-symbols-outlined cursor-pointer icon-more-horiz\"\r\n style=\"font-size: 20px; padding: 0.2rem;\"\r\n (click)=\"menu.toggle($event); activeItem(rowData)\"\r\n >\r\n more_horiz\r\n </span>\r\n\r\n <p-tieredMenu\r\n #menu\r\n [popup]=\"true\"\r\n [model]=\"tableActions[rowIndex - actionsOffset]\"\r\n appendTo=\"body\"\r\n ></p-tieredMenu>\r\n </div>\r\n </td>\r\n }\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"emptymessage\" let-columns>\r\n <tr>\r\n <td\r\n [attr.colspan]=\"columns.length + 2\"\r\n style=\"text-align: center; border-radius: 10px !important\"\r\n >\r\n <p class=\"font-medium m-0 text-sm\">Nenhum registro encontrado</p>\r\n </td>\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n }\r\n</div>\r\n\r\n<link\r\n rel=\"stylesheet\"\r\n href=\"https://fonts.googleapis.com/icon?family=Material+Icons\"\r\n/>\r\n\r\n<link\r\n rel=\"stylesheet\"\r\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@48,400,0,0\"\r\n/>\r\n", styles: ["::ng-deep .p-datatable>.p-datatable-wrapper::-webkit-scrollbar{width:6px}::ng-deep .p-datatable>.p-datatable-wrapper::-webkit-scrollbar:hover{background-color:#dededebf}::ng-deep .p-datatable>.p-datatable-wrapper::-webkit-scrollbar-thumb{border-radius:4px;background-color:transparent}::ng-deep .p-datatable>.p-datatable-wrapper:hover::-webkit-scrollbar-thumb{border-left:2px solid white;background-color:#00000080}::ng-deep .p-datatable>.p-datatable-wrapper::-webkit-scrollbar-track{border-left:2px solid white;background-color:#dededebf}.tag{width:5px;height:20px;border-radius:.25rem}::ng-deep .p-panel .p-panel-header{border:none!important}:host ::ng-deep .p-datatable-header{background-color:#f1f1f1!important;padding:0!important;border-radius:5px!important}::ng-deep .p-panel.p-panel-toggleable .p-panel-header{background-color:#f1f1f1}::ng-deep .p-datatable.p-datatable-sm .p-datatable-thead>tr>th{background-color:#f1f1f1;padding:.35rem}.icon-more-horiz{font-weight:700}.icon-more-horiz:hover,.icon-more-horiz:focus{color:#5e5e5e;transition:color .3s,transform .3s;background-color:#eaeaea;border-radius:50%}.tr-td{overflow-wrap:anywhere}.tr-td:hover{box-shadow:#3c40434d 0 1px 2px,#3c404326 0 2px 6px 2px;background-color:#fff;transition:color .3s,transform .3s;transform:scale(1)}.tr-td:hover.last{box-shadow:-1px -1px 9px -3px #000000bf;-webkit-box-shadow:-1px -1px 9px -3px rgba(0,0,0,.75);-moz-box-shadow:-1px -1px 9px -3px rgba(0,0,0,.75)}.disabled-row{pointer-events:none;opacity:.6;background-color:#dddddd8e}::ng-deep .p-tooltip{pointer-events:auto}.btn-table{background-color:#29b92d;padding:12px}.btn-table:hover{background-color:#249a29}.btn-table:active{background-color:#1c801f}.btn-table:disabled{background-color:#29b92d}::ng-deep svg.p-icon{width:.65rem;height:.65rem}::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}input{height:1.875rem}::ng-deep .p-checkbox .p-checkbox-box{width:1.125rem;height:1.125rem}::ng-deep .p-checkbox{display:flex;align-items:center}::ng-deep .p-checkbox-label{font-size:.875rem}::ng-deep .p-datatable .p-paginator-bottom{scale:.75}::ng-deep .p-menuitem-text{font-size:.875rem}::ng-deep .p-tieredmenu .p-menuitem>.p-menuitem-content .p-menuitem-link{padding:.5rem .75rem}::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody>tr>td{padding:.2rem}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i5$2.AutoFocus, selector: "[pAutoFocus]", inputs: ["autofocus"] }, { kind: "directive", type: i6.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "component", type: i8.Card, selector: "p-card", inputs: ["header", "subheader", "style", "styleClass"] }, { kind: "component", type: i8$1.Checkbox, selector: "p-checkbox", inputs: ["value", "name", "disabled", "binary", "label", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "style", "styleClass", "labelStyleClass", "formControl", "checkboxIcon", "readonly", "required", "autofocus", "trueValue", "falseValue", "variant"], outputs: ["onChange", "onFocus", "onBlur"] }, { kind: "directive", type: i5$3.InputText, selector: "[pInputText]", inputs: ["variant"] }, { kind: "component", type: i13.TieredMenu, selector: "p-tieredMenu", inputs: ["model", "popup", "style", "styleClass", "appendTo", "autoZIndex", "baseZIndex", "autoDisplay", "showTransitionOptions", "hideTransitionOptions", "id", "ariaLabel", "ariaLabelledBy", "disabled", "tabindex"], outputs: ["onShow", "onHide"] }, { kind: "component", type: i14.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll", "virtualRowHeight"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i14.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "component", type: i14.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "component", type: i14.TableCheckbox, selector: "p-tableCheckbox", inputs: ["disabled", "value", "index", "inputId", "name", "required", "ariaLabel"] }, { kind: "component", type: i14.TableHeaderCheckbox, selector: "p-tableHeaderCheckbox", inputs: ["disabled", "inputId", "name", "ariaLabel"] }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: KvSwitchComponent, selector: "kv-switch", inputs: ["readonly", "switchValue"], outputs: ["onSwitchChange"] }, { kind: "component", type: KvButtonComponent, selector: "kv-button", inputs: ["fullWidth", "type", "loading", "severity", "size", "icon", "label", "disabled"], outputs: ["onClick"] }] }); }
|
|
1903
1909
|
}
|
|
1904
1910
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvTableComponent, decorators: [{
|
|
1905
1911
|
type: Component,
|
|
1906
|
-
args: [{ selector: 'kv-table', template: "<div>\r\n @if (config) {\r\n <p-table\r\n #dt\r\n styleClass=\"p-datatable-sm\"\r\n [value]=\"dataSource\"\r\n [(selection)]=\"selectedItems\"\r\n [rowSelectable]=\"isRowSelectable\"\r\n [columns]=\"config.columns\"\r\n [globalFilterFields]=\"globalFilterFields\"\r\n [rows]=\"rows()\"\r\n [paginator]=\"paginator\"\r\n [rowsPerPageOptions]=\"rowsPerPageOptions\"\r\n [showCurrentPageReport]=\"true\"\r\n currentPageReportTemplate=\"{first} - {last} de {totalRecords}\"\r\n [rowHover]=\"true\"\r\n [totalRecords]=\"totalRecords\"\r\n [lazy]=\"config.lazy\"\r\n [first]=\"first()\"\r\n (onLazyLoad)=\"paginate($event)\"\r\n (selectionChange)=\"selectionChange($event)\"\r\n (onSort)=\"onSort($event)\"\r\n (onPage)=\"onPage($event)\"\r\n rowGroupMode=\"rowspan\"\r\n [groupRowsBy]=\"config.fieldGroup\"\r\n [showFirstLastIcon]=\"widthPage() > 960 ? true : false\"\r\n [pageLinks]=\"widthPage() > 960 ? 2 : 1\"\r\n [responsive]=\"true\"\r\n [responsiveLayout]=\"responsiveLayout ? 'stack' : ''\"\r\n [scrollable]=\"isTableScrollable\"\r\n [scrollHeight]=\"scrollHeight\"\r\n [rowTrackBy]=\"rowTrackBy\"\r\n >\r\n @if (config?.enableCation) {\r\n <ng-template pTemplate=\"caption\">\r\n <div\r\n class=\"flex flex-row flex-wrap justify-content-between grid formgrid p-fluid col-12 p-2 m-0\"\r\n [style.background-color]=\"'#f1f1f1'\"\r\n >\r\n <div class=\"col-12 flex flex-column\">\r\n @if (config.title) {\r\n <div class=\"text-md font-bold my-3\">\r\n {{ config.title }}\r\n </div>\r\n } @if (config.subtitle) {\r\n <div class=\"text-sm mb-4 font-medium\">\r\n {{ config.subtitle }}\r\n </div>\r\n }\r\n </div>\r\n\r\n <div\r\n class=\"flex flex-row align-items-center md:col-6 lg:col-4 {{\r\n widthPage() < 768 ? 'col-10' : 'col-12'\r\n }} gap-1 p-0\"\r\n >\r\n @if (config?.enableFilter) {\r\n <span class=\"p-input-icon-left\">\r\n <i class=\"pi pi-search text-sm\"></i>\r\n\r\n <input\r\n pInputText\r\n pAutoFocus\r\n [autofocus]=\"widthPage() > 800\"\r\n type=\"text\"\r\n (input)=\"onGlobalFilter(dt, $event)\"\r\n placeholder=\"Pesquisar...\"\r\n autocomplete=\"off\"\r\n #inputField\r\n class=\"text-sm\"\r\n />\r\n </span>\r\n } @if(filterColumnsBtn) {\r\n <div #botaoFiltro>\r\n <kv-button\r\n id=\"botaoFiltro\"\r\n [icon]=\"'align_vertical_top'\"\r\n (onClick)=\"abrirMenuFiltro($event)\"\r\n severity=\"tertiary\"\r\n pTooltip=\"Ocultar/Exibir colunas\"\r\n >\r\n </kv-button>\r\n </div>\r\n\r\n <div\r\n #menuFiltroDiv\r\n id=\"menuFiltroDiv\"\r\n [style.visibility]=\"'hidden'\"\r\n class=\"absolute z-4 bg-gray-200 menu-columns-filtro\"\r\n >\r\n <p-card styleClass=\"p-1\">\r\n <div\r\n class=\"flex flex-column text-medium w-15rem p-1\"\r\n *ngFor=\"let col of columnsFilter()\"\r\n >\r\n {{ checkMenuFiltro(col) }}\r\n <p-checkbox\r\n #filterColumns\r\n [label]=\"col.header\"\r\n [binary]=\"true\"\r\n class=\"checkbox-container\"\r\n (onChange)=\"dinamicColumnSet($event, col)\"\r\n [(ngModel)]=\"col.checked\"\r\n *ngIf=\"!dinamicDisableColumn(col)\"\r\n ></p-checkbox>\r\n </div>\r\n </p-card>\r\n </div>\r\n }\r\n </div>\r\n\r\n <div class=\"flex flex-row col-2 justify-content-end gap-2 p-0\">\r\n @for (action of config.actionsLote; track i; let i = $index) {\r\n <div class=\"flex align-items-center justify-content-center\">\r\n @if ((selectedItems.length > 0 || action.showAcoesLote) &&\r\n (getOrExecute(action.visible, selectedItems) ?? true)) {\r\n <kv-button\r\n (onClick)=\"action?.command(); activeItemLote(selectedItems)\"\r\n [pTooltip]=\"getOrExecute(action.tooltip, selectedItems)\"\r\n [tooltipPosition]=\"\r\n (getOrExecute(action.tooltip, selectedItems)?.length ??\r\n 0 > 7) &&\r\n config.actionsLote &&\r\n i == config.actionsLote.length - 1\r\n ? 'left'\r\n : 'bottom'\r\n \"\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 }\r\n </div>\r\n </div>\r\n </ng-template>\r\n }\r\n\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n @if (config.enableSelect) {\r\n <th>\r\n <p-tableHeaderCheckbox\r\n (click)=\"activeItemLote(selectedItems)\"\r\n [disabled]=\"disabledHeaderCheckbox\"\r\n ></p-tableHeaderCheckbox>\r\n </th>\r\n } @for (col of columns; track $index) {\r\n <th\r\n [pSortableColumn]=\"col.field\"\r\n [pSortableColumnDisabled]=\"col.sortable === false\"\r\n [style.width]=\"col.width\"\r\n >\r\n <div\r\n class=\"flex flex-row align-items-center {{\r\n col.centralize && 'justify-content-center'\r\n }}\"\r\n >\r\n <span class=\"text-xs font-medium\">{{ col.header }}</span>\r\n @if (col.sortable) {\r\n <p-sortIcon [field]=\"col.field\" class=\"pb-1\"></p-sortIcon>\r\n } @if (col.headerTooltip) {\r\n <span\r\n class=\"material-symbols-outlined flex align-items-center\"\r\n [pTooltip]=\"col.headerTooltip\"\r\n >info</span\r\n >\r\n }\r\n </div>\r\n </th>\r\n } @if (config.actions && config.actions.length > 0) {\r\n <th></th>\r\n }\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template\r\n pTemplate=\"body\"\r\n let-rowData\r\n let-columns=\"columns\"\r\n let-rowgroup=\"rowgroup\"\r\n let-rowspan=\"rowspan\"\r\n let-rowIndex=\"rowIndex\"\r\n >\r\n <tr\r\n (dblclick)=\"doubleClick($event, rowData)\"\r\n [ngClass]=\"{\r\n capitalize: tableCaptalized,\r\n last: rowIndex === dataSource.length - 1\r\n }\"\r\n class=\"tr-td {{ isDisabledRow(rowData) ? 'disabled-row' : '' }}\"\r\n >\r\n @if (config.enableSelect) {\r\n <td style=\"width: 8px !important\">\r\n <p-tableCheckbox\r\n [value]=\"rowData\"\r\n [disabled]=\"isDisabledCheckbox(rowData)\"\r\n (click)=\"activeItemLote(selectedItems)\"\r\n ></p-tableCheckbox>\r\n </td>\r\n } @for (col of columns; track $index) {\r\n <ng-container>\r\n @if (rowgroup && !col.template) {\r\n <td\r\n [attr.rowspan]=\"rowgroup && col.grouped ? rowspan : null\"\r\n [pTooltip]=\"returnTooltipRow(rowData, col)\"\r\n class=\"{{\r\n col.styleClass\r\n ? col.styleClass(rowData, col, rowData[col.field])\r\n : ''\r\n }} \"\r\n >\r\n <span class=\"p-column-title\">{{ col.header }}:</span>\r\n\r\n <span\r\n *ngIf=\"!isBooleanField(rowData, col); else booleanField\"\r\n [class]=\"returnRowClass(rowData, col)\"\r\n >\r\n @if (!isChipField(col) && !col.iconField && !isImageField(col)) {\r\n <span\r\n class=\"flex flex-row gap-2 align-items-center {{\r\n col.centralize && 'justify-content-center'\r\n }} text-xs\"\r\n [pTooltip]=\"\r\n col.tooltip && col.tooltip(rowData, col, rowData[col.field])\r\n \"\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 } @if (col.icon) {\r\n <i [class]=\"col.icon + ' mr-2'\"></i>\r\n }\r\n {{ transformValue(rowData, col) }}\r\n </span>\r\n } @if (isChipField(col) && !col.iconField) {\r\n <div>\r\n <span\r\n [class]=\"returnClassChip(rowData, col)\"\r\n [pTooltip]=\"returnTooltipIcon(rowData, col)\"\r\n class=\"text-xs\"\r\n >{{ transformValue(rowData, col) }}</span\r\n >\r\n </div>\r\n }\r\n </span>\r\n\r\n @if (isImageField(col)) {\r\n <span>\r\n <span>\r\n <img class=\"image\" [src]=\"loadImage(rowData, col)\" />\r\n </span>\r\n </span>\r\n } @if (col.iconField) {\r\n <i\r\n [ngClass]=\"{\r\n 'material-icons': col.indIconMaterial,\r\n 'material-symbols-outlined mr-2': !col.indIconMaterial\r\n }\"\r\n [pTooltip]=\"returnTooltipIcon(rowData, col)\"\r\n >\r\n {{ returnClassIcon(rowData, col) }}\r\n </i>\r\n }\r\n\r\n <ng-template #booleanField>\r\n @if (!col.iconField && !isSwitchField(col)) {\r\n <div\r\n class=\"flex flex-row gap-2 align-items-center {{\r\n col.centralize && 'justify-content-center'\r\n }}\"\r\n [pTooltip]=\"\r\n col.tooltip && col.tooltip(rowData, col, rowData[col.field])\r\n \"\r\n >\r\n <i\r\n [ngClass]=\"\r\n rowData[col.field] ? 'text-green-500' : 'text-red-500'\r\n \"\r\n ><span\r\n class=\"material-symbols-outlined text-lg font-semibold\"\r\n >\r\n {{ rowData[col.field] ? \"check\" : \"close\" }}\r\n </span>\r\n </i>\r\n </div>\r\n\r\n } @if (isSwitchField(col)) {\r\n <span\r\n [class]=\"\r\n returnRowClass(rowData, col) +\r\n ' flex flex-row align-items-center justify-content-center'\r\n \"\r\n > \r\n\r\n @if(col.switchDisable){\r\n <kv-switch\r\n (onSwitchChange)=\"onSwitchChange($event, rowData, col)\"\r\n [disabled]=\"col.switchDisable(rowData, col)\"\r\n [switchValue]=\"transformValue(rowData, col)\"\r\n >\r\n </kv-switch>\r\n }\r\n @else {\r\n <kv-switch\r\n (onSwitchChange)=\"onSwitchChange($event, rowData, col)\"\r\n [disabled]=\"col?.onlyReadField ?? true\"\r\n [switchValue]=\"transformValue(rowData, col)\"\r\n >\r\n </kv-switch>\r\n }\r\n </span>\r\n }\r\n </ng-template>\r\n </td>\r\n } @if (!rowgroup && !col.grouped && !col.template) {\r\n <td\r\n class=\"rowTable {{\r\n col.styleClass\r\n ? col.styleClass(rowData, col, rowData[col.field])\r\n : ''\r\n }} \"\r\n [pTooltip]=\"returnTooltipRow(rowData, col)\"\r\n >\r\n <span class=\"p-column-title\">{{ col.header }}:</span>\r\n\r\n <span\r\n *ngIf=\"!isBooleanField(rowData, col); else booleanField\"\r\n [class]=\"\r\n returnRowClass(rowData, col) +\r\n ' flex flex-row gap-2 align-items-center ' +\r\n (col.centralize && 'justify-content-center')\r\n \"\r\n [pTooltip]=\"\r\n col.tooltip && col.tooltip(rowData, col, rowData[col.field])\r\n \"\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 } @if (!isChipField(col) && !col.iconField && !isImageField(col)){\r\n <span class=\"text-xs\">\r\n @if (col.icon) {\r\n <i [class]=\"col.icon + ' mr-2'\"></i>\r\n }\r\n {{ transformValue(rowData, col) }}\r\n </span>\r\n } @if (isChipField(col) && !col.iconField) {\r\n <div>\r\n <span\r\n [class]=\"returnClassChip(rowData, col)\"\r\n [pTooltip]=\"returnTooltipIcon(rowData, col)\"\r\n class=\"text-xs\"\r\n >\r\n {{ transformValue(rowData, col) }}</span\r\n >\r\n </div>\r\n }\r\n </span>\r\n\r\n @if (isImageField(col)) {\r\n <span>\r\n <span>\r\n <img class=\"image\" [src]=\"loadImage(rowData, col)\" />\r\n </span>\r\n </span>\r\n } @if (col.iconField) {\r\n <i\r\n [ngClass]=\"{\r\n 'material-icons': col.indIconMaterial,\r\n 'material-symbols-outlined mr-2': !col.indIconMaterial\r\n }\"\r\n [pTooltip]=\"returnTooltipIcon(rowData, col)\"\r\n >\r\n {{ returnClassIcon(rowData, col) }}\r\n </i>\r\n }\r\n\r\n <ng-template #booleanField>\r\n @if (!col.iconField && !isSwitchField(col)) {\r\n <div\r\n class=\"flex flex-row gap-2 align-items-center {{\r\n col.centralize && 'justify-content-center'\r\n }}\"\r\n [pTooltip]=\"\r\n col.tooltip && col.tooltip(rowData, col, rowData[col.field])\r\n \"\r\n >\r\n <i\r\n [ngClass]=\"\r\n rowData[col.field] ? 'text-green-500' : 'text-red-500'\r\n \"\r\n ><span\r\n class=\"material-symbols-outlined text-lg font-semibold\"\r\n >\r\n {{ rowData[col.field] ? \"check\" : \"close\" }}\r\n </span>\r\n </i>\r\n </div>\r\n } @if (isSwitchField(col)) {\r\n <span\r\n [class]=\"\r\n returnRowClass(rowData, col) +\r\n ' flex flex-row align-items-center justify-content-center'\r\n \"\r\n >\r\n @if(col.switchDisable){\r\n <kv-switch\r\n (onSwitchChange)=\"onSwitchChange($event, rowData, col)\"\r\n [disabled]=\"col.switchDisable(rowData, col)\"\r\n [switchValue]=\"transformValue(rowData, col)\"\r\n >\r\n </kv-switch>\r\n }\r\n @else {\r\n <kv-switch\r\n (onSwitchChange)=\"onSwitchChange($event, rowData, col)\"\r\n [disabled]=\"col?.onlyReadField ?? true\"\r\n [switchValue]=\"transformValue(rowData, col)\"\r\n >\r\n </kv-switch>\r\n }\r\n \r\n </span>\r\n }\r\n </ng-template>\r\n </td>\r\n } @if (col.template) {\r\n <td\r\n class=\"rowTable {{\r\n col.styleClass\r\n ? col.styleClass(rowData, col, rowData[col.field])\r\n : ''\r\n }} \"\r\n >\r\n <span class=\"p-column-title\">{{ col.header }}:</span>\r\n @if (getCustomTemplate(col.template.name)) {\r\n\r\n <div\r\n class=\"flex flex-row gap-2 align-items-center {{\r\n col.centralize && ' justify-content-center'\r\n }}\"\r\n [pTooltip]=\"\r\n col.tooltip && col.tooltip(rowData, col, rowData[col.field])\r\n \"\r\n >\r\n @if(col.tagColor) {\r\n <div\r\n class=\"tag\"\r\n [pTooltip]=\"col.tooltipTag && col.tooltipTag(rowData, col)\"\r\n [style.background-color]=\"col.tagColor(rowData, col)\"\r\n ></div>\r\n }\r\n\r\n <div class=\"w-full\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"getCustomTemplate(col.template.name)\"\r\n [ngTemplateOutletContext]=\"{ $implicit: rowData }\"\r\n />\r\n </div>\r\n </div>\r\n }\r\n </td>\r\n }\r\n </ng-container>\r\n } @if (config.actions && config.actions.length > 0) {\r\n <td>\r\n <div class=\"flex flex-row justify-content-end w-full\">\r\n <span\r\n class=\"material-symbols-outlined cursor-pointer icon-more-horiz p-1\"\r\n style=\"font-size: 20px\"\r\n (click)=\"menu.toggle($event); activeItem(rowData)\"\r\n >\r\n more_horiz\r\n </span>\r\n\r\n <p-tieredMenu\r\n #menu\r\n [popup]=\"true\"\r\n [model]=\"tableActions[rowIndex - actionsOffset]\"\r\n appendTo=\"body\"\r\n ></p-tieredMenu>\r\n </div>\r\n </td>\r\n }\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"emptymessage\" let-columns>\r\n <tr>\r\n <td\r\n [attr.colspan]=\"columns.length + 2\"\r\n style=\"text-align: center; border-radius: 10px !important\"\r\n >\r\n <p class=\"font-medium m-0 text-sm\">Nenhum registro encontrado</p>\r\n </td>\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n }\r\n</div>\r\n\r\n<link\r\n rel=\"stylesheet\"\r\n href=\"https://fonts.googleapis.com/icon?family=Material+Icons\"\r\n/>\r\n\r\n<link\r\n rel=\"stylesheet\"\r\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@48,400,0,0\"\r\n/>\r\n", styles: ["::ng-deep .p-datatable>.p-datatable-wrapper::-webkit-scrollbar{width:6px}::ng-deep .p-datatable>.p-datatable-wrapper::-webkit-scrollbar:hover{background-color:#dededebf}::ng-deep .p-datatable>.p-datatable-wrapper::-webkit-scrollbar-thumb{border-radius:4px;background-color:transparent}::ng-deep .p-datatable>.p-datatable-wrapper:hover::-webkit-scrollbar-thumb{border-left:2px solid white;background-color:#00000080}::ng-deep .p-datatable>.p-datatable-wrapper::-webkit-scrollbar-track{border-left:2px solid white;background-color:#dededebf}.tag{width:5px;height:20px;border-radius:.25rem}::ng-deep .p-panel .p-panel-header{border:none!important}:host ::ng-deep .p-datatable-header{background-color:#f1f1f1!important;padding:0!important;border-radius:5px!important}::ng-deep .p-panel.p-panel-toggleable .p-panel-header{background-color:#f1f1f1}::ng-deep .p-datatable.p-datatable-sm .p-datatable-thead>tr>th{background-color:#f1f1f1;padding:.35rem}.icon-more-horiz{font-weight:700}.icon-more-horiz:hover,.icon-more-horiz:focus{color:#5e5e5e;transition:color .3s,transform .3s;background-color:#eaeaea;border-radius:50%}.tr-td{overflow-wrap:anywhere}.tr-td:hover{box-shadow:#3c40434d 0 1px 2px,#3c404326 0 2px 6px 2px;background-color:#fff;transition:color .3s,transform .3s;transform:scale(1)}.tr-td:hover.last{box-shadow:-1px -1px 9px -3px #000000bf;-webkit-box-shadow:-1px -1px 9px -3px rgba(0,0,0,.75);-moz-box-shadow:-1px -1px 9px -3px rgba(0,0,0,.75)}.disabled-row{pointer-events:none;opacity:.6;background-color:#dddddd8e}::ng-deep .p-tooltip{pointer-events:auto}.btn-table{background-color:#29b92d;padding:12px}.btn-table:hover{background-color:#249a29}.btn-table:active{background-color:#1c801f}.btn-table:disabled{background-color:#29b92d}::ng-deep svg.p-icon{width:.65rem;height:.65rem}::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}input{height:1.875rem}::ng-deep .p-checkbox .p-checkbox-box{width:1.125rem;height:1.125rem}::ng-deep .p-checkbox{display:flex;align-items:center}::ng-deep .p-checkbox-label{font-size:.875rem}::ng-deep .p-datatable .p-paginator-bottom{scale:.8}::ng-deep .p-menuitem-text{font-size:.875rem}::ng-deep .p-tieredmenu .p-menuitem>.p-menuitem-content .p-menuitem-link{padding:.5rem .75rem}::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody>tr>td{padding:.35rem}\n"] }]
|
|
1912
|
+
args: [{ selector: 'kv-table', template: "<div>\r\n @if (config) {\r\n <p-table\r\n #dt\r\n styleClass=\"p-datatable-sm\"\r\n [value]=\"dataSource\"\r\n [(selection)]=\"selectedItems\"\r\n [rowSelectable]=\"isRowSelectable\"\r\n [columns]=\"config.columns\"\r\n [globalFilterFields]=\"globalFilterFields\"\r\n [rows]=\"rows()\"\r\n [paginator]=\"paginator\"\r\n [rowsPerPageOptions]=\"rowsPerPageOptions\"\r\n [showCurrentPageReport]=\"true\"\r\n currentPageReportTemplate=\"{first} - {last} de {totalRecords}\"\r\n [rowHover]=\"true\"\r\n [totalRecords]=\"totalRecords\"\r\n [lazy]=\"config.lazy\"\r\n [first]=\"first()\"\r\n (onLazyLoad)=\"paginate($event)\"\r\n (selectionChange)=\"selectionChange($event)\"\r\n (onSort)=\"onSort($event)\"\r\n (onPage)=\"onPage($event)\"\r\n rowGroupMode=\"rowspan\"\r\n [groupRowsBy]=\"config.fieldGroup\"\r\n [showFirstLastIcon]=\"widthPage() > 960 ? true : false\"\r\n [pageLinks]=\"widthPage() > 960 ? 2 : 1\"\r\n [responsive]=\"true\"\r\n [responsiveLayout]=\"responsiveLayout ? 'stack' : ''\"\r\n [scrollable]=\"isTableScrollable\"\r\n [scrollHeight]=\"scrollHeight\"\r\n [rowTrackBy]=\"rowTrackBy\"\r\n >\r\n @if (config?.enableCation) {\r\n <ng-template pTemplate=\"caption\">\r\n <div\r\n class=\"flex flex-row flex-wrap justify-content-between grid formgrid p-fluid col-12 p-1 m-0\"\r\n [style.background-color]=\"'#f1f1f1'\"\r\n >\r\n <div class=\"col-12 flex flex-column\">\r\n @if (config.title) {\r\n <div class=\"text-md font-bold my-3\">\r\n {{ config.title }}\r\n </div>\r\n } @if (config.subtitle) {\r\n <div class=\"text-sm mb-4 font-medium\">\r\n {{ config.subtitle }}\r\n </div>\r\n }\r\n </div>\r\n\r\n <div\r\n class=\"flex flex-row align-items-center md:col-6 lg:col-4 {{\r\n widthPage() < 768 ? 'col-10' : 'col-12'\r\n }} gap-1 p-0\"\r\n >\r\n @if (config?.enableFilter) {\r\n <span class=\"p-input-icon-left\">\r\n <i class=\"pi pi-search text-sm\"></i>\r\n\r\n <input\r\n pInputText\r\n pAutoFocus\r\n [autofocus]=\"widthPage() > 800\"\r\n type=\"text\"\r\n (input)=\"onGlobalFilter(dt, $event)\"\r\n placeholder=\"Pesquisar...\"\r\n autocomplete=\"off\"\r\n #inputField\r\n class=\"text-sm\"\r\n />\r\n </span>\r\n } @if(filterColumnsBtn) {\r\n <div #botaoFiltro>\r\n <kv-button\r\n id=\"botaoFiltro\"\r\n [icon]=\"'align_vertical_top'\"\r\n (onClick)=\"abrirMenuFiltro($event)\"\r\n severity=\"tertiary\"\r\n pTooltip=\"Ocultar/Exibir colunas\"\r\n >\r\n </kv-button>\r\n </div>\r\n\r\n <div\r\n #menuFiltroDiv\r\n id=\"menuFiltroDiv\"\r\n [style.visibility]=\"'hidden'\"\r\n class=\"absolute z-4 bg-gray-200 menu-columns-filtro\"\r\n >\r\n <p-card styleClass=\"p-1\">\r\n <div\r\n class=\"flex flex-column text-medium w-15rem p-1\"\r\n *ngFor=\"let col of columnsFilter()\"\r\n >\r\n {{ checkMenuFiltro(col) }}\r\n <p-checkbox\r\n #filterColumns\r\n [label]=\"col.header\"\r\n [binary]=\"true\"\r\n class=\"checkbox-container\"\r\n (onChange)=\"dinamicColumnSet($event, col)\"\r\n [(ngModel)]=\"col.checked\"\r\n *ngIf=\"!dinamicDisableColumn(col)\"\r\n ></p-checkbox>\r\n </div>\r\n </p-card>\r\n </div>\r\n }\r\n </div>\r\n\r\n <div class=\"flex flex-row col-2 justify-content-end gap-2 p-0\">\r\n @for (action of config.actionsLote; track i; let i = $index) {\r\n <div class=\"flex align-items-center justify-content-center\">\r\n @if ((selectedItems.length > 0 || action.showAcoesLote) &&\r\n (getOrExecute(action.visible, selectedItems) ?? true)) {\r\n <kv-button\r\n (onClick)=\"action?.command(); activeItemLote(selectedItems)\"\r\n [pTooltip]=\"getOrExecute(action.tooltip, selectedItems)\"\r\n [tooltipPosition]=\"\r\n (getOrExecute(action.tooltip, selectedItems)?.length ??\r\n 0 > 7) &&\r\n config.actionsLote &&\r\n i == config.actionsLote.length - 1\r\n ? 'left'\r\n : 'bottom'\r\n \"\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 }\r\n </div>\r\n </div>\r\n </ng-template>\r\n }\r\n\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n @if (config.enableSelect) {\r\n <th>\r\n <p-tableHeaderCheckbox\r\n (click)=\"activeItemLote(selectedItems)\"\r\n [disabled]=\"disabledHeaderCheckbox\"\r\n ></p-tableHeaderCheckbox>\r\n </th>\r\n } @for (col of columns; track $index) {\r\n <th\r\n [pSortableColumn]=\"col.field\"\r\n [pSortableColumnDisabled]=\"col.sortable === false\"\r\n [style.width]=\"col.width\"\r\n >\r\n <div\r\n class=\"flex flex-row align-items-center {{\r\n col.centralize && 'justify-content-center'\r\n }}\"\r\n >\r\n <span class=\"text-xs font-medium\">{{ col.header }}</span>\r\n @if (col.sortable) {\r\n <p-sortIcon [field]=\"col.field\" class=\"pb-1\"></p-sortIcon>\r\n } @if (col.headerTooltip) {\r\n <span\r\n class=\"material-symbols-outlined flex align-items-center\"\r\n [pTooltip]=\"col.headerTooltip\"\r\n >info</span\r\n >\r\n }\r\n </div>\r\n </th>\r\n } @if (config.actions && config.actions.length > 0) {\r\n <th></th>\r\n }\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template\r\n pTemplate=\"body\"\r\n let-rowData\r\n let-columns=\"columns\"\r\n let-rowgroup=\"rowgroup\"\r\n let-rowspan=\"rowspan\"\r\n let-rowIndex=\"rowIndex\"\r\n >\r\n <tr\r\n (dblclick)=\"doubleClick($event, rowData)\"\r\n [ngClass]=\"{\r\n capitalize: tableCaptalized,\r\n last: rowIndex === dataSource.length - 1\r\n }\"\r\n class=\"tr-td {{ isDisabledRow(rowData) ? 'disabled-row' : '' }}\"\r\n >\r\n @if (config.enableSelect) {\r\n <td style=\"width: 8px !important\">\r\n <p-tableCheckbox\r\n [value]=\"rowData\"\r\n [disabled]=\"isDisabledCheckbox(rowData)\"\r\n (click)=\"activeItemLote(selectedItems)\"\r\n ></p-tableCheckbox>\r\n </td>\r\n } @for (col of columns; track $index) {\r\n <ng-container>\r\n @if (rowgroup && !col.template) {\r\n <td\r\n [attr.rowspan]=\"rowgroup && col.grouped ? rowspan : null\"\r\n [pTooltip]=\"returnTooltipRow(rowData, col)\"\r\n class=\"{{\r\n col.styleClass\r\n ? col.styleClass(rowData, col, rowData[col.field])\r\n : ''\r\n }} \"\r\n >\r\n <span class=\"p-column-title\">{{ col.header }}:</span>\r\n\r\n <span\r\n *ngIf=\"!isBooleanField(rowData, col); else booleanField\"\r\n [class]=\"returnRowClass(rowData, col)\"\r\n >\r\n @if (!isChipField(col) && !col.iconField && !isImageField(col)) {\r\n <span\r\n class=\"flex flex-row gap-2 align-items-center {{\r\n col.centralize && 'justify-content-center'\r\n }} text-xs\"\r\n [pTooltip]=\"\r\n col.tooltip && col.tooltip(rowData, col, rowData[col.field])\r\n \"\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 } @if (col.icon) {\r\n <i [class]=\"col.icon + ' mr-2'\"></i>\r\n }\r\n {{ transformValue(rowData, col) }}\r\n </span>\r\n } @if (isChipField(col) && !col.iconField) {\r\n <div>\r\n <span\r\n [class]=\"returnClassChip(rowData, col)\"\r\n [pTooltip]=\"returnTooltipIcon(rowData, col)\"\r\n class=\"text-xs\"\r\n >{{ transformValue(rowData, col) }}</span\r\n >\r\n </div>\r\n }\r\n </span>\r\n\r\n @if (isImageField(col)) {\r\n <span>\r\n <span>\r\n <img class=\"image\" [src]=\"loadImage(rowData, col)\" />\r\n </span>\r\n </span>\r\n } @if (col.iconField) {\r\n <i\r\n [ngClass]=\"{\r\n 'material-icons': col.indIconMaterial,\r\n 'material-symbols-outlined mr-2': !col.indIconMaterial\r\n }\"\r\n [pTooltip]=\"returnTooltipIcon(rowData, col)\"\r\n >\r\n {{ returnClassIcon(rowData, col) }}\r\n </i>\r\n }\r\n\r\n <ng-template #booleanField>\r\n @if (!col.iconField && !isSwitchField(col)) {\r\n <div\r\n class=\"flex flex-row gap-2 align-items-center {{\r\n col.centralize && 'justify-content-center'\r\n }}\"\r\n [pTooltip]=\"\r\n col.tooltip && col.tooltip(rowData, col, rowData[col.field])\r\n \"\r\n >\r\n <i\r\n [ngClass]=\"\r\n rowData[col.field] ? 'text-green-500' : 'text-red-500'\r\n \"\r\n ><span\r\n class=\"material-symbols-outlined text-lg font-semibold\"\r\n >\r\n {{ rowData[col.field] ? \"check\" : \"close\" }}\r\n </span>\r\n </i>\r\n </div>\r\n\r\n } @if (isSwitchField(col)) {\r\n <span\r\n [class]=\"\r\n returnRowClass(rowData, col) +\r\n ' flex flex-row align-items-center justify-content-center'\r\n \"\r\n > \r\n\r\n @if(col.switchDisable){\r\n <kv-switch\r\n (onSwitchChange)=\"onSwitchChange($event, rowData, col)\"\r\n [disabled]=\"col.switchDisable(rowData, col)\"\r\n [switchValue]=\"transformValue(rowData, col)\"\r\n >\r\n </kv-switch>\r\n }\r\n @else {\r\n <kv-switch\r\n (onSwitchChange)=\"onSwitchChange($event, rowData, col)\"\r\n [disabled]=\"col?.onlyReadField ?? true\"\r\n [switchValue]=\"transformValue(rowData, col)\"\r\n >\r\n </kv-switch>\r\n }\r\n </span>\r\n }\r\n </ng-template>\r\n </td>\r\n } @if (!rowgroup && !col.grouped && !col.template) {\r\n <td\r\n class=\"rowTable {{\r\n col.styleClass\r\n ? col.styleClass(rowData, col, rowData[col.field])\r\n : ''\r\n }} \"\r\n [pTooltip]=\"returnTooltipRow(rowData, col)\"\r\n >\r\n <span class=\"p-column-title\">{{ col.header }}:</span>\r\n\r\n <span\r\n *ngIf=\"!isBooleanField(rowData, col); else booleanField\"\r\n [class]=\"\r\n returnRowClass(rowData, col) +\r\n ' flex flex-row gap-2 align-items-center ' +\r\n (col.centralize && 'justify-content-center')\r\n \"\r\n [pTooltip]=\"\r\n col.tooltip && col.tooltip(rowData, col, rowData[col.field])\r\n \"\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 } @if (!isChipField(col) && !col.iconField && !isImageField(col)){\r\n <span class=\"text-xs\">\r\n @if (col.icon) {\r\n <i [class]=\"col.icon + ' mr-2'\"></i>\r\n }\r\n {{ transformValue(rowData, col) }}\r\n </span>\r\n } @if (isChipField(col) && !col.iconField) {\r\n <div>\r\n <span\r\n [class]=\"returnClassChip(rowData, col)\"\r\n [pTooltip]=\"returnTooltipIcon(rowData, col)\"\r\n class=\"text-xs\"\r\n >\r\n {{ transformValue(rowData, col) }}</span\r\n >\r\n </div>\r\n }\r\n </span>\r\n\r\n @if (isImageField(col)) {\r\n <span>\r\n <span>\r\n <img class=\"image\" [src]=\"loadImage(rowData, col)\" />\r\n </span>\r\n </span>\r\n } @if (col.iconField) {\r\n <i\r\n [ngClass]=\"{\r\n 'material-icons': col.indIconMaterial,\r\n 'material-symbols-outlined mr-2': !col.indIconMaterial\r\n }\"\r\n [pTooltip]=\"returnTooltipIcon(rowData, col)\"\r\n >\r\n {{ returnClassIcon(rowData, col) }}\r\n </i>\r\n }\r\n\r\n <ng-template #booleanField>\r\n @if (!col.iconField && !isSwitchField(col)) {\r\n <div\r\n class=\"flex flex-row gap-2 align-items-center {{\r\n col.centralize && 'justify-content-center'\r\n }}\"\r\n [pTooltip]=\"\r\n col.tooltip && col.tooltip(rowData, col, rowData[col.field])\r\n \"\r\n >\r\n <i\r\n [ngClass]=\"\r\n rowData[col.field] ? 'text-green-500' : 'text-red-500'\r\n \"\r\n ><span\r\n class=\"material-symbols-outlined text-lg font-semibold\"\r\n >\r\n {{ rowData[col.field] ? \"check\" : \"close\" }}\r\n </span>\r\n </i>\r\n </div>\r\n } @if (isSwitchField(col)) {\r\n <span\r\n [class]=\"\r\n returnRowClass(rowData, col) +\r\n ' flex flex-row align-items-center justify-content-center'\r\n \"\r\n >\r\n @if(col.switchDisable){\r\n <kv-switch\r\n (onSwitchChange)=\"onSwitchChange($event, rowData, col)\"\r\n [disabled]=\"col.switchDisable(rowData, col)\"\r\n [switchValue]=\"transformValue(rowData, col)\"\r\n >\r\n </kv-switch>\r\n }\r\n @else {\r\n <kv-switch\r\n (onSwitchChange)=\"onSwitchChange($event, rowData, col)\"\r\n [disabled]=\"col?.onlyReadField ?? true\"\r\n [switchValue]=\"transformValue(rowData, col)\"\r\n >\r\n </kv-switch>\r\n }\r\n \r\n </span>\r\n }\r\n </ng-template>\r\n </td>\r\n } @if (col.template) {\r\n <td\r\n class=\"rowTable {{\r\n col.styleClass\r\n ? col.styleClass(rowData, col, rowData[col.field])\r\n : ''\r\n }} \"\r\n >\r\n <span class=\"p-column-title\">{{ col.header }}:</span>\r\n @if (getCustomTemplate(col.template.name)) {\r\n\r\n <div\r\n class=\"flex flex-row gap-2 align-items-center {{\r\n col.centralize && ' justify-content-center'\r\n }}\"\r\n [pTooltip]=\"\r\n col.tooltip && col.tooltip(rowData, col, rowData[col.field])\r\n \"\r\n >\r\n @if(col.tagColor) {\r\n <div\r\n class=\"tag\"\r\n [pTooltip]=\"col.tooltipTag && col.tooltipTag(rowData, col)\"\r\n [style.background-color]=\"col.tagColor(rowData, col)\"\r\n ></div>\r\n }\r\n\r\n <div class=\"w-full\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"getCustomTemplate(col.template.name)\"\r\n [ngTemplateOutletContext]=\"{ $implicit: rowData }\"\r\n />\r\n </div>\r\n </div>\r\n }\r\n </td>\r\n }\r\n </ng-container>\r\n } @if (config.actions && config.actions.length > 0) {\r\n <td>\r\n <div class=\"flex flex-row justify-content-end w-full\">\r\n <span\r\n class=\"material-symbols-outlined cursor-pointer icon-more-horiz\"\r\n style=\"font-size: 20px; padding: 0.2rem;\"\r\n (click)=\"menu.toggle($event); activeItem(rowData)\"\r\n >\r\n more_horiz\r\n </span>\r\n\r\n <p-tieredMenu\r\n #menu\r\n [popup]=\"true\"\r\n [model]=\"tableActions[rowIndex - actionsOffset]\"\r\n appendTo=\"body\"\r\n ></p-tieredMenu>\r\n </div>\r\n </td>\r\n }\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"emptymessage\" let-columns>\r\n <tr>\r\n <td\r\n [attr.colspan]=\"columns.length + 2\"\r\n style=\"text-align: center; border-radius: 10px !important\"\r\n >\r\n <p class=\"font-medium m-0 text-sm\">Nenhum registro encontrado</p>\r\n </td>\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n }\r\n</div>\r\n\r\n<link\r\n rel=\"stylesheet\"\r\n href=\"https://fonts.googleapis.com/icon?family=Material+Icons\"\r\n/>\r\n\r\n<link\r\n rel=\"stylesheet\"\r\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@48,400,0,0\"\r\n/>\r\n", styles: ["::ng-deep .p-datatable>.p-datatable-wrapper::-webkit-scrollbar{width:6px}::ng-deep .p-datatable>.p-datatable-wrapper::-webkit-scrollbar:hover{background-color:#dededebf}::ng-deep .p-datatable>.p-datatable-wrapper::-webkit-scrollbar-thumb{border-radius:4px;background-color:transparent}::ng-deep .p-datatable>.p-datatable-wrapper:hover::-webkit-scrollbar-thumb{border-left:2px solid white;background-color:#00000080}::ng-deep .p-datatable>.p-datatable-wrapper::-webkit-scrollbar-track{border-left:2px solid white;background-color:#dededebf}.tag{width:5px;height:20px;border-radius:.25rem}::ng-deep .p-panel .p-panel-header{border:none!important}:host ::ng-deep .p-datatable-header{background-color:#f1f1f1!important;padding:0!important;border-radius:5px!important}::ng-deep .p-panel.p-panel-toggleable .p-panel-header{background-color:#f1f1f1}::ng-deep .p-datatable.p-datatable-sm .p-datatable-thead>tr>th{background-color:#f1f1f1;padding:.35rem}.icon-more-horiz{font-weight:700}.icon-more-horiz:hover,.icon-more-horiz:focus{color:#5e5e5e;transition:color .3s,transform .3s;background-color:#eaeaea;border-radius:50%}.tr-td{overflow-wrap:anywhere}.tr-td:hover{box-shadow:#3c40434d 0 1px 2px,#3c404326 0 2px 6px 2px;background-color:#fff;transition:color .3s,transform .3s;transform:scale(1)}.tr-td:hover.last{box-shadow:-1px -1px 9px -3px #000000bf;-webkit-box-shadow:-1px -1px 9px -3px rgba(0,0,0,.75);-moz-box-shadow:-1px -1px 9px -3px rgba(0,0,0,.75)}.disabled-row{pointer-events:none;opacity:.6;background-color:#dddddd8e}::ng-deep .p-tooltip{pointer-events:auto}.btn-table{background-color:#29b92d;padding:12px}.btn-table:hover{background-color:#249a29}.btn-table:active{background-color:#1c801f}.btn-table:disabled{background-color:#29b92d}::ng-deep svg.p-icon{width:.65rem;height:.65rem}::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}input{height:1.875rem}::ng-deep .p-checkbox .p-checkbox-box{width:1.125rem;height:1.125rem}::ng-deep .p-checkbox{display:flex;align-items:center}::ng-deep .p-checkbox-label{font-size:.875rem}::ng-deep .p-datatable .p-paginator-bottom{scale:.75}::ng-deep .p-menuitem-text{font-size:.875rem}::ng-deep .p-tieredmenu .p-menuitem>.p-menuitem-content .p-menuitem-link{padding:.5rem .75rem}::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody>tr>td{padding:.2rem}\n"] }]
|
|
1907
1913
|
}], ctorParameters: () => [{ type: i1.DatePipe }, { type: i1.DecimalPipe }, { type: CpfCnpjPipe }, { type: TelefonePipe }, { type: i0.Renderer2 }, { type: i0.ElementRef }], propDecorators: { templates: [{
|
|
1908
1914
|
type: ContentChildren,
|
|
1909
1915
|
args: [TemplateDirective]
|
|
@@ -2207,11 +2213,11 @@ class KvTreetableComponent {
|
|
|
2207
2213
|
this.inputBusca.nativeElement.value = '';
|
|
2208
2214
|
}
|
|
2209
2215
|
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 }); }
|
|
2210
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.8", type: KvTreetableComponent, selector: "kv-tree-table", inputs: { disableRowNodeSticky: "disableRowNodeSticky", config: "config", dataSource: "dataSource", gridLines: "gridLines", tableCaptalized: "tableCaptalized", selectedItems: "selectedItems", paginator: "paginator", rows: "rows", treeTableDraggable: "treeTableDraggable", transferArrayItem: "transferArrayItem", ordenacao: "ordenacao", totalRecords: "totalRecords", textoEmptyMessage: "textoEmptyMessage", childrenRecoil: "childrenRecoil", showHeader: "showHeader", scrollHeight: "scrollHeight", 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>\r\n <p-treeTable\r\n #tt\r\n cdkDropList\r\n class=\"example-list\"\r\n (cdkDropListDropped)=\"drop($event)\"\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 [scrollHeight]=\"scrollHeight\"\r\n >\r\n <ng-template pTemplate=\"caption\" *ngIf=\"config.enableCation\">\r\n <div\r\n class=\"flex flex-row flex-wrap justify-content-between align-items-center grid formgrid p-fluid col-12 m-0\"\r\n style=\"background-color: #eaeaea\"\r\n >\r\n <div class=\"col-12 flex flex-column\">\r\n <div *ngIf=\"config.title\" class=\"text-md font-bold my-3\">\r\n {{ config.title }}\r\n </div>\r\n <div *ngIf=\"config.subtitle\" class=\"text-sm mb-4 font-medium\">\r\n {{ config.subtitle }}\r\n </div>\r\n </div>\r\n\r\n <div\r\n class=\"flex flex-row align-items-center col-10 p-0 md:col-6 lg:col-4 justify-content-center {{\r\n tamanhoTela < 768 ? '' : 'input-search'\r\n }}\"\r\n >\r\n <span *ngIf=\"config.enableFilter\" class=\"p-input-icon-left\">\r\n <i class=\"pi pi-search\"></i>\r\n\r\n <input\r\n pInputText\r\n pAutoFocus\r\n [autofocus]=\"true\"\r\n type=\"text\"\r\n (input)=\"onGlobalFilter(tt, $event)\"\r\n placeholder=\"Pesquisar...\"\r\n class=\"h-2rem\"\r\n #inputBusca\r\n />\r\n </span>\r\n </div>\r\n\r\n <div class=\"flex flex-row col-1 justify-content-end p-0\">\r\n <div class=\"flex flex-row gap-2 btns-options\">\r\n @for (action of config.actionsLote; track $index) {\r\n @if((selectedItems.length > 0 || action.showAcoesLote) &&\r\n exibirCampo(action, this.action)) {\r\n <kv-button\r\n (onClick)=\"action?.command(); activeItemLote(selectedItems)\"\r\n [pTooltip]=\"getOrExecute(action.tooltip, selectedItems)\"\r\n [tooltipPosition]=\"'bottom'\"\r\n [disabled]=\"getOrExecute(action.disabled, selectedItems) || false\"\r\n [icon]=\"getOrExecute(action.icon, selectedItems)\"\r\n [severity]=\"action.severity || 'tertiary'\"\r\n />\r\n } }\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n @if(showHeader){\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n @for(col of columns; track $index){\r\n <th\r\n [ttSortableColumn]=\"col.field\"\r\n [ttSortableColumnDisabled]=\"col.sortable === false\"\r\n [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 class=\"text-xs\">{{ col.header }}</span>\r\n \r\n @if(col.sortable) {\r\n <p-treeTableSortIcon [field]=\"col.field\" class=\"pb-1\"/>\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 class=\"text-xs\">{{ col.header }}</span>\r\n \r\n @if(col.sortable) {\r\n <p-treeTableSortIcon [field]=\"col.field\" class=\"pb-1\"/>\r\n }\r\n </div>\r\n </th>\r\n } @if (config.actions?.length ?? 0 > 0) {\r\n <th [style.width]=\"5\"></th>\r\n }\r\n </tr>\r\n </ng-template>\r\n }\r\n\r\n\r\n <ng-template\r\n pTemplate=\"body\"\r\n let-rowNode\r\n let-rowData=\"rowData\"\r\n let-columns=\"columns\"\r\n > \r\n\r\n @if(treeTableDraggable) {\r\n <tr\r\n cdkDrag\r\n cdkDragLockAxis=\"y\"\r\n [cdkDragData]=\"rowNode\"\r\n [ttRow]=\"rowNode\"\r\n (dblclick)=\"doubleClick($event, rowData)\"\r\n [ngClass]=\"{ capitalize: tableCaptalized }\"\r\n >\r\n \r\n @for(col of columns; track $index){\r\n <td\r\n class=\"draggable-cell\"\r\n [style.position]=\"!disableRowNodeSticky && rowNode.level !== 0 ? 'sticky' : null\"\r\n \r\n >\r\n \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 \r\n <div\r\n class=\"w-full-h-full flex align-items-center\"\r\n *ngIf=\"$index == 0\"\r\n \r\n >\r\n <span\r\n class=\"material-symbols-outlined drag-icon\"\r\n style=\"cursor: grab; font-size: 25px; color: #6b7280; opacity: 0.9;\"\r\n cdkDragHandle\r\n >\r\n drag_indicator\r\n </span>\r\n <p-treeTableToggler \r\n class=\"hiddenVisible\" \r\n [rowNode]=\"rowNode\"\r\n />\r\n\r\n @if(config.enableSelect) {\r\n <p-treeTableCheckbox\r\n [disabled]=\"isDisabledCheckbox(rowData, rowNode)\"\r\n (click)=\"activeItemLote(selectedItems)\"\r\n [value]=\"rowNode\"\r\n [ngStyle]=\"{\r\n 'display': isSelectEnabled(rowData, rowNode) ? 'block' : 'none',\r\n 'margin-left': config.visibleCheckboxFunction ? '-34px' : '0px'\r\n }\"\r\n />\r\n }\r\n \r\n </div>\r\n\r\n <div class=\"flex flex-row align-items-center\">\r\n <div\r\n class=\"flex flex-row align-items-center justify-content-center gap-2\"\r\n >\r\n @if(col.tagColor) {\r\n <div\r\n class=\"tag\"\r\n [pTooltip]=\"\r\n col.tooltipTag &&\r\n col.tooltipTag(rowData, col, rowData[col.field])\r\n \"\r\n [style.background-color]=\"\r\n col.tagColor(rowData, col, rowData[col.field])\r\n \"\r\n ></div>\r\n\r\n }\r\n\r\n <i\r\n *ngIf=\"col.boolean\"\r\n class=\"pi {{\r\n rowData[col.field] ? 'pi-check text-green-300' : ''\r\n }}\"\r\n style=\"font-size: 1.1rem\"\r\n ></i>\r\n\r\n <div class=\"flex flex-column\" *ngIf=\"!col.boolean\">\r\n <span class=\"m-0 text-xs\">{{ 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: center\"\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 class=\"flex align-items-center justify-content-center\"\r\n >\r\n <span\r\n class=\"material-symbols-outlined cursor-pointer icon-more-horiz p-1\"\r\n style=\"font-size: 20px\"\r\n (click)=\"menu.toggle($event); activeItem(rowData)\"\r\n >\r\n more_horiz\r\n </span>\r\n\r\n \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 \r\n </div>\r\n \r\n @if(config.actionsPai?.length ?? 0 > 0 && rowNode.level == 0){\r\n <div class=\"flex justify-content-end align-items-center \">\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 [type]=\"'text'\"\r\n [icon]=\"actionPai.icon\"\r\n [severity]=\"actionPai.severity || 'tertiary'\"\r\n />\r\n \r\n } }\r\n </div>\r\n }\r\n \r\n \r\n\r\n </td>\r\n \r\n </tr>\r\n } @else {\r\n <tr\r\n [ttRow]=\"rowNode\"\r\n (dblclick)=\"doubleClick($event, rowData)\"\r\n [ngClass]=\"{ capitalize: tableCaptalized }\"\r\n >\r\n @for(col of columns; track $index){\r\n <td\r\n [style.position]=\"rowNode.level !== 0 ? 'sticky' : null\"\r\n [style.left.px]=\"\r\n childrenRecoil && rowNode.level !== 0 ? rowNode.level * 30 : null\r\n \"\r\n [style.borderRight]=\"rowNode.level === 0 ? 'none' : ''\"\r\n [style.borderLeft]=\"\r\n rowNode.level === 0 && col.field != config.columns[0].field\r\n ? 'none'\r\n : ''\r\n \"\r\n >\r\n <div class=\"flex flex-row {{ align(col) }}\">\r\n <div\r\n class=\"w-full-h-full flex align-items-center\"\r\n *ngIf=\"$index == 0\"\r\n >\r\n <p-treeTableToggler class=\"hiddenVisible\" [rowNode]=\"rowNode\" />\r\n\r\n @if(config.enableSelect) {\r\n <p-treeTableCheckbox\r\n [disabled]=\"isDisabledCheckbox(rowData, rowNode)\"\r\n (click)=\"activeItemLote(selectedItems)\"\r\n [value]=\"rowNode\"\r\n [ngStyle]=\"{\r\n 'display': isSelectEnabled(rowData, rowNode) ? 'block' : 'none',\r\n 'margin-left': config.visibleCheckboxFunction ? '-34px' : '0px'\r\n }\"\r\n />\r\n }\r\n\r\n </div>\r\n\r\n <div class=\"flex flex-row align-items-center\">\r\n <div\r\n class=\"flex flex-row align-items-center justify-content-center gap-2\"\r\n >\r\n @if(col.tagColor) {\r\n <div\r\n class=\"tag\"\r\n [pTooltip]=\"\r\n col.tooltipTag &&\r\n col.tooltipTag(rowData, col, rowData[col.field])\r\n \"\r\n [style.background-color]=\"\r\n col.tagColor(rowData, col, rowData[col.field])\r\n \"\r\n ></div>\r\n\r\n }\r\n <i\r\n *ngIf=\"col.boolean\"\r\n class=\"pi {{\r\n rowData[col.field] ? 'pi-check text-green-300' : ''\r\n }}\"\r\n style=\"font-size: 1.1rem\"\r\n ></i>\r\n\r\n <div class=\"flex flex-column\" *ngIf=\"!col.boolean\">\r\n <span class=\"m-0 text-xs\">{{ 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: center\"\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: 20px\"\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 [type]=\"'text'\"\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 }\r\n\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 class=\"text-sm\"\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\r\n", styles: ["@charset \"UTF-8\";::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}::ng-deep .p-checkbox .p-checkbox-box{width:1.125rem;height:1.125rem}::ng-deep .p-checkbox{display:flex;align-items:center}::ng-deep .p-treetable .p-paginator{scale:.8}.icon-more-horiz{font-weight:700}.icon-more-horiz:hover,.icon-more-horiz:focus{color:#5e5e5e;transition:color .3s,transform .3s;background-color:#eaeaea;border-radius:50%}::ng-deep .p-treetable .p-treetable-thead>tr>th{background-color:#eaeaea}:host ::ng-deep .treetabledraggable .p-treetable .p-treetable-tbody>tr>td .p-treetable-toggler{width:1rem;height:1rem}.tag{width:5px;height:20px;border-radius:.25rem}:host ::ng-deep .draggable-cell .drag-icon{visibility:hidden}:host ::ng-deep .draggable-cell:hover .drag-icon{visibility:visible}.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:.65rem;height:.65rem}::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$3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i5$2.AutoFocus, selector: "[pAutoFocus]", inputs: ["autofocus"] }, { kind: "directive", type: i6.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "directive", type: i5$3.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: "directive", type: i7.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { 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: ["fullWidth", "type", "loading", "severity", "size", "icon", "label", "disabled"], outputs: ["onClick"] }] }); }
|
|
2216
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.8", type: KvTreetableComponent, selector: "kv-tree-table", inputs: { disableRowNodeSticky: "disableRowNodeSticky", config: "config", dataSource: "dataSource", gridLines: "gridLines", tableCaptalized: "tableCaptalized", selectedItems: "selectedItems", paginator: "paginator", rows: "rows", treeTableDraggable: "treeTableDraggable", transferArrayItem: "transferArrayItem", ordenacao: "ordenacao", totalRecords: "totalRecords", textoEmptyMessage: "textoEmptyMessage", childrenRecoil: "childrenRecoil", showHeader: "showHeader", scrollHeight: "scrollHeight", 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>\r\n <p-treeTable\r\n #tt\r\n cdkDropList\r\n class=\"example-list\"\r\n (cdkDropListDropped)=\"drop($event)\"\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 [scrollHeight]=\"scrollHeight\"\r\n >\r\n <ng-template pTemplate=\"caption\" *ngIf=\"config.enableCation\">\r\n <div\r\n class=\"flex flex-row flex-wrap justify-content-between align-items-center grid formgrid p-fluid col-12 m-0\"\r\n style=\"background-color: #eaeaea\"\r\n >\r\n <div class=\"col-12 flex flex-column\">\r\n <div *ngIf=\"config.title\" class=\"text-md font-bold my-3\">\r\n {{ config.title }}\r\n </div>\r\n <div *ngIf=\"config.subtitle\" class=\"text-sm mb-4 font-medium\">\r\n {{ config.subtitle }}\r\n </div>\r\n </div>\r\n\r\n <div\r\n class=\"flex flex-row align-items-center col-10 p-0 md:col-6 lg:col-4 justify-content-center {{\r\n tamanhoTela < 768 ? '' : 'input-search'\r\n }}\"\r\n >\r\n <span *ngIf=\"config.enableFilter\" class=\"p-input-icon-left\">\r\n <i class=\"pi pi-search\"></i>\r\n\r\n <input\r\n pInputText\r\n pAutoFocus\r\n [autofocus]=\"true\"\r\n type=\"text\"\r\n (input)=\"onGlobalFilter(tt, $event)\"\r\n placeholder=\"Pesquisar...\"\r\n class=\"h-2rem\"\r\n #inputBusca\r\n />\r\n </span>\r\n </div>\r\n\r\n <div class=\"flex flex-row col-1 justify-content-end p-0\">\r\n <div class=\"flex flex-row gap-2 btns-options\">\r\n @for (action of config.actionsLote; track $index) {\r\n @if((selectedItems.length > 0 || action.showAcoesLote) &&\r\n exibirCampo(action, this.action)) {\r\n <kv-button\r\n (onClick)=\"action?.command(); activeItemLote(selectedItems)\"\r\n [pTooltip]=\"getOrExecute(action.tooltip, selectedItems)\"\r\n [tooltipPosition]=\"'bottom'\"\r\n [disabled]=\"getOrExecute(action.disabled, selectedItems) || false\"\r\n [icon]=\"getOrExecute(action.icon, selectedItems)\"\r\n [severity]=\"action.severity || 'tertiary'\"\r\n />\r\n } }\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n @if(showHeader){\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n @for(col of columns; track $index){\r\n <th\r\n [ttSortableColumn]=\"col.field\"\r\n [ttSortableColumnDisabled]=\"col.sortable === false\"\r\n [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 class=\"text-xs\">{{ col.header }}</span>\r\n\r\n @if(col.sortable) {\r\n <p-treeTableSortIcon [field]=\"col.field\" class=\"pb-1\"/>\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 class=\"text-xs\">{{ col.header }}</span>\r\n\r\n @if(col.sortable) {\r\n <p-treeTableSortIcon [field]=\"col.field\" class=\"pb-1\"/>\r\n }\r\n </div>\r\n </th>\r\n } @if (config.actions?.length ?? 0 > 0) {\r\n <th [style.width]=\"5\"></th>\r\n }\r\n </tr>\r\n </ng-template>\r\n }\r\n\r\n\r\n <ng-template\r\n pTemplate=\"body\"\r\n let-rowNode\r\n let-rowData=\"rowData\"\r\n let-columns=\"columns\"\r\n >\r\n\r\n @if(treeTableDraggable) {\r\n <tr\r\n cdkDrag\r\n cdkDragLockAxis=\"y\"\r\n [cdkDragData]=\"rowNode\"\r\n [ttRow]=\"rowNode\"\r\n (dblclick)=\"doubleClick($event, rowData)\"\r\n [ngClass]=\"{ capitalize: tableCaptalized }\"\r\n >\r\n\r\n @for(col of columns; track $index){\r\n <td\r\n class=\"draggable-cell\"\r\n [style.position]=\"!disableRowNodeSticky && rowNode.level !== 0 ? 'sticky' : null\"\r\n\r\n >\r\n\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\r\n <div\r\n class=\"w-full-h-full flex align-items-center\"\r\n *ngIf=\"$index == 0\"\r\n\r\n >\r\n <span\r\n class=\"material-symbols-outlined drag-icon\"\r\n style=\"cursor: grab; font-size: 25px; color: #6b7280; opacity: 0.9;\"\r\n cdkDragHandle\r\n >\r\n drag_indicator\r\n </span>\r\n <p-treeTableToggler\r\n class=\"hiddenVisible\"\r\n [rowNode]=\"rowNode\"\r\n />\r\n\r\n @if(config.enableSelect) {\r\n <p-treeTableCheckbox\r\n [disabled]=\"isDisabledCheckbox(rowData, rowNode)\"\r\n (click)=\"activeItemLote(selectedItems)\"\r\n [value]=\"rowNode\"\r\n [ngStyle]=\"{\r\n 'display': isSelectEnabled(rowData, rowNode) ? 'block' : 'none',\r\n 'margin-left': config.visibleCheckboxFunction ? '-34px' : '0px'\r\n }\"\r\n />\r\n }\r\n\r\n </div>\r\n\r\n\r\n <div class=\"flex flex-row align-items-center\">\r\n @if (col.template && validateShowTemplate(rowNode, col)) {\r\n <span>\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 } @else {\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 text-xs\">{{ 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 }\r\n </div>\r\n </div>\r\n </td>\r\n }\r\n\r\n <td\r\n style=\"border-left: none; text-align: center\"\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 class=\"flex align-items-center justify-content-center\"\r\n >\r\n <span\r\n class=\"material-symbols-outlined cursor-pointer icon-more-horiz p-1\"\r\n style=\"font-size: 20px\"\r\n (click)=\"menu.toggle($event); activeItem(rowData)\"\r\n >\r\n more_horiz\r\n </span>\r\n\r\n\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\r\n </div>\r\n\r\n @if(config.actionsPai?.length ?? 0 > 0 && rowNode.level == 0){\r\n <div class=\"flex justify-content-end align-items-center \">\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 [type]=\"'text'\"\r\n [icon]=\"actionPai.icon\"\r\n [severity]=\"actionPai.severity || 'tertiary'\"\r\n />\r\n\r\n } }\r\n </div>\r\n }\r\n\r\n\r\n\r\n </td>\r\n\r\n </tr>\r\n } @else {\r\n <tr\r\n [ttRow]=\"rowNode\"\r\n (dblclick)=\"doubleClick($event, rowData)\"\r\n [ngClass]=\"{ capitalize: tableCaptalized }\"\r\n >\r\n @for(col of columns; track $index){\r\n <td\r\n [style.position]=\"rowNode.level !== 0 ? 'sticky' : null\"\r\n [style.left.px]=\"\r\n childrenRecoil && rowNode.level !== 0 ? rowNode.level * 30 : null\r\n \"\r\n [style.borderRight]=\"rowNode.level === 0 ? 'none' : ''\"\r\n [style.borderLeft]=\"\r\n rowNode.level === 0 && col.field != config.columns[0].field\r\n ? 'none'\r\n : ''\r\n \"\r\n >\r\n <div class=\"flex flex-row {{ align(col) }}\">\r\n <div\r\n class=\"w-full-h-full flex align-items-center\"\r\n *ngIf=\"$index == 0\"\r\n >\r\n <p-treeTableToggler class=\"hiddenVisible\" [rowNode]=\"rowNode\" />\r\n\r\n @if(config.enableSelect) {\r\n <p-treeTableCheckbox\r\n [disabled]=\"isDisabledCheckbox(rowData, rowNode)\"\r\n (click)=\"activeItemLote(selectedItems)\"\r\n [value]=\"rowNode\"\r\n [ngStyle]=\"{\r\n 'display': isSelectEnabled(rowData, rowNode) ? 'block' : 'none',\r\n 'margin-left': config.visibleCheckboxFunction ? '-34px' : '0px'\r\n }\"\r\n />\r\n }\r\n\r\n </div>\r\n <div class=\"flex flex-row align-items-center\">\r\n @if (col.template && validateShowTemplate(rowNode, col)) {\r\n <span>\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 } @else {\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 text-xs\">{{ 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 }\r\n </div>\r\n </div>\r\n </td>\r\n }\r\n\r\n <td\r\n style=\"border-left: none; text-align: center\"\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: 20px\"\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 [type]=\"'text'\"\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 }\r\n\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 class=\"text-sm\"\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: ["@charset \"UTF-8\";::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}::ng-deep .p-checkbox .p-checkbox-box{width:1.125rem;height:1.125rem}::ng-deep .p-checkbox{display:flex;align-items:center}::ng-deep .p-treetable .p-paginator{scale:.8}.icon-more-horiz{font-weight:700}.icon-more-horiz:hover,.icon-more-horiz:focus{color:#5e5e5e;transition:color .3s,transform .3s;background-color:#eaeaea;border-radius:50%}::ng-deep .p-treetable .p-treetable-thead>tr>th{background-color:#eaeaea}:host ::ng-deep .treetabledraggable .p-treetable .p-treetable-tbody>tr>td .p-treetable-toggler{width:1rem;height:1rem}.tag{width:5px;height:20px;border-radius:.25rem}:host ::ng-deep .draggable-cell .drag-icon{visibility:hidden}:host ::ng-deep .draggable-cell:hover .drag-icon{visibility:visible}.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:.65rem;height:.65rem}::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$3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i5$2.AutoFocus, selector: "[pAutoFocus]", inputs: ["autofocus"] }, { kind: "directive", type: i6.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "directive", type: i5$3.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: "directive", type: i7.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { 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: ["fullWidth", "type", "loading", "severity", "size", "icon", "label", "disabled"], outputs: ["onClick"] }] }); }
|
|
2211
2217
|
}
|
|
2212
2218
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvTreetableComponent, decorators: [{
|
|
2213
2219
|
type: Component,
|
|
2214
|
-
args: [{ selector: 'kv-tree-table', template: "<div>\r\n <p-treeTable\r\n #tt\r\n cdkDropList\r\n class=\"example-list\"\r\n (cdkDropListDropped)=\"drop($event)\"\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 [scrollHeight]=\"scrollHeight\"\r\n >\r\n <ng-template pTemplate=\"caption\" *ngIf=\"config.enableCation\">\r\n <div\r\n class=\"flex flex-row flex-wrap justify-content-between align-items-center grid formgrid p-fluid col-12 m-0\"\r\n style=\"background-color: #eaeaea\"\r\n >\r\n <div class=\"col-12 flex flex-column\">\r\n <div *ngIf=\"config.title\" class=\"text-md font-bold my-3\">\r\n {{ config.title }}\r\n </div>\r\n <div *ngIf=\"config.subtitle\" class=\"text-sm mb-4 font-medium\">\r\n {{ config.subtitle }}\r\n </div>\r\n </div>\r\n\r\n <div\r\n class=\"flex flex-row align-items-center col-10 p-0 md:col-6 lg:col-4 justify-content-center {{\r\n tamanhoTela < 768 ? '' : 'input-search'\r\n }}\"\r\n >\r\n <span *ngIf=\"config.enableFilter\" class=\"p-input-icon-left\">\r\n <i class=\"pi pi-search\"></i>\r\n\r\n <input\r\n pInputText\r\n pAutoFocus\r\n [autofocus]=\"true\"\r\n type=\"text\"\r\n (input)=\"onGlobalFilter(tt, $event)\"\r\n placeholder=\"Pesquisar...\"\r\n class=\"h-2rem\"\r\n #inputBusca\r\n />\r\n </span>\r\n </div>\r\n\r\n <div class=\"flex flex-row col-1 justify-content-end p-0\">\r\n <div class=\"flex flex-row gap-2 btns-options\">\r\n @for (action of config.actionsLote; track $index) {\r\n @if((selectedItems.length > 0 || action.showAcoesLote) &&\r\n exibirCampo(action, this.action)) {\r\n <kv-button\r\n (onClick)=\"action?.command(); activeItemLote(selectedItems)\"\r\n [pTooltip]=\"getOrExecute(action.tooltip, selectedItems)\"\r\n [tooltipPosition]=\"'bottom'\"\r\n [disabled]=\"getOrExecute(action.disabled, selectedItems) || false\"\r\n [icon]=\"getOrExecute(action.icon, selectedItems)\"\r\n [severity]=\"action.severity || 'tertiary'\"\r\n />\r\n } }\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n @if(showHeader){\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n @for(col of columns; track $index){\r\n <th\r\n [ttSortableColumn]=\"col.field\"\r\n [ttSortableColumnDisabled]=\"col.sortable === false\"\r\n [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 class=\"text-xs\">{{ col.header }}</span>\r\n \r\n @if(col.sortable) {\r\n <p-treeTableSortIcon [field]=\"col.field\" class=\"pb-1\"/>\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 class=\"text-xs\">{{ col.header }}</span>\r\n \r\n @if(col.sortable) {\r\n <p-treeTableSortIcon [field]=\"col.field\" class=\"pb-1\"/>\r\n }\r\n </div>\r\n </th>\r\n } @if (config.actions?.length ?? 0 > 0) {\r\n <th [style.width]=\"5\"></th>\r\n }\r\n </tr>\r\n </ng-template>\r\n }\r\n\r\n\r\n <ng-template\r\n pTemplate=\"body\"\r\n let-rowNode\r\n let-rowData=\"rowData\"\r\n let-columns=\"columns\"\r\n > \r\n\r\n @if(treeTableDraggable) {\r\n <tr\r\n cdkDrag\r\n cdkDragLockAxis=\"y\"\r\n [cdkDragData]=\"rowNode\"\r\n [ttRow]=\"rowNode\"\r\n (dblclick)=\"doubleClick($event, rowData)\"\r\n [ngClass]=\"{ capitalize: tableCaptalized }\"\r\n >\r\n \r\n @for(col of columns; track $index){\r\n <td\r\n class=\"draggable-cell\"\r\n [style.position]=\"!disableRowNodeSticky && rowNode.level !== 0 ? 'sticky' : null\"\r\n \r\n >\r\n \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 \r\n <div\r\n class=\"w-full-h-full flex align-items-center\"\r\n *ngIf=\"$index == 0\"\r\n \r\n >\r\n <span\r\n class=\"material-symbols-outlined drag-icon\"\r\n style=\"cursor: grab; font-size: 25px; color: #6b7280; opacity: 0.9;\"\r\n cdkDragHandle\r\n >\r\n drag_indicator\r\n </span>\r\n <p-treeTableToggler \r\n class=\"hiddenVisible\" \r\n [rowNode]=\"rowNode\"\r\n />\r\n\r\n @if(config.enableSelect) {\r\n <p-treeTableCheckbox\r\n [disabled]=\"isDisabledCheckbox(rowData, rowNode)\"\r\n (click)=\"activeItemLote(selectedItems)\"\r\n [value]=\"rowNode\"\r\n [ngStyle]=\"{\r\n 'display': isSelectEnabled(rowData, rowNode) ? 'block' : 'none',\r\n 'margin-left': config.visibleCheckboxFunction ? '-34px' : '0px'\r\n }\"\r\n />\r\n }\r\n \r\n </div>\r\n\r\n <div class=\"flex flex-row align-items-center\">\r\n <div\r\n class=\"flex flex-row align-items-center justify-content-center gap-2\"\r\n >\r\n @if(col.tagColor) {\r\n <div\r\n class=\"tag\"\r\n [pTooltip]=\"\r\n col.tooltipTag &&\r\n col.tooltipTag(rowData, col, rowData[col.field])\r\n \"\r\n [style.background-color]=\"\r\n col.tagColor(rowData, col, rowData[col.field])\r\n \"\r\n ></div>\r\n\r\n }\r\n\r\n <i\r\n *ngIf=\"col.boolean\"\r\n class=\"pi {{\r\n rowData[col.field] ? 'pi-check text-green-300' : ''\r\n }}\"\r\n style=\"font-size: 1.1rem\"\r\n ></i>\r\n\r\n <div class=\"flex flex-column\" *ngIf=\"!col.boolean\">\r\n <span class=\"m-0 text-xs\">{{ 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: center\"\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 class=\"flex align-items-center justify-content-center\"\r\n >\r\n <span\r\n class=\"material-symbols-outlined cursor-pointer icon-more-horiz p-1\"\r\n style=\"font-size: 20px\"\r\n (click)=\"menu.toggle($event); activeItem(rowData)\"\r\n >\r\n more_horiz\r\n </span>\r\n\r\n \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 \r\n </div>\r\n \r\n @if(config.actionsPai?.length ?? 0 > 0 && rowNode.level == 0){\r\n <div class=\"flex justify-content-end align-items-center \">\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 [type]=\"'text'\"\r\n [icon]=\"actionPai.icon\"\r\n [severity]=\"actionPai.severity || 'tertiary'\"\r\n />\r\n \r\n } }\r\n </div>\r\n }\r\n \r\n \r\n\r\n </td>\r\n \r\n </tr>\r\n } @else {\r\n <tr\r\n [ttRow]=\"rowNode\"\r\n (dblclick)=\"doubleClick($event, rowData)\"\r\n [ngClass]=\"{ capitalize: tableCaptalized }\"\r\n >\r\n @for(col of columns; track $index){\r\n <td\r\n [style.position]=\"rowNode.level !== 0 ? 'sticky' : null\"\r\n [style.left.px]=\"\r\n childrenRecoil && rowNode.level !== 0 ? rowNode.level * 30 : null\r\n \"\r\n [style.borderRight]=\"rowNode.level === 0 ? 'none' : ''\"\r\n [style.borderLeft]=\"\r\n rowNode.level === 0 && col.field != config.columns[0].field\r\n ? 'none'\r\n : ''\r\n \"\r\n >\r\n <div class=\"flex flex-row {{ align(col) }}\">\r\n <div\r\n class=\"w-full-h-full flex align-items-center\"\r\n *ngIf=\"$index == 0\"\r\n >\r\n <p-treeTableToggler class=\"hiddenVisible\" [rowNode]=\"rowNode\" />\r\n\r\n @if(config.enableSelect) {\r\n <p-treeTableCheckbox\r\n [disabled]=\"isDisabledCheckbox(rowData, rowNode)\"\r\n (click)=\"activeItemLote(selectedItems)\"\r\n [value]=\"rowNode\"\r\n [ngStyle]=\"{\r\n 'display': isSelectEnabled(rowData, rowNode) ? 'block' : 'none',\r\n 'margin-left': config.visibleCheckboxFunction ? '-34px' : '0px'\r\n }\"\r\n />\r\n }\r\n\r\n </div>\r\n\r\n <div class=\"flex flex-row align-items-center\">\r\n <div\r\n class=\"flex flex-row align-items-center justify-content-center gap-2\"\r\n >\r\n @if(col.tagColor) {\r\n <div\r\n class=\"tag\"\r\n [pTooltip]=\"\r\n col.tooltipTag &&\r\n col.tooltipTag(rowData, col, rowData[col.field])\r\n \"\r\n [style.background-color]=\"\r\n col.tagColor(rowData, col, rowData[col.field])\r\n \"\r\n ></div>\r\n\r\n }\r\n <i\r\n *ngIf=\"col.boolean\"\r\n class=\"pi {{\r\n rowData[col.field] ? 'pi-check text-green-300' : ''\r\n }}\"\r\n style=\"font-size: 1.1rem\"\r\n ></i>\r\n\r\n <div class=\"flex flex-column\" *ngIf=\"!col.boolean\">\r\n <span class=\"m-0 text-xs\">{{ 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: center\"\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: 20px\"\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 [type]=\"'text'\"\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 }\r\n\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 class=\"text-sm\"\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\r\n", styles: ["@charset \"UTF-8\";::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}::ng-deep .p-checkbox .p-checkbox-box{width:1.125rem;height:1.125rem}::ng-deep .p-checkbox{display:flex;align-items:center}::ng-deep .p-treetable .p-paginator{scale:.8}.icon-more-horiz{font-weight:700}.icon-more-horiz:hover,.icon-more-horiz:focus{color:#5e5e5e;transition:color .3s,transform .3s;background-color:#eaeaea;border-radius:50%}::ng-deep .p-treetable .p-treetable-thead>tr>th{background-color:#eaeaea}:host ::ng-deep .treetabledraggable .p-treetable .p-treetable-tbody>tr>td .p-treetable-toggler{width:1rem;height:1rem}.tag{width:5px;height:20px;border-radius:.25rem}:host ::ng-deep .draggable-cell .drag-icon{visibility:hidden}:host ::ng-deep .draggable-cell:hover .drag-icon{visibility:visible}.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:.65rem;height:.65rem}::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"] }]
|
|
2220
|
+
args: [{ selector: 'kv-tree-table', template: "<div>\r\n <p-treeTable\r\n #tt\r\n cdkDropList\r\n class=\"example-list\"\r\n (cdkDropListDropped)=\"drop($event)\"\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 [scrollHeight]=\"scrollHeight\"\r\n >\r\n <ng-template pTemplate=\"caption\" *ngIf=\"config.enableCation\">\r\n <div\r\n class=\"flex flex-row flex-wrap justify-content-between align-items-center grid formgrid p-fluid col-12 m-0\"\r\n style=\"background-color: #eaeaea\"\r\n >\r\n <div class=\"col-12 flex flex-column\">\r\n <div *ngIf=\"config.title\" class=\"text-md font-bold my-3\">\r\n {{ config.title }}\r\n </div>\r\n <div *ngIf=\"config.subtitle\" class=\"text-sm mb-4 font-medium\">\r\n {{ config.subtitle }}\r\n </div>\r\n </div>\r\n\r\n <div\r\n class=\"flex flex-row align-items-center col-10 p-0 md:col-6 lg:col-4 justify-content-center {{\r\n tamanhoTela < 768 ? '' : 'input-search'\r\n }}\"\r\n >\r\n <span *ngIf=\"config.enableFilter\" class=\"p-input-icon-left\">\r\n <i class=\"pi pi-search\"></i>\r\n\r\n <input\r\n pInputText\r\n pAutoFocus\r\n [autofocus]=\"true\"\r\n type=\"text\"\r\n (input)=\"onGlobalFilter(tt, $event)\"\r\n placeholder=\"Pesquisar...\"\r\n class=\"h-2rem\"\r\n #inputBusca\r\n />\r\n </span>\r\n </div>\r\n\r\n <div class=\"flex flex-row col-1 justify-content-end p-0\">\r\n <div class=\"flex flex-row gap-2 btns-options\">\r\n @for (action of config.actionsLote; track $index) {\r\n @if((selectedItems.length > 0 || action.showAcoesLote) &&\r\n exibirCampo(action, this.action)) {\r\n <kv-button\r\n (onClick)=\"action?.command(); activeItemLote(selectedItems)\"\r\n [pTooltip]=\"getOrExecute(action.tooltip, selectedItems)\"\r\n [tooltipPosition]=\"'bottom'\"\r\n [disabled]=\"getOrExecute(action.disabled, selectedItems) || false\"\r\n [icon]=\"getOrExecute(action.icon, selectedItems)\"\r\n [severity]=\"action.severity || 'tertiary'\"\r\n />\r\n } }\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n @if(showHeader){\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n @for(col of columns; track $index){\r\n <th\r\n [ttSortableColumn]=\"col.field\"\r\n [ttSortableColumnDisabled]=\"col.sortable === false\"\r\n [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 class=\"text-xs\">{{ col.header }}</span>\r\n\r\n @if(col.sortable) {\r\n <p-treeTableSortIcon [field]=\"col.field\" class=\"pb-1\"/>\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 class=\"text-xs\">{{ col.header }}</span>\r\n\r\n @if(col.sortable) {\r\n <p-treeTableSortIcon [field]=\"col.field\" class=\"pb-1\"/>\r\n }\r\n </div>\r\n </th>\r\n } @if (config.actions?.length ?? 0 > 0) {\r\n <th [style.width]=\"5\"></th>\r\n }\r\n </tr>\r\n </ng-template>\r\n }\r\n\r\n\r\n <ng-template\r\n pTemplate=\"body\"\r\n let-rowNode\r\n let-rowData=\"rowData\"\r\n let-columns=\"columns\"\r\n >\r\n\r\n @if(treeTableDraggable) {\r\n <tr\r\n cdkDrag\r\n cdkDragLockAxis=\"y\"\r\n [cdkDragData]=\"rowNode\"\r\n [ttRow]=\"rowNode\"\r\n (dblclick)=\"doubleClick($event, rowData)\"\r\n [ngClass]=\"{ capitalize: tableCaptalized }\"\r\n >\r\n\r\n @for(col of columns; track $index){\r\n <td\r\n class=\"draggable-cell\"\r\n [style.position]=\"!disableRowNodeSticky && rowNode.level !== 0 ? 'sticky' : null\"\r\n\r\n >\r\n\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\r\n <div\r\n class=\"w-full-h-full flex align-items-center\"\r\n *ngIf=\"$index == 0\"\r\n\r\n >\r\n <span\r\n class=\"material-symbols-outlined drag-icon\"\r\n style=\"cursor: grab; font-size: 25px; color: #6b7280; opacity: 0.9;\"\r\n cdkDragHandle\r\n >\r\n drag_indicator\r\n </span>\r\n <p-treeTableToggler\r\n class=\"hiddenVisible\"\r\n [rowNode]=\"rowNode\"\r\n />\r\n\r\n @if(config.enableSelect) {\r\n <p-treeTableCheckbox\r\n [disabled]=\"isDisabledCheckbox(rowData, rowNode)\"\r\n (click)=\"activeItemLote(selectedItems)\"\r\n [value]=\"rowNode\"\r\n [ngStyle]=\"{\r\n 'display': isSelectEnabled(rowData, rowNode) ? 'block' : 'none',\r\n 'margin-left': config.visibleCheckboxFunction ? '-34px' : '0px'\r\n }\"\r\n />\r\n }\r\n\r\n </div>\r\n\r\n\r\n <div class=\"flex flex-row align-items-center\">\r\n @if (col.template && validateShowTemplate(rowNode, col)) {\r\n <span>\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 } @else {\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 text-xs\">{{ 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 }\r\n </div>\r\n </div>\r\n </td>\r\n }\r\n\r\n <td\r\n style=\"border-left: none; text-align: center\"\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 class=\"flex align-items-center justify-content-center\"\r\n >\r\n <span\r\n class=\"material-symbols-outlined cursor-pointer icon-more-horiz p-1\"\r\n style=\"font-size: 20px\"\r\n (click)=\"menu.toggle($event); activeItem(rowData)\"\r\n >\r\n more_horiz\r\n </span>\r\n\r\n\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\r\n </div>\r\n\r\n @if(config.actionsPai?.length ?? 0 > 0 && rowNode.level == 0){\r\n <div class=\"flex justify-content-end align-items-center \">\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 [type]=\"'text'\"\r\n [icon]=\"actionPai.icon\"\r\n [severity]=\"actionPai.severity || 'tertiary'\"\r\n />\r\n\r\n } }\r\n </div>\r\n }\r\n\r\n\r\n\r\n </td>\r\n\r\n </tr>\r\n } @else {\r\n <tr\r\n [ttRow]=\"rowNode\"\r\n (dblclick)=\"doubleClick($event, rowData)\"\r\n [ngClass]=\"{ capitalize: tableCaptalized }\"\r\n >\r\n @for(col of columns; track $index){\r\n <td\r\n [style.position]=\"rowNode.level !== 0 ? 'sticky' : null\"\r\n [style.left.px]=\"\r\n childrenRecoil && rowNode.level !== 0 ? rowNode.level * 30 : null\r\n \"\r\n [style.borderRight]=\"rowNode.level === 0 ? 'none' : ''\"\r\n [style.borderLeft]=\"\r\n rowNode.level === 0 && col.field != config.columns[0].field\r\n ? 'none'\r\n : ''\r\n \"\r\n >\r\n <div class=\"flex flex-row {{ align(col) }}\">\r\n <div\r\n class=\"w-full-h-full flex align-items-center\"\r\n *ngIf=\"$index == 0\"\r\n >\r\n <p-treeTableToggler class=\"hiddenVisible\" [rowNode]=\"rowNode\" />\r\n\r\n @if(config.enableSelect) {\r\n <p-treeTableCheckbox\r\n [disabled]=\"isDisabledCheckbox(rowData, rowNode)\"\r\n (click)=\"activeItemLote(selectedItems)\"\r\n [value]=\"rowNode\"\r\n [ngStyle]=\"{\r\n 'display': isSelectEnabled(rowData, rowNode) ? 'block' : 'none',\r\n 'margin-left': config.visibleCheckboxFunction ? '-34px' : '0px'\r\n }\"\r\n />\r\n }\r\n\r\n </div>\r\n <div class=\"flex flex-row align-items-center\">\r\n @if (col.template && validateShowTemplate(rowNode, col)) {\r\n <span>\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 } @else {\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 text-xs\">{{ 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 }\r\n </div>\r\n </div>\r\n </td>\r\n }\r\n\r\n <td\r\n style=\"border-left: none; text-align: center\"\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: 20px\"\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 [type]=\"'text'\"\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 }\r\n\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 class=\"text-sm\"\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: ["@charset \"UTF-8\";::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}::ng-deep .p-checkbox .p-checkbox-box{width:1.125rem;height:1.125rem}::ng-deep .p-checkbox{display:flex;align-items:center}::ng-deep .p-treetable .p-paginator{scale:.8}.icon-more-horiz{font-weight:700}.icon-more-horiz:hover,.icon-more-horiz:focus{color:#5e5e5e;transition:color .3s,transform .3s;background-color:#eaeaea;border-radius:50%}::ng-deep .p-treetable .p-treetable-thead>tr>th{background-color:#eaeaea}:host ::ng-deep .treetabledraggable .p-treetable .p-treetable-tbody>tr>td .p-treetable-toggler{width:1rem;height:1rem}.tag{width:5px;height:20px;border-radius:.25rem}:host ::ng-deep .draggable-cell .drag-icon{visibility:hidden}:host ::ng-deep .draggable-cell:hover .drag-icon{visibility:visible}.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:.65rem;height:.65rem}::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"] }]
|
|
2215
2221
|
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { disableRowNodeSticky: [{
|
|
2216
2222
|
type: Input
|
|
2217
2223
|
}], config: [{
|
|
@@ -2525,7 +2531,7 @@ class BaseComponentDropDown extends BaseComponentInput {
|
|
|
2525
2531
|
}
|
|
2526
2532
|
capitalizeOptions(options) {
|
|
2527
2533
|
if (this.capitalize) {
|
|
2528
|
-
return options
|
|
2534
|
+
return options?.map((option) => {
|
|
2529
2535
|
option[this.optionLabel] = this.transformCapitalize(option[this.optionLabel]);
|
|
2530
2536
|
return option;
|
|
2531
2537
|
});
|
|
@@ -2728,6 +2734,10 @@ class BaseComponentMultiSelect extends BaseComponentInput {
|
|
|
2728
2734
|
'o',
|
|
2729
2735
|
'e',
|
|
2730
2736
|
];
|
|
2737
|
+
this.romanNumerals = [
|
|
2738
|
+
'I', 'II', 'III', 'IV', 'V', 'VI', 'VII', 'VIII', 'IX', 'X', 'XI', 'XII', 'XIII', 'XIV', 'XV',
|
|
2739
|
+
'XVI', 'XVII', 'XVIII', 'XIX', 'XX'
|
|
2740
|
+
];
|
|
2731
2741
|
this.registerOnTouched(() => { });
|
|
2732
2742
|
}
|
|
2733
2743
|
ngOnInit() {
|
|
@@ -2811,16 +2821,15 @@ class BaseComponentMultiSelect extends BaseComponentInput {
|
|
|
2811
2821
|
transformCapitalize(value) {
|
|
2812
2822
|
if (!value)
|
|
2813
2823
|
return value;
|
|
2814
|
-
return value
|
|
2815
|
-
.
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2824
|
+
return value.split(' ').map((word, index) => {
|
|
2825
|
+
if (this.romanNumerals.includes(word.toUpperCase())) {
|
|
2826
|
+
return word;
|
|
2827
|
+
}
|
|
2828
|
+
if (index !== 0 && this.prepositions.includes(word.toLocaleLowerCase())) {
|
|
2819
2829
|
return word.toLocaleLowerCase();
|
|
2820
2830
|
}
|
|
2821
|
-
return
|
|
2822
|
-
})
|
|
2823
|
-
.join(' ');
|
|
2831
|
+
return word.charAt(0).toLocaleUpperCase() + word.slice(1).toLocaleLowerCase();
|
|
2832
|
+
}).join(' ');
|
|
2824
2833
|
}
|
|
2825
2834
|
capitalizeOptions(options) {
|
|
2826
2835
|
if (this.capitalize) {
|
|
@@ -3528,6 +3537,9 @@ class CapitalizePipe {
|
|
|
3528
3537
|
'I', 'II', 'III', 'IV', 'V', 'VI', 'VII', 'VIII', 'IX', 'X', 'XI', 'XII', 'XIII', 'XIV', 'XV',
|
|
3529
3538
|
'XVI', 'XVII', 'XVIII', 'XIX', 'XX'
|
|
3530
3539
|
];
|
|
3540
|
+
this.siglas = [
|
|
3541
|
+
'UI', 'UX', 'TI'
|
|
3542
|
+
];
|
|
3531
3543
|
}
|
|
3532
3544
|
transform(value) {
|
|
3533
3545
|
if (!value)
|
|
@@ -3536,6 +3548,9 @@ class CapitalizePipe {
|
|
|
3536
3548
|
if (this.romanNumerals.includes(word.toUpperCase())) {
|
|
3537
3549
|
return word;
|
|
3538
3550
|
}
|
|
3551
|
+
if (this.siglas.includes(word.toUpperCase())) {
|
|
3552
|
+
return word;
|
|
3553
|
+
}
|
|
3539
3554
|
if (index !== 0 && this.prepositions.includes(word.toLocaleLowerCase())) {
|
|
3540
3555
|
return word.toLocaleLowerCase();
|
|
3541
3556
|
}
|
|
@@ -5871,11 +5886,11 @@ class DropdownMasterComponent extends BaseComponentDropDownExternal {
|
|
|
5871
5886
|
return of(this.masters || []);
|
|
5872
5887
|
}
|
|
5873
5888
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: DropdownMasterComponent, deps: [{ token: ComponentService }, { token: i1$4.DialogService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5874
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.8", type: DropdownMasterComponent, selector: "dropdown-master", inputs: { formControlName: "formControlName", masters: "masters" }, providers: ComponentProviders(DropdownMasterComponent), usesInheritance: true, ngImport: i0, template: "<div [formGroup]=\"formGroup\">\r\n <kv-dropdown\r\n componentId=\"idmaster\"\r\n
|
|
5889
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.8", type: DropdownMasterComponent, selector: "dropdown-master", inputs: { formControlName: "formControlName", masters: "masters" }, providers: ComponentProviders(DropdownMasterComponent), usesInheritance: true, ngImport: i0, template: "<div [formGroup]=\"formGroup\">\r\n <kv-dropdown\r\n componentId=\"idmaster\"\r\n optionLabel=\"idmasternome\"\r\n optionValue=\"idmaster\"\r\n [options]=\"options\"\r\n [filter]=\"true\"\r\n [filteredOptions]=\"filteredOptions\"\r\n [formControlName]=\"formControlName\"\r\n [loading]=\"loading\"\r\n [showClear]=\"false\"\r\n (onSelectionChange)=\"onInputChange($event)\"\r\n (onSelectionValue)=\"onInputChange($event)\">\r\n </kv-dropdown>\r\n</div>", styles: [""], dependencies: [{ kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "component", type: KvDropdownComponent, selector: "kv-dropdown", inputs: ["filterPlaceholder", "placeholder", "dropDowValue", "itemTemplate", "selectedItemTemplate", "virtualScroll", "virtualScrollItemSize", "appendTo"], outputs: ["onLazyLoad"] }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }] }); }
|
|
5875
5890
|
}
|
|
5876
5891
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: DropdownMasterComponent, decorators: [{
|
|
5877
5892
|
type: Component,
|
|
5878
|
-
args: [{ selector: 'dropdown-master', providers: ComponentProviders(DropdownMasterComponent), template: "<div [formGroup]=\"formGroup\">\r\n <kv-dropdown\r\n componentId=\"idmaster\"\r\n
|
|
5893
|
+
args: [{ selector: 'dropdown-master', providers: ComponentProviders(DropdownMasterComponent), template: "<div [formGroup]=\"formGroup\">\r\n <kv-dropdown\r\n componentId=\"idmaster\"\r\n optionLabel=\"idmasternome\"\r\n optionValue=\"idmaster\"\r\n [options]=\"options\"\r\n [filter]=\"true\"\r\n [filteredOptions]=\"filteredOptions\"\r\n [formControlName]=\"formControlName\"\r\n [loading]=\"loading\"\r\n [showClear]=\"false\"\r\n (onSelectionChange)=\"onInputChange($event)\"\r\n (onSelectionValue)=\"onInputChange($event)\">\r\n </kv-dropdown>\r\n</div>" }]
|
|
5879
5894
|
}], ctorParameters: () => [{ type: ComponentService }, { type: i1$4.DialogService }], propDecorators: { formControlName: [{
|
|
5880
5895
|
type: Input
|
|
5881
5896
|
}], masters: [{
|
|
@@ -6078,11 +6093,11 @@ class KvLayoutComponent {
|
|
|
6078
6093
|
return !this.showLicencas() && (this.masterName || this.empresaName);
|
|
6079
6094
|
}
|
|
6080
6095
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvLayoutComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1$2.FormBuilder }, { token: i3$1.Router }, { token: i3$1.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
6081
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.8", type: KvLayoutComponent, selector: "kv-layout", inputs: { apps: { classPropertyName: "apps", publicName: "apps", isSignal: false, isRequired: false, transformFunction: null }, breadCrumbItems: { classPropertyName: "breadCrumbItems", publicName: "breadCrumbItems", isSignal: false, isRequired: false, transformFunction: null }, masters: { classPropertyName: "masters", publicName: "masters", isSignal: false, isRequired: false, transformFunction: null }, menus: { classPropertyName: "menus", publicName: "menus", isSignal: false, isRequired: false, transformFunction: null }, expandMenu: { classPropertyName: "expandMenu", publicName: "expandMenu", isSignal: true, isRequired: false, transformFunction: null }, logoMenuExpand: { classPropertyName: "logoMenuExpand", publicName: "logoMenuExpand", isSignal: false, isRequired: false, transformFunction: null }, logoMenuHide: { classPropertyName: "logoMenuHide", publicName: "logoMenuHide", isSignal: false, isRequired: false, transformFunction: null }, selectedApp: { classPropertyName: "selectedApp", publicName: "selectedApp", isSignal: false, isRequired: false, transformFunction: null }, selectedEmpresa: { classPropertyName: "selectedEmpresa", publicName: "selectedEmpresa", isSignal: false, isRequired: false, transformFunction: null }, selectedMaster: { classPropertyName: "selectedMaster", publicName: "selectedMaster", isSignal: false, isRequired: false, transformFunction: null }, showButtonApps: { classPropertyName: "showButtonApps", publicName: "showButtonApps", isSignal: false, isRequired: false, transformFunction: null }, showButtonUser: { classPropertyName: "showButtonUser", publicName: "showButtonUser", isSignal: false, isRequired: false, transformFunction: null }, showExpandMenu: { classPropertyName: "showExpandMenu", publicName: "showExpandMenu", isSignal: false, isRequired: false, transformFunction: null }, showDropdownLicenca: { classPropertyName: "showDropdownLicenca", publicName: "showDropdownLicenca", isSignal: false, isRequired: false, transformFunction: null }, showMenu: { classPropertyName: "showMenu", publicName: "showMenu", isSignal: false, isRequired: false, transformFunction: null }, showTrocaEmpresa: { classPropertyName: "showTrocaEmpresa", publicName: "showTrocaEmpresa", isSignal: false, isRequired: false, transformFunction: null }, userName: { classPropertyName: "userName", publicName: "userName", isSignal: false, isRequired: false, transformFunction: null }, masterName: { classPropertyName: "masterName", publicName: "masterName", isSignal: false, isRequired: false, transformFunction: null }, empresaName: { classPropertyName: "empresaName", publicName: "empresaName", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { expandMenu: "expandMenuChange", accessKeePassEmit: "accessKeePassEmit", changeEmpresaEmit: "changeEmpresaEmit", changeLicenseEmit: "changeLicenseEmit", expandMenuEmit: "expandMenuEmit", logoutEmit: "logoutEmit", selectAppEmit: "selectAppEmit", navigateToDefaultRouteEmit: "navigateToDefaultRouteEmit" }, host: { listeners: { "window:resize": "onWindowResize($event)" } }, queries: [{ propertyName: "topMenuActions", predicate: ["topMenuAction"], isSignal: true }], viewQueries: [{ propertyName: "meusDadosPanel", first: true, predicate: ["meusDadosPanel"], descendants: true }, { propertyName: "sidebarRef", first: true, predicate: ["sidebarRef"], descendants: true }, { propertyName: "sistemasPanel", first: true, predicate: ["sistemasPanel"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"flex flex-row overflow-y-hidden w- full-container\">\r\n <div\r\n [ngClass]=\"{ 'overlay-background': expandMenu() && widthPage() < 800 }\"\r\n ></div>\r\n @if (showMenu) {\r\n <div\r\n [style]=\"{\r\n minWidth: expandMenu() && widthPage() > 800 ? '17rem' : '3.65rem'\r\n }\"\r\n ></div>\r\n } @if(showMenu) {\r\n <p-sidebar\r\n #sidebarRef\r\n [visible]=\"true\"\r\n [showCloseIcon]=\"false\"\r\n [modal]=\"false\"\r\n [style]=\"{ width: expandMenu() ? '17rem' : '3.65rem' }\"\r\n class=\"sidebar-animation\"\r\n styleClass=\"transition-all\"\r\n >\r\n <ng-template pTemplate=\"headless\">\r\n <div class=\"flex flex-column overflow-hidden\">\r\n <div\r\n class=\"flex flex-column gap-2 justify-content-between flex-shrink-0 mx-2 overflow-hidden\"\r\n >\r\n <div\r\n class=\"flex {{\r\n expandMenu() ? 'flex-row' : 'flex-column'\r\n }} align-items-center {{\r\n expandMenu()\r\n ? 'justify-content-between'\r\n : 'justify-content-center'\r\n }} py-3\"\r\n >\r\n <!-- Logo para o menu expandido -->\r\n <img\r\n *ngIf=\"expandMenu() && logoMenuExpand\"\r\n alt=\"Card\"\r\n [src]=\"logoMenuExpand\"\r\n [style.height]=\"'3rem'\"\r\n width=\"auto\"\r\n class=\"cursor-pointer p-1\"\r\n (click)=\"navigateToDefaultRoute()\"\r\n />\r\n\r\n <!-- Logo para o menu minimizado-->\r\n <img\r\n *ngIf=\"!expandMenu() && logoMenuHide\"\r\n alt=\"Card\"\r\n [src]=\"logoMenuHide\"\r\n [style.height]=\"'3rem'\"\r\n width=\"auto\"\r\n class=\"mb-2 p-1\"\r\n (click)=\"navigateToDefaultRoute()\"\r\n />\r\n\r\n <!-- Toggle menu -->\r\n <span\r\n *ngIf=\"showExpandMenu\"\r\n class=\"material-symbols-outlined top-layout-icons p-1\"\r\n [pTooltip]=\"expandMenu() ? 'Ocultar Menu' : 'Expandir Menu'\"\r\n [tooltipPosition]=\"'right'\"\r\n (click)=\"toggleMenu()\"\r\n >\r\n menu\r\n </span>\r\n </div>\r\n\r\n @if(showTrocaEmpresa){\r\n <div\r\n class=\"flex flex-row align-items-center {{\r\n expandMenu()\r\n ? 'justify-content-between'\r\n : 'justify-content-center'\r\n }}\"\r\n >\r\n <div\r\n class=\"flex flex-column cursor-pointer\"\r\n *ngIf=\"expandMenu() && selectedEmpresa\"\r\n (click)=\"changeEmpresa($event)\"\r\n >\r\n <span\r\n class=\"text-sm font-semibold mr-2\"\r\n [pTooltip]=\"this.selectedEmpresa.razaosocial\"\r\n [tooltipPosition]=\"'right'\"\r\n >\r\n {{ nameEmpresa(this.selectedEmpresa.razaosocial) }}\r\n </span>\r\n <span class=\"text-sm mt-1\">{{\r\n this.selectedEmpresa.cpfcnpj | cpfCnpj\r\n }}</span>\r\n </div>\r\n\r\n <button\r\n pButton\r\n class=\"p-button-rounded p-button-text padding-style h-2rem w-2rem hover:bg-green-600 hover:text-white icon-menu\"\r\n (click)=\"changeEmpresa($event)\"\r\n [pTooltip]=\"'Trocar de empresa'\"\r\n [tooltipPosition]=\"'right'\"\r\n >\r\n <i class=\"material-symbols-outlined\"> sync_alt </i>\r\n </button>\r\n </div>\r\n <p-divider type=\"solid\"></p-divider>\r\n }\r\n </div>\r\n\r\n <div class=\"list-none m-0 card-container overflow-y-auto max-h-full\">\r\n <!-- menus -->\r\n <li\r\n *ngFor=\"let menu of menus; let i = index\"\r\n [class]=\"expandMenu() ? 'px-2' : 'px-1'\"\r\n >\r\n <!-- menu que n\u00E3o tem filho -->\r\n <a\r\n (click)=\"callRoute(menu.link)\"\r\n *ngIf=\"\r\n !menu.indmenupai && (!menu.idmenupai || menu.idmenupai == 0)\r\n \"\r\n pRipple\r\n [pTooltip]=\"!expandMenu() ? menu.descricaomenu : ''\"\r\n [tooltipPosition]=\"'right'\"\r\n class=\"menu-option\"\r\n [style.background-color]=\"menu.bgColor\"\r\n [class.justify-content-center]=\"!expandMenu()\"\r\n >\r\n <i\r\n class=\"content-option-menu material-symbols-outlined icon-menu {{\r\n expandMenu() ? 'ml-1 mr-2' : ''\r\n }} icon-hover-color {{ menu.textColor }}\"\r\n *ngIf=\"menu.icone\"\r\n >\r\n {{ menu.icone }}\r\n </i>\r\n <span\r\n class=\"content-option-menu text-base text-blue-900 font-semibold {{\r\n menu.textColor\r\n }}\"\r\n *ngIf=\"expandMenu()\"\r\n >{{ menu.descricaomenu }}</span\r\n >\r\n </a>\r\n <!-- menu com filho -->\r\n <div *ngIf=\"menu.indmenupai\">\r\n <a\r\n pRipple\r\n pStyleClass=\"@next\"\r\n enterClass=\"hidden\"\r\n enterActiveClass=\"slidedown\"\r\n leaveToClass=\"hidden\"\r\n leaveActiveClass=\"slideup\"\r\n [style.background-color]=\"isSelectedMenuPai(menu) ? 'rgb(41, 185, 45)' : 'white'\"\r\n\r\n class=\"menu-option {{\r\n !expandMenu()\r\n ? 'justify-content-center'\r\n : 'justify-content-between'\r\n }} \"\r\n [tooltipPosition]=\"'right'\"\r\n [pTooltip]=\"!expandMenu() ? menu.descricaomenu : ''\"\r\n (click)=\"\r\n expandMenu.set(!expandMenu() ? !expandMenu() : expandMenu())\r\n \"\r\n >\r\n <div class=\"flex flex-row align-items-center\">\r\n <i\r\n class=\"content-option-menu material-symbols-outlined icon-menu {{\r\n expandMenu() ? 'ml-1 mr-2' : ''\r\n }} icon-hover-color\"\r\n *ngIf=\"menu.icone\"\r\n [class.text-white]=\"isSelectedMenuPai(menu)\"\r\n >\r\n {{ menu.icone }}\r\n </i>\r\n <span\r\n class=\"text-base text-blue-900 font-semibold content-option-menu\"\r\n *ngIf=\"expandMenu()\"\r\n >{{ menu.descricaomenu }}</span\r\n >\r\n </div>\r\n <span\r\n class=\"pi pi-chevron-down text-blue-900 mr-1 icon-hover-color content-option-menu\"\r\n *ngIf=\"expandMenu()\"\r\n ></span>\r\n </a>\r\n\r\n <!-- filhos -->\r\n <div\r\n class=\"list-none py-0 pl-3 pr-0 m-0 {{\r\n !(\r\n menuSelecionado()?.idmenupai == menu.idmenu &&\r\n this.expandMenu()\r\n ) && 'hidden'\r\n }} overflow-y-hidden transition-all transition-duration-400 transition-ease-in-out\"\r\n >\r\n <li\r\n *ngFor=\"\r\n let filho of returnMenuChild(menu.idmenu);\r\n let iFilho = index\r\n \"\r\n >\r\n <a\r\n *ngIf=\"expandMenu()\"\r\n (click)=\"callRoute(filho.link)\"\r\n pRipple\r\n class=\"menu-option\"\r\n [style.background-color]=\"filho.bgColor\"\r\n >\r\n <i\r\n class=\"content-option-menu material-symbols-outlined icon-menu {{\r\n expandMenu() ? 'ml-1 mr-2' : ''\r\n }} icon-hover-color\"\r\n *ngIf=\"filho.icone\"\r\n >\r\n {{ filho.icone }}\r\n </i>\r\n <span\r\n class=\"content-option-menu text-medium text-blue-900 ml-4 {{\r\n filho.textColor\r\n }}\"\r\n *ngIf=\"expandMenu()\"\r\n >{{ filho.descricaomenu }}</span\r\n >\r\n </a>\r\n </li>\r\n </div>\r\n </div>\r\n </li>\r\n </div>\r\n </div>\r\n </ng-template>\r\n </p-sidebar>\r\n }\r\n\r\n <!-- Topbar -->\r\n <div\r\n class=\"w-auto h-screen page-content overflow-y-hidden flex flex-column\"\r\n id=\"page-content\"\r\n style=\"width: 100vw !important\"\r\n >\r\n <div\r\n class=\"flex flex-row flex-wrap align-items-center justify-content-between m-2 md:m-3\"\r\n >\r\n @if(!showMenu) {\r\n <!-- Logo home -->\r\n <div>\r\n <img [src]=\"logoMenuExpand\" width=\"150\" />\r\n </div>\r\n } @else {\r\n <!-- Breadcrumbs -->\r\n <div>\r\n <p class=\"text-xl font-semibold text-blue-900 breadcrumb-title\">\r\n {{\r\n breadCrumbItems[breadCrumbItems.length - 1] &&\r\n breadCrumbItems[breadCrumbItems.length - 1].label\r\n ? breadCrumbItems[breadCrumbItems.length - 1].label\r\n : \"\"\r\n }}\r\n </p>\r\n <p-breadcrumb\r\n *ngIf=\"widthCard > 400\"\r\n styleClass=\"border-none p-0 flex align-items-center h-2rem !important;\"\r\n [model]=\"breadCrumbItems\"\r\n [style]=\"{ backgroundColor: '#eaeaea' }\"\r\n (onItemClick)=\"callRoute($event.item.routerLink, true)\"\r\n ></p-breadcrumb>\r\n </div>\r\n } @if (exibirNomes) { @if(widthCard >= 517) {\r\n <div\r\n class=\"w-auto flex flex-column justify-content-center align-items-center gap-2\"\r\n >\r\n @if (masterName) { <span class=\"master-name\">{{ masterName }}</span> }\r\n @if (empresaName) {<span class=\"empresa-name\">{{ empresaName }}</span> }\r\n </div>\r\n\r\n <div\r\n class=\"w-auto flex flex-row justify-content-center align-items-center gap-2\"\r\n >\r\n <!-- Navega\u00E7\u00E3o de sistemas e usu\u00E1rios -->\r\n @for (topAction of topMenuActions(); track $index) {\r\n <ng-container *ngTemplateOutlet=\"topAction\" />\r\n }\r\n\r\n <span\r\n *ngIf=\"showButtonApps\"\r\n class=\"material-symbols-outlined top-layout-icons p-1\"\r\n [pTooltip]=\"'Sistemas'\"\r\n [tooltipPosition]=\"'left'\"\r\n (click)=\"sistemasPanel.toggle($event)\"\r\n >\r\n apps\r\n </span>\r\n\r\n <span\r\n *ngIf=\"showButtonUser\"\r\n class=\"material-symbols-outlined top-layout-icons p-1\"\r\n [pTooltip]=\"'Menu do Usu\u00E1rio'\"\r\n [tooltipPosition]=\"'left'\"\r\n (click)=\"meusDadosPanel.toggle($event)\"\r\n >\r\n person\r\n </span>\r\n </div>\r\n } @else {\r\n <div\r\n class=\"w-auto flex flex-row justify-content-center align-items-center gap-2\"\r\n >\r\n <!-- Navega\u00E7\u00E3o de sistemas e usu\u00E1rios -->\r\n @for (topAction of topMenuActions(); track $index) {\r\n <ng-container *ngTemplateOutlet=\"topAction\" />\r\n }\r\n\r\n <span\r\n *ngIf=\"showButtonApps\"\r\n class=\"material-symbols-outlined top-layout-icons p-1\"\r\n [pTooltip]=\"'Sistemas'\"\r\n [tooltipPosition]=\"'left'\"\r\n (click)=\"sistemasPanel.toggle($event)\"\r\n >\r\n apps\r\n </span>\r\n\r\n <span\r\n *ngIf=\"showButtonUser\"\r\n class=\"material-symbols-outlined top-layout-icons p-1\"\r\n [pTooltip]=\"'Menu do Usu\u00E1rio'\"\r\n [tooltipPosition]=\"'left'\"\r\n (click)=\"meusDadosPanel.toggle($event)\"\r\n >\r\n person\r\n </span>\r\n </div>\r\n\r\n <div\r\n class=\"w-auto flex flex-column justify-content-center align-items-center gap-2\"\r\n >\r\n @if (masterName) { <span class=\"master-name\">{{ masterName }}</span> }\r\n @if (empresaName) {<span class=\"empresa-name\">{{ empresaName }}</span> }\r\n </div>\r\n } } @else { @if(widthPage() > 992){\r\n <!-- dropdown para sele\u00E7\u00E3o de empresa/licenca -->\r\n <dropdown-master\r\n *ngIf=\"showLicencas()\"\r\n class=\"max-w-25rem\"\r\n formControlName=\"idmaster\"\r\n [formGroup]=\"formGroup\"\r\n [masters]=\"masters\"\r\n (onSelectionChange)=\"changeLicense($event)\"\r\n (onSelectionValue)=\"changeLicense($event)\"\r\n >\r\n </dropdown-master>\r\n }\r\n\r\n <!-- Navega\u00E7\u00E3o de sistemas e usu\u00E1rios -->\r\n <div class=\"w-auto flex flex-row align-items-center gap-2\">\r\n @for (topAction of topMenuActions(); track $index) {\r\n <ng-container *ngTemplateOutlet=\"topAction\" />\r\n }\r\n\r\n <span\r\n *ngIf=\"showButtonApps\"\r\n class=\"material-symbols-outlined top-layout-icons p-1\"\r\n [pTooltip]=\"'Sistemas'\"\r\n [tooltipPosition]=\"'left'\"\r\n (click)=\"sistemasPanel.toggle($event)\"\r\n >\r\n apps\r\n </span>\r\n\r\n <span\r\n *ngIf=\"showButtonUser\"\r\n class=\"material-symbols-outlined top-layout-icons p-1\"\r\n [pTooltip]=\"'Menu do Usu\u00E1rio'\"\r\n [tooltipPosition]=\"'left'\"\r\n (click)=\"meusDadosPanel.toggle($event)\"\r\n >\r\n person\r\n </span>\r\n </div>\r\n\r\n @if(widthPage() < 992){\r\n <!-- dropdown para sele\u00E7\u00E3o de empresa/licenca -->\r\n <dropdown-master\r\n *ngIf=\"showLicencas()\"\r\n class=\"w-full\"\r\n formControlName=\"idmaster\"\r\n [formGroup]=\"formGroup\"\r\n [masters]=\"masters\"\r\n (onSelectionChange)=\"changeLicense($event)\"\r\n (onSelectionValue)=\"changeLicense($event)\"\r\n >\r\n </dropdown-master>\r\n } }\r\n </div>\r\n\r\n <!-- Container -->\r\n <div class=\"overflow-hidden flex-1 p-2 md:p-3\">\r\n <p-card\r\n styleClass=\"overflow-y-auto h-full max-h-full {{\r\n !showMenu && 'sm:overflow-y-hidden'\r\n }} card-container\"\r\n >\r\n <ng-content></ng-content>\r\n </p-card>\r\n </div>\r\n </div>\r\n\r\n <!-- Painel de aplicativos -->\r\n <p-overlayPanel\r\n #sistemasPanel\r\n [showTransitionOptions]=\"'350ms ease-out'\"\r\n [hideTransitionOptions]=\"'250ms ease-in'\"\r\n >\r\n <ng-template pTemplate=\"container\">\r\n <p class=\"title-style mt-3\">Sistemas</p>\r\n\r\n <div\r\n class=\"flex flex-row flex-wrap gap-3 align-items-center justify-content-center mt-5 mb-3\"\r\n style=\"width: 270px; height: 100%\"\r\n >\r\n @for (aplicativo of apps; track $index) { @if(aplicativo.urlicone ==\r\n \"https://work-assets.keevo.com.br/img/icone-keevocenter.png\") {\r\n <div\r\n class=\"btn-sistema text-xl md:text-3xl flex align-items-center justify-content-center\"\r\n (click)=\"selectApp(aplicativo.idaplicativo)\"\r\n [pTooltip]=\"aplicativo?.descricaoaplicativo\"\r\n [tooltipPosition]=\"'left'\"\r\n >\r\n {{ aplicativo.descricaoaplicativo.charAt(0).toLocaleUpperCase() }}\r\n </div>\r\n } @else {\r\n <img\r\n [src]=\"aplicativo.urlicone\"\r\n class=\"btn-sistema flex align-items-center justify-content-center\"\r\n [pTooltip]=\"aplicativo?.descricaoaplicativo\"\r\n [tooltipPosition]=\"'left'\"\r\n (click)=\"selectApp(aplicativo.idaplicativo)\"\r\n />\r\n } }\r\n\r\n <!-- <button\r\n *ngFor=\"let aplicativo of apps\"\r\n pButton\r\n pRipple\r\n class=\"btn-sistema-2 btn-sistema hover-btn-cor-padrao remove-focus h-4rem w-4rem\"\r\n [pTooltip]=\"aplicativo?.descricaoaplicativo\"\r\n [tooltipPosition]=\"'left'\"\r\n (click)=\"selectApp(aplicativo.idaplicativo)\"\r\n >\r\n {{ aplicativo.nomeaplicativo.charAt(0).toUpperCase() }}\r\n </button> -->\r\n </div>\r\n </ng-template>\r\n </p-overlayPanel>\r\n\r\n <!-- Painel do usu\u00E1rio -->\r\n <p-overlayPanel\r\n #meusDadosPanel\r\n [showTransitionOptions]=\"'350ms ease-out'\"\r\n [hideTransitionOptions]=\"'250ms ease-in'\"\r\n >\r\n <ng-template pTemplate=\"container\">\r\n <p class=\"title-style mt-3\">\r\n Ol\u00E1, {{ userName ? userName.split(\" \")[0] : \"Usu\u00E1rio\" }}!\r\n </p>\r\n <div class=\"mt-5 mb-3\"></div>\r\n\r\n <p-button\r\n icon=\"pi pi-lock\"\r\n label=\"Acessar Keepass\"\r\n (onClick)=\"accessKeePass($event)\"\r\n styleClass=\"border-noround w-full text-blue-900 text-sm\"\r\n [text]=\"true\"\r\n >\r\n </p-button>\r\n\r\n <p-button\r\n icon=\"pi pi-sign-out\"\r\n label=\"Sair\"\r\n (onClick)=\"logout($event)\"\r\n styleClass=\"border-noround w-full text-blue-900 text-sm\"\r\n [text]=\"true\"\r\n >\r\n </p-button>\r\n </ng-template>\r\n </p-overlayPanel>\r\n</div>\r\n", styles: [".material-icons{font-family:Material Icons;font-weight:400;font-style:normal;font-size:1em;display:inline-block;width:1em;height:1em;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:\"liga\"}::ng-deep .p-button:focus{box-shadow:none;-webkit-box-shadow:none;-moz-box-shadow:none}::ng-deep .p-overlaypanel .p-overlaypanel-content{padding:0}::ng-deep .hover-btn-cor-padrao.p-button:enabled:hover{background:#0c3e66;border-color:#002542}.p-button.p-button-icon-only.p-button-rounded{background:#0c3e66;border-color:#002542}::ng-deep .remove-focus:focus{border:none}::ng-deep .p-sidebar .p-sidebar-content{padding:0}::ng-deep .sidebar-header-sistema.p-sidebar .p-sidebar-header{padding-top:.5rem;padding-right:0;padding-bottom:0;padding-left:0;display:block}::ng-deep .p-sidebar .p-sidebar-header{padding:0rem!important}::ng-deep body{margin:0!important}::ng-deep .p-breadcrumb ul li.p-breadcrumb-chevron{position:relative;top:3px;color:#0c3e66!important}.page-content{background:linear-gradient(to bottom,#eaeaea 17%,#fff 19%)}*{margin:0}p .item-menu{color:#0c3e66;font-family:Inter var,Roboto,Arial,Helvetica,sans-serif!important}span{font-size:.825rem!important}.breadcrumb-title{font-size:1rem!important;font-family:Inter var,Roboto,Arial,Helvetica,sans-serif!important}::ng-deep .home-style{background-color:#eaeaea;overflow:hidden}::ng-deep .page-style{overflow:auto!important}::ng-deep .card-container{overflow-x:hidden}::ng-deep .card-container::-webkit-scrollbar{width:6px}::ng-deep .card-container::-webkit-scrollbar:hover{background-color:#dededebf}::ng-deep .card-container::-webkit-scrollbar-thumb{border-radius:4px;background-color:transparent}::ng-deep .card-container:hover::-webkit-scrollbar-thumb{border-left:2px solid white;background-color:#00000080}::ng-deep .card-container::-webkit-scrollbar-track{border-left:2px solid white;background-color:#dededebf}.title-style{position:relative;top:10px;margin-left:20px;font-size:1.25rem;color:#002542;border-bottom:2px solid green;font-weight:600;display:inline}::ng-deep p-sidebar .p-sidebar-content{overflow-y:hidden}::ng-deep p-dialog .p-dialog-content{overflow-y:unset}.icon-menu{font-size:1.3rem;color:#002542;display:flex;justify-content:center;align-items:center}::ng-deep .menu-option{padding:.8rem!important;display:flex;align-items:center;cursor:pointer;border-radius:.5rem;transition-duration:150;transition-property:color,background-color;padding:.5rem}::ng-deep .menu-option:hover{background-color:#29b92d!important;color:#fff}::ng-deep .p-breadcrumb .p-breadcrumb-list .p-menuitem-text{color:#183462!important;opacity:.95;font-weight:500;font-size:.8rem!important}::ng-deep .p-breadcrumb .p-breadcrumb-list .p-menuitem-text:hover{opacity:.7}.pl-3{padding-left:0rem!important}::ng-deep svg.p-icon{width:.7rem;height:1rem}.hover-color .text-base,.hover-color .icon-hover-color,.menu-option:hover .content-option-menu{color:#fff!important}::ng-deep .p-card .p-card-body{padding:0rem!important}::ng-deep .p-card .p-card-content{padding:0rem!important}::ng-deep .p-sidebar-left{z-index:1100!important}.btn-sistema{display:flex;align-items:center;justify-content:center;font-size:20px;font-weight:700;cursor:pointer;width:4rem;height:4rem;background-color:#002542;color:#fff;padding:.5rem;box-shadow:#00000059 0 0 4px;border-radius:.75rem;transition:box-shadow .3s ease-in-out}.btn-sistema:hover{opacity:.9;box-shadow:#0009 0 0 8px}.master-name{font-family:Inter var,Roboto,Arial,Helvetica,sans-serif!important;font-size:14px!important;font-weight:600;line-height:16.41px;text-align:center;color:#64748b}.empresa-name{font-family:Inter var,Roboto,Arial,Helvetica,sans-serif!important;font-size:12px!important;font-weight:300;line-height:14.06px;text-align:center;color:#1e293b}.top-layout-icons{color:#002542;font-size:1.5rem!important;cursor:pointer;border-radius:50%;transition:color .2s ease-in-out,background-color .2s ease-in-out,transform .2s ease-in-out}.top-layout-icons:hover{color:#fff;background-color:#002542}.overlay-background{position:fixed;top:0;left:0;width:100vw;height:100vh;background-color:#00000080;z-index:999}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i5$9.Breadcrumb, selector: "p-breadcrumb", inputs: ["model", "style", "styleClass", "home", "homeAriaLabel"], outputs: ["onItemClick"] }, { 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: i1$1.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "component", type: i1$1.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "style", "styleClass", "badgeClass", "ariaLabel", "autofocus"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: i8.Card, selector: "p-card", inputs: ["header", "subheader", "style", "styleClass"] }, { kind: "component", type: i10.Divider, selector: "p-divider", inputs: ["style", "styleClass", "layout", "type", "align"] }, { kind: "component", type: i10$1.OverlayPanel, selector: "p-overlayPanel", inputs: ["ariaLabel", "ariaLabelledBy", "dismissable", "showCloseIcon", "style", "styleClass", "appendTo", "autoZIndex", "ariaCloseLabel", "baseZIndex", "focusOnShow", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onShow", "onHide"] }, { kind: "directive", type: i2.Ripple, selector: "[pRipple]" }, { kind: "component", type: i12.Sidebar, selector: "p-sidebar", inputs: ["appendTo", "blockScroll", "style", "styleClass", "ariaCloseLabel", "autoZIndex", "baseZIndex", "modal", "dismissible", "showCloseIcon", "closeOnEscape", "transitionOptions", "visible", "position", "fullScreen"], outputs: ["onShow", "onHide", "visibleChange"] }, { kind: "directive", type: i13$1.StyleClass, selector: "[pStyleClass]", inputs: ["pStyleClass", "enterClass", "enterFromClass", "enterActiveClass", "enterToClass", "leaveClass", "leaveFromClass", "leaveActiveClass", "leaveToClass", "hideOnOutsideClick", "toggleClass", "hideOnEscape"] }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: DropdownMasterComponent, selector: "dropdown-master", inputs: ["formControlName", "masters"] }, { kind: "pipe", type: CpfCnpjPipe, name: "cpfCnpj" }] }); }
|
|
6096
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.8", type: KvLayoutComponent, selector: "kv-layout", inputs: { apps: { classPropertyName: "apps", publicName: "apps", isSignal: false, isRequired: false, transformFunction: null }, breadCrumbItems: { classPropertyName: "breadCrumbItems", publicName: "breadCrumbItems", isSignal: false, isRequired: false, transformFunction: null }, masters: { classPropertyName: "masters", publicName: "masters", isSignal: false, isRequired: false, transformFunction: null }, menus: { classPropertyName: "menus", publicName: "menus", isSignal: false, isRequired: false, transformFunction: null }, expandMenu: { classPropertyName: "expandMenu", publicName: "expandMenu", isSignal: true, isRequired: false, transformFunction: null }, logoMenuExpand: { classPropertyName: "logoMenuExpand", publicName: "logoMenuExpand", isSignal: false, isRequired: false, transformFunction: null }, logoMenuHide: { classPropertyName: "logoMenuHide", publicName: "logoMenuHide", isSignal: false, isRequired: false, transformFunction: null }, selectedApp: { classPropertyName: "selectedApp", publicName: "selectedApp", isSignal: false, isRequired: false, transformFunction: null }, selectedEmpresa: { classPropertyName: "selectedEmpresa", publicName: "selectedEmpresa", isSignal: false, isRequired: false, transformFunction: null }, selectedMaster: { classPropertyName: "selectedMaster", publicName: "selectedMaster", isSignal: false, isRequired: false, transformFunction: null }, showButtonApps: { classPropertyName: "showButtonApps", publicName: "showButtonApps", isSignal: false, isRequired: false, transformFunction: null }, showButtonUser: { classPropertyName: "showButtonUser", publicName: "showButtonUser", isSignal: false, isRequired: false, transformFunction: null }, showExpandMenu: { classPropertyName: "showExpandMenu", publicName: "showExpandMenu", isSignal: false, isRequired: false, transformFunction: null }, showDropdownLicenca: { classPropertyName: "showDropdownLicenca", publicName: "showDropdownLicenca", isSignal: false, isRequired: false, transformFunction: null }, showMenu: { classPropertyName: "showMenu", publicName: "showMenu", isSignal: false, isRequired: false, transformFunction: null }, showTrocaEmpresa: { classPropertyName: "showTrocaEmpresa", publicName: "showTrocaEmpresa", isSignal: false, isRequired: false, transformFunction: null }, userName: { classPropertyName: "userName", publicName: "userName", isSignal: false, isRequired: false, transformFunction: null }, masterName: { classPropertyName: "masterName", publicName: "masterName", isSignal: false, isRequired: false, transformFunction: null }, empresaName: { classPropertyName: "empresaName", publicName: "empresaName", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { expandMenu: "expandMenuChange", accessKeePassEmit: "accessKeePassEmit", changeEmpresaEmit: "changeEmpresaEmit", changeLicenseEmit: "changeLicenseEmit", expandMenuEmit: "expandMenuEmit", logoutEmit: "logoutEmit", selectAppEmit: "selectAppEmit", navigateToDefaultRouteEmit: "navigateToDefaultRouteEmit" }, host: { listeners: { "window:resize": "onWindowResize($event)" } }, queries: [{ propertyName: "topMenuActions", predicate: ["topMenuAction"], isSignal: true }], viewQueries: [{ propertyName: "meusDadosPanel", first: true, predicate: ["meusDadosPanel"], descendants: true }, { propertyName: "sidebarRef", first: true, predicate: ["sidebarRef"], descendants: true }, { propertyName: "sistemasPanel", first: true, predicate: ["sistemasPanel"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"flex flex-row overflow-y-hidden w- full-container\">\r\n <div\r\n [ngClass]=\"{ 'overlay-background': expandMenu() && widthPage() < 800 }\"\r\n ></div>\r\n @if (showMenu) {\r\n <div\r\n [style]=\"{\r\n minWidth: expandMenu() && widthPage() > 800 ? '17rem' : '3.65rem'\r\n }\"\r\n ></div>\r\n } @if(showMenu) {\r\n <p-sidebar\r\n #sidebarRef\r\n [visible]=\"true\"\r\n [showCloseIcon]=\"false\"\r\n [modal]=\"false\"\r\n [style]=\"{ width: expandMenu() ? '17rem' : '3.65rem' }\"\r\n class=\"sidebar-animation\"\r\n styleClass=\"transition-all\"\r\n >\r\n <ng-template pTemplate=\"headless\">\r\n <div class=\"flex flex-column overflow-hidden\">\r\n <div\r\n class=\"flex flex-column gap-2 justify-content-between flex-shrink-0 mx-2 overflow-hidden\"\r\n >\r\n <div\r\n class=\"flex {{\r\n expandMenu() ? 'flex-row' : 'flex-column'\r\n }} align-items-center {{\r\n expandMenu()\r\n ? 'justify-content-between'\r\n : 'justify-content-center'\r\n }} py-3\"\r\n >\r\n <!-- Logo para o menu expandido -->\r\n <img\r\n *ngIf=\"expandMenu() && logoMenuExpand\"\r\n alt=\"Card\"\r\n [src]=\"logoMenuExpand\"\r\n [style.height]=\"'3rem'\"\r\n width=\"auto\"\r\n class=\"cursor-pointer p-1\"\r\n (click)=\"navigateToDefaultRoute()\"\r\n />\r\n\r\n <!-- Logo para o menu minimizado-->\r\n <img\r\n *ngIf=\"!expandMenu() && logoMenuHide\"\r\n alt=\"Card\"\r\n [src]=\"logoMenuHide\"\r\n [style.height]=\"'3rem'\"\r\n width=\"auto\"\r\n class=\"mb-2 p-1\"\r\n (click)=\"navigateToDefaultRoute()\"\r\n />\r\n\r\n <!-- Toggle menu -->\r\n <span\r\n *ngIf=\"showExpandMenu\"\r\n class=\"material-symbols-outlined top-layout-icons p-1\"\r\n [pTooltip]=\"expandMenu() ? 'Ocultar Menu' : 'Expandir Menu'\"\r\n [tooltipPosition]=\"'right'\"\r\n (click)=\"toggleMenu()\"\r\n >\r\n menu\r\n </span>\r\n </div>\r\n\r\n @if(showTrocaEmpresa){\r\n <div\r\n class=\"flex flex-row align-items-center {{\r\n expandMenu()\r\n ? 'justify-content-between'\r\n : 'justify-content-center'\r\n }}\"\r\n >\r\n <div\r\n class=\"flex flex-column cursor-pointer\"\r\n *ngIf=\"expandMenu() && selectedEmpresa\"\r\n (click)=\"changeEmpresa($event)\"\r\n >\r\n <span\r\n class=\"text-sm font-semibold mr-2\"\r\n [pTooltip]=\"this.selectedEmpresa.razaosocial\"\r\n [tooltipPosition]=\"'right'\"\r\n >\r\n {{ nameEmpresa(this.selectedEmpresa.razaosocial) }}\r\n </span>\r\n <span class=\"text-sm mt-1\">{{\r\n this.selectedEmpresa.cpfcnpj | cpfCnpj\r\n }}</span>\r\n </div>\r\n\r\n <button\r\n pButton\r\n class=\"p-button-rounded p-button-text padding-style h-2rem w-2rem hover:bg-green-600 hover:text-white icon-menu\"\r\n (click)=\"changeEmpresa($event)\"\r\n [pTooltip]=\"'Trocar de empresa'\"\r\n [tooltipPosition]=\"'right'\"\r\n >\r\n <i class=\"material-symbols-outlined\"> sync_alt </i>\r\n </button>\r\n </div>\r\n <p-divider type=\"solid\"></p-divider>\r\n }\r\n </div>\r\n\r\n <div class=\"list-none m-0 card-container overflow-y-auto max-h-full\">\r\n <!-- menus -->\r\n <li\r\n *ngFor=\"let menu of menus; let i = index\"\r\n [class]=\"expandMenu() ? 'px-2' : 'px-1'\"\r\n >\r\n <!-- menu que n\u00E3o tem filho -->\r\n <a\r\n (click)=\"callRoute(menu.link)\"\r\n *ngIf=\"\r\n !menu.indmenupai && (!menu.idmenupai || menu.idmenupai == 0)\r\n \"\r\n pRipple\r\n [pTooltip]=\"!expandMenu() ? menu.descricaomenu : ''\"\r\n [tooltipPosition]=\"'right'\"\r\n class=\"menu-option\"\r\n [style.background-color]=\"menu.bgColor\"\r\n [class.justify-content-center]=\"!expandMenu()\"\r\n >\r\n <i\r\n class=\"content-option-menu material-symbols-outlined icon-menu {{\r\n expandMenu() ? 'ml-1 mr-2' : ''\r\n }} icon-hover-color {{ menu.textColor }}\"\r\n *ngIf=\"menu.icone\"\r\n >\r\n {{ menu.icone }}\r\n </i>\r\n <span\r\n class=\"content-option-menu text-base text-blue-900 font-semibold {{\r\n menu.textColor\r\n }}\"\r\n *ngIf=\"expandMenu()\"\r\n >{{ menu.descricaomenu }}</span\r\n >\r\n </a>\r\n <!-- menu com filho -->\r\n <div *ngIf=\"menu.indmenupai\">\r\n <a\r\n pRipple\r\n pStyleClass=\"@next\"\r\n enterClass=\"hidden\"\r\n enterActiveClass=\"slidedown\"\r\n leaveToClass=\"hidden\"\r\n leaveActiveClass=\"slideup\"\r\n [style.background-color]=\"\r\n isSelectedMenuPai(menu) ? 'rgb(41, 185, 45)' : 'white'\r\n \"\r\n class=\"menu-option {{\r\n !expandMenu()\r\n ? 'justify-content-center'\r\n : 'justify-content-between'\r\n }} \"\r\n [tooltipPosition]=\"'right'\"\r\n [pTooltip]=\"!expandMenu() ? menu.descricaomenu : ''\"\r\n (click)=\"\r\n expandMenu.set(!expandMenu() ? !expandMenu() : expandMenu())\r\n \"\r\n >\r\n <div class=\"flex flex-row align-items-center\">\r\n <i\r\n class=\"content-option-menu material-symbols-outlined icon-menu {{\r\n expandMenu() ? 'ml-1 mr-2' : ''\r\n }} icon-hover-color\"\r\n *ngIf=\"menu.icone\"\r\n [class.text-white]=\"isSelectedMenuPai(menu)\"\r\n >\r\n {{ menu.icone }}\r\n </i>\r\n <span\r\n class=\"text-base text-blue-900 font-semibold content-option-menu\"\r\n *ngIf=\"expandMenu()\"\r\n >{{ menu.descricaomenu }}</span\r\n >\r\n </div>\r\n <span\r\n class=\"pi pi-chevron-down text-blue-900 mr-1 icon-hover-color content-option-menu\"\r\n *ngIf=\"expandMenu()\"\r\n ></span>\r\n </a>\r\n\r\n <!-- filhos -->\r\n <div\r\n class=\"list-none py-0 pl-3 pr-0 m-0 {{\r\n !(\r\n menuSelecionado()?.idmenupai == menu.idmenu &&\r\n this.expandMenu()\r\n ) && 'hidden'\r\n }} overflow-y-hidden transition-all transition-duration-400 transition-ease-in-out\"\r\n >\r\n <li\r\n *ngFor=\"\r\n let filho of returnMenuChild(menu.idmenu);\r\n let iFilho = index\r\n \"\r\n >\r\n <a\r\n *ngIf=\"expandMenu()\"\r\n (click)=\"callRoute(filho.link)\"\r\n pRipple\r\n class=\"menu-option\"\r\n [style.background-color]=\"filho.bgColor\"\r\n >\r\n <i\r\n class=\"content-option-menu material-symbols-outlined icon-menu {{\r\n expandMenu() ? 'ml-1 mr-2' : ''\r\n }} icon-hover-color\"\r\n *ngIf=\"filho.icone\"\r\n >\r\n {{ filho.icone }}\r\n </i>\r\n <span\r\n class=\"content-option-menu text-medium text-blue-900 ml-4 {{\r\n filho.textColor\r\n }}\"\r\n *ngIf=\"expandMenu()\"\r\n >{{ filho.descricaomenu }}</span\r\n >\r\n </a>\r\n </li>\r\n </div>\r\n </div>\r\n </li>\r\n </div>\r\n </div>\r\n </ng-template>\r\n </p-sidebar>\r\n }\r\n\r\n <!-- Topbar -->\r\n <div\r\n class=\"w-auto h-screen page-content overflow-y-hidden flex flex-column\"\r\n id=\"page-content\"\r\n style=\"width: 100vw !important\"\r\n >\r\n <div\r\n class=\"flex flex-row flex-wrap align-items-center justify-content-between m-2 mb-0 gap-1\"\r\n >\r\n @if(!showMenu) {\r\n <!-- Logo home -->\r\n <div>\r\n <img [src]=\"logoMenuExpand\" width=\"150\" />\r\n </div>\r\n } @else {\r\n <!-- Breadcrumbs -->\r\n <div>\r\n <p class=\"text-xl font-semibold text-blue-900 breadcrumb-title\">\r\n {{\r\n breadCrumbItems[breadCrumbItems.length - 1] &&\r\n breadCrumbItems[breadCrumbItems.length - 1].label\r\n ? breadCrumbItems[breadCrumbItems.length - 1].label\r\n : \"\"\r\n }}\r\n </p>\r\n <p-breadcrumb\r\n *ngIf=\"widthCard > 400\"\r\n styleClass=\"border-none p-0 flex align-items-center h-2rem !important;\"\r\n [model]=\"breadCrumbItems\"\r\n [style]=\"{ backgroundColor: '#eaeaea' }\"\r\n (onItemClick)=\"callRoute($event.item.routerLink, true)\"\r\n ></p-breadcrumb>\r\n </div>\r\n } @if (exibirNomes) { @if(widthCard >= 517) {\r\n <div\r\n class=\"w-auto flex flex-column justify-content-center align-items-center gap-2\"\r\n >\r\n @if (masterName) { <span class=\"master-name\">{{ masterName }}</span> }\r\n @if (empresaName) {<span class=\"empresa-name\">{{ empresaName }}</span> }\r\n </div>\r\n\r\n <div\r\n class=\"w-auto flex flex-row justify-content-center align-items-center gap-2\"\r\n >\r\n <!-- Navega\u00E7\u00E3o de sistemas e usu\u00E1rios -->\r\n @for (topAction of topMenuActions(); track $index) {\r\n <ng-container *ngTemplateOutlet=\"topAction\" />\r\n }\r\n\r\n <span\r\n *ngIf=\"showButtonApps\"\r\n class=\"material-symbols-outlined top-layout-icons p-1\"\r\n [pTooltip]=\"'Sistemas'\"\r\n [tooltipPosition]=\"'left'\"\r\n (click)=\"sistemasPanel.toggle($event)\"\r\n >\r\n apps\r\n </span>\r\n\r\n <span\r\n *ngIf=\"showButtonUser\"\r\n class=\"material-symbols-outlined top-layout-icons p-1\"\r\n [pTooltip]=\"'Menu do Usu\u00E1rio'\"\r\n [tooltipPosition]=\"'left'\"\r\n (click)=\"meusDadosPanel.toggle($event)\"\r\n >\r\n person\r\n </span>\r\n </div>\r\n } @else {\r\n <div\r\n class=\"w-auto flex flex-row justify-content-center align-items-center gap-2\"\r\n >\r\n <!-- Navega\u00E7\u00E3o de sistemas e usu\u00E1rios -->\r\n @for (topAction of topMenuActions(); track $index) {\r\n <ng-container *ngTemplateOutlet=\"topAction\" />\r\n }\r\n\r\n <span\r\n *ngIf=\"showButtonApps\"\r\n class=\"material-symbols-outlined top-layout-icons p-1\"\r\n [pTooltip]=\"'Sistemas'\"\r\n [tooltipPosition]=\"'left'\"\r\n (click)=\"sistemasPanel.toggle($event)\"\r\n >\r\n apps\r\n </span>\r\n\r\n <span\r\n *ngIf=\"showButtonUser\"\r\n class=\"material-symbols-outlined top-layout-icons p-1\"\r\n [pTooltip]=\"'Menu do Usu\u00E1rio'\"\r\n [tooltipPosition]=\"'left'\"\r\n (click)=\"meusDadosPanel.toggle($event)\"\r\n >\r\n person\r\n </span>\r\n </div>\r\n\r\n <div\r\n class=\"w-auto flex flex-column justify-content-center align-items-center gap-2\"\r\n >\r\n @if (masterName) { <span class=\"master-name\">{{ masterName }}</span> }\r\n @if (empresaName) {<span class=\"empresa-name\">{{ empresaName }}</span> }\r\n </div>\r\n } } @else { @if(widthPage() > 992){\r\n <!-- dropdown para sele\u00E7\u00E3o de empresa/licenca -->\r\n <dropdown-master\r\n *ngIf=\"showLicencas()\"\r\n class=\"max-w-25rem\"\r\n formControlName=\"idmaster\"\r\n [formGroup]=\"formGroup\"\r\n [masters]=\"masters\"\r\n (onSelectionChange)=\"changeLicense($event)\"\r\n (onSelectionValue)=\"changeLicense($event)\"\r\n >\r\n </dropdown-master>\r\n }\r\n\r\n <!-- Navega\u00E7\u00E3o de sistemas e usu\u00E1rios -->\r\n <div class=\"w-auto flex flex-row align-items-center gap-2\">\r\n @for (topAction of topMenuActions(); track $index) {\r\n <ng-container *ngTemplateOutlet=\"topAction\" />\r\n }\r\n\r\n <span\r\n *ngIf=\"showButtonApps\"\r\n class=\"material-symbols-outlined top-layout-icons p-1\"\r\n [pTooltip]=\"'Sistemas'\"\r\n [tooltipPosition]=\"'left'\"\r\n (click)=\"sistemasPanel.toggle($event)\"\r\n >\r\n apps\r\n </span>\r\n\r\n <span\r\n *ngIf=\"showButtonUser\"\r\n class=\"material-symbols-outlined top-layout-icons p-1\"\r\n [pTooltip]=\"'Menu do Usu\u00E1rio'\"\r\n [tooltipPosition]=\"'left'\"\r\n (click)=\"meusDadosPanel.toggle($event)\"\r\n >\r\n person\r\n </span>\r\n </div>\r\n\r\n @if(widthPage() < 992){\r\n <!-- dropdown para sele\u00E7\u00E3o de empresa/licenca -->\r\n <dropdown-master\r\n *ngIf=\"showLicencas()\"\r\n class=\"w-full\"\r\n formControlName=\"idmaster\"\r\n [formGroup]=\"formGroup\"\r\n [masters]=\"masters\"\r\n (onSelectionChange)=\"changeLicense($event)\"\r\n (onSelectionValue)=\"changeLicense($event)\"\r\n >\r\n </dropdown-master>\r\n } }\r\n </div>\r\n\r\n <!-- Container -->\r\n <div class=\"overflow-hidden flex-1 p-2\">\r\n <p-card\r\n styleClass=\"overflow-y-auto h-full max-h-full {{\r\n !showMenu && 'sm:overflow-y-hidden'\r\n }} card-container\"\r\n >\r\n <ng-content></ng-content>\r\n </p-card>\r\n </div>\r\n </div>\r\n\r\n <!-- Painel de aplicativos -->\r\n <p-overlayPanel\r\n #sistemasPanel\r\n [showTransitionOptions]=\"'350ms ease-out'\"\r\n [hideTransitionOptions]=\"'250ms ease-in'\"\r\n >\r\n <ng-template pTemplate=\"container\">\r\n <p class=\"title-style mt-3\">Sistemas</p>\r\n\r\n <div\r\n class=\"flex flex-row flex-wrap gap-3 align-items-center justify-content-center mt-5 mb-3\"\r\n style=\"width: 270px; height: 100%\"\r\n >\r\n @for (aplicativo of apps; track $index) { @if(aplicativo.urlicone ==\r\n \"https://work-assets.keevo.com.br/img/icone-keevocenter.png\") {\r\n <div\r\n class=\"btn-sistema text-xl md:text-3xl flex align-items-center justify-content-center\"\r\n (click)=\"selectApp(aplicativo.idaplicativo)\"\r\n [pTooltip]=\"aplicativo?.descricaoaplicativo\"\r\n [tooltipPosition]=\"'left'\"\r\n >\r\n {{ aplicativo.descricaoaplicativo.charAt(0).toLocaleUpperCase() }}\r\n </div>\r\n } @else {\r\n <img\r\n [src]=\"aplicativo.urlicone\"\r\n class=\"btn-sistema flex align-items-center justify-content-center\"\r\n [pTooltip]=\"aplicativo?.descricaoaplicativo\"\r\n [tooltipPosition]=\"'left'\"\r\n (click)=\"selectApp(aplicativo.idaplicativo)\"\r\n />\r\n } }\r\n\r\n <!-- <button\r\n *ngFor=\"let aplicativo of apps\"\r\n pButton\r\n pRipple\r\n class=\"btn-sistema-2 btn-sistema hover-btn-cor-padrao remove-focus h-4rem w-4rem\"\r\n [pTooltip]=\"aplicativo?.descricaoaplicativo\"\r\n [tooltipPosition]=\"'left'\"\r\n (click)=\"selectApp(aplicativo.idaplicativo)\"\r\n >\r\n {{ aplicativo.nomeaplicativo.charAt(0).toUpperCase() }}\r\n </button> -->\r\n </div>\r\n </ng-template>\r\n </p-overlayPanel>\r\n\r\n <!-- Painel do usu\u00E1rio -->\r\n <p-overlayPanel\r\n #meusDadosPanel\r\n [showTransitionOptions]=\"'350ms ease-out'\"\r\n [hideTransitionOptions]=\"'250ms ease-in'\"\r\n >\r\n <ng-template pTemplate=\"container\">\r\n <p class=\"title-style mt-3\">\r\n Ol\u00E1, {{ userName ? userName.split(\" \")[0] : \"Usu\u00E1rio\" }}!\r\n </p>\r\n <div class=\"mt-5 mb-3\"></div>\r\n\r\n <p-button\r\n icon=\"pi pi-lock\"\r\n label=\"Acessar Keepass\"\r\n (onClick)=\"accessKeePass($event)\"\r\n styleClass=\"border-noround w-full text-blue-900 text-sm\"\r\n [text]=\"true\"\r\n >\r\n </p-button>\r\n\r\n <p-button\r\n icon=\"pi pi-sign-out\"\r\n label=\"Sair\"\r\n (onClick)=\"logout($event)\"\r\n styleClass=\"border-noround w-full text-blue-900 text-sm\"\r\n [text]=\"true\"\r\n >\r\n </p-button>\r\n </ng-template>\r\n </p-overlayPanel>\r\n</div>\r\n", styles: [".material-icons{font-family:Material Icons;font-weight:400;font-style:normal;font-size:1em;display:inline-block;width:1em;height:1em;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:\"liga\"}::ng-deep .p-button:focus{box-shadow:none;-webkit-box-shadow:none;-moz-box-shadow:none}::ng-deep .p-overlaypanel .p-overlaypanel-content{padding:0}::ng-deep .hover-btn-cor-padrao.p-button:enabled:hover{background:#0c3e66;border-color:#002542}.p-button.p-button-icon-only.p-button-rounded{background:#0c3e66;border-color:#002542}::ng-deep .remove-focus:focus{border:none}::ng-deep .p-sidebar .p-sidebar-content{padding:0}::ng-deep .sidebar-header-sistema.p-sidebar .p-sidebar-header{padding-top:.5rem;padding-right:0;padding-bottom:0;padding-left:0;display:block}::ng-deep .p-sidebar .p-sidebar-header{padding:0rem!important}::ng-deep body{margin:0!important}::ng-deep .p-breadcrumb ul li.p-breadcrumb-chevron{position:relative;top:3px;color:#0c3e66!important}.page-content{background:linear-gradient(to bottom,#eaeaea 17%,#fff 19%)}*{margin:0}p .item-menu{color:#0c3e66;font-family:Inter var,Roboto,Arial,Helvetica,sans-serif!important}span{font-size:.825rem!important}.breadcrumb-title{font-size:1rem!important;font-family:Inter var,Roboto,Arial,Helvetica,sans-serif!important}::ng-deep .home-style{background-color:#eaeaea;overflow:hidden}::ng-deep .page-style{overflow:auto!important}::ng-deep .card-container{overflow-x:hidden}::ng-deep .card-container::-webkit-scrollbar{width:6px}::ng-deep .card-container::-webkit-scrollbar:hover{background-color:#dededebf}::ng-deep .card-container::-webkit-scrollbar-thumb{border-radius:4px;background-color:transparent}::ng-deep .card-container:hover::-webkit-scrollbar-thumb{border-left:2px solid white;background-color:#00000080}::ng-deep .card-container::-webkit-scrollbar-track{border-left:2px solid white;background-color:#dededebf}.title-style{position:relative;top:10px;margin-left:20px;font-size:1.25rem;color:#002542;border-bottom:2px solid green;font-weight:600;display:inline}::ng-deep p-sidebar .p-sidebar-content{overflow-y:hidden}::ng-deep p-dialog .p-dialog-content{overflow-y:unset}.icon-menu{font-size:1.3rem;color:#002542;display:flex;justify-content:center;align-items:center}::ng-deep .menu-option{padding:.8rem!important;display:flex;align-items:center;cursor:pointer;border-radius:.5rem;transition-duration:150;transition-property:color,background-color;padding:.5rem}::ng-deep .menu-option:hover{background-color:#29b92d!important;color:#fff}::ng-deep .p-breadcrumb .p-breadcrumb-list .p-menuitem-text{color:#183462!important;opacity:.95;font-weight:500;font-size:.8rem!important}::ng-deep .p-breadcrumb .p-breadcrumb-list .p-menuitem-text:hover{opacity:.7}.pl-3{padding-left:0rem!important}::ng-deep svg.p-icon{width:.7rem;height:1rem}.hover-color .text-base,.hover-color .icon-hover-color,.menu-option:hover .content-option-menu{color:#fff!important}::ng-deep .p-card .p-card-body{padding:0rem!important}::ng-deep .p-card .p-card-content{padding:0rem!important}::ng-deep .p-sidebar-left{z-index:1100!important}.btn-sistema{display:flex;align-items:center;justify-content:center;font-size:20px;font-weight:700;cursor:pointer;width:4rem;height:4rem;background-color:#002542;color:#fff;padding:.5rem;box-shadow:#00000059 0 0 4px;border-radius:.75rem;transition:box-shadow .3s ease-in-out}.btn-sistema:hover{opacity:.9;box-shadow:#0009 0 0 8px}.master-name{font-family:Inter var,Roboto,Arial,Helvetica,sans-serif!important;font-size:14px!important;font-weight:600;line-height:16.41px;text-align:center;color:#64748b}.empresa-name{font-family:Inter var,Roboto,Arial,Helvetica,sans-serif!important;font-size:12px!important;font-weight:300;line-height:14.06px;text-align:center;color:#1e293b}.top-layout-icons{color:#002542;font-size:1.5rem!important;cursor:pointer;border-radius:50%;transition:color .2s ease-in-out,background-color .2s ease-in-out,transform .2s ease-in-out}.top-layout-icons:hover{color:#fff;background-color:#002542}.overlay-background{position:fixed;top:0;left:0;width:100vw;height:100vh;background-color:#00000080;z-index:999}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i5$9.Breadcrumb, selector: "p-breadcrumb", inputs: ["model", "style", "styleClass", "home", "homeAriaLabel"], outputs: ["onItemClick"] }, { 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: i1$1.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "component", type: i1$1.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "style", "styleClass", "badgeClass", "ariaLabel", "autofocus"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: i8.Card, selector: "p-card", inputs: ["header", "subheader", "style", "styleClass"] }, { kind: "component", type: i10.Divider, selector: "p-divider", inputs: ["style", "styleClass", "layout", "type", "align"] }, { kind: "component", type: i10$1.OverlayPanel, selector: "p-overlayPanel", inputs: ["ariaLabel", "ariaLabelledBy", "dismissable", "showCloseIcon", "style", "styleClass", "appendTo", "autoZIndex", "ariaCloseLabel", "baseZIndex", "focusOnShow", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onShow", "onHide"] }, { kind: "directive", type: i2.Ripple, selector: "[pRipple]" }, { kind: "component", type: i12.Sidebar, selector: "p-sidebar", inputs: ["appendTo", "blockScroll", "style", "styleClass", "ariaCloseLabel", "autoZIndex", "baseZIndex", "modal", "dismissible", "showCloseIcon", "closeOnEscape", "transitionOptions", "visible", "position", "fullScreen"], outputs: ["onShow", "onHide", "visibleChange"] }, { kind: "directive", type: i13$1.StyleClass, selector: "[pStyleClass]", inputs: ["pStyleClass", "enterClass", "enterFromClass", "enterActiveClass", "enterToClass", "leaveClass", "leaveFromClass", "leaveActiveClass", "leaveToClass", "hideOnOutsideClick", "toggleClass", "hideOnEscape"] }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: DropdownMasterComponent, selector: "dropdown-master", inputs: ["formControlName", "masters"] }, { kind: "pipe", type: CpfCnpjPipe, name: "cpfCnpj" }] }); }
|
|
6082
6097
|
}
|
|
6083
6098
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvLayoutComponent, decorators: [{
|
|
6084
6099
|
type: Component,
|
|
6085
|
-
args: [{ selector: 'kv-layout', template: "<div class=\"flex flex-row overflow-y-hidden w- full-container\">\r\n <div\r\n [ngClass]=\"{ 'overlay-background': expandMenu() && widthPage() < 800 }\"\r\n ></div>\r\n @if (showMenu) {\r\n <div\r\n [style]=\"{\r\n minWidth: expandMenu() && widthPage() > 800 ? '17rem' : '3.65rem'\r\n }\"\r\n ></div>\r\n } @if(showMenu) {\r\n <p-sidebar\r\n #sidebarRef\r\n [visible]=\"true\"\r\n [showCloseIcon]=\"false\"\r\n [modal]=\"false\"\r\n [style]=\"{ width: expandMenu() ? '17rem' : '3.65rem' }\"\r\n class=\"sidebar-animation\"\r\n styleClass=\"transition-all\"\r\n >\r\n <ng-template pTemplate=\"headless\">\r\n <div class=\"flex flex-column overflow-hidden\">\r\n <div\r\n class=\"flex flex-column gap-2 justify-content-between flex-shrink-0 mx-2 overflow-hidden\"\r\n >\r\n <div\r\n class=\"flex {{\r\n expandMenu() ? 'flex-row' : 'flex-column'\r\n }} align-items-center {{\r\n expandMenu()\r\n ? 'justify-content-between'\r\n : 'justify-content-center'\r\n }} py-3\"\r\n >\r\n <!-- Logo para o menu expandido -->\r\n <img\r\n *ngIf=\"expandMenu() && logoMenuExpand\"\r\n alt=\"Card\"\r\n [src]=\"logoMenuExpand\"\r\n [style.height]=\"'3rem'\"\r\n width=\"auto\"\r\n class=\"cursor-pointer p-1\"\r\n (click)=\"navigateToDefaultRoute()\"\r\n />\r\n\r\n <!-- Logo para o menu minimizado-->\r\n <img\r\n *ngIf=\"!expandMenu() && logoMenuHide\"\r\n alt=\"Card\"\r\n [src]=\"logoMenuHide\"\r\n [style.height]=\"'3rem'\"\r\n width=\"auto\"\r\n class=\"mb-2 p-1\"\r\n (click)=\"navigateToDefaultRoute()\"\r\n />\r\n\r\n <!-- Toggle menu -->\r\n <span\r\n *ngIf=\"showExpandMenu\"\r\n class=\"material-symbols-outlined top-layout-icons p-1\"\r\n [pTooltip]=\"expandMenu() ? 'Ocultar Menu' : 'Expandir Menu'\"\r\n [tooltipPosition]=\"'right'\"\r\n (click)=\"toggleMenu()\"\r\n >\r\n menu\r\n </span>\r\n </div>\r\n\r\n @if(showTrocaEmpresa){\r\n <div\r\n class=\"flex flex-row align-items-center {{\r\n expandMenu()\r\n ? 'justify-content-between'\r\n : 'justify-content-center'\r\n }}\"\r\n >\r\n <div\r\n class=\"flex flex-column cursor-pointer\"\r\n *ngIf=\"expandMenu() && selectedEmpresa\"\r\n (click)=\"changeEmpresa($event)\"\r\n >\r\n <span\r\n class=\"text-sm font-semibold mr-2\"\r\n [pTooltip]=\"this.selectedEmpresa.razaosocial\"\r\n [tooltipPosition]=\"'right'\"\r\n >\r\n {{ nameEmpresa(this.selectedEmpresa.razaosocial) }}\r\n </span>\r\n <span class=\"text-sm mt-1\">{{\r\n this.selectedEmpresa.cpfcnpj | cpfCnpj\r\n }}</span>\r\n </div>\r\n\r\n <button\r\n pButton\r\n class=\"p-button-rounded p-button-text padding-style h-2rem w-2rem hover:bg-green-600 hover:text-white icon-menu\"\r\n (click)=\"changeEmpresa($event)\"\r\n [pTooltip]=\"'Trocar de empresa'\"\r\n [tooltipPosition]=\"'right'\"\r\n >\r\n <i class=\"material-symbols-outlined\"> sync_alt </i>\r\n </button>\r\n </div>\r\n <p-divider type=\"solid\"></p-divider>\r\n }\r\n </div>\r\n\r\n <div class=\"list-none m-0 card-container overflow-y-auto max-h-full\">\r\n <!-- menus -->\r\n <li\r\n *ngFor=\"let menu of menus; let i = index\"\r\n [class]=\"expandMenu() ? 'px-2' : 'px-1'\"\r\n >\r\n <!-- menu que n\u00E3o tem filho -->\r\n <a\r\n (click)=\"callRoute(menu.link)\"\r\n *ngIf=\"\r\n !menu.indmenupai && (!menu.idmenupai || menu.idmenupai == 0)\r\n \"\r\n pRipple\r\n [pTooltip]=\"!expandMenu() ? menu.descricaomenu : ''\"\r\n [tooltipPosition]=\"'right'\"\r\n class=\"menu-option\"\r\n [style.background-color]=\"menu.bgColor\"\r\n [class.justify-content-center]=\"!expandMenu()\"\r\n >\r\n <i\r\n class=\"content-option-menu material-symbols-outlined icon-menu {{\r\n expandMenu() ? 'ml-1 mr-2' : ''\r\n }} icon-hover-color {{ menu.textColor }}\"\r\n *ngIf=\"menu.icone\"\r\n >\r\n {{ menu.icone }}\r\n </i>\r\n <span\r\n class=\"content-option-menu text-base text-blue-900 font-semibold {{\r\n menu.textColor\r\n }}\"\r\n *ngIf=\"expandMenu()\"\r\n >{{ menu.descricaomenu }}</span\r\n >\r\n </a>\r\n <!-- menu com filho -->\r\n <div *ngIf=\"menu.indmenupai\">\r\n <a\r\n pRipple\r\n pStyleClass=\"@next\"\r\n enterClass=\"hidden\"\r\n enterActiveClass=\"slidedown\"\r\n leaveToClass=\"hidden\"\r\n leaveActiveClass=\"slideup\"\r\n [style.background-color]=\"isSelectedMenuPai(menu) ? 'rgb(41, 185, 45)' : 'white'\"\r\n\r\n class=\"menu-option {{\r\n !expandMenu()\r\n ? 'justify-content-center'\r\n : 'justify-content-between'\r\n }} \"\r\n [tooltipPosition]=\"'right'\"\r\n [pTooltip]=\"!expandMenu() ? menu.descricaomenu : ''\"\r\n (click)=\"\r\n expandMenu.set(!expandMenu() ? !expandMenu() : expandMenu())\r\n \"\r\n >\r\n <div class=\"flex flex-row align-items-center\">\r\n <i\r\n class=\"content-option-menu material-symbols-outlined icon-menu {{\r\n expandMenu() ? 'ml-1 mr-2' : ''\r\n }} icon-hover-color\"\r\n *ngIf=\"menu.icone\"\r\n [class.text-white]=\"isSelectedMenuPai(menu)\"\r\n >\r\n {{ menu.icone }}\r\n </i>\r\n <span\r\n class=\"text-base text-blue-900 font-semibold content-option-menu\"\r\n *ngIf=\"expandMenu()\"\r\n >{{ menu.descricaomenu }}</span\r\n >\r\n </div>\r\n <span\r\n class=\"pi pi-chevron-down text-blue-900 mr-1 icon-hover-color content-option-menu\"\r\n *ngIf=\"expandMenu()\"\r\n ></span>\r\n </a>\r\n\r\n <!-- filhos -->\r\n <div\r\n class=\"list-none py-0 pl-3 pr-0 m-0 {{\r\n !(\r\n menuSelecionado()?.idmenupai == menu.idmenu &&\r\n this.expandMenu()\r\n ) && 'hidden'\r\n }} overflow-y-hidden transition-all transition-duration-400 transition-ease-in-out\"\r\n >\r\n <li\r\n *ngFor=\"\r\n let filho of returnMenuChild(menu.idmenu);\r\n let iFilho = index\r\n \"\r\n >\r\n <a\r\n *ngIf=\"expandMenu()\"\r\n (click)=\"callRoute(filho.link)\"\r\n pRipple\r\n class=\"menu-option\"\r\n [style.background-color]=\"filho.bgColor\"\r\n >\r\n <i\r\n class=\"content-option-menu material-symbols-outlined icon-menu {{\r\n expandMenu() ? 'ml-1 mr-2' : ''\r\n }} icon-hover-color\"\r\n *ngIf=\"filho.icone\"\r\n >\r\n {{ filho.icone }}\r\n </i>\r\n <span\r\n class=\"content-option-menu text-medium text-blue-900 ml-4 {{\r\n filho.textColor\r\n }}\"\r\n *ngIf=\"expandMenu()\"\r\n >{{ filho.descricaomenu }}</span\r\n >\r\n </a>\r\n </li>\r\n </div>\r\n </div>\r\n </li>\r\n </div>\r\n </div>\r\n </ng-template>\r\n </p-sidebar>\r\n }\r\n\r\n <!-- Topbar -->\r\n <div\r\n class=\"w-auto h-screen page-content overflow-y-hidden flex flex-column\"\r\n id=\"page-content\"\r\n style=\"width: 100vw !important\"\r\n >\r\n <div\r\n class=\"flex flex-row flex-wrap align-items-center justify-content-between m-2 md:m-3\"\r\n >\r\n @if(!showMenu) {\r\n <!-- Logo home -->\r\n <div>\r\n <img [src]=\"logoMenuExpand\" width=\"150\" />\r\n </div>\r\n } @else {\r\n <!-- Breadcrumbs -->\r\n <div>\r\n <p class=\"text-xl font-semibold text-blue-900 breadcrumb-title\">\r\n {{\r\n breadCrumbItems[breadCrumbItems.length - 1] &&\r\n breadCrumbItems[breadCrumbItems.length - 1].label\r\n ? breadCrumbItems[breadCrumbItems.length - 1].label\r\n : \"\"\r\n }}\r\n </p>\r\n <p-breadcrumb\r\n *ngIf=\"widthCard > 400\"\r\n styleClass=\"border-none p-0 flex align-items-center h-2rem !important;\"\r\n [model]=\"breadCrumbItems\"\r\n [style]=\"{ backgroundColor: '#eaeaea' }\"\r\n (onItemClick)=\"callRoute($event.item.routerLink, true)\"\r\n ></p-breadcrumb>\r\n </div>\r\n } @if (exibirNomes) { @if(widthCard >= 517) {\r\n <div\r\n class=\"w-auto flex flex-column justify-content-center align-items-center gap-2\"\r\n >\r\n @if (masterName) { <span class=\"master-name\">{{ masterName }}</span> }\r\n @if (empresaName) {<span class=\"empresa-name\">{{ empresaName }}</span> }\r\n </div>\r\n\r\n <div\r\n class=\"w-auto flex flex-row justify-content-center align-items-center gap-2\"\r\n >\r\n <!-- Navega\u00E7\u00E3o de sistemas e usu\u00E1rios -->\r\n @for (topAction of topMenuActions(); track $index) {\r\n <ng-container *ngTemplateOutlet=\"topAction\" />\r\n }\r\n\r\n <span\r\n *ngIf=\"showButtonApps\"\r\n class=\"material-symbols-outlined top-layout-icons p-1\"\r\n [pTooltip]=\"'Sistemas'\"\r\n [tooltipPosition]=\"'left'\"\r\n (click)=\"sistemasPanel.toggle($event)\"\r\n >\r\n apps\r\n </span>\r\n\r\n <span\r\n *ngIf=\"showButtonUser\"\r\n class=\"material-symbols-outlined top-layout-icons p-1\"\r\n [pTooltip]=\"'Menu do Usu\u00E1rio'\"\r\n [tooltipPosition]=\"'left'\"\r\n (click)=\"meusDadosPanel.toggle($event)\"\r\n >\r\n person\r\n </span>\r\n </div>\r\n } @else {\r\n <div\r\n class=\"w-auto flex flex-row justify-content-center align-items-center gap-2\"\r\n >\r\n <!-- Navega\u00E7\u00E3o de sistemas e usu\u00E1rios -->\r\n @for (topAction of topMenuActions(); track $index) {\r\n <ng-container *ngTemplateOutlet=\"topAction\" />\r\n }\r\n\r\n <span\r\n *ngIf=\"showButtonApps\"\r\n class=\"material-symbols-outlined top-layout-icons p-1\"\r\n [pTooltip]=\"'Sistemas'\"\r\n [tooltipPosition]=\"'left'\"\r\n (click)=\"sistemasPanel.toggle($event)\"\r\n >\r\n apps\r\n </span>\r\n\r\n <span\r\n *ngIf=\"showButtonUser\"\r\n class=\"material-symbols-outlined top-layout-icons p-1\"\r\n [pTooltip]=\"'Menu do Usu\u00E1rio'\"\r\n [tooltipPosition]=\"'left'\"\r\n (click)=\"meusDadosPanel.toggle($event)\"\r\n >\r\n person\r\n </span>\r\n </div>\r\n\r\n <div\r\n class=\"w-auto flex flex-column justify-content-center align-items-center gap-2\"\r\n >\r\n @if (masterName) { <span class=\"master-name\">{{ masterName }}</span> }\r\n @if (empresaName) {<span class=\"empresa-name\">{{ empresaName }}</span> }\r\n </div>\r\n } } @else { @if(widthPage() > 992){\r\n <!-- dropdown para sele\u00E7\u00E3o de empresa/licenca -->\r\n <dropdown-master\r\n *ngIf=\"showLicencas()\"\r\n class=\"max-w-25rem\"\r\n formControlName=\"idmaster\"\r\n [formGroup]=\"formGroup\"\r\n [masters]=\"masters\"\r\n (onSelectionChange)=\"changeLicense($event)\"\r\n (onSelectionValue)=\"changeLicense($event)\"\r\n >\r\n </dropdown-master>\r\n }\r\n\r\n <!-- Navega\u00E7\u00E3o de sistemas e usu\u00E1rios -->\r\n <div class=\"w-auto flex flex-row align-items-center gap-2\">\r\n @for (topAction of topMenuActions(); track $index) {\r\n <ng-container *ngTemplateOutlet=\"topAction\" />\r\n }\r\n\r\n <span\r\n *ngIf=\"showButtonApps\"\r\n class=\"material-symbols-outlined top-layout-icons p-1\"\r\n [pTooltip]=\"'Sistemas'\"\r\n [tooltipPosition]=\"'left'\"\r\n (click)=\"sistemasPanel.toggle($event)\"\r\n >\r\n apps\r\n </span>\r\n\r\n <span\r\n *ngIf=\"showButtonUser\"\r\n class=\"material-symbols-outlined top-layout-icons p-1\"\r\n [pTooltip]=\"'Menu do Usu\u00E1rio'\"\r\n [tooltipPosition]=\"'left'\"\r\n (click)=\"meusDadosPanel.toggle($event)\"\r\n >\r\n person\r\n </span>\r\n </div>\r\n\r\n @if(widthPage() < 992){\r\n <!-- dropdown para sele\u00E7\u00E3o de empresa/licenca -->\r\n <dropdown-master\r\n *ngIf=\"showLicencas()\"\r\n class=\"w-full\"\r\n formControlName=\"idmaster\"\r\n [formGroup]=\"formGroup\"\r\n [masters]=\"masters\"\r\n (onSelectionChange)=\"changeLicense($event)\"\r\n (onSelectionValue)=\"changeLicense($event)\"\r\n >\r\n </dropdown-master>\r\n } }\r\n </div>\r\n\r\n <!-- Container -->\r\n <div class=\"overflow-hidden flex-1 p-2 md:p-3\">\r\n <p-card\r\n styleClass=\"overflow-y-auto h-full max-h-full {{\r\n !showMenu && 'sm:overflow-y-hidden'\r\n }} card-container\"\r\n >\r\n <ng-content></ng-content>\r\n </p-card>\r\n </div>\r\n </div>\r\n\r\n <!-- Painel de aplicativos -->\r\n <p-overlayPanel\r\n #sistemasPanel\r\n [showTransitionOptions]=\"'350ms ease-out'\"\r\n [hideTransitionOptions]=\"'250ms ease-in'\"\r\n >\r\n <ng-template pTemplate=\"container\">\r\n <p class=\"title-style mt-3\">Sistemas</p>\r\n\r\n <div\r\n class=\"flex flex-row flex-wrap gap-3 align-items-center justify-content-center mt-5 mb-3\"\r\n style=\"width: 270px; height: 100%\"\r\n >\r\n @for (aplicativo of apps; track $index) { @if(aplicativo.urlicone ==\r\n \"https://work-assets.keevo.com.br/img/icone-keevocenter.png\") {\r\n <div\r\n class=\"btn-sistema text-xl md:text-3xl flex align-items-center justify-content-center\"\r\n (click)=\"selectApp(aplicativo.idaplicativo)\"\r\n [pTooltip]=\"aplicativo?.descricaoaplicativo\"\r\n [tooltipPosition]=\"'left'\"\r\n >\r\n {{ aplicativo.descricaoaplicativo.charAt(0).toLocaleUpperCase() }}\r\n </div>\r\n } @else {\r\n <img\r\n [src]=\"aplicativo.urlicone\"\r\n class=\"btn-sistema flex align-items-center justify-content-center\"\r\n [pTooltip]=\"aplicativo?.descricaoaplicativo\"\r\n [tooltipPosition]=\"'left'\"\r\n (click)=\"selectApp(aplicativo.idaplicativo)\"\r\n />\r\n } }\r\n\r\n <!-- <button\r\n *ngFor=\"let aplicativo of apps\"\r\n pButton\r\n pRipple\r\n class=\"btn-sistema-2 btn-sistema hover-btn-cor-padrao remove-focus h-4rem w-4rem\"\r\n [pTooltip]=\"aplicativo?.descricaoaplicativo\"\r\n [tooltipPosition]=\"'left'\"\r\n (click)=\"selectApp(aplicativo.idaplicativo)\"\r\n >\r\n {{ aplicativo.nomeaplicativo.charAt(0).toUpperCase() }}\r\n </button> -->\r\n </div>\r\n </ng-template>\r\n </p-overlayPanel>\r\n\r\n <!-- Painel do usu\u00E1rio -->\r\n <p-overlayPanel\r\n #meusDadosPanel\r\n [showTransitionOptions]=\"'350ms ease-out'\"\r\n [hideTransitionOptions]=\"'250ms ease-in'\"\r\n >\r\n <ng-template pTemplate=\"container\">\r\n <p class=\"title-style mt-3\">\r\n Ol\u00E1, {{ userName ? userName.split(\" \")[0] : \"Usu\u00E1rio\" }}!\r\n </p>\r\n <div class=\"mt-5 mb-3\"></div>\r\n\r\n <p-button\r\n icon=\"pi pi-lock\"\r\n label=\"Acessar Keepass\"\r\n (onClick)=\"accessKeePass($event)\"\r\n styleClass=\"border-noround w-full text-blue-900 text-sm\"\r\n [text]=\"true\"\r\n >\r\n </p-button>\r\n\r\n <p-button\r\n icon=\"pi pi-sign-out\"\r\n label=\"Sair\"\r\n (onClick)=\"logout($event)\"\r\n styleClass=\"border-noround w-full text-blue-900 text-sm\"\r\n [text]=\"true\"\r\n >\r\n </p-button>\r\n </ng-template>\r\n </p-overlayPanel>\r\n</div>\r\n", styles: [".material-icons{font-family:Material Icons;font-weight:400;font-style:normal;font-size:1em;display:inline-block;width:1em;height:1em;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:\"liga\"}::ng-deep .p-button:focus{box-shadow:none;-webkit-box-shadow:none;-moz-box-shadow:none}::ng-deep .p-overlaypanel .p-overlaypanel-content{padding:0}::ng-deep .hover-btn-cor-padrao.p-button:enabled:hover{background:#0c3e66;border-color:#002542}.p-button.p-button-icon-only.p-button-rounded{background:#0c3e66;border-color:#002542}::ng-deep .remove-focus:focus{border:none}::ng-deep .p-sidebar .p-sidebar-content{padding:0}::ng-deep .sidebar-header-sistema.p-sidebar .p-sidebar-header{padding-top:.5rem;padding-right:0;padding-bottom:0;padding-left:0;display:block}::ng-deep .p-sidebar .p-sidebar-header{padding:0rem!important}::ng-deep body{margin:0!important}::ng-deep .p-breadcrumb ul li.p-breadcrumb-chevron{position:relative;top:3px;color:#0c3e66!important}.page-content{background:linear-gradient(to bottom,#eaeaea 17%,#fff 19%)}*{margin:0}p .item-menu{color:#0c3e66;font-family:Inter var,Roboto,Arial,Helvetica,sans-serif!important}span{font-size:.825rem!important}.breadcrumb-title{font-size:1rem!important;font-family:Inter var,Roboto,Arial,Helvetica,sans-serif!important}::ng-deep .home-style{background-color:#eaeaea;overflow:hidden}::ng-deep .page-style{overflow:auto!important}::ng-deep .card-container{overflow-x:hidden}::ng-deep .card-container::-webkit-scrollbar{width:6px}::ng-deep .card-container::-webkit-scrollbar:hover{background-color:#dededebf}::ng-deep .card-container::-webkit-scrollbar-thumb{border-radius:4px;background-color:transparent}::ng-deep .card-container:hover::-webkit-scrollbar-thumb{border-left:2px solid white;background-color:#00000080}::ng-deep .card-container::-webkit-scrollbar-track{border-left:2px solid white;background-color:#dededebf}.title-style{position:relative;top:10px;margin-left:20px;font-size:1.25rem;color:#002542;border-bottom:2px solid green;font-weight:600;display:inline}::ng-deep p-sidebar .p-sidebar-content{overflow-y:hidden}::ng-deep p-dialog .p-dialog-content{overflow-y:unset}.icon-menu{font-size:1.3rem;color:#002542;display:flex;justify-content:center;align-items:center}::ng-deep .menu-option{padding:.8rem!important;display:flex;align-items:center;cursor:pointer;border-radius:.5rem;transition-duration:150;transition-property:color,background-color;padding:.5rem}::ng-deep .menu-option:hover{background-color:#29b92d!important;color:#fff}::ng-deep .p-breadcrumb .p-breadcrumb-list .p-menuitem-text{color:#183462!important;opacity:.95;font-weight:500;font-size:.8rem!important}::ng-deep .p-breadcrumb .p-breadcrumb-list .p-menuitem-text:hover{opacity:.7}.pl-3{padding-left:0rem!important}::ng-deep svg.p-icon{width:.7rem;height:1rem}.hover-color .text-base,.hover-color .icon-hover-color,.menu-option:hover .content-option-menu{color:#fff!important}::ng-deep .p-card .p-card-body{padding:0rem!important}::ng-deep .p-card .p-card-content{padding:0rem!important}::ng-deep .p-sidebar-left{z-index:1100!important}.btn-sistema{display:flex;align-items:center;justify-content:center;font-size:20px;font-weight:700;cursor:pointer;width:4rem;height:4rem;background-color:#002542;color:#fff;padding:.5rem;box-shadow:#00000059 0 0 4px;border-radius:.75rem;transition:box-shadow .3s ease-in-out}.btn-sistema:hover{opacity:.9;box-shadow:#0009 0 0 8px}.master-name{font-family:Inter var,Roboto,Arial,Helvetica,sans-serif!important;font-size:14px!important;font-weight:600;line-height:16.41px;text-align:center;color:#64748b}.empresa-name{font-family:Inter var,Roboto,Arial,Helvetica,sans-serif!important;font-size:12px!important;font-weight:300;line-height:14.06px;text-align:center;color:#1e293b}.top-layout-icons{color:#002542;font-size:1.5rem!important;cursor:pointer;border-radius:50%;transition:color .2s ease-in-out,background-color .2s ease-in-out,transform .2s ease-in-out}.top-layout-icons:hover{color:#fff;background-color:#002542}.overlay-background{position:fixed;top:0;left:0;width:100vw;height:100vh;background-color:#00000080;z-index:999}\n"] }]
|
|
6100
|
+
args: [{ selector: 'kv-layout', template: "<div class=\"flex flex-row overflow-y-hidden w- full-container\">\r\n <div\r\n [ngClass]=\"{ 'overlay-background': expandMenu() && widthPage() < 800 }\"\r\n ></div>\r\n @if (showMenu) {\r\n <div\r\n [style]=\"{\r\n minWidth: expandMenu() && widthPage() > 800 ? '17rem' : '3.65rem'\r\n }\"\r\n ></div>\r\n } @if(showMenu) {\r\n <p-sidebar\r\n #sidebarRef\r\n [visible]=\"true\"\r\n [showCloseIcon]=\"false\"\r\n [modal]=\"false\"\r\n [style]=\"{ width: expandMenu() ? '17rem' : '3.65rem' }\"\r\n class=\"sidebar-animation\"\r\n styleClass=\"transition-all\"\r\n >\r\n <ng-template pTemplate=\"headless\">\r\n <div class=\"flex flex-column overflow-hidden\">\r\n <div\r\n class=\"flex flex-column gap-2 justify-content-between flex-shrink-0 mx-2 overflow-hidden\"\r\n >\r\n <div\r\n class=\"flex {{\r\n expandMenu() ? 'flex-row' : 'flex-column'\r\n }} align-items-center {{\r\n expandMenu()\r\n ? 'justify-content-between'\r\n : 'justify-content-center'\r\n }} py-3\"\r\n >\r\n <!-- Logo para o menu expandido -->\r\n <img\r\n *ngIf=\"expandMenu() && logoMenuExpand\"\r\n alt=\"Card\"\r\n [src]=\"logoMenuExpand\"\r\n [style.height]=\"'3rem'\"\r\n width=\"auto\"\r\n class=\"cursor-pointer p-1\"\r\n (click)=\"navigateToDefaultRoute()\"\r\n />\r\n\r\n <!-- Logo para o menu minimizado-->\r\n <img\r\n *ngIf=\"!expandMenu() && logoMenuHide\"\r\n alt=\"Card\"\r\n [src]=\"logoMenuHide\"\r\n [style.height]=\"'3rem'\"\r\n width=\"auto\"\r\n class=\"mb-2 p-1\"\r\n (click)=\"navigateToDefaultRoute()\"\r\n />\r\n\r\n <!-- Toggle menu -->\r\n <span\r\n *ngIf=\"showExpandMenu\"\r\n class=\"material-symbols-outlined top-layout-icons p-1\"\r\n [pTooltip]=\"expandMenu() ? 'Ocultar Menu' : 'Expandir Menu'\"\r\n [tooltipPosition]=\"'right'\"\r\n (click)=\"toggleMenu()\"\r\n >\r\n menu\r\n </span>\r\n </div>\r\n\r\n @if(showTrocaEmpresa){\r\n <div\r\n class=\"flex flex-row align-items-center {{\r\n expandMenu()\r\n ? 'justify-content-between'\r\n : 'justify-content-center'\r\n }}\"\r\n >\r\n <div\r\n class=\"flex flex-column cursor-pointer\"\r\n *ngIf=\"expandMenu() && selectedEmpresa\"\r\n (click)=\"changeEmpresa($event)\"\r\n >\r\n <span\r\n class=\"text-sm font-semibold mr-2\"\r\n [pTooltip]=\"this.selectedEmpresa.razaosocial\"\r\n [tooltipPosition]=\"'right'\"\r\n >\r\n {{ nameEmpresa(this.selectedEmpresa.razaosocial) }}\r\n </span>\r\n <span class=\"text-sm mt-1\">{{\r\n this.selectedEmpresa.cpfcnpj | cpfCnpj\r\n }}</span>\r\n </div>\r\n\r\n <button\r\n pButton\r\n class=\"p-button-rounded p-button-text padding-style h-2rem w-2rem hover:bg-green-600 hover:text-white icon-menu\"\r\n (click)=\"changeEmpresa($event)\"\r\n [pTooltip]=\"'Trocar de empresa'\"\r\n [tooltipPosition]=\"'right'\"\r\n >\r\n <i class=\"material-symbols-outlined\"> sync_alt </i>\r\n </button>\r\n </div>\r\n <p-divider type=\"solid\"></p-divider>\r\n }\r\n </div>\r\n\r\n <div class=\"list-none m-0 card-container overflow-y-auto max-h-full\">\r\n <!-- menus -->\r\n <li\r\n *ngFor=\"let menu of menus; let i = index\"\r\n [class]=\"expandMenu() ? 'px-2' : 'px-1'\"\r\n >\r\n <!-- menu que n\u00E3o tem filho -->\r\n <a\r\n (click)=\"callRoute(menu.link)\"\r\n *ngIf=\"\r\n !menu.indmenupai && (!menu.idmenupai || menu.idmenupai == 0)\r\n \"\r\n pRipple\r\n [pTooltip]=\"!expandMenu() ? menu.descricaomenu : ''\"\r\n [tooltipPosition]=\"'right'\"\r\n class=\"menu-option\"\r\n [style.background-color]=\"menu.bgColor\"\r\n [class.justify-content-center]=\"!expandMenu()\"\r\n >\r\n <i\r\n class=\"content-option-menu material-symbols-outlined icon-menu {{\r\n expandMenu() ? 'ml-1 mr-2' : ''\r\n }} icon-hover-color {{ menu.textColor }}\"\r\n *ngIf=\"menu.icone\"\r\n >\r\n {{ menu.icone }}\r\n </i>\r\n <span\r\n class=\"content-option-menu text-base text-blue-900 font-semibold {{\r\n menu.textColor\r\n }}\"\r\n *ngIf=\"expandMenu()\"\r\n >{{ menu.descricaomenu }}</span\r\n >\r\n </a>\r\n <!-- menu com filho -->\r\n <div *ngIf=\"menu.indmenupai\">\r\n <a\r\n pRipple\r\n pStyleClass=\"@next\"\r\n enterClass=\"hidden\"\r\n enterActiveClass=\"slidedown\"\r\n leaveToClass=\"hidden\"\r\n leaveActiveClass=\"slideup\"\r\n [style.background-color]=\"\r\n isSelectedMenuPai(menu) ? 'rgb(41, 185, 45)' : 'white'\r\n \"\r\n class=\"menu-option {{\r\n !expandMenu()\r\n ? 'justify-content-center'\r\n : 'justify-content-between'\r\n }} \"\r\n [tooltipPosition]=\"'right'\"\r\n [pTooltip]=\"!expandMenu() ? menu.descricaomenu : ''\"\r\n (click)=\"\r\n expandMenu.set(!expandMenu() ? !expandMenu() : expandMenu())\r\n \"\r\n >\r\n <div class=\"flex flex-row align-items-center\">\r\n <i\r\n class=\"content-option-menu material-symbols-outlined icon-menu {{\r\n expandMenu() ? 'ml-1 mr-2' : ''\r\n }} icon-hover-color\"\r\n *ngIf=\"menu.icone\"\r\n [class.text-white]=\"isSelectedMenuPai(menu)\"\r\n >\r\n {{ menu.icone }}\r\n </i>\r\n <span\r\n class=\"text-base text-blue-900 font-semibold content-option-menu\"\r\n *ngIf=\"expandMenu()\"\r\n >{{ menu.descricaomenu }}</span\r\n >\r\n </div>\r\n <span\r\n class=\"pi pi-chevron-down text-blue-900 mr-1 icon-hover-color content-option-menu\"\r\n *ngIf=\"expandMenu()\"\r\n ></span>\r\n </a>\r\n\r\n <!-- filhos -->\r\n <div\r\n class=\"list-none py-0 pl-3 pr-0 m-0 {{\r\n !(\r\n menuSelecionado()?.idmenupai == menu.idmenu &&\r\n this.expandMenu()\r\n ) && 'hidden'\r\n }} overflow-y-hidden transition-all transition-duration-400 transition-ease-in-out\"\r\n >\r\n <li\r\n *ngFor=\"\r\n let filho of returnMenuChild(menu.idmenu);\r\n let iFilho = index\r\n \"\r\n >\r\n <a\r\n *ngIf=\"expandMenu()\"\r\n (click)=\"callRoute(filho.link)\"\r\n pRipple\r\n class=\"menu-option\"\r\n [style.background-color]=\"filho.bgColor\"\r\n >\r\n <i\r\n class=\"content-option-menu material-symbols-outlined icon-menu {{\r\n expandMenu() ? 'ml-1 mr-2' : ''\r\n }} icon-hover-color\"\r\n *ngIf=\"filho.icone\"\r\n >\r\n {{ filho.icone }}\r\n </i>\r\n <span\r\n class=\"content-option-menu text-medium text-blue-900 ml-4 {{\r\n filho.textColor\r\n }}\"\r\n *ngIf=\"expandMenu()\"\r\n >{{ filho.descricaomenu }}</span\r\n >\r\n </a>\r\n </li>\r\n </div>\r\n </div>\r\n </li>\r\n </div>\r\n </div>\r\n </ng-template>\r\n </p-sidebar>\r\n }\r\n\r\n <!-- Topbar -->\r\n <div\r\n class=\"w-auto h-screen page-content overflow-y-hidden flex flex-column\"\r\n id=\"page-content\"\r\n style=\"width: 100vw !important\"\r\n >\r\n <div\r\n class=\"flex flex-row flex-wrap align-items-center justify-content-between m-2 mb-0 gap-1\"\r\n >\r\n @if(!showMenu) {\r\n <!-- Logo home -->\r\n <div>\r\n <img [src]=\"logoMenuExpand\" width=\"150\" />\r\n </div>\r\n } @else {\r\n <!-- Breadcrumbs -->\r\n <div>\r\n <p class=\"text-xl font-semibold text-blue-900 breadcrumb-title\">\r\n {{\r\n breadCrumbItems[breadCrumbItems.length - 1] &&\r\n breadCrumbItems[breadCrumbItems.length - 1].label\r\n ? breadCrumbItems[breadCrumbItems.length - 1].label\r\n : \"\"\r\n }}\r\n </p>\r\n <p-breadcrumb\r\n *ngIf=\"widthCard > 400\"\r\n styleClass=\"border-none p-0 flex align-items-center h-2rem !important;\"\r\n [model]=\"breadCrumbItems\"\r\n [style]=\"{ backgroundColor: '#eaeaea' }\"\r\n (onItemClick)=\"callRoute($event.item.routerLink, true)\"\r\n ></p-breadcrumb>\r\n </div>\r\n } @if (exibirNomes) { @if(widthCard >= 517) {\r\n <div\r\n class=\"w-auto flex flex-column justify-content-center align-items-center gap-2\"\r\n >\r\n @if (masterName) { <span class=\"master-name\">{{ masterName }}</span> }\r\n @if (empresaName) {<span class=\"empresa-name\">{{ empresaName }}</span> }\r\n </div>\r\n\r\n <div\r\n class=\"w-auto flex flex-row justify-content-center align-items-center gap-2\"\r\n >\r\n <!-- Navega\u00E7\u00E3o de sistemas e usu\u00E1rios -->\r\n @for (topAction of topMenuActions(); track $index) {\r\n <ng-container *ngTemplateOutlet=\"topAction\" />\r\n }\r\n\r\n <span\r\n *ngIf=\"showButtonApps\"\r\n class=\"material-symbols-outlined top-layout-icons p-1\"\r\n [pTooltip]=\"'Sistemas'\"\r\n [tooltipPosition]=\"'left'\"\r\n (click)=\"sistemasPanel.toggle($event)\"\r\n >\r\n apps\r\n </span>\r\n\r\n <span\r\n *ngIf=\"showButtonUser\"\r\n class=\"material-symbols-outlined top-layout-icons p-1\"\r\n [pTooltip]=\"'Menu do Usu\u00E1rio'\"\r\n [tooltipPosition]=\"'left'\"\r\n (click)=\"meusDadosPanel.toggle($event)\"\r\n >\r\n person\r\n </span>\r\n </div>\r\n } @else {\r\n <div\r\n class=\"w-auto flex flex-row justify-content-center align-items-center gap-2\"\r\n >\r\n <!-- Navega\u00E7\u00E3o de sistemas e usu\u00E1rios -->\r\n @for (topAction of topMenuActions(); track $index) {\r\n <ng-container *ngTemplateOutlet=\"topAction\" />\r\n }\r\n\r\n <span\r\n *ngIf=\"showButtonApps\"\r\n class=\"material-symbols-outlined top-layout-icons p-1\"\r\n [pTooltip]=\"'Sistemas'\"\r\n [tooltipPosition]=\"'left'\"\r\n (click)=\"sistemasPanel.toggle($event)\"\r\n >\r\n apps\r\n </span>\r\n\r\n <span\r\n *ngIf=\"showButtonUser\"\r\n class=\"material-symbols-outlined top-layout-icons p-1\"\r\n [pTooltip]=\"'Menu do Usu\u00E1rio'\"\r\n [tooltipPosition]=\"'left'\"\r\n (click)=\"meusDadosPanel.toggle($event)\"\r\n >\r\n person\r\n </span>\r\n </div>\r\n\r\n <div\r\n class=\"w-auto flex flex-column justify-content-center align-items-center gap-2\"\r\n >\r\n @if (masterName) { <span class=\"master-name\">{{ masterName }}</span> }\r\n @if (empresaName) {<span class=\"empresa-name\">{{ empresaName }}</span> }\r\n </div>\r\n } } @else { @if(widthPage() > 992){\r\n <!-- dropdown para sele\u00E7\u00E3o de empresa/licenca -->\r\n <dropdown-master\r\n *ngIf=\"showLicencas()\"\r\n class=\"max-w-25rem\"\r\n formControlName=\"idmaster\"\r\n [formGroup]=\"formGroup\"\r\n [masters]=\"masters\"\r\n (onSelectionChange)=\"changeLicense($event)\"\r\n (onSelectionValue)=\"changeLicense($event)\"\r\n >\r\n </dropdown-master>\r\n }\r\n\r\n <!-- Navega\u00E7\u00E3o de sistemas e usu\u00E1rios -->\r\n <div class=\"w-auto flex flex-row align-items-center gap-2\">\r\n @for (topAction of topMenuActions(); track $index) {\r\n <ng-container *ngTemplateOutlet=\"topAction\" />\r\n }\r\n\r\n <span\r\n *ngIf=\"showButtonApps\"\r\n class=\"material-symbols-outlined top-layout-icons p-1\"\r\n [pTooltip]=\"'Sistemas'\"\r\n [tooltipPosition]=\"'left'\"\r\n (click)=\"sistemasPanel.toggle($event)\"\r\n >\r\n apps\r\n </span>\r\n\r\n <span\r\n *ngIf=\"showButtonUser\"\r\n class=\"material-symbols-outlined top-layout-icons p-1\"\r\n [pTooltip]=\"'Menu do Usu\u00E1rio'\"\r\n [tooltipPosition]=\"'left'\"\r\n (click)=\"meusDadosPanel.toggle($event)\"\r\n >\r\n person\r\n </span>\r\n </div>\r\n\r\n @if(widthPage() < 992){\r\n <!-- dropdown para sele\u00E7\u00E3o de empresa/licenca -->\r\n <dropdown-master\r\n *ngIf=\"showLicencas()\"\r\n class=\"w-full\"\r\n formControlName=\"idmaster\"\r\n [formGroup]=\"formGroup\"\r\n [masters]=\"masters\"\r\n (onSelectionChange)=\"changeLicense($event)\"\r\n (onSelectionValue)=\"changeLicense($event)\"\r\n >\r\n </dropdown-master>\r\n } }\r\n </div>\r\n\r\n <!-- Container -->\r\n <div class=\"overflow-hidden flex-1 p-2\">\r\n <p-card\r\n styleClass=\"overflow-y-auto h-full max-h-full {{\r\n !showMenu && 'sm:overflow-y-hidden'\r\n }} card-container\"\r\n >\r\n <ng-content></ng-content>\r\n </p-card>\r\n </div>\r\n </div>\r\n\r\n <!-- Painel de aplicativos -->\r\n <p-overlayPanel\r\n #sistemasPanel\r\n [showTransitionOptions]=\"'350ms ease-out'\"\r\n [hideTransitionOptions]=\"'250ms ease-in'\"\r\n >\r\n <ng-template pTemplate=\"container\">\r\n <p class=\"title-style mt-3\">Sistemas</p>\r\n\r\n <div\r\n class=\"flex flex-row flex-wrap gap-3 align-items-center justify-content-center mt-5 mb-3\"\r\n style=\"width: 270px; height: 100%\"\r\n >\r\n @for (aplicativo of apps; track $index) { @if(aplicativo.urlicone ==\r\n \"https://work-assets.keevo.com.br/img/icone-keevocenter.png\") {\r\n <div\r\n class=\"btn-sistema text-xl md:text-3xl flex align-items-center justify-content-center\"\r\n (click)=\"selectApp(aplicativo.idaplicativo)\"\r\n [pTooltip]=\"aplicativo?.descricaoaplicativo\"\r\n [tooltipPosition]=\"'left'\"\r\n >\r\n {{ aplicativo.descricaoaplicativo.charAt(0).toLocaleUpperCase() }}\r\n </div>\r\n } @else {\r\n <img\r\n [src]=\"aplicativo.urlicone\"\r\n class=\"btn-sistema flex align-items-center justify-content-center\"\r\n [pTooltip]=\"aplicativo?.descricaoaplicativo\"\r\n [tooltipPosition]=\"'left'\"\r\n (click)=\"selectApp(aplicativo.idaplicativo)\"\r\n />\r\n } }\r\n\r\n <!-- <button\r\n *ngFor=\"let aplicativo of apps\"\r\n pButton\r\n pRipple\r\n class=\"btn-sistema-2 btn-sistema hover-btn-cor-padrao remove-focus h-4rem w-4rem\"\r\n [pTooltip]=\"aplicativo?.descricaoaplicativo\"\r\n [tooltipPosition]=\"'left'\"\r\n (click)=\"selectApp(aplicativo.idaplicativo)\"\r\n >\r\n {{ aplicativo.nomeaplicativo.charAt(0).toUpperCase() }}\r\n </button> -->\r\n </div>\r\n </ng-template>\r\n </p-overlayPanel>\r\n\r\n <!-- Painel do usu\u00E1rio -->\r\n <p-overlayPanel\r\n #meusDadosPanel\r\n [showTransitionOptions]=\"'350ms ease-out'\"\r\n [hideTransitionOptions]=\"'250ms ease-in'\"\r\n >\r\n <ng-template pTemplate=\"container\">\r\n <p class=\"title-style mt-3\">\r\n Ol\u00E1, {{ userName ? userName.split(\" \")[0] : \"Usu\u00E1rio\" }}!\r\n </p>\r\n <div class=\"mt-5 mb-3\"></div>\r\n\r\n <p-button\r\n icon=\"pi pi-lock\"\r\n label=\"Acessar Keepass\"\r\n (onClick)=\"accessKeePass($event)\"\r\n styleClass=\"border-noround w-full text-blue-900 text-sm\"\r\n [text]=\"true\"\r\n >\r\n </p-button>\r\n\r\n <p-button\r\n icon=\"pi pi-sign-out\"\r\n label=\"Sair\"\r\n (onClick)=\"logout($event)\"\r\n styleClass=\"border-noround w-full text-blue-900 text-sm\"\r\n [text]=\"true\"\r\n >\r\n </p-button>\r\n </ng-template>\r\n </p-overlayPanel>\r\n</div>\r\n", styles: [".material-icons{font-family:Material Icons;font-weight:400;font-style:normal;font-size:1em;display:inline-block;width:1em;height:1em;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:\"liga\"}::ng-deep .p-button:focus{box-shadow:none;-webkit-box-shadow:none;-moz-box-shadow:none}::ng-deep .p-overlaypanel .p-overlaypanel-content{padding:0}::ng-deep .hover-btn-cor-padrao.p-button:enabled:hover{background:#0c3e66;border-color:#002542}.p-button.p-button-icon-only.p-button-rounded{background:#0c3e66;border-color:#002542}::ng-deep .remove-focus:focus{border:none}::ng-deep .p-sidebar .p-sidebar-content{padding:0}::ng-deep .sidebar-header-sistema.p-sidebar .p-sidebar-header{padding-top:.5rem;padding-right:0;padding-bottom:0;padding-left:0;display:block}::ng-deep .p-sidebar .p-sidebar-header{padding:0rem!important}::ng-deep body{margin:0!important}::ng-deep .p-breadcrumb ul li.p-breadcrumb-chevron{position:relative;top:3px;color:#0c3e66!important}.page-content{background:linear-gradient(to bottom,#eaeaea 17%,#fff 19%)}*{margin:0}p .item-menu{color:#0c3e66;font-family:Inter var,Roboto,Arial,Helvetica,sans-serif!important}span{font-size:.825rem!important}.breadcrumb-title{font-size:1rem!important;font-family:Inter var,Roboto,Arial,Helvetica,sans-serif!important}::ng-deep .home-style{background-color:#eaeaea;overflow:hidden}::ng-deep .page-style{overflow:auto!important}::ng-deep .card-container{overflow-x:hidden}::ng-deep .card-container::-webkit-scrollbar{width:6px}::ng-deep .card-container::-webkit-scrollbar:hover{background-color:#dededebf}::ng-deep .card-container::-webkit-scrollbar-thumb{border-radius:4px;background-color:transparent}::ng-deep .card-container:hover::-webkit-scrollbar-thumb{border-left:2px solid white;background-color:#00000080}::ng-deep .card-container::-webkit-scrollbar-track{border-left:2px solid white;background-color:#dededebf}.title-style{position:relative;top:10px;margin-left:20px;font-size:1.25rem;color:#002542;border-bottom:2px solid green;font-weight:600;display:inline}::ng-deep p-sidebar .p-sidebar-content{overflow-y:hidden}::ng-deep p-dialog .p-dialog-content{overflow-y:unset}.icon-menu{font-size:1.3rem;color:#002542;display:flex;justify-content:center;align-items:center}::ng-deep .menu-option{padding:.8rem!important;display:flex;align-items:center;cursor:pointer;border-radius:.5rem;transition-duration:150;transition-property:color,background-color;padding:.5rem}::ng-deep .menu-option:hover{background-color:#29b92d!important;color:#fff}::ng-deep .p-breadcrumb .p-breadcrumb-list .p-menuitem-text{color:#183462!important;opacity:.95;font-weight:500;font-size:.8rem!important}::ng-deep .p-breadcrumb .p-breadcrumb-list .p-menuitem-text:hover{opacity:.7}.pl-3{padding-left:0rem!important}::ng-deep svg.p-icon{width:.7rem;height:1rem}.hover-color .text-base,.hover-color .icon-hover-color,.menu-option:hover .content-option-menu{color:#fff!important}::ng-deep .p-card .p-card-body{padding:0rem!important}::ng-deep .p-card .p-card-content{padding:0rem!important}::ng-deep .p-sidebar-left{z-index:1100!important}.btn-sistema{display:flex;align-items:center;justify-content:center;font-size:20px;font-weight:700;cursor:pointer;width:4rem;height:4rem;background-color:#002542;color:#fff;padding:.5rem;box-shadow:#00000059 0 0 4px;border-radius:.75rem;transition:box-shadow .3s ease-in-out}.btn-sistema:hover{opacity:.9;box-shadow:#0009 0 0 8px}.master-name{font-family:Inter var,Roboto,Arial,Helvetica,sans-serif!important;font-size:14px!important;font-weight:600;line-height:16.41px;text-align:center;color:#64748b}.empresa-name{font-family:Inter var,Roboto,Arial,Helvetica,sans-serif!important;font-size:12px!important;font-weight:300;line-height:14.06px;text-align:center;color:#1e293b}.top-layout-icons{color:#002542;font-size:1.5rem!important;cursor:pointer;border-radius:50%;transition:color .2s ease-in-out,background-color .2s ease-in-out,transform .2s ease-in-out}.top-layout-icons:hover{color:#fff;background-color:#002542}.overlay-background{position:fixed;top:0;left:0;width:100vw;height:100vh;background-color:#00000080;z-index:999}\n"] }]
|
|
6086
6101
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i1$2.FormBuilder }, { type: i3$1.Router }, { type: i3$1.ActivatedRoute }], propDecorators: { apps: [{
|
|
6087
6102
|
type: Input
|
|
6088
6103
|
}], breadCrumbItems: [{
|
|
@@ -6990,6 +7005,7 @@ class KvTableEditComponent extends BasecomponentTable {
|
|
|
6990
7005
|
super(datePipe, decimalPipe, cpfCnpjPipe, telefonePipe, notificationService);
|
|
6991
7006
|
this.enableSizes = false;
|
|
6992
7007
|
this.editMode = 'cell';
|
|
7008
|
+
this.hideBtnEdit = false;
|
|
6993
7009
|
this.itemsParaSalvamento = [];
|
|
6994
7010
|
this.isEditing = false;
|
|
6995
7011
|
this.isShowSizes = false;
|
|
@@ -7260,15 +7276,17 @@ class KvTableEditComponent extends BasecomponentTable {
|
|
|
7260
7276
|
}
|
|
7261
7277
|
}
|
|
7262
7278
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvTableEditComponent, deps: [{ token: i1.DatePipe }, { token: i1.DecimalPipe }, { token: CpfCnpjPipe }, { token: TelefonePipe }, { token: NotificationService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
7263
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.8", type: KvTableEditComponent, selector: "kv-table-edit", inputs: { enableSizes: "enableSizes", editMode: "editMode" }, outputs: { onSave: "onSave", filterField: "filterField" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div class=\"card\" id=\"tamanhotabela\" [style.font-size]=\"'1px'\">\r\n <p-toast></p-toast>\r\n\r\n @if(filtrosAvancados){\r\n <p-panel\r\n header=\"Filtros avan\u00E7ados\"\r\n [toggleable]=\"true\"\r\n [collapsed]=\"true\"\r\n (collapsedChange)=\"collapsed = !collapsed\"\r\n [style]=\"{ 'margin-bottom': '2px' }\"\r\n >\r\n <ng-template pTemplate=\"headericons\">\r\n @if (!collapsed) {\r\n <i class=\"pi pi-filter\"></i>\r\n }\r\n <!-- \u00CDcone quando o painel est\u00E1 aberto -->\r\n @if (collapsed) {\r\n <i class=\"pi pi-minus\"></i>\r\n }\r\n <!-- \u00CDcone quando o painel est\u00E1 fechado -->\r\n </ng-template>\r\n <ng-content></ng-content>\r\n </p-panel>\r\n }\r\n\r\n <p-contextMenu #cm [model]=\"itemsContextMenu\"></p-contextMenu>\r\n <p-table\r\n #te\r\n [editMode]=\"editMode\"\r\n (onEditComplete)=\"onEditComplete($event)\"\r\n (onEditInit)=\"onEditInit($event)\"\r\n [reorderableColumns]=\"config.reorderableColumns || false\"\r\n *ngIf=\"config\"\r\n [value]=\"dataSource\"\r\n [dataKey]=\"config.dataKey\"\r\n [columns]=\"config.columns\"\r\n [scrollable]=\"true\"\r\n appendTo=\"body\"\r\n [styleClass]=\"selectedSize.class\"\r\n [(selection)]=\"selectedItems\"\r\n [rowSelectable]=\"isRowSelectable\"\r\n [globalFilterFields]=\"globalFilterFields\"\r\n [rows]=\"rows\"\r\n [paginator]=\"paginator\"\r\n [rowsPerPageOptions]=\"rowsPerPageOptions\"\r\n [showCurrentPageReport]=\"true\"\r\n currentPageReportTemplate=\"{first} - {last} de {totalRecords}\"\r\n (selectionChange)=\"selectionChange($event)\"\r\n [rowHover]=\"true\"\r\n [totalRecords]=\"totalRecords\"\r\n [lazy]=\"config.lazy\"\r\n (onLazyLoad)=\"paginate($event)\"\r\n [groupRowsBy]=\"config.fieldGroup\"\r\n paginatorDropdownAppendTo=\"body\"\r\n [showFirstLastIcon]=\"showFirstLastIcon\"\r\n [pageLinks]=\"pageLinksOptions\"\r\n [scrollable]=\"isTableScrollable\"\r\n [scrollHeight]=\"scrollHeight\"\r\n [rowTrackBy]=\"rowTrackBy\"\r\n [(contextMenuSelection)]=\"selectedProduct\"\r\n [contextMenu]=\"isEditableTable() ? cm : null\"\r\n >\r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n\r\n @if (config.enableCation || enableSizes){\r\n <ng-template pTemplate=\"caption\">\r\n <div\r\n class=\"flex flex-row flex-wrap justify-content-between align-items-center grid formgrid p-fluid col-12 p-0 m-0\"\r\n >\r\n <div class=\"col-12 flex flex-column\">\r\n @if (config.title) {\r\n <div class=\"text-md font-bold my-3\">\r\n {{ config.title }}\r\n </div>\r\n } @if (config.subtitle) {\r\n <div class=\"text-sm mb-4 font-medium\">\r\n {{ config.subtitle }}\r\n </div>\r\n }\r\n </div>\r\n\r\n <div\r\n class=\"flex flex-row align-items-center md:col-6 lg:col-4 {{\r\n tamanhoTela < 768 ? 'col-10' : 'col-12'\r\n }} mt-1 mb-2 gap-1\"\r\n >\r\n \r\n @if (config.enableFilter) {\r\n <span 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(te, $event)\"\r\n placeholder=\"Pesquisar...\"\r\n class=\"h-2rem\"\r\n autocomplete=\"off\"\r\n />\r\n </span>\r\n }\r\n\r\n @if(enableSizes){\r\n <div class=\"sizes-controls\">\r\n \r\n <kv-button (click)=\"menu.toggle($event)\"\r\n [severity]=\"'tertiary'\"\r\n [icon]=\"'match_case'\"\r\n [pTooltip]=\"'Tamanho da fonte'\"\r\n >\r\n </kv-button>\r\n \r\n <p-tieredMenu\r\n [style]=\"{ 'font-size': '0.7rem' }\"\r\n styleClass=\"menuSizes\"\r\n appendTo=\"body\"\r\n #menu\r\n [model]=\"sizes\"\r\n [popup]=\"true\"\r\n >\r\n <ng-template let-item pTemplate=\"item\">\r\n <div\r\n class=\"cursor-pointer flex gap-2 align-items-center pl-1 m-2 menu-sizes\"\r\n (click)=\"item.command()\"\r\n >\r\n @if(this.selectedSize.size != item.size){\r\n <div\r\n class=\"tag\"\r\n [style.background-color]=\"'#EAEAEA'\"\r\n ></div>\r\n }\r\n \r\n @if(this.selectedSize.size == item.size){\r\n <div\r\n class=\"tag\"\r\n [style.background-color]=\"'#1DA750'\"\r\n ></div>\r\n }\r\n \r\n {{ item.label }}\r\n </div>\r\n </ng-template>\r\n </p-tieredMenu>\r\n </div>\r\n }\r\n </div>\r\n\r\n @if(isEditing){\r\n <span class=\"text-aviso\">\r\n Tabela em modo de edi\u00E7\u00E3o\r\n </span>\r\n }\r\n \r\n <div class=\"flex flex-row col-2 justify-content-end gap-2\">\r\n @for (action of config.actionsLote; track i; let i = $index) {\r\n @if(!isEditing){\r\n <div class=\"flex align-items-center justify-content-center\">\r\n @if ((selectedItems.length > 0 || action.showAcoesLote) &&\r\n (getOrExecute(action.visible, selectedItems) ?? true)) {\r\n <kv-button\r\n (onClick)=\"action?.command(); activeItemLote(selectedItems)\"\r\n [pTooltip]=\"getOrExecute(action.tooltip, selectedItems)\"\r\n [tooltipPosition]=\"\r\n (getOrExecute(action.tooltip, selectedItems)?.length ??\r\n 0 > 7) &&\r\n config.actionsLote &&\r\n i == config.actionsLote.length - 1\r\n ? 'left'\r\n : 'bottom'\r\n \"\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 }\r\n }\r\n\r\n @if (isEditableTable()) {\r\n <div>\r\n <kv-button\r\n (click)=\"this.isEditing = !this.isEditing\"\r\n [pTooltip]=\"!isEditing ? 'Habilitar Edi\u00E7\u00E3o' : 'Desabilitar Edi\u00E7\u00E3o'\"\r\n [tooltipPosition]=\"'left'\"\r\n [severity]=\"'tertiary'\"\r\n [icon]=\"'edit_square'\"\r\n >\r\n </kv-button>\r\n </div>\r\n }\r\n </div>\r\n\r\n <!---------------->\r\n \r\n </div>\r\n </ng-template>\r\n }\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n @if(config.enableSelect && !isEditing){\r\n <th\r\n [class]=\"selectedSize.class + 'th'\"\r\n >\r\n <p-tableHeaderCheckbox\r\n (click)=\"activeItemLote(selectedItems)\"\r\n ></p-tableHeaderCheckbox>\r\n </th>\r\n }\r\n @for(col of columns; track $index){\r\n <th\r\n [pSortableColumn]=\"col.field\"\r\n [pSortableColumnDisabled]=\"col.sortable === false\"\r\n [style.min-width]=\"col.width * selectedSize.size + 'px'\"\r\n pReorderableColumn\r\n [class]=\"selectedSize.class + 'th'\"\r\n \r\n >\r\n <div\r\n [class]=\"\r\n centralizarColunas(col) && alignColunasHeader(col) == ''\r\n ? 'flex flex-row justify-content-center'\r\n : 'flex flex-row'\r\n \"\r\n [style]=\"alignColunasHeader(col)\"\r\n >\r\n <span class=\"text-xs font-medium\">{{ col.header }}</span>\r\n @if(col.sortable === true) {\r\n <p-sortIcon\r\n [field]=\"col.field\"\r\n style=\"font-size: 10px\"\r\n ></p-sortIcon>\r\n }\r\n @if(col.headerTooltip){\r\n <span\r\n class=\"material-symbols-outlined flex align-items-center\"\r\n [pTooltip]=\"col.headerTooltip\"\r\n >\r\n info\r\n </span>\r\n }\r\n \r\n </div>\r\n </th>\r\n }\r\n \r\n @if(!isEditing && config.actions && config.actions.length > 0){\r\n <th></th>\r\n }\r\n\r\n @if(isEditableTable() && this.editMode == 'row'){\r\n <th\r\n id=\"th-edit\"\r\n style=\"width: 20px\"\r\n >\r\n Editar\r\n </th>\r\n }\r\n \r\n </tr>\r\n </ng-template>\r\n\r\n\r\n \r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n\r\n <ng-template\r\n pTemplate=\"body\"\r\n let-rowData\r\n let-editing=\"editing\"\r\n let-ri=\"rowIndex\"\r\n let-columns=\"columns\"\r\n let-rowgroup=\"rowgroup\"\r\n let-rowspan=\"rowspan\"\r\n >\r\n <tr\r\n [pEditableRow]=\"rowData\"\r\n [pEditableRowDisabled]=\"false\"\r\n [pContextMenuRow]=\"{rowData, editing}\"\r\n [class]=\"selectedSize.class + '-tr'\"\r\n (dblclick)=\"doubleClick($event, rowData)\"\r\n >\r\n @if(config.enableSelect && !isEditing){\r\n <td\r\n [style]=\"applyStyle(rowData, { field: 'check-box', header: '' })\"\r\n >\r\n \r\n <p-tableCheckbox\r\n class=\"check-edit-list\"\r\n [value]=\"rowData\"\r\n [disabled]=\"isDisabledCheckbox(rowData)\"\r\n (click)=\"activeItemLote(selectedItems)\"\r\n ></p-tableCheckbox>\r\n </td>\r\n }\r\n @for (col of columns; track i; let i = $index){\r\n <ng-container>\r\n <!-- FIXME: Testar a implementa\u00E7\u00E3o abaixo e mesaclar as duas formas -->\r\n \r\n <ng-template #templateInput let-rowData=\"rowData\" let-col=\"col\">\r\n <ng-container *ngIf=\"isEditing; else templatevisualedicao\">\r\n <ng-container [ngSwitch]=\"col.fieldControlType\">\r\n <ng-container *ngSwitchCase=\"'text'\">\r\n <div [style.width]=\"col.width\" class=\"grid formgrid p-fluid\">\r\n <kv-input-text\r\n [disabled]=\"isDisableEditRowCellFunction(rowData, col)\"\r\n class=\"cellControl col\"\r\n [(ngModel)]=\"rowData[col.field]\"\r\n [required]=\"col.required ?? true\"\r\n ></kv-input-text>\r\n </div>\r\n </ng-container>\r\n \r\n <ng-container *ngSwitchCase=\"'number'\">\r\n <div [style.width]=\"col.width\" class=\"grid formgrid p-fluid\">\r\n <kv-input-number\r\n [disabled]=\"isDisableEditRowCellFunction(rowData, col)\"\r\n class=\"cellControl col\"\r\n [(ngModel)]=\"rowData[col.field]\"\r\n [required]=\"col.required ?? true\"\r\n ></kv-input-number>\r\n </div>\r\n </ng-container>\r\n \r\n <ng-container *ngSwitchCase=\"'mask'\">\r\n <div [style.width]=\"col.width\" class=\"grid formgrid p-fluid\">\r\n <kv-input-mask\r\n [disabled]=\"isDisableEditRowCellFunction(rowData, col)\"\r\n class=\"cellControl col\"\r\n [mask]=\"col.mask\"\r\n [required]=\"col.required ?? true\"\r\n [(ngModel)]=\"rowData[col.field]\"\r\n ></kv-input-mask>\r\n </div>\r\n </ng-container>\r\n \r\n <ng-container *ngSwitchCase=\"'switch'\">\r\n <div [style.width]=\"col.width\" class=\"grid formgrid p-fluid\">\r\n <kv-switch\r\n [disabled]=\"isDisableEditRowCellFunction(rowData, col)\"\r\n class=\"cellControl col\"\r\n [(ngModel)]=\"rowData[col.field]\"\r\n ></kv-switch>\r\n </div>\r\n </ng-container>\r\n \r\n <ng-container *ngSwitchCase=\"'calendar'\">\r\n <div [style.width]=\"col.width\">\r\n <div\r\n [style.width]=\"col.width\"\r\n class=\"grid formgrid p-fluid\"\r\n >\r\n <kv-input-calendar\r\n class=\"cellControl col\"\r\n [(ngModel)]=\"rowData[col.field]\"\r\n ></kv-input-calendar>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'dropdown'\">\r\n <div [style.width]=\"col.width\" class=\"grid formgrid p-fluid\">\r\n <p-dropdown\r\n [disabled]=\"isDisableEditRowCellFunction(rowData, col)\"\r\n class=\"cellControl col\"\r\n appendTo=\"body\"\r\n [panelStyle]=\"{ 'font-size': '0.75rem' }\"\r\n [optionLabel]=\"col.fieldDropDownControl.descricaoobjeto\"\r\n [optionValue]=\"col.fieldDropDownControl.idobjeto\"\r\n [options]=\"\r\n col.fieldDropDownControl.fieldControlDropdownSource\r\n \"\r\n [(ngModel)]=\"rowData[col.field]\"\r\n >\r\n </p-dropdown>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n \r\n <ng-template #templatevisualedicao>\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n templateOutput;\r\n context: { rowData: rowData, col: col }\r\n \"\r\n ></ng-container>\r\n </ng-template>\r\n </ng-template>\r\n \r\n <ng-template #templateOutput let-rowData=\"rowData\" let-col=\"col\">\r\n <ng-container [ngSwitch]=\"col.fieldControlType\">\r\n <ng-container *ngSwitchCase=\"'dropdown'\">\r\n <ng-container *ngIf=\"rowData[col.field]\">\r\n {{ transformValueDrop(retornaDescricaoDrop(rowData, col), col) }}\r\n </ng-container>\r\n </ng-container>\r\n \r\n <ng-container *ngSwitchCase=\"'switch'\">\r\n <kv-switch\r\n [(ngModel)]=\"rowData[col.field]\"\r\n [disabled]=\"true\"\r\n ></kv-switch>\r\n </ng-container>\r\n \r\n <ng-container *ngSwitchCase=\"'calendar'\">\r\n {{ rowData[col.field] | date }}\r\n </ng-container>\r\n \r\n <ng-container *ngSwitchCase=\"'mask'\">\r\n {{ rowData[col.field] | mask : col.mask }}\r\n </ng-container>\r\n \r\n <ng-container *ngSwitchDefault>\r\n {{ transformValue(rowData, col) }}\r\n </ng-container>\r\n </ng-container>\r\n </ng-template>\r\n \r\n @if(editMode == 'cell' && col.fieldControlType){\r\n <td\r\n [pEditableColumn]=\"rowData\"\r\n [pEditableColumnField]=\"col.field\"\r\n [pEditableColumnRowIndex]=\"rowData[config.dataKey]\"\r\n [id]=\"'rowTable' + rowData[config.dataKey]\"\r\n (click)=\"activeItem(rowData)\"\r\n (dblclick)=\"dbClickEdit()\"\r\n class=\"rowTable\"\r\n [style]=\"\r\n applyStyle(rowData, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col)\r\n \"\r\n [pTooltip]=\"returnTooltipRow(rowData, col)\"\r\n >\r\n <p-cellEditor>\r\n <ng-container>\r\n <ng-template pTemplate=\"input\">\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n templateInput;\r\n context: { rowData: rowData, col: col }\r\n \"\r\n ></ng-container>\r\n </ng-template>\r\n \r\n <ng-template pTemplate=\"output\">\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n templateOutput;\r\n context: { rowData: rowData, col: col }\r\n \"\r\n ></ng-container>\r\n </ng-template>\r\n </ng-container>\r\n \r\n </p-cellEditor>\r\n </td>\r\n }\r\n \r\n <!-- NOTE: Edi\u00E7\u00E3o de linha -->\r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n \r\n <!-- Celula que armazena os controles de edi\u00E7\u00E3o para os campos -->\r\n @if(false && col.fieldControlType && editMode == 'row'){\r\n <td\r\n [id]=\"'rowTable' + rowData[config.dataKey]\"\r\n (click)=\"activeItem(rowData)\"\r\n (dblclick)=\"dbClickEdit()\"\r\n class=\"rowTable\"\r\n [style]=\"\r\n applyStyle(rowData, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col)\r\n \"\r\n [pTooltip]=\"returnTooltipRow(rowData, col)\"\r\n >\r\n <p-cellEditor\r\n [ngClass]=\"{ switch: col.fieldControlType == 'switch' }\"\r\n >\r\n <ng-template pTemplate=\"input\">\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n templateInput;\r\n context: { rowData: rowData, col: col }\r\n \"\r\n ></ng-container>\r\n </ng-template>\r\n \r\n <ng-template pTemplate=\"output\">\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n templateOutput;\r\n context: { rowData: rowData, col: col }\r\n \"\r\n ></ng-container>\r\n </ng-template>\r\n </p-cellEditor>\r\n </td>\r\n }\r\n \r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n \r\n <td\r\n *ngIf=\"rowgroup && !col.template\"\r\n [attr.rowspan]=\"rowgroup && col.grouped ? rowspan : null\"\r\n class=\"rowTable\"\r\n [style]=\"\r\n applyStyle(rowData, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col)\r\n \"\r\n [pTooltip]=\"returnTooltipRow(rowData, col)\"\r\n >\r\n <span class=\"p-column-title\">{{ col.header }}:</span>\r\n \r\n <span\r\n *ngIf=\"!isBooleanField(rowData, col); else booleanField\"\r\n [class]=\"returnRowClass(rowData, col)\"\r\n >\r\n <span\r\n *ngIf=\"\r\n !isChipField(col) && !col.iconField && !isImageField(col)\r\n \"\r\n >\r\n <i *ngIf=\"col.icon\" [class]=\"col.icon + ' mr-2'\"></i>\r\n {{ transformValue(rowData, col) }}\r\n </span>\r\n \r\n <div *ngIf=\"isChipField(col) && !col.iconField\">\r\n <span\r\n [class]=\"returnClassChip(rowData, col)\"\r\n [pTooltip]=\"returnTooltipIcon(rowData, col)\"\r\n >{{ transformValue(rowData, col) }}</span\r\n >\r\n </div>\r\n </span>\r\n \r\n <span *ngIf=\"isImageField(col)\">\r\n <span>\r\n <img class=\"image\" [src]=\"loadImage(rowData, col)\" />\r\n </span>\r\n </span>\r\n \r\n <i\r\n *ngIf=\"col.iconField\"\r\n [ngClass]=\"{\r\n 'material-icons': col.indIconMaterial,\r\n 'material-symbols-outlined mr-2': !col.indIconMaterial\r\n }\"\r\n [pTooltip]=\"returnTooltipIcon(rowData, col)\"\r\n >\r\n {{ returnClassIcon(rowData, col) }}\r\n </i>\r\n \r\n <ng-template #booleanField>\r\n <i\r\n *ngIf=\"!col.iconField && !isSwitchField(col)\"\r\n [ngClass]=\"\r\n rowData[col.field] ? 'text-green-500' : 'text-red-500'\r\n \"\r\n ><span class=\"material-symbols-outlined\">\r\n {{ rowData[col.field] ? \"check\" : \"close\" }}\r\n </span>\r\n </i>\r\n \r\n <span\r\n *ngIf=\"isSwitchField(col)\"\r\n [class]=\"returnRowClass(rowData, col)\"\r\n >\r\n <kv-switch\r\n (onSwitchChange)=\"onSwitchChange($event, rowData, col)\"\r\n [disabled]=\"col?.onlyReadField ?? true\"\r\n [switchValue]=\"transformValue(rowData, col)\"\r\n >\r\n </kv-switch>\r\n </span>\r\n </ng-template>\r\n </td>\r\n \r\n <td\r\n *ngIf=\"\r\n !rowgroup &&\r\n !col.grouped &&\r\n !col.template &&\r\n !col.fieldControlType\r\n \"\r\n [style]=\"\r\n applyStyle(rowData, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col)\r\n \"\r\n class=\"rowTable\"\r\n [pTooltip]=\"returnTooltipRow(rowData, col)\"\r\n >\r\n <span class=\"p-column-title\">{{ col.header }}:</span>\r\n \r\n <span\r\n *ngIf=\"!isBooleanField(rowData, col); else booleanField\"\r\n [class]=\"returnRowClass(rowData, col)\"\r\n >\r\n <span\r\n *ngIf=\"\r\n !isChipField(col) && !col.iconField && !isImageField(col)\r\n \"\r\n >\r\n <i *ngIf=\"col.icon\" [class]=\"col.icon + ' mr-2'\"></i>\r\n {{ transformValue(rowData, col) }}\r\n </span>\r\n \r\n <div *ngIf=\"isChipField(col) && !col.iconField\">\r\n <span\r\n [class]=\"returnClassChip(rowData, col)\"\r\n [pTooltip]=\"returnTooltipIcon(rowData, col)\"\r\n >\r\n {{ transformValue(rowData, col) }}</span\r\n >\r\n </div>\r\n </span>\r\n \r\n <span *ngIf=\"isImageField(col)\">\r\n <span>\r\n <img class=\"image\" [src]=\"loadImage(rowData, col)\" />\r\n </span>\r\n </span>\r\n \r\n <i\r\n *ngIf=\"col.iconField\"\r\n [ngClass]=\"{\r\n 'material-icons': col.indIconMaterial,\r\n 'material-symbols-outlined mr-2': !col.indIconMaterial\r\n }\"\r\n [pTooltip]=\"returnTooltipIcon(rowData, col)\"\r\n >\r\n {{ returnClassIcon(rowData, col) }}\r\n </i>\r\n \r\n <ng-template #booleanField>\r\n <i\r\n *ngIf=\"!col.iconField && !isSwitchField(col)\"\r\n [ngClass]=\"\r\n rowData[col.field] ? 'text-green-500' : 'text-red-500'\r\n \"\r\n ><span class=\"material-symbols-outlined\">\r\n {{ rowData[col.field] ? \"check\" : \"close\" }}\r\n </span>\r\n </i>\r\n \r\n <span\r\n *ngIf=\"isSwitchField(col)\"\r\n [class]=\"returnRowClass(rowData, col)\"\r\n >\r\n <kv-switch\r\n (onSwitchChange)=\"onSwitchChange($event, rowData, col)\"\r\n [disabled]=\"col?.onlyReadField ?? true\"\r\n [switchValue]=\"transformValue(rowData, col)\"\r\n >\r\n </kv-switch>\r\n </span>\r\n </ng-template>\r\n </td>\r\n \r\n <td\r\n *ngIf=\"col.template && !isEditableTable()\"\r\n [style]=\"\r\n applyStyle(rowData, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col)\r\n \"\r\n class=\"rowTable\"\r\n >\r\n <span class=\"p-column-title\">{{ col.header }}:</span>\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 </td>\r\n </ng-container>\r\n }\r\n \r\n\r\n <!-- ------------------------------------------------------------------------------------------------------------------------------------------- -->\r\n <!-- Controle de a\u00E7\u00E3o -->\r\n @if(!isEditing && config.actions && config.actions.length > 0){\r\n <td\r\n [ngClass]=\"{\r\n 'td-tools': isEditableTable() && this.editMode == 'row',\r\n 'td-tools-sticky': !isEditableTable() || this.editMode == 'cell'\r\n }\"\r\n [style]=\"\r\n applyStyle(rowData, { field: 'btns-options', header: '' }) +\r\n 'border-right: 1px solid #ddd !important; border-left: 1px solid #ddd !important;'\r\n \"\r\n >\r\n <div class=\"flex flex-row justify-content-end w-full\">\r\n \r\n <span\r\n class=\"material-symbols-outlined cursor-pointer icon-more-horiz\"\r\n style=\"font-size: 1rem; height: 10px; width: 20px\"\r\n (click)=\"menu.toggle($event); activeItem(rowData)\"\r\n >\r\n more_horiz\r\n </span>\r\n <!-- </button> -->\r\n\r\n <div *ngFor=\"let action of config.actions\">\r\n {{ criarMenusModal(rowData) }}\r\n </div>\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 </td>\r\n }\r\n \r\n <!-- ------------------------------------------------------------------------------------------------------------------------------------------- -->\r\n <!-- Controle de edi\u00E7\u00E3o -->\r\n @if(this.isEditableTable() && this.editMode == 'row'){\r\n <td class=\"td-edit\">\r\n <div class=\"flex align-items-center justify-content-center gap-2\">\r\n @if(!editing){\r\n <button\r\n [style.height]=\"'28px'\"\r\n [id]=\"'rowEdit' + rowData[config.dataKey]\"\r\n [style.width]=\"'28px'\"\r\n [disabled]=\"isDisableEditRowFunction(rowData)\"\r\n pButton\r\n pRipple\r\n type=\"button\"\r\n pInitEditableRow\r\n icon=\"pi pi-pencil\"\r\n (click)=\"onRowEditInit(rowData)\"\r\n class=\"p-button-rounded p-button-text\"\r\n ></button>\r\n }\r\n \r\n @if(editing){\r\n <button\r\n [style.height]=\"'28px'\"\r\n [style.width]=\"'28px'\"\r\n [disabled]=\"isDisableEditRowFunction(rowData)\"\r\n pButton\r\n pRipple\r\n type=\"button\"\r\n pCancelEditableRow\r\n icon=\"pi pi-times\"\r\n (click)=\"onRowEditCancel(rowData, ri)\"\r\n [id]=\"'rowCancel' + rowData[config.dataKey]\"\r\n class=\"p-button-rounded p-button-text p-button-danger\"\r\n ></button>\r\n }\r\n \r\n </div>\r\n </td>\r\n }\r\n \r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n</div>\r\n", styles: ["@charset \"UTF-8\";.td-edit{position:sticky;right:-1px;background-color:#fff;color:#5289b4}.td-tools{position:sticky;right:52px;border-right:1px solid #ddd!important;background-color:#fff;box-shadow:-5px 0 20px -10px #000000bf}.td-tools-sticky{position:sticky;right:0;border-right:3px solid #fff!important;background-color:#fff}#th-edit{position:sticky;right:0;background-color:#eaeaea}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td{text-align:center;border:1px solid #eaeaea;border-width:1px 1px;padding:0rem .5rem}:host ::ng-deep .p-datatable .p-datatable-thead>tr>th{text-align:center;padding:0rem .5rem;border-left:none;border-right:none;border-width:1px 1px;font-weight:700;color:#343a40;background:#eaeaea;transition:box-shadow .2s}.error-show{background-color:red;width:5px;height:10px}.btns-options{position:relative;left:20px}.chip-style{border:solid 1px}:host::ng-deep .p-card .p-card-content{padding:0}.material-symbols-outlined.md-19{font-size:15px}.material-symbols-outlined.md-22{font-size:19px}.checkbox-container{display:flex;align-items:center;gap:2px;margin-top:5px}#botaoFiltro:hover{color:#a9a9a9}.actionLoteBtns{align-items:center;background-color:#29b92d;color:#f2f3f5;display:flex;font-size:16px;width:2rem;height:2rem;top:2px;margin-left:.5rem;justify-content:center;text-decoration:none;text-align:center;padding:12px}:host ::ng-deep .center{display:flex;align-items:center;justify-content:center}#actionLoteBtns:hover,.actionLoteBtns:hover{background-color:#249a29!important}.actionBtns{align-items:center;background-color:transparent;color:#a9a9a9;display:flex;width:.8rem;height:.8rem;margin-left:.22rem;justify-content:center;text-decoration:none;text-align:justify;padding:11px}:host::ng-deep .material-symbols-outlined{font-family:Material Symbols Outlined;font-weight:400;font-style:normal;line-height:.9;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased}#actionBtns:hover{color:#a9a9a9}.image{border-style:solid;border-width:3.5px;border-color:#5289b4;border-radius:100%;height:55px;width:55px;padding:0;margin:0;vertical-align:middle}:host ::ng-deep .p-datatable-header{background-color:#eaeaea!important;padding:0!important;border-radius:5px!important}:host ::ng-deep .p-datatable .p-datatable-thead>tr>th{background-color:#eaeaea!important}:host ::ng-deep .p-datatable .p-datatable-thead>tr>th:first-of-type{border-radius:5px 0 0 5px}:host ::ng-deep .p-datatable .p-datatable-thead>tr>th:last-child{border-radius:0 5px 5px 0}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td{border-left:none!important;border-right:none!important}:host ::ng-deep .actionBtns,:host ::ng-deep .actionLoteBtns{border-radius:20%;box-shadow:#0000003d 0 3px 8px}.icon-more-horiz:hover,.icon-more-horiz:focus{color:#5e5e5e;transform:scale(1.1);transition:color .3s,transform .3s}:host ::ng-deep .p-checkbox .p-checkbox-box.p-highlight{border-color:#004172;background:#004172}:host ::ng-deep .p-checkbox .p-checkbox-box.p-highlight:hover{background-color:#002542}:host ::ng-deep .p-checkbox .p-checkbox-box.p-highlight:active{background-color:#002542}:host ::ng-deep .p-checkbox .p-checkbox-box.p-highlight:disabled{background-color:#002542;opacity:.4;cursor:auto}@media only screen and (min-width: 768px){.actionLoteBtns{top:-1px}}@media only screen and (max-width: 960px){:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td:has(p-tablecheckbox){border-bottom:0px!important}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td:has(img){justify-content:center!important;align-items:center!important}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td:has(img) .p-column-title{display:none!important}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td:last-child{border-bottom:1px solid #ddd!important}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td:last-child div{justify-content:center!important;align-items:center!important}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td .p-column-title{font-weight:600}}::ng-deep .p-panel.p-panel-toggleable .p-panel-header{background-color:#eaeaea!important}::ng-deep .field.grid,.formgrid.grid{padding:0rem!important}@media screen and (min-width: 961px){.moreVertBtn{position:relative;right:3px}}::ng-deep .p-datatable .p-datatable-thead>tr>th:last-of-type{border-radius:0 0 5px!important;-webkit-border-radius:0px 0px 5px 0px!important;-moz-border-radius:0px 0px 5px 0px!important;-ms-border-radius:0px 0px 5px 0px!important;-o-border-radius:0px 0px 5px 0px!important}::ng-deep .p-datatable .p-datatable-thead>tr>th:first-of-type{border-radius:0 0 0 5px!important;-webkit-border-radius:0px 0px 0px 5px!important;-moz-border-radius:0px 0px 0px 5px!important;-ms-border-radius:0px 0px 0px 5px!important;-o-border-radius:0px 0px 0px 5px!important}:host ::ng-deep p-celleditor>kv-switch>div>p-inputswitch.p-inputswitch-checked .p-inputswitch-slider:before{transform:translate(1.25rem);height:15px;margin-top:-8px;-webkit-transform:translateX(1.25rem);-moz-transform:translateX(1.25rem);-ms-transform:translateX(1.25rem);-o-transform:translateX(1.25rem)}:host ::ng-deep p-celleditor>kv-switch>div>p-inputswitch.p-inputswitch-checked .p-inputswitch-slider{height:21px}:host ::ng-deep p-celleditor>kv-switch>div>p-inputswitch{height:21px}:host ::ng-deep p-celleditor>kv-switch>div>p-inputswitch .p-inputswitch-slider:before{background:#fff;width:1rem;height:1.25rem;height:16px!important;left:.25rem;margin-top:-9px!important;margin-top:-.625rem;border-radius:50%;transition-duration:.2s}:host ::ng-deep p-celleditor>kv-switch>div>p-inputswitch:not(.p-disabled) .p-inputswitch-slider{height:21px}:host ::ng-deep .p-cell-editing{padding-top:0!important;padding-bottom:0!important}:host ::ng-deep p-dropdown-item{font-size:.1rem}.text-aviso{color:red;font-size:.85rem;font-weight:400}:host ::ng-deep .p-checkbox .p-checkbox-box{width:18px;height:18px}:host ::ng-deep .p-selectbutton .p-button{font-size:.75rem!important;height:24px;padding:11px}#btn-sizes{border-radius:50%;width:.5rem!important;height:.5rem!important;box-shadow:#0000003d 0 3px 8px}:host ::ng-deep .p-datatable.p-datatable-sm{font-size:.625rem!important}:host ::ng-deep .p-datatable.p-datatable-md{font-size:.75rem!important}:host ::ng-deep .p-datatable.p-datatable-lg{font-size:.875rem!important}:host ::ng-deep .p-datatable-sm-tr>td i>span.material-symbols-outlined{font-size:.9rem}:host ::ng-deep .p-datatable-sm-tr>td .check-edit-list>.p-checkbox .p-checkbox-box{width:15px;height:15px}:host ::ng-deep .p-datatable-sm-tr>td p-celleditor>div>.cellControl>.p-dropdown .p-dropdown-label{width:1%;padding-top:0;padding-bottom:0;font-size:.6rem}:host ::ng-deep .p-datatable-sm-tr>td p-celleditor>div>kv-input-text>span>.inputs{padding-top:0;padding-bottom:0;font-size:.6rem;height:1rem}:host ::ng-deep .p-datatable-sm-tr>td p-celleditor>div>.cellControl>span>p-inputmask>.inputs{height:1rem;padding-top:0;padding-bottom:0;font-size:.6rem}:host ::ng-deep .p-datatable-sm-tr>td p-celleditor>div>kv-switch>div>p-inputswitch>div,:host ::ng-deep .p-datatable-sm-tr>td p-celleditor>kv-switch>div>p-inputswitch,:host ::ng-deep .p-datatable-sm-tr>td p-celleditor>kv-switch>div>p-inputswitch .p-inputswitch-slider{height:.6rem!important;width:2.4rem}:host ::ng-deep .p-datatable-sm-tr>td p-celleditor>kv-switch>div>p-inputswitch .p-inputswitch-slider:before{background:#fff;width:.6rem!important;height:.6rem!important;left:.2rem;margin-top:-.35rem!important;border-radius:50%;transition-duration:.2s}:host ::ng-deep .p-datatable-sm-tr>td p-celleditor>div>kv-switch>div>p-inputswitch>div>span:before{background:#fff;width:.6rem!important;height:.6rem!important;left:.2rem;margin-top:-.35rem!important;border-radius:50%;transition-duration:.2s}:host ::ng-deep .p-datatable-md-tr>td i>span.material-symbols-outlined{font-size:1rem}:host ::ng-deep .p-datatable-md-tr>td .check-edit-list>.p-checkbox .p-checkbox-box{width:18px;height:18px}:host ::ng-deep .p-datatable-md-tr>td p-celleditor>div>.cellControl>.p-dropdown .p-dropdown-label{width:1%;padding-top:0;padding-bottom:0;font-size:.7rem}:host ::ng-deep .p-datatable-md-tr>td p-celleditor>div>kv-input-text>span>.inputs{padding-top:0;padding-bottom:0;font-size:.7rem;height:1rem}:host ::ng-deep .p-datatable-md-tr>td p-celleditor>div>.cellControl>span>p-inputmask>.inputs{height:1rem;padding-top:0;padding-bottom:0;font-size:.7rem}:host ::ng-deep .p-datatable-md-tr>td p-celleditor>div>kv-switch>div>p-inputswitch>div,:host ::ng-deep .p-datatable-md-tr>td p-celleditor>kv-switch>div>p-inputswitch,:host ::ng-deep .p-datatable-md-tr>td p-celleditor>kv-switch>div>p-inputswitch .p-inputswitch-slider{height:.83rem!important;width:2.7rem}:host ::ng-deep .p-datatable-md-tr>td p-celleditor>kv-switch>div>p-inputswitch .p-inputswitch-slider:before{background:#fff;width:.7rem!important;height:.7rem!important;left:.25rem;margin-top:-.35rem!important;border-radius:50%;transition-duration:.2s}:host ::ng-deep .p-datatable-md-tr>td p-celleditor>div>kv-switch>div>p-inputswitch>div>span:before{background:#fff;width:.7rem;height:.7rem;left:.25rem;margin-top:-.4rem;border-radius:50%;transition-duration:.2s}:host ::ng-deep .p-datatable-lg-tr>td i>span.material-symbols-outlined{font-size:1.1rem}:host ::ng-deep .p-datatable-lg-tr>td p-celleditor>div>kv-input-text>span>.inputs{padding-top:0;padding-bottom:0;font-size:.8rem;height:1rem}:host ::ng-deep .p-datatable-lg-tr>td p-celleditor>div>.cellControl>.p-dropdown .p-dropdown-label{padding-top:0;padding-bottom:0;font-size:.8rem}:host ::ng-deep .p-datatable-lg-tr>td p-celleditor>div>.cellControl>span>p-inputmask>.inputs{height:1rem;padding-top:0;padding-bottom:0;font-size:.8rem}:host ::ng-deep .p-datatable-sm-tr>td{padding-top:0!important;padding-top:.05rem!important;padding-bottom:.05rem!important}:host ::ng-deep .p-datatable-md-tr>td,:host ::ng-deep .p-datatable-lg-tr>td{padding:.15rem!important}.p-datatable.p-datatable-smth{font-size:.6rem!important}.p-datatable.p-datatable-dmth{font-size:.7rem!important}.p-datatable.p-datatable-lgth{font-size:.8rem!important}:host ::ng-deep .p-datatable.p-datatable-sm * p-celleditor>div>p-dropdown>.p-dropdown:not(.p-paginator-rpp-options) p-celleditor>div>p-dropdown>.p-dropdown:not(.p-paginator-rpp-options){height:15px!important}:host ::ng-deep .p-datatable.p-datatable-md * p-celleditor>div>p-dropdown>.p-dropdown:not(.p-paginator-rpp-options) p-celleditor>div>p-dropdown>.p-dropdown:not(.p-paginator-rpp-options){height:25px!important}:host ::ng-deep .p-datatable.p-datatable-lg * p-celleditor>div>p-dropdown>.p-dropdown:not(.p-paginator-rpp-options) p-celleditor>div>p-dropdown>.p-dropdown:not(.p-paginator-rpp-options){height:30px!important}:host ::ng-deep p-celleditor>kv-switch>div>p-inputswitch .p-inputswitch-slider{height:21px!important}:host ::ng-deep .teste>.p-button{background:#eaeaea!important;color:#a9a9a9;border:none;box-shadow:#0000003d 0 3px 8px;height:20px}::ng-deep .menuSizes>p-tieredmenusub>.p-tieredmenu-root-list>li:first-child{font-size:.6rem}::ng-deep .menuSizes>p-tieredmenusub>.p-tieredmenu-root-list>li:last-child{font-size:.8rem}.tag{width:5px;height:25px;border-radius:.25rem}:host ::ng-deep .p-speeddial-button.p-button.p-button-icon-only{width:2rem;height:2rem;font-size:1rem}.item-circle{width:4rem;height:2rem;padding:1rem;font-size:.8rem;border-radius:17%;display:flex;align-items:center;justify-content:center;background:#eaeaea!important;box-shadow:#0000003d 0 3px 13px}:host ::ng-deep p-speeddial>div>button>span.material-symbols-outlined.ng-star-inserted{font-size:1.1rem}:host ::ng-deep .check-edit-list>div.p-checkbox.p-component{height:1rem}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td:first-child{border-left:1px solid #ddd!important}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td:last-child{border-right:1px solid #ddd!important}:host ::ng-deep .p-datatable-wrapper::-webkit-scrollbar:hover{background-color:#dededebf}:host ::ng-deep .p-datatable-wrapper::-webkit-scrollbar{width:6px;height:3px}:host ::ng-deep .p-datatable-wrapper:hover::-webkit-scrollbar-thumb{border-left:2px solid white;background-color:#00000080}:host ::ng-deep .p-datatable-wrapper::-webkit-scrollbar-thumb{border-radius:4px;background-color:transparent}:host ::ng-deep .p-datatable-wrapper::-webkit-scrollbar-track{border-left:2px solid white;background-color:#dededebf}:host ::ng-deep .p-datatable>.p-datatable-wrapper{overflow-y:auto}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "directive", type: i1$3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i5$2.AutoFocus, selector: "[pAutoFocus]", inputs: ["autofocus"] }, { kind: "directive", type: i6.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "directive", type: i1$1.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "component", type: i7$2.ContextMenu, selector: "p-contextMenu", inputs: ["model", "triggerEvent", "target", "global", "style", "styleClass", "appendTo", "autoZIndex", "baseZIndex", "id", "ariaLabel", "ariaLabelledBy", "pressDelay"], outputs: ["onShow", "onHide"] }, { kind: "component", type: i4.Dropdown, selector: "p-dropdown", inputs: ["id", "scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "variant", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "disabled", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "filterValue", "options"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "directive", type: i5$3.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: "component", type: i11.Panel, selector: "p-panel", inputs: ["toggleable", "header", "collapsed", "style", "styleClass", "iconPos", "expandIcon", "collapseIcon", "showHeader", "toggler", "transitionOptions"], outputs: ["collapsedChange", "onBeforeToggle", "onAfterToggle"] }, { kind: "directive", type: i2.Ripple, selector: "[pRipple]" }, { kind: "component", type: i13.TieredMenu, selector: "p-tieredMenu", inputs: ["model", "popup", "style", "styleClass", "appendTo", "autoZIndex", "baseZIndex", "autoDisplay", "showTransitionOptions", "hideTransitionOptions", "id", "ariaLabel", "ariaLabelledBy", "disabled", "tabindex"], outputs: ["onShow", "onHide"] }, { kind: "component", type: i14.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll", "virtualRowHeight"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i14.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "directive", type: i14.ContextMenuRow, selector: "[pContextMenuRow]", inputs: ["pContextMenuRow", "pContextMenuRowIndex", "pContextMenuRowDisabled"] }, { kind: "directive", type: i14.ReorderableColumn, selector: "[pReorderableColumn]", inputs: ["pReorderableColumnDisabled"] }, { kind: "directive", type: i14.EditableColumn, selector: "[pEditableColumn]", inputs: ["pEditableColumn", "pEditableColumnField", "pEditableColumnRowIndex", "pEditableColumnDisabled", "pFocusCellSelector"] }, { kind: "component", type: i14.CellEditor, selector: "p-cellEditor" }, { kind: "component", type: i14.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "component", type: i14.TableCheckbox, selector: "p-tableCheckbox", inputs: ["disabled", "value", "index", "inputId", "name", "required", "ariaLabel"] }, { kind: "component", type: i14.TableHeaderCheckbox, selector: "p-tableHeaderCheckbox", inputs: ["disabled", "inputId", "name", "ariaLabel"] }, { kind: "directive", type: i14.EditableRow, selector: "[pEditableRow]", inputs: ["pEditableRow", "pEditableRowDisabled"] }, { kind: "directive", type: i14.InitEditableRow, selector: "[pInitEditableRow]" }, { kind: "directive", type: i14.CancelEditableRow, selector: "[pCancelEditableRow]" }, { kind: "component", type: i15.Toast, selector: "p-toast", inputs: ["key", "autoZIndex", "baseZIndex", "life", "style", "styleClass", "position", "preventOpenDuplicates", "preventDuplicates", "showTransformOptions", "hideTransformOptions", "showTransitionOptions", "hideTransitionOptions", "breakpoints"], outputs: ["onClose"] }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: KvInputCalendarComponent, selector: "kv-input-calendar", inputs: ["isYear", "isMonthYear", "minDate", "maxDate", "showButtonBar", "showIcon", "showTime", "selectionMode"], outputs: ["onSelectionChange", "onSelectionValue"] }, { kind: "component", type: KvInputMaskComponent, selector: "kv-input-mask", inputs: ["mask"], outputs: ["onComplete"] }, { kind: "component", type: KvInputNumberComponent, selector: "kv-input-number", inputs: ["mode", "digits", "min", "max", "suffix"] }, { kind: "component", type: KvInputTextComponent, selector: "kv-input-text", inputs: ["textCaptalized"] }, { kind: "component", type: KvSwitchComponent, selector: "kv-switch", inputs: ["readonly", "switchValue"], outputs: ["onSwitchChange"] }, { kind: "component", type: KvButtonComponent, selector: "kv-button", inputs: ["fullWidth", "type", "loading", "severity", "size", "icon", "label", "disabled"], outputs: ["onClick"] }, { kind: "pipe", type: i1.DatePipe, name: "date" }, { kind: "pipe", type: MaskPipe, name: "mask" }] }); }
|
|
7279
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.8", type: KvTableEditComponent, selector: "kv-table-edit", inputs: { enableSizes: "enableSizes", editMode: "editMode", hideBtnEdit: "hideBtnEdit" }, outputs: { onSave: "onSave", filterField: "filterField" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div class=\"card\" id=\"tamanhotabela\" [style.font-size]=\"'1px'\">\r\n <p-toast></p-toast>\r\n\r\n @if(filtrosAvancados){\r\n <p-panel\r\n header=\"Filtros avan\u00E7ados\"\r\n [toggleable]=\"true\"\r\n [collapsed]=\"true\"\r\n (collapsedChange)=\"collapsed = !collapsed\"\r\n [style]=\"{ 'margin-bottom': '2px' }\"\r\n >\r\n <ng-template pTemplate=\"headericons\">\r\n @if (!collapsed) {\r\n <i class=\"pi pi-filter\"></i>\r\n }\r\n <!-- \u00CDcone quando o painel est\u00E1 aberto -->\r\n @if (collapsed) {\r\n <i class=\"pi pi-minus\"></i>\r\n }\r\n <!-- \u00CDcone quando o painel est\u00E1 fechado -->\r\n </ng-template>\r\n <ng-content></ng-content>\r\n </p-panel>\r\n }\r\n\r\n <p-contextMenu #cm [model]=\"itemsContextMenu\"></p-contextMenu>\r\n <p-table\r\n #te\r\n [editMode]=\"editMode\"\r\n (onEditComplete)=\"onEditComplete($event)\"\r\n (onEditInit)=\"onEditInit($event)\"\r\n [reorderableColumns]=\"config.reorderableColumns || false\"\r\n *ngIf=\"config\"\r\n [value]=\"dataSource\"\r\n [dataKey]=\"config.dataKey\"\r\n [columns]=\"config.columns\"\r\n [scrollable]=\"true\"\r\n appendTo=\"body\"\r\n [styleClass]=\"selectedSize.class\"\r\n [(selection)]=\"selectedItems\"\r\n [rowSelectable]=\"isRowSelectable\"\r\n [globalFilterFields]=\"globalFilterFields\"\r\n [rows]=\"rows\"\r\n [paginator]=\"paginator\"\r\n [rowsPerPageOptions]=\"rowsPerPageOptions\"\r\n [showCurrentPageReport]=\"true\"\r\n currentPageReportTemplate=\"{first} - {last} de {totalRecords}\"\r\n (selectionChange)=\"selectionChange($event)\"\r\n [rowHover]=\"true\"\r\n [totalRecords]=\"totalRecords\"\r\n [lazy]=\"config.lazy\"\r\n (onLazyLoad)=\"paginate($event)\"\r\n [groupRowsBy]=\"config.fieldGroup\"\r\n paginatorDropdownAppendTo=\"body\"\r\n [showFirstLastIcon]=\"showFirstLastIcon\"\r\n [pageLinks]=\"pageLinksOptions\"\r\n [scrollable]=\"isTableScrollable\"\r\n [scrollHeight]=\"scrollHeight\"\r\n [rowTrackBy]=\"rowTrackBy\"\r\n [(contextMenuSelection)]=\"selectedProduct\"\r\n [contextMenu]=\"isEditableTable() ? cm : null\"\r\n >\r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n\r\n @if (config.enableCation || enableSizes){\r\n <ng-template pTemplate=\"caption\">\r\n <div\r\n class=\"flex flex-row flex-wrap justify-content-between align-items-center grid formgrid p-fluid col-12 p-0 m-0\"\r\n >\r\n <div class=\"col-12 flex flex-column\">\r\n @if (config.title) {\r\n <div class=\"text-md font-bold my-3\">\r\n {{ config.title }}\r\n </div>\r\n } @if (config.subtitle) {\r\n <div class=\"text-sm mb-4 font-medium\">\r\n {{ config.subtitle }}\r\n </div>\r\n }\r\n </div>\r\n\r\n <div\r\n class=\"flex flex-row align-items-center md:col-6 lg:col-4 {{\r\n tamanhoTela < 768 ? 'col-10' : 'col-12'\r\n }} mt-1 mb-2 gap-1\"\r\n >\r\n \r\n @if (config.enableFilter) {\r\n <span 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(te, $event)\"\r\n placeholder=\"Pesquisar...\"\r\n class=\"h-2rem\"\r\n autocomplete=\"off\"\r\n />\r\n </span>\r\n }\r\n\r\n @if(enableSizes){\r\n <div class=\"sizes-controls\">\r\n \r\n <kv-button (click)=\"menu.toggle($event)\"\r\n [severity]=\"'tertiary'\"\r\n [icon]=\"'match_case'\"\r\n [pTooltip]=\"'Tamanho da fonte'\"\r\n >\r\n </kv-button>\r\n \r\n <p-tieredMenu\r\n [style]=\"{ 'font-size': '0.7rem' }\"\r\n styleClass=\"menuSizes\"\r\n appendTo=\"body\"\r\n #menu\r\n [model]=\"sizes\"\r\n [popup]=\"true\"\r\n >\r\n <ng-template let-item pTemplate=\"item\">\r\n <div\r\n class=\"cursor-pointer flex gap-2 align-items-center pl-1 m-2 menu-sizes\"\r\n (click)=\"item.command()\"\r\n >\r\n @if(this.selectedSize.size != item.size){\r\n <div\r\n class=\"tag\"\r\n [style.background-color]=\"'#EAEAEA'\"\r\n ></div>\r\n }\r\n \r\n @if(this.selectedSize.size == item.size){\r\n <div\r\n class=\"tag\"\r\n [style.background-color]=\"'#1DA750'\"\r\n ></div>\r\n }\r\n \r\n {{ item.label }}\r\n </div>\r\n </ng-template>\r\n </p-tieredMenu>\r\n </div>\r\n }\r\n </div>\r\n\r\n @if(isEditing){\r\n <span class=\"text-aviso\">\r\n Tabela em modo de edi\u00E7\u00E3o\r\n </span>\r\n }\r\n \r\n <div class=\"flex flex-row col-2 justify-content-end gap-2\">\r\n @for (action of config.actionsLote; track i; let i = $index) {\r\n @if(!isEditing){\r\n <div class=\"flex align-items-center justify-content-center\">\r\n @if ((selectedItems.length > 0 || action.showAcoesLote) &&\r\n (getOrExecute(action.visible, selectedItems) ?? true)) {\r\n <kv-button\r\n (onClick)=\"action?.command(); activeItemLote(selectedItems)\"\r\n [pTooltip]=\"getOrExecute(action.tooltip, selectedItems)\"\r\n [tooltipPosition]=\"\r\n (getOrExecute(action.tooltip, selectedItems)?.length ??\r\n 0 > 7) &&\r\n config.actionsLote &&\r\n i == config.actionsLote.length - 1\r\n ? 'left'\r\n : 'bottom'\r\n \"\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 }\r\n }\r\n\r\n @if (isEditableTable() && !hideBtnEdit) {\r\n <div>\r\n <kv-button\r\n (click)=\"this.isEditing = !this.isEditing\"\r\n [pTooltip]=\"!isEditing ? 'Habilitar Edi\u00E7\u00E3o' : 'Desabilitar Edi\u00E7\u00E3o'\"\r\n [tooltipPosition]=\"'left'\"\r\n [severity]=\"'tertiary'\"\r\n [icon]=\"'edit_square'\"\r\n >\r\n </kv-button>\r\n </div>\r\n }\r\n </div>\r\n\r\n <!---------------->\r\n \r\n </div>\r\n </ng-template>\r\n }\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n @if(config.enableSelect && !isEditing){\r\n <th\r\n [class]=\"selectedSize.class + 'th'\"\r\n >\r\n <p-tableHeaderCheckbox\r\n (click)=\"activeItemLote(selectedItems)\"\r\n ></p-tableHeaderCheckbox>\r\n </th>\r\n }\r\n @for(col of columns; track $index){\r\n <th\r\n [pSortableColumn]=\"col.field\"\r\n [pSortableColumnDisabled]=\"col.sortable === false\"\r\n [style.min-width]=\"col.width * selectedSize.size + 'px'\"\r\n pReorderableColumn\r\n [class]=\"selectedSize.class + 'th'\"\r\n \r\n >\r\n <div\r\n [class]=\"\r\n centralizarColunas(col) && alignColunasHeader(col) == ''\r\n ? 'flex flex-row justify-content-center'\r\n : 'flex flex-row'\r\n \"\r\n [style]=\"alignColunasHeader(col)\"\r\n >\r\n <span class=\"text-xs font-medium\">{{ col.header }}</span>\r\n @if(col.sortable === true) {\r\n <p-sortIcon\r\n [field]=\"col.field\"\r\n style=\"font-size: 10px\"\r\n ></p-sortIcon>\r\n }\r\n @if(col.headerTooltip){\r\n <span\r\n class=\"material-symbols-outlined flex align-items-center\"\r\n [pTooltip]=\"col.headerTooltip\"\r\n >\r\n info\r\n </span>\r\n }\r\n \r\n </div>\r\n </th>\r\n }\r\n \r\n @if(!isEditing && config.actions && config.actions.length > 0){\r\n <th></th>\r\n }\r\n\r\n @if(isEditableTable() && this.editMode == 'row'){\r\n <th\r\n id=\"th-edit\"\r\n style=\"width: 20px\"\r\n >\r\n Editar\r\n </th>\r\n }\r\n \r\n </tr>\r\n </ng-template>\r\n\r\n\r\n \r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n\r\n <ng-template\r\n pTemplate=\"body\"\r\n let-rowData\r\n let-editing=\"editing\"\r\n let-ri=\"rowIndex\"\r\n let-columns=\"columns\"\r\n let-rowgroup=\"rowgroup\"\r\n let-rowspan=\"rowspan\"\r\n >\r\n <tr\r\n [pEditableRow]=\"rowData\"\r\n [pEditableRowDisabled]=\"false\"\r\n [pContextMenuRow]=\"{rowData, editing}\"\r\n [class]=\"selectedSize.class + '-tr'\"\r\n (dblclick)=\"doubleClick($event, rowData)\"\r\n >\r\n @if(config.enableSelect && !isEditing){\r\n <td\r\n [style]=\"applyStyle(rowData, { field: 'check-box', header: '' })\"\r\n >\r\n \r\n <p-tableCheckbox\r\n class=\"check-edit-list\"\r\n [value]=\"rowData\"\r\n [disabled]=\"isDisabledCheckbox(rowData)\"\r\n (click)=\"activeItemLote(selectedItems)\"\r\n ></p-tableCheckbox>\r\n </td>\r\n }\r\n @for (col of columns; track i; let i = $index){\r\n <ng-container>\r\n <!-- FIXME: Testar a implementa\u00E7\u00E3o abaixo e mesaclar as duas formas -->\r\n \r\n <ng-template #templateInput let-rowData=\"rowData\" let-col=\"col\">\r\n <ng-container *ngIf=\"isEditing; else templatevisualedicao\">\r\n <ng-container [ngSwitch]=\"col.fieldControlType\">\r\n <ng-container *ngSwitchCase=\"'text'\">\r\n <div [style.width]=\"col.width\" class=\"grid formgrid p-fluid\">\r\n <kv-input-text\r\n [disabled]=\"isDisableEditRowCellFunction(rowData, col)\"\r\n class=\"cellControl col\"\r\n [(ngModel)]=\"rowData[col.field]\"\r\n [required]=\"col.required ?? true\"\r\n ></kv-input-text>\r\n </div>\r\n </ng-container>\r\n \r\n <ng-container *ngSwitchCase=\"'number'\">\r\n <div [style.width]=\"col.width\" class=\"grid formgrid p-fluid\">\r\n <kv-input-number\r\n [disabled]=\"isDisableEditRowCellFunction(rowData, col)\"\r\n class=\"cellControl col\"\r\n [(ngModel)]=\"rowData[col.field]\"\r\n [required]=\"col.required ?? true\"\r\n ></kv-input-number>\r\n </div>\r\n </ng-container>\r\n \r\n <ng-container *ngSwitchCase=\"'mask'\">\r\n <div [style.width]=\"col.width\" class=\"grid formgrid p-fluid\">\r\n <kv-input-mask\r\n [disabled]=\"isDisableEditRowCellFunction(rowData, col)\"\r\n class=\"cellControl col\"\r\n [mask]=\"col.mask\"\r\n [required]=\"col.required ?? true\"\r\n [(ngModel)]=\"rowData[col.field]\"\r\n ></kv-input-mask>\r\n </div>\r\n </ng-container>\r\n \r\n <ng-container *ngSwitchCase=\"'switch'\">\r\n <div [style.width]=\"col.width\" class=\"grid formgrid p-fluid\">\r\n <kv-switch\r\n [disabled]=\"isDisableEditRowCellFunction(rowData, col)\"\r\n class=\"cellControl col\"\r\n [(ngModel)]=\"rowData[col.field]\"\r\n ></kv-switch>\r\n </div>\r\n </ng-container>\r\n \r\n <ng-container *ngSwitchCase=\"'calendar'\">\r\n <div [style.width]=\"col.width\">\r\n <div\r\n [style.width]=\"col.width\"\r\n class=\"grid formgrid p-fluid\"\r\n >\r\n <kv-input-calendar\r\n class=\"cellControl col\"\r\n [(ngModel)]=\"rowData[col.field]\"\r\n ></kv-input-calendar>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'dropdown'\">\r\n <div [style.width]=\"col.width\" class=\"grid formgrid p-fluid\">\r\n <p-dropdown\r\n [disabled]=\"isDisableEditRowCellFunction(rowData, col)\"\r\n class=\"cellControl col\"\r\n appendTo=\"body\"\r\n [panelStyle]=\"{ 'font-size': '0.75rem' }\"\r\n [optionLabel]=\"col.fieldDropDownControl.descricaoobjeto\"\r\n [optionValue]=\"col.fieldDropDownControl.idobjeto\"\r\n [options]=\"\r\n col.fieldDropDownControl.fieldControlDropdownSource\r\n \"\r\n [(ngModel)]=\"rowData[col.field]\"\r\n >\r\n </p-dropdown>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n \r\n <ng-template #templatevisualedicao>\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n templateOutput;\r\n context: { rowData: rowData, col: col }\r\n \"\r\n ></ng-container>\r\n </ng-template>\r\n </ng-template>\r\n \r\n <ng-template #templateOutput let-rowData=\"rowData\" let-col=\"col\">\r\n <ng-container [ngSwitch]=\"col.fieldControlType\">\r\n <ng-container *ngSwitchCase=\"'dropdown'\">\r\n <ng-container *ngIf=\"rowData[col.field]\">\r\n {{ transformValueDrop(retornaDescricaoDrop(rowData, col), col) }}\r\n </ng-container>\r\n </ng-container>\r\n \r\n <ng-container *ngSwitchCase=\"'switch'\">\r\n <kv-switch\r\n [(ngModel)]=\"rowData[col.field]\"\r\n [disabled]=\"true\"\r\n ></kv-switch>\r\n </ng-container>\r\n \r\n <ng-container *ngSwitchCase=\"'calendar'\">\r\n {{ rowData[col.field] | date }}\r\n </ng-container>\r\n \r\n <ng-container *ngSwitchCase=\"'mask'\">\r\n {{ rowData[col.field] | mask : col.mask }}\r\n </ng-container>\r\n \r\n <ng-container *ngSwitchDefault>\r\n {{ transformValue(rowData, col) }}\r\n </ng-container>\r\n </ng-container>\r\n </ng-template>\r\n \r\n @if(editMode == 'cell' && col.fieldControlType){\r\n <td\r\n [pEditableColumn]=\"rowData\"\r\n [pEditableColumnField]=\"col.field\"\r\n [pEditableColumnRowIndex]=\"rowData[config.dataKey]\"\r\n [id]=\"'rowTable' + rowData[config.dataKey]\"\r\n (click)=\"activeItem(rowData)\"\r\n (dblclick)=\"dbClickEdit()\"\r\n class=\"rowTable\"\r\n [style]=\"\r\n applyStyle(rowData, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col)\r\n \"\r\n [pTooltip]=\"returnTooltipRow(rowData, col)\"\r\n >\r\n <p-cellEditor>\r\n <ng-container>\r\n <ng-template pTemplate=\"input\">\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n templateInput;\r\n context: { rowData: rowData, col: col }\r\n \"\r\n ></ng-container>\r\n </ng-template>\r\n \r\n <ng-template pTemplate=\"output\">\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n templateOutput;\r\n context: { rowData: rowData, col: col }\r\n \"\r\n ></ng-container>\r\n </ng-template>\r\n </ng-container>\r\n \r\n </p-cellEditor>\r\n </td>\r\n }\r\n \r\n <!-- NOTE: Edi\u00E7\u00E3o de linha -->\r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n \r\n <!-- Celula que armazena os controles de edi\u00E7\u00E3o para os campos -->\r\n @if(false && col.fieldControlType && editMode == 'row'){\r\n <td\r\n [id]=\"'rowTable' + rowData[config.dataKey]\"\r\n (click)=\"activeItem(rowData)\"\r\n (dblclick)=\"dbClickEdit()\"\r\n class=\"rowTable\"\r\n [style]=\"\r\n applyStyle(rowData, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col)\r\n \"\r\n [pTooltip]=\"returnTooltipRow(rowData, col)\"\r\n >\r\n <p-cellEditor\r\n [ngClass]=\"{ switch: col.fieldControlType == 'switch' }\"\r\n >\r\n <ng-template pTemplate=\"input\">\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n templateInput;\r\n context: { rowData: rowData, col: col }\r\n \"\r\n ></ng-container>\r\n </ng-template>\r\n \r\n <ng-template pTemplate=\"output\">\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n templateOutput;\r\n context: { rowData: rowData, col: col }\r\n \"\r\n ></ng-container>\r\n </ng-template>\r\n </p-cellEditor>\r\n </td>\r\n }\r\n \r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n \r\n <td\r\n *ngIf=\"rowgroup && !col.template\"\r\n [attr.rowspan]=\"rowgroup && col.grouped ? rowspan : null\"\r\n class=\"rowTable\"\r\n [style]=\"\r\n applyStyle(rowData, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col)\r\n \"\r\n [pTooltip]=\"returnTooltipRow(rowData, col)\"\r\n >\r\n <span class=\"p-column-title\">{{ col.header }}:</span>\r\n \r\n <span\r\n *ngIf=\"!isBooleanField(rowData, col); else booleanField\"\r\n [class]=\"returnRowClass(rowData, col)\"\r\n >\r\n <span\r\n *ngIf=\"\r\n !isChipField(col) && !col.iconField && !isImageField(col)\r\n \"\r\n >\r\n <i *ngIf=\"col.icon\" [class]=\"col.icon + ' mr-2'\"></i>\r\n {{ transformValue(rowData, col) }}\r\n </span>\r\n \r\n <div *ngIf=\"isChipField(col) && !col.iconField\">\r\n <span\r\n [class]=\"returnClassChip(rowData, col)\"\r\n [pTooltip]=\"returnTooltipIcon(rowData, col)\"\r\n >{{ transformValue(rowData, col) }}</span\r\n >\r\n </div>\r\n </span>\r\n \r\n <span *ngIf=\"isImageField(col)\">\r\n <span>\r\n <img class=\"image\" [src]=\"loadImage(rowData, col)\" />\r\n </span>\r\n </span>\r\n \r\n <i\r\n *ngIf=\"col.iconField\"\r\n [ngClass]=\"{\r\n 'material-icons': col.indIconMaterial,\r\n 'material-symbols-outlined mr-2': !col.indIconMaterial\r\n }\"\r\n [pTooltip]=\"returnTooltipIcon(rowData, col)\"\r\n >\r\n {{ returnClassIcon(rowData, col) }}\r\n </i>\r\n \r\n <ng-template #booleanField>\r\n <i\r\n *ngIf=\"!col.iconField && !isSwitchField(col)\"\r\n [ngClass]=\"\r\n rowData[col.field] ? 'text-green-500' : 'text-red-500'\r\n \"\r\n ><span class=\"material-symbols-outlined\">\r\n {{ rowData[col.field] ? \"check\" : \"close\" }}\r\n </span>\r\n </i>\r\n \r\n <span\r\n *ngIf=\"isSwitchField(col)\"\r\n [class]=\"returnRowClass(rowData, col)\"\r\n >\r\n <kv-switch\r\n (onSwitchChange)=\"onSwitchChange($event, rowData, col)\"\r\n [disabled]=\"col?.onlyReadField ?? true\"\r\n [switchValue]=\"transformValue(rowData, col)\"\r\n >\r\n </kv-switch>\r\n </span>\r\n </ng-template>\r\n </td>\r\n \r\n <td\r\n *ngIf=\"\r\n !rowgroup &&\r\n !col.grouped &&\r\n !col.template &&\r\n !col.fieldControlType\r\n \"\r\n [style]=\"\r\n applyStyle(rowData, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col)\r\n \"\r\n class=\"rowTable\"\r\n [pTooltip]=\"returnTooltipRow(rowData, col)\"\r\n >\r\n <span class=\"p-column-title\">{{ col.header }}:</span>\r\n \r\n <span\r\n *ngIf=\"!isBooleanField(rowData, col); else booleanField\"\r\n [class]=\"returnRowClass(rowData, col)\"\r\n >\r\n <span\r\n *ngIf=\"\r\n !isChipField(col) && !col.iconField && !isImageField(col)\r\n \"\r\n >\r\n <i *ngIf=\"col.icon\" [class]=\"col.icon + ' mr-2'\"></i>\r\n {{ transformValue(rowData, col) }}\r\n </span>\r\n \r\n <div *ngIf=\"isChipField(col) && !col.iconField\">\r\n <span\r\n [class]=\"returnClassChip(rowData, col)\"\r\n [pTooltip]=\"returnTooltipIcon(rowData, col)\"\r\n >\r\n {{ transformValue(rowData, col) }}</span\r\n >\r\n </div>\r\n </span>\r\n \r\n <span *ngIf=\"isImageField(col)\">\r\n <span>\r\n <img class=\"image\" [src]=\"loadImage(rowData, col)\" />\r\n </span>\r\n </span>\r\n \r\n <i\r\n *ngIf=\"col.iconField\"\r\n [ngClass]=\"{\r\n 'material-icons': col.indIconMaterial,\r\n 'material-symbols-outlined mr-2': !col.indIconMaterial\r\n }\"\r\n [pTooltip]=\"returnTooltipIcon(rowData, col)\"\r\n >\r\n {{ returnClassIcon(rowData, col) }}\r\n </i>\r\n \r\n <ng-template #booleanField>\r\n <i\r\n *ngIf=\"!col.iconField && !isSwitchField(col)\"\r\n [ngClass]=\"\r\n rowData[col.field] ? 'text-green-500' : 'text-red-500'\r\n \"\r\n ><span class=\"material-symbols-outlined\">\r\n {{ rowData[col.field] ? \"check\" : \"close\" }}\r\n </span>\r\n </i>\r\n \r\n <span\r\n *ngIf=\"isSwitchField(col)\"\r\n [class]=\"returnRowClass(rowData, col)\"\r\n >\r\n <kv-switch\r\n (onSwitchChange)=\"onSwitchChange($event, rowData, col)\"\r\n [disabled]=\"col?.onlyReadField ?? true\"\r\n [switchValue]=\"transformValue(rowData, col)\"\r\n >\r\n </kv-switch>\r\n </span>\r\n </ng-template>\r\n </td>\r\n \r\n <td\r\n *ngIf=\"col.template && !isEditableTable()\"\r\n [style]=\"\r\n applyStyle(rowData, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col)\r\n \"\r\n class=\"rowTable\"\r\n >\r\n <span class=\"p-column-title\">{{ col.header }}:</span>\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 </td>\r\n </ng-container>\r\n }\r\n \r\n\r\n <!-- ------------------------------------------------------------------------------------------------------------------------------------------- -->\r\n <!-- Controle de a\u00E7\u00E3o -->\r\n @if(!isEditing && config.actions && config.actions.length > 0){\r\n <td\r\n [ngClass]=\"{\r\n 'td-tools': isEditableTable() && this.editMode == 'row',\r\n 'td-tools-sticky': !isEditableTable() || this.editMode == 'cell'\r\n }\"\r\n [style]=\"\r\n applyStyle(rowData, { field: 'btns-options', header: '' }) +\r\n 'border-right: 1px solid #ddd !important; border-left: 1px solid #ddd !important;'\r\n \"\r\n >\r\n <div class=\"flex flex-row justify-content-end w-full\">\r\n \r\n <span\r\n class=\"material-symbols-outlined cursor-pointer icon-more-horiz\"\r\n style=\"font-size: 1rem; height: 10px; width: 20px\"\r\n (click)=\"menu.toggle($event); activeItem(rowData)\"\r\n >\r\n more_horiz\r\n </span>\r\n <!-- </button> -->\r\n\r\n <div *ngFor=\"let action of config.actions\">\r\n {{ criarMenusModal(rowData) }}\r\n </div>\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 </td>\r\n }\r\n \r\n <!-- ------------------------------------------------------------------------------------------------------------------------------------------- -->\r\n <!-- Controle de edi\u00E7\u00E3o -->\r\n @if(this.isEditableTable() && this.editMode == 'row'){\r\n <td class=\"td-edit\">\r\n <div class=\"flex align-items-center justify-content-center gap-2\">\r\n @if(!editing){\r\n <button\r\n [style.height]=\"'28px'\"\r\n [id]=\"'rowEdit' + rowData[config.dataKey]\"\r\n [style.width]=\"'28px'\"\r\n [disabled]=\"isDisableEditRowFunction(rowData)\"\r\n pButton\r\n pRipple\r\n type=\"button\"\r\n pInitEditableRow\r\n icon=\"pi pi-pencil\"\r\n (click)=\"onRowEditInit(rowData)\"\r\n class=\"p-button-rounded p-button-text\"\r\n ></button>\r\n }\r\n \r\n @if(editing){\r\n <button\r\n [style.height]=\"'28px'\"\r\n [style.width]=\"'28px'\"\r\n [disabled]=\"isDisableEditRowFunction(rowData)\"\r\n pButton\r\n pRipple\r\n type=\"button\"\r\n pCancelEditableRow\r\n icon=\"pi pi-times\"\r\n (click)=\"onRowEditCancel(rowData, ri)\"\r\n [id]=\"'rowCancel' + rowData[config.dataKey]\"\r\n class=\"p-button-rounded p-button-text p-button-danger\"\r\n ></button>\r\n }\r\n \r\n </div>\r\n </td>\r\n }\r\n \r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n</div>\r\n", styles: ["@charset \"UTF-8\";.td-edit{position:sticky;right:-1px;background-color:#fff;color:#5289b4}.td-tools{position:sticky;right:52px;border-right:1px solid #ddd!important;background-color:#fff;box-shadow:-5px 0 20px -10px #000000bf}.td-tools-sticky{position:sticky;right:0;border-right:3px solid #fff!important;background-color:#fff}#th-edit{position:sticky;right:0;background-color:#eaeaea}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td{text-align:center;border:1px solid #eaeaea;border-width:1px 1px;padding:0rem .5rem}:host ::ng-deep .p-datatable .p-datatable-thead>tr>th{text-align:center;padding:0rem .5rem;border-left:none;border-right:none;border-width:1px 1px;font-weight:700;color:#343a40;background:#eaeaea;transition:box-shadow .2s}.error-show{background-color:red;width:5px;height:10px}.btns-options{position:relative;left:20px}.chip-style{border:solid 1px}:host::ng-deep .p-card .p-card-content{padding:0}.material-symbols-outlined.md-19{font-size:15px}.material-symbols-outlined.md-22{font-size:19px}.checkbox-container{display:flex;align-items:center;gap:2px;margin-top:5px}#botaoFiltro:hover{color:#a9a9a9}.actionLoteBtns{align-items:center;background-color:#29b92d;color:#f2f3f5;display:flex;font-size:16px;width:2rem;height:2rem;top:2px;margin-left:.5rem;justify-content:center;text-decoration:none;text-align:center;padding:12px}:host ::ng-deep .center{display:flex;align-items:center;justify-content:center}#actionLoteBtns:hover,.actionLoteBtns:hover{background-color:#249a29!important}.actionBtns{align-items:center;background-color:transparent;color:#a9a9a9;display:flex;width:.8rem;height:.8rem;margin-left:.22rem;justify-content:center;text-decoration:none;text-align:justify;padding:11px}:host::ng-deep .material-symbols-outlined{font-family:Material Symbols Outlined;font-weight:400;font-style:normal;line-height:.9;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased}#actionBtns:hover{color:#a9a9a9}.image{border-style:solid;border-width:3.5px;border-color:#5289b4;border-radius:100%;height:55px;width:55px;padding:0;margin:0;vertical-align:middle}:host ::ng-deep .p-datatable-header{background-color:#eaeaea!important;padding:0!important;border-radius:5px!important}:host ::ng-deep .p-datatable .p-datatable-thead>tr>th{background-color:#eaeaea!important}:host ::ng-deep .p-datatable .p-datatable-thead>tr>th:first-of-type{border-radius:5px 0 0 5px}:host ::ng-deep .p-datatable .p-datatable-thead>tr>th:last-child{border-radius:0 5px 5px 0}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td{border-left:none!important;border-right:none!important}:host ::ng-deep .actionBtns,:host ::ng-deep .actionLoteBtns{border-radius:20%;box-shadow:#0000003d 0 3px 8px}.icon-more-horiz:hover,.icon-more-horiz:focus{color:#5e5e5e;transform:scale(1.1);transition:color .3s,transform .3s}:host ::ng-deep .p-checkbox .p-checkbox-box.p-highlight{border-color:#004172;background:#004172}:host ::ng-deep .p-checkbox .p-checkbox-box.p-highlight:hover{background-color:#002542}:host ::ng-deep .p-checkbox .p-checkbox-box.p-highlight:active{background-color:#002542}:host ::ng-deep .p-checkbox .p-checkbox-box.p-highlight:disabled{background-color:#002542;opacity:.4;cursor:auto}@media only screen and (min-width: 768px){.actionLoteBtns{top:-1px}}@media only screen and (max-width: 960px){:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td:has(p-tablecheckbox){border-bottom:0px!important}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td:has(img){justify-content:center!important;align-items:center!important}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td:has(img) .p-column-title{display:none!important}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td:last-child{border-bottom:1px solid #ddd!important}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td:last-child div{justify-content:center!important;align-items:center!important}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td .p-column-title{font-weight:600}}::ng-deep .p-panel.p-panel-toggleable .p-panel-header{background-color:#eaeaea!important}::ng-deep .field.grid,.formgrid.grid{padding:0rem!important}@media screen and (min-width: 961px){.moreVertBtn{position:relative;right:3px}}::ng-deep .p-datatable .p-datatable-thead>tr>th:last-of-type{border-radius:0 0 5px!important;-webkit-border-radius:0px 0px 5px 0px!important;-moz-border-radius:0px 0px 5px 0px!important;-ms-border-radius:0px 0px 5px 0px!important;-o-border-radius:0px 0px 5px 0px!important}::ng-deep .p-datatable .p-datatable-thead>tr>th:first-of-type{border-radius:0 0 0 5px!important;-webkit-border-radius:0px 0px 0px 5px!important;-moz-border-radius:0px 0px 0px 5px!important;-ms-border-radius:0px 0px 0px 5px!important;-o-border-radius:0px 0px 0px 5px!important}:host ::ng-deep p-celleditor>kv-switch>div>p-inputswitch.p-inputswitch-checked .p-inputswitch-slider:before{transform:translate(1.25rem);height:15px;margin-top:-8px;-webkit-transform:translateX(1.25rem);-moz-transform:translateX(1.25rem);-ms-transform:translateX(1.25rem);-o-transform:translateX(1.25rem)}:host ::ng-deep p-celleditor>kv-switch>div>p-inputswitch.p-inputswitch-checked .p-inputswitch-slider{height:21px}:host ::ng-deep p-celleditor>kv-switch>div>p-inputswitch{height:21px}:host ::ng-deep p-celleditor>kv-switch>div>p-inputswitch .p-inputswitch-slider:before{background:#fff;width:1rem;height:1.25rem;height:16px!important;left:.25rem;margin-top:-9px!important;margin-top:-.625rem;border-radius:50%;transition-duration:.2s}:host ::ng-deep p-celleditor>kv-switch>div>p-inputswitch:not(.p-disabled) .p-inputswitch-slider{height:21px}:host ::ng-deep .p-cell-editing{padding-top:0!important;padding-bottom:0!important}:host ::ng-deep p-dropdown-item{font-size:.1rem}.text-aviso{color:red;font-size:.85rem;font-weight:400}:host ::ng-deep .p-checkbox .p-checkbox-box{width:18px;height:18px}:host ::ng-deep .p-selectbutton .p-button{font-size:.75rem!important;height:24px;padding:11px}#btn-sizes{border-radius:50%;width:.5rem!important;height:.5rem!important;box-shadow:#0000003d 0 3px 8px}:host ::ng-deep .p-datatable.p-datatable-sm{font-size:.625rem!important}:host ::ng-deep .p-datatable.p-datatable-md{font-size:.75rem!important}:host ::ng-deep .p-datatable.p-datatable-lg{font-size:.875rem!important}:host ::ng-deep .p-datatable-sm-tr>td i>span.material-symbols-outlined{font-size:.9rem}:host ::ng-deep .p-datatable-sm-tr>td .check-edit-list>.p-checkbox .p-checkbox-box{width:15px;height:15px}:host ::ng-deep .p-datatable-sm-tr>td p-celleditor>div>.cellControl>.p-dropdown .p-dropdown-label{width:1%;padding-top:0;padding-bottom:0;font-size:.6rem}:host ::ng-deep .p-datatable-sm-tr>td p-celleditor>div>kv-input-text>span>.inputs{padding-top:0;padding-bottom:0;font-size:.6rem;height:1rem}:host ::ng-deep .p-datatable-sm-tr>td p-celleditor>div>.cellControl>span>p-inputmask>.inputs{height:1rem;padding-top:0;padding-bottom:0;font-size:.6rem}:host ::ng-deep .p-datatable-sm-tr>td p-celleditor>div>kv-switch>div>p-inputswitch>div,:host ::ng-deep .p-datatable-sm-tr>td p-celleditor>kv-switch>div>p-inputswitch,:host ::ng-deep .p-datatable-sm-tr>td p-celleditor>kv-switch>div>p-inputswitch .p-inputswitch-slider{height:.6rem!important;width:2.4rem}:host ::ng-deep .p-datatable-sm-tr>td p-celleditor>kv-switch>div>p-inputswitch .p-inputswitch-slider:before{background:#fff;width:.6rem!important;height:.6rem!important;left:.2rem;margin-top:-.35rem!important;border-radius:50%;transition-duration:.2s}:host ::ng-deep .p-datatable-sm-tr>td p-celleditor>div>kv-switch>div>p-inputswitch>div>span:before{background:#fff;width:.6rem!important;height:.6rem!important;left:.2rem;margin-top:-.35rem!important;border-radius:50%;transition-duration:.2s}:host ::ng-deep .p-datatable-md-tr>td i>span.material-symbols-outlined{font-size:1rem}:host ::ng-deep .p-datatable-md-tr>td .check-edit-list>.p-checkbox .p-checkbox-box{width:18px;height:18px}:host ::ng-deep .p-datatable-md-tr>td p-celleditor>div>.cellControl>.p-dropdown .p-dropdown-label{width:1%;padding-top:0;padding-bottom:0;font-size:.7rem}:host ::ng-deep .p-datatable-md-tr>td p-celleditor>div>kv-input-text>span>.inputs{padding-top:0;padding-bottom:0;font-size:.7rem;height:1rem}:host ::ng-deep .p-datatable-md-tr>td p-celleditor>div>.cellControl>span>p-inputmask>.inputs{height:1rem;padding-top:0;padding-bottom:0;font-size:.7rem}:host ::ng-deep .p-datatable-md-tr>td p-celleditor>div>kv-switch>div>p-inputswitch>div,:host ::ng-deep .p-datatable-md-tr>td p-celleditor>kv-switch>div>p-inputswitch,:host ::ng-deep .p-datatable-md-tr>td p-celleditor>kv-switch>div>p-inputswitch .p-inputswitch-slider{height:.83rem!important;width:2.7rem}:host ::ng-deep .p-datatable-md-tr>td p-celleditor>kv-switch>div>p-inputswitch .p-inputswitch-slider:before{background:#fff;width:.7rem!important;height:.7rem!important;left:.25rem;margin-top:-.35rem!important;border-radius:50%;transition-duration:.2s}:host ::ng-deep .p-datatable-md-tr>td p-celleditor>div>kv-switch>div>p-inputswitch>div>span:before{background:#fff;width:.7rem;height:.7rem;left:.25rem;margin-top:-.4rem;border-radius:50%;transition-duration:.2s}:host ::ng-deep .p-datatable-lg-tr>td i>span.material-symbols-outlined{font-size:1.1rem}:host ::ng-deep .p-datatable-lg-tr>td p-celleditor>div>kv-input-text>span>.inputs{padding-top:0;padding-bottom:0;font-size:.8rem;height:1rem}:host ::ng-deep .p-datatable-lg-tr>td p-celleditor>div>.cellControl>.p-dropdown .p-dropdown-label{padding-top:0;padding-bottom:0;font-size:.8rem}:host ::ng-deep .p-datatable-lg-tr>td p-celleditor>div>.cellControl>span>p-inputmask>.inputs{height:1rem;padding-top:0;padding-bottom:0;font-size:.8rem}:host ::ng-deep .p-datatable-sm-tr>td{padding-top:0!important;padding-top:.05rem!important;padding-bottom:.05rem!important}:host ::ng-deep .p-datatable-md-tr>td,:host ::ng-deep .p-datatable-lg-tr>td{padding:.15rem!important}.p-datatable.p-datatable-smth{font-size:.6rem!important}.p-datatable.p-datatable-dmth{font-size:.7rem!important}.p-datatable.p-datatable-lgth{font-size:.8rem!important}:host ::ng-deep .p-datatable.p-datatable-sm * p-celleditor>div>p-dropdown>.p-dropdown:not(.p-paginator-rpp-options) p-celleditor>div>p-dropdown>.p-dropdown:not(.p-paginator-rpp-options){height:15px!important}:host ::ng-deep .p-datatable.p-datatable-md * p-celleditor>div>p-dropdown>.p-dropdown:not(.p-paginator-rpp-options) p-celleditor>div>p-dropdown>.p-dropdown:not(.p-paginator-rpp-options){height:25px!important}:host ::ng-deep .p-datatable.p-datatable-lg * p-celleditor>div>p-dropdown>.p-dropdown:not(.p-paginator-rpp-options) p-celleditor>div>p-dropdown>.p-dropdown:not(.p-paginator-rpp-options){height:30px!important}:host ::ng-deep p-celleditor>kv-switch>div>p-inputswitch .p-inputswitch-slider{height:21px!important}:host ::ng-deep .teste>.p-button{background:#eaeaea!important;color:#a9a9a9;border:none;box-shadow:#0000003d 0 3px 8px;height:20px}::ng-deep .menuSizes>p-tieredmenusub>.p-tieredmenu-root-list>li:first-child{font-size:.6rem}::ng-deep .menuSizes>p-tieredmenusub>.p-tieredmenu-root-list>li:last-child{font-size:.8rem}.tag{width:5px;height:25px;border-radius:.25rem}:host ::ng-deep .p-speeddial-button.p-button.p-button-icon-only{width:2rem;height:2rem;font-size:1rem}.item-circle{width:4rem;height:2rem;padding:1rem;font-size:.8rem;border-radius:17%;display:flex;align-items:center;justify-content:center;background:#eaeaea!important;box-shadow:#0000003d 0 3px 13px}:host ::ng-deep p-speeddial>div>button>span.material-symbols-outlined.ng-star-inserted{font-size:1.1rem}:host ::ng-deep .check-edit-list>div.p-checkbox.p-component{height:1rem}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td:first-child{border-left:1px solid #ddd!important}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td:last-child{border-right:1px solid #ddd!important}:host ::ng-deep .p-datatable-wrapper::-webkit-scrollbar:hover{background-color:#dededebf}:host ::ng-deep .p-datatable-wrapper::-webkit-scrollbar{width:6px;height:3px}:host ::ng-deep .p-datatable-wrapper:hover::-webkit-scrollbar-thumb{border-left:2px solid white;background-color:#00000080}:host ::ng-deep .p-datatable-wrapper::-webkit-scrollbar-thumb{border-radius:4px;background-color:transparent}:host ::ng-deep .p-datatable-wrapper::-webkit-scrollbar-track{border-left:2px solid white;background-color:#dededebf}:host ::ng-deep .p-datatable>.p-datatable-wrapper{overflow-y:auto}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "directive", type: i1$3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i5$2.AutoFocus, selector: "[pAutoFocus]", inputs: ["autofocus"] }, { kind: "directive", type: i6.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "directive", type: i1$1.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "component", type: i7$2.ContextMenu, selector: "p-contextMenu", inputs: ["model", "triggerEvent", "target", "global", "style", "styleClass", "appendTo", "autoZIndex", "baseZIndex", "id", "ariaLabel", "ariaLabelledBy", "pressDelay"], outputs: ["onShow", "onHide"] }, { kind: "component", type: i4.Dropdown, selector: "p-dropdown", inputs: ["id", "scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "variant", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "disabled", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "filterValue", "options"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "directive", type: i5$3.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: "component", type: i11.Panel, selector: "p-panel", inputs: ["toggleable", "header", "collapsed", "style", "styleClass", "iconPos", "expandIcon", "collapseIcon", "showHeader", "toggler", "transitionOptions"], outputs: ["collapsedChange", "onBeforeToggle", "onAfterToggle"] }, { kind: "directive", type: i2.Ripple, selector: "[pRipple]" }, { kind: "component", type: i13.TieredMenu, selector: "p-tieredMenu", inputs: ["model", "popup", "style", "styleClass", "appendTo", "autoZIndex", "baseZIndex", "autoDisplay", "showTransitionOptions", "hideTransitionOptions", "id", "ariaLabel", "ariaLabelledBy", "disabled", "tabindex"], outputs: ["onShow", "onHide"] }, { kind: "component", type: i14.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll", "virtualRowHeight"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i14.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "directive", type: i14.ContextMenuRow, selector: "[pContextMenuRow]", inputs: ["pContextMenuRow", "pContextMenuRowIndex", "pContextMenuRowDisabled"] }, { kind: "directive", type: i14.ReorderableColumn, selector: "[pReorderableColumn]", inputs: ["pReorderableColumnDisabled"] }, { kind: "directive", type: i14.EditableColumn, selector: "[pEditableColumn]", inputs: ["pEditableColumn", "pEditableColumnField", "pEditableColumnRowIndex", "pEditableColumnDisabled", "pFocusCellSelector"] }, { kind: "component", type: i14.CellEditor, selector: "p-cellEditor" }, { kind: "component", type: i14.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "component", type: i14.TableCheckbox, selector: "p-tableCheckbox", inputs: ["disabled", "value", "index", "inputId", "name", "required", "ariaLabel"] }, { kind: "component", type: i14.TableHeaderCheckbox, selector: "p-tableHeaderCheckbox", inputs: ["disabled", "inputId", "name", "ariaLabel"] }, { kind: "directive", type: i14.EditableRow, selector: "[pEditableRow]", inputs: ["pEditableRow", "pEditableRowDisabled"] }, { kind: "directive", type: i14.InitEditableRow, selector: "[pInitEditableRow]" }, { kind: "directive", type: i14.CancelEditableRow, selector: "[pCancelEditableRow]" }, { kind: "component", type: i15.Toast, selector: "p-toast", inputs: ["key", "autoZIndex", "baseZIndex", "life", "style", "styleClass", "position", "preventOpenDuplicates", "preventDuplicates", "showTransformOptions", "hideTransformOptions", "showTransitionOptions", "hideTransitionOptions", "breakpoints"], outputs: ["onClose"] }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: KvInputCalendarComponent, selector: "kv-input-calendar", inputs: ["isYear", "isMonthYear", "minDate", "maxDate", "showButtonBar", "showIcon", "showTime", "selectionMode"], outputs: ["onSelectionChange", "onSelectionValue"] }, { kind: "component", type: KvInputMaskComponent, selector: "kv-input-mask", inputs: ["mask"], outputs: ["onComplete"] }, { kind: "component", type: KvInputNumberComponent, selector: "kv-input-number", inputs: ["mode", "digits", "min", "max", "suffix"] }, { kind: "component", type: KvInputTextComponent, selector: "kv-input-text", inputs: ["textCaptalized"] }, { kind: "component", type: KvSwitchComponent, selector: "kv-switch", inputs: ["readonly", "switchValue"], outputs: ["onSwitchChange"] }, { kind: "component", type: KvButtonComponent, selector: "kv-button", inputs: ["fullWidth", "type", "loading", "severity", "size", "icon", "label", "disabled"], outputs: ["onClick"] }, { kind: "pipe", type: i1.DatePipe, name: "date" }, { kind: "pipe", type: MaskPipe, name: "mask" }] }); }
|
|
7264
7280
|
}
|
|
7265
7281
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvTableEditComponent, decorators: [{
|
|
7266
7282
|
type: Component,
|
|
7267
|
-
args: [{ selector: 'kv-table-edit', template: "<div class=\"card\" id=\"tamanhotabela\" [style.font-size]=\"'1px'\">\r\n <p-toast></p-toast>\r\n\r\n @if(filtrosAvancados){\r\n <p-panel\r\n header=\"Filtros avan\u00E7ados\"\r\n [toggleable]=\"true\"\r\n [collapsed]=\"true\"\r\n (collapsedChange)=\"collapsed = !collapsed\"\r\n [style]=\"{ 'margin-bottom': '2px' }\"\r\n >\r\n <ng-template pTemplate=\"headericons\">\r\n @if (!collapsed) {\r\n <i class=\"pi pi-filter\"></i>\r\n }\r\n <!-- \u00CDcone quando o painel est\u00E1 aberto -->\r\n @if (collapsed) {\r\n <i class=\"pi pi-minus\"></i>\r\n }\r\n <!-- \u00CDcone quando o painel est\u00E1 fechado -->\r\n </ng-template>\r\n <ng-content></ng-content>\r\n </p-panel>\r\n }\r\n\r\n <p-contextMenu #cm [model]=\"itemsContextMenu\"></p-contextMenu>\r\n <p-table\r\n #te\r\n [editMode]=\"editMode\"\r\n (onEditComplete)=\"onEditComplete($event)\"\r\n (onEditInit)=\"onEditInit($event)\"\r\n [reorderableColumns]=\"config.reorderableColumns || false\"\r\n *ngIf=\"config\"\r\n [value]=\"dataSource\"\r\n [dataKey]=\"config.dataKey\"\r\n [columns]=\"config.columns\"\r\n [scrollable]=\"true\"\r\n appendTo=\"body\"\r\n [styleClass]=\"selectedSize.class\"\r\n [(selection)]=\"selectedItems\"\r\n [rowSelectable]=\"isRowSelectable\"\r\n [globalFilterFields]=\"globalFilterFields\"\r\n [rows]=\"rows\"\r\n [paginator]=\"paginator\"\r\n [rowsPerPageOptions]=\"rowsPerPageOptions\"\r\n [showCurrentPageReport]=\"true\"\r\n currentPageReportTemplate=\"{first} - {last} de {totalRecords}\"\r\n (selectionChange)=\"selectionChange($event)\"\r\n [rowHover]=\"true\"\r\n [totalRecords]=\"totalRecords\"\r\n [lazy]=\"config.lazy\"\r\n (onLazyLoad)=\"paginate($event)\"\r\n [groupRowsBy]=\"config.fieldGroup\"\r\n paginatorDropdownAppendTo=\"body\"\r\n [showFirstLastIcon]=\"showFirstLastIcon\"\r\n [pageLinks]=\"pageLinksOptions\"\r\n [scrollable]=\"isTableScrollable\"\r\n [scrollHeight]=\"scrollHeight\"\r\n [rowTrackBy]=\"rowTrackBy\"\r\n [(contextMenuSelection)]=\"selectedProduct\"\r\n [contextMenu]=\"isEditableTable() ? cm : null\"\r\n >\r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n\r\n @if (config.enableCation || enableSizes){\r\n <ng-template pTemplate=\"caption\">\r\n <div\r\n class=\"flex flex-row flex-wrap justify-content-between align-items-center grid formgrid p-fluid col-12 p-0 m-0\"\r\n >\r\n <div class=\"col-12 flex flex-column\">\r\n @if (config.title) {\r\n <div class=\"text-md font-bold my-3\">\r\n {{ config.title }}\r\n </div>\r\n } @if (config.subtitle) {\r\n <div class=\"text-sm mb-4 font-medium\">\r\n {{ config.subtitle }}\r\n </div>\r\n }\r\n </div>\r\n\r\n <div\r\n class=\"flex flex-row align-items-center md:col-6 lg:col-4 {{\r\n tamanhoTela < 768 ? 'col-10' : 'col-12'\r\n }} mt-1 mb-2 gap-1\"\r\n >\r\n \r\n @if (config.enableFilter) {\r\n <span 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(te, $event)\"\r\n placeholder=\"Pesquisar...\"\r\n class=\"h-2rem\"\r\n autocomplete=\"off\"\r\n />\r\n </span>\r\n }\r\n\r\n @if(enableSizes){\r\n <div class=\"sizes-controls\">\r\n \r\n <kv-button (click)=\"menu.toggle($event)\"\r\n [severity]=\"'tertiary'\"\r\n [icon]=\"'match_case'\"\r\n [pTooltip]=\"'Tamanho da fonte'\"\r\n >\r\n </kv-button>\r\n \r\n <p-tieredMenu\r\n [style]=\"{ 'font-size': '0.7rem' }\"\r\n styleClass=\"menuSizes\"\r\n appendTo=\"body\"\r\n #menu\r\n [model]=\"sizes\"\r\n [popup]=\"true\"\r\n >\r\n <ng-template let-item pTemplate=\"item\">\r\n <div\r\n class=\"cursor-pointer flex gap-2 align-items-center pl-1 m-2 menu-sizes\"\r\n (click)=\"item.command()\"\r\n >\r\n @if(this.selectedSize.size != item.size){\r\n <div\r\n class=\"tag\"\r\n [style.background-color]=\"'#EAEAEA'\"\r\n ></div>\r\n }\r\n \r\n @if(this.selectedSize.size == item.size){\r\n <div\r\n class=\"tag\"\r\n [style.background-color]=\"'#1DA750'\"\r\n ></div>\r\n }\r\n \r\n {{ item.label }}\r\n </div>\r\n </ng-template>\r\n </p-tieredMenu>\r\n </div>\r\n }\r\n </div>\r\n\r\n @if(isEditing){\r\n <span class=\"text-aviso\">\r\n Tabela em modo de edi\u00E7\u00E3o\r\n </span>\r\n }\r\n \r\n <div class=\"flex flex-row col-2 justify-content-end gap-2\">\r\n @for (action of config.actionsLote; track i; let i = $index) {\r\n @if(!isEditing){\r\n <div class=\"flex align-items-center justify-content-center\">\r\n @if ((selectedItems.length > 0 || action.showAcoesLote) &&\r\n (getOrExecute(action.visible, selectedItems) ?? true)) {\r\n <kv-button\r\n (onClick)=\"action?.command(); activeItemLote(selectedItems)\"\r\n [pTooltip]=\"getOrExecute(action.tooltip, selectedItems)\"\r\n [tooltipPosition]=\"\r\n (getOrExecute(action.tooltip, selectedItems)?.length ??\r\n 0 > 7) &&\r\n config.actionsLote &&\r\n i == config.actionsLote.length - 1\r\n ? 'left'\r\n : 'bottom'\r\n \"\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 }\r\n }\r\n\r\n @if (isEditableTable()) {\r\n <div>\r\n <kv-button\r\n (click)=\"this.isEditing = !this.isEditing\"\r\n [pTooltip]=\"!isEditing ? 'Habilitar Edi\u00E7\u00E3o' : 'Desabilitar Edi\u00E7\u00E3o'\"\r\n [tooltipPosition]=\"'left'\"\r\n [severity]=\"'tertiary'\"\r\n [icon]=\"'edit_square'\"\r\n >\r\n </kv-button>\r\n </div>\r\n }\r\n </div>\r\n\r\n <!---------------->\r\n \r\n </div>\r\n </ng-template>\r\n }\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n @if(config.enableSelect && !isEditing){\r\n <th\r\n [class]=\"selectedSize.class + 'th'\"\r\n >\r\n <p-tableHeaderCheckbox\r\n (click)=\"activeItemLote(selectedItems)\"\r\n ></p-tableHeaderCheckbox>\r\n </th>\r\n }\r\n @for(col of columns; track $index){\r\n <th\r\n [pSortableColumn]=\"col.field\"\r\n [pSortableColumnDisabled]=\"col.sortable === false\"\r\n [style.min-width]=\"col.width * selectedSize.size + 'px'\"\r\n pReorderableColumn\r\n [class]=\"selectedSize.class + 'th'\"\r\n \r\n >\r\n <div\r\n [class]=\"\r\n centralizarColunas(col) && alignColunasHeader(col) == ''\r\n ? 'flex flex-row justify-content-center'\r\n : 'flex flex-row'\r\n \"\r\n [style]=\"alignColunasHeader(col)\"\r\n >\r\n <span class=\"text-xs font-medium\">{{ col.header }}</span>\r\n @if(col.sortable === true) {\r\n <p-sortIcon\r\n [field]=\"col.field\"\r\n style=\"font-size: 10px\"\r\n ></p-sortIcon>\r\n }\r\n @if(col.headerTooltip){\r\n <span\r\n class=\"material-symbols-outlined flex align-items-center\"\r\n [pTooltip]=\"col.headerTooltip\"\r\n >\r\n info\r\n </span>\r\n }\r\n \r\n </div>\r\n </th>\r\n }\r\n \r\n @if(!isEditing && config.actions && config.actions.length > 0){\r\n <th></th>\r\n }\r\n\r\n @if(isEditableTable() && this.editMode == 'row'){\r\n <th\r\n id=\"th-edit\"\r\n style=\"width: 20px\"\r\n >\r\n Editar\r\n </th>\r\n }\r\n \r\n </tr>\r\n </ng-template>\r\n\r\n\r\n \r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n\r\n <ng-template\r\n pTemplate=\"body\"\r\n let-rowData\r\n let-editing=\"editing\"\r\n let-ri=\"rowIndex\"\r\n let-columns=\"columns\"\r\n let-rowgroup=\"rowgroup\"\r\n let-rowspan=\"rowspan\"\r\n >\r\n <tr\r\n [pEditableRow]=\"rowData\"\r\n [pEditableRowDisabled]=\"false\"\r\n [pContextMenuRow]=\"{rowData, editing}\"\r\n [class]=\"selectedSize.class + '-tr'\"\r\n (dblclick)=\"doubleClick($event, rowData)\"\r\n >\r\n @if(config.enableSelect && !isEditing){\r\n <td\r\n [style]=\"applyStyle(rowData, { field: 'check-box', header: '' })\"\r\n >\r\n \r\n <p-tableCheckbox\r\n class=\"check-edit-list\"\r\n [value]=\"rowData\"\r\n [disabled]=\"isDisabledCheckbox(rowData)\"\r\n (click)=\"activeItemLote(selectedItems)\"\r\n ></p-tableCheckbox>\r\n </td>\r\n }\r\n @for (col of columns; track i; let i = $index){\r\n <ng-container>\r\n <!-- FIXME: Testar a implementa\u00E7\u00E3o abaixo e mesaclar as duas formas -->\r\n \r\n <ng-template #templateInput let-rowData=\"rowData\" let-col=\"col\">\r\n <ng-container *ngIf=\"isEditing; else templatevisualedicao\">\r\n <ng-container [ngSwitch]=\"col.fieldControlType\">\r\n <ng-container *ngSwitchCase=\"'text'\">\r\n <div [style.width]=\"col.width\" class=\"grid formgrid p-fluid\">\r\n <kv-input-text\r\n [disabled]=\"isDisableEditRowCellFunction(rowData, col)\"\r\n class=\"cellControl col\"\r\n [(ngModel)]=\"rowData[col.field]\"\r\n [required]=\"col.required ?? true\"\r\n ></kv-input-text>\r\n </div>\r\n </ng-container>\r\n \r\n <ng-container *ngSwitchCase=\"'number'\">\r\n <div [style.width]=\"col.width\" class=\"grid formgrid p-fluid\">\r\n <kv-input-number\r\n [disabled]=\"isDisableEditRowCellFunction(rowData, col)\"\r\n class=\"cellControl col\"\r\n [(ngModel)]=\"rowData[col.field]\"\r\n [required]=\"col.required ?? true\"\r\n ></kv-input-number>\r\n </div>\r\n </ng-container>\r\n \r\n <ng-container *ngSwitchCase=\"'mask'\">\r\n <div [style.width]=\"col.width\" class=\"grid formgrid p-fluid\">\r\n <kv-input-mask\r\n [disabled]=\"isDisableEditRowCellFunction(rowData, col)\"\r\n class=\"cellControl col\"\r\n [mask]=\"col.mask\"\r\n [required]=\"col.required ?? true\"\r\n [(ngModel)]=\"rowData[col.field]\"\r\n ></kv-input-mask>\r\n </div>\r\n </ng-container>\r\n \r\n <ng-container *ngSwitchCase=\"'switch'\">\r\n <div [style.width]=\"col.width\" class=\"grid formgrid p-fluid\">\r\n <kv-switch\r\n [disabled]=\"isDisableEditRowCellFunction(rowData, col)\"\r\n class=\"cellControl col\"\r\n [(ngModel)]=\"rowData[col.field]\"\r\n ></kv-switch>\r\n </div>\r\n </ng-container>\r\n \r\n <ng-container *ngSwitchCase=\"'calendar'\">\r\n <div [style.width]=\"col.width\">\r\n <div\r\n [style.width]=\"col.width\"\r\n class=\"grid formgrid p-fluid\"\r\n >\r\n <kv-input-calendar\r\n class=\"cellControl col\"\r\n [(ngModel)]=\"rowData[col.field]\"\r\n ></kv-input-calendar>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'dropdown'\">\r\n <div [style.width]=\"col.width\" class=\"grid formgrid p-fluid\">\r\n <p-dropdown\r\n [disabled]=\"isDisableEditRowCellFunction(rowData, col)\"\r\n class=\"cellControl col\"\r\n appendTo=\"body\"\r\n [panelStyle]=\"{ 'font-size': '0.75rem' }\"\r\n [optionLabel]=\"col.fieldDropDownControl.descricaoobjeto\"\r\n [optionValue]=\"col.fieldDropDownControl.idobjeto\"\r\n [options]=\"\r\n col.fieldDropDownControl.fieldControlDropdownSource\r\n \"\r\n [(ngModel)]=\"rowData[col.field]\"\r\n >\r\n </p-dropdown>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n \r\n <ng-template #templatevisualedicao>\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n templateOutput;\r\n context: { rowData: rowData, col: col }\r\n \"\r\n ></ng-container>\r\n </ng-template>\r\n </ng-template>\r\n \r\n <ng-template #templateOutput let-rowData=\"rowData\" let-col=\"col\">\r\n <ng-container [ngSwitch]=\"col.fieldControlType\">\r\n <ng-container *ngSwitchCase=\"'dropdown'\">\r\n <ng-container *ngIf=\"rowData[col.field]\">\r\n {{ transformValueDrop(retornaDescricaoDrop(rowData, col), col) }}\r\n </ng-container>\r\n </ng-container>\r\n \r\n <ng-container *ngSwitchCase=\"'switch'\">\r\n <kv-switch\r\n [(ngModel)]=\"rowData[col.field]\"\r\n [disabled]=\"true\"\r\n ></kv-switch>\r\n </ng-container>\r\n \r\n <ng-container *ngSwitchCase=\"'calendar'\">\r\n {{ rowData[col.field] | date }}\r\n </ng-container>\r\n \r\n <ng-container *ngSwitchCase=\"'mask'\">\r\n {{ rowData[col.field] | mask : col.mask }}\r\n </ng-container>\r\n \r\n <ng-container *ngSwitchDefault>\r\n {{ transformValue(rowData, col) }}\r\n </ng-container>\r\n </ng-container>\r\n </ng-template>\r\n \r\n @if(editMode == 'cell' && col.fieldControlType){\r\n <td\r\n [pEditableColumn]=\"rowData\"\r\n [pEditableColumnField]=\"col.field\"\r\n [pEditableColumnRowIndex]=\"rowData[config.dataKey]\"\r\n [id]=\"'rowTable' + rowData[config.dataKey]\"\r\n (click)=\"activeItem(rowData)\"\r\n (dblclick)=\"dbClickEdit()\"\r\n class=\"rowTable\"\r\n [style]=\"\r\n applyStyle(rowData, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col)\r\n \"\r\n [pTooltip]=\"returnTooltipRow(rowData, col)\"\r\n >\r\n <p-cellEditor>\r\n <ng-container>\r\n <ng-template pTemplate=\"input\">\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n templateInput;\r\n context: { rowData: rowData, col: col }\r\n \"\r\n ></ng-container>\r\n </ng-template>\r\n \r\n <ng-template pTemplate=\"output\">\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n templateOutput;\r\n context: { rowData: rowData, col: col }\r\n \"\r\n ></ng-container>\r\n </ng-template>\r\n </ng-container>\r\n \r\n </p-cellEditor>\r\n </td>\r\n }\r\n \r\n <!-- NOTE: Edi\u00E7\u00E3o de linha -->\r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n \r\n <!-- Celula que armazena os controles de edi\u00E7\u00E3o para os campos -->\r\n @if(false && col.fieldControlType && editMode == 'row'){\r\n <td\r\n [id]=\"'rowTable' + rowData[config.dataKey]\"\r\n (click)=\"activeItem(rowData)\"\r\n (dblclick)=\"dbClickEdit()\"\r\n class=\"rowTable\"\r\n [style]=\"\r\n applyStyle(rowData, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col)\r\n \"\r\n [pTooltip]=\"returnTooltipRow(rowData, col)\"\r\n >\r\n <p-cellEditor\r\n [ngClass]=\"{ switch: col.fieldControlType == 'switch' }\"\r\n >\r\n <ng-template pTemplate=\"input\">\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n templateInput;\r\n context: { rowData: rowData, col: col }\r\n \"\r\n ></ng-container>\r\n </ng-template>\r\n \r\n <ng-template pTemplate=\"output\">\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n templateOutput;\r\n context: { rowData: rowData, col: col }\r\n \"\r\n ></ng-container>\r\n </ng-template>\r\n </p-cellEditor>\r\n </td>\r\n }\r\n \r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n \r\n <td\r\n *ngIf=\"rowgroup && !col.template\"\r\n [attr.rowspan]=\"rowgroup && col.grouped ? rowspan : null\"\r\n class=\"rowTable\"\r\n [style]=\"\r\n applyStyle(rowData, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col)\r\n \"\r\n [pTooltip]=\"returnTooltipRow(rowData, col)\"\r\n >\r\n <span class=\"p-column-title\">{{ col.header }}:</span>\r\n \r\n <span\r\n *ngIf=\"!isBooleanField(rowData, col); else booleanField\"\r\n [class]=\"returnRowClass(rowData, col)\"\r\n >\r\n <span\r\n *ngIf=\"\r\n !isChipField(col) && !col.iconField && !isImageField(col)\r\n \"\r\n >\r\n <i *ngIf=\"col.icon\" [class]=\"col.icon + ' mr-2'\"></i>\r\n {{ transformValue(rowData, col) }}\r\n </span>\r\n \r\n <div *ngIf=\"isChipField(col) && !col.iconField\">\r\n <span\r\n [class]=\"returnClassChip(rowData, col)\"\r\n [pTooltip]=\"returnTooltipIcon(rowData, col)\"\r\n >{{ transformValue(rowData, col) }}</span\r\n >\r\n </div>\r\n </span>\r\n \r\n <span *ngIf=\"isImageField(col)\">\r\n <span>\r\n <img class=\"image\" [src]=\"loadImage(rowData, col)\" />\r\n </span>\r\n </span>\r\n \r\n <i\r\n *ngIf=\"col.iconField\"\r\n [ngClass]=\"{\r\n 'material-icons': col.indIconMaterial,\r\n 'material-symbols-outlined mr-2': !col.indIconMaterial\r\n }\"\r\n [pTooltip]=\"returnTooltipIcon(rowData, col)\"\r\n >\r\n {{ returnClassIcon(rowData, col) }}\r\n </i>\r\n \r\n <ng-template #booleanField>\r\n <i\r\n *ngIf=\"!col.iconField && !isSwitchField(col)\"\r\n [ngClass]=\"\r\n rowData[col.field] ? 'text-green-500' : 'text-red-500'\r\n \"\r\n ><span class=\"material-symbols-outlined\">\r\n {{ rowData[col.field] ? \"check\" : \"close\" }}\r\n </span>\r\n </i>\r\n \r\n <span\r\n *ngIf=\"isSwitchField(col)\"\r\n [class]=\"returnRowClass(rowData, col)\"\r\n >\r\n <kv-switch\r\n (onSwitchChange)=\"onSwitchChange($event, rowData, col)\"\r\n [disabled]=\"col?.onlyReadField ?? true\"\r\n [switchValue]=\"transformValue(rowData, col)\"\r\n >\r\n </kv-switch>\r\n </span>\r\n </ng-template>\r\n </td>\r\n \r\n <td\r\n *ngIf=\"\r\n !rowgroup &&\r\n !col.grouped &&\r\n !col.template &&\r\n !col.fieldControlType\r\n \"\r\n [style]=\"\r\n applyStyle(rowData, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col)\r\n \"\r\n class=\"rowTable\"\r\n [pTooltip]=\"returnTooltipRow(rowData, col)\"\r\n >\r\n <span class=\"p-column-title\">{{ col.header }}:</span>\r\n \r\n <span\r\n *ngIf=\"!isBooleanField(rowData, col); else booleanField\"\r\n [class]=\"returnRowClass(rowData, col)\"\r\n >\r\n <span\r\n *ngIf=\"\r\n !isChipField(col) && !col.iconField && !isImageField(col)\r\n \"\r\n >\r\n <i *ngIf=\"col.icon\" [class]=\"col.icon + ' mr-2'\"></i>\r\n {{ transformValue(rowData, col) }}\r\n </span>\r\n \r\n <div *ngIf=\"isChipField(col) && !col.iconField\">\r\n <span\r\n [class]=\"returnClassChip(rowData, col)\"\r\n [pTooltip]=\"returnTooltipIcon(rowData, col)\"\r\n >\r\n {{ transformValue(rowData, col) }}</span\r\n >\r\n </div>\r\n </span>\r\n \r\n <span *ngIf=\"isImageField(col)\">\r\n <span>\r\n <img class=\"image\" [src]=\"loadImage(rowData, col)\" />\r\n </span>\r\n </span>\r\n \r\n <i\r\n *ngIf=\"col.iconField\"\r\n [ngClass]=\"{\r\n 'material-icons': col.indIconMaterial,\r\n 'material-symbols-outlined mr-2': !col.indIconMaterial\r\n }\"\r\n [pTooltip]=\"returnTooltipIcon(rowData, col)\"\r\n >\r\n {{ returnClassIcon(rowData, col) }}\r\n </i>\r\n \r\n <ng-template #booleanField>\r\n <i\r\n *ngIf=\"!col.iconField && !isSwitchField(col)\"\r\n [ngClass]=\"\r\n rowData[col.field] ? 'text-green-500' : 'text-red-500'\r\n \"\r\n ><span class=\"material-symbols-outlined\">\r\n {{ rowData[col.field] ? \"check\" : \"close\" }}\r\n </span>\r\n </i>\r\n \r\n <span\r\n *ngIf=\"isSwitchField(col)\"\r\n [class]=\"returnRowClass(rowData, col)\"\r\n >\r\n <kv-switch\r\n (onSwitchChange)=\"onSwitchChange($event, rowData, col)\"\r\n [disabled]=\"col?.onlyReadField ?? true\"\r\n [switchValue]=\"transformValue(rowData, col)\"\r\n >\r\n </kv-switch>\r\n </span>\r\n </ng-template>\r\n </td>\r\n \r\n <td\r\n *ngIf=\"col.template && !isEditableTable()\"\r\n [style]=\"\r\n applyStyle(rowData, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col)\r\n \"\r\n class=\"rowTable\"\r\n >\r\n <span class=\"p-column-title\">{{ col.header }}:</span>\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 </td>\r\n </ng-container>\r\n }\r\n \r\n\r\n <!-- ------------------------------------------------------------------------------------------------------------------------------------------- -->\r\n <!-- Controle de a\u00E7\u00E3o -->\r\n @if(!isEditing && config.actions && config.actions.length > 0){\r\n <td\r\n [ngClass]=\"{\r\n 'td-tools': isEditableTable() && this.editMode == 'row',\r\n 'td-tools-sticky': !isEditableTable() || this.editMode == 'cell'\r\n }\"\r\n [style]=\"\r\n applyStyle(rowData, { field: 'btns-options', header: '' }) +\r\n 'border-right: 1px solid #ddd !important; border-left: 1px solid #ddd !important;'\r\n \"\r\n >\r\n <div class=\"flex flex-row justify-content-end w-full\">\r\n \r\n <span\r\n class=\"material-symbols-outlined cursor-pointer icon-more-horiz\"\r\n style=\"font-size: 1rem; height: 10px; width: 20px\"\r\n (click)=\"menu.toggle($event); activeItem(rowData)\"\r\n >\r\n more_horiz\r\n </span>\r\n <!-- </button> -->\r\n\r\n <div *ngFor=\"let action of config.actions\">\r\n {{ criarMenusModal(rowData) }}\r\n </div>\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 </td>\r\n }\r\n \r\n <!-- ------------------------------------------------------------------------------------------------------------------------------------------- -->\r\n <!-- Controle de edi\u00E7\u00E3o -->\r\n @if(this.isEditableTable() && this.editMode == 'row'){\r\n <td class=\"td-edit\">\r\n <div class=\"flex align-items-center justify-content-center gap-2\">\r\n @if(!editing){\r\n <button\r\n [style.height]=\"'28px'\"\r\n [id]=\"'rowEdit' + rowData[config.dataKey]\"\r\n [style.width]=\"'28px'\"\r\n [disabled]=\"isDisableEditRowFunction(rowData)\"\r\n pButton\r\n pRipple\r\n type=\"button\"\r\n pInitEditableRow\r\n icon=\"pi pi-pencil\"\r\n (click)=\"onRowEditInit(rowData)\"\r\n class=\"p-button-rounded p-button-text\"\r\n ></button>\r\n }\r\n \r\n @if(editing){\r\n <button\r\n [style.height]=\"'28px'\"\r\n [style.width]=\"'28px'\"\r\n [disabled]=\"isDisableEditRowFunction(rowData)\"\r\n pButton\r\n pRipple\r\n type=\"button\"\r\n pCancelEditableRow\r\n icon=\"pi pi-times\"\r\n (click)=\"onRowEditCancel(rowData, ri)\"\r\n [id]=\"'rowCancel' + rowData[config.dataKey]\"\r\n class=\"p-button-rounded p-button-text p-button-danger\"\r\n ></button>\r\n }\r\n \r\n </div>\r\n </td>\r\n }\r\n \r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n</div>\r\n", styles: ["@charset \"UTF-8\";.td-edit{position:sticky;right:-1px;background-color:#fff;color:#5289b4}.td-tools{position:sticky;right:52px;border-right:1px solid #ddd!important;background-color:#fff;box-shadow:-5px 0 20px -10px #000000bf}.td-tools-sticky{position:sticky;right:0;border-right:3px solid #fff!important;background-color:#fff}#th-edit{position:sticky;right:0;background-color:#eaeaea}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td{text-align:center;border:1px solid #eaeaea;border-width:1px 1px;padding:0rem .5rem}:host ::ng-deep .p-datatable .p-datatable-thead>tr>th{text-align:center;padding:0rem .5rem;border-left:none;border-right:none;border-width:1px 1px;font-weight:700;color:#343a40;background:#eaeaea;transition:box-shadow .2s}.error-show{background-color:red;width:5px;height:10px}.btns-options{position:relative;left:20px}.chip-style{border:solid 1px}:host::ng-deep .p-card .p-card-content{padding:0}.material-symbols-outlined.md-19{font-size:15px}.material-symbols-outlined.md-22{font-size:19px}.checkbox-container{display:flex;align-items:center;gap:2px;margin-top:5px}#botaoFiltro:hover{color:#a9a9a9}.actionLoteBtns{align-items:center;background-color:#29b92d;color:#f2f3f5;display:flex;font-size:16px;width:2rem;height:2rem;top:2px;margin-left:.5rem;justify-content:center;text-decoration:none;text-align:center;padding:12px}:host ::ng-deep .center{display:flex;align-items:center;justify-content:center}#actionLoteBtns:hover,.actionLoteBtns:hover{background-color:#249a29!important}.actionBtns{align-items:center;background-color:transparent;color:#a9a9a9;display:flex;width:.8rem;height:.8rem;margin-left:.22rem;justify-content:center;text-decoration:none;text-align:justify;padding:11px}:host::ng-deep .material-symbols-outlined{font-family:Material Symbols Outlined;font-weight:400;font-style:normal;line-height:.9;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased}#actionBtns:hover{color:#a9a9a9}.image{border-style:solid;border-width:3.5px;border-color:#5289b4;border-radius:100%;height:55px;width:55px;padding:0;margin:0;vertical-align:middle}:host ::ng-deep .p-datatable-header{background-color:#eaeaea!important;padding:0!important;border-radius:5px!important}:host ::ng-deep .p-datatable .p-datatable-thead>tr>th{background-color:#eaeaea!important}:host ::ng-deep .p-datatable .p-datatable-thead>tr>th:first-of-type{border-radius:5px 0 0 5px}:host ::ng-deep .p-datatable .p-datatable-thead>tr>th:last-child{border-radius:0 5px 5px 0}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td{border-left:none!important;border-right:none!important}:host ::ng-deep .actionBtns,:host ::ng-deep .actionLoteBtns{border-radius:20%;box-shadow:#0000003d 0 3px 8px}.icon-more-horiz:hover,.icon-more-horiz:focus{color:#5e5e5e;transform:scale(1.1);transition:color .3s,transform .3s}:host ::ng-deep .p-checkbox .p-checkbox-box.p-highlight{border-color:#004172;background:#004172}:host ::ng-deep .p-checkbox .p-checkbox-box.p-highlight:hover{background-color:#002542}:host ::ng-deep .p-checkbox .p-checkbox-box.p-highlight:active{background-color:#002542}:host ::ng-deep .p-checkbox .p-checkbox-box.p-highlight:disabled{background-color:#002542;opacity:.4;cursor:auto}@media only screen and (min-width: 768px){.actionLoteBtns{top:-1px}}@media only screen and (max-width: 960px){:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td:has(p-tablecheckbox){border-bottom:0px!important}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td:has(img){justify-content:center!important;align-items:center!important}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td:has(img) .p-column-title{display:none!important}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td:last-child{border-bottom:1px solid #ddd!important}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td:last-child div{justify-content:center!important;align-items:center!important}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td .p-column-title{font-weight:600}}::ng-deep .p-panel.p-panel-toggleable .p-panel-header{background-color:#eaeaea!important}::ng-deep .field.grid,.formgrid.grid{padding:0rem!important}@media screen and (min-width: 961px){.moreVertBtn{position:relative;right:3px}}::ng-deep .p-datatable .p-datatable-thead>tr>th:last-of-type{border-radius:0 0 5px!important;-webkit-border-radius:0px 0px 5px 0px!important;-moz-border-radius:0px 0px 5px 0px!important;-ms-border-radius:0px 0px 5px 0px!important;-o-border-radius:0px 0px 5px 0px!important}::ng-deep .p-datatable .p-datatable-thead>tr>th:first-of-type{border-radius:0 0 0 5px!important;-webkit-border-radius:0px 0px 0px 5px!important;-moz-border-radius:0px 0px 0px 5px!important;-ms-border-radius:0px 0px 0px 5px!important;-o-border-radius:0px 0px 0px 5px!important}:host ::ng-deep p-celleditor>kv-switch>div>p-inputswitch.p-inputswitch-checked .p-inputswitch-slider:before{transform:translate(1.25rem);height:15px;margin-top:-8px;-webkit-transform:translateX(1.25rem);-moz-transform:translateX(1.25rem);-ms-transform:translateX(1.25rem);-o-transform:translateX(1.25rem)}:host ::ng-deep p-celleditor>kv-switch>div>p-inputswitch.p-inputswitch-checked .p-inputswitch-slider{height:21px}:host ::ng-deep p-celleditor>kv-switch>div>p-inputswitch{height:21px}:host ::ng-deep p-celleditor>kv-switch>div>p-inputswitch .p-inputswitch-slider:before{background:#fff;width:1rem;height:1.25rem;height:16px!important;left:.25rem;margin-top:-9px!important;margin-top:-.625rem;border-radius:50%;transition-duration:.2s}:host ::ng-deep p-celleditor>kv-switch>div>p-inputswitch:not(.p-disabled) .p-inputswitch-slider{height:21px}:host ::ng-deep .p-cell-editing{padding-top:0!important;padding-bottom:0!important}:host ::ng-deep p-dropdown-item{font-size:.1rem}.text-aviso{color:red;font-size:.85rem;font-weight:400}:host ::ng-deep .p-checkbox .p-checkbox-box{width:18px;height:18px}:host ::ng-deep .p-selectbutton .p-button{font-size:.75rem!important;height:24px;padding:11px}#btn-sizes{border-radius:50%;width:.5rem!important;height:.5rem!important;box-shadow:#0000003d 0 3px 8px}:host ::ng-deep .p-datatable.p-datatable-sm{font-size:.625rem!important}:host ::ng-deep .p-datatable.p-datatable-md{font-size:.75rem!important}:host ::ng-deep .p-datatable.p-datatable-lg{font-size:.875rem!important}:host ::ng-deep .p-datatable-sm-tr>td i>span.material-symbols-outlined{font-size:.9rem}:host ::ng-deep .p-datatable-sm-tr>td .check-edit-list>.p-checkbox .p-checkbox-box{width:15px;height:15px}:host ::ng-deep .p-datatable-sm-tr>td p-celleditor>div>.cellControl>.p-dropdown .p-dropdown-label{width:1%;padding-top:0;padding-bottom:0;font-size:.6rem}:host ::ng-deep .p-datatable-sm-tr>td p-celleditor>div>kv-input-text>span>.inputs{padding-top:0;padding-bottom:0;font-size:.6rem;height:1rem}:host ::ng-deep .p-datatable-sm-tr>td p-celleditor>div>.cellControl>span>p-inputmask>.inputs{height:1rem;padding-top:0;padding-bottom:0;font-size:.6rem}:host ::ng-deep .p-datatable-sm-tr>td p-celleditor>div>kv-switch>div>p-inputswitch>div,:host ::ng-deep .p-datatable-sm-tr>td p-celleditor>kv-switch>div>p-inputswitch,:host ::ng-deep .p-datatable-sm-tr>td p-celleditor>kv-switch>div>p-inputswitch .p-inputswitch-slider{height:.6rem!important;width:2.4rem}:host ::ng-deep .p-datatable-sm-tr>td p-celleditor>kv-switch>div>p-inputswitch .p-inputswitch-slider:before{background:#fff;width:.6rem!important;height:.6rem!important;left:.2rem;margin-top:-.35rem!important;border-radius:50%;transition-duration:.2s}:host ::ng-deep .p-datatable-sm-tr>td p-celleditor>div>kv-switch>div>p-inputswitch>div>span:before{background:#fff;width:.6rem!important;height:.6rem!important;left:.2rem;margin-top:-.35rem!important;border-radius:50%;transition-duration:.2s}:host ::ng-deep .p-datatable-md-tr>td i>span.material-symbols-outlined{font-size:1rem}:host ::ng-deep .p-datatable-md-tr>td .check-edit-list>.p-checkbox .p-checkbox-box{width:18px;height:18px}:host ::ng-deep .p-datatable-md-tr>td p-celleditor>div>.cellControl>.p-dropdown .p-dropdown-label{width:1%;padding-top:0;padding-bottom:0;font-size:.7rem}:host ::ng-deep .p-datatable-md-tr>td p-celleditor>div>kv-input-text>span>.inputs{padding-top:0;padding-bottom:0;font-size:.7rem;height:1rem}:host ::ng-deep .p-datatable-md-tr>td p-celleditor>div>.cellControl>span>p-inputmask>.inputs{height:1rem;padding-top:0;padding-bottom:0;font-size:.7rem}:host ::ng-deep .p-datatable-md-tr>td p-celleditor>div>kv-switch>div>p-inputswitch>div,:host ::ng-deep .p-datatable-md-tr>td p-celleditor>kv-switch>div>p-inputswitch,:host ::ng-deep .p-datatable-md-tr>td p-celleditor>kv-switch>div>p-inputswitch .p-inputswitch-slider{height:.83rem!important;width:2.7rem}:host ::ng-deep .p-datatable-md-tr>td p-celleditor>kv-switch>div>p-inputswitch .p-inputswitch-slider:before{background:#fff;width:.7rem!important;height:.7rem!important;left:.25rem;margin-top:-.35rem!important;border-radius:50%;transition-duration:.2s}:host ::ng-deep .p-datatable-md-tr>td p-celleditor>div>kv-switch>div>p-inputswitch>div>span:before{background:#fff;width:.7rem;height:.7rem;left:.25rem;margin-top:-.4rem;border-radius:50%;transition-duration:.2s}:host ::ng-deep .p-datatable-lg-tr>td i>span.material-symbols-outlined{font-size:1.1rem}:host ::ng-deep .p-datatable-lg-tr>td p-celleditor>div>kv-input-text>span>.inputs{padding-top:0;padding-bottom:0;font-size:.8rem;height:1rem}:host ::ng-deep .p-datatable-lg-tr>td p-celleditor>div>.cellControl>.p-dropdown .p-dropdown-label{padding-top:0;padding-bottom:0;font-size:.8rem}:host ::ng-deep .p-datatable-lg-tr>td p-celleditor>div>.cellControl>span>p-inputmask>.inputs{height:1rem;padding-top:0;padding-bottom:0;font-size:.8rem}:host ::ng-deep .p-datatable-sm-tr>td{padding-top:0!important;padding-top:.05rem!important;padding-bottom:.05rem!important}:host ::ng-deep .p-datatable-md-tr>td,:host ::ng-deep .p-datatable-lg-tr>td{padding:.15rem!important}.p-datatable.p-datatable-smth{font-size:.6rem!important}.p-datatable.p-datatable-dmth{font-size:.7rem!important}.p-datatable.p-datatable-lgth{font-size:.8rem!important}:host ::ng-deep .p-datatable.p-datatable-sm * p-celleditor>div>p-dropdown>.p-dropdown:not(.p-paginator-rpp-options) p-celleditor>div>p-dropdown>.p-dropdown:not(.p-paginator-rpp-options){height:15px!important}:host ::ng-deep .p-datatable.p-datatable-md * p-celleditor>div>p-dropdown>.p-dropdown:not(.p-paginator-rpp-options) p-celleditor>div>p-dropdown>.p-dropdown:not(.p-paginator-rpp-options){height:25px!important}:host ::ng-deep .p-datatable.p-datatable-lg * p-celleditor>div>p-dropdown>.p-dropdown:not(.p-paginator-rpp-options) p-celleditor>div>p-dropdown>.p-dropdown:not(.p-paginator-rpp-options){height:30px!important}:host ::ng-deep p-celleditor>kv-switch>div>p-inputswitch .p-inputswitch-slider{height:21px!important}:host ::ng-deep .teste>.p-button{background:#eaeaea!important;color:#a9a9a9;border:none;box-shadow:#0000003d 0 3px 8px;height:20px}::ng-deep .menuSizes>p-tieredmenusub>.p-tieredmenu-root-list>li:first-child{font-size:.6rem}::ng-deep .menuSizes>p-tieredmenusub>.p-tieredmenu-root-list>li:last-child{font-size:.8rem}.tag{width:5px;height:25px;border-radius:.25rem}:host ::ng-deep .p-speeddial-button.p-button.p-button-icon-only{width:2rem;height:2rem;font-size:1rem}.item-circle{width:4rem;height:2rem;padding:1rem;font-size:.8rem;border-radius:17%;display:flex;align-items:center;justify-content:center;background:#eaeaea!important;box-shadow:#0000003d 0 3px 13px}:host ::ng-deep p-speeddial>div>button>span.material-symbols-outlined.ng-star-inserted{font-size:1.1rem}:host ::ng-deep .check-edit-list>div.p-checkbox.p-component{height:1rem}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td:first-child{border-left:1px solid #ddd!important}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td:last-child{border-right:1px solid #ddd!important}:host ::ng-deep .p-datatable-wrapper::-webkit-scrollbar:hover{background-color:#dededebf}:host ::ng-deep .p-datatable-wrapper::-webkit-scrollbar{width:6px;height:3px}:host ::ng-deep .p-datatable-wrapper:hover::-webkit-scrollbar-thumb{border-left:2px solid white;background-color:#00000080}:host ::ng-deep .p-datatable-wrapper::-webkit-scrollbar-thumb{border-radius:4px;background-color:transparent}:host ::ng-deep .p-datatable-wrapper::-webkit-scrollbar-track{border-left:2px solid white;background-color:#dededebf}:host ::ng-deep .p-datatable>.p-datatable-wrapper{overflow-y:auto}\n"] }]
|
|
7283
|
+
args: [{ selector: 'kv-table-edit', template: "<div class=\"card\" id=\"tamanhotabela\" [style.font-size]=\"'1px'\">\r\n <p-toast></p-toast>\r\n\r\n @if(filtrosAvancados){\r\n <p-panel\r\n header=\"Filtros avan\u00E7ados\"\r\n [toggleable]=\"true\"\r\n [collapsed]=\"true\"\r\n (collapsedChange)=\"collapsed = !collapsed\"\r\n [style]=\"{ 'margin-bottom': '2px' }\"\r\n >\r\n <ng-template pTemplate=\"headericons\">\r\n @if (!collapsed) {\r\n <i class=\"pi pi-filter\"></i>\r\n }\r\n <!-- \u00CDcone quando o painel est\u00E1 aberto -->\r\n @if (collapsed) {\r\n <i class=\"pi pi-minus\"></i>\r\n }\r\n <!-- \u00CDcone quando o painel est\u00E1 fechado -->\r\n </ng-template>\r\n <ng-content></ng-content>\r\n </p-panel>\r\n }\r\n\r\n <p-contextMenu #cm [model]=\"itemsContextMenu\"></p-contextMenu>\r\n <p-table\r\n #te\r\n [editMode]=\"editMode\"\r\n (onEditComplete)=\"onEditComplete($event)\"\r\n (onEditInit)=\"onEditInit($event)\"\r\n [reorderableColumns]=\"config.reorderableColumns || false\"\r\n *ngIf=\"config\"\r\n [value]=\"dataSource\"\r\n [dataKey]=\"config.dataKey\"\r\n [columns]=\"config.columns\"\r\n [scrollable]=\"true\"\r\n appendTo=\"body\"\r\n [styleClass]=\"selectedSize.class\"\r\n [(selection)]=\"selectedItems\"\r\n [rowSelectable]=\"isRowSelectable\"\r\n [globalFilterFields]=\"globalFilterFields\"\r\n [rows]=\"rows\"\r\n [paginator]=\"paginator\"\r\n [rowsPerPageOptions]=\"rowsPerPageOptions\"\r\n [showCurrentPageReport]=\"true\"\r\n currentPageReportTemplate=\"{first} - {last} de {totalRecords}\"\r\n (selectionChange)=\"selectionChange($event)\"\r\n [rowHover]=\"true\"\r\n [totalRecords]=\"totalRecords\"\r\n [lazy]=\"config.lazy\"\r\n (onLazyLoad)=\"paginate($event)\"\r\n [groupRowsBy]=\"config.fieldGroup\"\r\n paginatorDropdownAppendTo=\"body\"\r\n [showFirstLastIcon]=\"showFirstLastIcon\"\r\n [pageLinks]=\"pageLinksOptions\"\r\n [scrollable]=\"isTableScrollable\"\r\n [scrollHeight]=\"scrollHeight\"\r\n [rowTrackBy]=\"rowTrackBy\"\r\n [(contextMenuSelection)]=\"selectedProduct\"\r\n [contextMenu]=\"isEditableTable() ? cm : null\"\r\n >\r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n\r\n @if (config.enableCation || enableSizes){\r\n <ng-template pTemplate=\"caption\">\r\n <div\r\n class=\"flex flex-row flex-wrap justify-content-between align-items-center grid formgrid p-fluid col-12 p-0 m-0\"\r\n >\r\n <div class=\"col-12 flex flex-column\">\r\n @if (config.title) {\r\n <div class=\"text-md font-bold my-3\">\r\n {{ config.title }}\r\n </div>\r\n } @if (config.subtitle) {\r\n <div class=\"text-sm mb-4 font-medium\">\r\n {{ config.subtitle }}\r\n </div>\r\n }\r\n </div>\r\n\r\n <div\r\n class=\"flex flex-row align-items-center md:col-6 lg:col-4 {{\r\n tamanhoTela < 768 ? 'col-10' : 'col-12'\r\n }} mt-1 mb-2 gap-1\"\r\n >\r\n \r\n @if (config.enableFilter) {\r\n <span 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(te, $event)\"\r\n placeholder=\"Pesquisar...\"\r\n class=\"h-2rem\"\r\n autocomplete=\"off\"\r\n />\r\n </span>\r\n }\r\n\r\n @if(enableSizes){\r\n <div class=\"sizes-controls\">\r\n \r\n <kv-button (click)=\"menu.toggle($event)\"\r\n [severity]=\"'tertiary'\"\r\n [icon]=\"'match_case'\"\r\n [pTooltip]=\"'Tamanho da fonte'\"\r\n >\r\n </kv-button>\r\n \r\n <p-tieredMenu\r\n [style]=\"{ 'font-size': '0.7rem' }\"\r\n styleClass=\"menuSizes\"\r\n appendTo=\"body\"\r\n #menu\r\n [model]=\"sizes\"\r\n [popup]=\"true\"\r\n >\r\n <ng-template let-item pTemplate=\"item\">\r\n <div\r\n class=\"cursor-pointer flex gap-2 align-items-center pl-1 m-2 menu-sizes\"\r\n (click)=\"item.command()\"\r\n >\r\n @if(this.selectedSize.size != item.size){\r\n <div\r\n class=\"tag\"\r\n [style.background-color]=\"'#EAEAEA'\"\r\n ></div>\r\n }\r\n \r\n @if(this.selectedSize.size == item.size){\r\n <div\r\n class=\"tag\"\r\n [style.background-color]=\"'#1DA750'\"\r\n ></div>\r\n }\r\n \r\n {{ item.label }}\r\n </div>\r\n </ng-template>\r\n </p-tieredMenu>\r\n </div>\r\n }\r\n </div>\r\n\r\n @if(isEditing){\r\n <span class=\"text-aviso\">\r\n Tabela em modo de edi\u00E7\u00E3o\r\n </span>\r\n }\r\n \r\n <div class=\"flex flex-row col-2 justify-content-end gap-2\">\r\n @for (action of config.actionsLote; track i; let i = $index) {\r\n @if(!isEditing){\r\n <div class=\"flex align-items-center justify-content-center\">\r\n @if ((selectedItems.length > 0 || action.showAcoesLote) &&\r\n (getOrExecute(action.visible, selectedItems) ?? true)) {\r\n <kv-button\r\n (onClick)=\"action?.command(); activeItemLote(selectedItems)\"\r\n [pTooltip]=\"getOrExecute(action.tooltip, selectedItems)\"\r\n [tooltipPosition]=\"\r\n (getOrExecute(action.tooltip, selectedItems)?.length ??\r\n 0 > 7) &&\r\n config.actionsLote &&\r\n i == config.actionsLote.length - 1\r\n ? 'left'\r\n : 'bottom'\r\n \"\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 }\r\n }\r\n\r\n @if (isEditableTable() && !hideBtnEdit) {\r\n <div>\r\n <kv-button\r\n (click)=\"this.isEditing = !this.isEditing\"\r\n [pTooltip]=\"!isEditing ? 'Habilitar Edi\u00E7\u00E3o' : 'Desabilitar Edi\u00E7\u00E3o'\"\r\n [tooltipPosition]=\"'left'\"\r\n [severity]=\"'tertiary'\"\r\n [icon]=\"'edit_square'\"\r\n >\r\n </kv-button>\r\n </div>\r\n }\r\n </div>\r\n\r\n <!---------------->\r\n \r\n </div>\r\n </ng-template>\r\n }\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n @if(config.enableSelect && !isEditing){\r\n <th\r\n [class]=\"selectedSize.class + 'th'\"\r\n >\r\n <p-tableHeaderCheckbox\r\n (click)=\"activeItemLote(selectedItems)\"\r\n ></p-tableHeaderCheckbox>\r\n </th>\r\n }\r\n @for(col of columns; track $index){\r\n <th\r\n [pSortableColumn]=\"col.field\"\r\n [pSortableColumnDisabled]=\"col.sortable === false\"\r\n [style.min-width]=\"col.width * selectedSize.size + 'px'\"\r\n pReorderableColumn\r\n [class]=\"selectedSize.class + 'th'\"\r\n \r\n >\r\n <div\r\n [class]=\"\r\n centralizarColunas(col) && alignColunasHeader(col) == ''\r\n ? 'flex flex-row justify-content-center'\r\n : 'flex flex-row'\r\n \"\r\n [style]=\"alignColunasHeader(col)\"\r\n >\r\n <span class=\"text-xs font-medium\">{{ col.header }}</span>\r\n @if(col.sortable === true) {\r\n <p-sortIcon\r\n [field]=\"col.field\"\r\n style=\"font-size: 10px\"\r\n ></p-sortIcon>\r\n }\r\n @if(col.headerTooltip){\r\n <span\r\n class=\"material-symbols-outlined flex align-items-center\"\r\n [pTooltip]=\"col.headerTooltip\"\r\n >\r\n info\r\n </span>\r\n }\r\n \r\n </div>\r\n </th>\r\n }\r\n \r\n @if(!isEditing && config.actions && config.actions.length > 0){\r\n <th></th>\r\n }\r\n\r\n @if(isEditableTable() && this.editMode == 'row'){\r\n <th\r\n id=\"th-edit\"\r\n style=\"width: 20px\"\r\n >\r\n Editar\r\n </th>\r\n }\r\n \r\n </tr>\r\n </ng-template>\r\n\r\n\r\n \r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n\r\n <ng-template\r\n pTemplate=\"body\"\r\n let-rowData\r\n let-editing=\"editing\"\r\n let-ri=\"rowIndex\"\r\n let-columns=\"columns\"\r\n let-rowgroup=\"rowgroup\"\r\n let-rowspan=\"rowspan\"\r\n >\r\n <tr\r\n [pEditableRow]=\"rowData\"\r\n [pEditableRowDisabled]=\"false\"\r\n [pContextMenuRow]=\"{rowData, editing}\"\r\n [class]=\"selectedSize.class + '-tr'\"\r\n (dblclick)=\"doubleClick($event, rowData)\"\r\n >\r\n @if(config.enableSelect && !isEditing){\r\n <td\r\n [style]=\"applyStyle(rowData, { field: 'check-box', header: '' })\"\r\n >\r\n \r\n <p-tableCheckbox\r\n class=\"check-edit-list\"\r\n [value]=\"rowData\"\r\n [disabled]=\"isDisabledCheckbox(rowData)\"\r\n (click)=\"activeItemLote(selectedItems)\"\r\n ></p-tableCheckbox>\r\n </td>\r\n }\r\n @for (col of columns; track i; let i = $index){\r\n <ng-container>\r\n <!-- FIXME: Testar a implementa\u00E7\u00E3o abaixo e mesaclar as duas formas -->\r\n \r\n <ng-template #templateInput let-rowData=\"rowData\" let-col=\"col\">\r\n <ng-container *ngIf=\"isEditing; else templatevisualedicao\">\r\n <ng-container [ngSwitch]=\"col.fieldControlType\">\r\n <ng-container *ngSwitchCase=\"'text'\">\r\n <div [style.width]=\"col.width\" class=\"grid formgrid p-fluid\">\r\n <kv-input-text\r\n [disabled]=\"isDisableEditRowCellFunction(rowData, col)\"\r\n class=\"cellControl col\"\r\n [(ngModel)]=\"rowData[col.field]\"\r\n [required]=\"col.required ?? true\"\r\n ></kv-input-text>\r\n </div>\r\n </ng-container>\r\n \r\n <ng-container *ngSwitchCase=\"'number'\">\r\n <div [style.width]=\"col.width\" class=\"grid formgrid p-fluid\">\r\n <kv-input-number\r\n [disabled]=\"isDisableEditRowCellFunction(rowData, col)\"\r\n class=\"cellControl col\"\r\n [(ngModel)]=\"rowData[col.field]\"\r\n [required]=\"col.required ?? true\"\r\n ></kv-input-number>\r\n </div>\r\n </ng-container>\r\n \r\n <ng-container *ngSwitchCase=\"'mask'\">\r\n <div [style.width]=\"col.width\" class=\"grid formgrid p-fluid\">\r\n <kv-input-mask\r\n [disabled]=\"isDisableEditRowCellFunction(rowData, col)\"\r\n class=\"cellControl col\"\r\n [mask]=\"col.mask\"\r\n [required]=\"col.required ?? true\"\r\n [(ngModel)]=\"rowData[col.field]\"\r\n ></kv-input-mask>\r\n </div>\r\n </ng-container>\r\n \r\n <ng-container *ngSwitchCase=\"'switch'\">\r\n <div [style.width]=\"col.width\" class=\"grid formgrid p-fluid\">\r\n <kv-switch\r\n [disabled]=\"isDisableEditRowCellFunction(rowData, col)\"\r\n class=\"cellControl col\"\r\n [(ngModel)]=\"rowData[col.field]\"\r\n ></kv-switch>\r\n </div>\r\n </ng-container>\r\n \r\n <ng-container *ngSwitchCase=\"'calendar'\">\r\n <div [style.width]=\"col.width\">\r\n <div\r\n [style.width]=\"col.width\"\r\n class=\"grid formgrid p-fluid\"\r\n >\r\n <kv-input-calendar\r\n class=\"cellControl col\"\r\n [(ngModel)]=\"rowData[col.field]\"\r\n ></kv-input-calendar>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'dropdown'\">\r\n <div [style.width]=\"col.width\" class=\"grid formgrid p-fluid\">\r\n <p-dropdown\r\n [disabled]=\"isDisableEditRowCellFunction(rowData, col)\"\r\n class=\"cellControl col\"\r\n appendTo=\"body\"\r\n [panelStyle]=\"{ 'font-size': '0.75rem' }\"\r\n [optionLabel]=\"col.fieldDropDownControl.descricaoobjeto\"\r\n [optionValue]=\"col.fieldDropDownControl.idobjeto\"\r\n [options]=\"\r\n col.fieldDropDownControl.fieldControlDropdownSource\r\n \"\r\n [(ngModel)]=\"rowData[col.field]\"\r\n >\r\n </p-dropdown>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n \r\n <ng-template #templatevisualedicao>\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n templateOutput;\r\n context: { rowData: rowData, col: col }\r\n \"\r\n ></ng-container>\r\n </ng-template>\r\n </ng-template>\r\n \r\n <ng-template #templateOutput let-rowData=\"rowData\" let-col=\"col\">\r\n <ng-container [ngSwitch]=\"col.fieldControlType\">\r\n <ng-container *ngSwitchCase=\"'dropdown'\">\r\n <ng-container *ngIf=\"rowData[col.field]\">\r\n {{ transformValueDrop(retornaDescricaoDrop(rowData, col), col) }}\r\n </ng-container>\r\n </ng-container>\r\n \r\n <ng-container *ngSwitchCase=\"'switch'\">\r\n <kv-switch\r\n [(ngModel)]=\"rowData[col.field]\"\r\n [disabled]=\"true\"\r\n ></kv-switch>\r\n </ng-container>\r\n \r\n <ng-container *ngSwitchCase=\"'calendar'\">\r\n {{ rowData[col.field] | date }}\r\n </ng-container>\r\n \r\n <ng-container *ngSwitchCase=\"'mask'\">\r\n {{ rowData[col.field] | mask : col.mask }}\r\n </ng-container>\r\n \r\n <ng-container *ngSwitchDefault>\r\n {{ transformValue(rowData, col) }}\r\n </ng-container>\r\n </ng-container>\r\n </ng-template>\r\n \r\n @if(editMode == 'cell' && col.fieldControlType){\r\n <td\r\n [pEditableColumn]=\"rowData\"\r\n [pEditableColumnField]=\"col.field\"\r\n [pEditableColumnRowIndex]=\"rowData[config.dataKey]\"\r\n [id]=\"'rowTable' + rowData[config.dataKey]\"\r\n (click)=\"activeItem(rowData)\"\r\n (dblclick)=\"dbClickEdit()\"\r\n class=\"rowTable\"\r\n [style]=\"\r\n applyStyle(rowData, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col)\r\n \"\r\n [pTooltip]=\"returnTooltipRow(rowData, col)\"\r\n >\r\n <p-cellEditor>\r\n <ng-container>\r\n <ng-template pTemplate=\"input\">\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n templateInput;\r\n context: { rowData: rowData, col: col }\r\n \"\r\n ></ng-container>\r\n </ng-template>\r\n \r\n <ng-template pTemplate=\"output\">\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n templateOutput;\r\n context: { rowData: rowData, col: col }\r\n \"\r\n ></ng-container>\r\n </ng-template>\r\n </ng-container>\r\n \r\n </p-cellEditor>\r\n </td>\r\n }\r\n \r\n <!-- NOTE: Edi\u00E7\u00E3o de linha -->\r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n \r\n <!-- Celula que armazena os controles de edi\u00E7\u00E3o para os campos -->\r\n @if(false && col.fieldControlType && editMode == 'row'){\r\n <td\r\n [id]=\"'rowTable' + rowData[config.dataKey]\"\r\n (click)=\"activeItem(rowData)\"\r\n (dblclick)=\"dbClickEdit()\"\r\n class=\"rowTable\"\r\n [style]=\"\r\n applyStyle(rowData, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col)\r\n \"\r\n [pTooltip]=\"returnTooltipRow(rowData, col)\"\r\n >\r\n <p-cellEditor\r\n [ngClass]=\"{ switch: col.fieldControlType == 'switch' }\"\r\n >\r\n <ng-template pTemplate=\"input\">\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n templateInput;\r\n context: { rowData: rowData, col: col }\r\n \"\r\n ></ng-container>\r\n </ng-template>\r\n \r\n <ng-template pTemplate=\"output\">\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n templateOutput;\r\n context: { rowData: rowData, col: col }\r\n \"\r\n ></ng-container>\r\n </ng-template>\r\n </p-cellEditor>\r\n </td>\r\n }\r\n \r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n \r\n <td\r\n *ngIf=\"rowgroup && !col.template\"\r\n [attr.rowspan]=\"rowgroup && col.grouped ? rowspan : null\"\r\n class=\"rowTable\"\r\n [style]=\"\r\n applyStyle(rowData, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col)\r\n \"\r\n [pTooltip]=\"returnTooltipRow(rowData, col)\"\r\n >\r\n <span class=\"p-column-title\">{{ col.header }}:</span>\r\n \r\n <span\r\n *ngIf=\"!isBooleanField(rowData, col); else booleanField\"\r\n [class]=\"returnRowClass(rowData, col)\"\r\n >\r\n <span\r\n *ngIf=\"\r\n !isChipField(col) && !col.iconField && !isImageField(col)\r\n \"\r\n >\r\n <i *ngIf=\"col.icon\" [class]=\"col.icon + ' mr-2'\"></i>\r\n {{ transformValue(rowData, col) }}\r\n </span>\r\n \r\n <div *ngIf=\"isChipField(col) && !col.iconField\">\r\n <span\r\n [class]=\"returnClassChip(rowData, col)\"\r\n [pTooltip]=\"returnTooltipIcon(rowData, col)\"\r\n >{{ transformValue(rowData, col) }}</span\r\n >\r\n </div>\r\n </span>\r\n \r\n <span *ngIf=\"isImageField(col)\">\r\n <span>\r\n <img class=\"image\" [src]=\"loadImage(rowData, col)\" />\r\n </span>\r\n </span>\r\n \r\n <i\r\n *ngIf=\"col.iconField\"\r\n [ngClass]=\"{\r\n 'material-icons': col.indIconMaterial,\r\n 'material-symbols-outlined mr-2': !col.indIconMaterial\r\n }\"\r\n [pTooltip]=\"returnTooltipIcon(rowData, col)\"\r\n >\r\n {{ returnClassIcon(rowData, col) }}\r\n </i>\r\n \r\n <ng-template #booleanField>\r\n <i\r\n *ngIf=\"!col.iconField && !isSwitchField(col)\"\r\n [ngClass]=\"\r\n rowData[col.field] ? 'text-green-500' : 'text-red-500'\r\n \"\r\n ><span class=\"material-symbols-outlined\">\r\n {{ rowData[col.field] ? \"check\" : \"close\" }}\r\n </span>\r\n </i>\r\n \r\n <span\r\n *ngIf=\"isSwitchField(col)\"\r\n [class]=\"returnRowClass(rowData, col)\"\r\n >\r\n <kv-switch\r\n (onSwitchChange)=\"onSwitchChange($event, rowData, col)\"\r\n [disabled]=\"col?.onlyReadField ?? true\"\r\n [switchValue]=\"transformValue(rowData, col)\"\r\n >\r\n </kv-switch>\r\n </span>\r\n </ng-template>\r\n </td>\r\n \r\n <td\r\n *ngIf=\"\r\n !rowgroup &&\r\n !col.grouped &&\r\n !col.template &&\r\n !col.fieldControlType\r\n \"\r\n [style]=\"\r\n applyStyle(rowData, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col)\r\n \"\r\n class=\"rowTable\"\r\n [pTooltip]=\"returnTooltipRow(rowData, col)\"\r\n >\r\n <span class=\"p-column-title\">{{ col.header }}:</span>\r\n \r\n <span\r\n *ngIf=\"!isBooleanField(rowData, col); else booleanField\"\r\n [class]=\"returnRowClass(rowData, col)\"\r\n >\r\n <span\r\n *ngIf=\"\r\n !isChipField(col) && !col.iconField && !isImageField(col)\r\n \"\r\n >\r\n <i *ngIf=\"col.icon\" [class]=\"col.icon + ' mr-2'\"></i>\r\n {{ transformValue(rowData, col) }}\r\n </span>\r\n \r\n <div *ngIf=\"isChipField(col) && !col.iconField\">\r\n <span\r\n [class]=\"returnClassChip(rowData, col)\"\r\n [pTooltip]=\"returnTooltipIcon(rowData, col)\"\r\n >\r\n {{ transformValue(rowData, col) }}</span\r\n >\r\n </div>\r\n </span>\r\n \r\n <span *ngIf=\"isImageField(col)\">\r\n <span>\r\n <img class=\"image\" [src]=\"loadImage(rowData, col)\" />\r\n </span>\r\n </span>\r\n \r\n <i\r\n *ngIf=\"col.iconField\"\r\n [ngClass]=\"{\r\n 'material-icons': col.indIconMaterial,\r\n 'material-symbols-outlined mr-2': !col.indIconMaterial\r\n }\"\r\n [pTooltip]=\"returnTooltipIcon(rowData, col)\"\r\n >\r\n {{ returnClassIcon(rowData, col) }}\r\n </i>\r\n \r\n <ng-template #booleanField>\r\n <i\r\n *ngIf=\"!col.iconField && !isSwitchField(col)\"\r\n [ngClass]=\"\r\n rowData[col.field] ? 'text-green-500' : 'text-red-500'\r\n \"\r\n ><span class=\"material-symbols-outlined\">\r\n {{ rowData[col.field] ? \"check\" : \"close\" }}\r\n </span>\r\n </i>\r\n \r\n <span\r\n *ngIf=\"isSwitchField(col)\"\r\n [class]=\"returnRowClass(rowData, col)\"\r\n >\r\n <kv-switch\r\n (onSwitchChange)=\"onSwitchChange($event, rowData, col)\"\r\n [disabled]=\"col?.onlyReadField ?? true\"\r\n [switchValue]=\"transformValue(rowData, col)\"\r\n >\r\n </kv-switch>\r\n </span>\r\n </ng-template>\r\n </td>\r\n \r\n <td\r\n *ngIf=\"col.template && !isEditableTable()\"\r\n [style]=\"\r\n applyStyle(rowData, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col)\r\n \"\r\n class=\"rowTable\"\r\n >\r\n <span class=\"p-column-title\">{{ col.header }}:</span>\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 </td>\r\n </ng-container>\r\n }\r\n \r\n\r\n <!-- ------------------------------------------------------------------------------------------------------------------------------------------- -->\r\n <!-- Controle de a\u00E7\u00E3o -->\r\n @if(!isEditing && config.actions && config.actions.length > 0){\r\n <td\r\n [ngClass]=\"{\r\n 'td-tools': isEditableTable() && this.editMode == 'row',\r\n 'td-tools-sticky': !isEditableTable() || this.editMode == 'cell'\r\n }\"\r\n [style]=\"\r\n applyStyle(rowData, { field: 'btns-options', header: '' }) +\r\n 'border-right: 1px solid #ddd !important; border-left: 1px solid #ddd !important;'\r\n \"\r\n >\r\n <div class=\"flex flex-row justify-content-end w-full\">\r\n \r\n <span\r\n class=\"material-symbols-outlined cursor-pointer icon-more-horiz\"\r\n style=\"font-size: 1rem; height: 10px; width: 20px\"\r\n (click)=\"menu.toggle($event); activeItem(rowData)\"\r\n >\r\n more_horiz\r\n </span>\r\n <!-- </button> -->\r\n\r\n <div *ngFor=\"let action of config.actions\">\r\n {{ criarMenusModal(rowData) }}\r\n </div>\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 </td>\r\n }\r\n \r\n <!-- ------------------------------------------------------------------------------------------------------------------------------------------- -->\r\n <!-- Controle de edi\u00E7\u00E3o -->\r\n @if(this.isEditableTable() && this.editMode == 'row'){\r\n <td class=\"td-edit\">\r\n <div class=\"flex align-items-center justify-content-center gap-2\">\r\n @if(!editing){\r\n <button\r\n [style.height]=\"'28px'\"\r\n [id]=\"'rowEdit' + rowData[config.dataKey]\"\r\n [style.width]=\"'28px'\"\r\n [disabled]=\"isDisableEditRowFunction(rowData)\"\r\n pButton\r\n pRipple\r\n type=\"button\"\r\n pInitEditableRow\r\n icon=\"pi pi-pencil\"\r\n (click)=\"onRowEditInit(rowData)\"\r\n class=\"p-button-rounded p-button-text\"\r\n ></button>\r\n }\r\n \r\n @if(editing){\r\n <button\r\n [style.height]=\"'28px'\"\r\n [style.width]=\"'28px'\"\r\n [disabled]=\"isDisableEditRowFunction(rowData)\"\r\n pButton\r\n pRipple\r\n type=\"button\"\r\n pCancelEditableRow\r\n icon=\"pi pi-times\"\r\n (click)=\"onRowEditCancel(rowData, ri)\"\r\n [id]=\"'rowCancel' + rowData[config.dataKey]\"\r\n class=\"p-button-rounded p-button-text p-button-danger\"\r\n ></button>\r\n }\r\n \r\n </div>\r\n </td>\r\n }\r\n \r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n</div>\r\n", styles: ["@charset \"UTF-8\";.td-edit{position:sticky;right:-1px;background-color:#fff;color:#5289b4}.td-tools{position:sticky;right:52px;border-right:1px solid #ddd!important;background-color:#fff;box-shadow:-5px 0 20px -10px #000000bf}.td-tools-sticky{position:sticky;right:0;border-right:3px solid #fff!important;background-color:#fff}#th-edit{position:sticky;right:0;background-color:#eaeaea}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td{text-align:center;border:1px solid #eaeaea;border-width:1px 1px;padding:0rem .5rem}:host ::ng-deep .p-datatable .p-datatable-thead>tr>th{text-align:center;padding:0rem .5rem;border-left:none;border-right:none;border-width:1px 1px;font-weight:700;color:#343a40;background:#eaeaea;transition:box-shadow .2s}.error-show{background-color:red;width:5px;height:10px}.btns-options{position:relative;left:20px}.chip-style{border:solid 1px}:host::ng-deep .p-card .p-card-content{padding:0}.material-symbols-outlined.md-19{font-size:15px}.material-symbols-outlined.md-22{font-size:19px}.checkbox-container{display:flex;align-items:center;gap:2px;margin-top:5px}#botaoFiltro:hover{color:#a9a9a9}.actionLoteBtns{align-items:center;background-color:#29b92d;color:#f2f3f5;display:flex;font-size:16px;width:2rem;height:2rem;top:2px;margin-left:.5rem;justify-content:center;text-decoration:none;text-align:center;padding:12px}:host ::ng-deep .center{display:flex;align-items:center;justify-content:center}#actionLoteBtns:hover,.actionLoteBtns:hover{background-color:#249a29!important}.actionBtns{align-items:center;background-color:transparent;color:#a9a9a9;display:flex;width:.8rem;height:.8rem;margin-left:.22rem;justify-content:center;text-decoration:none;text-align:justify;padding:11px}:host::ng-deep .material-symbols-outlined{font-family:Material Symbols Outlined;font-weight:400;font-style:normal;line-height:.9;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased}#actionBtns:hover{color:#a9a9a9}.image{border-style:solid;border-width:3.5px;border-color:#5289b4;border-radius:100%;height:55px;width:55px;padding:0;margin:0;vertical-align:middle}:host ::ng-deep .p-datatable-header{background-color:#eaeaea!important;padding:0!important;border-radius:5px!important}:host ::ng-deep .p-datatable .p-datatable-thead>tr>th{background-color:#eaeaea!important}:host ::ng-deep .p-datatable .p-datatable-thead>tr>th:first-of-type{border-radius:5px 0 0 5px}:host ::ng-deep .p-datatable .p-datatable-thead>tr>th:last-child{border-radius:0 5px 5px 0}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td{border-left:none!important;border-right:none!important}:host ::ng-deep .actionBtns,:host ::ng-deep .actionLoteBtns{border-radius:20%;box-shadow:#0000003d 0 3px 8px}.icon-more-horiz:hover,.icon-more-horiz:focus{color:#5e5e5e;transform:scale(1.1);transition:color .3s,transform .3s}:host ::ng-deep .p-checkbox .p-checkbox-box.p-highlight{border-color:#004172;background:#004172}:host ::ng-deep .p-checkbox .p-checkbox-box.p-highlight:hover{background-color:#002542}:host ::ng-deep .p-checkbox .p-checkbox-box.p-highlight:active{background-color:#002542}:host ::ng-deep .p-checkbox .p-checkbox-box.p-highlight:disabled{background-color:#002542;opacity:.4;cursor:auto}@media only screen and (min-width: 768px){.actionLoteBtns{top:-1px}}@media only screen and (max-width: 960px){:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td:has(p-tablecheckbox){border-bottom:0px!important}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td:has(img){justify-content:center!important;align-items:center!important}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td:has(img) .p-column-title{display:none!important}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td:last-child{border-bottom:1px solid #ddd!important}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td:last-child div{justify-content:center!important;align-items:center!important}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td .p-column-title{font-weight:600}}::ng-deep .p-panel.p-panel-toggleable .p-panel-header{background-color:#eaeaea!important}::ng-deep .field.grid,.formgrid.grid{padding:0rem!important}@media screen and (min-width: 961px){.moreVertBtn{position:relative;right:3px}}::ng-deep .p-datatable .p-datatable-thead>tr>th:last-of-type{border-radius:0 0 5px!important;-webkit-border-radius:0px 0px 5px 0px!important;-moz-border-radius:0px 0px 5px 0px!important;-ms-border-radius:0px 0px 5px 0px!important;-o-border-radius:0px 0px 5px 0px!important}::ng-deep .p-datatable .p-datatable-thead>tr>th:first-of-type{border-radius:0 0 0 5px!important;-webkit-border-radius:0px 0px 0px 5px!important;-moz-border-radius:0px 0px 0px 5px!important;-ms-border-radius:0px 0px 0px 5px!important;-o-border-radius:0px 0px 0px 5px!important}:host ::ng-deep p-celleditor>kv-switch>div>p-inputswitch.p-inputswitch-checked .p-inputswitch-slider:before{transform:translate(1.25rem);height:15px;margin-top:-8px;-webkit-transform:translateX(1.25rem);-moz-transform:translateX(1.25rem);-ms-transform:translateX(1.25rem);-o-transform:translateX(1.25rem)}:host ::ng-deep p-celleditor>kv-switch>div>p-inputswitch.p-inputswitch-checked .p-inputswitch-slider{height:21px}:host ::ng-deep p-celleditor>kv-switch>div>p-inputswitch{height:21px}:host ::ng-deep p-celleditor>kv-switch>div>p-inputswitch .p-inputswitch-slider:before{background:#fff;width:1rem;height:1.25rem;height:16px!important;left:.25rem;margin-top:-9px!important;margin-top:-.625rem;border-radius:50%;transition-duration:.2s}:host ::ng-deep p-celleditor>kv-switch>div>p-inputswitch:not(.p-disabled) .p-inputswitch-slider{height:21px}:host ::ng-deep .p-cell-editing{padding-top:0!important;padding-bottom:0!important}:host ::ng-deep p-dropdown-item{font-size:.1rem}.text-aviso{color:red;font-size:.85rem;font-weight:400}:host ::ng-deep .p-checkbox .p-checkbox-box{width:18px;height:18px}:host ::ng-deep .p-selectbutton .p-button{font-size:.75rem!important;height:24px;padding:11px}#btn-sizes{border-radius:50%;width:.5rem!important;height:.5rem!important;box-shadow:#0000003d 0 3px 8px}:host ::ng-deep .p-datatable.p-datatable-sm{font-size:.625rem!important}:host ::ng-deep .p-datatable.p-datatable-md{font-size:.75rem!important}:host ::ng-deep .p-datatable.p-datatable-lg{font-size:.875rem!important}:host ::ng-deep .p-datatable-sm-tr>td i>span.material-symbols-outlined{font-size:.9rem}:host ::ng-deep .p-datatable-sm-tr>td .check-edit-list>.p-checkbox .p-checkbox-box{width:15px;height:15px}:host ::ng-deep .p-datatable-sm-tr>td p-celleditor>div>.cellControl>.p-dropdown .p-dropdown-label{width:1%;padding-top:0;padding-bottom:0;font-size:.6rem}:host ::ng-deep .p-datatable-sm-tr>td p-celleditor>div>kv-input-text>span>.inputs{padding-top:0;padding-bottom:0;font-size:.6rem;height:1rem}:host ::ng-deep .p-datatable-sm-tr>td p-celleditor>div>.cellControl>span>p-inputmask>.inputs{height:1rem;padding-top:0;padding-bottom:0;font-size:.6rem}:host ::ng-deep .p-datatable-sm-tr>td p-celleditor>div>kv-switch>div>p-inputswitch>div,:host ::ng-deep .p-datatable-sm-tr>td p-celleditor>kv-switch>div>p-inputswitch,:host ::ng-deep .p-datatable-sm-tr>td p-celleditor>kv-switch>div>p-inputswitch .p-inputswitch-slider{height:.6rem!important;width:2.4rem}:host ::ng-deep .p-datatable-sm-tr>td p-celleditor>kv-switch>div>p-inputswitch .p-inputswitch-slider:before{background:#fff;width:.6rem!important;height:.6rem!important;left:.2rem;margin-top:-.35rem!important;border-radius:50%;transition-duration:.2s}:host ::ng-deep .p-datatable-sm-tr>td p-celleditor>div>kv-switch>div>p-inputswitch>div>span:before{background:#fff;width:.6rem!important;height:.6rem!important;left:.2rem;margin-top:-.35rem!important;border-radius:50%;transition-duration:.2s}:host ::ng-deep .p-datatable-md-tr>td i>span.material-symbols-outlined{font-size:1rem}:host ::ng-deep .p-datatable-md-tr>td .check-edit-list>.p-checkbox .p-checkbox-box{width:18px;height:18px}:host ::ng-deep .p-datatable-md-tr>td p-celleditor>div>.cellControl>.p-dropdown .p-dropdown-label{width:1%;padding-top:0;padding-bottom:0;font-size:.7rem}:host ::ng-deep .p-datatable-md-tr>td p-celleditor>div>kv-input-text>span>.inputs{padding-top:0;padding-bottom:0;font-size:.7rem;height:1rem}:host ::ng-deep .p-datatable-md-tr>td p-celleditor>div>.cellControl>span>p-inputmask>.inputs{height:1rem;padding-top:0;padding-bottom:0;font-size:.7rem}:host ::ng-deep .p-datatable-md-tr>td p-celleditor>div>kv-switch>div>p-inputswitch>div,:host ::ng-deep .p-datatable-md-tr>td p-celleditor>kv-switch>div>p-inputswitch,:host ::ng-deep .p-datatable-md-tr>td p-celleditor>kv-switch>div>p-inputswitch .p-inputswitch-slider{height:.83rem!important;width:2.7rem}:host ::ng-deep .p-datatable-md-tr>td p-celleditor>kv-switch>div>p-inputswitch .p-inputswitch-slider:before{background:#fff;width:.7rem!important;height:.7rem!important;left:.25rem;margin-top:-.35rem!important;border-radius:50%;transition-duration:.2s}:host ::ng-deep .p-datatable-md-tr>td p-celleditor>div>kv-switch>div>p-inputswitch>div>span:before{background:#fff;width:.7rem;height:.7rem;left:.25rem;margin-top:-.4rem;border-radius:50%;transition-duration:.2s}:host ::ng-deep .p-datatable-lg-tr>td i>span.material-symbols-outlined{font-size:1.1rem}:host ::ng-deep .p-datatable-lg-tr>td p-celleditor>div>kv-input-text>span>.inputs{padding-top:0;padding-bottom:0;font-size:.8rem;height:1rem}:host ::ng-deep .p-datatable-lg-tr>td p-celleditor>div>.cellControl>.p-dropdown .p-dropdown-label{padding-top:0;padding-bottom:0;font-size:.8rem}:host ::ng-deep .p-datatable-lg-tr>td p-celleditor>div>.cellControl>span>p-inputmask>.inputs{height:1rem;padding-top:0;padding-bottom:0;font-size:.8rem}:host ::ng-deep .p-datatable-sm-tr>td{padding-top:0!important;padding-top:.05rem!important;padding-bottom:.05rem!important}:host ::ng-deep .p-datatable-md-tr>td,:host ::ng-deep .p-datatable-lg-tr>td{padding:.15rem!important}.p-datatable.p-datatable-smth{font-size:.6rem!important}.p-datatable.p-datatable-dmth{font-size:.7rem!important}.p-datatable.p-datatable-lgth{font-size:.8rem!important}:host ::ng-deep .p-datatable.p-datatable-sm * p-celleditor>div>p-dropdown>.p-dropdown:not(.p-paginator-rpp-options) p-celleditor>div>p-dropdown>.p-dropdown:not(.p-paginator-rpp-options){height:15px!important}:host ::ng-deep .p-datatable.p-datatable-md * p-celleditor>div>p-dropdown>.p-dropdown:not(.p-paginator-rpp-options) p-celleditor>div>p-dropdown>.p-dropdown:not(.p-paginator-rpp-options){height:25px!important}:host ::ng-deep .p-datatable.p-datatable-lg * p-celleditor>div>p-dropdown>.p-dropdown:not(.p-paginator-rpp-options) p-celleditor>div>p-dropdown>.p-dropdown:not(.p-paginator-rpp-options){height:30px!important}:host ::ng-deep p-celleditor>kv-switch>div>p-inputswitch .p-inputswitch-slider{height:21px!important}:host ::ng-deep .teste>.p-button{background:#eaeaea!important;color:#a9a9a9;border:none;box-shadow:#0000003d 0 3px 8px;height:20px}::ng-deep .menuSizes>p-tieredmenusub>.p-tieredmenu-root-list>li:first-child{font-size:.6rem}::ng-deep .menuSizes>p-tieredmenusub>.p-tieredmenu-root-list>li:last-child{font-size:.8rem}.tag{width:5px;height:25px;border-radius:.25rem}:host ::ng-deep .p-speeddial-button.p-button.p-button-icon-only{width:2rem;height:2rem;font-size:1rem}.item-circle{width:4rem;height:2rem;padding:1rem;font-size:.8rem;border-radius:17%;display:flex;align-items:center;justify-content:center;background:#eaeaea!important;box-shadow:#0000003d 0 3px 13px}:host ::ng-deep p-speeddial>div>button>span.material-symbols-outlined.ng-star-inserted{font-size:1.1rem}:host ::ng-deep .check-edit-list>div.p-checkbox.p-component{height:1rem}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td:first-child{border-left:1px solid #ddd!important}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td:last-child{border-right:1px solid #ddd!important}:host ::ng-deep .p-datatable-wrapper::-webkit-scrollbar:hover{background-color:#dededebf}:host ::ng-deep .p-datatable-wrapper::-webkit-scrollbar{width:6px;height:3px}:host ::ng-deep .p-datatable-wrapper:hover::-webkit-scrollbar-thumb{border-left:2px solid white;background-color:#00000080}:host ::ng-deep .p-datatable-wrapper::-webkit-scrollbar-thumb{border-radius:4px;background-color:transparent}:host ::ng-deep .p-datatable-wrapper::-webkit-scrollbar-track{border-left:2px solid white;background-color:#dededebf}:host ::ng-deep .p-datatable>.p-datatable-wrapper{overflow-y:auto}\n"] }]
|
|
7268
7284
|
}], ctorParameters: () => [{ type: i1.DatePipe }, { type: i1.DecimalPipe }, { type: CpfCnpjPipe }, { type: TelefonePipe }, { type: NotificationService }], propDecorators: { enableSizes: [{
|
|
7269
7285
|
type: Input
|
|
7270
7286
|
}], editMode: [{
|
|
7271
7287
|
type: Input
|
|
7288
|
+
}], hideBtnEdit: [{
|
|
7289
|
+
type: Input
|
|
7272
7290
|
}], onSave: [{
|
|
7273
7291
|
type: Output
|
|
7274
7292
|
}], filterField: [{
|
|
@@ -8111,6 +8129,7 @@ class KvTableExpandableComponent {
|
|
|
8111
8129
|
this.showFirstLastIcon = false;
|
|
8112
8130
|
this.showTopHeader = false;
|
|
8113
8131
|
this.showButtonCollapsed = true;
|
|
8132
|
+
this.isTableRowExpanded = false;
|
|
8114
8133
|
this.filterField = new EventEmitter();
|
|
8115
8134
|
this.onActiveItem = new EventEmitter();
|
|
8116
8135
|
this.onActiveItemLote = new EventEmitter();
|
|
@@ -8374,7 +8393,13 @@ class KvTableExpandableComponent {
|
|
|
8374
8393
|
}
|
|
8375
8394
|
}
|
|
8376
8395
|
getCustomTemplate(templatename) {
|
|
8377
|
-
|
|
8396
|
+
if (!this._templates) {
|
|
8397
|
+
return null;
|
|
8398
|
+
}
|
|
8399
|
+
const template = this._templates[templatename];
|
|
8400
|
+
if (!template)
|
|
8401
|
+
return null;
|
|
8402
|
+
return template;
|
|
8378
8403
|
}
|
|
8379
8404
|
formatarValor(valor) {
|
|
8380
8405
|
const formatter = new Intl.NumberFormat('pt-BR', {
|
|
@@ -8408,6 +8433,11 @@ class KvTableExpandableComponent {
|
|
|
8408
8433
|
? this.config.disableControlCheckboxFunction(rowData)
|
|
8409
8434
|
: false;
|
|
8410
8435
|
}
|
|
8436
|
+
isVisibleExpandTolggle(rowData) {
|
|
8437
|
+
return this.expandToggleVisibleFn
|
|
8438
|
+
? this.expandToggleVisibleFn(rowData)
|
|
8439
|
+
: false;
|
|
8440
|
+
}
|
|
8411
8441
|
loadImage(rowData, col) {
|
|
8412
8442
|
/*
|
|
8413
8443
|
Nossa coluna de imagem trabalha com strings do tipo: base64 ou url
|
|
@@ -8470,11 +8500,11 @@ class KvTableExpandableComponent {
|
|
|
8470
8500
|
this.dataSource = [...this.dataSource];
|
|
8471
8501
|
}
|
|
8472
8502
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvTableExpandableComponent, deps: [{ token: i1.DatePipe }, { token: i1.DecimalPipe }, { token: CpfCnpjPipe }, { token: TelefonePipe }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8473
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.8", type: KvTableExpandableComponent, selector: "kv-table-expandable", inputs: { _templates: ["templates", "_templates"], setConfig: ["config", "setConfig"], filtrosAvancados: "filtrosAvancados", dataSource: "dataSource", selectedItems: "selectedItems", tableCaptalized: "tableCaptalized", applyStyle: "applyStyle", tableSize: "tableSize", paginator: "paginator", rows: "rows", rowsPerPageOptions: "rowsPerPageOptions", totalRecords: "totalRecords", pageLinksOptions: "pageLinksOptions", responsiveLayout: "responsiveLayout", isTableScrollable: "isTableScrollable", scrollHeight: "scrollHeight", rowTrackBy: "rowTrackBy", showFirstLastIcon: "showFirstLastIcon", showTopHeader: "showTopHeader", showButtonCollapsed: "showButtonCollapsed" }, outputs: { filterField: "filterField", onActiveItem: "onActiveItem", onActiveItemLote: "onActiveItemLote", doubleClickEvent: "doubleClickEvent", onSwitchTableChange: "onSwitchTableChange", onPaginate: "onPaginate", onSelectionChange: "onSelectionChange" }, ngImport: i0, template: "<div>\r\n @if (filtrosAvancados) {\r\n <p-panel\r\n header=\"Filtros avan\u00E7ados\"\r\n [toggleable]=\"true\"\r\n [collapsed]=\"true\"\r\n (collapsedChange)=\"collapsedAll = !collapsedAll\"\r\n [style]=\"{ 'margin-bottom': '2px' }\"\r\n >\r\n <ng-template pTemplate=\"headericons\">\r\n @if (!collapsedAll) {\r\n <i class=\"pi pi-filter\"></i>\r\n }\r\n <!-- \u00CDcone quando o painel est\u00E1 aberto -->\r\n @if (collapsedAll) {\r\n <i class=\"pi pi-minus\"></i>\r\n }\r\n <!-- \u00CDcone quando o painel est\u00E1 fechado -->\r\n </ng-template>\r\n <ng-content></ng-content>\r\n </p-panel>\r\n } @if (config) {\r\n <p-table\r\n #dt\r\n styleClass=\"p-datatable-sm\"\r\n [value]=\"dataSource\"\r\n [(selection)]=\"selectedItems\"\r\n [rowSelectable]=\"isRowSelectable\"\r\n rowGroupMode=\"subheader\"\r\n [groupRowsBy]=\"config.fieldGroup\"\r\n [columns]=\"config.columns\"\r\n [lazy]=\"config.lazy\"\r\n (onLazyLoad)=\"paginate($event)\"\r\n (selectionChange)=\"selectionChange($event)\"\r\n (onSort)=\"onSort($event)\"\r\n [sortField]=\"config.fieldGroup\"\r\n sortMode=\"single\"\r\n [dataKey]=\"config.fieldGroup\"\r\n [expandedRowKeys]=\"expandedRows\"\r\n [paginator]=\"paginator\"\r\n [rows]=\"rows\"\r\n [rowsPerPageOptions]=\"rowsPerPageOptions\"\r\n [totalRecords]=\"totalRecords\"\r\n [globalFilterFields]=\"globalFilterFields\"\r\n [showCurrentPageReport]=\"true\"\r\n currentPageReportTemplate=\"{first} - {last} de {totalRecords}\"\r\n [rowHover]=\"true\"\r\n [pageLinks]=\"pageLinksOptions\"\r\n [responsive]=\"true\"\r\n [responsiveLayout]=\"responsiveLayout ? 'stack' : ''\"\r\n [scrollable]=\"isTableScrollable\"\r\n [scrollHeight]=\"scrollHeight\"\r\n [rowTrackBy]=\"rowTrackBy\"\r\n [showFirstLastIcon]=\"showFirstLastIcon\"\r\n >\r\n @if (config.enableCation) {\r\n <ng-template pTemplate=\"caption\">\r\n <div\r\n class=\"flex flex-row flex-wrap justify-content-between align-items-center grid formgrid p-fluid col-12 p-0 m-0\"\r\n [style.background-color]=\"'#EAEAEA'\"\r\n >\r\n <div class=\"col-12 flex flex-column\">\r\n @if (config.title) {\r\n <div class=\"text-md font-bold my-3\">\r\n {{ config.title }}\r\n </div>\r\n } @if (config.subtitle) {\r\n <div class=\"text-sm mb-4 font-medium\">\r\n {{ config.subtitle }}\r\n </div>\r\n }\r\n </div>\r\n\r\n <div\r\n class=\"flex flex-row align-items-center md:col-6 lg:col-4 {{\r\n tamanhoTela < 768 ? 'col-10' : 'col-12'\r\n }} mt-1 mb-2 \"\r\n >\r\n @if (config.enableFilter) {\r\n <span 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(dt, $event)\"\r\n placeholder=\"Pesquisar...\"\r\n class=\"h-2rem\"\r\n />\r\n </span>\r\n }\r\n\r\n <!-- <div\r\n #menuFiltroDiv\r\n id = \"menuFiltroDiv\"\r\n [style.visibility]=\"'hidden'\"\r\n class=\"absolute z-4 bg-gray-200\"\r\n (click)=\"onClickEvent($event)\"\r\n > -->\r\n\r\n <div\r\n #menuFiltroDiv\r\n id=\"menuFiltroDiv\"\r\n [style.visibility]=\"'hidden'\"\r\n class=\"absolute z-4 bg-gray-200 menu-columns-filtro\"\r\n >\r\n <p-card>\r\n @for (col of columns; track col) {\r\n <div class=\"flex flex-column text-medium w-15rem\">\r\n {{ checkMenuFiltro(col) }}\r\n @if (!dinamicDisableColumn(col)) {\r\n <p-checkbox\r\n #filterColumns\r\n [label]=\"col.header\"\r\n [binary]=\"true\"\r\n class=\"checkbox-container\"\r\n (onChange)=\"dinamicColumnSet($event, col)\"\r\n [(ngModel)]=\"col.checked\"\r\n ></p-checkbox>\r\n }\r\n </div>\r\n }\r\n </p-card>\r\n </div>\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 mr-2\">\r\n @if(showButtonCollapsed){\r\n <kv-button\r\n [icon]=\"iconCollapsed\"\r\n (onClick)=\"executeCollapsed()\"\r\n [severity]=\"(config.actionsLote)&&(config.actionsLote.length>0) ? 'tertiary' : 'primary'\"\r\n [pTooltip]=\"collapsedAll ? 'Recolher tudo' : 'Expandir tudo'\"\r\n />\r\n }\r\n @for (action of config.actionsLote; track i; let i = $index) {\r\n \r\n \r\n @if ((selectedItems.length > 0 || action.showAcoesLote) &&\r\n (getOrExecute(action.visible, selectedItems) ?? true)) {\r\n\r\n <kv-button\r\n (onClick)=\"action?.command(); activeItemLote(selectedItems)\"\r\n [pTooltip]=\"getOrExecute(action.tooltip, selectedItems)\"\r\n [tooltipPosition]=\"\r\n (getOrExecute(action.tooltip, selectedItems)?.length ??\r\n 0 > 7) &&\r\n config.actionsLote &&\r\n i == config.actionsLote.length - 1\r\n ? 'left'\r\n : 'bottom'\r\n \"\r\n [disabled]=\"getOrExecute(action.disabled, selectedItems)?true:false\"\r\n [icon]=\"getOrExecute(action.icon, selectedItems)\"\r\n [severity]=\"action.severity ? action.severity : 'primary'\"\r\n />\r\n }\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n } \r\n @if (config.enableSelect || showTopHeader ){\r\n <ng-template pTemplate=\"header\">\r\n <tr>\r\n @if(config.enableSelect){\r\n <th [style.width]=\"showTopHeader?'25px':'100%'\" [attr.colspan]=\"showTopHeader?'1':'12'\" >\r\n <div class=\"w-full\">\r\n <input\r\n type=\"checkbox\"\r\n [checked]=\"isAllSelected()\"\r\n [indeterminate]=\"isAllIndeterminate()\"\r\n (click)=\"selectAll($event)\"\r\n />\r\n </div>\r\n </th>\r\n }\r\n @if(showTopHeader){\r\n @for (col of columns; track $index) {\r\n <th\r\n [pSortableColumn]=\"col.field\"\r\n [pSortableColumnDisabled]=\"col.sortable === false\"\r\n [style.width]=\"col.width\"\r\n class=\"text-sm fixed-header\"\r\n >\r\n <div\r\n [class]=\"\r\n centralizarColunas(col) && alignColunasHeader(col) == ''\r\n ? 'flex flex-row justify-content-center'\r\n : 'flex flex-row'\r\n \"\r\n [style]=\"alignColunasHeader(col)\"\r\n >\r\n <span>{{ col.header }}</span>\r\n @if (col.sortable) {\r\n <p-sortIcon\r\n [field]=\"'data.' + col.field\"\r\n style=\"font-size: 10px\"\r\n ></p-sortIcon>\r\n } \r\n @if (col.headerTooltip) {\r\n <span\r\n class=\"material-symbols-outlined flex align-items-center\"\r\n [pTooltip]=\"col.headerTooltip\"\r\n >info</span\r\n >\r\n }\r\n </div>\r\n </th>\r\n }\r\n @if (config.actions && config.actions.length > 0) {\r\n <th [style.width]=\"'40px'\" ></th>\r\n }\r\n }\r\n </tr>\r\n </ng-template>\r\n }\r\n\r\n <ng-template\r\n pTemplate=\"groupheader\"\r\n let-group\r\n let-rowIndex=\"rowIndex\"\r\n let-expanded=\"expanded\"\r\n >\r\n <tr>\r\n <td colspan=\"12\" class=\"groupheader\">\r\n <div class=\"flex flex-row align-items-center w-full\">\r\n <button\r\n type=\"button\"\r\n pButton\r\n pRipple\r\n [pRowToggler]=\"group\"\r\n class=\"p-button-text p-button-rounded p-button-plain mr-2\"\r\n [icon]=\"expanded ? 'pi pi-chevron-down' : 'pi pi-chevron-right'\"\r\n ></button>\r\n @if (config.fieldGroupColorFunction){\r\n <div\r\n class=\"tag\"\r\n [style.background-color]=\"config.fieldGroupColorFunction(group)\"\r\n ></div>\r\n }\r\n <span class=\"font-bold ml-2\">{{\r\n group[config.fieldGroup || 0]\r\n }}</span>\r\n </div>\r\n </td>\r\n </tr>\r\n @if(expanded && !showTopHeader){\r\n <tr style=\"height: 40px\">\r\n @if (config.enableSelect) {\r\n <th class=\"flex align-items-left pl-2\">\r\n <!-- <p-tableHeaderCheckbox\r\n (click)=\"activeItemLote(selectedItems)\"\r\n ></p-tableHeaderCheckbox> -->\r\n <input\r\n type=\"checkbox\"\r\n [checked]=\"\r\n isAllGroupSelected(\r\n config.fieldGroup || 0,\r\n group[config.fieldGroup || 0]\r\n )\r\n \"\r\n [indeterminate]=\"\r\n isGroupIndeterminate(\r\n config.fieldGroup || 0,\r\n group[config.fieldGroup || 0]\r\n )\r\n \"\r\n (click)=\"\r\n selectGroup(\r\n $event,\r\n config.fieldGroup || 0,\r\n group[config.fieldGroup || 0]\r\n )\r\n \"\r\n />\r\n </th>\r\n } \r\n @for (col of columns; track $index) {\r\n <th\r\n [pSortableColumn]=\"col.field\"\r\n [pSortableColumnDisabled]=\"col.sortable === false\"\r\n [style.width]=\"col.width\"\r\n class=\"text-sm\"\r\n >\r\n <div\r\n [class]=\"\r\n centralizarColunas(col) && alignColunasHeader(col) == ''\r\n ? 'flex flex-row justify-content-center'\r\n : 'flex flex-row'\r\n \"\r\n [style]=\"alignColunasHeader(col)\"\r\n >\r\n <span>{{ col.header }}</span>\r\n @if (col.sortable) {\r\n <p-sortIcon\r\n [field]=\"'data.' + col.field\"\r\n style=\"font-size: 10px\"\r\n ></p-sortIcon>\r\n } @if (col.headerTooltip) {\r\n <span\r\n class=\"material-symbols-outlined flex align-items-center\"\r\n [pTooltip]=\"col.headerTooltip\"\r\n >info</span\r\n >\r\n }\r\n </div>\r\n </th>\r\n } \r\n @if (config.actions && config.actions.length > 0) {\r\n <th></th>\r\n }\r\n </tr>\r\n }\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"rowexpansion\" let-group>\r\n <tr\r\n (dblclick)=\"doubleClick($event, group)\"\r\n [ngClass]=\"{ capitalize: tableCaptalized }\"\r\n >\r\n @if (config.enableSelect) {\r\n <td [style]=\"applyStyle(group, { field: 'check-box', header: '' })\">\r\n <!--<p-tableCheckbox *ngIf=\"isVisibleCheckbox(group.data)\"-->\r\n <!-- <p-tableCheckbox\r\n [value]=\"group\"\r\n [disabled]=\"isDisabledCheckbox(group)\"\r\n (click)=\"activeItemLote(selectedItems)\"\r\n ></p-tableCheckbox>\r\n -->\r\n <input\r\n type=\"checkbox\"\r\n [value]=\"group\"\r\n [checked]=\"isSelected(group)\"\r\n (click)=\"selectItem($event, group)\"\r\n />\r\n </td>\r\n } \r\n @for (col of columns; track $index) {\r\n <ng-container>\r\n @if (!col.template) {\r\n <td\r\n class=\"rowTable\"\r\n [style]=\"\r\n applyStyle(group, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col)\r\n \"\r\n [pTooltip]=\"returnTooltipRow(group, col)\"\r\n >\r\n <span class=\"p-column-title\">{{ col.header }}:</span>\r\n\r\n <span\r\n *ngIf=\"!isBooleanField(group, col); else booleanField\"\r\n [class]=\"returnRowClass(group, col)\"\r\n >\r\n @if (!isChipField(col) && !col.iconField && !isImageField(col)) {\r\n <span>\r\n @if (col.icon) {\r\n <i [class]=\"col.icon + ' mr-2'\"></i>\r\n }\r\n {{ transformValue(group, col) }}\r\n </span>\r\n } @if (isChipField(col) && !col.iconField) {\r\n <div>\r\n <span\r\n [class]=\"returnClassChip(group, col)\"\r\n [pTooltip]=\"returnTooltipIcon(group, col)\"\r\n >{{ transformValue(group, col) }}</span\r\n >\r\n </div>\r\n }\r\n </span>\r\n\r\n @if (isImageField(col)) {\r\n <span>\r\n <span>\r\n <img class=\"image\" [src]=\"loadImage(group, col)\" />\r\n </span>\r\n </span>\r\n } @if (col.iconField) {\r\n <i\r\n [ngClass]=\"{\r\n 'material-icons': col.indIconMaterial,\r\n 'material-symbols-outlined mr-2': !col.indIconMaterial\r\n }\"\r\n [pTooltip]=\"returnTooltipIcon(group, col)\"\r\n >\r\n {{ returnClassIcon(group, col) }}\r\n </i>\r\n }\r\n\r\n <ng-template #booleanField>\r\n @if (!col.iconField && !isSwitchField(col)) {\r\n <i\r\n [ngClass]=\"group[col.field] ? 'text-green-500' : 'text-red-500'\"\r\n ><span class=\"material-symbols-outlined\">\r\n {{ group[col.field] ? \"check\" : \"close\" }}\r\n </span>\r\n </i>\r\n } @if (isSwitchField(col)) {\r\n <span [class]=\"returnRowClass(group, col)\">\r\n <kv-switch\r\n (onSwitchChange)=\"onSwitchChange($event, group, col)\"\r\n [disabled]=\"col?.onlyReadField ?? true\"\r\n [switchValue]=\"transformValue(group, col)\"\r\n >\r\n </kv-switch>\r\n </span>\r\n }\r\n </ng-template>\r\n </td>\r\n } \r\n @if (col.template) {\r\n <td\r\n [style]=\"\r\n applyStyle(group, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col)\r\n \"\r\n class=\"rowTable\"\r\n >\r\n <span class=\"p-column-title\">{{ col.header }}:</span>\r\n @if (getCustomTemplate(col.template.name)) {\r\n <ng-container\r\n [ngTemplateOutlet]=\"getCustomTemplate(col.template.name)\"\r\n [ngTemplateOutletContext]=\"{ $implicit: group }\"\r\n />\r\n }\r\n </td>\r\n }\r\n </ng-container>\r\n } \r\n @if (config.actions && config.actions.length > 0) {\r\n <td [style]=\"applyStyle(group, { field: 'btns-options', header: '' })\">\r\n <div class=\"flex flex-row justify-content-end w-full\">\r\n <!-- <button\r\n id=\"moreVertBtn\"\r\n pButton\r\n class=\"actionBtns p-button-text p-button-raised\"\r\n (click)=\"menu.toggle($event); activeItem(group)\"\r\n > -->\r\n\r\n <span\r\n class=\"material-symbols-outlined cursor-pointer icon-more-horiz\"\r\n style=\"font-size: 25px\"\r\n (click)=\"\r\n returnRowDataActions(group);\r\n menu.toggle($event);\r\n activeItem(group)\r\n \"\r\n >\r\n more_horiz\r\n </span>\r\n\r\n <!-- </button> -->\r\n\r\n <p-tieredMenu\r\n #menu\r\n [popup]=\"true\"\r\n [model]=\"menuItems\"\r\n appendTo=\"body\"\r\n ></p-tieredMenu>\r\n </div>\r\n </td>\r\n }\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"emptymessage\" let-columns>\r\n <tr>\r\n <td\r\n [attr.colspan]=\"columns.length + 2\"\r\n style=\"text-align: center; border-radius: 10px !important\"\r\n >\r\n <p class=\"font-medium m-0\">Nenhum registro encontrado</p>\r\n </td>\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n }\r\n</div>\r\n", styles: ["@charset \"UTF-8\";tr{word-break:break-all}.tag{width:5px;height:20px;border-radius:.25rem}input[type=checkbox]{appearance:none;-webkit-appearance:none;-moz-appearance:none;width:20px;height:20px;border:2px solid #ccc;border-radius:4px;position:relative;cursor:pointer;outline:none;background-color:#fff}input[type=checkbox]:after{content:\"\";position:absolute;left:5px;top:2px;width:5px;height:10px;border:solid #fff;border-width:0 2px 2px 0;transform:rotate(45deg);opacity:0;transition:opacity .2s}input[type=checkbox]:checked{border-color:#004172;background:#004172}input[type=checkbox]:checked:hover{background-color:#002542}input[type=checkbox]:checked:active{background-color:#002542}input[type=checkbox]:checked:disabled{background-color:#002542;opacity:.4;cursor:auto}input[type=checkbox]:checked:after{opacity:1}::ng-deep .p-datatable.p-datatable-sm .p-datatable-header{padding:0rem}::ng-deep .p-datatable.p-datatable-sm .p-datatable-thead>tr>th{background-color:#eaeaea}::ng-deep .p-panel.p-panel-toggleable .p-panel-header{background-color:#eaeaea}.tr-td:hover{box-shadow:#3c40434d 0 1px 2px,#3c404326 0 2px 6px 2px;background-color:#fff;transition:color .3s,transform .3s;transform:scale(1)}.checkbox-container{width:25px!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%}.btn-table{background-color:#29b92d;padding:12px}.btn-table:hover{background-color:#249a29}.btn-table:active{background-color:#1c801f}.btn-table:disabled{background-color:#29b92d}\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$3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i5$2.AutoFocus, selector: "[pAutoFocus]", inputs: ["autofocus"] }, { kind: "directive", type: i6.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "directive", type: i1$1.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "component", type: i8.Card, selector: "p-card", inputs: ["header", "subheader", "style", "styleClass"] }, { kind: "component", type: i8$1.Checkbox, selector: "p-checkbox", inputs: ["value", "name", "disabled", "binary", "label", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "style", "styleClass", "labelStyleClass", "formControl", "checkboxIcon", "readonly", "required", "autofocus", "trueValue", "falseValue", "variant"], outputs: ["onChange", "onFocus", "onBlur"] }, { kind: "directive", type: i5$3.InputText, selector: "[pInputText]", inputs: ["variant"] }, { kind: "component", type: i11.Panel, selector: "p-panel", inputs: ["toggleable", "header", "collapsed", "style", "styleClass", "iconPos", "expandIcon", "collapseIcon", "showHeader", "toggler", "transitionOptions"], outputs: ["collapsedChange", "onBeforeToggle", "onAfterToggle"] }, { kind: "directive", type: i2.Ripple, selector: "[pRipple]" }, { kind: "component", type: i13.TieredMenu, selector: "p-tieredMenu", inputs: ["model", "popup", "style", "styleClass", "appendTo", "autoZIndex", "baseZIndex", "autoDisplay", "showTransitionOptions", "hideTransitionOptions", "id", "ariaLabel", "ariaLabelledBy", "disabled", "tabindex"], outputs: ["onShow", "onHide"] }, { kind: "component", type: i14.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll", "virtualRowHeight"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i14.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "directive", type: i14.RowToggler, selector: "[pRowToggler]", inputs: ["pRowToggler", "pRowTogglerDisabled"] }, { kind: "component", type: i14.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: KvSwitchComponent, selector: "kv-switch", inputs: ["readonly", "switchValue"], outputs: ["onSwitchChange"] }, { kind: "component", type: KvButtonComponent, selector: "kv-button", inputs: ["fullWidth", "type", "loading", "severity", "size", "icon", "label", "disabled"], outputs: ["onClick"] }] }); }
|
|
8503
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.8", type: KvTableExpandableComponent, selector: "kv-table-expandable", inputs: { _templates: ["templates", "_templates"], setConfig: ["config", "setConfig"], filtrosAvancados: "filtrosAvancados", dataSource: "dataSource", selectedItems: "selectedItems", tableCaptalized: "tableCaptalized", applyStyle: "applyStyle", tableSize: "tableSize", paginator: "paginator", rows: "rows", rowsPerPageOptions: "rowsPerPageOptions", totalRecords: "totalRecords", pageLinksOptions: "pageLinksOptions", responsiveLayout: "responsiveLayout", isTableScrollable: "isTableScrollable", scrollHeight: "scrollHeight", rowTrackBy: "rowTrackBy", showFirstLastIcon: "showFirstLastIcon", showTopHeader: "showTopHeader", showButtonCollapsed: "showButtonCollapsed", isTableRowExpanded: "isTableRowExpanded", expandToggleVisibleFn: "expandToggleVisibleFn" }, outputs: { filterField: "filterField", onActiveItem: "onActiveItem", onActiveItemLote: "onActiveItemLote", doubleClickEvent: "doubleClickEvent", onSwitchTableChange: "onSwitchTableChange", onPaginate: "onPaginate", onSelectionChange: "onSelectionChange" }, ngImport: i0, template: "<div>\r\n @if (filtrosAvancados) {\r\n <p-panel\r\n header=\"Filtros avan\u00E7ados\"\r\n [toggleable]=\"true\"\r\n [collapsed]=\"true\"\r\n (collapsedChange)=\"collapsedAll = !collapsedAll\"\r\n [style]=\"{ 'margin-bottom': '2px' }\"\r\n >\r\n <ng-template pTemplate=\"headericons\">\r\n @if (!collapsedAll) {\r\n <i class=\"pi pi-filter\"></i>\r\n }\r\n <!-- \u00CDcone quando o painel est\u00E1 aberto -->\r\n @if (collapsedAll) {\r\n <i class=\"pi pi-minus\"></i>\r\n }\r\n <!-- \u00CDcone quando o painel est\u00E1 fechado -->\r\n </ng-template>\r\n <ng-content></ng-content>\r\n </p-panel>\r\n } @if (config) {\r\n <p-table\r\n #dt\r\n styleClass=\"p-datatable-sm\"\r\n [value]=\"dataSource\"\r\n [(selection)]=\"selectedItems\"\r\n [rowSelectable]=\"isRowSelectable\"\r\n rowGroupMode=\"subheader\"\r\n [groupRowsBy]=\"config.fieldGroup\"\r\n [columns]=\"config.columns\"\r\n [lazy]=\"config.lazy\"\r\n (onLazyLoad)=\"paginate($event)\"\r\n (selectionChange)=\"selectionChange($event)\"\r\n (onSort)=\"onSort($event)\"\r\n [sortField]=\"config.fieldGroup\"\r\n sortMode=\"single\"\r\n [dataKey]=\"config.fieldGroup\"\r\n [expandedRowKeys]=\"expandedRows\"\r\n [paginator]=\"paginator\"\r\n [rows]=\"rows\"\r\n [rowsPerPageOptions]=\"rowsPerPageOptions\"\r\n [totalRecords]=\"totalRecords\"\r\n [globalFilterFields]=\"globalFilterFields\"\r\n [showCurrentPageReport]=\"true\"\r\n currentPageReportTemplate=\"{first} - {last} de {totalRecords}\"\r\n [rowHover]=\"true\"\r\n [pageLinks]=\"pageLinksOptions\"\r\n [responsive]=\"true\"\r\n [responsiveLayout]=\"responsiveLayout ? 'stack' : ''\"\r\n [scrollable]=\"isTableScrollable\"\r\n [scrollHeight]=\"scrollHeight\"\r\n [rowTrackBy]=\"rowTrackBy\"\r\n [showFirstLastIcon]=\"showFirstLastIcon\"\r\n >\r\n @if (config.enableCation) {\r\n <ng-template pTemplate=\"caption\">\r\n <div\r\n class=\"flex flex-row flex-wrap justify-content-between align-items-center grid formgrid p-fluid col-12 p-0 m-0\"\r\n [style.background-color]=\"'#EAEAEA'\"\r\n >\r\n <div class=\"col-12 flex flex-column\">\r\n @if (config.title) {\r\n <div class=\"text-md font-bold my-3\">\r\n {{ config.title }}\r\n </div>\r\n } @if (config.subtitle) {\r\n <div class=\"text-sm mb-4 font-medium\">\r\n {{ config.subtitle }}\r\n </div>\r\n }\r\n </div>\r\n\r\n <div\r\n class=\"flex flex-row align-items-center md:col-6 lg:col-4 {{\r\n tamanhoTela < 768 ? 'col-10' : 'col-12'\r\n }} mt-1 mb-2 \"\r\n >\r\n @if (config.enableFilter) {\r\n <span 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(dt, $event)\"\r\n placeholder=\"Pesquisar...\"\r\n class=\"h-2rem\"\r\n />\r\n </span>\r\n }\r\n\r\n <!-- <div\r\n #menuFiltroDiv\r\n id = \"menuFiltroDiv\"\r\n [style.visibility]=\"'hidden'\"\r\n class=\"absolute z-4 bg-gray-200\"\r\n (click)=\"onClickEvent($event)\"\r\n > -->\r\n\r\n <div\r\n #menuFiltroDiv\r\n id=\"menuFiltroDiv\"\r\n [style.visibility]=\"'hidden'\"\r\n class=\"absolute z-4 bg-gray-200 menu-columns-filtro\"\r\n >\r\n <p-card>\r\n @for (col of columns; track col) {\r\n <div class=\"flex flex-column text-medium w-15rem\">\r\n {{ checkMenuFiltro(col) }}\r\n @if (!dinamicDisableColumn(col)) {\r\n <p-checkbox\r\n #filterColumns\r\n [label]=\"col.header\"\r\n [binary]=\"true\"\r\n class=\"checkbox-container\"\r\n (onChange)=\"dinamicColumnSet($event, col)\"\r\n [(ngModel)]=\"col.checked\"\r\n ></p-checkbox>\r\n }\r\n </div>\r\n }\r\n </p-card>\r\n </div>\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 mr-2\">\r\n @if(showButtonCollapsed){\r\n <kv-button\r\n [icon]=\"iconCollapsed\"\r\n (onClick)=\"executeCollapsed()\"\r\n [severity]=\"(config.actionsLote)&&(config.actionsLote.length>0) ? 'tertiary' : 'primary'\"\r\n [pTooltip]=\"collapsedAll ? 'Recolher tudo' : 'Expandir tudo'\"\r\n />\r\n }\r\n @for (action of config.actionsLote; track i; let i = $index) {\r\n \r\n \r\n @if ((selectedItems.length > 0 || action.showAcoesLote) &&\r\n (getOrExecute(action.visible, selectedItems) ?? true)) {\r\n\r\n <kv-button\r\n (onClick)=\"action?.command(); activeItemLote(selectedItems)\"\r\n [pTooltip]=\"getOrExecute(action.tooltip, selectedItems)\"\r\n [tooltipPosition]=\"\r\n (getOrExecute(action.tooltip, selectedItems)?.length ??\r\n 0 > 7) &&\r\n config.actionsLote &&\r\n i == config.actionsLote.length - 1\r\n ? 'left'\r\n : 'bottom'\r\n \"\r\n [disabled]=\"getOrExecute(action.disabled, selectedItems)?true:false\"\r\n [icon]=\"getOrExecute(action.icon, selectedItems)\"\r\n [severity]=\"action.severity ? action.severity : 'primary'\"\r\n />\r\n }\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n } \r\n @if (config.enableSelect || showTopHeader ){\r\n <ng-template pTemplate=\"header\">\r\n <tr>\r\n @if(config.enableSelect){\r\n <th [style.width]=\"showTopHeader?'25px':'100%'\" [attr.colspan]=\"showTopHeader?'1':'12'\" >\r\n <div class=\"w-full\">\r\n <input\r\n type=\"checkbox\"\r\n [checked]=\"isAllSelected()\"\r\n [indeterminate]=\"isAllIndeterminate()\"\r\n (click)=\"selectAll($event)\"\r\n />\r\n </div>\r\n </th>\r\n }\r\n @if(showTopHeader){\r\n @if (isTableRowExpanded) {\r\n <th\r\n [style.width]=\"3\"\r\n class=\"text-sm fixed-header\" \r\n ></th>\r\n }\r\n @for (col of columns; track $index) {\r\n <th\r\n [pSortableColumn]=\"col.field\"\r\n [pSortableColumnDisabled]=\"col.sortable === false\"\r\n [style.width]=\"col.width\"\r\n class=\"text-sm fixed-header\"\r\n >\r\n <div\r\n [class]=\"\r\n centralizarColunas(col) && alignColunasHeader(col) == ''\r\n ? 'flex flex-row justify-content-center'\r\n : 'flex flex-row'\r\n \"\r\n [style]=\"alignColunasHeader(col)\"\r\n >\r\n <span [ngClass]=\"{ 'text-xs font-medium': isTableRowExpanded }\">{{ col.header }}</span>\r\n @if (col.sortable) {\r\n <p-sortIcon\r\n [field]=\"'data.' + col.field\"\r\n style=\"font-size: 10px\"\r\n ></p-sortIcon>\r\n } \r\n @if (col.headerTooltip) {\r\n <span\r\n class=\"material-symbols-outlined flex align-items-center\"\r\n [pTooltip]=\"col.headerTooltip\"\r\n >info</span\r\n >\r\n }\r\n </div>\r\n </th>\r\n }\r\n @if (config.actions && config.actions.length > 0) {\r\n <th [style.width]=\"'40px'\" ></th>\r\n }\r\n }\r\n </tr>\r\n </ng-template>\r\n }\r\n\r\n <ng-template\r\n pTemplate=\"groupheader\"\r\n let-group\r\n let-rowIndex=\"rowIndex\"\r\n let-expanded=\"expanded\"\r\n >\r\n @if (!isTableRowExpanded) {\r\n <tr>\r\n <td colspan=\"12\" class=\"groupheader\">\r\n <div class=\"flex flex-row align-items-center w-full\">\r\n <button\r\n type=\"button\"\r\n pButton\r\n pRipple\r\n [pRowToggler]=\"group\"\r\n class=\"p-button-text p-button-rounded p-button-plain mr-2\"\r\n [icon]=\"expanded ? 'pi pi-chevron-down' : 'pi pi-chevron-right'\"\r\n ></button>\r\n @if (config.fieldGroupColorFunction){\r\n <div\r\n class=\"tag\"\r\n [style.background-color]=\"config.fieldGroupColorFunction(group)\"\r\n ></div>\r\n }\r\n <span class=\"font-bold ml-2\">{{\r\n group[config.fieldGroup || 0]\r\n }}</span>\r\n </div>\r\n </td>\r\n </tr>\r\n } @else {\r\n <tr>\r\n <td>\r\n @if(isVisibleExpandTolggle(group)){\r\n <button\r\n type=\"button\"\r\n pButton\r\n pRipple\r\n [pRowToggler]=\"group\"\r\n class=\"p-button-text p-button-rounded p-button-plain icone\"\r\n [icon]=\"expanded ? 'pi pi-chevron-down' : 'pi pi-chevron-right'\"\r\n >\r\n </button> \r\n \r\n }\r\n </td>\r\n\r\n @for (col of columns; track $index) {\r\n <ng-container>\r\n @if (!col.template) {\r\n <td\r\n class=\"rowTable\"\r\n [style]=\"\r\n applyStyle(group, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col)\r\n \"\r\n [pTooltip]=\"returnTooltipRow(group, col)\"\r\n >\r\n \r\n <span\r\n *ngIf=\"!isBooleanField(group, col); else booleanField\"\r\n [class]=\"returnRowClass(group, col)\"\r\n >\r\n @if (!isChipField(col) && !col.iconField && !isImageField(col)) {\r\n \r\n <span class=\"text-xs\" >\r\n @if (col.icon) {\r\n <i [class]=\"col.icon + ' mr-2'\"></i>\r\n }\r\n {{ transformValue(group, col) }}\r\n </span>\r\n } @if (isChipField(col) && !col.iconField) {\r\n <div>\r\n <span\r\n [class]=\"returnClassChip(group, col)\"\r\n [pTooltip]=\"returnTooltipIcon(group, col)\"\r\n >{{ transformValue(group, col) }}</span\r\n >\r\n </div>\r\n }\r\n </span>\r\n \r\n @if (isImageField(col)) {\r\n <span>\r\n <span>\r\n <img class=\"image\" [src]=\"loadImage(group, col)\" />\r\n </span>\r\n </span>\r\n } @if (col.iconField) {\r\n <i\r\n [ngClass]=\"{\r\n 'material-icons': col.indIconMaterial,\r\n 'material-symbols-outlined mr-2': !col.indIconMaterial\r\n }\"\r\n [pTooltip]=\"returnTooltipIcon(group, col)\"\r\n >\r\n {{ returnClassIcon(group, col) }}\r\n </i>\r\n }\r\n \r\n <ng-template #booleanField>\r\n @if (!col.iconField && !isSwitchField(col)) {\r\n <i\r\n [ngClass]=\"group[col.field] ? 'text-green-500' : 'text-red-500'\"\r\n ><span class=\"material-symbols-outlined\">\r\n {{ group[col.field] ? \"check\" : \"close\" }}\r\n </span>\r\n </i>\r\n } @if (isSwitchField(col)) {\r\n <span [class]=\"returnRowClass(group, col)\">\r\n <kv-switch\r\n (onSwitchChange)=\"onSwitchChange($event, group, col)\"\r\n [disabled]=\"col?.onlyReadField ?? true\"\r\n [switchValue]=\"transformValue(group, col)\"\r\n >\r\n </kv-switch>\r\n </span>\r\n }\r\n </ng-template>\r\n </td>\r\n } \r\n @if (col.template) {\r\n <td\r\n [style]=\"\r\n applyStyle(group, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col)\r\n \"\r\n class=\"rowTable\"\r\n >\r\n <span class=\"p-column-title\">{{ col.header }}:</span>\r\n @if (getCustomTemplate(col.template.name)) {\r\n <ng-container\r\n [ngTemplateOutlet]=\"getCustomTemplate(col.template.name)\"\r\n [ngTemplateOutletContext]=\"{ $implicit: group }\"\r\n />\r\n }\r\n </td>\r\n }\r\n </ng-container>\r\n }\r\n </tr>\r\n }\r\n\r\n\r\n @if(expanded && !showTopHeader){\r\n <tr style=\"height: 40px\">\r\n @if (config.enableSelect) {\r\n <th class=\"flex align-items-left pl-2\">\r\n <!-- <p-tableHeaderCheckbox\r\n (click)=\"activeItemLote(selectedItems)\"\r\n ></p-tableHeaderCheckbox> -->\r\n <input\r\n type=\"checkbox\"\r\n [checked]=\"\r\n isAllGroupSelected(\r\n config.fieldGroup || 0,\r\n group[config.fieldGroup || 0]\r\n )\r\n \"\r\n [indeterminate]=\"\r\n isGroupIndeterminate(\r\n config.fieldGroup || 0,\r\n group[config.fieldGroup || 0]\r\n )\r\n \"\r\n (click)=\"\r\n selectGroup(\r\n $event,\r\n config.fieldGroup || 0,\r\n group[config.fieldGroup || 0]\r\n )\r\n \"\r\n />\r\n </th>\r\n } \r\n @for (col of columns; track $index) {\r\n <th\r\n [pSortableColumn]=\"col.field\"\r\n [pSortableColumnDisabled]=\"col.sortable === false\"\r\n [style.width]=\"col.width\"\r\n class=\"text-sm\"\r\n >\r\n <div\r\n [class]=\"\r\n centralizarColunas(col) && alignColunasHeader(col) == ''\r\n ? 'flex flex-row justify-content-center'\r\n : 'flex flex-row'\r\n \"\r\n [style]=\"alignColunasHeader(col)\"\r\n >\r\n <span>{{ col.header }}</span>\r\n @if (col.sortable) {\r\n <p-sortIcon\r\n [field]=\"'data.' + col.field\"\r\n style=\"font-size: 10px\"\r\n ></p-sortIcon>\r\n } @if (col.headerTooltip) {\r\n <span\r\n class=\"material-symbols-outlined flex align-items-center\"\r\n [pTooltip]=\"col.headerTooltip\"\r\n >info</span\r\n >\r\n }\r\n </div>\r\n </th>\r\n } \r\n @if (config.actions && config.actions.length > 0) {\r\n <th></th>\r\n }\r\n </tr>\r\n }\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"rowexpansion\" let-group>\r\n @if (!isTableRowExpanded) {\r\n <tr\r\n (dblclick)=\"doubleClick($event, group)\"\r\n [ngClass]=\"{ capitalize: tableCaptalized }\"\r\n >\r\n @if (config.enableSelect) {\r\n <td [style]=\"applyStyle(group, { field: 'check-box', header: '' })\">\r\n <!--<p-tableCheckbox *ngIf=\"isVisibleCheckbox(group.data)\"-->\r\n <!-- <p-tableCheckbox\r\n [value]=\"group\"\r\n [disabled]=\"isDisabledCheckbox(group)\"\r\n (click)=\"activeItemLote(selectedItems)\"\r\n ></p-tableCheckbox>\r\n -->\r\n <input\r\n type=\"checkbox\"\r\n [value]=\"group\"\r\n [checked]=\"isSelected(group)\"\r\n (click)=\"selectItem($event, group)\"\r\n />\r\n </td>\r\n } \r\n @for (col of columns; track $index) {\r\n <ng-container>\r\n @if (!col.template) {\r\n <td\r\n class=\"rowTable\"\r\n [style]=\"\r\n applyStyle(group, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col)\r\n \"\r\n [pTooltip]=\"returnTooltipRow(group, col)\"\r\n >\r\n <span class=\"p-column-title\">{{ col.header }}:</span>\r\n\r\n <span\r\n *ngIf=\"!isBooleanField(group, col); else booleanField\"\r\n [class]=\"returnRowClass(group, col)\"\r\n >\r\n @if (!isChipField(col) && !col.iconField && !isImageField(col)) {\r\n <span>\r\n @if (col.icon) {\r\n <i [class]=\"col.icon + ' mr-2'\"></i>\r\n }\r\n {{ transformValue(group, col) }}\r\n </span>\r\n } @if (isChipField(col) && !col.iconField) {\r\n <div>\r\n <span\r\n [class]=\"returnClassChip(group, col)\"\r\n [pTooltip]=\"returnTooltipIcon(group, col)\"\r\n >{{ transformValue(group, col) }}</span\r\n >\r\n </div>\r\n }\r\n </span>\r\n\r\n @if (isImageField(col)) {\r\n <span>\r\n <span>\r\n <img class=\"image\" [src]=\"loadImage(group, col)\" />\r\n </span>\r\n </span>\r\n } @if (col.iconField) {\r\n <i\r\n [ngClass]=\"{\r\n 'material-icons': col.indIconMaterial,\r\n 'material-symbols-outlined mr-2': !col.indIconMaterial\r\n }\"\r\n [pTooltip]=\"returnTooltipIcon(group, col)\"\r\n >\r\n {{ returnClassIcon(group, col) }}\r\n </i>\r\n }\r\n\r\n <ng-template #booleanField>\r\n @if (!col.iconField && !isSwitchField(col)) {\r\n <i\r\n [ngClass]=\"group[col.field] ? 'text-green-500' : 'text-red-500'\"\r\n ><span class=\"material-symbols-outlined\">\r\n {{ group[col.field] ? \"check\" : \"close\" }}\r\n </span>\r\n </i>\r\n } @if (isSwitchField(col)) {\r\n <span [class]=\"returnRowClass(group, col)\">\r\n <kv-switch\r\n (onSwitchChange)=\"onSwitchChange($event, group, col)\"\r\n [disabled]=\"col?.onlyReadField ?? true\"\r\n [switchValue]=\"transformValue(group, col)\"\r\n >\r\n </kv-switch>\r\n </span>\r\n }\r\n </ng-template>\r\n </td>\r\n } \r\n @if (col.template) {\r\n <td\r\n [style]=\"\r\n applyStyle(group, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col)\r\n \"\r\n class=\"rowTable\"\r\n >\r\n <span class=\"p-column-title\">{{ col.header }}:</span>\r\n @if (getCustomTemplate(col.template.name)) {\r\n <ng-container\r\n [ngTemplateOutlet]=\"getCustomTemplate(col.template.name)\"\r\n [ngTemplateOutletContext]=\"{ $implicit: group }\"\r\n />\r\n }\r\n </td>\r\n }\r\n </ng-container>\r\n } \r\n @if (config.actions && config.actions.length > 0) {\r\n <td [style]=\"applyStyle(group, { field: 'btns-options', header: '' })\">\r\n <div class=\"flex flex-row justify-content-end w-full\">\r\n <!-- <button\r\n id=\"moreVertBtn\"\r\n pButton\r\n class=\"actionBtns p-button-text p-button-raised\"\r\n (click)=\"menu.toggle($event); activeItem(group)\"\r\n > -->\r\n\r\n <span\r\n class=\"material-symbols-outlined cursor-pointer icon-more-horiz\"\r\n style=\"font-size: 25px\"\r\n (click)=\"\r\n returnRowDataActions(group);\r\n menu.toggle($event);\r\n activeItem(group)\r\n \"\r\n >\r\n more_horiz\r\n </span>\r\n\r\n <!-- </button> -->\r\n\r\n <p-tieredMenu\r\n #menu\r\n [popup]=\"true\"\r\n [model]=\"menuItems\"\r\n appendTo=\"body\"\r\n ></p-tieredMenu>\r\n </div>\r\n </td>\r\n }\r\n </tr>\r\n }\r\n\r\n @if (isTableRowExpanded) {\r\n\r\n <tr>\r\n <td\r\n [attr.colspan]=\"columns.length + 2\"\r\n style=\"text-align: start; border-radius: 10px !important\"\r\n >\r\n <div>\r\n @if (getCustomTemplate(config.templateRowExpanded.name)) {\r\n <ng-container\r\n [ngTemplateOutlet]=\"getCustomTemplate(config.templateRowExpanded.name)\"\r\n [ngTemplateOutletContext]=\"{ $implicit: group }\"\r\n />\r\n }\r\n </div>\r\n </td>\r\n </tr>\r\n \r\n }\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"emptymessage\" let-columns>\r\n <tr>\r\n <td\r\n [attr.colspan]=\"columns.length + 2\"\r\n style=\"text-align: center; border-radius: 10px !important\"\r\n >\r\n <p class=\"font-medium m-0\">Nenhum registro encontrado</p>\r\n </td>\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n }\r\n</div>\r\n", styles: ["@charset \"UTF-8\";tr{word-break:break-all}.tag{width:5px;height:20px;border-radius:.25rem}input[type=checkbox]{appearance:none;-webkit-appearance:none;-moz-appearance:none;width:20px;height:20px;border:2px solid #ccc;border-radius:4px;position:relative;cursor:pointer;outline:none;background-color:#fff}input[type=checkbox]:after{content:\"\";position:absolute;left:5px;top:2px;width:5px;height:10px;border:solid #fff;border-width:0 2px 2px 0;transform:rotate(45deg);opacity:0;transition:opacity .2s}input[type=checkbox]:checked{border-color:#004172;background:#004172}input[type=checkbox]:checked:hover{background-color:#002542}input[type=checkbox]:checked:active{background-color:#002542}input[type=checkbox]:checked:disabled{background-color:#002542;opacity:.4;cursor:auto}input[type=checkbox]:checked:after{opacity:1}::ng-deep .p-datatable.p-datatable-sm .p-datatable-header{padding:0rem}::ng-deep .p-datatable.p-datatable-sm .p-datatable-thead>tr>th{background-color:#eaeaea}::ng-deep .p-panel.p-panel-toggleable .p-panel-header{background-color:#eaeaea}.tr-td:hover{box-shadow:#3c40434d 0 1px 2px,#3c404326 0 2px 6px 2px;background-color:#fff;transition:color .3s,transform .3s;transform:scale(1)}.checkbox-container{width:25px!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%}.btn-table{background-color:#29b92d;padding:12px}.btn-table:hover{background-color:#249a29}.btn-table:active{background-color:#1c801f}.btn-table:disabled{background-color:#29b92d}.icone{width:12px;height:2px}:host ::ng-deep .icone .pi{font-size:.7rem}\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$3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i5$2.AutoFocus, selector: "[pAutoFocus]", inputs: ["autofocus"] }, { kind: "directive", type: i6.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "directive", type: i1$1.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "component", type: i8.Card, selector: "p-card", inputs: ["header", "subheader", "style", "styleClass"] }, { kind: "component", type: i8$1.Checkbox, selector: "p-checkbox", inputs: ["value", "name", "disabled", "binary", "label", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "style", "styleClass", "labelStyleClass", "formControl", "checkboxIcon", "readonly", "required", "autofocus", "trueValue", "falseValue", "variant"], outputs: ["onChange", "onFocus", "onBlur"] }, { kind: "directive", type: i5$3.InputText, selector: "[pInputText]", inputs: ["variant"] }, { kind: "component", type: i11.Panel, selector: "p-panel", inputs: ["toggleable", "header", "collapsed", "style", "styleClass", "iconPos", "expandIcon", "collapseIcon", "showHeader", "toggler", "transitionOptions"], outputs: ["collapsedChange", "onBeforeToggle", "onAfterToggle"] }, { kind: "directive", type: i2.Ripple, selector: "[pRipple]" }, { kind: "component", type: i13.TieredMenu, selector: "p-tieredMenu", inputs: ["model", "popup", "style", "styleClass", "appendTo", "autoZIndex", "baseZIndex", "autoDisplay", "showTransitionOptions", "hideTransitionOptions", "id", "ariaLabel", "ariaLabelledBy", "disabled", "tabindex"], outputs: ["onShow", "onHide"] }, { kind: "component", type: i14.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll", "virtualRowHeight"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i14.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "directive", type: i14.RowToggler, selector: "[pRowToggler]", inputs: ["pRowToggler", "pRowTogglerDisabled"] }, { kind: "component", type: i14.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: KvSwitchComponent, selector: "kv-switch", inputs: ["readonly", "switchValue"], outputs: ["onSwitchChange"] }, { kind: "component", type: KvButtonComponent, selector: "kv-button", inputs: ["fullWidth", "type", "loading", "severity", "size", "icon", "label", "disabled"], outputs: ["onClick"] }] }); }
|
|
8474
8504
|
}
|
|
8475
8505
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvTableExpandableComponent, decorators: [{
|
|
8476
8506
|
type: Component,
|
|
8477
|
-
args: [{ selector: 'kv-table-expandable', template: "<div>\r\n @if (filtrosAvancados) {\r\n <p-panel\r\n header=\"Filtros avan\u00E7ados\"\r\n [toggleable]=\"true\"\r\n [collapsed]=\"true\"\r\n (collapsedChange)=\"collapsedAll = !collapsedAll\"\r\n [style]=\"{ 'margin-bottom': '2px' }\"\r\n >\r\n <ng-template pTemplate=\"headericons\">\r\n @if (!collapsedAll) {\r\n <i class=\"pi pi-filter\"></i>\r\n }\r\n <!-- \u00CDcone quando o painel est\u00E1 aberto -->\r\n @if (collapsedAll) {\r\n <i class=\"pi pi-minus\"></i>\r\n }\r\n <!-- \u00CDcone quando o painel est\u00E1 fechado -->\r\n </ng-template>\r\n <ng-content></ng-content>\r\n </p-panel>\r\n } @if (config) {\r\n <p-table\r\n #dt\r\n styleClass=\"p-datatable-sm\"\r\n [value]=\"dataSource\"\r\n [(selection)]=\"selectedItems\"\r\n [rowSelectable]=\"isRowSelectable\"\r\n rowGroupMode=\"subheader\"\r\n [groupRowsBy]=\"config.fieldGroup\"\r\n [columns]=\"config.columns\"\r\n [lazy]=\"config.lazy\"\r\n (onLazyLoad)=\"paginate($event)\"\r\n (selectionChange)=\"selectionChange($event)\"\r\n (onSort)=\"onSort($event)\"\r\n [sortField]=\"config.fieldGroup\"\r\n sortMode=\"single\"\r\n [dataKey]=\"config.fieldGroup\"\r\n [expandedRowKeys]=\"expandedRows\"\r\n [paginator]=\"paginator\"\r\n [rows]=\"rows\"\r\n [rowsPerPageOptions]=\"rowsPerPageOptions\"\r\n [totalRecords]=\"totalRecords\"\r\n [globalFilterFields]=\"globalFilterFields\"\r\n [showCurrentPageReport]=\"true\"\r\n currentPageReportTemplate=\"{first} - {last} de {totalRecords}\"\r\n [rowHover]=\"true\"\r\n [pageLinks]=\"pageLinksOptions\"\r\n [responsive]=\"true\"\r\n [responsiveLayout]=\"responsiveLayout ? 'stack' : ''\"\r\n [scrollable]=\"isTableScrollable\"\r\n [scrollHeight]=\"scrollHeight\"\r\n [rowTrackBy]=\"rowTrackBy\"\r\n [showFirstLastIcon]=\"showFirstLastIcon\"\r\n >\r\n @if (config.enableCation) {\r\n <ng-template pTemplate=\"caption\">\r\n <div\r\n class=\"flex flex-row flex-wrap justify-content-between align-items-center grid formgrid p-fluid col-12 p-0 m-0\"\r\n [style.background-color]=\"'#EAEAEA'\"\r\n >\r\n <div class=\"col-12 flex flex-column\">\r\n @if (config.title) {\r\n <div class=\"text-md font-bold my-3\">\r\n {{ config.title }}\r\n </div>\r\n } @if (config.subtitle) {\r\n <div class=\"text-sm mb-4 font-medium\">\r\n {{ config.subtitle }}\r\n </div>\r\n }\r\n </div>\r\n\r\n <div\r\n class=\"flex flex-row align-items-center md:col-6 lg:col-4 {{\r\n tamanhoTela < 768 ? 'col-10' : 'col-12'\r\n }} mt-1 mb-2 \"\r\n >\r\n @if (config.enableFilter) {\r\n <span 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(dt, $event)\"\r\n placeholder=\"Pesquisar...\"\r\n class=\"h-2rem\"\r\n />\r\n </span>\r\n }\r\n\r\n <!-- <div\r\n #menuFiltroDiv\r\n id = \"menuFiltroDiv\"\r\n [style.visibility]=\"'hidden'\"\r\n class=\"absolute z-4 bg-gray-200\"\r\n (click)=\"onClickEvent($event)\"\r\n > -->\r\n\r\n <div\r\n #menuFiltroDiv\r\n id=\"menuFiltroDiv\"\r\n [style.visibility]=\"'hidden'\"\r\n class=\"absolute z-4 bg-gray-200 menu-columns-filtro\"\r\n >\r\n <p-card>\r\n @for (col of columns; track col) {\r\n <div class=\"flex flex-column text-medium w-15rem\">\r\n {{ checkMenuFiltro(col) }}\r\n @if (!dinamicDisableColumn(col)) {\r\n <p-checkbox\r\n #filterColumns\r\n [label]=\"col.header\"\r\n [binary]=\"true\"\r\n class=\"checkbox-container\"\r\n (onChange)=\"dinamicColumnSet($event, col)\"\r\n [(ngModel)]=\"col.checked\"\r\n ></p-checkbox>\r\n }\r\n </div>\r\n }\r\n </p-card>\r\n </div>\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 mr-2\">\r\n @if(showButtonCollapsed){\r\n <kv-button\r\n [icon]=\"iconCollapsed\"\r\n (onClick)=\"executeCollapsed()\"\r\n [severity]=\"(config.actionsLote)&&(config.actionsLote.length>0) ? 'tertiary' : 'primary'\"\r\n [pTooltip]=\"collapsedAll ? 'Recolher tudo' : 'Expandir tudo'\"\r\n />\r\n }\r\n @for (action of config.actionsLote; track i; let i = $index) {\r\n \r\n \r\n @if ((selectedItems.length > 0 || action.showAcoesLote) &&\r\n (getOrExecute(action.visible, selectedItems) ?? true)) {\r\n\r\n <kv-button\r\n (onClick)=\"action?.command(); activeItemLote(selectedItems)\"\r\n [pTooltip]=\"getOrExecute(action.tooltip, selectedItems)\"\r\n [tooltipPosition]=\"\r\n (getOrExecute(action.tooltip, selectedItems)?.length ??\r\n 0 > 7) &&\r\n config.actionsLote &&\r\n i == config.actionsLote.length - 1\r\n ? 'left'\r\n : 'bottom'\r\n \"\r\n [disabled]=\"getOrExecute(action.disabled, selectedItems)?true:false\"\r\n [icon]=\"getOrExecute(action.icon, selectedItems)\"\r\n [severity]=\"action.severity ? action.severity : 'primary'\"\r\n />\r\n }\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n } \r\n @if (config.enableSelect || showTopHeader ){\r\n <ng-template pTemplate=\"header\">\r\n <tr>\r\n @if(config.enableSelect){\r\n <th [style.width]=\"showTopHeader?'25px':'100%'\" [attr.colspan]=\"showTopHeader?'1':'12'\" >\r\n <div class=\"w-full\">\r\n <input\r\n type=\"checkbox\"\r\n [checked]=\"isAllSelected()\"\r\n [indeterminate]=\"isAllIndeterminate()\"\r\n (click)=\"selectAll($event)\"\r\n />\r\n </div>\r\n </th>\r\n }\r\n @if(showTopHeader){\r\n @for (col of columns; track $index) {\r\n <th\r\n [pSortableColumn]=\"col.field\"\r\n [pSortableColumnDisabled]=\"col.sortable === false\"\r\n [style.width]=\"col.width\"\r\n class=\"text-sm fixed-header\"\r\n >\r\n <div\r\n [class]=\"\r\n centralizarColunas(col) && alignColunasHeader(col) == ''\r\n ? 'flex flex-row justify-content-center'\r\n : 'flex flex-row'\r\n \"\r\n [style]=\"alignColunasHeader(col)\"\r\n >\r\n <span>{{ col.header }}</span>\r\n @if (col.sortable) {\r\n <p-sortIcon\r\n [field]=\"'data.' + col.field\"\r\n style=\"font-size: 10px\"\r\n ></p-sortIcon>\r\n } \r\n @if (col.headerTooltip) {\r\n <span\r\n class=\"material-symbols-outlined flex align-items-center\"\r\n [pTooltip]=\"col.headerTooltip\"\r\n >info</span\r\n >\r\n }\r\n </div>\r\n </th>\r\n }\r\n @if (config.actions && config.actions.length > 0) {\r\n <th [style.width]=\"'40px'\" ></th>\r\n }\r\n }\r\n </tr>\r\n </ng-template>\r\n }\r\n\r\n <ng-template\r\n pTemplate=\"groupheader\"\r\n let-group\r\n let-rowIndex=\"rowIndex\"\r\n let-expanded=\"expanded\"\r\n >\r\n <tr>\r\n <td colspan=\"12\" class=\"groupheader\">\r\n <div class=\"flex flex-row align-items-center w-full\">\r\n <button\r\n type=\"button\"\r\n pButton\r\n pRipple\r\n [pRowToggler]=\"group\"\r\n class=\"p-button-text p-button-rounded p-button-plain mr-2\"\r\n [icon]=\"expanded ? 'pi pi-chevron-down' : 'pi pi-chevron-right'\"\r\n ></button>\r\n @if (config.fieldGroupColorFunction){\r\n <div\r\n class=\"tag\"\r\n [style.background-color]=\"config.fieldGroupColorFunction(group)\"\r\n ></div>\r\n }\r\n <span class=\"font-bold ml-2\">{{\r\n group[config.fieldGroup || 0]\r\n }}</span>\r\n </div>\r\n </td>\r\n </tr>\r\n @if(expanded && !showTopHeader){\r\n <tr style=\"height: 40px\">\r\n @if (config.enableSelect) {\r\n <th class=\"flex align-items-left pl-2\">\r\n <!-- <p-tableHeaderCheckbox\r\n (click)=\"activeItemLote(selectedItems)\"\r\n ></p-tableHeaderCheckbox> -->\r\n <input\r\n type=\"checkbox\"\r\n [checked]=\"\r\n isAllGroupSelected(\r\n config.fieldGroup || 0,\r\n group[config.fieldGroup || 0]\r\n )\r\n \"\r\n [indeterminate]=\"\r\n isGroupIndeterminate(\r\n config.fieldGroup || 0,\r\n group[config.fieldGroup || 0]\r\n )\r\n \"\r\n (click)=\"\r\n selectGroup(\r\n $event,\r\n config.fieldGroup || 0,\r\n group[config.fieldGroup || 0]\r\n )\r\n \"\r\n />\r\n </th>\r\n } \r\n @for (col of columns; track $index) {\r\n <th\r\n [pSortableColumn]=\"col.field\"\r\n [pSortableColumnDisabled]=\"col.sortable === false\"\r\n [style.width]=\"col.width\"\r\n class=\"text-sm\"\r\n >\r\n <div\r\n [class]=\"\r\n centralizarColunas(col) && alignColunasHeader(col) == ''\r\n ? 'flex flex-row justify-content-center'\r\n : 'flex flex-row'\r\n \"\r\n [style]=\"alignColunasHeader(col)\"\r\n >\r\n <span>{{ col.header }}</span>\r\n @if (col.sortable) {\r\n <p-sortIcon\r\n [field]=\"'data.' + col.field\"\r\n style=\"font-size: 10px\"\r\n ></p-sortIcon>\r\n } @if (col.headerTooltip) {\r\n <span\r\n class=\"material-symbols-outlined flex align-items-center\"\r\n [pTooltip]=\"col.headerTooltip\"\r\n >info</span\r\n >\r\n }\r\n </div>\r\n </th>\r\n } \r\n @if (config.actions && config.actions.length > 0) {\r\n <th></th>\r\n }\r\n </tr>\r\n }\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"rowexpansion\" let-group>\r\n <tr\r\n (dblclick)=\"doubleClick($event, group)\"\r\n [ngClass]=\"{ capitalize: tableCaptalized }\"\r\n >\r\n @if (config.enableSelect) {\r\n <td [style]=\"applyStyle(group, { field: 'check-box', header: '' })\">\r\n <!--<p-tableCheckbox *ngIf=\"isVisibleCheckbox(group.data)\"-->\r\n <!-- <p-tableCheckbox\r\n [value]=\"group\"\r\n [disabled]=\"isDisabledCheckbox(group)\"\r\n (click)=\"activeItemLote(selectedItems)\"\r\n ></p-tableCheckbox>\r\n -->\r\n <input\r\n type=\"checkbox\"\r\n [value]=\"group\"\r\n [checked]=\"isSelected(group)\"\r\n (click)=\"selectItem($event, group)\"\r\n />\r\n </td>\r\n } \r\n @for (col of columns; track $index) {\r\n <ng-container>\r\n @if (!col.template) {\r\n <td\r\n class=\"rowTable\"\r\n [style]=\"\r\n applyStyle(group, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col)\r\n \"\r\n [pTooltip]=\"returnTooltipRow(group, col)\"\r\n >\r\n <span class=\"p-column-title\">{{ col.header }}:</span>\r\n\r\n <span\r\n *ngIf=\"!isBooleanField(group, col); else booleanField\"\r\n [class]=\"returnRowClass(group, col)\"\r\n >\r\n @if (!isChipField(col) && !col.iconField && !isImageField(col)) {\r\n <span>\r\n @if (col.icon) {\r\n <i [class]=\"col.icon + ' mr-2'\"></i>\r\n }\r\n {{ transformValue(group, col) }}\r\n </span>\r\n } @if (isChipField(col) && !col.iconField) {\r\n <div>\r\n <span\r\n [class]=\"returnClassChip(group, col)\"\r\n [pTooltip]=\"returnTooltipIcon(group, col)\"\r\n >{{ transformValue(group, col) }}</span\r\n >\r\n </div>\r\n }\r\n </span>\r\n\r\n @if (isImageField(col)) {\r\n <span>\r\n <span>\r\n <img class=\"image\" [src]=\"loadImage(group, col)\" />\r\n </span>\r\n </span>\r\n } @if (col.iconField) {\r\n <i\r\n [ngClass]=\"{\r\n 'material-icons': col.indIconMaterial,\r\n 'material-symbols-outlined mr-2': !col.indIconMaterial\r\n }\"\r\n [pTooltip]=\"returnTooltipIcon(group, col)\"\r\n >\r\n {{ returnClassIcon(group, col) }}\r\n </i>\r\n }\r\n\r\n <ng-template #booleanField>\r\n @if (!col.iconField && !isSwitchField(col)) {\r\n <i\r\n [ngClass]=\"group[col.field] ? 'text-green-500' : 'text-red-500'\"\r\n ><span class=\"material-symbols-outlined\">\r\n {{ group[col.field] ? \"check\" : \"close\" }}\r\n </span>\r\n </i>\r\n } @if (isSwitchField(col)) {\r\n <span [class]=\"returnRowClass(group, col)\">\r\n <kv-switch\r\n (onSwitchChange)=\"onSwitchChange($event, group, col)\"\r\n [disabled]=\"col?.onlyReadField ?? true\"\r\n [switchValue]=\"transformValue(group, col)\"\r\n >\r\n </kv-switch>\r\n </span>\r\n }\r\n </ng-template>\r\n </td>\r\n } \r\n @if (col.template) {\r\n <td\r\n [style]=\"\r\n applyStyle(group, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col)\r\n \"\r\n class=\"rowTable\"\r\n >\r\n <span class=\"p-column-title\">{{ col.header }}:</span>\r\n @if (getCustomTemplate(col.template.name)) {\r\n <ng-container\r\n [ngTemplateOutlet]=\"getCustomTemplate(col.template.name)\"\r\n [ngTemplateOutletContext]=\"{ $implicit: group }\"\r\n />\r\n }\r\n </td>\r\n }\r\n </ng-container>\r\n } \r\n @if (config.actions && config.actions.length > 0) {\r\n <td [style]=\"applyStyle(group, { field: 'btns-options', header: '' })\">\r\n <div class=\"flex flex-row justify-content-end w-full\">\r\n <!-- <button\r\n id=\"moreVertBtn\"\r\n pButton\r\n class=\"actionBtns p-button-text p-button-raised\"\r\n (click)=\"menu.toggle($event); activeItem(group)\"\r\n > -->\r\n\r\n <span\r\n class=\"material-symbols-outlined cursor-pointer icon-more-horiz\"\r\n style=\"font-size: 25px\"\r\n (click)=\"\r\n returnRowDataActions(group);\r\n menu.toggle($event);\r\n activeItem(group)\r\n \"\r\n >\r\n more_horiz\r\n </span>\r\n\r\n <!-- </button> -->\r\n\r\n <p-tieredMenu\r\n #menu\r\n [popup]=\"true\"\r\n [model]=\"menuItems\"\r\n appendTo=\"body\"\r\n ></p-tieredMenu>\r\n </div>\r\n </td>\r\n }\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"emptymessage\" let-columns>\r\n <tr>\r\n <td\r\n [attr.colspan]=\"columns.length + 2\"\r\n style=\"text-align: center; border-radius: 10px !important\"\r\n >\r\n <p class=\"font-medium m-0\">Nenhum registro encontrado</p>\r\n </td>\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n }\r\n</div>\r\n", styles: ["@charset \"UTF-8\";tr{word-break:break-all}.tag{width:5px;height:20px;border-radius:.25rem}input[type=checkbox]{appearance:none;-webkit-appearance:none;-moz-appearance:none;width:20px;height:20px;border:2px solid #ccc;border-radius:4px;position:relative;cursor:pointer;outline:none;background-color:#fff}input[type=checkbox]:after{content:\"\";position:absolute;left:5px;top:2px;width:5px;height:10px;border:solid #fff;border-width:0 2px 2px 0;transform:rotate(45deg);opacity:0;transition:opacity .2s}input[type=checkbox]:checked{border-color:#004172;background:#004172}input[type=checkbox]:checked:hover{background-color:#002542}input[type=checkbox]:checked:active{background-color:#002542}input[type=checkbox]:checked:disabled{background-color:#002542;opacity:.4;cursor:auto}input[type=checkbox]:checked:after{opacity:1}::ng-deep .p-datatable.p-datatable-sm .p-datatable-header{padding:0rem}::ng-deep .p-datatable.p-datatable-sm .p-datatable-thead>tr>th{background-color:#eaeaea}::ng-deep .p-panel.p-panel-toggleable .p-panel-header{background-color:#eaeaea}.tr-td:hover{box-shadow:#3c40434d 0 1px 2px,#3c404326 0 2px 6px 2px;background-color:#fff;transition:color .3s,transform .3s;transform:scale(1)}.checkbox-container{width:25px!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%}.btn-table{background-color:#29b92d;padding:12px}.btn-table:hover{background-color:#249a29}.btn-table:active{background-color:#1c801f}.btn-table:disabled{background-color:#29b92d}\n"] }]
|
|
8507
|
+
args: [{ selector: 'kv-table-expandable', template: "<div>\r\n @if (filtrosAvancados) {\r\n <p-panel\r\n header=\"Filtros avan\u00E7ados\"\r\n [toggleable]=\"true\"\r\n [collapsed]=\"true\"\r\n (collapsedChange)=\"collapsedAll = !collapsedAll\"\r\n [style]=\"{ 'margin-bottom': '2px' }\"\r\n >\r\n <ng-template pTemplate=\"headericons\">\r\n @if (!collapsedAll) {\r\n <i class=\"pi pi-filter\"></i>\r\n }\r\n <!-- \u00CDcone quando o painel est\u00E1 aberto -->\r\n @if (collapsedAll) {\r\n <i class=\"pi pi-minus\"></i>\r\n }\r\n <!-- \u00CDcone quando o painel est\u00E1 fechado -->\r\n </ng-template>\r\n <ng-content></ng-content>\r\n </p-panel>\r\n } @if (config) {\r\n <p-table\r\n #dt\r\n styleClass=\"p-datatable-sm\"\r\n [value]=\"dataSource\"\r\n [(selection)]=\"selectedItems\"\r\n [rowSelectable]=\"isRowSelectable\"\r\n rowGroupMode=\"subheader\"\r\n [groupRowsBy]=\"config.fieldGroup\"\r\n [columns]=\"config.columns\"\r\n [lazy]=\"config.lazy\"\r\n (onLazyLoad)=\"paginate($event)\"\r\n (selectionChange)=\"selectionChange($event)\"\r\n (onSort)=\"onSort($event)\"\r\n [sortField]=\"config.fieldGroup\"\r\n sortMode=\"single\"\r\n [dataKey]=\"config.fieldGroup\"\r\n [expandedRowKeys]=\"expandedRows\"\r\n [paginator]=\"paginator\"\r\n [rows]=\"rows\"\r\n [rowsPerPageOptions]=\"rowsPerPageOptions\"\r\n [totalRecords]=\"totalRecords\"\r\n [globalFilterFields]=\"globalFilterFields\"\r\n [showCurrentPageReport]=\"true\"\r\n currentPageReportTemplate=\"{first} - {last} de {totalRecords}\"\r\n [rowHover]=\"true\"\r\n [pageLinks]=\"pageLinksOptions\"\r\n [responsive]=\"true\"\r\n [responsiveLayout]=\"responsiveLayout ? 'stack' : ''\"\r\n [scrollable]=\"isTableScrollable\"\r\n [scrollHeight]=\"scrollHeight\"\r\n [rowTrackBy]=\"rowTrackBy\"\r\n [showFirstLastIcon]=\"showFirstLastIcon\"\r\n >\r\n @if (config.enableCation) {\r\n <ng-template pTemplate=\"caption\">\r\n <div\r\n class=\"flex flex-row flex-wrap justify-content-between align-items-center grid formgrid p-fluid col-12 p-0 m-0\"\r\n [style.background-color]=\"'#EAEAEA'\"\r\n >\r\n <div class=\"col-12 flex flex-column\">\r\n @if (config.title) {\r\n <div class=\"text-md font-bold my-3\">\r\n {{ config.title }}\r\n </div>\r\n } @if (config.subtitle) {\r\n <div class=\"text-sm mb-4 font-medium\">\r\n {{ config.subtitle }}\r\n </div>\r\n }\r\n </div>\r\n\r\n <div\r\n class=\"flex flex-row align-items-center md:col-6 lg:col-4 {{\r\n tamanhoTela < 768 ? 'col-10' : 'col-12'\r\n }} mt-1 mb-2 \"\r\n >\r\n @if (config.enableFilter) {\r\n <span 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(dt, $event)\"\r\n placeholder=\"Pesquisar...\"\r\n class=\"h-2rem\"\r\n />\r\n </span>\r\n }\r\n\r\n <!-- <div\r\n #menuFiltroDiv\r\n id = \"menuFiltroDiv\"\r\n [style.visibility]=\"'hidden'\"\r\n class=\"absolute z-4 bg-gray-200\"\r\n (click)=\"onClickEvent($event)\"\r\n > -->\r\n\r\n <div\r\n #menuFiltroDiv\r\n id=\"menuFiltroDiv\"\r\n [style.visibility]=\"'hidden'\"\r\n class=\"absolute z-4 bg-gray-200 menu-columns-filtro\"\r\n >\r\n <p-card>\r\n @for (col of columns; track col) {\r\n <div class=\"flex flex-column text-medium w-15rem\">\r\n {{ checkMenuFiltro(col) }}\r\n @if (!dinamicDisableColumn(col)) {\r\n <p-checkbox\r\n #filterColumns\r\n [label]=\"col.header\"\r\n [binary]=\"true\"\r\n class=\"checkbox-container\"\r\n (onChange)=\"dinamicColumnSet($event, col)\"\r\n [(ngModel)]=\"col.checked\"\r\n ></p-checkbox>\r\n }\r\n </div>\r\n }\r\n </p-card>\r\n </div>\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 mr-2\">\r\n @if(showButtonCollapsed){\r\n <kv-button\r\n [icon]=\"iconCollapsed\"\r\n (onClick)=\"executeCollapsed()\"\r\n [severity]=\"(config.actionsLote)&&(config.actionsLote.length>0) ? 'tertiary' : 'primary'\"\r\n [pTooltip]=\"collapsedAll ? 'Recolher tudo' : 'Expandir tudo'\"\r\n />\r\n }\r\n @for (action of config.actionsLote; track i; let i = $index) {\r\n \r\n \r\n @if ((selectedItems.length > 0 || action.showAcoesLote) &&\r\n (getOrExecute(action.visible, selectedItems) ?? true)) {\r\n\r\n <kv-button\r\n (onClick)=\"action?.command(); activeItemLote(selectedItems)\"\r\n [pTooltip]=\"getOrExecute(action.tooltip, selectedItems)\"\r\n [tooltipPosition]=\"\r\n (getOrExecute(action.tooltip, selectedItems)?.length ??\r\n 0 > 7) &&\r\n config.actionsLote &&\r\n i == config.actionsLote.length - 1\r\n ? 'left'\r\n : 'bottom'\r\n \"\r\n [disabled]=\"getOrExecute(action.disabled, selectedItems)?true:false\"\r\n [icon]=\"getOrExecute(action.icon, selectedItems)\"\r\n [severity]=\"action.severity ? action.severity : 'primary'\"\r\n />\r\n }\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n } \r\n @if (config.enableSelect || showTopHeader ){\r\n <ng-template pTemplate=\"header\">\r\n <tr>\r\n @if(config.enableSelect){\r\n <th [style.width]=\"showTopHeader?'25px':'100%'\" [attr.colspan]=\"showTopHeader?'1':'12'\" >\r\n <div class=\"w-full\">\r\n <input\r\n type=\"checkbox\"\r\n [checked]=\"isAllSelected()\"\r\n [indeterminate]=\"isAllIndeterminate()\"\r\n (click)=\"selectAll($event)\"\r\n />\r\n </div>\r\n </th>\r\n }\r\n @if(showTopHeader){\r\n @if (isTableRowExpanded) {\r\n <th\r\n [style.width]=\"3\"\r\n class=\"text-sm fixed-header\" \r\n ></th>\r\n }\r\n @for (col of columns; track $index) {\r\n <th\r\n [pSortableColumn]=\"col.field\"\r\n [pSortableColumnDisabled]=\"col.sortable === false\"\r\n [style.width]=\"col.width\"\r\n class=\"text-sm fixed-header\"\r\n >\r\n <div\r\n [class]=\"\r\n centralizarColunas(col) && alignColunasHeader(col) == ''\r\n ? 'flex flex-row justify-content-center'\r\n : 'flex flex-row'\r\n \"\r\n [style]=\"alignColunasHeader(col)\"\r\n >\r\n <span [ngClass]=\"{ 'text-xs font-medium': isTableRowExpanded }\">{{ col.header }}</span>\r\n @if (col.sortable) {\r\n <p-sortIcon\r\n [field]=\"'data.' + col.field\"\r\n style=\"font-size: 10px\"\r\n ></p-sortIcon>\r\n } \r\n @if (col.headerTooltip) {\r\n <span\r\n class=\"material-symbols-outlined flex align-items-center\"\r\n [pTooltip]=\"col.headerTooltip\"\r\n >info</span\r\n >\r\n }\r\n </div>\r\n </th>\r\n }\r\n @if (config.actions && config.actions.length > 0) {\r\n <th [style.width]=\"'40px'\" ></th>\r\n }\r\n }\r\n </tr>\r\n </ng-template>\r\n }\r\n\r\n <ng-template\r\n pTemplate=\"groupheader\"\r\n let-group\r\n let-rowIndex=\"rowIndex\"\r\n let-expanded=\"expanded\"\r\n >\r\n @if (!isTableRowExpanded) {\r\n <tr>\r\n <td colspan=\"12\" class=\"groupheader\">\r\n <div class=\"flex flex-row align-items-center w-full\">\r\n <button\r\n type=\"button\"\r\n pButton\r\n pRipple\r\n [pRowToggler]=\"group\"\r\n class=\"p-button-text p-button-rounded p-button-plain mr-2\"\r\n [icon]=\"expanded ? 'pi pi-chevron-down' : 'pi pi-chevron-right'\"\r\n ></button>\r\n @if (config.fieldGroupColorFunction){\r\n <div\r\n class=\"tag\"\r\n [style.background-color]=\"config.fieldGroupColorFunction(group)\"\r\n ></div>\r\n }\r\n <span class=\"font-bold ml-2\">{{\r\n group[config.fieldGroup || 0]\r\n }}</span>\r\n </div>\r\n </td>\r\n </tr>\r\n } @else {\r\n <tr>\r\n <td>\r\n @if(isVisibleExpandTolggle(group)){\r\n <button\r\n type=\"button\"\r\n pButton\r\n pRipple\r\n [pRowToggler]=\"group\"\r\n class=\"p-button-text p-button-rounded p-button-plain icone\"\r\n [icon]=\"expanded ? 'pi pi-chevron-down' : 'pi pi-chevron-right'\"\r\n >\r\n </button> \r\n \r\n }\r\n </td>\r\n\r\n @for (col of columns; track $index) {\r\n <ng-container>\r\n @if (!col.template) {\r\n <td\r\n class=\"rowTable\"\r\n [style]=\"\r\n applyStyle(group, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col)\r\n \"\r\n [pTooltip]=\"returnTooltipRow(group, col)\"\r\n >\r\n \r\n <span\r\n *ngIf=\"!isBooleanField(group, col); else booleanField\"\r\n [class]=\"returnRowClass(group, col)\"\r\n >\r\n @if (!isChipField(col) && !col.iconField && !isImageField(col)) {\r\n \r\n <span class=\"text-xs\" >\r\n @if (col.icon) {\r\n <i [class]=\"col.icon + ' mr-2'\"></i>\r\n }\r\n {{ transformValue(group, col) }}\r\n </span>\r\n } @if (isChipField(col) && !col.iconField) {\r\n <div>\r\n <span\r\n [class]=\"returnClassChip(group, col)\"\r\n [pTooltip]=\"returnTooltipIcon(group, col)\"\r\n >{{ transformValue(group, col) }}</span\r\n >\r\n </div>\r\n }\r\n </span>\r\n \r\n @if (isImageField(col)) {\r\n <span>\r\n <span>\r\n <img class=\"image\" [src]=\"loadImage(group, col)\" />\r\n </span>\r\n </span>\r\n } @if (col.iconField) {\r\n <i\r\n [ngClass]=\"{\r\n 'material-icons': col.indIconMaterial,\r\n 'material-symbols-outlined mr-2': !col.indIconMaterial\r\n }\"\r\n [pTooltip]=\"returnTooltipIcon(group, col)\"\r\n >\r\n {{ returnClassIcon(group, col) }}\r\n </i>\r\n }\r\n \r\n <ng-template #booleanField>\r\n @if (!col.iconField && !isSwitchField(col)) {\r\n <i\r\n [ngClass]=\"group[col.field] ? 'text-green-500' : 'text-red-500'\"\r\n ><span class=\"material-symbols-outlined\">\r\n {{ group[col.field] ? \"check\" : \"close\" }}\r\n </span>\r\n </i>\r\n } @if (isSwitchField(col)) {\r\n <span [class]=\"returnRowClass(group, col)\">\r\n <kv-switch\r\n (onSwitchChange)=\"onSwitchChange($event, group, col)\"\r\n [disabled]=\"col?.onlyReadField ?? true\"\r\n [switchValue]=\"transformValue(group, col)\"\r\n >\r\n </kv-switch>\r\n </span>\r\n }\r\n </ng-template>\r\n </td>\r\n } \r\n @if (col.template) {\r\n <td\r\n [style]=\"\r\n applyStyle(group, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col)\r\n \"\r\n class=\"rowTable\"\r\n >\r\n <span class=\"p-column-title\">{{ col.header }}:</span>\r\n @if (getCustomTemplate(col.template.name)) {\r\n <ng-container\r\n [ngTemplateOutlet]=\"getCustomTemplate(col.template.name)\"\r\n [ngTemplateOutletContext]=\"{ $implicit: group }\"\r\n />\r\n }\r\n </td>\r\n }\r\n </ng-container>\r\n }\r\n </tr>\r\n }\r\n\r\n\r\n @if(expanded && !showTopHeader){\r\n <tr style=\"height: 40px\">\r\n @if (config.enableSelect) {\r\n <th class=\"flex align-items-left pl-2\">\r\n <!-- <p-tableHeaderCheckbox\r\n (click)=\"activeItemLote(selectedItems)\"\r\n ></p-tableHeaderCheckbox> -->\r\n <input\r\n type=\"checkbox\"\r\n [checked]=\"\r\n isAllGroupSelected(\r\n config.fieldGroup || 0,\r\n group[config.fieldGroup || 0]\r\n )\r\n \"\r\n [indeterminate]=\"\r\n isGroupIndeterminate(\r\n config.fieldGroup || 0,\r\n group[config.fieldGroup || 0]\r\n )\r\n \"\r\n (click)=\"\r\n selectGroup(\r\n $event,\r\n config.fieldGroup || 0,\r\n group[config.fieldGroup || 0]\r\n )\r\n \"\r\n />\r\n </th>\r\n } \r\n @for (col of columns; track $index) {\r\n <th\r\n [pSortableColumn]=\"col.field\"\r\n [pSortableColumnDisabled]=\"col.sortable === false\"\r\n [style.width]=\"col.width\"\r\n class=\"text-sm\"\r\n >\r\n <div\r\n [class]=\"\r\n centralizarColunas(col) && alignColunasHeader(col) == ''\r\n ? 'flex flex-row justify-content-center'\r\n : 'flex flex-row'\r\n \"\r\n [style]=\"alignColunasHeader(col)\"\r\n >\r\n <span>{{ col.header }}</span>\r\n @if (col.sortable) {\r\n <p-sortIcon\r\n [field]=\"'data.' + col.field\"\r\n style=\"font-size: 10px\"\r\n ></p-sortIcon>\r\n } @if (col.headerTooltip) {\r\n <span\r\n class=\"material-symbols-outlined flex align-items-center\"\r\n [pTooltip]=\"col.headerTooltip\"\r\n >info</span\r\n >\r\n }\r\n </div>\r\n </th>\r\n } \r\n @if (config.actions && config.actions.length > 0) {\r\n <th></th>\r\n }\r\n </tr>\r\n }\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"rowexpansion\" let-group>\r\n @if (!isTableRowExpanded) {\r\n <tr\r\n (dblclick)=\"doubleClick($event, group)\"\r\n [ngClass]=\"{ capitalize: tableCaptalized }\"\r\n >\r\n @if (config.enableSelect) {\r\n <td [style]=\"applyStyle(group, { field: 'check-box', header: '' })\">\r\n <!--<p-tableCheckbox *ngIf=\"isVisibleCheckbox(group.data)\"-->\r\n <!-- <p-tableCheckbox\r\n [value]=\"group\"\r\n [disabled]=\"isDisabledCheckbox(group)\"\r\n (click)=\"activeItemLote(selectedItems)\"\r\n ></p-tableCheckbox>\r\n -->\r\n <input\r\n type=\"checkbox\"\r\n [value]=\"group\"\r\n [checked]=\"isSelected(group)\"\r\n (click)=\"selectItem($event, group)\"\r\n />\r\n </td>\r\n } \r\n @for (col of columns; track $index) {\r\n <ng-container>\r\n @if (!col.template) {\r\n <td\r\n class=\"rowTable\"\r\n [style]=\"\r\n applyStyle(group, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col)\r\n \"\r\n [pTooltip]=\"returnTooltipRow(group, col)\"\r\n >\r\n <span class=\"p-column-title\">{{ col.header }}:</span>\r\n\r\n <span\r\n *ngIf=\"!isBooleanField(group, col); else booleanField\"\r\n [class]=\"returnRowClass(group, col)\"\r\n >\r\n @if (!isChipField(col) && !col.iconField && !isImageField(col)) {\r\n <span>\r\n @if (col.icon) {\r\n <i [class]=\"col.icon + ' mr-2'\"></i>\r\n }\r\n {{ transformValue(group, col) }}\r\n </span>\r\n } @if (isChipField(col) && !col.iconField) {\r\n <div>\r\n <span\r\n [class]=\"returnClassChip(group, col)\"\r\n [pTooltip]=\"returnTooltipIcon(group, col)\"\r\n >{{ transformValue(group, col) }}</span\r\n >\r\n </div>\r\n }\r\n </span>\r\n\r\n @if (isImageField(col)) {\r\n <span>\r\n <span>\r\n <img class=\"image\" [src]=\"loadImage(group, col)\" />\r\n </span>\r\n </span>\r\n } @if (col.iconField) {\r\n <i\r\n [ngClass]=\"{\r\n 'material-icons': col.indIconMaterial,\r\n 'material-symbols-outlined mr-2': !col.indIconMaterial\r\n }\"\r\n [pTooltip]=\"returnTooltipIcon(group, col)\"\r\n >\r\n {{ returnClassIcon(group, col) }}\r\n </i>\r\n }\r\n\r\n <ng-template #booleanField>\r\n @if (!col.iconField && !isSwitchField(col)) {\r\n <i\r\n [ngClass]=\"group[col.field] ? 'text-green-500' : 'text-red-500'\"\r\n ><span class=\"material-symbols-outlined\">\r\n {{ group[col.field] ? \"check\" : \"close\" }}\r\n </span>\r\n </i>\r\n } @if (isSwitchField(col)) {\r\n <span [class]=\"returnRowClass(group, col)\">\r\n <kv-switch\r\n (onSwitchChange)=\"onSwitchChange($event, group, col)\"\r\n [disabled]=\"col?.onlyReadField ?? true\"\r\n [switchValue]=\"transformValue(group, col)\"\r\n >\r\n </kv-switch>\r\n </span>\r\n }\r\n </ng-template>\r\n </td>\r\n } \r\n @if (col.template) {\r\n <td\r\n [style]=\"\r\n applyStyle(group, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col)\r\n \"\r\n class=\"rowTable\"\r\n >\r\n <span class=\"p-column-title\">{{ col.header }}:</span>\r\n @if (getCustomTemplate(col.template.name)) {\r\n <ng-container\r\n [ngTemplateOutlet]=\"getCustomTemplate(col.template.name)\"\r\n [ngTemplateOutletContext]=\"{ $implicit: group }\"\r\n />\r\n }\r\n </td>\r\n }\r\n </ng-container>\r\n } \r\n @if (config.actions && config.actions.length > 0) {\r\n <td [style]=\"applyStyle(group, { field: 'btns-options', header: '' })\">\r\n <div class=\"flex flex-row justify-content-end w-full\">\r\n <!-- <button\r\n id=\"moreVertBtn\"\r\n pButton\r\n class=\"actionBtns p-button-text p-button-raised\"\r\n (click)=\"menu.toggle($event); activeItem(group)\"\r\n > -->\r\n\r\n <span\r\n class=\"material-symbols-outlined cursor-pointer icon-more-horiz\"\r\n style=\"font-size: 25px\"\r\n (click)=\"\r\n returnRowDataActions(group);\r\n menu.toggle($event);\r\n activeItem(group)\r\n \"\r\n >\r\n more_horiz\r\n </span>\r\n\r\n <!-- </button> -->\r\n\r\n <p-tieredMenu\r\n #menu\r\n [popup]=\"true\"\r\n [model]=\"menuItems\"\r\n appendTo=\"body\"\r\n ></p-tieredMenu>\r\n </div>\r\n </td>\r\n }\r\n </tr>\r\n }\r\n\r\n @if (isTableRowExpanded) {\r\n\r\n <tr>\r\n <td\r\n [attr.colspan]=\"columns.length + 2\"\r\n style=\"text-align: start; border-radius: 10px !important\"\r\n >\r\n <div>\r\n @if (getCustomTemplate(config.templateRowExpanded.name)) {\r\n <ng-container\r\n [ngTemplateOutlet]=\"getCustomTemplate(config.templateRowExpanded.name)\"\r\n [ngTemplateOutletContext]=\"{ $implicit: group }\"\r\n />\r\n }\r\n </div>\r\n </td>\r\n </tr>\r\n \r\n }\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"emptymessage\" let-columns>\r\n <tr>\r\n <td\r\n [attr.colspan]=\"columns.length + 2\"\r\n style=\"text-align: center; border-radius: 10px !important\"\r\n >\r\n <p class=\"font-medium m-0\">Nenhum registro encontrado</p>\r\n </td>\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n }\r\n</div>\r\n", styles: ["@charset \"UTF-8\";tr{word-break:break-all}.tag{width:5px;height:20px;border-radius:.25rem}input[type=checkbox]{appearance:none;-webkit-appearance:none;-moz-appearance:none;width:20px;height:20px;border:2px solid #ccc;border-radius:4px;position:relative;cursor:pointer;outline:none;background-color:#fff}input[type=checkbox]:after{content:\"\";position:absolute;left:5px;top:2px;width:5px;height:10px;border:solid #fff;border-width:0 2px 2px 0;transform:rotate(45deg);opacity:0;transition:opacity .2s}input[type=checkbox]:checked{border-color:#004172;background:#004172}input[type=checkbox]:checked:hover{background-color:#002542}input[type=checkbox]:checked:active{background-color:#002542}input[type=checkbox]:checked:disabled{background-color:#002542;opacity:.4;cursor:auto}input[type=checkbox]:checked:after{opacity:1}::ng-deep .p-datatable.p-datatable-sm .p-datatable-header{padding:0rem}::ng-deep .p-datatable.p-datatable-sm .p-datatable-thead>tr>th{background-color:#eaeaea}::ng-deep .p-panel.p-panel-toggleable .p-panel-header{background-color:#eaeaea}.tr-td:hover{box-shadow:#3c40434d 0 1px 2px,#3c404326 0 2px 6px 2px;background-color:#fff;transition:color .3s,transform .3s;transform:scale(1)}.checkbox-container{width:25px!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%}.btn-table{background-color:#29b92d;padding:12px}.btn-table:hover{background-color:#249a29}.btn-table:active{background-color:#1c801f}.btn-table:disabled{background-color:#29b92d}.icone{width:12px;height:2px}:host ::ng-deep .icone .pi{font-size:.7rem}\n"] }]
|
|
8478
8508
|
}], ctorParameters: () => [{ type: i1.DatePipe }, { type: i1.DecimalPipe }, { type: CpfCnpjPipe }, { type: TelefonePipe }], propDecorators: { _templates: [{
|
|
8479
8509
|
type: Input,
|
|
8480
8510
|
args: ['templates']
|
|
@@ -8517,6 +8547,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImpor
|
|
|
8517
8547
|
type: Input
|
|
8518
8548
|
}], showButtonCollapsed: [{
|
|
8519
8549
|
type: Input
|
|
8550
|
+
}], isTableRowExpanded: [{
|
|
8551
|
+
type: Input
|
|
8552
|
+
}], expandToggleVisibleFn: [{
|
|
8553
|
+
type: Input
|
|
8520
8554
|
}], filterField: [{
|
|
8521
8555
|
type: Output
|
|
8522
8556
|
}], onActiveItem: [{
|
|
@@ -9431,6 +9465,7 @@ class KvContentViewerComponent {
|
|
|
9431
9465
|
this.isSelected = false;
|
|
9432
9466
|
this.visualizadorDocumentos = false;
|
|
9433
9467
|
this.indvisualizado = false;
|
|
9468
|
+
this.btnTelaCheia = false;
|
|
9434
9469
|
this.keyVisualizado = 'indvisualizado';
|
|
9435
9470
|
// #endregion
|
|
9436
9471
|
// #region Outputs
|
|
@@ -9453,6 +9488,45 @@ class KvContentViewerComponent {
|
|
|
9453
9488
|
this.arquivoPreview.set(arquivo);
|
|
9454
9489
|
this.onSelectFile.emit(arquivo);
|
|
9455
9490
|
}
|
|
9491
|
+
alternarTelaCheia() {
|
|
9492
|
+
const element = document.getElementById('fullscreenDiv');
|
|
9493
|
+
const button = document.getElementById('fullscreenBtn');
|
|
9494
|
+
// Verifica se os elementos existem
|
|
9495
|
+
if (element && button) {
|
|
9496
|
+
if (!document.fullscreenElement) {
|
|
9497
|
+
// Expandir para tela cheia
|
|
9498
|
+
if (element.requestFullscreen) {
|
|
9499
|
+
element.requestFullscreen();
|
|
9500
|
+
}
|
|
9501
|
+
else if (element.mozRequestFullScreen) { // Para Firefox
|
|
9502
|
+
element.mozRequestFullScreen();
|
|
9503
|
+
}
|
|
9504
|
+
else if (element.webkitRequestFullscreen) { // Para Chrome, Safari e Opera
|
|
9505
|
+
element.webkitRequestFullscreen();
|
|
9506
|
+
}
|
|
9507
|
+
else if (element.msRequestFullscreen) { // Para IE/Edge
|
|
9508
|
+
element.msRequestFullscreen();
|
|
9509
|
+
}
|
|
9510
|
+
button.textContent = 'close_fullscreen';
|
|
9511
|
+
}
|
|
9512
|
+
else {
|
|
9513
|
+
// Sair da tela cheia
|
|
9514
|
+
if (document.exitFullscreen) {
|
|
9515
|
+
document.exitFullscreen();
|
|
9516
|
+
}
|
|
9517
|
+
else if (document.mozCancelFullScreen) { // Para Firefox
|
|
9518
|
+
document.mozCancelFullScreen();
|
|
9519
|
+
}
|
|
9520
|
+
else if (document.webkitExitFullscreen) { // Para Chrome, Safari e Opera
|
|
9521
|
+
document.webkitExitFullscreen();
|
|
9522
|
+
}
|
|
9523
|
+
else if (document.msExitFullscreen) { // Para IE/Edge
|
|
9524
|
+
document.msExitFullscreen();
|
|
9525
|
+
}
|
|
9526
|
+
button.textContent = 'open_in_full';
|
|
9527
|
+
}
|
|
9528
|
+
}
|
|
9529
|
+
}
|
|
9456
9530
|
scrollHandler($event) {
|
|
9457
9531
|
const element = $event.target;
|
|
9458
9532
|
//se o escroll chegar até o final
|
|
@@ -9462,11 +9536,11 @@ class KvContentViewerComponent {
|
|
|
9462
9536
|
}
|
|
9463
9537
|
}
|
|
9464
9538
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvContentViewerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
9465
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.8", type: KvContentViewerComponent, selector: "kv-content-viewer", inputs: { dataSource: { classPropertyName: "dataSource", publicName: "dataSource", isSignal: true, isRequired: false, transformFunction: null }, arquivo: { classPropertyName: "arquivo", publicName: "arquivo", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, blob: { classPropertyName: "blob", publicName: "blob", isSignal: true, isRequired: false, transformFunction: null }, ekpContent: { classPropertyName: "ekpContent", publicName: "ekpContent", isSignal: true, isRequired: false, transformFunction: null }, extencaoDocumento: { classPropertyName: "extencaoDocumento", publicName: "extencaoDocumento", isSignal: false, isRequired: false, transformFunction: null }, totalRecords: { classPropertyName: "totalRecords", publicName: "totalRecords", isSignal: false, isRequired: false, transformFunction: null }, visualizadorDocumentos: { classPropertyName: "visualizadorDocumentos", publicName: "visualizadorDocumentos", isSignal: false, isRequired: false, transformFunction: null }, cardTemplate: { classPropertyName: "cardTemplate", publicName: "cardTemplate", isSignal: false, isRequired: false, transformFunction: null }, contentTemplate: { classPropertyName: "contentTemplate", publicName: "contentTemplate", isSignal: false, isRequired: false, transformFunction: null }, noDocumentSelectedTemplate: { classPropertyName: "noDocumentSelectedTemplate", publicName: "noDocumentSelectedTemplate", isSignal: false, isRequired: false, transformFunction: null }, noDocumentListTemplate: { classPropertyName: "noDocumentListTemplate", publicName: "noDocumentListTemplate", isSignal: false, isRequired: false, transformFunction: null }, indvisualizado: { classPropertyName: "indvisualizado", publicName: "indvisualizado", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { onScrollHandler: "onScrollHandler", onSelectFile: "onSelectFile" }, ngImport: i0, template: "<div class=\"flex flex-column md:flex-row gap-2 mt-3 custom-max-height\" style=\"height: 1000vh;\">\r\n <!-- Lista de documentos -->\r\n <div\r\n class=\"card-perfil overflow-x-hidden\"\r\n (scroll)=\"scrollHandler($event)\"\r\n [ngClass]=\"{\r\n 'overflow-y-scroll': dataSource().length > 0,\r\n 'overflow-y-hidden': dataSource().length === 0\r\n }\"\r\n style=\"position: relative; max-height: calc(100vh - 100px);\"\r\n >\r\n <div *ngIf=\"dataSource().length > 0; else emptyDocumentList\" class=\"col-12\">\r\n <!-- Lista de cards -->\r\n <div\r\n *ngFor=\"let option of dataSource(); trackBy: trackByFn\"\r\n class=\"card-normal outline-none border-round-xl w-full p-2 m-1 grid p-fluid flex flex-row flex-nowrap align-items-center justify-content-center cursor-pointer\"\r\n style=\"min-height: 5rem\"\r\n (click)=\"visualizarPreview(option)\"\r\n [ngClass]=\"{\r\n 'card-naoVisualizado': !isVisualizado(option),\r\n 'card-selected': option === arquivoPreview(),\r\n 'card-normal': option !== arquivoPreview(),\r\n }\"\r\n >\r\n <div class=\"flex flex-grow-1 ml-2 flex-column gap-1 m-0 p-0 overflow-hidden text-overflow-ellipsis \" style=\"max-width: 100%;\">\r\n <ng-container *ngIf=\"cardTemplate; else defaultTemplate\">\r\n <ng-container \r\n *ngTemplateOutlet=\"cardTemplate; context: { $implicit: option }\"\r\n ></ng-container>\r\n </ng-container>\r\n </div>\r\n <ng-template #defaultTemplate>\r\n <div class=\"card-common-style default-card\">\r\n <h1 class=\"font-bold text-base p-0 m-0\">Bem-vindo!</h1>\r\n <p class=\"text-sm mt-2\">\r\n Kv-file-preview aguardando um template...\r\n </p>\r\n <p class=\"font-bold text-sm p-0 m-0\">Data: {{ todayDate() }}</p>\r\n </div>\r\n </ng-template>\r\n </div>\r\n </div>\r\n\r\n <ng-template #emptyDocumentList>\r\n @if(!noDocumentListTemplate) {\r\n <div class=\"text-center text-gray-600 mt-4 m-3\" style=\"height: 100%\">\r\n <div class=\" flex align-items-center gap-1\">\r\n <span class=\"material-symbols-outlined\"> inbox </span>\r\n <p>Nenhum documento dispon\u00EDvel.</p>\r\n </div>\r\n </div>\r\n } @else {\r\n <div class=\"text-center mt-4 m-3\" style=\"height: 100%\">\r\n <ng-container *ngTemplateOutlet=\"noDocumentListTemplate\"></ng-container>\r\n </div>\r\n }\r\n </ng-template>\r\n\r\n <!-- Contador de documentos - Fixo na parte inferior -->\r\n <div\r\n class=\"sticky-counter flex flex-row flex-1 px-2 justify-content-center p-2\"\r\n style=\"position: sticky; bottom: 0; background-color: white\"\r\n >\r\n <span>{{ totalItensCarregado() }} de {{ totalRecords }}</span>\r\n </div>\r\n </div>\r\n\r\n <!-- Visualizador -->\r\n <div class=\"card-perfil col-12 md:col-8 lg:col-9\" style=\"position: relative\">\r\n @if(visualizadorDocumentos) {\r\n <ng-container *ngIf=\"arquivo(); else noDocumentSelected\">\r\n @if(isLoading) {\r\n <ngx-loading\r\n [show]=\"isLoading\"\r\n [config]=\"{ backdropBorderRadius: '3px', fullScreenBackdrop: false }\"\r\n ></ngx-loading>\r\n }\r\n <kv-file-viewer-novo\r\n *ngIf=\"extencaoDocumento !== 'ekp'\"\r\n [arquivo]=\"arquivo()!\"\r\n [type]=\"type()!\"\r\n [blob]=\"blob()!\"\r\n [width]=\"'100%'\" \r\n [height]=\"'100%'\"\r\n class=\"file-viewer\"\r\n >\r\n </kv-file-viewer-novo>\r\n \r\n <div\r\n id=\"html-content\"\r\n [innerHTML]=\"ekpContent()\"\r\n *ngIf=\"extencaoDocumento === 'ekp'\"\r\n class=\"ekp-content\"\r\n ></div>\r\n </ng-container>\r\n } @else {\r\n <ng-container *ngIf=\"arquivoPreview(); else noDocumentSelected\">\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n contentTemplate;\r\n context: { $implicit: arquivoPreview() }\r\n \"\r\n ></ng-container>\r\n </ng-container>\r\n }\r\n <ng-template #noDocumentSelected>\r\n @if(!noDocumentSelectedTemplate) {\r\n <div\r\n class=\"no-document-message flex flex-column align-items-center justify-content-center\"\r\n style=\"height: 100%\"\r\n >\r\n <p class=\"text-center text-gray-500\">\r\n Selecione um arquivo para visualiza\u00E7\u00E3o\r\n </p>\r\n <img\r\n [src]=\"\r\n 'https://work-assets.keevo.com.br/img/Digital_personal_files-pana_3.png'\r\n \"\r\n style=\"max-height: 50%; margin-top: 2rem;\"\r\n alt=\"\"\r\n />\r\n </div>\r\n } @else {\r\n <ng-container\r\n *ngTemplateOutlet=\"noDocumentSelectedTemplate\"\r\n ></ng-container>\r\n }\r\n </ng-template>\r\n </div>\r\n</div>\r\n", styles: ["@charset \"UTF-8\";.farol-statuspublicacao{margin-right:.5rem;width:.35rem;border-radius:1rem;-webkit-border-radius:1rem;-moz-border-radius:1rem;-ms-border-radius:1rem;-o-border-radius:1rem}:host ::ng-deep .p-sidebar{border-radius:5px;position:absolute;height:var(--sidebar-height)}:host ::ng-deep .p-sidebar .p-sidebar-content{overflow:auto;border:1px solid #e5e7eb;border-radius:5px;margin-top:1rem}.card-perfil{border:1.5px solid #CBD5E1;background:#fff;border-radius:6px;max-height:100%}:host ::ng-deep .p-fieldset .p-fieldset-content{padding-bottom:0}:host ::ng-deep .p-sidebar .p-sidebar-close{display:none}.card-normal{border:1.5px solid #CBD5E1}.card-naoVisualizado{border-left:4px solid #e6671f!important}.parent-container{height:100%;display:flex;flex-direction:column}.file-viewer{margin:auto}.ekp-content{min-height:20rem;padding:1rem;overflow-y:auto;border-radius:5px}ngx-loading{position:absolute;top:0;left:0;width:100%;height:100%;z-index:1000}.card{transition:all .3s ease;border:1px solid transparent}.card-normal:hover{border:1px solid #a9a9a9;box-shadow:0 4px 8px #0000001a}.card-selected{background-color:#f0f0f0;border:1px solid #c0c0c0;box-shadow:0 6px 12px #00000026;transform:scale(1.02)}.loading-spinner{display:flex;align-items:center;justify-content:center;height:100%;font-size:1.5rem;color:#666}#html-content{width:100%;height:100%;overflow-y:auto}:host ::ng-deep .list-card-button .kv-button{width:22px;height:22px}:host ::ng-deep .list-card-button .kv-button .material-symbols-outlined.only-icon.icon-normal[_ngcontent-ng-c4083184952]{font-size:1rem}.custom-max-height{max-height:calc(100vh - 300px)}@media (max-height: 915px){.custom-max-height{max-height:94%}}@media (max-height: 805px){.custom-max-height{max-height:90%}}@media (max-height: 720px){.custom-max-height{max-height:85%}}.download-icon{font-size:20px;cursor:pointer;transition:transform .3s ease,color .3s ease}.download-icon:hover{color:#0f6cbd;transform:scale(1.2)}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: KvFileViewerNovoComponent, selector: "kv-file-viewer-novo", inputs: ["arquivo", "type", "blob", "width", "height"] }, { kind: "component", type: i1$6.NgxLoadingComponent, selector: "ngx-loading", inputs: ["show", "config", "template"] }] }); }
|
|
9539
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.8", type: KvContentViewerComponent, selector: "kv-content-viewer", inputs: { dataSource: { classPropertyName: "dataSource", publicName: "dataSource", isSignal: true, isRequired: false, transformFunction: null }, arquivo: { classPropertyName: "arquivo", publicName: "arquivo", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, blob: { classPropertyName: "blob", publicName: "blob", isSignal: true, isRequired: false, transformFunction: null }, ekpContent: { classPropertyName: "ekpContent", publicName: "ekpContent", isSignal: true, isRequired: false, transformFunction: null }, extencaoDocumento: { classPropertyName: "extencaoDocumento", publicName: "extencaoDocumento", isSignal: false, isRequired: false, transformFunction: null }, totalRecords: { classPropertyName: "totalRecords", publicName: "totalRecords", isSignal: false, isRequired: false, transformFunction: null }, visualizadorDocumentos: { classPropertyName: "visualizadorDocumentos", publicName: "visualizadorDocumentos", isSignal: false, isRequired: false, transformFunction: null }, cardTemplate: { classPropertyName: "cardTemplate", publicName: "cardTemplate", isSignal: false, isRequired: false, transformFunction: null }, contentTemplate: { classPropertyName: "contentTemplate", publicName: "contentTemplate", isSignal: false, isRequired: false, transformFunction: null }, noDocumentSelectedTemplate: { classPropertyName: "noDocumentSelectedTemplate", publicName: "noDocumentSelectedTemplate", isSignal: false, isRequired: false, transformFunction: null }, noDocumentListTemplate: { classPropertyName: "noDocumentListTemplate", publicName: "noDocumentListTemplate", isSignal: false, isRequired: false, transformFunction: null }, indvisualizado: { classPropertyName: "indvisualizado", publicName: "indvisualizado", isSignal: false, isRequired: false, transformFunction: null }, btnTelaCheia: { classPropertyName: "btnTelaCheia", publicName: "btnTelaCheia", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { onScrollHandler: "onScrollHandler", onSelectFile: "onSelectFile" }, ngImport: i0, template: "<div class=\"flex flex-column md:flex-row gap-2 mt-3 custom-max-height\" style=\"height: 1000vh;\">\r\n <!-- Lista de documentos -->\r\n <div\r\n class=\"card-perfil overflow-x-hidden\"\r\n (scroll)=\"scrollHandler($event)\"\r\n [ngClass]=\"{\r\n 'overflow-y-scroll': dataSource().length > 0,\r\n 'overflow-y-hidden': dataSource().length === 0\r\n }\"\r\n style=\"position: relative; max-height: calc(100vh - 100px);\"\r\n >\r\n <div *ngIf=\"dataSource().length > 0; else emptyDocumentList\" class=\"col-12\">\r\n <!-- Lista de cards -->\r\n <div\r\n *ngFor=\"let option of dataSource(); trackBy: trackByFn\"\r\n class=\"card-normal outline-none border-round-xl w-full p-2 m-1 grid p-fluid flex flex-row flex-nowrap align-items-center justify-content-center cursor-pointer\"\r\n style=\"min-height: 5rem\"\r\n (click)=\"visualizarPreview(option)\"\r\n [ngClass]=\"{\r\n 'card-naoVisualizado': !isVisualizado(option),\r\n 'card-selected': option === arquivoPreview(),\r\n 'card-normal': option !== arquivoPreview(),\r\n }\"\r\n >\r\n <div class=\"flex flex-grow-1 ml-2 flex-column gap-1 m-0 p-0 overflow-hidden text-overflow-ellipsis \" style=\"max-width: 100%;\">\r\n <ng-container *ngIf=\"cardTemplate; else defaultTemplate\">\r\n <ng-container \r\n *ngTemplateOutlet=\"cardTemplate; context: { $implicit: option }\"\r\n ></ng-container>\r\n </ng-container>\r\n </div>\r\n <ng-template #defaultTemplate>\r\n <div class=\"card-common-style default-card\">\r\n <h1 class=\"font-bold text-base p-0 m-0\">Bem-vindo!</h1>\r\n <p class=\"text-sm mt-2\">\r\n Kv-file-preview aguardando um template...\r\n </p>\r\n <p class=\"font-bold text-sm p-0 m-0\">Data: {{ todayDate() }}</p>\r\n </div>\r\n </ng-template>\r\n </div>\r\n </div>\r\n\r\n <ng-template #emptyDocumentList>\r\n @if(!noDocumentListTemplate) {\r\n <div class=\"text-center text-gray-600 mt-4 m-3\" style=\"height: 100%\">\r\n <div class=\" flex align-items-center gap-1\">\r\n <span class=\"material-symbols-outlined\"> inbox </span>\r\n <p>Nenhum documento dispon\u00EDvel.</p>\r\n </div>\r\n </div>\r\n } @else {\r\n <div class=\"text-center mt-4 m-3\" style=\"height: 100%\">\r\n <ng-container *ngTemplateOutlet=\"noDocumentListTemplate\"></ng-container>\r\n </div>\r\n }\r\n </ng-template>\r\n\r\n <!-- Contador de documentos - Fixo na parte inferior -->\r\n <div\r\n class=\"sticky-counter flex flex-row flex-1 px-2 justify-content-center p-2\"\r\n style=\"position: sticky; bottom: 0; background-color: white\"\r\n >\r\n <span>{{ totalItensCarregado() }} de {{ totalRecords }}</span>\r\n </div>\r\n </div>\r\n\r\n <!-- Visualizador -->\r\n <div id=\"fullscreenDiv\" class=\"card-perfil col-12 md:col-8 lg:col-9\" style=\"position: relative\">\r\n @if(btnTelaCheia)\r\n {\r\n <div class=\"grid\">\r\n <div class=\"col\"></div>\r\n <span id=\"fullscreenBtn\" (click)=\"alternarTelaCheia()\" class=\"material-symbols-outlined p-2 text-xl cursor-pointer\">\r\n open_in_full\r\n </span>\r\n </div>\r\n }\r\n @if(visualizadorDocumentos) {\r\n <ng-container *ngIf=\"arquivo(); else noDocumentSelected\">\r\n @if(isLoading) {\r\n <ngx-loading\r\n [show]=\"isLoading\"\r\n [config]=\"{ backdropBorderRadius: '3px', fullScreenBackdrop: false }\"\r\n ></ngx-loading>\r\n }\r\n <kv-file-viewer-novo\r\n *ngIf=\"extencaoDocumento !== 'ekp'\"\r\n [arquivo]=\"arquivo()!\"\r\n [type]=\"type()!\"\r\n [blob]=\"blob()!\"\r\n [width]=\"'100%'\" \r\n [height]=\"'100%'\"\r\n class=\"file-viewer\"\r\n >\r\n </kv-file-viewer-novo>\r\n \r\n <div\r\n id=\"html-content\"\r\n [innerHTML]=\"ekpContent()\"\r\n *ngIf=\"extencaoDocumento === 'ekp'\"\r\n class=\"ekp-content\"\r\n ></div>\r\n </ng-container>\r\n } @else {\r\n <ng-container *ngIf=\"arquivoPreview(); else noDocumentSelected\">\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n contentTemplate;\r\n context: { $implicit: arquivoPreview() }\r\n \"\r\n ></ng-container>\r\n </ng-container>\r\n }\r\n <ng-template #noDocumentSelected>\r\n @if(!noDocumentSelectedTemplate) {\r\n <div\r\n class=\"no-document-message flex flex-column align-items-center justify-content-center\"\r\n style=\"height: 100%\"\r\n >\r\n <p class=\"text-center text-gray-500\">\r\n Selecione um arquivo para visualiza\u00E7\u00E3o\r\n </p>\r\n <img\r\n [src]=\"\r\n 'https://work-assets.keevo.com.br/img/Digital_personal_files-pana_3.png'\r\n \"\r\n style=\"max-height: 50%; margin-top: 2rem;\"\r\n alt=\"\"\r\n />\r\n </div>\r\n } @else {\r\n <ng-container\r\n *ngTemplateOutlet=\"noDocumentSelectedTemplate\"\r\n ></ng-container>\r\n }\r\n </ng-template>\r\n </div>\r\n</div>\r\n", styles: ["@charset \"UTF-8\";.farol-statuspublicacao{margin-right:.5rem;width:.35rem;border-radius:1rem;-webkit-border-radius:1rem;-moz-border-radius:1rem;-ms-border-radius:1rem;-o-border-radius:1rem}:host ::ng-deep .p-sidebar{border-radius:5px;position:absolute;height:var(--sidebar-height)}:host ::ng-deep .p-sidebar .p-sidebar-content{overflow:auto;border:1px solid #e5e7eb;border-radius:5px;margin-top:1rem}.card-perfil{border:1.5px solid #CBD5E1;background:#fff;border-radius:6px;max-height:100%}:host ::ng-deep .p-fieldset .p-fieldset-content{padding-bottom:0}:host ::ng-deep .p-sidebar .p-sidebar-close{display:none}.card-normal{border:1.5px solid #CBD5E1}.card-naoVisualizado{border-left:4px solid #e6671f!important}.parent-container{height:100%;display:flex;flex-direction:column}.file-viewer{margin:auto}.ekp-content{min-height:20rem;padding:1rem;overflow-y:auto;border-radius:5px}ngx-loading{position:absolute;top:0;left:0;width:100%;height:100%;z-index:1000}.card{transition:all .3s ease;border:1px solid transparent}.card-normal:hover{border:1px solid #a9a9a9;box-shadow:0 4px 8px #0000001a}.card-selected{background-color:#f0f0f0;border:1px solid #c0c0c0;box-shadow:0 6px 12px #00000026;transform:scale(1.02)}.loading-spinner{display:flex;align-items:center;justify-content:center;height:100%;font-size:1.5rem;color:#666}#html-content{width:100%;height:100%;overflow-y:auto}:host ::ng-deep .list-card-button .kv-button{width:22px;height:22px}:host ::ng-deep .list-card-button .kv-button .material-symbols-outlined.only-icon.icon-normal[_ngcontent-ng-c4083184952]{font-size:1rem}.custom-max-height{max-height:calc(100vh - 300px)}@media (max-height: 915px){.custom-max-height{max-height:94%}}@media (max-height: 805px){.custom-max-height{max-height:90%}}@media (max-height: 720px){.custom-max-height{max-height:85%}}.download-icon{font-size:20px;cursor:pointer;transition:transform .3s ease,color .3s ease}.download-icon:hover{color:#0f6cbd;transform:scale(1.2)}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: KvFileViewerNovoComponent, selector: "kv-file-viewer-novo", inputs: ["arquivo", "type", "blob", "width", "height"] }, { kind: "component", type: i1$6.NgxLoadingComponent, selector: "ngx-loading", inputs: ["show", "config", "template"] }] }); }
|
|
9466
9540
|
}
|
|
9467
9541
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvContentViewerComponent, decorators: [{
|
|
9468
9542
|
type: Component,
|
|
9469
|
-
args: [{ selector: 'kv-content-viewer', template: "<div class=\"flex flex-column md:flex-row gap-2 mt-3 custom-max-height\" style=\"height: 1000vh;\">\r\n <!-- Lista de documentos -->\r\n <div\r\n class=\"card-perfil overflow-x-hidden\"\r\n (scroll)=\"scrollHandler($event)\"\r\n [ngClass]=\"{\r\n 'overflow-y-scroll': dataSource().length > 0,\r\n 'overflow-y-hidden': dataSource().length === 0\r\n }\"\r\n style=\"position: relative; max-height: calc(100vh - 100px);\"\r\n >\r\n <div *ngIf=\"dataSource().length > 0; else emptyDocumentList\" class=\"col-12\">\r\n <!-- Lista de cards -->\r\n <div\r\n *ngFor=\"let option of dataSource(); trackBy: trackByFn\"\r\n class=\"card-normal outline-none border-round-xl w-full p-2 m-1 grid p-fluid flex flex-row flex-nowrap align-items-center justify-content-center cursor-pointer\"\r\n style=\"min-height: 5rem\"\r\n (click)=\"visualizarPreview(option)\"\r\n [ngClass]=\"{\r\n 'card-naoVisualizado': !isVisualizado(option),\r\n 'card-selected': option === arquivoPreview(),\r\n 'card-normal': option !== arquivoPreview(),\r\n }\"\r\n >\r\n <div class=\"flex flex-grow-1 ml-2 flex-column gap-1 m-0 p-0 overflow-hidden text-overflow-ellipsis \" style=\"max-width: 100%;\">\r\n <ng-container *ngIf=\"cardTemplate; else defaultTemplate\">\r\n <ng-container \r\n *ngTemplateOutlet=\"cardTemplate; context: { $implicit: option }\"\r\n ></ng-container>\r\n </ng-container>\r\n </div>\r\n <ng-template #defaultTemplate>\r\n <div class=\"card-common-style default-card\">\r\n <h1 class=\"font-bold text-base p-0 m-0\">Bem-vindo!</h1>\r\n <p class=\"text-sm mt-2\">\r\n Kv-file-preview aguardando um template...\r\n </p>\r\n <p class=\"font-bold text-sm p-0 m-0\">Data: {{ todayDate() }}</p>\r\n </div>\r\n </ng-template>\r\n </div>\r\n </div>\r\n\r\n <ng-template #emptyDocumentList>\r\n @if(!noDocumentListTemplate) {\r\n <div class=\"text-center text-gray-600 mt-4 m-3\" style=\"height: 100%\">\r\n <div class=\" flex align-items-center gap-1\">\r\n <span class=\"material-symbols-outlined\"> inbox </span>\r\n <p>Nenhum documento dispon\u00EDvel.</p>\r\n </div>\r\n </div>\r\n } @else {\r\n <div class=\"text-center mt-4 m-3\" style=\"height: 100%\">\r\n <ng-container *ngTemplateOutlet=\"noDocumentListTemplate\"></ng-container>\r\n </div>\r\n }\r\n </ng-template>\r\n\r\n <!-- Contador de documentos - Fixo na parte inferior -->\r\n <div\r\n class=\"sticky-counter flex flex-row flex-1 px-2 justify-content-center p-2\"\r\n style=\"position: sticky; bottom: 0; background-color: white\"\r\n >\r\n <span>{{ totalItensCarregado() }} de {{ totalRecords }}</span>\r\n </div>\r\n </div>\r\n\r\n <!-- Visualizador -->\r\n <div class=\"card-perfil col-12 md:col-8 lg:col-9\" style=\"position: relative\">\r\n @if(visualizadorDocumentos) {\r\n <ng-container *ngIf=\"arquivo(); else noDocumentSelected\">\r\n @if(isLoading) {\r\n <ngx-loading\r\n [show]=\"isLoading\"\r\n [config]=\"{ backdropBorderRadius: '3px', fullScreenBackdrop: false }\"\r\n ></ngx-loading>\r\n }\r\n <kv-file-viewer-novo\r\n *ngIf=\"extencaoDocumento !== 'ekp'\"\r\n [arquivo]=\"arquivo()!\"\r\n [type]=\"type()!\"\r\n [blob]=\"blob()!\"\r\n [width]=\"'100%'\" \r\n [height]=\"'100%'\"\r\n class=\"file-viewer\"\r\n >\r\n </kv-file-viewer-novo>\r\n \r\n <div\r\n id=\"html-content\"\r\n [innerHTML]=\"ekpContent()\"\r\n *ngIf=\"extencaoDocumento === 'ekp'\"\r\n class=\"ekp-content\"\r\n ></div>\r\n </ng-container>\r\n } @else {\r\n <ng-container *ngIf=\"arquivoPreview(); else noDocumentSelected\">\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n contentTemplate;\r\n context: { $implicit: arquivoPreview() }\r\n \"\r\n ></ng-container>\r\n </ng-container>\r\n }\r\n <ng-template #noDocumentSelected>\r\n @if(!noDocumentSelectedTemplate) {\r\n <div\r\n class=\"no-document-message flex flex-column align-items-center justify-content-center\"\r\n style=\"height: 100%\"\r\n >\r\n <p class=\"text-center text-gray-500\">\r\n Selecione um arquivo para visualiza\u00E7\u00E3o\r\n </p>\r\n <img\r\n [src]=\"\r\n 'https://work-assets.keevo.com.br/img/Digital_personal_files-pana_3.png'\r\n \"\r\n style=\"max-height: 50%; margin-top: 2rem;\"\r\n alt=\"\"\r\n />\r\n </div>\r\n } @else {\r\n <ng-container\r\n *ngTemplateOutlet=\"noDocumentSelectedTemplate\"\r\n ></ng-container>\r\n }\r\n </ng-template>\r\n </div>\r\n</div>\r\n", styles: ["@charset \"UTF-8\";.farol-statuspublicacao{margin-right:.5rem;width:.35rem;border-radius:1rem;-webkit-border-radius:1rem;-moz-border-radius:1rem;-ms-border-radius:1rem;-o-border-radius:1rem}:host ::ng-deep .p-sidebar{border-radius:5px;position:absolute;height:var(--sidebar-height)}:host ::ng-deep .p-sidebar .p-sidebar-content{overflow:auto;border:1px solid #e5e7eb;border-radius:5px;margin-top:1rem}.card-perfil{border:1.5px solid #CBD5E1;background:#fff;border-radius:6px;max-height:100%}:host ::ng-deep .p-fieldset .p-fieldset-content{padding-bottom:0}:host ::ng-deep .p-sidebar .p-sidebar-close{display:none}.card-normal{border:1.5px solid #CBD5E1}.card-naoVisualizado{border-left:4px solid #e6671f!important}.parent-container{height:100%;display:flex;flex-direction:column}.file-viewer{margin:auto}.ekp-content{min-height:20rem;padding:1rem;overflow-y:auto;border-radius:5px}ngx-loading{position:absolute;top:0;left:0;width:100%;height:100%;z-index:1000}.card{transition:all .3s ease;border:1px solid transparent}.card-normal:hover{border:1px solid #a9a9a9;box-shadow:0 4px 8px #0000001a}.card-selected{background-color:#f0f0f0;border:1px solid #c0c0c0;box-shadow:0 6px 12px #00000026;transform:scale(1.02)}.loading-spinner{display:flex;align-items:center;justify-content:center;height:100%;font-size:1.5rem;color:#666}#html-content{width:100%;height:100%;overflow-y:auto}:host ::ng-deep .list-card-button .kv-button{width:22px;height:22px}:host ::ng-deep .list-card-button .kv-button .material-symbols-outlined.only-icon.icon-normal[_ngcontent-ng-c4083184952]{font-size:1rem}.custom-max-height{max-height:calc(100vh - 300px)}@media (max-height: 915px){.custom-max-height{max-height:94%}}@media (max-height: 805px){.custom-max-height{max-height:90%}}@media (max-height: 720px){.custom-max-height{max-height:85%}}.download-icon{font-size:20px;cursor:pointer;transition:transform .3s ease,color .3s ease}.download-icon:hover{color:#0f6cbd;transform:scale(1.2)}\n"] }]
|
|
9543
|
+
args: [{ selector: 'kv-content-viewer', template: "<div class=\"flex flex-column md:flex-row gap-2 mt-3 custom-max-height\" style=\"height: 1000vh;\">\r\n <!-- Lista de documentos -->\r\n <div\r\n class=\"card-perfil overflow-x-hidden\"\r\n (scroll)=\"scrollHandler($event)\"\r\n [ngClass]=\"{\r\n 'overflow-y-scroll': dataSource().length > 0,\r\n 'overflow-y-hidden': dataSource().length === 0\r\n }\"\r\n style=\"position: relative; max-height: calc(100vh - 100px);\"\r\n >\r\n <div *ngIf=\"dataSource().length > 0; else emptyDocumentList\" class=\"col-12\">\r\n <!-- Lista de cards -->\r\n <div\r\n *ngFor=\"let option of dataSource(); trackBy: trackByFn\"\r\n class=\"card-normal outline-none border-round-xl w-full p-2 m-1 grid p-fluid flex flex-row flex-nowrap align-items-center justify-content-center cursor-pointer\"\r\n style=\"min-height: 5rem\"\r\n (click)=\"visualizarPreview(option)\"\r\n [ngClass]=\"{\r\n 'card-naoVisualizado': !isVisualizado(option),\r\n 'card-selected': option === arquivoPreview(),\r\n 'card-normal': option !== arquivoPreview(),\r\n }\"\r\n >\r\n <div class=\"flex flex-grow-1 ml-2 flex-column gap-1 m-0 p-0 overflow-hidden text-overflow-ellipsis \" style=\"max-width: 100%;\">\r\n <ng-container *ngIf=\"cardTemplate; else defaultTemplate\">\r\n <ng-container \r\n *ngTemplateOutlet=\"cardTemplate; context: { $implicit: option }\"\r\n ></ng-container>\r\n </ng-container>\r\n </div>\r\n <ng-template #defaultTemplate>\r\n <div class=\"card-common-style default-card\">\r\n <h1 class=\"font-bold text-base p-0 m-0\">Bem-vindo!</h1>\r\n <p class=\"text-sm mt-2\">\r\n Kv-file-preview aguardando um template...\r\n </p>\r\n <p class=\"font-bold text-sm p-0 m-0\">Data: {{ todayDate() }}</p>\r\n </div>\r\n </ng-template>\r\n </div>\r\n </div>\r\n\r\n <ng-template #emptyDocumentList>\r\n @if(!noDocumentListTemplate) {\r\n <div class=\"text-center text-gray-600 mt-4 m-3\" style=\"height: 100%\">\r\n <div class=\" flex align-items-center gap-1\">\r\n <span class=\"material-symbols-outlined\"> inbox </span>\r\n <p>Nenhum documento dispon\u00EDvel.</p>\r\n </div>\r\n </div>\r\n } @else {\r\n <div class=\"text-center mt-4 m-3\" style=\"height: 100%\">\r\n <ng-container *ngTemplateOutlet=\"noDocumentListTemplate\"></ng-container>\r\n </div>\r\n }\r\n </ng-template>\r\n\r\n <!-- Contador de documentos - Fixo na parte inferior -->\r\n <div\r\n class=\"sticky-counter flex flex-row flex-1 px-2 justify-content-center p-2\"\r\n style=\"position: sticky; bottom: 0; background-color: white\"\r\n >\r\n <span>{{ totalItensCarregado() }} de {{ totalRecords }}</span>\r\n </div>\r\n </div>\r\n\r\n <!-- Visualizador -->\r\n <div id=\"fullscreenDiv\" class=\"card-perfil col-12 md:col-8 lg:col-9\" style=\"position: relative\">\r\n @if(btnTelaCheia)\r\n {\r\n <div class=\"grid\">\r\n <div class=\"col\"></div>\r\n <span id=\"fullscreenBtn\" (click)=\"alternarTelaCheia()\" class=\"material-symbols-outlined p-2 text-xl cursor-pointer\">\r\n open_in_full\r\n </span>\r\n </div>\r\n }\r\n @if(visualizadorDocumentos) {\r\n <ng-container *ngIf=\"arquivo(); else noDocumentSelected\">\r\n @if(isLoading) {\r\n <ngx-loading\r\n [show]=\"isLoading\"\r\n [config]=\"{ backdropBorderRadius: '3px', fullScreenBackdrop: false }\"\r\n ></ngx-loading>\r\n }\r\n <kv-file-viewer-novo\r\n *ngIf=\"extencaoDocumento !== 'ekp'\"\r\n [arquivo]=\"arquivo()!\"\r\n [type]=\"type()!\"\r\n [blob]=\"blob()!\"\r\n [width]=\"'100%'\" \r\n [height]=\"'100%'\"\r\n class=\"file-viewer\"\r\n >\r\n </kv-file-viewer-novo>\r\n \r\n <div\r\n id=\"html-content\"\r\n [innerHTML]=\"ekpContent()\"\r\n *ngIf=\"extencaoDocumento === 'ekp'\"\r\n class=\"ekp-content\"\r\n ></div>\r\n </ng-container>\r\n } @else {\r\n <ng-container *ngIf=\"arquivoPreview(); else noDocumentSelected\">\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n contentTemplate;\r\n context: { $implicit: arquivoPreview() }\r\n \"\r\n ></ng-container>\r\n </ng-container>\r\n }\r\n <ng-template #noDocumentSelected>\r\n @if(!noDocumentSelectedTemplate) {\r\n <div\r\n class=\"no-document-message flex flex-column align-items-center justify-content-center\"\r\n style=\"height: 100%\"\r\n >\r\n <p class=\"text-center text-gray-500\">\r\n Selecione um arquivo para visualiza\u00E7\u00E3o\r\n </p>\r\n <img\r\n [src]=\"\r\n 'https://work-assets.keevo.com.br/img/Digital_personal_files-pana_3.png'\r\n \"\r\n style=\"max-height: 50%; margin-top: 2rem;\"\r\n alt=\"\"\r\n />\r\n </div>\r\n } @else {\r\n <ng-container\r\n *ngTemplateOutlet=\"noDocumentSelectedTemplate\"\r\n ></ng-container>\r\n }\r\n </ng-template>\r\n </div>\r\n</div>\r\n", styles: ["@charset \"UTF-8\";.farol-statuspublicacao{margin-right:.5rem;width:.35rem;border-radius:1rem;-webkit-border-radius:1rem;-moz-border-radius:1rem;-ms-border-radius:1rem;-o-border-radius:1rem}:host ::ng-deep .p-sidebar{border-radius:5px;position:absolute;height:var(--sidebar-height)}:host ::ng-deep .p-sidebar .p-sidebar-content{overflow:auto;border:1px solid #e5e7eb;border-radius:5px;margin-top:1rem}.card-perfil{border:1.5px solid #CBD5E1;background:#fff;border-radius:6px;max-height:100%}:host ::ng-deep .p-fieldset .p-fieldset-content{padding-bottom:0}:host ::ng-deep .p-sidebar .p-sidebar-close{display:none}.card-normal{border:1.5px solid #CBD5E1}.card-naoVisualizado{border-left:4px solid #e6671f!important}.parent-container{height:100%;display:flex;flex-direction:column}.file-viewer{margin:auto}.ekp-content{min-height:20rem;padding:1rem;overflow-y:auto;border-radius:5px}ngx-loading{position:absolute;top:0;left:0;width:100%;height:100%;z-index:1000}.card{transition:all .3s ease;border:1px solid transparent}.card-normal:hover{border:1px solid #a9a9a9;box-shadow:0 4px 8px #0000001a}.card-selected{background-color:#f0f0f0;border:1px solid #c0c0c0;box-shadow:0 6px 12px #00000026;transform:scale(1.02)}.loading-spinner{display:flex;align-items:center;justify-content:center;height:100%;font-size:1.5rem;color:#666}#html-content{width:100%;height:100%;overflow-y:auto}:host ::ng-deep .list-card-button .kv-button{width:22px;height:22px}:host ::ng-deep .list-card-button .kv-button .material-symbols-outlined.only-icon.icon-normal[_ngcontent-ng-c4083184952]{font-size:1rem}.custom-max-height{max-height:calc(100vh - 300px)}@media (max-height: 915px){.custom-max-height{max-height:94%}}@media (max-height: 805px){.custom-max-height{max-height:90%}}@media (max-height: 720px){.custom-max-height{max-height:85%}}.download-icon{font-size:20px;cursor:pointer;transition:transform .3s ease,color .3s ease}.download-icon:hover{color:#0f6cbd;transform:scale(1.2)}\n"] }]
|
|
9470
9544
|
}], propDecorators: { extencaoDocumento: [{
|
|
9471
9545
|
type: Input
|
|
9472
9546
|
}], totalRecords: [{
|
|
@@ -9483,6 +9557,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImpor
|
|
|
9483
9557
|
type: Input
|
|
9484
9558
|
}], indvisualizado: [{
|
|
9485
9559
|
type: Input
|
|
9560
|
+
}], btnTelaCheia: [{
|
|
9561
|
+
type: Input
|
|
9486
9562
|
}], onScrollHandler: [{
|
|
9487
9563
|
type: Output
|
|
9488
9564
|
}], onSelectFile: [{
|