@senior-gestao-empresarial/angular-components 7.14.1 → 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.
@@ -223,6 +223,15 @@ var EnumLogicalOperator;
223
223
  /** Contains string value (Ex: /Products?$filter=containing(lower(name), lower('my name'))) */
224
224
  EnumLogicalOperator["Contains"] = "containing";
225
225
  })(EnumLogicalOperator || (EnumLogicalOperator = {}));
226
+ var ErpLookupsSearchField = /** @class */ (function (_super) {
227
+ __extends(ErpLookupsSearchField, _super);
228
+ function ErpLookupsSearchField(searchFieldOptions, args) {
229
+ var _this = _super.call(this, args) || this;
230
+ _this.searchFieldOptions = searchFieldOptions;
231
+ return _this;
232
+ }
233
+ return ErpLookupsSearchField;
234
+ }(FormField));
226
235
  var ErpLookups = /** @class */ (function () {
227
236
  /**
228
237
  * Criação de um lookup.
@@ -265,6 +274,9 @@ var ErpLookups = /** @class */ (function () {
265
274
  translationKey = prefix + ".lookup_" + _this.toSnakeCase(_this.entity) + "_" + _this.toSnakeCase(fieldName);
266
275
  label = _this.translate.instant(translationKey);
267
276
  }
277
+ if ("searchFieldOptions" in field) {
278
+ return new ErpLookupsSearchField(field.searchFieldOptions, __assign(__assign({}, field), { label: label }));
279
+ }
268
280
  return new FormField(__assign(__assign({}, field), { label: label }));
269
281
  });
270
282
  };
@@ -448,13 +460,24 @@ var ErpLookups = /** @class */ (function () {
448
460
  var name = _a.name;
449
461
  return filterData[name] != undefined && filterData[name] != "";
450
462
  })
451
- .map(function (_a) {
452
- var name = _a.name, type = _a.type, multiple = _a.multiple;
463
+ .map(function (formField) {
464
+ var _a;
465
+ var name = formField.name, type = formField.type, multiple = formField.multiple;
453
466
  var value = filterData[name];
454
467
  if (typeof value == "number")
455
468
  return name + " eq " + value;
456
- else if (type == FieldType.Date)
469
+ else if (type == FieldType.Date) {
470
+ if ('searchFieldOptions' in formField &&
471
+ ((_a = formField.searchFieldOptions) === null || _a === void 0 ? void 0 : _a.useAs) ===
472
+ FieldType.DateTime) {
473
+ return "(" + name + " " + EnumLogicalOperator.Gt + " '" + moment(value)
474
+ .startOf('day')
475
+ .toISOString() + "' " + EnumLogicalOperator.And + " " + name + " " + EnumLogicalOperator.Lt + " '" + moment(value)
476
+ .endOf('day')
477
+ .toISOString() + "')";
478
+ }
457
479
  return name + " eq '" + moment(value).format("YYYY-MM-DD") + "'";
480
+ }
458
481
  else if (type == FieldType.Time)
459
482
  return name + " eq '" + moment(value).format("HH:mm:ss") + "'";
460
483
  else if (type == FieldType.DateTime)
@@ -7094,6 +7117,36 @@ var IndOperacaoFornecimentoLookup = /** @class */ (function (_super) {
7094
7117
  return IndOperacaoFornecimentoLookup;
7095
7118
  }(ErpLookups));
7096
7119
 
7120
+ var lookupFields$3 = [
7121
+ {
7122
+ name: "codigo",
7123
+ type: FieldType.String,
7124
+ },
7125
+ {
7126
+ name: "descricao",
7127
+ type: FieldType.String,
7128
+ },
7129
+ ];
7130
+ var searchFields$1 = __spread(lookupFields$3);
7131
+ var searchGridFields = __spread(lookupFields$3);
7132
+ var ListaServicoNacionalLookup = /** @class */ (function (_super) {
7133
+ __extends(ListaServicoNacionalLookup, _super);
7134
+ function ListaServicoNacionalLookup(lookupService, translate) {
7135
+ var _this = _super.call(this, lookupService, translate, "listaServicoNacional", lookupFields$3, searchFields$1, searchGridFields, "erpx_cpl_imp", "cadastros") || this;
7136
+ _this.lookupService = lookupService;
7137
+ _this.translate = translate;
7138
+ return _this;
7139
+ }
7140
+ ListaServicoNacionalLookup.ctorParameters = function () { return [
7141
+ { type: ErpLookupsService },
7142
+ { type: TranslateService }
7143
+ ]; };
7144
+ ListaServicoNacionalLookup = __decorate([
7145
+ Injectable()
7146
+ ], ListaServicoNacionalLookup);
7147
+ return ListaServicoNacionalLookup;
7148
+ }(ErpLookups));
7149
+
7097
7150
  var ErpLookupsModule = /** @class */ (function () {
7098
7151
  function ErpLookupsModule() {
7099
7152
  }
@@ -7225,6 +7278,7 @@ var ErpLookupsModule = /** @class */ (function () {
7225
7278
  OrigemMercadoriaLookup,
7226
7279
  E095HfoSupGerLookup,
7227
7280
  IndOperacaoFornecimentoLookup,
7281
+ ListaServicoNacionalLookup
7228
7282
  ],
7229
7283
  declarations: [],
7230
7284
  exports: [],
@@ -8670,5 +8724,5 @@ var ModulesEnum;
8670
8724
  * Generated bundle index. Do not edit.
8671
8725
  */
8672
8726
 
8673
- 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, 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 };
8727
+ 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 };
8674
8728
  //# sourceMappingURL=senior-gestao-empresarial-angular-components.js.map