@instockng/storefront-ui 1.0.9 → 1.0.10
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/contexts/CartContext.d.ts.map +1 -1
- package/dist/index105.mjs +1 -1
- package/dist/index3.mjs +72 -68
- package/dist/index81.mjs +1 -1
- package/dist/index83.mjs +1 -1
- package/dist/index84.mjs +2 -2
- package/dist/index88.mjs +2 -2
- package/dist/index93.mjs +30 -12
- package/dist/index94.mjs +11 -7
- package/dist/index95.mjs +3 -30
- package/dist/index96.mjs +3 -10
- package/dist/index97.mjs +13 -4
- package/dist/index98.mjs +7 -4
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CartContext.d.ts","sourceRoot":"","sources":["../../src/contexts/CartContext.tsx"],"names":[],"mappings":"AAEA;;;;;;GAMG;AAEH,OAAO,EAAkD,SAAS,EAAuB,MAAM,OAAO,CAAC;AACvG,OAAO,EAGL,aAAa,EAMb,eAAe,EACf,KAAK,IAAI,EACV,MAAM,iBAAiB,CAAC;AAKzB,UAAU,gBAAgB;IACxB,wBAAwB;IACxB,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;IAClB,mDAAmD;IACnD,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,oBAAoB;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,kBAAkB;IAClB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IACpB,gDAAgD;IAChD,kBAAkB,EAAE,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC;IACrD,+CAA+C;IAC/C,gBAAgB,EAAE,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC;IACrD,8BAA8B;IAC9B,OAAO,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1D,2BAA2B;IAC3B,UAAU,EAAE,CAAC,MAAM,EAAE,MAAM,E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qC;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB,wDAAwD;IACxD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,kDAAkD;IAClD,iBAAiB,CAAC,EAAE,IAAI,CAAC,OAAO,4BAA4B,EAAE,iBAAiB,EAAE,QAAQ,GAAG,SAAS,CAAC,CAAC;CACxG;AAED,wBAAgB,YAAY,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,aAAa,EAAE,iBAAiB,EAAE,EAAE,iBAAiB,2CAoMxG;AAED;;GAEG;AACH,wBAAgB,OAAO,qBAMtB"}
|
package/dist/index105.mjs
CHANGED
package/dist/index3.mjs
CHANGED
|
@@ -1,20 +1,24 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import { createContext as
|
|
2
|
+
import { jsxs as T, jsx as z } from "react/jsx-runtime";
|
|
3
|
+
import { createContext as G, useState as C, useRef as I, useEffect as m, useCallback as r, useContext as H } from "react";
|
|
4
4
|
import "./index18.mjs";
|
|
5
|
-
import {
|
|
5
|
+
import { useGetCart as K, useCreateCart as Y, useAddCartItem as q, useUpdateCartItem as B, useRemoveCartItem as J, useApplyDiscount as Q, useRemoveDiscount as V, useUpdateCart as W, useCheckoutCart as X } from "./index29.mjs";
|
|
6
6
|
import "@tanstack/react-query";
|
|
7
|
-
import { ShoppingCart as
|
|
8
|
-
const
|
|
9
|
-
function
|
|
10
|
-
const [t, i] =
|
|
7
|
+
import { ShoppingCart as Z } from "./index8.mjs";
|
|
8
|
+
const c = "oms_cart_id", y = G(null);
|
|
9
|
+
function at({ children: a, brandSlug: h, initialCartId: u, shoppingCartProps: v }) {
|
|
10
|
+
const [t, i] = C(() => {
|
|
11
11
|
if (u) return u;
|
|
12
12
|
if (typeof window < "u") {
|
|
13
13
|
const n = new URLSearchParams(window.location.search).get("cartId");
|
|
14
|
-
return n || localStorage.getItem(
|
|
14
|
+
return n || localStorage.getItem(c);
|
|
15
15
|
}
|
|
16
16
|
return null;
|
|
17
|
-
}), [
|
|
17
|
+
}), [f, d] = C(!1), { data: S, isLoading: D, error: s, refetch: o } = K(t || "", {
|
|
18
|
+
enabled: !!t,
|
|
19
|
+
retry: !1
|
|
20
|
+
// Don't retry on failure - cart might be invalid/expired
|
|
21
|
+
}), w = I(!1), l = I(!1), g = Y({
|
|
18
22
|
onSuccess: (e) => {
|
|
19
23
|
if ("error" in e) {
|
|
20
24
|
console.error("Failed to create cart:", e.error);
|
|
@@ -25,107 +29,107 @@ function nt({ children: a, brandSlug: I, initialCartId: u, shoppingCartProps: y
|
|
|
25
29
|
onError: (e) => {
|
|
26
30
|
console.error("Failed to create cart:", e);
|
|
27
31
|
}
|
|
28
|
-
}), { data: S, isLoading: v, error: c, refetch: o } = Y(t || "", {
|
|
29
|
-
enabled: !!t,
|
|
30
|
-
retry: !1
|
|
31
|
-
// Don't retry on failure - cart might be invalid/expired
|
|
32
32
|
});
|
|
33
|
-
|
|
34
|
-
!
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}, [
|
|
38
|
-
|
|
33
|
+
m(() => {
|
|
34
|
+
!w.current && !t && !u && (w.current = !0, setTimeout(() => {
|
|
35
|
+
g.mutate(h);
|
|
36
|
+
}, 0));
|
|
37
|
+
}, []), m(() => {
|
|
38
|
+
s && t && !l.current && (l.current = !0, console.warn("Cart fetch failed, clearing invalid cart:", s), Promise.resolve().then(() => {
|
|
39
|
+
i(null), typeof window < "u" && localStorage.removeItem(c), l.current = !1;
|
|
40
|
+
}));
|
|
41
|
+
}, [s, t]);
|
|
42
|
+
const E = q(t || "", {
|
|
39
43
|
onSuccess: () => o()
|
|
40
|
-
}),
|
|
44
|
+
}), A = B(t || "", {
|
|
41
45
|
onSuccess: () => o()
|
|
42
|
-
}),
|
|
46
|
+
}), M = J(t || "", {
|
|
43
47
|
onSuccess: () => o()
|
|
44
|
-
}),
|
|
48
|
+
}), x = Q(t || "", {
|
|
45
49
|
onSuccess: () => o()
|
|
46
|
-
}),
|
|
50
|
+
}), P = V(t || "", {
|
|
47
51
|
onSuccess: () => o()
|
|
48
|
-
}),
|
|
52
|
+
}), R = W(t || "", {
|
|
49
53
|
onSuccess: () => o()
|
|
50
|
-
}),
|
|
51
|
-
|
|
52
|
-
t && typeof window < "u" && localStorage.setItem(
|
|
54
|
+
}), N = X(t || "");
|
|
55
|
+
m(() => {
|
|
56
|
+
t && typeof window < "u" && localStorage.setItem(c, t);
|
|
53
57
|
}, [t]);
|
|
54
|
-
const
|
|
58
|
+
const U = r(
|
|
55
59
|
async (e, n) => {
|
|
56
60
|
if (!t) throw new Error("No cart ID");
|
|
57
|
-
await
|
|
61
|
+
await E.mutateAsync({ sku: e, quantity: n });
|
|
58
62
|
},
|
|
59
63
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
60
64
|
[t]
|
|
61
|
-
),
|
|
65
|
+
), _ = r(
|
|
62
66
|
async (e, n) => {
|
|
63
67
|
if (!t) throw new Error("No cart ID");
|
|
64
|
-
await
|
|
68
|
+
await A.mutateAsync({ itemId: e, quantity: n });
|
|
65
69
|
},
|
|
66
70
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
67
71
|
[t]
|
|
68
|
-
),
|
|
72
|
+
), b = r(
|
|
69
73
|
async (e) => {
|
|
70
74
|
if (!t) throw new Error("No cart ID");
|
|
71
|
-
await
|
|
75
|
+
await M.mutateAsync(e);
|
|
72
76
|
},
|
|
73
77
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
74
78
|
[t]
|
|
75
|
-
),
|
|
79
|
+
), k = r(
|
|
76
80
|
async (e) => {
|
|
77
81
|
if (!t) throw new Error("No cart ID");
|
|
78
|
-
await
|
|
82
|
+
await x.mutateAsync({ code: e });
|
|
79
83
|
},
|
|
80
84
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
81
85
|
[t]
|
|
82
|
-
),
|
|
86
|
+
), F = r(async () => {
|
|
83
87
|
if (!t) throw new Error("No cart ID");
|
|
84
|
-
await
|
|
85
|
-
}, [t]),
|
|
86
|
-
i(null), typeof window < "u" && localStorage.removeItem(
|
|
87
|
-
}, []),
|
|
88
|
-
|
|
89
|
-
}, []),
|
|
90
|
-
|
|
91
|
-
}, []),
|
|
88
|
+
await P.mutateAsync();
|
|
89
|
+
}, [t]), j = r(() => {
|
|
90
|
+
i(null), typeof window < "u" && localStorage.removeItem(c);
|
|
91
|
+
}, []), L = r(() => {
|
|
92
|
+
d(!0);
|
|
93
|
+
}, []), p = r(() => {
|
|
94
|
+
d(!1);
|
|
95
|
+
}, []), O = {
|
|
92
96
|
cart: S || null,
|
|
93
97
|
cartId: t,
|
|
94
|
-
isLoading:
|
|
95
|
-
error:
|
|
96
|
-
updateCartMutation:
|
|
97
|
-
checkoutMutation:
|
|
98
|
-
addItem:
|
|
99
|
-
updateItem:
|
|
100
|
-
removeItem:
|
|
101
|
-
applyDiscount:
|
|
102
|
-
removeDiscount:
|
|
103
|
-
clearCart:
|
|
98
|
+
isLoading: D,
|
|
99
|
+
error: s,
|
|
100
|
+
updateCartMutation: R,
|
|
101
|
+
checkoutMutation: N,
|
|
102
|
+
addItem: U,
|
|
103
|
+
updateItem: _,
|
|
104
|
+
removeItem: b,
|
|
105
|
+
applyDiscount: k,
|
|
106
|
+
removeDiscount: F,
|
|
107
|
+
clearCart: j,
|
|
104
108
|
refetch: o,
|
|
105
|
-
isOpen:
|
|
106
|
-
open:
|
|
107
|
-
close:
|
|
109
|
+
isOpen: f,
|
|
110
|
+
open: L,
|
|
111
|
+
close: p
|
|
108
112
|
};
|
|
109
|
-
return /* @__PURE__ */
|
|
113
|
+
return /* @__PURE__ */ T(y.Provider, { value: O, children: [
|
|
110
114
|
a,
|
|
111
|
-
/* @__PURE__ */
|
|
112
|
-
|
|
115
|
+
/* @__PURE__ */ z(
|
|
116
|
+
Z,
|
|
113
117
|
{
|
|
114
|
-
isOpen:
|
|
115
|
-
onClose:
|
|
116
|
-
...
|
|
118
|
+
isOpen: f,
|
|
119
|
+
onClose: p,
|
|
120
|
+
...v
|
|
117
121
|
}
|
|
118
122
|
)
|
|
119
123
|
] });
|
|
120
124
|
}
|
|
121
|
-
function
|
|
122
|
-
const a =
|
|
125
|
+
function st() {
|
|
126
|
+
const a = H(y);
|
|
123
127
|
if (!a)
|
|
124
128
|
throw new Error("useCart must be used within CartProvider");
|
|
125
129
|
return a;
|
|
126
130
|
}
|
|
127
131
|
export {
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
132
|
+
y as CartContext,
|
|
133
|
+
at as CartProvider,
|
|
134
|
+
st as useCart
|
|
131
135
|
};
|
package/dist/index81.mjs
CHANGED
package/dist/index83.mjs
CHANGED
package/dist/index84.mjs
CHANGED
package/dist/index88.mjs
CHANGED
package/dist/index93.mjs
CHANGED
|
@@ -1,16 +1,34 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
2
|
+
import p from "./index72.mjs";
|
|
3
|
+
function i(n) {
|
|
4
|
+
const t = {
|
|
5
|
+
"!": "%21",
|
|
6
|
+
"'": "%27",
|
|
7
|
+
"(": "%28",
|
|
8
|
+
")": "%29",
|
|
9
|
+
"~": "%7E",
|
|
10
|
+
"%20": "+",
|
|
11
|
+
"%00": "\0"
|
|
12
|
+
};
|
|
13
|
+
return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g, function(r) {
|
|
14
|
+
return t[r];
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
function a(n, t) {
|
|
18
|
+
this._pairs = [], n && p(n, this, t);
|
|
19
|
+
}
|
|
20
|
+
const c = a.prototype;
|
|
21
|
+
c.append = function(t, o) {
|
|
22
|
+
this._pairs.push([t, o]);
|
|
23
|
+
};
|
|
24
|
+
c.toString = function(t) {
|
|
25
|
+
const o = t ? function(r) {
|
|
26
|
+
return t.call(this, r, i);
|
|
27
|
+
} : i;
|
|
28
|
+
return this._pairs.map(function(e) {
|
|
29
|
+
return o(e[0]) + "=" + o(e[1]);
|
|
30
|
+
}, "").join("&");
|
|
13
31
|
};
|
|
14
32
|
export {
|
|
15
|
-
|
|
33
|
+
a as default
|
|
16
34
|
};
|
package/dist/index94.mjs
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import i from "./index62.mjs";
|
|
3
|
+
import m from "./index66.mjs";
|
|
4
|
+
import s from "./index76.mjs";
|
|
5
|
+
function h(f, t) {
|
|
6
|
+
const o = this || m, r = t || o, n = s.from(r.headers);
|
|
7
|
+
let a = r.data;
|
|
8
|
+
return i.forEach(f, function(e) {
|
|
9
|
+
a = e.call(o, a, n.normalize(), t ? t.status : void 0);
|
|
10
|
+
}), n.normalize(), a;
|
|
11
|
+
}
|
|
4
12
|
export {
|
|
5
|
-
|
|
6
|
-
n as hasStandardBrowserEnv,
|
|
7
|
-
t as hasStandardBrowserWebWorkerEnv,
|
|
8
|
-
o as navigator,
|
|
9
|
-
r as origin
|
|
13
|
+
h as default
|
|
10
14
|
};
|
package/dist/index95.mjs
CHANGED
|
@@ -1,34 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const t = {
|
|
5
|
-
"!": "%21",
|
|
6
|
-
"'": "%27",
|
|
7
|
-
"(": "%28",
|
|
8
|
-
")": "%29",
|
|
9
|
-
"~": "%7E",
|
|
10
|
-
"%20": "+",
|
|
11
|
-
"%00": "\0"
|
|
12
|
-
};
|
|
13
|
-
return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g, function(r) {
|
|
14
|
-
return t[r];
|
|
15
|
-
});
|
|
2
|
+
function e(t) {
|
|
3
|
+
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);
|
|
16
4
|
}
|
|
17
|
-
function a(n, t) {
|
|
18
|
-
this._pairs = [], n && p(n, this, t);
|
|
19
|
-
}
|
|
20
|
-
const c = a.prototype;
|
|
21
|
-
c.append = function(t, o) {
|
|
22
|
-
this._pairs.push([t, o]);
|
|
23
|
-
};
|
|
24
|
-
c.toString = function(t) {
|
|
25
|
-
const o = t ? function(r) {
|
|
26
|
-
return t.call(this, r, i);
|
|
27
|
-
} : i;
|
|
28
|
-
return this._pairs.map(function(e) {
|
|
29
|
-
return o(e[0]) + "=" + o(e[1]);
|
|
30
|
-
}, "").join("&");
|
|
31
|
-
};
|
|
32
5
|
export {
|
|
33
|
-
|
|
6
|
+
e as default
|
|
34
7
|
};
|
package/dist/index96.mjs
CHANGED
|
@@ -1,14 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import s from "./index76.mjs";
|
|
5
|
-
function h(f, t) {
|
|
6
|
-
const o = this || m, r = t || o, n = s.from(r.headers);
|
|
7
|
-
let a = r.data;
|
|
8
|
-
return i.forEach(f, function(e) {
|
|
9
|
-
a = e.call(o, a, n.normalize(), t ? t.status : void 0);
|
|
10
|
-
}), n.normalize(), a;
|
|
2
|
+
function n(e, c) {
|
|
3
|
+
return c ? e.replace(/\/?\/$/, "") + "/" + c.replace(/^\/+/, "") : e;
|
|
11
4
|
}
|
|
12
5
|
export {
|
|
13
|
-
|
|
6
|
+
n as default
|
|
14
7
|
};
|
package/dist/index97.mjs
CHANGED
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import o from "./index105.mjs";
|
|
3
|
+
import r from "./index106.mjs";
|
|
4
|
+
import t from "./index107.mjs";
|
|
5
|
+
const l = {
|
|
6
|
+
isBrowser: !0,
|
|
7
|
+
classes: {
|
|
8
|
+
URLSearchParams: o,
|
|
9
|
+
FormData: r,
|
|
10
|
+
Blob: t
|
|
11
|
+
},
|
|
12
|
+
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
13
|
+
};
|
|
5
14
|
export {
|
|
6
|
-
|
|
15
|
+
l as default
|
|
7
16
|
};
|
package/dist/index98.mjs
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
}
|
|
2
|
+
const e = typeof window < "u" && typeof document < "u", o = typeof navigator == "object" && navigator || void 0, n = e && (!o || ["ReactNative", "NativeScript", "NS"].indexOf(o.product) < 0), t = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
3
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", r = e && window.location.href || "http://localhost";
|
|
5
4
|
export {
|
|
6
|
-
|
|
5
|
+
e as hasBrowserEnv,
|
|
6
|
+
n as hasStandardBrowserEnv,
|
|
7
|
+
t as hasStandardBrowserWebWorkerEnv,
|
|
8
|
+
o as navigator,
|
|
9
|
+
r as origin
|
|
7
10
|
};
|