@burdenoff/microfe-devportal 2026.720.2 → 2026.720.4

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