@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,83 +1,6 @@
1
- import { BILL_CREATE_MESSAGE_LABELS_EN as e } from "./index38.js";
2
- import { isPersistableLineItem as t, parseMoneyToMinorUnits as n, parseQuantity as r } from "./index44.js";
3
1
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index45.js
4
- var i = /^(?:\d{1,3}(?:,\d{3})+(?:\.\d+)?|\d+(?:\.\d+)?|\.\d+)$/, a = 255, o = 10, s = 5, c = 30, l = 864e5;
5
- function u() {
6
- let e = /* @__PURE__ */ new Date();
7
- return Date.UTC(e.getFullYear(), e.getMonth(), e.getDate());
8
- }
9
- function d() {
10
- let e = new Date(u());
11
- return e.setUTCFullYear(e.getUTCFullYear() - o), e;
12
- }
13
- function f(e) {
14
- let t = new Date(e);
15
- if (Number.isNaN(t.getTime())) return !1;
16
- let n = new Date(u() + c * l);
17
- return t < d() || t > n;
18
- }
19
- function p(e) {
20
- let t = new Date(e);
21
- if (Number.isNaN(t.getTime())) return !1;
22
- let n = new Date(u());
23
- return n.setUTCFullYear(n.getUTCFullYear() + s), t < d() || t > n;
24
- }
25
- function m(t, n = e) {
26
- let r = {};
27
- return t.poNumber.length > a && (r.poNumber = n.poNumberTooLong), Object.keys(r).length ? r : void 0;
28
- }
29
- function h(e) {
30
- let t = e.trim();
31
- return !t || n(t) !== null ? !0 : i.test(t) ? Number(t.replaceAll(",", "")) === 0 : !1;
32
- }
33
- function g(t, i = e) {
34
- let a = {};
35
- for (let e of t) {
36
- let t = n(e.price), o = n(e.amount), s = {};
37
- e.price.trim() && t === null && (s.price = i.unreadableMoney), e.amount.trim() && o === null && (s.amount = i.unreadableMoney), r(e.quantity) === null && (e.quantity.trim() || t !== null || o !== null) && (s.quantity = i.unusableQuantity), Object.keys(s).length && (a[e.id] = s);
38
- }
39
- return Object.keys(a).length ? a : void 0;
40
- }
41
- function _(i, a, o, s = e) {
42
- let c = {};
43
- a || (c.vendor = s.requiredField), i.invoiceNumber.trim() || (c.invoiceNumber = s.requiredField);
44
- let l = i.invoiceDate.trim(), u = i.dueDate.trim();
45
- l ? f(l) && (c.invoiceDate = s.implausibleInvoiceDate) : c.invoiceDate = s.requiredField, u ? p(u) ? c.dueDate = s.implausibleDueDate : l && u < l && (c.dueDate = s.dueBeforeInvoiceDate) : c.dueDate = s.requiredField;
46
- let d = {};
47
- return o.forEach((e, i) => {
48
- if (i > 0 && !t(e)) return;
49
- let a = {};
50
- e.description.trim() || (a.description = s.requiredField), r(e.quantity) === null && (a.quantity = s.requiredField), n(e.price) === null && n(e.amount) === null && (a.price = s.requiredField, a.amount = s.requiredField), Object.keys(a).length && (d[e.id] = a);
51
- }), {
52
- formErrors: Object.keys(c).length ? c : void 0,
53
- lineItemErrors: Object.keys(d).length ? d : void 0
54
- };
55
- }
56
- function v(e) {
57
- let t = e.trim();
58
- if (!t) return !0;
59
- let n = t.startsWith("-") ? t.slice(1) : t;
60
- return i.test(n) ? Number(t.replaceAll(",", "")) <= 0 : !1;
61
- }
62
- function y(e, t) {
63
- if (n(e) === null) return v(e) ? t.totalNotGreaterThanZero : t.unreadableTotal;
64
- }
65
- function b(t, n = e) {
66
- let r = y(t, n);
67
- return r ? { total: r } : void 0;
68
- }
69
- function x(t, r = e) {
70
- if (t === void 0) return;
71
- let i = n(t);
72
- if (i !== null) return i > 0 ? void 0 : { total: r.totalNotGreaterThanZero };
73
- }
74
- function S(t, n, r, i = e) {
75
- let a = {};
76
- if (h(t) || (a.discount = i.unreadableDiscount), h(n) || (a.tax = i.unreadableTax), r !== void 0) {
77
- let e = y(r, i);
78
- e && (a.total = e);
79
- }
80
- return Object.keys(a).length ? a : void 0;
2
+ function e(e) {
3
+ return e === void 0 ? "0" : e > 99 ? "99+" : String(e);
81
4
  }
82
5
  //#endregion
83
- export { h as isReadableMoneyOrZero, _ as validateBillCompleteness, b as validateBillTotalIsPayable, S as validateBillTotals, m as validateBillValues, g as validateLineItems, x as validateStoredAmountDue };
6
+ export { e as formatBillQueueBadge };
@@ -1,236 +1,132 @@
1
- "use client";
2
- "use client";
3
- "use client";
4
- "use client";
5
- import { toast as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
6
- import { extractApiErrorMessage as t } from "../../../shared/util/dist/lib/apiErrors.js";
7
- import "../../../shared/ui/dist/index.js";
8
- import { useReplacePayableLineItemsMutation as n } from "../../data-access/dist/index18.js";
9
- import { useCreatePayableMutation as r } from "../../data-access/dist/index25.js";
10
- import { useDeletePayableFileMutation as i } from "../../data-access/dist/index26.js";
11
- import { useSubmitPayableForApprovalMutation as a } from "../../data-access/dist/index33.js";
12
- import { useUpdatePayableMutation as o } from "../../data-access/dist/index34.js";
13
- import { useValidatePayableMutation as s } from "../../data-access/dist/index36.js";
14
- import "../../data-access/dist/index.js";
15
- import { BILL_CREATE_MESSAGE_LABELS_EN as c } from "./index38.js";
16
- import { encodeFileToBase64 as l } from "./index43.js";
17
- import { mapBillFormToPayload as u, mapLineItemsToPayload as ee, mapPayableAmountFieldsToPayload as te } from "./index44.js";
18
- import { validateBillCompleteness as ne, validateBillTotalIsPayable as d, validateBillTotals as re, validateBillValues as f, validateLineItems as p, validateStoredAmountDue as m } from "./index45.js";
19
- import { useCallback as h, useRef as ie, useState as g } from "react";
1
+ import { BillColumn as e } from "../../ui/dist/index86.js";
2
+ import "../../ui/dist/index.js";
20
3
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js
21
- var _ = {
22
- document_id: "invoiceNumber",
23
- issued_at: "invoiceDate",
24
- due_date: "dueDate",
25
- counterpart_id: "vendor",
26
- purchase_order_number: "poNumber"
27
- }, v = { tax_amount: "tax" };
28
- function y(e) {
29
- return e.type === "type_error.none.not_allowed" || e.msg === "none is not an allowed value";
4
+ var t = {
5
+ Drafts: "drafts",
6
+ Pending: "pending",
7
+ Scheduled: "scheduled",
8
+ Paid: "paid",
9
+ All: "all"
10
+ }, n = {
11
+ [t.Drafts]: ["draft", "new"],
12
+ [t.Pending]: [
13
+ "approve_in_progress",
14
+ "waiting_to_be_paid",
15
+ "partially_paid"
16
+ ],
17
+ [t.Scheduled]: [
18
+ "new",
19
+ "approve_in_progress",
20
+ "waiting_to_be_paid",
21
+ "partially_paid"
22
+ ],
23
+ [t.Paid]: ["paid"],
24
+ [t.All]: void 0
25
+ }, r = {
26
+ [t.Drafts]: void 0,
27
+ [t.Pending]: !1,
28
+ [t.Scheduled]: !0,
29
+ [t.Paid]: void 0,
30
+ [t.All]: void 0
31
+ };
32
+ function i(e) {
33
+ return e === t.Pending || e === t.Drafts;
30
34
  }
31
- var ae = "pending-vendor";
32
- function b(e) {
33
- return !!t(e)?.includes("line_items_enabled");
35
+ var a = t.Drafts, o = [
36
+ t.Drafts,
37
+ t.Pending,
38
+ t.Scheduled,
39
+ t.Paid,
40
+ t.All
41
+ ], s = {
42
+ [t.Drafts]: [
43
+ e.Vendor,
44
+ e.InvoiceNumber,
45
+ e.Attachment,
46
+ e.IssueDate,
47
+ e.DueDate,
48
+ e.Status,
49
+ e.AmountDue,
50
+ e.TotalAmount,
51
+ e.AddedOn
52
+ ],
53
+ [t.Pending]: [
54
+ e.Vendor,
55
+ e.InvoiceNumber,
56
+ e.Attachment,
57
+ e.IssueDate,
58
+ e.DueDate,
59
+ e.Status,
60
+ e.AmountDue,
61
+ e.TotalAmount,
62
+ e.AddedOn
63
+ ],
64
+ [t.Scheduled]: [
65
+ e.Vendor,
66
+ e.InvoiceNumber,
67
+ e.Attachment,
68
+ e.IssueDate,
69
+ e.DueDate,
70
+ e.ScheduledDate,
71
+ e.Status,
72
+ e.AmountScheduled,
73
+ e.TotalAmount,
74
+ e.AddedOn
75
+ ],
76
+ [t.Paid]: [
77
+ e.Vendor,
78
+ e.InvoiceNumber,
79
+ e.Attachment,
80
+ e.IssueDate,
81
+ e.DueDate,
82
+ e.PaidDate,
83
+ e.Status,
84
+ e.AmountPaid,
85
+ e.TotalAmount,
86
+ e.AddedOn
87
+ ],
88
+ [t.All]: [
89
+ e.Vendor,
90
+ e.InvoiceNumber,
91
+ e.Attachment,
92
+ e.IssueDate,
93
+ e.DueDate,
94
+ e.ScheduledDate,
95
+ e.Status,
96
+ e.AmountDue,
97
+ e.AmountPaid,
98
+ e.TotalAmount,
99
+ e.AddedOn
100
+ ]
101
+ };
102
+ function c(e) {
103
+ return s[e];
34
104
  }
35
- function x(e) {
36
- return !!t(e)?.includes("A vendor could not be linked or created for this payable");
105
+ function l(e) {
106
+ let t = n[e];
107
+ return t ? [...t] : void 0;
37
108
  }
38
- function S(e, t = c) {
39
- let n = {}, r = {}, i = [];
40
- for (let a of e) {
41
- let e = a.loc[0] ?? t.unknownValidationField, o = _[e], s = v[e], c = y(a) ? t.requiredField : a.msg;
42
- o ? n[o] = c : s ? r[s] = c : i.push(t.unmappedValidationError(e, c));
43
- }
44
- return i.length && (n.form = i.join(" ")), {
45
- formErrors: n,
46
- totalsErrors: Object.keys(r).length ? r : void 0
47
- };
109
+ function u(e) {
110
+ return r[e];
48
111
  }
49
- function C(e, t) {
50
- if (!e && !t) return;
51
- let n = {}, r = /* @__PURE__ */ new Set([...Object.keys(e ?? {}), ...Object.keys(t ?? {})]);
52
- for (let i of r) n[i] = {
53
- ...e?.[i],
54
- ...t?.[i]
55
- };
56
- return n;
112
+ var d = {
113
+ vendorLabel: "counterpart_name",
114
+ issueDateLabel: "issued_at",
115
+ dueDateLabel: "due_date",
116
+ scheduledDateLabel: "scheduled_payment_date",
117
+ addedOnLabel: "created_at"
118
+ }, f = {
119
+ [e.Vendor]: "vendorLabel",
120
+ [e.IssueDate]: "issueDateLabel",
121
+ [e.DueDate]: "dueDateLabel",
122
+ [e.ScheduledDate]: "scheduledDateLabel",
123
+ [e.AddedOn]: "addedOnLabel"
124
+ };
125
+ function p(e) {
126
+ return f[e];
57
127
  }
58
- function w({ payableId: t, form: _, counterpartId: v, isVendorPending: y, clearCounterpart: w, prepareVendorForSave: T, onSaved: E, onPayableCreated: D, readSavedStatus: O, onDraftSaved: k, onFinalized: A, labels: j }) {
59
- let M = {
60
- ...c,
61
- ...j
62
- }, [N, P] = g(), F = t ?? N, [I, L] = g(), R = h(() => L(void 0), []), [z, B] = g(!1), oe = h(() => B(!0), []), [V, H] = g(), U = ie(!1), [se, ce] = g(0), W = h(() => ce((e) => e + 1), []), G = r(), K = i(), q = o(), J = n(), Y = s(), X = a(), Z = h(() => _.isTotalsDirty ? re(_.discount, _.tax, _.totalOverride, M) : void 0, [_, M]), Q = h(() => {
63
- let t = f(_.values, M), n = p(_.lineItems, M), r = Z();
64
- return _.setErrors(t), _.setLineItemErrors(n), _.setTotalsErrors(r), !t && !n && !r || (n && e.error(M.lineItemsNeedAttention), W(), !1);
65
- }, [
66
- _,
67
- M,
68
- W,
69
- Z
70
- ]), $ = h(async (e, t) => {
71
- let n = !F && I ? {
72
- base64EncodedFile: await l(I),
73
- fileName: I.name
74
- } : void 0, r = _.isTotalsDirty ? {
75
- discount: _.discount,
76
- tax: _.tax,
77
- total: _.totalOverride
78
- } : void 0, i = u({
79
- values: _.values,
80
- initialLineItems: F ? void 0 : _.lineItems,
81
- counterpartId: t ?? v,
82
- clearCounterpart: w,
83
- counterpartBankAccountId: e,
84
- currentTotals: {
85
- discount: _.discount,
86
- tax: _.tax,
87
- total: _.totalOverride
88
- },
89
- lineItems: _.lineItems,
90
- editedTotals: r,
91
- document: n
92
- }), a = F;
93
- if (a ? await q.mutateAsync({
94
- path: { payable_id: a },
95
- body: i
96
- }) : (a = (await G.mutateAsync({ body: i }))?.id, a && (P(a), D?.(a), n && L(void 0))), !a) throw Error("Payable was created without an id");
97
- if (z) {
98
- try {
99
- await K.mutateAsync({ path: { payable_id: a } });
100
- } catch {}
101
- B(!1);
102
- }
103
- return await J.mutateAsync({
104
- path: { payable_id: a },
105
- body: { data: ee(_.lineItems) }
106
- }), r && await q.mutateAsync({
107
- path: { payable_id: a },
108
- body: te({
109
- lineItems: _.lineItems,
110
- editedTotals: r
111
- })
112
- }), a;
113
- }, [
114
- v,
115
- w,
116
- G,
117
- K,
118
- z,
119
- _.discount,
120
- _.isTotalsDirty,
121
- _.lineItems,
122
- _.tax,
123
- _.totalOverride,
124
- _.values,
125
- D,
126
- F,
127
- J,
128
- I,
129
- q
130
- ]), le = h(async () => {
131
- F && (await K.mutateAsync({ path: { payable_id: F } }), B(!1));
132
- }, [K, F]);
133
- return {
134
- saveDraft: h(async () => {
135
- if (!U.current && Q()) {
136
- U.current = !0, H("draft");
137
- try {
138
- let t = await T?.();
139
- if (t && !t.ok) return;
140
- let n = await $(t?.counterpartBankAccountId, t?.counterpartId);
141
- _.setErrors(void 0), E?.(n), k?.(n);
142
- let r = await O?.();
143
- return e.success(r === "draft" ? M.submittedDemoted : M.draftSaved), n;
144
- } catch (e) {
145
- _.setSaveFailureMessage(b(e) ? M.discountTaxBlockedByLineItems : M.saveFailed), W();
146
- return;
147
- } finally {
148
- H(void 0), U.current = !1;
149
- }
150
- }
151
- }, [
152
- _,
153
- Q,
154
- M.discountTaxBlockedByLineItems,
155
- M.draftSaved,
156
- M.saveFailed,
157
- M.submittedDemoted,
158
- k,
159
- E,
160
- O,
161
- T,
162
- $,
163
- W
164
- ]),
165
- finalize: h(async () => {
166
- if (U.current) return;
167
- let t = p(_.lineItems, M), n = f(_.values, M), r = Z(), i = d(_.total, M), a = _.isTotalsDirty ? m(_.totalOverride, M) : void 0, o = r || i || a ? {
168
- ...a,
169
- ...i,
170
- ...r
171
- } : void 0, { formErrors: s, lineItemErrors: c } = ne(_.values, v ?? (y ? ae : void 0), _.lineItems, M), l = C(c, t);
172
- _.setLineItemErrors(l), _.setTotalsErrors(o);
173
- let u = {
174
- ...s,
175
- ...n
176
- };
177
- if (_.setErrors(Object.keys(u).length ? u : void 0), t && e.error(M.lineItemsNeedAttention), l || o || Object.keys(u).length) {
178
- W();
179
- return;
180
- }
181
- U.current = !0, H("finalize");
182
- try {
183
- let t;
184
- try {
185
- let e = await T?.();
186
- if (e && !e.ok) return;
187
- t = await $(e?.counterpartBankAccountId, e?.counterpartId);
188
- } catch (e) {
189
- _.setSaveFailureMessage(b(e) ? M.discountTaxBlockedByLineItems : M.saveFailed), W();
190
- return;
191
- }
192
- E?.(t);
193
- try {
194
- let n = await Y.mutateAsync({ path: { payable_id: t } });
195
- if (n.validation_errors.length) {
196
- let e = S(n.validation_errors, M);
197
- _.setErrors(e.formErrors), _.setTotalsErrors(e.totalsErrors), W();
198
- return;
199
- }
200
- await X.mutateAsync({ path: { payable_id: t } }), _.setErrors(void 0), A?.(t), e.success(M.billFinalized);
201
- } catch (e) {
202
- x(e) ? _.setErrors({ vendor: M.vendorResolutionFailed }) : _.setSaveFailureMessage(M.finalizeFailed), W();
203
- }
204
- } finally {
205
- H(void 0), U.current = !1;
206
- }
207
- }, [
208
- v,
209
- y,
210
- _,
211
- M,
212
- A,
213
- E,
214
- T,
215
- $,
216
- W,
217
- X,
218
- Z,
219
- Y
220
- ]),
221
- payableId: F,
222
- isSavingDraft: V === "draft",
223
- isFinalizing: V === "finalize",
224
- stagedFile: I,
225
- stageFile: L,
226
- clearStagedFile: R,
227
- scrollToErrorToken: se,
228
- isFileDeletionPending: z,
229
- requestFileDeletion: oe,
230
- detachFileNow: le,
231
- isDeletingFile: K.isPending,
232
- hasFileDeletionFailed: K.isError
233
- };
128
+ function m(e) {
129
+ if (e) return d[e];
234
130
  }
235
131
  //#endregion
236
- export { S as mapValidationErrorsToForm, w as useBillCreateController };
132
+ export { s as BILL_QUEUE_COLUMNS, r as BILL_QUEUE_HAS_SCHEDULED_PAYMENT, o as BILL_QUEUE_ORDER, n as BILL_QUEUE_STATUSES, d as BILL_SORT_FIELDS, t as BillQueue, a as DEFAULT_BILL_QUEUE, c as billQueueColumns, u as billQueueHasScheduledPayment, i as billQueueOffersAddPanel, l as billQueueStatuses, p as billSortColumnId, m as billSortField };
@@ -1,46 +1,11 @@
1
- import { resolveLineItemAmountMinorUnits as e } from "../../util/dist/lib/resolveLineItemAmount.js";
2
- import { resolveLineItemQuantity as t } from "../../util/dist/lib/resolveLineItemQuantity.js";
3
1
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js
4
- function n() {
5
- return {
6
- id: crypto.randomUUID(),
7
- description: "",
8
- glCode: "",
9
- quantity: "1",
10
- price: "",
11
- amount: ""
12
- };
13
- }
14
- function r(e) {
15
- return typeof e == "number" ? (e / 100).toFixed(2) : "";
16
- }
17
- function i(e) {
18
- return typeof e == "string" ? e : "";
19
- }
20
- function a(e) {
21
- return e.total_amount ?? e.amount_due ?? void 0;
22
- }
23
- function o({ payable: o, lineItems: s }) {
24
- let c = {
25
- invoiceNumber: o.document_id ?? "",
26
- invoiceDate: o.issued_at ?? "",
27
- dueDate: o.due_date ?? "",
28
- poNumber: i(o.purchase_order_number)
29
- }, l = s.map((n) => ({
30
- id: n.id,
31
- description: n.name ?? "",
32
- glCode: n.ledger_account_id ?? "",
33
- quantity: String(t(n)),
34
- price: r(n.unit_price),
35
- amount: r(e(n))
36
- })), u = a(o);
37
- return {
38
- values: c,
39
- lineItems: l.length ? l : [n()],
40
- discount: r(o.discount),
41
- tax: r(o.tax_amount),
42
- total: u ? r(u) : ""
43
- };
2
+ async function e(e) {
3
+ if (!e.trim()) return !1;
4
+ try {
5
+ return await navigator.clipboard.writeText(e), !0;
6
+ } catch {
7
+ return !1;
8
+ }
44
9
  }
45
10
  //#endregion
46
- export { n as emptyLineItem, o as mapPayableToBillForm };
11
+ export { e as copyTextToClipboard };