@tesouro/embedded-components-react 0.5.213 → 0.5.215

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 (278) hide show
  1. package/dist/index.d.ts +88 -1
  2. package/dist/index.js +2 -2
  3. package/dist/lib/BillPayWidget.js +1 -1
  4. package/dist/lib/ReceivablesWidget.d.ts +88 -1
  5. package/dist/lib/ReceivablesWidget.js +1 -1
  6. package/dist/libs/shared/util-validation/dist/index5.js +7 -0
  7. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-upload/data-access/dist/index.js +3 -0
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{data-access/dist/index38.js → bill-upload/data-access/dist/index2.js} +7 -6
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-upload/data-access/dist/index3.js +33 -0
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{data-access/dist/index35.js → bill-upload/data-access/dist/index4.js} +6 -7
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-upload/feature/dist/index.js +7 -0
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-upload/feature/dist/index2.js +8 -0
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-upload/feature/dist/index3.js +13 -0
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-upload/feature/dist/index4.js +133 -0
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-upload/feature/dist/index5.js +3 -0
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-upload/feature/dist/index6.js +5 -0
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-upload/feature/dist/index7.js +4 -0
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-upload/feature/dist/index8.js +56 -0
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-upload/feature/dist/index9.js +1 -0
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-upload/ui/dist/index.js +4 -0
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-upload/ui/dist/index2.js +10 -0
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-upload/ui/dist/index3.js +9 -0
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-upload/ui/dist/index4.js +93 -0
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-upload/ui/dist/index6.js +2 -0
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index.js +29 -33
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/invalidation.js +11 -0
  27. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index6.js → lib/invalidatePayableQueries/approvalDecisionQueries.js} +8 -8
  28. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index7.js → lib/invalidatePayableQueries/approvalRequestWatch.js} +5 -5
  29. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index3.js → lib/invalidatePayableQueries/cleanUpDeletedPayableQueries.js} +4 -4
  30. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index9.js → lib/invalidatePayableQueries/hasLiveScheduledRecord.js} +5 -5
  31. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/lib/invalidatePayableQueries/index.js +6 -0
  32. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index8.js → lib/invalidatePayableQueries/invalidateDeletedPayableQueries.js} +5 -5
  33. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index4.js → lib/invalidatePayableQueries/invalidatePayableQueries.js} +5 -5
  34. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index5.js → lib/invalidatePayableQueries/payableProjectionPolling.js} +1 -1
  35. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index10.js → lib/invalidatePayableQueries/reconcileCancelledPaymentQueries.js} +7 -7
  36. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index12.js → lib/invalidatePayableQueries/reconcileSubmittedForApprovalQueries.js} +3 -3
  37. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index13.js → lib/payableOcrQueryOptions.js} +4 -4
  38. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index40.js → lib/payablePolicyAssignmentQueryOptions.js} +4 -4
  39. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index2.js → lib/queryKeys.js} +4 -4
  40. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index21.js → lib/useApplyDuplicateVerdictsMutation.js} +23 -25
  41. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index16.js → lib/usePayableApprovalRequests.js} +11 -11
  42. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index17.js → lib/usePayableHistoryQuery.js} +6 -6
  43. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index18.js → lib/usePayableLineItems.js} +10 -10
  44. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/lib/usePayableMutations/index.js +12 -0
  45. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index22.js → lib/usePayableMutations/useAttachPayableFileMutation.js} +7 -7
  46. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index23.js → lib/usePayableMutations/useCancelPayableMutation.js} +7 -7
  47. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/lib/usePayableMutations/useCancelScheduledPaymentMutation.js +40 -0
  48. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/lib/usePayableMutations/useCreatePayableMutation.js +34 -0
  49. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/lib/usePayableMutations/useDeletePayableFileMutation.js +34 -0
  50. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/lib/usePayableMutations/useDeletePayableMutation.js +34 -0
  51. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index28.js → lib/usePayableMutations/useForceApprovePayableMutation.js} +7 -7
  52. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index29.js → lib/usePayableMutations/useForceRejectPayableMutation.js} +7 -7
  53. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index32.js → lib/usePayableMutations/useReopenPayableMutation.js} +7 -7
  54. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index33.js → lib/usePayableMutations/useSubmitPayableForApprovalMutation.js} +9 -9
  55. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index34.js → lib/usePayableMutations/useUpdatePayableMutation.js} +7 -7
  56. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index36.js → lib/usePayableMutations/useValidatePayableMutation.js} +5 -5
  57. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index19.js → lib/usePayablePaymentRecordsQuery.js} +8 -8
  58. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index47.js → lib/usePayableSuggestionsQuery.js} +7 -7
  59. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/lib/usePayablesQueries/index.js +6 -0
  60. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index39.js → lib/usePayablesQueries/useFirstPayablesPagesQuery.js} +8 -8
  61. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index41.js → lib/usePayablesQueries/usePayableQuery.js} +8 -8
  62. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index42.js → lib/usePayablesQueries/usePayablesByIdsQueries.js} +6 -6
  63. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index43.js → lib/usePayablesQueries/usePayablesCountQueries.js} +7 -7
  64. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index44.js → lib/usePayablesQueries/usePayablesQuery.js} +7 -7
  65. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/lib/usePayablesQueries/usePayablesTotalCountQuery.js +29 -0
  66. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +11 -23
  67. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index10.js +11 -5
  68. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index11.js +12 -13
  69. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index12.js +66 -23
  70. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index13.js +9 -62
  71. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index14.js +29 -2
  72. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index15.js +160 -82
  73. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index16.js +26 -5
  74. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index17.js +22 -31
  75. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index18.js +38 -35
  76. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index19.js +92 -164
  77. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index20.js +82 -45
  78. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index21.js +6 -1
  79. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index22.js +44 -47
  80. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index23.js +112 -12
  81. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index24.js +184 -8
  82. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index25.js +72 -9
  83. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index26.js +31 -65
  84. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index27.js +89 -10
  85. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index28.js +401 -15
  86. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index29.js +12 -161
  87. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index30.js +83 -24
  88. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index31.js +79 -22
  89. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index32.js +222 -30
  90. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index33.js +38 -93
  91. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index34.js +247 -79
  92. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index35.js +23 -4
  93. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index36.js +612 -45
  94. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index37.js +4 -116
  95. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index38.js +27 -179
  96. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index39.js +232 -70
  97. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index4.js +15 -38
  98. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index40.js +3 -35
  99. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index41.js +3 -90
  100. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index42.js +36 -405
  101. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +1 -16
  102. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js +23 -83
  103. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index45.js +3 -80
  104. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +124 -228
  105. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +8 -43
  106. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +6 -251
  107. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js +81 -22
  108. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index5.js +38 -6
  109. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index50.js +20 -625
  110. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +22 -4
  111. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +28 -42
  112. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +82 -256
  113. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +50 -3
  114. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +260 -3
  115. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +27 -38
  116. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +396 -1
  117. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +332 -6
  118. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +4 -13
  119. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index6.js +217 -16
  120. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +5 -130
  121. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js +107 -2
  122. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index62.js +1 -6
  123. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js +24 -129
  124. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index7.js +84 -14
  125. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index8.js +46 -37
  126. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index9.js +12 -223
  127. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/data-access/dist/index.js +4 -0
  128. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{data-access/dist/index30.js → pay-bill/data-access/dist/index2.js} +7 -7
  129. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/data-access/dist/index3.js +7 -0
  130. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{data-access/dist/index11.js → pay-bill/data-access/dist/index4.js} +5 -4
  131. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{data-access/dist/index20.js → pay-bill/data-access/dist/index5.js} +8 -8
  132. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/feature/dist/index.js +3 -0
  133. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/feature/dist/index10.js +179 -0
  134. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/feature/dist/index11.js +51 -0
  135. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/feature/dist/index12.js +1 -0
  136. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/feature/dist/index13.js +5 -0
  137. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/feature/dist/index14.js +73 -0
  138. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/feature/dist/index15.js +1 -0
  139. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/feature/dist/index2.js +18 -0
  140. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/feature/dist/index3.js +26 -0
  141. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/feature/dist/index4.js +72 -0
  142. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/feature/dist/index5.js +2 -0
  143. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/feature/dist/index6.js +9 -0
  144. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/feature/dist/index7.js +7 -0
  145. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/feature/dist/index8.js +35 -0
  146. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/feature/dist/index9.js +41 -0
  147. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index.js +10 -0
  148. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{ui/dist/index108.js → pay-bill/ui/dist/index10.js} +4 -4
  149. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index11.js +2 -0
  150. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{ui/dist/index103.js → pay-bill/ui/dist/index2.js} +2 -2
  151. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{ui/dist/index104.js → pay-bill/ui/dist/index3.js} +3 -3
  152. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index4.js +2 -0
  153. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index5.js +13 -0
  154. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{ui/dist/index101.js → pay-bill/ui/dist/index6.js} +5 -5
  155. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index7.js +2 -0
  156. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{ui/dist/index106.js → pay-bill/ui/dist/index8.js} +2 -2
  157. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{ui/dist/index107.js → pay-bill/ui/dist/index9.js} +1 -1
  158. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +10 -22
  159. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index100.js +2 -12
  160. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index89.js +3 -6
  161. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index90.js +28 -7
  162. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index91.js +2 -93
  163. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index92.js +7 -0
  164. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index93.js +34 -2
  165. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index94.js +2 -7
  166. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index95.js +12 -28
  167. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index96.js +108 -2
  168. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index97.js +2 -7
  169. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index98.js +8 -32
  170. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index99.js +52 -2
  171. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/util/dist/lib/duplicateVerdict.js +7 -0
  172. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/util/dist/lib/groupDuplicates.js +40 -0
  173. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/util/dist/lib/payableRemoval.js +8 -0
  174. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index.js +7 -7
  175. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index10.js +63 -67
  176. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index11.js +160 -1
  177. package/dist/libs/tesouro-embedded-components-react/{bill-pay-widget/data-access/dist/index31.js → invoicing-widget/data-access/dist/index12.js} +0 -2
  178. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index2.js +32 -25
  179. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index6.js +25 -200
  180. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index7.js +175 -1
  181. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index8.js +1 -101
  182. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index9.js +92 -71
  183. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index.js +1 -1
  184. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index10.js +44 -100
  185. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index11.js +93 -421
  186. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index12.js +442 -112
  187. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index13.js +166 -157
  188. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index14.js +150 -204
  189. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index15.js +202 -31
  190. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index16.js +32 -145
  191. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index17.js +145 -37
  192. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index18.js +44 -58
  193. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index19.js +113 -87
  194. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index20.js +58 -116
  195. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index21.js +83 -357
  196. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index22.js +111 -65
  197. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index23.js +449 -99
  198. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index24.js +68 -281
  199. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index25.js +115 -0
  200. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index26.js +314 -0
  201. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index5.js +1 -1
  202. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index6.js +34 -23
  203. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index8.js +444 -92
  204. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index9.js +113 -52
  205. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index.js +18 -14
  206. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index10.js +2 -92
  207. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index11.js +95 -3
  208. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index12.js +3 -24
  209. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index13.js +24 -1
  210. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index14.js +1 -3
  211. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index15.js +1 -1
  212. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index16.js +3 -18
  213. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index17.js +18 -1
  214. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index18.js +0 -3
  215. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index19.js +0 -8
  216. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index20.js +11 -0
  217. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index21.js +1 -264
  218. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index22.js +258 -42
  219. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index23.js +38 -62
  220. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index24.js +61 -463
  221. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index25.js +457 -89
  222. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index26.js +91 -234
  223. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index27.js +89 -82
  224. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index28.js +22 -338
  225. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index29.js +236 -0
  226. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index3.js +26 -204
  227. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index30.js +3 -0
  228. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index31.js +249 -0
  229. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index32.js +93 -0
  230. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index33.js +344 -0
  231. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index4.js +208 -32
  232. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index5.js +29 -202
  233. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index6.js +183 -137
  234. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index7.js +157 -12
  235. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index8.js +10 -19
  236. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index9.js +23 -2
  237. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +40 -40
  238. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js +167 -156
  239. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +66 -34
  240. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  241. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index8.js +1 -1
  242. package/dist/packages/shared-ui-shadcn/dist/index.js +13 -13
  243. package/package.json +1 -1
  244. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index14.js +0 -32
  245. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index15.js +0 -8
  246. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index24.js +0 -40
  247. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index25.js +0 -34
  248. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index26.js +0 -34
  249. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index27.js +0 -34
  250. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index37.js +0 -15
  251. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index45.js +0 -29
  252. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index46.js +0 -6
  253. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +0 -11
  254. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js +0 -10
  255. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.js +0 -84
  256. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index67.js +0 -24
  257. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index68.js +0 -22
  258. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index69.js +0 -31
  259. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index70.js +0 -86
  260. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index71.js +0 -50
  261. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index72.js +0 -262
  262. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index73.js +0 -35
  263. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index74.js +0 -395
  264. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index75.js +0 -310
  265. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index76.js +0 -4
  266. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index77.js +0 -7
  267. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index78.js +0 -114
  268. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index79.js +0 -1
  269. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index80.js +0 -27
  270. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index102.js +0 -2
  271. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index105.js +0 -2
  272. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index109.js +0 -2
  273. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index110.js +0 -14
  274. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index111.js +0 -108
  275. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index112.js +0 -2
  276. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index113.js +0 -10
  277. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index114.js +0 -52
  278. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index115.js +0 -2
@@ -1,115 +1,445 @@
1
+ import { minorExponentForCurrency as e } from "../../../shared/util/dist/lib/amountOutputToMajorUnits.js";
2
+ import { parseDateOrTimestamp as t } from "../../../shared/util/dist/lib/parseCalendarDate.js";
3
+ import { createLineItem as n, isBlankLineItem as r, keepsSavedTaxRates as i, lineItemToCreatePayload as a, lineItemToUpdatePayload as o, responseLineItemToFormValues as s, summarizeLineItemErrors as c, taxRateFromLineItems as l, validateLineItems as u } from "./index6.js";
4
+ import { attachmentFormValuesToPayload as d, receivableToAttachmentFormValues as f } from "./index7.js";
5
+ import { createEmptyRecurrenceFields as p } from "./index8.js";
6
+ import { buildPaymentTermsPayload as m, buildPaymentTermsUpdatePayload as h, paymentTermsToFormFields as g } from "./index9.js";
7
+ import { createEmptyDiscount as _, discountFromDraft as v, discountToDraft as y } from "./index10.js";
8
+ import { validateDiscount as b, validateInvoiceTotals as x } from "./index11.js";
1
9
  //#region ../../libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index12.js
2
- var e = {
3
- customerRequired: "Customer is required",
4
- customerAddressRequired: "The selected customer needs a billing address before a receivable can be created.",
5
- currencyRequired: "Currency is required",
6
- lineItemNameTooLong: "Product name must be 100 characters or less",
7
- lineItemPriceTooHigh: "Price must be {maxAmount} or less",
8
- discountPercentageTooHigh: "Discount % cannot exceed 100%",
9
- discountExceedsSubtotal: "Discount amount cannot exceed subtotal",
10
- invoiceSubtotalTooHigh: "Invoice subtotal must be {maxAmount} or less",
11
- invoiceTotalTooHigh: "Invoice total must be {maxAmount} or less",
12
- sendToRequired: "Enter at least one recipient",
13
- sendSubjectRequired: "Subject is required",
14
- sendBodyRequired: "Message is required",
15
- paymentAmountInvalid: "Amount paid must be greater than 0",
16
- genericError: "Something went wrong. Please try again.",
17
- lineItemsLoading: "Please wait for invoice details to finish loading.",
18
- paymentTermsCustomDatePlaceholder: "Mon DD, YYYY",
19
- bankAccountFallbackName: "Bank Account",
20
- bankAccountPoweredBy: "Powered by {embeddedBankName}",
21
- bankAccountLinked: "Linked account",
22
- bankAccountHolderNameRequired: "Account holder name is required",
23
- bankAccountHolderNameTooLong: "Account holder name must be 255 characters or less",
24
- bankAccountNumberRequired: "Account number is required",
25
- bankAccountNumberDigitsOnly: "Account number must contain only digits",
26
- bankAccountNumberTooShort: "Account number must be at least 4 digits",
27
- bankAccountNumberTooLong: "Account number must be at most 17 digits",
28
- bankAccountRoutingNumberRequired: "Routing number is required",
29
- bankAccountRoutingNumberInvalid: "Routing number must be 9 digits",
30
- bankAccountNicknameTooLong: "Display name must be 200 characters or less",
31
- bankAccountCreated: "Bank Account \"{name}\" has been created.",
32
- bankAccountCreateFailed: "Failed to create Bank Account.",
33
- untitledDocument: "Untitled document",
34
- unknownCustomer: "Unknown customer",
35
- notAvailable: "Not available",
36
- invoiceType: "Invoice",
37
- quoteType: "Quote",
38
- creditNoteType: "Credit note",
39
- summaryDocumentType: "Document type",
40
- summaryDocumentNumber: "Document number",
41
- summaryCustomer: "Customer",
42
- summaryIssued: "Issued",
43
- summaryDue: "Due",
44
- summaryCreated: "Created",
45
- summaryUpdated: "Updated",
46
- summaryTotal: "Total",
47
- summaryAmountDue: "Amount due",
48
- activityStatusChanged: "Status changed",
49
- activityReceivableCreated: "Receivable created",
50
- activityReceivableUpdated: "Receivable updated",
51
- activityPaymentReceived: "Payment received",
52
- activityMailSent: "Email sent",
53
- activityUnknown: "Activity",
54
- recipientsNone: "No recipients",
55
- sendSubjectDefault: "Your receivable document",
56
- sendBodyDefault: "Please find the receivable document attached.",
57
- issueTitle: "Issue receivable?",
58
- issueDescription: "Issuing locks the document and makes it ready to send to the customer.",
59
- issueConfirm: "Issue",
60
- acceptTitle: "Accept quote?",
61
- acceptDescription: "This marks the quote as accepted.",
62
- acceptConfirm: "Accept",
63
- declineTitle: "Decline quote?",
64
- declineDescription: "This marks the quote as declined.",
65
- declineConfirm: "Decline",
66
- cancelTitle: "Cancel receivable?",
67
- cancelDescription: "This cancels the document. You cannot undo this action.",
68
- cancelConfirm: "Cancel document",
69
- cloneTitle: "Clone receivable?",
70
- cloneDescription: "This creates a new draft based on the selected document.",
71
- cloneConfirm: "Clone",
72
- deleteTitle: "Delete draft?",
73
- deleteDescription: "This permanently deletes the draft document. You cannot undo this action.",
74
- deleteConfirm: "Delete",
75
- markPaidTitle: "Mark invoice as paid?",
76
- markPaidDescription: "This records the invoice as fully paid.",
77
- markPaidConfirm: "Mark paid",
78
- markUncollectibleTitle: "Mark invoice uncollectible?",
79
- markUncollectibleDescription: "This records the invoice as uncollectible. You cannot undo this action.",
80
- markUncollectibleConfirm: "Mark uncollectible",
81
- attachmentsEmailCaption: "Selected files will be attached to the invoice email sent to the customer.",
82
- attachmentsRecurringEmailCaption: "Selected files will be attached to every invoice email in the recurring series.",
83
- attachmentIncludeInEmail: "Include in email:",
84
- attachmentRemove: "Remove",
85
- attachmentUploading: "Uploading…",
86
- attachmentUploadFailed: "Upload failed. Please try again.",
87
- attachmentTooLarge: "File too large (max 3 MB)",
88
- attachmentUnsupportedType: "File type not supported. Use PDF, DOC, JPG or PNG",
89
- attachmentsCountLimit: "You can attach up to 10 files.",
90
- attachmentIncludedInEmail: "Included in email",
91
- attachmentNotIncludedInEmail: "Not included in email",
92
- reminderUnitDay: "day",
93
- reminderUnitDays: "days",
94
- reminderNameDay: "{days} day",
95
- reminderNameDays: "{days} days",
96
- reminderNameAnd: "and",
97
- reminderBeforeDueCaption: "Add schedule",
98
- reminderOverdueCaption: "Add schedule (Specify up to 3 terms)",
99
- reminderOverdueEmptyCaption: "Send up to three reminders",
100
- reminderOverdueTermLabel: "Reminder {index}, days after due date",
101
- reminderDaysRange: "Enter a number of days between {min} and {max}.",
102
- reminderPastDueWarning: "This reminder would be sent after the due date has already passed.",
103
- reminderAdded: "Reminder has been added",
104
- reminderBeforeDueSubject: "Payment is due soon",
105
- reminderBeforeDueBody: "Payment is due on {dueDate}.",
106
- reminderBeforeDueBodyNoDate: "Payment is due soon.",
107
- reminderOverdueSubject: "Payment is overdue",
108
- reminderOverdueBody: "Payment was due on {dueDate}.",
109
- reminderOverdueBodyNoDate: "Payment is overdue.",
110
- issueRemindersDisabled: "Payment reminders are disabled for this customer. Please enable them in the customer details or turn them off.",
111
- issueRemindersNoEmail: "No email address is added for the selected customer. Please add it to the customer details or turn off the reminders.",
112
- issueRemindersDisabledNoEmail: "Reminders are disabled for this customer, and no email address has been added for it. Please update the details or turn off reminders."
10
+ var S = {
11
+ to: "",
12
+ cc: "",
13
+ bcc: "",
14
+ subject: "",
15
+ body: ""
16
+ }, C = {
17
+ mode: "full",
18
+ amountPaid: "",
19
+ paidAt: "",
20
+ comment: ""
113
21
  };
22
+ function w() {
23
+ return {
24
+ type: "invoice",
25
+ customerId: "",
26
+ currency: "USD",
27
+ issueDate: (/* @__PURE__ */ new Date()).toISOString().slice(0, 10),
28
+ dueDate: "",
29
+ openingNote: "",
30
+ closingNote: "",
31
+ paymentTermsId: "",
32
+ paymentTermsCustomDate: "",
33
+ taxRate: "",
34
+ ..._("USD"),
35
+ lineItems: [n()],
36
+ bankAccountId: "",
37
+ bankAccountType: "",
38
+ paymentReminderId: "",
39
+ overdueReminderId: "",
40
+ attachments: [],
41
+ ...p()
42
+ };
43
+ }
44
+ function T(e) {
45
+ return e === "quotes" ? "quote" : e === "credit_notes" ? "credit_note" : "invoice";
46
+ }
47
+ function E(e) {
48
+ return e === "quote" ? "quotes" : e === "credit_note" ? "credit_notes" : "invoices";
49
+ }
50
+ function D(e) {
51
+ return (e?.length ? e : [
52
+ "invoices",
53
+ "quotes",
54
+ "credit_notes"
55
+ ]).filter((e, t, n) => [
56
+ "invoices",
57
+ "quotes",
58
+ "credit_notes"
59
+ ].includes(e) && n.indexOf(e) === t);
60
+ }
61
+ function O({ defaultTab: e, enabledTabs: t }) {
62
+ return e && t.includes(e) ? e : t[0] ?? "invoices";
63
+ }
64
+ function k(e, n) {
65
+ let r = t(e);
66
+ return r ? new Intl.DateTimeFormat(void 0, {
67
+ day: "numeric",
68
+ month: "short",
69
+ year: "numeric"
70
+ }).format(r) : n;
71
+ }
72
+ function A({ amount: t, currency: n, fallback: r }) {
73
+ return t == null || !n ? r : new Intl.NumberFormat(void 0, {
74
+ currency: n,
75
+ style: "currency"
76
+ }).format(t / 10 ** e(n));
77
+ }
78
+ function j(t, n) {
79
+ let r = Number(t);
80
+ if (!Number.isFinite(r)) return;
81
+ let i = n ? e(n) : 2;
82
+ return Math.round(r * 10 ** i);
83
+ }
84
+ function M(e, t) {
85
+ return e.document_id || t.untitledDocument;
86
+ }
87
+ function N(e, t) {
88
+ return e === "quote" ? t.quoteType : e === "credit_note" ? t.creditNoteType : t.invoiceType;
89
+ }
90
+ function P(e) {
91
+ return e === "paid" || e === "accepted" || e === "issued" || e === "recurring" ? "success" : e === "draft" || e === "issuing" ? "neutral" : e === "overdue" || e === "partially_paid" ? "warning" : e === "failed" || e === "declined" || e === "expired" || e === "uncollectible" || e === "canceled" || e === "deleted" ? "danger" : "info";
92
+ }
93
+ function F(e) {
94
+ let t = e.status === "draft", n = e.status === "issued", r = e.type === "invoice", i = e.type === "quote", a = e.type === "credit_note", o = r && [
95
+ "issued",
96
+ "overdue",
97
+ "partially_paid"
98
+ ].includes(e.status);
99
+ return {
100
+ edit: t && !a,
101
+ accept: i && n,
102
+ cancel: ![
103
+ "paid",
104
+ "canceled",
105
+ "deleted",
106
+ "uncollectible"
107
+ ].includes(e.status) && !t,
108
+ clone: !a && e.status !== "deleted",
109
+ decline: i && n,
110
+ delete: t,
111
+ issue: t,
112
+ markPaid: o,
113
+ markUncollectible: o,
114
+ recordPayment: o,
115
+ send: [
116
+ "issued",
117
+ "accepted",
118
+ "overdue",
119
+ "partially_paid"
120
+ ].includes(e.status) && !a
121
+ };
122
+ }
123
+ function I({ receivables: e, messages: t }) {
124
+ return e.map((e) => {
125
+ let n = e.type === "invoice" ? e.amount_due : void 0;
126
+ return {
127
+ id: e.id,
128
+ type: e.type,
129
+ documentLabel: M(e, t),
130
+ customerLabel: e.counterpart_name || t.unknownCustomer,
131
+ status: e.status,
132
+ statusTone: P(e.status),
133
+ issueDateLabel: k(e.issue_date, t.notAvailable),
134
+ dueDateLabel: k(e.type === "quote" ? e.expiry_date : e.due_date, t.notAvailable),
135
+ totalLabel: A({
136
+ amount: e.total_amount,
137
+ currency: e.currency,
138
+ fallback: t.notAvailable
139
+ }),
140
+ amountDueLabel: A({
141
+ amount: n,
142
+ currency: e.currency,
143
+ fallback: t.notAvailable
144
+ }),
145
+ actions: F(e)
146
+ };
147
+ });
148
+ }
149
+ function L({ receivable: e, history: t, mails: n, pdfUrl: r, messages: i }) {
150
+ if (!e) return;
151
+ let a = e.type === "invoice" ? e.amount_due : void 0, o = e.type === "quote" ? e.expiry_date : e.due_date;
152
+ return {
153
+ id: e.id,
154
+ type: e.type,
155
+ title: M(e, i),
156
+ customerLabel: e.counterpart_name || i.unknownCustomer,
157
+ status: e.status,
158
+ statusTone: P(e.status),
159
+ totalLabel: A({
160
+ amount: e.total_amount,
161
+ currency: e.currency,
162
+ fallback: i.notAvailable
163
+ }),
164
+ amountDueLabel: A({
165
+ amount: a,
166
+ currency: e.currency,
167
+ fallback: i.notAvailable
168
+ }),
169
+ pdfUrl: r || e.file_url || e.original_file_url || void 0,
170
+ summaryItems: [
171
+ {
172
+ label: i.summaryDocumentType,
173
+ value: N(e.type, i)
174
+ },
175
+ {
176
+ label: i.summaryDocumentNumber,
177
+ value: M(e, i)
178
+ },
179
+ {
180
+ label: i.summaryCustomer,
181
+ value: e.counterpart_name || i.unknownCustomer
182
+ },
183
+ {
184
+ label: i.summaryIssued,
185
+ value: k(e.issue_date, i.notAvailable)
186
+ },
187
+ {
188
+ label: i.summaryDue,
189
+ value: k(o, i.notAvailable)
190
+ },
191
+ {
192
+ label: i.summaryCreated,
193
+ value: k(e.created_at, i.notAvailable)
194
+ },
195
+ {
196
+ label: i.summaryUpdated,
197
+ value: k(e.updated_at, i.notAvailable)
198
+ },
199
+ {
200
+ label: i.summaryTotal,
201
+ value: A({
202
+ amount: e.total_amount,
203
+ currency: e.currency,
204
+ fallback: i.notAvailable
205
+ })
206
+ },
207
+ {
208
+ label: i.summaryAmountDue,
209
+ value: A({
210
+ amount: a,
211
+ currency: e.currency,
212
+ fallback: i.notAvailable
213
+ })
214
+ }
215
+ ],
216
+ lineItems: e.line_items.map((t, n) => ({
217
+ id: t.product.id || String(n),
218
+ name: t.product.name,
219
+ quantityLabel: String(t.quantity),
220
+ unitPriceLabel: A({
221
+ amount: t.product.price?.value,
222
+ currency: t.product.price?.currency || e.currency,
223
+ fallback: i.notAvailable
224
+ }),
225
+ totalLabel: A({
226
+ amount: t.total_after_tax ?? t.total_before_tax,
227
+ currency: e.currency,
228
+ fallback: i.notAvailable
229
+ })
230
+ })),
231
+ activityItems: t.map((e) => ({
232
+ id: e.id,
233
+ title: R(e.event_type, i),
234
+ description: e.event_type,
235
+ timestampLabel: k(e.timestamp, i.notAvailable)
236
+ })),
237
+ mailItems: n.map((e) => ({
238
+ id: e.id,
239
+ statusLabel: e.status,
240
+ recipientsLabel: z(e, i),
241
+ sentAtLabel: k(e.created_at, i.notAvailable)
242
+ })),
243
+ actions: F(e)
244
+ };
245
+ }
246
+ function R(e, t) {
247
+ return e === "status_changed" ? t.activityStatusChanged : e === "receivable_created" ? t.activityReceivableCreated : e === "receivable_updated" ? t.activityReceivableUpdated : e === "payment_received" ? t.activityPaymentReceived : e === "mail_sent" ? t.activityMailSent : t.activityUnknown;
248
+ }
249
+ function z(e, t) {
250
+ let n = [
251
+ ...e.recipients?.to ?? [],
252
+ ...e.recipients?.cc ?? [],
253
+ ...e.recipients?.bcc ?? []
254
+ ].map((e) => e.email).filter(Boolean);
255
+ return n.length > 0 ? n.join(", ") : t.recipientsNone;
256
+ }
257
+ function B({ values: e, billingAddressId: t, messages: n }) {
258
+ let r = {};
259
+ e.customerId ? t || (r.customerId = n.customerAddressRequired) : r.customerId = n.customerRequired, e.currency || (r.currency = n.currencyRequired);
260
+ let i = u(e.lineItems, {
261
+ currency: e.currency,
262
+ messages: n
263
+ }), a = c(i, x(e, n));
264
+ i && (r.lineItems = i), a && (r.lineItemsSummary = a);
265
+ let o = b(e, n);
266
+ return o && (r.discount = o), r;
267
+ }
268
+ function V(e) {
269
+ return Object.keys(e).length > 0;
270
+ }
271
+ function H({ bankAccountId: e, bankAccountType: t }) {
272
+ return {
273
+ bank_account_id: e || void 0,
274
+ bank_account_type: e && t || void 0
275
+ };
276
+ }
277
+ function U({ values: e, billingAddressId: t, unitNamesById: n }) {
278
+ let i = e.lineItems.filter((e) => !r(e)).map((t) => a({
279
+ lineItem: t,
280
+ currency: e.currency,
281
+ taxRate: e.taxRate,
282
+ unitNamesById: n
283
+ })), o = {
284
+ counterpart_billing_address_id: t,
285
+ counterpart_id: e.customerId,
286
+ currency: e.currency,
287
+ line_items: i,
288
+ memo: e.openingNote,
289
+ footer: e.closingNote,
290
+ discount: v(e) ?? void 0,
291
+ ...H(e)
292
+ };
293
+ return e.type === "quote" ? {
294
+ ...o,
295
+ expiry_date: e.dueDate || void 0,
296
+ type: "quote"
297
+ } : {
298
+ ...o,
299
+ ...m(e),
300
+ payment_reminder_id: e.paymentReminderId || void 0,
301
+ overdue_reminder_id: e.overdueReminderId || void 0,
302
+ attachments: d(e.attachments),
303
+ type: "invoice"
304
+ };
305
+ }
306
+ function W(e, t) {
307
+ let r = e.type === "quote" ? "quote" : "invoice", i = l(e.line_items), a = e.type === "invoice" ? e : void 0, o = e.line_items.map((n) => s({
308
+ lineItem: n,
309
+ currency: e.currency,
310
+ units: t
311
+ }));
312
+ return {
313
+ ...w(),
314
+ type: r,
315
+ customerId: e.counterpart_id,
316
+ currency: e.currency,
317
+ issueDate: J(e.issue_date),
318
+ dueDate: e.type === "quote" ? J(e.expiry_date) : "",
319
+ openingNote: e.memo ?? "",
320
+ closingNote: e.footer ?? "",
321
+ ...e.type === "invoice" ? g(e.payment_terms) : {},
322
+ taxRate: i,
323
+ savedTaxRate: i,
324
+ ...y(e.discount, e.currency),
325
+ lineItems: o.length > 0 ? o : [n(e.currency)],
326
+ bankAccountId: e.bank_account_id ?? "",
327
+ bankAccountType: G(e.bank_account_type),
328
+ paymentReminderId: a?.payment_reminder_id ?? "",
329
+ overdueReminderId: a?.overdue_reminder_id ?? "",
330
+ attachments: f(e)
331
+ };
332
+ }
333
+ function G(e) {
334
+ return e === "BANK_DETAILS" || e === "INTERNAL" || e === "EXTERNAL" ? e : "";
335
+ }
336
+ function K({ values: e, billingAddressId: t, lineItemChanges: n }) {
337
+ let r = {
338
+ counterpart_billing_address_id: t,
339
+ counterpart_id: e.customerId,
340
+ currency: e.currency,
341
+ issue_date: e.issueDate || void 0,
342
+ memo: e.openingNote,
343
+ footer: e.closingNote,
344
+ discount: v(e),
345
+ ...H(e)
346
+ };
347
+ return e.type === "quote" ? { quote: {
348
+ ...r,
349
+ ...n ? { line_items: n } : {},
350
+ expiry_date: e.dueDate || void 0,
351
+ ...h(e)
352
+ } } : { invoice: {
353
+ ...r,
354
+ ...n ? { line_items: n } : {},
355
+ ...h(e),
356
+ payment_reminder_id: e.paymentReminderId || null,
357
+ overdue_reminder_id: e.overdueReminderId || null,
358
+ attachments: d(e.attachments) ?? null
359
+ } };
360
+ }
361
+ function q({ values: e, originalLineItems: t, originalCurrency: n, unitNamesById: a, units: c }) {
362
+ let u = l(t), d = i(e.taxRate, u), f = (e, t, n) => o({
363
+ lineItem: e,
364
+ currency: t,
365
+ taxRate: n,
366
+ keepSavedRate: d,
367
+ unitNamesById: a
368
+ }), p = new Map(t.map((e) => [e.id, JSON.stringify(f(s({
369
+ lineItem: e,
370
+ currency: n,
371
+ units: c
372
+ }), n, u))])), m = e.lineItems.filter((e) => !r(e)), h = new Set(m.map((e) => e.id)), g = m.filter((e) => !p.has(e.id)).map((t) => f(t, e.currency, e.taxRate)), _ = m.flatMap((t) => {
373
+ let n = p.get(t.id);
374
+ if (n === void 0) return [];
375
+ let r = f(t, e.currency, e.taxRate);
376
+ return n === JSON.stringify(r) ? [] : [{
377
+ id: t.id,
378
+ data: r
379
+ }];
380
+ }), v = t.filter((e) => !h.has(e.id)).map((e) => e.id);
381
+ if (g.length || _.length || v.length) return {
382
+ ...g.length ? { add: g } : {},
383
+ ..._.length ? { replace: _ } : {},
384
+ ...v.length ? { remove: v } : {}
385
+ };
386
+ }
387
+ function J(e) {
388
+ return e?.slice(0, 10) ?? "";
389
+ }
390
+ function Y(e, t) {
391
+ let n = {};
392
+ return e.to.trim() || (n.to = t.sendToRequired), e.subject.trim() || (n.subject = t.sendSubjectRequired), e.body.trim() || (n.body = t.sendBodyRequired), n;
393
+ }
394
+ function X(e) {
395
+ return Object.keys(e).length > 0;
396
+ }
397
+ function Z(e) {
398
+ return e.split(",").map((e) => e.trim()).filter(Boolean);
399
+ }
400
+ function Q(e, t, n) {
401
+ let r = {};
402
+ if (e.mode === "partial") {
403
+ let i = j(e.amountPaid, n);
404
+ (!i || i <= 0) && (r.amountPaid = t.paymentAmountInvalid);
405
+ }
406
+ return r;
407
+ }
408
+ function $(e) {
409
+ return Object.keys(e).length > 0;
410
+ }
411
+ function ee(e, t) {
412
+ return {
413
+ ...S,
414
+ to: e?.counterpart_contact?.email ?? "",
415
+ subject: e?.document_id ? `${t.sendSubjectDefault} ${e.document_id}` : t.sendSubjectDefault,
416
+ body: t.sendBodyDefault
417
+ };
418
+ }
419
+ function te() {
420
+ return {
421
+ ...C,
422
+ paidAt: (/* @__PURE__ */ new Date()).toISOString().slice(0, 10)
423
+ };
424
+ }
425
+ function ne() {
426
+ return [
427
+ "draft",
428
+ "issued",
429
+ "failed",
430
+ "accepted",
431
+ "expired",
432
+ "declined",
433
+ "recurring",
434
+ "partially_paid",
435
+ "paid",
436
+ "overdue",
437
+ "uncollectible",
438
+ "canceled"
439
+ ].map((e) => ({
440
+ value: e,
441
+ label: e.split("_").map((e) => `${e.slice(0, 1).toUpperCase()}${e.slice(1)}`).join(" ")
442
+ }));
443
+ }
114
444
  //#endregion
115
- export { e as RECEIVABLE_MESSAGE_LABELS_EN };
445
+ export { C as EMPTY_RECEIVABLE_PAYMENT_VALUES, S as EMPTY_RECEIVABLE_SEND_VALUES, F as buildReceivableActions, L as buildReceivableDetailsView, I as buildReceivableRows, D as coerceEnabledTabs, w as createEmptyReceivableFormValues, n as createLineItem, te as defaultPaymentValues, ee as defaultSendValues, k as formatDate, A as formatMoney, j as fromMajorUnits, M as getDocumentTitle, N as getDocumentTypeLabel, P as getStatusTone, $ as hasPaymentErrors, V as hasReceivableFormErrors, X as hasSendErrors, U as receivableFormValuesToCreatePayload, q as receivableFormValuesToLineItemChanges, K as receivableFormValuesToUpdatePayload, W as receivableToFormValues, O as resolveInitialTab, Z as splitEmailList, ne as statusFilterOptions, E as tabForType, T as typeForTab, Q as validatePaymentValues, B as validateReceivableForm, Y as validateSendValues };