@burdenoff/microfe-store 2026.626.2 → 2026.703.2
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/InstallAppModal.js +157 -131
- package/dist/components/InstallAppModal.js.map +1 -1
- package/dist/generated/global-operations.js +6 -0
- package/dist/generated/global-operations.js.map +1 -1
- package/dist/generated/global-types.js.map +1 -1
- package/dist/hooks/useInstallations.js.map +1 -1
- package/dist/hooks/useStoreGraphQL.js +42 -34
- package/dist/hooks/useStoreGraphQL.js.map +1 -1
- package/dist/hooks/useStoreGraphQLWithContext.js +10 -7
- package/dist/hooks/useStoreGraphQLWithContext.js.map +1 -1
- package/dist/pages/AdminDashboardPage.js +447 -374
- package/dist/pages/AdminDashboardPage.js.map +1 -1
- package/dist/pages/AdminReviewModerationPage.js +182 -150
- package/dist/pages/AdminReviewModerationPage.js.map +1 -1
- package/dist/pages/AdminStoresPage.js +96 -96
- package/dist/pages/AdminStoresPage.js.map +1 -1
- package/dist/pages/AdminSubmissionsQueuePage.js +642 -305
- package/dist/pages/AdminSubmissionsQueuePage.js.map +1 -1
- package/dist/pages/AppDetailPage.js.map +1 -1
- package/dist/pages/AppSettingsPage.js.map +1 -1
- package/dist/pages/CartPage.js.map +1 -1
- package/dist/pages/MyLicensesPage.js.map +1 -1
- package/dist/pages/OrderConfirmationPage.js +42 -42
- package/dist/pages/OrdersPage.js +5 -5
- package/dist/pages/ProductDetailPage.js +504 -451
- package/dist/pages/ProductDetailPage.js.map +1 -1
- package/dist/providers/StoreProvider.js +35 -34
- package/dist/providers/StoreProvider.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { useStore as e } from "../providers/StoreProvider.js";
|
|
2
2
|
import { useCallback as t, useEffect as n, useState as r } from "react";
|
|
3
3
|
import { ArrowLeft as i, Pencil as a, Plus as o, RefreshCw as s, Store as c, Trash2 as l } from "lucide-react";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
4
|
+
import { graphqlFetch as u } from "@burdenoff/fe-libs/shared/graphql";
|
|
5
|
+
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
6
|
+
import { useNavigate as p } from "react-router-dom";
|
|
7
7
|
import { AlertDialog as m, AlertDialogAction as h, AlertDialogCancel as g, AlertDialogContent as _, AlertDialogDescription as v, AlertDialogFooter as y, AlertDialogHeader as b, AlertDialogTitle as x, GlassCard as S, IllustratedEmptyState as C, NextSteps as w, PagePurpose as T } from "@burdenoff/fe-libs/ui";
|
|
8
8
|
//#region src/pages/AdminStoresPage.tsx
|
|
9
9
|
var E = "\n query AdminStores {\n stores {\n id\n slug\n name\n type\n tenantId\n isPublic\n requiresApproval\n allowUnverifiedPublishers\n currency\n logoUrl\n description\n createdAt\n }\n }\n", D = "\n mutation CreateStore($input: CreateStoreInput!) {\n createStore(input: $input) {\n id\n slug\n name\n type\n }\n }\n", O = "\n mutation UpdateStore($id: ID!, $input: UpdateStoreInput!) {\n updateStore(id: $id, input: $input) {\n id\n name\n isPublic\n requiresApproval\n }\n }\n", k = "\n mutation DeleteStore($id: ID!) {\n deleteStore(id: $id)\n }\n", A = {
|
|
@@ -17,10 +17,10 @@ var E = "\n query AdminStores {\n stores {\n id\n slug\n name
|
|
|
17
17
|
currency: "USD",
|
|
18
18
|
description: ""
|
|
19
19
|
}, j = () => {
|
|
20
|
-
let j =
|
|
20
|
+
let j = p(), { authToken: M, basePath: N } = e(), [P, F] = r([]), [I, L] = r(!1), [R, z] = r(null), [B, V] = r(!1), [H, U] = r(A), [W, G] = r(null), [K, q] = r(null), J = t(async () => {
|
|
21
21
|
L(!0), z(null);
|
|
22
22
|
try {
|
|
23
|
-
let e = await
|
|
23
|
+
let e = await u({
|
|
24
24
|
gateway: "global",
|
|
25
25
|
query: E,
|
|
26
26
|
authToken: M || void 0
|
|
@@ -57,7 +57,7 @@ var E = "\n query AdminStores {\n stores {\n id\n slug\n name
|
|
|
57
57
|
}
|
|
58
58
|
z(null);
|
|
59
59
|
try {
|
|
60
|
-
W ? await
|
|
60
|
+
W ? await u({
|
|
61
61
|
gateway: "global",
|
|
62
62
|
query: O,
|
|
63
63
|
variables: {
|
|
@@ -72,7 +72,7 @@ var E = "\n query AdminStores {\n stores {\n id\n slug\n name
|
|
|
72
72
|
}
|
|
73
73
|
},
|
|
74
74
|
authToken: M || void 0
|
|
75
|
-
}) : await
|
|
75
|
+
}) : await u({
|
|
76
76
|
gateway: "global",
|
|
77
77
|
query: D,
|
|
78
78
|
variables: { input: {
|
|
@@ -93,7 +93,7 @@ var E = "\n query AdminStores {\n stores {\n id\n slug\n name
|
|
|
93
93
|
}
|
|
94
94
|
}, Q = async (e) => {
|
|
95
95
|
try {
|
|
96
|
-
await
|
|
96
|
+
await u({
|
|
97
97
|
gateway: "global",
|
|
98
98
|
query: k,
|
|
99
99
|
variables: { id: e },
|
|
@@ -103,62 +103,62 @@ var E = "\n query AdminStores {\n stores {\n id\n slug\n name
|
|
|
103
103
|
z(e instanceof Error ? e.message : "Delete failed");
|
|
104
104
|
}
|
|
105
105
|
};
|
|
106
|
-
return /* @__PURE__ */
|
|
106
|
+
return /* @__PURE__ */ f("div", {
|
|
107
107
|
className: "min-h-screen bg-surface-default",
|
|
108
108
|
children: [
|
|
109
|
-
/* @__PURE__ */
|
|
109
|
+
/* @__PURE__ */ d("header", {
|
|
110
110
|
className: "border-b border-border-seam bg-surface-raised",
|
|
111
|
-
children: /* @__PURE__ */
|
|
111
|
+
children: /* @__PURE__ */ d("div", {
|
|
112
112
|
className: "mx-auto max-w-7xl px-6 py-4",
|
|
113
|
-
children: /* @__PURE__ */
|
|
113
|
+
children: /* @__PURE__ */ f("div", {
|
|
114
114
|
className: "flex items-center justify-between",
|
|
115
|
-
children: [/* @__PURE__ */
|
|
115
|
+
children: [/* @__PURE__ */ f("div", {
|
|
116
116
|
className: "flex items-center gap-3",
|
|
117
|
-
children: [/* @__PURE__ */
|
|
117
|
+
children: [/* @__PURE__ */ f("button", {
|
|
118
118
|
type: "button",
|
|
119
119
|
onClick: () => j(`${N}/dashboard`),
|
|
120
120
|
className: "inline-flex items-center gap-2 rounded-md px-3 py-1.5 text-sm text-text-secondary hover:bg-surface-hover hover:text-text-primary",
|
|
121
|
-
children: [/* @__PURE__ */
|
|
122
|
-
}), /* @__PURE__ */
|
|
121
|
+
children: [/* @__PURE__ */ d(i, { className: "size-4" }), "Back"]
|
|
122
|
+
}), /* @__PURE__ */ f("div", {
|
|
123
123
|
className: "flex items-center gap-2",
|
|
124
124
|
children: [
|
|
125
|
-
/* @__PURE__ */
|
|
126
|
-
/* @__PURE__ */
|
|
125
|
+
/* @__PURE__ */ d(c, { className: "size-5 text-text-primary" }),
|
|
126
|
+
/* @__PURE__ */ d("h1", {
|
|
127
127
|
className: "text-xl font-semibold text-text-primary",
|
|
128
128
|
children: "Store registry"
|
|
129
129
|
}),
|
|
130
|
-
/* @__PURE__ */
|
|
130
|
+
/* @__PURE__ */ d("span", {
|
|
131
131
|
className: "rounded-full bg-surface-accent-muted px-2 py-0.5 text-xs font-medium text-text-accent",
|
|
132
132
|
children: P.length
|
|
133
133
|
})
|
|
134
134
|
]
|
|
135
135
|
})]
|
|
136
|
-
}), /* @__PURE__ */
|
|
136
|
+
}), /* @__PURE__ */ f("div", {
|
|
137
137
|
className: "flex gap-2",
|
|
138
|
-
children: [/* @__PURE__ */
|
|
138
|
+
children: [/* @__PURE__ */ f("button", {
|
|
139
139
|
type: "button",
|
|
140
140
|
onClick: () => void J(),
|
|
141
141
|
className: "inline-flex items-center gap-2 rounded-md border border-border-default bg-surface-default px-3 py-1.5 text-sm text-text-primary hover:bg-surface-hover",
|
|
142
142
|
disabled: I,
|
|
143
|
-
children: [/* @__PURE__ */
|
|
144
|
-
}), /* @__PURE__ */
|
|
143
|
+
children: [/* @__PURE__ */ d(s, { className: `size-4 ${I ? "animate-spin" : ""}` }), "Refresh"]
|
|
144
|
+
}), /* @__PURE__ */ f("button", {
|
|
145
145
|
type: "button",
|
|
146
146
|
onClick: Y,
|
|
147
147
|
className: "inline-flex items-center gap-2 rounded-md bg-surface-accent px-3 py-1.5 text-sm font-medium text-text-on-accent hover:bg-surface-accent-hover",
|
|
148
|
-
children: [/* @__PURE__ */
|
|
148
|
+
children: [/* @__PURE__ */ d(o, { className: "size-4" }), "Create store"]
|
|
149
149
|
})]
|
|
150
150
|
})]
|
|
151
151
|
})
|
|
152
152
|
})
|
|
153
153
|
}),
|
|
154
|
-
/* @__PURE__ */
|
|
154
|
+
/* @__PURE__ */ f("main", {
|
|
155
155
|
className: "mx-auto max-w-7xl p-6",
|
|
156
156
|
children: [
|
|
157
|
-
/* @__PURE__ */
|
|
157
|
+
/* @__PURE__ */ d(T, {
|
|
158
158
|
className: "mb-4",
|
|
159
159
|
children: "A store is a storefront that decides which products a given audience can see and buy. Use this registry to spin up a public marketplace, a tenant-scoped enterprise store, or a private opt-in catalog — and to control whether submissions auto-publish or wait for approval, and whether unverified publishers may submit. One store can power a whole product's app marketplace."
|
|
160
160
|
}),
|
|
161
|
-
/* @__PURE__ */
|
|
161
|
+
/* @__PURE__ */ d(w, {
|
|
162
162
|
storageKey: "store-admin-stores",
|
|
163
163
|
steps: [
|
|
164
164
|
{
|
|
@@ -181,28 +181,28 @@ var E = "\n query AdminStores {\n stores {\n id\n slug\n name
|
|
|
181
181
|
}
|
|
182
182
|
]
|
|
183
183
|
}),
|
|
184
|
-
R && /* @__PURE__ */
|
|
184
|
+
R && /* @__PURE__ */ d("div", {
|
|
185
185
|
role: "alert",
|
|
186
186
|
className: "mb-4 rounded-md border border-border-danger bg-surface-danger-muted px-4 py-3 text-sm text-text-danger",
|
|
187
187
|
children: R
|
|
188
188
|
}),
|
|
189
|
-
B && /* @__PURE__ */
|
|
189
|
+
B && /* @__PURE__ */ f(S, {
|
|
190
190
|
treatment: "plain",
|
|
191
191
|
className: "mb-6 p-4",
|
|
192
192
|
children: [
|
|
193
|
-
/* @__PURE__ */
|
|
193
|
+
/* @__PURE__ */ d("h2", {
|
|
194
194
|
className: "mb-3 text-sm font-semibold text-text-primary",
|
|
195
195
|
children: W ? "Edit store" : "Create store"
|
|
196
196
|
}),
|
|
197
|
-
/* @__PURE__ */
|
|
197
|
+
/* @__PURE__ */ f("div", {
|
|
198
198
|
className: "grid grid-cols-1 gap-3 md:grid-cols-2",
|
|
199
199
|
children: [
|
|
200
|
-
/* @__PURE__ */
|
|
200
|
+
/* @__PURE__ */ f("label", {
|
|
201
201
|
className: "block",
|
|
202
|
-
children: [/* @__PURE__ */
|
|
202
|
+
children: [/* @__PURE__ */ d("span", {
|
|
203
203
|
className: "text-xs text-text-secondary",
|
|
204
204
|
children: "Slug"
|
|
205
|
-
}), /* @__PURE__ */
|
|
205
|
+
}), /* @__PURE__ */ d("input", {
|
|
206
206
|
type: "text",
|
|
207
207
|
"aria-label": "Slug",
|
|
208
208
|
value: H.slug,
|
|
@@ -216,12 +216,12 @@ var E = "\n query AdminStores {\n stores {\n id\n slug\n name
|
|
|
216
216
|
className: "mt-1 w-full rounded-md border border-border-default bg-surface-default px-3 py-1.5 text-sm text-text-primary disabled:opacity-60"
|
|
217
217
|
})]
|
|
218
218
|
}),
|
|
219
|
-
/* @__PURE__ */
|
|
219
|
+
/* @__PURE__ */ f("label", {
|
|
220
220
|
className: "block",
|
|
221
|
-
children: [/* @__PURE__ */
|
|
221
|
+
children: [/* @__PURE__ */ d("span", {
|
|
222
222
|
className: "text-xs text-text-secondary",
|
|
223
223
|
children: "Name"
|
|
224
|
-
}), /* @__PURE__ */
|
|
224
|
+
}), /* @__PURE__ */ d("input", {
|
|
225
225
|
type: "text",
|
|
226
226
|
"aria-label": "Name",
|
|
227
227
|
value: H.name,
|
|
@@ -234,12 +234,12 @@ var E = "\n query AdminStores {\n stores {\n id\n slug\n name
|
|
|
234
234
|
className: "mt-1 w-full rounded-md border border-border-default bg-surface-default px-3 py-1.5 text-sm text-text-primary"
|
|
235
235
|
})]
|
|
236
236
|
}),
|
|
237
|
-
/* @__PURE__ */
|
|
237
|
+
/* @__PURE__ */ f("label", {
|
|
238
238
|
className: "block",
|
|
239
|
-
children: [/* @__PURE__ */
|
|
239
|
+
children: [/* @__PURE__ */ d("span", {
|
|
240
240
|
className: "text-xs text-text-secondary",
|
|
241
241
|
children: "Type"
|
|
242
|
-
}), /* @__PURE__ */
|
|
242
|
+
}), /* @__PURE__ */ f("select", {
|
|
243
243
|
"aria-label": "Store type",
|
|
244
244
|
value: H.type,
|
|
245
245
|
onChange: (e) => U({
|
|
@@ -249,27 +249,27 @@ var E = "\n query AdminStores {\n stores {\n id\n slug\n name
|
|
|
249
249
|
disabled: !!W,
|
|
250
250
|
className: "mt-1 w-full rounded-md border border-border-default bg-surface-default px-3 py-1.5 text-sm text-text-primary disabled:opacity-60",
|
|
251
251
|
children: [
|
|
252
|
-
/* @__PURE__ */
|
|
252
|
+
/* @__PURE__ */ d("option", {
|
|
253
253
|
value: "PUBLIC",
|
|
254
254
|
children: "Public"
|
|
255
255
|
}),
|
|
256
|
-
/* @__PURE__ */
|
|
256
|
+
/* @__PURE__ */ d("option", {
|
|
257
257
|
value: "PRIVATE",
|
|
258
258
|
children: "Private (opt-in)"
|
|
259
259
|
}),
|
|
260
|
-
/* @__PURE__ */
|
|
260
|
+
/* @__PURE__ */ d("option", {
|
|
261
261
|
value: "ENTERPRISE",
|
|
262
262
|
children: "Enterprise (tenant-scoped)"
|
|
263
263
|
})
|
|
264
264
|
]
|
|
265
265
|
})]
|
|
266
266
|
}),
|
|
267
|
-
/* @__PURE__ */
|
|
267
|
+
/* @__PURE__ */ f("label", {
|
|
268
268
|
className: "block",
|
|
269
|
-
children: [/* @__PURE__ */
|
|
269
|
+
children: [/* @__PURE__ */ d("span", {
|
|
270
270
|
className: "text-xs text-text-secondary",
|
|
271
271
|
children: "Currency"
|
|
272
|
-
}), /* @__PURE__ */
|
|
272
|
+
}), /* @__PURE__ */ d("input", {
|
|
273
273
|
type: "text",
|
|
274
274
|
"aria-label": "Currency",
|
|
275
275
|
value: H.currency,
|
|
@@ -280,12 +280,12 @@ var E = "\n query AdminStores {\n stores {\n id\n slug\n name
|
|
|
280
280
|
className: "mt-1 w-full rounded-md border border-border-default bg-surface-default px-3 py-1.5 text-sm text-text-primary"
|
|
281
281
|
})]
|
|
282
282
|
}),
|
|
283
|
-
H.type !== "PUBLIC" && /* @__PURE__ */
|
|
283
|
+
H.type !== "PUBLIC" && /* @__PURE__ */ f("label", {
|
|
284
284
|
className: "block md:col-span-2",
|
|
285
|
-
children: [/* @__PURE__ */
|
|
285
|
+
children: [/* @__PURE__ */ d("span", {
|
|
286
286
|
className: "text-xs text-text-secondary",
|
|
287
287
|
children: "Tenant ID (optional)"
|
|
288
|
-
}), /* @__PURE__ */
|
|
288
|
+
}), /* @__PURE__ */ d("input", {
|
|
289
289
|
type: "text",
|
|
290
290
|
"aria-label": "Tenant ID",
|
|
291
291
|
value: H.tenantId,
|
|
@@ -297,12 +297,12 @@ var E = "\n query AdminStores {\n stores {\n id\n slug\n name
|
|
|
297
297
|
className: "mt-1 w-full rounded-md border border-border-default bg-surface-default px-3 py-1.5 text-sm text-text-primary disabled:opacity-60"
|
|
298
298
|
})]
|
|
299
299
|
}),
|
|
300
|
-
/* @__PURE__ */
|
|
300
|
+
/* @__PURE__ */ f("label", {
|
|
301
301
|
className: "block md:col-span-2",
|
|
302
|
-
children: [/* @__PURE__ */
|
|
302
|
+
children: [/* @__PURE__ */ d("span", {
|
|
303
303
|
className: "text-xs text-text-secondary",
|
|
304
304
|
children: "Description"
|
|
305
|
-
}), /* @__PURE__ */
|
|
305
|
+
}), /* @__PURE__ */ d("textarea", {
|
|
306
306
|
"aria-label": "Description",
|
|
307
307
|
value: H.description,
|
|
308
308
|
onChange: (e) => U({
|
|
@@ -313,9 +313,9 @@ var E = "\n query AdminStores {\n stores {\n id\n slug\n name
|
|
|
313
313
|
className: "mt-1 w-full rounded-md border border-border-default bg-surface-default px-3 py-1.5 text-sm text-text-primary"
|
|
314
314
|
})]
|
|
315
315
|
}),
|
|
316
|
-
/* @__PURE__ */
|
|
316
|
+
/* @__PURE__ */ f("label", {
|
|
317
317
|
className: "flex items-center gap-2",
|
|
318
|
-
children: [/* @__PURE__ */
|
|
318
|
+
children: [/* @__PURE__ */ d("input", {
|
|
319
319
|
type: "checkbox",
|
|
320
320
|
"aria-label": "Publicly visible",
|
|
321
321
|
checked: H.isPublic,
|
|
@@ -323,14 +323,14 @@ var E = "\n query AdminStores {\n stores {\n id\n slug\n name
|
|
|
323
323
|
...H,
|
|
324
324
|
isPublic: e.target.checked
|
|
325
325
|
})
|
|
326
|
-
}), /* @__PURE__ */
|
|
326
|
+
}), /* @__PURE__ */ d("span", {
|
|
327
327
|
className: "text-sm text-text-primary",
|
|
328
328
|
children: "Publicly visible"
|
|
329
329
|
})]
|
|
330
330
|
}),
|
|
331
|
-
/* @__PURE__ */
|
|
331
|
+
/* @__PURE__ */ f("label", {
|
|
332
332
|
className: "flex items-center gap-2",
|
|
333
|
-
children: [/* @__PURE__ */
|
|
333
|
+
children: [/* @__PURE__ */ d("input", {
|
|
334
334
|
type: "checkbox",
|
|
335
335
|
"aria-label": "Requires admin approval",
|
|
336
336
|
checked: H.requiresApproval,
|
|
@@ -338,14 +338,14 @@ var E = "\n query AdminStores {\n stores {\n id\n slug\n name
|
|
|
338
338
|
...H,
|
|
339
339
|
requiresApproval: e.target.checked
|
|
340
340
|
})
|
|
341
|
-
}), /* @__PURE__ */
|
|
341
|
+
}), /* @__PURE__ */ d("span", {
|
|
342
342
|
className: "text-sm text-text-primary",
|
|
343
343
|
children: "Requires admin approval"
|
|
344
344
|
})]
|
|
345
345
|
}),
|
|
346
|
-
/* @__PURE__ */
|
|
346
|
+
/* @__PURE__ */ f("label", {
|
|
347
347
|
className: "flex items-center gap-2 md:col-span-2",
|
|
348
|
-
children: [/* @__PURE__ */
|
|
348
|
+
children: [/* @__PURE__ */ d("input", {
|
|
349
349
|
type: "checkbox",
|
|
350
350
|
"aria-label": "Allow unverified publishers to submit",
|
|
351
351
|
checked: H.allowUnverifiedPublishers,
|
|
@@ -353,23 +353,23 @@ var E = "\n query AdminStores {\n stores {\n id\n slug\n name
|
|
|
353
353
|
...H,
|
|
354
354
|
allowUnverifiedPublishers: e.target.checked
|
|
355
355
|
})
|
|
356
|
-
}), /* @__PURE__ */
|
|
356
|
+
}), /* @__PURE__ */ d("span", {
|
|
357
357
|
className: "text-sm text-text-primary",
|
|
358
358
|
children: "Allow unverified publishers to submit"
|
|
359
359
|
})]
|
|
360
360
|
})
|
|
361
361
|
]
|
|
362
362
|
}),
|
|
363
|
-
/* @__PURE__ */
|
|
363
|
+
/* @__PURE__ */ f("div", {
|
|
364
364
|
className: "mt-4 flex justify-end gap-2",
|
|
365
|
-
children: [/* @__PURE__ */
|
|
365
|
+
children: [/* @__PURE__ */ d("button", {
|
|
366
366
|
type: "button",
|
|
367
367
|
onClick: () => {
|
|
368
368
|
V(!1), G(null), U(A);
|
|
369
369
|
},
|
|
370
370
|
className: "rounded-md border border-border-default bg-surface-default px-3 py-1.5 text-sm text-text-primary hover:bg-surface-hover",
|
|
371
371
|
children: "Cancel"
|
|
372
|
-
}), /* @__PURE__ */
|
|
372
|
+
}), /* @__PURE__ */ d("button", {
|
|
373
373
|
type: "button",
|
|
374
374
|
onClick: () => void Z(),
|
|
375
375
|
className: "rounded-md bg-surface-accent px-3 py-1.5 text-sm font-medium text-text-on-accent hover:bg-surface-accent-hover",
|
|
@@ -378,99 +378,99 @@ var E = "\n query AdminStores {\n stores {\n id\n slug\n name
|
|
|
378
378
|
})
|
|
379
379
|
]
|
|
380
380
|
}),
|
|
381
|
-
I && P.length === 0 ? /* @__PURE__ */
|
|
381
|
+
I && P.length === 0 ? /* @__PURE__ */ d("output", {
|
|
382
382
|
className: "block py-16 text-center text-text-secondary",
|
|
383
383
|
children: "Loading stores…"
|
|
384
|
-
}) : P.length === 0 ? /* @__PURE__ */
|
|
384
|
+
}) : P.length === 0 ? /* @__PURE__ */ d(C, {
|
|
385
385
|
illustration: "empty-generic",
|
|
386
386
|
title: "No stores yet",
|
|
387
387
|
description: "Create your first store to give an audience a place to discover and install products.",
|
|
388
|
-
action: /* @__PURE__ */
|
|
388
|
+
action: /* @__PURE__ */ f("button", {
|
|
389
389
|
type: "button",
|
|
390
390
|
onClick: Y,
|
|
391
391
|
className: "inline-flex items-center gap-2 rounded-md bg-surface-accent px-3 py-1.5 text-sm font-medium text-text-on-accent hover:bg-surface-accent-hover",
|
|
392
|
-
children: [/* @__PURE__ */
|
|
392
|
+
children: [/* @__PURE__ */ d(o, { className: "size-4" }), "Create store"]
|
|
393
393
|
})
|
|
394
|
-
}) : /* @__PURE__ */
|
|
394
|
+
}) : /* @__PURE__ */ d("div", {
|
|
395
395
|
className: "overflow-hidden rounded-lg border border-border-seam",
|
|
396
|
-
children: /* @__PURE__ */
|
|
396
|
+
children: /* @__PURE__ */ f("table", {
|
|
397
397
|
className: "w-full text-sm",
|
|
398
|
-
children: [/* @__PURE__ */
|
|
398
|
+
children: [/* @__PURE__ */ d("thead", {
|
|
399
399
|
className: "bg-surface-muted text-left text-xs uppercase tracking-wide text-text-secondary",
|
|
400
|
-
children: /* @__PURE__ */
|
|
401
|
-
/* @__PURE__ */
|
|
400
|
+
children: /* @__PURE__ */ f("tr", { children: [
|
|
401
|
+
/* @__PURE__ */ d("th", {
|
|
402
402
|
className: "px-4 py-2",
|
|
403
403
|
children: "Slug"
|
|
404
404
|
}),
|
|
405
|
-
/* @__PURE__ */
|
|
405
|
+
/* @__PURE__ */ d("th", {
|
|
406
406
|
className: "px-4 py-2",
|
|
407
407
|
children: "Name"
|
|
408
408
|
}),
|
|
409
|
-
/* @__PURE__ */
|
|
409
|
+
/* @__PURE__ */ d("th", {
|
|
410
410
|
className: "px-4 py-2",
|
|
411
411
|
children: "Type"
|
|
412
412
|
}),
|
|
413
|
-
/* @__PURE__ */
|
|
413
|
+
/* @__PURE__ */ d("th", {
|
|
414
414
|
className: "px-4 py-2",
|
|
415
415
|
children: "Public"
|
|
416
416
|
}),
|
|
417
|
-
/* @__PURE__ */
|
|
417
|
+
/* @__PURE__ */ d("th", {
|
|
418
418
|
className: "px-4 py-2",
|
|
419
419
|
children: "Approval"
|
|
420
420
|
}),
|
|
421
|
-
/* @__PURE__ */
|
|
421
|
+
/* @__PURE__ */ d("th", {
|
|
422
422
|
className: "px-4 py-2",
|
|
423
423
|
children: "Currency"
|
|
424
424
|
}),
|
|
425
|
-
/* @__PURE__ */
|
|
425
|
+
/* @__PURE__ */ d("th", {
|
|
426
426
|
className: "px-4 py-2 text-right",
|
|
427
427
|
children: "Actions"
|
|
428
428
|
})
|
|
429
429
|
] })
|
|
430
|
-
}), /* @__PURE__ */
|
|
430
|
+
}), /* @__PURE__ */ d("tbody", {
|
|
431
431
|
className: "divide-y divide-border-seam bg-surface-raised",
|
|
432
|
-
children: P.map((e) => /* @__PURE__ */
|
|
432
|
+
children: P.map((e) => /* @__PURE__ */ f("tr", {
|
|
433
433
|
className: "text-text-primary",
|
|
434
434
|
children: [
|
|
435
|
-
/* @__PURE__ */
|
|
435
|
+
/* @__PURE__ */ d("td", {
|
|
436
436
|
className: "px-4 py-2 font-mono text-xs",
|
|
437
437
|
children: e.slug
|
|
438
438
|
}),
|
|
439
|
-
/* @__PURE__ */
|
|
439
|
+
/* @__PURE__ */ d("td", {
|
|
440
440
|
className: "px-4 py-2",
|
|
441
441
|
children: e.name
|
|
442
442
|
}),
|
|
443
|
-
/* @__PURE__ */
|
|
443
|
+
/* @__PURE__ */ d("td", {
|
|
444
444
|
className: "px-4 py-2",
|
|
445
|
-
children: /* @__PURE__ */
|
|
445
|
+
children: /* @__PURE__ */ d("span", {
|
|
446
446
|
className: "rounded-full bg-surface-accent-muted px-2 py-0.5 text-xs font-medium text-text-accent",
|
|
447
447
|
children: e.type
|
|
448
448
|
})
|
|
449
449
|
}),
|
|
450
|
-
/* @__PURE__ */
|
|
450
|
+
/* @__PURE__ */ d("td", {
|
|
451
451
|
className: "px-4 py-2 text-xs",
|
|
452
452
|
children: e.isPublic ? "Yes" : "No"
|
|
453
453
|
}),
|
|
454
|
-
/* @__PURE__ */
|
|
454
|
+
/* @__PURE__ */ d("td", {
|
|
455
455
|
className: "px-4 py-2 text-xs",
|
|
456
456
|
children: e.requiresApproval ? "Required" : "Auto-publish"
|
|
457
457
|
}),
|
|
458
|
-
/* @__PURE__ */
|
|
458
|
+
/* @__PURE__ */ d("td", {
|
|
459
459
|
className: "px-4 py-2 text-xs",
|
|
460
460
|
children: e.currency
|
|
461
461
|
}),
|
|
462
|
-
/* @__PURE__ */
|
|
462
|
+
/* @__PURE__ */ f("td", {
|
|
463
463
|
className: "px-4 py-2 text-right",
|
|
464
|
-
children: [/* @__PURE__ */
|
|
464
|
+
children: [/* @__PURE__ */ f("button", {
|
|
465
465
|
type: "button",
|
|
466
466
|
onClick: () => X(e),
|
|
467
467
|
className: "inline-flex items-center gap-1 rounded-md border border-border-default px-2 py-1 text-xs text-text-primary hover:bg-surface-hover",
|
|
468
|
-
children: [/* @__PURE__ */
|
|
469
|
-
}), e.id !== "store_public_default" && /* @__PURE__ */
|
|
468
|
+
children: [/* @__PURE__ */ d(a, { className: "size-3" }), "Edit"]
|
|
469
|
+
}), e.id !== "store_public_default" && /* @__PURE__ */ f("button", {
|
|
470
470
|
type: "button",
|
|
471
471
|
onClick: () => q(e.id),
|
|
472
472
|
className: "ml-2 inline-flex items-center gap-1 rounded-md border border-border-danger px-2 py-1 text-xs text-text-danger hover:bg-surface-danger-muted",
|
|
473
|
-
children: [/* @__PURE__ */
|
|
473
|
+
children: [/* @__PURE__ */ d(l, { className: "size-3" }), "Delete"]
|
|
474
474
|
})]
|
|
475
475
|
})
|
|
476
476
|
]
|
|
@@ -480,13 +480,13 @@ var E = "\n query AdminStores {\n stores {\n id\n slug\n name
|
|
|
480
480
|
})
|
|
481
481
|
]
|
|
482
482
|
}),
|
|
483
|
-
/* @__PURE__ */
|
|
483
|
+
/* @__PURE__ */ d(m, {
|
|
484
484
|
open: K !== null,
|
|
485
485
|
onOpenChange: (e) => !e && q(null),
|
|
486
|
-
children: /* @__PURE__ */
|
|
486
|
+
children: /* @__PURE__ */ f(_, { children: [/* @__PURE__ */ f(b, { children: [/* @__PURE__ */ d(x, { children: "Delete this store?" }), /* @__PURE__ */ d(v, { children: "This is a soft delete." })] }), /* @__PURE__ */ f(y, { children: [/* @__PURE__ */ d(g, {
|
|
487
487
|
onClick: () => q(null),
|
|
488
488
|
children: "Cancel"
|
|
489
|
-
}), /* @__PURE__ */
|
|
489
|
+
}), /* @__PURE__ */ d(h, {
|
|
490
490
|
className: "bg-surface-danger text-text-on-danger hover:bg-surface-danger-hover",
|
|
491
491
|
onClick: () => {
|
|
492
492
|
K && Q(K), q(null);
|