@tesouro/embedded-components-react 0.2.193 → 0.2.194

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 (449) hide show
  1. package/dist/lib/ReceivablesWidget.js +19 -19
  2. package/dist/libs/tesouro-embedded-components-react/balances-widget/ui/dist/index2.js +6 -6
  3. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index10.js +1 -1
  4. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index12.js +1 -1
  5. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index13.js +1 -1
  6. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index16.js +13 -3
  7. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index17.js +3 -13
  8. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index2.js +16 -16
  9. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index10.js +9 -9
  10. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index11.js +7 -7
  11. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index14.js +2 -2
  12. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index2.js +30 -30
  13. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index20.js +20 -20
  14. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index24.js +3 -3
  15. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index26.js +15 -15
  16. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/ui/dist/index2.js +42 -42
  17. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/ui/dist/index4.js +19 -19
  18. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/ui/dist/index5.js +11 -11
  19. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/ui/dist/index6.js +4 -4
  20. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/ui/dist/index8.js +10 -10
  21. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/index4.js +8 -8
  22. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/index5.js +4 -4
  23. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/index6.js +21 -21
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index4.js +19 -19
  25. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index3.js +19 -19
  26. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index4.js +32 -32
  27. package/dist/libs/tesouro-embedded-components-react/expense-approval-policies-widget/ui/dist/index5.js +4 -4
  28. package/dist/libs/tesouro-embedded-components-react/expense-approval-policies-widget/ui/dist/index7.js +20 -20
  29. package/dist/libs/tesouro-embedded-components-react/expense-approval-policies-widget/ui/dist/index8.js +17 -17
  30. package/dist/libs/tesouro-embedded-components-react/expense-receipt-match-widget/ui/dist/index2.js +20 -20
  31. package/dist/libs/tesouro-embedded-components-react/expense-receipt-match-widget/ui/dist/index3.js +11 -11
  32. package/dist/libs/tesouro-embedded-components-react/expense-receipt-match-widget/ui/dist/index4.js +6 -6
  33. package/dist/libs/tesouro-embedded-components-react/expense-receipt-match-widget/ui/dist/index5.js +6 -6
  34. package/dist/libs/tesouro-embedded-components-react/expense-receipt-match-widget/ui/dist/index6.js +4 -4
  35. package/dist/libs/tesouro-embedded-components-react/gl-code-table-widget/ui/dist/index2.js +34 -34
  36. package/dist/libs/tesouro-embedded-components-react/help-widget/ui/shadcn/dist/index2.js +4 -4
  37. package/dist/libs/tesouro-embedded-components-react/insights-widget/feature/dist/index10.js +17 -6
  38. package/dist/libs/tesouro-embedded-components-react/insights-widget/feature/dist/index6.js +1 -1
  39. package/dist/libs/tesouro-embedded-components-react/insights-widget/feature/dist/index7.js +2 -2
  40. package/dist/libs/tesouro-embedded-components-react/insights-widget/feature/dist/index9.js +6 -17
  41. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index2.js +18 -18
  42. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index12.js +6 -6
  43. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index2.js +6 -6
  44. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index4.js +4 -4
  45. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index5.js +40 -40
  46. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index6.js +14 -14
  47. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index7.js +10 -10
  48. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index9.js +61 -61
  49. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index13.js +14 -14
  50. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index2.js +4 -4
  51. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index5.js +19 -19
  52. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index6.js +9 -9
  53. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index8.js +18 -18
  54. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index9.js +15 -15
  55. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index103.js +1 -1
  56. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index107.js +2 -2
  57. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index108.js +2 -2
  58. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index109.js +1 -1
  59. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index111.js +1 -1
  60. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index113.js +1 -1
  61. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index115.js +1 -1
  62. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index117.js +23 -12
  63. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index118.js +12 -23
  64. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index12.js +6 -6
  65. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index120.js +2 -2
  66. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index121.js +2 -2
  67. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index124.js +32 -34
  68. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index125.js +35 -4
  69. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index126.js +4 -2
  70. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index127.js +2 -25
  71. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index128.js +23 -1269
  72. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index129.js +1270 -32
  73. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index13.js +11 -11
  74. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index139.js +1 -1
  75. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index14.js +5 -5
  76. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index145.js +2 -2
  77. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index147.js +1 -1
  78. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index15.js +3 -3
  79. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index151.js +2 -2
  80. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index153.js +2 -2
  81. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index154.js +1 -1
  82. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index157.js +2 -2
  83. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index159.js +1 -1
  84. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index160.js +1 -1
  85. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index163.js +1 -1
  86. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index164.js +2 -2
  87. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index166.js +99 -9
  88. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index167.js +57 -46
  89. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index168.js +9 -76
  90. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index169.js +42 -54
  91. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index170.js +76 -14
  92. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index171.js +54 -22
  93. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index172.js +14 -80
  94. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index173.js +25 -28
  95. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index174.js +76 -38
  96. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index175.js +29 -7
  97. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index176.js +41 -227
  98. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index177.js +7 -470
  99. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index178.js +227 -109
  100. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index179.js +445 -506
  101. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index180.js +107 -23
  102. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index181.js +518 -86
  103. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index182.js +26 -57
  104. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index183.js +25 -24
  105. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index184.js +11 -94
  106. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index185.js +16 -97
  107. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index186.js +19 -16
  108. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index187.js +2 -14
  109. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index188.js +8 -10
  110. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index189.js +19 -24
  111. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index190.js +19 -10
  112. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index191.js +27 -20
  113. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index192.js +114 -18
  114. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index193.js +70 -2
  115. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index194.js +7 -5
  116. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index195.js +12 -22
  117. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index196.js +25 -21
  118. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index197.js +96 -27
  119. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index198.js +94 -110
  120. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index199.js +14 -66
  121. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index200.js +8 -8
  122. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index201.js +14 -12
  123. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index203.js +7 -101
  124. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index204.js +35 -26
  125. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index205.js +100 -5
  126. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index206.js +25 -11
  127. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index207.js +4 -5
  128. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index208.js +12 -10
  129. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index209.js +7 -214
  130. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index210.js +10 -10
  131. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index211.js +214 -12
  132. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index212.js +9 -11
  133. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index213.js +12 -7
  134. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index214.js +12 -35
  135. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index215.js +2 -2
  136. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index216.js +1 -1
  137. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index225.js +3 -3
  138. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index227.js +2 -2
  139. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index237.js +1 -1
  140. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index238.js +1 -1
  141. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index24.js +1 -1
  142. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index242.js +6 -6
  143. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index245.js +1 -1
  144. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index246.js +1 -1
  145. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index247.js +1 -1
  146. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index248.js +2 -2
  147. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index25.js +1 -1
  148. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index250.js +2 -2
  149. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index251.js +1 -1
  150. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index252.js +1 -1
  151. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index253.js +1 -1
  152. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index26.js +1 -1
  153. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index261.js +40 -62
  154. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index262.js +344 -157
  155. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index263.js +302 -27
  156. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index264.js +98 -24
  157. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index265.js +159 -75
  158. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index266.js +267 -25
  159. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index267.js +25 -5
  160. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index268.js +18 -126
  161. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index269.js +5 -49
  162. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index27.js +1 -1
  163. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index270.js +483 -111
  164. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index271.js +162 -105
  165. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index272.js +39 -47
  166. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index273.js +56 -199
  167. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index274.js +29 -68
  168. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index275.js +119 -149
  169. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index276.js +23 -31
  170. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index277.js +44 -4
  171. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index278.js +53 -16
  172. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index279.js +22 -38
  173. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index28.js +1 -1
  174. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index280.js +55 -29
  175. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index281.js +28 -33
  176. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index282.js +58 -30
  177. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index283.js +16 -46
  178. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index284.js +73 -13
  179. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index285.js +44 -8
  180. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index286.js +63 -73
  181. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index287.js +157 -41
  182. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index288.js +27 -19
  183. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index289.js +28 -29
  184. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index29.js +1 -1
  185. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index290.js +78 -42
  186. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index291.js +25 -63
  187. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index292.js +122 -90
  188. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index293.js +43 -106
  189. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index294.js +115 -84
  190. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index295.js +107 -24
  191. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index296.js +50 -127
  192. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index297.js +189 -475
  193. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index298.js +68 -166
  194. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index299.js +65 -40
  195. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index30.js +1 -1
  196. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index300.js +12 -53
  197. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index301.js +41 -29
  198. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index302.js +14 -119
  199. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index303.js +79 -22
  200. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index304.js +149 -44
  201. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index305.js +30 -56
  202. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index306.js +4 -22
  203. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index307.js +17 -54
  204. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index308.js +37 -28
  205. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index309.js +29 -58
  206. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index31.js +1 -1
  207. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index310.js +32 -18
  208. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index311.js +32 -2
  209. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index312.js +47 -93
  210. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index313.js +12 -96
  211. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index314.js +8 -213
  212. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index315.js +22 -19
  213. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index316.js +25 -40
  214. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index317.js +126 -13
  215. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index318.js +23 -69
  216. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index319.js +22 -77
  217. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index32.js +1 -1
  218. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index320.js +15 -41
  219. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index321.js +17 -39
  220. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index322.js +164 -340
  221. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index323.js +130 -299
  222. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index324.js +152 -93
  223. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index325.js +10 -160
  224. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index326.js +18 -266
  225. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index327.js +61 -23
  226. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index328.js +67 -19
  227. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index329.js +53 -60
  228. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index33.js +1 -1
  229. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index330.js +8 -10
  230. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index331.js +6 -19
  231. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index332.js +60 -20
  232. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index333.js +22 -16
  233. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index334.js +61 -17
  234. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index335.js +14 -171
  235. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index336.js +10 -134
  236. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index337.js +2 -162
  237. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index338.js +94 -10
  238. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index339.js +97 -19
  239. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index34.js +1 -1
  240. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index340.js +210 -60
  241. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index341.js +19 -68
  242. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index342.js +18 -58
  243. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index343.js +28 -6
  244. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index344.js +37 -6
  245. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index345.js +59 -58
  246. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index346.js +94 -22
  247. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index347.js +108 -59
  248. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index348.js +88 -14
  249. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index349.js +70 -12
  250. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index350.js +41 -31
  251. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index353.js +45 -6
  252. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index354.js +32 -43
  253. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index355.js +17 -24
  254. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index356.js +41 -26
  255. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index357.js +23 -41
  256. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index358.js +72 -23
  257. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index359.js +88 -65
  258. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index36.js +6 -6
  259. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index360.js +33 -93
  260. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index361.js +9 -36
  261. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index362.js +10 -9
  262. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index363.js +6 -10
  263. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index37.js +6 -6
  264. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index370.js +120 -19
  265. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index371.js +18 -12
  266. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index372.js +16 -50
  267. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index373.js +16 -50
  268. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index374.js +16 -17
  269. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index375.js +16 -67
  270. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index376.js +7 -19
  271. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index377.js +49 -16
  272. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index378.js +16 -14
  273. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index379.js +72 -19
  274. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index38.js +5 -5
  275. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index380.js +16 -14
  276. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index381.js +16 -67
  277. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index382.js +16 -21
  278. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index383.js +3 -118
  279. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index384.js +11 -82
  280. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index385.js +96 -2
  281. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index386.js +34 -7
  282. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index387.js +31 -7
  283. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index388.js +66 -31
  284. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index389.js +46 -53
  285. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index39.js +3 -3
  286. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index390.js +25 -33
  287. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index391.js +16 -20
  288. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index392.js +19 -82
  289. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index393.js +12 -17
  290. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index394.js +47 -83
  291. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index395.js +46 -265
  292. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index396.js +16 -38
  293. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index397.js +61 -59
  294. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index398.js +19 -44
  295. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index399.js +19 -23
  296. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index40.js +2 -2
  297. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index400.js +14 -140
  298. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index401.js +18 -93
  299. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index402.js +13 -11
  300. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index403.js +67 -2
  301. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index404.js +20 -284
  302. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index405.js +111 -42
  303. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index406.js +81 -14
  304. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index407.js +2 -123
  305. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index408.js +11 -18
  306. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index409.js +11 -16
  307. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index41.js +1 -1
  308. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index410.js +28 -16
  309. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index411.js +38 -16
  310. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index412.js +10 -16
  311. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index413.js +32 -7
  312. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index414.js +4 -53
  313. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index415.js +127 -18
  314. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index416.js +80 -69
  315. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index417.js +17 -16
  316. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index418.js +86 -16
  317. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index419.js +269 -16
  318. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index420.js +39 -3
  319. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index421.js +65 -11
  320. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index422.js +44 -32
  321. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index423.js +24 -4
  322. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index424.js +139 -124
  323. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index425.js +95 -9
  324. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index426.js +11 -95
  325. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index427.js +2 -38
  326. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index428.js +282 -32
  327. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index429.js +45 -65
  328. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index43.js +7 -7
  329. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index430.js +15 -47
  330. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index431.js +32 -26
  331. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index432.js +53 -21
  332. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index433.js +34 -26
  333. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index434.js +15 -27
  334. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index44.js +3 -3
  335. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index441.js +92 -70
  336. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index442.js +15 -85
  337. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index443.js +74 -54
  338. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index444.js +20 -52
  339. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index445.js +9 -55
  340. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index446.js +56 -29
  341. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index447.js +68 -53
  342. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index448.js +21 -40
  343. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index449.js +72 -45
  344. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index45.js +4 -4
  345. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index450.js +83 -69
  346. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index451.js +55 -21
  347. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index452.js +52 -81
  348. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index453.js +50 -48
  349. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index454.js +30 -33
  350. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index455.js +40 -85
  351. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index456.js +46 -23
  352. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index457.js +48 -100
  353. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index458.js +39 -108
  354. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index459.js +34 -72
  355. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index46.js +4 -4
  356. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index460.js +15 -67
  357. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index461.js +81 -37
  358. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index462.js +19 -12
  359. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index463.js +50 -28
  360. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index464.js +58 -23
  361. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index465.js +32 -38
  362. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index466.js +53 -38
  363. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index467.js +14 -94
  364. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index468.js +39 -16
  365. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index469.js +32 -73
  366. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index47.js +5 -5
  367. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index470.js +12 -22
  368. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index471.js +29 -9
  369. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index472.js +23 -15
  370. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index473.js +38 -18
  371. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index474.js +33 -51
  372. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index475.js +85 -59
  373. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index476.js +23 -32
  374. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index477.js +101 -39
  375. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index478.js +108 -33
  376. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index479.js +72 -13
  377. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index480.js +65 -51
  378. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index481.js +37 -32
  379. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index482.js +1 -1
  380. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index483.js +1 -1
  381. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index484.js +36 -48
  382. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index485.js +49 -53
  383. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index486.js +48 -35
  384. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index487.js +40 -17
  385. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index488.js +18 -38
  386. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index489.js +1 -1
  387. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index50.js +1 -1
  388. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index52.js +6 -6
  389. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index53.js +4 -4
  390. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index54.js +2 -2
  391. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index55.js +1 -1
  392. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index58.js +1 -1
  393. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index78.js +1 -1
  394. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index79.js +1 -1
  395. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index8.js +3 -3
  396. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index86.js +1 -1
  397. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index87.js +2 -2
  398. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index88.js +6 -6
  399. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index89.js +4 -4
  400. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index9.js +7 -7
  401. package/dist/libs/tesouro-embedded-components-react/products-widget/ui/dist/index4.js +25 -25
  402. package/dist/libs/tesouro-embedded-components-react/products-widget/ui/dist/index5.js +22 -22
  403. package/dist/libs/tesouro-embedded-components-react/products-widget/ui/dist/index6.js +12 -12
  404. package/dist/libs/tesouro-embedded-components-react/profile-widget/ui/dist/index2.js +9 -9
  405. package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/index2.js +18 -18
  406. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index10.js +8 -8
  407. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index12.js +10 -10
  408. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index14.js +25 -25
  409. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index16.js +4 -4
  410. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index18.js +2 -2
  411. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index2.js +7 -7
  412. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index20.js +27 -27
  413. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index10.js +8 -8
  414. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index11.js +8 -8
  415. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index12.js +5 -5
  416. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index14.js +15 -15
  417. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index4.js +2 -2
  418. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index5.js +14 -14
  419. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index6.js +6 -6
  420. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  421. package/dist/libs/tesouro-embedded-components-react/shared/monite-wrapper/feature/dist/lib/MoniteWrapper.js +19 -19
  422. package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/ui/dist/index3.js +23 -23
  423. package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/ui/dist/index4.js +71 -71
  424. package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/ui/dist/index5.js +5 -5
  425. package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/ui/dist/index6.js +3 -3
  426. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/EmptyState/EmptyState.js +4 -4
  427. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/ErrorState/ErrorState.js +4 -4
  428. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/OnboardingShell.js +8 -8
  429. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/OnboardingShellOverlayPortal.js +2 -2
  430. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/OnboardingShellScrollRegion.js +6 -6
  431. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/PaginationFooter/PaginationFooter.js +6 -6
  432. package/dist/libs/tesouro-embedded-components-react/tags-widget/ui/dist/index3.js +25 -25
  433. package/dist/libs/tesouro-embedded-components-react/tags-widget/ui/dist/index4.js +26 -26
  434. package/dist/libs/tesouro-embedded-components-react/tags-widget/ui/dist/index5.js +14 -14
  435. package/dist/libs/tesouro-embedded-components-react/team-widget/ui/dist/index10.js +67 -67
  436. package/dist/libs/tesouro-embedded-components-react/team-widget/ui/dist/index11.js +2 -2
  437. package/dist/libs/tesouro-embedded-components-react/team-widget/ui/dist/index12.js +12 -12
  438. package/dist/libs/tesouro-embedded-components-react/team-widget/ui/dist/index13.js +23 -23
  439. package/dist/libs/tesouro-embedded-components-react/team-widget/ui/dist/index15.js +37 -37
  440. package/dist/libs/tesouro-embedded-components-react/team-widget/ui/dist/index16.js +3 -3
  441. package/dist/libs/tesouro-embedded-components-react/team-widget/ui/dist/index2.js +9 -9
  442. package/dist/libs/tesouro-embedded-components-react/team-widget/ui/dist/index3.js +5 -5
  443. package/dist/libs/tesouro-embedded-components-react/team-widget/ui/dist/index5.js +30 -30
  444. package/dist/libs/tesouro-embedded-components-react/team-widget/ui/dist/index6.js +15 -15
  445. package/dist/libs/tesouro-embedded-components-react/team-widget/ui/dist/index8.js +8 -8
  446. package/dist/libs/tesouro-embedded-components-react/transfers-widget/ui/dist/index4.js +26 -26
  447. package/dist/libs/tesouro-embedded-components-react/transfers-widget/ui/dist/index5.js +6 -6
  448. package/dist/packages/shared-ui-shadcn/dist/index.js +9859 -7318
  449. package/package.json +23 -23
@@ -1,533 +1,472 @@
1
- import { jsx as e, jsxs as r, Fragment as $e } from "@emotion/react/jsx-runtime";
2
- import { MoniteScopedProviders as ct } from "./index83.js";
3
- import { useMoniteContext as dt } from "./index57.js";
4
- import { useCurrencies as mt } from "./index58.js";
5
- import { useMemo as Te, useState as w, useCallback as h } from "react";
6
- import "./index92.js";
7
- import { useLingui as ut } from "@lingui/react";
8
- import "react-dom";
9
- import "@mui/x-data-grid";
10
- import { useComponentSettings as pt } from "./index67.js";
11
- import { useGetReceivableById as wt } from "./index82.js";
12
- import { useCounterpartById as ft } from "./index70.js";
13
- import "@tanstack/react-query";
14
- import { useCounterpartAddresses as ht } from "./index72.js";
15
- import { getCounterpartEmail as Pe } from "./index7.js";
16
- import { useMyEntity as vt } from "./index78.js";
17
- import { toast as u } from "react-hot-toast";
18
- import { useUserPermissions as bt } from "./index146.js";
1
+ import { useState as U, useRef as ee, useId as ut, useMemo as ct } from "react";
2
+ import { useLingui as mt } from "@lingui/react";
3
+ import { format as te } from "date-fns";
4
+ import { toast as o } from "react-hot-toast";
5
+ import { buildPaymentTermsPayload as ae } from "./index305.js";
6
+ import { getCounterpartEmail as _t } from "./index7.js";
7
+ import { LanguageCodeEnum as lt } from "./index218.js";
8
+ import { rateMajorToMinor as ne } from "./index306.js";
9
+ import { useMoniteContext as pt } from "./index57.js";
10
+ import { useUserPermissions as ft } from "./index146.js";
19
11
  import "../../shared/data-access/dist/lib/rest/client/utils.gen.js";
20
12
  import "../../shared/data-access/dist/lib/EmbedApiContext.js";
21
13
  import "../../shared/data-access/dist/lib/rest/client.gen.js";
14
+ import "@tanstack/react-query";
22
15
  import "../../shared/data-access/dist/lib/rest/zod.gen.js";
23
- import { Scope as D } from "../../shared/data-access/dist/lib/scopes.js";
24
- import { AccessRestriction as yt } from "./index157.js";
25
- import { Accordion as gt, AccordionItem as B, AccordionTrigger as z, AccordionContent as V } from "./index220.js";
26
- import { Badge as $ } from "./index221.js";
27
- import { Button as j } from "./index84.js";
28
- import { DialogTitle as T } from "./index222.js";
29
- import { Sheet as _t, SheetContent as xt, SheetDescription as Nt, SheetHeader as It, SheetTitle as Ct } from "./index135.js";
30
- import { TooltipProvider as Lt, Tooltip as ke, TooltipTrigger as Se, TooltipContent as Fe } from "./index223.js";
31
- import { Typography as s } from "./index85.js";
32
- import { cn as G } from "./index100.js";
33
- import { LoadingSpinner as Ee } from "./index136.js";
34
- import { NotFound as Oe } from "./index154.js";
35
- import { ChevronLeft as Rt, Eye as At, Repeat as Me, CircleAlert as Dt } from "lucide-react";
36
- import { headerIconButtonClass as P, STATUS_ICON as $t, ACTION_ICON as Tt, HEADER_TOOLTIP_DELAY as Pt, amountValueToneClass as kt } from "./index224.js";
37
- import { buildInvoiceDetailsView as St } from "./index225.js";
38
- import { preventTooltipFocusOpen as Be } from "./index226.js";
39
- import { buildEditInvoiceFormValues as Ft } from "./index227.js";
40
- import { isPrimaryActionDisabled as Et } from "./index228.js";
41
- import { getInvoiceValidationSchema as Ot } from "./index176.js";
42
- import { useDuplicateInvoice as Mt } from "./index229.js";
43
- import { useGetOverdueReminderById as Bt } from "./index230.js";
44
- import { useGetPaymentRecords as zt } from "./index231.js";
45
- import { useGetPaymentReminderById as Vt } from "./index232.js";
46
- import { useGetRecurrenceById as jt } from "./index233.js";
47
- import { useGetReceivablePDFById as Gt } from "./index234.js";
48
- import { useGetInvoiceRequiredFields as Ht } from "./index235.js";
49
- import { useIssueReceivableById as Ut } from "./index236.js";
50
- import { usePauseRecurrence as qt } from "./index237.js";
51
- import { useResumeRecurrence as Wt } from "./index238.js";
52
- import { InvoiceDetailsAmountCell as Yt } from "./index239.js";
53
- import { InvoiceDetailsAttachments as Jt } from "./index240.js";
54
- import { InvoiceDetailsCloseButton as ze } from "./index241.js";
55
- import { ActionsModal as Kt } from "./index180.js";
56
- import { EditInvoiceDetails as Qt } from "./index242.js";
57
- import { InvoiceDetailsInfoRow as Ve } from "./index243.js";
58
- import { InvoiceDetailsCustomerRow as Xt } from "./index244.js";
59
- import { CounterpartDetails as Zt } from "./index2.js";
60
- import { InvoiceCancelModal as ei } from "./index245.js";
61
- import { InvoiceDeleteModal as ti } from "./index246.js";
62
- import { InvoiceDetailsTabScheduledInvoices as ii } from "./index247.js";
63
- import { InvoiceRecurrenceStatusChip as ri } from "./index167.js";
64
- import { InvoiceStatusChip as ni } from "./index55.js";
65
- import { MarkAsUncollectibleModal as ai } from "./index248.js";
66
- import { InvoiceDetailsOverflowMenu as si } from "./index249.js";
67
- import { RecordManualPaymentModal as oi } from "./index250.js";
68
- import { RecurrenceCancelModal as li } from "./index251.js";
69
- const Ir = (d) => /* @__PURE__ */ e(ct, { children: /* @__PURE__ */ e(ci, { ...d }) }), ci = ({
70
- invoiceId: d,
71
- open: je,
72
- onCloseInvoiceDetails: _,
73
- onDuplicate: Ge,
74
- openInvoiceDetails: k
16
+ import { Scope as yt } from "../../shared/data-access/dist/lib/scopes.js";
17
+ import { useCounterpartById as gt } from "./index70.js";
18
+ import { useCounterpartAddresses as vt } from "./index72.js";
19
+ import { useMyEntity as bt } from "./index78.js";
20
+ import { useCreateReceivable as ht } from "./index307.js";
21
+ import { useCreateCounterpart as xt } from "./index217.js";
22
+ import { useUpdateReceivable as Ct } from "./index308.js";
23
+ import { useUpdateReceivableLineItems as It } from "./index309.js";
24
+ import { useCreateRecurrence as wt } from "./index310.js";
25
+ import { useUpdateRecurrence as Pt } from "./index311.js";
26
+ import { useIssueReceivableById as Rt } from "./index236.js";
27
+ import { useGetInvoiceRequiredFields as kt } from "./index235.js";
28
+ import { useSelectableBankAccounts as At } from "./index312.js";
29
+ import { useLineItemSubmitCleanup as Lt } from "./index313.js";
30
+ import { useGetMeasureUnits as St } from "./index314.js";
31
+ const oe = (t, i) => i ? t.find((r) => r.id === i)?.name || "" : void 0, qt = (t, i) => ({
32
+ // Callers only reach this in `invoice` mode (the guard runs earlier).
33
+ type: t.type,
34
+ counterpart_id: i.resolvedCounterpartId,
35
+ counterpart_billing_address_id: i.billingAddressId,
36
+ counterpart_shipping_address_id: i.shippingAddressId,
37
+ bank_account_id: t.bank_account_id || void 0,
38
+ bank_account_type: t.bank_account_id ? t.bank_account_type : void 0,
39
+ ...ae({
40
+ paymentTermId: t.payment_terms_id,
41
+ customDueDate: t.payment_terms_custom_date
42
+ }),
43
+ line_items: t.line_items.filter((r) => !!r.product?.name?.trim()).map((r) => ({
44
+ quantity: r.quantity,
45
+ tax_status: r.taxable ? "taxable" : "non_taxable",
46
+ product: {
47
+ name: r.product.name,
48
+ price: {
49
+ currency: r.product.price.currency,
50
+ value: r.product.price.value
51
+ },
52
+ measure_unit: r.product.measure_unit_id ? {
53
+ name: oe(i.measureUnits, r.product.measure_unit_id) ?? ""
54
+ } : void 0,
55
+ type: "product"
56
+ },
57
+ tax_rate_value: r.taxable ? ne(Number(t.tax_rate) || 0) : void 0
58
+ })),
59
+ memo: t.memo,
60
+ footer: t.footer,
61
+ purchase_order: t.purchase_order || void 0,
62
+ currency: i.currency,
63
+ payment_reminder_id: t.payment_reminder_id || void 0,
64
+ overdue_reminder_id: t.overdue_reminder_id || void 0,
65
+ tag_ids: [],
66
+ // TODO: add support for tags, ideally values.tags?.map((tag) => tag.id)
67
+ tax_mode: t.tax_mode || "exclusive",
68
+ // `attachments` is `minItems: 1` on the payload, so omit it entirely when
69
+ // empty rather than sending `[]` (which 422s). Only `id`/`include_in_email`
70
+ // ride the request; the buffered `name`/`size` are display-only (EMBD-3617).
71
+ attachments: t.attachments.length ? t.attachments.map(({
72
+ id: r,
73
+ include_in_email: n
74
+ }) => ({
75
+ id: r,
76
+ include_in_email: n
77
+ })) : void 0
78
+ }), re = (t, i) => ({
79
+ data: t.line_items.filter((r) => !!r.product?.name?.trim()).map((r) => {
80
+ const n = r;
81
+ let c;
82
+ return n.product.measure_unit_id ? c = oe(i, n.product.measure_unit_id) : (n.product.measure_unit_name || n.measure_unit?.name) && (c = n.product.measure_unit_name || n.measure_unit?.name), {
83
+ quantity: r.quantity,
84
+ tax_status: r.taxable ? "taxable" : "non_taxable",
85
+ product: {
86
+ name: r.product.name,
87
+ type: r.product.type,
88
+ measure_unit: c ? {
89
+ name: c
90
+ } : void 0,
91
+ price: r.product.price ? {
92
+ currency: r.product.price.currency ?? "USD",
93
+ value: Math.round(r.product.price.value ?? 0)
94
+ } : void 0
95
+ },
96
+ // The backend requires a taxable line item to carry a tax rate, so send
97
+ // one whenever it's taxable — defaulting to 0 when none was entered
98
+ // (matching the create payload). Omitting it for a taxable item 422s.
99
+ tax_rate_value: r.taxable ? ne(Number(t.tax_rate) || 0) : void 0
100
+ };
101
+ })
102
+ }), ie = (t, i) => ({
103
+ invoice: {
104
+ counterpart_id: i.resolvedCounterpartId,
105
+ currency: i.currency,
106
+ memo: t.memo,
107
+ footer: t.footer,
108
+ // Send `null` (not `undefined`) when the address is empty so a cleared field
109
+ // is actually cleared. Omitting it leaves the previous value in place, which
110
+ // — after the customer was changed — would keep an address that belongs to
111
+ // the old counterpart (a mismatch the API rejects). Empty happens when the
112
+ // customer is cleared or a newly picked/inline customer has no default
113
+ // address. Same `null`-to-clear pattern as the reminders/attachments below.
114
+ // @ts-expect-error - we need to send `null` to clear, but the backend doesn't type it
115
+ counterpart_shipping_address_id: t?.default_shipping_address_id || null,
116
+ // @ts-expect-error - we need to send `null` to clear, but the backend doesn't type it
117
+ counterpart_billing_address_id: t?.default_billing_address_id || null,
118
+ bank_account_id: t.bank_account_id || void 0,
119
+ bank_account_type: t.bank_account_id ? t.bank_account_type : void 0,
120
+ /**
121
+ * Rebuild the payment-terms payload from the form values (a saved
122
+ * `payment_terms_id`, or an inline object for "Custom date" / "Due on
123
+ * receipt") via the shared builder, so it's the request-shaped
124
+ * `InlinePaymentTermsRequestPayload` the PATCH accepts.
125
+ */
126
+ ...ae({
127
+ paymentTermId: t.payment_terms_id,
128
+ customDueDate: t.payment_terms_custom_date
129
+ }),
130
+ // @ts-expect-error - we need to send `null`, but the backend doesn't provide a correct type
131
+ payment_reminder_id: t.payment_reminder_id || null,
132
+ // @ts-expect-error - we need to send `null`, but the backend doesn't provide a correct type
133
+ overdue_reminder_id: t.overdue_reminder_id || null,
134
+ // The backend enforces `minItems: 1` here (the generated schema is wrong),
135
+ // so `[]` 422s. Omitting it (`undefined`) is a no-op that leaves the existing
136
+ // attachments in place, so removing the last one must be sent as `null` to
137
+ // actually clear them. Only `id`/`include_in_email` ride the request; the
138
+ // buffered `name`/`size` are display-only (EMBD-3617).
139
+ // @ts-expect-error - we need to send `null` to clear, but the backend doesn't provide a correct type
140
+ attachments: t.attachments.length ? t.attachments.map(({
141
+ id: r,
142
+ include_in_email: n
143
+ }) => ({
144
+ id: r,
145
+ include_in_email: n
146
+ })) : null
147
+ // `purchase_order` is intentionally omitted — the backend does not support
148
+ // updating it, so `BillingSection` hides the field in edit.
149
+ }
150
+ }), sr = ({
151
+ mode: t,
152
+ methods: i,
153
+ currency: r,
154
+ invoice: n,
155
+ existingRecurrence: c,
156
+ hasStartedRecurrence: $ = !1,
157
+ onComplete: h,
158
+ onClose: E,
159
+ submitModeRef: de
75
160
  }) => {
76
161
  const {
77
- i18n: t
78
- } = ut(), {
79
- locale: H,
80
- componentSettings: He
81
- } = dt(), U = !!He?.receivables?.enableEntityBankAccount, {
82
- formatCurrencyToDisplay: q
162
+ i18n: a
83
163
  } = mt(), {
84
- receivablesCallbacks: Ue
85
- } = pt(), {
86
- data: i,
87
- isLoading: W
88
- } = wt(d, !0), y = i?.type === "invoice" ? i.counterpart_id : void 0, S = i?.type === "invoice" ? i.counterpart_billing_address?.id : void 0, {
89
- data: v,
90
- isLoading: f
91
- } = ft(y), x = !!Pe(v), {
92
- data: Y
93
- } = ht(y), qe = Te(() => Y?.data?.find((o) => o.id === S) ?? (i?.type === "invoice" ? i.counterpart_billing_address : void 0), [Y?.data, i, S]), {
94
- data: J,
95
- isFetching: We,
96
- isLoading: Ye
97
- } = vt(), {
98
- data: Je,
99
- isFetching: Ke,
100
- isLoading: Qe
101
- } = Ht({
102
- counterpart_billing_address_id: S,
103
- counterpart_country: qe?.country,
104
- counterpart_id: y,
105
- counterpart_type: v?.id === y && v?.type || void 0
106
- }), K = Je?.entity?.tax_id?.required, Q = !!(i?.type === "invoice" && (i.payment_reminder_id || i.overdue_reminder_id)), F = !!y && f || Ye || We || Qe || Ke, {
107
- data: Xe
108
- } = Gt(d, i?.type === "invoice"), X = Xe?.file_url, {
109
- data: p,
110
- isLoading: Z
111
- } = jt(i?.type === "invoice" ? i?.recurrence_id : void 0), {
112
- data: ee,
113
- isLoading: te
114
- } = zt(i?.id), {
115
- data: ie
116
- } = Vt(i?.type === "invoice" ? i?.payment_reminder_id : void 0), {
117
- data: re
118
- } = Bt(i?.type === "invoice" ? i?.overdue_reminder_id : void 0), [E, N] = w(!1), [ne, I] = w("edit"), [g, b] = w(null), [ae, se] = w(!1), [oe, le] = w(!1), [ce, de] = w(!1), [me, ue] = w(!1), [pe, we] = w(!1), C = bt(), fe = C.has(D.InvoiceReadOrg), he = C.has(D.InvoiceWriteOrg), ve = C.has(D.CounterpartReadOrg), be = C.has(D.CounterpartWriteOrg), {
119
- mutateAsync: L,
120
- isPending: Ze
121
- } = Ut(), {
122
- mutate: ye,
123
- isPending: et
124
- } = Mt(Ge), {
125
- mutate: ge,
126
- isPending: tt
127
- } = qt(p?.id ?? "", d), {
128
- mutate: _e,
129
- isPending: it
130
- } = Wt(p?.id ?? "", d), rt = je && !E, nt = fe && !W && !Z && !!i && i.type === "invoice", n = Te(() => {
131
- if (!(!i || i.type !== "invoice"))
132
- return St(i, p, ee?.data ?? [], {
133
- i18n: t,
134
- formatCurrencyToDisplay: q,
135
- locale: H
136
- }, te, {
137
- paymentReminder: ie,
138
- overdueReminder: re
164
+ api: B,
165
+ apiUrl: se,
166
+ componentSettings: ue,
167
+ queryClient: T,
168
+ requestFn: ce
169
+ } = pt(), me = ft().has(yt.BankAccountWriteOrg), P = !!ue?.receivables?.enableEntityBankAccount, {
170
+ handleSubmit: _e,
171
+ watch: g,
172
+ formState: le,
173
+ setValue: R,
174
+ clearErrors: pe,
175
+ trigger: fe
176
+ } = i, {
177
+ isDirty: ye
178
+ } = le, {
179
+ data: ge,
180
+ isLoading: ve,
181
+ isFetching: be
182
+ } = bt(), {
183
+ data: he,
184
+ isLoading: j
185
+ } = St(), {
186
+ bankAccounts: xe,
187
+ isLoading: z
188
+ } = At(P), Ce = xe.length > 0, [k, Ie] = U(!1), [we, A] = U(!1), Pe = ee("draft"), v = de ?? Pe, Re = `Monite-Form-receivablesDetailsForm-${ut()}`, [x, b] = U(null), {
189
+ registerLineItemCleanupFn: ke,
190
+ runLineItemCleanup: Ae
191
+ } = Lt(), {
192
+ mutateAsync: Le,
193
+ isPending: Se
194
+ } = ht(), {
195
+ mutateAsync: qe,
196
+ isPending: Me
197
+ } = (
198
+ // An inline counterpart is created as a side effect of saving the invoice;
199
+ // the invoice's own success toast is the confirmation, so skip the extra
200
+ // "customer added" one.
201
+ xt({
202
+ showSuccessToast: !1
203
+ })
204
+ ), N = n?.id ?? x?.id ?? "", {
205
+ mutateAsync: G,
206
+ isPending: Fe
207
+ } = Ct(N), {
208
+ mutateAsync: H,
209
+ isPending: De
210
+ } = It(N), {
211
+ mutateAsync: Ue,
212
+ isPending: $e
213
+ } = wt(), {
214
+ mutateAsync: Ee,
215
+ isPending: Be
216
+ } = Pt(), {
217
+ mutateAsync: Te,
218
+ isPending: je
219
+ } = Rt(), O = Se || Me || Fe || De || $e || Be || je, ze = O || j || z, Q = ee(null), V = () => {
220
+ requestAnimationFrame(() => {
221
+ const e = Q.current, u = e?.querySelector('[aria-invalid="true"]');
222
+ if (!e || !u) return;
223
+ const l = u.getBoundingClientRect().top - e.getBoundingClientRect().top + e.scrollTop - e.clientHeight / 2 + u.offsetHeight / 2;
224
+ e.scrollTo({
225
+ top: Math.max(0, l),
226
+ behavior: "smooth"
139
227
  });
140
- }, [i, p, ee, te, ie, re, t, q, H]), O = (o) => {
141
- switch (o) {
142
- case "edit":
143
- return t._("Edit");
144
- case "issue":
145
- return t._("Issue");
146
- case "issueAndSend":
147
- return t._("Issue and send");
148
- case "recordPayment":
149
- return t._("Record payment");
150
- case "send":
151
- return t._("Resend");
152
- case "clone":
153
- return t._("Duplicate");
154
- case "cancel":
155
- return t._("Cancel invoice");
156
- case "delete":
157
- return t._("Delete");
158
- case "markUncollectible":
159
- return t._("Mark as uncollectible");
160
- case "pauseRecurrence":
161
- return t._("Pause series");
162
- case "resumeRecurrence":
163
- return t._("Resume series");
164
- case "cancelRecurrence":
165
- return t._("Cancel series");
228
+ });
229
+ }, Ne = () => {
230
+ v.current = "issue", fe().then(V);
231
+ }, _ = g("counterpart_id"), C = g("frequency") !== "once", Ge = g("counterpart_email"), I = g("default_billing_address_id"), He = g("bank_account_id"), {
232
+ data: d,
233
+ isLoading: W,
234
+ isFetching: J
235
+ } = gt(_), {
236
+ data: L,
237
+ isLoading: Oe,
238
+ isFetching: Qe
239
+ } = vt(_), S = ct(() => L?.data?.find((e) => e.id === I), [I, L?.data]), K = !!(Ge?.trim() || _t(d)), Ve = !!_ && (W || J), {
240
+ data: We,
241
+ isLoading: Je,
242
+ isFetching: Ke
243
+ } = kt({
244
+ counterpart_billing_address_id: d?.id === _ && I || void 0,
245
+ counterpart_country: S?.id === I && S?.country || void 0,
246
+ counterpart_id: _ || void 0,
247
+ counterpart_type: d?.id === _ && d?.type || void 0
248
+ }), Xe = We?.entity?.tax_id?.required, X = ve || be || Je || Ke || !!_ && (W || J || Oe || Qe), Y = (e) => {
249
+ R("counterpart_id", e), R("counterpart_name", ""), R("counterpart_email", ""), pe(["counterpart_id", "counterpart_email"]);
250
+ }, Ye = () => {
251
+ if (k) {
252
+ o.error(a._("Please wait for attachments to finish uploading."));
253
+ return;
254
+ }
255
+ ye ? A(!0) : E();
256
+ }, Ze = async (e) => {
257
+ if (e.type !== "invoice") {
258
+ o.error(a._("`type` except `invoice` is not supported yet"));
259
+ return;
260
+ }
261
+ const u = C && !$ || v.current === "issue";
262
+ if (u && Xe && !ge?.tax_id) {
263
+ o.error(a._("Set your organization's Tax ID to issue invoice"));
264
+ return;
265
+ }
266
+ const l = !e.counterpart_id && !!e.counterpart_name?.trim(), et = d && "organization" in d ? d?.organization?.email : void 0, tt = d && "individual" in d ? d?.individual?.email : void 0, rt = et || tt, q = l ? !0 : d?.reminders_enabled, M = l ? e.counterpart_email : rt, it = !!(e.payment_reminder_id || e.overdue_reminder_id);
267
+ if (u && it) {
268
+ if (!q && M) {
269
+ o.error(a._("Payment reminders are disabled for this customer. Please enable them in the customer details or turn them off."));
270
+ return;
271
+ }
272
+ if (!M && q) {
273
+ o.error(a._("No email address is added for the selected customer. Please add it to the customer details or turn off the reminders."));
274
+ return;
275
+ }
276
+ if (!q && !M) {
277
+ o.error(a._("Reminders are disabled for this customer, and no email address has been added for it. Please update the details or turn off reminders."));
278
+ return;
279
+ }
166
280
  }
167
- }, m = h((o) => {
168
- he ? o() : u.error(t._("You don't have permission to update this document. Please, contact your system administrator for details."));
169
- }, [he, t]), xe = h((o) => {
170
- I(o), N(!0);
171
- }, []), Ne = h(() => {
172
- if (!i || i.type !== "invoice") return !1;
173
- const o = Ft(i, p);
174
- return Ot(t, U, be).safeParse(o).success;
175
- }, [i, p, t, U, be]), R = h((o) => {
176
- if (!Ne())
177
- return xe(o), !1;
178
- if (F) return !1;
179
- if (K && !J?.tax_id)
180
- return u.error(t._("Set your organization's Tax ID to issue invoice")), !1;
181
- if (!Q) return !0;
182
- const l = Pe(v), c = v?.reminders_enabled;
183
- return !c && l ? (u.error(t._("Payment reminders are disabled for this customer. Please enable them in the customer details or turn them off.")), !1) : !l && c ? (u.error(t._("No email address is added for the selected customer. Please add it to the customer details or turn off the reminders.")), !1) : !c && !l ? (u.error(t._("Reminders are disabled for this customer, and no email address has been added for it. Please update the details or turn off reminders.")), !1) : !0;
184
- }, [v, J?.tax_id, Q, t, K, F, Ne, xe]), Ie = h(async () => {
185
- if (R("issue"))
281
+ let p = e.counterpart_id ?? "";
282
+ if (l)
186
283
  try {
187
- await L({
188
- path: {
189
- receivable_id: d
284
+ p = (await qe({
285
+ type: "organization",
286
+ is_customer: !0,
287
+ is_vendor: !1,
288
+ reminders_enabled: !0,
289
+ language: lt.find((m) => m === a.locale.split("-")[0]) ?? "en",
290
+ organization: {
291
+ legal_name: e?.counterpart_name?.trim() ?? "",
292
+ ...e.counterpart_email ? {
293
+ email: e.counterpart_email
294
+ } : {}
190
295
  }
191
- });
296
+ })).id;
192
297
  } catch {
193
- u.error(t._("Failed to issue invoice. Add any missing information to your draft invoice and try again."));
194
- }
195
- }, [R, L, d, t]), Ce = h(async () => {
196
- if (i?.counterpart_id && !f) {
197
- if (!x) {
198
- u.error(t._("This customer has no email address. Add one in the customer details to send the invoice."));
199
298
  return;
200
299
  }
201
- if (R("issueAndSend")) {
202
- try {
203
- await L({
300
+ const at = e.default_shipping_address_id, nt = L?.data?.find((m) => m.id === at), ot = e.line_items.filter((m) => !m.product_id && !!m.product?.name?.trim()), F = he?.data ?? [];
301
+ let f, s, D = null;
302
+ try {
303
+ if (t === "create")
304
+ x ? (f = x.id, await H(re(e, F)), s = await G(ie(e, {
305
+ resolvedCounterpartId: p,
306
+ currency: r
307
+ }))) : (s = await Le(qt(e, {
308
+ resolvedCounterpartId: p,
309
+ billingAddressId: S?.id,
310
+ shippingAddressId: nt?.id,
311
+ measureUnits: F,
312
+ currency: r
313
+ }), {
314
+ onSuccess: async () => {
315
+ await B.finops.getReceivables.invalidateQueries(T);
316
+ }
317
+ }), f = s.id, D = s, l && Y(p));
318
+ else {
319
+ if (!n) return;
320
+ await H(re(e, F)), s = await G(ie(e, {
321
+ resolvedCounterpartId: p,
322
+ currency: r
323
+ })), f = n.id;
324
+ }
325
+ } catch {
326
+ l && Y(p);
327
+ return;
328
+ }
329
+ const w = {
330
+ receivableId: f,
331
+ counterpartId: p,
332
+ inlineLineItems: ot,
333
+ receivable: s,
334
+ hasCustomerEmail: K
335
+ }, dt = () => B.finops.getReceivablesId.fetchQuery({
336
+ parameters: {
337
+ path: {
338
+ receivable_id: f
339
+ }
340
+ },
341
+ requestFn: ce,
342
+ baseUrl: se
343
+ }, T);
344
+ if (C) {
345
+ const m = e.frequency === "day" && e.recurrence_end_mode === "on" && !!e.recurrence_end_date, Z = c ? null : void 0, y = {
346
+ // Never `once` here (guarded above), which the API enum doesn't include.
347
+ frequency: e.frequency,
348
+ start_date: e.recurrence_start_date ? te(new Date(e.recurrence_start_date), "yyyy-MM-dd") : void 0,
349
+ // The `as` sheds `null` from the type only — the backend accepts `null`
350
+ // to clear the field, but the generated payload types omit it.
351
+ max_occurrences: m ? Z : e.recurrence_max_occurrences || void 0,
352
+ end_date: m && e.recurrence_end_date ? te(new Date(e.recurrence_end_date), "yyyy-MM-dd") : Z,
353
+ subject_text: e.recurrence_subject_text || void 0,
354
+ body_text: e.recurrence_body_text || void 0
355
+ };
356
+ try {
357
+ if (c) {
358
+ const st = c.scheduleLocked ? {
359
+ max_occurrences: y.max_occurrences,
360
+ end_date: y.end_date,
361
+ subject_text: y.subject_text,
362
+ body_text: y.body_text
363
+ } : y;
364
+ await Ee({
204
365
  path: {
205
- receivable_id: d
366
+ recurrence_id: c.id
367
+ },
368
+ body: st
369
+ });
370
+ } else
371
+ await Ue({
372
+ body: {
373
+ ...y,
374
+ invoice_id: f,
375
+ interval: 1,
376
+ automation_level: "issue"
206
377
  }
207
378
  });
208
- } catch {
209
- u.error(t._("Failed to issue invoice. Add any missing information to your draft invoice and try again."));
210
- return;
211
- }
212
- b({
213
- action: "issue",
214
- inlineLineItems: [],
215
- // Just issued now — present it like the create flow ("Invoice issued").
216
- isEditFlow: !1,
217
- issue: {
218
- receivableId: d,
219
- counterpartId: i.counterpart_id
220
- }
221
- });
379
+ } catch {
380
+ !x && D && b(D);
381
+ return;
382
+ }
383
+ b(null);
384
+ try {
385
+ s = await dt();
386
+ } catch {
222
387
  }
388
+ h({
389
+ mode: "recurrence",
390
+ ...w,
391
+ receivable: s
392
+ });
393
+ return;
223
394
  }
224
- }, [i?.counterpart_id, x, f, R, L, d, t]), Le = h((o) => {
225
- switch (o) {
226
- case "edit":
227
- return m(() => {
228
- I("edit"), N(!0);
229
- });
230
- case "issue":
231
- return m(Ie);
232
- case "issueAndSend":
233
- return m(Ce);
234
- case "send":
235
- return m(() => {
236
- if (!f) {
237
- if (!x) {
238
- u.error(t._("This customer has no email address. Add one in the customer details to send the invoice."));
239
- return;
240
- }
241
- i?.counterpart_id && b({
242
- action: "issue",
243
- inlineLineItems: [],
244
- // Already issued — a plain resend, not a fresh issue.
245
- isEditFlow: !0,
246
- issue: {
247
- receivableId: d,
248
- counterpartId: i.counterpart_id
249
- }
250
- });
251
- }
252
- });
253
- case "clone":
254
- return m(() => ye({
395
+ if (v.current === "issue") {
396
+ try {
397
+ s = await Te({
255
398
  path: {
256
- receivable_id: d
399
+ receivable_id: f
257
400
  }
258
- }));
259
- case "cancel":
260
- return m(() => se(!0));
261
- case "delete":
262
- return m(() => le(!0));
263
- case "markUncollectible":
264
- return m(() => de(!0));
265
- case "pauseRecurrence":
266
- return m(() => ge(void 0));
267
- case "resumeRecurrence":
268
- return m(() => _e(void 0));
269
- case "cancelRecurrence":
270
- return m(() => ue(!0));
271
- case "recordPayment":
272
- return;
401
+ }), b(null), h({
402
+ mode: "issue",
403
+ ...w,
404
+ receivable: s
405
+ });
406
+ } catch {
407
+ o.error(a._("The invoice was saved but could not be issued.")), b(null), h({
408
+ mode: t === "edit" ? "update" : "draft",
409
+ ...w
410
+ });
411
+ }
412
+ return;
273
413
  }
274
- }, [m, Ie, Ce, x, f, i?.counterpart_id, ye, d, ge, _e, t]), at = () => {
275
- if (W || Z)
276
- return /* @__PURE__ */ r("div", { className: "ttw:flex ttw:w-full ttw:items-center ttw:justify-center ttw:h-full", children: [
277
- /* @__PURE__ */ e(T, { hidden: !0, children: t._("Loading invoice details") }),
278
- /* @__PURE__ */ e(Ee, {})
279
- ] });
280
- if (!fe)
281
- return /* @__PURE__ */ r("div", { className: "ttw:w-3/4 ttw:m-auto", children: [
282
- /* @__PURE__ */ e(T, { hidden: !0, children: t._("Access restricted") }),
283
- /* @__PURE__ */ e(yt, {})
284
- ] });
285
- if (i && i.type !== "invoice")
286
- return /* @__PURE__ */ r("div", { className: "ttw:w-3/4 ttw:m-auto", children: [
287
- /* @__PURE__ */ e(T, { hidden: !0, children: t._("Receivable type not supported") }),
288
- /* @__PURE__ */ e(Oe, { title: t._("Receivable type not supported"), description: t._("Receivable type {type} is not supported. Only invoice is supported.", {
289
- type: i.type
290
- }) })
291
- ] });
292
- if (!i || !n)
293
- return /* @__PURE__ */ r("div", { className: "ttw:w-3/4 ttw:m-auto", children: [
294
- /* @__PURE__ */ e(T, { hidden: !0, children: t._("Invoice not found") }),
295
- /* @__PURE__ */ e(Oe, { title: t._("Invoice not found"), description: t._("There is no invoice for the provided id: {invoiceId}", {
296
- invoiceId: d
297
- }) })
298
- ] });
299
- const o = $t[n.status], l = n.amountTone === "danger", c = n.recurringSeries, A = !!c, M = i.counterpart_name, st = i.counterpart_id && ve ? () => we(!0) : void 0, Re = n.primaryActions.length > 0 ? /* @__PURE__ */ e("div", { className: "ttw:flex ttw:items-center ttw:gap-2 ttw:border-t ttw:border-border ttw:pt-3", children: n.primaryActions.map((a, ot) => {
300
- const Ae = Tt[a], De = ot === n.primaryActions.length - 1 ? "default" : "outline";
301
- return a === "recordPayment" && i.type === "invoice" ? /* @__PURE__ */ e(oi, { invoice: i, children: ({
302
- openModal: lt
303
- }) => /* @__PURE__ */ r(j, { type: "button", size: "sm", variant: De, onClick: () => m(lt), children: [
304
- /* @__PURE__ */ e(Ae, { className: "ttw:size-4" }),
305
- O(a)
306
- ] }) }, a) : /* @__PURE__ */ r(j, { type: "button", size: "sm", variant: De, disabled: Et(a, {
307
- isIssuing: Ze,
308
- isIssuePreflightLoading: F,
309
- isCounterpartLoading: f
310
- }), onClick: () => Le(a), children: [
311
- /* @__PURE__ */ e(Ae, { className: "ttw:size-4" }),
312
- O(a)
313
- ] }, a);
314
- }) }) : null;
315
- return /* @__PURE__ */ r($e, { children: [
316
- n.seriesLink ? /* @__PURE__ */ e("div", { className: "ttw:border-b ttw:border-border ttw:px-6 ttw:py-3", children: /* @__PURE__ */ r("button", { type: "button", onClick: () => n.seriesLink && k?.(n.seriesLink.invoiceId), className: "ttw:flex ttw:items-center ttw:gap-1 ttw:text-sm ttw:text-primary ttw:hover:underline", children: [
317
- /* @__PURE__ */ e(Rt, { className: "ttw:size-4", "aria-hidden": "true" }),
318
- t._("Back to {title} recurring series", {
319
- title: n.seriesLink.title
320
- })
321
- ] }) }) : null,
322
- /* @__PURE__ */ r(It, { className: "ttw:flex ttw:flex-row ttw:items-start ttw:justify-between ttw:gap-2 ttw:space-y-0 ttw:px-6 ttw:py-4", children: [
323
- /* @__PURE__ */ r("div", { className: "ttw:flex ttw:flex-col ttw:gap-0.5", children: [
324
- /* @__PURE__ */ e(Ct, { className: "ttw:text-xl ttw:font-semibold ttw:text-foreground", children: n.title }),
325
- n.subtitle ? /* @__PURE__ */ e(s, { variant: "body2", color: "muted", children: n.subtitle }) : null
326
- ] }),
327
- /* @__PURE__ */ e(Lt, { delayDuration: Pt, children: /* @__PURE__ */ r("div", { className: "ttw:flex ttw:items-center ttw:gap-1.5", children: [
328
- X ? /* @__PURE__ */ r(ke, { children: [
329
- /* @__PURE__ */ e(Se, { asChild: !0, onFocus: Be, children: /* @__PURE__ */ e(j, { asChild: !0, variant: "ghost", size: "icon", className: P, children: /* @__PURE__ */ e("a", { href: X, target: "_blank", rel: "noreferrer", "aria-label": t._("View PDF"), children: /* @__PURE__ */ e(At, { className: "ttw:size-4" }) }) }) }),
330
- /* @__PURE__ */ e(Fe, { children: t._("View PDF") })
331
- ] }) : null,
332
- n.overflowActions.length > 0 ? /* @__PURE__ */ e(si, { actions: n.overflowActions, triggerLabel: t._("More actions"), getActionLabel: O, onSelect: Le, isActionDisabled: (a) => a === "clone" && et || a === "pauseRecurrence" && tt || a === "resumeRecurrence" && it || // "Resend" needs the customer email, so wait for it to load.
333
- a === "send" && f, className: P }) : null,
334
- /* @__PURE__ */ r(ke, { children: [
335
- /* @__PURE__ */ e(Se, { asChild: !0, onFocus: Be, children: /* @__PURE__ */ e(ze, { label: t._("Close"), onClose: _, className: P }) }),
336
- /* @__PURE__ */ e(Fe, { children: t._("Close") })
337
- ] })
338
- ] }) })
339
- ] }),
340
- /* @__PURE__ */ r("div", { className: "ttw:flex ttw:flex-col", children: [
341
- /* @__PURE__ */ e("div", { className: "ttw:px-6", children: A && c ? (
342
- // Recurring series master: recurring amount + series status +
343
- // start/end, in place of the per-invoice amount rows. The card
344
- // takes a violet tint (vs the neutral invoice card) to signal a
345
- // recurrence, matching the Recurring badge.
346
- /* @__PURE__ */ r("div", { className: "ttw:flex ttw:flex-col ttw:gap-3 ttw:rounded-lg ttw:bg-violet-50 ttw:p-4", children: [
347
- /* @__PURE__ */ r("div", { className: "ttw:flex ttw:flex-col ttw:gap-0.5", children: [
348
- /* @__PURE__ */ e(s, { variant: "caption", color: "muted", children: t._("Recurring amount") }),
349
- /* @__PURE__ */ r("div", { className: "ttw:flex ttw:items-baseline ttw:gap-1.5", children: [
350
- /* @__PURE__ */ e(s, { component: "span", variant: "h3", className: kt[n.amountTone], children: c.amountLabel }),
351
- /* @__PURE__ */ e(s, { component: "span", variant: "body2", color: "muted", children: c.amountPeriodLabel })
352
- ] })
353
- ] }),
354
- /* @__PURE__ */ r("div", { className: "ttw:flex ttw:items-center ttw:gap-2", children: [
355
- /* @__PURE__ */ r($, { variant: "outline", className: "ttw:gap-1 ttw:border-violet-200 ttw:bg-violet-50 ttw:text-violet-700", children: [
356
- /* @__PURE__ */ e(Me, { className: "ttw:size-3" }),
357
- t._("Recurring")
358
- ] }),
359
- /* @__PURE__ */ e(ri, { status: c.status, showIcon: !0 })
360
- ] }),
361
- /* @__PURE__ */ r("div", { className: "ttw:flex ttw:gap-12", children: [
362
- /* @__PURE__ */ r("div", { className: "ttw:flex ttw:flex-col ttw:gap-0.5", children: [
363
- /* @__PURE__ */ e(s, { variant: "caption", color: "muted", children: t._("Starts on") }),
364
- /* @__PURE__ */ e(s, { component: "span", variant: "body2", children: c.startsOnLabel })
365
- ] }),
366
- /* @__PURE__ */ r("div", { className: "ttw:flex ttw:flex-col ttw:gap-0.5", children: [
367
- /* @__PURE__ */ e(s, { variant: "caption", color: "muted", children: t._("Ends on") }),
368
- /* @__PURE__ */ e(s, { component: "span", variant: "body2", children: c.endsOnLabel })
369
- ] })
370
- ] }),
371
- Re
372
- ] })
373
- ) : /* @__PURE__ */ r("div", { className: G("ttw:flex ttw:flex-col ttw:gap-3 ttw:rounded-lg ttw:bg-muted ttw:p-4", l && "ttw:border ttw:border-red-200"), children: [
374
- /* @__PURE__ */ e("div", { className: "ttw:flex ttw:flex-row ttw:flex-wrap ttw:gap-x-12 ttw:gap-y-2", children: n.amountRows.map((a) => /* @__PURE__ */ e(Yt, { row: a, defaultTone: n.amountTone }, a.label)) }),
375
- /* @__PURE__ */ r("div", { className: "ttw:flex ttw:items-center ttw:gap-2", children: [
376
- n.overdueLabel ? /* @__PURE__ */ r("span", { className: "ttw:inline-flex ttw:items-center ttw:gap-1 ttw:rounded-full ttw:bg-red-100 ttw:px-2.5 ttw:py-0.5 ttw:text-xs ttw:font-medium ttw:text-red-700", children: [
377
- /* @__PURE__ */ e(Dt, { className: "ttw:size-3" }),
378
- n.overdueLabel
379
- ] }) : /* @__PURE__ */ e(ni, { status: n.status, variant: "outline", label: n.statusLabel, icon: o ? /* @__PURE__ */ e(o, { className: "ttw:size-3" }) : void 0 }),
380
- n.recurring ? /* @__PURE__ */ r($, { variant: "outline", className: "ttw:gap-1 ttw:border-violet-200 ttw:bg-violet-50 ttw:text-violet-700", children: [
381
- /* @__PURE__ */ e(Me, { className: "ttw:size-3" }),
382
- t._("Recurring")
383
- ] }) : null
384
- ] }),
385
- /* @__PURE__ */ r("div", { className: "ttw:flex ttw:gap-12", children: [
386
- /* @__PURE__ */ r("div", { className: "ttw:flex ttw:flex-col ttw:gap-0.5", children: [
387
- /* @__PURE__ */ e(s, { variant: "caption", color: "muted", children: t._("Invoice date") }),
388
- /* @__PURE__ */ e(s, { component: "span", variant: "body2", children: n.invoiceDateLabel })
389
- ] }),
390
- /* @__PURE__ */ r("div", { className: "ttw:flex ttw:flex-col ttw:gap-0.5", children: [
391
- /* @__PURE__ */ e(s, { variant: "caption", color: "muted", children: n.dueDateCaption }),
392
- /* @__PURE__ */ e(s, { component: "span", variant: "body2", children: n.dueDateLabel })
393
- ] })
394
- ] }),
395
- Re
396
- ] }) }),
397
- /* @__PURE__ */ r("div", { className: "ttw:px-6", children: [
398
- n.paymentHistory ? /* @__PURE__ */ r("section", { "aria-label": t._("Payment history"), className: "ttw:border-b ttw:border-border ttw:py-4", children: [
399
- /* @__PURE__ */ e(s, { component: "h3", variant: "body2", className: "ttw:mb-3 ttw:font-medium", children: t._("Payment history") }),
400
- n.paymentHistory.loading ? /* @__PURE__ */ e("div", { className: "ttw:flex ttw:py-2", children: /* @__PURE__ */ e(Ee, { className: "ttw:h-5 ttw:w-5 ttw:border-2" }) }) : n.paymentHistory.rows.length === 0 ? /* @__PURE__ */ e(s, { variant: "body2", className: n.paymentHistory.emptyTone === "danger" ? "ttw:text-red-600" : "ttw:text-muted-foreground", children: t._("You've received no payments yet.") }) : /* @__PURE__ */ r("div", { className: "ttw:flex ttw:flex-col", children: [
401
- n.paymentHistory.rows.map((a) => /* @__PURE__ */ r("div", { className: "ttw:flex ttw:justify-between ttw:border-b ttw:border-border ttw:py-2", children: [
402
- /* @__PURE__ */ e(s, { component: "span", variant: "body2", children: a.dateLabel }),
403
- /* @__PURE__ */ e(s, { component: "span", variant: "body2", children: a.amountLabel })
404
- ] }, a.id)),
405
- /* @__PURE__ */ r("div", { className: "ttw:flex ttw:justify-between ttw:py-2 ttw:font-medium", children: [
406
- /* @__PURE__ */ e(s, { component: "span", variant: "body2", children: t._("Total received") }),
407
- /* @__PURE__ */ e(s, { component: "span", variant: "body2", children: n.paymentHistory.totalLabel })
408
- ] })
409
- ] })
410
- ] }) : null,
411
- M || n.customerContact.length > 0 ? /* @__PURE__ */ r("section", { "aria-label": t._("Customer details"), className: "ttw:border-b ttw:border-border ttw:py-4", children: [
412
- /* @__PURE__ */ e(s, { component: "h3", variant: "body2", className: "ttw:mb-3 ttw:font-medium", children: t._("Customer details") }),
413
- /* @__PURE__ */ r("div", { className: "ttw:flex ttw:flex-col", children: [
414
- M ? /* @__PURE__ */ e(Xt, { label: t._("Name"), name: M, onOpenCounterpart: st }) : null,
415
- n.customerContact.map((a) => /* @__PURE__ */ e(Ve, { ...a }, a.label))
416
- ] })
417
- ] }) : null,
418
- /* @__PURE__ */ r(gt, { type: "multiple", defaultValue: ["attachments"], className: "ttw:w-full", children: [
419
- /* @__PURE__ */ r(B, { value: "billing", children: [
420
- /* @__PURE__ */ e(z, { children: /* @__PURE__ */ e("span", { className: "ttw:group-hover:underline", children: t._("Billing details") }) }),
421
- /* @__PURE__ */ e(V, { children: /* @__PURE__ */ r("div", { className: "ttw:flex ttw:flex-col", children: [
422
- n.billingItems.map((a) => /* @__PURE__ */ e(Ve, { ...a }, a.label)),
423
- n.seriesLink ? /* @__PURE__ */ r("div", { className: "ttw:flex ttw:gap-4 ttw:border-b ttw:border-border ttw:py-3 ttw:last:border-b-0", children: [
424
- /* @__PURE__ */ e(s, { component: "span", variant: "body2", color: "muted", className: "ttw:w-40 ttw:shrink-0", children: t._("Recurring series") }),
425
- /* @__PURE__ */ e("button", { type: "button", onClick: () => n.seriesLink && k?.(n.seriesLink.invoiceId), className: "ttw:text-left ttw:text-primary ttw:hover:underline", children: n.seriesLink.title })
426
- ] }) : null
427
- ] }) })
428
- ] }),
429
- A ? null : /* @__PURE__ */ r(B, { value: "line-items", children: [
430
- /* @__PURE__ */ e(z, { children: /* @__PURE__ */ r("span", { className: "ttw:flex ttw:items-center ttw:gap-2", children: [
431
- /* @__PURE__ */ e("span", { className: "ttw:group-hover:underline", children: t._("Line items") }),
432
- /* @__PURE__ */ e($, { variant: "secondary", className: "ttw:rounded-full", children: n.lineItems.length })
433
- ] }) }),
434
- /* @__PURE__ */ e(V, { children: /* @__PURE__ */ r("div", { className: "ttw:flex ttw:flex-col", children: [
435
- n.lineItems.length === 0 ? /* @__PURE__ */ e(s, { variant: "body2", color: "muted", className: "ttw:py-3", children: t._("No line items.") }) : n.lineItems.map((a) => /* @__PURE__ */ r("div", { className: "ttw:flex ttw:items-start ttw:justify-between ttw:border-b ttw:border-border ttw:py-3", children: [
436
- /* @__PURE__ */ r("div", { className: "ttw:flex ttw:flex-col", children: [
437
- /* @__PURE__ */ e(s, { component: "span", variant: "body2", className: "ttw:font-medium", children: a.name }),
438
- /* @__PURE__ */ e(s, { component: "span", variant: "body2", color: "muted", children: t._("{quantity} x {price} ea", {
439
- quantity: a.quantityLabel,
440
- price: a.unitPriceLabel
441
- }) })
442
- ] }),
443
- /* @__PURE__ */ e(s, { component: "span", variant: "body2", children: a.totalLabel })
444
- ] }, a.id)),
445
- n.lineItemTotals.length > 0 ? /* @__PURE__ */ e("div", { className: "ttw:flex ttw:flex-col ttw:gap-1 ttw:py-3", children: n.lineItemTotals.map((a) => /* @__PURE__ */ r("div", { className: G("ttw:flex ttw:justify-between", a.emphasis && "ttw:font-medium"), children: [
446
- /* @__PURE__ */ e(s, { component: "span", variant: "body2", children: a.label }),
447
- /* @__PURE__ */ e(s, { component: "span", variant: "body2", children: a.value })
448
- ] }, a.label)) }) : null
449
- ] }) })
450
- ] }),
451
- !A && n.notes ? /* @__PURE__ */ r(B, { value: "notes", children: [
452
- /* @__PURE__ */ e(z, { children: /* @__PURE__ */ r("span", { className: "ttw:flex ttw:items-center ttw:gap-2", children: [
453
- /* @__PURE__ */ e("span", { className: "ttw:group-hover:underline", children: t._("Notes") }),
454
- /* @__PURE__ */ e($, { variant: "secondary", className: "ttw:rounded-full", children: [n.notes.opening, n.notes.closing].filter(Boolean).length })
455
- ] }) }),
456
- /* @__PURE__ */ e(V, { children: /* @__PURE__ */ e("div", { className: "ttw:flex ttw:flex-col ttw:gap-3", children: [{
457
- label: t._("Opening note to customer"),
458
- text: n.notes.opening
459
- }, {
460
- label: t._("Closing note to customer"),
461
- text: n.notes.closing
462
- }].filter((a) => a.text).map((a) => /* @__PURE__ */ r("div", { children: [
463
- /* @__PURE__ */ e(s, { variant: "body2", className: "ttw:mb-1 ttw:font-medium", children: a.label }),
464
- /* @__PURE__ */ e(s, { variant: "body2", color: "muted", children: a.text })
465
- ] }, a.label)) }) })
466
- ] }) : null,
467
- /* @__PURE__ */ e(Jt, { attachments: i.attachments ?? [] })
468
- ] }),
469
- A && c && p ? /* @__PURE__ */ r("section", { "aria-label": c.scheduleTitle, className: "ttw:border-t ttw:border-border ttw:py-4", children: [
470
- /* @__PURE__ */ e(s, { component: "h3", variant: "body2", className: "ttw:mb-3 ttw:font-medium", children: c.scheduleTitle }),
471
- /* @__PURE__ */ e(ii, { invoice: i, recurrence: p, openInvoiceDetails: k })
472
- ] }) : null
473
- ] })
474
- ] })
475
- ] });
414
+ t === "create" ? o.success(a._("Invoice to {counterpartName} was created", {
415
+ counterpartName: s?.counterpart_name ?? ""
416
+ })) : o.success(a._("Invoice has been updated")), b(null), h({
417
+ mode: t === "edit" ? "update" : "draft",
418
+ ...w
419
+ });
476
420
  };
477
- return /* @__PURE__ */ r($e, { children: [
478
- E && i && /* @__PURE__ */ e(Qt, { isOpen: E, invoice: i, issueIntent: ne !== "edit", onUpdated: (o, l) => {
479
- N(!1);
480
- const c = ne !== "issue";
481
- I("edit"), Ue?.onUpdate?.(o.id, o), l.issued && c && l.hasCustomerEmail ? b({
482
- action: "issue",
483
- isEditFlow: !1,
484
- inlineLineItems: l.inlineLineItems,
485
- issue: {
486
- receivableId: o.id,
487
- counterpartId: l.counterpartId
488
- }
489
- }) : l.issued && l.inlineLineItems.length > 0 ? b({
490
- action: "issue",
491
- isEditFlow: !1,
492
- inlineLineItems: l.inlineLineItems
493
- }) : l.inlineLineItems.length > 0 && b({
494
- action: l.activatedRecurrence ? "recurrence" : "update",
495
- isEditFlow: !0,
496
- inlineLineItems: l.inlineLineItems
497
- });
498
- }, onCancel: () => {
499
- N(!1), I("edit");
500
- } }),
501
- /* @__PURE__ */ e(_t, { open: rt, modal: !1, onOpenChange: _, children: /* @__PURE__ */ r(
502
- xt,
503
- {
504
- showCloseButton: !1,
505
- layer: "under-dialogs",
506
- className: "ttw:overflow-y-auto ttw:p-0",
507
- children: [
508
- /* @__PURE__ */ e(Nt, { hidden: !0, children: t._("Invoice details") }),
509
- nt ? null : /* @__PURE__ */ e(ze, { label: t._("Close"), onClose: _, className: G(P, "ttw:absolute ttw:right-4 ttw:top-4 ttw:z-10") }),
510
- at(),
511
- ae && /* @__PURE__ */ e(ei, { invoiceId: i?.id ?? "", open: ae, onClose: () => se(!1) }),
512
- oe && /* @__PURE__ */ e(ti, { open: oe, onClose: () => le(!1), invoiceId: i?.id ?? "", documentId: i?.type === "invoice" ? i?.document_id : void 0, onDelete: _ }),
513
- ce && /* @__PURE__ */ e(ai, { invoiceId: i?.id ?? "", open: ce, onClose: () => de(!1) }),
514
- me && i?.type === "invoice" && /* @__PURE__ */ e(li, { invoice: i, open: me, onClose: () => ue(!1) }),
515
- pe && i?.counterpart_id && ve && /* @__PURE__ */ e(
516
- Zt,
517
- {
518
- counterpartId: i.counterpart_id,
519
- open: pe,
520
- onClose: () => we(!1),
521
- showActionsMenu: !1,
522
- customerType: "customer"
523
- }
524
- ),
525
- g && /* @__PURE__ */ e(Kt, { open: !0, isEditFlow: g.isEditFlow, action: g.action, issue: g.issue, inlineLineItems: g.inlineLineItems, onClose: () => b(null) })
526
- ]
421
+ return {
422
+ formName: Re,
423
+ onSubmit: async (e) => {
424
+ e.preventDefault(), Ae();
425
+ const u = C && !$ || v.current === "issue";
426
+ if (k) {
427
+ o.error(a._("Please wait for attachments to finish uploading."));
428
+ return;
429
+ }
430
+ if (j) {
431
+ o.error(a._("Please wait for invoice details to finish loading."));
432
+ return;
527
433
  }
528
- ) })
529
- ] });
434
+ if (u && X) {
435
+ o.error(a._("Please wait for invoice checks to finish."));
436
+ return;
437
+ }
438
+ if (u && P && z) {
439
+ o.error(a._("Please wait for invoice checks to finish."));
440
+ return;
441
+ }
442
+ if (u && !me && P && !He && !Ce) {
443
+ o.error(a._("Contact your company admin to set up a bank account before creating an invoice."));
444
+ return;
445
+ }
446
+ await _e(Ze, V)(e);
447
+ },
448
+ formScrollRef: Q,
449
+ registerLineItemCleanupFn: ke,
450
+ onAttachmentsUploadingChange: Ie,
451
+ isLoading: ze,
452
+ isSaving: O,
453
+ attachmentsUploading: k,
454
+ submitModeRef: v,
455
+ isRecurrenceEnabled: C,
456
+ hasCustomerEmail: K,
457
+ isCustomerEmailLoading: Ve,
458
+ isIssuePreflightLoading: X,
459
+ requestClose: Ye,
460
+ highlightForIssue: Ne,
461
+ discardModal: {
462
+ open: we,
463
+ onOpenChange: A,
464
+ onConfirm: () => {
465
+ A(!1), E();
466
+ }
467
+ }
468
+ };
530
469
  };
531
470
  export {
532
- Ir as InvoiceDetailsPanel
471
+ sr as useReceivableSubmit
533
472
  };