@instockng/storefront-ui 1.0.18 → 1.0.19
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/components/OrderConfirmation.d.ts +1 -1
- package/dist/components/OrderConfirmation.d.ts.map +1 -1
- package/dist/components/ShoppingCart.d.ts.map +1 -1
- package/dist/contexts/CartContext.d.ts +2 -2
- package/dist/contexts/CartContext.d.ts.map +1 -1
- package/dist/fetchers.d.ts +19 -0
- package/dist/fetchers.d.ts.map +1 -0
- package/dist/hooks/usePageTracking.d.ts +40 -0
- package/dist/hooks/usePageTracking.d.ts.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +101 -92
- package/dist/index10.mjs +149 -624
- package/dist/index100.mjs +22 -33
- package/dist/index101.mjs +22 -30
- package/dist/index102.mjs +32 -27
- package/dist/index103.mjs +152 -57
- package/dist/index104.mjs +20 -3
- package/dist/index105.mjs +31 -2
- package/dist/index106.mjs +84 -2
- package/dist/index107.mjs +37 -16
- package/dist/index108.mjs +144 -12
- package/dist/index109.mjs +55 -6
- package/dist/index11.mjs +94 -56
- package/dist/index110.mjs +23 -30
- package/dist/index111.mjs +30 -0
- package/dist/index112.mjs +26 -0
- package/dist/index113.mjs +28 -0
- package/dist/index114.mjs +24 -0
- package/dist/index115.mjs +25 -0
- package/dist/index116.mjs +24 -0
- package/dist/index117.mjs +68 -0
- package/dist/index118.mjs +21 -0
- package/dist/index119.mjs +42 -0
- package/dist/index12.mjs +645 -62
- package/dist/index120.mjs +27 -0
- package/dist/index121.mjs +37 -0
- package/dist/index122.mjs +30 -0
- package/dist/index123.mjs +22 -0
- package/dist/index124.mjs +24 -0
- package/dist/index125.mjs +50 -0
- package/dist/index126.mjs +26 -0
- package/dist/index127.mjs +271 -0
- package/dist/index128.mjs +73 -0
- package/dist/index129.mjs +11 -0
- package/dist/index13.mjs +50 -14
- package/dist/index130.mjs +5 -0
- package/dist/index131.mjs +5 -0
- package/dist/index132.mjs +36 -0
- package/dist/index133.mjs +5 -0
- package/dist/index134.mjs +24 -0
- package/dist/index135.mjs +59 -0
- package/dist/index136.mjs +32 -0
- package/dist/index137.mjs +10 -0
- package/dist/index138.mjs +55 -0
- package/dist/index139.mjs +9 -0
- package/dist/index14.mjs +62 -115
- package/dist/index140.mjs +15 -0
- package/dist/index141.mjs +10 -0
- package/dist/index142.mjs +31 -0
- package/dist/index143.mjs +5 -0
- package/dist/index144.mjs +73 -0
- package/dist/index145.mjs +170 -0
- package/dist/index146.mjs +5 -0
- package/dist/index147.mjs +5 -0
- package/dist/index148.mjs +5 -0
- package/dist/index149.mjs +21 -0
- package/dist/index15.mjs +23 -41
- package/dist/index150.mjs +35 -0
- package/dist/index151.mjs +41 -0
- package/dist/index152.mjs +21 -0
- package/dist/index153.mjs +21 -0
- package/dist/index154.mjs +5 -0
- package/dist/index155.mjs +23 -0
- package/dist/index156.mjs +49 -0
- package/dist/index157.mjs +5 -0
- package/dist/index158.mjs +33 -0
- package/dist/index159.mjs +21 -0
- package/dist/index16.mjs +115 -42
- package/dist/index160.mjs +5 -0
- package/dist/index161.mjs +5 -0
- package/dist/index162.mjs +5 -0
- package/dist/index163.mjs +5 -0
- package/dist/index164.mjs +75 -0
- package/dist/index165.mjs +5 -0
- package/dist/index166.mjs +56 -0
- package/dist/index167.mjs +5 -0
- package/dist/index168.mjs +39 -0
- package/dist/index169.mjs +155 -0
- package/dist/index17.mjs +42 -42
- package/dist/index170.mjs +5 -0
- package/dist/index171.mjs +5 -0
- package/dist/index172.mjs +22 -0
- package/dist/index173.mjs +5 -0
- package/dist/index174.mjs +5 -0
- package/dist/index175.mjs +29 -0
- package/dist/index176.mjs +5 -0
- package/dist/index177.mjs +5 -0
- package/dist/index178.mjs +27 -0
- package/dist/index179.mjs +26 -0
- package/dist/index18.mjs +41 -31
- package/dist/index180.mjs +5 -0
- package/dist/index181.mjs +5 -0
- package/dist/index182.mjs +5 -0
- package/dist/index183.mjs +26 -0
- package/dist/index184.mjs +5 -0
- package/dist/index185.mjs +26 -0
- package/dist/index186.mjs +5 -0
- package/dist/index187.mjs +5 -0
- package/dist/index188.mjs +5 -0
- package/dist/index189.mjs +26 -0
- package/dist/index19.mjs +40 -7
- package/dist/index190.mjs +5 -0
- package/dist/index191.mjs +26 -0
- package/dist/index192.mjs +5 -0
- package/dist/index193.mjs +5 -0
- package/dist/index194.mjs +5 -0
- package/dist/index195.mjs +5 -0
- package/dist/index196.mjs +5 -0
- package/dist/index197.mjs +5 -0
- package/dist/index198.mjs +5 -0
- package/dist/index199.mjs +5 -0
- package/dist/index2.mjs +31 -12
- package/dist/index20.mjs +27 -17
- package/dist/index200.mjs +130 -0
- package/dist/index201.mjs +5 -0
- package/dist/index202.mjs +77 -0
- package/dist/index203.mjs +77 -0
- package/dist/index204.mjs +5 -0
- package/dist/index205.mjs +5 -0
- package/dist/index206.mjs +111 -0
- package/dist/index207.mjs +5 -0
- package/dist/index208.mjs +5 -0
- package/dist/index209.mjs +5 -0
- package/dist/index21.mjs +6 -29
- package/dist/index210.mjs +5 -0
- package/dist/index211.mjs +5 -0
- package/dist/index212.mjs +5 -0
- package/dist/index213.mjs +5 -0
- package/dist/index214.mjs +5 -0
- package/dist/index215.mjs +5 -0
- package/dist/index216.mjs +40 -0
- package/dist/index217.mjs +5 -0
- package/dist/index218.mjs +5 -0
- package/dist/index219.mjs +5 -0
- package/dist/index22.mjs +20 -18
- package/dist/index220.mjs +247 -0
- package/dist/index221.mjs +5 -0
- package/dist/index222.mjs +36 -0
- package/dist/index223.mjs +68 -0
- package/dist/index224.mjs +28 -0
- package/dist/index225.mjs +5 -0
- package/dist/index226.mjs +5 -0
- package/dist/index227.mjs +5 -0
- package/dist/index228.mjs +5 -0
- package/dist/index229.mjs +5 -0
- package/dist/index23.mjs +32 -87
- package/dist/index230.mjs +5 -0
- package/dist/index231.mjs +5 -0
- package/dist/index232.mjs +5 -0
- package/dist/index233.mjs +7 -0
- package/dist/index234.mjs +5 -0
- package/dist/index235.mjs +5 -0
- package/dist/index236.mjs +34 -0
- package/dist/index237.mjs +14 -0
- package/dist/index238.mjs +7 -0
- package/dist/index239.mjs +7 -0
- package/dist/index24.mjs +12 -12
- package/dist/index240.mjs +16 -0
- package/dist/index241.mjs +10 -0
- package/dist/index242.mjs +15 -0
- package/dist/index243.mjs +8 -0
- package/dist/index244.mjs +36 -0
- package/dist/index245.mjs +34 -0
- package/dist/index246.mjs +31 -0
- package/dist/index247.mjs +64 -0
- package/dist/index248.mjs +5 -0
- package/dist/index249.mjs +5 -0
- package/dist/index25.mjs +85 -8
- package/dist/index250.mjs +21 -0
- package/dist/index251.mjs +50 -0
- package/dist/index252.mjs +5 -0
- package/dist/index253.mjs +5 -0
- package/dist/index254.mjs +5 -0
- package/dist/index255.mjs +5 -0
- package/dist/index256.mjs +94 -0
- package/dist/index257.mjs +5 -0
- package/dist/index258.mjs +6 -0
- package/dist/index259.mjs +5 -0
- package/dist/index26.mjs +20 -97
- package/dist/index260.mjs +5 -0
- package/dist/index261.mjs +20 -0
- package/dist/index262.mjs +16 -0
- package/dist/index263.mjs +9 -0
- package/dist/index264.mjs +33 -0
- package/dist/index265.mjs +5 -0
- package/dist/index266.mjs +5 -0
- package/dist/index267.mjs +5 -0
- package/dist/index27.mjs +11 -18
- package/dist/index28.mjs +11 -65
- package/dist/index29.mjs +94 -89
- package/dist/index3.mjs +117 -97
- package/dist/index30.mjs +20 -19
- package/dist/index31.mjs +65 -19
- package/dist/index32.mjs +93 -8
- package/dist/index33.mjs +18 -1432
- package/dist/index34.mjs +19 -2
- package/dist/index35.mjs +10 -56
- package/dist/index36.mjs +9 -49
- package/dist/index37.mjs +103 -33
- package/dist/index38.mjs +24 -14
- package/dist/index39.mjs +1411 -2241
- package/dist/index4.mjs +82 -197
- package/dist/index40.mjs +2 -36
- package/dist/index41.mjs +56 -43
- package/dist/index42.mjs +50 -98
- package/dist/index43.mjs +33 -97
- package/dist/index44.mjs +13 -79
- package/dist/index45.mjs +2255 -69
- package/dist/index46.mjs +36 -95
- package/dist/index47.mjs +43 -80
- package/dist/index48.mjs +99 -79
- package/dist/index49.mjs +93 -15
- package/dist/index5.mjs +15 -108
- package/dist/index50.mjs +77 -14
- package/dist/index51.mjs +58 -44
- package/dist/index52.mjs +63 -93
- package/dist/index53.mjs +51 -99
- package/dist/index54.mjs +78 -4
- package/dist/index55.mjs +18 -22
- package/dist/index56.mjs +17 -74
- package/dist/index57.mjs +63 -15
- package/dist/index58.mjs +121 -59
- package/dist/index59.mjs +129 -34
- package/dist/index6.mjs +190 -73
- package/dist/index60.mjs +22 -41
- package/dist/index61.mjs +148 -230
- package/dist/index62.mjs +2 -6
- package/dist/index63.mjs +21 -132
- package/dist/index64.mjs +73 -66
- package/dist/index65.mjs +14 -86
- package/dist/index66.mjs +59 -25
- package/dist/index67.mjs +4 -8
- package/dist/index68.mjs +2 -75
- package/dist/index69.mjs +5 -3
- package/dist/index7.mjs +97 -85
- package/dist/index70.mjs +1134 -2
- package/dist/index71.mjs +19 -82
- package/dist/index72.mjs +54 -53
- package/dist/index73.mjs +32 -5
- package/dist/index74.mjs +2 -5
- package/dist/index75.mjs +2 -179
- package/dist/index76.mjs +230 -48
- package/dist/index77.mjs +6 -69
- package/dist/index78.mjs +133 -3
- package/dist/index79.mjs +68 -2
- package/dist/index8.mjs +78 -162
- package/dist/index80.mjs +85 -19
- package/dist/index81.mjs +26 -53
- package/dist/index82.mjs +8 -28
- package/dist/index83.mjs +74 -6
- package/dist/index84.mjs +3 -51
- package/dist/index85.mjs +2 -6
- package/dist/index86.mjs +81 -10
- package/dist/index87.mjs +53 -6
- package/dist/index88.mjs +5 -27
- package/dist/index89.mjs +5 -2
- package/dist/index9.mjs +90 -90
- package/dist/index90.mjs +175 -66
- package/dist/index91.mjs +49 -163
- package/dist/index92.mjs +68 -30
- package/dist/index93.mjs +34 -11
- package/dist/index94.mjs +42 -3
- package/dist/index95.mjs +2 -4
- package/dist/index96.mjs +28 -13
- package/dist/index97.mjs +18 -7
- package/dist/index98.mjs +214 -11
- package/dist/index99.mjs +179 -4
- package/dist/providers/MetaPixelProvider.d.ts +98 -0
- package/dist/providers/MetaPixelProvider.d.ts.map +1 -0
- package/dist/providers/StorefrontProvider.d.ts +1 -0
- package/dist/providers/StorefrontProvider.d.ts.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +5 -4
- package/src/components/OrderConfirmation.tsx +0 -2
- package/src/components/ShoppingCart.tsx +12 -1
- package/src/contexts/CartContext.tsx +30 -5
- package/src/fetchers.ts +33 -0
- package/src/hooks/usePageTracking.ts +72 -0
- package/src/index.ts +5 -0
- package/src/providers/MetaPixelProvider.tsx +236 -0
- package/src/providers/StorefrontProvider.tsx +29 -3
package/dist/index4.mjs
CHANGED
|
@@ -1,202 +1,87 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { useState as
|
|
4
|
-
import "./
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
locale: F = "en-NG"
|
|
24
|
-
}) {
|
|
25
|
-
var y;
|
|
26
|
-
const [p, j] = E(!1), { data: u, isLoading: D, error: O } = U(N, f, {
|
|
27
|
-
retry: !1
|
|
28
|
-
}), d = M({
|
|
29
|
-
onSuccess: (t) => {
|
|
30
|
-
j(!0);
|
|
31
|
-
},
|
|
32
|
-
onError: (t) => {
|
|
2
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
3
|
+
import { createContext as x, useContext as g, useState as _, useEffect as w } from "react";
|
|
4
|
+
import l from "./index37.mjs";
|
|
5
|
+
const d = x(null);
|
|
6
|
+
function z({ children: c, pixelId: r, debug: P }) {
|
|
7
|
+
const [a, f] = _(!1), k = process.env.NODE_ENV === "development", i = P ?? k;
|
|
8
|
+
w(() => {
|
|
9
|
+
if (!r) {
|
|
10
|
+
i && console.log("[Meta Pixel] No pixel ID provided, tracking disabled");
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
const t = {
|
|
14
|
+
autoConfig: !0,
|
|
15
|
+
debug: i
|
|
16
|
+
};
|
|
17
|
+
l.init(r, void 0, t), f(!0), i && console.log("[Meta Pixel] Initialized with ID:", r);
|
|
18
|
+
}, [r, i]);
|
|
19
|
+
const o = (t, e) => {
|
|
20
|
+
if (!a) {
|
|
21
|
+
i && console.log("[Meta Pixel] Track (not initialized):", t, e);
|
|
22
|
+
return;
|
|
33
23
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
/* @__PURE__ */ e("p", { className: "text-sm text-gray-600", children: "Status" }),
|
|
94
|
-
/* @__PURE__ */ e(g, { className: "mt-1", children: a.status })
|
|
95
|
-
] }),
|
|
96
|
-
/* @__PURE__ */ r("div", { children: [
|
|
97
|
-
/* @__PURE__ */ e("p", { className: "text-sm text-gray-600", children: "Order Date" }),
|
|
98
|
-
/* @__PURE__ */ e("p", { className: "font-medium", children: a.createdAt ? k(a.createdAt) : "N/A" })
|
|
99
|
-
] }),
|
|
100
|
-
/* @__PURE__ */ r("div", { children: [
|
|
101
|
-
/* @__PURE__ */ e("p", { className: "text-sm text-gray-600", children: "Payment Method" }),
|
|
102
|
-
/* @__PURE__ */ e("p", { className: "font-medium", children: a.paymentMethod === "cod" ? "Cash on Delivery" : "Online Payment" })
|
|
103
|
-
] }),
|
|
104
|
-
/* @__PURE__ */ r("div", { children: [
|
|
105
|
-
/* @__PURE__ */ e("p", { className: "text-sm text-gray-600", children: "Estimated Delivery" }),
|
|
106
|
-
/* @__PURE__ */ e("p", { className: "font-medium", children: a.estimatedDays ? `${a.estimatedDays} days` : "TBD" })
|
|
107
|
-
] })
|
|
108
|
-
] }) })
|
|
109
|
-
] }),
|
|
110
|
-
/* @__PURE__ */ r(s, { className: n, children: [
|
|
111
|
-
/* @__PURE__ */ e(m, { children: /* @__PURE__ */ e(o, { children: "Delivery Information" }) }),
|
|
112
|
-
/* @__PURE__ */ r(i, { className: "space-y-3", children: [
|
|
113
|
-
/* @__PURE__ */ r("div", { children: [
|
|
114
|
-
/* @__PURE__ */ e("p", { className: "text-sm text-gray-600", children: "Customer" }),
|
|
115
|
-
/* @__PURE__ */ r("p", { className: "font-medium", children: [
|
|
116
|
-
a.firstName,
|
|
117
|
-
" ",
|
|
118
|
-
a.lastName
|
|
119
|
-
] }),
|
|
120
|
-
/* @__PURE__ */ e("p", { className: "text-sm text-gray-600", children: a.phone })
|
|
121
|
-
] }),
|
|
122
|
-
/* @__PURE__ */ r("div", { children: [
|
|
123
|
-
/* @__PURE__ */ e("p", { className: "text-sm text-gray-600", children: "Address" }),
|
|
124
|
-
/* @__PURE__ */ e("p", { className: "font-medium", children: a.address }),
|
|
125
|
-
/* @__PURE__ */ r("p", { className: "text-sm text-gray-600", children: [
|
|
126
|
-
a.city,
|
|
127
|
-
", ",
|
|
128
|
-
a.deliveryZone.state.name
|
|
129
|
-
] }),
|
|
130
|
-
/* @__PURE__ */ e("p", { className: "text-sm text-gray-600", children: a.deliveryZone.name })
|
|
131
|
-
] })
|
|
132
|
-
] })
|
|
133
|
-
] }),
|
|
134
|
-
/* @__PURE__ */ r(s, { className: n, children: [
|
|
135
|
-
/* @__PURE__ */ e(m, { children: /* @__PURE__ */ e(o, { children: "Items" }) }),
|
|
136
|
-
/* @__PURE__ */ r(i, { children: [
|
|
137
|
-
/* @__PURE__ */ e("div", { className: "space-y-4", children: (y = a.items) == null ? void 0 : y.map((t) => /* @__PURE__ */ r("div", { className: "flex items-start justify-between border-b pb-4 last:border-0", children: [
|
|
138
|
-
/* @__PURE__ */ r("div", { className: "flex items-start space-x-4 flex-1", children: [
|
|
139
|
-
(t.variant.thumbnailUrl || t.variant.product.thumbnailUrl) && /* @__PURE__ */ e(
|
|
140
|
-
"img",
|
|
141
|
-
{
|
|
142
|
-
src: t.variant.thumbnailUrl || t.variant.product.thumbnailUrl || void 0,
|
|
143
|
-
alt: t.variant.product.name,
|
|
144
|
-
className: "w-16 h-16 object-cover rounded"
|
|
145
|
-
}
|
|
146
|
-
),
|
|
147
|
-
/* @__PURE__ */ r("div", { className: "flex-1", children: [
|
|
148
|
-
/* @__PURE__ */ e("p", { className: "font-medium", children: t.variant.product.name }),
|
|
149
|
-
t.variant.name && /* @__PURE__ */ e(g, { variant: "outline", className: "mt-1", children: t.variant.name }),
|
|
150
|
-
/* @__PURE__ */ r("p", { className: "text-sm text-gray-600 mt-1", children: [
|
|
151
|
-
"Quantity: ",
|
|
152
|
-
t.quantity
|
|
153
|
-
] }),
|
|
154
|
-
/* @__PURE__ */ r("p", { className: "text-sm text-gray-600", children: [
|
|
155
|
-
"SKU: ",
|
|
156
|
-
t.variant.sku
|
|
157
|
-
] })
|
|
158
|
-
] })
|
|
159
|
-
] }),
|
|
160
|
-
/* @__PURE__ */ r("div", { className: "text-right", children: [
|
|
161
|
-
/* @__PURE__ */ e("p", { className: "font-medium", children: c(t.priceAtPurchase * t.quantity) }),
|
|
162
|
-
/* @__PURE__ */ r("p", { className: "text-sm text-gray-600", children: [
|
|
163
|
-
c(t.priceAtPurchase),
|
|
164
|
-
" each"
|
|
165
|
-
] })
|
|
166
|
-
] })
|
|
167
|
-
] }, t.id)) }),
|
|
168
|
-
/* @__PURE__ */ r("div", { className: "mt-6 border-t pt-4 space-y-2", children: [
|
|
169
|
-
/* @__PURE__ */ r("div", { className: "flex justify-between text-sm", children: [
|
|
170
|
-
/* @__PURE__ */ e("span", { className: "text-gray-600", children: "Subtotal" }),
|
|
171
|
-
/* @__PURE__ */ e("span", { className: "font-medium", children: c(a.subtotal) })
|
|
172
|
-
] }),
|
|
173
|
-
a.discountAmount && a.discountAmount > 0 && /* @__PURE__ */ r("div", { className: "flex justify-between text-sm text-green-600", children: [
|
|
174
|
-
/* @__PURE__ */ e("span", { children: "Discount" }),
|
|
175
|
-
/* @__PURE__ */ r("span", { children: [
|
|
176
|
-
"-",
|
|
177
|
-
c(a.discountAmount)
|
|
178
|
-
] })
|
|
179
|
-
] }),
|
|
180
|
-
/* @__PURE__ */ r("div", { className: "flex justify-between text-sm", children: [
|
|
181
|
-
/* @__PURE__ */ e("span", { className: "text-gray-600", children: "Delivery Charge" }),
|
|
182
|
-
/* @__PURE__ */ e("span", { className: "font-medium", children: c(a.deliveryCharge) })
|
|
183
|
-
] }),
|
|
184
|
-
/* @__PURE__ */ r("div", { className: "flex justify-between text-lg font-bold border-t pt-2", children: [
|
|
185
|
-
/* @__PURE__ */ e("span", { children: "Total" }),
|
|
186
|
-
/* @__PURE__ */ e("span", { children: c(a.totalPrice) })
|
|
187
|
-
] })
|
|
188
|
-
] })
|
|
189
|
-
] })
|
|
190
|
-
] }),
|
|
191
|
-
/* @__PURE__ */ e(s, { className: n, children: /* @__PURE__ */ e(i, { className: "pt-6", children: /* @__PURE__ */ r("p", { className: "text-sm text-gray-600 text-center", children: [
|
|
192
|
-
"Need help with your order? Call us on ",
|
|
193
|
-
C,
|
|
194
|
-
" or contact us on",
|
|
195
|
-
" ",
|
|
196
|
-
/* @__PURE__ */ e("a", { href: A, target: "_blank", rel: "noopener noreferrer", className: "text-blue-600 hover:underline", children: "WhatsApp" })
|
|
197
|
-
] }) }) })
|
|
198
|
-
] }) });
|
|
24
|
+
l.track(t, e), i && console.log("[Meta Pixel] Track:", t, e);
|
|
25
|
+
}, p = {
|
|
26
|
+
track: o,
|
|
27
|
+
trackPageView: () => {
|
|
28
|
+
if (!a) {
|
|
29
|
+
i && console.log("[Meta Pixel] PageView (not initialized)");
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
l.pageView(), i && console.log("[Meta Pixel] PageView");
|
|
33
|
+
},
|
|
34
|
+
trackProductView: (t, e, n) => {
|
|
35
|
+
o("ViewContent", {
|
|
36
|
+
content_ids: [t],
|
|
37
|
+
content_name: e,
|
|
38
|
+
content_type: "product",
|
|
39
|
+
value: n,
|
|
40
|
+
currency: "NGN"
|
|
41
|
+
});
|
|
42
|
+
},
|
|
43
|
+
trackAddToCart: (t, e, n, s) => {
|
|
44
|
+
o("AddToCart", {
|
|
45
|
+
content_ids: [t],
|
|
46
|
+
content_name: e,
|
|
47
|
+
content_type: "product",
|
|
48
|
+
value: n,
|
|
49
|
+
currency: "NGN",
|
|
50
|
+
num_items: s
|
|
51
|
+
});
|
|
52
|
+
},
|
|
53
|
+
trackInitiateCheckout: (t, e) => {
|
|
54
|
+
o("InitiateCheckout", {
|
|
55
|
+
value: t,
|
|
56
|
+
currency: "NGN",
|
|
57
|
+
num_items: e
|
|
58
|
+
});
|
|
59
|
+
},
|
|
60
|
+
trackPurchase: (t, e, n, s) => {
|
|
61
|
+
o("Purchase", {
|
|
62
|
+
value: t,
|
|
63
|
+
currency: e,
|
|
64
|
+
content_type: "product",
|
|
65
|
+
contents: s.map((u) => ({
|
|
66
|
+
id: u.id,
|
|
67
|
+
// SKU
|
|
68
|
+
quantity: u.quantity,
|
|
69
|
+
item_price: u.item_price
|
|
70
|
+
})),
|
|
71
|
+
order_id: n
|
|
72
|
+
});
|
|
73
|
+
},
|
|
74
|
+
isInitialized: a
|
|
75
|
+
};
|
|
76
|
+
return /* @__PURE__ */ m(d.Provider, { value: p, children: c });
|
|
77
|
+
}
|
|
78
|
+
function D() {
|
|
79
|
+
const c = g(d);
|
|
80
|
+
if (!c)
|
|
81
|
+
throw new Error("useMetaPixel must be used within MetaPixelProvider");
|
|
82
|
+
return c;
|
|
199
83
|
}
|
|
200
84
|
export {
|
|
201
|
-
|
|
85
|
+
z as MetaPixelProvider,
|
|
86
|
+
D as useMetaPixel
|
|
202
87
|
};
|
package/dist/index40.mjs
CHANGED
|
@@ -1,39 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
|
|
3
|
-
const {
|
|
4
|
-
Axios: e,
|
|
5
|
-
AxiosError: a,
|
|
6
|
-
CanceledError: s,
|
|
7
|
-
isCancel: t,
|
|
8
|
-
CancelToken: i,
|
|
9
|
-
VERSION: l,
|
|
10
|
-
all: n,
|
|
11
|
-
Cancel: d,
|
|
12
|
-
isAxiosError: x,
|
|
13
|
-
spread: C,
|
|
14
|
-
toFormData: c,
|
|
15
|
-
AxiosHeaders: m,
|
|
16
|
-
HttpStatusCode: p,
|
|
17
|
-
formToJSON: A,
|
|
18
|
-
getAdapter: f,
|
|
19
|
-
mergeConfig: E
|
|
20
|
-
} = o;
|
|
2
|
+
const c = "data:image/svg+xml,%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%20280.6%2050'%20style='enable-background:new%200%200%20280.6%2050;'%20xml:space='preserve'%3e%3cstyle%20type='text/css'%3e%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c1.4,0.5,2.9,0.7,4.5,0.7c2.7,0,5-0.7,6.7-2.2c1.8-1.6,3.1-3.7,3.8-6%20l8.7-28.3c0.2-0.5,0.2-1,0-1.5C149.7,11.6,149.3,11.3,148.5,11.3L148.5,11.3z%20M148.5,11.3'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e";
|
|
21
3
|
export {
|
|
22
|
-
|
|
23
|
-
a as AxiosError,
|
|
24
|
-
m as AxiosHeaders,
|
|
25
|
-
d as Cancel,
|
|
26
|
-
i as CancelToken,
|
|
27
|
-
s as CanceledError,
|
|
28
|
-
p as HttpStatusCode,
|
|
29
|
-
l as VERSION,
|
|
30
|
-
n as all,
|
|
31
|
-
o as default,
|
|
32
|
-
A as formToJSON,
|
|
33
|
-
f as getAdapter,
|
|
34
|
-
x as isAxiosError,
|
|
35
|
-
t as isCancel,
|
|
36
|
-
E as mergeConfig,
|
|
37
|
-
C as spread,
|
|
38
|
-
c as toFormData
|
|
4
|
+
c as default
|
|
39
5
|
};
|
package/dist/index41.mjs
CHANGED
|
@@ -1,47 +1,60 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
2
|
+
import { useState as c, useEffect as f, useCallback as k } from "react";
|
|
3
|
+
function P({
|
|
4
|
+
publicKey: d,
|
|
5
|
+
onSuccess: e,
|
|
6
|
+
onClose: a
|
|
7
|
+
}) {
|
|
8
|
+
const [i, o] = c(!1), [l, r] = c(!1), [p, n] = c(null);
|
|
9
|
+
f(() => {
|
|
10
|
+
if (window.PaystackPop) {
|
|
11
|
+
o(!0);
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
const s = document.querySelector('script[src="https://js.paystack.co/v1/inline.js"]');
|
|
15
|
+
if (s) {
|
|
16
|
+
s.addEventListener("load", () => o(!0));
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
const t = document.createElement("script");
|
|
20
|
+
return t.src = "https://js.paystack.co/v1/inline.js", t.async = !0, t.onload = () => {
|
|
21
|
+
o(!0);
|
|
22
|
+
}, t.onerror = () => {
|
|
23
|
+
n("Failed to load Paystack script");
|
|
24
|
+
}, document.body.appendChild(t), () => {
|
|
25
|
+
};
|
|
26
|
+
}, []);
|
|
27
|
+
const u = k(
|
|
28
|
+
(s) => {
|
|
29
|
+
if (!i || !window.PaystackPop) {
|
|
30
|
+
n("Paystack script not loaded");
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
r(!0), n(null);
|
|
34
|
+
try {
|
|
35
|
+
window.PaystackPop.setup({
|
|
36
|
+
...s,
|
|
37
|
+
key: d,
|
|
38
|
+
callback: (y) => {
|
|
39
|
+
r(!1), e == null || e(y);
|
|
40
|
+
},
|
|
41
|
+
onClose: () => {
|
|
42
|
+
r(!1), a == null || a();
|
|
43
|
+
}
|
|
44
|
+
}).openIframe();
|
|
45
|
+
} catch (t) {
|
|
46
|
+
r(!1), n(t instanceof Error ? t.message : "Failed to initialize payment");
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
[i, d, e, a]
|
|
50
|
+
);
|
|
51
|
+
return {
|
|
52
|
+
isLoaded: i,
|
|
53
|
+
isLoading: l,
|
|
54
|
+
error: p,
|
|
55
|
+
initializePayment: u
|
|
56
|
+
};
|
|
24
57
|
}
|
|
25
|
-
const r = n(f);
|
|
26
|
-
r.Axios = m;
|
|
27
|
-
r.CanceledError = c;
|
|
28
|
-
r.CancelToken = d;
|
|
29
|
-
r.isCancel = u;
|
|
30
|
-
r.VERSION = x;
|
|
31
|
-
r.toFormData = C;
|
|
32
|
-
r.AxiosError = A;
|
|
33
|
-
r.Cancel = r.CanceledError;
|
|
34
|
-
r.all = function(t) {
|
|
35
|
-
return Promise.all(t);
|
|
36
|
-
};
|
|
37
|
-
r.spread = E;
|
|
38
|
-
r.isAxiosError = O;
|
|
39
|
-
r.mergeConfig = i;
|
|
40
|
-
r.AxiosHeaders = S;
|
|
41
|
-
r.formToJSON = (o) => l(a.isHTMLForm(o) ? new FormData(o) : o);
|
|
42
|
-
r.getAdapter = H.getAdapter;
|
|
43
|
-
r.HttpStatusCode = T;
|
|
44
|
-
r.default = r;
|
|
45
58
|
export {
|
|
46
|
-
|
|
59
|
+
P as usePaystackPayment
|
|
47
60
|
};
|
package/dist/index42.mjs
CHANGED
|
@@ -1,102 +1,54 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
},
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
return
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
2
|
+
import * as l from "react";
|
|
3
|
+
import { composeRefs as m } from "./index63.mjs";
|
|
4
|
+
import { jsx as u } from "react/jsx-runtime";
|
|
5
|
+
// @__NO_SIDE_EFFECTS__
|
|
6
|
+
function y(e) {
|
|
7
|
+
const t = /* @__PURE__ */ S(e), o = l.forwardRef((n, r) => {
|
|
8
|
+
const { children: i, ...c } = n, s = l.Children.toArray(i), a = s.find(E);
|
|
9
|
+
if (a) {
|
|
10
|
+
const f = a.props.children, d = s.map((p) => p === a ? l.Children.count(f) > 1 ? l.Children.only(null) : l.isValidElement(f) ? f.props.children : null : p);
|
|
11
|
+
return /* @__PURE__ */ u(t, { ...c, ref: r, children: l.isValidElement(f) ? l.cloneElement(f, void 0, d) : null });
|
|
12
|
+
}
|
|
13
|
+
return /* @__PURE__ */ u(t, { ...c, ref: r, children: i });
|
|
14
|
+
});
|
|
15
|
+
return o.displayName = `${e}.Slot`, o;
|
|
16
|
+
}
|
|
17
|
+
var V = /* @__PURE__ */ y("Slot");
|
|
18
|
+
// @__NO_SIDE_EFFECTS__
|
|
19
|
+
function S(e) {
|
|
20
|
+
const t = l.forwardRef((o, n) => {
|
|
21
|
+
const { children: r, ...i } = o;
|
|
22
|
+
if (l.isValidElement(r)) {
|
|
23
|
+
const c = R(r), s = C(i, r.props);
|
|
24
|
+
return r.type !== l.Fragment && (s.ref = n ? m(n, c) : c), l.cloneElement(r, s);
|
|
25
|
+
}
|
|
26
|
+
return l.Children.count(r) > 1 ? l.Children.only(null) : null;
|
|
27
|
+
});
|
|
28
|
+
return t.displayName = `${e}.SlotClone`, t;
|
|
29
|
+
}
|
|
30
|
+
var g = Symbol("radix.slottable");
|
|
31
|
+
function E(e) {
|
|
32
|
+
return l.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === g;
|
|
33
|
+
}
|
|
34
|
+
function C(e, t) {
|
|
35
|
+
const o = { ...t };
|
|
36
|
+
for (const n in t) {
|
|
37
|
+
const r = e[n], i = t[n];
|
|
38
|
+
/^on[A-Z]/.test(n) ? r && i ? o[n] = (...s) => {
|
|
39
|
+
const a = i(...s);
|
|
40
|
+
return r(...s), a;
|
|
41
|
+
} : r && (o[n] = r) : n === "style" ? o[n] = { ...r, ...i } : n === "className" && (o[n] = [r, i].filter(Boolean).join(" "));
|
|
18
42
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
h(this, "cType");
|
|
27
|
-
h(this, "fetch", async (r, e) => {
|
|
28
|
-
if (r) {
|
|
29
|
-
if (r.query && (this.queryParams = S(r.query)), r.form) {
|
|
30
|
-
const o = new FormData();
|
|
31
|
-
for (const [c, f] of Object.entries(r.form))
|
|
32
|
-
if (Array.isArray(f))
|
|
33
|
-
for (const l of f)
|
|
34
|
-
o.append(c, l);
|
|
35
|
-
else
|
|
36
|
-
o.append(c, f);
|
|
37
|
-
this.rBody = o;
|
|
38
|
-
}
|
|
39
|
-
r.json && (this.rBody = JSON.stringify(r.json), this.cType = "application/json"), r.param && (this.pathParams = r.param);
|
|
40
|
-
}
|
|
41
|
-
let i = this.method.toUpperCase();
|
|
42
|
-
const t = {
|
|
43
|
-
...r == null ? void 0 : r.header,
|
|
44
|
-
...typeof (e == null ? void 0 : e.headers) == "function" ? await e.headers() : e == null ? void 0 : e.headers
|
|
45
|
-
};
|
|
46
|
-
if (r != null && r.cookie) {
|
|
47
|
-
const o = [];
|
|
48
|
-
for (const [c, f] of Object.entries(r.cookie))
|
|
49
|
-
o.push(j(c, f, { path: "/" }));
|
|
50
|
-
t.Cookie = o.join(",");
|
|
51
|
-
}
|
|
52
|
-
this.cType && (t["Content-Type"] = this.cType);
|
|
53
|
-
const s = new Headers(t ?? void 0);
|
|
54
|
-
let a = this.url;
|
|
55
|
-
a = w(a), a = P(a, this.pathParams), this.queryParams && (a = a + "?" + this.queryParams.toString()), i = this.method.toUpperCase();
|
|
56
|
-
const u = !(i === "GET" || i === "HEAD");
|
|
57
|
-
return ((e == null ? void 0 : e.fetch) || fetch)(a, {
|
|
58
|
-
body: u ? this.rBody : void 0,
|
|
59
|
-
method: i,
|
|
60
|
-
headers: s,
|
|
61
|
-
...e == null ? void 0 : e.init
|
|
62
|
-
});
|
|
63
|
-
});
|
|
64
|
-
this.url = r, this.method = e;
|
|
65
|
-
}
|
|
66
|
-
}, E = (r, e) => v(function i(t) {
|
|
67
|
-
var l;
|
|
68
|
-
const s = [...t.path], a = s.slice(-3).reverse();
|
|
69
|
-
if (a[0] === "toString")
|
|
70
|
-
return a[1] === "name" ? a[2] || "" : i.toString();
|
|
71
|
-
if (a[0] === "valueOf")
|
|
72
|
-
return a[1] === "name" ? a[2] || "" : i;
|
|
73
|
-
let u = "";
|
|
74
|
-
if (/^\$/.test(a[0])) {
|
|
75
|
-
const n = s.pop();
|
|
76
|
-
n && (u = n.replace(/^\$/, ""));
|
|
77
|
-
}
|
|
78
|
-
const o = s.join("/"), c = U(r, o);
|
|
79
|
-
if (u === "url") {
|
|
80
|
-
let n = c;
|
|
81
|
-
return t.args[0] && (t.args[0].param && (n = P(c, t.args[0].param)), t.args[0].query && (n = n + "?" + S(t.args[0].query).toString())), n = w(n), new URL(n);
|
|
82
|
-
}
|
|
83
|
-
if (u === "ws") {
|
|
84
|
-
const n = x(
|
|
85
|
-
t.args[0] && t.args[0].param ? P(c, t.args[0].param) : c,
|
|
86
|
-
"ws"
|
|
87
|
-
), y = new URL(n), b = (l = t.args[0]) == null ? void 0 : l.query;
|
|
88
|
-
return b && Object.entries(b).forEach(([m, d]) => {
|
|
89
|
-
Array.isArray(d) ? d.forEach((q) => y.searchParams.append(m, q)) : y.searchParams.set(m, d);
|
|
90
|
-
}), ((...m) => (e == null ? void 0 : e.webSocket) !== void 0 && typeof e.webSocket == "function" ? e.webSocket(...m) : new WebSocket(...m))(y.toString());
|
|
91
|
-
}
|
|
92
|
-
const f = new T(c, u);
|
|
93
|
-
if (u) {
|
|
94
|
-
e ?? (e = {});
|
|
95
|
-
const n = C(e, { ...t.args[1] });
|
|
96
|
-
return f.fetch(t.args[0], n);
|
|
97
|
-
}
|
|
98
|
-
return f;
|
|
99
|
-
}, []);
|
|
43
|
+
return { ...e, ...o };
|
|
44
|
+
}
|
|
45
|
+
function R(e) {
|
|
46
|
+
var n, r;
|
|
47
|
+
let t = (n = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : n.get, o = t && "isReactWarning" in t && t.isReactWarning;
|
|
48
|
+
return o ? e.ref : (t = (r = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : r.get, o = t && "isReactWarning" in t && t.isReactWarning, o ? e.props.ref : e.props.ref || e.ref);
|
|
49
|
+
}
|
|
100
50
|
export {
|
|
101
|
-
|
|
51
|
+
V as Root,
|
|
52
|
+
V as Slot,
|
|
53
|
+
y as createSlot
|
|
102
54
|
};
|