@burdenoff/microfe-devportal 2026.624.25 → 2026.624.27
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.
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { useDevportal as e } from "../providers/DevportalProvider.js";
|
|
2
2
|
import { LoadingState as t } from "../components/LoadingState.js";
|
|
3
3
|
import { EmptyState as n } from "../components/EmptyState.js";
|
|
4
|
-
import { useDeactivateAppMutation as
|
|
4
|
+
import { useDeactivateAppMutation as r, useDeleteApplicationMutation as i, useGetApplicationQuery as ee, useUpdateApplicationMutation as te } from "../../generated/global-operations.js";
|
|
5
5
|
import { PageLayout as a, PageSection as o } from "../components/PageLayout.js";
|
|
6
6
|
import { APP_TYPE_LABELS as s } from "../utils/constants.js";
|
|
7
|
-
import { StatusBadge as
|
|
8
|
-
import { nativeImpact as
|
|
9
|
-
import { CheckboxField as
|
|
10
|
-
import { ConfirmDialog as
|
|
11
|
-
import { PermissionGuard as
|
|
7
|
+
import { StatusBadge as ne } from "../components/StatusBadge.js";
|
|
8
|
+
import { nativeImpact as re, nativeNotify as c } from "../../utils/nativeBridge.js";
|
|
9
|
+
import { CheckboxField as l, InputField as u, SelectField as d, TagInput as f, TextareaField as p } from "../components/FormField.js";
|
|
10
|
+
import { ConfirmDialog as m } from "../components/ConfirmDialog.js";
|
|
11
|
+
import { PermissionGuard as ie } from "../components/PermissionGuard.js";
|
|
12
12
|
import "../components/index.js";
|
|
13
|
-
import { DEVPORTAL_PERMISSIONS as
|
|
14
|
-
import { useDevportalPermission as
|
|
15
|
-
import { useEffect as
|
|
16
|
-
import { useI18n as
|
|
17
|
-
import { AlertCircle as
|
|
13
|
+
import { DEVPORTAL_PERMISSIONS as h } from "../constants/permissions.js";
|
|
14
|
+
import { useDevportalPermission as g } from "../hooks/usePermission.js";
|
|
15
|
+
import { useEffect as _, useState as v } from "react";
|
|
16
|
+
import { useI18n as y } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
17
|
+
import { AlertCircle as b, AlertTriangle as x, AppWindow as S, Archive as C, Power as w, Save as ae, Send as oe, Trash2 as se } from "lucide-react";
|
|
18
18
|
import { useParams as ce } from "react-router-dom";
|
|
19
|
-
import { Fragment as
|
|
19
|
+
import { Fragment as T, jsx as E, jsxs as D } from "react/jsx-runtime";
|
|
20
20
|
//#region src/devportal/pages/EditApplicationPage.tsx
|
|
21
21
|
var le = Object.entries(s).map(([e, t]) => ({
|
|
22
22
|
value: e,
|
|
@@ -109,21 +109,21 @@ function fe(e) {
|
|
|
109
109
|
updatedAt: e.updatedAt
|
|
110
110
|
} : null;
|
|
111
111
|
}
|
|
112
|
-
var
|
|
113
|
-
let { navigate: s, basePath:
|
|
114
|
-
let n =
|
|
112
|
+
var O = () => {
|
|
113
|
+
let { navigate: s, basePath: O } = e(), { appId: k } = ce(), { t: A } = y(), { allowed: j } = g(h.APP_UPDATE), { allowed: M } = g(h.APP_DELETE), N = (e, t) => {
|
|
114
|
+
let n = A(e);
|
|
115
115
|
return n === e ? t : n;
|
|
116
|
-
}, [
|
|
117
|
-
variables: { id:
|
|
118
|
-
skip: !
|
|
119
|
-
}), [
|
|
120
|
-
|
|
121
|
-
let e =
|
|
122
|
-
if (!
|
|
116
|
+
}, [P, F] = v(!1), [I, L] = v({}), [R, z] = v(!1), [B, V] = v(!1), [pe, H] = v(!1), [U, W] = v(!1), { data: G, loading: me, error: K } = ee({
|
|
117
|
+
variables: { id: k },
|
|
118
|
+
skip: !k
|
|
119
|
+
}), [q] = te(), [he] = i(), [ge] = r(), J = fe(G?.application);
|
|
120
|
+
_(() => {
|
|
121
|
+
let e = J?.name;
|
|
122
|
+
if (!k || !e) return;
|
|
123
123
|
let t = window.__breadcrumbRegistry;
|
|
124
|
-
return t?.register(
|
|
125
|
-
}, [
|
|
126
|
-
let [
|
|
124
|
+
return t?.register(k, e), () => t?.unregister(k);
|
|
125
|
+
}, [k, J?.name]);
|
|
126
|
+
let [Y, X] = v({
|
|
127
127
|
name: "",
|
|
128
128
|
slug: "",
|
|
129
129
|
shortDescription: "",
|
|
@@ -141,377 +141,372 @@ var k = () => {
|
|
|
141
141
|
githubUrl: "",
|
|
142
142
|
requiresApproval: !1
|
|
143
143
|
});
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
name:
|
|
147
|
-
slug:
|
|
148
|
-
shortDescription:
|
|
149
|
-
description:
|
|
150
|
-
appType:
|
|
151
|
-
visibility:
|
|
152
|
-
category:
|
|
153
|
-
tags:
|
|
154
|
-
keywords:
|
|
155
|
-
websiteUrl:
|
|
156
|
-
documentationUrl:
|
|
157
|
-
supportUrl:
|
|
158
|
-
privacyPolicyUrl:
|
|
159
|
-
termsOfServiceUrl:
|
|
160
|
-
githubUrl:
|
|
161
|
-
requiresApproval:
|
|
162
|
-
}),
|
|
163
|
-
}, [
|
|
164
|
-
let
|
|
165
|
-
s?.(`${
|
|
166
|
-
},
|
|
167
|
-
|
|
144
|
+
_(() => {
|
|
145
|
+
J && (X({
|
|
146
|
+
name: J.name,
|
|
147
|
+
slug: J.slug,
|
|
148
|
+
shortDescription: J.shortDescription || "",
|
|
149
|
+
description: J.description || "",
|
|
150
|
+
appType: J.appType,
|
|
151
|
+
visibility: J.visibility,
|
|
152
|
+
category: J.category || "",
|
|
153
|
+
tags: J.tags,
|
|
154
|
+
keywords: J.keywords,
|
|
155
|
+
websiteUrl: J.websiteUrl || "",
|
|
156
|
+
documentationUrl: J.documentationUrl || "",
|
|
157
|
+
supportUrl: J.supportUrl || "",
|
|
158
|
+
privacyPolicyUrl: J.privacyPolicyUrl || "",
|
|
159
|
+
termsOfServiceUrl: J.termsOfServiceUrl || "",
|
|
160
|
+
githubUrl: J.githubUrl || "",
|
|
161
|
+
requiresApproval: J.requiresApproval
|
|
162
|
+
}), W(!1));
|
|
163
|
+
}, [G?.application]);
|
|
164
|
+
let Z = (e) => {
|
|
165
|
+
s?.(`${O}${e}`);
|
|
166
|
+
}, Q = (e, t) => {
|
|
167
|
+
X((n) => ({
|
|
168
168
|
...n,
|
|
169
169
|
[e]: t
|
|
170
|
-
})),
|
|
170
|
+
})), W(!0), I[e] && L((t) => ({
|
|
171
171
|
...t,
|
|
172
172
|
[e]: void 0
|
|
173
173
|
}));
|
|
174
|
-
},
|
|
174
|
+
}, $ = () => {
|
|
175
175
|
let e = {};
|
|
176
|
-
return
|
|
177
|
-
},
|
|
178
|
-
if (e.preventDefault(), !(
|
|
179
|
-
|
|
176
|
+
return Y.name.trim() ? Y.name.length < 3 ? e.name = N("devportal.appNameMinLength", "Name must be at least 3 characters") : Y.name.length > 100 && (e.name = N("devportal.appNameMaxLength", "Name must be less than 100 characters")) : e.name = N("devportal.appNameRequired", "Application name is required"), Y.slug.trim() ? /^[a-z0-9-]+$/.test(Y.slug) || (e.slug = N("devportal.slugInvalidChars", "Slug can only contain lowercase letters, numbers, and hyphens")) : e.slug = N("devportal.slugRequired", "Slug is required"), Y.shortDescription.trim() ? Y.shortDescription.length > 200 && (e.shortDescription = N("devportal.shortDescriptionMaxLength", "Short description must be less than 200 characters")) : e.shortDescription = N("devportal.shortDescriptionRequired", "Short description is required"), Y.appType || (e.appType = N("devportal.appTypeRequired", "Application type is required")), Y.category || (e.category = N("devportal.categoryRequired", "Category is required")), L(e), Object.keys(e).length === 0;
|
|
177
|
+
}, _e = async (e) => {
|
|
178
|
+
if (e.preventDefault(), !(!$() || !J)) {
|
|
179
|
+
F(!0);
|
|
180
180
|
try {
|
|
181
|
-
await
|
|
182
|
-
id:
|
|
181
|
+
await q({ variables: {
|
|
182
|
+
id: J.id,
|
|
183
183
|
input: {
|
|
184
|
-
name:
|
|
185
|
-
shortDescription:
|
|
186
|
-
description:
|
|
187
|
-
appType:
|
|
188
|
-
visibility:
|
|
189
|
-
category:
|
|
190
|
-
tags:
|
|
191
|
-
keywords:
|
|
192
|
-
websiteUrl:
|
|
193
|
-
documentationUrl:
|
|
194
|
-
supportUrl:
|
|
195
|
-
privacyPolicyUrl:
|
|
196
|
-
termsOfServiceUrl:
|
|
197
|
-
githubUrl:
|
|
184
|
+
name: Y.name,
|
|
185
|
+
shortDescription: Y.shortDescription,
|
|
186
|
+
description: Y.description,
|
|
187
|
+
appType: Y.appType,
|
|
188
|
+
visibility: Y.visibility,
|
|
189
|
+
category: Y.category,
|
|
190
|
+
tags: Y.tags,
|
|
191
|
+
keywords: Y.keywords,
|
|
192
|
+
websiteUrl: Y.websiteUrl || null,
|
|
193
|
+
documentationUrl: Y.documentationUrl || null,
|
|
194
|
+
supportUrl: Y.supportUrl || null,
|
|
195
|
+
privacyPolicyUrl: Y.privacyPolicyUrl || null,
|
|
196
|
+
termsOfServiceUrl: Y.termsOfServiceUrl || null,
|
|
197
|
+
githubUrl: Y.githubUrl || null
|
|
198
198
|
}
|
|
199
|
-
} }),
|
|
199
|
+
} }), W(!1);
|
|
200
200
|
} catch (e) {
|
|
201
201
|
console.error("Failed to update application:", e);
|
|
202
202
|
} finally {
|
|
203
|
-
|
|
203
|
+
F(!1);
|
|
204
204
|
}
|
|
205
205
|
}
|
|
206
|
-
},
|
|
207
|
-
if (
|
|
208
|
-
|
|
206
|
+
}, ve = async () => {
|
|
207
|
+
if (J) {
|
|
208
|
+
re("medium");
|
|
209
209
|
try {
|
|
210
|
-
await he({ variables: { id:
|
|
210
|
+
await he({ variables: { id: J.id } }), c("success"), Z("/apps");
|
|
211
211
|
} catch (e) {
|
|
212
|
-
|
|
212
|
+
c("error"), console.error("Failed to delete application:", e);
|
|
213
213
|
}
|
|
214
214
|
}
|
|
215
|
-
},
|
|
216
|
-
if (
|
|
217
|
-
await
|
|
218
|
-
id:
|
|
215
|
+
}, ye = async () => {
|
|
216
|
+
if (J) try {
|
|
217
|
+
await q({ variables: {
|
|
218
|
+
id: J.id,
|
|
219
219
|
input: { visibility: "PRIVATE" }
|
|
220
|
-
} }),
|
|
220
|
+
} }), V(!1);
|
|
221
221
|
} catch (e) {
|
|
222
222
|
console.error("Failed to deprecate application:", e);
|
|
223
223
|
}
|
|
224
|
-
},
|
|
225
|
-
if (
|
|
226
|
-
await
|
|
224
|
+
}, be = async () => {
|
|
225
|
+
if (J) try {
|
|
226
|
+
await ge({ variables: { id: J.id } }), H(!1), Z("/apps");
|
|
227
227
|
} catch (e) {
|
|
228
228
|
console.error("Failed to deactivate application:", e);
|
|
229
229
|
}
|
|
230
|
-
},
|
|
231
|
-
|
|
232
|
-
I(!0), await ge({ variables: { id: Y.id } });
|
|
233
|
-
} catch (e) {
|
|
234
|
-
console.error("Failed to submit for review:", e);
|
|
235
|
-
} finally {
|
|
236
|
-
I(!1);
|
|
237
|
-
}
|
|
230
|
+
}, xe = () => {
|
|
231
|
+
J && s?.(`${O}/apps/${J.id}/publish`);
|
|
238
232
|
};
|
|
239
|
-
if (me) return /* @__PURE__ */
|
|
240
|
-
if (
|
|
241
|
-
title:
|
|
242
|
-
backLink: `${
|
|
243
|
-
backLabel:
|
|
244
|
-
children: /* @__PURE__ */
|
|
233
|
+
if (me) return /* @__PURE__ */ E(t, { message: N("devportal.loadingApplication", "Loading application...") });
|
|
234
|
+
if (K) return /* @__PURE__ */ E(a, {
|
|
235
|
+
title: N("devportal.error", "Error"),
|
|
236
|
+
backLink: `${O}/apps`,
|
|
237
|
+
backLabel: N("devportal.backToApplications", "Back to Applications"),
|
|
238
|
+
children: /* @__PURE__ */ D("div", {
|
|
245
239
|
className: "flex flex-col items-center justify-center py-12 text-center",
|
|
246
240
|
children: [
|
|
247
|
-
/* @__PURE__ */
|
|
241
|
+
/* @__PURE__ */ E(b, {
|
|
248
242
|
size: 48,
|
|
249
243
|
className: "text-destructive mb-4"
|
|
250
244
|
}),
|
|
251
|
-
/* @__PURE__ */
|
|
245
|
+
/* @__PURE__ */ E("h3", {
|
|
252
246
|
className: "text-lg font-semibold mb-2",
|
|
253
|
-
children:
|
|
247
|
+
children: N("devportal.failedToLoadApplication", "Failed to load application")
|
|
254
248
|
}),
|
|
255
|
-
/* @__PURE__ */
|
|
249
|
+
/* @__PURE__ */ E("p", {
|
|
256
250
|
className: "text-sm text-muted-foreground",
|
|
257
|
-
children:
|
|
251
|
+
children: K.message
|
|
258
252
|
})
|
|
259
253
|
]
|
|
260
254
|
})
|
|
261
255
|
});
|
|
262
|
-
if (!
|
|
263
|
-
title:
|
|
264
|
-
backLink: `${
|
|
265
|
-
backLabel:
|
|
266
|
-
children: /* @__PURE__ */
|
|
267
|
-
icon: /* @__PURE__ */
|
|
268
|
-
title:
|
|
269
|
-
description:
|
|
256
|
+
if (!J) return /* @__PURE__ */ E(a, {
|
|
257
|
+
title: N("devportal.notFound", "Not Found"),
|
|
258
|
+
backLink: `${O}/apps`,
|
|
259
|
+
backLabel: N("devportal.backToApplications", "Back to Applications"),
|
|
260
|
+
children: /* @__PURE__ */ E(n, {
|
|
261
|
+
icon: /* @__PURE__ */ E(S, { size: 48 }),
|
|
262
|
+
title: N("devportal.applicationNotFound", "Application not found"),
|
|
263
|
+
description: N("devportal.applicationNotFoundDescription", "The application you're looking for doesn't exist or you don't have access to it.")
|
|
270
264
|
})
|
|
271
265
|
});
|
|
272
|
-
let
|
|
273
|
-
return /* @__PURE__ */
|
|
274
|
-
permission:
|
|
275
|
-
children: /* @__PURE__ */
|
|
276
|
-
title: `${
|
|
277
|
-
description:
|
|
278
|
-
backLink: `${
|
|
279
|
-
backLabel:
|
|
280
|
-
actions: /* @__PURE__ */
|
|
266
|
+
let Se = J.status === "DRAFT" || J.status === "REJECTED", Ce = J.status === "PUBLISHED", we = J.status === "ACTIVE" || J.status === "PUBLISHED";
|
|
267
|
+
return /* @__PURE__ */ E(ie, {
|
|
268
|
+
permission: h.APP_UPDATE,
|
|
269
|
+
children: /* @__PURE__ */ D(a, {
|
|
270
|
+
title: `${N("devportal.editAppTitlePrefix", "Edit:")} ${J.name}`,
|
|
271
|
+
description: N("devportal.editAppDescription", "Update your application settings"),
|
|
272
|
+
backLink: `${O}/apps/${J.id}`,
|
|
273
|
+
backLabel: N("devportal.backToApplication", "Back to Application"),
|
|
274
|
+
actions: /* @__PURE__ */ E("div", {
|
|
281
275
|
className: "flex items-center gap-2",
|
|
282
|
-
children: /* @__PURE__ */
|
|
283
|
-
status:
|
|
276
|
+
children: /* @__PURE__ */ E(ne, {
|
|
277
|
+
status: J.status,
|
|
284
278
|
type: "app"
|
|
285
279
|
})
|
|
286
280
|
}),
|
|
287
281
|
children: [
|
|
288
|
-
/* @__PURE__ */
|
|
289
|
-
onSubmit:
|
|
282
|
+
/* @__PURE__ */ D("form", {
|
|
283
|
+
onSubmit: _e,
|
|
290
284
|
className: "space-y-8 max-w-3xl",
|
|
291
285
|
children: [
|
|
292
|
-
|
|
286
|
+
J.status === "PUBLISHED" && /* @__PURE__ */ D("div", {
|
|
293
287
|
className: "rounded-lg border border-border-subtle bg-status-warning-bg-subtle p-4 flex gap-3",
|
|
294
|
-
children: [/* @__PURE__ */
|
|
288
|
+
children: [/* @__PURE__ */ E(x, {
|
|
295
289
|
size: 20,
|
|
296
290
|
className: "text-status-warning-text flex-shrink-0 mt-0.5"
|
|
297
|
-
}), /* @__PURE__ */
|
|
291
|
+
}), /* @__PURE__ */ D("div", {
|
|
298
292
|
className: "text-sm text-status-warning-text",
|
|
299
|
-
children: [/* @__PURE__ */
|
|
293
|
+
children: [/* @__PURE__ */ E("p", {
|
|
300
294
|
className: "font-medium",
|
|
301
|
-
children:
|
|
302
|
-
}), /* @__PURE__ */
|
|
295
|
+
children: N("devportal.appIsPublished", "This application is published")
|
|
296
|
+
}), /* @__PURE__ */ E("p", {
|
|
303
297
|
className: "mt-1 text-status-warning-text",
|
|
304
|
-
children:
|
|
298
|
+
children: N("devportal.publishedAppChangesWarning", "Changes to published apps may require re-review. Major changes will put the app back into review status.")
|
|
305
299
|
})]
|
|
306
300
|
})]
|
|
307
301
|
}),
|
|
308
|
-
/* @__PURE__ */
|
|
309
|
-
title:
|
|
310
|
-
description:
|
|
311
|
-
children: /* @__PURE__ */
|
|
302
|
+
/* @__PURE__ */ E(o, {
|
|
303
|
+
title: N("devportal.basicInformation", "Basic Information"),
|
|
304
|
+
description: N("devportal.basicInformationDescription", "Core details about your application"),
|
|
305
|
+
children: /* @__PURE__ */ D("div", {
|
|
312
306
|
className: "space-y-4",
|
|
313
307
|
children: [
|
|
314
|
-
/* @__PURE__ */
|
|
315
|
-
label:
|
|
316
|
-
value:
|
|
317
|
-
onChange: (e) =>
|
|
318
|
-
placeholder:
|
|
308
|
+
/* @__PURE__ */ E(u, {
|
|
309
|
+
label: N("devportal.applicationName", "Application Name"),
|
|
310
|
+
value: Y.name,
|
|
311
|
+
onChange: (e) => Q("name", e.target.value),
|
|
312
|
+
placeholder: N("devportal.applicationNamePlaceholder", "My Awesome App"),
|
|
319
313
|
required: !0,
|
|
320
|
-
error:
|
|
314
|
+
error: I.name
|
|
321
315
|
}),
|
|
322
|
-
/* @__PURE__ */
|
|
323
|
-
label:
|
|
324
|
-
value:
|
|
325
|
-
onChange: (e) =>
|
|
326
|
-
placeholder:
|
|
316
|
+
/* @__PURE__ */ E(u, {
|
|
317
|
+
label: N("devportal.slug", "Slug"),
|
|
318
|
+
value: Y.slug,
|
|
319
|
+
onChange: (e) => Q("slug", e.target.value.toLowerCase()),
|
|
320
|
+
placeholder: N("devportal.slugPlaceholder", "my-awesome-app"),
|
|
327
321
|
required: !0,
|
|
328
|
-
error:
|
|
329
|
-
hint:
|
|
322
|
+
error: I.slug,
|
|
323
|
+
hint: N("devportal.slugChangeWarning", "Changing the slug may break existing integrations")
|
|
330
324
|
}),
|
|
331
|
-
/* @__PURE__ */
|
|
332
|
-
label:
|
|
333
|
-
value:
|
|
334
|
-
onChange: (e) =>
|
|
335
|
-
placeholder:
|
|
325
|
+
/* @__PURE__ */ E(p, {
|
|
326
|
+
label: N("devportal.shortDescription", "Short Description"),
|
|
327
|
+
value: Y.shortDescription,
|
|
328
|
+
onChange: (e) => Q("shortDescription", e.target.value),
|
|
329
|
+
placeholder: N("devportal.shortDescriptionPlaceholder", "A brief description of what your app does"),
|
|
336
330
|
required: !0,
|
|
337
|
-
error:
|
|
338
|
-
hint: `${
|
|
331
|
+
error: I.shortDescription,
|
|
332
|
+
hint: `${Y.shortDescription.length}/200 ${N("devportal.characters", "characters")}`,
|
|
339
333
|
rows: 2
|
|
340
334
|
}),
|
|
341
|
-
/* @__PURE__ */
|
|
342
|
-
label:
|
|
343
|
-
value:
|
|
344
|
-
onChange: (e) =>
|
|
345
|
-
placeholder:
|
|
335
|
+
/* @__PURE__ */ E(p, {
|
|
336
|
+
label: N("devportal.fullDescription", "Full Description"),
|
|
337
|
+
value: Y.description,
|
|
338
|
+
onChange: (e) => Q("description", e.target.value),
|
|
339
|
+
placeholder: N("devportal.fullDescriptionPlaceholder", "Detailed description of your application, features, and use cases..."),
|
|
346
340
|
rows: 6,
|
|
347
|
-
hint:
|
|
341
|
+
hint: N("devportal.markdownSupported", "Markdown formatting is supported")
|
|
348
342
|
})
|
|
349
343
|
]
|
|
350
344
|
})
|
|
351
345
|
}),
|
|
352
|
-
/* @__PURE__ */
|
|
353
|
-
title:
|
|
354
|
-
description:
|
|
346
|
+
/* @__PURE__ */ D(o, {
|
|
347
|
+
title: N("devportal.classification", "Classification"),
|
|
348
|
+
description: N("devportal.classificationDescription", "Categorize your application"),
|
|
355
349
|
children: [
|
|
356
|
-
/* @__PURE__ */
|
|
350
|
+
/* @__PURE__ */ D("div", {
|
|
357
351
|
className: "grid gap-4 sm:grid-cols-2",
|
|
358
352
|
children: [
|
|
359
|
-
/* @__PURE__ */
|
|
360
|
-
label:
|
|
361
|
-
value:
|
|
362
|
-
onChange: (e) =>
|
|
353
|
+
/* @__PURE__ */ E(d, {
|
|
354
|
+
label: N("devportal.applicationType", "Application Type"),
|
|
355
|
+
value: Y.appType,
|
|
356
|
+
onChange: (e) => Q("appType", e.target.value),
|
|
363
357
|
options: le,
|
|
364
358
|
required: !0,
|
|
365
|
-
error:
|
|
359
|
+
error: I.appType
|
|
366
360
|
}),
|
|
367
|
-
/* @__PURE__ */
|
|
368
|
-
label:
|
|
369
|
-
value:
|
|
370
|
-
onChange: (e) =>
|
|
361
|
+
/* @__PURE__ */ E(d, {
|
|
362
|
+
label: N("devportal.category", "Category"),
|
|
363
|
+
value: Y.category,
|
|
364
|
+
onChange: (e) => Q("category", e.target.value),
|
|
371
365
|
options: de,
|
|
372
366
|
required: !0,
|
|
373
|
-
error:
|
|
367
|
+
error: I.category
|
|
374
368
|
}),
|
|
375
|
-
/* @__PURE__ */
|
|
376
|
-
label:
|
|
377
|
-
value:
|
|
378
|
-
onChange: (e) =>
|
|
369
|
+
/* @__PURE__ */ E(d, {
|
|
370
|
+
label: N("devportal.visibility", "Visibility"),
|
|
371
|
+
value: Y.visibility,
|
|
372
|
+
onChange: (e) => Q("visibility", e.target.value),
|
|
379
373
|
options: ue,
|
|
380
|
-
hint:
|
|
374
|
+
hint: N("devportal.visibilityHint", "Controls who can see this app once published. Public apps still require admin review and approval before appearing in the store.")
|
|
381
375
|
})
|
|
382
376
|
]
|
|
383
377
|
}),
|
|
384
|
-
/* @__PURE__ */
|
|
385
|
-
label:
|
|
386
|
-
value:
|
|
387
|
-
onChange: (e) =>
|
|
388
|
-
placeholder:
|
|
378
|
+
/* @__PURE__ */ E(f, {
|
|
379
|
+
label: N("devportal.tags", "Tags"),
|
|
380
|
+
value: Y.tags,
|
|
381
|
+
onChange: (e) => Q("tags", e),
|
|
382
|
+
placeholder: N("devportal.addTagsPlaceholder", "Add tags (press Enter)")
|
|
389
383
|
}),
|
|
390
|
-
/* @__PURE__ */
|
|
391
|
-
label:
|
|
392
|
-
value:
|
|
393
|
-
onChange: (e) =>
|
|
394
|
-
placeholder:
|
|
384
|
+
/* @__PURE__ */ E(f, {
|
|
385
|
+
label: N("devportal.keywords", "Keywords"),
|
|
386
|
+
value: Y.keywords,
|
|
387
|
+
onChange: (e) => Q("keywords", e),
|
|
388
|
+
placeholder: N("devportal.addKeywordsPlaceholder", "Add keywords (press Enter)")
|
|
395
389
|
})
|
|
396
390
|
]
|
|
397
391
|
}),
|
|
398
|
-
/* @__PURE__ */
|
|
399
|
-
title:
|
|
400
|
-
description:
|
|
401
|
-
children: /* @__PURE__ */
|
|
392
|
+
/* @__PURE__ */ E(o, {
|
|
393
|
+
title: N("devportal.links", "Links"),
|
|
394
|
+
description: N("devportal.linksDescription", "External resources for your application"),
|
|
395
|
+
children: /* @__PURE__ */ D("div", {
|
|
402
396
|
className: "grid gap-4 sm:grid-cols-2",
|
|
403
397
|
children: [
|
|
404
|
-
/* @__PURE__ */
|
|
405
|
-
label:
|
|
398
|
+
/* @__PURE__ */ E(u, {
|
|
399
|
+
label: N("devportal.websiteUrl", "Website URL"),
|
|
406
400
|
type: "url",
|
|
407
|
-
value:
|
|
408
|
-
onChange: (e) =>
|
|
409
|
-
placeholder:
|
|
401
|
+
value: Y.websiteUrl,
|
|
402
|
+
onChange: (e) => Q("websiteUrl", e.target.value),
|
|
403
|
+
placeholder: N("devportal.websiteUrlPlaceholder", "https://example.com")
|
|
410
404
|
}),
|
|
411
|
-
/* @__PURE__ */
|
|
412
|
-
label:
|
|
405
|
+
/* @__PURE__ */ E(u, {
|
|
406
|
+
label: N("devportal.documentationUrl", "Documentation URL"),
|
|
413
407
|
type: "url",
|
|
414
|
-
value:
|
|
415
|
-
onChange: (e) =>
|
|
416
|
-
placeholder:
|
|
408
|
+
value: Y.documentationUrl,
|
|
409
|
+
onChange: (e) => Q("documentationUrl", e.target.value),
|
|
410
|
+
placeholder: N("devportal.documentationUrlPlaceholder", "https://docs.example.com")
|
|
417
411
|
}),
|
|
418
|
-
/* @__PURE__ */
|
|
419
|
-
label:
|
|
412
|
+
/* @__PURE__ */ E(u, {
|
|
413
|
+
label: N("devportal.supportUrl", "Support URL"),
|
|
420
414
|
type: "url",
|
|
421
|
-
value:
|
|
422
|
-
onChange: (e) =>
|
|
423
|
-
placeholder:
|
|
415
|
+
value: Y.supportUrl,
|
|
416
|
+
onChange: (e) => Q("supportUrl", e.target.value),
|
|
417
|
+
placeholder: N("devportal.supportUrlPlaceholder", "https://support.example.com")
|
|
424
418
|
}),
|
|
425
|
-
/* @__PURE__ */
|
|
426
|
-
label:
|
|
419
|
+
/* @__PURE__ */ E(u, {
|
|
420
|
+
label: N("devportal.githubUrl", "GitHub URL"),
|
|
427
421
|
type: "url",
|
|
428
|
-
value:
|
|
429
|
-
onChange: (e) =>
|
|
430
|
-
placeholder:
|
|
422
|
+
value: Y.githubUrl,
|
|
423
|
+
onChange: (e) => Q("githubUrl", e.target.value),
|
|
424
|
+
placeholder: N("devportal.githubUrlPlaceholder", "https://github.com/org/repo")
|
|
431
425
|
}),
|
|
432
|
-
/* @__PURE__ */
|
|
433
|
-
label:
|
|
426
|
+
/* @__PURE__ */ E(u, {
|
|
427
|
+
label: N("devportal.privacyPolicyUrl", "Privacy Policy URL"),
|
|
434
428
|
type: "url",
|
|
435
|
-
value:
|
|
436
|
-
onChange: (e) =>
|
|
437
|
-
placeholder:
|
|
429
|
+
value: Y.privacyPolicyUrl,
|
|
430
|
+
onChange: (e) => Q("privacyPolicyUrl", e.target.value),
|
|
431
|
+
placeholder: N("devportal.privacyPolicyUrlPlaceholder", "https://example.com/privacy")
|
|
438
432
|
}),
|
|
439
|
-
/* @__PURE__ */
|
|
440
|
-
label:
|
|
433
|
+
/* @__PURE__ */ E(u, {
|
|
434
|
+
label: N("devportal.termsOfServiceUrl", "Terms of Service URL"),
|
|
441
435
|
type: "url",
|
|
442
|
-
value:
|
|
443
|
-
onChange: (e) =>
|
|
444
|
-
placeholder:
|
|
436
|
+
value: Y.termsOfServiceUrl,
|
|
437
|
+
onChange: (e) => Q("termsOfServiceUrl", e.target.value),
|
|
438
|
+
placeholder: N("devportal.termsOfServiceUrlPlaceholder", "https://example.com/terms")
|
|
445
439
|
})
|
|
446
440
|
]
|
|
447
441
|
})
|
|
448
442
|
}),
|
|
449
|
-
/* @__PURE__ */
|
|
450
|
-
title:
|
|
451
|
-
description:
|
|
452
|
-
children: /* @__PURE__ */
|
|
443
|
+
/* @__PURE__ */ E(o, {
|
|
444
|
+
title: N("devportal.settings", "Settings"),
|
|
445
|
+
description: N("devportal.settingsDescription", "Additional configuration options"),
|
|
446
|
+
children: /* @__PURE__ */ E("div", {
|
|
453
447
|
className: "space-y-4",
|
|
454
|
-
children: /* @__PURE__ */
|
|
455
|
-
label:
|
|
456
|
-
description:
|
|
457
|
-
checked:
|
|
458
|
-
onChange: (e) =>
|
|
448
|
+
children: /* @__PURE__ */ E(l, {
|
|
449
|
+
label: N("devportal.requireWorkspaceAdminApproval", "Require workspace admin approval"),
|
|
450
|
+
description: N("devportal.requireWorkspaceAdminApprovalDescription", "When enabled, workspace admins must approve installations before users can access this app"),
|
|
451
|
+
checked: Y.requiresApproval,
|
|
452
|
+
onChange: (e) => Q("requiresApproval", e.target.checked)
|
|
459
453
|
})
|
|
460
454
|
})
|
|
461
455
|
}),
|
|
462
|
-
/* @__PURE__ */
|
|
456
|
+
/* @__PURE__ */ D("div", {
|
|
463
457
|
className: "flex flex-col gap-4 border-t pt-6",
|
|
464
|
-
children: [/* @__PURE__ */
|
|
458
|
+
children: [/* @__PURE__ */ D("div", {
|
|
465
459
|
className: "flex items-center justify-between",
|
|
466
|
-
children: [/* @__PURE__ */
|
|
460
|
+
children: [/* @__PURE__ */ E("div", {
|
|
467
461
|
className: "flex items-center gap-2",
|
|
468
|
-
children:
|
|
462
|
+
children: Se && /* @__PURE__ */ D("button", {
|
|
469
463
|
type: "button",
|
|
470
|
-
onClick:
|
|
471
|
-
disabled:
|
|
464
|
+
onClick: xe,
|
|
465
|
+
disabled: U,
|
|
466
|
+
title: U ? "Save your changes first" : void 0,
|
|
472
467
|
className: "inline-flex items-center gap-2 rounded-md border border-primary bg-primary/10 px-4 py-2 text-sm font-medium text-primary hover:bg-primary/20 transition-colors disabled:opacity-50",
|
|
473
|
-
children: [/* @__PURE__ */
|
|
468
|
+
children: [/* @__PURE__ */ E(oe, { size: 16 }), N("devportal.submitForReview", "Submit for Review")]
|
|
474
469
|
})
|
|
475
|
-
}), /* @__PURE__ */
|
|
470
|
+
}), /* @__PURE__ */ E("button", {
|
|
476
471
|
type: "submit",
|
|
477
|
-
disabled:
|
|
478
|
-
"aria-disabled": !
|
|
472
|
+
disabled: P || !U || !j,
|
|
473
|
+
"aria-disabled": !j,
|
|
479
474
|
className: "inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90 transition-colors disabled:opacity-50",
|
|
480
|
-
children:
|
|
475
|
+
children: P ? /* @__PURE__ */ D(T, { children: [/* @__PURE__ */ E("span", { className: "h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent" }), N("devportal.saving", "Saving...")] }) : /* @__PURE__ */ D(T, { children: [/* @__PURE__ */ E(ae, { size: 16 }), N("devportal.saveChanges", "Save Changes")] })
|
|
481
476
|
})]
|
|
482
|
-
}), /* @__PURE__ */
|
|
477
|
+
}), /* @__PURE__ */ D("div", {
|
|
483
478
|
className: "rounded-lg border border-border-subtle bg-status-error-bg-subtle p-4",
|
|
484
479
|
children: [
|
|
485
|
-
/* @__PURE__ */
|
|
480
|
+
/* @__PURE__ */ E("h3", {
|
|
486
481
|
className: "text-sm font-medium text-status-error-text",
|
|
487
|
-
children:
|
|
482
|
+
children: N("devportal.dangerZone", "Danger Zone")
|
|
488
483
|
}),
|
|
489
|
-
/* @__PURE__ */
|
|
484
|
+
/* @__PURE__ */ E("p", {
|
|
490
485
|
className: "mt-1 text-sm text-status-error-text",
|
|
491
|
-
children:
|
|
486
|
+
children: N("devportal.dangerZoneWarning", "These actions are irreversible. Please proceed with caution.")
|
|
492
487
|
}),
|
|
493
|
-
/* @__PURE__ */
|
|
488
|
+
/* @__PURE__ */ D("div", {
|
|
494
489
|
className: "mt-4 flex gap-3",
|
|
495
490
|
children: [
|
|
496
|
-
|
|
491
|
+
Ce && /* @__PURE__ */ D("button", {
|
|
497
492
|
type: "button",
|
|
498
|
-
onClick: () =>
|
|
493
|
+
onClick: () => V(!0),
|
|
499
494
|
className: "inline-flex items-center gap-2 rounded-md border border-accent-orange bg-bg-surface px-3 py-1.5 text-sm font-medium text-accent-orange hover:bg-accent-orange-subtle transition-colors",
|
|
500
|
-
children: [/* @__PURE__ */
|
|
495
|
+
children: [/* @__PURE__ */ E(C, { size: 14 }), N("devportal.deprecateApp", "Deprecate App")]
|
|
501
496
|
}),
|
|
502
|
-
|
|
497
|
+
we && /* @__PURE__ */ D("button", {
|
|
503
498
|
type: "button",
|
|
504
|
-
onClick: () =>
|
|
499
|
+
onClick: () => H(!0),
|
|
505
500
|
className: "inline-flex items-center gap-2 rounded-md border border-accent-orange bg-bg-surface px-3 py-1.5 text-sm font-medium text-accent-orange hover:bg-accent-orange-subtle transition-colors",
|
|
506
|
-
children: [/* @__PURE__ */
|
|
501
|
+
children: [/* @__PURE__ */ E(w, { size: 14 }), N("devportal.deactivateApp", "Deactivate App")]
|
|
507
502
|
}),
|
|
508
|
-
/* @__PURE__ */
|
|
503
|
+
/* @__PURE__ */ D("button", {
|
|
509
504
|
type: "button",
|
|
510
|
-
onClick: () =>
|
|
511
|
-
disabled: !
|
|
512
|
-
"aria-disabled": !
|
|
505
|
+
onClick: () => z(!0),
|
|
506
|
+
disabled: !M,
|
|
507
|
+
"aria-disabled": !M,
|
|
513
508
|
className: "inline-flex items-center gap-2 rounded-md border border-status-error-bg bg-bg-surface px-3 py-1.5 text-sm font-medium text-status-error-text hover:bg-status-error-bg-subtle transition-colors disabled:opacity-50",
|
|
514
|
-
children: [/* @__PURE__ */
|
|
509
|
+
children: [/* @__PURE__ */ E(se, { size: 14 }), N("devportal.deleteApp", "Delete App")]
|
|
515
510
|
})
|
|
516
511
|
]
|
|
517
512
|
})
|
|
@@ -520,38 +515,38 @@ var k = () => {
|
|
|
520
515
|
})
|
|
521
516
|
]
|
|
522
517
|
}),
|
|
523
|
-
/* @__PURE__ */
|
|
524
|
-
open:
|
|
525
|
-
onOpenChange:
|
|
526
|
-
title:
|
|
527
|
-
description:
|
|
528
|
-
confirmLabel:
|
|
518
|
+
/* @__PURE__ */ E(m, {
|
|
519
|
+
open: R,
|
|
520
|
+
onOpenChange: z,
|
|
521
|
+
title: N("devportal.deleteApplication", "Delete Application"),
|
|
522
|
+
description: N("devportal.deleteApplicationConfirm", `Are you sure you want to delete "${J.name}"? This action cannot be undone. All OAuth clients, API keys, webhooks, and analytics data will be permanently deleted.`),
|
|
523
|
+
confirmLabel: N("devportal.deleteApplication", "Delete Application"),
|
|
529
524
|
variant: "destructive",
|
|
530
|
-
onConfirm:
|
|
525
|
+
onConfirm: ve
|
|
531
526
|
}),
|
|
532
|
-
/* @__PURE__ */
|
|
533
|
-
open:
|
|
534
|
-
onOpenChange:
|
|
535
|
-
title:
|
|
536
|
-
description:
|
|
537
|
-
confirmLabel:
|
|
527
|
+
/* @__PURE__ */ E(m, {
|
|
528
|
+
open: B,
|
|
529
|
+
onOpenChange: V,
|
|
530
|
+
title: N("devportal.deprecateApplication", "Deprecate Application"),
|
|
531
|
+
description: N("devportal.deprecateApplicationConfirm", `Are you sure you want to deprecate "${J.name}"? Existing users will still be able to use the app, but it will no longer be visible in the marketplace and new installations will be disabled.`),
|
|
532
|
+
confirmLabel: N("devportal.deprecateApplication", "Deprecate Application"),
|
|
538
533
|
variant: "warning",
|
|
539
|
-
onConfirm:
|
|
534
|
+
onConfirm: ye
|
|
540
535
|
}),
|
|
541
|
-
/* @__PURE__ */
|
|
536
|
+
/* @__PURE__ */ E(m, {
|
|
542
537
|
open: pe,
|
|
543
|
-
onOpenChange:
|
|
544
|
-
title:
|
|
545
|
-
description:
|
|
546
|
-
confirmLabel:
|
|
538
|
+
onOpenChange: H,
|
|
539
|
+
title: N("devportal.deactivateApplication", "Deactivate Application"),
|
|
540
|
+
description: N("devportal.deactivateApplicationConfirm", `Are you sure you want to deactivate "${J.name}"? This will revoke all active tokens and disable the app from the auth-svc layer. The app will no longer be able to authenticate or act on behalf of users.`),
|
|
541
|
+
confirmLabel: N("devportal.deactivateApplication", "Deactivate Application"),
|
|
547
542
|
variant: "destructive",
|
|
548
|
-
onConfirm:
|
|
543
|
+
onConfirm: be
|
|
549
544
|
})
|
|
550
545
|
]
|
|
551
546
|
})
|
|
552
547
|
});
|
|
553
548
|
};
|
|
554
549
|
//#endregion
|
|
555
|
-
export {
|
|
550
|
+
export { O as EditApplicationPage };
|
|
556
551
|
|
|
557
552
|
//# sourceMappingURL=EditApplicationPage.js.map
|