@tesouro/embedded-components-react 0.2.162 → 0.2.164

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