@senior-gestao-empresarial/angular-components 7.14.1 → 7.15.0-b6a23810-5d75-4998-9373-4e317db69da6

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,19 @@ 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) {
229
+ var args = [];
230
+ for (var _i = 1; _i < arguments.length; _i++) {
231
+ args[_i - 1] = arguments[_i];
232
+ }
233
+ var _this = _super.call(this, args) || this;
234
+ _this.searchFieldOptions = searchFieldOptions;
235
+ return _this;
236
+ }
237
+ return ErpLookupsSearchField;
238
+ }(FormField));
226
239
  var ErpLookups = /** @class */ (function () {
227
240
  /**
228
241
  * Criação de um lookup.
@@ -265,6 +278,9 @@ var ErpLookups = /** @class */ (function () {
265
278
  translationKey = prefix + ".lookup_" + _this.toSnakeCase(_this.entity) + "_" + _this.toSnakeCase(fieldName);
266
279
  label = _this.translate.instant(translationKey);
267
280
  }
281
+ if ("searchFieldOptions" in field) {
282
+ return new ErpLookupsSearchField(field.searchFieldOptions, __assign(__assign({}, field), { label: label }));
283
+ }
268
284
  return new FormField(__assign(__assign({}, field), { label: label }));
269
285
  });
270
286
  };
@@ -448,13 +464,24 @@ var ErpLookups = /** @class */ (function () {
448
464
  var name = _a.name;
449
465
  return filterData[name] != undefined && filterData[name] != "";
450
466
  })
451
- .map(function (_a) {
452
- var name = _a.name, type = _a.type, multiple = _a.multiple;
467
+ .map(function (formField) {
468
+ var _a;
469
+ var name = formField.name, type = formField.type, multiple = formField.multiple;
453
470
  var value = filterData[name];
454
471
  if (typeof value == "number")
455
472
  return name + " eq " + value;
456
- else if (type == FieldType.Date)
473
+ else if (type == FieldType.Date) {
474
+ if ('searchFieldOptions' in formField &&
475
+ ((_a = formField.searchFieldOptions) === null || _a === void 0 ? void 0 : _a.useAs) ===
476
+ FieldType.DateTime) {
477
+ return "(" + name + " " + EnumLogicalOperator.Gt + " '" + moment(value)
478
+ .startOf('day')
479
+ .toISOString() + "' " + EnumLogicalOperator.And + " " + name + " " + EnumLogicalOperator.Lt + " '" + moment(value)
480
+ .endOf('day')
481
+ .toISOString() + "')";
482
+ }
457
483
  return name + " eq '" + moment(value).format("YYYY-MM-DD") + "'";
484
+ }
458
485
  else if (type == FieldType.Time)
459
486
  return name + " eq '" + moment(value).format("HH:mm:ss") + "'";
460
487
  else if (type == FieldType.DateTime)
@@ -7094,6 +7121,36 @@ var IndOperacaoFornecimentoLookup = /** @class */ (function (_super) {
7094
7121
  return IndOperacaoFornecimentoLookup;
7095
7122
  }(ErpLookups));
7096
7123
 
7124
+ var lookupFields$3 = [
7125
+ {
7126
+ name: "codigo",
7127
+ type: FieldType.String,
7128
+ },
7129
+ {
7130
+ name: "descricao",
7131
+ type: FieldType.String,
7132
+ },
7133
+ ];
7134
+ var searchFields$1 = __spread(lookupFields$3);
7135
+ var searchGridFields = __spread(lookupFields$3);
7136
+ var ListaServicoNacionalLookup = /** @class */ (function (_super) {
7137
+ __extends(ListaServicoNacionalLookup, _super);
7138
+ function ListaServicoNacionalLookup(lookupService, translate) {
7139
+ var _this = _super.call(this, lookupService, translate, "listaServicoNacional", lookupFields$3, searchFields$1, searchGridFields, "erpx_cpl_imp", "cadastros") || this;
7140
+ _this.lookupService = lookupService;
7141
+ _this.translate = translate;
7142
+ return _this;
7143
+ }
7144
+ ListaServicoNacionalLookup.ctorParameters = function () { return [
7145
+ { type: ErpLookupsService },
7146
+ { type: TranslateService }
7147
+ ]; };
7148
+ ListaServicoNacionalLookup = __decorate([
7149
+ Injectable()
7150
+ ], ListaServicoNacionalLookup);
7151
+ return ListaServicoNacionalLookup;
7152
+ }(ErpLookups));
7153
+
7097
7154
  var ErpLookupsModule = /** @class */ (function () {
7098
7155
  function ErpLookupsModule() {
7099
7156
  }
@@ -7225,6 +7282,7 @@ var ErpLookupsModule = /** @class */ (function () {
7225
7282
  OrigemMercadoriaLookup,
7226
7283
  E095HfoSupGerLookup,
7227
7284
  IndOperacaoFornecimentoLookup,
7285
+ ListaServicoNacionalLookup
7228
7286
  ],
7229
7287
  declarations: [],
7230
7288
  exports: [],
@@ -8670,5 +8728,5 @@ var ModulesEnum;
8670
8728
  * Generated bundle index. Do not edit.
8671
8729
  */
8672
8730
 
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 };
8731
+ 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
8732
  //# sourceMappingURL=senior-gestao-empresarial-angular-components.js.map