keevo-components 1.8.121 → 1.8.123
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-button.mjs +39 -0
- package/esm2022/lib/api/base-components/base-component-chart.mjs +92 -0
- package/esm2022/lib/api/base-components/base-component-crud-form.mjs +298 -0
- package/esm2022/lib/api/base-components/base-component-crud-list.mjs +78 -0
- package/esm2022/lib/api/base-components/base-component-crud.mjs +65 -0
- package/esm2022/lib/api/base-components/base-component.mjs +51 -0
- package/esm2022/lib/api/components/chart/chart.config.mjs +2 -0
- package/esm2022/lib/api/components/chart/chart.model.mjs +2 -0
- package/esm2022/lib/api/components/table/action-item.mjs +2 -0
- package/esm2022/lib/api/components/table/kv-menuitem.mjs +46 -0
- package/esm2022/lib/api/components/table/table-dropdown-control.mjs +2 -0
- package/esm2022/lib/api/components/table/table.config.column.mjs +2 -0
- package/esm2022/lib/api/components/table/table.config.mjs +2 -0
- package/esm2022/lib/api/components/table/table.paginate.mjs +9 -0
- package/esm2022/lib/api/components/tree-table/tree-table.config.mjs +3 -0
- package/esm2022/lib/api/services/component.service.mjs +27 -0
- package/esm2022/lib/api/services/form.service.mjs +85 -0
- package/esm2022/lib/api/services/notification.service.mjs +67 -0
- package/esm2022/lib/api/services/object.service.mjs +39 -0
- package/esm2022/lib/api/types/severity.mjs +2 -0
- package/esm2022/lib/components/kv-chart/kv-chart.component.mjs +145 -0
- package/esm2022/lib/components/kv-error/kv-error.component.mjs +26 -0
- package/esm2022/lib/components/kv-loader/kv-loader.service.mjs +29 -0
- package/esm2022/lib/components/kv-report/kv-report.component.mjs +6 -4
- package/fesm2022/keevo-components.mjs +5 -3
- package/fesm2022/keevo-components.mjs.map +1 -1
- package/lib/api/base-components/base-component-button.d.ts +15 -0
- package/lib/api/base-components/base-component-chart.d.ts +40 -0
- package/lib/api/base-components/base-component-crud-form.d.ts +145 -0
- package/lib/api/base-components/base-component-crud-list.d.ts +64 -0
- package/lib/api/base-components/base-component-crud.d.ts +36 -0
- package/lib/api/base-components/base-component.d.ts +22 -0
- package/lib/api/components/chart/chart.config.d.ts +11 -0
- package/lib/api/components/chart/chart.model.d.ts +9 -0
- package/lib/api/components/table/action-item.d.ts +11 -0
- package/lib/api/components/table/kv-menuitem.d.ts +152 -0
- package/lib/api/components/table/table-dropdown-control.d.ts +6 -0
- package/lib/api/components/table/table.config.column.d.ts +25 -0
- package/lib/api/components/table/table.config.d.ts +31 -0
- package/lib/api/components/table/table.paginate.d.ts +6 -0
- package/lib/api/components/tree-table/tree-table.config.d.ts +28 -0
- package/lib/api/services/component.service.d.ts +11 -0
- package/lib/api/services/form.service.d.ts +28 -0
- package/lib/api/services/notification.service.d.ts +25 -0
- package/lib/api/services/object.service.d.ts +9 -0
- package/lib/api/types/severity.d.ts +2 -0
- package/lib/components/kv-chart/kv-chart.component.d.ts +56 -0
- package/lib/components/kv-error/kv-error.component.d.ts +12 -0
- package/lib/components/kv-loader/kv-loader.service.d.ts +10 -0
- package/package.json +1 -1
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class BaseComponentButton {
|
|
4
|
+
icon: string;
|
|
5
|
+
label: string;
|
|
6
|
+
loading: boolean;
|
|
7
|
+
disabled: boolean;
|
|
8
|
+
text: boolean;
|
|
9
|
+
color: string;
|
|
10
|
+
onClick: EventEmitter<any>;
|
|
11
|
+
constructor();
|
|
12
|
+
click(event: any): void;
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BaseComponentButton, never>;
|
|
14
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BaseComponentButton, "ng-component", never, { "icon": { "alias": "icon"; "required": false; }; "label": { "alias": "label"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "text": { "alias": "text"; "required": false; }; "color": { "alias": "color"; "required": false; }; }, { "onClick": "onClick"; }, never, never, false, never>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { EventEmitter, OnInit } from "@angular/core";
|
|
2
|
+
import { Observable } from "rxjs";
|
|
3
|
+
import { chartModel } from "../components/chart/chart.model";
|
|
4
|
+
import { ChartConfig } from "../components/chart/chart.config";
|
|
5
|
+
import { KvChartComponent } from "../../components/kv-chart/kv-chart.component";
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare abstract class BaseChartComponent implements OnInit {
|
|
8
|
+
chartConfig: ChartConfig;
|
|
9
|
+
selectedData: number;
|
|
10
|
+
enablePeriodos: number[];
|
|
11
|
+
periodos: {
|
|
12
|
+
Ultimos180Dias: number;
|
|
13
|
+
Ultimos120Dias: number;
|
|
14
|
+
Ultimos90Dias: number;
|
|
15
|
+
Ultimos60Dias: number;
|
|
16
|
+
Ultimos45Dias: number;
|
|
17
|
+
Ultimos30Dias: number;
|
|
18
|
+
Ultimos15Dias: number;
|
|
19
|
+
Ultimos7Dias: number;
|
|
20
|
+
DataAtual: number;
|
|
21
|
+
Proximos7Dias: number;
|
|
22
|
+
Proximos15Dias: number;
|
|
23
|
+
Proximos30Dias: number;
|
|
24
|
+
Proximos45Dias: number;
|
|
25
|
+
Proximos60Dias: number;
|
|
26
|
+
Proximos90Dias: number;
|
|
27
|
+
Proximos120Dias: number;
|
|
28
|
+
Proximos180Dias: number;
|
|
29
|
+
};
|
|
30
|
+
chartComponent?: KvChartComponent;
|
|
31
|
+
onPrintReport: EventEmitter<any>;
|
|
32
|
+
constructor();
|
|
33
|
+
protected changeData(event: any): void;
|
|
34
|
+
ngOnInit(): void;
|
|
35
|
+
abstract loadData(): void;
|
|
36
|
+
protected loadGraphic(obs: Observable<any>): void;
|
|
37
|
+
protected assembleGraphic(data: chartModel[]): ChartConfig;
|
|
38
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BaseChartComponent, never>;
|
|
39
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BaseChartComponent, "ng-component", never, {}, { "onPrintReport": "onPrintReport"; }, never, never, false, never>;
|
|
40
|
+
}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { ActivatedRoute, Router } from "@angular/router";
|
|
2
|
+
import { OnDestroy, OnInit } from "@angular/core";
|
|
3
|
+
import { DialogService, DynamicDialogConfig, DynamicDialogRef } from "primeng/dynamicdialog";
|
|
4
|
+
import { FormGroup, ValidatorFn } from "@angular/forms";
|
|
5
|
+
import { Observable } from "rxjs";
|
|
6
|
+
import { ActionItem } from "../components/table/action-item";
|
|
7
|
+
import { BaseComponentCrud } from "./base-component-crud";
|
|
8
|
+
import { NotificationService } from "../services/notification.service";
|
|
9
|
+
import * as i0 from "@angular/core";
|
|
10
|
+
export interface DadosTela {
|
|
11
|
+
subTituloForm: string | undefined;
|
|
12
|
+
tituloForm: string | undefined;
|
|
13
|
+
rotaListar: string;
|
|
14
|
+
mensagemValidacao: boolean;
|
|
15
|
+
}
|
|
16
|
+
export declare abstract class BaseComponentCrudForm extends BaseComponentCrud implements OnInit, OnDestroy {
|
|
17
|
+
protected activatedRoute: ActivatedRoute;
|
|
18
|
+
protected dynamicDialogRef: DynamicDialogRef;
|
|
19
|
+
protected dynamicDialogConfig: DynamicDialogConfig;
|
|
20
|
+
protected router: Router;
|
|
21
|
+
protected isAccordionExpanded: boolean;
|
|
22
|
+
protected isNewRegistry: boolean;
|
|
23
|
+
protected isSaveLoading: boolean;
|
|
24
|
+
protected isView: boolean;
|
|
25
|
+
protected formGroup: FormGroup;
|
|
26
|
+
protected actions: ActionItem[];
|
|
27
|
+
protected dadosTela: DadosTela | undefined;
|
|
28
|
+
protected popup: boolean;
|
|
29
|
+
protected registry: any;
|
|
30
|
+
private onSetFormValues;
|
|
31
|
+
constructor(dialogService: DialogService, notificationService: NotificationService, activatedRoute: ActivatedRoute, dynamicDialogRef: DynamicDialogRef, dynamicDialogConfig: DynamicDialogConfig, router: Router);
|
|
32
|
+
/**
|
|
33
|
+
* Método disparado para configuração do form
|
|
34
|
+
*/
|
|
35
|
+
abstract configureForm(): void;
|
|
36
|
+
/**
|
|
37
|
+
* Método disparado para o carregamento do form
|
|
38
|
+
* @param id
|
|
39
|
+
*/
|
|
40
|
+
abstract loadForm(id: any): void;
|
|
41
|
+
/**
|
|
42
|
+
* Método disparado para salvamento dos dados
|
|
43
|
+
*/
|
|
44
|
+
abstract save(): void;
|
|
45
|
+
/**
|
|
46
|
+
* Método disparado para tratamento das notificações do backend
|
|
47
|
+
* @param err - Notificação
|
|
48
|
+
*/
|
|
49
|
+
protected backendError(err: any): void;
|
|
50
|
+
/**
|
|
51
|
+
* Método disparado ao clicar no botão de cancelamento
|
|
52
|
+
*/
|
|
53
|
+
protected cancel(): void;
|
|
54
|
+
/**
|
|
55
|
+
* Verifica se houveram alterações nos componentes do formControl
|
|
56
|
+
* @param controls - Nomes do controles no formGroup
|
|
57
|
+
* @returns Observable
|
|
58
|
+
*/
|
|
59
|
+
protected detectFormControlChanges(controls: Array<string>): Observable<any>;
|
|
60
|
+
/**
|
|
61
|
+
* Método responsável por desabilitar um componente
|
|
62
|
+
* @param controlName - Nome do controle no formGroup
|
|
63
|
+
*/
|
|
64
|
+
protected disableComponent(controlName: string): void;
|
|
65
|
+
/**
|
|
66
|
+
* Método responsável por limpar e desabilitar um componente
|
|
67
|
+
* @param controlName - Nome do controle no formGroup
|
|
68
|
+
* @param value - Valor default
|
|
69
|
+
*/
|
|
70
|
+
protected disableAndClearComponent(controlName: string, value?: any): void;
|
|
71
|
+
/**
|
|
72
|
+
* Método responsável por habilitar um componente
|
|
73
|
+
* @param controlName - Nome do controle no formGroup
|
|
74
|
+
*/
|
|
75
|
+
protected enableComponent(controName: string): void;
|
|
76
|
+
/**
|
|
77
|
+
* Método que retorna o valor de um componente
|
|
78
|
+
* @param controlName - Nome do controle no formGroup
|
|
79
|
+
* @returns - Valor
|
|
80
|
+
*/
|
|
81
|
+
protected getFormValue<T>(controlName: string): T;
|
|
82
|
+
/**
|
|
83
|
+
* Verifica se o componente possui erro
|
|
84
|
+
* @param controlName - Nome do controle no formGroup
|
|
85
|
+
*/
|
|
86
|
+
protected hasControlError(controlName: string, errorCode?: string): boolean;
|
|
87
|
+
/**
|
|
88
|
+
* Seta inconsistências para o fomulário
|
|
89
|
+
* @param notification - Lista de notificações
|
|
90
|
+
*/
|
|
91
|
+
protected invalidForm(notification?: any): void;
|
|
92
|
+
/**
|
|
93
|
+
* Tratamento de inconsistências do formulário
|
|
94
|
+
*/
|
|
95
|
+
protected invalidateForm(): void;
|
|
96
|
+
/**
|
|
97
|
+
* Método responsável pelo carregamento da tela
|
|
98
|
+
* @param obs - Observable responsável pelo salvamento dos dados
|
|
99
|
+
*/
|
|
100
|
+
loadData<T>(obs: Observable<any>): void;
|
|
101
|
+
loadDataAsync<T>(obs: Observable<any>): Promise<void>;
|
|
102
|
+
/**
|
|
103
|
+
* Método disparado para carregamento de grids (Disparado após o loadData)
|
|
104
|
+
*/
|
|
105
|
+
loadGrids(): void;
|
|
106
|
+
/**
|
|
107
|
+
* Método disparado para retornar a lista
|
|
108
|
+
*/
|
|
109
|
+
protected navigateList(id?: any): void;
|
|
110
|
+
ngOnDestroy(): void;
|
|
111
|
+
ngOnInit(): void;
|
|
112
|
+
/**
|
|
113
|
+
* Método disparado para salvar dados
|
|
114
|
+
* @param obs - Observable responsável pelo salvamento dos dados
|
|
115
|
+
*/
|
|
116
|
+
protected saveData(obs: Observable<any>): void;
|
|
117
|
+
/**
|
|
118
|
+
* Método se atualiza o valor de um componente do formGroup
|
|
119
|
+
* @param controName - Nome do controle
|
|
120
|
+
* @param value - Valor para atualização
|
|
121
|
+
*/
|
|
122
|
+
protected setControlValue(controName: string, value: any): void;
|
|
123
|
+
/**
|
|
124
|
+
* Atualiza valores dos componentes do formGroup
|
|
125
|
+
* @param values - Valores para atualização
|
|
126
|
+
*/
|
|
127
|
+
protected setFormValues(values: any): void;
|
|
128
|
+
/**
|
|
129
|
+
* Seta o título do popup
|
|
130
|
+
*/
|
|
131
|
+
private setTitlePopup;
|
|
132
|
+
/**
|
|
133
|
+
* Atualiza o validador de um componente do formGroup
|
|
134
|
+
* @param controName - Nome do controle
|
|
135
|
+
* @param validators - Regra de validação
|
|
136
|
+
*/
|
|
137
|
+
protected setValidators(controName: string, validators: ValidatorFn | ValidatorFn[] | null): void;
|
|
138
|
+
/**
|
|
139
|
+
* Dispara os métodos de validações do formulário
|
|
140
|
+
* @returns - True/False
|
|
141
|
+
*/
|
|
142
|
+
protected validateForm(): boolean;
|
|
143
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BaseComponentCrudForm, never>;
|
|
144
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BaseComponentCrudForm, "ng-component", never, {}, {}, never, never, false, never>;
|
|
145
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { OnInit } from "@angular/core";
|
|
2
|
+
import { DialogService } from "primeng/dynamicdialog";
|
|
3
|
+
import { Router } from "@angular/router";
|
|
4
|
+
import { BaseComponentCrud } from "./base-component-crud";
|
|
5
|
+
import { TablePaginate } from "../components/table/table.paginate";
|
|
6
|
+
import { TableConfig } from "../components/table/table.config";
|
|
7
|
+
import { ActionItem } from "../components/table/action-item";
|
|
8
|
+
import { NotificationService } from "../services/notification.service";
|
|
9
|
+
import { Observable } from "rxjs";
|
|
10
|
+
import { TreeTableConfig } from "../components/tree-table/tree-table.config";
|
|
11
|
+
import * as i0 from "@angular/core";
|
|
12
|
+
export declare abstract class BaseComponentCrudList extends BaseComponentCrud implements OnInit {
|
|
13
|
+
router: Router;
|
|
14
|
+
dataSource: any;
|
|
15
|
+
selectedItem: any;
|
|
16
|
+
tableConfig: TableConfig | TreeTableConfig;
|
|
17
|
+
totalRecords: number;
|
|
18
|
+
actionsPageList: ActionItem[];
|
|
19
|
+
constructor(dialogService: DialogService, notificationService: NotificationService, router: Router);
|
|
20
|
+
ngOnInit(): void;
|
|
21
|
+
/**
|
|
22
|
+
* Método disparado para configuração das tabelas do componente de lista
|
|
23
|
+
*/
|
|
24
|
+
abstract configureTable(): void;
|
|
25
|
+
/**
|
|
26
|
+
* Método disparado para edição de registros
|
|
27
|
+
* @param registry - Registro que está sendo editado
|
|
28
|
+
*
|
|
29
|
+
*/
|
|
30
|
+
abstract edit(registry: any): void;
|
|
31
|
+
/**
|
|
32
|
+
* Método disparado para carregamento dos filtros da tela
|
|
33
|
+
*/
|
|
34
|
+
abstract loadFilters(): void;
|
|
35
|
+
/**
|
|
36
|
+
* Método disparado para carregar a tabela do componente de lista
|
|
37
|
+
* @param tablePaginate - Classe dos dados da paginação da tabela
|
|
38
|
+
*/
|
|
39
|
+
abstract loadTable(tablePaginate: TablePaginate): void;
|
|
40
|
+
/**
|
|
41
|
+
* Método disparado ao clicar no botão de novo registro
|
|
42
|
+
*/
|
|
43
|
+
abstract newRegistry(): void;
|
|
44
|
+
/**
|
|
45
|
+
* Método que seta o registro selecionado na tabela
|
|
46
|
+
* @param event - Registro
|
|
47
|
+
*/
|
|
48
|
+
protected activeItem(event: any): void;
|
|
49
|
+
/**
|
|
50
|
+
* Método que dispara o carregamento da tabela
|
|
51
|
+
* @param obs - Observable de carregamento dos dados
|
|
52
|
+
*/
|
|
53
|
+
protected loadData(obs: Observable<any>): void;
|
|
54
|
+
/**
|
|
55
|
+
* Método que dispara a paginação
|
|
56
|
+
*/
|
|
57
|
+
protected paginate(event: any): void;
|
|
58
|
+
/**
|
|
59
|
+
* Método que dispara a atualização da página inteira
|
|
60
|
+
*/
|
|
61
|
+
protected refresh(): void;
|
|
62
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BaseComponentCrudList, never>;
|
|
63
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BaseComponentCrudList, "ng-component", never, {}, {}, never, never, false, never>;
|
|
64
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { DialogService } from 'primeng/dynamicdialog';
|
|
2
|
+
import { Type } from "@angular/core";
|
|
3
|
+
import { paramsDialog } from "../services/form.service";
|
|
4
|
+
import { NotificationService } from '../services/notification.service';
|
|
5
|
+
import { Observable } from 'rxjs';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare abstract class BaseComponentCrud {
|
|
8
|
+
dialogService: DialogService;
|
|
9
|
+
notificationService: NotificationService;
|
|
10
|
+
isReport: boolean;
|
|
11
|
+
itemsReport: any;
|
|
12
|
+
constructor(dialogService: DialogService, notificationService: NotificationService);
|
|
13
|
+
/**
|
|
14
|
+
* Fecha um relatório
|
|
15
|
+
*/
|
|
16
|
+
closeReport(): void;
|
|
17
|
+
/**
|
|
18
|
+
* Abre um form dialog
|
|
19
|
+
* @param componentType - Componente que será renderizado
|
|
20
|
+
* @param callBackFunction - Função de callback que deverá ser chamada após o fechamento do dialog
|
|
21
|
+
* @param paramsDialog - Parâmetros do dialog
|
|
22
|
+
*/
|
|
23
|
+
protected openDialog(componentType: Type<any>, callBackFunction: Function, paramsDialog?: paramsDialog): void;
|
|
24
|
+
/**
|
|
25
|
+
* Imprime um relatório na tela
|
|
26
|
+
* @param obs - Observable com o carregamento do relatório
|
|
27
|
+
*/
|
|
28
|
+
protected printReportFilter(obs: Observable<any>): void;
|
|
29
|
+
/**
|
|
30
|
+
* Exibe um toast com um erro
|
|
31
|
+
* @param err - Erro
|
|
32
|
+
*/
|
|
33
|
+
protected toastError(err: any): void;
|
|
34
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BaseComponentCrud, never>;
|
|
35
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BaseComponentCrud, "ng-component", never, {}, {}, never, never, false, never>;
|
|
36
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ControlValueAccessor } from "@angular/forms";
|
|
2
|
+
import { Subject } from "rxjs";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare abstract class BaseComponent<T> implements ControlValueAccessor {
|
|
5
|
+
protected stateChanges: Subject<void>;
|
|
6
|
+
protected onChange: (value: T) => void;
|
|
7
|
+
protected onTouched: () => void;
|
|
8
|
+
protected _value: T;
|
|
9
|
+
isRequired: boolean;
|
|
10
|
+
set value(value: T);
|
|
11
|
+
get value(): T;
|
|
12
|
+
componentId: string;
|
|
13
|
+
label: string;
|
|
14
|
+
disabled: boolean;
|
|
15
|
+
maxLength: number;
|
|
16
|
+
registerOnChange(fn: any): void;
|
|
17
|
+
registerOnTouched(fn: any): void;
|
|
18
|
+
setDisabledState?(isDisabled: boolean): void;
|
|
19
|
+
writeValue(value: T): void;
|
|
20
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BaseComponent<any>, never>;
|
|
21
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BaseComponent<any>, "ng-component", never, { "isRequired": { "alias": "required"; "required": false; }; "componentId": { "alias": "componentId"; "required": false; }; "label": { "alias": "label"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "maxLength": { "alias": "maxLength"; "required": false; }; }, {}, never, never, false, never>;
|
|
22
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface ChartConfig {
|
|
2
|
+
labels: string[];
|
|
3
|
+
datasets: ChartDatasetConfig[];
|
|
4
|
+
}
|
|
5
|
+
export interface ChartDatasetConfig {
|
|
6
|
+
label?: string;
|
|
7
|
+
backgroundColor: string[];
|
|
8
|
+
hoverBackgroundColor: string[];
|
|
9
|
+
borderColor?: string[];
|
|
10
|
+
data: number[];
|
|
11
|
+
}
|
|
@@ -0,0 +1,152 @@
|
|
|
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>;
|
|
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;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export interface TableConfigColumn {
|
|
2
|
+
position?: number;
|
|
3
|
+
field: string;
|
|
4
|
+
header: string;
|
|
5
|
+
headerTooltip?: string;
|
|
6
|
+
fieldType?: string;
|
|
7
|
+
onlyReadField?: boolean;
|
|
8
|
+
width?: string;
|
|
9
|
+
pipe?: 'date' | 'dateMonthYear' | 'decimal' | 'cpfcnpj' | 'telefone' | 'codigofipe' | 'money' | 'percentage';
|
|
10
|
+
sortable: boolean;
|
|
11
|
+
grouped?: boolean;
|
|
12
|
+
centralize?: boolean;
|
|
13
|
+
expiredDate?: boolean;
|
|
14
|
+
icon?: string;
|
|
15
|
+
iconField?: boolean;
|
|
16
|
+
indIconMaterial?: boolean;
|
|
17
|
+
checked?: boolean;
|
|
18
|
+
hideColumn?: boolean;
|
|
19
|
+
fixedColumn?: boolean;
|
|
20
|
+
template?: any;
|
|
21
|
+
align?: string;
|
|
22
|
+
subtitle?: string;
|
|
23
|
+
boolean?: boolean;
|
|
24
|
+
templateOnly?: 'pai' | 'filho';
|
|
25
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { TableConfigColumn } from './table.config.column';
|
|
2
|
+
import { KvMenuItem, ValueOrFn } from './kv-menuitem';
|
|
3
|
+
import Severity from '../../types/severity';
|
|
4
|
+
export interface TableConfig {
|
|
5
|
+
actions?: KvMenuItem[];
|
|
6
|
+
actionsLote?: ActionsLoteItem[];
|
|
7
|
+
columns: TableConfigColumn[];
|
|
8
|
+
dataKey?: string;
|
|
9
|
+
rows?: any;
|
|
10
|
+
title?: string;
|
|
11
|
+
subtitle?: string;
|
|
12
|
+
lazy: boolean;
|
|
13
|
+
fieldGroup?: string;
|
|
14
|
+
enableCation?: boolean;
|
|
15
|
+
enableFilter?: boolean;
|
|
16
|
+
enableSelect?: boolean;
|
|
17
|
+
enableToggleNodes?: boolean;
|
|
18
|
+
disableControlCheckboxFunction?: (rowData: any, rowNode?: any) => boolean;
|
|
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
|
+
visible?: ValueOrFn<boolean | undefined>;
|
|
30
|
+
command?: () => void;
|
|
31
|
+
}
|
|
@@ -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,11 @@
|
|
|
1
|
+
import { ChangeDetectorRef, Injector } from '@angular/core';
|
|
2
|
+
import { FormControl } from '@angular/forms';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class ComponentService {
|
|
5
|
+
readonly injector: Injector;
|
|
6
|
+
changeDetectorRef: ChangeDetectorRef;
|
|
7
|
+
constructor(injector: Injector, changeDetectorRef: ChangeDetectorRef);
|
|
8
|
+
getFormControl(): FormControl<any> | undefined;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ComponentService, never>;
|
|
10
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ComponentService>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Type } from '@angular/core';
|
|
2
|
+
import { FormGroup, ValidatorFn } from '@angular/forms';
|
|
3
|
+
import { DialogService } from 'primeng/dynamicdialog';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export interface paramsDialog {
|
|
6
|
+
id?: any;
|
|
7
|
+
closable?: boolean;
|
|
8
|
+
maximizable?: boolean;
|
|
9
|
+
popup?: boolean;
|
|
10
|
+
height?: string;
|
|
11
|
+
width?: string;
|
|
12
|
+
styleClass?: string;
|
|
13
|
+
header?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare class FormService {
|
|
16
|
+
static disableControl(formGroup: FormGroup, controName: string): void;
|
|
17
|
+
static disableAndClearControl(formGroup: FormGroup, controName: string, value?: any): void;
|
|
18
|
+
static enableControl(formGroup: FormGroup, controName: string): void;
|
|
19
|
+
static getFormValue<T>(formGroup: FormGroup, controName: string): T;
|
|
20
|
+
static hasControlError(formGroup: FormGroup, control: string, errorCode?: string): boolean;
|
|
21
|
+
static invalidForm(formGroup: FormGroup, notification?: any): void;
|
|
22
|
+
static openDialog(dialogService: DialogService, componentType: Type<any>, callBackFunction: Function, paramsDialog?: paramsDialog): void;
|
|
23
|
+
static setControlValue(formGroup: FormGroup, controName: string, value: any): void;
|
|
24
|
+
static setValidators(formGroup: FormGroup, controName: string, validators: ValidatorFn | ValidatorFn[] | null): void;
|
|
25
|
+
static clearValidators(formGroup: FormGroup, controName: string): void;
|
|
26
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FormService, never>;
|
|
27
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<FormService>;
|
|
28
|
+
}
|