@senior-agronegocio/angular-components 0.0.9853 → 0.0.9856

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.
Files changed (80) hide show
  1. package/bundles/senior-agronegocio-angular-components.umd.js +936 -468
  2. package/bundles/senior-agronegocio-angular-components.umd.js.map +1 -1
  3. package/bundles/senior-agronegocio-angular-components.umd.min.js +2 -2
  4. package/bundles/senior-agronegocio-angular-components.umd.min.js.map +1 -1
  5. package/common/agro-string-utils.class.d.ts +0 -5
  6. package/components/event-control-board/event-control-board.component.d.ts +1 -1
  7. package/components/index.d.ts +1 -0
  8. package/components/modal-invoice-pj-selector/index.d.ts +4 -0
  9. package/components/modal-invoice-pj-selector/modal-invoice-pj-selector-options.interface.d.ts +10 -0
  10. package/components/modal-invoice-pj-selector/modal-invoice-pj-selector.component.d.ts +41 -0
  11. package/components/modal-invoice-pj-selector/modal-invoice-pj-selector.module.d.ts +2 -0
  12. package/components/modal-invoice-pj-selector/services/agro-invoice/agro-invoice.module.d.ts +2 -0
  13. package/components/modal-invoice-pj-selector/services/agro-invoice/agro-invoice.service.d.ts +16 -0
  14. package/components/modal-invoice-pj-selector/services/agro-invoice/index.d.ts +2 -0
  15. package/components/modal-invoice-pj-selector/services/agro-invoice/interfaces.d.ts +73 -0
  16. package/esm2015/common/agro-object-stringifier.class.js +2 -4
  17. package/esm2015/common/agro-regex.constant.js +2 -2
  18. package/esm2015/common/agro-string-utils.class.js +2 -76
  19. package/esm2015/components/event-control-board/event-control-board.component.js +12 -15
  20. package/esm2015/components/index.js +2 -1
  21. package/esm2015/components/modal-invoice-pj-selector/index.js +4 -0
  22. package/esm2015/components/modal-invoice-pj-selector/modal-invoice-pj-selector-options.interface.js +1 -0
  23. package/esm2015/components/modal-invoice-pj-selector/modal-invoice-pj-selector.component.js +193 -0
  24. package/esm2015/components/modal-invoice-pj-selector/modal-invoice-pj-selector.module.js +42 -0
  25. package/esm2015/components/modal-invoice-pj-selector/services/agro-invoice/agro-invoice.module.js +28 -0
  26. package/esm2015/components/modal-invoice-pj-selector/services/agro-invoice/agro-invoice.service.js +48 -0
  27. package/esm2015/components/modal-invoice-pj-selector/services/agro-invoice/index.js +3 -0
  28. package/esm2015/components/modal-invoice-pj-selector/services/agro-invoice/interfaces.js +13 -0
  29. package/esm2015/lib-translation.module.js +3 -1
  30. package/esm2015/pipe/index.js +5 -4
  31. package/esm2015/pipe/kilogram/index.js +3 -0
  32. package/esm2015/pipe/kilogram/kilogram.module.js +17 -0
  33. package/esm2015/pipe/kilogram/kilogram.pipe.js +38 -0
  34. package/esm2015/pipe/telephone/telephone.pipe.js +27 -18
  35. package/esm2015/public-api.js +2 -2
  36. package/esm2015/services/entity-service.js +124 -0
  37. package/esm2015/services/i18n/en-US.js +19 -2
  38. package/esm2015/services/i18n/es-CO.js +18 -1
  39. package/esm2015/services/i18n/pt-BR.js +20 -2
  40. package/esm2015/services/lib-translation.service.js +2 -2
  41. package/esm5/common/agro-object-stringifier.class.js +2 -4
  42. package/esm5/common/agro-regex.constant.js +2 -2
  43. package/esm5/common/agro-string-utils.class.js +8 -93
  44. package/esm5/components/event-control-board/event-control-board.component.js +12 -15
  45. package/esm5/components/index.js +2 -1
  46. package/esm5/components/modal-invoice-pj-selector/index.js +4 -0
  47. package/esm5/components/modal-invoice-pj-selector/modal-invoice-pj-selector-options.interface.js +1 -0
  48. package/esm5/components/modal-invoice-pj-selector/modal-invoice-pj-selector.component.js +202 -0
  49. package/esm5/components/modal-invoice-pj-selector/modal-invoice-pj-selector.module.js +45 -0
  50. package/esm5/components/modal-invoice-pj-selector/services/agro-invoice/agro-invoice.module.js +31 -0
  51. package/esm5/components/modal-invoice-pj-selector/services/agro-invoice/agro-invoice.service.js +55 -0
  52. package/esm5/components/modal-invoice-pj-selector/services/agro-invoice/index.js +3 -0
  53. package/esm5/components/modal-invoice-pj-selector/services/agro-invoice/interfaces.js +13 -0
  54. package/esm5/lib-translation.module.js +3 -1
  55. package/esm5/pipe/index.js +5 -4
  56. package/esm5/pipe/kilogram/index.js +3 -0
  57. package/esm5/pipe/kilogram/kilogram.module.js +20 -0
  58. package/esm5/pipe/kilogram/kilogram.pipe.js +41 -0
  59. package/esm5/pipe/telephone/telephone.pipe.js +27 -18
  60. package/esm5/public-api.js +2 -2
  61. package/esm5/services/entity-service.js +135 -0
  62. package/esm5/services/i18n/en-US.js +19 -2
  63. package/esm5/services/i18n/es-CO.js +18 -1
  64. package/esm5/services/i18n/pt-BR.js +20 -2
  65. package/esm5/services/lib-translation.service.js +2 -2
  66. package/fesm2015/senior-agronegocio-angular-components.js +699 -263
  67. package/fesm2015/senior-agronegocio-angular-components.js.map +1 -1
  68. package/fesm5/senior-agronegocio-angular-components.js +938 -476
  69. package/fesm5/senior-agronegocio-angular-components.js.map +1 -1
  70. package/package.json +1 -1
  71. package/pipe/index.d.ts +4 -3
  72. package/pipe/kilogram/index.d.ts +2 -0
  73. package/pipe/kilogram/kilogram.module.d.ts +2 -0
  74. package/pipe/kilogram/kilogram.pipe.d.ts +8 -0
  75. package/public-api.d.ts +1 -1
  76. package/senior-agronegocio-angular-components.metadata.json +1 -1
  77. package/services/entity-service.d.ts +72 -0
  78. package/services/i18n/en-US.d.ts +17 -0
  79. package/services/i18n/es-CO.d.ts +17 -0
  80. package/services/i18n/pt-BR.d.ts +18 -0
@@ -1,17 +1,17 @@
1
1
  import moment from 'moment';
2
2
  import { __awaiter, __decorate } from 'tslib';
3
- import { Subject, BehaviorSubject, of, throwError } from 'rxjs';
3
+ import { Subject, BehaviorSubject, of, throwError, scheduled, asyncScheduler, timer } from 'rxjs';
4
4
  import sockjsClient from 'sockjs-client';
5
- import { ɵɵdefineInjectable, Injectable, ɵɵinject, NgModule, Input, Component, EventEmitter, Output, LOCALE_ID, Pipe, InjectionToken } from '@angular/core';
6
- import { filter, take, finalize, switchMap, map, catchError, takeUntil } from 'rxjs/operators';
5
+ import { ɵɵdefineInjectable, Injectable, ɵɵinject, NgModule, Pipe, Input, Component, EventEmitter, Output, LOCALE_ID, InjectionToken } from '@angular/core';
6
+ import { filter, take, finalize, switchMap, map, catchError, takeUntil, concatMap, tap, scan, defaultIfEmpty, debounceTime } from 'rxjs/operators';
7
7
  import { Client, FrameImpl } from '@stomp/stompjs';
8
8
  import { get } from 'js-cookie';
9
- import { CommonModule, registerLocaleData } from '@angular/common';
9
+ import { CommonModule, DecimalPipe, registerLocaleData, DatePipe } from '@angular/common';
10
10
  import localePt from '@angular/common/locales/pt';
11
11
  import { Validators, FormControl, FormGroup, FormBuilder, FormsModule, ReactiveFormsModule } from '@angular/forms';
12
- import { ButtonPriority, FormField, FieldType, BadgeColors, StepState as StepState$1, ButtonModule, CustomFieldsModule, ControlErrorsModule, EmptyStateModule, DynamicFormModule, TokenListModule, SidebarModule, LoadingStateModule, NumberInputModule, TableModule as TableModule$1, ObjectCardModule, LocaleModule, BadgeModule } from '@seniorsistemas/angular-components';
13
- import { DynamicDialogConfig, DynamicDialogRef, MessageService as MessageService$1, DialogService, DialogModule, FieldsetModule } from 'primeng';
14
- import { HttpParams, HttpClient } from '@angular/common/http';
12
+ import { ButtonPriority, FormField, FieldType, BadgeColors, StepState as StepState$1, ButtonModule, CustomFieldsModule, ControlErrorsModule, EmptyStateModule, DynamicFormModule, TokenListModule, SidebarModule, LoadingStateModule, NumberInputModule, TableModule as TableModule$1, ObjectCardModule, LocaleModule, BadgeModule, BignumberInputModule, TableHeaderCheckboxModule } from '@seniorsistemas/angular-components';
13
+ import { DynamicDialogConfig, DynamicDialogRef, MessageService as MessageService$1, DialogService, DialogModule, FieldsetModule, InputTextModule as InputTextModule$1, SharedModule as SharedModule$2, ConfirmDialogModule as ConfirmDialogModule$1 } from 'primeng';
14
+ import { HttpParams, HttpClient, HttpClientModule } from '@angular/common/http';
15
15
  import { MessageService, SharedModule as SharedModule$1 } from 'primeng/api';
16
16
  import { user } from '@seniorsistemas/senior-platform-data';
17
17
  import { ConfirmDialogModule } from 'primeng/confirmdialog';
@@ -184,7 +184,7 @@ const AGRO_REGEX = {
184
184
  * Validação de Placa de Veículo Antiga
185
185
  * Formato: AAA-0000
186
186
  */
187
- isOldLicensePlate: /^[A-Z]{3}[0-9]{4}$/,
187
+ isOldLicensePlate: /^[A-Z]{3}\d{4}$/,
188
188
  isISODate: /^\d{4}-\d{2}-\d{2}$/,
189
189
  isISOTime: /^\d{2}:\d{2}:\d{2}$/,
190
190
  isISODateTime: /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?Z$/,
@@ -2279,87 +2279,13 @@ class AgroStringUtils {
2279
2279
  const matches = str.match(regex);
2280
2280
  return matches ? matches.length : AGRO_NUMBERS.ZERO;
2281
2281
  }
2282
- /**
2283
- * Remove uma máscara simples da string fornecida.O padrão de máscaras é definido pelo enum AgroStringMasks ou
2284
- * pode ser uma string personalizada onde '9' representa um dígito a ser mantido da string.
2285
- */
2286
- static removeMask(value, mask) {
2287
- if (!value || !mask)
2288
- return value;
2289
- const valueChars = value.toString().split("");
2290
- const maskChars = mask.split("");
2291
- let unmaskedValue = "";
2292
- let j = 0;
2293
- const isDigit = (c) => /\d/.test(c);
2294
- const isAlpha = (c) => /[A-Za-z]/.test(c);
2295
- const isAlnum = (c) => /[A-Za-z0-9]/.test(c);
2296
- for (const maskChar of maskChars) {
2297
- if (j >= valueChars.length)
2298
- break;
2299
- const current = valueChars[j];
2300
- // Placeholder para dígito '9'
2301
- if (maskChar === "9") {
2302
- // procura próximo dígito a partir de j
2303
- let k = j;
2304
- while (k < valueChars.length && !isDigit(valueChars[k]))
2305
- k++;
2306
- if (k < valueChars.length) {
2307
- // encontrou dígito: consome
2308
- unmaskedValue += valueChars[k];
2309
- j = k + 1;
2310
- }
2311
- else {
2312
- // não há dígito futuro: captura o caractere atual como dado
2313
- unmaskedValue += valueChars[j];
2314
- j++;
2315
- }
2316
- continue;
2317
- }
2318
- // Placeholder para letra 'A'
2319
- if (maskChar === "A") {
2320
- // procura próxima letra a partir de j
2321
- let k = j;
2322
- while (k < valueChars.length && !isAlpha(valueChars[k]))
2323
- k++;
2324
- if (k < valueChars.length) {
2325
- unmaskedValue += valueChars[k];
2326
- j = k + 1;
2327
- }
2328
- else {
2329
- unmaskedValue += valueChars[j];
2330
- j++;
2331
- }
2332
- continue;
2333
- }
2334
- // maskChar é um separador literal opcional.
2335
- if (current === maskChar) {
2336
- // separador presente no valor: consome-o
2337
- j++;
2338
- continue;
2339
- }
2340
- // separador ausente:
2341
- // - se o caractere atual for alfanumérico, trata como dado e captura;
2342
- // - se não for alfanumérico (pontuação), ignora — não avança j, permite
2343
- // que o próximo placeholder pule/consuma ou procure pelo tipo esperado.
2344
- if (isAlnum(current)) {
2345
- unmaskedValue += current;
2346
- j++;
2347
- }
2348
- else {
2349
- // ignora caractere não-alfanumérico no lugar do separador (não consome)
2350
- // assim o próximo placeholder poderá procurar o caractere do tipo esperado
2351
- // sem perder a posição atual.
2352
- }
2353
- }
2354
- return unmaskedValue;
2355
- }
2356
2282
  /**
2357
2283
  * Aplica uma máscara simples à string fornecida.O padrão de máscaras é definido pelo enum AgroStringMasks ou
2358
2284
  * pode ser uma string personalizada onde '9' representa um dígito a ser substituído pelo caractere correspondente
2359
2285
  * da string.
2360
2286
  */
2361
2287
  static applyMask(value, mask) {
2362
- const valueChars = AgroStringUtils.removeMask(value, mask).toString().split("");
2288
+ const valueChars = value.replace(/[^A-Za-z0-9]/g, "");
2363
2289
  const maskChars = mask.split("");
2364
2290
  let maskedValue = "";
2365
2291
  let j = AGRO_NUMBERS.ZERO;
@@ -3506,7 +3432,7 @@ const ptBR = {
3506
3432
  "agro.angular_components.save": "Salvar",
3507
3433
  "agro.angular_components.select": "Selecione",
3508
3434
  "agro.angular_components.updated_by": "Atualizado por",
3509
- "error_invalid": "Valor inválido",
3435
+ error_invalid: "Valor inválido",
3510
3436
  "agro.angular_components.choose_label": "Escolha",
3511
3437
  "agro.angular_components.remove_label": "Remover",
3512
3438
  "agro.angular_components.cancel_label": "Cancelar",
@@ -3593,6 +3519,7 @@ const ptBR = {
3593
3519
  "agro.angular_components.ORIGINATION_CREATE_EFFECTIVE_BALANCE": "Emissão de saldo efetivo",
3594
3520
  "agro.angular_components.PRODUCER_NET_VALUE_EFFECTIVE_BALANCE_CONFIRMATION": "Confirmação de saldo efetivo",
3595
3521
  "agro.angular_components.CLOSE_INVOICE_FIXATION": "Fechamento de NF",
3522
+ "agro.angular_components.INVOICE_CLOSE_INVOICE": "Solicitação de cancelamento da NF",
3596
3523
  "agro.angular_components.ORIGINATION_CREATE_EFFECTIVE_CONFIRMATION": "Confirmação efetiva",
3597
3524
  "agro.angular_components.ORIGINATION_CREATE_PROVISIONAL_BALANCE": "Saldo provisório",
3598
3525
  "agro.angular_components.CLOSE_INVOICE_TRANSFER": "Fechamento de NF",
@@ -3602,6 +3529,23 @@ const ptBR = {
3602
3529
  "agro.angular_components.TRANSFER_CREATE_SERVICE_INVOICE": "Emissão NF de serviço",
3603
3530
  "agro.angular_components.TRANSFER_CANCEL_SERVICE_INVOICE": "Cancelamento de NF de serviço",
3604
3531
  "agro.angular_components.REOPEN_INVOICE_FIXATION": "Reabertura da NF",
3532
+ "agro.angular_components.CIDASC_INTEGRATION": "Envio ao Cidasc",
3533
+ "agro.angular_components.CIDASC_CANCELLATION": "Cancelamento do Receituário",
3534
+ "agro.angular_components.CIDASC_DATA_LOAD_CULTURE": "Carga Cidasc - Cultura",
3535
+ "agro.angular_components.CIDASC_DATA_LOAD_PEST": "Carga Cidasc - Praga",
3536
+ "agro.angular_components.CIDASC_DATA_LOAD_PRODUCT": "Carga Cidasc - Produto",
3537
+ "agro.angular_components.CIDASC_DATA_LOAD_MEASURE_UNIT": "Carga Cidasc - Unidade de medida",
3538
+ "agro.angular_components.CIDASC_DATA_LOAD_COMPOSED_MEASURE_UNIT": "Carga Cidasc - Medida por hectare",
3539
+ "agro.angular_components.agronomic_prescription_origin_event": "Receituário Agronômico",
3540
+ "agro.angular_components.number_or_series": "Número ou série",
3541
+ "agro.angular_components.panel_title_external_invoice_add_external_invoice": "Adicionar nota fiscal",
3542
+ "agro.angular_components.add_pj_invoice_modal_no_invoices_found": "Nenhuma nota fiscal disponível para este produtor",
3543
+ "agro.angular_components.number": "Número",
3544
+ "agro.angular_components.series": "Série",
3545
+ "agro.angular_components.itens": "Itens",
3546
+ "agro.angular_components.quantity": "Quantidade",
3547
+ "agro.angular_components.issuance_date": "Data de emissão",
3548
+ "agro.angular_components.no_register_found_for_external_invoices_summary": "Nenhuma nota encontrada",
3605
3549
  };
3606
3550
 
3607
3551
  const enUS = {
@@ -3759,7 +3703,7 @@ const enUS = {
3759
3703
  "agro.angular_components.save": "Save",
3760
3704
  "agro.angular_components.select": "Select",
3761
3705
  "agro.angular_components.updated_by": "Updated by",
3762
- error_invalid: "Invalid value",
3706
+ "error_invalid": "Invalid value",
3763
3707
  "agro.angular_components.choose_label": "Choose",
3764
3708
  "agro.angular_components.remove_label": "Remove",
3765
3709
  "agro.angular_components.cancel_label": "Cancel",
@@ -3849,6 +3793,23 @@ const enUS = {
3849
3793
  "agro.angular_components.TRANSFER_CREATE_SERVICE_INVOICE": "Service invoice issuance",
3850
3794
  "agro.angular_components.TRANSFER_CANCEL_SERVICE_INVOICE": "Service invoice cancellation",
3851
3795
  "agro.angular_components.REOPEN_INVOICE_FIXATION": "Reopen invoice fixation",
3796
+ "agro.angular_components.INVOICE_CLOSE_INVOICE": "Invoice cancellation request",
3797
+ "agro.angular_components.CIDASC_INTEGRATION": "Send to Cidasc",
3798
+ "agro.angular_components.CIDASC_CANCELLATION": "Prescription Cancellation",
3799
+ "agro.angular_components.CIDASC_DATA_LOAD_CULTURE": "Cidasc Load - Culture",
3800
+ "agro.angular_components.CIDASC_DATA_LOAD_PEST": "Cidasc Load - Pest",
3801
+ "agro.angular_components.CIDASC_DATA_LOAD_PRODUCT": "Cidasc Load - Product",
3802
+ "agro.angular_components.CIDASC_DATA_LOAD_MEASURE_UNIT": "Cidasc Load - Unit of measure",
3803
+ "agro.angular_components.CIDASC_DATA_LOAD_COMPOSED_MEASURE_UNIT": "Cidasc Load - Measure per hectare",
3804
+ "agro.angular_components.agronomic_prescription_origin_event": "Agronomic Prescription",
3805
+ "agro.angular_components.number_or_series": "Número ou série",
3806
+ "agro.angular_components.panel_title_external_invoice_add_external_invoice": "Adicionar nota fiscal",
3807
+ "agro.angular_components.add_pj_invoice_modal_no_invoices_found": "Nenhuma nota fiscal disponível para este produtor",
3808
+ "agro.angular_components.number": "Número",
3809
+ "agro.angular_components.series": "Série",
3810
+ "agro.angular_components.itens": "Itens",
3811
+ "agro.angular_components.quantity": "Quantidade",
3812
+ "agro.angular_components.issuance_date": "Data de emissão",
3852
3813
  };
3853
3814
 
3854
3815
  const esCO = {
@@ -4096,6 +4057,23 @@ const esCO = {
4096
4057
  "agro.angular_components.TRANSFER_CREATE_SERVICE_INVOICE": "Emisión de NF de servicio",
4097
4058
  "agro.angular_components.TRANSFER_CANCEL_SERVICE_INVOICE": "Cancelación de NF de servicio",
4098
4059
  "agro.angular_components.REOPEN_INVOICE_FIXATION": "Reapertura de factura",
4060
+ "agro.angular_components.INVOICE_CLOSE_INVOICE": "Solicitud de cancelación de la factura",
4061
+ "agro.angular_components.CIDASC_INTEGRATION": "Envío a Cidasc",
4062
+ "agro.angular_components.CIDASC_CANCELLATION": "Cancelación de Receta",
4063
+ "agro.angular_components.CIDASC_DATA_LOAD_CULTURE": "Carga Cidasc - Cultivo",
4064
+ "agro.angular_components.CIDASC_DATA_LOAD_PEST": "Carga Cidasc - Plaga",
4065
+ "agro.angular_components.CIDASC_DATA_LOAD_PRODUCT": "Carga Cidasc - Producto",
4066
+ "agro.angular_components.CIDASC_DATA_LOAD_MEASURE_UNIT": "Carga Cidasc - Unidad de medida",
4067
+ "agro.angular_components.CIDASC_DATA_LOAD_COMPOSED_MEASURE_UNIT": "Carga Cidasc - Medida por hectárea",
4068
+ "agro.angular_components.agronomic_prescription_origin_event": "Recetario Agronómico",
4069
+ "agro.angular_components.number_or_series": "Número ou série",
4070
+ "agro.angular_components.panel_title_external_invoice_add_external_invoice": "Adicionar nota fiscal",
4071
+ "agro.angular_components.add_pj_invoice_modal_no_invoices_found": "Nenhuma nota fiscal disponível para este produtor",
4072
+ "agro.angular_components.number": "Número",
4073
+ "agro.angular_components.series": "Série",
4074
+ "agro.angular_components.itens": "Itens",
4075
+ "agro.angular_components.quantity": "Quantidade",
4076
+ "agro.angular_components.issuance_date": "Data de emissão",
4099
4077
  };
4100
4078
 
4101
4079
  let LibTranslationService = class LibTranslationService {
@@ -4106,7 +4084,7 @@ let LibTranslationService = class LibTranslationService {
4106
4084
  "es-CO": esCO,
4107
4085
  };
4108
4086
  this.currentTranslation = {};
4109
- this.setLang(this.getLangOfUser());
4087
+ this.setLang("pt-BR");
4110
4088
  }
4111
4089
  getLangOfUser() {
4112
4090
  return AgroPlatformUtils.getCurrentTenantLocale() || "pt-BR";
@@ -4147,6 +4125,251 @@ LibTranslationService = __decorate([
4147
4125
  })
4148
4126
  ], LibTranslationService);
4149
4127
 
4128
+ let KilogramPipe = class KilogramPipe {
4129
+ constructor(decimalPipe) {
4130
+ this.decimalPipe = decimalPipe;
4131
+ }
4132
+ transform(value, format = "1.3-3", kgCaseInsensitive = "UPPER") {
4133
+ if (value == null || isNaN(value)) {
4134
+ return "";
4135
+ }
4136
+ let str = this.decimalPipe.transform(value, format);
4137
+ const kgStr = "kg";
4138
+ if (!str) {
4139
+ console.info("Formato do peso inválido para transformação");
4140
+ return "";
4141
+ }
4142
+ str = str.replace(/,/g, ".");
4143
+ return `${this.replaceLastDotWithComma(str)} ${kgCaseInsensitive === "UPPER" ? kgStr.toUpperCase() : kgStr.toLowerCase()}`;
4144
+ }
4145
+ replaceLastDotWithComma(value) {
4146
+ const lastDotIndex = value.lastIndexOf(".");
4147
+ if (lastDotIndex === -1) {
4148
+ return value;
4149
+ }
4150
+ return `${value.substring(0, lastDotIndex)},${value.substring(lastDotIndex + 1)}`;
4151
+ }
4152
+ };
4153
+ KilogramPipe.ctorParameters = () => [
4154
+ { type: DecimalPipe }
4155
+ ];
4156
+ KilogramPipe = __decorate([
4157
+ Pipe({
4158
+ name: "kilogram",
4159
+ })
4160
+ ], KilogramPipe);
4161
+
4162
+ let KilogramModule = class KilogramModule {
4163
+ };
4164
+ KilogramModule = __decorate([
4165
+ NgModule({
4166
+ declarations: [KilogramPipe],
4167
+ imports: [
4168
+ CommonModule
4169
+ ],
4170
+ exports: [KilogramPipe]
4171
+ })
4172
+ ], KilogramModule);
4173
+
4174
+ let CnpjCpfPipe = class CnpjCpfPipe {
4175
+ transform(value, ...args) {
4176
+ if (typeof value !== "string" && typeof value === "number") {
4177
+ value = value === null || value === void 0 ? void 0 : value.toString();
4178
+ }
4179
+ if (typeof value !== "string") {
4180
+ return value;
4181
+ }
4182
+ if (AgroStringUtils.validateCNPJ(value)) {
4183
+ return AgroStringUtils.applyMask(value, AgroStringMasks.CNPJ);
4184
+ }
4185
+ if (AgroStringUtils.validateCPF(value)) {
4186
+ return AgroStringUtils.applyMask(value, AgroStringMasks.CPF);
4187
+ }
4188
+ return value;
4189
+ }
4190
+ };
4191
+ CnpjCpfPipe = __decorate([
4192
+ Pipe({
4193
+ name: "cnpjCpf",
4194
+ })
4195
+ ], CnpjCpfPipe);
4196
+
4197
+ let CnpjCpfPipeModule = class CnpjCpfPipeModule {
4198
+ };
4199
+ CnpjCpfPipeModule = __decorate([
4200
+ NgModule({
4201
+ declarations: [CnpjCpfPipe],
4202
+ imports: [CommonModule],
4203
+ exports: [CnpjCpfPipe],
4204
+ })
4205
+ ], CnpjCpfPipeModule);
4206
+
4207
+ class AgroObjectStringifier {
4208
+ /**
4209
+ * Formata um objeto concatenando valores segundo as chaves e pipes informados.
4210
+ *
4211
+ * @param separator Separador entre os valores (ex: "-")
4212
+ * @param fields Campos a extrair. Podem conter subpropriedades ("propriedade.subPropriedade") e pipes ("propriedade|nomeDaPipe:arg1:arg2")
4213
+ * @param obj Objeto origem
4214
+ */
4215
+ static formatObject(separator, fields, obj, usePipes) {
4216
+ function mapField(field) {
4217
+ const value = AgroObjectStringifier.resolvePath(obj, field);
4218
+ if (usePipes === null || usePipes === void 0 ? void 0 : usePipes.hasOwnProperty(field)) {
4219
+ return usePipes[field].transform(value);
4220
+ }
4221
+ return value !== null && value !== void 0 ? value : "";
4222
+ }
4223
+ function filterValid(v) {
4224
+ return typeof v === "number" || AgroStringUtils.isValid(v);
4225
+ }
4226
+ return fields.map(mapField).filter(filterValid).join(` ${separator} `);
4227
+ }
4228
+ /** Resolve um caminho tipo "empresa.cargo" dentro de um objeto */
4229
+ static resolvePath(obj, path) {
4230
+ function reducer(acc, key) {
4231
+ return acc === null || acc === void 0 ? void 0 : acc[key];
4232
+ }
4233
+ return path.split(".").reduce(reducer, obj);
4234
+ }
4235
+ }
4236
+
4237
+ let StringifierPipe = class StringifierPipe {
4238
+ transform(value, separator, paths, pipes) {
4239
+ return AgroObjectStringifier.formatObject(separator, paths, value, pipes);
4240
+ }
4241
+ };
4242
+ StringifierPipe = __decorate([
4243
+ Pipe({ name: "stringifier" })
4244
+ ], StringifierPipe);
4245
+
4246
+ let StringifierPipeModule = class StringifierPipeModule {
4247
+ };
4248
+ StringifierPipeModule = __decorate([
4249
+ NgModule({
4250
+ declarations: [StringifierPipe],
4251
+ imports: [CommonModule],
4252
+ exports: [StringifierPipe],
4253
+ })
4254
+ ], StringifierPipeModule);
4255
+
4256
+ let TelephonePipe = class TelephonePipe {
4257
+ /**
4258
+ * Transforma um número de telefone aplicando máscara automaticamente.
4259
+ * @param value Valor do telefone.
4260
+ * @param withDDI Define se deve forçar formatação com DDI (mesmo que não exista).
4261
+ */
4262
+ transform(value, withDDI = false) {
4263
+ if (!value) {
4264
+ return "";
4265
+ }
4266
+ const digits = this.cleanDigits(value);
4267
+ if (!digits) {
4268
+ return value.toString();
4269
+ }
4270
+ const { ddi, ddd, number } = this.extractParts(digits, withDDI);
4271
+ return this.formatPhone(ddi, ddd, number, value.toString(), withDDI);
4272
+ }
4273
+ /** Remove todos os caracteres não numéricos */
4274
+ cleanDigits(value) {
4275
+ return value.toString().replace(/\D+/g, "");
4276
+ }
4277
+ /** Extrai DDI, DDD e número, considerando se deve aplicar DDI forçado */
4278
+ extractParts(digits, withDDI) {
4279
+ const len = digits.length;
4280
+ if (withDDI) {
4281
+ return this.extractWithDDI(digits);
4282
+ }
4283
+ if (len <= AGRO_NUMBERS.NINE) {
4284
+ return { ddi: "", ddd: "", number: digits };
4285
+ }
4286
+ if (len <= AGRO_NUMBERS.ELEVEN) {
4287
+ return this.extractWithDDD(digits);
4288
+ }
4289
+ return this.extractWithDDI(digits);
4290
+ }
4291
+ /** Extrai DDD e número (sem DDI) */
4292
+ extractWithDDD(digits) {
4293
+ const ddd = digits.slice(0, 2);
4294
+ const number = digits.slice(2);
4295
+ return { ddi: "", ddd, number };
4296
+ }
4297
+ /** Extrai DDI, DDD e número */
4298
+ extractWithDDI(digits) {
4299
+ const len = digits.length;
4300
+ let ddiLen = AGRO_NUMBERS.ONE;
4301
+ if (len >= AGRO_NUMBERS.FOURTEEN) {
4302
+ ddiLen = AGRO_NUMBERS.THREE;
4303
+ }
4304
+ if (len >= AGRO_NUMBERS.TWELVE) {
4305
+ ddiLen = AGRO_NUMBERS.TWO;
4306
+ }
4307
+ const ddi = digits.slice(AGRO_NUMBERS.ZERO, ddiLen);
4308
+ const ddd = digits.slice(ddiLen, ddiLen + AGRO_NUMBERS.TWO);
4309
+ const number = digits.slice(ddiLen + AGRO_NUMBERS.TWO);
4310
+ return { ddi, ddd, number };
4311
+ }
4312
+ /** Monta o número formatado */
4313
+ formatPhone(ddi, ddd, number, fallback, withDDI) {
4314
+ if (!number) {
4315
+ return fallback;
4316
+ }
4317
+ let formatted = "";
4318
+ if (withDDI || ddi) {
4319
+ formatted += `+${ddi || "55"} `;
4320
+ }
4321
+ if (ddd) {
4322
+ formatted += `(${ddd}) `;
4323
+ }
4324
+ formatted += this.formatNumber(number);
4325
+ return formatted;
4326
+ }
4327
+ /** Aplica máscara de 8 ou 9 dígitos */
4328
+ formatNumber(number) {
4329
+ const len = number.length;
4330
+ if (len === AGRO_NUMBERS.NINE) {
4331
+ return `${number.slice(AGRO_NUMBERS.ZERO, AGRO_NUMBERS.FIVE)}-${number.slice(AGRO_NUMBERS.FIVE)}`;
4332
+ }
4333
+ if (len === AGRO_NUMBERS.EIGHT) {
4334
+ return `${number.slice(AGRO_NUMBERS.ZERO, AGRO_NUMBERS.FOUR)}-${number.slice(AGRO_NUMBERS.FOUR)}`;
4335
+ }
4336
+ return number;
4337
+ }
4338
+ };
4339
+ TelephonePipe = __decorate([
4340
+ Pipe({ name: "telephone" })
4341
+ ], TelephonePipe);
4342
+
4343
+ let TelephonePipeModule = class TelephonePipeModule {
4344
+ };
4345
+ TelephonePipeModule = __decorate([
4346
+ NgModule({
4347
+ declarations: [TelephonePipe],
4348
+ imports: [CommonModule],
4349
+ exports: [TelephonePipe],
4350
+ })
4351
+ ], TelephonePipeModule);
4352
+
4353
+ let LibTranslatePipe = class LibTranslatePipe {
4354
+ constructor(translateService) {
4355
+ this.translateService = translateService;
4356
+ }
4357
+ transform(value, ...args) {
4358
+ if (args.length > 0) {
4359
+ return this.translateService.instant(value, args[0]);
4360
+ }
4361
+ return this.translateService.instant(value);
4362
+ }
4363
+ };
4364
+ LibTranslatePipe.ctorParameters = () => [
4365
+ { type: LibTranslationService }
4366
+ ];
4367
+ LibTranslatePipe = __decorate([
4368
+ Pipe({
4369
+ name: 'libTranslate'
4370
+ })
4371
+ ], LibTranslatePipe);
4372
+
4150
4373
  let CancelEventDialogComponent = class CancelEventDialogComponent {
4151
4374
  constructor(formBuilder, config, ref, translate) {
4152
4375
  this.formBuilder = formBuilder;
@@ -5139,20 +5362,17 @@ let EventControlBoardComponent = class EventControlBoardComponent {
5139
5362
  return translatedErrorMessages;
5140
5363
  }
5141
5364
  getProducerInvoiceIdFromParams(param) {
5142
- var _a, _b, _c, _d;
5143
- if ((param === null || param === void 0 ? void 0 : param.producerInvoiceIds) && (param === null || param === void 0 ? void 0 : param.producerInvoiceIds.length) > 0) {
5144
- return param === null || param === void 0 ? void 0 : param.producerInvoiceIds[0];
5145
- }
5146
- if ((_b = (_a = param === null || param === void 0 ? void 0 : param.invoice) === null || _a === void 0 ? void 0 : _a.generalData) === null || _b === void 0 ? void 0 : _b.transactionalId) {
5147
- return (_d = (_c = param === null || param === void 0 ? void 0 : param.invoice) === null || _c === void 0 ? void 0 : _c.generalData) === null || _d === void 0 ? void 0 : _d.transactionalId;
5148
- }
5149
- if (param === null || param === void 0 ? void 0 : param.producerInvoiceId) {
5150
- return param === null || param === void 0 ? void 0 : param.producerInvoiceId;
5151
- }
5152
- if (param === null || param === void 0 ? void 0 : param.externalId) {
5153
- return param === null || param === void 0 ? void 0 : param.externalId;
5365
+ var _a, _b, _c, _d, _e;
5366
+ if (!param) {
5367
+ return null;
5154
5368
  }
5155
- return null;
5369
+ return (_e = [
5370
+ (_a = param.producerInvoiceIds) === null || _a === void 0 ? void 0 : _a[0],
5371
+ (_c = (_b = param.invoice) === null || _b === void 0 ? void 0 : _b.generalData) === null || _c === void 0 ? void 0 : _c.transactionalId,
5372
+ param.producerInvoiceId,
5373
+ param.externalId,
5374
+ (_d = param.externalInvoiceIds) === null || _d === void 0 ? void 0 : _d[0],
5375
+ ].find((id) => id)) !== null && _e !== void 0 ? _e : null;
5156
5376
  }
5157
5377
  getProducerBalanceEntryControlIdFromParams(param) {
5158
5378
  const { producerBalanceEntryControlId } = param;
@@ -5313,7 +5533,7 @@ __decorate([
5313
5533
  EventControlBoardComponent = __decorate([
5314
5534
  Component({
5315
5535
  selector: "event-control-board",
5316
- template: "<ng-container *sLoadingState=\"gridLoading\">\r\n <p-panel>\r\n <p-header>\r\n {{ \"agro.angular_components.event_control_header\" | libTranslate }}\r\n </p-header>\r\n <div class=\"ui-g\">\r\n <div class=\"ui-g-12\">\r\n <s-button\r\n id=\"refresh-button\"\r\n [priority]=\"ButtonPriority.Primary\"\r\n iconClass=\"fa fa-refresh\"\r\n [label]=\"'agro.angular_components.refresh' | libTranslate\"\r\n (click)=\"onSearch()\"\r\n >\r\n </s-button>\r\n <s-button\r\n *ngIf=\"standalone && showCancelButton\"\r\n id=\"cancel-button-agro-events-lib\"\r\n iconClass=\"fa fa-times\"\r\n [label]=\"'agro.angular_components.cancel' | libTranslate\"\r\n (click)=\"openCancelModal()\"\r\n >\r\n </s-button>\r\n </div>\r\n </div>\r\n <div class=\"ui-g\">\r\n <div class=\"ui-g-12 ui-md-12\" *ngIf=\"!gridData || gridData?.length === 0\">\r\n <s-empty-state\r\n iconClass=\"fa fa-exclamation-triangle\"\r\n title=\"{{ 'agro.angular_components.nothing_found' | libTranslate }}\"\r\n [showPrimaryAction]=\"false\"\r\n description=\"{{ 'agro.angular_components.table_empty_description' | libTranslate }}\"\r\n >\r\n </s-empty-state>\r\n </div>\r\n <ng-container *ngIf=\"gridData?.length > 0\">\r\n <p-table\r\n stylelass=\"custom-table\"\r\n #eventControlTable\r\n [value]=\"gridDataResolved\"\r\n [columns]=\"gridColumns\"\r\n dataKey=\"id\"\r\n [lazy]=\"true\"\r\n [scrollable]=\"true\"\r\n [resizableColumns]=\"true\"\r\n [paginator]=\"!standalone\"\r\n [totalRecords]=\"gridTotalRecords\"\r\n [rows]=\"10\"\r\n [responsive]=\"true\"\r\n (onLazyLoad)=\"onGridChange($event)\"\r\n [sortOrder]=\"getSortOrder()\"\r\n [first]=\"getRowIndex()\"\r\n [lazyLoadOnInit]=\"false\"\r\n sortMode=\"multiple\"\r\n [rows]=\"getPageSize()\"\r\n [rowsPerPageOptions]=\"[10, 20, 50, 100]\"\r\n >\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n <ng-container *ngIf=\"!standalone\">\r\n <th\r\n *ngFor=\"let col of columns\"\r\n class=\"ui-lg-1 ui-md-1\"\r\n [pSortableColumn]=\"col.field\"\r\n scope=\"col\"\r\n >\r\n <div class=\"senior-header\">\r\n <span class=\"senior-header-title\">{{\r\n col.header\r\n }}</span>\r\n <p-sortIcon [field]=\"col.field\"></p-sortIcon>\r\n </div>\r\n </th>\r\n </ng-container>\r\n <th class=\"ui-lg-8 ui-md-7\" scope=\"col\">\r\n {{ \"agro.angular_components.panel_title_events_events\" | libTranslate }}\r\n </th>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"body\" let-rowData>\r\n <tr>\r\n <ng-container *ngIf=\"!standalone\">\r\n <td class=\"ui-lg-1 ui-md-1\">\r\n {{ rowData.e070emp?.nomEmp }}\r\n </td>\r\n <td class=\"ui-lg-1 ui-md-1\">\r\n {{ rowData.e070fil?.nomFil }}\r\n </td>\r\n <td class=\"ui-lg-1 ui-md-1\">\r\n <ng-container [ngSwitch]=\"rowData.eventOrigin\">\r\n <span *ngSwitchCase=\"'BALANCE_ENTRY_CONTROL'\">\r\n {{\r\n \"agro.angular_components.balance_entry_control_event\"\r\n | libTranslate\r\n }}\r\n </span>\r\n <span *ngSwitchCase=\"'TICKET'\">\r\n {{\r\n \"agro.angular_components.ticket_maintenance_header\"\r\n | libTranslate\r\n }}\r\n </span>\r\n <span *ngSwitchCase=\"'TRANSFER'\">\r\n {{\r\n \"agro.angular_components.transfer_origin_event\"\r\n | libTranslate\r\n }}\r\n </span>\r\n <span *ngSwitchCase=\"'INVOICE'\">\r\n {{\r\n \"agro.angular_components.invoice_creating_event\"\r\n | libTranslate\r\n }}\r\n </span>\r\n <span *ngSwitchCase=\"'CHANGE_REQUEST'\">\r\n {{\r\n \"agro.angular_components.change_request_event\"\r\n | libTranslate\r\n }}\r\n </span>\r\n <span *ngSwitchCase=\"'FIXATION'\">\r\n {{\r\n \"agro.angular_components.fixation_event\"\r\n | libTranslate\r\n }}\r\n </span>\r\n <span *ngSwitchCase=\"'CANCEL_FIXATION'\">\r\n {{\r\n \"agro.angular_components.cancel_fixation_event\"\r\n | libTranslate\r\n }}\r\n </span>\r\n <span *ngSwitchCase=\"'TRANSFER_CANCELLATION'\">\r\n {{\r\n \"agro.angular_components.transfer_cancellation_event\"\r\n | libTranslate\r\n }}\r\n </span>\r\n </ng-container>\r\n </td>\r\n <td class=\"ui-lg-1 ui ui-md-1\">\r\n {{ rowData.controlCode || \"\" }}\r\n </td>\r\n </ng-container>\r\n <td class=\"ui-lg-8 ui-md-7\">\r\n <ng-container *ngFor=\"let group of rowData.groups\">\r\n <s-event-steps\r\n [steps]=\"group.steps || []\"\r\n [activeIndex]=\"group.activeIndex\"\r\n (stepSelected)=\"stepSelected($event)\"\r\n >\r\n </s-event-steps>\r\n </ng-container>\r\n </td>\r\n </tr>\r\n </ng-template>\r\n <ng-template\r\n *ngIf=\"!standalone\"\r\n pTemplate=\"paginatorright\"\r\n class=\"custom-table\"\r\n >\r\n <span>\r\n {{\r\n \"agro.angular_components.registers_found\"\r\n | libTranslate : { total: gridTotalRecords }\r\n }}\r\n </span>\r\n </ng-template>\r\n </p-table>\r\n </ng-container>\r\n </div>\r\n </p-panel>\r\n</ng-container>\r\n<s-sidebar [visible]=\"showSidebar\" (visibleChange)=\"closeSidebar()\" header=\"{{ 'agro.angular_components.event_details_header' | libTranslate }}\">\r\n <div class=\"ui-fluid\">\r\n <p-fieldset [legend]=\"sidebarTitle\" [toggleable]=\"false\">\r\n <div class=\"ui-g\">\r\n <div class=\"ui-g-4\">\r\n <span\r\n ><strong>{{\r\n \"agro.angular_components.event_origin_label\" | libTranslate\r\n }}</strong></span\r\n >\r\n <ng-container [ngSwitch]=\"selectedStep?.eventType\">\r\n <p *ngSwitchCase=\"'BALANCE_ENTRY_CONTROL'\">\r\n {{ \"agro.angular_components.balance_entry_control_event\" | libTranslate }}\r\n </p>\r\n <p *ngSwitchCase=\"'TICKET'\">\r\n {{ \"agro.angular_components.ticket_maintenance_header\" | libTranslate }}\r\n </p>\r\n <p *ngSwitchCase=\"'TRANSFER'\">\r\n {{ \"agro.angular_components.transfer_origin_event\" | libTranslate }}\r\n </p>\r\n <p *ngSwitchCase=\"'INVOICE'\">\r\n {{ \"agro.angular_components.invoice_creating_event\" | libTranslate }}\r\n </p>\r\n <p *ngSwitchCase=\"'CHANGE_REQUEST'\">\r\n {{ \"agro.angular_components.change_request_event\" | libTranslate }}\r\n </p>\r\n <p *ngSwitchCase=\"'FIXATION'\">\r\n {{ \"agro.angular_components.fixation_event\" | libTranslate }}\r\n </p>\r\n <p *ngSwitchCase=\"'CANCEL_FIXATION'\">\r\n {{ \"agro.angular_components.cancel_fixation_event\" | libTranslate }}\r\n </p>\r\n <p *ngSwitchCase=\"'TRANSFER_CANCELLATION'\">\r\n {{ \"agro.angular_components.transfer_cancellation_event\" | libTranslate }}\r\n </p>\r\n </ng-container>\r\n </div>\r\n <div class=\"ui-g-4\" *ngIf=\"producerInvoice?.producerBalanceEntryControl.producer.e001pes.nomPes\">\r\n <span\r\n ><strong>{{ \"agro.angular_components.supplier\" | libTranslate }}</strong></span\r\n >\r\n <p>{{ producerInvoice?.producerBalanceEntryControl.producer.e001pes.nomPes }}</p>\r\n </div>\r\n <div class=\"ui-g-4\" *ngIf=\"producerInvoice?.producerBalanceEntryControl.ruralEstate.name\">\r\n <span\r\n ><strong>{{ \"agro.angular_components.rural_estate\" | libTranslate }}</strong></span\r\n >\r\n <p>{{ producerInvoice?.producerBalanceEntryControl.ruralEstate.name }}</p>\r\n </div>\r\n <div class=\"ui-g-4\" *ngIf=\"selectedStep?.controlCode\">\r\n <span\r\n ><strong>{{ \"agro.angular_components.control_code\" | libTranslate }}</strong></span\r\n >\r\n <p>{{ selectedStep?.controlCode }}</p>\r\n </div>\r\n <div class=\"ui-g-4\">\r\n <span\r\n ><strong>{{ \"agro.angular_components.status_label\" | libTranslate }}</strong></span\r\n >\r\n <ng-container [ngSwitch]=\"selectedStep?.item.status\">\r\n <p *ngSwitchCase=\"'SUCCESS'\">\r\n <s-badge\r\n [color]=\"BadgeColors.Green\"\r\n text=\"{{\r\n 'agro.angular_components.panel_title_events_completed_successfully'\r\n | libTranslate\r\n }}\"\r\n [selectable]=\"false\"\r\n >\r\n </s-badge>\r\n </p>\r\n <p *ngSwitchCase=\"'PROCESSING'\">\r\n <s-badge\r\n [color]=\"BadgeColors.Orange\"\r\n text=\"{{ 'agro.angular_components.processing' | libTranslate }}\"\r\n [selectable]=\"false\"\r\n >\r\n </s-badge>\r\n </p>\r\n <p *ngSwitchCase=\"'FAILED'\">\r\n <s-badge\r\n [color]=\"BadgeColors.Red\"\r\n text=\"{{\r\n 'agro.angular_components.panel_title_events_ended_with_error'\r\n | libTranslate\r\n }}\"\r\n [selectable]=\"false\"\r\n >\r\n </s-badge>\r\n </p>\r\n <p *ngSwitchCase=\"'PENDING'\">\r\n <s-badge\r\n [color]=\"BadgeColors.Gray\"\r\n text=\"{{ 'agro.angular_components.pending' | libTranslate }}\"\r\n [selectable]=\"false\"\r\n >\r\n </s-badge>\r\n </p>\r\n </ng-container>\r\n </div>\r\n <div class=\"ui-g-4\">\r\n <span\r\n ><strong>{{\r\n \"agro.angular_components.last_update_date\" | libTranslate\r\n }}</strong></span\r\n >\r\n <p>{{ selectedStep?.item.lastModifiedDate | date : \"dd/MM/yyyy HH:mm:ss\" }}</p>\r\n </div>\r\n <div class=\"ui-g-4\" *ngIf=\"selectedStep?.item.status === 'FAILED'\">\r\n <span\r\n ><strong>{{\r\n \"agro.angular_components.event_error_message\" | libTranslate\r\n }}</strong></span\r\n >\r\n <p>{{ selectedStep?.item.message || \"-\" }}</p>\r\n </div>\r\n </div>\r\n </p-fieldset>\r\n </div>\r\n <s-footer>\r\n <div class=\"ui-g\">\r\n <div class=\"ui-g-12 width-fit\">\r\n <s-button\r\n id=\"sidebar-close-button\"\r\n [priority]=\"ButtonPriority.Primary\"\r\n [label]=\"'agro.angular_components.events_close' | libTranslate\"\r\n [auxiliary]=\"false\"\r\n (click)=\"closeSidebar()\"\r\n >\r\n </s-button>\r\n <s-button\r\n *ngIf=\"showReprocessButton\"\r\n id=\"sidebar-reprocess-button\"\r\n [priority]=\"ButtonPriority.Secondary\"\r\n iconClass=\"fa fa-refresh\"\r\n [label]=\"'agro.angular_components.reprocess_event' | libTranslate\"\r\n [auxiliary]=\"false\"\r\n (click)=\"openModal()\"\r\n >\r\n </s-button>\r\n </div>\r\n </div>\r\n </s-footer>\r\n</s-sidebar>\r\n\r\n<p-dialog [header]=\"'agro.angular_components.event_modal_title' | libTranslate\" [(visible)]=\"displayModal\" [modal]=\"true\" class=\"dialog\">\r\n <div class=\"event-modal-text\">{{ \"agro.angular_components.event_modal\" | libTranslate }}</div>\r\n <p-footer>\r\n <div class=\"ui-dialog-buttonpane ui-widget-content ui-helper-clearfix\">\r\n <button\r\n id=\"modal-yes\"\r\n type=\"button\"\r\n pButton\r\n icon=\"fa fa-check\"\r\n (click)=\"confirmModal()\"\r\n label=\"{{ 'agro.angular_components.yes' | libTranslate }}\"\r\n class=\"ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only\"\r\n ></button>\r\n <button\r\n id=\"modal-no\"\r\n type=\"button\"\r\n pButton\r\n icon=\"fa fa-close\"\r\n (click)=\"cancelModal()\"\r\n label=\"{{ 'agro.angular_components.no' | libTranslate }}\"\r\n class=\"ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only\"\r\n ></button>\r\n </div>\r\n </p-footer>\r\n</p-dialog>\r\n",
5536
+ template: "<ng-container *sLoadingState=\"gridLoading\">\r\n <p-panel>\r\n <p-header>\r\n {{ \"agro.angular_components.event_control_header\" | libTranslate }}\r\n </p-header>\r\n <div class=\"ui-g\">\r\n <div class=\"ui-g-12\">\r\n <s-button\r\n id=\"refresh-button\"\r\n [priority]=\"ButtonPriority.Primary\"\r\n iconClass=\"fa fa-refresh\"\r\n [label]=\"'agro.angular_components.refresh' | libTranslate\"\r\n (click)=\"onSearch()\"\r\n >\r\n </s-button>\r\n <s-button\r\n *ngIf=\"standalone && showCancelButton\"\r\n id=\"cancel-button-agro-events-lib\"\r\n iconClass=\"fa fa-times\"\r\n [label]=\"'agro.angular_components.cancel' | libTranslate\"\r\n (click)=\"openCancelModal()\"\r\n >\r\n </s-button>\r\n </div>\r\n </div>\r\n <div class=\"ui-g\">\r\n <div class=\"ui-g-12 ui-md-12\" *ngIf=\"!gridData || gridData?.length === 0\">\r\n <s-empty-state\r\n iconClass=\"fa fa-exclamation-triangle\"\r\n title=\"{{ 'agro.angular_components.nothing_found' | libTranslate }}\"\r\n [showPrimaryAction]=\"false\"\r\n description=\"{{ 'agro.angular_components.table_empty_description' | libTranslate }}\"\r\n >\r\n </s-empty-state>\r\n </div>\r\n <ng-container *ngIf=\"gridData?.length > 0\">\r\n <p-table\r\n stylelass=\"custom-table\"\r\n #eventControlTable\r\n [value]=\"gridDataResolved\"\r\n [columns]=\"gridColumns\"\r\n dataKey=\"id\"\r\n [lazy]=\"true\"\r\n [scrollable]=\"true\"\r\n [resizableColumns]=\"true\"\r\n [paginator]=\"!standalone\"\r\n [totalRecords]=\"gridTotalRecords\"\r\n [rows]=\"10\"\r\n [responsive]=\"true\"\r\n (onLazyLoad)=\"onGridChange($event)\"\r\n [sortOrder]=\"getSortOrder()\"\r\n [first]=\"getRowIndex()\"\r\n [lazyLoadOnInit]=\"false\"\r\n sortMode=\"multiple\"\r\n [rows]=\"getPageSize()\"\r\n [rowsPerPageOptions]=\"[10, 20, 50, 100]\"\r\n >\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n <ng-container *ngIf=\"!standalone\">\r\n <th *ngFor=\"let col of columns\" class=\"ui-lg-1 ui-md-1\" [pSortableColumn]=\"col.field\" scope=\"col\">\r\n <div class=\"senior-header\">\r\n <span class=\"senior-header-title\">{{ col.header }}</span>\r\n <p-sortIcon [field]=\"col.field\"></p-sortIcon>\r\n </div>\r\n </th>\r\n </ng-container>\r\n <th class=\"ui-lg-8 ui-md-7\" scope=\"col\">\r\n {{ \"agro.angular_components.panel_title_events_events\" | libTranslate }}\r\n </th>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"body\" let-rowData>\r\n <tr>\r\n <ng-container *ngIf=\"!standalone\">\r\n <td class=\"ui-lg-1 ui-md-1\">\r\n {{ rowData.e070emp?.nomEmp }}\r\n </td>\r\n <td class=\"ui-lg-1 ui-md-1\">\r\n {{ rowData.e070fil?.nomFil }}\r\n </td>\r\n <td class=\"ui-lg-1 ui-md-1\">\r\n <ng-container [ngSwitch]=\"rowData.eventOrigin\">\r\n <span *ngSwitchCase=\"'BALANCE_ENTRY_CONTROL'\">\r\n {{ \"agro.angular_components.balance_entry_control_event\" | libTranslate }}\r\n </span>\r\n <span *ngSwitchCase=\"'TICKET'\">\r\n {{ \"agro.angular_components.ticket_maintenance_header\" | libTranslate }}\r\n </span>\r\n <span *ngSwitchCase=\"'TRANSFER'\">\r\n {{ \"agro.angular_components.transfer_origin_event\" | libTranslate }}\r\n </span>\r\n <span *ngSwitchCase=\"'INVOICE'\">\r\n {{ \"agro.angular_components.invoice_creating_event\" | libTranslate }}\r\n </span>\r\n <span *ngSwitchCase=\"'CHANGE_REQUEST'\">\r\n {{ \"agro.angular_components.change_request_event\" | libTranslate }}\r\n </span>\r\n <span *ngSwitchCase=\"'FIXATION'\">\r\n {{ \"agro.angular_components.fixation_event\" | libTranslate }}\r\n </span>\r\n <span *ngSwitchCase=\"'CANCEL_FIXATION'\">\r\n {{ \"agro.angular_components.cancel_fixation_event\" | libTranslate }}\r\n </span>\r\n <span *ngSwitchCase=\"'TRANSFER_CANCELLATION'\">\r\n {{ \"agro.angular_components.transfer_cancellation_event\" | libTranslate }}\r\n </span>\r\n <span *ngSwitchCase=\"'AGRONOMIC_PRESCRIPTION'\">\r\n {{ \"agro.angular_components.agronomic_prescription_origin_event\" | libTranslate }}\r\n </span>\r\n <span *ngSwitchCase=\"'PRESCRIPTION_INTEGRATION_HUB'\">\r\n {{ \"agro.angular_components.agronomic_prescription_origin_event\" | libTranslate }}\r\n </span>\r\n </ng-container>\r\n </td>\r\n <td class=\"ui-lg-1 ui ui-md-1\">\r\n {{ rowData.controlCode || \"\" }}\r\n </td>\r\n </ng-container>\r\n <td class=\"ui-lg-8 ui-md-7\">\r\n <ng-container *ngFor=\"let group of rowData.groups\">\r\n <s-event-steps\r\n [steps]=\"group.steps || []\"\r\n [activeIndex]=\"group.activeIndex\"\r\n (stepSelected)=\"stepSelected($event)\"\r\n >\r\n </s-event-steps>\r\n </ng-container>\r\n </td>\r\n </tr>\r\n </ng-template>\r\n <ng-template *ngIf=\"!standalone\" pTemplate=\"paginatorright\" class=\"custom-table\">\r\n <span>\r\n {{ \"agro.angular_components.registers_found\" | libTranslate: { total: gridTotalRecords } }}\r\n </span>\r\n </ng-template>\r\n </p-table>\r\n </ng-container>\r\n </div>\r\n </p-panel>\r\n</ng-container>\r\n<s-sidebar\r\n [visible]=\"showSidebar\"\r\n (visibleChange)=\"closeSidebar()\"\r\n header=\"{{ 'agro.angular_components.event_details_header' | libTranslate }}\"\r\n>\r\n <div class=\"ui-fluid\">\r\n <p-fieldset [legend]=\"sidebarTitle\" [toggleable]=\"false\">\r\n <div class=\"ui-g\">\r\n <div class=\"ui-g-4\">\r\n <span\r\n ><strong>{{ \"agro.angular_components.event_origin_label\" | libTranslate }}</strong></span\r\n >\r\n <ng-container [ngSwitch]=\"selectedStep?.eventType\">\r\n <p *ngSwitchCase=\"'BALANCE_ENTRY_CONTROL'\">\r\n {{ \"agro.angular_components.balance_entry_control_event\" | libTranslate }}\r\n </p>\r\n <p *ngSwitchCase=\"'TICKET'\">\r\n {{ \"agro.angular_components.ticket_maintenance_header\" | libTranslate }}\r\n </p>\r\n <p *ngSwitchCase=\"'TRANSFER'\">\r\n {{ \"agro.angular_components.transfer_origin_event\" | libTranslate }}\r\n </p>\r\n <p *ngSwitchCase=\"'INVOICE'\">\r\n {{ \"agro.angular_components.invoice_creating_event\" | libTranslate }}\r\n </p>\r\n <p *ngSwitchCase=\"'CHANGE_REQUEST'\">\r\n {{ \"agro.angular_components.change_request_event\" | libTranslate }}\r\n </p>\r\n <p *ngSwitchCase=\"'FIXATION'\">\r\n {{ \"agro.angular_components.fixation_event\" | libTranslate }}\r\n </p>\r\n <p *ngSwitchCase=\"'CANCEL_FIXATION'\">\r\n {{ \"agro.angular_components.cancel_fixation_event\" | libTranslate }}\r\n </p>\r\n <p *ngSwitchCase=\"'TRANSFER_CANCELLATION'\">\r\n {{ \"agro.angular_components.transfer_cancellation_event\" | libTranslate }}\r\n </p>\r\n <p *ngSwitchCase=\"'AGRONOMIC_PRESCRIPTION'\">\r\n {{ \"agro.angular_components.agronomic_prescription_origin_event\" | libTranslate }}\r\n </p>\r\n <p *ngSwitchCase=\"'PRESCRIPTION_INTEGRATION_HUB'\">\r\n {{ \"agro.angular_components.agronomic_prescription_origin_event\" | libTranslate }}\r\n </p>\r\n </ng-container>\r\n </div>\r\n <div class=\"ui-g-4\" *ngIf=\"producerInvoice?.producerBalanceEntryControl.producer.e001pes.nomPes\">\r\n <span\r\n ><strong>{{ \"agro.angular_components.supplier\" | libTranslate }}</strong></span\r\n >\r\n <p>{{ producerInvoice?.producerBalanceEntryControl.producer.e001pes.nomPes }}</p>\r\n </div>\r\n <div class=\"ui-g-4\" *ngIf=\"producerInvoice?.producerBalanceEntryControl.ruralEstate.name\">\r\n <span\r\n ><strong>{{ \"agro.angular_components.rural_estate\" | libTranslate }}</strong></span\r\n >\r\n <p>{{ producerInvoice?.producerBalanceEntryControl.ruralEstate.name }}</p>\r\n </div>\r\n <div class=\"ui-g-4\" *ngIf=\"selectedStep?.controlCode\">\r\n <span\r\n ><strong>{{ \"agro.angular_components.control_code\" | libTranslate }}</strong></span\r\n >\r\n <p>{{ selectedStep?.controlCode }}</p>\r\n </div>\r\n <div class=\"ui-g-4\">\r\n <span\r\n ><strong>{{ \"agro.angular_components.status_label\" | libTranslate }}</strong></span\r\n >\r\n <ng-container [ngSwitch]=\"selectedStep?.item.status\">\r\n <p *ngSwitchCase=\"'SUCCESS'\">\r\n <s-badge\r\n [color]=\"BadgeColors.Green\"\r\n text=\"{{ 'agro.angular_components.panel_title_events_completed_successfully' | libTranslate }}\"\r\n [selectable]=\"false\"\r\n >\r\n </s-badge>\r\n </p>\r\n <p *ngSwitchCase=\"'PROCESSING'\">\r\n <s-badge\r\n [color]=\"BadgeColors.Orange\"\r\n text=\"{{ 'agro.angular_components.processing' | libTranslate }}\"\r\n [selectable]=\"false\"\r\n >\r\n </s-badge>\r\n </p>\r\n <p *ngSwitchCase=\"'FAILED'\">\r\n <s-badge\r\n [color]=\"BadgeColors.Red\"\r\n text=\"{{ 'agro.angular_components.panel_title_events_ended_with_error' | libTranslate }}\"\r\n [selectable]=\"false\"\r\n >\r\n </s-badge>\r\n </p>\r\n <p *ngSwitchCase=\"'PENDING'\">\r\n <s-badge\r\n [color]=\"BadgeColors.Gray\"\r\n text=\"{{ 'agro.angular_components.pending' | libTranslate }}\"\r\n [selectable]=\"false\"\r\n >\r\n </s-badge>\r\n </p>\r\n </ng-container>\r\n </div>\r\n <div class=\"ui-g-4\">\r\n <span\r\n ><strong>{{ \"agro.angular_components.last_update_date\" | libTranslate }}</strong></span\r\n >\r\n <p>{{ selectedStep?.item.lastModifiedDate | date: \"dd/MM/yyyy HH:mm:ss\" }}</p>\r\n </div>\r\n <div class=\"ui-g-4\" *ngIf=\"selectedStep?.item.status === 'FAILED'\">\r\n <span\r\n ><strong>{{ \"agro.angular_components.event_error_message\" | libTranslate }}</strong></span\r\n >\r\n <p>{{ selectedStep?.item.message || \"-\" }}</p>\r\n </div>\r\n </div>\r\n </p-fieldset>\r\n </div>\r\n <s-footer>\r\n <div class=\"ui-g\">\r\n <div class=\"ui-g-12 width-fit\">\r\n <s-button\r\n id=\"sidebar-close-button\"\r\n [priority]=\"ButtonPriority.Primary\"\r\n [label]=\"'agro.angular_components.events_close' | libTranslate\"\r\n [auxiliary]=\"false\"\r\n (click)=\"closeSidebar()\"\r\n >\r\n </s-button>\r\n <s-button\r\n *ngIf=\"showReprocessButton\"\r\n id=\"sidebar-reprocess-button\"\r\n [priority]=\"ButtonPriority.Secondary\"\r\n iconClass=\"fa fa-refresh\"\r\n [label]=\"'agro.angular_components.reprocess_event' | libTranslate\"\r\n [auxiliary]=\"false\"\r\n (click)=\"openModal()\"\r\n >\r\n </s-button>\r\n </div>\r\n </div>\r\n </s-footer>\r\n</s-sidebar>\r\n\r\n<p-dialog [header]=\"'agro.angular_components.event_modal_title' | libTranslate\" [(visible)]=\"displayModal\" [modal]=\"true\" class=\"dialog\">\r\n <div class=\"event-modal-text\">{{ \"agro.angular_components.event_modal\" | libTranslate }}</div>\r\n <p-footer>\r\n <div class=\"ui-dialog-buttonpane ui-widget-content ui-helper-clearfix\">\r\n <button\r\n id=\"modal-yes\"\r\n type=\"button\"\r\n pButton\r\n icon=\"fa fa-check\"\r\n (click)=\"confirmModal()\"\r\n label=\"{{ 'agro.angular_components.yes' | libTranslate }}\"\r\n class=\"ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only\"\r\n ></button>\r\n <button\r\n id=\"modal-no\"\r\n type=\"button\"\r\n pButton\r\n icon=\"fa fa-close\"\r\n (click)=\"cancelModal()\"\r\n label=\"{{ 'agro.angular_components.no' | libTranslate }}\"\r\n class=\"ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only\"\r\n ></button>\r\n </div>\r\n </p-footer>\r\n</p-dialog>\r\n",
5317
5537
  providers: [{ provide: LOCALE_ID, useValue: "pt-BR" }],
5318
5538
  styles: [".frozen{border-left:2px solid #ddd}.dialog{width:\"600px\";height:\"300px\";z-index:100000}:host ::ng-deep #cancel-button-agro-events-lib{background-color:#9c3a3a!important;border-color:#9c3a3a!important}:host ::ng-deep #cancel-button-agro-events-lib:hover{background-color:#642525!important}"]
5319
5539
  })
@@ -5994,26 +6214,6 @@ TicketModule = __decorate([
5994
6214
  })
5995
6215
  ], TicketModule);
5996
6216
 
5997
- let LibTranslatePipe = class LibTranslatePipe {
5998
- constructor(translateService) {
5999
- this.translateService = translateService;
6000
- }
6001
- transform(value, ...args) {
6002
- if (args.length > 0) {
6003
- return this.translateService.instant(value, args[0]);
6004
- }
6005
- return this.translateService.instant(value);
6006
- }
6007
- };
6008
- LibTranslatePipe.ctorParameters = () => [
6009
- { type: LibTranslationService }
6010
- ];
6011
- LibTranslatePipe = __decorate([
6012
- Pipe({
6013
- name: 'libTranslate'
6014
- })
6015
- ], LibTranslatePipe);
6016
-
6017
6217
  let LibTranslationModule = class LibTranslationModule {
6018
6218
  };
6019
6219
  LibTranslationModule = __decorate([
@@ -6024,6 +6224,7 @@ LibTranslationModule = __decorate([
6024
6224
  imports: [
6025
6225
  CommonModule
6026
6226
  ],
6227
+ providers: [LibTranslationService],
6027
6228
  exports: [
6028
6229
  LibTranslatePipe
6029
6230
  ]
@@ -6118,177 +6319,412 @@ EventControlBoardModule = __decorate([
6118
6319
  })
6119
6320
  ], EventControlBoardModule);
6120
6321
 
6121
- let CnpjCpfPipe = class CnpjCpfPipe {
6122
- transform(value, ...args) {
6123
- if (typeof value !== "string" && typeof value === "number") {
6124
- value = value === null || value === void 0 ? void 0 : value.toString();
6125
- }
6126
- if (typeof value !== "string") {
6127
- return value;
6322
+ class AgroEntityService {
6323
+ constructor(http, messageService, entityUrl, actionsUrl, queriesUrl, translate) {
6324
+ this.http = http;
6325
+ this.messageService = messageService;
6326
+ this.entityUrl = entityUrl;
6327
+ this.actionsUrl = actionsUrl;
6328
+ this.queriesUrl = queriesUrl;
6329
+ this.translate = translate;
6330
+ this.http = http;
6331
+ this.messageService = messageService;
6332
+ this.entityUrl = entityUrl;
6333
+ this.actionsUrl = actionsUrl;
6334
+ this.queriesUrl = queriesUrl;
6335
+ this.translate = translate;
6336
+ this.defaultCatch = this.defaultCatch.bind(this);
6337
+ }
6338
+ getListQueryParams(listParams) {
6339
+ const ten = 10;
6340
+ const { page = 0, size = ten, sort = [], filterQuery = "", displayFields = [] } = listParams;
6341
+ let params = new HttpParams();
6342
+ params = params.append("size", String(size));
6343
+ params = params.append("offset", String(page));
6344
+ if (sort && sort.length) {
6345
+ params = params.append("orderby", sort.map(this.getBodyFilters()).join(", "));
6128
6346
  }
6129
- if (AgroStringUtils.validateCNPJ(value)) {
6130
- return AgroStringUtils.applyMask(value, AgroStringMasks.CNPJ);
6347
+ if (filterQuery) {
6348
+ params = params.append("filter", filterQuery);
6131
6349
  }
6132
- if (AgroStringUtils.validateCPF(value)) {
6133
- return AgroStringUtils.applyMask(value, AgroStringMasks.CPF);
6350
+ if (displayFields && displayFields.length) {
6351
+ params = params.append("displayfields", displayFields.join());
6134
6352
  }
6135
- return value;
6353
+ return params;
6136
6354
  }
6137
- };
6138
- CnpjCpfPipe = __decorate([
6139
- Pipe({
6140
- name: "cnpjCpf",
6141
- })
6142
- ], CnpjCpfPipe);
6143
-
6144
- let CnpjCpfPipeModule = class CnpjCpfPipeModule {
6145
- };
6146
- CnpjCpfPipeModule = __decorate([
6147
- NgModule({
6148
- declarations: [CnpjCpfPipe],
6149
- imports: [CommonModule],
6150
- exports: [CnpjCpfPipe],
6151
- })
6152
- ], CnpjCpfPipeModule);
6153
-
6154
- class AgroObjectStringifier {
6155
- /**
6156
- * Formata um objeto concatenando valores segundo as chaves e pipes informados.
6157
- *
6158
- * @param separator Separador entre os valores (ex: "-")
6159
- * @param fields Campos a extrair. Podem conter subpropriedades ("propriedade.subPropriedade") e pipes ("propriedade|nomeDaPipe:arg1:arg2")
6160
- * @param obj Objeto origem
6161
- */
6162
- static formatObject(separator, fields, obj, usePipes) {
6163
- function mapField(field) {
6164
- const value = AgroObjectStringifier.resolvePath(obj, field);
6165
- if (usePipes === null || usePipes === void 0 ? void 0 : usePipes.hasOwnProperty(field)) {
6166
- return usePipes[field].transform(value);
6167
- }
6168
- return value !== null && value !== void 0 ? value : "";
6355
+ getBodyParams(listParams) {
6356
+ const ten = 10;
6357
+ const { page = 0, size = ten, sort = [], filterQuery = "", displayFields = [] } = listParams;
6358
+ const bodyParams = {};
6359
+ bodyParams.size = size;
6360
+ bodyParams.offset = page;
6361
+ if (sort && sort.length) {
6362
+ bodyParams.orderBy = sort.map(this.getBodyFilters()).join(", ");
6169
6363
  }
6170
- function filterValid(v) {
6171
- if (typeof v === "number" || AgroStringUtils.isValid(v)) {
6172
- return true;
6173
- }
6364
+ if (filterQuery) {
6365
+ bodyParams.filter = filterQuery;
6174
6366
  }
6175
- return fields.map(mapField).filter(filterValid).join(` ${separator} `);
6367
+ if (displayFields && displayFields.length) {
6368
+ bodyParams.displayfields = displayFields.join();
6369
+ }
6370
+ return bodyParams;
6176
6371
  }
6177
- /** Resolve um caminho tipo "empresa.cargo" dentro de um objeto */
6178
- static resolvePath(obj, path) {
6179
- function reducer(acc, key) {
6180
- return acc === null || acc === void 0 ? void 0 : acc[key];
6372
+ getBodyFilters() {
6373
+ return (s) => {
6374
+ let order = "";
6375
+ if (s.order === 1) {
6376
+ order = " asc";
6377
+ }
6378
+ if (s.order === -1) {
6379
+ order = " desc";
6380
+ }
6381
+ return `${s.field}${order}`;
6382
+ };
6383
+ }
6384
+ defaultCatch(errorMsgs = []) {
6385
+ const unauthorized_401 = 401;
6386
+ // errorMsgs = [...errorMsgs, ...DefaultErrorMessages];
6387
+ errorMsgs = [...errorMsgs];
6388
+ const zero = 0;
6389
+ return catchError((err) => {
6390
+ if (err) {
6391
+ const errorMessage = errorMsgs.find((eMsg) => eMsg.status === (err === null || err === void 0 ? void 0 : err.status) || zero);
6392
+ let summary = err.status ? String(err.status) : "Error";
6393
+ let detail = this.getErrorMessage(err);
6394
+ if (err.status === unauthorized_401) {
6395
+ summary = this.translate.instant("agro.angular_components.error_unauthorized_title");
6396
+ detail = this.translate.instant("agro.angular_components.error_unauthorized_description");
6397
+ }
6398
+ if (errorMessage) {
6399
+ summary = errorMessage.summary ? this.translate.instant(errorMessage.summary) : summary;
6400
+ detail = errorMessage.detail ? this.translate.instant(errorMessage.detail) : detail;
6401
+ }
6402
+ this.messageService.add({
6403
+ severity: "error",
6404
+ summary,
6405
+ detail,
6406
+ });
6407
+ }
6408
+ return throwError(err);
6409
+ });
6410
+ }
6411
+ getErrorMessage(err) {
6412
+ if (err.error && err.error.message) {
6413
+ return err.error.message;
6181
6414
  }
6182
- return path.split(".").reduce(reducer, obj);
6415
+ if (err.statusText) {
6416
+ return err.statusText;
6417
+ }
6418
+ if (err.message) {
6419
+ return err.message;
6420
+ }
6421
+ return "Error";
6422
+ }
6423
+ list(listParams, errorMessage = []) {
6424
+ return this.http.get(this.entityUrl, { params: this.getListQueryParams(listParams) }).pipe(this.defaultCatch(errorMessage));
6425
+ }
6426
+ get(id, errorMessage = []) {
6427
+ return this.http.get(`${this.entityUrl}/${id}`).pipe(this.defaultCatch(errorMessage));
6428
+ }
6429
+ insert(entity, errorMessage = []) {
6430
+ return this.http.post(`${this.entityUrl}`, entity).pipe(this.defaultCatch(errorMessage));
6431
+ }
6432
+ update(id, entity, errorMessage = []) {
6433
+ return this.http.put(`${this.entityUrl}/${id}`, entity).pipe(this.defaultCatch(errorMessage));
6434
+ }
6435
+ delete(id, errorMessage = []) {
6436
+ return this.http.delete(`${this.entityUrl}/${id}`).pipe(this.defaultCatch(errorMessage));
6437
+ }
6438
+ listCustomFilter(listParams, action, errorMessage = []) {
6439
+ return this.http.post(`${this.actionsUrl}/${action}`, this.getBodyParams(listParams)).pipe(this.defaultCatch(errorMessage));
6183
6440
  }
6184
6441
  }
6185
6442
 
6186
- let StringifierPipe = class StringifierPipe {
6187
- transform(value, separator, paths, pipes) {
6188
- return AgroObjectStringifier.formatObject(separator, paths, value, pipes);
6189
- }
6190
- };
6191
- StringifierPipe = __decorate([
6192
- Pipe({ name: "stringifier" })
6193
- ], StringifierPipe);
6443
+ var statusLookup;
6444
+ (function (statusLookup) {
6445
+ statusLookup["PENDING"] = "PENDING";
6446
+ statusLookup["FINISHED"] = "FINISHED";
6447
+ statusLookup["ERROR"] = "ERROR";
6448
+ })(statusLookup || (statusLookup = {}));
6449
+ var statusIntegration;
6450
+ (function (statusIntegration) {
6451
+ statusIntegration["SUCCESS"] = "SUCCESS";
6452
+ statusIntegration["IN_PROGRESS"] = "IN_PROGRESS";
6453
+ statusIntegration["ERROR"] = "ERROR";
6454
+ })(statusIntegration || (statusIntegration = {}));
6194
6455
 
6195
- let StringifierPipeModule = class StringifierPipeModule {
6456
+ let AgroInvoiceService = class AgroInvoiceService extends AgroEntityService {
6457
+ constructor(http, messageService, translate) {
6458
+ super(http, messageService, `agro/invoice/entities/invoice`, `agro/invoice/actions`, `agro/invoice/queries`, translate);
6459
+ this.http = http;
6460
+ this.messageService = messageService;
6461
+ this.translate = translate;
6462
+ this.pooling = new Subject();
6463
+ }
6464
+ invoiceLookupFilter(data) {
6465
+ return this.http
6466
+ .post(`${this.queriesUrl}/invoiceLookup`, data)
6467
+ .pipe(switchMap((res) => this.pollInvoiceResult(res.requestId)));
6468
+ }
6469
+ cancelActivePooling() {
6470
+ this.pooling.next();
6471
+ }
6472
+ pollInvoiceResult(requestId) {
6473
+ const delays = Array.from({ length: 10 }, (_, index) => {
6474
+ if (index === 0)
6475
+ return 1000;
6476
+ return (index + 1) * 1000;
6477
+ });
6478
+ return scheduled(delays, asyncScheduler).pipe(concatMap((delay) => timer(delay).pipe(switchMap(() => this.http.post(`${this.queriesUrl}/getInvoiceLookup`, { requestId })), tap((res) => {
6479
+ if (res.status === statusLookup.ERROR) {
6480
+ throw new Error(res.message);
6481
+ }
6482
+ }))), scan((_, curr) => curr, null), filter((res) => (res === null || res === void 0 ? void 0 : res.status) === statusLookup.FINISHED), take(1), defaultIfEmpty(null), takeUntil(this.pooling));
6483
+ }
6196
6484
  };
6197
- StringifierPipeModule = __decorate([
6198
- NgModule({
6199
- declarations: [StringifierPipe],
6200
- imports: [CommonModule],
6201
- exports: [StringifierPipe],
6202
- })
6203
- ], StringifierPipeModule);
6485
+ AgroInvoiceService.ctorParameters = () => [
6486
+ { type: HttpClient },
6487
+ { type: MessageService },
6488
+ { type: LibTranslationService }
6489
+ ];
6490
+ AgroInvoiceService = __decorate([
6491
+ Injectable()
6492
+ ], AgroInvoiceService);
6204
6493
 
6205
- let TelephonePipe = class TelephonePipe {
6206
- /**
6207
- * Transforma um número de telefone aplicando máscara automaticamente.
6208
- * @param value Valor do telefone.
6209
- * @param withDDI Define se deve forçar formatação com DDI (mesmo que não exista).
6210
- */
6211
- transform(value, withDDI = false) {
6212
- if (!value)
6213
- return "";
6214
- const digits = this.cleanDigits(value);
6215
- if (!digits)
6216
- return value.toString();
6217
- const { ddi, ddd, number } = this.extractParts(digits, withDDI);
6218
- return this.formatPhone(ddi, ddd, number, value.toString(), withDDI);
6494
+ const INVOICE_ITEMS = "invoiceItems.*";
6495
+ let ModalInvoicePjSelectorComponent = class ModalInvoicePjSelectorComponent {
6496
+ constructor(translate, invoiceService) {
6497
+ this.translate = translate;
6498
+ this.invoiceService = invoiceService;
6499
+ this.whenSelectInvoices = new EventEmitter();
6500
+ this.buttonPriority = ButtonPriority;
6501
+ this.gridColumns = [
6502
+ { field: "number", header: this.translate.instant("agro.angular_components.number") },
6503
+ { field: "series", header: this.translate.instant("agro.angular_components.series") },
6504
+ { field: "invoiceItems", header: this.translate.instant("agro.angular_components.itens") },
6505
+ { field: "quantity", header: this.translate.instant("agro.angular_components.quantity") },
6506
+ { field: "issuanceDate", header: this.translate.instant("agro.angular_components.issuance_date") },
6507
+ ];
6508
+ this.dontHaveAnyInvoice = false;
6509
+ this.gridLoading = true;
6510
+ this.gridTotalRecords = AGRO_NUMBERS.ZERO;
6511
+ this.selected = [];
6512
+ this.unselectedIds = new Set();
6513
+ this.visible = false;
6514
+ this.searchValue = new FormControl("", []);
6515
+ this.ngUnsubscribe = new Subject();
6516
+ this.currentParams = {
6517
+ page: 0,
6518
+ size: 10,
6519
+ sort: [{ field: "issuanceDate", order: 1 }],
6520
+ displayFields: ["*", INVOICE_ITEMS, "issuanceDate"],
6521
+ filterQuery: "",
6522
+ };
6219
6523
  }
6220
- /** Remove todos os caracteres não numéricos */
6221
- cleanDigits(value) {
6222
- return value.toString().replace(/\D+/g, "");
6524
+ ngOnDestroy() {
6525
+ this.ngUnsubscribe.next();
6526
+ this.ngUnsubscribe.complete();
6223
6527
  }
6224
- /** Extrai DDI, DDD e número, considerando se deve aplicar DDI forçado */
6225
- extractParts(digits, withDDI) {
6226
- const len = digits.length;
6227
- if (withDDI) {
6228
- return this.extractWithDDI(digits);
6528
+ ngOnInit() {
6529
+ this.whenSearchValueChanges();
6530
+ }
6531
+ whenSearchValueChanges() {
6532
+ this.searchValue.valueChanges
6533
+ .pipe(takeUntil(this.ngUnsubscribe))
6534
+ .pipe(debounceTime(AGRO_NUMBERS.THREE_HUNDRED))
6535
+ .subscribe((value) => {
6536
+ if (value) {
6537
+ this.updateGridData({ first: 0, rows: 10, multiSortMeta: [{ field: "issuanceDate", order: 1 }] }, value);
6538
+ }
6539
+ else {
6540
+ this.updateGridData({ first: 0, rows: 10, multiSortMeta: [{ field: "issuanceDate", order: 1 }] });
6541
+ }
6542
+ });
6543
+ }
6544
+ tryToSearchAgain() {
6545
+ this.gridLoading = true;
6546
+ this.updateGridData({ first: 0, rows: 10, multiSortMeta: [{ field: "issuanceDate", order: 1 }] });
6547
+ }
6548
+ open() {
6549
+ if (this.checkIfOptionsIsValid()) {
6550
+ this.visible = true;
6551
+ this.gridData = [];
6552
+ this.gridLoading = true;
6553
+ this.gridTotalRecords = 0;
6554
+ this.selected = [];
6555
+ this.unselectedIds.clear();
6556
+ this.currentParams = {
6557
+ page: 0,
6558
+ size: 10,
6559
+ sort: [],
6560
+ filterQuery: "",
6561
+ displayFields: ["*", INVOICE_ITEMS],
6562
+ };
6563
+ this.updateGridData({ first: 0, rows: 10, multiSortMeta: [{ field: "issuanceDate", order: 1 }] });
6564
+ this.selected = [];
6229
6565
  }
6230
- if (len <= AGRO_NUMBERS.NINE) {
6231
- return { ddi: "", ddd: "", number: digits };
6566
+ }
6567
+ checkIfOptionsIsValid() {
6568
+ if (!this.options) {
6569
+ return false;
6232
6570
  }
6233
- if (len <= AGRO_NUMBERS.ELEVEN) {
6234
- return this.extractWithDDD(digits);
6571
+ if (!this.options.companyId || !this.options.branchId) {
6572
+ return false;
6235
6573
  }
6236
- return this.extractWithDDI(digits);
6574
+ return true;
6237
6575
  }
6238
- /** Extrai DDD e número (sem DDI) */
6239
- extractWithDDD(digits) {
6240
- const ddd = digits.slice(0, 2);
6241
- const number = digits.slice(2);
6242
- return { ddi: "", ddd, number };
6576
+ updateGridData(event, searchValue) {
6577
+ var _a;
6578
+ this.cancelPooling();
6579
+ const companyId = this.options.companyId;
6580
+ const branchId = this.options.branchId;
6581
+ const producerId = this.options.producersIds[0];
6582
+ const ruralEstateId = this.options.ruralEstateIds[0];
6583
+ const size = event.rows;
6584
+ const page = event.first / size;
6585
+ const sizePage = event.rows;
6586
+ this.currentParams = {
6587
+ page,
6588
+ size,
6589
+ sort: ((_a = event.multiSortMeta) === null || _a === void 0 ? void 0 : _a.length) ? event.multiSortMeta : [{ field: "issuanceDate", order: 1 }],
6590
+ displayFields: ["*", INVOICE_ITEMS, "issuanceDate"],
6591
+ };
6592
+ this.gridLoading = true;
6593
+ this.dontHaveAnyInvoice = false;
6594
+ const filterBody = {
6595
+ filter: {
6596
+ companyId,
6597
+ branchId,
6598
+ producerIds: [producerId],
6599
+ ruralEstateIds: [ruralEstateId],
6600
+ multiProducts: false,
6601
+ productId: this.options.productId,
6602
+ },
6603
+ pageRequest: {
6604
+ offset: page,
6605
+ size: sizePage,
6606
+ orderBy: this.currentParams.sort.map((sort) => ({ field: sort.field, order: sort.order === 1 ? "asc" : "desc" })),
6607
+ },
6608
+ };
6609
+ this.invoiceService
6610
+ .invoiceLookupFilter(filterBody)
6611
+ .pipe(takeUntil(this.ngUnsubscribe), finalize(() => {
6612
+ this.gridLoading = false;
6613
+ }))
6614
+ .subscribe((result) => {
6615
+ var _a;
6616
+ this.gridData = ((_a = result === null || result === void 0 ? void 0 : result.result) === null || _a === void 0 ? void 0 : _a.invoices) || [];
6617
+ if (this.gridData.length === 0 && !searchValue) {
6618
+ this.dontHaveAnyInvoice = true;
6619
+ }
6620
+ this.gridTotalRecords = result.result.totalElements;
6621
+ }, (error) => {
6622
+ console.info("Erro ao buscar notas fiscais: ", error);
6623
+ }, () => {
6624
+ this.gridLoading = false;
6625
+ });
6243
6626
  }
6244
- /** Extrai DDI, DDD e número */
6245
- extractWithDDI(digits) {
6246
- const len = digits.length;
6247
- let ddiLen = 1;
6248
- if (len >= 14)
6249
- ddiLen = 3;
6250
- else if (len >= 12)
6251
- ddiLen = 2;
6252
- const ddi = digits.slice(0, ddiLen);
6253
- const ddd = digits.slice(ddiLen, ddiLen + 2);
6254
- const number = digits.slice(ddiLen + 2);
6255
- return { ddi, ddd, number };
6627
+ cancelPooling() {
6628
+ this.invoiceService.cancelActivePooling();
6256
6629
  }
6257
- /** Monta o número formatado */
6258
- formatPhone(ddi, ddd, number, fallback, withDDI) {
6259
- if (!number)
6260
- return fallback;
6261
- let formatted = "";
6262
- if (withDDI || ddi)
6263
- formatted += `+${ddi || "55"} `;
6264
- if (ddd)
6265
- formatted += `(${ddd}) `;
6266
- formatted += this.formatNumber(number);
6267
- return formatted;
6630
+ add() {
6631
+ return __awaiter(this, void 0, void 0, function* () {
6632
+ try {
6633
+ this.whenSelectInvoices.emit(this.selected);
6634
+ this.resetSpecs();
6635
+ }
6636
+ catch (error) {
6637
+ return null;
6638
+ }
6639
+ });
6268
6640
  }
6269
- /** Aplica máscara de 8 ou 9 dígitos */
6270
- formatNumber(number) {
6271
- const len = number.length;
6272
- if (len === 9)
6273
- return `${number.slice(0, 5)}-${number.slice(5)}`;
6274
- if (len === 8)
6275
- return `${number.slice(0, 4)}-${number.slice(4)}`;
6276
- return number;
6641
+ resetSpecs() {
6642
+ this.selected = [];
6643
+ this.dontHaveAnyInvoice = false;
6644
+ this.visible = false;
6645
+ this.gridData = [];
6646
+ this.gridLoading = false;
6647
+ this.gridTotalRecords = 0;
6648
+ }
6649
+ cancel() {
6650
+ return __awaiter(this, void 0, void 0, function* () {
6651
+ this.resetSpecs();
6652
+ });
6653
+ }
6654
+ getItemsQuantity(row) {
6655
+ var _a;
6656
+ return ((_a = row.invoiceItems) === null || _a === void 0 ? void 0 : _a.reduce((sum, item) => sum + (item.quantity || 0), 0)) || 0;
6277
6657
  }
6278
6658
  };
6279
- TelephonePipe = __decorate([
6280
- Pipe({ name: "telephone" })
6281
- ], TelephonePipe);
6659
+ ModalInvoicePjSelectorComponent.ctorParameters = () => [
6660
+ { type: LibTranslationService },
6661
+ { type: AgroInvoiceService }
6662
+ ];
6663
+ __decorate([
6664
+ Input()
6665
+ ], ModalInvoicePjSelectorComponent.prototype, "options", void 0);
6666
+ __decorate([
6667
+ Output()
6668
+ ], ModalInvoicePjSelectorComponent.prototype, "whenSelectInvoices", void 0);
6669
+ ModalInvoicePjSelectorComponent = __decorate([
6670
+ Component({
6671
+ selector: "s-modal-invoice-pj-selector",
6672
+ template: "<p-dialog\r\n header=\"{{ 'agro.angular_components.panel_title_external_invoice_add_external_invoice' | libTranslate }}\"\r\n [(visible)]=\"visible\"\r\n [modal]=\"true\"\r\n class=\"add-invoice-modal\"\r\n [closeOnEscape]=\"false\"\r\n (onHide)=\"cancelPooling()\"\r\n [dismissableMask]=\"false\"\r\n>\r\n <ng-container *ngIf=\"!dontHaveAnyInvoice\">\r\n <div class=\"ui-g\">\r\n <label for=\"invoiceSearchInput\">{{ \"agro.angular_components.number_or_series\" | libTranslate }}</label>\r\n <input\r\n type=\"text\"\r\n id=\"invoiceSearchInput\"\r\n pInputText\r\n [formControl]=\"searchValue\"\r\n [placeholder]=\"'' | libTranslate\"\r\n [required]=\"false\"\r\n />\r\n <div class=\"ui-g-12\">\r\n <p-table\r\n [(selection)]=\"selected\"\r\n [value]=\"gridData\"\r\n [columns]=\"gridColumns\"\r\n [scrollable]=\"true\"\r\n dataKey=\"id\"\r\n [rows]=\"10\"\r\n [paginator]=\"true\"\r\n [lazyLoadOnInit]=\"false\"\r\n [totalRecords]=\"gridTotalRecords\"\r\n [lazy]=\"true\"\r\n (onLazyLoad)=\"updateGridData($event)\"\r\n [resizableColumns]=\"true\"\r\n *sLoadingState=\"gridLoading\"\r\n sortMode=\"multiple\"\r\n [selectionMode]=\"'multiple'\"\r\n >\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n <th class=\"checkbox\" scope=\"col\">\r\n <p-tableHeaderCheckbox></p-tableHeaderCheckbox>\r\n </th>\r\n <ng-container *ngFor=\"let col of columns\">\r\n <th class=\"column\" scope=\"col\" *ngIf=\"['invoiceItems', 'quantity'].includes(col.field)\">\r\n {{ col.header }}\r\n </th>\r\n <th\r\n class=\"column\"\r\n [pSortableColumn]=\"col.field\"\r\n scope=\"col\"\r\n *ngIf=\"!['invoiceItems', 'quantity'].includes(col.field)\"\r\n >\r\n {{ col.header }}\r\n <p-sortIcon [field]=\"col.field\"></p-sortIcon>\r\n </th>\r\n </ng-container>\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"body\" let-rowData let-columns=\"columns\" let-rowIndex=\"rowIndex\">\r\n <tr>\r\n <td class=\"checkbox\" tabindex=\"0\">\r\n <p-tableCheckbox [value]=\"rowData\"></p-tableCheckbox>\r\n </td>\r\n <td\r\n [pSelectableRow]=\"rowData\"\r\n [pSelectableRowIndex]=\"rowIndex\"\r\n *ngFor=\"let col of columns\"\r\n class=\"column\"\r\n tabindex=\"0\"\r\n >\r\n <ng-container [ngSwitch]=\"col.field\">\r\n <ng-container *ngSwitchCase=\"'issuanceDate'\">\r\n {{ rowData[col.field] | localizedDate: \"L\" | async }}\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'invoiceItems'\">\r\n {{ rowData[col.field]?.length || 0 }}\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'quantity'\">\r\n {{ getItemsQuantity(rowData) | kilogram }}\r\n </ng-container>\r\n <ng-container *ngSwitchDefault> {{ rowData[col.field] }} </ng-container>\r\n </ng-container>\r\n </td>\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"paginatorright\">\r\n <span>{{ gridTotalRecords }} registros encontrados</span>\r\n </ng-template>\r\n </p-table>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"dontHaveAnyInvoice\">\r\n <s-empty-state\r\n iconClass=\"fa fa-exclamation-triangle\"\r\n title=\"{{ 'agro.angular_components.add_pj_invoice_modal_no_invoices_found' | libTranslate }}\"\r\n primaryActionLabel=\"{{ 'agro.angular_components.error_server_try_again' | libTranslate }}\"\r\n (primaryAction)=\"tryToSearchAgain()\"\r\n description=\"{{ 'agro.angular_components.no_register_found_for_external_invoices_summary' | libTranslate }}\"\r\n >\r\n </s-empty-state>\r\n </ng-container>\r\n\r\n <p-footer class=\"footer\" *ngIf=\"!dontHaveAnyInvoice\">\r\n <s-button\r\n [priority]=\"buttonPriority.Primary\"\r\n label=\"{{ 'agro.angular_components.panel_title_external_invoice_add_external_invoice' | libTranslate }}\"\r\n [disabled]=\"!selected?.length\"\r\n (click)=\"add()\"\r\n (keydown.enter)=\"add()\"\r\n ></s-button>\r\n <s-button\r\n [priority]=\"buttonPriority.Link\"\r\n label=\"{{ 'agro.angular_components.cancel' | libTranslate }}\"\r\n (click)=\"cancel()\"\r\n (keydown.enter)=\"cancel()\"\r\n ></s-button>\r\n </p-footer>\r\n</p-dialog>\r\n",
6673
+ styles: [".footer{width:100%;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center}.add-invoice-modal{width:480px;max-width:480px}.add-invoice-modal input[type=text]{width:100%}.add-invoice-modal .ui-dialog{width:480px!important}.add-invoice-modal .ui-dialog .ui-dialog-content{min-height:175px}td.checkbox,th.checkbox{width:50px}td.column,th.column{min-width:150px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}"]
6674
+ })
6675
+ ], ModalInvoicePjSelectorComponent);
6282
6676
 
6283
- let TelephonePipeModule = class TelephonePipeModule {
6677
+ let AgroInvoiceModule = class AgroInvoiceModule {
6284
6678
  };
6285
- TelephonePipeModule = __decorate([
6679
+ AgroInvoiceModule = __decorate([
6286
6680
  NgModule({
6287
- declarations: [TelephonePipe],
6288
- imports: [CommonModule],
6289
- exports: [TelephonePipe],
6681
+ imports: [
6682
+ HttpClientModule,
6683
+ PermissionsModule.forChild([
6684
+ {
6685
+ name: 'invoice',
6686
+ actions: ['Visualizar', 'Incluir', 'Editar', 'Excluir'],
6687
+ uri: `res://senior.com.br/agro/origination/entities/invoice`,
6688
+ },
6689
+ ]),
6690
+ ],
6691
+ providers: [
6692
+ AgroInvoiceService,
6693
+ ],
6694
+ declarations: [],
6695
+ exports: [],
6290
6696
  })
6291
- ], TelephonePipeModule);
6697
+ ], AgroInvoiceModule);
6698
+
6699
+ let ModalInvoicePjSelectorModule = class ModalInvoicePjSelectorModule {
6700
+ };
6701
+ ModalInvoicePjSelectorModule = __decorate([
6702
+ NgModule({
6703
+ declarations: [ModalInvoicePjSelectorComponent],
6704
+ providers: [DecimalPipe, DatePipe],
6705
+ imports: [
6706
+ CommonModule,
6707
+ ReactiveFormsModule,
6708
+ LocaleModule.forChild(),
6709
+ EmptyStateModule,
6710
+ BignumberInputModule,
6711
+ InputTextModule$1,
6712
+ ButtonModule,
6713
+ TableModule$1,
6714
+ SharedModule$2,
6715
+ TableModule,
6716
+ AgroInvoiceModule,
6717
+ DialogModule,
6718
+ KilogramModule,
6719
+ LoadingStateModule,
6720
+ ConfirmDialogModule$1,
6721
+ LibTranslationModule,
6722
+ KilogramModule,
6723
+ TableHeaderCheckboxModule,
6724
+ ],
6725
+ exports: [ModalInvoicePjSelectorComponent],
6726
+ })
6727
+ ], ModalInvoicePjSelectorModule);
6292
6728
 
6293
6729
  var AgroAngularComponentsModule_1;
6294
6730
  const HostProjectConfigsInjectionToken = new InjectionToken("hostProjectConfigs");
@@ -6313,5 +6749,5 @@ AgroAngularComponentsModule = AgroAngularComponentsModule_1 = __decorate([
6313
6749
  * Generated bundle index. Do not edit.
6314
6750
  */
6315
6751
 
6316
- export { AGRO_NUMBERS, AGRO_REGEX, AgroAngularComponentsModule, AgroArrayUtils, AgroCookieUtils, AgroDateUtils, AgroEntityStatus, AgroFormValidator, AgroLogics, AgroNameUtils, AgroNumberUtils, AgroObjectUtils, AgroPlatformUtils, AgroStringMasks, AgroStringUtils, AsyncLock, CancelEventDialogComponent, CancelEventDialogModule, CnpjCpfPipe, CnpjCpfPipeModule, Colors, DateComparisonType, E001TnsModule, E001pesModule, E070EmpModule, E070FilModule, E075DerModule, E205depService, EventControlBoardComponent, EventControlBoardModule, EventControlBoardService, EventControlItemModule, EventControlModule, EventStepsComponent, EventStepsModule, ExternalInvoiceModule, FixationModule, HostProjectConfigsInjectionToken, HttpCodes, InvoiceModule, LibTranslatePipe, LibTranslationModule, LibTranslationService, NumberComparisonType, OriginationModule, PaginatorStorageService, PrimitiveManager, ProducerInvoiceModule, RuralEstateModule, SharedModule, StringifierPipe, StringifierPipeModule, TelephonePipe, TelephonePipeModule, TicketModule, TransferModule, UserInformationService, WebsocketModule, WebsocketService, LibTranslatePipe as ɵa, LibTranslationService as ɵb };
6752
+ export { AGRO_NUMBERS, AGRO_REGEX, AgroAngularComponentsModule, AgroArrayUtils, AgroCookieUtils, AgroDateUtils, AgroEntityStatus, AgroFormValidator, AgroInvoiceModule, AgroInvoiceService, AgroLogics, AgroNameUtils, AgroNumberUtils, AgroObjectUtils, AgroPlatformUtils, AgroStringMasks, AgroStringUtils, AsyncLock, CancelEventDialogComponent, CancelEventDialogModule, CnpjCpfPipe, CnpjCpfPipeModule, Colors, DateComparisonType, E001TnsModule, E001pesModule, E070EmpModule, E070FilModule, E075DerModule, E205depService, EventControlBoardComponent, EventControlBoardModule, EventControlBoardService, EventControlItemModule, EventControlModule, EventStepsComponent, EventStepsModule, ExternalInvoiceModule, FixationModule, HostProjectConfigsInjectionToken, HttpCodes, InvoiceModule, KilogramModule, KilogramPipe, LibTranslatePipe, LibTranslationModule, LibTranslationService, ModalInvoicePjSelectorComponent, ModalInvoicePjSelectorModule, NumberComparisonType, OriginationModule, PaginatorStorageService, PrimitiveManager, ProducerInvoiceModule, RuralEstateModule, SharedModule, StringifierPipe, StringifierPipeModule, TelephonePipe, TelephonePipeModule, TicketModule, TransferModule, UserInformationService, WebsocketModule, WebsocketService, LibTranslatePipe as ɵa, LibTranslationService as ɵb };
6317
6753
  //# sourceMappingURL=senior-agronegocio-angular-components.js.map