keevo-components 1.8.276 → 1.8.277

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.
@@ -1,15 +1,13 @@
1
- import { ElementRef, EventEmitter } from '@angular/core';
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 { DialogService, DynamicDialogRef } from 'primeng/dynamicdialog';
4
+ import { DialogService } from 'primeng/dynamicdialog';
5
5
  import { BaseComponentCrud } from '../../api/base-components/base-component-crud';
6
6
  import * as i0 from "@angular/core";
7
- export declare class KvAvatarComponent extends BaseComponentCrud {
7
+ export declare class KvAvatarComponent extends BaseComponentCrud implements OnInit {
8
8
  imageService: ImagensService;
9
9
  notificationService: NotificationService;
10
10
  dialogService: DialogService;
11
- dynamicDialogRef: DynamicDialogRef;
12
- imageUrl: string;
13
11
  borderColor: string;
14
12
  btnsColor: string;
15
13
  width: number;
@@ -21,14 +19,18 @@ export declare class KvAvatarComponent extends BaseComponentCrud {
21
19
  existeLogo: boolean;
22
20
  selectedImage: string;
23
21
  fileInput: ElementRef;
24
- constructor(imageService: ImagensService, notificationService: NotificationService, dialogService: DialogService, dynamicDialogRef: DynamicDialogRef);
25
- getImageSrc(): string;
22
+ constructor(imageService: ImagensService, notificationService: NotificationService, dialogService: DialogService);
23
+ ngOnInit(): void;
24
+ imageUrl: import("@angular/core").InputSignal<string>;
25
+ imageSource: import("@angular/core").WritableSignal<string>;
26
+ getImageSrc(): void;
26
27
  openFile(): void;
27
28
  selectFotoSelecionada(event: any): void;
28
29
  questionRemoverFoto(): void;
29
30
  removerFoto(): void;
30
31
  handleImageError(event: any): void;
32
+ abrirModalRecortarFoto(): void;
31
33
  receberDados(): any;
32
34
  static ɵfac: i0.ɵɵFactoryDeclaration<KvAvatarComponent, never>;
33
- static ɵcmp: i0.ɵɵComponentDeclaration<KvAvatarComponent, "kv-avatar", never, { "imageUrl": { "alias": "imageUrl"; "required": false; }; "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; }; }, { "imageUrlChange": "imageUrlChange"; "removerFotoEvent": "removerFotoEvent"; "onModalOpen": "onModalOpen"; }, never, never, false, never>;
35
+ 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"; "onModalOpen": "onModalOpen"; }, never, never, false, never>;
34
36
  }
@@ -7,9 +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 "../kv-modal/kv-modal.module";
10
+ import * as i9 from "./kv-crop-image/kv-crop-image.component";
11
11
  export declare class KvAvatarModule {
12
12
  static ɵfac: i0.ɵɵFactoryDeclaration<KvAvatarModule, never>;
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.KvModalModule], [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.KvCropImageComponent], [typeof i1.KvAvatarComponent]>;
14
14
  static ɵinj: i0.ɵɵInjectorDeclaration<KvAvatarModule>;
15
15
  }
@@ -0,0 +1,39 @@
1
+ import { ElementRef } from '@angular/core';
2
+ import { DialogService, DynamicDialogConfig, DynamicDialogRef } from 'primeng/dynamicdialog';
3
+ import { ActionItem, BaseComponentCrud, ImagensService, NotificationService } from 'projects/keevo-components/src/public-api';
4
+ import * as i0 from "@angular/core";
5
+ export declare class KvCropImageComponent extends BaseComponentCrud {
6
+ imageService: ImagensService;
7
+ readonly notificationService: NotificationService;
8
+ readonly dialogService: DialogService;
9
+ private readonly dynamicDialogRef;
10
+ private readonly dynamicDialogConfig;
11
+ onWindowResize(): void;
12
+ constructor(imageService: ImagensService, notificationService: NotificationService, dialogService: DialogService, dynamicDialogRef: DynamicDialogRef, dynamicDialogConfig: DynamicDialogConfig);
13
+ widthTela: number;
14
+ heightTela: number;
15
+ imageLoaded: boolean;
16
+ imageX: number;
17
+ imageY: number;
18
+ startX: number;
19
+ startY: number;
20
+ valueZoom: number;
21
+ scaleFactor: number;
22
+ selectedImage: string;
23
+ cropCanvas: ElementRef<HTMLCanvasElement>;
24
+ fileInput: ElementRef;
25
+ actionsModal: ActionItem[];
26
+ openCropModal(): void;
27
+ redrawCanvas(ctx: CanvasRenderingContext2D | null, img: HTMLImageElement): void;
28
+ initializeImageMove(canvas: HTMLCanvasElement, ctx: CanvasRenderingContext2D | null, img: HTMLImageElement): void;
29
+ initializeMouseWheel(canvas: HTMLCanvasElement, ctx: CanvasRenderingContext2D | null, img: HTMLImageElement): void;
30
+ drawImageInCropArea(ctx: CanvasRenderingContext2D | null, img: HTMLImageElement): void;
31
+ drawCropArea(ctx: CanvasRenderingContext2D | null): void;
32
+ updateCanvasSize(): void;
33
+ onZoomChange(event: any): void;
34
+ cropImage(): void;
35
+ enviarDados(): void;
36
+ retornaTamanhoCanvas(): number;
37
+ static ɵfac: i0.ɵɵFactoryDeclaration<KvCropImageComponent, never>;
38
+ static ɵcmp: i0.ɵɵComponentDeclaration<KvCropImageComponent, "kv-crop-image", never, {}, {}, never, never, true, never>;
39
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "keevo-components",
3
- "version": "1.8.276",
3
+ "version": "1.8.277",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^17.3.8",
6
6
  "@angular/core": "^17.3.8",
package/public-api.d.ts CHANGED
@@ -165,11 +165,6 @@ export * from './lib/api/directives/stepper/dynamicinput.directive';
165
165
  export * from './lib/components/kv-loader/kv-loader.component';
166
166
  export * from './lib/components/kv-loader/kv-loader.module';
167
167
  export * from './lib/components/kv-loader/kv-loader.service';
168
- /**
169
- * Avatar
170
- */
171
- export * from './lib/components/kv-avatar/kv-avatar.component';
172
- export * from './lib/components/kv-avatar/kv-avatar.module';
173
168
  /**
174
169
  * Carousel
175
170
  */
@@ -230,3 +225,9 @@ export * from './lib/components/kv-file-viewer/kv-file-viewer.module';
230
225
  */
231
226
  export * from './lib/components/kv-home-card/kv-home-card.component';
232
227
  export * from './lib/components/kv-home-card/kv-home-card.module';
228
+ /**
229
+ * Avatar
230
+ */
231
+ export * from './lib/components/kv-avatar/kv-avatar.component';
232
+ export * from './lib/components/kv-avatar/kv-crop-image/kv-crop-image.component';
233
+ export * from './lib/components/kv-avatar/kv-avatar.module';