keevo-components 1.8.85 → 1.8.87
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/components/kv-buttons/kv-button-popup/kv-button-popup.component.mjs +9 -3
- package/esm2022/lib/components/kv-image-upload/kv-image-upload.component.mjs +5 -3
- package/esm2022/lib/components/kv-page-form/kv-page-form.component.mjs +35 -4
- package/esm2022/lib/components/kv-table/kv-table.component.mjs +3 -12
- package/esm2022/lib/components/kv-workspace/kv-workspace.component.mjs +81 -92
- package/fesm2022/keevo-components.mjs +128 -109
- package/fesm2022/keevo-components.mjs.map +1 -1
- package/lib/components/kv-buttons/kv-button-popup/kv-button-popup.component.d.ts +3 -1
- package/lib/components/kv-image-upload/kv-image-upload.component.d.ts +2 -1
- package/lib/components/kv-page-form/kv-page-form.component.d.ts +20 -3
- package/lib/components/kv-workspace/kv-workspace.component.d.ts +35 -16
- package/package.json +1 -1
|
@@ -2382,8 +2382,12 @@ class KvButtonPopupComponent extends BaseComponentButton {
|
|
|
2382
2382
|
constructor() {
|
|
2383
2383
|
super();
|
|
2384
2384
|
this.items = [];
|
|
2385
|
+
this.classBtn = '';
|
|
2385
2386
|
this.icon = 'pi pi-chevron-down';
|
|
2386
2387
|
}
|
|
2388
|
+
ngOnInit() {
|
|
2389
|
+
console.log(this.classBtn);
|
|
2390
|
+
}
|
|
2387
2391
|
handleShow() {
|
|
2388
2392
|
this.rotate();
|
|
2389
2393
|
}
|
|
@@ -2394,13 +2398,15 @@ class KvButtonPopupComponent extends BaseComponentButton {
|
|
|
2394
2398
|
this.icon = this.icon === 'pi pi-chevron-down' ? 'pi pi-chevron-up' : 'pi pi-chevron-down';
|
|
2395
2399
|
}
|
|
2396
2400
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvButtonPopupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2397
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.8", type: KvButtonPopupComponent, selector: "kv-button-popup", inputs: { items: "items" }, usesInheritance: true, ngImport: i0, template: "<p-menu #menu [model]=\"items\" appendTo=\"body\" [popup]=\"true\" (onShow)=\"handleShow()\" (onHide)=\"handleHide()\"></p-menu>\r\n<button\r\n pButton\r\n pRipple\r\n class=\"btn-
|
|
2401
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.8", type: KvButtonPopupComponent, selector: "kv-button-popup", inputs: { items: "items", classBtn: "classBtn" }, usesInheritance: true, ngImport: i0, template: "<p-menu #menu [model]=\"items\" appendTo=\"body\" [popup]=\"true\" (onShow)=\"handleShow()\" (onHide)=\"handleHide()\"></p-menu>\r\n<button\r\n pButton\r\n pRipple\r\n class=\"{{classBtn}} btn-popup\"\r\n [icon]=\"icon\"\r\n iconPos=\"right\"\r\n [label]=\"label\"\r\n [loading]=\"loading\"\r\n [disabled]=\"disabled\"\r\n (click)=\"menu.toggle($event)\">\r\n</button>\r\n", styles: [".btn-success{background-color:#29b92d!important;color:#fff!important}.btn-success:hover{background-color:#229925!important}.btn-success:disabled{pointer-events:none}.btn-secondary{background-color:#f2f3f5!important;color:#000000de!important}.btn-secondary:hover{background-color:#ef5350!important;color:#fff!important}.btn-secondary:disabled{pointer-events:none}.btn-popup{height:35px}\n"], dependencies: [{ kind: "directive", type: i1$1.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { 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: "directive", type: i2.Ripple, selector: "[pRipple]" }] }); }
|
|
2398
2402
|
}
|
|
2399
2403
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvButtonPopupComponent, decorators: [{
|
|
2400
2404
|
type: Component,
|
|
2401
|
-
args: [{ selector: 'kv-button-popup', template: "<p-menu #menu [model]=\"items\" appendTo=\"body\" [popup]=\"true\" (onShow)=\"handleShow()\" (onHide)=\"handleHide()\"></p-menu>\r\n<button\r\n pButton\r\n pRipple\r\n class=\"btn-
|
|
2405
|
+
args: [{ selector: 'kv-button-popup', template: "<p-menu #menu [model]=\"items\" appendTo=\"body\" [popup]=\"true\" (onShow)=\"handleShow()\" (onHide)=\"handleHide()\"></p-menu>\r\n<button\r\n pButton\r\n pRipple\r\n class=\"{{classBtn}} btn-popup\"\r\n [icon]=\"icon\"\r\n iconPos=\"right\"\r\n [label]=\"label\"\r\n [loading]=\"loading\"\r\n [disabled]=\"disabled\"\r\n (click)=\"menu.toggle($event)\">\r\n</button>\r\n", styles: [".btn-success{background-color:#29b92d!important;color:#fff!important}.btn-success:hover{background-color:#229925!important}.btn-success:disabled{pointer-events:none}.btn-secondary{background-color:#f2f3f5!important;color:#000000de!important}.btn-secondary:hover{background-color:#ef5350!important;color:#fff!important}.btn-secondary:disabled{pointer-events:none}.btn-popup{height:35px}\n"] }]
|
|
2402
2406
|
}], ctorParameters: () => [], propDecorators: { items: [{
|
|
2403
2407
|
type: Input
|
|
2408
|
+
}], classBtn: [{
|
|
2409
|
+
type: Input
|
|
2404
2410
|
}] } });
|
|
2405
2411
|
|
|
2406
2412
|
class KvButtonSecondaryComponent extends BaseComponentButton {
|
|
@@ -3841,6 +3847,9 @@ class KvPageFormComponent {
|
|
|
3841
3847
|
this.iconBtnCancel = 'pi pi-fw pi-times';
|
|
3842
3848
|
this.showBtnCancel = true;
|
|
3843
3849
|
this.txtBtnCancel = "Cancelar";
|
|
3850
|
+
this.iconBtnCancelToogle = "pi pi-chevron-down";
|
|
3851
|
+
this.showBtnCancelToogle = false;
|
|
3852
|
+
this.txtBtnCancelToogle = "Cancelar";
|
|
3844
3853
|
/**
|
|
3845
3854
|
* Botão salvar
|
|
3846
3855
|
*/
|
|
@@ -3851,6 +3860,12 @@ class KvPageFormComponent {
|
|
|
3851
3860
|
this.iconBtnSaveToogle = "pi pi-chevron-down";
|
|
3852
3861
|
this.showBtnSaveToogle = false;
|
|
3853
3862
|
this.txtBtnSaveToogle = "Ações";
|
|
3863
|
+
this.iconBtnToogle = "pi pi-chevron-down";
|
|
3864
|
+
this.showBtnToogle = false;
|
|
3865
|
+
this.txtBtnToogle = "Ações";
|
|
3866
|
+
this.disableBtnToogle = false;
|
|
3867
|
+
this.positionBtnToogle = 'end';
|
|
3868
|
+
this.classBtnToogle = 'bg-glue-500';
|
|
3854
3869
|
/**
|
|
3855
3870
|
* Botão fechar
|
|
3856
3871
|
*/
|
|
@@ -3912,11 +3927,11 @@ class KvPageFormComponent {
|
|
|
3912
3927
|
}
|
|
3913
3928
|
}
|
|
3914
3929
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvPageFormComponent, deps: [{ token: i2$1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3915
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
3930
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.8", type: KvPageFormComponent, selector: "kv-page-form", inputs: { formGroup: "formGroup", TituloForm: "TituloForm", SubTituloForm: "SubTituloForm", isSaveLoading: "isSaveLoading", popup: "popup", locationUseComponent: "locationUseComponent", iconBtnCancel: "iconBtnCancel", showBtnCancel: "showBtnCancel", txtBtnCancel: "txtBtnCancel", actionsCancelToogle: "actionsCancelToogle", iconBtnCancelToogle: "iconBtnCancelToogle", showBtnCancelToogle: "showBtnCancelToogle", txtBtnCancelToogle: "txtBtnCancelToogle", iconBtnSave: "iconBtnSave", showBtnSave: "showBtnSave", txtBtnSave: "txtBtnSave", disableBtnSave: "disableBtnSave", actionsSaveToogle: "actionsSaveToogle", iconBtnSaveToogle: "iconBtnSaveToogle", showBtnSaveToogle: "showBtnSaveToogle", txtBtnSaveToogle: "txtBtnSaveToogle", actionsToogle: "actionsToogle", iconBtnToogle: "iconBtnToogle", showBtnToogle: "showBtnToogle", txtBtnToogle: "txtBtnToogle", disableBtnToogle: "disableBtnToogle", positionBtnToogle: "positionBtnToogle", classBtnToogle: "classBtnToogle", disableBtnSair: "disableBtnSair" }, outputs: { onSave: "onSave", onCancel: "onCancel" }, ngImport: i0, template: "<div\r\n [formGroup]=\"formGroup\"\r\n class=\"grid-nogutter m-0\"\r\n id=\"page-form-container\"\r\n>\r\n\r\n <!-- Renderiza\u00E7\u00E3o do form -->\r\n <div class=\"col-12 p-0\" id=\"page-form-content\">\r\n <ng-content></ng-content>\r\n </div>\r\n\r\n <!-- Divider -->\r\n <!-- <p-divider class=\"col-12\"></p-divider> -->\r\n\r\n <!-- Barra de a\u00E7\u00F5es -->\r\n <div class=\"flex flex-column lg:flex-row justify-content-end col-12 gap-2 barra-acoes grid grid-nogutter p-fluid\">\r\n\r\n @if(positionBtnToogle == 'start'){\r\n <kv-button-popup\r\n *ngIf=\"actionsToogle && showBtnToogle\"\r\n [label]=\"txtBtnToogle\"\r\n [icon]=\"iconBtnToogle\"\r\n (click)=\"menuToogle.toggle($event)\"\r\n [disabled]=\"disableBtnToogle\"\r\n class=\"w-full lg:w-auto\"\r\n classBtn=\"{{classBtnToogle}}\"\r\n >\r\n </kv-button-popup>\r\n <p-menu\r\n #menuToogle\r\n [popup]=\"true\"\r\n [model]=\"actionsToogle\"\r\n appendTo=\"body\"\r\n class=\"w-full lg:w-auto\"\r\n ></p-menu>\r\n }\r\n\r\n <kv-button-popup\r\n *ngIf=\"actionsCancelToogle && showBtnToogle\"\r\n [label]=\"txtBtnCancelToogle\"\r\n [icon]=\"iconBtnCancelToogle\"\r\n (click)=\"menuCancel.toggle($event)\"\r\n class=\"w-full lg:w-auto\"\r\n [classBtn]=\"'btn-secondary border-300'\"\r\n >\r\n </kv-button-popup>\r\n <p-menu\r\n #menuCancel\r\n [popup]=\"true\"\r\n [model]=\"actionsCancelToogle\"\r\n appendTo=\"body\"\r\n class=\"w-full lg:w-auto\"\r\n ></p-menu>\r\n\r\n <kv-button-secondary\r\n *ngIf=\"showBtnCancel\"\r\n [label]=\"txtBtnCancel\"\r\n [icon]=\"iconBtnCancel\"\r\n [disabled]=\"isSaveLoading\"\r\n (click)=\"cancel($event)\"\r\n class=\"w-full lg:w-auto\"\r\n >\r\n </kv-button-secondary>\r\n\r\n <kv-button-success\r\n *ngIf=\"showBtnSave\"\r\n [label]=\"txtBtnSave\"\r\n [icon]=\"iconBtnSave\"\r\n [disabled]=\"disableBtnSave\"\r\n [loading]=\"isSaveLoading\"\r\n (click)=\"!disableBtnSave ? save($event) : ''\"\r\n class=\"w-full lg:w-auto\"\r\n />\r\n\r\n\r\n <kv-button-popup\r\n *ngIf=\"actionsSaveToogle && showBtnSaveToogle\"\r\n [label]=\"txtBtnSaveToogle\"\r\n [icon]=\"iconBtnSaveToogle\"\r\n (click)=\"menuSave.toggle($event)\"\r\n [loading]=\"isSaveLoading\"\r\n class=\"w-full lg:w-auto\"\r\n [classBtn]=\"'btn-success border-green-500'\"\r\n >\r\n </kv-button-popup>\r\n\r\n <p-menu\r\n #menuSave\r\n [popup]=\"true\"\r\n [model]=\"actionsSaveToogle\"\r\n appendTo=\"body\"\r\n class=\"w-full lg:w-auto\"\r\n ></p-menu>\r\n\r\n\r\n @if(positionBtnToogle == 'end'){\r\n <kv-button-popup\r\n *ngIf=\"actionsToogle && showBtnToogle\"\r\n [label]=\"txtBtnToogle\"\r\n [icon]=\"iconBtnToogle\"\r\n (click)=\"menuToogle.toggle($event)\"\r\n [disabled]=\"disableBtnToogle\"\r\n class=\"w-full lg:w-auto\"\r\n classBtn=\"{{classBtnToogle}}\"\r\n >\r\n </kv-button-popup>\r\n <p-menu\r\n #menuToogle\r\n [popup]=\"true\"\r\n [model]=\"actionsToogle\"\r\n appendTo=\"body\"\r\n class=\"w-full lg:w-auto\"\r\n ></p-menu>\r\n }\r\n </div>\r\n\r\n</div>", styles: ["::ng-deep .p-dialog .p-dialog-header{color:#fff!important;background:#002542!important;display:flex!important;flex-wrap:wrap}::ng-deep .p-dialog .p-dialog-content{padding-top:1rem}::ng-deep .p-dialog{min-width:320px}.sub-title{color:#ff0;position:relative;bottom:25px;z-index:1}::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}*{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}}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { 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: KvButtonSecondaryComponent, selector: "kv-button-secondary" }, { kind: "component", type: KvButtonSuccessComponent, selector: "kv-button-success" }, { kind: "component", type: KvButtonPopupComponent, selector: "kv-button-popup", inputs: ["items", "classBtn"] }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3916
3931
|
}
|
|
3917
3932
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvPageFormComponent, decorators: [{
|
|
3918
3933
|
type: Component,
|
|
3919
|
-
args: [{ selector: 'kv-page-form', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\r\n [formGroup]=\"formGroup\"\r\n class=\"grid-nogutter m-0\"\r\n id=\"page-form-container\"\r\n>\r\n\r\n <!-- Renderiza\u00E7\u00E3o do form -->\r\n <div class=\"col-12 p-0\" id=\"page-form-content\">\r\n <ng-content></ng-content>\r\n </div>\r\n\r\n <!-- Divider -->\r\n <!-- <p-divider class=\"col-12\"></p-divider> -->\r\n\r\n <!-- Barra de a\u00E7\u00F5es -->\r\n <div class=\"flex flex-column lg:flex-row justify-content-end col-12 gap-2 barra-acoes grid grid-nogutter p-fluid\">\r\n\r\n\r\n <kv-button-secondary\r\n *ngIf=\"showBtnCancel\"\r\n [label]=\"txtBtnCancel\"\r\n [icon]=\"iconBtnCancel\"\r\n [disabled]=\"isSaveLoading\"\r\n (click)=\"cancel($event)\"\r\n class=\"w-full lg:w-auto\"\r\n >\r\n </kv-button-secondary>\r\n\r\n <kv-button-success\r\n *ngIf=\"showBtnSave\"\r\n [label]=\"txtBtnSave\"\r\n [icon]=\"iconBtnSave\"\r\n [disabled]=\"disableBtnSave\"\r\n [loading]=\"isSaveLoading\"\r\n (click)=\"!disableBtnSave ? save($event) : ''\"\r\n class=\"w-full lg:w-auto\"\r\n />\r\n\r\n\r\n <kv-button-popup\r\n *ngIf=\"
|
|
3934
|
+
args: [{ selector: 'kv-page-form', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\r\n [formGroup]=\"formGroup\"\r\n class=\"grid-nogutter m-0\"\r\n id=\"page-form-container\"\r\n>\r\n\r\n <!-- Renderiza\u00E7\u00E3o do form -->\r\n <div class=\"col-12 p-0\" id=\"page-form-content\">\r\n <ng-content></ng-content>\r\n </div>\r\n\r\n <!-- Divider -->\r\n <!-- <p-divider class=\"col-12\"></p-divider> -->\r\n\r\n <!-- Barra de a\u00E7\u00F5es -->\r\n <div class=\"flex flex-column lg:flex-row justify-content-end col-12 gap-2 barra-acoes grid grid-nogutter p-fluid\">\r\n\r\n @if(positionBtnToogle == 'start'){\r\n <kv-button-popup\r\n *ngIf=\"actionsToogle && showBtnToogle\"\r\n [label]=\"txtBtnToogle\"\r\n [icon]=\"iconBtnToogle\"\r\n (click)=\"menuToogle.toggle($event)\"\r\n [disabled]=\"disableBtnToogle\"\r\n class=\"w-full lg:w-auto\"\r\n classBtn=\"{{classBtnToogle}}\"\r\n >\r\n </kv-button-popup>\r\n <p-menu\r\n #menuToogle\r\n [popup]=\"true\"\r\n [model]=\"actionsToogle\"\r\n appendTo=\"body\"\r\n class=\"w-full lg:w-auto\"\r\n ></p-menu>\r\n }\r\n\r\n <kv-button-popup\r\n *ngIf=\"actionsCancelToogle && showBtnToogle\"\r\n [label]=\"txtBtnCancelToogle\"\r\n [icon]=\"iconBtnCancelToogle\"\r\n (click)=\"menuCancel.toggle($event)\"\r\n class=\"w-full lg:w-auto\"\r\n [classBtn]=\"'btn-secondary border-300'\"\r\n >\r\n </kv-button-popup>\r\n <p-menu\r\n #menuCancel\r\n [popup]=\"true\"\r\n [model]=\"actionsCancelToogle\"\r\n appendTo=\"body\"\r\n class=\"w-full lg:w-auto\"\r\n ></p-menu>\r\n\r\n <kv-button-secondary\r\n *ngIf=\"showBtnCancel\"\r\n [label]=\"txtBtnCancel\"\r\n [icon]=\"iconBtnCancel\"\r\n [disabled]=\"isSaveLoading\"\r\n (click)=\"cancel($event)\"\r\n class=\"w-full lg:w-auto\"\r\n >\r\n </kv-button-secondary>\r\n\r\n <kv-button-success\r\n *ngIf=\"showBtnSave\"\r\n [label]=\"txtBtnSave\"\r\n [icon]=\"iconBtnSave\"\r\n [disabled]=\"disableBtnSave\"\r\n [loading]=\"isSaveLoading\"\r\n (click)=\"!disableBtnSave ? save($event) : ''\"\r\n class=\"w-full lg:w-auto\"\r\n />\r\n\r\n\r\n <kv-button-popup\r\n *ngIf=\"actionsSaveToogle && showBtnSaveToogle\"\r\n [label]=\"txtBtnSaveToogle\"\r\n [icon]=\"iconBtnSaveToogle\"\r\n (click)=\"menuSave.toggle($event)\"\r\n [loading]=\"isSaveLoading\"\r\n class=\"w-full lg:w-auto\"\r\n [classBtn]=\"'btn-success border-green-500'\"\r\n >\r\n </kv-button-popup>\r\n\r\n <p-menu\r\n #menuSave\r\n [popup]=\"true\"\r\n [model]=\"actionsSaveToogle\"\r\n appendTo=\"body\"\r\n class=\"w-full lg:w-auto\"\r\n ></p-menu>\r\n\r\n\r\n @if(positionBtnToogle == 'end'){\r\n <kv-button-popup\r\n *ngIf=\"actionsToogle && showBtnToogle\"\r\n [label]=\"txtBtnToogle\"\r\n [icon]=\"iconBtnToogle\"\r\n (click)=\"menuToogle.toggle($event)\"\r\n [disabled]=\"disableBtnToogle\"\r\n class=\"w-full lg:w-auto\"\r\n classBtn=\"{{classBtnToogle}}\"\r\n >\r\n </kv-button-popup>\r\n <p-menu\r\n #menuToogle\r\n [popup]=\"true\"\r\n [model]=\"actionsToogle\"\r\n appendTo=\"body\"\r\n class=\"w-full lg:w-auto\"\r\n ></p-menu>\r\n }\r\n </div>\r\n\r\n</div>", styles: ["::ng-deep .p-dialog .p-dialog-header{color:#fff!important;background:#002542!important;display:flex!important;flex-wrap:wrap}::ng-deep .p-dialog .p-dialog-content{padding-top:1rem}::ng-deep .p-dialog{min-width:320px}.sub-title{color:#ff0;position:relative;bottom:25px;z-index:1}::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}*{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}}\n"] }]
|
|
3920
3935
|
}], ctorParameters: () => [{ type: i2$1.FormBuilder }], propDecorators: { formGroup: [{
|
|
3921
3936
|
type: Input
|
|
3922
3937
|
}], TituloForm: [{
|
|
@@ -3935,6 +3950,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImpor
|
|
|
3935
3950
|
type: Input
|
|
3936
3951
|
}], txtBtnCancel: [{
|
|
3937
3952
|
type: Input
|
|
3953
|
+
}], actionsCancelToogle: [{
|
|
3954
|
+
type: Input
|
|
3955
|
+
}], iconBtnCancelToogle: [{
|
|
3956
|
+
type: Input
|
|
3957
|
+
}], showBtnCancelToogle: [{
|
|
3958
|
+
type: Input
|
|
3959
|
+
}], txtBtnCancelToogle: [{
|
|
3960
|
+
type: Input
|
|
3938
3961
|
}], iconBtnSave: [{
|
|
3939
3962
|
type: Input
|
|
3940
3963
|
}], showBtnSave: [{
|
|
@@ -3943,7 +3966,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImpor
|
|
|
3943
3966
|
type: Input
|
|
3944
3967
|
}], disableBtnSave: [{
|
|
3945
3968
|
type: Input
|
|
3946
|
-
}],
|
|
3969
|
+
}], actionsSaveToogle: [{
|
|
3947
3970
|
type: Input
|
|
3948
3971
|
}], iconBtnSaveToogle: [{
|
|
3949
3972
|
type: Input
|
|
@@ -3951,6 +3974,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImpor
|
|
|
3951
3974
|
type: Input
|
|
3952
3975
|
}], txtBtnSaveToogle: [{
|
|
3953
3976
|
type: Input
|
|
3977
|
+
}], actionsToogle: [{
|
|
3978
|
+
type: Input
|
|
3979
|
+
}], iconBtnToogle: [{
|
|
3980
|
+
type: Input
|
|
3981
|
+
}], showBtnToogle: [{
|
|
3982
|
+
type: Input
|
|
3983
|
+
}], txtBtnToogle: [{
|
|
3984
|
+
type: Input
|
|
3985
|
+
}], disableBtnToogle: [{
|
|
3986
|
+
type: Input
|
|
3987
|
+
}], positionBtnToogle: [{
|
|
3988
|
+
type: Input
|
|
3989
|
+
}], classBtnToogle: [{
|
|
3990
|
+
type: Input
|
|
3954
3991
|
}], disableBtnSair: [{
|
|
3955
3992
|
type: Input
|
|
3956
3993
|
}], onSave: [{
|
|
@@ -4915,7 +4952,6 @@ class KvTableComponent {
|
|
|
4915
4952
|
this.onActiveItemLote.emit(rowData);
|
|
4916
4953
|
}
|
|
4917
4954
|
isBooleanField(rowData, col) {
|
|
4918
|
-
// return typeof rowData[col.field] == 'boolean' && col.fieldType != 'switch';
|
|
4919
4955
|
return typeof rowData[col.field] == 'boolean';
|
|
4920
4956
|
}
|
|
4921
4957
|
isChipField(col) {
|
|
@@ -4929,9 +4965,6 @@ class KvTableComponent {
|
|
|
4929
4965
|
let retorno = col.fieldType && col.fieldType === 'switch' ? true : false;
|
|
4930
4966
|
return retorno;
|
|
4931
4967
|
}
|
|
4932
|
-
// isVisibleCheckbox(rowData: any): boolean {
|
|
4933
|
-
// return this.config.visibleControlCheckboxFunction? this.config.visibleControlCheckboxFunction(rowData): true;
|
|
4934
|
-
// }
|
|
4935
4968
|
isRowSelectable(event) {
|
|
4936
4969
|
return !this.isDisabledCheckbox(event.data);
|
|
4937
4970
|
}
|
|
@@ -5038,7 +5071,6 @@ class KvTableComponent {
|
|
|
5038
5071
|
let eventDoubleClick = { event: e, rowData: rowData };
|
|
5039
5072
|
let array = [];
|
|
5040
5073
|
e.target.classList.forEach((x) => array.push(x));
|
|
5041
|
-
// if (array.find((x: any) => x == 'ng-star-inserted') != undefined)
|
|
5042
5074
|
this.doubleClickEvent.emit(eventDoubleClick);
|
|
5043
5075
|
}
|
|
5044
5076
|
centralizarColunas(col) {
|
|
@@ -5085,10 +5117,6 @@ class KvTableComponent {
|
|
|
5085
5117
|
}
|
|
5086
5118
|
exibirCampo(field, rowData) {
|
|
5087
5119
|
let visible = field.visible ? field.visible(rowData) : true;
|
|
5088
|
-
// if (field != undefined && field != null && field != '') {
|
|
5089
|
-
// const value = rowData[field];
|
|
5090
|
-
// return value;
|
|
5091
|
-
// }
|
|
5092
5120
|
return visible;
|
|
5093
5121
|
}
|
|
5094
5122
|
criarMenusModal(data) {
|
|
@@ -5279,11 +5307,11 @@ class KvTableComponent {
|
|
|
5279
5307
|
});
|
|
5280
5308
|
}
|
|
5281
5309
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvTableComponent, deps: [{ token: i1.DatePipe }, { token: i1.DecimalPipe }, { token: CpfCnpjPipe }, { token: TelefonePipe }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5282
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.8", type: KvTableComponent, selector: "kv-table", inputs: { _templates: ["templates", "_templates"], setConfig: ["config", "setConfig"], defaultSortField: "defaultSortField", dataSource: "dataSource", selectedItems: "selectedItems", totalRecords: "totalRecords", paginator: "paginator", rowsPerPageOptions: "rowsPerPageOptions", rows: "rows", pageLinksOptions: "pageLinksOptions", showFirstLastIcon: "showFirstLastIcon", tableSize: "tableSize", applyStyle: "applyStyle", acoesLinhaTabela: "acoesLinhaTabela", filterColumnsBtn: "filterColumnsBtn", filtrosAvancados: "filtrosAvancados", scrollHeight: "scrollHeight", isTableScrollable: "isTableScrollable", tableCaptalized: "tableCaptalized", rowTrackBy: "rowTrackBy", responsiveLayout: "responsiveLayout" }, outputs: { onActiveItem: "onActiveItem", onActiveItemLote: "onActiveItemLote", onPaginate: "onPaginate", onSelectionChange: "onSelectionChange", doubleClickEvent: "doubleClickEvent", filterField: "filterField", filtrosAvancadosEmit: "filtrosAvancadosEmit", onSwitchTableChange: "onSwitchTableChange" }, host: { listeners: { "window:resize": "onWindowResize($event)" } }, queries: [{ propertyName: "templates", predicate: TemplateDirective }], viewQueries: [{ propertyName: "table", first: true, predicate: ["table"], descendants: true }, { propertyName: "menuFiltroDiv", first: true, predicate: ["menuFiltroDiv"], descendants: true }, { propertyName: "botaoFiltro", first: true, predicate: ["botaoFiltro"], descendants: true }], ngImport: i0, template: "<div>\r\n <p-panel\r\n *ngIf=\"filtrosAvancados\"\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 <i\r\n *ngIf=\"!collapsed\"\r\n class=\"pi pi-filter\"\r\n ></i>\r\n <!-- \u00CDcone quando o painel est\u00E1 aberto -->\r\n <i\r\n *ngIf=\"collapsed\"\r\n class=\"pi pi-minus\"\r\n ></i>\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 <p-table\r\n *ngIf=\"config\"\r\n #dt\r\n styleClass=\"p-datatable-sm\"\r\n [value]=\"dataSource\"\r\n [(selection)]=\"selectedItems\"\r\n [rowSelectable]=\"isRowSelectable\"\r\n [columns]=\"config.columns\"\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 [rowHover]=\"true\"\r\n [totalRecords]=\"totalRecords\"\r\n [lazy]=\"config.lazy\"\r\n (onLazyLoad)=\"paginate($event)\"\r\n (selectionChange)=\"selectionChange($event)\"\r\n rowGroupMode=\"rowspan\"\r\n [groupRowsBy]=\"config.fieldGroup\"\r\n [showFirstLastIcon]=\"showFirstLastIcon\"\r\n [pageLinks]=\"pageLinksOptions\"\r\n [responsive]=\"true\"\r\n [responsiveLayout]=\"responsiveLayout ? 'stack' : ''\"\r\n [scrollable]=\"isTableScrollable\"\r\n [scrollHeight]=\"scrollHeight\"\r\n [rowTrackBy]=\"rowTrackBy \"\r\n >\r\n <ng-template\r\n pTemplate=\"caption\"\r\n *ngIf=\"config.enableCation\"\r\n >\r\n <div class=\"flex flex-row flex-wrap justify-content-between align-items-center grid formgrid p-fluid col-12\">\r\n <div class=\"col-12 flex flex-column\">\r\n <div\r\n *ngIf=\"config.title\"\r\n class=\"text-md font-bold my-3\"\r\n >\r\n {{ config.title }}\r\n </div>\r\n <div\r\n *ngIf=\"config.subtitle\"\r\n class=\"text-sm mb-4 font-medium\"\r\n >\r\n {{ config.subtitle }}\r\n </div>\r\n </div>\r\n\r\n <div 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 \">\r\n <span\r\n *ngIf=\"config.enableFilter\"\r\n class=\"p-input-icon-left\"\r\n >\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(dt, $event)\"\r\n placeholder=\"Pesquisar...\"\r\n class=\"h-2rem\"\r\n />\r\n </span>\r\n\r\n <!-- <div\r\n #menuFiltroDiv\r\n id = \"menuFiltroDiv\"\r\n [style.visibility]=\"'hidden'\"\r\n class=\"absolute z-4 bg-gray-200\"\r\n (click)=\"onClickEvent($event)\"\r\n > -->\r\n\r\n <div\r\n #menuFiltroDiv\r\n id=\"menuFiltroDiv\"\r\n [style.visibility]=\"'hidden'\"\r\n class=\"absolute z-4 bg-gray-200 menu-columns-filtro\"\r\n >\r\n <p-card>\r\n <div\r\n class=\"flex flex-column text-medium w-15rem\"\r\n *ngFor=\"let col of columns\"\r\n >\r\n {{ checkMenuFiltro(col) }}\r\n <p-checkbox\r\n #filterColumns\r\n [label]=\"col.header\"\r\n [binary]=\"true\"\r\n class=\"checkbox-container\"\r\n (onChange)=\"dinamicColumnSet($event, col)\"\r\n [(ngModel)]=\"col.checked\"\r\n *ngIf=\"!dinamicDisableColumn(col)\"\r\n ></p-checkbox>\r\n </div>\r\n </p-card>\r\n </div>\r\n </div>\r\n\r\n <div class=\"flex flex-row col-1 justify-content-end\">\r\n <div\r\n *ngFor=\"let action of config.actionsLote; let i=index\"\r\n class=\"btns-options\"\r\n [style]=\"{ 'margin-right': '7px' }\"\r\n >\r\n <button\r\n id=\"actionLoteBtns\"\r\n pButton\r\n *ngIf=\"\r\n (selectedItems.length > 0 || action.showAcoesLote) &&\r\n exibirCampo(action, this.action)\r\n \"\r\n class=\"actionLoteBtns p-button-raised p-button-text\"\r\n (click)=\"\r\n action?.command(commandEvent); activeItemLote(selectedItems)\r\n \"\r\n [pTooltip]=\"retornarCampo(action, selectedItems, 'tooltip')\"\r\n [tooltipPosition]=\"retornarCampo(action, selectedItems, 'tooltip').length > 7 && config.actionsLote && i == config.actionsLote.length - 1 ? 'left' : 'bottom'\" \r\n [style.backgroundColor]=\"\r\n retornarCampo(action, selectedItems, 'btnColor')\r\n \"\r\n [disabled]=\"retornarCampo(action, selectedItems, 'disabled')\"\r\n >\r\n <span\r\n class=\"material-symbols-outlined md-22\"\r\n [style.color]=\"\r\n retornarCampo(action, selectedItems, 'iconBtnColor')\r\n \"\r\n >\r\n {{ retornarCampo(action, selectedItems, \"icon\") }}\r\n </span>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template\r\n pTemplate=\"header\"\r\n let-columns\r\n >\r\n <tr>\r\n <th\r\n style=\"width: 4rem; border-left: solid 4px transparent\"\r\n *ngIf=\"config.enableSelect\"\r\n >\r\n <p-tableHeaderCheckbox (click)=\"activeItemLote(selectedItems)\"></p-tableHeaderCheckbox>\r\n </th>\r\n\r\n <th\r\n *ngFor=\"let col of columns\"\r\n [pSortableColumn]=\"col.field\"\r\n [pSortableColumnDisabled]=\"col.sortable === false\"\r\n [style.width]=\"col.width\"\r\n class=\"text-sm\"\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 <p-sortIcon\r\n *ngIf=\"col.sortable === true\"\r\n [field]=\"col.field\"\r\n style=\"font-size: 10px\"\r\n ></p-sortIcon>\r\n\r\n <span\r\n *ngIf=\"col.headerTooltip\"\r\n class=\"material-symbols-outlined flex align-items-center\"\r\n [pTooltip]=\"col.headerTooltip\"\r\n >info</span>\r\n </div>\r\n </th>\r\n <th *ngIf=\"config.actions && config.actions.length > 0\"></th>\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template\r\n pTemplate=\"body\"\r\n let-rowData\r\n let-columns=\"columns\"\r\n let-rowgroup=\"rowgroup\"\r\n let-rowspan=\"rowspan\"\r\n >\r\n <tr (dblclick)=\"doubleClick($event, rowData)\" [ngClass]=\"{ 'capitalize': tableCaptalized }\">\r\n <td\r\n *ngIf=\"config.enableSelect\"\r\n [style]=\"applyStyle(rowData, { field: 'check-box', header: '' })\"\r\n >\r\n <!--<p-tableCheckbox *ngIf=\"isVisibleCheckbox(rowData)\"-->\r\n <p-tableCheckbox\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 <ng-container *ngFor=\"let col of columns\">\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 *ngIf=\"\r\n !isChipField(col) && !col.iconField && !isImageField(col)\r\n \">\r\n <i\r\n *ngIf=\"col.icon\"\r\n [class]=\"col.icon + ' mr-2'\"\r\n ></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 </div>\r\n </span>\r\n\r\n <span *ngIf=\"isImageField(col)\">\r\n <span>\r\n <img\r\n class=\"image\"\r\n [src]=\"loadImage(rowData, col)\"\r\n />\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\r\n </ng-template>\r\n </td>\r\n\r\n <td\r\n *ngIf=\"!rowgroup && !col.grouped && !col.template\"\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 *ngIf=\"\r\n !isChipField(col) && !col.iconField && !isImageField(col)\r\n \">\r\n <i\r\n *ngIf=\"col.icon\"\r\n [class]=\"col.icon + ' mr-2'\"\r\n ></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 </div>\r\n </span>\r\n\r\n\r\n <span *ngIf=\"isImageField(col)\">\r\n <span>\r\n <img\r\n class=\"image\"\r\n [src]=\"loadImage(rowData, col)\"\r\n />\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\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\r\n\r\n </ng-template>\r\n </td>\r\n\r\n <td\r\n *ngIf=\"col.template\"\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\r\n\r\n\r\n </ng-container>\r\n\r\n <td\r\n *ngIf=\"config.actions && config.actions.length > 0\"\r\n [style]=\"applyStyle(rowData, { field: 'btns-options', header: '' })\"\r\n >\r\n <div\r\n class=\"flex flex-row justify-content-end w-full gap-1\"\r\n *ngIf=\"acoesLinhaTabela\"\r\n >\r\n <div\r\n *ngFor=\"let action of config.actions\"\r\n class=\"mr-1\"\r\n >\r\n <!-- <button\r\n id=\"actionBtns\"\r\n pButton\r\n *ngIf=\"exibirCampo(action, rowData)\"\r\n class=\"actionBtns p-button-text p-button-raised\"\r\n (click)=\"activeItem(rowData); action?.command(commandEvent)\"\r\n [pTooltip]=\"retornarCampo(action, rowData, 'tooltip')\"\r\n [tooltipPosition]=\"\r\n action.tooltipPosition ? action.tooltipPosition : 'bottom'\r\n \"\r\n [disabled]=\"callDisabled(action, rowData)\"\r\n >\r\n <span class=\"material-symbols-outlined md-19\">\r\n {{ retornarCampo(action, rowData, \"icon\") }}</span\r\n >\r\n </button> -->\r\n\r\n <span\r\n class=\"material-symbols-outlined {{\r\n callDisabled(action, rowData)\r\n ? 'text-gray-400 cursor-auto'\r\n : 'cursor-pointer'\r\n }}\"\r\n style=\"font-size: 20px\"\r\n (click)=\"isButtonDisable(action, rowData, commandEvent)\"\r\n [pTooltip]=\"retornarCampo(action, rowData, 'tooltip')\"\r\n [tooltipPosition]=\"\r\n action.tooltipPosition ? action.tooltipPosition : 'bottom'\r\n \"\r\n >\r\n {{ retornarCampo(action, rowData, \"icon\") }}\r\n </span>\r\n </div>\r\n </div>\r\n <div\r\n class=\"flex flex-row justify-content-end w-full\"\r\n *ngIf=\"!acoesLinhaTabela\"\r\n >\r\n <!-- <button\r\n id=\"moreVertBtn\"\r\n pButton\r\n class=\"actionBtns p-button-text p-button-raised\"\r\n (click)=\"menu.toggle($event); activeItem(rowData)\"\r\n > -->\r\n <span\r\n class=\"material-symbols-outlined cursor-pointer icon-more-horiz\"\r\n style=\"font-size: 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 <!-- <div *ngFor=\"let action of config.actions\">\r\n {{ criarMenusModal(rowData) }}\r\n </div> -->\r\n\r\n <p-tieredMenu\r\n #menu\r\n [popup]=\"true\"\r\n [model]=\"menuItems\"\r\n appendTo=\"body\"\r\n ></p-tieredMenu>\r\n </div>\r\n </td>\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template\r\n pTemplate=\"emptymessage\"\r\n let-columns\r\n >\r\n <tr>\r\n <td\r\n [attr.colspan]=\"columns.length + 2\"\r\n style=\"text-align: center; border-radius: 10px !important\"\r\n >\r\n <p class=\"font-medium m-0\">Nenhum registro encontrado</p>\r\n </td>\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n</div>\r\n\r\n<link\r\n rel=\"stylesheet\"\r\n href=\"https://fonts.googleapis.com/icon?family=Material+Icons\"\r\n/>\r\n\r\n<link\r\n rel=\"stylesheet\"\r\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@48,400,0,0\"\r\n/>\r\n", styles: ["@charset \"UTF-8\";.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:19px}.material-symbols-outlined.md-22{font-size:22px}.checkbox-container{display:flex;align-items:center;gap:2px;margin-top:5px}#botaoFiltro:hover{color:#a9a9a9}.actionLoteBtns{align-items:center;background-color:transparent;color:#a9a9a9;display:flex;font-size:16px;width:2rem;height:2rem;top:2px;margin-left:.5rem;justify-content:center;text-decoration:none;text-align:justify;padding:12px}#actionLoteBtns:hover,.actionLoteBtns:hover{background-color:#29b92d!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:1;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-table{border-spacing:0px 2px}:host ::ng-deep .p-datatable-header{background-color:#eaeaea!important;padding:2px 13px 0!important;border-radius:5px!important}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-thead>tr>th{background-color:#eaeaea!important}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-thead>tr>th:first-of-type{border-radius:5px 0 0 5px}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-thead>tr>th:last-child{border-radius:0 5px 5px 0}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody>tr>td{border-bottom:1px solid #ddd!important;border-top:1px solid #ddd!important}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody>tr>td:first-of-type{border-left:solid 4px #5289B4!important;border-radius:10px 0 0 10px!important}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody>tr>td:last-child{border-radius:0 10px 10px 0!important;border-right:1px solid #ddd!important}:host ::ng-deep .actionBtns,:host ::ng-deep .actionLoteBtns{border-radius:50%;width:2.5rem!important;height:2.5rem!important;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}@media only screen and (min-width: 768px){.actionLoteBtns{top:-1px}}@media only screen and (max-width: 960px){.rowTable{text-align:right!important}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody>tr>td:has(p-tablecheckbox){border-bottom:0px!important}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody>tr>td:has(img){justify-content:center!important;align-items:center!important}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody>tr>td:has(img) .p-column-title{display:none!important}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody>tr>td:first-of-type{border-left:solid 4px #5289B4!important;border-top:1px solid #ddd!important}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody>tr>td:last-child{border-bottom:1px solid #ddd!important}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody>tr>td:last-child div{justify-content:center!important;align-items:center!important}:host ::ng-deep .p-datatable.p-datatable-sm .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-sm .p-datatable-thead>tr>th:last-of-type{border-radius:0 0 5px!important}::ng-deep .p-datatable.p-datatable-sm .p-datatable-thead>tr>th:first-of-type{border-radius:0 0 0 5px!important}\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$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i4$5.AutoFocus, selector: "[pAutoFocus]", inputs: ["autofocus"] }, { kind: "directive", type: i5$1.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$1.Card, selector: "p-card", inputs: ["header", "subheader", "style", "styleClass"] }, { kind: "component", type: i4$2.Checkbox, selector: "p-checkbox", inputs: ["value", "name", "disabled", "binary", "label", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "style", "styleClass", "labelStyleClass", "formControl", "checkboxIcon", "readonly", "required", "autofocus", "trueValue", "falseValue"], outputs: ["onChange", "onFocus", "onBlur"] }, { kind: "directive", type: i6.InputText, selector: "[pInputText]" }, { kind: "component", type: i11$1.Panel, selector: "p-panel", inputs: ["toggleable", "header", "collapsed", "style", "styleClass", "iconPos", "expandIcon", "collapseIcon", "showHeader", "toggler", "transitionOptions"], outputs: ["collapsedChange", "onBeforeToggle", "onAfterToggle"] }, { kind: "component", type: i12$1.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: "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: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: KvSwitchComponent, selector: "kv-switch", inputs: ["readonly", "switchValue"], outputs: ["onSwitchChange"] }] }); }
|
|
5310
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.8", type: KvTableComponent, selector: "kv-table", inputs: { _templates: ["templates", "_templates"], setConfig: ["config", "setConfig"], defaultSortField: "defaultSortField", dataSource: "dataSource", selectedItems: "selectedItems", totalRecords: "totalRecords", paginator: "paginator", rowsPerPageOptions: "rowsPerPageOptions", rows: "rows", pageLinksOptions: "pageLinksOptions", showFirstLastIcon: "showFirstLastIcon", tableSize: "tableSize", applyStyle: "applyStyle", acoesLinhaTabela: "acoesLinhaTabela", filterColumnsBtn: "filterColumnsBtn", filtrosAvancados: "filtrosAvancados", scrollHeight: "scrollHeight", isTableScrollable: "isTableScrollable", tableCaptalized: "tableCaptalized", rowTrackBy: "rowTrackBy", responsiveLayout: "responsiveLayout" }, outputs: { onActiveItem: "onActiveItem", onActiveItemLote: "onActiveItemLote", onPaginate: "onPaginate", onSelectionChange: "onSelectionChange", doubleClickEvent: "doubleClickEvent", filterField: "filterField", filtrosAvancadosEmit: "filtrosAvancadosEmit", onSwitchTableChange: "onSwitchTableChange" }, host: { listeners: { "window:resize": "onWindowResize($event)" } }, queries: [{ propertyName: "templates", predicate: TemplateDirective }], viewQueries: [{ propertyName: "table", first: true, predicate: ["table"], descendants: true }, { propertyName: "menuFiltroDiv", first: true, predicate: ["menuFiltroDiv"], descendants: true }, { propertyName: "botaoFiltro", first: true, predicate: ["botaoFiltro"], descendants: true }], ngImport: i0, template: "<div>\r\n <p-panel\r\n *ngIf=\"filtrosAvancados\"\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 <i\r\n *ngIf=\"!collapsed\"\r\n class=\"pi pi-filter\"\r\n ></i>\r\n <!-- \u00CDcone quando o painel est\u00E1 aberto -->\r\n <i\r\n *ngIf=\"collapsed\"\r\n class=\"pi pi-minus\"\r\n ></i>\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 <p-table\r\n *ngIf=\"config\"\r\n #dt\r\n styleClass=\"p-datatable-sm\"\r\n [value]=\"dataSource\"\r\n [(selection)]=\"selectedItems\"\r\n [rowSelectable]=\"isRowSelectable\"\r\n [columns]=\"config.columns\"\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 [rowHover]=\"true\"\r\n [totalRecords]=\"totalRecords\"\r\n [lazy]=\"config.lazy\"\r\n (onLazyLoad)=\"paginate($event)\"\r\n (selectionChange)=\"selectionChange($event)\"\r\n rowGroupMode=\"rowspan\"\r\n [groupRowsBy]=\"config.fieldGroup\"\r\n [showFirstLastIcon]=\"showFirstLastIcon\"\r\n [pageLinks]=\"pageLinksOptions\"\r\n [responsive]=\"true\"\r\n [responsiveLayout]=\"responsiveLayout ? 'stack' : ''\"\r\n [scrollable]=\"isTableScrollable\"\r\n [scrollHeight]=\"scrollHeight\"\r\n [rowTrackBy]=\"rowTrackBy \"\r\n >\r\n <ng-template\r\n pTemplate=\"caption\"\r\n *ngIf=\"config.enableCation\"\r\n >\r\n <div class=\"flex flex-row flex-wrap justify-content-between align-items-center grid formgrid p-fluid col-12\">\r\n <div class=\"col-12 flex flex-column\">\r\n <div\r\n *ngIf=\"config.title\"\r\n class=\"text-md font-bold my-3\"\r\n >\r\n {{ config.title }}\r\n </div>\r\n <div\r\n *ngIf=\"config.subtitle\"\r\n class=\"text-sm mb-4 font-medium\"\r\n >\r\n {{ config.subtitle }}\r\n </div>\r\n </div>\r\n\r\n <div 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 \">\r\n <span\r\n *ngIf=\"config.enableFilter\"\r\n class=\"p-input-icon-left\"\r\n >\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(dt, $event)\"\r\n placeholder=\"Pesquisar...\"\r\n class=\"h-2rem\"\r\n />\r\n </span>\r\n\r\n <!-- <div\r\n #menuFiltroDiv\r\n id = \"menuFiltroDiv\"\r\n [style.visibility]=\"'hidden'\"\r\n class=\"absolute z-4 bg-gray-200\"\r\n (click)=\"onClickEvent($event)\"\r\n > -->\r\n\r\n <div\r\n #menuFiltroDiv\r\n id=\"menuFiltroDiv\"\r\n [style.visibility]=\"'hidden'\"\r\n class=\"absolute z-4 bg-gray-200 menu-columns-filtro\"\r\n >\r\n <p-card>\r\n <div\r\n class=\"flex flex-column text-medium w-15rem\"\r\n *ngFor=\"let col of columns\"\r\n >\r\n {{ checkMenuFiltro(col) }}\r\n <p-checkbox\r\n #filterColumns\r\n [label]=\"col.header\"\r\n [binary]=\"true\"\r\n class=\"checkbox-container\"\r\n (onChange)=\"dinamicColumnSet($event, col)\"\r\n [(ngModel)]=\"col.checked\"\r\n *ngIf=\"!dinamicDisableColumn(col)\"\r\n ></p-checkbox>\r\n </div>\r\n </p-card>\r\n </div>\r\n </div>\r\n\r\n <div class=\"flex flex-row col-1 justify-content-end\">\r\n <div\r\n *ngFor=\"let action of config.actionsLote; let i=index\"\r\n class=\"btns-options\"\r\n [style]=\"{ 'margin-right': '7px' }\"\r\n >\r\n <button\r\n id=\"actionLoteBtns\"\r\n pButton\r\n *ngIf=\"\r\n (selectedItems.length > 0 || action.showAcoesLote) &&\r\n exibirCampo(action, this.action)\r\n \"\r\n class=\"actionLoteBtns p-button-raised p-button-text\"\r\n (click)=\"\r\n action?.command(commandEvent); activeItemLote(selectedItems)\r\n \"\r\n [pTooltip]=\"retornarCampo(action, selectedItems, 'tooltip')\"\r\n [tooltipPosition]=\"retornarCampo(action, selectedItems, 'tooltip').length > 7 && config.actionsLote && i == config.actionsLote.length - 1 ? 'left' : 'bottom'\" \r\n [style.backgroundColor]=\"\r\n retornarCampo(action, selectedItems, 'btnColor')\r\n \"\r\n [disabled]=\"retornarCampo(action, selectedItems, 'disabled')\"\r\n >\r\n <span\r\n class=\"material-symbols-outlined md-22\"\r\n [style.color]=\"\r\n retornarCampo(action, selectedItems, 'iconBtnColor')\r\n \"\r\n >\r\n {{ retornarCampo(action, selectedItems, \"icon\") }}\r\n </span>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template\r\n pTemplate=\"header\"\r\n let-columns\r\n >\r\n <tr>\r\n <th\r\n style=\"width: 4rem; border-left: solid 4px transparent\"\r\n *ngIf=\"config.enableSelect\"\r\n >\r\n <p-tableHeaderCheckbox (click)=\"activeItemLote(selectedItems)\"></p-tableHeaderCheckbox>\r\n </th>\r\n\r\n <th\r\n *ngFor=\"let col of columns\"\r\n [pSortableColumn]=\"col.field\"\r\n [pSortableColumnDisabled]=\"col.sortable === false\"\r\n [style.width]=\"col.width\"\r\n class=\"text-sm\"\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 <p-sortIcon\r\n *ngIf=\"col.sortable === true\"\r\n [field]=\"col.field\"\r\n style=\"font-size: 10px\"\r\n ></p-sortIcon>\r\n\r\n <span\r\n *ngIf=\"col.headerTooltip\"\r\n class=\"material-symbols-outlined flex align-items-center\"\r\n [pTooltip]=\"col.headerTooltip\"\r\n >info</span>\r\n </div>\r\n </th>\r\n <th *ngIf=\"config.actions && config.actions.length > 0\"></th>\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template\r\n pTemplate=\"body\"\r\n let-rowData\r\n let-columns=\"columns\"\r\n let-rowgroup=\"rowgroup\"\r\n let-rowspan=\"rowspan\"\r\n >\r\n <tr (dblclick)=\"doubleClick($event, rowData)\" [ngClass]=\"{ 'capitalize': tableCaptalized }\">\r\n <td\r\n *ngIf=\"config.enableSelect\"\r\n [style]=\"applyStyle(rowData, { field: 'check-box', header: '' })\"\r\n >\r\n <!--<p-tableCheckbox *ngIf=\"isVisibleCheckbox(rowData)\"-->\r\n <p-tableCheckbox\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 <ng-container *ngFor=\"let col of columns\">\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 *ngIf=\"\r\n !isChipField(col) && !col.iconField && !isImageField(col)\r\n \">\r\n <i\r\n *ngIf=\"col.icon\"\r\n [class]=\"col.icon + ' mr-2'\"\r\n ></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 </div>\r\n </span>\r\n\r\n <span *ngIf=\"isImageField(col)\">\r\n <span>\r\n <img\r\n class=\"image\"\r\n [src]=\"loadImage(rowData, col)\"\r\n />\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\r\n </ng-template>\r\n </td>\r\n\r\n <td\r\n *ngIf=\"!rowgroup && !col.grouped && !col.template\"\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 *ngIf=\"\r\n !isChipField(col) && !col.iconField && !isImageField(col)\r\n \">\r\n <i\r\n *ngIf=\"col.icon\"\r\n [class]=\"col.icon + ' mr-2'\"\r\n ></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 </div>\r\n </span>\r\n\r\n\r\n <span *ngIf=\"isImageField(col)\">\r\n <span>\r\n <img\r\n class=\"image\"\r\n [src]=\"loadImage(rowData, col)\"\r\n />\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\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\r\n\r\n </ng-template>\r\n </td>\r\n\r\n <td\r\n *ngIf=\"col.template\"\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\r\n\r\n\r\n </ng-container>\r\n\r\n <td\r\n *ngIf=\"config.actions && config.actions.length > 0\"\r\n [style]=\"applyStyle(rowData, { field: 'btns-options', header: '' })\"\r\n >\r\n <div\r\n class=\"flex flex-row justify-content-end w-full gap-1\"\r\n *ngIf=\"acoesLinhaTabela\"\r\n >\r\n <div\r\n *ngFor=\"let action of config.actions\"\r\n class=\"mr-1\"\r\n >\r\n <!-- <button\r\n id=\"actionBtns\"\r\n pButton\r\n *ngIf=\"exibirCampo(action, rowData)\"\r\n class=\"actionBtns p-button-text p-button-raised\"\r\n (click)=\"activeItem(rowData); action?.command(commandEvent)\"\r\n [pTooltip]=\"retornarCampo(action, rowData, 'tooltip')\"\r\n [tooltipPosition]=\"\r\n action.tooltipPosition ? action.tooltipPosition : 'bottom'\r\n \"\r\n [disabled]=\"callDisabled(action, rowData)\"\r\n >\r\n <span class=\"material-symbols-outlined md-19\">\r\n {{ retornarCampo(action, rowData, \"icon\") }}</span\r\n >\r\n </button> -->\r\n\r\n <span\r\n class=\"material-symbols-outlined {{\r\n callDisabled(action, rowData)\r\n ? 'text-gray-400 cursor-auto'\r\n : 'cursor-pointer'\r\n }}\"\r\n style=\"font-size: 20px\"\r\n (click)=\"isButtonDisable(action, rowData, commandEvent)\"\r\n [pTooltip]=\"retornarCampo(action, rowData, 'tooltip')\"\r\n [tooltipPosition]=\"\r\n action.tooltipPosition ? action.tooltipPosition : 'bottom'\r\n \"\r\n >\r\n {{ retornarCampo(action, rowData, \"icon\") }}\r\n </span>\r\n </div>\r\n </div>\r\n <div\r\n class=\"flex flex-row justify-content-end w-full\"\r\n *ngIf=\"!acoesLinhaTabela\"\r\n >\r\n <!-- <button\r\n id=\"moreVertBtn\"\r\n pButton\r\n class=\"actionBtns p-button-text p-button-raised\"\r\n (click)=\"menu.toggle($event); activeItem(rowData)\"\r\n > -->\r\n <span\r\n class=\"material-symbols-outlined cursor-pointer icon-more-horiz\"\r\n style=\"font-size: 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 <!-- <div *ngFor=\"let action of config.actions\">\r\n {{ criarMenusModal(rowData) }}\r\n </div> -->\r\n\r\n <p-tieredMenu\r\n #menu\r\n [popup]=\"true\"\r\n [model]=\"menuItems\"\r\n appendTo=\"body\"\r\n ></p-tieredMenu>\r\n </div>\r\n </td>\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template\r\n pTemplate=\"emptymessage\"\r\n let-columns\r\n >\r\n <tr>\r\n <td\r\n [attr.colspan]=\"columns.length + 2\"\r\n style=\"text-align: center; border-radius: 10px !important\"\r\n >\r\n <p class=\"font-medium m-0\">Nenhum registro encontrado</p>\r\n </td>\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n</div>\r\n\r\n<link\r\n rel=\"stylesheet\"\r\n href=\"https://fonts.googleapis.com/icon?family=Material+Icons\"\r\n/>\r\n\r\n<link\r\n rel=\"stylesheet\"\r\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@48,400,0,0\"\r\n/>\r\n", styles: ["@charset \"UTF-8\";.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:19px}.material-symbols-outlined.md-22{font-size:22px}.checkbox-container{display:flex;align-items:center;gap:2px;margin-top:5px}#botaoFiltro:hover{color:#a9a9a9}.actionLoteBtns{align-items:center;background-color:transparent;color:#a9a9a9;display:flex;font-size:16px;width:2rem;height:2rem;top:2px;margin-left:.5rem;justify-content:center;text-decoration:none;text-align:justify;padding:12px}#actionLoteBtns:hover,.actionLoteBtns:hover{background-color:#29b92d!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:1;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-table{border-spacing:0px 2px}:host ::ng-deep .p-datatable-header{background-color:#eaeaea!important;padding:2px 13px 0!important;border-radius:5px!important}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-thead>tr>th{background-color:#eaeaea!important}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-thead>tr>th:first-of-type{border-radius:5px 0 0 5px}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-thead>tr>th:last-child{border-radius:0 5px 5px 0}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody>tr>td{border-bottom:1px solid #ddd!important;border-top:1px solid #ddd!important}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody>tr>td:first-of-type{border-left:solid 4px #5289B4!important;border-radius:10px 0 0 10px!important}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody>tr>td:last-child{border-radius:0 10px 10px 0!important;border-right:1px solid #ddd!important}:host ::ng-deep .actionBtns,:host ::ng-deep .actionLoteBtns{border-radius:50%;width:2.5rem!important;height:2.5rem!important;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}@media only screen and (min-width: 768px){.actionLoteBtns{top:-1px}}@media only screen and (max-width: 960px){.rowTable{text-align:right!important}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody>tr>td:has(p-tablecheckbox){border-bottom:0px!important}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody>tr>td:has(img){justify-content:center!important;align-items:center!important}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody>tr>td:has(img) .p-column-title{display:none!important}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody>tr>td:first-of-type{border-left:solid 4px #5289B4!important;border-top:1px solid #ddd!important}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody>tr>td:last-child{border-bottom:1px solid #ddd!important}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody>tr>td:last-child div{justify-content:center!important;align-items:center!important}:host ::ng-deep .p-datatable.p-datatable-sm .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-sm .p-datatable-thead>tr>th:last-of-type{border-radius:0 0 5px!important}::ng-deep .p-datatable.p-datatable-sm .p-datatable-thead>tr>th:first-of-type{border-radius:0 0 0 5px!important}\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$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i4$5.AutoFocus, selector: "[pAutoFocus]", inputs: ["autofocus"] }, { kind: "directive", type: i5$1.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$1.Card, selector: "p-card", inputs: ["header", "subheader", "style", "styleClass"] }, { kind: "component", type: i4$2.Checkbox, selector: "p-checkbox", inputs: ["value", "name", "disabled", "binary", "label", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "style", "styleClass", "labelStyleClass", "formControl", "checkboxIcon", "readonly", "required", "autofocus", "trueValue", "falseValue"], outputs: ["onChange", "onFocus", "onBlur"] }, { kind: "directive", type: i6.InputText, selector: "[pInputText]" }, { kind: "component", type: i11$1.Panel, selector: "p-panel", inputs: ["toggleable", "header", "collapsed", "style", "styleClass", "iconPos", "expandIcon", "collapseIcon", "showHeader", "toggler", "transitionOptions"], outputs: ["collapsedChange", "onBeforeToggle", "onAfterToggle"] }, { kind: "component", type: i12$1.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: "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: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: KvSwitchComponent, selector: "kv-switch", inputs: ["readonly", "switchValue"], outputs: ["onSwitchChange"] }] }); }
|
|
5283
5311
|
}
|
|
5284
5312
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvTableComponent, decorators: [{
|
|
5285
5313
|
type: Component,
|
|
5286
|
-
args: [{ selector: 'kv-table', template: "<div>\r\n <p-panel\r\n *ngIf=\"filtrosAvancados\"\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 <i\r\n *ngIf=\"!collapsed\"\r\n class=\"pi pi-filter\"\r\n ></i>\r\n <!-- \u00CDcone quando o painel est\u00E1 aberto -->\r\n <i\r\n *ngIf=\"collapsed\"\r\n class=\"pi pi-minus\"\r\n ></i>\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 <p-table\r\n *ngIf=\"config\"\r\n #dt\r\n styleClass=\"p-datatable-sm\"\r\n [value]=\"dataSource\"\r\n [(selection)]=\"selectedItems\"\r\n [rowSelectable]=\"isRowSelectable\"\r\n [columns]=\"config.columns\"\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 [rowHover]=\"true\"\r\n [totalRecords]=\"totalRecords\"\r\n [lazy]=\"config.lazy\"\r\n (onLazyLoad)=\"paginate($event)\"\r\n (selectionChange)=\"selectionChange($event)\"\r\n rowGroupMode=\"rowspan\"\r\n [groupRowsBy]=\"config.fieldGroup\"\r\n [showFirstLastIcon]=\"showFirstLastIcon\"\r\n [pageLinks]=\"pageLinksOptions\"\r\n [responsive]=\"true\"\r\n [responsiveLayout]=\"responsiveLayout ? 'stack' : ''\"\r\n [scrollable]=\"isTableScrollable\"\r\n [scrollHeight]=\"scrollHeight\"\r\n [rowTrackBy]=\"rowTrackBy \"\r\n >\r\n <ng-template\r\n pTemplate=\"caption\"\r\n *ngIf=\"config.enableCation\"\r\n >\r\n <div class=\"flex flex-row flex-wrap justify-content-between align-items-center grid formgrid p-fluid col-12\">\r\n <div class=\"col-12 flex flex-column\">\r\n <div\r\n *ngIf=\"config.title\"\r\n class=\"text-md font-bold my-3\"\r\n >\r\n {{ config.title }}\r\n </div>\r\n <div\r\n *ngIf=\"config.subtitle\"\r\n class=\"text-sm mb-4 font-medium\"\r\n >\r\n {{ config.subtitle }}\r\n </div>\r\n </div>\r\n\r\n <div 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 \">\r\n <span\r\n *ngIf=\"config.enableFilter\"\r\n class=\"p-input-icon-left\"\r\n >\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(dt, $event)\"\r\n placeholder=\"Pesquisar...\"\r\n class=\"h-2rem\"\r\n />\r\n </span>\r\n\r\n <!-- <div\r\n #menuFiltroDiv\r\n id = \"menuFiltroDiv\"\r\n [style.visibility]=\"'hidden'\"\r\n class=\"absolute z-4 bg-gray-200\"\r\n (click)=\"onClickEvent($event)\"\r\n > -->\r\n\r\n <div\r\n #menuFiltroDiv\r\n id=\"menuFiltroDiv\"\r\n [style.visibility]=\"'hidden'\"\r\n class=\"absolute z-4 bg-gray-200 menu-columns-filtro\"\r\n >\r\n <p-card>\r\n <div\r\n class=\"flex flex-column text-medium w-15rem\"\r\n *ngFor=\"let col of columns\"\r\n >\r\n {{ checkMenuFiltro(col) }}\r\n <p-checkbox\r\n #filterColumns\r\n [label]=\"col.header\"\r\n [binary]=\"true\"\r\n class=\"checkbox-container\"\r\n (onChange)=\"dinamicColumnSet($event, col)\"\r\n [(ngModel)]=\"col.checked\"\r\n *ngIf=\"!dinamicDisableColumn(col)\"\r\n ></p-checkbox>\r\n </div>\r\n </p-card>\r\n </div>\r\n </div>\r\n\r\n <div class=\"flex flex-row col-1 justify-content-end\">\r\n <div\r\n *ngFor=\"let action of config.actionsLote; let i=index\"\r\n class=\"btns-options\"\r\n [style]=\"{ 'margin-right': '7px' }\"\r\n >\r\n <button\r\n id=\"actionLoteBtns\"\r\n pButton\r\n *ngIf=\"\r\n (selectedItems.length > 0 || action.showAcoesLote) &&\r\n exibirCampo(action, this.action)\r\n \"\r\n class=\"actionLoteBtns p-button-raised p-button-text\"\r\n (click)=\"\r\n action?.command(commandEvent); activeItemLote(selectedItems)\r\n \"\r\n [pTooltip]=\"retornarCampo(action, selectedItems, 'tooltip')\"\r\n [tooltipPosition]=\"retornarCampo(action, selectedItems, 'tooltip').length > 7 && config.actionsLote && i == config.actionsLote.length - 1 ? 'left' : 'bottom'\" \r\n [style.backgroundColor]=\"\r\n retornarCampo(action, selectedItems, 'btnColor')\r\n \"\r\n [disabled]=\"retornarCampo(action, selectedItems, 'disabled')\"\r\n >\r\n <span\r\n class=\"material-symbols-outlined md-22\"\r\n [style.color]=\"\r\n retornarCampo(action, selectedItems, 'iconBtnColor')\r\n \"\r\n >\r\n {{ retornarCampo(action, selectedItems, \"icon\") }}\r\n </span>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template\r\n pTemplate=\"header\"\r\n let-columns\r\n >\r\n <tr>\r\n <th\r\n style=\"width: 4rem; border-left: solid 4px transparent\"\r\n *ngIf=\"config.enableSelect\"\r\n >\r\n <p-tableHeaderCheckbox (click)=\"activeItemLote(selectedItems)\"></p-tableHeaderCheckbox>\r\n </th>\r\n\r\n <th\r\n *ngFor=\"let col of columns\"\r\n [pSortableColumn]=\"col.field\"\r\n [pSortableColumnDisabled]=\"col.sortable === false\"\r\n [style.width]=\"col.width\"\r\n class=\"text-sm\"\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 <p-sortIcon\r\n *ngIf=\"col.sortable === true\"\r\n [field]=\"col.field\"\r\n style=\"font-size: 10px\"\r\n ></p-sortIcon>\r\n\r\n <span\r\n *ngIf=\"col.headerTooltip\"\r\n class=\"material-symbols-outlined flex align-items-center\"\r\n [pTooltip]=\"col.headerTooltip\"\r\n >info</span>\r\n </div>\r\n </th>\r\n <th *ngIf=\"config.actions && config.actions.length > 0\"></th>\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template\r\n pTemplate=\"body\"\r\n let-rowData\r\n let-columns=\"columns\"\r\n let-rowgroup=\"rowgroup\"\r\n let-rowspan=\"rowspan\"\r\n >\r\n <tr (dblclick)=\"doubleClick($event, rowData)\" [ngClass]=\"{ 'capitalize': tableCaptalized }\">\r\n <td\r\n *ngIf=\"config.enableSelect\"\r\n [style]=\"applyStyle(rowData, { field: 'check-box', header: '' })\"\r\n >\r\n <!--<p-tableCheckbox *ngIf=\"isVisibleCheckbox(rowData)\"-->\r\n <p-tableCheckbox\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 <ng-container *ngFor=\"let col of columns\">\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 *ngIf=\"\r\n !isChipField(col) && !col.iconField && !isImageField(col)\r\n \">\r\n <i\r\n *ngIf=\"col.icon\"\r\n [class]=\"col.icon + ' mr-2'\"\r\n ></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 </div>\r\n </span>\r\n\r\n <span *ngIf=\"isImageField(col)\">\r\n <span>\r\n <img\r\n class=\"image\"\r\n [src]=\"loadImage(rowData, col)\"\r\n />\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\r\n </ng-template>\r\n </td>\r\n\r\n <td\r\n *ngIf=\"!rowgroup && !col.grouped && !col.template\"\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 *ngIf=\"\r\n !isChipField(col) && !col.iconField && !isImageField(col)\r\n \">\r\n <i\r\n *ngIf=\"col.icon\"\r\n [class]=\"col.icon + ' mr-2'\"\r\n ></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 </div>\r\n </span>\r\n\r\n\r\n <span *ngIf=\"isImageField(col)\">\r\n <span>\r\n <img\r\n class=\"image\"\r\n [src]=\"loadImage(rowData, col)\"\r\n />\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\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\r\n\r\n </ng-template>\r\n </td>\r\n\r\n <td\r\n *ngIf=\"col.template\"\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\r\n\r\n\r\n </ng-container>\r\n\r\n <td\r\n *ngIf=\"config.actions && config.actions.length > 0\"\r\n [style]=\"applyStyle(rowData, { field: 'btns-options', header: '' })\"\r\n >\r\n <div\r\n class=\"flex flex-row justify-content-end w-full gap-1\"\r\n *ngIf=\"acoesLinhaTabela\"\r\n >\r\n <div\r\n *ngFor=\"let action of config.actions\"\r\n class=\"mr-1\"\r\n >\r\n <!-- <button\r\n id=\"actionBtns\"\r\n pButton\r\n *ngIf=\"exibirCampo(action, rowData)\"\r\n class=\"actionBtns p-button-text p-button-raised\"\r\n (click)=\"activeItem(rowData); action?.command(commandEvent)\"\r\n [pTooltip]=\"retornarCampo(action, rowData, 'tooltip')\"\r\n [tooltipPosition]=\"\r\n action.tooltipPosition ? action.tooltipPosition : 'bottom'\r\n \"\r\n [disabled]=\"callDisabled(action, rowData)\"\r\n >\r\n <span class=\"material-symbols-outlined md-19\">\r\n {{ retornarCampo(action, rowData, \"icon\") }}</span\r\n >\r\n </button> -->\r\n\r\n <span\r\n class=\"material-symbols-outlined {{\r\n callDisabled(action, rowData)\r\n ? 'text-gray-400 cursor-auto'\r\n : 'cursor-pointer'\r\n }}\"\r\n style=\"font-size: 20px\"\r\n (click)=\"isButtonDisable(action, rowData, commandEvent)\"\r\n [pTooltip]=\"retornarCampo(action, rowData, 'tooltip')\"\r\n [tooltipPosition]=\"\r\n action.tooltipPosition ? action.tooltipPosition : 'bottom'\r\n \"\r\n >\r\n {{ retornarCampo(action, rowData, \"icon\") }}\r\n </span>\r\n </div>\r\n </div>\r\n <div\r\n class=\"flex flex-row justify-content-end w-full\"\r\n *ngIf=\"!acoesLinhaTabela\"\r\n >\r\n <!-- <button\r\n id=\"moreVertBtn\"\r\n pButton\r\n class=\"actionBtns p-button-text p-button-raised\"\r\n (click)=\"menu.toggle($event); activeItem(rowData)\"\r\n > -->\r\n <span\r\n class=\"material-symbols-outlined cursor-pointer icon-more-horiz\"\r\n style=\"font-size: 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 <!-- <div *ngFor=\"let action of config.actions\">\r\n {{ criarMenusModal(rowData) }}\r\n </div> -->\r\n\r\n <p-tieredMenu\r\n #menu\r\n [popup]=\"true\"\r\n [model]=\"menuItems\"\r\n appendTo=\"body\"\r\n ></p-tieredMenu>\r\n </div>\r\n </td>\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template\r\n pTemplate=\"emptymessage\"\r\n let-columns\r\n >\r\n <tr>\r\n <td\r\n [attr.colspan]=\"columns.length + 2\"\r\n style=\"text-align: center; border-radius: 10px !important\"\r\n >\r\n <p class=\"font-medium m-0\">Nenhum registro encontrado</p>\r\n </td>\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n</div>\r\n\r\n<link\r\n rel=\"stylesheet\"\r\n href=\"https://fonts.googleapis.com/icon?family=Material+Icons\"\r\n/>\r\n\r\n<link\r\n rel=\"stylesheet\"\r\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@48,400,0,0\"\r\n/>\r\n", styles: ["@charset \"UTF-8\";.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:19px}.material-symbols-outlined.md-22{font-size:22px}.checkbox-container{display:flex;align-items:center;gap:2px;margin-top:5px}#botaoFiltro:hover{color:#a9a9a9}.actionLoteBtns{align-items:center;background-color:transparent;color:#a9a9a9;display:flex;font-size:16px;width:2rem;height:2rem;top:2px;margin-left:.5rem;justify-content:center;text-decoration:none;text-align:justify;padding:12px}#actionLoteBtns:hover,.actionLoteBtns:hover{background-color:#29b92d!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:1;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-table{border-spacing:0px 2px}:host ::ng-deep .p-datatable-header{background-color:#eaeaea!important;padding:2px 13px 0!important;border-radius:5px!important}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-thead>tr>th{background-color:#eaeaea!important}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-thead>tr>th:first-of-type{border-radius:5px 0 0 5px}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-thead>tr>th:last-child{border-radius:0 5px 5px 0}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody>tr>td{border-bottom:1px solid #ddd!important;border-top:1px solid #ddd!important}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody>tr>td:first-of-type{border-left:solid 4px #5289B4!important;border-radius:10px 0 0 10px!important}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody>tr>td:last-child{border-radius:0 10px 10px 0!important;border-right:1px solid #ddd!important}:host ::ng-deep .actionBtns,:host ::ng-deep .actionLoteBtns{border-radius:50%;width:2.5rem!important;height:2.5rem!important;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}@media only screen and (min-width: 768px){.actionLoteBtns{top:-1px}}@media only screen and (max-width: 960px){.rowTable{text-align:right!important}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody>tr>td:has(p-tablecheckbox){border-bottom:0px!important}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody>tr>td:has(img){justify-content:center!important;align-items:center!important}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody>tr>td:has(img) .p-column-title{display:none!important}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody>tr>td:first-of-type{border-left:solid 4px #5289B4!important;border-top:1px solid #ddd!important}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody>tr>td:last-child{border-bottom:1px solid #ddd!important}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody>tr>td:last-child div{justify-content:center!important;align-items:center!important}:host ::ng-deep .p-datatable.p-datatable-sm .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-sm .p-datatable-thead>tr>th:last-of-type{border-radius:0 0 5px!important}::ng-deep .p-datatable.p-datatable-sm .p-datatable-thead>tr>th:first-of-type{border-radius:0 0 0 5px!important}\n"] }]
|
|
5314
|
+
args: [{ selector: 'kv-table', template: "<div>\r\n <p-panel\r\n *ngIf=\"filtrosAvancados\"\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 <i\r\n *ngIf=\"!collapsed\"\r\n class=\"pi pi-filter\"\r\n ></i>\r\n <!-- \u00CDcone quando o painel est\u00E1 aberto -->\r\n <i\r\n *ngIf=\"collapsed\"\r\n class=\"pi pi-minus\"\r\n ></i>\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 <p-table\r\n *ngIf=\"config\"\r\n #dt\r\n styleClass=\"p-datatable-sm\"\r\n [value]=\"dataSource\"\r\n [(selection)]=\"selectedItems\"\r\n [rowSelectable]=\"isRowSelectable\"\r\n [columns]=\"config.columns\"\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 [rowHover]=\"true\"\r\n [totalRecords]=\"totalRecords\"\r\n [lazy]=\"config.lazy\"\r\n (onLazyLoad)=\"paginate($event)\"\r\n (selectionChange)=\"selectionChange($event)\"\r\n rowGroupMode=\"rowspan\"\r\n [groupRowsBy]=\"config.fieldGroup\"\r\n [showFirstLastIcon]=\"showFirstLastIcon\"\r\n [pageLinks]=\"pageLinksOptions\"\r\n [responsive]=\"true\"\r\n [responsiveLayout]=\"responsiveLayout ? 'stack' : ''\"\r\n [scrollable]=\"isTableScrollable\"\r\n [scrollHeight]=\"scrollHeight\"\r\n [rowTrackBy]=\"rowTrackBy \"\r\n >\r\n <ng-template\r\n pTemplate=\"caption\"\r\n *ngIf=\"config.enableCation\"\r\n >\r\n <div class=\"flex flex-row flex-wrap justify-content-between align-items-center grid formgrid p-fluid col-12\">\r\n <div class=\"col-12 flex flex-column\">\r\n <div\r\n *ngIf=\"config.title\"\r\n class=\"text-md font-bold my-3\"\r\n >\r\n {{ config.title }}\r\n </div>\r\n <div\r\n *ngIf=\"config.subtitle\"\r\n class=\"text-sm mb-4 font-medium\"\r\n >\r\n {{ config.subtitle }}\r\n </div>\r\n </div>\r\n\r\n <div 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 \">\r\n <span\r\n *ngIf=\"config.enableFilter\"\r\n class=\"p-input-icon-left\"\r\n >\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(dt, $event)\"\r\n placeholder=\"Pesquisar...\"\r\n class=\"h-2rem\"\r\n />\r\n </span>\r\n\r\n <!-- <div\r\n #menuFiltroDiv\r\n id = \"menuFiltroDiv\"\r\n [style.visibility]=\"'hidden'\"\r\n class=\"absolute z-4 bg-gray-200\"\r\n (click)=\"onClickEvent($event)\"\r\n > -->\r\n\r\n <div\r\n #menuFiltroDiv\r\n id=\"menuFiltroDiv\"\r\n [style.visibility]=\"'hidden'\"\r\n class=\"absolute z-4 bg-gray-200 menu-columns-filtro\"\r\n >\r\n <p-card>\r\n <div\r\n class=\"flex flex-column text-medium w-15rem\"\r\n *ngFor=\"let col of columns\"\r\n >\r\n {{ checkMenuFiltro(col) }}\r\n <p-checkbox\r\n #filterColumns\r\n [label]=\"col.header\"\r\n [binary]=\"true\"\r\n class=\"checkbox-container\"\r\n (onChange)=\"dinamicColumnSet($event, col)\"\r\n [(ngModel)]=\"col.checked\"\r\n *ngIf=\"!dinamicDisableColumn(col)\"\r\n ></p-checkbox>\r\n </div>\r\n </p-card>\r\n </div>\r\n </div>\r\n\r\n <div class=\"flex flex-row col-1 justify-content-end\">\r\n <div\r\n *ngFor=\"let action of config.actionsLote; let i=index\"\r\n class=\"btns-options\"\r\n [style]=\"{ 'margin-right': '7px' }\"\r\n >\r\n <button\r\n id=\"actionLoteBtns\"\r\n pButton\r\n *ngIf=\"\r\n (selectedItems.length > 0 || action.showAcoesLote) &&\r\n exibirCampo(action, this.action)\r\n \"\r\n class=\"actionLoteBtns p-button-raised p-button-text\"\r\n (click)=\"\r\n action?.command(commandEvent); activeItemLote(selectedItems)\r\n \"\r\n [pTooltip]=\"retornarCampo(action, selectedItems, 'tooltip')\"\r\n [tooltipPosition]=\"retornarCampo(action, selectedItems, 'tooltip').length > 7 && config.actionsLote && i == config.actionsLote.length - 1 ? 'left' : 'bottom'\" \r\n [style.backgroundColor]=\"\r\n retornarCampo(action, selectedItems, 'btnColor')\r\n \"\r\n [disabled]=\"retornarCampo(action, selectedItems, 'disabled')\"\r\n >\r\n <span\r\n class=\"material-symbols-outlined md-22\"\r\n [style.color]=\"\r\n retornarCampo(action, selectedItems, 'iconBtnColor')\r\n \"\r\n >\r\n {{ retornarCampo(action, selectedItems, \"icon\") }}\r\n </span>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template\r\n pTemplate=\"header\"\r\n let-columns\r\n >\r\n <tr>\r\n <th\r\n style=\"width: 4rem; border-left: solid 4px transparent\"\r\n *ngIf=\"config.enableSelect\"\r\n >\r\n <p-tableHeaderCheckbox (click)=\"activeItemLote(selectedItems)\"></p-tableHeaderCheckbox>\r\n </th>\r\n\r\n <th\r\n *ngFor=\"let col of columns\"\r\n [pSortableColumn]=\"col.field\"\r\n [pSortableColumnDisabled]=\"col.sortable === false\"\r\n [style.width]=\"col.width\"\r\n class=\"text-sm\"\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 <p-sortIcon\r\n *ngIf=\"col.sortable === true\"\r\n [field]=\"col.field\"\r\n style=\"font-size: 10px\"\r\n ></p-sortIcon>\r\n\r\n <span\r\n *ngIf=\"col.headerTooltip\"\r\n class=\"material-symbols-outlined flex align-items-center\"\r\n [pTooltip]=\"col.headerTooltip\"\r\n >info</span>\r\n </div>\r\n </th>\r\n <th *ngIf=\"config.actions && config.actions.length > 0\"></th>\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template\r\n pTemplate=\"body\"\r\n let-rowData\r\n let-columns=\"columns\"\r\n let-rowgroup=\"rowgroup\"\r\n let-rowspan=\"rowspan\"\r\n >\r\n <tr (dblclick)=\"doubleClick($event, rowData)\" [ngClass]=\"{ 'capitalize': tableCaptalized }\">\r\n <td\r\n *ngIf=\"config.enableSelect\"\r\n [style]=\"applyStyle(rowData, { field: 'check-box', header: '' })\"\r\n >\r\n <!--<p-tableCheckbox *ngIf=\"isVisibleCheckbox(rowData)\"-->\r\n <p-tableCheckbox\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 <ng-container *ngFor=\"let col of columns\">\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 *ngIf=\"\r\n !isChipField(col) && !col.iconField && !isImageField(col)\r\n \">\r\n <i\r\n *ngIf=\"col.icon\"\r\n [class]=\"col.icon + ' mr-2'\"\r\n ></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 </div>\r\n </span>\r\n\r\n <span *ngIf=\"isImageField(col)\">\r\n <span>\r\n <img\r\n class=\"image\"\r\n [src]=\"loadImage(rowData, col)\"\r\n />\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\r\n </ng-template>\r\n </td>\r\n\r\n <td\r\n *ngIf=\"!rowgroup && !col.grouped && !col.template\"\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 *ngIf=\"\r\n !isChipField(col) && !col.iconField && !isImageField(col)\r\n \">\r\n <i\r\n *ngIf=\"col.icon\"\r\n [class]=\"col.icon + ' mr-2'\"\r\n ></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 </div>\r\n </span>\r\n\r\n\r\n <span *ngIf=\"isImageField(col)\">\r\n <span>\r\n <img\r\n class=\"image\"\r\n [src]=\"loadImage(rowData, col)\"\r\n />\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\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\r\n\r\n </ng-template>\r\n </td>\r\n\r\n <td\r\n *ngIf=\"col.template\"\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\r\n\r\n\r\n </ng-container>\r\n\r\n <td\r\n *ngIf=\"config.actions && config.actions.length > 0\"\r\n [style]=\"applyStyle(rowData, { field: 'btns-options', header: '' })\"\r\n >\r\n <div\r\n class=\"flex flex-row justify-content-end w-full gap-1\"\r\n *ngIf=\"acoesLinhaTabela\"\r\n >\r\n <div\r\n *ngFor=\"let action of config.actions\"\r\n class=\"mr-1\"\r\n >\r\n <!-- <button\r\n id=\"actionBtns\"\r\n pButton\r\n *ngIf=\"exibirCampo(action, rowData)\"\r\n class=\"actionBtns p-button-text p-button-raised\"\r\n (click)=\"activeItem(rowData); action?.command(commandEvent)\"\r\n [pTooltip]=\"retornarCampo(action, rowData, 'tooltip')\"\r\n [tooltipPosition]=\"\r\n action.tooltipPosition ? action.tooltipPosition : 'bottom'\r\n \"\r\n [disabled]=\"callDisabled(action, rowData)\"\r\n >\r\n <span class=\"material-symbols-outlined md-19\">\r\n {{ retornarCampo(action, rowData, \"icon\") }}</span\r\n >\r\n </button> -->\r\n\r\n <span\r\n class=\"material-symbols-outlined {{\r\n callDisabled(action, rowData)\r\n ? 'text-gray-400 cursor-auto'\r\n : 'cursor-pointer'\r\n }}\"\r\n style=\"font-size: 20px\"\r\n (click)=\"isButtonDisable(action, rowData, commandEvent)\"\r\n [pTooltip]=\"retornarCampo(action, rowData, 'tooltip')\"\r\n [tooltipPosition]=\"\r\n action.tooltipPosition ? action.tooltipPosition : 'bottom'\r\n \"\r\n >\r\n {{ retornarCampo(action, rowData, \"icon\") }}\r\n </span>\r\n </div>\r\n </div>\r\n <div\r\n class=\"flex flex-row justify-content-end w-full\"\r\n *ngIf=\"!acoesLinhaTabela\"\r\n >\r\n <!-- <button\r\n id=\"moreVertBtn\"\r\n pButton\r\n class=\"actionBtns p-button-text p-button-raised\"\r\n (click)=\"menu.toggle($event); activeItem(rowData)\"\r\n > -->\r\n <span\r\n class=\"material-symbols-outlined cursor-pointer icon-more-horiz\"\r\n style=\"font-size: 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 <!-- <div *ngFor=\"let action of config.actions\">\r\n {{ criarMenusModal(rowData) }}\r\n </div> -->\r\n\r\n <p-tieredMenu\r\n #menu\r\n [popup]=\"true\"\r\n [model]=\"menuItems\"\r\n appendTo=\"body\"\r\n ></p-tieredMenu>\r\n </div>\r\n </td>\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template\r\n pTemplate=\"emptymessage\"\r\n let-columns\r\n >\r\n <tr>\r\n <td\r\n [attr.colspan]=\"columns.length + 2\"\r\n style=\"text-align: center; border-radius: 10px !important\"\r\n >\r\n <p class=\"font-medium m-0\">Nenhum registro encontrado</p>\r\n </td>\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n</div>\r\n\r\n<link\r\n rel=\"stylesheet\"\r\n href=\"https://fonts.googleapis.com/icon?family=Material+Icons\"\r\n/>\r\n\r\n<link\r\n rel=\"stylesheet\"\r\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@48,400,0,0\"\r\n/>\r\n", styles: ["@charset \"UTF-8\";.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:19px}.material-symbols-outlined.md-22{font-size:22px}.checkbox-container{display:flex;align-items:center;gap:2px;margin-top:5px}#botaoFiltro:hover{color:#a9a9a9}.actionLoteBtns{align-items:center;background-color:transparent;color:#a9a9a9;display:flex;font-size:16px;width:2rem;height:2rem;top:2px;margin-left:.5rem;justify-content:center;text-decoration:none;text-align:justify;padding:12px}#actionLoteBtns:hover,.actionLoteBtns:hover{background-color:#29b92d!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:1;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-table{border-spacing:0px 2px}:host ::ng-deep .p-datatable-header{background-color:#eaeaea!important;padding:2px 13px 0!important;border-radius:5px!important}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-thead>tr>th{background-color:#eaeaea!important}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-thead>tr>th:first-of-type{border-radius:5px 0 0 5px}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-thead>tr>th:last-child{border-radius:0 5px 5px 0}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody>tr>td{border-bottom:1px solid #ddd!important;border-top:1px solid #ddd!important}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody>tr>td:first-of-type{border-left:solid 4px #5289B4!important;border-radius:10px 0 0 10px!important}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody>tr>td:last-child{border-radius:0 10px 10px 0!important;border-right:1px solid #ddd!important}:host ::ng-deep .actionBtns,:host ::ng-deep .actionLoteBtns{border-radius:50%;width:2.5rem!important;height:2.5rem!important;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}@media only screen and (min-width: 768px){.actionLoteBtns{top:-1px}}@media only screen and (max-width: 960px){.rowTable{text-align:right!important}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody>tr>td:has(p-tablecheckbox){border-bottom:0px!important}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody>tr>td:has(img){justify-content:center!important;align-items:center!important}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody>tr>td:has(img) .p-column-title{display:none!important}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody>tr>td:first-of-type{border-left:solid 4px #5289B4!important;border-top:1px solid #ddd!important}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody>tr>td:last-child{border-bottom:1px solid #ddd!important}:host ::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody>tr>td:last-child div{justify-content:center!important;align-items:center!important}:host ::ng-deep .p-datatable.p-datatable-sm .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-sm .p-datatable-thead>tr>th:last-of-type{border-radius:0 0 5px!important}::ng-deep .p-datatable.p-datatable-sm .p-datatable-thead>tr>th:first-of-type{border-radius:0 0 0 5px!important}\n"] }]
|
|
5287
5315
|
}], ctorParameters: () => [{ type: i1.DatePipe }, { type: i1.DecimalPipe }, { type: CpfCnpjPipe }, { type: TelefonePipe }], propDecorators: { templates: [{
|
|
5288
5316
|
type: ContentChildren,
|
|
5289
5317
|
args: [TemplateDirective]
|
|
@@ -5690,84 +5718,50 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImpor
|
|
|
5690
5718
|
|
|
5691
5719
|
class WorkspaceComponent {
|
|
5692
5720
|
constructor() {
|
|
5693
|
-
|
|
5721
|
+
/**
|
|
5722
|
+
* Nome do usuário logado
|
|
5723
|
+
*/
|
|
5694
5724
|
this.nomeUsuario = 'Nome do Usuário Logado';
|
|
5695
|
-
|
|
5725
|
+
/**
|
|
5726
|
+
* Selecionar apenas master
|
|
5727
|
+
*/
|
|
5728
|
+
this.somenteMaster = false;
|
|
5729
|
+
/**
|
|
5730
|
+
* Evento de master selecionada
|
|
5731
|
+
*/
|
|
5696
5732
|
this.onGetMasterSelecionada = new EventEmitter();
|
|
5733
|
+
/**
|
|
5734
|
+
* Evento de empresa selecionada
|
|
5735
|
+
*/
|
|
5697
5736
|
this.onGetEmpresaSelecionada = new EventEmitter();
|
|
5737
|
+
this.totalRecordsEmpresa = 0;
|
|
5738
|
+
this.showPaginatorEmpresa = false;
|
|
5698
5739
|
this.visivel = true;
|
|
5699
5740
|
this.txtPesquisa = '';
|
|
5700
5741
|
this.imgPersonagens = '';
|
|
5701
5742
|
this.imgLogoKeevo = '';
|
|
5702
5743
|
this.styleBackground = '';
|
|
5703
5744
|
this.imgLogoKeevoCenter = '';
|
|
5704
|
-
|
|
5745
|
+
//Tabela Master
|
|
5705
5746
|
this.dataSourceMaster = [];
|
|
5706
|
-
this.
|
|
5747
|
+
this.tableSizeMaster = 5;
|
|
5748
|
+
//Tabela Empresa
|
|
5707
5749
|
this.dataSourceEmpresa = [];
|
|
5750
|
+
this.tableSizeEmpresa = 5;
|
|
5708
5751
|
}
|
|
5709
|
-
|
|
5710
|
-
this.
|
|
5711
|
-
this.imgLogoKeevo = ImagensService.getLogoKeevo();
|
|
5712
|
-
this.imgLogoKeevoCenter = ImagensService.getLogoKeevoCenter();
|
|
5713
|
-
this.styleBackground =
|
|
5714
|
-
'background-image: url(' + ImagensService.getBackgroundWorkSpace() + ');';
|
|
5715
|
-
this.columnConfigTableMaster();
|
|
5716
|
-
this.verificaMasterUnica();
|
|
5717
|
-
}
|
|
5718
|
-
verificaMasterUnica() {
|
|
5719
|
-
if (this.masters.length == 1)
|
|
5720
|
-
this.selecionarMaster(this.masters[0]);
|
|
5721
|
-
}
|
|
5722
|
-
selecionarMaster(master) {
|
|
5723
|
-
this.onGetMasterSelecionada.emit(master);
|
|
5724
|
-
this.masterSelecionada = master;
|
|
5725
|
-
if (this.somenteMaster)
|
|
5726
|
-
this.visivel = false;
|
|
5727
|
-
else {
|
|
5728
|
-
this.empresas = master.empresas;
|
|
5729
|
-
this.columnConfigTableEmpresa();
|
|
5730
|
-
this.verificaEmpresaUnica();
|
|
5731
|
-
}
|
|
5732
|
-
}
|
|
5733
|
-
verificaEmpresaUnica() {
|
|
5734
|
-
if (this.empresas && this.empresas.length == 1)
|
|
5735
|
-
this.selecionarEmpresa(this.empresas[0]);
|
|
5736
|
-
}
|
|
5737
|
-
selecionarEmpresa(empresa) {
|
|
5738
|
-
this.onGetEmpresaSelecionada.emit(empresa);
|
|
5739
|
-
this.empresaSelecionada = empresa;
|
|
5740
|
-
this.visivel = false;
|
|
5741
|
-
}
|
|
5742
|
-
voltar() {
|
|
5743
|
-
this.empresaSelecionada = undefined;
|
|
5744
|
-
this.masterSelecionada = undefined;
|
|
5752
|
+
activeItemEmpresa(e) {
|
|
5753
|
+
this.selectedItemEmpresa = e;
|
|
5745
5754
|
}
|
|
5746
|
-
|
|
5747
|
-
this.
|
|
5755
|
+
activeItemMaster(e) {
|
|
5756
|
+
this.selectedItemMaster = e;
|
|
5748
5757
|
}
|
|
5749
|
-
//------------------MASTER------------------------
|
|
5750
5758
|
columnConfigTableMaster() {
|
|
5751
5759
|
this.dataSourceMaster = this.masters;
|
|
5752
5760
|
this.tableConfigMaster = {
|
|
5753
5761
|
lazy: false,
|
|
5754
5762
|
columns: [
|
|
5755
|
-
{
|
|
5756
|
-
|
|
5757
|
-
field: 'idmaster',
|
|
5758
|
-
header: 'Licença',
|
|
5759
|
-
width: '',
|
|
5760
|
-
centralize: false,
|
|
5761
|
-
sortable: false,
|
|
5762
|
-
},
|
|
5763
|
-
{
|
|
5764
|
-
position: 1,
|
|
5765
|
-
field: 'razaosocial',
|
|
5766
|
-
header: '',
|
|
5767
|
-
width: '80%',
|
|
5768
|
-
centralize: false,
|
|
5769
|
-
sortable: false,
|
|
5770
|
-
},
|
|
5763
|
+
{ position: 0, field: 'idmaster', header: 'Licença', width: '', centralize: false, sortable: false },
|
|
5764
|
+
{ position: 1, field: 'nome', header: '', width: '80%', centralize: false, sortable: false, },
|
|
5771
5765
|
],
|
|
5772
5766
|
actions: [
|
|
5773
5767
|
{
|
|
@@ -5788,35 +5782,14 @@ class WorkspaceComponent {
|
|
|
5788
5782
|
enableSelect: false,
|
|
5789
5783
|
};
|
|
5790
5784
|
}
|
|
5791
|
-
activeItemMaster(e) {
|
|
5792
|
-
this.selectedItemMaster = e;
|
|
5793
|
-
}
|
|
5794
|
-
doubleClickMaster(e) {
|
|
5795
|
-
this.selectedItemMaster = e.rowData;
|
|
5796
|
-
this.selecionarMaster(e.rowData);
|
|
5797
|
-
}
|
|
5798
|
-
//------------------Empresa------------------------
|
|
5799
5785
|
columnConfigTableEmpresa() {
|
|
5800
5786
|
this.dataSourceEmpresa = this.empresas;
|
|
5801
5787
|
this.tableConfigEmpresa = {
|
|
5802
5788
|
lazy: false,
|
|
5803
5789
|
columns: [
|
|
5804
|
-
{
|
|
5805
|
-
|
|
5806
|
-
|
|
5807
|
-
header: 'Empresa',
|
|
5808
|
-
width: '',
|
|
5809
|
-
centralize: false,
|
|
5810
|
-
sortable: false,
|
|
5811
|
-
},
|
|
5812
|
-
{
|
|
5813
|
-
position: 1,
|
|
5814
|
-
field: 'nomeempresa',
|
|
5815
|
-
header: '',
|
|
5816
|
-
width: '80%',
|
|
5817
|
-
centralize: false,
|
|
5818
|
-
sortable: false,
|
|
5819
|
-
},
|
|
5790
|
+
{ position: 0, field: 'codigopessoa', header: 'Código', width: '', centralize: false, sortable: false },
|
|
5791
|
+
{ position: 1, field: 'cpfcnpj', header: 'CPF/CNPJ', width: '', centralize: false, sortable: false, pipe: 'cpfcnpj' },
|
|
5792
|
+
{ position: 2, field: 'razaosocial', header: 'Razão social', width: '50%', centralize: false, sortable: false },
|
|
5820
5793
|
],
|
|
5821
5794
|
actions: [
|
|
5822
5795
|
{
|
|
@@ -5826,6 +5799,9 @@ class WorkspaceComponent {
|
|
|
5826
5799
|
command: () => {
|
|
5827
5800
|
this.selecionarEmpresa(this.selectedItemEmpresa);
|
|
5828
5801
|
},
|
|
5802
|
+
disabled: () => {
|
|
5803
|
+
return false;
|
|
5804
|
+
},
|
|
5829
5805
|
},
|
|
5830
5806
|
],
|
|
5831
5807
|
actionsLote: [],
|
|
@@ -5834,25 +5810,66 @@ class WorkspaceComponent {
|
|
|
5834
5810
|
enableSelect: false,
|
|
5835
5811
|
};
|
|
5836
5812
|
}
|
|
5837
|
-
activeItemEmpresa(e) {
|
|
5838
|
-
this.selectedItemEmpresa = e;
|
|
5839
|
-
}
|
|
5840
5813
|
doubleClickEmpresa(e) {
|
|
5841
5814
|
this.selectedItemEmpresa = e.rowData;
|
|
5842
5815
|
this.selecionarEmpresa(e.rowData);
|
|
5843
5816
|
}
|
|
5817
|
+
doubleClickMaster(e) {
|
|
5818
|
+
this.selectedItemMaster = e.rowData;
|
|
5819
|
+
this.selecionarMaster(e.rowData);
|
|
5820
|
+
}
|
|
5821
|
+
filtrarEmpresa(event) {
|
|
5822
|
+
this.empresas = this.masterSelecionada.empresas.filter((e) => e.nomeempresa.toLowerCase().includes(event.toLowerCase()));
|
|
5823
|
+
}
|
|
5824
|
+
ngOnInit() {
|
|
5825
|
+
this.imgPersonagens = ImagensService.getPersonagensWorkSpace();
|
|
5826
|
+
this.imgLogoKeevo = ImagensService.getLogoKeevo();
|
|
5827
|
+
this.imgLogoKeevoCenter = ImagensService.getLogoKeevoCenter();
|
|
5828
|
+
this.styleBackground = 'background-image: url(' + ImagensService.getBackgroundWorkSpace() + ');';
|
|
5829
|
+
this.columnConfigTableMaster();
|
|
5830
|
+
this.verificaMasterUnica();
|
|
5831
|
+
}
|
|
5832
|
+
selecionarEmpresa(empresa) {
|
|
5833
|
+
this.onGetEmpresaSelecionada.emit(empresa);
|
|
5834
|
+
this.empresaSelecionada = empresa;
|
|
5835
|
+
this.visivel = false;
|
|
5836
|
+
}
|
|
5837
|
+
selecionarMaster(master) {
|
|
5838
|
+
this.onGetMasterSelecionada.emit(master);
|
|
5839
|
+
this.masterSelecionada = master;
|
|
5840
|
+
if (this.somenteMaster)
|
|
5841
|
+
this.visivel = false;
|
|
5842
|
+
else {
|
|
5843
|
+
this.empresas = master.empresas;
|
|
5844
|
+
this.showPaginatorEmpresa = (this.empresas.length > 5);
|
|
5845
|
+
this.columnConfigTableEmpresa();
|
|
5846
|
+
this.verificaEmpresaUnica();
|
|
5847
|
+
}
|
|
5848
|
+
}
|
|
5849
|
+
verificaEmpresaUnica() {
|
|
5850
|
+
if (this.empresas && this.empresas.length == 1)
|
|
5851
|
+
this.selecionarEmpresa(this.empresas[0]);
|
|
5852
|
+
}
|
|
5853
|
+
verificaMasterUnica() {
|
|
5854
|
+
if (this.masters.length == 1)
|
|
5855
|
+
this.selecionarMaster(this.masters[0]);
|
|
5856
|
+
}
|
|
5857
|
+
voltar() {
|
|
5858
|
+
this.empresaSelecionada = undefined;
|
|
5859
|
+
this.masterSelecionada = undefined;
|
|
5860
|
+
}
|
|
5844
5861
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: WorkspaceComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5845
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.8", type: WorkspaceComponent, selector: "kv-workspace", inputs: {
|
|
5862
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.8", type: WorkspaceComponent, selector: "kv-workspace", inputs: { nomeUsuario: "nomeUsuario", masters: "masters", masterSelecionada: "masterSelecionada", somenteMaster: "somenteMaster" }, outputs: { onGetMasterSelecionada: "onGetMasterSelecionada", onGetEmpresaSelecionada: "onGetEmpresaSelecionada" }, ngImport: i0, template: "<div *ngIf=\"visivel\" [style]=\"styleBackground\"\r\n class=\"h-screen flex justify-content-center align-items-center login-container flex-column bg-cover\">\r\n <div id=\"card-container\"\r\n class=\"flex flex-column justify-content-around card-login formgrid p-fluid bg-white border-round p-2\">\r\n <div class=\"field col-12 flex justify-content-center mb-1\">\r\n <img [src]=\"imgLogoKeevoCenter\" style=\"width: 200px\" />\r\n </div>\r\n\r\n <div class=\"col-12 align-items-center z-5\">\r\n <div class=\"col-9\">\r\n Ol\u00E1, <b>{{ nomeUsuario }}.</b> Bem vindo(a)!\r\n </div>\r\n <b class=\"field col-9 flex\">\r\n Escolha qual Workspace voc\u00EA deseja acessar:</b>\r\n </div>\r\n\r\n <!-- IN\u00CDCIO DO WORKSPACE DE CONTABILIDADE (MASTERS) -->\r\n <div *ngIf=\"!masterSelecionada\" class=\"col-12 z-5\">\r\n\r\n <kv-table\r\n [tableSize]=\"tableSizeMaster\"\r\n [rows]=\"5\"\r\n [config]=\"tableConfigMaster\"\r\n [paginator]=\"false\"\r\n [dataSource]=\"dataSourceMaster\"\r\n [rowsPerPageOptions]=\"[5, 10, 25, 50, 100, 200]\"\r\n [acoesLinhaTabela]=\"true\"\r\n (doubleClickEvent)=\"doubleClickMaster($event)\"\r\n (onActiveItem)=\"activeItemMaster($event)\"\r\n [isTableScrollable]=\"true\"\r\n [scrollHeight]=\"'300px'\">\r\n </kv-table>\r\n\r\n </div>\r\n <!-- FIM DO WORKSPACE DE CONTABILIDADE (MASTERS) -->\r\n\r\n <!-- IN\u00CDCIO DO WORKSPACE EMPRESA -->\r\n <div *ngIf=\"masterSelecionada && !empresaSelecionada\" class=\"col-12 z-5\">\r\n <kv-table\r\n [tableSize]=\"tableSizeEmpresa\"\r\n [rows]=\"5\"\r\n [config]=\"tableConfigEmpresa\"\r\n [paginator]=\"showPaginatorEmpresa\"\r\n [dataSource]=\"dataSourceEmpresa\"\r\n [rowsPerPageOptions]=\"[5]\"\r\n [acoesLinhaTabela]=\"true\"\r\n (doubleClickEvent)=\"doubleClickEmpresa($event)\"\r\n (onActiveItem)=\"activeItemEmpresa($event)\"\r\n [isTableScrollable]=\"true\"\r\n [scrollHeight]=\"'300px'\">\r\n </kv-table>\r\n </div>\r\n <!-- FIM DO WORKSPACE EMPRESA -->\r\n </div>\r\n</div>\r\n", styles: [".card-login{width:80%;max-width:800px}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: KvTableComponent, selector: "kv-table", inputs: ["templates", "config", "defaultSortField", "dataSource", "selectedItems", "totalRecords", "paginator", "rowsPerPageOptions", "rows", "pageLinksOptions", "showFirstLastIcon", "tableSize", "applyStyle", "acoesLinhaTabela", "filterColumnsBtn", "filtrosAvancados", "scrollHeight", "isTableScrollable", "tableCaptalized", "rowTrackBy", "responsiveLayout"], outputs: ["onActiveItem", "onActiveItemLote", "onPaginate", "onSelectionChange", "doubleClickEvent", "filterField", "filtrosAvancadosEmit", "onSwitchTableChange"] }] }); }
|
|
5846
5863
|
}
|
|
5847
5864
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: WorkspaceComponent, decorators: [{
|
|
5848
5865
|
type: Component,
|
|
5849
|
-
args: [{ selector: 'kv-workspace', template: "<div *ngIf=\"visivel\" [style]=\"styleBackground\"\r\n class=\"h-screen flex justify-content-center align-items-center login-container flex-column bg-cover\">\r\n <div id=\"card-container\"\r\n class=\"flex flex-column justify-content-around card-login formgrid p-fluid bg-white border-round p-2\">\r\n <div class=\"field col-12 flex justify-content-center mb-1\">\r\n <img [src]=\"imgLogoKeevoCenter\" style=\"width: 200px\" />\r\n </div>\r\n\r\n <div class=\"col-12 align-items-center z-5\">\r\n <div class=\"col-9\">\r\n Ol\u00E1, <b>{{ nomeUsuario }}.</b> Bem vindo(a)!\r\n </div>\r\n <b class=\"field col-9 flex\">\r\n Escolha qual Workspace voc\u00EA deseja acessar:</b>\r\n </div>\r\n\r\n <!-- IN\u00CDCIO DO WORKSPACE DE CONTABILIDADE (MASTERS) -->\r\n <div *ngIf=\"!masterSelecionada\" class=\"col-12 z-5\">\r\n
|
|
5850
|
-
}], ctorParameters: () => [], propDecorators: {
|
|
5851
|
-
type: Input
|
|
5852
|
-
}], nomeUsuario: [{
|
|
5866
|
+
args: [{ selector: 'kv-workspace', template: "<div *ngIf=\"visivel\" [style]=\"styleBackground\"\r\n class=\"h-screen flex justify-content-center align-items-center login-container flex-column bg-cover\">\r\n <div id=\"card-container\"\r\n class=\"flex flex-column justify-content-around card-login formgrid p-fluid bg-white border-round p-2\">\r\n <div class=\"field col-12 flex justify-content-center mb-1\">\r\n <img [src]=\"imgLogoKeevoCenter\" style=\"width: 200px\" />\r\n </div>\r\n\r\n <div class=\"col-12 align-items-center z-5\">\r\n <div class=\"col-9\">\r\n Ol\u00E1, <b>{{ nomeUsuario }}.</b> Bem vindo(a)!\r\n </div>\r\n <b class=\"field col-9 flex\">\r\n Escolha qual Workspace voc\u00EA deseja acessar:</b>\r\n </div>\r\n\r\n <!-- IN\u00CDCIO DO WORKSPACE DE CONTABILIDADE (MASTERS) -->\r\n <div *ngIf=\"!masterSelecionada\" class=\"col-12 z-5\">\r\n\r\n <kv-table\r\n [tableSize]=\"tableSizeMaster\"\r\n [rows]=\"5\"\r\n [config]=\"tableConfigMaster\"\r\n [paginator]=\"false\"\r\n [dataSource]=\"dataSourceMaster\"\r\n [rowsPerPageOptions]=\"[5, 10, 25, 50, 100, 200]\"\r\n [acoesLinhaTabela]=\"true\"\r\n (doubleClickEvent)=\"doubleClickMaster($event)\"\r\n (onActiveItem)=\"activeItemMaster($event)\"\r\n [isTableScrollable]=\"true\"\r\n [scrollHeight]=\"'300px'\">\r\n </kv-table>\r\n\r\n </div>\r\n <!-- FIM DO WORKSPACE DE CONTABILIDADE (MASTERS) -->\r\n\r\n <!-- IN\u00CDCIO DO WORKSPACE EMPRESA -->\r\n <div *ngIf=\"masterSelecionada && !empresaSelecionada\" class=\"col-12 z-5\">\r\n <kv-table\r\n [tableSize]=\"tableSizeEmpresa\"\r\n [rows]=\"5\"\r\n [config]=\"tableConfigEmpresa\"\r\n [paginator]=\"showPaginatorEmpresa\"\r\n [dataSource]=\"dataSourceEmpresa\"\r\n [rowsPerPageOptions]=\"[5]\"\r\n [acoesLinhaTabela]=\"true\"\r\n (doubleClickEvent)=\"doubleClickEmpresa($event)\"\r\n (onActiveItem)=\"activeItemEmpresa($event)\"\r\n [isTableScrollable]=\"true\"\r\n [scrollHeight]=\"'300px'\">\r\n </kv-table>\r\n </div>\r\n <!-- FIM DO WORKSPACE EMPRESA -->\r\n </div>\r\n</div>\r\n", styles: [".card-login{width:80%;max-width:800px}\n"] }]
|
|
5867
|
+
}], ctorParameters: () => [], propDecorators: { nomeUsuario: [{
|
|
5853
5868
|
type: Input
|
|
5854
5869
|
}], masters: [{
|
|
5855
5870
|
type: Input
|
|
5871
|
+
}], masterSelecionada: [{
|
|
5872
|
+
type: Input
|
|
5856
5873
|
}], somenteMaster: [{
|
|
5857
5874
|
type: Input
|
|
5858
5875
|
}], onGetMasterSelecionada: [{
|
|
@@ -6030,15 +6047,17 @@ class KvImageUploadComponent {
|
|
|
6030
6047
|
this.fileSrc = null;
|
|
6031
6048
|
}
|
|
6032
6049
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvImageUploadComponent, deps: [{ token: NotificationService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
6033
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.8", type: KvImageUploadComponent, selector: "kv-image-upload", inputs: { widthComponent: "widthComponent", heigthComponent: "heigthComponent" }, outputs: { fileEmit: "fileEmit" }, ngImport: i0, template: "<div\r\n (dragover)=\"onDragOver($event)\"\r\n (dragleave)=\"onDragLeave($event)\"\r\n (drop)=\"onDrop($event)\"\r\n class=\"border-dashed border-2 border-round-lg border-gray-400 flex justify-content-end\"\r\n [style.width]=\"widthComponent\"\r\n [style.height]=\"heigthComponent\"\r\n>\r\n @if(file) {\r\n <button\r\n pButton\r\n (click)=\"deleteImage()\"\r\n class=\"fixed 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 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=\"!file\"\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 <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 </div>\r\n <div *ngIf=\"file\">\r\n <img\r\n [src]=\"fileSrc\"\r\n [alt]=\"file.name\"\r\n class=\"w-full\"\r\n >\r\n </div>\r\n </div>\r\n\r\n</div>", 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"] }] }); }
|
|
6050
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.8", type: KvImageUploadComponent, selector: "kv-image-upload", inputs: { widthComponent: "widthComponent", heigthComponent: "heigthComponent", description: "description" }, outputs: { fileEmit: "fileEmit" }, ngImport: i0, template: "<div\r\n (dragover)=\"onDragOver($event)\"\r\n (dragleave)=\"onDragLeave($event)\"\r\n (drop)=\"onDrop($event)\"\r\n class=\"border-dashed border-2 border-round-lg border-gray-400 flex justify-content-end\"\r\n [style.width]=\"widthComponent\"\r\n [style.height]=\"heigthComponent\"\r\n>\r\n @if(file) {\r\n <button\r\n pButton\r\n (click)=\"deleteImage()\"\r\n class=\"fixed 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 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=\"!file\"\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=\"file\">\r\n <img\r\n [src]=\"fileSrc\"\r\n [alt]=\"file.name\"\r\n class=\"w-full\"\r\n >\r\n </div>\r\n </div>\r\n\r\n</div>", 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"] }] }); }
|
|
6034
6051
|
}
|
|
6035
6052
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvImageUploadComponent, decorators: [{
|
|
6036
6053
|
type: Component,
|
|
6037
|
-
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=\"border-dashed border-2 border-round-lg border-gray-400 flex justify-content-end\"\r\n [style.width]=\"widthComponent\"\r\n [style.height]=\"heigthComponent\"\r\n>\r\n @if(file) {\r\n <button\r\n pButton\r\n (click)=\"deleteImage()\"\r\n class=\"fixed 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 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=\"!file\"\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 <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 </div>\r\n <div *ngIf=\"file\">\r\n <img\r\n [src]=\"fileSrc\"\r\n [alt]=\"file.name\"\r\n class=\"w-full\"\r\n >\r\n </div>\r\n </div>\r\n\r\n</div>" }]
|
|
6054
|
+
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=\"border-dashed border-2 border-round-lg border-gray-400 flex justify-content-end\"\r\n [style.width]=\"widthComponent\"\r\n [style.height]=\"heigthComponent\"\r\n>\r\n @if(file) {\r\n <button\r\n pButton\r\n (click)=\"deleteImage()\"\r\n class=\"fixed 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 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=\"!file\"\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=\"file\">\r\n <img\r\n [src]=\"fileSrc\"\r\n [alt]=\"file.name\"\r\n class=\"w-full\"\r\n >\r\n </div>\r\n </div>\r\n\r\n</div>" }]
|
|
6038
6055
|
}], ctorParameters: () => [{ type: NotificationService }], propDecorators: { widthComponent: [{
|
|
6039
6056
|
type: Input
|
|
6040
6057
|
}], heigthComponent: [{
|
|
6041
6058
|
type: Input
|
|
6059
|
+
}], description: [{
|
|
6060
|
+
type: Input
|
|
6042
6061
|
}], fileEmit: [{
|
|
6043
6062
|
type: Output
|
|
6044
6063
|
}] } });
|