keevo-components 1.8.254 → 1.8.256
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-crud-list.mjs +10 -3
- package/esm2022/lib/components/kv-table/kv-table.component.mjs +1 -1
- package/esm2022/lib/components/kv-tree-table/kv-tree-table.component.mjs +17 -4
- package/fesm2022/keevo-components.mjs +508 -490
- package/fesm2022/keevo-components.mjs.map +1 -1
- package/lib/api/base-components/base-component-crud-list.d.ts +3 -0
- package/lib/components/kv-tree-table/kv-tree-table.component.d.ts +4 -1
- package/package.json +1 -1
|
@@ -38,6 +38,10 @@ import { PanelModule } from 'primeng/panel';
|
|
|
38
38
|
import * as i13 from 'primeng/tieredmenu';
|
|
39
39
|
import * as i4$1 from 'primeng/inputswitch';
|
|
40
40
|
import { InputSwitchModule } from 'primeng/inputswitch';
|
|
41
|
+
import * as i8$2 from 'primeng/treetable';
|
|
42
|
+
import { TreeTable, TreeTableModule } from 'primeng/treetable';
|
|
43
|
+
import * as i7 from '@angular/cdk/drag-drop';
|
|
44
|
+
import { moveItemInArray } from '@angular/cdk/drag-drop';
|
|
41
45
|
import * as i10 from 'primeng/divider';
|
|
42
46
|
import { DividerModule } from 'primeng/divider';
|
|
43
47
|
import * as i1$4 from '@angular/common/http';
|
|
@@ -53,7 +57,7 @@ import * as i2$2 from 'primeng/carousel';
|
|
|
53
57
|
import { CarouselModule, Carousel } from 'primeng/carousel';
|
|
54
58
|
import { ChipModule } from 'primeng/chip';
|
|
55
59
|
import { ConfirmDialogModule } from 'primeng/confirmdialog';
|
|
56
|
-
import * as i7$
|
|
60
|
+
import * as i7$2 from 'primeng/contextmenu';
|
|
57
61
|
import { ContextMenuModule } from 'primeng/contextmenu';
|
|
58
62
|
import { DataViewModule } from 'primeng/dataview';
|
|
59
63
|
import { DialogModule } from 'primeng/dialog';
|
|
@@ -71,7 +75,7 @@ import { InputTextareaModule } from 'primeng/inputtextarea';
|
|
|
71
75
|
import { KnobModule } from 'primeng/knob';
|
|
72
76
|
import { MessageModule } from 'primeng/message';
|
|
73
77
|
import { MessagesModule } from 'primeng/messages';
|
|
74
|
-
import * as i7 from 'primeng/multiselect';
|
|
78
|
+
import * as i7$1 from 'primeng/multiselect';
|
|
75
79
|
import { MultiSelectModule } from 'primeng/multiselect';
|
|
76
80
|
import { OverlayModule } from 'primeng/overlay';
|
|
77
81
|
import * as i10$1 from 'primeng/overlaypanel';
|
|
@@ -100,8 +104,6 @@ import { ToastModule } from 'primeng/toast';
|
|
|
100
104
|
import { ToolbarModule } from 'primeng/toolbar';
|
|
101
105
|
import * as i1$6 from 'primeng/tree';
|
|
102
106
|
import { TreeModule } from 'primeng/tree';
|
|
103
|
-
import * as i8$2 from 'primeng/treetable';
|
|
104
|
-
import { TreeTableModule } from 'primeng/treetable';
|
|
105
107
|
import * as i2$3 from 'primeng/selectbutton';
|
|
106
108
|
import { SelectButtonModule } from 'primeng/selectbutton';
|
|
107
109
|
import * as i5$8 from 'primeng/stepper';
|
|
@@ -116,8 +118,6 @@ import { NgxLoadingModule } from 'ngx-loading';
|
|
|
116
118
|
import { ProgressSpinnerModule } from 'primeng/progressspinner';
|
|
117
119
|
import { OrgChart } from 'd3-org-chart';
|
|
118
120
|
import * as d3 from 'd3';
|
|
119
|
-
import * as i7$2 from '@angular/cdk/drag-drop';
|
|
120
|
-
import { moveItemInArray } from '@angular/cdk/drag-drop';
|
|
121
121
|
import { AutoCompleteModule } from 'primeng/autocomplete';
|
|
122
122
|
import * as vkbeautify from 'vkbeautify';
|
|
123
123
|
import * as i1$7 from '@angular/platform-browser';
|
|
@@ -1925,279 +1925,562 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImpor
|
|
|
1925
1925
|
args: ['document:click', ['$event']]
|
|
1926
1926
|
}] } });
|
|
1927
1927
|
|
|
1928
|
-
class
|
|
1929
|
-
constructor(
|
|
1930
|
-
|
|
1931
|
-
this.
|
|
1932
|
-
this.
|
|
1933
|
-
this.
|
|
1934
|
-
this.
|
|
1928
|
+
class KvTreetableComponent {
|
|
1929
|
+
constructor() {
|
|
1930
|
+
this.menuItems = [];
|
|
1931
|
+
this.gridLines = false;
|
|
1932
|
+
this.tableCaptalized = false;
|
|
1933
|
+
this.selectedItems = [];
|
|
1934
|
+
this.paginator = true;
|
|
1935
|
+
this.rows = 10;
|
|
1936
|
+
this.treeTableDraggable = false;
|
|
1937
|
+
this.transferArrayItem = false;
|
|
1938
|
+
this.textoEmptyMessage = 'Nenhum registro encontrado';
|
|
1939
|
+
this.childrenRecoil = true;
|
|
1940
|
+
this.onFilter = new EventEmitter();
|
|
1941
|
+
this.onPaginate = new EventEmitter();
|
|
1942
|
+
this.onActiveItem = new EventEmitter();
|
|
1943
|
+
this.onActiveItemLote = new EventEmitter();
|
|
1944
|
+
this.doubleClickEvent = new EventEmitter();
|
|
1945
|
+
this.onNodeSelect = new EventEmitter();
|
|
1946
|
+
this.onNodeUnselect = new EventEmitter();
|
|
1947
|
+
this.onDropItem = new EventEmitter();
|
|
1935
1948
|
}
|
|
1936
1949
|
ngOnInit() {
|
|
1937
|
-
this.
|
|
1938
|
-
this.
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
this.loadTable(new TablePaginate());
|
|
1950
|
+
this.tamanhoTela = window.innerWidth;
|
|
1951
|
+
if (this.ordenacao) {
|
|
1952
|
+
this.dataSource = this.sortTreeNodes(this.dataSource);
|
|
1953
|
+
}
|
|
1942
1954
|
}
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
* @param event - Registro
|
|
1946
|
-
*/
|
|
1947
|
-
activeItem(event) {
|
|
1948
|
-
this.selectedItem = event;
|
|
1955
|
+
onWindowResize() {
|
|
1956
|
+
this.tamanhoTela = window.innerWidth;
|
|
1949
1957
|
}
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
* @param obs - Observable de carregamento dos dados
|
|
1953
|
-
*/
|
|
1954
|
-
loadData(obs) {
|
|
1955
|
-
obs
|
|
1956
|
-
.pipe(loading())
|
|
1957
|
-
.subscribe({
|
|
1958
|
-
next: (res) => {
|
|
1959
|
-
if (res) {
|
|
1960
|
-
if (Array.isArray(res)) {
|
|
1961
|
-
//Tratamento para retorno do tipo listar ([])
|
|
1962
|
-
this.totalRecords = res.length;
|
|
1963
|
-
this.dataSource = res;
|
|
1964
|
-
}
|
|
1965
|
-
else {
|
|
1966
|
-
//Tratamento para retorno do tipo listarPaginado (<int,[]>)
|
|
1967
|
-
this.totalRecords = res.item1;
|
|
1968
|
-
this.dataSource = res.item2;
|
|
1969
|
-
}
|
|
1970
|
-
}
|
|
1971
|
-
},
|
|
1972
|
-
error: (e) => {
|
|
1973
|
-
this.toastError(e);
|
|
1974
|
-
},
|
|
1975
|
-
});
|
|
1958
|
+
activeItem(rowData) {
|
|
1959
|
+
this.onActiveItem.emit(rowData);
|
|
1976
1960
|
}
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
*/
|
|
1980
|
-
paginate(event) {
|
|
1981
|
-
this.loadTable(event);
|
|
1961
|
+
activeItemLote(rowData) {
|
|
1962
|
+
this.onActiveItemLote.emit(rowData);
|
|
1982
1963
|
}
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
*/
|
|
1986
|
-
refresh() {
|
|
1987
|
-
this.loadTable(new TablePaginate());
|
|
1964
|
+
getOrExecute(action, data) {
|
|
1965
|
+
return getOrExecute(action, data);
|
|
1988
1966
|
}
|
|
1989
|
-
|
|
1990
|
-
this.
|
|
1967
|
+
onGlobalFilter(table, event) {
|
|
1968
|
+
this.onFilter.emit(event.target.value);
|
|
1969
|
+
table.filterGlobal(event.target.value, 'contains');
|
|
1991
1970
|
}
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
1971
|
+
paginate($event) {
|
|
1972
|
+
if ($event) {
|
|
1973
|
+
let paginaInicial = ($event?.first > 0 ? $event.first / $event.rows : $event.first) + 1;
|
|
1974
|
+
let termoPesquisa = '';
|
|
1975
|
+
let ordenacao = '';
|
|
1976
|
+
if ($event.globalFilter)
|
|
1977
|
+
termoPesquisa = $event.globalFilter;
|
|
1978
|
+
if ($event.sortField)
|
|
1979
|
+
ordenacao = `${$event.sortField} ${$event.sortOrder === 1 ? 'ASC' : 'DESC'}`;
|
|
1980
|
+
const objeto = {
|
|
1981
|
+
paginaInicial: paginaInicial,
|
|
1982
|
+
tamanhoPagina: $event.rows,
|
|
1983
|
+
termoPesquisa: termoPesquisa,
|
|
1984
|
+
ordenacao: ordenacao,
|
|
1985
|
+
};
|
|
1986
|
+
this.onPaginate.emit(objeto);
|
|
1987
|
+
}
|
|
1988
|
+
}
|
|
1989
|
+
drop(event) {
|
|
1990
|
+
const draggedNode = event.item.data;
|
|
1991
|
+
const draggedChildData = draggedNode.node.data;
|
|
1992
|
+
if (draggedNode.level === 0) {
|
|
1993
|
+
moveItemInArray(this.dataSource, event.previousIndex, event.currentIndex);
|
|
1994
|
+
}
|
|
1995
|
+
else if (draggedNode.level >= 1) {
|
|
1996
|
+
const parentNode = draggedNode.node.parent;
|
|
1997
|
+
if (parentNode) {
|
|
1998
|
+
const parentChildren = parentNode.children.map((child) => child.data);
|
|
1999
|
+
const previousChildIndex = parentChildren.indexOf(draggedChildData);
|
|
2000
|
+
const relativeCurrentIndex = previousChildIndex + (event.currentIndex - event.previousIndex);
|
|
2001
|
+
const targetChildIndex = Math.max(0, Math.min(parentChildren.length - 1, relativeCurrentIndex));
|
|
2002
|
+
if (previousChildIndex !== -1 && targetChildIndex !== -1) {
|
|
2003
|
+
moveItemInArray(parentNode.children, previousChildIndex, targetChildIndex);
|
|
2004
|
+
}
|
|
2005
|
+
const dropInfo = {
|
|
2006
|
+
previousChildIndex: previousChildIndex + 1,
|
|
2007
|
+
targetChildIndex: targetChildIndex + 1,
|
|
2027
2008
|
};
|
|
2009
|
+
this.onDropItem.emit({ event: event, dropChildInfo: dropInfo });
|
|
2028
2010
|
}
|
|
2029
|
-
}
|
|
2030
|
-
this.
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
this.setPlaceHolder('Selecione um valor');
|
|
2035
|
-
if (!this.lazy)
|
|
2036
|
-
this.carregarCombo();
|
|
2011
|
+
}
|
|
2012
|
+
this.dataSource = [...this.dataSource];
|
|
2013
|
+
if (draggedNode.level === 0) {
|
|
2014
|
+
this.onDropItem.emit(event);
|
|
2015
|
+
}
|
|
2037
2016
|
}
|
|
2038
|
-
|
|
2039
|
-
|
|
2017
|
+
sortTreeNodes(nodes) {
|
|
2018
|
+
return nodes
|
|
2019
|
+
.sort((a, b) => a.data[this.ordenacao] - b.data[this.ordenacao])
|
|
2020
|
+
.map((node) => {
|
|
2021
|
+
if (node.children) {
|
|
2022
|
+
node.children = this.sortTreeNodes(node.children);
|
|
2023
|
+
}
|
|
2024
|
+
return node;
|
|
2025
|
+
});
|
|
2040
2026
|
}
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2027
|
+
calculateTargetChildIndex(event, parentChildren, previousChildIndex) {
|
|
2028
|
+
const targetChildIndex = previousChildIndex + (event.currentIndex - event.previousIndex);
|
|
2029
|
+
if (targetChildIndex < 0) {
|
|
2030
|
+
return 0;
|
|
2031
|
+
}
|
|
2032
|
+
else if (targetChildIndex >= parentChildren.length) {
|
|
2033
|
+
return parentChildren.length - 1;
|
|
2044
2034
|
}
|
|
2045
2035
|
else {
|
|
2046
|
-
|
|
2036
|
+
return targetChildIndex;
|
|
2047
2037
|
}
|
|
2048
2038
|
}
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2039
|
+
// returnStyleRow(col: any, rowNode: any): string {
|
|
2040
|
+
// const isFirstColumn = col.field === this.config.columns[0].field;
|
|
2041
|
+
// const baseOpacity = 1;
|
|
2042
|
+
// const maxLevels = 4;
|
|
2043
|
+
// if (isFirstColumn && rowNode.level >= 0) {
|
|
2044
|
+
// const opacity = baseOpacity - (rowNode.level / maxLevels);
|
|
2045
|
+
// return `border-left: solid 4px rgba(59, 110, 158, ${ opacity }) !important;`;
|
|
2046
|
+
// }
|
|
2047
|
+
// if (rowNode.level == 0)
|
|
2048
|
+
// return 'border-left: none !important; border-right: none !important'
|
|
2049
|
+
// return '';
|
|
2050
|
+
// }
|
|
2051
|
+
criarMenusModal(data) {
|
|
2052
|
+
if (this.config.actions && data) {
|
|
2053
|
+
for (const action of this.config.actions) {
|
|
2054
|
+
const menuInsert = mapToMenuItem(action, data);
|
|
2055
|
+
let item = this.menuItems.filter((x) => x.command == menuInsert.command);
|
|
2056
|
+
if (item.length == 0)
|
|
2057
|
+
this.menuItems.push(menuInsert);
|
|
2058
|
+
else {
|
|
2059
|
+
if (menuInsert.label != item[0].label) {
|
|
2060
|
+
let index = this.menuItems.indexOf(item[0]);
|
|
2061
|
+
this.menuItems.splice(index, 1);
|
|
2062
|
+
}
|
|
2063
|
+
if (menuInsert.visible != item[0].visible) {
|
|
2064
|
+
let index = this.menuItems.indexOf(item[0]);
|
|
2065
|
+
this.menuItems.splice(index, 1);
|
|
2066
|
+
}
|
|
2067
|
+
if (menuInsert.disabled != item[0].disabled) {
|
|
2068
|
+
let index = this.menuItems.indexOf(item[0]);
|
|
2069
|
+
this.menuItems.splice(index, 1);
|
|
2070
|
+
}
|
|
2071
|
+
}
|
|
2072
|
+
}
|
|
2063
2073
|
}
|
|
2064
2074
|
}
|
|
2065
|
-
|
|
2066
|
-
|
|
2075
|
+
exibirCampo(field, rowData) {
|
|
2076
|
+
let visible = field.visible ? field.visible(rowData) : true;
|
|
2077
|
+
return visible;
|
|
2067
2078
|
}
|
|
2068
|
-
|
|
2069
|
-
if (this.
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
this.filteredOptions = opts;
|
|
2074
|
-
});
|
|
2075
|
-
}
|
|
2076
|
-
else
|
|
2077
|
-
this.filteredOptions = [];
|
|
2078
|
-
}
|
|
2079
|
+
validateActionPosition(rowNode) {
|
|
2080
|
+
if (this.config.actionsPai && rowNode.level == 0)
|
|
2081
|
+
return false;
|
|
2082
|
+
else
|
|
2083
|
+
return true;
|
|
2079
2084
|
}
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
closable: false,
|
|
2087
|
-
maximizable: true,
|
|
2088
|
-
data: { popup: true },
|
|
2089
|
-
});
|
|
2090
|
-
ref.onClose.subscribe((id) => {
|
|
2091
|
-
if (id) {
|
|
2092
|
-
this.listar()
|
|
2093
|
-
.pipe(this.loadingCombo())
|
|
2094
|
-
.subscribe((data) => {
|
|
2095
|
-
this.options = data;
|
|
2096
|
-
this.filteredOptions = data;
|
|
2097
|
-
if (id)
|
|
2098
|
-
this.formControl?.setValue(id);
|
|
2099
|
-
});
|
|
2100
|
-
}
|
|
2101
|
-
});
|
|
2085
|
+
doubleClick(e, rowData) {
|
|
2086
|
+
let eventDoubleClick = { event: e, rowData: rowData };
|
|
2087
|
+
let array = [];
|
|
2088
|
+
e.target.classList.forEach((x) => array.push(x));
|
|
2089
|
+
// if (array.find((x: any) => x == 'ng-star-inserted') != undefined)
|
|
2090
|
+
this.doubleClickEvent.emit(eventDoubleClick);
|
|
2102
2091
|
}
|
|
2103
|
-
|
|
2104
|
-
this.
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
if (controlName) {
|
|
2108
|
-
let currentItem = ObjectService.findObject(this.options, controlName, event.value);
|
|
2109
|
-
this.onSelectionChange.emit(currentItem);
|
|
2110
|
-
}
|
|
2111
|
-
}
|
|
2092
|
+
isDisabledCheckbox(rowData, rowNode) {
|
|
2093
|
+
return this.config.disableControlCheckboxFunction
|
|
2094
|
+
? this.config.disableControlCheckboxFunction(rowData, rowNode)
|
|
2095
|
+
: false;
|
|
2112
2096
|
}
|
|
2113
|
-
|
|
2114
|
-
this.
|
|
2097
|
+
onNodeSelected(event) {
|
|
2098
|
+
this.onNodeSelect.emit(event);
|
|
2115
2099
|
}
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2100
|
+
onNodeUnselected(event) {
|
|
2101
|
+
this.onNodeUnselect.emit(event);
|
|
2102
|
+
}
|
|
2103
|
+
getCustomTemplate(templatename) {
|
|
2104
|
+
return this._templates[templatename];
|
|
2105
|
+
}
|
|
2106
|
+
validateShowTemplate(rowNode, col) {
|
|
2107
|
+
if (col.templateOnly) {
|
|
2108
|
+
if (col.templateOnly === 'pai') {
|
|
2109
|
+
return rowNode.level === 0;
|
|
2110
|
+
}
|
|
2111
|
+
if (col.templateOnly === 'filho') {
|
|
2112
|
+
return rowNode.level === 1;
|
|
2124
2113
|
}
|
|
2125
2114
|
}
|
|
2115
|
+
return true;
|
|
2126
2116
|
}
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
let fil = { id: value };
|
|
2130
|
-
this.carregarCombo(fil);
|
|
2131
|
-
this.onLoadCombo.emit(fil);
|
|
2132
|
-
}
|
|
2133
|
-
this.value = value;
|
|
2117
|
+
getIcon(icon) {
|
|
2118
|
+
return icon.includes('pi-') ? `pi ${icon}` : '';
|
|
2134
2119
|
}
|
|
2135
|
-
|
|
2136
|
-
|
|
2120
|
+
align(col) {
|
|
2121
|
+
if (col.centralize)
|
|
2122
|
+
return 'justify-content-center';
|
|
2123
|
+
else if (col.align == 'right')
|
|
2124
|
+
return 'justify-content-end';
|
|
2125
|
+
else
|
|
2126
|
+
return '';
|
|
2127
|
+
}
|
|
2128
|
+
resetTreeTable() {
|
|
2129
|
+
if (this.pTreeTable)
|
|
2130
|
+
this.pTreeTable.reset();
|
|
2131
|
+
if (this.inputField)
|
|
2132
|
+
this.inputField.nativeElement.value = '';
|
|
2133
|
+
}
|
|
2134
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvTreetableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2135
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.8", type: KvTreetableComponent, selector: "kv-tree-table", inputs: { config: "config", dataSource: "dataSource", gridLines: "gridLines", tableCaptalized: "tableCaptalized", selectedItems: "selectedItems", paginator: "paginator", rows: "rows", treeTableDraggable: "treeTableDraggable", transferArrayItem: "transferArrayItem", ordenacao: "ordenacao", totalRecords: "totalRecords", textoEmptyMessage: "textoEmptyMessage", childrenRecoil: "childrenRecoil", pageLinksOptions: "pageLinksOptions", pageLinks: "pageLinks", showFirstLastIcon: "showFirstLastIcon", _templates: ["templates", "_templates"] }, outputs: { onFilter: "onFilter", onPaginate: "onPaginate", onActiveItem: "onActiveItem", onActiveItemLote: "onActiveItemLote", doubleClickEvent: "doubleClickEvent", onNodeSelect: "onNodeSelect", onNodeUnselect: "onNodeUnselect", onDropItem: "onDropItem" }, host: { listeners: { "window:resize": "onWindowResize($event)" } }, queries: [{ propertyName: "templates", predicate: TemplateDirective }], viewQueries: [{ propertyName: "pTreeTable", first: true, predicate: TreeTable, descendants: true }, { propertyName: "inputField", first: true, predicate: ["inputField"], descendants: true }], ngImport: i0, template: "<div *ngIf=\"!treeTableDraggable\">\r\n <p-treeTable\r\n #tt\r\n [value]=\"dataSource\"\r\n [columns]=\"config.columns\"\r\n [resizableColumns]=\"true\"\r\n [tableStyle]=\"{ 'min-width': '50rem' }\"\r\n [resizableColumns]=\"true\"\r\n [paginator]=\"paginator\"\r\n [rows]=\"rows\"\r\n [totalRecords]=\"totalRecords\"\r\n [rowsPerPageOptions]=\"[5, 10, 25, 50]\"\r\n [showFirstLastIcon]=\"tamanhoTela > 960 ? true : false\"\r\n [pageLinks]=\"tamanhoTela > 960 ? 2 : 1\"\r\n [styleClass]=\"gridLines ? 'p-treetable-gridlines' : ''\"\r\n [(selection)]=\"selectedItems\"\r\n [lazy]=\"config.lazy\"\r\n (onLazyLoad)=\"paginate($event)\"\r\n (onNodeSelect)=\"onNodeSelected($event)\"\r\n (onNodeUnselect)=\"onNodeUnselected($event)\"\r\n [showCurrentPageReport]=\"true\"\r\n currentPageReportTemplate=\"{first} - {last} de {totalRecords}\"\r\n >\r\n <ng-template pTemplate=\"caption\" *ngIf=\"config.enableCation\">\r\n <div\r\n class=\"flex flex-row flex-wrap justify-content-between align-items-center grid formgrid p-fluid col-12 m-0\"\r\n style=\"background-color: #eaeaea\"\r\n >\r\n <div class=\"col-12 flex flex-column\">\r\n <div *ngIf=\"config.title\" class=\"text-md font-bold my-3\">\r\n {{ config.title }}\r\n </div>\r\n <div *ngIf=\"config.subtitle\" class=\"text-sm mb-4 font-medium\">\r\n {{ config.subtitle }}\r\n </div>\r\n </div>\r\n\r\n <div\r\n class=\"flex flex-row align-items-center col-10 p-0 md:col-6 lg:col-4 justify-content-center {{\r\n tamanhoTela < 768 ? '' : 'input-search'\r\n }}\"\r\n >\r\n <span *ngIf=\"config.enableFilter\" class=\"p-input-icon-left\">\r\n <i class=\"pi pi-search\"></i>\r\n\r\n <input\r\n pInputText\r\n pAutoFocus\r\n [autofocus]=\"true\"\r\n type=\"text\"\r\n (input)=\"onGlobalFilter(tt, $event)\"\r\n placeholder=\"Pesquisar...\"\r\n class=\"h-2rem\"\r\n />\r\n </span>\r\n </div>\r\n\r\n <div class=\"flex flex-row col-1 justify-content-end p-0\">\r\n <div class=\"flex flex-row gap-2 btns-options\">\r\n @for (action of config.actionsLote; track $index) {\r\n @if((selectedItems.length > 0 || action.showAcoesLote) &&\r\n exibirCampo(action, this.action)) {\r\n <kv-button\r\n (onClick)=\"action?.command(); activeItemLote(selectedItems)\"\r\n [pTooltip]=\"getOrExecute(action.tooltip, selectedItems)\"\r\n [tooltipPosition]=\"'bottom'\"\r\n [disabled]=\"getOrExecute(action.disabled, selectedItems) || false\"\r\n [icon]=\"getOrExecute(action.icon, selectedItems)\"\r\n [severity]=\"action.severity || 'tertiary'\"\r\n />\r\n } }\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n @for(col of columns; track $index){\r\n <th\r\n [ttSortableColumn]=\"col.field\"\r\n [ttSortableColumnDisabled]=\"col.sortable === false\"\r\n class=\"text-sm\"\r\n [style.width]=\"col.width\"\r\n >\r\n <div>\r\n <div [ngClass]=\"{ flex: $index == 0, 'gap-3': $index == 0 }\">\r\n <div *ngIf=\"$index == 0 && config.enableSelect\">\r\n <p-treeTableHeaderCheckbox\r\n (click)=\"activeItemLote(selectedItems)\"\r\n />\r\n </div>\r\n\r\n <div class=\"flex flex-row align-items-center {{ align(col) }}\">\r\n <span>{{ col.header }}</span>\r\n\r\n @if(col.sortable) {\r\n <p-treeTableSortIcon [field]=\"col.field\" />\r\n\r\n }\r\n\r\n <span\r\n *ngIf=\"col.headerTooltip\"\r\n class=\"material-symbols-outlined flex align-items-center\"\r\n [pTooltip]=\"col.headerTooltip\"\r\n >info</span\r\n >\r\n </div>\r\n </div>\r\n </div>\r\n </th>\r\n @if (config.actions?.length ?? 0 > 0) {\r\n <th [style.width]=\"5\"></th>\r\n } }\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n @for (col of columns; track $index) {\r\n <th\r\n [ttSortableColumn]=\"col.field\"\r\n [ttSortableColumnDisabled]=\"col.sortable === false\"\r\n [style.width]=\"col.width\"\r\n >\r\n <div class=\"flex flex-row align-items-center {{ align(col) }}\">\r\n <span>{{ col.header }}</span>\r\n\r\n @if(col.sortable) {\r\n <p-treeTableSortIcon [field]=\"col.field\" />\r\n }\r\n </div>\r\n </th>\r\n } @if (config.actions?.length ?? 0 > 0) {\r\n <th [style.width]=\"5\"></th>\r\n }\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template\r\n pTemplate=\"body\"\r\n let-rowNode\r\n let-rowData=\"rowData\"\r\n let-columns=\"columns\"\r\n >\r\n <tr\r\n [ttRow]=\"rowNode\"\r\n (dblclick)=\"doubleClick($event, rowData)\"\r\n [ngClass]=\"{ capitalize: tableCaptalized }\"\r\n >\r\n @for(col of columns; track $index){\r\n <td\r\n [style.position]=\"rowNode.level !== 0 ? 'sticky' : null\"\r\n [style.left.px]=\"\r\n childrenRecoil && rowNode.level !== 0 ? rowNode.level * 30 : null\r\n \"\r\n [style.borderRight]=\"rowNode.level === 0 ? 'none' : ''\"\r\n [style.borderLeft]=\"\r\n rowNode.level === 0 && col.field != config.columns[0].field\r\n ? 'none'\r\n : ''\r\n \"\r\n >\r\n <div class=\"flex flex-row {{ align(col) }}\">\r\n <div\r\n class=\"w-full-h-full flex align-items-center\"\r\n *ngIf=\"$index == 0\"\r\n >\r\n <p-treeTableToggler class=\"hiddenVisible\" [rowNode]=\"rowNode\" />\r\n\r\n <p-treeTableCheckbox\r\n [disabled]=\"isDisabledCheckbox(rowData, rowNode)\"\r\n (click)=\"activeItemLote(selectedItems)\"\r\n [value]=\"rowNode\"\r\n *ngIf=\"config.enableSelect == true\"\r\n />\r\n </div>\r\n\r\n <div class=\"flex flex-row align-items-center\">\r\n <div\r\n class=\"flex flex-row align-items-center justify-content-center gap-2\"\r\n >\r\n @if(col.tagColor) {\r\n <div\r\n class=\"tag\"\r\n [pTooltip]=\"\r\n col.tooltipTag &&\r\n col.tooltipTag(rowData, col, rowData[col.field])\r\n \"\r\n [style.background-color]=\"\r\n col.tagColor(rowData, col, rowData[col.field])\r\n \"\r\n ></div>\r\n\r\n }\r\n <i\r\n *ngIf=\"col.boolean\"\r\n class=\"pi {{\r\n rowData[col.field] ? 'pi-check text-green-300' : ''\r\n }}\"\r\n style=\"font-size: 1.1rem\"\r\n ></i>\r\n\r\n <div class=\"flex flex-column\" *ngIf=\"!col.boolean\">\r\n <span class=\"m-0\">{{ rowData[col.field] }}</span>\r\n\r\n <p *ngIf=\"col.subtitle\" class=\"m-0 text-xs font-semibold\">\r\n {{ rowData[col.subtitle] }}\r\n </p>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <span *ngIf=\"col.template && validateShowTemplate(rowNode, col)\">\r\n <ng-container\r\n *ngIf=\"getCustomTemplate(col.template.name)\"\r\n [ngTemplateOutlet]=\"getCustomTemplate(col.template.name)\"\r\n [ngTemplateOutletContext]=\"{ $implicit: rowData }\"\r\n >\r\n </ng-container>\r\n </span>\r\n </td>\r\n }\r\n\r\n <td\r\n style=\"border-left: none; text-align: end\"\r\n *ngIf=\"(config.actions?.length ?? 0 > 0) || config.actionsPai\"\r\n >\r\n <div\r\n *ngIf=\"\r\n (config.actions?.length ?? 0 > 0) &&\r\n validateActionPosition(rowNode)\r\n \"\r\n >\r\n <span\r\n class=\"material-symbols-outlined cursor-pointer icon-more-horiz p-1\"\r\n style=\"font-size: 25px\"\r\n (click)=\"menu.toggle($event); activeItem(rowData)\"\r\n >\r\n more_horiz\r\n </span>\r\n\r\n @for(action of config.actions; track $index) {\r\n {{ criarMenusModal(rowData) }}\r\n }\r\n\r\n <p-menu\r\n #menu\r\n [popup]=\"true\"\r\n [model]=\"menuItems\"\r\n appendTo=\"body\"\r\n ></p-menu>\r\n </div>\r\n\r\n @if(config.actionsPai?.length ?? 0 > 0 && rowNode.level == 0){\r\n <div class=\"flex justify-content-end\">\r\n @for (actionPai of config.actionsPai; track $index) { @if\r\n (getOrExecute(actionPai.visible, rowData) ?? true) {\r\n <kv-button\r\n (onClick)=\"activeItem(rowData); actionPai.command($event)\"\r\n [icon]=\"actionPai.icon\"\r\n [severity]=\"actionPai.severity || 'tertiary'\"\r\n />\r\n } }\r\n </div>\r\n }\r\n </td>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"emptymessage\">\r\n <tr>\r\n <td\r\n [attr.colspan]=\"config.columns.length + 1\"\r\n style=\"text-align: center\"\r\n >\r\n {{ textoEmptyMessage }}\r\n </td>\r\n </tr>\r\n </ng-template>\r\n </p-treeTable>\r\n</div>\r\n\r\n<div\r\n *ngIf=\"treeTableDraggable\"\r\n cdkDropList\r\n class=\"example-list\"\r\n (cdkDropListDropped)=\"drop($event)\"\r\n>\r\n <p-treeTable\r\n #tt\r\n [value]=\"dataSource\"\r\n [columns]=\"config.columns\"\r\n [resizableColumns]=\"true\"\r\n [tableStyle]=\"{ 'min-width': '50rem' }\"\r\n [resizableColumns]=\"true\"\r\n [paginator]=\"paginator\"\r\n [rows]=\"rows\"\r\n [pageLinks]=\"pageLinks\"\r\n [totalRecords]=\"totalRecords\"\r\n [rowsPerPageOptions]=\"[5, 10, 25, 50]\"\r\n [showFirstLastIcon]=\"tamanhoTela > 960 ? true : false\"\r\n [pageLinks]=\"tamanhoTela > 960 ? 2 : 1\"\r\n [styleClass]=\"gridLines ? 'p-treetable-gridlines' : ''\"\r\n [(selection)]=\"selectedItems\"\r\n [lazy]=\"config.lazy\"\r\n (onLazyLoad)=\"paginate($event)\"\r\n currentPageReportTemplate=\"{first} - {last} de {{ totalRecords }}\"\r\n >\r\n <ng-template pTemplate=\"caption\" *ngIf=\"config.enableCation\">\r\n <div\r\n class=\"flex flex-row flex-wrap justify-content-between align-items-center grid formgrid p-fluid col-12 m-0\"\r\n style=\"background-color: #eaeaea\"\r\n >\r\n <div class=\"col-12 flex flex-column\">\r\n <div *ngIf=\"config.title\" class=\"text-md font-bold my-3\">\r\n {{ config.title }}\r\n </div>\r\n <div *ngIf=\"config.subtitle\" class=\"text-sm mb-4 font-medium\">\r\n {{ config.subtitle }}\r\n </div>\r\n </div>\r\n\r\n <div\r\n class=\"flex flex-row align-items-center col-10 p-0 md:col-6 lg:col-4 justify-content-center {{\r\n tamanhoTela < 768 ? '' : 'input-search'\r\n }}\"\r\n >\r\n <span *ngIf=\"config.enableFilter\" class=\"p-input-icon-left\">\r\n <i class=\"pi pi-search\"></i>\r\n\r\n <input\r\n pInputText\r\n pAutoFocus\r\n [autofocus]=\"true\"\r\n type=\"text\"\r\n (input)=\"onGlobalFilter(tt, $event)\"\r\n placeholder=\"Pesquisar...\"\r\n class=\"h-2rem\"\r\n #inputField\r\n />\r\n </span>\r\n </div>\r\n\r\n <div class=\"flex flex-row col-1 justify-content-end p-0\">\r\n <div class=\"flex flex-row gap-2 btns-options\">\r\n @for (action of config.actionsLote; track $index) {\r\n @if((selectedItems.length > 0 || action.showAcoesLote) &&\r\n exibirCampo(action, this.action)) {\r\n <kv-button\r\n (onClick)=\"action?.command(); activeItemLote(selectedItems)\"\r\n [pTooltip]=\"getOrExecute(action.tooltip, selectedItems)\"\r\n [tooltipPosition]=\"'bottom'\"\r\n [disabled]=\"getOrExecute(action.disabled, selectedItems) || false\"\r\n [icon]=\"getOrExecute(action.icon, selectedItems)\"\r\n [severity]=\"action.severity || 'tertiary'\"\r\n />\r\n } }\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n @for(col of columns; track $index){\r\n <th\r\n [ttSortableColumn]=\"col.field\"\r\n [ttSortableColumnDisabled]=\"col.sortable === false\"\r\n class=\"text-sm\"\r\n [style.width]=\"col.width\"\r\n >\r\n <div>\r\n <div [ngClass]=\"{ flex: $index == 0, 'gap-3': $index == 0 }\">\r\n <div *ngIf=\"$index == 0 && config.enableSelect\">\r\n <p-treeTableHeaderCheckbox\r\n (click)=\"activeItemLote(selectedItems)\"\r\n />\r\n </div>\r\n\r\n <div class=\"flex flex-row align-items-center {{ align(col) }}\">\r\n <span>{{ col.header }}</span>\r\n\r\n @if(col.sortable) {\r\n <p-treeTableSortIcon [field]=\"col.field\" />\r\n\r\n }\r\n\r\n <span\r\n *ngIf=\"col.headerTooltip\"\r\n class=\"material-symbols-outlined flex align-items-center\"\r\n [pTooltip]=\"col.headerTooltip\"\r\n >info</span\r\n >\r\n </div>\r\n </div>\r\n </div>\r\n </th>\r\n }\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n @for (col of columns; track $index) {\r\n <th\r\n [ttSortableColumn]=\"col.field\"\r\n [ttSortableColumnDisabled]=\"col.sortable === false\"\r\n [style.width]=\"col.width\"\r\n >\r\n <div class=\"flex flex-row align-items-center {{ align(col) }}\">\r\n <span>{{ col.header }}</span>\r\n\r\n @if(col.sortable) {\r\n <p-treeTableSortIcon [field]=\"col.field\" />\r\n\r\n }\r\n </div>\r\n </th>\r\n }\r\n <th [style.width]=\"5\"></th>\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template\r\n pTemplate=\"body\"\r\n let-rowNode\r\n let-rowData=\"rowData\"\r\n let-columns=\"columns\"\r\n >\r\n <tr\r\n cdkDrag\r\n [cdkDragData]=\"rowNode\"\r\n [ttRow]=\"rowNode\"\r\n (dblclick)=\"doubleClick($event, rowData)\"\r\n [ngClass]=\"{ capitalize: tableCaptalized }\"\r\n >\r\n @for(col of columns; track $index){\r\n <td\r\n [style.position]=\"rowNode.level !== 0 ? 'sticky' : null\"\r\n [style.left.px]=\"\r\n childrenRecoil && rowNode.level !== 0 ? rowNode.level * 30 : null\r\n \"\r\n >\r\n <div class=\"flex flex-row {{ align(col) }}\">\r\n <div\r\n class=\"w-full-h-full flex align-items-center\"\r\n *ngIf=\"$index == 0\"\r\n >\r\n <p-treeTableToggler class=\"hiddenVisible\" [rowNode]=\"rowNode\" />\r\n\r\n <p-treeTableCheckbox\r\n [disabled]=\"isDisabledCheckbox(rowData, rowNode)\"\r\n (click)=\"activeItemLote(selectedItems)\"\r\n [value]=\"rowNode\"\r\n *ngIf=\"config.enableSelect == true\"\r\n />\r\n </div>\r\n\r\n <div class=\"flex flex-row align-items-center\">\r\n <div\r\n class=\"flex flex-row align-items-center justify-content-center gap-2\"\r\n >\r\n @if(col.tagColor) {\r\n <div\r\n class=\"tag\"\r\n [pTooltip]=\"\r\n col.tooltipTag &&\r\n col.tooltipTag(rowData, col, rowData[col.field])\r\n \"\r\n [style.background-color]=\"\r\n col.tagColor(rowData, col, rowData[col.field])\r\n \"\r\n ></div>\r\n\r\n }\r\n\r\n <i\r\n *ngIf=\"col.boolean\"\r\n class=\"pi {{\r\n rowData[col.field] ? 'pi-check text-green-300' : ''\r\n }}\"\r\n style=\"font-size: 1.1rem\"\r\n ></i>\r\n\r\n <div class=\"flex flex-column\" *ngIf=\"!col.boolean\">\r\n <span class=\"m-0\">{{ rowData[col.field] }}</span>\r\n\r\n <p *ngIf=\"col.subtitle\" class=\"m-0 text-xs font-semibold\">\r\n {{ rowData[col.subtitle] }}\r\n </p>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <span *ngIf=\"col.template && validateShowTemplate(rowNode, col)\">\r\n <ng-container\r\n *ngIf=\"getCustomTemplate(col.template.name)\"\r\n [ngTemplateOutlet]=\"getCustomTemplate(col.template.name)\"\r\n [ngTemplateOutletContext]=\"{ $implicit: rowData }\"\r\n >\r\n </ng-container>\r\n </span>\r\n </td>\r\n }\r\n\r\n <td\r\n style=\"border-left: none; text-align: end\"\r\n *ngIf=\"(config.actions?.length ?? 0 > 0) || config.actionsPai\"\r\n [style.borderRight]=\"rowNode.level === 0 ? 'none' : ''\"\r\n [style.borderLeft]=\"rowNode.level === 0 ? 'none' : ''\"\r\n >\r\n <div\r\n *ngIf=\"\r\n (config.actions?.length ?? 0 > 0) &&\r\n validateActionPosition(rowNode)\r\n \"\r\n >\r\n <span\r\n class=\"material-symbols-outlined cursor-pointer icon-more-horiz p-1\"\r\n style=\"font-size: 25px\"\r\n (click)=\"menu.toggle($event); activeItem(rowData)\"\r\n >\r\n more_horiz\r\n </span>\r\n\r\n @for(action of config.actions; track $index) {\r\n {{ criarMenusModal(rowData) }}\r\n }\r\n\r\n <p-menu\r\n #menu\r\n [popup]=\"true\"\r\n [model]=\"menuItems\"\r\n appendTo=\"body\"\r\n ></p-menu>\r\n </div>\r\n\r\n @if(config.actionsPai?.length ?? 0 > 0 && rowNode.level == 0){\r\n <div class=\"flex justify-content-end\">\r\n @for (actionPai of config.actionsPai; track $index) {\r\n @if(getOrExecute(actionPai.visible, rowData) ?? true) {\r\n <kv-button\r\n (onClick)=\"activeItem(rowData); actionPai.command($event)\"\r\n [icon]=\"actionPai.icon\"\r\n [severity]=\"actionPai.severity || 'tertiary'\"\r\n />\r\n } }\r\n </div>\r\n }\r\n </td>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"emptymessage\">\r\n <tr>\r\n <td\r\n [attr.colspan]=\"config.columns.length + 1\"\r\n style=\"text-align: center\"\r\n >\r\n {{ textoEmptyMessage }}\r\n </td>\r\n </tr>\r\n </ng-template>\r\n </p-treeTable>\r\n</div>\r\n", styles: ["::ng-deep .p-treetable .p-treetable-tbody>tr>td{padding:.4rem}::ng-deep .p-treetable .p-treetable-header{padding:0rem}span{font-size:14px}:host ::ng-deep .p-treetable table{table-layout:auto!important}.icon-more-horiz:hover,.icon-more-horiz:focus{color:#5e5e5e;transform:scale(1.2);transition:color .3s,transform .3s;background-color:#eaeaea;border-radius:50%}::ng-deep .p-treetable .p-treetable-thead>tr>th{background-color:#eaeaea}.tag{width:5px;height:20px;border-radius:.25rem}.cdk-drag-preview{display:flex;align-items:center;justify-content:space-between;border-radius:10px!important}.cdk-drop-list-dragging{cursor:grabbing}:host ::ng-deep .cdk-drop-list-dragging .cdk-drag{transition:transform .25s cubic-bezier(0,0,.2,1)}:host ::ng-deep .cdk-drag-animating{transition:transform .3s cubic-bezier(0,0,.2,1)}::ng-deep svg.p-icon{width:.7rem;height:1rem}::ng-deep .p-checkbox .p-checkbox-box.p-highlight{border-color:#004172;background:#004172}::ng-deep .p-checkbox .p-checkbox-box.p-highlight:hover{background-color:#002542}::ng-deep .p-checkbox .p-checkbox-box.p-highlight:active{background-color:#002542}::ng-deep .p-checkbox .p-checkbox-box.p-highlight:disabled{background-color:#002542;opacity:.4;cursor:auto}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i5$1.AutoFocus, selector: "[pAutoFocus]", inputs: ["autofocus"] }, { kind: "directive", type: i6.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "directive", type: i9.InputText, selector: "[pInputText]", inputs: ["variant"] }, { kind: "component", type: i5.Menu, selector: "p-menu", inputs: ["model", "popup", "style", "styleClass", "appendTo", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "ariaLabel", "ariaLabelledBy", "id", "tabindex"], outputs: ["onShow", "onHide", "onBlur", "onFocus"] }, { kind: "directive", type: i7.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i7.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "component", type: i8$2.TreeTable, selector: "p-treeTable", inputs: ["columns", "style", "styleClass", "tableStyle", "tableStyleClass", "autoLayout", "lazy", "lazyLoadOnInit", "paginator", "rows", "first", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "customSort", "selectionMode", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "compareSelectionBy", "rowHover", "loading", "loadingIcon", "showLoader", "scrollable", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "frozenColumns", "resizableColumns", "columnResizeMode", "reorderableColumns", "contextMenu", "rowTrackBy", "filters", "globalFilterFields", "filterDelay", "filterMode", "filterLocale", "paginatorLocale", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "value", "virtualRowHeight", "selectionKeys"], outputs: ["selectionChange", "contextMenuSelectionChange", "onFilter", "onNodeExpand", "onNodeCollapse", "onPage", "onSort", "onLazyLoad", "sortFunction", "onColResize", "onColReorder", "onNodeSelect", "onNodeUnselect", "onContextMenuSelect", "onHeaderCheckboxToggle", "onEditInit", "onEditComplete", "onEditCancel", "selectionKeysChange"] }, { kind: "component", type: i8$2.TreeTableToggler, selector: "p-treeTableToggler", inputs: ["rowNode"] }, { kind: "directive", type: i8$2.TTSortableColumn, selector: "[ttSortableColumn]", inputs: ["ttSortableColumn", "ttSortableColumnDisabled"] }, { kind: "component", type: i8$2.TTSortIcon, selector: "p-treeTableSortIcon", inputs: ["field", "ariaLabelDesc", "ariaLabelAsc"] }, { kind: "directive", type: i8$2.TTRow, selector: "[ttRow]", inputs: ["ttRow"] }, { kind: "component", type: i8$2.TTCheckbox, selector: "p-treeTableCheckbox", inputs: ["disabled", "value"] }, { kind: "component", type: i8$2.TTHeaderCheckbox, selector: "p-treeTableHeaderCheckbox" }, { kind: "component", type: KvButtonComponent, selector: "kv-button", inputs: ["label", "icon", "loading", "disabled", "severity", "size", "fullWidth"], outputs: ["onClick"] }] }); }
|
|
2137
2136
|
}
|
|
2138
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type:
|
|
2137
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvTreetableComponent, decorators: [{
|
|
2139
2138
|
type: Component,
|
|
2140
|
-
args: [{
|
|
2141
|
-
|
|
2142
|
-
}]
|
|
2143
|
-
}], ctorParameters: () => [{ type: ComponentService }, { type: i1$3.DialogService }], propDecorators: { filteredOptions: [{
|
|
2139
|
+
args: [{ selector: 'kv-tree-table', template: "<div *ngIf=\"!treeTableDraggable\">\r\n <p-treeTable\r\n #tt\r\n [value]=\"dataSource\"\r\n [columns]=\"config.columns\"\r\n [resizableColumns]=\"true\"\r\n [tableStyle]=\"{ 'min-width': '50rem' }\"\r\n [resizableColumns]=\"true\"\r\n [paginator]=\"paginator\"\r\n [rows]=\"rows\"\r\n [totalRecords]=\"totalRecords\"\r\n [rowsPerPageOptions]=\"[5, 10, 25, 50]\"\r\n [showFirstLastIcon]=\"tamanhoTela > 960 ? true : false\"\r\n [pageLinks]=\"tamanhoTela > 960 ? 2 : 1\"\r\n [styleClass]=\"gridLines ? 'p-treetable-gridlines' : ''\"\r\n [(selection)]=\"selectedItems\"\r\n [lazy]=\"config.lazy\"\r\n (onLazyLoad)=\"paginate($event)\"\r\n (onNodeSelect)=\"onNodeSelected($event)\"\r\n (onNodeUnselect)=\"onNodeUnselected($event)\"\r\n [showCurrentPageReport]=\"true\"\r\n currentPageReportTemplate=\"{first} - {last} de {totalRecords}\"\r\n >\r\n <ng-template pTemplate=\"caption\" *ngIf=\"config.enableCation\">\r\n <div\r\n class=\"flex flex-row flex-wrap justify-content-between align-items-center grid formgrid p-fluid col-12 m-0\"\r\n style=\"background-color: #eaeaea\"\r\n >\r\n <div class=\"col-12 flex flex-column\">\r\n <div *ngIf=\"config.title\" class=\"text-md font-bold my-3\">\r\n {{ config.title }}\r\n </div>\r\n <div *ngIf=\"config.subtitle\" class=\"text-sm mb-4 font-medium\">\r\n {{ config.subtitle }}\r\n </div>\r\n </div>\r\n\r\n <div\r\n class=\"flex flex-row align-items-center col-10 p-0 md:col-6 lg:col-4 justify-content-center {{\r\n tamanhoTela < 768 ? '' : 'input-search'\r\n }}\"\r\n >\r\n <span *ngIf=\"config.enableFilter\" class=\"p-input-icon-left\">\r\n <i class=\"pi pi-search\"></i>\r\n\r\n <input\r\n pInputText\r\n pAutoFocus\r\n [autofocus]=\"true\"\r\n type=\"text\"\r\n (input)=\"onGlobalFilter(tt, $event)\"\r\n placeholder=\"Pesquisar...\"\r\n class=\"h-2rem\"\r\n />\r\n </span>\r\n </div>\r\n\r\n <div class=\"flex flex-row col-1 justify-content-end p-0\">\r\n <div class=\"flex flex-row gap-2 btns-options\">\r\n @for (action of config.actionsLote; track $index) {\r\n @if((selectedItems.length > 0 || action.showAcoesLote) &&\r\n exibirCampo(action, this.action)) {\r\n <kv-button\r\n (onClick)=\"action?.command(); activeItemLote(selectedItems)\"\r\n [pTooltip]=\"getOrExecute(action.tooltip, selectedItems)\"\r\n [tooltipPosition]=\"'bottom'\"\r\n [disabled]=\"getOrExecute(action.disabled, selectedItems) || false\"\r\n [icon]=\"getOrExecute(action.icon, selectedItems)\"\r\n [severity]=\"action.severity || 'tertiary'\"\r\n />\r\n } }\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n @for(col of columns; track $index){\r\n <th\r\n [ttSortableColumn]=\"col.field\"\r\n [ttSortableColumnDisabled]=\"col.sortable === false\"\r\n class=\"text-sm\"\r\n [style.width]=\"col.width\"\r\n >\r\n <div>\r\n <div [ngClass]=\"{ flex: $index == 0, 'gap-3': $index == 0 }\">\r\n <div *ngIf=\"$index == 0 && config.enableSelect\">\r\n <p-treeTableHeaderCheckbox\r\n (click)=\"activeItemLote(selectedItems)\"\r\n />\r\n </div>\r\n\r\n <div class=\"flex flex-row align-items-center {{ align(col) }}\">\r\n <span>{{ col.header }}</span>\r\n\r\n @if(col.sortable) {\r\n <p-treeTableSortIcon [field]=\"col.field\" />\r\n\r\n }\r\n\r\n <span\r\n *ngIf=\"col.headerTooltip\"\r\n class=\"material-symbols-outlined flex align-items-center\"\r\n [pTooltip]=\"col.headerTooltip\"\r\n >info</span\r\n >\r\n </div>\r\n </div>\r\n </div>\r\n </th>\r\n @if (config.actions?.length ?? 0 > 0) {\r\n <th [style.width]=\"5\"></th>\r\n } }\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n @for (col of columns; track $index) {\r\n <th\r\n [ttSortableColumn]=\"col.field\"\r\n [ttSortableColumnDisabled]=\"col.sortable === false\"\r\n [style.width]=\"col.width\"\r\n >\r\n <div class=\"flex flex-row align-items-center {{ align(col) }}\">\r\n <span>{{ col.header }}</span>\r\n\r\n @if(col.sortable) {\r\n <p-treeTableSortIcon [field]=\"col.field\" />\r\n }\r\n </div>\r\n </th>\r\n } @if (config.actions?.length ?? 0 > 0) {\r\n <th [style.width]=\"5\"></th>\r\n }\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template\r\n pTemplate=\"body\"\r\n let-rowNode\r\n let-rowData=\"rowData\"\r\n let-columns=\"columns\"\r\n >\r\n <tr\r\n [ttRow]=\"rowNode\"\r\n (dblclick)=\"doubleClick($event, rowData)\"\r\n [ngClass]=\"{ capitalize: tableCaptalized }\"\r\n >\r\n @for(col of columns; track $index){\r\n <td\r\n [style.position]=\"rowNode.level !== 0 ? 'sticky' : null\"\r\n [style.left.px]=\"\r\n childrenRecoil && rowNode.level !== 0 ? rowNode.level * 30 : null\r\n \"\r\n [style.borderRight]=\"rowNode.level === 0 ? 'none' : ''\"\r\n [style.borderLeft]=\"\r\n rowNode.level === 0 && col.field != config.columns[0].field\r\n ? 'none'\r\n : ''\r\n \"\r\n >\r\n <div class=\"flex flex-row {{ align(col) }}\">\r\n <div\r\n class=\"w-full-h-full flex align-items-center\"\r\n *ngIf=\"$index == 0\"\r\n >\r\n <p-treeTableToggler class=\"hiddenVisible\" [rowNode]=\"rowNode\" />\r\n\r\n <p-treeTableCheckbox\r\n [disabled]=\"isDisabledCheckbox(rowData, rowNode)\"\r\n (click)=\"activeItemLote(selectedItems)\"\r\n [value]=\"rowNode\"\r\n *ngIf=\"config.enableSelect == true\"\r\n />\r\n </div>\r\n\r\n <div class=\"flex flex-row align-items-center\">\r\n <div\r\n class=\"flex flex-row align-items-center justify-content-center gap-2\"\r\n >\r\n @if(col.tagColor) {\r\n <div\r\n class=\"tag\"\r\n [pTooltip]=\"\r\n col.tooltipTag &&\r\n col.tooltipTag(rowData, col, rowData[col.field])\r\n \"\r\n [style.background-color]=\"\r\n col.tagColor(rowData, col, rowData[col.field])\r\n \"\r\n ></div>\r\n\r\n }\r\n <i\r\n *ngIf=\"col.boolean\"\r\n class=\"pi {{\r\n rowData[col.field] ? 'pi-check text-green-300' : ''\r\n }}\"\r\n style=\"font-size: 1.1rem\"\r\n ></i>\r\n\r\n <div class=\"flex flex-column\" *ngIf=\"!col.boolean\">\r\n <span class=\"m-0\">{{ rowData[col.field] }}</span>\r\n\r\n <p *ngIf=\"col.subtitle\" class=\"m-0 text-xs font-semibold\">\r\n {{ rowData[col.subtitle] }}\r\n </p>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <span *ngIf=\"col.template && validateShowTemplate(rowNode, col)\">\r\n <ng-container\r\n *ngIf=\"getCustomTemplate(col.template.name)\"\r\n [ngTemplateOutlet]=\"getCustomTemplate(col.template.name)\"\r\n [ngTemplateOutletContext]=\"{ $implicit: rowData }\"\r\n >\r\n </ng-container>\r\n </span>\r\n </td>\r\n }\r\n\r\n <td\r\n style=\"border-left: none; text-align: end\"\r\n *ngIf=\"(config.actions?.length ?? 0 > 0) || config.actionsPai\"\r\n >\r\n <div\r\n *ngIf=\"\r\n (config.actions?.length ?? 0 > 0) &&\r\n validateActionPosition(rowNode)\r\n \"\r\n >\r\n <span\r\n class=\"material-symbols-outlined cursor-pointer icon-more-horiz p-1\"\r\n style=\"font-size: 25px\"\r\n (click)=\"menu.toggle($event); activeItem(rowData)\"\r\n >\r\n more_horiz\r\n </span>\r\n\r\n @for(action of config.actions; track $index) {\r\n {{ criarMenusModal(rowData) }}\r\n }\r\n\r\n <p-menu\r\n #menu\r\n [popup]=\"true\"\r\n [model]=\"menuItems\"\r\n appendTo=\"body\"\r\n ></p-menu>\r\n </div>\r\n\r\n @if(config.actionsPai?.length ?? 0 > 0 && rowNode.level == 0){\r\n <div class=\"flex justify-content-end\">\r\n @for (actionPai of config.actionsPai; track $index) { @if\r\n (getOrExecute(actionPai.visible, rowData) ?? true) {\r\n <kv-button\r\n (onClick)=\"activeItem(rowData); actionPai.command($event)\"\r\n [icon]=\"actionPai.icon\"\r\n [severity]=\"actionPai.severity || 'tertiary'\"\r\n />\r\n } }\r\n </div>\r\n }\r\n </td>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"emptymessage\">\r\n <tr>\r\n <td\r\n [attr.colspan]=\"config.columns.length + 1\"\r\n style=\"text-align: center\"\r\n >\r\n {{ textoEmptyMessage }}\r\n </td>\r\n </tr>\r\n </ng-template>\r\n </p-treeTable>\r\n</div>\r\n\r\n<div\r\n *ngIf=\"treeTableDraggable\"\r\n cdkDropList\r\n class=\"example-list\"\r\n (cdkDropListDropped)=\"drop($event)\"\r\n>\r\n <p-treeTable\r\n #tt\r\n [value]=\"dataSource\"\r\n [columns]=\"config.columns\"\r\n [resizableColumns]=\"true\"\r\n [tableStyle]=\"{ 'min-width': '50rem' }\"\r\n [resizableColumns]=\"true\"\r\n [paginator]=\"paginator\"\r\n [rows]=\"rows\"\r\n [pageLinks]=\"pageLinks\"\r\n [totalRecords]=\"totalRecords\"\r\n [rowsPerPageOptions]=\"[5, 10, 25, 50]\"\r\n [showFirstLastIcon]=\"tamanhoTela > 960 ? true : false\"\r\n [pageLinks]=\"tamanhoTela > 960 ? 2 : 1\"\r\n [styleClass]=\"gridLines ? 'p-treetable-gridlines' : ''\"\r\n [(selection)]=\"selectedItems\"\r\n [lazy]=\"config.lazy\"\r\n (onLazyLoad)=\"paginate($event)\"\r\n currentPageReportTemplate=\"{first} - {last} de {{ totalRecords }}\"\r\n >\r\n <ng-template pTemplate=\"caption\" *ngIf=\"config.enableCation\">\r\n <div\r\n class=\"flex flex-row flex-wrap justify-content-between align-items-center grid formgrid p-fluid col-12 m-0\"\r\n style=\"background-color: #eaeaea\"\r\n >\r\n <div class=\"col-12 flex flex-column\">\r\n <div *ngIf=\"config.title\" class=\"text-md font-bold my-3\">\r\n {{ config.title }}\r\n </div>\r\n <div *ngIf=\"config.subtitle\" class=\"text-sm mb-4 font-medium\">\r\n {{ config.subtitle }}\r\n </div>\r\n </div>\r\n\r\n <div\r\n class=\"flex flex-row align-items-center col-10 p-0 md:col-6 lg:col-4 justify-content-center {{\r\n tamanhoTela < 768 ? '' : 'input-search'\r\n }}\"\r\n >\r\n <span *ngIf=\"config.enableFilter\" class=\"p-input-icon-left\">\r\n <i class=\"pi pi-search\"></i>\r\n\r\n <input\r\n pInputText\r\n pAutoFocus\r\n [autofocus]=\"true\"\r\n type=\"text\"\r\n (input)=\"onGlobalFilter(tt, $event)\"\r\n placeholder=\"Pesquisar...\"\r\n class=\"h-2rem\"\r\n #inputField\r\n />\r\n </span>\r\n </div>\r\n\r\n <div class=\"flex flex-row col-1 justify-content-end p-0\">\r\n <div class=\"flex flex-row gap-2 btns-options\">\r\n @for (action of config.actionsLote; track $index) {\r\n @if((selectedItems.length > 0 || action.showAcoesLote) &&\r\n exibirCampo(action, this.action)) {\r\n <kv-button\r\n (onClick)=\"action?.command(); activeItemLote(selectedItems)\"\r\n [pTooltip]=\"getOrExecute(action.tooltip, selectedItems)\"\r\n [tooltipPosition]=\"'bottom'\"\r\n [disabled]=\"getOrExecute(action.disabled, selectedItems) || false\"\r\n [icon]=\"getOrExecute(action.icon, selectedItems)\"\r\n [severity]=\"action.severity || 'tertiary'\"\r\n />\r\n } }\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n @for(col of columns; track $index){\r\n <th\r\n [ttSortableColumn]=\"col.field\"\r\n [ttSortableColumnDisabled]=\"col.sortable === false\"\r\n class=\"text-sm\"\r\n [style.width]=\"col.width\"\r\n >\r\n <div>\r\n <div [ngClass]=\"{ flex: $index == 0, 'gap-3': $index == 0 }\">\r\n <div *ngIf=\"$index == 0 && config.enableSelect\">\r\n <p-treeTableHeaderCheckbox\r\n (click)=\"activeItemLote(selectedItems)\"\r\n />\r\n </div>\r\n\r\n <div class=\"flex flex-row align-items-center {{ align(col) }}\">\r\n <span>{{ col.header }}</span>\r\n\r\n @if(col.sortable) {\r\n <p-treeTableSortIcon [field]=\"col.field\" />\r\n\r\n }\r\n\r\n <span\r\n *ngIf=\"col.headerTooltip\"\r\n class=\"material-symbols-outlined flex align-items-center\"\r\n [pTooltip]=\"col.headerTooltip\"\r\n >info</span\r\n >\r\n </div>\r\n </div>\r\n </div>\r\n </th>\r\n }\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n @for (col of columns; track $index) {\r\n <th\r\n [ttSortableColumn]=\"col.field\"\r\n [ttSortableColumnDisabled]=\"col.sortable === false\"\r\n [style.width]=\"col.width\"\r\n >\r\n <div class=\"flex flex-row align-items-center {{ align(col) }}\">\r\n <span>{{ col.header }}</span>\r\n\r\n @if(col.sortable) {\r\n <p-treeTableSortIcon [field]=\"col.field\" />\r\n\r\n }\r\n </div>\r\n </th>\r\n }\r\n <th [style.width]=\"5\"></th>\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template\r\n pTemplate=\"body\"\r\n let-rowNode\r\n let-rowData=\"rowData\"\r\n let-columns=\"columns\"\r\n >\r\n <tr\r\n cdkDrag\r\n [cdkDragData]=\"rowNode\"\r\n [ttRow]=\"rowNode\"\r\n (dblclick)=\"doubleClick($event, rowData)\"\r\n [ngClass]=\"{ capitalize: tableCaptalized }\"\r\n >\r\n @for(col of columns; track $index){\r\n <td\r\n [style.position]=\"rowNode.level !== 0 ? 'sticky' : null\"\r\n [style.left.px]=\"\r\n childrenRecoil && rowNode.level !== 0 ? rowNode.level * 30 : null\r\n \"\r\n >\r\n <div class=\"flex flex-row {{ align(col) }}\">\r\n <div\r\n class=\"w-full-h-full flex align-items-center\"\r\n *ngIf=\"$index == 0\"\r\n >\r\n <p-treeTableToggler class=\"hiddenVisible\" [rowNode]=\"rowNode\" />\r\n\r\n <p-treeTableCheckbox\r\n [disabled]=\"isDisabledCheckbox(rowData, rowNode)\"\r\n (click)=\"activeItemLote(selectedItems)\"\r\n [value]=\"rowNode\"\r\n *ngIf=\"config.enableSelect == true\"\r\n />\r\n </div>\r\n\r\n <div class=\"flex flex-row align-items-center\">\r\n <div\r\n class=\"flex flex-row align-items-center justify-content-center gap-2\"\r\n >\r\n @if(col.tagColor) {\r\n <div\r\n class=\"tag\"\r\n [pTooltip]=\"\r\n col.tooltipTag &&\r\n col.tooltipTag(rowData, col, rowData[col.field])\r\n \"\r\n [style.background-color]=\"\r\n col.tagColor(rowData, col, rowData[col.field])\r\n \"\r\n ></div>\r\n\r\n }\r\n\r\n <i\r\n *ngIf=\"col.boolean\"\r\n class=\"pi {{\r\n rowData[col.field] ? 'pi-check text-green-300' : ''\r\n }}\"\r\n style=\"font-size: 1.1rem\"\r\n ></i>\r\n\r\n <div class=\"flex flex-column\" *ngIf=\"!col.boolean\">\r\n <span class=\"m-0\">{{ rowData[col.field] }}</span>\r\n\r\n <p *ngIf=\"col.subtitle\" class=\"m-0 text-xs font-semibold\">\r\n {{ rowData[col.subtitle] }}\r\n </p>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <span *ngIf=\"col.template && validateShowTemplate(rowNode, col)\">\r\n <ng-container\r\n *ngIf=\"getCustomTemplate(col.template.name)\"\r\n [ngTemplateOutlet]=\"getCustomTemplate(col.template.name)\"\r\n [ngTemplateOutletContext]=\"{ $implicit: rowData }\"\r\n >\r\n </ng-container>\r\n </span>\r\n </td>\r\n }\r\n\r\n <td\r\n style=\"border-left: none; text-align: end\"\r\n *ngIf=\"(config.actions?.length ?? 0 > 0) || config.actionsPai\"\r\n [style.borderRight]=\"rowNode.level === 0 ? 'none' : ''\"\r\n [style.borderLeft]=\"rowNode.level === 0 ? 'none' : ''\"\r\n >\r\n <div\r\n *ngIf=\"\r\n (config.actions?.length ?? 0 > 0) &&\r\n validateActionPosition(rowNode)\r\n \"\r\n >\r\n <span\r\n class=\"material-symbols-outlined cursor-pointer icon-more-horiz p-1\"\r\n style=\"font-size: 25px\"\r\n (click)=\"menu.toggle($event); activeItem(rowData)\"\r\n >\r\n more_horiz\r\n </span>\r\n\r\n @for(action of config.actions; track $index) {\r\n {{ criarMenusModal(rowData) }}\r\n }\r\n\r\n <p-menu\r\n #menu\r\n [popup]=\"true\"\r\n [model]=\"menuItems\"\r\n appendTo=\"body\"\r\n ></p-menu>\r\n </div>\r\n\r\n @if(config.actionsPai?.length ?? 0 > 0 && rowNode.level == 0){\r\n <div class=\"flex justify-content-end\">\r\n @for (actionPai of config.actionsPai; track $index) {\r\n @if(getOrExecute(actionPai.visible, rowData) ?? true) {\r\n <kv-button\r\n (onClick)=\"activeItem(rowData); actionPai.command($event)\"\r\n [icon]=\"actionPai.icon\"\r\n [severity]=\"actionPai.severity || 'tertiary'\"\r\n />\r\n } }\r\n </div>\r\n }\r\n </td>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"emptymessage\">\r\n <tr>\r\n <td\r\n [attr.colspan]=\"config.columns.length + 1\"\r\n style=\"text-align: center\"\r\n >\r\n {{ textoEmptyMessage }}\r\n </td>\r\n </tr>\r\n </ng-template>\r\n </p-treeTable>\r\n</div>\r\n", styles: ["::ng-deep .p-treetable .p-treetable-tbody>tr>td{padding:.4rem}::ng-deep .p-treetable .p-treetable-header{padding:0rem}span{font-size:14px}:host ::ng-deep .p-treetable table{table-layout:auto!important}.icon-more-horiz:hover,.icon-more-horiz:focus{color:#5e5e5e;transform:scale(1.2);transition:color .3s,transform .3s;background-color:#eaeaea;border-radius:50%}::ng-deep .p-treetable .p-treetable-thead>tr>th{background-color:#eaeaea}.tag{width:5px;height:20px;border-radius:.25rem}.cdk-drag-preview{display:flex;align-items:center;justify-content:space-between;border-radius:10px!important}.cdk-drop-list-dragging{cursor:grabbing}:host ::ng-deep .cdk-drop-list-dragging .cdk-drag{transition:transform .25s cubic-bezier(0,0,.2,1)}:host ::ng-deep .cdk-drag-animating{transition:transform .3s cubic-bezier(0,0,.2,1)}::ng-deep svg.p-icon{width:.7rem;height:1rem}::ng-deep .p-checkbox .p-checkbox-box.p-highlight{border-color:#004172;background:#004172}::ng-deep .p-checkbox .p-checkbox-box.p-highlight:hover{background-color:#002542}::ng-deep .p-checkbox .p-checkbox-box.p-highlight:active{background-color:#002542}::ng-deep .p-checkbox .p-checkbox-box.p-highlight:disabled{background-color:#002542;opacity:.4;cursor:auto}\n"] }]
|
|
2140
|
+
}], propDecorators: { config: [{
|
|
2144
2141
|
type: Input
|
|
2145
|
-
}],
|
|
2142
|
+
}], dataSource: [{
|
|
2146
2143
|
type: Input
|
|
2147
|
-
}],
|
|
2144
|
+
}], gridLines: [{
|
|
2148
2145
|
type: Input
|
|
2149
|
-
}],
|
|
2146
|
+
}], tableCaptalized: [{
|
|
2150
2147
|
type: Input
|
|
2151
|
-
}],
|
|
2148
|
+
}], selectedItems: [{
|
|
2152
2149
|
type: Input
|
|
2153
|
-
}],
|
|
2150
|
+
}], paginator: [{
|
|
2154
2151
|
type: Input
|
|
2155
|
-
}],
|
|
2152
|
+
}], rows: [{
|
|
2156
2153
|
type: Input
|
|
2157
|
-
}],
|
|
2154
|
+
}], treeTableDraggable: [{
|
|
2158
2155
|
type: Input
|
|
2159
|
-
}],
|
|
2156
|
+
}], transferArrayItem: [{
|
|
2160
2157
|
type: Input
|
|
2161
|
-
}],
|
|
2158
|
+
}], ordenacao: [{
|
|
2162
2159
|
type: Input
|
|
2163
|
-
}],
|
|
2160
|
+
}], totalRecords: [{
|
|
2164
2161
|
type: Input
|
|
2165
|
-
}],
|
|
2162
|
+
}], textoEmptyMessage: [{
|
|
2166
2163
|
type: Input
|
|
2167
|
-
}],
|
|
2164
|
+
}], childrenRecoil: [{
|
|
2168
2165
|
type: Input
|
|
2169
|
-
}],
|
|
2166
|
+
}], pageLinksOptions: [{
|
|
2170
2167
|
type: Input
|
|
2171
|
-
}],
|
|
2168
|
+
}], pageLinks: [{
|
|
2169
|
+
type: Input
|
|
2170
|
+
}], showFirstLastIcon: [{
|
|
2171
|
+
type: Input
|
|
2172
|
+
}], onFilter: [{
|
|
2172
2173
|
type: Output
|
|
2173
|
-
}],
|
|
2174
|
+
}], onPaginate: [{
|
|
2174
2175
|
type: Output
|
|
2175
|
-
}],
|
|
2176
|
+
}], onActiveItem: [{
|
|
2176
2177
|
type: Output
|
|
2177
|
-
}],
|
|
2178
|
+
}], onActiveItemLote: [{
|
|
2178
2179
|
type: Output
|
|
2179
|
-
}],
|
|
2180
|
+
}], doubleClickEvent: [{
|
|
2180
2181
|
type: Output
|
|
2181
|
-
}],
|
|
2182
|
+
}], onNodeSelect: [{
|
|
2183
|
+
type: Output
|
|
2184
|
+
}], onNodeUnselect: [{
|
|
2182
2185
|
type: Output
|
|
2186
|
+
}], onDropItem: [{
|
|
2187
|
+
type: Output
|
|
2188
|
+
}], templates: [{
|
|
2189
|
+
type: ContentChildren,
|
|
2190
|
+
args: [TemplateDirective]
|
|
2191
|
+
}], _templates: [{
|
|
2192
|
+
type: Input,
|
|
2193
|
+
args: ['templates']
|
|
2194
|
+
}], pTreeTable: [{
|
|
2195
|
+
type: ViewChild,
|
|
2196
|
+
args: [TreeTable]
|
|
2197
|
+
}], inputField: [{
|
|
2198
|
+
type: ViewChild,
|
|
2199
|
+
args: ['inputField']
|
|
2200
|
+
}], onWindowResize: [{
|
|
2201
|
+
type: HostListener,
|
|
2202
|
+
args: ['window:resize', ['$event']]
|
|
2183
2203
|
}] } });
|
|
2184
2204
|
|
|
2185
|
-
class
|
|
2186
|
-
|
|
2187
|
-
|
|
2205
|
+
class BaseComponentCrudList extends BaseComponentCrud {
|
|
2206
|
+
constructor(dialogService, notificationService, router) {
|
|
2207
|
+
super(dialogService, notificationService);
|
|
2208
|
+
this.router = router;
|
|
2209
|
+
this.dataSource = [];
|
|
2210
|
+
this.totalRecords = 0;
|
|
2211
|
+
this.actionsPageList = [];
|
|
2212
|
+
}
|
|
2213
|
+
ngOnInit() {
|
|
2214
|
+
this.loadFilters();
|
|
2215
|
+
this.configureTable();
|
|
2216
|
+
// Tabela não configurada para paginação
|
|
2217
|
+
if (!this.tableConfig?.lazy)
|
|
2218
|
+
this.loadTable(new TablePaginate());
|
|
2219
|
+
}
|
|
2220
|
+
/**
|
|
2221
|
+
* Método que seta o registro selecionado na tabela
|
|
2222
|
+
* @param event - Registro
|
|
2223
|
+
*/
|
|
2224
|
+
activeItem(event) {
|
|
2225
|
+
this.selectedItem = event;
|
|
2226
|
+
}
|
|
2227
|
+
/**
|
|
2228
|
+
* Método que dispara o carregamento da tabela
|
|
2229
|
+
* @param obs - Observable de carregamento dos dados
|
|
2230
|
+
*/
|
|
2231
|
+
loadData(obs) {
|
|
2232
|
+
obs
|
|
2233
|
+
.pipe(loading())
|
|
2234
|
+
.subscribe({
|
|
2235
|
+
next: (res) => {
|
|
2236
|
+
if (res) {
|
|
2237
|
+
if (Array.isArray(res)) {
|
|
2238
|
+
//Tratamento para retorno do tipo listar ([])
|
|
2239
|
+
this.totalRecords = res.length;
|
|
2240
|
+
this.dataSource = res;
|
|
2241
|
+
}
|
|
2242
|
+
else {
|
|
2243
|
+
//Tratamento para retorno do tipo listarPaginado (<int,[]>)
|
|
2244
|
+
this.totalRecords = res.item1;
|
|
2245
|
+
this.dataSource = res.item2;
|
|
2246
|
+
}
|
|
2247
|
+
}
|
|
2248
|
+
},
|
|
2249
|
+
error: (e) => {
|
|
2250
|
+
this.toastError(e);
|
|
2251
|
+
},
|
|
2252
|
+
});
|
|
2253
|
+
}
|
|
2254
|
+
/**
|
|
2255
|
+
* Método que dispara a paginação
|
|
2256
|
+
*/
|
|
2257
|
+
paginate(event) {
|
|
2258
|
+
this.loadTable(event);
|
|
2259
|
+
}
|
|
2260
|
+
/**
|
|
2261
|
+
* Método que dispara a atualização da página inteira
|
|
2262
|
+
*/
|
|
2263
|
+
refresh() {
|
|
2264
|
+
this.loadTable(new TablePaginate());
|
|
2265
|
+
}
|
|
2266
|
+
resetTable() {
|
|
2267
|
+
this.table?.resetTable();
|
|
2268
|
+
}
|
|
2269
|
+
resetTreeTable() {
|
|
2270
|
+
this.treetable?.resetTreeTable();
|
|
2271
|
+
}
|
|
2272
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: BaseComponentCrudList, deps: [{ token: i1$3.DialogService }, { token: NotificationService }, { token: i3$1.Router }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2273
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.8", type: BaseComponentCrudList, selector: "ng-component", viewQueries: [{ propertyName: "table", first: true, predicate: KvTableComponent, descendants: true }, { propertyName: "treetable", first: true, predicate: KvTreetableComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: '', isInline: true }); }
|
|
2188
2274
|
}
|
|
2189
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type:
|
|
2275
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: BaseComponentCrudList, decorators: [{
|
|
2190
2276
|
type: Component,
|
|
2191
|
-
args: [{
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
type:
|
|
2277
|
+
args: [{
|
|
2278
|
+
template: ''
|
|
2279
|
+
}]
|
|
2280
|
+
}], ctorParameters: () => [{ type: i1$3.DialogService }, { type: NotificationService }, { type: i3$1.Router }], propDecorators: { table: [{
|
|
2281
|
+
type: ViewChild,
|
|
2282
|
+
args: [KvTableComponent]
|
|
2283
|
+
}], treetable: [{
|
|
2284
|
+
type: ViewChild,
|
|
2285
|
+
args: [KvTreetableComponent]
|
|
2196
2286
|
}] } });
|
|
2197
2287
|
|
|
2198
|
-
class
|
|
2288
|
+
class BaseComponentDropDown extends BaseComponentInput {
|
|
2199
2289
|
constructor(componentService, dialogService) {
|
|
2200
|
-
super(componentService
|
|
2290
|
+
super(componentService);
|
|
2291
|
+
this.dialogService = dialogService;
|
|
2292
|
+
this.filter = true;
|
|
2293
|
+
this.lazy = false;
|
|
2294
|
+
this.loading = false;
|
|
2295
|
+
this.showAddButton = false;
|
|
2296
|
+
this.showClear = true;
|
|
2297
|
+
this.onAddClick = new EventEmitter();
|
|
2298
|
+
this.onClick = new EventEmitter();
|
|
2299
|
+
this.onLoadCombo = new EventEmitter();
|
|
2300
|
+
this.onSelectionChange = new EventEmitter();
|
|
2301
|
+
this.onSelectionValue = new EventEmitter();
|
|
2302
|
+
this.requestComplete = new EventEmitter();
|
|
2303
|
+
this.loadingCombo = () => {
|
|
2304
|
+
if (!this.lazy) {
|
|
2305
|
+
return (src) => {
|
|
2306
|
+
this.loading = true;
|
|
2307
|
+
return src.pipe(finalize(() => {
|
|
2308
|
+
this.loading = false;
|
|
2309
|
+
}));
|
|
2310
|
+
};
|
|
2311
|
+
}
|
|
2312
|
+
};
|
|
2313
|
+
this.registerOnTouched(() => { });
|
|
2314
|
+
}
|
|
2315
|
+
ngOnInit() {
|
|
2316
|
+
super.ngOnInit();
|
|
2317
|
+
this.setPlaceHolder('Selecione um valor');
|
|
2318
|
+
if (!this.lazy)
|
|
2319
|
+
this.carregarCombo();
|
|
2320
|
+
}
|
|
2321
|
+
addClick(event) {
|
|
2322
|
+
this.onAddClick.emit(event);
|
|
2323
|
+
}
|
|
2324
|
+
carregarCombo(filtro) {
|
|
2325
|
+
if (filtro) {
|
|
2326
|
+
this.carregarComboObs(this.listarCombo(filtro));
|
|
2327
|
+
}
|
|
2328
|
+
else {
|
|
2329
|
+
this.carregarComboObs(this.listar());
|
|
2330
|
+
}
|
|
2331
|
+
}
|
|
2332
|
+
carregarComboObs(obs) {
|
|
2333
|
+
if (obs) {
|
|
2334
|
+
obs
|
|
2335
|
+
.pipe(debounceTime(450), this.loadingCombo())
|
|
2336
|
+
.subscribe({
|
|
2337
|
+
next: (data) => {
|
|
2338
|
+
this.options = data;
|
|
2339
|
+
this.filteredOptions = data;
|
|
2340
|
+
this.requestComplete.emit(true);
|
|
2341
|
+
},
|
|
2342
|
+
error: (error) => {
|
|
2343
|
+
console.log(error);
|
|
2344
|
+
},
|
|
2345
|
+
});
|
|
2346
|
+
}
|
|
2347
|
+
}
|
|
2348
|
+
emptyMessage() {
|
|
2349
|
+
return (this.lazy ? 'Digite para pesquisar' : 'Nenhum resultado encontrado');
|
|
2350
|
+
}
|
|
2351
|
+
filterOptions(field, value) {
|
|
2352
|
+
if (this.options) {
|
|
2353
|
+
let lista = ObjectService.filterObject(this.options, field, value);
|
|
2354
|
+
if (lista?.length > 0) {
|
|
2355
|
+
of(lista).subscribe((opts) => {
|
|
2356
|
+
this.filteredOptions = opts;
|
|
2357
|
+
});
|
|
2358
|
+
}
|
|
2359
|
+
else
|
|
2360
|
+
this.filteredOptions = [];
|
|
2361
|
+
}
|
|
2362
|
+
}
|
|
2363
|
+
listar() { }
|
|
2364
|
+
listarCombo(value) { }
|
|
2365
|
+
openDialog(componentType, width, height) {
|
|
2366
|
+
const ref = this.dialogService.open(componentType, {
|
|
2367
|
+
width: width || '70%',
|
|
2368
|
+
height: height,
|
|
2369
|
+
closable: false,
|
|
2370
|
+
maximizable: true,
|
|
2371
|
+
data: { popup: true },
|
|
2372
|
+
});
|
|
2373
|
+
ref.onClose.subscribe((id) => {
|
|
2374
|
+
if (id) {
|
|
2375
|
+
this.listar()
|
|
2376
|
+
.pipe(this.loadingCombo())
|
|
2377
|
+
.subscribe((data) => {
|
|
2378
|
+
this.options = data;
|
|
2379
|
+
this.filteredOptions = data;
|
|
2380
|
+
if (id)
|
|
2381
|
+
this.formControl?.setValue(id);
|
|
2382
|
+
});
|
|
2383
|
+
}
|
|
2384
|
+
});
|
|
2385
|
+
}
|
|
2386
|
+
onInputChange(event) {
|
|
2387
|
+
this.onSelectionValue.emit(event);
|
|
2388
|
+
if (this.formControl) {
|
|
2389
|
+
const controlName = this.getName(this.formControl);
|
|
2390
|
+
if (controlName) {
|
|
2391
|
+
let currentItem = ObjectService.findObject(this.options, controlName, event.value);
|
|
2392
|
+
this.onSelectionChange.emit(currentItem);
|
|
2393
|
+
}
|
|
2394
|
+
}
|
|
2395
|
+
}
|
|
2396
|
+
onInputClick(event) {
|
|
2397
|
+
this.onClick.emit(event);
|
|
2398
|
+
}
|
|
2399
|
+
onInputFilter(event) {
|
|
2400
|
+
if (event) {
|
|
2401
|
+
if (event.filter) {
|
|
2402
|
+
if (event.filter.length > 2) {
|
|
2403
|
+
let fil = { termoPesquisa: event.filter };
|
|
2404
|
+
this.carregarCombo(fil);
|
|
2405
|
+
this.onLoadCombo.emit(fil);
|
|
2406
|
+
}
|
|
2407
|
+
}
|
|
2408
|
+
}
|
|
2409
|
+
}
|
|
2410
|
+
writeValue(value) {
|
|
2411
|
+
if (this.lazy && value) {
|
|
2412
|
+
let fil = { id: value };
|
|
2413
|
+
this.carregarCombo(fil);
|
|
2414
|
+
this.onLoadCombo.emit(fil);
|
|
2415
|
+
}
|
|
2416
|
+
this.value = value;
|
|
2417
|
+
}
|
|
2418
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: BaseComponentDropDown, deps: [{ token: ComponentService }, { token: i1$3.DialogService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2419
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.8", type: BaseComponentDropDown, selector: "ng-component", inputs: { filteredOptions: "filteredOptions", options: "options", optionLabel: "optionLabel", optionValue: "optionValue", optionDisabled: "optionDisabled", group: "group", optionGroupLabel: "optionGroupLabel", optionGroupChildren: "optionGroupChildren", filter: "filter", lazy: "lazy", loading: "loading", showAddButton: "showAddButton", showClear: "showClear", widthField: "widthField" }, outputs: { onAddClick: "onAddClick", onClick: "onClick", onLoadCombo: "onLoadCombo", onSelectionChange: "onSelectionChange", onSelectionValue: "onSelectionValue", requestComplete: "requestComplete" }, usesInheritance: true, ngImport: i0, template: '', isInline: true }); }
|
|
2420
|
+
}
|
|
2421
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: BaseComponentDropDown, decorators: [{
|
|
2422
|
+
type: Component,
|
|
2423
|
+
args: [{
|
|
2424
|
+
template: '',
|
|
2425
|
+
}]
|
|
2426
|
+
}], ctorParameters: () => [{ type: ComponentService }, { type: i1$3.DialogService }], propDecorators: { filteredOptions: [{
|
|
2427
|
+
type: Input
|
|
2428
|
+
}], options: [{
|
|
2429
|
+
type: Input
|
|
2430
|
+
}], optionLabel: [{
|
|
2431
|
+
type: Input
|
|
2432
|
+
}], optionValue: [{
|
|
2433
|
+
type: Input
|
|
2434
|
+
}], optionDisabled: [{
|
|
2435
|
+
type: Input
|
|
2436
|
+
}], group: [{
|
|
2437
|
+
type: Input
|
|
2438
|
+
}], optionGroupLabel: [{
|
|
2439
|
+
type: Input
|
|
2440
|
+
}], optionGroupChildren: [{
|
|
2441
|
+
type: Input
|
|
2442
|
+
}], filter: [{
|
|
2443
|
+
type: Input
|
|
2444
|
+
}], lazy: [{
|
|
2445
|
+
type: Input
|
|
2446
|
+
}], loading: [{
|
|
2447
|
+
type: Input
|
|
2448
|
+
}], showAddButton: [{
|
|
2449
|
+
type: Input
|
|
2450
|
+
}], showClear: [{
|
|
2451
|
+
type: Input
|
|
2452
|
+
}], widthField: [{
|
|
2453
|
+
type: Input
|
|
2454
|
+
}], onAddClick: [{
|
|
2455
|
+
type: Output
|
|
2456
|
+
}], onClick: [{
|
|
2457
|
+
type: Output
|
|
2458
|
+
}], onLoadCombo: [{
|
|
2459
|
+
type: Output
|
|
2460
|
+
}], onSelectionChange: [{
|
|
2461
|
+
type: Output
|
|
2462
|
+
}], onSelectionValue: [{
|
|
2463
|
+
type: Output
|
|
2464
|
+
}], requestComplete: [{
|
|
2465
|
+
type: Output
|
|
2466
|
+
}] } });
|
|
2467
|
+
|
|
2468
|
+
class KvLabelComponent {
|
|
2469
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvLabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2470
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.8", type: KvLabelComponent, selector: "kv-label", inputs: { componentId: "componentId", label: "label" }, ngImport: i0, template: "<p class=\"m-0\">\r\n <label\r\n [for]=\"componentId\"\r\n class=\"label-style\"\r\n >{{ label }}</label>\r\n</p>", styles: ["::ng-deep .label-style{position:relative;left:1px;font-size:.8rem!important;padding-top:0rem;padding-bottom:0rem}\n"] }); }
|
|
2471
|
+
}
|
|
2472
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvLabelComponent, decorators: [{
|
|
2473
|
+
type: Component,
|
|
2474
|
+
args: [{ selector: 'kv-label', template: "<p class=\"m-0\">\r\n <label\r\n [for]=\"componentId\"\r\n class=\"label-style\"\r\n >{{ label }}</label>\r\n</p>", styles: ["::ng-deep .label-style{position:relative;left:1px;font-size:.8rem!important;padding-top:0rem;padding-bottom:0rem}\n"] }]
|
|
2475
|
+
}], propDecorators: { componentId: [{
|
|
2476
|
+
type: Input
|
|
2477
|
+
}], label: [{
|
|
2478
|
+
type: Input
|
|
2479
|
+
}] } });
|
|
2480
|
+
|
|
2481
|
+
class KvDropdownComponent extends BaseComponentDropDown {
|
|
2482
|
+
constructor(componentService, dialogService) {
|
|
2483
|
+
super(componentService, dialogService);
|
|
2201
2484
|
this.filterPlaceholder = '';
|
|
2202
2485
|
this.placeholder = ' ';
|
|
2203
2486
|
}
|
|
@@ -4328,7 +4611,7 @@ class KvMultiSelectComponent extends BaseComponentMultiSelect {
|
|
|
4328
4611
|
this.maxSelectedLabels = 3;
|
|
4329
4612
|
}
|
|
4330
4613
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvMultiSelectComponent, deps: [{ token: ComponentService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4331
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.8", type: KvMultiSelectComponent, selector: "kv-multi-select", inputs: { group: "group", itemTemplate: "itemTemplate", maxSelectedLabels: "maxSelectedLabels", optionInactive: "optionInactive" }, providers: ComponentProviders(KvMultiSelectComponent), usesInheritance: true, ngImport: i0, template: "<span [ngClass]=\"{'disable': optionInactive === true}\">\r\n <kv-label\r\n [componentId]=\"componentId\"\r\n [label]=\"label && (label + (showAsterisk ? '*' : ''))\"\r\n />\r\n\r\n <p-multiSelect\r\n appendTo=\"body\"\r\n display=\"chip\"\r\n inputId=\"multiselect\"\r\n styleClass=\"inputs\"\r\n [class]=\"baseInputClass\"\r\n [group]=\"group\"\r\n [disabled]=\"disabled\"\r\n [options]=\"options\"\r\n [optionDisabled]=\" inactiveOptions\"\r\n [optionLabel]=\"optionLabel\"\r\n [optionValue]=\"optionValue\"\r\n [filter]=\"filter\"\r\n [showClear]=\"showClear\"\r\n [(ngModel)]=\"value\"\r\n (onChange)=\"selectionChange($event)\"\r\n (onPanelHide)=\"panelHide($event)\"\r\n [maxSelectedLabels]=\"maxSelectedLabels\"\r\n >\r\n\r\n\r\n <ng-template\r\n let-item\r\n pTemplate=\"item\"\r\n *ngIf=\"itemTemplate\"\r\n >\r\n <ng-container\r\n [ngTemplateOutlet]=\"itemTemplate\"\r\n [ngTemplateOutletContext]=\"{ $implicit: item }\"\r\n >\r\n\r\n </ng-container>\r\n </ng-template>\r\n\r\n\r\n </p-multiSelect>\r\n <kv-error [hasError]=\"hasControlError()\">{{ erroMessage() }}</kv-error>\r\n</span>\r\n<ng-content></ng-content>\r\n", styles: [":host ::ng-deep .disable .p-multiselect.p-multiselect-chip .p-multiselect-token .p-icon-wrapper{display:none!important}::ng-deep .p-multiselect.p-multiselect-chip .p-multiselect-token{padding:.1rem .4rem}::ng-deep .p-multiselect-label{padding:.3rem;display:flex}\n", "@charset \"UTF-8\";@import\"https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap\";@import\"https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap\";@import\"https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0\";.material-symbols-outlined{font-family:Material Symbols Outlined!important}*{font-family:Inter var,Inter,sans-serif!important}::ng-deep .p-accordion,::ng-deep .p-accordion-header,::ng-deep .p-accordion-content,::ng-deep .p-badge,::ng-deep .p-overlay-badge,::ng-deep .p-breadcrumb,::ng-deep .p-breadcrumb-item,::ng-deep .p-breadcrumb-link,::ng-deep .p-button,::ng-deep .p-calendar,::ng-deep .p-card,::ng-deep .p-card-title,::ng-deep .p-card-subtitle,::ng-deep .p-card-content,::ng-deep .p-checkbox,::ng-deep .p-chip,::ng-deep .p-confirm-dialog,::ng-deep .p-confirm-dialog-message,::ng-deep .p-contextmenu,::ng-deep .p-contextmenu-item,::ng-deep .p-dataview,::ng-deep .p-dataview-content,::ng-deep .p-dialog,::ng-deep .p-dialog-title,::ng-deep .p-dialog-content,::ng-deep .p-dropdown,::ng-deep .p-dropdown-label,::ng-deep .p-dropdown-item,::ng-deep .p-dynamic-dialog,::ng-deep .p-dynamic-dialog-title,::ng-deep .p-dynamic-dialog-content,::ng-deep .p-editor,::ng-deep .p-fieldset,::ng-deep .p-fieldset-legend,::ng-deep .p-fieldset-content,::ng-deep .p-fileupload,::ng-deep .p-inputmask,::ng-deep .p-inputnumber,::ng-deep .p-inputtextarea,::ng-deep .p-inputtext,::ng-deep .p-menu,::ng-deep .p-menuitem,::ng-deep .p-menuitem-text,::ng-deep .p-message,::ng-deep .p-messages,::ng-deep .p-multiselect,::ng-deep .p-multiselect-label,::ng-deep .p-multiselect-item,::ng-deep .p-panelmenu,::ng-deep .p-panelmenu-header,::ng-deep .p-panelmenu-content,::ng-deep .p-panel,::ng-deep .p-panel-header,::ng-deep .p-panel-content,::ng-deep .p-password,::ng-deep .p-picklist,::ng-deep .p-progressbar,::ng-deep .p-radiobutton,::ng-deep .p-rating,::ng-deep .p-sidebar,::ng-deep .p-splitbutton,::ng-deep .p-steps,::ng-deep .p-step,::ng-deep .p-table,::ng-deep .p-datatable,::ng-deep .p-tabview,::ng-deep .p-tabpanel,::ng-deep .p-tag,::ng-deep .p-toast,::ng-deep .p-toolbar,::ng-deep .p-tooltip,::ng-deep .p-tree,::ng-deep .p-treetable,::ng-deep .p-selectbutton,::ng-deep .p-stepper,::ng-deep .p-inputgroup,::ng-deep .p-inputgroup-addon,::ng-deep .p-text{font-family:Inter var,Inter,sans-serif!important}:host ::ng-deep .inputs{height:35px}:root{--kv-primary-color: #29b92d, --kv-secondary-color: #002542, --kv-terciary-color: #f2f3f5, --kv-primary-hover-color: #249a29, --kv-secondary-hover-color: #002038, --kv-terciary-hover-color: #d9dadb, --kv-primary-active-color: #1c801f, --kv-secondary-active-color: #001729, --kv-terciary-active-color: #c0c1c2, --kv-primary-disable-color: #1c801f, --kv-secondary-disable-color: #001729, --kv-terciary-disable-color: #c0c1c2, }::ng-deep .p-dialog .p-dialog-header{color:#fff!important;background:#002542!important;display:flex!important;flex-wrap:wrap;word-wrap:break-word}::ng-deep .p-dialog .p-dialog-content{padding-top:1rem}::ng-deep .p-dialog{min-width:320px}::ng-deep .p-dialog-content{overflow-x:hidden}::ng-deep .p-dialog-content::-webkit-scrollbar{width:8px}::ng-deep .p-dialog-content::-webkit-scrollbar:hover{background-color:#dededebf}::ng-deep .p-dialog-content::-webkit-scrollbar-thumb{border-radius:4px;background-color:transparent}::ng-deep .p-dialog-content:hover::-webkit-scrollbar-thumb{border-left:2px solid white;background-color:#00000080}::ng-deep .p-dialog-content::-webkit-scrollbar-track{border-left:2px solid white;background-color:#dededebf}::ng-deep .p-dialog-footer{display:flex;justify-content:flex-end;padding:10px;gap:10px}::ng-deep .p-dialog .p-dialog-header .p-dialog-header-icon{display:none}\n"], dependencies: [{ kind: "directive", type: i1.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: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: KvErrorComponent, selector: "kv-error", inputs: ["formControl", "hasError"] }, { kind: "component", type: KvLabelComponent, selector: "kv-label", inputs: ["componentId", "label"] }, { kind: "directive", type: i1$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i7.MultiSelect, selector: "p-multiSelect", inputs: ["id", "ariaLabel", "style", "styleClass", "panelStyle", "panelStyleClass", "inputId", "disabled", "readonly", "group", "filter", "filterPlaceHolder", "filterLocale", "overlayVisible", "tabindex", "variant", "appendTo", "dataKey", "name", "ariaLabelledBy", "displaySelectedLabel", "maxSelectedLabels", "selectionLimit", "selectedItemsLabel", "showToggleAll", "emptyFilterMessage", "emptyMessage", "resetFilterOnHide", "dropdownIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "showHeader", "filterBy", "scrollHeight", "lazy", "virtualScroll", "loading", "virtualScrollItemSize", "loadingIcon", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "display", "autocomplete", "showClear", "autofocus", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "defaultLabel", "placeholder", "options", "filterValue", "itemSize", "selectAll", "focusOnHover", "filterFields", "selectOnFocus", "autoOptionFocus"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onClear", "onPanelShow", "onPanelHide", "onLazyLoad", "onRemove", "onSelectAllChange"] }] }); }
|
|
4614
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.8", type: KvMultiSelectComponent, selector: "kv-multi-select", inputs: { group: "group", itemTemplate: "itemTemplate", maxSelectedLabels: "maxSelectedLabels", optionInactive: "optionInactive" }, providers: ComponentProviders(KvMultiSelectComponent), usesInheritance: true, ngImport: i0, template: "<span [ngClass]=\"{'disable': optionInactive === true}\">\r\n <kv-label\r\n [componentId]=\"componentId\"\r\n [label]=\"label && (label + (showAsterisk ? '*' : ''))\"\r\n />\r\n\r\n <p-multiSelect\r\n appendTo=\"body\"\r\n display=\"chip\"\r\n inputId=\"multiselect\"\r\n styleClass=\"inputs\"\r\n [class]=\"baseInputClass\"\r\n [group]=\"group\"\r\n [disabled]=\"disabled\"\r\n [options]=\"options\"\r\n [optionDisabled]=\" inactiveOptions\"\r\n [optionLabel]=\"optionLabel\"\r\n [optionValue]=\"optionValue\"\r\n [filter]=\"filter\"\r\n [showClear]=\"showClear\"\r\n [(ngModel)]=\"value\"\r\n (onChange)=\"selectionChange($event)\"\r\n (onPanelHide)=\"panelHide($event)\"\r\n [maxSelectedLabels]=\"maxSelectedLabels\"\r\n >\r\n\r\n\r\n <ng-template\r\n let-item\r\n pTemplate=\"item\"\r\n *ngIf=\"itemTemplate\"\r\n >\r\n <ng-container\r\n [ngTemplateOutlet]=\"itemTemplate\"\r\n [ngTemplateOutletContext]=\"{ $implicit: item }\"\r\n >\r\n\r\n </ng-container>\r\n </ng-template>\r\n\r\n\r\n </p-multiSelect>\r\n <kv-error [hasError]=\"hasControlError()\">{{ erroMessage() }}</kv-error>\r\n</span>\r\n<ng-content></ng-content>\r\n", styles: [":host ::ng-deep .disable .p-multiselect.p-multiselect-chip .p-multiselect-token .p-icon-wrapper{display:none!important}::ng-deep .p-multiselect.p-multiselect-chip .p-multiselect-token{padding:.1rem .4rem}::ng-deep .p-multiselect-label{padding:.3rem;display:flex}\n", "@charset \"UTF-8\";@import\"https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap\";@import\"https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap\";@import\"https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0\";.material-symbols-outlined{font-family:Material Symbols Outlined!important}*{font-family:Inter var,Inter,sans-serif!important}::ng-deep .p-accordion,::ng-deep .p-accordion-header,::ng-deep .p-accordion-content,::ng-deep .p-badge,::ng-deep .p-overlay-badge,::ng-deep .p-breadcrumb,::ng-deep .p-breadcrumb-item,::ng-deep .p-breadcrumb-link,::ng-deep .p-button,::ng-deep .p-calendar,::ng-deep .p-card,::ng-deep .p-card-title,::ng-deep .p-card-subtitle,::ng-deep .p-card-content,::ng-deep .p-checkbox,::ng-deep .p-chip,::ng-deep .p-confirm-dialog,::ng-deep .p-confirm-dialog-message,::ng-deep .p-contextmenu,::ng-deep .p-contextmenu-item,::ng-deep .p-dataview,::ng-deep .p-dataview-content,::ng-deep .p-dialog,::ng-deep .p-dialog-title,::ng-deep .p-dialog-content,::ng-deep .p-dropdown,::ng-deep .p-dropdown-label,::ng-deep .p-dropdown-item,::ng-deep .p-dynamic-dialog,::ng-deep .p-dynamic-dialog-title,::ng-deep .p-dynamic-dialog-content,::ng-deep .p-editor,::ng-deep .p-fieldset,::ng-deep .p-fieldset-legend,::ng-deep .p-fieldset-content,::ng-deep .p-fileupload,::ng-deep .p-inputmask,::ng-deep .p-inputnumber,::ng-deep .p-inputtextarea,::ng-deep .p-inputtext,::ng-deep .p-menu,::ng-deep .p-menuitem,::ng-deep .p-menuitem-text,::ng-deep .p-message,::ng-deep .p-messages,::ng-deep .p-multiselect,::ng-deep .p-multiselect-label,::ng-deep .p-multiselect-item,::ng-deep .p-panelmenu,::ng-deep .p-panelmenu-header,::ng-deep .p-panelmenu-content,::ng-deep .p-panel,::ng-deep .p-panel-header,::ng-deep .p-panel-content,::ng-deep .p-password,::ng-deep .p-picklist,::ng-deep .p-progressbar,::ng-deep .p-radiobutton,::ng-deep .p-rating,::ng-deep .p-sidebar,::ng-deep .p-splitbutton,::ng-deep .p-steps,::ng-deep .p-step,::ng-deep .p-table,::ng-deep .p-datatable,::ng-deep .p-tabview,::ng-deep .p-tabpanel,::ng-deep .p-tag,::ng-deep .p-toast,::ng-deep .p-toolbar,::ng-deep .p-tooltip,::ng-deep .p-tree,::ng-deep .p-treetable,::ng-deep .p-selectbutton,::ng-deep .p-stepper,::ng-deep .p-inputgroup,::ng-deep .p-inputgroup-addon,::ng-deep .p-text{font-family:Inter var,Inter,sans-serif!important}:host ::ng-deep .inputs{height:35px}:root{--kv-primary-color: #29b92d, --kv-secondary-color: #002542, --kv-terciary-color: #f2f3f5, --kv-primary-hover-color: #249a29, --kv-secondary-hover-color: #002038, --kv-terciary-hover-color: #d9dadb, --kv-primary-active-color: #1c801f, --kv-secondary-active-color: #001729, --kv-terciary-active-color: #c0c1c2, --kv-primary-disable-color: #1c801f, --kv-secondary-disable-color: #001729, --kv-terciary-disable-color: #c0c1c2, }::ng-deep .p-dialog .p-dialog-header{color:#fff!important;background:#002542!important;display:flex!important;flex-wrap:wrap;word-wrap:break-word}::ng-deep .p-dialog .p-dialog-content{padding-top:1rem}::ng-deep .p-dialog{min-width:320px}::ng-deep .p-dialog-content{overflow-x:hidden}::ng-deep .p-dialog-content::-webkit-scrollbar{width:8px}::ng-deep .p-dialog-content::-webkit-scrollbar:hover{background-color:#dededebf}::ng-deep .p-dialog-content::-webkit-scrollbar-thumb{border-radius:4px;background-color:transparent}::ng-deep .p-dialog-content:hover::-webkit-scrollbar-thumb{border-left:2px solid white;background-color:#00000080}::ng-deep .p-dialog-content::-webkit-scrollbar-track{border-left:2px solid white;background-color:#dededebf}::ng-deep .p-dialog-footer{display:flex;justify-content:flex-end;padding:10px;gap:10px}::ng-deep .p-dialog .p-dialog-header .p-dialog-header-icon{display:none}\n"], dependencies: [{ kind: "directive", type: i1.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: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: KvErrorComponent, selector: "kv-error", inputs: ["formControl", "hasError"] }, { kind: "component", type: KvLabelComponent, selector: "kv-label", inputs: ["componentId", "label"] }, { kind: "directive", type: i1$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i7$1.MultiSelect, selector: "p-multiSelect", inputs: ["id", "ariaLabel", "style", "styleClass", "panelStyle", "panelStyleClass", "inputId", "disabled", "readonly", "group", "filter", "filterPlaceHolder", "filterLocale", "overlayVisible", "tabindex", "variant", "appendTo", "dataKey", "name", "ariaLabelledBy", "displaySelectedLabel", "maxSelectedLabels", "selectionLimit", "selectedItemsLabel", "showToggleAll", "emptyFilterMessage", "emptyMessage", "resetFilterOnHide", "dropdownIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "showHeader", "filterBy", "scrollHeight", "lazy", "virtualScroll", "loading", "virtualScrollItemSize", "loadingIcon", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "display", "autocomplete", "showClear", "autofocus", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "defaultLabel", "placeholder", "options", "filterValue", "itemSize", "selectAll", "focusOnHover", "filterFields", "selectOnFocus", "autoOptionFocus"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onClear", "onPanelShow", "onPanelHide", "onLazyLoad", "onRemove", "onSelectAllChange"] }] }); }
|
|
4332
4615
|
}
|
|
4333
4616
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvMultiSelectComponent, decorators: [{
|
|
4334
4617
|
type: Component,
|
|
@@ -5858,7 +6141,7 @@ class KvTableEditComponent extends BasecomponentTable {
|
|
|
5858
6141
|
}
|
|
5859
6142
|
}
|
|
5860
6143
|
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 }); }
|
|
5861
|
-
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 *ngIf=\"!collapsed\" class=\"pi pi-filter\"></i>\r\n <!-- \u00CDcone quando o painel est\u00E1 aberto -->\r\n <i *ngIf=\"collapsed\" class=\"pi pi-minus\"></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 <ng-template pTemplate=\"caption\" *ngIf=\"config.enableCation || enableSizes\">\r\n <div\r\n class=\"flex flex-row flex-wrap justify-content-between align-items-center grid formgrid p-fluid col-12\"\r\n >\r\n <div class=\"col-12 flex flex-column\">\r\n <div *ngIf=\"config.title\" class=\"text-md font-bold my-3\">\r\n {{ config.title }}\r\n </div>\r\n <div *ngIf=\"config.subtitle\" class=\"text-sm mb-4 font-medium\">\r\n {{ config.subtitle }}\r\n </div>\r\n </div>\r\n\r\n <div\r\n class=\"flex flex-row align-items-center md:col-6 lg:col-4 {{\r\n tamanhoTela < 768 ? 'col-10' : 'col-12'\r\n }} mt-1 mb-2 \"\r\n >\r\n <span *ngIf=\"config.enableFilter\" class=\"p-input-icon-left\">\r\n <i class=\"pi pi-search\"></i>\r\n\r\n <input\r\n pInputText\r\n pAutoFocus\r\n [autofocus]=\"true\"\r\n type=\"text\"\r\n (input)=\"onGlobalFilter(te, $event)\"\r\n placeholder=\"Pesquisar...\"\r\n class=\"h-2rem\"\r\n />\r\n </span>\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 <!-- <p-button icon=\"pi pi-ellipsis-v\"/> -->\r\n\r\n <button\r\n id=\"actionLoteBtns\"\r\n pButton\r\n (click)=\"menu.toggle($event)\"\r\n class=\"actionLoteBtns p-button-raised p-button-text\"\r\n style=\"background-color: #1da750; color: #fff; display: flex\"\r\n >\r\n <span class=\"text-xs\">A</span>\r\n <span class=\"text-md\">A</span>\r\n </button>\r\n\r\n <p-tieredMenu\r\n [style]=\"{ 'font-size': '0.7rem' }\"\r\n styleClass=\"menuSizes\"\r\n appendTo=\"body\"\r\n #menu\r\n [model]=\"sizes\"\r\n [popup]=\"true\"\r\n >\r\n <ng-template let-item pTemplate=\"item\">\r\n <div\r\n class=\"cursor-pointer flex gap-2 align-items-center pl-1 m-2 menu-sizes\"\r\n (click)=\"item.command()\"\r\n >\r\n <div\r\n *ngIf=\"this.selectedSize.size != item.size\"\r\n class=\"tag\"\r\n [style.background-color]=\"'#EAEAEA'\"\r\n ></div>\r\n <div\r\n *ngIf=\"this.selectedSize.size == item.size\"\r\n class=\"tag\"\r\n [style.background-color]=\"'#1DA750'\"\r\n ></div>\r\n\r\n {{ item.label }}\r\n </div>\r\n </ng-template>\r\n </p-tieredMenu>\r\n </div>\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 [mask]=\"true\"\r\n direction=\"right\"\r\n buttonClassName=\"item-circle\"\r\n >\r\n\r\n\r\n\r\n\r\n <ng-template let-item pTemplate=\"item\" >\r\n <div class=\"item-circle cursor-pointer\r\n\r\n shadow-2 hover:shadow-8\r\n\r\n \" (click)=\"item.command()\">\r\n {{item.label}}\r\n </div>\r\n </ng-template>\r\n\r\n </p-speedDial>\r\n </div> -->\r\n </div>\r\n\r\n <span *ngIf=\"isEditing\" class=\"text-aviso\">\r\n Tabela em modo de edi\u00E7\u00E3o\r\n </span>\r\n\r\n <div class=\"flex flex-row col-1 justify-content-end\">\r\n <div\r\n *ngFor=\"let action of config.actionsLote\"\r\n class=\"btns-options flex flex-row\"\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 border-none\"\r\n style=\"background-color: #1da750\"\r\n (click)=\"action?.command(); activeItemLote(selectedItems)\"\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\"\r\n 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\r\n *ngIf=\"isEditableTable()\"\r\n 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 [pTooltip]=\"!isEditing ? 'Habilitar Edi\u00E7\u00E3o' : 'Desabilitar Edi\u00E7\u00E3o'\"\r\n [tooltipPosition]=\"'left'\"\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\"> edit_square </span>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n <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\r\n (click)=\"activeItemLote(selectedItems)\"\r\n ></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 >\r\n </div>\r\n </th>\r\n <th\r\n *ngIf=\"!isEditing && config.actions && config.actions.length > 0\"\r\n ></th>\r\n <th\r\n *ngIf=\"isEditableTable() && this.editMode == 'row'\"\r\n id=\"th-edit\"\r\n style=\"width: 20px\"\r\n >\r\n Editar\r\n </th>\r\n </tr>\r\n </ng-template>\r\n\r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n\r\n <ng-template\r\n pTemplate=\"body\"\r\n let-rowData\r\n let-editing=\"editing\"\r\n let-ri=\"rowIndex\"\r\n let-columns=\"columns\"\r\n let-rowgroup=\"rowgroup\"\r\n let-rowspan=\"rowspan\"\r\n >\r\n <tr\r\n [pEditableRow]=\"rowData\"\r\n [pEditableRowDisabled]=\"false\"\r\n [pContextMenuRow]=\"{rowData, editing}\"\r\n [class]=\"selectedSize.class + '-tr'\"\r\n >\r\n <td\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 <!-- FIXME: Testar a implementa\u00E7\u00E3o abaixo e mesaclar as duas formas -->\r\n\r\n <ng-template #templateInput let-rowData=\"rowData\" let-col=\"col\">\r\n <ng-container *ngIf=\"isEditing; else templatevisualedicao\">\r\n <ng-container [ngSwitch]=\"col.fieldControlType\">\r\n <ng-container *ngSwitchCase=\"'text'\">\r\n <div [style.width]=\"col.width\" class=\"grid formgrid p-fluid\">\r\n <kv-input-text\r\n [disabled]=\"isDisableEditRowCellFunction(rowData, col)\"\r\n class=\"cellControl col\"\r\n [(ngModel)]=\"rowData[col.field]\"\r\n [required]=\"col.required ?? true\"\r\n ></kv-input-text>\r\n </div>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'number'\">\r\n <div [style.width]=\"col.width\" class=\"grid formgrid p-fluid\">\r\n <kv-input-number\r\n [disabled]=\"isDisableEditRowCellFunction(rowData, col)\"\r\n class=\"cellControl col\"\r\n [(ngModel)]=\"rowData[col.field]\"\r\n [required]=\"col.required ?? true\"\r\n ></kv-input-number>\r\n </div>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'mask'\">\r\n <div [style.width]=\"col.width\" class=\"grid formgrid p-fluid\">\r\n <kv-input-mask\r\n [disabled]=\"isDisableEditRowCellFunction(rowData, col)\"\r\n class=\"cellControl col\"\r\n [mask]=\"col.mask\"\r\n [required]=\"col.required ?? true\"\r\n [(ngModel)]=\"rowData[col.field]\"\r\n ></kv-input-mask>\r\n </div>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'switch'\">\r\n <div [style.width]=\"col.width\" class=\"grid formgrid p-fluid\">\r\n <kv-switch\r\n [disabled]=\"isDisableEditRowCellFunction(rowData, col)\"\r\n class=\"cellControl col\"\r\n [(ngModel)]=\"rowData[col.field]\"\r\n ></kv-switch>\r\n </div>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'calendar'\">\r\n <div [style.width]=\"col.width\">\r\n <div\r\n [style.width]=\"col.width\"\r\n class=\"grid formgrid p-fluid\"\r\n >\r\n <kv-input-calendar\r\n class=\"cellControl col\"\r\n [(ngModel)]=\"rowData[col.field]\"\r\n ></kv-input-calendar>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'dropdown'\">\r\n <div [style.width]=\"col.width\" class=\"grid formgrid p-fluid\">\r\n <p-dropdown\r\n [disabled]=\"isDisableEditRowCellFunction(rowData, col)\"\r\n class=\"cellControl col\"\r\n appendTo=\"body\"\r\n [panelStyle]=\"{ 'font-size': '0.75rem' }\"\r\n [optionLabel]=\"col.fieldDropDownControl.descricaoobjeto\"\r\n [optionValue]=\"col.fieldDropDownControl.idobjeto\"\r\n [options]=\"\r\n col.fieldDropDownControl.fieldControlDropdownSource\r\n \"\r\n [(ngModel)]=\"rowData[col.field]\"\r\n >\r\n </p-dropdown>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-template #templatevisualedicao>\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n templateOutput;\r\n context: { rowData: rowData, col: col }\r\n \"\r\n ></ng-container>\r\n </ng-template>\r\n </ng-template>\r\n\r\n <ng-template #templateOutput let-rowData=\"rowData\" let-col=\"col\">\r\n <ng-container [ngSwitch]=\"col.fieldControlType\">\r\n <ng-container *ngSwitchCase=\"'dropdown'\">\r\n <ng-container *ngIf=\"rowData[col.field]\">\r\n {{ transformValueDrop(retornaDescricaoDrop(rowData, col), col) }}\r\n <!-- {{rowData[col.field]}} -->\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'switch'\">\r\n <kv-switch\r\n [(ngModel)]=\"rowData[col.field]\"\r\n [disabled]=\"true\"\r\n ></kv-switch>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'calendar'\">\r\n {{ rowData[col.field] | date }}\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'mask'\">\r\n {{ rowData[col.field] | mask : col.mask }}\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchDefault>\r\n {{ transformValue(rowData, col) }}\r\n </ng-container>\r\n </ng-container>\r\n </ng-template>\r\n\r\n <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\"\r\n [style]=\"\r\n applyStyle(rowData, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col)\r\n \"\r\n [pTooltip]=\"returnTooltipRow(rowData, col)\"\r\n >\r\n <p-cellEditor>\r\n <ng-container>\r\n <ng-template pTemplate=\"input\">\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n templateInput;\r\n context: { rowData: rowData, col: col }\r\n \"\r\n ></ng-container>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"output\">\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n templateOutput;\r\n context: { rowData: rowData, col: col }\r\n \"\r\n ></ng-container>\r\n </ng-template>\r\n </ng-container>\r\n\r\n <!-- <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 </p-cellEditor>\r\n </td>\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\r\n *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\"\r\n [style]=\"\r\n applyStyle(rowData, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col)\r\n \"\r\n [pTooltip]=\"returnTooltipRow(rowData, col)\"\r\n >\r\n <p-cellEditor\r\n [ngClass]=\"{ switch: col.fieldControlType == 'switch' }\"\r\n >\r\n <ng-template pTemplate=\"input\">\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n templateInput;\r\n context: { rowData: rowData, col: col }\r\n \"\r\n ></ng-container>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"output\">\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n templateOutput;\r\n context: { rowData: rowData, col: col }\r\n \"\r\n ></ng-container>\r\n </ng-template>\r\n </p-cellEditor>\r\n </td>\r\n\r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n\r\n <td\r\n *ngIf=\"rowgroup && !col.template\"\r\n [attr.rowspan]=\"rowgroup && col.grouped ? rowspan : null\"\r\n class=\"rowTable\"\r\n [style]=\"\r\n applyStyle(rowData, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col)\r\n \"\r\n [pTooltip]=\"returnTooltipRow(rowData, col)\"\r\n >\r\n <span class=\"p-column-title\">{{ col.header }}:</span>\r\n\r\n <span\r\n *ngIf=\"!isBooleanField(rowData, col); else booleanField\"\r\n [class]=\"returnRowClass(rowData, col)\"\r\n >\r\n <span\r\n *ngIf=\"\r\n !isChipField(col) && !col.iconField && !isImageField(col)\r\n \"\r\n >\r\n <i *ngIf=\"col.icon\" [class]=\"col.icon + ' mr-2'\"></i>\r\n {{ transformValue(rowData, col) }}\r\n </span>\r\n\r\n <div *ngIf=\"isChipField(col) && !col.iconField\">\r\n <span\r\n [class]=\"returnClassChip(rowData, col)\"\r\n [pTooltip]=\"returnTooltipIcon(rowData, col)\"\r\n >{{ transformValue(rowData, col) }}</span\r\n >\r\n </div>\r\n </span>\r\n\r\n <span *ngIf=\"isImageField(col)\">\r\n <span>\r\n <img class=\"image\" [src]=\"loadImage(rowData, col)\" />\r\n </span>\r\n </span>\r\n\r\n <i\r\n *ngIf=\"col.iconField\"\r\n [ngClass]=\"{\r\n 'material-icons': col.indIconMaterial,\r\n 'material-symbols-outlined mr-2': !col.indIconMaterial\r\n }\"\r\n [pTooltip]=\"returnTooltipIcon(rowData, col)\"\r\n >\r\n {{ returnClassIcon(rowData, col) }}\r\n </i>\r\n\r\n <ng-template #booleanField>\r\n <i\r\n *ngIf=\"!col.iconField && !isSwitchField(col)\"\r\n [ngClass]=\"\r\n rowData[col.field] ? 'text-green-500' : 'text-red-500'\r\n \"\r\n ><span class=\"material-symbols-outlined\">\r\n {{ rowData[col.field] ? \"check\" : \"close\" }}\r\n </span>\r\n </i>\r\n\r\n <span\r\n *ngIf=\"isSwitchField(col)\"\r\n [class]=\"returnRowClass(rowData, col)\"\r\n >\r\n <kv-switch\r\n (onSwitchChange)=\"onSwitchChange($event, rowData, col)\"\r\n [disabled]=\"col?.onlyReadField ?? true\"\r\n [switchValue]=\"transformValue(rowData, col)\"\r\n >\r\n </kv-switch>\r\n </span>\r\n </ng-template>\r\n </td>\r\n\r\n <td\r\n *ngIf=\"\r\n !rowgroup &&\r\n !col.grouped &&\r\n !col.template &&\r\n !col.fieldControlType\r\n \"\r\n [style]=\"\r\n applyStyle(rowData, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col)\r\n \"\r\n class=\"rowTable\"\r\n [pTooltip]=\"returnTooltipRow(rowData, col)\"\r\n >\r\n <span class=\"p-column-title\">{{ col.header }}:</span>\r\n\r\n <span\r\n *ngIf=\"!isBooleanField(rowData, col); else booleanField\"\r\n [class]=\"returnRowClass(rowData, col)\"\r\n >\r\n <span\r\n *ngIf=\"\r\n !isChipField(col) && !col.iconField && !isImageField(col)\r\n \"\r\n >\r\n <i *ngIf=\"col.icon\" [class]=\"col.icon + ' mr-2'\"></i>\r\n {{ transformValue(rowData, col) }}\r\n </span>\r\n\r\n <div *ngIf=\"isChipField(col) && !col.iconField\">\r\n <span\r\n [class]=\"returnClassChip(rowData, col)\"\r\n [pTooltip]=\"returnTooltipIcon(rowData, col)\"\r\n >\r\n {{ transformValue(rowData, col) }}</span\r\n >\r\n </div>\r\n </span>\r\n\r\n <span *ngIf=\"isImageField(col)\">\r\n <span>\r\n <img class=\"image\" [src]=\"loadImage(rowData, col)\" />\r\n </span>\r\n </span>\r\n\r\n <i\r\n *ngIf=\"col.iconField\"\r\n [ngClass]=\"{\r\n 'material-icons': col.indIconMaterial,\r\n 'material-symbols-outlined mr-2': !col.indIconMaterial\r\n }\"\r\n [pTooltip]=\"returnTooltipIcon(rowData, col)\"\r\n >\r\n {{ returnClassIcon(rowData, col) }}\r\n </i>\r\n\r\n <ng-template #booleanField>\r\n <i\r\n *ngIf=\"!col.iconField && !isSwitchField(col)\"\r\n [ngClass]=\"\r\n rowData[col.field] ? 'text-green-500' : 'text-red-500'\r\n \"\r\n ><span class=\"material-symbols-outlined\">\r\n {{ rowData[col.field] ? \"check\" : \"close\" }}\r\n </span>\r\n </i>\r\n\r\n <span\r\n *ngIf=\"isSwitchField(col)\"\r\n [class]=\"returnRowClass(rowData, col)\"\r\n >\r\n <kv-switch\r\n (onSwitchChange)=\"onSwitchChange($event, rowData, col)\"\r\n [disabled]=\"col?.onlyReadField ?? true\"\r\n [switchValue]=\"transformValue(rowData, col)\"\r\n >\r\n </kv-switch>\r\n </span>\r\n </ng-template>\r\n </td>\r\n\r\n <td\r\n *ngIf=\"col.template && !isEditableTable()\"\r\n [style]=\"\r\n applyStyle(rowData, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col)\r\n \"\r\n class=\"rowTable\"\r\n >\r\n <span class=\"p-column-title\">{{ col.header }}:</span>\r\n <ng-container\r\n *ngIf=\"getCustomTemplate(col.template.name)\"\r\n [ngTemplateOutlet]=\"getCustomTemplate(col.template.name)\"\r\n [ngTemplateOutletContext]=\"{ $implicit: rowData }\"\r\n >\r\n </ng-container>\r\n </td>\r\n </ng-container>\r\n\r\n <!-- ------------------------------------------------------------------------------------------------------------------------------------------- -->\r\n <!-- Controle de a\u00E7\u00E3o -->\r\n <td\r\n [ngClass]=\"{\r\n 'td-tools': isEditableTable() && this.editMode == 'row',\r\n 'td-tools-sticky': !isEditableTable() || this.editMode == 'cell'\r\n }\"\r\n *ngIf=\"!isEditing && config.actions && config.actions.length > 0\"\r\n [style]=\"\r\n applyStyle(rowData, { field: 'btns-options', header: '' }) +\r\n 'border-right: 1px solid #ddd !important; border-left: 1px solid #ddd !important;'\r\n \"\r\n >\r\n <div class=\"flex flex-row justify-content-end w-full\">\r\n <!-- <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\r\n class=\"td-edit\"\r\n *ngIf=\"this.isEditableTable() && this.editMode == 'row'\"\r\n >\r\n <div class=\"flex align-items-center justify-content-center gap-2\">\r\n <button\r\n [style.height]=\"'28px'\"\r\n [id]=\"'rowEdit' + rowData[config.dataKey]\"\r\n [style.width]=\"'28px'\"\r\n [disabled]=\"isDisableEditRowFunction(rowData)\"\r\n *ngIf=\"!editing\"\r\n pButton\r\n pRipple\r\n type=\"button\"\r\n pInitEditableRow\r\n icon=\"pi pi-pencil\"\r\n (click)=\"onRowEditInit(rowData)\"\r\n class=\"p-button-rounded p-button-text\"\r\n ></button>\r\n <!-- <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\r\n [style.height]=\"'28px'\"\r\n [style.width]=\"'28px'\"\r\n [disabled]=\"isDisableEditRowFunction(rowData)\"\r\n *ngIf=\"editing\"\r\n pButton\r\n pRipple\r\n type=\"button\"\r\n pCancelEditableRow\r\n icon=\"pi pi-times\"\r\n (click)=\"onRowEditCancel(rowData, ri)\"\r\n [id]=\"'rowCancel' + rowData[config.dataKey]\"\r\n class=\"p-button-rounded p-button-text p-button-danger\"\r\n ></button>\r\n </div>\r\n </td>\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}::ng-deep .menuSizes>p-tieredmenusub>.p-tieredmenu-root-list>li:first-child{font-size:.6rem}::ng-deep .menuSizes>p-tieredmenusub>.p-tieredmenu-root-list>li:last-child{font-size:.8rem}.tag{width:5px;height:25px;border-radius:.25rem}:host ::ng-deep .p-speeddial-button.p-button.p-button-icon-only{width:2rem;height:2rem;font-size:1rem}.item-circle{width:4rem;height:2rem;padding:1rem;font-size:.8rem;border-radius:17%;display:flex;align-items:center;justify-content:center;background:#eaeaea!important;box-shadow:#0000003d 0 3px 13px}:host ::ng-deep p-speeddial>div>button>span.material-symbols-outlined.ng-star-inserted{font-size:1.1rem}:host ::ng-deep .check-edit-list>div.p-checkbox.p-component{height:1rem}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td:first-child{border-left:1px solid #ddd!important}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td:last-child{border-right:1px solid #ddd!important}:host ::ng-deep .p-datatable-wrapper::-webkit-scrollbar:hover{background-color:#dededebf}:host ::ng-deep .p-datatable-wrapper::-webkit-scrollbar{width:6px;height:3px}:host ::ng-deep .p-datatable-wrapper:hover::-webkit-scrollbar-thumb{border-left:2px solid white;background-color:#00000080}:host ::ng-deep .p-datatable-wrapper::-webkit-scrollbar-thumb{border-radius:4px;background-color:transparent}:host ::ng-deep .p-datatable-wrapper::-webkit-scrollbar-track{border-left:2px solid white;background-color:#dededebf}:host ::ng-deep .p-datatable>.p-datatable-wrapper{overflow-y:hidden}\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$1.AutoFocus, selector: "[pAutoFocus]", inputs: ["autofocus"] }, { kind: "directive", type: i6.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "directive", type: 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: i9.InputText, selector: "[pInputText]", inputs: ["variant"] }, { kind: "component", type: i5.Menu, selector: "p-menu", inputs: ["model", "popup", "style", "styleClass", "appendTo", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "ariaLabel", "ariaLabelledBy", "id", "tabindex"], outputs: ["onShow", "onHide", "onBlur", "onFocus"] }, { kind: "component", type: i11.Panel, selector: "p-panel", inputs: ["toggleable", "header", "collapsed", "style", "styleClass", "iconPos", "expandIcon", "collapseIcon", "showHeader", "toggler", "transitionOptions"], outputs: ["collapsedChange", "onBeforeToggle", "onAfterToggle"] }, { kind: "directive", type: i2.Ripple, selector: "[pRipple]" }, { kind: "component", type: i13.TieredMenu, selector: "p-tieredMenu", inputs: ["model", "popup", "style", "styleClass", "appendTo", "autoZIndex", "baseZIndex", "autoDisplay", "showTransitionOptions", "hideTransitionOptions", "id", "ariaLabel", "ariaLabelledBy", "disabled", "tabindex"], outputs: ["onShow", "onHide"] }, { kind: "component", type: i14.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll", "virtualRowHeight"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i14.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "directive", type: i14.ContextMenuRow, selector: "[pContextMenuRow]", inputs: ["pContextMenuRow", "pContextMenuRowIndex", "pContextMenuRowDisabled"] }, { kind: "directive", type: i14.ReorderableColumn, selector: "[pReorderableColumn]", inputs: ["pReorderableColumnDisabled"] }, { kind: "directive", type: i14.EditableColumn, selector: "[pEditableColumn]", inputs: ["pEditableColumn", "pEditableColumnField", "pEditableColumnRowIndex", "pEditableColumnDisabled", "pFocusCellSelector"] }, { kind: "component", type: i14.CellEditor, selector: "p-cellEditor" }, { kind: "component", type: i14.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "component", type: i14.TableCheckbox, selector: "p-tableCheckbox", inputs: ["disabled", "value", "index", "inputId", "name", "required", "ariaLabel"] }, { kind: "component", type: i14.TableHeaderCheckbox, selector: "p-tableHeaderCheckbox", inputs: ["disabled", "inputId", "name", "ariaLabel"] }, { kind: "directive", type: i14.EditableRow, selector: "[pEditableRow]", inputs: ["pEditableRow", "pEditableRowDisabled"] }, { kind: "directive", type: i14.InitEditableRow, selector: "[pInitEditableRow]" }, { kind: "directive", type: i14.CancelEditableRow, selector: "[pCancelEditableRow]" }, { kind: "component", type: i15.Toast, selector: "p-toast", inputs: ["key", "autoZIndex", "baseZIndex", "life", "style", "styleClass", "position", "preventOpenDuplicates", "preventDuplicates", "showTransformOptions", "hideTransformOptions", "showTransitionOptions", "hideTransitionOptions", "breakpoints"], outputs: ["onClose"] }, { kind: "directive", type: 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" }] }); }
|
|
6144
|
+
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 *ngIf=\"!collapsed\" class=\"pi pi-filter\"></i>\r\n <!-- \u00CDcone quando o painel est\u00E1 aberto -->\r\n <i *ngIf=\"collapsed\" class=\"pi pi-minus\"></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 <ng-template pTemplate=\"caption\" *ngIf=\"config.enableCation || enableSizes\">\r\n <div\r\n class=\"flex flex-row flex-wrap justify-content-between align-items-center grid formgrid p-fluid col-12\"\r\n >\r\n <div class=\"col-12 flex flex-column\">\r\n <div *ngIf=\"config.title\" class=\"text-md font-bold my-3\">\r\n {{ config.title }}\r\n </div>\r\n <div *ngIf=\"config.subtitle\" class=\"text-sm mb-4 font-medium\">\r\n {{ config.subtitle }}\r\n </div>\r\n </div>\r\n\r\n <div\r\n class=\"flex flex-row align-items-center md:col-6 lg:col-4 {{\r\n tamanhoTela < 768 ? 'col-10' : 'col-12'\r\n }} mt-1 mb-2 \"\r\n >\r\n <span *ngIf=\"config.enableFilter\" class=\"p-input-icon-left\">\r\n <i class=\"pi pi-search\"></i>\r\n\r\n <input\r\n pInputText\r\n pAutoFocus\r\n [autofocus]=\"true\"\r\n type=\"text\"\r\n (input)=\"onGlobalFilter(te, $event)\"\r\n placeholder=\"Pesquisar...\"\r\n class=\"h-2rem\"\r\n />\r\n </span>\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 <!-- <p-button icon=\"pi pi-ellipsis-v\"/> -->\r\n\r\n <button\r\n id=\"actionLoteBtns\"\r\n pButton\r\n (click)=\"menu.toggle($event)\"\r\n class=\"actionLoteBtns p-button-raised p-button-text\"\r\n style=\"background-color: #1da750; color: #fff; display: flex\"\r\n >\r\n <span class=\"text-xs\">A</span>\r\n <span class=\"text-md\">A</span>\r\n </button>\r\n\r\n <p-tieredMenu\r\n [style]=\"{ 'font-size': '0.7rem' }\"\r\n styleClass=\"menuSizes\"\r\n appendTo=\"body\"\r\n #menu\r\n [model]=\"sizes\"\r\n [popup]=\"true\"\r\n >\r\n <ng-template let-item pTemplate=\"item\">\r\n <div\r\n class=\"cursor-pointer flex gap-2 align-items-center pl-1 m-2 menu-sizes\"\r\n (click)=\"item.command()\"\r\n >\r\n <div\r\n *ngIf=\"this.selectedSize.size != item.size\"\r\n class=\"tag\"\r\n [style.background-color]=\"'#EAEAEA'\"\r\n ></div>\r\n <div\r\n *ngIf=\"this.selectedSize.size == item.size\"\r\n class=\"tag\"\r\n [style.background-color]=\"'#1DA750'\"\r\n ></div>\r\n\r\n {{ item.label }}\r\n </div>\r\n </ng-template>\r\n </p-tieredMenu>\r\n </div>\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 [mask]=\"true\"\r\n direction=\"right\"\r\n buttonClassName=\"item-circle\"\r\n >\r\n\r\n\r\n\r\n\r\n <ng-template let-item pTemplate=\"item\" >\r\n <div class=\"item-circle cursor-pointer\r\n\r\n shadow-2 hover:shadow-8\r\n\r\n \" (click)=\"item.command()\">\r\n {{item.label}}\r\n </div>\r\n </ng-template>\r\n\r\n </p-speedDial>\r\n </div> -->\r\n </div>\r\n\r\n <span *ngIf=\"isEditing\" class=\"text-aviso\">\r\n Tabela em modo de edi\u00E7\u00E3o\r\n </span>\r\n\r\n <div class=\"flex flex-row col-1 justify-content-end\">\r\n <div\r\n *ngFor=\"let action of config.actionsLote\"\r\n class=\"btns-options flex flex-row\"\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 border-none\"\r\n style=\"background-color: #1da750\"\r\n (click)=\"action?.command(); activeItemLote(selectedItems)\"\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\"\r\n 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\r\n *ngIf=\"isEditableTable()\"\r\n 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 [pTooltip]=\"!isEditing ? 'Habilitar Edi\u00E7\u00E3o' : 'Desabilitar Edi\u00E7\u00E3o'\"\r\n [tooltipPosition]=\"'left'\"\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\"> edit_square </span>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n <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\r\n (click)=\"activeItemLote(selectedItems)\"\r\n ></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 >\r\n </div>\r\n </th>\r\n <th\r\n *ngIf=\"!isEditing && config.actions && config.actions.length > 0\"\r\n ></th>\r\n <th\r\n *ngIf=\"isEditableTable() && this.editMode == 'row'\"\r\n id=\"th-edit\"\r\n style=\"width: 20px\"\r\n >\r\n Editar\r\n </th>\r\n </tr>\r\n </ng-template>\r\n\r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n\r\n <ng-template\r\n pTemplate=\"body\"\r\n let-rowData\r\n let-editing=\"editing\"\r\n let-ri=\"rowIndex\"\r\n let-columns=\"columns\"\r\n let-rowgroup=\"rowgroup\"\r\n let-rowspan=\"rowspan\"\r\n >\r\n <tr\r\n [pEditableRow]=\"rowData\"\r\n [pEditableRowDisabled]=\"false\"\r\n [pContextMenuRow]=\"{rowData, editing}\"\r\n [class]=\"selectedSize.class + '-tr'\"\r\n >\r\n <td\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 <!-- FIXME: Testar a implementa\u00E7\u00E3o abaixo e mesaclar as duas formas -->\r\n\r\n <ng-template #templateInput let-rowData=\"rowData\" let-col=\"col\">\r\n <ng-container *ngIf=\"isEditing; else templatevisualedicao\">\r\n <ng-container [ngSwitch]=\"col.fieldControlType\">\r\n <ng-container *ngSwitchCase=\"'text'\">\r\n <div [style.width]=\"col.width\" class=\"grid formgrid p-fluid\">\r\n <kv-input-text\r\n [disabled]=\"isDisableEditRowCellFunction(rowData, col)\"\r\n class=\"cellControl col\"\r\n [(ngModel)]=\"rowData[col.field]\"\r\n [required]=\"col.required ?? true\"\r\n ></kv-input-text>\r\n </div>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'number'\">\r\n <div [style.width]=\"col.width\" class=\"grid formgrid p-fluid\">\r\n <kv-input-number\r\n [disabled]=\"isDisableEditRowCellFunction(rowData, col)\"\r\n class=\"cellControl col\"\r\n [(ngModel)]=\"rowData[col.field]\"\r\n [required]=\"col.required ?? true\"\r\n ></kv-input-number>\r\n </div>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'mask'\">\r\n <div [style.width]=\"col.width\" class=\"grid formgrid p-fluid\">\r\n <kv-input-mask\r\n [disabled]=\"isDisableEditRowCellFunction(rowData, col)\"\r\n class=\"cellControl col\"\r\n [mask]=\"col.mask\"\r\n [required]=\"col.required ?? true\"\r\n [(ngModel)]=\"rowData[col.field]\"\r\n ></kv-input-mask>\r\n </div>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'switch'\">\r\n <div [style.width]=\"col.width\" class=\"grid formgrid p-fluid\">\r\n <kv-switch\r\n [disabled]=\"isDisableEditRowCellFunction(rowData, col)\"\r\n class=\"cellControl col\"\r\n [(ngModel)]=\"rowData[col.field]\"\r\n ></kv-switch>\r\n </div>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'calendar'\">\r\n <div [style.width]=\"col.width\">\r\n <div\r\n [style.width]=\"col.width\"\r\n class=\"grid formgrid p-fluid\"\r\n >\r\n <kv-input-calendar\r\n class=\"cellControl col\"\r\n [(ngModel)]=\"rowData[col.field]\"\r\n ></kv-input-calendar>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'dropdown'\">\r\n <div [style.width]=\"col.width\" class=\"grid formgrid p-fluid\">\r\n <p-dropdown\r\n [disabled]=\"isDisableEditRowCellFunction(rowData, col)\"\r\n class=\"cellControl col\"\r\n appendTo=\"body\"\r\n [panelStyle]=\"{ 'font-size': '0.75rem' }\"\r\n [optionLabel]=\"col.fieldDropDownControl.descricaoobjeto\"\r\n [optionValue]=\"col.fieldDropDownControl.idobjeto\"\r\n [options]=\"\r\n col.fieldDropDownControl.fieldControlDropdownSource\r\n \"\r\n [(ngModel)]=\"rowData[col.field]\"\r\n >\r\n </p-dropdown>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-template #templatevisualedicao>\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n templateOutput;\r\n context: { rowData: rowData, col: col }\r\n \"\r\n ></ng-container>\r\n </ng-template>\r\n </ng-template>\r\n\r\n <ng-template #templateOutput let-rowData=\"rowData\" let-col=\"col\">\r\n <ng-container [ngSwitch]=\"col.fieldControlType\">\r\n <ng-container *ngSwitchCase=\"'dropdown'\">\r\n <ng-container *ngIf=\"rowData[col.field]\">\r\n {{ transformValueDrop(retornaDescricaoDrop(rowData, col), col) }}\r\n <!-- {{rowData[col.field]}} -->\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'switch'\">\r\n <kv-switch\r\n [(ngModel)]=\"rowData[col.field]\"\r\n [disabled]=\"true\"\r\n ></kv-switch>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'calendar'\">\r\n {{ rowData[col.field] | date }}\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'mask'\">\r\n {{ rowData[col.field] | mask : col.mask }}\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchDefault>\r\n {{ transformValue(rowData, col) }}\r\n </ng-container>\r\n </ng-container>\r\n </ng-template>\r\n\r\n <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\"\r\n [style]=\"\r\n applyStyle(rowData, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col)\r\n \"\r\n [pTooltip]=\"returnTooltipRow(rowData, col)\"\r\n >\r\n <p-cellEditor>\r\n <ng-container>\r\n <ng-template pTemplate=\"input\">\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n templateInput;\r\n context: { rowData: rowData, col: col }\r\n \"\r\n ></ng-container>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"output\">\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n templateOutput;\r\n context: { rowData: rowData, col: col }\r\n \"\r\n ></ng-container>\r\n </ng-template>\r\n </ng-container>\r\n\r\n <!-- <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 </p-cellEditor>\r\n </td>\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\r\n *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\"\r\n [style]=\"\r\n applyStyle(rowData, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col)\r\n \"\r\n [pTooltip]=\"returnTooltipRow(rowData, col)\"\r\n >\r\n <p-cellEditor\r\n [ngClass]=\"{ switch: col.fieldControlType == 'switch' }\"\r\n >\r\n <ng-template pTemplate=\"input\">\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n templateInput;\r\n context: { rowData: rowData, col: col }\r\n \"\r\n ></ng-container>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"output\">\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n templateOutput;\r\n context: { rowData: rowData, col: col }\r\n \"\r\n ></ng-container>\r\n </ng-template>\r\n </p-cellEditor>\r\n </td>\r\n\r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n\r\n <td\r\n *ngIf=\"rowgroup && !col.template\"\r\n [attr.rowspan]=\"rowgroup && col.grouped ? rowspan : null\"\r\n class=\"rowTable\"\r\n [style]=\"\r\n applyStyle(rowData, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col)\r\n \"\r\n [pTooltip]=\"returnTooltipRow(rowData, col)\"\r\n >\r\n <span class=\"p-column-title\">{{ col.header }}:</span>\r\n\r\n <span\r\n *ngIf=\"!isBooleanField(rowData, col); else booleanField\"\r\n [class]=\"returnRowClass(rowData, col)\"\r\n >\r\n <span\r\n *ngIf=\"\r\n !isChipField(col) && !col.iconField && !isImageField(col)\r\n \"\r\n >\r\n <i *ngIf=\"col.icon\" [class]=\"col.icon + ' mr-2'\"></i>\r\n {{ transformValue(rowData, col) }}\r\n </span>\r\n\r\n <div *ngIf=\"isChipField(col) && !col.iconField\">\r\n <span\r\n [class]=\"returnClassChip(rowData, col)\"\r\n [pTooltip]=\"returnTooltipIcon(rowData, col)\"\r\n >{{ transformValue(rowData, col) }}</span\r\n >\r\n </div>\r\n </span>\r\n\r\n <span *ngIf=\"isImageField(col)\">\r\n <span>\r\n <img class=\"image\" [src]=\"loadImage(rowData, col)\" />\r\n </span>\r\n </span>\r\n\r\n <i\r\n *ngIf=\"col.iconField\"\r\n [ngClass]=\"{\r\n 'material-icons': col.indIconMaterial,\r\n 'material-symbols-outlined mr-2': !col.indIconMaterial\r\n }\"\r\n [pTooltip]=\"returnTooltipIcon(rowData, col)\"\r\n >\r\n {{ returnClassIcon(rowData, col) }}\r\n </i>\r\n\r\n <ng-template #booleanField>\r\n <i\r\n *ngIf=\"!col.iconField && !isSwitchField(col)\"\r\n [ngClass]=\"\r\n rowData[col.field] ? 'text-green-500' : 'text-red-500'\r\n \"\r\n ><span class=\"material-symbols-outlined\">\r\n {{ rowData[col.field] ? \"check\" : \"close\" }}\r\n </span>\r\n </i>\r\n\r\n <span\r\n *ngIf=\"isSwitchField(col)\"\r\n [class]=\"returnRowClass(rowData, col)\"\r\n >\r\n <kv-switch\r\n (onSwitchChange)=\"onSwitchChange($event, rowData, col)\"\r\n [disabled]=\"col?.onlyReadField ?? true\"\r\n [switchValue]=\"transformValue(rowData, col)\"\r\n >\r\n </kv-switch>\r\n </span>\r\n </ng-template>\r\n </td>\r\n\r\n <td\r\n *ngIf=\"\r\n !rowgroup &&\r\n !col.grouped &&\r\n !col.template &&\r\n !col.fieldControlType\r\n \"\r\n [style]=\"\r\n applyStyle(rowData, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col)\r\n \"\r\n class=\"rowTable\"\r\n [pTooltip]=\"returnTooltipRow(rowData, col)\"\r\n >\r\n <span class=\"p-column-title\">{{ col.header }}:</span>\r\n\r\n <span\r\n *ngIf=\"!isBooleanField(rowData, col); else booleanField\"\r\n [class]=\"returnRowClass(rowData, col)\"\r\n >\r\n <span\r\n *ngIf=\"\r\n !isChipField(col) && !col.iconField && !isImageField(col)\r\n \"\r\n >\r\n <i *ngIf=\"col.icon\" [class]=\"col.icon + ' mr-2'\"></i>\r\n {{ transformValue(rowData, col) }}\r\n </span>\r\n\r\n <div *ngIf=\"isChipField(col) && !col.iconField\">\r\n <span\r\n [class]=\"returnClassChip(rowData, col)\"\r\n [pTooltip]=\"returnTooltipIcon(rowData, col)\"\r\n >\r\n {{ transformValue(rowData, col) }}</span\r\n >\r\n </div>\r\n </span>\r\n\r\n <span *ngIf=\"isImageField(col)\">\r\n <span>\r\n <img class=\"image\" [src]=\"loadImage(rowData, col)\" />\r\n </span>\r\n </span>\r\n\r\n <i\r\n *ngIf=\"col.iconField\"\r\n [ngClass]=\"{\r\n 'material-icons': col.indIconMaterial,\r\n 'material-symbols-outlined mr-2': !col.indIconMaterial\r\n }\"\r\n [pTooltip]=\"returnTooltipIcon(rowData, col)\"\r\n >\r\n {{ returnClassIcon(rowData, col) }}\r\n </i>\r\n\r\n <ng-template #booleanField>\r\n <i\r\n *ngIf=\"!col.iconField && !isSwitchField(col)\"\r\n [ngClass]=\"\r\n rowData[col.field] ? 'text-green-500' : 'text-red-500'\r\n \"\r\n ><span class=\"material-symbols-outlined\">\r\n {{ rowData[col.field] ? \"check\" : \"close\" }}\r\n </span>\r\n </i>\r\n\r\n <span\r\n *ngIf=\"isSwitchField(col)\"\r\n [class]=\"returnRowClass(rowData, col)\"\r\n >\r\n <kv-switch\r\n (onSwitchChange)=\"onSwitchChange($event, rowData, col)\"\r\n [disabled]=\"col?.onlyReadField ?? true\"\r\n [switchValue]=\"transformValue(rowData, col)\"\r\n >\r\n </kv-switch>\r\n </span>\r\n </ng-template>\r\n </td>\r\n\r\n <td\r\n *ngIf=\"col.template && !isEditableTable()\"\r\n [style]=\"\r\n applyStyle(rowData, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col)\r\n \"\r\n class=\"rowTable\"\r\n >\r\n <span class=\"p-column-title\">{{ col.header }}:</span>\r\n <ng-container\r\n *ngIf=\"getCustomTemplate(col.template.name)\"\r\n [ngTemplateOutlet]=\"getCustomTemplate(col.template.name)\"\r\n [ngTemplateOutletContext]=\"{ $implicit: rowData }\"\r\n >\r\n </ng-container>\r\n </td>\r\n </ng-container>\r\n\r\n <!-- ------------------------------------------------------------------------------------------------------------------------------------------- -->\r\n <!-- Controle de a\u00E7\u00E3o -->\r\n <td\r\n [ngClass]=\"{\r\n 'td-tools': isEditableTable() && this.editMode == 'row',\r\n 'td-tools-sticky': !isEditableTable() || this.editMode == 'cell'\r\n }\"\r\n *ngIf=\"!isEditing && config.actions && config.actions.length > 0\"\r\n [style]=\"\r\n applyStyle(rowData, { field: 'btns-options', header: '' }) +\r\n 'border-right: 1px solid #ddd !important; border-left: 1px solid #ddd !important;'\r\n \"\r\n >\r\n <div class=\"flex flex-row justify-content-end w-full\">\r\n <!-- <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\r\n class=\"td-edit\"\r\n *ngIf=\"this.isEditableTable() && this.editMode == 'row'\"\r\n >\r\n <div class=\"flex align-items-center justify-content-center gap-2\">\r\n <button\r\n [style.height]=\"'28px'\"\r\n [id]=\"'rowEdit' + rowData[config.dataKey]\"\r\n [style.width]=\"'28px'\"\r\n [disabled]=\"isDisableEditRowFunction(rowData)\"\r\n *ngIf=\"!editing\"\r\n pButton\r\n pRipple\r\n type=\"button\"\r\n pInitEditableRow\r\n icon=\"pi pi-pencil\"\r\n (click)=\"onRowEditInit(rowData)\"\r\n class=\"p-button-rounded p-button-text\"\r\n ></button>\r\n <!-- <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\r\n [style.height]=\"'28px'\"\r\n [style.width]=\"'28px'\"\r\n [disabled]=\"isDisableEditRowFunction(rowData)\"\r\n *ngIf=\"editing\"\r\n pButton\r\n pRipple\r\n type=\"button\"\r\n pCancelEditableRow\r\n icon=\"pi pi-times\"\r\n (click)=\"onRowEditCancel(rowData, ri)\"\r\n [id]=\"'rowCancel' + rowData[config.dataKey]\"\r\n class=\"p-button-rounded p-button-text p-button-danger\"\r\n ></button>\r\n </div>\r\n </td>\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}::ng-deep .menuSizes>p-tieredmenusub>.p-tieredmenu-root-list>li:first-child{font-size:.6rem}::ng-deep .menuSizes>p-tieredmenusub>.p-tieredmenu-root-list>li:last-child{font-size:.8rem}.tag{width:5px;height:25px;border-radius:.25rem}:host ::ng-deep .p-speeddial-button.p-button.p-button-icon-only{width:2rem;height:2rem;font-size:1rem}.item-circle{width:4rem;height:2rem;padding:1rem;font-size:.8rem;border-radius:17%;display:flex;align-items:center;justify-content:center;background:#eaeaea!important;box-shadow:#0000003d 0 3px 13px}:host ::ng-deep p-speeddial>div>button>span.material-symbols-outlined.ng-star-inserted{font-size:1.1rem}:host ::ng-deep .check-edit-list>div.p-checkbox.p-component{height:1rem}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td:first-child{border-left:1px solid #ddd!important}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td:last-child{border-right:1px solid #ddd!important}:host ::ng-deep .p-datatable-wrapper::-webkit-scrollbar:hover{background-color:#dededebf}:host ::ng-deep .p-datatable-wrapper::-webkit-scrollbar{width:6px;height:3px}:host ::ng-deep .p-datatable-wrapper:hover::-webkit-scrollbar-thumb{border-left:2px solid white;background-color:#00000080}:host ::ng-deep .p-datatable-wrapper::-webkit-scrollbar-thumb{border-radius:4px;background-color:transparent}:host ::ng-deep .p-datatable-wrapper::-webkit-scrollbar-track{border-left:2px solid white;background-color:#dededebf}:host ::ng-deep .p-datatable>.p-datatable-wrapper{overflow-y:hidden}\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$1.AutoFocus, selector: "[pAutoFocus]", inputs: ["autofocus"] }, { kind: "directive", type: i6.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "directive", type: i1$1.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "component", type: i7$2.ContextMenu, selector: "p-contextMenu", inputs: ["model", "triggerEvent", "target", "global", "style", "styleClass", "appendTo", "autoZIndex", "baseZIndex", "id", "ariaLabel", "ariaLabelledBy", "pressDelay"], outputs: ["onShow", "onHide"] }, { kind: "component", type: i4.Dropdown, selector: "p-dropdown", inputs: ["id", "scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "variant", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "disabled", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "filterValue", "options"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "directive", type: i9.InputText, selector: "[pInputText]", inputs: ["variant"] }, { kind: "component", type: i5.Menu, selector: "p-menu", inputs: ["model", "popup", "style", "styleClass", "appendTo", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "ariaLabel", "ariaLabelledBy", "id", "tabindex"], outputs: ["onShow", "onHide", "onBlur", "onFocus"] }, { kind: "component", type: i11.Panel, selector: "p-panel", inputs: ["toggleable", "header", "collapsed", "style", "styleClass", "iconPos", "expandIcon", "collapseIcon", "showHeader", "toggler", "transitionOptions"], outputs: ["collapsedChange", "onBeforeToggle", "onAfterToggle"] }, { kind: "directive", type: i2.Ripple, selector: "[pRipple]" }, { kind: "component", type: i13.TieredMenu, selector: "p-tieredMenu", inputs: ["model", "popup", "style", "styleClass", "appendTo", "autoZIndex", "baseZIndex", "autoDisplay", "showTransitionOptions", "hideTransitionOptions", "id", "ariaLabel", "ariaLabelledBy", "disabled", "tabindex"], outputs: ["onShow", "onHide"] }, { kind: "component", type: i14.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll", "virtualRowHeight"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i14.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "directive", type: i14.ContextMenuRow, selector: "[pContextMenuRow]", inputs: ["pContextMenuRow", "pContextMenuRowIndex", "pContextMenuRowDisabled"] }, { kind: "directive", type: i14.ReorderableColumn, selector: "[pReorderableColumn]", inputs: ["pReorderableColumnDisabled"] }, { kind: "directive", type: i14.EditableColumn, selector: "[pEditableColumn]", inputs: ["pEditableColumn", "pEditableColumnField", "pEditableColumnRowIndex", "pEditableColumnDisabled", "pFocusCellSelector"] }, { kind: "component", type: i14.CellEditor, selector: "p-cellEditor" }, { kind: "component", type: i14.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "component", type: i14.TableCheckbox, selector: "p-tableCheckbox", inputs: ["disabled", "value", "index", "inputId", "name", "required", "ariaLabel"] }, { kind: "component", type: i14.TableHeaderCheckbox, selector: "p-tableHeaderCheckbox", inputs: ["disabled", "inputId", "name", "ariaLabel"] }, { kind: "directive", type: i14.EditableRow, selector: "[pEditableRow]", inputs: ["pEditableRow", "pEditableRowDisabled"] }, { kind: "directive", type: i14.InitEditableRow, selector: "[pInitEditableRow]" }, { kind: "directive", type: i14.CancelEditableRow, selector: "[pCancelEditableRow]" }, { kind: "component", type: i15.Toast, selector: "p-toast", inputs: ["key", "autoZIndex", "baseZIndex", "life", "style", "styleClass", "position", "preventOpenDuplicates", "preventDuplicates", "showTransformOptions", "hideTransformOptions", "showTransitionOptions", "hideTransitionOptions", "breakpoints"], outputs: ["onClose"] }, { kind: "directive", type: 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" }] }); }
|
|
5862
6145
|
}
|
|
5863
6146
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvTableEditComponent, decorators: [{
|
|
5864
6147
|
type: Component,
|
|
@@ -5939,271 +6222,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImpor
|
|
|
5939
6222
|
}]
|
|
5940
6223
|
}] });
|
|
5941
6224
|
|
|
5942
|
-
class KvTreetableComponent {
|
|
5943
|
-
constructor() {
|
|
5944
|
-
this.menuItems = [];
|
|
5945
|
-
this.gridLines = false;
|
|
5946
|
-
this.tableCaptalized = false;
|
|
5947
|
-
this.selectedItems = [];
|
|
5948
|
-
this.paginator = true;
|
|
5949
|
-
this.rows = 10;
|
|
5950
|
-
this.treeTableDraggable = false;
|
|
5951
|
-
this.transferArrayItem = false;
|
|
5952
|
-
this.textoEmptyMessage = 'Nenhum registro encontrado';
|
|
5953
|
-
this.childrenRecoil = true;
|
|
5954
|
-
this.onFilter = new EventEmitter();
|
|
5955
|
-
this.onPaginate = new EventEmitter();
|
|
5956
|
-
this.onActiveItem = new EventEmitter();
|
|
5957
|
-
this.onActiveItemLote = new EventEmitter();
|
|
5958
|
-
this.doubleClickEvent = new EventEmitter();
|
|
5959
|
-
this.onNodeSelect = new EventEmitter();
|
|
5960
|
-
this.onNodeUnselect = new EventEmitter();
|
|
5961
|
-
this.onDropItem = new EventEmitter();
|
|
5962
|
-
}
|
|
5963
|
-
ngOnInit() {
|
|
5964
|
-
this.tamanhoTela = window.innerWidth;
|
|
5965
|
-
if (this.ordenacao) {
|
|
5966
|
-
this.dataSource = this.sortTreeNodes(this.dataSource);
|
|
5967
|
-
}
|
|
5968
|
-
}
|
|
5969
|
-
onWindowResize() {
|
|
5970
|
-
this.tamanhoTela = window.innerWidth;
|
|
5971
|
-
}
|
|
5972
|
-
activeItem(rowData) {
|
|
5973
|
-
this.onActiveItem.emit(rowData);
|
|
5974
|
-
}
|
|
5975
|
-
activeItemLote(rowData) {
|
|
5976
|
-
this.onActiveItemLote.emit(rowData);
|
|
5977
|
-
}
|
|
5978
|
-
getOrExecute(action, data) {
|
|
5979
|
-
return getOrExecute(action, data);
|
|
5980
|
-
}
|
|
5981
|
-
onGlobalFilter(table, event) {
|
|
5982
|
-
this.onFilter.emit(event.target.value);
|
|
5983
|
-
table.filterGlobal(event.target.value, 'contains');
|
|
5984
|
-
}
|
|
5985
|
-
paginate($event) {
|
|
5986
|
-
if ($event) {
|
|
5987
|
-
let paginaInicial = ($event?.first > 0 ? $event.first / $event.rows : $event.first) + 1;
|
|
5988
|
-
let termoPesquisa = '';
|
|
5989
|
-
let ordenacao = '';
|
|
5990
|
-
if ($event.globalFilter)
|
|
5991
|
-
termoPesquisa = $event.globalFilter;
|
|
5992
|
-
if ($event.sortField)
|
|
5993
|
-
ordenacao = `${$event.sortField} ${$event.sortOrder === 1 ? 'ASC' : 'DESC'}`;
|
|
5994
|
-
const objeto = {
|
|
5995
|
-
paginaInicial: paginaInicial,
|
|
5996
|
-
tamanhoPagina: $event.rows,
|
|
5997
|
-
termoPesquisa: termoPesquisa,
|
|
5998
|
-
ordenacao: ordenacao,
|
|
5999
|
-
};
|
|
6000
|
-
this.onPaginate.emit(objeto);
|
|
6001
|
-
}
|
|
6002
|
-
}
|
|
6003
|
-
drop(event) {
|
|
6004
|
-
const draggedNode = event.item.data;
|
|
6005
|
-
const draggedChildData = draggedNode.node.data;
|
|
6006
|
-
if (draggedNode.level === 0) {
|
|
6007
|
-
moveItemInArray(this.dataSource, event.previousIndex, event.currentIndex);
|
|
6008
|
-
}
|
|
6009
|
-
else if (draggedNode.level >= 1) {
|
|
6010
|
-
const parentNode = draggedNode.node.parent;
|
|
6011
|
-
if (parentNode) {
|
|
6012
|
-
const parentChildren = parentNode.children.map((child) => child.data);
|
|
6013
|
-
const previousChildIndex = parentChildren.indexOf(draggedChildData);
|
|
6014
|
-
const relativeCurrentIndex = previousChildIndex + (event.currentIndex - event.previousIndex);
|
|
6015
|
-
const targetChildIndex = Math.max(0, Math.min(parentChildren.length - 1, relativeCurrentIndex));
|
|
6016
|
-
if (previousChildIndex !== -1 && targetChildIndex !== -1) {
|
|
6017
|
-
moveItemInArray(parentNode.children, previousChildIndex, targetChildIndex);
|
|
6018
|
-
}
|
|
6019
|
-
const dropInfo = {
|
|
6020
|
-
previousChildIndex: previousChildIndex + 1,
|
|
6021
|
-
targetChildIndex: targetChildIndex + 1,
|
|
6022
|
-
};
|
|
6023
|
-
this.onDropItem.emit({ event: event, dropChildInfo: dropInfo });
|
|
6024
|
-
}
|
|
6025
|
-
}
|
|
6026
|
-
this.dataSource = [...this.dataSource];
|
|
6027
|
-
if (draggedNode.level === 0) {
|
|
6028
|
-
this.onDropItem.emit(event);
|
|
6029
|
-
}
|
|
6030
|
-
}
|
|
6031
|
-
sortTreeNodes(nodes) {
|
|
6032
|
-
return nodes
|
|
6033
|
-
.sort((a, b) => a.data[this.ordenacao] - b.data[this.ordenacao])
|
|
6034
|
-
.map((node) => {
|
|
6035
|
-
if (node.children) {
|
|
6036
|
-
node.children = this.sortTreeNodes(node.children);
|
|
6037
|
-
}
|
|
6038
|
-
return node;
|
|
6039
|
-
});
|
|
6040
|
-
}
|
|
6041
|
-
calculateTargetChildIndex(event, parentChildren, previousChildIndex) {
|
|
6042
|
-
const targetChildIndex = previousChildIndex + (event.currentIndex - event.previousIndex);
|
|
6043
|
-
if (targetChildIndex < 0) {
|
|
6044
|
-
return 0;
|
|
6045
|
-
}
|
|
6046
|
-
else if (targetChildIndex >= parentChildren.length) {
|
|
6047
|
-
return parentChildren.length - 1;
|
|
6048
|
-
}
|
|
6049
|
-
else {
|
|
6050
|
-
return targetChildIndex;
|
|
6051
|
-
}
|
|
6052
|
-
}
|
|
6053
|
-
// returnStyleRow(col: any, rowNode: any): string {
|
|
6054
|
-
// const isFirstColumn = col.field === this.config.columns[0].field;
|
|
6055
|
-
// const baseOpacity = 1;
|
|
6056
|
-
// const maxLevels = 4;
|
|
6057
|
-
// if (isFirstColumn && rowNode.level >= 0) {
|
|
6058
|
-
// const opacity = baseOpacity - (rowNode.level / maxLevels);
|
|
6059
|
-
// return `border-left: solid 4px rgba(59, 110, 158, ${ opacity }) !important;`;
|
|
6060
|
-
// }
|
|
6061
|
-
// if (rowNode.level == 0)
|
|
6062
|
-
// return 'border-left: none !important; border-right: none !important'
|
|
6063
|
-
// return '';
|
|
6064
|
-
// }
|
|
6065
|
-
criarMenusModal(data) {
|
|
6066
|
-
if (this.config.actions && data) {
|
|
6067
|
-
for (const action of this.config.actions) {
|
|
6068
|
-
const menuInsert = mapToMenuItem(action, data);
|
|
6069
|
-
let item = this.menuItems.filter((x) => x.command == menuInsert.command);
|
|
6070
|
-
if (item.length == 0)
|
|
6071
|
-
this.menuItems.push(menuInsert);
|
|
6072
|
-
else {
|
|
6073
|
-
if (menuInsert.label != item[0].label) {
|
|
6074
|
-
let index = this.menuItems.indexOf(item[0]);
|
|
6075
|
-
this.menuItems.splice(index, 1);
|
|
6076
|
-
}
|
|
6077
|
-
if (menuInsert.visible != item[0].visible) {
|
|
6078
|
-
let index = this.menuItems.indexOf(item[0]);
|
|
6079
|
-
this.menuItems.splice(index, 1);
|
|
6080
|
-
}
|
|
6081
|
-
if (menuInsert.disabled != item[0].disabled) {
|
|
6082
|
-
let index = this.menuItems.indexOf(item[0]);
|
|
6083
|
-
this.menuItems.splice(index, 1);
|
|
6084
|
-
}
|
|
6085
|
-
}
|
|
6086
|
-
}
|
|
6087
|
-
}
|
|
6088
|
-
}
|
|
6089
|
-
exibirCampo(field, rowData) {
|
|
6090
|
-
let visible = field.visible ? field.visible(rowData) : true;
|
|
6091
|
-
return visible;
|
|
6092
|
-
}
|
|
6093
|
-
validateActionPosition(rowNode) {
|
|
6094
|
-
if (this.config.actionsPai && rowNode.level == 0)
|
|
6095
|
-
return false;
|
|
6096
|
-
else
|
|
6097
|
-
return true;
|
|
6098
|
-
}
|
|
6099
|
-
doubleClick(e, rowData) {
|
|
6100
|
-
let eventDoubleClick = { event: e, rowData: rowData };
|
|
6101
|
-
let array = [];
|
|
6102
|
-
e.target.classList.forEach((x) => array.push(x));
|
|
6103
|
-
// if (array.find((x: any) => x == 'ng-star-inserted') != undefined)
|
|
6104
|
-
this.doubleClickEvent.emit(eventDoubleClick);
|
|
6105
|
-
}
|
|
6106
|
-
isDisabledCheckbox(rowData, rowNode) {
|
|
6107
|
-
return this.config.disableControlCheckboxFunction
|
|
6108
|
-
? this.config.disableControlCheckboxFunction(rowData, rowNode)
|
|
6109
|
-
: false;
|
|
6110
|
-
}
|
|
6111
|
-
onNodeSelected(event) {
|
|
6112
|
-
this.onNodeSelect.emit(event);
|
|
6113
|
-
}
|
|
6114
|
-
onNodeUnselected(event) {
|
|
6115
|
-
this.onNodeUnselect.emit(event);
|
|
6116
|
-
}
|
|
6117
|
-
getCustomTemplate(templatename) {
|
|
6118
|
-
return this._templates[templatename];
|
|
6119
|
-
}
|
|
6120
|
-
validateShowTemplate(rowNode, col) {
|
|
6121
|
-
if (col.templateOnly) {
|
|
6122
|
-
if (col.templateOnly === 'pai') {
|
|
6123
|
-
return rowNode.level === 0;
|
|
6124
|
-
}
|
|
6125
|
-
if (col.templateOnly === 'filho') {
|
|
6126
|
-
return rowNode.level === 1;
|
|
6127
|
-
}
|
|
6128
|
-
}
|
|
6129
|
-
return true;
|
|
6130
|
-
}
|
|
6131
|
-
getIcon(icon) {
|
|
6132
|
-
return icon.includes('pi-') ? `pi ${icon}` : '';
|
|
6133
|
-
}
|
|
6134
|
-
align(col) {
|
|
6135
|
-
if (col.centralize)
|
|
6136
|
-
return 'justify-content-center';
|
|
6137
|
-
else if (col.align == 'right')
|
|
6138
|
-
return 'justify-content-end';
|
|
6139
|
-
else
|
|
6140
|
-
return '';
|
|
6141
|
-
}
|
|
6142
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvTreetableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
6143
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.8", type: KvTreetableComponent, selector: "kv-tree-table", inputs: { config: "config", dataSource: "dataSource", gridLines: "gridLines", tableCaptalized: "tableCaptalized", selectedItems: "selectedItems", paginator: "paginator", rows: "rows", treeTableDraggable: "treeTableDraggable", transferArrayItem: "transferArrayItem", ordenacao: "ordenacao", totalRecords: "totalRecords", textoEmptyMessage: "textoEmptyMessage", childrenRecoil: "childrenRecoil", pageLinksOptions: "pageLinksOptions", pageLinks: "pageLinks", showFirstLastIcon: "showFirstLastIcon", _templates: ["templates", "_templates"] }, outputs: { onFilter: "onFilter", onPaginate: "onPaginate", onActiveItem: "onActiveItem", onActiveItemLote: "onActiveItemLote", doubleClickEvent: "doubleClickEvent", onNodeSelect: "onNodeSelect", onNodeUnselect: "onNodeUnselect", onDropItem: "onDropItem" }, host: { listeners: { "window:resize": "onWindowResize($event)" } }, queries: [{ propertyName: "templates", predicate: TemplateDirective }], ngImport: i0, template: "<div *ngIf=\"!treeTableDraggable\">\r\n <p-treeTable\r\n #tt\r\n [value]=\"dataSource\"\r\n [columns]=\"config.columns\"\r\n [resizableColumns]=\"true\"\r\n [tableStyle]=\"{ 'min-width': '50rem' }\"\r\n [resizableColumns]=\"true\"\r\n [paginator]=\"paginator\"\r\n [rows]=\"rows\"\r\n [totalRecords]=\"totalRecords\"\r\n [rowsPerPageOptions]=\"[5, 10, 25, 50]\"\r\n [showFirstLastIcon]=\"tamanhoTela > 960 ? true : false\"\r\n [pageLinks]=\"tamanhoTela > 960 ? 2 : 1\"\r\n [styleClass]=\"gridLines ? 'p-treetable-gridlines' : ''\"\r\n [(selection)]=\"selectedItems\"\r\n [lazy]=\"config.lazy\"\r\n (onLazyLoad)=\"paginate($event)\"\r\n (onNodeSelect)=\"onNodeSelected($event)\"\r\n (onNodeUnselect)=\"onNodeUnselected($event)\"\r\n [showCurrentPageReport]=\"true\"\r\n currentPageReportTemplate=\"{first} - {last} de {totalRecords}\"\r\n >\r\n <ng-template pTemplate=\"caption\" *ngIf=\"config.enableCation\">\r\n <div\r\n class=\"flex flex-row flex-wrap justify-content-between align-items-center grid formgrid p-fluid col-12 m-0\"\r\n style=\"background-color: #eaeaea\"\r\n >\r\n <div class=\"col-12 flex flex-column\">\r\n <div *ngIf=\"config.title\" class=\"text-md font-bold my-3\">\r\n {{ config.title }}\r\n </div>\r\n <div *ngIf=\"config.subtitle\" class=\"text-sm mb-4 font-medium\">\r\n {{ config.subtitle }}\r\n </div>\r\n </div>\r\n\r\n <div\r\n class=\"flex flex-row align-items-center col-10 p-0 md:col-6 lg:col-4 justify-content-center {{\r\n tamanhoTela < 768 ? '' : 'input-search'\r\n }}\"\r\n >\r\n <span *ngIf=\"config.enableFilter\" class=\"p-input-icon-left\">\r\n <i class=\"pi pi-search\"></i>\r\n\r\n <input\r\n pInputText\r\n pAutoFocus\r\n [autofocus]=\"true\"\r\n type=\"text\"\r\n (input)=\"onGlobalFilter(tt, $event)\"\r\n placeholder=\"Pesquisar...\"\r\n class=\"h-2rem\"\r\n />\r\n </span>\r\n </div>\r\n\r\n <div class=\"flex flex-row col-1 justify-content-end p-0\">\r\n <div class=\"flex flex-row gap-2 btns-options\">\r\n @for (action of config.actionsLote; track $index) {\r\n @if((selectedItems.length > 0 || action.showAcoesLote) &&\r\n exibirCampo(action, this.action)) {\r\n <kv-button\r\n (onClick)=\"action?.command(); activeItemLote(selectedItems)\"\r\n [pTooltip]=\"getOrExecute(action.tooltip, selectedItems)\"\r\n [tooltipPosition]=\"'bottom'\"\r\n [disabled]=\"getOrExecute(action.disabled, selectedItems) || false\"\r\n [icon]=\"getOrExecute(action.icon, selectedItems)\"\r\n [severity]=\"action.severity || 'tertiary'\"\r\n />\r\n } }\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n @for(col of columns; track $index){\r\n <th\r\n [ttSortableColumn]=\"col.field\"\r\n [ttSortableColumnDisabled]=\"col.sortable === false\"\r\n class=\"text-sm\"\r\n [style.width]=\"col.width\"\r\n >\r\n <div>\r\n <div [ngClass]=\"{ flex: $index == 0, 'gap-3': $index == 0 }\">\r\n <div *ngIf=\"$index == 0 && config.enableSelect\">\r\n <p-treeTableHeaderCheckbox\r\n (click)=\"activeItemLote(selectedItems)\"\r\n />\r\n </div>\r\n\r\n <div class=\"flex flex-row align-items-center {{ align(col) }}\">\r\n <span>{{ col.header }}</span>\r\n\r\n @if(col.sortable) {\r\n <p-treeTableSortIcon [field]=\"col.field\" />\r\n\r\n }\r\n\r\n <span\r\n *ngIf=\"col.headerTooltip\"\r\n class=\"material-symbols-outlined flex align-items-center\"\r\n [pTooltip]=\"col.headerTooltip\"\r\n >info</span\r\n >\r\n </div>\r\n </div>\r\n </div>\r\n </th>\r\n @if (config.actions?.length ?? 0 > 0) {\r\n <th [style.width]=\"5\"></th>\r\n } }\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n @for (col of columns; track $index) {\r\n <th\r\n [ttSortableColumn]=\"col.field\"\r\n [ttSortableColumnDisabled]=\"col.sortable === false\"\r\n [style.width]=\"col.width\"\r\n >\r\n <div class=\"flex flex-row align-items-center {{ align(col) }}\">\r\n <span>{{ col.header }}</span>\r\n\r\n @if(col.sortable) {\r\n <p-treeTableSortIcon [field]=\"col.field\" />\r\n }\r\n </div>\r\n </th>\r\n } @if (config.actions?.length ?? 0 > 0) {\r\n <th [style.width]=\"5\"></th>\r\n }\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template\r\n pTemplate=\"body\"\r\n let-rowNode\r\n let-rowData=\"rowData\"\r\n let-columns=\"columns\"\r\n >\r\n <tr\r\n [ttRow]=\"rowNode\"\r\n (dblclick)=\"doubleClick($event, rowData)\"\r\n [ngClass]=\"{ capitalize: tableCaptalized }\"\r\n >\r\n @for(col of columns; track $index){\r\n <td\r\n [style.position]=\"rowNode.level !== 0 ? 'sticky' : null\"\r\n [style.left.px]=\"\r\n childrenRecoil && rowNode.level !== 0 ? rowNode.level * 30 : null\r\n \"\r\n [style.borderRight]=\"rowNode.level === 0 ? 'none' : ''\"\r\n [style.borderLeft]=\"\r\n rowNode.level === 0 && col.field != config.columns[0].field\r\n ? 'none'\r\n : ''\r\n \"\r\n >\r\n <div class=\"flex flex-row {{ align(col) }}\">\r\n <div\r\n class=\"w-full-h-full flex align-items-center\"\r\n *ngIf=\"$index == 0\"\r\n >\r\n <p-treeTableToggler class=\"hiddenVisible\" [rowNode]=\"rowNode\" />\r\n\r\n <p-treeTableCheckbox\r\n [disabled]=\"isDisabledCheckbox(rowData, rowNode)\"\r\n (click)=\"activeItemLote(selectedItems)\"\r\n [value]=\"rowNode\"\r\n *ngIf=\"config.enableSelect == true\"\r\n />\r\n </div>\r\n\r\n <div class=\"flex flex-row align-items-center\">\r\n <div\r\n class=\"flex flex-row align-items-center justify-content-center gap-2\"\r\n >\r\n @if(col.tagColor) {\r\n <div\r\n class=\"tag\"\r\n [pTooltip]=\"\r\n col.tooltipTag &&\r\n col.tooltipTag(rowData, col, rowData[col.field])\r\n \"\r\n [style.background-color]=\"\r\n col.tagColor(rowData, col, rowData[col.field])\r\n \"\r\n ></div>\r\n\r\n }\r\n <i\r\n *ngIf=\"col.boolean\"\r\n class=\"pi {{\r\n rowData[col.field] ? 'pi-check text-green-300' : ''\r\n }}\"\r\n style=\"font-size: 1.1rem\"\r\n ></i>\r\n\r\n <div class=\"flex flex-column\" *ngIf=\"!col.boolean\">\r\n <span class=\"m-0\">{{ rowData[col.field] }}</span>\r\n\r\n <p *ngIf=\"col.subtitle\" class=\"m-0 text-xs font-semibold\">\r\n {{ rowData[col.subtitle] }}\r\n </p>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <span *ngIf=\"col.template && validateShowTemplate(rowNode, col)\">\r\n <ng-container\r\n *ngIf=\"getCustomTemplate(col.template.name)\"\r\n [ngTemplateOutlet]=\"getCustomTemplate(col.template.name)\"\r\n [ngTemplateOutletContext]=\"{ $implicit: rowData }\"\r\n >\r\n </ng-container>\r\n </span>\r\n </td>\r\n }\r\n\r\n <td\r\n style=\"border-left: none; text-align: end\"\r\n *ngIf=\"(config.actions?.length ?? 0 > 0) || config.actionsPai\"\r\n >\r\n <div\r\n *ngIf=\"\r\n (config.actions?.length ?? 0 > 0) &&\r\n validateActionPosition(rowNode)\r\n \"\r\n >\r\n <span\r\n class=\"material-symbols-outlined cursor-pointer icon-more-horiz p-1\"\r\n style=\"font-size: 25px\"\r\n (click)=\"menu.toggle($event); activeItem(rowData)\"\r\n >\r\n more_horiz\r\n </span>\r\n\r\n @for(action of config.actions; track $index) {\r\n {{ criarMenusModal(rowData) }}\r\n }\r\n\r\n <p-menu\r\n #menu\r\n [popup]=\"true\"\r\n [model]=\"menuItems\"\r\n appendTo=\"body\"\r\n ></p-menu>\r\n </div>\r\n\r\n @if(config.actionsPai?.length ?? 0 > 0 && rowNode.level == 0){\r\n <div class=\"flex justify-content-end\">\r\n @for (actionPai of config.actionsPai; track $index) { @if\r\n (getOrExecute(actionPai.visible, rowData) ?? true) {\r\n <kv-button\r\n (onClick)=\"activeItem(rowData); actionPai.command($event)\"\r\n [icon]=\"actionPai.icon\"\r\n [severity]=\"actionPai.severity || 'tertiary'\"\r\n />\r\n } }\r\n </div>\r\n }\r\n </td>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"emptymessage\">\r\n <tr>\r\n <td\r\n [attr.colspan]=\"config.columns.length + 1\"\r\n style=\"text-align: center\"\r\n >\r\n {{ textoEmptyMessage }}\r\n </td>\r\n </tr>\r\n </ng-template>\r\n </p-treeTable>\r\n</div>\r\n\r\n<div\r\n *ngIf=\"treeTableDraggable\"\r\n cdkDropList\r\n class=\"example-list\"\r\n (cdkDropListDropped)=\"drop($event)\"\r\n>\r\n <p-treeTable\r\n #tt\r\n [value]=\"dataSource\"\r\n [columns]=\"config.columns\"\r\n [resizableColumns]=\"true\"\r\n [tableStyle]=\"{ 'min-width': '50rem' }\"\r\n [resizableColumns]=\"true\"\r\n [paginator]=\"paginator\"\r\n [rows]=\"rows\"\r\n [pageLinks]=\"pageLinks\"\r\n [totalRecords]=\"totalRecords\"\r\n [rowsPerPageOptions]=\"[5, 10, 25, 50]\"\r\n [showFirstLastIcon]=\"tamanhoTela > 960 ? true : false\"\r\n [pageLinks]=\"tamanhoTela > 960 ? 2 : 1\"\r\n [styleClass]=\"gridLines ? 'p-treetable-gridlines' : ''\"\r\n [(selection)]=\"selectedItems\"\r\n [lazy]=\"config.lazy\"\r\n (onLazyLoad)=\"paginate($event)\"\r\n currentPageReportTemplate=\"{first} - {last} de {{ totalRecords }}\"\r\n >\r\n <ng-template pTemplate=\"caption\" *ngIf=\"config.enableCation\">\r\n <div\r\n class=\"flex flex-row flex-wrap justify-content-between align-items-center grid formgrid p-fluid col-12 m-0\"\r\n style=\"background-color: #eaeaea\"\r\n >\r\n <div class=\"col-12 flex flex-column\">\r\n <div *ngIf=\"config.title\" class=\"text-md font-bold my-3\">\r\n {{ config.title }}\r\n </div>\r\n <div *ngIf=\"config.subtitle\" class=\"text-sm mb-4 font-medium\">\r\n {{ config.subtitle }}\r\n </div>\r\n </div>\r\n\r\n <div\r\n class=\"flex flex-row align-items-center col-10 p-0 md:col-6 lg:col-4 justify-content-center {{\r\n tamanhoTela < 768 ? '' : 'input-search'\r\n }}\"\r\n >\r\n <span *ngIf=\"config.enableFilter\" class=\"p-input-icon-left\">\r\n <i class=\"pi pi-search\"></i>\r\n\r\n <input\r\n pInputText\r\n pAutoFocus\r\n [autofocus]=\"true\"\r\n type=\"text\"\r\n (input)=\"onGlobalFilter(tt, $event)\"\r\n placeholder=\"Pesquisar...\"\r\n class=\"h-2rem\"\r\n />\r\n </span>\r\n </div>\r\n\r\n <div class=\"flex flex-row col-1 justify-content-end p-0\">\r\n <div class=\"flex flex-row gap-2 btns-options\">\r\n @for (action of config.actionsLote; track $index) {\r\n @if((selectedItems.length > 0 || action.showAcoesLote) &&\r\n exibirCampo(action, this.action)) {\r\n <kv-button\r\n (onClick)=\"action?.command(); activeItemLote(selectedItems)\"\r\n [pTooltip]=\"getOrExecute(action.tooltip, selectedItems)\"\r\n [tooltipPosition]=\"'bottom'\"\r\n [disabled]=\"getOrExecute(action.disabled, selectedItems) || false\"\r\n [icon]=\"getOrExecute(action.icon, selectedItems)\"\r\n [severity]=\"action.severity || 'tertiary'\"\r\n />\r\n } }\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n @for(col of columns; track $index){\r\n <th\r\n [ttSortableColumn]=\"col.field\"\r\n [ttSortableColumnDisabled]=\"col.sortable === false\"\r\n class=\"text-sm\"\r\n [style.width]=\"col.width\"\r\n >\r\n <div>\r\n <div [ngClass]=\"{ flex: $index == 0, 'gap-3': $index == 0 }\">\r\n <div *ngIf=\"$index == 0 && config.enableSelect\">\r\n <p-treeTableHeaderCheckbox\r\n (click)=\"activeItemLote(selectedItems)\"\r\n />\r\n </div>\r\n\r\n <div class=\"flex flex-row align-items-center {{ align(col) }}\">\r\n <span>{{ col.header }}</span>\r\n\r\n @if(col.sortable) {\r\n <p-treeTableSortIcon [field]=\"col.field\" />\r\n\r\n }\r\n\r\n <span\r\n *ngIf=\"col.headerTooltip\"\r\n class=\"material-symbols-outlined flex align-items-center\"\r\n [pTooltip]=\"col.headerTooltip\"\r\n >info</span\r\n >\r\n </div>\r\n </div>\r\n </div>\r\n </th>\r\n }\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n @for (col of columns; track $index) {\r\n <th\r\n [ttSortableColumn]=\"col.field\"\r\n [ttSortableColumnDisabled]=\"col.sortable === false\"\r\n [style.width]=\"col.width\"\r\n >\r\n <div class=\"flex flex-row align-items-center {{ align(col) }}\">\r\n <span>{{ col.header }}</span>\r\n\r\n @if(col.sortable) {\r\n <p-treeTableSortIcon [field]=\"col.field\" />\r\n\r\n }\r\n </div>\r\n </th>\r\n }\r\n <th [style.width]=\"5\"></th>\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template\r\n pTemplate=\"body\"\r\n let-rowNode\r\n let-rowData=\"rowData\"\r\n let-columns=\"columns\"\r\n >\r\n <tr\r\n cdkDrag\r\n [cdkDragData]=\"rowNode\"\r\n [ttRow]=\"rowNode\"\r\n (dblclick)=\"doubleClick($event, rowData)\"\r\n [ngClass]=\"{ capitalize: tableCaptalized }\"\r\n >\r\n @for(col of columns; track $index){\r\n <td\r\n [style.position]=\"rowNode.level !== 0 ? 'sticky' : null\"\r\n [style.left.px]=\"\r\n childrenRecoil && rowNode.level !== 0 ? rowNode.level * 30 : null\r\n \"\r\n >\r\n <div class=\"flex flex-row {{ align(col) }}\">\r\n <div\r\n class=\"w-full-h-full flex align-items-center\"\r\n *ngIf=\"$index == 0\"\r\n >\r\n <p-treeTableToggler class=\"hiddenVisible\" [rowNode]=\"rowNode\" />\r\n\r\n <p-treeTableCheckbox\r\n [disabled]=\"isDisabledCheckbox(rowData, rowNode)\"\r\n (click)=\"activeItemLote(selectedItems)\"\r\n [value]=\"rowNode\"\r\n *ngIf=\"config.enableSelect == true\"\r\n />\r\n </div>\r\n\r\n <div class=\"flex flex-row align-items-center\">\r\n <div\r\n class=\"flex flex-row align-items-center justify-content-center gap-2\"\r\n >\r\n @if(col.tagColor) {\r\n <div\r\n class=\"tag\"\r\n [pTooltip]=\"\r\n col.tooltipTag &&\r\n col.tooltipTag(rowData, col, rowData[col.field])\r\n \"\r\n [style.background-color]=\"\r\n col.tagColor(rowData, col, rowData[col.field])\r\n \"\r\n ></div>\r\n\r\n }\r\n\r\n <i\r\n *ngIf=\"col.boolean\"\r\n class=\"pi {{\r\n rowData[col.field] ? 'pi-check text-green-300' : ''\r\n }}\"\r\n style=\"font-size: 1.1rem\"\r\n ></i>\r\n\r\n <div class=\"flex flex-column\" *ngIf=\"!col.boolean\">\r\n <span class=\"m-0\">{{ rowData[col.field] }}</span>\r\n\r\n <p *ngIf=\"col.subtitle\" class=\"m-0 text-xs font-semibold\">\r\n {{ rowData[col.subtitle] }}\r\n </p>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <span *ngIf=\"col.template && validateShowTemplate(rowNode, col)\">\r\n <ng-container\r\n *ngIf=\"getCustomTemplate(col.template.name)\"\r\n [ngTemplateOutlet]=\"getCustomTemplate(col.template.name)\"\r\n [ngTemplateOutletContext]=\"{ $implicit: rowData }\"\r\n >\r\n </ng-container>\r\n </span>\r\n </td>\r\n }\r\n\r\n <td\r\n style=\"border-left: none; text-align: end\"\r\n *ngIf=\"(config.actions?.length ?? 0 > 0) || config.actionsPai\"\r\n [style.borderRight]=\"rowNode.level === 0 ? 'none' : ''\"\r\n [style.borderLeft]=\"rowNode.level === 0 ? 'none' : ''\"\r\n >\r\n <div\r\n *ngIf=\"\r\n (config.actions?.length ?? 0 > 0) &&\r\n validateActionPosition(rowNode)\r\n \"\r\n >\r\n <span\r\n class=\"material-symbols-outlined cursor-pointer icon-more-horiz p-1\"\r\n style=\"font-size: 25px\"\r\n (click)=\"menu.toggle($event); activeItem(rowData)\"\r\n >\r\n more_horiz\r\n </span>\r\n\r\n @for(action of config.actions; track $index) {\r\n {{ criarMenusModal(rowData) }}\r\n }\r\n\r\n <p-menu\r\n #menu\r\n [popup]=\"true\"\r\n [model]=\"menuItems\"\r\n appendTo=\"body\"\r\n ></p-menu>\r\n </div>\r\n\r\n @if(config.actionsPai?.length ?? 0 > 0 && rowNode.level == 0){\r\n <div class=\"flex justify-content-end\">\r\n @for (actionPai of config.actionsPai; track $index) {\r\n @if(getOrExecute(actionPai.visible, rowData) ?? true) {\r\n <kv-button\r\n (onClick)=\"activeItem(rowData); actionPai.command($event)\"\r\n [icon]=\"actionPai.icon\"\r\n [severity]=\"actionPai.severity || 'tertiary'\"\r\n />\r\n } }\r\n </div>\r\n }\r\n </td>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"emptymessage\">\r\n <tr>\r\n <td\r\n [attr.colspan]=\"config.columns.length + 1\"\r\n style=\"text-align: center\"\r\n >\r\n {{ textoEmptyMessage }}\r\n </td>\r\n </tr>\r\n </ng-template>\r\n </p-treeTable>\r\n</div>\r\n", styles: ["::ng-deep .p-treetable .p-treetable-tbody>tr>td{padding:.4rem}::ng-deep .p-treetable .p-treetable-header{padding:0rem}span{font-size:14px}:host ::ng-deep .p-treetable table{table-layout:auto!important}.icon-more-horiz:hover,.icon-more-horiz:focus{color:#5e5e5e;transform:scale(1.2);transition:color .3s,transform .3s;background-color:#eaeaea;border-radius:50%}::ng-deep .p-treetable .p-treetable-thead>tr>th{background-color:#eaeaea}.tag{width:5px;height:20px;border-radius:.25rem}.cdk-drag-preview{display:flex;align-items:center;justify-content:space-between;border-radius:10px!important}.cdk-drop-list-dragging{cursor:grabbing}:host ::ng-deep .cdk-drop-list-dragging .cdk-drag{transition:transform .25s cubic-bezier(0,0,.2,1)}:host ::ng-deep .cdk-drag-animating{transition:transform .3s cubic-bezier(0,0,.2,1)}::ng-deep svg.p-icon{width:.7rem;height:1rem}::ng-deep .p-checkbox .p-checkbox-box.p-highlight{border-color:#004172;background:#004172}::ng-deep .p-checkbox .p-checkbox-box.p-highlight:hover{background-color:#002542}::ng-deep .p-checkbox .p-checkbox-box.p-highlight:active{background-color:#002542}::ng-deep .p-checkbox .p-checkbox-box.p-highlight:disabled{background-color:#002542;opacity:.4;cursor:auto}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i5$1.AutoFocus, selector: "[pAutoFocus]", inputs: ["autofocus"] }, { kind: "directive", type: i6.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "directive", type: i9.InputText, selector: "[pInputText]", inputs: ["variant"] }, { kind: "component", type: i5.Menu, selector: "p-menu", inputs: ["model", "popup", "style", "styleClass", "appendTo", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "ariaLabel", "ariaLabelledBy", "id", "tabindex"], outputs: ["onShow", "onHide", "onBlur", "onFocus"] }, { kind: "directive", type: i7$2.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i7$2.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "component", type: i8$2.TreeTable, selector: "p-treeTable", inputs: ["columns", "style", "styleClass", "tableStyle", "tableStyleClass", "autoLayout", "lazy", "lazyLoadOnInit", "paginator", "rows", "first", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "customSort", "selectionMode", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "compareSelectionBy", "rowHover", "loading", "loadingIcon", "showLoader", "scrollable", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "frozenColumns", "resizableColumns", "columnResizeMode", "reorderableColumns", "contextMenu", "rowTrackBy", "filters", "globalFilterFields", "filterDelay", "filterMode", "filterLocale", "paginatorLocale", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "value", "virtualRowHeight", "selectionKeys"], outputs: ["selectionChange", "contextMenuSelectionChange", "onFilter", "onNodeExpand", "onNodeCollapse", "onPage", "onSort", "onLazyLoad", "sortFunction", "onColResize", "onColReorder", "onNodeSelect", "onNodeUnselect", "onContextMenuSelect", "onHeaderCheckboxToggle", "onEditInit", "onEditComplete", "onEditCancel", "selectionKeysChange"] }, { kind: "component", type: i8$2.TreeTableToggler, selector: "p-treeTableToggler", inputs: ["rowNode"] }, { kind: "directive", type: i8$2.TTSortableColumn, selector: "[ttSortableColumn]", inputs: ["ttSortableColumn", "ttSortableColumnDisabled"] }, { kind: "component", type: i8$2.TTSortIcon, selector: "p-treeTableSortIcon", inputs: ["field", "ariaLabelDesc", "ariaLabelAsc"] }, { kind: "directive", type: i8$2.TTRow, selector: "[ttRow]", inputs: ["ttRow"] }, { kind: "component", type: i8$2.TTCheckbox, selector: "p-treeTableCheckbox", inputs: ["disabled", "value"] }, { kind: "component", type: i8$2.TTHeaderCheckbox, selector: "p-treeTableHeaderCheckbox" }, { kind: "component", type: KvButtonComponent, selector: "kv-button", inputs: ["label", "icon", "loading", "disabled", "severity", "size", "fullWidth"], outputs: ["onClick"] }] }); }
|
|
6144
|
-
}
|
|
6145
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvTreetableComponent, decorators: [{
|
|
6146
|
-
type: Component,
|
|
6147
|
-
args: [{ selector: 'kv-tree-table', template: "<div *ngIf=\"!treeTableDraggable\">\r\n <p-treeTable\r\n #tt\r\n [value]=\"dataSource\"\r\n [columns]=\"config.columns\"\r\n [resizableColumns]=\"true\"\r\n [tableStyle]=\"{ 'min-width': '50rem' }\"\r\n [resizableColumns]=\"true\"\r\n [paginator]=\"paginator\"\r\n [rows]=\"rows\"\r\n [totalRecords]=\"totalRecords\"\r\n [rowsPerPageOptions]=\"[5, 10, 25, 50]\"\r\n [showFirstLastIcon]=\"tamanhoTela > 960 ? true : false\"\r\n [pageLinks]=\"tamanhoTela > 960 ? 2 : 1\"\r\n [styleClass]=\"gridLines ? 'p-treetable-gridlines' : ''\"\r\n [(selection)]=\"selectedItems\"\r\n [lazy]=\"config.lazy\"\r\n (onLazyLoad)=\"paginate($event)\"\r\n (onNodeSelect)=\"onNodeSelected($event)\"\r\n (onNodeUnselect)=\"onNodeUnselected($event)\"\r\n [showCurrentPageReport]=\"true\"\r\n currentPageReportTemplate=\"{first} - {last} de {totalRecords}\"\r\n >\r\n <ng-template pTemplate=\"caption\" *ngIf=\"config.enableCation\">\r\n <div\r\n class=\"flex flex-row flex-wrap justify-content-between align-items-center grid formgrid p-fluid col-12 m-0\"\r\n style=\"background-color: #eaeaea\"\r\n >\r\n <div class=\"col-12 flex flex-column\">\r\n <div *ngIf=\"config.title\" class=\"text-md font-bold my-3\">\r\n {{ config.title }}\r\n </div>\r\n <div *ngIf=\"config.subtitle\" class=\"text-sm mb-4 font-medium\">\r\n {{ config.subtitle }}\r\n </div>\r\n </div>\r\n\r\n <div\r\n class=\"flex flex-row align-items-center col-10 p-0 md:col-6 lg:col-4 justify-content-center {{\r\n tamanhoTela < 768 ? '' : 'input-search'\r\n }}\"\r\n >\r\n <span *ngIf=\"config.enableFilter\" class=\"p-input-icon-left\">\r\n <i class=\"pi pi-search\"></i>\r\n\r\n <input\r\n pInputText\r\n pAutoFocus\r\n [autofocus]=\"true\"\r\n type=\"text\"\r\n (input)=\"onGlobalFilter(tt, $event)\"\r\n placeholder=\"Pesquisar...\"\r\n class=\"h-2rem\"\r\n />\r\n </span>\r\n </div>\r\n\r\n <div class=\"flex flex-row col-1 justify-content-end p-0\">\r\n <div class=\"flex flex-row gap-2 btns-options\">\r\n @for (action of config.actionsLote; track $index) {\r\n @if((selectedItems.length > 0 || action.showAcoesLote) &&\r\n exibirCampo(action, this.action)) {\r\n <kv-button\r\n (onClick)=\"action?.command(); activeItemLote(selectedItems)\"\r\n [pTooltip]=\"getOrExecute(action.tooltip, selectedItems)\"\r\n [tooltipPosition]=\"'bottom'\"\r\n [disabled]=\"getOrExecute(action.disabled, selectedItems) || false\"\r\n [icon]=\"getOrExecute(action.icon, selectedItems)\"\r\n [severity]=\"action.severity || 'tertiary'\"\r\n />\r\n } }\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n @for(col of columns; track $index){\r\n <th\r\n [ttSortableColumn]=\"col.field\"\r\n [ttSortableColumnDisabled]=\"col.sortable === false\"\r\n class=\"text-sm\"\r\n [style.width]=\"col.width\"\r\n >\r\n <div>\r\n <div [ngClass]=\"{ flex: $index == 0, 'gap-3': $index == 0 }\">\r\n <div *ngIf=\"$index == 0 && config.enableSelect\">\r\n <p-treeTableHeaderCheckbox\r\n (click)=\"activeItemLote(selectedItems)\"\r\n />\r\n </div>\r\n\r\n <div class=\"flex flex-row align-items-center {{ align(col) }}\">\r\n <span>{{ col.header }}</span>\r\n\r\n @if(col.sortable) {\r\n <p-treeTableSortIcon [field]=\"col.field\" />\r\n\r\n }\r\n\r\n <span\r\n *ngIf=\"col.headerTooltip\"\r\n class=\"material-symbols-outlined flex align-items-center\"\r\n [pTooltip]=\"col.headerTooltip\"\r\n >info</span\r\n >\r\n </div>\r\n </div>\r\n </div>\r\n </th>\r\n @if (config.actions?.length ?? 0 > 0) {\r\n <th [style.width]=\"5\"></th>\r\n } }\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n @for (col of columns; track $index) {\r\n <th\r\n [ttSortableColumn]=\"col.field\"\r\n [ttSortableColumnDisabled]=\"col.sortable === false\"\r\n [style.width]=\"col.width\"\r\n >\r\n <div class=\"flex flex-row align-items-center {{ align(col) }}\">\r\n <span>{{ col.header }}</span>\r\n\r\n @if(col.sortable) {\r\n <p-treeTableSortIcon [field]=\"col.field\" />\r\n }\r\n </div>\r\n </th>\r\n } @if (config.actions?.length ?? 0 > 0) {\r\n <th [style.width]=\"5\"></th>\r\n }\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template\r\n pTemplate=\"body\"\r\n let-rowNode\r\n let-rowData=\"rowData\"\r\n let-columns=\"columns\"\r\n >\r\n <tr\r\n [ttRow]=\"rowNode\"\r\n (dblclick)=\"doubleClick($event, rowData)\"\r\n [ngClass]=\"{ capitalize: tableCaptalized }\"\r\n >\r\n @for(col of columns; track $index){\r\n <td\r\n [style.position]=\"rowNode.level !== 0 ? 'sticky' : null\"\r\n [style.left.px]=\"\r\n childrenRecoil && rowNode.level !== 0 ? rowNode.level * 30 : null\r\n \"\r\n [style.borderRight]=\"rowNode.level === 0 ? 'none' : ''\"\r\n [style.borderLeft]=\"\r\n rowNode.level === 0 && col.field != config.columns[0].field\r\n ? 'none'\r\n : ''\r\n \"\r\n >\r\n <div class=\"flex flex-row {{ align(col) }}\">\r\n <div\r\n class=\"w-full-h-full flex align-items-center\"\r\n *ngIf=\"$index == 0\"\r\n >\r\n <p-treeTableToggler class=\"hiddenVisible\" [rowNode]=\"rowNode\" />\r\n\r\n <p-treeTableCheckbox\r\n [disabled]=\"isDisabledCheckbox(rowData, rowNode)\"\r\n (click)=\"activeItemLote(selectedItems)\"\r\n [value]=\"rowNode\"\r\n *ngIf=\"config.enableSelect == true\"\r\n />\r\n </div>\r\n\r\n <div class=\"flex flex-row align-items-center\">\r\n <div\r\n class=\"flex flex-row align-items-center justify-content-center gap-2\"\r\n >\r\n @if(col.tagColor) {\r\n <div\r\n class=\"tag\"\r\n [pTooltip]=\"\r\n col.tooltipTag &&\r\n col.tooltipTag(rowData, col, rowData[col.field])\r\n \"\r\n [style.background-color]=\"\r\n col.tagColor(rowData, col, rowData[col.field])\r\n \"\r\n ></div>\r\n\r\n }\r\n <i\r\n *ngIf=\"col.boolean\"\r\n class=\"pi {{\r\n rowData[col.field] ? 'pi-check text-green-300' : ''\r\n }}\"\r\n style=\"font-size: 1.1rem\"\r\n ></i>\r\n\r\n <div class=\"flex flex-column\" *ngIf=\"!col.boolean\">\r\n <span class=\"m-0\">{{ rowData[col.field] }}</span>\r\n\r\n <p *ngIf=\"col.subtitle\" class=\"m-0 text-xs font-semibold\">\r\n {{ rowData[col.subtitle] }}\r\n </p>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <span *ngIf=\"col.template && validateShowTemplate(rowNode, col)\">\r\n <ng-container\r\n *ngIf=\"getCustomTemplate(col.template.name)\"\r\n [ngTemplateOutlet]=\"getCustomTemplate(col.template.name)\"\r\n [ngTemplateOutletContext]=\"{ $implicit: rowData }\"\r\n >\r\n </ng-container>\r\n </span>\r\n </td>\r\n }\r\n\r\n <td\r\n style=\"border-left: none; text-align: end\"\r\n *ngIf=\"(config.actions?.length ?? 0 > 0) || config.actionsPai\"\r\n >\r\n <div\r\n *ngIf=\"\r\n (config.actions?.length ?? 0 > 0) &&\r\n validateActionPosition(rowNode)\r\n \"\r\n >\r\n <span\r\n class=\"material-symbols-outlined cursor-pointer icon-more-horiz p-1\"\r\n style=\"font-size: 25px\"\r\n (click)=\"menu.toggle($event); activeItem(rowData)\"\r\n >\r\n more_horiz\r\n </span>\r\n\r\n @for(action of config.actions; track $index) {\r\n {{ criarMenusModal(rowData) }}\r\n }\r\n\r\n <p-menu\r\n #menu\r\n [popup]=\"true\"\r\n [model]=\"menuItems\"\r\n appendTo=\"body\"\r\n ></p-menu>\r\n </div>\r\n\r\n @if(config.actionsPai?.length ?? 0 > 0 && rowNode.level == 0){\r\n <div class=\"flex justify-content-end\">\r\n @for (actionPai of config.actionsPai; track $index) { @if\r\n (getOrExecute(actionPai.visible, rowData) ?? true) {\r\n <kv-button\r\n (onClick)=\"activeItem(rowData); actionPai.command($event)\"\r\n [icon]=\"actionPai.icon\"\r\n [severity]=\"actionPai.severity || 'tertiary'\"\r\n />\r\n } }\r\n </div>\r\n }\r\n </td>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"emptymessage\">\r\n <tr>\r\n <td\r\n [attr.colspan]=\"config.columns.length + 1\"\r\n style=\"text-align: center\"\r\n >\r\n {{ textoEmptyMessage }}\r\n </td>\r\n </tr>\r\n </ng-template>\r\n </p-treeTable>\r\n</div>\r\n\r\n<div\r\n *ngIf=\"treeTableDraggable\"\r\n cdkDropList\r\n class=\"example-list\"\r\n (cdkDropListDropped)=\"drop($event)\"\r\n>\r\n <p-treeTable\r\n #tt\r\n [value]=\"dataSource\"\r\n [columns]=\"config.columns\"\r\n [resizableColumns]=\"true\"\r\n [tableStyle]=\"{ 'min-width': '50rem' }\"\r\n [resizableColumns]=\"true\"\r\n [paginator]=\"paginator\"\r\n [rows]=\"rows\"\r\n [pageLinks]=\"pageLinks\"\r\n [totalRecords]=\"totalRecords\"\r\n [rowsPerPageOptions]=\"[5, 10, 25, 50]\"\r\n [showFirstLastIcon]=\"tamanhoTela > 960 ? true : false\"\r\n [pageLinks]=\"tamanhoTela > 960 ? 2 : 1\"\r\n [styleClass]=\"gridLines ? 'p-treetable-gridlines' : ''\"\r\n [(selection)]=\"selectedItems\"\r\n [lazy]=\"config.lazy\"\r\n (onLazyLoad)=\"paginate($event)\"\r\n currentPageReportTemplate=\"{first} - {last} de {{ totalRecords }}\"\r\n >\r\n <ng-template pTemplate=\"caption\" *ngIf=\"config.enableCation\">\r\n <div\r\n class=\"flex flex-row flex-wrap justify-content-between align-items-center grid formgrid p-fluid col-12 m-0\"\r\n style=\"background-color: #eaeaea\"\r\n >\r\n <div class=\"col-12 flex flex-column\">\r\n <div *ngIf=\"config.title\" class=\"text-md font-bold my-3\">\r\n {{ config.title }}\r\n </div>\r\n <div *ngIf=\"config.subtitle\" class=\"text-sm mb-4 font-medium\">\r\n {{ config.subtitle }}\r\n </div>\r\n </div>\r\n\r\n <div\r\n class=\"flex flex-row align-items-center col-10 p-0 md:col-6 lg:col-4 justify-content-center {{\r\n tamanhoTela < 768 ? '' : 'input-search'\r\n }}\"\r\n >\r\n <span *ngIf=\"config.enableFilter\" class=\"p-input-icon-left\">\r\n <i class=\"pi pi-search\"></i>\r\n\r\n <input\r\n pInputText\r\n pAutoFocus\r\n [autofocus]=\"true\"\r\n type=\"text\"\r\n (input)=\"onGlobalFilter(tt, $event)\"\r\n placeholder=\"Pesquisar...\"\r\n class=\"h-2rem\"\r\n />\r\n </span>\r\n </div>\r\n\r\n <div class=\"flex flex-row col-1 justify-content-end p-0\">\r\n <div class=\"flex flex-row gap-2 btns-options\">\r\n @for (action of config.actionsLote; track $index) {\r\n @if((selectedItems.length > 0 || action.showAcoesLote) &&\r\n exibirCampo(action, this.action)) {\r\n <kv-button\r\n (onClick)=\"action?.command(); activeItemLote(selectedItems)\"\r\n [pTooltip]=\"getOrExecute(action.tooltip, selectedItems)\"\r\n [tooltipPosition]=\"'bottom'\"\r\n [disabled]=\"getOrExecute(action.disabled, selectedItems) || false\"\r\n [icon]=\"getOrExecute(action.icon, selectedItems)\"\r\n [severity]=\"action.severity || 'tertiary'\"\r\n />\r\n } }\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n @for(col of columns; track $index){\r\n <th\r\n [ttSortableColumn]=\"col.field\"\r\n [ttSortableColumnDisabled]=\"col.sortable === false\"\r\n class=\"text-sm\"\r\n [style.width]=\"col.width\"\r\n >\r\n <div>\r\n <div [ngClass]=\"{ flex: $index == 0, 'gap-3': $index == 0 }\">\r\n <div *ngIf=\"$index == 0 && config.enableSelect\">\r\n <p-treeTableHeaderCheckbox\r\n (click)=\"activeItemLote(selectedItems)\"\r\n />\r\n </div>\r\n\r\n <div class=\"flex flex-row align-items-center {{ align(col) }}\">\r\n <span>{{ col.header }}</span>\r\n\r\n @if(col.sortable) {\r\n <p-treeTableSortIcon [field]=\"col.field\" />\r\n\r\n }\r\n\r\n <span\r\n *ngIf=\"col.headerTooltip\"\r\n class=\"material-symbols-outlined flex align-items-center\"\r\n [pTooltip]=\"col.headerTooltip\"\r\n >info</span\r\n >\r\n </div>\r\n </div>\r\n </div>\r\n </th>\r\n }\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n @for (col of columns; track $index) {\r\n <th\r\n [ttSortableColumn]=\"col.field\"\r\n [ttSortableColumnDisabled]=\"col.sortable === false\"\r\n [style.width]=\"col.width\"\r\n >\r\n <div class=\"flex flex-row align-items-center {{ align(col) }}\">\r\n <span>{{ col.header }}</span>\r\n\r\n @if(col.sortable) {\r\n <p-treeTableSortIcon [field]=\"col.field\" />\r\n\r\n }\r\n </div>\r\n </th>\r\n }\r\n <th [style.width]=\"5\"></th>\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template\r\n pTemplate=\"body\"\r\n let-rowNode\r\n let-rowData=\"rowData\"\r\n let-columns=\"columns\"\r\n >\r\n <tr\r\n cdkDrag\r\n [cdkDragData]=\"rowNode\"\r\n [ttRow]=\"rowNode\"\r\n (dblclick)=\"doubleClick($event, rowData)\"\r\n [ngClass]=\"{ capitalize: tableCaptalized }\"\r\n >\r\n @for(col of columns; track $index){\r\n <td\r\n [style.position]=\"rowNode.level !== 0 ? 'sticky' : null\"\r\n [style.left.px]=\"\r\n childrenRecoil && rowNode.level !== 0 ? rowNode.level * 30 : null\r\n \"\r\n >\r\n <div class=\"flex flex-row {{ align(col) }}\">\r\n <div\r\n class=\"w-full-h-full flex align-items-center\"\r\n *ngIf=\"$index == 0\"\r\n >\r\n <p-treeTableToggler class=\"hiddenVisible\" [rowNode]=\"rowNode\" />\r\n\r\n <p-treeTableCheckbox\r\n [disabled]=\"isDisabledCheckbox(rowData, rowNode)\"\r\n (click)=\"activeItemLote(selectedItems)\"\r\n [value]=\"rowNode\"\r\n *ngIf=\"config.enableSelect == true\"\r\n />\r\n </div>\r\n\r\n <div class=\"flex flex-row align-items-center\">\r\n <div\r\n class=\"flex flex-row align-items-center justify-content-center gap-2\"\r\n >\r\n @if(col.tagColor) {\r\n <div\r\n class=\"tag\"\r\n [pTooltip]=\"\r\n col.tooltipTag &&\r\n col.tooltipTag(rowData, col, rowData[col.field])\r\n \"\r\n [style.background-color]=\"\r\n col.tagColor(rowData, col, rowData[col.field])\r\n \"\r\n ></div>\r\n\r\n }\r\n\r\n <i\r\n *ngIf=\"col.boolean\"\r\n class=\"pi {{\r\n rowData[col.field] ? 'pi-check text-green-300' : ''\r\n }}\"\r\n style=\"font-size: 1.1rem\"\r\n ></i>\r\n\r\n <div class=\"flex flex-column\" *ngIf=\"!col.boolean\">\r\n <span class=\"m-0\">{{ rowData[col.field] }}</span>\r\n\r\n <p *ngIf=\"col.subtitle\" class=\"m-0 text-xs font-semibold\">\r\n {{ rowData[col.subtitle] }}\r\n </p>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <span *ngIf=\"col.template && validateShowTemplate(rowNode, col)\">\r\n <ng-container\r\n *ngIf=\"getCustomTemplate(col.template.name)\"\r\n [ngTemplateOutlet]=\"getCustomTemplate(col.template.name)\"\r\n [ngTemplateOutletContext]=\"{ $implicit: rowData }\"\r\n >\r\n </ng-container>\r\n </span>\r\n </td>\r\n }\r\n\r\n <td\r\n style=\"border-left: none; text-align: end\"\r\n *ngIf=\"(config.actions?.length ?? 0 > 0) || config.actionsPai\"\r\n [style.borderRight]=\"rowNode.level === 0 ? 'none' : ''\"\r\n [style.borderLeft]=\"rowNode.level === 0 ? 'none' : ''\"\r\n >\r\n <div\r\n *ngIf=\"\r\n (config.actions?.length ?? 0 > 0) &&\r\n validateActionPosition(rowNode)\r\n \"\r\n >\r\n <span\r\n class=\"material-symbols-outlined cursor-pointer icon-more-horiz p-1\"\r\n style=\"font-size: 25px\"\r\n (click)=\"menu.toggle($event); activeItem(rowData)\"\r\n >\r\n more_horiz\r\n </span>\r\n\r\n @for(action of config.actions; track $index) {\r\n {{ criarMenusModal(rowData) }}\r\n }\r\n\r\n <p-menu\r\n #menu\r\n [popup]=\"true\"\r\n [model]=\"menuItems\"\r\n appendTo=\"body\"\r\n ></p-menu>\r\n </div>\r\n\r\n @if(config.actionsPai?.length ?? 0 > 0 && rowNode.level == 0){\r\n <div class=\"flex justify-content-end\">\r\n @for (actionPai of config.actionsPai; track $index) {\r\n @if(getOrExecute(actionPai.visible, rowData) ?? true) {\r\n <kv-button\r\n (onClick)=\"activeItem(rowData); actionPai.command($event)\"\r\n [icon]=\"actionPai.icon\"\r\n [severity]=\"actionPai.severity || 'tertiary'\"\r\n />\r\n } }\r\n </div>\r\n }\r\n </td>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"emptymessage\">\r\n <tr>\r\n <td\r\n [attr.colspan]=\"config.columns.length + 1\"\r\n style=\"text-align: center\"\r\n >\r\n {{ textoEmptyMessage }}\r\n </td>\r\n </tr>\r\n </ng-template>\r\n </p-treeTable>\r\n</div>\r\n", styles: ["::ng-deep .p-treetable .p-treetable-tbody>tr>td{padding:.4rem}::ng-deep .p-treetable .p-treetable-header{padding:0rem}span{font-size:14px}:host ::ng-deep .p-treetable table{table-layout:auto!important}.icon-more-horiz:hover,.icon-more-horiz:focus{color:#5e5e5e;transform:scale(1.2);transition:color .3s,transform .3s;background-color:#eaeaea;border-radius:50%}::ng-deep .p-treetable .p-treetable-thead>tr>th{background-color:#eaeaea}.tag{width:5px;height:20px;border-radius:.25rem}.cdk-drag-preview{display:flex;align-items:center;justify-content:space-between;border-radius:10px!important}.cdk-drop-list-dragging{cursor:grabbing}:host ::ng-deep .cdk-drop-list-dragging .cdk-drag{transition:transform .25s cubic-bezier(0,0,.2,1)}:host ::ng-deep .cdk-drag-animating{transition:transform .3s cubic-bezier(0,0,.2,1)}::ng-deep svg.p-icon{width:.7rem;height:1rem}::ng-deep .p-checkbox .p-checkbox-box.p-highlight{border-color:#004172;background:#004172}::ng-deep .p-checkbox .p-checkbox-box.p-highlight:hover{background-color:#002542}::ng-deep .p-checkbox .p-checkbox-box.p-highlight:active{background-color:#002542}::ng-deep .p-checkbox .p-checkbox-box.p-highlight:disabled{background-color:#002542;opacity:.4;cursor:auto}\n"] }]
|
|
6148
|
-
}], propDecorators: { config: [{
|
|
6149
|
-
type: Input
|
|
6150
|
-
}], dataSource: [{
|
|
6151
|
-
type: Input
|
|
6152
|
-
}], gridLines: [{
|
|
6153
|
-
type: Input
|
|
6154
|
-
}], tableCaptalized: [{
|
|
6155
|
-
type: Input
|
|
6156
|
-
}], selectedItems: [{
|
|
6157
|
-
type: Input
|
|
6158
|
-
}], paginator: [{
|
|
6159
|
-
type: Input
|
|
6160
|
-
}], rows: [{
|
|
6161
|
-
type: Input
|
|
6162
|
-
}], treeTableDraggable: [{
|
|
6163
|
-
type: Input
|
|
6164
|
-
}], transferArrayItem: [{
|
|
6165
|
-
type: Input
|
|
6166
|
-
}], ordenacao: [{
|
|
6167
|
-
type: Input
|
|
6168
|
-
}], totalRecords: [{
|
|
6169
|
-
type: Input
|
|
6170
|
-
}], textoEmptyMessage: [{
|
|
6171
|
-
type: Input
|
|
6172
|
-
}], childrenRecoil: [{
|
|
6173
|
-
type: Input
|
|
6174
|
-
}], pageLinksOptions: [{
|
|
6175
|
-
type: Input
|
|
6176
|
-
}], pageLinks: [{
|
|
6177
|
-
type: Input
|
|
6178
|
-
}], showFirstLastIcon: [{
|
|
6179
|
-
type: Input
|
|
6180
|
-
}], onFilter: [{
|
|
6181
|
-
type: Output
|
|
6182
|
-
}], onPaginate: [{
|
|
6183
|
-
type: Output
|
|
6184
|
-
}], onActiveItem: [{
|
|
6185
|
-
type: Output
|
|
6186
|
-
}], onActiveItemLote: [{
|
|
6187
|
-
type: Output
|
|
6188
|
-
}], doubleClickEvent: [{
|
|
6189
|
-
type: Output
|
|
6190
|
-
}], onNodeSelect: [{
|
|
6191
|
-
type: Output
|
|
6192
|
-
}], onNodeUnselect: [{
|
|
6193
|
-
type: Output
|
|
6194
|
-
}], onDropItem: [{
|
|
6195
|
-
type: Output
|
|
6196
|
-
}], templates: [{
|
|
6197
|
-
type: ContentChildren,
|
|
6198
|
-
args: [TemplateDirective]
|
|
6199
|
-
}], _templates: [{
|
|
6200
|
-
type: Input,
|
|
6201
|
-
args: ['templates']
|
|
6202
|
-
}], onWindowResize: [{
|
|
6203
|
-
type: HostListener,
|
|
6204
|
-
args: ['window:resize', ['$event']]
|
|
6205
|
-
}] } });
|
|
6206
|
-
|
|
6207
6225
|
class KvTreetableModule {
|
|
6208
6226
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvTreetableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
6209
6227
|
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.8", ngImport: i0, type: KvTreetableModule, declarations: [KvTreetableComponent], imports: [CommonModule,
|