@shophost/react 2.0.31 → 2.0.33
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/admin-client.cjs +1 -1
- package/admin-client.js +2596 -2547
- package/index.mjs +2 -2
- package/next/server.cjs +1 -1
- package/next/server.mjs +14 -95
- package/package.json +10 -11
- package/storefront.mjs +42 -42
package/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as
|
|
1
|
+
import { A as a, c as r, b as o, g as d } from "./admin-client.js";
|
|
2
2
|
function t(e) {
|
|
3
3
|
return {
|
|
4
4
|
basePath: "/admin",
|
|
@@ -6,7 +6,7 @@ function t(e) {
|
|
|
6
6
|
};
|
|
7
7
|
}
|
|
8
8
|
export {
|
|
9
|
-
|
|
9
|
+
a as AdminProvider,
|
|
10
10
|
r as createAdminAuthClient,
|
|
11
11
|
o as createRoutes,
|
|
12
12
|
t as defineConfig,
|
package/next/server.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),a=require("../admin-client.cjs");async function o({config:e,params:t}){const{segments:n=[]}=await t;return i.jsx(a.AdminProvider,{config:e,children:i.jsx(a.AdminRouter,{segments:n})})}function d(e,t){var r;return{title:(r=e.branding)!=null&&r.name?`${e.branding.name} Admin`:"Admin",robots:{index:!1,follow:!1},...e.metadata,...t}}exports.NotFoundPage=a.ErrorView;exports.RootPage=o;exports.generatePageMetadata=d;
|
package/next/server.mjs
CHANGED
|
@@ -1,102 +1,21 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const [a, i, r, u, c] = n;
|
|
8
|
-
if (a === "auth")
|
|
9
|
-
return i === "sign-in" ? { type: "sign-in" } : i === "sign-up" ? { type: "sign-up" } : { type: "not-found" };
|
|
10
|
-
if (a === "organizations") return { type: "organizations" };
|
|
11
|
-
const t = a;
|
|
12
|
-
return i ? i === "dashboard" ? { type: "dashboard", orgId: t } : i === "orders" ? { type: "orders", orgId: t } : i === "reservations" ? { type: "reservations", orgId: t } : i === "products" ? r ? r === "create" ? { type: "product-create", orgId: t } : { type: "product-edit", orgId: t, id: r } : { type: "products-list", orgId: t } : i === "product-categories" ? r ? r === "create" ? { type: "product-category-create", orgId: t } : { type: "product-category-edit", orgId: t, id: r } : { type: "product-categories-list", orgId: t } : i === "manufacturers" ? r ? r === "create" ? { type: "manufacturer-create", orgId: t } : { type: "manufacturer-edit", orgId: t, id: r } : { type: "manufacturers-list", orgId: t } : i === "settings" ? r ? r === "opening-times" ? { type: "settings-opening-times", orgId: t } : r === "shipping-methods" ? u ? u === "create" ? { type: "shipping-method-create", orgId: t } : { type: "shipping-method-edit", orgId: t, id: u } : { type: "shipping-methods-list", orgId: t } : r === "access" ? u ? u === "invite" ? { type: "access-invite", orgId: t } : { type: "access-member-edit", orgId: t, id: u } : { type: "access-list", orgId: t } : { type: "settings", orgId: t } : { type: "settings", orgId: t } : { type: "not-found" } : { type: "not-found" };
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { A as r, a as i } from "../admin-client.js";
|
|
3
|
+
import { E as g } from "../admin-client.js";
|
|
4
|
+
async function s({ config: e, params: t }) {
|
|
5
|
+
const { segments: a = [] } = await t;
|
|
6
|
+
return /* @__PURE__ */ o(r, { config: e, children: /* @__PURE__ */ o(i, { segments: a }) });
|
|
13
7
|
}
|
|
14
|
-
function
|
|
15
|
-
|
|
16
|
-
if (te(() => {
|
|
17
|
-
if (!p) {
|
|
18
|
-
if (!t && !d) {
|
|
19
|
-
r.replace(S(i.signIn, f));
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
22
|
-
t && d && r.replace(f);
|
|
23
|
-
}
|
|
24
|
-
}, [t, p, d, r, i.signIn, f]), p)
|
|
25
|
-
return /* @__PURE__ */ e("div", { className: "flex justify-center items-center h-screen", children: /* @__PURE__ */ e("div", { className: "animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600" }) });
|
|
26
|
-
if (d) {
|
|
27
|
-
if (s.type === "sign-in") return /* @__PURE__ */ e(R, {});
|
|
28
|
-
if (s.type === "sign-up") return /* @__PURE__ */ e(C, {});
|
|
29
|
-
}
|
|
30
|
-
if (!t)
|
|
31
|
-
return null;
|
|
32
|
-
if (m)
|
|
33
|
-
return /* @__PURE__ */ e(h, { children: /* @__PURE__ */ e(I, {}) });
|
|
34
|
-
if (s.type === "not-found")
|
|
35
|
-
return /* @__PURE__ */ e(l, {});
|
|
36
|
-
const V = "orgId" in s ? s.orgId : void 0, v = "id" in s ? s.id : void 0;
|
|
37
|
-
return /* @__PURE__ */ e(M, { organizationId: V, id: v, children: /* @__PURE__ */ e(h, { children: /* @__PURE__ */ e(z, { children: /* @__PURE__ */ e(E, { children: ne(s) }) }) }) });
|
|
38
|
-
}
|
|
39
|
-
function ne(n) {
|
|
40
|
-
switch (n.type) {
|
|
41
|
-
case "dashboard":
|
|
42
|
-
return /* @__PURE__ */ e(X, {});
|
|
43
|
-
case "orders":
|
|
44
|
-
return /* @__PURE__ */ e(W, {});
|
|
45
|
-
case "reservations":
|
|
46
|
-
return /* @__PURE__ */ e(Q, {});
|
|
47
|
-
case "products-list":
|
|
48
|
-
return /* @__PURE__ */ e(K, {});
|
|
49
|
-
case "product-create":
|
|
50
|
-
return /* @__PURE__ */ e(J, {});
|
|
51
|
-
case "product-edit":
|
|
52
|
-
return /* @__PURE__ */ e(G, {});
|
|
53
|
-
case "product-categories-list":
|
|
54
|
-
return /* @__PURE__ */ e(U, {});
|
|
55
|
-
case "product-category-create":
|
|
56
|
-
return /* @__PURE__ */ e(B, {});
|
|
57
|
-
case "product-category-edit":
|
|
58
|
-
return /* @__PURE__ */ e(k, {});
|
|
59
|
-
case "manufacturers-list":
|
|
60
|
-
return /* @__PURE__ */ e(H, {});
|
|
61
|
-
case "manufacturer-create":
|
|
62
|
-
return /* @__PURE__ */ e(D, {});
|
|
63
|
-
case "manufacturer-edit":
|
|
64
|
-
return /* @__PURE__ */ e(q, {});
|
|
65
|
-
case "settings":
|
|
66
|
-
return /* @__PURE__ */ e(o, { children: /* @__PURE__ */ e(T, {}) });
|
|
67
|
-
case "settings-opening-times":
|
|
68
|
-
return /* @__PURE__ */ e(o, { children: /* @__PURE__ */ e(N, {}) });
|
|
69
|
-
case "shipping-methods-list":
|
|
70
|
-
return /* @__PURE__ */ e(o, { children: /* @__PURE__ */ e(F, {}) });
|
|
71
|
-
case "shipping-method-create":
|
|
72
|
-
return /* @__PURE__ */ e(o, { children: /* @__PURE__ */ e(j, {}) });
|
|
73
|
-
case "shipping-method-edit":
|
|
74
|
-
return /* @__PURE__ */ e(o, { children: /* @__PURE__ */ e($, {}) });
|
|
75
|
-
case "access-list":
|
|
76
|
-
return /* @__PURE__ */ e(o, { children: /* @__PURE__ */ e(x, {}) });
|
|
77
|
-
case "access-invite":
|
|
78
|
-
return /* @__PURE__ */ e(o, { children: /* @__PURE__ */ e(L, {}) });
|
|
79
|
-
case "access-member-edit":
|
|
80
|
-
return /* @__PURE__ */ e(o, { children: /* @__PURE__ */ e(O, {}) });
|
|
81
|
-
default:
|
|
82
|
-
return /* @__PURE__ */ e(l, {});
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
async function ce({ config: n, params: a }) {
|
|
86
|
-
const { segments: i = [] } = await a;
|
|
87
|
-
return /* @__PURE__ */ e(Y, { config: n, children: /* @__PURE__ */ e(ie, { segments: i }) });
|
|
88
|
-
}
|
|
89
|
-
function de(n, a) {
|
|
90
|
-
var r;
|
|
8
|
+
function l(e, t) {
|
|
9
|
+
var n;
|
|
91
10
|
return {
|
|
92
|
-
title: (
|
|
11
|
+
title: (n = e.branding) != null && n.name ? `${e.branding.name} Admin` : "Admin",
|
|
93
12
|
robots: { index: !1, follow: !1 },
|
|
94
|
-
...
|
|
95
|
-
...
|
|
13
|
+
...e.metadata,
|
|
14
|
+
...t
|
|
96
15
|
};
|
|
97
16
|
}
|
|
98
17
|
export {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
18
|
+
g as NotFoundPage,
|
|
19
|
+
s as RootPage,
|
|
20
|
+
l as generatePageMetadata
|
|
102
21
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shophost/react",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.33",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./index.cjs",
|
|
6
6
|
"module": "./index.mjs",
|
|
@@ -58,16 +58,11 @@
|
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
60
|
"@atlaskit/pragmatic-drag-and-drop": "^1.7.9",
|
|
61
|
-
"@atlaskit/pragmatic-drag-and-drop-flourish": "^2.0.12",
|
|
62
61
|
"@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.1.0",
|
|
63
62
|
"@atlaskit/pragmatic-drag-and-drop-live-region": "^1.3.3",
|
|
64
63
|
"@atlaskit/pragmatic-drag-and-drop-react-drop-indicator": "^3.2.12",
|
|
65
64
|
"@headlessui/react": "^2.2.0",
|
|
66
65
|
"@hookform/resolvers": "^3.9.0",
|
|
67
|
-
"@react-aria/datepicker": "^3.16.1",
|
|
68
|
-
"@react-stately/datepicker": "^3.16.1",
|
|
69
|
-
"@shophost/client": "^2.0.31",
|
|
70
|
-
"@shophost/rest-api": "^2.0.31",
|
|
71
66
|
"@internationalized/date": "^3.12.0",
|
|
72
67
|
"@radix-ui/react-checkbox": "^1.3.3",
|
|
73
68
|
"@radix-ui/react-dialog": "^1.1.6",
|
|
@@ -80,9 +75,13 @@
|
|
|
80
75
|
"@radix-ui/react-slot": "^1.1.2",
|
|
81
76
|
"@radix-ui/react-switch": "^1.1.3",
|
|
82
77
|
"@radix-ui/react-tooltip": "^1.2.8",
|
|
83
|
-
"@
|
|
78
|
+
"@react-aria/datepicker": "^3.16.1",
|
|
79
|
+
"@react-stately/datepicker": "^3.16.1",
|
|
84
80
|
"@remixicon/react": "^4.6.0",
|
|
81
|
+
"@shophost/client": "^2.0.33",
|
|
82
|
+
"@shophost/rest-api": "^2.0.33",
|
|
85
83
|
"@tanstack/react-query": "^5.67.2",
|
|
84
|
+
"@tanstack/react-table": "^8.21.3",
|
|
86
85
|
"@vercel/blob": "^0.27.2",
|
|
87
86
|
"better-auth": "^1.5.5",
|
|
88
87
|
"classnames": "^2.5.1",
|
|
@@ -91,11 +90,11 @@
|
|
|
91
90
|
"date-fns": "^3.6.0",
|
|
92
91
|
"lucide-react": "^0.479.0",
|
|
93
92
|
"next-themes": "^0.4.6",
|
|
94
|
-
"react-day-picker": "^
|
|
93
|
+
"react-day-picker": "^9.14.0",
|
|
95
94
|
"react-hook-form": "^7.54.2",
|
|
96
|
-
"recharts": "^3.8.0",
|
|
97
95
|
"react-hot-toast": "^2.5.2",
|
|
98
96
|
"react-phone-number-input": "^3.4.12",
|
|
97
|
+
"recharts": "^3.8.0",
|
|
99
98
|
"tailwind-merge": "^3.0.2",
|
|
100
99
|
"tailwind-variants": "^1.0.0",
|
|
101
100
|
"tiny-invariant": "^1.3.3",
|
|
@@ -104,8 +103,8 @@
|
|
|
104
103
|
"zod": "^4.1.11"
|
|
105
104
|
},
|
|
106
105
|
"peerDependencies": {
|
|
106
|
+
"next": ">=14.0.0",
|
|
107
107
|
"react": ">=18.0.0",
|
|
108
|
-
"react-dom": ">=18.0.0"
|
|
109
|
-
"next": ">=14.0.0"
|
|
108
|
+
"react-dom": ">=18.0.0"
|
|
110
109
|
}
|
|
111
110
|
}
|
package/storefront.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { G as o, l as e, au as r, J as t, i, j as n, f as d, h as m, C as u, m as C, $ as l, am as p, an as g, ao as P, ap as c, aq as I, a0 as D, a3 as f, a4 as v, a1 as M, a5 as h, a2 as S, a7 as B, a6 as T, R as G, k as b, a8 as w, a9 as y, aa as A, ab as L, ac as R, ad as k, ae as x, af as F, aw as O, O as V, W as q, L as z, _ as E, Y as j, N as H, n as N, M as Q, o as U, q as J, p as K, P as W, ag as X, ah as Y, ai as Z, aj as _, ak as $, Q as aa, ar as sa, as as oa, at as ea, T as ra, S as ta, F as ia, al as na, U as da, V as ma, X as ua, av as Ca, K as la, w as pa, z as ga, x as Pa, Z as ca, y as Ia, D as Da, B as fa, H as va, d as Ma, u as ha, v as Sa, t as Ba, e as Ta, s as Ga, I as ba, r as wa } from "./admin-client.js";
|
|
3
3
|
export {
|
|
4
4
|
o as APIProvider,
|
|
5
5
|
e as AccountPages,
|
|
@@ -14,45 +14,45 @@ export {
|
|
|
14
14
|
l as Command,
|
|
15
15
|
p as CommandBar,
|
|
16
16
|
g as CommandBarBar,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
P as CommandBarCommand,
|
|
18
|
+
c as CommandBarSeperator,
|
|
19
|
+
I as CommandBarValue,
|
|
20
20
|
D as CommandDialog,
|
|
21
21
|
f as CommandEmpty,
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
v as CommandGroup,
|
|
23
|
+
M as CommandInput,
|
|
24
|
+
h as CommandItem,
|
|
25
|
+
S as CommandList,
|
|
26
26
|
B as CommandSeparator,
|
|
27
27
|
T as CommandShortcut,
|
|
28
28
|
G as CountryInput,
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
29
|
+
b as CustomerDetailsPage,
|
|
30
|
+
w as Dialog,
|
|
31
|
+
y as DialogClose,
|
|
32
|
+
A as DialogContent,
|
|
33
|
+
L as DialogDescription,
|
|
34
|
+
R as DialogFooter,
|
|
35
|
+
k as DialogHeader,
|
|
36
36
|
x as DialogTitle,
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
F as DialogTrigger,
|
|
38
|
+
O as Divider,
|
|
39
|
+
V as EmailInput,
|
|
40
|
+
q as ImageUploadInput,
|
|
41
41
|
z as Input,
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
42
|
+
E as InputGroup,
|
|
43
|
+
j as Label,
|
|
44
|
+
H as LocationInput,
|
|
45
|
+
N as ModifierContainer,
|
|
46
|
+
Q as ModifiersDialog,
|
|
47
|
+
U as ModifiersGroup,
|
|
48
|
+
J as ModifiersModal,
|
|
49
|
+
K as ModifiersOption,
|
|
50
|
+
W as PhoneNumberInput,
|
|
51
|
+
X as Popover,
|
|
52
|
+
Y as PopoverAnchor,
|
|
53
|
+
Z as PopoverClose,
|
|
54
|
+
_ as PopoverContent,
|
|
55
|
+
$ as PopoverTrigger,
|
|
56
56
|
aa as QuantityControl,
|
|
57
57
|
sa as RadioCardGroup,
|
|
58
58
|
oa as RadioCardGroupIndicator,
|
|
@@ -68,18 +68,18 @@ export {
|
|
|
68
68
|
la as buttonVariants,
|
|
69
69
|
pa as calculateCartTotal,
|
|
70
70
|
ga as findCartItem,
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
71
|
+
Pa as formatPrice,
|
|
72
|
+
ca as getFieldError,
|
|
73
|
+
Ia as getFormattedModifiers,
|
|
74
74
|
Da as mockProducts,
|
|
75
75
|
fa as productRequiresModifiers,
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
76
|
+
va as useAPI,
|
|
77
|
+
Ma as useCart,
|
|
78
|
+
ha as useCartContext,
|
|
79
|
+
Sa as useLocalization,
|
|
80
80
|
Ba as useModifierSelection,
|
|
81
81
|
Ta as useModifiers,
|
|
82
82
|
Ga as useMultipleProductDetails,
|
|
83
|
-
|
|
84
|
-
|
|
83
|
+
ba as useOrganization,
|
|
84
|
+
wa as useProductDetails
|
|
85
85
|
};
|