@tesouro/embedded-components-react 0.3.19 → 0.3.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (210) hide show
  1. package/dist/index.css +9 -0
  2. package/dist/index.js +1 -1
  3. package/dist/lib/BillPayWidget.js +1 -1
  4. package/dist/lib/monite-sdk.js +18 -18
  5. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +4 -4
  6. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index10.js +2 -2
  7. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index29.js +1 -1
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index41.js +1 -1
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +1 -1
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +14 -1
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +4 -1
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js +3 -1
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index62.js +28 -97
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js +81 -176
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +50 -4
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js +250 -5
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.js +106 -107
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index67.js +209 -1
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index68.js +3 -24
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index69.js +8 -0
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index7.js +2 -2
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index70.js +114 -0
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index71.js +1 -0
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index72.js +25 -0
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +21 -17
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index52.js +2 -0
  27. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index59.js +36 -11
  28. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index60.js +10 -283
  29. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index61.js +199 -8
  30. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index62.js +3 -8
  31. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index63.js +14 -91
  32. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index64.js +314 -0
  33. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index65.js +10 -2
  34. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index66.js +4 -14
  35. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index67.js +85 -105
  36. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index69.js +2 -7
  37. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index70.js +16 -28
  38. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index71.js +113 -2
  39. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index72.js +2 -7
  40. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index73.js +5 -32
  41. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index74.js +30 -2
  42. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index75.js +2 -12
  43. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index76.js +5 -104
  44. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index77.js +34 -2
  45. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index78.js +2 -18
  46. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index79.js +9 -7
  47. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index80.js +81 -145
  48. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index81.js +1 -1
  49. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index82.js +15 -11
  50. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index83.js +8 -87
  51. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index84.js +170 -2
  52. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index85.js +2 -0
  53. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index86.js +14 -0
  54. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index87.js +89 -0
  55. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index88.js +2 -0
  56. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index3.js +1 -1
  57. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index.js +19 -19
  58. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index422.js +1 -1
  59. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index479.js +16 -20
  60. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index480.js +13 -12
  61. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index481.js +19 -97
  62. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index482.js +98 -42
  63. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index483.js +43 -27
  64. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index484.js +30 -1
  65. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index485.js +1 -17
  66. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index486.js +11 -10
  67. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index487.js +14 -4
  68. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index488.js +4 -13
  69. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index489.js +7 -7
  70. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index490.js +18 -9
  71. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index491.js +8 -105
  72. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index492.js +102 -35
  73. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index493.js +36 -45
  74. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index494.js +44 -71
  75. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index495.js +72 -100
  76. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index496.js +99 -43
  77. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index497.js +35 -178
  78. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index498.js +171 -125
  79. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index499.js +134 -123
  80. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index500.js +125 -73
  81. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index501.js +63 -232
  82. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index502.js +248 -8
  83. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index503.js +8 -6
  84. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index504.js +5 -456
  85. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index505.js +455 -21
  86. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index506.js +17 -12
  87. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index507.js +13 -49
  88. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index508.js +51 -43
  89. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index509.js +46 -14
  90. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index510.js +13 -41
  91. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index511.js +39 -144
  92. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index512.js +143 -112
  93. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index513.js +114 -39
  94. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index514.js +33 -25
  95. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index515.js +32 -19
  96. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index516.js +3 -3
  97. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index517.js +19 -21
  98. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index518.js +20 -72
  99. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index519.js +73 -17
  100. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index520.js +18 -172
  101. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index521.js +149 -116
  102. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index522.js +136 -30
  103. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index523.js +31 -115
  104. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index524.js +116 -19
  105. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index525.js +10 -36
  106. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index526.js +46 -14
  107. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index527.js +13 -23
  108. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index528.js +21 -25
  109. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index529.js +26 -36
  110. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index530.js +36 -77
  111. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index531.js +77 -50
  112. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index532.js +50 -33
  113. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index533.js +34 -89
  114. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index534.js +86 -48
  115. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index535.js +54 -1
  116. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index536.js +1 -40
  117. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index537.js +40 -1
  118. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index538.js +0 -135
  119. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index539.js +129 -102
  120. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index540.js +105 -50
  121. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index541.js +48 -779
  122. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index542.js +780 -87
  123. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index543.js +84 -97
  124. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index544.js +105 -6
  125. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index545.js +6 -27
  126. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index546.js +23 -11
  127. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index547.js +13 -2
  128. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index548.js +2 -25
  129. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index549.js +25 -14
  130. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index550.js +14 -171
  131. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index551.js +163 -200
  132. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index552.js +204 -78
  133. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index553.js +82 -17
  134. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index554.js +17 -158
  135. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index555.js +146 -85
  136. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index556.js +95 -42
  137. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index557.js +46 -4
  138. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index558.js +4 -16
  139. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index559.js +13 -24
  140. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index560.js +27 -1
  141. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index561.js +0 -186
  142. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index562.js +186 -0
  143. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index563.js +0 -42
  144. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index564.js +41 -3
  145. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index565.js +5 -24
  146. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index566.js +20 -73
  147. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index567.js +74 -16
  148. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index568.js +16 -19
  149. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index569.js +19 -5
  150. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index570.js +4 -8
  151. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index571.js +10 -11
  152. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index572.js +11 -131
  153. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index573.js +129 -4
  154. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index574.js +4 -4
  155. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index575.js +8 -5
  156. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index576.js +4 -221
  157. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index577.js +219 -11
  158. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index578.js +12 -34
  159. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index579.js +32 -181
  160. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index580.js +168 -189
  161. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index581.js +192 -88
  162. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index582.js +97 -61
  163. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index583.js +63 -54
  164. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index584.js +46 -83
  165. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index585.js +91 -40
  166. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index586.js +39 -75
  167. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index587.js +63 -71
  168. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index588.js +85 -12
  169. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index589.js +12 -24
  170. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index590.js +25 -16
  171. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index591.js +14 -2
  172. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index592.js +4 -23
  173. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index593.js +23 -0
  174. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index594.js +1 -24
  175. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index595.js +24 -4
  176. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index596.js +4 -13
  177. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index597.js +9 -13
  178. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index598.js +13 -4
  179. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index599.js +4 -8
  180. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index600.js +8 -4
  181. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index601.js +8 -6
  182. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index602.js +6 -22
  183. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index603.js +17 -68
  184. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index604.js +66 -113
  185. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index605.js +104 -64
  186. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index606.js +72 -138
  187. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index607.js +144 -28
  188. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index608.js +28 -16
  189. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index609.js +14 -87
  190. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index610.js +91 -3
  191. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index611.js +3 -26
  192. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index612.js +22 -67
  193. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index613.js +71 -1
  194. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index614.js +0 -65
  195. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index615.js +66 -29
  196. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index616.js +30 -2
  197. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index617.js +2 -34
  198. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index618.js +33 -15
  199. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index619.js +14 -29
  200. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index620.js +29 -26
  201. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index621.js +30 -2
  202. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index622.js +2 -97
  203. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index623.js +97 -0
  204. package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/index6.js +1 -1
  205. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  206. package/dist/libs/tesouro-embedded-components-react/shared/monite-wrapper/feature/dist/lib/MoniteWrapper.js +1 -1
  207. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index7.js +1 -1
  208. package/dist/packages/shared-ui-shadcn/dist/index.js +16 -11
  209. package/package.json +1 -1
  210. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index68.js +0 -2
@@ -1,84 +1,210 @@
1
1
  import { useCurrencies as e } from "./index63.js";
2
- import { Button as t } from "./index56.js";
2
+ import { Input as t } from "./index89.js";
3
+ import { InputGroup as n, InputGroupAddon as r, InputGroupInput as i, InputGroupTextarea as a } from "./index107.js";
4
+ import { Combobox as o, ComboboxCollection as s, ComboboxContent as c, ComboboxEmpty as l, ComboboxInput as u, ComboboxItem as d, ComboboxList as f } from "./index108.js";
3
5
  import "./index217.js";
4
- import { LoadingSpinner as n } from "./index51.js";
5
- import "./index52.js";
6
- import { getProductValidationSchema as r } from "./index478.js";
7
- import { useUpdateProduct as i } from "./index489.js";
8
- import { ProductFormContent as a } from "./index551.js";
9
- import { useCallback as o, useId as s, useMemo as c } from "react";
10
- import { jsx as l, jsxs as u } from "@emotion/react/jsx-runtime";
11
- import { useLingui as d } from "@lingui/react";
12
- import { FormProvider as f, useForm as p } from "react-hook-form";
13
- import { zodResolver as m } from "@hookform/resolvers/zod";
6
+ import { Typography as p } from "./index62.js";
7
+ import { Label as m } from "./index87.js";
8
+ import { Field as h, FieldContent as g, FieldError as _, FieldLabel as v } from "./index88.js";
9
+ import { RadioGroup as y, RadioGroupItem as b } from "./index90.js";
10
+ import { useGetMeasureUnits as x } from "./index458.js";
11
+ import "./index491.js";
12
+ import { useCallback as S, useMemo as C, useRef as w } from "react";
13
+ import { jsx as T, jsxs as E } from "@emotion/react/jsx-runtime";
14
+ import { useLingui as D } from "@lingui/react";
15
+ import { twMerge as O } from "tailwind-merge";
16
+ import { Controller as k, useFormContext as A } from "react-hook-form";
14
17
  //#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index552.js
15
- var h = ({ product: h, handleClose: g, onUpdate: _ }) => {
16
- let { i18n: v } = d(), { formatToMinorUnits: y, formatFromMinorUnits: b } = e(), x = `product-edit-form-${s()}`, { mutate: S, isPending: C } = i(h.id), w = c(() => ({
17
- name: h.name,
18
- type: h.type ?? "product",
19
- pricePerUnit: b(h.price?.value, h.price?.currency) ?? void 0,
20
- currency: h.price?.currency ?? "USD",
21
- description: h.description ?? "",
22
- measureUnitId: h.measure_unit_id ?? void 0
23
- }), [
24
- h.name,
25
- h.type,
26
- h.price?.value,
27
- h.price?.currency,
28
- h.description,
29
- h.measure_unit_id,
30
- b
31
- ]), T = p({
32
- resolver: m(r(v)),
33
- defaultValues: w
34
- }), E = o((e) => {
35
- e.preventDefault(), e.stopPropagation(), T.handleSubmit((e) => {
36
- S({
37
- name: e.name,
38
- type: e.type,
39
- price: {
40
- value: y(e.pricePerUnit, e.currency) ?? e.pricePerUnit,
41
- currency: e.currency
42
- },
43
- description: e.description,
44
- ...e.measureUnitId ? { measure_unit_id: e.measureUnitId } : {}
45
- }, { onSuccess: (e) => {
46
- _?.(e);
47
- } });
48
- })(e);
49
- }, [
50
- S,
51
- y,
52
- _,
53
- T.handleSubmit
54
- ]);
55
- return /* @__PURE__ */ l(f, {
56
- ...T,
57
- children: /* @__PURE__ */ u("form", {
58
- id: x,
59
- onSubmit: E,
60
- className: "ttw:flex ttw:flex-col ttw:gap-4 ttw:p-4 ttw:border ttw:border-primary ttw:rounded-[10px] ttw:bg-zinc-100",
61
- children: [/* @__PURE__ */ l(a, {
62
- isLoading: C,
63
- isProduct: h?.type === "product",
64
- isEditMode: !0
65
- }), /* @__PURE__ */ u("div", {
66
- className: "ttw:flex ttw:gap-4 ttw:pt-6",
67
- children: [/* @__PURE__ */ l(t, {
68
- type: "button",
69
- variant: "outline",
70
- className: "ttw:border-border ttw:flex-1",
71
- onClick: g,
72
- children: v._("Cancel")
73
- }), /* @__PURE__ */ u(t, {
74
- type: "submit",
75
- className: "ttw:flex-1",
76
- disabled: C || !T.formState.isDirty,
77
- children: [C && /* @__PURE__ */ l(n, { className: "ttw:border-white ttw:border-t-transparent ttw:size-4" }), v._("Save")]
78
- })]
79
- })]
80
- })
18
+ var j = ({ isLoading: j, isEditMode: M, isProduct: N }) => {
19
+ let { i18n: P } = D(), { getSymbolFromCurrency: F } = e(), I = w(null), { data: L } = x(), R = L?.data ?? [], { control: z, formState: { errors: B } } = A(), V = C(() => R.map((e) => e.id), [R]), H = C(() => new Map(R.map((e) => [e.id, e.name])), [R]), U = S((e) => H.get(e) ?? e, [H]);
20
+ return /* @__PURE__ */ E("div", {
21
+ className: "ttw:flex ttw:flex-col ttw:gap-4",
22
+ children: [
23
+ M && /* @__PURE__ */ T("div", {
24
+ className: "ttw:flex ttw:items-center ttw:gap-3 ttw:pt-6 ttw:pb-7 ttw:border-b ttw:border-border",
25
+ children: /* @__PURE__ */ T(p, {
26
+ variant: "body1",
27
+ className: "ttw:font-medium",
28
+ children: P._("Editing {type} details", { type: N ? "product" : "service" })
29
+ })
30
+ }),
31
+ /* @__PURE__ */ T(k, {
32
+ name: "type",
33
+ control: z,
34
+ render: ({ field: e }) => /* @__PURE__ */ E("div", {
35
+ className: "ttw:flex ttw:flex-col ttw:gap-1.5",
36
+ children: [/* @__PURE__ */ T(v, { children: P._("Type") }), /* @__PURE__ */ E(y, {
37
+ className: "ttw:flex",
38
+ value: e.value,
39
+ disabled: j,
40
+ onValueChange: e.onChange,
41
+ children: [/* @__PURE__ */ E("div", {
42
+ className: O("ttw:flex ttw:p-4 ttw:flex-1 ttw:gap-2 ttw:border ttw:rounded-xl ttw:border-border ttw:hover:bg-primary/10 ttw:hover:border-primary/30", e.value === "product" && "ttw:bg-primary/10 ttw:border-primary/30"),
43
+ children: [/* @__PURE__ */ T(b, {
44
+ value: "product",
45
+ id: "type-product",
46
+ className: O(e.value === "product" ? "ttw:bg-primary" : "ttw:bg-white"),
47
+ dotClassName: O(e.value === "product" && "ttw:fill-white"),
48
+ disabled: j
49
+ }), /* @__PURE__ */ E(m, {
50
+ htmlFor: "type-product",
51
+ className: "ttw:flex ttw:flex-col ttw:items-start ttw:gap-1.5",
52
+ children: [/* @__PURE__ */ T(p, {
53
+ variant: "body2",
54
+ className: "ttw:leading-3.5",
55
+ children: P._("Product")
56
+ }), /* @__PURE__ */ T(p, {
57
+ variant: "caption",
58
+ color: "muted",
59
+ children: P._("A physical or digital item")
60
+ })]
61
+ })]
62
+ }), /* @__PURE__ */ E("div", {
63
+ className: O("ttw:flex ttw:p-4 ttw:flex-1 ttw:gap-2 ttw:border ttw:rounded-xl ttw:border-border ttw:hover:bg-primary/10 ttw:hover:border-primary/30", e.value === "service" && "ttw:bg-primary/10 ttw:border-primary/30"),
64
+ children: [/* @__PURE__ */ T(b, {
65
+ value: "service",
66
+ id: "type-service",
67
+ className: O(e.value === "service" ? "ttw:bg-primary" : "ttw:bg-white"),
68
+ dotClassName: O(e.value === "service" && "ttw:fill-white"),
69
+ disabled: j
70
+ }), /* @__PURE__ */ E(m, {
71
+ htmlFor: "type-service",
72
+ className: "ttw:flex ttw:flex-col ttw:items-start ttw:gap-1.5",
73
+ children: [/* @__PURE__ */ T(p, {
74
+ variant: "body2",
75
+ className: "ttw:leading-3.5",
76
+ children: P._("Service")
77
+ }), /* @__PURE__ */ T(p, {
78
+ variant: "caption",
79
+ color: "muted",
80
+ children: P._("Work or labor you provide")
81
+ })]
82
+ })]
83
+ })]
84
+ })]
85
+ })
86
+ }),
87
+ /* @__PURE__ */ T(k, {
88
+ name: "name",
89
+ control: z,
90
+ render: ({ field: e, fieldState: { error: n } }) => /* @__PURE__ */ T(h, { children: /* @__PURE__ */ E(g, { children: [
91
+ /* @__PURE__ */ T(v, {
92
+ htmlFor: e.name,
93
+ children: P._("Name")
94
+ }),
95
+ /* @__PURE__ */ T(t, {
96
+ ...e,
97
+ id: e.name,
98
+ placeholder: P._("e.g. House blend espresso beans"),
99
+ className: M ? "ttw:bg-white" : "",
100
+ disabled: j,
101
+ "aria-invalid": !!n || void 0
102
+ }),
103
+ /* @__PURE__ */ T(_, { errors: [n] })
104
+ ] }) })
105
+ }),
106
+ /* @__PURE__ */ E("div", {
107
+ className: "ttw:w-1/2 ttw:flex ttw:flex-col ttw:gap-1.5",
108
+ children: [
109
+ /* @__PURE__ */ T(v, { children: P._("Price per unit") }),
110
+ /* @__PURE__ */ E("div", {
111
+ className: O("ttw:flex ttw:overflow-hidden ttw:rounded-md ttw:border ttw:border-input ttw:shadow-xs ttw:transition-[color,box-shadow]", "ttw:focus-within:border-ring ttw:focus-within:ring-[3px] ttw:focus-within:ring-ring/50", "ttw:has-[[data-slot][aria-invalid=true]]:border-destructive ttw:has-[[data-slot][aria-invalid=true]]:ring-[3px] ttw:has-[[data-slot][aria-invalid=true]]:ring-destructive/20", M && "ttw:bg-white"),
112
+ ref: I,
113
+ children: [
114
+ /* @__PURE__ */ T(k, {
115
+ name: "pricePerUnit",
116
+ control: z,
117
+ render: ({ field: e, fieldState: { error: t } }) => /* @__PURE__ */ E(n, {
118
+ className: "ttw:flex-1 ttw:border-0 ttw:shadow-none ttw:rounded-none ttw:has-[[data-slot=input-group-control]:focus-visible]:border-transparent ttw:has-[[data-slot=input-group-control]:focus-visible]:ring-0",
119
+ children: [/* @__PURE__ */ T(r, {
120
+ align: "inline-start",
121
+ children: F("USD")
122
+ }), /* @__PURE__ */ T(i, {
123
+ type: "number",
124
+ name: e.name,
125
+ ref: e.ref,
126
+ value: e.value ?? "",
127
+ onChange: (t) => e.onChange(t.target.value === "" ? void 0 : Number(t.target.value)),
128
+ className: "ttw:text-end",
129
+ onBlur: e.onBlur,
130
+ placeholder: "0.00",
131
+ "aria-invalid": !!t || void 0,
132
+ disabled: j
133
+ })]
134
+ })
135
+ }),
136
+ /* @__PURE__ */ T("div", { className: "ttw:w-px ttw:shrink-0 ttw:bg-border" }),
137
+ /* @__PURE__ */ T(k, {
138
+ name: "measureUnitId",
139
+ control: z,
140
+ render: ({ field: e }) => /* @__PURE__ */ E(o, {
141
+ value: e.value ?? null,
142
+ onValueChange: (t) => e.onChange(t ?? void 0),
143
+ items: V,
144
+ itemToStringLabel: U,
145
+ disabled: j,
146
+ children: [/* @__PURE__ */ T(u, {
147
+ showClear: !!e.value,
148
+ placeholder: "-",
149
+ disabled: j,
150
+ className: "ttw:w-28 ttw:border-0 ttw:shadow-none ttw:rounded-none ttw:has-[[data-slot=input-group-control]:focus-visible]:border-transparent ttw:has-[[data-slot=input-group-control]:focus-visible]:ring-0"
151
+ }), /* @__PURE__ */ T(c, {
152
+ container: I.current,
153
+ children: /* @__PURE__ */ E(f, { children: [/* @__PURE__ */ T(l, { children: P._("No units found") }), /* @__PURE__ */ T(s, { children: (e) => /* @__PURE__ */ T(d, {
154
+ value: e,
155
+ children: U(e)
156
+ }, e) })] })
157
+ })]
158
+ })
159
+ })
160
+ ]
161
+ }),
162
+ /* @__PURE__ */ T(_, { errors: [B.pricePerUnit] })
163
+ ]
164
+ }),
165
+ /* @__PURE__ */ T(k, {
166
+ name: "description",
167
+ control: z,
168
+ render: ({ field: e, fieldState: { error: t } }) => /* @__PURE__ */ T(h, {
169
+ className: "ttw:block",
170
+ children: /* @__PURE__ */ E(g, { children: [
171
+ /* @__PURE__ */ E(v, {
172
+ htmlFor: e.name,
173
+ className: "ttw:gap-1",
174
+ children: [P._("Description"), /* @__PURE__ */ T(p, {
175
+ variant: "body2",
176
+ color: "muted",
177
+ className: "ttw:leading-snug",
178
+ children: P._("(optional)")
179
+ })]
180
+ }),
181
+ /* @__PURE__ */ E(n, {
182
+ className: O(M && "ttw:bg-white"),
183
+ children: [/* @__PURE__ */ T(a, {
184
+ ...e,
185
+ id: e.name,
186
+ placeholder: P._("e.g. 16oz whole bean, medium-dark roast, ground to order"),
187
+ rows: 4,
188
+ maxLength: 280,
189
+ disabled: j,
190
+ "aria-invalid": !!t || void 0
191
+ }), /* @__PURE__ */ T(r, {
192
+ align: "block-end",
193
+ className: "ttw:cursor-default",
194
+ children: /* @__PURE__ */ T(p, {
195
+ variant: "caption",
196
+ color: "muted",
197
+ className: "ttw:leading-none",
198
+ children: P._("{count}/280 characters", { count: (e.value ?? "").length })
199
+ })
200
+ })]
201
+ }),
202
+ /* @__PURE__ */ T(_, { errors: [t] })
203
+ ] })
204
+ })
205
+ })
206
+ ]
81
207
  });
82
208
  };
83
209
  //#endregion
84
- export { h as ProductEditForm };
210
+ export { j as ProductFormContent };
@@ -1,19 +1,84 @@
1
- import { Typography as e } from "./index62.js";
2
- import { jsx as t, jsxs as n } from "@emotion/react/jsx-runtime";
3
- import { twMerge as r } from "tailwind-merge";
1
+ import { useCurrencies as e } from "./index63.js";
2
+ import { Button as t } from "./index56.js";
3
+ import "./index217.js";
4
+ import { LoadingSpinner as n } from "./index51.js";
5
+ import "./index52.js";
6
+ import { getProductValidationSchema as r } from "./index478.js";
7
+ import { useUpdateProduct as i } from "./index490.js";
8
+ import { ProductFormContent as a } from "./index552.js";
9
+ import { useCallback as o, useId as s, useMemo as c } from "react";
10
+ import { jsx as l, jsxs as u } from "@emotion/react/jsx-runtime";
11
+ import { useLingui as d } from "@lingui/react";
12
+ import { FormProvider as f, useForm as p } from "react-hook-form";
13
+ import { zodResolver as m } from "@hookform/resolvers/zod";
4
14
  //#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index553.js
5
- var i = ({ label: i, value: a, isLast: o }) => /* @__PURE__ */ n("li", {
6
- className: r("ttw:flex ttw:gap-4 ttw:py-2.5", !o && "ttw:border-b ttw:border-border"),
7
- children: [/* @__PURE__ */ t(e, {
8
- variant: "body2",
9
- color: "muted",
10
- className: "ttw:w-35 ttw:min-w-35 ttw:font-medium",
11
- children: i
12
- }), typeof a == "string" ? /* @__PURE__ */ t(e, {
13
- variant: "body2",
14
- className: "ttw:font-medium",
15
- children: a
16
- }) : a]
17
- });
15
+ var h = ({ product: h, handleClose: g, onUpdate: _ }) => {
16
+ let { i18n: v } = d(), { formatToMinorUnits: y, formatFromMinorUnits: b } = e(), x = `product-edit-form-${s()}`, { mutate: S, isPending: C } = i(h.id), w = c(() => ({
17
+ name: h.name,
18
+ type: h.type ?? "product",
19
+ pricePerUnit: b(h.price?.value, h.price?.currency) ?? void 0,
20
+ currency: h.price?.currency ?? "USD",
21
+ description: h.description ?? "",
22
+ measureUnitId: h.measure_unit_id ?? void 0
23
+ }), [
24
+ h.name,
25
+ h.type,
26
+ h.price?.value,
27
+ h.price?.currency,
28
+ h.description,
29
+ h.measure_unit_id,
30
+ b
31
+ ]), T = p({
32
+ resolver: m(r(v)),
33
+ defaultValues: w
34
+ }), E = o((e) => {
35
+ e.preventDefault(), e.stopPropagation(), T.handleSubmit((e) => {
36
+ S({
37
+ name: e.name,
38
+ type: e.type,
39
+ price: {
40
+ value: y(e.pricePerUnit, e.currency) ?? e.pricePerUnit,
41
+ currency: e.currency
42
+ },
43
+ description: e.description,
44
+ ...e.measureUnitId ? { measure_unit_id: e.measureUnitId } : {}
45
+ }, { onSuccess: (e) => {
46
+ _?.(e);
47
+ } });
48
+ })(e);
49
+ }, [
50
+ S,
51
+ y,
52
+ _,
53
+ T.handleSubmit
54
+ ]);
55
+ return /* @__PURE__ */ l(f, {
56
+ ...T,
57
+ children: /* @__PURE__ */ u("form", {
58
+ id: x,
59
+ onSubmit: E,
60
+ className: "ttw:flex ttw:flex-col ttw:gap-4 ttw:p-4 ttw:border ttw:border-primary ttw:rounded-[10px] ttw:bg-zinc-100",
61
+ children: [/* @__PURE__ */ l(a, {
62
+ isLoading: C,
63
+ isProduct: h?.type === "product",
64
+ isEditMode: !0
65
+ }), /* @__PURE__ */ u("div", {
66
+ className: "ttw:flex ttw:gap-4 ttw:pt-6",
67
+ children: [/* @__PURE__ */ l(t, {
68
+ type: "button",
69
+ variant: "outline",
70
+ className: "ttw:border-border ttw:flex-1",
71
+ onClick: g,
72
+ children: v._("Cancel")
73
+ }), /* @__PURE__ */ u(t, {
74
+ type: "submit",
75
+ className: "ttw:flex-1",
76
+ disabled: C || !T.formState.isDirty,
77
+ children: [C && /* @__PURE__ */ l(n, { className: "ttw:border-white ttw:border-t-transparent ttw:size-4" }), v._("Save")]
78
+ })]
79
+ })]
80
+ })
81
+ });
82
+ };
18
83
  //#endregion
19
- export { i as ProductDetailLine };
84
+ export { h as ProductEditForm };
@@ -1,160 +1,19 @@
1
- import { Scope as e } from "../../shared/data-access/dist/lib/scopes.js";
2
- import "../../shared/data-access/dist/index.js";
3
- import { useMoniteContext as t } from "./index47.js";
4
- import { useCurrencies as n } from "./index63.js";
5
- import { Button as r } from "./index56.js";
6
- import { MoniteScopedProviders as i } from "./index237.js";
7
- import { Sheet as a, SheetClose as o, SheetContent as s, SheetDescription as c, SheetHeader as l, SheetTitle as u } from "./index50.js";
8
- import { LoadingSpinner as d } from "./index51.js";
9
- import "./index52.js";
10
- import { Skeleton as f } from "./index54.js";
11
- import { DropdownMenu as p, DropdownMenuContent as m, DropdownMenuItem as h, DropdownMenuTrigger as g } from "./index55.js";
12
- import { Typography as _ } from "./index62.js";
13
- import { useUserPermissions as v } from "./index116.js";
14
- import { NotFound as y } from "./index239.js";
15
- import { AccessRestriction as b } from "./index247.js";
16
- import "./index424.js";
17
- import { useGetProductById as x } from "./index487.js";
18
- import { ProductDeleteModal as S } from "./index545.js";
19
- import { ProductEditForm as C } from "./index552.js";
20
- import { ProductDetailLine as w } from "./index553.js";
21
- import { useState as T } from "react";
22
- import { MoreVerticalIcon as E, Trash2 as D, X as O } from "lucide-react";
23
- import { Fragment as k, jsx as A, jsxs as j } from "@emotion/react/jsx-runtime";
24
- import { useLingui as M } from "@lingui/react";
1
+ import { Typography as e } from "./index62.js";
2
+ import { jsx as t, jsxs as n } from "@emotion/react/jsx-runtime";
3
+ import { twMerge as r } from "tailwind-merge";
25
4
  //#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index554.js
26
- var N = (e) => /* @__PURE__ */ A(i, { children: /* @__PURE__ */ A(P, { ...e }) }), P = ({ id: i, open: N, onClose: P, onUpdated: F, onDeleted: I, showActionsMenu: L = !0 }) => {
27
- let { i18n: R } = M(), { locale: z } = t(), { formatCurrencyToDisplay: B } = n(), [V, H] = T(!1), [U, W] = T(!1), { data: G, isLoading: K, isFetching: q } = x(i), J = G?.type === "product", Y = v(), X = Y.has(e.InvoiceReadOrg), Z = Y.has(e.InvoiceWriteOrg), Q = Y.has(e.InvoiceWriteOrg);
28
- return X ? !K && !q && !G ? /* @__PURE__ */ A(a, {
29
- open: N,
30
- onOpenChange: P,
31
- children: /* @__PURE__ */ A(s, {
32
- showCloseButton: !0,
33
- className: "ttw:gap-0",
34
- children: /* @__PURE__ */ A("div", {
35
- className: "ttw:w-3/4 ttw:m-auto ttw:p-4",
36
- children: /* @__PURE__ */ A(y, {
37
- title: R._("Product not found"),
38
- description: R._("There is no product by provided id: {id}", { id: i })
39
- })
40
- })
41
- })
42
- }) : /* @__PURE__ */ j(k, { children: [/* @__PURE__ */ A(a, {
43
- open: N,
44
- onOpenChange: P,
45
- children: /* @__PURE__ */ j(s, {
46
- showCloseButton: !1,
47
- className: "ttw:gap-0",
48
- children: [/* @__PURE__ */ j(l, {
49
- className: "ttw:pt-6 ttw:pl-6 ttw:pb-7 ttw:flex-row ttw:gap-3 ttw:border-b ttw:border-border",
50
- children: [/* @__PURE__ */ j("div", {
51
- className: "ttw:flex ttw:flex-col ttw:gap-1.5 ttw:w-[85%]",
52
- children: [/* @__PURE__ */ A(u, {
53
- asChild: K,
54
- className: "ttw:text-2xl",
55
- children: K ? /* @__PURE__ */ A(f, { className: "ttw:w-40" }) : G?.name ?? ""
56
- }), /* @__PURE__ */ A(c, {
57
- asChild: K,
58
- children: K ? /* @__PURE__ */ A(f, { className: "ttw:w-60" }) : R._("{type} · Added {createdAt}", {
59
- createdAt: R.date(G?.created_at, z.dateFormat),
60
- type: G?.type === "product" ? "Product" : "Service"
61
- })
62
- })]
63
- }), /* @__PURE__ */ j("div", {
64
- className: "ttw:flex ttw:gap-2",
65
- children: [L && Q && /* @__PURE__ */ j(p, { children: [/* @__PURE__ */ A(g, {
66
- asChild: !0,
67
- children: /* @__PURE__ */ A(r, {
68
- type: "button",
69
- variant: "outline",
70
- className: "ttw:p-2 ttw:size-9 ttw:border-none ttw:bg-muted",
71
- children: /* @__PURE__ */ A(E, {})
72
- })
73
- }), /* @__PURE__ */ A(m, {
74
- align: "end",
75
- children: /* @__PURE__ */ j(h, {
76
- onClick: () => W(!0),
77
- variant: "destructive",
78
- children: [/* @__PURE__ */ A(D, {}), R._("Delete product")]
79
- })
80
- })] }), /* @__PURE__ */ A(o, {
81
- className: "ttw:size-9 ttw:bg-muted ttw:p-2 ttw:flex ttw:items-center ttw:justify-center ttw:rounded-md ttw:cursor-pointer",
82
- children: /* @__PURE__ */ A(O, { className: "ttw:size-4" })
83
- })]
84
- })]
85
- }), K ? /* @__PURE__ */ A("div", {
86
- className: "ttw:flex ttw:w-full ttw:h-full ttw:items-center ttw:justify-center",
87
- children: /* @__PURE__ */ A(d, {})
88
- }) : /* @__PURE__ */ A("main", {
89
- className: "ttw:p-6 ttw:overflow-auto ttw:flex ttw:flex-col ttw:gap-4",
90
- children: /* @__PURE__ */ j("div", {
91
- className: "ttw:flex ttw:flex-col ttw:gap-4",
92
- children: [/* @__PURE__ */ j("div", {
93
- className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-3 ttw:pt-6 ttw:pb-7 ttw:border-b ttw:border-border",
94
- children: [/* @__PURE__ */ j("div", {
95
- className: "ttw:flex ttw:flex-col ttw:gap-1.5",
96
- children: [/* @__PURE__ */ A(_, {
97
- variant: "body1",
98
- className: "ttw:font-medium",
99
- children: R._("{type} details", { type: J ? "Product" : "Service" })
100
- }), /* @__PURE__ */ A(_, {
101
- variant: "body2",
102
- color: "muted",
103
- children: J ? R._("A physical or digital item") : R._("Work or labor you provide")
104
- })]
105
- }), !V && Z && /* @__PURE__ */ A(r, {
106
- type: "button",
107
- variant: "ghost",
108
- className: "ttw:text-primary ttw:hover:text-primary",
109
- onClick: () => H(!0),
110
- children: R._("Edit")
111
- })]
112
- }), V && G ? /* @__PURE__ */ A(C, {
113
- product: G,
114
- handleClose: () => H(!1),
115
- onUpdate: (e) => {
116
- F?.(e), H(!1);
117
- }
118
- }) : /* @__PURE__ */ j("ul", {
119
- className: "ttw:list-none",
120
- children: [
121
- /* @__PURE__ */ A(w, {
122
- label: R._("{type} name", { type: J ? "Product" : "Service" }),
123
- value: G?.name ?? "-"
124
- }),
125
- /* @__PURE__ */ A(w, {
126
- label: R._("Price per unit"),
127
- value: G?.price ? B(G.price.value, G.price.currency) : "-"
128
- }),
129
- /* @__PURE__ */ A(w, {
130
- label: R._("Description"),
131
- value: G?.description || "-",
132
- isLast: !0
133
- })
134
- ]
135
- })]
136
- })
137
- })]
138
- })
139
- }), i && U && /* @__PURE__ */ A(S, {
140
- id: i,
141
- open: U,
142
- onClose: () => W(!1),
143
- onDeleted: (e) => {
144
- P?.(), I?.(e), W(!1);
145
- }
146
- })] }) : /* @__PURE__ */ A(a, {
147
- open: N,
148
- onOpenChange: P,
149
- children: /* @__PURE__ */ A(s, {
150
- showCloseButton: !0,
151
- className: "ttw:gap-0",
152
- children: /* @__PURE__ */ A("div", {
153
- className: "ttw:w-3/4 ttw:m-auto ttw:p-4",
154
- children: /* @__PURE__ */ A(b, {})
155
- })
156
- })
157
- });
158
- };
5
+ var i = ({ label: i, value: a, isLast: o }) => /* @__PURE__ */ n("li", {
6
+ className: r("ttw:flex ttw:gap-4 ttw:py-2.5", !o && "ttw:border-b ttw:border-border"),
7
+ children: [/* @__PURE__ */ t(e, {
8
+ variant: "body2",
9
+ color: "muted",
10
+ className: "ttw:w-35 ttw:min-w-35 ttw:font-medium",
11
+ children: i
12
+ }), typeof a == "string" ? /* @__PURE__ */ t(e, {
13
+ variant: "body2",
14
+ className: "ttw:font-medium",
15
+ children: a
16
+ }) : a]
17
+ });
159
18
  //#endregion
160
- export { N as ProductDetails };
19
+ export { i as ProductDetailLine };