@instockng/storefront-ui 1.0.9 → 1.0.11
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/README.md +26 -0
- package/dist/components/Checkout.d.ts.map +1 -1
- package/dist/contexts/CartContext.d.ts.map +1 -1
- package/dist/index10.mjs +144 -141
- package/dist/index101.mjs +1 -1
- package/dist/index102.mjs +3 -3
- package/dist/index103.mjs +3 -3
- package/dist/index105.mjs +1 -1
- package/dist/index111.mjs +1 -1
- package/dist/index20.mjs +2 -2
- package/dist/index21.mjs +1 -1
- package/dist/index28.mjs +11 -11
- package/dist/index29.mjs +1 -1
- package/dist/index3.mjs +88 -74
- package/dist/index30.mjs +1 -1
- package/dist/index31.mjs +1 -1
- package/dist/index32.mjs +1 -1
- package/dist/index37.mjs +1 -1
- package/dist/index41.mjs +36 -23
- package/dist/index42.mjs +44 -36
- package/dist/index43.mjs +99 -44
- package/dist/index44.mjs +112 -99
- package/dist/index45.mjs +44 -80
- package/dist/index46.mjs +64 -53
- package/dist/index47.mjs +66 -49
- package/dist/index48.mjs +54 -73
- package/dist/index49.mjs +52 -63
- package/dist/index50.mjs +14 -70
- package/dist/index51.mjs +13 -14
- package/dist/index52.mjs +58 -13
- package/dist/index53.mjs +101 -34
- package/dist/index54.mjs +99 -95
- package/dist/index55.mjs +22 -132
- package/dist/index58.mjs +2 -2
- package/dist/index59.mjs +4 -3
- package/dist/index60.mjs +4 -2
- package/dist/index61.mjs +2 -5
- package/dist/index62.mjs +30 -231
- package/dist/index63.mjs +42 -5
- package/dist/index64.mjs +228 -127
- package/dist/index65.mjs +4 -66
- package/dist/index66.mjs +124 -77
- package/dist/index67.mjs +65 -26
- package/dist/index68.mjs +84 -6
- package/dist/index69.mjs +26 -72
- package/dist/index70.mjs +8 -3
- package/dist/index71.mjs +75 -2
- package/dist/index72.mjs +3 -82
- package/dist/index73.mjs +2 -54
- package/dist/index74.mjs +82 -5
- package/dist/index75.mjs +53 -4
- package/dist/index76.mjs +5 -178
- package/dist/index77.mjs +5 -53
- package/dist/index78.mjs +178 -68
- package/dist/index79.mjs +50 -31
- package/dist/index80.mjs +69 -43
- package/dist/index81.mjs +2 -2
- package/dist/index82.mjs +1 -1
- package/dist/index83.mjs +6 -6
- package/dist/index84.mjs +2 -2
- package/dist/index85.mjs +2 -2
- package/dist/index87.mjs +2 -2
- package/dist/index88.mjs +2 -2
- package/dist/index89.mjs +1 -1
- package/dist/index91.mjs +4 -4
- package/dist/index92.mjs +3 -3
- 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/dist/index99.mjs +1 -1
- package/dist/styles.css +1 -0
- package/package.json +14 -13
- package/src/components/CartItem.stories.tsx +94 -0
- package/src/components/CartItem.tsx +141 -0
- package/src/components/Checkout.stories.tsx +380 -0
- package/src/components/Checkout.tsx +954 -0
- package/src/components/DiscountCodeInput.stories.tsx +76 -0
- package/src/components/DiscountCodeInput.tsx +162 -0
- package/src/components/OrderConfirmation.stories.tsx +142 -0
- package/src/components/OrderConfirmation.tsx +301 -0
- package/src/components/ProductCard.stories.tsx +112 -0
- package/src/components/ProductCard.tsx +195 -0
- package/src/components/ProductGrid.stories.tsx +137 -0
- package/src/components/ProductGrid.tsx +141 -0
- package/src/components/ShoppingCart.stories.tsx +459 -0
- package/src/components/ShoppingCart.tsx +262 -0
- package/src/components/ui/badge.tsx +37 -0
- package/src/components/ui/button.tsx +71 -0
- package/src/components/ui/card.tsx +79 -0
- package/src/components/ui/form-input.tsx +78 -0
- package/src/components/ui/form-select.tsx +73 -0
- package/src/components/ui/modal.tsx +181 -0
- package/src/contexts/CartContext.tsx +305 -0
- package/src/hooks/usePaystackPayment.ts +137 -0
- package/src/index.ts +51 -0
- package/src/lib/utils.ts +45 -0
- package/src/paystack.svg +67 -0
- package/src/providers/StorefrontProvider.tsx +70 -0
- package/src/styles.css +1 -0
- package/src/test-utils/MockCartProvider.tsx +424 -0
- package/src/vite-env.d.ts +12 -0
package/dist/index101.mjs
CHANGED
package/dist/index102.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import n from "./index88.mjs";
|
|
3
|
-
import m from "./
|
|
3
|
+
import m from "./index64.mjs";
|
|
4
4
|
import c from "./index110.mjs";
|
|
5
5
|
import h from "./index111.mjs";
|
|
6
6
|
import w from "./index84.mjs";
|
|
7
|
-
import b from "./
|
|
8
|
-
import C from "./
|
|
7
|
+
import b from "./index67.mjs";
|
|
8
|
+
import C from "./index78.mjs";
|
|
9
9
|
import g from "./index81.mjs";
|
|
10
10
|
const E = (a) => {
|
|
11
11
|
const e = b({}, a);
|
package/dist/index103.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import a from "./
|
|
3
|
-
import s from "./
|
|
4
|
-
import m from "./
|
|
2
|
+
import a from "./index70.mjs";
|
|
3
|
+
import s from "./index75.mjs";
|
|
4
|
+
import m from "./index64.mjs";
|
|
5
5
|
const h = (e, t) => {
|
|
6
6
|
const { length: l } = e = e ? e.filter(Boolean) : [];
|
|
7
7
|
if (t || l) {
|
package/dist/index105.mjs
CHANGED
package/dist/index111.mjs
CHANGED
package/dist/index20.mjs
CHANGED
package/dist/index21.mjs
CHANGED
package/dist/index28.mjs
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { useCreateOrder as s, useDeleteOrder as r, useGetOrder as u, useListOrders as o, useUpdateOrder as a, useUpdateOrderStatus as n } from "./
|
|
3
|
-
import { useCreateBrand as i, useDeleteBrand as p, useGetBrand as C, useListBrands as D, useUpdateBrand as c } from "./
|
|
4
|
-
import { useCreateProduct as G, useDeleteProduct as f, useGetProduct as m, useListProducts as v, useUpdateProduct as x } from "./
|
|
5
|
-
import { useCreateVariant as L, useDeleteVariant as S, useGetVariantInventory as U, useListProductVariants as O, useSearchVariants as V, useUpdateVariant as h } from "./
|
|
6
|
-
import { useCreateWarehouse as I, useDeleteWarehouse as P, useGetWarehouseInventory as A, useListWarehouses as W, useUpdateWarehouse as Z } from "./
|
|
7
|
-
import { useAdjustInventory as k, useGetInventoryTransactions as w, useGetLowStockVariants as T, useListInventory as j, useTransferInventory as E } from "./
|
|
8
|
-
import { useGetCustomerHistory as g } from "./
|
|
9
|
-
import { useGetStats as z } from "./
|
|
10
|
-
import { useCleanupExpiredCarts as J, useGetAbandonedCart as K, useGetAbandonedCartStats as M, useListAbandonedCarts as N } from "./
|
|
11
|
-
import { useBulkGenerateDiscountCodes as R, useCreateDiscountCode as X, useDeleteDiscountCode as Y, useGetDiscountCode as _, useGetDiscountCodeAnalytics as $, useGetDiscountCodeOverviewStats as ee, useListDiscountCodes as te, useUpdateDiscountCode as se } from "./
|
|
12
|
-
import { useCreateDeliveryZone as ue, useCreateState as oe, useDeleteDeliveryZone as ae, useDeleteState as ne, useListDeliveryZones as de, useListStates as ie, useUpdateDeliveryZone as pe, useUpdateState as Ce } from "./
|
|
2
|
+
import { useCreateOrder as s, useDeleteOrder as r, useGetOrder as u, useListOrders as o, useUpdateOrder as a, useUpdateOrderStatus as n } from "./index44.mjs";
|
|
3
|
+
import { useCreateBrand as i, useDeleteBrand as p, useGetBrand as C, useListBrands as D, useUpdateBrand as c } from "./index45.mjs";
|
|
4
|
+
import { useCreateProduct as G, useDeleteProduct as f, useGetProduct as m, useListProducts as v, useUpdateProduct as x } from "./index46.mjs";
|
|
5
|
+
import { useCreateVariant as L, useDeleteVariant as S, useGetVariantInventory as U, useListProductVariants as O, useSearchVariants as V, useUpdateVariant as h } from "./index47.mjs";
|
|
6
|
+
import { useCreateWarehouse as I, useDeleteWarehouse as P, useGetWarehouseInventory as A, useListWarehouses as W, useUpdateWarehouse as Z } from "./index48.mjs";
|
|
7
|
+
import { useAdjustInventory as k, useGetInventoryTransactions as w, useGetLowStockVariants as T, useListInventory as j, useTransferInventory as E } from "./index49.mjs";
|
|
8
|
+
import { useGetCustomerHistory as g } from "./index50.mjs";
|
|
9
|
+
import { useGetStats as z } from "./index51.mjs";
|
|
10
|
+
import { useCleanupExpiredCarts as J, useGetAbandonedCart as K, useGetAbandonedCartStats as M, useListAbandonedCarts as N } from "./index52.mjs";
|
|
11
|
+
import { useBulkGenerateDiscountCodes as R, useCreateDiscountCode as X, useDeleteDiscountCode as Y, useGetDiscountCode as _, useGetDiscountCodeAnalytics as $, useGetDiscountCodeOverviewStats as ee, useListDiscountCodes as te, useUpdateDiscountCode as se } from "./index53.mjs";
|
|
12
|
+
import { useCreateDeliveryZone as ue, useCreateState as oe, useDeleteDeliveryZone as ae, useDeleteState as ne, useListDeliveryZones as de, useListStates as ie, useUpdateDeliveryZone as pe, useUpdateState as Ce } from "./index54.mjs";
|
|
13
13
|
export {
|
|
14
14
|
k as useAdjustInventory,
|
|
15
15
|
R as useBulkGenerateDiscountCodes,
|
package/dist/index29.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { useQueryClient as s, useMutation as i } from "@tanstack/react-query";
|
|
3
|
-
import { useQueryUnwrapped as o } from "./
|
|
3
|
+
import { useQueryUnwrapped as o } from "./index59.mjs";
|
|
4
4
|
import { queryKeys as r } from "./index26.mjs";
|
|
5
5
|
import { updateCart as c, createCart as l, applyDiscount as y, removeDiscount as m, addCartItem as C, updateCartItem as p, removeCartItem as q, checkoutCart as d, fetchCart as f } from "./index23.mjs";
|
|
6
6
|
function b(e, t) {
|
package/dist/index3.mjs
CHANGED
|
@@ -1,131 +1,145 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import { createContext as
|
|
2
|
+
import { jsxs as H, jsx as K } from "react/jsx-runtime";
|
|
3
|
+
import { createContext as Y, useState as d, useRef as h, useEffect as c, useCallback as r, useContext as q } from "react";
|
|
4
4
|
import "./index18.mjs";
|
|
5
|
-
import {
|
|
5
|
+
import { useGetCart as B, useCreateCart as J, useAddCartItem as Q, useUpdateCartItem as V, useRemoveCartItem as W, useApplyDiscount as X, useRemoveDiscount as Z, useUpdateCart as $, useCheckoutCart as tt } from "./index29.mjs";
|
|
6
6
|
import "@tanstack/react-query";
|
|
7
|
-
import { ShoppingCart as
|
|
8
|
-
const
|
|
9
|
-
function
|
|
10
|
-
const [t,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
7
|
+
import { ShoppingCart as et } from "./index8.mjs";
|
|
8
|
+
const m = "oms_cart_id", y = Y(null);
|
|
9
|
+
function ut({ children: a, brandSlug: v, initialCartId: u, shoppingCartProps: S }) {
|
|
10
|
+
const [t, s] = d(u || null), [w, p] = d(!1), [D, g] = d(!1), i = h(!1), f = h(!1);
|
|
11
|
+
c(() => {
|
|
12
|
+
g(!0);
|
|
13
|
+
}, []), c(() => {
|
|
14
|
+
if (u || i.current) return;
|
|
15
|
+
const n = new URLSearchParams(window.location.search).get("cartId");
|
|
16
|
+
if (n) {
|
|
17
|
+
s(n);
|
|
18
|
+
return;
|
|
15
19
|
}
|
|
16
|
-
|
|
17
|
-
|
|
20
|
+
const C = localStorage.getItem(m);
|
|
21
|
+
C && s(C);
|
|
22
|
+
}, [u]);
|
|
23
|
+
const { data: E, isLoading: M, error: l, refetch: o } = B(t || "", {
|
|
24
|
+
enabled: !!t,
|
|
25
|
+
retry: !1
|
|
26
|
+
// Don't retry on failure - cart might be invalid/expired
|
|
27
|
+
}), A = J({
|
|
18
28
|
onSuccess: (e) => {
|
|
19
29
|
if ("error" in e) {
|
|
20
30
|
console.error("Failed to create cart:", e.error);
|
|
21
31
|
return;
|
|
22
32
|
}
|
|
23
|
-
|
|
33
|
+
s(e.id);
|
|
24
34
|
},
|
|
25
35
|
onError: (e) => {
|
|
26
36
|
console.error("Failed to create cart:", e);
|
|
27
37
|
}
|
|
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
38
|
});
|
|
33
|
-
|
|
34
|
-
!
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
+
c(() => {
|
|
40
|
+
if (!i.current && !t && !u) {
|
|
41
|
+
i.current = !0;
|
|
42
|
+
const e = setTimeout(() => {
|
|
43
|
+
i.current && A.mutate(v);
|
|
44
|
+
}, 0);
|
|
45
|
+
return () => clearTimeout(e);
|
|
46
|
+
}
|
|
47
|
+
}, []), c(() => {
|
|
48
|
+
l && t && !f.current && (f.current = !0, console.warn("Cart fetch failed, clearing invalid cart:", l), Promise.resolve().then(() => {
|
|
49
|
+
s(null), typeof window < "u" && localStorage.removeItem(m), f.current = !1;
|
|
50
|
+
}));
|
|
51
|
+
}, [l, t]);
|
|
52
|
+
const x = Q(t || "", {
|
|
39
53
|
onSuccess: () => o()
|
|
40
|
-
}),
|
|
54
|
+
}), P = V(t || "", {
|
|
41
55
|
onSuccess: () => o()
|
|
42
|
-
}),
|
|
56
|
+
}), R = W(t || "", {
|
|
43
57
|
onSuccess: () => o()
|
|
44
|
-
}),
|
|
58
|
+
}), N = X(t || "", {
|
|
45
59
|
onSuccess: () => o()
|
|
46
|
-
}),
|
|
60
|
+
}), U = Z(t || "", {
|
|
47
61
|
onSuccess: () => o()
|
|
48
|
-
}),
|
|
62
|
+
}), _ = $(t || "", {
|
|
49
63
|
onSuccess: () => o()
|
|
50
|
-
}),
|
|
51
|
-
|
|
52
|
-
t && typeof window < "u" && localStorage.setItem(
|
|
64
|
+
}), b = tt(t || "");
|
|
65
|
+
c(() => {
|
|
66
|
+
t && typeof window < "u" && localStorage.setItem(m, t);
|
|
53
67
|
}, [t]);
|
|
54
|
-
const
|
|
68
|
+
const k = r(
|
|
55
69
|
async (e, n) => {
|
|
56
70
|
if (!t) throw new Error("No cart ID");
|
|
57
|
-
await
|
|
71
|
+
await x.mutateAsync({ sku: e, quantity: n });
|
|
58
72
|
},
|
|
59
73
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
60
74
|
[t]
|
|
61
|
-
),
|
|
75
|
+
), F = r(
|
|
62
76
|
async (e, n) => {
|
|
63
77
|
if (!t) throw new Error("No cart ID");
|
|
64
|
-
await
|
|
78
|
+
await P.mutateAsync({ itemId: e, quantity: n });
|
|
65
79
|
},
|
|
66
80
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
67
81
|
[t]
|
|
68
|
-
),
|
|
82
|
+
), T = r(
|
|
69
83
|
async (e) => {
|
|
70
84
|
if (!t) throw new Error("No cart ID");
|
|
71
|
-
await
|
|
85
|
+
await R.mutateAsync(e);
|
|
72
86
|
},
|
|
73
87
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
74
88
|
[t]
|
|
75
|
-
),
|
|
89
|
+
), j = r(
|
|
76
90
|
async (e) => {
|
|
77
91
|
if (!t) throw new Error("No cart ID");
|
|
78
|
-
await
|
|
92
|
+
await N.mutateAsync({ code: e });
|
|
79
93
|
},
|
|
80
94
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
81
95
|
[t]
|
|
82
|
-
),
|
|
96
|
+
), L = r(async () => {
|
|
83
97
|
if (!t) throw new Error("No cart ID");
|
|
84
|
-
await
|
|
85
|
-
}, [t]),
|
|
86
|
-
|
|
87
|
-
}, []),
|
|
88
|
-
|
|
89
|
-
}, []),
|
|
90
|
-
|
|
91
|
-
}, []),
|
|
92
|
-
cart:
|
|
98
|
+
await U.mutateAsync();
|
|
99
|
+
}, [t]), O = r(() => {
|
|
100
|
+
s(null), typeof window < "u" && localStorage.removeItem(m);
|
|
101
|
+
}, []), z = r(() => {
|
|
102
|
+
p(!0);
|
|
103
|
+
}, []), I = r(() => {
|
|
104
|
+
p(!1);
|
|
105
|
+
}, []), G = {
|
|
106
|
+
cart: E || null,
|
|
93
107
|
cartId: t,
|
|
94
|
-
isLoading:
|
|
95
|
-
error:
|
|
96
|
-
updateCartMutation:
|
|
97
|
-
checkoutMutation:
|
|
98
|
-
addItem:
|
|
99
|
-
updateItem:
|
|
100
|
-
removeItem:
|
|
101
|
-
applyDiscount:
|
|
102
|
-
removeDiscount:
|
|
103
|
-
clearCart:
|
|
108
|
+
isLoading: M,
|
|
109
|
+
error: l,
|
|
110
|
+
updateCartMutation: _,
|
|
111
|
+
checkoutMutation: b,
|
|
112
|
+
addItem: k,
|
|
113
|
+
updateItem: F,
|
|
114
|
+
removeItem: T,
|
|
115
|
+
applyDiscount: j,
|
|
116
|
+
removeDiscount: L,
|
|
117
|
+
clearCart: O,
|
|
104
118
|
refetch: o,
|
|
105
|
-
isOpen:
|
|
106
|
-
open:
|
|
107
|
-
close:
|
|
119
|
+
isOpen: w,
|
|
120
|
+
open: z,
|
|
121
|
+
close: I
|
|
108
122
|
};
|
|
109
|
-
return /* @__PURE__ */
|
|
123
|
+
return /* @__PURE__ */ H(y.Provider, { value: G, children: [
|
|
110
124
|
a,
|
|
111
|
-
/* @__PURE__ */
|
|
112
|
-
|
|
125
|
+
D && /* @__PURE__ */ K(
|
|
126
|
+
et,
|
|
113
127
|
{
|
|
114
|
-
isOpen:
|
|
115
|
-
onClose:
|
|
116
|
-
...
|
|
128
|
+
isOpen: w,
|
|
129
|
+
onClose: I,
|
|
130
|
+
...S
|
|
117
131
|
}
|
|
118
132
|
)
|
|
119
133
|
] });
|
|
120
134
|
}
|
|
121
|
-
function
|
|
122
|
-
const a =
|
|
135
|
+
function it() {
|
|
136
|
+
const a = q(y);
|
|
123
137
|
if (!a)
|
|
124
138
|
throw new Error("useCart must be used within CartProvider");
|
|
125
139
|
return a;
|
|
126
140
|
}
|
|
127
141
|
export {
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
142
|
+
y as CartContext,
|
|
143
|
+
ut as CartProvider,
|
|
144
|
+
it as useCart
|
|
131
145
|
};
|
package/dist/index30.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { useMutation as t } from "@tanstack/react-query";
|
|
3
|
-
import { useQueryUnwrapped as u } from "./
|
|
3
|
+
import { useQueryUnwrapped as u } from "./index59.mjs";
|
|
4
4
|
import { queryKeys as n } from "./index26.mjs";
|
|
5
5
|
import { confirmOrder as i, fetchOrder as m } from "./index24.mjs";
|
|
6
6
|
function y(e, r, o) {
|
package/dist/index31.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { useQueryUnwrapped as u } from "./
|
|
2
|
+
import { useQueryUnwrapped as u } from "./index59.mjs";
|
|
3
3
|
import { queryKeys as t } from "./index26.mjs";
|
|
4
4
|
import { fetchProductsByBrand as o, fetchProductBySlug as c } from "./index22.mjs";
|
|
5
5
|
function n(r, e) {
|
package/dist/index32.mjs
CHANGED
package/dist/index37.mjs
CHANGED
package/dist/index41.mjs
CHANGED
|
@@ -1,26 +1,39 @@
|
|
|
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 o from "./index42.mjs";
|
|
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;
|
|
24
21
|
export {
|
|
25
|
-
|
|
22
|
+
e as Axios,
|
|
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
|
|
26
39
|
};
|
package/dist/index42.mjs
CHANGED
|
@@ -1,39 +1,47 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
2
|
+
import a from "./index64.mjs";
|
|
3
|
+
import p from "./index65.mjs";
|
|
4
|
+
import m from "./index66.mjs";
|
|
5
|
+
import i from "./index67.mjs";
|
|
6
|
+
import f from "./index68.mjs";
|
|
7
|
+
import l from "./index69.mjs";
|
|
8
|
+
import c from "./index70.mjs";
|
|
9
|
+
import d from "./index71.mjs";
|
|
10
|
+
import u from "./index72.mjs";
|
|
11
|
+
import { VERSION as x } from "./index73.mjs";
|
|
12
|
+
import C from "./index74.mjs";
|
|
13
|
+
import A from "./index75.mjs";
|
|
14
|
+
import E from "./index76.mjs";
|
|
15
|
+
import O from "./index77.mjs";
|
|
16
|
+
import S from "./index78.mjs";
|
|
17
|
+
import H from "./index79.mjs";
|
|
18
|
+
import T from "./index80.mjs";
|
|
19
|
+
function n(o) {
|
|
20
|
+
const t = new m(o), e = p(m.prototype.request, t);
|
|
21
|
+
return a.extend(e, m.prototype, t, { allOwnKeys: !0 }), a.extend(e, t, null, { allOwnKeys: !0 }), e.create = function(s) {
|
|
22
|
+
return n(i(o, s));
|
|
23
|
+
}, e;
|
|
24
|
+
}
|
|
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;
|
|
21
45
|
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
|
|
46
|
+
r as default
|
|
39
47
|
};
|