@tesouro/embedded-components-react 0.3.19 → 0.3.22

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 (210) hide show
  1. package/dist/index.css +9 -0
  2. package/dist/index.js +1 -1
  3. package/dist/lib/BillPayWidget.js +1 -1
  4. package/dist/lib/monite-sdk.js +18 -18
  5. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +4 -4
  6. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index10.js +2 -2
  7. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index29.js +1 -1
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index41.js +1 -1
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +1 -1
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +14 -1
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +4 -1
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js +3 -1
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index62.js +28 -97
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js +81 -176
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +50 -4
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js +250 -5
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.js +106 -107
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index67.js +209 -1
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index68.js +3 -24
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index69.js +8 -0
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index7.js +2 -2
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index70.js +114 -0
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index71.js +1 -0
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index72.js +25 -0
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +21 -17
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index52.js +2 -0
  27. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index59.js +36 -11
  28. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index60.js +10 -283
  29. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index61.js +199 -8
  30. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index62.js +3 -8
  31. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index63.js +14 -91
  32. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index64.js +314 -0
  33. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index65.js +10 -2
  34. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index66.js +4 -14
  35. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index67.js +85 -105
  36. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index69.js +2 -7
  37. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index70.js +16 -28
  38. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index71.js +113 -2
  39. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index72.js +2 -7
  40. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index73.js +5 -32
  41. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index74.js +30 -2
  42. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index75.js +2 -12
  43. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index76.js +5 -104
  44. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index77.js +34 -2
  45. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index78.js +2 -18
  46. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index79.js +9 -7
  47. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index80.js +81 -145
  48. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index81.js +1 -1
  49. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index82.js +15 -11
  50. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index83.js +8 -87
  51. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index84.js +170 -2
  52. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index85.js +2 -0
  53. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index86.js +14 -0
  54. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index87.js +89 -0
  55. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index88.js +2 -0
  56. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index3.js +1 -1
  57. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index.js +19 -19
  58. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index422.js +1 -1
  59. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index479.js +16 -20
  60. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index480.js +13 -12
  61. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index481.js +19 -97
  62. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index482.js +98 -42
  63. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index483.js +43 -27
  64. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index484.js +30 -1
  65. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index485.js +1 -17
  66. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index486.js +11 -10
  67. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index487.js +14 -4
  68. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index488.js +4 -13
  69. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index489.js +7 -7
  70. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index490.js +18 -9
  71. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index491.js +8 -105
  72. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index492.js +102 -35
  73. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index493.js +36 -45
  74. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index494.js +44 -71
  75. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index495.js +72 -100
  76. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index496.js +99 -43
  77. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index497.js +35 -178
  78. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index498.js +171 -125
  79. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index499.js +134 -123
  80. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index500.js +125 -73
  81. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index501.js +63 -232
  82. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index502.js +248 -8
  83. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index503.js +8 -6
  84. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index504.js +5 -456
  85. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index505.js +455 -21
  86. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index506.js +17 -12
  87. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index507.js +13 -49
  88. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index508.js +51 -43
  89. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index509.js +46 -14
  90. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index510.js +13 -41
  91. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index511.js +39 -144
  92. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index512.js +143 -112
  93. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index513.js +114 -39
  94. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index514.js +33 -25
  95. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index515.js +32 -19
  96. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index516.js +3 -3
  97. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index517.js +19 -21
  98. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index518.js +20 -72
  99. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index519.js +73 -17
  100. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index520.js +18 -172
  101. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index521.js +149 -116
  102. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index522.js +136 -30
  103. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index523.js +31 -115
  104. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index524.js +116 -19
  105. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index525.js +10 -36
  106. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index526.js +46 -14
  107. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index527.js +13 -23
  108. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index528.js +21 -25
  109. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index529.js +26 -36
  110. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index530.js +36 -77
  111. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index531.js +77 -50
  112. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index532.js +50 -33
  113. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index533.js +34 -89
  114. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index534.js +86 -48
  115. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index535.js +54 -1
  116. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index536.js +1 -40
  117. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index537.js +40 -1
  118. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index538.js +0 -135
  119. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index539.js +129 -102
  120. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index540.js +105 -50
  121. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index541.js +48 -779
  122. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index542.js +780 -87
  123. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index543.js +84 -97
  124. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index544.js +105 -6
  125. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index545.js +6 -27
  126. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index546.js +23 -11
  127. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index547.js +13 -2
  128. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index548.js +2 -25
  129. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index549.js +25 -14
  130. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index550.js +14 -171
  131. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index551.js +163 -200
  132. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index552.js +204 -78
  133. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index553.js +82 -17
  134. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index554.js +17 -158
  135. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index555.js +146 -85
  136. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index556.js +95 -42
  137. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index557.js +46 -4
  138. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index558.js +4 -16
  139. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index559.js +13 -24
  140. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index560.js +27 -1
  141. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index561.js +0 -186
  142. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index562.js +186 -0
  143. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index563.js +0 -42
  144. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index564.js +41 -3
  145. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index565.js +5 -24
  146. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index566.js +20 -73
  147. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index567.js +74 -16
  148. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index568.js +16 -19
  149. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index569.js +19 -5
  150. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index570.js +4 -8
  151. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index571.js +10 -11
  152. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index572.js +11 -131
  153. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index573.js +129 -4
  154. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index574.js +4 -4
  155. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index575.js +8 -5
  156. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index576.js +4 -221
  157. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index577.js +219 -11
  158. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index578.js +12 -34
  159. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index579.js +32 -181
  160. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index580.js +168 -189
  161. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index581.js +192 -88
  162. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index582.js +97 -61
  163. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index583.js +63 -54
  164. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index584.js +46 -83
  165. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index585.js +91 -40
  166. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index586.js +39 -75
  167. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index587.js +63 -71
  168. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index588.js +85 -12
  169. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index589.js +12 -24
  170. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index590.js +25 -16
  171. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index591.js +14 -2
  172. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index592.js +4 -23
  173. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index593.js +23 -0
  174. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index594.js +1 -24
  175. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index595.js +24 -4
  176. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index596.js +4 -13
  177. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index597.js +9 -13
  178. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index598.js +13 -4
  179. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index599.js +4 -8
  180. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index600.js +8 -4
  181. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index601.js +8 -6
  182. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index602.js +6 -22
  183. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index603.js +17 -68
  184. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index604.js +66 -113
  185. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index605.js +104 -64
  186. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index606.js +72 -138
  187. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index607.js +144 -28
  188. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index608.js +28 -16
  189. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index609.js +14 -87
  190. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index610.js +91 -3
  191. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index611.js +3 -26
  192. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index612.js +22 -67
  193. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index613.js +71 -1
  194. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index614.js +0 -65
  195. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index615.js +66 -29
  196. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index616.js +30 -2
  197. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index617.js +2 -34
  198. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index618.js +33 -15
  199. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index619.js +14 -29
  200. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index620.js +29 -26
  201. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index621.js +30 -2
  202. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index622.js +2 -97
  203. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index623.js +97 -0
  204. package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/index6.js +1 -1
  205. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  206. package/dist/libs/tesouro-embedded-components-react/shared/monite-wrapper/feature/dist/lib/MoniteWrapper.js +1 -1
  207. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index7.js +1 -1
  208. package/dist/packages/shared-ui-shadcn/dist/index.js +16 -11
  209. package/package.json +1 -1
  210. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index68.js +0 -2
@@ -1,92 +1,785 @@
1
- import { ScopedCssBaselineContainerClassName as e } from "./index31.js";
1
+ import { Scope as e } from "../../shared/data-access/dist/lib/scopes.js";
2
+ import "../../shared/data-access/dist/index.js";
2
3
  import { useMoniteContext as t } from "./index47.js";
3
- import { MoniteScopedProviders as n } from "./index237.js";
4
- import { classNames as r } from "./index344.js";
5
- import { InvoicesTable as i } from "./index449.js";
6
- import { QuotesTable as a } from "./index454.js";
7
- import { CreditNotesTable as o } from "./index455.js";
8
- import { useId as s, useState as c } from "react";
9
- import { Fragment as l, jsx as u, jsxs as d } from "@emotion/react/jsx-runtime";
10
- import { Box as f, Tabs as p } from "@mui/material";
11
- import { useLingui as m } from "@lingui/react";
4
+ import { useCounterpartById as n } from "./index48.js";
5
+ import { getCounterpartEmail as r } from "./index53.js";
6
+ import { useCurrencies as i } from "./index63.js";
7
+ import { cn as a } from "./index49.js";
8
+ import { Button as o } from "./index56.js";
9
+ import { useCounterpartAddresses as ee } from "./index130.js";
10
+ import { useMyEntity as s } from "./index137.js";
11
+ import { useGetReceivableById as te } from "./index141.js";
12
+ import "./index142.js";
13
+ import { useComponentSettings as ne } from "./index215.js";
14
+ import "./index217.js";
15
+ import { MoniteScopedProviders as c } from "./index237.js";
16
+ import { Sheet as re, SheetContent as ie, SheetDescription as ae, SheetHeader as oe, SheetTitle as se } from "./index50.js";
17
+ import { LoadingSpinner as l } from "./index51.js";
18
+ import "./index52.js";
19
+ import { DialogTitle as u } from "./index58.js";
20
+ import { Typography as d } from "./index62.js";
21
+ import { ACTION_ICON as ce, STATUS_ICON as le, amountValueToneClass as ue, headerIconButtonClass as f } from "./index93.js";
22
+ import { getInvoiceValidationSchema as de } from "./index98.js";
23
+ import { useUserPermissions as fe } from "./index116.js";
24
+ import { useSelectableBankAccounts as pe } from "./index125.js";
25
+ import { useGetPaymentReminderById as me } from "./index146.js";
26
+ import { useGetOverdueReminderById as he } from "./index149.js";
27
+ import { useDuplicateInvoice as ge } from "./index152.js";
28
+ import { useGetPaymentRecords as _e } from "./index156.js";
29
+ import { useGetReceivablePDFById as ve } from "./index158.js";
30
+ import { useGetRecurrenceById as ye } from "./index168.js";
31
+ import { useGetInvoiceRequiredFields as be } from "./index170.js";
32
+ import { buildInvoiceDetailsView as xe } from "./index187.js";
33
+ import { preventTooltipFocusOpen as Se } from "./index191.js";
34
+ import { buildEditInvoiceFormValues as Ce } from "./index197.js";
35
+ import { isPrimaryActionDisabled as we } from "./index199.js";
36
+ import "./index202.js";
37
+ import { Badge as p } from "./index223.js";
38
+ import { InvoiceStatusChip as Te } from "./index238.js";
39
+ import { NotFound as Ee } from "./index239.js";
40
+ import { CounterpartDetails as De } from "./index240.js";
41
+ import { AccessRestriction as Oe } from "./index247.js";
42
+ import "./index424.js";
43
+ import { InvoiceRecurrenceStatusChip as ke } from "./index446.js";
44
+ import { useIssueReceivableById as Ae } from "./index457.js";
45
+ import { ActionsModal as je } from "./index523.js";
46
+ import { Accordion as Me, AccordionContent as m, AccordionItem as h, AccordionTrigger as g } from "./index514.js";
47
+ import { Tooltip as _, TooltipContent as v, TooltipProvider as Ne, TooltipTrigger as y } from "./index515.js";
48
+ import { usePauseRecurrence as Pe } from "./index516.js";
49
+ import { useResumeRecurrence as Fe } from "./index517.js";
50
+ import { InvoiceDetailsAmountCell as Ie } from "./index518.js";
51
+ import { InvoiceDetailsAttachments as Le } from "./index519.js";
52
+ import { InvoiceDetailsCloseButton as b } from "./index520.js";
53
+ import { EditInvoiceDetails as Re } from "./index524.js";
54
+ import { InvoiceDetailsInfoRow as x } from "./index525.js";
55
+ import { InvoiceDetailsCustomerRow as ze } from "./index526.js";
56
+ import { InvoiceCancelModal as Be } from "./index528.js";
57
+ import { InvoiceDeleteModal as Ve } from "./index529.js";
58
+ import { InvoiceDetailsTabScheduledInvoices as He } from "./index531.js";
59
+ import { MarkAsUncollectibleModal as Ue } from "./index532.js";
60
+ import { InvoiceDetailsOverflowMenu as We } from "./index533.js";
61
+ import { RecordManualPaymentModal as Ge } from "./index540.js";
62
+ import { RecurrenceCancelModal as Ke } from "./index541.js";
63
+ import { useCallback as S, useMemo as C, useState as w } from "react";
64
+ import { ChevronLeft as qe, CircleAlert as Je, Eye as Ye, Repeat as T } from "lucide-react";
65
+ import { Fragment as E, jsx as D, jsxs as O } from "@emotion/react/jsx-runtime";
66
+ import { toast as k } from "react-hot-toast";
67
+ import { useLingui as Xe } from "@lingui/react";
12
68
  //#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index542.js
13
- var h = {
14
- Invoices: 0,
15
- Quotes: 1,
16
- CreditNotes: 2,
17
- Financing: 3
18
- }, g = (e) => /* @__PURE__ */ u(n, { children: /* @__PURE__ */ u(_, { ...e }) }), _ = ({ initialCounterpartId: t, onRowClick: n, onTabChange: g, setIsCreateInvoiceDialogOpen: _, ...y }) => {
19
- let { tab: b, tabs: x } = v(y), { i18n: S } = m(), [C, w] = c(b ?? h.Invoices), T = `Monite-ReceivablesTable-Tabs-${s()}-`, E = x?.[C], D = (e) => {
20
- w(e), g?.(e);
21
- };
22
- return /* @__PURE__ */ d(l, { children: [
23
- /* @__PURE__ */ u(f, {
24
- className: r(e, "Monite-ReceivablesTable-Tabs"),
25
- children: /* @__PURE__ */ u(p, {
26
- value: C,
27
- variant: "standard",
28
- "aria-label": S._("Receivables tabs"),
29
- sx: { border: "none" },
30
- onChange: (e, t) => D(Number(t)),
31
- children: x?.map(({ label: e, query: t }, n) => null)
32
- })
33
- }),
34
- E?.query?.type === "quote" && /* @__PURE__ */ u(f, {
35
- role: "tabpanel",
36
- id: `${T}-${C}-tabpanel`,
37
- "aria-labelledby": `${T}-${C}-tab`,
38
- sx: {
39
- display: "flex",
40
- flexDirection: "column",
41
- height: "inherit",
42
- minHeight: "0"
43
- },
44
- children: /* @__PURE__ */ u(a, {
45
- onRowClick: n,
46
- setIsCreateInvoiceDialogOpen: _,
47
- query: E?.query
48
- }, C)
49
- }),
50
- E?.query?.type === "invoice" && /* @__PURE__ */ u(f, {
51
- role: "tabpanel",
52
- id: `${T}-${C}-tabpanel`,
53
- "aria-labelledby": `${T}-${C}-tab`,
54
- sx: {
55
- display: "flex",
56
- flexDirection: "column",
57
- height: "inherit",
58
- minHeight: "0"
59
- },
60
- children: /* @__PURE__ */ u(i, {
61
- initialCounterpartId: t,
62
- onRowClick: n,
63
- setIsCreateInvoiceDialogOpen: _,
64
- query: E?.query
65
- }, C)
66
- }),
67
- E?.query?.type === "credit_note" && /* @__PURE__ */ u(f, {
68
- role: "tabpanel",
69
- id: `${T}-${C}-tabpanel`,
70
- "aria-labelledby": `${T}-${C}-tab`,
71
- sx: {
72
- display: "flex",
73
- flexDirection: "column",
74
- height: "inherit",
75
- minHeight: "0"
76
- },
77
- children: /* @__PURE__ */ u(o, {
78
- onRowClick: n,
79
- setIsCreateInvoiceDialogOpen: _,
80
- query: E?.query
81
- }, C)
69
+ var Ze = (e) => /* @__PURE__ */ D(c, { children: /* @__PURE__ */ D(A, { ...e }) }), A = ({ invoiceId: c, open: Ze, onCloseInvoiceDetails: A, onDuplicate: Qe, openInvoiceDetails: j, embeddedBankName: $e }) => {
70
+ let { i18n: M } = Xe(), { locale: et, componentSettings: tt } = t(), N = !!tt?.receivables?.enableEntityBankAccount, { formatCurrencyToDisplay: nt } = i(), { receivablesCallbacks: rt } = ne(), { data: P, isLoading: it } = te(c, !0), F = P?.type === "invoice" ? P.counterpart_id : void 0, I = P?.type === "invoice" ? P.counterpart_billing_address?.id : void 0, { data: L, isLoading: R } = n(F), z = !!r(L), { data: at } = ee(F), ot = C(() => at?.data?.find((e) => e.id === I) ?? (P?.type === "invoice" ? P.counterpart_billing_address : void 0), [
71
+ at?.data,
72
+ P,
73
+ I
74
+ ]), { data: st, isFetching: ct, isLoading: lt } = s(), { data: ut, isFetching: dt, isLoading: ft } = be({
75
+ counterpart_billing_address_id: I,
76
+ counterpart_country: ot?.country,
77
+ counterpart_id: F,
78
+ counterpart_type: L?.id === F && L?.type || void 0
79
+ }), pt = ut?.entity?.tax_id?.required, mt = !!(P?.type === "invoice" && (P.payment_reminder_id || P.overdue_reminder_id)), B = !!F && R || lt || ct || ft || dt, { data: ht } = ve(c, P?.type === "invoice"), gt = ht?.file_url, { data: V, isLoading: _t } = ye(P?.type === "invoice" ? P?.recurrence_id : void 0), { data: vt, isLoading: yt } = _e(P?.id), { data: bt } = me(P?.type === "invoice" ? P?.payment_reminder_id : void 0), { data: xt } = he(P?.type === "invoice" ? P?.overdue_reminder_id : void 0), { bankAccounts: St, isIncomplete: Ct } = pe(N), wt = P?.type === "invoice" ? P.bank_account_id : void 0, Tt = C(() => N ? {
80
+ account: St.find((e) => e.id === wt),
81
+ isListIncomplete: Ct
82
+ } : void 0, [
83
+ N,
84
+ St,
85
+ wt,
86
+ Ct
87
+ ]), [H, U] = w(!1), [Et, W] = w("edit"), [G, K] = w(null), [Dt, Ot] = w(!1), [kt, At] = w(!1), [jt, Mt] = w(!1), [Nt, Pt] = w(!1), [Ft, It] = w(!1), q = fe(), Lt = q.has(e.InvoiceReadOrg), J = q.has(e.InvoiceWriteOrg), Rt = q.has(e.CounterpartReadOrg), zt = q.has(e.CounterpartWriteOrg), { mutateAsync: Y, isPending: Bt } = Ae(), { mutate: Vt, isPending: Ht } = ge(Qe), { mutate: Ut, isPending: Wt } = Pe(V?.id ?? "", c), { mutate: Gt, isPending: Kt } = Fe(V?.id ?? "", c), qt = Ze && !H, Jt = Lt && !it && !_t && !!P && P.type === "invoice", X = C(() => {
88
+ if (!(!P || P.type !== "invoice")) return xe(P, V, vt?.data ?? [], {
89
+ i18n: M,
90
+ formatCurrencyToDisplay: nt,
91
+ locale: et
92
+ }, yt, {
93
+ paymentReminder: bt,
94
+ overdueReminder: xt
95
+ }, Tt);
96
+ }, [
97
+ P,
98
+ V,
99
+ vt,
100
+ yt,
101
+ bt,
102
+ xt,
103
+ Tt,
104
+ M,
105
+ nt,
106
+ et
107
+ ]), Z = (e) => {
108
+ switch (e) {
109
+ case "edit": return M._("Edit");
110
+ case "issue": return M._("Issue");
111
+ case "issueAndSend": return M._("Issue and send");
112
+ case "recordPayment": return M._("Record payment");
113
+ case "send": return M._("Resend");
114
+ case "clone": return M._("Duplicate");
115
+ case "cancel": return M._("Cancel invoice");
116
+ case "delete": return M._("Delete");
117
+ case "markUncollectible": return M._("Mark as uncollectible");
118
+ case "pauseRecurrence": return M._("Pause series");
119
+ case "resumeRecurrence": return M._("Resume series");
120
+ case "cancelRecurrence": return M._("Cancel series");
121
+ }
122
+ }, Q = S((e) => {
123
+ J ? e() : k.error(M._("You don't have permission to update this document. Please, contact your system administrator for details."));
124
+ }, [J, M]), Yt = S((e) => {
125
+ W(e), U(!0);
126
+ }, []), Xt = S(() => {
127
+ if (!P || P.type !== "invoice") return !1;
128
+ let e = Ce(P, V);
129
+ return de(M, N, zt).safeParse(e).success;
130
+ }, [
131
+ P,
132
+ V,
133
+ M,
134
+ N,
135
+ zt
136
+ ]), $ = S((e) => {
137
+ if (!Xt()) return Yt(e), !1;
138
+ if (B) return !1;
139
+ if (pt && !st?.tax_id) return k.error(M._("Set your organization's Tax ID to issue invoice")), !1;
140
+ if (!mt) return !0;
141
+ let t = r(L), n = L?.reminders_enabled;
142
+ return !n && t ? (k.error(M._("Payment reminders are disabled for this customer. Please enable them in the customer details or turn them off.")), !1) : !t && n ? (k.error(M._("No email address is added for the selected customer. Please add it to the customer details or turn off the reminders.")), !1) : !n && !t ? (k.error(M._("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;
143
+ }, [
144
+ L,
145
+ st?.tax_id,
146
+ mt,
147
+ M,
148
+ pt,
149
+ B,
150
+ Xt,
151
+ Yt
152
+ ]), Zt = S(async () => {
153
+ if ($("issue")) try {
154
+ await Y({ path: { receivable_id: c } });
155
+ } catch {
156
+ k.error(M._("Failed to issue invoice. Add any missing information to your draft invoice and try again."));
157
+ }
158
+ }, [
159
+ $,
160
+ Y,
161
+ c,
162
+ M
163
+ ]), Qt = S(async () => {
164
+ if (P?.counterpart_id && !R) {
165
+ if (!z) {
166
+ k.error(M._("This customer has no email address. Add one in the customer details to send the invoice."));
167
+ return;
168
+ }
169
+ if ($("issueAndSend")) {
170
+ try {
171
+ await Y({ path: { receivable_id: c } });
172
+ } catch {
173
+ k.error(M._("Failed to issue invoice. Add any missing information to your draft invoice and try again."));
174
+ return;
175
+ }
176
+ K({
177
+ action: "issue",
178
+ inlineLineItems: [],
179
+ isEditFlow: !1,
180
+ issue: {
181
+ receivableId: c,
182
+ counterpartId: P.counterpart_id
183
+ }
184
+ });
185
+ }
186
+ }
187
+ }, [
188
+ P?.counterpart_id,
189
+ z,
190
+ R,
191
+ $,
192
+ Y,
193
+ c,
194
+ M
195
+ ]), $t = S((e) => {
196
+ switch (e) {
197
+ case "edit": return Q(() => {
198
+ W("edit"), U(!0);
199
+ });
200
+ case "issue": return Q(Zt);
201
+ case "issueAndSend": return Q(Qt);
202
+ case "send": return Q(() => {
203
+ if (!R) {
204
+ if (!z) {
205
+ k.error(M._("This customer has no email address. Add one in the customer details to send the invoice."));
206
+ return;
207
+ }
208
+ P?.counterpart_id && K({
209
+ action: "issue",
210
+ inlineLineItems: [],
211
+ isEditFlow: !0,
212
+ issue: {
213
+ receivableId: c,
214
+ counterpartId: P.counterpart_id
215
+ }
216
+ });
217
+ }
218
+ });
219
+ case "clone": return Q(() => Vt({ path: { receivable_id: c } }));
220
+ case "cancel": return Q(() => Ot(!0));
221
+ case "delete": return Q(() => At(!0));
222
+ case "markUncollectible": return Q(() => Mt(!0));
223
+ case "pauseRecurrence": return Q(() => Ut(void 0));
224
+ case "resumeRecurrence": return Q(() => Gt(void 0));
225
+ case "cancelRecurrence": return Q(() => Pt(!0));
226
+ case "recordPayment": return;
227
+ }
228
+ }, [
229
+ Q,
230
+ Zt,
231
+ Qt,
232
+ z,
233
+ R,
234
+ P?.counterpart_id,
235
+ Vt,
236
+ c,
237
+ Ut,
238
+ Gt,
239
+ M
240
+ ]);
241
+ return /* @__PURE__ */ O(E, { children: [H && P && /* @__PURE__ */ D(Re, {
242
+ isOpen: H,
243
+ invoice: P,
244
+ issueIntent: Et !== "edit",
245
+ embeddedBankName: $e,
246
+ onUpdated: (e, t) => {
247
+ U(!1);
248
+ let n = Et !== "issue";
249
+ W("edit"), rt?.onUpdate?.(e.id, e), t.issued && n && t.hasCustomerEmail ? K({
250
+ action: "issue",
251
+ isEditFlow: !1,
252
+ inlineLineItems: t.inlineLineItems,
253
+ issue: {
254
+ receivableId: e.id,
255
+ counterpartId: t.counterpartId
256
+ }
257
+ }) : t.issued && t.inlineLineItems.length > 0 ? K({
258
+ action: "issue",
259
+ isEditFlow: !1,
260
+ inlineLineItems: t.inlineLineItems
261
+ }) : t.inlineLineItems.length > 0 && K({
262
+ action: t.activatedRecurrence ? "recurrence" : "update",
263
+ isEditFlow: !0,
264
+ inlineLineItems: t.inlineLineItems
265
+ });
266
+ },
267
+ onCancel: () => {
268
+ U(!1), W("edit");
269
+ }
270
+ }), /* @__PURE__ */ D(re, {
271
+ open: qt,
272
+ modal: !1,
273
+ onOpenChange: A,
274
+ children: /* @__PURE__ */ O(ie, {
275
+ showCloseButton: !1,
276
+ layer: "under-dialogs",
277
+ className: "ttw:overflow-y-auto ttw:p-0",
278
+ children: [
279
+ /* @__PURE__ */ D(ae, {
280
+ hidden: !0,
281
+ children: M._("Invoice details")
282
+ }),
283
+ Jt ? null : /* @__PURE__ */ D(b, {
284
+ label: M._("Close"),
285
+ onClose: A,
286
+ className: a(f, "ttw:absolute ttw:right-4 ttw:top-4 ttw:z-10")
287
+ }),
288
+ (() => {
289
+ if (it || _t) return /* @__PURE__ */ O("div", {
290
+ className: "ttw:flex ttw:w-full ttw:items-center ttw:justify-center ttw:h-full",
291
+ children: [/* @__PURE__ */ D(u, {
292
+ hidden: !0,
293
+ children: M._("Loading invoice details")
294
+ }), /* @__PURE__ */ D(l, {})]
295
+ });
296
+ if (!Lt) return /* @__PURE__ */ O("div", {
297
+ className: "ttw:w-3/4 ttw:m-auto",
298
+ children: [/* @__PURE__ */ D(u, {
299
+ hidden: !0,
300
+ children: M._("Access restricted")
301
+ }), /* @__PURE__ */ D(Oe, {})]
302
+ });
303
+ if (P && P.type !== "invoice") return /* @__PURE__ */ O("div", {
304
+ className: "ttw:w-3/4 ttw:m-auto",
305
+ children: [/* @__PURE__ */ D(u, {
306
+ hidden: !0,
307
+ children: M._("Receivable type not supported")
308
+ }), /* @__PURE__ */ D(Ee, {
309
+ title: M._("Receivable type not supported"),
310
+ description: M._("Receivable type {type} is not supported. Only invoice is supported.", { type: P.type })
311
+ })]
312
+ });
313
+ if (!P || !X) return /* @__PURE__ */ O("div", {
314
+ className: "ttw:w-3/4 ttw:m-auto",
315
+ children: [/* @__PURE__ */ D(u, {
316
+ hidden: !0,
317
+ children: M._("Invoice not found")
318
+ }), /* @__PURE__ */ D(Ee, {
319
+ title: M._("Invoice not found"),
320
+ description: M._("There is no invoice for the provided id: {invoiceId}", { invoiceId: c })
321
+ })]
322
+ });
323
+ let e = le[X.status], t = X.amountTone === "danger", n = X.recurringSeries, r = !!n, i = P.counterpart_name, ee = P.counterpart_id && Rt ? () => It(!0) : void 0, s = X.primaryActions.length > 0 ? /* @__PURE__ */ D("div", {
324
+ className: "ttw:flex ttw:items-center ttw:gap-2 ttw:border-t ttw:border-border ttw:pt-3",
325
+ children: X.primaryActions.map((e, t) => {
326
+ let n = ce[e], r = t === X.primaryActions.length - 1 ? "default" : "outline";
327
+ return e === "recordPayment" && P.type === "invoice" ? /* @__PURE__ */ D(Ge, {
328
+ invoice: P,
329
+ children: ({ openModal: t }) => /* @__PURE__ */ O(o, {
330
+ type: "button",
331
+ size: "sm",
332
+ variant: r,
333
+ onClick: () => Q(t),
334
+ children: [/* @__PURE__ */ D(n, { className: "ttw:size-4" }), Z(e)]
335
+ })
336
+ }, e) : /* @__PURE__ */ O(o, {
337
+ type: "button",
338
+ size: "sm",
339
+ variant: r,
340
+ disabled: we(e, {
341
+ isIssuing: Bt,
342
+ isIssuePreflightLoading: B,
343
+ isCounterpartLoading: R
344
+ }),
345
+ onClick: () => $t(e),
346
+ children: [/* @__PURE__ */ D(n, { className: "ttw:size-4" }), Z(e)]
347
+ }, e);
348
+ })
349
+ }) : null;
350
+ return /* @__PURE__ */ O(E, { children: [
351
+ X.seriesLink ? /* @__PURE__ */ D("div", {
352
+ className: "ttw:border-b ttw:border-border ttw:px-6 ttw:py-3",
353
+ children: /* @__PURE__ */ O("button", {
354
+ type: "button",
355
+ onClick: () => X.seriesLink && j?.(X.seriesLink.invoiceId),
356
+ className: "ttw:flex ttw:items-center ttw:gap-1 ttw:text-sm ttw:text-primary ttw:hover:underline",
357
+ children: [/* @__PURE__ */ D(qe, {
358
+ className: "ttw:size-4",
359
+ "aria-hidden": "true"
360
+ }), M._("Back to {title} recurring series", { title: X.seriesLink.title })]
361
+ })
362
+ }) : null,
363
+ /* @__PURE__ */ O(oe, {
364
+ 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",
365
+ children: [/* @__PURE__ */ O("div", {
366
+ className: "ttw:flex ttw:flex-col ttw:gap-0.5",
367
+ children: [/* @__PURE__ */ D(se, {
368
+ className: "ttw:text-xl ttw:font-semibold ttw:text-foreground",
369
+ children: X.title
370
+ }), X.subtitle ? /* @__PURE__ */ D(d, {
371
+ variant: "body2",
372
+ color: "muted",
373
+ children: X.subtitle
374
+ }) : null]
375
+ }), /* @__PURE__ */ D(Ne, {
376
+ delayDuration: 500,
377
+ children: /* @__PURE__ */ O("div", {
378
+ className: "ttw:flex ttw:items-center ttw:gap-1.5",
379
+ children: [
380
+ gt ? /* @__PURE__ */ O(_, { children: [/* @__PURE__ */ D(y, {
381
+ asChild: !0,
382
+ onFocus: Se,
383
+ children: /* @__PURE__ */ D(o, {
384
+ asChild: !0,
385
+ variant: "ghost",
386
+ size: "icon",
387
+ className: f,
388
+ children: /* @__PURE__ */ D("a", {
389
+ href: gt,
390
+ target: "_blank",
391
+ rel: "noreferrer",
392
+ "aria-label": M._("View PDF"),
393
+ children: /* @__PURE__ */ D(Ye, { className: "ttw:size-4" })
394
+ })
395
+ })
396
+ }), /* @__PURE__ */ D(v, { children: M._("View PDF") })] }) : null,
397
+ X.overflowActions.length > 0 ? /* @__PURE__ */ D(We, {
398
+ actions: X.overflowActions,
399
+ triggerLabel: M._("More actions"),
400
+ getActionLabel: Z,
401
+ onSelect: $t,
402
+ isActionDisabled: (e) => e === "clone" && Ht || e === "pauseRecurrence" && Wt || e === "resumeRecurrence" && Kt || e === "send" && R,
403
+ className: f
404
+ }) : null,
405
+ /* @__PURE__ */ O(_, { children: [/* @__PURE__ */ D(y, {
406
+ asChild: !0,
407
+ onFocus: Se,
408
+ children: /* @__PURE__ */ D(b, {
409
+ label: M._("Close"),
410
+ onClose: A,
411
+ className: f
412
+ })
413
+ }), /* @__PURE__ */ D(v, { children: M._("Close") })] })
414
+ ]
415
+ })
416
+ })]
417
+ }),
418
+ /* @__PURE__ */ O("div", {
419
+ className: "ttw:flex ttw:flex-col",
420
+ children: [/* @__PURE__ */ D("div", {
421
+ className: "ttw:px-6",
422
+ children: r && n ? /* @__PURE__ */ O("div", {
423
+ className: "ttw:flex ttw:flex-col ttw:gap-3 ttw:rounded-lg ttw:bg-violet-50 ttw:p-4",
424
+ children: [
425
+ /* @__PURE__ */ O("div", {
426
+ className: "ttw:flex ttw:flex-col ttw:gap-0.5",
427
+ children: [/* @__PURE__ */ D(d, {
428
+ variant: "caption",
429
+ color: "muted",
430
+ children: M._("Recurring amount")
431
+ }), /* @__PURE__ */ O("div", {
432
+ className: "ttw:flex ttw:items-baseline ttw:gap-1.5",
433
+ children: [/* @__PURE__ */ D(d, {
434
+ component: "span",
435
+ variant: "h3",
436
+ className: ue[X.amountTone],
437
+ children: n.amountLabel
438
+ }), /* @__PURE__ */ D(d, {
439
+ component: "span",
440
+ variant: "body2",
441
+ color: "muted",
442
+ children: n.amountPeriodLabel
443
+ })]
444
+ })]
445
+ }),
446
+ /* @__PURE__ */ O("div", {
447
+ className: "ttw:flex ttw:items-center ttw:gap-2",
448
+ children: [/* @__PURE__ */ O(p, {
449
+ variant: "outline",
450
+ className: "ttw:gap-1 ttw:border-violet-200 ttw:bg-violet-50 ttw:text-violet-700",
451
+ children: [/* @__PURE__ */ D(T, { className: "ttw:size-3" }), M._("Recurring")]
452
+ }), /* @__PURE__ */ D(ke, {
453
+ status: n.status,
454
+ showIcon: !0
455
+ })]
456
+ }),
457
+ /* @__PURE__ */ O("div", {
458
+ className: "ttw:flex ttw:gap-12",
459
+ children: [/* @__PURE__ */ O("div", {
460
+ className: "ttw:flex ttw:flex-col ttw:gap-0.5",
461
+ children: [/* @__PURE__ */ D(d, {
462
+ variant: "caption",
463
+ color: "muted",
464
+ children: M._("Starts on")
465
+ }), /* @__PURE__ */ D(d, {
466
+ component: "span",
467
+ variant: "body2",
468
+ children: n.startsOnLabel
469
+ })]
470
+ }), /* @__PURE__ */ O("div", {
471
+ className: "ttw:flex ttw:flex-col ttw:gap-0.5",
472
+ children: [/* @__PURE__ */ D(d, {
473
+ variant: "caption",
474
+ color: "muted",
475
+ children: M._("Ends on")
476
+ }), /* @__PURE__ */ D(d, {
477
+ component: "span",
478
+ variant: "body2",
479
+ children: n.endsOnLabel
480
+ })]
481
+ })]
482
+ }),
483
+ s
484
+ ]
485
+ }) : /* @__PURE__ */ O("div", {
486
+ className: a("ttw:flex ttw:flex-col ttw:gap-3 ttw:rounded-lg ttw:bg-muted ttw:p-4", t && "ttw:border ttw:border-red-200"),
487
+ children: [
488
+ /* @__PURE__ */ D("div", {
489
+ className: "ttw:flex ttw:flex-row ttw:flex-wrap ttw:gap-x-12 ttw:gap-y-2",
490
+ children: X.amountRows.map((e) => /* @__PURE__ */ D(Ie, {
491
+ row: e,
492
+ defaultTone: X.amountTone
493
+ }, e.label))
494
+ }),
495
+ /* @__PURE__ */ O("div", {
496
+ className: "ttw:flex ttw:items-center ttw:gap-2",
497
+ children: [X.overdueLabel ? /* @__PURE__ */ O("span", {
498
+ 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",
499
+ children: [/* @__PURE__ */ D(Je, { className: "ttw:size-3" }), X.overdueLabel]
500
+ }) : /* @__PURE__ */ D(Te, {
501
+ status: X.status,
502
+ variant: "outline",
503
+ label: X.statusLabel,
504
+ icon: e ? /* @__PURE__ */ D(e, { className: "ttw:size-3" }) : void 0
505
+ }), X.recurring ? /* @__PURE__ */ O(p, {
506
+ variant: "outline",
507
+ className: "ttw:gap-1 ttw:border-violet-200 ttw:bg-violet-50 ttw:text-violet-700",
508
+ children: [/* @__PURE__ */ D(T, { className: "ttw:size-3" }), M._("Recurring")]
509
+ }) : null]
510
+ }),
511
+ /* @__PURE__ */ O("div", {
512
+ className: "ttw:flex ttw:gap-12",
513
+ children: [/* @__PURE__ */ O("div", {
514
+ className: "ttw:flex ttw:flex-col ttw:gap-0.5",
515
+ children: [/* @__PURE__ */ D(d, {
516
+ variant: "caption",
517
+ color: "muted",
518
+ children: M._("Invoice date")
519
+ }), /* @__PURE__ */ D(d, {
520
+ component: "span",
521
+ variant: "body2",
522
+ children: X.invoiceDateLabel
523
+ })]
524
+ }), /* @__PURE__ */ O("div", {
525
+ className: "ttw:flex ttw:flex-col ttw:gap-0.5",
526
+ children: [/* @__PURE__ */ D(d, {
527
+ variant: "caption",
528
+ color: "muted",
529
+ children: X.dueDateCaption
530
+ }), /* @__PURE__ */ D(d, {
531
+ component: "span",
532
+ variant: "body2",
533
+ children: X.dueDateLabel
534
+ })]
535
+ })]
536
+ }),
537
+ s
538
+ ]
539
+ })
540
+ }), /* @__PURE__ */ O("div", {
541
+ className: "ttw:px-6",
542
+ children: [
543
+ X.paymentHistory ? /* @__PURE__ */ O("section", {
544
+ "aria-label": M._("Payment history"),
545
+ className: "ttw:border-b ttw:border-border ttw:py-4",
546
+ children: [/* @__PURE__ */ D(d, {
547
+ component: "h3",
548
+ variant: "body2",
549
+ className: "ttw:mb-3 ttw:font-medium",
550
+ children: M._("Payment history")
551
+ }), X.paymentHistory.loading ? /* @__PURE__ */ D("div", {
552
+ className: "ttw:flex ttw:py-2",
553
+ children: /* @__PURE__ */ D(l, { className: "ttw:h-5 ttw:w-5 ttw:border-2" })
554
+ }) : X.paymentHistory.rows.length === 0 ? /* @__PURE__ */ D(d, {
555
+ variant: "body2",
556
+ className: X.paymentHistory.emptyTone === "danger" ? "ttw:text-red-600" : "ttw:text-muted-foreground",
557
+ children: M._("You've received no payments yet.")
558
+ }) : /* @__PURE__ */ O("div", {
559
+ className: "ttw:flex ttw:flex-col",
560
+ children: [X.paymentHistory.rows.map((e) => /* @__PURE__ */ O("div", {
561
+ className: "ttw:flex ttw:justify-between ttw:border-b ttw:border-border ttw:py-2",
562
+ children: [/* @__PURE__ */ D(d, {
563
+ component: "span",
564
+ variant: "body2",
565
+ children: e.dateLabel
566
+ }), /* @__PURE__ */ D(d, {
567
+ component: "span",
568
+ variant: "body2",
569
+ children: e.amountLabel
570
+ })]
571
+ }, e.id)), /* @__PURE__ */ O("div", {
572
+ className: "ttw:flex ttw:justify-between ttw:py-2 ttw:font-medium",
573
+ children: [/* @__PURE__ */ D(d, {
574
+ component: "span",
575
+ variant: "body2",
576
+ children: M._("Total received")
577
+ }), /* @__PURE__ */ D(d, {
578
+ component: "span",
579
+ variant: "body2",
580
+ children: X.paymentHistory.totalLabel
581
+ })]
582
+ })]
583
+ })]
584
+ }) : null,
585
+ i || X.customerContact.length > 0 ? /* @__PURE__ */ O("section", {
586
+ "aria-label": M._("Customer details"),
587
+ className: "ttw:border-b ttw:border-border ttw:py-4",
588
+ children: [/* @__PURE__ */ D(d, {
589
+ component: "h3",
590
+ variant: "body2",
591
+ className: "ttw:mb-3 ttw:font-medium",
592
+ children: M._("Customer details")
593
+ }), /* @__PURE__ */ O("div", {
594
+ className: "ttw:flex ttw:flex-col",
595
+ children: [i ? /* @__PURE__ */ D(ze, {
596
+ label: M._("Name"),
597
+ name: i,
598
+ onOpenCounterpart: ee
599
+ }) : null, X.customerContact.map((e) => /* @__PURE__ */ D(x, { ...e }, e.label))]
600
+ })]
601
+ }) : null,
602
+ /* @__PURE__ */ O(Me, {
603
+ type: "multiple",
604
+ defaultValue: ["attachments"],
605
+ className: "ttw:w-full",
606
+ children: [
607
+ /* @__PURE__ */ O(h, {
608
+ value: "billing",
609
+ children: [/* @__PURE__ */ D(g, { children: /* @__PURE__ */ D("span", {
610
+ className: "ttw:group-hover:underline",
611
+ children: M._("Billing details")
612
+ }) }), /* @__PURE__ */ D(m, { children: /* @__PURE__ */ O("div", {
613
+ className: "ttw:flex ttw:flex-col",
614
+ children: [X.billingItems.map((e) => /* @__PURE__ */ D(x, { ...e }, e.label)), X.seriesLink ? /* @__PURE__ */ O("div", {
615
+ className: "ttw:flex ttw:gap-4 ttw:border-b ttw:border-border ttw:py-3 ttw:last:border-b-0",
616
+ children: [/* @__PURE__ */ D(d, {
617
+ component: "span",
618
+ variant: "body2",
619
+ color: "muted",
620
+ className: "ttw:w-40 ttw:shrink-0",
621
+ children: M._("Recurring series")
622
+ }), /* @__PURE__ */ D("button", {
623
+ type: "button",
624
+ onClick: () => X.seriesLink && j?.(X.seriesLink.invoiceId),
625
+ className: "ttw:text-left ttw:text-primary ttw:hover:underline",
626
+ children: X.seriesLink.title
627
+ })]
628
+ }) : null]
629
+ }) })]
630
+ }),
631
+ r ? null : /* @__PURE__ */ O(h, {
632
+ value: "line-items",
633
+ children: [/* @__PURE__ */ D(g, { children: /* @__PURE__ */ O("span", {
634
+ className: "ttw:flex ttw:items-center ttw:gap-2",
635
+ children: [/* @__PURE__ */ D("span", {
636
+ className: "ttw:group-hover:underline",
637
+ children: M._("Line items")
638
+ }), /* @__PURE__ */ D(p, {
639
+ variant: "secondary",
640
+ className: "ttw:rounded-full",
641
+ children: X.lineItems.length
642
+ })]
643
+ }) }), /* @__PURE__ */ D(m, { children: /* @__PURE__ */ O("div", {
644
+ className: "ttw:flex ttw:flex-col",
645
+ children: [X.lineItems.length === 0 ? /* @__PURE__ */ D(d, {
646
+ variant: "body2",
647
+ color: "muted",
648
+ className: "ttw:py-3",
649
+ children: M._("No line items.")
650
+ }) : X.lineItems.map((e) => /* @__PURE__ */ O("div", {
651
+ className: "ttw:flex ttw:items-start ttw:justify-between ttw:border-b ttw:border-border ttw:py-3",
652
+ children: [/* @__PURE__ */ O("div", {
653
+ className: "ttw:flex ttw:flex-col",
654
+ children: [/* @__PURE__ */ D(d, {
655
+ component: "span",
656
+ variant: "body2",
657
+ className: "ttw:font-medium",
658
+ children: e.name
659
+ }), /* @__PURE__ */ D(d, {
660
+ component: "span",
661
+ variant: "body2",
662
+ color: "muted",
663
+ children: M._("{quantity} x {price} ea", {
664
+ quantity: e.quantityLabel,
665
+ price: e.unitPriceLabel
666
+ })
667
+ })]
668
+ }), /* @__PURE__ */ D(d, {
669
+ component: "span",
670
+ variant: "body2",
671
+ children: e.totalLabel
672
+ })]
673
+ }, e.id)), X.lineItemTotals.length > 0 ? /* @__PURE__ */ D("div", {
674
+ className: "ttw:flex ttw:flex-col ttw:gap-1 ttw:py-3",
675
+ children: X.lineItemTotals.map((e) => /* @__PURE__ */ O("div", {
676
+ className: a("ttw:flex ttw:justify-between", e.emphasis && "ttw:font-medium"),
677
+ children: [/* @__PURE__ */ D(d, {
678
+ component: "span",
679
+ variant: "body2",
680
+ children: e.label
681
+ }), /* @__PURE__ */ D(d, {
682
+ component: "span",
683
+ variant: "body2",
684
+ children: e.value
685
+ })]
686
+ }, e.label))
687
+ }) : null]
688
+ }) })]
689
+ }),
690
+ !r && X.notes ? /* @__PURE__ */ O(h, {
691
+ value: "notes",
692
+ children: [/* @__PURE__ */ D(g, { children: /* @__PURE__ */ O("span", {
693
+ className: "ttw:flex ttw:items-center ttw:gap-2",
694
+ children: [/* @__PURE__ */ D("span", {
695
+ className: "ttw:group-hover:underline",
696
+ children: M._("Notes")
697
+ }), /* @__PURE__ */ D(p, {
698
+ variant: "secondary",
699
+ className: "ttw:rounded-full",
700
+ children: [X.notes.opening, X.notes.closing].filter(Boolean).length
701
+ })]
702
+ }) }), /* @__PURE__ */ D(m, { children: /* @__PURE__ */ D("div", {
703
+ className: "ttw:flex ttw:flex-col ttw:gap-3",
704
+ children: [{
705
+ label: M._("Opening note to customer"),
706
+ text: X.notes.opening
707
+ }, {
708
+ label: M._("Closing note to customer"),
709
+ text: X.notes.closing
710
+ }].filter((e) => e.text).map((e) => /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D(d, {
711
+ variant: "body2",
712
+ className: "ttw:mb-1 ttw:font-medium",
713
+ children: e.label
714
+ }), /* @__PURE__ */ D(d, {
715
+ variant: "body2",
716
+ color: "muted",
717
+ children: e.text
718
+ })] }, e.label))
719
+ }) })]
720
+ }) : null,
721
+ /* @__PURE__ */ D(Le, { attachments: P.attachments ?? [] })
722
+ ]
723
+ }),
724
+ r && n && V ? /* @__PURE__ */ O("section", {
725
+ "aria-label": n.scheduleTitle,
726
+ className: "ttw:border-t ttw:border-border ttw:py-4",
727
+ children: [/* @__PURE__ */ D(d, {
728
+ component: "h3",
729
+ variant: "body2",
730
+ className: "ttw:mb-3 ttw:font-medium",
731
+ children: n.scheduleTitle
732
+ }), /* @__PURE__ */ D(He, {
733
+ invoice: P,
734
+ recurrence: V,
735
+ openInvoiceDetails: j
736
+ })]
737
+ }) : null
738
+ ]
739
+ })]
740
+ })
741
+ ] });
742
+ })(),
743
+ Dt && /* @__PURE__ */ D(Be, {
744
+ invoiceId: P?.id ?? "",
745
+ open: Dt,
746
+ onClose: () => Ot(!1)
747
+ }),
748
+ kt && /* @__PURE__ */ D(Ve, {
749
+ open: kt,
750
+ onClose: () => At(!1),
751
+ invoiceId: P?.id ?? "",
752
+ documentId: P?.type === "invoice" ? P?.document_id : void 0,
753
+ onDelete: A
754
+ }),
755
+ jt && /* @__PURE__ */ D(Ue, {
756
+ invoiceId: P?.id ?? "",
757
+ open: jt,
758
+ onClose: () => Mt(!1)
759
+ }),
760
+ Nt && P?.type === "invoice" && /* @__PURE__ */ D(Ke, {
761
+ invoice: P,
762
+ open: Nt,
763
+ onClose: () => Pt(!1)
764
+ }),
765
+ Ft && P?.counterpart_id && Rt && /* @__PURE__ */ D(De, {
766
+ counterpartId: P.counterpart_id,
767
+ open: Ft,
768
+ onClose: () => It(!1),
769
+ showActionsMenu: !1,
770
+ customerType: "customer"
771
+ }),
772
+ G && /* @__PURE__ */ D(je, {
773
+ open: !0,
774
+ isEditFlow: G.isEditFlow,
775
+ action: G.action,
776
+ issue: G.issue,
777
+ inlineLineItems: G.inlineLineItems,
778
+ onClose: () => K(null)
779
+ })
780
+ ]
82
781
  })
83
- ] });
84
- }, v = (e) => {
85
- let { componentSettings: n } = t();
86
- return {
87
- tab: e?.tab ?? n?.receivables?.tab,
88
- tabs: e?.tabs ?? n?.receivables?.tabs
89
- };
782
+ })] });
90
783
  };
91
784
  //#endregion
92
- export { g as ReceivablesTable, h as ReceivablesTableTabEnum, v as useReceivablesTableProps };
785
+ export { Ze as InvoiceDetailsPanel };