@burdenoff/microfe-devportal 2026.1014.1 → 2026.1026.1
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/components/PackageValidationPanel.d.ts +31 -0
- package/dist/devportal/components/PackageValidationPanel.d.ts.map +1 -0
- package/dist/devportal/components/PackageValidationPanel.js +104 -0
- package/dist/devportal/components/PackageValidationPanel.js.map +1 -0
- package/dist/devportal/components/index.d.ts +1 -0
- package/dist/devportal/components/index.d.ts.map +1 -1
- package/dist/devportal/components/index.js +1 -0
- package/dist/devportal/hooks/useSellerOrganization.d.ts.map +1 -1
- package/dist/devportal/hooks/useSellerOrganization.js +23 -22
- package/dist/devportal/hooks/useSellerOrganization.js.map +1 -1
- package/dist/devportal/pages/AdminReviewPage.d.ts.map +1 -1
- package/dist/devportal/pages/AdminReviewPage.js +192 -181
- package/dist/devportal/pages/AdminReviewPage.js.map +1 -1
- package/dist/devportal/pages/ApplicationVersionsPage.d.ts.map +1 -1
- package/dist/devportal/pages/ApplicationVersionsPage.js +117 -115
- package/dist/devportal/pages/ApplicationVersionsPage.js.map +1 -1
- package/dist/devportal/pages/CreatePhysicalItemPage.d.ts.map +1 -1
- package/dist/devportal/pages/CreatePhysicalItemPage.js +119 -118
- package/dist/devportal/pages/CreatePhysicalItemPage.js.map +1 -1
- package/dist/devportal/pages/EditPhysicalItemPage.d.ts.map +1 -1
- package/dist/devportal/pages/EditPhysicalItemPage.js +61 -60
- package/dist/devportal/pages/EditPhysicalItemPage.js.map +1 -1
- package/dist/devportal/pages/SellerDashboardPage.d.ts.map +1 -1
- package/dist/devportal/pages/SellerDashboardPage.js +142 -141
- package/dist/devportal/pages/SellerDashboardPage.js.map +1 -1
- package/dist/devportal/pages/SellerItemsPage.d.ts.map +1 -1
- package/dist/devportal/pages/SellerItemsPage.js +190 -189
- package/dist/devportal/pages/SellerItemsPage.js.map +1 -1
- package/dist/devportal/pages/SellerOrdersPage.d.ts.map +1 -1
- package/dist/devportal/pages/SellerOrdersPage.js +43 -42
- package/dist/devportal/pages/SellerOrdersPage.js.map +1 -1
- package/dist/devportal/utils/graphqlEndpoint.d.ts +6 -0
- package/dist/devportal/utils/graphqlEndpoint.d.ts.map +1 -0
- package/dist/devportal/utils/graphqlEndpoint.js +9 -0
- package/dist/devportal/utils/graphqlEndpoint.js.map +1 -0
- package/dist/generated/global-operations.d.ts +1 -0
- package/dist/generated/global-operations.d.ts.map +1 -1
- package/dist/generated/global-operations.js +1 -0
- package/dist/generated/global-operations.js.map +1 -1
- package/package.json +1 -1
|
@@ -3,14 +3,15 @@ import { EmptyState as t } from "../components/EmptyState.js";
|
|
|
3
3
|
import { PageLayout as n } from "../components/PageLayout.js";
|
|
4
4
|
import { PermissionGuard as r } from "../components/PermissionGuard.js";
|
|
5
5
|
import "../components/index.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
6
|
+
import { resolveGlobalGraphqlEndpoint as i } from "../utils/graphqlEndpoint.js";
|
|
7
|
+
import { formatCurrency as a } from "../utils/currency.js";
|
|
8
|
+
import { useEffect as o, useState as s } from "react";
|
|
9
|
+
import { ArrowRight as c, Building2 as l, CheckCircle2 as u, Clock as d, DollarSign as f, Loader2 as p, Package as m, Plus as h } from "lucide-react";
|
|
10
|
+
import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
11
|
+
import { useI18n as y } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
12
|
+
import { GlassCard as b, GradientText as x } from "@burdenoff/fe-libs/ui";
|
|
12
13
|
//#region src/devportal/pages/SellerDashboardPage.tsx
|
|
13
|
-
var
|
|
14
|
+
var S = {
|
|
14
15
|
PUBLISHED: {
|
|
15
16
|
label: "Published",
|
|
16
17
|
className: "text-status-success-text bg-status-success-bg-subtle"
|
|
@@ -32,7 +33,7 @@ var x = {
|
|
|
32
33
|
className: "text-text-muted bg-bg-muted"
|
|
33
34
|
}
|
|
34
35
|
};
|
|
35
|
-
function
|
|
36
|
+
function C(e, t) {
|
|
36
37
|
let n = t || "USD";
|
|
37
38
|
return `${new Intl.NumberFormat("en-US", {
|
|
38
39
|
style: "currency",
|
|
@@ -41,51 +42,51 @@ function S(e, t) {
|
|
|
41
42
|
maximumFractionDigits: 2
|
|
42
43
|
}).format(e)} ${n}`;
|
|
43
44
|
}
|
|
44
|
-
var
|
|
45
|
-
function
|
|
45
|
+
var w = "\n query SellerDashboardBootstrap {\n myDeveloperOrganizations {\n id\n name\n slug\n logoUrl\n isVerified\n publishedApps\n totalInstalls\n totalRevenue\n kind\n }\n myPublisher {\n id\n }\n }\n";
|
|
46
|
+
function T(e) {
|
|
46
47
|
return `query SellerDashboardOrgCurrencies {\n ${e.map((e, t) => `o${t}: developerOrgRevenueSummary(organizationId: ${JSON.stringify(e)}, period: "monthly") { currency }`).join("\n ")}\n }`;
|
|
47
48
|
}
|
|
48
|
-
var
|
|
49
|
-
let { navigate:
|
|
50
|
-
let n =
|
|
49
|
+
var E = "\n query SellerDashboardProducts($publisherId: String!) {\n products(filter: { publisherId: $publisherId, nature: PHYSICAL }, limit: 3, offset: 0) {\n id\n name\n slug\n type\n status\n price\n currency\n stockQuantity\n icon\n }\n }\n", D = () => {
|
|
50
|
+
let { navigate: a, basePath: f, apiGatewayUrl: b, authToken: S } = e(), { t: C } = y(), D = (e, t) => {
|
|
51
|
+
let n = C(e);
|
|
51
52
|
return n === e ? t : n;
|
|
52
|
-
},
|
|
53
|
-
|
|
53
|
+
}, M = i(b), [N, P] = s(!0), [F, I] = s(!1), [L, R] = s([]), [z, B] = s(null), [V, H] = s([]), [U, W] = s({});
|
|
54
|
+
o(() => {
|
|
54
55
|
let e = !1;
|
|
55
|
-
return
|
|
56
|
+
return P(!0), (async () => {
|
|
56
57
|
try {
|
|
57
|
-
let t = await fetch(
|
|
58
|
+
let t = await fetch(M, {
|
|
58
59
|
method: "POST",
|
|
59
60
|
headers: {
|
|
60
61
|
"Content-Type": "application/json",
|
|
61
|
-
Authorization: `Bearer ${
|
|
62
|
+
Authorization: `Bearer ${S ?? ""}`
|
|
62
63
|
},
|
|
63
|
-
body: JSON.stringify({ query:
|
|
64
|
+
body: JSON.stringify({ query: w })
|
|
64
65
|
});
|
|
65
66
|
if (e) return;
|
|
66
67
|
let n = await t.json();
|
|
67
68
|
if (e) return;
|
|
68
|
-
|
|
69
|
+
R((n.data?.myDeveloperOrganizations ?? []).filter((e) => e.kind === "PHYSICAL")), B(n.data?.myPublisher?.id ?? null);
|
|
69
70
|
} finally {
|
|
70
|
-
e ||
|
|
71
|
+
e || P(!1);
|
|
71
72
|
}
|
|
72
73
|
})(), () => {
|
|
73
74
|
e = !0;
|
|
74
75
|
};
|
|
75
|
-
}, [
|
|
76
|
-
if (!
|
|
76
|
+
}, [M, S]), o(() => {
|
|
77
|
+
if (!z) return;
|
|
77
78
|
let e = !1;
|
|
78
|
-
return
|
|
79
|
+
return I(!0), (async () => {
|
|
79
80
|
try {
|
|
80
|
-
let t = await fetch(
|
|
81
|
+
let t = await fetch(M, {
|
|
81
82
|
method: "POST",
|
|
82
83
|
headers: {
|
|
83
84
|
"Content-Type": "application/json",
|
|
84
|
-
Authorization: `Bearer ${
|
|
85
|
+
Authorization: `Bearer ${S ?? ""}`
|
|
85
86
|
},
|
|
86
87
|
body: JSON.stringify({
|
|
87
|
-
query:
|
|
88
|
-
variables: { publisherId:
|
|
88
|
+
query: E,
|
|
89
|
+
variables: { publisherId: z }
|
|
89
90
|
})
|
|
90
91
|
});
|
|
91
92
|
if (e) return;
|
|
@@ -96,33 +97,33 @@ var T = "\n query SellerDashboardProducts($publisherId: String!) {\n product
|
|
|
96
97
|
"NODE",
|
|
97
98
|
"WORKFLOW"
|
|
98
99
|
]);
|
|
99
|
-
|
|
100
|
+
H((n.data?.products ?? []).filter((e) => !r.has(e.type)).map((e) => ({
|
|
100
101
|
...e,
|
|
101
102
|
status: e.status
|
|
102
103
|
})));
|
|
103
104
|
} finally {
|
|
104
|
-
e ||
|
|
105
|
+
e || I(!1);
|
|
105
106
|
}
|
|
106
107
|
})(), () => {
|
|
107
108
|
e = !0;
|
|
108
109
|
};
|
|
109
110
|
}, [
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
]),
|
|
114
|
-
let e =
|
|
111
|
+
z,
|
|
112
|
+
M,
|
|
113
|
+
S
|
|
114
|
+
]), o(() => {
|
|
115
|
+
let e = L.slice(0, 3).map((e) => e.id);
|
|
115
116
|
if (e.length === 0) return;
|
|
116
117
|
let t = !1;
|
|
117
118
|
return (async () => {
|
|
118
119
|
try {
|
|
119
|
-
let n = await fetch(
|
|
120
|
+
let n = await fetch(M, {
|
|
120
121
|
method: "POST",
|
|
121
122
|
headers: {
|
|
122
123
|
"Content-Type": "application/json",
|
|
123
|
-
Authorization: `Bearer ${
|
|
124
|
+
Authorization: `Bearer ${S ?? ""}`
|
|
124
125
|
},
|
|
125
|
-
body: JSON.stringify({ query:
|
|
126
|
+
body: JSON.stringify({ query: T(e) })
|
|
126
127
|
});
|
|
127
128
|
if (t) return;
|
|
128
129
|
let r = await n.json();
|
|
@@ -131,106 +132,106 @@ var T = "\n query SellerDashboardProducts($publisherId: String!) {\n product
|
|
|
131
132
|
e.forEach((e, t) => {
|
|
132
133
|
let n = r.data?.[`o${t}`]?.currency;
|
|
133
134
|
n && (i[e] = n);
|
|
134
|
-
}),
|
|
135
|
+
}), W(i);
|
|
135
136
|
} catch {}
|
|
136
137
|
})(), () => {
|
|
137
138
|
t = !0;
|
|
138
139
|
};
|
|
139
140
|
}, [
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
141
|
+
L.map((e) => e.id).join(","),
|
|
142
|
+
M,
|
|
143
|
+
S
|
|
143
144
|
]);
|
|
144
|
-
let
|
|
145
|
-
|
|
145
|
+
let G = N, K = N || F, q = V.length, J = V.filter((e) => e.status === "PENDING_REVIEW").length, Y = V.filter((e) => e.status === "PUBLISHED").length, X = (e) => {
|
|
146
|
+
a?.(`${f}${e}`);
|
|
146
147
|
};
|
|
147
|
-
return /* @__PURE__ */
|
|
148
|
+
return /* @__PURE__ */ _(r, {
|
|
148
149
|
authOnly: !0,
|
|
149
|
-
children: /* @__PURE__ */
|
|
150
|
-
title: /* @__PURE__ */
|
|
151
|
-
|
|
150
|
+
children: /* @__PURE__ */ _(n, {
|
|
151
|
+
title: /* @__PURE__ */ v(g, { children: [
|
|
152
|
+
D("devportal.seller", "Seller"),
|
|
152
153
|
" ",
|
|
153
|
-
/* @__PURE__ */
|
|
154
|
+
/* @__PURE__ */ _(x, { children: D("devportal.dashboard", "Dashboard") })
|
|
154
155
|
] }),
|
|
155
|
-
actions:
|
|
156
|
-
onClick: () =>
|
|
156
|
+
actions: G ? null : /* @__PURE__ */ v("button", {
|
|
157
|
+
onClick: () => X("/seller/items/new"),
|
|
157
158
|
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",
|
|
158
|
-
children: [/* @__PURE__ */
|
|
159
|
+
children: [/* @__PURE__ */ _(h, { size: 16 }), D("devportal.listAnItem", "List an Item")]
|
|
159
160
|
}),
|
|
160
|
-
children: /* @__PURE__ */
|
|
161
|
+
children: /* @__PURE__ */ v("div", {
|
|
161
162
|
className: "flex flex-col gap-8",
|
|
162
163
|
children: [
|
|
163
|
-
/* @__PURE__ */
|
|
164
|
+
/* @__PURE__ */ _("div", {
|
|
164
165
|
className: "flex items-center gap-6 border-b border-border-seam pb-6",
|
|
165
|
-
children:
|
|
166
|
-
/* @__PURE__ */
|
|
167
|
-
icon: /* @__PURE__ */
|
|
168
|
-
value: K,
|
|
169
|
-
label: E("devportal.items", "Items")
|
|
170
|
-
}),
|
|
171
|
-
/* @__PURE__ */ g("div", { className: "h-4 w-px bg-border-seam" }),
|
|
172
|
-
/* @__PURE__ */ g(D, {
|
|
173
|
-
icon: /* @__PURE__ */ g(u, { size: 14 }),
|
|
166
|
+
children: K ? /* @__PURE__ */ _(p, { className: "h-4 w-4 animate-spin text-text-secondary" }) : /* @__PURE__ */ v(g, { children: [
|
|
167
|
+
/* @__PURE__ */ _(O, {
|
|
168
|
+
icon: /* @__PURE__ */ _(m, { size: 14 }),
|
|
174
169
|
value: q,
|
|
175
|
-
label:
|
|
170
|
+
label: D("devportal.items", "Items")
|
|
176
171
|
}),
|
|
177
|
-
/* @__PURE__ */
|
|
178
|
-
/* @__PURE__ */
|
|
179
|
-
icon: /* @__PURE__ */
|
|
172
|
+
/* @__PURE__ */ _("div", { className: "h-4 w-px bg-border-seam" }),
|
|
173
|
+
/* @__PURE__ */ _(O, {
|
|
174
|
+
icon: /* @__PURE__ */ _(d, { size: 14 }),
|
|
180
175
|
value: J,
|
|
181
|
-
label:
|
|
176
|
+
label: D("devportal.pendingReview", "Pending Review")
|
|
177
|
+
}),
|
|
178
|
+
/* @__PURE__ */ _("div", { className: "h-4 w-px bg-border-seam" }),
|
|
179
|
+
/* @__PURE__ */ _(O, {
|
|
180
|
+
icon: /* @__PURE__ */ _(u, { size: 14 }),
|
|
181
|
+
value: Y,
|
|
182
|
+
label: D("devportal.published", "Published")
|
|
182
183
|
}),
|
|
183
|
-
/* @__PURE__ */
|
|
184
|
-
/* @__PURE__ */
|
|
185
|
-
icon: /* @__PURE__ */
|
|
186
|
-
value:
|
|
187
|
-
label:
|
|
184
|
+
/* @__PURE__ */ _("div", { className: "h-4 w-px bg-border-seam" }),
|
|
185
|
+
/* @__PURE__ */ _(O, {
|
|
186
|
+
icon: /* @__PURE__ */ _(l, { size: 14 }),
|
|
187
|
+
value: L.length,
|
|
188
|
+
label: D("devportal.organizations", "Organizations")
|
|
188
189
|
})
|
|
189
190
|
] })
|
|
190
191
|
}),
|
|
191
|
-
/* @__PURE__ */
|
|
192
|
-
title:
|
|
193
|
-
action:
|
|
194
|
-
onClick: () =>
|
|
192
|
+
/* @__PURE__ */ _(k, {
|
|
193
|
+
title: D("devportal.recentListings", "Recent Listings"),
|
|
194
|
+
action: V.length > 0 ? /* @__PURE__ */ v("button", {
|
|
195
|
+
onClick: () => X("/seller/items"),
|
|
195
196
|
className: "inline-flex items-center gap-1 text-sm font-medium text-primary hover:underline",
|
|
196
|
-
children: [
|
|
197
|
+
children: [D("devportal.viewAll", "View all"), /* @__PURE__ */ _(c, { size: 14 })]
|
|
197
198
|
}) : void 0,
|
|
198
|
-
children:
|
|
199
|
+
children: G || F ? /* @__PURE__ */ _("div", {
|
|
199
200
|
className: "flex items-center justify-center py-12",
|
|
200
|
-
children: /* @__PURE__ */
|
|
201
|
-
}) :
|
|
201
|
+
children: /* @__PURE__ */ _(p, { className: "h-6 w-6 animate-spin text-text-secondary" })
|
|
202
|
+
}) : V.length > 0 ? /* @__PURE__ */ _("div", {
|
|
202
203
|
className: "grid gap-4 grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",
|
|
203
|
-
children:
|
|
204
|
+
children: V.slice(0, 3).map((e) => /* @__PURE__ */ _(A, {
|
|
204
205
|
product: e,
|
|
205
|
-
onClick: () =>
|
|
206
|
+
onClick: () => X("/seller/items")
|
|
206
207
|
}, e.id))
|
|
207
|
-
}) : /* @__PURE__ */
|
|
208
|
+
}) : /* @__PURE__ */ _(t, {
|
|
208
209
|
illustration: "empty-data",
|
|
209
|
-
title:
|
|
210
|
-
description:
|
|
211
|
-
action: /* @__PURE__ */
|
|
212
|
-
onClick: () =>
|
|
210
|
+
title: D("devportal.listYourFirstItem", "List your first item"),
|
|
211
|
+
description: D("devportal.addPhysicalProductsToYourStore", "Add physical products to your store and they will appear here. Your seller organization is set up automatically the first time you list an item."),
|
|
212
|
+
action: /* @__PURE__ */ v("button", {
|
|
213
|
+
onClick: () => X("/seller/items/new"),
|
|
213
214
|
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",
|
|
214
|
-
children: [/* @__PURE__ */
|
|
215
|
+
children: [/* @__PURE__ */ _(h, { size: 16 }), D("devportal.listAnItem", "List an Item")]
|
|
215
216
|
})
|
|
216
217
|
})
|
|
217
218
|
}),
|
|
218
|
-
(
|
|
219
|
-
title:
|
|
220
|
-
action:
|
|
221
|
-
onClick: () =>
|
|
219
|
+
(G || L.length > 0) && /* @__PURE__ */ _(k, {
|
|
220
|
+
title: D("devportal.yourOrganizations", "Your Organizations"),
|
|
221
|
+
action: L.length > 0 ? /* @__PURE__ */ v("button", {
|
|
222
|
+
onClick: () => X("/seller/organizations"),
|
|
222
223
|
className: "inline-flex items-center gap-1 text-sm font-medium text-primary hover:underline",
|
|
223
|
-
children: [
|
|
224
|
+
children: [D("devportal.viewAll", "View all"), /* @__PURE__ */ _(c, { size: 14 })]
|
|
224
225
|
}) : void 0,
|
|
225
|
-
children:
|
|
226
|
+
children: G ? /* @__PURE__ */ _("div", {
|
|
226
227
|
className: "flex items-center justify-center py-12",
|
|
227
|
-
children: /* @__PURE__ */
|
|
228
|
-
}) : /* @__PURE__ */
|
|
228
|
+
children: /* @__PURE__ */ _(p, { className: "h-6 w-6 animate-spin text-text-secondary" })
|
|
229
|
+
}) : /* @__PURE__ */ _("div", {
|
|
229
230
|
className: "grid gap-4 sm:grid-cols-2 lg:grid-cols-3",
|
|
230
|
-
children:
|
|
231
|
+
children: L.slice(0, 3).map((e) => /* @__PURE__ */ _(j, {
|
|
231
232
|
org: e,
|
|
232
|
-
currency:
|
|
233
|
-
onClick: () =>
|
|
233
|
+
currency: U[e.id] ?? "USD",
|
|
234
|
+
onClick: () => X(`/seller/organizations/${e.id}`)
|
|
234
235
|
}, e.id))
|
|
235
236
|
})
|
|
236
237
|
})
|
|
@@ -238,34 +239,34 @@ var T = "\n query SellerDashboardProducts($publisherId: String!) {\n product
|
|
|
238
239
|
})
|
|
239
240
|
})
|
|
240
241
|
});
|
|
241
|
-
},
|
|
242
|
+
}, O = ({ icon: e, value: t, label: n }) => /* @__PURE__ */ v("div", {
|
|
242
243
|
className: "flex items-center gap-1.5",
|
|
243
244
|
children: [
|
|
244
|
-
/* @__PURE__ */
|
|
245
|
+
/* @__PURE__ */ _("span", {
|
|
245
246
|
className: "text-text-muted",
|
|
246
247
|
children: e
|
|
247
248
|
}),
|
|
248
|
-
/* @__PURE__ */
|
|
249
|
+
/* @__PURE__ */ _("span", {
|
|
249
250
|
className: "text-sm font-semibold tabular-nums",
|
|
250
251
|
children: t
|
|
251
252
|
}),
|
|
252
|
-
/* @__PURE__ */
|
|
253
|
+
/* @__PURE__ */ _("span", {
|
|
253
254
|
className: "text-sm text-text-secondary",
|
|
254
255
|
children: n
|
|
255
256
|
})
|
|
256
257
|
]
|
|
257
|
-
}),
|
|
258
|
+
}), k = ({ title: e, action: t, children: n }) => /* @__PURE__ */ v("section", {
|
|
258
259
|
className: "flex flex-col gap-4",
|
|
259
|
-
children: [/* @__PURE__ */
|
|
260
|
+
children: [/* @__PURE__ */ v("div", {
|
|
260
261
|
className: "flex items-center justify-between",
|
|
261
|
-
children: [/* @__PURE__ */
|
|
262
|
+
children: [/* @__PURE__ */ _("h2", {
|
|
262
263
|
className: "text-sm font-semibold uppercase tracking-wider text-text-secondary",
|
|
263
264
|
children: e
|
|
264
265
|
}), t]
|
|
265
266
|
}), n]
|
|
266
|
-
}),
|
|
267
|
-
let n =
|
|
268
|
-
return /* @__PURE__ */
|
|
267
|
+
}), A = ({ product: e, onClick: t }) => {
|
|
268
|
+
let n = S[e.status] ?? S.DRAFT;
|
|
269
|
+
return /* @__PURE__ */ v(b, {
|
|
269
270
|
treatment: "insight",
|
|
270
271
|
role: "button",
|
|
271
272
|
tabIndex: 0,
|
|
@@ -274,49 +275,49 @@ var T = "\n query SellerDashboardProducts($publisherId: String!) {\n product
|
|
|
274
275
|
onKeyDown: (e) => {
|
|
275
276
|
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), t());
|
|
276
277
|
},
|
|
277
|
-
children: [/* @__PURE__ */
|
|
278
|
+
children: [/* @__PURE__ */ v("div", {
|
|
278
279
|
className: "flex items-center gap-3 mb-4",
|
|
279
280
|
children: [
|
|
280
|
-
e.icon ? /* @__PURE__ */
|
|
281
|
+
e.icon ? /* @__PURE__ */ _("img", {
|
|
281
282
|
src: e.icon,
|
|
282
283
|
alt: e.name,
|
|
283
284
|
className: "h-10 w-10 rounded-xl object-cover shrink-0"
|
|
284
|
-
}) : /* @__PURE__ */
|
|
285
|
+
}) : /* @__PURE__ */ _("div", {
|
|
285
286
|
className: "flex h-10 w-10 items-center justify-center rounded-xl bg-action-primary-bg/15 text-primary shrink-0",
|
|
286
|
-
children: /* @__PURE__ */
|
|
287
|
+
children: /* @__PURE__ */ _(m, { size: 20 })
|
|
287
288
|
}),
|
|
288
|
-
/* @__PURE__ */
|
|
289
|
+
/* @__PURE__ */ v("div", {
|
|
289
290
|
className: "min-w-0 flex-1",
|
|
290
|
-
children: [/* @__PURE__ */
|
|
291
|
+
children: [/* @__PURE__ */ _("p", {
|
|
291
292
|
className: "font-semibold truncate text-text-primary",
|
|
292
293
|
children: e.name
|
|
293
|
-
}), /* @__PURE__ */
|
|
294
|
+
}), /* @__PURE__ */ _("p", {
|
|
294
295
|
className: "text-xs text-text-secondary mt-0.5",
|
|
295
|
-
children:
|
|
296
|
+
children: C(e.price, e.currency)
|
|
296
297
|
})]
|
|
297
298
|
}),
|
|
298
|
-
/* @__PURE__ */
|
|
299
|
+
/* @__PURE__ */ _("span", {
|
|
299
300
|
className: `shrink-0 rounded-full px-2.5 py-0.5 text-xs font-medium ${n.className}`,
|
|
300
301
|
children: n.label
|
|
301
302
|
})
|
|
302
303
|
]
|
|
303
|
-
}), /* @__PURE__ */
|
|
304
|
+
}), /* @__PURE__ */ v("div", {
|
|
304
305
|
className: "flex items-center gap-2 text-sm",
|
|
305
|
-
children: [/* @__PURE__ */
|
|
306
|
+
children: [/* @__PURE__ */ _(m, {
|
|
306
307
|
size: 12,
|
|
307
308
|
className: "text-text-muted shrink-0"
|
|
308
|
-
}), /* @__PURE__ */
|
|
309
|
+
}), /* @__PURE__ */ _("span", {
|
|
309
310
|
className: e.stockQuantity === 0 ? "text-status-error-text" : "text-text-secondary",
|
|
310
311
|
children: e.stockQuantity === 0 ? "Out of stock" : `${e.stockQuantity} in stock`
|
|
311
312
|
})]
|
|
312
313
|
})]
|
|
313
314
|
});
|
|
314
|
-
},
|
|
315
|
-
let { t: r } =
|
|
315
|
+
}, j = ({ org: e, currency: t, onClick: n }) => {
|
|
316
|
+
let { t: r } = y(), i = (e, t) => {
|
|
316
317
|
let n = r(e);
|
|
317
318
|
return n === e ? t : n;
|
|
318
319
|
}, o = e.name.split(" ").map((e) => e[0]).join("").slice(0, 2).toUpperCase();
|
|
319
|
-
return /* @__PURE__ */
|
|
320
|
+
return /* @__PURE__ */ v(b, {
|
|
320
321
|
treatment: "insight",
|
|
321
322
|
role: "button",
|
|
322
323
|
tabIndex: 0,
|
|
@@ -325,55 +326,55 @@ var T = "\n query SellerDashboardProducts($publisherId: String!) {\n product
|
|
|
325
326
|
onKeyDown: (e) => {
|
|
326
327
|
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), n());
|
|
327
328
|
},
|
|
328
|
-
children: [/* @__PURE__ */
|
|
329
|
+
children: [/* @__PURE__ */ v("div", {
|
|
329
330
|
className: "flex items-center gap-3 mb-4",
|
|
330
331
|
children: [
|
|
331
|
-
e.logoUrl ? /* @__PURE__ */
|
|
332
|
+
e.logoUrl ? /* @__PURE__ */ _("img", {
|
|
332
333
|
src: e.logoUrl,
|
|
333
334
|
alt: e.name,
|
|
334
335
|
className: "h-10 w-10 rounded-xl object-cover"
|
|
335
|
-
}) : /* @__PURE__ */
|
|
336
|
+
}) : /* @__PURE__ */ _("div", {
|
|
336
337
|
className: "flex h-10 w-10 items-center justify-center rounded-xl bg-action-primary-bg/15 text-primary text-sm font-bold",
|
|
337
338
|
children: o
|
|
338
339
|
}),
|
|
339
|
-
/* @__PURE__ */
|
|
340
|
+
/* @__PURE__ */ v("div", {
|
|
340
341
|
className: "min-w-0 flex-1",
|
|
341
|
-
children: [/* @__PURE__ */
|
|
342
|
+
children: [/* @__PURE__ */ _("p", {
|
|
342
343
|
className: "font-semibold truncate text-text-primary",
|
|
343
344
|
children: e.name
|
|
344
|
-
}), /* @__PURE__ */
|
|
345
|
+
}), /* @__PURE__ */ v("p", {
|
|
345
346
|
className: "text-xs text-text-secondary mt-0.5",
|
|
346
347
|
children: [
|
|
347
348
|
e.publishedApps ?? 0,
|
|
348
349
|
" ",
|
|
349
|
-
|
|
350
|
+
i("devportal.appsPublished", "apps published")
|
|
350
351
|
]
|
|
351
352
|
})]
|
|
352
353
|
}),
|
|
353
|
-
/* @__PURE__ */
|
|
354
|
+
/* @__PURE__ */ _(c, {
|
|
354
355
|
size: 15,
|
|
355
356
|
className: "text-text-muted shrink-0"
|
|
356
357
|
})
|
|
357
358
|
]
|
|
358
|
-
}), /* @__PURE__ */
|
|
359
|
+
}), /* @__PURE__ */ _("div", {
|
|
359
360
|
className: "grid grid-cols-1 gap-3",
|
|
360
|
-
children: /* @__PURE__ */
|
|
361
|
+
children: /* @__PURE__ */ v("div", {
|
|
361
362
|
className: "flex items-center gap-2 rounded-lg bg-bg-muted px-3 py-2",
|
|
362
|
-
children: [/* @__PURE__ */
|
|
363
|
+
children: [/* @__PURE__ */ _(f, {
|
|
363
364
|
size: 12,
|
|
364
365
|
className: "text-text-muted shrink-0"
|
|
365
|
-
}), /* @__PURE__ */
|
|
366
|
+
}), /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
|
|
366
367
|
className: "text-[11px] text-text-secondary leading-none mb-0.5",
|
|
367
|
-
children:
|
|
368
|
-
}), /* @__PURE__ */
|
|
368
|
+
children: i("devportal.revenue", "Revenue")
|
|
369
|
+
}), /* @__PURE__ */ _("p", {
|
|
369
370
|
className: "text-sm font-semibold tabular-nums",
|
|
370
|
-
children:
|
|
371
|
+
children: a(e.totalRevenue ?? 0, t)
|
|
371
372
|
})] })]
|
|
372
373
|
})
|
|
373
374
|
})]
|
|
374
375
|
});
|
|
375
376
|
};
|
|
376
377
|
//#endregion
|
|
377
|
-
export {
|
|
378
|
+
export { D as SellerDashboardPage };
|
|
378
379
|
|
|
379
380
|
//# sourceMappingURL=SellerDashboardPage.js.map
|