@tesouro/embedded-components-react 0.5.188 → 0.5.190

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 (290) 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/accept-disclosures-widget/feature/dist/index5.js +34 -34
  4. package/dist/libs/tesouro-embedded-components-react/balances-widget/feature/dist/index3.js +18 -18
  5. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/data-access/dist/index9.js +2 -2
  6. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index25.js +263 -263
  7. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/index7.js +89 -89
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index.js +33 -14
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index10.js +29 -74
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index11.js +18 -55
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index12.js +24 -42
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index13.js +13 -327
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index14.js +31 -7
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index15.js +8 -35
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index16.js +92 -14
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index17.js +20 -137
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index18.js +69 -28
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index19.js +58 -0
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index2.js +35 -0
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index20.js +47 -0
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index21.js +88 -0
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index22.js +36 -0
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index23.js +35 -0
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index24.js +40 -0
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index25.js +34 -0
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index26.js +34 -0
  27. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index27.js +34 -0
  28. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index28.js +36 -0
  29. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index29.js +36 -0
  30. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index3.js +16 -4
  31. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index30.js +36 -0
  32. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index31.js +8 -0
  33. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index32.js +35 -0
  34. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index33.js +49 -0
  35. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index34.js +36 -0
  36. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index35.js +47 -0
  37. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index36.js +27 -0
  38. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index37.js +15 -0
  39. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index38.js +35 -0
  40. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index39.js +55 -0
  41. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index4.js +27 -13
  42. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index40.js +20 -0
  43. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index41.js +43 -0
  44. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index42.js +27 -0
  45. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index43.js +35 -0
  46. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index44.js +29 -0
  47. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index45.js +29 -0
  48. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index46.js +6 -0
  49. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index47.js +39 -0
  50. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index5.js +2 -33
  51. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index6.js +35 -255
  52. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index7.js +59 -123
  53. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index8.js +13 -91
  54. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index9.js +29 -29
  55. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +19 -21
  56. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index10.js +5 -62
  57. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index11.js +15 -4
  58. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index12.js +22 -5
  59. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index13.js +51 -211
  60. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index14.js +1 -4
  61. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index15.js +84 -15
  62. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index16.js +5 -24
  63. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index17.js +31 -62
  64. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index18.js +41 -2
  65. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index19.js +167 -81
  66. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index2.js +56 -5
  67. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index20.js +46 -3
  68. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index21.js +1 -7
  69. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index22.js +47 -3
  70. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index23.js +13 -32
  71. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index24.js +8 -38
  72. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index25.js +7 -163
  73. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index26.js +61 -41
  74. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index27.js +13 -1
  75. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index28.js +24 -45
  76. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index29.js +162 -13
  77. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index3.js +4 -56
  78. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index30.js +25 -8
  79. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index31.js +16 -7
  80. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index32.js +32 -57
  81. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index33.js +96 -8
  82. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index34.js +81 -24
  83. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index35.js +3 -158
  84. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index36.js +45 -10
  85. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index37.js +111 -23
  86. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index38.js +189 -21
  87. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index39.js +69 -33
  88. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index4.js +38 -5
  89. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index40.js +29 -13
  90. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index41.js +89 -8
  91. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index42.js +412 -4
  92. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +12 -97
  93. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js +83 -82
  94. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index45.js +80 -3
  95. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +224 -134
  96. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +44 -45
  97. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +247 -109
  98. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js +22 -191
  99. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index5.js +6 -38
  100. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index50.js +614 -66
  101. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +4 -35
  102. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +42 -89
  103. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +243 -398
  104. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +3 -16
  105. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +3 -86
  106. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +43 -80
  107. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +1 -232
  108. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +6 -44
  109. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +11 -252
  110. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index6.js +24 -5
  111. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +130 -23
  112. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js +3 -628
  113. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index62.js +6 -4
  114. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js +127 -40
  115. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +8 -257
  116. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js +10 -3
  117. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.js +82 -2
  118. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index67.js +22 -44
  119. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index68.js +22 -1
  120. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index69.js +29 -6
  121. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index7.js +12 -22
  122. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index70.js +83 -10
  123. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index71.js +48 -130
  124. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index72.js +262 -3
  125. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index73.js +32 -3
  126. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index74.js +387 -124
  127. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index75.js +307 -8
  128. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index76.js +4 -10
  129. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index77.js +4 -81
  130. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index78.js +111 -21
  131. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index79.js +1 -22
  132. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index8.js +37 -13
  133. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index80.js +24 -28
  134. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index9.js +222 -35
  135. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +46 -42
  136. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index100.js +10 -126
  137. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index101.js +105 -1
  138. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index102.js +2 -33
  139. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index103.js +28 -7
  140. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index104.js +73 -126
  141. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index105.js +1 -1
  142. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index106.js +30 -11
  143. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index107.js +8 -106
  144. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index108.js +181 -2
  145. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index109.js +2 -10
  146. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index110.js +12 -50
  147. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index111.js +108 -2
  148. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index112.js +2 -0
  149. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index113.js +10 -0
  150. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index114.js +52 -0
  151. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index115.js +2 -0
  152. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index20.js +1 -14
  153. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index21.js +12 -16
  154. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index22.js +18 -2
  155. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index23.js +2 -4
  156. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index24.js +2 -28
  157. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index25.js +30 -2
  158. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index26.js +2 -32
  159. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index27.js +32 -1
  160. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index28.js +1 -35
  161. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index29.js +32 -18
  162. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index30.js +19 -135
  163. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index31.js +137 -2
  164. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index32.js +2 -4
  165. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index33.js +78 -12
  166. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index34.js +278 -1
  167. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index35.js +2 -4
  168. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index36.js +16 -17
  169. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index37.js +56 -2
  170. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index38.js +1 -106
  171. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index39.js +15 -76
  172. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index40.js +51 -275
  173. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index42.js +19 -5
  174. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index43.js +368 -50
  175. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index45.js +19 -14
  176. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index46.js +92 -50
  177. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index48.js +25 -28
  178. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index49.js +43 -363
  179. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index51.js +48 -15
  180. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index52.js +10 -93
  181. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index53.js +197 -2
  182. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index54.js +1 -31
  183. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index55.js +2 -52
  184. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index56.js +41 -2
  185. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index57.js +1 -55
  186. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index58.js +16 -10
  187. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index59.js +75 -184
  188. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index60.js +1 -1
  189. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index61.js +46 -2
  190. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index62.js +313 -36
  191. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index64.js +6 -16
  192. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index65.js +26 -81
  193. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index67.js +2 -317
  194. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index68.js +1 -9
  195. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index69.js +13 -31
  196. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index70.js +170 -2
  197. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index71.js +2 -2
  198. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index72.js +4 -1
  199. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index73.js +34 -13
  200. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index74.js +2 -170
  201. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index75.js +39 -2
  202. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index76.js +10 -2
  203. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index77.js +195 -30
  204. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index78.js +1 -0
  205. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index79.js +2 -37
  206. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index80.js +14 -10
  207. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index81.js +2 -201
  208. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index82.js +4 -3
  209. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index83.js +20 -16
  210. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index84.js +1 -508
  211. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index85.js +62 -7
  212. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index86.js +14 -5
  213. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index87.js +493 -77
  214. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/{feature/dist/index87.js → ui/dist/index88.js} +1 -2
  215. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index89.js +10 -2
  216. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index90.js +5 -3
  217. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index91.js +88 -25
  218. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index93.js +2 -7
  219. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index94.js +5 -32
  220. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index95.js +30 -2
  221. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index96.js +2 -12
  222. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index97.js +5 -104
  223. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index98.js +34 -2
  224. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index99.js +2 -31
  225. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/util/dist/lib/billDetailLabels.js +146 -0
  226. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/util/dist/lib/derivePayableStatus.js +62 -0
  227. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/util/dist/lib/formatBillMoney.js +7 -0
  228. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/util/dist/lib/formatScheduledDateLabel.js +12 -0
  229. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/util/dist/lib/isEditablePayableStatus.js +7 -0
  230. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/util/dist/lib/isLiveScheduledPaymentRecord.js +7 -0
  231. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/util/dist/lib/maskAccountNumber.js +6 -0
  232. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/util/dist/lib/payableDuplicates.js +48 -0
  233. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/util/dist/lib/payableTotals.js +18 -0
  234. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/util/dist/lib/resolveAmountDue.js +6 -0
  235. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/util/dist/lib/resolveLineItemAmount.js +11 -0
  236. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/util/dist/lib/resolveLineItemQuantity.js +7 -0
  237. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/util/dist/lib/resolveVendor.js +9 -0
  238. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/util/dist/lib/widgetName.js +4 -0
  239. package/dist/libs/tesouro-embedded-components-react/cards-widget/create-card/feature/dist/index8.js +95 -95
  240. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/index4.js +8 -8
  241. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index13.js +9 -9
  242. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index.js +8 -5
  243. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index10.js +7 -0
  244. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index11.js +6 -0
  245. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index2.js +31 -18
  246. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index3.js +1 -1
  247. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index4.js +2 -32
  248. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index5.js +23 -190
  249. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index6.js +163 -50
  250. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index7.js +1 -80
  251. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index8.js +101 -2
  252. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index9.js +85 -0
  253. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index10.js +1 -1
  254. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index7.js +3 -3
  255. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index8.js +1 -1
  256. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index9.js +10 -10
  257. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/index9.js +104 -104
  258. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index109.js +55 -49
  259. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index517.js +4 -4
  260. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index56.js +24 -18
  261. package/dist/libs/tesouro-embedded-components-react/remote-check-capture/feature/dist/lib/RemoteCheckCaptureWidget/useRemoteCheckCaptureWidget.js +47 -47
  262. package/dist/libs/tesouro-embedded-components-react/settings-widget/chart-of-accounts/feature/dist/index7.js +1 -1
  263. package/dist/libs/tesouro-embedded-components-react/settings-widget/profile/feature/dist/index4.js +11 -11
  264. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/index.js +10 -10
  265. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/subEntityForms.js +15 -15
  266. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useAddressForm.js +9 -9
  267. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useCounterpartDetails.js +7 -7
  268. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useCounterpartForm.js +53 -53
  269. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useCounterpartSelector.js +15 -15
  270. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/usePayableAchInstructions.js +4 -4
  271. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +35 -35
  272. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/WidgetTokenRefreshProvider.js +4 -4
  273. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  274. package/dist/libs/tesouro-embedded-components-react/shared/util/dist/lib/mergeLabelTree.js +12 -0
  275. package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/index4.js +1 -1
  276. package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/index6.js +46 -46
  277. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index4.js +5 -13
  278. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index8.js +1 -1
  279. package/package.json +3 -3
  280. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index81.js +0 -86
  281. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index82.js +0 -50
  282. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index83.js +0 -263
  283. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index84.js +0 -35
  284. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index85.js +0 -392
  285. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index86.js +0 -310
  286. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index88.js +0 -7
  287. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index89.js +0 -114
  288. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index90.js +0 -1
  289. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index91.js +0 -27
  290. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index92.js +0 -2
@@ -1,86 +1,87 @@
1
- import { formatCalendarDate as e } from "../../../shared/util/dist/lib/formatCalendarDate.js";
2
- import { derivePayableStatus as t } from "./index10.js";
3
- import { resolveVendor as n } from "./index12.js";
4
- import { resolveAmountDueMinorUnits as r } from "./index20.js";
5
- import { formatBillMoney as i } from "./index2.js";
6
- import { resolveLineItemAmountMinorUnits as a } from "./index41.js";
7
- import { resolveLineItemQuantity as o } from "./index42.js";
8
- import { getPaidAtLabel as s, resolveInvoiceTotalMinorUnits as c } from "./index43.js";
1
+ import { parseDecimalAmountToMinorUnits as e } from "../../../shared/util/dist/lib/parseDecimalAmountToMinorUnits.js";
9
2
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js
10
- function l({ payable: l, lineItems: u, glCodeOptions: d, glCodeRosterAvailable: f = !0, history: p, paymentHistory: m, approvalPolicy: h, labels: g, hasScheduledPayment: _, rejection: v, payableAchInstructions: y, payableAchInstructionsReadable: b = !1 }) {
11
- let x = l.currency, S = t({
12
- apiStatus: l.status,
13
- dueDate: l.due_date,
14
- scheduledPaymentDate: l.scheduled_payment_date,
15
- hasScheduledPayment: _
16
- }), C = n(l), w = b ? y : void 0, T = w?.account_number, E = !!(w?.account_holder_name && w.routing_number && w.account_number), D = e(l.issued_at) || g.notProvided, O = e(l.due_date) || g.notProvided, k = new Map(d.map((e) => [e.value, e.label])), A = [
17
- {
18
- label: g.subtotalRow,
19
- minorUnits: l.subtotal
20
- },
21
- {
22
- label: g.discountRow,
23
- minorUnits: l.discount
24
- },
25
- {
26
- label: g.taxRow,
27
- minorUnits: l.tax_amount
28
- }
29
- ].map((e) => ({
30
- label: e.label,
31
- value: i(e.minorUnits, x)
32
- })).filter((e) => !!e.value), j = i(c(l), x);
33
- j && A.push({
34
- label: g.totalRow,
35
- value: j,
36
- emphasis: !0
37
- });
38
- let M = s(l);
39
- return {
40
- amountDue: i(r(l), x) ?? "",
41
- amountPaid: M ? i(l.amount_paid, x) : void 0,
42
- paidOnLabel: M ? g.paidOnLabel(M) : void 0,
43
- invoiceDateLabel: D,
44
- dueDateLabel: O,
45
- dueDateTone: S.isOverdue ? "danger" : "default",
46
- status: S.status,
47
- statusTone: S.tone,
48
- payTo: {
49
- name: C?.name || g.notProvided,
50
- email: C?.email ?? "",
51
- methodLabel: E ? g.paymentInstructionsValue(T?.slice(-4) ?? "") : g.paymentInstructionsNotSet,
52
- hasPaymentInstructions: E
53
- },
54
- invoiceFields: [
55
- {
56
- label: g.invoiceDateRow,
57
- value: D
58
- },
59
- {
60
- label: g.dueDateRow,
61
- value: O
62
- },
63
- {
64
- label: g.invoiceNumberRow,
65
- value: l.document_id || g.notProvided
66
- }
67
- ],
68
- lineItems: u.map((e) => {
69
- let t = i(e.unit_price, x), n = String(o(e));
70
- return {
71
- id: e.id,
72
- description: e.name ?? e.description ?? "",
73
- glCodeLabel: e.ledger_account_id ? k.get(e.ledger_account_id) ?? (f ? g.glCodeMissing : g.glCodeUnavailable) : g.glCodeMissing,
74
- qtyPriceLabel: t ? g.qtyPriceValue(n, t) : g.qtyOnlyValue(n),
75
- amount: i(a(e), x) ?? ""
76
- };
77
- }),
78
- amountRows: A,
79
- approvalPolicy: h,
80
- paymentHistory: m,
81
- history: p,
82
- rejection: v
3
+ var t = "USD";
4
+ function n(n) {
5
+ return e(n, t);
6
+ }
7
+ function r(e) {
8
+ let t = e.trim();
9
+ if (!t) return null;
10
+ let n = Number(t);
11
+ return Number.isFinite(n) && n > 0 ? n : null;
12
+ }
13
+ function i(e) {
14
+ return !!(e.description.trim() || e.glCode.trim() || n(e.price) !== null || n(e.amount) !== null);
15
+ }
16
+ function a(e) {
17
+ return n(e) ?? 0;
18
+ }
19
+ function o(e) {
20
+ let t = Number.parseFloat(e);
21
+ return Number.isFinite(t) ? t : 0;
22
+ }
23
+ function s(e) {
24
+ let t = n(e);
25
+ return t === null ? e : c(t);
26
+ }
27
+ function c(e) {
28
+ return (e / 100).toFixed(2);
29
+ }
30
+ function l({ values: e, initialLineItems: r, counterpartId: i, clearCounterpart: a, counterpartBankAccountId: o, editedTotals: s, currentTotals: c, lineItems: l, document: f, includeBlankPoNumber: p = !0 }) {
31
+ let m = { currency: t };
32
+ i ? m.counterpart_id = i : a && (m.counterpart_id = null), i ? m.counterpart_bank_account_id = o ?? null : a && (m.counterpart_bank_account_id = null), e.invoiceNumber && (m.document_id = e.invoiceNumber), e.invoiceDate && (m.issued_at = e.invoiceDate), e.dueDate && (m.due_date = e.dueDate);
33
+ let h = e.poNumber.trim();
34
+ if ((h || p) && (m.purchase_order_number = h || null), f && (m.base64_encoded_file = f.base64EncodedFile, m.file_name = f.fileName), s && (m.discount = n(s.discount) ?? 0, m.tax_amount = n(s.tax) ?? 0, s.total !== void 0 && (m.total_amount = n(s.total) ?? 0)), c && l) {
35
+ let e = d(l), t = n(c.tax) ?? 0, r = n(c.discount) ?? 0, i = c.total === void 0 ? (e ?? 0) - r + t : n(c.total) ?? 0;
36
+ e !== void 0 && (m.subtotal = e), m.discount = r, m.tax_amount = t, m.total_amount = i;
37
+ } else if (r && !("total_amount" in m)) {
38
+ let e = u(r, {
39
+ tax: s?.tax,
40
+ discount: s?.discount
41
+ });
42
+ e !== void 0 && (m.total_amount = e);
43
+ }
44
+ return m;
45
+ }
46
+ function u(e, { tax: t, discount: r }) {
47
+ let i = d(e);
48
+ if (i !== void 0) return i + (t ? n(t) ?? 0 : 0) - (r ? n(r) ?? 0 : 0);
49
+ }
50
+ function d(e) {
51
+ let t = !1, r = e.reduce((e, r) => {
52
+ if (!i(r)) return e;
53
+ let a = n(r.amount);
54
+ return a === null ? e : (t = !0, e + a);
55
+ }, 0);
56
+ if (t) return r;
57
+ }
58
+ function f({ lineItems: e, editedTotals: t }) {
59
+ let r = d(e), i = n(t.tax) ?? 0, a = n(t.discount) ?? 0, o = {
60
+ discount: a,
61
+ tax_amount: i
83
62
  };
63
+ return r !== void 0 && (o.subtotal = r), t.total === void 0 ? r !== void 0 && (o.total_amount = r - a + i) : o.total_amount = n(t.total) ?? 0, o;
64
+ }
65
+ function p(e) {
66
+ return e.filter(i).map((e) => {
67
+ let t = n(e.amount), i = r(e.quantity) ?? 1, a = n(e.price) ?? (t === null ? 0 : Math.round(t / i)), o = Math.round(i * a), s = t ?? o;
68
+ return {
69
+ name: e.description,
70
+ quantity: i,
71
+ unit_price: a,
72
+ tax: 0,
73
+ subtotal: s,
74
+ tax_amount: 0,
75
+ total: s,
76
+ ...e.glCode ? { ledger_account_id: e.glCode } : {}
77
+ };
78
+ });
79
+ }
80
+ function m(e, t) {
81
+ return c(Math.round(o(e) * a(t)));
82
+ }
83
+ function h(e, t, n) {
84
+ return c(e.reduce((e, t) => e + a(t.amount), 0) + a(t) - a(n));
84
85
  }
85
86
  //#endregion
86
- export { l as buildBillDetailView };
87
+ export { h as calculateTotal, m as displayLineAmount, i as isPersistableLineItem, l as mapBillFormToPayload, p as mapLineItemsToPayload, f as mapPayableAmountFieldsToPayload, s as normalizeMoneyOnBlur, n as parseMoneyToMinorUnits, r as parseQuantity };
@@ -1,6 +1,83 @@
1
+ import { BILL_CREATE_MESSAGE_LABELS_EN as e } from "./index38.js";
2
+ import { isPersistableLineItem as t, parseMoneyToMinorUnits as n, parseQuantity as r } from "./index44.js";
1
3
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index45.js
2
- function e({ isUnsavedPromptOpen: e, isLocked: t, isDirty: n }) {
3
- return e ? "dismiss-prompt" : !t && n ? "prompt" : "close";
4
+ var i = /^(?:\d{1,3}(?:,\d{3})+(?:\.\d+)?|\d+(?:\.\d+)?|\.\d+)$/, a = 255, o = 10, s = 5, c = 30, l = 864e5;
5
+ function u() {
6
+ let e = /* @__PURE__ */ new Date();
7
+ return Date.UTC(e.getFullYear(), e.getMonth(), e.getDate());
8
+ }
9
+ function d() {
10
+ let e = new Date(u());
11
+ return e.setUTCFullYear(e.getUTCFullYear() - o), e;
12
+ }
13
+ function f(e) {
14
+ let t = new Date(e);
15
+ if (Number.isNaN(t.getTime())) return !1;
16
+ let n = new Date(u() + c * l);
17
+ return t < d() || t > n;
18
+ }
19
+ function p(e) {
20
+ let t = new Date(e);
21
+ if (Number.isNaN(t.getTime())) return !1;
22
+ let n = new Date(u());
23
+ return n.setUTCFullYear(n.getUTCFullYear() + s), t < d() || t > n;
24
+ }
25
+ function m(t, n = e) {
26
+ let r = {};
27
+ return t.poNumber.length > a && (r.poNumber = n.poNumberTooLong), Object.keys(r).length ? r : void 0;
28
+ }
29
+ function h(e) {
30
+ let t = e.trim();
31
+ return !t || n(t) !== null ? !0 : i.test(t) ? Number(t.replaceAll(",", "")) === 0 : !1;
32
+ }
33
+ function g(t, i = e) {
34
+ let a = {};
35
+ for (let e of t) {
36
+ let t = n(e.price), o = n(e.amount), s = {};
37
+ e.price.trim() && t === null && (s.price = i.unreadableMoney), e.amount.trim() && o === null && (s.amount = i.unreadableMoney), r(e.quantity) === null && (e.quantity.trim() || t !== null || o !== null) && (s.quantity = i.unusableQuantity), Object.keys(s).length && (a[e.id] = s);
38
+ }
39
+ return Object.keys(a).length ? a : void 0;
40
+ }
41
+ function _(i, a, o, s = e) {
42
+ let c = {};
43
+ a || (c.vendor = s.requiredField), i.invoiceNumber.trim() || (c.invoiceNumber = s.requiredField);
44
+ let l = i.invoiceDate.trim(), u = i.dueDate.trim();
45
+ l ? f(l) && (c.invoiceDate = s.implausibleInvoiceDate) : c.invoiceDate = s.requiredField, u ? p(u) ? c.dueDate = s.implausibleDueDate : l && u < l && (c.dueDate = s.dueBeforeInvoiceDate) : c.dueDate = s.requiredField;
46
+ let d = {};
47
+ return o.forEach((e, i) => {
48
+ if (i > 0 && !t(e)) return;
49
+ let a = {};
50
+ e.description.trim() || (a.description = s.requiredField), r(e.quantity) === null && (a.quantity = s.requiredField), n(e.price) === null && n(e.amount) === null && (a.price = s.requiredField, a.amount = s.requiredField), Object.keys(a).length && (d[e.id] = a);
51
+ }), {
52
+ formErrors: Object.keys(c).length ? c : void 0,
53
+ lineItemErrors: Object.keys(d).length ? d : void 0
54
+ };
55
+ }
56
+ function v(e) {
57
+ let t = e.trim();
58
+ if (!t) return !0;
59
+ let n = t.startsWith("-") ? t.slice(1) : t;
60
+ return i.test(n) ? Number(t.replaceAll(",", "")) <= 0 : !1;
61
+ }
62
+ function y(e, t) {
63
+ if (n(e) === null) return v(e) ? t.totalNotGreaterThanZero : t.unreadableTotal;
64
+ }
65
+ function b(t, n = e) {
66
+ let r = y(t, n);
67
+ return r ? { total: r } : void 0;
68
+ }
69
+ function x(t, r = e) {
70
+ if (t === void 0) return;
71
+ let i = n(t);
72
+ if (i !== null) return i > 0 ? void 0 : { total: r.totalNotGreaterThanZero };
73
+ }
74
+ function S(t, n, r, i = e) {
75
+ let a = {};
76
+ if (h(t) || (a.discount = i.unreadableDiscount), h(n) || (a.tax = i.unreadableTax), r !== void 0) {
77
+ let e = y(r, i);
78
+ e && (a.total = e);
79
+ }
80
+ return Object.keys(a).length ? a : void 0;
4
81
  }
5
82
  //#endregion
6
- export { e as resolveEditorDismissal };
83
+ export { h as isReadableMoneyOrZero, _ as validateBillCompleteness, b as validateBillTotalIsPayable, S as validateBillTotals, m as validateBillValues, g as validateLineItems, x as validateStoredAmountDue };
@@ -1,146 +1,236 @@
1
+ "use client";
2
+ "use client";
3
+ "use client";
4
+ "use client";
5
+ import { toast as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
6
+ import { extractApiErrorMessage as t } from "../../../shared/util/dist/lib/apiErrors.js";
7
+ import "../../../shared/ui/dist/index.js";
8
+ import { useReplacePayableLineItemsMutation as n } from "../../data-access/dist/index18.js";
9
+ import { useCreatePayableMutation as r } from "../../data-access/dist/index25.js";
10
+ import { useDeletePayableFileMutation as i } from "../../data-access/dist/index26.js";
11
+ import { useSubmitPayableForApprovalMutation as a } from "../../data-access/dist/index33.js";
12
+ import { useUpdatePayableMutation as o } from "../../data-access/dist/index34.js";
13
+ import { useValidatePayableMutation as s } from "../../data-access/dist/index36.js";
14
+ import "../../data-access/dist/index.js";
15
+ import { BILL_CREATE_MESSAGE_LABELS_EN as c } from "./index38.js";
16
+ import { encodeFileToBase64 as l } from "./index43.js";
17
+ import { mapBillFormToPayload as u, mapLineItemsToPayload as ee, mapPayableAmountFieldsToPayload as te } from "./index44.js";
18
+ import { validateBillCompleteness as ne, validateBillTotalIsPayable as d, validateBillTotals as re, validateBillValues as f, validateLineItems as p, validateStoredAmountDue as m } from "./index45.js";
19
+ import { useCallback as h, useRef as ie, useState as g } from "react";
1
20
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js
2
- var e = {
3
- edit: "Edit bill",
4
- payBill: "Pay bill",
5
- markAsPaid: "Mark as paid",
6
- reject: "Reject",
7
- approve: "Approve",
8
- cancel: "Cancel bill",
9
- cancelScheduledPayment: "Cancel scheduled payment",
10
- reopen: "Reopen bill",
11
- forceApprove: "Approve",
12
- forceReject: "Reject",
13
- policyOverridesHeading: "Policy overrides",
14
- decisionDialog: {
15
- reject: {
16
- title: "Reject this bill?",
17
- description: "The bill goes back as rejected and nobody else is asked to approve it.",
18
- confirmButton: "Reject bill",
19
- reason: {
20
- label: "Reason",
21
- placeholder: "Tell the submitter what needs to change"
22
- }
23
- },
24
- cancel: {
25
- title: "Cancel this bill?",
26
- description: "Cancelling is permanent. The bill can't be reopened, edited, or paid afterwards.",
27
- confirmButton: "Cancel bill"
28
- },
29
- cancelScheduledPayment: {
30
- title: "Cancel this scheduled payment?",
31
- description: "The payment will not be sent. The bill stays ready to pay, so you can schedule it again for another date.",
32
- confirmButton: "Cancel payment"
33
- },
34
- forceApprove: {
35
- title: "Override approval policy?",
36
- description: "The below people haven't approved this bill yet. Approving now will bypass their required review. This will be recorded in the audit history and can't be undone.",
37
- confirmButton: "Override and approve",
38
- noApprovalPolicy: {
39
- title: "Approve this bill?",
40
- description: "This bill has no approval policy applied. Approving now will be recorded in the audit history and can't be undone.",
41
- confirmButton: "Approve bill"
42
- }
43
- },
44
- forceReject: {
45
- title: "Override approval policy?",
46
- description: "The below people haven't approved this bill yet. Rejecting now will bypass their required review. This will be recorded in the audit history and can't be undone.",
47
- confirmButton: "Override and reject",
48
- noApprovalPolicy: {
49
- title: "Reject this bill?",
50
- description: "This bill has no approval policy applied. Rejecting now will be recorded in the audit history and can't be undone.",
51
- confirmButton: "Reject bill"
52
- }
53
- },
54
- cancelButton: "Cancel"
55
- },
56
- actionError: "Couldn't update this bill. Try again.",
57
- actionSuccess: {
58
- approve: "Bill approved.",
59
- reject: "Bill rejected.",
60
- markAsPaid: "Bill marked as paid.",
61
- cancel: "Bill canceled.",
62
- cancelScheduledPayment: "Scheduled payment canceled.",
63
- reopen: "Bill reopened.",
64
- forceApprove: "Bill approved, overriding the approval policy.",
65
- forceReject: "Bill rejected, overriding the approval policy.",
66
- forceApproveNoApprovalPolicy: "Bill approved.",
67
- forceRejectNoApprovalPolicy: "Bill rejected."
21
+ var _ = {
22
+ document_id: "invoiceNumber",
23
+ issued_at: "invoiceDate",
24
+ due_date: "dueDate",
25
+ counterpart_id: "vendor",
26
+ purchase_order_number: "poNumber"
27
+ }, v = { tax_amount: "tax" };
28
+ function y(e) {
29
+ return e.type === "type_error.none.not_allowed" || e.msg === "none is not an allowed value";
30
+ }
31
+ var ae = "pending-vendor";
32
+ function b(e) {
33
+ return !!t(e)?.includes("line_items_enabled");
34
+ }
35
+ function x(e) {
36
+ return !!t(e)?.includes("A vendor could not be linked or created for this payable");
37
+ }
38
+ function S(e, t = c) {
39
+ let n = {}, r = {}, i = [];
40
+ for (let a of e) {
41
+ let e = a.loc[0] ?? t.unknownValidationField, o = _[e], s = v[e], c = y(a) ? t.requiredField : a.msg;
42
+ o ? n[o] = c : s ? r[s] = c : i.push(t.unmappedValidationError(e, c));
68
43
  }
69
- }, t = {
70
- today: "today",
71
- tomorrow: "tomorrow"
72
- }, n = (e) => `Payment scheduled for ${e}`, r = (e) => `Scheduled - ${e}`, i = (e) => `Awaiting approval from ${new Intl.ListFormat("en", {
73
- style: "long",
74
- type: "conjunction"
75
- }).format(e)}.`, a = "Awaiting approval.", o = [
76
- "reject",
77
- "cancel",
78
- "cancelScheduledPayment",
79
- "forceApprove",
80
- "forceReject"
81
- ];
82
- function s(e, t) {
83
- let n = e.reason ? {
84
- ...e.reason,
85
- ...t?.reason
86
- } : void 0, r = e.noApprovalPolicy ? {
87
- ...e.noApprovalPolicy,
88
- ...t?.noApprovalPolicy
89
- } : void 0, i = {
90
- ...e,
91
- ...t,
92
- reason: n,
93
- noApprovalPolicy: r
44
+ return i.length && (n.form = i.join(" ")), {
45
+ formErrors: n,
46
+ totalsErrors: Object.keys(r).length ? r : void 0
94
47
  };
95
- return n || delete i.reason, r || delete i.noApprovalPolicy, i;
96
48
  }
97
- function c(e, t) {
98
- let n = {
99
- ...e,
100
- ...t
49
+ function C(e, t) {
50
+ if (!e && !t) return;
51
+ let n = {}, r = /* @__PURE__ */ new Set([...Object.keys(e ?? {}), ...Object.keys(t ?? {})]);
52
+ for (let i of r) n[i] = {
53
+ ...e?.[i],
54
+ ...t?.[i]
101
55
  };
102
- for (let r of o) n[r] = s(e[r], t?.[r]);
103
56
  return n;
104
57
  }
105
- function l(t) {
106
- let n = e;
107
- return {
108
- ...n,
109
- ...t,
110
- decisionDialog: c(n.decisionDialog, t?.decisionDialog),
111
- actionSuccess: {
112
- ...n.actionSuccess,
113
- ...t?.actionSuccess
58
+ function w({ payableId: t, form: _, counterpartId: v, isVendorPending: y, clearCounterpart: w, prepareVendorForSave: T, onSaved: E, onPayableCreated: D, readSavedStatus: O, onDraftSaved: k, onFinalized: A, labels: j }) {
59
+ let M = {
60
+ ...c,
61
+ ...j
62
+ }, [N, P] = g(), F = t ?? N, [I, L] = g(), R = h(() => L(void 0), []), [z, B] = g(!1), oe = h(() => B(!0), []), [V, H] = g(), U = ie(!1), [se, ce] = g(0), W = h(() => ce((e) => e + 1), []), G = r(), K = i(), q = o(), J = n(), Y = s(), X = a(), Z = h(() => _.isTotalsDirty ? re(_.discount, _.tax, _.totalOverride, M) : void 0, [_, M]), Q = h(() => {
63
+ let t = f(_.values, M), n = p(_.lineItems, M), r = Z();
64
+ return _.setErrors(t), _.setLineItemErrors(n), _.setTotalsErrors(r), !t && !n && !r || (n && e.error(M.lineItemsNeedAttention), W(), !1);
65
+ }, [
66
+ _,
67
+ M,
68
+ W,
69
+ Z
70
+ ]), $ = h(async (e, t) => {
71
+ let n = !F && I ? {
72
+ base64EncodedFile: await l(I),
73
+ fileName: I.name
74
+ } : void 0, r = _.isTotalsDirty ? {
75
+ discount: _.discount,
76
+ tax: _.tax,
77
+ total: _.totalOverride
78
+ } : void 0, i = u({
79
+ values: _.values,
80
+ initialLineItems: F ? void 0 : _.lineItems,
81
+ counterpartId: t ?? v,
82
+ clearCounterpart: w,
83
+ counterpartBankAccountId: e,
84
+ currentTotals: {
85
+ discount: _.discount,
86
+ tax: _.tax,
87
+ total: _.totalOverride
88
+ },
89
+ lineItems: _.lineItems,
90
+ editedTotals: r,
91
+ document: n
92
+ }), a = F;
93
+ if (a ? await q.mutateAsync({
94
+ path: { payable_id: a },
95
+ body: i
96
+ }) : (a = (await G.mutateAsync({ body: i }))?.id, a && (P(a), D?.(a), n && L(void 0))), !a) throw Error("Payable was created without an id");
97
+ if (z) {
98
+ try {
99
+ await K.mutateAsync({ path: { payable_id: a } });
100
+ } catch {}
101
+ B(!1);
114
102
  }
115
- };
116
- }
117
- var u = {
118
- paymentHistorySentLabel: "Payment sent",
119
- paymentHistoryScheduledLabel: "Payment scheduled",
120
- paymentHistoryCanceledLabel: "Payment canceled",
121
- paymentHistoryOtherLabel: "Payment",
122
- paymentHistoryMethodSuffix: (e, t) => `${e} via ${t}`,
123
- paymentHistoryOverpaidLabel: (e) => `+${e} overpaid`,
124
- paymentHistoryMarkedPaidExternalLabel: "Marked as paid manually",
125
- paymentHistoryMarkedPaidLabel: "Marked as paid",
126
- paymentHistoryPartiallyPaidExternalLabel: "Partial payment marked manually",
127
- paymentHistoryPartiallyPaidLabel: "Partial payment",
128
- paymentHistoryRevertedLabel: "Payment reverted",
129
- paymentHistoryMethodLabels: {
130
- ach: "ACH",
131
- us_ach: "ACH",
132
- wire: "Wire",
133
- check: "Check",
134
- paper_check: "Check",
135
- bank_account: "Bank transfer",
136
- card: "Card"
137
- }
138
- };
139
- function d(e) {
103
+ return await J.mutateAsync({
104
+ path: { payable_id: a },
105
+ body: { data: ee(_.lineItems) }
106
+ }), r && await q.mutateAsync({
107
+ path: { payable_id: a },
108
+ body: te({
109
+ lineItems: _.lineItems,
110
+ editedTotals: r
111
+ })
112
+ }), a;
113
+ }, [
114
+ v,
115
+ w,
116
+ G,
117
+ K,
118
+ z,
119
+ _.discount,
120
+ _.isTotalsDirty,
121
+ _.lineItems,
122
+ _.tax,
123
+ _.totalOverride,
124
+ _.values,
125
+ D,
126
+ F,
127
+ J,
128
+ I,
129
+ q
130
+ ]), le = h(async () => {
131
+ F && (await K.mutateAsync({ path: { payable_id: F } }), B(!1));
132
+ }, [K, F]);
140
133
  return {
141
- ...u.paymentHistoryMethodLabels,
142
- ...e
134
+ saveDraft: h(async () => {
135
+ if (!U.current && Q()) {
136
+ U.current = !0, H("draft");
137
+ try {
138
+ let t = await T?.();
139
+ if (t && !t.ok) return;
140
+ let n = await $(t?.counterpartBankAccountId, t?.counterpartId);
141
+ _.setErrors(void 0), E?.(n), k?.(n);
142
+ let r = await O?.();
143
+ return e.success(r === "draft" ? M.submittedDemoted : M.draftSaved), n;
144
+ } catch (e) {
145
+ _.setSaveFailureMessage(b(e) ? M.discountTaxBlockedByLineItems : M.saveFailed), W();
146
+ return;
147
+ } finally {
148
+ H(void 0), U.current = !1;
149
+ }
150
+ }
151
+ }, [
152
+ _,
153
+ Q,
154
+ M.discountTaxBlockedByLineItems,
155
+ M.draftSaved,
156
+ M.saveFailed,
157
+ M.submittedDemoted,
158
+ k,
159
+ E,
160
+ O,
161
+ T,
162
+ $,
163
+ W
164
+ ]),
165
+ finalize: h(async () => {
166
+ if (U.current) return;
167
+ let t = p(_.lineItems, M), n = f(_.values, M), r = Z(), i = d(_.total, M), a = _.isTotalsDirty ? m(_.totalOverride, M) : void 0, o = r || i || a ? {
168
+ ...a,
169
+ ...i,
170
+ ...r
171
+ } : void 0, { formErrors: s, lineItemErrors: c } = ne(_.values, v ?? (y ? ae : void 0), _.lineItems, M), l = C(c, t);
172
+ _.setLineItemErrors(l), _.setTotalsErrors(o);
173
+ let u = {
174
+ ...s,
175
+ ...n
176
+ };
177
+ if (_.setErrors(Object.keys(u).length ? u : void 0), t && e.error(M.lineItemsNeedAttention), l || o || Object.keys(u).length) {
178
+ W();
179
+ return;
180
+ }
181
+ U.current = !0, H("finalize");
182
+ try {
183
+ let t;
184
+ try {
185
+ let e = await T?.();
186
+ if (e && !e.ok) return;
187
+ t = await $(e?.counterpartBankAccountId, e?.counterpartId);
188
+ } catch (e) {
189
+ _.setSaveFailureMessage(b(e) ? M.discountTaxBlockedByLineItems : M.saveFailed), W();
190
+ return;
191
+ }
192
+ E?.(t);
193
+ try {
194
+ let n = await Y.mutateAsync({ path: { payable_id: t } });
195
+ if (n.validation_errors.length) {
196
+ let e = S(n.validation_errors, M);
197
+ _.setErrors(e.formErrors), _.setTotalsErrors(e.totalsErrors), W();
198
+ return;
199
+ }
200
+ await X.mutateAsync({ path: { payable_id: t } }), _.setErrors(void 0), A?.(t), e.success(M.billFinalized);
201
+ } catch (e) {
202
+ x(e) ? _.setErrors({ vendor: M.vendorResolutionFailed }) : _.setSaveFailureMessage(M.finalizeFailed), W();
203
+ }
204
+ } finally {
205
+ H(void 0), U.current = !1;
206
+ }
207
+ }, [
208
+ v,
209
+ y,
210
+ _,
211
+ M,
212
+ A,
213
+ E,
214
+ T,
215
+ $,
216
+ W,
217
+ X,
218
+ Z,
219
+ Y
220
+ ]),
221
+ payableId: F,
222
+ isSavingDraft: V === "draft",
223
+ isFinalizing: V === "finalize",
224
+ stagedFile: I,
225
+ stageFile: L,
226
+ clearStagedFile: R,
227
+ scrollToErrorToken: se,
228
+ isFileDeletionPending: z,
229
+ requestFileDeletion: oe,
230
+ detachFileNow: le,
231
+ isDeletingFile: K.isPending,
232
+ hasFileDeletionFailed: K.isError
143
233
  };
144
234
  }
145
235
  //#endregion
146
- export { i as AWAITING_APPROVAL_LABEL_EN, a as AWAITING_APPROVAL_UNKNOWN_LABEL_EN, e as BILL_DETAIL_ACTIONS_LABELS_EN, u as PAYMENT_HISTORY_LABELS_EN, t as SCHEDULED_RELATIVE_DAY_LABELS_EN, r as SCHEDULED_STATUS_BADGE_LABEL_EN, n as SCHEDULED_SUMMARY_LABEL_EN, l as mergeBillDetailActionsLabels, c as mergeDecisionDialogCopy, d as mergePaymentHistoryMethodLabels };
236
+ export { S as mapValidationErrorsToForm, w as useBillCreateController };