keevo-components 1.8.139 → 1.8.141

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,81 @@
1
+ import { EventEmitter, OnInit, TemplateRef } from '@angular/core';
2
+ import { CpfCnpjPipe, NotificationService, TableConfig, TableConfigColumn, TelefonePipe } from 'projects/keevo-components/src/public-api';
3
+ import { TreeTableConfig } from '../components/tree-table/tree-table.config';
4
+ import { Table } from 'primeng/table/public_api';
5
+ import { DatePipe, DecimalPipe } from '@angular/common';
6
+ import TableEditConfig from 'projects/keevo-components/src/lib/api/components/table/tabledit.config';
7
+ import * as i0 from "@angular/core";
8
+ export declare abstract class BasecomponentTable implements OnInit {
9
+ datePipe: DatePipe;
10
+ decimalPipe: DecimalPipe;
11
+ cpfCnpjPipe: CpfCnpjPipe;
12
+ telefonePipe: TelefonePipe;
13
+ notificationService: NotificationService;
14
+ /**
15
+ *
16
+ */
17
+ constructor(datePipe: DatePipe, decimalPipe: DecimalPipe, cpfCnpjPipe: CpfCnpjPipe, telefonePipe: TelefonePipe, notificationService: NotificationService);
18
+ imgDefault: string;
19
+ config: TableConfig | TableEditConfig | TreeTableConfig;
20
+ selectedItem: any;
21
+ selectedSize: any;
22
+ tamanhoTela: number;
23
+ collapsed: boolean;
24
+ globalFilterFields: string[];
25
+ selectedItems: any[];
26
+ totalRecords: number;
27
+ paginator: boolean;
28
+ rowsPerPageOptions: number[];
29
+ rows: number;
30
+ pageLinksOptions: number;
31
+ showFirstLastIcon: boolean;
32
+ applyStyle: Function;
33
+ filterColumnsBtn: boolean;
34
+ filtrosAvancados: boolean;
35
+ scrollHeight: string;
36
+ isTableScrollable: boolean;
37
+ rowTrackBy: Function;
38
+ responsiveLayout: boolean;
39
+ tableSize: number;
40
+ dataSource: any[];
41
+ _templates: any;
42
+ set setConfig(value: TableEditConfig);
43
+ onFilter: EventEmitter<any>;
44
+ onSwitchTableChange: EventEmitter<any>;
45
+ onActiveItemLote: EventEmitter<any>;
46
+ onActiveItem: EventEmitter<any>;
47
+ onSelectionChange: EventEmitter<any>;
48
+ doubleClickEvent: EventEmitter<any>;
49
+ onPaginate: EventEmitter<any>;
50
+ ngOnInit(): void;
51
+ doubleClick(e: any, rowData: any): void;
52
+ returnTooltipRow(rowData: any, col: any): any;
53
+ retornarRow(rowData: any, col: any, field: string): string;
54
+ returnRowClass(rowData: any, col: TableConfigColumn): string;
55
+ getCustomTemplate(templatename: string): TemplateRef<any>;
56
+ returnClassIcon(rowData: any, col: any): string;
57
+ returnClassChip(rowData: any, col: any): string;
58
+ returnTooltipIcon(rowData: any, col: any): string;
59
+ loadImage(rowData: any, col: TableConfigColumn): string;
60
+ alignColunas(col: any): string;
61
+ centralizarColunas(col: any): string;
62
+ alignColunasHeader(col: any): string;
63
+ formatarValor(valor: number): string;
64
+ transformValue(rowData: any, col: TableConfigColumn): any;
65
+ onGlobalFilter(table: Table, event: Event): void;
66
+ onSwitchChange(estado: any, rowData: boolean, col: any): void;
67
+ isSwitchField(col: TableConfigColumn): boolean;
68
+ isDisabledCheckbox(rowData: any): boolean;
69
+ activeItemLote(selectedItems: any): void;
70
+ activeItem(rowData: any): void;
71
+ exibirCampo(field: any, rowData: any): any;
72
+ selectionChange(value?: never[]): void;
73
+ isImageField(col: TableConfigColumn): boolean;
74
+ isChipField(col: TableConfigColumn): boolean;
75
+ isBooleanField(rowData: any, col: TableConfigColumn): boolean;
76
+ paginate($event: any): void;
77
+ adjustTableSize(): void;
78
+ onWindowResize(): void;
79
+ static ɵfac: i0.ɵɵFactoryDeclaration<BasecomponentTable, never>;
80
+ 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>;
81
+ }
@@ -31,6 +31,7 @@ export declare class KvTableComponent implements OnInit, DoCheck {
31
31
  [key: string]: any;
32
32
  };
33
33
  menuItems: MenuItem[];
34
+ actionsOffset: number;
34
35
  templates: QueryList<any>;
35
36
  _templates: any;
36
37
  table: Table;
@@ -99,11 +100,11 @@ export declare class KvTableComponent implements OnInit, DoCheck {
99
100
  addColumn(field: string): void;
100
101
  dinamicColumnSet(e: any, col: any): void;
101
102
  checkMenuFiltro(col: any): void;
102
- sortByPosition(): (elem1: any, elem2: any) => 1 | -1 | 0;
103
+ sortByPosition(): (elem1: any, elem2: any) => 1 | 0 | -1;
103
104
  dinamicDisableColumn(col: TableConfigColumn): boolean;
104
105
  checkHideColumns(): void;
105
106
  getCustomTemplate(templatename: string): TemplateRef<any>;
106
- onSwitchChange(estado: any, rowData: boolean, col: any): void;
107
+ onSwitchChange(estado: any, rowData: any, col: any): void;
107
108
  createTableActions(): void;
108
109
  onSort(e: any): void;
109
110
  static ɵfac: i0.ɵɵFactoryDeclaration<KvTableComponent, never>;
@@ -1,78 +1,37 @@
1
- import { EventEmitter, OnChanges, OnInit, SimpleChanges, TemplateRef } from '@angular/core';
1
+ import { EventEmitter, OnChanges, OnInit, SimpleChanges } from '@angular/core';
2
2
  import { DatePipe, DecimalPipe } from '@angular/common';
3
- import { MenuItem, SelectItem } from 'primeng/api';
4
- import { Table } from 'primeng/table';
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
- globalFilterFields: string[];
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
- enableSizes: boolean;
45
- _templates: any;
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
- onSwitchTableChange: EventEmitter<any>;
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): Promise<any>;
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, { "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>;
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
  }
@@ -61,7 +61,7 @@ export declare class KvTableExpandableComponent implements OnInit, DoCheck {
61
61
  onGlobalFilter(table: Table, event: Event): void;
62
62
  adicionaAcoesTabela(): void;
63
63
  checkMenuFiltro(col: any): void;
64
- sortByPosition(): (elem1: any, elem2: any) => 1 | -1 | 0;
64
+ sortByPosition(): (elem1: any, elem2: any) => 1 | 0 | -1;
65
65
  dinamicDisableColumn(col: TableConfigColumn): boolean;
66
66
  dinamicColumnSet(e: any, col: any): void;
67
67
  addColumn(field: string): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "keevo-components",
3
- "version": "1.8.139",
3
+ "version": "1.8.141",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^17.3.8",
6
6
  "@angular/core": "^17.3.8",
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
  */