@tesouro/embedded-components-react 0.5.221 → 0.5.223

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 (287) hide show
  1. package/dist/index.css +84 -0
  2. package/dist/index.d.ts +239 -214
  3. package/dist/index.js +2 -2
  4. package/dist/lib/BillPayWidget.d.ts +151 -151
  5. package/dist/lib/BillPayWidget.js +1 -1
  6. package/dist/lib/ReceivablesWidget.d.ts +25 -0
  7. package/dist/lib/ReceivablesWidget.js +1 -1
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index.js +22 -0
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index10.js +34 -0
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{data-access/dist/lib/usePayableMutations/useForceApprovePayableMutation.js → bill-detail/data-access/dist/index11.js} +7 -7
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{data-access/dist/lib/usePayableMutations/useForceRejectPayableMutation.js → bill-detail/data-access/dist/index12.js} +7 -7
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{data-access/dist/lib/usePayableMutations/useReopenPayableMutation.js → bill-detail/data-access/dist/index13.js} +7 -7
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{data-access/dist/lib/usePayableMutations/useSubmitPayableForApprovalMutation.js → bill-detail/data-access/dist/index14.js} +9 -9
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{data-access/dist/lib/usePayableMutations/useUpdatePayableMutation.js → bill-detail/data-access/dist/index15.js} +7 -7
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{data-access/dist/lib/usePayableMutations/useValidatePayableMutation.js → bill-detail/data-access/dist/index16.js} +5 -5
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index17.js +12 -0
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{data-access/dist/lib/usePayablePaymentRecordsQuery.js → bill-detail/data-access/dist/index18.js} +1 -1
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{data-access/dist/lib/usePayableSuggestionsQuery.js → bill-detail/data-access/dist/index19.js} +1 -1
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{data-access/dist/lib/usePayableApprovalRequests.js → bill-detail/data-access/dist/index2.js} +6 -5
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{data-access/dist/lib/payablePolicyAssignmentQueryOptions.js → bill-detail/data-access/dist/index20.js} +1 -1
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{data-access/dist/lib/usePayablesQueries/usePayableQuery.js → bill-detail/data-access/dist/index21.js} +9 -8
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{data-access/dist/lib/usePayablesQueries/usePayablesByIdsQueries.js → bill-detail/data-access/dist/index22.js} +6 -6
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index23.js +2 -0
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{data-access/dist/lib/usePayableHistoryQuery.js → bill-detail/data-access/dist/index3.js} +1 -1
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{data-access/dist/lib/usePayableLineItems.js → bill-detail/data-access/dist/index4.js} +3 -3
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{data-access/dist/lib/usePayableMutations/useAttachPayableFileMutation.js → bill-detail/data-access/dist/index5.js} +7 -7
  27. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{data-access/dist/lib/usePayableMutations/useCancelPayableMutation.js → bill-detail/data-access/dist/index6.js} +7 -7
  28. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index7.js +40 -0
  29. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index8.js +34 -0
  30. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index9.js +34 -0
  31. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index.js +12 -0
  32. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index10.js +11 -0
  33. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{feature → bill-detail/feature}/dist/index11.js +2 -2
  34. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{feature → bill-detail/feature}/dist/index12.js +11 -11
  35. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{feature → bill-detail/feature}/dist/index13.js +2 -2
  36. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{feature → bill-detail/feature}/dist/index14.js +8 -8
  37. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{feature → bill-detail/feature}/dist/index15.js +11 -11
  38. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{feature/dist/index17.js → bill-detail/feature/dist/index16.js} +8 -8
  39. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{feature/dist/index18.js → bill-detail/feature/dist/index17.js} +9 -9
  40. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{feature/dist/index19.js → bill-detail/feature/dist/index18.js} +7 -7
  41. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{feature/dist/index20.js → bill-detail/feature/dist/index19.js} +9 -9
  42. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index2.js +59 -0
  43. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{feature/dist/index21.js → bill-detail/feature/dist/index20.js} +1 -1
  44. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{feature/dist/index22.js → bill-detail/feature/dist/index21.js} +2 -2
  45. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{feature/dist/index23.js → bill-detail/feature/dist/index22.js} +1 -1
  46. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{feature/dist/index24.js → bill-detail/feature/dist/index23.js} +11 -11
  47. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{feature/dist/index25.js → bill-detail/feature/dist/index24.js} +5 -5
  48. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{feature/dist/index26.js → bill-detail/feature/dist/index25.js} +1 -1
  49. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{feature/dist/index27.js → bill-detail/feature/dist/index26.js} +9 -9
  50. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{feature/dist/index28.js → bill-detail/feature/dist/index27.js} +19 -19
  51. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{feature/dist/index29.js → bill-detail/feature/dist/index28.js} +1 -1
  52. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{feature/dist/index30.js → bill-detail/feature/dist/index29.js} +2 -2
  53. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index3.js +7 -0
  54. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{feature/dist/index31.js → bill-detail/feature/dist/index30.js} +3 -3
  55. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{feature/dist/index32.js → bill-detail/feature/dist/index31.js} +14 -14
  56. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{feature/dist/index33.js → bill-detail/feature/dist/index32.js} +3 -3
  57. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{feature/dist/index34.js → bill-detail/feature/dist/index33.js} +5 -5
  58. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{feature/dist/index35.js → bill-detail/feature/dist/index34.js} +1 -1
  59. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{feature/dist/index36.js → bill-detail/feature/dist/index35.js} +71 -70
  60. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index36.js +4 -0
  61. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{feature/dist/index38.js → bill-detail/feature/dist/index37.js} +4 -4
  62. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{feature/dist/index39.js → bill-detail/feature/dist/index38.js} +49 -48
  63. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index39.js +3 -0
  64. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index4.js +17 -0
  65. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index40.js +5 -0
  66. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index41.js +67 -0
  67. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index42.js +1 -0
  68. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index5.js +40 -0
  69. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index6.js +229 -0
  70. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index7.js +87 -0
  71. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index8.js +50 -0
  72. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index9.js +16 -0
  73. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index.js +50 -0
  74. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{ui/dist/index29.js → bill-detail/ui/dist/index10.js} +4 -4
  75. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{ui/dist/index30.js → bill-detail/ui/dist/index11.js} +3 -3
  76. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{ui/dist/index31.js → bill-detail/ui/dist/index12.js} +4 -4
  77. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index13.js +2 -0
  78. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{ui/dist/index33.js → bill-detail/ui/dist/index14.js} +12 -13
  79. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{ui/dist/index34.js → bill-detail/ui/dist/index15.js} +27 -28
  80. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index16.js +2 -0
  81. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{ui/dist/index36.js → bill-detail/ui/dist/index17.js} +2 -2
  82. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{ui/dist/index37.js → bill-detail/ui/dist/index18.js} +3 -3
  83. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index19.js +2 -0
  84. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index2.js +15 -0
  85. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{ui/dist/index42.js → bill-detail/ui/dist/index20.js} +2 -2
  86. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{ui/dist/index43.js → bill-detail/ui/dist/index21.js} +3 -3
  87. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index22.js +2 -0
  88. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{ui/dist/index45.js → bill-detail/ui/dist/index23.js} +2 -2
  89. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{ui/dist/index46.js → bill-detail/ui/dist/index24.js} +3 -3
  90. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index25.js +2 -0
  91. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{ui/dist/index48.js → bill-detail/ui/dist/index26.js} +5 -5
  92. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{ui/dist/index49.js → bill-detail/ui/dist/index27.js} +7 -7
  93. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index28.js +2 -0
  94. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{ui/dist/index51.js → bill-detail/ui/dist/index29.js} +10 -10
  95. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index3.js +55 -0
  96. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{ui/dist/index52.js → bill-detail/ui/dist/index30.js} +1 -1
  97. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{ui/dist/index53.js → bill-detail/ui/dist/index31.js} +19 -19
  98. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{ui → bill-detail/ui}/dist/index32.js +1 -1
  99. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{ui/dist/index61.js → bill-detail/ui/dist/index33.js} +8 -9
  100. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{ui/dist/index62.js → bill-detail/ui/dist/index34.js} +22 -24
  101. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{ui/dist/index69.js → bill-detail/ui/dist/index36.js} +1 -1
  102. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{ui/dist/index70.js → bill-detail/ui/dist/index37.js} +8 -9
  103. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{ui/dist/index72.js → bill-detail/ui/dist/index39.js} +1 -1
  104. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index4.js +2 -0
  105. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{ui/dist/index73.js → bill-detail/ui/dist/index40.js} +2 -2
  106. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{ui/dist/index64.js → bill-detail/ui/dist/index42.js} +1 -1
  107. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{ui/dist/index65.js → bill-detail/ui/dist/index43.js} +3 -3
  108. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{ui/dist/index89.js → bill-detail/ui/dist/index45.js} +1 -1
  109. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{ui/dist/index90.js → bill-detail/ui/dist/index46.js} +2 -2
  110. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{ui/dist/index95.js → bill-detail/ui/dist/index48.js} +3 -3
  111. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{ui/dist/index96.js → bill-detail/ui/dist/index49.js} +5 -5
  112. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index5.js +19 -0
  113. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{ui/dist/index98.js → bill-detail/ui/dist/index51.js} +1 -1
  114. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{ui/dist/index99.js → bill-detail/ui/dist/index52.js} +3 -3
  115. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{ui/dist/index54.js → bill-detail/ui/dist/index53.js} +1 -1
  116. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index6.js +23 -0
  117. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index7.js +1 -0
  118. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index8.js +32 -0
  119. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index9.js +1 -0
  120. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/data-access/dist/index.js +6 -0
  121. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{data-access/dist/lib/usePayablesQueries/useFirstPayablesPagesQuery.js → bills-list/data-access/dist/index2.js} +8 -8
  122. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{data-access/dist/lib/usePayablesQueries/usePayablesCountQueries.js → bills-list/data-access/dist/index3.js} +8 -7
  123. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{data-access/dist/lib/usePayablesQueries/usePayablesQuery.js → bills-list/data-access/dist/index4.js} +8 -7
  124. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/data-access/dist/index5.js +30 -0
  125. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/data-access/dist/index6.js +4 -0
  126. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index.js +8 -0
  127. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index10.js +17 -0
  128. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{feature/dist/index52.js → bills-list/feature/dist/index11.js} +1 -1
  129. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{feature/dist/index53.js → bills-list/feature/dist/index12.js} +1 -1
  130. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{feature/dist/index54.js → bills-list/feature/dist/index13.js} +3 -3
  131. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{feature/dist/index55.js → bills-list/feature/dist/index14.js} +23 -23
  132. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{feature/dist/index56.js → bills-list/feature/dist/index15.js} +5 -5
  133. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index16.js +398 -0
  134. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index17.js +246 -0
  135. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index18.js +4 -0
  136. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index19.js +5 -0
  137. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{feature/dist/index44.js → bills-list/feature/dist/index2.js} +3 -3
  138. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index20.js +40 -0
  139. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index21.js +1 -0
  140. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{feature/dist/index45.js → bills-list/feature/dist/index3.js} +1 -1
  141. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{feature/dist/index46.js → bills-list/feature/dist/index4.js} +2 -2
  142. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{feature/dist/index47.js → bills-list/feature/dist/index5.js} +1 -1
  143. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{feature/dist/index48.js → bills-list/feature/dist/index6.js} +2 -2
  144. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{feature/dist/index49.js → bills-list/feature/dist/index7.js} +2 -2
  145. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{feature/dist/index50.js → bills-list/feature/dist/index8.js} +3 -6
  146. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index9.js +22 -0
  147. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index.js +21 -0
  148. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{ui/dist/index77.js → bills-list/ui/dist/index10.js} +4 -4
  149. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index11.js +3 -0
  150. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{ui/dist/index79.js → bills-list/ui/dist/index12.js} +1 -1
  151. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{ui/dist/index80.js → bills-list/ui/dist/index13.js} +3 -3
  152. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index14.js +2 -0
  153. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{ui/dist/index82.js → bills-list/ui/dist/index15.js} +1 -1
  154. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{ui/dist/index83.js → bills-list/ui/dist/index16.js} +3 -3
  155. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index17.js +2 -0
  156. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{ui/dist/index85.js → bills-list/ui/dist/index18.js} +15 -16
  157. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{ui/dist/index86.js → bills-list/ui/dist/index19.js} +1 -1
  158. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index2.js +14 -0
  159. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{ui/dist/index87.js → bills-list/ui/dist/index20.js} +24 -27
  160. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index21.js +3 -0
  161. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index3.js +64 -0
  162. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index4.js +2 -0
  163. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index5.js +8 -0
  164. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index6.js +35 -0
  165. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index7.js +2 -0
  166. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{ui/dist/index75.js → bills-list/ui/dist/index8.js} +2 -2
  167. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{ui/dist/index76.js → bills-list/ui/dist/index9.js} +1 -1
  168. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index.js +3 -28
  169. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/invalidation.js +8 -8
  170. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +1 -15
  171. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index10.js +23 -7
  172. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index2.js +3 -57
  173. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index3.js +43 -4
  174. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index4.js +1 -17
  175. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index5.js +3 -36
  176. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index6.js +109 -219
  177. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index7.js +5 -85
  178. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index8.js +104 -47
  179. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index9.js +1 -16
  180. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index5.js +1 -1
  181. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index6.js +1 -1
  182. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +17 -83
  183. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index10.js +50 -31
  184. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index12.js +2 -13
  185. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index13.js +36 -50
  186. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index15.js +10 -9
  187. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index16.js +14 -25
  188. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index17.js +2 -18
  189. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index18.js +8 -16
  190. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index19.js +74 -19
  191. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index2.js +16 -8
  192. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index21.js +2 -14
  193. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index22.js +25 -14
  194. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index23.js +4 -2
  195. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index24.js +28 -2
  196. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index25.js +2 -30
  197. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index26.js +7 -2
  198. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index27.js +30 -28
  199. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index28.js +1 -0
  200. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index3.js +16 -75
  201. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/{index59.js → index4.js} +2 -2
  202. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index5.js +1 -1
  203. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index6.js +10 -11
  204. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index7.js +2 -64
  205. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index8.js +0 -1
  206. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index9.js +16 -6
  207. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index.js +1 -1
  208. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index13.js +18 -1
  209. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index23.js +219 -453
  210. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index24.js +34 -41
  211. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index25.js +463 -32
  212. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index26.js +39 -77
  213. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index27.js +34 -112
  214. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index28.js +75 -310
  215. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index29.js +121 -0
  216. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index30.js +317 -0
  217. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index9.js +30 -27
  218. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index.js +7 -5
  219. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index28.js +2 -28
  220. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index29.js +4 -236
  221. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index30.js +0 -2
  222. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index31.js +90 -239
  223. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index32.js +24 -89
  224. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index33.js +231 -54
  225. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index34.js +3 -353
  226. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index35.js +249 -0
  227. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index36.js +93 -0
  228. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index37.js +59 -0
  229. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index38.js +353 -0
  230. package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/index6.js +9 -9
  231. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/useMyEntityQuery.js +8 -8
  232. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/index.js +5 -4
  233. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  234. package/dist/libs/tesouro-embedded-components-react/{bill-pay-widget/feature/dist/index16.js → shared/feature/dist/lib/calendar/useLocalCalendarDay.js} +1 -1
  235. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index8.js +1 -1
  236. package/package.json +1 -1
  237. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/lib/usePayableMutations/index.js +0 -12
  238. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/lib/usePayableMutations/useCancelScheduledPaymentMutation.js +0 -40
  239. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/lib/usePayableMutations/useCreatePayableMutation.js +0 -34
  240. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/lib/usePayableMutations/useDeletePayableFileMutation.js +0 -34
  241. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/lib/usePayableMutations/useDeletePayableMutation.js +0 -34
  242. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/lib/usePayablesQueries/index.js +0 -6
  243. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/lib/usePayablesQueries/usePayablesTotalCountQuery.js +0 -29
  244. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index37.js +0 -4
  245. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index40.js +0 -3
  246. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index41.js +0 -5
  247. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index42.js +0 -46
  248. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +0 -1
  249. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +0 -22
  250. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +0 -396
  251. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +0 -334
  252. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +0 -4
  253. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +0 -7
  254. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js +0 -108
  255. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index62.js +0 -1
  256. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js +0 -27
  257. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index100.js +0 -2
  258. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index20.js +0 -1
  259. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index39.js +0 -18
  260. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index40.js +0 -54
  261. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index55.js +0 -4
  262. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index56.js +0 -41
  263. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index57.js +0 -2
  264. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index58.js +0 -19
  265. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index60.js +0 -2
  266. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index63.js +0 -2
  267. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index66.js +0 -2
  268. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index67.js +0 -2
  269. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index68.js +0 -1
  270. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index71.js +0 -2
  271. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index74.js +0 -2
  272. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index78.js +0 -3
  273. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index81.js +0 -2
  274. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index84.js +0 -2
  275. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index88.js +0 -3
  276. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index91.js +0 -2
  277. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index92.js +0 -7
  278. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index93.js +0 -34
  279. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index94.js +0 -2
  280. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index97.js +0 -2
  281. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index27.js +0 -100
  282. /package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{ui → bill-detail/ui}/dist/index35.js +0 -0
  283. /package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{ui → bill-detail/ui}/dist/index38.js +0 -0
  284. /package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{ui → bill-detail/ui}/dist/index41.js +0 -0
  285. /package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{ui → bill-detail/ui}/dist/index44.js +0 -0
  286. /package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{ui → bill-detail/ui}/dist/index47.js +0 -0
  287. /package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{ui → bill-detail/ui}/dist/index50.js +0 -0
@@ -1,44 +1,37 @@
1
- import { formatMoney as e, getStatusTone as t } from "./index12.js";
1
+ "use client";
2
+ "use client";
3
+ "use client";
4
+ "use client";
5
+ import { useMyEntityQuery as e } from "../../../shared/data-access/dist/lib/useMyEntityQuery.js";
6
+ import { usePaymentTermsQuery as t } from "../../../shared/data-access/dist/lib/reference-data/usePaymentTermsQuery.js";
7
+ import "../../../shared/data-access/dist/index.js";
8
+ import { useCounterpartQuery as n } from "../../../shared/counterpart-management/data-access/dist/index3.js";
9
+ import "../../../shared/counterpart-management/feature/dist/index.js";
10
+ import "../../data-access/dist/index.js";
11
+ import { buildReceivablePreviewView as r } from "./index23.js";
12
+ import { useMemo as i } from "react";
2
13
  //#region ../../libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index24.js
3
- var n = [
4
- "draft",
5
- "issued",
6
- "overdue",
7
- "partially_paid",
8
- "paid",
9
- "recurring",
10
- "canceled",
11
- "uncollectible"
12
- ];
13
- function r(e) {
14
- let t = n.indexOf(e);
15
- return t === -1 ? n.length : t;
16
- }
17
- function i({ counts: n, amounts: i, statusFilter: a, statusLabels: o, fallback: s }) {
18
- let c = new Map(Object.entries(o)), l = new Map(i.map((e) => [e.dimension_value, e.metric_value])), u = n.flatMap((e) => e.dimension_value ? [{
19
- status: e.dimension_value,
20
- count: e.metric_value
21
- }] : []), d = u.filter(({ status: e }) => e !== "recurring").reduce((e, { count: t }) => e + t, 0);
22
- return {
23
- kind: "ready",
24
- all: {
25
- value: "all",
26
- countLabel: String(d),
27
- selected: a === "all"
28
- },
29
- statuses: [...u].sort((e, t) => r(e.status) - r(t.status)).map(({ status: n, count: r }) => ({
30
- value: n,
31
- statusLabel: c.get(n) ?? o.unknown,
32
- statusTone: t(n),
33
- countLabel: String(r),
34
- amountLabel: e({
35
- amount: l.get(n) ?? 0,
36
- currency: "USD",
37
- fallback: s
38
- }),
39
- selected: a === n
40
- }))
41
- };
14
+ function a({ values: a, totals: o, billingAddress: s, unitNamesById: c, messages: l, enabled: u = !0 }) {
15
+ let d = e({ enabled: u }), f = n(u && a.customerId || void 0), p = t({ enabled: u }), m = d.data, h = f.data, g = p.data?.data;
16
+ return i(() => r({
17
+ values: a,
18
+ totals: o,
19
+ entity: m,
20
+ counterpart: h,
21
+ billingAddress: s,
22
+ paymentTerms: g,
23
+ unitNamesById: c,
24
+ messages: l
25
+ }), [
26
+ s,
27
+ h,
28
+ m,
29
+ l,
30
+ g,
31
+ o,
32
+ c,
33
+ a
34
+ ]);
42
35
  }
43
36
  //#endregion
44
- export { i as buildReceivableStatusCardsView };
37
+ export { a as useReceivablePreview };
@@ -2,42 +2,473 @@
2
2
  "use client";
3
3
  "use client";
4
4
  "use client";
5
- import { useReceivablesAnalyticsQuery as e } from "../../data-access/dist/index12.js";
5
+ import { getStateOptions as e } from "../../../shared/util/dist/lib/usStates.js";
6
+ import { extractApiErrorMessage as t } from "../../../shared/util/dist/lib/apiErrors.js";
7
+ import { COUNTERPART_MESSAGE_LABELS_EN as n } from "../../../shared/counterpart-management/feature/dist/lib/labels.js";
8
+ import { useCounterpartAddressesQuery as r } from "../../../shared/counterpart-management/data-access/dist/index7.js";
9
+ import { useCounterpartForm as i } from "../../../shared/counterpart-management/feature/dist/lib/useCounterpartForm.js";
10
+ import "../../../shared/counterpart-management/feature/dist/index.js";
11
+ import "../../ui/dist/index10.js";
12
+ import "../../ui/dist/index.js";
13
+ import { buildLineItemControls as a, commitLineItemField as ee, commitTaxRateInput as te, convertPriceInput as ne, createLineItem as re, getCurrencySymbol as ie, lineItemFromProduct as ae, reconcileLineItemIds as oe, reconcileMeasureUnits as se, sanitizeLineItemPatch as ce, sanitizeTaxRateInput as le, stepLineItemQuantity as ue, stripBlankLineItems as de, summarizeLineItemErrors as fe, toSheetLineItem as pe, validateLineItems as me } from "./index6.js";
14
+ import { buildReceivableAttachmentsView as he } from "./index7.js";
15
+ import { buildCreateRecurrencePayload as ge, buildUpdateRecurrencePayload as _e, clearRecurrenceRecipients as ve, countIssuedIterations as ye, isRecurring as o, recurrenceToFormFields as be, validateRecurrence as xe } from "./index8.js";
16
+ import { convertDiscountInput as Se, decorateDiscountInput as Ce, discountInputToMinorUnits as we, sanitizeDiscountInput as Te } from "./index10.js";
17
+ import { buildFormTotalsView as Ee, calculateFormTotals as De, validateDiscount as Oe, validateInvoiceTotals as ke } from "./index11.js";
18
+ import { createEmptyReceivableFormValues as Ae, hasReceivableFormErrors as je, receivableFormValuesToCreatePayload as Me, receivableFormValuesToLineItemChanges as Ne, receivableFormValuesToUpdatePayload as Pe, receivableToFormValues as Fe, validateReceivableForm as Ie } from "./index12.js";
19
+ import { shouldShowRemindersInitially as Le } from "./index14.js";
20
+ import { useCreateReceivableMutation as Re, useUpdateReceivableMutation as ze } from "../../data-access/dist/index7.js";
21
+ import { useCreateRecurrenceMutation as Be, useRecurrenceQuery as Ve, useUpdateRecurrenceMutation as He } from "../../data-access/dist/index11.js";
6
22
  import "../../data-access/dist/index.js";
7
- import { buildReceivableStatusCardsView as t } from "./index24.js";
8
- import { useMemo as n } from "react";
23
+ import { useReceivableAttachmentUploads as Ue } from "./index17.js";
24
+ import { useReceivablePaymentTerms as We } from "./index18.js";
25
+ import { useReceivableRecurrence as Ge } from "./index19.js";
26
+ import { useReceivableBankAccount as Ke } from "./index21.js";
27
+ import { useReceivableReminders as qe } from "./index22.js";
28
+ import { useReceivablePreview as Je } from "./index24.js";
29
+ import { getCurrencyOptions as Ye } from "../../../shared/product-catalog/feature/dist/lib/helpers.js";
30
+ import { useMeasureUnitsQuery as Xe } from "../../../shared/product-catalog/data-access/dist/index9.js";
31
+ import { useMeasureUnits as Ze } from "../../../shared/product-catalog/feature/dist/lib/useMeasureUnits.js";
32
+ import "../../../shared/product-catalog/feature/dist/index.js";
33
+ import { useCallback as s, useEffect as c, useMemo as l, useRef as u, useState as d } from "react";
9
34
  //#region ../../libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index25.js
10
- function r({ enabled: r, statusFilter: i, messages: a, statusLabels: o }) {
11
- let s = e({
12
- enabled: r,
13
- dimension: "status",
14
- metric: "id",
15
- aggregation_function: "count",
16
- type: "invoice"
17
- }), c = e({
18
- enabled: r,
19
- dimension: "status",
20
- metric: "total_amount",
21
- aggregation_function: "summary",
22
- type: "invoice"
23
- }), l = s.data?.data, u = c.data?.data, d = s.isPending || c.isPending;
24
- return n(() => {
25
- if (r) return d ? { kind: "loading" } : t({
26
- counts: l ?? [],
27
- amounts: u ?? [],
28
- statusFilter: i,
29
- statusLabels: o,
30
- fallback: a.notAvailable
35
+ function f({ messages: f, counterpartMessageLabels: Qe, embeddedBankName: $e, onCreated: et }) {
36
+ let p = Re(), m = ze(), tt = Be(), nt = He(), h = u(void 0), g = u([]), _ = u(""), [v, y] = d(!1), [b, rt] = d("create"), [it, at] = d(), [x, S] = d(), [C, w] = d(() => Ae()), [ot, T] = d({}), [st, ct] = d("none"), E = Ze(), D = Xe(), O = D.data?.data, { unitNamesById: k } = E, [lt, A] = d(), [j, M] = d(!1), N = u(!1), P = u(!1), F = u(!1), I = u({
37
+ lines: !1,
38
+ discount: !1
39
+ }), [ut, L] = d(!1), dt = l(() => e(), []), ft = l(() => ({
40
+ ...n,
41
+ ...Qe
42
+ }), [Qe]), pt = r(C.customerId), mt = pt.data?.data?.[0], R = pt.data?.data?.[0]?.id, ht = s((e) => {
43
+ w((t) => ({
44
+ ...t,
45
+ attachments: e(t.attachments)
46
+ }));
47
+ }, []), z = Ue({
48
+ attachments: C.attachments,
49
+ setAttachments: ht,
50
+ receivableId: it
51
+ }), { reset: B, discardUploads: V, commitRemovals: gt } = z, _t = C.type === "invoice" ? he({
52
+ attachments: C.attachments,
53
+ pendingUploads: z.pendingUploads,
54
+ isCountLimitReached: z.isCountLimitReached,
55
+ isRecurring: o(C),
56
+ messages: f
57
+ }) : void 0, vt = s((e) => {
58
+ w((t) => {
59
+ let n = e ?? "";
60
+ return n === t.customerId ? t : ve({
61
+ ...t,
62
+ customerId: n
63
+ });
64
+ });
65
+ }, []), yt = i({
66
+ view: st,
67
+ setView: ct,
68
+ selectedId: C.customerId || void 0,
69
+ setSelectedId: vt,
70
+ messages: ft,
71
+ counterpartType: "customer",
72
+ counterpart: void 0,
73
+ primaryAddress: mt
74
+ }), bt = s((e) => w((t) => {
75
+ let n = e({
76
+ paymentTermsId: t.paymentTermsId,
77
+ paymentTermsCustomDate: t.paymentTermsCustomDate
78
+ });
79
+ return {
80
+ ...t,
81
+ ...n,
82
+ ...n.paymentTermsId === "receipt_due" ? { paymentReminderId: "" } : {}
83
+ };
84
+ }), []), xt = We({
85
+ paymentTermsId: C.paymentTermsId,
86
+ paymentTermsCustomDate: C.paymentTermsCustomDate,
87
+ isRecurring: C.type === "invoice" && o(C),
88
+ messages: f,
89
+ onChange: bt
90
+ }), H = xt.reset, St = s((e) => w((t) => ({
91
+ ...t,
92
+ ...e
93
+ })), []), Ct = Ke({
94
+ open: v,
95
+ bankAccountId: C.bankAccountId,
96
+ embeddedBankName: $e,
97
+ messages: f,
98
+ onSelect: St
99
+ }), U = Ct.reset, wt = Ve(x), W = x ? wt.data : void 0, G = ye(W), Tt = G > 0, K = !!x && wt.isLoading, q = u(void 0);
100
+ c(() => {
101
+ W && q.current !== W.id && (q.current = W.id, w((e) => ({
102
+ ...e,
103
+ ...be(W)
104
+ })));
105
+ }, [W]);
106
+ let Et = s((e) => w(e), []), Dt = s((e) => T((t) => {
107
+ if (!e.some((e) => e in t)) return t;
108
+ let n = { ...t };
109
+ return e.forEach((e) => delete n[e]), n;
110
+ }), []), Ot = u([]), kt = s((e) => {
111
+ if (!j) {
112
+ Dt(e);
113
+ return;
114
+ }
115
+ Ot.current.push(...e);
116
+ }, [Dt, j]);
117
+ c(() => {
118
+ let e = Ot.current;
119
+ if (!e.length) return;
120
+ Ot.current = [];
121
+ let t = xe({
122
+ fields: C,
123
+ issuedCount: G,
124
+ messages: f
125
+ });
126
+ T((n) => {
127
+ let r = { ...n };
128
+ return e.forEach((e) => {
129
+ t[e] ? r[e] = t[e] : delete r[e];
130
+ }), r;
31
131
  });
32
132
  }, [
33
- u,
34
- l,
35
- r,
36
- d,
37
- a.notAvailable,
38
- i,
39
- o
133
+ G,
134
+ f,
135
+ C
40
136
  ]);
137
+ let At = Ge({
138
+ values: C,
139
+ errors: ot,
140
+ lockSchedule: Tt,
141
+ messages: f,
142
+ onChange: Et,
143
+ onClearErrors: Dt,
144
+ onRevalidateErrors: kt
145
+ }), J = At.reset, jt = s((e) => w((t) => ({
146
+ ...t,
147
+ ...e
148
+ })), []), Mt = p.isPending || m.isPending || tt.isPending || nt.isPending, Nt = qe({
149
+ open: v,
150
+ isInvoice: C.type === "invoice",
151
+ disabled: Mt,
152
+ paymentTermsId: C.paymentTermsId,
153
+ paymentTermsCustomDate: C.paymentTermsCustomDate,
154
+ paymentReminderId: C.paymentReminderId,
155
+ overdueReminderId: C.overdueReminderId,
156
+ messages: f,
157
+ onSelect: jt
158
+ }), Y = Nt.reset, Pt = s(() => {
159
+ g.current = [], A(void 0), rt("create"), at(void 0), S(void 0), q.current = void 0, h.current = void 0, w(Ae()), T({}), M(!1), L(!1), I.current = {
160
+ lines: !1,
161
+ discount: !1
162
+ }, B(), J();
163
+ }, [B, J]), Ft = s((e = "invoice") => {
164
+ H(), U(), J();
165
+ let t = {
166
+ ...Ae(),
167
+ type: e
168
+ };
169
+ Y(Le(t)), g.current = [], h.current = void 0, q.current = void 0, A(void 0), rt("create"), at(void 0), S(void 0), w(t), T({}), B(), M(!1), L(!1), I.current = {
170
+ lines: !1,
171
+ discount: !1
172
+ }, y(!0);
173
+ }, [
174
+ B,
175
+ H,
176
+ U,
177
+ J,
178
+ Y
179
+ ]), It = s((e) => {
180
+ if (e.type === "credit_note") return;
181
+ H(), U(), J();
182
+ let t = Fe(e, O);
183
+ Y(Le(t)), g.current = e.line_items, _.current = e.currency, h.current = void 0, q.current = void 0, A(void 0), rt("edit"), at(e.id), S(e.type === "invoice" ? e.recurrence_id ?? void 0 : void 0), w(t), T({}), M(!1), L(!1), I.current = {
184
+ lines: !1,
185
+ discount: !1
186
+ }, B(), y(!0);
187
+ }, [
188
+ B,
189
+ H,
190
+ U,
191
+ J,
192
+ Y,
193
+ O
194
+ ]);
195
+ c(() => {
196
+ O?.length && w((e) => {
197
+ let t = se(e.lineItems, O);
198
+ return t === e.lineItems ? e : {
199
+ ...e,
200
+ lineItems: t
201
+ };
202
+ });
203
+ }, [O]);
204
+ let X = z.isUploading, Lt = s(() => {
205
+ X || (V(), y(!1), T({}));
206
+ }, [V, X]), Rt = s((e) => {
207
+ let t = { ...e };
208
+ t.taxRate !== void 0 && (t.taxRate = le(t.taxRate), F.current = !0), t.type !== void 0 && t.type !== "invoice" && V(), t.discount !== void 0 && j && (P.current = !0), t.discountType !== void 0 && (P.current = !0), t.currency !== void 0 && (N.current = !0), w((e) => {
209
+ let n = {
210
+ ...e,
211
+ ...t
212
+ };
213
+ return t.discount !== void 0 && (n.discount = Te(t.discount, n.discountType, n.currency)), n.currency !== e.currency && (n.lineItems = e.lineItems.map((t) => ({
214
+ ...t,
215
+ price: ne(t.price, e.currency, n.currency)
216
+ }))), (n.currency !== e.currency || n.discountType !== e.discountType) && (n.discount = Se({
217
+ value: n.discount,
218
+ type: n.discountType,
219
+ currency: n.currency
220
+ })), n;
221
+ });
222
+ }, [V, j]), zt = s(() => L(!0), []), Bt = s(() => {
223
+ L(!1), P.current = !0, w((e) => ({
224
+ ...e,
225
+ discount: Se({
226
+ value: e.discount,
227
+ type: e.discountType,
228
+ currency: e.currency
229
+ })
230
+ }));
231
+ }, []), Vt = s(() => {
232
+ F.current = !0, w((e) => {
233
+ let t = te(e.taxRate);
234
+ return t === e.taxRate ? e : {
235
+ ...e,
236
+ taxRate: t
237
+ };
238
+ });
239
+ }, []), Z = s((e, { validate: t }) => {
240
+ t && (N.current = !0), w((t) => ({
241
+ ...t,
242
+ lineItems: e(t.lineItems)
243
+ }));
244
+ }, []);
245
+ c(() => {
246
+ let e = N.current, t = P.current;
247
+ if (!e && !t && !F.current) return;
248
+ N.current = !1, P.current = !1, F.current = !1, e && (I.current.lines = !0), t && (I.current.discount = !0);
249
+ let n = e ? me(C.lineItems, {
250
+ currency: C.currency,
251
+ messages: f
252
+ }) : void 0;
253
+ T((t) => {
254
+ let r = { ...t };
255
+ return I.current.lines && (r.lineItems = e ? n : t.lineItems, r.lineItemsSummary = fe(r.lineItems, ke(C, f))), I.current.discount && (r.discount = Oe(C, f)), r;
256
+ });
257
+ }, [f, C]);
258
+ let Ht = s((e, t) => {
259
+ let { unit: n, ...r } = t, i = ce(r);
260
+ i.name !== void 0 && (i.productId = ""), n !== void 0 && (i.measureUnitId = n, i.measureUnitName = ""), i.taxable !== void 0 && (F.current = !0), Z((t) => t.map((t) => t.id === e ? {
261
+ ...t,
262
+ ...i
263
+ } : t), { validate: j });
264
+ }, [Z, j]), Ut = s((e, t) => {
265
+ Z((n) => n.map((n) => n.id === e ? {
266
+ ...n,
267
+ ...ae({
268
+ product: t,
269
+ currency: C.currency,
270
+ unitNamesById: k
271
+ })
272
+ } : n), { validate: !0 });
273
+ }, [
274
+ Z,
275
+ k,
276
+ C.currency
277
+ ]), Q = s((e, t) => {
278
+ t && Z((n) => t.kind === "remove" ? n.filter((t) => t.id !== e) : n.map((n) => n.id === e ? {
279
+ ...n,
280
+ ...t.patch
281
+ } : n), { validate: !0 });
282
+ }, [Z]), Wt = s((e, t) => {
283
+ let n = C.lineItems.find((t) => t.id === e);
284
+ n && Q(e, ee({
285
+ lineItem: n,
286
+ field: t,
287
+ rowCount: C.lineItems.length,
288
+ currency: C.currency
289
+ }));
290
+ }, [
291
+ Q,
292
+ C.currency,
293
+ C.lineItems
294
+ ]), Gt = s((e, t) => {
295
+ let n = C.lineItems.find((t) => t.id === e);
296
+ n && Q(e, ue({
297
+ lineItem: n,
298
+ step: t,
299
+ rowCount: C.lineItems.length
300
+ }));
301
+ }, [Q, C.lineItems]), Kt = s(() => {
302
+ let e = re(C.currency);
303
+ A(e.id), w((t) => ({
304
+ ...t,
305
+ lineItems: [...t.lineItems, e]
306
+ }));
307
+ }, [C.currency]), qt = s((e) => {
308
+ Z((t) => t.length <= 1 ? t : t.filter((t) => t.id !== e), { validate: !0 });
309
+ }, [Z]), Jt = s(async () => {
310
+ if (X || K) return;
311
+ if (D.isLoading) {
312
+ T({ form: f.lineItemsLoading });
313
+ return;
314
+ }
315
+ let e = de(C.lineItems), n = e.length === C.lineItems.length ? C : {
316
+ ...C,
317
+ lineItems: e
318
+ };
319
+ n !== C && w(n);
320
+ let r = n.type === "invoice" && o(n), i = {
321
+ ...Ie({
322
+ values: n,
323
+ billingAddressId: R,
324
+ messages: f
325
+ }),
326
+ ...r ? xe({
327
+ fields: n,
328
+ issuedCount: G,
329
+ messages: f
330
+ }) : {}
331
+ };
332
+ if (je(i)) {
333
+ T(i), M(!0), I.current = {
334
+ lines: !0,
335
+ discount: !0
336
+ };
337
+ return;
338
+ }
339
+ T({});
340
+ let a = b === "edit" ? it : h.current;
341
+ try {
342
+ let e, t;
343
+ if (a) {
344
+ let i = await m.mutateAsync({
345
+ path: { receivable_id: a },
346
+ body: Pe({
347
+ values: n,
348
+ billingAddressId: R ?? "",
349
+ lineItemChanges: Ne({
350
+ values: n,
351
+ originalLineItems: g.current,
352
+ originalCurrency: _.current,
353
+ unitNamesById: k,
354
+ units: O
355
+ })
356
+ })
357
+ });
358
+ gt(), e = a, t = i?.type ?? n.type, r && i && (g.current = i.line_items, _.current = i.currency, n = {
359
+ ...n,
360
+ lineItems: oe(n.lineItems, i.line_items)
361
+ }, w(n));
362
+ } else {
363
+ let i = await p.mutateAsync({ body: Me({
364
+ values: n,
365
+ billingAddressId: R ?? "",
366
+ unitNamesById: k
367
+ }) });
368
+ if (!i?.id) {
369
+ y(!1), Pt();
370
+ return;
371
+ }
372
+ e = i.id, t = i.type, r && (h.current = i.id, g.current = i.line_items, _.current = i.currency, n = {
373
+ ...n,
374
+ lineItems: oe(n.lineItems, i.line_items)
375
+ }, w(n));
376
+ }
377
+ r && (W ? await nt.mutateAsync({
378
+ path: { recurrence_id: W.id },
379
+ body: _e(n, { lockSchedule: Tt })
380
+ }) : await tt.mutateAsync({ body: ge(n, e) }));
381
+ let i = b === "create";
382
+ y(!1), Pt(), i && et?.(e, t);
383
+ } catch (e) {
384
+ T({ form: t(e) ?? f.genericError });
385
+ }
386
+ }, [
387
+ R,
388
+ gt,
389
+ p,
390
+ tt,
391
+ it,
392
+ W,
393
+ X,
394
+ G,
395
+ Tt,
396
+ f,
397
+ b,
398
+ et,
399
+ K,
400
+ Pt,
401
+ O,
402
+ k,
403
+ D.isLoading,
404
+ m,
405
+ nt,
406
+ C
407
+ ]), Yt = l(() => ({
408
+ ...C,
409
+ discount: ut ? C.discount : Ce(we(C.discount, C.discountType, C.currency), C.discountType, C.currency),
410
+ lineItems: C.lineItems.map(pe)
411
+ }), [ut, C]), Xt = l(() => a(C.lineItems), [C.lineItems]), $ = l(() => De(C), [C]), Zt = l(() => Ee($, C.currency), [$, C.currency]), Qt = Je({
412
+ values: C,
413
+ totals: $,
414
+ billingAddress: mt,
415
+ unitNamesById: k,
416
+ messages: f,
417
+ enabled: v
418
+ });
419
+ return {
420
+ open: v,
421
+ setOpen: y,
422
+ mode: b,
423
+ values: C,
424
+ sheetValues: Yt,
425
+ errors: ot,
426
+ setValues: w,
427
+ updateValues: Rt,
428
+ commitTaxRate: Vt,
429
+ focusDiscount: zt,
430
+ commitDiscount: Bt,
431
+ updateLineItem: Ht,
432
+ selectProduct: Ut,
433
+ commitLineItem: Wt,
434
+ stepLineItem: Gt,
435
+ addLineItem: Kt,
436
+ removeLineItem: qt,
437
+ attachmentsView: _t,
438
+ attachmentsUploading: z.isUploading,
439
+ saveDisabled: D.isLoading || z.isUploading || K,
440
+ selectAttachmentFiles: z.selectFiles,
441
+ setAttachmentIncludeInEmail: z.setIncludeInEmail,
442
+ removeAttachment: z.remove,
443
+ autoFocusLineItemId: lt,
444
+ lineItemUnitOptions: E.unitOptions,
445
+ lineItemsLoading: D.isLoading,
446
+ lineItemControls: Xt,
447
+ totals: $,
448
+ preview: Qt,
449
+ totalsView: Zt,
450
+ currencySymbol: ie(C.currency),
451
+ isSubmitting: Mt,
452
+ currencyOptions: Ye(C.currency),
453
+ paymentTerms: xt,
454
+ showBillingSection: C.type === "invoice" || b === "edit",
455
+ recurrence: At,
456
+ showRecurrenceSection: C.type === "invoice",
457
+ recurrenceLoading: K,
458
+ submitLabel: C.type === "invoice" && o(C) ? W ? f.recurrenceUpdateButton : f.recurrenceActivateButton : void 0,
459
+ showDueDateField: C.type === "quote",
460
+ openCreate: Ft,
461
+ openEdit: It,
462
+ close: Lt,
463
+ submit: Jt,
464
+ units: E,
465
+ counterpartView: st,
466
+ counterpartForm: yt,
467
+ stateOptions: dt,
468
+ openCounterpartCreate: yt.openCreate,
469
+ bankAccount: Ct,
470
+ reminders: Nt
471
+ };
41
472
  }
42
473
  //#endregion
43
- export { r as useReceivableStatusCards };
474
+ export { f as useReceivableForm };