@tesouro/embedded-components-react 0.7.29 → 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.
- package/dist/lib/monite-sdk.d.ts +0 -1
- package/dist/lib/monite-sdk.js +40 -40
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index.js +41 -41
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index204.js +55 -13
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index205.js +2 -55
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index206.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index207.js +0 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index208.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index209.js +10 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index210.js +53 -7
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index211.js +36 -51
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index212.js +71 -38
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index213.js +6 -73
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index214.js +2 -7
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index215.js +79 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index216.js +1 -79
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index217.js +58 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index218.js +42 -56
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index219.js +1 -44
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index220.js +568 -0
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index221.js +0 -577
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index222.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index223.js +160 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index224.js +0 -159
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index225.js +26 -0
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index226.js +0 -26
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index227.js +12 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index228.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index229.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index230.js +16 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index231.js +19 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index232.js +27 -19
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index233.js +1 -29
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index234.js +93 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index235.js +10 -91
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index236.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index237.js +18 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index238.js +73 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index239.js +1 -77
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index240.js +127 -0
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index241.js +0 -127
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index242.js +13 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index243.js +54 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index244.js +5 -56
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index245.js +1 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index246.js +64 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index247.js +120 -62
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index248.js +21 -120
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index249.js +6 -21
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index250.js +35 -6
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index251.js +6 -34
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index252.js +56 -7
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index253.js +69 -53
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index254.js +25 -71
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index255.js +1 -28
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index256.js +61 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index257.js +17 -57
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index258.js +19 -18
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index259.js +181 -18
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index260.js +1 -185
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index261.js +31 -0
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index262.js +2 -31
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index263.js +64 -3
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index264.js +31 -61
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index265.js +6 -28
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index266.js +29 -7
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index267.js +42 -29
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index268.js +11 -44
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index269.js +15 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index270.js +4 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index271.js +8 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index272.js +10 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index273.js +12 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index274.js +6 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index275.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index276.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index277.js +8 -6
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index278.js +32 -8
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index279.js +8 -32
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index280.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index281.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index282.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index283.js +20 -18
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index284.js +7 -20
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index285.js +111 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index286.js +62 -110
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index287.js +1 -66
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index288.js +199 -0
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index289.js +0 -199
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index290.js +11 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index291.js +38 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index292.js +6 -38
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index293.js +9 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index294.js +13 -6
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index295.js +7 -17
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index296.js +5 -7
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index297.js +359 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index298.js +1 -412
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index299.js +22 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index300.js +91 -18
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index301.js +18 -91
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index302.js +7 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index303.js +2 -18
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index304.js +182 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index305.js +96 -178
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index306.js +1 -102
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index307.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index308.js +55 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index309.js +44 -53
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index310.js +1 -46
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index311.js +21 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index312.js +1 -21
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index313.js +161 -0
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index314.js +0 -161
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index315.js +12 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index316.js +61 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index317.js +44 -60
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index318.js +48 -44
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index319.js +82 -48
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index320.js +7 -83
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index321.js +305 -7
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index322.js +1 -307
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index323.js +32 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index324.js +1 -32
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index325.js +29 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index326.js +1 -29
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index327.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index328.js +160 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index329.js +0 -160
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index330.js +37 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index331.js +33 -34
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index332.js +3 -33
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index333.js +102 -3
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index334.js +172 -88
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index335.js +116 -171
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index336.js +191 -114
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index337.js +11 -209
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index338.js +15 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index339.js +28 -14
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index340.js +1 -31
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index341.js +241 -0
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index342.js +0 -241
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index343.js +36 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index344.js +138 -32
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index345.js +1 -142
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index346.js +166 -0
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index347.js +25 -166
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index348.js +19 -26
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index349.js +17 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index350.js +5 -17
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index351.js +14 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index352.js +18 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index353.js +9 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index354.js +5 -21
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index355.js +13 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index356.js +14 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index357.js +9 -20
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index358.js +26 -8
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index359.js +11 -23
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index360.js +8 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index361.js +24 -8
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index362.js +14 -25
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index363.js +13 -13
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index364.js +100 -14
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index365.js +42 -98
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index366.js +27 -43
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index367.js +1 -30
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index368.js +105 -0
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index369.js +35 -102
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index370.js +166 -32
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index371.js +202 -163
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index372.js +87 -207
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index373.js +17 -90
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index374.js +158 -17
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index375.js +87 -143
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index376.js +42 -100
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index377.js +4 -46
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index378.js +24 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index379.js +73 -20
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index380.js +16 -74
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index381.js +19 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index382.js +5 -19
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index383.js +8 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index384.js +11 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index385.js +131 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index386.js +4 -129
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index387.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index388.js +5 -8
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index389.js +221 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index390.js +31 -219
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index391.js +11 -31
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index392.js +34 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index393.js +180 -32
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index394.js +14 -182
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index395.js +204 -14
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index396.js +88 -192
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index397.js +61 -97
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index398.js +54 -63
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index399.js +83 -46
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index400.js +40 -91
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index401.js +75 -39
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index402.js +71 -63
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index403.js +12 -85
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index404.js +24 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index405.js +16 -25
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index406.js +2 -14
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index407.js +23 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index408.js +0 -23
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index409.js +52 -0
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index410.js +32 -53
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index411.js +2 -30
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index412.js +34 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index413.js +15 -33
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index414.js +29 -14
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index415.js +27 -29
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index416.js +2 -31
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index417.js +97 -2
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/package.json +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index418.js +0 -97
|
@@ -1,212 +1,92 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import { Label as m } from "./index87.js";
|
|
7
|
-
import { Field as h, FieldContent as g, FieldError as _, FieldLabel as v } from "./index88.js";
|
|
8
|
-
import { RadioGroup as y, RadioGroupItem as b } from "./index90.js";
|
|
1
|
+
import { applyAPIValidationErrors as e, parseAPIValidationErrors as t } from "./index25.js";
|
|
2
|
+
import { useCurrencies as n } from "./index63.js";
|
|
3
|
+
import { Button as r } from "./index56.js";
|
|
4
|
+
import { LoadingSpinner as i } from "./index51.js";
|
|
5
|
+
import "./index52.js";
|
|
9
6
|
import "./index173.js";
|
|
10
|
-
import {
|
|
11
|
-
import "./
|
|
12
|
-
import "./
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import { jsx as
|
|
16
|
-
import { useLingui as
|
|
17
|
-
import {
|
|
7
|
+
import { useUpdateProduct as a } from "./index356.js";
|
|
8
|
+
import { PRODUCT_API_FIELD_MAP as o } from "./index360.js";
|
|
9
|
+
import { getProductValidationSchema as s } from "./index363.js";
|
|
10
|
+
import { ProductFormContent as c } from "./index371.js";
|
|
11
|
+
import { useCallback as l, useId as u, useMemo as d } from "react";
|
|
12
|
+
import { jsx as f, jsxs as p } from "@emotion/react/jsx-runtime";
|
|
13
|
+
import { useLingui as m } from "@lingui/react";
|
|
14
|
+
import { FormProvider as h, useForm as g } from "react-hook-form";
|
|
15
|
+
import { zodResolver as _ } from "@hookform/resolvers/zod";
|
|
18
16
|
//#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index372.js
|
|
19
|
-
var
|
|
20
|
-
let { i18n:
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
render: ({ field: e, fieldState: { error: n } }) => /* @__PURE__ */ E(h, { children: /* @__PURE__ */ D(g, { children: [
|
|
92
|
-
/* @__PURE__ */ E(v, {
|
|
93
|
-
htmlFor: e.name,
|
|
94
|
-
children: P._("Name")
|
|
95
|
-
}),
|
|
96
|
-
/* @__PURE__ */ E(t, {
|
|
97
|
-
...e,
|
|
98
|
-
id: e.name,
|
|
99
|
-
placeholder: P._("e.g. House blend espresso beans"),
|
|
100
|
-
className: M ? "ttw:bg-white" : "",
|
|
101
|
-
disabled: j,
|
|
102
|
-
"aria-invalid": !!n || void 0
|
|
103
|
-
}),
|
|
104
|
-
/* @__PURE__ */ E(_, { errors: [n] })
|
|
105
|
-
] }) })
|
|
106
|
-
}),
|
|
107
|
-
/* @__PURE__ */ D("div", {
|
|
108
|
-
className: "ttw:w-1/2 ttw:flex ttw:flex-col ttw:gap-1.5",
|
|
109
|
-
children: [
|
|
110
|
-
/* @__PURE__ */ E(v, { children: P._("Price per unit") }),
|
|
111
|
-
/* @__PURE__ */ D("div", {
|
|
112
|
-
className: T("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"),
|
|
113
|
-
ref: I,
|
|
114
|
-
children: [
|
|
115
|
-
/* @__PURE__ */ E(k, {
|
|
116
|
-
name: "pricePerUnit",
|
|
117
|
-
control: z,
|
|
118
|
-
render: ({ field: e, fieldState: { error: t } }) => /* @__PURE__ */ D(n, {
|
|
119
|
-
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",
|
|
120
|
-
children: [/* @__PURE__ */ E(r, {
|
|
121
|
-
align: "inline-start",
|
|
122
|
-
children: F("USD")
|
|
123
|
-
}), /* @__PURE__ */ E(i, {
|
|
124
|
-
type: "number",
|
|
125
|
-
name: e.name,
|
|
126
|
-
ref: e.ref,
|
|
127
|
-
value: e.value ?? "",
|
|
128
|
-
onChange: (t) => e.onChange(t.target.value === "" ? void 0 : Number(t.target.value)),
|
|
129
|
-
className: "ttw:text-end",
|
|
130
|
-
onBlur: e.onBlur,
|
|
131
|
-
placeholder: "0.00",
|
|
132
|
-
"aria-invalid": !!t || void 0,
|
|
133
|
-
disabled: j
|
|
134
|
-
})]
|
|
135
|
-
})
|
|
136
|
-
}),
|
|
137
|
-
/* @__PURE__ */ E("div", { className: "ttw:w-px ttw:shrink-0 ttw:bg-border" }),
|
|
138
|
-
/* @__PURE__ */ E(k, {
|
|
139
|
-
name: "measureUnitId",
|
|
140
|
-
control: z,
|
|
141
|
-
render: ({ field: e, fieldState: { error: t } }) => /* @__PURE__ */ D(o, {
|
|
142
|
-
value: e.value ?? null,
|
|
143
|
-
onValueChange: (t) => e.onChange(t ?? void 0),
|
|
144
|
-
items: V,
|
|
145
|
-
itemToStringLabel: U,
|
|
146
|
-
disabled: j,
|
|
147
|
-
children: [/* @__PURE__ */ E(u, {
|
|
148
|
-
showClear: !!e.value,
|
|
149
|
-
placeholder: "-",
|
|
150
|
-
disabled: j,
|
|
151
|
-
"aria-invalid": !!t || void 0,
|
|
152
|
-
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"
|
|
153
|
-
}), /* @__PURE__ */ E(c, {
|
|
154
|
-
container: I.current,
|
|
155
|
-
children: /* @__PURE__ */ D(f, { children: [/* @__PURE__ */ E(l, { children: P._("No units found") }), /* @__PURE__ */ E(s, { children: (e) => /* @__PURE__ */ E(d, {
|
|
156
|
-
value: e,
|
|
157
|
-
children: U(e)
|
|
158
|
-
}, e) })] })
|
|
159
|
-
})]
|
|
160
|
-
})
|
|
161
|
-
})
|
|
162
|
-
]
|
|
163
|
-
}),
|
|
164
|
-
/* @__PURE__ */ E(_, { errors: [B.pricePerUnit, B.measureUnitId] })
|
|
165
|
-
]
|
|
166
|
-
}),
|
|
167
|
-
/* @__PURE__ */ E(k, {
|
|
168
|
-
name: "description",
|
|
169
|
-
control: z,
|
|
170
|
-
render: ({ field: e, fieldState: { error: t } }) => /* @__PURE__ */ E(h, {
|
|
171
|
-
className: "ttw:block",
|
|
172
|
-
children: /* @__PURE__ */ D(g, { children: [
|
|
173
|
-
/* @__PURE__ */ D(v, {
|
|
174
|
-
htmlFor: e.name,
|
|
175
|
-
className: "ttw:gap-1",
|
|
176
|
-
children: [P._("Description"), /* @__PURE__ */ E(p, {
|
|
177
|
-
variant: "body2",
|
|
178
|
-
color: "muted",
|
|
179
|
-
className: "ttw:leading-snug",
|
|
180
|
-
children: P._("(optional)")
|
|
181
|
-
})]
|
|
182
|
-
}),
|
|
183
|
-
/* @__PURE__ */ D(n, {
|
|
184
|
-
className: T(M && "ttw:bg-white"),
|
|
185
|
-
children: [/* @__PURE__ */ E(a, {
|
|
186
|
-
...e,
|
|
187
|
-
id: e.name,
|
|
188
|
-
placeholder: P._("e.g. 16oz whole bean, medium-dark roast, ground to order"),
|
|
189
|
-
rows: 4,
|
|
190
|
-
maxLength: 255,
|
|
191
|
-
disabled: j,
|
|
192
|
-
"aria-invalid": !!t || void 0
|
|
193
|
-
}), /* @__PURE__ */ E(r, {
|
|
194
|
-
align: "block-end",
|
|
195
|
-
className: "ttw:cursor-default",
|
|
196
|
-
children: /* @__PURE__ */ E(p, {
|
|
197
|
-
variant: "caption",
|
|
198
|
-
color: "muted",
|
|
199
|
-
className: "ttw:leading-none",
|
|
200
|
-
children: P._("{count}/255 characters", { count: (e.value ?? "").length })
|
|
201
|
-
})
|
|
202
|
-
})]
|
|
203
|
-
}),
|
|
204
|
-
/* @__PURE__ */ E(_, { errors: [t] })
|
|
205
|
-
] })
|
|
206
|
-
})
|
|
207
|
-
})
|
|
208
|
-
]
|
|
17
|
+
var v = ({ product: v, handleClose: y, onUpdate: b }) => {
|
|
18
|
+
let { i18n: x } = m(), { formatToMinorUnits: S, formatFromMinorUnits: C } = n(), w = `product-edit-form-${u()}`, { mutate: T, isPending: E } = a(v.id), D = d(() => ({
|
|
19
|
+
name: v.name,
|
|
20
|
+
type: v.type ?? "product",
|
|
21
|
+
pricePerUnit: C(v.price?.value, v.price?.currency) ?? void 0,
|
|
22
|
+
currency: v.price?.currency ?? "USD",
|
|
23
|
+
description: v.description ?? "",
|
|
24
|
+
measureUnitId: v.measure_unit_id ?? void 0
|
|
25
|
+
}), [
|
|
26
|
+
v.name,
|
|
27
|
+
v.type,
|
|
28
|
+
v.price?.value,
|
|
29
|
+
v.price?.currency,
|
|
30
|
+
v.description,
|
|
31
|
+
v.measure_unit_id,
|
|
32
|
+
C
|
|
33
|
+
]), O = g({
|
|
34
|
+
resolver: _(s(x)),
|
|
35
|
+
defaultValues: D
|
|
36
|
+
}), k = l((n) => {
|
|
37
|
+
n.preventDefault(), n.stopPropagation(), O.handleSubmit((n) => {
|
|
38
|
+
T({
|
|
39
|
+
name: n.name,
|
|
40
|
+
type: n.type,
|
|
41
|
+
price: {
|
|
42
|
+
value: S(n.pricePerUnit, n.currency) ?? n.pricePerUnit,
|
|
43
|
+
currency: n.currency
|
|
44
|
+
},
|
|
45
|
+
description: n.description,
|
|
46
|
+
...n.measureUnitId ? { measure_unit_id: n.measureUnitId } : {}
|
|
47
|
+
}, {
|
|
48
|
+
onSuccess: (e) => {
|
|
49
|
+
b?.(e);
|
|
50
|
+
},
|
|
51
|
+
onError: (n) => {
|
|
52
|
+
e(O.setError, t(n), { fieldMap: o });
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
})(n);
|
|
56
|
+
}, [
|
|
57
|
+
T,
|
|
58
|
+
S,
|
|
59
|
+
b,
|
|
60
|
+
O.handleSubmit,
|
|
61
|
+
O.setError
|
|
62
|
+
]);
|
|
63
|
+
return /* @__PURE__ */ f(h, {
|
|
64
|
+
...O,
|
|
65
|
+
children: /* @__PURE__ */ p("form", {
|
|
66
|
+
id: w,
|
|
67
|
+
onSubmit: k,
|
|
68
|
+
className: "ttw:flex ttw:flex-col ttw:gap-4 ttw:p-4 ttw:border ttw:border-primary ttw:rounded-[10px] ttw:bg-zinc-100",
|
|
69
|
+
children: [/* @__PURE__ */ f(c, {
|
|
70
|
+
isLoading: E,
|
|
71
|
+
isProduct: v?.type === "product",
|
|
72
|
+
isEditMode: !0
|
|
73
|
+
}), /* @__PURE__ */ p("div", {
|
|
74
|
+
className: "ttw:flex ttw:gap-4 ttw:pt-6",
|
|
75
|
+
children: [/* @__PURE__ */ f(r, {
|
|
76
|
+
type: "button",
|
|
77
|
+
variant: "outline",
|
|
78
|
+
className: "ttw:border-border ttw:flex-1",
|
|
79
|
+
onClick: y,
|
|
80
|
+
children: x._("Cancel")
|
|
81
|
+
}), /* @__PURE__ */ p(r, {
|
|
82
|
+
type: "submit",
|
|
83
|
+
className: "ttw:flex-1",
|
|
84
|
+
disabled: E || !O.formState.isDirty,
|
|
85
|
+
children: [E && /* @__PURE__ */ f(i, { className: "ttw:border-white ttw:border-t-transparent ttw:size-4" }), x._("Save")]
|
|
86
|
+
})]
|
|
87
|
+
})]
|
|
88
|
+
})
|
|
209
89
|
});
|
|
210
90
|
};
|
|
211
91
|
//#endregion
|
|
212
|
-
export {
|
|
92
|
+
export { v as ProductEditForm };
|
|
@@ -1,92 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { LoadingSpinner as i } from "./index51.js";
|
|
5
|
-
import "./index52.js";
|
|
6
|
-
import "./index173.js";
|
|
7
|
-
import { useUpdateProduct as a } from "./index357.js";
|
|
8
|
-
import { PRODUCT_API_FIELD_MAP as o } from "./index361.js";
|
|
9
|
-
import { getProductValidationSchema as s } from "./index364.js";
|
|
10
|
-
import { ProductFormContent as c } from "./index372.js";
|
|
11
|
-
import { useCallback as l, useId as u, useMemo as d } from "react";
|
|
12
|
-
import { jsx as f, jsxs as p } from "@emotion/react/jsx-runtime";
|
|
13
|
-
import { useLingui as m } from "@lingui/react";
|
|
14
|
-
import { FormProvider as h, useForm as g } from "react-hook-form";
|
|
15
|
-
import { zodResolver as _ } from "@hookform/resolvers/zod";
|
|
1
|
+
import { Typography as e } from "./index62.js";
|
|
2
|
+
import { twMerge as t } from "tailwind-merge";
|
|
3
|
+
import { jsx as n, jsxs as r } from "@emotion/react/jsx-runtime";
|
|
16
4
|
//#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index373.js
|
|
17
|
-
var
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
v.description,
|
|
31
|
-
v.measure_unit_id,
|
|
32
|
-
C
|
|
33
|
-
]), O = g({
|
|
34
|
-
resolver: _(s(x)),
|
|
35
|
-
defaultValues: D
|
|
36
|
-
}), k = l((n) => {
|
|
37
|
-
n.preventDefault(), n.stopPropagation(), O.handleSubmit((n) => {
|
|
38
|
-
T({
|
|
39
|
-
name: n.name,
|
|
40
|
-
type: n.type,
|
|
41
|
-
price: {
|
|
42
|
-
value: S(n.pricePerUnit, n.currency) ?? n.pricePerUnit,
|
|
43
|
-
currency: n.currency
|
|
44
|
-
},
|
|
45
|
-
description: n.description,
|
|
46
|
-
...n.measureUnitId ? { measure_unit_id: n.measureUnitId } : {}
|
|
47
|
-
}, {
|
|
48
|
-
onSuccess: (e) => {
|
|
49
|
-
b?.(e);
|
|
50
|
-
},
|
|
51
|
-
onError: (n) => {
|
|
52
|
-
e(O.setError, t(n), { fieldMap: o });
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
})(n);
|
|
56
|
-
}, [
|
|
57
|
-
T,
|
|
58
|
-
S,
|
|
59
|
-
b,
|
|
60
|
-
O.handleSubmit,
|
|
61
|
-
O.setError
|
|
62
|
-
]);
|
|
63
|
-
return /* @__PURE__ */ f(h, {
|
|
64
|
-
...O,
|
|
65
|
-
children: /* @__PURE__ */ p("form", {
|
|
66
|
-
id: w,
|
|
67
|
-
onSubmit: k,
|
|
68
|
-
className: "ttw:flex ttw:flex-col ttw:gap-4 ttw:p-4 ttw:border ttw:border-primary ttw:rounded-[10px] ttw:bg-zinc-100",
|
|
69
|
-
children: [/* @__PURE__ */ f(c, {
|
|
70
|
-
isLoading: E,
|
|
71
|
-
isProduct: v?.type === "product",
|
|
72
|
-
isEditMode: !0
|
|
73
|
-
}), /* @__PURE__ */ p("div", {
|
|
74
|
-
className: "ttw:flex ttw:gap-4 ttw:pt-6",
|
|
75
|
-
children: [/* @__PURE__ */ f(r, {
|
|
76
|
-
type: "button",
|
|
77
|
-
variant: "outline",
|
|
78
|
-
className: "ttw:border-border ttw:flex-1",
|
|
79
|
-
onClick: y,
|
|
80
|
-
children: x._("Cancel")
|
|
81
|
-
}), /* @__PURE__ */ p(r, {
|
|
82
|
-
type: "submit",
|
|
83
|
-
className: "ttw:flex-1",
|
|
84
|
-
disabled: E || !O.formState.isDirty,
|
|
85
|
-
children: [E && /* @__PURE__ */ f(i, { className: "ttw:border-white ttw:border-t-transparent ttw:size-4" }), x._("Save")]
|
|
86
|
-
})]
|
|
87
|
-
})]
|
|
88
|
-
})
|
|
89
|
-
});
|
|
90
|
-
};
|
|
5
|
+
var i = ({ label: i, value: a, isLast: o }) => /* @__PURE__ */ r("li", {
|
|
6
|
+
className: t("ttw:flex ttw:gap-4 ttw:py-2.5", !o && "ttw:border-b ttw:border-border"),
|
|
7
|
+
children: [/* @__PURE__ */ n(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__ */ n(e, {
|
|
13
|
+
variant: "body2",
|
|
14
|
+
className: "ttw:font-medium",
|
|
15
|
+
children: a
|
|
16
|
+
}) : a]
|
|
17
|
+
});
|
|
91
18
|
//#endregion
|
|
92
|
-
export {
|
|
19
|
+
export { i as ProductDetailLine };
|
|
@@ -1,19 +1,160 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
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 "./index45.js";
|
|
4
|
+
import { useCurrencies as n } from "./index63.js";
|
|
5
|
+
import { Button as r } from "./index56.js";
|
|
6
|
+
import { MoniteScopedProviders as i } from "./index129.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 "./index111.js";
|
|
14
|
+
import { NotFound as y } from "./index132.js";
|
|
15
|
+
import { AccessRestriction as b } from "./index153.js";
|
|
16
|
+
import "./index327.js";
|
|
17
|
+
import { useGetProductById as x } from "./index354.js";
|
|
18
|
+
import { ProductDeleteModal as S } from "./index358.js";
|
|
19
|
+
import { ProductEditForm as C } from "./index372.js";
|
|
20
|
+
import { ProductDetailLine as w } from "./index373.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";
|
|
4
25
|
//#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index374.js
|
|
5
|
-
var i = ({
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
})
|
|
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
|
+
};
|
|
18
159
|
//#endregion
|
|
19
|
-
export {
|
|
160
|
+
export { N as ProductDetails };
|