@senior-agronegocio/angular-components 0.0.9852 → 0.0.9855

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 (79) hide show
  1. package/bundles/senior-agronegocio-angular-components.umd.js +917 -374
  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/components/event-control-board/event-control-board.component.d.ts +1 -1
  6. package/components/index.d.ts +1 -0
  7. package/components/modal-invoice-pj-selector/index.d.ts +4 -0
  8. package/components/modal-invoice-pj-selector/modal-invoice-pj-selector-options.interface.d.ts +10 -0
  9. package/components/modal-invoice-pj-selector/modal-invoice-pj-selector.component.d.ts +41 -0
  10. package/components/modal-invoice-pj-selector/modal-invoice-pj-selector.module.d.ts +2 -0
  11. package/components/modal-invoice-pj-selector/services/agro-invoice/agro-invoice.module.d.ts +2 -0
  12. package/components/modal-invoice-pj-selector/services/agro-invoice/agro-invoice.service.d.ts +16 -0
  13. package/components/modal-invoice-pj-selector/services/agro-invoice/index.d.ts +2 -0
  14. package/components/modal-invoice-pj-selector/services/agro-invoice/interfaces.d.ts +73 -0
  15. package/esm2015/common/agro-object-stringifier.class.js +2 -2
  16. package/esm2015/common/agro-regex.constant.js +2 -2
  17. package/esm2015/common/agro-string-utils.class.js +39 -51
  18. package/esm2015/components/event-control-board/event-control-board.component.js +12 -15
  19. package/esm2015/components/index.js +2 -1
  20. package/esm2015/components/modal-invoice-pj-selector/index.js +4 -0
  21. package/esm2015/components/modal-invoice-pj-selector/modal-invoice-pj-selector-options.interface.js +1 -0
  22. package/esm2015/components/modal-invoice-pj-selector/modal-invoice-pj-selector.component.js +193 -0
  23. package/esm2015/components/modal-invoice-pj-selector/modal-invoice-pj-selector.module.js +42 -0
  24. package/esm2015/components/modal-invoice-pj-selector/services/agro-invoice/agro-invoice.module.js +28 -0
  25. package/esm2015/components/modal-invoice-pj-selector/services/agro-invoice/agro-invoice.service.js +48 -0
  26. package/esm2015/components/modal-invoice-pj-selector/services/agro-invoice/index.js +3 -0
  27. package/esm2015/components/modal-invoice-pj-selector/services/agro-invoice/interfaces.js +13 -0
  28. package/esm2015/lib-translation.module.js +3 -1
  29. package/esm2015/pipe/index.js +5 -4
  30. package/esm2015/pipe/kilogram/index.js +3 -0
  31. package/esm2015/pipe/kilogram/kilogram.module.js +17 -0
  32. package/esm2015/pipe/kilogram/kilogram.pipe.js +38 -0
  33. package/esm2015/pipe/telephone/telephone.pipe.js +27 -18
  34. package/esm2015/public-api.js +2 -2
  35. package/esm2015/services/entity-service.js +124 -0
  36. package/esm2015/services/i18n/en-US.js +19 -2
  37. package/esm2015/services/i18n/es-CO.js +18 -1
  38. package/esm2015/services/i18n/pt-BR.js +20 -2
  39. package/esm2015/services/lib-translation.service.js +2 -2
  40. package/esm5/common/agro-object-stringifier.class.js +2 -2
  41. package/esm5/common/agro-regex.constant.js +2 -2
  42. package/esm5/common/agro-string-utils.class.js +46 -58
  43. package/esm5/components/event-control-board/event-control-board.component.js +12 -15
  44. package/esm5/components/index.js +2 -1
  45. package/esm5/components/modal-invoice-pj-selector/index.js +4 -0
  46. package/esm5/components/modal-invoice-pj-selector/modal-invoice-pj-selector-options.interface.js +1 -0
  47. package/esm5/components/modal-invoice-pj-selector/modal-invoice-pj-selector.component.js +202 -0
  48. package/esm5/components/modal-invoice-pj-selector/modal-invoice-pj-selector.module.js +45 -0
  49. package/esm5/components/modal-invoice-pj-selector/services/agro-invoice/agro-invoice.module.js +31 -0
  50. package/esm5/components/modal-invoice-pj-selector/services/agro-invoice/agro-invoice.service.js +55 -0
  51. package/esm5/components/modal-invoice-pj-selector/services/agro-invoice/index.js +3 -0
  52. package/esm5/components/modal-invoice-pj-selector/services/agro-invoice/interfaces.js +13 -0
  53. package/esm5/lib-translation.module.js +3 -1
  54. package/esm5/pipe/index.js +5 -4
  55. package/esm5/pipe/kilogram/index.js +3 -0
  56. package/esm5/pipe/kilogram/kilogram.module.js +20 -0
  57. package/esm5/pipe/kilogram/kilogram.pipe.js +41 -0
  58. package/esm5/pipe/telephone/telephone.pipe.js +27 -18
  59. package/esm5/public-api.js +2 -2
  60. package/esm5/services/entity-service.js +135 -0
  61. package/esm5/services/i18n/en-US.js +19 -2
  62. package/esm5/services/i18n/es-CO.js +18 -1
  63. package/esm5/services/i18n/pt-BR.js +20 -2
  64. package/esm5/services/lib-translation.service.js +2 -2
  65. package/fesm2015/senior-agronegocio-angular-components.js +735 -235
  66. package/fesm2015/senior-agronegocio-angular-components.js.map +1 -1
  67. package/fesm5/senior-agronegocio-angular-components.js +920 -383
  68. package/fesm5/senior-agronegocio-angular-components.js.map +1 -1
  69. package/package.json +1 -1
  70. package/pipe/index.d.ts +4 -3
  71. package/pipe/kilogram/index.d.ts +2 -0
  72. package/pipe/kilogram/kilogram.module.d.ts +2 -0
  73. package/pipe/kilogram/kilogram.pipe.d.ts +8 -0
  74. package/public-api.d.ts +1 -1
  75. package/senior-agronegocio-angular-components.metadata.json +1 -1
  76. package/services/entity-service.d.ts +72 -0
  77. package/services/i18n/en-US.d.ts +17 -0
  78. package/services/i18n/es-CO.d.ts +17 -0
  79. package/services/i18n/pt-BR.d.ts +18 -0
@@ -1,17 +1,17 @@
1
1
  import { __assign, __values, __read, __awaiter, __generator, __spread, __decorate, __extends } from 'tslib';
2
2
  import moment from 'moment';
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 @@ var 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$/,
@@ -2320,8 +2320,9 @@ var AgroStringUtils = /** @class */ (function () {
2320
2320
  */
2321
2321
  AgroStringUtils.removeMask = function (value, mask) {
2322
2322
  var e_1, _a;
2323
- if (!value || !mask)
2323
+ if (!value || !mask) {
2324
2324
  return value;
2325
+ }
2325
2326
  var valueChars = value.toString().split("");
2326
2327
  var maskChars = mask.split("");
2327
2328
  var unmaskedValue = "";
@@ -2329,65 +2330,52 @@ var AgroStringUtils = /** @class */ (function () {
2329
2330
  var isDigit = function (c) { return /\d/.test(c); };
2330
2331
  var isAlpha = function (c) { return /[A-Za-z]/.test(c); };
2331
2332
  var isAlnum = function (c) { return /[A-Za-z0-9]/.test(c); };
2333
+ var extractNext = function (testFn) {
2334
+ var k = j;
2335
+ while (k < valueChars.length && !testFn(valueChars[k])) {
2336
+ k++;
2337
+ }
2338
+ if (k < valueChars.length) {
2339
+ var found = valueChars[k];
2340
+ j = k + 1;
2341
+ return found;
2342
+ }
2343
+ var fallback = valueChars[j];
2344
+ j++;
2345
+ return fallback;
2346
+ };
2347
+ var processMaskChar = function (maskChar) {
2348
+ var _a, _b;
2349
+ if (j >= valueChars.length) {
2350
+ return;
2351
+ }
2352
+ var current = valueChars[j];
2353
+ switch (maskChar) {
2354
+ case "9":
2355
+ unmaskedValue += (_a = extractNext(isDigit)) !== null && _a !== void 0 ? _a : "";
2356
+ break;
2357
+ case "A":
2358
+ unmaskedValue += (_b = extractNext(isAlpha)) !== null && _b !== void 0 ? _b : "";
2359
+ break;
2360
+ default:
2361
+ handleSeparator(maskChar, current);
2362
+ break;
2363
+ }
2364
+ };
2365
+ var handleSeparator = function (maskChar, current) {
2366
+ if (current === maskChar) {
2367
+ j++; // separador presente no valor
2368
+ }
2369
+ if (isAlnum(current)) {
2370
+ unmaskedValue += current;
2371
+ j++;
2372
+ }
2373
+ // se for pontuação diferente, apenas ignora (não consome j)
2374
+ };
2332
2375
  try {
2333
2376
  for (var maskChars_1 = __values(maskChars), maskChars_1_1 = maskChars_1.next(); !maskChars_1_1.done; maskChars_1_1 = maskChars_1.next()) {
2334
2377
  var maskChar = maskChars_1_1.value;
2335
- if (j >= valueChars.length)
2336
- break;
2337
- var current = valueChars[j];
2338
- // Placeholder para dígito '9'
2339
- if (maskChar === "9") {
2340
- // procura próximo dígito a partir de j
2341
- var k = j;
2342
- while (k < valueChars.length && !isDigit(valueChars[k]))
2343
- k++;
2344
- if (k < valueChars.length) {
2345
- // encontrou dígito: consome
2346
- unmaskedValue += valueChars[k];
2347
- j = k + 1;
2348
- }
2349
- else {
2350
- // não há dígito futuro: captura o caractere atual como dado
2351
- unmaskedValue += valueChars[j];
2352
- j++;
2353
- }
2354
- continue;
2355
- }
2356
- // Placeholder para letra 'A'
2357
- if (maskChar === "A") {
2358
- // procura próxima letra a partir de j
2359
- var k = j;
2360
- while (k < valueChars.length && !isAlpha(valueChars[k]))
2361
- k++;
2362
- if (k < valueChars.length) {
2363
- unmaskedValue += valueChars[k];
2364
- j = k + 1;
2365
- }
2366
- else {
2367
- unmaskedValue += valueChars[j];
2368
- j++;
2369
- }
2370
- continue;
2371
- }
2372
- // maskChar é um separador literal opcional.
2373
- if (current === maskChar) {
2374
- // separador presente no valor: consome-o
2375
- j++;
2376
- continue;
2377
- }
2378
- // separador ausente:
2379
- // - se o caractere atual for alfanumérico, trata como dado e captura;
2380
- // - se não for alfanumérico (pontuação), ignora — não avança j, permite
2381
- // que o próximo placeholder pule/consuma ou procure pelo tipo esperado.
2382
- if (isAlnum(current)) {
2383
- unmaskedValue += current;
2384
- j++;
2385
- }
2386
- else {
2387
- // ignora caractere não-alfanumérico no lugar do separador (não consome)
2388
- // assim o próximo placeholder poderá procurar o caractere do tipo esperado
2389
- // sem perder a posição atual.
2390
- }
2378
+ processMaskChar(maskChar);
2391
2379
  }
2392
2380
  }
2393
2381
  catch (e_1_1) { e_1 = { error: e_1_1 }; }
@@ -3736,7 +3724,7 @@ var ptBR = {
3736
3724
  "agro.angular_components.save": "Salvar",
3737
3725
  "agro.angular_components.select": "Selecione",
3738
3726
  "agro.angular_components.updated_by": "Atualizado por",
3739
- "error_invalid": "Valor inválido",
3727
+ error_invalid: "Valor inválido",
3740
3728
  "agro.angular_components.choose_label": "Escolha",
3741
3729
  "agro.angular_components.remove_label": "Remover",
3742
3730
  "agro.angular_components.cancel_label": "Cancelar",
@@ -3823,6 +3811,7 @@ var ptBR = {
3823
3811
  "agro.angular_components.ORIGINATION_CREATE_EFFECTIVE_BALANCE": "Emissão de saldo efetivo",
3824
3812
  "agro.angular_components.PRODUCER_NET_VALUE_EFFECTIVE_BALANCE_CONFIRMATION": "Confirmação de saldo efetivo",
3825
3813
  "agro.angular_components.CLOSE_INVOICE_FIXATION": "Fechamento de NF",
3814
+ "agro.angular_components.INVOICE_CLOSE_INVOICE": "Solicitação de cancelamento da NF",
3826
3815
  "agro.angular_components.ORIGINATION_CREATE_EFFECTIVE_CONFIRMATION": "Confirmação efetiva",
3827
3816
  "agro.angular_components.ORIGINATION_CREATE_PROVISIONAL_BALANCE": "Saldo provisório",
3828
3817
  "agro.angular_components.CLOSE_INVOICE_TRANSFER": "Fechamento de NF",
@@ -3832,6 +3821,23 @@ var ptBR = {
3832
3821
  "agro.angular_components.TRANSFER_CREATE_SERVICE_INVOICE": "Emissão NF de serviço",
3833
3822
  "agro.angular_components.TRANSFER_CANCEL_SERVICE_INVOICE": "Cancelamento de NF de serviço",
3834
3823
  "agro.angular_components.REOPEN_INVOICE_FIXATION": "Reabertura da NF",
3824
+ "agro.angular_components.CIDASC_INTEGRATION": "Envio ao Cidasc",
3825
+ "agro.angular_components.CIDASC_CANCELLATION": "Cancelamento do Receituário",
3826
+ "agro.angular_components.CIDASC_DATA_LOAD_CULTURE": "Carga Cidasc - Cultura",
3827
+ "agro.angular_components.CIDASC_DATA_LOAD_PEST": "Carga Cidasc - Praga",
3828
+ "agro.angular_components.CIDASC_DATA_LOAD_PRODUCT": "Carga Cidasc - Produto",
3829
+ "agro.angular_components.CIDASC_DATA_LOAD_MEASURE_UNIT": "Carga Cidasc - Unidade de medida",
3830
+ "agro.angular_components.CIDASC_DATA_LOAD_COMPOSED_MEASURE_UNIT": "Carga Cidasc - Medida por hectare",
3831
+ "agro.angular_components.agronomic_prescription_origin_event": "Receituário Agronômico",
3832
+ "agro.angular_components.number_or_series": "Número ou série",
3833
+ "agro.angular_components.panel_title_external_invoice_add_external_invoice": "Adicionar nota fiscal",
3834
+ "agro.angular_components.add_pj_invoice_modal_no_invoices_found": "Nenhuma nota fiscal disponível para este produtor",
3835
+ "agro.angular_components.number": "Número",
3836
+ "agro.angular_components.series": "Série",
3837
+ "agro.angular_components.itens": "Itens",
3838
+ "agro.angular_components.quantity": "Quantidade",
3839
+ "agro.angular_components.issuance_date": "Data de emissão",
3840
+ "agro.angular_components.no_register_found_for_external_invoices_summary": "Nenhuma nota encontrada",
3835
3841
  };
3836
3842
 
3837
3843
  var enUS = {
@@ -3989,7 +3995,7 @@ var enUS = {
3989
3995
  "agro.angular_components.save": "Save",
3990
3996
  "agro.angular_components.select": "Select",
3991
3997
  "agro.angular_components.updated_by": "Updated by",
3992
- error_invalid: "Invalid value",
3998
+ "error_invalid": "Invalid value",
3993
3999
  "agro.angular_components.choose_label": "Choose",
3994
4000
  "agro.angular_components.remove_label": "Remove",
3995
4001
  "agro.angular_components.cancel_label": "Cancel",
@@ -4079,6 +4085,23 @@ var enUS = {
4079
4085
  "agro.angular_components.TRANSFER_CREATE_SERVICE_INVOICE": "Service invoice issuance",
4080
4086
  "agro.angular_components.TRANSFER_CANCEL_SERVICE_INVOICE": "Service invoice cancellation",
4081
4087
  "agro.angular_components.REOPEN_INVOICE_FIXATION": "Reopen invoice fixation",
4088
+ "agro.angular_components.INVOICE_CLOSE_INVOICE": "Invoice cancellation request",
4089
+ "agro.angular_components.CIDASC_INTEGRATION": "Send to Cidasc",
4090
+ "agro.angular_components.CIDASC_CANCELLATION": "Prescription Cancellation",
4091
+ "agro.angular_components.CIDASC_DATA_LOAD_CULTURE": "Cidasc Load - Culture",
4092
+ "agro.angular_components.CIDASC_DATA_LOAD_PEST": "Cidasc Load - Pest",
4093
+ "agro.angular_components.CIDASC_DATA_LOAD_PRODUCT": "Cidasc Load - Product",
4094
+ "agro.angular_components.CIDASC_DATA_LOAD_MEASURE_UNIT": "Cidasc Load - Unit of measure",
4095
+ "agro.angular_components.CIDASC_DATA_LOAD_COMPOSED_MEASURE_UNIT": "Cidasc Load - Measure per hectare",
4096
+ "agro.angular_components.agronomic_prescription_origin_event": "Agronomic Prescription",
4097
+ "agro.angular_components.number_or_series": "Número ou série",
4098
+ "agro.angular_components.panel_title_external_invoice_add_external_invoice": "Adicionar nota fiscal",
4099
+ "agro.angular_components.add_pj_invoice_modal_no_invoices_found": "Nenhuma nota fiscal disponível para este produtor",
4100
+ "agro.angular_components.number": "Número",
4101
+ "agro.angular_components.series": "Série",
4102
+ "agro.angular_components.itens": "Itens",
4103
+ "agro.angular_components.quantity": "Quantidade",
4104
+ "agro.angular_components.issuance_date": "Data de emissão",
4082
4105
  };
4083
4106
 
4084
4107
  var esCO = {
@@ -4326,6 +4349,23 @@ var esCO = {
4326
4349
  "agro.angular_components.TRANSFER_CREATE_SERVICE_INVOICE": "Emisión de NF de servicio",
4327
4350
  "agro.angular_components.TRANSFER_CANCEL_SERVICE_INVOICE": "Cancelación de NF de servicio",
4328
4351
  "agro.angular_components.REOPEN_INVOICE_FIXATION": "Reapertura de factura",
4352
+ "agro.angular_components.INVOICE_CLOSE_INVOICE": "Solicitud de cancelación de la factura",
4353
+ "agro.angular_components.CIDASC_INTEGRATION": "Envío a Cidasc",
4354
+ "agro.angular_components.CIDASC_CANCELLATION": "Cancelación de Receta",
4355
+ "agro.angular_components.CIDASC_DATA_LOAD_CULTURE": "Carga Cidasc - Cultivo",
4356
+ "agro.angular_components.CIDASC_DATA_LOAD_PEST": "Carga Cidasc - Plaga",
4357
+ "agro.angular_components.CIDASC_DATA_LOAD_PRODUCT": "Carga Cidasc - Producto",
4358
+ "agro.angular_components.CIDASC_DATA_LOAD_MEASURE_UNIT": "Carga Cidasc - Unidad de medida",
4359
+ "agro.angular_components.CIDASC_DATA_LOAD_COMPOSED_MEASURE_UNIT": "Carga Cidasc - Medida por hectárea",
4360
+ "agro.angular_components.agronomic_prescription_origin_event": "Recetario Agronómico",
4361
+ "agro.angular_components.number_or_series": "Número ou série",
4362
+ "agro.angular_components.panel_title_external_invoice_add_external_invoice": "Adicionar nota fiscal",
4363
+ "agro.angular_components.add_pj_invoice_modal_no_invoices_found": "Nenhuma nota fiscal disponível para este produtor",
4364
+ "agro.angular_components.number": "Número",
4365
+ "agro.angular_components.series": "Série",
4366
+ "agro.angular_components.itens": "Itens",
4367
+ "agro.angular_components.quantity": "Quantidade",
4368
+ "agro.angular_components.issuance_date": "Data de emissão",
4329
4369
  };
4330
4370
 
4331
4371
  var LibTranslationService = /** @class */ (function () {
@@ -4336,7 +4376,7 @@ var LibTranslationService = /** @class */ (function () {
4336
4376
  "es-CO": esCO,
4337
4377
  };
4338
4378
  this.currentTranslation = {};
4339
- this.setLang(this.getLangOfUser());
4379
+ this.setLang("pt-BR");
4340
4380
  }
4341
4381
  LibTranslationService.prototype.getLangOfUser = function () {
4342
4382
  return AgroPlatformUtils.getCurrentTenantLocale() || "pt-BR";
@@ -4379,128 +4419,410 @@ var LibTranslationService = /** @class */ (function () {
4379
4419
  return LibTranslationService;
4380
4420
  }());
4381
4421
 
4382
- var CancelEventDialogComponent = /** @class */ (function () {
4383
- function CancelEventDialogComponent(formBuilder, config, ref, translate) {
4384
- this.formBuilder = formBuilder;
4385
- this.config = config;
4386
- this.ref = ref;
4387
- this.translate = translate;
4388
- this.loading = false;
4389
- this.reasonMinLength = AGRO_NUMBERS.FIFTEEN;
4390
- this.ngUnsubscribe = new Subject();
4391
- this.cpSize = {
4392
- sm: 12,
4393
- md: AGRO_NUMBERS.TWELVE,
4394
- lg: AGRO_NUMBERS.TWELVE,
4395
- xl: AGRO_NUMBERS.TWELVE,
4396
- };
4397
- this.priority = ButtonPriority;
4422
+ var KilogramPipe = /** @class */ (function () {
4423
+ function KilogramPipe(decimalPipe) {
4424
+ this.decimalPipe = decimalPipe;
4398
4425
  }
4399
- CancelEventDialogComponent.prototype.ngOnInit = function () {
4400
- this.setFormGroup();
4401
- this.setFormFields();
4402
- this.setDataConfigDialog();
4403
- this.setTranslations();
4404
- };
4405
- CancelEventDialogComponent.prototype.ngOnDestroy = function () {
4406
- this.ngUnsubscribe.next();
4407
- this.ngUnsubscribe.complete();
4408
- };
4409
- CancelEventDialogComponent.prototype.setFormGroup = function () {
4410
- this.formGroup = this.formBuilder.group({
4411
- reason: [{ value: null, disabled: false }, Validators.compose([Validators.required, Validators.minLength(this.reasonMinLength)])],
4412
- });
4413
- };
4414
- CancelEventDialogComponent.prototype.setFormFields = function () {
4415
- this.formFields = [
4416
- new FormField({
4417
- name: "reason",
4418
- label: this.translate.instant("agro.angular_components.cancel_reason"),
4419
- type: FieldType.String,
4420
- multiple: false,
4421
- required: function () { return true; },
4422
- size: this.cpSize,
4423
- maxLength: AGRO_NUMBERS.ONE_HUNDRED,
4424
- }),
4425
- ];
4426
- };
4427
- CancelEventDialogComponent.prototype.setDataConfigDialog = function () {
4428
- var _a, _b, _c, _d;
4429
- this.cancelEventDialogConfig = (_b = (_a = this.config.data) === null || _a === void 0 ? void 0 : _a.cancelEventDialogConfig) !== null && _b !== void 0 ? _b : {};
4430
- this.reasonMinLength = (_d = (_c = this.cancelEventDialogConfig) === null || _c === void 0 ? void 0 : _c.reasonMinLength) !== null && _d !== void 0 ? _d : AGRO_NUMBERS.FIFTEEN;
4426
+ KilogramPipe.prototype.transform = function (value, format, kgCaseInsensitive) {
4427
+ if (format === void 0) { format = "1.3-3"; }
4428
+ if (kgCaseInsensitive === void 0) { kgCaseInsensitive = "UPPER"; }
4429
+ if (value == null || isNaN(value)) {
4430
+ return "";
4431
+ }
4432
+ var str = this.decimalPipe.transform(value, format);
4433
+ var kgStr = "kg";
4434
+ if (!str) {
4435
+ console.info("Formato do peso inválido para transformação");
4436
+ return "";
4437
+ }
4438
+ str = str.replace(/,/g, ".");
4439
+ return this.replaceLastDotWithComma(str) + " " + (kgCaseInsensitive === "UPPER" ? kgStr.toUpperCase() : kgStr.toLowerCase());
4431
4440
  };
4432
- CancelEventDialogComponent.prototype.setTranslations = function () {
4433
- this.translations = {
4434
- required: this.translate.instant("agro.angular_components.error_required"),
4435
- min: this.translate.instant("agro.angular_components.error_min_value"),
4436
- max: this.translate.instant("agro.angular_components.error_max_value"),
4437
- minlength: this.translate.instant("agro.angular_components.error_min_length", { valor: this.reasonMinLength }),
4438
- maxlength: this.translate.instant("agro.angular_components.error_max_length_transfer_code"),
4439
- pattern: this.translate.instant("agro.angular_components.error_invalid"),
4440
- FormDateError_data1: this.translate.instant("agro.angular_components.initial_invalid_date"),
4441
- FormDateError_data2: this.translate.instant("agro.angular_components.end_invalid_date"),
4442
- };
4441
+ KilogramPipe.prototype.replaceLastDotWithComma = function (value) {
4442
+ var lastDotIndex = value.lastIndexOf(".");
4443
+ if (lastDotIndex === -1) {
4444
+ return value;
4445
+ }
4446
+ return value.substring(0, lastDotIndex) + "," + value.substring(lastDotIndex + 1);
4443
4447
  };
4444
- CancelEventDialogComponent.prototype.handleConfirmClick = function () {
4445
- var _a, _b;
4446
- return __awaiter(this, void 0, void 0, function () {
4447
- var reason;
4448
- return __generator(this, function (_c) {
4449
- switch (_c.label) {
4450
- case 0:
4451
- if (this.formGroup.invalid && ((_a = this.cancelEventDialogConfig) === null || _a === void 0 ? void 0 : _a.withReason)) {
4452
- this.validateAllFormFields(this.formGroup);
4453
- return [2 /*return*/];
4454
- }
4455
- reason = (_b = this.formGroup.get("reason")) === null || _b === void 0 ? void 0 : _b.value;
4456
- this.loading = true;
4457
- return [4 /*yield*/, this.cancelEventDialogConfig.cancelFunction(reason)];
4458
- case 1:
4459
- _c.sent();
4460
- this.loading = false;
4461
- this.ref.close(true);
4462
- return [2 /*return*/];
4463
- }
4464
- });
4465
- });
4448
+ KilogramPipe.ctorParameters = function () { return [
4449
+ { type: DecimalPipe }
4450
+ ]; };
4451
+ KilogramPipe = __decorate([
4452
+ Pipe({
4453
+ name: "kilogram",
4454
+ })
4455
+ ], KilogramPipe);
4456
+ return KilogramPipe;
4457
+ }());
4458
+
4459
+ var KilogramModule = /** @class */ (function () {
4460
+ function KilogramModule() {
4461
+ }
4462
+ KilogramModule = __decorate([
4463
+ NgModule({
4464
+ declarations: [KilogramPipe],
4465
+ imports: [
4466
+ CommonModule
4467
+ ],
4468
+ exports: [KilogramPipe]
4469
+ })
4470
+ ], KilogramModule);
4471
+ return KilogramModule;
4472
+ }());
4473
+
4474
+ var CnpjCpfPipe = /** @class */ (function () {
4475
+ function CnpjCpfPipe() {
4476
+ }
4477
+ CnpjCpfPipe.prototype.transform = function (value) {
4478
+ var args = [];
4479
+ for (var _i = 1; _i < arguments.length; _i++) {
4480
+ args[_i - 1] = arguments[_i];
4481
+ }
4482
+ if (typeof value !== "string" && typeof value === "number") {
4483
+ value = value === null || value === void 0 ? void 0 : value.toString();
4484
+ }
4485
+ if (typeof value !== "string") {
4486
+ return value;
4487
+ }
4488
+ if (AgroStringUtils.validateCNPJ(value)) {
4489
+ return AgroStringUtils.applyMask(value, AgroStringMasks.CNPJ);
4490
+ }
4491
+ if (AgroStringUtils.validateCPF(value)) {
4492
+ return AgroStringUtils.applyMask(value, AgroStringMasks.CPF);
4493
+ }
4494
+ return value;
4466
4495
  };
4467
- CancelEventDialogComponent.prototype.validateAllFormFields = function (formGroup) {
4468
- var _this = this;
4469
- Object.keys(formGroup.controls).forEach(function (field) {
4470
- var control = formGroup.get(field);
4471
- if (control instanceof FormControl) {
4472
- control.markAsDirty({ onlySelf: true });
4473
- }
4474
- if (control instanceof FormGroup) {
4475
- _this.validateAllFormFields(control);
4496
+ CnpjCpfPipe = __decorate([
4497
+ Pipe({
4498
+ name: "cnpjCpf",
4499
+ })
4500
+ ], CnpjCpfPipe);
4501
+ return CnpjCpfPipe;
4502
+ }());
4503
+
4504
+ var CnpjCpfPipeModule = /** @class */ (function () {
4505
+ function CnpjCpfPipeModule() {
4506
+ }
4507
+ CnpjCpfPipeModule = __decorate([
4508
+ NgModule({
4509
+ declarations: [CnpjCpfPipe],
4510
+ imports: [CommonModule],
4511
+ exports: [CnpjCpfPipe],
4512
+ })
4513
+ ], CnpjCpfPipeModule);
4514
+ return CnpjCpfPipeModule;
4515
+ }());
4516
+
4517
+ var AgroObjectStringifier = /** @class */ (function () {
4518
+ function AgroObjectStringifier() {
4519
+ }
4520
+ /**
4521
+ * Formata um objeto concatenando valores segundo as chaves e pipes informados.
4522
+ *
4523
+ * @param separator Separador entre os valores (ex: "-")
4524
+ * @param fields Campos a extrair. Podem conter subpropriedades ("propriedade.subPropriedade") e pipes ("propriedade|nomeDaPipe:arg1:arg2")
4525
+ * @param obj Objeto origem
4526
+ */
4527
+ AgroObjectStringifier.formatObject = function (separator, fields, obj, usePipes) {
4528
+ function mapField(field) {
4529
+ var value = AgroObjectStringifier.resolvePath(obj, field);
4530
+ if (usePipes === null || usePipes === void 0 ? void 0 : usePipes.hasOwnProperty(field)) {
4531
+ return usePipes[field].transform(value);
4476
4532
  }
4477
- });
4533
+ return value !== null && value !== void 0 ? value : "";
4534
+ }
4535
+ function filterValid(v) {
4536
+ return typeof v === "number" || AgroStringUtils.isValid(v);
4537
+ }
4538
+ return fields.map(mapField).filter(filterValid).join(" " + separator + " ");
4478
4539
  };
4479
- CancelEventDialogComponent.prototype.handleCancelClick = function () {
4480
- this.ref.close();
4540
+ /** Resolve um caminho tipo "empresa.cargo" dentro de um objeto */
4541
+ AgroObjectStringifier.resolvePath = function (obj, path) {
4542
+ function reducer(acc, key) {
4543
+ return acc === null || acc === void 0 ? void 0 : acc[key];
4544
+ }
4545
+ return path.split(".").reduce(reducer, obj);
4481
4546
  };
4482
- CancelEventDialogComponent.ctorParameters = function () { return [
4483
- { type: FormBuilder },
4484
- { type: DynamicDialogConfig },
4485
- { type: DynamicDialogRef },
4486
- { type: LibTranslationService }
4487
- ]; };
4488
- __decorate([
4489
- Input()
4490
- ], CancelEventDialogComponent.prototype, "cancelEventDialogConfig", void 0);
4491
- CancelEventDialogComponent = __decorate([
4492
- Component({
4493
- selector: "s-cancel-event-dialog",
4494
- template: "<div class=\"content\" *sLoadingState=\"loading\">\r\n <div class=\"top\">\r\n <div *ngIf=\"cancelEventDialogConfig?.message\" class=\"message-container\">\r\n <span>{{ cancelEventDialogConfig?.message }}</span>\r\n </div>\r\n <div class=\"form-container\" *ngIf=\"cancelEventDialogConfig?.withReason\">\r\n <s-dynamic-form [fields]=\"formFields\" [form]=\"formGroup\" [errorMessages]=\"translations\">\r\n </s-dynamic-form>\r\n </div>\r\n </div>\r\n <div class=\"footer\">\r\n <s-button [priority]=\"priority.Secondary\" label=\"{{ 'agro.angular_components.no' | libTranslate }}\"\r\n (click)=\"handleCancelClick()\"></s-button>\r\n <s-button [priority]=\"priority.Primary\" label=\"{{ 'agro.angular_components.yes' | libTranslate }}\" (click)=\"handleConfirmClick()\"></s-button>\r\n </div>\r\n</div>\r\n",
4495
- styles: [".message-container{padding:.5rem}.footer{display:-ms-flexbox;display:flex;width:100%;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end;padding:.5rem}.content{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;height:100%;box-sizing:border-box}.content.loading{min-height:150px;display:-ms-flexbox;display:flex;width:100%}.content .top{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:justify;justify-content:space-between}@media screen and (max-width:760px){.content{-ms-flex-pack:justify;justify-content:space-between}.content .top{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:justify;justify-content:space-between}}"]
4547
+ return AgroObjectStringifier;
4548
+ }());
4549
+
4550
+ var StringifierPipe = /** @class */ (function () {
4551
+ function StringifierPipe() {
4552
+ }
4553
+ StringifierPipe.prototype.transform = function (value, separator, paths, pipes) {
4554
+ return AgroObjectStringifier.formatObject(separator, paths, value, pipes);
4555
+ };
4556
+ StringifierPipe = __decorate([
4557
+ Pipe({ name: "stringifier" })
4558
+ ], StringifierPipe);
4559
+ return StringifierPipe;
4560
+ }());
4561
+
4562
+ var StringifierPipeModule = /** @class */ (function () {
4563
+ function StringifierPipeModule() {
4564
+ }
4565
+ StringifierPipeModule = __decorate([
4566
+ NgModule({
4567
+ declarations: [StringifierPipe],
4568
+ imports: [CommonModule],
4569
+ exports: [StringifierPipe],
4496
4570
  })
4497
- ], CancelEventDialogComponent);
4498
- return CancelEventDialogComponent;
4571
+ ], StringifierPipeModule);
4572
+ return StringifierPipeModule;
4499
4573
  }());
4500
4574
 
4501
- var EventOperation;
4502
- (function (EventOperation) {
4503
- EventOperation["PROVISIONAL"] = "PROVISIONAL";
4575
+ var TelephonePipe = /** @class */ (function () {
4576
+ function TelephonePipe() {
4577
+ }
4578
+ /**
4579
+ * Transforma um número de telefone aplicando máscara automaticamente.
4580
+ * @param value Valor do telefone.
4581
+ * @param withDDI Define se deve forçar formatação com DDI (mesmo que não exista).
4582
+ */
4583
+ TelephonePipe.prototype.transform = function (value, withDDI) {
4584
+ if (withDDI === void 0) { withDDI = false; }
4585
+ if (!value) {
4586
+ return "";
4587
+ }
4588
+ var digits = this.cleanDigits(value);
4589
+ if (!digits) {
4590
+ return value.toString();
4591
+ }
4592
+ var _a = this.extractParts(digits, withDDI), ddi = _a.ddi, ddd = _a.ddd, number = _a.number;
4593
+ return this.formatPhone(ddi, ddd, number, value.toString(), withDDI);
4594
+ };
4595
+ /** Remove todos os caracteres não numéricos */
4596
+ TelephonePipe.prototype.cleanDigits = function (value) {
4597
+ return value.toString().replace(/\D+/g, "");
4598
+ };
4599
+ /** Extrai DDI, DDD e número, considerando se deve aplicar DDI forçado */
4600
+ TelephonePipe.prototype.extractParts = function (digits, withDDI) {
4601
+ var len = digits.length;
4602
+ if (withDDI) {
4603
+ return this.extractWithDDI(digits);
4604
+ }
4605
+ if (len <= AGRO_NUMBERS.NINE) {
4606
+ return { ddi: "", ddd: "", number: digits };
4607
+ }
4608
+ if (len <= AGRO_NUMBERS.ELEVEN) {
4609
+ return this.extractWithDDD(digits);
4610
+ }
4611
+ return this.extractWithDDI(digits);
4612
+ };
4613
+ /** Extrai DDD e número (sem DDI) */
4614
+ TelephonePipe.prototype.extractWithDDD = function (digits) {
4615
+ var ddd = digits.slice(0, 2);
4616
+ var number = digits.slice(2);
4617
+ return { ddi: "", ddd: ddd, number: number };
4618
+ };
4619
+ /** Extrai DDI, DDD e número */
4620
+ TelephonePipe.prototype.extractWithDDI = function (digits) {
4621
+ var len = digits.length;
4622
+ var ddiLen = AGRO_NUMBERS.ONE;
4623
+ if (len >= AGRO_NUMBERS.FOURTEEN) {
4624
+ ddiLen = AGRO_NUMBERS.THREE;
4625
+ }
4626
+ if (len >= AGRO_NUMBERS.TWELVE) {
4627
+ ddiLen = AGRO_NUMBERS.TWO;
4628
+ }
4629
+ var ddi = digits.slice(AGRO_NUMBERS.ZERO, ddiLen);
4630
+ var ddd = digits.slice(ddiLen, ddiLen + AGRO_NUMBERS.TWO);
4631
+ var number = digits.slice(ddiLen + AGRO_NUMBERS.TWO);
4632
+ return { ddi: ddi, ddd: ddd, number: number };
4633
+ };
4634
+ /** Monta o número formatado */
4635
+ TelephonePipe.prototype.formatPhone = function (ddi, ddd, number, fallback, withDDI) {
4636
+ if (!number) {
4637
+ return fallback;
4638
+ }
4639
+ var formatted = "";
4640
+ if (withDDI || ddi) {
4641
+ formatted += "+" + (ddi || "55") + " ";
4642
+ }
4643
+ if (ddd) {
4644
+ formatted += "(" + ddd + ") ";
4645
+ }
4646
+ formatted += this.formatNumber(number);
4647
+ return formatted;
4648
+ };
4649
+ /** Aplica máscara de 8 ou 9 dígitos */
4650
+ TelephonePipe.prototype.formatNumber = function (number) {
4651
+ var len = number.length;
4652
+ if (len === AGRO_NUMBERS.NINE) {
4653
+ return number.slice(AGRO_NUMBERS.ZERO, AGRO_NUMBERS.FIVE) + "-" + number.slice(AGRO_NUMBERS.FIVE);
4654
+ }
4655
+ if (len === AGRO_NUMBERS.EIGHT) {
4656
+ return number.slice(AGRO_NUMBERS.ZERO, AGRO_NUMBERS.FOUR) + "-" + number.slice(AGRO_NUMBERS.FOUR);
4657
+ }
4658
+ return number;
4659
+ };
4660
+ TelephonePipe = __decorate([
4661
+ Pipe({ name: "telephone" })
4662
+ ], TelephonePipe);
4663
+ return TelephonePipe;
4664
+ }());
4665
+
4666
+ var TelephonePipeModule = /** @class */ (function () {
4667
+ function TelephonePipeModule() {
4668
+ }
4669
+ TelephonePipeModule = __decorate([
4670
+ NgModule({
4671
+ declarations: [TelephonePipe],
4672
+ imports: [CommonModule],
4673
+ exports: [TelephonePipe],
4674
+ })
4675
+ ], TelephonePipeModule);
4676
+ return TelephonePipeModule;
4677
+ }());
4678
+
4679
+ var LibTranslatePipe = /** @class */ (function () {
4680
+ function LibTranslatePipe(translateService) {
4681
+ this.translateService = translateService;
4682
+ }
4683
+ LibTranslatePipe.prototype.transform = function (value) {
4684
+ var args = [];
4685
+ for (var _i = 1; _i < arguments.length; _i++) {
4686
+ args[_i - 1] = arguments[_i];
4687
+ }
4688
+ if (args.length > 0) {
4689
+ return this.translateService.instant(value, args[0]);
4690
+ }
4691
+ return this.translateService.instant(value);
4692
+ };
4693
+ LibTranslatePipe.ctorParameters = function () { return [
4694
+ { type: LibTranslationService }
4695
+ ]; };
4696
+ LibTranslatePipe = __decorate([
4697
+ Pipe({
4698
+ name: 'libTranslate'
4699
+ })
4700
+ ], LibTranslatePipe);
4701
+ return LibTranslatePipe;
4702
+ }());
4703
+
4704
+ var CancelEventDialogComponent = /** @class */ (function () {
4705
+ function CancelEventDialogComponent(formBuilder, config, ref, translate) {
4706
+ this.formBuilder = formBuilder;
4707
+ this.config = config;
4708
+ this.ref = ref;
4709
+ this.translate = translate;
4710
+ this.loading = false;
4711
+ this.reasonMinLength = AGRO_NUMBERS.FIFTEEN;
4712
+ this.ngUnsubscribe = new Subject();
4713
+ this.cpSize = {
4714
+ sm: 12,
4715
+ md: AGRO_NUMBERS.TWELVE,
4716
+ lg: AGRO_NUMBERS.TWELVE,
4717
+ xl: AGRO_NUMBERS.TWELVE,
4718
+ };
4719
+ this.priority = ButtonPriority;
4720
+ }
4721
+ CancelEventDialogComponent.prototype.ngOnInit = function () {
4722
+ this.setFormGroup();
4723
+ this.setFormFields();
4724
+ this.setDataConfigDialog();
4725
+ this.setTranslations();
4726
+ };
4727
+ CancelEventDialogComponent.prototype.ngOnDestroy = function () {
4728
+ this.ngUnsubscribe.next();
4729
+ this.ngUnsubscribe.complete();
4730
+ };
4731
+ CancelEventDialogComponent.prototype.setFormGroup = function () {
4732
+ this.formGroup = this.formBuilder.group({
4733
+ reason: [{ value: null, disabled: false }, Validators.compose([Validators.required, Validators.minLength(this.reasonMinLength)])],
4734
+ });
4735
+ };
4736
+ CancelEventDialogComponent.prototype.setFormFields = function () {
4737
+ this.formFields = [
4738
+ new FormField({
4739
+ name: "reason",
4740
+ label: this.translate.instant("agro.angular_components.cancel_reason"),
4741
+ type: FieldType.String,
4742
+ multiple: false,
4743
+ required: function () { return true; },
4744
+ size: this.cpSize,
4745
+ maxLength: AGRO_NUMBERS.ONE_HUNDRED,
4746
+ }),
4747
+ ];
4748
+ };
4749
+ CancelEventDialogComponent.prototype.setDataConfigDialog = function () {
4750
+ var _a, _b, _c, _d;
4751
+ this.cancelEventDialogConfig = (_b = (_a = this.config.data) === null || _a === void 0 ? void 0 : _a.cancelEventDialogConfig) !== null && _b !== void 0 ? _b : {};
4752
+ this.reasonMinLength = (_d = (_c = this.cancelEventDialogConfig) === null || _c === void 0 ? void 0 : _c.reasonMinLength) !== null && _d !== void 0 ? _d : AGRO_NUMBERS.FIFTEEN;
4753
+ };
4754
+ CancelEventDialogComponent.prototype.setTranslations = function () {
4755
+ this.translations = {
4756
+ required: this.translate.instant("agro.angular_components.error_required"),
4757
+ min: this.translate.instant("agro.angular_components.error_min_value"),
4758
+ max: this.translate.instant("agro.angular_components.error_max_value"),
4759
+ minlength: this.translate.instant("agro.angular_components.error_min_length", { valor: this.reasonMinLength }),
4760
+ maxlength: this.translate.instant("agro.angular_components.error_max_length_transfer_code"),
4761
+ pattern: this.translate.instant("agro.angular_components.error_invalid"),
4762
+ FormDateError_data1: this.translate.instant("agro.angular_components.initial_invalid_date"),
4763
+ FormDateError_data2: this.translate.instant("agro.angular_components.end_invalid_date"),
4764
+ };
4765
+ };
4766
+ CancelEventDialogComponent.prototype.handleConfirmClick = function () {
4767
+ var _a, _b;
4768
+ return __awaiter(this, void 0, void 0, function () {
4769
+ var reason;
4770
+ return __generator(this, function (_c) {
4771
+ switch (_c.label) {
4772
+ case 0:
4773
+ if (this.formGroup.invalid && ((_a = this.cancelEventDialogConfig) === null || _a === void 0 ? void 0 : _a.withReason)) {
4774
+ this.validateAllFormFields(this.formGroup);
4775
+ return [2 /*return*/];
4776
+ }
4777
+ reason = (_b = this.formGroup.get("reason")) === null || _b === void 0 ? void 0 : _b.value;
4778
+ this.loading = true;
4779
+ return [4 /*yield*/, this.cancelEventDialogConfig.cancelFunction(reason)];
4780
+ case 1:
4781
+ _c.sent();
4782
+ this.loading = false;
4783
+ this.ref.close(true);
4784
+ return [2 /*return*/];
4785
+ }
4786
+ });
4787
+ });
4788
+ };
4789
+ CancelEventDialogComponent.prototype.validateAllFormFields = function (formGroup) {
4790
+ var _this = this;
4791
+ Object.keys(formGroup.controls).forEach(function (field) {
4792
+ var control = formGroup.get(field);
4793
+ if (control instanceof FormControl) {
4794
+ control.markAsDirty({ onlySelf: true });
4795
+ }
4796
+ if (control instanceof FormGroup) {
4797
+ _this.validateAllFormFields(control);
4798
+ }
4799
+ });
4800
+ };
4801
+ CancelEventDialogComponent.prototype.handleCancelClick = function () {
4802
+ this.ref.close();
4803
+ };
4804
+ CancelEventDialogComponent.ctorParameters = function () { return [
4805
+ { type: FormBuilder },
4806
+ { type: DynamicDialogConfig },
4807
+ { type: DynamicDialogRef },
4808
+ { type: LibTranslationService }
4809
+ ]; };
4810
+ __decorate([
4811
+ Input()
4812
+ ], CancelEventDialogComponent.prototype, "cancelEventDialogConfig", void 0);
4813
+ CancelEventDialogComponent = __decorate([
4814
+ Component({
4815
+ selector: "s-cancel-event-dialog",
4816
+ template: "<div class=\"content\" *sLoadingState=\"loading\">\r\n <div class=\"top\">\r\n <div *ngIf=\"cancelEventDialogConfig?.message\" class=\"message-container\">\r\n <span>{{ cancelEventDialogConfig?.message }}</span>\r\n </div>\r\n <div class=\"form-container\" *ngIf=\"cancelEventDialogConfig?.withReason\">\r\n <s-dynamic-form [fields]=\"formFields\" [form]=\"formGroup\" [errorMessages]=\"translations\">\r\n </s-dynamic-form>\r\n </div>\r\n </div>\r\n <div class=\"footer\">\r\n <s-button [priority]=\"priority.Secondary\" label=\"{{ 'agro.angular_components.no' | libTranslate }}\"\r\n (click)=\"handleCancelClick()\"></s-button>\r\n <s-button [priority]=\"priority.Primary\" label=\"{{ 'agro.angular_components.yes' | libTranslate }}\" (click)=\"handleConfirmClick()\"></s-button>\r\n </div>\r\n</div>\r\n",
4817
+ styles: [".message-container{padding:.5rem}.footer{display:-ms-flexbox;display:flex;width:100%;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end;padding:.5rem}.content{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;height:100%;box-sizing:border-box}.content.loading{min-height:150px;display:-ms-flexbox;display:flex;width:100%}.content .top{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:justify;justify-content:space-between}@media screen and (max-width:760px){.content{-ms-flex-pack:justify;justify-content:space-between}.content .top{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:justify;justify-content:space-between}}"]
4818
+ })
4819
+ ], CancelEventDialogComponent);
4820
+ return CancelEventDialogComponent;
4821
+ }());
4822
+
4823
+ var EventOperation;
4824
+ (function (EventOperation) {
4825
+ EventOperation["PROVISIONAL"] = "PROVISIONAL";
4504
4826
  EventOperation["EFFECTIVE"] = "EFFECTIVE";
4505
4827
  EventOperation["TICKET"] = "TICKET";
4506
4828
  EventOperation["CREATE_INVOICE"] = "CREATE_INVOICE";
@@ -5457,20 +5779,17 @@ var EventControlBoardComponent = /** @class */ (function () {
5457
5779
  return translatedErrorMessages;
5458
5780
  };
5459
5781
  EventControlBoardComponent.prototype.getProducerInvoiceIdFromParams = function (param) {
5460
- var _a, _b, _c, _d;
5461
- if ((param === null || param === void 0 ? void 0 : param.producerInvoiceIds) && (param === null || param === void 0 ? void 0 : param.producerInvoiceIds.length) > 0) {
5462
- return param === null || param === void 0 ? void 0 : param.producerInvoiceIds[0];
5463
- }
5464
- 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) {
5465
- 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;
5466
- }
5467
- if (param === null || param === void 0 ? void 0 : param.producerInvoiceId) {
5468
- return param === null || param === void 0 ? void 0 : param.producerInvoiceId;
5469
- }
5470
- if (param === null || param === void 0 ? void 0 : param.externalId) {
5471
- return param === null || param === void 0 ? void 0 : param.externalId;
5782
+ var _a, _b, _c, _d, _e;
5783
+ if (!param) {
5784
+ return null;
5472
5785
  }
5473
- return null;
5786
+ return (_e = [
5787
+ (_a = param.producerInvoiceIds) === null || _a === void 0 ? void 0 : _a[0],
5788
+ (_c = (_b = param.invoice) === null || _b === void 0 ? void 0 : _b.generalData) === null || _c === void 0 ? void 0 : _c.transactionalId,
5789
+ param.producerInvoiceId,
5790
+ param.externalId,
5791
+ (_d = param.externalInvoiceIds) === null || _d === void 0 ? void 0 : _d[0],
5792
+ ].find(function (id) { return id; })) !== null && _e !== void 0 ? _e : null;
5474
5793
  };
5475
5794
  EventControlBoardComponent.prototype.getProducerBalanceEntryControlIdFromParams = function (param) {
5476
5795
  var producerBalanceEntryControlId = param.producerBalanceEntryControlId;
@@ -5640,7 +5959,7 @@ var EventControlBoardComponent = /** @class */ (function () {
5640
5959
  EventControlBoardComponent = __decorate([
5641
5960
  Component({
5642
5961
  selector: "event-control-board",
5643
- 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",
5962
+ 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",
5644
5963
  providers: [{ provide: LOCALE_ID, useValue: "pt-BR" }],
5645
5964
  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}"]
5646
5965
  })
@@ -6414,33 +6733,8 @@ var TicketModule = /** @class */ (function () {
6414
6733
  return TicketModule;
6415
6734
  }());
6416
6735
 
6417
- var LibTranslatePipe = /** @class */ (function () {
6418
- function LibTranslatePipe(translateService) {
6419
- this.translateService = translateService;
6420
- }
6421
- LibTranslatePipe.prototype.transform = function (value) {
6422
- var args = [];
6423
- for (var _i = 1; _i < arguments.length; _i++) {
6424
- args[_i - 1] = arguments[_i];
6425
- }
6426
- if (args.length > 0) {
6427
- return this.translateService.instant(value, args[0]);
6428
- }
6429
- return this.translateService.instant(value);
6430
- };
6431
- LibTranslatePipe.ctorParameters = function () { return [
6432
- { type: LibTranslationService }
6433
- ]; };
6434
- LibTranslatePipe = __decorate([
6435
- Pipe({
6436
- name: 'libTranslate'
6437
- })
6438
- ], LibTranslatePipe);
6439
- return LibTranslatePipe;
6440
- }());
6441
-
6442
- var LibTranslationModule = /** @class */ (function () {
6443
- function LibTranslationModule() {
6736
+ var LibTranslationModule = /** @class */ (function () {
6737
+ function LibTranslationModule() {
6444
6738
  }
6445
6739
  LibTranslationModule = __decorate([
6446
6740
  NgModule({
@@ -6450,6 +6744,7 @@ var LibTranslationModule = /** @class */ (function () {
6450
6744
  imports: [
6451
6745
  CommonModule
6452
6746
  ],
6747
+ providers: [LibTranslationService],
6453
6748
  exports: [
6454
6749
  LibTranslatePipe
6455
6750
  ]
@@ -6558,200 +6853,442 @@ var EventControlBoardModule = /** @class */ (function () {
6558
6853
  return EventControlBoardModule;
6559
6854
  }());
6560
6855
 
6561
- var CnpjCpfPipe = /** @class */ (function () {
6562
- function CnpjCpfPipe() {
6856
+ var AgroEntityService = /** @class */ (function () {
6857
+ function AgroEntityService(http, messageService, entityUrl, actionsUrl, queriesUrl, translate) {
6858
+ this.http = http;
6859
+ this.messageService = messageService;
6860
+ this.entityUrl = entityUrl;
6861
+ this.actionsUrl = actionsUrl;
6862
+ this.queriesUrl = queriesUrl;
6863
+ this.translate = translate;
6864
+ this.http = http;
6865
+ this.messageService = messageService;
6866
+ this.entityUrl = entityUrl;
6867
+ this.actionsUrl = actionsUrl;
6868
+ this.queriesUrl = queriesUrl;
6869
+ this.translate = translate;
6870
+ this.defaultCatch = this.defaultCatch.bind(this);
6563
6871
  }
6564
- CnpjCpfPipe.prototype.transform = function (value) {
6565
- var args = [];
6566
- for (var _i = 1; _i < arguments.length; _i++) {
6567
- args[_i - 1] = arguments[_i];
6872
+ AgroEntityService.prototype.getListQueryParams = function (listParams) {
6873
+ var ten = 10;
6874
+ var _a = listParams.page, page = _a === void 0 ? 0 : _a, _b = listParams.size, size = _b === void 0 ? ten : _b, _c = listParams.sort, sort = _c === void 0 ? [] : _c, _d = listParams.filterQuery, filterQuery = _d === void 0 ? "" : _d, _e = listParams.displayFields, displayFields = _e === void 0 ? [] : _e;
6875
+ var params = new HttpParams();
6876
+ params = params.append("size", String(size));
6877
+ params = params.append("offset", String(page));
6878
+ if (sort && sort.length) {
6879
+ params = params.append("orderby", sort.map(this.getBodyFilters()).join(", "));
6568
6880
  }
6569
- if (typeof value !== "string" && typeof value === "number") {
6570
- value = value === null || value === void 0 ? void 0 : value.toString();
6881
+ if (filterQuery) {
6882
+ params = params.append("filter", filterQuery);
6571
6883
  }
6572
- if (typeof value !== "string") {
6573
- return value;
6884
+ if (displayFields && displayFields.length) {
6885
+ params = params.append("displayfields", displayFields.join());
6574
6886
  }
6575
- if (AgroStringUtils.validateCNPJ(value)) {
6576
- return AgroStringUtils.applyMask(value, AgroStringMasks.CNPJ);
6887
+ return params;
6888
+ };
6889
+ AgroEntityService.prototype.getBodyParams = function (listParams) {
6890
+ var ten = 10;
6891
+ var _a = listParams.page, page = _a === void 0 ? 0 : _a, _b = listParams.size, size = _b === void 0 ? ten : _b, _c = listParams.sort, sort = _c === void 0 ? [] : _c, _d = listParams.filterQuery, filterQuery = _d === void 0 ? "" : _d, _e = listParams.displayFields, displayFields = _e === void 0 ? [] : _e;
6892
+ var bodyParams = {};
6893
+ bodyParams.size = size;
6894
+ bodyParams.offset = page;
6895
+ if (sort && sort.length) {
6896
+ bodyParams.orderBy = sort.map(this.getBodyFilters()).join(", ");
6577
6897
  }
6578
- if (AgroStringUtils.validateCPF(value)) {
6579
- return AgroStringUtils.applyMask(value, AgroStringMasks.CPF);
6898
+ if (filterQuery) {
6899
+ bodyParams.filter = filterQuery;
6580
6900
  }
6581
- return value;
6901
+ if (displayFields && displayFields.length) {
6902
+ bodyParams.displayfields = displayFields.join();
6903
+ }
6904
+ return bodyParams;
6582
6905
  };
6583
- CnpjCpfPipe = __decorate([
6584
- Pipe({
6585
- name: "cnpjCpf",
6586
- })
6587
- ], CnpjCpfPipe);
6588
- return CnpjCpfPipe;
6589
- }());
6590
-
6591
- var CnpjCpfPipeModule = /** @class */ (function () {
6592
- function CnpjCpfPipeModule() {
6593
- }
6594
- CnpjCpfPipeModule = __decorate([
6595
- NgModule({
6596
- declarations: [CnpjCpfPipe],
6597
- imports: [CommonModule],
6598
- exports: [CnpjCpfPipe],
6599
- })
6600
- ], CnpjCpfPipeModule);
6601
- return CnpjCpfPipeModule;
6602
- }());
6603
-
6604
- var AgroObjectStringifier = /** @class */ (function () {
6605
- function AgroObjectStringifier() {
6606
- }
6607
- /**
6608
- * Formata um objeto concatenando valores segundo as chaves e pipes informados.
6609
- *
6610
- * @param separator Separador entre os valores (ex: "-")
6611
- * @param fields Campos a extrair. Podem conter subpropriedades ("propriedade.subPropriedade") e pipes ("propriedade|nomeDaPipe:arg1:arg2")
6612
- * @param obj Objeto origem
6613
- */
6614
- AgroObjectStringifier.formatObject = function (separator, fields, obj, usePipes) {
6615
- function mapField(field) {
6616
- var value = AgroObjectStringifier.resolvePath(obj, field);
6617
- if (usePipes === null || usePipes === void 0 ? void 0 : usePipes.hasOwnProperty(field)) {
6618
- return usePipes[field].transform(value);
6906
+ AgroEntityService.prototype.getBodyFilters = function () {
6907
+ return function (s) {
6908
+ var order = "";
6909
+ if (s.order === 1) {
6910
+ order = " asc";
6619
6911
  }
6620
- return value !== null && value !== void 0 ? value : "";
6912
+ if (s.order === -1) {
6913
+ order = " desc";
6914
+ }
6915
+ return "" + s.field + order;
6916
+ };
6917
+ };
6918
+ AgroEntityService.prototype.defaultCatch = function (errorMsgs) {
6919
+ var _this = this;
6920
+ if (errorMsgs === void 0) { errorMsgs = []; }
6921
+ var unauthorized_401 = 401;
6922
+ // errorMsgs = [...errorMsgs, ...DefaultErrorMessages];
6923
+ errorMsgs = __spread(errorMsgs);
6924
+ var zero = 0;
6925
+ return catchError(function (err) {
6926
+ if (err) {
6927
+ var errorMessage = errorMsgs.find(function (eMsg) { return eMsg.status === (err === null || err === void 0 ? void 0 : err.status) || zero; });
6928
+ var summary = err.status ? String(err.status) : "Error";
6929
+ var detail = _this.getErrorMessage(err);
6930
+ if (err.status === unauthorized_401) {
6931
+ summary = _this.translate.instant("agro.angular_components.error_unauthorized_title");
6932
+ detail = _this.translate.instant("agro.angular_components.error_unauthorized_description");
6933
+ }
6934
+ if (errorMessage) {
6935
+ summary = errorMessage.summary ? _this.translate.instant(errorMessage.summary) : summary;
6936
+ detail = errorMessage.detail ? _this.translate.instant(errorMessage.detail) : detail;
6937
+ }
6938
+ _this.messageService.add({
6939
+ severity: "error",
6940
+ summary: summary,
6941
+ detail: detail,
6942
+ });
6943
+ }
6944
+ return throwError(err);
6945
+ });
6946
+ };
6947
+ AgroEntityService.prototype.getErrorMessage = function (err) {
6948
+ if (err.error && err.error.message) {
6949
+ return err.error.message;
6621
6950
  }
6622
- function filterValid(v) {
6623
- return AgroStringUtils.isValid(v);
6951
+ if (err.statusText) {
6952
+ return err.statusText;
6624
6953
  }
6625
- return fields.map(mapField).filter(filterValid).join(" " + separator + " ");
6626
- };
6627
- /** Resolve um caminho tipo "empresa.cargo" dentro de um objeto */
6628
- AgroObjectStringifier.resolvePath = function (obj, path) {
6629
- function reducer(acc, key) {
6630
- return acc === null || acc === void 0 ? void 0 : acc[key];
6954
+ if (err.message) {
6955
+ return err.message;
6631
6956
  }
6632
- return path.split(".").reduce(reducer, obj);
6957
+ return "Error";
6633
6958
  };
6634
- return AgroObjectStringifier;
6635
- }());
6636
-
6637
- var StringifierPipe = /** @class */ (function () {
6638
- function StringifierPipe() {
6639
- }
6640
- StringifierPipe.prototype.transform = function (value, separator, paths, pipes) {
6641
- return AgroObjectStringifier.formatObject(separator, paths, value, pipes);
6959
+ AgroEntityService.prototype.list = function (listParams, errorMessage) {
6960
+ if (errorMessage === void 0) { errorMessage = []; }
6961
+ return this.http.get(this.entityUrl, { params: this.getListQueryParams(listParams) }).pipe(this.defaultCatch(errorMessage));
6642
6962
  };
6643
- StringifierPipe = __decorate([
6644
- Pipe({ name: "stringifier" })
6645
- ], StringifierPipe);
6646
- return StringifierPipe;
6963
+ AgroEntityService.prototype.get = function (id, errorMessage) {
6964
+ if (errorMessage === void 0) { errorMessage = []; }
6965
+ return this.http.get(this.entityUrl + "/" + id).pipe(this.defaultCatch(errorMessage));
6966
+ };
6967
+ AgroEntityService.prototype.insert = function (entity, errorMessage) {
6968
+ if (errorMessage === void 0) { errorMessage = []; }
6969
+ return this.http.post("" + this.entityUrl, entity).pipe(this.defaultCatch(errorMessage));
6970
+ };
6971
+ AgroEntityService.prototype.update = function (id, entity, errorMessage) {
6972
+ if (errorMessage === void 0) { errorMessage = []; }
6973
+ return this.http.put(this.entityUrl + "/" + id, entity).pipe(this.defaultCatch(errorMessage));
6974
+ };
6975
+ AgroEntityService.prototype.delete = function (id, errorMessage) {
6976
+ if (errorMessage === void 0) { errorMessage = []; }
6977
+ return this.http.delete(this.entityUrl + "/" + id).pipe(this.defaultCatch(errorMessage));
6978
+ };
6979
+ AgroEntityService.prototype.listCustomFilter = function (listParams, action, errorMessage) {
6980
+ if (errorMessage === void 0) { errorMessage = []; }
6981
+ return this.http.post(this.actionsUrl + "/" + action, this.getBodyParams(listParams)).pipe(this.defaultCatch(errorMessage));
6982
+ };
6983
+ return AgroEntityService;
6647
6984
  }());
6648
6985
 
6649
- var StringifierPipeModule = /** @class */ (function () {
6650
- function StringifierPipeModule() {
6986
+ var statusLookup;
6987
+ (function (statusLookup) {
6988
+ statusLookup["PENDING"] = "PENDING";
6989
+ statusLookup["FINISHED"] = "FINISHED";
6990
+ statusLookup["ERROR"] = "ERROR";
6991
+ })(statusLookup || (statusLookup = {}));
6992
+ var statusIntegration;
6993
+ (function (statusIntegration) {
6994
+ statusIntegration["SUCCESS"] = "SUCCESS";
6995
+ statusIntegration["IN_PROGRESS"] = "IN_PROGRESS";
6996
+ statusIntegration["ERROR"] = "ERROR";
6997
+ })(statusIntegration || (statusIntegration = {}));
6998
+
6999
+ var AgroInvoiceService = /** @class */ (function (_super) {
7000
+ __extends(AgroInvoiceService, _super);
7001
+ function AgroInvoiceService(http, messageService, translate) {
7002
+ var _this = _super.call(this, http, messageService, "agro/invoice/entities/invoice", "agro/invoice/actions", "agro/invoice/queries", translate) || this;
7003
+ _this.http = http;
7004
+ _this.messageService = messageService;
7005
+ _this.translate = translate;
7006
+ _this.pooling = new Subject();
7007
+ return _this;
6651
7008
  }
6652
- StringifierPipeModule = __decorate([
6653
- NgModule({
6654
- declarations: [StringifierPipe],
6655
- imports: [CommonModule],
6656
- exports: [StringifierPipe],
6657
- })
6658
- ], StringifierPipeModule);
6659
- return StringifierPipeModule;
6660
- }());
7009
+ AgroInvoiceService.prototype.invoiceLookupFilter = function (data) {
7010
+ var _this = this;
7011
+ return this.http
7012
+ .post(this.queriesUrl + "/invoiceLookup", data)
7013
+ .pipe(switchMap(function (res) { return _this.pollInvoiceResult(res.requestId); }));
7014
+ };
7015
+ AgroInvoiceService.prototype.cancelActivePooling = function () {
7016
+ this.pooling.next();
7017
+ };
7018
+ AgroInvoiceService.prototype.pollInvoiceResult = function (requestId) {
7019
+ var _this = this;
7020
+ var delays = Array.from({ length: 10 }, function (_, index) {
7021
+ if (index === 0)
7022
+ return 1000;
7023
+ return (index + 1) * 1000;
7024
+ });
7025
+ return scheduled(delays, asyncScheduler).pipe(concatMap(function (delay) {
7026
+ return timer(delay).pipe(switchMap(function () { return _this.http.post(_this.queriesUrl + "/getInvoiceLookup", { requestId: requestId }); }), tap(function (res) {
7027
+ if (res.status === statusLookup.ERROR) {
7028
+ throw new Error(res.message);
7029
+ }
7030
+ }));
7031
+ }), scan(function (_, curr) { return curr; }, null), filter(function (res) { return (res === null || res === void 0 ? void 0 : res.status) === statusLookup.FINISHED; }), take(1), defaultIfEmpty(null), takeUntil(this.pooling));
7032
+ };
7033
+ AgroInvoiceService.ctorParameters = function () { return [
7034
+ { type: HttpClient },
7035
+ { type: MessageService },
7036
+ { type: LibTranslationService }
7037
+ ]; };
7038
+ AgroInvoiceService = __decorate([
7039
+ Injectable()
7040
+ ], AgroInvoiceService);
7041
+ return AgroInvoiceService;
7042
+ }(AgroEntityService));
6661
7043
 
6662
- var TelephonePipe = /** @class */ (function () {
6663
- function TelephonePipe() {
7044
+ var INVOICE_ITEMS = "invoiceItems.*";
7045
+ var ModalInvoicePjSelectorComponent = /** @class */ (function () {
7046
+ function ModalInvoicePjSelectorComponent(translate, invoiceService) {
7047
+ this.translate = translate;
7048
+ this.invoiceService = invoiceService;
7049
+ this.whenSelectInvoices = new EventEmitter();
7050
+ this.buttonPriority = ButtonPriority;
7051
+ this.gridColumns = [
7052
+ { field: "number", header: this.translate.instant("agro.angular_components.number") },
7053
+ { field: "series", header: this.translate.instant("agro.angular_components.series") },
7054
+ { field: "invoiceItems", header: this.translate.instant("agro.angular_components.itens") },
7055
+ { field: "quantity", header: this.translate.instant("agro.angular_components.quantity") },
7056
+ { field: "issuanceDate", header: this.translate.instant("agro.angular_components.issuance_date") },
7057
+ ];
7058
+ this.dontHaveAnyInvoice = false;
7059
+ this.gridLoading = true;
7060
+ this.gridTotalRecords = AGRO_NUMBERS.ZERO;
7061
+ this.selected = [];
7062
+ this.unselectedIds = new Set();
7063
+ this.visible = false;
7064
+ this.searchValue = new FormControl("", []);
7065
+ this.ngUnsubscribe = new Subject();
7066
+ this.currentParams = {
7067
+ page: 0,
7068
+ size: 10,
7069
+ sort: [{ field: "issuanceDate", order: 1 }],
7070
+ displayFields: ["*", INVOICE_ITEMS, "issuanceDate"],
7071
+ filterQuery: "",
7072
+ };
6664
7073
  }
6665
- /**
6666
- * Transforma um número de telefone aplicando máscara automaticamente.
6667
- * @param value Valor do telefone.
6668
- * @param withDDI Define se deve forçar formatação com DDI (mesmo que não exista).
6669
- */
6670
- TelephonePipe.prototype.transform = function (value, withDDI) {
6671
- if (withDDI === void 0) { withDDI = false; }
6672
- if (!value)
6673
- return "";
6674
- var digits = this.cleanDigits(value);
6675
- if (!digits)
6676
- return value.toString();
6677
- var _a = this.extractParts(digits, withDDI), ddi = _a.ddi, ddd = _a.ddd, number = _a.number;
6678
- return this.formatPhone(ddi, ddd, number, value.toString(), withDDI);
7074
+ ModalInvoicePjSelectorComponent.prototype.ngOnDestroy = function () {
7075
+ this.ngUnsubscribe.next();
7076
+ this.ngUnsubscribe.complete();
6679
7077
  };
6680
- /** Remove todos os caracteres não numéricos */
6681
- TelephonePipe.prototype.cleanDigits = function (value) {
6682
- return value.toString().replace(/\D+/g, "");
7078
+ ModalInvoicePjSelectorComponent.prototype.ngOnInit = function () {
7079
+ this.whenSearchValueChanges();
6683
7080
  };
6684
- /** Extrai DDI, DDD e número, considerando se deve aplicar DDI forçado */
6685
- TelephonePipe.prototype.extractParts = function (digits, withDDI) {
6686
- var len = digits.length;
6687
- if (withDDI) {
6688
- return this.extractWithDDI(digits);
7081
+ ModalInvoicePjSelectorComponent.prototype.whenSearchValueChanges = function () {
7082
+ var _this = this;
7083
+ this.searchValue.valueChanges
7084
+ .pipe(takeUntil(this.ngUnsubscribe))
7085
+ .pipe(debounceTime(AGRO_NUMBERS.THREE_HUNDRED))
7086
+ .subscribe(function (value) {
7087
+ if (value) {
7088
+ _this.updateGridData({ first: 0, rows: 10, multiSortMeta: [{ field: "issuanceDate", order: 1 }] }, value);
7089
+ }
7090
+ else {
7091
+ _this.updateGridData({ first: 0, rows: 10, multiSortMeta: [{ field: "issuanceDate", order: 1 }] });
7092
+ }
7093
+ });
7094
+ };
7095
+ ModalInvoicePjSelectorComponent.prototype.tryToSearchAgain = function () {
7096
+ this.gridLoading = true;
7097
+ this.updateGridData({ first: 0, rows: 10, multiSortMeta: [{ field: "issuanceDate", order: 1 }] });
7098
+ };
7099
+ ModalInvoicePjSelectorComponent.prototype.open = function () {
7100
+ if (this.checkIfOptionsIsValid()) {
7101
+ this.visible = true;
7102
+ this.gridData = [];
7103
+ this.gridLoading = true;
7104
+ this.gridTotalRecords = 0;
7105
+ this.selected = [];
7106
+ this.unselectedIds.clear();
7107
+ this.currentParams = {
7108
+ page: 0,
7109
+ size: 10,
7110
+ sort: [],
7111
+ filterQuery: "",
7112
+ displayFields: ["*", INVOICE_ITEMS],
7113
+ };
7114
+ this.updateGridData({ first: 0, rows: 10, multiSortMeta: [{ field: "issuanceDate", order: 1 }] });
7115
+ this.selected = [];
6689
7116
  }
6690
- if (len <= AGRO_NUMBERS.NINE) {
6691
- return { ddi: "", ddd: "", number: digits };
7117
+ };
7118
+ ModalInvoicePjSelectorComponent.prototype.checkIfOptionsIsValid = function () {
7119
+ if (!this.options) {
7120
+ return false;
6692
7121
  }
6693
- if (len <= AGRO_NUMBERS.ELEVEN) {
6694
- return this.extractWithDDD(digits);
7122
+ if (!this.options.companyId || !this.options.branchId) {
7123
+ return false;
6695
7124
  }
6696
- return this.extractWithDDI(digits);
7125
+ return true;
6697
7126
  };
6698
- /** Extrai DDD e número (sem DDI) */
6699
- TelephonePipe.prototype.extractWithDDD = function (digits) {
6700
- var ddd = digits.slice(0, 2);
6701
- var number = digits.slice(2);
6702
- return { ddi: "", ddd: ddd, number: number };
7127
+ ModalInvoicePjSelectorComponent.prototype.updateGridData = function (event, searchValue) {
7128
+ var _this = this;
7129
+ var _a;
7130
+ this.cancelPooling();
7131
+ var companyId = this.options.companyId;
7132
+ var branchId = this.options.branchId;
7133
+ var producerId = this.options.producersIds[0];
7134
+ var ruralEstateId = this.options.ruralEstateIds[0];
7135
+ var size = event.rows;
7136
+ var page = event.first / size;
7137
+ var sizePage = event.rows;
7138
+ this.currentParams = {
7139
+ page: page,
7140
+ size: size,
7141
+ sort: ((_a = event.multiSortMeta) === null || _a === void 0 ? void 0 : _a.length) ? event.multiSortMeta : [{ field: "issuanceDate", order: 1 }],
7142
+ displayFields: ["*", INVOICE_ITEMS, "issuanceDate"],
7143
+ };
7144
+ this.gridLoading = true;
7145
+ this.dontHaveAnyInvoice = false;
7146
+ var filterBody = {
7147
+ filter: {
7148
+ companyId: companyId,
7149
+ branchId: branchId,
7150
+ producerIds: [producerId],
7151
+ ruralEstateIds: [ruralEstateId],
7152
+ multiProducts: false,
7153
+ productId: this.options.productId,
7154
+ },
7155
+ pageRequest: {
7156
+ offset: page,
7157
+ size: sizePage,
7158
+ orderBy: this.currentParams.sort.map(function (sort) { return ({ field: sort.field, order: sort.order === 1 ? "asc" : "desc" }); }),
7159
+ },
7160
+ };
7161
+ this.invoiceService
7162
+ .invoiceLookupFilter(filterBody)
7163
+ .pipe(takeUntil(this.ngUnsubscribe), finalize(function () {
7164
+ _this.gridLoading = false;
7165
+ }))
7166
+ .subscribe(function (result) {
7167
+ var _a;
7168
+ _this.gridData = ((_a = result === null || result === void 0 ? void 0 : result.result) === null || _a === void 0 ? void 0 : _a.invoices) || [];
7169
+ if (_this.gridData.length === 0 && !searchValue) {
7170
+ _this.dontHaveAnyInvoice = true;
7171
+ }
7172
+ _this.gridTotalRecords = result.result.totalElements;
7173
+ }, function (error) {
7174
+ console.info("Erro ao buscar notas fiscais: ", error);
7175
+ }, function () {
7176
+ _this.gridLoading = false;
7177
+ });
6703
7178
  };
6704
- /** Extrai DDI, DDD e número */
6705
- TelephonePipe.prototype.extractWithDDI = function (digits) {
6706
- var len = digits.length;
6707
- var ddiLen = 1;
6708
- if (len >= 14)
6709
- ddiLen = 3;
6710
- else if (len >= 12)
6711
- ddiLen = 2;
6712
- var ddi = digits.slice(0, ddiLen);
6713
- var ddd = digits.slice(ddiLen, ddiLen + 2);
6714
- var number = digits.slice(ddiLen + 2);
6715
- return { ddi: ddi, ddd: ddd, number: number };
7179
+ ModalInvoicePjSelectorComponent.prototype.cancelPooling = function () {
7180
+ this.invoiceService.cancelActivePooling();
6716
7181
  };
6717
- /** Monta o número formatado */
6718
- TelephonePipe.prototype.formatPhone = function (ddi, ddd, number, fallback, withDDI) {
6719
- if (!number)
6720
- return fallback;
6721
- var formatted = "";
6722
- if (withDDI || ddi)
6723
- formatted += "+" + (ddi || "55") + " ";
6724
- if (ddd)
6725
- formatted += "(" + ddd + ") ";
6726
- formatted += this.formatNumber(number);
6727
- return formatted;
7182
+ ModalInvoicePjSelectorComponent.prototype.add = function () {
7183
+ return __awaiter(this, void 0, void 0, function () {
7184
+ return __generator(this, function (_a) {
7185
+ try {
7186
+ this.whenSelectInvoices.emit(this.selected);
7187
+ this.resetSpecs();
7188
+ }
7189
+ catch (error) {
7190
+ return [2 /*return*/, null];
7191
+ }
7192
+ return [2 /*return*/];
7193
+ });
7194
+ });
6728
7195
  };
6729
- /** Aplica máscara de 8 ou 9 dígitos */
6730
- TelephonePipe.prototype.formatNumber = function (number) {
6731
- var len = number.length;
6732
- if (len === 9)
6733
- return number.slice(0, 5) + "-" + number.slice(5);
6734
- if (len === 8)
6735
- return number.slice(0, 4) + "-" + number.slice(4);
6736
- return number;
7196
+ ModalInvoicePjSelectorComponent.prototype.resetSpecs = function () {
7197
+ this.selected = [];
7198
+ this.dontHaveAnyInvoice = false;
7199
+ this.visible = false;
7200
+ this.gridData = [];
7201
+ this.gridLoading = false;
7202
+ this.gridTotalRecords = 0;
6737
7203
  };
6738
- TelephonePipe = __decorate([
6739
- Pipe({ name: "telephone" })
6740
- ], TelephonePipe);
6741
- return TelephonePipe;
7204
+ ModalInvoicePjSelectorComponent.prototype.cancel = function () {
7205
+ return __awaiter(this, void 0, void 0, function () {
7206
+ return __generator(this, function (_a) {
7207
+ this.resetSpecs();
7208
+ return [2 /*return*/];
7209
+ });
7210
+ });
7211
+ };
7212
+ ModalInvoicePjSelectorComponent.prototype.getItemsQuantity = function (row) {
7213
+ var _a;
7214
+ return ((_a = row.invoiceItems) === null || _a === void 0 ? void 0 : _a.reduce(function (sum, item) { return sum + (item.quantity || 0); }, 0)) || 0;
7215
+ };
7216
+ ModalInvoicePjSelectorComponent.ctorParameters = function () { return [
7217
+ { type: LibTranslationService },
7218
+ { type: AgroInvoiceService }
7219
+ ]; };
7220
+ __decorate([
7221
+ Input()
7222
+ ], ModalInvoicePjSelectorComponent.prototype, "options", void 0);
7223
+ __decorate([
7224
+ Output()
7225
+ ], ModalInvoicePjSelectorComponent.prototype, "whenSelectInvoices", void 0);
7226
+ ModalInvoicePjSelectorComponent = __decorate([
7227
+ Component({
7228
+ selector: "s-modal-invoice-pj-selector",
7229
+ 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",
7230
+ 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}"]
7231
+ })
7232
+ ], ModalInvoicePjSelectorComponent);
7233
+ return ModalInvoicePjSelectorComponent;
6742
7234
  }());
6743
7235
 
6744
- var TelephonePipeModule = /** @class */ (function () {
6745
- function TelephonePipeModule() {
7236
+ var AgroInvoiceModule = /** @class */ (function () {
7237
+ function AgroInvoiceModule() {
6746
7238
  }
6747
- TelephonePipeModule = __decorate([
7239
+ AgroInvoiceModule = __decorate([
6748
7240
  NgModule({
6749
- declarations: [TelephonePipe],
6750
- imports: [CommonModule],
6751
- exports: [TelephonePipe],
7241
+ imports: [
7242
+ HttpClientModule,
7243
+ PermissionsModule.forChild([
7244
+ {
7245
+ name: 'invoice',
7246
+ actions: ['Visualizar', 'Incluir', 'Editar', 'Excluir'],
7247
+ uri: "res://senior.com.br/agro/origination/entities/invoice",
7248
+ },
7249
+ ]),
7250
+ ],
7251
+ providers: [
7252
+ AgroInvoiceService,
7253
+ ],
7254
+ declarations: [],
7255
+ exports: [],
6752
7256
  })
6753
- ], TelephonePipeModule);
6754
- return TelephonePipeModule;
7257
+ ], AgroInvoiceModule);
7258
+ return AgroInvoiceModule;
7259
+ }());
7260
+
7261
+ var ModalInvoicePjSelectorModule = /** @class */ (function () {
7262
+ function ModalInvoicePjSelectorModule() {
7263
+ }
7264
+ ModalInvoicePjSelectorModule = __decorate([
7265
+ NgModule({
7266
+ declarations: [ModalInvoicePjSelectorComponent],
7267
+ providers: [DecimalPipe, DatePipe],
7268
+ imports: [
7269
+ CommonModule,
7270
+ ReactiveFormsModule,
7271
+ LocaleModule.forChild(),
7272
+ EmptyStateModule,
7273
+ BignumberInputModule,
7274
+ InputTextModule$1,
7275
+ ButtonModule,
7276
+ TableModule$1,
7277
+ SharedModule$2,
7278
+ TableModule,
7279
+ AgroInvoiceModule,
7280
+ DialogModule,
7281
+ KilogramModule,
7282
+ LoadingStateModule,
7283
+ ConfirmDialogModule$1,
7284
+ LibTranslationModule,
7285
+ KilogramModule,
7286
+ TableHeaderCheckboxModule,
7287
+ ],
7288
+ exports: [ModalInvoicePjSelectorComponent],
7289
+ })
7290
+ ], ModalInvoicePjSelectorModule);
7291
+ return ModalInvoicePjSelectorModule;
6755
7292
  }());
6756
7293
 
6757
7294
  var HostProjectConfigsInjectionToken = new InjectionToken("hostProjectConfigs");
@@ -6781,5 +7318,5 @@ var AgroAngularComponentsModule = /** @class */ (function () {
6781
7318
  * Generated bundle index. Do not edit.
6782
7319
  */
6783
7320
 
6784
- 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 };
7321
+ 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 };
6785
7322
  //# sourceMappingURL=senior-agronegocio-angular-components.js.map