keevo-components 1.8.149 → 1.8.151
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/lib/api/base-components/base-component-table.mjs +320 -0
- package/esm2022/lib/components/kv-table/kv-table.component.mjs +6 -3
- package/esm2022/lib/components/kv-table-edit/kv-table-edit.component.mjs +51 -377
- package/esm2022/lib/components/kv-workspace/kv-workspace.component.mjs +1 -1
- package/esm2022/public-api.mjs +3 -1
- package/fesm2022/keevo-components.mjs +2660 -2670
- package/fesm2022/keevo-components.mjs.map +1 -1
- package/lib/api/base-components/base-component-table.d.ts +85 -0
- package/lib/components/kv-table/kv-table.component.d.ts +2 -1
- package/lib/components/kv-table-edit/kv-table-edit.component.d.ts +15 -84
- package/package.json +1 -1
- package/public-api.d.ts +2 -0
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { EventEmitter, OnInit, TemplateRef } from '@angular/core';
|
|
2
|
+
import { TreeTableConfig } from '../components/tree-table/tree-table.config';
|
|
3
|
+
import { Table } from 'primeng/table/public_api';
|
|
4
|
+
import { DatePipe, DecimalPipe } from '@angular/common';
|
|
5
|
+
import TableEditConfig from 'projects/keevo-components/src/lib/api/components/table/tabledit.config';
|
|
6
|
+
import { NotificationService } from '../services/notification.service';
|
|
7
|
+
import { TelefonePipe } from '../pipes/telefone.pipe';
|
|
8
|
+
import { CpfCnpjPipe } from '../pipes/cpfcnpj.pipe';
|
|
9
|
+
import { TableConfig } from '../components/table/table.config';
|
|
10
|
+
import { TableConfigColumn } from '../components/table/table.config.column';
|
|
11
|
+
import * as i0 from "@angular/core";
|
|
12
|
+
export declare abstract class BasecomponentTable implements OnInit {
|
|
13
|
+
datePipe: DatePipe;
|
|
14
|
+
decimalPipe: DecimalPipe;
|
|
15
|
+
cpfCnpjPipe: CpfCnpjPipe;
|
|
16
|
+
telefonePipe: TelefonePipe;
|
|
17
|
+
notificationService: NotificationService;
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
*/
|
|
21
|
+
constructor(datePipe: DatePipe, decimalPipe: DecimalPipe, cpfCnpjPipe: CpfCnpjPipe, telefonePipe: TelefonePipe, notificationService: NotificationService);
|
|
22
|
+
imgDefault: string;
|
|
23
|
+
config: TableConfig | TableEditConfig | TreeTableConfig;
|
|
24
|
+
selectedItem: any;
|
|
25
|
+
selectedSize: any;
|
|
26
|
+
tamanhoTela: number;
|
|
27
|
+
collapsed: boolean;
|
|
28
|
+
globalFilterFields: string[];
|
|
29
|
+
selectedItems: any[];
|
|
30
|
+
totalRecords: number;
|
|
31
|
+
paginator: boolean;
|
|
32
|
+
rowsPerPageOptions: number[];
|
|
33
|
+
rows: number;
|
|
34
|
+
pageLinksOptions: number;
|
|
35
|
+
showFirstLastIcon: boolean;
|
|
36
|
+
applyStyle: Function;
|
|
37
|
+
filterColumnsBtn: boolean;
|
|
38
|
+
filtrosAvancados: boolean;
|
|
39
|
+
scrollHeight: string;
|
|
40
|
+
isTableScrollable: boolean;
|
|
41
|
+
rowTrackBy: Function;
|
|
42
|
+
responsiveLayout: boolean;
|
|
43
|
+
tableSize: number;
|
|
44
|
+
dataSource: any[];
|
|
45
|
+
_templates: any;
|
|
46
|
+
set setConfig(value: TableEditConfig);
|
|
47
|
+
onFilter: EventEmitter<any>;
|
|
48
|
+
onSwitchTableChange: EventEmitter<any>;
|
|
49
|
+
onActiveItemLote: EventEmitter<any>;
|
|
50
|
+
onActiveItem: EventEmitter<any>;
|
|
51
|
+
onSelectionChange: EventEmitter<any>;
|
|
52
|
+
doubleClickEvent: EventEmitter<any>;
|
|
53
|
+
onPaginate: EventEmitter<any>;
|
|
54
|
+
ngOnInit(): void;
|
|
55
|
+
doubleClick(e: any, rowData: any): void;
|
|
56
|
+
returnTooltipRow(rowData: any, col: any): any;
|
|
57
|
+
retornarRow(rowData: any, col: any, field: string): string;
|
|
58
|
+
returnRowClass(rowData: any, col: TableConfigColumn): string;
|
|
59
|
+
getCustomTemplate(templatename: string): TemplateRef<any>;
|
|
60
|
+
returnClassIcon(rowData: any, col: any): string;
|
|
61
|
+
returnClassChip(rowData: any, col: any): string;
|
|
62
|
+
returnTooltipIcon(rowData: any, col: any): string;
|
|
63
|
+
loadImage(rowData: any, col: TableConfigColumn): string;
|
|
64
|
+
alignColunas(col: any): string;
|
|
65
|
+
centralizarColunas(col: any): string;
|
|
66
|
+
alignColunasHeader(col: any): string;
|
|
67
|
+
formatarValor(valor: number): string;
|
|
68
|
+
transformValue(rowData: any, col: TableConfigColumn): any;
|
|
69
|
+
onGlobalFilter(table: Table, event: Event): void;
|
|
70
|
+
onSwitchChange(estado: any, rowData: boolean, col: any): void;
|
|
71
|
+
isSwitchField(col: TableConfigColumn): boolean;
|
|
72
|
+
isDisabledCheckbox(rowData: any): boolean;
|
|
73
|
+
activeItemLote(selectedItems: any): void;
|
|
74
|
+
activeItem(rowData: any): void;
|
|
75
|
+
exibirCampo(field: any, rowData: any): any;
|
|
76
|
+
selectionChange(value?: never[]): void;
|
|
77
|
+
isImageField(col: TableConfigColumn): boolean;
|
|
78
|
+
isChipField(col: TableConfigColumn): boolean;
|
|
79
|
+
isBooleanField(rowData: any, col: TableConfigColumn): boolean;
|
|
80
|
+
paginate($event: any): void;
|
|
81
|
+
adjustTableSize(): void;
|
|
82
|
+
onWindowResize(): void;
|
|
83
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BasecomponentTable, never>;
|
|
84
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BasecomponentTable, "ng-component", never, { "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; }; "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; }; "tableSize": { "alias": "tableSize"; "required": false; }; "dataSource": { "alias": "dataSource"; "required": false; }; "_templates": { "alias": "templates"; "required": false; }; "setConfig": { "alias": "config"; "required": false; }; }, { "onFilter": "onFilter"; "onSwitchTableChange": "onSwitchTableChange"; "onActiveItemLote": "onActiveItemLote"; "onActiveItem": "onActiveItem"; "onSelectionChange": "onSelectionChange"; "doubleClickEvent": "doubleClickEvent"; "onPaginate": "onPaginate"; }, never, never, false, never>;
|
|
85
|
+
}
|
|
@@ -55,6 +55,7 @@ export declare class KvTableComponent implements OnInit, DoCheck {
|
|
|
55
55
|
tableCaptalized: boolean;
|
|
56
56
|
rowTrackBy: Function;
|
|
57
57
|
responsiveLayout: boolean;
|
|
58
|
+
disabledHeaderCheckbox: boolean;
|
|
58
59
|
onActiveItem: EventEmitter<any>;
|
|
59
60
|
onActiveItemLote: EventEmitter<any>;
|
|
60
61
|
onPaginate: EventEmitter<TablePaginate>;
|
|
@@ -108,5 +109,5 @@ export declare class KvTableComponent implements OnInit, DoCheck {
|
|
|
108
109
|
createTableActions(): void;
|
|
109
110
|
onSort(e: any): void;
|
|
110
111
|
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; }; "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"; "onSwitchTableChange": "onSwitchTableChange"; }, ["templates"], ["*"], false, never>;
|
|
112
|
+
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; }; "disabledHeaderCheckbox": { "alias": "disabledHeaderCheckbox"; "required": false; }; }, { "onActiveItem": "onActiveItem"; "onActiveItemLote": "onActiveItemLote"; "onPaginate": "onPaginate"; "onSelectionChange": "onSelectionChange"; "doubleClickEvent": "doubleClickEvent"; "filterField": "filterField"; "onSwitchTableChange": "onSwitchTableChange"; }, ["templates"], ["*"], false, never>;
|
|
112
113
|
}
|
|
@@ -1,78 +1,37 @@
|
|
|
1
|
-
import { EventEmitter, OnChanges, OnInit, SimpleChanges
|
|
1
|
+
import { EventEmitter, OnChanges, OnInit, SimpleChanges } from '@angular/core';
|
|
2
2
|
import { DatePipe, DecimalPipe } from '@angular/common';
|
|
3
|
-
import { MenuItem
|
|
4
|
-
import {
|
|
5
|
-
import { CapitalizePipe, CpfCnpjPipe, NotificationService, TableConfigColumn, TelefonePipe, ValueOrFn } from '../../../public-api';
|
|
3
|
+
import { MenuItem } from 'primeng/api';
|
|
4
|
+
import { CpfCnpjPipe, NotificationService, TelefonePipe, ValueOrFn } from '../../../public-api';
|
|
6
5
|
import { TableEditConfigColumn } from '../../api/components/table/tableedit.config.column';
|
|
7
6
|
import TableEditConfig from '../../api/components/table/tabledit.config';
|
|
8
7
|
import { Subject, Subscription } from 'rxjs';
|
|
8
|
+
import { BasecomponentTable } from '../../api/base-components/base-component-table';
|
|
9
9
|
import * as i0 from "@angular/core";
|
|
10
|
-
export declare class KvTableEditComponent implements OnInit, OnChanges {
|
|
11
|
-
private readonly datePipe;
|
|
12
|
-
private readonly decimalPipe;
|
|
13
|
-
private readonly cpfCnpjPipe;
|
|
14
|
-
private readonly telefonePipe;
|
|
15
|
-
private readonly capitalizePipe;
|
|
16
|
-
private readonly notificationService;
|
|
17
|
-
collapsed: boolean;
|
|
10
|
+
export declare class KvTableEditComponent extends BasecomponentTable implements OnInit, OnChanges {
|
|
18
11
|
config: TableEditConfig;
|
|
19
|
-
|
|
20
|
-
set setConfig(value: TableEditConfig);
|
|
21
|
-
dataSource: any[];
|
|
22
|
-
selectedItems: any[];
|
|
23
|
-
selectedItem: any;
|
|
24
|
-
totalRecords: number;
|
|
25
|
-
paginator: boolean;
|
|
26
|
-
rowsPerPageOptions: number[];
|
|
27
|
-
rows: number;
|
|
28
|
-
pageLinksOptions: number;
|
|
29
|
-
showFirstLastIcon: boolean;
|
|
30
|
-
tableSize: number;
|
|
31
|
-
applyStyle: Function;
|
|
32
|
-
filterColumnsBtn: boolean;
|
|
33
|
-
filtrosAvancados: boolean;
|
|
34
|
-
scrollHeight: string;
|
|
35
|
-
isTableScrollable: boolean;
|
|
36
|
-
rowTrackBy: Function;
|
|
37
|
-
responsiveLayout: boolean;
|
|
38
|
-
tamanhoTotalTabela: number;
|
|
12
|
+
enableSizes: boolean;
|
|
39
13
|
editMode: 'row' | 'cell';
|
|
40
|
-
isEditing: boolean;
|
|
41
|
-
isShowSizes: boolean;
|
|
42
14
|
private itemsParaSalvamento;
|
|
43
15
|
protected itemInitialState: any;
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
tamanhoTela: number;
|
|
47
|
-
selecteIems: any[];
|
|
48
|
-
menuItems: MenuItem[];
|
|
49
|
-
imgDefault: string;
|
|
50
|
-
isExpanded: boolean;
|
|
51
|
-
statuses: SelectItem[];
|
|
16
|
+
isEditing: boolean;
|
|
17
|
+
isShowSizes: boolean;
|
|
52
18
|
clonedDataSource: {
|
|
53
19
|
[s: string]: any;
|
|
54
20
|
};
|
|
21
|
+
selectedProduct: any;
|
|
22
|
+
menuItems: MenuItem[];
|
|
23
|
+
itemsContextMenu: MenuItem[];
|
|
55
24
|
/** Emite evento de salvamento da linha */
|
|
56
25
|
onSave: EventEmitter<any>;
|
|
57
|
-
onActiveItem: EventEmitter<any>;
|
|
58
|
-
onActiveItemLote: EventEmitter<any>;
|
|
59
|
-
onPaginate: EventEmitter<any>;
|
|
60
|
-
onSelectionChange: EventEmitter<any>;
|
|
61
|
-
doubleClickEvent: EventEmitter<any>;
|
|
62
26
|
filterField: EventEmitter<any>;
|
|
63
|
-
|
|
64
|
-
onFilter: EventEmitter<any>;
|
|
65
|
-
constructor(datePipe: DatePipe, decimalPipe: DecimalPipe, cpfCnpjPipe: CpfCnpjPipe, telefonePipe: TelefonePipe, capitalizePipe: CapitalizePipe, notificationService: NotificationService);
|
|
66
|
-
selectedProduct: any;
|
|
27
|
+
constructor(datePipe: DatePipe, decimalPipe: DecimalPipe, cpfCnpjPipe: CpfCnpjPipe, telefonePipe: TelefonePipe, notificationService: NotificationService);
|
|
67
28
|
getOrExecute<T>(action: ValueOrFn<T>, data: any): T;
|
|
68
|
-
items: MenuItem[];
|
|
69
29
|
sizes: {
|
|
70
30
|
label: string;
|
|
71
31
|
class: string;
|
|
72
32
|
size: number;
|
|
73
33
|
command: (x: any) => void;
|
|
74
34
|
}[];
|
|
75
|
-
selectedSize: any;
|
|
76
35
|
timerSubscription: Subscription;
|
|
77
36
|
onSaveTimer$: Subject<void>;
|
|
78
37
|
private onDestroy$;
|
|
@@ -82,46 +41,18 @@ export declare class KvTableEditComponent implements OnInit, OnChanges {
|
|
|
82
41
|
dbClickEdit(): void;
|
|
83
42
|
isRowSelectable(event: any): boolean;
|
|
84
43
|
ngOnChanges(changes: SimpleChanges): void;
|
|
44
|
+
criarMenusModal(data: any): void;
|
|
85
45
|
onRowEditInit(rowData: any): void;
|
|
86
46
|
onEditInit(event1: any): void;
|
|
87
47
|
onEditComplete(event: any): void;
|
|
88
48
|
adicionarCelulaParaSalvar(item: any): void;
|
|
89
49
|
onRowEditSave(): void;
|
|
90
50
|
onRowEditCancel(product: any, index: number): void;
|
|
91
|
-
listarDrop(service: any, col: any, indtodos?: boolean):
|
|
51
|
+
listarDrop(service: any, col: any, indtodos?: boolean): any;
|
|
92
52
|
retornaDescricaoDrop(rowData: any[], col: TableEditConfigColumn): any;
|
|
93
|
-
onGlobalFilter(table: Table, event: Event): void;
|
|
94
|
-
onWindowResize(): void;
|
|
95
|
-
adjustTableSize(): void;
|
|
96
|
-
paginate($event: any): void;
|
|
97
|
-
isBooleanField(rowData: any, col: TableConfigColumn): boolean;
|
|
98
|
-
isChipField(col: TableConfigColumn): boolean;
|
|
99
|
-
isImageField(col: TableConfigColumn): boolean;
|
|
100
|
-
returnRowClass(rowData: any, col: TableConfigColumn): string;
|
|
101
|
-
transformValue(rowData: any, col: TableConfigColumn): any;
|
|
102
|
-
alignColunasHeader(col: any): string;
|
|
103
|
-
centralizarColunas(col: any): string;
|
|
104
|
-
alignColunas(col: any): string;
|
|
105
|
-
returnClassIcon(rowData: any, col: any): string;
|
|
106
|
-
returnTooltipIcon(rowData: any, col: any): string;
|
|
107
|
-
returnClassChip(rowData: any, col: any): string;
|
|
108
|
-
retornarRow(rowData: any, col: any, field: string): string;
|
|
109
|
-
selectionChange(value?: never[]): void;
|
|
110
|
-
formatarValor(valor: number): string;
|
|
111
|
-
loadImage(rowData: any, col: TableConfigColumn): string;
|
|
112
|
-
getCustomTemplate(templatename: string): TemplateRef<any>;
|
|
113
|
-
exibirCampo(field: any, rowData: any): any;
|
|
114
|
-
activeItem(rowData: any): void;
|
|
115
|
-
activeItemLote(rowData: any): void;
|
|
116
|
-
criarMenusModal(data: any): void;
|
|
117
|
-
doubleClick(e: any, rowData: any): void;
|
|
118
|
-
isDisabledCheckbox(rowData: any): boolean;
|
|
119
|
-
returnTooltipRow(rowData: any, col: any): any;
|
|
120
|
-
isSwitchField(col: TableConfigColumn): boolean;
|
|
121
|
-
onSwitchChange(estado: any, rowData: boolean, col: any): void;
|
|
122
53
|
isDisableEditRowFunction(rowData: any): boolean;
|
|
123
54
|
isDisableEditRowCellFunction(rowData: any, col: any): boolean;
|
|
124
55
|
isEditableTable(): boolean | null;
|
|
125
56
|
static ɵfac: i0.ɵɵFactoryDeclaration<KvTableEditComponent, never>;
|
|
126
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<KvTableEditComponent, "kv-table-edit", never, { "
|
|
57
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<KvTableEditComponent, "kv-table-edit", never, { "enableSizes": { "alias": "enableSizes"; "required": false; }; "editMode": { "alias": "editMode"; "required": false; }; }, { "onSave": "onSave"; "filterField": "filterField"; }, never, ["*"], false, never>;
|
|
127
58
|
}
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -11,6 +11,8 @@ export * from './lib/api/base-components/base-component-dropdown';
|
|
|
11
11
|
export * from './lib/api/base-components/base-component-input';
|
|
12
12
|
export * from './lib/api/base-components/base-component-multi-select';
|
|
13
13
|
export * from './lib/api/base-components/base-component';
|
|
14
|
+
export * from './lib/api/base-components/base-component';
|
|
15
|
+
export * from './lib/api/base-components/base-component-table';
|
|
14
16
|
/**
|
|
15
17
|
* Helpers
|
|
16
18
|
*/
|