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