@tesouro/embedded-components-react 0.5.213 → 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
@@ -1,8 +1,334 @@
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 { hasAnyScope as t } from "../../../shared/data-access/dist/lib/hasAnyScope.js";
7
+ import { useMailboxAddress as ee } from "../../../shared/data-access/dist/lib/useMailboxAddress.js";
8
+ import { Scope as n } from "../../../shared/data-access/dist/lib/scopes.js";
9
+ import "../../../shared/data-access/dist/index.js";
10
+ import "../../../shared/ui/dist/index.js";
11
+ import { useWidgetConfig as te, useWidgetInitStaleForToken as ne } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
12
+ import "../../../shared/feature/dist/index.js";
13
+ import { AddBillDialog as re } from "../../ui/dist/index10.js";
14
+ import { BillDecisionDialog as r } from "../../ui/dist/index59.js";
15
+ import { BillsScreen as ie } from "../../ui/dist/index87.js";
16
+ import "../../ui/dist/index.js";
17
+ import { BillCreateDialog as i } from "./index36.js";
18
+ import "./index37.js";
19
+ import { BillDetailsContainer as ae } from "./index39.js";
20
+ import "./index40.js";
21
+ import { BILL_QUEUE_ORDER as a } from "./index46.js";
22
+ import { BILLS_TAB_LABELS_EN as o } from "./index49.js";
23
+ import { BillDuplicateView as s, useBillsTable as oe } from "./index57.js";
24
+ import { useDuplicateBillsCount as se } from "./index44.js";
25
+ import { formatBillQueueBadge as ce } from "./index45.js";
26
+ import { copyTextToClipboard as le } from "./index47.js";
27
+ import { resolveDuplicateWarning as ue } from "./index48.js";
28
+ import { billsTabTestIds as c, billsTableCellTestIds as de } from "./index50.js";
29
+ import { useBillQueueCounts as fe } from "./index51.js";
30
+ import "../../bill-upload/feature/dist/index.js";
31
+ import { PayBillWidget as pe } from "../../pay-bill/feature/dist/index14.js";
32
+ import "../../pay-bill/feature/dist/index.js";
33
+ import { useCallback as l, useEffect as u, useMemo as d, useState as f } from "react";
34
+ import { jsx as p, jsxs as me } from "react/jsx-runtime";
1
35
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js
2
- var e = (e) => [
3
- "bill-pay",
4
- "upload-queue",
5
- e ?? ""
6
- ];
36
+ function m({ labels: m, onEnqueueFiles: he, openPayableId: h, onOpenPayableHandled: g, vendorIntent: _, onVendorIntentHandled: v, poweredByBankName: y, onSettingsClick: b }) {
37
+ let x = d(() => ({
38
+ ...o,
39
+ ...m,
40
+ queues: {
41
+ ...o.queues,
42
+ ...m?.queues
43
+ },
44
+ scheduledRelativeDay: {
45
+ ...o.scheduledRelativeDay,
46
+ ...m?.scheduledRelativeDay
47
+ },
48
+ filters: {
49
+ ...o.filters,
50
+ ...m?.filters,
51
+ presets: {
52
+ ...o.filters.presets,
53
+ ...m?.filters?.presets
54
+ },
55
+ statuses: {
56
+ ...o.filters.statuses,
57
+ ...m?.filters?.statuses
58
+ },
59
+ dateFieldNames: {
60
+ ...o.filters.dateFieldNames,
61
+ ...m?.filters?.dateFieldNames
62
+ }
63
+ },
64
+ filterBar: {
65
+ ...o.filterBar,
66
+ ...m?.filterBar
67
+ },
68
+ queueEmptyStates: a.reduce((e, t) => ({
69
+ ...e,
70
+ [t]: {
71
+ ...o.queueEmptyStates[t],
72
+ ...m?.queueEmptyStates?.[t]
73
+ }
74
+ }), {})
75
+ }), [m]), [ge, S] = f(!1), [C, w] = f(), [_e, T] = f(), [E, D] = f(!1), [O, ve] = f(), [k, A] = f(!1), [j, M] = f(!1), [N, P] = f(null), F = !N || {
76
+ create: E,
77
+ details: k,
78
+ view: j
79
+ }[N.surface];
80
+ u(() => {
81
+ F || P(null);
82
+ }, [F]);
83
+ let I = d(() => {
84
+ let e = (e) => (t) => /* @__PURE__ */ p(pe, {
85
+ ...t,
86
+ poweredByBankName: y,
87
+ openFlow: N?.surface === e ? N.flow : null,
88
+ onOpenFlowChange: (t) => P(t ? {
89
+ surface: e,
90
+ flow: t
91
+ } : null)
92
+ });
93
+ return {
94
+ create: e("create"),
95
+ details: e("details"),
96
+ view: e("view")
97
+ };
98
+ }, [N, y]), [L, R] = f(s.AllBills), { initResponse: z } = te(), ye = ne(), be = t(z?.scopes, [n.PayableReadOrg]), xe = t(z?.scopes, [n.PayableWriteOrg]), B = !z || be, V = !z || xe, H = l((e, t) => {
99
+ if (t && V) {
100
+ w(e), T(void 0), D(!0);
101
+ return;
102
+ }
103
+ ve(e), M(!0);
104
+ }, [V]), Se = t(z?.scopes, [n.CounterpartReadOrg]), Ce = d(() => ({
105
+ originalBill: x.duplicateOriginalBillLabel,
106
+ menuTrigger: x.duplicateMenuTrigger,
107
+ notDuplicateAction: x.duplicateNotDuplicateAction,
108
+ notDuplicateConfirmTitle: x.duplicateNotDuplicateConfirmTitle,
109
+ notDuplicateConfirmDescription: x.duplicateNotDuplicateConfirmDescription,
110
+ notDuplicateConfirmButton: x.duplicateNotDuplicateConfirmButton,
111
+ notDuplicateConfirmBackButton: x.duplicateNotDuplicateConfirmBackButton,
112
+ deleteAction: x.duplicateDeleteAction,
113
+ deleteConfirmTitle: x.duplicateDeleteConfirmTitle,
114
+ deleteConfirmDescription: x.duplicateDeleteConfirmDescription,
115
+ deleteConfirmButton: x.duplicateDeleteConfirmButton,
116
+ deletedToast: x.duplicateDeletedToast,
117
+ confirmAction: x.duplicateConfirmAction,
118
+ confirmDuplicateTitle: x.duplicateConfirmDuplicateTitle,
119
+ confirmDuplicateDescription: x.duplicateConfirmDuplicateDescription,
120
+ confirmDuplicateButton: x.duplicateConfirmDuplicateButton,
121
+ confirmedToast: x.duplicateConfirmedToast,
122
+ cancelAction: x.duplicateCancelAction,
123
+ cancelConfirmTitle: x.duplicateCancelConfirmTitle,
124
+ cancelConfirmDescription: x.duplicateCancelConfirmDescription,
125
+ cancelConfirmButton: x.duplicateCancelConfirmButton,
126
+ cancelConfirmBackButton: x.duplicateCancelConfirmBackButton,
127
+ dismissedToast: x.duplicateDismissedToast,
128
+ cancelledToast: x.duplicateCancelledToast,
129
+ actionFailedToast: x.duplicateActionFailedToast,
130
+ groupHeader: x.duplicateGroupHeader
131
+ }), [
132
+ x.duplicateOriginalBillLabel,
133
+ x.duplicateMenuTrigger,
134
+ x.duplicateNotDuplicateAction,
135
+ x.duplicateNotDuplicateConfirmTitle,
136
+ x.duplicateNotDuplicateConfirmDescription,
137
+ x.duplicateNotDuplicateConfirmButton,
138
+ x.duplicateNotDuplicateConfirmBackButton,
139
+ x.duplicateDeleteAction,
140
+ x.duplicateDeleteConfirmTitle,
141
+ x.duplicateDeleteConfirmDescription,
142
+ x.duplicateDeleteConfirmButton,
143
+ x.duplicateDeletedToast,
144
+ x.duplicateConfirmAction,
145
+ x.duplicateConfirmDuplicateTitle,
146
+ x.duplicateConfirmDuplicateDescription,
147
+ x.duplicateConfirmDuplicateButton,
148
+ x.duplicateConfirmedToast,
149
+ x.duplicateCancelAction,
150
+ x.duplicateCancelConfirmTitle,
151
+ x.duplicateCancelConfirmDescription,
152
+ x.duplicateCancelConfirmButton,
153
+ x.duplicateCancelConfirmBackButton,
154
+ x.duplicateDismissedToast,
155
+ x.duplicateCancelledToast,
156
+ x.duplicateActionFailedToast,
157
+ x.duplicateGroupHeader
158
+ ]), { mailboxAddress: U } = ee({ relatedObjectType: "payable" }), W = oe({
159
+ enabled: B,
160
+ canReadVendors: Se,
161
+ isVendorFilterPaused: ye,
162
+ filterLabels: x.filters,
163
+ onOpenBill: H,
164
+ duplicateRowNote: x.duplicateRowNote,
165
+ attachmentLabel: x.attachmentIndicator,
166
+ duplicateGroupLabels: Ce,
167
+ canManageDuplicates: V,
168
+ duplicateView: L,
169
+ scheduledRelativeDayLabels: x.scheduledRelativeDay
170
+ }), G = se({ enabled: B }), we = ue(G, x, L === s.PossibleDuplicates);
171
+ u(() => {
172
+ L === s.PossibleDuplicates && !G.isLoading && (G.isError || G.count === 0) && R(s.AllBills);
173
+ }, [
174
+ L,
175
+ G.count,
176
+ G.isError,
177
+ G.isLoading
178
+ ]);
179
+ let K = fe({ enabled: B }), Te = d(() => a.map((e) => ({
180
+ id: e,
181
+ label: x.queues[e],
182
+ badge: ce(K[e])
183
+ })), [x.queues, K]), q = (e, t) => {
184
+ D(!1), M(!1), H(e, t);
185
+ }, Ee = () => {
186
+ A(!1), M(!0);
187
+ }, De = () => {
188
+ M(!1), A(!0);
189
+ }, J = () => {
190
+ A(!1), M(!1), w(O), T(void 0), D(!0);
191
+ }, Y = d(() => ({
192
+ createButton: x.createButton,
193
+ settingsButton: x.settingsButton,
194
+ addBill: { heading: x.nonEmptyHeading }
195
+ }), [
196
+ x.createButton,
197
+ x.settingsButton,
198
+ x.nonEmptyHeading
199
+ ]), Oe = d(() => ({
200
+ ...W.filterBarProps,
201
+ labels: x.filterBar
202
+ }), [W.filterBarProps, x.filterBar]), X = l((e) => {
203
+ S(!1), w(void 0), T(e), D(!0);
204
+ }, []), Z = (e) => {
205
+ S(!1), he?.(e);
206
+ }, Q = U ? {
207
+ emailAddress: U,
208
+ onCopyEmail: async () => {
209
+ U && (await le(U) ? e.success(x.emailCopiedToast) : e.error(x.emailCopyFailedToast));
210
+ }
211
+ } : {
212
+ emailAddress: void 0,
213
+ onCopyEmail: void 0
214
+ };
215
+ u(() => {
216
+ h && (w(h), T(void 0), D(!0), g?.());
217
+ }, [g, h]);
218
+ let { showVendorBills: $ } = W;
219
+ return u(() => {
220
+ _ && (_.action === "createBill" ? V && X(_.vendorId) : $({
221
+ id: _.vendorId,
222
+ name: _.vendorName
223
+ }), v?.());
224
+ }, [
225
+ V,
226
+ v,
227
+ X,
228
+ $,
229
+ _
230
+ ]), /* @__PURE__ */ me("div", {
231
+ "data-testid": c.root,
232
+ children: [
233
+ /* @__PURE__ */ p(ie, {
234
+ rows: W.rows,
235
+ isLoading: W.isLoading || !z,
236
+ isError: W.isError,
237
+ onRetry: W.onRetry,
238
+ sorting: W.sorting,
239
+ onSortingChange: W.onSortingChange,
240
+ pageSize: W.pageSize,
241
+ onPageSizeChange: W.onPageSizeChange,
242
+ pageSizeOptions: W.pageSizeOptions,
243
+ hasNextPage: W.hasNextPage,
244
+ hasPrevPage: W.hasPrevPage,
245
+ onNextPage: W.onNextPage,
246
+ onPrevPage: W.onPrevPage,
247
+ filterTabs: Te,
248
+ selectedFilterTabId: W.selectedFilterTabId,
249
+ onFilterTabChange: W.onFilterTabChange,
250
+ searchValue: W.searchValue,
251
+ onSearchChange: W.onSearchChange,
252
+ filters: Oe,
253
+ visibleColumns: W.visibleColumns,
254
+ cellTestIds: de,
255
+ isSearchActive: W.isSearchActive,
256
+ showAddPanelWhenEmpty: W.showAddPanelWhenEmpty,
257
+ emptyState: x.queueEmptyStates[W.selectedFilterTabId],
258
+ onCreateClick: V ? () => S(!0) : void 0,
259
+ onSettingsClick: b,
260
+ onEnterManually: V ? () => X() : void 0,
261
+ onFilesSelected: V ? Z : void 0,
262
+ maxFiles: 10,
263
+ ...Q,
264
+ duplicateWarning: we,
265
+ duplicateReviewControl: G.isError ? void 0 : {
266
+ isActive: L === s.PossibleDuplicates,
267
+ reviewLabel: x.duplicateReviewButton,
268
+ clearLabel: x.duplicateReviewClearButton,
269
+ activeFilterLabel: x.duplicateFilterChip,
270
+ onReview: () => {
271
+ W.clearQueryConstraints(), R(s.PossibleDuplicates);
272
+ },
273
+ onClear: () => R(s.AllBills)
274
+ },
275
+ labels: Y
276
+ }),
277
+ /* @__PURE__ */ p(r, {
278
+ open: W.cancelConfirmation.open,
279
+ copy: W.cancelConfirmation.copy,
280
+ onConfirm: W.cancelConfirmation.onConfirm,
281
+ onCancel: W.cancelConfirmation.onCancel,
282
+ isPending: W.cancelConfirmation.isPending,
283
+ labels: { cancelButton: W.cancelConfirmation.cancelButtonLabel }
284
+ }),
285
+ /* @__PURE__ */ p(r, {
286
+ open: W.keepConfirmation.open,
287
+ copy: W.keepConfirmation.copy,
288
+ onConfirm: W.keepConfirmation.onConfirm,
289
+ onCancel: W.keepConfirmation.onCancel,
290
+ isPending: W.keepConfirmation.isPending,
291
+ labels: { cancelButton: W.keepConfirmation.cancelButtonLabel }
292
+ }),
293
+ V ? /* @__PURE__ */ p(re, {
294
+ open: ge,
295
+ onOpenChange: S,
296
+ onFilesSelected: Z,
297
+ maxFiles: 10,
298
+ onEnterManually: () => X(),
299
+ ...Q,
300
+ labels: { heading: W.hasAnyBills ? x.nonEmptyHeading : x.emptyHeading }
301
+ }) : null,
302
+ E ? /* @__PURE__ */ p(i, {
303
+ open: E,
304
+ onOpenChange: D,
305
+ payableId: C,
306
+ initialCounterpartId: _e,
307
+ onOpenBill: q,
308
+ renderPaymentFlows: I.create
309
+ }, C) : null,
310
+ k ? /* @__PURE__ */ p(ae, {
311
+ open: k,
312
+ onOpenChange: A,
313
+ payableId: O,
314
+ onClose: () => A(!1),
315
+ onExpand: Ee,
316
+ onEdit: J,
317
+ testId: c.detailsSheet,
318
+ renderPaymentFlows: I.details
319
+ }) : null,
320
+ j ? /* @__PURE__ */ p(i, {
321
+ open: j,
322
+ onOpenChange: M,
323
+ payableId: O,
324
+ readOnly: !0,
325
+ onCollapse: De,
326
+ onEdit: J,
327
+ onOpenBill: q,
328
+ renderPaymentFlows: I.view
329
+ }, O) : null
330
+ ]
331
+ });
332
+ }
7
333
  //#endregion
8
- export { e as billPayUploadQueueKey };
334
+ export { m as BillsTab, m as default };
@@ -1,13 +1,4 @@
1
- //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js
2
- var e = {
3
- uploadingSummary: (e) => `Uploading and scanning ${e} ${e === 1 ? "file" : "files"}`,
4
- completeSummary: (e) => `${e} ${e === 1 ? "upload" : "uploads"} complete`,
5
- readyCaption: (e) => `${e} new ${e === 1 ? "bill" : "bills"} ready`,
6
- duplicateCaption: (e) => `${e} possible ${e === 1 ? "duplicate" : "duplicates"}`,
7
- failedCaption: (e) => `${e} failed to upload`,
8
- tooManyFilesError: (e) => `You can only upload up to ${e} files at a time`,
9
- remainingCapacityError: (e) => e === 0 ? "Wait for the current uploads to finish before adding more files" : `You can upload ${e} more ${e === 1 ? "file" : "files"} right now`,
10
- billDeletedError: "This bill was already deleted"
11
- };
12
- //#endregion
13
- export { e as BILL_UPLOAD_QUEUE_LABELS_EN };
1
+ import "./index46.js";
2
+ import "./index49.js";
3
+ import "./index57.js";
4
+ import "./index58.js";
@@ -2,26 +2,227 @@
2
2
  "use client";
3
3
  "use client";
4
4
  "use client";
5
- import { countSuspectedPayableDuplicateGroups as e } from "../../util/dist/lib/payableDuplicates.js";
6
- import { usePayablesQuery as t } from "../../data-access/dist/index44.js";
5
+ import { toast as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
6
+ import { formatCalendarDate as t } from "../../../shared/util/dist/lib/formatCalendarDate.js";
7
+ import { formatMoneyExact as n } from "../../../shared/util/dist/lib/formatMoneyExact.js";
8
+ import "../../../shared/ui/dist/index.js";
9
+ import { derivePayableStatus as r } from "../../util/dist/lib/derivePayableStatus.js";
10
+ import { DuplicateVerdict as i } from "../../util/dist/lib/duplicateVerdict.js";
11
+ import { suspectedPayableDuplicates as a } from "../../util/dist/lib/payableDuplicates.js";
12
+ import { duplicateVerdictMatches as o, groupSuspectedDuplicates as s, resolveDuplicateOriginalId as c } from "../../util/dist/lib/groupDuplicates.js";
13
+ import { isEditablePayableStatus as l } from "../../util/dist/lib/isEditablePayableStatus.js";
14
+ import { payableRemoval as u } from "../../util/dist/lib/payableRemoval.js";
15
+ import { resolveVendorName as d } from "../../util/dist/lib/resolveVendor.js";
16
+ import { useApplyDuplicateVerdictsMutation as f } from "../../data-access/dist/lib/useApplyDuplicateVerdictsMutation.js";
17
+ import { usePayablesByIdsQueries as p } from "../../data-access/dist/lib/usePayablesQueries/usePayablesByIdsQueries.js";
7
18
  import "../../data-access/dist/index.js";
19
+ import { duplicateRemovalPrompt as m } from "./index4.js";
20
+ import { DUPLICATE_BILLS_LABELS_EN as h } from "./index5.js";
21
+ import { useCallback as g, useMemo as _, useState as v } from "react";
22
+ import { BanIcon as y, FileCheckIcon as b, Trash2Icon as x } from "lucide-react";
8
23
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index6.js
9
- function n(e) {
10
- return e.isError && e.data === void 0;
24
+ var S = 5;
25
+ function C(e, t) {
26
+ return t ? s(e).map(({ members: e }) => e).find((e) => e.some((e) => e.id === t)) ?? [] : [];
11
27
  }
12
- function r({ enabled: r = !0 } = {}) {
13
- let i = t({
14
- duplicate_match_status: "suspected",
15
- limit: 100,
16
- enabled: r
17
- });
28
+ function w({ payable: s, canManage: w = !0, onRemoved: T, onOpenPayable: E, labels: D }) {
29
+ let O = _(() => ({
30
+ ...h,
31
+ ...D
32
+ }), [D]), k = a(s), [A] = k, j = s?.id, M = _(() => [...new Set(k.map((e) => e.matched_payable_id))], [k]), N = p(M, { enabled: !!(A && j) }), P = f(), [F, I] = v(!1), [L, R] = v(), [z, B] = v(), V = u(s?.status), H = g(async (t, n, r, i, a) => {
33
+ let s = o(t, n, a);
34
+ if (s.length && t?.id) try {
35
+ await P.mutateAsync({
36
+ verdict: n,
37
+ targets: s.map((e) => ({
38
+ payableId: t.id,
39
+ duplicateId: e.id,
40
+ matchedPayableId: e.matched_payable_id,
41
+ removeBy: u(t.status)
42
+ }))
43
+ }), e.success(r), i?.();
44
+ } catch {
45
+ e.error(O.verdictFailedToast);
46
+ }
47
+ }, [P, O]), U = g((e, t, n) => H(s, e, t, n), [H, s]), W = V === "delete" ? {
48
+ button: O.deleteBillButton,
49
+ title: O.deleteConfirmTitle,
50
+ description: O.deleteConfirmDescription,
51
+ confirmButton: O.deleteConfirmButton,
52
+ backButton: O.deleteConfirmBackButton,
53
+ toast: O.deletedToast
54
+ } : V === "confirm" ? {
55
+ button: O.confirmBillButton,
56
+ title: O.confirmDuplicateTitle,
57
+ description: O.confirmDuplicateDescription,
58
+ confirmButton: O.confirmBillButton,
59
+ backButton: O.cancelConfirmBackButton,
60
+ toast: O.confirmedToast
61
+ } : {
62
+ button: O.cancelBillButton,
63
+ title: O.cancelConfirmTitle,
64
+ description: O.cancelConfirmDescription,
65
+ confirmButton: O.cancelConfirmButton,
66
+ backButton: O.cancelConfirmBackButton,
67
+ toast: O.cancelledToast
68
+ }, G = g(async () => {
69
+ await U(i.Remove, W.toast, T), I(!1);
70
+ }, [
71
+ U,
72
+ T,
73
+ W.toast
74
+ ]), K = _(() => ({
75
+ delete: {
76
+ action: O.deleteAction,
77
+ title: O.deleteConfirmTitle,
78
+ description: O.deleteConfirmDescription,
79
+ confirmButton: O.deleteConfirmButton,
80
+ backButton: O.deleteConfirmBackButton,
81
+ toast: O.deletedToast
82
+ },
83
+ cancel: {
84
+ action: O.cancelAction,
85
+ title: O.cancelConfirmTitle,
86
+ description: O.cancelConfirmDescription,
87
+ confirmButton: O.cancelConfirmButton,
88
+ backButton: O.cancelConfirmBackButton,
89
+ toast: O.cancelledToast
90
+ },
91
+ confirm: {
92
+ action: O.confirmAction,
93
+ title: O.confirmDuplicateTitle,
94
+ description: O.confirmDuplicateDescription,
95
+ confirmButton: O.confirmBillButton,
96
+ backButton: O.cancelConfirmBackButton,
97
+ toast: O.confirmedToast
98
+ }
99
+ }), [O]), q = K[L?.removeBy ?? "cancel"], J = g(async () => {
100
+ L && (await H(L.payable, i.Remove, K[L.removeBy].toast, L.payable.id === j ? T : void 0), R(void 0));
101
+ }, [
102
+ H,
103
+ T,
104
+ j,
105
+ L,
106
+ K
107
+ ]), Y = g(async () => {
108
+ z && (await H(z.payable, i.Keep, O.dismissedToast, void 0, z.originalPayableId), B(void 0));
109
+ }, [
110
+ H,
111
+ O.dismissedToast,
112
+ z
113
+ ]), X = w && !!(A && j), Z = X && !!V, Q = _(() => {
114
+ let e = new Map(N.flatMap((e) => e.data ? [[e.data.id, e.data]] : []));
115
+ s?.id && e.set(s.id, s);
116
+ let i = C([...e.values()], j);
117
+ if (i.length < 2) return [];
118
+ let o = c(i), f = (e) => {
119
+ let t = e.total_amount ?? e.amount_due;
120
+ return t == null ? "" : n(t / 100, { currencyCode: e.currency ?? "USD" });
121
+ };
122
+ return i.map((e) => {
123
+ let n = e.status ? r({
124
+ apiStatus: e.status,
125
+ dueDate: e.due_date,
126
+ scheduledPaymentDate: e.scheduled_payment_date
127
+ }) : void 0, i = e.id === o, s = e.id === j, c = w && a(e).length > 0, p = d(e), m = u(e.status);
128
+ return {
129
+ id: e.id,
130
+ roleLabel: p,
131
+ badges: [...i ? [O.originalBillBadge] : [], ...s ? [O.currentBillBadge] : []],
132
+ invoiceNumberLabel: e.document_id ?? "",
133
+ roleTone: i ? void 0 : "warning",
134
+ amountLabel: f(e),
135
+ addedOnLabel: t(e.created_at?.slice(0, 10)),
136
+ dueDateLabel: t(e.due_date),
137
+ status: n?.status,
138
+ statusTone: n?.tone,
139
+ onOpen: !s && E ? () => E(e.id, l(e.status ?? void 0)) : void 0,
140
+ menu: c ? {
141
+ triggerLabel: O.openRow({
142
+ vendorLabel: p,
143
+ invoiceNumberLabel: "",
144
+ addedOnLabel: t(e.created_at?.slice(0, 10))
145
+ }),
146
+ items: [{
147
+ id: "not-duplicate",
148
+ label: O.notDuplicateAction,
149
+ icon: b,
150
+ disabled: P.isPending,
151
+ onSelect: () => B({
152
+ payable: e,
153
+ originalPayableId: i ? void 0 : o
154
+ })
155
+ }, ...m ? [{
156
+ id: "cancel-duplicate",
157
+ label: K[m].action,
158
+ icon: m === "delete" ? x : y,
159
+ disabled: P.isPending,
160
+ onSelect: () => R({
161
+ payable: e,
162
+ removeBy: m
163
+ })
164
+ }] : []]
165
+ } : void 0
166
+ };
167
+ });
168
+ }, [
169
+ P.isPending,
170
+ w,
171
+ N,
172
+ O,
173
+ E,
174
+ s,
175
+ j,
176
+ K
177
+ ]);
18
178
  return {
19
- count: i.data?.data?.length ?? 0,
20
- groupCount: e(i.data?.data ?? []),
21
- isCapped: !!i.data?.next_pagination_token,
22
- isError: n(i),
23
- isLoading: i.isLoading
179
+ isPossibleDuplicate: !!A,
180
+ onNotADuplicate: X ? () => B({ payable: s }) : void 0,
181
+ onRemoveBill: Z ? () => I(!0) : void 0,
182
+ removeBillLabel: Z ? W.button : void 0,
183
+ removeConfirmation: {
184
+ open: F,
185
+ copy: {
186
+ title: W.title,
187
+ description: W.description,
188
+ confirmButton: W.confirmButton,
189
+ presentation: { tone: "destructive" }
190
+ },
191
+ onConfirm: () => void G(),
192
+ onCancel: () => I(!1),
193
+ isPending: P.isPending,
194
+ cancelButtonLabel: W.backButton
195
+ },
196
+ cancelRowConfirmation: {
197
+ open: !!L,
198
+ copy: m(q, L?.removeBy ?? "cancel"),
199
+ onConfirm: () => void J(),
200
+ onCancel: () => R(void 0),
201
+ isPending: P.isPending,
202
+ cancelButtonLabel: q.backButton
203
+ },
204
+ keepRowConfirmation: {
205
+ open: !!z,
206
+ copy: {
207
+ title: O.notDuplicateConfirmTitle,
208
+ description: O.notDuplicateConfirmDescription,
209
+ confirmButton: O.notDuplicateConfirmButton,
210
+ presentation: {
211
+ alignment: "center",
212
+ icon: b,
213
+ actionWidth: "equal"
214
+ }
215
+ },
216
+ onConfirm: () => void Y(),
217
+ onCancel: () => B(void 0),
218
+ isPending: P.isPending,
219
+ cancelButtonLabel: O.notDuplicateConfirmBackButton
220
+ },
221
+ isBusy: P.isPending,
222
+ rows: Q,
223
+ collapsedRowCount: S,
224
+ showMoreLabel: Q.length > S ? O.showMoreRows(Q.length - S) : void 0
24
225
  };
25
226
  }
26
227
  //#endregion
27
- export { r as useDuplicateBillsCount };
228
+ export { w as usePayableDuplicateReview };