keevo-components 1.8.140 → 1.8.142
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-table.mjs +318 -0
- package/esm2022/lib/components/kv-table/kv-table.component.mjs +3 -3
- package/esm2022/lib/components/kv-table-edit/kv-table-edit.component.mjs +51 -377
- package/esm2022/public-api.mjs +3 -1
- package/fesm2022/keevo-components.mjs +610 -622
- package/fesm2022/keevo-components.mjs.map +1 -1
- package/lib/api/base-components/base-component-table.d.ts +81 -0
- package/lib/components/kv-table-edit/kv-table-edit.component.d.ts +15 -84
- package/package.json +1 -1
- package/public-api.d.ts +2 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { EventEmitter, Component, Input, Output, ViewChild, Injectable, ViewChildren, ContentChildren, forwardRef, Pipe, NgModule,
|
|
2
|
+
import { EventEmitter, Component, Input, Output, ViewChild, Injectable, ViewChildren, ContentChildren, forwardRef, HostListener, Pipe, NgModule, ChangeDetectionStrategy, Directive } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/common';
|
|
4
4
|
import { CommonModule, NgClass } from '@angular/common';
|
|
5
5
|
import * as i1$1 from 'primeng/button';
|
|
@@ -25,6 +25,7 @@ import * as i5$1 from 'primeng/tooltip';
|
|
|
25
25
|
import { TooltipModule } from 'primeng/tooltip';
|
|
26
26
|
import * as i10 from 'primeng/divider';
|
|
27
27
|
import { DividerModule } from 'primeng/divider';
|
|
28
|
+
import * as i2$2 from 'projects/keevo-components/src/public-api';
|
|
28
29
|
import * as i1$4 from '@angular/common/http';
|
|
29
30
|
import { HttpHeaders } from '@angular/common/http';
|
|
30
31
|
import { filter as filter$1 } from 'rxjs/operators';
|
|
@@ -38,7 +39,7 @@ import * as i5$2 from 'primeng/calendar';
|
|
|
38
39
|
import { CalendarModule } from 'primeng/calendar';
|
|
39
40
|
import * as i8 from 'primeng/card';
|
|
40
41
|
import { CardModule } from 'primeng/card';
|
|
41
|
-
import * as i2$
|
|
42
|
+
import * as i2$3 from 'primeng/carousel';
|
|
42
43
|
import { CarouselModule } from 'primeng/carousel';
|
|
43
44
|
import * as i9 from 'primeng/checkbox';
|
|
44
45
|
import { CheckboxModule } from 'primeng/checkbox';
|
|
@@ -101,7 +102,7 @@ import * as i1$6 from 'primeng/tree';
|
|
|
101
102
|
import { TreeModule } from 'primeng/tree';
|
|
102
103
|
import * as i10$1 from 'primeng/treetable';
|
|
103
104
|
import { TreeTableModule } from 'primeng/treetable';
|
|
104
|
-
import * as i2$
|
|
105
|
+
import * as i2$4 from 'primeng/selectbutton';
|
|
105
106
|
import { SelectButtonModule } from 'primeng/selectbutton';
|
|
106
107
|
import * as i5$8 from 'primeng/stepper';
|
|
107
108
|
import { StepperModule } from 'primeng/stepper';
|
|
@@ -1558,129 +1559,443 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImpor
|
|
|
1558
1559
|
type: Output
|
|
1559
1560
|
}] } });
|
|
1560
1561
|
|
|
1561
|
-
class
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1562
|
+
class BasecomponentTable {
|
|
1563
|
+
/**
|
|
1564
|
+
*
|
|
1565
|
+
*/
|
|
1566
|
+
constructor(datePipe, decimalPipe, cpfCnpjPipe, telefonePipe, notificationService
|
|
1567
|
+
// public capitalizePipe: CapitalizePipe,
|
|
1568
|
+
) {
|
|
1569
|
+
this.datePipe = datePipe;
|
|
1570
|
+
this.decimalPipe = decimalPipe;
|
|
1571
|
+
this.cpfCnpjPipe = cpfCnpjPipe;
|
|
1572
|
+
this.telefonePipe = telefonePipe;
|
|
1573
|
+
this.notificationService = notificationService;
|
|
1574
|
+
// Variaveis
|
|
1575
|
+
this.imgDefault = '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';
|
|
1576
|
+
this.selectedSize = { name: 'Normal', class: 'p-datatable-md', size: 1 };
|
|
1577
|
+
this.collapsed = false;
|
|
1578
|
+
this.globalFilterFields = [];
|
|
1579
|
+
// Entradas
|
|
1580
|
+
this.selectedItems = [];
|
|
1581
|
+
this.paginator = true;
|
|
1582
|
+
this.rows = 5;
|
|
1583
|
+
this.pageLinksOptions = 1;
|
|
1584
|
+
this.showFirstLastIcon = false;
|
|
1585
|
+
this.applyStyle = (rowData, col) => '';
|
|
1586
|
+
this.filterColumnsBtn = false;
|
|
1587
|
+
this.filtrosAvancados = false;
|
|
1588
|
+
this.scrollHeight = '';
|
|
1589
|
+
this.isTableScrollable = false;
|
|
1590
|
+
this.rowTrackBy = (index, item) => item;
|
|
1591
|
+
this.responsiveLayout = true;
|
|
1592
|
+
//Emissores de evendo
|
|
1593
|
+
this.onFilter = new EventEmitter();
|
|
1594
|
+
this.onSwitchTableChange = new EventEmitter();
|
|
1595
|
+
this.onActiveItemLote = new EventEmitter();
|
|
1596
|
+
this.onActiveItem = new EventEmitter();
|
|
1597
|
+
this.onSelectionChange = new EventEmitter();
|
|
1598
|
+
this.doubleClickEvent = new EventEmitter();
|
|
1599
|
+
this.onPaginate = new EventEmitter();
|
|
1573
1600
|
}
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
cpf === '7'.repeat(11) ||
|
|
1586
|
-
cpf === '8'.repeat(11) ||
|
|
1587
|
-
cpf === '9'.repeat(11)) {
|
|
1588
|
-
return false;
|
|
1589
|
-
}
|
|
1590
|
-
let soma = 0;
|
|
1591
|
-
let resto;
|
|
1592
|
-
for (let i = 1; i <= 9; i++) {
|
|
1593
|
-
soma = soma + parseInt(cpf.substring(i - 1, i)) * (11 - i);
|
|
1594
|
-
}
|
|
1595
|
-
resto = (soma * 10) % 11;
|
|
1596
|
-
if (resto === 10 || resto === 11) {
|
|
1597
|
-
resto = 0;
|
|
1601
|
+
set setConfig(value) {
|
|
1602
|
+
this.config = {
|
|
1603
|
+
enableCation: value.enableCation || true,
|
|
1604
|
+
enableSelect: value.enableSelect || false,
|
|
1605
|
+
enableFilter: value.enableFilter || true,
|
|
1606
|
+
...value,
|
|
1607
|
+
};
|
|
1608
|
+
if (this.config.enableFilter) {
|
|
1609
|
+
this.config.columns.forEach((col) => {
|
|
1610
|
+
this.globalFilterFields.push(col.field);
|
|
1611
|
+
});
|
|
1598
1612
|
}
|
|
1599
|
-
|
|
1600
|
-
|
|
1613
|
+
}
|
|
1614
|
+
ngOnInit() {
|
|
1615
|
+
}
|
|
1616
|
+
//Metodos de ação
|
|
1617
|
+
doubleClick(e, rowData) {
|
|
1618
|
+
let eventDoubleClick = { event: e, rowData: rowData };
|
|
1619
|
+
let array = [];
|
|
1620
|
+
e.target.classList.forEach((x) => array.push(x));
|
|
1621
|
+
this.doubleClickEvent.emit(eventDoubleClick);
|
|
1622
|
+
}
|
|
1623
|
+
//Metodos de retorno de valor
|
|
1624
|
+
returnTooltipRow(rowData, col) {
|
|
1625
|
+
return this.retornarRow(rowData, col, 'tooltiprow');
|
|
1626
|
+
}
|
|
1627
|
+
retornarRow(rowData, col, field) {
|
|
1628
|
+
const _rowaction = this.config.rows ? this.config.rows[col.field] : null;
|
|
1629
|
+
const _field = _rowaction && _rowaction[field]
|
|
1630
|
+
? _rowaction[field].constructor === Function
|
|
1631
|
+
? _rowaction[field].apply(this, [rowData])
|
|
1632
|
+
: _rowaction[field]
|
|
1633
|
+
: null;
|
|
1634
|
+
return _field;
|
|
1635
|
+
}
|
|
1636
|
+
returnRowClass(rowData, col) {
|
|
1637
|
+
let value = rowData[col.field];
|
|
1638
|
+
let rowClass;
|
|
1639
|
+
this.tableSize > 800 ? (rowClass = 'text-base') : (rowClass = '');
|
|
1640
|
+
if (col.expiredDate == true) {
|
|
1641
|
+
new Date(value) < new Date()
|
|
1642
|
+
? (rowClass = rowClass + ' text-red-400 font-semibold')
|
|
1643
|
+
: '';
|
|
1601
1644
|
}
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1645
|
+
return rowClass;
|
|
1646
|
+
}
|
|
1647
|
+
getCustomTemplate(templatename) {
|
|
1648
|
+
return this._templates[templatename];
|
|
1649
|
+
}
|
|
1650
|
+
returnClassIcon(rowData, col) {
|
|
1651
|
+
return this.retornarRow(rowData, col, 'iconrow');
|
|
1652
|
+
}
|
|
1653
|
+
returnClassChip(rowData, col) {
|
|
1654
|
+
return `chip-style w-auto border-round-2xl p-2 text-${this.retornarRow(rowData, col, 'stylechip')} border-${this.retornarRow(rowData, col, 'stylechip')}`;
|
|
1655
|
+
}
|
|
1656
|
+
returnTooltipIcon(rowData, col) {
|
|
1657
|
+
return this.retornarRow(rowData, col, 'tooltipiconrow');
|
|
1658
|
+
}
|
|
1659
|
+
loadImage(rowData, col) {
|
|
1660
|
+
/*
|
|
1661
|
+
Nossa coluna de imagem trabalha com strings do tipo: base64 ou url
|
|
1662
|
+
*/
|
|
1663
|
+
let retorno = `data:image/jpg;base64, ${this.imgDefault}`;
|
|
1664
|
+
if (rowData && col && rowData[col.field] && rowData[col.field] !== '') {
|
|
1665
|
+
if (rowData[col.field].includes('http'))
|
|
1666
|
+
retorno = rowData[col.field];
|
|
1667
|
+
else
|
|
1668
|
+
retorno = `data:image/jpg;base64, ${rowData[col.field]}`;
|
|
1605
1669
|
}
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1670
|
+
return retorno;
|
|
1671
|
+
}
|
|
1672
|
+
//Metodos de alinhamento e centralizamento de coluna
|
|
1673
|
+
alignColunas(col) {
|
|
1674
|
+
if (col.align) {
|
|
1675
|
+
return `text-align: ${col.align}`;
|
|
1609
1676
|
}
|
|
1610
|
-
|
|
1611
|
-
return
|
|
1677
|
+
else
|
|
1678
|
+
return '';
|
|
1679
|
+
}
|
|
1680
|
+
centralizarColunas(col) {
|
|
1681
|
+
if (col.centralize) {
|
|
1682
|
+
return 'text-align: center; ';
|
|
1612
1683
|
}
|
|
1613
|
-
|
|
1684
|
+
else
|
|
1685
|
+
return '';
|
|
1614
1686
|
}
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
cnpj === '2'.repeat(14) ||
|
|
1622
|
-
cnpj === '3'.repeat(14) ||
|
|
1623
|
-
cnpj === '4'.repeat(14) ||
|
|
1624
|
-
cnpj === '5'.repeat(14) ||
|
|
1625
|
-
cnpj === '6'.repeat(14) ||
|
|
1626
|
-
cnpj === '7'.repeat(14) ||
|
|
1627
|
-
cnpj === '8'.repeat(14) ||
|
|
1628
|
-
cnpj === '9'.repeat(14)) {
|
|
1629
|
-
return false;
|
|
1687
|
+
alignColunasHeader(col) {
|
|
1688
|
+
if (col.align) {
|
|
1689
|
+
if (col.align == 'right')
|
|
1690
|
+
return 'justify-content: end';
|
|
1691
|
+
else
|
|
1692
|
+
return '';
|
|
1630
1693
|
}
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1694
|
+
else
|
|
1695
|
+
return '';
|
|
1696
|
+
}
|
|
1697
|
+
//Metodos de formatação de celula
|
|
1698
|
+
formatarValor(valor) {
|
|
1699
|
+
const formatter = new Intl.NumberFormat('pt-BR', {
|
|
1700
|
+
style: 'currency',
|
|
1701
|
+
currency: 'BRL',
|
|
1702
|
+
});
|
|
1703
|
+
return formatter.format(valor);
|
|
1704
|
+
}
|
|
1705
|
+
transformValue(rowData, col) {
|
|
1706
|
+
let value = rowData[col.field];
|
|
1707
|
+
if (value != null) {
|
|
1708
|
+
if (!col.pipe) {
|
|
1709
|
+
return value;
|
|
1640
1710
|
}
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1711
|
+
switch (col.pipe) {
|
|
1712
|
+
case 'date':
|
|
1713
|
+
return this.datePipe.transform(value, 'dd/MM/yyyy');
|
|
1714
|
+
case 'decimal':
|
|
1715
|
+
return this.decimalPipe.transform(value, '1.2-2', 'pt-BR');
|
|
1716
|
+
case 'cpfcnpj':
|
|
1717
|
+
return this.cpfCnpjPipe.transform(value);
|
|
1718
|
+
case 'telefone':
|
|
1719
|
+
return this.telefonePipe.transform(value);
|
|
1720
|
+
// case 'capitalize':
|
|
1721
|
+
// return this.capitalizePipe.transform(value);
|
|
1722
|
+
case 'money':
|
|
1723
|
+
return this.formatarValor(value);
|
|
1724
|
+
case 'percentage':
|
|
1725
|
+
return `${value} %`;
|
|
1726
|
+
default:
|
|
1727
|
+
break;
|
|
1654
1728
|
}
|
|
1655
1729
|
}
|
|
1656
|
-
resultado = soma % 11 < 2 ? 0 : 11 - (soma % 11);
|
|
1657
|
-
if (resultado !== (+digitos.charAt(1))) {
|
|
1658
|
-
return false;
|
|
1659
|
-
}
|
|
1660
|
-
return true;
|
|
1661
1730
|
}
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
return false;
|
|
1667
|
-
}
|
|
1668
|
-
else if (fc.value.replace(/\D+/g, '').length === 11) {
|
|
1669
|
-
return DocsService.validaCpf(fc.value) ? false : { cpfCnpj: true };
|
|
1670
|
-
}
|
|
1671
|
-
else if (fc.value.replace(/\D+/g, '').length === 14) {
|
|
1672
|
-
return DocsService.validaCnpj(fc.value) ? false : { cpfCnpj: true };
|
|
1673
|
-
}
|
|
1674
|
-
else {
|
|
1675
|
-
return { cpfCnpj: true };
|
|
1676
|
-
}
|
|
1731
|
+
//Metodos de filtragem
|
|
1732
|
+
onGlobalFilter(table, event) {
|
|
1733
|
+
this.onFilter.emit(event.target.value);
|
|
1734
|
+
table.filterGlobal(event.target.value, 'contains');
|
|
1677
1735
|
}
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1736
|
+
//Metodos para campo switch
|
|
1737
|
+
onSwitchChange(estado, rowData, col) {
|
|
1738
|
+
this.onSwitchTableChange.emit({
|
|
1739
|
+
estado: estado,
|
|
1740
|
+
rowData: rowData,
|
|
1741
|
+
col: col
|
|
1742
|
+
});
|
|
1743
|
+
}
|
|
1744
|
+
isSwitchField(col) {
|
|
1745
|
+
let retorno = col.fieldType && col.fieldType === 'switch' ? true : false;
|
|
1746
|
+
return retorno;
|
|
1747
|
+
}
|
|
1748
|
+
//Metodos para campo checkbox
|
|
1749
|
+
isDisabledCheckbox(rowData) {
|
|
1750
|
+
return this.config.disableControlCheckboxFunction
|
|
1751
|
+
? this.config.disableControlCheckboxFunction(rowData)
|
|
1752
|
+
: false;
|
|
1753
|
+
}
|
|
1754
|
+
activeItemLote(selectedItems) {
|
|
1755
|
+
this.onActiveItemLote.emit(selectedItems);
|
|
1756
|
+
}
|
|
1757
|
+
activeItem(rowData) {
|
|
1758
|
+
this.selectedItem = rowData;
|
|
1759
|
+
this.onActiveItem.emit({ rowData: rowData });
|
|
1760
|
+
}
|
|
1761
|
+
//Metodos de controle de celula genericos (disable, visible...)
|
|
1762
|
+
exibirCampo(field, rowData) {
|
|
1763
|
+
let visible = field.visible ? field.visible(rowData) : true;
|
|
1764
|
+
return visible;
|
|
1765
|
+
}
|
|
1766
|
+
selectionChange(value = []) {
|
|
1767
|
+
this.onSelectionChange.emit(value);
|
|
1768
|
+
}
|
|
1769
|
+
//Metodos de verificação de tipo de campo
|
|
1770
|
+
isImageField(col) {
|
|
1771
|
+
let retorno = col.fieldType && col.fieldType === 'image' ? true : false;
|
|
1772
|
+
return retorno;
|
|
1773
|
+
}
|
|
1774
|
+
isChipField(col) {
|
|
1775
|
+
return col.fieldType == 'chip';
|
|
1776
|
+
}
|
|
1777
|
+
isBooleanField(rowData, col) {
|
|
1778
|
+
return col.fieldType == 'boolean';
|
|
1779
|
+
}
|
|
1780
|
+
//Metodos de filtragem, ordenação e paginação
|
|
1781
|
+
paginate($event) {
|
|
1782
|
+
if ($event) {
|
|
1783
|
+
let paginaInicial = ($event?.first > 0 ? $event.first / $event.rows : $event.first) + 1;
|
|
1784
|
+
let termoPesquisa = '';
|
|
1785
|
+
let ordenacao = '';
|
|
1786
|
+
if ($event.globalFilter)
|
|
1787
|
+
termoPesquisa = $event.globalFilter;
|
|
1788
|
+
if ($event.sortField)
|
|
1789
|
+
ordenacao = `${$event.sortField} ${$event.sortOrder === 1 ? 'ASC' : 'DESC'}`;
|
|
1790
|
+
const objeto = {
|
|
1791
|
+
paginaInicial: paginaInicial,
|
|
1792
|
+
tamanhoPagina: $event.rows,
|
|
1793
|
+
termoPesquisa: termoPesquisa,
|
|
1794
|
+
ordenacao: ordenacao,
|
|
1795
|
+
};
|
|
1796
|
+
this.onPaginate.emit(objeto);
|
|
1797
|
+
}
|
|
1798
|
+
}
|
|
1799
|
+
adjustTableSize() {
|
|
1800
|
+
if (this.tableSize < 800) {
|
|
1801
|
+
this.selectedSize = 'p-datatable-sm';
|
|
1802
|
+
}
|
|
1803
|
+
else {
|
|
1804
|
+
this.selectedSize = '';
|
|
1805
|
+
}
|
|
1806
|
+
}
|
|
1807
|
+
onWindowResize() {
|
|
1808
|
+
this.adjustTableSize();
|
|
1809
|
+
this.tamanhoTela = window.innerWidth;
|
|
1810
|
+
}
|
|
1811
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: BasecomponentTable, deps: [{ token: i1.DatePipe }, { token: i1.DecimalPipe }, { token: i2$2.CpfCnpjPipe }, { token: i2$2.TelefonePipe }, { token: i2$2.NotificationService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1812
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.8", type: BasecomponentTable, selector: "ng-component", inputs: { selectedItems: "selectedItems", totalRecords: "totalRecords", paginator: "paginator", rowsPerPageOptions: "rowsPerPageOptions", rows: "rows", pageLinksOptions: "pageLinksOptions", showFirstLastIcon: "showFirstLastIcon", applyStyle: "applyStyle", filterColumnsBtn: "filterColumnsBtn", filtrosAvancados: "filtrosAvancados", scrollHeight: "scrollHeight", isTableScrollable: "isTableScrollable", rowTrackBy: "rowTrackBy", responsiveLayout: "responsiveLayout", tableSize: "tableSize", dataSource: "dataSource", _templates: ["templates", "_templates"], setConfig: ["config", "setConfig"] }, outputs: { onFilter: "onFilter", onSwitchTableChange: "onSwitchTableChange", onActiveItemLote: "onActiveItemLote", onActiveItem: "onActiveItem", onSelectionChange: "onSelectionChange", doubleClickEvent: "doubleClickEvent", onPaginate: "onPaginate" }, host: { listeners: { "window:resize": "onWindowResize($event)" } }, ngImport: i0, template: '', isInline: true }); }
|
|
1813
|
+
}
|
|
1814
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: BasecomponentTable, decorators: [{
|
|
1815
|
+
type: Component,
|
|
1816
|
+
args: [{
|
|
1817
|
+
template: '',
|
|
1818
|
+
}]
|
|
1819
|
+
}], ctorParameters: () => [{ type: i1.DatePipe }, { type: i1.DecimalPipe }, { type: i2$2.CpfCnpjPipe }, { type: i2$2.TelefonePipe }, { type: i2$2.NotificationService }], propDecorators: { selectedItems: [{
|
|
1820
|
+
type: Input
|
|
1821
|
+
}], totalRecords: [{
|
|
1822
|
+
type: Input
|
|
1823
|
+
}], paginator: [{
|
|
1824
|
+
type: Input
|
|
1825
|
+
}], rowsPerPageOptions: [{
|
|
1826
|
+
type: Input
|
|
1827
|
+
}], rows: [{
|
|
1828
|
+
type: Input
|
|
1829
|
+
}], pageLinksOptions: [{
|
|
1830
|
+
type: Input
|
|
1831
|
+
}], showFirstLastIcon: [{
|
|
1832
|
+
type: Input
|
|
1833
|
+
}], applyStyle: [{
|
|
1834
|
+
type: Input
|
|
1835
|
+
}], filterColumnsBtn: [{
|
|
1836
|
+
type: Input
|
|
1837
|
+
}], filtrosAvancados: [{
|
|
1838
|
+
type: Input
|
|
1839
|
+
}], scrollHeight: [{
|
|
1840
|
+
type: Input
|
|
1841
|
+
}], isTableScrollable: [{
|
|
1842
|
+
type: Input
|
|
1843
|
+
}], rowTrackBy: [{
|
|
1844
|
+
type: Input
|
|
1845
|
+
}], responsiveLayout: [{
|
|
1846
|
+
type: Input
|
|
1847
|
+
}], tableSize: [{
|
|
1848
|
+
type: Input
|
|
1849
|
+
}], dataSource: [{
|
|
1850
|
+
type: Input
|
|
1851
|
+
}], _templates: [{
|
|
1852
|
+
type: Input,
|
|
1853
|
+
args: ['templates']
|
|
1854
|
+
}], setConfig: [{
|
|
1855
|
+
type: Input,
|
|
1856
|
+
args: ['config']
|
|
1857
|
+
}], onFilter: [{
|
|
1858
|
+
type: Output
|
|
1859
|
+
}], onSwitchTableChange: [{
|
|
1860
|
+
type: Output
|
|
1861
|
+
}], onActiveItemLote: [{
|
|
1862
|
+
type: Output
|
|
1863
|
+
}], onActiveItem: [{
|
|
1864
|
+
type: Output
|
|
1865
|
+
}], onSelectionChange: [{
|
|
1866
|
+
type: Output
|
|
1867
|
+
}], doubleClickEvent: [{
|
|
1868
|
+
type: Output
|
|
1869
|
+
}], onPaginate: [{
|
|
1870
|
+
type: Output
|
|
1871
|
+
}], onWindowResize: [{
|
|
1872
|
+
type: HostListener,
|
|
1873
|
+
args: ['window:resize', ['$event']]
|
|
1874
|
+
}] } });
|
|
1875
|
+
|
|
1876
|
+
class DocsService {
|
|
1877
|
+
static validaCpfCnpj(cpfcnpj) {
|
|
1878
|
+
cpfcnpj = cpfcnpj.replace(/\D/g, '');
|
|
1879
|
+
if (cpfcnpj.length === 11) {
|
|
1880
|
+
return DocsService.validaCpf(cpfcnpj);
|
|
1881
|
+
}
|
|
1882
|
+
else if (cpfcnpj.length === 14) {
|
|
1883
|
+
return DocsService.validaCnpj(cpfcnpj);
|
|
1884
|
+
}
|
|
1885
|
+
else {
|
|
1886
|
+
return false;
|
|
1887
|
+
}
|
|
1888
|
+
}
|
|
1889
|
+
static validaCpf(cpf) {
|
|
1890
|
+
cpf = cpf.replace(/\D+/g, '');
|
|
1891
|
+
if (!cpf ||
|
|
1892
|
+
cpf.length !== 11 ||
|
|
1893
|
+
cpf === '0'.repeat(11) ||
|
|
1894
|
+
cpf === '1'.repeat(11) ||
|
|
1895
|
+
cpf === '2'.repeat(11) ||
|
|
1896
|
+
cpf === '3'.repeat(11) ||
|
|
1897
|
+
cpf === '4'.repeat(11) ||
|
|
1898
|
+
cpf === '5'.repeat(11) ||
|
|
1899
|
+
cpf === '6'.repeat(11) ||
|
|
1900
|
+
cpf === '7'.repeat(11) ||
|
|
1901
|
+
cpf === '8'.repeat(11) ||
|
|
1902
|
+
cpf === '9'.repeat(11)) {
|
|
1903
|
+
return false;
|
|
1904
|
+
}
|
|
1905
|
+
let soma = 0;
|
|
1906
|
+
let resto;
|
|
1907
|
+
for (let i = 1; i <= 9; i++) {
|
|
1908
|
+
soma = soma + parseInt(cpf.substring(i - 1, i)) * (11 - i);
|
|
1909
|
+
}
|
|
1910
|
+
resto = (soma * 10) % 11;
|
|
1911
|
+
if (resto === 10 || resto === 11) {
|
|
1912
|
+
resto = 0;
|
|
1913
|
+
}
|
|
1914
|
+
if (resto !== parseInt(cpf.substring(9, 10))) {
|
|
1915
|
+
return false;
|
|
1916
|
+
}
|
|
1917
|
+
soma = 0;
|
|
1918
|
+
for (let i = 1; i <= 10; i++) {
|
|
1919
|
+
soma = soma + parseInt(cpf.substring(i - 1, i)) * (12 - i);
|
|
1920
|
+
}
|
|
1921
|
+
resto = (soma * 10) % 11;
|
|
1922
|
+
if (resto === 10 || resto === 11) {
|
|
1923
|
+
resto = 0;
|
|
1924
|
+
}
|
|
1925
|
+
if (resto !== parseInt(cpf.substring(10, 11))) {
|
|
1926
|
+
return false;
|
|
1927
|
+
}
|
|
1928
|
+
return true;
|
|
1929
|
+
}
|
|
1930
|
+
static validaCnpj(cnpj) {
|
|
1931
|
+
cnpj = cnpj.replace(/\D+/g, '');
|
|
1932
|
+
if (!cnpj ||
|
|
1933
|
+
cnpj.length !== 14 ||
|
|
1934
|
+
cnpj === '0'.repeat(14) ||
|
|
1935
|
+
cnpj === '1'.repeat(14) ||
|
|
1936
|
+
cnpj === '2'.repeat(14) ||
|
|
1937
|
+
cnpj === '3'.repeat(14) ||
|
|
1938
|
+
cnpj === '4'.repeat(14) ||
|
|
1939
|
+
cnpj === '5'.repeat(14) ||
|
|
1940
|
+
cnpj === '6'.repeat(14) ||
|
|
1941
|
+
cnpj === '7'.repeat(14) ||
|
|
1942
|
+
cnpj === '8'.repeat(14) ||
|
|
1943
|
+
cnpj === '9'.repeat(14)) {
|
|
1944
|
+
return false;
|
|
1945
|
+
}
|
|
1946
|
+
let tamanho = cnpj.length - 2;
|
|
1947
|
+
let numeros = cnpj.substring(0, tamanho);
|
|
1948
|
+
const digitos = cnpj.substring(tamanho);
|
|
1949
|
+
let soma = 0;
|
|
1950
|
+
let pos = tamanho - 7;
|
|
1951
|
+
for (let i = tamanho; i >= 1; i--) {
|
|
1952
|
+
soma += numeros.charAt(tamanho - i) * pos--;
|
|
1953
|
+
if (pos < 2) {
|
|
1954
|
+
pos = 9;
|
|
1955
|
+
}
|
|
1956
|
+
}
|
|
1957
|
+
let resultado = soma % 11 < 2 ? 0 : 11 - (soma % 11);
|
|
1958
|
+
if (resultado !== (+digitos.charAt(0))) {
|
|
1959
|
+
return false;
|
|
1960
|
+
}
|
|
1961
|
+
tamanho = tamanho + 1;
|
|
1962
|
+
numeros = cnpj.substring(0, tamanho);
|
|
1963
|
+
soma = 0;
|
|
1964
|
+
pos = tamanho - 7;
|
|
1965
|
+
for (let i = tamanho; i >= 1; i--) {
|
|
1966
|
+
soma += numeros.charAt(tamanho - i) * pos--;
|
|
1967
|
+
if (pos < 2) {
|
|
1968
|
+
pos = 9;
|
|
1969
|
+
}
|
|
1970
|
+
}
|
|
1971
|
+
resultado = soma % 11 < 2 ? 0 : 11 - (soma % 11);
|
|
1972
|
+
if (resultado !== (+digitos.charAt(1))) {
|
|
1973
|
+
return false;
|
|
1974
|
+
}
|
|
1975
|
+
return true;
|
|
1976
|
+
}
|
|
1977
|
+
static validatorCpfCnpj(fc) {
|
|
1978
|
+
if (!fc.value)
|
|
1979
|
+
return false;
|
|
1980
|
+
if (fc.value.replace(/\D+/g, '') === '00000000000' || fc.value.replace(/\D+/g, '') === '000000000000000') {
|
|
1981
|
+
return false;
|
|
1982
|
+
}
|
|
1983
|
+
else if (fc.value.replace(/\D+/g, '').length === 11) {
|
|
1984
|
+
return DocsService.validaCpf(fc.value) ? false : { cpfCnpj: true };
|
|
1985
|
+
}
|
|
1986
|
+
else if (fc.value.replace(/\D+/g, '').length === 14) {
|
|
1987
|
+
return DocsService.validaCnpj(fc.value) ? false : { cpfCnpj: true };
|
|
1988
|
+
}
|
|
1989
|
+
else {
|
|
1990
|
+
return { cpfCnpj: true };
|
|
1991
|
+
}
|
|
1992
|
+
}
|
|
1993
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: DocsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1994
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: DocsService, providedIn: 'root' }); }
|
|
1995
|
+
}
|
|
1996
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: DocsService, decorators: [{
|
|
1997
|
+
type: Injectable,
|
|
1998
|
+
args: [{
|
|
1684
1999
|
providedIn: 'root'
|
|
1685
2000
|
}]
|
|
1686
2001
|
}] });
|
|
@@ -2519,7 +2834,7 @@ class KvCarouselComponent {
|
|
|
2519
2834
|
}
|
|
2520
2835
|
}
|
|
2521
2836
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvCarouselComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2522
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.8", type: KvCarouselComponent, selector: "kv-carousel", inputs: { carouselData: "carouselData" }, ngImport: i0, template: "<p-carousel id=\"carousel\" [value]=\"carouselData\" [indicatorStyleClass]=\"'carousel-indicator'\" [autoplayInterval]=\"5000\" \r\n [showIndicators]=\"true\" [showNavigators]=\"false\" [numVisible]=\"1\" [numScroll]=\"1\" [circular]=\"true\" styleClass=\"h-full\">\r\n>\r\n <ng-template pTemplate=\"item\" let-banner class=\"justify-content-center align-items-center \">\r\n <img [src]=\"banner.img\" class=\"w-full border-round-banner\" [style.height.px]=\"heightCarousel\"\r\n (click)=\"navigateToLink(banner.link)\">\r\n </ng-template>\r\n</p-carousel>\r\n", styles: ["::ng-deep .p-carousel-indicators{position:absolute;left:50%;transform:translate(-50%);bottom:-1rem}::ng-deep .carousel-indicator{width:15px!important;height:4px!important;margin:-3px!important;padding:0!important;background-color:#eeeeeed0}::ng-deep .carousel-indicator:hover{background-color:#efefef}button.p-carousel-indicator.p-link{background-color:#f0f8ff!important}::ng-deep .p-carousel .p-carousel-content{overflow:hidden!important;position:relative}::ng-deep .border-round-banner{border-radius:20px!important;max-height:500px}\n"], dependencies: [{ kind: "directive", type: i1$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i2$
|
|
2837
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.8", type: KvCarouselComponent, selector: "kv-carousel", inputs: { carouselData: "carouselData" }, ngImport: i0, template: "<p-carousel id=\"carousel\" [value]=\"carouselData\" [indicatorStyleClass]=\"'carousel-indicator'\" [autoplayInterval]=\"5000\" \r\n [showIndicators]=\"true\" [showNavigators]=\"false\" [numVisible]=\"1\" [numScroll]=\"1\" [circular]=\"true\" styleClass=\"h-full\">\r\n>\r\n <ng-template pTemplate=\"item\" let-banner class=\"justify-content-center align-items-center \">\r\n <img [src]=\"banner.img\" class=\"w-full border-round-banner\" [style.height.px]=\"heightCarousel\"\r\n (click)=\"navigateToLink(banner.link)\">\r\n </ng-template>\r\n</p-carousel>\r\n", styles: ["::ng-deep .p-carousel-indicators{position:absolute;left:50%;transform:translate(-50%);bottom:-1rem}::ng-deep .carousel-indicator{width:15px!important;height:4px!important;margin:-3px!important;padding:0!important;background-color:#eeeeeed0}::ng-deep .carousel-indicator:hover{background-color:#efefef}button.p-carousel-indicator.p-link{background-color:#f0f8ff!important}::ng-deep .p-carousel .p-carousel-content{overflow:hidden!important;position:relative}::ng-deep .border-round-banner{border-radius:20px!important;max-height:500px}\n"], dependencies: [{ kind: "directive", type: i1$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i2$3.Carousel, selector: "p-carousel", inputs: ["page", "numVisible", "numScroll", "responsiveOptions", "orientation", "verticalViewPortHeight", "contentClass", "indicatorsContentClass", "indicatorsContentStyle", "indicatorStyleClass", "indicatorStyle", "value", "circular", "showIndicators", "showNavigators", "autoplayInterval", "style", "styleClass"], outputs: ["onPage"] }] }); }
|
|
2523
2838
|
}
|
|
2524
2839
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvCarouselComponent, decorators: [{
|
|
2525
2840
|
type: Component,
|
|
@@ -3115,7 +3430,7 @@ class KvSelectButtonComponent {
|
|
|
3115
3430
|
this.optionClick.emit(event);
|
|
3116
3431
|
}
|
|
3117
3432
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvSelectButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3118
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.8", type: KvSelectButtonComponent, selector: "kv-select-button", inputs: { formGroup: "formGroup", formControlName: "formControlName", options: "options", optionLabel: "optionLabel", optionValue: "optionValue", mutiple: "mutiple", disabled: "disabled", value: "value" }, outputs: { onSelectionChange: "onSelectionChange", optionClick: "optionClick" }, ngImport: i0, template: "@if(value) {\r\n<p-selectButton\r\n [options]=\"options\"\r\n [optionLabel]=\"optionLabel\"\r\n [optionValue]=\"optionValue\"\r\n (onChange)=\"selectionChange($event)\"\r\n (onOptionClick)=\"onOptionClick($event)\"\r\n [multiple]=\"mutiple\"\r\n [disabled]=\"disabled\"\r\n [(ngModel)]=\"value\"\r\n/>\r\n} @else {\r\n<div [formGroup]=\"formGroup\">\r\n <p-selectButton\r\n [options]=\"options\"\r\n [optionLabel]=\"optionLabel\"\r\n [optionValue]=\"optionValue\"\r\n (onChange)=\"selectionChange($event)\"\r\n (onOptionClick)=\"onOptionClick($event)\"\r\n [multiple]=\"mutiple\"\r\n [disabled]=\"disabled\"\r\n [formControlName]=\"formControlName\"\r\n [(ngModel)]=\"value\"\r\n />\r\n</div>\r\n}", styles: [":host ::ng-deep .p-selectbutton .p-button.p-highlight{background:#183462!important;border:#183462;box-shadow:0 4px 10px #00000008,0 0 2px #0000000f,0 2px 6px #0000001f}\n"], dependencies: [{ kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2$
|
|
3433
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.8", type: KvSelectButtonComponent, selector: "kv-select-button", inputs: { formGroup: "formGroup", formControlName: "formControlName", options: "options", optionLabel: "optionLabel", optionValue: "optionValue", mutiple: "mutiple", disabled: "disabled", value: "value" }, outputs: { onSelectionChange: "onSelectionChange", optionClick: "optionClick" }, ngImport: i0, template: "@if(value) {\r\n<p-selectButton\r\n [options]=\"options\"\r\n [optionLabel]=\"optionLabel\"\r\n [optionValue]=\"optionValue\"\r\n (onChange)=\"selectionChange($event)\"\r\n (onOptionClick)=\"onOptionClick($event)\"\r\n [multiple]=\"mutiple\"\r\n [disabled]=\"disabled\"\r\n [(ngModel)]=\"value\"\r\n/>\r\n} @else {\r\n<div [formGroup]=\"formGroup\">\r\n <p-selectButton\r\n [options]=\"options\"\r\n [optionLabel]=\"optionLabel\"\r\n [optionValue]=\"optionValue\"\r\n (onChange)=\"selectionChange($event)\"\r\n (onOptionClick)=\"onOptionClick($event)\"\r\n [multiple]=\"mutiple\"\r\n [disabled]=\"disabled\"\r\n [formControlName]=\"formControlName\"\r\n [(ngModel)]=\"value\"\r\n />\r\n</div>\r\n}", styles: [":host ::ng-deep .p-selectbutton .p-button.p-highlight{background:#183462!important;border:#183462;box-shadow:0 4px 10px #00000008,0 0 2px #0000000f,0 2px 6px #0000001f}\n"], dependencies: [{ kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2$4.SelectButton, selector: "p-selectButton", inputs: ["options", "optionLabel", "optionValue", "optionDisabled", "unselectable", "tabindex", "multiple", "allowEmpty", "style", "styleClass", "ariaLabelledBy", "disabled", "dataKey", "autofocus"], outputs: ["onOptionClick", "onChange"] }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }] }); }
|
|
3119
3434
|
}
|
|
3120
3435
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvSelectButtonComponent, decorators: [{
|
|
3121
3436
|
type: Component,
|
|
@@ -4155,67 +4470,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImpor
|
|
|
4155
4470
|
}]
|
|
4156
4471
|
}] });
|
|
4157
4472
|
|
|
4158
|
-
class KvTableEditComponent {
|
|
4159
|
-
|
|
4160
|
-
|
|
4161
|
-
|
|
4162
|
-
|
|
4163
|
-
|
|
4164
|
-
...value,
|
|
4165
|
-
};
|
|
4166
|
-
// if (this.config.enableFilter) {
|
|
4167
|
-
// this.config.columns.forEach((col) => {
|
|
4168
|
-
// this.globalFilterFields.push(col.field);
|
|
4169
|
-
// });
|
|
4170
|
-
// }
|
|
4171
|
-
}
|
|
4172
|
-
constructor(datePipe, decimalPipe, cpfCnpjPipe, telefonePipe, capitalizePipe, notificationService) {
|
|
4173
|
-
this.datePipe = datePipe;
|
|
4174
|
-
this.decimalPipe = decimalPipe;
|
|
4175
|
-
this.cpfCnpjPipe = cpfCnpjPipe;
|
|
4176
|
-
this.telefonePipe = telefonePipe;
|
|
4177
|
-
this.capitalizePipe = capitalizePipe;
|
|
4178
|
-
this.notificationService = notificationService;
|
|
4179
|
-
this.collapsed = false;
|
|
4180
|
-
this.globalFilterFields = [];
|
|
4181
|
-
this.selectedItems = [];
|
|
4182
|
-
this.paginator = true;
|
|
4183
|
-
this.rows = 5;
|
|
4184
|
-
this.pageLinksOptions = 1;
|
|
4185
|
-
this.showFirstLastIcon = false;
|
|
4186
|
-
this.applyStyle = (rowData, col) => '';
|
|
4187
|
-
this.filterColumnsBtn = false;
|
|
4188
|
-
this.filtrosAvancados = false;
|
|
4189
|
-
this.scrollHeight = '';
|
|
4190
|
-
this.isTableScrollable = false;
|
|
4191
|
-
this.rowTrackBy = (index, item) => item;
|
|
4192
|
-
this.responsiveLayout = true;
|
|
4193
|
-
//FIXME: Remover props não utlizadas
|
|
4194
|
-
//NOTE: PROPS CRIADAS AGORA
|
|
4473
|
+
class KvTableEditComponent extends BasecomponentTable {
|
|
4474
|
+
constructor(datePipe, decimalPipe, cpfCnpjPipe, telefonePipe, notificationService
|
|
4475
|
+
// capitalizePipe: CapitalizePipe,
|
|
4476
|
+
) {
|
|
4477
|
+
super(datePipe, decimalPipe, cpfCnpjPipe, telefonePipe, notificationService);
|
|
4478
|
+
this.enableSizes = false;
|
|
4195
4479
|
this.editMode = 'cell';
|
|
4480
|
+
this.itemsParaSalvamento = [];
|
|
4196
4481
|
this.isEditing = false;
|
|
4197
4482
|
this.isShowSizes = false;
|
|
4198
|
-
this.itemsParaSalvamento = [];
|
|
4199
|
-
this.enableSizes = false;
|
|
4200
|
-
this.menuItems = [];
|
|
4201
|
-
this.imgDefault = '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';
|
|
4202
|
-
this.isExpanded = false;
|
|
4203
4483
|
this.clonedDataSource = {};
|
|
4204
|
-
/** Emite evento de salvamento da linha */
|
|
4205
|
-
// @Output() onRowSave: EventEmitter<any> = new EventEmitter();
|
|
4206
|
-
this.onSave = new EventEmitter();
|
|
4207
|
-
this.onActiveItem = new EventEmitter();
|
|
4208
|
-
this.onActiveItemLote = new EventEmitter();
|
|
4209
|
-
this.onPaginate = new EventEmitter();
|
|
4210
|
-
this.onSelectionChange = new EventEmitter();
|
|
4211
|
-
this.doubleClickEvent = new EventEmitter();
|
|
4212
|
-
this.filterField = new EventEmitter();
|
|
4213
|
-
this.onSwitchTableChange = new EventEmitter();
|
|
4214
|
-
this.onFilter = new EventEmitter();
|
|
4215
4484
|
this.selectedProduct = {
|
|
4216
4485
|
rowData: {},
|
|
4217
4486
|
editing: false
|
|
4218
4487
|
};
|
|
4488
|
+
this.menuItems = [];
|
|
4489
|
+
/** Emite evento de salvamento da linha */
|
|
4490
|
+
this.onSave = new EventEmitter();
|
|
4491
|
+
this.filterField = new EventEmitter();
|
|
4219
4492
|
this.sizes = [
|
|
4220
4493
|
{
|
|
4221
4494
|
label: 'Pequeno', class: 'p-datatable-sm', size: 0.83, command: (x) => {
|
|
@@ -4229,385 +4502,118 @@ class KvTableEditComponent {
|
|
|
4229
4502
|
},
|
|
4230
4503
|
{
|
|
4231
4504
|
label: 'Grande', class: 'p-datatable-lg', size: 1.17, command: (x) => {
|
|
4232
|
-
this.selectedSize = { label: 'Large', class: 'p-datatable-lg', size: 1.17 };
|
|
4233
|
-
}
|
|
4234
|
-
},
|
|
4235
|
-
// { name: 'Small', class: 'p-datatable-sm', size: 0.83 },
|
|
4236
|
-
// { name: 'Normal', class: 'p-datatable-md', size: 1 },
|
|
4237
|
-
// { name: 'Large', class: 'p-datatable-lg', size: 1.17 }
|
|
4238
|
-
];
|
|
4239
|
-
this.
|
|
4240
|
-
this.
|
|
4241
|
-
this.
|
|
4242
|
-
this.isRowSelectable = this.isRowSelectable.bind(this);
|
|
4243
|
-
}
|
|
4244
|
-
getOrExecute(action, data) {
|
|
4245
|
-
return getOrExecute(action, data);
|
|
4246
|
-
}
|
|
4247
|
-
ngOnInit() {
|
|
4248
|
-
this.onSaveTimer$.pipe(takeUntil(this.onDestroy$)).subscribe(() => {
|
|
4249
|
-
// Quando o temporizador terminar, emita o evento onSave com os dados a serem salvos
|
|
4250
|
-
this.onRowEditSave();
|
|
4251
|
-
});
|
|
4252
|
-
this.tamanhoTela = window.innerWidth;
|
|
4253
|
-
this.items = [
|
|
4254
|
-
{
|
|
4255
|
-
label: 'Editar linha', icon: 'pi pi-fw pi-pencil', command: () => {
|
|
4256
|
-
const element = document.getElementById('rowEdit' + this.selectedProduct.rowData[this.config.dataKey]);
|
|
4257
|
-
if (element && !this.config.disableEditRowFunction?.(this.selectedProduct.rowData)) {
|
|
4258
|
-
element.click();
|
|
4259
|
-
}
|
|
4260
|
-
else {
|
|
4261
|
-
this.notificationService.toastWarn("A edição dessa linha esta desabilitada");
|
|
4262
|
-
}
|
|
4263
|
-
this.onRowEditInit(this.selectedProduct);
|
|
4264
|
-
}
|
|
4265
|
-
},
|
|
4266
|
-
{
|
|
4267
|
-
label: 'Cancelar edição', icon: 'pi pi-fw pi-times', command: (data) => {
|
|
4268
|
-
const element = document.getElementById('rowCancel' + this.selectedProduct.rowData[this.config.dataKey]);
|
|
4269
|
-
if (element) {
|
|
4270
|
-
element.click();
|
|
4271
|
-
}
|
|
4272
|
-
else {
|
|
4273
|
-
this.notificationService.toastWarn("A edição dessa linha esta desabilitada");
|
|
4274
|
-
}
|
|
4275
|
-
}
|
|
4276
|
-
},
|
|
4277
|
-
{
|
|
4278
|
-
label: 'Salvar edição', icon: 'pi pi-fw pi-save', command: (data) => {
|
|
4279
|
-
const element = document.getElementById('rowSave' + this.selectedProduct.rowData[this.config.dataKey]);
|
|
4280
|
-
if (element) {
|
|
4281
|
-
element.click(); // Dispara um evento de clique no elemento com ID 'teste'
|
|
4282
|
-
}
|
|
4283
|
-
else {
|
|
4284
|
-
this.notificationService.toastWarn("A edição dessa linha esta desabilitada");
|
|
4285
|
-
}
|
|
4286
|
-
}
|
|
4287
|
-
},
|
|
4288
|
-
{
|
|
4289
|
-
label: 'Entrar em modo de edição', icon: 'pi pi-fw pi-pencil', command: () => {
|
|
4290
|
-
this.isEditing = true;
|
|
4291
|
-
}
|
|
4292
|
-
},
|
|
4293
|
-
{
|
|
4294
|
-
label: 'Sair do modo de edição', icon: 'pi pi-fw pi-pencil', command: () => {
|
|
4295
|
-
this.isEditing = false;
|
|
4296
|
-
if (this.itemsParaSalvamento.length > 0)
|
|
4297
|
-
this.onRowEditSave();
|
|
4298
|
-
}
|
|
4299
|
-
},
|
|
4300
|
-
];
|
|
4301
|
-
// Subscreve-se ao sujeito onSaveTimer$
|
|
4302
|
-
}
|
|
4303
|
-
ngOnDestroy() {
|
|
4304
|
-
// Completa o sujeito onDestroy$
|
|
4305
|
-
this.onDestroy$.next();
|
|
4306
|
-
this.onDestroy$.complete();
|
|
4307
|
-
// Se houver um temporizador em execução, pare-o
|
|
4308
|
-
if (this.timerSubscription) {
|
|
4309
|
-
this.timerSubscription.unsubscribe();
|
|
4310
|
-
// Após parar o temporizador, chame onSave diretamente para salvar os dados
|
|
4311
|
-
this.onRowEditSave();
|
|
4312
|
-
}
|
|
4313
|
-
}
|
|
4314
|
-
ngDoCheck() {
|
|
4315
|
-
this.items[0].visible = this.editMode == 'row' && !this.selectedProduct.editing && this.isEditableTable() !== false;
|
|
4316
|
-
this.items[1].visible = this.editMode == 'row' && this.selectedProduct.editing && this.isEditableTable() !== false;
|
|
4317
|
-
this.items[2].visible = this.editMode == 'row' && this.selectedProduct.editing && this.isEditableTable() !== false;
|
|
4318
|
-
this.items[3].visible = this.editMode == 'cell' && !this.isEditing;
|
|
4319
|
-
this.items[4].visible = this.editMode == 'cell' && this.isEditing;
|
|
4320
|
-
}
|
|
4321
|
-
dbClickEdit() {
|
|
4322
|
-
const element = document.getElementById('rowEdit' + this.selectedItem[this.config.dataKey]);
|
|
4323
|
-
if (element) {
|
|
4324
|
-
element.click();
|
|
4325
|
-
}
|
|
4326
|
-
else {
|
|
4327
|
-
if (this.editMode == 'row')
|
|
4328
|
-
this.notificationService.toastWarn("A edição dessa linha esta desabilitada");
|
|
4329
|
-
}
|
|
4330
|
-
}
|
|
4331
|
-
isRowSelectable(event) {
|
|
4332
|
-
return !this.isDisabledCheckbox(event.data);
|
|
4333
|
-
}
|
|
4334
|
-
ngOnChanges(changes) {
|
|
4335
|
-
//Called before any other lifecycle hook. Use it to inject dependencies, but avoid any serious work here.
|
|
4336
|
-
//Add '${implements OnChanges}' to the class.
|
|
4337
|
-
if (changes['setConfig'] && this.config) {
|
|
4338
|
-
this.config.columns.forEach((e) => {
|
|
4339
|
-
if (e.fieldControlType == 'dropdown') {
|
|
4340
|
-
this.listarDrop(e.fieldDropDownControl?.fieldControlDropdownService, e);
|
|
4341
|
-
}
|
|
4342
|
-
});
|
|
4343
|
-
}
|
|
4344
|
-
}
|
|
4345
|
-
onRowEditInit(rowData) {
|
|
4346
|
-
this.clonedDataSource[rowData.id] = { ...rowData };
|
|
4347
|
-
}
|
|
4348
|
-
onEditInit(event1) {
|
|
4349
|
-
if (this.isEditing)
|
|
4350
|
-
this.itemInitialState = { ...event1.data };
|
|
4351
|
-
}
|
|
4352
|
-
onEditComplete(event) {
|
|
4353
|
-
if (this.isEditing) {
|
|
4354
|
-
//Verificamos se e o prmeiro item ou se o novo item ainda e do mesmo objeto. Alem disso verificamos se o campo foi realmente alterado abaixo
|
|
4355
|
-
if (this.itemsParaSalvamento.length === 0 ||
|
|
4356
|
-
this.itemsParaSalvamento[this.itemsParaSalvamento.length - 1].index === event.index) {
|
|
4357
|
-
if (event.data[event.field] != this.itemInitialState[event.field]) {
|
|
4358
|
-
this.adicionarCelulaParaSalvar(event);
|
|
4359
|
-
}
|
|
4360
|
-
}
|
|
4361
|
-
else {
|
|
4362
|
-
// Se o último item editado não for da mesma linha, emita o evento onSave e adicione o item atual para salvar
|
|
4363
|
-
this.onRowEditSave();
|
|
4364
|
-
this.adicionarCelulaParaSalvar(event);
|
|
4365
|
-
}
|
|
4366
|
-
}
|
|
4367
|
-
}
|
|
4368
|
-
adicionarCelulaParaSalvar(item) {
|
|
4369
|
-
// Adiciona os dados editados ao array para salvamento
|
|
4370
|
-
this.itemsParaSalvamento.push(item);
|
|
4371
|
-
// Se houver um temporizador em execução, limpe-o e reinicie
|
|
4372
|
-
if (this.timerSubscription) {
|
|
4373
|
-
this.timerSubscription.unsubscribe();
|
|
4374
|
-
}
|
|
4375
|
-
// Inicia o temporizador para emitir onSave após 5 segundos
|
|
4376
|
-
this.timerSubscription = timer(5000).subscribe(() => {
|
|
4377
|
-
this.onSaveTimer$.next(); // Emita onSave após 5 segundos
|
|
4378
|
-
});
|
|
4379
|
-
}
|
|
4380
|
-
onRowEditSave() {
|
|
4381
|
-
const objetoRefletido = { ...this.itemsParaSalvamento[0].data };
|
|
4382
|
-
// Reflete as alterações em um objeto
|
|
4383
|
-
this.itemsParaSalvamento.forEach(item => {
|
|
4384
|
-
const chave = item.field;
|
|
4385
|
-
const valor = item.data[chave];
|
|
4386
|
-
objetoRefletido[chave] = valor;
|
|
4387
|
-
});
|
|
4388
|
-
this.onSave.emit(objetoRefletido);
|
|
4389
|
-
this.itemsParaSalvamento = [];
|
|
4390
|
-
}
|
|
4391
|
-
// onRowEditSave(rowData: any, index?: any) {
|
|
4392
|
-
// let errors = []
|
|
4393
|
-
// //Validação do formulario fake
|
|
4394
|
-
// this.config.columns.forEach((col: TableEditConfigColumn) => {
|
|
4395
|
-
// if (col.required ?? true) {
|
|
4396
|
-
// if (!rowData[col.field])
|
|
4397
|
-
// this.notificationService.toastWarn(`O campo ${col.header} e obrigatório! `)
|
|
4398
|
-
// }
|
|
4399
|
-
// if (col.validator) {
|
|
4400
|
-
// const tempFormControl = new FormControl(rowData[col.field], col.validator as ValidatorFn);
|
|
4401
|
-
// tempFormControl.markAllAsTouched()
|
|
4402
|
-
// tempFormControl.valid
|
|
4403
|
-
// if (tempFormControl.invalid) {
|
|
4404
|
-
// this.notificationService.toastWarn(`Erro ao validar dados do campo: ${col.header}! `)
|
|
4405
|
-
// errors.push({ erro: "Campo invalido", campo: rowData[col.field] })
|
|
4406
|
-
// }
|
|
4407
|
-
// }
|
|
4408
|
-
// })
|
|
4409
|
-
// if (errors.length == 0) {
|
|
4410
|
-
// this.onRowSave.emit(rowData)
|
|
4411
|
-
// delete this.clonedDataSource[rowData.id as string];
|
|
4412
|
-
// } else {
|
|
4413
|
-
// this.notificationService.toastWarn(`Erro de validação de dados! `)
|
|
4414
|
-
// // this.onRowEditCancel(rowData, index)
|
|
4415
|
-
// // this.onRowEditInit(rowData)
|
|
4416
|
-
// this.dataSource[index] = this.clonedDataSource[rowData.id as string];
|
|
4417
|
-
// delete this.clonedDataSource[rowData.id as string];
|
|
4418
|
-
// }
|
|
4419
|
-
// }
|
|
4420
|
-
onRowEditCancel(product, index) {
|
|
4421
|
-
this.dataSource[index] = this.clonedDataSource[product.id];
|
|
4422
|
-
delete this.clonedDataSource[product.id];
|
|
4423
|
-
}
|
|
4424
|
-
async listarDrop(service, col, indtodos) {
|
|
4425
|
-
const column = this.config.columns?.indexOf(col);
|
|
4426
|
-
if (!col.fieldDropDownControl.fieldControlDropdownSource)
|
|
4427
|
-
await service.Listar(indtodos || '').subscribe({
|
|
4428
|
-
next: (data) => {
|
|
4429
|
-
if (column) {
|
|
4430
|
-
if (this.config && this.config.columns && column !== undefined) {
|
|
4431
|
-
// @ts-ignore
|
|
4432
|
-
this.config.columns[column].fieldDropDownControl.fieldControlDropdownSource = data;
|
|
4433
|
-
}
|
|
4434
|
-
return this.config.columns[column].fieldDropDownControl?.fieldControlDropdownSource;
|
|
4435
|
-
}
|
|
4436
|
-
}
|
|
4437
|
-
});
|
|
4438
|
-
else
|
|
4439
|
-
return this.config.columns[column].fieldDropDownControl?.fieldControlDropdownSource;
|
|
4440
|
-
}
|
|
4441
|
-
retornaDescricaoDrop(rowData, col) {
|
|
4442
|
-
const data = col.fieldDropDownControl?.fieldControlDropdownSource;
|
|
4443
|
-
const idobjeto = col.fieldDropDownControl?.idobjeto;
|
|
4444
|
-
const descricaoobjeto = col.fieldDropDownControl?.descricaoobjeto;
|
|
4445
|
-
// @ts-ignore
|
|
4446
|
-
const valorAtual = rowData[col.field];
|
|
4447
|
-
if (data && idobjeto && descricaoobjeto)
|
|
4448
|
-
return data?.find((item) => item[idobjeto] == valorAtual)[descricaoobjeto];
|
|
4449
|
-
else
|
|
4450
|
-
return 'Carregando';
|
|
4451
|
-
}
|
|
4452
|
-
onGlobalFilter(table, event) {
|
|
4453
|
-
this.onFilter.emit(event.target.value);
|
|
4454
|
-
table.filterGlobal(event.target.value, 'contains');
|
|
4455
|
-
}
|
|
4456
|
-
onWindowResize() {
|
|
4457
|
-
this.adjustTableSize();
|
|
4458
|
-
this.tamanhoTela = window.innerWidth;
|
|
4459
|
-
}
|
|
4460
|
-
adjustTableSize() {
|
|
4461
|
-
if (this.tableSize < 800) {
|
|
4462
|
-
this.selectedSize = 'p-datatable-sm';
|
|
4463
|
-
}
|
|
4464
|
-
else {
|
|
4465
|
-
this.selectedSize = '';
|
|
4466
|
-
}
|
|
4467
|
-
}
|
|
4468
|
-
paginate($event) {
|
|
4469
|
-
if ($event) {
|
|
4470
|
-
let paginaInicial = ($event?.first > 0 ? $event.first / $event.rows : $event.first) + 1;
|
|
4471
|
-
let termoPesquisa = '';
|
|
4472
|
-
let ordenacao = '';
|
|
4473
|
-
if ($event.globalFilter)
|
|
4474
|
-
termoPesquisa = $event.globalFilter;
|
|
4475
|
-
if ($event.sortField)
|
|
4476
|
-
ordenacao = `${$event.sortField} ${$event.sortOrder === 1 ? 'ASC' : 'DESC'}`;
|
|
4477
|
-
const objeto = {
|
|
4478
|
-
paginaInicial: paginaInicial,
|
|
4479
|
-
tamanhoPagina: $event.rows,
|
|
4480
|
-
termoPesquisa: termoPesquisa,
|
|
4481
|
-
ordenacao: ordenacao,
|
|
4482
|
-
};
|
|
4483
|
-
this.onPaginate.emit(objeto);
|
|
4484
|
-
}
|
|
4485
|
-
}
|
|
4486
|
-
isBooleanField(rowData, col) {
|
|
4487
|
-
return col.fieldType == 'boolean';
|
|
4488
|
-
}
|
|
4489
|
-
isChipField(col) {
|
|
4490
|
-
return col.fieldType == 'chip';
|
|
4491
|
-
}
|
|
4492
|
-
isImageField(col) {
|
|
4493
|
-
let retorno = col.fieldType && col.fieldType === 'image' ? true : false;
|
|
4494
|
-
return retorno;
|
|
4495
|
-
}
|
|
4496
|
-
returnRowClass(rowData, col) {
|
|
4497
|
-
let value = rowData[col.field];
|
|
4498
|
-
let rowClass;
|
|
4499
|
-
this.tableSize > 800 ? (rowClass = 'text-base') : (rowClass = '');
|
|
4500
|
-
if (col.expiredDate == true) {
|
|
4501
|
-
new Date(value) < new Date()
|
|
4502
|
-
? (rowClass = rowClass + ' text-red-400 font-semibold')
|
|
4503
|
-
: '';
|
|
4504
|
-
}
|
|
4505
|
-
return rowClass;
|
|
4506
|
-
}
|
|
4507
|
-
transformValue(rowData, col) {
|
|
4508
|
-
let value = rowData[col.field];
|
|
4509
|
-
if (value != null) {
|
|
4510
|
-
if (!col.pipe) {
|
|
4511
|
-
return value;
|
|
4512
|
-
}
|
|
4513
|
-
switch (col.pipe) {
|
|
4514
|
-
case 'date':
|
|
4515
|
-
return this.datePipe.transform(value, 'dd/MM/yyyy');
|
|
4516
|
-
case 'decimal':
|
|
4517
|
-
return this.decimalPipe.transform(value, '1.2-2', 'pt-BR');
|
|
4518
|
-
case 'cpfcnpj':
|
|
4519
|
-
return this.cpfCnpjPipe.transform(value);
|
|
4520
|
-
case 'telefone':
|
|
4521
|
-
return this.telefonePipe.transform(value);
|
|
4522
|
-
case 'capitalize':
|
|
4523
|
-
return this.capitalizePipe.transform(value);
|
|
4524
|
-
case 'money':
|
|
4525
|
-
return this.formatarValor(value);
|
|
4526
|
-
case 'percentage':
|
|
4527
|
-
return `${value} %`;
|
|
4528
|
-
default:
|
|
4529
|
-
break;
|
|
4530
|
-
}
|
|
4531
|
-
}
|
|
4532
|
-
}
|
|
4533
|
-
alignColunasHeader(col) {
|
|
4534
|
-
if (col.align) {
|
|
4535
|
-
if (col.align == 'right')
|
|
4536
|
-
return 'justify-content: end';
|
|
4537
|
-
else
|
|
4538
|
-
return '';
|
|
4539
|
-
}
|
|
4540
|
-
else
|
|
4541
|
-
return '';
|
|
4542
|
-
}
|
|
4543
|
-
centralizarColunas(col) {
|
|
4544
|
-
if (col.centralize) {
|
|
4545
|
-
return 'text-align: center; ';
|
|
4546
|
-
}
|
|
4547
|
-
else
|
|
4548
|
-
return '';
|
|
4549
|
-
}
|
|
4550
|
-
alignColunas(col) {
|
|
4551
|
-
if (col.align) {
|
|
4552
|
-
return `text-align: ${col.align}`;
|
|
4553
|
-
}
|
|
4554
|
-
else
|
|
4555
|
-
return '';
|
|
4556
|
-
}
|
|
4557
|
-
returnClassIcon(rowData, col) {
|
|
4558
|
-
return this.retornarRow(rowData, col, 'iconrow');
|
|
4559
|
-
}
|
|
4560
|
-
returnTooltipIcon(rowData, col) {
|
|
4561
|
-
return this.retornarRow(rowData, col, 'tooltipiconrow');
|
|
4562
|
-
}
|
|
4563
|
-
returnClassChip(rowData, col) {
|
|
4564
|
-
return `chip-style w-auto border-round-2xl p-2 text-${this.retornarRow(rowData, col, 'stylechip')} border-${this.retornarRow(rowData, col, 'stylechip')}`;
|
|
4565
|
-
}
|
|
4566
|
-
retornarRow(rowData, col, field) {
|
|
4567
|
-
const _rowaction = this.config.rows ? this.config.rows[col.field] : null;
|
|
4568
|
-
const _field = _rowaction && _rowaction[field]
|
|
4569
|
-
? _rowaction[field].constructor === Function
|
|
4570
|
-
? _rowaction[field].apply(this, [rowData])
|
|
4571
|
-
: _rowaction[field]
|
|
4572
|
-
: null;
|
|
4573
|
-
return _field;
|
|
4505
|
+
this.selectedSize = { label: 'Large', class: 'p-datatable-lg', size: 1.17 };
|
|
4506
|
+
}
|
|
4507
|
+
},
|
|
4508
|
+
// { name: 'Small', class: 'p-datatable-sm', size: 0.83 },
|
|
4509
|
+
// { name: 'Normal', class: 'p-datatable-md', size: 1 },
|
|
4510
|
+
// { name: 'Large', class: 'p-datatable-lg', size: 1.17 }
|
|
4511
|
+
];
|
|
4512
|
+
this.onSaveTimer$ = new Subject(); // Sujeito para controlar o temporizador
|
|
4513
|
+
this.onDestroy$ = new Subject();
|
|
4514
|
+
this.isRowSelectable = this.isRowSelectable.bind(this);
|
|
4574
4515
|
}
|
|
4575
|
-
|
|
4576
|
-
|
|
4516
|
+
getOrExecute(action, data) {
|
|
4517
|
+
return getOrExecute(action, data);
|
|
4577
4518
|
}
|
|
4578
|
-
|
|
4579
|
-
|
|
4580
|
-
|
|
4581
|
-
|
|
4519
|
+
ngOnInit() {
|
|
4520
|
+
super.ngOnInit();
|
|
4521
|
+
this.onSaveTimer$.pipe(takeUntil(this.onDestroy$)).subscribe(() => {
|
|
4522
|
+
// Quando o temporizador terminar, emita o evento onSave com os dados a serem salvos
|
|
4523
|
+
this.onRowEditSave();
|
|
4582
4524
|
});
|
|
4583
|
-
|
|
4525
|
+
this.tamanhoTela = window.innerWidth;
|
|
4526
|
+
this.itemsContextMenu = [
|
|
4527
|
+
{
|
|
4528
|
+
label: 'Editar linha', icon: 'pi pi-fw pi-pencil', command: () => {
|
|
4529
|
+
const element = document.getElementById('rowEdit' + this.selectedProduct.rowData[this.config.dataKey]);
|
|
4530
|
+
if (element && !this.config.disableEditRowFunction?.(this.selectedProduct.rowData)) {
|
|
4531
|
+
element.click();
|
|
4532
|
+
}
|
|
4533
|
+
else {
|
|
4534
|
+
this.notificationService.toastWarn("A edição dessa linha esta desabilitada");
|
|
4535
|
+
}
|
|
4536
|
+
this.onRowEditInit(this.selectedProduct);
|
|
4537
|
+
}
|
|
4538
|
+
},
|
|
4539
|
+
{
|
|
4540
|
+
label: 'Cancelar edição', icon: 'pi pi-fw pi-times', command: (data) => {
|
|
4541
|
+
const element = document.getElementById('rowCancel' + this.selectedProduct.rowData[this.config.dataKey]);
|
|
4542
|
+
if (element) {
|
|
4543
|
+
element.click();
|
|
4544
|
+
}
|
|
4545
|
+
else {
|
|
4546
|
+
this.notificationService.toastWarn("A edição dessa linha esta desabilitada");
|
|
4547
|
+
}
|
|
4548
|
+
}
|
|
4549
|
+
},
|
|
4550
|
+
{
|
|
4551
|
+
label: 'Salvar edição', icon: 'pi pi-fw pi-save', command: (data) => {
|
|
4552
|
+
const element = document.getElementById('rowSave' + this.selectedProduct.rowData[this.config.dataKey]);
|
|
4553
|
+
if (element) {
|
|
4554
|
+
element.click(); // Dispara um evento de clique no elemento com ID 'teste'
|
|
4555
|
+
}
|
|
4556
|
+
else {
|
|
4557
|
+
this.notificationService.toastWarn("A edição dessa linha esta desabilitada");
|
|
4558
|
+
}
|
|
4559
|
+
}
|
|
4560
|
+
},
|
|
4561
|
+
{
|
|
4562
|
+
label: 'Entrar em modo de edição', icon: 'pi pi-fw pi-pencil', command: () => {
|
|
4563
|
+
this.isEditing = true;
|
|
4564
|
+
}
|
|
4565
|
+
},
|
|
4566
|
+
{
|
|
4567
|
+
label: 'Sair do modo de edição', icon: 'pi pi-fw pi-pencil', command: () => {
|
|
4568
|
+
this.isEditing = false;
|
|
4569
|
+
if (this.itemsParaSalvamento.length > 0)
|
|
4570
|
+
this.onRowEditSave();
|
|
4571
|
+
}
|
|
4572
|
+
},
|
|
4573
|
+
];
|
|
4574
|
+
// Subscreve-se ao sujeito onSaveTimer$
|
|
4584
4575
|
}
|
|
4585
|
-
|
|
4586
|
-
|
|
4587
|
-
|
|
4588
|
-
|
|
4589
|
-
|
|
4590
|
-
if (
|
|
4591
|
-
|
|
4592
|
-
|
|
4593
|
-
|
|
4594
|
-
retorno = `data:image/jpg;base64, ${rowData[col.field]}`;
|
|
4576
|
+
ngOnDestroy() {
|
|
4577
|
+
// Completa o sujeito onDestroy$
|
|
4578
|
+
this.onDestroy$.next();
|
|
4579
|
+
this.onDestroy$.complete();
|
|
4580
|
+
// Se houver um temporizador em execução, pare-o
|
|
4581
|
+
if (this.timerSubscription) {
|
|
4582
|
+
this.timerSubscription.unsubscribe();
|
|
4583
|
+
// Após parar o temporizador, chame onSave diretamente para salvar os dados
|
|
4584
|
+
this.onRowEditSave();
|
|
4595
4585
|
}
|
|
4596
|
-
return retorno;
|
|
4597
4586
|
}
|
|
4598
|
-
|
|
4599
|
-
|
|
4587
|
+
ngDoCheck() {
|
|
4588
|
+
this.itemsContextMenu[0].visible = this.editMode == 'row' && !this.selectedProduct.editing && this.isEditableTable() !== false;
|
|
4589
|
+
this.itemsContextMenu[1].visible = this.editMode == 'row' && this.selectedProduct.editing && this.isEditableTable() !== false;
|
|
4590
|
+
this.itemsContextMenu[2].visible = this.editMode == 'row' && this.selectedProduct.editing && this.isEditableTable() !== false;
|
|
4591
|
+
this.itemsContextMenu[3].visible = this.editMode == 'cell' && !this.isEditing;
|
|
4592
|
+
this.itemsContextMenu[4].visible = this.editMode == 'cell' && this.isEditing;
|
|
4600
4593
|
}
|
|
4601
|
-
|
|
4602
|
-
|
|
4603
|
-
|
|
4594
|
+
dbClickEdit() {
|
|
4595
|
+
const element = document.getElementById('rowEdit' + this.selectedItem[this.config.dataKey]);
|
|
4596
|
+
if (element) {
|
|
4597
|
+
element.click();
|
|
4598
|
+
}
|
|
4599
|
+
else {
|
|
4600
|
+
if (this.editMode == 'row')
|
|
4601
|
+
this.notificationService.toastWarn("A edição dessa linha esta desabilitada");
|
|
4602
|
+
}
|
|
4604
4603
|
}
|
|
4605
|
-
|
|
4606
|
-
this.
|
|
4607
|
-
this.onActiveItem.emit({ rowData: rowData });
|
|
4604
|
+
isRowSelectable(event) {
|
|
4605
|
+
return !this.isDisabledCheckbox(event.data);
|
|
4608
4606
|
}
|
|
4609
|
-
|
|
4610
|
-
|
|
4607
|
+
ngOnChanges(changes) {
|
|
4608
|
+
//Called before any other lifecycle hook. Use it to inject dependencies, but avoid any serious work here.
|
|
4609
|
+
//Add '${implements OnChanges}' to the class.
|
|
4610
|
+
if (changes['setConfig'] && this.config) {
|
|
4611
|
+
this.config.columns.forEach((e) => {
|
|
4612
|
+
if (e.fieldControlType == 'dropdown') {
|
|
4613
|
+
this.listarDrop(e.fieldDropDownControl?.fieldControlDropdownService, e);
|
|
4614
|
+
}
|
|
4615
|
+
});
|
|
4616
|
+
}
|
|
4611
4617
|
}
|
|
4612
4618
|
criarMenusModal(data) {
|
|
4613
4619
|
if (this.config.actions && data) {
|
|
@@ -4633,31 +4639,70 @@ class KvTableEditComponent {
|
|
|
4633
4639
|
}
|
|
4634
4640
|
}
|
|
4635
4641
|
}
|
|
4636
|
-
|
|
4637
|
-
|
|
4638
|
-
let array = [];
|
|
4639
|
-
e.target.classList.forEach((x) => array.push(x));
|
|
4640
|
-
//if (array.find((x: any) => x == 'ng-star-inserted') != undefined)
|
|
4641
|
-
this.doubleClickEvent.emit(eventDoubleClick);
|
|
4642
|
+
onRowEditInit(rowData) {
|
|
4643
|
+
this.clonedDataSource[rowData.id] = { ...rowData };
|
|
4642
4644
|
}
|
|
4643
|
-
|
|
4644
|
-
|
|
4645
|
-
|
|
4646
|
-
: false;
|
|
4645
|
+
onEditInit(event1) {
|
|
4646
|
+
if (this.isEditing)
|
|
4647
|
+
this.itemInitialState = { ...event1.data };
|
|
4647
4648
|
}
|
|
4648
|
-
|
|
4649
|
-
|
|
4649
|
+
onEditComplete(event) {
|
|
4650
|
+
if (this.isEditing) {
|
|
4651
|
+
//Verificamos se e o prmeiro item ou se o novo item ainda e do mesmo objeto. Alem disso verificamos se o campo foi realmente alterado abaixo
|
|
4652
|
+
if (this.itemsParaSalvamento.length === 0 ||
|
|
4653
|
+
this.itemsParaSalvamento[this.itemsParaSalvamento.length - 1].index === event.index) {
|
|
4654
|
+
if (event.data[event.field] != this.itemInitialState[event.field]) {
|
|
4655
|
+
this.adicionarCelulaParaSalvar(event);
|
|
4656
|
+
}
|
|
4657
|
+
}
|
|
4658
|
+
else {
|
|
4659
|
+
// Se o último item editado não for da mesma linha, emita o evento onSave e adicione o item atual para salvar
|
|
4660
|
+
this.onRowEditSave();
|
|
4661
|
+
this.adicionarCelulaParaSalvar(event);
|
|
4662
|
+
}
|
|
4663
|
+
}
|
|
4650
4664
|
}
|
|
4651
|
-
|
|
4652
|
-
|
|
4653
|
-
|
|
4665
|
+
adicionarCelulaParaSalvar(item) {
|
|
4666
|
+
// Adiciona os dados editados ao array para salvamento
|
|
4667
|
+
this.itemsParaSalvamento.push(item);
|
|
4668
|
+
// Se houver um temporizador em execução, limpe-o e reinicie
|
|
4669
|
+
if (this.timerSubscription) {
|
|
4670
|
+
this.timerSubscription.unsubscribe();
|
|
4671
|
+
}
|
|
4672
|
+
// Inicia o temporizador para emitir onSave após 5 segundos
|
|
4673
|
+
this.timerSubscription = timer(5000).subscribe(() => {
|
|
4674
|
+
this.onSaveTimer$.next(); // Emita onSave após 5 segundos
|
|
4675
|
+
});
|
|
4654
4676
|
}
|
|
4655
|
-
|
|
4656
|
-
this.
|
|
4657
|
-
|
|
4658
|
-
|
|
4659
|
-
|
|
4677
|
+
onRowEditSave() {
|
|
4678
|
+
const objetoRefletido = { ...this.itemsParaSalvamento[0].data };
|
|
4679
|
+
// Reflete as alterações em um objeto
|
|
4680
|
+
this.itemsParaSalvamento.forEach(item => {
|
|
4681
|
+
const chave = item.field;
|
|
4682
|
+
const valor = item.data[chave];
|
|
4683
|
+
objetoRefletido[chave] = valor;
|
|
4660
4684
|
});
|
|
4685
|
+
this.onSave.emit(objetoRefletido);
|
|
4686
|
+
this.itemsParaSalvamento = [];
|
|
4687
|
+
}
|
|
4688
|
+
onRowEditCancel(product, index) {
|
|
4689
|
+
this.dataSource[index] = this.clonedDataSource[product.id];
|
|
4690
|
+
delete this.clonedDataSource[product.id];
|
|
4691
|
+
}
|
|
4692
|
+
listarDrop(service, col, indtodos) {
|
|
4693
|
+
const column = this.config.columns?.indexOf(col);
|
|
4694
|
+
return this.config.columns[column].fieldDropDownControl?.fieldControlDropdownSource;
|
|
4695
|
+
}
|
|
4696
|
+
retornaDescricaoDrop(rowData, col) {
|
|
4697
|
+
const data = col.fieldDropDownControl?.fieldControlDropdownSource;
|
|
4698
|
+
const idobjeto = col.fieldDropDownControl?.idobjeto;
|
|
4699
|
+
const descricaoobjeto = col.fieldDropDownControl?.descricaoobjeto;
|
|
4700
|
+
// @ts-ignore
|
|
4701
|
+
const valorAtual = rowData[col.field];
|
|
4702
|
+
if (data && idobjeto && descricaoobjeto)
|
|
4703
|
+
return data?.find((item) => item[idobjeto] == valorAtual)[descricaoobjeto];
|
|
4704
|
+
else
|
|
4705
|
+
return 'Carregando';
|
|
4661
4706
|
}
|
|
4662
4707
|
isDisableEditRowFunction(rowData) {
|
|
4663
4708
|
return this.config.disableEditRowFunction ? this.config.disableEditRowFunction(rowData) : false;
|
|
@@ -4670,77 +4715,20 @@ class KvTableEditComponent {
|
|
|
4670
4715
|
return null;
|
|
4671
4716
|
return this.config.columns.some((column) => 'fieldControlType' in column);
|
|
4672
4717
|
}
|
|
4673
|
-
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:
|
|
4674
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.8", type: KvTableEditComponent, selector: "kv-table-edit", inputs: { setConfig: ["config", "setConfig"], dataSource: "dataSource", selectedItems: "selectedItems", totalRecords: "totalRecords", paginator: "paginator", rowsPerPageOptions: "rowsPerPageOptions", rows: "rows", pageLinksOptions: "pageLinksOptions", showFirstLastIcon: "showFirstLastIcon", tableSize: "tableSize", applyStyle: "applyStyle", filterColumnsBtn: "filterColumnsBtn", filtrosAvancados: "filtrosAvancados", scrollHeight: "scrollHeight", isTableScrollable: "isTableScrollable", rowTrackBy: "rowTrackBy", responsiveLayout: "responsiveLayout", tamanhoTotalTabela: "tamanhoTotalTabela", editMode: "editMode", enableSizes: "enableSizes", _templates: ["templates", "_templates"] }, outputs: { onSave: "onSave", onActiveItem: "onActiveItem", onActiveItemLote: "onActiveItemLote", onPaginate: "onPaginate", onSelectionChange: "onSelectionChange", doubleClickEvent: "doubleClickEvent", filterField: "filterField", onSwitchTableChange: "onSwitchTableChange", onFilter: "onFilter" }, host: { listeners: { "window:resize": "onWindowResize($event)" } }, usesOnChanges: true, ngImport: i0, template: "<div class=\"card\" id=\"tamanhotabela\" [style.font-size]=\"'1px'\">\r\n <p-toast></p-toast>\r\n\r\n <p-panel\r\n *ngIf=\"filtrosAvancados\"\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 <i\r\n *ngIf=\"!collapsed\"\r\n class=\"pi pi-filter\"\r\n ></i>\r\n <!-- \u00CDcone quando o painel est\u00E1 aberto -->\r\n <i\r\n *ngIf=\"collapsed\"\r\n class=\"pi pi-minus\"\r\n ></i>\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 <p-contextMenu #cm [model]=\"items\"></p-contextMenu>\r\n <p-table\r\n #te\r\n\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\r\n <ng-template\r\n pTemplate=\"caption\"\r\n *ngIf=\"config.enableCation || enableSizes\"\r\n >\r\n <div class=\"flex flex-row flex-wrap justify-content-between align-items-center grid formgrid p-fluid col-12\">\r\n <div class=\"col-12 flex flex-column\">\r\n <div\r\n *ngIf=\"config.title\"\r\n class=\"text-md font-bold my-3\"\r\n >\r\n {{ config.title }}\r\n </div>\r\n <div\r\n *ngIf=\"config.subtitle\"\r\n class=\"text-sm mb-4 font-medium\"\r\n >\r\n {{ config.subtitle }}\r\n </div>\r\n </div>\r\n\r\n <div class=\"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 <span\r\n *ngIf=\"config.enableFilter\"\r\n class=\"p-input-icon-left\"\r\n >\r\n <i class=\"pi pi-search\"></i>\r\n\r\n <input\r\n pInputText\r\n pAutoFocus\r\n [autofocus]=\"true\"\r\n type=\"text\"\r\n (input)=\"onGlobalFilter(te, $event)\"\r\n placeholder=\"Pesquisar...\"\r\n class=\"h-2rem\"\r\n />\r\n </span>\r\n\r\n\r\n <!-- FIXME: Op\u00E7\u00E3o 1 -->\r\n <!-- <div class=\"sizes-controls ml-2\" *ngIf=\"isShowSizes\">\r\n <p-selectButton\r\n [options]=\"sizes\"\r\n [(ngModel)]=\"selectedSize\"\r\n [style]=\"{'display': 'flex'}\"\r\n optionLabel=\"name\"\r\n />\r\n </div>\r\n <button\r\n id=\"btn-sizes\"\r\n pButton\r\n [pTooltip]=\"isShowSizes ? 'Esconder controles de tamanho' : 'Mostrar controles de tamanho'\"\r\n class=\"actionLoteBtns p-button-raised p-button-text\"\r\n (click)=\"isShowSizes = !isShowSizes\"\r\n >\r\n <span style=\"font-size: 0.8rem;\" class=\"flex align-items-end\">\r\n <span style=\"font-size: 0.7rem;\">\r\n A\r\n </span>\r\n A\r\n </span>\r\n </button> -->\r\n\r\n <!-- FIXME: Op\u00E7\u00E3o 2 -->\r\n <div *ngIf=\"enableSizes\" class=\"sizes-controls ml-2\" >\r\n <p-splitButton\r\n label=\"aA\"\r\n [model]=\"sizes\"\r\n styleClass=\"teste\"\r\n [menuStyle]=\"{'font-size': '0.7rem'}\"\r\n\r\n ngModel\r\n >\r\n </p-splitButton>\r\n </div>\r\n\r\n <!-- FIXME: Op\u00E7\u00E3o 3 -->\r\n <!-- <div class=\"sizes-controls ml-2\" style=\"transform: translate(0px, -15px);\" >\r\n <p-speedDial\r\n [model]=\"sizes\"\r\n showIcon=\"format_size\"\r\n hideIcon=\"format_size\"\r\n radius=\"120\"\r\n direction=\"down-right\"\r\n type=\"quarter-circle\"\r\n buttonClassName=\"item-circle\"\r\n >\r\n\r\n <ng-template pTemplate=\"button\">\r\n <span class=\"material-symbols-outlined\">\r\n format_size\r\n </span>\r\n </ng-template>\r\n\r\n\r\n <ng-template let-item pTemplate=\"item\">\r\n <div class=\"item-circle\">\r\n {{item.label}}\r\n </div>\r\n </ng-template>\r\n\r\n </p-speedDial>\r\n </div> -->\r\n\r\n\r\n </div>\r\n\r\n <span *ngIf=\"isEditing\" class=\"text-aviso\">\r\n\r\n Tabela em modo de edi\u00E7\u00E3o\r\n\r\n </span>\r\n\r\n\r\n <div class=\"flex flex-row col-1 justify-content-end\">\r\n\r\n\r\n <div\r\n *ngFor=\"let action of config.actionsLote\"\r\n class=\"btns-options\"\r\n [style]=\"{ 'margin-right': '7px' }\"\r\n >\r\n <button\r\n id=\"actionLoteBtns\"\r\n pButton\r\n *ngIf=\"\r\n !isEditing &&\r\n (selectedItems.length > 0 || action.showAcoesLote) &&\r\n exibirCampo(action, this.action)\r\n \"\r\n class=\"actionLoteBtns p-button-raised p-button-text\"\r\n style=\"background-color: #1DA750\"\r\n (click)=\"\r\n action?.command(); activeItemLote(selectedItems)\r\n \"\r\n [pTooltip]=\"getOrExecute(action.tooltip, selectedItems)\"\r\n [tooltipPosition]=\"'bottom'\"\r\n [disabled]=\"getOrExecute(action.disabled, selectedItems)\"\r\n >\r\n <span\r\n class=\"material-symbols-outlined md-22\" style=\"color: white\"\r\n >\r\n {{ getOrExecute(action.icon, selectedItems) }}\r\n </span>\r\n </button>\r\n </div>\r\n\r\n <div *ngIf=\"isEditableTable()\" class=\"btns-options\"\r\n [style]=\"{ 'margin-right': '7px' }\"\r\n >\r\n <button\r\n (click)=\"this.isEditing = !this.isEditing\"\r\n id=\"actionLoteBtns\"\r\n pButton\r\n class=\"actionLoteBtns p-button-raised p-button-text\"\r\n >\r\n <span class=\"material-symbols-outlined\">\r\n edit_square\r\n </span>\r\n </button>\r\n </div>\r\n\r\n </div>\r\n\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template\r\n pTemplate=\"header\"\r\n let-columns\r\n >\r\n <tr>\r\n <th\r\n style=\"width: 4rem; border-left: solid 4px transparent\"\r\n *ngIf=\"config.enableSelect && !isEditing\"\r\n [class]=\"selectedSize.class+'th'\"\r\n >\r\n <p-tableHeaderCheckbox (click)=\"activeItemLote(selectedItems)\"></p-tableHeaderCheckbox>\r\n </th>\r\n\r\n <th\r\n *ngFor=\"let col of columns\"\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 <div\r\n [class]=\"\r\n centralizarColunas(col) && alignColunasHeader(col) == ''\r\n ? 'flex flex-row justify-content-center'\r\n : 'flex flex-row'\r\n \"\r\n [style]=\"alignColunasHeader(col)\"\r\n >\r\n <span>{{ col.header }}</span>\r\n <p-sortIcon\r\n *ngIf=\"col.sortable === true\"\r\n [field]=\"col.field\"\r\n style=\"font-size: 10px\"\r\n ></p-sortIcon>\r\n\r\n <span\r\n *ngIf=\"col.headerTooltip\"\r\n class=\"material-symbols-outlined flex align-items-center\"\r\n [pTooltip]=\"col.headerTooltip\"\r\n >info</span>\r\n </div>\r\n </th>\r\n <th *ngIf=\"!isEditing && config.actions && config.actions.length > 0\"></th>\r\n <th *ngIf=\"isEditableTable() && this.editMode == 'row'\" id=\"th-edit\" style=\"width: 20px\">Editar</th>\r\n </tr>\r\n </ng-template>\r\n\r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n\r\n <ng-template pTemplate=\"body\" let-rowData let-editing=\"editing\" let-ri=\"rowIndex\" let-columns=\"columns\"\r\n let-rowgroup=\"rowgroup\" let-rowspan=\"rowspan\">\r\n <tr [pEditableRow]=\"rowData\" [pEditableRowDisabled]=\"false\"\r\n [pContextMenuRow]=\"{rowData, editing}\"\r\n [class]=\"selectedSize.class+'-tr'\"\r\n >\r\n\r\n <td\r\n\r\n *ngIf=\"config.enableSelect && !isEditing\"\r\n [style]=\"applyStyle(rowData, { field: 'check-box', header: '' })\"\r\n >\r\n <!--<p-tableCheckbox *ngIf=\"isVisibleCheckbox(rowData)\"-->\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 <ng-container *ngFor=\"let col of columns; let i = index\">\r\n\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\r\n <ng-container *ngSwitchCase=\"'text'\">\r\n <div [style.width]=\"col.width\" class=\"grid formgrid p-fluid\" >\r\n <kv-input-text [disabled]=\"isDisableEditRowCellFunction(rowData, col)\" class=\"cellControl col\" [(ngModel)]=\"rowData[col.field]\" [required]=\"col.required ?? true\"></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 [disabled]=\"isDisableEditRowCellFunction(rowData, col)\" class=\"cellControl col\" [(ngModel)]=\"rowData[col.field]\" [required]=\"col.required ?? true\"></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 [disabled]=\"isDisableEditRowCellFunction(rowData, col)\" class=\"cellControl col\" [mask]=\"col.mask\" [required]=\"col.required ?? true\" [(ngModel)]=\"rowData[col.field]\"></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 [disabled]=\"isDisableEditRowCellFunction(rowData, col)\" class=\"cellControl col\" [(ngModel)]=\"rowData[col.field]\" ></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 [style.width]=\"col.width\" class=\"grid formgrid p-fluid\" >\r\n <kv-input-calendar class=\"cellControl col\" [(ngModel)]=\"rowData[col.field]\"></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]=\"col.fieldDropDownControl.fieldControlDropdownSource\"\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 *ngTemplateOutlet=\"templateOutput; context: { rowData: rowData, col: col }\"></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 {{\r\n retornaDescricaoDrop(\r\n rowData,\r\n col\r\n )\r\n }}\r\n <!-- {{rowData[col.field]}} -->\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'switch'\">\r\n <kv-switch [(ngModel)]=\"rowData[col.field]\" [disabled]=\"true\"></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 {{ rowData[col.field] }}\r\n </ng-container>\r\n\r\n </ng-container>\r\n </ng-template>\r\n\r\n\r\n\r\n <td\r\n *ngIf=\"editMode == 'cell' && col.fieldControlType\"\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\" [style]=\"\r\n applyStyle(rowData, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col) \"\r\n [pTooltip]=\"returnTooltipRow(rowData, col)\"\r\n\r\n >\r\n <p-cellEditor>\r\n\r\n <ng-container >\r\n\r\n <ng-template pTemplate=\"input\">\r\n <ng-container *ngTemplateOutlet=\"templateInput; context: { rowData: rowData, col: col }\"></ng-container>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"output\">\r\n <ng-container *ngTemplateOutlet=\"templateOutput; context: { rowData: rowData, col: col }\"></ng-container>\r\n </ng-template>\r\n\r\n </ng-container>\r\n\r\n\r\n\r\n\r\n <!-- <ng-template *ngIf=\"!isEditing\" pTemplate=\"input\">\r\n <ng-container *ngTemplateOutlet=\"templateInput; context: { rowData: rowData, col: col }\"></ng-container>\r\n </ng-template>\r\n\r\n <ng-template *ngIf=\"isEditing\" pTemplate=\"output\">\r\n <ng-container *ngTemplateOutlet=\"templateOutput; context: { rowData: rowData, col: col }\"></ng-container>\r\n </ng-template> -->\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 <td *ngIf=\"false && col.fieldControlType && editMode == 'row'\"\r\n [id]=\"'rowTable'+ rowData[config.dataKey]\"\r\n (click)=\"activeItem(rowData)\"\r\n (dblclick)=\"dbClickEdit()\"\r\n class=\"rowTable\" [style]=\"\r\n applyStyle(rowData, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col)\"\r\n [pTooltip]=\"returnTooltipRow(rowData, col)\"\r\n >\r\n <p-cellEditor [ngClass]=\"{'switch': col.fieldControlType == 'switch'}\">\r\n\r\n <ng-template pTemplate=\"input\">\r\n <ng-container *ngTemplateOutlet=\"templateInput; context: { rowData: rowData, col: col }\"></ng-container>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"output\">\r\n <ng-container *ngTemplateOutlet=\"templateOutput; context: { rowData: rowData, col: col }\"></ng-container>\r\n </ng-template>\r\n\r\n </p-cellEditor>\r\n </td>\r\n\r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n\r\n <td *ngIf=\"rowgroup && !col.template \" [attr.rowspan]=\"rowgroup && col.grouped ? rowspan : null\"\r\n class=\"rowTable\" [style]=\"\r\n applyStyle(rowData, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col)\r\n \" [pTooltip]=\"returnTooltipRow(rowData, col)\">\r\n <span class=\"p-column-title\">{{ col.header }}:</span>\r\n\r\n <span *ngIf=\"!isBooleanField(rowData, col); else booleanField\" [class]=\"returnRowClass(rowData, col)\">\r\n <span *ngIf=\"\r\n !isChipField(col) && !col.iconField && !isImageField(col)\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 [class]=\"returnClassChip(rowData, col)\" [pTooltip]=\"returnTooltipIcon(rowData, col)\">{{\r\n transformValue(rowData, col) }}</span>\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 *ngIf=\"col.iconField\" [ngClass]=\"{\r\n 'material-icons': col.indIconMaterial,\r\n 'material-symbols-outlined mr-2': !col.indIconMaterial\r\n }\" [pTooltip]=\"returnTooltipIcon(rowData, col)\">\r\n {{ returnClassIcon(rowData, col) }}\r\n </i>\r\n\r\n <ng-template #booleanField>\r\n <i *ngIf=\"!col.iconField && !isSwitchField(col)\" [ngClass]=\"\r\n rowData[col.field] ? 'text-green-500' : 'text-red-500'\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 *ngIf=\"isSwitchField(col)\" [class]=\"returnRowClass(rowData, col)\">\r\n <kv-switch (onSwitchChange)=\"onSwitchChange($event, rowData, col)\"\r\n [disabled]=\"col?.onlyReadField ?? true\" [switchValue]=\"transformValue(rowData, col)\">\r\n </kv-switch>\r\n </span>\r\n </ng-template>\r\n </td>\r\n\r\n <td *ngIf=\"!rowgroup && !col.grouped && !col.template && !col.fieldControlType\" [style]=\"\r\n applyStyle(rowData, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col)\r\n \" class=\"rowTable\" [pTooltip]=\"returnTooltipRow(rowData, col)\">\r\n <span class=\"p-column-title\">{{ col.header }}:</span>\r\n\r\n <span *ngIf=\"!isBooleanField(rowData, col); else booleanField\" [class]=\"returnRowClass(rowData, col)\">\r\n <span *ngIf=\"\r\n !isChipField(col) && !col.iconField && !isImageField(col)\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 [class]=\"returnClassChip(rowData, col)\" [pTooltip]=\"returnTooltipIcon(rowData, col)\">\r\n {{ transformValue(rowData, col) }}</span>\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 *ngIf=\"col.iconField\" [ngClass]=\"{\r\n 'material-icons': col.indIconMaterial,\r\n 'material-symbols-outlined mr-2': !col.indIconMaterial\r\n }\" [pTooltip]=\"returnTooltipIcon(rowData, col)\">\r\n {{ returnClassIcon(rowData, col) }}\r\n </i>\r\n\r\n <ng-template #booleanField>\r\n <i *ngIf=\"!col.iconField && !isSwitchField(col)\" [ngClass]=\"\r\n rowData[col.field] ? 'text-green-500' : 'text-red-500'\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 *ngIf=\"isSwitchField(col)\" [class]=\"returnRowClass(rowData, col)\">\r\n <kv-switch (onSwitchChange)=\"onSwitchChange($event, rowData, col)\"\r\n [disabled]=\"col?.onlyReadField ?? true\" [switchValue]=\"transformValue(rowData, col)\">\r\n </kv-switch>\r\n </span>\r\n </ng-template>\r\n </td>\r\n\r\n <td *ngIf=\"col.template && !isEditableTable()\" [style]=\"\r\n applyStyle(rowData, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col)\r\n \" class=\"rowTable\">\r\n <span class=\"p-column-title\">{{ col.header }}:</span>\r\n <ng-container *ngIf=\"getCustomTemplate(col.template.name)\"\r\n [ngTemplateOutlet]=\"getCustomTemplate(col.template.name)\"\r\n [ngTemplateOutletContext]=\"{ $implicit: rowData }\">\r\n </ng-container>\r\n </td>\r\n\r\n </ng-container>\r\n\r\n <!-- ------------------------------------------------------------------------------------------------------------------------------------------- -->\r\n <!-- Controle de a\u00E7\u00E3o -->\r\n <td [ngClass]=\"{'td-tools': isEditableTable() && this.editMode == 'row' , 'td-tools-sticky': !isEditableTable() || this.editMode == 'cell' }\"\r\n *ngIf=\"!isEditing && config.actions && config.actions.length > 0 \"\r\n [style]=\"applyStyle(rowData, { field: 'btns-options', header: '' }) + 'border-right: 1px solid #ddd !important;'\"\r\n >\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(rowData)\"\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 <!-- <div *ngFor=\"let action of config.actions\">\r\n {{ criarMenusModal(rowData) }}\r\n </div> -->\r\n\r\n <p-menu\r\n #menu\r\n [popup]=\"true\"\r\n [model]=\"menuItems\"\r\n appendTo=\"body\"\r\n ></p-menu>\r\n </div>\r\n </td>\r\n\r\n <!-- <td\r\n class=\"td-tools\"\r\n *ngIf=\"!isEditing && config.actions && config.actions.length > 0\"\r\n [style]=\"applyStyle(rowData, { field: 'btns-options', header: '' })\"\r\n >\r\n </td> -->\r\n\r\n <!-- ------------------------------------------------------------------------------------------------------------------------------------------- -->\r\n <!-- Controle de edi\u00E7\u00E3o -->\r\n <td class=\"td-edit\" *ngIf=\"this.isEditableTable() && this.editMode == 'row'\" >\r\n <div class=\"flex align-items-center justify-content-center gap-2\">\r\n <button [style.height]=\"'28px'\" [id]=\"'rowEdit' + rowData[config.dataKey] \" [style.width]=\"'28px'\" [disabled]=\"isDisableEditRowFunction(rowData)\" *ngIf=\"!editing\" pButton pRipple type=\"button\" pInitEditableRow icon=\"pi pi-pencil\"\r\n (click)=\"onRowEditInit(rowData)\" class=\"p-button-rounded p-button-text\"></button>\r\n <!-- <button [style.height]=\"'28px'\" [style.width]=\"'28px'\" [disabled]=\"isDisableEditRowFunction(rowData)\" *ngIf=\"editing\" pButton pRipple type=\"button\" pSaveEditableRow icon=\"pi pi-check\"\r\n (click)=\"onRowEditSave(rowData, ri)\" [id]=\"'rowSave' + rowData[config.dataKey] \" class=\"p-button-rounded p-button-text p-button-success mr-2\"></button> -->\r\n <button [style.height]=\"'28px'\" [style.width]=\"'28px'\" [disabled]=\"isDisableEditRowFunction(rowData)\" *ngIf=\"editing\" pButton pRipple type=\"button\" pCancelEditableRow icon=\"pi pi-times\"\r\n (click)=\"onRowEditCancel(rowData, ri)\" [id]=\"'rowCancel' + rowData[config.dataKey] \" class=\"p-button-rounded p-button-text p-button-danger\"></button>\r\n </div>\r\n </td>\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:transparent;color:#a9a9a9;display:flex;font-size:16px;width:2rem;height:2rem;top:2px;margin-left:.5rem;justify-content:center;text-decoration:none;text-align:justify;padding:12px}:host ::ng-deep .center{display:flex;align-items:center;justify-content:center}#actionLoteBtns:hover,.actionLoteBtns:hover{background-color:#29b92d!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:2px 13px 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:50%;width:2.5rem!important;height:2.5rem!important;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}@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;width:500px}: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}:host ::ng-deep .teste{width:70px;font-size:.7rem}:host ::ng-deep .p-tieredmenu-root-list>li:first-child{font-size:.6rem}:host ::ng-deep .p-tieredmenu-root-list>li:last-child{font-size:.8rem}: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-left: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}\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$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i5$7.AutoFocus, selector: "[pAutoFocus]", inputs: ["autofocus"] }, { kind: "directive", type: i5$1.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$1.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: i6.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$1.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.SplitButton, selector: "p-splitButton", inputs: ["model", "severity", "raised", "rounded", "text", "outlined", "size", "plain", "icon", "iconPos", "label", "style", "styleClass", "menuStyle", "menuStyleClass", "tabindex", "appendTo", "dir", "expandAriaLabel", "showTransitionOptions", "hideTransitionOptions", "buttonProps", "menuButtonProps", "autofocus", "disabled", "menuButtonDisabled", "buttonDisabled"], outputs: ["onClick", "onDropdownClick"] }, { 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: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2$1.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: "pipe", type: i1.DatePipe, name: "date" }, { kind: "pipe", type: MaskPipe, name: "mask" }] }); }
|
|
4718
|
+
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 }); }
|
|
4719
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.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 <p-panel\r\n *ngIf=\"filtrosAvancados\"\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 <i\r\n *ngIf=\"!collapsed\"\r\n class=\"pi pi-filter\"\r\n ></i>\r\n <!-- \u00CDcone quando o painel est\u00E1 aberto -->\r\n <i\r\n *ngIf=\"collapsed\"\r\n class=\"pi pi-minus\"\r\n ></i>\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 <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\r\n <ng-template\r\n pTemplate=\"caption\"\r\n *ngIf=\"config.enableCation || enableSizes\"\r\n >\r\n <div class=\"flex flex-row flex-wrap justify-content-between align-items-center grid formgrid p-fluid col-12\">\r\n <div class=\"col-12 flex flex-column\">\r\n <div\r\n *ngIf=\"config.title\"\r\n class=\"text-md font-bold my-3\"\r\n >\r\n {{ config.title }}\r\n </div>\r\n <div\r\n *ngIf=\"config.subtitle\"\r\n class=\"text-sm mb-4 font-medium\"\r\n >\r\n {{ config.subtitle }}\r\n </div>\r\n </div>\r\n\r\n <div class=\"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 <span\r\n *ngIf=\"config.enableFilter\"\r\n class=\"p-input-icon-left\"\r\n >\r\n <i class=\"pi pi-search\"></i>\r\n\r\n <input\r\n pInputText\r\n pAutoFocus\r\n [autofocus]=\"true\"\r\n type=\"text\"\r\n (input)=\"onGlobalFilter(te, $event)\"\r\n placeholder=\"Pesquisar...\"\r\n class=\"h-2rem\"\r\n />\r\n </span>\r\n\r\n\r\n <!-- FIXME: Op\u00E7\u00E3o 1 -->\r\n <!-- <div class=\"sizes-controls ml-2\" *ngIf=\"isShowSizes\">\r\n <p-selectButton\r\n [options]=\"sizes\"\r\n [(ngModel)]=\"selectedSize\"\r\n [style]=\"{'display': 'flex'}\"\r\n optionLabel=\"name\"\r\n />\r\n </div>\r\n <button\r\n id=\"btn-sizes\"\r\n pButton\r\n [pTooltip]=\"isShowSizes ? 'Esconder controles de tamanho' : 'Mostrar controles de tamanho'\"\r\n class=\"actionLoteBtns p-button-raised p-button-text\"\r\n (click)=\"isShowSizes = !isShowSizes\"\r\n >\r\n <span style=\"font-size: 0.8rem;\" class=\"flex align-items-end\">\r\n <span style=\"font-size: 0.7rem;\">\r\n A\r\n </span>\r\n A\r\n </span>\r\n </button> -->\r\n\r\n <!-- FIXME: Op\u00E7\u00E3o 2 -->\r\n <div *ngIf=\"enableSizes\" class=\"sizes-controls ml-2\" >\r\n <p-splitButton\r\n label=\"aA\"\r\n [model]=\"sizes\"\r\n styleClass=\"teste\"\r\n [menuStyle]=\"{'font-size': '0.7rem'}\"\r\n\r\n ngModel\r\n >\r\n </p-splitButton>\r\n </div>\r\n\r\n <!-- FIXME: Op\u00E7\u00E3o 3 -->\r\n <!-- <div class=\"sizes-controls ml-2\" style=\"transform: translate(0px, -15px);\" >\r\n <p-speedDial\r\n [model]=\"sizes\"\r\n showIcon=\"format_size\"\r\n hideIcon=\"format_size\"\r\n radius=\"120\"\r\n direction=\"down-right\"\r\n type=\"quarter-circle\"\r\n buttonClassName=\"item-circle\"\r\n >\r\n\r\n <ng-template pTemplate=\"button\">\r\n <span class=\"material-symbols-outlined\">\r\n format_size\r\n </span>\r\n </ng-template>\r\n\r\n\r\n <ng-template let-item pTemplate=\"item\">\r\n <div class=\"item-circle\">\r\n {{item.label}}\r\n </div>\r\n </ng-template>\r\n\r\n </p-speedDial>\r\n </div> -->\r\n\r\n\r\n </div>\r\n\r\n <span *ngIf=\"isEditing\" class=\"text-aviso\">\r\n\r\n Tabela em modo de edi\u00E7\u00E3o\r\n\r\n </span>\r\n\r\n\r\n <div class=\"flex flex-row col-1 justify-content-end\">\r\n\r\n\r\n <div\r\n *ngFor=\"let action of config.actionsLote\"\r\n class=\"btns-options\"\r\n [style]=\"{ 'margin-right': '7px' }\"\r\n >\r\n <button\r\n id=\"actionLoteBtns\"\r\n pButton\r\n *ngIf=\"\r\n !isEditing &&\r\n (selectedItems.length > 0 || action.showAcoesLote) &&\r\n exibirCampo(action, this.action)\r\n \"\r\n class=\"actionLoteBtns p-button-raised p-button-text\"\r\n style=\"background-color: #1DA750\"\r\n (click)=\"\r\n action?.command(); activeItemLote(selectedItems)\r\n \"\r\n [pTooltip]=\"getOrExecute(action.tooltip, selectedItems)\"\r\n [tooltipPosition]=\"'bottom'\"\r\n [disabled]=\"getOrExecute(action.disabled, selectedItems)\"\r\n >\r\n <span\r\n class=\"material-symbols-outlined md-22\" style=\"color: white\"\r\n >\r\n {{ getOrExecute(action.icon, selectedItems) }}\r\n </span>\r\n </button>\r\n </div>\r\n\r\n <div *ngIf=\"isEditableTable()\" class=\"btns-options\"\r\n [style]=\"{ 'margin-right': '7px' }\"\r\n >\r\n <button\r\n (click)=\"this.isEditing = !this.isEditing\"\r\n id=\"actionLoteBtns\"\r\n pButton\r\n style=\"background-color: #1DA750; color: #fff;\"\r\n class=\"actionLoteBtns p-button-raised p-button-text\"\r\n >\r\n <span class=\"material-symbols-outlined\">\r\n edit_square\r\n </span>\r\n </button>\r\n </div>\r\n\r\n </div>\r\n\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template\r\n pTemplate=\"header\"\r\n let-columns\r\n >\r\n <tr>\r\n <th\r\n style=\"width: 4rem; border-left: solid 4px transparent\"\r\n *ngIf=\"config.enableSelect && !isEditing\"\r\n [class]=\"selectedSize.class+'th'\"\r\n >\r\n <p-tableHeaderCheckbox (click)=\"activeItemLote(selectedItems)\"></p-tableHeaderCheckbox>\r\n </th>\r\n\r\n <th\r\n *ngFor=\"let col of columns\"\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 <div\r\n [class]=\"\r\n centralizarColunas(col) && alignColunasHeader(col) == ''\r\n ? 'flex flex-row justify-content-center'\r\n : 'flex flex-row'\r\n \"\r\n [style]=\"alignColunasHeader(col)\"\r\n >\r\n <span>{{ col.header }}</span>\r\n <p-sortIcon\r\n *ngIf=\"col.sortable === true\"\r\n [field]=\"col.field\"\r\n style=\"font-size: 10px\"\r\n ></p-sortIcon>\r\n\r\n <span\r\n *ngIf=\"col.headerTooltip\"\r\n class=\"material-symbols-outlined flex align-items-center\"\r\n [pTooltip]=\"col.headerTooltip\"\r\n >info</span>\r\n </div>\r\n </th>\r\n <th *ngIf=\"!isEditing && config.actions && config.actions.length > 0\"></th>\r\n <th *ngIf=\"isEditableTable() && this.editMode == 'row'\" id=\"th-edit\" style=\"width: 20px\">Editar</th>\r\n </tr>\r\n </ng-template>\r\n\r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n\r\n <ng-template pTemplate=\"body\" let-rowData let-editing=\"editing\" let-ri=\"rowIndex\" let-columns=\"columns\"\r\n let-rowgroup=\"rowgroup\" let-rowspan=\"rowspan\">\r\n <tr [pEditableRow]=\"rowData\" [pEditableRowDisabled]=\"false\"\r\n [pContextMenuRow]=\"{rowData, editing}\"\r\n [class]=\"selectedSize.class+'-tr'\"\r\n >\r\n\r\n <td\r\n\r\n *ngIf=\"config.enableSelect && !isEditing\"\r\n [style]=\"applyStyle(rowData, { field: 'check-box', header: '' })\"\r\n >\r\n <!--<p-tableCheckbox *ngIf=\"isVisibleCheckbox(rowData)\"-->\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 <ng-container *ngFor=\"let col of columns; let i = index\">\r\n\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\r\n <ng-container *ngSwitchCase=\"'text'\">\r\n <div [style.width]=\"col.width\" class=\"grid formgrid p-fluid\" >\r\n <kv-input-text [disabled]=\"isDisableEditRowCellFunction(rowData, col)\" class=\"cellControl col\" [(ngModel)]=\"rowData[col.field]\" [required]=\"col.required ?? true\"></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 [disabled]=\"isDisableEditRowCellFunction(rowData, col)\" class=\"cellControl col\" [(ngModel)]=\"rowData[col.field]\" [required]=\"col.required ?? true\"></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 [disabled]=\"isDisableEditRowCellFunction(rowData, col)\" class=\"cellControl col\" [mask]=\"col.mask\" [required]=\"col.required ?? true\" [(ngModel)]=\"rowData[col.field]\"></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 [disabled]=\"isDisableEditRowCellFunction(rowData, col)\" class=\"cellControl col\" [(ngModel)]=\"rowData[col.field]\" ></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 [style.width]=\"col.width\" class=\"grid formgrid p-fluid\" >\r\n <kv-input-calendar class=\"cellControl col\" [(ngModel)]=\"rowData[col.field]\"></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]=\"col.fieldDropDownControl.fieldControlDropdownSource\"\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 *ngTemplateOutlet=\"templateOutput; context: { rowData: rowData, col: col }\"></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 {{\r\n retornaDescricaoDrop(\r\n rowData,\r\n col\r\n )\r\n }}\r\n <!-- {{rowData[col.field]}} -->\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'switch'\">\r\n <kv-switch [(ngModel)]=\"rowData[col.field]\" [disabled]=\"true\"></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 {{ rowData[col.field] }}\r\n </ng-container>\r\n\r\n </ng-container>\r\n </ng-template>\r\n\r\n\r\n\r\n <td\r\n *ngIf=\"editMode == 'cell' && col.fieldControlType\"\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\" [style]=\"\r\n applyStyle(rowData, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col) \"\r\n [pTooltip]=\"returnTooltipRow(rowData, col)\"\r\n\r\n >\r\n <p-cellEditor>\r\n\r\n <ng-container >\r\n\r\n <ng-template pTemplate=\"input\">\r\n <ng-container *ngTemplateOutlet=\"templateInput; context: { rowData: rowData, col: col }\"></ng-container>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"output\">\r\n <ng-container *ngTemplateOutlet=\"templateOutput; context: { rowData: rowData, col: col }\"></ng-container>\r\n </ng-template>\r\n\r\n </ng-container>\r\n\r\n\r\n\r\n\r\n <!-- <ng-template *ngIf=\"!isEditing\" pTemplate=\"input\">\r\n <ng-container *ngTemplateOutlet=\"templateInput; context: { rowData: rowData, col: col }\"></ng-container>\r\n </ng-template>\r\n\r\n <ng-template *ngIf=\"isEditing\" pTemplate=\"output\">\r\n <ng-container *ngTemplateOutlet=\"templateOutput; context: { rowData: rowData, col: col }\"></ng-container>\r\n </ng-template> -->\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 <td *ngIf=\"false && col.fieldControlType && editMode == 'row'\"\r\n [id]=\"'rowTable'+ rowData[config.dataKey]\"\r\n (click)=\"activeItem(rowData)\"\r\n (dblclick)=\"dbClickEdit()\"\r\n class=\"rowTable\" [style]=\"\r\n applyStyle(rowData, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col)\"\r\n [pTooltip]=\"returnTooltipRow(rowData, col)\"\r\n >\r\n <p-cellEditor [ngClass]=\"{'switch': col.fieldControlType == 'switch'}\">\r\n\r\n <ng-template pTemplate=\"input\">\r\n <ng-container *ngTemplateOutlet=\"templateInput; context: { rowData: rowData, col: col }\"></ng-container>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"output\">\r\n <ng-container *ngTemplateOutlet=\"templateOutput; context: { rowData: rowData, col: col }\"></ng-container>\r\n </ng-template>\r\n\r\n </p-cellEditor>\r\n </td>\r\n\r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n\r\n <td *ngIf=\"rowgroup && !col.template \" [attr.rowspan]=\"rowgroup && col.grouped ? rowspan : null\"\r\n class=\"rowTable\" [style]=\"\r\n applyStyle(rowData, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col)\r\n \" [pTooltip]=\"returnTooltipRow(rowData, col)\">\r\n <span class=\"p-column-title\">{{ col.header }}:</span>\r\n\r\n <span *ngIf=\"!isBooleanField(rowData, col); else booleanField\" [class]=\"returnRowClass(rowData, col)\">\r\n <span *ngIf=\"\r\n !isChipField(col) && !col.iconField && !isImageField(col)\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 [class]=\"returnClassChip(rowData, col)\" [pTooltip]=\"returnTooltipIcon(rowData, col)\">{{\r\n transformValue(rowData, col) }}</span>\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 *ngIf=\"col.iconField\" [ngClass]=\"{\r\n 'material-icons': col.indIconMaterial,\r\n 'material-symbols-outlined mr-2': !col.indIconMaterial\r\n }\" [pTooltip]=\"returnTooltipIcon(rowData, col)\">\r\n {{ returnClassIcon(rowData, col) }}\r\n </i>\r\n\r\n <ng-template #booleanField>\r\n <i *ngIf=\"!col.iconField && !isSwitchField(col)\" [ngClass]=\"\r\n rowData[col.field] ? 'text-green-500' : 'text-red-500'\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 *ngIf=\"isSwitchField(col)\" [class]=\"returnRowClass(rowData, col)\">\r\n <kv-switch (onSwitchChange)=\"onSwitchChange($event, rowData, col)\"\r\n [disabled]=\"col?.onlyReadField ?? true\" [switchValue]=\"transformValue(rowData, col)\">\r\n </kv-switch>\r\n </span>\r\n </ng-template>\r\n </td>\r\n\r\n <td *ngIf=\"!rowgroup && !col.grouped && !col.template && !col.fieldControlType\" [style]=\"\r\n applyStyle(rowData, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col)\r\n \" class=\"rowTable\" [pTooltip]=\"returnTooltipRow(rowData, col)\">\r\n <span class=\"p-column-title\">{{ col.header }}:</span>\r\n\r\n <span *ngIf=\"!isBooleanField(rowData, col); else booleanField\" [class]=\"returnRowClass(rowData, col)\">\r\n <span *ngIf=\"\r\n !isChipField(col) && !col.iconField && !isImageField(col)\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 [class]=\"returnClassChip(rowData, col)\" [pTooltip]=\"returnTooltipIcon(rowData, col)\">\r\n {{ transformValue(rowData, col) }}</span>\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 *ngIf=\"col.iconField\" [ngClass]=\"{\r\n 'material-icons': col.indIconMaterial,\r\n 'material-symbols-outlined mr-2': !col.indIconMaterial\r\n }\" [pTooltip]=\"returnTooltipIcon(rowData, col)\">\r\n {{ returnClassIcon(rowData, col) }}\r\n </i>\r\n\r\n <ng-template #booleanField>\r\n <i *ngIf=\"!col.iconField && !isSwitchField(col)\" [ngClass]=\"\r\n rowData[col.field] ? 'text-green-500' : 'text-red-500'\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 *ngIf=\"isSwitchField(col)\" [class]=\"returnRowClass(rowData, col)\">\r\n <kv-switch (onSwitchChange)=\"onSwitchChange($event, rowData, col)\"\r\n [disabled]=\"col?.onlyReadField ?? true\" [switchValue]=\"transformValue(rowData, col)\">\r\n </kv-switch>\r\n </span>\r\n </ng-template>\r\n </td>\r\n\r\n <td *ngIf=\"col.template && !isEditableTable()\" [style]=\"\r\n applyStyle(rowData, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col)\r\n \" class=\"rowTable\">\r\n <span class=\"p-column-title\">{{ col.header }}:</span>\r\n <ng-container *ngIf=\"getCustomTemplate(col.template.name)\"\r\n [ngTemplateOutlet]=\"getCustomTemplate(col.template.name)\"\r\n [ngTemplateOutletContext]=\"{ $implicit: rowData }\">\r\n </ng-container>\r\n </td>\r\n\r\n </ng-container>\r\n\r\n <!-- ------------------------------------------------------------------------------------------------------------------------------------------- -->\r\n <!-- Controle de a\u00E7\u00E3o -->\r\n <td [ngClass]=\"{'td-tools': isEditableTable() && this.editMode == 'row' , 'td-tools-sticky': !isEditableTable() || this.editMode == 'cell' }\"\r\n *ngIf=\"!isEditing && config.actions && config.actions.length > 0 \"\r\n [style]=\"applyStyle(rowData, { field: 'btns-options', header: '' }) + 'border-right: 1px solid #ddd !important;'\"\r\n >\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(rowData)\"\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 <!-- <div *ngFor=\"let action of config.actions\">\r\n {{ criarMenusModal(rowData) }}\r\n </div> -->\r\n\r\n <p-menu\r\n #menu\r\n [popup]=\"true\"\r\n [model]=\"menuItems\"\r\n appendTo=\"body\"\r\n ></p-menu>\r\n </div>\r\n </td>\r\n\r\n <!-- <td\r\n class=\"td-tools\"\r\n *ngIf=\"!isEditing && config.actions && config.actions.length > 0\"\r\n [style]=\"applyStyle(rowData, { field: 'btns-options', header: '' })\"\r\n >\r\n </td> -->\r\n\r\n <!-- ------------------------------------------------------------------------------------------------------------------------------------------- -->\r\n <!-- Controle de edi\u00E7\u00E3o -->\r\n <td class=\"td-edit\" *ngIf=\"this.isEditableTable() && this.editMode == 'row'\" >\r\n <div class=\"flex align-items-center justify-content-center gap-2\">\r\n <button [style.height]=\"'28px'\" [id]=\"'rowEdit' + rowData[config.dataKey] \" [style.width]=\"'28px'\" [disabled]=\"isDisableEditRowFunction(rowData)\" *ngIf=\"!editing\" pButton pRipple type=\"button\" pInitEditableRow icon=\"pi pi-pencil\"\r\n (click)=\"onRowEditInit(rowData)\" class=\"p-button-rounded p-button-text\"></button>\r\n <!-- <button [style.height]=\"'28px'\" [style.width]=\"'28px'\" [disabled]=\"isDisableEditRowFunction(rowData)\" *ngIf=\"editing\" pButton pRipple type=\"button\" pSaveEditableRow icon=\"pi pi-check\"\r\n (click)=\"onRowEditSave(rowData, ri)\" [id]=\"'rowSave' + rowData[config.dataKey] \" class=\"p-button-rounded p-button-text p-button-success mr-2\"></button> -->\r\n <button [style.height]=\"'28px'\" [style.width]=\"'28px'\" [disabled]=\"isDisableEditRowFunction(rowData)\" *ngIf=\"editing\" pButton pRipple type=\"button\" pCancelEditableRow icon=\"pi pi-times\"\r\n (click)=\"onRowEditCancel(rowData, ri)\" [id]=\"'rowCancel' + rowData[config.dataKey] \" class=\"p-button-rounded p-button-text p-button-danger\"></button>\r\n </div>\r\n </td>\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:transparent;color:#a9a9a9;display:flex;font-size:16px;width:2rem;height:2rem;top:2px;margin-left:.5rem;justify-content:center;text-decoration:none;text-align:justify;padding:12px}:host ::ng-deep .center{display:flex;align-items:center;justify-content:center}#actionLoteBtns:hover,.actionLoteBtns:hover{background-color:#29b92d!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:2px 13px 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%;width:1.625rem!important;height:1.625rem!important;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}@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;width:500px}: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}:host ::ng-deep .teste{width:70px;font-size:.7rem}:host ::ng-deep .p-tieredmenu-root-list>li:first-child{font-size:.6rem}:host ::ng-deep .p-tieredmenu-root-list>li:last-child{font-size:.8rem}: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-left: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}\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$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i5$7.AutoFocus, selector: "[pAutoFocus]", inputs: ["autofocus"] }, { kind: "directive", type: i5$1.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$1.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: i6.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$1.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.SplitButton, selector: "p-splitButton", inputs: ["model", "severity", "raised", "rounded", "text", "outlined", "size", "plain", "icon", "iconPos", "label", "style", "styleClass", "menuStyle", "menuStyleClass", "tabindex", "appendTo", "dir", "expandAriaLabel", "showTransitionOptions", "hideTransitionOptions", "buttonProps", "menuButtonProps", "autofocus", "disabled", "menuButtonDisabled", "buttonDisabled"], outputs: ["onClick", "onDropdownClick"] }, { 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: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2$1.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: "pipe", type: i1.DatePipe, name: "date" }, { kind: "pipe", type: MaskPipe, name: "mask" }] }); }
|
|
4675
4720
|
}
|
|
4676
4721
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvTableEditComponent, decorators: [{
|
|
4677
4722
|
type: Component,
|
|
4678
|
-
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 <p-panel\r\n *ngIf=\"filtrosAvancados\"\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 <i\r\n *ngIf=\"!collapsed\"\r\n class=\"pi pi-filter\"\r\n ></i>\r\n <!-- \u00CDcone quando o painel est\u00E1 aberto -->\r\n <i\r\n *ngIf=\"collapsed\"\r\n class=\"pi pi-minus\"\r\n ></i>\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 <p-contextMenu #cm [model]=\"items\"></p-contextMenu>\r\n <p-table\r\n #te\r\n\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\r\n <ng-template\r\n pTemplate=\"caption\"\r\n *ngIf=\"config.enableCation || enableSizes\"\r\n >\r\n <div class=\"flex flex-row flex-wrap justify-content-between align-items-center grid formgrid p-fluid col-12\">\r\n <div class=\"col-12 flex flex-column\">\r\n <div\r\n *ngIf=\"config.title\"\r\n class=\"text-md font-bold my-3\"\r\n >\r\n {{ config.title }}\r\n </div>\r\n <div\r\n *ngIf=\"config.subtitle\"\r\n class=\"text-sm mb-4 font-medium\"\r\n >\r\n {{ config.subtitle }}\r\n </div>\r\n </div>\r\n\r\n <div class=\"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 <span\r\n *ngIf=\"config.enableFilter\"\r\n class=\"p-input-icon-left\"\r\n >\r\n <i class=\"pi pi-search\"></i>\r\n\r\n <input\r\n pInputText\r\n pAutoFocus\r\n [autofocus]=\"true\"\r\n type=\"text\"\r\n (input)=\"onGlobalFilter(te, $event)\"\r\n placeholder=\"Pesquisar...\"\r\n class=\"h-2rem\"\r\n />\r\n </span>\r\n\r\n\r\n <!-- FIXME: Op\u00E7\u00E3o 1 -->\r\n <!-- <div class=\"sizes-controls ml-2\" *ngIf=\"isShowSizes\">\r\n <p-selectButton\r\n [options]=\"sizes\"\r\n [(ngModel)]=\"selectedSize\"\r\n [style]=\"{'display': 'flex'}\"\r\n optionLabel=\"name\"\r\n />\r\n </div>\r\n <button\r\n id=\"btn-sizes\"\r\n pButton\r\n [pTooltip]=\"isShowSizes ? 'Esconder controles de tamanho' : 'Mostrar controles de tamanho'\"\r\n class=\"actionLoteBtns p-button-raised p-button-text\"\r\n (click)=\"isShowSizes = !isShowSizes\"\r\n >\r\n <span style=\"font-size: 0.8rem;\" class=\"flex align-items-end\">\r\n <span style=\"font-size: 0.7rem;\">\r\n A\r\n </span>\r\n A\r\n </span>\r\n </button> -->\r\n\r\n <!-- FIXME: Op\u00E7\u00E3o 2 -->\r\n <div *ngIf=\"enableSizes\" class=\"sizes-controls ml-2\" >\r\n <p-splitButton\r\n label=\"aA\"\r\n [model]=\"sizes\"\r\n styleClass=\"teste\"\r\n [menuStyle]=\"{'font-size': '0.7rem'}\"\r\n\r\n ngModel\r\n >\r\n </p-splitButton>\r\n </div>\r\n\r\n <!-- FIXME: Op\u00E7\u00E3o 3 -->\r\n <!-- <div class=\"sizes-controls ml-2\" style=\"transform: translate(0px, -15px);\" >\r\n <p-speedDial\r\n [model]=\"sizes\"\r\n showIcon=\"format_size\"\r\n hideIcon=\"format_size\"\r\n radius=\"120\"\r\n direction=\"down-right\"\r\n type=\"quarter-circle\"\r\n buttonClassName=\"item-circle\"\r\n >\r\n\r\n <ng-template pTemplate=\"button\">\r\n <span class=\"material-symbols-outlined\">\r\n format_size\r\n </span>\r\n </ng-template>\r\n\r\n\r\n <ng-template let-item pTemplate=\"item\">\r\n <div class=\"item-circle\">\r\n {{item.label}}\r\n </div>\r\n </ng-template>\r\n\r\n </p-speedDial>\r\n </div> -->\r\n\r\n\r\n </div>\r\n\r\n <span *ngIf=\"isEditing\" class=\"text-aviso\">\r\n\r\n Tabela em modo de edi\u00E7\u00E3o\r\n\r\n </span>\r\n\r\n\r\n <div class=\"flex flex-row col-1 justify-content-end\">\r\n\r\n\r\n <div\r\n *ngFor=\"let action of config.actionsLote\"\r\n class=\"btns-options\"\r\n [style]=\"{ 'margin-right': '7px' }\"\r\n >\r\n <button\r\n id=\"actionLoteBtns\"\r\n pButton\r\n *ngIf=\"\r\n !isEditing &&\r\n (selectedItems.length > 0 || action.showAcoesLote) &&\r\n exibirCampo(action, this.action)\r\n \"\r\n class=\"actionLoteBtns p-button-raised p-button-text\"\r\n style=\"background-color: #1DA750\"\r\n (click)=\"\r\n action?.command(); activeItemLote(selectedItems)\r\n \"\r\n [pTooltip]=\"getOrExecute(action.tooltip, selectedItems)\"\r\n [tooltipPosition]=\"'bottom'\"\r\n [disabled]=\"getOrExecute(action.disabled, selectedItems)\"\r\n >\r\n <span\r\n class=\"material-symbols-outlined md-22\" style=\"color: white\"\r\n >\r\n {{ getOrExecute(action.icon, selectedItems) }}\r\n </span>\r\n </button>\r\n </div>\r\n\r\n <div *ngIf=\"isEditableTable()\" class=\"btns-options\"\r\n [style]=\"{ 'margin-right': '7px' }\"\r\n >\r\n <button\r\n (click)=\"this.isEditing = !this.isEditing\"\r\n id=\"actionLoteBtns\"\r\n pButton\r\n class=\"actionLoteBtns p-button-raised p-button-text\"\r\n >\r\n <span class=\"material-symbols-outlined\">\r\n edit_square\r\n </span>\r\n </button>\r\n </div>\r\n\r\n </div>\r\n\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template\r\n pTemplate=\"header\"\r\n let-columns\r\n >\r\n <tr>\r\n <th\r\n style=\"width: 4rem; border-left: solid 4px transparent\"\r\n *ngIf=\"config.enableSelect && !isEditing\"\r\n [class]=\"selectedSize.class+'th'\"\r\n >\r\n <p-tableHeaderCheckbox (click)=\"activeItemLote(selectedItems)\"></p-tableHeaderCheckbox>\r\n </th>\r\n\r\n <th\r\n *ngFor=\"let col of columns\"\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 <div\r\n [class]=\"\r\n centralizarColunas(col) && alignColunasHeader(col) == ''\r\n ? 'flex flex-row justify-content-center'\r\n : 'flex flex-row'\r\n \"\r\n [style]=\"alignColunasHeader(col)\"\r\n >\r\n <span>{{ col.header }}</span>\r\n <p-sortIcon\r\n *ngIf=\"col.sortable === true\"\r\n [field]=\"col.field\"\r\n style=\"font-size: 10px\"\r\n ></p-sortIcon>\r\n\r\n <span\r\n *ngIf=\"col.headerTooltip\"\r\n class=\"material-symbols-outlined flex align-items-center\"\r\n [pTooltip]=\"col.headerTooltip\"\r\n >info</span>\r\n </div>\r\n </th>\r\n <th *ngIf=\"!isEditing && config.actions && config.actions.length > 0\"></th>\r\n <th *ngIf=\"isEditableTable() && this.editMode == 'row'\" id=\"th-edit\" style=\"width: 20px\">Editar</th>\r\n </tr>\r\n </ng-template>\r\n\r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n\r\n <ng-template pTemplate=\"body\" let-rowData let-editing=\"editing\" let-ri=\"rowIndex\" let-columns=\"columns\"\r\n let-rowgroup=\"rowgroup\" let-rowspan=\"rowspan\">\r\n <tr [pEditableRow]=\"rowData\" [pEditableRowDisabled]=\"false\"\r\n [pContextMenuRow]=\"{rowData, editing}\"\r\n [class]=\"selectedSize.class+'-tr'\"\r\n >\r\n\r\n <td\r\n\r\n *ngIf=\"config.enableSelect && !isEditing\"\r\n [style]=\"applyStyle(rowData, { field: 'check-box', header: '' })\"\r\n >\r\n <!--<p-tableCheckbox *ngIf=\"isVisibleCheckbox(rowData)\"-->\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 <ng-container *ngFor=\"let col of columns; let i = index\">\r\n\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\r\n <ng-container *ngSwitchCase=\"'text'\">\r\n <div [style.width]=\"col.width\" class=\"grid formgrid p-fluid\" >\r\n <kv-input-text [disabled]=\"isDisableEditRowCellFunction(rowData, col)\" class=\"cellControl col\" [(ngModel)]=\"rowData[col.field]\" [required]=\"col.required ?? true\"></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 [disabled]=\"isDisableEditRowCellFunction(rowData, col)\" class=\"cellControl col\" [(ngModel)]=\"rowData[col.field]\" [required]=\"col.required ?? true\"></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 [disabled]=\"isDisableEditRowCellFunction(rowData, col)\" class=\"cellControl col\" [mask]=\"col.mask\" [required]=\"col.required ?? true\" [(ngModel)]=\"rowData[col.field]\"></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 [disabled]=\"isDisableEditRowCellFunction(rowData, col)\" class=\"cellControl col\" [(ngModel)]=\"rowData[col.field]\" ></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 [style.width]=\"col.width\" class=\"grid formgrid p-fluid\" >\r\n <kv-input-calendar class=\"cellControl col\" [(ngModel)]=\"rowData[col.field]\"></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]=\"col.fieldDropDownControl.fieldControlDropdownSource\"\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 *ngTemplateOutlet=\"templateOutput; context: { rowData: rowData, col: col }\"></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 {{\r\n retornaDescricaoDrop(\r\n rowData,\r\n col\r\n )\r\n }}\r\n <!-- {{rowData[col.field]}} -->\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'switch'\">\r\n <kv-switch [(ngModel)]=\"rowData[col.field]\" [disabled]=\"true\"></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 {{ rowData[col.field] }}\r\n </ng-container>\r\n\r\n </ng-container>\r\n </ng-template>\r\n\r\n\r\n\r\n <td\r\n *ngIf=\"editMode == 'cell' && col.fieldControlType\"\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\" [style]=\"\r\n applyStyle(rowData, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col) \"\r\n [pTooltip]=\"returnTooltipRow(rowData, col)\"\r\n\r\n >\r\n <p-cellEditor>\r\n\r\n <ng-container >\r\n\r\n <ng-template pTemplate=\"input\">\r\n <ng-container *ngTemplateOutlet=\"templateInput; context: { rowData: rowData, col: col }\"></ng-container>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"output\">\r\n <ng-container *ngTemplateOutlet=\"templateOutput; context: { rowData: rowData, col: col }\"></ng-container>\r\n </ng-template>\r\n\r\n </ng-container>\r\n\r\n\r\n\r\n\r\n <!-- <ng-template *ngIf=\"!isEditing\" pTemplate=\"input\">\r\n <ng-container *ngTemplateOutlet=\"templateInput; context: { rowData: rowData, col: col }\"></ng-container>\r\n </ng-template>\r\n\r\n <ng-template *ngIf=\"isEditing\" pTemplate=\"output\">\r\n <ng-container *ngTemplateOutlet=\"templateOutput; context: { rowData: rowData, col: col }\"></ng-container>\r\n </ng-template> -->\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 <td *ngIf=\"false && col.fieldControlType && editMode == 'row'\"\r\n [id]=\"'rowTable'+ rowData[config.dataKey]\"\r\n (click)=\"activeItem(rowData)\"\r\n (dblclick)=\"dbClickEdit()\"\r\n class=\"rowTable\" [style]=\"\r\n applyStyle(rowData, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col)\"\r\n [pTooltip]=\"returnTooltipRow(rowData, col)\"\r\n >\r\n <p-cellEditor [ngClass]=\"{'switch': col.fieldControlType == 'switch'}\">\r\n\r\n <ng-template pTemplate=\"input\">\r\n <ng-container *ngTemplateOutlet=\"templateInput; context: { rowData: rowData, col: col }\"></ng-container>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"output\">\r\n <ng-container *ngTemplateOutlet=\"templateOutput; context: { rowData: rowData, col: col }\"></ng-container>\r\n </ng-template>\r\n\r\n </p-cellEditor>\r\n </td>\r\n\r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n\r\n <td *ngIf=\"rowgroup && !col.template \" [attr.rowspan]=\"rowgroup && col.grouped ? rowspan : null\"\r\n class=\"rowTable\" [style]=\"\r\n applyStyle(rowData, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col)\r\n \" [pTooltip]=\"returnTooltipRow(rowData, col)\">\r\n <span class=\"p-column-title\">{{ col.header }}:</span>\r\n\r\n <span *ngIf=\"!isBooleanField(rowData, col); else booleanField\" [class]=\"returnRowClass(rowData, col)\">\r\n <span *ngIf=\"\r\n !isChipField(col) && !col.iconField && !isImageField(col)\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 [class]=\"returnClassChip(rowData, col)\" [pTooltip]=\"returnTooltipIcon(rowData, col)\">{{\r\n transformValue(rowData, col) }}</span>\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 *ngIf=\"col.iconField\" [ngClass]=\"{\r\n 'material-icons': col.indIconMaterial,\r\n 'material-symbols-outlined mr-2': !col.indIconMaterial\r\n }\" [pTooltip]=\"returnTooltipIcon(rowData, col)\">\r\n {{ returnClassIcon(rowData, col) }}\r\n </i>\r\n\r\n <ng-template #booleanField>\r\n <i *ngIf=\"!col.iconField && !isSwitchField(col)\" [ngClass]=\"\r\n rowData[col.field] ? 'text-green-500' : 'text-red-500'\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 *ngIf=\"isSwitchField(col)\" [class]=\"returnRowClass(rowData, col)\">\r\n <kv-switch (onSwitchChange)=\"onSwitchChange($event, rowData, col)\"\r\n [disabled]=\"col?.onlyReadField ?? true\" [switchValue]=\"transformValue(rowData, col)\">\r\n </kv-switch>\r\n </span>\r\n </ng-template>\r\n </td>\r\n\r\n <td *ngIf=\"!rowgroup && !col.grouped && !col.template && !col.fieldControlType\" [style]=\"\r\n applyStyle(rowData, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col)\r\n \" class=\"rowTable\" [pTooltip]=\"returnTooltipRow(rowData, col)\">\r\n <span class=\"p-column-title\">{{ col.header }}:</span>\r\n\r\n <span *ngIf=\"!isBooleanField(rowData, col); else booleanField\" [class]=\"returnRowClass(rowData, col)\">\r\n <span *ngIf=\"\r\n !isChipField(col) && !col.iconField && !isImageField(col)\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 [class]=\"returnClassChip(rowData, col)\" [pTooltip]=\"returnTooltipIcon(rowData, col)\">\r\n {{ transformValue(rowData, col) }}</span>\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 *ngIf=\"col.iconField\" [ngClass]=\"{\r\n 'material-icons': col.indIconMaterial,\r\n 'material-symbols-outlined mr-2': !col.indIconMaterial\r\n }\" [pTooltip]=\"returnTooltipIcon(rowData, col)\">\r\n {{ returnClassIcon(rowData, col) }}\r\n </i>\r\n\r\n <ng-template #booleanField>\r\n <i *ngIf=\"!col.iconField && !isSwitchField(col)\" [ngClass]=\"\r\n rowData[col.field] ? 'text-green-500' : 'text-red-500'\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 *ngIf=\"isSwitchField(col)\" [class]=\"returnRowClass(rowData, col)\">\r\n <kv-switch (onSwitchChange)=\"onSwitchChange($event, rowData, col)\"\r\n [disabled]=\"col?.onlyReadField ?? true\" [switchValue]=\"transformValue(rowData, col)\">\r\n </kv-switch>\r\n </span>\r\n </ng-template>\r\n </td>\r\n\r\n <td *ngIf=\"col.template && !isEditableTable()\" [style]=\"\r\n applyStyle(rowData, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col)\r\n \" class=\"rowTable\">\r\n <span class=\"p-column-title\">{{ col.header }}:</span>\r\n <ng-container *ngIf=\"getCustomTemplate(col.template.name)\"\r\n [ngTemplateOutlet]=\"getCustomTemplate(col.template.name)\"\r\n [ngTemplateOutletContext]=\"{ $implicit: rowData }\">\r\n </ng-container>\r\n </td>\r\n\r\n </ng-container>\r\n\r\n <!-- ------------------------------------------------------------------------------------------------------------------------------------------- -->\r\n <!-- Controle de a\u00E7\u00E3o -->\r\n <td [ngClass]=\"{'td-tools': isEditableTable() && this.editMode == 'row' , 'td-tools-sticky': !isEditableTable() || this.editMode == 'cell' }\"\r\n *ngIf=\"!isEditing && config.actions && config.actions.length > 0 \"\r\n [style]=\"applyStyle(rowData, { field: 'btns-options', header: '' }) + 'border-right: 1px solid #ddd !important;'\"\r\n >\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(rowData)\"\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 <!-- <div *ngFor=\"let action of config.actions\">\r\n {{ criarMenusModal(rowData) }}\r\n </div> -->\r\n\r\n <p-menu\r\n #menu\r\n [popup]=\"true\"\r\n [model]=\"menuItems\"\r\n appendTo=\"body\"\r\n ></p-menu>\r\n </div>\r\n </td>\r\n\r\n <!-- <td\r\n class=\"td-tools\"\r\n *ngIf=\"!isEditing && config.actions && config.actions.length > 0\"\r\n [style]=\"applyStyle(rowData, { field: 'btns-options', header: '' })\"\r\n >\r\n </td> -->\r\n\r\n <!-- ------------------------------------------------------------------------------------------------------------------------------------------- -->\r\n <!-- Controle de edi\u00E7\u00E3o -->\r\n <td class=\"td-edit\" *ngIf=\"this.isEditableTable() && this.editMode == 'row'\" >\r\n <div class=\"flex align-items-center justify-content-center gap-2\">\r\n <button [style.height]=\"'28px'\" [id]=\"'rowEdit' + rowData[config.dataKey] \" [style.width]=\"'28px'\" [disabled]=\"isDisableEditRowFunction(rowData)\" *ngIf=\"!editing\" pButton pRipple type=\"button\" pInitEditableRow icon=\"pi pi-pencil\"\r\n (click)=\"onRowEditInit(rowData)\" class=\"p-button-rounded p-button-text\"></button>\r\n <!-- <button [style.height]=\"'28px'\" [style.width]=\"'28px'\" [disabled]=\"isDisableEditRowFunction(rowData)\" *ngIf=\"editing\" pButton pRipple type=\"button\" pSaveEditableRow icon=\"pi pi-check\"\r\n (click)=\"onRowEditSave(rowData, ri)\" [id]=\"'rowSave' + rowData[config.dataKey] \" class=\"p-button-rounded p-button-text p-button-success mr-2\"></button> -->\r\n <button [style.height]=\"'28px'\" [style.width]=\"'28px'\" [disabled]=\"isDisableEditRowFunction(rowData)\" *ngIf=\"editing\" pButton pRipple type=\"button\" pCancelEditableRow icon=\"pi pi-times\"\r\n (click)=\"onRowEditCancel(rowData, ri)\" [id]=\"'rowCancel' + rowData[config.dataKey] \" class=\"p-button-rounded p-button-text p-button-danger\"></button>\r\n </div>\r\n </td>\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:transparent;color:#a9a9a9;display:flex;font-size:16px;width:2rem;height:2rem;top:2px;margin-left:.5rem;justify-content:center;text-decoration:none;text-align:justify;padding:12px}:host ::ng-deep .center{display:flex;align-items:center;justify-content:center}#actionLoteBtns:hover,.actionLoteBtns:hover{background-color:#29b92d!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:2px 13px 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:50%;width:2.5rem!important;height:2.5rem!important;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}@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;width:500px}: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}:host ::ng-deep .teste{width:70px;font-size:.7rem}:host ::ng-deep .p-tieredmenu-root-list>li:first-child{font-size:.6rem}:host ::ng-deep .p-tieredmenu-root-list>li:last-child{font-size:.8rem}: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-left: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}\n"] }]
|
|
4679
|
-
}], ctorParameters: () => [{ type: i1.DatePipe }, { type: i1.DecimalPipe }, { type: CpfCnpjPipe }, { type: TelefonePipe }, { type:
|
|
4680
|
-
type: Input,
|
|
4681
|
-
args: ['config']
|
|
4682
|
-
}], dataSource: [{
|
|
4683
|
-
type: Input
|
|
4684
|
-
}], selectedItems: [{
|
|
4685
|
-
type: Input
|
|
4686
|
-
}], totalRecords: [{
|
|
4687
|
-
type: Input
|
|
4688
|
-
}], paginator: [{
|
|
4689
|
-
type: Input
|
|
4690
|
-
}], rowsPerPageOptions: [{
|
|
4691
|
-
type: Input
|
|
4692
|
-
}], rows: [{
|
|
4693
|
-
type: Input
|
|
4694
|
-
}], pageLinksOptions: [{
|
|
4695
|
-
type: Input
|
|
4696
|
-
}], showFirstLastIcon: [{
|
|
4697
|
-
type: Input
|
|
4698
|
-
}], tableSize: [{
|
|
4699
|
-
type: Input
|
|
4700
|
-
}], applyStyle: [{
|
|
4701
|
-
type: Input
|
|
4702
|
-
}], filterColumnsBtn: [{
|
|
4703
|
-
type: Input
|
|
4704
|
-
}], filtrosAvancados: [{
|
|
4705
|
-
type: Input
|
|
4706
|
-
}], scrollHeight: [{
|
|
4707
|
-
type: Input
|
|
4708
|
-
}], isTableScrollable: [{
|
|
4709
|
-
type: Input
|
|
4710
|
-
}], rowTrackBy: [{
|
|
4711
|
-
type: Input
|
|
4712
|
-
}], responsiveLayout: [{
|
|
4713
|
-
type: Input
|
|
4714
|
-
}], tamanhoTotalTabela: [{
|
|
4723
|
+
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 <p-panel\r\n *ngIf=\"filtrosAvancados\"\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 <i\r\n *ngIf=\"!collapsed\"\r\n class=\"pi pi-filter\"\r\n ></i>\r\n <!-- \u00CDcone quando o painel est\u00E1 aberto -->\r\n <i\r\n *ngIf=\"collapsed\"\r\n class=\"pi pi-minus\"\r\n ></i>\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 <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\r\n <ng-template\r\n pTemplate=\"caption\"\r\n *ngIf=\"config.enableCation || enableSizes\"\r\n >\r\n <div class=\"flex flex-row flex-wrap justify-content-between align-items-center grid formgrid p-fluid col-12\">\r\n <div class=\"col-12 flex flex-column\">\r\n <div\r\n *ngIf=\"config.title\"\r\n class=\"text-md font-bold my-3\"\r\n >\r\n {{ config.title }}\r\n </div>\r\n <div\r\n *ngIf=\"config.subtitle\"\r\n class=\"text-sm mb-4 font-medium\"\r\n >\r\n {{ config.subtitle }}\r\n </div>\r\n </div>\r\n\r\n <div class=\"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 <span\r\n *ngIf=\"config.enableFilter\"\r\n class=\"p-input-icon-left\"\r\n >\r\n <i class=\"pi pi-search\"></i>\r\n\r\n <input\r\n pInputText\r\n pAutoFocus\r\n [autofocus]=\"true\"\r\n type=\"text\"\r\n (input)=\"onGlobalFilter(te, $event)\"\r\n placeholder=\"Pesquisar...\"\r\n class=\"h-2rem\"\r\n />\r\n </span>\r\n\r\n\r\n <!-- FIXME: Op\u00E7\u00E3o 1 -->\r\n <!-- <div class=\"sizes-controls ml-2\" *ngIf=\"isShowSizes\">\r\n <p-selectButton\r\n [options]=\"sizes\"\r\n [(ngModel)]=\"selectedSize\"\r\n [style]=\"{'display': 'flex'}\"\r\n optionLabel=\"name\"\r\n />\r\n </div>\r\n <button\r\n id=\"btn-sizes\"\r\n pButton\r\n [pTooltip]=\"isShowSizes ? 'Esconder controles de tamanho' : 'Mostrar controles de tamanho'\"\r\n class=\"actionLoteBtns p-button-raised p-button-text\"\r\n (click)=\"isShowSizes = !isShowSizes\"\r\n >\r\n <span style=\"font-size: 0.8rem;\" class=\"flex align-items-end\">\r\n <span style=\"font-size: 0.7rem;\">\r\n A\r\n </span>\r\n A\r\n </span>\r\n </button> -->\r\n\r\n <!-- FIXME: Op\u00E7\u00E3o 2 -->\r\n <div *ngIf=\"enableSizes\" class=\"sizes-controls ml-2\" >\r\n <p-splitButton\r\n label=\"aA\"\r\n [model]=\"sizes\"\r\n styleClass=\"teste\"\r\n [menuStyle]=\"{'font-size': '0.7rem'}\"\r\n\r\n ngModel\r\n >\r\n </p-splitButton>\r\n </div>\r\n\r\n <!-- FIXME: Op\u00E7\u00E3o 3 -->\r\n <!-- <div class=\"sizes-controls ml-2\" style=\"transform: translate(0px, -15px);\" >\r\n <p-speedDial\r\n [model]=\"sizes\"\r\n showIcon=\"format_size\"\r\n hideIcon=\"format_size\"\r\n radius=\"120\"\r\n direction=\"down-right\"\r\n type=\"quarter-circle\"\r\n buttonClassName=\"item-circle\"\r\n >\r\n\r\n <ng-template pTemplate=\"button\">\r\n <span class=\"material-symbols-outlined\">\r\n format_size\r\n </span>\r\n </ng-template>\r\n\r\n\r\n <ng-template let-item pTemplate=\"item\">\r\n <div class=\"item-circle\">\r\n {{item.label}}\r\n </div>\r\n </ng-template>\r\n\r\n </p-speedDial>\r\n </div> -->\r\n\r\n\r\n </div>\r\n\r\n <span *ngIf=\"isEditing\" class=\"text-aviso\">\r\n\r\n Tabela em modo de edi\u00E7\u00E3o\r\n\r\n </span>\r\n\r\n\r\n <div class=\"flex flex-row col-1 justify-content-end\">\r\n\r\n\r\n <div\r\n *ngFor=\"let action of config.actionsLote\"\r\n class=\"btns-options\"\r\n [style]=\"{ 'margin-right': '7px' }\"\r\n >\r\n <button\r\n id=\"actionLoteBtns\"\r\n pButton\r\n *ngIf=\"\r\n !isEditing &&\r\n (selectedItems.length > 0 || action.showAcoesLote) &&\r\n exibirCampo(action, this.action)\r\n \"\r\n class=\"actionLoteBtns p-button-raised p-button-text\"\r\n style=\"background-color: #1DA750\"\r\n (click)=\"\r\n action?.command(); activeItemLote(selectedItems)\r\n \"\r\n [pTooltip]=\"getOrExecute(action.tooltip, selectedItems)\"\r\n [tooltipPosition]=\"'bottom'\"\r\n [disabled]=\"getOrExecute(action.disabled, selectedItems)\"\r\n >\r\n <span\r\n class=\"material-symbols-outlined md-22\" style=\"color: white\"\r\n >\r\n {{ getOrExecute(action.icon, selectedItems) }}\r\n </span>\r\n </button>\r\n </div>\r\n\r\n <div *ngIf=\"isEditableTable()\" class=\"btns-options\"\r\n [style]=\"{ 'margin-right': '7px' }\"\r\n >\r\n <button\r\n (click)=\"this.isEditing = !this.isEditing\"\r\n id=\"actionLoteBtns\"\r\n pButton\r\n style=\"background-color: #1DA750; color: #fff;\"\r\n class=\"actionLoteBtns p-button-raised p-button-text\"\r\n >\r\n <span class=\"material-symbols-outlined\">\r\n edit_square\r\n </span>\r\n </button>\r\n </div>\r\n\r\n </div>\r\n\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template\r\n pTemplate=\"header\"\r\n let-columns\r\n >\r\n <tr>\r\n <th\r\n style=\"width: 4rem; border-left: solid 4px transparent\"\r\n *ngIf=\"config.enableSelect && !isEditing\"\r\n [class]=\"selectedSize.class+'th'\"\r\n >\r\n <p-tableHeaderCheckbox (click)=\"activeItemLote(selectedItems)\"></p-tableHeaderCheckbox>\r\n </th>\r\n\r\n <th\r\n *ngFor=\"let col of columns\"\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 <div\r\n [class]=\"\r\n centralizarColunas(col) && alignColunasHeader(col) == ''\r\n ? 'flex flex-row justify-content-center'\r\n : 'flex flex-row'\r\n \"\r\n [style]=\"alignColunasHeader(col)\"\r\n >\r\n <span>{{ col.header }}</span>\r\n <p-sortIcon\r\n *ngIf=\"col.sortable === true\"\r\n [field]=\"col.field\"\r\n style=\"font-size: 10px\"\r\n ></p-sortIcon>\r\n\r\n <span\r\n *ngIf=\"col.headerTooltip\"\r\n class=\"material-symbols-outlined flex align-items-center\"\r\n [pTooltip]=\"col.headerTooltip\"\r\n >info</span>\r\n </div>\r\n </th>\r\n <th *ngIf=\"!isEditing && config.actions && config.actions.length > 0\"></th>\r\n <th *ngIf=\"isEditableTable() && this.editMode == 'row'\" id=\"th-edit\" style=\"width: 20px\">Editar</th>\r\n </tr>\r\n </ng-template>\r\n\r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n\r\n <ng-template pTemplate=\"body\" let-rowData let-editing=\"editing\" let-ri=\"rowIndex\" let-columns=\"columns\"\r\n let-rowgroup=\"rowgroup\" let-rowspan=\"rowspan\">\r\n <tr [pEditableRow]=\"rowData\" [pEditableRowDisabled]=\"false\"\r\n [pContextMenuRow]=\"{rowData, editing}\"\r\n [class]=\"selectedSize.class+'-tr'\"\r\n >\r\n\r\n <td\r\n\r\n *ngIf=\"config.enableSelect && !isEditing\"\r\n [style]=\"applyStyle(rowData, { field: 'check-box', header: '' })\"\r\n >\r\n <!--<p-tableCheckbox *ngIf=\"isVisibleCheckbox(rowData)\"-->\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 <ng-container *ngFor=\"let col of columns; let i = index\">\r\n\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\r\n <ng-container *ngSwitchCase=\"'text'\">\r\n <div [style.width]=\"col.width\" class=\"grid formgrid p-fluid\" >\r\n <kv-input-text [disabled]=\"isDisableEditRowCellFunction(rowData, col)\" class=\"cellControl col\" [(ngModel)]=\"rowData[col.field]\" [required]=\"col.required ?? true\"></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 [disabled]=\"isDisableEditRowCellFunction(rowData, col)\" class=\"cellControl col\" [(ngModel)]=\"rowData[col.field]\" [required]=\"col.required ?? true\"></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 [disabled]=\"isDisableEditRowCellFunction(rowData, col)\" class=\"cellControl col\" [mask]=\"col.mask\" [required]=\"col.required ?? true\" [(ngModel)]=\"rowData[col.field]\"></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 [disabled]=\"isDisableEditRowCellFunction(rowData, col)\" class=\"cellControl col\" [(ngModel)]=\"rowData[col.field]\" ></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 [style.width]=\"col.width\" class=\"grid formgrid p-fluid\" >\r\n <kv-input-calendar class=\"cellControl col\" [(ngModel)]=\"rowData[col.field]\"></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]=\"col.fieldDropDownControl.fieldControlDropdownSource\"\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 *ngTemplateOutlet=\"templateOutput; context: { rowData: rowData, col: col }\"></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 {{\r\n retornaDescricaoDrop(\r\n rowData,\r\n col\r\n )\r\n }}\r\n <!-- {{rowData[col.field]}} -->\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'switch'\">\r\n <kv-switch [(ngModel)]=\"rowData[col.field]\" [disabled]=\"true\"></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 {{ rowData[col.field] }}\r\n </ng-container>\r\n\r\n </ng-container>\r\n </ng-template>\r\n\r\n\r\n\r\n <td\r\n *ngIf=\"editMode == 'cell' && col.fieldControlType\"\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\" [style]=\"\r\n applyStyle(rowData, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col) \"\r\n [pTooltip]=\"returnTooltipRow(rowData, col)\"\r\n\r\n >\r\n <p-cellEditor>\r\n\r\n <ng-container >\r\n\r\n <ng-template pTemplate=\"input\">\r\n <ng-container *ngTemplateOutlet=\"templateInput; context: { rowData: rowData, col: col }\"></ng-container>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"output\">\r\n <ng-container *ngTemplateOutlet=\"templateOutput; context: { rowData: rowData, col: col }\"></ng-container>\r\n </ng-template>\r\n\r\n </ng-container>\r\n\r\n\r\n\r\n\r\n <!-- <ng-template *ngIf=\"!isEditing\" pTemplate=\"input\">\r\n <ng-container *ngTemplateOutlet=\"templateInput; context: { rowData: rowData, col: col }\"></ng-container>\r\n </ng-template>\r\n\r\n <ng-template *ngIf=\"isEditing\" pTemplate=\"output\">\r\n <ng-container *ngTemplateOutlet=\"templateOutput; context: { rowData: rowData, col: col }\"></ng-container>\r\n </ng-template> -->\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 <td *ngIf=\"false && col.fieldControlType && editMode == 'row'\"\r\n [id]=\"'rowTable'+ rowData[config.dataKey]\"\r\n (click)=\"activeItem(rowData)\"\r\n (dblclick)=\"dbClickEdit()\"\r\n class=\"rowTable\" [style]=\"\r\n applyStyle(rowData, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col)\"\r\n [pTooltip]=\"returnTooltipRow(rowData, col)\"\r\n >\r\n <p-cellEditor [ngClass]=\"{'switch': col.fieldControlType == 'switch'}\">\r\n\r\n <ng-template pTemplate=\"input\">\r\n <ng-container *ngTemplateOutlet=\"templateInput; context: { rowData: rowData, col: col }\"></ng-container>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"output\">\r\n <ng-container *ngTemplateOutlet=\"templateOutput; context: { rowData: rowData, col: col }\"></ng-container>\r\n </ng-template>\r\n\r\n </p-cellEditor>\r\n </td>\r\n\r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n\r\n <td *ngIf=\"rowgroup && !col.template \" [attr.rowspan]=\"rowgroup && col.grouped ? rowspan : null\"\r\n class=\"rowTable\" [style]=\"\r\n applyStyle(rowData, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col)\r\n \" [pTooltip]=\"returnTooltipRow(rowData, col)\">\r\n <span class=\"p-column-title\">{{ col.header }}:</span>\r\n\r\n <span *ngIf=\"!isBooleanField(rowData, col); else booleanField\" [class]=\"returnRowClass(rowData, col)\">\r\n <span *ngIf=\"\r\n !isChipField(col) && !col.iconField && !isImageField(col)\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 [class]=\"returnClassChip(rowData, col)\" [pTooltip]=\"returnTooltipIcon(rowData, col)\">{{\r\n transformValue(rowData, col) }}</span>\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 *ngIf=\"col.iconField\" [ngClass]=\"{\r\n 'material-icons': col.indIconMaterial,\r\n 'material-symbols-outlined mr-2': !col.indIconMaterial\r\n }\" [pTooltip]=\"returnTooltipIcon(rowData, col)\">\r\n {{ returnClassIcon(rowData, col) }}\r\n </i>\r\n\r\n <ng-template #booleanField>\r\n <i *ngIf=\"!col.iconField && !isSwitchField(col)\" [ngClass]=\"\r\n rowData[col.field] ? 'text-green-500' : 'text-red-500'\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 *ngIf=\"isSwitchField(col)\" [class]=\"returnRowClass(rowData, col)\">\r\n <kv-switch (onSwitchChange)=\"onSwitchChange($event, rowData, col)\"\r\n [disabled]=\"col?.onlyReadField ?? true\" [switchValue]=\"transformValue(rowData, col)\">\r\n </kv-switch>\r\n </span>\r\n </ng-template>\r\n </td>\r\n\r\n <td *ngIf=\"!rowgroup && !col.grouped && !col.template && !col.fieldControlType\" [style]=\"\r\n applyStyle(rowData, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col)\r\n \" class=\"rowTable\" [pTooltip]=\"returnTooltipRow(rowData, col)\">\r\n <span class=\"p-column-title\">{{ col.header }}:</span>\r\n\r\n <span *ngIf=\"!isBooleanField(rowData, col); else booleanField\" [class]=\"returnRowClass(rowData, col)\">\r\n <span *ngIf=\"\r\n !isChipField(col) && !col.iconField && !isImageField(col)\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 [class]=\"returnClassChip(rowData, col)\" [pTooltip]=\"returnTooltipIcon(rowData, col)\">\r\n {{ transformValue(rowData, col) }}</span>\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 *ngIf=\"col.iconField\" [ngClass]=\"{\r\n 'material-icons': col.indIconMaterial,\r\n 'material-symbols-outlined mr-2': !col.indIconMaterial\r\n }\" [pTooltip]=\"returnTooltipIcon(rowData, col)\">\r\n {{ returnClassIcon(rowData, col) }}\r\n </i>\r\n\r\n <ng-template #booleanField>\r\n <i *ngIf=\"!col.iconField && !isSwitchField(col)\" [ngClass]=\"\r\n rowData[col.field] ? 'text-green-500' : 'text-red-500'\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 *ngIf=\"isSwitchField(col)\" [class]=\"returnRowClass(rowData, col)\">\r\n <kv-switch (onSwitchChange)=\"onSwitchChange($event, rowData, col)\"\r\n [disabled]=\"col?.onlyReadField ?? true\" [switchValue]=\"transformValue(rowData, col)\">\r\n </kv-switch>\r\n </span>\r\n </ng-template>\r\n </td>\r\n\r\n <td *ngIf=\"col.template && !isEditableTable()\" [style]=\"\r\n applyStyle(rowData, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col)\r\n \" class=\"rowTable\">\r\n <span class=\"p-column-title\">{{ col.header }}:</span>\r\n <ng-container *ngIf=\"getCustomTemplate(col.template.name)\"\r\n [ngTemplateOutlet]=\"getCustomTemplate(col.template.name)\"\r\n [ngTemplateOutletContext]=\"{ $implicit: rowData }\">\r\n </ng-container>\r\n </td>\r\n\r\n </ng-container>\r\n\r\n <!-- ------------------------------------------------------------------------------------------------------------------------------------------- -->\r\n <!-- Controle de a\u00E7\u00E3o -->\r\n <td [ngClass]=\"{'td-tools': isEditableTable() && this.editMode == 'row' , 'td-tools-sticky': !isEditableTable() || this.editMode == 'cell' }\"\r\n *ngIf=\"!isEditing && config.actions && config.actions.length > 0 \"\r\n [style]=\"applyStyle(rowData, { field: 'btns-options', header: '' }) + 'border-right: 1px solid #ddd !important;'\"\r\n >\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(rowData)\"\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 <!-- <div *ngFor=\"let action of config.actions\">\r\n {{ criarMenusModal(rowData) }}\r\n </div> -->\r\n\r\n <p-menu\r\n #menu\r\n [popup]=\"true\"\r\n [model]=\"menuItems\"\r\n appendTo=\"body\"\r\n ></p-menu>\r\n </div>\r\n </td>\r\n\r\n <!-- <td\r\n class=\"td-tools\"\r\n *ngIf=\"!isEditing && config.actions && config.actions.length > 0\"\r\n [style]=\"applyStyle(rowData, { field: 'btns-options', header: '' })\"\r\n >\r\n </td> -->\r\n\r\n <!-- ------------------------------------------------------------------------------------------------------------------------------------------- -->\r\n <!-- Controle de edi\u00E7\u00E3o -->\r\n <td class=\"td-edit\" *ngIf=\"this.isEditableTable() && this.editMode == 'row'\" >\r\n <div class=\"flex align-items-center justify-content-center gap-2\">\r\n <button [style.height]=\"'28px'\" [id]=\"'rowEdit' + rowData[config.dataKey] \" [style.width]=\"'28px'\" [disabled]=\"isDisableEditRowFunction(rowData)\" *ngIf=\"!editing\" pButton pRipple type=\"button\" pInitEditableRow icon=\"pi pi-pencil\"\r\n (click)=\"onRowEditInit(rowData)\" class=\"p-button-rounded p-button-text\"></button>\r\n <!-- <button [style.height]=\"'28px'\" [style.width]=\"'28px'\" [disabled]=\"isDisableEditRowFunction(rowData)\" *ngIf=\"editing\" pButton pRipple type=\"button\" pSaveEditableRow icon=\"pi pi-check\"\r\n (click)=\"onRowEditSave(rowData, ri)\" [id]=\"'rowSave' + rowData[config.dataKey] \" class=\"p-button-rounded p-button-text p-button-success mr-2\"></button> -->\r\n <button [style.height]=\"'28px'\" [style.width]=\"'28px'\" [disabled]=\"isDisableEditRowFunction(rowData)\" *ngIf=\"editing\" pButton pRipple type=\"button\" pCancelEditableRow icon=\"pi pi-times\"\r\n (click)=\"onRowEditCancel(rowData, ri)\" [id]=\"'rowCancel' + rowData[config.dataKey] \" class=\"p-button-rounded p-button-text p-button-danger\"></button>\r\n </div>\r\n </td>\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:transparent;color:#a9a9a9;display:flex;font-size:16px;width:2rem;height:2rem;top:2px;margin-left:.5rem;justify-content:center;text-decoration:none;text-align:justify;padding:12px}:host ::ng-deep .center{display:flex;align-items:center;justify-content:center}#actionLoteBtns:hover,.actionLoteBtns:hover{background-color:#29b92d!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:2px 13px 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%;width:1.625rem!important;height:1.625rem!important;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}@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;width:500px}: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}:host ::ng-deep .teste{width:70px;font-size:.7rem}:host ::ng-deep .p-tieredmenu-root-list>li:first-child{font-size:.6rem}:host ::ng-deep .p-tieredmenu-root-list>li:last-child{font-size:.8rem}: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-left: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}\n"] }]
|
|
4724
|
+
}], ctorParameters: () => [{ type: i1.DatePipe }, { type: i1.DecimalPipe }, { type: CpfCnpjPipe }, { type: TelefonePipe }, { type: NotificationService }], propDecorators: { enableSizes: [{
|
|
4715
4725
|
type: Input
|
|
4716
4726
|
}], editMode: [{
|
|
4717
4727
|
type: Input
|
|
4718
|
-
}], enableSizes: [{
|
|
4719
|
-
type: Input
|
|
4720
|
-
}], _templates: [{
|
|
4721
|
-
type: Input,
|
|
4722
|
-
args: ['templates']
|
|
4723
4728
|
}], onSave: [{
|
|
4724
4729
|
type: Output
|
|
4725
|
-
}], onActiveItem: [{
|
|
4726
|
-
type: Output
|
|
4727
|
-
}], onActiveItemLote: [{
|
|
4728
|
-
type: Output
|
|
4729
|
-
}], onPaginate: [{
|
|
4730
|
-
type: Output
|
|
4731
|
-
}], onSelectionChange: [{
|
|
4732
|
-
type: Output
|
|
4733
|
-
}], doubleClickEvent: [{
|
|
4734
|
-
type: Output
|
|
4735
4730
|
}], filterField: [{
|
|
4736
4731
|
type: Output
|
|
4737
|
-
}], onSwitchTableChange: [{
|
|
4738
|
-
type: Output
|
|
4739
|
-
}], onFilter: [{
|
|
4740
|
-
type: Output
|
|
4741
|
-
}], onWindowResize: [{
|
|
4742
|
-
type: HostListener,
|
|
4743
|
-
args: ['window:resize', ['$event']]
|
|
4744
4732
|
}] } });
|
|
4745
4733
|
|
|
4746
4734
|
class KvTableEditModule {
|
|
@@ -5247,11 +5235,11 @@ class KvTableComponent {
|
|
|
5247
5235
|
this.dataSource = [...this.dataSource];
|
|
5248
5236
|
}
|
|
5249
5237
|
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 }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5250
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.8", type: KvTableComponent, selector: "kv-table", inputs: { _templates: ["templates", "_templates"], setConfig: ["config", "setConfig"], defaultSortField: "defaultSortField", dataSource: "dataSource", selectedItems: "selectedItems", totalRecords: "totalRecords", paginator: "paginator", rowsPerPageOptions: "rowsPerPageOptions", rows: "rows", pageLinksOptions: "pageLinksOptions", showFirstLastIcon: "showFirstLastIcon", tableSize: "tableSize", applyStyle: "applyStyle", filterColumnsBtn: "filterColumnsBtn", filtrosAvancados: "filtrosAvancados", scrollHeight: "scrollHeight", isTableScrollable: "isTableScrollable", tableCaptalized: "tableCaptalized", rowTrackBy: "rowTrackBy", responsiveLayout: "responsiveLayout" }, outputs: { onActiveItem: "onActiveItem", onActiveItemLote: "onActiveItemLote", onPaginate: "onPaginate", onSelectionChange: "onSelectionChange", doubleClickEvent: "doubleClickEvent", filterField: "filterField", onSwitchTableChange: "onSwitchTableChange" }, host: { listeners: { "window:resize": "onWindowResize($event)" } }, queries: [{ propertyName: "templates", predicate: TemplateDirective }], viewQueries: [{ propertyName: "table", first: true, predicate: ["table"], descendants: true }, { propertyName: "menuFiltroDiv", first: true, predicate: ["menuFiltroDiv"], descendants: true }, { propertyName: "botaoFiltro", first: true, predicate: ["botaoFiltro"], descendants: true }], 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)=\"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 @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 (onLazyLoad)=\"paginate($event);\"\r\n (selectionChange)=\"selectionChange($event)\"\r\n (onSort)=\"onSort($event)\"\r\n rowGroupMode=\"rowspan\"\r\n [groupRowsBy]=\"config.fieldGroup\"\r\n [showFirstLastIcon]=\"showFirstLastIcon\"\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 >\r\n @if (config.enableCation) {\r\n <ng-template pTemplate=\"caption\">\r\n <div class=\"flex flex-row flex-wrap justify-content-between align-items-center grid formgrid p-fluid col-12\">\r\n <div class=\"col-12 flex flex-column\">\r\n @if (config.title) {\r\n <div class=\"text-md font-bold my-3\">\r\n {{ config.title }}\r\n </div>\r\n }\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 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 @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\">\r\n @for (action of config.actionsLote; track i; let i = $index) {\r\n <div\r\n class=\"btns-options\"\r\n [style]=\"{ 'margin-right': '7px' }\"\r\n >\r\n @if ((selectedItems.length > 0 || action.showAcoesLote) &&\r\n (getOrExecute(action.visible, selectedItems) ?? true)) {\r\n <button\r\n id=\"actionLoteBtns\"\r\n pButton\r\n class=\"actionLoteBtns p-button-raised p-button-text\"\r\n (click)=\"\r\n action?.command(); activeItemLote(selectedItems)\r\n \"\r\n style=\"background-color: #1DA750\"\r\n [pTooltip]=\"getOrExecute(action.tooltip, selectedItems)\"\r\n [tooltipPosition]=\"getOrExecute(action.tooltip, selectedItems)?.length ?? 0 > 7 && config.actionsLote && i == config.actionsLote.length - 1 ? 'left' : 'bottom'\"\r\n [disabled]=\"getOrExecute(action.disabled, selectedItems)\"\r\n >\r\n <span\r\n class=\"material-symbols-outlined md-22\"\r\n style=\"color: white\"\r\n >\r\n {{ getOrExecute(action.icon, selectedItems) }}\r\n </span>\r\n </button>\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\r\n pTemplate=\"header\"\r\n let-columns\r\n >\r\n <tr>\r\n @if (config.enableSelect) {\r\n <th style=\"width: 4rem; border-left: solid 4px transparent\">\r\n <p-tableHeaderCheckbox (click)=\"activeItemLote(selectedItems)\"></p-tableHeaderCheckbox>\r\n </th>\r\n }\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]='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 </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 </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]=\"{ 'capitalize': tableCaptalized }\"\r\n >\r\n @if (config.enableSelect) {\r\n <td [style]=\"applyStyle(rowData, { field: 'check-box', header: '' })\">\r\n <!--<p-tableCheckbox *ngIf=\"isVisibleCheckbox(rowData.data)\"-->\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 }\r\n\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 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 @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 </span>\r\n }\r\n\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 >{{ transformValue(rowData, col) }}</span>\r\n </div>\r\n }\r\n </span>\r\n\r\n @if (isImageField(col)) {\r\n <span>\r\n <span>\r\n <img\r\n class=\"image\"\r\n [src]=\"loadImage(rowData, col)\"\r\n />\r\n </span>\r\n </span>\r\n }\r\n\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 <i [ngClass]=\"rowData[col.field] ? 'text-green-500' : 'text-red-500'\"><span\r\n class=\"material-symbols-outlined\"\r\n >\r\n {{ rowData[col.field] ? \"check\" : \"close\" }}\r\n </span>\r\n </i>\r\n }\r\n\r\n @if (isSwitchField(col)) {\r\n <span [class]=\"returnRowClass(rowData, col)\">\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 }\r\n\r\n </ng-template>\r\n </td>\r\n }\r\n\r\n @if (!rowgroup && !col.grouped && !col.template) {\r\n <td\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 @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(rowData, col) }}\r\n </span>\r\n }\r\n\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 >\r\n {{ transformValue(rowData, col) }}</span>\r\n </div>\r\n }\r\n </span>\r\n\r\n @if (isImageField(col)) {\r\n <span>\r\n <span>\r\n <img\r\n class=\"image\"\r\n [src]=\"loadImage(rowData, col)\"\r\n />\r\n </span>\r\n </span>\r\n }\r\n\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\r\n @if (!col.iconField && !isSwitchField(col)) {\r\n <i [ngClass]=\"rowData[col.field] ? 'text-green-500' : 'text-red-500'\"><span\r\n class=\"material-symbols-outlined\"\r\n >\r\n {{ rowData[col.field] ? \"check\" : \"close\" }}\r\n </span>\r\n </i>\r\n }\r\n\r\n @if (isSwitchField(col)) {\r\n <span [class]=\"returnRowClass(rowData, col)\">\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 {{transformValue(rowData, col)}}\r\n </span>\r\n }\r\n\r\n </ng-template>\r\n </td>\r\n }\r\n\r\n @if (col.template) {\r\n <td\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 @if (getCustomTemplate(col.template.name)) {\r\n <ng-container\r\n [ngTemplateOutlet]=\"getCustomTemplate(col.template.name)\"\r\n [ngTemplateOutletContext]=\"{ $implicit: rowData }\"\r\n />\r\n }\r\n </td>\r\n }\r\n\r\n </ng-container>\r\n }\r\n\r\n @if (config.actions && config.actions.length > 0) {\r\n <td [style]=\"applyStyle(rowData, { 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(rowData)\"\r\n > -->\r\n\r\n\r\n <span\r\n class=\"material-symbols-outlined cursor-pointer icon-more-horiz\"\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 <!-- </button> -->\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\r\n </div>\r\n </td>\r\n }\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template\r\n pTemplate=\"emptymessage\"\r\n let-columns\r\n >\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\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/>", styles: ["@charset \"UTF-8\";.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:19px}.material-symbols-outlined.md-22{font-size:22px}.checkbox-container{display:flex;align-items:center;gap:2px;margin-top:5px}#botaoFiltro:hover{color:#a9a9a9}.actionLoteBtns{align-items:center;background-color:transparent;color:#a9a9a9;display:flex;font-size:16px;width:2rem;height:2rem;top:2px;margin-left:.5rem;justify-content:center;text-decoration:none;text-align:justify;padding:12px}#actionLoteBtns:hover,.actionLoteBtns:hover{background-color:#29b92d!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:1;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-table{border-spacing:0px 2px}:host ::ng-deep .p-datatable-header{background-color:#eaeaea!important;padding:2px 13px 0!important;border-radius:5px!important}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-thead>tr>th{background-color:#eaeaea!important}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-thead>tr>th:first-of-type{border-radius:5px 0 0 5px}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-thead>tr>th:last-child{border-radius:0 5px 5px 0}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody>tr>td{border-bottom:1px solid #ddd!important;border-top:1px solid #ddd!important}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody>tr>td:first-of-type{border-left:solid 4px #5289B4!important;border-radius:10px 0 0 10px!important}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody>tr>td:last-child{border-radius:0 10px 10px 0!important;border-right:1px solid #ddd!important}:host ::ng-deep .actionBtns,:host ::ng-deep .actionLoteBtns{border-radius:20%;width:1.625rem!important;height:1.625rem!important;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}@media only screen and (min-width: 768px){.actionLoteBtns{top:-1px}}@media only screen and (max-width: 960px){.rowTable{text-align:right!important}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody>tr>td:has(p-tablecheckbox){border-bottom:0px!important}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody>tr>td:has(img){justify-content:center!important;align-items:center!important}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody>tr>td:has(img) .p-column-title{display:none!important}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody>tr>td:first-of-type{border-left:solid 4px #5289B4!important;border-top:1px solid #ddd!important}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody>tr>td:last-child{border-bottom:1px solid #ddd!important}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody>tr>td:last-child div{justify-content:center!important;align-items:center!important}:host ::ng-deep .p-datatable.p-datatable-sm .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-sm .p-datatable-thead>tr>th:last-of-type{border-radius:0 0 5px!important}::ng-deep .p-datatable.p-datatable-sm .p-datatable-thead>tr>th:first-of-type{border-radius:0 0 0 5px!important}\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$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i5$7.AutoFocus, selector: "[pAutoFocus]", inputs: ["autofocus"] }, { kind: "directive", type: i5$1.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: i9.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: i6.InputText, selector: "[pInputText]", inputs: ["variant"] }, { kind: "component", type: i11$1.Panel, selector: "p-panel", inputs: ["toggleable", "header", "collapsed", "style", "styleClass", "iconPos", "expandIcon", "collapseIcon", "showHeader", "toggler", "transitionOptions"], outputs: ["collapsedChange", "onBeforeToggle", "onAfterToggle"] }, { kind: "component", type: i12$1.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: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: KvSwitchComponent, selector: "kv-switch", inputs: ["readonly", "switchValue"], outputs: ["onSwitchChange"] }] }); }
|
|
5238
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.8", type: KvTableComponent, selector: "kv-table", inputs: { _templates: ["templates", "_templates"], setConfig: ["config", "setConfig"], defaultSortField: "defaultSortField", dataSource: "dataSource", selectedItems: "selectedItems", totalRecords: "totalRecords", paginator: "paginator", rowsPerPageOptions: "rowsPerPageOptions", rows: "rows", pageLinksOptions: "pageLinksOptions", showFirstLastIcon: "showFirstLastIcon", tableSize: "tableSize", applyStyle: "applyStyle", filterColumnsBtn: "filterColumnsBtn", filtrosAvancados: "filtrosAvancados", scrollHeight: "scrollHeight", isTableScrollable: "isTableScrollable", tableCaptalized: "tableCaptalized", rowTrackBy: "rowTrackBy", responsiveLayout: "responsiveLayout" }, outputs: { onActiveItem: "onActiveItem", onActiveItemLote: "onActiveItemLote", onPaginate: "onPaginate", onSelectionChange: "onSelectionChange", doubleClickEvent: "doubleClickEvent", filterField: "filterField", onSwitchTableChange: "onSwitchTableChange" }, host: { listeners: { "window:resize": "onWindowResize($event)" } }, queries: [{ propertyName: "templates", predicate: TemplateDirective }], viewQueries: [{ propertyName: "table", first: true, predicate: ["table"], descendants: true }, { propertyName: "menuFiltroDiv", first: true, predicate: ["menuFiltroDiv"], descendants: true }, { propertyName: "botaoFiltro", first: true, predicate: ["botaoFiltro"], descendants: true }], 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)=\"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 @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 (onLazyLoad)=\"paginate($event);\"\r\n (selectionChange)=\"selectionChange($event)\"\r\n (onSort)=\"onSort($event)\"\r\n rowGroupMode=\"rowspan\"\r\n [groupRowsBy]=\"config.fieldGroup\"\r\n [showFirstLastIcon]=\"showFirstLastIcon\"\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 >\r\n @if (config.enableCation) {\r\n <ng-template pTemplate=\"caption\">\r\n <div class=\"flex flex-row flex-wrap justify-content-between align-items-center grid formgrid p-fluid col-12\">\r\n <div class=\"col-12 flex flex-column\">\r\n @if (config.title) {\r\n <div class=\"text-md font-bold my-3\">\r\n {{ config.title }}\r\n </div>\r\n }\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 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 @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\">\r\n @for (action of config.actionsLote; track i; let i = $index) {\r\n <div\r\n class=\"btns-options\"\r\n [style]=\"{ 'margin-right': '7px' }\"\r\n >\r\n @if ((selectedItems.length > 0 || action.showAcoesLote) &&\r\n (getOrExecute(action.visible, selectedItems) ?? true)) {\r\n <button\r\n id=\"actionLoteBtns\"\r\n pButton\r\n class=\"actionLoteBtns p-button-raised p-button-text\"\r\n (click)=\"\r\n action?.command(); activeItemLote(selectedItems)\r\n \"\r\n style=\"background-color: #1DA750\"\r\n [pTooltip]=\"getOrExecute(action.tooltip, selectedItems)\"\r\n [tooltipPosition]=\"getOrExecute(action.tooltip, selectedItems)?.length ?? 0 > 7 && config.actionsLote && i == config.actionsLote.length - 1 ? 'left' : 'bottom'\"\r\n [disabled]=\"getOrExecute(action.disabled, selectedItems)\"\r\n >\r\n <span\r\n class=\"material-symbols-outlined md-22\"\r\n style=\"color: white\"\r\n >\r\n {{ getOrExecute(action.icon, selectedItems) }}\r\n </span>\r\n </button>\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\r\n pTemplate=\"header\"\r\n let-columns\r\n >\r\n <tr>\r\n @if (config.enableSelect) {\r\n <th style=\"width: 4rem; border-left: solid 4px transparent\">\r\n <p-tableHeaderCheckbox (click)=\"activeItemLote(selectedItems)\"></p-tableHeaderCheckbox>\r\n </th>\r\n }\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]='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 </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 </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]=\"{ 'capitalize': tableCaptalized }\"\r\n >\r\n @if (config.enableSelect) {\r\n <td [style]=\"applyStyle(rowData, { field: 'check-box', header: '' })\">\r\n <!--<p-tableCheckbox *ngIf=\"isVisibleCheckbox(rowData.data)\"-->\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 }\r\n\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 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 @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(rowData, col)}}\r\n </span>\r\n }\r\n\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 >{{ transformValue(rowData, col) }}</span>\r\n </div>\r\n }\r\n </span>\r\n\r\n @if (isImageField(col)) {\r\n <span>\r\n <span>\r\n <img\r\n class=\"image\"\r\n [src]=\"loadImage(rowData, col)\"\r\n />\r\n </span>\r\n </span>\r\n }\r\n\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 <i [ngClass]=\"rowData[col.field] ? 'text-green-500' : 'text-red-500'\"><span\r\n class=\"material-symbols-outlined\"\r\n >\r\n {{ rowData[col.field] ? \"check\" : \"close\" }}\r\n </span>\r\n </i>\r\n }\r\n\r\n @if (isSwitchField(col)) {\r\n <span [class]=\"returnRowClass(rowData, col)\">\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 }\r\n\r\n </ng-template>\r\n </td>\r\n }\r\n\r\n @if (!rowgroup && !col.grouped && !col.template) {\r\n <td\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 @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(rowData, col) }}\r\n </span>\r\n }\r\n\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 >\r\n {{ transformValue(rowData, col) }}</span>\r\n </div>\r\n }\r\n </span>\r\n\r\n @if (isImageField(col)) {\r\n <span>\r\n <span>\r\n <img\r\n class=\"image\"\r\n [src]=\"loadImage(rowData, col)\"\r\n />\r\n </span>\r\n </span>\r\n }\r\n\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\r\n @if (!col.iconField && !isSwitchField(col)) {\r\n <i [ngClass]=\"rowData[col.field] ? 'text-green-500' : 'text-red-500'\"><span\r\n class=\"material-symbols-outlined\"\r\n >\r\n {{ rowData[col.field] ? \"check\" : \"close\" }}\r\n </span>\r\n </i>\r\n }\r\n\r\n @if (isSwitchField(col)) {\r\n <span [class]=\"returnRowClass(rowData, col)\">\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 {{transformValue(rowData, col)}}\r\n </span>\r\n }\r\n\r\n </ng-template>\r\n </td>\r\n }\r\n\r\n @if (col.template) {\r\n <td\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 @if (getCustomTemplate(col.template.name)) {\r\n <ng-container\r\n [ngTemplateOutlet]=\"getCustomTemplate(col.template.name)\"\r\n [ngTemplateOutletContext]=\"{ $implicit: rowData }\"\r\n />\r\n }\r\n </td>\r\n }\r\n\r\n </ng-container>\r\n }\r\n\r\n @if (config.actions && config.actions.length > 0) {\r\n <td [style]=\"applyStyle(rowData, { 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(rowData)\"\r\n > -->\r\n\r\n\r\n <span\r\n class=\"material-symbols-outlined cursor-pointer icon-more-horiz\"\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 <!-- </button> -->\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\r\n </div>\r\n </td>\r\n }\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template\r\n pTemplate=\"emptymessage\"\r\n let-columns\r\n >\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\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/>", styles: ["@charset \"UTF-8\";.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:19px}.material-symbols-outlined.md-22{font-size:22px}.checkbox-container{display:flex;align-items:center;gap:2px;margin-top:5px}#botaoFiltro:hover{color:#a9a9a9}.actionLoteBtns{align-items:center;background-color:transparent;color:#a9a9a9;display:flex;font-size:16px;width:2rem;height:2rem;top:2px;margin-left:.5rem;justify-content:center;text-decoration:none;text-align:justify;padding:12px}#actionLoteBtns:hover,.actionLoteBtns:hover{background-color:#29b92d!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:1;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-table{border-spacing:0px 2px}:host ::ng-deep .p-datatable-header{background-color:#eaeaea!important;padding:2px 13px 0!important;border-radius:5px!important}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-thead>tr>th{background-color:#eaeaea!important}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-thead>tr>th:first-of-type{border-radius:5px 0 0 5px}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-thead>tr>th:last-child{border-radius:0 5px 5px 0}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody>tr>td{border-bottom:1px solid #ddd!important;border-top:1px solid #ddd!important}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody>tr>td:first-of-type{border-left:solid 4px #5289B4!important;border-radius:10px 0 0 10px!important}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody>tr>td:last-child{border-radius:0 10px 10px 0!important;border-right:1px solid #ddd!important}:host ::ng-deep .actionBtns,:host ::ng-deep .actionLoteBtns{border-radius:20%;width:1.625rem!important;height:1.625rem!important;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}@media only screen and (min-width: 768px){.actionLoteBtns{top:-1px}}@media only screen and (max-width: 960px){.rowTable{text-align:right!important}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody>tr>td:has(p-tablecheckbox){border-bottom:0px!important}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody>tr>td:has(img){justify-content:center!important;align-items:center!important}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody>tr>td:has(img) .p-column-title{display:none!important}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody>tr>td:first-of-type{border-left:solid 4px #5289B4!important;border-top:1px solid #ddd!important}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody>tr>td:last-child{border-bottom:1px solid #ddd!important}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody>tr>td:last-child div{justify-content:center!important;align-items:center!important}:host ::ng-deep .p-datatable.p-datatable-sm .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-sm .p-datatable-thead>tr>th:last-of-type{border-radius:0 0 5px!important}::ng-deep .p-datatable.p-datatable-sm .p-datatable-thead>tr>th:first-of-type{border-radius:0 0 0 5px!important}\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$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i5$7.AutoFocus, selector: "[pAutoFocus]", inputs: ["autofocus"] }, { kind: "directive", type: i5$1.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: i9.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: i6.InputText, selector: "[pInputText]", inputs: ["variant"] }, { kind: "component", type: i11$1.Panel, selector: "p-panel", inputs: ["toggleable", "header", "collapsed", "style", "styleClass", "iconPos", "expandIcon", "collapseIcon", "showHeader", "toggler", "transitionOptions"], outputs: ["collapsedChange", "onBeforeToggle", "onAfterToggle"] }, { kind: "component", type: i12$1.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: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: KvSwitchComponent, selector: "kv-switch", inputs: ["readonly", "switchValue"], outputs: ["onSwitchChange"] }] }); }
|
|
5251
5239
|
}
|
|
5252
5240
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvTableComponent, decorators: [{
|
|
5253
5241
|
type: Component,
|
|
5254
|
-
args: [{ selector: 'kv-table', 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)=\"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 @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 (onLazyLoad)=\"paginate($event);\"\r\n (selectionChange)=\"selectionChange($event)\"\r\n (onSort)=\"onSort($event)\"\r\n rowGroupMode=\"rowspan\"\r\n [groupRowsBy]=\"config.fieldGroup\"\r\n [showFirstLastIcon]=\"showFirstLastIcon\"\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 >\r\n @if (config.enableCation) {\r\n <ng-template pTemplate=\"caption\">\r\n <div class=\"flex flex-row flex-wrap justify-content-between align-items-center grid formgrid p-fluid col-12\">\r\n <div class=\"col-12 flex flex-column\">\r\n @if (config.title) {\r\n <div class=\"text-md font-bold my-3\">\r\n {{ config.title }}\r\n </div>\r\n }\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 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 @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\">\r\n @for (action of config.actionsLote; track i; let i = $index) {\r\n <div\r\n class=\"btns-options\"\r\n [style]=\"{ 'margin-right': '7px' }\"\r\n >\r\n @if ((selectedItems.length > 0 || action.showAcoesLote) &&\r\n (getOrExecute(action.visible, selectedItems) ?? true)) {\r\n <button\r\n id=\"actionLoteBtns\"\r\n pButton\r\n class=\"actionLoteBtns p-button-raised p-button-text\"\r\n (click)=\"\r\n action?.command(); activeItemLote(selectedItems)\r\n \"\r\n style=\"background-color: #1DA750\"\r\n [pTooltip]=\"getOrExecute(action.tooltip, selectedItems)\"\r\n [tooltipPosition]=\"getOrExecute(action.tooltip, selectedItems)?.length ?? 0 > 7 && config.actionsLote && i == config.actionsLote.length - 1 ? 'left' : 'bottom'\"\r\n [disabled]=\"getOrExecute(action.disabled, selectedItems)\"\r\n >\r\n <span\r\n class=\"material-symbols-outlined md-22\"\r\n style=\"color: white\"\r\n >\r\n {{ getOrExecute(action.icon, selectedItems) }}\r\n </span>\r\n </button>\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\r\n pTemplate=\"header\"\r\n let-columns\r\n >\r\n <tr>\r\n @if (config.enableSelect) {\r\n <th style=\"width: 4rem; border-left: solid 4px transparent\">\r\n <p-tableHeaderCheckbox (click)=\"activeItemLote(selectedItems)\"></p-tableHeaderCheckbox>\r\n </th>\r\n }\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]='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 </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 </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]=\"{ 'capitalize': tableCaptalized }\"\r\n >\r\n @if (config.enableSelect) {\r\n <td [style]=\"applyStyle(rowData, { field: 'check-box', header: '' })\">\r\n <!--<p-tableCheckbox *ngIf=\"isVisibleCheckbox(rowData.data)\"-->\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 }\r\n\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 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 @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 </span>\r\n }\r\n\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 >{{ transformValue(rowData, col) }}</span>\r\n </div>\r\n }\r\n </span>\r\n\r\n @if (isImageField(col)) {\r\n <span>\r\n <span>\r\n <img\r\n class=\"image\"\r\n [src]=\"loadImage(rowData, col)\"\r\n />\r\n </span>\r\n </span>\r\n }\r\n\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 <i [ngClass]=\"rowData[col.field] ? 'text-green-500' : 'text-red-500'\"><span\r\n class=\"material-symbols-outlined\"\r\n >\r\n {{ rowData[col.field] ? \"check\" : \"close\" }}\r\n </span>\r\n </i>\r\n }\r\n\r\n @if (isSwitchField(col)) {\r\n <span [class]=\"returnRowClass(rowData, col)\">\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 }\r\n\r\n </ng-template>\r\n </td>\r\n }\r\n\r\n @if (!rowgroup && !col.grouped && !col.template) {\r\n <td\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 @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(rowData, col) }}\r\n </span>\r\n }\r\n\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 >\r\n {{ transformValue(rowData, col) }}</span>\r\n </div>\r\n }\r\n </span>\r\n\r\n @if (isImageField(col)) {\r\n <span>\r\n <span>\r\n <img\r\n class=\"image\"\r\n [src]=\"loadImage(rowData, col)\"\r\n />\r\n </span>\r\n </span>\r\n }\r\n\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\r\n @if (!col.iconField && !isSwitchField(col)) {\r\n <i [ngClass]=\"rowData[col.field] ? 'text-green-500' : 'text-red-500'\"><span\r\n class=\"material-symbols-outlined\"\r\n >\r\n {{ rowData[col.field] ? \"check\" : \"close\" }}\r\n </span>\r\n </i>\r\n }\r\n\r\n @if (isSwitchField(col)) {\r\n <span [class]=\"returnRowClass(rowData, col)\">\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 {{transformValue(rowData, col)}}\r\n </span>\r\n }\r\n\r\n </ng-template>\r\n </td>\r\n }\r\n\r\n @if (col.template) {\r\n <td\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 @if (getCustomTemplate(col.template.name)) {\r\n <ng-container\r\n [ngTemplateOutlet]=\"getCustomTemplate(col.template.name)\"\r\n [ngTemplateOutletContext]=\"{ $implicit: rowData }\"\r\n />\r\n }\r\n </td>\r\n }\r\n\r\n </ng-container>\r\n }\r\n\r\n @if (config.actions && config.actions.length > 0) {\r\n <td [style]=\"applyStyle(rowData, { 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(rowData)\"\r\n > -->\r\n\r\n\r\n <span\r\n class=\"material-symbols-outlined cursor-pointer icon-more-horiz\"\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 <!-- </button> -->\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\r\n </div>\r\n </td>\r\n }\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template\r\n pTemplate=\"emptymessage\"\r\n let-columns\r\n >\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\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/>", styles: ["@charset \"UTF-8\";.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:19px}.material-symbols-outlined.md-22{font-size:22px}.checkbox-container{display:flex;align-items:center;gap:2px;margin-top:5px}#botaoFiltro:hover{color:#a9a9a9}.actionLoteBtns{align-items:center;background-color:transparent;color:#a9a9a9;display:flex;font-size:16px;width:2rem;height:2rem;top:2px;margin-left:.5rem;justify-content:center;text-decoration:none;text-align:justify;padding:12px}#actionLoteBtns:hover,.actionLoteBtns:hover{background-color:#29b92d!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:1;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-table{border-spacing:0px 2px}:host ::ng-deep .p-datatable-header{background-color:#eaeaea!important;padding:2px 13px 0!important;border-radius:5px!important}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-thead>tr>th{background-color:#eaeaea!important}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-thead>tr>th:first-of-type{border-radius:5px 0 0 5px}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-thead>tr>th:last-child{border-radius:0 5px 5px 0}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody>tr>td{border-bottom:1px solid #ddd!important;border-top:1px solid #ddd!important}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody>tr>td:first-of-type{border-left:solid 4px #5289B4!important;border-radius:10px 0 0 10px!important}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody>tr>td:last-child{border-radius:0 10px 10px 0!important;border-right:1px solid #ddd!important}:host ::ng-deep .actionBtns,:host ::ng-deep .actionLoteBtns{border-radius:20%;width:1.625rem!important;height:1.625rem!important;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}@media only screen and (min-width: 768px){.actionLoteBtns{top:-1px}}@media only screen and (max-width: 960px){.rowTable{text-align:right!important}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody>tr>td:has(p-tablecheckbox){border-bottom:0px!important}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody>tr>td:has(img){justify-content:center!important;align-items:center!important}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody>tr>td:has(img) .p-column-title{display:none!important}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody>tr>td:first-of-type{border-left:solid 4px #5289B4!important;border-top:1px solid #ddd!important}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody>tr>td:last-child{border-bottom:1px solid #ddd!important}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody>tr>td:last-child div{justify-content:center!important;align-items:center!important}:host ::ng-deep .p-datatable.p-datatable-sm .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-sm .p-datatable-thead>tr>th:last-of-type{border-radius:0 0 5px!important}::ng-deep .p-datatable.p-datatable-sm .p-datatable-thead>tr>th:first-of-type{border-radius:0 0 0 5px!important}\n"] }]
|
|
5242
|
+
args: [{ selector: 'kv-table', 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)=\"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 @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 (onLazyLoad)=\"paginate($event);\"\r\n (selectionChange)=\"selectionChange($event)\"\r\n (onSort)=\"onSort($event)\"\r\n rowGroupMode=\"rowspan\"\r\n [groupRowsBy]=\"config.fieldGroup\"\r\n [showFirstLastIcon]=\"showFirstLastIcon\"\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 >\r\n @if (config.enableCation) {\r\n <ng-template pTemplate=\"caption\">\r\n <div class=\"flex flex-row flex-wrap justify-content-between align-items-center grid formgrid p-fluid col-12\">\r\n <div class=\"col-12 flex flex-column\">\r\n @if (config.title) {\r\n <div class=\"text-md font-bold my-3\">\r\n {{ config.title }}\r\n </div>\r\n }\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 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 @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\">\r\n @for (action of config.actionsLote; track i; let i = $index) {\r\n <div\r\n class=\"btns-options\"\r\n [style]=\"{ 'margin-right': '7px' }\"\r\n >\r\n @if ((selectedItems.length > 0 || action.showAcoesLote) &&\r\n (getOrExecute(action.visible, selectedItems) ?? true)) {\r\n <button\r\n id=\"actionLoteBtns\"\r\n pButton\r\n class=\"actionLoteBtns p-button-raised p-button-text\"\r\n (click)=\"\r\n action?.command(); activeItemLote(selectedItems)\r\n \"\r\n style=\"background-color: #1DA750\"\r\n [pTooltip]=\"getOrExecute(action.tooltip, selectedItems)\"\r\n [tooltipPosition]=\"getOrExecute(action.tooltip, selectedItems)?.length ?? 0 > 7 && config.actionsLote && i == config.actionsLote.length - 1 ? 'left' : 'bottom'\"\r\n [disabled]=\"getOrExecute(action.disabled, selectedItems)\"\r\n >\r\n <span\r\n class=\"material-symbols-outlined md-22\"\r\n style=\"color: white\"\r\n >\r\n {{ getOrExecute(action.icon, selectedItems) }}\r\n </span>\r\n </button>\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\r\n pTemplate=\"header\"\r\n let-columns\r\n >\r\n <tr>\r\n @if (config.enableSelect) {\r\n <th style=\"width: 4rem; border-left: solid 4px transparent\">\r\n <p-tableHeaderCheckbox (click)=\"activeItemLote(selectedItems)\"></p-tableHeaderCheckbox>\r\n </th>\r\n }\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]='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 </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 </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]=\"{ 'capitalize': tableCaptalized }\"\r\n >\r\n @if (config.enableSelect) {\r\n <td [style]=\"applyStyle(rowData, { field: 'check-box', header: '' })\">\r\n <!--<p-tableCheckbox *ngIf=\"isVisibleCheckbox(rowData.data)\"-->\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 }\r\n\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 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 @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(rowData, col)}}\r\n </span>\r\n }\r\n\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 >{{ transformValue(rowData, col) }}</span>\r\n </div>\r\n }\r\n </span>\r\n\r\n @if (isImageField(col)) {\r\n <span>\r\n <span>\r\n <img\r\n class=\"image\"\r\n [src]=\"loadImage(rowData, col)\"\r\n />\r\n </span>\r\n </span>\r\n }\r\n\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 <i [ngClass]=\"rowData[col.field] ? 'text-green-500' : 'text-red-500'\"><span\r\n class=\"material-symbols-outlined\"\r\n >\r\n {{ rowData[col.field] ? \"check\" : \"close\" }}\r\n </span>\r\n </i>\r\n }\r\n\r\n @if (isSwitchField(col)) {\r\n <span [class]=\"returnRowClass(rowData, col)\">\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 }\r\n\r\n </ng-template>\r\n </td>\r\n }\r\n\r\n @if (!rowgroup && !col.grouped && !col.template) {\r\n <td\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 @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(rowData, col) }}\r\n </span>\r\n }\r\n\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 >\r\n {{ transformValue(rowData, col) }}</span>\r\n </div>\r\n }\r\n </span>\r\n\r\n @if (isImageField(col)) {\r\n <span>\r\n <span>\r\n <img\r\n class=\"image\"\r\n [src]=\"loadImage(rowData, col)\"\r\n />\r\n </span>\r\n </span>\r\n }\r\n\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\r\n @if (!col.iconField && !isSwitchField(col)) {\r\n <i [ngClass]=\"rowData[col.field] ? 'text-green-500' : 'text-red-500'\"><span\r\n class=\"material-symbols-outlined\"\r\n >\r\n {{ rowData[col.field] ? \"check\" : \"close\" }}\r\n </span>\r\n </i>\r\n }\r\n\r\n @if (isSwitchField(col)) {\r\n <span [class]=\"returnRowClass(rowData, col)\">\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 {{transformValue(rowData, col)}}\r\n </span>\r\n }\r\n\r\n </ng-template>\r\n </td>\r\n }\r\n\r\n @if (col.template) {\r\n <td\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 @if (getCustomTemplate(col.template.name)) {\r\n <ng-container\r\n [ngTemplateOutlet]=\"getCustomTemplate(col.template.name)\"\r\n [ngTemplateOutletContext]=\"{ $implicit: rowData }\"\r\n />\r\n }\r\n </td>\r\n }\r\n\r\n </ng-container>\r\n }\r\n\r\n @if (config.actions && config.actions.length > 0) {\r\n <td [style]=\"applyStyle(rowData, { 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(rowData)\"\r\n > -->\r\n\r\n\r\n <span\r\n class=\"material-symbols-outlined cursor-pointer icon-more-horiz\"\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 <!-- </button> -->\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\r\n </div>\r\n </td>\r\n }\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template\r\n pTemplate=\"emptymessage\"\r\n let-columns\r\n >\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\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/>", styles: ["@charset \"UTF-8\";.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:19px}.material-symbols-outlined.md-22{font-size:22px}.checkbox-container{display:flex;align-items:center;gap:2px;margin-top:5px}#botaoFiltro:hover{color:#a9a9a9}.actionLoteBtns{align-items:center;background-color:transparent;color:#a9a9a9;display:flex;font-size:16px;width:2rem;height:2rem;top:2px;margin-left:.5rem;justify-content:center;text-decoration:none;text-align:justify;padding:12px}#actionLoteBtns:hover,.actionLoteBtns:hover{background-color:#29b92d!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:1;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-table{border-spacing:0px 2px}:host ::ng-deep .p-datatable-header{background-color:#eaeaea!important;padding:2px 13px 0!important;border-radius:5px!important}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-thead>tr>th{background-color:#eaeaea!important}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-thead>tr>th:first-of-type{border-radius:5px 0 0 5px}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-thead>tr>th:last-child{border-radius:0 5px 5px 0}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody>tr>td{border-bottom:1px solid #ddd!important;border-top:1px solid #ddd!important}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody>tr>td:first-of-type{border-left:solid 4px #5289B4!important;border-radius:10px 0 0 10px!important}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody>tr>td:last-child{border-radius:0 10px 10px 0!important;border-right:1px solid #ddd!important}:host ::ng-deep .actionBtns,:host ::ng-deep .actionLoteBtns{border-radius:20%;width:1.625rem!important;height:1.625rem!important;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}@media only screen and (min-width: 768px){.actionLoteBtns{top:-1px}}@media only screen and (max-width: 960px){.rowTable{text-align:right!important}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody>tr>td:has(p-tablecheckbox){border-bottom:0px!important}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody>tr>td:has(img){justify-content:center!important;align-items:center!important}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody>tr>td:has(img) .p-column-title{display:none!important}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody>tr>td:first-of-type{border-left:solid 4px #5289B4!important;border-top:1px solid #ddd!important}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody>tr>td:last-child{border-bottom:1px solid #ddd!important}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody>tr>td:last-child div{justify-content:center!important;align-items:center!important}:host ::ng-deep .p-datatable.p-datatable-sm .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-sm .p-datatable-thead>tr>th:last-of-type{border-radius:0 0 5px!important}::ng-deep .p-datatable.p-datatable-sm .p-datatable-thead>tr>th:first-of-type{border-radius:0 0 0 5px!important}\n"] }]
|
|
5255
5243
|
}], ctorParameters: () => [{ type: i1.DatePipe }, { type: i1.DecimalPipe }, { type: CpfCnpjPipe }, { type: TelefonePipe }], propDecorators: { templates: [{
|
|
5256
5244
|
type: ContentChildren,
|
|
5257
5245
|
args: [TemplateDirective]
|
|
@@ -6857,5 +6845,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImpor
|
|
|
6857
6845
|
* Generated bundle index. Do not edit.
|
|
6858
6846
|
*/
|
|
6859
6847
|
|
|
6860
|
-
export { BaseApiService, BaseChartComponent, BaseComponent, BaseComponentButton, BaseComponentCrud, BaseComponentCrudForm, BaseComponentCrudList, BaseComponentDropDown, BaseComponentDropDownExternal, BaseComponentInput, BaseComponentMultiSelect, BreadcrumbsService, CapitalizePipe, ComponentProviders, ComponentService, CpfCnpjPipe, FormService, KeevoComponentsModule, KeevoValidators, KvAvatarComponent, KvAvatarModule, KvButtonPersonalizeComponent, KvButtonPopupComponent, KvButtonSecondaryComponent, KvButtonSuccessComponent, KvButtonsModule, KvCarouselComponent, KvCarouselModule, KvChartComponent, KvChartModule, KvCheckComponent, KvDropdownComponent, KvEditorComponent, KvErrorComponent, KvFilterCardComponent, KvFilterCardModule, KvGIconComponent, KvGIconModule, KvImageUploadComponent, KvImageUploadModule, KvInputCalendarComponent, KvInputMaskComponent, KvInputNumberComponent, KvInputPasswordComponent, KvInputTextCheckboxComponent, KvInputTextComponent, KvInputTextareaComponent, KvInputTimeComponent, KvInputsModule, KvLoaderComponent, KvLoaderModule, KvLoaderService, KvLoginComponent, KvLoginModule, KvMenuComponent, KvMenuModule, KvModalComponent, KvModalModule, KvMultiSelectComponent, KvOrgchartComponent, KvOrgchartModule, KvPageFormComponent, KvPageFormModule, KvPickListComponent, KvPickListModule, KvProgressBarModule, KvRadioGroupComponent, KvReportComponent, KvReportModule, KvSelectButtonComponent, KvStepperComponent, KvStepperModule, KvSwitchComponent, KvTableComponent, KvTableEditComponent, KvTableEditModule, KvTableExpandableComponent, KvTableExpandableModule, KvTableModule, KvTreeViewComponent, KvTreetableComponent, KvTreetableModule, KvWorkspaceModule, KvtreeViewModule, MaskPipe, NotificationService, ObjectService, PeriodosChart, PipesModule, PrimeNgModule, ProgressBarComponent, TablePaginate, TelefonePipe, TranslatePrimeng, WorkspaceComponent, getOrExecute, kvErrorModule, loading, mapToMenuItem };
|
|
6848
|
+
export { BaseApiService, BaseChartComponent, BaseComponent, BaseComponentButton, BaseComponentCrud, BaseComponentCrudForm, BaseComponentCrudList, BaseComponentDropDown, BaseComponentDropDownExternal, BaseComponentInput, BaseComponentMultiSelect, BasecomponentTable, BreadcrumbsService, CapitalizePipe, ComponentProviders, ComponentService, CpfCnpjPipe, FormService, KeevoComponentsModule, KeevoValidators, KvAvatarComponent, KvAvatarModule, KvButtonPersonalizeComponent, KvButtonPopupComponent, KvButtonSecondaryComponent, KvButtonSuccessComponent, KvButtonsModule, KvCarouselComponent, KvCarouselModule, KvChartComponent, KvChartModule, KvCheckComponent, KvDropdownComponent, KvEditorComponent, KvErrorComponent, KvFilterCardComponent, KvFilterCardModule, KvGIconComponent, KvGIconModule, KvImageUploadComponent, KvImageUploadModule, KvInputCalendarComponent, KvInputMaskComponent, KvInputNumberComponent, KvInputPasswordComponent, KvInputTextCheckboxComponent, KvInputTextComponent, KvInputTextareaComponent, KvInputTimeComponent, KvInputsModule, KvLoaderComponent, KvLoaderModule, KvLoaderService, KvLoginComponent, KvLoginModule, KvMenuComponent, KvMenuModule, KvModalComponent, KvModalModule, KvMultiSelectComponent, KvOrgchartComponent, KvOrgchartModule, KvPageFormComponent, KvPageFormModule, KvPickListComponent, KvPickListModule, KvProgressBarModule, KvRadioGroupComponent, KvReportComponent, KvReportModule, KvSelectButtonComponent, KvStepperComponent, KvStepperModule, KvSwitchComponent, KvTableComponent, KvTableEditComponent, KvTableEditModule, KvTableExpandableComponent, KvTableExpandableModule, KvTableModule, KvTreeViewComponent, KvTreetableComponent, KvTreetableModule, KvWorkspaceModule, KvtreeViewModule, MaskPipe, NotificationService, ObjectService, PeriodosChart, PipesModule, PrimeNgModule, ProgressBarComponent, TablePaginate, TelefonePipe, TranslatePrimeng, WorkspaceComponent, getOrExecute, kvErrorModule, loading, mapToMenuItem };
|
|
6861
6849
|
//# sourceMappingURL=keevo-components.mjs.map
|