@burdenoff/microfe-devportal 2026.701.1 → 2026.702.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.
@@ -1,27 +1,45 @@
1
1
  import { useDevportal as e } from "../providers/DevportalProvider.js";
2
- import { LoadingState as t } from "../components/LoadingState.js";
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";
5
- import { PageLayout as a, PageSection as o } from "../components/PageLayout.js";
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";
2
+ import { cn as t } from "../utils/cn.js";
3
+ import { LoadingState as n } from "../components/LoadingState.js";
4
+ import { EmptyState as ee } from "../components/EmptyState.js";
5
+ import { useDeactivateAppMutation as r, useDeleteApplicationMutation as i, useGetApplicationQuery as a, useUpdateApplicationMutation as te } from "../../generated/global-operations.js";
6
+ import { PageLayout as o, PageSection as s } from "../components/PageLayout.js";
7
+ import { APP_TYPE_LABELS as c } from "../utils/constants.js";
8
+ import { StatusBadge as ne } from "../components/StatusBadge.js";
9
+ import { nativeImpact as re, nativeNotify as l } from "../../utils/nativeBridge.js";
9
10
  import { CheckboxField as u, InputField as d, SelectField as f, TagInput as p, TextareaField as m } from "../components/FormField.js";
10
11
  import { ConfirmDialog as h } from "../components/ConfirmDialog.js";
11
- import { PermissionGuard as g } from "../components/PermissionGuard.js";
12
+ import { PermissionGuard as ie } from "../components/PermissionGuard.js";
12
13
  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";
18
- import { useParams as ce } from "react-router-dom";
19
- import { Fragment as E, jsx as D, jsxs as O } from "react/jsx-runtime";
14
+ import { DEVPORTAL_PERMISSIONS as g } from "../constants/permissions.js";
15
+ import { useDevportalPermission as _ } from "../hooks/usePermission.js";
16
+ import { useEffect as v, useState as y } from "react";
17
+ import { useI18n as ae } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
18
+ import { AlertCircle as oe, AlertTriangle as se, AppWindow as b, Archive as x, Check as S, Power as C, Save as w, Send as ce, Trash2 as le } from "lucide-react";
19
+ import { useParams as ue } from "react-router-dom";
20
+ import { Fragment as T, jsx as E, jsxs as D } from "react/jsx-runtime";
20
21
  //#region src/devportal/pages/EditApplicationPage.tsx
21
- var le = Object.entries(s).map(([e, t]) => ({
22
+ var de = [
23
+ {
24
+ value: "fluidgrids",
25
+ label: "FluidGrids"
26
+ },
27
+ {
28
+ value: "workspaces",
29
+ label: "Workspaces"
30
+ },
31
+ {
32
+ value: "bigconsole",
33
+ label: "BigConsole"
34
+ },
35
+ {
36
+ value: "botlit",
37
+ label: "Botlit"
38
+ }
39
+ ], fe = Object.entries(c).map(([e, t]) => ({
22
40
  value: e,
23
41
  label: t
24
- })), ue = [
42
+ })), pe = [
25
43
  {
26
44
  value: "PUBLIC",
27
45
  label: "Public - Visible to everyone"
@@ -38,7 +56,7 @@ var le = Object.entries(s).map(([e, t]) => ({
38
56
  value: "INTERNAL",
39
57
  label: "Internal - Only visible within organization"
40
58
  }
41
- ], de = [
59
+ ], me = [
42
60
  {
43
61
  value: "ai",
44
62
  label: "AI & Automation"
@@ -68,7 +86,7 @@ var le = Object.entries(s).map(([e, t]) => ({
68
86
  label: "Triggers"
69
87
  }
70
88
  ];
71
- function fe(e) {
89
+ function he(e) {
72
90
  return e ? {
73
91
  id: e.id,
74
92
  name: e.name,
@@ -109,21 +127,21 @@ function fe(e) {
109
127
  updatedAt: e.updatedAt
110
128
  } : null;
111
129
  }
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);
130
+ var O = () => {
131
+ let { navigate: c, basePath: O } = e(), { appId: k } = ue(), { t: A } = ae(), { allowed: j } = _(g.APP_UPDATE), { allowed: M } = _(g.APP_DELETE), N = (e, t) => {
132
+ let n = A(e);
115
133
  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;
134
+ }, [P, F] = y(!1), [I, L] = y({}), [R, z] = y(!1), [ge, B] = y(!1), [_e, V] = y(!1), [H, U] = y(!1), { data: W, loading: ve, error: G, refetch: ye } = a({
135
+ variables: { id: k },
136
+ skip: !k
137
+ }), [K] = te(), [be] = i(), [xe] = r(), q = he(W?.application);
138
+ v(() => {
139
+ let e = q?.name;
140
+ if (!k || !e) return;
123
141
  let t = window.__breadcrumbRegistry;
124
- return t?.register(A, e), () => t?.unregister(A);
125
- }, [A, Y?.name]);
126
- let [X, Z] = b({
142
+ return t?.register(k, e), () => t?.unregister(k);
143
+ }, [k, q?.name]);
144
+ let [J, Y] = y({
127
145
  name: "",
128
146
  slug: "",
129
147
  shortDescription: "",
@@ -140,380 +158,458 @@ var k = () => {
140
158
  termsOfServiceUrl: "",
141
159
  githubUrl: "",
142
160
  requiresApproval: !1
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]);
161
+ }), [X, Z] = y([]);
162
+ v(() => {
163
+ if (q) {
164
+ Y({
165
+ name: q.name,
166
+ slug: q.slug,
167
+ shortDescription: q.shortDescription || "",
168
+ description: q.description || "",
169
+ appType: q.appType,
170
+ visibility: q.visibility,
171
+ category: q.category || "",
172
+ tags: q.tags,
173
+ keywords: q.keywords,
174
+ websiteUrl: q.websiteUrl || "",
175
+ documentationUrl: q.documentationUrl || "",
176
+ supportUrl: q.supportUrl || "",
177
+ privacyPolicyUrl: q.privacyPolicyUrl || "",
178
+ termsOfServiceUrl: q.termsOfServiceUrl || "",
179
+ githubUrl: q.githubUrl || "",
180
+ requiresApproval: q.requiresApproval
181
+ });
182
+ let e = W?.application?.manifest?.compatibility;
183
+ Z(Array.isArray(e?.products) ? e.products : []), U(!1);
184
+ }
185
+ }, [W?.application]);
164
186
  let Q = (e) => {
165
- s?.(`${k}${e}`);
187
+ c?.(`${O}${e}`);
166
188
  }, $ = (e, t) => {
167
- Z((n) => ({
189
+ Y((n) => ({
168
190
  ...n,
169
191
  [e]: t
170
- })), G(!0), L[e] && R((t) => ({
192
+ })), U(!0), I[e] && L((t) => ({
171
193
  ...t,
172
194
  [e]: void 0
173
195
  }));
174
- }, ve = () => {
196
+ }, Se = () => {
175
197
  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);
198
+ return J.name.trim() ? J.name.length < 3 ? e.name = N("devportal.appNameMinLength", "Name must be at least 3 characters") : J.name.length > 100 && (e.name = N("devportal.appNameMaxLength", "Name must be less than 100 characters")) : e.name = N("devportal.appNameRequired", "Application name is required"), J.slug.trim() ? /^[a-z0-9-]+$/.test(J.slug) || (e.slug = N("devportal.slugInvalidChars", "Slug can only contain lowercase letters, numbers, and hyphens")) : e.slug = N("devportal.slugRequired", "Slug is required"), J.shortDescription.trim() ? J.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"), J.appType || (e.appType = N("devportal.appTypeRequired", "Application type is required")), J.category || (e.category = N("devportal.categoryRequired", "Category is required")), L(e), Object.keys(e).length === 0;
199
+ }, Ce = async (e) => {
200
+ if (e.preventDefault(), !(!Se() || !q)) {
201
+ F(!0);
180
202
  try {
181
- await J({ variables: {
182
- id: Y.id,
203
+ await K({ variables: {
204
+ id: q.id,
183
205
  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
206
+ name: J.name,
207
+ shortDescription: J.shortDescription,
208
+ description: J.description,
209
+ appType: J.appType,
210
+ visibility: J.visibility,
211
+ category: J.category,
212
+ tags: J.tags,
213
+ keywords: J.keywords,
214
+ websiteUrl: J.websiteUrl || null,
215
+ documentationUrl: J.documentationUrl || null,
216
+ supportUrl: J.supportUrl || null,
217
+ privacyPolicyUrl: J.privacyPolicyUrl || null,
218
+ termsOfServiceUrl: J.termsOfServiceUrl || null,
219
+ githubUrl: J.githubUrl || null,
220
+ compatibleProducts: X
198
221
  }
199
- } }), G(!1);
222
+ } }), U(!1);
200
223
  } catch (e) {
201
224
  console.error("Failed to update application:", e);
202
225
  } finally {
203
- I(!1);
226
+ F(!1);
204
227
  }
205
228
  }
206
- }, be = async () => {
207
- if (Y) {
208
- c("medium");
229
+ }, we = async () => {
230
+ if (q) {
231
+ re("medium");
209
232
  try {
210
- await he({ variables: { id: Y.id } }), l("success"), Q("/apps");
233
+ await be({ variables: { id: q.id } }), l("success"), Q("/apps");
211
234
  } catch (e) {
212
235
  l("error"), console.error("Failed to delete application:", e);
213
236
  }
214
237
  }
215
- }, xe = async () => {
216
- if (Y) try {
217
- await J({ variables: {
218
- id: Y.id,
238
+ }, Te = async () => {
239
+ if (q) try {
240
+ await K({ variables: {
241
+ id: q.id,
219
242
  input: { visibility: "PRIVATE" }
220
- } }), H(!1);
243
+ } }), B(!1);
221
244
  } catch (e) {
222
245
  console.error("Failed to deprecate application:", e);
223
246
  }
224
- }, Se = async () => {
225
- if (Y) try {
226
- await _e({ variables: { id: Y.id } }), U(!1), Q("/apps");
247
+ }, Ee = async () => {
248
+ if (q) try {
249
+ await xe({ variables: { id: q.id } }), V(!1), Q("/apps");
227
250
  } catch (e) {
228
251
  console.error("Failed to deactivate application:", e);
229
252
  }
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
- }
238
253
  };
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", {
254
+ if (ve) return /* @__PURE__ */ E(n, { message: N("devportal.loadingApplication", "Loading application...") });
255
+ if (G) return /* @__PURE__ */ E(o, {
256
+ title: N("devportal.error", "Error"),
257
+ backLink: `${O}/apps`,
258
+ backLabel: N("devportal.backToApplications", "Back to Applications"),
259
+ children: /* @__PURE__ */ D("div", {
245
260
  className: "flex flex-col items-center justify-center py-12 text-center",
246
261
  children: [
247
- /* @__PURE__ */ D(S, {
262
+ /* @__PURE__ */ E(oe, {
248
263
  size: 48,
249
264
  className: "text-status-error-text mb-4"
250
265
  }),
251
- /* @__PURE__ */ D("h3", {
266
+ /* @__PURE__ */ E("h3", {
252
267
  className: "text-lg font-semibold mb-2",
253
- children: P("devportal.failedToLoadApplication", "Failed to load application")
268
+ children: N("devportal.failedToLoadApplication", "Failed to load application")
254
269
  }),
255
- /* @__PURE__ */ D("p", {
270
+ /* @__PURE__ */ E("p", {
256
271
  className: "text-sm text-text-secondary",
257
- children: q.message
272
+ children: G.message
258
273
  })
259
274
  ]
260
275
  })
261
276
  });
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, {
277
+ if (!q) return /* @__PURE__ */ E(o, {
278
+ title: N("devportal.notFound", "Not Found"),
279
+ backLink: `${O}/apps`,
280
+ backLabel: N("devportal.backToApplications", "Back to Applications"),
281
+ children: /* @__PURE__ */ E(ee, {
267
282
  illustration: "empty-generic",
268
- icon: /* @__PURE__ */ D(w, { size: 48 }),
269
- title: P("devportal.applicationNotFound", "Application not found"),
270
- description: P("devportal.applicationNotFoundDescription", "The application you're looking for doesn't exist or you don't have access to it.")
283
+ icon: /* @__PURE__ */ E(b, { size: 48 }),
284
+ title: N("devportal.applicationNotFound", "Application not found"),
285
+ description: N("devportal.applicationNotFoundDescription", "The application you're looking for doesn't exist or you don't have access to it.")
271
286
  })
272
287
  });
273
- let we = Y.status === "DRAFT" || Y.status === "REJECTED", Te = Y.status === "PUBLISHED", Ee = Y.status === "ACTIVE" || Y.status === "PUBLISHED";
274
- return /* @__PURE__ */ D(g, {
275
- permission: _.APP_UPDATE,
276
- children: /* @__PURE__ */ O(a, {
277
- title: `${P("devportal.editAppTitlePrefix", "Edit:")} ${Y.name}`,
278
- description: P("devportal.editAppDescription", "Update your application settings"),
279
- purpose: P("devportal.editAppPurpose", "Change how this app appears and behaves — its name, description, classification, links, and lifecycle settings. Use the danger zone at the bottom to deprecate or delete it when it is retired."),
280
- backLink: `${k}/apps/${Y.id}`,
281
- backLabel: P("devportal.backToApplication", "Back to Application"),
282
- actions: /* @__PURE__ */ D("div", {
288
+ let De = q.status === "DRAFT" || q.status === "REJECTED", Oe = q.status === "PUBLISHED", ke = q.status === "ACTIVE" || q.status === "PUBLISHED";
289
+ return /* @__PURE__ */ E(ie, {
290
+ permission: g.APP_UPDATE,
291
+ children: /* @__PURE__ */ D(o, {
292
+ title: `${N("devportal.editAppTitlePrefix", "Edit:")} ${q.name}`,
293
+ description: N("devportal.editAppDescription", "Update your application settings"),
294
+ purpose: N("devportal.editAppPurpose", "Change how this app appears and behaves — its name, description, classification, links, and lifecycle settings. Use the danger zone at the bottom to deprecate or delete it when it is retired."),
295
+ backLink: `${O}/apps/${q.id}`,
296
+ backLabel: N("devportal.backToApplication", "Back to Application"),
297
+ actions: /* @__PURE__ */ E("div", {
283
298
  className: "flex items-center gap-2",
284
- children: /* @__PURE__ */ D(re, {
285
- status: Y.status,
299
+ children: /* @__PURE__ */ E(ne, {
300
+ status: q.status,
286
301
  type: "app"
287
302
  })
288
303
  }),
289
304
  children: [
290
- /* @__PURE__ */ O("form", {
291
- onSubmit: ye,
305
+ /* @__PURE__ */ D("form", {
306
+ onSubmit: Ce,
292
307
  className: "space-y-8 max-w-3xl",
293
308
  children: [
294
- Y.status === "PUBLISHED" && /* @__PURE__ */ O("div", {
309
+ q.status === "PUBLISHED" && /* @__PURE__ */ D("div", {
295
310
  className: "rounded-lg border border-border-subtle bg-status-warning-bg-subtle p-4 flex gap-3",
296
- children: [/* @__PURE__ */ D(C, {
311
+ children: [/* @__PURE__ */ E(se, {
297
312
  size: 20,
298
313
  className: "text-status-warning-text flex-shrink-0 mt-0.5"
299
- }), /* @__PURE__ */ O("div", {
314
+ }), /* @__PURE__ */ D("div", {
300
315
  className: "text-sm text-status-warning-text",
301
- children: [/* @__PURE__ */ D("p", {
316
+ children: [/* @__PURE__ */ E("p", {
302
317
  className: "font-medium",
303
- children: P("devportal.appIsPublished", "This application is published")
304
- }), /* @__PURE__ */ D("p", {
318
+ children: N("devportal.appIsPublished", "This application is published")
319
+ }), /* @__PURE__ */ E("p", {
305
320
  className: "mt-1 text-status-warning-text",
306
- children: P("devportal.publishedAppChangesWarning", "Changes to published apps may require re-review. Major changes will put the app back into review status.")
321
+ children: N("devportal.publishedAppChangesWarning", "Changes to published apps may require re-review. Major changes will put the app back into review status.")
307
322
  })]
308
323
  })]
309
324
  }),
310
- /* @__PURE__ */ D(o, {
311
- title: P("devportal.basicInformation", "Basic Information"),
312
- description: P("devportal.basicInformationDescription", "Core details about your application"),
313
- children: /* @__PURE__ */ O("div", {
325
+ /* @__PURE__ */ E(s, {
326
+ title: N("devportal.basicInformation", "Basic Information"),
327
+ description: N("devportal.basicInformationDescription", "Core details about your application"),
328
+ children: /* @__PURE__ */ D("div", {
314
329
  className: "space-y-4",
315
330
  children: [
316
- /* @__PURE__ */ D(d, {
317
- label: P("devportal.applicationName", "Application Name"),
318
- value: X.name,
331
+ /* @__PURE__ */ E(d, {
332
+ label: N("devportal.applicationName", "Application Name"),
333
+ value: J.name,
319
334
  onChange: (e) => $("name", e.target.value),
320
- placeholder: P("devportal.applicationNamePlaceholder", "My Awesome App"),
335
+ placeholder: N("devportal.applicationNamePlaceholder", "My Awesome App"),
321
336
  required: !0,
322
- error: L.name
337
+ error: I.name
323
338
  }),
324
- /* @__PURE__ */ D(d, {
325
- label: P("devportal.slug", "Slug"),
326
- value: X.slug,
339
+ /* @__PURE__ */ E(d, {
340
+ label: N("devportal.slug", "Slug"),
341
+ value: J.slug,
327
342
  onChange: (e) => $("slug", e.target.value.toLowerCase()),
328
- placeholder: P("devportal.slugPlaceholder", "my-awesome-app"),
343
+ placeholder: N("devportal.slugPlaceholder", "my-awesome-app"),
329
344
  required: !0,
330
- error: L.slug,
331
- hint: P("devportal.slugChangeWarning", "Changing the slug may break existing integrations")
345
+ error: I.slug,
346
+ hint: N("devportal.slugChangeWarning", "Changing the slug may break existing integrations")
332
347
  }),
333
- /* @__PURE__ */ D(m, {
334
- label: P("devportal.shortDescription", "Short Description"),
335
- value: X.shortDescription,
348
+ /* @__PURE__ */ E(m, {
349
+ label: N("devportal.shortDescription", "Short Description"),
350
+ value: J.shortDescription,
336
351
  onChange: (e) => $("shortDescription", e.target.value),
337
- placeholder: P("devportal.shortDescriptionPlaceholder", "A brief description of what your app does"),
352
+ placeholder: N("devportal.shortDescriptionPlaceholder", "A brief description of what your app does"),
338
353
  required: !0,
339
- error: L.shortDescription,
340
- hint: `${X.shortDescription.length}/200 ${P("devportal.characters", "characters")}`,
354
+ error: I.shortDescription,
355
+ hint: `${J.shortDescription.length}/200 ${N("devportal.characters", "characters")}`,
341
356
  rows: 2
342
357
  }),
343
- /* @__PURE__ */ D(m, {
344
- label: P("devportal.fullDescription", "Full Description"),
345
- value: X.description,
358
+ /* @__PURE__ */ E(m, {
359
+ label: N("devportal.fullDescription", "Full Description"),
360
+ value: J.description,
346
361
  onChange: (e) => $("description", e.target.value),
347
- placeholder: P("devportal.fullDescriptionPlaceholder", "Detailed description of your application, features, and use cases..."),
362
+ placeholder: N("devportal.fullDescriptionPlaceholder", "Detailed description of your application, features, and use cases..."),
348
363
  rows: 6,
349
- hint: P("devportal.markdownSupported", "Markdown formatting is supported")
364
+ hint: N("devportal.markdownSupported", "Markdown formatting is supported")
350
365
  })
351
366
  ]
352
367
  })
353
368
  }),
354
- /* @__PURE__ */ O(o, {
355
- title: P("devportal.classification", "Classification"),
356
- description: P("devportal.classificationDescription", "Categorize your application"),
369
+ /* @__PURE__ */ D(s, {
370
+ title: N("devportal.classification", "Classification"),
371
+ description: N("devportal.classificationDescription", "Categorize your application"),
357
372
  children: [
358
- /* @__PURE__ */ O("div", {
373
+ /* @__PURE__ */ D("div", {
359
374
  className: "grid gap-4 sm:grid-cols-2",
360
375
  children: [
361
- /* @__PURE__ */ D(f, {
362
- label: P("devportal.applicationType", "Application Type"),
363
- value: X.appType,
376
+ /* @__PURE__ */ E(f, {
377
+ label: N("devportal.applicationType", "Application Type"),
378
+ value: J.appType,
364
379
  onChange: (e) => $("appType", e.target.value),
365
- options: le,
380
+ options: fe,
366
381
  required: !0,
367
- error: L.appType
382
+ error: I.appType
368
383
  }),
369
- /* @__PURE__ */ D(f, {
370
- label: P("devportal.category", "Category"),
371
- value: X.category,
384
+ /* @__PURE__ */ E(f, {
385
+ label: N("devportal.category", "Category"),
386
+ value: J.category,
372
387
  onChange: (e) => $("category", e.target.value),
373
- options: de,
388
+ options: me,
374
389
  required: !0,
375
- error: L.category
390
+ error: I.category
376
391
  }),
377
- /* @__PURE__ */ D(f, {
378
- label: P("devportal.visibility", "Visibility"),
379
- value: X.visibility,
392
+ /* @__PURE__ */ E(f, {
393
+ label: N("devportal.visibility", "Visibility"),
394
+ value: J.visibility,
380
395
  onChange: (e) => $("visibility", e.target.value),
381
- options: ue,
382
- 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.")
396
+ options: pe,
397
+ 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.")
383
398
  })
384
399
  ]
385
400
  }),
386
- /* @__PURE__ */ D(p, {
387
- label: P("devportal.tags", "Tags"),
388
- value: X.tags,
401
+ /* @__PURE__ */ E(p, {
402
+ label: N("devportal.tags", "Tags"),
403
+ value: J.tags,
389
404
  onChange: (e) => $("tags", e),
390
- placeholder: P("devportal.addTagsPlaceholder", "Add tags (press Enter)")
405
+ placeholder: N("devportal.addTagsPlaceholder", "Add tags (press Enter)")
391
406
  }),
392
- /* @__PURE__ */ D(p, {
393
- label: P("devportal.keywords", "Keywords"),
394
- value: X.keywords,
407
+ /* @__PURE__ */ E(p, {
408
+ label: N("devportal.keywords", "Keywords"),
409
+ value: J.keywords,
395
410
  onChange: (e) => $("keywords", e),
396
- placeholder: P("devportal.addKeywordsPlaceholder", "Add keywords (press Enter)")
411
+ placeholder: N("devportal.addKeywordsPlaceholder", "Add keywords (press Enter)")
412
+ }),
413
+ (J.appType === "NODE" || J.appType === "WORKFLOW") && /* @__PURE__ */ D("div", {
414
+ className: "space-y-2",
415
+ children: [
416
+ /* @__PURE__ */ E("label", {
417
+ className: "block text-sm font-medium text-text-primary",
418
+ children: "Compatible Products"
419
+ }),
420
+ /* @__PURE__ */ D("p", {
421
+ className: "text-xs text-text-secondary",
422
+ children: [
423
+ "Select which products this ",
424
+ J.appType.toLowerCase(),
425
+ " ",
426
+ "works with. Users will see it in those products' node stores."
427
+ ]
428
+ }),
429
+ /* @__PURE__ */ E("div", {
430
+ className: "flex flex-wrap gap-3",
431
+ children: de.map((e) => {
432
+ let n = X.includes(e.value);
433
+ return /* @__PURE__ */ D("label", {
434
+ className: t("flex items-center gap-2 cursor-pointer rounded-md border px-3 py-2 text-sm transition-colors", n ? "border-primary bg-primary/10 text-text-primary" : "border-border-subtle hover:border-border text-text-secondary hover:text-text-primary"),
435
+ children: [
436
+ /* @__PURE__ */ E("input", {
437
+ type: "checkbox",
438
+ className: "sr-only",
439
+ checked: n,
440
+ onChange: () => {
441
+ Z((t) => n ? t.filter((t) => t !== e.value) : [...t, e.value]), U(!0);
442
+ }
443
+ }),
444
+ n && /* @__PURE__ */ E(S, {
445
+ size: 14,
446
+ className: "text-primary flex-shrink-0"
447
+ }),
448
+ e.label
449
+ ]
450
+ }, e.value);
451
+ })
452
+ })
453
+ ]
397
454
  })
398
455
  ]
399
456
  }),
400
- /* @__PURE__ */ D(o, {
401
- title: P("devportal.links", "Links"),
402
- description: P("devportal.linksDescription", "External resources for your application"),
403
- children: /* @__PURE__ */ O("div", {
457
+ /* @__PURE__ */ E(s, {
458
+ title: N("devportal.links", "Links"),
459
+ description: N("devportal.linksDescription", "External resources for your application"),
460
+ children: /* @__PURE__ */ D("div", {
404
461
  className: "grid gap-4 sm:grid-cols-2",
405
462
  children: [
406
- /* @__PURE__ */ D(d, {
407
- label: P("devportal.websiteUrl", "Website URL"),
463
+ /* @__PURE__ */ E(d, {
464
+ label: N("devportal.websiteUrl", "Website URL"),
408
465
  type: "url",
409
- value: X.websiteUrl,
466
+ value: J.websiteUrl,
410
467
  onChange: (e) => $("websiteUrl", e.target.value),
411
- placeholder: P("devportal.websiteUrlPlaceholder", "https://example.com")
468
+ placeholder: N("devportal.websiteUrlPlaceholder", "https://example.com")
412
469
  }),
413
- /* @__PURE__ */ D(d, {
414
- label: P("devportal.documentationUrl", "Documentation URL"),
470
+ /* @__PURE__ */ E(d, {
471
+ label: N("devportal.documentationUrl", "Documentation URL"),
415
472
  type: "url",
416
- value: X.documentationUrl,
473
+ value: J.documentationUrl,
417
474
  onChange: (e) => $("documentationUrl", e.target.value),
418
- placeholder: P("devportal.documentationUrlPlaceholder", "https://docs.example.com")
475
+ placeholder: N("devportal.documentationUrlPlaceholder", "https://docs.example.com")
419
476
  }),
420
- /* @__PURE__ */ D(d, {
421
- label: P("devportal.supportUrl", "Support URL"),
477
+ /* @__PURE__ */ E(d, {
478
+ label: N("devportal.supportUrl", "Support URL"),
422
479
  type: "url",
423
- value: X.supportUrl,
480
+ value: J.supportUrl,
424
481
  onChange: (e) => $("supportUrl", e.target.value),
425
- placeholder: P("devportal.supportUrlPlaceholder", "https://support.example.com")
482
+ placeholder: N("devportal.supportUrlPlaceholder", "https://support.example.com")
426
483
  }),
427
- /* @__PURE__ */ D(d, {
428
- label: P("devportal.githubUrl", "GitHub URL"),
484
+ /* @__PURE__ */ E(d, {
485
+ label: N("devportal.githubUrl", "GitHub URL"),
429
486
  type: "url",
430
- value: X.githubUrl,
487
+ value: J.githubUrl,
431
488
  onChange: (e) => $("githubUrl", e.target.value),
432
- placeholder: P("devportal.githubUrlPlaceholder", "https://github.com/org/repo")
489
+ placeholder: N("devportal.githubUrlPlaceholder", "https://github.com/org/repo")
433
490
  }),
434
- /* @__PURE__ */ D(d, {
435
- label: P("devportal.privacyPolicyUrl", "Privacy Policy URL"),
491
+ /* @__PURE__ */ E(d, {
492
+ label: N("devportal.privacyPolicyUrl", "Privacy Policy URL"),
436
493
  type: "url",
437
- value: X.privacyPolicyUrl,
494
+ value: J.privacyPolicyUrl,
438
495
  onChange: (e) => $("privacyPolicyUrl", e.target.value),
439
- placeholder: P("devportal.privacyPolicyUrlPlaceholder", "https://example.com/privacy")
496
+ placeholder: N("devportal.privacyPolicyUrlPlaceholder", "https://example.com/privacy")
440
497
  }),
441
- /* @__PURE__ */ D(d, {
442
- label: P("devportal.termsOfServiceUrl", "Terms of Service URL"),
498
+ /* @__PURE__ */ E(d, {
499
+ label: N("devportal.termsOfServiceUrl", "Terms of Service URL"),
443
500
  type: "url",
444
- value: X.termsOfServiceUrl,
501
+ value: J.termsOfServiceUrl,
445
502
  onChange: (e) => $("termsOfServiceUrl", e.target.value),
446
- placeholder: P("devportal.termsOfServiceUrlPlaceholder", "https://example.com/terms")
503
+ placeholder: N("devportal.termsOfServiceUrlPlaceholder", "https://example.com/terms")
447
504
  })
448
505
  ]
449
506
  })
450
507
  }),
451
- /* @__PURE__ */ D(o, {
452
- title: P("devportal.settings", "Settings"),
453
- description: P("devportal.settingsDescription", "Additional configuration options"),
454
- children: /* @__PURE__ */ D("div", {
508
+ /* @__PURE__ */ E(s, {
509
+ title: N("devportal.settings", "Settings"),
510
+ description: N("devportal.settingsDescription", "Additional configuration options"),
511
+ children: /* @__PURE__ */ E("div", {
455
512
  className: "space-y-4",
456
- children: /* @__PURE__ */ D(u, {
457
- label: P("devportal.requireWorkspaceAdminApproval", "Require workspace admin approval"),
458
- description: P("devportal.requireWorkspaceAdminApprovalDescription", "When enabled, workspace admins must approve installations before users can access this app"),
459
- checked: X.requiresApproval,
513
+ children: /* @__PURE__ */ E(u, {
514
+ label: N("devportal.requireWorkspaceAdminApproval", "Require workspace admin approval"),
515
+ description: N("devportal.requireWorkspaceAdminApprovalDescription", "When enabled, workspace admins must approve installations before users can access this app"),
516
+ checked: J.requiresApproval,
460
517
  onChange: (e) => $("requiresApproval", e.target.checked)
461
518
  })
462
519
  })
463
520
  }),
464
- /* @__PURE__ */ O("div", {
521
+ De && /* @__PURE__ */ D("div", {
522
+ className: "rounded-lg border border-border-subtle bg-bg-sunken p-4 space-y-2",
523
+ children: [/* @__PURE__ */ D("p", {
524
+ className: "text-sm font-medium text-text-primary flex items-center gap-2",
525
+ children: [/* @__PURE__ */ E(ce, { size: 14 }), N("devportal.submissionChecklist", "Submission Checklist")]
526
+ }), [
527
+ {
528
+ label: N("devportal.checkName", "Name set"),
529
+ ok: !!J.name.trim()
530
+ },
531
+ {
532
+ label: N("devportal.checkShortDesc", "Short description set"),
533
+ ok: !!J.shortDescription.trim()
534
+ },
535
+ {
536
+ label: N("devportal.checkFullDesc", "Full description added"),
537
+ ok: !!J.description.trim()
538
+ },
539
+ {
540
+ label: N("devportal.checkCategory", "Category selected"),
541
+ ok: !!J.category
542
+ },
543
+ {
544
+ label: N("devportal.checkVisibility", "Visibility set to Public or Unlisted"),
545
+ ok: !!J.visibility && J.visibility !== "PRIVATE"
546
+ },
547
+ {
548
+ label: N("devportal.checkSaved", "All changes saved"),
549
+ ok: !H
550
+ },
551
+ ...q?.appType === "NODE" || q?.appType === "WORKFLOW" ? [{
552
+ label: N("devportal.checkVersion", "At least one version uploaded"),
553
+ ok: (W?.application?.versions?.totalCount ?? 0) > 0
554
+ }] : []
555
+ ].map((e) => /* @__PURE__ */ D("div", {
556
+ className: "flex items-center gap-2 text-sm",
557
+ children: [e.ok ? /* @__PURE__ */ E("span", {
558
+ className: "text-status-success-text",
559
+ children: "✓"
560
+ }) : /* @__PURE__ */ E("span", {
561
+ className: "text-status-error-text",
562
+ children: "✗"
563
+ }), /* @__PURE__ */ E("span", {
564
+ className: e.ok ? "text-text-secondary line-through" : "text-text-primary",
565
+ children: e.label
566
+ })]
567
+ }, e.label))]
568
+ }),
569
+ /* @__PURE__ */ D("div", {
465
570
  className: "flex flex-col gap-4 border-t pt-6",
466
- children: [/* @__PURE__ */ O("div", {
467
- className: "flex items-center justify-between",
468
- children: [/* @__PURE__ */ D("div", {
469
- className: "flex items-center gap-2",
470
- children: we && /* @__PURE__ */ O("button", {
471
- type: "button",
472
- onClick: Ce,
473
- disabled: F || W,
474
- className: "inline-flex items-center gap-2 rounded-md border border-primary bg-action-primary-bg/10 px-4 py-2 text-sm font-medium text-primary hover:bg-action-primary-bg/20 transition-colors disabled:opacity-50",
475
- children: [/* @__PURE__ */ D(oe, { size: 16 }), P("devportal.submitForReview", "Submit for Review")]
476
- })
477
- }), /* @__PURE__ */ D("button", {
571
+ children: [/* @__PURE__ */ E("div", {
572
+ className: "flex items-center justify-end",
573
+ children: /* @__PURE__ */ E("button", {
478
574
  type: "submit",
479
- disabled: F || !W || !M,
480
- "aria-disabled": !M,
575
+ disabled: P || !H || !j,
576
+ "aria-disabled": !j,
481
577
  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",
482
- 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")] })
483
- })]
484
- }), /* @__PURE__ */ O("div", {
578
+ 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(w, { size: 16 }), N("devportal.saveChanges", "Save Changes")] })
579
+ })
580
+ }), /* @__PURE__ */ D("div", {
485
581
  className: "rounded-lg border border-border-subtle bg-status-error-bg-subtle p-4",
486
582
  children: [
487
- /* @__PURE__ */ D("h3", {
583
+ /* @__PURE__ */ E("h3", {
488
584
  className: "text-sm font-medium text-status-error-text",
489
- children: P("devportal.dangerZone", "Danger Zone")
585
+ children: N("devportal.dangerZone", "Danger Zone")
490
586
  }),
491
- /* @__PURE__ */ D("p", {
587
+ /* @__PURE__ */ E("p", {
492
588
  className: "mt-1 text-sm text-status-error-text",
493
- children: P("devportal.dangerZoneWarning", "These actions are irreversible. Please proceed with caution.")
589
+ children: N("devportal.dangerZoneWarning", "These actions are irreversible. Please proceed with caution.")
494
590
  }),
495
- /* @__PURE__ */ O("div", {
591
+ /* @__PURE__ */ D("div", {
496
592
  className: "mt-4 flex gap-3",
497
593
  children: [
498
- Te && /* @__PURE__ */ O("button", {
594
+ Oe && /* @__PURE__ */ D("button", {
499
595
  type: "button",
500
- onClick: () => H(!0),
596
+ onClick: () => B(!0),
501
597
  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",
502
- children: [/* @__PURE__ */ D(T, { size: 14 }), P("devportal.deprecateApp", "Deprecate App")]
598
+ children: [/* @__PURE__ */ E(x, { size: 14 }), N("devportal.deprecateApp", "Deprecate App")]
503
599
  }),
504
- Ee && /* @__PURE__ */ O("button", {
600
+ ke && /* @__PURE__ */ D("button", {
505
601
  type: "button",
506
- onClick: () => U(!0),
602
+ onClick: () => V(!0),
507
603
  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",
508
- children: [/* @__PURE__ */ D(ie, { size: 14 }), P("devportal.deactivateApp", "Deactivate App")]
604
+ children: [/* @__PURE__ */ E(C, { size: 14 }), N("devportal.deactivateApp", "Deactivate App")]
509
605
  }),
510
- /* @__PURE__ */ O("button", {
606
+ /* @__PURE__ */ D("button", {
511
607
  type: "button",
512
- onClick: () => B(!0),
513
- disabled: !N,
514
- "aria-disabled": !N,
608
+ onClick: () => z(!0),
609
+ disabled: !M,
610
+ "aria-disabled": !M,
515
611
  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",
516
- children: [/* @__PURE__ */ D(se, { size: 14 }), P("devportal.deleteApp", "Delete App")]
612
+ children: [/* @__PURE__ */ E(le, { size: 14 }), N("devportal.deleteApp", "Delete App")]
517
613
  })
518
614
  ]
519
615
  })
@@ -522,38 +618,38 @@ var k = () => {
522
618
  })
523
619
  ]
524
620
  }),
525
- /* @__PURE__ */ D(h, {
526
- open: z,
527
- onOpenChange: B,
528
- title: P("devportal.deleteApplication", "Delete Application"),
529
- 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.`),
530
- confirmLabel: P("devportal.deleteApplication", "Delete Application"),
621
+ /* @__PURE__ */ E(h, {
622
+ open: R,
623
+ onOpenChange: z,
624
+ title: N("devportal.deleteApplication", "Delete Application"),
625
+ description: N("devportal.deleteApplicationConfirm", `Are you sure you want to delete "${q.name}"? This action cannot be undone. All OAuth clients, API keys, webhooks, and analytics data will be permanently deleted.`),
626
+ confirmLabel: N("devportal.deleteApplication", "Delete Application"),
531
627
  variant: "destructive",
532
- onConfirm: be
628
+ onConfirm: we
533
629
  }),
534
- /* @__PURE__ */ D(h, {
535
- open: V,
536
- onOpenChange: H,
537
- title: P("devportal.deprecateApplication", "Deprecate Application"),
538
- 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.`),
539
- confirmLabel: P("devportal.deprecateApplication", "Deprecate Application"),
630
+ /* @__PURE__ */ E(h, {
631
+ open: ge,
632
+ onOpenChange: B,
633
+ title: N("devportal.deprecateApplication", "Deprecate Application"),
634
+ description: N("devportal.deprecateApplicationConfirm", `Are you sure you want to deprecate "${q.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.`),
635
+ confirmLabel: N("devportal.deprecateApplication", "Deprecate Application"),
540
636
  variant: "warning",
541
- onConfirm: xe
637
+ onConfirm: Te
542
638
  }),
543
- /* @__PURE__ */ D(h, {
544
- open: pe,
545
- onOpenChange: U,
546
- title: P("devportal.deactivateApplication", "Deactivate Application"),
547
- 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.`),
548
- confirmLabel: P("devportal.deactivateApplication", "Deactivate Application"),
639
+ /* @__PURE__ */ E(h, {
640
+ open: _e,
641
+ onOpenChange: V,
642
+ title: N("devportal.deactivateApplication", "Deactivate Application"),
643
+ description: N("devportal.deactivateApplicationConfirm", `Are you sure you want to deactivate "${q.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.`),
644
+ confirmLabel: N("devportal.deactivateApplication", "Deactivate Application"),
549
645
  variant: "destructive",
550
- onConfirm: Se
646
+ onConfirm: Ee
551
647
  })
552
648
  ]
553
649
  })
554
650
  });
555
651
  };
556
652
  //#endregion
557
- export { k as EditApplicationPage };
653
+ export { O as EditApplicationPage };
558
654
 
559
655
  //# sourceMappingURL=EditApplicationPage.js.map