keevo-components 1.8.339 → 1.8.341
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-crud-form.mjs +17 -21
- package/esm2022/lib/api/base-components/base-component-crud-list.mjs +11 -14
- package/esm2022/lib/api/base-components/base-component-crud.mjs +6 -8
- package/esm2022/lib/api/services/image.cutter.service.mjs +564 -0
- package/esm2022/lib/components/kv-avatar/kv-avatar.component.mjs +54 -231
- package/esm2022/lib/components/kv-avatar/kv-avatar.module.mjs +7 -3
- package/esm2022/lib/components/kv-home-card/kv-home-card.module.mjs +1 -1
- package/esm2022/lib/components/kv-image-upload/kv-image-upload.component.mjs +46 -16
- package/esm2022/lib/components/kv-table/kv-table.component.mjs +11 -11
- package/esm2022/lib/components/kv-table-edit/kv-table-edit.component.mjs +3 -3
- package/esm2022/public-api.mjs +2 -1
- package/fesm2022/keevo-components.mjs +851 -451
- package/fesm2022/keevo-components.mjs.map +1 -1
- package/lib/api/base-components/base-component-crud-form.d.ts +15 -15
- package/lib/api/base-components/base-component-crud-list.d.ts +14 -14
- package/lib/api/base-components/base-component-crud.d.ts +5 -5
- package/lib/api/services/image.cutter.service.d.ts +15 -0
- package/lib/components/kv-avatar/kv-avatar.component.d.ts +12 -37
- package/lib/components/kv-avatar/kv-avatar.module.d.ts +2 -1
- package/lib/components/kv-image-upload/kv-image-upload.component.d.ts +10 -3
- package/lib/components/kv-table/kv-table.component.d.ts +1 -2
- package/lib/components/kv-table-expandable/kv-table-expandable.component.d.ts +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { ActivatedRoute, Router } from
|
|
2
|
-
import { OnDestroy, OnInit } from
|
|
3
|
-
import { DialogService, DynamicDialogConfig, DynamicDialogRef } from
|
|
4
|
-
import { FormGroup, ValidatorFn } from
|
|
5
|
-
import { Observable } from
|
|
6
|
-
import { ActionItem } from
|
|
7
|
-
import { BaseComponentCrud } from
|
|
8
|
-
import { NotificationService } from
|
|
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
9
|
import * as i0 from "@angular/core";
|
|
10
10
|
export interface DadosTela {
|
|
11
11
|
subTituloForm: string | undefined;
|
|
@@ -14,6 +14,10 @@ export interface DadosTela {
|
|
|
14
14
|
mensagemValidacao: boolean;
|
|
15
15
|
}
|
|
16
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;
|
|
17
21
|
protected isAccordionExpanded: boolean;
|
|
18
22
|
protected isNewRegistry: boolean;
|
|
19
23
|
protected isSaveLoading: boolean;
|
|
@@ -24,11 +28,7 @@ export declare abstract class BaseComponentCrudForm extends BaseComponentCrud im
|
|
|
24
28
|
protected popup: boolean;
|
|
25
29
|
protected registry: any;
|
|
26
30
|
private onSetFormValues;
|
|
27
|
-
|
|
28
|
-
protected activatedRoute: ActivatedRoute;
|
|
29
|
-
protected dynamicDialogRef: DynamicDialogRef;
|
|
30
|
-
protected dynamicDialogConfig: DynamicDialogConfig;
|
|
31
|
-
constructor(dialogService?: DialogService, notificationService?: NotificationService, activatedRoute?: ActivatedRoute, dynamicDialogRef?: DynamicDialogRef, dynamicDialogConfig?: DynamicDialogConfig, router?: Router);
|
|
31
|
+
constructor(dialogService: DialogService, notificationService: NotificationService, activatedRoute: ActivatedRoute, dynamicDialogRef: DynamicDialogRef, dynamicDialogConfig: DynamicDialogConfig, router: Router);
|
|
32
32
|
/**
|
|
33
33
|
* Método disparado para configuração do form
|
|
34
34
|
*/
|
|
@@ -141,8 +141,8 @@ export declare abstract class BaseComponentCrudForm extends BaseComponentCrud im
|
|
|
141
141
|
*/
|
|
142
142
|
protected validateForm(): boolean;
|
|
143
143
|
/**
|
|
144
|
-
|
|
145
|
-
|
|
144
|
+
* Método que dispara a atualização da página inteira
|
|
145
|
+
*/
|
|
146
146
|
protected refresh(): void;
|
|
147
147
|
static ɵfac: i0.ɵɵFactoryDeclaration<BaseComponentCrudForm, never>;
|
|
148
148
|
static ɵcmp: i0.ɵɵComponentDeclaration<BaseComponentCrudForm, "ng-component", never, {}, {}, never, never, false, never>;
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import { OnInit } from
|
|
2
|
-
import { DialogService } from
|
|
3
|
-
import { Router } from
|
|
4
|
-
import { BaseComponentCrud } from
|
|
5
|
-
import { TablePaginate } from
|
|
6
|
-
import { TableConfig } from
|
|
7
|
-
import { ActionItem } from
|
|
8
|
-
import { NotificationService } from
|
|
9
|
-
import { Observable } from
|
|
10
|
-
import { TreeTableConfig } from
|
|
11
|
-
import { KvTableComponent } from
|
|
12
|
-
import { KvTreetableComponent } from
|
|
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 { KvTableComponent } from '../../components/kv-table/kv-table.component';
|
|
12
|
+
import { KvTreetableComponent } from '../../components/kv-tree-table/kv-tree-table.component';
|
|
13
13
|
import * as i0 from "@angular/core";
|
|
14
14
|
export declare abstract class BaseComponentCrudList extends BaseComponentCrud implements OnInit {
|
|
15
|
+
router: Router;
|
|
15
16
|
dataSource: any;
|
|
16
17
|
selectedItem: any;
|
|
17
18
|
tableConfig: TableConfig | TreeTableConfig;
|
|
@@ -19,8 +20,7 @@ export declare abstract class BaseComponentCrudList extends BaseComponentCrud im
|
|
|
19
20
|
actionsPageList: ActionItem[];
|
|
20
21
|
table: KvTableComponent;
|
|
21
22
|
treetable: KvTreetableComponent;
|
|
22
|
-
|
|
23
|
-
constructor(dialogService?: DialogService, notificationService?: NotificationService, router?: Router);
|
|
23
|
+
constructor(dialogService: DialogService, notificationService: NotificationService, router: Router);
|
|
24
24
|
ngOnInit(): void;
|
|
25
25
|
/**
|
|
26
26
|
* Método disparado para configuração das tabelas do componente de lista
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { DialogService } from 'primeng/dynamicdialog';
|
|
2
|
-
import { Type } from
|
|
3
|
-
import { paramsDialog } from
|
|
2
|
+
import { Type } from '@angular/core';
|
|
3
|
+
import { paramsDialog } from '../services/form.service';
|
|
4
4
|
import { NotificationService } from '../services/notification.service';
|
|
5
5
|
import { Observable } from 'rxjs';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
export declare abstract class BaseComponentCrud {
|
|
8
|
+
dialogService: DialogService;
|
|
9
|
+
notificationService: NotificationService;
|
|
8
10
|
isReport: boolean;
|
|
9
11
|
itemsReport: any;
|
|
10
|
-
|
|
11
|
-
protected notificationService: NotificationService;
|
|
12
|
-
constructor(dialogService?: DialogService, notificationService?: NotificationService);
|
|
12
|
+
constructor(dialogService: DialogService, notificationService: NotificationService);
|
|
13
13
|
/**
|
|
14
14
|
* Fecha um relatório
|
|
15
15
|
*/
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { DialogService } from 'primeng/dynamicdialog';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class ImageCutterService {
|
|
4
|
+
private readonly dialogservice;
|
|
5
|
+
constructor(dialogservice: DialogService);
|
|
6
|
+
cut(imageBase64: string, width: number, height: number, indCircle?: boolean): Promise<string>;
|
|
7
|
+
abrirModal(cutConfig: {
|
|
8
|
+
imageBase64: string;
|
|
9
|
+
width: number;
|
|
10
|
+
height: number;
|
|
11
|
+
indCircle: boolean;
|
|
12
|
+
}): void;
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ImageCutterService, never>;
|
|
14
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ImageCutterService>;
|
|
15
|
+
}
|
|
@@ -1,60 +1,35 @@
|
|
|
1
1
|
import { ElementRef, EventEmitter, OnInit } from '@angular/core';
|
|
2
2
|
import { ImagensService } from '../../api/services/imagens.service';
|
|
3
3
|
import { NotificationService } from '../../api/services/notification.service';
|
|
4
|
+
import { ImageCutterService } from '../../api/services/image.cutter.service';
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
5
6
|
export declare class KvAvatarComponent implements OnInit {
|
|
6
7
|
imageService: ImagensService;
|
|
7
8
|
private notificationService;
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
private imageCutterService;
|
|
10
|
+
constructor(imageService: ImagensService, notificationService: NotificationService, imageCutterService: ImageCutterService);
|
|
10
11
|
borderColor: string;
|
|
11
12
|
btnsColor: string;
|
|
12
13
|
width: number;
|
|
13
14
|
height: number;
|
|
15
|
+
btnAlterarFoto: boolean;
|
|
14
16
|
imageUrlChange: EventEmitter<string>;
|
|
15
|
-
onModalOpen: EventEmitter<null>;
|
|
16
17
|
removerFotoEvent: EventEmitter<void>;
|
|
17
|
-
|
|
18
|
+
file: File | null;
|
|
18
19
|
existeLogo: boolean;
|
|
19
20
|
selectedImage: string;
|
|
20
|
-
widthTela: number;
|
|
21
|
-
heigthTela: number;
|
|
22
|
-
showCropModal: boolean;
|
|
23
|
-
imageLoaded: boolean;
|
|
24
|
-
imageX: number;
|
|
25
|
-
imageY: number;
|
|
26
|
-
startX: number;
|
|
27
|
-
startY: number;
|
|
28
|
-
valueZoom: number;
|
|
29
|
-
scaleFactor: number;
|
|
30
|
-
cropCanvas: ElementRef<HTMLCanvasElement>;
|
|
31
|
-
cropBorder: ElementRef;
|
|
32
|
-
fileInput: ElementRef;
|
|
33
|
-
canvasWidth: import("@angular/core").WritableSignal<number | null>;
|
|
34
|
-
canvasHeight: import("@angular/core").WritableSignal<number | null>;
|
|
35
21
|
imageUrl: import("@angular/core").InputSignal<string>;
|
|
36
22
|
imageSource: import("@angular/core").WritableSignal<string>;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
23
|
+
imageLoaded: import("@angular/core").WritableSignal<boolean>;
|
|
24
|
+
fileInput: ElementRef;
|
|
25
|
+
ngOnInit(): void;
|
|
26
|
+
carregaImagemInicial(): void;
|
|
27
|
+
onImageLoad(): void;
|
|
40
28
|
openFile(): void;
|
|
41
|
-
|
|
29
|
+
changeImage(event: any): void;
|
|
42
30
|
questionRemoverFoto(): void;
|
|
43
31
|
removerFoto(): void;
|
|
44
32
|
handleImageError(event: any): void;
|
|
45
|
-
openCropModal(): void;
|
|
46
|
-
cropImage(): void;
|
|
47
|
-
onZoomChange(event: any): void;
|
|
48
|
-
retornaTamanhoCanvas(): number;
|
|
49
|
-
closeCropModal(): void;
|
|
50
|
-
redrawCanvas(ctx: CanvasRenderingContext2D | null, img: HTMLImageElement): void;
|
|
51
|
-
initializeImageMove(canvas: HTMLCanvasElement, ctx: CanvasRenderingContext2D | null, img: HTMLImageElement): void;
|
|
52
|
-
initializeMouseWheel(canvas: HTMLCanvasElement, ctx: CanvasRenderingContext2D | null, img: HTMLImageElement): void;
|
|
53
|
-
drawImageInCropArea(ctx: CanvasRenderingContext2D | null, img: HTMLImageElement): void;
|
|
54
|
-
drawCropArea(ctx: CanvasRenderingContext2D | null): void;
|
|
55
|
-
getCropRadius(): number;
|
|
56
|
-
updateCropBorderSize(): void;
|
|
57
|
-
updateCanvasSize(): void;
|
|
58
33
|
static ɵfac: i0.ɵɵFactoryDeclaration<KvAvatarComponent, never>;
|
|
59
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<KvAvatarComponent, "kv-avatar", never, { "borderColor": { "alias": "borderColor"; "required": false; }; "btnsColor": { "alias": "btnsColor"; "required": false; }; "width": { "alias": "width"; "required": false; }; "height": { "alias": "height"; "required": false; }; "btnAlterarFoto": { "alias": "btnAlterarFoto"; "required": false; }; "imageUrl": { "alias": "imageUrl"; "required": false; "isSignal": true; }; }, { "imageUrlChange": "imageUrlChange"; "
|
|
34
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<KvAvatarComponent, "kv-avatar", never, { "borderColor": { "alias": "borderColor"; "required": false; }; "btnsColor": { "alias": "btnsColor"; "required": false; }; "width": { "alias": "width"; "required": false; }; "height": { "alias": "height"; "required": false; }; "btnAlterarFoto": { "alias": "btnAlterarFoto"; "required": false; }; "imageUrl": { "alias": "imageUrl"; "required": false; "isSignal": true; }; }, { "imageUrlChange": "imageUrlChange"; "removerFotoEvent": "removerFotoEvent"; }, never, never, false, never>;
|
|
60
35
|
}
|
|
@@ -7,8 +7,9 @@ import * as i5 from "primeng/slider";
|
|
|
7
7
|
import * as i6 from "@angular/forms";
|
|
8
8
|
import * as i7 from "../kv-button/kv-button.module";
|
|
9
9
|
import * as i8 from "../kv-label/kv-label.module";
|
|
10
|
+
import * as i9 from "ngx-loading";
|
|
10
11
|
export declare class KvAvatarModule {
|
|
11
12
|
static ɵfac: i0.ɵɵFactoryDeclaration<KvAvatarModule, never>;
|
|
12
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<KvAvatarModule, [typeof i1.KvAvatarComponent], [typeof i2.CommonModule, typeof i3.ButtonModule, typeof i4.FileUploadModule, typeof i5.SliderModule, typeof i6.FormsModule, typeof i6.ReactiveFormsModule, typeof i7.KvButtonModule, typeof i8.KvLabelModule], [typeof i1.KvAvatarComponent]>;
|
|
13
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<KvAvatarModule, [typeof i1.KvAvatarComponent], [typeof i2.CommonModule, typeof i3.ButtonModule, typeof i4.FileUploadModule, typeof i5.SliderModule, typeof i6.FormsModule, typeof i6.ReactiveFormsModule, typeof i7.KvButtonModule, typeof i8.KvLabelModule, typeof i9.NgxLoadingModule], [typeof i1.KvAvatarComponent]>;
|
|
13
14
|
static ɵinj: i0.ɵɵInjectorDeclaration<KvAvatarModule>;
|
|
14
15
|
}
|
|
@@ -1,17 +1,24 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ImageCutterService } from './../../api/services/image.cutter.service';
|
|
2
|
+
import { ElementRef, EventEmitter } from '@angular/core';
|
|
2
3
|
import { NotificationService } from '../../api/services/notification.service';
|
|
3
4
|
import * as i0 from "@angular/core";
|
|
4
5
|
export declare class KvImageUploadComponent {
|
|
5
6
|
private notificationService;
|
|
6
|
-
|
|
7
|
+
private readonly imageCutterService;
|
|
8
|
+
constructor(notificationService: NotificationService, imageCutterService: ImageCutterService);
|
|
7
9
|
file: File | null;
|
|
8
10
|
fileSrc: string | ArrayBuffer | null;
|
|
9
11
|
widthComponent: string;
|
|
10
12
|
heightComponent: string;
|
|
13
|
+
cutImage: import("@angular/core").InputSignal<boolean>;
|
|
14
|
+
cutWidth: import("@angular/core").InputSignal<number>;
|
|
15
|
+
cutHeight: import("@angular/core").InputSignal<number>;
|
|
16
|
+
cutCircle: import("@angular/core").InputSignal<boolean>;
|
|
11
17
|
maxHeightImage: string;
|
|
12
18
|
description: string;
|
|
13
19
|
fileEmit: EventEmitter<any>;
|
|
14
20
|
deleteEmit: EventEmitter<any>;
|
|
21
|
+
fileInput?: ElementRef;
|
|
15
22
|
onDragOver(event: DragEvent): void;
|
|
16
23
|
onDragLeave(event: DragEvent): void;
|
|
17
24
|
onDrop(event: DragEvent): void;
|
|
@@ -21,5 +28,5 @@ export declare class KvImageUploadComponent {
|
|
|
21
28
|
removeDragOverClass(event: DragEvent): void;
|
|
22
29
|
deleteImage(): void;
|
|
23
30
|
static ɵfac: i0.ɵɵFactoryDeclaration<KvImageUploadComponent, never>;
|
|
24
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<KvImageUploadComponent, "kv-image-upload", never, { "fileSrc": { "alias": "fileSrc"; "required": false; }; "widthComponent": { "alias": "widthComponent"; "required": false; }; "heightComponent": { "alias": "heightComponent"; "required": false; }; "maxHeightImage": { "alias": "maxHeightImage"; "required": false; }; "description": { "alias": "description"; "required": false; }; }, { "fileEmit": "fileEmit"; "deleteEmit": "deleteEmit"; }, never, never, false, never>;
|
|
31
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<KvImageUploadComponent, "kv-image-upload", never, { "fileSrc": { "alias": "fileSrc"; "required": false; }; "widthComponent": { "alias": "widthComponent"; "required": false; }; "heightComponent": { "alias": "heightComponent"; "required": false; }; "cutImage": { "alias": "cutImage"; "required": false; "isSignal": true; }; "cutWidth": { "alias": "cutWidth"; "required": false; "isSignal": true; }; "cutHeight": { "alias": "cutHeight"; "required": false; "isSignal": true; }; "cutCircle": { "alias": "cutCircle"; "required": false; "isSignal": true; }; "maxHeightImage": { "alias": "maxHeightImage"; "required": false; }; "description": { "alias": "description"; "required": false; }; }, { "fileEmit": "fileEmit"; "deleteEmit": "deleteEmit"; }, never, never, false, never>;
|
|
25
32
|
}
|
|
@@ -110,7 +110,6 @@ export declare class KvTableComponent implements OnInit, DoCheck, AfterViewInit
|
|
|
110
110
|
returnRowClass(rowData: any, col: TableConfigColumn): string;
|
|
111
111
|
expiredFile(rowData: any, col: TableConfigColumn): boolean;
|
|
112
112
|
transformValue(rowData: any, col: TableConfigColumn): any;
|
|
113
|
-
transformDate(date: any): string | null;
|
|
114
113
|
transformCapitalize(value: string): string;
|
|
115
114
|
formatarValor(valor: number): string;
|
|
116
115
|
adjustTableSize(): void;
|
|
@@ -130,7 +129,7 @@ export declare class KvTableComponent implements OnInit, DoCheck, AfterViewInit
|
|
|
130
129
|
onClickEvent(event: any): void;
|
|
131
130
|
styleSetter(style: string, data: string): void;
|
|
132
131
|
checkMenuFiltro(col: any): void;
|
|
133
|
-
sortByPosition(): (elem1: any, elem2: any) =>
|
|
132
|
+
sortByPosition(): (elem1: any, elem2: any) => 1 | 0 | -1;
|
|
134
133
|
dinamicDisableColumn(col: TableConfigColumn): boolean;
|
|
135
134
|
checkHideColumns(): void;
|
|
136
135
|
getCustomTemplate(templatename: string): TemplateRef<any>;
|
|
@@ -64,7 +64,7 @@ export declare class KvTableExpandableComponent implements OnInit, DoCheck {
|
|
|
64
64
|
onGlobalFilter(table: Table, event: Event): void;
|
|
65
65
|
executeCollapsed(): void;
|
|
66
66
|
checkMenuFiltro(col: any): void;
|
|
67
|
-
sortByPosition(): (elem1: any, elem2: any) =>
|
|
67
|
+
sortByPosition(): (elem1: any, elem2: any) => 1 | 0 | -1;
|
|
68
68
|
dinamicDisableColumn(col: TableConfigColumn): boolean;
|
|
69
69
|
dinamicColumnSet(e: any, col: any): void;
|
|
70
70
|
addColumn(field: string): void;
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -38,6 +38,7 @@ export * from './lib/api/services/imagens.service';
|
|
|
38
38
|
export * from './lib/api/services/notification.service';
|
|
39
39
|
export * from './lib/api/services/object.service';
|
|
40
40
|
export * from './lib/api/services/chat.service';
|
|
41
|
+
export * from './lib/api/services/image.cutter.service';
|
|
41
42
|
/**
|
|
42
43
|
* PrimeNG
|
|
43
44
|
*/
|