@burdenoff/microfe-devportal 2026.828.1 → 2026.830.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/devportal/AdminDevportalRoot.d.ts.map +1 -1
- package/dist/devportal/AdminDevportalRoot.js +16 -19
- package/dist/devportal/AdminDevportalRoot.js.map +1 -1
- package/dist/devportal/DevportalRoot.d.ts.map +1 -1
- package/dist/devportal/DevportalRoot.js +36 -39
- package/dist/devportal/DevportalRoot.js.map +1 -1
- package/dist/devportal/components/AppCard.js +41 -41
- package/dist/devportal/components/ConfirmDialog.d.ts.map +1 -1
- package/dist/devportal/components/ConfirmDialog.js +19 -22
- package/dist/devportal/components/ConfirmDialog.js.map +1 -1
- package/dist/devportal/components/DataTable.d.ts.map +1 -1
- package/dist/devportal/components/DataTable.js +31 -34
- package/dist/devportal/components/DataTable.js.map +1 -1
- package/dist/devportal/components/FeatureFlaggedRoute.js +8 -8
- package/dist/devportal/components/FormField.d.ts.map +1 -1
- package/dist/devportal/components/FormField.js +26 -32
- package/dist/devportal/components/FormField.js.map +1 -1
- package/dist/devportal/components/GrantDelegationModal.js +64 -64
- package/dist/devportal/components/GrantDelegationModal.js.map +1 -1
- package/dist/devportal/components/LoadingState.d.ts.map +1 -1
- package/dist/devportal/components/LoadingState.js +5 -8
- package/dist/devportal/components/LoadingState.js.map +1 -1
- package/dist/devportal/components/PageLayout.d.ts.map +1 -1
- package/dist/devportal/components/PageLayout.js +10 -13
- package/dist/devportal/components/PageLayout.js.map +1 -1
- package/dist/devportal/components/PermissionGuard.d.ts.map +1 -1
- package/dist/devportal/components/PermissionGuard.js +11 -14
- package/dist/devportal/components/PermissionGuard.js.map +1 -1
- package/dist/devportal/components/SecretDisplay.d.ts.map +1 -1
- package/dist/devportal/components/SecretDisplay.js +24 -30
- package/dist/devportal/components/SecretDisplay.js.map +1 -1
- package/dist/devportal/components/SectionNav.d.ts.map +1 -1
- package/dist/devportal/components/SectionNav.js +24 -27
- package/dist/devportal/components/SectionNav.js.map +1 -1
- package/dist/devportal/components/StatusBadge.d.ts.map +1 -1
- package/dist/devportal/components/StatusBadge.js +24 -33
- package/dist/devportal/components/StatusBadge.js.map +1 -1
- package/dist/devportal/index.d.ts +1 -0
- package/dist/devportal/index.d.ts.map +1 -1
- package/dist/devportal/index.js +1 -0
- package/dist/devportal/pages/AdminReviewPage.js +172 -172
- package/dist/devportal/pages/AnalyticsDashboardPage.js +43 -43
- package/dist/devportal/pages/AnalyticsDashboardPage.js.map +1 -1
- package/dist/devportal/pages/ApiKeysPage.js +119 -119
- package/dist/devportal/pages/ApiKeysPage.js.map +1 -1
- package/dist/devportal/pages/AppLogsPage.js +45 -45
- package/dist/devportal/pages/ApplicationDetailPage.js +607 -607
- package/dist/devportal/pages/ApplicationVersionsPage.js +13 -13
- package/dist/devportal/pages/ApplicationsPage.d.ts.map +1 -1
- package/dist/devportal/pages/ApplicationsPage.js +104 -101
- package/dist/devportal/pages/ApplicationsPage.js.map +1 -1
- package/dist/devportal/pages/CreateApiKeyPage.js +45 -45
- package/dist/devportal/pages/CreateApplicationPage.js +38 -38
- package/dist/devportal/pages/CreateApplicationPage.js.map +1 -1
- package/dist/devportal/pages/CreateOAuthClientPage.js +52 -52
- package/dist/devportal/pages/CreateOrganizationPage.js +26 -26
- package/dist/devportal/pages/CreateWebhookPage.d.ts.map +1 -1
- package/dist/devportal/pages/CreateWebhookPage.js +48 -48
- package/dist/devportal/pages/CreateWebhookPage.js.map +1 -1
- package/dist/devportal/pages/DashboardPage.d.ts.map +1 -1
- package/dist/devportal/pages/DashboardPage.js +66 -72
- package/dist/devportal/pages/DashboardPage.js.map +1 -1
- package/dist/devportal/pages/DelegationsPage.js +174 -174
- package/dist/devportal/pages/DocumentationPage.js +93 -93
- package/dist/devportal/pages/EditApplicationPage.js +14 -14
- package/dist/devportal/pages/EditApplicationPage.js.map +1 -1
- package/dist/devportal/pages/ListingPreviewPage.js +76 -76
- package/dist/devportal/pages/OAuthClientDetailPage.js +75 -75
- package/dist/devportal/pages/OAuthClientDetailPage.js.map +1 -1
- package/dist/devportal/pages/OAuthClientsPage.js +64 -64
- package/dist/devportal/pages/OrganizationDetailPage.js +189 -189
- package/dist/devportal/pages/OrganizationDetailPage.js.map +1 -1
- package/dist/devportal/pages/OrganizationMembersPage.js +10 -10
- package/dist/devportal/pages/OrganizationsPage.d.ts.map +1 -1
- package/dist/devportal/pages/OrganizationsPage.js +163 -154
- package/dist/devportal/pages/OrganizationsPage.js.map +1 -1
- package/dist/devportal/pages/PublishPage.js +104 -104
- package/dist/devportal/pages/PublishPage.js.map +1 -1
- package/dist/devportal/pages/PublisherProfilePage.js +55 -55
- package/dist/devportal/pages/ResourcesPage.js +60 -60
- package/dist/devportal/pages/RevenueDashboardPage.js +60 -60
- package/dist/devportal/pages/RevenueDashboardPage.js.map +1 -1
- package/dist/devportal/pages/SellerDashboardPage.js +83 -83
- package/dist/devportal/pages/SellerItemsPage.js +163 -163
- package/dist/devportal/pages/SellerItemsPage.js.map +1 -1
- package/dist/devportal/pages/SellerOrdersPage.js +63 -63
- package/dist/devportal/pages/SettingsPage.js +21 -21
- package/dist/devportal/pages/SetupPage.js +183 -183
- package/dist/devportal/pages/SetupPage.js.map +1 -1
- package/dist/devportal/pages/StoreSubmissionPage.js +5 -5
- package/dist/devportal/pages/WebhookDetailPage.js +123 -123
- package/dist/devportal/pages/WebhookDetailPage.js.map +1 -1
- package/dist/devportal/pages/WebhooksPage.js +118 -118
- package/dist/devportal/pages/WebhooksPage.js.map +1 -1
- package/dist/devportal/utils/i18n.d.ts +9 -2
- package/dist/devportal/utils/i18n.d.ts.map +1 -1
- package/dist/devportal/utils/i18n.js +13 -10
- package/dist/devportal/utils/i18n.js.map +1 -1
- package/dist/index.js +2 -1
- package/dist/translations/en.d.ts +1251 -0
- package/dist/translations/en.d.ts.map +1 -0
- package/dist/translations/en.js +1235 -0
- package/dist/translations/en.js.map +1 -0
- package/package.json +1 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { useDevportal as e } from "../providers/DevportalProvider.js";
|
|
2
2
|
import { EmptyState as t } from "../components/EmptyState.js";
|
|
3
3
|
import { PageLayout as n } from "../components/PageLayout.js";
|
|
4
|
-
import { PermissionGuard as
|
|
4
|
+
import { PermissionGuard as r } from "../components/PermissionGuard.js";
|
|
5
5
|
import "../components/index.js";
|
|
6
|
-
import { useEffect as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
6
|
+
import { useEffect as i, useMemo as a, useState as o } from "react";
|
|
7
|
+
import { AlertCircle as s, Edit as c, Grid as ee, List as l, Loader2 as u, Package as d, Plus as f, Search as p, Tag as m } from "lucide-react";
|
|
8
|
+
import { jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
9
|
+
import { useI18n as _ } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
10
10
|
import { EmphasisPanel as v, GlassCard as y } from "@burdenoff/fe-libs/ui";
|
|
11
11
|
//#region src/devportal/pages/SellerItemsPage.tsx
|
|
12
12
|
var b = new Set([
|
|
@@ -81,57 +81,57 @@ function w(e, t) {
|
|
|
81
81
|
function T(e) {
|
|
82
82
|
return x[e] ?? e.replace(/_/g, " ");
|
|
83
83
|
}
|
|
84
|
-
var
|
|
85
|
-
let { navigate:
|
|
86
|
-
let n =
|
|
84
|
+
var te = "\n query SellerMyPublisher {\n myPublisher {\n id\n }\n }\n", ne = "\n query SellerItems($publisherId: String!) {\n products(filter: { publisherId: $publisherId, nature: PHYSICAL }, limit: 100, offset: 0) {\n id\n name\n slug\n type\n status\n price\n currency\n stockQuantity\n sku\n brand\n icon\n createdAt\n }\n }\n", E = () => {
|
|
85
|
+
let { navigate: m, basePath: x, apiGatewayUrl: E, authToken: O } = e(), { t: k } = _(), A = (e, t) => {
|
|
86
|
+
let n = k(e);
|
|
87
87
|
return n === e ? t : n;
|
|
88
|
-
},
|
|
89
|
-
|
|
88
|
+
}, j = E ?? "/global/graphql", [M, N] = o(!0), [P, F] = o(!1), [I, L] = o(null), [R, z] = o([]), [B, V] = o(null), [H, U] = o(0), [W, G] = o("grid"), [K, q] = o(""), [J, Y] = o(""), X = (e) => {
|
|
89
|
+
m?.(`${x}${e}`);
|
|
90
90
|
};
|
|
91
|
-
|
|
91
|
+
i(() => {
|
|
92
92
|
let e = !1;
|
|
93
|
-
return
|
|
93
|
+
return N(!0), V(null), (async () => {
|
|
94
94
|
try {
|
|
95
|
-
let t = await fetch(
|
|
95
|
+
let t = await fetch(j, {
|
|
96
96
|
method: "POST",
|
|
97
97
|
headers: {
|
|
98
98
|
"Content-Type": "application/json",
|
|
99
|
-
Authorization: `Bearer ${
|
|
99
|
+
Authorization: `Bearer ${O ?? ""}`
|
|
100
100
|
},
|
|
101
|
-
body: JSON.stringify({ query:
|
|
101
|
+
body: JSON.stringify({ query: te })
|
|
102
102
|
});
|
|
103
103
|
if (e) return;
|
|
104
104
|
if (!t.ok) throw Error(`Request failed with status ${t.status}`);
|
|
105
105
|
let n = await t.json();
|
|
106
106
|
if (e) return;
|
|
107
107
|
if (n.errors?.length) throw Error(n.errors[0]?.message ?? "Unknown GraphQL error");
|
|
108
|
-
|
|
108
|
+
L(n.data?.myPublisher?.id ?? null);
|
|
109
109
|
} catch (t) {
|
|
110
110
|
e || V(t instanceof Error ? t.message : "Failed to load publisher");
|
|
111
111
|
} finally {
|
|
112
|
-
e ||
|
|
112
|
+
e || N(!1);
|
|
113
113
|
}
|
|
114
114
|
})(), () => {
|
|
115
115
|
e = !0;
|
|
116
116
|
};
|
|
117
117
|
}, [
|
|
118
|
-
|
|
119
|
-
|
|
118
|
+
j,
|
|
119
|
+
O,
|
|
120
120
|
H
|
|
121
|
-
]),
|
|
122
|
-
if (!
|
|
121
|
+
]), i(() => {
|
|
122
|
+
if (!I) return;
|
|
123
123
|
let e = !1;
|
|
124
|
-
return
|
|
124
|
+
return F(!0), V(null), (async () => {
|
|
125
125
|
try {
|
|
126
|
-
let t = await fetch(
|
|
126
|
+
let t = await fetch(j, {
|
|
127
127
|
method: "POST",
|
|
128
128
|
headers: {
|
|
129
129
|
"Content-Type": "application/json",
|
|
130
|
-
Authorization: `Bearer ${
|
|
130
|
+
Authorization: `Bearer ${O ?? ""}`
|
|
131
131
|
},
|
|
132
132
|
body: JSON.stringify({
|
|
133
|
-
query:
|
|
134
|
-
variables: { publisherId:
|
|
133
|
+
query: ne,
|
|
134
|
+
variables: { publisherId: I }
|
|
135
135
|
})
|
|
136
136
|
});
|
|
137
137
|
if (e) return;
|
|
@@ -146,172 +146,172 @@ var E = "\n query SellerMyPublisher {\n myPublisher {\n id\n }\n }\
|
|
|
146
146
|
} catch (t) {
|
|
147
147
|
e || V(t instanceof Error ? t.message : "Failed to load items");
|
|
148
148
|
} finally {
|
|
149
|
-
e ||
|
|
149
|
+
e || F(!1);
|
|
150
150
|
}
|
|
151
151
|
})(), () => {
|
|
152
152
|
e = !0;
|
|
153
153
|
};
|
|
154
154
|
}, [
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
155
|
+
I,
|
|
156
|
+
j,
|
|
157
|
+
O,
|
|
158
158
|
H
|
|
159
159
|
]);
|
|
160
|
-
let Z =
|
|
160
|
+
let Z = a(() => R.filter((e) => !b.has(e.type)), [R]), Q = a(() => Z.filter((e) => {
|
|
161
161
|
let t = !K || e.name.toLowerCase().includes(K.toLowerCase()), n = !J || e.status === J;
|
|
162
162
|
return t && n;
|
|
163
163
|
}), [
|
|
164
164
|
Z,
|
|
165
165
|
K,
|
|
166
166
|
J
|
|
167
|
-
]), $ =
|
|
167
|
+
]), $ = a(() => ({
|
|
168
168
|
total: Z.length,
|
|
169
169
|
published: Z.filter((e) => e.status === "PUBLISHED").length,
|
|
170
170
|
pendingReview: Z.filter((e) => e.status === "PENDING_REVIEW").length,
|
|
171
171
|
outOfStock: Z.filter((e) => e.stockQuantity === 0).length
|
|
172
172
|
}), [Z]);
|
|
173
|
-
if (
|
|
174
|
-
title:
|
|
175
|
-
description:
|
|
176
|
-
children: /* @__PURE__ */
|
|
173
|
+
if (M && R.length === 0 && !B) return /* @__PURE__ */ h(n, {
|
|
174
|
+
title: A("devportal.myItems", "My Items"),
|
|
175
|
+
description: A("devportal.manageYourPhysicalProductListings", "Manage your physical product listings."),
|
|
176
|
+
children: /* @__PURE__ */ g("div", {
|
|
177
177
|
className: "flex items-center justify-center py-12",
|
|
178
|
-
children: [/* @__PURE__ */
|
|
178
|
+
children: [/* @__PURE__ */ h(u, { className: "h-8 w-8 animate-spin text-text-secondary" }), /* @__PURE__ */ h("span", {
|
|
179
179
|
className: "ml-2 text-text-secondary",
|
|
180
|
-
children:
|
|
180
|
+
children: A("devportal.loadingItems", "Loading items...")
|
|
181
181
|
})]
|
|
182
182
|
})
|
|
183
183
|
});
|
|
184
|
-
if (B && R.length === 0) return /* @__PURE__ */
|
|
185
|
-
title:
|
|
186
|
-
description:
|
|
187
|
-
children: /* @__PURE__ */
|
|
184
|
+
if (B && R.length === 0) return /* @__PURE__ */ h(n, {
|
|
185
|
+
title: A("devportal.myItems", "My Items"),
|
|
186
|
+
description: A("devportal.manageYourPhysicalProductListings", "Manage your physical product listings."),
|
|
187
|
+
children: /* @__PURE__ */ g("div", {
|
|
188
188
|
className: "rounded-lg border border-status-error-border/50 bg-status-error-bg/10 p-6 text-center",
|
|
189
189
|
children: [
|
|
190
|
-
/* @__PURE__ */
|
|
191
|
-
/* @__PURE__ */
|
|
190
|
+
/* @__PURE__ */ h(s, { className: "mx-auto h-8 w-8 text-status-error-text" }),
|
|
191
|
+
/* @__PURE__ */ h("h3", {
|
|
192
192
|
className: "mt-2 font-medium text-status-error-text",
|
|
193
|
-
children:
|
|
193
|
+
children: A("devportal.failedToLoadItems", "Failed to load items")
|
|
194
194
|
}),
|
|
195
|
-
/* @__PURE__ */
|
|
195
|
+
/* @__PURE__ */ h("p", {
|
|
196
196
|
className: "mt-1 text-sm text-text-secondary",
|
|
197
197
|
children: B
|
|
198
198
|
}),
|
|
199
|
-
/* @__PURE__ */
|
|
199
|
+
/* @__PURE__ */ h("button", {
|
|
200
200
|
onClick: () => U((e) => e + 1),
|
|
201
201
|
className: "mt-4 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors",
|
|
202
|
-
children:
|
|
202
|
+
children: A("devportal.tryAgain", "Try Again")
|
|
203
203
|
})
|
|
204
204
|
]
|
|
205
205
|
})
|
|
206
206
|
});
|
|
207
207
|
let re = !!(K || J);
|
|
208
|
-
return /* @__PURE__ */
|
|
208
|
+
return /* @__PURE__ */ h(r, {
|
|
209
209
|
authOnly: !0,
|
|
210
|
-
children: /* @__PURE__ */
|
|
211
|
-
title:
|
|
212
|
-
description:
|
|
213
|
-
actions: /* @__PURE__ */
|
|
210
|
+
children: /* @__PURE__ */ g(n, {
|
|
211
|
+
title: A("devportal.myItems", "My Items"),
|
|
212
|
+
description: A("devportal.manageYourPhysicalProductListings", "Manage your physical product listings."),
|
|
213
|
+
actions: /* @__PURE__ */ g("button", {
|
|
214
214
|
onClick: () => X("/seller/items/new"),
|
|
215
215
|
className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary",
|
|
216
|
-
children: [/* @__PURE__ */
|
|
216
|
+
children: [/* @__PURE__ */ h(f, {
|
|
217
217
|
size: 16,
|
|
218
218
|
"aria-hidden": "true"
|
|
219
|
-
}),
|
|
219
|
+
}), A("devportal.listAnItem", "List an Item")]
|
|
220
220
|
}),
|
|
221
221
|
children: [
|
|
222
|
-
/* @__PURE__ */
|
|
222
|
+
/* @__PURE__ */ h(v, {
|
|
223
223
|
className: "mb-4",
|
|
224
|
-
children: /* @__PURE__ */
|
|
224
|
+
children: /* @__PURE__ */ g("div", {
|
|
225
225
|
className: "grid grid-cols-2 gap-4 sm:grid-cols-4",
|
|
226
226
|
children: [
|
|
227
|
-
/* @__PURE__ */
|
|
227
|
+
/* @__PURE__ */ g(y, {
|
|
228
228
|
treatment: "metric",
|
|
229
229
|
className: "p-4",
|
|
230
|
-
children: [/* @__PURE__ */
|
|
230
|
+
children: [/* @__PURE__ */ h("p", {
|
|
231
231
|
className: "text-sm text-text-secondary",
|
|
232
|
-
children:
|
|
233
|
-
}), /* @__PURE__ */
|
|
232
|
+
children: A("devportal.totalItems", "Total Items")
|
|
233
|
+
}), /* @__PURE__ */ h("p", {
|
|
234
234
|
className: "mt-1 text-2xl font-semibold tabular-nums",
|
|
235
|
-
children:
|
|
235
|
+
children: P ? /* @__PURE__ */ h(u, { className: "h-5 w-5 animate-spin text-text-secondary" }) : $.total
|
|
236
236
|
})]
|
|
237
237
|
}),
|
|
238
|
-
/* @__PURE__ */
|
|
238
|
+
/* @__PURE__ */ g(y, {
|
|
239
239
|
treatment: "metric",
|
|
240
240
|
className: "p-4",
|
|
241
|
-
children: [/* @__PURE__ */
|
|
241
|
+
children: [/* @__PURE__ */ h("p", {
|
|
242
242
|
className: "text-sm text-status-success-text",
|
|
243
|
-
children:
|
|
244
|
-
}), /* @__PURE__ */
|
|
243
|
+
children: A("devportal.published", "Published")
|
|
244
|
+
}), /* @__PURE__ */ h("p", {
|
|
245
245
|
className: "mt-1 text-2xl font-semibold tabular-nums",
|
|
246
|
-
children:
|
|
246
|
+
children: P ? /* @__PURE__ */ h(u, { className: "h-5 w-5 animate-spin text-text-secondary" }) : $.published
|
|
247
247
|
})]
|
|
248
248
|
}),
|
|
249
|
-
/* @__PURE__ */
|
|
249
|
+
/* @__PURE__ */ g(y, {
|
|
250
250
|
treatment: "metric",
|
|
251
251
|
className: "p-4",
|
|
252
|
-
children: [/* @__PURE__ */
|
|
252
|
+
children: [/* @__PURE__ */ h("p", {
|
|
253
253
|
className: "text-sm text-status-warning-text",
|
|
254
|
-
children:
|
|
255
|
-
}), /* @__PURE__ */
|
|
254
|
+
children: A("devportal.pendingReview", "Pending Review")
|
|
255
|
+
}), /* @__PURE__ */ h("p", {
|
|
256
256
|
className: "mt-1 text-2xl font-semibold tabular-nums",
|
|
257
|
-
children:
|
|
257
|
+
children: P ? /* @__PURE__ */ h(u, { className: "h-5 w-5 animate-spin text-text-secondary" }) : $.pendingReview
|
|
258
258
|
})]
|
|
259
259
|
}),
|
|
260
|
-
/* @__PURE__ */
|
|
260
|
+
/* @__PURE__ */ g(y, {
|
|
261
261
|
treatment: "metric",
|
|
262
262
|
className: "p-4",
|
|
263
|
-
children: [/* @__PURE__ */
|
|
263
|
+
children: [/* @__PURE__ */ h("p", {
|
|
264
264
|
className: "text-sm text-status-error-text",
|
|
265
|
-
children:
|
|
266
|
-
}), /* @__PURE__ */
|
|
265
|
+
children: A("devportal.outOfStock", "Out of Stock")
|
|
266
|
+
}), /* @__PURE__ */ h("p", {
|
|
267
267
|
className: "mt-1 text-2xl font-semibold tabular-nums",
|
|
268
|
-
children:
|
|
268
|
+
children: P ? /* @__PURE__ */ h(u, { className: "h-5 w-5 animate-spin text-text-secondary" }) : $.outOfStock
|
|
269
269
|
})]
|
|
270
270
|
})
|
|
271
271
|
]
|
|
272
272
|
})
|
|
273
273
|
}),
|
|
274
|
-
/* @__PURE__ */
|
|
274
|
+
/* @__PURE__ */ g("div", {
|
|
275
275
|
className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
|
|
276
|
-
children: [/* @__PURE__ */
|
|
276
|
+
children: [/* @__PURE__ */ g("div", {
|
|
277
277
|
className: "flex flex-1 items-center gap-3",
|
|
278
|
-
children: [/* @__PURE__ */
|
|
278
|
+
children: [/* @__PURE__ */ g("div", {
|
|
279
279
|
className: "relative flex-1 max-w-md",
|
|
280
|
-
children: [/* @__PURE__ */
|
|
280
|
+
children: [/* @__PURE__ */ h(p, {
|
|
281
281
|
size: 16,
|
|
282
282
|
className: "absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"
|
|
283
|
-
}), /* @__PURE__ */
|
|
283
|
+
}), /* @__PURE__ */ h("input", {
|
|
284
284
|
type: "text",
|
|
285
|
-
placeholder:
|
|
285
|
+
placeholder: A("devportal.searchItems", "Search items..."),
|
|
286
286
|
value: K,
|
|
287
287
|
onChange: (e) => q(e.target.value),
|
|
288
288
|
className: "w-full rounded-md border border-border-seam bg-bg-surface pl-9 pr-4 py-2 text-sm text-text-primary placeholder:text-text-muted focus:outline-none focus:ring-2 focus:ring-primary"
|
|
289
289
|
})]
|
|
290
|
-
}), /* @__PURE__ */
|
|
290
|
+
}), /* @__PURE__ */ h("select", {
|
|
291
291
|
value: J,
|
|
292
292
|
onChange: (e) => Y(e.target.value),
|
|
293
293
|
className: "rounded-md border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-primary",
|
|
294
|
-
children: C.map((e) => /* @__PURE__ */
|
|
294
|
+
children: C.map((e) => /* @__PURE__ */ h("option", {
|
|
295
295
|
value: e.value,
|
|
296
296
|
children: e.label
|
|
297
297
|
}, e.value))
|
|
298
298
|
})]
|
|
299
|
-
}), /* @__PURE__ */
|
|
299
|
+
}), /* @__PURE__ */ g("div", {
|
|
300
300
|
className: "flex items-center gap-1 rounded-md border border-border-seam p-1",
|
|
301
|
-
children: [/* @__PURE__ */
|
|
301
|
+
children: [/* @__PURE__ */ h("button", {
|
|
302
302
|
onClick: () => G("grid"),
|
|
303
303
|
className: `rounded p-1.5 transition-colors ${W === "grid" ? "bg-bg-sunken text-text-primary" : "text-text-secondary hover:bg-bg-sunken/50"}`,
|
|
304
|
-
title:
|
|
305
|
-
children: /* @__PURE__ */
|
|
306
|
-
}), /* @__PURE__ */
|
|
304
|
+
title: A("devportal.gridView", "Grid view"),
|
|
305
|
+
children: /* @__PURE__ */ h(ee, { size: 16 })
|
|
306
|
+
}), /* @__PURE__ */ h("button", {
|
|
307
307
|
onClick: () => G("list"),
|
|
308
308
|
className: `rounded p-1.5 transition-colors ${W === "list" ? "bg-bg-sunken text-text-primary" : "text-text-secondary hover:bg-bg-sunken/50"}`,
|
|
309
|
-
title:
|
|
310
|
-
children: /* @__PURE__ */
|
|
309
|
+
title: A("devportal.listView", "List view"),
|
|
310
|
+
children: /* @__PURE__ */ h(l, { size: 16 })
|
|
311
311
|
})]
|
|
312
312
|
})]
|
|
313
313
|
}),
|
|
314
|
-
Z.length > 0 && /* @__PURE__ */
|
|
314
|
+
Z.length > 0 && /* @__PURE__ */ g("p", {
|
|
315
315
|
className: "text-sm text-text-secondary",
|
|
316
316
|
children: [
|
|
317
317
|
Q.length,
|
|
@@ -320,213 +320,213 @@ var E = "\n query SellerMyPublisher {\n myPublisher {\n id\n }\n }\
|
|
|
320
320
|
" found"
|
|
321
321
|
]
|
|
322
322
|
}),
|
|
323
|
-
!
|
|
323
|
+
!I && !M ? /* @__PURE__ */ h(t, {
|
|
324
324
|
illustration: "empty-generic",
|
|
325
|
-
icon: /* @__PURE__ */
|
|
326
|
-
title:
|
|
327
|
-
description:
|
|
328
|
-
action: /* @__PURE__ */
|
|
325
|
+
icon: /* @__PURE__ */ h(d, { size: 32 }),
|
|
326
|
+
title: A("devportal.noPublisherProfileYet", "No publisher profile yet"),
|
|
327
|
+
description: A("devportal.listAnItemToGetStarted", "List an item to get started. Your publisher profile will be created automatically."),
|
|
328
|
+
action: /* @__PURE__ */ g("button", {
|
|
329
329
|
onClick: () => X("/seller/items/new"),
|
|
330
330
|
className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90",
|
|
331
|
-
children: [/* @__PURE__ */
|
|
331
|
+
children: [/* @__PURE__ */ h(f, { size: 16 }), A("devportal.listAnItem", "List an Item")]
|
|
332
332
|
})
|
|
333
|
-
}) :
|
|
333
|
+
}) : P ? /* @__PURE__ */ g("div", {
|
|
334
334
|
className: "flex items-center justify-center py-12",
|
|
335
|
-
children: [/* @__PURE__ */
|
|
335
|
+
children: [/* @__PURE__ */ h(u, { className: "h-6 w-6 animate-spin text-text-secondary" }), /* @__PURE__ */ h("span", {
|
|
336
336
|
className: "ml-2 text-text-secondary",
|
|
337
|
-
children:
|
|
337
|
+
children: A("devportal.loadingItems", "Loading items...")
|
|
338
338
|
})]
|
|
339
|
-
}) : Q.length > 0 ? W === "grid" ? /* @__PURE__ */
|
|
339
|
+
}) : Q.length > 0 ? W === "grid" ? /* @__PURE__ */ h("div", {
|
|
340
340
|
className: "grid gap-4 grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",
|
|
341
|
-
children: Q.map((e) => /* @__PURE__ */
|
|
341
|
+
children: Q.map((e) => /* @__PURE__ */ h(D, {
|
|
342
342
|
item: e,
|
|
343
343
|
onEdit: () => X(`/seller/items/${e.id}`)
|
|
344
344
|
}, e.id))
|
|
345
|
-
}) : /* @__PURE__ */
|
|
345
|
+
}) : /* @__PURE__ */ h("div", {
|
|
346
346
|
className: "overflow-x-auto rounded-lg border border-border-seam",
|
|
347
|
-
children: /* @__PURE__ */
|
|
347
|
+
children: /* @__PURE__ */ g("table", {
|
|
348
348
|
className: "w-full text-sm",
|
|
349
|
-
children: [/* @__PURE__ */
|
|
349
|
+
children: [/* @__PURE__ */ h("thead", { children: /* @__PURE__ */ g("tr", {
|
|
350
350
|
className: "border-b border-border-seam bg-bg-sunken",
|
|
351
351
|
children: [
|
|
352
|
-
/* @__PURE__ */
|
|
352
|
+
/* @__PURE__ */ h("th", {
|
|
353
353
|
className: "px-4 py-3 text-left font-medium text-text-secondary",
|
|
354
354
|
children: "Item"
|
|
355
355
|
}),
|
|
356
|
-
/* @__PURE__ */
|
|
356
|
+
/* @__PURE__ */ h("th", {
|
|
357
357
|
className: "px-4 py-3 text-left font-medium text-text-secondary",
|
|
358
358
|
children: "Type"
|
|
359
359
|
}),
|
|
360
|
-
/* @__PURE__ */
|
|
360
|
+
/* @__PURE__ */ h("th", {
|
|
361
361
|
className: "px-4 py-3 text-left font-medium text-text-secondary",
|
|
362
362
|
children: "Price"
|
|
363
363
|
}),
|
|
364
|
-
/* @__PURE__ */
|
|
364
|
+
/* @__PURE__ */ h("th", {
|
|
365
365
|
className: "px-4 py-3 text-left font-medium text-text-secondary",
|
|
366
366
|
children: "Stock"
|
|
367
367
|
}),
|
|
368
|
-
/* @__PURE__ */
|
|
368
|
+
/* @__PURE__ */ h("th", {
|
|
369
369
|
className: "px-4 py-3 text-left font-medium text-text-secondary",
|
|
370
370
|
children: "Status"
|
|
371
371
|
}),
|
|
372
|
-
/* @__PURE__ */
|
|
372
|
+
/* @__PURE__ */ h("th", {
|
|
373
373
|
className: "px-4 py-3 text-right font-medium text-text-secondary",
|
|
374
374
|
children: "Actions"
|
|
375
375
|
})
|
|
376
376
|
]
|
|
377
|
-
}) }), /* @__PURE__ */
|
|
377
|
+
}) }), /* @__PURE__ */ h("tbody", { children: Q.map((e) => {
|
|
378
378
|
let t = S[e.status] ?? S.DRAFT;
|
|
379
|
-
return /* @__PURE__ */
|
|
379
|
+
return /* @__PURE__ */ g("tr", {
|
|
380
380
|
className: "border-b border-border-subtle last:border-0 hover:bg-bg-sunken/50 transition-colors",
|
|
381
381
|
children: [
|
|
382
|
-
/* @__PURE__ */
|
|
382
|
+
/* @__PURE__ */ h("td", {
|
|
383
383
|
className: "px-4 py-3",
|
|
384
|
-
children: /* @__PURE__ */
|
|
384
|
+
children: /* @__PURE__ */ g("div", {
|
|
385
385
|
className: "flex items-center gap-3",
|
|
386
|
-
children: [e.icon ? /* @__PURE__ */
|
|
386
|
+
children: [e.icon ? /* @__PURE__ */ h("img", {
|
|
387
387
|
src: e.icon,
|
|
388
388
|
alt: e.name,
|
|
389
389
|
className: "h-8 w-8 rounded-lg object-cover shrink-0"
|
|
390
|
-
}) : /* @__PURE__ */
|
|
390
|
+
}) : /* @__PURE__ */ h("div", {
|
|
391
391
|
className: "flex h-8 w-8 items-center justify-center rounded-lg bg-bg-sunken shrink-0",
|
|
392
|
-
children: /* @__PURE__ */
|
|
392
|
+
children: /* @__PURE__ */ h(d, {
|
|
393
393
|
size: 14,
|
|
394
394
|
className: "text-text-muted"
|
|
395
395
|
})
|
|
396
|
-
}), /* @__PURE__ */
|
|
396
|
+
}), /* @__PURE__ */ g("div", {
|
|
397
397
|
className: "min-w-0",
|
|
398
|
-
children: [/* @__PURE__ */
|
|
398
|
+
children: [/* @__PURE__ */ h("p", {
|
|
399
399
|
className: "font-medium text-text-primary truncate",
|
|
400
400
|
children: e.name
|
|
401
|
-
}), e.sku && /* @__PURE__ */
|
|
401
|
+
}), e.sku && /* @__PURE__ */ g("p", {
|
|
402
402
|
className: "text-xs text-text-muted",
|
|
403
403
|
children: ["SKU: ", e.sku]
|
|
404
404
|
})]
|
|
405
405
|
})]
|
|
406
406
|
})
|
|
407
407
|
}),
|
|
408
|
-
/* @__PURE__ */
|
|
408
|
+
/* @__PURE__ */ h("td", {
|
|
409
409
|
className: "px-4 py-3 text-text-secondary",
|
|
410
410
|
children: T(e.type)
|
|
411
411
|
}),
|
|
412
|
-
/* @__PURE__ */
|
|
412
|
+
/* @__PURE__ */ h("td", {
|
|
413
413
|
className: "px-4 py-3 text-text-primary tabular-nums",
|
|
414
414
|
children: w(e.price, e.currency)
|
|
415
415
|
}),
|
|
416
|
-
/* @__PURE__ */
|
|
416
|
+
/* @__PURE__ */ h("td", {
|
|
417
417
|
className: "px-4 py-3",
|
|
418
|
-
children: e.stockQuantity === 0 ? /* @__PURE__ */
|
|
418
|
+
children: e.stockQuantity === 0 ? /* @__PURE__ */ h("span", {
|
|
419
419
|
className: "text-status-error-text",
|
|
420
420
|
children: "Out of stock"
|
|
421
|
-
}) : /* @__PURE__ */
|
|
421
|
+
}) : /* @__PURE__ */ h("span", {
|
|
422
422
|
className: "text-text-primary tabular-nums",
|
|
423
423
|
children: e.stockQuantity
|
|
424
424
|
})
|
|
425
425
|
}),
|
|
426
|
-
/* @__PURE__ */
|
|
426
|
+
/* @__PURE__ */ h("td", {
|
|
427
427
|
className: "px-4 py-3",
|
|
428
|
-
children: /* @__PURE__ */
|
|
428
|
+
children: /* @__PURE__ */ h("span", {
|
|
429
429
|
className: `rounded-full px-2.5 py-0.5 text-xs font-medium ${t.className}`,
|
|
430
430
|
children: t.label
|
|
431
431
|
})
|
|
432
432
|
}),
|
|
433
|
-
/* @__PURE__ */
|
|
433
|
+
/* @__PURE__ */ h("td", {
|
|
434
434
|
className: "px-4 py-3 text-right",
|
|
435
|
-
children: /* @__PURE__ */
|
|
435
|
+
children: /* @__PURE__ */ g("button", {
|
|
436
436
|
onClick: () => X(`/seller/items/${e.id}`),
|
|
437
437
|
className: "inline-flex items-center gap-1.5 rounded-md border border-border-subtle px-3 py-1.5 text-xs font-medium text-text-secondary hover:text-text-primary hover:bg-bg-sunken transition-colors",
|
|
438
|
-
children: [/* @__PURE__ */
|
|
438
|
+
children: [/* @__PURE__ */ h(c, { size: 12 }), A("devportal.edit", "Edit")]
|
|
439
439
|
})
|
|
440
440
|
})
|
|
441
441
|
]
|
|
442
442
|
}, e.id);
|
|
443
443
|
}) })]
|
|
444
444
|
})
|
|
445
|
-
}) : Z.length > 0 && re ? /* @__PURE__ */
|
|
445
|
+
}) : Z.length > 0 && re ? /* @__PURE__ */ h(t, {
|
|
446
446
|
illustration: "empty-search",
|
|
447
|
-
title:
|
|
448
|
-
description:
|
|
449
|
-
}) : /* @__PURE__ */
|
|
447
|
+
title: A("devportal.noItemsMatchYourSearch", "No items match your search"),
|
|
448
|
+
description: A("devportal.tryAdjustingFilters", "Try adjusting your search or filters")
|
|
449
|
+
}) : /* @__PURE__ */ h(t, {
|
|
450
450
|
illustration: "empty-data",
|
|
451
|
-
icon: /* @__PURE__ */
|
|
452
|
-
title:
|
|
453
|
-
description:
|
|
454
|
-
action: /* @__PURE__ */
|
|
451
|
+
icon: /* @__PURE__ */ h(d, { size: 32 }),
|
|
452
|
+
title: A("devportal.noItemsYet", "No items yet"),
|
|
453
|
+
description: A("devportal.addYourFirstPhysicalProduct", "Add your first physical product listing to start selling"),
|
|
454
|
+
action: /* @__PURE__ */ g("button", {
|
|
455
455
|
onClick: () => X("/seller/items/new"),
|
|
456
456
|
className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90",
|
|
457
|
-
children: [/* @__PURE__ */
|
|
457
|
+
children: [/* @__PURE__ */ h(f, { size: 16 }), A("devportal.listAnItem", "List an Item")]
|
|
458
458
|
})
|
|
459
459
|
})
|
|
460
460
|
]
|
|
461
461
|
})
|
|
462
462
|
});
|
|
463
|
-
},
|
|
463
|
+
}, D = ({ item: e, onEdit: t }) => {
|
|
464
464
|
let n = S[e.status] ?? S.DRAFT;
|
|
465
|
-
return /* @__PURE__ */
|
|
465
|
+
return /* @__PURE__ */ g(y, {
|
|
466
466
|
treatment: "insight",
|
|
467
467
|
className: "flex flex-col gap-3 p-4",
|
|
468
|
-
children: [/* @__PURE__ */
|
|
468
|
+
children: [/* @__PURE__ */ g("div", {
|
|
469
469
|
className: "flex items-start gap-3",
|
|
470
|
-
children: [e.icon ? /* @__PURE__ */
|
|
470
|
+
children: [e.icon ? /* @__PURE__ */ h("img", {
|
|
471
471
|
src: e.icon,
|
|
472
472
|
alt: e.name,
|
|
473
473
|
className: "h-20 w-20 rounded-xl object-cover shrink-0"
|
|
474
|
-
}) : /* @__PURE__ */
|
|
474
|
+
}) : /* @__PURE__ */ h("div", {
|
|
475
475
|
className: "flex h-20 w-20 items-center justify-center rounded-xl bg-bg-sunken shrink-0",
|
|
476
|
-
children: /* @__PURE__ */
|
|
476
|
+
children: /* @__PURE__ */ h(d, {
|
|
477
477
|
size: 32,
|
|
478
478
|
className: "text-text-muted"
|
|
479
479
|
})
|
|
480
|
-
}), /* @__PURE__ */
|
|
480
|
+
}), /* @__PURE__ */ g("div", {
|
|
481
481
|
className: "min-w-0 flex-1",
|
|
482
482
|
children: [
|
|
483
|
-
/* @__PURE__ */
|
|
483
|
+
/* @__PURE__ */ h("p", {
|
|
484
484
|
className: "font-semibold text-text-primary truncate",
|
|
485
485
|
children: e.name
|
|
486
486
|
}),
|
|
487
|
-
e.brand && /* @__PURE__ */
|
|
487
|
+
e.brand && /* @__PURE__ */ h("p", {
|
|
488
488
|
className: "text-xs text-text-muted mt-0.5",
|
|
489
489
|
children: e.brand
|
|
490
490
|
}),
|
|
491
|
-
/* @__PURE__ */
|
|
491
|
+
/* @__PURE__ */ h("p", {
|
|
492
492
|
className: "text-sm text-text-secondary mt-1",
|
|
493
493
|
children: w(e.price, e.currency)
|
|
494
494
|
}),
|
|
495
|
-
/* @__PURE__ */
|
|
495
|
+
/* @__PURE__ */ g("div", {
|
|
496
496
|
className: "flex items-center gap-2 mt-2 flex-wrap",
|
|
497
|
-
children: [/* @__PURE__ */
|
|
497
|
+
children: [/* @__PURE__ */ h("span", {
|
|
498
498
|
className: `rounded-full px-2 py-0.5 text-xs font-medium ${n.className}`,
|
|
499
499
|
children: n.label
|
|
500
|
-
}), /* @__PURE__ */
|
|
500
|
+
}), /* @__PURE__ */ h("span", {
|
|
501
501
|
className: "rounded-full px-2 py-0.5 text-xs font-medium bg-bg-muted text-text-secondary",
|
|
502
502
|
children: T(e.type)
|
|
503
503
|
})]
|
|
504
504
|
})
|
|
505
505
|
]
|
|
506
506
|
})]
|
|
507
|
-
}), /* @__PURE__ */
|
|
507
|
+
}), /* @__PURE__ */ g("div", {
|
|
508
508
|
className: "flex items-center justify-between pt-2 border-t border-border-subtle",
|
|
509
|
-
children: [/* @__PURE__ */
|
|
509
|
+
children: [/* @__PURE__ */ g("div", {
|
|
510
510
|
className: "flex items-center gap-1.5 text-sm",
|
|
511
|
-
children: [/* @__PURE__ */
|
|
511
|
+
children: [/* @__PURE__ */ h(m, {
|
|
512
512
|
size: 12,
|
|
513
513
|
className: "text-text-muted shrink-0"
|
|
514
|
-
}), e.stockQuantity === 0 ? /* @__PURE__ */
|
|
514
|
+
}), e.stockQuantity === 0 ? /* @__PURE__ */ h("span", {
|
|
515
515
|
className: "text-status-error-text",
|
|
516
516
|
children: "Out of stock"
|
|
517
|
-
}) : /* @__PURE__ */
|
|
517
|
+
}) : /* @__PURE__ */ g("span", {
|
|
518
518
|
className: "text-text-secondary",
|
|
519
519
|
children: [e.stockQuantity, " in stock"]
|
|
520
520
|
})]
|
|
521
|
-
}), /* @__PURE__ */
|
|
521
|
+
}), /* @__PURE__ */ g("button", {
|
|
522
522
|
onClick: t,
|
|
523
523
|
className: "inline-flex items-center gap-1.5 rounded-md border border-border-subtle px-3 py-1.5 text-xs font-medium text-text-secondary hover:text-text-primary hover:bg-bg-sunken transition-colors",
|
|
524
|
-
children: [/* @__PURE__ */
|
|
524
|
+
children: [/* @__PURE__ */ h(c, { size: 12 }), "Edit"]
|
|
525
525
|
})]
|
|
526
526
|
})]
|
|
527
527
|
});
|
|
528
528
|
};
|
|
529
529
|
//#endregion
|
|
530
|
-
export {
|
|
530
|
+
export { E as SellerItemsPage };
|
|
531
531
|
|
|
532
532
|
//# sourceMappingURL=SellerItemsPage.js.map
|