@tesouro/embedded-components-react 0.7.30 → 0.7.31

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 (220) hide show
  1. package/dist/lib/monite-sdk.d.ts +0 -1
  2. package/dist/lib/monite-sdk.js +40 -40
  3. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index.js +41 -41
  4. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index204.js +55 -13
  5. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index205.js +2 -55
  6. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index206.js +1 -0
  7. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index207.js +0 -2
  8. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index208.js +1 -0
  9. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index209.js +10 -2
  10. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index210.js +53 -7
  11. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index211.js +36 -51
  12. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index212.js +71 -38
  13. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index213.js +6 -73
  14. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index214.js +2 -7
  15. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index215.js +79 -2
  16. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index216.js +1 -79
  17. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index217.js +58 -1
  18. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index218.js +42 -56
  19. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index219.js +1 -44
  20. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index220.js +568 -0
  21. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index221.js +0 -577
  22. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index222.js +1 -1
  23. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index223.js +160 -1
  24. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index224.js +0 -159
  25. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index225.js +26 -0
  26. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index226.js +0 -26
  27. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index227.js +12 -1
  28. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index228.js +2 -2
  29. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index229.js +2 -2
  30. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index230.js +16 -10
  31. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index231.js +19 -16
  32. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index232.js +27 -19
  33. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index233.js +1 -29
  34. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index234.js +93 -1
  35. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index235.js +10 -91
  36. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index236.js +2 -2
  37. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index237.js +18 -10
  38. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index238.js +73 -16
  39. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index239.js +1 -77
  40. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index240.js +127 -0
  41. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index241.js +0 -127
  42. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index242.js +13 -1
  43. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index243.js +54 -11
  44. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index244.js +5 -56
  45. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index245.js +1 -5
  46. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index246.js +64 -1
  47. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index247.js +120 -62
  48. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index248.js +21 -120
  49. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index249.js +6 -21
  50. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index250.js +35 -6
  51. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index251.js +6 -34
  52. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index252.js +56 -7
  53. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index253.js +69 -53
  54. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index254.js +25 -71
  55. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index255.js +1 -28
  56. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index256.js +61 -1
  57. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index257.js +17 -57
  58. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index258.js +19 -18
  59. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index259.js +181 -18
  60. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index260.js +1 -185
  61. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index261.js +31 -0
  62. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index262.js +2 -31
  63. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index263.js +64 -3
  64. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index264.js +31 -61
  65. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index265.js +6 -28
  66. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index266.js +29 -7
  67. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index267.js +42 -29
  68. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index268.js +11 -44
  69. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index269.js +15 -9
  70. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index270.js +4 -16
  71. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index271.js +8 -4
  72. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index272.js +10 -9
  73. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index273.js +12 -5
  74. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index274.js +6 -10
  75. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index275.js +2 -2
  76. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index276.js +2 -2
  77. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index277.js +8 -6
  78. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index278.js +32 -8
  79. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index279.js +8 -32
  80. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index280.js +3 -3
  81. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index281.js +3 -3
  82. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index282.js +4 -4
  83. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index283.js +20 -18
  84. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index284.js +7 -20
  85. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index285.js +111 -4
  86. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index286.js +62 -110
  87. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index287.js +1 -66
  88. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index288.js +199 -0
  89. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index289.js +0 -199
  90. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index290.js +11 -1
  91. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index291.js +38 -9
  92. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index292.js +6 -38
  93. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index293.js +9 -5
  94. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index294.js +13 -6
  95. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index295.js +7 -17
  96. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index296.js +5 -7
  97. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index297.js +359 -5
  98. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index298.js +1 -412
  99. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index299.js +22 -1
  100. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index300.js +91 -18
  101. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index301.js +18 -91
  102. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index302.js +7 -9
  103. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index303.js +2 -18
  104. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index304.js +182 -2
  105. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index305.js +96 -178
  106. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index306.js +1 -102
  107. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index307.js +1 -1
  108. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index308.js +55 -1
  109. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index309.js +44 -53
  110. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index310.js +1 -46
  111. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index311.js +21 -1
  112. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index312.js +1 -21
  113. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index313.js +161 -0
  114. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index314.js +0 -161
  115. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index315.js +12 -1
  116. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index316.js +61 -10
  117. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index317.js +44 -60
  118. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index318.js +48 -44
  119. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index319.js +82 -48
  120. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index320.js +7 -83
  121. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index321.js +305 -7
  122. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index322.js +1 -307
  123. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index323.js +32 -1
  124. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index324.js +1 -32
  125. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index325.js +29 -1
  126. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index326.js +1 -29
  127. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index327.js +1 -1
  128. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index328.js +160 -1
  129. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index329.js +0 -160
  130. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index330.js +37 -1
  131. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index331.js +33 -34
  132. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index332.js +3 -33
  133. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index333.js +102 -3
  134. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index334.js +172 -88
  135. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index335.js +116 -171
  136. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index336.js +191 -114
  137. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index337.js +11 -209
  138. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index338.js +15 -11
  139. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index339.js +28 -14
  140. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index340.js +1 -31
  141. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index341.js +241 -0
  142. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index342.js +0 -241
  143. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index343.js +36 -1
  144. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index344.js +138 -32
  145. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index345.js +1 -142
  146. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index346.js +166 -0
  147. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index347.js +25 -166
  148. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index348.js +19 -26
  149. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index349.js +17 -16
  150. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index350.js +5 -17
  151. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index351.js +14 -4
  152. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index352.js +18 -12
  153. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index353.js +9 -9
  154. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index354.js +5 -21
  155. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index355.js +13 -4
  156. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index356.js +14 -11
  157. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index357.js +9 -20
  158. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index358.js +26 -8
  159. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index359.js +11 -23
  160. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index360.js +8 -12
  161. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index361.js +24 -8
  162. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index362.js +14 -25
  163. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index363.js +13 -13
  164. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index364.js +100 -14
  165. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index365.js +42 -98
  166. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index366.js +27 -43
  167. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index367.js +1 -30
  168. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index368.js +105 -0
  169. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index369.js +35 -102
  170. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index370.js +166 -32
  171. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index371.js +202 -163
  172. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index372.js +87 -207
  173. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index373.js +17 -90
  174. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index374.js +158 -17
  175. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index375.js +87 -143
  176. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index376.js +42 -100
  177. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index377.js +4 -46
  178. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index378.js +24 -4
  179. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index379.js +73 -20
  180. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index380.js +16 -74
  181. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index381.js +19 -16
  182. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index382.js +5 -19
  183. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index383.js +8 -4
  184. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index384.js +11 -10
  185. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index385.js +131 -11
  186. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index386.js +4 -129
  187. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index387.js +4 -4
  188. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index388.js +5 -8
  189. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index389.js +221 -4
  190. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index390.js +31 -219
  191. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index391.js +11 -31
  192. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index392.js +34 -12
  193. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index393.js +180 -32
  194. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index394.js +14 -182
  195. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index395.js +204 -14
  196. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index396.js +88 -192
  197. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index397.js +61 -97
  198. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index398.js +54 -63
  199. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index399.js +83 -46
  200. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index400.js +40 -91
  201. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index401.js +75 -39
  202. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index402.js +71 -63
  203. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index403.js +12 -85
  204. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index404.js +24 -12
  205. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index405.js +16 -25
  206. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index406.js +2 -14
  207. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index407.js +23 -4
  208. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index408.js +0 -23
  209. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index409.js +52 -0
  210. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index410.js +32 -53
  211. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index411.js +2 -30
  212. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index412.js +34 -2
  213. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index413.js +15 -33
  214. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index414.js +29 -14
  215. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index415.js +27 -29
  216. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index416.js +2 -31
  217. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index417.js +97 -2
  218. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  219. package/package.json +1 -1
  220. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index418.js +0 -97
@@ -1,20 +1,9 @@
1
- import { getAPIErrorMessage as e } from "./index26.js";
2
- import { useMoniteContext as t } from "./index45.js";
3
- import { messageWithTruncatedName as n } from "./index349.js";
4
- import { toast as r } from "react-hot-toast";
5
- import { useLingui as i } from "@lingui/react";
6
- //#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index357.js
7
- var a = (a) => {
8
- let { i18n: o } = i(), { api: s, queryClient: c } = t();
9
- return s.finops.patchProductsId.useMutation({ path: { product_id: a } }, {
10
- onSuccess: async (e) => {
11
- await s.finops.getProducts.invalidateQueries(c), await s.finops.getProductsId.invalidateQueries({ parameters: { path: { product_id: e.id } } }, c), r.success(n(e.type === "product" ? o._("Product {name} was updated.", { name: "\0" }) : o._("Service {name} was updated.", { name: "\0" }), e.name));
12
- },
13
- onError: (t) => {
14
- let n = e(o, t, { defaultMessage: "" });
15
- r.error(n ? o._("Failed to update: {reason}", { reason: n }) : o._("Failed to update"));
16
- }
17
- });
18
- };
19
- //#endregion
20
- export { a as useUpdateProduct };
1
+ import "./index292.js";
2
+ import "./index349.js";
3
+ import "./index350.js";
4
+ import "./index351.js";
5
+ import "./index352.js";
6
+ import "./index353.js";
7
+ import "./index354.js";
8
+ import "./index355.js";
9
+ import "./index356.js";
@@ -1,9 +1,27 @@
1
- import "./index293.js";
2
- import "./index350.js";
3
- import "./index351.js";
4
- import "./index352.js";
5
- import "./index353.js";
6
- import "./index354.js";
7
- import "./index355.js";
8
- import "./index356.js";
1
+ import { ConfirmationModal as e } from "./index59.js";
2
+ import "./index60.js";
3
+ import { useGetProductById as t } from "./index354.js";
4
+ import { useDeleteProduct as n } from "./index355.js";
9
5
  import "./index357.js";
6
+ import { jsx as r } from "@emotion/react/jsx-runtime";
7
+ import { useLingui as i } from "@lingui/react";
8
+ //#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index358.js
9
+ var a = ({ id: a, open: o, onClose: s, onDeleted: c }) => {
10
+ let { i18n: l } = i(), { data: u } = t(a), d = n(a, () => {
11
+ s(), c?.(a);
12
+ });
13
+ return u ? /* @__PURE__ */ r(e, {
14
+ open: o && !!a,
15
+ title: l._("Delete \"{name}\"?", { name: u.name }),
16
+ message: l._("It will remain in all the documents where it is added. You can't undo this action."),
17
+ confirmLabel: l._("Delete"),
18
+ cancelLabel: l._("Cancel"),
19
+ onClose: s,
20
+ onConfirm: () => {
21
+ d.mutate(void 0);
22
+ },
23
+ isLoading: d.isPending
24
+ }) : null;
25
+ };
26
+ //#endregion
27
+ export { a as ProductDeleteModal };
@@ -1,27 +1,15 @@
1
- import { ConfirmationModal as e } from "./index59.js";
2
- import "./index60.js";
3
- import { useGetProductById as t } from "./index355.js";
4
- import { useDeleteProduct as n } from "./index356.js";
5
- import "./index358.js";
6
- import { jsx as r } from "@emotion/react/jsx-runtime";
7
- import { useLingui as i } from "@lingui/react";
1
+ import { Badge as e } from "./index116.js";
2
+ import { twMerge as t } from "tailwind-merge";
3
+ import { jsx as n } from "@emotion/react/jsx-runtime";
4
+ import { useLingui as r } from "@lingui/react";
8
5
  //#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index359.js
9
- var a = ({ id: a, open: o, onClose: s, onDeleted: c }) => {
10
- let { i18n: l } = i(), { data: u } = t(a), d = n(a, () => {
11
- s(), c?.(a);
6
+ var i = ({ type: i }) => {
7
+ let { i18n: a } = r(), o = i === "product", s = o ? a._("Product") : a._("Service");
8
+ return /* @__PURE__ */ n(e, {
9
+ variant: "secondary",
10
+ className: t(o ? "ttw:bg-blue-100 ttw:text-blue-700" : "ttw:bg-pink-100 ttw:text-pink-700"),
11
+ children: s
12
12
  });
13
- return u ? /* @__PURE__ */ r(e, {
14
- open: o && !!a,
15
- title: l._("Delete \"{name}\"?", { name: u.name }),
16
- message: l._("It will remain in all the documents where it is added. You can't undo this action."),
17
- confirmLabel: l._("Delete"),
18
- cancelLabel: l._("Cancel"),
19
- onClose: s,
20
- onConfirm: () => {
21
- d.mutate(void 0);
22
- },
23
- isLoading: d.isPending
24
- }) : null;
25
13
  };
26
14
  //#endregion
27
- export { a as ProductDeleteModal };
15
+ export { i as ProductType };
@@ -1,15 +1,11 @@
1
- import { Badge as e } from "./index116.js";
2
- import { twMerge as t } from "tailwind-merge";
3
- import { jsx as n } from "@emotion/react/jsx-runtime";
4
- import { useLingui as r } from "@lingui/react";
5
1
  //#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index360.js
6
- var i = ({ type: i }) => {
7
- let { i18n: a } = r(), o = i === "product", s = o ? a._("Product") : a._("Service");
8
- return /* @__PURE__ */ n(e, {
9
- variant: "secondary",
10
- className: t(o ? "ttw:bg-blue-100 ttw:text-blue-700" : "ttw:bg-pink-100 ttw:text-pink-700"),
11
- children: s
12
- });
2
+ var e = "search", t = {
3
+ name: "name",
4
+ type: "type",
5
+ description: "description",
6
+ "price.value": "pricePerUnit",
7
+ "price.currency": "currency",
8
+ measure_unit_id: "measureUnitId"
13
9
  };
14
10
  //#endregion
15
- export { i as ProductType };
11
+ export { e as FILTER_TYPE_SEARCH, t as PRODUCT_API_FIELD_MAP };
@@ -1,11 +1,27 @@
1
+ import { InputGroup as e, InputGroupAddon as t, InputGroupInput as n } from "./index102.js";
2
+ import { useDebounceCallback as r } from "./index169.js";
3
+ import { FILTER_TYPE_SEARCH as i } from "./index360.js";
4
+ import { Search as a } from "lucide-react";
5
+ import { jsx as o, jsxs as s } from "@emotion/react/jsx-runtime";
6
+ import { useLingui as c } from "@lingui/react";
1
7
  //#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index361.js
2
- var e = "search", t = {
3
- name: "name",
4
- type: "type",
5
- description: "description",
6
- "price.value": "pricePerUnit",
7
- "price.currency": "currency",
8
- measure_unit_id: "measureUnitId"
8
+ var l = ({ onChangeFilter: l }) => {
9
+ let { i18n: u } = c(), d = r((e) => {
10
+ l(i, e);
11
+ }, 500);
12
+ return /* @__PURE__ */ o("div", {
13
+ className: "ttw:flex ttw:justify-between ttw:items-center ttw:gap-4",
14
+ children: /* @__PURE__ */ s(e, {
15
+ className: "ttw:w-80",
16
+ children: [/* @__PURE__ */ o(t, {
17
+ align: "inline-start",
18
+ children: /* @__PURE__ */ o(a, {})
19
+ }), /* @__PURE__ */ o(n, {
20
+ placeholder: u._("Search by name"),
21
+ onChange: (e) => d(e.target.value)
22
+ })]
23
+ })
24
+ });
9
25
  };
10
26
  //#endregion
11
- export { e as FILTER_TYPE_SEARCH, t as PRODUCT_API_FIELD_MAP };
27
+ export { l as Filters };
@@ -1,27 +1,16 @@
1
- import { InputGroup as e, InputGroupAddon as t, InputGroupInput as n } from "./index102.js";
2
- import { useDebounceCallback as r } from "./index169.js";
3
- import { FILTER_TYPE_SEARCH as i } from "./index361.js";
4
- import { Search as a } from "lucide-react";
5
- import { jsx as o, jsxs as s } from "@emotion/react/jsx-runtime";
6
- import { useLingui as c } from "@lingui/react";
1
+ import { useMoniteContext as e } from "./index45.js";
2
+ import { Skeleton as t } from "./index54.js";
3
+ import { Typography as n } from "./index62.js";
4
+ import { memo as r } from "react";
5
+ import { jsx as i } from "@emotion/react/jsx-runtime";
7
6
  //#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index362.js
8
- var l = ({ onChangeFilter: l }) => {
9
- let { i18n: u } = c(), d = r((e) => {
10
- l(i, e);
11
- }, 500);
12
- return /* @__PURE__ */ o("div", {
13
- className: "ttw:flex ttw:justify-between ttw:items-center ttw:gap-4",
14
- children: /* @__PURE__ */ s(e, {
15
- className: "ttw:w-80",
16
- children: [/* @__PURE__ */ o(t, {
17
- align: "inline-start",
18
- children: /* @__PURE__ */ o(a, {})
19
- }), /* @__PURE__ */ o(n, {
20
- placeholder: u._("Search by name"),
21
- onChange: (e) => d(e.target.value)
22
- })]
23
- })
24
- });
25
- };
7
+ var a = r(({ unitId: r }) => {
8
+ let { api: a } = e(), { data: o, isLoading: s } = a.finops.getMeasureUnitsId.useQuery({ path: { unit_id: r } });
9
+ return s ? /* @__PURE__ */ i(t, { className: "ttw:h-4 ttw:w-4" }) : o ? /* @__PURE__ */ i(n, {
10
+ color: "muted",
11
+ variant: "body2",
12
+ children: o.name
13
+ }) : null;
14
+ });
26
15
  //#endregion
27
- export { l as Filters };
16
+ export { a as MeasureUnit };
@@ -1,16 +1,16 @@
1
- import { useMoniteContext as e } from "./index45.js";
2
- import { Skeleton as t } from "./index54.js";
3
- import { Typography as n } from "./index62.js";
4
- import { memo as r } from "react";
5
- import { jsx as i } from "@emotion/react/jsx-runtime";
1
+ import { CurrencyEnumSchema as e } from "./index93.js";
2
+ import { z as t } from "zod";
6
3
  //#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index363.js
7
- var a = r(({ unitId: r }) => {
8
- let { api: a } = e(), { data: o, isLoading: s } = a.finops.getMeasureUnitsId.useQuery({ path: { unit_id: r } });
9
- return s ? /* @__PURE__ */ i(t, { className: "ttw:h-4 ttw:w-4" }) : o ? /* @__PURE__ */ i(n, {
10
- color: "muted",
11
- variant: "body2",
12
- children: o.name
13
- }) : null;
4
+ var n = (n) => t.object({
5
+ name: t.string().trim().min(1, n._("Product name is required")).max(100, n._("Product name must be 100 characters or less")).meta({ title: n._("Product Name") }),
6
+ type: t.enum(["product", "service"], n._("Product type is required")).meta({ title: n._("Type") }),
7
+ pricePerUnit: t.number().min(0, n._("Price per unit must be 0 or greater")).meta({ title: n._("Price Per Unit") }),
8
+ currency: e.meta({ title: n._("Currency") }),
9
+ description: t.string().trim().max(255, n._("Description must be 255 characters or less")).optional().meta({ title: n._("Description") }),
10
+ measureUnitId: t.string().optional().meta({ title: n._("Unit") })
11
+ }), r = (e) => t.object({
12
+ name: t.string().trim().min(1, e._("Unit label is required")),
13
+ description: t.string().trim().optional()
14
14
  });
15
15
  //#endregion
16
- export { a as MeasureUnit };
16
+ export { r as getMeasureUnitValidationSchema, n as getProductValidationSchema };
@@ -1,16 +1,102 @@
1
- import { CurrencyEnumSchema as e } from "./index93.js";
2
- import { z as t } from "zod";
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 "./index156.js";
4
+ import { useCreateMeasureUnit as i } from "./index352.js";
5
+ import { useUpdateMeasureUnit as a } from "./index353.js";
6
+ import { getMeasureUnitValidationSchema as o } from "./index363.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";
3
12
  //#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index364.js
4
- var n = (n) => t.object({
5
- name: t.string().trim().min(1, n._("Product name is required")).max(100, n._("Product name must be 100 characters or less")).meta({ title: n._("Product Name") }),
6
- type: t.enum(["product", "service"], n._("Product type is required")).meta({ title: n._("Type") }),
7
- pricePerUnit: t.number().min(0, n._("Price per unit must be 0 or greater")).meta({ title: n._("Price Per Unit") }),
8
- currency: e.meta({ title: n._("Currency") }),
9
- description: t.string().trim().max(255, n._("Description must be 255 characters or less")).optional().meta({ title: n._("Description") }),
10
- measureUnitId: t.string().optional().meta({ title: n._("Unit") })
11
- }), r = (e) => t.object({
12
- name: t.string().trim().min(1, e._("Unit label is required")),
13
- description: t.string().trim().optional()
14
- });
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 = o(x), { handleSubmit: C, control: w, reset: T, setError: E } = p({
18
+ defaultValues: v,
19
+ resolver: m(S)
20
+ }), D = i(() => T(), (e) => E("name", {
21
+ type: "custom",
22
+ message: e
23
+ })), O = a(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
+ })
99
+ });
100
+ };
15
101
  //#endregion
16
- export { r as getMeasureUnitValidationSchema, n as getProductValidationSchema };
102
+ export { g as MeasureUnitsFormRow };
@@ -1,102 +1,46 @@
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 "./index156.js";
4
- import { useCreateMeasureUnit as i } from "./index353.js";
5
- import { useUpdateMeasureUnit as a } from "./index354.js";
6
- import { getMeasureUnitValidationSchema as o } from "./index364.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 { useCurrencies as e } from "./index63.js";
2
+ import { ConfirmationModal as t } from "./index59.js";
3
+ import "./index60.js";
4
+ import { Typography as n } from "./index62.js";
5
+ import { Table as r, TableBody as i, TableCell as a, TableRow as o } from "./index156.js";
6
+ import "./index173.js";
7
+ import { useGetProducts as s } from "./index292.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";
12
11
  //#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index365.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 = o(x), { handleSubmit: C, control: w, reset: T, setError: E } = p({
18
- defaultValues: v,
19
- resolver: m(S)
20
- }), D = i(() => T(), (e) => E("name", {
21
- type: "custom",
22
- message: e
23
- })), O = a(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
- })
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
+ ] })
99
43
  });
100
44
  };
101
45
  //#endregion
102
- export { g as MeasureUnitsFormRow };
46
+ export { p as ConfirmDeleteMeasureUnitDialog };
@@ -1,46 +1,30 @@
1
- import { useCurrencies as e } from "./index63.js";
2
- import { ConfirmationModal as t } from "./index59.js";
3
- import "./index60.js";
4
- import { Typography as n } from "./index62.js";
5
- import { Table as r, TableBody as i, TableCell as a, TableRow as o } from "./index156.js";
6
- import "./index173.js";
7
- import { useGetProducts as s } from "./index293.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 { 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";
11
6
  //#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index366.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
- ] })
43
- });
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;
44
28
  };
45
29
  //#endregion
46
- export { p as ConfirmDeleteMeasureUnitDialog };
30
+ export { d as TableActions };
@@ -1,30 +1 @@
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/index367.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 };
1
+ import "./index366.js";