@burdenoff/microfe-devportal 2026.1112.1 → 2026.1113.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/AppCard.js +73 -70
- package/dist/devportal/components/AppCard.js.map +1 -1
- package/dist/devportal/components/ImageUploadField.js +82 -80
- package/dist/devportal/components/ImageUploadField.js.map +1 -1
- package/dist/devportal/components/StoreImage.d.ts +15 -0
- package/dist/devportal/components/StoreImage.js +30 -0
- package/dist/devportal/components/StoreImage.js.map +1 -0
- package/dist/devportal/components/index.d.ts +1 -0
- package/dist/devportal/components/index.js +17 -16
- package/dist/devportal/hooks/usePackageUpload.d.ts +46 -4
- package/dist/devportal/hooks/usePackageUpload.js +90 -36
- package/dist/devportal/hooks/usePackageUpload.js.map +1 -1
- package/dist/devportal/pages/AdminReviewPage.js +205 -202
- package/dist/devportal/pages/AdminReviewPage.js.map +1 -1
- package/dist/devportal/pages/ApplicationDetailPage.js +2 -2
- package/dist/devportal/pages/ApplicationDetailPage.js.map +1 -1
- package/dist/devportal/pages/ApplicationsPage.js +201 -199
- package/dist/devportal/pages/ApplicationsPage.js.map +1 -1
- package/dist/devportal/pages/CreateOrganizationPage.js +120 -114
- package/dist/devportal/pages/CreateOrganizationPage.js.map +1 -1
- package/dist/devportal/pages/CreatePhysicalItemPage.js +2 -2
- package/dist/devportal/pages/CreatePhysicalItemPage.js.map +1 -1
- package/dist/devportal/pages/EditApplicationPage.js +84 -73
- package/dist/devportal/pages/EditApplicationPage.js.map +1 -1
- package/dist/devportal/pages/EditPhysicalItemPage.js +312 -307
- package/dist/devportal/pages/EditPhysicalItemPage.js.map +1 -1
- package/dist/devportal/pages/ListingPreviewPage.js +175 -171
- package/dist/devportal/pages/ListingPreviewPage.js.map +1 -1
- package/dist/devportal/pages/OAuthClientDetailPage.js +134 -115
- package/dist/devportal/pages/OAuthClientDetailPage.js.map +1 -1
- package/dist/devportal/pages/SellerDashboardPage.js +118 -116
- package/dist/devportal/pages/SellerDashboardPage.js.map +1 -1
- package/dist/devportal/pages/SellerItemsPage.js +202 -199
- package/dist/devportal/pages/SellerItemsPage.js.map +1 -1
- package/dist/devportal/pages/SetupPage.js +141 -143
- package/dist/devportal/pages/SetupPage.js.map +1 -1
- package/dist/devportal/pages/StoreSubmissionPage.js +133 -131
- package/dist/devportal/pages/StoreSubmissionPage.js.map +1 -1
- package/dist/devportal/utils/errorMessage.d.ts +2 -0
- package/dist/devportal/utils/errorMessage.js +7 -0
- package/dist/devportal/utils/errorMessage.js.map +1 -0
- package/package.json +1 -1
|
@@ -1,28 +1,29 @@
|
|
|
1
1
|
import { PageLayout as e } from "../components/PageLayout.js";
|
|
2
2
|
import { AppCard as t } from "../components/AppCard.js";
|
|
3
3
|
import { EmptyState as n } from "../components/EmptyState.js";
|
|
4
|
-
import { useDeactivateApplicationMutation as r, useGetApplicationsQuery as
|
|
5
|
-
import { getErrorMessage as
|
|
6
|
-
import { ConfirmDialog as
|
|
7
|
-
import { SelectionCheckbox as
|
|
8
|
-
import { useDevportal as
|
|
4
|
+
import { useDeactivateApplicationMutation as r, useGetApplicationsQuery as ee } from "../../generated/global-operations.js";
|
|
5
|
+
import { getErrorMessage as te } from "../hooks/useGraphQL.js";
|
|
6
|
+
import { ConfirmDialog as ne } from "../components/ConfirmDialog.js";
|
|
7
|
+
import { SelectionCheckbox as i } from "../components/SelectionCheckbox.js";
|
|
8
|
+
import { useDevportal as re } from "../providers/DevportalProvider.js";
|
|
9
9
|
import "../components/index.js";
|
|
10
|
-
import { DEVPORTAL_PERMISSIONS as
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
10
|
+
import { DEVPORTAL_PERMISSIONS as a } from "../constants/permissions.js";
|
|
11
|
+
import { useTr as ie } from "../utils/i18n.js";
|
|
12
|
+
import { PermissionGuard as ae } from "../components/PermissionGuard.js";
|
|
13
|
+
import { APP_STATUS_COLORS as oe, APP_TYPE_LABELS as o } from "../utils/constants.js";
|
|
14
|
+
import { useDevportalPermission as s } from "../hooks/usePermission.js";
|
|
15
15
|
import "../hooks/index.js";
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
16
|
+
import { StoreImage as c } from "../components/StoreImage.js";
|
|
17
|
+
import { useMemo as l, useState as u } from "react";
|
|
18
|
+
import { AlertCircle as se, AppWindow as d, Archive as ce, Grid as f, List as p, Loader2 as le, Plus as m, Search as h } from "lucide-react";
|
|
19
|
+
import { jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
20
|
+
import { EmphasisPanel as ue, GlassCard as v } from "@burdenoff/fe-libs/ui";
|
|
20
21
|
// src/devportal/pages/ApplicationsPage.tsx
|
|
21
|
-
function
|
|
22
|
+
function de(e, t, n) {
|
|
22
23
|
return `${e} ${t} application${t === 1 ? "" : "s"}${n > 0 ? ` • ${n} failed` : ""}`;
|
|
23
24
|
}
|
|
24
|
-
function
|
|
25
|
-
return /* @__PURE__ */
|
|
25
|
+
function y({ status: e, tr: t }) {
|
|
26
|
+
return /* @__PURE__ */ g("span", {
|
|
26
27
|
className: `inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium ${{
|
|
27
28
|
ACTIVE: "bg-status-success-bg-subtle text-status-success-text",
|
|
28
29
|
PUBLISHED: "bg-status-success-bg-subtle text-status-success-text",
|
|
@@ -40,7 +41,7 @@ function le({ status: e, tr: t }) {
|
|
|
40
41
|
children: e === "INACTIVE" || e === "REVOKED" ? t("devportal.status.deactivated", "Deactivated") : e.replace(/_/g, " ")
|
|
41
42
|
});
|
|
42
43
|
}
|
|
43
|
-
function
|
|
44
|
+
function b(e) {
|
|
44
45
|
let t = Array.isArray(e.screenshots) ? e.screenshots.length > 0 ? e.screenshots : void 0 : e.screenshots, n = e.pricingDetails && typeof e.pricingDetails == "object" ? e.pricingDetails : void 0;
|
|
45
46
|
return {
|
|
46
47
|
id: e.id,
|
|
@@ -86,191 +87,191 @@ function x(e) {
|
|
|
86
87
|
updatedAt: e.updatedAt
|
|
87
88
|
};
|
|
88
89
|
}
|
|
89
|
-
var
|
|
90
|
-
let { navigate:
|
|
90
|
+
var x = () => {
|
|
91
|
+
let { navigate: x, basePath: S, activeOrgId: C } = re(), w = ie(), T = s(a.APP_CREATE), E = s(a.APP_UPDATE), [D, O] = u("list"), [k, fe] = u(""), [A, j] = u(""), [M, N] = u(""), [P, F] = u(/* @__PURE__ */ new Set()), [I, L] = u(null), [R, z] = u(null), { data: B, loading: pe, error: V, refetch: H } = ee({
|
|
91
92
|
variables: {
|
|
92
93
|
limit: 50,
|
|
93
94
|
offset: 0,
|
|
94
|
-
status:
|
|
95
|
-
organizationId:
|
|
95
|
+
status: A || void 0,
|
|
96
|
+
organizationId: C ?? void 0
|
|
96
97
|
},
|
|
97
98
|
fetchPolicy: "cache-and-network"
|
|
98
|
-
}), U =
|
|
99
|
-
|
|
99
|
+
}), U = l(() => B?.applications?.edges?.map((e) => b(e.node)) ?? [], [B?.applications?.edges]), [me] = r(), W = (e) => {
|
|
100
|
+
x?.(`${S}${e}`);
|
|
100
101
|
}, G = U.filter((e) => {
|
|
101
|
-
let t = !
|
|
102
|
+
let t = !C || e.developerOrganizationId === C, n = !k || e.name.toLowerCase().includes(k.toLowerCase()) || e.shortDescription?.toLowerCase().includes(k.toLowerCase()), r = !M || e.appType === M;
|
|
102
103
|
return t && n && r;
|
|
103
|
-
}), K =
|
|
104
|
-
total:
|
|
104
|
+
}), K = l(() => ({
|
|
105
|
+
total: B?.applications?.totalCount ?? G.length,
|
|
105
106
|
active: G.filter((e) => e.status === "ACTIVE").length,
|
|
106
107
|
draft: G.filter((e) => e.status === "DRAFT").length,
|
|
107
108
|
published: G.filter((e) => e.status === "PUBLISHED").length
|
|
108
|
-
}), [G,
|
|
109
|
-
|
|
109
|
+
}), [G, B?.applications?.totalCount]), q = l(() => U.filter((e) => P.has(e.id)), [U, P]), J = l(() => q.filter((e) => e.status !== "INACTIVE" && e.status !== "REVOKED"), [q]), Y = G.length > 0 && G.every((e) => P.has(e.id)), X = G.some((e) => P.has(e.id)) && !Y, Z = (e, t) => {
|
|
110
|
+
F((n) => {
|
|
110
111
|
let r = new Set(n);
|
|
111
112
|
return t ? r.add(e) : r.delete(e), r;
|
|
112
113
|
});
|
|
113
114
|
}, Q = (e) => {
|
|
114
|
-
|
|
115
|
+
F((t) => {
|
|
115
116
|
let n = new Set(t);
|
|
116
117
|
return G.forEach((t) => {
|
|
117
118
|
e ? n.add(t.id) : n.delete(t.id);
|
|
118
119
|
}), n;
|
|
119
120
|
});
|
|
120
|
-
}, $ = () =>
|
|
121
|
-
return
|
|
122
|
-
title:
|
|
123
|
-
description:
|
|
124
|
-
children: /* @__PURE__ */
|
|
121
|
+
}, $ = () => F(/* @__PURE__ */ new Set());
|
|
122
|
+
return pe && !B ? /* @__PURE__ */ g(e, {
|
|
123
|
+
title: w("devportal.myApplications", "My Applications"),
|
|
124
|
+
description: w("devportal.manageYourApps", "Manage your developer applications"),
|
|
125
|
+
children: /* @__PURE__ */ _("div", {
|
|
125
126
|
className: "flex items-center justify-center py-12",
|
|
126
|
-
children: [/* @__PURE__ */
|
|
127
|
+
children: [/* @__PURE__ */ g(le, { className: "h-8 w-8 animate-spin text-text-secondary" }), /* @__PURE__ */ g("span", {
|
|
127
128
|
className: "ml-2 text-text-secondary",
|
|
128
|
-
children:
|
|
129
|
+
children: w("devportal.loadingApplications", "Loading applications...")
|
|
129
130
|
})]
|
|
130
131
|
})
|
|
131
|
-
}) : V ? /* @__PURE__ */
|
|
132
|
-
title:
|
|
133
|
-
description:
|
|
134
|
-
children: /* @__PURE__ */
|
|
132
|
+
}) : V ? /* @__PURE__ */ g(e, {
|
|
133
|
+
title: w("devportal.myApplications", "My Applications"),
|
|
134
|
+
description: w("devportal.manageYourApps", "Manage your developer applications"),
|
|
135
|
+
children: /* @__PURE__ */ _("div", {
|
|
135
136
|
className: "rounded-lg border border-status-error-border/50 bg-status-error-bg/10 p-6 text-center",
|
|
136
137
|
children: [
|
|
137
|
-
/* @__PURE__ */
|
|
138
|
-
/* @__PURE__ */
|
|
138
|
+
/* @__PURE__ */ g(se, { className: "mx-auto h-8 w-8 text-status-error-text" }),
|
|
139
|
+
/* @__PURE__ */ g("h3", {
|
|
139
140
|
className: "mt-2 font-medium text-status-error-text",
|
|
140
|
-
children:
|
|
141
|
+
children: w("devportal.failedToLoadApplications", "Failed to load applications")
|
|
141
142
|
}),
|
|
142
|
-
/* @__PURE__ */
|
|
143
|
+
/* @__PURE__ */ g("p", {
|
|
143
144
|
className: "mt-1 text-sm text-text-secondary",
|
|
144
|
-
children:
|
|
145
|
+
children: te(V)
|
|
145
146
|
}),
|
|
146
|
-
/* @__PURE__ */
|
|
147
|
+
/* @__PURE__ */ g("button", {
|
|
147
148
|
onClick: () => H(),
|
|
148
149
|
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",
|
|
149
|
-
children:
|
|
150
|
+
children: w("devportal.tryAgain", "Try Again")
|
|
150
151
|
})
|
|
151
152
|
]
|
|
152
153
|
})
|
|
153
|
-
}) : /* @__PURE__ */
|
|
154
|
+
}) : /* @__PURE__ */ g(ae, {
|
|
154
155
|
authOnly: !0,
|
|
155
|
-
children: /* @__PURE__ */
|
|
156
|
-
title:
|
|
157
|
-
description:
|
|
158
|
-
purpose:
|
|
159
|
-
actions: /* @__PURE__ */
|
|
156
|
+
children: /* @__PURE__ */ _(e, {
|
|
157
|
+
title: w("devportal.myApplications", "My Applications"),
|
|
158
|
+
description: w("devportal.manageYourApps", "Manage your developer applications"),
|
|
159
|
+
purpose: w("devportal.applicationsPurpose", "Applications are the integrations you build on the platform — OAuth apps, store listings, and API consumers. Create one here to get client credentials, request scopes, and ship to the marketplace."),
|
|
160
|
+
actions: /* @__PURE__ */ _("button", {
|
|
160
161
|
onClick: () => W("/apps/new"),
|
|
161
|
-
disabled: !
|
|
162
|
-
"aria-disabled": !
|
|
163
|
-
title:
|
|
162
|
+
disabled: !T.allowed,
|
|
163
|
+
"aria-disabled": !T.allowed,
|
|
164
|
+
title: T.allowed ? void 0 : w("devportal.common.noPermission", "You do not have permission to perform this action"),
|
|
164
165
|
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 disabled:opacity-50 disabled:cursor-not-allowed focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary",
|
|
165
|
-
children: [/* @__PURE__ */
|
|
166
|
+
children: [/* @__PURE__ */ g(m, {
|
|
166
167
|
size: 16,
|
|
167
168
|
"aria-hidden": "true"
|
|
168
|
-
}),
|
|
169
|
+
}), w("devportal.createApp", "Create App")]
|
|
169
170
|
}),
|
|
170
171
|
children: [
|
|
171
|
-
/* @__PURE__ */
|
|
172
|
+
/* @__PURE__ */ _("div", {
|
|
172
173
|
className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
|
|
173
|
-
children: [/* @__PURE__ */
|
|
174
|
+
children: [/* @__PURE__ */ _("div", {
|
|
174
175
|
className: "flex flex-1 items-center gap-4",
|
|
175
176
|
children: [
|
|
176
|
-
/* @__PURE__ */
|
|
177
|
+
/* @__PURE__ */ _("div", {
|
|
177
178
|
className: "relative flex-1 max-w-md",
|
|
178
|
-
children: [/* @__PURE__ */
|
|
179
|
+
children: [/* @__PURE__ */ g(h, {
|
|
179
180
|
size: 16,
|
|
180
181
|
className: "absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"
|
|
181
|
-
}), /* @__PURE__ */
|
|
182
|
+
}), /* @__PURE__ */ g("input", {
|
|
182
183
|
type: "text",
|
|
183
|
-
placeholder:
|
|
184
|
-
value:
|
|
185
|
-
onChange: (e) =>
|
|
184
|
+
placeholder: w("devportal.searchApplications", "Search applications..."),
|
|
185
|
+
value: k,
|
|
186
|
+
onChange: (e) => fe(e.target.value),
|
|
186
187
|
className: "w-full rounded-md border bg-bg-surface pl-9 pr-4 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-primary"
|
|
187
188
|
})]
|
|
188
189
|
}),
|
|
189
|
-
/* @__PURE__ */
|
|
190
|
-
value:
|
|
191
|
-
onChange: (e) =>
|
|
190
|
+
/* @__PURE__ */ _("select", {
|
|
191
|
+
value: A,
|
|
192
|
+
onChange: (e) => j(e.target.value),
|
|
192
193
|
className: "rounded-md border bg-bg-surface px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-primary scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
|
|
193
|
-
children: [/* @__PURE__ */
|
|
194
|
+
children: [/* @__PURE__ */ g("option", {
|
|
194
195
|
value: "",
|
|
195
|
-
children:
|
|
196
|
-
}), Object.keys(
|
|
196
|
+
children: w("devportal.allStatus", "All Status")
|
|
197
|
+
}), Object.keys(oe).map((e) => /* @__PURE__ */ g("option", {
|
|
197
198
|
value: e,
|
|
198
|
-
children:
|
|
199
|
+
children: w(`devportal.appStatus.${e}`, e.replace(/_/g, " "))
|
|
199
200
|
}, e))]
|
|
200
201
|
}),
|
|
201
|
-
/* @__PURE__ */
|
|
202
|
+
/* @__PURE__ */ _("select", {
|
|
202
203
|
value: M,
|
|
203
|
-
onChange: (e) =>
|
|
204
|
+
onChange: (e) => N(e.target.value),
|
|
204
205
|
className: "rounded-md border bg-bg-surface px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-primary scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
|
|
205
|
-
children: [/* @__PURE__ */
|
|
206
|
+
children: [/* @__PURE__ */ g("option", {
|
|
206
207
|
value: "",
|
|
207
|
-
children:
|
|
208
|
-
}), Object.entries(
|
|
208
|
+
children: w("devportal.allTypes", "All Types")
|
|
209
|
+
}), Object.entries(o).map(([e, t]) => /* @__PURE__ */ g("option", {
|
|
209
210
|
value: e,
|
|
210
211
|
children: t
|
|
211
212
|
}, e))]
|
|
212
213
|
})
|
|
213
214
|
]
|
|
214
|
-
}), /* @__PURE__ */
|
|
215
|
+
}), /* @__PURE__ */ _("div", {
|
|
215
216
|
className: "flex items-center gap-1 rounded-md border p-1",
|
|
216
|
-
children: [/* @__PURE__ */
|
|
217
|
-
onClick: () =>
|
|
218
|
-
className: `rounded p-1.5 ${
|
|
219
|
-
title:
|
|
220
|
-
children: /* @__PURE__ */
|
|
221
|
-
}), /* @__PURE__ */
|
|
222
|
-
onClick: () =>
|
|
223
|
-
className: `rounded p-1.5 ${
|
|
224
|
-
title:
|
|
225
|
-
children: /* @__PURE__ */
|
|
217
|
+
children: [/* @__PURE__ */ g("button", {
|
|
218
|
+
onClick: () => O("grid"),
|
|
219
|
+
className: `rounded p-1.5 ${D === "grid" ? "bg-bg-sunken" : "hover:bg-bg-sunken/50"}`,
|
|
220
|
+
title: w("devportal.gridView", "Grid view"),
|
|
221
|
+
children: /* @__PURE__ */ g(f, { size: 16 })
|
|
222
|
+
}), /* @__PURE__ */ g("button", {
|
|
223
|
+
onClick: () => O("list"),
|
|
224
|
+
className: `rounded p-1.5 ${D === "list" ? "bg-bg-sunken" : "hover:bg-bg-sunken/50"}`,
|
|
225
|
+
title: w("devportal.tableView", "Table view"),
|
|
226
|
+
children: /* @__PURE__ */ g(p, { size: 16 })
|
|
226
227
|
})]
|
|
227
228
|
})]
|
|
228
229
|
}),
|
|
229
|
-
/* @__PURE__ */
|
|
230
|
+
/* @__PURE__ */ g(ue, {
|
|
230
231
|
className: "mt-4",
|
|
231
|
-
children: /* @__PURE__ */
|
|
232
|
+
children: /* @__PURE__ */ _("div", {
|
|
232
233
|
className: "grid grid-cols-2 gap-4 sm:grid-cols-4",
|
|
233
234
|
children: [
|
|
234
|
-
/* @__PURE__ */
|
|
235
|
+
/* @__PURE__ */ _(v, {
|
|
235
236
|
treatment: "metric",
|
|
236
237
|
className: "p-4",
|
|
237
|
-
children: [/* @__PURE__ */
|
|
238
|
+
children: [/* @__PURE__ */ g("p", {
|
|
238
239
|
className: "text-sm text-text-secondary",
|
|
239
|
-
children:
|
|
240
|
-
}), /* @__PURE__ */
|
|
240
|
+
children: w("devportal.totalApps", "Total Apps")
|
|
241
|
+
}), /* @__PURE__ */ g("p", {
|
|
241
242
|
className: "mt-1 text-2xl font-semibold tabular-nums",
|
|
242
243
|
children: K.total
|
|
243
244
|
})]
|
|
244
245
|
}),
|
|
245
|
-
/* @__PURE__ */
|
|
246
|
+
/* @__PURE__ */ _(v, {
|
|
246
247
|
treatment: "metric",
|
|
247
248
|
className: "p-4",
|
|
248
|
-
children: [/* @__PURE__ */
|
|
249
|
+
children: [/* @__PURE__ */ g("p", {
|
|
249
250
|
className: "text-sm text-status-success-text",
|
|
250
|
-
children:
|
|
251
|
-
}), /* @__PURE__ */
|
|
251
|
+
children: w("devportal.active", "Active")
|
|
252
|
+
}), /* @__PURE__ */ g("p", {
|
|
252
253
|
className: "mt-1 text-2xl font-semibold tabular-nums",
|
|
253
254
|
children: K.active
|
|
254
255
|
})]
|
|
255
256
|
}),
|
|
256
|
-
/* @__PURE__ */
|
|
257
|
+
/* @__PURE__ */ _(v, {
|
|
257
258
|
treatment: "metric",
|
|
258
259
|
className: "p-4",
|
|
259
|
-
children: [/* @__PURE__ */
|
|
260
|
+
children: [/* @__PURE__ */ g("p", {
|
|
260
261
|
className: "text-sm text-text-secondary",
|
|
261
|
-
children:
|
|
262
|
-
}), /* @__PURE__ */
|
|
262
|
+
children: w("devportal.published", "Published")
|
|
263
|
+
}), /* @__PURE__ */ g("p", {
|
|
263
264
|
className: "mt-1 text-2xl font-semibold tabular-nums",
|
|
264
265
|
children: K.published
|
|
265
266
|
})]
|
|
266
267
|
}),
|
|
267
|
-
/* @__PURE__ */
|
|
268
|
+
/* @__PURE__ */ _(v, {
|
|
268
269
|
treatment: "metric",
|
|
269
270
|
className: "p-4",
|
|
270
|
-
children: [/* @__PURE__ */
|
|
271
|
+
children: [/* @__PURE__ */ g("p", {
|
|
271
272
|
className: "text-sm text-text-secondary",
|
|
272
|
-
children:
|
|
273
|
-
}), /* @__PURE__ */
|
|
273
|
+
children: w("devportal.draft", "Draft")
|
|
274
|
+
}), /* @__PURE__ */ g("p", {
|
|
274
275
|
className: "mt-1 text-2xl font-semibold tabular-nums",
|
|
275
276
|
children: K.draft
|
|
276
277
|
})]
|
|
@@ -278,210 +279,211 @@ var S = () => {
|
|
|
278
279
|
]
|
|
279
280
|
})
|
|
280
281
|
}),
|
|
281
|
-
|
|
282
|
-
className: `rounded-lg border px-4 py-3 text-sm ${
|
|
283
|
-
children: /* @__PURE__ */
|
|
282
|
+
R && /* @__PURE__ */ g("div", {
|
|
283
|
+
className: `rounded-lg border px-4 py-3 text-sm ${R.type === "success" ? "border-border-subtle bg-status-success-bg-subtle text-status-success-text" : "border-status-error-border/40 bg-status-error-bg/10 text-status-error-text"}`,
|
|
284
|
+
children: /* @__PURE__ */ _("div", {
|
|
284
285
|
className: "flex items-center justify-between gap-3",
|
|
285
|
-
children: [/* @__PURE__ */
|
|
286
|
-
onClick: () =>
|
|
286
|
+
children: [/* @__PURE__ */ g("span", { children: R.message }), /* @__PURE__ */ g("button", {
|
|
287
|
+
onClick: () => z(null),
|
|
287
288
|
className: "text-xs font-medium underline underline-offset-2",
|
|
288
|
-
children:
|
|
289
|
+
children: w("devportal.dismiss", "Dismiss")
|
|
289
290
|
})]
|
|
290
291
|
})
|
|
291
292
|
}),
|
|
292
|
-
G.length > 0 && /* @__PURE__ */
|
|
293
|
+
G.length > 0 && /* @__PURE__ */ g("div", {
|
|
293
294
|
className: "rounded-card border border-border-seam bg-bg-surface p-4 shadow-[var(--shadow-pop)]",
|
|
294
|
-
children: /* @__PURE__ */
|
|
295
|
+
children: /* @__PURE__ */ _("div", {
|
|
295
296
|
className: "flex flex-col gap-3 lg:flex-row lg:items-center lg:justify-between",
|
|
296
|
-
children: [/* @__PURE__ */
|
|
297
|
+
children: [/* @__PURE__ */ _("div", {
|
|
297
298
|
className: "flex flex-wrap items-center gap-3",
|
|
298
|
-
children: [/* @__PURE__ */
|
|
299
|
+
children: [/* @__PURE__ */ _("div", {
|
|
299
300
|
className: "flex items-center gap-2",
|
|
300
|
-
children: [/* @__PURE__ */
|
|
301
|
+
children: [/* @__PURE__ */ g(i, {
|
|
301
302
|
checked: Y,
|
|
302
303
|
indeterminate: X,
|
|
303
304
|
onChange: Q,
|
|
304
|
-
ariaLabel:
|
|
305
|
-
}), /* @__PURE__ */
|
|
305
|
+
ariaLabel: w("devportal.selectAllVisibleApplications", "Select all visible applications")
|
|
306
|
+
}), /* @__PURE__ */ g("span", {
|
|
306
307
|
className: "text-sm font-medium",
|
|
307
|
-
children:
|
|
308
|
+
children: w("devportal.selectAllVisible", "Select all visible")
|
|
308
309
|
})]
|
|
309
|
-
}),
|
|
310
|
+
}), P.size > 0 && /* @__PURE__ */ g("button", {
|
|
310
311
|
onClick: $,
|
|
311
312
|
className: "text-sm text-text-secondary hover:text-text-primary",
|
|
312
|
-
children:
|
|
313
|
+
children: w("devportal.clearSelection", "Clear selection")
|
|
313
314
|
})]
|
|
314
|
-
}), /* @__PURE__ */
|
|
315
|
+
}), /* @__PURE__ */ _("div", {
|
|
315
316
|
className: "flex flex-wrap items-center gap-2",
|
|
316
|
-
children: [/* @__PURE__ */
|
|
317
|
+
children: [/* @__PURE__ */ _("span", {
|
|
317
318
|
className: "rounded-full bg-bg-sunken px-3 py-1 text-sm font-medium text-text-secondary",
|
|
318
319
|
children: [
|
|
319
|
-
|
|
320
|
+
P.size,
|
|
320
321
|
" ",
|
|
321
|
-
|
|
322
|
+
w("devportal.selectedLower", "selected")
|
|
322
323
|
]
|
|
323
|
-
}), /* @__PURE__ */
|
|
324
|
-
onClick: () =>
|
|
325
|
-
disabled: J.length === 0 || !
|
|
326
|
-
"aria-disabled": J.length === 0 || !
|
|
327
|
-
title:
|
|
324
|
+
}), /* @__PURE__ */ _("button", {
|
|
325
|
+
onClick: () => L("deactivate"),
|
|
326
|
+
disabled: J.length === 0 || !E.allowed,
|
|
327
|
+
"aria-disabled": J.length === 0 || !E.allowed,
|
|
328
|
+
title: E.allowed ? void 0 : w("devportal.common.noPermission", "You do not have permission to perform this action"),
|
|
328
329
|
className: "inline-flex items-center gap-2 rounded-md border border-status-warning-bg px-3 py-2 text-sm font-medium text-status-warning-text transition-colors hover:bg-status-warning-bg-subtle disabled:cursor-not-allowed disabled:opacity-50 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary",
|
|
329
330
|
children: [
|
|
330
|
-
/* @__PURE__ */
|
|
331
|
+
/* @__PURE__ */ g(ce, {
|
|
331
332
|
size: 16,
|
|
332
333
|
"aria-hidden": "true"
|
|
333
334
|
}),
|
|
334
|
-
|
|
335
|
+
w("devportal.deactivateSelected", "Deactivate Selected"),
|
|
335
336
|
J.length > 0 ? ` (${J.length})` : ""
|
|
336
337
|
]
|
|
337
338
|
})]
|
|
338
339
|
})]
|
|
339
340
|
})
|
|
340
341
|
}),
|
|
341
|
-
/* @__PURE__ */
|
|
342
|
+
/* @__PURE__ */ _("p", {
|
|
342
343
|
className: "text-sm text-text-secondary",
|
|
343
344
|
children: [
|
|
344
345
|
G.length,
|
|
345
346
|
" ",
|
|
346
|
-
G.length === 1 ?
|
|
347
|
+
G.length === 1 ? w("devportal.applicationFound", "application found") : w("devportal.applicationsFound", "applications found")
|
|
347
348
|
]
|
|
348
349
|
}),
|
|
349
|
-
G.length > 0 ?
|
|
350
|
+
G.length > 0 ? D === "grid" ? /* @__PURE__ */ g("div", {
|
|
350
351
|
className: "grid gap-4 grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",
|
|
351
|
-
children: G.map((e) => /* @__PURE__ */
|
|
352
|
+
children: G.map((e) => /* @__PURE__ */ g(t, {
|
|
352
353
|
app: e,
|
|
353
|
-
selected:
|
|
354
|
+
selected: P.has(e.id),
|
|
354
355
|
onToggleSelect: (t) => Z(e.id, t)
|
|
355
356
|
}, e.id))
|
|
356
|
-
}) : /* @__PURE__ */
|
|
357
|
+
}) : /* @__PURE__ */ g("div", {
|
|
357
358
|
className: "overflow-x-auto rounded-lg border border-border-seam",
|
|
358
|
-
children: /* @__PURE__ */
|
|
359
|
+
children: /* @__PURE__ */ _("table", {
|
|
359
360
|
className: "w-full text-sm",
|
|
360
|
-
children: [/* @__PURE__ */
|
|
361
|
+
children: [/* @__PURE__ */ g("thead", { children: /* @__PURE__ */ _("tr", {
|
|
361
362
|
className: "border-b border-border-seam bg-bg-sunken text-left",
|
|
362
363
|
children: [
|
|
363
|
-
/* @__PURE__ */
|
|
364
|
+
/* @__PURE__ */ g("th", {
|
|
364
365
|
className: "w-10 px-4 py-3",
|
|
365
|
-
children: /* @__PURE__ */
|
|
366
|
+
children: /* @__PURE__ */ g(i, {
|
|
366
367
|
checked: Y,
|
|
367
368
|
indeterminate: X,
|
|
368
369
|
onChange: Q,
|
|
369
|
-
ariaLabel:
|
|
370
|
+
ariaLabel: w("devportal.selectAll", "Select all")
|
|
370
371
|
})
|
|
371
372
|
}),
|
|
372
|
-
/* @__PURE__ */
|
|
373
|
+
/* @__PURE__ */ g("th", {
|
|
373
374
|
className: "px-4 py-3 font-medium text-text-secondary",
|
|
374
|
-
children:
|
|
375
|
+
children: w("devportal.name", "Name")
|
|
375
376
|
}),
|
|
376
|
-
/* @__PURE__ */
|
|
377
|
+
/* @__PURE__ */ g("th", {
|
|
377
378
|
className: "px-4 py-3 font-medium text-text-secondary",
|
|
378
|
-
children:
|
|
379
|
+
children: w("devportal.status", "Status")
|
|
379
380
|
}),
|
|
380
|
-
/* @__PURE__ */
|
|
381
|
+
/* @__PURE__ */ g("th", {
|
|
381
382
|
className: "px-4 py-3 font-medium text-text-secondary",
|
|
382
|
-
children:
|
|
383
|
+
children: w("devportal.type", "Type")
|
|
383
384
|
}),
|
|
384
|
-
/* @__PURE__ */
|
|
385
|
+
/* @__PURE__ */ g("th", {
|
|
385
386
|
className: "px-4 py-3 font-medium text-text-secondary",
|
|
386
|
-
children:
|
|
387
|
+
children: w("devportal.created", "Created")
|
|
387
388
|
}),
|
|
388
|
-
/* @__PURE__ */
|
|
389
|
+
/* @__PURE__ */ g("th", { className: "px-4 py-3 font-medium text-text-secondary" })
|
|
389
390
|
]
|
|
390
|
-
}) }), /* @__PURE__ */
|
|
391
|
+
}) }), /* @__PURE__ */ g("tbody", {
|
|
391
392
|
className: "divide-y divide-border-seam",
|
|
392
|
-
children: G.map((e) => /* @__PURE__ */
|
|
393
|
-
className: `hover:bg-bg-surface-hover transition-colors ${
|
|
393
|
+
children: G.map((e) => /* @__PURE__ */ _("tr", {
|
|
394
|
+
className: `hover:bg-bg-surface-hover transition-colors ${P.has(e.id) ? "bg-action-primary-bg/5" : ""}`,
|
|
394
395
|
children: [
|
|
395
|
-
/* @__PURE__ */
|
|
396
|
+
/* @__PURE__ */ g("td", {
|
|
396
397
|
className: "w-10 px-4 py-3",
|
|
397
|
-
children: /* @__PURE__ */
|
|
398
|
-
checked:
|
|
398
|
+
children: /* @__PURE__ */ g(i, {
|
|
399
|
+
checked: P.has(e.id),
|
|
399
400
|
onChange: (t) => Z(e.id, t),
|
|
400
|
-
ariaLabel:
|
|
401
|
+
ariaLabel: w("devportal.selectNamed", "Select {{name}}", { name: e.name })
|
|
401
402
|
})
|
|
402
403
|
}),
|
|
403
|
-
/* @__PURE__ */
|
|
404
|
+
/* @__PURE__ */ g("td", {
|
|
404
405
|
className: "px-4 py-3",
|
|
405
|
-
children: /* @__PURE__ */
|
|
406
|
+
children: /* @__PURE__ */ _("button", {
|
|
406
407
|
onClick: () => W(`/apps/${e.id}`),
|
|
407
408
|
className: "group flex items-center gap-3 text-left",
|
|
408
|
-
children: [
|
|
409
|
+
children: [/* @__PURE__ */ g(c, {
|
|
409
410
|
src: e.iconUrl,
|
|
410
411
|
alt: "",
|
|
411
|
-
className: "h-8 w-8 rounded object-cover"
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
412
|
+
className: "h-8 w-8 rounded object-cover",
|
|
413
|
+
fallback: /* @__PURE__ */ g("div", {
|
|
414
|
+
className: "flex h-8 w-8 items-center justify-center rounded bg-bg-sunken text-text-secondary",
|
|
415
|
+
children: /* @__PURE__ */ g(d, { size: 14 })
|
|
416
|
+
})
|
|
417
|
+
}), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
416
418
|
className: "font-medium text-text-primary group-hover:text-action-primary-text transition-colors",
|
|
417
419
|
children: e.name
|
|
418
|
-
}), e.shortDescription && /* @__PURE__ */
|
|
420
|
+
}), e.shortDescription && /* @__PURE__ */ g("p", {
|
|
419
421
|
className: "text-xs text-text-secondary line-clamp-1",
|
|
420
422
|
children: e.shortDescription
|
|
421
423
|
})] })]
|
|
422
424
|
})
|
|
423
425
|
}),
|
|
424
|
-
/* @__PURE__ */
|
|
426
|
+
/* @__PURE__ */ g("td", {
|
|
425
427
|
className: "px-4 py-3",
|
|
426
|
-
children: /* @__PURE__ */
|
|
428
|
+
children: /* @__PURE__ */ g(y, {
|
|
427
429
|
status: e.status,
|
|
428
|
-
tr:
|
|
430
|
+
tr: w
|
|
429
431
|
})
|
|
430
432
|
}),
|
|
431
|
-
/* @__PURE__ */
|
|
433
|
+
/* @__PURE__ */ g("td", {
|
|
432
434
|
className: "px-4 py-3 text-text-secondary",
|
|
433
|
-
children:
|
|
435
|
+
children: o[e.appType] || e.appType
|
|
434
436
|
}),
|
|
435
|
-
/* @__PURE__ */
|
|
437
|
+
/* @__PURE__ */ g("td", {
|
|
436
438
|
className: "px-4 py-3 text-text-secondary tabular-nums",
|
|
437
439
|
children: new Date(e.createdAt).toLocaleDateString()
|
|
438
440
|
}),
|
|
439
|
-
/* @__PURE__ */
|
|
441
|
+
/* @__PURE__ */ g("td", {
|
|
440
442
|
className: "px-4 py-3 text-right",
|
|
441
|
-
children: /* @__PURE__ */
|
|
443
|
+
children: /* @__PURE__ */ g("button", {
|
|
442
444
|
onClick: () => W(`/apps/${e.id}`),
|
|
443
445
|
className: "rounded-md px-3 py-1.5 text-xs font-medium text-text-secondary hover:bg-bg-sunken hover:text-text-primary transition-colors",
|
|
444
|
-
children:
|
|
446
|
+
children: w("devportal.view", "View")
|
|
445
447
|
})
|
|
446
448
|
})
|
|
447
449
|
]
|
|
448
450
|
}, e.id))
|
|
449
451
|
})]
|
|
450
452
|
})
|
|
451
|
-
}) : /* @__PURE__ */
|
|
452
|
-
illustration:
|
|
453
|
-
icon: /* @__PURE__ */
|
|
454
|
-
title:
|
|
455
|
-
description:
|
|
456
|
-
action: !
|
|
453
|
+
}) : /* @__PURE__ */ g(n, {
|
|
454
|
+
illustration: k || A || M ? "empty-search" : "empty-data",
|
|
455
|
+
icon: /* @__PURE__ */ g(d, { size: 32 }),
|
|
456
|
+
title: w("devportal.noApplicationsFound", "No applications found"),
|
|
457
|
+
description: k || A || M ? w("devportal.tryAdjustingFilters", "Try adjusting your filters") : w("devportal.createFirstApp", "Create your first application to get started"),
|
|
458
|
+
action: !k && !A && !M ? /* @__PURE__ */ _("button", {
|
|
457
459
|
onClick: () => W("/apps/new"),
|
|
458
460
|
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",
|
|
459
|
-
children: [/* @__PURE__ */
|
|
461
|
+
children: [/* @__PURE__ */ g(m, { size: 16 }), w("devportal.createApp", "Create App")]
|
|
460
462
|
}) : void 0
|
|
461
463
|
}),
|
|
462
|
-
/* @__PURE__ */
|
|
463
|
-
open:
|
|
464
|
+
/* @__PURE__ */ g(ne, {
|
|
465
|
+
open: I === "deactivate",
|
|
464
466
|
onOpenChange: (e) => {
|
|
465
|
-
e ||
|
|
467
|
+
e || L(null);
|
|
466
468
|
},
|
|
467
469
|
onConfirm: async () => {
|
|
468
470
|
if (J.length === 0) return;
|
|
469
|
-
let e = await Promise.allSettled(J.map((e) =>
|
|
470
|
-
|
|
471
|
+
let e = await Promise.allSettled(J.map((e) => me({ variables: { id: e.id } }))), t = e.filter((e) => e.status === "fulfilled").length, n = e.length - t;
|
|
472
|
+
z({
|
|
471
473
|
type: n === 0 ? "success" : "error",
|
|
472
|
-
message:
|
|
473
|
-
}), $(),
|
|
474
|
+
message: de(w("devportal.deactivated", "Deactivated"), t, n)
|
|
475
|
+
}), $(), L(null), await H();
|
|
474
476
|
},
|
|
475
|
-
title:
|
|
476
|
-
description:
|
|
477
|
-
confirmLabel:
|
|
478
|
-
cancelLabel:
|
|
477
|
+
title: w("devportal.deactivateSelectedApplications", "Deactivate selected applications"),
|
|
478
|
+
description: w("devportal.deactivateSelectedApplicationsDescription", "Deactivate {{count}} selected application(s)? Users and integrations may lose access until these apps are re-enabled.", { count: J.length }),
|
|
479
|
+
confirmLabel: w("devportal.deactivate", "Deactivate"),
|
|
480
|
+
cancelLabel: w("devportal.cancel", "Cancel"),
|
|
479
481
|
variant: "warning"
|
|
480
482
|
})
|
|
481
483
|
]
|
|
482
484
|
})
|
|
483
485
|
});
|
|
484
486
|
};
|
|
485
|
-
export {
|
|
487
|
+
export { x as ApplicationsPage };
|
|
486
488
|
|
|
487
489
|
//# sourceMappingURL=ApplicationsPage.js.map
|