@plurix/ecom-components 1.20.3 → 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.
@@ -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, inputPostalCode, setInputPostalCode, addressDelivery, status, setStatus, pickupPoints, pickupConfirmScreenText, regionalizeCatalog, titleText, priceStockInformation, moreInfosText, textBackButton, confirmButton, editAddress, delivery, pickup, disabledSearch }: RegionalizationProps) => import("react/jsx-runtime").JSX.Element;
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 S } from "./context/RegionalizationContext.js";
3
- import { ViewsContainer as k } from "./views/ViewsContainer.js";
4
- /* empty css */const H = ({
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
- inputPostalCode: d,
14
- setInputPostalCode: c,
15
- addressDelivery: m,
16
- status: p,
17
- setStatus: u,
18
- pickupPoints: g,
19
- pickupConfirmScreenText: b,
20
- regionalizeCatalog: h,
21
- titleText: j = "Como deseja receber sua compra?",
22
- priceStockInformation: x = " Preços e estoque podem variar de acordo com a loja que irá te atender",
23
- moreInfosText: E = "Horários de atendimento e entrega",
24
- textBackButton: R = "Voltar",
25
- confirmButton: f = "Ok, Entendi",
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: A = {
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: C = !1
59
+ disabledSearch: P = !1
62
60
  }) => /* @__PURE__ */ e(
63
- S,
61
+ A,
64
62
  {
65
- priceStockInformation: x,
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
- inputPostalCode: d,
74
- setInputPostalCode: c,
75
- addressDelivery: m,
76
- pickupPoints: g,
77
- titleText: j,
78
- moreInfosText: E,
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: f,
83
- pickupConfirmScreenText: b,
84
- delivery: P,
85
- pickup: A,
86
- setStatus: u,
87
- status: p,
88
- regionalizeCatalog: h,
89
- disabledSearch: C,
90
- children: /* @__PURE__ */ e(k, {})
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
- H as Regionalization
90
+ q as Regionalization
95
91
  };
@@ -1,57 +1,57 @@
1
- import { jsxs as s, jsx as v } from "react/jsx-runtime";
2
- import { SetViewButton as w } from "./SetViewButton.js";
3
- import { ArrowIcon as C } from "../../../assets/svgs/ArrowIcon.js";
4
- import { useRegionalizationContext as N } from "../context/RegionalizationContext.js";
5
- import { deliverySetData as V } from "../utils/deliverySetData.js";
6
- import { pickupSetData as j } from "../utils/pickupSetData.js";
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: B
9
+ pickuConfirmScreem: p
10
10
  }) => {
11
11
  const {
12
12
  confirmButton: I,
13
- textBackButton: x,
14
- delivery: e,
15
- pickup: l,
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: h,
20
+ deliveryRequestInfos: N,
21
21
  postalCode: d,
22
- setMethod: r,
22
+ setMethod: l,
23
23
  setCity: c,
24
24
  setUf: m,
25
- setPickupName: u,
26
- setPickupTimes: f,
27
- pickupTimes: b,
28
- setInputPostalCode: S
29
- } = N();
30
- return /* @__PURE__ */ s("div", { className: "container-navigation", children: [
31
- /* @__PURE__ */ s(
32
- w,
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" : B ? "AllStoresScreen" : "PostalCodeInputScreen",
34
+ view: a ? "InitialView" : p ? "AllStoresScreen" : "PostalCodeInputScreen",
35
35
  className: "back-button",
36
36
  dataTestId: "back-button",
37
37
  children: [
38
- /* @__PURE__ */ v("span", { children: /* @__PURE__ */ v(C, { color: "var(--color-main)" }) }),
39
- x
38
+ /* @__PURE__ */ b("span", { children: /* @__PURE__ */ b(V, { color: "var(--color-main)" }) }),
39
+ S
40
40
  ]
41
41
  }
42
42
  ),
43
- /* @__PURE__ */ v(
44
- w,
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 p;
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));
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" ? e == null ? void 0 : e.confirmButton : l == null ? void 0 : l.confirmButton
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, inputPostalCode, setInputPostalCode, addressDelivery, status, setStatus, priceStockInformation, pickupPoints, titleText, moreInfosText, textBackButton, confirmButton, editAddress, delivery, deliveryPrice, pickup, regionalizeCatalog, pickupConfirmScreenText, disabledSearch, children }: RegionalizationProps & ContextProps) => import("react/jsx-runtime").JSX.Element;
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 y } from "react/jsx-runtime";
2
- import { createContext as D, useState as n, useEffect as d, useContext as oo } from "react";
3
- import { removeSpecialCharacter as no } from "../utils/postalCode.js";
4
- import { getFullLocalStorage as g } from "../utils/localStorage.js";
5
- const x = D(null), uo = ({
6
- setMethod: t,
7
- setPickupName: I,
8
- setCity: S,
9
- setUf: R,
10
- setPickupTimes: T,
11
- pricesAndHours: b,
12
- setModalOpen: w,
13
- inputPostalCode: c,
14
- setInputPostalCode: z,
15
- addressDelivery: o,
16
- status: P,
17
- setStatus: a,
18
- priceStockInformation: E = "",
19
- pickupPoints: H,
20
- titleText: h,
21
- moreInfosText: k,
22
- textBackButton: V,
23
- confirmButton: q,
24
- editAddress: F,
25
- delivery: L,
26
- deliveryPrice: W,
27
- pickup: j,
28
- regionalizeCatalog: A,
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 [$, m] = n(), [G, f] = n("InitialView"), [J, s] = n(""), [K, N] = n(), [i, O] = n(), [X, C] = n(), [Y, Z] = n(), [_, M] = n(!1), r = {
34
- openingTime: (i == null ? void 0 : i.businessHours.businessHoursWeek.openingTime.slice(0, 2)) || "",
35
- closingTime: (i == null ? void 0 : i.businessHours.businessHoursWeek.closingTime.slice(0, 2)) || ""
36
- }, v = () => {
37
- /\d{8}$/.test(
38
- no(c)
39
- ) || !(o != null && o.loading) && (o != null && o.address) && (o != null && o.deliveryInfos) ? o != null && o.loading && (o != null && o.address) && (o != null && o.deliveryInfos) && (a({ status: "SUCCESS", loading: !1, message: "" }), m("delivery"), N(o.address), s(c), C(o.deliveryInfos), f("ConfirmScreen"), Z(o.customShipping)) : a({
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 d(() => {
46
- var u, p, e, l;
47
- s((p = (u = g()) == null ? void 0 : u.userAddressInfos) == null ? void 0 : p.postalCode), t == null || t((e = g()) == null ? void 0 : e.regionalized), C((l = g()) == null ? void 0 : l.deliveryInfos);
48
- }, []), /* @__PURE__ */ y(
49
- x.Provider,
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
- addressDelivery: o,
53
- backToDelivery: _,
54
- setBackToDelivery: M,
55
- setMethod: t,
56
- priceStockInformation: E,
57
- setPickupName: I,
58
- setCity: S,
59
- setUf: R,
60
- setPickupTimes: T,
61
- pickupTimes: r,
62
- pickupConfirmScreenText: B,
63
- pricesAndHours: b,
64
- setModalOpen: w,
65
- inputPostalCode: c,
66
- setInputPostalCode: z,
67
- status: P,
68
- setStatus: a,
69
- pickupPoints: H,
70
- titleText: h,
71
- moreInfosText: k,
72
- customShippingData: Y,
73
- textBackButton: V,
74
- confirmButton: q,
75
- editAddress: F,
76
- delivery: L,
77
- pickup: j,
78
- view: G,
79
- setView: f,
80
- postalCodeValidation: v,
81
- address: K,
82
- pickupAddress: i,
83
- setPickupAddress: O,
84
- deliveryRequestInfos: X,
85
- postalCode: J,
86
- internalMethod: $,
87
- setInternalMethod: m,
88
- regionalizeCatalog: A,
89
- disabledSearch: Q,
90
- deliveryPrice: W
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: U
85
+ children: j
93
86
  }
94
87
  );
95
- }, go = () => {
96
- const t = oo(x);
97
- if (!t)
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 t;
94
+ return s;
102
95
  };
103
96
  export {
104
- uo as RegionalizationContextProvider,
105
- go as useRegionalizationContext
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
- inputPostalCode: string;
30
- setInputPostalCode: (value: string) => void;
31
- addressDelivery: {
32
- loading: boolean;
33
- address?: Address;
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 c } from "react/jsx-runtime";
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 s } from "../components/SetViewButton.js";
4
- import { InfoPrices as u } from "../components/InfoPrices.js";
5
- import { ShoppingIcon as g } from "../../../assets/svgs/ShoppingIcon.js";
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 I } from "../context/RegionalizationContext.js";
9
- import { postalCodeMask as w } from "../utils/postalCode.js";
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: o,
14
- postalCodeValidation: t,
15
- setInputPostalCode: p,
13
+ status: c,
14
+ postalCodeValidation: o,
15
+ setInputPostalCode: i,
16
16
  postalCode: m,
17
17
  deliveryPrice: d,
18
18
  textBackButton: h,
19
- pickup: i,
20
- setBackToDelivery: a
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: [
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: o == null ? void 0 : o.message })
26
+ /* @__PURE__ */ n("span", { className: "warning-text", children: c == null ? void 0 : c.message })
27
27
  ] }) : /* @__PURE__ */ n(
28
- u,
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__ */ c("div", { className: "postal-code-container", children: [
37
- /* @__PURE__ */ c("div", { className: "postal-code-container-action", children: [
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: (r) => r.key === "Enter" && (t == null ? void 0 : t()),
42
+ onKeyDown: (t) => t.key === "Enter" && (o == null ? void 0 : o()),
43
43
  type: "text",
44
- onChange: (r) => p(r.target.value),
44
+ onChange: (t) => i == null ? void 0 : i(t.target.value),
45
45
  maxLength: 9,
46
46
  placeholder: m || "00000-000",
47
- onKeyUp: w
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: (r) => r.key === "Enter" && (t == null ? void 0 : t()),
55
- onClick: () => t == null ? void 0 : t(),
56
- disabled: o == null ? void 0 : o.loading,
57
- children: o != null && o.loading ? o.message : e == null ? void 0 : e.searchButton
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
- l && /* @__PURE__ */ c("div", { className: "postal-code-container-pickup", children: [
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__ */ c(
65
- s,
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: () => a == null ? void 0 : a(!0),
70
+ onClick: () => l == null ? void 0 : l(!0),
71
71
  children: [
72
- /* @__PURE__ */ n(g, {}),
73
- /* @__PURE__ */ c("div", { className: "postal-code-container-pickup-select-informative", children: [
74
- /* @__PURE__ */ n("h4", { children: i == null ? void 0 : i.title }),
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__ */ c(
83
- s,
82
+ /* @__PURE__ */ r(
83
+ p,
84
84
  {
85
85
  view: "InitialView",
86
86
  className: "back-button",
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.20.3",
5
+ "version": "1.20.5",
6
6
  "type": "module",
7
7
  "main": "dist/main.js",
8
8
  "types": "dist/main.d.ts",