@plurix/ecom-components 1.20.4 → 1.20.5
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/Regionalization.d.ts +1 -1
- package/dist/packages/Regionalization/Regionalization.js +36 -40
- package/dist/packages/Regionalization/components/Navigation.js +28 -28
- package/dist/packages/Regionalization/context/RegionalizationContext.d.ts +1 -1
- package/dist/packages/Regionalization/context/RegionalizationContext.js +86 -93
- package/dist/packages/Regionalization/types/RegionalizationProps.d.ts +7 -8
- package/dist/packages/Regionalization/views/PostalCodeInputScreen.js +35 -35
- package/package.json +1 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { RegionalizationProps } from './types/RegionalizationProps';
|
|
2
2
|
|
|
3
|
-
export declare const Regionalization: ({ setMethod, setPickupName, setCity, deliveryPrice, setUf, setPickupTimes, pricesAndHours, setModalOpen,
|
|
3
|
+
export declare const Regionalization: ({ setMethod, setPickupName, setCity, deliveryPrice, setUf, setPickupTimes, pricesAndHours, setModalOpen, sendPostalCode, status, setStatus, pickupPoints, pickupConfirmScreenText, regionalizeCatalog, titleText, priceStockInformation, moreInfosText, textBackButton, confirmButton, editAddress, delivery, pickup, disabledSearch }: RegionalizationProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { RegionalizationContextProvider as
|
|
3
|
-
import { ViewsContainer as
|
|
4
|
-
/* empty css */const
|
|
2
|
+
import { RegionalizationContextProvider as A } from "./context/RegionalizationContext.js";
|
|
3
|
+
import { ViewsContainer as C } from "./views/ViewsContainer.js";
|
|
4
|
+
/* empty css */const q = ({
|
|
5
5
|
setMethod: r,
|
|
6
6
|
setPickupName: a,
|
|
7
7
|
setCity: o,
|
|
@@ -10,21 +10,19 @@ import { ViewsContainer as k } from "./views/ViewsContainer.js";
|
|
|
10
10
|
setPickupTimes: n,
|
|
11
11
|
pricesAndHours: s,
|
|
12
12
|
setModalOpen: l,
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
editAddress: v = "Alterar",
|
|
27
|
-
delivery: P = {
|
|
13
|
+
sendPostalCode: d,
|
|
14
|
+
status: c,
|
|
15
|
+
setStatus: m,
|
|
16
|
+
pickupPoints: p,
|
|
17
|
+
pickupConfirmScreenText: u,
|
|
18
|
+
regionalizeCatalog: g,
|
|
19
|
+
titleText: b = "Como deseja receber sua compra?",
|
|
20
|
+
priceStockInformation: h = " Preços e estoque podem variar de acordo com a loja que irá te atender",
|
|
21
|
+
moreInfosText: j = "Horários de atendimento e entrega",
|
|
22
|
+
textBackButton: x = "Voltar",
|
|
23
|
+
confirmButton: E = "Ok, Entendi",
|
|
24
|
+
editAddress: R = "Alterar",
|
|
25
|
+
delivery: f = {
|
|
28
26
|
title: "Receber em Casa",
|
|
29
27
|
normalDelivery: "Entrega Agendada",
|
|
30
28
|
expressDelivery: "Entrega Express",
|
|
@@ -43,7 +41,7 @@ import { ViewsContainer as k } from "./views/ViewsContainer.js";
|
|
|
43
41
|
labelAddress: "Entregar em:",
|
|
44
42
|
confirmButton: "Receber em casa"
|
|
45
43
|
},
|
|
46
|
-
pickup:
|
|
44
|
+
pickup: v = {
|
|
47
45
|
title: "Retirar na Loja",
|
|
48
46
|
labelPrice: "Retirada",
|
|
49
47
|
price: 0,
|
|
@@ -58,11 +56,11 @@ import { ViewsContainer as k } from "./views/ViewsContainer.js";
|
|
|
58
56
|
labelAddress: "Retirar em:",
|
|
59
57
|
confirmButton: "Retirar na loja"
|
|
60
58
|
},
|
|
61
|
-
disabledSearch:
|
|
59
|
+
disabledSearch: P = !1
|
|
62
60
|
}) => /* @__PURE__ */ e(
|
|
63
|
-
|
|
61
|
+
A,
|
|
64
62
|
{
|
|
65
|
-
priceStockInformation:
|
|
63
|
+
priceStockInformation: h,
|
|
66
64
|
setMethod: r,
|
|
67
65
|
setPickupName: a,
|
|
68
66
|
setCity: o,
|
|
@@ -70,26 +68,24 @@ import { ViewsContainer as k } from "./views/ViewsContainer.js";
|
|
|
70
68
|
setPickupTimes: n,
|
|
71
69
|
pricesAndHours: s,
|
|
72
70
|
setModalOpen: l,
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
textBackButton: R,
|
|
80
|
-
editAddress: v,
|
|
71
|
+
sendPostalCode: d,
|
|
72
|
+
pickupPoints: p,
|
|
73
|
+
titleText: b,
|
|
74
|
+
moreInfosText: j,
|
|
75
|
+
textBackButton: x,
|
|
76
|
+
editAddress: R,
|
|
81
77
|
deliveryPrice: t,
|
|
82
|
-
confirmButton:
|
|
83
|
-
pickupConfirmScreenText:
|
|
84
|
-
delivery:
|
|
85
|
-
pickup:
|
|
86
|
-
setStatus:
|
|
87
|
-
status:
|
|
88
|
-
regionalizeCatalog:
|
|
89
|
-
disabledSearch:
|
|
90
|
-
children: /* @__PURE__ */ e(
|
|
78
|
+
confirmButton: E,
|
|
79
|
+
pickupConfirmScreenText: u,
|
|
80
|
+
delivery: f,
|
|
81
|
+
pickup: v,
|
|
82
|
+
setStatus: m,
|
|
83
|
+
status: c,
|
|
84
|
+
regionalizeCatalog: g,
|
|
85
|
+
disabledSearch: P,
|
|
86
|
+
children: /* @__PURE__ */ e(C, {})
|
|
91
87
|
}
|
|
92
88
|
);
|
|
93
89
|
export {
|
|
94
|
-
|
|
90
|
+
q as Regionalization
|
|
95
91
|
};
|
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { SetViewButton as
|
|
3
|
-
import { ArrowIcon as
|
|
4
|
-
import { useRegionalizationContext as
|
|
5
|
-
import { deliverySetData as
|
|
6
|
-
import { pickupSetData as
|
|
1
|
+
import { jsxs as x, jsx as b } from "react/jsx-runtime";
|
|
2
|
+
import { SetViewButton as h } from "./SetViewButton.js";
|
|
3
|
+
import { ArrowIcon as V } from "../../../assets/svgs/ArrowIcon.js";
|
|
4
|
+
import { useRegionalizationContext as j } from "../context/RegionalizationContext.js";
|
|
5
|
+
import { deliverySetData as s } from "../utils/deliverySetData.js";
|
|
6
|
+
import { pickupSetData as y } from "../utils/pickupSetData.js";
|
|
7
7
|
const E = ({
|
|
8
8
|
moreInfosScreen: a,
|
|
9
|
-
pickuConfirmScreem:
|
|
9
|
+
pickuConfirmScreem: p
|
|
10
10
|
}) => {
|
|
11
11
|
const {
|
|
12
12
|
confirmButton: I,
|
|
13
|
-
textBackButton:
|
|
14
|
-
delivery:
|
|
15
|
-
pickup:
|
|
13
|
+
textBackButton: S,
|
|
14
|
+
delivery: r,
|
|
15
|
+
pickup: e,
|
|
16
16
|
pickupAddress: t,
|
|
17
17
|
internalMethod: i,
|
|
18
18
|
regionalizeCatalog: n,
|
|
19
19
|
address: o,
|
|
20
|
-
deliveryRequestInfos:
|
|
20
|
+
deliveryRequestInfos: N,
|
|
21
21
|
postalCode: d,
|
|
22
|
-
setMethod:
|
|
22
|
+
setMethod: l,
|
|
23
23
|
setCity: c,
|
|
24
24
|
setUf: m,
|
|
25
|
-
setPickupName:
|
|
26
|
-
setPickupTimes:
|
|
27
|
-
pickupTimes:
|
|
28
|
-
setInputPostalCode:
|
|
29
|
-
} =
|
|
30
|
-
return /* @__PURE__ */
|
|
31
|
-
/* @__PURE__ */
|
|
32
|
-
|
|
25
|
+
setPickupName: f,
|
|
26
|
+
setPickupTimes: u,
|
|
27
|
+
pickupTimes: w,
|
|
28
|
+
setInputPostalCode: v
|
|
29
|
+
} = j();
|
|
30
|
+
return /* @__PURE__ */ x("div", { className: "container-navigation", children: [
|
|
31
|
+
/* @__PURE__ */ x(
|
|
32
|
+
h,
|
|
33
33
|
{
|
|
34
|
-
view: a ? "InitialView" :
|
|
34
|
+
view: a ? "InitialView" : p ? "AllStoresScreen" : "PostalCodeInputScreen",
|
|
35
35
|
className: "back-button",
|
|
36
36
|
dataTestId: "back-button",
|
|
37
37
|
children: [
|
|
38
|
-
/* @__PURE__ */
|
|
39
|
-
|
|
38
|
+
/* @__PURE__ */ b("span", { children: /* @__PURE__ */ b(V, { color: "var(--color-main)" }) }),
|
|
39
|
+
S
|
|
40
40
|
]
|
|
41
41
|
}
|
|
42
42
|
),
|
|
43
|
-
/* @__PURE__ */
|
|
44
|
-
|
|
43
|
+
/* @__PURE__ */ b(
|
|
44
|
+
h,
|
|
45
45
|
{
|
|
46
46
|
view: "InitialView",
|
|
47
47
|
closeModal: !a,
|
|
48
48
|
className: "continue-button",
|
|
49
49
|
dataTestId: "continue-button",
|
|
50
50
|
onClick: () => {
|
|
51
|
-
var
|
|
52
|
-
|
|
51
|
+
var B;
|
|
52
|
+
l == null || l(i), i === "delivery" && (s(o, N, 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" && (v == null || v(((B = t == null ? void 0 : t.address) == null ? void 0 : B.postalCode) || ""), y(t, w), f == null || f(t == null ? void 0 : t.name), u == null || u(w), n == null || n(t == null ? void 0 : t.address.postalCode));
|
|
53
53
|
},
|
|
54
|
-
children: a ? I : i === "delivery" ?
|
|
54
|
+
children: a ? I : i === "delivery" ? r == null ? void 0 : r.confirmButton : e == null ? void 0 : e.confirmButton
|
|
55
55
|
}
|
|
56
56
|
)
|
|
57
57
|
] });
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { RegionalizationProps, ContextProps } from '../types';
|
|
2
2
|
|
|
3
|
-
export declare const RegionalizationContextProvider: ({ setMethod, setPickupName, setCity, setUf, setPickupTimes, pricesAndHours, setModalOpen,
|
|
3
|
+
export declare const RegionalizationContextProvider: ({ setMethod, setPickupName, setCity, setUf, setPickupTimes, pricesAndHours, setModalOpen, sendPostalCode, status, setStatus, priceStockInformation, pickupPoints, titleText, moreInfosText, textBackButton, confirmButton, editAddress, delivery, deliveryPrice, pickup, regionalizeCatalog, pickupConfirmScreenText, disabledSearch, children }: RegionalizationProps & ContextProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export declare const useRegionalizationContext: () => RegionalizationProps & ContextProps;
|
|
@@ -1,106 +1,99 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { createContext as
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
pickupConfirmScreenText: B,
|
|
30
|
-
disabledSearch: Q,
|
|
31
|
-
children: U
|
|
1
|
+
import { jsx as _ } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as $, useState as o, useEffect as M, useContext as ee } from "react";
|
|
3
|
+
import { getFullLocalStorage as i } from "../utils/localStorage.js";
|
|
4
|
+
const p = $(null), te = ({
|
|
5
|
+
setMethod: s,
|
|
6
|
+
setPickupName: v,
|
|
7
|
+
setCity: x,
|
|
8
|
+
setUf: I,
|
|
9
|
+
setPickupTimes: w,
|
|
10
|
+
pricesAndHours: R,
|
|
11
|
+
setModalOpen: S,
|
|
12
|
+
sendPostalCode: a,
|
|
13
|
+
status: T,
|
|
14
|
+
setStatus: t,
|
|
15
|
+
priceStockInformation: b = "",
|
|
16
|
+
pickupPoints: y,
|
|
17
|
+
titleText: z,
|
|
18
|
+
moreInfosText: P,
|
|
19
|
+
textBackButton: H,
|
|
20
|
+
confirmButton: k,
|
|
21
|
+
editAddress: D,
|
|
22
|
+
delivery: E,
|
|
23
|
+
deliveryPrice: V,
|
|
24
|
+
pickup: h,
|
|
25
|
+
regionalizeCatalog: q,
|
|
26
|
+
pickupConfirmScreenText: L,
|
|
27
|
+
disabledSearch: W,
|
|
28
|
+
children: j
|
|
32
29
|
}) => {
|
|
33
|
-
const [
|
|
34
|
-
openingTime: (
|
|
35
|
-
closingTime: (
|
|
36
|
-
},
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
status: "FAILED",
|
|
41
|
-
loading: !1,
|
|
42
|
-
message: "Que Pena, ainda não entregamos na sua região."
|
|
43
|
-
});
|
|
30
|
+
const [A, r] = o(), [B, l] = o("InitialView"), [c, u] = o(""), [F, G] = o(), [n, N] = o(), [g, O] = o(""), [U, m] = o(), [J, K] = o(), [Q, X] = o(!1), Y = {
|
|
31
|
+
openingTime: (n == null ? void 0 : n.businessHours.businessHoursWeek.openingTime.slice(0, 2)) || "",
|
|
32
|
+
closingTime: (n == null ? void 0 : n.businessHours.businessHoursWeek.closingTime.slice(0, 2)) || ""
|
|
33
|
+
}, Z = async () => {
|
|
34
|
+
t({ status: "LOADING", loading: !0, message: "" });
|
|
35
|
+
const e = await a(g);
|
|
36
|
+
e != null && e.address && (e != null && e.deliveryInfos) && (t({ status: "SUCCESS", loading: !1, message: "" }), r("delivery"), G(e.address), u(c), m(e.deliveryInfos), K(e.customShipping), l("ConfirmScreen"));
|
|
44
37
|
};
|
|
45
|
-
return
|
|
46
|
-
var
|
|
47
|
-
|
|
48
|
-
}, []), /* @__PURE__ */
|
|
49
|
-
|
|
38
|
+
return M(() => {
|
|
39
|
+
var e, f, C, d;
|
|
40
|
+
u((f = (e = i()) == null ? void 0 : e.userAddressInfos) == null ? void 0 : f.postalCode), s == null || s((C = i()) == null ? void 0 : C.regionalized), m((d = i()) == null ? void 0 : d.deliveryInfos);
|
|
41
|
+
}, []), /* @__PURE__ */ _(
|
|
42
|
+
p.Provider,
|
|
50
43
|
{
|
|
51
44
|
value: {
|
|
52
|
-
|
|
53
|
-
backToDelivery:
|
|
54
|
-
setBackToDelivery:
|
|
55
|
-
setMethod:
|
|
56
|
-
priceStockInformation:
|
|
57
|
-
setPickupName:
|
|
58
|
-
setCity:
|
|
59
|
-
setUf:
|
|
60
|
-
setPickupTimes:
|
|
61
|
-
pickupTimes:
|
|
62
|
-
pickupConfirmScreenText:
|
|
63
|
-
pricesAndHours:
|
|
64
|
-
setModalOpen:
|
|
65
|
-
inputPostalCode:
|
|
66
|
-
setInputPostalCode:
|
|
67
|
-
status:
|
|
68
|
-
setStatus:
|
|
69
|
-
pickupPoints:
|
|
70
|
-
titleText:
|
|
71
|
-
moreInfosText:
|
|
72
|
-
customShippingData:
|
|
73
|
-
textBackButton:
|
|
74
|
-
confirmButton:
|
|
75
|
-
editAddress:
|
|
76
|
-
delivery:
|
|
77
|
-
pickup:
|
|
78
|
-
view:
|
|
79
|
-
setView:
|
|
80
|
-
postalCodeValidation:
|
|
81
|
-
address:
|
|
82
|
-
pickupAddress:
|
|
83
|
-
setPickupAddress:
|
|
84
|
-
deliveryRequestInfos:
|
|
85
|
-
postalCode:
|
|
86
|
-
internalMethod:
|
|
87
|
-
setInternalMethod:
|
|
88
|
-
regionalizeCatalog:
|
|
89
|
-
disabledSearch:
|
|
90
|
-
deliveryPrice:
|
|
45
|
+
sendPostalCode: a,
|
|
46
|
+
backToDelivery: Q,
|
|
47
|
+
setBackToDelivery: X,
|
|
48
|
+
setMethod: s,
|
|
49
|
+
priceStockInformation: b,
|
|
50
|
+
setPickupName: v,
|
|
51
|
+
setCity: x,
|
|
52
|
+
setUf: I,
|
|
53
|
+
setPickupTimes: w,
|
|
54
|
+
pickupTimes: Y,
|
|
55
|
+
pickupConfirmScreenText: L,
|
|
56
|
+
pricesAndHours: R,
|
|
57
|
+
setModalOpen: S,
|
|
58
|
+
inputPostalCode: g,
|
|
59
|
+
setInputPostalCode: O,
|
|
60
|
+
status: T,
|
|
61
|
+
setStatus: t,
|
|
62
|
+
pickupPoints: y,
|
|
63
|
+
titleText: z,
|
|
64
|
+
moreInfosText: P,
|
|
65
|
+
customShippingData: J,
|
|
66
|
+
textBackButton: H,
|
|
67
|
+
confirmButton: k,
|
|
68
|
+
editAddress: D,
|
|
69
|
+
delivery: E,
|
|
70
|
+
pickup: h,
|
|
71
|
+
view: B,
|
|
72
|
+
setView: l,
|
|
73
|
+
postalCodeValidation: Z,
|
|
74
|
+
address: F,
|
|
75
|
+
pickupAddress: n,
|
|
76
|
+
setPickupAddress: N,
|
|
77
|
+
deliveryRequestInfos: U,
|
|
78
|
+
postalCode: c,
|
|
79
|
+
internalMethod: A,
|
|
80
|
+
setInternalMethod: r,
|
|
81
|
+
regionalizeCatalog: q,
|
|
82
|
+
disabledSearch: W,
|
|
83
|
+
deliveryPrice: V
|
|
91
84
|
},
|
|
92
|
-
children:
|
|
85
|
+
children: j
|
|
93
86
|
}
|
|
94
87
|
);
|
|
95
|
-
},
|
|
96
|
-
const
|
|
97
|
-
if (!
|
|
88
|
+
}, ie = () => {
|
|
89
|
+
const s = ee(p);
|
|
90
|
+
if (!s)
|
|
98
91
|
throw new Error(
|
|
99
92
|
"useRegionalizationContext must be used within a RegionalizationContextProvider"
|
|
100
93
|
);
|
|
101
|
-
return
|
|
94
|
+
return s;
|
|
102
95
|
};
|
|
103
96
|
export {
|
|
104
|
-
|
|
105
|
-
|
|
97
|
+
te as RegionalizationContextProvider,
|
|
98
|
+
ie as useRegionalizationContext
|
|
106
99
|
};
|
|
@@ -25,15 +25,14 @@ export interface RegionalizationProps {
|
|
|
25
25
|
setUf?: (uf?: string) => void;
|
|
26
26
|
setPickupTimes?: (pickupTimes?: BusinessHours) => void;
|
|
27
27
|
pricesAndHours: PricesAndHours;
|
|
28
|
+
inputPostalCode?: string;
|
|
29
|
+
setInputPostalCode?: (value: string) => void;
|
|
28
30
|
setModalOpen: (modalOpen: boolean) => void;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
deliveryInfos?: DeliveryProps;
|
|
35
|
-
customShipping?: CustomShippingProps;
|
|
36
|
-
};
|
|
31
|
+
sendPostalCode: (postalCode: string) => Promise<{
|
|
32
|
+
address: Address;
|
|
33
|
+
deliveryInfos: DeliveryProps;
|
|
34
|
+
customShipping: CustomShippingProps;
|
|
35
|
+
}>;
|
|
37
36
|
status: Status;
|
|
38
37
|
setStatus: (status: Status) => void;
|
|
39
38
|
pickupPoints: PikcupPointType[];
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { jsx as n, Fragment as f, jsxs as
|
|
1
|
+
import { jsx as n, Fragment as f, jsxs as r } from "react/jsx-runtime";
|
|
2
2
|
import { Title as k } from "../components/Title.js";
|
|
3
|
-
import { SetViewButton as
|
|
4
|
-
import { InfoPrices as
|
|
5
|
-
import { ShoppingIcon as
|
|
3
|
+
import { SetViewButton as p } from "../components/SetViewButton.js";
|
|
4
|
+
import { InfoPrices as g } from "../components/InfoPrices.js";
|
|
5
|
+
import { ShoppingIcon as u } 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
|
|
8
|
+
import { useRegionalizationContext as w } from "../context/RegionalizationContext.js";
|
|
9
|
+
import { postalCodeMask as x } from "../utils/postalCode.js";
|
|
10
10
|
const K = () => {
|
|
11
11
|
const {
|
|
12
12
|
delivery: e,
|
|
13
|
-
status:
|
|
14
|
-
postalCodeValidation:
|
|
15
|
-
setInputPostalCode:
|
|
13
|
+
status: c,
|
|
14
|
+
postalCodeValidation: o,
|
|
15
|
+
setInputPostalCode: i,
|
|
16
16
|
postalCode: m,
|
|
17
17
|
deliveryPrice: d,
|
|
18
18
|
textBackButton: h,
|
|
19
|
-
pickup:
|
|
20
|
-
setBackToDelivery:
|
|
21
|
-
} =
|
|
22
|
-
return /* @__PURE__ */ n(f, { children: /* @__PURE__ */ n("div", { className: "delivery-pickup-container", children: /* @__PURE__ */
|
|
23
|
-
/* @__PURE__ */ n(k, { title:
|
|
24
|
-
|
|
19
|
+
pickup: a,
|
|
20
|
+
setBackToDelivery: l
|
|
21
|
+
} = w(), s = (c == null ? void 0 : c.status) === "FAILED";
|
|
22
|
+
return /* @__PURE__ */ n(f, { children: /* @__PURE__ */ n("div", { className: "delivery-pickup-container", children: /* @__PURE__ */ r("div", { className: "content-container", children: [
|
|
23
|
+
/* @__PURE__ */ n(k, { title: s ? "Tente outro CEP" : e == null ? void 0 : e.title }),
|
|
24
|
+
s ? /* @__PURE__ */ r("div", { className: "warning-container", children: [
|
|
25
25
|
/* @__PURE__ */ n(N, {}),
|
|
26
|
-
/* @__PURE__ */ n("span", { className: "warning-text", children:
|
|
26
|
+
/* @__PURE__ */ n("span", { className: "warning-text", children: c == null ? void 0 : c.message })
|
|
27
27
|
] }) : /* @__PURE__ */ n(
|
|
28
|
-
|
|
28
|
+
g,
|
|
29
29
|
{
|
|
30
30
|
containerClassName: "delivery-container",
|
|
31
31
|
priceClassName: "info-price",
|
|
@@ -33,45 +33,45 @@ const K = () => {
|
|
|
33
33
|
price: d
|
|
34
34
|
}
|
|
35
35
|
),
|
|
36
|
-
/* @__PURE__ */
|
|
37
|
-
/* @__PURE__ */
|
|
36
|
+
/* @__PURE__ */ r("div", { className: "postal-code-container", children: [
|
|
37
|
+
/* @__PURE__ */ r("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: (t) => t.key === "Enter" && (o == null ? void 0 : o()),
|
|
43
43
|
type: "text",
|
|
44
|
-
onChange: (
|
|
44
|
+
onChange: (t) => i == null ? void 0 : i(t.target.value),
|
|
45
45
|
maxLength: 9,
|
|
46
46
|
placeholder: m || "00000-000",
|
|
47
|
-
onKeyUp:
|
|
47
|
+
onKeyUp: x
|
|
48
48
|
}
|
|
49
49
|
),
|
|
50
50
|
/* @__PURE__ */ n(
|
|
51
51
|
"button",
|
|
52
52
|
{
|
|
53
53
|
"data-testid": "postal-code-button",
|
|
54
|
-
onKeyDown: (
|
|
55
|
-
onClick: () =>
|
|
56
|
-
disabled:
|
|
57
|
-
children:
|
|
54
|
+
onKeyDown: (t) => t.key === "Enter" && (o == null ? void 0 : o()),
|
|
55
|
+
onClick: () => o == null ? void 0 : o(),
|
|
56
|
+
disabled: c == null ? void 0 : c.loading,
|
|
57
|
+
children: c != null && c.loading ? c.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
|
-
|
|
62
|
+
s && /* @__PURE__ */ r("div", { className: "postal-code-container-pickup", children: [
|
|
63
63
|
/* @__PURE__ */ n("label", { children: "Você pode escolhes retirar na loja" }),
|
|
64
|
-
/* @__PURE__ */
|
|
65
|
-
|
|
64
|
+
/* @__PURE__ */ r(
|
|
65
|
+
p,
|
|
66
66
|
{
|
|
67
67
|
view: "PickupPointInfoScreen",
|
|
68
68
|
className: "postal-code-container-pickup-select",
|
|
69
69
|
dataTestId: "postal-code-container-pickup-select",
|
|
70
|
-
onClick: () =>
|
|
70
|
+
onClick: () => l == null ? void 0 : l(!0),
|
|
71
71
|
children: [
|
|
72
|
-
/* @__PURE__ */ n(
|
|
73
|
-
/* @__PURE__ */
|
|
74
|
-
/* @__PURE__ */ n("h4", { children:
|
|
72
|
+
/* @__PURE__ */ n(u, {}),
|
|
73
|
+
/* @__PURE__ */ r("div", { className: "postal-code-container-pickup-select-informative", children: [
|
|
74
|
+
/* @__PURE__ */ n("h4", { children: a == null ? void 0 : a.title }),
|
|
75
75
|
/* @__PURE__ */ n("p", { children: " Grátis" })
|
|
76
76
|
] })
|
|
77
77
|
]
|
|
@@ -79,8 +79,8 @@ const K = () => {
|
|
|
79
79
|
)
|
|
80
80
|
] })
|
|
81
81
|
] }),
|
|
82
|
-
/* @__PURE__ */
|
|
83
|
-
|
|
82
|
+
/* @__PURE__ */ r(
|
|
83
|
+
p,
|
|
84
84
|
{
|
|
85
85
|
view: "InitialView",
|
|
86
86
|
className: "back-button",
|