keevo-components 2.0.89 → 2.0.91
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/components/table/table.config.mjs +1 -1
- package/esm2022/lib/components/kv-inputs/kv-editor/components/kv-instrucoes-report/kv-instrucoes-report.component.mjs +11 -0
- package/esm2022/lib/components/kv-inputs/kv-editor/config/kv-editor.config.mjs +108 -0
- package/esm2022/lib/components/kv-inputs/kv-editor/kv-editor.component.mjs +118 -253
- package/esm2022/lib/components/kv-inputs/kv-editor/kv-editor.mjs +7 -0
- package/esm2022/lib/components/kv-inputs/kv-editor/services/kv-editor-mention.service.mjs +135 -0
- package/esm2022/lib/components/kv-inputs/kv-editor/services/kv-editor-pdf.service.mjs +169 -0
- package/esm2022/lib/components/kv-inputs/kv-editor/services/kv-editor-quill.service.mjs +78 -0
- package/esm2022/lib/components/kv-inputs/kv-editor/services/kv-editor-relatorio.service.mjs +95 -0
- package/esm2022/lib/components/kv-inputs/kv-editor/types/kv-editor.types.mjs +2 -0
- package/esm2022/lib/components/kv-layout/layout/kv-layout.component.mjs +3 -3
- package/esm2022/lib/components/kv-table/kv-table.component.mjs +3 -3
- package/esm2022/lib/components/kv-table-viewer/components/actions-lote-field/actions-lote-field.component.mjs +15 -0
- package/esm2022/lib/components/kv-table-viewer/components/actions-row-menu/actions-row-menu.component.mjs +18 -0
- package/esm2022/lib/components/kv-table-viewer/kv-table-viewer.component.mjs +168 -0
- package/esm2022/public-api.mjs +5 -1
- package/fesm2022/keevo-components.mjs +932 -315
- package/fesm2022/keevo-components.mjs.map +1 -1
- package/lib/api/components/table/table.config.d.ts +2 -0
- package/lib/components/kv-button/kv-button.component.d.ts +1 -1
- package/lib/components/kv-buttons/kv-button-popup/kv-button-popup.component.d.ts +1 -1
- package/lib/components/kv-inputs/kv-editor/components/kv-instrucoes-report/kv-instrucoes-report.component.d.ts +5 -0
- package/lib/components/kv-inputs/kv-editor/config/kv-editor.config.d.ts +55 -0
- package/lib/components/kv-inputs/kv-editor/kv-editor.component.d.ts +29 -40
- package/lib/components/kv-inputs/kv-editor/kv-editor.d.ts +6 -0
- package/lib/components/kv-inputs/kv-editor/services/kv-editor-mention.service.d.ts +41 -0
- package/lib/components/kv-inputs/kv-editor/services/kv-editor-pdf.service.d.ts +41 -0
- package/lib/components/kv-inputs/kv-editor/services/kv-editor-quill.service.d.ts +28 -0
- package/lib/components/kv-inputs/kv-editor/services/kv-editor-relatorio.service.d.ts +45 -0
- package/lib/components/kv-inputs/kv-editor/types/kv-editor.types.d.ts +32 -0
- package/lib/components/kv-table/kv-table.component.d.ts +1 -1
- package/lib/components/kv-table-edit/kv-table-edit.component.d.ts +1 -1
- package/lib/components/kv-table-expandable/kv-table-expandable.component.d.ts +1 -1
- package/lib/components/kv-table-viewer/components/actions-lote-field/actions-lote-field.component.d.ts +8 -0
- package/lib/components/kv-table-viewer/components/actions-row-menu/actions-row-menu.component.d.ts +7 -0
- package/lib/components/kv-table-viewer/kv-table-viewer.component.d.ts +66 -0
- package/lib/components/kv-tag/kv-tag.component.d.ts +1 -1
- package/package.json +4 -4
- package/public-api.d.ts +4 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { TableConfigColumn } from './table.config.column';
|
|
2
2
|
import { KvMenuItem, ValueOrFn } from './kv-menuitem';
|
|
3
|
+
import { MenuItem } from 'primeng/api';
|
|
3
4
|
export interface TableConfig {
|
|
4
5
|
actions?: KvMenuItem[];
|
|
5
6
|
actionsLote?: ActionsLoteItem[];
|
|
@@ -30,5 +31,6 @@ export interface ActionsLoteItem {
|
|
|
30
31
|
disabled?: ValueOrFn<boolean | undefined>;
|
|
31
32
|
visible?: ValueOrFn<boolean | undefined>;
|
|
32
33
|
label?: ValueOrFn<string>;
|
|
34
|
+
items?: MenuItem[];
|
|
33
35
|
command?: () => void;
|
|
34
36
|
}
|
|
@@ -9,7 +9,7 @@ export declare class KvButtonComponent {
|
|
|
9
9
|
severity: import("@angular/core").InputSignal<"primary" | "secondary" | "tertiary" | "danger">;
|
|
10
10
|
size: import("@angular/core").InputSignal<"small" | "normal" | "large">;
|
|
11
11
|
icon: import("@angular/core").ModelSignal<string>;
|
|
12
|
-
iconPosition: import("@angular/core").InputSignal<"
|
|
12
|
+
iconPosition: import("@angular/core").InputSignal<"left" | "right">;
|
|
13
13
|
label: import("@angular/core").InputSignal<string>;
|
|
14
14
|
disabled: import("@angular/core").InputSignal<boolean>;
|
|
15
15
|
onClick: import("@angular/core").OutputEmitterRef<any>;
|
|
@@ -8,7 +8,7 @@ export declare class KvButtonPopupComponent extends BaseComponentButton {
|
|
|
8
8
|
items: MenuItem[];
|
|
9
9
|
classBtn: string;
|
|
10
10
|
size: import("@angular/core").InputSignal<"small" | "normal" | "large">;
|
|
11
|
-
type: import("@angular/core").InputSignal<"
|
|
11
|
+
type: import("@angular/core").InputSignal<"normal" | "text" | "outline">;
|
|
12
12
|
icon: string;
|
|
13
13
|
constructor();
|
|
14
14
|
handleShow(): void;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class KvInstrucoesReportComponent {
|
|
3
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<KvInstrucoesReportComponent, never>;
|
|
4
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<KvInstrucoesReportComponent, "kv-instrucoes-report", never, {}, {}, never, never, true, never>;
|
|
5
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configuração padrão para o KV Editor
|
|
3
|
+
* Este arquivo demonstra as melhores práticas de configuração
|
|
4
|
+
*/
|
|
5
|
+
import { KvEditorConfig, KvEditorQuillConfig } from '../types/kv-editor.types';
|
|
6
|
+
/**
|
|
7
|
+
* Configuração padrão do componente KV Editor
|
|
8
|
+
*/
|
|
9
|
+
export declare const DEFAULT_KV_EDITOR_CONFIG: KvEditorConfig;
|
|
10
|
+
/**
|
|
11
|
+
* Configuração padrão do Quill Editor
|
|
12
|
+
*/
|
|
13
|
+
export declare const DEFAULT_QUILL_CONFIG: Partial<KvEditorQuillConfig>;
|
|
14
|
+
/**
|
|
15
|
+
* Configuração de fontes personalizadas
|
|
16
|
+
*/
|
|
17
|
+
export declare const CUSTOM_FONTS: string[];
|
|
18
|
+
/**
|
|
19
|
+
* Configuração de tamanhos de fonte
|
|
20
|
+
*/
|
|
21
|
+
export declare const FONT_SIZES: string[];
|
|
22
|
+
/**
|
|
23
|
+
* Configuração de estilos CSS para PDF
|
|
24
|
+
*/
|
|
25
|
+
export declare const PDF_STYLES = "\n <style>\n #temp-pdf-render-area { \n font-family: 'Sans Serif', Arial, sans-serif; \n font-size: 11pt;\n line-height: 1.3;\n text-align: justify; \n }\n #temp-pdf-render-area p {\n min-height: 1.3em;\n margin: 0;\n padding: 0;\n }\n #temp-pdf-render-area h1, #temp-pdf-render-area h2, #temp-pdf-render-area h3, \n #temp-pdf-render-area h4, #temp-pdf-render-area h5, #temp-pdf-render-area h6 { \n page-break-after: avoid; \n }\n #temp-pdf-render-area [style*=\"text-align: center\"] {\n text-align: center !important;\n }\n #temp-pdf-render-area p, #temp-pdf-render-area h1, #temp-pdf-render-area h2, \n #temp-pdf-render-area h3, #temp-pdf-render-area h4, #temp-pdf-render-area h5, \n #temp-pdf-render-area h6, #temp-pdf-render-area blockquote, #temp-pdf-render-area ul, \n #temp-pdf-render-area ol, #temp-pdf-render-area li, #temp-pdf-render-area table, \n #temp-pdf-render-area tr, #temp-pdf-render-area img { \n page-break-inside: avoid; \n }\n </style>\n";
|
|
26
|
+
/**
|
|
27
|
+
* Configuração de tempo de debounce para auto-save
|
|
28
|
+
*/
|
|
29
|
+
export declare const DEBOUNCE_TIME = 500;
|
|
30
|
+
/**
|
|
31
|
+
* Configuração de URLs CDN
|
|
32
|
+
*/
|
|
33
|
+
export declare const CDN_URLS: {
|
|
34
|
+
quillCss: string;
|
|
35
|
+
quillJs: string;
|
|
36
|
+
robotoFont: string;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* Configuração de mensagens de erro
|
|
40
|
+
*/
|
|
41
|
+
export declare const ERROR_MESSAGES: {
|
|
42
|
+
pdfGeneration: string;
|
|
43
|
+
quillInit: string;
|
|
44
|
+
saveError: string;
|
|
45
|
+
loadError: string;
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Configuração de timeouts
|
|
49
|
+
*/
|
|
50
|
+
export declare const TIMEOUTS: {
|
|
51
|
+
pdfGeneration: number;
|
|
52
|
+
editorInit: number;
|
|
53
|
+
cssLoad: number;
|
|
54
|
+
autoSave: number;
|
|
55
|
+
};
|
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
import { ElementRef, EventEmitter, OnInit, Renderer2 } from '@angular/core';
|
|
2
2
|
import Quill from 'quill';
|
|
3
|
+
import { OverlayPanel } from 'primeng/overlaypanel';
|
|
3
4
|
import { BaseComponentInput } from '../../../api/base-components/base-component-input';
|
|
4
5
|
import { ComponentService } from '../../../api/services/component.service';
|
|
6
|
+
import { KvEditorRelatorio, KvEditorVariavel } from './kv-editor';
|
|
5
7
|
import * as i0 from "@angular/core";
|
|
6
8
|
export declare class KvEditorComponent extends BaseComponentInput<string> implements OnInit {
|
|
7
9
|
private renderer;
|
|
8
10
|
private el;
|
|
9
11
|
constructor(componentService: ComponentService, renderer: Renderer2, el: ElementRef);
|
|
12
|
+
private quillService;
|
|
13
|
+
private relatorioService;
|
|
14
|
+
private mentionService;
|
|
10
15
|
private pdfService;
|
|
11
16
|
private dialogService;
|
|
12
17
|
/**
|
|
13
|
-
|
|
14
|
-
|
|
18
|
+
* @deprecated Essa propriedade não será mais utilizada por esse componente nas próximas versões.
|
|
19
|
+
*/
|
|
15
20
|
canvaHeigth: string;
|
|
16
|
-
/**
|
|
17
|
-
* caso defina como "text" o texto ira ser enviado sem formatação
|
|
18
|
-
*/
|
|
19
21
|
contentType: 'html' | 'text';
|
|
20
22
|
readonly: boolean;
|
|
21
23
|
debug: boolean;
|
|
@@ -25,54 +27,41 @@ export declare class KvEditorComponent extends BaseComponentInput<string> implem
|
|
|
25
27
|
outputHtml: EventEmitter<string>;
|
|
26
28
|
private updatingEditor;
|
|
27
29
|
private lastSelectionRange;
|
|
30
|
+
private editorReadyResolver;
|
|
31
|
+
private editorReadyPromise;
|
|
28
32
|
quill: Quill;
|
|
33
|
+
htmlDoEditor: string;
|
|
29
34
|
initLoadComplete: import("@angular/core").WritableSignal<boolean>;
|
|
30
35
|
isLoading: import("@angular/core").WritableSignal<boolean>;
|
|
31
36
|
editorToolbarHeight: import("@angular/core").WritableSignal<string>;
|
|
32
|
-
tipoVisualizacao: import("@angular/core").WritableSignal<"
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
label: string;
|
|
36
|
-
description: string;
|
|
37
|
-
modeloRelatorio: string;
|
|
38
|
-
variaveis: {
|
|
39
|
-
id: number;
|
|
40
|
-
descricao: string;
|
|
41
|
-
value: string;
|
|
42
|
-
}[];
|
|
43
|
-
}[]>;
|
|
37
|
+
tipoVisualizacao: import("@angular/core").WritableSignal<"descricao" | "valor">;
|
|
38
|
+
filteredVariables: import("@angular/core").WritableSignal<KvEditorVariavel[]>;
|
|
39
|
+
relatorios: import("@angular/core").InputSignal<KvEditorRelatorio[]>;
|
|
44
40
|
idRelatorioInitial: import("@angular/core").InputSignal<number>;
|
|
45
|
-
idRelatorioSelected: import("@angular/core").
|
|
46
|
-
relatorio: import("@angular/core").
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
41
|
+
idRelatorioSelected: import("@angular/core").Signal<number>;
|
|
42
|
+
relatorio: import("@angular/core").Signal<KvEditorRelatorio | null>;
|
|
43
|
+
isLoadingPdf: import("@angular/core").Signal<boolean>;
|
|
44
|
+
opVariables: OverlayPanel;
|
|
45
|
+
mentionAnchor: ElementRef;
|
|
46
|
+
messages: {
|
|
47
|
+
severity: string;
|
|
48
|
+
detail: string;
|
|
49
|
+
}[];
|
|
50
50
|
setRelatorioPorId(id: number): void;
|
|
51
|
-
setRelatorio(relatorio:
|
|
52
|
-
private editorReadyPromise;
|
|
51
|
+
setRelatorio(relatorio: KvEditorRelatorio): void;
|
|
53
52
|
ngOnInit(): void;
|
|
54
|
-
private editorReadyResolver;
|
|
55
53
|
handleInit(): Promise<void>;
|
|
56
|
-
loadCss(): Promise<void>;
|
|
57
54
|
initializeQuillEditor(): void;
|
|
58
|
-
|
|
55
|
+
private setupQuillEvents;
|
|
59
56
|
writeValue(value: any): void;
|
|
60
57
|
escrevaValor(htmlvalue: any, rawvalue?: any): Promise<void>;
|
|
61
58
|
getEditorSize(): void;
|
|
62
|
-
renderContrato(texto: string, variaveis: {
|
|
63
|
-
id: number;
|
|
64
|
-
value: string;
|
|
65
|
-
descricao?: string;
|
|
66
|
-
cor?: string;
|
|
67
|
-
}[]): string;
|
|
68
|
-
renderContratoParaPdf(texto: string, variaveis: {
|
|
69
|
-
id: number;
|
|
70
|
-
value: string;
|
|
71
|
-
descricao?: string;
|
|
72
|
-
cor?: string;
|
|
73
|
-
}[]): string;
|
|
74
|
-
selectVariavel(selectedValue: any): void;
|
|
75
59
|
openRelatorio(): Promise<void>;
|
|
60
|
+
handleMention(): void;
|
|
61
|
+
private showVariablesPanel;
|
|
62
|
+
selectVariableFromPanel(variable: KvEditorVariavel): void;
|
|
63
|
+
closeVariablesPanel(): void;
|
|
64
|
+
showInstrucoes(): void;
|
|
76
65
|
static ɵfac: i0.ɵɵFactoryDeclaration<KvEditorComponent, never>;
|
|
77
66
|
static ɵcmp: i0.ɵɵComponentDeclaration<KvEditorComponent, "kv-editor", never, { "canvaHeigth": { "alias": "canvaHeigth"; "required": false; }; "contentType": { "alias": "contentType"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "debug": { "alias": "debug"; "required": false; }; "relatorios": { "alias": "relatorios"; "required": false; "isSignal": true; }; "idRelatorioInitial": { "alias": "idRelatorioInitial"; "required": false; "isSignal": true; }; }, { "onTextChange": "onTextChange"; "onSelectionChange": "onSelectionChange"; "outputRaw": "outputRaw"; "outputHtml": "outputHtml"; }, never, never, false, never>;
|
|
78
67
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export * from './types/kv-editor.types';
|
|
2
|
+
export * from './services/kv-editor-quill.service';
|
|
3
|
+
export * from './services/kv-editor-relatorio.service';
|
|
4
|
+
export * from './services/kv-editor-mention.service';
|
|
5
|
+
export * from './services/kv-editor-pdf.service';
|
|
6
|
+
export * from './config/kv-editor.config';
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import Quill from 'quill';
|
|
2
|
+
import { KvEditorVariavel } from '../types/kv-editor.types';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class KvEditorMentionService {
|
|
5
|
+
private filteredVariables;
|
|
6
|
+
private mentionStartIndex;
|
|
7
|
+
private mentionEndIndex;
|
|
8
|
+
/**
|
|
9
|
+
* Processa o sistema de menções durante a digitação
|
|
10
|
+
*/
|
|
11
|
+
handleMention(quill: Quill, variaveis: KvEditorVariavel[]): {
|
|
12
|
+
shouldShowPanel: boolean;
|
|
13
|
+
filteredVariables: KvEditorVariavel[];
|
|
14
|
+
mentionBounds?: {
|
|
15
|
+
top: number;
|
|
16
|
+
left: number;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Calcula a posição onde o painel de menções deve aparecer
|
|
21
|
+
*/
|
|
22
|
+
private calculateMentionBounds;
|
|
23
|
+
/**
|
|
24
|
+
* Insere uma variável selecionada no editor
|
|
25
|
+
*/
|
|
26
|
+
insertVariable(quill: Quill, variable: KvEditorVariavel): void;
|
|
27
|
+
/**
|
|
28
|
+
* Fecha o sistema de menções
|
|
29
|
+
*/
|
|
30
|
+
closeMention(): void;
|
|
31
|
+
/**
|
|
32
|
+
* Obtém as variáveis filtradas
|
|
33
|
+
*/
|
|
34
|
+
getFilteredVariables(): KvEditorVariavel[];
|
|
35
|
+
/**
|
|
36
|
+
* Cria uma regex especial para busca em texto com HTML
|
|
37
|
+
*/
|
|
38
|
+
createInterleavedRegex(text: string): RegExp;
|
|
39
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<KvEditorMentionService, never>;
|
|
40
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<KvEditorMentionService>;
|
|
41
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { KvEditorRelatorio } from '../types/kv-editor.types';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class KvEditorPdfService {
|
|
4
|
+
private pdfService;
|
|
5
|
+
private dialogService;
|
|
6
|
+
private isLoadingPdf;
|
|
7
|
+
/**
|
|
8
|
+
* Obtém o estado de carregamento do PDF
|
|
9
|
+
*/
|
|
10
|
+
getIsLoadingPdf(): boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Define o estado de carregamento do PDF
|
|
13
|
+
*/
|
|
14
|
+
setIsLoadingPdf(loading: boolean): void;
|
|
15
|
+
/**
|
|
16
|
+
* Gera e abre o modal de relatório
|
|
17
|
+
*/
|
|
18
|
+
openRelatorio(htmlContent: string, relatorio: KvEditorRelatorio | null, tipoVisualizacao: 'valor' | 'descricao'): Promise<void>;
|
|
19
|
+
/**
|
|
20
|
+
* Processa o HTML substituindo variáveis e limpando formatação
|
|
21
|
+
*/
|
|
22
|
+
private processarHtmlParaPdf;
|
|
23
|
+
/**
|
|
24
|
+
* Adiciona estilos CSS específicos para PDF
|
|
25
|
+
*/
|
|
26
|
+
private adicionarEstilosParaPdf;
|
|
27
|
+
/**
|
|
28
|
+
* Gera o blob do PDF
|
|
29
|
+
*/
|
|
30
|
+
private gerarPdfBlob;
|
|
31
|
+
/**
|
|
32
|
+
* Abre o modal com o PDF gerado
|
|
33
|
+
*/
|
|
34
|
+
private abrirModalRelatorio;
|
|
35
|
+
/**
|
|
36
|
+
* Cria uma regex especial para busca em texto com HTML
|
|
37
|
+
*/
|
|
38
|
+
private createInterleavedRegex;
|
|
39
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<KvEditorPdfService, never>;
|
|
40
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<KvEditorPdfService>;
|
|
41
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import Quill from 'quill';
|
|
2
|
+
import { KvEditorQuillConfig } from '../types/kv-editor.types';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class KvEditorQuillService {
|
|
5
|
+
private quillInstance;
|
|
6
|
+
/**
|
|
7
|
+
* Carrega o CSS do Quill dinamicamente
|
|
8
|
+
*/
|
|
9
|
+
loadCss(): Promise<void>;
|
|
10
|
+
/**
|
|
11
|
+
* Registra os formatos personalizados do Quill
|
|
12
|
+
*/
|
|
13
|
+
registerCustomFormats(): void;
|
|
14
|
+
/**
|
|
15
|
+
* Cria uma instância do Quill com a configuração fornecida
|
|
16
|
+
*/
|
|
17
|
+
createQuillInstance(selector: string, config: KvEditorQuillConfig): Quill;
|
|
18
|
+
/**
|
|
19
|
+
* Obtém a instância atual do Quill
|
|
20
|
+
*/
|
|
21
|
+
getQuillInstance(): Quill | null;
|
|
22
|
+
/**
|
|
23
|
+
* Limpa a instância do Quill
|
|
24
|
+
*/
|
|
25
|
+
destroyQuillInstance(): void;
|
|
26
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<KvEditorQuillService, never>;
|
|
27
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<KvEditorQuillService>;
|
|
28
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { KvEditorRelatorio, KvEditorVariavel } from '../types/kv-editor.types';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class KvEditorRelatorioService {
|
|
4
|
+
private relatorios;
|
|
5
|
+
private relatorioSelected;
|
|
6
|
+
private idRelatorioSelected;
|
|
7
|
+
/**
|
|
8
|
+
* Define a lista de relatórios disponíveis
|
|
9
|
+
*/
|
|
10
|
+
setRelatorios(relatorios: KvEditorRelatorio[]): void;
|
|
11
|
+
/**
|
|
12
|
+
* Obtém a lista de relatórios
|
|
13
|
+
*/
|
|
14
|
+
getRelatorios(): KvEditorRelatorio[];
|
|
15
|
+
/**
|
|
16
|
+
* Seleciona um relatório pelo ID
|
|
17
|
+
*/
|
|
18
|
+
setRelatorioPorId(id: number): KvEditorRelatorio | null;
|
|
19
|
+
/**
|
|
20
|
+
* Define o relatório selecionado
|
|
21
|
+
*/
|
|
22
|
+
setRelatorio(relatorio: KvEditorRelatorio): void;
|
|
23
|
+
/**
|
|
24
|
+
* Obtém o relatório selecionado
|
|
25
|
+
*/
|
|
26
|
+
getRelatorioSelected(): KvEditorRelatorio | null;
|
|
27
|
+
/**
|
|
28
|
+
* Obtém o ID do relatório selecionado
|
|
29
|
+
*/
|
|
30
|
+
getIdRelatorioSelected(): number;
|
|
31
|
+
/**
|
|
32
|
+
* Renderiza o template do contrato com as variáveis
|
|
33
|
+
*/
|
|
34
|
+
renderContrato(texto: string, variaveis: KvEditorVariavel[]): string;
|
|
35
|
+
/**
|
|
36
|
+
* Renderiza o contrato para PDF (sem formatação HTML)
|
|
37
|
+
*/
|
|
38
|
+
renderContratoParaPdf(texto: string, variaveis: KvEditorVariavel[], tipoVisualizacao: 'valor' | 'descricao'): string;
|
|
39
|
+
/**
|
|
40
|
+
* Filtra variáveis baseado no termo de busca
|
|
41
|
+
*/
|
|
42
|
+
filtrarVariaveis(termo: string): KvEditorVariavel[];
|
|
43
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<KvEditorRelatorioService, never>;
|
|
44
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<KvEditorRelatorioService>;
|
|
45
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export interface KvEditorRelatorio {
|
|
2
|
+
id: number;
|
|
3
|
+
label: string;
|
|
4
|
+
descricao: string;
|
|
5
|
+
modeloRelatorio: string;
|
|
6
|
+
variaveis: KvEditorVariavel[];
|
|
7
|
+
}
|
|
8
|
+
export interface KvEditorVariavel {
|
|
9
|
+
id: number;
|
|
10
|
+
descricao: string;
|
|
11
|
+
value: string;
|
|
12
|
+
cor?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface KvEditorConfig {
|
|
15
|
+
contentType: 'html' | 'text';
|
|
16
|
+
readonly: boolean;
|
|
17
|
+
debug: boolean;
|
|
18
|
+
canvaHeigth: string;
|
|
19
|
+
}
|
|
20
|
+
export interface KvEditorEvents {
|
|
21
|
+
onTextChange: any;
|
|
22
|
+
onSelectionChange: any;
|
|
23
|
+
outputRaw: string;
|
|
24
|
+
outputHtml: string;
|
|
25
|
+
}
|
|
26
|
+
export interface KvEditorQuillConfig {
|
|
27
|
+
theme: string;
|
|
28
|
+
modules: any;
|
|
29
|
+
placeholder: string;
|
|
30
|
+
readOnly: boolean;
|
|
31
|
+
debug: boolean;
|
|
32
|
+
}
|
|
@@ -139,7 +139,7 @@ export declare class KvTableComponent implements OnInit, DoCheck, AfterViewInit
|
|
|
139
139
|
onClickEvent(event: any): void;
|
|
140
140
|
styleSetter(style: string, data: string): void;
|
|
141
141
|
checkMenuFiltro(col: TableConfigColumn): void;
|
|
142
|
-
sortByPosition(): (elem1: any, elem2: any) =>
|
|
142
|
+
sortByPosition(): (elem1: any, elem2: any) => 1 | 0 | -1;
|
|
143
143
|
dinamicDisableColumn(col: TableConfigColumn): boolean;
|
|
144
144
|
checkHideColumns(): void;
|
|
145
145
|
getCustomTemplate(templatename: string): TemplateRef<any>;
|
|
@@ -10,7 +10,7 @@ import * as i0 from "@angular/core";
|
|
|
10
10
|
export declare class KvTableEditComponent extends BasecomponentTable implements OnInit, OnChanges {
|
|
11
11
|
config: TableEditConfig;
|
|
12
12
|
enableSizes: import("@angular/core").InputSignal<boolean>;
|
|
13
|
-
editMode: import("@angular/core").InputSignal<"
|
|
13
|
+
editMode: import("@angular/core").InputSignal<"row" | "cell">;
|
|
14
14
|
hideBtnEdit: import("@angular/core").InputSignal<boolean>;
|
|
15
15
|
enableDisplayMode: import("@angular/core").InputSignal<boolean>;
|
|
16
16
|
private itemsParaSalvamento;
|
|
@@ -68,7 +68,7 @@ export declare class KvTableExpandableComponent implements OnInit, DoCheck {
|
|
|
68
68
|
onGlobalFilter(table: Table, event: Event): void;
|
|
69
69
|
executeCollapsed(): void;
|
|
70
70
|
checkMenuFiltro(col: any): void;
|
|
71
|
-
sortByPosition(): (elem1: any, elem2: any) =>
|
|
71
|
+
sortByPosition(): (elem1: any, elem2: any) => 1 | 0 | -1;
|
|
72
72
|
dinamicDisableColumn(col: TableConfigColumn): boolean;
|
|
73
73
|
dinamicColumnSet(e: any, col: any): void;
|
|
74
74
|
addColumn(field: string): void;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { MenuItem } from 'primeng/api';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class ActionsLoteFieldComponent {
|
|
4
|
+
selectedItems: import("@angular/core").InputSignal<any[]>;
|
|
5
|
+
actionsLote: import("@angular/core").InputSignal<MenuItem[] | undefined>;
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ActionsLoteFieldComponent, never>;
|
|
7
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ActionsLoteFieldComponent, "actions-lote-field", never, { "selectedItems": { "alias": "selectedItems"; "required": false; "isSignal": true; }; "actionsLote": { "alias": "actionsLote"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
8
|
+
}
|
package/lib/components/kv-table-viewer/components/actions-row-menu/actions-row-menu.component.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { MenuItem } from 'primeng/api';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class ActionsRowMenuComponent {
|
|
4
|
+
actionsRow: import("@angular/core").InputSignal<MenuItem[] | undefined>;
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ActionsRowMenuComponent, never>;
|
|
6
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ActionsRowMenuComponent, "actions-row-menu", never, { "actionsRow": { "alias": "actionsRow"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { TemplateRef } from '@angular/core';
|
|
2
|
+
import { TablePageEvent } from 'primeng/table';
|
|
3
|
+
import { MenuItem } from 'primeng/api';
|
|
4
|
+
import { CpfCnpjPipe } from '../../api/pipes/cpfcnpj.pipe';
|
|
5
|
+
import { TelefonePipe } from '../../api/pipes/telefone.pipe';
|
|
6
|
+
import { TemplateDirective } from '../../api/directives/template/template.directive';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
interface ColumnTableViewer {
|
|
9
|
+
field: string;
|
|
10
|
+
header: string;
|
|
11
|
+
width?: string;
|
|
12
|
+
icon?: (rowData: any) => string;
|
|
13
|
+
tag?: (rowData: any) => {
|
|
14
|
+
label: string;
|
|
15
|
+
severity: string;
|
|
16
|
+
icon: string;
|
|
17
|
+
};
|
|
18
|
+
pipe?: 'cpfcnpj' | 'telefone' | 'money' | undefined;
|
|
19
|
+
template?: {
|
|
20
|
+
name: string;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
export declare class KvTableViewerComponent {
|
|
24
|
+
cpfCnpjPipe: CpfCnpjPipe;
|
|
25
|
+
telefonePipe: TelefonePipe;
|
|
26
|
+
columns: import("@angular/core").InputSignal<ColumnTableViewer[]>;
|
|
27
|
+
actionsRow: import("@angular/core").InputSignal<MenuItem[] | undefined>;
|
|
28
|
+
actionsHeader: import("@angular/core").InputSignal<MenuItem[] | undefined>;
|
|
29
|
+
actionsLote: import("@angular/core").InputSignal<MenuItem[] | undefined>;
|
|
30
|
+
data: import("@angular/core").InputSignal<any[]>;
|
|
31
|
+
totalRecords: import("@angular/core").InputSignal<number>;
|
|
32
|
+
loading: import("@angular/core").InputSignal<boolean>;
|
|
33
|
+
rows: import("@angular/core").InputSignal<number>;
|
|
34
|
+
rowsPerPageOptions: import("@angular/core").InputSignal<number[]>;
|
|
35
|
+
paginator: import("@angular/core").InputSignal<boolean>;
|
|
36
|
+
lazy: import("@angular/core").InputSignal<boolean>;
|
|
37
|
+
scrollable: import("@angular/core").InputSignal<boolean>;
|
|
38
|
+
pageLinks: import("@angular/core").InputSignal<number>;
|
|
39
|
+
currentPageReportTemplate: import("@angular/core").InputSignal<string>;
|
|
40
|
+
selectionPageOnly: import("@angular/core").InputSignal<boolean>;
|
|
41
|
+
selectableTable: import("@angular/core").InputSignal<boolean>;
|
|
42
|
+
showHeader: import("@angular/core").InputSignal<boolean>;
|
|
43
|
+
tableViewerSize: import("@angular/core").InputSignal<string>;
|
|
44
|
+
searchInput: import("@angular/core").InputSignal<boolean>;
|
|
45
|
+
filterButton: import("@angular/core").InputSignal<boolean>;
|
|
46
|
+
selectedItems: import("@angular/core").WritableSignal<any[]>;
|
|
47
|
+
selectedItem: import("@angular/core").WritableSignal<any>;
|
|
48
|
+
first: import("@angular/core").WritableSignal<number>;
|
|
49
|
+
onPageChange: import("@angular/core").OutputEmitterRef<TablePageEvent>;
|
|
50
|
+
onClickRowItem: import("@angular/core").OutputEmitterRef<any>;
|
|
51
|
+
onSelectItems: import("@angular/core").OutputEmitterRef<any[]>;
|
|
52
|
+
templates: import("@angular/core").Signal<readonly TemplateDirective[]>;
|
|
53
|
+
_templates: import("@angular/core").InputSignal<Record<string, TemplateRef<any>>>;
|
|
54
|
+
getCustomTemplate: import("@angular/core").Signal<(templatename: string) => TemplateRef<any> | null>;
|
|
55
|
+
hasSelectedItems: import("@angular/core").Signal<any>;
|
|
56
|
+
verifyItemSelecionado: import("@angular/core").Signal<(rowData: any) => any>;
|
|
57
|
+
transformData: import("@angular/core").Signal<(type: string, value: any) => any>;
|
|
58
|
+
handleTableSize: import("@angular/core").Signal<string>;
|
|
59
|
+
constructor();
|
|
60
|
+
handlePageChange(event: TablePageEvent): void;
|
|
61
|
+
rowSelect(rowData: any): void;
|
|
62
|
+
transformMoney(valor: number): string;
|
|
63
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<KvTableViewerComponent, never>;
|
|
64
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<KvTableViewerComponent, "kv-table-viewer", never, { "columns": { "alias": "columns"; "required": false; "isSignal": true; }; "actionsRow": { "alias": "actionsRow"; "required": false; "isSignal": true; }; "actionsHeader": { "alias": "actionsHeader"; "required": false; "isSignal": true; }; "actionsLote": { "alias": "actionsLote"; "required": false; "isSignal": true; }; "data": { "alias": "data"; "required": false; "isSignal": true; }; "totalRecords": { "alias": "totalRecords"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "rows": { "alias": "rows"; "required": false; "isSignal": true; }; "rowsPerPageOptions": { "alias": "rowsPerPageOptions"; "required": false; "isSignal": true; }; "paginator": { "alias": "paginator"; "required": false; "isSignal": true; }; "lazy": { "alias": "lazy"; "required": false; "isSignal": true; }; "scrollable": { "alias": "scrollable"; "required": false; "isSignal": true; }; "pageLinks": { "alias": "pageLinks"; "required": false; "isSignal": true; }; "currentPageReportTemplate": { "alias": "currentPageReportTemplate"; "required": false; "isSignal": true; }; "selectionPageOnly": { "alias": "selectionPageOnly"; "required": false; "isSignal": true; }; "selectableTable": { "alias": "selectableTable"; "required": false; "isSignal": true; }; "showHeader": { "alias": "showHeader"; "required": false; "isSignal": true; }; "tableViewerSize": { "alias": "tableViewerSize"; "required": false; "isSignal": true; }; "searchInput": { "alias": "searchInput"; "required": false; "isSignal": true; }; "filterButton": { "alias": "filterButton"; "required": false; "isSignal": true; }; "_templates": { "alias": "_templates"; "required": false; "isSignal": true; }; }, { "onPageChange": "onPageChange"; "onClickRowItem": "onClickRowItem"; "onSelectItems": "onSelectItems"; }, ["templates"], ["[filtro]", "[selectedItemHeader]", "[selectedItem]"], true, never>;
|
|
65
|
+
}
|
|
66
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
export declare class KvTagComponent {
|
|
3
|
-
severity: import("@angular/core").InputSignal<"info" | "success" | "warn" | "danger" | "
|
|
3
|
+
severity: import("@angular/core").InputSignal<"info" | "success" | "warn" | "danger" | "system" | "contrast">;
|
|
4
4
|
border: import("@angular/core").InputSignal<boolean>;
|
|
5
5
|
static ɵfac: i0.ɵɵFactoryDeclaration<KvTagComponent, never>;
|
|
6
6
|
static ɵcmp: i0.ɵɵComponentDeclaration<KvTagComponent, "kv-tag", never, { "severity": { "alias": "severity"; "required": false; "isSignal": true; }; "border": { "alias": "border"; "required": false; "isSignal": true; }; }, {}, never, ["*"], false, never>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "keevo-components",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.91",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": "^17.3.8",
|
|
6
6
|
"@angular/core": "^17.3.8",
|
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
"chart.js": "^4.4.2",
|
|
11
11
|
"d3": "^7.9.0",
|
|
12
12
|
"d3-org-chart": "^3.1.1",
|
|
13
|
+
"html2canvas": "^1.4.1",
|
|
14
|
+
"jspdf": "^3.0.1",
|
|
13
15
|
"ng2-pdf-viewer": "^10.2.2",
|
|
14
16
|
"ngx-image-cropper": "^8.1.0",
|
|
15
17
|
"ngx-loading": "^17.0.0",
|
|
@@ -17,9 +19,7 @@
|
|
|
17
19
|
"primeicons": "^7.0.0",
|
|
18
20
|
"primeng": "17.17.0",
|
|
19
21
|
"quill": "^2.0.2",
|
|
20
|
-
"vkbeautify": "^0.99.3"
|
|
21
|
-
"html2canvas": "^1.4.1",
|
|
22
|
-
"jspdf": "^3.0.1"
|
|
22
|
+
"vkbeautify": "^0.99.3"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"tslib": "^2.3.0"
|
package/public-api.d.ts
CHANGED
|
@@ -133,6 +133,10 @@ export * from './lib/components/kv-tree-table/kv-tree-table.module';
|
|
|
133
133
|
*/
|
|
134
134
|
export * from './lib/components/kv-table-expandable/kv-table-expandable.component';
|
|
135
135
|
export * from './lib/components/kv-table-expandable/kv-table-expandable.module';
|
|
136
|
+
/**
|
|
137
|
+
* Table Expandable
|
|
138
|
+
*/
|
|
139
|
+
export * from './lib/components/kv-table-viewer/kv-table-viewer.component';
|
|
136
140
|
/**
|
|
137
141
|
* Treeview
|
|
138
142
|
*/
|