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,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { EventEmitter, Component, Input, Output, ViewChild, Injectable,
|
|
2
|
+
import { EventEmitter, Component, Input, Output, ViewChild, Injectable, Directive, Pipe, ViewChildren, ContentChildren, forwardRef, model, HostListener, NgModule, signal, computed, input, viewChild, inject, contentChildren, effect, ChangeDetectionStrategy, HostBinding, Injector } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/common';
|
|
4
|
-
import {
|
|
4
|
+
import { CommonModule, NgClass } from '@angular/common';
|
|
5
5
|
import * as i1$1 from 'primeng/button';
|
|
6
6
|
import { ButtonModule } from 'primeng/button';
|
|
7
7
|
import * as i3 from 'primeng/chart';
|
|
@@ -14,13 +14,13 @@ import * as i2 from 'primeng/ripple';
|
|
|
14
14
|
import { RippleModule } from 'primeng/ripple';
|
|
15
15
|
import * as i2$1 from '@angular/forms';
|
|
16
16
|
import { FormGroup, NgControl, FormControlName, FormGroupDirective, NG_VALUE_ACCESSOR, Validators, FormsModule, ReactiveFormsModule, FormBuilder } from '@angular/forms';
|
|
17
|
-
import * as i3$1 from '@angular/router';
|
|
18
|
-
import { ActivatedRoute, Router, NavigationEnd } from '@angular/router';
|
|
19
|
-
import * as i1$3 from 'primeng/dynamicdialog';
|
|
20
|
-
import { DialogService, DynamicDialogRef, DynamicDialogConfig, DynamicDialogModule } from 'primeng/dynamicdialog';
|
|
21
17
|
import { Subject, finalize, combineLatest, filter, debounceTime, of, BehaviorSubject, takeUntil, timer } from 'rxjs';
|
|
18
|
+
import * as i1$3 from 'primeng/dynamicdialog';
|
|
19
|
+
import { DynamicDialogModule, DialogService, DynamicDialogRef, DynamicDialogConfig } from 'primeng/dynamicdialog';
|
|
22
20
|
import * as i1$2 from 'primeng/api';
|
|
23
21
|
import { ConfirmationService, MessageService } from 'primeng/api';
|
|
22
|
+
import * as i3$1 from '@angular/router';
|
|
23
|
+
import { NavigationEnd } from '@angular/router';
|
|
24
24
|
import * as i14 from 'primeng/table';
|
|
25
25
|
import { Table, TableModule } from 'primeng/table';
|
|
26
26
|
import * as i5$2 from 'primeng/autofocus';
|
|
@@ -47,24 +47,26 @@ import { DividerModule } from 'primeng/divider';
|
|
|
47
47
|
import * as i1$4 from '@angular/common/http';
|
|
48
48
|
import { HttpHeaders } from '@angular/common/http';
|
|
49
49
|
import { filter as filter$1 } from 'rxjs/operators';
|
|
50
|
+
import { DialogModule } from 'primeng/dialog';
|
|
51
|
+
import * as i2$2 from 'primeng/slider';
|
|
52
|
+
import { SliderModule } from 'primeng/slider';
|
|
53
|
+
import { FileUploadModule } from 'primeng/fileupload';
|
|
50
54
|
import { AccordionModule } from 'primeng/accordion';
|
|
51
55
|
import { BadgeModule } from 'primeng/badge';
|
|
52
56
|
import * as i5$9 from 'primeng/breadcrumb';
|
|
53
57
|
import { BreadcrumbModule } from 'primeng/breadcrumb';
|
|
54
58
|
import * as i5$4 from 'primeng/calendar';
|
|
55
59
|
import { CalendarModule } from 'primeng/calendar';
|
|
56
|
-
import * as i2$
|
|
60
|
+
import * as i2$3 from 'primeng/carousel';
|
|
57
61
|
import { CarouselModule, Carousel } from 'primeng/carousel';
|
|
58
62
|
import { ChipModule } from 'primeng/chip';
|
|
59
63
|
import { ConfirmDialogModule } from 'primeng/confirmdialog';
|
|
60
64
|
import * as i7$2 from 'primeng/contextmenu';
|
|
61
65
|
import { ContextMenuModule } from 'primeng/contextmenu';
|
|
62
66
|
import { DataViewModule } from 'primeng/dataview';
|
|
63
|
-
import { DialogModule } from 'primeng/dialog';
|
|
64
67
|
import { EditorModule } from 'primeng/editor';
|
|
65
|
-
import * as i2$
|
|
68
|
+
import * as i2$5 from 'primeng/fieldset';
|
|
66
69
|
import { FieldsetModule } from 'primeng/fieldset';
|
|
67
|
-
import { FileUploadModule } from 'primeng/fileupload';
|
|
68
70
|
import { ImageModule } from 'primeng/image';
|
|
69
71
|
import * as i5$5 from 'primeng/inputmask';
|
|
70
72
|
import { InputMaskModule } from 'primeng/inputmask';
|
|
@@ -104,17 +106,15 @@ import { ToastModule } from 'primeng/toast';
|
|
|
104
106
|
import { ToolbarModule } from 'primeng/toolbar';
|
|
105
107
|
import * as i1$6 from 'primeng/tree';
|
|
106
108
|
import { TreeModule } from 'primeng/tree';
|
|
107
|
-
import * as i2$
|
|
109
|
+
import * as i2$4 from 'primeng/selectbutton';
|
|
108
110
|
import { SelectButtonModule } from 'primeng/selectbutton';
|
|
109
111
|
import * as i3$3 from 'primeng/stepper';
|
|
110
112
|
import { StepperModule } from 'primeng/stepper';
|
|
111
113
|
import { InputGroupModule } from 'primeng/inputgroup';
|
|
112
114
|
import { InputGroupAddonModule } from 'primeng/inputgroupaddon';
|
|
113
|
-
import * as i4$1 from 'primeng/slider';
|
|
114
|
-
import { SliderModule } from 'primeng/slider';
|
|
115
|
-
import Quill from 'quill';
|
|
116
115
|
import * as i1$5 from 'ngx-loading';
|
|
117
116
|
import { NgxLoadingModule } from 'ngx-loading';
|
|
117
|
+
import Quill from 'quill';
|
|
118
118
|
import { ProgressSpinnerModule } from 'primeng/progressspinner';
|
|
119
119
|
import { OrgChart } from 'd3-org-chart';
|
|
120
120
|
import * as d3 from 'd3';
|
|
@@ -582,10 +582,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImpor
|
|
|
582
582
|
|
|
583
583
|
class BaseComponentCrud {
|
|
584
584
|
constructor(dialogService, notificationService) {
|
|
585
|
+
this.dialogService = dialogService;
|
|
586
|
+
this.notificationService = notificationService;
|
|
585
587
|
this.isReport = false;
|
|
586
588
|
this.itemsReport = [];
|
|
587
|
-
this.dialogService = dialogService ?? inject(DialogService);
|
|
588
|
-
this.notificationService = notificationService ?? inject(NotificationService);
|
|
589
589
|
}
|
|
590
590
|
/**
|
|
591
591
|
* Fecha um relatório
|
|
@@ -651,7 +651,7 @@ class BaseComponentCrud {
|
|
|
651
651
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: BaseComponentCrud, decorators: [{
|
|
652
652
|
type: Component,
|
|
653
653
|
args: [{
|
|
654
|
-
template: ''
|
|
654
|
+
template: '',
|
|
655
655
|
}]
|
|
656
656
|
}], ctorParameters: () => [{ type: i1$3.DialogService }, { type: NotificationService }] });
|
|
657
657
|
|
|
@@ -683,7 +683,11 @@ const loading = () => {
|
|
|
683
683
|
|
|
684
684
|
class BaseComponentCrudForm extends BaseComponentCrud {
|
|
685
685
|
constructor(dialogService, notificationService, activatedRoute, dynamicDialogRef, dynamicDialogConfig, router) {
|
|
686
|
-
super();
|
|
686
|
+
super(dialogService, notificationService);
|
|
687
|
+
this.activatedRoute = activatedRoute;
|
|
688
|
+
this.dynamicDialogRef = dynamicDialogRef;
|
|
689
|
+
this.dynamicDialogConfig = dynamicDialogConfig;
|
|
690
|
+
this.router = router;
|
|
687
691
|
this.isAccordionExpanded = false;
|
|
688
692
|
this.isNewRegistry = false;
|
|
689
693
|
this.isSaveLoading = false;
|
|
@@ -693,10 +697,6 @@ class BaseComponentCrudForm extends BaseComponentCrud {
|
|
|
693
697
|
this.popup = false;
|
|
694
698
|
this.registry = null;
|
|
695
699
|
this.onSetFormValues = false;
|
|
696
|
-
this.activatedRoute = activatedRoute ?? inject(ActivatedRoute);
|
|
697
|
-
this.dynamicDialogRef = dynamicDialogRef ?? inject(DynamicDialogRef);
|
|
698
|
-
this.dynamicDialogConfig = dynamicDialogConfig ?? inject(DynamicDialogConfig);
|
|
699
|
-
this.router = router ?? inject(Router);
|
|
700
700
|
}
|
|
701
701
|
/**
|
|
702
702
|
* Método disparado para tratamento das notificações do backend
|
|
@@ -768,7 +768,7 @@ class BaseComponentCrudForm extends BaseComponentCrud {
|
|
|
768
768
|
*/
|
|
769
769
|
detectFormControlChanges(controls) {
|
|
770
770
|
const controlList = [];
|
|
771
|
-
controls.forEach(controlName => controlList.push(this.formGroup.controls[controlName].valueChanges));
|
|
771
|
+
controls.forEach((controlName) => controlList.push(this.formGroup.controls[controlName].valueChanges));
|
|
772
772
|
return combineLatest(controlList).pipe(filter(() => !this.onSetFormValues));
|
|
773
773
|
}
|
|
774
774
|
/**
|
|
@@ -833,9 +833,7 @@ class BaseComponentCrudForm extends BaseComponentCrud {
|
|
|
833
833
|
* @param obs - Observable responsável pelo salvamento dos dados
|
|
834
834
|
*/
|
|
835
835
|
loadData(obs) {
|
|
836
|
-
obs
|
|
837
|
-
.pipe(loading())
|
|
838
|
-
.subscribe((data) => {
|
|
836
|
+
obs.pipe(loading()).subscribe((data) => {
|
|
839
837
|
this.isNewRegistry = false;
|
|
840
838
|
this.registry = data;
|
|
841
839
|
this.setFormValues(this.registry);
|
|
@@ -960,8 +958,8 @@ class BaseComponentCrudForm extends BaseComponentCrud {
|
|
|
960
958
|
return valid;
|
|
961
959
|
}
|
|
962
960
|
/**
|
|
963
|
-
|
|
964
|
-
|
|
961
|
+
* Método que dispara a atualização da página inteira
|
|
962
|
+
*/
|
|
965
963
|
refresh() {
|
|
966
964
|
window.location.reload();
|
|
967
965
|
}
|
|
@@ -971,7 +969,7 @@ class BaseComponentCrudForm extends BaseComponentCrud {
|
|
|
971
969
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: BaseComponentCrudForm, decorators: [{
|
|
972
970
|
type: Component,
|
|
973
971
|
args: [{
|
|
974
|
-
template: ''
|
|
972
|
+
template: '',
|
|
975
973
|
}]
|
|
976
974
|
}], ctorParameters: () => [{ type: i1$3.DialogService }, { type: NotificationService }, { type: i3$1.ActivatedRoute }, { type: i1$3.DynamicDialogRef }, { type: i1$3.DynamicDialogConfig }, { type: i3$1.Router }] });
|
|
977
975
|
|
|
@@ -1654,7 +1652,7 @@ class KvTableComponent {
|
|
|
1654
1652
|
}
|
|
1655
1653
|
switch (col.pipe) {
|
|
1656
1654
|
case 'date':
|
|
1657
|
-
return this.
|
|
1655
|
+
return this.datePipe.transform(value, 'dd/MM/yyyy');
|
|
1658
1656
|
case 'datetime':
|
|
1659
1657
|
return this.datePipe.transform(value, 'dd/MM/yyyy hh:mm');
|
|
1660
1658
|
case 'dateMonthYear':
|
|
@@ -1676,14 +1674,15 @@ class KvTableComponent {
|
|
|
1676
1674
|
}
|
|
1677
1675
|
}
|
|
1678
1676
|
}
|
|
1679
|
-
transformDate(date) {
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1677
|
+
// transformDate(date: any) {
|
|
1678
|
+
// const datePipe = new DatePipe('en-US');
|
|
1679
|
+
// const utcDate = new Date(date);
|
|
1680
|
+
// // Ajuste a data para o fuso horário local
|
|
1681
|
+
// const localDate = new Date(utcDate.getTime() + (utcDate.getTimezoneOffset() * 60000));
|
|
1682
|
+
// console.log('localDate', localDate, "input date", date);
|
|
1683
|
+
// // Transforme a data local para o formato desejado
|
|
1684
|
+
// return datePipe.transform(localDate, 'dd/MM/yyyy');
|
|
1685
|
+
// }
|
|
1687
1686
|
transformCapitalize(value) {
|
|
1688
1687
|
if (!value)
|
|
1689
1688
|
return value;
|
|
@@ -2258,11 +2257,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImpor
|
|
|
2258
2257
|
|
|
2259
2258
|
class BaseComponentCrudList extends BaseComponentCrud {
|
|
2260
2259
|
constructor(dialogService, notificationService, router) {
|
|
2261
|
-
super();
|
|
2260
|
+
super(dialogService, notificationService);
|
|
2261
|
+
this.router = router;
|
|
2262
2262
|
this.dataSource = [];
|
|
2263
2263
|
this.totalRecords = 0;
|
|
2264
2264
|
this.actionsPageList = [];
|
|
2265
|
-
this.router = router ?? inject(Router);
|
|
2266
2265
|
}
|
|
2267
2266
|
ngOnInit() {
|
|
2268
2267
|
this.loadFilters();
|
|
@@ -2283,9 +2282,7 @@ class BaseComponentCrudList extends BaseComponentCrud {
|
|
|
2283
2282
|
* @param obs - Observable de carregamento dos dados
|
|
2284
2283
|
*/
|
|
2285
2284
|
loadData(obs) {
|
|
2286
|
-
obs
|
|
2287
|
-
.pipe(loading())
|
|
2288
|
-
.subscribe({
|
|
2285
|
+
obs.pipe(loading()).subscribe({
|
|
2289
2286
|
next: (res) => {
|
|
2290
2287
|
if (res) {
|
|
2291
2288
|
if (Array.isArray(res)) {
|
|
@@ -2329,7 +2326,7 @@ class BaseComponentCrudList extends BaseComponentCrud {
|
|
|
2329
2326
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: BaseComponentCrudList, decorators: [{
|
|
2330
2327
|
type: Component,
|
|
2331
2328
|
args: [{
|
|
2332
|
-
template: ''
|
|
2329
|
+
template: '',
|
|
2333
2330
|
}]
|
|
2334
2331
|
}], ctorParameters: () => [{ type: i1$3.DialogService }, { type: NotificationService }, { type: i3$1.Router }], propDecorators: { table: [{
|
|
2335
2332
|
type: ViewChild,
|
|
@@ -3687,6 +3684,118 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImpor
|
|
|
3687
3684
|
}]
|
|
3688
3685
|
}], ctorParameters: () => [] });
|
|
3689
3686
|
|
|
3687
|
+
class KvLabelModule {
|
|
3688
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvLabelModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
3689
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.8", ngImport: i0, type: KvLabelModule, declarations: [KvLabelComponent], imports: [CommonModule], exports: [KvLabelComponent] }); }
|
|
3690
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvLabelModule, imports: [CommonModule] }); }
|
|
3691
|
+
}
|
|
3692
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvLabelModule, decorators: [{
|
|
3693
|
+
type: NgModule,
|
|
3694
|
+
args: [{
|
|
3695
|
+
declarations: [
|
|
3696
|
+
KvLabelComponent
|
|
3697
|
+
],
|
|
3698
|
+
imports: [
|
|
3699
|
+
CommonModule
|
|
3700
|
+
],
|
|
3701
|
+
exports: [
|
|
3702
|
+
KvLabelComponent
|
|
3703
|
+
]
|
|
3704
|
+
}]
|
|
3705
|
+
}] });
|
|
3706
|
+
|
|
3707
|
+
class KvModalComponent {
|
|
3708
|
+
constructor(dynamicDialogRef) {
|
|
3709
|
+
this.dynamicDialogRef = dynamicDialogRef;
|
|
3710
|
+
/**
|
|
3711
|
+
* Ações do Dialog
|
|
3712
|
+
*/
|
|
3713
|
+
this.actions = [];
|
|
3714
|
+
this.actionsPosition = 'right';
|
|
3715
|
+
this.justify_content = 'justify-content-start';
|
|
3716
|
+
}
|
|
3717
|
+
ngOnInit() {
|
|
3718
|
+
this.addSubTitle();
|
|
3719
|
+
this.setMarginBottom();
|
|
3720
|
+
this.defPositionButtons();
|
|
3721
|
+
}
|
|
3722
|
+
onWindowResize() {
|
|
3723
|
+
this.setMarginBottom();
|
|
3724
|
+
}
|
|
3725
|
+
/**
|
|
3726
|
+
* Adiciona sub-título à tela
|
|
3727
|
+
*/
|
|
3728
|
+
addSubTitle() {
|
|
3729
|
+
if (this.subtitle) {
|
|
3730
|
+
const headerElement = document.querySelector('.p-dialog .p-dialog-header');
|
|
3731
|
+
if (headerElement) {
|
|
3732
|
+
const subtitleElement = document.createElement('span');
|
|
3733
|
+
subtitleElement.textContent = this.subtitle;
|
|
3734
|
+
subtitleElement.style.fontSize = '0.75rem';
|
|
3735
|
+
subtitleElement.style.width = '100%';
|
|
3736
|
+
subtitleElement.style.marginLeft = '2px';
|
|
3737
|
+
headerElement.appendChild(subtitleElement);
|
|
3738
|
+
}
|
|
3739
|
+
if (this.subHeader) {
|
|
3740
|
+
const headerElement = document.querySelector('.p-dialog .p-dialog-header');
|
|
3741
|
+
const subHeader = this.subHeader.nativeElement;
|
|
3742
|
+
if (headerElement && this.subHeader) {
|
|
3743
|
+
subHeader.style.width = '100%';
|
|
3744
|
+
subHeader.style.marginLeft = '2px';
|
|
3745
|
+
headerElement.appendChild(this.subHeader.nativeElement);
|
|
3746
|
+
}
|
|
3747
|
+
}
|
|
3748
|
+
}
|
|
3749
|
+
}
|
|
3750
|
+
defPositionButtons() {
|
|
3751
|
+
if (this.actionsPosition === 'right') {
|
|
3752
|
+
this.justify_content = 'justify-content-end';
|
|
3753
|
+
}
|
|
3754
|
+
if (this.actionsPosition === 'center') {
|
|
3755
|
+
this.justify_content = 'justify-content-center';
|
|
3756
|
+
}
|
|
3757
|
+
if (this.actionsPosition === 'left') {
|
|
3758
|
+
this.justify_content = 'justify-content-start';
|
|
3759
|
+
}
|
|
3760
|
+
}
|
|
3761
|
+
setMarginBottom() {
|
|
3762
|
+
let actionsFieldHeight = document.getElementById('actions-field')?.offsetHeight;
|
|
3763
|
+
let divBox = document.getElementById('content-modal');
|
|
3764
|
+
if (divBox) {
|
|
3765
|
+
if (actionsFieldHeight) {
|
|
3766
|
+
divBox.style.marginBottom = `${actionsFieldHeight + 30}px`;
|
|
3767
|
+
}
|
|
3768
|
+
else {
|
|
3769
|
+
divBox.style.marginBottom = `50px`;
|
|
3770
|
+
}
|
|
3771
|
+
}
|
|
3772
|
+
}
|
|
3773
|
+
clickExecute(action) {
|
|
3774
|
+
if (action.command) {
|
|
3775
|
+
action.command();
|
|
3776
|
+
if (action.closeAfterClick != false)
|
|
3777
|
+
this.dynamicDialogRef.close();
|
|
3778
|
+
}
|
|
3779
|
+
}
|
|
3780
|
+
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 }); }
|
|
3781
|
+
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"] }] }); }
|
|
3782
|
+
}
|
|
3783
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvModalComponent, decorators: [{
|
|
3784
|
+
type: Component,
|
|
3785
|
+
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"] }]
|
|
3786
|
+
}], ctorParameters: () => [{ type: i1$3.DynamicDialogRef }], propDecorators: { actions: [{
|
|
3787
|
+
type: Input
|
|
3788
|
+
}], actionsPosition: [{
|
|
3789
|
+
type: Input
|
|
3790
|
+
}], subtitle: [{
|
|
3791
|
+
type: Input
|
|
3792
|
+
}], subHeader: [{
|
|
3793
|
+
type: Input
|
|
3794
|
+
}], onWindowResize: [{
|
|
3795
|
+
type: HostListener,
|
|
3796
|
+
args: ['window:resize', ['$event']]
|
|
3797
|
+
}] } });
|
|
3798
|
+
|
|
3690
3799
|
class PrimeNgModule {
|
|
3691
3800
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: PrimeNgModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
3692
3801
|
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.8", ngImport: i0, type: PrimeNgModule, exports: [AccordionModule,
|
|
@@ -3894,178 +4003,412 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImpor
|
|
|
3894
4003
|
}]
|
|
3895
4004
|
}] });
|
|
3896
4005
|
|
|
3897
|
-
class
|
|
3898
|
-
|
|
3899
|
-
|
|
3900
|
-
|
|
3901
|
-
|
|
3902
|
-
|
|
3903
|
-
|
|
3904
|
-
|
|
3905
|
-
|
|
3906
|
-
|
|
3907
|
-
|
|
3908
|
-
|
|
3909
|
-
|
|
3910
|
-
|
|
3911
|
-
|
|
3912
|
-
|
|
3913
|
-
|
|
3914
|
-
|
|
4006
|
+
class KvButtonModule {
|
|
4007
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
4008
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.8", ngImport: i0, type: KvButtonModule, declarations: [KvButtonComponent], imports: [CommonModule,
|
|
4009
|
+
PrimeNgModule], exports: [KvButtonComponent] }); }
|
|
4010
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvButtonModule, imports: [CommonModule,
|
|
4011
|
+
PrimeNgModule] }); }
|
|
4012
|
+
}
|
|
4013
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvButtonModule, decorators: [{
|
|
4014
|
+
type: NgModule,
|
|
4015
|
+
args: [{
|
|
4016
|
+
declarations: [
|
|
4017
|
+
KvButtonComponent
|
|
4018
|
+
],
|
|
4019
|
+
imports: [
|
|
4020
|
+
CommonModule,
|
|
4021
|
+
PrimeNgModule
|
|
4022
|
+
],
|
|
4023
|
+
exports: [
|
|
4024
|
+
KvButtonComponent
|
|
4025
|
+
]
|
|
4026
|
+
}]
|
|
4027
|
+
}] });
|
|
4028
|
+
|
|
4029
|
+
class KvModalModule {
|
|
4030
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvModalModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
4031
|
+
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] }); }
|
|
4032
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvModalModule, imports: [CommonModule, PrimeNgModule, KvButtonModule] }); }
|
|
4033
|
+
}
|
|
4034
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvModalModule, decorators: [{
|
|
4035
|
+
type: NgModule,
|
|
4036
|
+
args: [{
|
|
4037
|
+
declarations: [KvModalComponent],
|
|
4038
|
+
imports: [CommonModule, PrimeNgModule, KvButtonModule],
|
|
4039
|
+
exports: [KvModalComponent],
|
|
4040
|
+
}]
|
|
4041
|
+
}] });
|
|
4042
|
+
|
|
4043
|
+
class ImageCutterService {
|
|
4044
|
+
constructor(dialogservice) {
|
|
4045
|
+
this.dialogservice = dialogservice;
|
|
4046
|
+
}
|
|
4047
|
+
cut(imageBase64, width, height, indCircle = false) {
|
|
4048
|
+
const cutConfig = { imageBase64, width, height, indCircle };
|
|
4049
|
+
this.abrirModal(cutConfig);
|
|
4050
|
+
return new Promise((resolve, reject) => {
|
|
4051
|
+
window.addEventListener('cropImage', (event) => {
|
|
4052
|
+
if (event.detail.status == true) {
|
|
4053
|
+
resolve(event.detail.result);
|
|
4054
|
+
}
|
|
4055
|
+
else {
|
|
4056
|
+
reject('Operacao cancelada.');
|
|
4057
|
+
}
|
|
4058
|
+
});
|
|
4059
|
+
});
|
|
4060
|
+
}
|
|
4061
|
+
abrirModal(cutConfig) {
|
|
4062
|
+
const params = {
|
|
4063
|
+
closable: true,
|
|
4064
|
+
maximizable: false,
|
|
4065
|
+
popup: true,
|
|
4066
|
+
width: '75vw',
|
|
4067
|
+
header: `Cortar`,
|
|
4068
|
+
id: { imagem: cutConfig.imageBase64, width: cutConfig.width, height: cutConfig.height, indCircle: cutConfig.indCircle },
|
|
4069
|
+
styleClass: 'modal'
|
|
4070
|
+
};
|
|
4071
|
+
const dialogRef = FormService.openDialog(this.dialogservice, SimpleComponent, () => { }, params);
|
|
4072
|
+
}
|
|
4073
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: ImageCutterService, deps: [{ token: i1$3.DialogService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4074
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: ImageCutterService, providedIn: 'root' }); }
|
|
4075
|
+
}
|
|
4076
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: ImageCutterService, decorators: [{
|
|
4077
|
+
type: Injectable,
|
|
4078
|
+
args: [{
|
|
4079
|
+
providedIn: 'root'
|
|
4080
|
+
}]
|
|
4081
|
+
}], ctorParameters: () => [{ type: i1$3.DialogService }] });
|
|
4082
|
+
class SimpleComponent {
|
|
4083
|
+
constructor(dynamicDialogRef, dialogService) {
|
|
4084
|
+
this.dynamicDialogRef = dynamicDialogRef;
|
|
4085
|
+
this.dialogService = dialogService;
|
|
4086
|
+
// ? Variavies que recebem os valores do dialog
|
|
4087
|
+
this._variaviesDialog = signal(null);
|
|
4088
|
+
//? Referências para o contexto e canvas
|
|
4089
|
+
this.canvas = signal(null);
|
|
4090
|
+
this.ctx = signal(null);
|
|
4091
|
+
this._Image = signal(new Image());
|
|
4092
|
+
//? Coordenadas iniciais e finais do desenho
|
|
3915
4093
|
this.startX = 0;
|
|
3916
4094
|
this.startY = 0;
|
|
3917
|
-
|
|
3918
|
-
this.
|
|
3919
|
-
|
|
3920
|
-
|
|
3921
|
-
this.
|
|
3922
|
-
this.
|
|
3923
|
-
this.
|
|
3924
|
-
this.
|
|
4095
|
+
//? Fator de escala da imagem e zoom
|
|
4096
|
+
this.scaleFactorReadOnly = computed(() => {
|
|
4097
|
+
return Math.min(this.scaleFactor(), 3);
|
|
4098
|
+
});
|
|
4099
|
+
this.scaleFactor = signal(null);
|
|
4100
|
+
this.scaleFactorModel = 0;
|
|
4101
|
+
this.imageX = 0;
|
|
4102
|
+
this.imageY = 0;
|
|
4103
|
+
//#region Propriedades computadas de tamanho do canvas e da imagem
|
|
4104
|
+
//? Largura e altura do canvas baseado na tamanho da tela
|
|
4105
|
+
this.canvasWidth = computed(() => this.widthTela() * 0.5);
|
|
4106
|
+
this.canvasHeight = computed(() => this.heigthTela() * 0.5);
|
|
4107
|
+
//? Largura e altura da área de corte
|
|
4108
|
+
this.cutWidth = computed(() => {
|
|
4109
|
+
if (this._variaviesDialog()?.indCircle) {
|
|
4110
|
+
return this.radius() * 2;
|
|
4111
|
+
}
|
|
4112
|
+
else {
|
|
4113
|
+
const canvasWidth = this.canvasWidth();
|
|
4114
|
+
const maxWidth = canvasWidth * 0.8;
|
|
4115
|
+
const proportionalHeight = maxWidth * this.proporcaoImagem();
|
|
4116
|
+
return proportionalHeight > this.canvasHeight() * 0.8 ? this.canvasHeight() * 0.8 / this.proporcaoImagem() : maxWidth;
|
|
4117
|
+
}
|
|
4118
|
+
});
|
|
4119
|
+
this.cutHeight = computed(() => {
|
|
4120
|
+
if (this._variaviesDialog()?.indCircle) {
|
|
4121
|
+
return this.radius() * 2;
|
|
4122
|
+
}
|
|
4123
|
+
else {
|
|
4124
|
+
const canvasHeight = this.canvasHeight();
|
|
4125
|
+
const maxHeight = canvasHeight * 0.8;
|
|
4126
|
+
const proportionalWidth = maxHeight / this.proporcaoImagem();
|
|
4127
|
+
return proportionalWidth > this.canvasWidth() * 0.8 ? this.canvasWidth() * 0.8 * this.proporcaoImagem() : maxHeight;
|
|
4128
|
+
}
|
|
4129
|
+
});
|
|
4130
|
+
//? Largura e altura da imagem no canvas (baseado na escala) - tamanho real da imagem
|
|
4131
|
+
this.canvaImageWidth = computed(() => {
|
|
4132
|
+
return this._Image().width * this.scaleFactorReadOnly();
|
|
4133
|
+
});
|
|
4134
|
+
this.canvaImageHeight = computed(() => {
|
|
4135
|
+
return this._Image().height * this.scaleFactorReadOnly();
|
|
4136
|
+
});
|
|
4137
|
+
this.proporcaoImagem = computed(() => {
|
|
4138
|
+
return this._variaviesDialog()?.height / this._variaviesDialog()?.width;
|
|
4139
|
+
});
|
|
4140
|
+
this.radius = computed(() => {
|
|
4141
|
+
const minSize = Math.min(this.canvasHeight() * 0.8, this.canvasWidth() * 0.8);
|
|
4142
|
+
return minSize / 2;
|
|
4143
|
+
});
|
|
4144
|
+
//#endregion
|
|
4145
|
+
// #region Limites de movimentação da imagem
|
|
4146
|
+
//? Limites de movimentação da imagem
|
|
4147
|
+
this.indCircle = computed(() => {
|
|
4148
|
+
return this._variaviesDialog()?.indCircle;
|
|
4149
|
+
});
|
|
4150
|
+
this.xMin = computed(() => {
|
|
4151
|
+
return !this._variaviesDialog()?.indCircle ? (this.canvasWidth() - this.cutWidth()) / 2 : (this.canvasWidth() - (this.radius() * 2)) / 2;
|
|
4152
|
+
});
|
|
4153
|
+
this.yMin = computed(() => {
|
|
4154
|
+
return !this._variaviesDialog()?.indCircle ? (this.canvasHeight() - this.cutHeight()) / 2 : (this.canvasHeight() - (this.radius() * 2)) / 2;
|
|
4155
|
+
});
|
|
4156
|
+
this.xMax = computed(() => {
|
|
4157
|
+
return !this._variaviesDialog()?.indCircle ? -(this.canvaImageWidth() - (this.xMin()) - this.cutWidth()) : -(this.canvaImageWidth() - (this.xMin()) - (this.radius() * 2));
|
|
4158
|
+
});
|
|
4159
|
+
this.yMax = computed(() => {
|
|
4160
|
+
return !this._variaviesDialog()?.indCircle ? -(this.canvaImageHeight() - (this.yMin()) - this.cutHeight()) : -(this.canvaImageHeight() - (this.yMin()) - (this.radius() * 2));
|
|
4161
|
+
});
|
|
4162
|
+
// #endregion
|
|
4163
|
+
//? Proporção da imagem
|
|
4164
|
+
this.widthTela = signal(0);
|
|
4165
|
+
this.heigthTela = signal(0);
|
|
4166
|
+
this.atualizaTamanhoTela();
|
|
3925
4167
|
}
|
|
3926
|
-
|
|
3927
|
-
this.
|
|
3928
|
-
this.
|
|
4168
|
+
setScaleFactorModel(valor) {
|
|
4169
|
+
this.scaleFactorModel = valor;
|
|
4170
|
+
this.scaleFactor.set(this.scaleFactorModel);
|
|
3929
4171
|
}
|
|
3930
4172
|
onWindowResize() {
|
|
3931
|
-
this.
|
|
3932
|
-
this.heigthTela = window.innerHeight;
|
|
4173
|
+
this.atualizaTamanhoTela();
|
|
3933
4174
|
this.updateCanvasSize();
|
|
3934
|
-
this.
|
|
4175
|
+
this.atualizaCutBorder();
|
|
3935
4176
|
}
|
|
3936
|
-
|
|
3937
|
-
|
|
3938
|
-
|
|
3939
|
-
|
|
3940
|
-
|
|
3941
|
-
|
|
3942
|
-
|
|
3943
|
-
|
|
4177
|
+
atualizaTamanhoTela() {
|
|
4178
|
+
this.widthTela.set(window.innerWidth);
|
|
4179
|
+
this.heigthTela.set(window.innerHeight);
|
|
4180
|
+
}
|
|
4181
|
+
ngAfterViewInit() {
|
|
4182
|
+
this.recuperarVariaviesDialog();
|
|
4183
|
+
this.inciarReferencias();
|
|
4184
|
+
this.iniciarCanvas();
|
|
4185
|
+
}
|
|
4186
|
+
inciarReferencias() {
|
|
4187
|
+
this.canvas.set(this.cropCanvas.nativeElement);
|
|
4188
|
+
this.ctx.set(this.canvas().getContext('2d'));
|
|
4189
|
+
this._Image().src = this._variaviesDialog()?.imagem;
|
|
4190
|
+
}
|
|
4191
|
+
iniciarCanvas() {
|
|
4192
|
+
this._Image().onload = () => {
|
|
4193
|
+
//? Define o tamanho do canvas
|
|
4194
|
+
this.canvas().height = this.canvasHeight();
|
|
4195
|
+
this.canvas().width = this.canvasWidth();
|
|
4196
|
+
this.ajustarZommEPosicaoInicial();
|
|
4197
|
+
this.initializeImageMove(this.canvas(), this.ctx(), this._Image());
|
|
4198
|
+
this.initializeMouseWheel(this.canvas(), this.ctx(), this._Image());
|
|
4199
|
+
this.redrawCanvas(this.ctx(), this._Image());
|
|
4200
|
+
};
|
|
4201
|
+
}
|
|
4202
|
+
ajustarZommEPosicaoInicial() {
|
|
4203
|
+
const cutWidth = this.cutWidth();
|
|
4204
|
+
const cutHeight = this.cutHeight();
|
|
4205
|
+
const imageWidth = this._Image().width;
|
|
4206
|
+
const imageHeight = this._Image().height;
|
|
4207
|
+
//? Ajusta possição e zoom inicial
|
|
4208
|
+
if (this._variaviesDialog()?.indCircle) {
|
|
4209
|
+
const scaleFactor = (this.radius() * 2) / Math.min(imageWidth, imageHeight);
|
|
4210
|
+
this.setScaleFactorModel(scaleFactor);
|
|
4211
|
+
this.scaleFactor.set(scaleFactor);
|
|
3944
4212
|
}
|
|
3945
4213
|
else {
|
|
3946
|
-
this.
|
|
3947
|
-
|
|
3948
|
-
|
|
4214
|
+
const scaleFactor = this.cutHeight() === this.cutWidth()
|
|
4215
|
+
? this._Image().width > this._Image().height
|
|
4216
|
+
? this.cutHeight() / imageHeight
|
|
4217
|
+
: this.cutWidth() / imageWidth
|
|
4218
|
+
: this.cutHeight() > this.cutWidth()
|
|
4219
|
+
? this.cutHeight() / imageHeight
|
|
4220
|
+
: this.cutWidth() / imageWidth;
|
|
4221
|
+
this.setScaleFactorModel(scaleFactor);
|
|
4222
|
+
this.scaleFactor.set(scaleFactor);
|
|
4223
|
+
}
|
|
4224
|
+
this.imageX = Math.max((this.canvas().width - imageWidth * this.scaleFactorReadOnly()) / 2, this.xMin());
|
|
4225
|
+
this.imageY = Math.max((this.canvasHeight() - imageHeight * this.scaleFactorReadOnly()) / 2, this.yMin());
|
|
4226
|
+
}
|
|
4227
|
+
//#region Métodos de recuperação de dados
|
|
4228
|
+
recuperaInstanciaDialog() {
|
|
4229
|
+
const arr = this.dialogService.dialogComponentRefMap;
|
|
4230
|
+
const entries = arr.entries();
|
|
4231
|
+
const firstEntry = entries.next().value;
|
|
4232
|
+
const [firstKey, firstValue] = firstEntry;
|
|
4233
|
+
const instance = this.dialogService.getInstance(firstKey);
|
|
4234
|
+
this.dialogInstance = instance;
|
|
4235
|
+
return instance;
|
|
4236
|
+
}
|
|
4237
|
+
recuperarVariaviesDialog() {
|
|
4238
|
+
this._variaviesDialog.set(this.recuperaInstanciaDialog().data.id);
|
|
4239
|
+
}
|
|
4240
|
+
//#endregion
|
|
4241
|
+
//#region Métodos de atualizacao do canvas
|
|
4242
|
+
//? Atualiza o tamanho do canvas
|
|
4243
|
+
updateCanvasSize() {
|
|
4244
|
+
this.imageX = (this.canvas().width - this._Image().width * this.scaleFactorReadOnly()) / 2;
|
|
4245
|
+
this.imageY = (this.canvasHeight() / 2) - (this._Image().height * this.scaleFactorReadOnly()) / 2;
|
|
4246
|
+
this.canvas().height = this.canvasHeight();
|
|
4247
|
+
this.canvas().width = this.canvasWidth();
|
|
4248
|
+
this.redrawCanvas(this.ctx(), this._Image());
|
|
3949
4249
|
}
|
|
3950
|
-
|
|
3951
|
-
|
|
3952
|
-
|
|
3953
|
-
|
|
3954
|
-
|
|
4250
|
+
redrawCanvas(ctx, img) {
|
|
4251
|
+
if (!ctx)
|
|
4252
|
+
return;
|
|
4253
|
+
this.drawCropArea(ctx);
|
|
4254
|
+
ctx.clearRect(0, 0, ctx.canvas.width, ctx.canvas.height);
|
|
4255
|
+
ctx.filter = 'blur(5px) opacity(0.9)';
|
|
4256
|
+
ctx.drawImage(img, this.imageX, this.imageY, img.width * this.scaleFactorReadOnly(), img.height * this.scaleFactorReadOnly());
|
|
4257
|
+
ctx.filter = 'none';
|
|
4258
|
+
this.drawImageInCropArea(ctx, img);
|
|
3955
4259
|
}
|
|
3956
|
-
|
|
3957
|
-
|
|
3958
|
-
if (
|
|
3959
|
-
|
|
3960
|
-
|
|
3961
|
-
|
|
3962
|
-
|
|
3963
|
-
|
|
3964
|
-
|
|
3965
|
-
|
|
3966
|
-
|
|
4260
|
+
//? Desenha a área de corte
|
|
4261
|
+
drawCropArea(ctx) {
|
|
4262
|
+
if (!ctx)
|
|
4263
|
+
return;
|
|
4264
|
+
this.atualizaCutBorder();
|
|
4265
|
+
const cropX = ctx.canvas.width / 2 - this.cutWidth() / 2;
|
|
4266
|
+
const cropY = ctx.canvas.height / 2 - this.cutHeight() / 2;
|
|
4267
|
+
const cropXCircle = ctx.canvas.width / 2 - this.radius() / 2;
|
|
4268
|
+
const cropYCircle = ctx.canvas.height / 2 - this.radius() / 2;
|
|
4269
|
+
ctx.beginPath();
|
|
4270
|
+
ctx.strokeStyle = 'transparent';
|
|
4271
|
+
ctx.lineWidth = 2;
|
|
4272
|
+
if (this._variaviesDialog()?.indCircle) {
|
|
4273
|
+
ctx.arc(cropXCircle, cropYCircle, this.radius(), 0, Math.PI * 2, true);
|
|
3967
4274
|
}
|
|
4275
|
+
else {
|
|
4276
|
+
ctx.rect(cropX, cropY, this.cutWidth(), this.cutHeight());
|
|
4277
|
+
}
|
|
4278
|
+
ctx.stroke();
|
|
3968
4279
|
}
|
|
3969
|
-
|
|
3970
|
-
|
|
3971
|
-
|
|
3972
|
-
|
|
3973
|
-
|
|
3974
|
-
|
|
3975
|
-
|
|
3976
|
-
|
|
3977
|
-
|
|
3978
|
-
|
|
3979
|
-
}
|
|
4280
|
+
//? Desenha a imagem na área de corte
|
|
4281
|
+
drawImageInCropArea(ctx, img) {
|
|
4282
|
+
if (!ctx)
|
|
4283
|
+
return;
|
|
4284
|
+
const cropX = (ctx.canvas.width - this.cutWidth()) / 2;
|
|
4285
|
+
const cropY = (ctx.canvas.height - this.cutHeight()) / 2;
|
|
4286
|
+
ctx.save();
|
|
4287
|
+
ctx.beginPath();
|
|
4288
|
+
if (this._variaviesDialog()?.indCircle) {
|
|
4289
|
+
ctx.arc(ctx.canvas.width / 2, ctx.canvas.height / 2, this.radius(), 0, Math.PI * 2, true);
|
|
4290
|
+
}
|
|
4291
|
+
else {
|
|
4292
|
+
ctx.rect(cropX, cropY, this.cutWidth(), this.cutHeight());
|
|
4293
|
+
}
|
|
4294
|
+
ctx.clip();
|
|
4295
|
+
ctx.drawImage(img, this.imageX, this.imageY, img.width * this.scaleFactorReadOnly(), img.height * this.scaleFactorReadOnly());
|
|
4296
|
+
ctx.restore();
|
|
3980
4297
|
}
|
|
3981
|
-
|
|
3982
|
-
this.
|
|
3983
|
-
|
|
3984
|
-
|
|
3985
|
-
|
|
3986
|
-
|
|
4298
|
+
atualizaCutBorder() {
|
|
4299
|
+
if (this.cropBorder && this.cropBorder.nativeElement) {
|
|
4300
|
+
const cropBorderElement = this.cropBorder.nativeElement;
|
|
4301
|
+
if (this._variaviesDialog()?.indCircle) {
|
|
4302
|
+
cropBorderElement.style.borderRadius = this.radius() * 2 + 'px';
|
|
4303
|
+
cropBorderElement.style.width = this.radius() * 2 + 'px';
|
|
4304
|
+
cropBorderElement.style.height = this.radius() * 2 + 'px';
|
|
4305
|
+
}
|
|
4306
|
+
else {
|
|
4307
|
+
cropBorderElement.style.width = this.cutWidth() + 'px';
|
|
4308
|
+
cropBorderElement.style.height = this.cutHeight() + 'px';
|
|
4309
|
+
}
|
|
4310
|
+
}
|
|
3987
4311
|
}
|
|
3988
|
-
|
|
3989
|
-
|
|
4312
|
+
//#endregion
|
|
4313
|
+
//#region handlers de eventos
|
|
4314
|
+
onZoomChange(e) {
|
|
4315
|
+
const prevZoom = this.scaleFactorReadOnly();
|
|
4316
|
+
const zoomValue = e.value;
|
|
4317
|
+
const direction = prevZoom < zoomValue ? 'up' : 'down';
|
|
4318
|
+
this.ajustarZoom(direction);
|
|
3990
4319
|
}
|
|
3991
|
-
|
|
3992
|
-
|
|
3993
|
-
|
|
3994
|
-
|
|
3995
|
-
const
|
|
3996
|
-
|
|
3997
|
-
|
|
3998
|
-
img.src = this.selectedImage;
|
|
3999
|
-
img.onload = () => {
|
|
4000
|
-
this.imageLoaded = true;
|
|
4001
|
-
canvas.height = 400;
|
|
4002
|
-
canvas.width = this.retornaTamanhoCanvas();
|
|
4003
|
-
this.scaleFactor = canvas.height / img.height;
|
|
4004
|
-
this.imageX = (canvas.width - img.width * this.scaleFactor) / 2;
|
|
4005
|
-
this.imageY = 0;
|
|
4006
|
-
this.canvasWidth.set(canvas.width);
|
|
4007
|
-
this.canvasHeight.set(canvas.height);
|
|
4008
|
-
this.redrawCanvas(ctx, img);
|
|
4009
|
-
this.initializeImageMove(canvas, ctx, img);
|
|
4010
|
-
this.initializeMouseWheel(canvas, ctx, img);
|
|
4011
|
-
this.valueZoom = this.scaleFactor * 20;
|
|
4012
|
-
};
|
|
4013
|
-
}, 0);
|
|
4320
|
+
initializeMouseWheel(canvas, ctx, img) {
|
|
4321
|
+
canvas.onwheel = (e) => {
|
|
4322
|
+
e.preventDefault();
|
|
4323
|
+
//? Recuperando os valores de zoom e delta atuais
|
|
4324
|
+
const direction = e.deltaY > 0 ? 'down' : 'up';
|
|
4325
|
+
this.ajustarZoom(direction);
|
|
4326
|
+
};
|
|
4014
4327
|
}
|
|
4015
|
-
|
|
4016
|
-
const
|
|
4017
|
-
const
|
|
4018
|
-
|
|
4019
|
-
|
|
4020
|
-
|
|
4021
|
-
|
|
4022
|
-
|
|
4023
|
-
|
|
4024
|
-
|
|
4025
|
-
|
|
4026
|
-
|
|
4027
|
-
|
|
4028
|
-
newCtx.putImageData(imageData, 0, 0);
|
|
4029
|
-
this.imageSource.set(newCanvas.toDataURL());
|
|
4030
|
-
this.imageUrlChange.emit(this.imageSource());
|
|
4031
|
-
this.existeLogo = true;
|
|
4032
|
-
this.closeCropModal();
|
|
4328
|
+
ajustarZoom(direction) {
|
|
4329
|
+
const prevScaleFactor = this.scaleFactorReadOnly();
|
|
4330
|
+
const delta = direction == 'down' ? -0.01 : 0.01;
|
|
4331
|
+
let scaleFactor = Math.min((prevScaleFactor + (delta * 1.2)), 3);
|
|
4332
|
+
const newHeight = this._Image().height * scaleFactor;
|
|
4333
|
+
const newWidth = this._Image().width * scaleFactor;
|
|
4334
|
+
if (this._variaviesDialog()?.indCircle) {
|
|
4335
|
+
if (newHeight < this.radius() * 2 || newWidth < this.radius() * 2) {
|
|
4336
|
+
scaleFactor = prevScaleFactor;
|
|
4337
|
+
}
|
|
4338
|
+
else {
|
|
4339
|
+
this.scaleFactor.set(scaleFactor);
|
|
4340
|
+
this.setScaleFactorModel(scaleFactor);
|
|
4033
4341
|
}
|
|
4034
4342
|
}
|
|
4035
|
-
|
|
4036
|
-
|
|
4343
|
+
else {
|
|
4344
|
+
if (newHeight < this.cutHeight() || newWidth < this.cutWidth()) {
|
|
4345
|
+
scaleFactor = prevScaleFactor;
|
|
4346
|
+
}
|
|
4347
|
+
else {
|
|
4348
|
+
this.scaleFactor.set(scaleFactor);
|
|
4349
|
+
this.setScaleFactorModel(scaleFactor);
|
|
4350
|
+
}
|
|
4351
|
+
}
|
|
4352
|
+
this.scaleFactor.set(scaleFactor);
|
|
4353
|
+
this.setScaleFactorModel(scaleFactor);
|
|
4037
4354
|
const canvas = this.cropCanvas.nativeElement;
|
|
4038
|
-
const
|
|
4039
|
-
const
|
|
4040
|
-
|
|
4041
|
-
|
|
4042
|
-
|
|
4043
|
-
|
|
4044
|
-
|
|
4045
|
-
|
|
4046
|
-
|
|
4047
|
-
|
|
4048
|
-
|
|
4049
|
-
|
|
4050
|
-
|
|
4051
|
-
|
|
4052
|
-
|
|
4053
|
-
|
|
4054
|
-
|
|
4055
|
-
|
|
4056
|
-
|
|
4057
|
-
|
|
4058
|
-
|
|
4059
|
-
|
|
4060
|
-
|
|
4061
|
-
|
|
4062
|
-
|
|
4063
|
-
|
|
4064
|
-
|
|
4065
|
-
|
|
4066
|
-
|
|
4067
|
-
|
|
4068
|
-
|
|
4355
|
+
const canvasWidth = canvas.offsetWidth;
|
|
4356
|
+
const canvasHeight = canvas.offsetHeight;
|
|
4357
|
+
const centerX = canvasWidth / 2;
|
|
4358
|
+
const centerY = canvasHeight / 2;
|
|
4359
|
+
const newCanvasX = centerX - (centerX - this.imageX) * (scaleFactor / prevScaleFactor);
|
|
4360
|
+
const newCanvasY = centerY - (centerY - this.imageY) * (scaleFactor / prevScaleFactor);
|
|
4361
|
+
this.imageX = newCanvasX;
|
|
4362
|
+
this.imageY = newCanvasY;
|
|
4363
|
+
if (!this.verificaImagemdentroDosLimiteXmin()) {
|
|
4364
|
+
const diffXmin = this.retornaDiffXmax();
|
|
4365
|
+
this.moveImage(this.imageX - diffXmin);
|
|
4366
|
+
}
|
|
4367
|
+
if (!this.verificaImagemdentroDosLimiteXmax()) {
|
|
4368
|
+
const diffXmax = this.retornaDiffXmin();
|
|
4369
|
+
this.moveImage(this.imageX + diffXmax);
|
|
4370
|
+
}
|
|
4371
|
+
if (!this.verificaImagemdentroDosLimiteYmax()) {
|
|
4372
|
+
const diffYmax = this.retornaDiffYmin();
|
|
4373
|
+
this.moveImage(undefined, this.imageY + diffYmax);
|
|
4374
|
+
}
|
|
4375
|
+
if (!this.verificaImagemdentroDosLimiteYmin()) {
|
|
4376
|
+
const diffYmin = this.retornaDiffYmax();
|
|
4377
|
+
this.moveImage(undefined, this.imageY - diffYmin);
|
|
4378
|
+
}
|
|
4379
|
+
this.redrawCanvas(this.ctx(), this._Image());
|
|
4380
|
+
}
|
|
4381
|
+
verificaImagemdentroDosLimiteXmin() {
|
|
4382
|
+
const newImageX = this.imageX;
|
|
4383
|
+
return newImageX < this.xMin();
|
|
4384
|
+
}
|
|
4385
|
+
verificaImagemdentroDosLimiteXmax() {
|
|
4386
|
+
const newImageX = this.imageX;
|
|
4387
|
+
return newImageX > this.xMax();
|
|
4388
|
+
}
|
|
4389
|
+
verificaImagemdentroDosLimiteYmin() {
|
|
4390
|
+
const newImageY = this.imageY;
|
|
4391
|
+
return newImageY < this.yMin();
|
|
4392
|
+
}
|
|
4393
|
+
verificaImagemdentroDosLimiteYmax() {
|
|
4394
|
+
const newImageY = this.imageY;
|
|
4395
|
+
return newImageY > this.yMax();
|
|
4396
|
+
}
|
|
4397
|
+
retornaDiffXmin() {
|
|
4398
|
+
const newImageX = this.imageX;
|
|
4399
|
+
return this.xMin() - newImageX;
|
|
4400
|
+
}
|
|
4401
|
+
retornaDiffXmax() {
|
|
4402
|
+
const newImageX = this.imageX;
|
|
4403
|
+
return newImageX - this.xMax();
|
|
4404
|
+
}
|
|
4405
|
+
retornaDiffYmin() {
|
|
4406
|
+
const newImageY = this.imageY;
|
|
4407
|
+
return this.yMin() - newImageY;
|
|
4408
|
+
}
|
|
4409
|
+
retornaDiffYmax() {
|
|
4410
|
+
const newImageY = this.imageY;
|
|
4411
|
+
return newImageY - this.yMax();
|
|
4069
4412
|
}
|
|
4070
4413
|
initializeImageMove(canvas, ctx, img) {
|
|
4071
4414
|
let isDragging = false;
|
|
@@ -4076,13 +4419,6 @@ class KvAvatarComponent {
|
|
|
4076
4419
|
this.startX = e.offsetX - this.imageX;
|
|
4077
4420
|
this.startY = e.offsetY - this.imageY;
|
|
4078
4421
|
};
|
|
4079
|
-
canvas.onmousemove = (e) => {
|
|
4080
|
-
if (isDragging) {
|
|
4081
|
-
this.imageX = e.offsetX - this.startX;
|
|
4082
|
-
this.imageY = e.offsetY - this.startY;
|
|
4083
|
-
this.redrawCanvas(ctx, img);
|
|
4084
|
-
}
|
|
4085
|
-
};
|
|
4086
4422
|
canvas.onmouseup = () => {
|
|
4087
4423
|
isDragging = false;
|
|
4088
4424
|
canvas.style.cursor = 'grab';
|
|
@@ -4091,84 +4427,276 @@ class KvAvatarComponent {
|
|
|
4091
4427
|
isDragging = false;
|
|
4092
4428
|
canvas.style.cursor = 'grab';
|
|
4093
4429
|
};
|
|
4094
|
-
|
|
4095
|
-
|
|
4096
|
-
|
|
4097
|
-
|
|
4098
|
-
|
|
4099
|
-
|
|
4100
|
-
|
|
4101
|
-
|
|
4430
|
+
canvas.onmousemove = (e) => {
|
|
4431
|
+
if (isDragging) {
|
|
4432
|
+
// Calcula o novo posicionamento da imagem
|
|
4433
|
+
let newImageX = e.offsetX - this.startX;
|
|
4434
|
+
let newImageY = e.offsetY - this.startY;
|
|
4435
|
+
if (newImageX < this.xMin() && newImageX > this.xMax()) {
|
|
4436
|
+
this.moveImage(newImageX);
|
|
4437
|
+
}
|
|
4438
|
+
if (newImageY < this.yMin() && newImageY > this.yMax()) {
|
|
4439
|
+
this.moveImage(undefined, newImageY);
|
|
4440
|
+
}
|
|
4441
|
+
this.redrawCanvas(ctx, img);
|
|
4442
|
+
}
|
|
4102
4443
|
};
|
|
4103
4444
|
}
|
|
4104
|
-
|
|
4105
|
-
|
|
4106
|
-
|
|
4107
|
-
const cropRadius = this.getCropRadius();
|
|
4108
|
-
const cropX = (ctx.canvas.width - cropRadius * 2) / 2;
|
|
4109
|
-
const cropY = (ctx.canvas.height - cropRadius * 2) / 2;
|
|
4110
|
-
ctx.save();
|
|
4111
|
-
ctx.beginPath();
|
|
4112
|
-
ctx.arc(cropX + cropRadius, cropY + cropRadius, cropRadius, 0, Math.PI * 2, true);
|
|
4113
|
-
ctx.clip();
|
|
4114
|
-
ctx.drawImage(img, this.imageX, this.imageY, img.width * this.scaleFactor, img.height * this.scaleFactor);
|
|
4115
|
-
ctx.restore();
|
|
4445
|
+
moveImage(dx, dy) {
|
|
4446
|
+
this.imageX = (dx ?? this.imageX);
|
|
4447
|
+
this.imageY = (dy ?? this.imageY);
|
|
4116
4448
|
}
|
|
4117
|
-
|
|
4118
|
-
|
|
4119
|
-
|
|
4120
|
-
const
|
|
4121
|
-
|
|
4122
|
-
|
|
4123
|
-
|
|
4124
|
-
|
|
4125
|
-
|
|
4126
|
-
|
|
4127
|
-
|
|
4449
|
+
//#endregion
|
|
4450
|
+
//#region Métodos de corte e fechamento do modal
|
|
4451
|
+
cropImage() {
|
|
4452
|
+
const ctx = this.ctx();
|
|
4453
|
+
if (ctx) {
|
|
4454
|
+
const X = ((this.canvas().width - this._Image().width * this.scaleFactorReadOnly()) / 2);
|
|
4455
|
+
const Y = ((this.canvasHeight() / 2) - (this._Image().height * this.scaleFactorReadOnly()) / 2);
|
|
4456
|
+
// Recuperar o imageData da imagem que está na área de corte
|
|
4457
|
+
let imageData;
|
|
4458
|
+
const cropX = (ctx.canvas.width - this.cutWidth()) / 2;
|
|
4459
|
+
const cropY = (ctx.canvas.height - this.cutHeight()) / 2;
|
|
4460
|
+
if (this._variaviesDialog()?.indCircle) {
|
|
4461
|
+
// Create a new canvas with the same dimensions as the circle
|
|
4462
|
+
const circleCanvas = document.createElement('canvas');
|
|
4463
|
+
const circleCtx = circleCanvas.getContext('2d');
|
|
4464
|
+
circleCanvas.width = this.radius() * 2;
|
|
4465
|
+
circleCanvas.height = this.radius() * 2;
|
|
4466
|
+
// Draw the circle on the new canvas
|
|
4467
|
+
circleCtx.beginPath();
|
|
4468
|
+
circleCtx.arc(this.radius(), this.radius(), this.radius(), 0, 2 * Math.PI);
|
|
4469
|
+
circleCtx.fill();
|
|
4470
|
+
// Set the composite operation to 'destination-in' to cut out the circle
|
|
4471
|
+
ctx.globalCompositeOperation = 'destination-in';
|
|
4472
|
+
// Draw the image on the main canvas using the circle as a mask
|
|
4473
|
+
ctx.drawImage(circleCanvas, cropX, cropY);
|
|
4474
|
+
// Reset the composite operation to the default value
|
|
4475
|
+
ctx.globalCompositeOperation = 'source-over';
|
|
4476
|
+
// Get the image data of the cropped circle
|
|
4477
|
+
imageData = ctx.getImageData(cropX, cropY, this.radius() * 2, this.radius() * 2);
|
|
4478
|
+
}
|
|
4479
|
+
else {
|
|
4480
|
+
imageData = ctx.getImageData(cropX, cropY, this.cutWidth(), this.cutHeight());
|
|
4481
|
+
}
|
|
4482
|
+
// Obter os valores de width e height da variável _variaviesDialog
|
|
4483
|
+
const variaveisDialog = this._variaviesDialog();
|
|
4484
|
+
if (variaveisDialog) {
|
|
4485
|
+
const { width, height } = variaveisDialog;
|
|
4486
|
+
// Criar um novo canvas e contexto com os valores de width e height
|
|
4487
|
+
const newCanvas = document.createElement('canvas');
|
|
4488
|
+
const newCtx = newCanvas.getContext('2d');
|
|
4489
|
+
newCanvas.width = width;
|
|
4490
|
+
newCanvas.height = height;
|
|
4491
|
+
if (newCtx) {
|
|
4492
|
+
// Redimensionar a imagem para o tamanho especificado
|
|
4493
|
+
const tempCanvas = document.createElement('canvas');
|
|
4494
|
+
const tempCtx = tempCanvas.getContext('2d');
|
|
4495
|
+
tempCanvas.width = this.cutWidth();
|
|
4496
|
+
tempCanvas.height = this.cutHeight();
|
|
4497
|
+
tempCtx.putImageData(imageData, 0, 0);
|
|
4498
|
+
newCtx.drawImage(tempCanvas, 0, 0, width, height);
|
|
4499
|
+
window.dispatchEvent(new CustomEvent('cropImage', { detail: {
|
|
4500
|
+
result: Promise.resolve(newCanvas.toDataURL()),
|
|
4501
|
+
status: true
|
|
4502
|
+
} }));
|
|
4503
|
+
this.closeCropModal();
|
|
4504
|
+
}
|
|
4505
|
+
}
|
|
4506
|
+
}
|
|
4128
4507
|
}
|
|
4129
|
-
|
|
4130
|
-
|
|
4131
|
-
const referenceWidth = (this.widthTela + 100); // Largura da tela de referência
|
|
4132
|
-
const scaleFactor = window.innerWidth / referenceWidth; // Fator de escala com base na largura da tela atual
|
|
4133
|
-
const diagonal = Math.sqrt(Math.pow(this.canvasHeight(), 2) + Math.pow(this.canvasWidth(), 2));
|
|
4134
|
-
const calculatedRadius = (diagonal / 4);
|
|
4135
|
-
const maxRadius = baseRadius * scaleFactor; // Ajusta o raio com base no fator de escala
|
|
4136
|
-
return Math.min(calculatedRadius, maxRadius);
|
|
4508
|
+
closeCropModal() {
|
|
4509
|
+
this.dialogInstance.close();
|
|
4137
4510
|
}
|
|
4138
|
-
|
|
4139
|
-
|
|
4140
|
-
|
|
4141
|
-
|
|
4142
|
-
|
|
4143
|
-
|
|
4511
|
+
cancel() {
|
|
4512
|
+
window.dispatchEvent(new CustomEvent('cropImage', { detail: {
|
|
4513
|
+
result: Promise.resolve('cancel'),
|
|
4514
|
+
status: false
|
|
4515
|
+
} }));
|
|
4516
|
+
this.closeCropModal();
|
|
4517
|
+
}
|
|
4518
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: SimpleComponent, deps: [{ token: i1$3.DynamicDialogRef }, { token: i1$3.DialogService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4519
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.8", type: SimpleComponent, isStandalone: true, selector: "app-simple-component", host: { listeners: { "window:resize": "onWindowResize($event)" } }, viewQueries: [{ propertyName: "cropCanvas", first: true, predicate: ["cropCanvas"], descendants: true }, { propertyName: "cropBorder", first: true, predicate: ["cropBorder"], descendants: true }], ngImport: i0, template: `
|
|
4520
|
+
<div class="modal-content">
|
|
4521
|
+
<div class="crop-container">
|
|
4522
|
+
<canvas #cropCanvas class="crop-canvas"></canvas>
|
|
4523
|
+
<div #cropBorder class="crop-border"></div>
|
|
4524
|
+
</div>
|
|
4525
|
+
|
|
4526
|
+
<div class="w-full mt-2">
|
|
4527
|
+
<kv-label label="Zoom" style="text-align: left;" />
|
|
4528
|
+
<p-slider [(ngModel)]="this.scaleFactorModel" [step]="0.000001" [max]="3" (onChange)="onZoomChange($event)"></p-slider>
|
|
4529
|
+
</div>
|
|
4530
|
+
|
|
4531
|
+
<div class="button-container">
|
|
4532
|
+
<kv-button label="Cancelar" severity="tertiary" icon="close" (click)="cancel()"></kv-button>
|
|
4533
|
+
<kv-button label="Recortar" severity="primary" icon="crop" (click)="cropImage()" class="ml-2"></kv-button>
|
|
4534
|
+
</div>
|
|
4535
|
+
|
|
4536
|
+
</div>
|
|
4537
|
+
|
|
4538
|
+
|
|
4539
|
+
|
|
4540
|
+
`, isInline: true, styles: ["img{border-style:solid;border-width:2px;border-radius:50%;object-fit:cover}i{font-size:22px}.botao-alterar-foto{border-style:none;width:max-content;background-color:#002542;color:#000;font-weight:700;cursor:pointer;padding:7px 9px}.botao-alterar-foto i{color:#fff}.botao-excluir-foto{border-style:none;width:max-content;background-color:#002542;color:#000;font-weight:700;cursor:pointer;padding:7px 9px}.botao-excluir-foto i{color:#fff}.btn{position:absolute;top:87%;left:87%;transform:translate(-50%,-50%)}.image-container{display:inline-block;position:relative}.modal-content{position:relative;background-color:#fefefe;margin:1% auto;padding:20px;width:80%;max-width:fit-content;text-align:center;border-radius:12px}.crop-container{display:flex;justify-content:center;align-items:center}.crop-canvas{border:1px solid #d1d5db;border-radius:12px;width:100%;height:auto}.crop-border{position:absolute;border:2px dashed #9ca3af;pointer-events:none}.zoom-container{padding-top:20px;padding-bottom:20px}.button-container{display:flex;align-items:center;justify-content:flex-end;flex-direction:row;margin-top:24px}\n"], dependencies: [{ kind: "ngmodule", type: DialogModule }, { kind: "ngmodule", type: KvModalModule }, { kind: "ngmodule", type: SliderModule }, { kind: "component", type: i2$2.Slider, selector: "p-slider", inputs: ["animate", "disabled", "min", "max", "orientation", "step", "range", "style", "styleClass", "ariaLabel", "ariaLabelledBy", "tabindex", "autofocus"], outputs: ["onChange", "onSlideEnd"] }, { kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ButtonModule }, { kind: "ngmodule", type: FileUploadModule }, { 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: ReactiveFormsModule }, { kind: "ngmodule", type: KvButtonModule }, { kind: "component", type: KvButtonComponent, selector: "kv-button", inputs: ["label", "icon", "loading", "disabled", "severity", "size", "fullWidth"], outputs: ["onClick"] }, { kind: "ngmodule", type: KvLabelModule }, { kind: "component", type: KvLabelComponent, selector: "kv-label", inputs: ["componentId", "label"] }] }); }
|
|
4541
|
+
}
|
|
4542
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: SimpleComponent, decorators: [{
|
|
4543
|
+
type: Component,
|
|
4544
|
+
args: [{ selector: 'app-simple-component', template: `
|
|
4545
|
+
<div class="modal-content">
|
|
4546
|
+
<div class="crop-container">
|
|
4547
|
+
<canvas #cropCanvas class="crop-canvas"></canvas>
|
|
4548
|
+
<div #cropBorder class="crop-border"></div>
|
|
4549
|
+
</div>
|
|
4550
|
+
|
|
4551
|
+
<div class="w-full mt-2">
|
|
4552
|
+
<kv-label label="Zoom" style="text-align: left;" />
|
|
4553
|
+
<p-slider [(ngModel)]="this.scaleFactorModel" [step]="0.000001" [max]="3" (onChange)="onZoomChange($event)"></p-slider>
|
|
4554
|
+
</div>
|
|
4555
|
+
|
|
4556
|
+
<div class="button-container">
|
|
4557
|
+
<kv-button label="Cancelar" severity="tertiary" icon="close" (click)="cancel()"></kv-button>
|
|
4558
|
+
<kv-button label="Recortar" severity="primary" icon="crop" (click)="cropImage()" class="ml-2"></kv-button>
|
|
4559
|
+
</div>
|
|
4560
|
+
|
|
4561
|
+
</div>
|
|
4562
|
+
|
|
4563
|
+
|
|
4564
|
+
|
|
4565
|
+
`, standalone: true, imports: [
|
|
4566
|
+
DialogModule,
|
|
4567
|
+
KvModalModule,
|
|
4568
|
+
SliderModule,
|
|
4569
|
+
CommonModule,
|
|
4570
|
+
ButtonModule,
|
|
4571
|
+
FileUploadModule,
|
|
4572
|
+
SliderModule,
|
|
4573
|
+
FormsModule,
|
|
4574
|
+
ReactiveFormsModule,
|
|
4575
|
+
KvButtonModule,
|
|
4576
|
+
KvLabelModule,
|
|
4577
|
+
], styles: ["img{border-style:solid;border-width:2px;border-radius:50%;object-fit:cover}i{font-size:22px}.botao-alterar-foto{border-style:none;width:max-content;background-color:#002542;color:#000;font-weight:700;cursor:pointer;padding:7px 9px}.botao-alterar-foto i{color:#fff}.botao-excluir-foto{border-style:none;width:max-content;background-color:#002542;color:#000;font-weight:700;cursor:pointer;padding:7px 9px}.botao-excluir-foto i{color:#fff}.btn{position:absolute;top:87%;left:87%;transform:translate(-50%,-50%)}.image-container{display:inline-block;position:relative}.modal-content{position:relative;background-color:#fefefe;margin:1% auto;padding:20px;width:80%;max-width:fit-content;text-align:center;border-radius:12px}.crop-container{display:flex;justify-content:center;align-items:center}.crop-canvas{border:1px solid #d1d5db;border-radius:12px;width:100%;height:auto}.crop-border{position:absolute;border:2px dashed #9ca3af;pointer-events:none}.zoom-container{padding-top:20px;padding-bottom:20px}.button-container{display:flex;align-items:center;justify-content:flex-end;flex-direction:row;margin-top:24px}\n"] }]
|
|
4578
|
+
}], ctorParameters: () => [{ type: i1$3.DynamicDialogRef }, { type: i1$3.DialogService }], propDecorators: { cropCanvas: [{
|
|
4579
|
+
type: ViewChild,
|
|
4580
|
+
args: ['cropCanvas']
|
|
4581
|
+
}], cropBorder: [{
|
|
4582
|
+
type: ViewChild,
|
|
4583
|
+
args: ['cropBorder']
|
|
4584
|
+
}], onWindowResize: [{
|
|
4585
|
+
type: HostListener,
|
|
4586
|
+
args: ['window:resize', ['$event']]
|
|
4587
|
+
}] } });
|
|
4588
|
+
|
|
4589
|
+
class KvAvatarComponent {
|
|
4590
|
+
constructor(imageService, notificationService, imageCutterService) {
|
|
4591
|
+
this.imageService = imageService;
|
|
4592
|
+
this.notificationService = notificationService;
|
|
4593
|
+
this.imageCutterService = imageCutterService;
|
|
4594
|
+
this.borderColor = '#002542';
|
|
4595
|
+
this.btnsColor = '#002542';
|
|
4596
|
+
this.width = 135;
|
|
4597
|
+
this.height = 135;
|
|
4598
|
+
this.btnAlterarFoto = false;
|
|
4599
|
+
this.imageUrlChange = new EventEmitter();
|
|
4600
|
+
this.removerFotoEvent = new EventEmitter();
|
|
4601
|
+
this.file = null;
|
|
4602
|
+
this.existeLogo = false;
|
|
4603
|
+
this.selectedImage = '';
|
|
4604
|
+
this.imageUrl = input(this.imageService.userDefaultImage());
|
|
4605
|
+
this.imageSource = signal(this.imageService.userDefaultImage());
|
|
4606
|
+
this.imageLoaded = signal(false);
|
|
4607
|
+
}
|
|
4608
|
+
ngOnInit() {
|
|
4609
|
+
this.imageSource.set(this.imageUrl());
|
|
4610
|
+
this.carregaImagemInicial();
|
|
4611
|
+
}
|
|
4612
|
+
carregaImagemInicial() {
|
|
4613
|
+
const imageUrl = this.imageUrl();
|
|
4614
|
+
if (imageUrl && (imageUrl.startsWith('data:image') || imageUrl.startsWith('http') || imageUrl.startsWith('https'))) {
|
|
4615
|
+
this.existeLogo = true;
|
|
4616
|
+
}
|
|
4617
|
+
else if (imageUrl && imageUrl.length > 0) {
|
|
4618
|
+
this.existeLogo = true;
|
|
4619
|
+
this.imageSource.set('data:image/jpg;base64,' + imageUrl);
|
|
4620
|
+
}
|
|
4621
|
+
else {
|
|
4622
|
+
this.existeLogo = false;
|
|
4623
|
+
this.imageSource.set(this.imageService.userDefaultImage());
|
|
4144
4624
|
}
|
|
4145
4625
|
}
|
|
4146
|
-
|
|
4147
|
-
|
|
4148
|
-
|
|
4149
|
-
|
|
4150
|
-
|
|
4151
|
-
|
|
4152
|
-
|
|
4153
|
-
img.onload = () => {
|
|
4154
|
-
this.imageLoaded = true;
|
|
4155
|
-
canvas.width = this.retornaTamanhoCanvas();
|
|
4156
|
-
canvas.height = 400;
|
|
4157
|
-
this.imageX = (canvas.width - img.width * this.scaleFactor) / 2;
|
|
4158
|
-
this.imageY = 0; // A imagem começa no topo do canvas
|
|
4159
|
-
this.canvasWidth.set(canvas.width);
|
|
4160
|
-
this.canvasHeight.set(canvas.height);
|
|
4161
|
-
this.redrawCanvas(ctx, img);
|
|
4162
|
-
};
|
|
4626
|
+
onImageLoad() {
|
|
4627
|
+
this.imageLoaded.set(true);
|
|
4628
|
+
}
|
|
4629
|
+
openFile() {
|
|
4630
|
+
const inputElement = document.getElementById('fotoEscolhida');
|
|
4631
|
+
if (inputElement) {
|
|
4632
|
+
inputElement.click();
|
|
4163
4633
|
}
|
|
4164
4634
|
}
|
|
4165
|
-
|
|
4166
|
-
|
|
4635
|
+
changeImage(event) {
|
|
4636
|
+
const file = event.target.files[0];
|
|
4637
|
+
if (file.type.startsWith('image/')) {
|
|
4638
|
+
if (this.btnAlterarFoto == true) {
|
|
4639
|
+
this.file = file;
|
|
4640
|
+
const reader = new FileReader();
|
|
4641
|
+
reader.onload = async () => {
|
|
4642
|
+
try {
|
|
4643
|
+
const result = await this.imageCutterService.cut(reader.result?.toString() ?? '', this.width, this.height, true);
|
|
4644
|
+
this.existeLogo = true;
|
|
4645
|
+
this.imageSource.set(result);
|
|
4646
|
+
this.selectedImage = result;
|
|
4647
|
+
this.imageUrlChange.emit(this.imageSource());
|
|
4648
|
+
}
|
|
4649
|
+
catch (error) {
|
|
4650
|
+
this.removerFoto();
|
|
4651
|
+
}
|
|
4652
|
+
};
|
|
4653
|
+
reader.readAsDataURL(file);
|
|
4654
|
+
}
|
|
4655
|
+
else {
|
|
4656
|
+
// ?! Comportamneto padrão --> Preservar <-- !!!
|
|
4657
|
+
this.file = file;
|
|
4658
|
+
const reader = new FileReader();
|
|
4659
|
+
reader.onload = (e) => {
|
|
4660
|
+
this.imageSource.set(reader.result + '');
|
|
4661
|
+
};
|
|
4662
|
+
reader.readAsDataURL(file);
|
|
4663
|
+
this.imageUrlChange.emit(this.imageSource());
|
|
4664
|
+
}
|
|
4665
|
+
}
|
|
4666
|
+
else {
|
|
4667
|
+
this.notificationService.toastError('Apenas arquivos de imagem são permitidos.');
|
|
4668
|
+
}
|
|
4669
|
+
}
|
|
4670
|
+
questionRemoverFoto() {
|
|
4671
|
+
const msg = '<h3>Você tem certeza que deseja retirar a foto desse usuário?</h3>';
|
|
4672
|
+
this.notificationService.question({
|
|
4673
|
+
type: 'question',
|
|
4674
|
+
message: msg,
|
|
4675
|
+
accept: (data) => {
|
|
4676
|
+
this.removerFoto();
|
|
4677
|
+
},
|
|
4678
|
+
reject: (data) => {
|
|
4679
|
+
}
|
|
4680
|
+
});
|
|
4681
|
+
}
|
|
4682
|
+
removerFoto() {
|
|
4683
|
+
this.imageSource.set('');
|
|
4684
|
+
this.removerFotoEvent.emit();
|
|
4685
|
+
this.existeLogo = false;
|
|
4686
|
+
this.imageUrlChange.emit(this.imageSource());
|
|
4687
|
+
this.fileInput.nativeElement.value = '';
|
|
4688
|
+
}
|
|
4689
|
+
handleImageError(event) {
|
|
4690
|
+
this.imageLoaded.set(true);
|
|
4691
|
+
event.target.src = this.imageService.userDefaultImage();
|
|
4692
|
+
}
|
|
4693
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvAvatarComponent, deps: [{ token: ImagensService }, { token: NotificationService }, { token: ImageCutterService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4694
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "17.3.8", type: KvAvatarComponent, selector: "kv-avatar", inputs: { borderColor: { classPropertyName: "borderColor", publicName: "borderColor", isSignal: false, isRequired: false, transformFunction: null }, btnsColor: { classPropertyName: "btnsColor", publicName: "btnsColor", isSignal: false, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: false, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: false, isRequired: false, transformFunction: null }, btnAlterarFoto: { classPropertyName: "btnAlterarFoto", publicName: "btnAlterarFoto", isSignal: false, isRequired: false, transformFunction: null }, imageUrl: { classPropertyName: "imageUrl", publicName: "imageUrl", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { imageUrlChange: "imageUrlChange", removerFotoEvent: "removerFotoEvent" }, viewQueries: [{ propertyName: "fileInput", first: true, predicate: ["fileInput"], descendants: true }], ngImport: i0, template: "<div class=\"image-container\" [style.width.px]=\"width\" [style.height.px]=\"height\" >\r\n\r\n <img\r\n [src]=\"imageSource()\"\r\n (load)=\"onImageLoad()\"\r\n (error)=\"handleImageError($event)\"\r\n alt=\"Foto\"\r\n class=\"container-foto\"\r\n [style.border-color]=\"borderColor\"\r\n [style.width.px]=\"width\"\r\n [style.height.px]=\"height\"\r\n >\r\n\r\n <div class=\"btn\">\r\n <input #fileInput *ngIf=\"btnAlterarFoto\" id=\"fotoEscolhida\" type=\"file\" accept=\"image/*\" style=\"display:none\" (change)=\"changeImage($any($event))\">\r\n\r\n <button *ngIf=\"btnAlterarFoto && !existeLogo\"\r\n class=\"botao-alterar-foto border-circle\"\r\n [style.background-color]=\"btnsColor\" (click)=\"openFile()\">\r\n <i class=\"material-symbols-outlined\">photo_camera</i>\r\n </button>\r\n\r\n <button *ngIf=\"btnAlterarFoto && existeLogo\" [style.background-color]=\"btnsColor\"\r\n class=\"botao-excluir-foto border-circle\r\n hover:shadow-3\r\n active:shadow-5\"\r\n (click)=\"questionRemoverFoto()\">\r\n <i class=\"material-symbols-outlined\">delete</i>\r\n </button>\r\n </div>\r\n\r\n <ngx-loading [show]=\"!imageLoaded()\" full class=\"container-foto\" [config]=\"{backdropBorderRadius: '100%', fullScreenBackdrop: false }\"></ngx-loading>\r\n\r\n</div>\r\n", styles: ["@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}img{border-style:solid;border-width:2px;border-radius:50%;object-fit:cover}i{font-size:22px}.botao-alterar-foto{border-style:none;width:max-content;background-color:#002542;color:#000;font-weight:700;cursor:pointer;padding:7px 9px}.botao-alterar-foto i{color:#fff}.botao-excluir-foto{border-style:none;width:max-content;background-color:#002542;color:#000;font-weight:700;cursor:pointer;padding:7px 9px}.botao-excluir-foto i{color:#fff}.btn{position:absolute;top:87%;left:87%;transform:translate(-50%,-50%)}.image-container{display:inline-block;position:relative}.modal{display:block;position:absolute;z-index:9999;left:0;top:0;width:100vw;height:100vh;overflow:auto;background-color:#0006}.modal-content{background-color:#fefefe;margin:1% auto;padding:20px;border:1px solid #888;width:80%;max-width:fit-content;text-align:center;border-radius:12px}.crop-container{display:flex;justify-content:center;align-items:center}.crop-canvas{border:1px solid black;border-radius:12px;width:100%;height:auto}.crop-border{position:absolute;border:2px solid black;border-radius:50%;pointer-events:none}.zoom-container{padding-top:20px;padding-bottom:20px}.button-container{display:flex;align-items:center;justify-content:flex-end;flex-direction:row;margin-top:24px}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i1$5.NgxLoadingComponent, selector: "ngx-loading", inputs: ["show", "config", "template"] }] }); }
|
|
4167
4695
|
}
|
|
4168
4696
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvAvatarComponent, decorators: [{
|
|
4169
4697
|
type: Component,
|
|
4170
|
-
args: [{ selector: 'kv-avatar', template: "<div class=\"image-container\">\r\n <img
|
|
4171
|
-
}], ctorParameters: () => [{ type: ImagensService }, { type: NotificationService }], propDecorators: { borderColor: [{
|
|
4698
|
+
args: [{ selector: 'kv-avatar', template: "<div class=\"image-container\" [style.width.px]=\"width\" [style.height.px]=\"height\" >\r\n\r\n <img\r\n [src]=\"imageSource()\"\r\n (load)=\"onImageLoad()\"\r\n (error)=\"handleImageError($event)\"\r\n alt=\"Foto\"\r\n class=\"container-foto\"\r\n [style.border-color]=\"borderColor\"\r\n [style.width.px]=\"width\"\r\n [style.height.px]=\"height\"\r\n >\r\n\r\n <div class=\"btn\">\r\n <input #fileInput *ngIf=\"btnAlterarFoto\" id=\"fotoEscolhida\" type=\"file\" accept=\"image/*\" style=\"display:none\" (change)=\"changeImage($any($event))\">\r\n\r\n <button *ngIf=\"btnAlterarFoto && !existeLogo\"\r\n class=\"botao-alterar-foto border-circle\"\r\n [style.background-color]=\"btnsColor\" (click)=\"openFile()\">\r\n <i class=\"material-symbols-outlined\">photo_camera</i>\r\n </button>\r\n\r\n <button *ngIf=\"btnAlterarFoto && existeLogo\" [style.background-color]=\"btnsColor\"\r\n class=\"botao-excluir-foto border-circle\r\n hover:shadow-3\r\n active:shadow-5\"\r\n (click)=\"questionRemoverFoto()\">\r\n <i class=\"material-symbols-outlined\">delete</i>\r\n </button>\r\n </div>\r\n\r\n <ngx-loading [show]=\"!imageLoaded()\" full class=\"container-foto\" [config]=\"{backdropBorderRadius: '100%', fullScreenBackdrop: false }\"></ngx-loading>\r\n\r\n</div>\r\n", styles: ["@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}img{border-style:solid;border-width:2px;border-radius:50%;object-fit:cover}i{font-size:22px}.botao-alterar-foto{border-style:none;width:max-content;background-color:#002542;color:#000;font-weight:700;cursor:pointer;padding:7px 9px}.botao-alterar-foto i{color:#fff}.botao-excluir-foto{border-style:none;width:max-content;background-color:#002542;color:#000;font-weight:700;cursor:pointer;padding:7px 9px}.botao-excluir-foto i{color:#fff}.btn{position:absolute;top:87%;left:87%;transform:translate(-50%,-50%)}.image-container{display:inline-block;position:relative}.modal{display:block;position:absolute;z-index:9999;left:0;top:0;width:100vw;height:100vh;overflow:auto;background-color:#0006}.modal-content{background-color:#fefefe;margin:1% auto;padding:20px;border:1px solid #888;width:80%;max-width:fit-content;text-align:center;border-radius:12px}.crop-container{display:flex;justify-content:center;align-items:center}.crop-canvas{border:1px solid black;border-radius:12px;width:100%;height:auto}.crop-border{position:absolute;border:2px solid black;border-radius:50%;pointer-events:none}.zoom-container{padding-top:20px;padding-bottom:20px}.button-container{display:flex;align-items:center;justify-content:flex-end;flex-direction:row;margin-top:24px}\n"] }]
|
|
4699
|
+
}], ctorParameters: () => [{ type: ImagensService }, { type: NotificationService }, { type: ImageCutterService }], propDecorators: { borderColor: [{
|
|
4172
4700
|
type: Input
|
|
4173
4701
|
}], btnsColor: [{
|
|
4174
4702
|
type: Input
|
|
@@ -4176,71 +4704,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImpor
|
|
|
4176
4704
|
type: Input
|
|
4177
4705
|
}], height: [{
|
|
4178
4706
|
type: Input
|
|
4707
|
+
}], btnAlterarFoto: [{
|
|
4708
|
+
type: Input
|
|
4179
4709
|
}], imageUrlChange: [{
|
|
4180
4710
|
type: Output
|
|
4181
|
-
}], onModalOpen: [{
|
|
4182
|
-
type: Output
|
|
4183
4711
|
}], removerFotoEvent: [{
|
|
4184
4712
|
type: Output
|
|
4185
|
-
}], btnAlterarFoto: [{
|
|
4186
|
-
type: Input
|
|
4187
|
-
}], cropCanvas: [{
|
|
4188
|
-
type: ViewChild,
|
|
4189
|
-
args: ['cropCanvas']
|
|
4190
|
-
}], cropBorder: [{
|
|
4191
|
-
type: ViewChild,
|
|
4192
|
-
args: ['cropBorder']
|
|
4193
4713
|
}], fileInput: [{
|
|
4194
4714
|
type: ViewChild,
|
|
4195
4715
|
args: ['fileInput']
|
|
4196
|
-
}], onWindowResize: [{
|
|
4197
|
-
type: HostListener,
|
|
4198
|
-
args: ['window:resize', ['$event']]
|
|
4199
4716
|
}] } });
|
|
4200
4717
|
|
|
4201
|
-
class KvButtonModule {
|
|
4202
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
4203
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.8", ngImport: i0, type: KvButtonModule, declarations: [KvButtonComponent], imports: [CommonModule,
|
|
4204
|
-
PrimeNgModule], exports: [KvButtonComponent] }); }
|
|
4205
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvButtonModule, imports: [CommonModule,
|
|
4206
|
-
PrimeNgModule] }); }
|
|
4207
|
-
}
|
|
4208
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvButtonModule, decorators: [{
|
|
4209
|
-
type: NgModule,
|
|
4210
|
-
args: [{
|
|
4211
|
-
declarations: [
|
|
4212
|
-
KvButtonComponent
|
|
4213
|
-
],
|
|
4214
|
-
imports: [
|
|
4215
|
-
CommonModule,
|
|
4216
|
-
PrimeNgModule
|
|
4217
|
-
],
|
|
4218
|
-
exports: [
|
|
4219
|
-
KvButtonComponent
|
|
4220
|
-
]
|
|
4221
|
-
}]
|
|
4222
|
-
}] });
|
|
4223
|
-
|
|
4224
|
-
class KvLabelModule {
|
|
4225
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvLabelModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
4226
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.8", ngImport: i0, type: KvLabelModule, declarations: [KvLabelComponent], imports: [CommonModule], exports: [KvLabelComponent] }); }
|
|
4227
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvLabelModule, imports: [CommonModule] }); }
|
|
4228
|
-
}
|
|
4229
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvLabelModule, decorators: [{
|
|
4230
|
-
type: NgModule,
|
|
4231
|
-
args: [{
|
|
4232
|
-
declarations: [
|
|
4233
|
-
KvLabelComponent
|
|
4234
|
-
],
|
|
4235
|
-
imports: [
|
|
4236
|
-
CommonModule
|
|
4237
|
-
],
|
|
4238
|
-
exports: [
|
|
4239
|
-
KvLabelComponent
|
|
4240
|
-
]
|
|
4241
|
-
}]
|
|
4242
|
-
}] });
|
|
4243
|
-
|
|
4244
4718
|
class KvAvatarModule {
|
|
4245
4719
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvAvatarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
4246
4720
|
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.8", ngImport: i0, type: KvAvatarModule, declarations: [KvAvatarComponent], imports: [CommonModule,
|
|
@@ -4250,7 +4724,8 @@ class KvAvatarModule {
|
|
|
4250
4724
|
FormsModule,
|
|
4251
4725
|
ReactiveFormsModule,
|
|
4252
4726
|
KvButtonModule,
|
|
4253
|
-
KvLabelModule
|
|
4727
|
+
KvLabelModule,
|
|
4728
|
+
NgxLoadingModule], exports: [KvAvatarComponent] }); }
|
|
4254
4729
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvAvatarModule, imports: [CommonModule,
|
|
4255
4730
|
ButtonModule,
|
|
4256
4731
|
FileUploadModule,
|
|
@@ -4258,7 +4733,8 @@ class KvAvatarModule {
|
|
|
4258
4733
|
FormsModule,
|
|
4259
4734
|
ReactiveFormsModule,
|
|
4260
4735
|
KvButtonModule,
|
|
4261
|
-
KvLabelModule
|
|
4736
|
+
KvLabelModule,
|
|
4737
|
+
NgxLoadingModule] }); }
|
|
4262
4738
|
}
|
|
4263
4739
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvAvatarModule, decorators: [{
|
|
4264
4740
|
type: NgModule,
|
|
@@ -4275,6 +4751,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImpor
|
|
|
4275
4751
|
ReactiveFormsModule,
|
|
4276
4752
|
KvButtonModule,
|
|
4277
4753
|
KvLabelModule,
|
|
4754
|
+
NgxLoadingModule
|
|
4278
4755
|
],
|
|
4279
4756
|
exports: [
|
|
4280
4757
|
KvAvatarComponent
|
|
@@ -4402,7 +4879,7 @@ class KvCarouselComponent {
|
|
|
4402
4879
|
window.open(link, '_blank');
|
|
4403
4880
|
}
|
|
4404
4881
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvCarouselComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4405
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "17.3.8", type: KvCarouselComponent, selector: "kv-carousel", inputs: { heightCarousel: { classPropertyName: "heightCarousel", publicName: "heightCarousel", isSignal: true, isRequired: false, transformFunction: null }, carouselData: { classPropertyName: "carouselData", publicName: "carouselData", isSignal: false, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "carouselContainer", first: true, predicate: Carousel, descendants: true, isSignal: true }], ngImport: i0, template: "<p-carousel\r\n [value]=\"carouselData\"\r\n [indicatorStyleClass]=\"'carousel-indicator'\"\r\n [autoplayInterval]=\"5000\"\r\n [showIndicators]=\"true\"\r\n [showNavigators]=\"false\"\r\n [numVisible]=\"1\"\r\n [numScroll]=\"1\"\r\n [circular]=\"true\"\r\n styleClass=\"h-full\"\r\n>\r\n >\r\n <ng-template\r\n pTemplate=\"item\"\r\n let-banner\r\n class=\"justify-content-center align-items-center\"\r\n >\r\n <img\r\n [src]=\"banner.img\"\r\n class=\"w-full border-round-banner\"\r\n [style.height.px]=\"heightComputed()\"\r\n (click)=\"navigateToLink(banner.link)\"\r\n />\r\n </ng-template>\r\n</p-carousel>\r\n", styles: ["::ng-deep .p-carousel-indicators{position:absolute;left:50%;transform:translate(-50%);bottom:-1rem}::ng-deep .carousel-indicator{width:15px!important;height:4px!important;margin:-3px!important;padding:0!important;background-color:#eeeeeed0}::ng-deep .carousel-indicator:hover{background-color:#efefef}button.p-carousel-indicator.p-link{background-color:#f0f8ff!important}::ng-deep .p-carousel .p-carousel-content{overflow:hidden!important;position:relative}::ng-deep .border-round-banner{border-radius:20px!important;max-height:500px}\n"], dependencies: [{ kind: "directive", type: i1$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i2$
|
|
4882
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "17.3.8", type: KvCarouselComponent, selector: "kv-carousel", inputs: { heightCarousel: { classPropertyName: "heightCarousel", publicName: "heightCarousel", isSignal: true, isRequired: false, transformFunction: null }, carouselData: { classPropertyName: "carouselData", publicName: "carouselData", isSignal: false, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "carouselContainer", first: true, predicate: Carousel, descendants: true, isSignal: true }], ngImport: i0, template: "<p-carousel\r\n [value]=\"carouselData\"\r\n [indicatorStyleClass]=\"'carousel-indicator'\"\r\n [autoplayInterval]=\"5000\"\r\n [showIndicators]=\"true\"\r\n [showNavigators]=\"false\"\r\n [numVisible]=\"1\"\r\n [numScroll]=\"1\"\r\n [circular]=\"true\"\r\n styleClass=\"h-full\"\r\n>\r\n >\r\n <ng-template\r\n pTemplate=\"item\"\r\n let-banner\r\n class=\"justify-content-center align-items-center\"\r\n >\r\n <img\r\n [src]=\"banner.img\"\r\n class=\"w-full border-round-banner\"\r\n [style.height.px]=\"heightComputed()\"\r\n (click)=\"navigateToLink(banner.link)\"\r\n />\r\n </ng-template>\r\n</p-carousel>\r\n", styles: ["::ng-deep .p-carousel-indicators{position:absolute;left:50%;transform:translate(-50%);bottom:-1rem}::ng-deep .carousel-indicator{width:15px!important;height:4px!important;margin:-3px!important;padding:0!important;background-color:#eeeeeed0}::ng-deep .carousel-indicator:hover{background-color:#efefef}button.p-carousel-indicator.p-link{background-color:#f0f8ff!important}::ng-deep .p-carousel .p-carousel-content{overflow:hidden!important;position:relative}::ng-deep .border-round-banner{border-radius:20px!important;max-height:500px}\n"], dependencies: [{ kind: "directive", type: i1$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i2$3.Carousel, selector: "p-carousel", inputs: ["page", "numVisible", "numScroll", "responsiveOptions", "orientation", "verticalViewPortHeight", "contentClass", "indicatorsContentClass", "indicatorsContentStyle", "indicatorStyleClass", "indicatorStyle", "value", "circular", "showIndicators", "showNavigators", "autoplayInterval", "style", "styleClass"], outputs: ["onPage"] }] }); }
|
|
4406
4883
|
}
|
|
4407
4884
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvCarouselComponent, decorators: [{
|
|
4408
4885
|
type: Component,
|
|
@@ -5001,7 +5478,7 @@ class KvSelectButtonComponent {
|
|
|
5001
5478
|
this.optionClick.emit(event);
|
|
5002
5479
|
}
|
|
5003
5480
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvSelectButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5004
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.8", type: KvSelectButtonComponent, selector: "kv-select-button", inputs: { formGroup: "formGroup", formControlName: "formControlName", options: "options", optionLabel: "optionLabel", optionValue: "optionValue", mutiple: "mutiple", disabled: "disabled", value: "value" }, outputs: { onSelectionChange: "onSelectionChange", optionClick: "optionClick" }, ngImport: i0, template: "@if(value) {\r\n<p-selectButton\r\n [options]=\"options\"\r\n [optionLabel]=\"optionLabel\"\r\n [optionValue]=\"optionValue\"\r\n (onChange)=\"selectionChange($event)\"\r\n (onOptionClick)=\"onOptionClick($event)\"\r\n [multiple]=\"mutiple\"\r\n [disabled]=\"disabled\"\r\n [(ngModel)]=\"value\"\r\n/>\r\n} @else {\r\n<div [formGroup]=\"formGroup\">\r\n <p-selectButton\r\n [options]=\"options\"\r\n [optionLabel]=\"optionLabel\"\r\n [optionValue]=\"optionValue\"\r\n (onChange)=\"selectionChange($event)\"\r\n (onOptionClick)=\"onOptionClick($event)\"\r\n [multiple]=\"mutiple\"\r\n [disabled]=\"disabled\"\r\n [formControlName]=\"formControlName\"\r\n [(ngModel)]=\"value\"\r\n />\r\n</div>\r\n}", styles: [":host ::ng-deep .p-selectbutton .p-button.p-highlight{background:#183462!important;border:#183462;box-shadow:0 4px 10px #00000008,0 0 2px #0000000f,0 2px 6px #0000001f}\n"], dependencies: [{ kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2$
|
|
5481
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.8", type: KvSelectButtonComponent, selector: "kv-select-button", inputs: { formGroup: "formGroup", formControlName: "formControlName", options: "options", optionLabel: "optionLabel", optionValue: "optionValue", mutiple: "mutiple", disabled: "disabled", value: "value" }, outputs: { onSelectionChange: "onSelectionChange", optionClick: "optionClick" }, ngImport: i0, template: "@if(value) {\r\n<p-selectButton\r\n [options]=\"options\"\r\n [optionLabel]=\"optionLabel\"\r\n [optionValue]=\"optionValue\"\r\n (onChange)=\"selectionChange($event)\"\r\n (onOptionClick)=\"onOptionClick($event)\"\r\n [multiple]=\"mutiple\"\r\n [disabled]=\"disabled\"\r\n [(ngModel)]=\"value\"\r\n/>\r\n} @else {\r\n<div [formGroup]=\"formGroup\">\r\n <p-selectButton\r\n [options]=\"options\"\r\n [optionLabel]=\"optionLabel\"\r\n [optionValue]=\"optionValue\"\r\n (onChange)=\"selectionChange($event)\"\r\n (onOptionClick)=\"onOptionClick($event)\"\r\n [multiple]=\"mutiple\"\r\n [disabled]=\"disabled\"\r\n [formControlName]=\"formControlName\"\r\n [(ngModel)]=\"value\"\r\n />\r\n</div>\r\n}", styles: [":host ::ng-deep .p-selectbutton .p-button.p-highlight{background:#183462!important;border:#183462;box-shadow:0 4px 10px #00000008,0 0 2px #0000000f,0 2px 6px #0000001f}\n"], dependencies: [{ kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2$4.SelectButton, selector: "p-selectButton", inputs: ["options", "optionLabel", "optionValue", "optionDisabled", "unselectable", "tabindex", "multiple", "allowEmpty", "style", "styleClass", "ariaLabelledBy", "disabled", "dataKey", "autofocus"], outputs: ["onOptionClick", "onChange"] }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }] }); }
|
|
5005
5482
|
}
|
|
5006
5483
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvSelectButtonComponent, decorators: [{
|
|
5007
5484
|
type: Component,
|
|
@@ -5592,112 +6069,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImpor
|
|
|
5592
6069
|
}]
|
|
5593
6070
|
}] });
|
|
5594
6071
|
|
|
5595
|
-
class KvModalComponent {
|
|
5596
|
-
constructor(dynamicDialogRef) {
|
|
5597
|
-
this.dynamicDialogRef = dynamicDialogRef;
|
|
5598
|
-
/**
|
|
5599
|
-
* Ações do Dialog
|
|
5600
|
-
*/
|
|
5601
|
-
this.actions = [];
|
|
5602
|
-
this.actionsPosition = 'right';
|
|
5603
|
-
this.justify_content = 'justify-content-start';
|
|
5604
|
-
}
|
|
5605
|
-
ngOnInit() {
|
|
5606
|
-
this.addSubTitle();
|
|
5607
|
-
this.setMarginBottom();
|
|
5608
|
-
this.defPositionButtons();
|
|
5609
|
-
}
|
|
5610
|
-
onWindowResize() {
|
|
5611
|
-
this.setMarginBottom();
|
|
5612
|
-
}
|
|
5613
|
-
/**
|
|
5614
|
-
* Adiciona sub-título à tela
|
|
5615
|
-
*/
|
|
5616
|
-
addSubTitle() {
|
|
5617
|
-
if (this.subtitle) {
|
|
5618
|
-
const headerElement = document.querySelector('.p-dialog .p-dialog-header');
|
|
5619
|
-
if (headerElement) {
|
|
5620
|
-
const subtitleElement = document.createElement('span');
|
|
5621
|
-
subtitleElement.textContent = this.subtitle;
|
|
5622
|
-
subtitleElement.style.fontSize = '0.75rem';
|
|
5623
|
-
subtitleElement.style.width = '100%';
|
|
5624
|
-
subtitleElement.style.marginLeft = '2px';
|
|
5625
|
-
headerElement.appendChild(subtitleElement);
|
|
5626
|
-
}
|
|
5627
|
-
if (this.subHeader) {
|
|
5628
|
-
const headerElement = document.querySelector('.p-dialog .p-dialog-header');
|
|
5629
|
-
const subHeader = this.subHeader.nativeElement;
|
|
5630
|
-
if (headerElement && this.subHeader) {
|
|
5631
|
-
subHeader.style.width = '100%';
|
|
5632
|
-
subHeader.style.marginLeft = '2px';
|
|
5633
|
-
headerElement.appendChild(this.subHeader.nativeElement);
|
|
5634
|
-
}
|
|
5635
|
-
}
|
|
5636
|
-
}
|
|
5637
|
-
}
|
|
5638
|
-
defPositionButtons() {
|
|
5639
|
-
if (this.actionsPosition === 'right') {
|
|
5640
|
-
this.justify_content = 'justify-content-end';
|
|
5641
|
-
}
|
|
5642
|
-
if (this.actionsPosition === 'center') {
|
|
5643
|
-
this.justify_content = 'justify-content-center';
|
|
5644
|
-
}
|
|
5645
|
-
if (this.actionsPosition === 'left') {
|
|
5646
|
-
this.justify_content = 'justify-content-start';
|
|
5647
|
-
}
|
|
5648
|
-
}
|
|
5649
|
-
setMarginBottom() {
|
|
5650
|
-
let actionsFieldHeight = document.getElementById('actions-field')?.offsetHeight;
|
|
5651
|
-
let divBox = document.getElementById('content-modal');
|
|
5652
|
-
if (divBox) {
|
|
5653
|
-
if (actionsFieldHeight) {
|
|
5654
|
-
divBox.style.marginBottom = `${actionsFieldHeight + 30}px`;
|
|
5655
|
-
}
|
|
5656
|
-
else {
|
|
5657
|
-
divBox.style.marginBottom = `50px`;
|
|
5658
|
-
}
|
|
5659
|
-
}
|
|
5660
|
-
}
|
|
5661
|
-
clickExecute(action) {
|
|
5662
|
-
if (action.command) {
|
|
5663
|
-
action.command();
|
|
5664
|
-
if (action.closeAfterClick != false)
|
|
5665
|
-
this.dynamicDialogRef.close();
|
|
5666
|
-
}
|
|
5667
|
-
}
|
|
5668
|
-
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 }); }
|
|
5669
|
-
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"] }] }); }
|
|
5670
|
-
}
|
|
5671
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvModalComponent, decorators: [{
|
|
5672
|
-
type: Component,
|
|
5673
|
-
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"] }]
|
|
5674
|
-
}], ctorParameters: () => [{ type: i1$3.DynamicDialogRef }], propDecorators: { actions: [{
|
|
5675
|
-
type: Input
|
|
5676
|
-
}], actionsPosition: [{
|
|
5677
|
-
type: Input
|
|
5678
|
-
}], subtitle: [{
|
|
5679
|
-
type: Input
|
|
5680
|
-
}], subHeader: [{
|
|
5681
|
-
type: Input
|
|
5682
|
-
}], onWindowResize: [{
|
|
5683
|
-
type: HostListener,
|
|
5684
|
-
args: ['window:resize', ['$event']]
|
|
5685
|
-
}] } });
|
|
5686
|
-
|
|
5687
|
-
class KvModalModule {
|
|
5688
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvModalModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
5689
|
-
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] }); }
|
|
5690
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvModalModule, imports: [CommonModule, PrimeNgModule, KvButtonModule] }); }
|
|
5691
|
-
}
|
|
5692
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvModalModule, decorators: [{
|
|
5693
|
-
type: NgModule,
|
|
5694
|
-
args: [{
|
|
5695
|
-
declarations: [KvModalComponent],
|
|
5696
|
-
imports: [CommonModule, PrimeNgModule, KvButtonModule],
|
|
5697
|
-
exports: [KvModalComponent],
|
|
5698
|
-
}]
|
|
5699
|
-
}] });
|
|
5700
|
-
|
|
5701
6072
|
class KvOrgchartComponent {
|
|
5702
6073
|
constructor(renderer) {
|
|
5703
6074
|
this.renderer = renderer;
|
|
@@ -6507,11 +6878,11 @@ class KvTableEditComponent extends BasecomponentTable {
|
|
|
6507
6878
|
}
|
|
6508
6879
|
}
|
|
6509
6880
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvTableEditComponent, deps: [{ token: i1.DatePipe }, { token: i1.DecimalPipe }, { token: CpfCnpjPipe }, { token: TelefonePipe }, { token: NotificationService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
6510
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.8", type: KvTableEditComponent, selector: "kv-table-edit", inputs: { enableSizes: "enableSizes", editMode: "editMode" }, outputs: { onSave: "onSave", filterField: "filterField" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div class=\"card\" id=\"tamanhotabela\" [style.font-size]=\"'1px'\">\r\n <p-toast></p-toast>\r\n\r\n @if(filtrosAvancados){\r\n <p-panel\r\n header=\"Filtros avan\u00E7ados\"\r\n [toggleable]=\"true\"\r\n [collapsed]=\"true\"\r\n (collapsedChange)=\"collapsed = !collapsed\"\r\n [style]=\"{ 'margin-bottom': '2px' }\"\r\n >\r\n <ng-template pTemplate=\"headericons\">\r\n @if (!collapsed) {\r\n <i class=\"pi pi-filter\"></i>\r\n }\r\n <!-- \u00CDcone quando o painel est\u00E1 aberto -->\r\n @if (collapsed) {\r\n <i class=\"pi pi-minus\"></i>\r\n }\r\n <!-- \u00CDcone quando o painel est\u00E1 fechado -->\r\n </ng-template>\r\n <ng-content></ng-content>\r\n </p-panel>\r\n }\r\n\r\n <p-contextMenu #cm [model]=\"itemsContextMenu\"></p-contextMenu>\r\n <p-table\r\n #te\r\n [editMode]=\"editMode\"\r\n (onEditComplete)=\"onEditComplete($event)\"\r\n (onEditInit)=\"onEditInit($event)\"\r\n [reorderableColumns]=\"config.reorderableColumns || false\"\r\n *ngIf=\"config\"\r\n [value]=\"dataSource\"\r\n [dataKey]=\"config.dataKey\"\r\n [columns]=\"config.columns\"\r\n [scrollable]=\"true\"\r\n appendTo=\"body\"\r\n [styleClass]=\"selectedSize.class\"\r\n [(selection)]=\"selectedItems\"\r\n [rowSelectable]=\"isRowSelectable\"\r\n [globalFilterFields]=\"globalFilterFields\"\r\n [rows]=\"rows\"\r\n [paginator]=\"paginator\"\r\n [rowsPerPageOptions]=\"rowsPerPageOptions\"\r\n [showCurrentPageReport]=\"true\"\r\n currentPageReportTemplate=\"{first} - {last} de {totalRecords}\"\r\n (selectionChange)=\"selectionChange($event)\"\r\n [rowHover]=\"true\"\r\n [totalRecords]=\"totalRecords\"\r\n [lazy]=\"config.lazy\"\r\n (onLazyLoad)=\"paginate($event)\"\r\n [groupRowsBy]=\"config.fieldGroup\"\r\n paginatorDropdownAppendTo=\"body\"\r\n [showFirstLastIcon]=\"showFirstLastIcon\"\r\n [pageLinks]=\"pageLinksOptions\"\r\n [scrollable]=\"isTableScrollable\"\r\n [scrollHeight]=\"scrollHeight\"\r\n [rowTrackBy]=\"rowTrackBy\"\r\n [(contextMenuSelection)]=\"selectedProduct\"\r\n [contextMenu]=\"isEditableTable() ? cm : null\"\r\n >\r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n\r\n @if (config.enableCation || enableSizes){\r\n <ng-template pTemplate=\"caption\">\r\n <div\r\n class=\"flex flex-row flex-wrap justify-content-between align-items-center grid formgrid p-fluid col-12 pt-1 pb-1 m-0\"\r\n >\r\n <div class=\"col-12 flex flex-column\">\r\n @if (config.title) {\r\n <div class=\"text-md font-bold my-3\">\r\n {{ config.title }}\r\n </div>\r\n } @if (config.subtitle) {\r\n <div class=\"text-sm mb-4 font-medium\">\r\n {{ config.subtitle }}\r\n </div>\r\n }\r\n </div>\r\n\r\n <div\r\n class=\"flex flex-row align-items-center md:col-6 lg:col-4 {{\r\n tamanhoTela < 768 ? 'col-10' : 'col-12'\r\n }} mt-1 mb-2 gap-1\"\r\n >\r\n \r\n @if (config.enableFilter) {\r\n <span class=\"p-input-icon-left\">\r\n <i class=\"pi pi-search\"></i>\r\n \r\n <input\r\n pInputText\r\n pAutoFocus\r\n [autofocus]=\"true\"\r\n type=\"text\"\r\n (input)=\"onGlobalFilter(te, $event)\"\r\n placeholder=\"Pesquisar...\"\r\n class=\"h-2rem\"\r\n autocomplete=\"off\"\r\n />\r\n </span>\r\n }\r\n\r\n @if(enableSizes){\r\n <div class=\"sizes-controls\">\r\n \r\n <kv-button (click)=\"menu.toggle($event)\"\r\n [severity]=\"'tertiary'\"\r\n [icon]=\"'match_case'\"\r\n [pTooltip]=\"'Tamanho da fonte'\"\r\n >\r\n </kv-button>\r\n \r\n <p-tieredMenu\r\n [style]=\"{ 'font-size': '0.7rem' }\"\r\n styleClass=\"menuSizes\"\r\n appendTo=\"body\"\r\n #menu\r\n [model]=\"sizes\"\r\n [popup]=\"true\"\r\n >\r\n <ng-template let-item pTemplate=\"item\">\r\n <div\r\n class=\"cursor-pointer flex gap-2 align-items-center pl-1 m-2 menu-sizes\"\r\n (click)=\"item.command()\"\r\n >\r\n @if(this.selectedSize.size != item.size){\r\n <div\r\n class=\"tag\"\r\n [style.background-color]=\"'#EAEAEA'\"\r\n ></div>\r\n }\r\n \r\n @if(this.selectedSize.size == item.size){\r\n <div\r\n class=\"tag\"\r\n [style.background-color]=\"'#1DA750'\"\r\n ></div>\r\n }\r\n \r\n {{ item.label }}\r\n </div>\r\n </ng-template>\r\n </p-tieredMenu>\r\n </div>\r\n }\r\n </div>\r\n\r\n @if(isEditing){\r\n <span class=\"text-aviso\">\r\n Tabela em modo de edi\u00E7\u00E3o\r\n </span>\r\n }\r\n \r\n <div class=\"flex flex-row col-2 justify-content-end gap-2\">\r\n @for (action of config.actionsLote; track i; let i = $index) {\r\n @if(!isEditing){\r\n <div class=\"flex align-items-center justify-content-center\">\r\n @if ((selectedItems.length > 0 || action.showAcoesLote) &&\r\n (getOrExecute(action.visible, selectedItems) ?? true)) {\r\n <kv-button\r\n (onClick)=\"action?.command(); activeItemLote(selectedItems)\"\r\n [pTooltip]=\"getOrExecute(action.tooltip, selectedItems)\"\r\n [tooltipPosition]=\"\r\n (getOrExecute(action.tooltip, selectedItems)?.length ??\r\n 0 > 7) &&\r\n config.actionsLote &&\r\n i == config.actionsLote.length - 1\r\n ? 'left'\r\n : 'bottom'\r\n \"\r\n [disabled]=\"getOrExecute(action.disabled, selectedItems) || false\"\r\n [icon]=\"getOrExecute(action.icon, selectedItems)\"\r\n [severity]=\"action.severity || 'tertiary'\"\r\n />\r\n }\r\n </div>\r\n }\r\n }\r\n\r\n @if (isEditableTable()) {\r\n <div>\r\n <kv-button\r\n (click)=\"this.isEditing = !this.isEditing\"\r\n [pTooltip]=\"!isEditing ? 'Habilitar Edi\u00E7\u00E3o' : 'Desabilitar Edi\u00E7\u00E3o'\"\r\n [tooltipPosition]=\"'left'\"\r\n [severity]=\"'tertiary'\"\r\n [icon]=\"'edit_square'\"\r\n >\r\n </kv-button>\r\n </div>\r\n }\r\n </div>\r\n\r\n <!---------------->\r\n \r\n </div>\r\n </ng-template>\r\n }\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n @if(config.enableSelect && !isEditing){\r\n <th\r\n [class]=\"selectedSize.class + 'th'\"\r\n >\r\n <p-tableHeaderCheckbox\r\n (click)=\"activeItemLote(selectedItems)\"\r\n ></p-tableHeaderCheckbox>\r\n </th>\r\n }\r\n @for(col of columns; track $index){\r\n <th\r\n [pSortableColumn]=\"col.field\"\r\n [pSortableColumnDisabled]=\"col.sortable === false\"\r\n [style.min-width]=\"col.width * selectedSize.size + 'px'\"\r\n pReorderableColumn\r\n [class]=\"selectedSize.class + 'th'\"\r\n \r\n >\r\n <div\r\n [class]=\"\r\n centralizarColunas(col) && alignColunasHeader(col) == ''\r\n ? 'flex flex-row justify-content-center'\r\n : 'flex flex-row'\r\n \"\r\n [style]=\"alignColunasHeader(col)\"\r\n >\r\n <span>{{ col.header }}</span>\r\n @if(col.sortable === true) {\r\n <p-sortIcon\r\n [field]=\"col.field\"\r\n style=\"font-size: 10px\"\r\n ></p-sortIcon>\r\n }\r\n @if(col.headerTooltip){\r\n <span\r\n class=\"material-symbols-outlined flex align-items-center\"\r\n [pTooltip]=\"col.headerTooltip\"\r\n >\r\n info\r\n </span>\r\n }\r\n \r\n </div>\r\n </th>\r\n }\r\n \r\n @if(!isEditing && config.actions && config.actions.length > 0){\r\n <th></th>\r\n }\r\n\r\n @if(isEditableTable() && this.editMode == 'row'){\r\n <th\r\n id=\"th-edit\"\r\n style=\"width: 20px\"\r\n >\r\n Editar\r\n </th>\r\n }\r\n \r\n </tr>\r\n </ng-template>\r\n\r\n\r\n \r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n\r\n <ng-template\r\n pTemplate=\"body\"\r\n let-rowData\r\n let-editing=\"editing\"\r\n let-ri=\"rowIndex\"\r\n let-columns=\"columns\"\r\n let-rowgroup=\"rowgroup\"\r\n let-rowspan=\"rowspan\"\r\n >\r\n <tr\r\n [pEditableRow]=\"rowData\"\r\n [pEditableRowDisabled]=\"false\"\r\n [pContextMenuRow]=\"{rowData, editing}\"\r\n [class]=\"selectedSize.class + '-tr'\"\r\n (dblclick)=\"doubleClick($event, rowData)\"\r\n >\r\n @if(config.enableSelect && !isEditing){\r\n <td\r\n [style]=\"applyStyle(rowData, { field: 'check-box', header: '' })\"\r\n >\r\n \r\n <p-tableCheckbox\r\n class=\"check-edit-list\"\r\n [value]=\"rowData\"\r\n [disabled]=\"isDisabledCheckbox(rowData)\"\r\n (click)=\"activeItemLote(selectedItems)\"\r\n ></p-tableCheckbox>\r\n </td>\r\n }\r\n @for (col of columns; track i; let i = $index){\r\n <ng-container>\r\n <!-- FIXME: Testar a implementa\u00E7\u00E3o abaixo e mesaclar as duas formas -->\r\n \r\n <ng-template #templateInput let-rowData=\"rowData\" let-col=\"col\">\r\n <ng-container *ngIf=\"isEditing; else templatevisualedicao\">\r\n <ng-container [ngSwitch]=\"col.fieldControlType\">\r\n <ng-container *ngSwitchCase=\"'text'\">\r\n <div [style.width]=\"col.width\" class=\"grid formgrid p-fluid\">\r\n <kv-input-text\r\n [disabled]=\"isDisableEditRowCellFunction(rowData, col)\"\r\n class=\"cellControl col\"\r\n [(ngModel)]=\"rowData[col.field]\"\r\n [required]=\"col.required ?? true\"\r\n ></kv-input-text>\r\n </div>\r\n </ng-container>\r\n \r\n <ng-container *ngSwitchCase=\"'number'\">\r\n <div [style.width]=\"col.width\" class=\"grid formgrid p-fluid\">\r\n <kv-input-number\r\n [disabled]=\"isDisableEditRowCellFunction(rowData, col)\"\r\n class=\"cellControl col\"\r\n [(ngModel)]=\"rowData[col.field]\"\r\n [required]=\"col.required ?? true\"\r\n ></kv-input-number>\r\n </div>\r\n </ng-container>\r\n \r\n <ng-container *ngSwitchCase=\"'mask'\">\r\n <div [style.width]=\"col.width\" class=\"grid formgrid p-fluid\">\r\n <kv-input-mask\r\n [disabled]=\"isDisableEditRowCellFunction(rowData, col)\"\r\n class=\"cellControl col\"\r\n [mask]=\"col.mask\"\r\n [required]=\"col.required ?? true\"\r\n [(ngModel)]=\"rowData[col.field]\"\r\n ></kv-input-mask>\r\n </div>\r\n </ng-container>\r\n \r\n <ng-container *ngSwitchCase=\"'switch'\">\r\n <div [style.width]=\"col.width\" class=\"grid formgrid p-fluid\">\r\n <kv-switch\r\n [disabled]=\"isDisableEditRowCellFunction(rowData, col)\"\r\n class=\"cellControl col\"\r\n [(ngModel)]=\"rowData[col.field]\"\r\n ></kv-switch>\r\n </div>\r\n </ng-container>\r\n \r\n <ng-container *ngSwitchCase=\"'calendar'\">\r\n <div [style.width]=\"col.width\">\r\n <div\r\n [style.width]=\"col.width\"\r\n class=\"grid formgrid p-fluid\"\r\n >\r\n <kv-input-calendar\r\n class=\"cellControl col\"\r\n [(ngModel)]=\"rowData[col.field]\"\r\n ></kv-input-calendar>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'dropdown'\">\r\n <div [style.width]=\"col.width\" class=\"grid formgrid p-fluid\">\r\n <p-dropdown\r\n [disabled]=\"isDisableEditRowCellFunction(rowData, col)\"\r\n class=\"cellControl col\"\r\n appendTo=\"body\"\r\n [panelStyle]=\"{ 'font-size': '0.75rem' }\"\r\n [optionLabel]=\"col.fieldDropDownControl.descricaoobjeto\"\r\n [optionValue]=\"col.fieldDropDownControl.idobjeto\"\r\n [options]=\"\r\n col.fieldDropDownControl.fieldControlDropdownSource\r\n \"\r\n [(ngModel)]=\"rowData[col.field]\"\r\n >\r\n </p-dropdown>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n \r\n <ng-template #templatevisualedicao>\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n templateOutput;\r\n context: { rowData: rowData, col: col }\r\n \"\r\n ></ng-container>\r\n </ng-template>\r\n </ng-template>\r\n \r\n <ng-template #templateOutput let-rowData=\"rowData\" let-col=\"col\">\r\n <ng-container [ngSwitch]=\"col.fieldControlType\">\r\n <ng-container *ngSwitchCase=\"'dropdown'\">\r\n <ng-container *ngIf=\"rowData[col.field]\">\r\n {{ transformValueDrop(retornaDescricaoDrop(rowData, col), col) }}\r\n </ng-container>\r\n </ng-container>\r\n \r\n <ng-container *ngSwitchCase=\"'switch'\">\r\n <kv-switch\r\n [(ngModel)]=\"rowData[col.field]\"\r\n [disabled]=\"true\"\r\n ></kv-switch>\r\n </ng-container>\r\n \r\n <ng-container *ngSwitchCase=\"'calendar'\">\r\n {{ rowData[col.field] | date }}\r\n </ng-container>\r\n \r\n <ng-container *ngSwitchCase=\"'mask'\">\r\n {{ rowData[col.field] | mask : col.mask }}\r\n </ng-container>\r\n \r\n <ng-container *ngSwitchDefault>\r\n {{ transformValue(rowData, col) }}\r\n </ng-container>\r\n </ng-container>\r\n </ng-template>\r\n \r\n @if(editMode == 'cell' && col.fieldControlType){\r\n <td\r\n [pEditableColumn]=\"rowData\"\r\n [pEditableColumnField]=\"col.field\"\r\n [pEditableColumnRowIndex]=\"rowData[config.dataKey]\"\r\n [id]=\"'rowTable' + rowData[config.dataKey]\"\r\n (click)=\"activeItem(rowData)\"\r\n (dblclick)=\"dbClickEdit()\"\r\n class=\"rowTable\"\r\n [style]=\"\r\n applyStyle(rowData, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col)\r\n \"\r\n [pTooltip]=\"returnTooltipRow(rowData, col)\"\r\n >\r\n <p-cellEditor>\r\n <ng-container>\r\n <ng-template pTemplate=\"input\">\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n templateInput;\r\n context: { rowData: rowData, col: col }\r\n \"\r\n ></ng-container>\r\n </ng-template>\r\n \r\n <ng-template pTemplate=\"output\">\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n templateOutput;\r\n context: { rowData: rowData, col: col }\r\n \"\r\n ></ng-container>\r\n </ng-template>\r\n </ng-container>\r\n \r\n </p-cellEditor>\r\n </td>\r\n }\r\n \r\n <!-- NOTE: Edi\u00E7\u00E3o de linha -->\r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n \r\n <!-- Celula que armazena os controles de edi\u00E7\u00E3o para os campos -->\r\n @if(false && col.fieldControlType && editMode == 'row'){\r\n <td\r\n [id]=\"'rowTable' + rowData[config.dataKey]\"\r\n (click)=\"activeItem(rowData)\"\r\n (dblclick)=\"dbClickEdit()\"\r\n class=\"rowTable\"\r\n [style]=\"\r\n applyStyle(rowData, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col)\r\n \"\r\n [pTooltip]=\"returnTooltipRow(rowData, col)\"\r\n >\r\n <p-cellEditor\r\n [ngClass]=\"{ switch: col.fieldControlType == 'switch' }\"\r\n >\r\n <ng-template pTemplate=\"input\">\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n templateInput;\r\n context: { rowData: rowData, col: col }\r\n \"\r\n ></ng-container>\r\n </ng-template>\r\n \r\n <ng-template pTemplate=\"output\">\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n templateOutput;\r\n context: { rowData: rowData, col: col }\r\n \"\r\n ></ng-container>\r\n </ng-template>\r\n </p-cellEditor>\r\n </td>\r\n }\r\n \r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n \r\n <td\r\n *ngIf=\"rowgroup && !col.template\"\r\n [attr.rowspan]=\"rowgroup && col.grouped ? rowspan : null\"\r\n class=\"rowTable\"\r\n [style]=\"\r\n applyStyle(rowData, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col)\r\n \"\r\n [pTooltip]=\"returnTooltipRow(rowData, col)\"\r\n >\r\n <span class=\"p-column-title\">{{ col.header }}:</span>\r\n \r\n <span\r\n *ngIf=\"!isBooleanField(rowData, col); else booleanField\"\r\n [class]=\"returnRowClass(rowData, col)\"\r\n >\r\n <span\r\n *ngIf=\"\r\n !isChipField(col) && !col.iconField && !isImageField(col)\r\n \"\r\n >\r\n <i *ngIf=\"col.icon\" [class]=\"col.icon + ' mr-2'\"></i>\r\n {{ transformValue(rowData, col) }}\r\n </span>\r\n \r\n <div *ngIf=\"isChipField(col) && !col.iconField\">\r\n <span\r\n [class]=\"returnClassChip(rowData, col)\"\r\n [pTooltip]=\"returnTooltipIcon(rowData, col)\"\r\n >{{ transformValue(rowData, col) }}</span\r\n >\r\n </div>\r\n </span>\r\n \r\n <span *ngIf=\"isImageField(col)\">\r\n <span>\r\n <img class=\"image\" [src]=\"loadImage(rowData, col)\" />\r\n </span>\r\n </span>\r\n \r\n <i\r\n *ngIf=\"col.iconField\"\r\n [ngClass]=\"{\r\n 'material-icons': col.indIconMaterial,\r\n 'material-symbols-outlined mr-2': !col.indIconMaterial\r\n }\"\r\n [pTooltip]=\"returnTooltipIcon(rowData, col)\"\r\n >\r\n {{ returnClassIcon(rowData, col) }}\r\n </i>\r\n \r\n <ng-template #booleanField>\r\n <i\r\n *ngIf=\"!col.iconField && !isSwitchField(col)\"\r\n [ngClass]=\"\r\n rowData[col.field] ? 'text-green-500' : 'text-red-500'\r\n \"\r\n ><span class=\"material-symbols-outlined\">\r\n {{ rowData[col.field] ? \"check\" : \"close\" }}\r\n </span>\r\n </i>\r\n \r\n <span\r\n *ngIf=\"isSwitchField(col)\"\r\n [class]=\"returnRowClass(rowData, col)\"\r\n >\r\n <kv-switch\r\n (onSwitchChange)=\"onSwitchChange($event, rowData, col)\"\r\n [disabled]=\"col?.onlyReadField ?? true\"\r\n [switchValue]=\"transformValue(rowData, col)\"\r\n >\r\n </kv-switch>\r\n </span>\r\n </ng-template>\r\n </td>\r\n \r\n <td\r\n *ngIf=\"\r\n !rowgroup &&\r\n !col.grouped &&\r\n !col.template &&\r\n !col.fieldControlType\r\n \"\r\n [style]=\"\r\n applyStyle(rowData, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col)\r\n \"\r\n class=\"rowTable\"\r\n [pTooltip]=\"returnTooltipRow(rowData, col)\"\r\n >\r\n <span class=\"p-column-title\">{{ col.header }}:</span>\r\n \r\n <span\r\n *ngIf=\"!isBooleanField(rowData, col); else booleanField\"\r\n [class]=\"returnRowClass(rowData, col)\"\r\n >\r\n <span\r\n *ngIf=\"\r\n !isChipField(col) && !col.iconField && !isImageField(col)\r\n \"\r\n >\r\n <i *ngIf=\"col.icon\" [class]=\"col.icon + ' mr-2'\"></i>\r\n {{ transformValue(rowData, col) }}\r\n </span>\r\n \r\n <div *ngIf=\"isChipField(col) && !col.iconField\">\r\n <span\r\n [class]=\"returnClassChip(rowData, col)\"\r\n [pTooltip]=\"returnTooltipIcon(rowData, col)\"\r\n >\r\n {{ transformValue(rowData, col) }}</span\r\n >\r\n </div>\r\n </span>\r\n \r\n <span *ngIf=\"isImageField(col)\">\r\n <span>\r\n <img class=\"image\" [src]=\"loadImage(rowData, col)\" />\r\n </span>\r\n </span>\r\n \r\n <i\r\n *ngIf=\"col.iconField\"\r\n [ngClass]=\"{\r\n 'material-icons': col.indIconMaterial,\r\n 'material-symbols-outlined mr-2': !col.indIconMaterial\r\n }\"\r\n [pTooltip]=\"returnTooltipIcon(rowData, col)\"\r\n >\r\n {{ returnClassIcon(rowData, col) }}\r\n </i>\r\n \r\n <ng-template #booleanField>\r\n <i\r\n *ngIf=\"!col.iconField && !isSwitchField(col)\"\r\n [ngClass]=\"\r\n rowData[col.field] ? 'text-green-500' : 'text-red-500'\r\n \"\r\n ><span class=\"material-symbols-outlined\">\r\n {{ rowData[col.field] ? \"check\" : \"close\" }}\r\n </span>\r\n </i>\r\n \r\n <span\r\n *ngIf=\"isSwitchField(col)\"\r\n [class]=\"returnRowClass(rowData, col)\"\r\n >\r\n <kv-switch\r\n (onSwitchChange)=\"onSwitchChange($event, rowData, col)\"\r\n [disabled]=\"col?.onlyReadField ?? true\"\r\n [switchValue]=\"transformValue(rowData, col)\"\r\n >\r\n </kv-switch>\r\n </span>\r\n </ng-template>\r\n </td>\r\n \r\n <td\r\n *ngIf=\"col.template && !isEditableTable()\"\r\n [style]=\"\r\n applyStyle(rowData, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col)\r\n \"\r\n class=\"rowTable\"\r\n >\r\n <span class=\"p-column-title\">{{ col.header }}:</span>\r\n <ng-container\r\n *ngIf=\"getCustomTemplate(col.template.name)\"\r\n [ngTemplateOutlet]=\"getCustomTemplate(col.template.name)\"\r\n [ngTemplateOutletContext]=\"{ $implicit: rowData }\"\r\n >\r\n </ng-container>\r\n </td>\r\n </ng-container>\r\n }\r\n \r\n\r\n <!-- ------------------------------------------------------------------------------------------------------------------------------------------- -->\r\n <!-- Controle de a\u00E7\u00E3o -->\r\n @if(!isEditing && config.actions && config.actions.length > 0){\r\n <td\r\n [ngClass]=\"{\r\n 'td-tools': isEditableTable() && this.editMode == 'row',\r\n 'td-tools-sticky': !isEditableTable() || this.editMode == 'cell'\r\n }\"\r\n [style]=\"\r\n applyStyle(rowData, { field: 'btns-options', header: '' }) +\r\n 'border-right: 1px solid #ddd !important; border-left: 1px solid #ddd !important;'\r\n \"\r\n >\r\n <div class=\"flex flex-row justify-content-end w-full\">\r\n \r\n <span\r\n class=\"material-symbols-outlined cursor-pointer icon-more-horiz\"\r\n style=\"font-size: 1rem; height: 10px; width: 20px\"\r\n (click)=\"menu.toggle($event); activeItem(rowData)\"\r\n >\r\n more_horiz\r\n </span>\r\n <!-- </button> -->\r\n\r\n <div *ngFor=\"let action of config.actions\">\r\n {{ criarMenusModal(rowData) }}\r\n </div>\r\n\r\n\r\n <p-menu\r\n #menu\r\n [popup]=\"true\"\r\n [model]=\"menuItems\"\r\n appendTo=\"body\"\r\n ></p-menu>\r\n </div>\r\n </td>\r\n }\r\n \r\n <!-- ------------------------------------------------------------------------------------------------------------------------------------------- -->\r\n <!-- Controle de edi\u00E7\u00E3o -->\r\n @if(this.isEditableTable() && this.editMode == 'row'){\r\n <td class=\"td-edit\">\r\n <div class=\"flex align-items-center justify-content-center gap-2\">\r\n @if(!editing){\r\n <button\r\n [style.height]=\"'28px'\"\r\n [id]=\"'rowEdit' + rowData[config.dataKey]\"\r\n [style.width]=\"'28px'\"\r\n [disabled]=\"isDisableEditRowFunction(rowData)\"\r\n pButton\r\n pRipple\r\n type=\"button\"\r\n pInitEditableRow\r\n icon=\"pi pi-pencil\"\r\n (click)=\"onRowEditInit(rowData)\"\r\n class=\"p-button-rounded p-button-text\"\r\n ></button>\r\n }\r\n \r\n @if(editing){\r\n <button\r\n [style.height]=\"'28px'\"\r\n [style.width]=\"'28px'\"\r\n [disabled]=\"isDisableEditRowFunction(rowData)\"\r\n pButton\r\n pRipple\r\n type=\"button\"\r\n pCancelEditableRow\r\n icon=\"pi pi-times\"\r\n (click)=\"onRowEditCancel(rowData, ri)\"\r\n [id]=\"'rowCancel' + rowData[config.dataKey]\"\r\n class=\"p-button-rounded p-button-text p-button-danger\"\r\n ></button>\r\n }\r\n \r\n </div>\r\n </td>\r\n }\r\n \r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n</div>\r\n", styles: ["@charset \"UTF-8\";.td-edit{position:sticky;right:-1px;background-color:#fff;color:#5289b4}.td-tools{position:sticky;right:52px;border-right:1px solid #ddd!important;background-color:#fff;box-shadow:-5px 0 20px -10px #000000bf}.td-tools-sticky{position:sticky;right:0;border-right:3px solid #fff!important;background-color:#fff}#th-edit{position:sticky;right:0;background-color:#eaeaea}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td{text-align:center;border:1px solid #eaeaea;border-width:1px 1px;padding:0rem .5rem}:host ::ng-deep .p-datatable .p-datatable-thead>tr>th{text-align:center;padding:0rem .5rem;border-left:none;border-right:none;border-width:1px 1px;font-weight:700;color:#343a40;background:#eaeaea;transition:box-shadow .2s}.error-show{background-color:red;width:5px;height:10px}.btns-options{position:relative;left:20px}.chip-style{border:solid 1px}:host::ng-deep .p-card .p-card-content{padding:0}.material-symbols-outlined.md-19{font-size:15px}.material-symbols-outlined.md-22{font-size:19px}.checkbox-container{display:flex;align-items:center;gap:2px;margin-top:5px}#botaoFiltro:hover{color:#a9a9a9}.actionLoteBtns{align-items:center;background-color:#29b92d;color:#f2f3f5;display:flex;font-size:16px;width:2rem;height:2rem;top:2px;margin-left:.5rem;justify-content:center;text-decoration:none;text-align:center;padding:12px}:host ::ng-deep .center{display:flex;align-items:center;justify-content:center}#actionLoteBtns:hover,.actionLoteBtns:hover{background-color:#249a29!important}.actionBtns{align-items:center;background-color:transparent;color:#a9a9a9;display:flex;width:.8rem;height:.8rem;margin-left:.22rem;justify-content:center;text-decoration:none;text-align:justify;padding:11px}:host::ng-deep .material-symbols-outlined{font-family:Material Symbols Outlined;font-weight:400;font-style:normal;line-height:.9;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased}#actionBtns:hover{color:#a9a9a9}.image{border-style:solid;border-width:3.5px;border-color:#5289b4;border-radius:100%;height:55px;width:55px;padding:0;margin:0;vertical-align:middle}:host ::ng-deep .p-datatable-header{background-color:#eaeaea!important;padding:0!important;border-radius:5px!important}:host ::ng-deep .p-datatable .p-datatable-thead>tr>th{background-color:#eaeaea!important}:host ::ng-deep .p-datatable .p-datatable-thead>tr>th:first-of-type{border-radius:5px 0 0 5px}:host ::ng-deep .p-datatable .p-datatable-thead>tr>th:last-child{border-radius:0 5px 5px 0}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td{border-left:none!important;border-right:none!important}:host ::ng-deep .actionBtns,:host ::ng-deep .actionLoteBtns{border-radius:20%;box-shadow:#0000003d 0 3px 8px}.icon-more-horiz:hover,.icon-more-horiz:focus{color:#5e5e5e;transform:scale(1.1);transition:color .3s,transform .3s}:host ::ng-deep .p-checkbox .p-checkbox-box.p-highlight{border-color:#004172;background:#004172}:host ::ng-deep .p-checkbox .p-checkbox-box.p-highlight:hover{background-color:#002542}:host ::ng-deep .p-checkbox .p-checkbox-box.p-highlight:active{background-color:#002542}:host ::ng-deep .p-checkbox .p-checkbox-box.p-highlight:disabled{background-color:#002542;opacity:.4;cursor:auto}@media only screen and (min-width: 768px){.actionLoteBtns{top:-1px}}@media only screen and (max-width: 960px){:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td:has(p-tablecheckbox){border-bottom:0px!important}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td:has(img){justify-content:center!important;align-items:center!important}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td:has(img) .p-column-title{display:none!important}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td:last-child{border-bottom:1px solid #ddd!important}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td:last-child div{justify-content:center!important;align-items:center!important}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td .p-column-title{font-weight:600}}::ng-deep .p-panel.p-panel-toggleable .p-panel-header{background-color:#eaeaea!important}::ng-deep .field.grid,.formgrid.grid{padding:0rem!important}@media screen and (min-width: 961px){.moreVertBtn{position:relative;right:3px}}::ng-deep .p-datatable .p-datatable-thead>tr>th:last-of-type{border-radius:0 0 5px!important;-webkit-border-radius:0px 0px 5px 0px!important;-moz-border-radius:0px 0px 5px 0px!important;-ms-border-radius:0px 0px 5px 0px!important;-o-border-radius:0px 0px 5px 0px!important}::ng-deep .p-datatable .p-datatable-thead>tr>th:first-of-type{border-radius:0 0 0 5px!important;-webkit-border-radius:0px 0px 0px 5px!important;-moz-border-radius:0px 0px 0px 5px!important;-ms-border-radius:0px 0px 0px 5px!important;-o-border-radius:0px 0px 0px 5px!important}:host ::ng-deep p-celleditor>kv-switch>div>p-inputswitch.p-inputswitch-checked .p-inputswitch-slider:before{transform:translate(1.25rem);height:15px;margin-top:-8px;-webkit-transform:translateX(1.25rem);-moz-transform:translateX(1.25rem);-ms-transform:translateX(1.25rem);-o-transform:translateX(1.25rem)}:host ::ng-deep p-celleditor>kv-switch>div>p-inputswitch.p-inputswitch-checked .p-inputswitch-slider{height:21px}:host ::ng-deep p-celleditor>kv-switch>div>p-inputswitch{height:21px}:host ::ng-deep p-celleditor>kv-switch>div>p-inputswitch .p-inputswitch-slider:before{background:#fff;width:1rem;height:1.25rem;height:16px!important;left:.25rem;margin-top:-9px!important;margin-top:-.625rem;border-radius:50%;transition-duration:.2s}:host ::ng-deep p-celleditor>kv-switch>div>p-inputswitch:not(.p-disabled) .p-inputswitch-slider{height:21px}:host ::ng-deep .p-cell-editing{padding-top:0!important;padding-bottom:0!important}:host ::ng-deep p-dropdown-item{font-size:.1rem}.text-aviso{color:red;font-size:.85rem;font-weight:400;width:500px}:host ::ng-deep .p-checkbox .p-checkbox-box{width:18px;height:18px}:host ::ng-deep .p-selectbutton .p-button{font-size:.75rem!important;height:24px;padding:11px}#btn-sizes{border-radius:50%;width:.5rem!important;height:.5rem!important;box-shadow:#0000003d 0 3px 8px}:host ::ng-deep .p-datatable.p-datatable-sm{font-size:.625rem!important}:host ::ng-deep .p-datatable.p-datatable-md{font-size:.75rem!important}:host ::ng-deep .p-datatable.p-datatable-lg{font-size:.875rem!important}:host ::ng-deep .p-datatable-sm-tr>td i>span.material-symbols-outlined{font-size:.9rem}:host ::ng-deep .p-datatable-sm-tr>td .check-edit-list>.p-checkbox .p-checkbox-box{width:15px;height:15px}:host ::ng-deep .p-datatable-sm-tr>td p-celleditor>div>.cellControl>.p-dropdown .p-dropdown-label{width:1%;padding-top:0;padding-bottom:0;font-size:.6rem}:host ::ng-deep .p-datatable-sm-tr>td p-celleditor>div>kv-input-text>span>.inputs{padding-top:0;padding-bottom:0;font-size:.6rem;height:1rem}:host ::ng-deep .p-datatable-sm-tr>td p-celleditor>div>.cellControl>span>p-inputmask>.inputs{height:1rem;padding-top:0;padding-bottom:0;font-size:.6rem}:host ::ng-deep .p-datatable-sm-tr>td p-celleditor>div>kv-switch>div>p-inputswitch>div,:host ::ng-deep .p-datatable-sm-tr>td p-celleditor>kv-switch>div>p-inputswitch,:host ::ng-deep .p-datatable-sm-tr>td p-celleditor>kv-switch>div>p-inputswitch .p-inputswitch-slider{height:.6rem!important;width:2.4rem}:host ::ng-deep .p-datatable-sm-tr>td p-celleditor>kv-switch>div>p-inputswitch .p-inputswitch-slider:before{background:#fff;width:.6rem!important;height:.6rem!important;left:.2rem;margin-top:-.35rem!important;border-radius:50%;transition-duration:.2s}:host ::ng-deep .p-datatable-sm-tr>td p-celleditor>div>kv-switch>div>p-inputswitch>div>span:before{background:#fff;width:.6rem!important;height:.6rem!important;left:.2rem;margin-top:-.35rem!important;border-radius:50%;transition-duration:.2s}:host ::ng-deep .p-datatable-md-tr>td i>span.material-symbols-outlined{font-size:1rem}:host ::ng-deep .p-datatable-md-tr>td .check-edit-list>.p-checkbox .p-checkbox-box{width:18px;height:18px}:host ::ng-deep .p-datatable-md-tr>td p-celleditor>div>.cellControl>.p-dropdown .p-dropdown-label{width:1%;padding-top:0;padding-bottom:0;font-size:.7rem}:host ::ng-deep .p-datatable-md-tr>td p-celleditor>div>kv-input-text>span>.inputs{padding-top:0;padding-bottom:0;font-size:.7rem;height:1rem}:host ::ng-deep .p-datatable-md-tr>td p-celleditor>div>.cellControl>span>p-inputmask>.inputs{height:1rem;padding-top:0;padding-bottom:0;font-size:.7rem}:host ::ng-deep .p-datatable-md-tr>td p-celleditor>div>kv-switch>div>p-inputswitch>div,:host ::ng-deep .p-datatable-md-tr>td p-celleditor>kv-switch>div>p-inputswitch,:host ::ng-deep .p-datatable-md-tr>td p-celleditor>kv-switch>div>p-inputswitch .p-inputswitch-slider{height:.83rem!important;width:2.7rem}:host ::ng-deep .p-datatable-md-tr>td p-celleditor>kv-switch>div>p-inputswitch .p-inputswitch-slider:before{background:#fff;width:.7rem!important;height:.7rem!important;left:.25rem;margin-top:-.35rem!important;border-radius:50%;transition-duration:.2s}:host ::ng-deep .p-datatable-md-tr>td p-celleditor>div>kv-switch>div>p-inputswitch>div>span:before{background:#fff;width:.7rem;height:.7rem;left:.25rem;margin-top:-.4rem;border-radius:50%;transition-duration:.2s}:host ::ng-deep .p-datatable-lg-tr>td i>span.material-symbols-outlined{font-size:1.1rem}:host ::ng-deep .p-datatable-lg-tr>td p-celleditor>div>kv-input-text>span>.inputs{padding-top:0;padding-bottom:0;font-size:.8rem;height:1rem}:host ::ng-deep .p-datatable-lg-tr>td p-celleditor>div>.cellControl>.p-dropdown .p-dropdown-label{padding-top:0;padding-bottom:0;font-size:.8rem}:host ::ng-deep .p-datatable-lg-tr>td p-celleditor>div>.cellControl>span>p-inputmask>.inputs{height:1rem;padding-top:0;padding-bottom:0;font-size:.8rem}:host ::ng-deep .p-datatable-sm-tr>td{padding-top:0!important;padding-top:.05rem!important;padding-bottom:.05rem!important}:host ::ng-deep .p-datatable-md-tr>td,:host ::ng-deep .p-datatable-lg-tr>td{padding:.15rem!important}.p-datatable.p-datatable-smth{font-size:.6rem!important}.p-datatable.p-datatable-dmth{font-size:.7rem!important}.p-datatable.p-datatable-lgth{font-size:.8rem!important}:host ::ng-deep .p-datatable.p-datatable-sm * p-celleditor>div>p-dropdown>.p-dropdown:not(.p-paginator-rpp-options) p-celleditor>div>p-dropdown>.p-dropdown:not(.p-paginator-rpp-options){height:15px!important}:host ::ng-deep .p-datatable.p-datatable-md * p-celleditor>div>p-dropdown>.p-dropdown:not(.p-paginator-rpp-options) p-celleditor>div>p-dropdown>.p-dropdown:not(.p-paginator-rpp-options){height:25px!important}:host ::ng-deep .p-datatable.p-datatable-lg * p-celleditor>div>p-dropdown>.p-dropdown:not(.p-paginator-rpp-options) p-celleditor>div>p-dropdown>.p-dropdown:not(.p-paginator-rpp-options){height:30px!important}:host ::ng-deep p-celleditor>kv-switch>div>p-inputswitch .p-inputswitch-slider{height:21px!important}:host ::ng-deep .teste>.p-button{background:#eaeaea!important;color:#a9a9a9;border:none;box-shadow:#0000003d 0 3px 8px;height:20px}::ng-deep .menuSizes>p-tieredmenusub>.p-tieredmenu-root-list>li:first-child{font-size:.6rem}::ng-deep .menuSizes>p-tieredmenusub>.p-tieredmenu-root-list>li:last-child{font-size:.8rem}.tag{width:5px;height:25px;border-radius:.25rem}:host ::ng-deep .p-speeddial-button.p-button.p-button-icon-only{width:2rem;height:2rem;font-size:1rem}.item-circle{width:4rem;height:2rem;padding:1rem;font-size:.8rem;border-radius:17%;display:flex;align-items:center;justify-content:center;background:#eaeaea!important;box-shadow:#0000003d 0 3px 13px}:host ::ng-deep p-speeddial>div>button>span.material-symbols-outlined.ng-star-inserted{font-size:1.1rem}:host ::ng-deep .check-edit-list>div.p-checkbox.p-component{height:1rem}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td:first-child{border-left:1px solid #ddd!important}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td:last-child{border-right:1px solid #ddd!important}:host ::ng-deep .p-datatable-wrapper::-webkit-scrollbar:hover{background-color:#dededebf}:host ::ng-deep .p-datatable-wrapper::-webkit-scrollbar{width:6px;height:3px}:host ::ng-deep .p-datatable-wrapper:hover::-webkit-scrollbar-thumb{border-left:2px solid white;background-color:#00000080}:host ::ng-deep .p-datatable-wrapper::-webkit-scrollbar-thumb{border-radius:4px;background-color:transparent}:host ::ng-deep .p-datatable-wrapper::-webkit-scrollbar-track{border-left:2px solid white;background-color:#dededebf}:host ::ng-deep .p-datatable>.p-datatable-wrapper{overflow-y:hidden}\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: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "directive", type: i1$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i5$2.AutoFocus, selector: "[pAutoFocus]", inputs: ["autofocus"] }, { kind: "directive", type: i6.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "directive", type: i1$1.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "component", type: i7$2.ContextMenu, selector: "p-contextMenu", inputs: ["model", "triggerEvent", "target", "global", "style", "styleClass", "appendTo", "autoZIndex", "baseZIndex", "id", "ariaLabel", "ariaLabelledBy", "pressDelay"], outputs: ["onShow", "onHide"] }, { kind: "component", type: i4.Dropdown, selector: "p-dropdown", inputs: ["id", "scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "variant", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "disabled", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "filterValue", "options"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "directive", type: i5$3.InputText, selector: "[pInputText]", inputs: ["variant"] }, { kind: "component", type: i5.Menu, selector: "p-menu", inputs: ["model", "popup", "style", "styleClass", "appendTo", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "ariaLabel", "ariaLabelledBy", "id", "tabindex"], outputs: ["onShow", "onHide", "onBlur", "onFocus"] }, { kind: "component", type: i11.Panel, selector: "p-panel", inputs: ["toggleable", "header", "collapsed", "style", "styleClass", "iconPos", "expandIcon", "collapseIcon", "showHeader", "toggler", "transitionOptions"], outputs: ["collapsedChange", "onBeforeToggle", "onAfterToggle"] }, { kind: "directive", type: i2.Ripple, selector: "[pRipple]" }, { kind: "component", type: i13.TieredMenu, selector: "p-tieredMenu", inputs: ["model", "popup", "style", "styleClass", "appendTo", "autoZIndex", "baseZIndex", "autoDisplay", "showTransitionOptions", "hideTransitionOptions", "id", "ariaLabel", "ariaLabelledBy", "disabled", "tabindex"], outputs: ["onShow", "onHide"] }, { kind: "component", type: i14.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll", "virtualRowHeight"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i14.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "directive", type: i14.ContextMenuRow, selector: "[pContextMenuRow]", inputs: ["pContextMenuRow", "pContextMenuRowIndex", "pContextMenuRowDisabled"] }, { kind: "directive", type: i14.ReorderableColumn, selector: "[pReorderableColumn]", inputs: ["pReorderableColumnDisabled"] }, { kind: "directive", type: i14.EditableColumn, selector: "[pEditableColumn]", inputs: ["pEditableColumn", "pEditableColumnField", "pEditableColumnRowIndex", "pEditableColumnDisabled", "pFocusCellSelector"] }, { kind: "component", type: i14.CellEditor, selector: "p-cellEditor" }, { kind: "component", type: i14.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "component", type: i14.TableCheckbox, selector: "p-tableCheckbox", inputs: ["disabled", "value", "index", "inputId", "name", "required", "ariaLabel"] }, { kind: "component", type: i14.TableHeaderCheckbox, selector: "p-tableHeaderCheckbox", inputs: ["disabled", "inputId", "name", "ariaLabel"] }, { kind: "directive", type: i14.EditableRow, selector: "[pEditableRow]", inputs: ["pEditableRow", "pEditableRowDisabled"] }, { kind: "directive", type: i14.InitEditableRow, selector: "[pInitEditableRow]" }, { kind: "directive", type: i14.CancelEditableRow, selector: "[pCancelEditableRow]" }, { kind: "component", type: i15.Toast, selector: "p-toast", inputs: ["key", "autoZIndex", "baseZIndex", "life", "style", "styleClass", "position", "preventOpenDuplicates", "preventDuplicates", "showTransformOptions", "hideTransformOptions", "showTransitionOptions", "hideTransitionOptions", "breakpoints"], outputs: ["onClose"] }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: KvInputCalendarComponent, selector: "kv-input-calendar", inputs: ["isYear", "isMonthYear", "minDate", "maxDate", "showButtonBar", "showIcon", "showTime", "selectionMode"], outputs: ["onSelectionChange", "onSelectionValue"] }, { kind: "component", type: KvInputMaskComponent, selector: "kv-input-mask", inputs: ["mask"], outputs: ["onComplete"] }, { kind: "component", type: KvInputNumberComponent, selector: "kv-input-number", inputs: ["mode", "digits", "min", "max", "suffix"] }, { kind: "component", type: KvInputTextComponent, selector: "kv-input-text", inputs: ["textCaptalized"] }, { kind: "component", type: KvSwitchComponent, selector: "kv-switch", inputs: ["readonly", "switchValue"], outputs: ["onSwitchChange"] }, { kind: "component", type: KvButtonComponent, selector: "kv-button", inputs: ["label", "icon", "loading", "disabled", "severity", "size", "fullWidth"], outputs: ["onClick"] }, { kind: "pipe", type: i1.DatePipe, name: "date" }, { kind: "pipe", type: MaskPipe, name: "mask" }] }); }
|
|
6881
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.8", type: KvTableEditComponent, selector: "kv-table-edit", inputs: { enableSizes: "enableSizes", editMode: "editMode" }, outputs: { onSave: "onSave", filterField: "filterField" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div class=\"card\" id=\"tamanhotabela\" [style.font-size]=\"'1px'\">\r\n <p-toast></p-toast>\r\n\r\n @if(filtrosAvancados){\r\n <p-panel\r\n header=\"Filtros avan\u00E7ados\"\r\n [toggleable]=\"true\"\r\n [collapsed]=\"true\"\r\n (collapsedChange)=\"collapsed = !collapsed\"\r\n [style]=\"{ 'margin-bottom': '2px' }\"\r\n >\r\n <ng-template pTemplate=\"headericons\">\r\n @if (!collapsed) {\r\n <i class=\"pi pi-filter\"></i>\r\n }\r\n <!-- \u00CDcone quando o painel est\u00E1 aberto -->\r\n @if (collapsed) {\r\n <i class=\"pi pi-minus\"></i>\r\n }\r\n <!-- \u00CDcone quando o painel est\u00E1 fechado -->\r\n </ng-template>\r\n <ng-content></ng-content>\r\n </p-panel>\r\n }\r\n\r\n <p-contextMenu #cm [model]=\"itemsContextMenu\"></p-contextMenu>\r\n <p-table\r\n #te\r\n [editMode]=\"editMode\"\r\n (onEditComplete)=\"onEditComplete($event)\"\r\n (onEditInit)=\"onEditInit($event)\"\r\n [reorderableColumns]=\"config.reorderableColumns || false\"\r\n *ngIf=\"config\"\r\n [value]=\"dataSource\"\r\n [dataKey]=\"config.dataKey\"\r\n [columns]=\"config.columns\"\r\n [scrollable]=\"true\"\r\n appendTo=\"body\"\r\n [styleClass]=\"selectedSize.class\"\r\n [(selection)]=\"selectedItems\"\r\n [rowSelectable]=\"isRowSelectable\"\r\n [globalFilterFields]=\"globalFilterFields\"\r\n [rows]=\"rows\"\r\n [paginator]=\"paginator\"\r\n [rowsPerPageOptions]=\"rowsPerPageOptions\"\r\n [showCurrentPageReport]=\"true\"\r\n currentPageReportTemplate=\"{first} - {last} de {totalRecords}\"\r\n (selectionChange)=\"selectionChange($event)\"\r\n [rowHover]=\"true\"\r\n [totalRecords]=\"totalRecords\"\r\n [lazy]=\"config.lazy\"\r\n (onLazyLoad)=\"paginate($event)\"\r\n [groupRowsBy]=\"config.fieldGroup\"\r\n paginatorDropdownAppendTo=\"body\"\r\n [showFirstLastIcon]=\"showFirstLastIcon\"\r\n [pageLinks]=\"pageLinksOptions\"\r\n [scrollable]=\"isTableScrollable\"\r\n [scrollHeight]=\"scrollHeight\"\r\n [rowTrackBy]=\"rowTrackBy\"\r\n [(contextMenuSelection)]=\"selectedProduct\"\r\n [contextMenu]=\"isEditableTable() ? cm : null\"\r\n >\r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n\r\n @if (config.enableCation || enableSizes){\r\n <ng-template pTemplate=\"caption\">\r\n <div\r\n class=\"flex flex-row flex-wrap justify-content-between align-items-center grid formgrid p-fluid col-12 p-0 m-0\"\r\n >\r\n <div class=\"col-12 flex flex-column\">\r\n @if (config.title) {\r\n <div class=\"text-md font-bold my-3\">\r\n {{ config.title }}\r\n </div>\r\n } @if (config.subtitle) {\r\n <div class=\"text-sm mb-4 font-medium\">\r\n {{ config.subtitle }}\r\n </div>\r\n }\r\n </div>\r\n\r\n <div\r\n class=\"flex flex-row align-items-center md:col-6 lg:col-4 {{\r\n tamanhoTela < 768 ? 'col-10' : 'col-12'\r\n }} mt-1 mb-2 gap-1\"\r\n >\r\n \r\n @if (config.enableFilter) {\r\n <span class=\"p-input-icon-left\">\r\n <i class=\"pi pi-search\"></i>\r\n \r\n <input\r\n pInputText\r\n pAutoFocus\r\n [autofocus]=\"true\"\r\n type=\"text\"\r\n (input)=\"onGlobalFilter(te, $event)\"\r\n placeholder=\"Pesquisar...\"\r\n class=\"h-2rem\"\r\n autocomplete=\"off\"\r\n />\r\n </span>\r\n }\r\n\r\n @if(enableSizes){\r\n <div class=\"sizes-controls\">\r\n \r\n <kv-button (click)=\"menu.toggle($event)\"\r\n [severity]=\"'tertiary'\"\r\n [icon]=\"'match_case'\"\r\n [pTooltip]=\"'Tamanho da fonte'\"\r\n >\r\n </kv-button>\r\n \r\n <p-tieredMenu\r\n [style]=\"{ 'font-size': '0.7rem' }\"\r\n styleClass=\"menuSizes\"\r\n appendTo=\"body\"\r\n #menu\r\n [model]=\"sizes\"\r\n [popup]=\"true\"\r\n >\r\n <ng-template let-item pTemplate=\"item\">\r\n <div\r\n class=\"cursor-pointer flex gap-2 align-items-center pl-1 m-2 menu-sizes\"\r\n (click)=\"item.command()\"\r\n >\r\n @if(this.selectedSize.size != item.size){\r\n <div\r\n class=\"tag\"\r\n [style.background-color]=\"'#EAEAEA'\"\r\n ></div>\r\n }\r\n \r\n @if(this.selectedSize.size == item.size){\r\n <div\r\n class=\"tag\"\r\n [style.background-color]=\"'#1DA750'\"\r\n ></div>\r\n }\r\n \r\n {{ item.label }}\r\n </div>\r\n </ng-template>\r\n </p-tieredMenu>\r\n </div>\r\n }\r\n </div>\r\n\r\n @if(isEditing){\r\n <span class=\"text-aviso\">\r\n Tabela em modo de edi\u00E7\u00E3o\r\n </span>\r\n }\r\n \r\n <div class=\"flex flex-row col-2 justify-content-end gap-2\">\r\n @for (action of config.actionsLote; track i; let i = $index) {\r\n @if(!isEditing){\r\n <div class=\"flex align-items-center justify-content-center\">\r\n @if ((selectedItems.length > 0 || action.showAcoesLote) &&\r\n (getOrExecute(action.visible, selectedItems) ?? true)) {\r\n <kv-button\r\n (onClick)=\"action?.command(); activeItemLote(selectedItems)\"\r\n [pTooltip]=\"getOrExecute(action.tooltip, selectedItems)\"\r\n [tooltipPosition]=\"\r\n (getOrExecute(action.tooltip, selectedItems)?.length ??\r\n 0 > 7) &&\r\n config.actionsLote &&\r\n i == config.actionsLote.length - 1\r\n ? 'left'\r\n : 'bottom'\r\n \"\r\n [disabled]=\"getOrExecute(action.disabled, selectedItems) || false\"\r\n [icon]=\"getOrExecute(action.icon, selectedItems)\"\r\n [severity]=\"action.severity || 'tertiary'\"\r\n />\r\n }\r\n </div>\r\n }\r\n }\r\n\r\n @if (isEditableTable()) {\r\n <div>\r\n <kv-button\r\n (click)=\"this.isEditing = !this.isEditing\"\r\n [pTooltip]=\"!isEditing ? 'Habilitar Edi\u00E7\u00E3o' : 'Desabilitar Edi\u00E7\u00E3o'\"\r\n [tooltipPosition]=\"'left'\"\r\n [severity]=\"'tertiary'\"\r\n [icon]=\"'edit_square'\"\r\n >\r\n </kv-button>\r\n </div>\r\n }\r\n </div>\r\n\r\n <!---------------->\r\n \r\n </div>\r\n </ng-template>\r\n }\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n @if(config.enableSelect && !isEditing){\r\n <th\r\n [class]=\"selectedSize.class + 'th'\"\r\n >\r\n <p-tableHeaderCheckbox\r\n (click)=\"activeItemLote(selectedItems)\"\r\n ></p-tableHeaderCheckbox>\r\n </th>\r\n }\r\n @for(col of columns; track $index){\r\n <th\r\n [pSortableColumn]=\"col.field\"\r\n [pSortableColumnDisabled]=\"col.sortable === false\"\r\n [style.min-width]=\"col.width * selectedSize.size + 'px'\"\r\n pReorderableColumn\r\n [class]=\"selectedSize.class + 'th'\"\r\n \r\n >\r\n <div\r\n [class]=\"\r\n centralizarColunas(col) && alignColunasHeader(col) == ''\r\n ? 'flex flex-row justify-content-center'\r\n : 'flex flex-row'\r\n \"\r\n [style]=\"alignColunasHeader(col)\"\r\n >\r\n <span>{{ col.header }}</span>\r\n @if(col.sortable === true) {\r\n <p-sortIcon\r\n [field]=\"col.field\"\r\n style=\"font-size: 10px\"\r\n ></p-sortIcon>\r\n }\r\n @if(col.headerTooltip){\r\n <span\r\n class=\"material-symbols-outlined flex align-items-center\"\r\n [pTooltip]=\"col.headerTooltip\"\r\n >\r\n info\r\n </span>\r\n }\r\n \r\n </div>\r\n </th>\r\n }\r\n \r\n @if(!isEditing && config.actions && config.actions.length > 0){\r\n <th></th>\r\n }\r\n\r\n @if(isEditableTable() && this.editMode == 'row'){\r\n <th\r\n id=\"th-edit\"\r\n style=\"width: 20px\"\r\n >\r\n Editar\r\n </th>\r\n }\r\n \r\n </tr>\r\n </ng-template>\r\n\r\n\r\n \r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n\r\n <ng-template\r\n pTemplate=\"body\"\r\n let-rowData\r\n let-editing=\"editing\"\r\n let-ri=\"rowIndex\"\r\n let-columns=\"columns\"\r\n let-rowgroup=\"rowgroup\"\r\n let-rowspan=\"rowspan\"\r\n >\r\n <tr\r\n [pEditableRow]=\"rowData\"\r\n [pEditableRowDisabled]=\"false\"\r\n [pContextMenuRow]=\"{rowData, editing}\"\r\n [class]=\"selectedSize.class + '-tr'\"\r\n (dblclick)=\"doubleClick($event, rowData)\"\r\n >\r\n @if(config.enableSelect && !isEditing){\r\n <td\r\n [style]=\"applyStyle(rowData, { field: 'check-box', header: '' })\"\r\n >\r\n \r\n <p-tableCheckbox\r\n class=\"check-edit-list\"\r\n [value]=\"rowData\"\r\n [disabled]=\"isDisabledCheckbox(rowData)\"\r\n (click)=\"activeItemLote(selectedItems)\"\r\n ></p-tableCheckbox>\r\n </td>\r\n }\r\n @for (col of columns; track i; let i = $index){\r\n <ng-container>\r\n <!-- FIXME: Testar a implementa\u00E7\u00E3o abaixo e mesaclar as duas formas -->\r\n \r\n <ng-template #templateInput let-rowData=\"rowData\" let-col=\"col\">\r\n <ng-container *ngIf=\"isEditing; else templatevisualedicao\">\r\n <ng-container [ngSwitch]=\"col.fieldControlType\">\r\n <ng-container *ngSwitchCase=\"'text'\">\r\n <div [style.width]=\"col.width\" class=\"grid formgrid p-fluid\">\r\n <kv-input-text\r\n [disabled]=\"isDisableEditRowCellFunction(rowData, col)\"\r\n class=\"cellControl col\"\r\n [(ngModel)]=\"rowData[col.field]\"\r\n [required]=\"col.required ?? true\"\r\n ></kv-input-text>\r\n </div>\r\n </ng-container>\r\n \r\n <ng-container *ngSwitchCase=\"'number'\">\r\n <div [style.width]=\"col.width\" class=\"grid formgrid p-fluid\">\r\n <kv-input-number\r\n [disabled]=\"isDisableEditRowCellFunction(rowData, col)\"\r\n class=\"cellControl col\"\r\n [(ngModel)]=\"rowData[col.field]\"\r\n [required]=\"col.required ?? true\"\r\n ></kv-input-number>\r\n </div>\r\n </ng-container>\r\n \r\n <ng-container *ngSwitchCase=\"'mask'\">\r\n <div [style.width]=\"col.width\" class=\"grid formgrid p-fluid\">\r\n <kv-input-mask\r\n [disabled]=\"isDisableEditRowCellFunction(rowData, col)\"\r\n class=\"cellControl col\"\r\n [mask]=\"col.mask\"\r\n [required]=\"col.required ?? true\"\r\n [(ngModel)]=\"rowData[col.field]\"\r\n ></kv-input-mask>\r\n </div>\r\n </ng-container>\r\n \r\n <ng-container *ngSwitchCase=\"'switch'\">\r\n <div [style.width]=\"col.width\" class=\"grid formgrid p-fluid\">\r\n <kv-switch\r\n [disabled]=\"isDisableEditRowCellFunction(rowData, col)\"\r\n class=\"cellControl col\"\r\n [(ngModel)]=\"rowData[col.field]\"\r\n ></kv-switch>\r\n </div>\r\n </ng-container>\r\n \r\n <ng-container *ngSwitchCase=\"'calendar'\">\r\n <div [style.width]=\"col.width\">\r\n <div\r\n [style.width]=\"col.width\"\r\n class=\"grid formgrid p-fluid\"\r\n >\r\n <kv-input-calendar\r\n class=\"cellControl col\"\r\n [(ngModel)]=\"rowData[col.field]\"\r\n ></kv-input-calendar>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'dropdown'\">\r\n <div [style.width]=\"col.width\" class=\"grid formgrid p-fluid\">\r\n <p-dropdown\r\n [disabled]=\"isDisableEditRowCellFunction(rowData, col)\"\r\n class=\"cellControl col\"\r\n appendTo=\"body\"\r\n [panelStyle]=\"{ 'font-size': '0.75rem' }\"\r\n [optionLabel]=\"col.fieldDropDownControl.descricaoobjeto\"\r\n [optionValue]=\"col.fieldDropDownControl.idobjeto\"\r\n [options]=\"\r\n col.fieldDropDownControl.fieldControlDropdownSource\r\n \"\r\n [(ngModel)]=\"rowData[col.field]\"\r\n >\r\n </p-dropdown>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n \r\n <ng-template #templatevisualedicao>\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n templateOutput;\r\n context: { rowData: rowData, col: col }\r\n \"\r\n ></ng-container>\r\n </ng-template>\r\n </ng-template>\r\n \r\n <ng-template #templateOutput let-rowData=\"rowData\" let-col=\"col\">\r\n <ng-container [ngSwitch]=\"col.fieldControlType\">\r\n <ng-container *ngSwitchCase=\"'dropdown'\">\r\n <ng-container *ngIf=\"rowData[col.field]\">\r\n {{ transformValueDrop(retornaDescricaoDrop(rowData, col), col) }}\r\n </ng-container>\r\n </ng-container>\r\n \r\n <ng-container *ngSwitchCase=\"'switch'\">\r\n <kv-switch\r\n [(ngModel)]=\"rowData[col.field]\"\r\n [disabled]=\"true\"\r\n ></kv-switch>\r\n </ng-container>\r\n \r\n <ng-container *ngSwitchCase=\"'calendar'\">\r\n {{ rowData[col.field] | date }}\r\n </ng-container>\r\n \r\n <ng-container *ngSwitchCase=\"'mask'\">\r\n {{ rowData[col.field] | mask : col.mask }}\r\n </ng-container>\r\n \r\n <ng-container *ngSwitchDefault>\r\n {{ transformValue(rowData, col) }}\r\n </ng-container>\r\n </ng-container>\r\n </ng-template>\r\n \r\n @if(editMode == 'cell' && col.fieldControlType){\r\n <td\r\n [pEditableColumn]=\"rowData\"\r\n [pEditableColumnField]=\"col.field\"\r\n [pEditableColumnRowIndex]=\"rowData[config.dataKey]\"\r\n [id]=\"'rowTable' + rowData[config.dataKey]\"\r\n (click)=\"activeItem(rowData)\"\r\n (dblclick)=\"dbClickEdit()\"\r\n class=\"rowTable\"\r\n [style]=\"\r\n applyStyle(rowData, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col)\r\n \"\r\n [pTooltip]=\"returnTooltipRow(rowData, col)\"\r\n >\r\n <p-cellEditor>\r\n <ng-container>\r\n <ng-template pTemplate=\"input\">\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n templateInput;\r\n context: { rowData: rowData, col: col }\r\n \"\r\n ></ng-container>\r\n </ng-template>\r\n \r\n <ng-template pTemplate=\"output\">\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n templateOutput;\r\n context: { rowData: rowData, col: col }\r\n \"\r\n ></ng-container>\r\n </ng-template>\r\n </ng-container>\r\n \r\n </p-cellEditor>\r\n </td>\r\n }\r\n \r\n <!-- NOTE: Edi\u00E7\u00E3o de linha -->\r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n \r\n <!-- Celula que armazena os controles de edi\u00E7\u00E3o para os campos -->\r\n @if(false && col.fieldControlType && editMode == 'row'){\r\n <td\r\n [id]=\"'rowTable' + rowData[config.dataKey]\"\r\n (click)=\"activeItem(rowData)\"\r\n (dblclick)=\"dbClickEdit()\"\r\n class=\"rowTable\"\r\n [style]=\"\r\n applyStyle(rowData, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col)\r\n \"\r\n [pTooltip]=\"returnTooltipRow(rowData, col)\"\r\n >\r\n <p-cellEditor\r\n [ngClass]=\"{ switch: col.fieldControlType == 'switch' }\"\r\n >\r\n <ng-template pTemplate=\"input\">\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n templateInput;\r\n context: { rowData: rowData, col: col }\r\n \"\r\n ></ng-container>\r\n </ng-template>\r\n \r\n <ng-template pTemplate=\"output\">\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n templateOutput;\r\n context: { rowData: rowData, col: col }\r\n \"\r\n ></ng-container>\r\n </ng-template>\r\n </p-cellEditor>\r\n </td>\r\n }\r\n \r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n \r\n <td\r\n *ngIf=\"rowgroup && !col.template\"\r\n [attr.rowspan]=\"rowgroup && col.grouped ? rowspan : null\"\r\n class=\"rowTable\"\r\n [style]=\"\r\n applyStyle(rowData, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col)\r\n \"\r\n [pTooltip]=\"returnTooltipRow(rowData, col)\"\r\n >\r\n <span class=\"p-column-title\">{{ col.header }}:</span>\r\n \r\n <span\r\n *ngIf=\"!isBooleanField(rowData, col); else booleanField\"\r\n [class]=\"returnRowClass(rowData, col)\"\r\n >\r\n <span\r\n *ngIf=\"\r\n !isChipField(col) && !col.iconField && !isImageField(col)\r\n \"\r\n >\r\n <i *ngIf=\"col.icon\" [class]=\"col.icon + ' mr-2'\"></i>\r\n {{ transformValue(rowData, col) }}\r\n </span>\r\n \r\n <div *ngIf=\"isChipField(col) && !col.iconField\">\r\n <span\r\n [class]=\"returnClassChip(rowData, col)\"\r\n [pTooltip]=\"returnTooltipIcon(rowData, col)\"\r\n >{{ transformValue(rowData, col) }}</span\r\n >\r\n </div>\r\n </span>\r\n \r\n <span *ngIf=\"isImageField(col)\">\r\n <span>\r\n <img class=\"image\" [src]=\"loadImage(rowData, col)\" />\r\n </span>\r\n </span>\r\n \r\n <i\r\n *ngIf=\"col.iconField\"\r\n [ngClass]=\"{\r\n 'material-icons': col.indIconMaterial,\r\n 'material-symbols-outlined mr-2': !col.indIconMaterial\r\n }\"\r\n [pTooltip]=\"returnTooltipIcon(rowData, col)\"\r\n >\r\n {{ returnClassIcon(rowData, col) }}\r\n </i>\r\n \r\n <ng-template #booleanField>\r\n <i\r\n *ngIf=\"!col.iconField && !isSwitchField(col)\"\r\n [ngClass]=\"\r\n rowData[col.field] ? 'text-green-500' : 'text-red-500'\r\n \"\r\n ><span class=\"material-symbols-outlined\">\r\n {{ rowData[col.field] ? \"check\" : \"close\" }}\r\n </span>\r\n </i>\r\n \r\n <span\r\n *ngIf=\"isSwitchField(col)\"\r\n [class]=\"returnRowClass(rowData, col)\"\r\n >\r\n <kv-switch\r\n (onSwitchChange)=\"onSwitchChange($event, rowData, col)\"\r\n [disabled]=\"col?.onlyReadField ?? true\"\r\n [switchValue]=\"transformValue(rowData, col)\"\r\n >\r\n </kv-switch>\r\n </span>\r\n </ng-template>\r\n </td>\r\n \r\n <td\r\n *ngIf=\"\r\n !rowgroup &&\r\n !col.grouped &&\r\n !col.template &&\r\n !col.fieldControlType\r\n \"\r\n [style]=\"\r\n applyStyle(rowData, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col)\r\n \"\r\n class=\"rowTable\"\r\n [pTooltip]=\"returnTooltipRow(rowData, col)\"\r\n >\r\n <span class=\"p-column-title\">{{ col.header }}:</span>\r\n \r\n <span\r\n *ngIf=\"!isBooleanField(rowData, col); else booleanField\"\r\n [class]=\"returnRowClass(rowData, col)\"\r\n >\r\n <span\r\n *ngIf=\"\r\n !isChipField(col) && !col.iconField && !isImageField(col)\r\n \"\r\n >\r\n <i *ngIf=\"col.icon\" [class]=\"col.icon + ' mr-2'\"></i>\r\n {{ transformValue(rowData, col) }}\r\n </span>\r\n \r\n <div *ngIf=\"isChipField(col) && !col.iconField\">\r\n <span\r\n [class]=\"returnClassChip(rowData, col)\"\r\n [pTooltip]=\"returnTooltipIcon(rowData, col)\"\r\n >\r\n {{ transformValue(rowData, col) }}</span\r\n >\r\n </div>\r\n </span>\r\n \r\n <span *ngIf=\"isImageField(col)\">\r\n <span>\r\n <img class=\"image\" [src]=\"loadImage(rowData, col)\" />\r\n </span>\r\n </span>\r\n \r\n <i\r\n *ngIf=\"col.iconField\"\r\n [ngClass]=\"{\r\n 'material-icons': col.indIconMaterial,\r\n 'material-symbols-outlined mr-2': !col.indIconMaterial\r\n }\"\r\n [pTooltip]=\"returnTooltipIcon(rowData, col)\"\r\n >\r\n {{ returnClassIcon(rowData, col) }}\r\n </i>\r\n \r\n <ng-template #booleanField>\r\n <i\r\n *ngIf=\"!col.iconField && !isSwitchField(col)\"\r\n [ngClass]=\"\r\n rowData[col.field] ? 'text-green-500' : 'text-red-500'\r\n \"\r\n ><span class=\"material-symbols-outlined\">\r\n {{ rowData[col.field] ? \"check\" : \"close\" }}\r\n </span>\r\n </i>\r\n \r\n <span\r\n *ngIf=\"isSwitchField(col)\"\r\n [class]=\"returnRowClass(rowData, col)\"\r\n >\r\n <kv-switch\r\n (onSwitchChange)=\"onSwitchChange($event, rowData, col)\"\r\n [disabled]=\"col?.onlyReadField ?? true\"\r\n [switchValue]=\"transformValue(rowData, col)\"\r\n >\r\n </kv-switch>\r\n </span>\r\n </ng-template>\r\n </td>\r\n \r\n <td\r\n *ngIf=\"col.template && !isEditableTable()\"\r\n [style]=\"\r\n applyStyle(rowData, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col)\r\n \"\r\n class=\"rowTable\"\r\n >\r\n <span class=\"p-column-title\">{{ col.header }}:</span>\r\n <ng-container\r\n *ngIf=\"getCustomTemplate(col.template.name)\"\r\n [ngTemplateOutlet]=\"getCustomTemplate(col.template.name)\"\r\n [ngTemplateOutletContext]=\"{ $implicit: rowData }\"\r\n >\r\n </ng-container>\r\n </td>\r\n </ng-container>\r\n }\r\n \r\n\r\n <!-- ------------------------------------------------------------------------------------------------------------------------------------------- -->\r\n <!-- Controle de a\u00E7\u00E3o -->\r\n @if(!isEditing && config.actions && config.actions.length > 0){\r\n <td\r\n [ngClass]=\"{\r\n 'td-tools': isEditableTable() && this.editMode == 'row',\r\n 'td-tools-sticky': !isEditableTable() || this.editMode == 'cell'\r\n }\"\r\n [style]=\"\r\n applyStyle(rowData, { field: 'btns-options', header: '' }) +\r\n 'border-right: 1px solid #ddd !important; border-left: 1px solid #ddd !important;'\r\n \"\r\n >\r\n <div class=\"flex flex-row justify-content-end w-full\">\r\n \r\n <span\r\n class=\"material-symbols-outlined cursor-pointer icon-more-horiz\"\r\n style=\"font-size: 1rem; height: 10px; width: 20px\"\r\n (click)=\"menu.toggle($event); activeItem(rowData)\"\r\n >\r\n more_horiz\r\n </span>\r\n <!-- </button> -->\r\n\r\n <div *ngFor=\"let action of config.actions\">\r\n {{ criarMenusModal(rowData) }}\r\n </div>\r\n\r\n\r\n <p-menu\r\n #menu\r\n [popup]=\"true\"\r\n [model]=\"menuItems\"\r\n appendTo=\"body\"\r\n ></p-menu>\r\n </div>\r\n </td>\r\n }\r\n \r\n <!-- ------------------------------------------------------------------------------------------------------------------------------------------- -->\r\n <!-- Controle de edi\u00E7\u00E3o -->\r\n @if(this.isEditableTable() && this.editMode == 'row'){\r\n <td class=\"td-edit\">\r\n <div class=\"flex align-items-center justify-content-center gap-2\">\r\n @if(!editing){\r\n <button\r\n [style.height]=\"'28px'\"\r\n [id]=\"'rowEdit' + rowData[config.dataKey]\"\r\n [style.width]=\"'28px'\"\r\n [disabled]=\"isDisableEditRowFunction(rowData)\"\r\n pButton\r\n pRipple\r\n type=\"button\"\r\n pInitEditableRow\r\n icon=\"pi pi-pencil\"\r\n (click)=\"onRowEditInit(rowData)\"\r\n class=\"p-button-rounded p-button-text\"\r\n ></button>\r\n }\r\n \r\n @if(editing){\r\n <button\r\n [style.height]=\"'28px'\"\r\n [style.width]=\"'28px'\"\r\n [disabled]=\"isDisableEditRowFunction(rowData)\"\r\n pButton\r\n pRipple\r\n type=\"button\"\r\n pCancelEditableRow\r\n icon=\"pi pi-times\"\r\n (click)=\"onRowEditCancel(rowData, ri)\"\r\n [id]=\"'rowCancel' + rowData[config.dataKey]\"\r\n class=\"p-button-rounded p-button-text p-button-danger\"\r\n ></button>\r\n }\r\n \r\n </div>\r\n </td>\r\n }\r\n \r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n</div>\r\n", styles: ["@charset \"UTF-8\";.td-edit{position:sticky;right:-1px;background-color:#fff;color:#5289b4}.td-tools{position:sticky;right:52px;border-right:1px solid #ddd!important;background-color:#fff;box-shadow:-5px 0 20px -10px #000000bf}.td-tools-sticky{position:sticky;right:0;border-right:3px solid #fff!important;background-color:#fff}#th-edit{position:sticky;right:0;background-color:#eaeaea}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td{text-align:center;border:1px solid #eaeaea;border-width:1px 1px;padding:0rem .5rem}:host ::ng-deep .p-datatable .p-datatable-thead>tr>th{text-align:center;padding:0rem .5rem;border-left:none;border-right:none;border-width:1px 1px;font-weight:700;color:#343a40;background:#eaeaea;transition:box-shadow .2s}.error-show{background-color:red;width:5px;height:10px}.btns-options{position:relative;left:20px}.chip-style{border:solid 1px}:host::ng-deep .p-card .p-card-content{padding:0}.material-symbols-outlined.md-19{font-size:15px}.material-symbols-outlined.md-22{font-size:19px}.checkbox-container{display:flex;align-items:center;gap:2px;margin-top:5px}#botaoFiltro:hover{color:#a9a9a9}.actionLoteBtns{align-items:center;background-color:#29b92d;color:#f2f3f5;display:flex;font-size:16px;width:2rem;height:2rem;top:2px;margin-left:.5rem;justify-content:center;text-decoration:none;text-align:center;padding:12px}:host ::ng-deep .center{display:flex;align-items:center;justify-content:center}#actionLoteBtns:hover,.actionLoteBtns:hover{background-color:#249a29!important}.actionBtns{align-items:center;background-color:transparent;color:#a9a9a9;display:flex;width:.8rem;height:.8rem;margin-left:.22rem;justify-content:center;text-decoration:none;text-align:justify;padding:11px}:host::ng-deep .material-symbols-outlined{font-family:Material Symbols Outlined;font-weight:400;font-style:normal;line-height:.9;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased}#actionBtns:hover{color:#a9a9a9}.image{border-style:solid;border-width:3.5px;border-color:#5289b4;border-radius:100%;height:55px;width:55px;padding:0;margin:0;vertical-align:middle}:host ::ng-deep .p-datatable-header{background-color:#eaeaea!important;padding:0!important;border-radius:5px!important}:host ::ng-deep .p-datatable .p-datatable-thead>tr>th{background-color:#eaeaea!important}:host ::ng-deep .p-datatable .p-datatable-thead>tr>th:first-of-type{border-radius:5px 0 0 5px}:host ::ng-deep .p-datatable .p-datatable-thead>tr>th:last-child{border-radius:0 5px 5px 0}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td{border-left:none!important;border-right:none!important}:host ::ng-deep .actionBtns,:host ::ng-deep .actionLoteBtns{border-radius:20%;box-shadow:#0000003d 0 3px 8px}.icon-more-horiz:hover,.icon-more-horiz:focus{color:#5e5e5e;transform:scale(1.1);transition:color .3s,transform .3s}:host ::ng-deep .p-checkbox .p-checkbox-box.p-highlight{border-color:#004172;background:#004172}:host ::ng-deep .p-checkbox .p-checkbox-box.p-highlight:hover{background-color:#002542}:host ::ng-deep .p-checkbox .p-checkbox-box.p-highlight:active{background-color:#002542}:host ::ng-deep .p-checkbox .p-checkbox-box.p-highlight:disabled{background-color:#002542;opacity:.4;cursor:auto}@media only screen and (min-width: 768px){.actionLoteBtns{top:-1px}}@media only screen and (max-width: 960px){:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td:has(p-tablecheckbox){border-bottom:0px!important}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td:has(img){justify-content:center!important;align-items:center!important}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td:has(img) .p-column-title{display:none!important}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td:last-child{border-bottom:1px solid #ddd!important}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td:last-child div{justify-content:center!important;align-items:center!important}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td .p-column-title{font-weight:600}}::ng-deep .p-panel.p-panel-toggleable .p-panel-header{background-color:#eaeaea!important}::ng-deep .field.grid,.formgrid.grid{padding:0rem!important}@media screen and (min-width: 961px){.moreVertBtn{position:relative;right:3px}}::ng-deep .p-datatable .p-datatable-thead>tr>th:last-of-type{border-radius:0 0 5px!important;-webkit-border-radius:0px 0px 5px 0px!important;-moz-border-radius:0px 0px 5px 0px!important;-ms-border-radius:0px 0px 5px 0px!important;-o-border-radius:0px 0px 5px 0px!important}::ng-deep .p-datatable .p-datatable-thead>tr>th:first-of-type{border-radius:0 0 0 5px!important;-webkit-border-radius:0px 0px 0px 5px!important;-moz-border-radius:0px 0px 0px 5px!important;-ms-border-radius:0px 0px 0px 5px!important;-o-border-radius:0px 0px 0px 5px!important}:host ::ng-deep p-celleditor>kv-switch>div>p-inputswitch.p-inputswitch-checked .p-inputswitch-slider:before{transform:translate(1.25rem);height:15px;margin-top:-8px;-webkit-transform:translateX(1.25rem);-moz-transform:translateX(1.25rem);-ms-transform:translateX(1.25rem);-o-transform:translateX(1.25rem)}:host ::ng-deep p-celleditor>kv-switch>div>p-inputswitch.p-inputswitch-checked .p-inputswitch-slider{height:21px}:host ::ng-deep p-celleditor>kv-switch>div>p-inputswitch{height:21px}:host ::ng-deep p-celleditor>kv-switch>div>p-inputswitch .p-inputswitch-slider:before{background:#fff;width:1rem;height:1.25rem;height:16px!important;left:.25rem;margin-top:-9px!important;margin-top:-.625rem;border-radius:50%;transition-duration:.2s}:host ::ng-deep p-celleditor>kv-switch>div>p-inputswitch:not(.p-disabled) .p-inputswitch-slider{height:21px}:host ::ng-deep .p-cell-editing{padding-top:0!important;padding-bottom:0!important}:host ::ng-deep p-dropdown-item{font-size:.1rem}.text-aviso{color:red;font-size:.85rem;font-weight:400}:host ::ng-deep .p-checkbox .p-checkbox-box{width:18px;height:18px}:host ::ng-deep .p-selectbutton .p-button{font-size:.75rem!important;height:24px;padding:11px}#btn-sizes{border-radius:50%;width:.5rem!important;height:.5rem!important;box-shadow:#0000003d 0 3px 8px}:host ::ng-deep .p-datatable.p-datatable-sm{font-size:.625rem!important}:host ::ng-deep .p-datatable.p-datatable-md{font-size:.75rem!important}:host ::ng-deep .p-datatable.p-datatable-lg{font-size:.875rem!important}:host ::ng-deep .p-datatable-sm-tr>td i>span.material-symbols-outlined{font-size:.9rem}:host ::ng-deep .p-datatable-sm-tr>td .check-edit-list>.p-checkbox .p-checkbox-box{width:15px;height:15px}:host ::ng-deep .p-datatable-sm-tr>td p-celleditor>div>.cellControl>.p-dropdown .p-dropdown-label{width:1%;padding-top:0;padding-bottom:0;font-size:.6rem}:host ::ng-deep .p-datatable-sm-tr>td p-celleditor>div>kv-input-text>span>.inputs{padding-top:0;padding-bottom:0;font-size:.6rem;height:1rem}:host ::ng-deep .p-datatable-sm-tr>td p-celleditor>div>.cellControl>span>p-inputmask>.inputs{height:1rem;padding-top:0;padding-bottom:0;font-size:.6rem}:host ::ng-deep .p-datatable-sm-tr>td p-celleditor>div>kv-switch>div>p-inputswitch>div,:host ::ng-deep .p-datatable-sm-tr>td p-celleditor>kv-switch>div>p-inputswitch,:host ::ng-deep .p-datatable-sm-tr>td p-celleditor>kv-switch>div>p-inputswitch .p-inputswitch-slider{height:.6rem!important;width:2.4rem}:host ::ng-deep .p-datatable-sm-tr>td p-celleditor>kv-switch>div>p-inputswitch .p-inputswitch-slider:before{background:#fff;width:.6rem!important;height:.6rem!important;left:.2rem;margin-top:-.35rem!important;border-radius:50%;transition-duration:.2s}:host ::ng-deep .p-datatable-sm-tr>td p-celleditor>div>kv-switch>div>p-inputswitch>div>span:before{background:#fff;width:.6rem!important;height:.6rem!important;left:.2rem;margin-top:-.35rem!important;border-radius:50%;transition-duration:.2s}:host ::ng-deep .p-datatable-md-tr>td i>span.material-symbols-outlined{font-size:1rem}:host ::ng-deep .p-datatable-md-tr>td .check-edit-list>.p-checkbox .p-checkbox-box{width:18px;height:18px}:host ::ng-deep .p-datatable-md-tr>td p-celleditor>div>.cellControl>.p-dropdown .p-dropdown-label{width:1%;padding-top:0;padding-bottom:0;font-size:.7rem}:host ::ng-deep .p-datatable-md-tr>td p-celleditor>div>kv-input-text>span>.inputs{padding-top:0;padding-bottom:0;font-size:.7rem;height:1rem}:host ::ng-deep .p-datatable-md-tr>td p-celleditor>div>.cellControl>span>p-inputmask>.inputs{height:1rem;padding-top:0;padding-bottom:0;font-size:.7rem}:host ::ng-deep .p-datatable-md-tr>td p-celleditor>div>kv-switch>div>p-inputswitch>div,:host ::ng-deep .p-datatable-md-tr>td p-celleditor>kv-switch>div>p-inputswitch,:host ::ng-deep .p-datatable-md-tr>td p-celleditor>kv-switch>div>p-inputswitch .p-inputswitch-slider{height:.83rem!important;width:2.7rem}:host ::ng-deep .p-datatable-md-tr>td p-celleditor>kv-switch>div>p-inputswitch .p-inputswitch-slider:before{background:#fff;width:.7rem!important;height:.7rem!important;left:.25rem;margin-top:-.35rem!important;border-radius:50%;transition-duration:.2s}:host ::ng-deep .p-datatable-md-tr>td p-celleditor>div>kv-switch>div>p-inputswitch>div>span:before{background:#fff;width:.7rem;height:.7rem;left:.25rem;margin-top:-.4rem;border-radius:50%;transition-duration:.2s}:host ::ng-deep .p-datatable-lg-tr>td i>span.material-symbols-outlined{font-size:1.1rem}:host ::ng-deep .p-datatable-lg-tr>td p-celleditor>div>kv-input-text>span>.inputs{padding-top:0;padding-bottom:0;font-size:.8rem;height:1rem}:host ::ng-deep .p-datatable-lg-tr>td p-celleditor>div>.cellControl>.p-dropdown .p-dropdown-label{padding-top:0;padding-bottom:0;font-size:.8rem}:host ::ng-deep .p-datatable-lg-tr>td p-celleditor>div>.cellControl>span>p-inputmask>.inputs{height:1rem;padding-top:0;padding-bottom:0;font-size:.8rem}:host ::ng-deep .p-datatable-sm-tr>td{padding-top:0!important;padding-top:.05rem!important;padding-bottom:.05rem!important}:host ::ng-deep .p-datatable-md-tr>td,:host ::ng-deep .p-datatable-lg-tr>td{padding:.15rem!important}.p-datatable.p-datatable-smth{font-size:.6rem!important}.p-datatable.p-datatable-dmth{font-size:.7rem!important}.p-datatable.p-datatable-lgth{font-size:.8rem!important}:host ::ng-deep .p-datatable.p-datatable-sm * p-celleditor>div>p-dropdown>.p-dropdown:not(.p-paginator-rpp-options) p-celleditor>div>p-dropdown>.p-dropdown:not(.p-paginator-rpp-options){height:15px!important}:host ::ng-deep .p-datatable.p-datatable-md * p-celleditor>div>p-dropdown>.p-dropdown:not(.p-paginator-rpp-options) p-celleditor>div>p-dropdown>.p-dropdown:not(.p-paginator-rpp-options){height:25px!important}:host ::ng-deep .p-datatable.p-datatable-lg * p-celleditor>div>p-dropdown>.p-dropdown:not(.p-paginator-rpp-options) p-celleditor>div>p-dropdown>.p-dropdown:not(.p-paginator-rpp-options){height:30px!important}:host ::ng-deep p-celleditor>kv-switch>div>p-inputswitch .p-inputswitch-slider{height:21px!important}:host ::ng-deep .teste>.p-button{background:#eaeaea!important;color:#a9a9a9;border:none;box-shadow:#0000003d 0 3px 8px;height:20px}::ng-deep .menuSizes>p-tieredmenusub>.p-tieredmenu-root-list>li:first-child{font-size:.6rem}::ng-deep .menuSizes>p-tieredmenusub>.p-tieredmenu-root-list>li:last-child{font-size:.8rem}.tag{width:5px;height:25px;border-radius:.25rem}:host ::ng-deep .p-speeddial-button.p-button.p-button-icon-only{width:2rem;height:2rem;font-size:1rem}.item-circle{width:4rem;height:2rem;padding:1rem;font-size:.8rem;border-radius:17%;display:flex;align-items:center;justify-content:center;background:#eaeaea!important;box-shadow:#0000003d 0 3px 13px}:host ::ng-deep p-speeddial>div>button>span.material-symbols-outlined.ng-star-inserted{font-size:1.1rem}:host ::ng-deep .check-edit-list>div.p-checkbox.p-component{height:1rem}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td:first-child{border-left:1px solid #ddd!important}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td:last-child{border-right:1px solid #ddd!important}:host ::ng-deep .p-datatable-wrapper::-webkit-scrollbar:hover{background-color:#dededebf}:host ::ng-deep .p-datatable-wrapper::-webkit-scrollbar{width:6px;height:3px}:host ::ng-deep .p-datatable-wrapper:hover::-webkit-scrollbar-thumb{border-left:2px solid white;background-color:#00000080}:host ::ng-deep .p-datatable-wrapper::-webkit-scrollbar-thumb{border-radius:4px;background-color:transparent}:host ::ng-deep .p-datatable-wrapper::-webkit-scrollbar-track{border-left:2px solid white;background-color:#dededebf}:host ::ng-deep .p-datatable>.p-datatable-wrapper{overflow-y:hidden}\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: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "directive", type: i1$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i5$2.AutoFocus, selector: "[pAutoFocus]", inputs: ["autofocus"] }, { kind: "directive", type: i6.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "directive", type: i1$1.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "component", type: i7$2.ContextMenu, selector: "p-contextMenu", inputs: ["model", "triggerEvent", "target", "global", "style", "styleClass", "appendTo", "autoZIndex", "baseZIndex", "id", "ariaLabel", "ariaLabelledBy", "pressDelay"], outputs: ["onShow", "onHide"] }, { kind: "component", type: i4.Dropdown, selector: "p-dropdown", inputs: ["id", "scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "variant", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "disabled", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "filterValue", "options"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "directive", type: i5$3.InputText, selector: "[pInputText]", inputs: ["variant"] }, { kind: "component", type: i5.Menu, selector: "p-menu", inputs: ["model", "popup", "style", "styleClass", "appendTo", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "ariaLabel", "ariaLabelledBy", "id", "tabindex"], outputs: ["onShow", "onHide", "onBlur", "onFocus"] }, { kind: "component", type: i11.Panel, selector: "p-panel", inputs: ["toggleable", "header", "collapsed", "style", "styleClass", "iconPos", "expandIcon", "collapseIcon", "showHeader", "toggler", "transitionOptions"], outputs: ["collapsedChange", "onBeforeToggle", "onAfterToggle"] }, { kind: "directive", type: i2.Ripple, selector: "[pRipple]" }, { kind: "component", type: i13.TieredMenu, selector: "p-tieredMenu", inputs: ["model", "popup", "style", "styleClass", "appendTo", "autoZIndex", "baseZIndex", "autoDisplay", "showTransitionOptions", "hideTransitionOptions", "id", "ariaLabel", "ariaLabelledBy", "disabled", "tabindex"], outputs: ["onShow", "onHide"] }, { kind: "component", type: i14.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll", "virtualRowHeight"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i14.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "directive", type: i14.ContextMenuRow, selector: "[pContextMenuRow]", inputs: ["pContextMenuRow", "pContextMenuRowIndex", "pContextMenuRowDisabled"] }, { kind: "directive", type: i14.ReorderableColumn, selector: "[pReorderableColumn]", inputs: ["pReorderableColumnDisabled"] }, { kind: "directive", type: i14.EditableColumn, selector: "[pEditableColumn]", inputs: ["pEditableColumn", "pEditableColumnField", "pEditableColumnRowIndex", "pEditableColumnDisabled", "pFocusCellSelector"] }, { kind: "component", type: i14.CellEditor, selector: "p-cellEditor" }, { kind: "component", type: i14.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "component", type: i14.TableCheckbox, selector: "p-tableCheckbox", inputs: ["disabled", "value", "index", "inputId", "name", "required", "ariaLabel"] }, { kind: "component", type: i14.TableHeaderCheckbox, selector: "p-tableHeaderCheckbox", inputs: ["disabled", "inputId", "name", "ariaLabel"] }, { kind: "directive", type: i14.EditableRow, selector: "[pEditableRow]", inputs: ["pEditableRow", "pEditableRowDisabled"] }, { kind: "directive", type: i14.InitEditableRow, selector: "[pInitEditableRow]" }, { kind: "directive", type: i14.CancelEditableRow, selector: "[pCancelEditableRow]" }, { kind: "component", type: i15.Toast, selector: "p-toast", inputs: ["key", "autoZIndex", "baseZIndex", "life", "style", "styleClass", "position", "preventOpenDuplicates", "preventDuplicates", "showTransformOptions", "hideTransformOptions", "showTransitionOptions", "hideTransitionOptions", "breakpoints"], outputs: ["onClose"] }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: KvInputCalendarComponent, selector: "kv-input-calendar", inputs: ["isYear", "isMonthYear", "minDate", "maxDate", "showButtonBar", "showIcon", "showTime", "selectionMode"], outputs: ["onSelectionChange", "onSelectionValue"] }, { kind: "component", type: KvInputMaskComponent, selector: "kv-input-mask", inputs: ["mask"], outputs: ["onComplete"] }, { kind: "component", type: KvInputNumberComponent, selector: "kv-input-number", inputs: ["mode", "digits", "min", "max", "suffix"] }, { kind: "component", type: KvInputTextComponent, selector: "kv-input-text", inputs: ["textCaptalized"] }, { kind: "component", type: KvSwitchComponent, selector: "kv-switch", inputs: ["readonly", "switchValue"], outputs: ["onSwitchChange"] }, { kind: "component", type: KvButtonComponent, selector: "kv-button", inputs: ["label", "icon", "loading", "disabled", "severity", "size", "fullWidth"], outputs: ["onClick"] }, { kind: "pipe", type: i1.DatePipe, name: "date" }, { kind: "pipe", type: MaskPipe, name: "mask" }] }); }
|
|
6511
6882
|
}
|
|
6512
6883
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvTableEditComponent, decorators: [{
|
|
6513
6884
|
type: Component,
|
|
6514
|
-
args: [{ selector: 'kv-table-edit', template: "<div class=\"card\" id=\"tamanhotabela\" [style.font-size]=\"'1px'\">\r\n <p-toast></p-toast>\r\n\r\n @if(filtrosAvancados){\r\n <p-panel\r\n header=\"Filtros avan\u00E7ados\"\r\n [toggleable]=\"true\"\r\n [collapsed]=\"true\"\r\n (collapsedChange)=\"collapsed = !collapsed\"\r\n [style]=\"{ 'margin-bottom': '2px' }\"\r\n >\r\n <ng-template pTemplate=\"headericons\">\r\n @if (!collapsed) {\r\n <i class=\"pi pi-filter\"></i>\r\n }\r\n <!-- \u00CDcone quando o painel est\u00E1 aberto -->\r\n @if (collapsed) {\r\n <i class=\"pi pi-minus\"></i>\r\n }\r\n <!-- \u00CDcone quando o painel est\u00E1 fechado -->\r\n </ng-template>\r\n <ng-content></ng-content>\r\n </p-panel>\r\n }\r\n\r\n <p-contextMenu #cm [model]=\"itemsContextMenu\"></p-contextMenu>\r\n <p-table\r\n #te\r\n [editMode]=\"editMode\"\r\n (onEditComplete)=\"onEditComplete($event)\"\r\n (onEditInit)=\"onEditInit($event)\"\r\n [reorderableColumns]=\"config.reorderableColumns || false\"\r\n *ngIf=\"config\"\r\n [value]=\"dataSource\"\r\n [dataKey]=\"config.dataKey\"\r\n [columns]=\"config.columns\"\r\n [scrollable]=\"true\"\r\n appendTo=\"body\"\r\n [styleClass]=\"selectedSize.class\"\r\n [(selection)]=\"selectedItems\"\r\n [rowSelectable]=\"isRowSelectable\"\r\n [globalFilterFields]=\"globalFilterFields\"\r\n [rows]=\"rows\"\r\n [paginator]=\"paginator\"\r\n [rowsPerPageOptions]=\"rowsPerPageOptions\"\r\n [showCurrentPageReport]=\"true\"\r\n currentPageReportTemplate=\"{first} - {last} de {totalRecords}\"\r\n (selectionChange)=\"selectionChange($event)\"\r\n [rowHover]=\"true\"\r\n [totalRecords]=\"totalRecords\"\r\n [lazy]=\"config.lazy\"\r\n (onLazyLoad)=\"paginate($event)\"\r\n [groupRowsBy]=\"config.fieldGroup\"\r\n paginatorDropdownAppendTo=\"body\"\r\n [showFirstLastIcon]=\"showFirstLastIcon\"\r\n [pageLinks]=\"pageLinksOptions\"\r\n [scrollable]=\"isTableScrollable\"\r\n [scrollHeight]=\"scrollHeight\"\r\n [rowTrackBy]=\"rowTrackBy\"\r\n [(contextMenuSelection)]=\"selectedProduct\"\r\n [contextMenu]=\"isEditableTable() ? cm : null\"\r\n >\r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n\r\n @if (config.enableCation || enableSizes){\r\n <ng-template pTemplate=\"caption\">\r\n <div\r\n class=\"flex flex-row flex-wrap justify-content-between align-items-center grid formgrid p-fluid col-12 pt-1 pb-1 m-0\"\r\n >\r\n <div class=\"col-12 flex flex-column\">\r\n @if (config.title) {\r\n <div class=\"text-md font-bold my-3\">\r\n {{ config.title }}\r\n </div>\r\n } @if (config.subtitle) {\r\n <div class=\"text-sm mb-4 font-medium\">\r\n {{ config.subtitle }}\r\n </div>\r\n }\r\n </div>\r\n\r\n <div\r\n class=\"flex flex-row align-items-center md:col-6 lg:col-4 {{\r\n tamanhoTela < 768 ? 'col-10' : 'col-12'\r\n }} mt-1 mb-2 gap-1\"\r\n >\r\n \r\n @if (config.enableFilter) {\r\n <span class=\"p-input-icon-left\">\r\n <i class=\"pi pi-search\"></i>\r\n \r\n <input\r\n pInputText\r\n pAutoFocus\r\n [autofocus]=\"true\"\r\n type=\"text\"\r\n (input)=\"onGlobalFilter(te, $event)\"\r\n placeholder=\"Pesquisar...\"\r\n class=\"h-2rem\"\r\n autocomplete=\"off\"\r\n />\r\n </span>\r\n }\r\n\r\n @if(enableSizes){\r\n <div class=\"sizes-controls\">\r\n \r\n <kv-button (click)=\"menu.toggle($event)\"\r\n [severity]=\"'tertiary'\"\r\n [icon]=\"'match_case'\"\r\n [pTooltip]=\"'Tamanho da fonte'\"\r\n >\r\n </kv-button>\r\n \r\n <p-tieredMenu\r\n [style]=\"{ 'font-size': '0.7rem' }\"\r\n styleClass=\"menuSizes\"\r\n appendTo=\"body\"\r\n #menu\r\n [model]=\"sizes\"\r\n [popup]=\"true\"\r\n >\r\n <ng-template let-item pTemplate=\"item\">\r\n <div\r\n class=\"cursor-pointer flex gap-2 align-items-center pl-1 m-2 menu-sizes\"\r\n (click)=\"item.command()\"\r\n >\r\n @if(this.selectedSize.size != item.size){\r\n <div\r\n class=\"tag\"\r\n [style.background-color]=\"'#EAEAEA'\"\r\n ></div>\r\n }\r\n \r\n @if(this.selectedSize.size == item.size){\r\n <div\r\n class=\"tag\"\r\n [style.background-color]=\"'#1DA750'\"\r\n ></div>\r\n }\r\n \r\n {{ item.label }}\r\n </div>\r\n </ng-template>\r\n </p-tieredMenu>\r\n </div>\r\n }\r\n </div>\r\n\r\n @if(isEditing){\r\n <span class=\"text-aviso\">\r\n Tabela em modo de edi\u00E7\u00E3o\r\n </span>\r\n }\r\n \r\n <div class=\"flex flex-row col-2 justify-content-end gap-2\">\r\n @for (action of config.actionsLote; track i; let i = $index) {\r\n @if(!isEditing){\r\n <div class=\"flex align-items-center justify-content-center\">\r\n @if ((selectedItems.length > 0 || action.showAcoesLote) &&\r\n (getOrExecute(action.visible, selectedItems) ?? true)) {\r\n <kv-button\r\n (onClick)=\"action?.command(); activeItemLote(selectedItems)\"\r\n [pTooltip]=\"getOrExecute(action.tooltip, selectedItems)\"\r\n [tooltipPosition]=\"\r\n (getOrExecute(action.tooltip, selectedItems)?.length ??\r\n 0 > 7) &&\r\n config.actionsLote &&\r\n i == config.actionsLote.length - 1\r\n ? 'left'\r\n : 'bottom'\r\n \"\r\n [disabled]=\"getOrExecute(action.disabled, selectedItems) || false\"\r\n [icon]=\"getOrExecute(action.icon, selectedItems)\"\r\n [severity]=\"action.severity || 'tertiary'\"\r\n />\r\n }\r\n </div>\r\n }\r\n }\r\n\r\n @if (isEditableTable()) {\r\n <div>\r\n <kv-button\r\n (click)=\"this.isEditing = !this.isEditing\"\r\n [pTooltip]=\"!isEditing ? 'Habilitar Edi\u00E7\u00E3o' : 'Desabilitar Edi\u00E7\u00E3o'\"\r\n [tooltipPosition]=\"'left'\"\r\n [severity]=\"'tertiary'\"\r\n [icon]=\"'edit_square'\"\r\n >\r\n </kv-button>\r\n </div>\r\n }\r\n </div>\r\n\r\n <!---------------->\r\n \r\n </div>\r\n </ng-template>\r\n }\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n @if(config.enableSelect && !isEditing){\r\n <th\r\n [class]=\"selectedSize.class + 'th'\"\r\n >\r\n <p-tableHeaderCheckbox\r\n (click)=\"activeItemLote(selectedItems)\"\r\n ></p-tableHeaderCheckbox>\r\n </th>\r\n }\r\n @for(col of columns; track $index){\r\n <th\r\n [pSortableColumn]=\"col.field\"\r\n [pSortableColumnDisabled]=\"col.sortable === false\"\r\n [style.min-width]=\"col.width * selectedSize.size + 'px'\"\r\n pReorderableColumn\r\n [class]=\"selectedSize.class + 'th'\"\r\n \r\n >\r\n <div\r\n [class]=\"\r\n centralizarColunas(col) && alignColunasHeader(col) == ''\r\n ? 'flex flex-row justify-content-center'\r\n : 'flex flex-row'\r\n \"\r\n [style]=\"alignColunasHeader(col)\"\r\n >\r\n <span>{{ col.header }}</span>\r\n @if(col.sortable === true) {\r\n <p-sortIcon\r\n [field]=\"col.field\"\r\n style=\"font-size: 10px\"\r\n ></p-sortIcon>\r\n }\r\n @if(col.headerTooltip){\r\n <span\r\n class=\"material-symbols-outlined flex align-items-center\"\r\n [pTooltip]=\"col.headerTooltip\"\r\n >\r\n info\r\n </span>\r\n }\r\n \r\n </div>\r\n </th>\r\n }\r\n \r\n @if(!isEditing && config.actions && config.actions.length > 0){\r\n <th></th>\r\n }\r\n\r\n @if(isEditableTable() && this.editMode == 'row'){\r\n <th\r\n id=\"th-edit\"\r\n style=\"width: 20px\"\r\n >\r\n Editar\r\n </th>\r\n }\r\n \r\n </tr>\r\n </ng-template>\r\n\r\n\r\n \r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n\r\n <ng-template\r\n pTemplate=\"body\"\r\n let-rowData\r\n let-editing=\"editing\"\r\n let-ri=\"rowIndex\"\r\n let-columns=\"columns\"\r\n let-rowgroup=\"rowgroup\"\r\n let-rowspan=\"rowspan\"\r\n >\r\n <tr\r\n [pEditableRow]=\"rowData\"\r\n [pEditableRowDisabled]=\"false\"\r\n [pContextMenuRow]=\"{rowData, editing}\"\r\n [class]=\"selectedSize.class + '-tr'\"\r\n (dblclick)=\"doubleClick($event, rowData)\"\r\n >\r\n @if(config.enableSelect && !isEditing){\r\n <td\r\n [style]=\"applyStyle(rowData, { field: 'check-box', header: '' })\"\r\n >\r\n \r\n <p-tableCheckbox\r\n class=\"check-edit-list\"\r\n [value]=\"rowData\"\r\n [disabled]=\"isDisabledCheckbox(rowData)\"\r\n (click)=\"activeItemLote(selectedItems)\"\r\n ></p-tableCheckbox>\r\n </td>\r\n }\r\n @for (col of columns; track i; let i = $index){\r\n <ng-container>\r\n <!-- FIXME: Testar a implementa\u00E7\u00E3o abaixo e mesaclar as duas formas -->\r\n \r\n <ng-template #templateInput let-rowData=\"rowData\" let-col=\"col\">\r\n <ng-container *ngIf=\"isEditing; else templatevisualedicao\">\r\n <ng-container [ngSwitch]=\"col.fieldControlType\">\r\n <ng-container *ngSwitchCase=\"'text'\">\r\n <div [style.width]=\"col.width\" class=\"grid formgrid p-fluid\">\r\n <kv-input-text\r\n [disabled]=\"isDisableEditRowCellFunction(rowData, col)\"\r\n class=\"cellControl col\"\r\n [(ngModel)]=\"rowData[col.field]\"\r\n [required]=\"col.required ?? true\"\r\n ></kv-input-text>\r\n </div>\r\n </ng-container>\r\n \r\n <ng-container *ngSwitchCase=\"'number'\">\r\n <div [style.width]=\"col.width\" class=\"grid formgrid p-fluid\">\r\n <kv-input-number\r\n [disabled]=\"isDisableEditRowCellFunction(rowData, col)\"\r\n class=\"cellControl col\"\r\n [(ngModel)]=\"rowData[col.field]\"\r\n [required]=\"col.required ?? true\"\r\n ></kv-input-number>\r\n </div>\r\n </ng-container>\r\n \r\n <ng-container *ngSwitchCase=\"'mask'\">\r\n <div [style.width]=\"col.width\" class=\"grid formgrid p-fluid\">\r\n <kv-input-mask\r\n [disabled]=\"isDisableEditRowCellFunction(rowData, col)\"\r\n class=\"cellControl col\"\r\n [mask]=\"col.mask\"\r\n [required]=\"col.required ?? true\"\r\n [(ngModel)]=\"rowData[col.field]\"\r\n ></kv-input-mask>\r\n </div>\r\n </ng-container>\r\n \r\n <ng-container *ngSwitchCase=\"'switch'\">\r\n <div [style.width]=\"col.width\" class=\"grid formgrid p-fluid\">\r\n <kv-switch\r\n [disabled]=\"isDisableEditRowCellFunction(rowData, col)\"\r\n class=\"cellControl col\"\r\n [(ngModel)]=\"rowData[col.field]\"\r\n ></kv-switch>\r\n </div>\r\n </ng-container>\r\n \r\n <ng-container *ngSwitchCase=\"'calendar'\">\r\n <div [style.width]=\"col.width\">\r\n <div\r\n [style.width]=\"col.width\"\r\n class=\"grid formgrid p-fluid\"\r\n >\r\n <kv-input-calendar\r\n class=\"cellControl col\"\r\n [(ngModel)]=\"rowData[col.field]\"\r\n ></kv-input-calendar>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'dropdown'\">\r\n <div [style.width]=\"col.width\" class=\"grid formgrid p-fluid\">\r\n <p-dropdown\r\n [disabled]=\"isDisableEditRowCellFunction(rowData, col)\"\r\n class=\"cellControl col\"\r\n appendTo=\"body\"\r\n [panelStyle]=\"{ 'font-size': '0.75rem' }\"\r\n [optionLabel]=\"col.fieldDropDownControl.descricaoobjeto\"\r\n [optionValue]=\"col.fieldDropDownControl.idobjeto\"\r\n [options]=\"\r\n col.fieldDropDownControl.fieldControlDropdownSource\r\n \"\r\n [(ngModel)]=\"rowData[col.field]\"\r\n >\r\n </p-dropdown>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n \r\n <ng-template #templatevisualedicao>\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n templateOutput;\r\n context: { rowData: rowData, col: col }\r\n \"\r\n ></ng-container>\r\n </ng-template>\r\n </ng-template>\r\n \r\n <ng-template #templateOutput let-rowData=\"rowData\" let-col=\"col\">\r\n <ng-container [ngSwitch]=\"col.fieldControlType\">\r\n <ng-container *ngSwitchCase=\"'dropdown'\">\r\n <ng-container *ngIf=\"rowData[col.field]\">\r\n {{ transformValueDrop(retornaDescricaoDrop(rowData, col), col) }}\r\n </ng-container>\r\n </ng-container>\r\n \r\n <ng-container *ngSwitchCase=\"'switch'\">\r\n <kv-switch\r\n [(ngModel)]=\"rowData[col.field]\"\r\n [disabled]=\"true\"\r\n ></kv-switch>\r\n </ng-container>\r\n \r\n <ng-container *ngSwitchCase=\"'calendar'\">\r\n {{ rowData[col.field] | date }}\r\n </ng-container>\r\n \r\n <ng-container *ngSwitchCase=\"'mask'\">\r\n {{ rowData[col.field] | mask : col.mask }}\r\n </ng-container>\r\n \r\n <ng-container *ngSwitchDefault>\r\n {{ transformValue(rowData, col) }}\r\n </ng-container>\r\n </ng-container>\r\n </ng-template>\r\n \r\n @if(editMode == 'cell' && col.fieldControlType){\r\n <td\r\n [pEditableColumn]=\"rowData\"\r\n [pEditableColumnField]=\"col.field\"\r\n [pEditableColumnRowIndex]=\"rowData[config.dataKey]\"\r\n [id]=\"'rowTable' + rowData[config.dataKey]\"\r\n (click)=\"activeItem(rowData)\"\r\n (dblclick)=\"dbClickEdit()\"\r\n class=\"rowTable\"\r\n [style]=\"\r\n applyStyle(rowData, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col)\r\n \"\r\n [pTooltip]=\"returnTooltipRow(rowData, col)\"\r\n >\r\n <p-cellEditor>\r\n <ng-container>\r\n <ng-template pTemplate=\"input\">\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n templateInput;\r\n context: { rowData: rowData, col: col }\r\n \"\r\n ></ng-container>\r\n </ng-template>\r\n \r\n <ng-template pTemplate=\"output\">\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n templateOutput;\r\n context: { rowData: rowData, col: col }\r\n \"\r\n ></ng-container>\r\n </ng-template>\r\n </ng-container>\r\n \r\n </p-cellEditor>\r\n </td>\r\n }\r\n \r\n <!-- NOTE: Edi\u00E7\u00E3o de linha -->\r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n \r\n <!-- Celula que armazena os controles de edi\u00E7\u00E3o para os campos -->\r\n @if(false && col.fieldControlType && editMode == 'row'){\r\n <td\r\n [id]=\"'rowTable' + rowData[config.dataKey]\"\r\n (click)=\"activeItem(rowData)\"\r\n (dblclick)=\"dbClickEdit()\"\r\n class=\"rowTable\"\r\n [style]=\"\r\n applyStyle(rowData, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col)\r\n \"\r\n [pTooltip]=\"returnTooltipRow(rowData, col)\"\r\n >\r\n <p-cellEditor\r\n [ngClass]=\"{ switch: col.fieldControlType == 'switch' }\"\r\n >\r\n <ng-template pTemplate=\"input\">\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n templateInput;\r\n context: { rowData: rowData, col: col }\r\n \"\r\n ></ng-container>\r\n </ng-template>\r\n \r\n <ng-template pTemplate=\"output\">\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n templateOutput;\r\n context: { rowData: rowData, col: col }\r\n \"\r\n ></ng-container>\r\n </ng-template>\r\n </p-cellEditor>\r\n </td>\r\n }\r\n \r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n \r\n <td\r\n *ngIf=\"rowgroup && !col.template\"\r\n [attr.rowspan]=\"rowgroup && col.grouped ? rowspan : null\"\r\n class=\"rowTable\"\r\n [style]=\"\r\n applyStyle(rowData, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col)\r\n \"\r\n [pTooltip]=\"returnTooltipRow(rowData, col)\"\r\n >\r\n <span class=\"p-column-title\">{{ col.header }}:</span>\r\n \r\n <span\r\n *ngIf=\"!isBooleanField(rowData, col); else booleanField\"\r\n [class]=\"returnRowClass(rowData, col)\"\r\n >\r\n <span\r\n *ngIf=\"\r\n !isChipField(col) && !col.iconField && !isImageField(col)\r\n \"\r\n >\r\n <i *ngIf=\"col.icon\" [class]=\"col.icon + ' mr-2'\"></i>\r\n {{ transformValue(rowData, col) }}\r\n </span>\r\n \r\n <div *ngIf=\"isChipField(col) && !col.iconField\">\r\n <span\r\n [class]=\"returnClassChip(rowData, col)\"\r\n [pTooltip]=\"returnTooltipIcon(rowData, col)\"\r\n >{{ transformValue(rowData, col) }}</span\r\n >\r\n </div>\r\n </span>\r\n \r\n <span *ngIf=\"isImageField(col)\">\r\n <span>\r\n <img class=\"image\" [src]=\"loadImage(rowData, col)\" />\r\n </span>\r\n </span>\r\n \r\n <i\r\n *ngIf=\"col.iconField\"\r\n [ngClass]=\"{\r\n 'material-icons': col.indIconMaterial,\r\n 'material-symbols-outlined mr-2': !col.indIconMaterial\r\n }\"\r\n [pTooltip]=\"returnTooltipIcon(rowData, col)\"\r\n >\r\n {{ returnClassIcon(rowData, col) }}\r\n </i>\r\n \r\n <ng-template #booleanField>\r\n <i\r\n *ngIf=\"!col.iconField && !isSwitchField(col)\"\r\n [ngClass]=\"\r\n rowData[col.field] ? 'text-green-500' : 'text-red-500'\r\n \"\r\n ><span class=\"material-symbols-outlined\">\r\n {{ rowData[col.field] ? \"check\" : \"close\" }}\r\n </span>\r\n </i>\r\n \r\n <span\r\n *ngIf=\"isSwitchField(col)\"\r\n [class]=\"returnRowClass(rowData, col)\"\r\n >\r\n <kv-switch\r\n (onSwitchChange)=\"onSwitchChange($event, rowData, col)\"\r\n [disabled]=\"col?.onlyReadField ?? true\"\r\n [switchValue]=\"transformValue(rowData, col)\"\r\n >\r\n </kv-switch>\r\n </span>\r\n </ng-template>\r\n </td>\r\n \r\n <td\r\n *ngIf=\"\r\n !rowgroup &&\r\n !col.grouped &&\r\n !col.template &&\r\n !col.fieldControlType\r\n \"\r\n [style]=\"\r\n applyStyle(rowData, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col)\r\n \"\r\n class=\"rowTable\"\r\n [pTooltip]=\"returnTooltipRow(rowData, col)\"\r\n >\r\n <span class=\"p-column-title\">{{ col.header }}:</span>\r\n \r\n <span\r\n *ngIf=\"!isBooleanField(rowData, col); else booleanField\"\r\n [class]=\"returnRowClass(rowData, col)\"\r\n >\r\n <span\r\n *ngIf=\"\r\n !isChipField(col) && !col.iconField && !isImageField(col)\r\n \"\r\n >\r\n <i *ngIf=\"col.icon\" [class]=\"col.icon + ' mr-2'\"></i>\r\n {{ transformValue(rowData, col) }}\r\n </span>\r\n \r\n <div *ngIf=\"isChipField(col) && !col.iconField\">\r\n <span\r\n [class]=\"returnClassChip(rowData, col)\"\r\n [pTooltip]=\"returnTooltipIcon(rowData, col)\"\r\n >\r\n {{ transformValue(rowData, col) }}</span\r\n >\r\n </div>\r\n </span>\r\n \r\n <span *ngIf=\"isImageField(col)\">\r\n <span>\r\n <img class=\"image\" [src]=\"loadImage(rowData, col)\" />\r\n </span>\r\n </span>\r\n \r\n <i\r\n *ngIf=\"col.iconField\"\r\n [ngClass]=\"{\r\n 'material-icons': col.indIconMaterial,\r\n 'material-symbols-outlined mr-2': !col.indIconMaterial\r\n }\"\r\n [pTooltip]=\"returnTooltipIcon(rowData, col)\"\r\n >\r\n {{ returnClassIcon(rowData, col) }}\r\n </i>\r\n \r\n <ng-template #booleanField>\r\n <i\r\n *ngIf=\"!col.iconField && !isSwitchField(col)\"\r\n [ngClass]=\"\r\n rowData[col.field] ? 'text-green-500' : 'text-red-500'\r\n \"\r\n ><span class=\"material-symbols-outlined\">\r\n {{ rowData[col.field] ? \"check\" : \"close\" }}\r\n </span>\r\n </i>\r\n \r\n <span\r\n *ngIf=\"isSwitchField(col)\"\r\n [class]=\"returnRowClass(rowData, col)\"\r\n >\r\n <kv-switch\r\n (onSwitchChange)=\"onSwitchChange($event, rowData, col)\"\r\n [disabled]=\"col?.onlyReadField ?? true\"\r\n [switchValue]=\"transformValue(rowData, col)\"\r\n >\r\n </kv-switch>\r\n </span>\r\n </ng-template>\r\n </td>\r\n \r\n <td\r\n *ngIf=\"col.template && !isEditableTable()\"\r\n [style]=\"\r\n applyStyle(rowData, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col)\r\n \"\r\n class=\"rowTable\"\r\n >\r\n <span class=\"p-column-title\">{{ col.header }}:</span>\r\n <ng-container\r\n *ngIf=\"getCustomTemplate(col.template.name)\"\r\n [ngTemplateOutlet]=\"getCustomTemplate(col.template.name)\"\r\n [ngTemplateOutletContext]=\"{ $implicit: rowData }\"\r\n >\r\n </ng-container>\r\n </td>\r\n </ng-container>\r\n }\r\n \r\n\r\n <!-- ------------------------------------------------------------------------------------------------------------------------------------------- -->\r\n <!-- Controle de a\u00E7\u00E3o -->\r\n @if(!isEditing && config.actions && config.actions.length > 0){\r\n <td\r\n [ngClass]=\"{\r\n 'td-tools': isEditableTable() && this.editMode == 'row',\r\n 'td-tools-sticky': !isEditableTable() || this.editMode == 'cell'\r\n }\"\r\n [style]=\"\r\n applyStyle(rowData, { field: 'btns-options', header: '' }) +\r\n 'border-right: 1px solid #ddd !important; border-left: 1px solid #ddd !important;'\r\n \"\r\n >\r\n <div class=\"flex flex-row justify-content-end w-full\">\r\n \r\n <span\r\n class=\"material-symbols-outlined cursor-pointer icon-more-horiz\"\r\n style=\"font-size: 1rem; height: 10px; width: 20px\"\r\n (click)=\"menu.toggle($event); activeItem(rowData)\"\r\n >\r\n more_horiz\r\n </span>\r\n <!-- </button> -->\r\n\r\n <div *ngFor=\"let action of config.actions\">\r\n {{ criarMenusModal(rowData) }}\r\n </div>\r\n\r\n\r\n <p-menu\r\n #menu\r\n [popup]=\"true\"\r\n [model]=\"menuItems\"\r\n appendTo=\"body\"\r\n ></p-menu>\r\n </div>\r\n </td>\r\n }\r\n \r\n <!-- ------------------------------------------------------------------------------------------------------------------------------------------- -->\r\n <!-- Controle de edi\u00E7\u00E3o -->\r\n @if(this.isEditableTable() && this.editMode == 'row'){\r\n <td class=\"td-edit\">\r\n <div class=\"flex align-items-center justify-content-center gap-2\">\r\n @if(!editing){\r\n <button\r\n [style.height]=\"'28px'\"\r\n [id]=\"'rowEdit' + rowData[config.dataKey]\"\r\n [style.width]=\"'28px'\"\r\n [disabled]=\"isDisableEditRowFunction(rowData)\"\r\n pButton\r\n pRipple\r\n type=\"button\"\r\n pInitEditableRow\r\n icon=\"pi pi-pencil\"\r\n (click)=\"onRowEditInit(rowData)\"\r\n class=\"p-button-rounded p-button-text\"\r\n ></button>\r\n }\r\n \r\n @if(editing){\r\n <button\r\n [style.height]=\"'28px'\"\r\n [style.width]=\"'28px'\"\r\n [disabled]=\"isDisableEditRowFunction(rowData)\"\r\n pButton\r\n pRipple\r\n type=\"button\"\r\n pCancelEditableRow\r\n icon=\"pi pi-times\"\r\n (click)=\"onRowEditCancel(rowData, ri)\"\r\n [id]=\"'rowCancel' + rowData[config.dataKey]\"\r\n class=\"p-button-rounded p-button-text p-button-danger\"\r\n ></button>\r\n }\r\n \r\n </div>\r\n </td>\r\n }\r\n \r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n</div>\r\n", styles: ["@charset \"UTF-8\";.td-edit{position:sticky;right:-1px;background-color:#fff;color:#5289b4}.td-tools{position:sticky;right:52px;border-right:1px solid #ddd!important;background-color:#fff;box-shadow:-5px 0 20px -10px #000000bf}.td-tools-sticky{position:sticky;right:0;border-right:3px solid #fff!important;background-color:#fff}#th-edit{position:sticky;right:0;background-color:#eaeaea}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td{text-align:center;border:1px solid #eaeaea;border-width:1px 1px;padding:0rem .5rem}:host ::ng-deep .p-datatable .p-datatable-thead>tr>th{text-align:center;padding:0rem .5rem;border-left:none;border-right:none;border-width:1px 1px;font-weight:700;color:#343a40;background:#eaeaea;transition:box-shadow .2s}.error-show{background-color:red;width:5px;height:10px}.btns-options{position:relative;left:20px}.chip-style{border:solid 1px}:host::ng-deep .p-card .p-card-content{padding:0}.material-symbols-outlined.md-19{font-size:15px}.material-symbols-outlined.md-22{font-size:19px}.checkbox-container{display:flex;align-items:center;gap:2px;margin-top:5px}#botaoFiltro:hover{color:#a9a9a9}.actionLoteBtns{align-items:center;background-color:#29b92d;color:#f2f3f5;display:flex;font-size:16px;width:2rem;height:2rem;top:2px;margin-left:.5rem;justify-content:center;text-decoration:none;text-align:center;padding:12px}:host ::ng-deep .center{display:flex;align-items:center;justify-content:center}#actionLoteBtns:hover,.actionLoteBtns:hover{background-color:#249a29!important}.actionBtns{align-items:center;background-color:transparent;color:#a9a9a9;display:flex;width:.8rem;height:.8rem;margin-left:.22rem;justify-content:center;text-decoration:none;text-align:justify;padding:11px}:host::ng-deep .material-symbols-outlined{font-family:Material Symbols Outlined;font-weight:400;font-style:normal;line-height:.9;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased}#actionBtns:hover{color:#a9a9a9}.image{border-style:solid;border-width:3.5px;border-color:#5289b4;border-radius:100%;height:55px;width:55px;padding:0;margin:0;vertical-align:middle}:host ::ng-deep .p-datatable-header{background-color:#eaeaea!important;padding:0!important;border-radius:5px!important}:host ::ng-deep .p-datatable .p-datatable-thead>tr>th{background-color:#eaeaea!important}:host ::ng-deep .p-datatable .p-datatable-thead>tr>th:first-of-type{border-radius:5px 0 0 5px}:host ::ng-deep .p-datatable .p-datatable-thead>tr>th:last-child{border-radius:0 5px 5px 0}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td{border-left:none!important;border-right:none!important}:host ::ng-deep .actionBtns,:host ::ng-deep .actionLoteBtns{border-radius:20%;box-shadow:#0000003d 0 3px 8px}.icon-more-horiz:hover,.icon-more-horiz:focus{color:#5e5e5e;transform:scale(1.1);transition:color .3s,transform .3s}:host ::ng-deep .p-checkbox .p-checkbox-box.p-highlight{border-color:#004172;background:#004172}:host ::ng-deep .p-checkbox .p-checkbox-box.p-highlight:hover{background-color:#002542}:host ::ng-deep .p-checkbox .p-checkbox-box.p-highlight:active{background-color:#002542}:host ::ng-deep .p-checkbox .p-checkbox-box.p-highlight:disabled{background-color:#002542;opacity:.4;cursor:auto}@media only screen and (min-width: 768px){.actionLoteBtns{top:-1px}}@media only screen and (max-width: 960px){:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td:has(p-tablecheckbox){border-bottom:0px!important}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td:has(img){justify-content:center!important;align-items:center!important}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td:has(img) .p-column-title{display:none!important}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td:last-child{border-bottom:1px solid #ddd!important}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td:last-child div{justify-content:center!important;align-items:center!important}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td .p-column-title{font-weight:600}}::ng-deep .p-panel.p-panel-toggleable .p-panel-header{background-color:#eaeaea!important}::ng-deep .field.grid,.formgrid.grid{padding:0rem!important}@media screen and (min-width: 961px){.moreVertBtn{position:relative;right:3px}}::ng-deep .p-datatable .p-datatable-thead>tr>th:last-of-type{border-radius:0 0 5px!important;-webkit-border-radius:0px 0px 5px 0px!important;-moz-border-radius:0px 0px 5px 0px!important;-ms-border-radius:0px 0px 5px 0px!important;-o-border-radius:0px 0px 5px 0px!important}::ng-deep .p-datatable .p-datatable-thead>tr>th:first-of-type{border-radius:0 0 0 5px!important;-webkit-border-radius:0px 0px 0px 5px!important;-moz-border-radius:0px 0px 0px 5px!important;-ms-border-radius:0px 0px 0px 5px!important;-o-border-radius:0px 0px 0px 5px!important}:host ::ng-deep p-celleditor>kv-switch>div>p-inputswitch.p-inputswitch-checked .p-inputswitch-slider:before{transform:translate(1.25rem);height:15px;margin-top:-8px;-webkit-transform:translateX(1.25rem);-moz-transform:translateX(1.25rem);-ms-transform:translateX(1.25rem);-o-transform:translateX(1.25rem)}:host ::ng-deep p-celleditor>kv-switch>div>p-inputswitch.p-inputswitch-checked .p-inputswitch-slider{height:21px}:host ::ng-deep p-celleditor>kv-switch>div>p-inputswitch{height:21px}:host ::ng-deep p-celleditor>kv-switch>div>p-inputswitch .p-inputswitch-slider:before{background:#fff;width:1rem;height:1.25rem;height:16px!important;left:.25rem;margin-top:-9px!important;margin-top:-.625rem;border-radius:50%;transition-duration:.2s}:host ::ng-deep p-celleditor>kv-switch>div>p-inputswitch:not(.p-disabled) .p-inputswitch-slider{height:21px}:host ::ng-deep .p-cell-editing{padding-top:0!important;padding-bottom:0!important}:host ::ng-deep p-dropdown-item{font-size:.1rem}.text-aviso{color:red;font-size:.85rem;font-weight:400;width:500px}:host ::ng-deep .p-checkbox .p-checkbox-box{width:18px;height:18px}:host ::ng-deep .p-selectbutton .p-button{font-size:.75rem!important;height:24px;padding:11px}#btn-sizes{border-radius:50%;width:.5rem!important;height:.5rem!important;box-shadow:#0000003d 0 3px 8px}:host ::ng-deep .p-datatable.p-datatable-sm{font-size:.625rem!important}:host ::ng-deep .p-datatable.p-datatable-md{font-size:.75rem!important}:host ::ng-deep .p-datatable.p-datatable-lg{font-size:.875rem!important}:host ::ng-deep .p-datatable-sm-tr>td i>span.material-symbols-outlined{font-size:.9rem}:host ::ng-deep .p-datatable-sm-tr>td .check-edit-list>.p-checkbox .p-checkbox-box{width:15px;height:15px}:host ::ng-deep .p-datatable-sm-tr>td p-celleditor>div>.cellControl>.p-dropdown .p-dropdown-label{width:1%;padding-top:0;padding-bottom:0;font-size:.6rem}:host ::ng-deep .p-datatable-sm-tr>td p-celleditor>div>kv-input-text>span>.inputs{padding-top:0;padding-bottom:0;font-size:.6rem;height:1rem}:host ::ng-deep .p-datatable-sm-tr>td p-celleditor>div>.cellControl>span>p-inputmask>.inputs{height:1rem;padding-top:0;padding-bottom:0;font-size:.6rem}:host ::ng-deep .p-datatable-sm-tr>td p-celleditor>div>kv-switch>div>p-inputswitch>div,:host ::ng-deep .p-datatable-sm-tr>td p-celleditor>kv-switch>div>p-inputswitch,:host ::ng-deep .p-datatable-sm-tr>td p-celleditor>kv-switch>div>p-inputswitch .p-inputswitch-slider{height:.6rem!important;width:2.4rem}:host ::ng-deep .p-datatable-sm-tr>td p-celleditor>kv-switch>div>p-inputswitch .p-inputswitch-slider:before{background:#fff;width:.6rem!important;height:.6rem!important;left:.2rem;margin-top:-.35rem!important;border-radius:50%;transition-duration:.2s}:host ::ng-deep .p-datatable-sm-tr>td p-celleditor>div>kv-switch>div>p-inputswitch>div>span:before{background:#fff;width:.6rem!important;height:.6rem!important;left:.2rem;margin-top:-.35rem!important;border-radius:50%;transition-duration:.2s}:host ::ng-deep .p-datatable-md-tr>td i>span.material-symbols-outlined{font-size:1rem}:host ::ng-deep .p-datatable-md-tr>td .check-edit-list>.p-checkbox .p-checkbox-box{width:18px;height:18px}:host ::ng-deep .p-datatable-md-tr>td p-celleditor>div>.cellControl>.p-dropdown .p-dropdown-label{width:1%;padding-top:0;padding-bottom:0;font-size:.7rem}:host ::ng-deep .p-datatable-md-tr>td p-celleditor>div>kv-input-text>span>.inputs{padding-top:0;padding-bottom:0;font-size:.7rem;height:1rem}:host ::ng-deep .p-datatable-md-tr>td p-celleditor>div>.cellControl>span>p-inputmask>.inputs{height:1rem;padding-top:0;padding-bottom:0;font-size:.7rem}:host ::ng-deep .p-datatable-md-tr>td p-celleditor>div>kv-switch>div>p-inputswitch>div,:host ::ng-deep .p-datatable-md-tr>td p-celleditor>kv-switch>div>p-inputswitch,:host ::ng-deep .p-datatable-md-tr>td p-celleditor>kv-switch>div>p-inputswitch .p-inputswitch-slider{height:.83rem!important;width:2.7rem}:host ::ng-deep .p-datatable-md-tr>td p-celleditor>kv-switch>div>p-inputswitch .p-inputswitch-slider:before{background:#fff;width:.7rem!important;height:.7rem!important;left:.25rem;margin-top:-.35rem!important;border-radius:50%;transition-duration:.2s}:host ::ng-deep .p-datatable-md-tr>td p-celleditor>div>kv-switch>div>p-inputswitch>div>span:before{background:#fff;width:.7rem;height:.7rem;left:.25rem;margin-top:-.4rem;border-radius:50%;transition-duration:.2s}:host ::ng-deep .p-datatable-lg-tr>td i>span.material-symbols-outlined{font-size:1.1rem}:host ::ng-deep .p-datatable-lg-tr>td p-celleditor>div>kv-input-text>span>.inputs{padding-top:0;padding-bottom:0;font-size:.8rem;height:1rem}:host ::ng-deep .p-datatable-lg-tr>td p-celleditor>div>.cellControl>.p-dropdown .p-dropdown-label{padding-top:0;padding-bottom:0;font-size:.8rem}:host ::ng-deep .p-datatable-lg-tr>td p-celleditor>div>.cellControl>span>p-inputmask>.inputs{height:1rem;padding-top:0;padding-bottom:0;font-size:.8rem}:host ::ng-deep .p-datatable-sm-tr>td{padding-top:0!important;padding-top:.05rem!important;padding-bottom:.05rem!important}:host ::ng-deep .p-datatable-md-tr>td,:host ::ng-deep .p-datatable-lg-tr>td{padding:.15rem!important}.p-datatable.p-datatable-smth{font-size:.6rem!important}.p-datatable.p-datatable-dmth{font-size:.7rem!important}.p-datatable.p-datatable-lgth{font-size:.8rem!important}:host ::ng-deep .p-datatable.p-datatable-sm * p-celleditor>div>p-dropdown>.p-dropdown:not(.p-paginator-rpp-options) p-celleditor>div>p-dropdown>.p-dropdown:not(.p-paginator-rpp-options){height:15px!important}:host ::ng-deep .p-datatable.p-datatable-md * p-celleditor>div>p-dropdown>.p-dropdown:not(.p-paginator-rpp-options) p-celleditor>div>p-dropdown>.p-dropdown:not(.p-paginator-rpp-options){height:25px!important}:host ::ng-deep .p-datatable.p-datatable-lg * p-celleditor>div>p-dropdown>.p-dropdown:not(.p-paginator-rpp-options) p-celleditor>div>p-dropdown>.p-dropdown:not(.p-paginator-rpp-options){height:30px!important}:host ::ng-deep p-celleditor>kv-switch>div>p-inputswitch .p-inputswitch-slider{height:21px!important}:host ::ng-deep .teste>.p-button{background:#eaeaea!important;color:#a9a9a9;border:none;box-shadow:#0000003d 0 3px 8px;height:20px}::ng-deep .menuSizes>p-tieredmenusub>.p-tieredmenu-root-list>li:first-child{font-size:.6rem}::ng-deep .menuSizes>p-tieredmenusub>.p-tieredmenu-root-list>li:last-child{font-size:.8rem}.tag{width:5px;height:25px;border-radius:.25rem}:host ::ng-deep .p-speeddial-button.p-button.p-button-icon-only{width:2rem;height:2rem;font-size:1rem}.item-circle{width:4rem;height:2rem;padding:1rem;font-size:.8rem;border-radius:17%;display:flex;align-items:center;justify-content:center;background:#eaeaea!important;box-shadow:#0000003d 0 3px 13px}:host ::ng-deep p-speeddial>div>button>span.material-symbols-outlined.ng-star-inserted{font-size:1.1rem}:host ::ng-deep .check-edit-list>div.p-checkbox.p-component{height:1rem}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td:first-child{border-left:1px solid #ddd!important}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td:last-child{border-right:1px solid #ddd!important}:host ::ng-deep .p-datatable-wrapper::-webkit-scrollbar:hover{background-color:#dededebf}:host ::ng-deep .p-datatable-wrapper::-webkit-scrollbar{width:6px;height:3px}:host ::ng-deep .p-datatable-wrapper:hover::-webkit-scrollbar-thumb{border-left:2px solid white;background-color:#00000080}:host ::ng-deep .p-datatable-wrapper::-webkit-scrollbar-thumb{border-radius:4px;background-color:transparent}:host ::ng-deep .p-datatable-wrapper::-webkit-scrollbar-track{border-left:2px solid white;background-color:#dededebf}:host ::ng-deep .p-datatable>.p-datatable-wrapper{overflow-y:hidden}\n"] }]
|
|
6885
|
+
args: [{ selector: 'kv-table-edit', template: "<div class=\"card\" id=\"tamanhotabela\" [style.font-size]=\"'1px'\">\r\n <p-toast></p-toast>\r\n\r\n @if(filtrosAvancados){\r\n <p-panel\r\n header=\"Filtros avan\u00E7ados\"\r\n [toggleable]=\"true\"\r\n [collapsed]=\"true\"\r\n (collapsedChange)=\"collapsed = !collapsed\"\r\n [style]=\"{ 'margin-bottom': '2px' }\"\r\n >\r\n <ng-template pTemplate=\"headericons\">\r\n @if (!collapsed) {\r\n <i class=\"pi pi-filter\"></i>\r\n }\r\n <!-- \u00CDcone quando o painel est\u00E1 aberto -->\r\n @if (collapsed) {\r\n <i class=\"pi pi-minus\"></i>\r\n }\r\n <!-- \u00CDcone quando o painel est\u00E1 fechado -->\r\n </ng-template>\r\n <ng-content></ng-content>\r\n </p-panel>\r\n }\r\n\r\n <p-contextMenu #cm [model]=\"itemsContextMenu\"></p-contextMenu>\r\n <p-table\r\n #te\r\n [editMode]=\"editMode\"\r\n (onEditComplete)=\"onEditComplete($event)\"\r\n (onEditInit)=\"onEditInit($event)\"\r\n [reorderableColumns]=\"config.reorderableColumns || false\"\r\n *ngIf=\"config\"\r\n [value]=\"dataSource\"\r\n [dataKey]=\"config.dataKey\"\r\n [columns]=\"config.columns\"\r\n [scrollable]=\"true\"\r\n appendTo=\"body\"\r\n [styleClass]=\"selectedSize.class\"\r\n [(selection)]=\"selectedItems\"\r\n [rowSelectable]=\"isRowSelectable\"\r\n [globalFilterFields]=\"globalFilterFields\"\r\n [rows]=\"rows\"\r\n [paginator]=\"paginator\"\r\n [rowsPerPageOptions]=\"rowsPerPageOptions\"\r\n [showCurrentPageReport]=\"true\"\r\n currentPageReportTemplate=\"{first} - {last} de {totalRecords}\"\r\n (selectionChange)=\"selectionChange($event)\"\r\n [rowHover]=\"true\"\r\n [totalRecords]=\"totalRecords\"\r\n [lazy]=\"config.lazy\"\r\n (onLazyLoad)=\"paginate($event)\"\r\n [groupRowsBy]=\"config.fieldGroup\"\r\n paginatorDropdownAppendTo=\"body\"\r\n [showFirstLastIcon]=\"showFirstLastIcon\"\r\n [pageLinks]=\"pageLinksOptions\"\r\n [scrollable]=\"isTableScrollable\"\r\n [scrollHeight]=\"scrollHeight\"\r\n [rowTrackBy]=\"rowTrackBy\"\r\n [(contextMenuSelection)]=\"selectedProduct\"\r\n [contextMenu]=\"isEditableTable() ? cm : null\"\r\n >\r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n\r\n @if (config.enableCation || enableSizes){\r\n <ng-template pTemplate=\"caption\">\r\n <div\r\n class=\"flex flex-row flex-wrap justify-content-between align-items-center grid formgrid p-fluid col-12 p-0 m-0\"\r\n >\r\n <div class=\"col-12 flex flex-column\">\r\n @if (config.title) {\r\n <div class=\"text-md font-bold my-3\">\r\n {{ config.title }}\r\n </div>\r\n } @if (config.subtitle) {\r\n <div class=\"text-sm mb-4 font-medium\">\r\n {{ config.subtitle }}\r\n </div>\r\n }\r\n </div>\r\n\r\n <div\r\n class=\"flex flex-row align-items-center md:col-6 lg:col-4 {{\r\n tamanhoTela < 768 ? 'col-10' : 'col-12'\r\n }} mt-1 mb-2 gap-1\"\r\n >\r\n \r\n @if (config.enableFilter) {\r\n <span class=\"p-input-icon-left\">\r\n <i class=\"pi pi-search\"></i>\r\n \r\n <input\r\n pInputText\r\n pAutoFocus\r\n [autofocus]=\"true\"\r\n type=\"text\"\r\n (input)=\"onGlobalFilter(te, $event)\"\r\n placeholder=\"Pesquisar...\"\r\n class=\"h-2rem\"\r\n autocomplete=\"off\"\r\n />\r\n </span>\r\n }\r\n\r\n @if(enableSizes){\r\n <div class=\"sizes-controls\">\r\n \r\n <kv-button (click)=\"menu.toggle($event)\"\r\n [severity]=\"'tertiary'\"\r\n [icon]=\"'match_case'\"\r\n [pTooltip]=\"'Tamanho da fonte'\"\r\n >\r\n </kv-button>\r\n \r\n <p-tieredMenu\r\n [style]=\"{ 'font-size': '0.7rem' }\"\r\n styleClass=\"menuSizes\"\r\n appendTo=\"body\"\r\n #menu\r\n [model]=\"sizes\"\r\n [popup]=\"true\"\r\n >\r\n <ng-template let-item pTemplate=\"item\">\r\n <div\r\n class=\"cursor-pointer flex gap-2 align-items-center pl-1 m-2 menu-sizes\"\r\n (click)=\"item.command()\"\r\n >\r\n @if(this.selectedSize.size != item.size){\r\n <div\r\n class=\"tag\"\r\n [style.background-color]=\"'#EAEAEA'\"\r\n ></div>\r\n }\r\n \r\n @if(this.selectedSize.size == item.size){\r\n <div\r\n class=\"tag\"\r\n [style.background-color]=\"'#1DA750'\"\r\n ></div>\r\n }\r\n \r\n {{ item.label }}\r\n </div>\r\n </ng-template>\r\n </p-tieredMenu>\r\n </div>\r\n }\r\n </div>\r\n\r\n @if(isEditing){\r\n <span class=\"text-aviso\">\r\n Tabela em modo de edi\u00E7\u00E3o\r\n </span>\r\n }\r\n \r\n <div class=\"flex flex-row col-2 justify-content-end gap-2\">\r\n @for (action of config.actionsLote; track i; let i = $index) {\r\n @if(!isEditing){\r\n <div class=\"flex align-items-center justify-content-center\">\r\n @if ((selectedItems.length > 0 || action.showAcoesLote) &&\r\n (getOrExecute(action.visible, selectedItems) ?? true)) {\r\n <kv-button\r\n (onClick)=\"action?.command(); activeItemLote(selectedItems)\"\r\n [pTooltip]=\"getOrExecute(action.tooltip, selectedItems)\"\r\n [tooltipPosition]=\"\r\n (getOrExecute(action.tooltip, selectedItems)?.length ??\r\n 0 > 7) &&\r\n config.actionsLote &&\r\n i == config.actionsLote.length - 1\r\n ? 'left'\r\n : 'bottom'\r\n \"\r\n [disabled]=\"getOrExecute(action.disabled, selectedItems) || false\"\r\n [icon]=\"getOrExecute(action.icon, selectedItems)\"\r\n [severity]=\"action.severity || 'tertiary'\"\r\n />\r\n }\r\n </div>\r\n }\r\n }\r\n\r\n @if (isEditableTable()) {\r\n <div>\r\n <kv-button\r\n (click)=\"this.isEditing = !this.isEditing\"\r\n [pTooltip]=\"!isEditing ? 'Habilitar Edi\u00E7\u00E3o' : 'Desabilitar Edi\u00E7\u00E3o'\"\r\n [tooltipPosition]=\"'left'\"\r\n [severity]=\"'tertiary'\"\r\n [icon]=\"'edit_square'\"\r\n >\r\n </kv-button>\r\n </div>\r\n }\r\n </div>\r\n\r\n <!---------------->\r\n \r\n </div>\r\n </ng-template>\r\n }\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n @if(config.enableSelect && !isEditing){\r\n <th\r\n [class]=\"selectedSize.class + 'th'\"\r\n >\r\n <p-tableHeaderCheckbox\r\n (click)=\"activeItemLote(selectedItems)\"\r\n ></p-tableHeaderCheckbox>\r\n </th>\r\n }\r\n @for(col of columns; track $index){\r\n <th\r\n [pSortableColumn]=\"col.field\"\r\n [pSortableColumnDisabled]=\"col.sortable === false\"\r\n [style.min-width]=\"col.width * selectedSize.size + 'px'\"\r\n pReorderableColumn\r\n [class]=\"selectedSize.class + 'th'\"\r\n \r\n >\r\n <div\r\n [class]=\"\r\n centralizarColunas(col) && alignColunasHeader(col) == ''\r\n ? 'flex flex-row justify-content-center'\r\n : 'flex flex-row'\r\n \"\r\n [style]=\"alignColunasHeader(col)\"\r\n >\r\n <span>{{ col.header }}</span>\r\n @if(col.sortable === true) {\r\n <p-sortIcon\r\n [field]=\"col.field\"\r\n style=\"font-size: 10px\"\r\n ></p-sortIcon>\r\n }\r\n @if(col.headerTooltip){\r\n <span\r\n class=\"material-symbols-outlined flex align-items-center\"\r\n [pTooltip]=\"col.headerTooltip\"\r\n >\r\n info\r\n </span>\r\n }\r\n \r\n </div>\r\n </th>\r\n }\r\n \r\n @if(!isEditing && config.actions && config.actions.length > 0){\r\n <th></th>\r\n }\r\n\r\n @if(isEditableTable() && this.editMode == 'row'){\r\n <th\r\n id=\"th-edit\"\r\n style=\"width: 20px\"\r\n >\r\n Editar\r\n </th>\r\n }\r\n \r\n </tr>\r\n </ng-template>\r\n\r\n\r\n \r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n\r\n <ng-template\r\n pTemplate=\"body\"\r\n let-rowData\r\n let-editing=\"editing\"\r\n let-ri=\"rowIndex\"\r\n let-columns=\"columns\"\r\n let-rowgroup=\"rowgroup\"\r\n let-rowspan=\"rowspan\"\r\n >\r\n <tr\r\n [pEditableRow]=\"rowData\"\r\n [pEditableRowDisabled]=\"false\"\r\n [pContextMenuRow]=\"{rowData, editing}\"\r\n [class]=\"selectedSize.class + '-tr'\"\r\n (dblclick)=\"doubleClick($event, rowData)\"\r\n >\r\n @if(config.enableSelect && !isEditing){\r\n <td\r\n [style]=\"applyStyle(rowData, { field: 'check-box', header: '' })\"\r\n >\r\n \r\n <p-tableCheckbox\r\n class=\"check-edit-list\"\r\n [value]=\"rowData\"\r\n [disabled]=\"isDisabledCheckbox(rowData)\"\r\n (click)=\"activeItemLote(selectedItems)\"\r\n ></p-tableCheckbox>\r\n </td>\r\n }\r\n @for (col of columns; track i; let i = $index){\r\n <ng-container>\r\n <!-- FIXME: Testar a implementa\u00E7\u00E3o abaixo e mesaclar as duas formas -->\r\n \r\n <ng-template #templateInput let-rowData=\"rowData\" let-col=\"col\">\r\n <ng-container *ngIf=\"isEditing; else templatevisualedicao\">\r\n <ng-container [ngSwitch]=\"col.fieldControlType\">\r\n <ng-container *ngSwitchCase=\"'text'\">\r\n <div [style.width]=\"col.width\" class=\"grid formgrid p-fluid\">\r\n <kv-input-text\r\n [disabled]=\"isDisableEditRowCellFunction(rowData, col)\"\r\n class=\"cellControl col\"\r\n [(ngModel)]=\"rowData[col.field]\"\r\n [required]=\"col.required ?? true\"\r\n ></kv-input-text>\r\n </div>\r\n </ng-container>\r\n \r\n <ng-container *ngSwitchCase=\"'number'\">\r\n <div [style.width]=\"col.width\" class=\"grid formgrid p-fluid\">\r\n <kv-input-number\r\n [disabled]=\"isDisableEditRowCellFunction(rowData, col)\"\r\n class=\"cellControl col\"\r\n [(ngModel)]=\"rowData[col.field]\"\r\n [required]=\"col.required ?? true\"\r\n ></kv-input-number>\r\n </div>\r\n </ng-container>\r\n \r\n <ng-container *ngSwitchCase=\"'mask'\">\r\n <div [style.width]=\"col.width\" class=\"grid formgrid p-fluid\">\r\n <kv-input-mask\r\n [disabled]=\"isDisableEditRowCellFunction(rowData, col)\"\r\n class=\"cellControl col\"\r\n [mask]=\"col.mask\"\r\n [required]=\"col.required ?? true\"\r\n [(ngModel)]=\"rowData[col.field]\"\r\n ></kv-input-mask>\r\n </div>\r\n </ng-container>\r\n \r\n <ng-container *ngSwitchCase=\"'switch'\">\r\n <div [style.width]=\"col.width\" class=\"grid formgrid p-fluid\">\r\n <kv-switch\r\n [disabled]=\"isDisableEditRowCellFunction(rowData, col)\"\r\n class=\"cellControl col\"\r\n [(ngModel)]=\"rowData[col.field]\"\r\n ></kv-switch>\r\n </div>\r\n </ng-container>\r\n \r\n <ng-container *ngSwitchCase=\"'calendar'\">\r\n <div [style.width]=\"col.width\">\r\n <div\r\n [style.width]=\"col.width\"\r\n class=\"grid formgrid p-fluid\"\r\n >\r\n <kv-input-calendar\r\n class=\"cellControl col\"\r\n [(ngModel)]=\"rowData[col.field]\"\r\n ></kv-input-calendar>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'dropdown'\">\r\n <div [style.width]=\"col.width\" class=\"grid formgrid p-fluid\">\r\n <p-dropdown\r\n [disabled]=\"isDisableEditRowCellFunction(rowData, col)\"\r\n class=\"cellControl col\"\r\n appendTo=\"body\"\r\n [panelStyle]=\"{ 'font-size': '0.75rem' }\"\r\n [optionLabel]=\"col.fieldDropDownControl.descricaoobjeto\"\r\n [optionValue]=\"col.fieldDropDownControl.idobjeto\"\r\n [options]=\"\r\n col.fieldDropDownControl.fieldControlDropdownSource\r\n \"\r\n [(ngModel)]=\"rowData[col.field]\"\r\n >\r\n </p-dropdown>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n \r\n <ng-template #templatevisualedicao>\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n templateOutput;\r\n context: { rowData: rowData, col: col }\r\n \"\r\n ></ng-container>\r\n </ng-template>\r\n </ng-template>\r\n \r\n <ng-template #templateOutput let-rowData=\"rowData\" let-col=\"col\">\r\n <ng-container [ngSwitch]=\"col.fieldControlType\">\r\n <ng-container *ngSwitchCase=\"'dropdown'\">\r\n <ng-container *ngIf=\"rowData[col.field]\">\r\n {{ transformValueDrop(retornaDescricaoDrop(rowData, col), col) }}\r\n </ng-container>\r\n </ng-container>\r\n \r\n <ng-container *ngSwitchCase=\"'switch'\">\r\n <kv-switch\r\n [(ngModel)]=\"rowData[col.field]\"\r\n [disabled]=\"true\"\r\n ></kv-switch>\r\n </ng-container>\r\n \r\n <ng-container *ngSwitchCase=\"'calendar'\">\r\n {{ rowData[col.field] | date }}\r\n </ng-container>\r\n \r\n <ng-container *ngSwitchCase=\"'mask'\">\r\n {{ rowData[col.field] | mask : col.mask }}\r\n </ng-container>\r\n \r\n <ng-container *ngSwitchDefault>\r\n {{ transformValue(rowData, col) }}\r\n </ng-container>\r\n </ng-container>\r\n </ng-template>\r\n \r\n @if(editMode == 'cell' && col.fieldControlType){\r\n <td\r\n [pEditableColumn]=\"rowData\"\r\n [pEditableColumnField]=\"col.field\"\r\n [pEditableColumnRowIndex]=\"rowData[config.dataKey]\"\r\n [id]=\"'rowTable' + rowData[config.dataKey]\"\r\n (click)=\"activeItem(rowData)\"\r\n (dblclick)=\"dbClickEdit()\"\r\n class=\"rowTable\"\r\n [style]=\"\r\n applyStyle(rowData, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col)\r\n \"\r\n [pTooltip]=\"returnTooltipRow(rowData, col)\"\r\n >\r\n <p-cellEditor>\r\n <ng-container>\r\n <ng-template pTemplate=\"input\">\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n templateInput;\r\n context: { rowData: rowData, col: col }\r\n \"\r\n ></ng-container>\r\n </ng-template>\r\n \r\n <ng-template pTemplate=\"output\">\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n templateOutput;\r\n context: { rowData: rowData, col: col }\r\n \"\r\n ></ng-container>\r\n </ng-template>\r\n </ng-container>\r\n \r\n </p-cellEditor>\r\n </td>\r\n }\r\n \r\n <!-- NOTE: Edi\u00E7\u00E3o de linha -->\r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n \r\n <!-- Celula que armazena os controles de edi\u00E7\u00E3o para os campos -->\r\n @if(false && col.fieldControlType && editMode == 'row'){\r\n <td\r\n [id]=\"'rowTable' + rowData[config.dataKey]\"\r\n (click)=\"activeItem(rowData)\"\r\n (dblclick)=\"dbClickEdit()\"\r\n class=\"rowTable\"\r\n [style]=\"\r\n applyStyle(rowData, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col)\r\n \"\r\n [pTooltip]=\"returnTooltipRow(rowData, col)\"\r\n >\r\n <p-cellEditor\r\n [ngClass]=\"{ switch: col.fieldControlType == 'switch' }\"\r\n >\r\n <ng-template pTemplate=\"input\">\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n templateInput;\r\n context: { rowData: rowData, col: col }\r\n \"\r\n ></ng-container>\r\n </ng-template>\r\n \r\n <ng-template pTemplate=\"output\">\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n templateOutput;\r\n context: { rowData: rowData, col: col }\r\n \"\r\n ></ng-container>\r\n </ng-template>\r\n </p-cellEditor>\r\n </td>\r\n }\r\n \r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n <!-- ----------------------------------------------------------------------------------------------------------------------------------- -->\r\n \r\n <td\r\n *ngIf=\"rowgroup && !col.template\"\r\n [attr.rowspan]=\"rowgroup && col.grouped ? rowspan : null\"\r\n class=\"rowTable\"\r\n [style]=\"\r\n applyStyle(rowData, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col)\r\n \"\r\n [pTooltip]=\"returnTooltipRow(rowData, col)\"\r\n >\r\n <span class=\"p-column-title\">{{ col.header }}:</span>\r\n \r\n <span\r\n *ngIf=\"!isBooleanField(rowData, col); else booleanField\"\r\n [class]=\"returnRowClass(rowData, col)\"\r\n >\r\n <span\r\n *ngIf=\"\r\n !isChipField(col) && !col.iconField && !isImageField(col)\r\n \"\r\n >\r\n <i *ngIf=\"col.icon\" [class]=\"col.icon + ' mr-2'\"></i>\r\n {{ transformValue(rowData, col) }}\r\n </span>\r\n \r\n <div *ngIf=\"isChipField(col) && !col.iconField\">\r\n <span\r\n [class]=\"returnClassChip(rowData, col)\"\r\n [pTooltip]=\"returnTooltipIcon(rowData, col)\"\r\n >{{ transformValue(rowData, col) }}</span\r\n >\r\n </div>\r\n </span>\r\n \r\n <span *ngIf=\"isImageField(col)\">\r\n <span>\r\n <img class=\"image\" [src]=\"loadImage(rowData, col)\" />\r\n </span>\r\n </span>\r\n \r\n <i\r\n *ngIf=\"col.iconField\"\r\n [ngClass]=\"{\r\n 'material-icons': col.indIconMaterial,\r\n 'material-symbols-outlined mr-2': !col.indIconMaterial\r\n }\"\r\n [pTooltip]=\"returnTooltipIcon(rowData, col)\"\r\n >\r\n {{ returnClassIcon(rowData, col) }}\r\n </i>\r\n \r\n <ng-template #booleanField>\r\n <i\r\n *ngIf=\"!col.iconField && !isSwitchField(col)\"\r\n [ngClass]=\"\r\n rowData[col.field] ? 'text-green-500' : 'text-red-500'\r\n \"\r\n ><span class=\"material-symbols-outlined\">\r\n {{ rowData[col.field] ? \"check\" : \"close\" }}\r\n </span>\r\n </i>\r\n \r\n <span\r\n *ngIf=\"isSwitchField(col)\"\r\n [class]=\"returnRowClass(rowData, col)\"\r\n >\r\n <kv-switch\r\n (onSwitchChange)=\"onSwitchChange($event, rowData, col)\"\r\n [disabled]=\"col?.onlyReadField ?? true\"\r\n [switchValue]=\"transformValue(rowData, col)\"\r\n >\r\n </kv-switch>\r\n </span>\r\n </ng-template>\r\n </td>\r\n \r\n <td\r\n *ngIf=\"\r\n !rowgroup &&\r\n !col.grouped &&\r\n !col.template &&\r\n !col.fieldControlType\r\n \"\r\n [style]=\"\r\n applyStyle(rowData, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col)\r\n \"\r\n class=\"rowTable\"\r\n [pTooltip]=\"returnTooltipRow(rowData, col)\"\r\n >\r\n <span class=\"p-column-title\">{{ col.header }}:</span>\r\n \r\n <span\r\n *ngIf=\"!isBooleanField(rowData, col); else booleanField\"\r\n [class]=\"returnRowClass(rowData, col)\"\r\n >\r\n <span\r\n *ngIf=\"\r\n !isChipField(col) && !col.iconField && !isImageField(col)\r\n \"\r\n >\r\n <i *ngIf=\"col.icon\" [class]=\"col.icon + ' mr-2'\"></i>\r\n {{ transformValue(rowData, col) }}\r\n </span>\r\n \r\n <div *ngIf=\"isChipField(col) && !col.iconField\">\r\n <span\r\n [class]=\"returnClassChip(rowData, col)\"\r\n [pTooltip]=\"returnTooltipIcon(rowData, col)\"\r\n >\r\n {{ transformValue(rowData, col) }}</span\r\n >\r\n </div>\r\n </span>\r\n \r\n <span *ngIf=\"isImageField(col)\">\r\n <span>\r\n <img class=\"image\" [src]=\"loadImage(rowData, col)\" />\r\n </span>\r\n </span>\r\n \r\n <i\r\n *ngIf=\"col.iconField\"\r\n [ngClass]=\"{\r\n 'material-icons': col.indIconMaterial,\r\n 'material-symbols-outlined mr-2': !col.indIconMaterial\r\n }\"\r\n [pTooltip]=\"returnTooltipIcon(rowData, col)\"\r\n >\r\n {{ returnClassIcon(rowData, col) }}\r\n </i>\r\n \r\n <ng-template #booleanField>\r\n <i\r\n *ngIf=\"!col.iconField && !isSwitchField(col)\"\r\n [ngClass]=\"\r\n rowData[col.field] ? 'text-green-500' : 'text-red-500'\r\n \"\r\n ><span class=\"material-symbols-outlined\">\r\n {{ rowData[col.field] ? \"check\" : \"close\" }}\r\n </span>\r\n </i>\r\n \r\n <span\r\n *ngIf=\"isSwitchField(col)\"\r\n [class]=\"returnRowClass(rowData, col)\"\r\n >\r\n <kv-switch\r\n (onSwitchChange)=\"onSwitchChange($event, rowData, col)\"\r\n [disabled]=\"col?.onlyReadField ?? true\"\r\n [switchValue]=\"transformValue(rowData, col)\"\r\n >\r\n </kv-switch>\r\n </span>\r\n </ng-template>\r\n </td>\r\n \r\n <td\r\n *ngIf=\"col.template && !isEditableTable()\"\r\n [style]=\"\r\n applyStyle(rowData, col) +\r\n centralizarColunas(col) +\r\n alignColunas(col)\r\n \"\r\n class=\"rowTable\"\r\n >\r\n <span class=\"p-column-title\">{{ col.header }}:</span>\r\n <ng-container\r\n *ngIf=\"getCustomTemplate(col.template.name)\"\r\n [ngTemplateOutlet]=\"getCustomTemplate(col.template.name)\"\r\n [ngTemplateOutletContext]=\"{ $implicit: rowData }\"\r\n >\r\n </ng-container>\r\n </td>\r\n </ng-container>\r\n }\r\n \r\n\r\n <!-- ------------------------------------------------------------------------------------------------------------------------------------------- -->\r\n <!-- Controle de a\u00E7\u00E3o -->\r\n @if(!isEditing && config.actions && config.actions.length > 0){\r\n <td\r\n [ngClass]=\"{\r\n 'td-tools': isEditableTable() && this.editMode == 'row',\r\n 'td-tools-sticky': !isEditableTable() || this.editMode == 'cell'\r\n }\"\r\n [style]=\"\r\n applyStyle(rowData, { field: 'btns-options', header: '' }) +\r\n 'border-right: 1px solid #ddd !important; border-left: 1px solid #ddd !important;'\r\n \"\r\n >\r\n <div class=\"flex flex-row justify-content-end w-full\">\r\n \r\n <span\r\n class=\"material-symbols-outlined cursor-pointer icon-more-horiz\"\r\n style=\"font-size: 1rem; height: 10px; width: 20px\"\r\n (click)=\"menu.toggle($event); activeItem(rowData)\"\r\n >\r\n more_horiz\r\n </span>\r\n <!-- </button> -->\r\n\r\n <div *ngFor=\"let action of config.actions\">\r\n {{ criarMenusModal(rowData) }}\r\n </div>\r\n\r\n\r\n <p-menu\r\n #menu\r\n [popup]=\"true\"\r\n [model]=\"menuItems\"\r\n appendTo=\"body\"\r\n ></p-menu>\r\n </div>\r\n </td>\r\n }\r\n \r\n <!-- ------------------------------------------------------------------------------------------------------------------------------------------- -->\r\n <!-- Controle de edi\u00E7\u00E3o -->\r\n @if(this.isEditableTable() && this.editMode == 'row'){\r\n <td class=\"td-edit\">\r\n <div class=\"flex align-items-center justify-content-center gap-2\">\r\n @if(!editing){\r\n <button\r\n [style.height]=\"'28px'\"\r\n [id]=\"'rowEdit' + rowData[config.dataKey]\"\r\n [style.width]=\"'28px'\"\r\n [disabled]=\"isDisableEditRowFunction(rowData)\"\r\n pButton\r\n pRipple\r\n type=\"button\"\r\n pInitEditableRow\r\n icon=\"pi pi-pencil\"\r\n (click)=\"onRowEditInit(rowData)\"\r\n class=\"p-button-rounded p-button-text\"\r\n ></button>\r\n }\r\n \r\n @if(editing){\r\n <button\r\n [style.height]=\"'28px'\"\r\n [style.width]=\"'28px'\"\r\n [disabled]=\"isDisableEditRowFunction(rowData)\"\r\n pButton\r\n pRipple\r\n type=\"button\"\r\n pCancelEditableRow\r\n icon=\"pi pi-times\"\r\n (click)=\"onRowEditCancel(rowData, ri)\"\r\n [id]=\"'rowCancel' + rowData[config.dataKey]\"\r\n class=\"p-button-rounded p-button-text p-button-danger\"\r\n ></button>\r\n }\r\n \r\n </div>\r\n </td>\r\n }\r\n \r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n</div>\r\n", styles: ["@charset \"UTF-8\";.td-edit{position:sticky;right:-1px;background-color:#fff;color:#5289b4}.td-tools{position:sticky;right:52px;border-right:1px solid #ddd!important;background-color:#fff;box-shadow:-5px 0 20px -10px #000000bf}.td-tools-sticky{position:sticky;right:0;border-right:3px solid #fff!important;background-color:#fff}#th-edit{position:sticky;right:0;background-color:#eaeaea}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td{text-align:center;border:1px solid #eaeaea;border-width:1px 1px;padding:0rem .5rem}:host ::ng-deep .p-datatable .p-datatable-thead>tr>th{text-align:center;padding:0rem .5rem;border-left:none;border-right:none;border-width:1px 1px;font-weight:700;color:#343a40;background:#eaeaea;transition:box-shadow .2s}.error-show{background-color:red;width:5px;height:10px}.btns-options{position:relative;left:20px}.chip-style{border:solid 1px}:host::ng-deep .p-card .p-card-content{padding:0}.material-symbols-outlined.md-19{font-size:15px}.material-symbols-outlined.md-22{font-size:19px}.checkbox-container{display:flex;align-items:center;gap:2px;margin-top:5px}#botaoFiltro:hover{color:#a9a9a9}.actionLoteBtns{align-items:center;background-color:#29b92d;color:#f2f3f5;display:flex;font-size:16px;width:2rem;height:2rem;top:2px;margin-left:.5rem;justify-content:center;text-decoration:none;text-align:center;padding:12px}:host ::ng-deep .center{display:flex;align-items:center;justify-content:center}#actionLoteBtns:hover,.actionLoteBtns:hover{background-color:#249a29!important}.actionBtns{align-items:center;background-color:transparent;color:#a9a9a9;display:flex;width:.8rem;height:.8rem;margin-left:.22rem;justify-content:center;text-decoration:none;text-align:justify;padding:11px}:host::ng-deep .material-symbols-outlined{font-family:Material Symbols Outlined;font-weight:400;font-style:normal;line-height:.9;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased}#actionBtns:hover{color:#a9a9a9}.image{border-style:solid;border-width:3.5px;border-color:#5289b4;border-radius:100%;height:55px;width:55px;padding:0;margin:0;vertical-align:middle}:host ::ng-deep .p-datatable-header{background-color:#eaeaea!important;padding:0!important;border-radius:5px!important}:host ::ng-deep .p-datatable .p-datatable-thead>tr>th{background-color:#eaeaea!important}:host ::ng-deep .p-datatable .p-datatable-thead>tr>th:first-of-type{border-radius:5px 0 0 5px}:host ::ng-deep .p-datatable .p-datatable-thead>tr>th:last-child{border-radius:0 5px 5px 0}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td{border-left:none!important;border-right:none!important}:host ::ng-deep .actionBtns,:host ::ng-deep .actionLoteBtns{border-radius:20%;box-shadow:#0000003d 0 3px 8px}.icon-more-horiz:hover,.icon-more-horiz:focus{color:#5e5e5e;transform:scale(1.1);transition:color .3s,transform .3s}:host ::ng-deep .p-checkbox .p-checkbox-box.p-highlight{border-color:#004172;background:#004172}:host ::ng-deep .p-checkbox .p-checkbox-box.p-highlight:hover{background-color:#002542}:host ::ng-deep .p-checkbox .p-checkbox-box.p-highlight:active{background-color:#002542}:host ::ng-deep .p-checkbox .p-checkbox-box.p-highlight:disabled{background-color:#002542;opacity:.4;cursor:auto}@media only screen and (min-width: 768px){.actionLoteBtns{top:-1px}}@media only screen and (max-width: 960px){:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td:has(p-tablecheckbox){border-bottom:0px!important}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td:has(img){justify-content:center!important;align-items:center!important}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td:has(img) .p-column-title{display:none!important}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td:last-child{border-bottom:1px solid #ddd!important}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td:last-child div{justify-content:center!important;align-items:center!important}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td .p-column-title{font-weight:600}}::ng-deep .p-panel.p-panel-toggleable .p-panel-header{background-color:#eaeaea!important}::ng-deep .field.grid,.formgrid.grid{padding:0rem!important}@media screen and (min-width: 961px){.moreVertBtn{position:relative;right:3px}}::ng-deep .p-datatable .p-datatable-thead>tr>th:last-of-type{border-radius:0 0 5px!important;-webkit-border-radius:0px 0px 5px 0px!important;-moz-border-radius:0px 0px 5px 0px!important;-ms-border-radius:0px 0px 5px 0px!important;-o-border-radius:0px 0px 5px 0px!important}::ng-deep .p-datatable .p-datatable-thead>tr>th:first-of-type{border-radius:0 0 0 5px!important;-webkit-border-radius:0px 0px 0px 5px!important;-moz-border-radius:0px 0px 0px 5px!important;-ms-border-radius:0px 0px 0px 5px!important;-o-border-radius:0px 0px 0px 5px!important}:host ::ng-deep p-celleditor>kv-switch>div>p-inputswitch.p-inputswitch-checked .p-inputswitch-slider:before{transform:translate(1.25rem);height:15px;margin-top:-8px;-webkit-transform:translateX(1.25rem);-moz-transform:translateX(1.25rem);-ms-transform:translateX(1.25rem);-o-transform:translateX(1.25rem)}:host ::ng-deep p-celleditor>kv-switch>div>p-inputswitch.p-inputswitch-checked .p-inputswitch-slider{height:21px}:host ::ng-deep p-celleditor>kv-switch>div>p-inputswitch{height:21px}:host ::ng-deep p-celleditor>kv-switch>div>p-inputswitch .p-inputswitch-slider:before{background:#fff;width:1rem;height:1.25rem;height:16px!important;left:.25rem;margin-top:-9px!important;margin-top:-.625rem;border-radius:50%;transition-duration:.2s}:host ::ng-deep p-celleditor>kv-switch>div>p-inputswitch:not(.p-disabled) .p-inputswitch-slider{height:21px}:host ::ng-deep .p-cell-editing{padding-top:0!important;padding-bottom:0!important}:host ::ng-deep p-dropdown-item{font-size:.1rem}.text-aviso{color:red;font-size:.85rem;font-weight:400}:host ::ng-deep .p-checkbox .p-checkbox-box{width:18px;height:18px}:host ::ng-deep .p-selectbutton .p-button{font-size:.75rem!important;height:24px;padding:11px}#btn-sizes{border-radius:50%;width:.5rem!important;height:.5rem!important;box-shadow:#0000003d 0 3px 8px}:host ::ng-deep .p-datatable.p-datatable-sm{font-size:.625rem!important}:host ::ng-deep .p-datatable.p-datatable-md{font-size:.75rem!important}:host ::ng-deep .p-datatable.p-datatable-lg{font-size:.875rem!important}:host ::ng-deep .p-datatable-sm-tr>td i>span.material-symbols-outlined{font-size:.9rem}:host ::ng-deep .p-datatable-sm-tr>td .check-edit-list>.p-checkbox .p-checkbox-box{width:15px;height:15px}:host ::ng-deep .p-datatable-sm-tr>td p-celleditor>div>.cellControl>.p-dropdown .p-dropdown-label{width:1%;padding-top:0;padding-bottom:0;font-size:.6rem}:host ::ng-deep .p-datatable-sm-tr>td p-celleditor>div>kv-input-text>span>.inputs{padding-top:0;padding-bottom:0;font-size:.6rem;height:1rem}:host ::ng-deep .p-datatable-sm-tr>td p-celleditor>div>.cellControl>span>p-inputmask>.inputs{height:1rem;padding-top:0;padding-bottom:0;font-size:.6rem}:host ::ng-deep .p-datatable-sm-tr>td p-celleditor>div>kv-switch>div>p-inputswitch>div,:host ::ng-deep .p-datatable-sm-tr>td p-celleditor>kv-switch>div>p-inputswitch,:host ::ng-deep .p-datatable-sm-tr>td p-celleditor>kv-switch>div>p-inputswitch .p-inputswitch-slider{height:.6rem!important;width:2.4rem}:host ::ng-deep .p-datatable-sm-tr>td p-celleditor>kv-switch>div>p-inputswitch .p-inputswitch-slider:before{background:#fff;width:.6rem!important;height:.6rem!important;left:.2rem;margin-top:-.35rem!important;border-radius:50%;transition-duration:.2s}:host ::ng-deep .p-datatable-sm-tr>td p-celleditor>div>kv-switch>div>p-inputswitch>div>span:before{background:#fff;width:.6rem!important;height:.6rem!important;left:.2rem;margin-top:-.35rem!important;border-radius:50%;transition-duration:.2s}:host ::ng-deep .p-datatable-md-tr>td i>span.material-symbols-outlined{font-size:1rem}:host ::ng-deep .p-datatable-md-tr>td .check-edit-list>.p-checkbox .p-checkbox-box{width:18px;height:18px}:host ::ng-deep .p-datatable-md-tr>td p-celleditor>div>.cellControl>.p-dropdown .p-dropdown-label{width:1%;padding-top:0;padding-bottom:0;font-size:.7rem}:host ::ng-deep .p-datatable-md-tr>td p-celleditor>div>kv-input-text>span>.inputs{padding-top:0;padding-bottom:0;font-size:.7rem;height:1rem}:host ::ng-deep .p-datatable-md-tr>td p-celleditor>div>.cellControl>span>p-inputmask>.inputs{height:1rem;padding-top:0;padding-bottom:0;font-size:.7rem}:host ::ng-deep .p-datatable-md-tr>td p-celleditor>div>kv-switch>div>p-inputswitch>div,:host ::ng-deep .p-datatable-md-tr>td p-celleditor>kv-switch>div>p-inputswitch,:host ::ng-deep .p-datatable-md-tr>td p-celleditor>kv-switch>div>p-inputswitch .p-inputswitch-slider{height:.83rem!important;width:2.7rem}:host ::ng-deep .p-datatable-md-tr>td p-celleditor>kv-switch>div>p-inputswitch .p-inputswitch-slider:before{background:#fff;width:.7rem!important;height:.7rem!important;left:.25rem;margin-top:-.35rem!important;border-radius:50%;transition-duration:.2s}:host ::ng-deep .p-datatable-md-tr>td p-celleditor>div>kv-switch>div>p-inputswitch>div>span:before{background:#fff;width:.7rem;height:.7rem;left:.25rem;margin-top:-.4rem;border-radius:50%;transition-duration:.2s}:host ::ng-deep .p-datatable-lg-tr>td i>span.material-symbols-outlined{font-size:1.1rem}:host ::ng-deep .p-datatable-lg-tr>td p-celleditor>div>kv-input-text>span>.inputs{padding-top:0;padding-bottom:0;font-size:.8rem;height:1rem}:host ::ng-deep .p-datatable-lg-tr>td p-celleditor>div>.cellControl>.p-dropdown .p-dropdown-label{padding-top:0;padding-bottom:0;font-size:.8rem}:host ::ng-deep .p-datatable-lg-tr>td p-celleditor>div>.cellControl>span>p-inputmask>.inputs{height:1rem;padding-top:0;padding-bottom:0;font-size:.8rem}:host ::ng-deep .p-datatable-sm-tr>td{padding-top:0!important;padding-top:.05rem!important;padding-bottom:.05rem!important}:host ::ng-deep .p-datatable-md-tr>td,:host ::ng-deep .p-datatable-lg-tr>td{padding:.15rem!important}.p-datatable.p-datatable-smth{font-size:.6rem!important}.p-datatable.p-datatable-dmth{font-size:.7rem!important}.p-datatable.p-datatable-lgth{font-size:.8rem!important}:host ::ng-deep .p-datatable.p-datatable-sm * p-celleditor>div>p-dropdown>.p-dropdown:not(.p-paginator-rpp-options) p-celleditor>div>p-dropdown>.p-dropdown:not(.p-paginator-rpp-options){height:15px!important}:host ::ng-deep .p-datatable.p-datatable-md * p-celleditor>div>p-dropdown>.p-dropdown:not(.p-paginator-rpp-options) p-celleditor>div>p-dropdown>.p-dropdown:not(.p-paginator-rpp-options){height:25px!important}:host ::ng-deep .p-datatable.p-datatable-lg * p-celleditor>div>p-dropdown>.p-dropdown:not(.p-paginator-rpp-options) p-celleditor>div>p-dropdown>.p-dropdown:not(.p-paginator-rpp-options){height:30px!important}:host ::ng-deep p-celleditor>kv-switch>div>p-inputswitch .p-inputswitch-slider{height:21px!important}:host ::ng-deep .teste>.p-button{background:#eaeaea!important;color:#a9a9a9;border:none;box-shadow:#0000003d 0 3px 8px;height:20px}::ng-deep .menuSizes>p-tieredmenusub>.p-tieredmenu-root-list>li:first-child{font-size:.6rem}::ng-deep .menuSizes>p-tieredmenusub>.p-tieredmenu-root-list>li:last-child{font-size:.8rem}.tag{width:5px;height:25px;border-radius:.25rem}:host ::ng-deep .p-speeddial-button.p-button.p-button-icon-only{width:2rem;height:2rem;font-size:1rem}.item-circle{width:4rem;height:2rem;padding:1rem;font-size:.8rem;border-radius:17%;display:flex;align-items:center;justify-content:center;background:#eaeaea!important;box-shadow:#0000003d 0 3px 13px}:host ::ng-deep p-speeddial>div>button>span.material-symbols-outlined.ng-star-inserted{font-size:1.1rem}:host ::ng-deep .check-edit-list>div.p-checkbox.p-component{height:1rem}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td:first-child{border-left:1px solid #ddd!important}:host ::ng-deep .p-datatable .p-datatable-tbody>tr>td:last-child{border-right:1px solid #ddd!important}:host ::ng-deep .p-datatable-wrapper::-webkit-scrollbar:hover{background-color:#dededebf}:host ::ng-deep .p-datatable-wrapper::-webkit-scrollbar{width:6px;height:3px}:host ::ng-deep .p-datatable-wrapper:hover::-webkit-scrollbar-thumb{border-left:2px solid white;background-color:#00000080}:host ::ng-deep .p-datatable-wrapper::-webkit-scrollbar-thumb{border-radius:4px;background-color:transparent}:host ::ng-deep .p-datatable-wrapper::-webkit-scrollbar-track{border-left:2px solid white;background-color:#dededebf}:host ::ng-deep .p-datatable>.p-datatable-wrapper{overflow-y:hidden}\n"] }]
|
|
6515
6886
|
}], ctorParameters: () => [{ type: i1.DatePipe }, { type: i1.DecimalPipe }, { type: CpfCnpjPipe }, { type: TelefonePipe }, { type: NotificationService }], propDecorators: { enableSizes: [{
|
|
6516
6887
|
type: Input
|
|
6517
6888
|
}], editMode: [{
|
|
@@ -7131,12 +7502,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImpor
|
|
|
7131
7502
|
}] });
|
|
7132
7503
|
|
|
7133
7504
|
class KvImageUploadComponent {
|
|
7134
|
-
constructor(notificationService) {
|
|
7505
|
+
constructor(notificationService, imageCutterService) {
|
|
7135
7506
|
this.notificationService = notificationService;
|
|
7507
|
+
this.imageCutterService = imageCutterService;
|
|
7136
7508
|
this.file = null;
|
|
7137
7509
|
this.fileSrc = null;
|
|
7138
7510
|
this.widthComponent = '400px';
|
|
7139
7511
|
this.heightComponent = 'auto';
|
|
7512
|
+
this.cutImage = input(false);
|
|
7513
|
+
this.cutWidth = input(0);
|
|
7514
|
+
this.cutHeight = input(0);
|
|
7515
|
+
this.cutCircle = input(false);
|
|
7140
7516
|
this.maxHeightImage = '400px';
|
|
7141
7517
|
this.fileEmit = new EventEmitter();
|
|
7142
7518
|
this.deleteEmit = new EventEmitter();
|
|
@@ -7167,13 +7543,31 @@ class KvImageUploadComponent {
|
|
|
7167
7543
|
}
|
|
7168
7544
|
handleFile(file) {
|
|
7169
7545
|
if (file.type.startsWith('image/')) {
|
|
7170
|
-
this.
|
|
7171
|
-
|
|
7172
|
-
|
|
7173
|
-
|
|
7174
|
-
|
|
7175
|
-
|
|
7176
|
-
|
|
7546
|
+
if (this.cutImage() == true) {
|
|
7547
|
+
this.file = file;
|
|
7548
|
+
const reader = new FileReader();
|
|
7549
|
+
reader.onload = async () => {
|
|
7550
|
+
try {
|
|
7551
|
+
const result = await this.imageCutterService.cut(reader.result?.toString() ?? '', this.cutWidth(), this.cutHeight(), this.cutCircle());
|
|
7552
|
+
this.fileSrc = result;
|
|
7553
|
+
this.fileEmit.emit(result);
|
|
7554
|
+
}
|
|
7555
|
+
catch (error) {
|
|
7556
|
+
this.deleteImage();
|
|
7557
|
+
}
|
|
7558
|
+
};
|
|
7559
|
+
reader.readAsDataURL(file);
|
|
7560
|
+
}
|
|
7561
|
+
else {
|
|
7562
|
+
// ?! Comportamneto padrão --> Preservar <-- !!!
|
|
7563
|
+
this.file = file;
|
|
7564
|
+
const reader = new FileReader();
|
|
7565
|
+
reader.onload = (e) => {
|
|
7566
|
+
this.fileSrc = reader.result;
|
|
7567
|
+
};
|
|
7568
|
+
reader.readAsDataURL(file);
|
|
7569
|
+
this.fileEmit.emit(file);
|
|
7570
|
+
}
|
|
7177
7571
|
}
|
|
7178
7572
|
else {
|
|
7179
7573
|
this.notificationService.toastError('Apenas arquivos de imagem são permitidos.');
|
|
@@ -7190,15 +7584,18 @@ class KvImageUploadComponent {
|
|
|
7190
7584
|
deleteImage() {
|
|
7191
7585
|
this.file = null;
|
|
7192
7586
|
this.fileSrc = null;
|
|
7587
|
+
if (this.fileInput) {
|
|
7588
|
+
this.fileInput.nativeElement.value = '';
|
|
7589
|
+
}
|
|
7193
7590
|
this.deleteEmit.emit();
|
|
7194
7591
|
}
|
|
7195
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvImageUploadComponent, deps: [{ token: NotificationService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
7196
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.8", type: KvImageUploadComponent, selector: "kv-image-upload", inputs: { fileSrc: "fileSrc", widthComponent: "widthComponent", heightComponent: "heightComponent", maxHeightImage: "maxHeightImage", description: "description" }, outputs: { fileEmit: "fileEmit", deleteEmit: "deleteEmit" }, ngImport: i0, template: "<div\r\n (dragover)=\"onDragOver($event)\"\r\n (dragleave)=\"onDragLeave($event)\"\r\n (drop)=\"onDrop($event)\"\r\n class=\"relative overflow-hidden border-dashed border-2 border-round-lg border-gray-400 flex justify-content-end\"\r\n [style.width]=\"widthComponent\"\r\n [style.height]=\"heightComponent\"\r\n>\r\n\r\n <div\r\n class=\"w-full flex align-items-center justify-content-center\"\r\n style=\"cursor: pointer;\"\r\n (click)=\"fileInput.click()\"\r\n >\r\n <input\r\n type=\"file\"\r\n (change)=\"onFileSelected($event)\"\r\n #fileInput\r\n hidden\r\n accept=\"image/*\"\r\n >\r\n <div\r\n *ngIf=\"!fileSrc\"\r\n class=\"flex flex-column align-items-center justify-content-center\"\r\n >\r\n <span\r\n class=\"material-symbols-outlined mt-2\"\r\n style=\"font-size: 3rem;\"\r\n >\r\n cloud_upload\r\n </span>\r\n\r\n @if(description) {\r\n <p class=\"font-semibold\">{{description}}</p>\r\n } @else {\r\n <p class=\"font-semibold\">Arraste e solte uma imagem aqui, ou</p>\r\n <p class=\"font-semibold\">clique para selecion\u00E1-la</p>\r\n }\r\n\r\n </div>\r\n <div *ngIf=\"fileSrc || file\">\r\n <img\r\n [src]=\"fileSrc\"\r\n [alt]=\"file?.name\"\r\n class=\"w-full\"\r\n [style.maxHeight]=\"maxHeightImage\"\r\n >\r\n </div>\r\n </div>\r\n\r\n @if(fileSrc || file) {\r\n <button\r\n style=\"background-color: transparent;\"\r\n pButton\r\n (click)=\"deleteImage()\"\r\n class=\"absolute transition-colors transition-duration-500 text-red-700 hover:text-red-500 w-2rem h-2rem\"\r\n [text]=\"true\"\r\n [icon]=\"'pi pi-trash'\"\r\n >\r\n </button>\r\n }\r\n
|
|
7592
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvImageUploadComponent, deps: [{ token: NotificationService }, { token: ImageCutterService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
7593
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.8", type: KvImageUploadComponent, selector: "kv-image-upload", inputs: { fileSrc: { classPropertyName: "fileSrc", publicName: "fileSrc", isSignal: false, isRequired: false, transformFunction: null }, widthComponent: { classPropertyName: "widthComponent", publicName: "widthComponent", isSignal: false, isRequired: false, transformFunction: null }, heightComponent: { classPropertyName: "heightComponent", publicName: "heightComponent", isSignal: false, isRequired: false, transformFunction: null }, cutImage: { classPropertyName: "cutImage", publicName: "cutImage", isSignal: true, isRequired: false, transformFunction: null }, cutWidth: { classPropertyName: "cutWidth", publicName: "cutWidth", isSignal: true, isRequired: false, transformFunction: null }, cutHeight: { classPropertyName: "cutHeight", publicName: "cutHeight", isSignal: true, isRequired: false, transformFunction: null }, cutCircle: { classPropertyName: "cutCircle", publicName: "cutCircle", isSignal: true, isRequired: false, transformFunction: null }, maxHeightImage: { classPropertyName: "maxHeightImage", publicName: "maxHeightImage", isSignal: false, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { fileEmit: "fileEmit", deleteEmit: "deleteEmit" }, viewQueries: [{ propertyName: "fileInput", first: true, predicate: ["fileInput"], descendants: true }], ngImport: i0, template: "<div\r\n (dragover)=\"onDragOver($event)\"\r\n (dragleave)=\"onDragLeave($event)\"\r\n (drop)=\"onDrop($event)\"\r\n class=\"relative overflow-hidden border-dashed border-2 border-round-lg border-gray-400 flex justify-content-end\"\r\n [style.width]=\"widthComponent\"\r\n [style.height]=\"heightComponent\"\r\n>\r\n\r\n <div\r\n class=\"w-full flex align-items-center justify-content-center\"\r\n style=\"cursor: pointer;\"\r\n (click)=\"fileInput.click()\"\r\n >\r\n <input\r\n type=\"file\"\r\n (change)=\"onFileSelected($event)\"\r\n #fileInput\r\n hidden\r\n accept=\"image/*\"\r\n >\r\n <div\r\n *ngIf=\"!fileSrc\"\r\n class=\"flex flex-column align-items-center justify-content-center\"\r\n >\r\n <span\r\n class=\"material-symbols-outlined mt-2\"\r\n style=\"font-size: 3rem;\"\r\n >\r\n cloud_upload\r\n </span>\r\n\r\n @if(description) {\r\n <p class=\"font-semibold\">{{description}}</p>\r\n } @else {\r\n <p class=\"font-semibold\">Arraste e solte uma imagem aqui, ou</p>\r\n <p class=\"font-semibold\">clique para selecion\u00E1-la</p>\r\n }\r\n\r\n </div>\r\n <div *ngIf=\"fileSrc || file\">\r\n <img\r\n [src]=\"fileSrc\"\r\n [alt]=\"file?.name\"\r\n class=\"w-full\"\r\n [style.maxHeight]=\"maxHeightImage\"\r\n >\r\n </div>\r\n </div>\r\n\r\n @if(fileSrc || file) {\r\n <button\r\n style=\"background-color: transparent;\"\r\n pButton\r\n (click)=\"deleteImage()\"\r\n class=\"absolute transition-colors transition-duration-500 text-red-700 hover:text-red-500 w-2rem h-2rem\"\r\n [text]=\"true\"\r\n [icon]=\"'pi pi-trash'\"\r\n >\r\n </button>\r\n }\r\n\r\n\r\n</div>\r\n", styles: [""], dependencies: [{ kind: "directive", type: i1$1.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
|
|
7197
7594
|
}
|
|
7198
7595
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvImageUploadComponent, decorators: [{
|
|
7199
7596
|
type: Component,
|
|
7200
|
-
args: [{ selector: 'kv-image-upload', template: "<div\r\n (dragover)=\"onDragOver($event)\"\r\n (dragleave)=\"onDragLeave($event)\"\r\n (drop)=\"onDrop($event)\"\r\n class=\"relative overflow-hidden border-dashed border-2 border-round-lg border-gray-400 flex justify-content-end\"\r\n [style.width]=\"widthComponent\"\r\n [style.height]=\"heightComponent\"\r\n>\r\n\r\n <div\r\n class=\"w-full flex align-items-center justify-content-center\"\r\n style=\"cursor: pointer;\"\r\n (click)=\"fileInput.click()\"\r\n >\r\n <input\r\n type=\"file\"\r\n (change)=\"onFileSelected($event)\"\r\n #fileInput\r\n hidden\r\n accept=\"image/*\"\r\n >\r\n <div\r\n *ngIf=\"!fileSrc\"\r\n class=\"flex flex-column align-items-center justify-content-center\"\r\n >\r\n <span\r\n class=\"material-symbols-outlined mt-2\"\r\n style=\"font-size: 3rem;\"\r\n >\r\n cloud_upload\r\n </span>\r\n\r\n @if(description) {\r\n <p class=\"font-semibold\">{{description}}</p>\r\n } @else {\r\n <p class=\"font-semibold\">Arraste e solte uma imagem aqui, ou</p>\r\n <p class=\"font-semibold\">clique para selecion\u00E1-la</p>\r\n }\r\n\r\n </div>\r\n <div *ngIf=\"fileSrc || file\">\r\n <img\r\n [src]=\"fileSrc\"\r\n [alt]=\"file?.name\"\r\n class=\"w-full\"\r\n [style.maxHeight]=\"maxHeightImage\"\r\n >\r\n </div>\r\n </div>\r\n\r\n @if(fileSrc || file) {\r\n <button\r\n style=\"background-color: transparent;\"\r\n pButton\r\n (click)=\"deleteImage()\"\r\n class=\"absolute transition-colors transition-duration-500 text-red-700 hover:text-red-500 w-2rem h-2rem\"\r\n [text]=\"true\"\r\n [icon]=\"'pi pi-trash'\"\r\n >\r\n </button>\r\n }\r\n
|
|
7201
|
-
}], ctorParameters: () => [{ type: NotificationService }], propDecorators: { fileSrc: [{
|
|
7597
|
+
args: [{ selector: 'kv-image-upload', template: "<div\r\n (dragover)=\"onDragOver($event)\"\r\n (dragleave)=\"onDragLeave($event)\"\r\n (drop)=\"onDrop($event)\"\r\n class=\"relative overflow-hidden border-dashed border-2 border-round-lg border-gray-400 flex justify-content-end\"\r\n [style.width]=\"widthComponent\"\r\n [style.height]=\"heightComponent\"\r\n>\r\n\r\n <div\r\n class=\"w-full flex align-items-center justify-content-center\"\r\n style=\"cursor: pointer;\"\r\n (click)=\"fileInput.click()\"\r\n >\r\n <input\r\n type=\"file\"\r\n (change)=\"onFileSelected($event)\"\r\n #fileInput\r\n hidden\r\n accept=\"image/*\"\r\n >\r\n <div\r\n *ngIf=\"!fileSrc\"\r\n class=\"flex flex-column align-items-center justify-content-center\"\r\n >\r\n <span\r\n class=\"material-symbols-outlined mt-2\"\r\n style=\"font-size: 3rem;\"\r\n >\r\n cloud_upload\r\n </span>\r\n\r\n @if(description) {\r\n <p class=\"font-semibold\">{{description}}</p>\r\n } @else {\r\n <p class=\"font-semibold\">Arraste e solte uma imagem aqui, ou</p>\r\n <p class=\"font-semibold\">clique para selecion\u00E1-la</p>\r\n }\r\n\r\n </div>\r\n <div *ngIf=\"fileSrc || file\">\r\n <img\r\n [src]=\"fileSrc\"\r\n [alt]=\"file?.name\"\r\n class=\"w-full\"\r\n [style.maxHeight]=\"maxHeightImage\"\r\n >\r\n </div>\r\n </div>\r\n\r\n @if(fileSrc || file) {\r\n <button\r\n style=\"background-color: transparent;\"\r\n pButton\r\n (click)=\"deleteImage()\"\r\n class=\"absolute transition-colors transition-duration-500 text-red-700 hover:text-red-500 w-2rem h-2rem\"\r\n [text]=\"true\"\r\n [icon]=\"'pi pi-trash'\"\r\n >\r\n </button>\r\n }\r\n\r\n\r\n</div>\r\n" }]
|
|
7598
|
+
}], ctorParameters: () => [{ type: NotificationService }, { type: ImageCutterService }], propDecorators: { fileSrc: [{
|
|
7202
7599
|
type: Input
|
|
7203
7600
|
}], widthComponent: [{
|
|
7204
7601
|
type: Input
|
|
@@ -7212,6 +7609,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImpor
|
|
|
7212
7609
|
type: Output
|
|
7213
7610
|
}], deleteEmit: [{
|
|
7214
7611
|
type: Output
|
|
7612
|
+
}], fileInput: [{
|
|
7613
|
+
type: ViewChild,
|
|
7614
|
+
args: ['fileInput']
|
|
7215
7615
|
}] } });
|
|
7216
7616
|
|
|
7217
7617
|
class KvImageUploadModule {
|
|
@@ -7869,7 +8269,7 @@ class KvFilterFieldsetComponent {
|
|
|
7869
8269
|
this.collapsedEvent.emit(this.isCollapsed);
|
|
7870
8270
|
}
|
|
7871
8271
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvFilterFieldsetComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
7872
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.8", type: KvFilterFieldsetComponent, selector: "kv-filter-fieldset", inputs: { isExpandable: "isExpandable" }, outputs: { collapsedEvent: "collapsedEvent" }, ngImport: i0, template: "<p-fieldset styleClass=\"p-0 mb-2\" >\r\n <ng-template pTemplate=\"header\">\r\n @if(isExpandable) {\r\n <div\r\n class=\"flex flex-row align-items-center justify-content-center p-1 cursor-pointer\"\r\n (click)=\"toggleField()\"\r\n >\r\n <span\r\n class=\"material-symbols-outlined flex align-items-center justify-content-center mr-2\"\r\n style=\"font-size: 1.4rem\"\r\n >\r\n {{ isCollapsed ? \"remove\" : \"add\" }}\r\n </span>\r\n\r\n <span class=\"text-sm\"> Filtros Avan\u00E7ados </span>\r\n </div>\r\n }\r\n </ng-template>\r\n\r\n <ng-content></ng-content>\r\n</p-fieldset>\r\n", styles: ["::ng-deep .p-fieldset .p-fieldset-legend{padding:.3rem;margin-left:1rem}::ng-deep .p-fieldset .p-fieldset-legend{background-color:#fff;border:none}::ng-deep .p-fieldset .p-fieldset-legend:hover{background-color:#f5f5f5}::ng-deep .p-fieldset .p-fieldset-legend:active{background-color:#e0e0e0}::ng-deep .p-fieldset .p-fieldset-content{padding-top:0rem}\n"], dependencies: [{ kind: "directive", type: i1$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i2$
|
|
8272
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.8", type: KvFilterFieldsetComponent, selector: "kv-filter-fieldset", inputs: { isExpandable: "isExpandable" }, outputs: { collapsedEvent: "collapsedEvent" }, ngImport: i0, template: "<p-fieldset styleClass=\"p-0 mb-2\" >\r\n <ng-template pTemplate=\"header\">\r\n @if(isExpandable) {\r\n <div\r\n class=\"flex flex-row align-items-center justify-content-center p-1 cursor-pointer\"\r\n (click)=\"toggleField()\"\r\n >\r\n <span\r\n class=\"material-symbols-outlined flex align-items-center justify-content-center mr-2\"\r\n style=\"font-size: 1.4rem\"\r\n >\r\n {{ isCollapsed ? \"remove\" : \"add\" }}\r\n </span>\r\n\r\n <span class=\"text-sm\"> Filtros Avan\u00E7ados </span>\r\n </div>\r\n }\r\n </ng-template>\r\n\r\n <ng-content></ng-content>\r\n</p-fieldset>\r\n", styles: ["::ng-deep .p-fieldset .p-fieldset-legend{padding:.3rem;margin-left:1rem}::ng-deep .p-fieldset .p-fieldset-legend{background-color:#fff;border:none}::ng-deep .p-fieldset .p-fieldset-legend:hover{background-color:#f5f5f5}::ng-deep .p-fieldset .p-fieldset-legend:active{background-color:#e0e0e0}::ng-deep .p-fieldset .p-fieldset-content{padding-top:0rem}\n"], dependencies: [{ kind: "directive", type: i1$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i2$5.Fieldset, selector: "p-fieldset", inputs: ["legend", "toggleable", "collapsed", "style", "styleClass", "transitionOptions"], outputs: ["collapsedChange", "onBeforeToggle", "onAfterToggle"] }] }); }
|
|
7873
8273
|
}
|
|
7874
8274
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvFilterFieldsetComponent, decorators: [{
|
|
7875
8275
|
type: Component,
|
|
@@ -8557,5 +8957,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImpor
|
|
|
8557
8957
|
* Generated bundle index. Do not edit.
|
|
8558
8958
|
*/
|
|
8559
8959
|
|
|
8560
|
-
export { BaseApiService, BaseChartComponent, BaseComponent, BaseComponentButton, BaseComponentCrud, BaseComponentCrudForm, BaseComponentCrudList, BaseComponentDropDown, BaseComponentDropDownExternal, BaseComponentInput, BaseComponentMultiSelect, BasecomponentTable, BreadcrumbsService, CapitalizePipe, ChatService, 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 };
|
|
8960
|
+
export { BaseApiService, BaseChartComponent, BaseComponent, BaseComponentButton, BaseComponentCrud, BaseComponentCrudForm, BaseComponentCrudList, BaseComponentDropDown, BaseComponentDropDownExternal, BaseComponentInput, BaseComponentMultiSelect, BasecomponentTable, BreadcrumbsService, CapitalizePipe, ChatService, ComponentProviders, ComponentService, CpfCnpjPipe, DocsService, DragDirective, DynamicInputDirective, FormService, ImageCutterService, 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 };
|
|
8561
8961
|
//# sourceMappingURL=keevo-components.mjs.map
|