keevo-components 1.8.1 → 1.8.2

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.
@@ -0,0 +1,6 @@
1
+ export default interface FieldDropDownControl {
2
+ fieldControlDropdownService?: any;
3
+ fieldControlDropdownSource?: any;
4
+ idobjeto: string;
5
+ descricaoobjeto: string;
6
+ }
@@ -5,6 +5,7 @@ export interface TableConfig {
5
5
  actionsLote?: KvMenuItem[];
6
6
  actionsPai?: KvMenuItem[];
7
7
  columns: TableConfigColumn[];
8
+ dataKey?: string;
8
9
  rows?: any;
9
10
  title?: string;
10
11
  subtitle?: string;
@@ -0,0 +1,5 @@
1
+ import { TableConfig } from "./table.config";
2
+ import { TableEditConfigColumn } from "./tableedit.config.column";
3
+ export default interface TableEditConfig extends TableConfig {
4
+ columns: TableEditConfigColumn[];
5
+ }
@@ -0,0 +1,9 @@
1
+ import FieldDropDownControl from "./table-dropdown-control";
2
+ import { TableConfigColumn } from "./table.config.column";
3
+ export interface TableEditConfigColumn extends TableConfigColumn {
4
+ required?: boolean;
5
+ validator?: any;
6
+ mask?: string;
7
+ fieldControlType?: 'text' | 'switch' | 'dropdown' | 'multiselect' | 'number' | 'calendar' | 'mask';
8
+ fieldDropDownControl?: FieldDropDownControl;
9
+ }
@@ -10,6 +10,7 @@ export interface paramsDialog {
10
10
  height?: string;
11
11
  width?: string;
12
12
  styleClass?: string;
13
+ header?: string;
13
14
  }
14
15
  export declare class FormService {
15
16
  static disableControl(formGroup: FormGroup, controName: string): void;
@@ -15,8 +15,9 @@ import * as i13 from "./loader/kvloader.module";
15
15
  import * as i14 from "./avatar/kv-avatar.module";
16
16
  import * as i15 from "./carousel/kv-carousel.module";
17
17
  import * as i16 from "./treetable/treetable.module";
18
+ import * as i17 from "./table-edit/table-edit.module";
18
19
  export declare class KeevoComponentsModule {
19
20
  static ɵfac: i0.ɵɵFactoryDeclaration<KeevoComponentsModule, never>;
20
- static ɵmod: i0.ɵɵNgModuleDeclaration<KeevoComponentsModule, never, [typeof i1.KvInputsModule, typeof i2.KvButtonsModule, typeof i3.KvTableModule, typeof i4.KvtreeViewModule, typeof i5.KvChartModule, typeof i6.KvMenuModule, typeof i7.KvPickListModule, typeof i8.KVTreeTableModule, typeof i9.KvWorkspaceModule, typeof i10.OrgchartModule, typeof i11.KvLoginModule, typeof i12.KvPageFormModule, typeof i13.KvLoaderModule, typeof i14.KvAvatarModule, typeof i15.KvCarouselModule, typeof i16.TreetableModule], [typeof i1.KvInputsModule, typeof i2.KvButtonsModule, typeof i3.KvTableModule, typeof i4.KvtreeViewModule, typeof i5.KvChartModule, typeof i6.KvMenuModule, typeof i7.KvPickListModule, typeof i8.KVTreeTableModule, typeof i9.KvWorkspaceModule, typeof i10.OrgchartModule, typeof i11.KvLoginModule, typeof i12.KvPageFormModule, typeof i13.KvLoaderModule, typeof i14.KvAvatarModule, typeof i15.KvCarouselModule, typeof i16.TreetableModule]>;
21
+ static ɵmod: i0.ɵɵNgModuleDeclaration<KeevoComponentsModule, never, [typeof i1.KvInputsModule, typeof i2.KvButtonsModule, typeof i3.KvTableModule, typeof i4.KvtreeViewModule, typeof i5.KvChartModule, typeof i6.KvMenuModule, typeof i7.KvPickListModule, typeof i8.KVTreeTableModule, typeof i9.KvWorkspaceModule, typeof i10.OrgchartModule, typeof i11.KvLoginModule, typeof i12.KvPageFormModule, typeof i13.KvLoaderModule, typeof i14.KvAvatarModule, typeof i15.KvCarouselModule, typeof i16.TreetableModule], [typeof i1.KvInputsModule, typeof i2.KvButtonsModule, typeof i3.KvTableModule, typeof i4.KvtreeViewModule, typeof i5.KvChartModule, typeof i6.KvMenuModule, typeof i7.KvPickListModule, typeof i8.KVTreeTableModule, typeof i9.KvWorkspaceModule, typeof i10.OrgchartModule, typeof i11.KvLoginModule, typeof i12.KvPageFormModule, typeof i13.KvLoaderModule, typeof i14.KvAvatarModule, typeof i15.KvCarouselModule, typeof i16.TreetableModule, typeof i17.KvTableEditModule]>;
21
22
  static ɵinj: i0.ɵɵInjectorDeclaration<KeevoComponentsModule>;
22
23
  }
@@ -0,0 +1,107 @@
1
+ import { EventEmitter, OnChanges, OnInit, SimpleChanges, TemplateRef } from '@angular/core';
2
+ import { MenuItemCommandEvent, SelectItem } from 'primeng/api';
3
+ import { CodigoFipePipe, CpfCnpjPipe, KvMenuItem, NotificationService, TableConfig, TableConfigColumn, TelefonePipe } from '../../public-api';
4
+ import { DatePipe, DecimalPipe } from '@angular/common';
5
+ import { Table } from 'primeng/table';
6
+ import TableEditConfig from '../api/components/table/tabledit.config';
7
+ import { TableEditConfigColumn } from '../api/components/table/tableedit.config.column';
8
+ import * as i0 from "@angular/core";
9
+ export declare class TableEditComponent implements OnInit, OnChanges {
10
+ private readonly datePipe;
11
+ private readonly decimalPipe;
12
+ private readonly codigoFipePipe;
13
+ private readonly cpfCnpjPipe;
14
+ private readonly telefonePipe;
15
+ private readonly notificationService;
16
+ config: TableEditConfig;
17
+ globalFilterFields: string[];
18
+ set setConfig(value: TableConfig);
19
+ dataSource: any[];
20
+ editMode: 'row' | 'cell';
21
+ selectedItems: any[];
22
+ totalRecords: number;
23
+ paginator: boolean;
24
+ rowsPerPageOptions: number[];
25
+ rows: number;
26
+ pageLinksOptions: number;
27
+ showFirstLastIcon: boolean;
28
+ tableSize: number;
29
+ applyStyle: Function;
30
+ acoesLinhaTabela: boolean;
31
+ filterColumnsBtn: boolean;
32
+ filtrosAvancados: boolean;
33
+ scrollHeight: string;
34
+ isTableScrollable: boolean;
35
+ rowTrackBy: Function;
36
+ responsiveLayout: boolean;
37
+ espacamentoPai: string;
38
+ espacamentoLateral: boolean;
39
+ tamanhoTotalTabela: number;
40
+ rightCollapse: boolean;
41
+ onFilter: EventEmitter<any>;
42
+ _templates: any;
43
+ tamanhoTela: number;
44
+ selectedSize: string;
45
+ selecteIems: any[];
46
+ menuItems: KvMenuItem[];
47
+ imgDefault: string;
48
+ isExpanded: boolean;
49
+ commandEvent: MenuItemCommandEvent;
50
+ statuses: SelectItem[];
51
+ clonedDataSource: {
52
+ [s: string]: any;
53
+ };
54
+ /** Emite evento de salvamento da linha */
55
+ onRowSave: EventEmitter<any>;
56
+ onActiveItem: EventEmitter<any>;
57
+ onActiveItemLote: EventEmitter<any>;
58
+ onPaginate: EventEmitter<any>;
59
+ onSelectionChange: EventEmitter<any>;
60
+ doubleClickEvent: EventEmitter<any>;
61
+ filterField: EventEmitter<any>;
62
+ onSwitchTableChange: EventEmitter<any>;
63
+ constructor(datePipe: DatePipe, decimalPipe: DecimalPipe, codigoFipePipe: CodigoFipePipe, cpfCnpjPipe: CpfCnpjPipe, telefonePipe: TelefonePipe, notificationService: NotificationService);
64
+ ngOnInit(): void;
65
+ isRowSelectable(event: any): boolean;
66
+ ngOnChanges(changes: SimpleChanges): void;
67
+ onRowEditInit(rowData: any): void;
68
+ onRowEditSave(rowData: any, index: any): void;
69
+ onRowEditCancel(product: any, index: number): void;
70
+ listarDrop(service: any, col: any, indtodos?: boolean): Promise<any>;
71
+ retornaDescricaoDrop(rowData: any[], col: TableEditConfigColumn): any;
72
+ onGlobalFilter(table: Table, event: Event): void;
73
+ onWindowResize(): void;
74
+ adjustTableSize(): void;
75
+ paginate($event: any): void;
76
+ isBooleanField(rowData: any, col: TableConfigColumn): boolean;
77
+ isChipField(col: TableConfigColumn): boolean;
78
+ isImageField(col: TableConfigColumn): boolean;
79
+ returnRowClass(rowData: any, col: TableConfigColumn): string;
80
+ transformValue(rowData: any, col: TableConfigColumn): any;
81
+ alignColunasHeader(col: any): string;
82
+ centralizarColunas(col: any): string;
83
+ alignColunas(col: any): string;
84
+ returnClassIcon(rowData: any, col: any): string;
85
+ returnTooltipIcon(rowData: any, col: any): string;
86
+ returnClassChip(rowData: any, col: any): string;
87
+ retornarRow(rowData: any, col: any, field: string): string;
88
+ selectionChange(value?: never[]): void;
89
+ formatarValor(valor: number): string;
90
+ loadImage(rowData: any, col: TableConfigColumn): string;
91
+ getCustomTemplate(templatename: string): TemplateRef<any>;
92
+ exibirCampo(field: any, rowData: any): any;
93
+ activeItem(rowData: any): void;
94
+ activeItemLote(rowData: any): void;
95
+ retornarCampo(action: KvMenuItem, rowData: any, field: string): string;
96
+ callDisabled(action: KvMenuItem, data: any): boolean;
97
+ criarMenusModal(data: any): void;
98
+ validaLinhaAcaoVazia(rowData: any): boolean;
99
+ doubleClick(e: any, rowData: any): void;
100
+ isDisabledCheckbox(rowData: any): boolean;
101
+ returnTooltipRow(rowData: any, col: any): any;
102
+ isSwitchField(col: TableConfigColumn): boolean;
103
+ onSwitchChange(estado: any, rowData: boolean, col: any): void;
104
+ isButtonDisable(action: any, rowData: any, commandEvent: any): any;
105
+ static ɵfac: i0.ɵɵFactoryDeclaration<TableEditComponent, never>;
106
+ static ɵcmp: i0.ɵɵComponentDeclaration<TableEditComponent, "kv-table-edit", never, { "setConfig": { "alias": "config"; "required": false; }; "dataSource": { "alias": "dataSource"; "required": false; }; "editMode": { "alias": "editMode"; "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; }; "espacamentoPai": { "alias": "espacamentoPai"; "required": false; }; "espacamentoLateral": { "alias": "espacamentoLateral"; "required": false; }; "tamanhoTotalTabela": { "alias": "tamanhoTotalTabela"; "required": false; }; "rightCollapse": { "alias": "rightCollapse"; "required": false; }; "_templates": { "alias": "templates"; "required": false; }; }, { "onFilter": "onFilter"; "onRowSave": "onRowSave"; "onActiveItem": "onActiveItem"; "onActiveItemLote": "onActiveItemLote"; "onPaginate": "onPaginate"; "onSelectionChange": "onSelectionChange"; "doubleClickEvent": "doubleClickEvent"; "filterField": "filterField"; "onSwitchTableChange": "onSwitchTableChange"; }, never, never, false, never>;
107
+ }
@@ -0,0 +1,11 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./table-edit.component";
3
+ import * as i2 from "@angular/common";
4
+ import * as i3 from "../api/modules/primeng.module";
5
+ import * as i4 from "@angular/forms";
6
+ import * as i5 from "../inputs/kvinputs.module";
7
+ export declare class KvTableEditModule {
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<KvTableEditModule, never>;
9
+ static ɵmod: i0.ɵɵNgModuleDeclaration<KvTableEditModule, [typeof i1.TableEditComponent], [typeof i2.CommonModule, typeof i3.PrimeNgModule, typeof i4.FormsModule, typeof i5.KvInputsModule], [typeof i1.TableEditComponent]>;
10
+ static ɵinj: i0.ɵɵInjectorDeclaration<KvTableEditModule>;
11
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "keevo-components",
3
- "version": "1.8.1",
3
+ "version": "1.8.2",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^16.2.12",
6
6
  "@angular/core": "^16.2.12",
package/public-api.d.ts CHANGED
@@ -90,6 +90,8 @@ export * from './lib/picklist/picklist.component';
90
90
  /**
91
91
  * Table
92
92
  */
93
+ export * from './lib/table-edit/table-edit.component';
94
+ export * from './lib/table-edit/table-edit.module';
93
95
  export * from './lib/table/kvtable.module';
94
96
  export * from './lib/table/table.component';
95
97
  export * from './lib/api/components/table/action-item';
@@ -97,6 +99,8 @@ export * from './lib/api/components/table/kv-menuitem';
97
99
  export * from './lib/api/components/table/table.config';
98
100
  export * from './lib/api/components/table/table.config.column';
99
101
  export * from './lib/api/components/table/table.paginate';
102
+ export * from './lib/api/components/table/tabledit.config';
103
+ export * from './lib/api/components/table/tableedit.config.column';
100
104
  /**
101
105
  * TreeTable
102
106
  */