keevo-components 0.6.4 → 0.7.0
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/esm2020/lib/api/services/notification.service.mjs +67 -0
- package/esm2020/lib/table/table.component.mjs +2 -5
- package/esm2020/public-api.mjs +2 -1
- package/fesm2015/keevo-components.mjs +64 -11
- package/fesm2015/keevo-components.mjs.map +1 -1
- package/fesm2020/keevo-components.mjs +72 -11
- package/fesm2020/keevo-components.mjs.map +1 -1
- package/lib/api/services/notification.service.d.ts +25 -0
- package/lib/table/table.component.d.ts +1 -2
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
|
@@ -9,9 +9,9 @@ import * as i4 from 'primeng/checkbox';
|
|
|
9
9
|
import { CheckboxModule } from 'primeng/checkbox';
|
|
10
10
|
import * as i2$1 from 'primeng/dynamicdialog';
|
|
11
11
|
import { DynamicDialogModule, DialogService, DynamicDialogRef, DynamicDialogConfig } from 'primeng/dynamicdialog';
|
|
12
|
-
import * as
|
|
12
|
+
import * as i1$1 from 'primeng/api';
|
|
13
13
|
import { ConfirmationService, MessageService } from 'primeng/api';
|
|
14
|
-
import * as i1$
|
|
14
|
+
import * as i1$2 from 'primeng/button';
|
|
15
15
|
import { ButtonModule } from 'primeng/button';
|
|
16
16
|
import * as i8 from 'primeng/tooltip';
|
|
17
17
|
import { TooltipModule } from 'primeng/tooltip';
|
|
@@ -37,7 +37,7 @@ import * as i4$8 from 'primeng/inputswitch';
|
|
|
37
37
|
import { InputSwitchModule } from 'primeng/inputswitch';
|
|
38
38
|
import * as i2$2 from 'primeng/ripple';
|
|
39
39
|
import { RippleModule } from 'primeng/ripple';
|
|
40
|
-
import * as i6
|
|
40
|
+
import * as i6 from 'primeng/autofocus';
|
|
41
41
|
import { AutoFocusModule } from 'primeng/autofocus';
|
|
42
42
|
import * as i8$1 from 'primeng/menu';
|
|
43
43
|
import { MenuModule } from 'primeng/menu';
|
|
@@ -400,7 +400,7 @@ class DropdownComponent extends BaseComponentDropDown {
|
|
|
400
400
|
}
|
|
401
401
|
}
|
|
402
402
|
DropdownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: DropdownComponent, deps: [{ token: ComponentService }, { token: i2$1.DialogService }], target: i0.ɵɵFactoryTarget.Component });
|
|
403
|
-
DropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", type: DropdownComponent, selector: "kv-dropdown", providers: ComponentProviders(DropdownComponent), usesInheritance: true, ngImport: i0, template: "<span class=\"p-float-label\">\r\n\r\n <p-dropdown\r\n appendTo=\"body\"\r\n [class]=\"baseInputClass\"\r\n [disabled]=\"disabled\"\r\n [filter]=\"filter\"\r\n [inputId]=\"componentId\"\r\n [(ngModel)]=\"value\"\r\n [options]=\"options\"\r\n [optionLabel]=\"optionLabel\"\r\n [optionValue]=\"optionValue\"\r\n [showClear]=\"showClear\"\r\n [lazy]=\"true\"\r\n scrollHeight=\"100px\"\r\n (onBlur)=\"onInputBlur($event)\"\r\n (onClick)=\"onInputClick($event)\"\r\n (onChange)=\"selectionValue($event)\">\r\n\r\n <ng-template *ngIf=\"addButton\" pTemplate=\"footer\">\r\n <p-divider></p-divider>\r\n <div class=\"flex flex-wrap card-container p-1\">\r\n <div class=\"flex justify-content-center\">\r\n <button\r\n pButton\r\n label=\"Incluir\"\r\n pTooltip=\"Clique aqui para incluir um novo registro\"\r\n tooltipPosition=\"bottom\"\r\n icon=\"pi pi-plus\"\r\n class=\"p-button-rounded p-button-success mr-2\"\r\n (click)=\"addClick($event)\"></button>\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n </p-dropdown>\r\n <label [for]=\"componentId\">{{ label }}</label>\r\n\r\n <kv-error [hasError]=\"hasControlError()\">{{ erroMessage() }}</kv-error>\r\n</span>\r\n<ng-content></ng-content>\r\n", styles: ["", "label{font-family:Roboto,Arial,Helvetica,sans-serif}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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: ErrorComponent, selector: "kv-error", inputs: ["formControl", "hasError"] }, { kind: "directive", type:
|
|
403
|
+
DropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", type: DropdownComponent, selector: "kv-dropdown", providers: ComponentProviders(DropdownComponent), usesInheritance: true, ngImport: i0, template: "<span class=\"p-float-label\">\r\n\r\n <p-dropdown\r\n appendTo=\"body\"\r\n [class]=\"baseInputClass\"\r\n [disabled]=\"disabled\"\r\n [filter]=\"filter\"\r\n [inputId]=\"componentId\"\r\n [(ngModel)]=\"value\"\r\n [options]=\"options\"\r\n [optionLabel]=\"optionLabel\"\r\n [optionValue]=\"optionValue\"\r\n [showClear]=\"showClear\"\r\n [lazy]=\"true\"\r\n scrollHeight=\"100px\"\r\n (onBlur)=\"onInputBlur($event)\"\r\n (onClick)=\"onInputClick($event)\"\r\n (onChange)=\"selectionValue($event)\">\r\n\r\n <ng-template *ngIf=\"addButton\" pTemplate=\"footer\">\r\n <p-divider></p-divider>\r\n <div class=\"flex flex-wrap card-container p-1\">\r\n <div class=\"flex justify-content-center\">\r\n <button\r\n pButton\r\n label=\"Incluir\"\r\n pTooltip=\"Clique aqui para incluir um novo registro\"\r\n tooltipPosition=\"bottom\"\r\n icon=\"pi pi-plus\"\r\n class=\"p-button-rounded p-button-success mr-2\"\r\n (click)=\"addClick($event)\"></button>\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n </p-dropdown>\r\n <label [for]=\"componentId\">{{ label }}</label>\r\n\r\n <kv-error [hasError]=\"hasControlError()\">{{ erroMessage() }}</kv-error>\r\n</span>\r\n<ng-content></ng-content>\r\n", styles: ["", "label{font-family:Roboto,Arial,Helvetica,sans-serif}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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: ErrorComponent, selector: "kv-error", inputs: ["formControl", "hasError"] }, { kind: "directive", type: i1$1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i1$2.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { kind: "directive", type: i8.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "component", type: i9.Divider, selector: "p-divider", inputs: ["styleClass", "style", "layout", "type", "align"] }, { kind: "component", type: i10.Dropdown, selector: "p-dropdown", inputs: ["scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "filterPlaceholder", "filterLocale", "inputId", "selectId", "dataKey", "filterBy", "autofocus", "resetFilterOnHide", "dropdownIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "overlayDirection", "disabled", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "options", "filterValue"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }] });
|
|
404
404
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: DropdownComponent, decorators: [{
|
|
405
405
|
type: Component,
|
|
406
406
|
args: [{ selector: 'kv-dropdown', providers: ComponentProviders(DropdownComponent), template: "<span class=\"p-float-label\">\r\n\r\n <p-dropdown\r\n appendTo=\"body\"\r\n [class]=\"baseInputClass\"\r\n [disabled]=\"disabled\"\r\n [filter]=\"filter\"\r\n [inputId]=\"componentId\"\r\n [(ngModel)]=\"value\"\r\n [options]=\"options\"\r\n [optionLabel]=\"optionLabel\"\r\n [optionValue]=\"optionValue\"\r\n [showClear]=\"showClear\"\r\n [lazy]=\"true\"\r\n scrollHeight=\"100px\"\r\n (onBlur)=\"onInputBlur($event)\"\r\n (onClick)=\"onInputClick($event)\"\r\n (onChange)=\"selectionValue($event)\">\r\n\r\n <ng-template *ngIf=\"addButton\" pTemplate=\"footer\">\r\n <p-divider></p-divider>\r\n <div class=\"flex flex-wrap card-container p-1\">\r\n <div class=\"flex justify-content-center\">\r\n <button\r\n pButton\r\n label=\"Incluir\"\r\n pTooltip=\"Clique aqui para incluir um novo registro\"\r\n tooltipPosition=\"bottom\"\r\n icon=\"pi pi-plus\"\r\n class=\"p-button-rounded p-button-success mr-2\"\r\n (click)=\"addClick($event)\"></button>\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n </p-dropdown>\r\n <label [for]=\"componentId\">{{ label }}</label>\r\n\r\n <kv-error [hasError]=\"hasControlError()\">{{ erroMessage() }}</kv-error>\r\n</span>\r\n<ng-content></ng-content>\r\n", styles: ["label{font-family:Roboto,Arial,Helvetica,sans-serif}\n"] }]
|
|
@@ -704,7 +704,7 @@ class ButtonSecondaryComponent extends BaseComponentButton {
|
|
|
704
704
|
}
|
|
705
705
|
}
|
|
706
706
|
ButtonSecondaryComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ButtonSecondaryComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
707
|
-
ButtonSecondaryComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", type: ButtonSecondaryComponent, selector: "kv-button-secondary", usesInheritance: true, ngImport: i0, template: "<button\r\n pButton\r\n pRipple\r\n class=\"btn-secondary\"\r\n [icon]=\"icon\"\r\n [label]=\"label\"\r\n [loading]=\"loading\"\r\n (click)=\"click($event)\">\r\n</button>\r\n", styles: [".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}\n"], dependencies: [{ kind: "directive", type: i1$
|
|
707
|
+
ButtonSecondaryComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", type: ButtonSecondaryComponent, selector: "kv-button-secondary", usesInheritance: true, ngImport: i0, template: "<button\r\n pButton\r\n pRipple\r\n class=\"btn-secondary\"\r\n [icon]=\"icon\"\r\n [label]=\"label\"\r\n [loading]=\"loading\"\r\n (click)=\"click($event)\">\r\n</button>\r\n", styles: [".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}\n"], dependencies: [{ kind: "directive", type: i1$2.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { kind: "directive", type: i2$2.Ripple, selector: "[pRipple]" }] });
|
|
708
708
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ButtonSecondaryComponent, decorators: [{
|
|
709
709
|
type: Component,
|
|
710
710
|
args: [{ selector: 'kv-button-secondary', template: "<button\r\n pButton\r\n pRipple\r\n class=\"btn-secondary\"\r\n [icon]=\"icon\"\r\n [label]=\"label\"\r\n [loading]=\"loading\"\r\n (click)=\"click($event)\">\r\n</button>\r\n", styles: [".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}\n"] }]
|
|
@@ -716,7 +716,7 @@ class ButtonSuccessComponent extends BaseComponentButton {
|
|
|
716
716
|
}
|
|
717
717
|
}
|
|
718
718
|
ButtonSuccessComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ButtonSuccessComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
719
|
-
ButtonSuccessComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", type: ButtonSuccessComponent, selector: "kv-button-success", usesInheritance: true, ngImport: i0, template: "<button\r\n pButton\r\n pRipple\r\n class=\"btn-success\"\r\n [icon]=\"icon\"\r\n [label]=\"label\"\r\n [loading]=\"loading\"\r\n (click)=\"click($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}\n"], dependencies: [{ kind: "directive", type: i1$
|
|
719
|
+
ButtonSuccessComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", type: ButtonSuccessComponent, selector: "kv-button-success", usesInheritance: true, ngImport: i0, template: "<button\r\n pButton\r\n pRipple\r\n class=\"btn-success\"\r\n [icon]=\"icon\"\r\n [label]=\"label\"\r\n [loading]=\"loading\"\r\n (click)=\"click($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}\n"], dependencies: [{ kind: "directive", type: i1$2.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { kind: "directive", type: i2$2.Ripple, selector: "[pRipple]" }] });
|
|
720
720
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ButtonSuccessComponent, decorators: [{
|
|
721
721
|
type: Component,
|
|
722
722
|
args: [{ selector: 'kv-button-success', template: "<button\r\n pButton\r\n pRipple\r\n class=\"btn-success\"\r\n [icon]=\"icon\"\r\n [label]=\"label\"\r\n [loading]=\"loading\"\r\n (click)=\"click($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}\n"] }]
|
|
@@ -853,7 +853,6 @@ class TableComponent {
|
|
|
853
853
|
this.telefonePipe = telefonePipe;
|
|
854
854
|
this.globalFilterFields = [];
|
|
855
855
|
this.selectedSize = '';
|
|
856
|
-
this.lazy = true;
|
|
857
856
|
this.paginator = true;
|
|
858
857
|
this.rows = 5;
|
|
859
858
|
this.onActiveItem = new EventEmitter();
|
|
@@ -946,7 +945,7 @@ class TableComponent {
|
|
|
946
945
|
}
|
|
947
946
|
}
|
|
948
947
|
TableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: TableComponent, deps: [{ token: i1.DatePipe }, { token: i1.DecimalPipe }, { token: CodigoFipePipe }, { token: CpfCnpjPipe }, { token: TelefonePipe }], target: i0.ɵɵFactoryTarget.Component });
|
|
949
|
-
TableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", type: TableComponent, selector: "kv-table", inputs: { setConfig: ["config", "setConfig"], dataSource: "dataSource", selectedItems: "selectedItems", totalRecords: "totalRecords",
|
|
948
|
+
TableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", type: TableComponent, selector: "kv-table", inputs: { setConfig: ["config", "setConfig"], dataSource: "dataSource", selectedItems: "selectedItems", totalRecords: "totalRecords", paginator: "paginator", rowsPerPageOptions: "rowsPerPageOptions", rows: "rows" }, outputs: { onActiveItem: "onActiveItem", onPaginate: "onPaginate", onSelectionChange: "onSelectionChange" }, host: { listeners: { "window:resize": "onWindowResize($event)" } }, queries: [{ propertyName: "templates", predicate: TemplateDirective }], viewQueries: [{ propertyName: "table", first: true, predicate: ["table"], descendants: true }], ngImport: i0, template: "<p-table *ngIf=\"config\" #dt [styleClass]=\"this.tableSize < 800 ? 'p-datatable-sm': 'p-datatable-sm'\"\r\n [value]=\"dataSource\" [(selection)]=\"selectedItems\" [columns]=\"config.columns\"\r\n [globalFilterFields]=\"globalFilterFields\" [rows]=\"rows\" [paginator]=\"paginator\"\r\n [rowsPerPageOptions]=\"rowsPerPageOptions\" [showCurrentPageReport]=\"true\"\r\n currentPageReportTemplate=\"{first} - {last} de {totalRecords}\" [rowHover]=\"true\" [totalRecords]=\"totalRecords\"\r\n [lazy]=\"config.lazy\" (onLazyLoad)=\"paginate($event)\" (selectionChange)=\"selectionChange($event)\"\r\n rowGroupMode=\"rowspan\" [groupRowsBy]=\"config.fieldGroup\" [showFirstLastIcon]=\"false\"\r\n [tableStyle]=\"{ 'min-width': '36rem' }\" [pageLinks]=\"1\">\r\n\r\n <ng-template pTemplate=\"caption\" *ngIf=\"config.enableCation\">\r\n <div class=\"flex flex-column md:flex-row md:justify-content-between\r\n md:align-items-center table\">\r\n <h5 class=\"m-0\">{{ config.title }}</h5>\r\n <span *ngIf=\"config.enableFilter\" class=\"block mt-2 md:mt-0\r\n p-input-icon-left\">\r\n <i class=\"pi pi-search\"></i>\r\n <input pInputText pAutoFocus [autofocus]=\"true\" type=\"text\" (input)=\"onGlobalFilter(dt, $event)\"\r\n placeholder=\"Pesquisar...\" class=\"w-full sm:w-auto\" />\r\n </span>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n <th style=\"width: 4rem\" *ngIf=\"config.enableSelect\">\r\n <p-tableHeaderCheckbox></p-tableHeaderCheckbox>\r\n </th>\r\n <th *ngFor=\"let col of columns;\" [pSortableColumn]=\"col.field\" [pSortableColumnDisabled]=\"col.sortable === false\"\r\n [style.width]=\"col.width\" class=\"text-sm\">\r\n <div class=\"flex flex-row\">\r\n {{col.header}}\r\n <p-sortIcon *ngIf=\"col.sortable === true\" [field]=\"col.field\" style=\"font-size: 10px;\"></p-sortIcon>\r\n </div>\r\n\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 pTemplate=\"body\" let-rowData let-columns=\"columns\" let-rowgroup=\"rowgroup\" let-rowspan=\"rowspan\">\r\n <tr>\r\n <td *ngIf=\"config.enableSelect\">\r\n <p-tableCheckbox [value]=\"rowData\"></p-tableCheckbox>\r\n </td>\r\n\r\n <ng-container *ngFor=\"let col of columns\">\r\n\r\n <td *ngIf=\"rowgroup\" [attr.rowspan]=\"rowgroup && col.grouped? rowspan: null\">\r\n <span class=\"p-column-title\">{{col.header}}</span>\r\n <span *ngIf=\"!isBooleanField(rowData, col); else booleanField\" [class]=\"returnRowClass(rowData, col)\">\r\n {{ transformValue(rowData, col) }}\r\n </span>\r\n\r\n <ng-template #booleanField>\r\n <i [ngClass]=\"rowData[col.field] ? 'pi pi-check' : 'pi pi-times'\"></i>\r\n </ng-template>\r\n </td>\r\n\r\n <td *ngIf=\"!rowgroup && !col.grouped\">\r\n <span class=\"p-column-title\">{{col.header}}</span>\r\n <span *ngIf=\"!isBooleanField(rowData, col); else booleanField\" [class]=\"returnRowClass(rowData, col)\">\r\n {{ transformValue(rowData, col) }}\r\n </span>\r\n\r\n <ng-template #booleanField>\r\n <i [ngClass]=\"rowData[col.field] ? 'pi pi-check' : 'pi pi-times'\"></i>\r\n </ng-template>\r\n </td>\r\n\r\n </ng-container>\r\n\r\n <!-- <td *ngIf=\"config.actions && config.actions.length> 0\">\r\n <i class=\"pi pi-ellipsis-h\" style=\"cursor: pointer\"\r\n (click)=\"activeItem(rowData);menu.toggle($event)\"></i>\r\n </td> -->\r\n\r\n <td *ngIf=\"config.actions && config.actions.length> 0\" class=\"flex flex-row\">\r\n <div *ngFor=\"let action of config.actions\">\r\n <i class=\"pi {{action.icon}}\" style=\"cursor: pointer\" class=\"mr-2 ml-2\" (click)=\"action?.command()\"></i>\r\n </div>\r\n </td>\r\n\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"emptymessage\" let-columns>\r\n <tr>\r\n <td [attr.colspan]=\"columns.length\" style=\"text-align: center;\">\r\n Nenhum registro encontrado\r\n </td>\r\n </tr>\r\n </ng-template>\r\n</p-table>\r\n<p-menu #menu [popup]=\"true\" [model]=\"config.actions\"></p-menu>\r\n", styles: [""], 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$1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i6.AutoFocus, selector: "[pAutoFocus]", inputs: ["autofocus"] }, { kind: "directive", type: i4$5.InputText, selector: "[pInputText]" }, { kind: "component", type: i8$1.Menu, selector: "p-menu", inputs: ["model", "popup", "style", "styleClass", "appendTo", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onShow", "onHide"] }, { kind: "component", type: i9$1.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "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", "virtualRowHeight", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll"], outputs: ["selectAllChange", "selectionChange", "contextMenuSelectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i9$1.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "component", type: i9$1.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "component", type: i9$1.TableCheckbox, selector: "p-tableCheckbox", inputs: ["disabled", "value", "index", "inputId", "name", "required", "ariaLabel"] }, { kind: "component", type: i9$1.TableHeaderCheckbox, selector: "p-tableHeaderCheckbox", inputs: ["disabled", "inputId", "name", "ariaLabel"] }] });
|
|
950
949
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: TableComponent, decorators: [{
|
|
951
950
|
type: Component,
|
|
952
951
|
args: [{ selector: 'kv-table', template: "<p-table *ngIf=\"config\" #dt [styleClass]=\"this.tableSize < 800 ? 'p-datatable-sm': 'p-datatable-sm'\"\r\n [value]=\"dataSource\" [(selection)]=\"selectedItems\" [columns]=\"config.columns\"\r\n [globalFilterFields]=\"globalFilterFields\" [rows]=\"rows\" [paginator]=\"paginator\"\r\n [rowsPerPageOptions]=\"rowsPerPageOptions\" [showCurrentPageReport]=\"true\"\r\n currentPageReportTemplate=\"{first} - {last} de {totalRecords}\" [rowHover]=\"true\" [totalRecords]=\"totalRecords\"\r\n [lazy]=\"config.lazy\" (onLazyLoad)=\"paginate($event)\" (selectionChange)=\"selectionChange($event)\"\r\n rowGroupMode=\"rowspan\" [groupRowsBy]=\"config.fieldGroup\" [showFirstLastIcon]=\"false\"\r\n [tableStyle]=\"{ 'min-width': '36rem' }\" [pageLinks]=\"1\">\r\n\r\n <ng-template pTemplate=\"caption\" *ngIf=\"config.enableCation\">\r\n <div class=\"flex flex-column md:flex-row md:justify-content-between\r\n md:align-items-center table\">\r\n <h5 class=\"m-0\">{{ config.title }}</h5>\r\n <span *ngIf=\"config.enableFilter\" class=\"block mt-2 md:mt-0\r\n p-input-icon-left\">\r\n <i class=\"pi pi-search\"></i>\r\n <input pInputText pAutoFocus [autofocus]=\"true\" type=\"text\" (input)=\"onGlobalFilter(dt, $event)\"\r\n placeholder=\"Pesquisar...\" class=\"w-full sm:w-auto\" />\r\n </span>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n <th style=\"width: 4rem\" *ngIf=\"config.enableSelect\">\r\n <p-tableHeaderCheckbox></p-tableHeaderCheckbox>\r\n </th>\r\n <th *ngFor=\"let col of columns;\" [pSortableColumn]=\"col.field\" [pSortableColumnDisabled]=\"col.sortable === false\"\r\n [style.width]=\"col.width\" class=\"text-sm\">\r\n <div class=\"flex flex-row\">\r\n {{col.header}}\r\n <p-sortIcon *ngIf=\"col.sortable === true\" [field]=\"col.field\" style=\"font-size: 10px;\"></p-sortIcon>\r\n </div>\r\n\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 pTemplate=\"body\" let-rowData let-columns=\"columns\" let-rowgroup=\"rowgroup\" let-rowspan=\"rowspan\">\r\n <tr>\r\n <td *ngIf=\"config.enableSelect\">\r\n <p-tableCheckbox [value]=\"rowData\"></p-tableCheckbox>\r\n </td>\r\n\r\n <ng-container *ngFor=\"let col of columns\">\r\n\r\n <td *ngIf=\"rowgroup\" [attr.rowspan]=\"rowgroup && col.grouped? rowspan: null\">\r\n <span class=\"p-column-title\">{{col.header}}</span>\r\n <span *ngIf=\"!isBooleanField(rowData, col); else booleanField\" [class]=\"returnRowClass(rowData, col)\">\r\n {{ transformValue(rowData, col) }}\r\n </span>\r\n\r\n <ng-template #booleanField>\r\n <i [ngClass]=\"rowData[col.field] ? 'pi pi-check' : 'pi pi-times'\"></i>\r\n </ng-template>\r\n </td>\r\n\r\n <td *ngIf=\"!rowgroup && !col.grouped\">\r\n <span class=\"p-column-title\">{{col.header}}</span>\r\n <span *ngIf=\"!isBooleanField(rowData, col); else booleanField\" [class]=\"returnRowClass(rowData, col)\">\r\n {{ transformValue(rowData, col) }}\r\n </span>\r\n\r\n <ng-template #booleanField>\r\n <i [ngClass]=\"rowData[col.field] ? 'pi pi-check' : 'pi pi-times'\"></i>\r\n </ng-template>\r\n </td>\r\n\r\n </ng-container>\r\n\r\n <!-- <td *ngIf=\"config.actions && config.actions.length> 0\">\r\n <i class=\"pi pi-ellipsis-h\" style=\"cursor: pointer\"\r\n (click)=\"activeItem(rowData);menu.toggle($event)\"></i>\r\n </td> -->\r\n\r\n <td *ngIf=\"config.actions && config.actions.length> 0\" class=\"flex flex-row\">\r\n <div *ngFor=\"let action of config.actions\">\r\n <i class=\"pi {{action.icon}}\" style=\"cursor: pointer\" class=\"mr-2 ml-2\" (click)=\"action?.command()\"></i>\r\n </div>\r\n </td>\r\n\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"emptymessage\" let-columns>\r\n <tr>\r\n <td [attr.colspan]=\"columns.length\" style=\"text-align: center;\">\r\n Nenhum registro encontrado\r\n </td>\r\n </tr>\r\n </ng-template>\r\n</p-table>\r\n<p-menu #menu [popup]=\"true\" [model]=\"config.actions\"></p-menu>\r\n" }]
|
|
@@ -968,8 +967,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
|
|
|
968
967
|
type: Input
|
|
969
968
|
}], totalRecords: [{
|
|
970
969
|
type: Input
|
|
971
|
-
}], lazy: [{
|
|
972
|
-
type: Input
|
|
973
970
|
}], paginator: [{
|
|
974
971
|
type: Input
|
|
975
972
|
}], rowsPerPageOptions: [{
|
|
@@ -1360,6 +1357,70 @@ class TranslatePrimeng {
|
|
|
1360
1357
|
}
|
|
1361
1358
|
}
|
|
1362
1359
|
|
|
1360
|
+
class NotificationService {
|
|
1361
|
+
constructor(confirmationService, messageService) {
|
|
1362
|
+
this.confirmationService = confirmationService;
|
|
1363
|
+
this.messageService = messageService;
|
|
1364
|
+
}
|
|
1365
|
+
question(config) {
|
|
1366
|
+
this.confirmationService.confirm({
|
|
1367
|
+
header: config.type === 'alert' ? 'Atenção' : 'Confirmação',
|
|
1368
|
+
icon: `pi ${config.type === 'alert' ? 'pi-exclamation-triangle' : 'pi-question-circle'}`,
|
|
1369
|
+
acceptLabel: 'Sim',
|
|
1370
|
+
acceptButtonStyleClass: 'p-button-success',
|
|
1371
|
+
rejectLabel: 'Não',
|
|
1372
|
+
rejectButtonStyleClass: 'p-button-secondary',
|
|
1373
|
+
...config,
|
|
1374
|
+
});
|
|
1375
|
+
}
|
|
1376
|
+
dialog(config) {
|
|
1377
|
+
let dialogHeader;
|
|
1378
|
+
let dialogIcon;
|
|
1379
|
+
switch (config.type) {
|
|
1380
|
+
case 'alert':
|
|
1381
|
+
dialogHeader = 'Atenção';
|
|
1382
|
+
dialogIcon = 'pi pi-exclamation-triangle';
|
|
1383
|
+
break;
|
|
1384
|
+
case 'info':
|
|
1385
|
+
dialogHeader = 'Info';
|
|
1386
|
+
dialogIcon = 'pi pi-info-circle';
|
|
1387
|
+
break;
|
|
1388
|
+
case 'error':
|
|
1389
|
+
dialogHeader = 'Erro';
|
|
1390
|
+
dialogIcon = 'pi pi-times-circle';
|
|
1391
|
+
break;
|
|
1392
|
+
}
|
|
1393
|
+
this.confirmationService.confirm({
|
|
1394
|
+
header: dialogHeader,
|
|
1395
|
+
icon: dialogIcon,
|
|
1396
|
+
acceptLabel: 'Ok',
|
|
1397
|
+
acceptButtonStyleClass: 'p-button-success',
|
|
1398
|
+
rejectVisible: false,
|
|
1399
|
+
message: config.message,
|
|
1400
|
+
});
|
|
1401
|
+
}
|
|
1402
|
+
toastSuccess(message) {
|
|
1403
|
+
this.messageService.add({ severity: 'success', summary: 'Sucesso', detail: message });
|
|
1404
|
+
}
|
|
1405
|
+
toastInfo(message) {
|
|
1406
|
+
this.messageService.add({ severity: 'info', summary: 'Info', detail: message });
|
|
1407
|
+
}
|
|
1408
|
+
toastWarn(message) {
|
|
1409
|
+
this.messageService.add({ severity: 'warn', summary: 'Aviso', detail: message });
|
|
1410
|
+
}
|
|
1411
|
+
toastError(message) {
|
|
1412
|
+
this.messageService.add({ severity: 'error', summary: 'Erro', detail: message });
|
|
1413
|
+
}
|
|
1414
|
+
}
|
|
1415
|
+
NotificationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: NotificationService, deps: [{ token: i1$1.ConfirmationService }, { token: i1$1.MessageService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1416
|
+
NotificationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: NotificationService, providedIn: 'root' });
|
|
1417
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: NotificationService, decorators: [{
|
|
1418
|
+
type: Injectable,
|
|
1419
|
+
args: [{
|
|
1420
|
+
providedIn: 'root',
|
|
1421
|
+
}]
|
|
1422
|
+
}], ctorParameters: function () { return [{ type: i1$1.ConfirmationService }, { type: i1$1.MessageService }]; } });
|
|
1423
|
+
|
|
1363
1424
|
/*
|
|
1364
1425
|
* Public API Surface of keevo-components
|
|
1365
1426
|
*/
|
|
@@ -1368,5 +1429,5 @@ class TranslatePrimeng {
|
|
|
1368
1429
|
* Generated bundle index. Do not edit.
|
|
1369
1430
|
*/
|
|
1370
1431
|
|
|
1371
|
-
export { BaseComponent, BaseComponentButton, BaseComponentDropDown, BaseComponentInput, ButtonSecondaryComponent, ButtonSuccessComponent, CheckComponent, CodigoFipePipe, ComponentProviders, ComponentService, CpfCnpjPipe, DropdownComponent, ErrorComponent, InputCalendarComponent, InputMaskComponent, InputNumberComponent, InputPasswordComponent, InputTextComponent, InputTextareaComponent, InputTimeComponent, KeevoComponentsModule, KvButtonsModule, KvInputsModule, KvTableModule, MultiSelectComponent, ObjectService, PipesModule, PrimeNgModule, SwitchComponent, TableComponent, TelefonePipe, TranslatePrimeng, kvErrorModule };
|
|
1432
|
+
export { BaseComponent, BaseComponentButton, BaseComponentDropDown, BaseComponentInput, ButtonSecondaryComponent, ButtonSuccessComponent, CheckComponent, CodigoFipePipe, ComponentProviders, ComponentService, CpfCnpjPipe, DropdownComponent, ErrorComponent, InputCalendarComponent, InputMaskComponent, InputNumberComponent, InputPasswordComponent, InputTextComponent, InputTextareaComponent, InputTimeComponent, KeevoComponentsModule, KvButtonsModule, KvInputsModule, KvTableModule, MultiSelectComponent, NotificationService, ObjectService, PipesModule, PrimeNgModule, SwitchComponent, TableComponent, TelefonePipe, TranslatePrimeng, kvErrorModule };
|
|
1372
1433
|
//# sourceMappingURL=keevo-components.mjs.map
|