@senior-gestao-empresarial/angular-components 7.14.1-ec5f2ab3-5b80-485c-8495-13eb6c5073d7 → 7.15.0-a253e448-5c12-41fb-896f-7e01bd46fc46
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 +27 -3
- 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 +11 -3
- package/esm2015/components/lookups/erp-lookups.js +24 -3
- package/esm5/components/lookups/erp-lookups.js +29 -5
- package/fesm2015/senior-gestao-empresarial-angular-components.js +24 -3
- package/fesm2015/senior-gestao-empresarial-angular-components.js.map +1 -1
- package/fesm5/senior-gestao-empresarial-angular-components.js +27 -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
|
@@ -213,6 +213,12 @@ var EnumLogicalOperator;
|
|
|
213
213
|
/** Contains string value (Ex: /Products?$filter=containing(lower(name), lower('my name'))) */
|
|
214
214
|
EnumLogicalOperator["Contains"] = "containing";
|
|
215
215
|
})(EnumLogicalOperator || (EnumLogicalOperator = {}));
|
|
216
|
+
class ErpLookupsSearchField extends FormField {
|
|
217
|
+
constructor(searchFieldOptions, args) {
|
|
218
|
+
super(args);
|
|
219
|
+
this.searchFieldOptions = searchFieldOptions;
|
|
220
|
+
}
|
|
221
|
+
}
|
|
216
222
|
let ErpLookups =
|
|
217
223
|
/**
|
|
218
224
|
* Erp Lookups
|
|
@@ -258,6 +264,9 @@ class ErpLookups {
|
|
|
258
264
|
translationKey = `${prefix}.lookup_${this.toSnakeCase(this.entity)}_${this.toSnakeCase(fieldName)}`;
|
|
259
265
|
label = this.translate.instant(translationKey);
|
|
260
266
|
}
|
|
267
|
+
if ("searchFieldOptions" in field) {
|
|
268
|
+
return new ErpLookupsSearchField(field.searchFieldOptions, Object.assign(Object.assign({}, field), { label }));
|
|
269
|
+
}
|
|
261
270
|
return new FormField(Object.assign(Object.assign({}, field), { label }));
|
|
262
271
|
});
|
|
263
272
|
}
|
|
@@ -427,12 +436,24 @@ class ErpLookups {
|
|
|
427
436
|
const lookupDisplayFields = options.lookupFields.map(field => field.name);
|
|
428
437
|
let filterQuery = (options.searchFields || this.searchFields)
|
|
429
438
|
.filter(({ name }) => filterData[name] != undefined && filterData[name] != "")
|
|
430
|
-
.map((
|
|
439
|
+
.map((formField) => {
|
|
440
|
+
var _a;
|
|
441
|
+
const { name, type, multiple } = formField;
|
|
431
442
|
const value = filterData[name];
|
|
432
443
|
if (typeof value == "number")
|
|
433
444
|
return `${name} eq ${value}`;
|
|
434
|
-
else if (type == FieldType.Date)
|
|
445
|
+
else if (type == FieldType.Date) {
|
|
446
|
+
if ('searchFieldOptions' in formField &&
|
|
447
|
+
((_a = formField.searchFieldOptions) === null || _a === void 0 ? void 0 : _a.useAs) ===
|
|
448
|
+
FieldType.DateTime) {
|
|
449
|
+
return `(${name} ${EnumLogicalOperator.Gt} '${moment(value)
|
|
450
|
+
.startOf('day')
|
|
451
|
+
.toISOString()}' ${EnumLogicalOperator.And} ${name} ${EnumLogicalOperator.Lt} '${moment(value)
|
|
452
|
+
.endOf('day')
|
|
453
|
+
.toISOString()}')`;
|
|
454
|
+
}
|
|
435
455
|
return `${name} eq '${moment(value).format("YYYY-MM-DD")}'`;
|
|
456
|
+
}
|
|
436
457
|
else if (type == FieldType.Time)
|
|
437
458
|
return `${name} eq '${moment(value).format("HH:mm:ss")}'`;
|
|
438
459
|
else if (type == FieldType.DateTime)
|
|
@@ -8101,5 +8122,5 @@ var ModulesEnum;
|
|
|
8101
8122
|
* Generated bundle index. Do not edit.
|
|
8102
8123
|
*/
|
|
8103
8124
|
|
|
8104
|
-
export { AgreementLookup, BankLookup, BeneficioFiscalLookup, BreadcrumbComponent, BreadcrumbModule, Breakpoints, CaracteristicaFiscalLookup, ClassificacaoTributariaLookup, ComposicaoBaseCalculoLookup, ContaInternaFilialLookup, CountryLookup, CplTriNotaSaidaE001EndLookup, CplTriNotaSaidaE001PesLookup, CplTriNotaSaidaE001TnsLookup, CplTriNotaSaidaE007UfsLookup, CplTriNotaSaidaE008RaiLookup, CplTriNotaSaidaE015MedLookup, CplTriNotaSaidaE020SnfLookup, CplTriNotaSaidaE024MsgLookup, CplTriNotaSaidaE028CpgLookup, CplTriNotaSaidaE032EdcLookup, CplTriNotaSaidaE051DisLookup, CplTriNotaSaidaE066FpgLookup, CplTriNotaSaidaE070EmpLookup, CplTriNotaSaidaE070FilLookup, CplTriNotaSaidaE075DerLookup, CplTriNotaSaidaE080SerLookup, CplTriNotaSaidaNaturezaReceitaPisCofinsLookup, CplTriNotaSaidaNcmLookup, CplTriNotaSaidaNfEntradaLookup, CplTriNotaSaidaNfSaidaLookup, CurrencyLookup, DocumentoLookup, E001EndLookup, E001PesLookup, E001TnsLookup, E001TnsSupEstLookup, E002TptLookup, E006PaiLookup, E007UfsLookup, E008CepLookup, E008RaiLookup, E012FamLookup, E015MedLookup, E020SnfLookup, E021MotLookup, E023CrpLookup, E024MsgLookup, E027EqiLookup, E027StrLookup, E028CpgLookup, E030AgeLookup, E030BanLookup, E031MoeLookup, E032EdcLookup, E034TccLookup, E035OcrLookup, E036InsLookup, E039PorLookup, E041CebLookup, E043MpcLookup, E043PcmLookup, E044CcuLookup, E045PlaLookup, E046HpdLookup, E047NtgLookup, E048FctLookup, E048SfcLookup, E051DisLookup, E066FpgLookup, E067FinLookup, E069GreLookup, E070EmpLookup, E070EntLookup, E070FilLookup, E073PesLookup, E073VeiLookup, E075DerLookup, E076MarLookup, E080SerLookup, E081TabLookup, E082TprLookup, E085PesLookup, E089DocLookup, E090HrpComGerLookup, E090PesLookup, E091PlfLookup, E095HfoSupGerLookup, E095PesLookup, E099UsuComGerLookup, E099UsuSupCprLookup, E140InsLookup, E140NfsLookup, E200LotLookup, E200SerLookup, E205DepLookup, E210DxpE075DerLookup, E210DxpLookup, E301TcrLookup, E403FprLookup, E420IcpLookup, E420IpcLookup, E420OcpLookup, E501TcpLookup, E600CcoLookup, E640LotLookup, EntityPersonProductLookup, EnumLogicalOperator, EquipmentLookup, ErpLookups, ErpLookupsModule, ErpLookupsService, ErpPolling, ExportUtils, FiltersStorageService, FormUtilsService, HTTP_STATUS_CODE, IndOperacaoFornecimentoLookup, LeiComplementar1162003Lookup, LigacaoItemFornecedorLookup, ListaServicoNacionalLookup, LookupValidationUtils, ModulesEnum, NbsLookup, NcmLookup, NotaFiscalEntradaLookup, NpsService, OperacoesLookup, OrigemDestinoLookup, OrigemMercadoriaLookup, ParametersLookup, PrimitiveManager, ProdutoServicoLookup, QuantidadeDisponivelDemandaLookup, RequisicaoLookup, SegmentoLookup, TypeTaxesLookup, UnidadeMedidaLookup, UtilsModule, VerifyModulePermission, VerifyModulePermissions, WebsocketService, naturezaReceitaPisCofins, ɵ0, ɵ1, ɵ2, EnumAnaSin as ɵa, EnumNatCtb as ɵb, StorageService as ɵc, UserInformationService as ɵd, VerifyModulePermissionService as ɵe, VerifyModulePermissionsService as ɵf };
|
|
8125
|
+
export { AgreementLookup, BankLookup, BeneficioFiscalLookup, BreadcrumbComponent, BreadcrumbModule, Breakpoints, CaracteristicaFiscalLookup, ClassificacaoTributariaLookup, ComposicaoBaseCalculoLookup, ContaInternaFilialLookup, CountryLookup, CplTriNotaSaidaE001EndLookup, CplTriNotaSaidaE001PesLookup, CplTriNotaSaidaE001TnsLookup, CplTriNotaSaidaE007UfsLookup, CplTriNotaSaidaE008RaiLookup, CplTriNotaSaidaE015MedLookup, CplTriNotaSaidaE020SnfLookup, CplTriNotaSaidaE024MsgLookup, CplTriNotaSaidaE028CpgLookup, CplTriNotaSaidaE032EdcLookup, CplTriNotaSaidaE051DisLookup, CplTriNotaSaidaE066FpgLookup, CplTriNotaSaidaE070EmpLookup, CplTriNotaSaidaE070FilLookup, CplTriNotaSaidaE075DerLookup, CplTriNotaSaidaE080SerLookup, CplTriNotaSaidaNaturezaReceitaPisCofinsLookup, CplTriNotaSaidaNcmLookup, CplTriNotaSaidaNfEntradaLookup, CplTriNotaSaidaNfSaidaLookup, CurrencyLookup, DocumentoLookup, E001EndLookup, E001PesLookup, E001TnsLookup, E001TnsSupEstLookup, E002TptLookup, E006PaiLookup, E007UfsLookup, E008CepLookup, E008RaiLookup, E012FamLookup, E015MedLookup, E020SnfLookup, E021MotLookup, E023CrpLookup, E024MsgLookup, E027EqiLookup, E027StrLookup, E028CpgLookup, E030AgeLookup, E030BanLookup, E031MoeLookup, E032EdcLookup, E034TccLookup, E035OcrLookup, E036InsLookup, E039PorLookup, E041CebLookup, E043MpcLookup, E043PcmLookup, E044CcuLookup, E045PlaLookup, E046HpdLookup, E047NtgLookup, E048FctLookup, E048SfcLookup, E051DisLookup, E066FpgLookup, E067FinLookup, E069GreLookup, E070EmpLookup, E070EntLookup, E070FilLookup, E073PesLookup, E073VeiLookup, E075DerLookup, E076MarLookup, E080SerLookup, E081TabLookup, E082TprLookup, E085PesLookup, E089DocLookup, E090HrpComGerLookup, E090PesLookup, E091PlfLookup, E095HfoSupGerLookup, E095PesLookup, E099UsuComGerLookup, E099UsuSupCprLookup, E140InsLookup, E140NfsLookup, E200LotLookup, E200SerLookup, E205DepLookup, E210DxpE075DerLookup, E210DxpLookup, E301TcrLookup, E403FprLookup, E420IcpLookup, E420IpcLookup, E420OcpLookup, E501TcpLookup, E600CcoLookup, E640LotLookup, EntityPersonProductLookup, EnumLogicalOperator, EquipmentLookup, ErpLookups, ErpLookupsModule, ErpLookupsSearchField, ErpLookupsService, ErpPolling, ExportUtils, FiltersStorageService, FormUtilsService, HTTP_STATUS_CODE, IndOperacaoFornecimentoLookup, LeiComplementar1162003Lookup, LigacaoItemFornecedorLookup, ListaServicoNacionalLookup, LookupValidationUtils, ModulesEnum, NbsLookup, NcmLookup, NotaFiscalEntradaLookup, NpsService, OperacoesLookup, OrigemDestinoLookup, OrigemMercadoriaLookup, ParametersLookup, PrimitiveManager, ProdutoServicoLookup, QuantidadeDisponivelDemandaLookup, RequisicaoLookup, SegmentoLookup, TypeTaxesLookup, UnidadeMedidaLookup, UtilsModule, VerifyModulePermission, VerifyModulePermissions, WebsocketService, naturezaReceitaPisCofins, ɵ0, ɵ1, ɵ2, EnumAnaSin as ɵa, EnumNatCtb as ɵb, StorageService as ɵc, UserInformationService as ɵd, VerifyModulePermissionService as ɵe, VerifyModulePermissionsService as ɵf };
|
|
8105
8126
|
//# sourceMappingURL=senior-gestao-empresarial-angular-components.js.map
|