@burdenoff/microfe-devportal 2026.1112.2 → 2026.1113.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/dist/devportal/DevportalRoot.js +65 -119
  2. package/dist/devportal/DevportalRoot.js.map +1 -1
  3. package/dist/devportal/components/AppCard.js +72 -69
  4. package/dist/devportal/components/AppCard.js.map +1 -1
  5. package/dist/devportal/components/DeveloperSettingsHub.d.ts +6 -0
  6. package/dist/devportal/components/DeveloperSettingsHub.js +59 -0
  7. package/dist/devportal/components/DeveloperSettingsHub.js.map +1 -0
  8. package/dist/devportal/components/ImageUploadField.js +82 -80
  9. package/dist/devportal/components/ImageUploadField.js.map +1 -1
  10. package/dist/devportal/components/SectionNav.d.ts +1 -1
  11. package/dist/devportal/components/SectionNav.js +60 -36
  12. package/dist/devportal/components/SectionNav.js.map +1 -1
  13. package/dist/devportal/components/StoreImage.d.ts +15 -0
  14. package/dist/devportal/components/StoreImage.js +30 -0
  15. package/dist/devportal/components/StoreImage.js.map +1 -0
  16. package/dist/devportal/components/index.d.ts +1 -0
  17. package/dist/devportal/components/index.js +17 -16
  18. package/dist/devportal/hooks/usePackageUpload.d.ts +46 -4
  19. package/dist/devportal/hooks/usePackageUpload.js +90 -36
  20. package/dist/devportal/hooks/usePackageUpload.js.map +1 -1
  21. package/dist/devportal/pages/AdminReviewPage.js +205 -202
  22. package/dist/devportal/pages/AdminReviewPage.js.map +1 -1
  23. package/dist/devportal/pages/AnalyticsDashboardPage.js +186 -179
  24. package/dist/devportal/pages/AnalyticsDashboardPage.js.map +1 -1
  25. package/dist/devportal/pages/ApiKeysPage.js +113 -111
  26. package/dist/devportal/pages/ApiKeysPage.js.map +1 -1
  27. package/dist/devportal/pages/AppLogsPage.js +80 -84
  28. package/dist/devportal/pages/AppLogsPage.js.map +1 -1
  29. package/dist/devportal/pages/ApplicationDetailPage.js +529 -504
  30. package/dist/devportal/pages/ApplicationDetailPage.js.map +1 -1
  31. package/dist/devportal/pages/ApplicationsPage.js +186 -183
  32. package/dist/devportal/pages/ApplicationsPage.js.map +1 -1
  33. package/dist/devportal/pages/CreateApiKeyPage.js +163 -166
  34. package/dist/devportal/pages/CreateApiKeyPage.js.map +1 -1
  35. package/dist/devportal/pages/CreateOAuthClientPage.js +134 -130
  36. package/dist/devportal/pages/CreateOAuthClientPage.js.map +1 -1
  37. package/dist/devportal/pages/CreatePhysicalItemPage.js +2 -2
  38. package/dist/devportal/pages/CreatePhysicalItemPage.js.map +1 -1
  39. package/dist/devportal/pages/DelegationsPage.js +11 -11
  40. package/dist/devportal/pages/DocumentationPage.js +100 -94
  41. package/dist/devportal/pages/DocumentationPage.js.map +1 -1
  42. package/dist/devportal/pages/EditApplicationPage.js +379 -377
  43. package/dist/devportal/pages/EditApplicationPage.js.map +1 -1
  44. package/dist/devportal/pages/EditPhysicalItemPage.js +312 -307
  45. package/dist/devportal/pages/EditPhysicalItemPage.js.map +1 -1
  46. package/dist/devportal/pages/InvitationDecisionPage.js +83 -79
  47. package/dist/devportal/pages/InvitationDecisionPage.js.map +1 -1
  48. package/dist/devportal/pages/ListingPreviewPage.js +175 -171
  49. package/dist/devportal/pages/ListingPreviewPage.js.map +1 -1
  50. package/dist/devportal/pages/OAuthClientDetailPage.js +76 -76
  51. package/dist/devportal/pages/OAuthClientDetailPage.js.map +1 -1
  52. package/dist/devportal/pages/OAuthClientsPage.js +126 -124
  53. package/dist/devportal/pages/OAuthClientsPage.js.map +1 -1
  54. package/dist/devportal/pages/OrganizationDetailPage.js +19 -19
  55. package/dist/devportal/pages/OrganizationMembersPage.js +223 -204
  56. package/dist/devportal/pages/OrganizationMembersPage.js.map +1 -1
  57. package/dist/devportal/pages/ResourcesPage.d.ts +6 -0
  58. package/dist/devportal/pages/ResourcesPage.js +171 -155
  59. package/dist/devportal/pages/ResourcesPage.js.map +1 -1
  60. package/dist/devportal/pages/SellerDashboardPage.js +117 -115
  61. package/dist/devportal/pages/SellerDashboardPage.js.map +1 -1
  62. package/dist/devportal/pages/SellerItemsPage.js +202 -199
  63. package/dist/devportal/pages/SellerItemsPage.js.map +1 -1
  64. package/dist/devportal/pages/SettingsPage.js +330 -315
  65. package/dist/devportal/pages/SettingsPage.js.map +1 -1
  66. package/dist/devportal/pages/SetupPage.js +5 -5
  67. package/dist/devportal/pages/StoreSubmissionPage.js +133 -131
  68. package/dist/devportal/pages/StoreSubmissionPage.js.map +1 -1
  69. package/dist/devportal/pages/WebhookDetailPage.js +6 -6
  70. package/dist/devportal/pages/WebhooksPage.js +39 -39
  71. package/dist/devportal/pages/WebhooksPage.js.map +1 -1
  72. package/dist/devportal/utils/appDetailTabs.d.ts +73 -0
  73. package/dist/devportal/utils/appDetailTabs.js +62 -0
  74. package/dist/devportal/utils/appDetailTabs.js.map +1 -0
  75. package/dist/devportal/utils/developerNav.d.ts +39 -0
  76. package/dist/devportal/utils/developerNav.js +304 -0
  77. package/dist/devportal/utils/developerNav.js.map +1 -0
  78. package/package.json +2 -2
@@ -1,62 +1,70 @@
1
1
  import { Bar as e } from "../../node_modules/recharts/es6/cartesian/Bar.js";
2
2
  import { BarChart as t } from "../../node_modules/recharts/es6/chart/BarChart.js";
3
3
  import { CartesianGrid as n } from "../../node_modules/recharts/es6/cartesian/CartesianGrid.js";
4
- import { useGetAnalyticsDashboardOptionsQuery as r, useGetApplicationAnalyticsDashboardQuery as i } from "../../generated/global-operations.js";
5
- import { getErrorMessage as a } from "../hooks/useGraphQL.js";
6
- import { Line as o } from "../../node_modules/recharts/es6/cartesian/Line.js";
7
- import { LineChart as s } from "../../node_modules/recharts/es6/chart/LineChart.js";
8
- import { ResponsiveContainer as c } from "../../node_modules/recharts/es6/component/ResponsiveContainer.js";
9
- import { Tooltip as l } from "../../node_modules/recharts/es6/component/Tooltip.js";
10
- import { XAxis as u } from "../../node_modules/recharts/es6/cartesian/XAxis.js";
11
- import { YAxis as d } from "../../node_modules/recharts/es6/cartesian/YAxis.js";
12
- import { PageLayout as f, PageSection as p } from "../components/PageLayout.js";
13
- import { DataTable as m } from "../components/DataTable.js";
14
- import { EmptyState as h } from "../components/EmptyState.js";
15
- import { StatCard as g, StatCardGrid as ee } from "../components/StatCard.js";
16
- import { AppListItem as te } from "../components/AppCard.js";
17
- import { useDevportal as ne } from "../providers/DevportalProvider.js";
4
+ import { useGetAnalyticsDashboardOptionsQuery as ee, useGetApplicationAnalyticsDashboardQuery as te } from "../../generated/global-operations.js";
5
+ import { getErrorMessage as r } from "../hooks/useGraphQL.js";
6
+ import { Line as i } from "../../node_modules/recharts/es6/cartesian/Line.js";
7
+ import { LineChart as ne } from "../../node_modules/recharts/es6/chart/LineChart.js";
8
+ import { ResponsiveContainer as a } from "../../node_modules/recharts/es6/component/ResponsiveContainer.js";
9
+ import { Tooltip as o } from "../../node_modules/recharts/es6/component/Tooltip.js";
10
+ import { XAxis as s } from "../../node_modules/recharts/es6/cartesian/XAxis.js";
11
+ import { YAxis as c } from "../../node_modules/recharts/es6/cartesian/YAxis.js";
12
+ import { PageLayout as l, PageSection as u } from "../components/PageLayout.js";
13
+ import { DataTable as re } from "../components/DataTable.js";
14
+ import { EmptyState as d } from "../components/EmptyState.js";
15
+ import { StatCard as f, StatCardGrid as p } from "../components/StatCard.js";
16
+ import { AppListItem as m } from "../components/AppCard.js";
17
+ import { useDevportal as h, useIsFluidgridsVariant as ie } from "../providers/DevportalProvider.js";
18
18
  import "../hooks/index.js";
19
- import { useTr as re } from "../utils/i18n.js";
20
- import { useEffect as ie, useMemo as _, useState as v } from "react";
21
- import { Activity as y, AlertCircle as b, AlertTriangle as ae, BarChart3 as x, Clock as S, Loader2 as C, Users as oe } from "lucide-react";
22
- import { useParams as se } from "react-router";
23
- import { Fragment as w, jsx as T, jsxs as E } from "react/jsx-runtime";
24
- import { EmphasisPanel as D, GlassCard as O } from "@burdenoff/fe-libs/ui";
19
+ import { useTr as g } from "../utils/i18n.js";
20
+ import { useEffect as ae, useMemo as _, useState as v } from "react";
21
+ import { Activity as oe, AlertCircle as y, AlertTriangle as se, BarChart3 as b, Clock as x, Loader2 as S, Users as C } from "lucide-react";
22
+ import { useParams as w } from "react-router";
23
+ import { Fragment as T, jsx as E, jsxs as D } from "react/jsx-runtime";
24
+ import { EmphasisPanel as O, GlassCard as k, OptionalFields as A } from "@burdenoff/fe-libs/ui";
25
25
  // src/devportal/pages/AnalyticsDashboardPage.tsx
26
26
  var ce = {
27
27
  "7d": 7,
28
28
  "30d": 30,
29
29
  "90d": 90
30
- }, k = {
30
+ }, j = {
31
31
  primary: "var(--color-chart-1)",
32
32
  secondary: "var(--color-chart-2)",
33
33
  tertiary: "var(--color-chart-4)",
34
34
  negative: "var(--color-chart-negative)"
35
- }, A = () => {
36
- let { appId: A } = se(), { navigate: le, basePath: j, activeOrgId: M } = ne(), N = re(), [P, F] = v("30d"), [I, L] = v(A || ""), R = _(() => /* @__PURE__ */ new Date(), []), z = _(() => {
37
- let e = new Date(R);
38
- return e.setDate(e.getDate() - ce[P]), e.toISOString();
39
- }, [R, P]), { data: B, loading: V, error: H } = r({
40
- skip: !!A,
35
+ }, le = ({ fold: e, children: t }) => {
36
+ let n = g();
37
+ return e ? /* @__PURE__ */ E(A, {
38
+ storageKey: "devportal.analytics.details",
39
+ title: n("devportal.analytics.detailsTitle", "Trends and daily breakdown"),
40
+ description: n("devportal.analytics.detailsDescription", "Traffic and user charts, plus the day-by-day table."),
41
+ children: t
42
+ }) : /* @__PURE__ */ E(T, { children: t });
43
+ }, M = () => {
44
+ let A = ie(), { appId: M } = w(), { navigate: ue, basePath: de, activeOrgId: N } = h(), P = g(), [F, I] = v("30d"), [L, R] = v(M || ""), z = _(() => /* @__PURE__ */ new Date(), []), B = _(() => {
45
+ let e = new Date(z);
46
+ return e.setDate(e.getDate() - ce[F]), e.toISOString();
47
+ }, [z, F]), { data: V, loading: fe, error: H } = ee({
48
+ skip: !!M,
41
49
  fetchPolicy: "cache-and-network"
42
- }), { data: U, loading: ue, error: W } = i({
50
+ }), { data: U, loading: pe, error: W } = te({
43
51
  variables: {
44
- applicationId: I || A || "",
52
+ applicationId: L || M || "",
45
53
  period: "daily",
46
- startDate: z,
47
- endDate: R.toISOString()
54
+ startDate: B,
55
+ endDate: z.toISOString()
48
56
  },
49
- skip: !(I || A),
57
+ skip: !(L || M),
50
58
  fetchPolicy: "cache-and-network"
51
- }), G = B?.applications?.edges?.map((e) => e.node) ?? [], K = M ? G.filter((e) => e.developerOrganizationId === M) : G, q = U?.application;
52
- ie(() => {
53
- let e = q?.name, t = A || I;
59
+ }), G = V?.applications?.edges?.map((e) => e.node) ?? [], K = N ? G.filter((e) => e.developerOrganizationId === N) : G, q = U?.application;
60
+ ae(() => {
61
+ let e = q?.name, t = M || L;
54
62
  if (!t || !e) return;
55
63
  let n = window.__breadcrumbRegistry;
56
64
  return n?.register(t, e), () => n?.unregister(t);
57
65
  }, [
58
- A,
59
- I,
66
+ M,
67
+ L,
60
68
  q?.name
61
69
  ]);
62
70
  let J = [...U?.applicationAnalytics ?? []].sort((e, t) => new Date(e.date).getTime() - new Date(t.date).getTime()), Y = J[J.length - 1], X = J[J.length - 2], Z = J.map((e) => ({
@@ -70,175 +78,175 @@ var ce = {
70
78
  newUsers: e.newUsers,
71
79
  sessions: e.sessions,
72
80
  avgResponseTime: e.avgResponseTime ?? 0
73
- })), Q = Y && Y.apiCalls > 0 ? Y.errors / Y.apiCalls * 100 : 0, de = X && X.apiCalls > 0 ? X.errors / X.apiCalls * 100 : 0, $ = Y?.avgResponseTime && X?.avgResponseTime ? X.avgResponseTime - Y.avgResponseTime : void 0, fe = (e) => {
74
- le?.(`${j}${e}`);
81
+ })), Q = Y && Y.apiCalls > 0 ? Y.errors / Y.apiCalls * 100 : 0, me = X && X.apiCalls > 0 ? X.errors / X.apiCalls * 100 : 0, $ = Y?.avgResponseTime && X?.avgResponseTime ? X.avgResponseTime - Y.avgResponseTime : void 0, he = (e) => {
82
+ ue?.(`${de}${e}`);
75
83
  };
76
- return !A && V && !B ? /* @__PURE__ */ T(f, {
77
- title: N("devportal.analytics.title", "Analytics"),
78
- description: N("devportal.analytics.description", "Explore live application usage and performance metrics"),
79
- children: /* @__PURE__ */ T("div", {
84
+ return !M && fe && !V ? /* @__PURE__ */ E(l, {
85
+ title: P("devportal.analytics.title", "Analytics"),
86
+ description: P("devportal.analytics.description", "Explore live application usage and performance metrics"),
87
+ children: /* @__PURE__ */ E("div", {
80
88
  className: "flex items-center justify-center py-16 text-text-secondary",
81
- children: /* @__PURE__ */ T(C, { className: "h-8 w-8 animate-spin" })
89
+ children: /* @__PURE__ */ E(S, { className: "h-8 w-8 animate-spin" })
82
90
  })
83
- }) : !A && H ? /* @__PURE__ */ T(f, {
84
- title: N("devportal.analytics.title", "Analytics"),
85
- description: N("devportal.analytics.description", "Explore live application usage and performance metrics"),
86
- children: /* @__PURE__ */ T(h, {
87
- icon: /* @__PURE__ */ T(b, {
91
+ }) : !M && H ? /* @__PURE__ */ E(l, {
92
+ title: P("devportal.analytics.title", "Analytics"),
93
+ description: P("devportal.analytics.description", "Explore live application usage and performance metrics"),
94
+ children: /* @__PURE__ */ E(d, {
95
+ icon: /* @__PURE__ */ E(y, {
88
96
  size: 32,
89
97
  className: "text-status-error-text"
90
98
  }),
91
- title: N("devportal.analytics.errorLoadApps", "Unable to load applications"),
92
- description: a(H)
99
+ title: P("devportal.analytics.errorLoadApps", "Unable to load applications"),
100
+ description: r(H)
93
101
  })
94
- }) : !A && !I ? /* @__PURE__ */ T(f, {
95
- title: N("devportal.analytics.title", "Analytics"),
96
- description: N("devportal.analytics.selectAppDescription", "Select an application to review live usage metrics from the public gateway"),
97
- children: K.length > 0 ? /* @__PURE__ */ T("div", {
102
+ }) : !M && !L ? /* @__PURE__ */ E(l, {
103
+ title: P("devportal.analytics.title", "Analytics"),
104
+ description: P("devportal.analytics.selectAppDescription", "Select an application to review live usage metrics from the public gateway"),
105
+ children: K.length > 0 ? /* @__PURE__ */ E("div", {
98
106
  className: "space-y-2",
99
- children: K.map((e) => /* @__PURE__ */ T(te, {
107
+ children: K.map((e) => /* @__PURE__ */ E(m, {
100
108
  app: e,
101
- onClick: () => L(e.id)
109
+ onClick: () => R(e.id)
102
110
  }, e.id))
103
- }) : /* @__PURE__ */ T(h, {
111
+ }) : /* @__PURE__ */ E(d, {
104
112
  illustration: "empty-data",
105
- icon: /* @__PURE__ */ T(x, { size: 32 }),
106
- title: N("devportal.analytics.noAppsTitle", "No applications available"),
107
- description: N("devportal.analytics.noAppsDescription", "Create an application before viewing analytics.")
113
+ icon: /* @__PURE__ */ E(b, { size: 32 }),
114
+ title: P("devportal.analytics.noAppsTitle", "No applications available"),
115
+ description: P("devportal.analytics.noAppsDescription", "Create an application before viewing analytics.")
108
116
  })
109
- }) : W ? /* @__PURE__ */ T(f, {
110
- title: N("devportal.analytics.title", "Analytics"),
111
- description: N("devportal.analytics.description", "Explore live application usage and performance metrics"),
112
- backLink: I ? `/apps/${I}` : void 0,
113
- backLabel: N("devportal.analytics.backToApplication", "Back to Application"),
114
- children: /* @__PURE__ */ T(h, {
115
- icon: /* @__PURE__ */ T(b, {
117
+ }) : W ? /* @__PURE__ */ E(l, {
118
+ title: P("devportal.analytics.title", "Analytics"),
119
+ description: P("devportal.analytics.description", "Explore live application usage and performance metrics"),
120
+ backLink: L ? `/apps/${L}` : void 0,
121
+ backLabel: P("devportal.analytics.backToApplication", "Back to Application"),
122
+ children: /* @__PURE__ */ E(d, {
123
+ icon: /* @__PURE__ */ E(y, {
116
124
  size: 32,
117
125
  className: "text-status-error-text"
118
126
  }),
119
- title: N("devportal.analytics.errorLoadAnalytics", "Unable to load analytics"),
120
- description: a(W)
127
+ title: P("devportal.analytics.errorLoadAnalytics", "Unable to load analytics"),
128
+ description: r(W)
121
129
  })
122
- }) : /* @__PURE__ */ T(f, {
123
- title: A ? N("devportal.analytics.appTitle", "Application Analytics") : N("devportal.analytics.title", "Analytics"),
124
- description: q ? `${N("devportal.analytics.liveUsageFor", "Live usage and performance for")} ${q.name}` : N("devportal.analytics.description", "Explore live application usage and performance metrics"),
125
- purpose: N("devportal.analytics.purpose", "Analytics shows how your apps are actually used — API call volume, active installs, latency, and error rates over time — so you can spot regressions, plan capacity, and prove value to your users. Pick an app and a time range to drill in."),
126
- backLink: A && q ? `/apps/${q.id}` : void 0,
127
- backLabel: N("devportal.analytics.backToApplication", "Back to Application"),
128
- actions: /* @__PURE__ */ E("div", {
130
+ }) : /* @__PURE__ */ E(l, {
131
+ title: M ? P("devportal.analytics.appTitle", "Application Analytics") : P("devportal.analytics.title", "Analytics"),
132
+ description: q ? `${P("devportal.analytics.liveUsageFor", "Live usage and performance for")} ${q.name}` : P("devportal.analytics.description", "Explore live application usage and performance metrics"),
133
+ purpose: P("devportal.analytics.purpose", "Analytics shows how your apps are actually used — API call volume, active installs, latency, and error rates over time — so you can spot regressions, plan capacity, and prove value to your users. Pick an app and a time range to drill in."),
134
+ backLink: M && q ? `/apps/${q.id}` : void 0,
135
+ backLabel: P("devportal.analytics.backToApplication", "Back to Application"),
136
+ actions: /* @__PURE__ */ D("div", {
129
137
  className: "flex flex-wrap gap-2",
130
- children: [!A && K.length > 0 && /* @__PURE__ */ T("select", {
131
- value: I,
132
- onChange: (e) => L(e.target.value),
133
- "aria-label": N("devportal.analytics.selectAppAria", "Select application"),
138
+ children: [!M && K.length > 0 && /* @__PURE__ */ E("select", {
139
+ value: L,
140
+ onChange: (e) => R(e.target.value),
141
+ "aria-label": P("devportal.analytics.selectAppAria", "Select application"),
134
142
  className: "rounded-md border bg-bg-surface px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-primary scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
135
- children: K.map((e) => /* @__PURE__ */ T("option", {
143
+ children: K.map((e) => /* @__PURE__ */ E("option", {
136
144
  value: e.id,
137
145
  children: e.name
138
146
  }, e.id))
139
- }), /* @__PURE__ */ E("select", {
140
- value: P,
141
- onChange: (e) => F(e.target.value),
142
- "aria-label": N("devportal.analytics.selectRangeAria", "Select time range"),
147
+ }), /* @__PURE__ */ D("select", {
148
+ value: F,
149
+ onChange: (e) => I(e.target.value),
150
+ "aria-label": P("devportal.analytics.selectRangeAria", "Select time range"),
143
151
  className: "rounded-md border bg-bg-surface px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-primary scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
144
152
  children: [
145
- /* @__PURE__ */ T("option", {
153
+ /* @__PURE__ */ E("option", {
146
154
  value: "7d",
147
- children: N("devportal.analytics.range.7d", "Last 7 days")
155
+ children: P("devportal.analytics.range.7d", "Last 7 days")
148
156
  }),
149
- /* @__PURE__ */ T("option", {
157
+ /* @__PURE__ */ E("option", {
150
158
  value: "30d",
151
- children: N("devportal.analytics.range.30d", "Last 30 days")
159
+ children: P("devportal.analytics.range.30d", "Last 30 days")
152
160
  }),
153
- /* @__PURE__ */ T("option", {
161
+ /* @__PURE__ */ E("option", {
154
162
  value: "90d",
155
- children: N("devportal.analytics.range.90d", "Last 90 days")
163
+ children: P("devportal.analytics.range.90d", "Last 90 days")
156
164
  })
157
165
  ]
158
166
  })]
159
167
  }),
160
- children: ue && !J.length ? /* @__PURE__ */ T("div", {
168
+ children: pe && !J.length ? /* @__PURE__ */ E("div", {
161
169
  className: "flex items-center justify-center py-16 text-text-secondary",
162
- children: /* @__PURE__ */ T(C, { className: "h-8 w-8 animate-spin" })
163
- }) : J.length > 0 ? /* @__PURE__ */ E(w, { children: [
164
- /* @__PURE__ */ T(D, {
165
- className: "mb-6",
166
- children: /* @__PURE__ */ E(ee, {
167
- columns: 4,
168
- children: [
169
- /* @__PURE__ */ T(g, {
170
- title: N("devportal.analytics.apiCalls", "API Calls"),
171
- value: (Y?.apiCalls ?? 0).toLocaleString(),
172
- icon: /* @__PURE__ */ T(y, { size: 20 })
173
- }),
174
- /* @__PURE__ */ T(g, {
175
- title: N("devportal.analytics.activeUsers", "Active Users"),
176
- value: (Y?.activeUsers ?? 0).toLocaleString(),
177
- icon: /* @__PURE__ */ T(oe, { size: 20 })
178
- }),
179
- /* @__PURE__ */ T(g, {
180
- title: N("devportal.analytics.errorRate", "Error Rate"),
181
- value: `${Q.toFixed(2)}%`,
182
- icon: /* @__PURE__ */ T(ae, { size: 20 }),
183
- trend: X ? {
184
- value: de - Q,
185
- label: N("devportal.analytics.vsPrevious", "vs previous period")
186
- } : void 0
187
- }),
188
- /* @__PURE__ */ T(g, {
189
- title: N("devportal.analytics.avgResponseTime", "Avg Response Time"),
190
- value: Y?.avgResponseTime ? `${Y.avgResponseTime}ms` : N("devportal.common.na", "N/A"),
191
- icon: /* @__PURE__ */ T(S, { size: 20 }),
192
- trend: typeof $ == "number" ? {
193
- value: $,
194
- label: N("devportal.analytics.fasterThanPrevious", "faster than previous")
195
- } : void 0
196
- })
197
- ]
198
- })
199
- }),
200
- /* @__PURE__ */ E("div", {
170
+ children: /* @__PURE__ */ E(S, { className: "h-8 w-8 animate-spin" })
171
+ }) : J.length > 0 ? /* @__PURE__ */ D(T, { children: [/* @__PURE__ */ E(O, {
172
+ className: "mb-6",
173
+ children: /* @__PURE__ */ D(p, {
174
+ columns: 4,
175
+ children: [
176
+ /* @__PURE__ */ E(f, {
177
+ title: P("devportal.analytics.apiCalls", "API Calls"),
178
+ value: (Y?.apiCalls ?? 0).toLocaleString(),
179
+ icon: /* @__PURE__ */ E(oe, { size: 20 })
180
+ }),
181
+ /* @__PURE__ */ E(f, {
182
+ title: P("devportal.analytics.activeUsers", "Active Users"),
183
+ value: (Y?.activeUsers ?? 0).toLocaleString(),
184
+ icon: /* @__PURE__ */ E(C, { size: 20 })
185
+ }),
186
+ /* @__PURE__ */ E(f, {
187
+ title: P("devportal.analytics.errorRate", "Error Rate"),
188
+ value: `${Q.toFixed(2)}%`,
189
+ icon: /* @__PURE__ */ E(se, { size: 20 }),
190
+ trend: X ? {
191
+ value: me - Q,
192
+ label: P("devportal.analytics.vsPrevious", "vs previous period")
193
+ } : void 0
194
+ }),
195
+ /* @__PURE__ */ E(f, {
196
+ title: P("devportal.analytics.avgResponseTime", "Avg Response Time"),
197
+ value: Y?.avgResponseTime ? `${Y.avgResponseTime}ms` : P("devportal.common.na", "N/A"),
198
+ icon: /* @__PURE__ */ E(x, { size: 20 }),
199
+ trend: typeof $ == "number" ? {
200
+ value: $,
201
+ label: P("devportal.analytics.fasterThanPrevious", "faster than previous")
202
+ } : void 0
203
+ })
204
+ ]
205
+ })
206
+ }), /* @__PURE__ */ D(le, {
207
+ fold: A,
208
+ children: [/* @__PURE__ */ D("div", {
201
209
  className: "grid gap-6 xl:grid-cols-2",
202
- children: [/* @__PURE__ */ T(p, {
203
- title: N("devportal.analytics.trafficTrend", "Traffic trend"),
204
- children: /* @__PURE__ */ T(O, {
210
+ children: [/* @__PURE__ */ E(u, {
211
+ title: P("devportal.analytics.trafficTrend", "Traffic trend"),
212
+ children: /* @__PURE__ */ E(k, {
205
213
  treatment: "insight",
206
214
  className: "p-4",
207
- children: /* @__PURE__ */ T(c, {
215
+ children: /* @__PURE__ */ E(a, {
208
216
  width: "100%",
209
217
  height: 300,
210
- children: /* @__PURE__ */ E(s, {
218
+ children: /* @__PURE__ */ D(ne, {
211
219
  data: Z,
212
220
  children: [
213
- /* @__PURE__ */ T(n, {
221
+ /* @__PURE__ */ E(n, {
214
222
  strokeDasharray: "3 3",
215
223
  stroke: "var(--color-chart-grid)"
216
224
  }),
217
- /* @__PURE__ */ T(u, {
225
+ /* @__PURE__ */ E(s, {
218
226
  dataKey: "date",
219
227
  stroke: "var(--color-chart-axis)",
220
228
  fontSize: 12
221
229
  }),
222
- /* @__PURE__ */ T(d, {
230
+ /* @__PURE__ */ E(c, {
223
231
  stroke: "var(--color-chart-axis)",
224
232
  fontSize: 12
225
233
  }),
226
- /* @__PURE__ */ T(l, { contentStyle: {
234
+ /* @__PURE__ */ E(o, { contentStyle: {
227
235
  backgroundColor: "var(--color-card)",
228
236
  border: "1px solid var(--color-border-default)",
229
237
  borderRadius: 12
230
238
  } }),
231
- /* @__PURE__ */ T(o, {
239
+ /* @__PURE__ */ E(i, {
232
240
  type: "monotone",
233
241
  dataKey: "apiCalls",
234
- stroke: k.primary,
242
+ stroke: j.primary,
235
243
  strokeWidth: 2,
236
244
  dot: !1
237
245
  }),
238
- /* @__PURE__ */ T(o, {
246
+ /* @__PURE__ */ E(i, {
239
247
  type: "monotone",
240
248
  dataKey: "errors",
241
- stroke: k.negative,
249
+ stroke: j.negative,
242
250
  strokeWidth: 2,
243
251
  dot: !1
244
252
  })
@@ -246,38 +254,38 @@ var ce = {
246
254
  })
247
255
  })
248
256
  })
249
- }), /* @__PURE__ */ T(p, {
250
- title: N("devportal.analytics.userActivity", "User activity"),
251
- children: /* @__PURE__ */ T(O, {
257
+ }), /* @__PURE__ */ E(u, {
258
+ title: P("devportal.analytics.userActivity", "User activity"),
259
+ children: /* @__PURE__ */ E(k, {
252
260
  treatment: "insight",
253
261
  className: "p-4",
254
- children: /* @__PURE__ */ T(c, {
262
+ children: /* @__PURE__ */ E(a, {
255
263
  width: "100%",
256
264
  height: 300,
257
- children: /* @__PURE__ */ E(t, {
265
+ children: /* @__PURE__ */ D(t, {
258
266
  data: Z,
259
267
  children: [
260
- /* @__PURE__ */ T(n, {
268
+ /* @__PURE__ */ E(n, {
261
269
  strokeDasharray: "3 3",
262
270
  stroke: "var(--color-chart-grid)"
263
271
  }),
264
- /* @__PURE__ */ T(u, {
272
+ /* @__PURE__ */ E(s, {
265
273
  dataKey: "date",
266
274
  stroke: "var(--color-chart-axis)",
267
275
  fontSize: 12
268
276
  }),
269
- /* @__PURE__ */ T(d, {
277
+ /* @__PURE__ */ E(c, {
270
278
  stroke: "var(--color-chart-axis)",
271
279
  fontSize: 12
272
280
  }),
273
- /* @__PURE__ */ T(l, { contentStyle: {
281
+ /* @__PURE__ */ E(o, { contentStyle: {
274
282
  backgroundColor: "var(--color-card)",
275
283
  border: "1px solid var(--color-border-default)",
276
284
  borderRadius: 12
277
285
  } }),
278
- /* @__PURE__ */ T(e, {
286
+ /* @__PURE__ */ E(e, {
279
287
  dataKey: "activeUsers",
280
- fill: k.primary,
288
+ fill: j.primary,
281
289
  radius: [
282
290
  6,
283
291
  6,
@@ -285,9 +293,9 @@ var ce = {
285
293
  0
286
294
  ]
287
295
  }),
288
- /* @__PURE__ */ T(e, {
296
+ /* @__PURE__ */ E(e, {
289
297
  dataKey: "newUsers",
290
- fill: k.secondary,
298
+ fill: j.secondary,
291
299
  radius: [
292
300
  6,
293
301
  6,
@@ -300,16 +308,15 @@ var ce = {
300
308
  })
301
309
  })
302
310
  })]
303
- }),
304
- /* @__PURE__ */ T(p, {
305
- title: N("devportal.analytics.dailyBreakdown", "Daily breakdown"),
306
- children: /* @__PURE__ */ T(m, {
311
+ }), /* @__PURE__ */ E(u, {
312
+ title: P("devportal.analytics.dailyBreakdown", "Daily breakdown"),
313
+ children: /* @__PURE__ */ E(re, {
307
314
  data: J,
308
315
  keyField: "id",
309
316
  columns: [
310
317
  {
311
318
  key: "date",
312
- header: N("devportal.analytics.date", "Date"),
319
+ header: P("devportal.analytics.date", "Date"),
313
320
  render: (e) => new Date(e.date).toLocaleDateString(void 0, {
314
321
  month: "short",
315
322
  day: "numeric",
@@ -318,51 +325,51 @@ var ce = {
318
325
  },
319
326
  {
320
327
  key: "apiCalls",
321
- header: N("devportal.analytics.apiCalls", "API Calls"),
328
+ header: P("devportal.analytics.apiCalls", "API Calls"),
322
329
  render: (e) => e.apiCalls.toLocaleString()
323
330
  },
324
331
  {
325
332
  key: "errors",
326
- header: N("devportal.analytics.errors", "Errors"),
333
+ header: P("devportal.analytics.errors", "Errors"),
327
334
  render: (e) => e.errors.toLocaleString()
328
335
  },
329
336
  {
330
337
  key: "activeUsers",
331
- header: N("devportal.analytics.activeUsers", "Active Users"),
338
+ header: P("devportal.analytics.activeUsers", "Active Users"),
332
339
  render: (e) => e.activeUsers.toLocaleString()
333
340
  },
334
341
  {
335
342
  key: "newUsers",
336
- header: N("devportal.analytics.newUsers", "New Users"),
343
+ header: P("devportal.analytics.newUsers", "New Users"),
337
344
  render: (e) => e.newUsers.toLocaleString()
338
345
  },
339
346
  {
340
347
  key: "avgResponseTime",
341
- header: N("devportal.analytics.avgResponse", "Avg Response"),
342
- render: (e) => e.avgResponseTime ? `${e.avgResponseTime}ms` : N("devportal.common.na", "N/A")
348
+ header: P("devportal.analytics.avgResponse", "Avg Response"),
349
+ render: (e) => e.avgResponseTime ? `${e.avgResponseTime}ms` : P("devportal.common.na", "N/A")
343
350
  },
344
351
  {
345
352
  key: "sessions",
346
- header: N("devportal.analytics.sessions", "Sessions"),
353
+ header: P("devportal.analytics.sessions", "Sessions"),
347
354
  render: (e) => e.sessions.toLocaleString()
348
355
  }
349
356
  ]
350
357
  })
351
- })
352
- ] }) : /* @__PURE__ */ T(h, {
358
+ })]
359
+ })] }) : /* @__PURE__ */ E(d, {
353
360
  illustration: "empty-data",
354
- icon: /* @__PURE__ */ T(x, { size: 32 }),
355
- title: N("devportal.analytics.noAnalyticsTitle", "No analytics available yet"),
356
- description: N("devportal.analytics.noAnalyticsDescription", "Analytics will appear after this application starts receiving traffic through the public gateway."),
357
- action: A ? void 0 : /* @__PURE__ */ T("button", {
361
+ icon: /* @__PURE__ */ E(b, { size: 32 }),
362
+ title: P("devportal.analytics.noAnalyticsTitle", "No analytics available yet"),
363
+ description: P("devportal.analytics.noAnalyticsDescription", "Analytics will appear after this application starts receiving traffic through the public gateway."),
364
+ action: M ? void 0 : /* @__PURE__ */ E("button", {
358
365
  type: "button",
359
- onClick: () => fe("/apps"),
366
+ onClick: () => he("/apps"),
360
367
  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 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary",
361
- children: N("devportal.analytics.viewApplications", "View applications")
368
+ children: P("devportal.analytics.viewApplications", "View applications")
362
369
  })
363
370
  })
364
371
  });
365
372
  };
366
- export { A as AnalyticsDashboardPage };
373
+ export { M as AnalyticsDashboardPage };
367
374
 
368
375
  //# sourceMappingURL=AnalyticsDashboardPage.js.map