keevo-components 1.8.278 → 1.8.280

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.
@@ -86,7 +86,7 @@ import { PasswordModule } from 'primeng/password';
86
86
  import * as i3$2 from 'primeng/picklist';
87
87
  import { PickListModule } from 'primeng/picklist';
88
88
  import { ProgressBarModule } from 'primeng/progressbar';
89
- import * as i6$2 from 'primeng/radiobutton';
89
+ import * as i6$1 from 'primeng/radiobutton';
90
90
  import { RadioButtonModule } from 'primeng/radiobutton';
91
91
  import { RatingModule } from 'primeng/rating';
92
92
  import * as i12 from 'primeng/sidebar';
@@ -102,7 +102,7 @@ import { TagModule } from 'primeng/tag';
102
102
  import * as i15 from 'primeng/toast';
103
103
  import { ToastModule } from 'primeng/toast';
104
104
  import { ToolbarModule } from 'primeng/toolbar';
105
- import * as i1$7 from 'primeng/tree';
105
+ import * as i1$6 from 'primeng/tree';
106
106
  import { TreeModule } from 'primeng/tree';
107
107
  import * as i2$3 from 'primeng/selectbutton';
108
108
  import { SelectButtonModule } from 'primeng/selectbutton';
@@ -110,19 +110,16 @@ import * as i5$8 from 'primeng/stepper';
110
110
  import { StepperModule } from 'primeng/stepper';
111
111
  import { InputGroupModule } from 'primeng/inputgroup';
112
112
  import { InputGroupAddonModule } from 'primeng/inputgroupaddon';
113
- import * as i6$1 from 'primeng/slider';
114
113
  import { SliderModule } from 'primeng/slider';
115
- import * as i1$5 from 'projects/keevo-components/src/public-api';
116
- import { BaseComponentCrud as BaseComponentCrud$1, KvModalModule as KvModalModule$1, PrimeNgModule as PrimeNgModule$1 } from 'projects/keevo-components/src/public-api';
117
114
  import Quill from 'quill';
118
- import * as i1$6 from 'ngx-loading';
115
+ import * as i1$5 from 'ngx-loading';
119
116
  import { NgxLoadingModule } from 'ngx-loading';
120
117
  import { ProgressSpinnerModule } from 'primeng/progressspinner';
121
118
  import { OrgChart } from 'd3-org-chart';
122
119
  import * as d3 from 'd3';
123
120
  import { AutoCompleteModule } from 'primeng/autocomplete';
124
121
  import * as vkbeautify from 'vkbeautify';
125
- import * as i1$8 from '@angular/platform-browser';
122
+ import * as i1$7 from '@angular/platform-browser';
126
123
 
127
124
  class BaseComponentButton {
128
125
  constructor() {
@@ -3741,327 +3738,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImpor
3741
3738
  }]
3742
3739
  }] });
3743
3740
 
3744
- class KvLabelModule {
3745
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvLabelModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
3746
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.8", ngImport: i0, type: KvLabelModule, declarations: [KvLabelComponent], imports: [CommonModule], exports: [KvLabelComponent] }); }
3747
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvLabelModule, imports: [CommonModule] }); }
3748
- }
3749
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvLabelModule, decorators: [{
3750
- type: NgModule,
3751
- args: [{
3752
- declarations: [
3753
- KvLabelComponent
3754
- ],
3755
- imports: [
3756
- CommonModule
3757
- ],
3758
- exports: [
3759
- KvLabelComponent
3760
- ]
3761
- }]
3762
- }] });
3763
-
3764
- class KvModalComponent {
3765
- constructor(dynamicDialogRef) {
3766
- this.dynamicDialogRef = dynamicDialogRef;
3767
- /**
3768
- * Ações do Dialog
3769
- */
3770
- this.actions = [];
3771
- this.actionsPosition = 'right';
3772
- this.justify_content = 'justify-content-start';
3773
- }
3774
- ngOnInit() {
3775
- this.addSubTitle();
3776
- this.setMarginBottom();
3777
- this.defPositionButtons();
3778
- }
3779
- onWindowResize() {
3780
- this.setMarginBottom();
3781
- }
3782
- /**
3783
- * Adiciona sub-título à tela
3784
- */
3785
- addSubTitle() {
3786
- if (this.subtitle) {
3787
- const headerElement = document.querySelector('.p-dialog .p-dialog-header');
3788
- if (headerElement) {
3789
- const subtitleElement = document.createElement('span');
3790
- subtitleElement.textContent = this.subtitle;
3791
- subtitleElement.style.fontSize = '0.75rem';
3792
- subtitleElement.style.width = '100%';
3793
- subtitleElement.style.marginLeft = '2px';
3794
- headerElement.appendChild(subtitleElement);
3795
- }
3796
- if (this.subHeader) {
3797
- const headerElement = document.querySelector('.p-dialog .p-dialog-header');
3798
- const subHeader = this.subHeader.nativeElement;
3799
- if (headerElement && this.subHeader) {
3800
- subHeader.style.width = '100%';
3801
- subHeader.style.marginLeft = '2px';
3802
- headerElement.appendChild(this.subHeader.nativeElement);
3803
- }
3804
- }
3805
- }
3806
- }
3807
- defPositionButtons() {
3808
- if (this.actionsPosition === 'right') {
3809
- this.justify_content = 'justify-content-end';
3810
- }
3811
- if (this.actionsPosition === 'center') {
3812
- this.justify_content = 'justify-content-center';
3813
- }
3814
- if (this.actionsPosition === 'left') {
3815
- this.justify_content = 'justify-content-start';
3816
- }
3817
- }
3818
- setMarginBottom() {
3819
- let actionsFieldHeight = document.getElementById('actions-field')?.offsetHeight;
3820
- let divBox = document.getElementById('content-modal');
3821
- if (divBox) {
3822
- if (actionsFieldHeight) {
3823
- divBox.style.marginBottom = `${actionsFieldHeight + 30}px`;
3824
- }
3825
- else {
3826
- divBox.style.marginBottom = `50px`;
3827
- }
3828
- }
3829
- }
3830
- clickExecute(action) {
3831
- if (action.command) {
3832
- action.command();
3833
- if (action.closeAfterClick != false)
3834
- this.dynamicDialogRef.close();
3835
- }
3836
- }
3837
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvModalComponent, deps: [{ token: i1$3.DynamicDialogRef }], target: i0.ɵɵFactoryTarget.Component }); }
3838
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.8", type: KvModalComponent, selector: "kv-modal", inputs: { actions: "actions", actionsPosition: "actionsPosition", subtitle: "subtitle", subHeader: "subHeader" }, host: { listeners: { "window:resize": "onWindowResize($event)" } }, ngImport: i0, template: "<!-- RENDERIZA\u00C7\u00C3O DO MODAL -->\r\n<div class=\"col-12 mb-4\" id=\"content-modal\">\r\n <!-- COLOCAR UM COMPONENTE SUBHEADER AQUI -->\r\n\r\n <ng-content></ng-content>\r\n</div>\r\n\r\n<!-- RENDERIZA\u00C7\u00C3O DOS BOT\u00D5ES -->\r\n\r\n<div class=\"bg-white flex flex-row flex-wrap gap-2 p-2 modal-barra-acoes {{justify_content}}\" *ngIf=\"actions\" id=\"actions-field\">\r\n <kv-button\r\n *ngFor=\" let action of actions\"\r\n [ngClass]=\"action.visible==false?'hidden':''\"\r\n icon=\"{{action.icon}}\"\r\n label=\"{{action.label}}\"\r\n [disabled]=\"action.disabled || false\"\r\n (onClick)=\"clickExecute(action)\"\r\n [severity]=\"action.severity ||'primary'\"\r\n />\r\n</div>\r\n", styles: ["*{padding-bottom:0rem;padding-top:0rem}.barra-acoes{position:fixed;bottom:0;left:0;right:0;background-color:#fff;padding:10px;z-index:999}#page-form-container{padding-bottom:40px}@media screen and (max-width: 991px){#page-form-container{padding-bottom:100px}}.modal-barra-acoes{position:fixed;bottom:0;left:0;right:0;z-index:999;margin-right:1.5rem}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: KvButtonComponent, selector: "kv-button", inputs: ["label", "icon", "loading", "disabled", "severity", "size", "fullWidth"], outputs: ["onClick"] }] }); }
3839
- }
3840
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvModalComponent, decorators: [{
3841
- type: Component,
3842
- args: [{ selector: 'kv-modal', template: "<!-- RENDERIZA\u00C7\u00C3O DO MODAL -->\r\n<div class=\"col-12 mb-4\" id=\"content-modal\">\r\n <!-- COLOCAR UM COMPONENTE SUBHEADER AQUI -->\r\n\r\n <ng-content></ng-content>\r\n</div>\r\n\r\n<!-- RENDERIZA\u00C7\u00C3O DOS BOT\u00D5ES -->\r\n\r\n<div class=\"bg-white flex flex-row flex-wrap gap-2 p-2 modal-barra-acoes {{justify_content}}\" *ngIf=\"actions\" id=\"actions-field\">\r\n <kv-button\r\n *ngFor=\" let action of actions\"\r\n [ngClass]=\"action.visible==false?'hidden':''\"\r\n icon=\"{{action.icon}}\"\r\n label=\"{{action.label}}\"\r\n [disabled]=\"action.disabled || false\"\r\n (onClick)=\"clickExecute(action)\"\r\n [severity]=\"action.severity ||'primary'\"\r\n />\r\n</div>\r\n", styles: ["*{padding-bottom:0rem;padding-top:0rem}.barra-acoes{position:fixed;bottom:0;left:0;right:0;background-color:#fff;padding:10px;z-index:999}#page-form-container{padding-bottom:40px}@media screen and (max-width: 991px){#page-form-container{padding-bottom:100px}}.modal-barra-acoes{position:fixed;bottom:0;left:0;right:0;z-index:999;margin-right:1.5rem}\n"] }]
3843
- }], ctorParameters: () => [{ type: i1$3.DynamicDialogRef }], propDecorators: { actions: [{
3844
- type: Input
3845
- }], actionsPosition: [{
3846
- type: Input
3847
- }], subtitle: [{
3848
- type: Input
3849
- }], subHeader: [{
3850
- type: Input
3851
- }], onWindowResize: [{
3852
- type: HostListener,
3853
- args: ['window:resize', ['$event']]
3854
- }] } });
3855
-
3856
- class KvCropImageComponent extends BaseComponentCrud$1 {
3857
- onWindowResize() {
3858
- this.widthTela = window.innerWidth;
3859
- this.updateCanvasSize();
3860
- }
3861
- constructor(imageService, notificationService, dialogService, dynamicDialogRef, dynamicDialogConfig) {
3862
- super(dialogService, notificationService);
3863
- this.imageService = imageService;
3864
- this.notificationService = notificationService;
3865
- this.dialogService = dialogService;
3866
- this.dynamicDialogRef = dynamicDialogRef;
3867
- this.dynamicDialogConfig = dynamicDialogConfig;
3868
- this.imageLoaded = false;
3869
- this.imageX = 0;
3870
- this.imageY = 0;
3871
- this.startX = 0;
3872
- this.startY = 0;
3873
- this.valueZoom = 50;
3874
- this.scaleFactor = 1;
3875
- this.selectedImage = '';
3876
- this.actionsModal = [
3877
- {
3878
- label: 'Cancelar',
3879
- severity: 'tertiary',
3880
- icon: 'cancel',
3881
- command: (e) => {
3882
- this.dynamicDialogRef.close();
3883
- },
3884
- },
3885
- {
3886
- label: 'Recortar',
3887
- severity: 'primary',
3888
- icon: 'crop',
3889
- command: (e) => {
3890
- this.cropImage();
3891
- },
3892
- },
3893
- ];
3894
- this.widthTela = window.innerWidth;
3895
- this.selectedImage = this.dynamicDialogConfig.data.id.imagemSelecionada;
3896
- this.openCropModal();
3897
- }
3898
- openCropModal() {
3899
- setTimeout(() => {
3900
- const canvas = this.cropCanvas.nativeElement;
3901
- const ctx = canvas.getContext('2d');
3902
- const img = new Image();
3903
- img.src = this.selectedImage;
3904
- img.onload = () => {
3905
- this.imageLoaded = true;
3906
- this.imageX = (canvas.width - img.width * this.scaleFactor) / 2;
3907
- this.imageY = (canvas.height - img.height * this.scaleFactor) / 2;
3908
- canvas.width = this.retornaTamanhoCanvas();
3909
- canvas.height = 400;
3910
- this.redrawCanvas(ctx, img);
3911
- this.initializeImageMove(canvas, ctx, img);
3912
- this.initializeMouseWheel(canvas, ctx, img);
3913
- };
3914
- }, 0);
3915
- }
3916
- redrawCanvas(ctx, img) {
3917
- if (!ctx)
3918
- return;
3919
- ctx.clearRect(0, 0, ctx.canvas.width, ctx.canvas.height);
3920
- ctx.filter = 'blur(5px) opacity(0.9)';
3921
- ctx.drawImage(img, this.imageX, this.imageY, img.width * this.scaleFactor, img.height * this.scaleFactor);
3922
- ctx.filter = 'none';
3923
- this.drawImageInCropArea(ctx, img);
3924
- this.drawCropArea(ctx);
3925
- }
3926
- initializeImageMove(canvas, ctx, img) {
3927
- let isDragging = false;
3928
- canvas.style.cursor = 'grab';
3929
- canvas.onmousedown = (e) => {
3930
- isDragging = true;
3931
- canvas.style.cursor = 'grabbing';
3932
- this.startX = e.offsetX - this.imageX;
3933
- this.startY = e.offsetY - this.imageY;
3934
- };
3935
- canvas.onmousemove = (e) => {
3936
- if (isDragging) {
3937
- this.imageX = e.offsetX - this.startX;
3938
- this.imageY = e.offsetY - this.startY;
3939
- this.redrawCanvas(ctx, img);
3940
- }
3941
- };
3942
- canvas.onmouseup = () => {
3943
- isDragging = false;
3944
- canvas.style.cursor = 'grab';
3945
- };
3946
- canvas.onmouseout = () => {
3947
- isDragging = false;
3948
- canvas.style.cursor = 'grab';
3949
- };
3950
- }
3951
- initializeMouseWheel(canvas, ctx, img) {
3952
- canvas.onwheel = (e) => {
3953
- e.preventDefault();
3954
- const delta = e.deltaY > 0 ? -0.1 : 0.1;
3955
- this.scaleFactor = Math.min(Math.max(this.scaleFactor + delta, 0.1), 5); // limita o fator de escala entre 0.1 e 5
3956
- this.redrawCanvas(ctx, img);
3957
- this.valueZoom = this.scaleFactor * 50;
3958
- };
3959
- }
3960
- drawImageInCropArea(ctx, img) {
3961
- if (!ctx)
3962
- return;
3963
- // Calcula a posição da área de corte
3964
- const cropX = (ctx.canvas.width - 225) / 2;
3965
- const cropY = (ctx.canvas.height - 225) / 2;
3966
- // Desenha a imagem de não desfocada dentro da área de corte
3967
- ctx.save();
3968
- ctx.beginPath();
3969
- ctx.arc(cropX + 112.5, cropY + 112.5, 112.5, 0, Math.PI * 2, true);
3970
- ctx.clip();
3971
- ctx.drawImage(img, this.imageX, this.imageY, img.width * this.scaleFactor, img.height * this.scaleFactor);
3972
- ctx.restore();
3973
- }
3974
- drawCropArea(ctx) {
3975
- if (!ctx)
3976
- return;
3977
- ctx.beginPath();
3978
- const cropX = (ctx.canvas.width - 225) / 2;
3979
- const cropY = (ctx.canvas.height - 225) / 2;
3980
- ctx.arc(cropX + 112.5, cropY + 112.5, 112.5, 0, Math.PI * 2, true);
3981
- ctx.strokeStyle = 'transparent';
3982
- ctx.lineWidth = 2;
3983
- ctx.stroke();
3984
- }
3985
- updateCanvasSize() {
3986
- const canvas = this.cropCanvas.nativeElement;
3987
- const ctx = canvas.getContext('2d');
3988
- const img = new Image();
3989
- img.src = this.selectedImage;
3990
- img.onload = () => {
3991
- this.imageLoaded = true;
3992
- this.imageX = (canvas.width - img.width * this.scaleFactor) / 2;
3993
- this.imageY = (canvas.height - img.height * this.scaleFactor) / 2;
3994
- canvas.width = this.retornaTamanhoCanvas();
3995
- canvas.height = 400;
3996
- this.redrawCanvas(ctx, img);
3997
- };
3998
- }
3999
- onZoomChange(event) {
4000
- const canvas = this.cropCanvas.nativeElement;
4001
- const ctx = canvas.getContext('2d');
4002
- const img = new Image();
4003
- img.src = this.selectedImage;
4004
- img.onload = () => {
4005
- this.scaleFactor = event.value / 50;
4006
- this.redrawCanvas(ctx, img);
4007
- };
4008
- }
4009
- cropImage() {
4010
- const canvas = this.cropCanvas.nativeElement;
4011
- const ctx = canvas.getContext('2d');
4012
- if (ctx) {
4013
- const centerX = canvas.width / 2;
4014
- const centerY = canvas.height / 2;
4015
- const radius = 100;
4016
- const imageData = ctx.getImageData(centerX - radius, centerY - radius, radius * 2, radius * 2);
4017
- const newCanvas = document.createElement('canvas');
4018
- const newCtx = newCanvas.getContext('2d');
4019
- newCanvas.width = radius * 2;
4020
- newCanvas.height = radius * 2;
4021
- newCtx?.putImageData(imageData, 0, 0);
4022
- this.selectedImage = newCanvas.toDataURL();
4023
- this.enviarDados();
4024
- this.dynamicDialogRef.close(this.selectedImage);
4025
- }
4026
- }
4027
- enviarDados() {
4028
- const arr = this.dialogService.dialogComponentRefMap;
4029
- const entries = arr.entries();
4030
- const firstEntry = entries.next().value;
4031
- const [firstKey, firstValue] = firstEntry;
4032
- const instance = this.dialogService.getInstance(firstKey);
4033
- instance.config.data.id.imagemCortada = this.selectedImage;
4034
- }
4035
- retornaTamanhoCanvas() {
4036
- if (this.widthTela < 500) {
4037
- return this.widthTela * 0.7;
4038
- }
4039
- return this.widthTela * 0.4;
4040
- }
4041
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvCropImageComponent, deps: [{ token: i1$5.ImagensService }, { token: i1$5.NotificationService }, { token: i1$3.DialogService }, { token: i1$3.DynamicDialogRef }, { token: i1$3.DynamicDialogConfig }], target: i0.ɵɵFactoryTarget.Component }); }
4042
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.8", type: KvCropImageComponent, isStandalone: true, selector: "kv-crop-image", host: { listeners: { "window:resize": "onWindowResize($event)" } }, viewQueries: [{ propertyName: "cropCanvas", first: true, predicate: ["cropCanvas"], descendants: true }, { propertyName: "fileInput", first: true, predicate: ["fileInput"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<kv-modal [actions]=\"actionsModal\">\r\n <div class=\"crop-container\">\r\n <canvas #cropCanvas class=\"crop-canvas\"></canvas>\r\n <div class=\"crop-border\"></div>\r\n </div>\r\n \r\n <div class=\"w-full zoom-container\">\r\n <kv-label label=\"Zoom\" style=\"text-align: left;\"/>\r\n <p-slider [(ngModel)]=\"valueZoom\" (onChange)=\"onZoomChange($event)\"></p-slider>\r\n </div>\r\n</kv-modal>\r\n", styles: [".crop-container{display:flex;justify-content:center;align-items:center}.crop-canvas{border:1px solid black;border-radius:12px}.crop-border{position:absolute;width:225px;height:225px;border:2px solid black;border-radius:50%;pointer-events:none}.zoom-container{padding-top:20px;padding-bottom:20px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: KvModalModule$1 }, { kind: "component", type: KvModalComponent, selector: "kv-modal", inputs: ["actions", "actionsPosition", "subtitle", "subHeader"] }, { kind: "ngmodule", type: PrimeNgModule$1 }, { kind: "ngmodule", type: KvLabelModule }, { kind: "component", type: KvLabelComponent, selector: "kv-label", inputs: ["componentId", "label"] }, { kind: "ngmodule", type: SliderModule }, { kind: "component", type: i6$1.Slider, selector: "p-slider", inputs: ["animate", "disabled", "min", "max", "orientation", "step", "range", "style", "styleClass", "ariaLabel", "ariaLabelledBy", "tabindex", "autofocus"], outputs: ["onChange", "onSlideEnd"] }] }); }
4043
- }
4044
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvCropImageComponent, decorators: [{
4045
- type: Component,
4046
- args: [{ selector: 'kv-crop-image', standalone: true, imports: [
4047
- CommonModule,
4048
- FormsModule,
4049
- KvModalModule$1,
4050
- PrimeNgModule$1,
4051
- KvLabelModule,
4052
- SliderModule
4053
- ], template: "<kv-modal [actions]=\"actionsModal\">\r\n <div class=\"crop-container\">\r\n <canvas #cropCanvas class=\"crop-canvas\"></canvas>\r\n <div class=\"crop-border\"></div>\r\n </div>\r\n \r\n <div class=\"w-full zoom-container\">\r\n <kv-label label=\"Zoom\" style=\"text-align: left;\"/>\r\n <p-slider [(ngModel)]=\"valueZoom\" (onChange)=\"onZoomChange($event)\"></p-slider>\r\n </div>\r\n</kv-modal>\r\n", styles: [".crop-container{display:flex;justify-content:center;align-items:center}.crop-canvas{border:1px solid black;border-radius:12px}.crop-border{position:absolute;width:225px;height:225px;border:2px solid black;border-radius:50%;pointer-events:none}.zoom-container{padding-top:20px;padding-bottom:20px}\n"] }]
4054
- }], ctorParameters: () => [{ type: i1$5.ImagensService }, { type: i1$5.NotificationService }, { type: i1$3.DialogService }, { type: i1$3.DynamicDialogRef }, { type: i1$3.DynamicDialogConfig }], propDecorators: { onWindowResize: [{
4055
- type: HostListener,
4056
- args: ['window:resize', ['$event']]
4057
- }], cropCanvas: [{
4058
- type: ViewChild,
4059
- args: ['cropCanvas']
4060
- }], fileInput: [{
4061
- type: ViewChild,
4062
- args: ['fileInput']
4063
- }] } });
4064
-
3741
+ // import { KvCropImageComponent } from './kv-crop-image/kv-crop-image.component';
4065
3742
  class KvAvatarComponent extends BaseComponentCrud {
4066
3743
  constructor(imageService, notificationService, dialogService) {
4067
3744
  super(dialogService, notificationService);
@@ -4111,7 +3788,7 @@ class KvAvatarComponent extends BaseComponentCrud {
4111
3788
  reader.readAsDataURL(file);
4112
3789
  reader.onload = () => {
4113
3790
  this.selectedImage = reader.result;
4114
- this.abrirModalRecortarFoto();
3791
+ // this.abrirModalRecortarFoto();
4115
3792
  this.existeLogo = false;
4116
3793
  };
4117
3794
  }
@@ -4138,24 +3815,28 @@ class KvAvatarComponent extends BaseComponentCrud {
4138
3815
  handleImageError(event) {
4139
3816
  event.target.src = this.imageService.userDefaultImage();
4140
3817
  }
4141
- abrirModalRecortarFoto() {
4142
- this.openDialog(KvCropImageComponent, () => {
4143
- this.imageUrl = this.receberDados();
4144
- this.imageSource.set(this.receberDados());
4145
- this.imageUrlChange.emit(this.imageSource());
4146
- this.existeLogo = true;
4147
- }, {
4148
- maximizable: false,
4149
- popup: true,
4150
- width: '60%',
4151
- header: 'Recortar',
4152
- id: { imagemSelecionada: this.selectedImage, imagemCortada: '' }
4153
- });
4154
- const [firstKey] = this.dialogService.dialogComponentRefMap.entries().next().value;
4155
- const instance = this.dialogService.getInstance(firstKey);
4156
- instance.config.showHeader = false;
4157
- instance.config.contentStyle = { 'border-radius': '12px' };
4158
- }
3818
+ // abrirModalRecortarFoto() {
3819
+ // this.openDialog(
3820
+ // KvCropImageComponent,
3821
+ // () => {
3822
+ // this.imageUrl = this.receberDados();
3823
+ // this.imageSource.set(this.receberDados() as string)
3824
+ // this.imageUrlChange.emit(this.imageSource());
3825
+ // this.existeLogo = true;
3826
+ // },
3827
+ // {
3828
+ // maximizable: false,
3829
+ // popup: true,
3830
+ // width: '60%',
3831
+ // header: 'Recortar',
3832
+ // id:{imagemSelecionada: this.selectedImage, imagemCortada: ''}
3833
+ // }
3834
+ // )
3835
+ // const [firstKey] = this.dialogService.dialogComponentRefMap.entries().next().value;
3836
+ // const instance = this.dialogService.getInstance(firstKey);
3837
+ // instance.config.showHeader = false;
3838
+ // instance.config.contentStyle = { 'border-radius': '12px' };
3839
+ // }
4159
3840
  receberDados() {
4160
3841
  const [firstKey] = this.dialogService.dialogComponentRefMap.entries().next().value;
4161
3842
  const instance = this.dialogService.getInstance(firstKey);
@@ -4211,6 +3892,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImpor
4211
3892
  }]
4212
3893
  }] });
4213
3894
 
3895
+ class KvLabelModule {
3896
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvLabelModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
3897
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.8", ngImport: i0, type: KvLabelModule, declarations: [KvLabelComponent], imports: [CommonModule], exports: [KvLabelComponent] }); }
3898
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvLabelModule, imports: [CommonModule] }); }
3899
+ }
3900
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvLabelModule, decorators: [{
3901
+ type: NgModule,
3902
+ args: [{
3903
+ declarations: [
3904
+ KvLabelComponent
3905
+ ],
3906
+ imports: [
3907
+ CommonModule
3908
+ ],
3909
+ exports: [
3910
+ KvLabelComponent
3911
+ ]
3912
+ }]
3913
+ }] });
3914
+
4214
3915
  class KvAvatarModule {
4215
3916
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvAvatarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
4216
3917
  static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.8", ngImport: i0, type: KvAvatarModule, declarations: [KvAvatarComponent], imports: [CommonModule,
@@ -4923,7 +4624,7 @@ class KvRadioGroupComponent extends BaseComponentInput {
4923
4624
  this.onSelectedOption.emit(event.value[this.optionValue]);
4924
4625
  }
4925
4626
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvRadioGroupComponent, deps: [{ token: ComponentService }], target: i0.ɵɵFactoryTarget.Component }); }
4926
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.8", type: KvRadioGroupComponent, selector: "kv-radio-group", inputs: { options: "options", optionValue: "optionValue", optionLabel: "optionLabel", optionValueDefault: "optionValueDefault", vertical: "vertical" }, outputs: { onSelectedOption: "onSelectedOption" }, providers: ComponentProviders(KvRadioGroupComponent), usesInheritance: true, ngImport: i0, template: "<kv-label [label]=\"label && label + (showAsterisk ? '*' : '')\" />\r\n<div [class.vertical-radio-group]=\"vertical\">\r\n <div class=\"option\" *ngFor=\"let option of options; let isFirst = first\">\r\n <p-radioButton\r\n [inputId]=\"option[optionValue]\"\r\n name=\"option\"\r\n [value]=\"option\"\r\n [(ngModel)]=\"selectedOpt\"\r\n (onClick)=\"selectedOption($event)\"\r\n [disabled]=\"disabled\"\r\n [class.ml-3]=\"!isFirst && !vertical\"\r\n >\r\n </p-radioButton>\r\n <label [for]=\"option[optionValue]\" class=\"radio-option-label\">\r\n {{ option[optionLabel] }}</label\r\n >\r\n </div>\r\n <kv-error [hasError]=\"hasControlError()\">{{ erroMessage() }}</kv-error>\r\n</div>\r\n", styles: [".option{display:inline-block;margin:0;height:35px;padding-top:.75rem}.vertical-radio-group{display:flex;flex-direction:column}.radio-option-label{font-size:1rem}::ng-deep .p-radiobutton .p-radiobutton-box.p-highlight{border-color:#004172;background:#004172}\n", "@charset \"UTF-8\";@import\"https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap\";@import\"https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap\";@import\"https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0\";.material-symbols-outlined{font-family:Material Symbols Outlined!important}*{font-family:Inter var,Inter,sans-serif!important}::ng-deep .p-accordion,::ng-deep .p-accordion-header,::ng-deep .p-accordion-content,::ng-deep .p-badge,::ng-deep .p-overlay-badge,::ng-deep .p-breadcrumb,::ng-deep .p-breadcrumb-item,::ng-deep .p-breadcrumb-link,::ng-deep .p-button,::ng-deep .p-calendar,::ng-deep .p-card,::ng-deep .p-card-title,::ng-deep .p-card-subtitle,::ng-deep .p-card-content,::ng-deep .p-checkbox,::ng-deep .p-chip,::ng-deep .p-confirm-dialog,::ng-deep .p-confirm-dialog-message,::ng-deep .p-contextmenu,::ng-deep .p-contextmenu-item,::ng-deep .p-dataview,::ng-deep .p-dataview-content,::ng-deep .p-dialog,::ng-deep .p-dialog-title,::ng-deep .p-dialog-content,::ng-deep .p-dropdown,::ng-deep .p-dropdown-label,::ng-deep .p-dropdown-item,::ng-deep .p-dynamic-dialog,::ng-deep .p-dynamic-dialog-title,::ng-deep .p-dynamic-dialog-content,::ng-deep .p-editor,::ng-deep .p-fieldset,::ng-deep .p-fieldset-legend,::ng-deep .p-fieldset-content,::ng-deep .p-fileupload,::ng-deep .p-inputmask,::ng-deep .p-inputnumber,::ng-deep .p-inputtextarea,::ng-deep .p-inputtext,::ng-deep .p-menu,::ng-deep .p-menuitem,::ng-deep .p-menuitem-text,::ng-deep .p-message,::ng-deep .p-messages,::ng-deep .p-multiselect,::ng-deep .p-multiselect-label,::ng-deep .p-multiselect-item,::ng-deep .p-panelmenu,::ng-deep .p-panelmenu-header,::ng-deep .p-panelmenu-content,::ng-deep .p-panel,::ng-deep .p-panel-header,::ng-deep .p-panel-content,::ng-deep .p-password,::ng-deep .p-picklist,::ng-deep .p-progressbar,::ng-deep .p-radiobutton,::ng-deep .p-rating,::ng-deep .p-sidebar,::ng-deep .p-splitbutton,::ng-deep .p-steps,::ng-deep .p-step,::ng-deep .p-table,::ng-deep .p-datatable,::ng-deep .p-tabview,::ng-deep .p-tabpanel,::ng-deep .p-tag,::ng-deep .p-toast,::ng-deep .p-toolbar,::ng-deep .p-tooltip,::ng-deep .p-tree,::ng-deep .p-treetable,::ng-deep .p-selectbutton,::ng-deep .p-stepper,::ng-deep .p-inputgroup,::ng-deep .p-inputgroup-addon,::ng-deep .p-text{font-family:Inter var,Inter,sans-serif!important}:host ::ng-deep .inputs{height:35px}:root{--kv-primary-color: #29b92d, --kv-secondary-color: #002542, --kv-terciary-color: #f2f3f5, --kv-primary-hover-color: #249a29, --kv-secondary-hover-color: #002038, --kv-terciary-hover-color: #d9dadb, --kv-primary-active-color: #1c801f, --kv-secondary-active-color: #001729, --kv-terciary-active-color: #c0c1c2, --kv-primary-disable-color: #1c801f, --kv-secondary-disable-color: #001729, --kv-terciary-disable-color: #c0c1c2, }::ng-deep .p-dialog .p-dialog-header{color:#fff!important;background:#002542!important;display:flex!important;flex-wrap:wrap;word-wrap:break-word}::ng-deep .p-dialog .p-dialog-content{padding-top:1rem}::ng-deep .p-dialog{min-width:320px}::ng-deep .p-dialog-content{overflow-x:hidden}::ng-deep .p-dialog-content::-webkit-scrollbar{width:8px}::ng-deep .p-dialog-content::-webkit-scrollbar:hover{background-color:#dededebf}::ng-deep .p-dialog-content::-webkit-scrollbar-thumb{border-radius:4px;background-color:transparent}::ng-deep .p-dialog-content:hover::-webkit-scrollbar-thumb{border-left:2px solid white;background-color:#00000080}::ng-deep .p-dialog-content::-webkit-scrollbar-track{border-left:2px solid white;background-color:#dededebf}::ng-deep .p-dialog-footer{display:flex;justify-content:flex-end;padding:10px;gap:10px}::ng-deep .p-dialog .p-dialog-header .p-dialog-header-icon{display:none}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: KvErrorComponent, selector: "kv-error", inputs: ["formControl", "hasError"] }, { kind: "component", type: KvLabelComponent, selector: "kv-label", inputs: ["componentId", "label"] }, { kind: "component", type: i6$2.RadioButton, selector: "p-radioButton", inputs: ["value", "formControlName", "name", "disabled", "label", "variant", "tabindex", "inputId", "ariaLabelledBy", "ariaLabel", "style", "styleClass", "labelStyleClass", "autofocus"], outputs: ["onClick", "onFocus", "onBlur"] }] }); }
4627
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.8", type: KvRadioGroupComponent, selector: "kv-radio-group", inputs: { options: "options", optionValue: "optionValue", optionLabel: "optionLabel", optionValueDefault: "optionValueDefault", vertical: "vertical" }, outputs: { onSelectedOption: "onSelectedOption" }, providers: ComponentProviders(KvRadioGroupComponent), usesInheritance: true, ngImport: i0, template: "<kv-label [label]=\"label && label + (showAsterisk ? '*' : '')\" />\r\n<div [class.vertical-radio-group]=\"vertical\">\r\n <div class=\"option\" *ngFor=\"let option of options; let isFirst = first\">\r\n <p-radioButton\r\n [inputId]=\"option[optionValue]\"\r\n name=\"option\"\r\n [value]=\"option\"\r\n [(ngModel)]=\"selectedOpt\"\r\n (onClick)=\"selectedOption($event)\"\r\n [disabled]=\"disabled\"\r\n [class.ml-3]=\"!isFirst && !vertical\"\r\n >\r\n </p-radioButton>\r\n <label [for]=\"option[optionValue]\" class=\"radio-option-label\">\r\n {{ option[optionLabel] }}</label\r\n >\r\n </div>\r\n <kv-error [hasError]=\"hasControlError()\">{{ erroMessage() }}</kv-error>\r\n</div>\r\n", styles: [".option{display:inline-block;margin:0;height:35px;padding-top:.75rem}.vertical-radio-group{display:flex;flex-direction:column}.radio-option-label{font-size:1rem}::ng-deep .p-radiobutton .p-radiobutton-box.p-highlight{border-color:#004172;background:#004172}\n", "@charset \"UTF-8\";@import\"https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap\";@import\"https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap\";@import\"https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0\";.material-symbols-outlined{font-family:Material Symbols Outlined!important}*{font-family:Inter var,Inter,sans-serif!important}::ng-deep .p-accordion,::ng-deep .p-accordion-header,::ng-deep .p-accordion-content,::ng-deep .p-badge,::ng-deep .p-overlay-badge,::ng-deep .p-breadcrumb,::ng-deep .p-breadcrumb-item,::ng-deep .p-breadcrumb-link,::ng-deep .p-button,::ng-deep .p-calendar,::ng-deep .p-card,::ng-deep .p-card-title,::ng-deep .p-card-subtitle,::ng-deep .p-card-content,::ng-deep .p-checkbox,::ng-deep .p-chip,::ng-deep .p-confirm-dialog,::ng-deep .p-confirm-dialog-message,::ng-deep .p-contextmenu,::ng-deep .p-contextmenu-item,::ng-deep .p-dataview,::ng-deep .p-dataview-content,::ng-deep .p-dialog,::ng-deep .p-dialog-title,::ng-deep .p-dialog-content,::ng-deep .p-dropdown,::ng-deep .p-dropdown-label,::ng-deep .p-dropdown-item,::ng-deep .p-dynamic-dialog,::ng-deep .p-dynamic-dialog-title,::ng-deep .p-dynamic-dialog-content,::ng-deep .p-editor,::ng-deep .p-fieldset,::ng-deep .p-fieldset-legend,::ng-deep .p-fieldset-content,::ng-deep .p-fileupload,::ng-deep .p-inputmask,::ng-deep .p-inputnumber,::ng-deep .p-inputtextarea,::ng-deep .p-inputtext,::ng-deep .p-menu,::ng-deep .p-menuitem,::ng-deep .p-menuitem-text,::ng-deep .p-message,::ng-deep .p-messages,::ng-deep .p-multiselect,::ng-deep .p-multiselect-label,::ng-deep .p-multiselect-item,::ng-deep .p-panelmenu,::ng-deep .p-panelmenu-header,::ng-deep .p-panelmenu-content,::ng-deep .p-panel,::ng-deep .p-panel-header,::ng-deep .p-panel-content,::ng-deep .p-password,::ng-deep .p-picklist,::ng-deep .p-progressbar,::ng-deep .p-radiobutton,::ng-deep .p-rating,::ng-deep .p-sidebar,::ng-deep .p-splitbutton,::ng-deep .p-steps,::ng-deep .p-step,::ng-deep .p-table,::ng-deep .p-datatable,::ng-deep .p-tabview,::ng-deep .p-tabpanel,::ng-deep .p-tag,::ng-deep .p-toast,::ng-deep .p-toolbar,::ng-deep .p-tooltip,::ng-deep .p-tree,::ng-deep .p-treetable,::ng-deep .p-selectbutton,::ng-deep .p-stepper,::ng-deep .p-inputgroup,::ng-deep .p-inputgroup-addon,::ng-deep .p-text{font-family:Inter var,Inter,sans-serif!important}:host ::ng-deep .inputs{height:35px}:root{--kv-primary-color: #29b92d, --kv-secondary-color: #002542, --kv-terciary-color: #f2f3f5, --kv-primary-hover-color: #249a29, --kv-secondary-hover-color: #002038, --kv-terciary-hover-color: #d9dadb, --kv-primary-active-color: #1c801f, --kv-secondary-active-color: #001729, --kv-terciary-active-color: #c0c1c2, --kv-primary-disable-color: #1c801f, --kv-secondary-disable-color: #001729, --kv-terciary-disable-color: #c0c1c2, }::ng-deep .p-dialog .p-dialog-header{color:#fff!important;background:#002542!important;display:flex!important;flex-wrap:wrap;word-wrap:break-word}::ng-deep .p-dialog .p-dialog-content{padding-top:1rem}::ng-deep .p-dialog{min-width:320px}::ng-deep .p-dialog-content{overflow-x:hidden}::ng-deep .p-dialog-content::-webkit-scrollbar{width:8px}::ng-deep .p-dialog-content::-webkit-scrollbar:hover{background-color:#dededebf}::ng-deep .p-dialog-content::-webkit-scrollbar-thumb{border-radius:4px;background-color:transparent}::ng-deep .p-dialog-content:hover::-webkit-scrollbar-thumb{border-left:2px solid white;background-color:#00000080}::ng-deep .p-dialog-content::-webkit-scrollbar-track{border-left:2px solid white;background-color:#dededebf}::ng-deep .p-dialog-footer{display:flex;justify-content:flex-end;padding:10px;gap:10px}::ng-deep .p-dialog .p-dialog-header .p-dialog-header-icon{display:none}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: KvErrorComponent, selector: "kv-error", inputs: ["formControl", "hasError"] }, { kind: "component", type: KvLabelComponent, selector: "kv-label", inputs: ["componentId", "label"] }, { kind: "component", type: i6$1.RadioButton, selector: "p-radioButton", inputs: ["value", "formControlName", "name", "disabled", "label", "variant", "tabindex", "inputId", "ariaLabelledBy", "ariaLabel", "style", "styleClass", "labelStyleClass", "autofocus"], outputs: ["onClick", "onFocus", "onBlur"] }] }); }
4927
4628
  }
4928
4629
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvRadioGroupComponent, decorators: [{
4929
4630
  type: Component,
@@ -5113,7 +4814,7 @@ class KvLoaderComponent {
5113
4814
  this.loading = KvLoaderService.isLoading;
5114
4815
  }
5115
4816
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvLoaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
5116
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.8", type: KvLoaderComponent, selector: "kv-loader", ngImport: i0, template: "<ngx-loading [show]=\"(loading | async) || false\"></ngx-loading>\r\n", dependencies: [{ kind: "component", type: i1$6.NgxLoadingComponent, selector: "ngx-loading", inputs: ["show", "config", "template"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }] }); }
4817
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.8", type: KvLoaderComponent, selector: "kv-loader", ngImport: i0, template: "<ngx-loading [show]=\"(loading | async) || false\"></ngx-loading>\r\n", dependencies: [{ kind: "component", type: i1$5.NgxLoadingComponent, selector: "ngx-loading", inputs: ["show", "config", "template"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }] }); }
5117
4818
  }
5118
4819
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvLoaderComponent, decorators: [{
5119
4820
  type: Component,
@@ -5122,7 +4823,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImpor
5122
4823
 
5123
4824
  class KvLoaderModule {
5124
4825
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvLoaderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
5125
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.8", ngImport: i0, type: KvLoaderModule, declarations: [KvLoaderComponent], imports: [CommonModule, i1$6.NgxLoadingModule], exports: [KvLoaderComponent] }); }
4826
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.8", ngImport: i0, type: KvLoaderModule, declarations: [KvLoaderComponent], imports: [CommonModule, i1$5.NgxLoadingModule], exports: [KvLoaderComponent] }); }
5126
4827
  static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvLoaderModule, imports: [CommonModule,
5127
4828
  NgxLoadingModule.forRoot({
5128
4829
  fullScreenBackdrop: true
@@ -5533,6 +5234,98 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImpor
5533
5234
  }]
5534
5235
  }] });
5535
5236
 
5237
+ class KvModalComponent {
5238
+ constructor(dynamicDialogRef) {
5239
+ this.dynamicDialogRef = dynamicDialogRef;
5240
+ /**
5241
+ * Ações do Dialog
5242
+ */
5243
+ this.actions = [];
5244
+ this.actionsPosition = 'right';
5245
+ this.justify_content = 'justify-content-start';
5246
+ }
5247
+ ngOnInit() {
5248
+ this.addSubTitle();
5249
+ this.setMarginBottom();
5250
+ this.defPositionButtons();
5251
+ }
5252
+ onWindowResize() {
5253
+ this.setMarginBottom();
5254
+ }
5255
+ /**
5256
+ * Adiciona sub-título à tela
5257
+ */
5258
+ addSubTitle() {
5259
+ if (this.subtitle) {
5260
+ const headerElement = document.querySelector('.p-dialog .p-dialog-header');
5261
+ if (headerElement) {
5262
+ const subtitleElement = document.createElement('span');
5263
+ subtitleElement.textContent = this.subtitle;
5264
+ subtitleElement.style.fontSize = '0.75rem';
5265
+ subtitleElement.style.width = '100%';
5266
+ subtitleElement.style.marginLeft = '2px';
5267
+ headerElement.appendChild(subtitleElement);
5268
+ }
5269
+ if (this.subHeader) {
5270
+ const headerElement = document.querySelector('.p-dialog .p-dialog-header');
5271
+ const subHeader = this.subHeader.nativeElement;
5272
+ if (headerElement && this.subHeader) {
5273
+ subHeader.style.width = '100%';
5274
+ subHeader.style.marginLeft = '2px';
5275
+ headerElement.appendChild(this.subHeader.nativeElement);
5276
+ }
5277
+ }
5278
+ }
5279
+ }
5280
+ defPositionButtons() {
5281
+ if (this.actionsPosition === 'right') {
5282
+ this.justify_content = 'justify-content-end';
5283
+ }
5284
+ if (this.actionsPosition === 'center') {
5285
+ this.justify_content = 'justify-content-center';
5286
+ }
5287
+ if (this.actionsPosition === 'left') {
5288
+ this.justify_content = 'justify-content-start';
5289
+ }
5290
+ }
5291
+ setMarginBottom() {
5292
+ let actionsFieldHeight = document.getElementById('actions-field')?.offsetHeight;
5293
+ let divBox = document.getElementById('content-modal');
5294
+ if (divBox) {
5295
+ if (actionsFieldHeight) {
5296
+ divBox.style.marginBottom = `${actionsFieldHeight + 30}px`;
5297
+ }
5298
+ else {
5299
+ divBox.style.marginBottom = `50px`;
5300
+ }
5301
+ }
5302
+ }
5303
+ clickExecute(action) {
5304
+ if (action.command) {
5305
+ action.command();
5306
+ if (action.closeAfterClick != false)
5307
+ this.dynamicDialogRef.close();
5308
+ }
5309
+ }
5310
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvModalComponent, deps: [{ token: i1$3.DynamicDialogRef }], target: i0.ɵɵFactoryTarget.Component }); }
5311
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.8", type: KvModalComponent, selector: "kv-modal", inputs: { actions: "actions", actionsPosition: "actionsPosition", subtitle: "subtitle", subHeader: "subHeader" }, host: { listeners: { "window:resize": "onWindowResize($event)" } }, ngImport: i0, template: "<!-- RENDERIZA\u00C7\u00C3O DO MODAL -->\r\n<div class=\"col-12 mb-4\" id=\"content-modal\">\r\n <!-- COLOCAR UM COMPONENTE SUBHEADER AQUI -->\r\n\r\n <ng-content></ng-content>\r\n</div>\r\n\r\n<!-- RENDERIZA\u00C7\u00C3O DOS BOT\u00D5ES -->\r\n\r\n<div class=\"bg-white flex flex-row flex-wrap gap-2 p-2 modal-barra-acoes {{justify_content}}\" *ngIf=\"actions\" id=\"actions-field\">\r\n <kv-button\r\n *ngFor=\" let action of actions\"\r\n [ngClass]=\"action.visible==false?'hidden':''\"\r\n icon=\"{{action.icon}}\"\r\n label=\"{{action.label}}\"\r\n [disabled]=\"action.disabled || false\"\r\n (onClick)=\"clickExecute(action)\"\r\n [severity]=\"action.severity ||'primary'\"\r\n />\r\n</div>\r\n", styles: ["*{padding-bottom:0rem;padding-top:0rem}.barra-acoes{position:fixed;bottom:0;left:0;right:0;background-color:#fff;padding:10px;z-index:999}#page-form-container{padding-bottom:40px}@media screen and (max-width: 991px){#page-form-container{padding-bottom:100px}}.modal-barra-acoes{position:fixed;bottom:0;left:0;right:0;z-index:999;margin-right:1.5rem}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: KvButtonComponent, selector: "kv-button", inputs: ["label", "icon", "loading", "disabled", "severity", "size", "fullWidth"], outputs: ["onClick"] }] }); }
5312
+ }
5313
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvModalComponent, decorators: [{
5314
+ type: Component,
5315
+ args: [{ selector: 'kv-modal', template: "<!-- RENDERIZA\u00C7\u00C3O DO MODAL -->\r\n<div class=\"col-12 mb-4\" id=\"content-modal\">\r\n <!-- COLOCAR UM COMPONENTE SUBHEADER AQUI -->\r\n\r\n <ng-content></ng-content>\r\n</div>\r\n\r\n<!-- RENDERIZA\u00C7\u00C3O DOS BOT\u00D5ES -->\r\n\r\n<div class=\"bg-white flex flex-row flex-wrap gap-2 p-2 modal-barra-acoes {{justify_content}}\" *ngIf=\"actions\" id=\"actions-field\">\r\n <kv-button\r\n *ngFor=\" let action of actions\"\r\n [ngClass]=\"action.visible==false?'hidden':''\"\r\n icon=\"{{action.icon}}\"\r\n label=\"{{action.label}}\"\r\n [disabled]=\"action.disabled || false\"\r\n (onClick)=\"clickExecute(action)\"\r\n [severity]=\"action.severity ||'primary'\"\r\n />\r\n</div>\r\n", styles: ["*{padding-bottom:0rem;padding-top:0rem}.barra-acoes{position:fixed;bottom:0;left:0;right:0;background-color:#fff;padding:10px;z-index:999}#page-form-container{padding-bottom:40px}@media screen and (max-width: 991px){#page-form-container{padding-bottom:100px}}.modal-barra-acoes{position:fixed;bottom:0;left:0;right:0;z-index:999;margin-right:1.5rem}\n"] }]
5316
+ }], ctorParameters: () => [{ type: i1$3.DynamicDialogRef }], propDecorators: { actions: [{
5317
+ type: Input
5318
+ }], actionsPosition: [{
5319
+ type: Input
5320
+ }], subtitle: [{
5321
+ type: Input
5322
+ }], subHeader: [{
5323
+ type: Input
5324
+ }], onWindowResize: [{
5325
+ type: HostListener,
5326
+ args: ['window:resize', ['$event']]
5327
+ }] } });
5328
+
5536
5329
  class KvModalModule {
5537
5330
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvModalModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
5538
5331
  static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.8", ngImport: i0, type: KvModalModule, declarations: [KvModalComponent], imports: [CommonModule, PrimeNgModule, KvButtonModule], exports: [KvModalComponent] }); }
@@ -6460,7 +6253,7 @@ class KvTreeViewComponent {
6460
6253
  this.selectedItems.emit(this.selectedFiles);
6461
6254
  }
6462
6255
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvTreeViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
6463
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.8", type: KvTreeViewComponent, selector: "kv-tree-view", inputs: { selectedFiles: "selectedFiles", selectionMode: "selectionMode", treeViewData: "treeViewData" }, outputs: { selectedItems: "selectedItems" }, ngImport: i0, template: "<div class=\"card flex flex-column align-items-center justify-content-center\">\r\n <p-tree\r\n [value]=\"treeViewData\"\r\n [selectionMode]=\"selectionMode\"\r\n class=\"w-full\"\r\n [(selection)]=\"selectedFiles\"\r\n (selectionChange)=\"onSelectionChange()\"\r\n ></p-tree>\r\n</div>", styles: [""], dependencies: [{ kind: "component", type: i1$7.Tree, selector: "p-tree", inputs: ["value", "selectionMode", "loadingMode", "selection", "style", "styleClass", "contextMenu", "layout", "draggableScope", "droppableScope", "draggableNodes", "droppableNodes", "metaKeySelection", "propagateSelectionUp", "propagateSelectionDown", "loading", "loadingIcon", "emptyMessage", "ariaLabel", "togglerAriaLabel", "ariaLabelledBy", "validateDrop", "filter", "filterBy", "filterMode", "filterPlaceholder", "filteredNodes", "filterLocale", "scrollHeight", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "indentation", "_templateMap", "trackBy", "virtualNodeHeight"], outputs: ["selectionChange", "onNodeSelect", "onNodeUnselect", "onNodeExpand", "onNodeCollapse", "onNodeContextMenuSelect", "onNodeDrop", "onLazyLoad", "onScroll", "onScrollIndexChange", "onFilter"] }] }); }
6256
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.8", type: KvTreeViewComponent, selector: "kv-tree-view", inputs: { selectedFiles: "selectedFiles", selectionMode: "selectionMode", treeViewData: "treeViewData" }, outputs: { selectedItems: "selectedItems" }, ngImport: i0, template: "<div class=\"card flex flex-column align-items-center justify-content-center\">\r\n <p-tree\r\n [value]=\"treeViewData\"\r\n [selectionMode]=\"selectionMode\"\r\n class=\"w-full\"\r\n [(selection)]=\"selectedFiles\"\r\n (selectionChange)=\"onSelectionChange()\"\r\n ></p-tree>\r\n</div>", styles: [""], dependencies: [{ kind: "component", type: i1$6.Tree, selector: "p-tree", inputs: ["value", "selectionMode", "loadingMode", "selection", "style", "styleClass", "contextMenu", "layout", "draggableScope", "droppableScope", "draggableNodes", "droppableNodes", "metaKeySelection", "propagateSelectionUp", "propagateSelectionDown", "loading", "loadingIcon", "emptyMessage", "ariaLabel", "togglerAriaLabel", "ariaLabelledBy", "validateDrop", "filter", "filterBy", "filterMode", "filterPlaceholder", "filteredNodes", "filterLocale", "scrollHeight", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "indentation", "_templateMap", "trackBy", "virtualNodeHeight"], outputs: ["selectionChange", "onNodeSelect", "onNodeUnselect", "onNodeExpand", "onNodeCollapse", "onNodeContextMenuSelect", "onNodeDrop", "onLazyLoad", "onScroll", "onScrollIndexChange", "onFilter"] }] }); }
6464
6257
  }
6465
6258
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvTreeViewComponent, decorators: [{
6466
6259
  type: Component,
@@ -7512,13 +7305,13 @@ class KvFileViewerComponent {
7512
7305
  const text = await new Response(this.blob).text();
7513
7306
  this.xmlFormat = vkbeautify.xml(text);
7514
7307
  }
7515
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvFileViewerComponent, deps: [{ token: i1$8.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component }); }
7308
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvFileViewerComponent, deps: [{ token: i1$7.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component }); }
7516
7309
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.8", type: KvFileViewerComponent, selector: "kv-file-viewer", inputs: { arquivo: "arquivo", type: "type", blob: "blob" }, usesOnChanges: true, ngImport: i0, template: "<img class=\"img\" *ngIf=\"type.match('image')\" [src]=\"sanitizedPdfSrc\" />\r\n\r\n<iframe\r\n class=\"txt-pdf\"\r\n *ngIf=\"type == 'text/plain' || type == 'application/pdf'\"\r\n [src]=\"sanitizedPdfSrc\"\r\n width=\"100%\"\r\n height=\"700px\"\r\n>\r\n</iframe>\r\n\r\n<div *ngIf=\"xmlFormat\" class=\"txt-pdf xml-viewer\">\r\n <pre lang=\"xml\">\r\n {{ xmlFormat }}\r\n </pre>\r\n</div>\r\n", styles: [".img{width:100%;height:100%;overflow:auto}.txt-pdf{width:100%;height:600px}.xml-viewer{overflow:auto;font-size:13px}.xml-viewer .tag{color:#6f517e}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
7517
7310
  }
7518
7311
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvFileViewerComponent, decorators: [{
7519
7312
  type: Component,
7520
7313
  args: [{ selector: 'kv-file-viewer', template: "<img class=\"img\" *ngIf=\"type.match('image')\" [src]=\"sanitizedPdfSrc\" />\r\n\r\n<iframe\r\n class=\"txt-pdf\"\r\n *ngIf=\"type == 'text/plain' || type == 'application/pdf'\"\r\n [src]=\"sanitizedPdfSrc\"\r\n width=\"100%\"\r\n height=\"700px\"\r\n>\r\n</iframe>\r\n\r\n<div *ngIf=\"xmlFormat\" class=\"txt-pdf xml-viewer\">\r\n <pre lang=\"xml\">\r\n {{ xmlFormat }}\r\n </pre>\r\n</div>\r\n", styles: [".img{width:100%;height:100%;overflow:auto}.txt-pdf{width:100%;height:600px}.xml-viewer{overflow:auto;font-size:13px}.xml-viewer .tag{color:#6f517e}\n"] }]
7521
- }], ctorParameters: () => [{ type: i1$8.DomSanitizer }], propDecorators: { arquivo: [{
7314
+ }], ctorParameters: () => [{ type: i1$7.DomSanitizer }], propDecorators: { arquivo: [{
7522
7315
  type: Input
7523
7316
  }], type: [{
7524
7317
  type: Input
@@ -8345,5 +8138,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImpor
8345
8138
  * Generated bundle index. Do not edit.
8346
8139
  */
8347
8140
 
8348
- export { BaseApiService, BaseChartComponent, BaseComponent, BaseComponentButton, BaseComponentCrud, BaseComponentCrudForm, BaseComponentCrudList, BaseComponentDropDown, BaseComponentDropDownExternal, BaseComponentInput, BaseComponentMultiSelect, BasecomponentTable, BreadcrumbsService, CapitalizePipe, ComponentProviders, ComponentService, CpfCnpjPipe, DocsService, DragDirective, DynamicInputDirective, FormService, ImagensService, KeevoComponentsModule, KeevoValidators, KvAvatarComponent, KvAvatarModule, KvButtonComponent, KvButtonModule, KvButtonPersonalizeComponent, KvButtonPopupComponent, KvButtonSecondaryComponent, KvButtonSuccessComponent, KvButtonsModule, KvCarouselComponent, KvCarouselModule, KvChartComponent, KvChartModule, KvCheckComponent, KvCropImageComponent, KvDropdownComponent, KvEditorComponent, KvErrorComponent, KvFileUploadComponent, KvFileUploadModule, KvFileViewerComponent, KvFileViewerModule, KvFilterCardComponent, KvFilterCardModule, KvFilterFieldsetComponent, KvFilterFieldsetModule, KvGIconComponent, KvGIconModule, KvHomeCardComponent, KvHomeCardModule, KvImageUploadComponent, KvImageUploadModule, KvInputCalendarComponent, KvInputMaskComponent, KvInputNumberComponent, KvInputPasswordComponent, KvInputTextCheckboxComponent, KvInputTextComponent, KvInputTextareaComponent, KvInputTimeComponent, KvInputsModule, KvLayoutComponent, KvLayoutModule, KvLoaderComponent, KvLoaderModule, KvLoaderService, KvLoginComponent, KvLoginModule, KvModalComponent, KvModalModule, KvMultiSelectComponent, KvOrgchartComponent, KvOrgchartModule, KvPageFormComponent, KvPageFormModule, KvPageStepperComponent, KvPageStepperodule, KvPickListComponent, KvPickListModule, KvProgressBarModule, KvRadioGroupComponent, KvReportComponent, KvReportModule, KvSelectButtonComponent, KvSelectButtonsComponent, KvStepperComponent, KvStepperModule, KvSwitchComponent, KvTableComponent, KvTableEditComponent, KvTableEditModule, KvTableExpandableComponent, KvTableExpandableModule, KvTableModule, KvTreeViewComponent, KvTreetableComponent, KvTreetableModule, KvWorkspaceModule, KvtreeViewModule, MaskPipe, NotificationService, ObjectService, PeriodosChart, PipesModule, PrimeNgModule, ProgressBarComponent, TablePaginate, TelefonePipe, TemplateDirective, TranslatePrimeng, WorkspaceComponent, getOrExecute, kvErrorModule, loading, mapToMenuItem };
8141
+ export { BaseApiService, BaseChartComponent, BaseComponent, BaseComponentButton, BaseComponentCrud, BaseComponentCrudForm, BaseComponentCrudList, BaseComponentDropDown, BaseComponentDropDownExternal, BaseComponentInput, BaseComponentMultiSelect, BasecomponentTable, BreadcrumbsService, CapitalizePipe, ComponentProviders, ComponentService, CpfCnpjPipe, DocsService, DragDirective, DynamicInputDirective, FormService, ImagensService, KeevoComponentsModule, KeevoValidators, KvAvatarComponent, KvAvatarModule, KvButtonComponent, KvButtonModule, KvButtonPersonalizeComponent, KvButtonPopupComponent, KvButtonSecondaryComponent, KvButtonSuccessComponent, KvButtonsModule, KvCarouselComponent, KvCarouselModule, KvChartComponent, KvChartModule, KvCheckComponent, KvDropdownComponent, KvEditorComponent, KvErrorComponent, KvFileUploadComponent, KvFileUploadModule, KvFileViewerComponent, KvFileViewerModule, KvFilterCardComponent, KvFilterCardModule, KvFilterFieldsetComponent, KvFilterFieldsetModule, KvGIconComponent, KvGIconModule, KvHomeCardComponent, KvHomeCardModule, KvImageUploadComponent, KvImageUploadModule, KvInputCalendarComponent, KvInputMaskComponent, KvInputNumberComponent, KvInputPasswordComponent, KvInputTextCheckboxComponent, KvInputTextComponent, KvInputTextareaComponent, KvInputTimeComponent, KvInputsModule, KvLayoutComponent, KvLayoutModule, KvLoaderComponent, KvLoaderModule, KvLoaderService, KvLoginComponent, KvLoginModule, KvModalComponent, KvModalModule, KvMultiSelectComponent, KvOrgchartComponent, KvOrgchartModule, KvPageFormComponent, KvPageFormModule, KvPageStepperComponent, KvPageStepperodule, KvPickListComponent, KvPickListModule, KvProgressBarModule, KvRadioGroupComponent, KvReportComponent, KvReportModule, KvSelectButtonComponent, KvSelectButtonsComponent, KvStepperComponent, KvStepperModule, KvSwitchComponent, KvTableComponent, KvTableEditComponent, KvTableEditModule, KvTableExpandableComponent, KvTableExpandableModule, KvTableModule, KvTreeViewComponent, KvTreetableComponent, KvTreetableModule, KvWorkspaceModule, KvtreeViewModule, MaskPipe, NotificationService, ObjectService, PeriodosChart, PipesModule, PrimeNgModule, ProgressBarComponent, TablePaginate, TelefonePipe, TemplateDirective, TranslatePrimeng, WorkspaceComponent, getOrExecute, kvErrorModule, loading, mapToMenuItem };
8349
8142
  //# sourceMappingURL=keevo-components.mjs.map