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