@senior-agronegocio/angular-components 0.0.9860 → 0.0.9862

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 (201) hide show
  1. package/bundles/senior-agronegocio-angular-components.umd.js +6064 -4368
  2. package/bundles/senior-agronegocio-angular-components.umd.js.map +1 -1
  3. package/bundles/senior-agronegocio-angular-components.umd.min.js +2 -2
  4. package/bundles/senior-agronegocio-angular-components.umd.min.js.map +1 -1
  5. package/common/agro-number-utils.class.d.ts +6 -0
  6. package/common/agro-object-stringifier.class.d.ts +16 -0
  7. package/common/agro-object-utils.class.d.ts +10 -0
  8. package/common/agro-regex.constant.d.ts +3 -0
  9. package/common/agro-string-utils.class.d.ts +3 -0
  10. package/components/event-control-board/event-control-board.component.d.ts +25 -17
  11. package/components/event-control-board/index.d.ts +1 -3
  12. package/components/event-control-board/service/entity-service.d.ts +3 -3
  13. package/components/event-control-board/service/origination/origination-dto.d.ts +1 -1
  14. package/components/financial-title-table/directive/validate-tiltle-value-selected.directive.d.ts +6 -0
  15. package/components/financial-title-table/financial-title-table-options.interface.d.ts +10 -0
  16. package/components/financial-title-table/financial-title-table.component.d.ts +61 -0
  17. package/components/financial-title-table/financial-title-table.module.d.ts +2 -0
  18. package/components/financial-title-table/index.d.ts +4 -0
  19. package/components/financial-title-table/services/financial/agro-financial.module.d.ts +2 -0
  20. package/components/financial-title-table/services/financial/agro-financial.service.d.ts +23 -0
  21. package/components/financial-title-table/services/financial/enums.d.ts +27 -0
  22. package/components/financial-title-table/services/financial/index.d.ts +2 -0
  23. package/components/financial-title-table/services/financial/intefaces.d.ts +104 -0
  24. package/components/index.d.ts +2 -0
  25. package/components/modal-invoice-pj/for-fixation/modal-fixation-options.interface.d.ts +5 -0
  26. package/components/modal-invoice-pj/for-fixation/modal-invoice-pj-for-fixation.component.d.ts +35 -0
  27. package/components/modal-invoice-pj/for-fixation/modal-invoice-pj-for-fixation.module.d.ts +2 -0
  28. package/components/modal-invoice-pj/for-origination/modal-invoice-pj-for-origination.component.d.ts +26 -0
  29. package/components/modal-invoice-pj/for-origination/modal-invoice-pj-for-origination.module.d.ts +2 -0
  30. package/components/modal-invoice-pj/for-transfer/modal-invoice-pj-for-transfer.component.d.ts +26 -0
  31. package/components/modal-invoice-pj/for-transfer/modal-invoice-pj-for-transfer.module.d.ts +2 -0
  32. package/components/modal-invoice-pj/index.d.ts +9 -0
  33. package/components/modal-invoice-pj/modal-invoice-pj-base.class.d.ts +53 -0
  34. package/components/modal-invoice-pj/modal-invoice-pj-options.interface.d.ts +10 -0
  35. package/components/modal-invoice-pj/modal-shared-imports.d.ts +5 -0
  36. package/components/modal-invoice-pj/services/agro-invoice/agro-invoice.module.d.ts +2 -0
  37. package/components/modal-invoice-pj/services/agro-invoice/agro-invoice.service.d.ts +16 -0
  38. package/components/modal-invoice-pj/services/agro-invoice/index.d.ts +2 -0
  39. package/components/modal-invoice-pj/services/agro-invoice/interfaces.d.ts +75 -0
  40. package/esm2015/common/agro-number-utils.class.js +18 -1
  41. package/esm2015/common/agro-object-stringifier.class.js +31 -0
  42. package/esm2015/common/agro-object-utils.class.js +29 -1
  43. package/esm2015/common/agro-platform-utils.class.js +8 -7
  44. package/esm2015/common/agro-regex.constant.js +5 -2
  45. package/esm2015/common/agro-string-utils.class.js +27 -11
  46. package/esm2015/components/cancel-event-dialog/cancel-event-dialog-config.js +1 -1
  47. package/esm2015/components/event-control-board/event-control-board.component.js +110 -90
  48. package/esm2015/components/event-control-board/event-control-board.module.js +2 -5
  49. package/esm2015/components/event-control-board/index.js +2 -4
  50. package/esm2015/components/event-control-board/service/entity-service.js +25 -27
  51. package/esm2015/components/event-control-board/service/origination/origination-dto.js +1 -1
  52. package/esm2015/components/financial-title-table/directive/validate-tiltle-value-selected.directive.js +33 -0
  53. package/esm2015/components/financial-title-table/financial-title-table-options.interface.js +1 -0
  54. package/esm2015/components/financial-title-table/financial-title-table.component.js +248 -0
  55. package/esm2015/components/financial-title-table/financial-title-table.module.js +42 -0
  56. package/esm2015/components/financial-title-table/index.js +4 -0
  57. package/esm2015/components/financial-title-table/services/financial/agro-financial.module.js +26 -0
  58. package/esm2015/components/financial-title-table/services/financial/agro-financial.service.js +62 -0
  59. package/esm2015/components/financial-title-table/services/financial/enums.js +33 -0
  60. package/esm2015/components/financial-title-table/services/financial/index.js +3 -0
  61. package/esm2015/components/financial-title-table/services/financial/intefaces.js +1 -0
  62. package/esm2015/components/index.js +3 -1
  63. package/esm2015/components/modal-invoice-pj/for-fixation/modal-fixation-options.interface.js +1 -0
  64. package/esm2015/components/modal-invoice-pj/for-fixation/modal-invoice-pj-for-fixation.component.js +189 -0
  65. package/esm2015/components/modal-invoice-pj/for-fixation/modal-invoice-pj-for-fixation.module.js +16 -0
  66. package/esm2015/components/modal-invoice-pj/for-origination/modal-invoice-pj-for-origination.component.js +60 -0
  67. package/esm2015/components/modal-invoice-pj/for-origination/modal-invoice-pj-for-origination.module.js +16 -0
  68. package/esm2015/components/modal-invoice-pj/for-transfer/modal-invoice-pj-for-transfer.component.js +60 -0
  69. package/esm2015/components/modal-invoice-pj/for-transfer/modal-invoice-pj-for-transfer.module.js +16 -0
  70. package/esm2015/components/modal-invoice-pj/index.js +8 -0
  71. package/esm2015/components/modal-invoice-pj/modal-invoice-pj-base.class.js +193 -0
  72. package/esm2015/components/modal-invoice-pj/modal-invoice-pj-options.interface.js +1 -0
  73. package/esm2015/components/modal-invoice-pj/modal-shared-imports.js +32 -0
  74. package/esm2015/components/modal-invoice-pj/services/agro-invoice/agro-invoice.module.js +28 -0
  75. package/esm2015/components/modal-invoice-pj/services/agro-invoice/agro-invoice.service.js +49 -0
  76. package/esm2015/components/modal-invoice-pj/services/agro-invoice/index.js +3 -0
  77. package/esm2015/components/modal-invoice-pj/services/agro-invoice/interfaces.js +13 -0
  78. package/esm2015/lib-translation.module.js +3 -1
  79. package/esm2015/pipe/cnpj-cpf/cnpj-cpf.pipe.js +28 -0
  80. package/esm2015/pipe/cnpj-cpf/cnpj-cpf.pipe.module.js +15 -0
  81. package/esm2015/pipe/cnpj-cpf/index.js +3 -0
  82. package/esm2015/pipe/index.js +5 -1
  83. package/esm2015/pipe/kilogram/index.js +3 -0
  84. package/esm2015/pipe/kilogram/kilogram.module.js +17 -0
  85. package/esm2015/pipe/kilogram/kilogram.pipe.js +38 -0
  86. package/esm2015/pipe/stringifier/index.js +3 -0
  87. package/esm2015/pipe/stringifier/stringifier.pipe.js +13 -0
  88. package/esm2015/pipe/stringifier/stringifier.pipe.module.js +15 -0
  89. package/esm2015/pipe/telephone/index.js +3 -0
  90. package/esm2015/pipe/telephone/telephone.pipe.js +91 -0
  91. package/esm2015/pipe/telephone/telephone.pipe.module.js +15 -0
  92. package/esm2015/public-api.js +6 -6
  93. package/esm2015/senior-agronegocio-angular-components.js +3 -2
  94. package/esm2015/services/entity-service.js +132 -0
  95. package/esm2015/services/i18n/en-US.js +38 -1
  96. package/esm2015/services/i18n/es-CO.js +39 -2
  97. package/esm2015/services/i18n/pt-BR.js +301 -261
  98. package/esm2015/services/index.js +1 -1
  99. package/esm2015/services/lib-translation.service.js +3 -3
  100. package/esm2015/services/producer-invoice/producer-invoice-dto.js +1 -0
  101. package/esm2015/services/producer-invoice/producer-invoice.service.js +64 -0
  102. package/esm5/common/agro-number-utils.class.js +19 -1
  103. package/esm5/common/agro-object-stringifier.class.js +35 -0
  104. package/esm5/common/agro-object-utils.class.js +29 -1
  105. package/esm5/common/agro-platform-utils.class.js +8 -7
  106. package/esm5/common/agro-regex.constant.js +5 -2
  107. package/esm5/common/agro-string-utils.class.js +27 -11
  108. package/esm5/components/cancel-event-dialog/cancel-event-dialog-config.js +1 -1
  109. package/esm5/components/event-control-board/event-control-board.component.js +113 -91
  110. package/esm5/components/event-control-board/event-control-board.module.js +2 -5
  111. package/esm5/components/event-control-board/index.js +2 -4
  112. package/esm5/components/event-control-board/service/entity-service.js +24 -26
  113. package/esm5/components/event-control-board/service/origination/origination-dto.js +1 -1
  114. package/esm5/components/financial-title-table/directive/validate-tiltle-value-selected.directive.js +37 -0
  115. package/esm5/components/financial-title-table/financial-title-table-options.interface.js +1 -0
  116. package/esm5/components/financial-title-table/financial-title-table.component.js +264 -0
  117. package/esm5/components/financial-title-table/financial-title-table.module.js +45 -0
  118. package/esm5/components/financial-title-table/index.js +4 -0
  119. package/esm5/components/financial-title-table/services/financial/agro-financial.module.js +29 -0
  120. package/esm5/components/financial-title-table/services/financial/agro-financial.service.js +69 -0
  121. package/esm5/components/financial-title-table/services/financial/enums.js +33 -0
  122. package/esm5/components/financial-title-table/services/financial/index.js +3 -0
  123. package/esm5/components/financial-title-table/services/financial/intefaces.js +1 -0
  124. package/esm5/components/index.js +3 -1
  125. package/esm5/components/modal-invoice-pj/for-fixation/modal-fixation-options.interface.js +1 -0
  126. package/esm5/components/modal-invoice-pj/for-fixation/modal-invoice-pj-for-fixation.component.js +221 -0
  127. package/esm5/components/modal-invoice-pj/for-fixation/modal-invoice-pj-for-fixation.module.js +19 -0
  128. package/esm5/components/modal-invoice-pj/for-origination/modal-invoice-pj-for-origination.component.js +63 -0
  129. package/esm5/components/modal-invoice-pj/for-origination/modal-invoice-pj-for-origination.module.js +19 -0
  130. package/esm5/components/modal-invoice-pj/for-transfer/modal-invoice-pj-for-transfer.component.js +63 -0
  131. package/esm5/components/modal-invoice-pj/for-transfer/modal-invoice-pj-for-transfer.module.js +19 -0
  132. package/esm5/components/modal-invoice-pj/index.js +8 -0
  133. package/esm5/components/modal-invoice-pj/modal-invoice-pj-base.class.js +210 -0
  134. package/esm5/components/modal-invoice-pj/modal-invoice-pj-options.interface.js +1 -0
  135. package/esm5/components/modal-invoice-pj/modal-shared-imports.js +32 -0
  136. package/esm5/components/modal-invoice-pj/services/agro-invoice/agro-invoice.module.js +31 -0
  137. package/esm5/components/modal-invoice-pj/services/agro-invoice/agro-invoice.service.js +56 -0
  138. package/esm5/components/modal-invoice-pj/services/agro-invoice/index.js +3 -0
  139. package/esm5/components/modal-invoice-pj/services/agro-invoice/interfaces.js +13 -0
  140. package/esm5/lib-translation.module.js +3 -1
  141. package/esm5/pipe/cnpj-cpf/cnpj-cpf.pipe.js +35 -0
  142. package/esm5/pipe/cnpj-cpf/cnpj-cpf.pipe.module.js +18 -0
  143. package/esm5/pipe/cnpj-cpf/index.js +3 -0
  144. package/esm5/pipe/index.js +5 -1
  145. package/esm5/pipe/kilogram/index.js +3 -0
  146. package/esm5/pipe/kilogram/kilogram.module.js +20 -0
  147. package/esm5/pipe/kilogram/kilogram.pipe.js +41 -0
  148. package/esm5/pipe/stringifier/index.js +3 -0
  149. package/esm5/pipe/stringifier/stringifier.pipe.js +16 -0
  150. package/esm5/pipe/stringifier/stringifier.pipe.module.js +18 -0
  151. package/esm5/pipe/telephone/index.js +3 -0
  152. package/esm5/pipe/telephone/telephone.pipe.js +95 -0
  153. package/esm5/pipe/telephone/telephone.pipe.module.js +18 -0
  154. package/esm5/public-api.js +6 -6
  155. package/esm5/senior-agronegocio-angular-components.js +3 -2
  156. package/esm5/services/entity-service.js +143 -0
  157. package/esm5/services/i18n/en-US.js +38 -1
  158. package/esm5/services/i18n/es-CO.js +39 -2
  159. package/esm5/services/i18n/pt-BR.js +301 -261
  160. package/esm5/services/index.js +1 -1
  161. package/esm5/services/lib-translation.service.js +3 -3
  162. package/esm5/services/producer-invoice/producer-invoice-dto.js +1 -0
  163. package/esm5/services/producer-invoice/producer-invoice.service.js +72 -0
  164. package/fesm2015/senior-agronegocio-angular-components.js +5586 -4060
  165. package/fesm2015/senior-agronegocio-angular-components.js.map +1 -1
  166. package/fesm5/senior-agronegocio-angular-components.js +6052 -4375
  167. package/fesm5/senior-agronegocio-angular-components.js.map +1 -1
  168. package/package.json +7 -55
  169. package/pipe/cnpj-cpf/cnpj-cpf.pipe.d.ts +4 -0
  170. package/pipe/cnpj-cpf/cnpj-cpf.pipe.module.d.ts +2 -0
  171. package/pipe/cnpj-cpf/index.d.ts +2 -0
  172. package/pipe/index.d.ts +4 -0
  173. package/pipe/kilogram/index.d.ts +2 -0
  174. package/pipe/kilogram/kilogram.module.d.ts +2 -0
  175. package/pipe/kilogram/kilogram.pipe.d.ts +8 -0
  176. package/pipe/stringifier/index.d.ts +2 -0
  177. package/pipe/stringifier/stringifier.pipe.d.ts +9 -0
  178. package/pipe/stringifier/stringifier.pipe.module.d.ts +2 -0
  179. package/pipe/telephone/index.d.ts +2 -0
  180. package/pipe/telephone/telephone.pipe.d.ts +21 -0
  181. package/pipe/telephone/telephone.pipe.module.d.ts +2 -0
  182. package/public-api.d.ts +5 -5
  183. package/senior-agronegocio-angular-components.d.ts +2 -1
  184. package/senior-agronegocio-angular-components.metadata.json +1 -1
  185. package/services/entity-service.d.ts +73 -0
  186. package/services/i18n/en-US.d.ts +37 -0
  187. package/services/i18n/es-CO.d.ts +37 -0
  188. package/services/i18n/pt-BR.d.ts +299 -259
  189. package/{components/event-control-board/service → services}/producer-invoice/producer-invoice-dto.d.ts +4 -4
  190. package/services/producer-invoice/producer-invoice.service.d.ts +18 -0
  191. package/components/event-control-board/service/event-control-board.service.d.ts +0 -13
  192. package/components/event-control-board/service/producer-invoice/producer-invoice.module.d.ts +0 -2
  193. package/components/event-control-board/service/producer-invoice/producer-invoice.service.d.ts +0 -11
  194. package/esm2015/components/event-control-board/service/event-control-board.service.js +0 -37
  195. package/esm2015/components/event-control-board/service/producer-invoice/producer-invoice-dto.js +0 -1
  196. package/esm2015/components/event-control-board/service/producer-invoice/producer-invoice.module.js +0 -26
  197. package/esm2015/components/event-control-board/service/producer-invoice/producer-invoice.service.js +0 -24
  198. package/esm5/components/event-control-board/service/event-control-board.service.js +0 -38
  199. package/esm5/components/event-control-board/service/producer-invoice/producer-invoice-dto.js +0 -1
  200. package/esm5/components/event-control-board/service/producer-invoice/producer-invoice.module.js +0 -29
  201. package/esm5/components/event-control-board/service/producer-invoice/producer-invoice.service.js +0 -27
@@ -68,4 +68,10 @@ export declare class AgroNumberUtils {
68
68
  * @returns O número arredondado.
69
69
  */
70
70
  static roundTo(value: number, decimals?: number): number;
71
+ /**
72
+ * Pega apenas números, convertendo strings para números e retornarndo apenas o maior inteiro encontrado.
73
+ * @param value - O valor a ser processado.
74
+ * @returns O maior número inteiro encontrado ou 0 se nenhum número for encontrado.
75
+ */
76
+ static getNearInteger(value: any): number;
71
77
  }
@@ -0,0 +1,16 @@
1
+ import { PipeTransform } from "@angular/core";
2
+ export declare type UsePipes = {
3
+ [key: string]: PipeTransform;
4
+ };
5
+ export declare class AgroObjectStringifier {
6
+ /**
7
+ * Formata um objeto concatenando valores segundo as chaves e pipes informados.
8
+ *
9
+ * @param separator Separador entre os valores (ex: "-")
10
+ * @param fields Campos a extrair. Podem conter subpropriedades ("propriedade.subPropriedade") e pipes ("propriedade|nomeDaPipe:arg1:arg2")
11
+ * @param obj Objeto origem
12
+ */
13
+ static formatObject(separator: string, fields: string[], obj: any, usePipes?: UsePipes): string;
14
+ /** Resolve um caminho tipo "empresa.cargo" dentro de um objeto */
15
+ private static resolvePath;
16
+ }
@@ -1,3 +1,4 @@
1
+ import { FieldType } from "@seniorsistemas/angular-components";
1
2
  export { AgroObjectUtils as AOU, AgroObjectUtils as ObjectUtils };
2
3
  /**
3
4
  * Classe utilitária para operações de objeto.
@@ -158,4 +159,13 @@ export declare class AgroObjectUtils {
158
159
  * @param value
159
160
  */
160
161
  static fromString(value: string): any;
162
+ /**
163
+ * Retorna o valor de uma propriedade de um objeto, formatado conforme o tipo especificado.
164
+ *
165
+ * @param obj - O objeto do qual a propriedade será extraída.
166
+ * @param path - O caminho da propriedade no objeto (pode ser um caminho aninhado).
167
+ * @param type - O tipo de formatação a ser aplicada (String, Date, Money).
168
+ * @returns O valor formatado da propriedade.
169
+ */
170
+ static getPropAndFormatValue(obj: any, path: any, type: FieldType): any;
161
171
  }
@@ -149,4 +149,7 @@ export declare const AGRO_REGEX: {
149
149
  * Formato: AAA-0000
150
150
  */
151
151
  isOldLicensePlate: RegExp;
152
+ isISODate: RegExp;
153
+ isISOTime: RegExp;
154
+ isISODateTime: RegExp;
152
155
  };
@@ -91,4 +91,7 @@ export declare class AgroStringUtils {
91
91
  static applyMask(value: string, mask: AgroStringMasks | string): string;
92
92
  static isValid(str: NullableString): boolean;
93
93
  static isInvalid(str: NullableString): boolean;
94
+ static isISODate(value: string): boolean;
95
+ static isISOTime(value: string): boolean;
96
+ static isISODatetime(value: string): boolean;
94
97
  }
@@ -1,25 +1,33 @@
1
- import { EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges } from "@angular/core";
2
- import { FormBuilder, FormGroup } from "@angular/forms";
3
- import { BadgeColors, ButtonPriority, FormField, Step } from "@seniorsistemas/angular-components";
4
- import { DialogService, MessageService } from "primeng";
5
- import { AGRO_NUMBERS } from "../../enums/agro-numbers.enum";
6
- import { LibTranslationService } from "../../services/lib-translation.service";
7
- import { WebsocketService } from "../../services/websocket";
8
- import { CancelEventDialogConfig } from "../cancel-event-dialog/cancel-event-dialog-config";
9
- import { EventOrigin } from "./common/event-origin";
10
- import { EventStatus } from "./common/event-status";
11
- import { E070Emp } from "./service/e070emp/e070emp";
12
- import { E070Fil } from "./service/e070fil/e070fil";
13
- import { EventControlBoardService } from "./service/event-control-board.service";
14
- import { PaginatorStorageService } from "./service/paginator-storage.service";
1
+ import { EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';
2
+ import { FormBuilder, FormGroup } from '@angular/forms';
3
+ import { BadgeColors, ButtonPriority, FormField, Step } from '@seniorsistemas/angular-components';
4
+ import { DialogService, MessageService } from 'primeng';
5
+ import { AGRO_NUMBERS } from '../../enums/agro-numbers.enum';
6
+ import { LibTranslationService } from '../../services/lib-translation.service';
7
+ import { WebsocketService } from '../../services/websocket';
8
+ import { CancelEventDialogConfig } from '../cancel-event-dialog/cancel-event-dialog-config';
9
+ import { EventOrigin } from './common/event-origin';
10
+ import { EventStatus } from './common/event-status';
11
+ import { E070Emp } from './service/e070emp/e070emp';
12
+ import { E070Fil } from './service/e070fil/e070fil';
13
+ import { EventControlItemService } from './service/event-control-item/event-control-item.service';
14
+ import { EventControlService } from './service/event-control/event-control.service';
15
+ import { PaginatorStorageService } from './service/paginator-storage.service';
16
+ import { TransferService } from './service/transfer/transfer.service';
17
+ import { FixationService } from './service/fixation-entity/fixation.service';
18
+ import { ProducerInvoiceService } from '../../services/producer-invoice/producer-invoice.service';
15
19
  export declare class EventControlBoardComponent implements OnInit, OnDestroy, OnChanges {
16
20
  private readonly translate;
17
21
  private readonly formBuilder;
18
22
  private readonly websocketService;
19
- private readonly eventControlBoardService;
20
23
  private readonly paginatorStorageService;
21
24
  private readonly messageService;
22
25
  private readonly dialogService;
26
+ eventControlService: EventControlService;
27
+ eventControlItemService: EventControlItemService;
28
+ transferService: TransferService;
29
+ producerInvoiceService: ProducerInvoiceService;
30
+ fixationService: FixationService;
23
31
  company: E070Emp;
24
32
  branch: E070Fil;
25
33
  controlCode: string[];
@@ -34,7 +42,7 @@ export declare class EventControlBoardComponent implements OnInit, OnDestroy, On
34
42
  producerInvoice: any;
35
43
  steps: Step[];
36
44
  selectedStep: any;
37
- eventId: "";
45
+ eventId: '';
38
46
  showSidebar: boolean;
39
47
  showReprocessButton: boolean;
40
48
  sidebarTitle: string;
@@ -56,7 +64,7 @@ export declare class EventControlBoardComponent implements OnInit, OnDestroy, On
56
64
  private readonly eventItem;
57
65
  private readonly inputFieldsPath;
58
66
  private readonly invoiceTypeTranslate;
59
- constructor(translate: LibTranslationService, formBuilder: FormBuilder, websocketService: WebsocketService, eventControlBoardService: EventControlBoardService, paginatorStorageService: PaginatorStorageService, messageService: MessageService, dialogService: DialogService);
67
+ constructor(translate: LibTranslationService, formBuilder: FormBuilder, websocketService: WebsocketService, paginatorStorageService: PaginatorStorageService, messageService: MessageService, dialogService: DialogService, eventControlService: EventControlService, eventControlItemService: EventControlItemService, transferService: TransferService, producerInvoiceService: ProducerInvoiceService, fixationService: FixationService);
60
68
  ngOnInit(): Promise<void>;
61
69
  ngOnChanges(changes: SimpleChanges): void;
62
70
  private updateCompanyAndBranchFormFields;
@@ -1,7 +1,6 @@
1
- export { EventControlBoardComponent } from "./event-control-board.component";
2
- export { EventControlBoardService } from "./service/event-control-board.service";
3
1
  export { SharedModule } from "./shared.module";
4
2
  export { EventControlBoardModule } from "./event-control-board.module";
3
+ export { EventControlBoardComponent } from "./event-control-board.component";
5
4
  export { EventStepsModule } from "../event-steps/index";
6
5
  export { FixationModule } from "./service/fixation-entity/fixation.module";
7
6
  export { E001pesModule } from "./service/e001pes/e001pes.module";
@@ -15,7 +14,6 @@ export { EventControlItemModule } from "./service/event-control-item/event-contr
15
14
  export { ExternalInvoiceModule } from "./service/external-invoice/external-invoice.module";
16
15
  export { InvoiceModule } from "./service/invoice/invoice.module";
17
16
  export { OriginationModule } from "./service/origination/origination.module";
18
- export { ProducerInvoiceModule } from "./service/producer-invoice/producer-invoice.module";
19
17
  export { RuralEstateModule } from "./service/rural-estate/rural-estate.module";
20
18
  export { TicketModule } from "./service/ticket/ticket.module";
21
19
  export { PaginatorStorageService } from "./service/paginator-storage.service";
@@ -1,6 +1,6 @@
1
- import { HttpParams, HttpClient } from "@angular/common/http";
2
- import { MessageService, SortMeta } from "primeng";
3
- import { LibTranslationService } from "../../../services/lib-translation.service";
1
+ import { HttpParams, HttpClient } from '@angular/common/http';
2
+ import { MessageService, SortMeta } from 'primeng';
3
+ import { LibTranslationService } from '../../../services/lib-translation.service';
4
4
  export declare class EntityService<T> {
5
5
  protected http: HttpClient;
6
6
  protected messageService: MessageService;
@@ -11,7 +11,7 @@ import { DocumentsToIssue } from "../../common/documentsToIssue";
11
11
  import { RuralEstateDto } from "../rural-estate/rural-estate-dto";
12
12
  import { TicketDto } from "../ticket/ticket-dto";
13
13
  import { ExternalInvoiceDto } from "../external-invoice/external-invoice-dto";
14
- import { ProducerInvoiceDto } from "../producer-invoice/producer-invoice-dto";
14
+ import { ProducerInvoiceDto } from "../../../../services/producer-invoice/producer-invoice-dto";
15
15
  import { ControlStatus } from "../../common/control-status";
16
16
  export interface OriginationDto {
17
17
  id?: string;
@@ -0,0 +1,6 @@
1
+ import { AbstractControl, ValidationErrors, Validator, ValidatorFn } from "@angular/forms";
2
+ export declare class ValidateTitleValueSelectedDirective implements Validator {
3
+ val: number;
4
+ validate(control: AbstractControl): ValidationErrors | null;
5
+ validateValuePaid(valuePaid: number): ValidatorFn;
6
+ }
@@ -0,0 +1,10 @@
1
+ import { StatusType, TypeAccount } from "./services/financial/enums";
2
+ export interface FinancialTitleOptions {
3
+ typeAccount: TypeAccount;
4
+ companyId?: string;
5
+ branchId?: string;
6
+ producerId?: string;
7
+ status?: StatusType;
8
+ titleId?: string;
9
+ numberTitle?: string;
10
+ }
@@ -0,0 +1,61 @@
1
+ import { AfterViewInit, EventEmitter, OnDestroy, OnInit, QueryList } from "@angular/core";
2
+ import { NgModel } from "@angular/forms";
3
+ import { BadgeColors, ButtonPriority, ButtonSize, FieldType } from "@seniorsistemas/angular-components";
4
+ import { LazyLoadEvent, MessageService, Table } from "primeng";
5
+ import { LibTranslationService } from "../../services/lib-translation.service";
6
+ import { FinancialTitleOptions } from "./financial-title-table-options.interface";
7
+ import { AgroFinancialService } from "./services/financial/agro-financial.service";
8
+ import { RecordTitleDto } from "./services/financial/intefaces";
9
+ interface ColumnConfig {
10
+ field: string;
11
+ header: string;
12
+ path: string[];
13
+ type: FieldType;
14
+ }
15
+ export declare class FinancialTitleTableComponent implements OnInit, AfterViewInit, OnDestroy {
16
+ private readonly translate;
17
+ private readonly financialService;
18
+ private readonly messageService;
19
+ table: Table;
20
+ models: QueryList<NgModel>;
21
+ options: FinancialTitleOptions;
22
+ selected: RecordTitleDto[];
23
+ selectionChange: EventEmitter<any[]>;
24
+ gridData: RecordTitleDto[];
25
+ gridTotalRecords: number;
26
+ tableInitialized: boolean;
27
+ showSidebar: boolean;
28
+ selectedRow: RecordTitleDto;
29
+ gridColumns: ColumnConfig[];
30
+ sidebarFields: any[];
31
+ currentListParams: any;
32
+ componentLoading: boolean;
33
+ ngUnsubscribe: EventEmitter<void>;
34
+ buttonSize: typeof ButtonSize;
35
+ buttonPriority: typeof ButtonPriority;
36
+ badgeColors: typeof BadgeColors;
37
+ constructor(translate: LibTranslationService, financialService: AgroFinancialService, messageService: MessageService);
38
+ ngOnInit(): void;
39
+ ngAfterViewInit(): void;
40
+ ngOnDestroy(): void;
41
+ getPageSize(): any;
42
+ getRowIndex(): number;
43
+ getSortField(): any;
44
+ getSortOrder(): any;
45
+ updateGrid(event: LazyLoadEvent): void;
46
+ initRowEdit(row: any): void;
47
+ cancelRowEdit(row: any): void;
48
+ synchronizeCheckboxAndEditableFieldState(): void;
49
+ onInputChange(event: any, row: any, field: string): void;
50
+ handleSelectionChange(rowData: any): void;
51
+ onSelectionChange(event: any): void;
52
+ onUnselect(event: any): void;
53
+ showDetails(rowData: any): void;
54
+ closeDetails(): void;
55
+ isLastColumn(index: number, columns: any[]): boolean;
56
+ getStyleColumns(field: string): any;
57
+ getProp(obj: any, col: any): any;
58
+ getFields(field: string, header: string, path: string[], type: FieldType): any;
59
+ private addMessage;
60
+ }
61
+ export {};
@@ -0,0 +1,2 @@
1
+ export declare class FinancialTitleTableModule {
2
+ }
@@ -0,0 +1,4 @@
1
+ export { FinancialTitleTableComponent } from "./financial-title-table.component";
2
+ export { FinancialTitleTableModule } from "./financial-title-table.module";
3
+ export { FinancialTitleOptions } from "./financial-title-table-options.interface";
4
+ export { AgroFinancialModule, AgroFinancialService } from "./services/financial/index";
@@ -0,0 +1,2 @@
1
+ export declare class AgroFinancialModule {
2
+ }
@@ -0,0 +1,23 @@
1
+ import { HttpClient } from "@angular/common/http";
2
+ import { MessageService } from "primeng/api";
3
+ import { Observable } from "rxjs";
4
+ import { AgroEntityService } from "../../../../services/entity-service";
5
+ import { LibTranslationService } from "../../../../services/lib-translation.service";
6
+ import { FinancialQueryDataResponse, RequestListTitlesInput, TitleDto } from "./intefaces";
7
+ export declare class AgroFinancialService extends AgroEntityService<TitleDto> {
8
+ protected http: HttpClient;
9
+ protected messageService: MessageService;
10
+ protected translate: LibTranslationService;
11
+ private readonly pooling;
12
+ constructor(http: HttpClient, messageService: MessageService, translate: LibTranslationService);
13
+ listTitles(input: RequestListTitlesInput): Observable<FinancialQueryDataResponse>;
14
+ private requestListTitles;
15
+ private getListTitlesResponse;
16
+ /**
17
+ * Realiza o polling para obter o resultado da listagem de títulos financeiros
18
+ *
19
+ * @param requestId Id da requisição utlizada na busca pelo resultado
20
+ * @returns
21
+ */
22
+ private pollListTitlesResult;
23
+ }
@@ -0,0 +1,27 @@
1
+ export declare enum TypeAccount {
2
+ PAYABLE = "PAYABLE",
3
+ RECEIVABLE = "RECEIVABLE"
4
+ }
5
+ export declare enum StatusType {
6
+ OPEN = "OPEN",
7
+ PAID = "PAID",
8
+ CANCELLED = "CANCELLED"
9
+ }
10
+ export declare enum TitleFieldsOrderBy {
11
+ NUMBER_TITLE = "NUMBER_TITLE",
12
+ ISSUE_DATE = "ISSUE_DATE",
13
+ DUE_DATE = "DUE_DATE",
14
+ ORIGINAL_VALUE = "ORIGINAL_VALUE",
15
+ OPEN_VALUE = "OPEN_VALUE",
16
+ NET_VALUE = "NET_VALUE",
17
+ STATUS = "STATUS"
18
+ }
19
+ export declare enum OrderByType {
20
+ ASC = "ASC",
21
+ DESC = "DESC"
22
+ }
23
+ export declare enum QueryStatus {
24
+ PENDING = "PENDING",
25
+ FINISHED = "FINISHED",
26
+ FAILED = "FAILED"
27
+ }
@@ -0,0 +1,2 @@
1
+ export { AgroFinancialService } from "./agro-financial.service";
2
+ export { AgroFinancialModule } from "./agro-financial.module";
@@ -0,0 +1,104 @@
1
+ import { OrderByType, QueryStatus, StatusType, TitleFieldsOrderBy, TypeAccount } from "./enums";
2
+ export interface RecordTitleDto {
3
+ id?: string;
4
+ company: RecGenericDto;
5
+ branch: RecGenericDto;
6
+ producer: RecGenericDto;
7
+ numberTitle: string;
8
+ titleType?: RecGenericDto;
9
+ typeAccount: TypeAccount;
10
+ values: RecTitleValuesDto;
11
+ issueDate?: string;
12
+ dueDate?: string;
13
+ status: StatusType;
14
+ valuePaid?: number;
15
+ }
16
+ export interface RecGenericDto {
17
+ id?: string;
18
+ cod?: string;
19
+ desc?: string;
20
+ }
21
+ export interface RecTitleValuesDto {
22
+ originalValue: number;
23
+ openValue: number;
24
+ discountValue: number;
25
+ otherDiscountValue: number;
26
+ interestValue: number;
27
+ fineValue: number;
28
+ otherAdditionValue: number;
29
+ chargeValue: number;
30
+ monetaryCorrectionValue: number;
31
+ netValue: number;
32
+ withheldTaxValue?: number;
33
+ }
34
+ export interface RequestListTitlesInput {
35
+ pageRequest: RecPageRequest;
36
+ filter: FilterTitle;
37
+ }
38
+ export interface RequestListTitlesOutput {
39
+ requestId: string;
40
+ }
41
+ export interface GetListTitlesResponseInput {
42
+ requestId: string;
43
+ }
44
+ export interface GetListTitlesResponseOutput {
45
+ result: FinancialQueryDataResponse;
46
+ status: QueryStatus;
47
+ message?: string;
48
+ }
49
+ export interface FinancialQueryDataResponse {
50
+ titles: RecordTitleDto[];
51
+ totalElements: number;
52
+ message?: string;
53
+ status: QueryStatus;
54
+ queryId?: string;
55
+ }
56
+ export interface RecPageRequest {
57
+ offset?: number;
58
+ size?: number;
59
+ orderBy?: RecOrderBy;
60
+ }
61
+ export interface RecOrderBy {
62
+ field: TitleFieldsOrderBy;
63
+ order: OrderByType;
64
+ }
65
+ export interface FilterTitle {
66
+ typeAccount: TypeAccount;
67
+ companyId?: string;
68
+ branchId?: string;
69
+ producerId?: string;
70
+ status?: StatusType;
71
+ titleId?: string;
72
+ numberTitle?: string;
73
+ }
74
+ export interface TitleDto {
75
+ id?: string;
76
+ seq: number;
77
+ company: any;
78
+ branch: any;
79
+ producer: any;
80
+ numberTitle: string;
81
+ origin: any;
82
+ application: any;
83
+ typeAccount: any;
84
+ integrationStatus?: any;
85
+ integrationType?: any;
86
+ status: any;
87
+ issueDate?: string;
88
+ dueDate?: string;
89
+ originalValue: number;
90
+ openValue: number;
91
+ observation: string;
92
+ typeId: string;
93
+ groupId: string;
94
+ transactionId: string;
95
+ externalId: string;
96
+ integrationMessage?: string;
97
+ eventControlItemId?: string;
98
+ integrationBatchId?: string;
99
+ createdBy?: string;
100
+ createdDate?: Date;
101
+ lastModifiedBy?: string;
102
+ lastModifiedDate?: Date;
103
+ custom?: any;
104
+ }
@@ -1,3 +1,5 @@
1
1
  export * from "./event-control-board/index";
2
2
  export * from "./event-steps/index";
3
3
  export * from "./cancel-event-dialog/index";
4
+ export * from "./modal-invoice-pj/index";
5
+ export * from "./financial-title-table/index";
@@ -0,0 +1,5 @@
1
+ import { ModalInvoicePjOptions } from "../modal-invoice-pj-options.interface";
2
+ export interface ModalInvoicePjForFixationOptions extends ModalInvoicePjOptions {
3
+ fixationId: string;
4
+ fixationItems: any[];
5
+ }
@@ -0,0 +1,35 @@
1
+ import { EventEmitter, OnDestroy, OnInit } from '@angular/core';
2
+ import { IInvoiceLookupResponse } from '../services/agro-invoice/interfaces';
3
+ import { LibTranslationService } from '../../../services/lib-translation.service';
4
+ import { AgroInvoiceService } from '../services/agro-invoice';
5
+ import { Column, LocaleService } from '@seniorsistemas/angular-components';
6
+ import { KilogramPipe } from '../../../pipe/kilogram';
7
+ import { CurrencyPipe } from '@angular/common';
8
+ import { ModalInvoicePjBase } from '../modal-invoice-pj-base.class';
9
+ import { ModalInvoicePjForFixationOptions } from './modal-fixation-options.interface';
10
+ import { ProducerInvoiceService } from '../../../services/producer-invoice/producer-invoice.service';
11
+ import { MessageService } from 'primeng';
12
+ export declare class ModalInvoicePjForFixationComponent extends ModalInvoicePjBase implements OnInit, OnDestroy {
13
+ readonly translationService: LibTranslationService;
14
+ readonly invoiceService: AgroInvoiceService;
15
+ readonly localeService: LocaleService;
16
+ readonly kilogramPipe: KilogramPipe;
17
+ readonly currencyPipe: CurrencyPipe;
18
+ readonly producerInvoiceService: ProducerInvoiceService;
19
+ readonly messageService: MessageService;
20
+ options: ModalInvoicePjForFixationOptions;
21
+ whenSelectInvoices: EventEmitter<any[]>;
22
+ gridColumns: Partial<Column & {
23
+ sortable?: boolean;
24
+ }>[];
25
+ constructor(translationService: LibTranslationService, invoiceService: AgroInvoiceService, localeService: LocaleService, kilogramPipe: KilogramPipe, currencyPipe: CurrencyPipe, producerInvoiceService: ProducerInvoiceService, messageService: MessageService);
26
+ ngOnInit(): void;
27
+ defineGridColumns(): void;
28
+ beforeAdd(selectedInvoices: any[]): Promise<any>;
29
+ open(): void;
30
+ linkSelectedInvoicesInFixationItem(): Promise<void>;
31
+ isValidAndSetLinkedValueInInvoices(): Promise<boolean>;
32
+ adaptResult(result: IInvoiceLookupResponse): Promise<any>;
33
+ cancel(): Promise<void>;
34
+ updateLinkedValueInGrid(rows: number): Promise<void>;
35
+ }
@@ -0,0 +1,2 @@
1
+ export declare class ModalInvoicePjForFixationModule {
2
+ }
@@ -0,0 +1,26 @@
1
+ import { EventEmitter, OnDestroy, OnInit } from '@angular/core';
2
+ import { ModalInvoicePjOptions } from '../modal-invoice-pj-options.interface';
3
+ import { Column, LocaleService } from '@seniorsistemas/angular-components';
4
+ import { ModalInvoicePjBase } from '../modal-invoice-pj-base.class';
5
+ import { IInvoiceLookupResponse } from '../services/agro-invoice/interfaces';
6
+ import { KilogramPipe } from '../../../pipe/kilogram';
7
+ import { LibTranslationService } from '../../../services/lib-translation.service';
8
+ import { AgroInvoiceService } from '../services/agro-invoice';
9
+ import { MessageService } from 'primeng';
10
+ export declare class ModalInvoicePjForOriginationComponent extends ModalInvoicePjBase implements OnInit, OnDestroy {
11
+ translate: LibTranslationService;
12
+ invoiceService: AgroInvoiceService;
13
+ localeService: LocaleService;
14
+ kilogramPipe: KilogramPipe;
15
+ messageService: MessageService;
16
+ options: ModalInvoicePjOptions;
17
+ whenSelectInvoices: EventEmitter<any[]>;
18
+ gridColumns: Partial<Column & {
19
+ sortable?: boolean;
20
+ }>[];
21
+ constructor(translate: LibTranslationService, invoiceService: AgroInvoiceService, localeService: LocaleService, kilogramPipe: KilogramPipe, messageService: MessageService);
22
+ ngOnInit(): void;
23
+ defineGridColumns(): void;
24
+ beforeAdd(selectedInvoices: any): Promise<any>;
25
+ adaptResult(result: IInvoiceLookupResponse): Promise<any>;
26
+ }
@@ -0,0 +1,2 @@
1
+ export declare class ModalInvoicePjForOriginationModule {
2
+ }
@@ -0,0 +1,26 @@
1
+ import { EventEmitter, OnDestroy, OnInit } from '@angular/core';
2
+ import { ModalInvoicePjOptions } from '../modal-invoice-pj-options.interface';
3
+ import { Column, LocaleService } from '@seniorsistemas/angular-components';
4
+ import { ModalInvoicePjBase } from '../modal-invoice-pj-base.class';
5
+ import { IInvoiceLookupResponse } from '../services/agro-invoice/interfaces';
6
+ import { KilogramPipe } from '../../../pipe/kilogram';
7
+ import { LibTranslationService } from '../../../services/lib-translation.service';
8
+ import { AgroInvoiceService } from '../services/agro-invoice';
9
+ import { MessageService } from 'primeng';
10
+ export declare class ModalInvoicePjForTransferComponent extends ModalInvoicePjBase implements OnInit, OnDestroy {
11
+ translate: LibTranslationService;
12
+ invoiceService: AgroInvoiceService;
13
+ localeService: LocaleService;
14
+ kilogramPipe: KilogramPipe;
15
+ messageService: MessageService;
16
+ options: ModalInvoicePjOptions;
17
+ whenSelectInvoices: EventEmitter<any[]>;
18
+ gridColumns: Partial<Column & {
19
+ sortable?: boolean;
20
+ }>[];
21
+ constructor(translate: LibTranslationService, invoiceService: AgroInvoiceService, localeService: LocaleService, kilogramPipe: KilogramPipe, messageService: MessageService);
22
+ ngOnInit(): void;
23
+ defineGridColumns(): void;
24
+ beforeAdd(selectedInvoices: any): Promise<any>;
25
+ adaptResult(result: IInvoiceLookupResponse): Promise<any>;
26
+ }
@@ -0,0 +1,2 @@
1
+ export declare class ModalInvoicePjForTransferModule {
2
+ }
@@ -0,0 +1,9 @@
1
+ export { ModalInvoicePjForOriginationComponent } from './for-origination/modal-invoice-pj-for-origination.component';
2
+ export { ModalInvoicePjForOriginationModule } from './for-origination/modal-invoice-pj-for-origination.module';
3
+ export { ModalInvoicePjForTransferComponent } from './for-transfer/modal-invoice-pj-for-transfer.component';
4
+ export { ModalInvoicePjForTransferModule } from './for-transfer/modal-invoice-pj-for-transfer.module';
5
+ export { ModalInvoicePjForFixationComponent } from './for-fixation/modal-invoice-pj-for-fixation.component';
6
+ export { ModalInvoicePjForFixationModule } from './for-fixation/modal-invoice-pj-for-fixation.module';
7
+ export { ModalInvoicePjOptions } from './modal-invoice-pj-options.interface';
8
+ export { ModalInvoicePjForFixationOptions } from './for-fixation/modal-fixation-options.interface';
9
+ export { AgroInvoiceModule, AgroInvoiceService } from './services/agro-invoice/index';
@@ -0,0 +1,53 @@
1
+ import { EventEmitter } from '@angular/core';
2
+ import { LazyLoadEvent, MessageService } from 'primeng';
3
+ import { Subject } from 'rxjs';
4
+ import { FormControl } from '@angular/forms';
5
+ import { ListParams } from '../../services/entity-service';
6
+ import { AgroInvoiceService } from './services/agro-invoice/agro-invoice.service';
7
+ import { ModalInvoicePjOptions } from './modal-invoice-pj-options.interface';
8
+ import { ButtonPriority, Column, LocaleService } from '@seniorsistemas/angular-components';
9
+ import { LibTranslationService } from '../../services/lib-translation.service';
10
+ import { IInvoiceLookupResponse } from './services/agro-invoice/interfaces';
11
+ import { KilogramPipe } from '../../pipe/kilogram';
12
+ export declare abstract class ModalInvoicePjBase {
13
+ protected readonly translate: LibTranslationService;
14
+ protected readonly invoiceService: AgroInvoiceService;
15
+ protected readonly localeService: LocaleService;
16
+ protected readonly kilogramPipe: KilogramPipe;
17
+ protected readonly messageService: MessageService;
18
+ abstract options: ModalInvoicePjOptions;
19
+ abstract whenSelectInvoices: EventEmitter<any[]>;
20
+ abstract gridColumns: Partial<Column & {
21
+ sortable?: boolean;
22
+ }>[];
23
+ gridData: any[];
24
+ buttonPriority: typeof ButtonPriority;
25
+ dontHaveAnyInvoice: boolean;
26
+ gridLoading: boolean;
27
+ gridTotalRecords: number;
28
+ selected: any[];
29
+ unselectedIds: Set<number>;
30
+ visible: boolean;
31
+ searchValue: FormControl;
32
+ protected readonly ngUnsubscribe: Subject<unknown>;
33
+ protected currentParams: ListParams;
34
+ gridFieldValuesMap: {
35
+ [key: string]: (row: any) => any;
36
+ };
37
+ constructor(translate: LibTranslationService, invoiceService: AgroInvoiceService, localeService: LocaleService, kilogramPipe: KilogramPipe, messageService: MessageService);
38
+ ngOnDestroy(): void;
39
+ ngOnInit(): void;
40
+ abstract adaptResult(result: IInvoiceLookupResponse): Promise<any>;
41
+ abstract beforeAdd(selectedInvoices: any): Promise<any>;
42
+ protected whenSearchValueChanges(): void;
43
+ tryToSearchAgain(): void;
44
+ open(): void;
45
+ protected checkIfOptionsIsValid(): boolean;
46
+ private getPagination;
47
+ updateCurrentParams(event: LazyLoadEvent): void;
48
+ updateGridData(event: LazyLoadEvent, searchValue?: string): void;
49
+ cancelPooling(): void;
50
+ add(): Promise<void>;
51
+ protected resetSpecs(): void;
52
+ cancel(): Promise<void>;
53
+ }
@@ -0,0 +1,10 @@
1
+ export interface ModalInvoicePjOptions {
2
+ companyId: string;
3
+ branchId: string;
4
+ producersIds: string[];
5
+ productId: string;
6
+ ruralEstateIds: string[];
7
+ recordStatus?: string;
8
+ issuanceDate?: Date;
9
+ invoiceStatus?: string;
10
+ }
@@ -0,0 +1,5 @@
1
+ import { CommonModule, CurrencyPipe, DatePipe, DecimalPipe } from '@angular/common';
2
+ import { LocalizedDatePipe } from '@seniorsistemas/angular-components';
3
+ import { KilogramPipe } from '../../pipe/kilogram';
4
+ export declare const imports: (typeof CommonModule | import("@angular/compiler/src/core").ModuleWithProviders)[];
5
+ export declare const providers: (typeof KilogramPipe | typeof LocalizedDatePipe | typeof DecimalPipe | typeof DatePipe | typeof CurrencyPipe)[];
@@ -0,0 +1,2 @@
1
+ export declare class AgroInvoiceModule {
2
+ }