keevo-components 1.8.340 → 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/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/public-api.mjs +2 -1
- package/fesm2022/keevo-components.mjs +816 -413
- package/fesm2022/keevo-components.mjs.map +1 -1
- 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 -1
- 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
|
@@ -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
|
}
|
|
@@ -129,7 +129,7 @@ export declare class KvTableComponent implements OnInit, DoCheck, AfterViewInit
|
|
|
129
129
|
onClickEvent(event: any): void;
|
|
130
130
|
styleSetter(style: string, data: string): void;
|
|
131
131
|
checkMenuFiltro(col: any): void;
|
|
132
|
-
sortByPosition(): (elem1: any, elem2: any) =>
|
|
132
|
+
sortByPosition(): (elem1: any, elem2: any) => 1 | 0 | -1;
|
|
133
133
|
dinamicDisableColumn(col: TableConfigColumn): boolean;
|
|
134
134
|
checkHideColumns(): void;
|
|
135
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
|
*/
|