keevo-components 1.8.154 → 1.8.156

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.
@@ -115,6 +115,7 @@ import * as i12$1 from 'primeng/tieredmenu';
115
115
  import * as i8$1 from '@angular/cdk/drag-drop';
116
116
  import { moveItemInArray } from '@angular/cdk/drag-drop';
117
117
  import { AutoCompleteModule } from 'primeng/autocomplete';
118
+ import * as i1$7 from '@angular/platform-browser';
118
119
 
119
120
  class BaseComponentButton {
120
121
  constructor() {
@@ -1213,6 +1214,17 @@ class BaseComponentDropDown extends BaseComponentInput {
1213
1214
  this.onSelectionChange = new EventEmitter();
1214
1215
  this.onSelectionValue = new EventEmitter();
1215
1216
  this.requestComplete = new EventEmitter();
1217
+ this.loading = false;
1218
+ this.loadingCombo = () => {
1219
+ if (!this.lazy) {
1220
+ return (src) => {
1221
+ this.loading = true;
1222
+ return src.pipe(finalize(() => {
1223
+ this.loading = false;
1224
+ }));
1225
+ };
1226
+ }
1227
+ };
1216
1228
  this.registerOnTouched(() => { });
1217
1229
  }
1218
1230
  ngOnInit() {
@@ -1235,6 +1247,7 @@ class BaseComponentDropDown extends BaseComponentInput {
1235
1247
  carregarComboObs(obs) {
1236
1248
  if (obs) {
1237
1249
  obs
1250
+ .pipe(this.loadingCombo())
1238
1251
  .pipe(debounceTime(450))
1239
1252
  .subscribe({
1240
1253
  next: (data) => {
@@ -1248,6 +1261,9 @@ class BaseComponentDropDown extends BaseComponentInput {
1248
1261
  });
1249
1262
  }
1250
1263
  }
1264
+ emptyMessage() {
1265
+ return (this.lazy ? 'Digite para pesquisar' : 'Nenhum resultado encontrado');
1266
+ }
1251
1267
  filterOptions(field, value) {
1252
1268
  if (this.options) {
1253
1269
  let lista = ObjectService.filterObject(this.options, field, value);
@@ -1396,11 +1412,11 @@ class KvDropdownComponent extends BaseComponentDropDown {
1396
1412
  this.value = this.dropDowValue;
1397
1413
  }
1398
1414
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvDropdownComponent, deps: [{ token: ComponentService }, { token: i1$3.DialogService }], target: i0.ɵɵFactoryTarget.Component }); }
1399
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.8", type: KvDropdownComponent, selector: "kv-dropdown", inputs: { dropDowValue: "dropDowValue", itemTemplate: "itemTemplate", selectedItemTemplate: "selectedItemTemplate" }, providers: ComponentProviders(KvDropdownComponent), usesInheritance: true, ngImport: i0, template: "<span>\r\n <kv-label\r\n [componentId]=\"componentId\"\r\n [label]=\"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]=\"filteredOptions\"\r\n [optionLabel]=\"optionLabel\"\r\n [optionValue]=\"optionValue\"\r\n [optionDisabled]=\"optionDisabled\"\r\n [group]=\"group\"\r\n [optionGroupLabel]=\"optionGroupLabel\"\r\n [optionGroupChildren]=\"optionGroupChildren\"\r\n [showClear]=\"showClear\"\r\n [lazy]=\"lazy\"\r\n scrollHeight=\"250px\"\r\n (onBlur)=\"onInputBlur($event)\"\r\n (onClick)=\"onInputClick($event)\"\r\n (onChange)=\"onInputChange($event)\"\r\n (onFilter)=\"onInputFilter($event)\"\r\n [style]=\"{'width':widthField}\"\r\n [panelStyle]=\"{ width: widthField, overflow: 'auto' }\"\r\n styleClass=\"inputs\"\r\n >\r\n\r\n <ng-template\r\n *ngIf=\"showAddButton\"\r\n pTemplate=\"footer\"\r\n >\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)\"\r\n ></button>\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n\r\n\r\n\r\n <!-- :: -->\r\n\r\n <ng-template\r\n let-item\r\n pTemplate=\"item\"\r\n *ngIf=\"itemTemplate\"\r\n >\r\n <ng-container\r\n [ngTemplateOutlet]=\"itemTemplate\"\r\n [ngTemplateOutletContext]=\"{ $implicit: item }\"\r\n >\r\n\r\n </ng-container>\r\n </ng-template>\r\n\r\n\r\n <ng-template\r\n let-selectedItem\r\n pTemplate=\"selectedItem\"\r\n *ngIf=\"selectedItemTemplate\"\r\n >\r\n <ng-container\r\n [ngTemplateOutlet]=\"selectedItemTemplate\"\r\n [ngTemplateOutletContext]=\"{ $implicit: selectedItem }\"\r\n >\r\n\r\n </ng-container>\r\n </ng-template>\r\n\r\n <!-- :: -->\r\n\r\n\r\n </p-dropdown>\r\n\r\n <kv-error [hasError]=\"hasControlError()\">{{ erroMessage() }}</kv-error>\r\n</span>\r\n<ng-content></ng-content>\r\n", styles: ["::ng-deep .p-dropdown .p-dropdown-label{display:flex;align-items:center}::ng-deep .p-dropdown{width:100%}@media only screen and (min-width: 700px){::ng-deep .p-dropdown-panel{max-width:700px}}@media only screen and (max-width: 700px){::ng-deep .p-dropdown-panel{max-width:400px}}\n", "label{font-family:Inter var,Roboto,Arial,Helvetica,sans-serif}:host ::ng-deep .inputs{height:35px}*{margin:0}\n"], dependencies: [{ 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: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: KvErrorComponent, selector: "kv-error", inputs: ["formControl", "hasError"] }, { kind: "component", type: KvLabelComponent, selector: "kv-label", inputs: ["componentId", "label"] }, { kind: "directive", type: i1$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { 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: i10.Divider, selector: "p-divider", inputs: ["style", "styleClass", "layout", "type", "align"] }, { kind: "component", type: i4.Dropdown, selector: "p-dropdown", inputs: ["id", "scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "variant", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "disabled", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "filterValue", "options"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }] }); }
1415
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.8", type: KvDropdownComponent, selector: "kv-dropdown", inputs: { dropDowValue: "dropDowValue", itemTemplate: "itemTemplate", selectedItemTemplate: "selectedItemTemplate" }, providers: ComponentProviders(KvDropdownComponent), usesInheritance: true, ngImport: i0, template: "<span>\r\n <kv-label\r\n [componentId]=\"componentId\"\r\n [label]=\"label\"\r\n />\r\n <p-dropdown\r\n appendTo=\"body\"\r\n scrollHeight=\"250px\"\r\n styleClass=\"inputs\"\r\n [(ngModel)]=\"value\"\r\n [class]=\"baseInputClass\"\r\n [disabled]=\"disabled\"\r\n [emptyMessage]=\"emptyMessage()\"\r\n [filter]=\"filter\"\r\n [group]=\"group\"\r\n [inputId]=\"componentId\"\r\n [lazy]=\"lazy\"\r\n [loading]=\"loading\"\r\n [optionDisabled]=\"optionDisabled\"\r\n [optionGroupChildren]=\"optionGroupChildren\"\r\n [optionGroupLabel]=\"optionGroupLabel\"\r\n [optionLabel]=\"optionLabel\"\r\n [options]=\"filteredOptions\"\r\n [optionValue]=\"optionValue\"\r\n [panelStyle]=\"{ width: widthField, overflow: 'auto' }\"\r\n [showClear]=\"showClear\"\r\n [style]=\"{'width':widthField}\"\r\n (onBlur)=\"onInputBlur($event)\"\r\n (onChange)=\"onInputChange($event)\"\r\n (onClick)=\"onInputClick($event)\"\r\n (onFilter)=\"onInputFilter($event)\"\r\n >\r\n\r\n <ng-template\r\n *ngIf=\"showAddButton\"\r\n pTemplate=\"footer\"\r\n >\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)\"\r\n ></button>\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n <!-- :: -->\r\n\r\n <ng-template\r\n let-item\r\n pTemplate=\"item\"\r\n *ngIf=\"itemTemplate\"\r\n >\r\n <ng-container\r\n [ngTemplateOutlet]=\"itemTemplate\"\r\n [ngTemplateOutletContext]=\"{ $implicit: item }\"\r\n >\r\n\r\n </ng-container>\r\n </ng-template>\r\n\r\n\r\n <ng-template\r\n let-selectedItem\r\n pTemplate=\"selectedItem\"\r\n *ngIf=\"selectedItemTemplate\"\r\n >\r\n <ng-container\r\n [ngTemplateOutlet]=\"selectedItemTemplate\"\r\n [ngTemplateOutletContext]=\"{ $implicit: selectedItem }\"\r\n >\r\n\r\n </ng-container>\r\n </ng-template>\r\n\r\n <!-- :: -->\r\n\r\n </p-dropdown>\r\n\r\n <kv-error [hasError]=\"hasControlError()\">{{ erroMessage() }}</kv-error>\r\n</span>\r\n<ng-content></ng-content>\r\n", styles: ["::ng-deep .p-dropdown .p-dropdown-label{display:flex;align-items:center}::ng-deep .p-dropdown{width:100%}@media only screen and (min-width: 700px){::ng-deep .p-dropdown-panel{max-width:700px}}@media only screen and (max-width: 700px){::ng-deep .p-dropdown-panel{max-width:400px}}\n", "label{font-family:Inter var,Roboto,Arial,Helvetica,sans-serif}:host ::ng-deep .inputs{height:35px}*{margin:0}\n"], dependencies: [{ 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: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: KvErrorComponent, selector: "kv-error", inputs: ["formControl", "hasError"] }, { kind: "component", type: KvLabelComponent, selector: "kv-label", inputs: ["componentId", "label"] }, { kind: "directive", type: i1$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { 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: i10.Divider, selector: "p-divider", inputs: ["style", "styleClass", "layout", "type", "align"] }, { kind: "component", type: i4.Dropdown, selector: "p-dropdown", inputs: ["id", "scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "variant", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "disabled", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "filterValue", "options"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }] }); }
1400
1416
  }
1401
1417
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvDropdownComponent, decorators: [{
1402
1418
  type: Component,
1403
- args: [{ selector: 'kv-dropdown', providers: ComponentProviders(KvDropdownComponent), template: "<span>\r\n <kv-label\r\n [componentId]=\"componentId\"\r\n [label]=\"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]=\"filteredOptions\"\r\n [optionLabel]=\"optionLabel\"\r\n [optionValue]=\"optionValue\"\r\n [optionDisabled]=\"optionDisabled\"\r\n [group]=\"group\"\r\n [optionGroupLabel]=\"optionGroupLabel\"\r\n [optionGroupChildren]=\"optionGroupChildren\"\r\n [showClear]=\"showClear\"\r\n [lazy]=\"lazy\"\r\n scrollHeight=\"250px\"\r\n (onBlur)=\"onInputBlur($event)\"\r\n (onClick)=\"onInputClick($event)\"\r\n (onChange)=\"onInputChange($event)\"\r\n (onFilter)=\"onInputFilter($event)\"\r\n [style]=\"{'width':widthField}\"\r\n [panelStyle]=\"{ width: widthField, overflow: 'auto' }\"\r\n styleClass=\"inputs\"\r\n >\r\n\r\n <ng-template\r\n *ngIf=\"showAddButton\"\r\n pTemplate=\"footer\"\r\n >\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)\"\r\n ></button>\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n\r\n\r\n\r\n <!-- :: -->\r\n\r\n <ng-template\r\n let-item\r\n pTemplate=\"item\"\r\n *ngIf=\"itemTemplate\"\r\n >\r\n <ng-container\r\n [ngTemplateOutlet]=\"itemTemplate\"\r\n [ngTemplateOutletContext]=\"{ $implicit: item }\"\r\n >\r\n\r\n </ng-container>\r\n </ng-template>\r\n\r\n\r\n <ng-template\r\n let-selectedItem\r\n pTemplate=\"selectedItem\"\r\n *ngIf=\"selectedItemTemplate\"\r\n >\r\n <ng-container\r\n [ngTemplateOutlet]=\"selectedItemTemplate\"\r\n [ngTemplateOutletContext]=\"{ $implicit: selectedItem }\"\r\n >\r\n\r\n </ng-container>\r\n </ng-template>\r\n\r\n <!-- :: -->\r\n\r\n\r\n </p-dropdown>\r\n\r\n <kv-error [hasError]=\"hasControlError()\">{{ erroMessage() }}</kv-error>\r\n</span>\r\n<ng-content></ng-content>\r\n", styles: ["::ng-deep .p-dropdown .p-dropdown-label{display:flex;align-items:center}::ng-deep .p-dropdown{width:100%}@media only screen and (min-width: 700px){::ng-deep .p-dropdown-panel{max-width:700px}}@media only screen and (max-width: 700px){::ng-deep .p-dropdown-panel{max-width:400px}}\n", "label{font-family:Inter var,Roboto,Arial,Helvetica,sans-serif}:host ::ng-deep .inputs{height:35px}*{margin:0}\n"] }]
1419
+ args: [{ selector: 'kv-dropdown', providers: ComponentProviders(KvDropdownComponent), template: "<span>\r\n <kv-label\r\n [componentId]=\"componentId\"\r\n [label]=\"label\"\r\n />\r\n <p-dropdown\r\n appendTo=\"body\"\r\n scrollHeight=\"250px\"\r\n styleClass=\"inputs\"\r\n [(ngModel)]=\"value\"\r\n [class]=\"baseInputClass\"\r\n [disabled]=\"disabled\"\r\n [emptyMessage]=\"emptyMessage()\"\r\n [filter]=\"filter\"\r\n [group]=\"group\"\r\n [inputId]=\"componentId\"\r\n [lazy]=\"lazy\"\r\n [loading]=\"loading\"\r\n [optionDisabled]=\"optionDisabled\"\r\n [optionGroupChildren]=\"optionGroupChildren\"\r\n [optionGroupLabel]=\"optionGroupLabel\"\r\n [optionLabel]=\"optionLabel\"\r\n [options]=\"filteredOptions\"\r\n [optionValue]=\"optionValue\"\r\n [panelStyle]=\"{ width: widthField, overflow: 'auto' }\"\r\n [showClear]=\"showClear\"\r\n [style]=\"{'width':widthField}\"\r\n (onBlur)=\"onInputBlur($event)\"\r\n (onChange)=\"onInputChange($event)\"\r\n (onClick)=\"onInputClick($event)\"\r\n (onFilter)=\"onInputFilter($event)\"\r\n >\r\n\r\n <ng-template\r\n *ngIf=\"showAddButton\"\r\n pTemplate=\"footer\"\r\n >\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)\"\r\n ></button>\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n <!-- :: -->\r\n\r\n <ng-template\r\n let-item\r\n pTemplate=\"item\"\r\n *ngIf=\"itemTemplate\"\r\n >\r\n <ng-container\r\n [ngTemplateOutlet]=\"itemTemplate\"\r\n [ngTemplateOutletContext]=\"{ $implicit: item }\"\r\n >\r\n\r\n </ng-container>\r\n </ng-template>\r\n\r\n\r\n <ng-template\r\n let-selectedItem\r\n pTemplate=\"selectedItem\"\r\n *ngIf=\"selectedItemTemplate\"\r\n >\r\n <ng-container\r\n [ngTemplateOutlet]=\"selectedItemTemplate\"\r\n [ngTemplateOutletContext]=\"{ $implicit: selectedItem }\"\r\n >\r\n\r\n </ng-container>\r\n </ng-template>\r\n\r\n <!-- :: -->\r\n\r\n </p-dropdown>\r\n\r\n <kv-error [hasError]=\"hasControlError()\">{{ erroMessage() }}</kv-error>\r\n</span>\r\n<ng-content></ng-content>\r\n", styles: ["::ng-deep .p-dropdown .p-dropdown-label{display:flex;align-items:center}::ng-deep .p-dropdown{width:100%}@media only screen and (min-width: 700px){::ng-deep .p-dropdown-panel{max-width:700px}}@media only screen and (max-width: 700px){::ng-deep .p-dropdown-panel{max-width:400px}}\n", "label{font-family:Inter var,Roboto,Arial,Helvetica,sans-serif}:host ::ng-deep .inputs{height:35px}*{margin:0}\n"] }]
1404
1420
  }], ctorParameters: () => [{ type: ComponentService }, { type: i1$3.DialogService }], propDecorators: { dropDowValue: [{
1405
1421
  type: Input
1406
1422
  }], itemTemplate: [{
@@ -4898,6 +4914,8 @@ class KvTableComponent {
4898
4914
  this.isRowSelectable = this.isRowSelectable.bind(this);
4899
4915
  }
4900
4916
  ngDoCheck() {
4917
+ if (this.dataSource)
4918
+ this.dataSource = [...this.dataSource];
4901
4919
  if (JSON.stringify(this.dataSource) !== JSON.stringify(this.currDataSource)) {
4902
4920
  if (this.dataSource) {
4903
4921
  this.createTableActions();
@@ -4916,13 +4934,20 @@ class KvTableComponent {
4916
4934
  this.checkHideColumns();
4917
4935
  if (this.defaultSortField && this.dataSource) {
4918
4936
  this.dataSource.sort((a, b) => {
4919
- if (typeof a[this.defaultSortField] === 'string' && typeof b[this.defaultSortField] === 'string') {
4937
+ if (typeof a[this.defaultSortField] === 'string' &&
4938
+ typeof b[this.defaultSortField] === 'string') {
4920
4939
  return a[this.defaultSortField].localeCompare(b[this.defaultSortField]);
4921
4940
  }
4922
- else if (typeof a[this.defaultSortField] === 'boolean' && typeof b[this.defaultSortField] === 'boolean') {
4923
- return a[this.defaultSortField] === b[this.defaultSortField] ? 0 : (a[this.defaultSortField] ? 1 : -1);
4941
+ else if (typeof a[this.defaultSortField] === 'boolean' &&
4942
+ typeof b[this.defaultSortField] === 'boolean') {
4943
+ return a[this.defaultSortField] === b[this.defaultSortField]
4944
+ ? 0
4945
+ : a[this.defaultSortField]
4946
+ ? 1
4947
+ : -1;
4924
4948
  }
4925
- else if (typeof a[this.defaultSortField] === 'number' && typeof b[this.defaultSortField] === 'number') {
4949
+ else if (typeof a[this.defaultSortField] === 'number' &&
4950
+ typeof b[this.defaultSortField] === 'number') {
4926
4951
  return a[this.defaultSortField] - b[this.defaultSortField];
4927
4952
  }
4928
4953
  else {
@@ -5119,7 +5144,7 @@ class KvTableComponent {
5119
5144
  }
5120
5145
  deleteColumn(field) {
5121
5146
  let index;
5122
- let column = this.config.columns.find(x => x.field == field);
5147
+ let column = this.config.columns.find((x) => x.field == field);
5123
5148
  if (column) {
5124
5149
  index = this.config.columns.indexOf(column);
5125
5150
  this.config.columns.splice(index, 1);
@@ -5128,9 +5153,9 @@ class KvTableComponent {
5128
5153
  }
5129
5154
  addColumn(field) {
5130
5155
  let index;
5131
- let column = this.config.columns.find(x => x.field == field);
5156
+ let column = this.config.columns.find((x) => x.field == field);
5132
5157
  if (!column) {
5133
- let deletedColumn = this.deletedColuns.find(x => x.field == field);
5158
+ let deletedColumn = this.deletedColuns.find((x) => x.field == field);
5134
5159
  if (deletedColumn != undefined) {
5135
5160
  index = this.deletedColuns.indexOf(deletedColumn);
5136
5161
  this.deletedColuns.slice(index, 1);
@@ -5230,12 +5255,14 @@ class KvTableComponent {
5230
5255
  this.onSwitchTableChange.emit({
5231
5256
  estado: estado,
5232
5257
  rowData: rowData,
5233
- col: col
5258
+ col: col,
5234
5259
  });
5235
5260
  rowData[col.field] = estado;
5236
5261
  }
5237
5262
  createTableActions() {
5238
- this.tableActions = this.dataSource.map(x => (this.config.actions ? this.config.actions.map(y => mapToMenuItem(y, x)) : []));
5263
+ this.tableActions = this.dataSource.map((x) => this.config.actions
5264
+ ? this.config.actions.map((y) => mapToMenuItem(y, x))
5265
+ : []);
5239
5266
  }
5240
5267
  onSort(e) {
5241
5268
  this.dataSource = [...this.dataSource];
@@ -6627,6 +6654,51 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImpor
6627
6654
  }]
6628
6655
  }] });
6629
6656
 
6657
+ class KvFileViewerComponent {
6658
+ constructor(sanitizer) {
6659
+ this.sanitizer = sanitizer;
6660
+ }
6661
+ ngOnInit() {
6662
+ if (this.type == 'text/xml' || this.type == 'application/xml')
6663
+ this.visualizarXml();
6664
+ }
6665
+ getSanitizer(url) {
6666
+ return this.sanitizer.bypassSecurityTrustResourceUrl(url);
6667
+ }
6668
+ async visualizarXml() {
6669
+ const text = await new Response(this.blob).text();
6670
+ //this.xmlFormat = vkbeautify.xml(text);
6671
+ }
6672
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvFileViewerComponent, deps: [{ token: i1$7.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component }); }
6673
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.8", type: KvFileViewerComponent, selector: "kv-file-viewer", inputs: { arquivo: "arquivo", type: "type", blob: "blob" }, ngImport: i0, template: "<img *ngIf=\"type.match('image')\" [src]=\"getSanitizer(arquivo)\" />\r\n\r\n<iframe *ngIf=\"type == 'text/plain'\" [src]=\"getSanitizer(arquivo)\"> </iframe>\r\n\r\n<div *ngIf=\"xmlFormat\">\r\n <pre lang=\"xml\">\r\n {{ xmlFormat }}\r\n </pre>\r\n</div>\r\n", styles: [""], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
6674
+ }
6675
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvFileViewerComponent, decorators: [{
6676
+ type: Component,
6677
+ args: [{ selector: 'kv-file-viewer', template: "<img *ngIf=\"type.match('image')\" [src]=\"getSanitizer(arquivo)\" />\r\n\r\n<iframe *ngIf=\"type == 'text/plain'\" [src]=\"getSanitizer(arquivo)\"> </iframe>\r\n\r\n<div *ngIf=\"xmlFormat\">\r\n <pre lang=\"xml\">\r\n {{ xmlFormat }}\r\n </pre>\r\n</div>\r\n" }]
6678
+ }], ctorParameters: () => [{ type: i1$7.DomSanitizer }], propDecorators: { arquivo: [{
6679
+ type: Input
6680
+ }], type: [{
6681
+ type: Input
6682
+ }], blob: [{
6683
+ type: Input
6684
+ }] } });
6685
+
6686
+ class KvFileViewerModule {
6687
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvFileViewerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
6688
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.8", ngImport: i0, type: KvFileViewerModule, declarations: [KvFileViewerComponent], imports: [CommonModule], exports: [KvFileViewerComponent] }); }
6689
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvFileViewerModule, imports: [CommonModule] }); }
6690
+ }
6691
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvFileViewerModule, decorators: [{
6692
+ type: NgModule,
6693
+ args: [{
6694
+ declarations: [KvFileViewerComponent],
6695
+ imports: [
6696
+ CommonModule
6697
+ ],
6698
+ exports: [KvFileViewerComponent]
6699
+ }]
6700
+ }] });
6701
+
6630
6702
  class KeevoComponentsModule {
6631
6703
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KeevoComponentsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
6632
6704
  static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.8", ngImport: i0, type: KeevoComponentsModule, imports: [KvAvatarModule,
@@ -6650,7 +6722,8 @@ class KeevoComponentsModule {
6650
6722
  KvImageUploadModule,
6651
6723
  KvTableExpandableModule,
6652
6724
  KvGIconModule,
6653
- KvFilterCardModule], exports: [KvAvatarModule,
6725
+ KvFilterCardModule,
6726
+ KvFileViewerModule], exports: [KvAvatarModule,
6654
6727
  KvButtonsModule,
6655
6728
  KvCarouselModule,
6656
6729
  KvChartModule,
@@ -6672,7 +6745,8 @@ class KeevoComponentsModule {
6672
6745
  KvImageUploadModule,
6673
6746
  KvTableExpandableModule,
6674
6747
  KvGIconModule,
6675
- KvFilterCardModule] }); }
6748
+ KvFilterCardModule,
6749
+ KvFileViewerModule] }); }
6676
6750
  static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KeevoComponentsModule, imports: [KvAvatarModule,
6677
6751
  KvButtonsModule,
6678
6752
  KvCarouselModule,
@@ -6694,7 +6768,8 @@ class KeevoComponentsModule {
6694
6768
  KvImageUploadModule,
6695
6769
  KvTableExpandableModule,
6696
6770
  KvGIconModule,
6697
- KvFilterCardModule, KvAvatarModule,
6771
+ KvFilterCardModule,
6772
+ KvFileViewerModule, KvAvatarModule,
6698
6773
  KvButtonsModule,
6699
6774
  KvCarouselModule,
6700
6775
  KvChartModule,
@@ -6716,7 +6791,8 @@ class KeevoComponentsModule {
6716
6791
  KvImageUploadModule,
6717
6792
  KvTableExpandableModule,
6718
6793
  KvGIconModule,
6719
- KvFilterCardModule] }); }
6794
+ KvFilterCardModule,
6795
+ KvFileViewerModule] }); }
6720
6796
  }
6721
6797
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KeevoComponentsModule, decorators: [{
6722
6798
  type: NgModule,
@@ -6744,7 +6820,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImpor
6744
6820
  KvImageUploadModule,
6745
6821
  KvTableExpandableModule,
6746
6822
  KvGIconModule,
6747
- KvFilterCardModule
6823
+ KvFilterCardModule,
6824
+ KvFileViewerModule
6748
6825
  ],
6749
6826
  exports: [
6750
6827
  KvAvatarModule,
@@ -6769,7 +6846,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImpor
6769
6846
  KvImageUploadModule,
6770
6847
  KvTableExpandableModule,
6771
6848
  KvGIconModule,
6772
- KvFilterCardModule
6849
+ KvFilterCardModule,
6850
+ KvFileViewerModule
6773
6851
  ]
6774
6852
  }]
6775
6853
  }] });
@@ -6853,5 +6931,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImpor
6853
6931
  * Generated bundle index. Do not edit.
6854
6932
  */
6855
6933
 
6856
- export { BaseApiService, BaseChartComponent, BaseComponent, BaseComponentButton, BaseComponentCrud, BaseComponentCrudForm, BaseComponentCrudList, BaseComponentDropDown, BaseComponentDropDownExternal, BaseComponentInput, BaseComponentMultiSelect, BasecomponentTable, BreadcrumbsService, CapitalizePipe, ComponentProviders, ComponentService, CpfCnpjPipe, FormService, KeevoComponentsModule, KeevoValidators, KvAvatarComponent, KvAvatarModule, KvButtonPersonalizeComponent, KvButtonPopupComponent, KvButtonSecondaryComponent, KvButtonSuccessComponent, KvButtonsModule, KvCarouselComponent, KvCarouselModule, KvChartComponent, KvChartModule, KvCheckComponent, KvDropdownComponent, KvEditorComponent, KvErrorComponent, KvFilterCardComponent, KvFilterCardModule, KvGIconComponent, KvGIconModule, KvImageUploadComponent, KvImageUploadModule, KvInputCalendarComponent, KvInputMaskComponent, KvInputNumberComponent, KvInputPasswordComponent, KvInputTextCheckboxComponent, KvInputTextComponent, KvInputTextareaComponent, KvInputTimeComponent, KvInputsModule, KvLoaderComponent, KvLoaderModule, KvLoaderService, KvLoginComponent, KvLoginModule, KvMenuComponent, KvMenuModule, KvModalComponent, KvModalModule, KvMultiSelectComponent, KvOrgchartComponent, KvOrgchartModule, KvPageFormComponent, KvPageFormModule, KvPickListComponent, KvPickListModule, KvProgressBarModule, KvRadioGroupComponent, KvReportComponent, KvReportModule, KvSelectButtonComponent, KvStepperComponent, KvStepperModule, KvSwitchComponent, KvTableComponent, KvTableEditComponent, KvTableEditModule, KvTableExpandableComponent, KvTableExpandableModule, KvTableModule, KvTreeViewComponent, KvTreetableComponent, KvTreetableModule, KvWorkspaceModule, KvtreeViewModule, MaskPipe, NotificationService, ObjectService, PeriodosChart, PipesModule, PrimeNgModule, ProgressBarComponent, TablePaginate, TelefonePipe, TranslatePrimeng, WorkspaceComponent, getOrExecute, kvErrorModule, loading, mapToMenuItem };
6934
+ export { BaseApiService, BaseChartComponent, BaseComponent, BaseComponentButton, BaseComponentCrud, BaseComponentCrudForm, BaseComponentCrudList, BaseComponentDropDown, BaseComponentDropDownExternal, BaseComponentInput, BaseComponentMultiSelect, BasecomponentTable, BreadcrumbsService, CapitalizePipe, ComponentProviders, ComponentService, CpfCnpjPipe, FormService, KeevoComponentsModule, KeevoValidators, KvAvatarComponent, KvAvatarModule, KvButtonPersonalizeComponent, KvButtonPopupComponent, KvButtonSecondaryComponent, KvButtonSuccessComponent, KvButtonsModule, KvCarouselComponent, KvCarouselModule, KvChartComponent, KvChartModule, KvCheckComponent, KvDropdownComponent, KvEditorComponent, KvErrorComponent, KvFileViewerComponent, KvFileViewerModule, KvFilterCardComponent, KvFilterCardModule, KvGIconComponent, KvGIconModule, KvImageUploadComponent, KvImageUploadModule, KvInputCalendarComponent, KvInputMaskComponent, KvInputNumberComponent, KvInputPasswordComponent, KvInputTextCheckboxComponent, KvInputTextComponent, KvInputTextareaComponent, KvInputTimeComponent, KvInputsModule, KvLoaderComponent, KvLoaderModule, KvLoaderService, KvLoginComponent, KvLoginModule, KvMenuComponent, KvMenuModule, KvModalComponent, KvModalModule, KvMultiSelectComponent, KvOrgchartComponent, KvOrgchartModule, KvPageFormComponent, KvPageFormModule, KvPickListComponent, KvPickListModule, KvProgressBarModule, KvRadioGroupComponent, KvReportComponent, KvReportModule, KvSelectButtonComponent, KvStepperComponent, KvStepperModule, KvSwitchComponent, KvTableComponent, KvTableEditComponent, KvTableEditModule, KvTableExpandableComponent, KvTableExpandableModule, KvTableModule, KvTreeViewComponent, KvTreetableComponent, KvTreetableModule, KvWorkspaceModule, KvtreeViewModule, MaskPipe, NotificationService, ObjectService, PeriodosChart, PipesModule, PrimeNgModule, ProgressBarComponent, TablePaginate, TelefonePipe, TranslatePrimeng, WorkspaceComponent, getOrExecute, kvErrorModule, loading, mapToMenuItem };
6857
6935
  //# sourceMappingURL=keevo-components.mjs.map