keevo-components 1.8.95 → 1.8.96

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.
@@ -1,10 +1,152 @@
1
- import { MenuItem } from "primeng/api/menuitem";
2
- export interface KvMenuItem extends MenuItem {
3
- dynamicfields?: any;
4
- [key: string]: any;
5
- fieldcondition?: string;
6
- showAcoesLote?: boolean;
7
- disabled?: any;
8
- visible?: any;
9
- severity?: 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'help' | 'danger';
1
+ import { MenuItem, MenuItemCommandEvent } from "primeng/api/menuitem";
2
+ import { QueryParamsHandling } from "@angular/router";
3
+ import { TooltipOptions } from "primeng/api";
4
+ export interface KvMenuItem {
5
+ /**
6
+ * Texto do item.
7
+ */
8
+ label?: ValueOrFn<string | undefined>;
9
+ /**
10
+ * Ícone do item.
11
+ */
12
+ icon?: ValueOrFn<string | undefined>;
13
+ /**
14
+ * Callback a ser executada quando o item é clicado.
15
+ */
16
+ command?: (event: MenuItemCommandEvent) => void;
17
+ /**
18
+ * Link externo para navegar quando o item é clicado.
19
+ */
20
+ url?: ValueOrFn<string | undefined>;
21
+ /**
22
+ * Array de filhos do item.
23
+ */
24
+ items?: ValueOrFn<KvMenuItem[] | undefined>;
25
+ /**
26
+ * Visibilidade do submenu.
27
+ */
28
+ expanded?: ValueOrFn<boolean | undefined>;
29
+ /**
30
+ * Quando verdadeiro, desabilita o item.
31
+ */
32
+ disabled?: ValueOrFn<boolean | undefined>;
33
+ /**
34
+ * Define se o elemento da dom do item é ou não criado.
35
+ */
36
+ visible?: ValueOrFn<boolean | undefined>;
37
+ /**
38
+ * Specifies where to open the linked document.
39
+ */
40
+ target?: ValueOrFn<string | undefined>;
41
+ /**
42
+ * Whether to escape the label or not. Set to false to display html content.
43
+ */
44
+ escape?: boolean;
45
+ /**
46
+ * Configuration for active router link.
47
+ */
48
+ routerLinkActiveOptions?: ValueOrFn<any | undefined>;
49
+ /**
50
+ * Defines the item as a separator.
51
+ */
52
+ separator?: boolean;
53
+ /**
54
+ * Value of the badge.
55
+ */
56
+ badge?: ValueOrFn<string | undefined>;
57
+ /**
58
+ * Tooltip of the item.
59
+ */
60
+ tooltip?: ValueOrFn<string | undefined>;
61
+ /**
62
+ * Position of the tooltip item.
63
+ */
64
+ tooltipPosition?: ValueOrFn<string | undefined>;
65
+ /**
66
+ * Style class of the badge.
67
+ */
68
+ badgeStyleClass?: ValueOrFn<string | undefined>;
69
+ /**
70
+ * Inline style of the menuitem.
71
+ */
72
+ style?: ValueOrFn<{
73
+ [klass: string]: any;
74
+ } | null | undefined>;
75
+ /**
76
+ * Style class of the menuitem.
77
+ */
78
+ styleClass?: ValueOrFn<string | undefined>;
79
+ /**
80
+ * Tooltip text of the item.
81
+ */
82
+ title?: ValueOrFn<string | undefined>;
83
+ /**
84
+ * Identifier of the element.
85
+ */
86
+ id?: ValueOrFn<string | undefined>;
87
+ /**
88
+ * Value of HTML data-* attribute.
89
+ */
90
+ automationId?: ValueOrFn<any | undefined>;
91
+ /**
92
+ * Specifies tab order of the item.
93
+ */
94
+ tabindex?: ValueOrFn<string | undefined>;
95
+ /**
96
+ * RouterLink definition for internal navigation.
97
+ */
98
+ routerLink?: ValueOrFn<any | undefined>;
99
+ /**
100
+ * Query parameters for internal navigation via routerLink.
101
+ */
102
+ queryParams?: ValueOrFn<{
103
+ [k: string]: any;
104
+ } | undefined>;
105
+ /**
106
+ * Sets the hash fragment for the URL.
107
+ */
108
+ fragment?: ValueOrFn<string | undefined>;
109
+ /**
110
+ * How to handle query parameters in the router link for the next navigation. One of:
111
+ merge : Merge new with current parameters.
112
+ preserve : Preserve current parameters.k.
113
+ */
114
+ queryParamsHandling?: ValueOrFn<QueryParamsHandling | undefined>;
115
+ /**
116
+ * When true, preserves the URL fragment for the next navigation.
117
+ */
118
+ preserveFragment?: ValueOrFn<boolean | undefined>;
119
+ /**
120
+ * When true, navigates without pushing a new state into history.
121
+ */
122
+ skipLocationChange?: ValueOrFn<boolean | undefined>;
123
+ /**
124
+ * When true, navigates while replacing the current state in history.
125
+ */
126
+ replaceUrl?: ValueOrFn<boolean | undefined>;
127
+ /**
128
+ * Inline style of the item's icon.
129
+ */
130
+ iconStyle?: ValueOrFn<{
131
+ [klass: string]: any;
132
+ } | null | undefined>;
133
+ /**
134
+ * Class of the item's icon.
135
+ */
136
+ iconClass?: ValueOrFn<string | undefined>;
137
+ /**
138
+ * Developer-defined state that can be passed to any navigation.
139
+ * @see {MenuItemState}
140
+ */
141
+ state?: ValueOrFn<{
142
+ [k: string]: any;
143
+ } | undefined>;
144
+ /**
145
+ * Options of the item's tooltip.
146
+ * @see {TooltipOptions}
147
+ */
148
+ tooltipOptions?: ValueOrFn<TooltipOptions | undefined>;
10
149
  }
150
+ export type ValueOrFn<T> = T | ((data: any) => T);
151
+ export declare function getOrExecute<T>(vof: ValueOrFn<T>, data: any): T;
152
+ export declare function mapToMenuItem(kvMenuItem: KvMenuItem, data: any): MenuItem;
@@ -1,9 +1,9 @@
1
1
  import { TableConfigColumn } from './table.config.column';
2
- import { KvMenuItem } from './kv-menuitem';
2
+ import { KvMenuItem, ValueOrFn } from './kv-menuitem';
3
+ import Severity from '../../types/severity';
3
4
  export interface TableConfig {
4
- actions: KvMenuItem[];
5
- actionsLote?: KvMenuItem[];
6
- actionsPai?: KvMenuItem[];
5
+ actions?: KvMenuItem[];
6
+ actionsLote?: ActionsLoteItem[];
7
7
  columns: TableConfigColumn[];
8
8
  dataKey?: string;
9
9
  rows?: any;
@@ -17,3 +17,14 @@ export interface TableConfig {
17
17
  enableToggleNodes?: boolean;
18
18
  disableControlCheckboxFunction?: (rowData: any, rowNode?: any) => boolean;
19
19
  }
20
+ export interface ActionsLoteItem {
21
+ /**
22
+ * Ignorado por enquanto
23
+ */
24
+ severity?: Severity;
25
+ icon: string;
26
+ showAcoesLote?: boolean;
27
+ tooltip?: ValueOrFn<string | undefined>;
28
+ disabled?: ValueOrFn<boolean | undefined>;
29
+ command?: () => void;
30
+ }
@@ -0,0 +1,28 @@
1
+ import { TableConfigColumn } from '../table/table.config.column';
2
+ import { KvMenuItem, ValueOrFn } from '../table/kv-menuitem';
3
+ import Severity from '../../types/severity';
4
+ import { ActionsLoteItem } from '../table/table.config';
5
+ export interface TreeTableConfig {
6
+ actions?: KvMenuItem[];
7
+ actionsLote?: ActionsLoteItem[];
8
+ actionsPai?: ActionsPaiItem[];
9
+ columns: TableConfigColumn[];
10
+ dataKey?: string;
11
+ rows?: any;
12
+ title?: string;
13
+ subtitle?: string;
14
+ lazy: boolean;
15
+ fieldGroup?: string;
16
+ enableCation?: boolean;
17
+ enableFilter?: boolean;
18
+ enableSelect?: boolean;
19
+ enableToggleNodes?: boolean;
20
+ disableControlCheckboxFunction?: (rowData: any, rowNode?: any) => boolean;
21
+ }
22
+ interface ActionsPaiItem {
23
+ severity?: Severity;
24
+ visible?: ValueOrFn<boolean | undefined>;
25
+ command: (event: MouseEvent) => void;
26
+ icon: string;
27
+ }
28
+ export {};
@@ -0,0 +1,2 @@
1
+ type Severity = "primary" | "secondary" | "success" | "info" | "warning" | "help" | "danger";
2
+ export default Severity;
@@ -1,26 +1,22 @@
1
1
  import { DatePipe, DecimalPipe } from '@angular/common';
2
- import { ElementRef, EventEmitter, OnInit, QueryList, TemplateRef } from '@angular/core';
3
- import { MenuItemCommandEvent } from 'primeng/api';
2
+ import { DoCheck, ElementRef, EventEmitter, OnInit, QueryList, TemplateRef } from '@angular/core';
3
+ import { MenuItem } from 'primeng/api';
4
4
  import { Table } from 'primeng/table';
5
5
  import { CpfCnpjPipe } from '../../api/pipes/cpfcnpj.pipe';
6
- import { KvMenuItem } from '../../api/components/table/kv-menuitem';
6
+ import { ValueOrFn } from '../../api/components/table/kv-menuitem';
7
7
  import { TableConfig } from '../../api/components/table/table.config';
8
8
  import { TableConfigColumn } from '../../api/components/table/table.config.column';
9
9
  import { TelefonePipe } from '../../api/pipes/telefone.pipe';
10
10
  import * as i0 from "@angular/core";
11
- export declare class KvTableComponent implements OnInit {
11
+ export declare class KvTableComponent implements OnInit, DoCheck {
12
12
  private readonly datePipe;
13
13
  private readonly decimalPipe;
14
14
  private readonly cpfCnpjPipe;
15
15
  private readonly telefonePipe;
16
16
  config: TableConfig;
17
- pesquisaValue: string;
18
17
  globalFilterFields: string[];
19
- actionsTemplate: TemplateRef<any>;
20
18
  selectedSize: string;
21
19
  tamanhoTela: number;
22
- menuItems: KvMenuItem[];
23
- menuColumns: KvMenuItem[];
24
20
  checked: boolean;
25
21
  columns: TableConfigColumn[];
26
22
  deletedColuns: TableConfigColumn[];
@@ -28,14 +24,18 @@ export declare class KvTableComponent implements OnInit {
28
24
  checkboxClicked: boolean;
29
25
  showFiltrosAvancados: boolean;
30
26
  collapsed: boolean;
31
- commandEvent: MenuItemCommandEvent;
27
+ tableData: {
28
+ data: any;
29
+ actions?: MenuItem[];
30
+ }[];
31
+ currDataSource: any[];
32
32
  templates: QueryList<any>;
33
33
  _templates: any;
34
34
  table: Table;
35
35
  deletedColumnsIndex: any[];
36
36
  set setConfig(value: TableConfig);
37
37
  defaultSortField: string;
38
- dataSource: any;
38
+ dataSource: any[];
39
39
  selectedItems: any[];
40
40
  totalRecords: number;
41
41
  paginator: boolean;
@@ -45,7 +45,6 @@ export declare class KvTableComponent implements OnInit {
45
45
  showFirstLastIcon: boolean;
46
46
  tableSize: number;
47
47
  applyStyle: Function;
48
- acoesLinhaTabela: boolean;
49
48
  filterColumnsBtn: boolean;
50
49
  filtrosAvancados: boolean;
51
50
  scrollHeight: string;
@@ -64,10 +63,12 @@ export declare class KvTableComponent implements OnInit {
64
63
  menuFiltroDiv: ElementRef;
65
64
  botaoFiltro: ElementRef;
66
65
  constructor(datePipe: DatePipe, decimalPipe: DecimalPipe, cpfCnpjPipe: CpfCnpjPipe, telefonePipe: TelefonePipe);
66
+ ngDoCheck(): void;
67
67
  ngOnInit(): void;
68
68
  onWindowResize(): void;
69
69
  activeItem(rowData: any): void;
70
70
  activeItemLote(rowData: any): void;
71
+ getOrExecute<T>(action: ValueOrFn<T>, data: any): T;
71
72
  isBooleanField(rowData: any, col: TableConfigColumn): boolean;
72
73
  isChipField(col: TableConfigColumn): boolean;
73
74
  isImageField(col: TableConfigColumn): boolean;
@@ -87,10 +88,8 @@ export declare class KvTableComponent implements OnInit {
87
88
  centralizarColunas(col: any): string;
88
89
  alignColunas(col: any): string;
89
90
  alignColunasHeader(col: any): string;
90
- retornarCampo(action: KvMenuItem, rowData: any, field: string): string;
91
91
  retornarRow(rowData: any, col: any, field: string): string;
92
92
  exibirCampo(field: any, rowData: any): any;
93
- criarMenusModal(data: any): void;
94
93
  returnClassChip(rowData: any, col: any): string;
95
94
  returnClassIcon(rowData: any, col: any): string;
96
95
  returnTooltipIcon(rowData: any, col: any): string;
@@ -100,13 +99,11 @@ export declare class KvTableComponent implements OnInit {
100
99
  dinamicColumnSet(e: any, col: any): void;
101
100
  checkMenuFiltro(col: any): void;
102
101
  sortByPosition(): (elem1: any, elem2: any) => 0 | 1 | -1;
103
- callDisabled(action: KvMenuItem, data: any): boolean;
104
102
  dinamicDisableColumn(col: TableConfigColumn): boolean;
105
103
  checkHideColumns(): void;
106
104
  getCustomTemplate(templatename: string): TemplateRef<any>;
107
105
  filtrosAvancadosEvent(e: any): void;
108
- isButtonDisable(action: any, rowData: any, commandEvent: any): any;
109
106
  onSwitchChange(estado: any, rowData: boolean, col: any): void;
110
107
  static ɵfac: i0.ɵɵFactoryDeclaration<KvTableComponent, never>;
111
- static ɵcmp: i0.ɵɵComponentDeclaration<KvTableComponent, "kv-table", never, { "_templates": { "alias": "templates"; "required": false; }; "setConfig": { "alias": "config"; "required": false; }; "defaultSortField": { "alias": "defaultSortField"; "required": false; }; "dataSource": { "alias": "dataSource"; "required": false; }; "selectedItems": { "alias": "selectedItems"; "required": false; }; "totalRecords": { "alias": "totalRecords"; "required": false; }; "paginator": { "alias": "paginator"; "required": false; }; "rowsPerPageOptions": { "alias": "rowsPerPageOptions"; "required": false; }; "rows": { "alias": "rows"; "required": false; }; "pageLinksOptions": { "alias": "pageLinksOptions"; "required": false; }; "showFirstLastIcon": { "alias": "showFirstLastIcon"; "required": false; }; "tableSize": { "alias": "tableSize"; "required": false; }; "applyStyle": { "alias": "applyStyle"; "required": false; }; "acoesLinhaTabela": { "alias": "acoesLinhaTabela"; "required": false; }; "filterColumnsBtn": { "alias": "filterColumnsBtn"; "required": false; }; "filtrosAvancados": { "alias": "filtrosAvancados"; "required": false; }; "scrollHeight": { "alias": "scrollHeight"; "required": false; }; "isTableScrollable": { "alias": "isTableScrollable"; "required": false; }; "tableCaptalized": { "alias": "tableCaptalized"; "required": false; }; "rowTrackBy": { "alias": "rowTrackBy"; "required": false; }; "responsiveLayout": { "alias": "responsiveLayout"; "required": false; }; }, { "onActiveItem": "onActiveItem"; "onActiveItemLote": "onActiveItemLote"; "onPaginate": "onPaginate"; "onSelectionChange": "onSelectionChange"; "doubleClickEvent": "doubleClickEvent"; "filterField": "filterField"; "filtrosAvancadosEmit": "filtrosAvancadosEmit"; "onSwitchTableChange": "onSwitchTableChange"; }, ["templates"], ["*"], false, never>;
108
+ static ɵcmp: i0.ɵɵComponentDeclaration<KvTableComponent, "kv-table", never, { "_templates": { "alias": "templates"; "required": false; }; "setConfig": { "alias": "config"; "required": false; }; "defaultSortField": { "alias": "defaultSortField"; "required": false; }; "dataSource": { "alias": "dataSource"; "required": false; }; "selectedItems": { "alias": "selectedItems"; "required": false; }; "totalRecords": { "alias": "totalRecords"; "required": false; }; "paginator": { "alias": "paginator"; "required": false; }; "rowsPerPageOptions": { "alias": "rowsPerPageOptions"; "required": false; }; "rows": { "alias": "rows"; "required": false; }; "pageLinksOptions": { "alias": "pageLinksOptions"; "required": false; }; "showFirstLastIcon": { "alias": "showFirstLastIcon"; "required": false; }; "tableSize": { "alias": "tableSize"; "required": false; }; "applyStyle": { "alias": "applyStyle"; "required": false; }; "filterColumnsBtn": { "alias": "filterColumnsBtn"; "required": false; }; "filtrosAvancados": { "alias": "filtrosAvancados"; "required": false; }; "scrollHeight": { "alias": "scrollHeight"; "required": false; }; "isTableScrollable": { "alias": "isTableScrollable"; "required": false; }; "tableCaptalized": { "alias": "tableCaptalized"; "required": false; }; "rowTrackBy": { "alias": "rowTrackBy"; "required": false; }; "responsiveLayout": { "alias": "responsiveLayout"; "required": false; }; }, { "onActiveItem": "onActiveItem"; "onActiveItemLote": "onActiveItemLote"; "onPaginate": "onPaginate"; "onSelectionChange": "onSelectionChange"; "doubleClickEvent": "doubleClickEvent"; "filterField": "filterField"; "filtrosAvancadosEmit": "filtrosAvancadosEmit"; "onSwitchTableChange": "onSwitchTableChange"; }, ["templates"], ["*"], false, never>;
112
109
  }
@@ -1,8 +1,8 @@
1
1
  import { EventEmitter, OnChanges, OnInit, SimpleChanges, TemplateRef } from '@angular/core';
2
2
  import { DatePipe, DecimalPipe } from '@angular/common';
3
- import { MenuItem, MenuItemCommandEvent, SelectItem } from 'primeng/api';
3
+ import { MenuItem, SelectItem } from 'primeng/api';
4
4
  import { Table } from 'primeng/table';
5
- import { CpfCnpjPipe, KvMenuItem, NotificationService, TableConfigColumn, TelefonePipe } from '../../../public-api';
5
+ import { CpfCnpjPipe, NotificationService, TableConfigColumn, TelefonePipe, ValueOrFn } from '../../../public-api';
6
6
  import { TableEditConfigColumn } from '../../api/components/table/tableedit.config.column';
7
7
  import TableEditConfig from '../../api/components/table/tabledit.config';
8
8
  import { Subject, Subscription } from 'rxjs';
@@ -28,7 +28,6 @@ export declare class KvTableEditComponent implements OnInit, OnChanges {
28
28
  showFirstLastIcon: boolean;
29
29
  tableSize: number;
30
30
  applyStyle: Function;
31
- acoesLinhaTabela: boolean;
32
31
  filterColumnsBtn: boolean;
33
32
  filtrosAvancados: boolean;
34
33
  scrollHeight: string;
@@ -45,10 +44,9 @@ export declare class KvTableEditComponent implements OnInit, OnChanges {
45
44
  _templates: any;
46
45
  tamanhoTela: number;
47
46
  selecteIems: any[];
48
- menuItems: KvMenuItem[];
47
+ menuItems: MenuItem[];
49
48
  imgDefault: string;
50
49
  isExpanded: boolean;
51
- commandEvent: MenuItemCommandEvent;
52
50
  statuses: SelectItem[];
53
51
  clonedDataSource: {
54
52
  [s: string]: any;
@@ -65,6 +63,7 @@ export declare class KvTableEditComponent implements OnInit, OnChanges {
65
63
  onFilter: EventEmitter<any>;
66
64
  constructor(datePipe: DatePipe, decimalPipe: DecimalPipe, cpfCnpjPipe: CpfCnpjPipe, telefonePipe: TelefonePipe, notificationService: NotificationService);
67
65
  selectedProduct: any;
66
+ getOrExecute<T>(action: ValueOrFn<T>, data: any): T;
68
67
  items: MenuItem[];
69
68
  sizes: {
70
69
  label: string;
@@ -113,19 +112,15 @@ export declare class KvTableEditComponent implements OnInit, OnChanges {
113
112
  exibirCampo(field: any, rowData: any): any;
114
113
  activeItem(rowData: any): void;
115
114
  activeItemLote(rowData: any): void;
116
- retornarCampo(action: KvMenuItem, rowData: any, field: string): string;
117
- callDisabled(action: KvMenuItem, data: any): boolean;
118
115
  criarMenusModal(data: any): void;
119
- validaLinhaAcaoVazia(rowData: any): boolean;
120
116
  doubleClick(e: any, rowData: any): void;
121
117
  isDisabledCheckbox(rowData: any): boolean;
122
118
  returnTooltipRow(rowData: any, col: any): any;
123
119
  isSwitchField(col: TableConfigColumn): boolean;
124
120
  onSwitchChange(estado: any, rowData: boolean, col: any): void;
125
- isButtonDisable(action: any, rowData: any, commandEvent: any): any;
126
121
  isDisableEditRowFunction(rowData: any): boolean;
127
122
  isDisableEditRowCellFunction(rowData: any, col: any): boolean;
128
123
  isEditableTable(): boolean | null;
129
124
  static ɵfac: i0.ɵɵFactoryDeclaration<KvTableEditComponent, never>;
130
- static ɵcmp: i0.ɵɵComponentDeclaration<KvTableEditComponent, "kv-table-edit", never, { "setConfig": { "alias": "config"; "required": false; }; "dataSource": { "alias": "dataSource"; "required": false; }; "selectedItems": { "alias": "selectedItems"; "required": false; }; "totalRecords": { "alias": "totalRecords"; "required": false; }; "paginator": { "alias": "paginator"; "required": false; }; "rowsPerPageOptions": { "alias": "rowsPerPageOptions"; "required": false; }; "rows": { "alias": "rows"; "required": false; }; "pageLinksOptions": { "alias": "pageLinksOptions"; "required": false; }; "showFirstLastIcon": { "alias": "showFirstLastIcon"; "required": false; }; "tableSize": { "alias": "tableSize"; "required": false; }; "applyStyle": { "alias": "applyStyle"; "required": false; }; "acoesLinhaTabela": { "alias": "acoesLinhaTabela"; "required": false; }; "filterColumnsBtn": { "alias": "filterColumnsBtn"; "required": false; }; "filtrosAvancados": { "alias": "filtrosAvancados"; "required": false; }; "scrollHeight": { "alias": "scrollHeight"; "required": false; }; "isTableScrollable": { "alias": "isTableScrollable"; "required": false; }; "rowTrackBy": { "alias": "rowTrackBy"; "required": false; }; "responsiveLayout": { "alias": "responsiveLayout"; "required": false; }; "tamanhoTotalTabela": { "alias": "tamanhoTotalTabela"; "required": false; }; "editMode": { "alias": "editMode"; "required": false; }; "enableSizes": { "alias": "enableSizes"; "required": false; }; "_templates": { "alias": "templates"; "required": false; }; }, { "onSave": "onSave"; "onActiveItem": "onActiveItem"; "onActiveItemLote": "onActiveItemLote"; "onPaginate": "onPaginate"; "onSelectionChange": "onSelectionChange"; "doubleClickEvent": "doubleClickEvent"; "filterField": "filterField"; "onSwitchTableChange": "onSwitchTableChange"; "onFilter": "onFilter"; }, never, ["*"], false, never>;
125
+ static ɵcmp: i0.ɵɵComponentDeclaration<KvTableEditComponent, "kv-table-edit", never, { "setConfig": { "alias": "config"; "required": false; }; "dataSource": { "alias": "dataSource"; "required": false; }; "selectedItems": { "alias": "selectedItems"; "required": false; }; "totalRecords": { "alias": "totalRecords"; "required": false; }; "paginator": { "alias": "paginator"; "required": false; }; "rowsPerPageOptions": { "alias": "rowsPerPageOptions"; "required": false; }; "rows": { "alias": "rows"; "required": false; }; "pageLinksOptions": { "alias": "pageLinksOptions"; "required": false; }; "showFirstLastIcon": { "alias": "showFirstLastIcon"; "required": false; }; "tableSize": { "alias": "tableSize"; "required": false; }; "applyStyle": { "alias": "applyStyle"; "required": false; }; "filterColumnsBtn": { "alias": "filterColumnsBtn"; "required": false; }; "filtrosAvancados": { "alias": "filtrosAvancados"; "required": false; }; "scrollHeight": { "alias": "scrollHeight"; "required": false; }; "isTableScrollable": { "alias": "isTableScrollable"; "required": false; }; "rowTrackBy": { "alias": "rowTrackBy"; "required": false; }; "responsiveLayout": { "alias": "responsiveLayout"; "required": false; }; "tamanhoTotalTabela": { "alias": "tamanhoTotalTabela"; "required": false; }; "editMode": { "alias": "editMode"; "required": false; }; "enableSizes": { "alias": "enableSizes"; "required": false; }; "_templates": { "alias": "templates"; "required": false; }; }, { "onSave": "onSave"; "onActiveItem": "onActiveItem"; "onActiveItemLote": "onActiveItemLote"; "onPaginate": "onPaginate"; "onSelectionChange": "onSelectionChange"; "doubleClickEvent": "doubleClickEvent"; "filterField": "filterField"; "onSwitchTableChange": "onSwitchTableChange"; "onFilter": "onFilter"; }, never, ["*"], false, never>;
131
126
  }
@@ -1,16 +1,15 @@
1
1
  import { EventEmitter, QueryList, TemplateRef } from '@angular/core';
2
- import { MenuItemCommandEvent } from 'primeng/api';
2
+ import { MenuItem } from 'primeng/api';
3
3
  import { TreeTable } from 'primeng/treetable';
4
- import { KvMenuItem } from '../../api/components/table/kv-menuitem';
4
+ import { ValueOrFn } from '../../api/components/table/kv-menuitem';
5
+ import { TreeTableConfig } from '../../api/components/tree-table/tree-table.config';
5
6
  import * as i0 from "@angular/core";
6
7
  export declare class KvTreetableComponent {
7
- menuItems: KvMenuItem[];
8
+ menuItems: MenuItem[];
8
9
  tamanhoTela: number;
9
- commandEvent: MenuItemCommandEvent;
10
- config: any;
10
+ config: TreeTableConfig;
11
11
  dataSource: any;
12
12
  gridLines: boolean;
13
- acoesLinhaTabela: boolean;
14
13
  tableCaptalized: boolean;
15
14
  selectedItems: any;
16
15
  paginator: boolean;
@@ -30,6 +29,7 @@ export declare class KvTreetableComponent {
30
29
  onWindowResize(): void;
31
30
  activeItem(rowData: any): void;
32
31
  activeItemLote(rowData: any): void;
32
+ getOrExecute<T>(action: ValueOrFn<T>, data: any): T;
33
33
  onGlobalFilter(table: TreeTable, event: Event): void;
34
34
  paginate($event: any): void;
35
35
  returnStyleRow(col: any, rowNode: any): string;
@@ -37,14 +37,13 @@ export declare class KvTreetableComponent {
37
37
  centralizarColunas(col: any): string;
38
38
  alignColunas(col: any): string;
39
39
  criarMenusModal(data: any): void;
40
- retornarCampo(action: KvMenuItem, rowData: any, field: string): string;
41
40
  exibirCampo(field: any, rowData: any): any;
42
41
  validateActionPosition(rowNode: any): boolean;
43
42
  doubleClick(e: any, rowData: any): void;
44
43
  isDisabledCheckbox(rowData: any, rowNode: any): boolean;
45
44
  getCustomTemplate(templatename: string): TemplateRef<any>;
46
45
  validateShowTemplate(rowNode: any, col: any): boolean;
47
- getIcon(action: any): string;
46
+ getIcon(icon: string): string;
48
47
  static ɵfac: i0.ɵɵFactoryDeclaration<KvTreetableComponent, never>;
49
- static ɵcmp: i0.ɵɵComponentDeclaration<KvTreetableComponent, "kv-tree-table", never, { "config": { "alias": "config"; "required": false; }; "dataSource": { "alias": "dataSource"; "required": false; }; "gridLines": { "alias": "gridLines"; "required": false; }; "acoesLinhaTabela": { "alias": "acoesLinhaTabela"; "required": false; }; "tableCaptalized": { "alias": "tableCaptalized"; "required": false; }; "selectedItems": { "alias": "selectedItems"; "required": false; }; "paginator": { "alias": "paginator"; "required": false; }; "rows": { "alias": "rows"; "required": false; }; "pageLinks": { "alias": "pageLinks"; "required": false; }; "showFirstLastIcon": { "alias": "showFirstLastIcon"; "required": false; }; "totalRecords": { "alias": "totalRecords"; "required": false; }; "textoEmptyMessage": { "alias": "textoEmptyMessage"; "required": false; }; "_templates": { "alias": "templates"; "required": false; }; }, { "onFilter": "onFilter"; "onPaginate": "onPaginate"; "onActiveItem": "onActiveItem"; "onActiveItemLote": "onActiveItemLote"; "doubleClickEvent": "doubleClickEvent"; }, ["templates"], never, false, never>;
48
+ static ɵcmp: i0.ɵɵComponentDeclaration<KvTreetableComponent, "kv-tree-table", never, { "config": { "alias": "config"; "required": false; }; "dataSource": { "alias": "dataSource"; "required": false; }; "gridLines": { "alias": "gridLines"; "required": false; }; "tableCaptalized": { "alias": "tableCaptalized"; "required": false; }; "selectedItems": { "alias": "selectedItems"; "required": false; }; "paginator": { "alias": "paginator"; "required": false; }; "rows": { "alias": "rows"; "required": false; }; "pageLinks": { "alias": "pageLinks"; "required": false; }; "showFirstLastIcon": { "alias": "showFirstLastIcon"; "required": false; }; "totalRecords": { "alias": "totalRecords"; "required": false; }; "textoEmptyMessage": { "alias": "textoEmptyMessage"; "required": false; }; "_templates": { "alias": "templates"; "required": false; }; }, { "onFilter": "onFilter"; "onPaginate": "onPaginate"; "onActiveItem": "onActiveItem"; "onActiveItemLote": "onActiveItemLote"; "doubleClickEvent": "doubleClickEvent"; }, ["templates"], never, false, never>;
50
49
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "keevo-components",
3
- "version": "1.8.95",
3
+ "version": "1.8.96",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^17.3.8",
6
6
  "@angular/core": "^17.3.8",