@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
@@ -0,0 +1,89 @@
1
+ import { Button as e, Skeleton as t } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { BillUploadDropzone as n } from "./index3.js";
3
+ import "./index5.js";
4
+ import { SOURCE_DOCUMENT_PANEL_LABELS_EN as r } from "./index86.js";
5
+ import { jsx as i, jsxs as a } from "react/jsx-runtime";
6
+ import { Download as o, Trash2 as s } from "lucide-react";
7
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index87.js
8
+ function c(c) {
9
+ let { mode: l, testId: u, labels: d } = c, f = {
10
+ ...r,
11
+ ...d,
12
+ dropzone: {
13
+ ...r.dropzone,
14
+ ...d?.dropzone
15
+ }
16
+ };
17
+ if (l === "loading") return /* @__PURE__ */ a("div", {
18
+ className: "ttw:flex ttw:flex-col ttw:gap-3",
19
+ "data-testid": u,
20
+ children: [/* @__PURE__ */ i("div", {
21
+ className: "ttw:flex ttw:items-center ttw:justify-end ttw:gap-1",
22
+ children: /* @__PURE__ */ i("span", {
23
+ "aria-live": "polite",
24
+ className: "ttw:text-sm ttw:text-muted-foreground",
25
+ children: c.fileName ? f.scanningAttachment(c.fileName) : f.scanning
26
+ })
27
+ }), /* @__PURE__ */ a("div", {
28
+ className: "ttw:flex ttw:h-[min(70vh,44rem)] ttw:flex-col ttw:gap-3 ttw:rounded-lg ttw:border ttw:border-border ttw:bg-card ttw:p-4",
29
+ children: [
30
+ /* @__PURE__ */ i(t, { className: "ttw:h-6 ttw:w-2/5" }),
31
+ /* @__PURE__ */ i(t, { className: "ttw:h-4 ttw:w-3/5" }),
32
+ /* @__PURE__ */ i(t, { className: "ttw:mt-4 ttw:h-4 ttw:w-full" }),
33
+ /* @__PURE__ */ i(t, { className: "ttw:h-4 ttw:w-full" }),
34
+ /* @__PURE__ */ i(t, { className: "ttw:h-4 ttw:w-4/5" }),
35
+ /* @__PURE__ */ i(t, { className: "ttw:mt-auto ttw:h-24 ttw:w-full" })
36
+ ]
37
+ })]
38
+ });
39
+ if (l === "document") {
40
+ let { fileName: t, preview: n, onDownload: r, onDelete: l } = c;
41
+ return /* @__PURE__ */ a("div", {
42
+ className: "ttw:flex ttw:flex-col ttw:gap-3",
43
+ "data-testid": u,
44
+ children: [/* @__PURE__ */ a("div", {
45
+ className: "ttw:flex ttw:items-center ttw:justify-end ttw:gap-1",
46
+ children: [
47
+ /* @__PURE__ */ i("span", {
48
+ className: "ttw:text-sm ttw:text-muted-foreground",
49
+ children: f.scannedAttachment(t ?? "")
50
+ }),
51
+ r ? /* @__PURE__ */ i(e, {
52
+ type: "button",
53
+ variant: "ghost",
54
+ size: "icon",
55
+ "aria-label": f.download,
56
+ onClick: r,
57
+ children: /* @__PURE__ */ i(o, { className: "ttw:size-4" })
58
+ }) : null,
59
+ l ? /* @__PURE__ */ i(e, {
60
+ type: "button",
61
+ variant: "ghost",
62
+ size: "icon",
63
+ "aria-label": f.delete,
64
+ onClick: l,
65
+ children: /* @__PURE__ */ i(s, { className: "ttw:size-4" })
66
+ }) : null
67
+ ]
68
+ }), /* @__PURE__ */ i("div", {
69
+ className: "ttw:flex ttw:h-[min(70vh,44rem)] ttw:items-start ttw:justify-center ttw:overflow-auto ttw:rounded-lg ttw:border ttw:border-border ttw:bg-card ttw:p-4",
70
+ children: n
71
+ })]
72
+ });
73
+ }
74
+ return /* @__PURE__ */ a("div", {
75
+ className: "ttw:rounded-lg ttw:border ttw:border-border ttw:bg-card ttw:p-4",
76
+ "data-testid": u,
77
+ children: [/* @__PURE__ */ i("p", {
78
+ className: "ttw:mb-3 ttw:text-sm ttw:font-medium ttw:text-foreground",
79
+ children: f.uploadHeading
80
+ }), /* @__PURE__ */ i(n, {
81
+ status: c.uploadStatus,
82
+ errorMessage: c.uploadErrorMessage,
83
+ onFilesSelected: c.onFilesSelected,
84
+ labels: f.dropzone
85
+ })]
86
+ });
87
+ }
88
+ //#endregion
89
+ export { c as SourceDocumentPanel, c as default };
@@ -0,0 +1,2 @@
1
+ import "./index86.js";
2
+ import "./index87.js";
@@ -4,7 +4,7 @@
4
4
  "use client";
5
5
  import { useAnalyticsTrack as e } from "../../../shared/feature/dist/lib/analytics/hooks.js";
6
6
  import "../../../shared/feature/dist/index.js";
7
- import { Receivables as t } from "../../../monite-sdk/dist/index543.js";
7
+ import { Receivables as t } from "../../../monite-sdk/dist/index544.js";
8
8
  import "../../../monite-sdk/dist/index.js";
9
9
  import { MoniteRegionProvider as n } from "../../../shared/monite-wrapper/feature/dist/lib/MoniteRegionProvider.js";
10
10
  import "../../../shared/monite-wrapper/feature/dist/index.js";
@@ -77,23 +77,23 @@ import { Payables as ht } from "./index443.js";
77
77
  import { InvoicesTable as gt } from "./index449.js";
78
78
  import { QuotesTable as _t } from "./index454.js";
79
79
  import { CreditNotesTable as vt } from "./index455.js";
80
- import { CreateReceivables as yt } from "./index512.js";
81
- import { ReceivablesTable as bt, ReceivablesTableTabEnum as xt, useReceivablesTableProps as St } from "./index542.js";
82
- import { Receivables as Ct } from "./index543.js";
83
- import { ProductsTable as wt } from "./index550.js";
84
- import { ProductDetails as Tt } from "./index554.js";
85
- import { CreateProduct as Et } from "./index555.js";
86
- import { Products as Dt } from "./index556.js";
87
- import { TagsTable as Ot } from "./index561.js";
88
- import { Tags as kt } from "./index563.js";
89
- import { FinanceBanner as At } from "./index576.js";
90
- import { FinanceIntegrationCard as jt } from "./index582.js";
91
- import { FinanceInvoice as Mt } from "./index584.js";
92
- import { FinanceTab as Nt } from "./index589.js";
93
- import { Integrations as Pt } from "./index592.js";
94
- import { TemplateSettings as Ft } from "./index612.js";
95
- import "./index614.js";
96
- import { MoniteAPIProvider as It } from "./index619.js";
97
- import { MoniteProvider as Lt } from "./index620.js";
98
- import { toast as Rt } from "./index621.js";
80
+ import { CreateReceivables as yt } from "./index513.js";
81
+ import { ReceivablesTable as bt, ReceivablesTableTabEnum as xt, useReceivablesTableProps as St } from "./index543.js";
82
+ import { Receivables as Ct } from "./index544.js";
83
+ import { ProductsTable as wt } from "./index551.js";
84
+ import { ProductDetails as Tt } from "./index555.js";
85
+ import { CreateProduct as Et } from "./index556.js";
86
+ import { Products as Dt } from "./index557.js";
87
+ import { TagsTable as Ot } from "./index562.js";
88
+ import { Tags as kt } from "./index564.js";
89
+ import { FinanceBanner as At } from "./index577.js";
90
+ import { FinanceIntegrationCard as jt } from "./index583.js";
91
+ import { FinanceInvoice as Mt } from "./index585.js";
92
+ import { FinanceTab as Nt } from "./index590.js";
93
+ import { Integrations as Pt } from "./index593.js";
94
+ import { TemplateSettings as Ft } from "./index613.js";
95
+ import "./index615.js";
96
+ import { MoniteAPIProvider as It } from "./index620.js";
97
+ import { MoniteProvider as Lt } from "./index621.js";
98
+ import { toast as Rt } from "./index622.js";
99
99
  export { We as ApprovalPolicies, He as ApprovalPoliciesTable, Ve as ApprovalPolicyDetails, Ke as ApprovalRequests, Ge as ApprovalRequestsTable, w as Combobox, T as ComboboxChip, E as ComboboxChips, D as ComboboxChipsInput, O as ComboboxCollection, k as ComboboxContent, A as ComboboxEmpty, j as ComboboxGroup, M as ComboboxInput, N as ComboboxItem, P as ComboboxLabel, F as ComboboxList, I as ComboboxSeparator, L as ComboboxTrigger, R as ComboboxValue, ze as CounterpartAutocomplete, Fe as CounterpartDetails, Re as Counterparts, Et as CreateProduct, yt as CreateReceivables, vt as CreditNotesTable, Ie as CustomersTable, Me as Dialog, At as FinanceBanner, jt as FinanceIntegrationCard, Mt as FinanceInvoice, Nt as FinanceTab, Pt as Integrations, gt as InvoicesTable, ue as LOGO_MAX_FILE_SIZE_IN_MB, de as LOGO_SUPPORTED_FORMATS, It as MoniteAPIProvider, Lt as MoniteProvider, Pe as MoniteScopedProviders, fe as OCR_SUPPORTED_FORMATS, Ue as PageHeader, pt as PayableDetails, ht as Payables, mt as PayablesTable, Tt as ProductDetails, Dt as Products, wt as ProductsTable, _t as QuotesTable, Ct as Receivables, bt as ReceivablesTable, xt as ReceivablesTableTabEnum, se as RootElementsProvider, Be as TagFormModal, kt as Tags, Ot as TagsTable, Ft as TemplateSettings, Le as VendorsTable, Ce as breakpoints, t as countryCurrencyList, e as createAPIClient, g as dateStringToLocalDate, n as defaultAvailableCountries, a as defaultAvailableCurrencies, me as defaultCounterpartColumnWidth, o as filterOptions, _ as formatDateRangeFilterChip, v as formatFilterChipMultiSelectValueSegment, S as getCounterpartName, r as getCountries, i as getCountriesArray, s as getCurrencies, c as getCurrenciesArray, Y as getEntityName, l as getGroupTitleForOption, p as getIndividualName, m as getIndividualNameWithFallback, Qe as getPayableRefetchInterval, h as getUserDisplayName, u as rateMajorToMinor, d as rateMinorToMajor, f as sortCurrencyOptionsByGroup, Rt as toast, q as useApprovalPolicyById, he as useAreCounterpartsLoading, ge as useAutosizeGridColumns, st as useCancelPayableById, z as useComboboxAnchor, Se as useComponentSettings, H as useCounterpartAddresses, x as useCounterpartById, W as useCounterpartContactList, V as useCounterpartList, U as useCounterpartVatList, nt as useCreatePayable, it as useCreatePayableLineItem, Q as useCreatePaymentRecord, C as useCurrencies, ye as useDebounce, be as useDebounceCallback, ft as useDeletePayable, ot as useDeletePayableLineItem, Ne as useDialog, re as useEntitySettings, G as useEntityUserByAuthToken, K as useEntityUserById, J as useFileById, pe as useFileInput, ut as useForceApprovePayable, lt as useForceRejectPayable, _e as useFormPersist, tt as useGetPayableApprovalRequests, $e as useGetPayableById, qe as useGetPayableCounterpart, et as useGetPayableLineItems, B as useGetPayablesAnalytics, ae as useGetReceivableById, we as useIsDesktopScreen, Te as useIsExtraLargeDesktopScreen, Ee as useIsLargeDesktopScreen, De as useIsLargerThan, xe as useIsMobile, Oe as useIsMobileScreen, y as useIsMounted, ke as useIsSmallerThan, Ae as useIsTabletScreen, Ze as useLedgerAccounts, ve as useLocalStorageFields, X as useMe, je as useMediaQuery, le as useMenuButton, b as useMoniteContext, Z as useMyEntity, oe as useOptionalFields, ie as usePatchEntitiesIdSettings, Xe as usePayButtonVisibility, Ye as usePayableCallbacks, Je as usePayableDetailsThemeProps, $ as usePayablePaymentIntentsAndRecords, ne as usePaymentIntentById, ee as usePaymentRecordById, te as usePaymentRecords, St as useReceivablesTableProps, dt as useReopenPayable, ce as useRootElements, ct as useSubmitPayableForApproval, rt as useUpdatePayable, at as useUpdatePayableLineItem };
@@ -1,7 +1,7 @@
1
1
  import { Suspense as e, lazy as t, useEffect as n, useState as r } from "react";
2
2
  import { jsx as i } from "@emotion/react/jsx-runtime";
3
3
  //#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index422.js
4
- var a = t(() => import("./index622.js")), o = ({ url: e, mimetype: t, name: n, showCloseButton: r, onClose: a }) => t === "application/pdf" ? /* @__PURE__ */ i(s, {
4
+ var a = t(() => import("./index623.js")), o = ({ url: e, mimetype: t, name: n, showCloseButton: r, onClose: a }) => t === "application/pdf" ? /* @__PURE__ */ i(s, {
5
5
  url: e,
6
6
  showCloseButton: r,
7
7
  onClose: a
@@ -1,23 +1,19 @@
1
- import { getAPIErrorMessage as e } from "./index26.js";
2
- import { useMoniteContext as t } from "./index47.js";
3
- import { toast as n } from "react-hot-toast";
4
- import { useLingui as r } from "@lingui/react";
1
+ import { Fragment as e } from "react";
2
+ import { jsx as t, jsxs as n } from "@emotion/react/jsx-runtime";
5
3
  //#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index479.js
6
- var i = (i, a) => {
7
- let { api: o, queryClient: s } = t(), { i18n: c } = r();
8
- return o.finops.postMeasureUnits.useMutation({}, {
9
- onSuccess: async (e) => {
10
- await o.finops.getMeasureUnits.invalidateQueries(s), n.success(c._("Unit {name} was added to the list", { name: e.name })), i?.();
11
- },
12
- onError: async (t) => {
13
- let r = e(c, t);
14
- if (r.includes("already exists")) {
15
- a?.(r);
16
- return;
17
- }
18
- n.error(r);
19
- }
4
+ function r(r, i) {
5
+ let a = r.split("\0");
6
+ return a.length === 1 ? /* @__PURE__ */ t("span", { children: r }) : /* @__PURE__ */ t("span", {
7
+ className: "ttw:flex ttw:min-w-0",
8
+ children: a.map((r, o) => /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("span", {
9
+ className: "ttw:whitespace-pre-wrap",
10
+ children: r
11
+ }), o < a.length - 1 && /* @__PURE__ */ t("span", {
12
+ className: "ttw:min-w-[4ch] ttw:shrink-[9999] ttw:truncate",
13
+ title: i,
14
+ children: i
15
+ })] }, o))
20
16
  });
21
- };
17
+ }
22
18
  //#endregion
23
- export { i as useCreateMeasureUnit };
19
+ export { r as messageWithTruncatedName };
@@ -1,23 +1,24 @@
1
1
  import { getAPIErrorMessage as e } from "./index26.js";
2
2
  import { useMoniteContext as t } from "./index47.js";
3
- import { toast as n } from "react-hot-toast";
4
- import { useLingui as r } from "@lingui/react";
3
+ import { messageWithTruncatedName as n } from "./index479.js";
4
+ import { toast as r } from "react-hot-toast";
5
+ import { useLingui as i } from "@lingui/react";
5
6
  //#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index480.js
6
- var i = (i, a, o) => {
7
- let { api: s, queryClient: c } = t(), { i18n: l } = r();
8
- return s.finops.patchMeasureUnitsId.useMutation({ path: { unit_id: i } }, {
7
+ var a = (a, o) => {
8
+ let { api: s, queryClient: c } = t(), { i18n: l } = i();
9
+ return s.finops.postMeasureUnits.useMutation({}, {
9
10
  onSuccess: async (e) => {
10
- await Promise.all([s.finops.getMeasureUnits.invalidateQueries(c), s.finops.getMeasureUnitsId.invalidateQueries({ parameters: { path: { unit_id: i } } }, c)]), n.success(l._("Unit {name} was updated", { name: e.name })), a?.();
11
+ await s.finops.getMeasureUnits.invalidateQueries(c), r.success(n(l._("Unit {name} was added to the list", { name: "\0" }), e.name)), a?.();
11
12
  },
12
- onError: (t) => {
13
- let r = e(l, t);
14
- if (r.includes("already exists")) {
15
- o?.(r);
13
+ onError: async (t) => {
14
+ let n = e(l, t);
15
+ if (n.includes("already exists")) {
16
+ o?.(n);
16
17
  return;
17
18
  }
18
- n.error(r);
19
+ r.error(n);
19
20
  }
20
21
  });
21
22
  };
22
23
  //#endregion
23
- export { i as useUpdateMeasureUnit };
24
+ export { a as useCreateMeasureUnit };
@@ -1,102 +1,24 @@
1
- import { Button as e } from "./index56.js";
2
- import { Input as t } from "./index89.js";
3
- import { TableCell as n, TableRow as r } from "./index250.js";
4
- import { getMeasureUnitValidationSchema as i } from "./index478.js";
5
- import { useCreateMeasureUnit as a } from "./index479.js";
6
- import { useUpdateMeasureUnit as o } from "./index480.js";
7
- import { Check as s, X as c } from "lucide-react";
8
- import { jsx as l, jsxs as u } from "@emotion/react/jsx-runtime";
9
- import { useLingui as d } from "@lingui/react";
10
- import { Controller as f, useForm as p } from "react-hook-form";
11
- import { zodResolver as m } from "@hookform/resolvers/zod";
1
+ import { getAPIErrorMessage as e } from "./index26.js";
2
+ import { useMoniteContext as t } from "./index47.js";
3
+ import { messageWithTruncatedName as n } from "./index479.js";
4
+ import { toast as r } from "react-hot-toast";
5
+ import { useLingui as i } from "@lingui/react";
12
6
  //#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index481.js
13
- var h = {
14
- name: "",
15
- description: ""
16
- }, g = ({ id: g, isEditMode: _, initialValues: v = h, onCancel: y, onEdit: b }) => {
17
- let { i18n: x } = d(), S = i(x), { handleSubmit: C, control: w, reset: T, setError: E } = p({
18
- defaultValues: v,
19
- resolver: m(S)
20
- }), D = a(() => T(), (e) => E("name", {
21
- type: "custom",
22
- message: e
23
- })), O = o(g ?? "", () => b?.(), (e) => E("name", {
24
- type: "custom",
25
- message: e
26
- })), k = (e) => {
27
- if (!_ || !g) {
28
- console.error("handleEdit called without valid id or edit mode");
29
- return;
7
+ var a = (a, o, s) => {
8
+ let { api: c, queryClient: l } = t(), { i18n: u } = i();
9
+ return c.finops.patchMeasureUnitsId.useMutation({ path: { unit_id: a } }, {
10
+ onSuccess: async (e) => {
11
+ await Promise.all([c.finops.getMeasureUnits.invalidateQueries(l), c.finops.getMeasureUnitsId.invalidateQueries({ parameters: { path: { unit_id: a } } }, l)]), r.success(n(u._("Unit {name} was updated", { name: "\0" }), e.name)), o?.();
12
+ },
13
+ onError: (t) => {
14
+ let n = e(u, t);
15
+ if (n.includes("already exists")) {
16
+ s?.(n);
17
+ return;
18
+ }
19
+ r.error(n);
30
20
  }
31
- O.mutate(e);
32
- }, A = (e) => {
33
- D.mutate(e);
34
- }, j = D.isPending || O.isPending;
35
- return /* @__PURE__ */ l(r, {
36
- className: "ttw:border-border ttw:hover:bg-transparent",
37
- children: /* @__PURE__ */ l(n, {
38
- colSpan: 3,
39
- className: "ttw:w-full ttw:whitespace-normal",
40
- children: /* @__PURE__ */ u("div", {
41
- className: "ttw:flex ttw:gap-2 ttw:justify-between ttw:items-start",
42
- children: [
43
- /* @__PURE__ */ l(f, {
44
- name: "name",
45
- control: w,
46
- render: ({ field: e, fieldState: { error: n } }) => /* @__PURE__ */ u("div", {
47
- className: "ttw:w-[35%]",
48
- children: [/* @__PURE__ */ l(t, {
49
- ...e,
50
- disabled: j,
51
- "aria-invalid": !!n || void 0,
52
- className: "ttw:h-8"
53
- }), n && /* @__PURE__ */ l("p", {
54
- className: "ttw:text-xs ttw:text-destructive ttw:mt-1",
55
- children: n.message
56
- })]
57
- })
58
- }),
59
- /* @__PURE__ */ l(f, {
60
- name: "description",
61
- control: w,
62
- render: ({ field: e, fieldState: { error: n } }) => /* @__PURE__ */ l("div", {
63
- className: "ttw:w-[55%]",
64
- children: /* @__PURE__ */ l(t, {
65
- ...e,
66
- id: e.name,
67
- disabled: j,
68
- "aria-invalid": !!n || void 0,
69
- className: "ttw:h-8"
70
- })
71
- })
72
- }),
73
- _ ? /* @__PURE__ */ u("div", {
74
- className: "ttw:flex ttw:justify-center ttw:gap-1",
75
- children: [/* @__PURE__ */ l(e, {
76
- variant: "outline",
77
- size: "icon",
78
- className: "ttw:size-8 ttw:bg-primary-foreground ttw:text-primary ttw:hover:text-primary ttw:hover:bg-primary-foreground/80 ttw:border-0",
79
- disabled: O.isPending,
80
- onClick: C(k),
81
- children: /* @__PURE__ */ l(s, { className: "ttw:size-4" })
82
- }), /* @__PURE__ */ l(e, {
83
- variant: "outline",
84
- size: "icon",
85
- className: "ttw:size-8 ttw:bg-primary-foreground ttw:text-primary ttw:hover:text-primary ttw:hover:bg-primary-foreground/80 ttw:border-0",
86
- onClick: y,
87
- children: /* @__PURE__ */ l(c, { className: "ttw:size-4" })
88
- })]
89
- }) : /* @__PURE__ */ l(e, {
90
- variant: "outline",
91
- size: "sm",
92
- className: "ttw:h-8 ttw:bg-primary-foreground ttw:text-primary ttw:hover:text-primary ttw:hover:bg-primary-foreground/80 ttw:border-0",
93
- onClick: C(A),
94
- children: x._("Add")
95
- })
96
- ]
97
- })
98
- })
99
21
  });
100
22
  };
101
23
  //#endregion
102
- export { g as MeasureUnitsFormRow };
24
+ export { a as useUpdateMeasureUnit };
@@ -1,46 +1,102 @@
1
- import { useCurrencies as e } from "./index63.js";
2
- import "./index217.js";
3
- import { ConfirmationModal as t } from "./index59.js";
4
- import "./index60.js";
5
- import { Typography as n } from "./index62.js";
6
- import { Table as r, TableBody as i, TableCell as a, TableRow as o } from "./index250.js";
7
- import { useGetProducts as s } from "./index387.js";
8
- import { Loader2 as c } from "lucide-react";
9
- import { Fragment as l, jsx as u, jsxs as d } from "@emotion/react/jsx-runtime";
10
- import { useLingui as f } from "@lingui/react";
1
+ import { Button as e } from "./index56.js";
2
+ import { Input as t } from "./index89.js";
3
+ import { TableCell as n, TableRow as r } from "./index250.js";
4
+ import { getMeasureUnitValidationSchema as i } from "./index478.js";
5
+ import { useCreateMeasureUnit as a } from "./index480.js";
6
+ import { useUpdateMeasureUnit as o } from "./index481.js";
7
+ import { Check as s, X as c } from "lucide-react";
8
+ import { jsx as l, jsxs as u } from "@emotion/react/jsx-runtime";
9
+ import { useLingui as d } from "@lingui/react";
10
+ import { Controller as f, useForm as p } from "react-hook-form";
11
+ import { zodResolver as m } from "@hookform/resolvers/zod";
11
12
  //#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index482.js
12
- var p = ({ onClose: p, onDelete: m, name: h, isLoading: g, open: _, id: v }) => {
13
- let { i18n: y } = f(), { formatCurrencyToDisplay: b } = e(), { data: x, isLoading: S } = s({ measure_unit_id: v ?? "" }, !!v), C = x?.data.length === 0;
14
- return /* @__PURE__ */ u(t, {
15
- open: _,
16
- title: y._("Delete \"{name}\"?", { name: h }),
17
- confirmLabel: y._("Delete"),
18
- cancelLabel: y._("Cancel"),
19
- onClose: p,
20
- onConfirm: m,
21
- isLoading: g || S,
22
- children: C ? /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u(n, { children: y._("There are no items created with this measure unit.") }), /* @__PURE__ */ u(n, {
23
- color: "muted",
24
- children: y._("Deleting it won't affect your items.")
25
- })] }) : /* @__PURE__ */ d(l, { children: [
26
- /* @__PURE__ */ u(n, { children: y._("Any products or services referencing this unit will update to use a blank unit of measure.") }),
27
- /* @__PURE__ */ u(n, {
28
- color: "muted",
29
- children: y._("Previously issued invoices will not be impacted.")
30
- }),
31
- S && /* @__PURE__ */ u(c, { className: "ttw:mx-auto ttw:size-6 ttw:animate-spin" }),
32
- !S && /* @__PURE__ */ u(r, { children: /* @__PURE__ */ u(i, { children: x?.data.map((e) => /* @__PURE__ */ d(o, {
33
- className: "ttw:border-border ttw:hover:bg-transparent",
34
- children: [/* @__PURE__ */ u(a, {
35
- className: "ttw:pl-0 ttw:whitespace-normal ttw:text-text ttw:font-medium",
36
- children: e.name
37
- }), /* @__PURE__ */ u(a, {
38
- className: "ttw:pr-0 ttw:text-right ttw:text-text ttw:font-medium",
39
- children: e.price && b(e.price?.value, e.price?.currency)
40
- })]
41
- }, e.id)) }) })
42
- ] })
13
+ var h = {
14
+ name: "",
15
+ description: ""
16
+ }, g = ({ id: g, isEditMode: _, initialValues: v = h, onCancel: y, onEdit: b }) => {
17
+ let { i18n: x } = d(), S = i(x), { handleSubmit: C, control: w, reset: T, setError: E } = p({
18
+ defaultValues: v,
19
+ resolver: m(S)
20
+ }), D = a(() => T(), (e) => E("name", {
21
+ type: "custom",
22
+ message: e
23
+ })), O = o(g ?? "", () => b?.(), (e) => E("name", {
24
+ type: "custom",
25
+ message: e
26
+ })), k = (e) => {
27
+ if (!_ || !g) {
28
+ console.error("handleEdit called without valid id or edit mode");
29
+ return;
30
+ }
31
+ O.mutate(e);
32
+ }, A = (e) => {
33
+ D.mutate(e);
34
+ }, j = D.isPending || O.isPending;
35
+ return /* @__PURE__ */ l(r, {
36
+ className: "ttw:border-border ttw:hover:bg-transparent",
37
+ children: /* @__PURE__ */ l(n, {
38
+ colSpan: 3,
39
+ className: "ttw:w-full ttw:whitespace-normal",
40
+ children: /* @__PURE__ */ u("div", {
41
+ className: "ttw:flex ttw:gap-2 ttw:justify-between ttw:items-start",
42
+ children: [
43
+ /* @__PURE__ */ l(f, {
44
+ name: "name",
45
+ control: w,
46
+ render: ({ field: e, fieldState: { error: n } }) => /* @__PURE__ */ u("div", {
47
+ className: "ttw:w-[35%]",
48
+ children: [/* @__PURE__ */ l(t, {
49
+ ...e,
50
+ disabled: j,
51
+ "aria-invalid": !!n || void 0,
52
+ className: "ttw:h-8"
53
+ }), n && /* @__PURE__ */ l("p", {
54
+ className: "ttw:text-xs ttw:text-destructive ttw:mt-1",
55
+ children: n.message
56
+ })]
57
+ })
58
+ }),
59
+ /* @__PURE__ */ l(f, {
60
+ name: "description",
61
+ control: w,
62
+ render: ({ field: e, fieldState: { error: n } }) => /* @__PURE__ */ l("div", {
63
+ className: "ttw:w-[55%]",
64
+ children: /* @__PURE__ */ l(t, {
65
+ ...e,
66
+ id: e.name,
67
+ disabled: j,
68
+ "aria-invalid": !!n || void 0,
69
+ className: "ttw:h-8"
70
+ })
71
+ })
72
+ }),
73
+ _ ? /* @__PURE__ */ u("div", {
74
+ className: "ttw:flex ttw:justify-center ttw:gap-1",
75
+ children: [/* @__PURE__ */ l(e, {
76
+ variant: "outline",
77
+ size: "icon",
78
+ className: "ttw:size-8 ttw:bg-primary-foreground ttw:text-primary ttw:hover:text-primary ttw:hover:bg-primary-foreground/80 ttw:border-0",
79
+ disabled: O.isPending,
80
+ onClick: C(k),
81
+ children: /* @__PURE__ */ l(s, { className: "ttw:size-4" })
82
+ }), /* @__PURE__ */ l(e, {
83
+ variant: "outline",
84
+ size: "icon",
85
+ className: "ttw:size-8 ttw:bg-primary-foreground ttw:text-primary ttw:hover:text-primary ttw:hover:bg-primary-foreground/80 ttw:border-0",
86
+ onClick: y,
87
+ children: /* @__PURE__ */ l(c, { className: "ttw:size-4" })
88
+ })]
89
+ }) : /* @__PURE__ */ l(e, {
90
+ variant: "outline",
91
+ size: "sm",
92
+ className: "ttw:h-8 ttw:bg-primary-foreground ttw:text-primary ttw:hover:text-primary ttw:hover:bg-primary-foreground/80 ttw:border-0",
93
+ onClick: C(A),
94
+ children: x._("Add")
95
+ })
96
+ ]
97
+ })
98
+ })
43
99
  });
44
100
  };
45
101
  //#endregion
46
- export { p as ConfirmDeleteMeasureUnitDialog };
102
+ export { g as MeasureUnitsFormRow };
@@ -1,30 +1,46 @@
1
- import { Button as e } from "./index56.js";
2
- import { DropdownMenu as t, DropdownMenuContent as n, DropdownMenuItem as r, DropdownMenuTrigger as i } from "./index55.js";
3
- import { MoreVertical as a, Pencil as o, Trash2 as s } from "lucide-react";
4
- import { jsx as c, jsxs as l } from "@emotion/react/jsx-runtime";
5
- import { useLingui as u } from "@lingui/react";
1
+ import { useCurrencies as e } from "./index63.js";
2
+ import "./index217.js";
3
+ import { ConfirmationModal as t } from "./index59.js";
4
+ import "./index60.js";
5
+ import { Typography as n } from "./index62.js";
6
+ import { Table as r, TableBody as i, TableCell as a, TableRow as o } from "./index250.js";
7
+ import { useGetProducts as s } from "./index387.js";
8
+ import { Loader2 as c } from "lucide-react";
9
+ import { Fragment as l, jsx as u, jsxs as d } from "@emotion/react/jsx-runtime";
10
+ import { useLingui as f } from "@lingui/react";
6
11
  //#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index483.js
7
- var d = ({ onEdit: d, onDelete: f, permissions: p }) => {
8
- let { i18n: m } = u();
9
- return p.isUpdateAllowed || p.isDeleteAllowed ? /* @__PURE__ */ l(t, { children: [/* @__PURE__ */ c(i, {
10
- asChild: !0,
11
- children: /* @__PURE__ */ c(e, {
12
- variant: "ghost",
13
- size: "icon",
14
- "aria-label": "actions-menu-button",
15
- children: /* @__PURE__ */ c(a, {})
16
- })
17
- }), /* @__PURE__ */ l(n, {
18
- align: "end",
19
- children: [p.isUpdateAllowed && /* @__PURE__ */ l(r, {
20
- onClick: d,
21
- children: [/* @__PURE__ */ c(o, {}), m._("Edit")]
22
- }), p.isDeleteAllowed && /* @__PURE__ */ l(r, {
23
- onClick: f,
24
- variant: "destructive",
25
- children: [/* @__PURE__ */ c(s, {}), m._("Delete")]
26
- })]
27
- })] }) : null;
12
+ var p = ({ onClose: p, onDelete: m, name: h, isLoading: g, open: _, id: v }) => {
13
+ let { i18n: y } = f(), { formatCurrencyToDisplay: b } = e(), { data: x, isLoading: S } = s({ measure_unit_id: v ?? "" }, !!v), C = x?.data.length === 0;
14
+ return /* @__PURE__ */ u(t, {
15
+ open: _,
16
+ title: y._("Delete \"{name}\"?", { name: h }),
17
+ confirmLabel: y._("Delete"),
18
+ cancelLabel: y._("Cancel"),
19
+ onClose: p,
20
+ onConfirm: m,
21
+ isLoading: g || S,
22
+ children: C ? /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u(n, { children: y._("There are no items created with this measure unit.") }), /* @__PURE__ */ u(n, {
23
+ color: "muted",
24
+ children: y._("Deleting it won't affect your items.")
25
+ })] }) : /* @__PURE__ */ d(l, { children: [
26
+ /* @__PURE__ */ u(n, { children: y._("Any products or services referencing this unit will update to use a blank unit of measure.") }),
27
+ /* @__PURE__ */ u(n, {
28
+ color: "muted",
29
+ children: y._("Previously issued invoices will not be impacted.")
30
+ }),
31
+ S && /* @__PURE__ */ u(c, { className: "ttw:mx-auto ttw:size-6 ttw:animate-spin" }),
32
+ !S && /* @__PURE__ */ u(r, { children: /* @__PURE__ */ u(i, { children: x?.data.map((e) => /* @__PURE__ */ d(o, {
33
+ className: "ttw:border-border ttw:hover:bg-transparent",
34
+ children: [/* @__PURE__ */ u(a, {
35
+ className: "ttw:pl-0 ttw:whitespace-normal ttw:text-text ttw:font-medium",
36
+ children: e.name
37
+ }), /* @__PURE__ */ u(a, {
38
+ className: "ttw:pr-0 ttw:text-right ttw:text-text ttw:font-medium",
39
+ children: e.price && b(e.price?.value, e.price?.currency)
40
+ })]
41
+ }, e.id)) }) })
42
+ ] })
43
+ });
28
44
  };
29
45
  //#endregion
30
- export { d as TableActions };
46
+ export { p as ConfirmDeleteMeasureUnitDialog };
@@ -1 +1,30 @@
1
- import "./index483.js";
1
+ import { Button as e } from "./index56.js";
2
+ import { DropdownMenu as t, DropdownMenuContent as n, DropdownMenuItem as r, DropdownMenuTrigger as i } from "./index55.js";
3
+ import { MoreVertical as a, Pencil as o, Trash2 as s } from "lucide-react";
4
+ import { jsx as c, jsxs as l } from "@emotion/react/jsx-runtime";
5
+ import { useLingui as u } from "@lingui/react";
6
+ //#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index484.js
7
+ var d = ({ onEdit: d, onDelete: f, permissions: p }) => {
8
+ let { i18n: m } = u();
9
+ return p.isUpdateAllowed || p.isDeleteAllowed ? /* @__PURE__ */ l(t, { children: [/* @__PURE__ */ c(i, {
10
+ asChild: !0,
11
+ children: /* @__PURE__ */ c(e, {
12
+ variant: "ghost",
13
+ size: "icon",
14
+ "aria-label": "actions-menu-button",
15
+ children: /* @__PURE__ */ c(a, {})
16
+ })
17
+ }), /* @__PURE__ */ l(n, {
18
+ align: "end",
19
+ children: [p.isUpdateAllowed && /* @__PURE__ */ l(r, {
20
+ onClick: d,
21
+ children: [/* @__PURE__ */ c(o, {}), m._("Edit")]
22
+ }), p.isDeleteAllowed && /* @__PURE__ */ l(r, {
23
+ onClick: f,
24
+ variant: "destructive",
25
+ children: [/* @__PURE__ */ c(s, {}), m._("Delete")]
26
+ })]
27
+ })] }) : null;
28
+ };
29
+ //#endregion
30
+ export { d as TableActions };