@tesouro/embedded-components-react 0.5.212 → 0.5.214

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 (208) hide show
  1. package/dist/index.js +1 -1
  2. package/dist/lib/BillPayWidget.js +1 -1
  3. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-upload/data-access/dist/index.js +3 -0
  4. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{data-access/dist/index38.js → bill-upload/data-access/dist/index2.js} +7 -6
  5. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-upload/data-access/dist/index3.js +33 -0
  6. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{data-access/dist/index35.js → bill-upload/data-access/dist/index4.js} +6 -7
  7. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-upload/feature/dist/index.js +7 -0
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-upload/feature/dist/index2.js +8 -0
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-upload/feature/dist/index3.js +13 -0
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-upload/feature/dist/index4.js +133 -0
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-upload/feature/dist/index5.js +3 -0
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-upload/feature/dist/index6.js +5 -0
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-upload/feature/dist/index7.js +4 -0
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-upload/feature/dist/index8.js +56 -0
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-upload/feature/dist/index9.js +1 -0
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-upload/ui/dist/index.js +4 -0
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-upload/ui/dist/index2.js +10 -0
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-upload/ui/dist/index3.js +9 -0
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-upload/ui/dist/index4.js +93 -0
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-upload/ui/dist/index6.js +2 -0
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index.js +29 -33
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/invalidation.js +11 -0
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index6.js → lib/invalidatePayableQueries/approvalDecisionQueries.js} +8 -8
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index7.js → lib/invalidatePayableQueries/approvalRequestWatch.js} +5 -5
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index3.js → lib/invalidatePayableQueries/cleanUpDeletedPayableQueries.js} +4 -4
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index9.js → lib/invalidatePayableQueries/hasLiveScheduledRecord.js} +5 -5
  27. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/lib/invalidatePayableQueries/index.js +6 -0
  28. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index8.js → lib/invalidatePayableQueries/invalidateDeletedPayableQueries.js} +5 -5
  29. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index4.js → lib/invalidatePayableQueries/invalidatePayableQueries.js} +5 -5
  30. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index5.js → lib/invalidatePayableQueries/payableProjectionPolling.js} +1 -1
  31. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index10.js → lib/invalidatePayableQueries/reconcileCancelledPaymentQueries.js} +7 -7
  32. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index12.js → lib/invalidatePayableQueries/reconcileSubmittedForApprovalQueries.js} +3 -3
  33. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index13.js → lib/payableOcrQueryOptions.js} +4 -4
  34. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index40.js → lib/payablePolicyAssignmentQueryOptions.js} +4 -4
  35. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index2.js → lib/queryKeys.js} +4 -4
  36. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index21.js → lib/useApplyDuplicateVerdictsMutation.js} +23 -25
  37. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index16.js → lib/usePayableApprovalRequests.js} +11 -11
  38. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index17.js → lib/usePayableHistoryQuery.js} +6 -6
  39. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index18.js → lib/usePayableLineItems.js} +10 -10
  40. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/lib/usePayableMutations/index.js +12 -0
  41. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index22.js → lib/usePayableMutations/useAttachPayableFileMutation.js} +7 -7
  42. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index23.js → lib/usePayableMutations/useCancelPayableMutation.js} +7 -7
  43. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/lib/usePayableMutations/useCancelScheduledPaymentMutation.js +40 -0
  44. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/lib/usePayableMutations/useCreatePayableMutation.js +34 -0
  45. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/lib/usePayableMutations/useDeletePayableFileMutation.js +34 -0
  46. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/lib/usePayableMutations/useDeletePayableMutation.js +34 -0
  47. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index28.js → lib/usePayableMutations/useForceApprovePayableMutation.js} +7 -7
  48. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index29.js → lib/usePayableMutations/useForceRejectPayableMutation.js} +7 -7
  49. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index32.js → lib/usePayableMutations/useReopenPayableMutation.js} +7 -7
  50. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index33.js → lib/usePayableMutations/useSubmitPayableForApprovalMutation.js} +9 -9
  51. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index34.js → lib/usePayableMutations/useUpdatePayableMutation.js} +7 -7
  52. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index36.js → lib/usePayableMutations/useValidatePayableMutation.js} +5 -5
  53. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index19.js → lib/usePayablePaymentRecordsQuery.js} +8 -8
  54. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index47.js → lib/usePayableSuggestionsQuery.js} +7 -7
  55. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/lib/usePayablesQueries/index.js +6 -0
  56. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index39.js → lib/usePayablesQueries/useFirstPayablesPagesQuery.js} +8 -8
  57. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index41.js → lib/usePayablesQueries/usePayableQuery.js} +8 -8
  58. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index42.js → lib/usePayablesQueries/usePayablesByIdsQueries.js} +6 -6
  59. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index43.js → lib/usePayablesQueries/usePayablesCountQueries.js} +7 -7
  60. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/{index44.js → lib/usePayablesQueries/usePayablesQuery.js} +7 -7
  61. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/lib/usePayablesQueries/usePayablesTotalCountQuery.js +29 -0
  62. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +11 -23
  63. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index10.js +11 -5
  64. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index11.js +12 -13
  65. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index12.js +66 -23
  66. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index13.js +9 -62
  67. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index14.js +29 -2
  68. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index15.js +160 -82
  69. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index16.js +26 -5
  70. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index17.js +22 -31
  71. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index18.js +38 -35
  72. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index19.js +92 -164
  73. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index20.js +82 -45
  74. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index21.js +6 -1
  75. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index22.js +44 -47
  76. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index23.js +112 -12
  77. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index24.js +184 -8
  78. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index25.js +72 -9
  79. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index26.js +31 -65
  80. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index27.js +89 -10
  81. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index28.js +401 -15
  82. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index29.js +12 -161
  83. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index30.js +83 -24
  84. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index31.js +79 -22
  85. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index32.js +222 -30
  86. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index33.js +38 -93
  87. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index34.js +247 -79
  88. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index35.js +23 -4
  89. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index36.js +612 -45
  90. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index37.js +4 -116
  91. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index38.js +27 -179
  92. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index39.js +232 -70
  93. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index4.js +15 -38
  94. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index40.js +3 -35
  95. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index41.js +3 -90
  96. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index42.js +36 -405
  97. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +1 -16
  98. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js +23 -83
  99. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index45.js +3 -80
  100. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +124 -228
  101. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +8 -43
  102. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +6 -251
  103. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js +81 -22
  104. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index5.js +38 -6
  105. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index50.js +20 -625
  106. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +22 -4
  107. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +28 -42
  108. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +82 -256
  109. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +50 -3
  110. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +260 -3
  111. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +27 -38
  112. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +396 -1
  113. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +332 -6
  114. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +4 -13
  115. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index6.js +217 -16
  116. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +5 -130
  117. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js +107 -2
  118. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index62.js +1 -6
  119. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js +24 -129
  120. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index7.js +84 -14
  121. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index8.js +46 -37
  122. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index9.js +12 -223
  123. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/data-access/dist/index.js +4 -0
  124. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{data-access/dist/index30.js → pay-bill/data-access/dist/index2.js} +7 -7
  125. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/data-access/dist/index3.js +7 -0
  126. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{data-access/dist/index11.js → pay-bill/data-access/dist/index4.js} +5 -4
  127. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{data-access/dist/index20.js → pay-bill/data-access/dist/index5.js} +8 -8
  128. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/feature/dist/index.js +3 -0
  129. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/feature/dist/index10.js +179 -0
  130. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/feature/dist/index11.js +51 -0
  131. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/feature/dist/index12.js +1 -0
  132. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/feature/dist/index13.js +5 -0
  133. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/feature/dist/index14.js +73 -0
  134. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/feature/dist/index15.js +1 -0
  135. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/feature/dist/index2.js +18 -0
  136. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/feature/dist/index3.js +26 -0
  137. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/feature/dist/index4.js +72 -0
  138. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/feature/dist/index5.js +2 -0
  139. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/feature/dist/index6.js +9 -0
  140. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/feature/dist/index7.js +7 -0
  141. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/feature/dist/index8.js +35 -0
  142. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/feature/dist/index9.js +41 -0
  143. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index.js +10 -0
  144. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{ui/dist/index108.js → pay-bill/ui/dist/index10.js} +4 -4
  145. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index11.js +2 -0
  146. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{ui/dist/index103.js → pay-bill/ui/dist/index2.js} +2 -2
  147. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{ui/dist/index104.js → pay-bill/ui/dist/index3.js} +3 -3
  148. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index4.js +2 -0
  149. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index5.js +13 -0
  150. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{ui/dist/index101.js → pay-bill/ui/dist/index6.js} +5 -5
  151. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index7.js +2 -0
  152. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{ui/dist/index106.js → pay-bill/ui/dist/index8.js} +2 -2
  153. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{ui/dist/index107.js → pay-bill/ui/dist/index9.js} +1 -1
  154. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +10 -22
  155. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index100.js +2 -12
  156. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index89.js +3 -6
  157. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index90.js +28 -7
  158. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index91.js +2 -93
  159. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index92.js +7 -0
  160. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index93.js +34 -2
  161. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index94.js +2 -7
  162. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index95.js +12 -28
  163. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index96.js +108 -2
  164. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index97.js +2 -7
  165. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index98.js +8 -32
  166. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index99.js +52 -2
  167. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/util/dist/lib/duplicateVerdict.js +7 -0
  168. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/util/dist/lib/groupDuplicates.js +40 -0
  169. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/util/dist/lib/payableRemoval.js +8 -0
  170. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  171. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index8.js +1 -1
  172. package/package.json +1 -1
  173. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index14.js +0 -32
  174. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index15.js +0 -8
  175. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index24.js +0 -40
  176. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index25.js +0 -34
  177. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index26.js +0 -34
  178. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index27.js +0 -34
  179. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index31.js +0 -8
  180. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index37.js +0 -15
  181. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index45.js +0 -29
  182. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index46.js +0 -6
  183. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +0 -11
  184. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js +0 -10
  185. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.js +0 -84
  186. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index67.js +0 -24
  187. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index68.js +0 -22
  188. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index69.js +0 -31
  189. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index70.js +0 -86
  190. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index71.js +0 -50
  191. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index72.js +0 -262
  192. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index73.js +0 -35
  193. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index74.js +0 -395
  194. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index75.js +0 -310
  195. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index76.js +0 -4
  196. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index77.js +0 -7
  197. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index78.js +0 -114
  198. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index79.js +0 -1
  199. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index80.js +0 -27
  200. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index102.js +0 -2
  201. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index105.js +0 -2
  202. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index109.js +0 -2
  203. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index110.js +0 -14
  204. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index111.js +0 -108
  205. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index112.js +0 -2
  206. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index113.js +0 -10
  207. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index114.js +0 -52
  208. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index115.js +0 -2
@@ -2,28 +2,414 @@
2
2
  "use client";
3
3
  "use client";
4
4
  "use client";
5
- import { hasAnyScope as e } from "../../../shared/data-access/dist/lib/hasAnyScope.js";
6
- import { useCurrentUserQuery as t } from "../../../shared/data-access/dist/lib/useCurrentUserQuery.js";
5
+ import { toast as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
6
+ import { hasAnyScope as t } from "../../../shared/data-access/dist/lib/hasAnyScope.js";
7
7
  import { Scope as n } from "../../../shared/data-access/dist/lib/scopes.js";
8
8
  import "../../../shared/data-access/dist/index.js";
9
+ import "../../../shared/ui/dist/index.js";
9
10
  import { useWidgetConfig as r } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
10
11
  import "../../../shared/feature/dist/index.js";
11
- import { usePayableApprovalRequestsQuery as i } from "../../data-access/dist/index16.js";
12
+ import { VENDOR_SECTION_PROPS_LABELS_EN as i } from "./index24.js";
13
+ import { usePayableSuggestionsQuery as a } from "../../data-access/dist/lib/usePayableSuggestionsQuery.js";
12
14
  import "../../data-access/dist/index.js";
13
- import { currentApprovalRound as a } from "./index3.js";
14
- import { usePayableApprovalRoundStart as o } from "./index25.js";
15
+ import { buildVendorPrefill as o } from "./index26.js";
16
+ import { COUNTERPART_MESSAGE_LABELS_EN as s } from "../../../shared/counterpart-management/feature/dist/lib/labels.js";
17
+ import { counterpartFormBankAccountToCreatePayload as ee, counterpartFormBankAccountToUpdatePayload as te, getAchInstructions as ne, getCounterpartEmail as c, getCounterpartName as l, getPayableAchInstructions as re, isAchCompatibleBankAccount as u, resolveCounterpartBankAccountWrite as ie, validateAchFormValues as ae } from "../../../shared/counterpart-management/feature/dist/lib/helpers.js";
18
+ import { useCounterpartsQuery as oe } from "../../../shared/counterpart-management/data-access/dist/index3.js";
19
+ import { useCreateCounterpartBankAccountMutation as se, useUpdateCounterpartBankAccountMutation as ce } from "../../../shared/counterpart-management/data-access/dist/index5.js";
20
+ import { useCounterpartDetails as le } from "../../../shared/counterpart-management/feature/dist/lib/useCounterpartDetails.js";
21
+ import { useCounterpartForm as ue } from "../../../shared/counterpart-management/feature/dist/lib/useCounterpartForm.js";
22
+ import "../../../shared/counterpart-management/feature/dist/index.js";
23
+ import { VendorInlineForm as de } from "./index27.js";
24
+ import { useCallback as d, useEffect as f, useMemo as p, useRef as m, useState as h } from "react";
25
+ import { jsx as fe } from "react/jsx-runtime";
15
26
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index28.js
16
- function s({ payableId: s, status: c }) {
17
- let { initResponse: l } = r(), u = e(l?.scopes, [n.ApprovalRequestReadOrg]), d = c === "approve_in_progress" && u, f = i(s, { enabled: d }), p = t({ enabled: d }), { roundStartedAt: m } = o({
18
- payableId: s,
19
- enabled: d
20
- }), h = p.data?.id, g = d ? a(f.data?.data, m) : [], _ = (e) => e.caller_is_policy_approver ?? !!(h && e.user_ids.includes(h)), v = g.some(_), y = g.filter((e) => e.status === "waiting");
27
+ var pe = 10, me = 300, g = {
28
+ accountHolderName: "",
29
+ routingNumber: "",
30
+ accountNumber: ""
31
+ };
32
+ function he(e) {
21
33
  return {
22
- id: y.filter(_).find((e) => !(h && (e.approved_by ?? []).includes(h)))?.id,
23
- isPolicyApprover: v,
24
- hasWaitingRequest: y.length > 0,
25
- isLoading: f.isLoading || p.isLoading
34
+ accountHolderName: e.account_holder_name ?? "",
35
+ routingNumber: e.routing_number ?? "",
36
+ accountNumber: e.account_number ?? ""
37
+ };
38
+ }
39
+ function _(e, t) {
40
+ return e.accountHolderName.trim() === t.accountHolderName.trim() && e.routingNumber.trim() === t.routingNumber.trim() && e.accountNumber.trim() === t.accountNumber.trim();
41
+ }
42
+ function ge(e, t) {
43
+ return e?.find((e) => e.id === t && u(e)) ?? ne(e);
44
+ }
45
+ function v({ payableId: ne, counterpartId: u, payableCounterpartId: v, payableCounterpartBankAccountId: _e, isVendorKnown: ve = !0, onCounterpartChange: ye, requiredError: be, extractedVendor: y, readOnly: b = !1, canEditVendor: x = !0, canEditPaymentInstructions: xe = !0, canAddPaymentInstructions: Se = !0, confirmDiscard: S = (e) => e(), labels: Ce }) {
46
+ let C = {
47
+ ...i,
48
+ ...Ce
49
+ }, { initResponse: we } = r(), Te = t(we?.scopes, [n.CounterpartReadOrg]), [w, Ee] = h(""), [T, De] = h(""), Oe = m(T), [E, ke] = h(), [Ae, je] = h("none"), [Me, Ne] = h(), [Pe, D] = h(!1), [O, k] = h(!1), [A, j] = h(g), Fe = m(A);
50
+ Fe.current = A;
51
+ let M = m(g), [Ie, N] = h(), [Le, Re] = h(), P = Le?.bankAccountId, F = m(void 0), ze = m(u), [Be, Ve] = h(!1), [He, Ue] = h(!1), I = m(void 0), We = (O || E === "create") && !_(A, M.current), L = d(() => {
52
+ k(!1), j(g), M.current = g, N(void 0);
53
+ }, []), R = d((e) => {
54
+ Ve(!0), ye(e);
55
+ }, [ye]), z = a(ne, { enabled: !b && !!ne && !u && !v }).data?.suggested_counterpart?.id, Ge = y?.name;
56
+ f(() => {
57
+ !b && !Be && !u && !v && z && R(z);
58
+ }, [
59
+ u,
60
+ v,
61
+ b,
62
+ Be,
63
+ z,
64
+ R
65
+ ]), f(() => {
66
+ ze.current !== u && (ze.current = u, L(), Re((e) => e?.counterpartId === u ? e : void 0));
67
+ }, [u, L]), f(() => {
68
+ let e = setTimeout(() => {
69
+ De(w.trim());
70
+ }, me);
71
+ return () => clearTimeout(e);
72
+ }, [w]);
73
+ let B = oe({
74
+ sort: "counterpart_name",
75
+ order: "asc",
76
+ limit: pe,
77
+ counterpart_name__icontains: T || void 0,
78
+ is_vendor: !0,
79
+ enabled: !b && (E === "edit" || !E && !u) && ve && Te
80
+ });
81
+ f(() => {
82
+ B.isPlaceholderData || (Oe.current = T);
83
+ }, [T, B.isPlaceholderData]);
84
+ let Ke = B.isPlaceholderData && Oe.current !== T, V = le({
85
+ selectedId: u,
86
+ enabled: Te
87
+ }), qe = se(), Je = ce(), H = ue({
88
+ view: Ae,
89
+ setView: je,
90
+ selectedId: Me,
91
+ setSelectedId: Ne,
92
+ messages: s,
93
+ counterpartType: "vendor",
94
+ counterpart: V.counterpart,
95
+ primaryAddress: V.primaryAddress,
96
+ includeBankAccount: !1
97
+ }), { openCreate: Ye, openEdit: Xe, close: Ze, setValues: U, submit: Qe } = H, W = p(() => o(y), [y]), G = W?.bankAccount, K = p(() => {
98
+ let e = V.counterpart;
99
+ if (!e) return;
100
+ if (V.isBankAccountsLoading) return {
101
+ name: l(e),
102
+ email: c(e),
103
+ methodLabel: C.paymentMethodLoading,
104
+ hasPaymentInstructions: !1
105
+ };
106
+ if (V.isBankAccountsError) return {
107
+ name: l(e),
108
+ email: c(e),
109
+ methodLabel: C.paymentMethodUnavailable,
110
+ hasPaymentInstructions: !1
111
+ };
112
+ let t = re(V.bankAccounts);
113
+ return {
114
+ name: l(e),
115
+ email: c(e),
116
+ methodLabel: t ? C.paymentInstructionsValue(t.account_number?.slice(-4) ?? "") : C.noMethod,
117
+ hasPaymentInstructions: !!t
118
+ };
119
+ }, [
120
+ V.bankAccounts,
121
+ V.counterpart,
122
+ V.isBankAccountsError,
123
+ V.isBankAccountsLoading,
124
+ C
125
+ ]), $e = p(() => {
126
+ let e = Ge?.trim();
127
+ if (!e || u || E) return;
128
+ let t = G?.accountNumber;
129
+ return {
130
+ name: e,
131
+ email: y?.email ?? "",
132
+ description: C.pendingVendorDescription,
133
+ methodLabel: t ? C.paymentInstructionsValue(t.slice(-4)) : "",
134
+ hasPaymentInstructions: !!t
135
+ };
136
+ }, [
137
+ u,
138
+ G?.accountNumber,
139
+ y?.email,
140
+ Ge,
141
+ E,
142
+ C.paymentInstructionsValue,
143
+ C.pendingVendorDescription
144
+ ]), q = u === v ? _e : void 0, J = p(() => ge(V.bankAccounts, q), [V.bankAccounts, q]), et = p(() => re(V.bankAccounts)?.id, [V.bankAccounts]), tt = !V.counterpart || V.isLoading || V.isFetching || V.isError || V.isBankAccountsLoading || V.isBankAccountsFetching || V.isBankAccountsError, nt = tt || V.isAddressesLoading || V.isAddressesFetching || V.isAddressesError, rt = x && !tt && V.isAddressesError ? { onRetry: V.refetchAddresses } : void 0, Y = d(() => {
145
+ Ze(), ke(void 0), D(!1), F.current = void 0;
146
+ }, [Ze]), it = d((e) => {
147
+ if (D(!1), F.current = void 0, e === "edit") Ne(u), Xe();
148
+ else {
149
+ Ye();
150
+ let e = w.trim();
151
+ U((t) => ({
152
+ ...t,
153
+ entityType: "organization",
154
+ legalName: e || W?.legalName || t.legalName,
155
+ email: W?.email || t.email,
156
+ phone: W?.phone || t.phone,
157
+ address: W?.address ?? t.address
158
+ })), j(G ?? g), N(void 0), M.current = g;
159
+ }
160
+ ke(e);
161
+ }, [
162
+ u,
163
+ G,
164
+ Ye,
165
+ Xe,
166
+ w,
167
+ U,
168
+ W
169
+ ]), at = d(() => {
170
+ let e = J ? he(J) : g;
171
+ M.current = e, j(e), N(void 0), k(!0);
172
+ }, [J]), ot = d((e) => {
173
+ j((t) => ({
174
+ ...t,
175
+ ...e
176
+ })), N(void 0);
177
+ }, []), st = d(() => {
178
+ We ? S(L) : L();
179
+ }, [
180
+ L,
181
+ S,
182
+ We
183
+ ]), X = d(() => {
184
+ Y(), L();
185
+ }, [L, Y]), Z = Pe || We, Q = d((e) => {
186
+ let t = () => {
187
+ X(), e();
188
+ };
189
+ Z ? S(t) : t();
190
+ }, [
191
+ S,
192
+ X,
193
+ Z
194
+ ]), ct = d(() => {
195
+ Z ? S(X) : X();
196
+ }, [
197
+ S,
198
+ X,
199
+ Z
200
+ ]), lt = d(async (t) => {
201
+ let n = u, r = !1, i = Fe.current;
202
+ if (!_(i, M.current)) {
203
+ let e = ae(i);
204
+ if (Object.keys(e).length > 0) return N(e), E !== "create" && k(!0), { ok: !1 };
205
+ }
206
+ if (E === "edit" && nt) return { ok: !1 };
207
+ if (E) {
208
+ if (E === "create" && F.current) n = F.current;
209
+ else {
210
+ let e = await Qe();
211
+ if (!e.ok) return { ok: !1 };
212
+ E === "create" ? (n = e.counterpartId, F.current = n) : n = e.counterpartId ?? n;
213
+ }
214
+ E === "create" && (r = !0);
215
+ }
216
+ if (!n) return { ok: !0 };
217
+ let a = V.isBankAccountsLoading || V.isBankAccountsFetching || V.isBankAccountsError;
218
+ if (_(i, M.current)) {
219
+ let e = P ?? q;
220
+ return e ? (t && (k(!1), E && Y()), r && R(n), {
221
+ ok: !0,
222
+ counterpartId: n,
223
+ counterpartBankAccountId: e
224
+ }) : r ? (t && Y(), R(n), {
225
+ ok: !0,
226
+ counterpartId: n
227
+ }) : a ? { ok: !1 } : (t && (k(!1), E && Y()), {
228
+ ok: !0,
229
+ counterpartId: n,
230
+ counterpartBankAccountId: et
231
+ });
232
+ }
233
+ if (a) return { ok: !1 };
234
+ N(void 0);
235
+ let o = ie(V.bankAccounts, P ?? J?.id), s;
236
+ try {
237
+ o.kind === "update" ? (await Je.mutateAsync({
238
+ path: {
239
+ counterpart_id: n,
240
+ bank_account_id: o.bankAccountId
241
+ },
242
+ body: te(i, { includeAchDefaults: o.includeAchDefaults })
243
+ }), s = o.bankAccountId) : s = (await qe.mutateAsync({
244
+ path: { counterpart_id: n },
245
+ body: ee(i, { isDefaultForCurrency: o.isDefaultForCurrency })
246
+ }))?.id;
247
+ } catch {
248
+ return e.error(C.bankAccountSaveFailed), {
249
+ ok: !1,
250
+ counterpartId: n
251
+ };
252
+ }
253
+ return M.current = i, Re(s ? {
254
+ counterpartId: n,
255
+ bankAccountId: s
256
+ } : void 0), t && (k(!1), E && Y()), r && R(n), {
257
+ ok: !0,
258
+ counterpartId: n,
259
+ counterpartBankAccountId: s
260
+ };
261
+ }, [
262
+ Y,
263
+ u,
264
+ qe,
265
+ V.bankAccounts,
266
+ V.isBankAccountsError,
267
+ V.isBankAccountsFetching,
268
+ V.isBankAccountsLoading,
269
+ E,
270
+ nt,
271
+ q,
272
+ et,
273
+ R,
274
+ J,
275
+ Qe,
276
+ Je,
277
+ P
278
+ ]), ut = d((e) => {
279
+ if (I.current) return I.current;
280
+ let t = e?.closeOnSuccess ?? !0, n = (async () => {
281
+ Ue(!0);
282
+ try {
283
+ return await lt(t);
284
+ } finally {
285
+ I.current = void 0, Ue(!1);
286
+ }
287
+ })();
288
+ return I.current = n, n;
289
+ }, [lt]), dt = d(() => {
290
+ k(!1), E && Y();
291
+ }, [E, Y]), ft = p(() => (B.data?.data ?? []).map((e) => ({
292
+ name: l(e),
293
+ email: c(e),
294
+ onSelect: () => {
295
+ Q(() => R(e.id));
296
+ }
297
+ })), [
298
+ B.data,
299
+ Q,
300
+ R
301
+ ]), pt = d((e) => {
302
+ D(!0), U((t) => e.entityType === "individual" && t.entityType !== "individual" ? {
303
+ ...t,
304
+ ...e,
305
+ firstName: t.firstName || t.legalName,
306
+ legalName: t.legalName
307
+ } : e.entityType === "organization" && t.entityType !== "organization" ? {
308
+ ...t,
309
+ ...e,
310
+ legalName: t.legalName || [t.firstName, t.lastName].filter(Boolean).join(" ")
311
+ } : {
312
+ ...t,
313
+ ...e
314
+ });
315
+ }, [U]), mt = d((e) => {
316
+ D(!0), U((t) => ({
317
+ ...t,
318
+ address: {
319
+ ...t.address,
320
+ ...e
321
+ }
322
+ }));
323
+ }, [U]), ht = {
324
+ query: w,
325
+ onQueryChange: Ee,
326
+ isLoading: !ve || !we || !!u && V.isLoading || B.isLoading || B.isFetching && Ke,
327
+ onAddVendor: () => {
328
+ Q(() => it("create"));
329
+ },
330
+ results: ft
331
+ }, gt = Se && (E === "create" || !tt) ? {
332
+ isOpen: O,
333
+ values: A,
334
+ errors: Ie,
335
+ onOpen: at,
336
+ onCancel: st,
337
+ onChange: ot
338
+ } : void 0, _t = E !== "create" && gt ? {
339
+ ...gt,
340
+ onOpen: E === "edit" ? () => Q(at) : gt.onOpen,
341
+ canEditExisting: xe
342
+ } : void 0, vt = H.isSubmitting || qe.isPending || Je.isPending, $ = {
343
+ prepareVendorForSave: ut,
344
+ isVendorSavePending: He || vt,
345
+ hasUnsavedVendorChanges: Z,
346
+ isPendingVendor: !!$e,
347
+ isEditingPayTo: !!E || O,
348
+ activePayToOperation: E ? "vendor" : O ? K?.hasPaymentInstructions ? "existingInstructions" : "missingInstructions" : void 0,
349
+ discardPayToEdits: X,
350
+ finalizePayToSave: dt,
351
+ openPaymentInstructions: at,
352
+ paymentInstructions: _t,
353
+ detailsWarning: rt
354
+ }, yt = E === "create" && Se ? {
355
+ values: A,
356
+ errors: Ie,
357
+ onChange: ot,
358
+ isExtracted: !!(G && _(A, G))
359
+ } : void 0;
360
+ if (E) return {
361
+ mode: "creating",
362
+ summary: K,
363
+ newVendorForm: /* @__PURE__ */ fe(de, {
364
+ mode: E,
365
+ values: H.values,
366
+ errors: H.errors,
367
+ onChange: pt,
368
+ onAddressChange: mt,
369
+ sectionsToExpand: H.sectionsToExpand,
370
+ onAddressExpand: H.expandAddress,
371
+ onCancel: ct,
372
+ onSave: ut,
373
+ isSaving: vt,
374
+ search: E === "edit" && !b ? ht : void 0,
375
+ paymentInstructions: yt
376
+ }),
377
+ ...$
378
+ };
379
+ if (K) return {
380
+ mode: "resolved",
381
+ summary: K,
382
+ onEdit: x && !nt ? () => Q(() => it("edit")) : void 0,
383
+ ...$
384
+ };
385
+ if ($e) {
386
+ let e = () => Q(() => {
387
+ Ve(!0), it("create");
388
+ });
389
+ return {
390
+ mode: "resolved",
391
+ summary: $e,
392
+ onEdit: x ? e : void 0,
393
+ error: be,
394
+ ...$,
395
+ showPaymentInstructions: !0,
396
+ paymentInstructions: x && Se ? {
397
+ isOpen: !1,
398
+ values: A,
399
+ errors: Ie,
400
+ onOpen: e,
401
+ onChange: ot,
402
+ onCancel: st,
403
+ canEditExisting: !0
404
+ } : void 0
405
+ };
406
+ }
407
+ return {
408
+ mode: "selecting",
409
+ error: B.isError ? C.searchFailed : V.isError ? C.vendorDetailsFailed : be,
410
+ search: ht,
411
+ ...$
26
412
  };
27
413
  }
28
414
  //#endregion
29
- export { s as useCurrentApprovalRequestId };
415
+ export { v as useVendorSectionProps };
@@ -1,165 +1,16 @@
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 "../../../shared/ui/dist/index.js";
7
- import { useWidgetConfig as t } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
8
- import "../../../shared/feature/dist/index.js";
9
- import { useApprovePayableApprovalRequestMutation as n, useRejectPayableApprovalRequestMutation as r } from "../../data-access/dist/index16.js";
10
- import { useCancelPayableMutation as i } from "../../data-access/dist/index23.js";
11
- import { useCancelScheduledPaymentMutation as a } from "../../data-access/dist/index24.js";
12
- import { useForceApprovePayableMutation as o } from "../../data-access/dist/index28.js";
13
- import { useForceRejectPayableMutation as s } from "../../data-access/dist/index29.js";
14
- import { useReopenPayableMutation as c } from "../../data-access/dist/index32.js";
15
- import "../../data-access/dist/index.js";
16
- import { getBillDetailActions as l } from "./index15.js";
17
- import { useState as u } from "react";
18
- import { BanIcon as d, HandIcon as f } from "lucide-react";
19
1
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index29.js
20
- function p({ payableId: d, status: f, currentApprovalRequestId: p, arePendingApproversUnknown: m, hasScheduledPayment: h, scheduledPaymentIntentId: g, isScheduledPaymentUnknown: v, isPayabilityUnknown: x, labels: S, isMarkAsPaidPending: C, hasApprovalPolicy: w = !0, hasWaitingRequest: T, pendingApprovers: E, onPayBillSelect: D, onMarkAsPaidSelect: O, onEditSelect: k, onActionSucceeded: A }) {
21
- let { initResponse: j } = t(), M = r(), N = n(), P = i(), F = a(), I = c(), L = o(), R = s(), z = C || M.isPending || N.isPending || P.isPending || F.isPending || I.isPending || L.isPending || R.isPending, [B, V] = u(), H = B && (B.id !== "cancelScheduledPayment" || B.scheduledPaymentIntentId === g) ? B : void 0, U = d && f ? l({
22
- status: f,
23
- scopes: j?.scopes,
24
- canDecideApprovalRequest: !!p,
25
- arePendingApproversUnknown: m,
26
- hasApprovalPolicy: w,
27
- hasWaitingRequest: T,
28
- hasScheduledPayment: h || v,
29
- scheduledPaymentIntentId: g,
30
- isPayabilityUnknown: x,
31
- canEdit: !!k,
32
- labels: S
33
- }) : [], W = (t) => ({
34
- onError: () => e.error(S.actionError),
35
- onSuccess: () => {
36
- let n = b(t) && !w ? `${t}NoApprovalPolicy` : t;
37
- e.success(S.actionSuccess[n]), A?.(t);
38
- }
39
- }), G = {
40
- reject: {
41
- isPending: M.isPending,
42
- run: (e) => p && M.mutate({
43
- path: { approval_request_id: p },
44
- body: e ? { reject_reason: e } : void 0
45
- }, W("reject"))
46
- },
47
- approve: {
48
- isPending: N.isPending,
49
- run: () => p && N.mutate({ path: { approval_request_id: p } }, W("approve"))
50
- },
51
- cancel: {
52
- isPending: P.isPending,
53
- run: () => d && P.mutate({ path: { payable_id: d } }, W("cancel"))
54
- },
55
- cancelScheduledPayment: {
56
- isPending: F.isPending,
57
- run: () => {
58
- let e = H?.scheduledPaymentIntentId;
59
- d && e && F.mutate({
60
- path: { payment_intent_id: e },
61
- payableId: d
62
- }, W("cancelScheduledPayment"));
2
+ function e(e) {
3
+ return new Promise((t, n) => {
4
+ let r = new FileReader();
5
+ r.onerror = () => n(r.error ?? /* @__PURE__ */ Error("Failed to read file")), r.onload = () => {
6
+ let e = r.result;
7
+ if (typeof e != "string") {
8
+ n(/* @__PURE__ */ Error("Failed to read file as a data URL"));
9
+ return;
63
10
  }
64
- },
65
- reopen: {
66
- isPending: I.isPending,
67
- run: () => d && I.mutate({ path: { payable_id: d } }, W("reopen"))
68
- },
69
- forceApprove: {
70
- isPending: L.isPending,
71
- run: () => d && L.mutate({ path: { payable_id: d } }, W("forceApprove"))
72
- },
73
- forceReject: {
74
- isPending: R.isPending,
75
- run: () => d && R.mutate({ path: { payable_id: d } }, W("forceReject"))
76
- }
77
- }, K = U.map((e) => ({
78
- ...e,
79
- disabled: z,
80
- loading: e.id === "markAsPaid" ? C : G[e.id]?.isPending ?? !1,
81
- onSelect: () => {
82
- if (!z && d) {
83
- if (e.id === "payBill") {
84
- D();
85
- return;
86
- }
87
- if (e.id === "markAsPaid") {
88
- O();
89
- return;
90
- }
91
- if (e.id === "edit") {
92
- k?.();
93
- return;
94
- }
95
- if (y(e.id)) {
96
- V({
97
- id: e.id,
98
- scheduledPaymentIntentId: g
99
- });
100
- return;
101
- }
102
- G[e.id]?.run();
103
- }
104
- }
105
- }));
106
- return {
107
- isActionPending: z,
108
- actions: {
109
- row: K.filter((e) => e.surface === "row"),
110
- menu: K.filter((e) => e.surface === "menu")
111
- },
112
- decisionDialog: {
113
- open: !!H,
114
- copy: H ? {
115
- ...S.decisionDialog[H.id],
116
- ...b(H.id) && !w ? S.decisionDialog[H.id].noApprovalPolicy : void 0,
117
- presentation: _(H.id),
118
- pendingApprovers: b(H.id) ? E ?? [] : void 0
119
- } : void 0,
120
- isPending: H ? G[H.id]?.isPending ?? !1 : !1,
121
- onCancel: () => {
122
- z || V(void 0);
123
- },
124
- onConfirm: (e) => {
125
- H && !z && (G[H.id]?.run(e), V(void 0));
126
- }
127
- }
128
- };
129
- }
130
- var m = {
131
- alignment: "center",
132
- icon: f,
133
- tone: "destructive",
134
- actionWidth: "equal"
135
- }, h = {
136
- alignment: "center",
137
- icon: d,
138
- tone: "destructive",
139
- actionWidth: "equal"
140
- }, g = {
141
- alignment: "center",
142
- icon: d,
143
- tone: "destructive",
144
- actionWidth: "equal"
145
- };
146
- function _(e) {
147
- if (b(e)) return m;
148
- if (e === "reject") return h;
149
- if (e === "cancel") return g;
150
- }
151
- var v = [
152
- "reject",
153
- "cancel",
154
- "cancelScheduledPayment",
155
- "forceApprove",
156
- "forceReject"
157
- ];
158
- function y(e) {
159
- return v.includes(e);
160
- }
161
- function b(e) {
162
- return e === "forceApprove" || e === "forceReject";
11
+ t(e.slice(e.indexOf(",") + 1));
12
+ }, r.readAsDataURL(e);
13
+ });
163
14
  }
164
15
  //#endregion
165
- export { p as usePayableDetailActions };
16
+ export { e as encodeFileToBase64 };