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