@tesouro/embedded-components-react 0.3.20 → 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 (154) hide show
  1. package/dist/index.css +9 -0
  2. package/dist/lib/monite-sdk.js +18 -18
  3. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index3.js +1 -1
  4. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index.js +19 -19
  5. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index422.js +1 -1
  6. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index479.js +16 -20
  7. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index480.js +13 -12
  8. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index481.js +19 -97
  9. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index482.js +98 -42
  10. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index483.js +43 -27
  11. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index484.js +30 -1
  12. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index485.js +1 -17
  13. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index486.js +11 -10
  14. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index487.js +14 -4
  15. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index488.js +4 -13
  16. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index489.js +7 -7
  17. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index490.js +18 -9
  18. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index491.js +8 -105
  19. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index492.js +102 -35
  20. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index493.js +36 -45
  21. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index494.js +44 -71
  22. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index495.js +72 -100
  23. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index496.js +99 -43
  24. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index497.js +35 -178
  25. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index498.js +171 -125
  26. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index499.js +134 -123
  27. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index500.js +125 -73
  28. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index501.js +63 -232
  29. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index502.js +248 -8
  30. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index503.js +8 -6
  31. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index504.js +5 -456
  32. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index505.js +455 -21
  33. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index506.js +17 -12
  34. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index507.js +13 -49
  35. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index508.js +51 -43
  36. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index509.js +46 -14
  37. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index510.js +13 -41
  38. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index511.js +39 -144
  39. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index512.js +143 -112
  40. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index513.js +114 -39
  41. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index514.js +33 -25
  42. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index515.js +32 -19
  43. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index516.js +3 -3
  44. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index517.js +19 -21
  45. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index518.js +20 -72
  46. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index519.js +73 -17
  47. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index520.js +18 -172
  48. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index521.js +149 -116
  49. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index522.js +136 -30
  50. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index523.js +31 -115
  51. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index524.js +116 -19
  52. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index525.js +10 -36
  53. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index526.js +46 -14
  54. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index527.js +13 -23
  55. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index528.js +21 -25
  56. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index529.js +26 -36
  57. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index530.js +36 -77
  58. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index531.js +77 -50
  59. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index532.js +50 -33
  60. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index533.js +34 -89
  61. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index534.js +86 -48
  62. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index535.js +54 -1
  63. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index536.js +1 -40
  64. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index537.js +40 -1
  65. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index538.js +0 -135
  66. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index539.js +129 -102
  67. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index540.js +105 -50
  68. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index541.js +48 -779
  69. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index542.js +780 -87
  70. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index543.js +84 -97
  71. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index544.js +105 -6
  72. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index545.js +6 -27
  73. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index546.js +23 -11
  74. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index547.js +13 -2
  75. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index548.js +2 -25
  76. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index549.js +25 -14
  77. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index550.js +14 -171
  78. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index551.js +163 -200
  79. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index552.js +204 -78
  80. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index553.js +82 -17
  81. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index554.js +17 -158
  82. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index555.js +146 -85
  83. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index556.js +95 -42
  84. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index557.js +46 -4
  85. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index558.js +4 -16
  86. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index559.js +13 -24
  87. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index560.js +27 -1
  88. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index561.js +0 -186
  89. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index562.js +186 -0
  90. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index563.js +0 -42
  91. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index564.js +41 -3
  92. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index565.js +5 -24
  93. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index566.js +20 -73
  94. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index567.js +74 -16
  95. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index568.js +16 -19
  96. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index569.js +19 -5
  97. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index570.js +4 -8
  98. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index571.js +10 -11
  99. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index572.js +11 -131
  100. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index573.js +129 -4
  101. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index574.js +4 -4
  102. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index575.js +8 -5
  103. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index576.js +4 -221
  104. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index577.js +219 -11
  105. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index578.js +12 -34
  106. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index579.js +32 -181
  107. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index580.js +168 -189
  108. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index581.js +192 -88
  109. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index582.js +97 -61
  110. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index583.js +63 -54
  111. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index584.js +46 -83
  112. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index585.js +91 -40
  113. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index586.js +39 -75
  114. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index587.js +63 -71
  115. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index588.js +85 -12
  116. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index589.js +12 -24
  117. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index590.js +25 -16
  118. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index591.js +14 -2
  119. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index592.js +4 -23
  120. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index593.js +23 -0
  121. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index594.js +1 -24
  122. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index595.js +24 -4
  123. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index596.js +4 -13
  124. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index597.js +9 -13
  125. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index598.js +13 -4
  126. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index599.js +4 -8
  127. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index600.js +8 -4
  128. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index601.js +8 -6
  129. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index602.js +6 -22
  130. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index603.js +17 -68
  131. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index604.js +66 -113
  132. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index605.js +104 -64
  133. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index606.js +72 -138
  134. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index607.js +144 -28
  135. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index608.js +28 -16
  136. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index609.js +14 -87
  137. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index610.js +91 -3
  138. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index611.js +3 -26
  139. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index612.js +22 -67
  140. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index613.js +71 -1
  141. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index614.js +0 -65
  142. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index615.js +66 -29
  143. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index616.js +30 -2
  144. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index617.js +2 -34
  145. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index618.js +33 -15
  146. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index619.js +14 -29
  147. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index620.js +29 -26
  148. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index621.js +30 -2
  149. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index622.js +2 -97
  150. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index623.js +97 -0
  151. package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/index6.js +1 -1
  152. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  153. package/dist/libs/tesouro-embedded-components-react/shared/monite-wrapper/feature/dist/lib/MoniteWrapper.js +1 -1
  154. package/package.json +1 -1
@@ -1,17 +1 @@
1
- import { useMoniteContext as e } from "./index47.js";
2
- import { toast as t } from "react-hot-toast";
3
- import { useLingui as n } from "@lingui/react";
4
- //#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index485.js
5
- var r = (r) => {
6
- let { api: i, queryClient: a } = e(), { i18n: o } = n();
7
- return i.finops.postProducts.useMutation(void 0, {
8
- onSuccess: async (e) => {
9
- r?.(e), await i.finops.getProducts.invalidateQueries(a), t.success(o._("{name} has been added to the list.", { name: e.name }));
10
- },
11
- onError: () => {
12
- t.error(o._("Failed to create"));
13
- }
14
- });
15
- };
16
- //#endregion
17
- export { r as useCreateProduct };
1
+ import "./index484.js";
@@ -1,17 +1,18 @@
1
1
  import { useMoniteContext as e } from "./index47.js";
2
- import { toast as t } from "react-hot-toast";
3
- import { useLingui as n } from "@lingui/react";
2
+ import { messageWithTruncatedName as t } from "./index479.js";
3
+ import { toast as n } from "react-hot-toast";
4
+ import { useLingui as r } from "@lingui/react";
4
5
  //#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index486.js
5
- var r = (r) => {
6
- let { api: i, queryClient: a } = e(), { i18n: o } = n();
7
- return i.finops.deleteMeasureUnitsId.useMutation(void 0, {
8
- onSuccess: async () => {
9
- r && (await i.finops.getMeasureUnits.invalidateQueries(a), t.success(o._("Unit {name} was deleted from the list.", { name: r })));
6
+ var i = (i) => {
7
+ let { api: a, queryClient: o } = e(), { i18n: s } = r();
8
+ return a.finops.postProducts.useMutation(void 0, {
9
+ onSuccess: async (e) => {
10
+ i?.(e), await a.finops.getProducts.invalidateQueries(o), n.success(t(s._("{name} has been added to the list.", { name: "\0" }), e.name));
10
11
  },
11
- onError: (e) => {
12
- console.error(e), t.error(o._("Failed to delete Unit."));
12
+ onError: () => {
13
+ n.error(s._("Failed to create"));
13
14
  }
14
15
  });
15
16
  };
16
17
  //#endregion
17
- export { r as useDeleteMeasureUnit };
18
+ export { i as useCreateProduct };
@@ -1,8 +1,18 @@
1
1
  import { useMoniteContext as e } from "./index47.js";
2
+ import { messageWithTruncatedName as t } from "./index479.js";
3
+ import { toast as n } from "react-hot-toast";
4
+ import { useLingui as r } from "@lingui/react";
2
5
  //#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index487.js
3
- var t = (t, n = !0) => {
4
- let { api: r } = e();
5
- return r.finops.getProductsId.useQuery({ path: { product_id: t } }, { enabled: n });
6
+ var i = (i) => {
7
+ let { api: a, queryClient: o } = e(), { i18n: s } = r();
8
+ return a.finops.deleteMeasureUnitsId.useMutation(void 0, {
9
+ onSuccess: async () => {
10
+ i && (await a.finops.getMeasureUnits.invalidateQueries(o), n.success(t(s._("Unit {name} was deleted from the list.", { name: "\0" }), i)));
11
+ },
12
+ onError: (e) => {
13
+ console.error(e), n.error(s._("Failed to delete Unit."));
14
+ }
15
+ });
6
16
  };
7
17
  //#endregion
8
- export { t as useGetProductById };
18
+ export { i as useDeleteMeasureUnit };
@@ -1,17 +1,8 @@
1
1
  import { useMoniteContext as e } from "./index47.js";
2
- import { toast as t } from "react-hot-toast";
3
- import { useLingui as n } from "@lingui/react";
4
2
  //#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index488.js
5
- var r = (r, i) => {
6
- let { i18n: a } = n(), { api: o, queryClient: s } = e();
7
- return o.finops.deleteProductsId.useMutation({ path: { product_id: r } }, {
8
- onSuccess: async () => {
9
- await o.finops.getProducts.invalidateQueries(s), t.success(a._("Product was deleted.")), i?.();
10
- },
11
- onError: () => {
12
- t.error(a._("Failed to delete product."));
13
- }
14
- });
3
+ var t = (t, n = !0) => {
4
+ let { api: r } = e();
5
+ return r.finops.getProductsId.useQuery({ path: { product_id: t } }, { enabled: n });
15
6
  };
16
7
  //#endregion
17
- export { r as useDeleteProduct };
8
+ export { t as useGetProductById };
@@ -2,16 +2,16 @@ import { useMoniteContext as e } from "./index47.js";
2
2
  import { toast as t } from "react-hot-toast";
3
3
  import { useLingui as n } from "@lingui/react";
4
4
  //#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index489.js
5
- var r = (r) => {
6
- let { i18n: i } = n(), { api: a, queryClient: o } = e();
7
- return a.finops.patchProductsId.useMutation({ path: { product_id: r } }, {
8
- onSuccess: async (e) => {
9
- await a.finops.getProducts.invalidateQueries(o), await a.finops.getProductsId.invalidateQueries({ parameters: { path: { product_id: e.id } } }, o), t.success(e.type === "product" ? i._("Product {name} was updated.", { name: e.name }) : i._("Service {name} was updated.", { name: e.name }));
5
+ var r = (r, i) => {
6
+ let { i18n: a } = n(), { api: o, queryClient: s } = e();
7
+ return o.finops.deleteProductsId.useMutation({ path: { product_id: r } }, {
8
+ onSuccess: async () => {
9
+ await o.finops.getProducts.invalidateQueries(s), t.success(a._("Product was deleted.")), i?.();
10
10
  },
11
11
  onError: () => {
12
- t.error(i._("Failed to update"));
12
+ t.error(a._("Failed to delete product."));
13
13
  }
14
14
  });
15
15
  };
16
16
  //#endregion
17
- export { r as useUpdateProduct };
17
+ export { r as useDeleteProduct };
@@ -1,9 +1,18 @@
1
- import "./index387.js";
2
- import "./index458.js";
3
- import "./index479.js";
4
- import "./index480.js";
5
- import "./index486.js";
6
- import "./index485.js";
7
- import "./index487.js";
8
- import "./index488.js";
9
- import "./index489.js";
1
+ import { useMoniteContext as e } from "./index47.js";
2
+ import { messageWithTruncatedName as t } from "./index479.js";
3
+ import { toast as n } from "react-hot-toast";
4
+ import { useLingui as r } from "@lingui/react";
5
+ //#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index490.js
6
+ var i = (i) => {
7
+ let { i18n: a } = r(), { api: o, queryClient: s } = e();
8
+ return o.finops.patchProductsId.useMutation({ path: { product_id: i } }, {
9
+ onSuccess: async (e) => {
10
+ await o.finops.getProducts.invalidateQueries(s), await o.finops.getProductsId.invalidateQueries({ parameters: { path: { product_id: e.id } } }, s), n.success(t(e.type === "product" ? a._("Product {name} was updated.", { name: "\0" }) : a._("Service {name} was updated.", { name: "\0" }), e.name));
11
+ },
12
+ onError: () => {
13
+ n.error(a._("Failed to update"));
14
+ }
15
+ });
16
+ };
17
+ //#endregion
18
+ export { i as useUpdateProduct };
@@ -1,106 +1,9 @@
1
- import { InputGroup as e, InputGroupAddon as t, InputGroupInput as n } from "./index107.js";
2
- import { useDebounceCallback as r } from "./index213.js";
3
- import { Table as i, TableBody as a, TableCell as o, TableHead as s, TableHeader as c, TableRow as l } from "./index250.js";
4
- import { useGetMeasureUnits as u } from "./index458.js";
5
- import { MeasureUnitsFormRow as d } from "./index481.js";
6
- import { ConfirmDeleteMeasureUnitDialog as f } from "./index482.js";
7
- import { TableActions as p } from "./index483.js";
8
- import "./index484.js";
9
- import { useDeleteMeasureUnit as m } from "./index486.js";
1
+ import "./index387.js";
2
+ import "./index458.js";
3
+ import "./index480.js";
4
+ import "./index481.js";
5
+ import "./index487.js";
6
+ import "./index486.js";
7
+ import "./index488.js";
8
+ import "./index489.js";
10
9
  import "./index490.js";
11
- import { useCallback as h, useState as g } from "react";
12
- import { Loader2 as _, Search as v } from "lucide-react";
13
- import { Fragment as y, jsx as b, jsxs as x } from "@emotion/react/jsx-runtime";
14
- import { useLingui as S } from "@lingui/react";
15
- //#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index491.js
16
- var C = () => {
17
- let { i18n: C } = S(), [w, T] = g(null), [E, D] = g(null), O = !!E, [k, A] = g(""), { data: j, isLoading: M } = u(), N = m(E?.name), P = r((e) => {
18
- A(e);
19
- }, 500), F = j?.data?.filter((e) => e.name.toLowerCase().includes(k.toLowerCase()) || e.description && e.description.toLowerCase().includes(k.toLowerCase())) || [], I = h((e) => {
20
- D(e);
21
- }, []), L = h(() => {
22
- D(null);
23
- }, []), R = h(() => {
24
- E && N.mutate({ path: { unit_id: E.id } }, { onSuccess: () => L() });
25
- }, [
26
- N,
27
- E,
28
- L
29
- ]), z = N.isPending, B = () => {
30
- T(null);
31
- };
32
- return /* @__PURE__ */ x("div", {
33
- className: "ttw:flex ttw:flex-col ttw:gap-4 ttw:h-full ttw:relative",
34
- children: [M ? /* @__PURE__ */ b("div", {
35
- className: "ttw:flex ttw:justify-center ttw:items-center ttw:h-full",
36
- children: /* @__PURE__ */ b(_, { className: "ttw:size-10 ttw:animate-spin ttw:text-muted-foreground" })
37
- }) : /* @__PURE__ */ x(y, { children: [
38
- z && /* @__PURE__ */ b("div", {
39
- className: "ttw:absolute ttw:inset-0 ttw:bg-white/70 ttw:flex ttw:justify-center ttw:items-center ttw:z-10",
40
- children: /* @__PURE__ */ b(_, { className: "ttw:size-10 ttw:animate-spin ttw:text-muted-foreground" })
41
- }),
42
- /* @__PURE__ */ x(e, { children: [/* @__PURE__ */ b(t, {
43
- align: "inline-start",
44
- children: /* @__PURE__ */ b(v, {})
45
- }), /* @__PURE__ */ b(n, {
46
- placeholder: C._("Search"),
47
- onChange: (e) => P(e.target.value)
48
- })] }),
49
- /* @__PURE__ */ x(i, {
50
- className: "ttw:table-fixed ttw:border ttw:border-border ttw:rounded-md",
51
- children: [/* @__PURE__ */ b(c, { children: /* @__PURE__ */ x(l, {
52
- className: "ttw:hover:bg-transparent ttw:border-border",
53
- children: [
54
- /* @__PURE__ */ b(s, {
55
- className: "ttw:w-[35%]",
56
- children: C._("Unit label")
57
- }),
58
- /* @__PURE__ */ b(s, {
59
- className: "ttw:w-[55%]",
60
- children: C._("Description (optional)")
61
- }),
62
- /* @__PURE__ */ b(s, { className: "ttw:w-[10%]" })
63
- ]
64
- }) }), /* @__PURE__ */ x(a, { children: [/* @__PURE__ */ b(d, { isEditMode: !1 }), F.map((e) => w?.id === e.id ? /* @__PURE__ */ b(d, {
65
- isEditMode: !0,
66
- initialValues: e,
67
- onCancel: B,
68
- onEdit: () => T(null),
69
- id: e.id
70
- }, e.id) : /* @__PURE__ */ x(l, {
71
- className: "ttw:border-border",
72
- children: [
73
- /* @__PURE__ */ b(o, {
74
- className: "ttw:w-[35%] ttw:text-sm ttw:truncate",
75
- children: e.name
76
- }),
77
- /* @__PURE__ */ b(o, {
78
- className: "ttw:w-[55%] ttw:text-sm ttw:text-muted-foreground ttw:truncate",
79
- children: e.description || "—"
80
- }),
81
- /* @__PURE__ */ b(o, {
82
- className: "ttw:w-[10%]",
83
- children: /* @__PURE__ */ b(p, {
84
- permissions: {
85
- isUpdateAllowed: !0,
86
- isDeleteAllowed: !0
87
- },
88
- onEdit: () => T(e),
89
- onDelete: () => I(e)
90
- })
91
- })
92
- ]
93
- }, e.id))] })]
94
- })
95
- ] }), /* @__PURE__ */ b(f, {
96
- open: O,
97
- id: E?.id,
98
- name: E?.name || "",
99
- isLoading: z,
100
- onClose: L,
101
- onDelete: R
102
- })]
103
- });
104
- };
105
- //#endregion
106
- export { C as ManageMeasureUnitsForm };
@@ -1,39 +1,106 @@
1
- import { Button as e } from "./index56.js";
2
- import { Sheet as t, SheetContent as n, SheetDescription as r, SheetFooter as i, SheetHeader as a, SheetTitle as o } from "./index50.js";
3
- import { ManageMeasureUnitsForm as s } from "./index491.js";
4
- import { jsx as c, jsxs as l } from "@emotion/react/jsx-runtime";
5
- import { useLingui as u } from "@lingui/react";
1
+ import { InputGroup as e, InputGroupAddon as t, InputGroupInput as n } from "./index107.js";
2
+ import { useDebounceCallback as r } from "./index213.js";
3
+ import { Table as i, TableBody as a, TableCell as o, TableHead as s, TableHeader as c, TableRow as l } from "./index250.js";
4
+ import { useGetMeasureUnits as u } from "./index458.js";
5
+ import { MeasureUnitsFormRow as d } from "./index482.js";
6
+ import { ConfirmDeleteMeasureUnitDialog as f } from "./index483.js";
7
+ import { TableActions as p } from "./index484.js";
8
+ import "./index485.js";
9
+ import { useDeleteMeasureUnit as m } from "./index487.js";
10
+ import "./index491.js";
11
+ import { useCallback as h, useState as g } from "react";
12
+ import { Loader2 as _, Search as v } from "lucide-react";
13
+ import { Fragment as y, jsx as b, jsxs as x } from "@emotion/react/jsx-runtime";
14
+ import { useLingui as S } from "@lingui/react";
6
15
  //#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index492.js
7
- var d = ({ handleClose: d, open: f }) => {
8
- let { i18n: p } = u();
9
- return /* @__PURE__ */ c(t, {
10
- open: f,
11
- onOpenChange: d,
12
- children: /* @__PURE__ */ l(n, {
13
- side: "right",
14
- className: "ttw:gap-0 ttw:p-0",
15
- children: [
16
- /* @__PURE__ */ l(a, {
17
- className: "ttw:border-b ttw:border-border",
18
- children: [/* @__PURE__ */ c(o, { children: p._("Manage measure units") }), /* @__PURE__ */ c(r, {
19
- hidden: !0,
20
- children: p._("Manage measure units")
21
- })]
22
- }),
23
- /* @__PURE__ */ c("div", {
24
- className: "ttw:flex-1 ttw:overflow-y-auto ttw:px-6 ttw:py-4",
25
- children: /* @__PURE__ */ c(s, {})
26
- }),
27
- /* @__PURE__ */ c(i, {
28
- className: "ttw:border-t ttw:border-border ttw:flex-row ttw:justify-end",
29
- children: /* @__PURE__ */ c(e, {
30
- onClick: d,
31
- children: p._("Done")
32
- })
33
- })
34
- ]
35
- })
16
+ var C = () => {
17
+ let { i18n: C } = S(), [w, T] = g(null), [E, D] = g(null), O = !!E, [k, A] = g(""), { data: j, isLoading: M } = u(), N = m(E?.name), P = r((e) => {
18
+ A(e);
19
+ }, 500), F = j?.data?.filter((e) => e.name.toLowerCase().includes(k.toLowerCase()) || e.description && e.description.toLowerCase().includes(k.toLowerCase())) || [], I = h((e) => {
20
+ D(e);
21
+ }, []), L = h(() => {
22
+ D(null);
23
+ }, []), R = h(() => {
24
+ E && N.mutate({ path: { unit_id: E.id } }, { onSuccess: () => L() });
25
+ }, [
26
+ N,
27
+ E,
28
+ L
29
+ ]), z = N.isPending, B = () => {
30
+ T(null);
31
+ };
32
+ return /* @__PURE__ */ x("div", {
33
+ className: "ttw:flex ttw:flex-col ttw:gap-4 ttw:h-full ttw:relative",
34
+ children: [M ? /* @__PURE__ */ b("div", {
35
+ className: "ttw:flex ttw:justify-center ttw:items-center ttw:h-full",
36
+ children: /* @__PURE__ */ b(_, { className: "ttw:size-10 ttw:animate-spin ttw:text-muted-foreground" })
37
+ }) : /* @__PURE__ */ x(y, { children: [
38
+ z && /* @__PURE__ */ b("div", {
39
+ className: "ttw:absolute ttw:inset-0 ttw:bg-white/70 ttw:flex ttw:justify-center ttw:items-center ttw:z-10",
40
+ children: /* @__PURE__ */ b(_, { className: "ttw:size-10 ttw:animate-spin ttw:text-muted-foreground" })
41
+ }),
42
+ /* @__PURE__ */ x(e, { children: [/* @__PURE__ */ b(t, {
43
+ align: "inline-start",
44
+ children: /* @__PURE__ */ b(v, {})
45
+ }), /* @__PURE__ */ b(n, {
46
+ placeholder: C._("Search"),
47
+ onChange: (e) => P(e.target.value)
48
+ })] }),
49
+ /* @__PURE__ */ x(i, {
50
+ className: "ttw:table-fixed ttw:border ttw:border-border ttw:rounded-md",
51
+ children: [/* @__PURE__ */ b(c, { children: /* @__PURE__ */ x(l, {
52
+ className: "ttw:hover:bg-transparent ttw:border-border",
53
+ children: [
54
+ /* @__PURE__ */ b(s, {
55
+ className: "ttw:w-[35%]",
56
+ children: C._("Unit label")
57
+ }),
58
+ /* @__PURE__ */ b(s, {
59
+ className: "ttw:w-[55%]",
60
+ children: C._("Description (optional)")
61
+ }),
62
+ /* @__PURE__ */ b(s, { className: "ttw:w-[10%]" })
63
+ ]
64
+ }) }), /* @__PURE__ */ x(a, { children: [/* @__PURE__ */ b(d, { isEditMode: !1 }), F.map((e) => w?.id === e.id ? /* @__PURE__ */ b(d, {
65
+ isEditMode: !0,
66
+ initialValues: e,
67
+ onCancel: B,
68
+ onEdit: () => T(null),
69
+ id: e.id
70
+ }, e.id) : /* @__PURE__ */ x(l, {
71
+ className: "ttw:border-border",
72
+ children: [
73
+ /* @__PURE__ */ b(o, {
74
+ className: "ttw:w-[35%] ttw:text-sm ttw:truncate",
75
+ children: e.name
76
+ }),
77
+ /* @__PURE__ */ b(o, {
78
+ className: "ttw:w-[55%] ttw:text-sm ttw:text-muted-foreground ttw:truncate",
79
+ children: e.description || "—"
80
+ }),
81
+ /* @__PURE__ */ b(o, {
82
+ className: "ttw:w-[10%]",
83
+ children: /* @__PURE__ */ b(p, {
84
+ permissions: {
85
+ isUpdateAllowed: !0,
86
+ isDeleteAllowed: !0
87
+ },
88
+ onEdit: () => T(e),
89
+ onDelete: () => I(e)
90
+ })
91
+ })
92
+ ]
93
+ }, e.id))] })]
94
+ })
95
+ ] }), /* @__PURE__ */ b(f, {
96
+ open: O,
97
+ id: E?.id,
98
+ name: E?.name || "",
99
+ isLoading: z,
100
+ onClose: L,
101
+ onDelete: R
102
+ })]
36
103
  });
37
104
  };
38
105
  //#endregion
39
- export { d as ManageMeasureUnits };
106
+ export { C as ManageMeasureUnitsForm };
@@ -1,48 +1,39 @@
1
- import { Select as e, SelectContent as t, SelectItem as n, SelectTrigger as r, SelectValue as i } from "./index105.js";
2
- import { ManageMeasureUnits as a } from "./index492.js";
3
- import { useState as o } from "react";
4
- import { Plus as s } from "lucide-react";
5
- import { Fragment as c, jsx as l, jsxs as u } from "@emotion/react/jsx-runtime";
6
- import { useLingui as d } from "@lingui/react";
1
+ import { Button as e } from "./index56.js";
2
+ import { Sheet as t, SheetContent as n, SheetDescription as r, SheetFooter as i, SheetHeader as a, SheetTitle as o } from "./index50.js";
3
+ import { ManageMeasureUnitsForm as s } from "./index492.js";
4
+ import { jsx as c, jsxs as l } from "@emotion/react/jsx-runtime";
5
+ import { useLingui as u } from "@lingui/react";
7
6
  //#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index493.js
8
- var f = "__none__", p = ({ value: p, availableMeasureUnits: m, error: h, fieldError: g, disabled: _ = !1, onChange: v }) => {
9
- let { i18n: y } = d(), [b, x] = o(!1);
10
- return /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ u(e, {
11
- value: p || f,
12
- onValueChange: (e) => {
13
- if (e === "create") {
14
- x(!0);
15
- return;
16
- }
17
- v(e === f ? "" : e);
18
- },
19
- disabled: _,
20
- children: [/* @__PURE__ */ l(r, {
21
- "aria-invalid": h || !!g || void 0,
22
- className: "ttw:w-22",
23
- children: /* @__PURE__ */ l(i, {
24
- className: "ttw:truncate",
25
- placeholder: y._("Select")
26
- })
27
- }), /* @__PURE__ */ u(t, { children: [
28
- /* @__PURE__ */ u(n, {
29
- value: "create",
30
- className: "ttw:text-primary ttw:hover:text-primary ttw:font-semibold ttw:focus:text-primary",
31
- children: [/* @__PURE__ */ l(s, { className: "ttw:text-primary" }), y._("Manage measure units")]
32
- }),
33
- /* @__PURE__ */ l(n, {
34
- value: f,
35
- children: y._("None")
36
- }),
37
- m?.map((e) => /* @__PURE__ */ l(n, {
38
- value: e.id,
39
- children: e.name
40
- }, e.id))
41
- ] })]
42
- }), b && /* @__PURE__ */ l(a, {
43
- open: !0,
44
- handleClose: () => x(!1)
45
- })] });
7
+ var d = ({ handleClose: d, open: f }) => {
8
+ let { i18n: p } = u();
9
+ return /* @__PURE__ */ c(t, {
10
+ open: f,
11
+ onOpenChange: d,
12
+ children: /* @__PURE__ */ l(n, {
13
+ side: "right",
14
+ className: "ttw:gap-0 ttw:p-0",
15
+ children: [
16
+ /* @__PURE__ */ l(a, {
17
+ className: "ttw:border-b ttw:border-border",
18
+ children: [/* @__PURE__ */ c(o, { children: p._("Manage measure units") }), /* @__PURE__ */ c(r, {
19
+ hidden: !0,
20
+ children: p._("Manage measure units")
21
+ })]
22
+ }),
23
+ /* @__PURE__ */ c("div", {
24
+ className: "ttw:flex-1 ttw:overflow-y-auto ttw:px-6 ttw:py-4",
25
+ children: /* @__PURE__ */ c(s, {})
26
+ }),
27
+ /* @__PURE__ */ c(i, {
28
+ className: "ttw:border-t ttw:border-border ttw:flex-row ttw:justify-end",
29
+ children: /* @__PURE__ */ c(e, {
30
+ onClick: d,
31
+ children: p._("Done")
32
+ })
33
+ })
34
+ ]
35
+ })
36
+ });
46
37
  };
47
38
  //#endregion
48
- export { p as MeasureUnitField };
39
+ export { d as ManageMeasureUnits };
@@ -1,75 +1,48 @@
1
- import { Button as e } from "./index56.js";
2
- import { Checkbox as t } from "./index103.js";
3
- import { ItemSelector as n } from "./index475.js";
4
- import { PriceField as r } from "./index476.js";
5
- import { QuantityField as i } from "./index477.js";
6
- import { MeasureUnitField as a } from "./index493.js";
7
- import { memo as o } from "react";
8
- import { Trash2 as s } from "lucide-react";
9
- import { jsx as c, jsxs as l } from "@emotion/react/jsx-runtime";
1
+ import { Select as e, SelectContent as t, SelectItem as n, SelectTrigger as r, SelectValue as i } from "./index105.js";
2
+ import { ManageMeasureUnits as a } from "./index493.js";
3
+ import { useState as o } from "react";
4
+ import { Plus as s } from "lucide-react";
5
+ import { Fragment as c, jsx as l, jsxs as u } from "@emotion/react/jsx-runtime";
6
+ import { useLingui as d } from "@lingui/react";
10
7
  //#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index494.js
11
- var u = o(({ index: o, control: u, errors: d, defaultCurrency: f = "USD", measureUnitsData: p, container: m, onRequestLineItemValue: h, onLineItemValueChange: g, onUpdateItem: _, onRemoveItem: v, canRemove: y, autoFocusName: b = !1 }) => {
12
- let x = !!d.line_items?.[o]?.product?.name, S = !!d.line_items?.[o]?.quantity, C = !!d.line_items?.[o]?.product?.price?.value, w = h("product.name"), T = !!(w && w.trim()), E = d.line_items?.[o]?.product?.measure_unit_id;
13
- return /* @__PURE__ */ l("li", {
14
- className: "ttw:flex ttw:items-center ttw:gap-2.5 ttw:h-9",
15
- children: [
16
- /* @__PURE__ */ c("div", {
17
- className: "ttw:flex-1 ttw:min-w-30",
18
- children: /* @__PURE__ */ c(n, {
19
- onChange: (e, t) => _(o, e, t),
20
- fieldName: h("product.name") || "",
21
- index: o,
22
- error: x,
23
- autoFocus: b,
24
- defaultCurrency: f,
25
- measureUnits: p,
26
- container: m
27
- })
8
+ var f = "__none__", p = ({ value: p, availableMeasureUnits: m, error: h, fieldError: g, disabled: _ = !1, onChange: v }) => {
9
+ let { i18n: y } = d(), [b, x] = o(!1);
10
+ return /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ u(e, {
11
+ value: p || f,
12
+ onValueChange: (e) => {
13
+ if (e === "create") {
14
+ x(!0);
15
+ return;
16
+ }
17
+ v(e === f ? "" : e);
18
+ },
19
+ disabled: _,
20
+ children: [/* @__PURE__ */ l(r, {
21
+ "aria-invalid": h || !!g || void 0,
22
+ className: "ttw:w-22",
23
+ children: /* @__PURE__ */ l(i, {
24
+ className: "ttw:truncate",
25
+ placeholder: y._("Select")
26
+ })
27
+ }), /* @__PURE__ */ u(t, { children: [
28
+ /* @__PURE__ */ u(n, {
29
+ value: "create",
30
+ className: "ttw:text-primary ttw:hover:text-primary ttw:font-semibold ttw:focus:text-primary",
31
+ children: [/* @__PURE__ */ l(s, { className: "ttw:text-primary" }), y._("Manage measure units")]
28
32
  }),
29
- /* @__PURE__ */ c("div", { children: /* @__PURE__ */ c(i, {
30
- index: o,
31
- control: u,
32
- quantityError: S,
33
- canRemove: y,
34
- hasProduct: T,
35
- onLineItemValueChange: g,
36
- onRemoveItem: v
37
- }) }),
38
- /* @__PURE__ */ c("div", { children: /* @__PURE__ */ c(a, {
39
- value: h("product.measure_unit_id"),
40
- onChange: (e) => {
41
- g("product.measure_unit_id", e, { shouldValidate: !0 });
42
- },
43
- availableMeasureUnits: p?.data || [],
44
- fieldError: E
45
- }) }),
46
- /* @__PURE__ */ c("div", { children: /* @__PURE__ */ c(r, {
47
- error: C,
48
- currency: f,
49
- value: h("product.price.value"),
50
- onChange: (e) => {
51
- g("product.price.value", e, { shouldValidate: !0 });
52
- }
53
- }) }),
54
- /* @__PURE__ */ c("div", {
55
- className: "ttw:w-12 ttw:min-w-12 ttw:flex ttw:items-center ttw:justify-center",
56
- children: /* @__PURE__ */ c(t, {
57
- checked: h("taxable") ?? !1,
58
- onCheckedChange: (e) => {
59
- g("taxable", e === !0);
60
- }
61
- })
33
+ /* @__PURE__ */ l(n, {
34
+ value: f,
35
+ children: y._("None")
62
36
  }),
63
- y && /* @__PURE__ */ c(e, {
64
- type: "button",
65
- variant: "ghost",
66
- size: "sm",
67
- className: "ttw:w-10 ttw:text-muted-foreground ttw:hover:bg-transparent ttw:hover:text-destructive ttw:border-l ttw:border-border ttw:pl-4 ttw:rounded-none ttw:has-[>svg]:pr-0",
68
- onClick: () => v(o),
69
- children: /* @__PURE__ */ c(s, {})
70
- })
71
- ]
72
- });
73
- });
37
+ m?.map((e) => /* @__PURE__ */ l(n, {
38
+ value: e.id,
39
+ children: e.name
40
+ }, e.id))
41
+ ] })]
42
+ }), b && /* @__PURE__ */ l(a, {
43
+ open: !0,
44
+ handleClose: () => x(!1)
45
+ })] });
46
+ };
74
47
  //#endregion
75
- export { u as InvoiceItemRow };
48
+ export { p as MeasureUnitField };