keevo-components 1.1.1 → 1.1.3
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/components/table/action-item.mjs +2 -0
- package/esm2020/lib/table/table.component.mjs +29 -28
- package/esm2020/public-api.mjs +5 -1
- package/fesm2015/keevo-components.mjs +38 -28
- package/fesm2015/keevo-components.mjs.map +1 -1
- package/fesm2020/keevo-components.mjs +38 -28
- package/fesm2020/keevo-components.mjs.map +1 -1
- package/lib/api/components/table/action-item.d.ts +5 -0
- package/package.json +1 -1
- package/public-api.d.ts +4 -0
|
@@ -886,7 +886,6 @@ class TableComponent {
|
|
|
886
886
|
table.filterGlobal(event.target.value, 'contains');
|
|
887
887
|
}
|
|
888
888
|
paginate(event) {
|
|
889
|
-
console.log(event, 'oioi');
|
|
890
889
|
if (event) {
|
|
891
890
|
let paginaInicial = ((event?.first > 0) ? (event.first / event.rows) : event.first) + 1;
|
|
892
891
|
let termoPesquisa = '';
|
|
@@ -919,33 +918,35 @@ class TableComponent {
|
|
|
919
918
|
}
|
|
920
919
|
transformValue(rowData, col) {
|
|
921
920
|
let value = rowData[col.field];
|
|
922
|
-
if (
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
if (
|
|
928
|
-
|
|
921
|
+
if (value != null) {
|
|
922
|
+
if (col.field == 'vencimento')
|
|
923
|
+
return value.toLocaleDateString();
|
|
924
|
+
if (col.field == 'valor')
|
|
925
|
+
return value.toFixed(2);
|
|
926
|
+
else if (!col.pipe) {
|
|
927
|
+
if (value.length > 25 && this.tableSize < 400) {
|
|
928
|
+
return `${value.slice(0, 25)}...`;
|
|
929
|
+
}
|
|
930
|
+
else
|
|
931
|
+
return value;
|
|
932
|
+
}
|
|
933
|
+
switch (col.pipe) {
|
|
934
|
+
case 'date':
|
|
935
|
+
value = this.datePipe.transform(value, 'dd/MM/yyyy');
|
|
936
|
+
break;
|
|
937
|
+
case 'decimal':
|
|
938
|
+
value = this.decimalPipe.transform(value, '1.2-2', 'pt-BR');
|
|
939
|
+
break;
|
|
940
|
+
case 'cpfcnpj':
|
|
941
|
+
value = this.cpfCnpjPipe.transform(value);
|
|
942
|
+
break;
|
|
943
|
+
case 'telefone':
|
|
944
|
+
value = this.telefonePipe.transform(value);
|
|
945
|
+
break;
|
|
946
|
+
case 'codigofipe':
|
|
947
|
+
value = this.codigoFipePipe.transform(value);
|
|
948
|
+
break;
|
|
929
949
|
}
|
|
930
|
-
else
|
|
931
|
-
return value;
|
|
932
|
-
}
|
|
933
|
-
switch (col.pipe) {
|
|
934
|
-
case 'date':
|
|
935
|
-
value = this.datePipe.transform(value, 'dd/MM/yyyy');
|
|
936
|
-
break;
|
|
937
|
-
case 'decimal':
|
|
938
|
-
value = this.decimalPipe.transform(value, '1.2-2', 'pt-BR');
|
|
939
|
-
break;
|
|
940
|
-
case 'cpfcnpj':
|
|
941
|
-
value = this.cpfCnpjPipe.transform(value);
|
|
942
|
-
break;
|
|
943
|
-
case 'telefone':
|
|
944
|
-
value = this.telefonePipe.transform(value);
|
|
945
|
-
break;
|
|
946
|
-
case 'codigofipe':
|
|
947
|
-
value = this.codigoFipePipe.transform(value);
|
|
948
|
-
break;
|
|
949
950
|
}
|
|
950
951
|
}
|
|
951
952
|
adjustTableSize() {
|
|
@@ -1440,6 +1441,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
|
|
|
1440
1441
|
}]
|
|
1441
1442
|
}], ctorParameters: function () { return [{ type: i1$1.ConfirmationService }, { type: i1$1.MessageService }]; } });
|
|
1442
1443
|
|
|
1444
|
+
class TablePaginate {
|
|
1445
|
+
constructor() {
|
|
1446
|
+
this.paginaInicial = 1;
|
|
1447
|
+
this.tamanhoPagina = 10;
|
|
1448
|
+
this.termoPesquisa = '';
|
|
1449
|
+
this.ordenacao = '';
|
|
1450
|
+
}
|
|
1451
|
+
}
|
|
1452
|
+
|
|
1443
1453
|
/*
|
|
1444
1454
|
* Public API Surface of keevo-components
|
|
1445
1455
|
*/
|
|
@@ -1448,5 +1458,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
|
|
|
1448
1458
|
* Generated bundle index. Do not edit.
|
|
1449
1459
|
*/
|
|
1450
1460
|
|
|
1451
|
-
export { BaseComponent, BaseComponentButton, BaseComponentDropDown, BaseComponentInput, ButtonPersonalizeComponent, 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 };
|
|
1461
|
+
export { BaseComponent, BaseComponentButton, BaseComponentDropDown, BaseComponentInput, ButtonPersonalizeComponent, 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, TablePaginate, TelefonePipe, TranslatePrimeng, kvErrorModule };
|
|
1452
1462
|
//# sourceMappingURL=keevo-components.mjs.map
|