@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.
@@ -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 F = ({
7
+ const E = ({
8
8
  moreInfosScreen: a,
9
9
  pickuConfirmScreem: B
10
10
  }) => {
11
11
  const {
12
- confirmButton: x,
13
- textBackButton: h,
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: I,
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
- "data-testid": "back-button",
36
+ dataTestId: "back-button",
37
37
  children: [
38
38
  /* @__PURE__ */ v("span", { children: /* @__PURE__ */ v(C, { color: "var(--color-main)" }) }),
39
- h
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
- "data-testid": "continue-button",
49
+ dataTestId: "continue-button",
50
50
  onClick: () => {
51
51
  var p;
52
- r == null || r(i), i === "delivery" && (V(o, I, 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));
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 ? x : i === "delivery" ? e == null ? void 0 : e.confirmButton : l == null ? void 0 : l.confirmButton
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
- F as Navigation
60
+ E as Navigation
61
61
  };
@@ -1,32 +1,33 @@
1
- import { jsxs as e, jsx as r } from "react/jsx-runtime";
2
- import { SetViewButton as a } from "./SetViewButton.js";
3
- import { useRegionalizationContext as l } from "../context/RegionalizationContext.js";
4
- const f = ({ pickupPointInfos: c }) => {
5
- const { pickup: t, setPickupAddress: o, setInternalMethod: n } = l(), { isActive: m, name: p, address: i } = c;
6
- return m ? /* @__PURE__ */ e(
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-${p}`,
10
+ "data-testid": `pickup-point-container-${a}`,
11
11
  children: [
12
- /* @__PURE__ */ r("h3", { "data-testid": "pickup-point-name", children: p }),
13
- /* @__PURE__ */ e("div", { children: [
14
- /* @__PURE__ */ e("p", { "data-testid": "pickup-point-address", children: [
15
- i == null ? void 0 : i.street,
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
- i == null ? void 0 : i.number,
17
+ t == null ? void 0 : t.number,
18
18
  /* @__PURE__ */ r("br", {}),
19
- i == null ? void 0 : i.neighborhood
19
+ t == null ? void 0 : t.neighborhood
20
20
  ] }),
21
21
  /* @__PURE__ */ r(
22
- a,
22
+ m,
23
23
  {
24
24
  view: "ConfirmScreen",
25
25
  className: "choose-store",
26
+ dataTestId: "choose-store",
26
27
  onClick: () => {
27
- n == null || n("pickup-in-point"), o == null || o(c);
28
+ e == null || e("pickup-in-point"), o == null || o(c);
28
29
  },
29
- children: t == null ? void 0 : t.chooseStore
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
- f as PickupPoint
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 i } from "react/jsx-runtime";
2
- import { useRegionalizationContext as m } from "../context/RegionalizationContext.js";
3
- const u = ({
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: r,
7
- className: a,
8
- onClick: o
6
+ closeModal: a,
7
+ className: r,
8
+ onClick: o,
9
+ dataTestId: i = "set-view-button"
9
10
  }) => {
10
- const { setModalOpen: f, setView: t } = m();
11
- return /* @__PURE__ */ i(
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(), r ? (t == null || t("InitialView"), f(!1)) : t == null || t(n);
17
+ o == null || o(), a ? (t == null || t("InitialView"), s(!1)) : t == null || t(n);
16
18
  },
17
- className: a,
19
+ className: r,
18
20
  children: e
19
21
  }
20
22
  );
21
23
  };
22
24
  export {
23
- u as SetViewButton
25
+ d as SetViewButton
24
26
  };
@@ -1,21 +1,22 @@
1
- import { jsxs as r, jsx as t } from "react/jsx-runtime";
2
- import { CloseIcon as l } from "../../../assets/svgs/CloseIcon.js";
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 d = ({ title: n, view: i }) => {
5
- const { setModalOpen: e, setView: o } = s();
6
- return /* @__PURE__ */ r("div", { className: "title-container", children: [
7
- /* @__PURE__ */ t("h1", { children: n }),
8
- /* @__PURE__ */ t(
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
- o == null || o(i || "InitialView"), i || e(!1);
13
+ t == null || t(i || "InitialView"), i || e(!1);
13
14
  },
14
- children: /* @__PURE__ */ t(l, {})
15
+ children: /* @__PURE__ */ o(r, {})
15
16
  }
16
17
  )
17
18
  ] });
18
19
  };
19
20
  export {
20
- d as Title
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 v, useState as b, useEffect as S } from "react";
3
- import { Title as w } from "../components/Title.js";
4
- import { PickupPoint as x } from "../components/PickupPoint.js";
5
- import { GlassIcon as N } from "../../../assets/svgs/GlassIcon.js";
6
- import { SetViewButton as u } from "../components/SetViewButton.js";
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 z = () => {
10
- const { pickup: r, pickupPoints: l, textBackButton: d, disabledSearch: m } = F(), a = v(null), [n, s] = b(l), h = l.length > 0 ? l : [];
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: t }) => {
17
+ ({ name: r }) => {
18
18
  var c;
19
- return t.toLowerCase().includes(((c = a.current) == null ? void 0 : c.value.toLowerCase()) || "");
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(w, { title: r == null ? void 0 : r.title }),
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: r == null ? void 0 : r.labelFilter }),
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: a,
35
- onKeyDown: (t) => t.key === "Enter" && i()
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(N, {})
43
+ children: /* @__PURE__ */ e(x, {})
44
44
  }
45
45
  )
46
46
  ] }),
47
- /* @__PURE__ */ e("div", { className: "divider", children: /* @__PURE__ */ e("span", { children: r == null ? void 0 : r.divider }) })
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: r == null ? void 0 : r.labelStores }),
50
- /* @__PURE__ */ e("div", { className: "stores-container", children: n == null ? void 0 : n.map((t) => /* @__PURE__ */ e(
51
- x,
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: t
53
+ pickupPointInfos: r
54
54
  },
55
- t == null ? void 0 : t.id
55
+ r == null ? void 0 : r.id
56
56
  )) }),
57
57
  /* @__PURE__ */ e("br", {}),
58
58
  /* @__PURE__ */ o(
59
- u,
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
- z as AllStoresScreen
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 w = () => {
8
+ const p = () => {
9
9
  const {
10
10
  editAddress: c,
11
- delivery: i,
11
+ delivery: n,
12
12
  pickup: e,
13
13
  address: r,
14
14
  pickupAddress: t,
15
- internalMethod: n,
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: n === "delivery" ? i == null ? void 0 : i.titleOk : e == null ? void 0 : e.titleOk
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: n === "delivery" ? i == null ? void 0 : i.labelAddress : e == null ? void 0 : e.labelAddress }),
29
- n === "delivery" && /* @__PURE__ */ a(
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
- "data-testid": "address-label-type",
34
+ dataTestId: "address-label-type",
35
35
  children: c
36
36
  }
37
37
  )
38
38
  ] }),
39
- n === "delivery" ? /* @__PURE__ */ d(s, { children: [
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
- n === "delivery" ? /* @__PURE__ */ a(v, { delivery: i, containerClassName: "delivery-container" }) : /* @__PURE__ */ a(
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: n !== "delivery" })
77
+ /* @__PURE__ */ a(g, { pickuConfirmScreem: i !== "delivery" })
78
78
  ] });
79
79
  };
80
80
  export {
81
- w as ConfirmScreen
81
+ p as ConfirmScreen
82
82
  };
@@ -1,59 +1,67 @@
1
- import { jsxs as e, jsx as i } from "react/jsx-runtime";
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 v } from "../../../assets/svgs/ShoppingIcon.js";
7
+ import { ShoppingIcon as I } from "../../../assets/svgs/ShoppingIcon.js";
8
8
  import { useRegionalizationContext as u } from "../context/RegionalizationContext.js";
9
- import { formatPrice as I } from "../utils/formatPrice.js";
10
- const y = () => {
9
+ import { formatPrice as v } from "../utils/formatPrice.js";
10
+ const j = () => {
11
11
  const {
12
- titleText: c,
13
- moreInfosText: a,
12
+ titleText: a,
13
+ moreInfosText: c,
14
14
  deliveryPrice: s,
15
- priceStockInformation: l,
15
+ priceStockInformation: m,
16
16
  backToDelivery: n,
17
17
  setBackToDelivery: r,
18
18
  status: o,
19
- setStatus: m
19
+ setStatus: l
20
20
  } = u();
21
21
  return p(() => {
22
- n && (r == null || r(!1)), (o == null ? void 0 : o.status) === "failed" && m({});
23
- }, [n, o]), /* @__PURE__ */ e("div", { className: "inital-view-container", children: [
24
- /* @__PURE__ */ i(d, { title: c }),
25
- /* @__PURE__ */ i("p", { className: "price-stock-information", children: l }),
26
- /* @__PURE__ */ e(t, { view: "MoreInfosScreen", className: "more-infos-button", children: [
27
- a,
28
- /* @__PURE__ */ i("span", { children: /* @__PURE__ */ i(f, { color: "var(--color-main)" }) })
29
- ] }),
30
- /* @__PURE__ */ e("div", { className: "delivery-option-container", children: [
31
- /* @__PURE__ */ e(
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
- "data-testid": "delivery-options",
44
+ dataTestId: "delivery-options",
37
45
  children: [
38
- /* @__PURE__ */ i(h, {}),
39
- /* @__PURE__ */ i("h4", { children: "Receber em casa" }),
40
- /* @__PURE__ */ e("p", { children: [
46
+ /* @__PURE__ */ e(h, {}),
47
+ /* @__PURE__ */ e("h4", { children: "Receber em casa" }),
48
+ /* @__PURE__ */ i("p", { children: [
41
49
  " A partir de ",
42
- I(s || 0)
50
+ v(s || 0)
43
51
  ] })
44
52
  ]
45
53
  }
46
54
  ),
47
- /* @__PURE__ */ e(
55
+ /* @__PURE__ */ i(
48
56
  t,
49
57
  {
50
58
  view: "PickupPointInfoScreen",
51
59
  className: "option",
52
- "data-testid": "pickup-options",
60
+ dataTestId: "pickup-options",
53
61
  children: [
54
- /* @__PURE__ */ i(v, {}),
55
- /* @__PURE__ */ i("h4", { children: "Retirar na Loja" }),
56
- /* @__PURE__ */ i("p", { children: " Grátis" })
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
- y as InitialView
72
+ j as InitialView
65
73
  };
@@ -1,15 +1,15 @@
1
- import { jsx as r, jsxs as n } from "react/jsx-runtime";
2
- import { Title as c } from "../components/Title.js";
3
- import { InfoPrices as l } from "../components/InfoPrices.js";
4
- import { SetViewButton as i } from "../components/SetViewButton.js";
5
- import { ArrowIcon as a } from "../../../assets/svgs/ArrowIcon.js";
6
- import { useRegionalizationContext as s } from "../context/RegionalizationContext.js";
7
- const N = () => {
8
- const { pickup: e, textBackButton: o, backToDelivery: t } = s();
9
- return /* @__PURE__ */ r("div", { className: "delivery-pickup-container", children: /* @__PURE__ */ n("div", { className: "content-container", children: [
10
- /* @__PURE__ */ r(c, { title: e == null ? void 0 : e.title }),
11
- /* @__PURE__ */ r(
12
- l,
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__ */ r("p", { children: e == null ? void 0 : e.labelScheduling }),
22
- /* @__PURE__ */ r("span", { children: e == null ? void 0 : e.scheduling })
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
- i,
26
+ r,
27
27
  {
28
- view: t ? "PostalCodeInputScreen" : "InitialView",
28
+ view: i ? "PostalCodeInputScreen" : "InitialView",
29
29
  className: "back-button",
30
+ dataTestId: "back-button",
30
31
  children: [
31
- /* @__PURE__ */ r("span", { children: /* @__PURE__ */ r(a, { color: "var(--color-main)" }) }),
32
+ /* @__PURE__ */ t("span", { children: /* @__PURE__ */ t(s, { color: "var(--color-main)" }) }),
32
33
  o
33
34
  ]
34
35
  }
35
36
  ),
36
- /* @__PURE__ */ r(i, { view: "AllStoresScreen", className: "pickup-open-stores", children: e == null ? void 0 : e.buttonOpenStores })
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
- N as PickupPointInfoScreen
50
+ v as PickupPointInfoScreen
42
51
  };
@@ -1,31 +1,31 @@
1
- import { jsx as n, Fragment as f, jsxs as r } from "react/jsx-runtime";
2
- import { Title as g } from "../components/Title.js";
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 k } from "../components/InfoPrices.js";
5
- import { ShoppingIcon as u } from "../../../assets/svgs/ShoppingIcon.js";
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 w } from "../context/RegionalizationContext.js";
9
- import { postalCodeMask as x } from "../utils/postalCode.js";
10
- const T = () => {
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: c,
15
- setInputPostalCode: m,
16
- postalCode: p,
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
- } = w(), l = (o == null ? void 0 : o.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(g, { title: l ? "Tente outro CEP" : e == null ? void 0 : e.title }),
24
- l ? /* @__PURE__ */ r("div", { className: "warning-container", children: [
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
- k,
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__ */ r("div", { className: "postal-code-container", children: [
37
- /* @__PURE__ */ r("div", { className: "postal-code-container-action", children: [
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: (t) => t.key === "Enter" && (c == null ? void 0 : c()),
42
+ onKeyDown: (r) => r.key === "Enter" && (t == null ? void 0 : t()),
43
43
  type: "text",
44
- onChange: (t) => m(t.target.value),
44
+ onChange: (r) => p(r.target.value),
45
45
  maxLength: 9,
46
- placeholder: p || "00000-000",
47
- onKeyUp: x
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: (t) => t.key === "Enter" && (c == null ? void 0 : c()),
55
- onClick: () => c == null ? void 0 : c(),
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__ */ r("div", { className: "postal-code-container-pickup", children: [
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__ */ r(
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(u, {}),
72
- /* @__PURE__ */ r("div", { className: "postal-code-container-pickup-select-informative", children: [
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__ */ r(s, { view: "InitialView", className: "back-button", children: [
82
- /* @__PURE__ */ n("span", { children: /* @__PURE__ */ n(b, { color: "var(--color-main)" }) }),
83
- h
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
- T as PostalCodeInputScreen
97
+ K as PostalCodeInputScreen
89
98
  };
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@plurix/ecom-components",
3
3
  "author": "Plurix",
4
4
  "private": false,
5
- "version": "1.18.1",
5
+ "version": "1.18.2",
6
6
  "type": "module",
7
7
  "main": "dist/main.js",
8
8
  "types": "dist/main.d.ts",