lib-portal-angular 0.0.100 → 0.0.102
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/image-upload/image-upload.component.mjs +5 -3
- package/esm2022/lib/components/tables/data-table.component.mjs +33 -16
- package/fesm2022/lib-portal-angular.mjs +65 -47
- package/fesm2022/lib-portal-angular.mjs.map +1 -1
- package/lib/components/image-upload/image-upload.component.d.ts +1 -1
- package/lib/components/tables/data-table.component.d.ts +11 -4
- package/package.json +1 -1
@@ -2313,12 +2313,14 @@ class ImageUploadComponent {
|
|
2313
2313
|
}
|
2314
2314
|
}
|
2315
2315
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ImageUploadComponent, deps: [{ token: AuthService }], target: i0.ɵɵFactoryTarget.Component }); }
|
2316
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ImageUploadComponent, selector: "argenta-image-upload", inputs: { permissions: "permissions" }, outputs: { base64Output: "base64Output" }, ngImport: i0, template: "<div *ngIf=\"hasPermission()\" class=\"image-uploader\">\n <div *ngIf=\"imagePreview\">\n <img [src]=\"imagePreview\" />\n </div>\n <input type=\"file\" (change)=\"onFileSelected($event)\" accept=\"image/*\" />\n </div>\n ", styles: [".image-uploader{display:flex;flex-direction:column;align-items:center;gap:10px}.image-uploader input{border:1px solid #ccc;padding:8px;cursor:pointer}.image-uploader img{max-width:300px;max-height:300px;border-radius:10px;box-shadow:0 0 10px #0000001a}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
|
2316
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ImageUploadComponent, selector: "argenta-image-upload", inputs: { imagePreview: "imagePreview", permissions: "permissions" }, outputs: { base64Output: "base64Output" }, ngImport: i0, template: "<div *ngIf=\"hasPermission()\" class=\"image-uploader\">\n <div *ngIf=\"imagePreview\">\n <img [src]=\"imagePreview\" />\n </div>\n <input type=\"file\" (change)=\"onFileSelected($event)\" accept=\"image/*\" />\n </div>\n ", styles: [".image-uploader{display:flex;flex-direction:column;align-items:center;gap:10px}.image-uploader input{border:1px solid #ccc;padding:8px;cursor:pointer}.image-uploader img{max-width:300px;max-height:300px;border-radius:10px;box-shadow:0 0 10px #0000001a}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
|
2317
2317
|
}
|
2318
2318
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ImageUploadComponent, decorators: [{
|
2319
2319
|
type: Component,
|
2320
2320
|
args: [{ selector: 'argenta-image-upload', template: "<div *ngIf=\"hasPermission()\" class=\"image-uploader\">\n <div *ngIf=\"imagePreview\">\n <img [src]=\"imagePreview\" />\n </div>\n <input type=\"file\" (change)=\"onFileSelected($event)\" accept=\"image/*\" />\n </div>\n ", styles: [".image-uploader{display:flex;flex-direction:column;align-items:center;gap:10px}.image-uploader input{border:1px solid #ccc;padding:8px;cursor:pointer}.image-uploader img{max-width:300px;max-height:300px;border-radius:10px;box-shadow:0 0 10px #0000001a}\n"] }]
|
2321
|
-
}], ctorParameters: function () { return [{ type: AuthService }]; }, propDecorators: {
|
2321
|
+
}], ctorParameters: function () { return [{ type: AuthService }]; }, propDecorators: { imagePreview: [{
|
2322
|
+
type: Input
|
2323
|
+
}], permissions: [{
|
2322
2324
|
type: Input
|
2323
2325
|
}], base64Output: [{
|
2324
2326
|
type: Output
|
@@ -3869,11 +3871,47 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
3869
3871
|
}]
|
3870
3872
|
}] });
|
3871
3873
|
|
3874
|
+
class ConfirmationService {
|
3875
|
+
constructor(modalService) {
|
3876
|
+
this.modalService = modalService;
|
3877
|
+
this.modalRef = null;
|
3878
|
+
}
|
3879
|
+
confirm(title, message, confirmButtonText = 'Sim', cancelButtonText = 'Não') {
|
3880
|
+
this.modalRef = this.modalService.open(ConfirmationComponent, { backdrop: 'static', keyboard: false });
|
3881
|
+
this.modalRef.componentInstance.title = title;
|
3882
|
+
this.modalRef.componentInstance.message = message;
|
3883
|
+
this.modalRef.componentInstance.confirmButtonText = confirmButtonText;
|
3884
|
+
this.modalRef.componentInstance.cancelButtonText = cancelButtonText;
|
3885
|
+
return this.modalRef.result.then((result) => {
|
3886
|
+
return result === 'confirm';
|
3887
|
+
}, () => {
|
3888
|
+
return false;
|
3889
|
+
}).finally(() => {
|
3890
|
+
this.modalRef = null; // Clear the reference after the modal is closed
|
3891
|
+
});
|
3892
|
+
}
|
3893
|
+
ngOnDestroy() {
|
3894
|
+
if (this.modalRef) {
|
3895
|
+
this.modalRef.dismiss();
|
3896
|
+
this.modalRef = null;
|
3897
|
+
}
|
3898
|
+
}
|
3899
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ConfirmationService, deps: [{ token: i1$1.NgbModal }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
3900
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ConfirmationService, providedIn: 'root' }); }
|
3901
|
+
}
|
3902
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ConfirmationService, decorators: [{
|
3903
|
+
type: Injectable,
|
3904
|
+
args: [{
|
3905
|
+
providedIn: 'root'
|
3906
|
+
}]
|
3907
|
+
}], ctorParameters: function () { return [{ type: i1$1.NgbModal }]; } });
|
3908
|
+
|
3872
3909
|
class DataTableComponent {
|
3873
|
-
constructor(cdr, authService, refreshService) {
|
3910
|
+
constructor(cdr, authService, refreshService, confirmationService) {
|
3874
3911
|
this.cdr = cdr;
|
3875
3912
|
this.authService = authService;
|
3876
3913
|
this.refreshService = refreshService;
|
3914
|
+
this.confirmationService = confirmationService;
|
3877
3915
|
this.columns = [];
|
3878
3916
|
this.hiddenColumns = [];
|
3879
3917
|
this.defaultItemsPerPage = 10;
|
@@ -3888,6 +3926,12 @@ class DataTableComponent {
|
|
3888
3926
|
this.deletePermissions = [];
|
3889
3927
|
this.inativoPermissions = [];
|
3890
3928
|
this.viewPermissions = [];
|
3929
|
+
this.inativoTexts = {
|
3930
|
+
inactivate: "Desativar",
|
3931
|
+
activate: "Ativar",
|
3932
|
+
modalTitle: "Alterar status",
|
3933
|
+
modalText: "Você deseja realmente alterar o status?",
|
3934
|
+
};
|
3891
3935
|
this.showPageInfo = true;
|
3892
3936
|
this.pageText = "Page";
|
3893
3937
|
this.ofText = "of";
|
@@ -4064,15 +4108,22 @@ class DataTableComponent {
|
|
4064
4108
|
break;
|
4065
4109
|
case "inativar":
|
4066
4110
|
if (this.hasPermission(this.inativoPermissions)) {
|
4067
|
-
this.
|
4111
|
+
this.confirmationService
|
4112
|
+
.confirm(this.inativoTexts.modalTitle, this.inativoTexts.modalText)
|
4113
|
+
.then((confirmed) => {
|
4114
|
+
if (confirmed) {
|
4115
|
+
item.status = !item.status;
|
4116
|
+
console.log({ status: item.status, item: item });
|
4117
|
+
this.statusChange.emit({ status: item.status, item: item });
|
4118
|
+
}
|
4119
|
+
else {
|
4120
|
+
return;
|
4121
|
+
}
|
4122
|
+
});
|
4068
4123
|
}
|
4069
4124
|
break;
|
4070
4125
|
}
|
4071
4126
|
}
|
4072
|
-
toggleStatus(item) {
|
4073
|
-
item.status = !item.status;
|
4074
|
-
this.statusChange.emit(item.status);
|
4075
|
-
}
|
4076
4127
|
hasPermission(requiredPermissions) {
|
4077
4128
|
if (!requiredPermissions || requiredPermissions.length === 0) {
|
4078
4129
|
return true;
|
@@ -4101,13 +4152,13 @@ class DataTableComponent {
|
|
4101
4152
|
onNewButtonClick() {
|
4102
4153
|
this.onButtonClick.emit(); // Emitindo o evento
|
4103
4154
|
}
|
4104
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DataTableComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: AuthService }, { token: RefreshService }], target: i0.ɵɵFactoryTarget.Component }); }
|
4105
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DataTableComponent, selector: "argenta-list-data-table", inputs: { columns: "columns", hiddenColumns: "hiddenColumns", defaultItemsPerPage: "defaultItemsPerPage", itemsPerPageLabel: "itemsPerPageLabel", showActionColumn: "showActionColumn", actionColumnLabel: "actionColumnLabel", totalItems: "totalItems", fetchDataFunction: "fetchDataFunction", editPermissions: "editPermissions", deletePermissions: "deletePermissions", inativoPermissions: "inativoPermissions", viewPermissions: "viewPermissions", showPageInfo: "showPageInfo", pageText: "pageText", ofText: "ofText", filterDescription: "filterDescription", buttonLabel: "buttonLabel", pagedData: "pagedData", initialFilterField: "initialFilterField", buttonList: "buttonList", status: "status" }, outputs: { statusChange: "statusChange", sortChange: "sortChange", pageChange: "pageChange", itemsPerPageChange: "itemsPerPageChange", onEditTable: "onEditTable", onDeleteTable: "onDeleteTable", onInativoTable: "onInativoTable", onViewTable: "onViewTable", onButtonClick: "onButtonClick", filterFieldChange: "filterFieldChange" }, ngImport: i0, template: "<div class=\"data-table-header\" style=\"margin-top: 2.5rem\">\n <div class=\"left-section\">\n <div class=\"form-group\">\n <label for=\"itemsPerPageSelect\" class=\"items-per-page-label\">{{\n itemsPerPageLabel\n }}</label>\n <select\n id=\"itemsPerPageSelect\"\n class=\"form-control form-control-sm d-inline-block w-auto custom-select\"\n [(ngModel)]=\"defaultItemsPerPage\"\n (ngModelChange)=\"onItemsPerPageChange()\"\n >\n <option *ngFor=\"let option of itemsPerPageOptions\" [value]=\"option\">\n {{ option }}\n </option>\n </select>\n </div>\n </div>\n <div class=\"right-section\">\n <div *ngIf=\"buttonList && buttonList.length > 0\" class=\"ng-button-row\">\n <ng-container *ngFor=\"let buttonTemplate of buttonList\">\n <ng-container\n *ngTemplateOutlet=\"buttonTemplate\"\n class=\"ng-button\"\n ></ng-container>\n </ng-container>\n </div>\n <button\n *ngIf=\"buttonLabel && buttonLabel.length > 0\"\n class=\"custom-button\"\n (click)=\"onNewButtonClick()\"\n >\n <lucide-icon name=\"plus\" [size]=\"28\" [strokeWidth]=\"1.75\"></lucide-icon>\n {{ buttonLabel }}\n </button>\n </div>\n</div>\n\n<div class=\"search-input-container\">\n <argenta-search-input\n id=\"search\"\n label=\"\"\n placeholder=\"Buscar\"\n [(ngModel)]=\"filterDescription\"\n (search)=\"onSearch($event)\"\n ></argenta-search-input>\n</div>\n\n<div class=\"table-responsive\" style=\"margin-top: 1rem\">\n <table class=\"table table-hover\">\n <thead>\n <tr>\n <ng-container *ngFor=\"let column of columns\">\n <th\n *ngIf=\"!isColumnHidden(column.prop)\"\n (click)=\"onSelectSearchField(column.prop)\"\n >\n {{ column.label }}\n <span>\n <i-lucide\n name=\"arrow-up\"\n [size]=\"14\"\n [class.selected]=\"\n column.isSearchSelected && sortDirection === 'asc'\n \"\n ></i-lucide>\n <i-lucide\n name=\"arrow-down\"\n [size]=\"14\"\n [class.selected]=\"\n column.isSearchSelected && sortDirection === 'desc'\n \"\n ></i-lucide>\n </span>\n </th>\n </ng-container>\n <th\n *ngIf=\"showActionColumn\"\n class=\"text-end\"\n style=\"padding-right: 6.3rem\"\n >\n {{ actionColumnLabel }}\n </th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let item of pagedData; let i = index\">\n <ng-container *ngFor=\"let column of columns\">\n <td *ngIf=\"!isColumnHidden(column.prop)\" [ngSwitch]=\"column.type\">\n <!-- Default case (when type is undefined or not matched) -->\n <span *ngSwitchDefault>\n {{ getNestedProperty(item, column.prop) }}\n </span>\n \n <!-- String case -->\n <span *ngSwitchCase=\"'string'\">\n {{ getNestedProperty(item, column.prop) }}\n </span>\n \n <!-- Image case -->\n <img *ngSwitchCase=\"'image'\" [src]=\"getNestedProperty(item, column.prop)\" alt=\"Image\" width=\"50\" height=\"50\">\n </td>\n \n </ng-container>\n <td *ngIf=\"showActionColumn\" class=\"text-end\">\n <div class=\"d-flex justify-content-end\">\n <div\n *ngIf=\"\n hasPermission(editPermissions) &&\n onEditTable.observers.length > 0\n \"\n (click)=\"handleAction('edit', item, i)\"\n class=\"clickable-icon\"\n style=\"margin-right: 1.5rem\"\n >\n <lucide-icon\n name=\"square-pen\"\n [size]=\"20\"\n color=\"#2CA58D\"\n [strokeWidth]=\"1.75\"\n ></lucide-icon>\n </div>\n <div\n *ngIf=\"\n hasPermission(inativoPermissions) &&\n onInativoTable.observers.length > 0\n \"\n (click)=\"handleAction('inativar', item, i)\"\n class=\"clickable-icon\"\n style=\"margin-right: 1.5rem\"\n >\n <button\n [ngClass]=\"\n item.status\n ? 'btn btn-danger small-rounded-btn'\n : 'btn btn-success small-rounded-btn'\n \"\n (click)=\"toggleStatus(item)\"\n >\n {{ item.status ? \"Desativar\" : \"Ativar\" }}\n </button>\n </div>\n <div\n *ngIf=\"\n hasPermission(viewPermissions) &&\n onViewTable.observers.length > 0\n \"\n (click)=\"handleAction('view', item, i)\"\n class=\"clickable-icon\"\n style=\"margin-right: 1.5rem\"\n >\n <lucide-icon\n name=\"user-round\"\n [size]=\"20\"\n color=\"#2CA58D\"\n [strokeWidth]=\"1.75\"\n ></lucide-icon>\n </div>\n <div\n *ngIf=\"\n hasPermission(deletePermissions) &&\n onDeleteTable.observers.length > 0\n \"\n (click)=\"handleAction('delete', item, i)\"\n class=\"clickable-icon\"\n style=\"margin-right: 1.5rem\"\n >\n <i-lucide\n name=\"trash-2\"\n [size]=\"20\"\n color=\"#F26E6E\"\n [strokeWidth]=\"1.75\"\n ></i-lucide>\n </div>\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n</div>\n\n<div class=\"text-center pagination-controls\">\n <custom-pagination\n [totalItems]=\"totalItems\"\n [itemsPerPage]=\"defaultItemsPerPage\"\n [currentPage]=\"currentPage\"\n [showPageInfo]=\"showPageInfo\"\n (pageChange)=\"onPageChange($event)\"\n >\n </custom-pagination>\n</div>\n", styles: ["@charset \"UTF-8\";.clickable-icon{cursor:pointer}:host{font-family:var(--font-family)}.data-table-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:-.2rem}.left-section,.right-section{display:flex;align-items:center}.search-input-container{display:flex;justify-content:flex-start}.left-section .form-group{display:flex;align-items:center}.items-per-page-label{font-family:var(--font-family);font-size:14px;color:#666;margin-right:.2rem}.custom-select{font-family:var(--font-family);font-size:14px;color:#666;background:#fff url('data:image/svg+xml;charset=US-ASCII,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 4 5\"><path fill=\"#666\" d=\"M2 0L0 2h4L2 0zM2 5l2-2H0l2 2z\"/></svg>') no-repeat right .75rem center/8px 10px;border:1px solid #ccc;border-radius:.25rem;padding:.375rem 1.75rem .375rem .75rem;appearance:none;-webkit-appearance:none;-moz-appearance:none}.custom-select:focus{border-color:#80bdff;outline:0;box-shadow:0 0 0 .2rem #007bff40}.table{font-family:var(--font-family);font-size:var(--table-font-size, 14px);color:var(--table-font-color, #737b7b);border-collapse:separate;border-spacing:0;border-radius:8px;overflow:hidden}.table thead tr{height:60px}.table thead th{background-color:var(--primary-color);color:var(--text-color);font-family:var(--font-family);font-size:14px;font-weight:600;padding:10px;border-bottom:.1rem solid #dcdcdc;text-align:center;line-height:2.5}.table thead th:first-child{text-align:left;padding-left:1.4rem}.table tbody td{font-family:var(--font-family);font-size:14px;color:#737b7b;padding:10px;border-bottom:.1rem solid #dcdcdc;text-align:center}.table tbody td:first-child{text-align:left;padding-left:1.4rem}.table tbody tr:last-child td{border-bottom:.1rem solid #dcdcdc}.table tbody td{border-right:none;border-left:none}.table thead th:first-child{border-top-left-radius:0}.table thead th:last-child{border-top-right-radius:0}.table tbody tr:last-child td:first-child{border-bottom-left-radius:0}.table tbody tr:last-child td:last-child{border-bottom-right-radius:0}.btn-icon{width:24px;height:24px;background-size:cover;display:inline-block;cursor:pointer;margin-right:16px}.pagination-controls{display:flex;justify-content:center;align-items:center;margin-top:1rem}.custom-button{display:flex;align-items:center;padding:.5rem 1rem .5rem .5rem;border-radius:.25rem;transition:background-color .3s,border-color .3s,filter .3s;font-family:var(--font-family);font-size:16px;font-weight:600;height:40px;letter-spacing:.005em;text-align:left;color:#fff;background-color:var(--secondary-color);border:none;cursor:pointer}.custom-button lucide-icon{margin-right:.5rem}.custom-button:hover{box-shadow:0 0 0 .15rem var(--secondary-color)}.custom-button:active{background-color:var(--secondary-color)}.custom-button:focus{outline:none;box-shadow:0 0 0 .15rem var(--secondary-color)}.selected{color:var(--secondary-color);stroke-width:8}.ng-button-row{display:flex;gap:10px;margin-right:10px;margin-left:10px}.small-rounded-btn{padding:6px 12px;font-size:14px;border-radius:20px;height:32px;min-width:80px;border:none;transition:all .3s ease-in-out}.small-rounded-btn:hover{opacity:.8;transform:scale(1.05)}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "directive", type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.LucideAngularComponent, selector: "lucide-angular, lucide-icon, i-lucide, span-lucide", inputs: ["class", "name", "img", "color", "absoluteStrokeWidth", "size", "strokeWidth"] }, { kind: "component", type: CustomPaginationComponent, selector: "custom-pagination", inputs: ["totalItems", "itemsPerPage", "currentPage", "showPageInfo"], outputs: ["pageChange"] }, { kind: "component", type: SearchInputComponent, selector: "argenta-search-input", inputs: ["id", "label", "type", "placeholder", "value", "disabled", "readonly", "autofocus", "maxlength", "minlength", "required", "pattern", "debounceTime"], outputs: ["search", "inputChange", "change", "focus", "blur", "keyup", "keydown", "keypress"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
4155
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DataTableComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: AuthService }, { token: RefreshService }, { token: ConfirmationService }], target: i0.ɵɵFactoryTarget.Component }); }
|
4156
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DataTableComponent, selector: "argenta-list-data-table", inputs: { columns: "columns", hiddenColumns: "hiddenColumns", defaultItemsPerPage: "defaultItemsPerPage", itemsPerPageLabel: "itemsPerPageLabel", showActionColumn: "showActionColumn", actionColumnLabel: "actionColumnLabel", totalItems: "totalItems", fetchDataFunction: "fetchDataFunction", editPermissions: "editPermissions", deletePermissions: "deletePermissions", inativoPermissions: "inativoPermissions", viewPermissions: "viewPermissions", inativoTexts: "inativoTexts", showPageInfo: "showPageInfo", pageText: "pageText", ofText: "ofText", filterDescription: "filterDescription", buttonLabel: "buttonLabel", pagedData: "pagedData", initialFilterField: "initialFilterField", buttonList: "buttonList", status: "status" }, outputs: { statusChange: "statusChange", sortChange: "sortChange", pageChange: "pageChange", itemsPerPageChange: "itemsPerPageChange", onEditTable: "onEditTable", onDeleteTable: "onDeleteTable", onInativoTable: "onInativoTable", onViewTable: "onViewTable", onButtonClick: "onButtonClick", filterFieldChange: "filterFieldChange" }, ngImport: i0, template: "<div class=\"data-table-header\" style=\"margin-top: 2.5rem\">\n <div class=\"left-section\">\n <div class=\"form-group\">\n <label for=\"itemsPerPageSelect\" class=\"items-per-page-label\">{{\n itemsPerPageLabel\n }}</label>\n <select\n id=\"itemsPerPageSelect\"\n class=\"form-control form-control-sm d-inline-block w-auto custom-select\"\n [(ngModel)]=\"defaultItemsPerPage\"\n (ngModelChange)=\"onItemsPerPageChange()\"\n >\n <option *ngFor=\"let option of itemsPerPageOptions\" [value]=\"option\">\n {{ option }}\n </option>\n </select>\n </div>\n </div>\n <div class=\"right-section\">\n <div *ngIf=\"buttonList && buttonList.length > 0\" class=\"ng-button-row\">\n <ng-container *ngFor=\"let buttonTemplate of buttonList\">\n <ng-container\n *ngTemplateOutlet=\"buttonTemplate\"\n class=\"ng-button\"\n ></ng-container>\n </ng-container>\n </div>\n <button\n *ngIf=\"buttonLabel && buttonLabel.length > 0\"\n class=\"custom-button\"\n (click)=\"onNewButtonClick()\"\n >\n <lucide-icon name=\"plus\" [size]=\"28\" [strokeWidth]=\"1.75\"></lucide-icon>\n {{ buttonLabel }}\n </button>\n </div>\n</div>\n\n<div class=\"search-input-container\">\n <argenta-search-input\n id=\"search\"\n label=\"\"\n placeholder=\"Buscar\"\n [(ngModel)]=\"filterDescription\"\n (search)=\"onSearch($event)\"\n ></argenta-search-input>\n</div>\n\n<div class=\"table-responsive\" style=\"margin-top: 1rem\">\n <table class=\"table table-hover\">\n <thead>\n <tr>\n <ng-container *ngFor=\"let column of columns\">\n <th\n *ngIf=\"!isColumnHidden(column.prop)\"\n (click)=\"onSelectSearchField(column.prop)\"\n >\n {{ column.label }}\n <span>\n <i-lucide\n name=\"arrow-up\"\n [size]=\"14\"\n [class.selected]=\"\n column.isSearchSelected && sortDirection === 'asc'\n \"\n ></i-lucide>\n <i-lucide\n name=\"arrow-down\"\n [size]=\"14\"\n [class.selected]=\"\n column.isSearchSelected && sortDirection === 'desc'\n \"\n ></i-lucide>\n </span>\n </th>\n </ng-container>\n <th\n *ngIf=\"showActionColumn\"\n class=\"text-end\"\n style=\"padding-right: 6.3rem\"\n >\n {{ actionColumnLabel }}\n </th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let item of pagedData; let i = index\">\n <ng-container *ngFor=\"let column of columns\">\n <td *ngIf=\"!isColumnHidden(column.prop)\" [ngSwitch]=\"column.type\">\n <!-- Default case (when type is undefined or not matched) -->\n <span *ngSwitchDefault>\n {{ getNestedProperty(item, column.prop) }}\n </span>\n\n <!-- String case -->\n <span *ngSwitchCase=\"'string'\">\n {{ getNestedProperty(item, column.prop) }}\n </span>\n\n <!-- Image case -->\n <img\n *ngSwitchCase=\"'image'\"\n [src]=\"getNestedProperty(item, column.prop)\"\n alt=\"Image\"\n width=\"50\"\n height=\"50\"\n />\n </td>\n </ng-container>\n <td *ngIf=\"showActionColumn\" class=\"text-end\">\n <div class=\"d-flex justify-content-end\">\n <div\n *ngIf=\"\n hasPermission(editPermissions) &&\n onEditTable.observers.length > 0\n \"\n (click)=\"handleAction('edit', item, i)\"\n class=\"clickable-icon\"\n style=\"margin-right: 1.5rem\"\n >\n <lucide-icon\n name=\"square-pen\"\n [size]=\"20\"\n color=\"#2CA58D\"\n [strokeWidth]=\"1.75\"\n ></lucide-icon>\n </div>\n <div\n *ngIf=\"\n hasPermission(inativoPermissions) &&\n onInativoTable.observers.length > 0\n \"\n (click)=\"handleAction('inativar', item, i)\"\n class=\"clickable-icon\"\n style=\"margin-right: 1.5rem\"\n >\n <button\n [ngClass]=\"\n item.status\n ? 'btn btn-danger small-rounded-btn'\n : 'btn btn-success small-rounded-btn'\n \"\n >\n {{\n item.status ? inativoTexts.inactivate : inativoTexts.activate\n }}\n </button>\n </div>\n <div\n *ngIf=\"\n hasPermission(viewPermissions) &&\n onViewTable.observers.length > 0\n \"\n (click)=\"handleAction('view', item, i)\"\n class=\"clickable-icon\"\n style=\"margin-right: 1.5rem\"\n >\n <lucide-icon\n name=\"user-round\"\n [size]=\"20\"\n color=\"#2CA58D\"\n [strokeWidth]=\"1.75\"\n ></lucide-icon>\n </div>\n <div\n *ngIf=\"\n hasPermission(deletePermissions) &&\n onDeleteTable.observers.length > 0\n \"\n (click)=\"handleAction('delete', item, i)\"\n class=\"clickable-icon\"\n style=\"margin-right: 1.5rem\"\n >\n <i-lucide\n name=\"trash-2\"\n [size]=\"20\"\n color=\"#F26E6E\"\n [strokeWidth]=\"1.75\"\n ></i-lucide>\n </div>\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n</div>\n\n<div class=\"text-center pagination-controls\">\n <custom-pagination\n [totalItems]=\"totalItems\"\n [itemsPerPage]=\"defaultItemsPerPage\"\n [currentPage]=\"currentPage\"\n [showPageInfo]=\"showPageInfo\"\n (pageChange)=\"onPageChange($event)\"\n >\n </custom-pagination>\n</div>\n", styles: ["@charset \"UTF-8\";.clickable-icon{cursor:pointer}:host{font-family:var(--font-family)}.data-table-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:-.2rem}.left-section,.right-section{display:flex;align-items:center}.search-input-container{display:flex;justify-content:flex-start}.left-section .form-group{display:flex;align-items:center}.items-per-page-label{font-family:var(--font-family);font-size:14px;color:#666;margin-right:.2rem}.custom-select{font-family:var(--font-family);font-size:14px;color:#666;background:#fff url('data:image/svg+xml;charset=US-ASCII,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 4 5\"><path fill=\"#666\" d=\"M2 0L0 2h4L2 0zM2 5l2-2H0l2 2z\"/></svg>') no-repeat right .75rem center/8px 10px;border:1px solid #ccc;border-radius:.25rem;padding:.375rem 1.75rem .375rem .75rem;appearance:none;-webkit-appearance:none;-moz-appearance:none}.custom-select:focus{border-color:#80bdff;outline:0;box-shadow:0 0 0 .2rem #007bff40}.table{font-family:var(--font-family);font-size:var(--table-font-size, 14px);color:var(--table-font-color, #737b7b);border-collapse:separate;border-spacing:0;border-radius:8px;overflow:hidden}.table thead tr{height:60px}.table thead th{background-color:var(--primary-color);color:var(--text-color);font-family:var(--font-family);font-size:14px;font-weight:600;padding:10px;border-bottom:.1rem solid #dcdcdc;text-align:center;line-height:2.5}.table thead th:first-child{text-align:left;padding-left:1.4rem}.table tbody td{font-family:var(--font-family);font-size:14px;color:#737b7b;padding:10px;border-bottom:.1rem solid #dcdcdc;text-align:center}.table tbody td:first-child{text-align:left;padding-left:1.4rem}.table tbody tr:last-child td{border-bottom:.1rem solid #dcdcdc}.table tbody td{border-right:none;border-left:none}.table thead th:first-child{border-top-left-radius:0}.table thead th:last-child{border-top-right-radius:0}.table tbody tr:last-child td:first-child{border-bottom-left-radius:0}.table tbody tr:last-child td:last-child{border-bottom-right-radius:0}.btn-icon{width:24px;height:24px;background-size:cover;display:inline-block;cursor:pointer;margin-right:16px}.pagination-controls{display:flex;justify-content:center;align-items:center;margin-top:1rem}.custom-button{display:flex;align-items:center;padding:.5rem 1rem .5rem .5rem;border-radius:.25rem;transition:background-color .3s,border-color .3s,filter .3s;font-family:var(--font-family);font-size:16px;font-weight:600;height:40px;letter-spacing:.005em;text-align:left;color:#fff;background-color:var(--secondary-color);border:none;cursor:pointer}.custom-button lucide-icon{margin-right:.5rem}.custom-button:hover{box-shadow:0 0 0 .15rem var(--secondary-color)}.custom-button:active{background-color:var(--secondary-color)}.custom-button:focus{outline:none;box-shadow:0 0 0 .15rem var(--secondary-color)}.selected{color:var(--secondary-color);stroke-width:8}.ng-button-row{display:flex;gap:10px;margin-right:10px;margin-left:10px}.small-rounded-btn{padding:6px 12px;font-size:14px;border-radius:20px;height:32px;min-width:80px;border:none;transition:all .3s ease-in-out}.small-rounded-btn:hover{opacity:.8;transform:scale(1.05)}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "directive", type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.LucideAngularComponent, selector: "lucide-angular, lucide-icon, i-lucide, span-lucide", inputs: ["class", "name", "img", "color", "absoluteStrokeWidth", "size", "strokeWidth"] }, { kind: "component", type: CustomPaginationComponent, selector: "custom-pagination", inputs: ["totalItems", "itemsPerPage", "currentPage", "showPageInfo"], outputs: ["pageChange"] }, { kind: "component", type: SearchInputComponent, selector: "argenta-search-input", inputs: ["id", "label", "type", "placeholder", "value", "disabled", "readonly", "autofocus", "maxlength", "minlength", "required", "pattern", "debounceTime"], outputs: ["search", "inputChange", "change", "focus", "blur", "keyup", "keydown", "keypress"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
4106
4157
|
}
|
4107
4158
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DataTableComponent, decorators: [{
|
4108
4159
|
type: Component,
|
4109
|
-
args: [{ selector: "argenta-list-data-table", changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"data-table-header\" style=\"margin-top: 2.5rem\">\n <div class=\"left-section\">\n <div class=\"form-group\">\n <label for=\"itemsPerPageSelect\" class=\"items-per-page-label\">{{\n itemsPerPageLabel\n }}</label>\n <select\n id=\"itemsPerPageSelect\"\n class=\"form-control form-control-sm d-inline-block w-auto custom-select\"\n [(ngModel)]=\"defaultItemsPerPage\"\n (ngModelChange)=\"onItemsPerPageChange()\"\n >\n <option *ngFor=\"let option of itemsPerPageOptions\" [value]=\"option\">\n {{ option }}\n </option>\n </select>\n </div>\n </div>\n <div class=\"right-section\">\n <div *ngIf=\"buttonList && buttonList.length > 0\" class=\"ng-button-row\">\n <ng-container *ngFor=\"let buttonTemplate of buttonList\">\n <ng-container\n *ngTemplateOutlet=\"buttonTemplate\"\n class=\"ng-button\"\n ></ng-container>\n </ng-container>\n </div>\n <button\n *ngIf=\"buttonLabel && buttonLabel.length > 0\"\n class=\"custom-button\"\n (click)=\"onNewButtonClick()\"\n >\n <lucide-icon name=\"plus\" [size]=\"28\" [strokeWidth]=\"1.75\"></lucide-icon>\n {{ buttonLabel }}\n </button>\n </div>\n</div>\n\n<div class=\"search-input-container\">\n <argenta-search-input\n id=\"search\"\n label=\"\"\n placeholder=\"Buscar\"\n [(ngModel)]=\"filterDescription\"\n (search)=\"onSearch($event)\"\n ></argenta-search-input>\n</div>\n\n<div class=\"table-responsive\" style=\"margin-top: 1rem\">\n <table class=\"table table-hover\">\n <thead>\n <tr>\n <ng-container *ngFor=\"let column of columns\">\n <th\n *ngIf=\"!isColumnHidden(column.prop)\"\n (click)=\"onSelectSearchField(column.prop)\"\n >\n {{ column.label }}\n <span>\n <i-lucide\n name=\"arrow-up\"\n [size]=\"14\"\n [class.selected]=\"\n column.isSearchSelected && sortDirection === 'asc'\n \"\n ></i-lucide>\n <i-lucide\n name=\"arrow-down\"\n [size]=\"14\"\n [class.selected]=\"\n column.isSearchSelected && sortDirection === 'desc'\n \"\n ></i-lucide>\n </span>\n </th>\n </ng-container>\n <th\n *ngIf=\"showActionColumn\"\n class=\"text-end\"\n style=\"padding-right: 6.3rem\"\n >\n {{ actionColumnLabel }}\n </th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let item of pagedData; let i = index\">\n <ng-container *ngFor=\"let column of columns\">\n <td *ngIf=\"!isColumnHidden(column.prop)\" [ngSwitch]=\"column.type\">\n <!-- Default case (when type is undefined or not matched) -->\n <span *ngSwitchDefault>\n {{ getNestedProperty(item, column.prop) }}\n </span>\n
|
4110
|
-
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: AuthService }, { type: RefreshService }]; }, propDecorators: { columns: [{
|
4160
|
+
args: [{ selector: "argenta-list-data-table", changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"data-table-header\" style=\"margin-top: 2.5rem\">\n <div class=\"left-section\">\n <div class=\"form-group\">\n <label for=\"itemsPerPageSelect\" class=\"items-per-page-label\">{{\n itemsPerPageLabel\n }}</label>\n <select\n id=\"itemsPerPageSelect\"\n class=\"form-control form-control-sm d-inline-block w-auto custom-select\"\n [(ngModel)]=\"defaultItemsPerPage\"\n (ngModelChange)=\"onItemsPerPageChange()\"\n >\n <option *ngFor=\"let option of itemsPerPageOptions\" [value]=\"option\">\n {{ option }}\n </option>\n </select>\n </div>\n </div>\n <div class=\"right-section\">\n <div *ngIf=\"buttonList && buttonList.length > 0\" class=\"ng-button-row\">\n <ng-container *ngFor=\"let buttonTemplate of buttonList\">\n <ng-container\n *ngTemplateOutlet=\"buttonTemplate\"\n class=\"ng-button\"\n ></ng-container>\n </ng-container>\n </div>\n <button\n *ngIf=\"buttonLabel && buttonLabel.length > 0\"\n class=\"custom-button\"\n (click)=\"onNewButtonClick()\"\n >\n <lucide-icon name=\"plus\" [size]=\"28\" [strokeWidth]=\"1.75\"></lucide-icon>\n {{ buttonLabel }}\n </button>\n </div>\n</div>\n\n<div class=\"search-input-container\">\n <argenta-search-input\n id=\"search\"\n label=\"\"\n placeholder=\"Buscar\"\n [(ngModel)]=\"filterDescription\"\n (search)=\"onSearch($event)\"\n ></argenta-search-input>\n</div>\n\n<div class=\"table-responsive\" style=\"margin-top: 1rem\">\n <table class=\"table table-hover\">\n <thead>\n <tr>\n <ng-container *ngFor=\"let column of columns\">\n <th\n *ngIf=\"!isColumnHidden(column.prop)\"\n (click)=\"onSelectSearchField(column.prop)\"\n >\n {{ column.label }}\n <span>\n <i-lucide\n name=\"arrow-up\"\n [size]=\"14\"\n [class.selected]=\"\n column.isSearchSelected && sortDirection === 'asc'\n \"\n ></i-lucide>\n <i-lucide\n name=\"arrow-down\"\n [size]=\"14\"\n [class.selected]=\"\n column.isSearchSelected && sortDirection === 'desc'\n \"\n ></i-lucide>\n </span>\n </th>\n </ng-container>\n <th\n *ngIf=\"showActionColumn\"\n class=\"text-end\"\n style=\"padding-right: 6.3rem\"\n >\n {{ actionColumnLabel }}\n </th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let item of pagedData; let i = index\">\n <ng-container *ngFor=\"let column of columns\">\n <td *ngIf=\"!isColumnHidden(column.prop)\" [ngSwitch]=\"column.type\">\n <!-- Default case (when type is undefined or not matched) -->\n <span *ngSwitchDefault>\n {{ getNestedProperty(item, column.prop) }}\n </span>\n\n <!-- String case -->\n <span *ngSwitchCase=\"'string'\">\n {{ getNestedProperty(item, column.prop) }}\n </span>\n\n <!-- Image case -->\n <img\n *ngSwitchCase=\"'image'\"\n [src]=\"getNestedProperty(item, column.prop)\"\n alt=\"Image\"\n width=\"50\"\n height=\"50\"\n />\n </td>\n </ng-container>\n <td *ngIf=\"showActionColumn\" class=\"text-end\">\n <div class=\"d-flex justify-content-end\">\n <div\n *ngIf=\"\n hasPermission(editPermissions) &&\n onEditTable.observers.length > 0\n \"\n (click)=\"handleAction('edit', item, i)\"\n class=\"clickable-icon\"\n style=\"margin-right: 1.5rem\"\n >\n <lucide-icon\n name=\"square-pen\"\n [size]=\"20\"\n color=\"#2CA58D\"\n [strokeWidth]=\"1.75\"\n ></lucide-icon>\n </div>\n <div\n *ngIf=\"\n hasPermission(inativoPermissions) &&\n onInativoTable.observers.length > 0\n \"\n (click)=\"handleAction('inativar', item, i)\"\n class=\"clickable-icon\"\n style=\"margin-right: 1.5rem\"\n >\n <button\n [ngClass]=\"\n item.status\n ? 'btn btn-danger small-rounded-btn'\n : 'btn btn-success small-rounded-btn'\n \"\n >\n {{\n item.status ? inativoTexts.inactivate : inativoTexts.activate\n }}\n </button>\n </div>\n <div\n *ngIf=\"\n hasPermission(viewPermissions) &&\n onViewTable.observers.length > 0\n \"\n (click)=\"handleAction('view', item, i)\"\n class=\"clickable-icon\"\n style=\"margin-right: 1.5rem\"\n >\n <lucide-icon\n name=\"user-round\"\n [size]=\"20\"\n color=\"#2CA58D\"\n [strokeWidth]=\"1.75\"\n ></lucide-icon>\n </div>\n <div\n *ngIf=\"\n hasPermission(deletePermissions) &&\n onDeleteTable.observers.length > 0\n \"\n (click)=\"handleAction('delete', item, i)\"\n class=\"clickable-icon\"\n style=\"margin-right: 1.5rem\"\n >\n <i-lucide\n name=\"trash-2\"\n [size]=\"20\"\n color=\"#F26E6E\"\n [strokeWidth]=\"1.75\"\n ></i-lucide>\n </div>\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n</div>\n\n<div class=\"text-center pagination-controls\">\n <custom-pagination\n [totalItems]=\"totalItems\"\n [itemsPerPage]=\"defaultItemsPerPage\"\n [currentPage]=\"currentPage\"\n [showPageInfo]=\"showPageInfo\"\n (pageChange)=\"onPageChange($event)\"\n >\n </custom-pagination>\n</div>\n", styles: ["@charset \"UTF-8\";.clickable-icon{cursor:pointer}:host{font-family:var(--font-family)}.data-table-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:-.2rem}.left-section,.right-section{display:flex;align-items:center}.search-input-container{display:flex;justify-content:flex-start}.left-section .form-group{display:flex;align-items:center}.items-per-page-label{font-family:var(--font-family);font-size:14px;color:#666;margin-right:.2rem}.custom-select{font-family:var(--font-family);font-size:14px;color:#666;background:#fff url('data:image/svg+xml;charset=US-ASCII,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 4 5\"><path fill=\"#666\" d=\"M2 0L0 2h4L2 0zM2 5l2-2H0l2 2z\"/></svg>') no-repeat right .75rem center/8px 10px;border:1px solid #ccc;border-radius:.25rem;padding:.375rem 1.75rem .375rem .75rem;appearance:none;-webkit-appearance:none;-moz-appearance:none}.custom-select:focus{border-color:#80bdff;outline:0;box-shadow:0 0 0 .2rem #007bff40}.table{font-family:var(--font-family);font-size:var(--table-font-size, 14px);color:var(--table-font-color, #737b7b);border-collapse:separate;border-spacing:0;border-radius:8px;overflow:hidden}.table thead tr{height:60px}.table thead th{background-color:var(--primary-color);color:var(--text-color);font-family:var(--font-family);font-size:14px;font-weight:600;padding:10px;border-bottom:.1rem solid #dcdcdc;text-align:center;line-height:2.5}.table thead th:first-child{text-align:left;padding-left:1.4rem}.table tbody td{font-family:var(--font-family);font-size:14px;color:#737b7b;padding:10px;border-bottom:.1rem solid #dcdcdc;text-align:center}.table tbody td:first-child{text-align:left;padding-left:1.4rem}.table tbody tr:last-child td{border-bottom:.1rem solid #dcdcdc}.table tbody td{border-right:none;border-left:none}.table thead th:first-child{border-top-left-radius:0}.table thead th:last-child{border-top-right-radius:0}.table tbody tr:last-child td:first-child{border-bottom-left-radius:0}.table tbody tr:last-child td:last-child{border-bottom-right-radius:0}.btn-icon{width:24px;height:24px;background-size:cover;display:inline-block;cursor:pointer;margin-right:16px}.pagination-controls{display:flex;justify-content:center;align-items:center;margin-top:1rem}.custom-button{display:flex;align-items:center;padding:.5rem 1rem .5rem .5rem;border-radius:.25rem;transition:background-color .3s,border-color .3s,filter .3s;font-family:var(--font-family);font-size:16px;font-weight:600;height:40px;letter-spacing:.005em;text-align:left;color:#fff;background-color:var(--secondary-color);border:none;cursor:pointer}.custom-button lucide-icon{margin-right:.5rem}.custom-button:hover{box-shadow:0 0 0 .15rem var(--secondary-color)}.custom-button:active{background-color:var(--secondary-color)}.custom-button:focus{outline:none;box-shadow:0 0 0 .15rem var(--secondary-color)}.selected{color:var(--secondary-color);stroke-width:8}.ng-button-row{display:flex;gap:10px;margin-right:10px;margin-left:10px}.small-rounded-btn{padding:6px 12px;font-size:14px;border-radius:20px;height:32px;min-width:80px;border:none;transition:all .3s ease-in-out}.small-rounded-btn:hover{opacity:.8;transform:scale(1.05)}\n"] }]
|
4161
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: AuthService }, { type: RefreshService }, { type: ConfirmationService }]; }, propDecorators: { columns: [{
|
4111
4162
|
type: Input
|
4112
4163
|
}], hiddenColumns: [{
|
4113
4164
|
type: Input
|
@@ -4131,6 +4182,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
4131
4182
|
type: Input
|
4132
4183
|
}], viewPermissions: [{
|
4133
4184
|
type: Input
|
4185
|
+
}], inativoTexts: [{
|
4186
|
+
type: Input
|
4134
4187
|
}], showPageInfo: [{
|
4135
4188
|
type: Input
|
4136
4189
|
}], pageText: [{
|
@@ -4658,41 +4711,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
4658
4711
|
}]
|
4659
4712
|
}], ctorParameters: function () { return [{ type: i0.ApplicationRef }, { type: i0.Injector }]; } });
|
4660
4713
|
|
4661
|
-
class ConfirmationService {
|
4662
|
-
constructor(modalService) {
|
4663
|
-
this.modalService = modalService;
|
4664
|
-
this.modalRef = null;
|
4665
|
-
}
|
4666
|
-
confirm(title, message, confirmButtonText = 'Sim', cancelButtonText = 'Não') {
|
4667
|
-
this.modalRef = this.modalService.open(ConfirmationComponent, { backdrop: 'static', keyboard: false });
|
4668
|
-
this.modalRef.componentInstance.title = title;
|
4669
|
-
this.modalRef.componentInstance.message = message;
|
4670
|
-
this.modalRef.componentInstance.confirmButtonText = confirmButtonText;
|
4671
|
-
this.modalRef.componentInstance.cancelButtonText = cancelButtonText;
|
4672
|
-
return this.modalRef.result.then((result) => {
|
4673
|
-
return result === 'confirm';
|
4674
|
-
}, () => {
|
4675
|
-
return false;
|
4676
|
-
}).finally(() => {
|
4677
|
-
this.modalRef = null; // Clear the reference after the modal is closed
|
4678
|
-
});
|
4679
|
-
}
|
4680
|
-
ngOnDestroy() {
|
4681
|
-
if (this.modalRef) {
|
4682
|
-
this.modalRef.dismiss();
|
4683
|
-
this.modalRef = null;
|
4684
|
-
}
|
4685
|
-
}
|
4686
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ConfirmationService, deps: [{ token: i1$1.NgbModal }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
4687
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ConfirmationService, providedIn: 'root' }); }
|
4688
|
-
}
|
4689
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ConfirmationService, decorators: [{
|
4690
|
-
type: Injectable,
|
4691
|
-
args: [{
|
4692
|
-
providedIn: 'root'
|
4693
|
-
}]
|
4694
|
-
}], ctorParameters: function () { return [{ type: i1$1.NgbModal }]; } });
|
4695
|
-
|
4696
4714
|
class DataPaginateService {
|
4697
4715
|
constructor(http) {
|
4698
4716
|
this.http = http;
|