@senior-gestao-empresarial/angular-components 7.17.0 → 7.18.1-develop-d860502e
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/bundles/senior-gestao-empresarial-angular-components.umd.js +44 -4
- package/bundles/senior-gestao-empresarial-angular-components.umd.js.map +1 -1
- package/bundles/senior-gestao-empresarial-angular-components.umd.min.js +1 -1
- package/bundles/senior-gestao-empresarial-angular-components.umd.min.js.map +1 -1
- package/components/lookups/erp-lookups.d.ts +7 -2
- package/core/enums/enum-imposto-cadastro.d.ts +2 -1
- package/esm2015/components/lookups/entities/composicao-base-calculo-lookup.js +5 -1
- package/esm2015/components/lookups/erp-lookups.js +41 -5
- package/esm2015/core/enums/enum-imposto-cadastro.js +2 -1
- package/esm5/components/lookups/entities/composicao-base-calculo-lookup.js +5 -1
- package/esm5/components/lookups/erp-lookups.js +40 -5
- package/esm5/core/enums/enum-imposto-cadastro.js +2 -1
- package/fesm2015/senior-gestao-empresarial-angular-components.js +45 -4
- package/fesm2015/senior-gestao-empresarial-angular-components.js.map +1 -1
- package/fesm5/senior-gestao-empresarial-angular-components.js +44 -4
- package/fesm5/senior-gestao-empresarial-angular-components.js.map +1 -1
- package/package.json +1 -1
- package/senior-gestao-empresarial-angular-components.metadata.json +1 -1
|
@@ -546,10 +546,30 @@ var ErpLookups = /** @class */ (function () {
|
|
|
546
546
|
this.lookupService
|
|
547
547
|
.list({ page: page, sort: sort, filterQuery: filterQuery, displayFields: displayFields }, this.entity, options.domain || this.domain, options.service || this.service)
|
|
548
548
|
.pipe(takeUntil(this.ngUnsubscribe))
|
|
549
|
-
.pipe(map(function (list) {
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
549
|
+
.pipe(map(function (list) {
|
|
550
|
+
// Criar um mapa de campos com maxLength definido
|
|
551
|
+
var fieldsWithMaxLength = new Map();
|
|
552
|
+
__spread((options.searchFields || _this.searchFields), (options.searchGridFields || _this.searchGridFields)).forEach(function (field) {
|
|
553
|
+
if (field.maxLength &&
|
|
554
|
+
(field.type === FieldType.String || field.type === FieldType.Text)) {
|
|
555
|
+
fieldsWithMaxLength.set(field.name, field.maxLength);
|
|
556
|
+
}
|
|
557
|
+
});
|
|
558
|
+
return {
|
|
559
|
+
gridData: list.contents.map(function (item) {
|
|
560
|
+
var processedItem = JSON.parse(JSON.stringify(item));
|
|
561
|
+
// Aplicar maxLength nos campos que possuem a configuração
|
|
562
|
+
fieldsWithMaxLength.forEach(function (maxLength, fieldName) {
|
|
563
|
+
var fieldValue = _this.getNestedValue(processedItem, fieldName);
|
|
564
|
+
if (fieldValue && typeof fieldValue === 'string' && fieldValue.length > maxLength) {
|
|
565
|
+
_this.setNestedValue(processedItem, fieldName, fieldValue.substring(0, maxLength) + '...');
|
|
566
|
+
}
|
|
567
|
+
});
|
|
568
|
+
return __assign(__assign({}, processedItem), { label: _this.getItemLabel(processedItem, prefix, lookupDisplayFields) });
|
|
569
|
+
}),
|
|
570
|
+
totalRecords: list.totalElements
|
|
571
|
+
};
|
|
572
|
+
}))
|
|
553
573
|
.subscribe(function (data) {
|
|
554
574
|
_this.lookupSearchObservable.next(data);
|
|
555
575
|
});
|
|
@@ -566,6 +586,21 @@ var ErpLookups = /** @class */ (function () {
|
|
|
566
586
|
})
|
|
567
587
|
.join(" - ");
|
|
568
588
|
};
|
|
589
|
+
ErpLookups.prototype.getNestedValue = function (obj, path) {
|
|
590
|
+
return path.split(".").reduce(function (current, key) {
|
|
591
|
+
return current && current[key] !== undefined ? current[key] : undefined;
|
|
592
|
+
}, obj);
|
|
593
|
+
};
|
|
594
|
+
ErpLookups.prototype.setNestedValue = function (obj, path, value) {
|
|
595
|
+
var keys = path.split(".");
|
|
596
|
+
var lastKey = keys.pop();
|
|
597
|
+
var target = keys.reduce(function (current, key) {
|
|
598
|
+
return current && current[key] !== undefined ? current[key] : undefined;
|
|
599
|
+
}, obj);
|
|
600
|
+
if (target && lastKey) {
|
|
601
|
+
target[lastKey] = value;
|
|
602
|
+
}
|
|
603
|
+
};
|
|
569
604
|
ErpLookups.ctorParameters = function () { return [
|
|
570
605
|
{ type: ErpLookupsService },
|
|
571
606
|
{ type: TranslateService },
|
|
@@ -6556,6 +6591,7 @@ var EnumImpostoCadastro;
|
|
|
6556
6591
|
EnumImpostoCadastro["VCBS"] = "VCBS";
|
|
6557
6592
|
EnumImpostoCadastro["VIBS"] = "VIBS";
|
|
6558
6593
|
EnumImpostoCadastro["VIS"] = "VIS";
|
|
6594
|
+
EnumImpostoCadastro["VCBS_IBS_CREDITO_PRESUMIDO"] = "VCBS_IBS_CREDITO_PRESUMIDO";
|
|
6559
6595
|
})(EnumImpostoCadastro || (EnumImpostoCadastro = {}));
|
|
6560
6596
|
|
|
6561
6597
|
var ComposicaoBaseCalculoLookup = /** @class */ (function (_super) {
|
|
@@ -6628,6 +6664,10 @@ var ComposicaoBaseCalculoLookup = /** @class */ (function (_super) {
|
|
|
6628
6664
|
label: translate.instant("erpx_cpl_imp.impostos.enum_imposto_cadastro_vibs"),
|
|
6629
6665
|
value: EnumImpostoCadastro.VIBS,
|
|
6630
6666
|
},
|
|
6667
|
+
{
|
|
6668
|
+
label: translate.instant("erpx_cpl_imp.impostos.enum_imposto_cadastro_vcbs_ibs_credito_presumido"),
|
|
6669
|
+
value: EnumImpostoCadastro.VCBS_IBS_CREDITO_PRESUMIDO,
|
|
6670
|
+
},
|
|
6631
6671
|
{
|
|
6632
6672
|
label: translate.instant("erpx_cpl_imp.impostos.enum_imposto_cadastro_vis"),
|
|
6633
6673
|
value: EnumImpostoCadastro.VIS,
|