@plurix/ecom-components 1.20.5 → 1.20.6

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,99 +1,98 @@
1
1
  import { jsx as _ } from "react/jsx-runtime";
2
2
  import { createContext as $, useState as o, useEffect as M, useContext as ee } from "react";
3
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,
4
+ const p = $(null), se = ({
5
+ setMethod: t,
6
+ setPickupName: C,
7
+ setCity: d,
8
+ setUf: v,
9
+ setPickupTimes: x,
10
+ pricesAndHours: I,
11
+ setModalOpen: w,
12
+ sendPostalCode: r,
13
+ status: R,
14
+ setStatus: T,
15
15
  priceStockInformation: b = "",
16
16
  pickupPoints: y,
17
17
  titleText: z,
18
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,
19
+ textBackButton: S,
20
+ confirmButton: H,
21
+ editAddress: k,
22
+ delivery: V,
23
+ deliveryPrice: h,
24
+ pickup: q,
25
+ regionalizeCatalog: D,
26
+ pickupConfirmScreenText: E,
27
27
  disabledSearch: W,
28
28
  children: j
29
29
  }) => {
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 = {
30
+ const [B, a] = o(), [F, l] = o("InitialView"), [L, c] = o(""), [A, G] = o(), [n, J] = o(), [s, K] = o(""), [N, u] = o(), [O, Q] = o(), [U, X] = o(!1), Y = {
31
31
  openingTime: (n == null ? void 0 : n.businessHours.businessHoursWeek.openingTime.slice(0, 2)) || "",
32
32
  closingTime: (n == null ? void 0 : n.businessHours.businessHoursWeek.closingTime.slice(0, 2)) || ""
33
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"));
34
+ const e = await r(s);
35
+ e != null && e.address && (e != null && e.deliveryInfos) && (a("delivery"), G(e.address), c(s), u(e.deliveryInfos), Q(e.customShipping), l("ConfirmScreen"));
37
36
  };
38
37
  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);
38
+ var e, m, f, g;
39
+ c((m = (e = i()) == null ? void 0 : e.userAddressInfos) == null ? void 0 : m.postalCode), t == null || t((f = i()) == null ? void 0 : f.regionalized), u((g = i()) == null ? void 0 : g.deliveryInfos);
41
40
  }, []), /* @__PURE__ */ _(
42
41
  p.Provider,
43
42
  {
44
43
  value: {
45
- sendPostalCode: a,
46
- backToDelivery: Q,
44
+ sendPostalCode: r,
45
+ backToDelivery: U,
47
46
  setBackToDelivery: X,
48
- setMethod: s,
47
+ setMethod: t,
49
48
  priceStockInformation: b,
50
- setPickupName: v,
51
- setCity: x,
52
- setUf: I,
53
- setPickupTimes: w,
49
+ setPickupName: C,
50
+ setCity: d,
51
+ setUf: v,
52
+ setPickupTimes: x,
54
53
  pickupTimes: Y,
55
- pickupConfirmScreenText: L,
56
- pricesAndHours: R,
57
- setModalOpen: S,
58
- inputPostalCode: g,
59
- setInputPostalCode: O,
60
- status: T,
61
- setStatus: t,
54
+ pickupConfirmScreenText: E,
55
+ pricesAndHours: I,
56
+ setModalOpen: w,
57
+ inputPostalCode: s,
58
+ setInputPostalCode: K,
59
+ status: R,
60
+ setStatus: T,
62
61
  pickupPoints: y,
63
62
  titleText: z,
64
63
  moreInfosText: P,
65
- customShippingData: J,
66
- textBackButton: H,
67
- confirmButton: k,
68
- editAddress: D,
69
- delivery: E,
70
- pickup: h,
71
- view: B,
64
+ customShippingData: O,
65
+ textBackButton: S,
66
+ confirmButton: H,
67
+ editAddress: k,
68
+ delivery: V,
69
+ pickup: q,
70
+ view: F,
72
71
  setView: l,
73
72
  postalCodeValidation: Z,
74
- address: F,
73
+ address: A,
75
74
  pickupAddress: n,
76
- setPickupAddress: N,
77
- deliveryRequestInfos: U,
78
- postalCode: c,
79
- internalMethod: A,
80
- setInternalMethod: r,
81
- regionalizeCatalog: q,
75
+ setPickupAddress: J,
76
+ deliveryRequestInfos: N,
77
+ postalCode: L,
78
+ internalMethod: B,
79
+ setInternalMethod: a,
80
+ regionalizeCatalog: D,
82
81
  disabledSearch: W,
83
- deliveryPrice: V
82
+ deliveryPrice: h
84
83
  },
85
84
  children: j
86
85
  }
87
86
  );
88
87
  }, ie = () => {
89
- const s = ee(p);
90
- if (!s)
88
+ const t = ee(p);
89
+ if (!t)
91
90
  throw new Error(
92
91
  "useRegionalizationContext must be used within a RegionalizationContextProvider"
93
92
  );
94
- return s;
93
+ return t;
95
94
  };
96
95
  export {
97
- te as RegionalizationContextProvider,
96
+ se as RegionalizationContextProvider,
98
97
  ie as useRegionalizationContext
99
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.20.5",
5
+ "version": "1.20.6",
6
6
  "type": "module",
7
7
  "main": "dist/main.js",
8
8
  "types": "dist/main.d.ts",