@burdenoff/microfe-devportal 2026.611.2 → 2026.616.1

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 (51) hide show
  1. package/dist/devportal/components/SectionNav.js +105 -41
  2. package/dist/devportal/components/SectionNav.js.map +1 -1
  3. package/dist/devportal/hooks/useGraphQL.js +1 -1
  4. package/dist/devportal/pages/AdminReviewPage.js +36 -36
  5. package/dist/devportal/pages/AnalyticsDashboardPage.js +150 -150
  6. package/dist/devportal/pages/AnalyticsDashboardPage.js.map +1 -1
  7. package/dist/devportal/pages/ApiKeysPage.js +184 -172
  8. package/dist/devportal/pages/ApiKeysPage.js.map +1 -1
  9. package/dist/devportal/pages/AppLogsPage.js +9 -9
  10. package/dist/devportal/pages/ApplicationDetailPage.js +414 -414
  11. package/dist/devportal/pages/ApplicationDetailPage.js.map +1 -1
  12. package/dist/devportal/pages/ApplicationVersionsPage.js +44 -44
  13. package/dist/devportal/pages/ApplicationVersionsPage.js.map +1 -1
  14. package/dist/devportal/pages/ApplicationsPage.js +118 -118
  15. package/dist/devportal/pages/ApplicationsPage.js.map +1 -1
  16. package/dist/devportal/pages/CreateApiKeyPage.js +20 -20
  17. package/dist/devportal/pages/CreateApplicationPage.js +46 -66
  18. package/dist/devportal/pages/CreateApplicationPage.js.map +1 -1
  19. package/dist/devportal/pages/CreateOAuthClientPage.js +20 -20
  20. package/dist/devportal/pages/CreateOrganizationPage.js +125 -442
  21. package/dist/devportal/pages/CreateOrganizationPage.js.map +1 -1
  22. package/dist/devportal/pages/CreateWebhookPage.js +25 -25
  23. package/dist/devportal/pages/DashboardPage.js +160 -145
  24. package/dist/devportal/pages/DashboardPage.js.map +1 -1
  25. package/dist/devportal/pages/DelegationsPage.js +22 -22
  26. package/dist/devportal/pages/EditApplicationPage.js +297 -317
  27. package/dist/devportal/pages/EditApplicationPage.js.map +1 -1
  28. package/dist/devportal/pages/ListingPreviewPage.js +9 -9
  29. package/dist/devportal/pages/OAuthClientDetailPage.js +17 -17
  30. package/dist/devportal/pages/OAuthClientsPage.js +16 -16
  31. package/dist/devportal/pages/OrganizationDetailPage.js +78 -78
  32. package/dist/devportal/pages/OrganizationMembersPage.js +260 -260
  33. package/dist/devportal/pages/OrganizationMembersPage.js.map +1 -1
  34. package/dist/devportal/pages/OrganizationsPage.js +18 -18
  35. package/dist/devportal/pages/PublishPage.js +16 -16
  36. package/dist/devportal/pages/PublisherProfilePage.js +156 -146
  37. package/dist/devportal/pages/PublisherProfilePage.js.map +1 -1
  38. package/dist/devportal/pages/RevenueDashboardPage.js +512 -362
  39. package/dist/devportal/pages/RevenueDashboardPage.js.map +1 -1
  40. package/dist/devportal/pages/SettingsPage.js +17 -17
  41. package/dist/devportal/pages/SetupPage.js +99 -99
  42. package/dist/devportal/pages/SetupPage.js.map +1 -1
  43. package/dist/devportal/pages/WebhookDetailPage.js +143 -143
  44. package/dist/devportal/pages/WebhookDetailPage.js.map +1 -1
  45. package/dist/devportal/pages/WebhooksPage.js +140 -140
  46. package/dist/devportal/pages/WebhooksPage.js.map +1 -1
  47. package/dist/devportal/providers/DevportalProvider.js +46 -33
  48. package/dist/devportal/providers/DevportalProvider.js.map +1 -1
  49. package/dist/generated/global-operations.js +69 -55
  50. package/dist/generated/global-operations.js.map +1 -1
  51. package/package.json +1 -1
@@ -1,24 +1,24 @@
1
1
  import { useDevportal as e } from "../providers/DevportalProvider.js";
2
2
  import { cn as t } from "../utils/cn.js";
3
3
  import { EmptyState as n } from "../components/EmptyState.js";
4
- import { PageLayout as r } from "../components/PageLayout.js";
5
- import { StatusBadge as i } from "../components/StatusBadge.js";
6
- import { AppListItem as a } from "../components/AppCard.js";
7
- import { DataTable as o } from "../components/DataTable.js";
8
- import { useGetApplicationQuery as s, useGetApplicationsQuery as c, useGetWebhooksQuery as l } from "../../generated/global-operations.js";
4
+ import { useGetApplicationQuery as r, useGetApplicationsQuery as i, useGetWebhooksQuery as a } from "../../generated/global-operations.js";
5
+ import { getErrorMessage as o } from "../hooks/useGraphQL.js";
6
+ import { PageLayout as s } from "../components/PageLayout.js";
7
+ import { StatusBadge as c } from "../components/StatusBadge.js";
8
+ import { AppListItem as l } from "../components/AppCard.js";
9
+ import { DataTable as ee } from "../components/DataTable.js";
9
10
  import { PermissionGuard as u } from "../components/PermissionGuard.js";
10
11
  import "../components/index.js";
11
12
  import { DEVPORTAL_PERMISSIONS as d } from "../constants/permissions.js";
12
- import { getErrorMessage as f } from "../hooks/useGraphQL.js";
13
- import { useDevportalPermission as p } from "../hooks/usePermission.js";
13
+ import { useDevportalPermission as f } from "../hooks/usePermission.js";
14
14
  import "../hooks/index.js";
15
- import { useEffect as m, useState as h } from "react";
16
- import { useI18n as g } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
17
- import { AlertCircle as _, AlertTriangle as v, AppWindow as y, CheckCircle as b, Loader2 as x, PauseCircle as S, Plus as C, Search as w, Webhook as T, XCircle as E } from "lucide-react";
18
- import { useParams as D } from "react-router-dom";
19
- import { jsx as O, jsxs as k } from "react/jsx-runtime";
15
+ import { useEffect as te, useState as p } from "react";
16
+ import { useI18n as m } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
17
+ import { AlertCircle as h, AlertTriangle as g, AppWindow as _, CheckCircle as v, Loader2 as y, PauseCircle as b, Plus as x, Search as S, Webhook as C, XCircle as w } from "lucide-react";
18
+ import { useParams as T } from "react-router-dom";
19
+ import { jsx as E, jsxs as D } from "react/jsx-runtime";
20
20
  //#region src/devportal/pages/WebhooksPage.tsx
21
- function A(e) {
21
+ function O(e) {
22
22
  return {
23
23
  id: e.id,
24
24
  applicationId: e.applicationId,
@@ -42,84 +42,84 @@ function A(e) {
42
42
  updatedAt: e.updatedAt
43
43
  };
44
44
  }
45
- var j = () => {
46
- let { appId: j } = D(), { navigate: ee, basePath: te } = e(), { t: N } = g(), P = (e, t) => {
47
- let n = N(e);
45
+ var k = () => {
46
+ let { appId: k } = T(), { navigate: j, basePath: M, activeOrgId: N } = e(), { t: ne } = m(), P = (e, t) => {
47
+ let n = ne(e);
48
48
  return n === e ? t : n;
49
- }, F = p(d.WEBHOOK_CREATE), [I, L] = h(""), [R, z] = h(""), { data: B } = s({
50
- variables: { id: j ?? "" },
51
- skip: !j,
49
+ }, F = f(d.WEBHOOK_CREATE), [I, L] = p(""), [R, z] = p(""), { data: B } = r({
50
+ variables: { id: k ?? "" },
51
+ skip: !k,
52
52
  fetchPolicy: "cache-first"
53
53
  });
54
- m(() => {
54
+ te(() => {
55
55
  let e = B?.application?.name;
56
- if (!j || !e) return;
56
+ if (!k || !e) return;
57
57
  let t = window.__breadcrumbRegistry;
58
- return t?.register(j, e), () => t?.unregister(j);
59
- }, [j, B?.application?.name]);
60
- let { data: V, loading: H, error: U, refetch: W } = c({
58
+ return t?.register(k, e), () => t?.unregister(k);
59
+ }, [k, B?.application?.name]);
60
+ let { data: V, loading: H, error: U, refetch: W } = i({
61
61
  variables: { limit: 100 },
62
- skip: !!j,
62
+ skip: !!k,
63
63
  fetchPolicy: "cache-and-network"
64
- }), { data: G, loading: K, error: q, refetch: J } = l({
65
- variables: { applicationId: j || "" },
66
- skip: !j,
64
+ }), { data: G, loading: K, error: q, refetch: J } = a({
65
+ variables: { applicationId: k || "" },
66
+ skip: !k,
67
67
  fetchPolicy: "cache-and-network"
68
- }), Y = G?.webhooks?.map(A) ?? [], X = V?.applications?.edges?.map((e) => e.node) ?? [], Z = (e) => {
69
- ee?.(`${te}${e}`);
68
+ }), Y = G?.webhooks?.map(O) ?? [], X = V?.applications?.edges?.map((e) => e.node) ?? [], re = N ? X.filter((e) => e.developerOrganizationId === N) : X, Z = (e) => {
69
+ j?.(`${M}${e}`);
70
70
  }, Q = Y.filter((e) => {
71
71
  let t = !I || e.name.toLowerCase().includes(I.toLowerCase()) || e.url.toLowerCase().includes(I.toLowerCase()), n = !R || e.status === R;
72
72
  return t && n;
73
- }), ne = (e) => {
73
+ }), ie = (e) => {
74
74
  switch (e) {
75
- case "ACTIVE": return /* @__PURE__ */ O(b, {
75
+ case "ACTIVE": return /* @__PURE__ */ E(v, {
76
76
  size: 16,
77
77
  className: "text-status-success-text"
78
78
  });
79
- case "PAUSED": return /* @__PURE__ */ O(S, {
79
+ case "PAUSED": return /* @__PURE__ */ E(b, {
80
80
  size: 16,
81
81
  className: "text-status-warning-text"
82
82
  });
83
- case "FAILED": return /* @__PURE__ */ O(E, {
83
+ case "FAILED": return /* @__PURE__ */ E(w, {
84
84
  size: 16,
85
85
  className: "text-status-error-text"
86
86
  });
87
- case "DISABLED": return /* @__PURE__ */ O(v, {
87
+ case "DISABLED": return /* @__PURE__ */ E(g, {
88
88
  size: 16,
89
89
  className: "text-text-tertiary"
90
90
  });
91
91
  default: return null;
92
92
  }
93
- }, re = (e) => {
93
+ }, ae = (e) => {
94
94
  let t = e.successCount + e.failureCount;
95
95
  return t === 0 ? 100 : Math.round(e.successCount / t * 100);
96
96
  };
97
- if (!j) {
98
- let e = X.filter((e) => {
97
+ if (!k) {
98
+ let e = re.filter((e) => {
99
99
  if (!I) return !0;
100
100
  let t = I.toLowerCase();
101
101
  return e.name.toLowerCase().includes(t) || (e.slug ?? "").toLowerCase().includes(t);
102
102
  });
103
- return /* @__PURE__ */ O(u, {
103
+ return /* @__PURE__ */ E(u, {
104
104
  permission: d.WEBHOOK_READ,
105
- children: /* @__PURE__ */ O(r, {
105
+ children: /* @__PURE__ */ E(s, {
106
106
  title: P("devportal.webhooks", "Webhooks"),
107
107
  description: P("devportal.manageWebhooksApps", "Manage webhooks for your applications"),
108
- children: /* @__PURE__ */ k("div", {
108
+ children: /* @__PURE__ */ D("div", {
109
109
  className: "space-y-4",
110
110
  children: [
111
- /* @__PURE__ */ O("p", {
111
+ /* @__PURE__ */ E("p", {
112
112
  className: "text-sm text-muted-foreground",
113
113
  children: P("devportal.webhooksSelectAppHint", "Select an application below to view and manage its webhooks.")
114
114
  }),
115
- /* @__PURE__ */ O("div", {
115
+ /* @__PURE__ */ E("div", {
116
116
  className: "max-w-md",
117
- children: /* @__PURE__ */ k("div", {
117
+ children: /* @__PURE__ */ D("div", {
118
118
  className: "relative",
119
- children: [/* @__PURE__ */ O(w, {
119
+ children: [/* @__PURE__ */ E(S, {
120
120
  size: 16,
121
121
  className: "absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground"
122
- }), /* @__PURE__ */ O("input", {
122
+ }), /* @__PURE__ */ E("input", {
123
123
  type: "text",
124
124
  placeholder: "Search applications...",
125
125
  value: I,
@@ -128,41 +128,41 @@ var j = () => {
128
128
  })]
129
129
  })
130
130
  }),
131
- H ? /* @__PURE__ */ O("div", {
131
+ H ? /* @__PURE__ */ E("div", {
132
132
  className: "flex items-center justify-center py-12 text-muted-foreground",
133
- children: /* @__PURE__ */ O(x, { className: "h-8 w-8 animate-spin" })
134
- }) : U ? /* @__PURE__ */ k("div", {
133
+ children: /* @__PURE__ */ E(y, { className: "h-8 w-8 animate-spin" })
134
+ }) : U ? /* @__PURE__ */ D("div", {
135
135
  className: "rounded-lg border border-destructive/50 bg-destructive/10 p-6 text-center",
136
136
  children: [
137
- /* @__PURE__ */ O(_, { className: "mx-auto h-8 w-8 text-destructive" }),
138
- /* @__PURE__ */ O("h3", {
137
+ /* @__PURE__ */ E(h, { className: "mx-auto h-8 w-8 text-destructive" }),
138
+ /* @__PURE__ */ E("h3", {
139
139
  className: "mt-2 font-medium text-destructive",
140
140
  children: "Failed to load applications"
141
141
  }),
142
- /* @__PURE__ */ O("p", {
142
+ /* @__PURE__ */ E("p", {
143
143
  className: "mt-1 text-sm text-muted-foreground",
144
- children: f(U)
144
+ children: o(U)
145
145
  }),
146
- /* @__PURE__ */ O("button", {
146
+ /* @__PURE__ */ E("button", {
147
147
  onClick: () => W(),
148
148
  className: "mt-4 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90",
149
149
  children: "Try Again"
150
150
  })
151
151
  ]
152
- }) : e.length > 0 ? /* @__PURE__ */ O("div", {
152
+ }) : e.length > 0 ? /* @__PURE__ */ E("div", {
153
153
  className: "space-y-2",
154
- children: e.map((e) => /* @__PURE__ */ O(a, {
154
+ children: e.map((e) => /* @__PURE__ */ E(l, {
155
155
  app: e,
156
156
  onClick: () => Z(`/apps/${e.id}/webhooks`)
157
157
  }, e.id))
158
- }) : /* @__PURE__ */ O(n, {
159
- icon: /* @__PURE__ */ O(y, { size: 32 }),
158
+ }) : /* @__PURE__ */ E(n, {
159
+ icon: /* @__PURE__ */ E(_, { size: 32 }),
160
160
  title: "No applications available",
161
161
  description: I ? "No applications matched your search." : "Create an application before configuring webhooks.",
162
- action: /* @__PURE__ */ k("button", {
162
+ action: /* @__PURE__ */ D("button", {
163
163
  onClick: () => Z("/apps/new"),
164
164
  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",
165
- children: [/* @__PURE__ */ O(C, { size: 16 }), "Create Application"]
165
+ children: [/* @__PURE__ */ E(x, { size: 16 }), "Create Application"]
166
166
  })
167
167
  })
168
168
  ]
@@ -170,37 +170,37 @@ var j = () => {
170
170
  })
171
171
  });
172
172
  }
173
- if (K && !G) return /* @__PURE__ */ O(r, {
173
+ if (K && !G) return /* @__PURE__ */ E(s, {
174
174
  title: P("devportal.webhooks", "Webhooks"),
175
175
  description: P("devportal.manageWebhooksApp", "Manage webhooks for this application"),
176
- backLink: `/apps/${j}`,
176
+ backLink: `/apps/${k}`,
177
177
  backLabel: P("devportal.backToApplication", "Back to Application"),
178
- children: /* @__PURE__ */ k("div", {
178
+ children: /* @__PURE__ */ D("div", {
179
179
  className: "flex items-center justify-center py-12",
180
- children: [/* @__PURE__ */ O(x, { className: "h-8 w-8 animate-spin text-muted-foreground" }), /* @__PURE__ */ O("span", {
180
+ children: [/* @__PURE__ */ E(y, { className: "h-8 w-8 animate-spin text-muted-foreground" }), /* @__PURE__ */ E("span", {
181
181
  className: "ml-2 text-muted-foreground",
182
182
  children: P("devportal.loadingWebhooks", "Loading webhooks...")
183
183
  })]
184
184
  })
185
185
  });
186
- if (q) return /* @__PURE__ */ O(r, {
186
+ if (q) return /* @__PURE__ */ E(s, {
187
187
  title: P("devportal.webhooks", "Webhooks"),
188
188
  description: P("devportal.manageWebhooksApp", "Manage webhooks for this application"),
189
- backLink: `/apps/${j}`,
189
+ backLink: `/apps/${k}`,
190
190
  backLabel: P("devportal.backToApplication", "Back to Application"),
191
- children: /* @__PURE__ */ k("div", {
191
+ children: /* @__PURE__ */ D("div", {
192
192
  className: "rounded-lg border border-destructive/50 bg-destructive/10 p-6 text-center",
193
193
  children: [
194
- /* @__PURE__ */ O(_, { className: "mx-auto h-8 w-8 text-destructive" }),
195
- /* @__PURE__ */ O("h3", {
194
+ /* @__PURE__ */ E(h, { className: "mx-auto h-8 w-8 text-destructive" }),
195
+ /* @__PURE__ */ E("h3", {
196
196
  className: "mt-2 font-medium text-destructive",
197
197
  children: P("devportal.failedToLoadWebhooks", "Failed to load webhooks")
198
198
  }),
199
- /* @__PURE__ */ O("p", {
199
+ /* @__PURE__ */ E("p", {
200
200
  className: "mt-1 text-sm text-muted-foreground",
201
- children: f(q)
201
+ children: o(q)
202
202
  }),
203
- /* @__PURE__ */ O("button", {
203
+ /* @__PURE__ */ E("button", {
204
204
  onClick: () => J(),
205
205
  className: "mt-4 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90",
206
206
  children: P("devportal.tryAgain", "Try Again")
@@ -208,19 +208,19 @@ var j = () => {
208
208
  ]
209
209
  })
210
210
  });
211
- let ie = [
211
+ let oe = [
212
212
  {
213
213
  key: "name",
214
214
  header: "Webhook",
215
- render: (e) => /* @__PURE__ */ k("div", {
215
+ render: (e) => /* @__PURE__ */ D("div", {
216
216
  className: "flex items-center gap-3",
217
- children: [/* @__PURE__ */ O("div", {
217
+ children: [/* @__PURE__ */ E("div", {
218
218
  className: t("flex h-10 w-10 items-center justify-center rounded-lg", e.status === "ACTIVE" ? "bg-status-success-bg-subtle text-status-success-text" : e.status === "FAILED" ? "bg-status-error-bg-subtle text-status-error-text" : e.status === "PAUSED" ? "bg-status-warning-bg-subtle text-status-warning-text" : "bg-bg-sunken text-text-tertiary"),
219
- children: /* @__PURE__ */ O(T, { size: 20 })
220
- }), /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("p", {
219
+ children: /* @__PURE__ */ E(C, { size: 20 })
220
+ }), /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("p", {
221
221
  className: "font-medium",
222
222
  children: e.name
223
- }), /* @__PURE__ */ O("p", {
223
+ }), /* @__PURE__ */ E("p", {
224
224
  className: "text-xs text-muted-foreground truncate max-w-xs",
225
225
  children: e.url
226
226
  })] })]
@@ -229,12 +229,12 @@ var j = () => {
229
229
  {
230
230
  key: "events",
231
231
  header: "Events",
232
- render: (e) => /* @__PURE__ */ k("div", {
232
+ render: (e) => /* @__PURE__ */ D("div", {
233
233
  className: "flex flex-wrap gap-1",
234
- children: [e.events.slice(0, 2).map((e) => /* @__PURE__ */ O("span", {
234
+ children: [e.events.slice(0, 2).map((e) => /* @__PURE__ */ E("span", {
235
235
  className: "inline-flex rounded bg-muted px-1.5 py-0.5 text-xs",
236
236
  children: e.split(".")[0]
237
- }, e)), e.events.length > 2 && /* @__PURE__ */ k("span", {
237
+ }, e)), e.events.length > 2 && /* @__PURE__ */ D("span", {
238
238
  className: "text-xs text-muted-foreground",
239
239
  children: [
240
240
  "+",
@@ -247,9 +247,9 @@ var j = () => {
247
247
  {
248
248
  key: "status",
249
249
  header: "Status",
250
- render: (e) => /* @__PURE__ */ k("div", {
250
+ render: (e) => /* @__PURE__ */ D("div", {
251
251
  className: "flex items-center gap-2",
252
- children: [ne(e.status), /* @__PURE__ */ O(i, {
252
+ children: [ie(e.status), /* @__PURE__ */ E(c, {
253
253
  status: e.status,
254
254
  type: "webhook"
255
255
  })]
@@ -259,18 +259,18 @@ var j = () => {
259
259
  key: "successRate",
260
260
  header: "Success Rate",
261
261
  render: (e) => {
262
- let n = re(e);
263
- return /* @__PURE__ */ k("div", {
262
+ let n = ae(e);
263
+ return /* @__PURE__ */ D("div", {
264
264
  className: "w-24",
265
- children: [/* @__PURE__ */ O("div", {
265
+ children: [/* @__PURE__ */ E("div", {
266
266
  className: "flex items-center justify-between text-xs mb-1",
267
- children: /* @__PURE__ */ k("span", {
267
+ children: /* @__PURE__ */ D("span", {
268
268
  className: t(n >= 95 ? "text-status-success-text" : n >= 80 ? "text-status-warning-text" : "text-status-error-text"),
269
269
  children: [n, "%"]
270
270
  })
271
- }), /* @__PURE__ */ O("div", {
271
+ }), /* @__PURE__ */ E("div", {
272
272
  className: "h-1.5 rounded-full bg-muted",
273
- children: /* @__PURE__ */ O("div", {
273
+ children: /* @__PURE__ */ E("div", {
274
274
  className: t("h-full rounded-full transition-all", n >= 95 ? "bg-status-success-bg-subtle" : n >= 80 ? "bg-status-warning-bg-subtle" : "bg-status-error-bg-subtle"),
275
275
  style: { width: `${n}%` }
276
276
  })
@@ -281,18 +281,18 @@ var j = () => {
281
281
  {
282
282
  key: "deliveries",
283
283
  header: "Deliveries",
284
- render: (e) => /* @__PURE__ */ k("div", {
284
+ render: (e) => /* @__PURE__ */ D("div", {
285
285
  className: "text-sm",
286
286
  children: [
287
- /* @__PURE__ */ O("span", {
287
+ /* @__PURE__ */ E("span", {
288
288
  className: "text-status-success-text",
289
289
  children: e.successCount.toLocaleString()
290
290
  }),
291
- /* @__PURE__ */ O("span", {
291
+ /* @__PURE__ */ E("span", {
292
292
  className: "text-muted-foreground",
293
293
  children: " / "
294
294
  }),
295
- /* @__PURE__ */ O("span", {
295
+ /* @__PURE__ */ E("span", {
296
296
  className: "text-status-error-text",
297
297
  children: e.failureCount.toLocaleString()
298
298
  })
@@ -302,9 +302,9 @@ var j = () => {
302
302
  {
303
303
  key: "lastTriggered",
304
304
  header: "Last Triggered",
305
- render: (e) => /* @__PURE__ */ O("span", {
305
+ render: (e) => /* @__PURE__ */ E("span", {
306
306
  className: "text-sm text-muted-foreground",
307
- children: e.lastTriggeredAt ? M(e.lastTriggeredAt) : "Never"
307
+ children: e.lastTriggeredAt ? A(e.lastTriggeredAt) : "Never"
308
308
  })
309
309
  }
310
310
  ], $ = {
@@ -313,63 +313,63 @@ var j = () => {
313
313
  failed: Y.filter((e) => e.status === "FAILED").length,
314
314
  paused: Y.filter((e) => e.status === "PAUSED").length
315
315
  };
316
- return /* @__PURE__ */ O(u, {
316
+ return /* @__PURE__ */ E(u, {
317
317
  permission: d.WEBHOOK_READ,
318
- children: /* @__PURE__ */ k(r, {
318
+ children: /* @__PURE__ */ D(s, {
319
319
  title: P("devportal.webhooks", "Webhooks"),
320
320
  description: P("devportal.manageWebhooksApp", "Manage webhooks for this application"),
321
- backLink: `/apps/${j}`,
321
+ backLink: `/apps/${k}`,
322
322
  backLabel: P("devportal.backToApplication", "Back to Application"),
323
- actions: /* @__PURE__ */ k("button", {
324
- onClick: () => Z(`/apps/${j}/webhooks/new`),
323
+ actions: /* @__PURE__ */ D("button", {
324
+ onClick: () => Z(`/apps/${k}/webhooks/new`),
325
325
  disabled: !F.allowed,
326
326
  "aria-disabled": !F.allowed,
327
327
  title: F.allowed ? void 0 : P("devportal.common.noPermission", "You do not have permission to perform this action"),
328
328
  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 disabled:cursor-not-allowed focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary",
329
- children: [/* @__PURE__ */ O(C, {
329
+ children: [/* @__PURE__ */ E(x, {
330
330
  size: 16,
331
331
  "aria-hidden": "true"
332
332
  }), P("devportal.createWebhook", "Create Webhook")]
333
333
  }),
334
334
  children: [
335
- /* @__PURE__ */ O("div", {
335
+ /* @__PURE__ */ E("div", {
336
336
  className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
337
- children: /* @__PURE__ */ k("div", {
337
+ children: /* @__PURE__ */ D("div", {
338
338
  className: "flex flex-1 items-center gap-4",
339
- children: [/* @__PURE__ */ k("div", {
339
+ children: [/* @__PURE__ */ D("div", {
340
340
  className: "relative flex-1 max-w-md",
341
- children: [/* @__PURE__ */ O(w, {
341
+ children: [/* @__PURE__ */ E(S, {
342
342
  size: 16,
343
343
  className: "absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground"
344
- }), /* @__PURE__ */ O("input", {
344
+ }), /* @__PURE__ */ E("input", {
345
345
  type: "text",
346
346
  placeholder: "Search by name or URL...",
347
347
  value: I,
348
348
  onChange: (e) => L(e.target.value),
349
349
  className: "w-full rounded-md border bg-background pl-9 pr-4 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-primary"
350
350
  })]
351
- }), /* @__PURE__ */ k("select", {
351
+ }), /* @__PURE__ */ D("select", {
352
352
  value: R,
353
353
  onChange: (e) => z(e.target.value),
354
354
  className: "rounded-md border bg-background px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-primary",
355
355
  children: [
356
- /* @__PURE__ */ O("option", {
356
+ /* @__PURE__ */ E("option", {
357
357
  value: "",
358
358
  children: "All Status"
359
359
  }),
360
- /* @__PURE__ */ O("option", {
360
+ /* @__PURE__ */ E("option", {
361
361
  value: "ACTIVE",
362
362
  children: "Active"
363
363
  }),
364
- /* @__PURE__ */ O("option", {
364
+ /* @__PURE__ */ E("option", {
365
365
  value: "PAUSED",
366
366
  children: "Paused"
367
367
  }),
368
- /* @__PURE__ */ O("option", {
368
+ /* @__PURE__ */ E("option", {
369
369
  value: "FAILED",
370
370
  children: "Failed"
371
371
  }),
372
- /* @__PURE__ */ O("option", {
372
+ /* @__PURE__ */ E("option", {
373
373
  value: "DISABLED",
374
374
  children: "Disabled"
375
375
  })
@@ -377,64 +377,64 @@ var j = () => {
377
377
  })]
378
378
  })
379
379
  }),
380
- /* @__PURE__ */ k("div", {
380
+ /* @__PURE__ */ D("div", {
381
381
  className: "grid grid-cols-2 gap-4 sm:grid-cols-4",
382
382
  children: [
383
- /* @__PURE__ */ k("div", {
383
+ /* @__PURE__ */ D("div", {
384
384
  className: "rounded-lg border bg-card p-4",
385
- children: [/* @__PURE__ */ k("div", {
385
+ children: [/* @__PURE__ */ D("div", {
386
386
  className: "flex items-center gap-2 text-muted-foreground",
387
- children: [/* @__PURE__ */ O(T, { size: 16 }), /* @__PURE__ */ O("span", {
387
+ children: [/* @__PURE__ */ E(C, { size: 16 }), /* @__PURE__ */ E("span", {
388
388
  className: "text-sm",
389
389
  children: "Total Webhooks"
390
390
  })]
391
- }), /* @__PURE__ */ O("p", {
391
+ }), /* @__PURE__ */ E("p", {
392
392
  className: "mt-1 text-2xl font-semibold",
393
393
  children: $.total
394
394
  })]
395
395
  }),
396
- /* @__PURE__ */ k("div", {
396
+ /* @__PURE__ */ D("div", {
397
397
  className: "rounded-lg border bg-card p-4",
398
- children: [/* @__PURE__ */ k("div", {
398
+ children: [/* @__PURE__ */ D("div", {
399
399
  className: "flex items-center gap-2 text-status-success-text",
400
- children: [/* @__PURE__ */ O(b, { size: 16 }), /* @__PURE__ */ O("span", {
400
+ children: [/* @__PURE__ */ E(v, { size: 16 }), /* @__PURE__ */ E("span", {
401
401
  className: "text-sm",
402
402
  children: "Active"
403
403
  })]
404
- }), /* @__PURE__ */ O("p", {
404
+ }), /* @__PURE__ */ E("p", {
405
405
  className: "mt-1 text-2xl font-semibold",
406
406
  children: $.active
407
407
  })]
408
408
  }),
409
- /* @__PURE__ */ k("div", {
409
+ /* @__PURE__ */ D("div", {
410
410
  className: "rounded-lg border bg-card p-4",
411
- children: [/* @__PURE__ */ k("div", {
411
+ children: [/* @__PURE__ */ D("div", {
412
412
  className: "flex items-center gap-2 text-status-warning-text",
413
- children: [/* @__PURE__ */ O(S, { size: 16 }), /* @__PURE__ */ O("span", {
413
+ children: [/* @__PURE__ */ E(b, { size: 16 }), /* @__PURE__ */ E("span", {
414
414
  className: "text-sm",
415
415
  children: "Paused"
416
416
  })]
417
- }), /* @__PURE__ */ O("p", {
417
+ }), /* @__PURE__ */ E("p", {
418
418
  className: "mt-1 text-2xl font-semibold",
419
419
  children: $.paused
420
420
  })]
421
421
  }),
422
- /* @__PURE__ */ k("div", {
422
+ /* @__PURE__ */ D("div", {
423
423
  className: "rounded-lg border bg-card p-4",
424
- children: [/* @__PURE__ */ k("div", {
424
+ children: [/* @__PURE__ */ D("div", {
425
425
  className: "flex items-center gap-2 text-status-error-text",
426
- children: [/* @__PURE__ */ O(E, { size: 16 }), /* @__PURE__ */ O("span", {
426
+ children: [/* @__PURE__ */ E(w, { size: 16 }), /* @__PURE__ */ E("span", {
427
427
  className: "text-sm",
428
428
  children: "Failed"
429
429
  })]
430
- }), /* @__PURE__ */ O("p", {
430
+ }), /* @__PURE__ */ E("p", {
431
431
  className: "mt-1 text-2xl font-semibold",
432
432
  children: $.failed
433
433
  })]
434
434
  })
435
435
  ]
436
436
  }),
437
- /* @__PURE__ */ k("p", {
437
+ /* @__PURE__ */ D("p", {
438
438
  className: "text-sm text-muted-foreground",
439
439
  children: [
440
440
  Q.length,
@@ -443,30 +443,30 @@ var j = () => {
443
443
  " found"
444
444
  ]
445
445
  }),
446
- Q.length > 0 ? /* @__PURE__ */ O(o, {
446
+ Q.length > 0 ? /* @__PURE__ */ E(ee, {
447
447
  data: Q,
448
- columns: ie,
448
+ columns: oe,
449
449
  keyField: "id",
450
- onRowClick: (e) => Z(`/apps/${j}/webhooks/${e.id}`)
451
- }) : /* @__PURE__ */ O(n, {
452
- icon: /* @__PURE__ */ O(T, { size: 32 }),
450
+ onRowClick: (e) => Z(`/apps/${k}/webhooks/${e.id}`)
451
+ }) : /* @__PURE__ */ E(n, {
452
+ icon: /* @__PURE__ */ E(C, { size: 32 }),
453
453
  title: P("devportal.noWebhooksFound", "No webhooks found"),
454
454
  description: I || R ? P("devportal.tryAdjustingFilters", "Try adjusting your filters") : P("devportal.createFirstWebhook", "Create your first webhook to receive real-time event notifications"),
455
- action: !I && !R ? /* @__PURE__ */ k("button", {
456
- onClick: () => Z(`/apps/${j}/webhooks/new`),
455
+ action: !I && !R ? /* @__PURE__ */ D("button", {
456
+ onClick: () => Z(`/apps/${k}/webhooks/new`),
457
457
  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",
458
- children: [/* @__PURE__ */ O(C, { size: 16 }), P("devportal.createWebhook", "Create Webhook")]
458
+ children: [/* @__PURE__ */ E(x, { size: 16 }), P("devportal.createWebhook", "Create Webhook")]
459
459
  }) : void 0
460
460
  })
461
461
  ]
462
462
  })
463
463
  });
464
464
  };
465
- function M(e) {
465
+ function A(e) {
466
466
  let t = new Date(e), n = (/* @__PURE__ */ new Date()).getTime() - t.getTime(), r = Math.floor(n / 6e4), i = Math.floor(r / 60), a = Math.floor(i / 24);
467
467
  return r < 1 ? "Just now" : r < 60 ? `${r}m ago` : i < 24 ? `${i}h ago` : a < 7 ? `${a}d ago` : t.toLocaleDateString();
468
468
  }
469
469
  //#endregion
470
- export { j as WebhooksPage };
470
+ export { k as WebhooksPage };
471
471
 
472
472
  //# sourceMappingURL=WebhooksPage.js.map