@plurix/ecom-components 1.18.1 → 1.18.2
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/packages/Regionalization/components/Navigation.js +10 -10
- package/dist/packages/Regionalization/components/PickupPoint.js +18 -17
- package/dist/packages/Regionalization/components/SetViewButton.d.ts +2 -1
- package/dist/packages/Regionalization/components/SetViewButton.js +13 -11
- package/dist/packages/Regionalization/components/Title.js +11 -10
- package/dist/packages/Regionalization/views/AllStoresScreen.js +23 -22
- package/dist/packages/Regionalization/views/ConfirmScreen.js +11 -11
- package/dist/packages/Regionalization/views/InitialView.js +37 -29
- package/dist/packages/Regionalization/views/PickupPointInfoScreen.js +28 -19
- package/dist/packages/Regionalization/views/PostalCodeInputScreen.js +42 -33
- package/package.json +1 -1
|
@@ -4,20 +4,20 @@ import { ArrowIcon as C } from "../../../assets/svgs/ArrowIcon.js";
|
|
|
4
4
|
import { useRegionalizationContext as N } from "../context/RegionalizationContext.js";
|
|
5
5
|
import { deliverySetData as V } from "../utils/deliverySetData.js";
|
|
6
6
|
import { pickupSetData as j } from "../utils/pickupSetData.js";
|
|
7
|
-
const
|
|
7
|
+
const E = ({
|
|
8
8
|
moreInfosScreen: a,
|
|
9
9
|
pickuConfirmScreem: B
|
|
10
10
|
}) => {
|
|
11
11
|
const {
|
|
12
|
-
confirmButton:
|
|
13
|
-
textBackButton:
|
|
12
|
+
confirmButton: I,
|
|
13
|
+
textBackButton: x,
|
|
14
14
|
delivery: e,
|
|
15
15
|
pickup: l,
|
|
16
16
|
pickupAddress: t,
|
|
17
17
|
internalMethod: i,
|
|
18
18
|
regionalizeCatalog: n,
|
|
19
19
|
address: o,
|
|
20
|
-
deliveryRequestInfos:
|
|
20
|
+
deliveryRequestInfos: h,
|
|
21
21
|
postalCode: d,
|
|
22
22
|
setMethod: r,
|
|
23
23
|
setCity: c,
|
|
@@ -33,10 +33,10 @@ const F = ({
|
|
|
33
33
|
{
|
|
34
34
|
view: a ? "InitialView" : B ? "AllStoresScreen" : "PostalCodeInputScreen",
|
|
35
35
|
className: "back-button",
|
|
36
|
-
|
|
36
|
+
dataTestId: "back-button",
|
|
37
37
|
children: [
|
|
38
38
|
/* @__PURE__ */ v("span", { children: /* @__PURE__ */ v(C, { color: "var(--color-main)" }) }),
|
|
39
|
-
|
|
39
|
+
x
|
|
40
40
|
]
|
|
41
41
|
}
|
|
42
42
|
),
|
|
@@ -46,16 +46,16 @@ const F = ({
|
|
|
46
46
|
view: "InitialView",
|
|
47
47
|
closeModal: !a,
|
|
48
48
|
className: "continue-button",
|
|
49
|
-
|
|
49
|
+
dataTestId: "continue-button",
|
|
50
50
|
onClick: () => {
|
|
51
51
|
var p;
|
|
52
|
-
r == null || r(i), i === "delivery" && (V(o,
|
|
52
|
+
r == null || r(i), i === "delivery" && (V(o, h, d), c == null || c(o == null ? void 0 : o.localidade), m == null || m(o == null ? void 0 : o.uf), n == null || n(d)), i === "pickup-in-point" && (S(((p = t == null ? void 0 : t.address) == null ? void 0 : p.postalCode) || ""), j(t, b), u == null || u(t == null ? void 0 : t.name), f == null || f(b), n == null || n(t == null ? void 0 : t.address.postalCode));
|
|
53
53
|
},
|
|
54
|
-
children: a ?
|
|
54
|
+
children: a ? I : i === "delivery" ? e == null ? void 0 : e.confirmButton : l == null ? void 0 : l.confirmButton
|
|
55
55
|
}
|
|
56
56
|
)
|
|
57
57
|
] });
|
|
58
58
|
};
|
|
59
59
|
export {
|
|
60
|
-
|
|
60
|
+
E as Navigation
|
|
61
61
|
};
|
|
@@ -1,32 +1,33 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { SetViewButton as
|
|
3
|
-
import { useRegionalizationContext as
|
|
4
|
-
const
|
|
5
|
-
const { pickup:
|
|
6
|
-
return
|
|
1
|
+
import { jsxs as n, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { SetViewButton as m } from "./SetViewButton.js";
|
|
3
|
+
import { useRegionalizationContext as h } from "../context/RegionalizationContext.js";
|
|
4
|
+
const d = ({ pickupPointInfos: c }) => {
|
|
5
|
+
const { pickup: i, setPickupAddress: o, setInternalMethod: e } = h(), { isActive: p, name: a, address: t } = c;
|
|
6
|
+
return p ? /* @__PURE__ */ n(
|
|
7
7
|
"div",
|
|
8
8
|
{
|
|
9
9
|
className: "store-container",
|
|
10
|
-
"data-testid": `pickup-point-container-${
|
|
10
|
+
"data-testid": `pickup-point-container-${a}`,
|
|
11
11
|
children: [
|
|
12
|
-
/* @__PURE__ */ r("h3", { "data-testid": "pickup-point-name", children:
|
|
13
|
-
/* @__PURE__ */
|
|
14
|
-
/* @__PURE__ */
|
|
15
|
-
|
|
12
|
+
/* @__PURE__ */ r("h3", { "data-testid": "pickup-point-name", children: a }),
|
|
13
|
+
/* @__PURE__ */ n("div", { children: [
|
|
14
|
+
/* @__PURE__ */ n("p", { "data-testid": "pickup-point-address", children: [
|
|
15
|
+
t == null ? void 0 : t.street,
|
|
16
16
|
", ",
|
|
17
|
-
|
|
17
|
+
t == null ? void 0 : t.number,
|
|
18
18
|
/* @__PURE__ */ r("br", {}),
|
|
19
|
-
|
|
19
|
+
t == null ? void 0 : t.neighborhood
|
|
20
20
|
] }),
|
|
21
21
|
/* @__PURE__ */ r(
|
|
22
|
-
|
|
22
|
+
m,
|
|
23
23
|
{
|
|
24
24
|
view: "ConfirmScreen",
|
|
25
25
|
className: "choose-store",
|
|
26
|
+
dataTestId: "choose-store",
|
|
26
27
|
onClick: () => {
|
|
27
|
-
|
|
28
|
+
e == null || e("pickup-in-point"), o == null || o(c);
|
|
28
29
|
},
|
|
29
|
-
children:
|
|
30
|
+
children: i == null ? void 0 : i.chooseStore
|
|
30
31
|
}
|
|
31
32
|
)
|
|
32
33
|
] })
|
|
@@ -35,5 +36,5 @@ const f = ({ pickupPointInfos: c }) => {
|
|
|
35
36
|
) : null;
|
|
36
37
|
};
|
|
37
38
|
export {
|
|
38
|
-
|
|
39
|
+
d as PickupPoint
|
|
39
40
|
};
|
|
@@ -6,6 +6,7 @@ interface SetViewButtonProps {
|
|
|
6
6
|
closeModal?: boolean;
|
|
7
7
|
className?: string;
|
|
8
8
|
onClick?: () => void;
|
|
9
|
+
dataTestId?: string;
|
|
9
10
|
}
|
|
10
|
-
export declare const SetViewButton: ({ children, view, closeModal, className, onClick }: SetViewButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare const SetViewButton: ({ children, view, closeModal, className, onClick, dataTestId }: SetViewButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
12
|
export {};
|
|
@@ -1,24 +1,26 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useRegionalizationContext as
|
|
3
|
-
const
|
|
1
|
+
import { jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import { useRegionalizationContext as f } from "../context/RegionalizationContext.js";
|
|
3
|
+
const d = ({
|
|
4
4
|
children: e,
|
|
5
5
|
view: n,
|
|
6
|
-
closeModal:
|
|
7
|
-
className:
|
|
8
|
-
onClick: o
|
|
6
|
+
closeModal: a,
|
|
7
|
+
className: r,
|
|
8
|
+
onClick: o,
|
|
9
|
+
dataTestId: i = "set-view-button"
|
|
9
10
|
}) => {
|
|
10
|
-
const { setModalOpen:
|
|
11
|
-
return /* @__PURE__ */
|
|
11
|
+
const { setModalOpen: s, setView: t } = f();
|
|
12
|
+
return /* @__PURE__ */ u(
|
|
12
13
|
"button",
|
|
13
14
|
{
|
|
15
|
+
"data-testid": i,
|
|
14
16
|
onClick: () => {
|
|
15
|
-
o == null || o(),
|
|
17
|
+
o == null || o(), a ? (t == null || t("InitialView"), s(!1)) : t == null || t(n);
|
|
16
18
|
},
|
|
17
|
-
className:
|
|
19
|
+
className: r,
|
|
18
20
|
children: e
|
|
19
21
|
}
|
|
20
22
|
);
|
|
21
23
|
};
|
|
22
24
|
export {
|
|
23
|
-
|
|
25
|
+
d as SetViewButton
|
|
24
26
|
};
|
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { CloseIcon as
|
|
1
|
+
import { jsxs as l, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { CloseIcon as r } from "../../../assets/svgs/CloseIcon.js";
|
|
3
3
|
import { useRegionalizationContext as s } from "../context/RegionalizationContext.js";
|
|
4
|
-
const
|
|
5
|
-
const { setModalOpen: e, setView:
|
|
6
|
-
return /* @__PURE__ */
|
|
7
|
-
/* @__PURE__ */
|
|
8
|
-
/* @__PURE__ */
|
|
4
|
+
const m = ({ title: n, view: i }) => {
|
|
5
|
+
const { setModalOpen: e, setView: t } = s();
|
|
6
|
+
return /* @__PURE__ */ l("div", { className: "title-container", children: [
|
|
7
|
+
/* @__PURE__ */ o("h1", { children: n }),
|
|
8
|
+
/* @__PURE__ */ o(
|
|
9
9
|
"button",
|
|
10
10
|
{
|
|
11
|
+
"data-testid": "close-button",
|
|
11
12
|
onClick: () => {
|
|
12
|
-
|
|
13
|
+
t == null || t(i || "InitialView"), i || e(!1);
|
|
13
14
|
},
|
|
14
|
-
children: /* @__PURE__ */
|
|
15
|
+
children: /* @__PURE__ */ o(r, {})
|
|
15
16
|
}
|
|
16
17
|
)
|
|
17
18
|
] });
|
|
18
19
|
};
|
|
19
20
|
export {
|
|
20
|
-
|
|
21
|
+
m as Title
|
|
21
22
|
};
|
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
import { jsxs as o, Fragment as f, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { useRef as
|
|
3
|
-
import { Title as
|
|
4
|
-
import { PickupPoint as
|
|
5
|
-
import { GlassIcon as
|
|
6
|
-
import { SetViewButton as
|
|
2
|
+
import { useRef as b, useState as v, useEffect as S } from "react";
|
|
3
|
+
import { Title as u } from "../components/Title.js";
|
|
4
|
+
import { PickupPoint as w } from "../components/PickupPoint.js";
|
|
5
|
+
import { GlassIcon as x } from "../../../assets/svgs/GlassIcon.js";
|
|
6
|
+
import { SetViewButton as N } from "../components/SetViewButton.js";
|
|
7
7
|
import { ArrowIcon as C } from "../../../assets/svgs/ArrowIcon.js";
|
|
8
8
|
import { useRegionalizationContext as F } from "../context/RegionalizationContext.js";
|
|
9
|
-
const
|
|
10
|
-
const { pickup:
|
|
9
|
+
const T = () => {
|
|
10
|
+
const { pickup: t, pickupPoints: l, textBackButton: d, disabledSearch: m } = F(), n = b(null), [a, s] = v(l), h = l.length > 0 ? l : [];
|
|
11
11
|
S(() => {
|
|
12
12
|
s(h);
|
|
13
13
|
}, [l]);
|
|
14
14
|
const i = () => {
|
|
15
15
|
s(
|
|
16
16
|
l == null ? void 0 : l.filter(
|
|
17
|
-
({ name:
|
|
17
|
+
({ name: r }) => {
|
|
18
18
|
var c;
|
|
19
|
-
return
|
|
19
|
+
return r.toLowerCase().includes(((c = n.current) == null ? void 0 : c.value.toLowerCase()) || "");
|
|
20
20
|
}
|
|
21
21
|
)
|
|
22
22
|
);
|
|
23
23
|
};
|
|
24
24
|
return /* @__PURE__ */ o(f, { children: [
|
|
25
|
-
/* @__PURE__ */ e(
|
|
25
|
+
/* @__PURE__ */ e(u, { title: t == null ? void 0 : t.title }),
|
|
26
26
|
!m && /* @__PURE__ */ o("div", { className: "stores-filter", children: [
|
|
27
|
-
/* @__PURE__ */ e("p", { children:
|
|
27
|
+
/* @__PURE__ */ e("p", { children: t == null ? void 0 : t.labelFilter }),
|
|
28
28
|
/* @__PURE__ */ o("div", { children: [
|
|
29
29
|
/* @__PURE__ */ e(
|
|
30
30
|
"input",
|
|
31
31
|
{
|
|
32
32
|
type: "text",
|
|
33
33
|
placeholder: "Loja",
|
|
34
|
-
ref:
|
|
35
|
-
onKeyDown: (
|
|
34
|
+
ref: n,
|
|
35
|
+
onKeyDown: (r) => r.key === "Enter" && i()
|
|
36
36
|
}
|
|
37
37
|
),
|
|
38
38
|
/* @__PURE__ */ e(
|
|
@@ -40,26 +40,27 @@ const z = () => {
|
|
|
40
40
|
{
|
|
41
41
|
className: "filter-ico-container",
|
|
42
42
|
onClick: () => i(),
|
|
43
|
-
children: /* @__PURE__ */ e(
|
|
43
|
+
children: /* @__PURE__ */ e(x, {})
|
|
44
44
|
}
|
|
45
45
|
)
|
|
46
46
|
] }),
|
|
47
|
-
/* @__PURE__ */ e("div", { className: "divider", children: /* @__PURE__ */ e("span", { children:
|
|
47
|
+
/* @__PURE__ */ e("div", { className: "divider", children: /* @__PURE__ */ e("span", { children: t == null ? void 0 : t.divider }) })
|
|
48
48
|
] }),
|
|
49
|
-
/* @__PURE__ */ e("p", { className: "stores-label", children:
|
|
50
|
-
/* @__PURE__ */ e("div", { className: "stores-container", children:
|
|
51
|
-
|
|
49
|
+
/* @__PURE__ */ e("p", { className: "stores-label", children: t == null ? void 0 : t.labelStores }),
|
|
50
|
+
/* @__PURE__ */ e("div", { className: "stores-container", children: a == null ? void 0 : a.map((r) => /* @__PURE__ */ e(
|
|
51
|
+
w,
|
|
52
52
|
{
|
|
53
|
-
pickupPointInfos:
|
|
53
|
+
pickupPointInfos: r
|
|
54
54
|
},
|
|
55
|
-
|
|
55
|
+
r == null ? void 0 : r.id
|
|
56
56
|
)) }),
|
|
57
57
|
/* @__PURE__ */ e("br", {}),
|
|
58
58
|
/* @__PURE__ */ o(
|
|
59
|
-
|
|
59
|
+
N,
|
|
60
60
|
{
|
|
61
61
|
view: "PickupPointInfoScreen",
|
|
62
62
|
className: "back-button-all-store",
|
|
63
|
+
dataTestId: "back-button",
|
|
63
64
|
children: [
|
|
64
65
|
/* @__PURE__ */ e("span", { children: /* @__PURE__ */ e(C, { color: "var(--color-main)" }) }),
|
|
65
66
|
d
|
|
@@ -69,5 +70,5 @@ const z = () => {
|
|
|
69
70
|
] });
|
|
70
71
|
};
|
|
71
72
|
export {
|
|
72
|
-
|
|
73
|
+
T as AllStoresScreen
|
|
73
74
|
};
|
|
@@ -5,14 +5,14 @@ import { InfoPrices as y } from "../components/InfoPrices.js";
|
|
|
5
5
|
import { Navigation as g } from "../components/Navigation.js";
|
|
6
6
|
import { Delivery as v } from "../components/Delivery.js";
|
|
7
7
|
import { useRegionalizationContext as C } from "../context/RegionalizationContext.js";
|
|
8
|
-
const
|
|
8
|
+
const p = () => {
|
|
9
9
|
const {
|
|
10
10
|
editAddress: c,
|
|
11
|
-
delivery:
|
|
11
|
+
delivery: n,
|
|
12
12
|
pickup: e,
|
|
13
13
|
address: r,
|
|
14
14
|
pickupAddress: t,
|
|
15
|
-
internalMethod:
|
|
15
|
+
internalMethod: i,
|
|
16
16
|
pickupTimes: l,
|
|
17
17
|
pickupConfirmScreenText: o
|
|
18
18
|
} = C(), m = `Retiradas entre ${(l == null ? void 0 : l.openingTime) || "08"}h e ${(l == null ? void 0 : l.closingTime) || "20"}h, ou agendada`, h = o && o !== "" ? o : m;
|
|
@@ -20,23 +20,23 @@ const w = () => {
|
|
|
20
20
|
/* @__PURE__ */ a(
|
|
21
21
|
b,
|
|
22
22
|
{
|
|
23
|
-
title:
|
|
23
|
+
title: i === "delivery" ? n == null ? void 0 : n.titleOk : e == null ? void 0 : e.titleOk
|
|
24
24
|
}
|
|
25
25
|
),
|
|
26
26
|
/* @__PURE__ */ d("div", { className: "address-container", children: [
|
|
27
27
|
/* @__PURE__ */ d("p", { className: "address-title", children: [
|
|
28
|
-
/* @__PURE__ */ a("span", { "data-testid": "address-label-type", children:
|
|
29
|
-
|
|
28
|
+
/* @__PURE__ */ a("span", { "data-testid": "address-label-type", children: i === "delivery" ? n == null ? void 0 : n.labelAddress : e == null ? void 0 : e.labelAddress }),
|
|
29
|
+
i === "delivery" && /* @__PURE__ */ a(
|
|
30
30
|
f,
|
|
31
31
|
{
|
|
32
32
|
view: "PostalCodeInputScreen",
|
|
33
33
|
className: "edit-button",
|
|
34
|
-
|
|
34
|
+
dataTestId: "address-label-type",
|
|
35
35
|
children: c
|
|
36
36
|
}
|
|
37
37
|
)
|
|
38
38
|
] }),
|
|
39
|
-
|
|
39
|
+
i === "delivery" ? /* @__PURE__ */ d(s, { children: [
|
|
40
40
|
/* @__PURE__ */ a("span", { "data-testid": "address-label-zip-code", children: r == null ? void 0 : r.cep }),
|
|
41
41
|
/* @__PURE__ */ a(
|
|
42
42
|
"span",
|
|
@@ -64,7 +64,7 @@ const w = () => {
|
|
|
64
64
|
)
|
|
65
65
|
] })
|
|
66
66
|
] }),
|
|
67
|
-
|
|
67
|
+
i === "delivery" ? /* @__PURE__ */ a(v, { delivery: n, containerClassName: "delivery-container" }) : /* @__PURE__ */ a(
|
|
68
68
|
y,
|
|
69
69
|
{
|
|
70
70
|
containerClassName: "pickup-container",
|
|
@@ -74,9 +74,9 @@ const w = () => {
|
|
|
74
74
|
scheduling: h
|
|
75
75
|
}
|
|
76
76
|
),
|
|
77
|
-
/* @__PURE__ */ a(g, { pickuConfirmScreem:
|
|
77
|
+
/* @__PURE__ */ a(g, { pickuConfirmScreem: i !== "delivery" })
|
|
78
78
|
] });
|
|
79
79
|
};
|
|
80
80
|
export {
|
|
81
|
-
|
|
81
|
+
p as ConfirmScreen
|
|
82
82
|
};
|
|
@@ -1,59 +1,67 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as i, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect as p } from "react";
|
|
3
3
|
import { Title as d } from "../components/Title.js";
|
|
4
4
|
import { SetViewButton as t } from "../components/SetViewButton.js";
|
|
5
5
|
import { ArrowIcon as f } from "../../../assets/svgs/ArrowIcon.js";
|
|
6
6
|
import { ShoppingBagsIcon as h } from "../../../assets/svgs/ShoppingBagsIcon.js";
|
|
7
|
-
import { ShoppingIcon as
|
|
7
|
+
import { ShoppingIcon as I } from "../../../assets/svgs/ShoppingIcon.js";
|
|
8
8
|
import { useRegionalizationContext as u } from "../context/RegionalizationContext.js";
|
|
9
|
-
import { formatPrice as
|
|
10
|
-
const
|
|
9
|
+
import { formatPrice as v } from "../utils/formatPrice.js";
|
|
10
|
+
const j = () => {
|
|
11
11
|
const {
|
|
12
|
-
titleText:
|
|
13
|
-
moreInfosText:
|
|
12
|
+
titleText: a,
|
|
13
|
+
moreInfosText: c,
|
|
14
14
|
deliveryPrice: s,
|
|
15
|
-
priceStockInformation:
|
|
15
|
+
priceStockInformation: m,
|
|
16
16
|
backToDelivery: n,
|
|
17
17
|
setBackToDelivery: r,
|
|
18
18
|
status: o,
|
|
19
|
-
setStatus:
|
|
19
|
+
setStatus: l
|
|
20
20
|
} = u();
|
|
21
21
|
return p(() => {
|
|
22
|
-
n && (r == null || r(!1)), (o == null ? void 0 : o.status) === "failed" &&
|
|
23
|
-
}, [n, o]), /* @__PURE__ */
|
|
24
|
-
/* @__PURE__ */
|
|
25
|
-
/* @__PURE__ */
|
|
26
|
-
/* @__PURE__ */
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
22
|
+
n && (r == null || r(!1)), (o == null ? void 0 : o.status) === "failed" && l({});
|
|
23
|
+
}, [n, o]), /* @__PURE__ */ i("div", { className: "inital-view-container", children: [
|
|
24
|
+
/* @__PURE__ */ e(d, { title: a }),
|
|
25
|
+
/* @__PURE__ */ e("p", { className: "price-stock-information", children: m }),
|
|
26
|
+
/* @__PURE__ */ i(
|
|
27
|
+
t,
|
|
28
|
+
{
|
|
29
|
+
view: "MoreInfosScreen",
|
|
30
|
+
className: "more-infos-button",
|
|
31
|
+
dataTestId: "more-infos-button",
|
|
32
|
+
children: [
|
|
33
|
+
c,
|
|
34
|
+
/* @__PURE__ */ e("span", { children: /* @__PURE__ */ e(f, { color: "var(--color-main)" }) })
|
|
35
|
+
]
|
|
36
|
+
}
|
|
37
|
+
),
|
|
38
|
+
/* @__PURE__ */ i("div", { className: "delivery-option-container", children: [
|
|
39
|
+
/* @__PURE__ */ i(
|
|
32
40
|
t,
|
|
33
41
|
{
|
|
34
42
|
view: "PostalCodeInputScreen",
|
|
35
43
|
className: "option",
|
|
36
|
-
|
|
44
|
+
dataTestId: "delivery-options",
|
|
37
45
|
children: [
|
|
38
|
-
/* @__PURE__ */
|
|
39
|
-
/* @__PURE__ */
|
|
40
|
-
/* @__PURE__ */
|
|
46
|
+
/* @__PURE__ */ e(h, {}),
|
|
47
|
+
/* @__PURE__ */ e("h4", { children: "Receber em casa" }),
|
|
48
|
+
/* @__PURE__ */ i("p", { children: [
|
|
41
49
|
" A partir de ",
|
|
42
|
-
|
|
50
|
+
v(s || 0)
|
|
43
51
|
] })
|
|
44
52
|
]
|
|
45
53
|
}
|
|
46
54
|
),
|
|
47
|
-
/* @__PURE__ */
|
|
55
|
+
/* @__PURE__ */ i(
|
|
48
56
|
t,
|
|
49
57
|
{
|
|
50
58
|
view: "PickupPointInfoScreen",
|
|
51
59
|
className: "option",
|
|
52
|
-
|
|
60
|
+
dataTestId: "pickup-options",
|
|
53
61
|
children: [
|
|
54
|
-
/* @__PURE__ */
|
|
55
|
-
/* @__PURE__ */
|
|
56
|
-
/* @__PURE__ */
|
|
62
|
+
/* @__PURE__ */ e(I, {}),
|
|
63
|
+
/* @__PURE__ */ e("h4", { children: "Retirar na Loja" }),
|
|
64
|
+
/* @__PURE__ */ e("p", { children: " Grátis" })
|
|
57
65
|
]
|
|
58
66
|
}
|
|
59
67
|
)
|
|
@@ -61,5 +69,5 @@ const y = () => {
|
|
|
61
69
|
] });
|
|
62
70
|
};
|
|
63
71
|
export {
|
|
64
|
-
|
|
72
|
+
j as InitialView
|
|
65
73
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { Title as
|
|
3
|
-
import { InfoPrices as
|
|
4
|
-
import { SetViewButton as
|
|
5
|
-
import { ArrowIcon as
|
|
6
|
-
import { useRegionalizationContext as
|
|
7
|
-
const
|
|
8
|
-
const { pickup: e, textBackButton: o, backToDelivery:
|
|
9
|
-
return /* @__PURE__ */
|
|
10
|
-
/* @__PURE__ */
|
|
11
|
-
/* @__PURE__ */
|
|
12
|
-
|
|
1
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
2
|
+
import { Title as a } from "../components/Title.js";
|
|
3
|
+
import { InfoPrices as c } from "../components/InfoPrices.js";
|
|
4
|
+
import { SetViewButton as r } from "../components/SetViewButton.js";
|
|
5
|
+
import { ArrowIcon as s } from "../../../assets/svgs/ArrowIcon.js";
|
|
6
|
+
import { useRegionalizationContext as l } from "../context/RegionalizationContext.js";
|
|
7
|
+
const v = () => {
|
|
8
|
+
const { pickup: e, textBackButton: o, backToDelivery: i } = l();
|
|
9
|
+
return /* @__PURE__ */ t("div", { className: "delivery-pickup-container", children: /* @__PURE__ */ n("div", { className: "content-container", children: [
|
|
10
|
+
/* @__PURE__ */ t(a, { title: e == null ? void 0 : e.title }),
|
|
11
|
+
/* @__PURE__ */ t(
|
|
12
|
+
c,
|
|
13
13
|
{
|
|
14
14
|
containerClassName: "pickup-container",
|
|
15
15
|
priceClassName: "pickup-price",
|
|
@@ -18,25 +18,34 @@ const N = () => {
|
|
|
18
18
|
}
|
|
19
19
|
),
|
|
20
20
|
/* @__PURE__ */ n("div", { className: "pickup-instructions", children: [
|
|
21
|
-
/* @__PURE__ */
|
|
22
|
-
/* @__PURE__ */
|
|
21
|
+
/* @__PURE__ */ t("p", { children: e == null ? void 0 : e.labelScheduling }),
|
|
22
|
+
/* @__PURE__ */ t("span", { children: e == null ? void 0 : e.scheduling })
|
|
23
23
|
] }),
|
|
24
24
|
/* @__PURE__ */ n("div", { className: "pickup-open-stores-container", children: [
|
|
25
25
|
/* @__PURE__ */ n(
|
|
26
|
-
|
|
26
|
+
r,
|
|
27
27
|
{
|
|
28
|
-
view:
|
|
28
|
+
view: i ? "PostalCodeInputScreen" : "InitialView",
|
|
29
29
|
className: "back-button",
|
|
30
|
+
dataTestId: "back-button",
|
|
30
31
|
children: [
|
|
31
|
-
/* @__PURE__ */
|
|
32
|
+
/* @__PURE__ */ t("span", { children: /* @__PURE__ */ t(s, { color: "var(--color-main)" }) }),
|
|
32
33
|
o
|
|
33
34
|
]
|
|
34
35
|
}
|
|
35
36
|
),
|
|
36
|
-
/* @__PURE__ */
|
|
37
|
+
/* @__PURE__ */ t(
|
|
38
|
+
r,
|
|
39
|
+
{
|
|
40
|
+
view: "AllStoresScreen",
|
|
41
|
+
className: "pickup-open-stores",
|
|
42
|
+
dataTestId: "pickup-open-stores-button",
|
|
43
|
+
children: e == null ? void 0 : e.buttonOpenStores
|
|
44
|
+
}
|
|
45
|
+
)
|
|
37
46
|
] })
|
|
38
47
|
] }) });
|
|
39
48
|
};
|
|
40
49
|
export {
|
|
41
|
-
|
|
50
|
+
v as PickupPointInfoScreen
|
|
42
51
|
};
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { jsx as n, Fragment as f, jsxs as
|
|
2
|
-
import { Title as
|
|
1
|
+
import { jsx as n, Fragment as f, jsxs as c } from "react/jsx-runtime";
|
|
2
|
+
import { Title as k } from "../components/Title.js";
|
|
3
3
|
import { SetViewButton as s } from "../components/SetViewButton.js";
|
|
4
|
-
import { InfoPrices as
|
|
5
|
-
import { ShoppingIcon as
|
|
4
|
+
import { InfoPrices as u } from "../components/InfoPrices.js";
|
|
5
|
+
import { ShoppingIcon as g } from "../../../assets/svgs/ShoppingIcon.js";
|
|
6
6
|
import { WarningIcon as N } from "../../../assets/svgs/WarningIcon.js";
|
|
7
7
|
import { ArrowIcon as b } from "../../../assets/svgs/ArrowIcon.js";
|
|
8
|
-
import { useRegionalizationContext as
|
|
9
|
-
import { postalCodeMask as
|
|
10
|
-
const
|
|
8
|
+
import { useRegionalizationContext as I } from "../context/RegionalizationContext.js";
|
|
9
|
+
import { postalCodeMask as w } from "../utils/postalCode.js";
|
|
10
|
+
const K = () => {
|
|
11
11
|
const {
|
|
12
12
|
delivery: e,
|
|
13
13
|
status: o,
|
|
14
|
-
postalCodeValidation:
|
|
15
|
-
setInputPostalCode:
|
|
16
|
-
postalCode:
|
|
14
|
+
postalCodeValidation: t,
|
|
15
|
+
setInputPostalCode: p,
|
|
16
|
+
postalCode: m,
|
|
17
17
|
deliveryPrice: d,
|
|
18
18
|
textBackButton: h,
|
|
19
19
|
pickup: i,
|
|
20
20
|
setBackToDelivery: a
|
|
21
|
-
} =
|
|
22
|
-
return /* @__PURE__ */ n(f, { children: /* @__PURE__ */ n("div", { className: "delivery-pickup-container", children: /* @__PURE__ */
|
|
23
|
-
/* @__PURE__ */ n(
|
|
24
|
-
l ? /* @__PURE__ */
|
|
21
|
+
} = I(), l = (o == null ? void 0 : o.status) === "failed";
|
|
22
|
+
return /* @__PURE__ */ n(f, { children: /* @__PURE__ */ n("div", { className: "delivery-pickup-container", children: /* @__PURE__ */ c("div", { className: "content-container", children: [
|
|
23
|
+
/* @__PURE__ */ n(k, { title: l ? "Tente outro CEP" : e == null ? void 0 : e.title }),
|
|
24
|
+
l ? /* @__PURE__ */ c("div", { className: "warning-container", children: [
|
|
25
25
|
/* @__PURE__ */ n(N, {}),
|
|
26
26
|
/* @__PURE__ */ n("span", { className: "warning-text", children: o == null ? void 0 : o.message })
|
|
27
27
|
] }) : /* @__PURE__ */ n(
|
|
28
|
-
|
|
28
|
+
u,
|
|
29
29
|
{
|
|
30
30
|
containerClassName: "delivery-container",
|
|
31
31
|
priceClassName: "info-price",
|
|
@@ -33,43 +33,44 @@ const T = () => {
|
|
|
33
33
|
price: d
|
|
34
34
|
}
|
|
35
35
|
),
|
|
36
|
-
/* @__PURE__ */
|
|
37
|
-
/* @__PURE__ */
|
|
36
|
+
/* @__PURE__ */ c("div", { className: "postal-code-container", children: [
|
|
37
|
+
/* @__PURE__ */ c("div", { className: "postal-code-container-action", children: [
|
|
38
38
|
/* @__PURE__ */ n(
|
|
39
39
|
"input",
|
|
40
40
|
{
|
|
41
41
|
"data-testid": "postal-code-input",
|
|
42
|
-
onKeyDown: (
|
|
42
|
+
onKeyDown: (r) => r.key === "Enter" && (t == null ? void 0 : t()),
|
|
43
43
|
type: "text",
|
|
44
|
-
onChange: (
|
|
44
|
+
onChange: (r) => p(r.target.value),
|
|
45
45
|
maxLength: 9,
|
|
46
|
-
placeholder:
|
|
47
|
-
onKeyUp:
|
|
46
|
+
placeholder: m || "00000-000",
|
|
47
|
+
onKeyUp: w
|
|
48
48
|
}
|
|
49
49
|
),
|
|
50
50
|
/* @__PURE__ */ n(
|
|
51
51
|
"button",
|
|
52
52
|
{
|
|
53
53
|
"data-testid": "postal-code-button",
|
|
54
|
-
onKeyDown: (
|
|
55
|
-
onClick: () =>
|
|
54
|
+
onKeyDown: (r) => r.key === "Enter" && (t == null ? void 0 : t()),
|
|
55
|
+
onClick: () => t == null ? void 0 : t(),
|
|
56
56
|
disabled: o == null ? void 0 : o.loading,
|
|
57
57
|
children: o != null && o.loading ? o.message : e == null ? void 0 : e.searchButton
|
|
58
58
|
}
|
|
59
59
|
)
|
|
60
60
|
] }),
|
|
61
61
|
/* @__PURE__ */ n("a", { href: e == null ? void 0 : e.linkHref, target: "_blank", className: "", children: e == null ? void 0 : e.linkText }),
|
|
62
|
-
l && /* @__PURE__ */
|
|
62
|
+
l && /* @__PURE__ */ c("div", { className: "postal-code-container-pickup", children: [
|
|
63
63
|
/* @__PURE__ */ n("label", { children: "Você pode escolhes retirar na loja" }),
|
|
64
|
-
/* @__PURE__ */
|
|
64
|
+
/* @__PURE__ */ c(
|
|
65
65
|
s,
|
|
66
66
|
{
|
|
67
|
-
onClick: () => a == null ? void 0 : a(!0),
|
|
68
67
|
view: "PickupPointInfoScreen",
|
|
69
68
|
className: "postal-code-container-pickup-select",
|
|
69
|
+
dataTestId: "postal-code-container-pickup-select",
|
|
70
|
+
onClick: () => a == null ? void 0 : a(!0),
|
|
70
71
|
children: [
|
|
71
|
-
/* @__PURE__ */ n(
|
|
72
|
-
/* @__PURE__ */
|
|
72
|
+
/* @__PURE__ */ n(g, {}),
|
|
73
|
+
/* @__PURE__ */ c("div", { className: "postal-code-container-pickup-select-informative", children: [
|
|
73
74
|
/* @__PURE__ */ n("h4", { children: i == null ? void 0 : i.title }),
|
|
74
75
|
/* @__PURE__ */ n("p", { children: " Grátis" })
|
|
75
76
|
] })
|
|
@@ -78,12 +79,20 @@ const T = () => {
|
|
|
78
79
|
)
|
|
79
80
|
] })
|
|
80
81
|
] }),
|
|
81
|
-
/* @__PURE__ */
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
82
|
+
/* @__PURE__ */ c(
|
|
83
|
+
s,
|
|
84
|
+
{
|
|
85
|
+
view: "InitialView",
|
|
86
|
+
className: "back-button",
|
|
87
|
+
dataTestId: "back-button",
|
|
88
|
+
children: [
|
|
89
|
+
/* @__PURE__ */ n("span", { children: /* @__PURE__ */ n(b, { color: "var(--color-main)" }) }),
|
|
90
|
+
h
|
|
91
|
+
]
|
|
92
|
+
}
|
|
93
|
+
)
|
|
85
94
|
] }) }) });
|
|
86
95
|
};
|
|
87
96
|
export {
|
|
88
|
-
|
|
97
|
+
K as PostalCodeInputScreen
|
|
89
98
|
};
|