@burdenoff/microfe-adaptercloud 2026.625.2 → 2026.628.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 (153) hide show
  1. package/dist/adaptercloud/AdapterCloudRoot.js +65 -121
  2. package/dist/adaptercloud/AdapterCloudRoot.js.map +1 -1
  3. package/dist/adaptercloud/AdapterCloudRoutes.js +70 -182
  4. package/dist/adaptercloud/AdapterCloudRoutes.js.map +1 -1
  5. package/dist/adaptercloud/components/DataState.js +42 -0
  6. package/dist/adaptercloud/components/DataState.js.map +1 -0
  7. package/dist/adaptercloud/components/SeverityBadge.js +12 -0
  8. package/dist/adaptercloud/components/SeverityBadge.js.map +1 -0
  9. package/dist/adaptercloud/components/StatusBadge.js +43 -44
  10. package/dist/adaptercloud/components/StatusBadge.js.map +1 -1
  11. package/dist/adaptercloud/context/AdapterCloudContext.js +22 -30
  12. package/dist/adaptercloud/context/AdapterCloudContext.js.map +1 -1
  13. package/dist/adaptercloud/hooks/useAdapterCloudApi.js +397 -194
  14. package/dist/adaptercloud/hooks/useAdapterCloudApi.js.map +1 -1
  15. package/dist/adaptercloud/index.js +1 -0
  16. package/dist/adaptercloud/pages/OverviewPage.js +334 -0
  17. package/dist/adaptercloud/pages/OverviewPage.js.map +1 -0
  18. package/dist/adaptercloud/pages/adapters/AdapterDetailPage.js +187 -0
  19. package/dist/adaptercloud/pages/adapters/AdapterDetailPage.js.map +1 -0
  20. package/dist/adaptercloud/pages/adapters/AdapterFormPage.js +278 -0
  21. package/dist/adaptercloud/pages/adapters/AdapterFormPage.js.map +1 -0
  22. package/dist/adaptercloud/pages/adapters/AdaptersListPage.js +172 -0
  23. package/dist/adaptercloud/pages/adapters/AdaptersListPage.js.map +1 -0
  24. package/dist/adaptercloud/pages/connections/ConnectionDetailPage.js +247 -0
  25. package/dist/adaptercloud/pages/connections/ConnectionDetailPage.js.map +1 -0
  26. package/dist/adaptercloud/pages/connections/ConnectionFormPage.js +271 -0
  27. package/dist/adaptercloud/pages/connections/ConnectionFormPage.js.map +1 -0
  28. package/dist/adaptercloud/pages/connections/ConnectionsListPage.js +167 -0
  29. package/dist/adaptercloud/pages/connections/ConnectionsListPage.js.map +1 -0
  30. package/dist/adaptercloud/pages/costs/CostsPage.js +169 -0
  31. package/dist/adaptercloud/pages/costs/CostsPage.js.map +1 -0
  32. package/dist/adaptercloud/pages/drift/DriftListPage.js +132 -0
  33. package/dist/adaptercloud/pages/drift/DriftListPage.js.map +1 -0
  34. package/dist/adaptercloud/pages/policies/PoliciesListPage.js +171 -0
  35. package/dist/adaptercloud/pages/policies/PoliciesListPage.js.map +1 -0
  36. package/dist/adaptercloud/pages/policies/PolicyDetailPage.js +185 -0
  37. package/dist/adaptercloud/pages/policies/PolicyDetailPage.js.map +1 -0
  38. package/dist/adaptercloud/pages/policies/PolicyFormPage.js +215 -0
  39. package/dist/adaptercloud/pages/policies/PolicyFormPage.js.map +1 -0
  40. package/dist/adaptercloud/pages/resources/ResourceDetailPage.js +207 -0
  41. package/dist/adaptercloud/pages/resources/ResourceDetailPage.js.map +1 -0
  42. package/dist/adaptercloud/pages/resources/ResourcesListPage.js +182 -0
  43. package/dist/adaptercloud/pages/resources/ResourcesListPage.js.map +1 -0
  44. package/dist/adaptercloud/pages/sync-runs/SyncRunsListPage.js +196 -0
  45. package/dist/adaptercloud/pages/sync-runs/SyncRunsListPage.js.map +1 -0
  46. package/dist/adaptercloud/pages/violations/ViolationsListPage.js +258 -0
  47. package/dist/adaptercloud/pages/violations/ViolationsListPage.js.map +1 -0
  48. package/dist/adaptercloud/store/adaptercloudStore.js +1 -7
  49. package/dist/adaptercloud/store/adaptercloudStore.js.map +1 -1
  50. package/dist/adaptercloud/utils/domain.js +105 -0
  51. package/dist/adaptercloud/utils/domain.js.map +1 -0
  52. package/dist/adaptercloud/utils/formatters.js +1 -12
  53. package/dist/adaptercloud/utils/formatters.js.map +1 -1
  54. package/dist/index.js +5 -4
  55. package/package.json +1 -1
  56. package/dist/adaptercloud/components/InvestmentCard.js +0 -98
  57. package/dist/adaptercloud/components/InvestmentCard.js.map +0 -1
  58. package/dist/adaptercloud/components/RatingDisplay.js +0 -35
  59. package/dist/adaptercloud/components/RatingDisplay.js.map +0 -1
  60. package/dist/adaptercloud/mocks/data.js +0 -1517
  61. package/dist/adaptercloud/mocks/data.js.map +0 -1
  62. package/dist/adaptercloud/mocks/users.js +0 -34
  63. package/dist/adaptercloud/mocks/users.js.map +0 -1
  64. package/dist/adaptercloud/pages/HomePage.js +0 -934
  65. package/dist/adaptercloud/pages/HomePage.js.map +0 -1
  66. package/dist/adaptercloud/pages/admin/AdminAnalyticsPage.js +0 -653
  67. package/dist/adaptercloud/pages/admin/AdminAnalyticsPage.js.map +0 -1
  68. package/dist/adaptercloud/pages/admin/AdminDashboard.js +0 -665
  69. package/dist/adaptercloud/pages/admin/AdminDashboard.js.map +0 -1
  70. package/dist/adaptercloud/pages/admin/AdminFinancialPage.js +0 -426
  71. package/dist/adaptercloud/pages/admin/AdminFinancialPage.js.map +0 -1
  72. package/dist/adaptercloud/pages/admin/AdminOrdersPage.js +0 -665
  73. package/dist/adaptercloud/pages/admin/AdminOrdersPage.js.map +0 -1
  74. package/dist/adaptercloud/pages/admin/AdminProfilePage.js +0 -261
  75. package/dist/adaptercloud/pages/admin/AdminProfilePage.js.map +0 -1
  76. package/dist/adaptercloud/pages/admin/AdminSettingsPage.js +0 -663
  77. package/dist/adaptercloud/pages/admin/AdminSettingsPage.js.map +0 -1
  78. package/dist/adaptercloud/pages/admin/CartManagementPage.js +0 -874
  79. package/dist/adaptercloud/pages/admin/CartManagementPage.js.map +0 -1
  80. package/dist/adaptercloud/pages/admin/UserManagementPage.js +0 -898
  81. package/dist/adaptercloud/pages/admin/UserManagementPage.js.map +0 -1
  82. package/dist/adaptercloud/pages/cart-owner/AnalyticsDashboard.js +0 -840
  83. package/dist/adaptercloud/pages/cart-owner/AnalyticsDashboard.js.map +0 -1
  84. package/dist/adaptercloud/pages/cart-owner/BusinessSettingsPage.js +0 -714
  85. package/dist/adaptercloud/pages/cart-owner/BusinessSettingsPage.js.map +0 -1
  86. package/dist/adaptercloud/pages/cart-owner/CartOwnerDashboard.js +0 -788
  87. package/dist/adaptercloud/pages/cart-owner/CartOwnerDashboard.js.map +0 -1
  88. package/dist/adaptercloud/pages/cart-owner/CartOwnerProfilePage.js +0 -888
  89. package/dist/adaptercloud/pages/cart-owner/CartOwnerProfilePage.js.map +0 -1
  90. package/dist/adaptercloud/pages/cart-owner/CartServiceConfigPage.js +0 -634
  91. package/dist/adaptercloud/pages/cart-owner/CartServiceConfigPage.js.map +0 -1
  92. package/dist/adaptercloud/pages/cart-owner/InventoryManagementPage.js +0 -907
  93. package/dist/adaptercloud/pages/cart-owner/InventoryManagementPage.js.map +0 -1
  94. package/dist/adaptercloud/pages/cart-owner/OrderManagementPage.js +0 -875
  95. package/dist/adaptercloud/pages/cart-owner/OrderManagementPage.js.map +0 -1
  96. package/dist/adaptercloud/pages/cart-owner/StaffManagementPage.js +0 -827
  97. package/dist/adaptercloud/pages/cart-owner/StaffManagementPage.js.map +0 -1
  98. package/dist/adaptercloud/pages/common/HelpSupportPage.js +0 -1329
  99. package/dist/adaptercloud/pages/common/HelpSupportPage.js.map +0 -1
  100. package/dist/adaptercloud/pages/common/NotificationCenterPage.js +0 -671
  101. package/dist/adaptercloud/pages/common/NotificationCenterPage.js.map +0 -1
  102. package/dist/adaptercloud/pages/common/SettingsPage.js +0 -982
  103. package/dist/adaptercloud/pages/common/SettingsPage.js.map +0 -1
  104. package/dist/adaptercloud/pages/customer/BookingDetailsPage.js +0 -596
  105. package/dist/adaptercloud/pages/customer/BookingDetailsPage.js.map +0 -1
  106. package/dist/adaptercloud/pages/customer/CartDetailPage.js +0 -623
  107. package/dist/adaptercloud/pages/customer/CartDetailPage.js.map +0 -1
  108. package/dist/adaptercloud/pages/customer/CartDiscoveryPage.js +0 -552
  109. package/dist/adaptercloud/pages/customer/CartDiscoveryPage.js.map +0 -1
  110. package/dist/adaptercloud/pages/customer/CheckoutPage.js +0 -534
  111. package/dist/adaptercloud/pages/customer/CheckoutPage.js.map +0 -1
  112. package/dist/adaptercloud/pages/customer/CustomerDashboard.js +0 -525
  113. package/dist/adaptercloud/pages/customer/CustomerDashboard.js.map +0 -1
  114. package/dist/adaptercloud/pages/customer/CustomerProfilePage.js +0 -623
  115. package/dist/adaptercloud/pages/customer/CustomerProfilePage.js.map +0 -1
  116. package/dist/adaptercloud/pages/customer/DirectServiceBookingPage.js +0 -629
  117. package/dist/adaptercloud/pages/customer/DirectServiceBookingPage.js.map +0 -1
  118. package/dist/adaptercloud/pages/customer/FavoritesPage.js +0 -480
  119. package/dist/adaptercloud/pages/customer/FavoritesPage.js.map +0 -1
  120. package/dist/adaptercloud/pages/customer/OrderHistoryPage.js +0 -444
  121. package/dist/adaptercloud/pages/customer/OrderHistoryPage.js.map +0 -1
  122. package/dist/adaptercloud/pages/customer/OrderTrackingPage.js +0 -391
  123. package/dist/adaptercloud/pages/customer/OrderTrackingPage.js.map +0 -1
  124. package/dist/adaptercloud/pages/customer/PaymentMethodsPage.js +0 -504
  125. package/dist/adaptercloud/pages/customer/PaymentMethodsPage.js.map +0 -1
  126. package/dist/adaptercloud/pages/customer/ReviewsPage.js +0 -609
  127. package/dist/adaptercloud/pages/customer/ReviewsPage.js.map +0 -1
  128. package/dist/adaptercloud/pages/customer/SavedAddressesPage.js +0 -459
  129. package/dist/adaptercloud/pages/customer/SavedAddressesPage.js.map +0 -1
  130. package/dist/adaptercloud/pages/investor/InvestmentDetailsPage.js +0 -851
  131. package/dist/adaptercloud/pages/investor/InvestmentDetailsPage.js.map +0 -1
  132. package/dist/adaptercloud/pages/investor/InvestmentOpportunitiesPage.js +0 -942
  133. package/dist/adaptercloud/pages/investor/InvestmentOpportunitiesPage.js.map +0 -1
  134. package/dist/adaptercloud/pages/investor/InvestorAnalyticsPage.js +0 -683
  135. package/dist/adaptercloud/pages/investor/InvestorAnalyticsPage.js.map +0 -1
  136. package/dist/adaptercloud/pages/investor/InvestorDashboard.js +0 -452
  137. package/dist/adaptercloud/pages/investor/InvestorDashboard.js.map +0 -1
  138. package/dist/adaptercloud/pages/investor/InvestorInvestmentsPage.js +0 -402
  139. package/dist/adaptercloud/pages/investor/InvestorInvestmentsPage.js.map +0 -1
  140. package/dist/adaptercloud/pages/investor/InvestorPortfolioPage.js +0 -571
  141. package/dist/adaptercloud/pages/investor/InvestorPortfolioPage.js.map +0 -1
  142. package/dist/adaptercloud/pages/investor/InvestorProfilePage.js +0 -1067
  143. package/dist/adaptercloud/pages/investor/InvestorProfilePage.js.map +0 -1
  144. package/dist/adaptercloud/pages/worker/TaskDetailsPage.js +0 -526
  145. package/dist/adaptercloud/pages/worker/TaskDetailsPage.js.map +0 -1
  146. package/dist/adaptercloud/pages/worker/WorkerDashboard.js +0 -659
  147. package/dist/adaptercloud/pages/worker/WorkerDashboard.js.map +0 -1
  148. package/dist/adaptercloud/pages/worker/WorkerOrdersPage.js +0 -678
  149. package/dist/adaptercloud/pages/worker/WorkerOrdersPage.js.map +0 -1
  150. package/dist/adaptercloud/pages/worker/WorkerProfilePage.js +0 -689
  151. package/dist/adaptercloud/pages/worker/WorkerProfilePage.js.map +0 -1
  152. package/dist/adaptercloud/pages/worker/WorkerSchedulePage.js +0 -582
  153. package/dist/adaptercloud/pages/worker/WorkerSchedulePage.js.map +0 -1
@@ -1,683 +0,0 @@
1
- import { useAdapterCloud as e } from "../../context/AdapterCloudContext.js";
2
- import { cn as t } from "../../utils/cn.js";
3
- import { PageLayout as n } from "../../components/PageLayout.js";
4
- import { MetricsCard as r } from "../../components/MetricsCard.js";
5
- import { formatCurrency as i } from "../../utils/formatters.js";
6
- import { useCallback as a, useEffect as o, useState as s } from "react";
7
- import { Activity as c, ArrowDown as l, ArrowUp as u, BarChart3 as d, Calendar as f, Download as p, Lightbulb as m, PieChart as h, Shield as g, Target as _, TrendingUp as v, Wallet as y } from "lucide-react";
8
- import { jsx as b, jsxs as x } from "react/jsx-runtime";
9
- import { EmphasisPanel as S } from "@burdenoff/fe-libs/ui";
10
- //#region src/adaptercloud/pages/investor/InvestorAnalyticsPage.tsx
11
- var C = {
12
- portfolioMetrics: {
13
- totalValue: 283700,
14
- totalInvested: 255e3,
15
- totalReturns: 28700,
16
- averageRoi: 19.6,
17
- portfolioGrowth: 11.3,
18
- bestPerforming: "Biryani House",
19
- worstPerforming: "Healthy Bites"
20
- },
21
- performanceByCart: [
22
- {
23
- cartName: "Biryani House",
24
- investedAmount: 6e4,
25
- currentValue: 72e3,
26
- returns: 12e3,
27
- roi: 20
28
- },
29
- {
30
- cartName: "South Indian Express",
31
- investedAmount: 5e4,
32
- currentValue: 58500,
33
- returns: 8500,
34
- roi: 17
35
- },
36
- {
37
- cartName: "Pizza Corner",
38
- investedAmount: 75e3,
39
- currentValue: 82e3,
40
- returns: 7e3,
41
- roi: 9.3
42
- },
43
- {
44
- cartName: "Healthy Bites",
45
- investedAmount: 3e4,
46
- currentValue: 31200,
47
- returns: 1200,
48
- roi: 4
49
- },
50
- {
51
- cartName: "Street Food Junction",
52
- investedAmount: 4e4,
53
- currentValue: 4e4,
54
- returns: 0,
55
- roi: 0
56
- }
57
- ],
58
- performanceByCategory: [
59
- {
60
- category: "South Indian",
61
- investedAmount: 11e4,
62
- returns: 20500,
63
- percentage: 43.1
64
- },
65
- {
66
- category: "Fast Food",
67
- investedAmount: 75e3,
68
- returns: 7e3,
69
- percentage: 29.4
70
- },
71
- {
72
- category: "Street Food",
73
- investedAmount: 4e4,
74
- returns: 0,
75
- percentage: 15.7
76
- },
77
- {
78
- category: "Healthy Food",
79
- investedAmount: 3e4,
80
- returns: 1200,
81
- percentage: 11.8
82
- }
83
- ],
84
- monthlyPerformance: [
85
- {
86
- month: "Jun 2024",
87
- invested: 195e3,
88
- value: 202e3,
89
- returns: 7e3
90
- },
91
- {
92
- month: "Jul 2024",
93
- invested: 215e3,
94
- value: 228e3,
95
- returns: 13e3
96
- },
97
- {
98
- month: "Aug 2024",
99
- invested: 255e3,
100
- value: 265e3,
101
- returns: 1e4
102
- },
103
- {
104
- month: "Sep 2024",
105
- invested: 255e3,
106
- value: 275e3,
107
- returns: 2e4
108
- },
109
- {
110
- month: "Oct 2024",
111
- invested: 255e3,
112
- value: 28e4,
113
- returns: 25e3
114
- },
115
- {
116
- month: "Nov 2024",
117
- invested: 255e3,
118
- value: 283700,
119
- returns: 28700
120
- }
121
- ],
122
- riskAnalysis: {
123
- riskScore: 3.2,
124
- diversificationScore: 7.8,
125
- volatilityScore: 2.5,
126
- recommendations: [
127
- "Consider diversifying into more food categories",
128
- "Your portfolio shows good risk distribution",
129
- "Consider investing in carts from different locations",
130
- "Monitor underperforming investments closely",
131
- "Explore premium segment opportunities for higher returns"
132
- ]
133
- }
134
- };
135
- function w(e) {
136
- return e <= 2 ? {
137
- label: "Low Risk",
138
- color: "text-status-success-text"
139
- } : e <= 4 ? {
140
- label: "Moderate Risk",
141
- color: "text-status-warning-text"
142
- } : {
143
- label: "High Risk",
144
- color: "text-status-error-text"
145
- };
146
- }
147
- function T(e) {
148
- return e <= 2 ? "bg-status-success-bg-subtle" : e <= 4 ? "bg-status-warning-bg-subtle" : "bg-status-error-bg-subtle";
149
- }
150
- function E(e) {
151
- return e >= 8 ? {
152
- label: "Well Diversified",
153
- color: "text-status-success-text"
154
- } : e >= 6 ? {
155
- label: "Moderately Diversified",
156
- color: "text-status-warning-text"
157
- } : {
158
- label: "Poorly Diversified",
159
- color: "text-status-error-text"
160
- };
161
- }
162
- function D(e) {
163
- return e >= 8 ? "bg-status-success-bg-subtle" : e >= 6 ? "bg-status-warning-bg-subtle" : "bg-status-error-bg-subtle";
164
- }
165
- function O() {
166
- let { navigateTo: O } = e(), [k, A] = s(!0), [j, M] = s("6m"), [N, P] = s(null), [F, I] = s("idle");
167
- o(() => {
168
- A(!0);
169
- let e = setTimeout(() => {
170
- P(C), A(!1);
171
- }, 600);
172
- return () => clearTimeout(e);
173
- }, [j]);
174
- let L = a(() => {
175
- I("exporting"), setTimeout(() => {
176
- I("done"), setTimeout(() => I("idle"), 2e3);
177
- }, 1200);
178
- }, []);
179
- if (k || !N) return /* @__PURE__ */ b(n, {
180
- title: "Investment Analytics",
181
- description: "Loading analytics...",
182
- children: /* @__PURE__ */ b("div", {
183
- className: "flex items-center justify-center py-20",
184
- children: /* @__PURE__ */ x("div", {
185
- className: "text-center",
186
- children: [/* @__PURE__ */ b("div", { className: "mx-auto mb-4 h-12 w-12 animate-spin rounded-full border-b-2 border-primary" }), /* @__PURE__ */ b("p", {
187
- className: "text-sm text-text-secondary",
188
- children: "Loading analytics data..."
189
- })]
190
- })
191
- })
192
- });
193
- let R = w(N.riskAnalysis.riskScore), z = E(N.riskAnalysis.diversificationScore), B = [...N.performanceByCart].sort((e, t) => t.roi - e.roi);
194
- return /* @__PURE__ */ x(n, {
195
- title: "Investment Analytics",
196
- description: "Comprehensive analysis of your portfolio performance",
197
- purpose: "Go deep on how your money is working — returns over time, performance by cart and category, and risk spread across your holdings. Use it to rebalance, double down on winners, and trim what's lagging.",
198
- actions: /* @__PURE__ */ x("div", {
199
- className: "flex items-center gap-3",
200
- children: [/* @__PURE__ */ x("select", {
201
- value: j,
202
- onChange: (e) => M(e.target.value),
203
- className: "rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
204
- children: [
205
- /* @__PURE__ */ b("option", {
206
- value: "1m",
207
- children: "Last Month"
208
- }),
209
- /* @__PURE__ */ b("option", {
210
- value: "3m",
211
- children: "Last 3 Months"
212
- }),
213
- /* @__PURE__ */ b("option", {
214
- value: "6m",
215
- children: "Last 6 Months"
216
- }),
217
- /* @__PURE__ */ b("option", {
218
- value: "1y",
219
- children: "Last Year"
220
- }),
221
- /* @__PURE__ */ b("option", {
222
- value: "all",
223
- children: "All Time"
224
- })
225
- ]
226
- }), /* @__PURE__ */ x("button", {
227
- type: "button",
228
- onClick: L,
229
- disabled: F === "exporting",
230
- className: t("flex items-center gap-2 rounded-lg px-4 py-2 text-sm font-medium transition-colors", F === "exporting" ? "cursor-not-allowed bg-bg-sunken text-text-secondary" : F === "done" ? "bg-status-success-bg-subtle text-white" : "bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg/90"),
231
- children: [/* @__PURE__ */ b(p, { className: "h-4 w-4" }), F === "exporting" ? "Exporting..." : F === "done" ? "Exported!" : "Export Report"]
232
- })]
233
- }),
234
- children: [
235
- /* @__PURE__ */ b(S, { children: /* @__PURE__ */ x("div", {
236
- className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",
237
- children: [
238
- /* @__PURE__ */ b(r, {
239
- icon: /* @__PURE__ */ b(y, { className: "h-5 w-5" }),
240
- value: i(N.portfolioMetrics.totalValue, { minimumFractionDigits: 0 }),
241
- label: "Portfolio Value",
242
- trend: "up",
243
- trendValue: `+${N.portfolioMetrics.portfolioGrowth}% total growth`
244
- }),
245
- /* @__PURE__ */ b(r, {
246
- icon: /* @__PURE__ */ b(v, { className: "h-5 w-5" }),
247
- value: i(N.portfolioMetrics.totalReturns, { minimumFractionDigits: 0 }),
248
- label: "Total Returns",
249
- trend: "up",
250
- trendValue: "Profit earned so far"
251
- }),
252
- /* @__PURE__ */ b(r, {
253
- icon: /* @__PURE__ */ b(_, { className: "h-5 w-5" }),
254
- value: `${N.portfolioMetrics.averageRoi}%`,
255
- label: "Average ROI",
256
- trend: "up",
257
- trendValue: "Across all investments"
258
- }),
259
- /* @__PURE__ */ b(r, {
260
- icon: /* @__PURE__ */ b(c, { className: "h-5 w-5" }),
261
- value: `${N.riskAnalysis.riskScore}/5`,
262
- label: "Risk Score",
263
- trend: "neutral",
264
- trendValue: R.label
265
- })
266
- ]
267
- }) }),
268
- /* @__PURE__ */ x("div", {
269
- className: "mt-4 grid grid-cols-1 gap-4 sm:grid-cols-2",
270
- children: [/* @__PURE__ */ x("div", {
271
- className: "flex items-center gap-3 rounded-lg border border-border-seam bg-bg-surface p-4 bg-gloss-card shadow-pop",
272
- children: [/* @__PURE__ */ b("div", {
273
- className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-status-success-bg-subtle/10",
274
- children: /* @__PURE__ */ b(u, { className: "h-5 w-5 text-status-success-text" })
275
- }), /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
276
- className: "text-xs text-text-secondary",
277
- children: "Best Performing"
278
- }), /* @__PURE__ */ b("p", {
279
- className: "text-sm font-semibold text-status-success-text",
280
- children: N.portfolioMetrics.bestPerforming
281
- })] })]
282
- }), /* @__PURE__ */ x("div", {
283
- className: "flex items-center gap-3 rounded-lg border border-border-seam bg-bg-surface p-4 bg-gloss-card shadow-pop",
284
- children: [/* @__PURE__ */ b("div", {
285
- className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-status-error-bg-subtle/10",
286
- children: /* @__PURE__ */ b(l, { className: "h-5 w-5 text-status-error-text" })
287
- }), /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
288
- className: "text-xs text-text-secondary",
289
- children: "Worst Performing"
290
- }), /* @__PURE__ */ b("p", {
291
- className: "text-sm font-semibold text-text-primary",
292
- children: N.portfolioMetrics.worstPerforming
293
- })] })]
294
- })]
295
- }),
296
- /* @__PURE__ */ x("div", {
297
- className: "mt-6 grid grid-cols-1 gap-6 lg:grid-cols-2",
298
- children: [/* @__PURE__ */ x("section", { children: [/* @__PURE__ */ x("div", {
299
- className: "mb-4 flex items-center gap-2",
300
- children: [/* @__PURE__ */ b(d, { className: "h-5 w-5 text-text-secondary" }), /* @__PURE__ */ b("h2", {
301
- className: "text-lg font-semibold text-text-primary",
302
- children: "Performance by Cart"
303
- })]
304
- }), /* @__PURE__ */ b("div", {
305
- className: "space-y-3",
306
- children: B.map((e, n) => /* @__PURE__ */ x("div", {
307
- className: "flex items-center justify-between rounded-lg border border-border-subtle bg-bg-surface p-3",
308
- children: [/* @__PURE__ */ x("div", {
309
- className: "flex items-center gap-3",
310
- children: [/* @__PURE__ */ b("div", {
311
- className: "flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-action-primary-bg text-xs font-bold text-action-primary-text",
312
- children: n + 1
313
- }), /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
314
- className: "text-sm font-medium text-text-primary",
315
- children: e.cartName
316
- }), /* @__PURE__ */ x("p", {
317
- className: "text-xs text-text-secondary",
318
- children: [i(e.investedAmount, { minimumFractionDigits: 0 }), " invested"]
319
- })] })]
320
- }), /* @__PURE__ */ x("div", {
321
- className: "text-right",
322
- children: [/* @__PURE__ */ x("p", {
323
- className: t("text-sm font-semibold", e.returns >= 0 ? "text-status-success-text" : "text-status-error-text"),
324
- children: [e.returns >= 0 ? "+" : "", i(e.returns, { minimumFractionDigits: 0 })]
325
- }), /* @__PURE__ */ x("p", {
326
- className: t("text-xs", e.roi >= 0 ? "text-status-success-text" : "text-status-error-text"),
327
- children: [
328
- e.roi >= 0 ? "+" : "",
329
- e.roi,
330
- "% ROI"
331
- ]
332
- })]
333
- })]
334
- }, e.cartName))
335
- })] }), /* @__PURE__ */ x("section", { children: [/* @__PURE__ */ x("div", {
336
- className: "mb-4 flex items-center gap-2",
337
- children: [/* @__PURE__ */ b(h, { className: "h-5 w-5 text-text-secondary" }), /* @__PURE__ */ b("h2", {
338
- className: "text-lg font-semibold text-text-primary",
339
- children: "Category Distribution"
340
- })]
341
- }), /* @__PURE__ */ b("div", {
342
- className: "space-y-4",
343
- children: N.performanceByCategory.map((e) => /* @__PURE__ */ x("div", {
344
- className: "rounded-lg border border-border-subtle bg-bg-surface p-3",
345
- children: [
346
- /* @__PURE__ */ x("div", {
347
- className: "mb-2 flex items-center justify-between",
348
- children: [/* @__PURE__ */ b("span", {
349
- className: "text-sm font-medium text-text-primary",
350
- children: e.category
351
- }), /* @__PURE__ */ x("span", {
352
- className: "text-sm text-text-secondary",
353
- children: [e.percentage, "%"]
354
- })]
355
- }),
356
- /* @__PURE__ */ b("div", {
357
- className: "mb-2 h-2 w-full overflow-hidden rounded-full bg-bg-sunken",
358
- children: /* @__PURE__ */ b("div", {
359
- className: "h-full rounded-full bg-action-primary-bg transition-all duration-300",
360
- style: { width: `${e.percentage}%` }
361
- })
362
- }),
363
- /* @__PURE__ */ x("div", {
364
- className: "flex items-center justify-between",
365
- children: [/* @__PURE__ */ x("span", {
366
- className: "text-xs text-text-secondary",
367
- children: [i(e.investedAmount, { minimumFractionDigits: 0 }), " invested"]
368
- }), /* @__PURE__ */ x("span", {
369
- className: t("text-xs font-semibold", e.returns >= 0 ? "text-status-success-text" : "text-status-error-text"),
370
- children: [e.returns >= 0 ? "+" : "", i(e.returns, { minimumFractionDigits: 0 })]
371
- })]
372
- })
373
- ]
374
- }, e.category))
375
- })] })]
376
- }),
377
- /* @__PURE__ */ x("section", {
378
- className: "mt-8",
379
- children: [/* @__PURE__ */ x("div", {
380
- className: "mb-4 flex items-center gap-2",
381
- children: [/* @__PURE__ */ b(f, { className: "h-5 w-5 text-text-secondary" }), /* @__PURE__ */ b("h2", {
382
- className: "text-lg font-semibold text-text-primary",
383
- children: "Portfolio Growth Trend"
384
- })]
385
- }), /* @__PURE__ */ b("div", {
386
- className: "overflow-hidden rounded-lg border border-border-subtle bg-bg-surface",
387
- children: /* @__PURE__ */ b("div", {
388
- className: "overflow-x-auto",
389
- children: /* @__PURE__ */ x("table", {
390
- className: "w-full",
391
- children: [/* @__PURE__ */ b("thead", { children: /* @__PURE__ */ x("tr", {
392
- className: "border-b border-border-subtle bg-bg-sunken/50",
393
- children: [
394
- /* @__PURE__ */ b("th", {
395
- className: "px-4 py-3 text-left text-xs font-medium uppercase tracking-wider text-text-secondary sm:px-6",
396
- children: "Month"
397
- }),
398
- /* @__PURE__ */ b("th", {
399
- className: "px-4 py-3 text-left text-xs font-medium uppercase tracking-wider text-text-secondary sm:px-6",
400
- children: "Invested"
401
- }),
402
- /* @__PURE__ */ b("th", {
403
- className: "px-4 py-3 text-left text-xs font-medium uppercase tracking-wider text-text-secondary sm:px-6",
404
- children: "Portfolio Value"
405
- }),
406
- /* @__PURE__ */ b("th", {
407
- className: "px-4 py-3 text-left text-xs font-medium uppercase tracking-wider text-text-secondary sm:px-6",
408
- children: "Returns"
409
- }),
410
- /* @__PURE__ */ b("th", {
411
- className: "px-4 py-3 text-left text-xs font-medium uppercase tracking-wider text-text-secondary sm:px-6",
412
- children: "Growth %"
413
- })
414
- ]
415
- }) }), /* @__PURE__ */ b("tbody", {
416
- className: "divide-y divide-border",
417
- children: N.monthlyPerformance.map((e) => {
418
- let n = e.invested > 0 ? ((e.value - e.invested) / e.invested * 100).toFixed(1) : "0.0";
419
- return /* @__PURE__ */ x("tr", {
420
- className: "hover:bg-accent/50 transition-colors",
421
- children: [
422
- /* @__PURE__ */ b("td", {
423
- className: "whitespace-nowrap px-4 py-4 text-sm font-medium text-text-primary sm:px-6",
424
- children: e.month
425
- }),
426
- /* @__PURE__ */ b("td", {
427
- className: "whitespace-nowrap px-4 py-4 text-sm text-text-primary sm:px-6",
428
- children: i(e.invested, { minimumFractionDigits: 0 })
429
- }),
430
- /* @__PURE__ */ b("td", {
431
- className: "whitespace-nowrap px-4 py-4 text-sm text-text-primary sm:px-6",
432
- children: i(e.value, { minimumFractionDigits: 0 })
433
- }),
434
- /* @__PURE__ */ b("td", {
435
- className: "whitespace-nowrap px-4 py-4 text-sm sm:px-6",
436
- children: /* @__PURE__ */ x("span", {
437
- className: t("font-semibold", e.returns >= 0 ? "text-status-success-text" : "text-status-error-text"),
438
- children: [e.returns >= 0 ? "+" : "", i(e.returns, { minimumFractionDigits: 0 })]
439
- })
440
- }),
441
- /* @__PURE__ */ b("td", {
442
- className: "whitespace-nowrap px-4 py-4 text-sm sm:px-6",
443
- children: /* @__PURE__ */ x("span", {
444
- className: t("font-medium", parseFloat(n) >= 0 ? "text-status-success-text" : "text-status-error-text"),
445
- children: [
446
- parseFloat(n) >= 0 ? "+" : "",
447
- n,
448
- "%"
449
- ]
450
- })
451
- })
452
- ]
453
- }, e.month);
454
- })
455
- })]
456
- })
457
- })
458
- })]
459
- }),
460
- /* @__PURE__ */ x("div", {
461
- className: "mt-8 grid grid-cols-1 gap-6 lg:grid-cols-2",
462
- children: [/* @__PURE__ */ x("section", { children: [/* @__PURE__ */ x("div", {
463
- className: "mb-4 flex items-center gap-2",
464
- children: [/* @__PURE__ */ b(g, { className: "h-5 w-5 text-text-secondary" }), /* @__PURE__ */ b("h2", {
465
- className: "text-lg font-semibold text-text-primary",
466
- children: "Risk Analysis"
467
- })]
468
- }), /* @__PURE__ */ b("div", {
469
- className: "rounded-lg border border-border-seam bg-bg-surface p-4 sm:p-6 bg-gloss-card shadow-pop",
470
- children: /* @__PURE__ */ x("div", {
471
- className: "space-y-5",
472
- children: [
473
- /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ x("div", {
474
- className: "mb-2 flex items-center justify-between",
475
- children: [/* @__PURE__ */ b("span", {
476
- className: "text-sm text-text-primary",
477
- children: "Risk Score"
478
- }), /* @__PURE__ */ x("span", {
479
- className: t("text-sm font-semibold", R.color),
480
- children: [
481
- N.riskAnalysis.riskScore,
482
- "/5 (",
483
- R.label,
484
- ")"
485
- ]
486
- })]
487
- }), /* @__PURE__ */ b("div", {
488
- className: "h-3 w-full overflow-hidden rounded-full bg-bg-sunken",
489
- children: /* @__PURE__ */ b("div", {
490
- className: t("h-full rounded-full transition-all duration-300", T(N.riskAnalysis.riskScore)),
491
- style: { width: `${N.riskAnalysis.riskScore / 5 * 100}%` }
492
- })
493
- })] }),
494
- /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ x("div", {
495
- className: "mb-2 flex items-center justify-between",
496
- children: [/* @__PURE__ */ b("span", {
497
- className: "text-sm text-text-primary",
498
- children: "Diversification"
499
- }), /* @__PURE__ */ x("span", {
500
- className: t("text-sm font-semibold", z.color),
501
- children: [
502
- N.riskAnalysis.diversificationScore,
503
- "/10 (",
504
- z.label,
505
- ")"
506
- ]
507
- })]
508
- }), /* @__PURE__ */ b("div", {
509
- className: "h-3 w-full overflow-hidden rounded-full bg-bg-sunken",
510
- children: /* @__PURE__ */ b("div", {
511
- className: t("h-full rounded-full transition-all duration-300", D(N.riskAnalysis.diversificationScore)),
512
- style: { width: `${N.riskAnalysis.diversificationScore / 10 * 100}%` }
513
- })
514
- })] }),
515
- /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ x("div", {
516
- className: "mb-2 flex items-center justify-between",
517
- children: [/* @__PURE__ */ b("span", {
518
- className: "text-sm text-text-primary",
519
- children: "Volatility"
520
- }), /* @__PURE__ */ x("span", {
521
- className: t("text-sm font-semibold", w(N.riskAnalysis.volatilityScore).color),
522
- children: [N.riskAnalysis.volatilityScore, "/5"]
523
- })]
524
- }), /* @__PURE__ */ b("div", {
525
- className: "h-3 w-full overflow-hidden rounded-full bg-bg-sunken",
526
- children: /* @__PURE__ */ b("div", {
527
- className: t("h-full rounded-full transition-all duration-300", T(N.riskAnalysis.volatilityScore)),
528
- style: { width: `${N.riskAnalysis.volatilityScore / 5 * 100}%` }
529
- })
530
- })] }),
531
- /* @__PURE__ */ x("div", {
532
- className: "grid grid-cols-2 gap-3 border-t border-border-subtle pt-4",
533
- children: [/* @__PURE__ */ x("div", {
534
- className: "rounded-lg bg-bg-sunken/50 p-3 text-center",
535
- children: [/* @__PURE__ */ b("p", {
536
- className: "text-lg font-bold text-text-primary",
537
- children: N.performanceByCart.length
538
- }), /* @__PURE__ */ b("p", {
539
- className: "text-xs text-text-secondary",
540
- children: "Active Investments"
541
- })]
542
- }), /* @__PURE__ */ x("div", {
543
- className: "rounded-lg bg-bg-sunken/50 p-3 text-center",
544
- children: [/* @__PURE__ */ b("p", {
545
- className: "text-lg font-bold text-text-primary",
546
- children: N.performanceByCategory.length
547
- }), /* @__PURE__ */ b("p", {
548
- className: "text-xs text-text-secondary",
549
- children: "Sectors Covered"
550
- })]
551
- })]
552
- })
553
- ]
554
- })
555
- })] }), /* @__PURE__ */ x("section", { children: [/* @__PURE__ */ x("div", {
556
- className: "mb-4 flex items-center gap-2",
557
- children: [/* @__PURE__ */ b(m, { className: "h-5 w-5 text-status-warning-text" }), /* @__PURE__ */ b("h2", {
558
- className: "text-lg font-semibold text-text-primary",
559
- children: "Recommendations"
560
- })]
561
- }), /* @__PURE__ */ x("div", {
562
- className: "rounded-lg border border-border-seam bg-bg-surface p-4 sm:p-6 bg-gloss-card shadow-pop",
563
- children: [/* @__PURE__ */ b("div", {
564
- className: "space-y-3",
565
- children: N.riskAnalysis.recommendations.map((e, t) => /* @__PURE__ */ x("div", {
566
- className: "flex items-start gap-3 rounded-lg border border-border-subtle bg-bg-sunken/30 p-3",
567
- children: [/* @__PURE__ */ b("div", {
568
- className: "flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-action-primary-bg text-xs font-bold text-action-primary-text",
569
- children: t + 1
570
- }), /* @__PURE__ */ b("p", {
571
- className: "text-sm leading-relaxed text-text-primary",
572
- children: e
573
- })]
574
- }, t))
575
- }), /* @__PURE__ */ x("div", {
576
- className: "mt-5 rounded-lg border border-border-subtle bg-bg-sunken/50 p-4",
577
- children: [/* @__PURE__ */ b("h4", {
578
- className: "mb-2 text-sm font-semibold text-text-primary",
579
- children: "Overall Assessment"
580
- }), /* @__PURE__ */ x("div", {
581
- className: "space-y-2",
582
- children: [
583
- /* @__PURE__ */ x("div", {
584
- className: "flex items-center justify-between",
585
- children: [/* @__PURE__ */ b("span", {
586
- className: "text-xs text-text-secondary",
587
- children: "Portfolio Health"
588
- }), /* @__PURE__ */ x("div", {
589
- className: "flex items-center gap-2",
590
- children: [/* @__PURE__ */ b("div", {
591
- className: "flex gap-0.5",
592
- children: [
593
- 1,
594
- 2,
595
- 3,
596
- 4,
597
- 5
598
- ].map((e) => /* @__PURE__ */ b("div", { className: t("h-2 w-4 rounded-sm", e <= 4 ? "bg-status-success-bg-subtle" : "bg-bg-sunken") }, e))
599
- }), /* @__PURE__ */ b("span", {
600
- className: "text-xs font-medium text-text-primary",
601
- children: "4/5"
602
- })]
603
- })]
604
- }),
605
- /* @__PURE__ */ x("div", {
606
- className: "flex items-center justify-between",
607
- children: [/* @__PURE__ */ b("span", {
608
- className: "text-xs text-text-secondary",
609
- children: "Growth Potential"
610
- }), /* @__PURE__ */ x("div", {
611
- className: "flex items-center gap-2",
612
- children: [/* @__PURE__ */ b("div", {
613
- className: "flex gap-0.5",
614
- children: [
615
- 1,
616
- 2,
617
- 3,
618
- 4,
619
- 5
620
- ].map((e) => /* @__PURE__ */ b("div", { className: t("h-2 w-4 rounded-sm", e <= 3 ? "bg-status-warning-bg-subtle" : "bg-bg-sunken") }, e))
621
- }), /* @__PURE__ */ b("span", {
622
- className: "text-xs font-medium text-text-primary",
623
- children: "3/5"
624
- })]
625
- })]
626
- }),
627
- /* @__PURE__ */ x("div", {
628
- className: "flex items-center justify-between",
629
- children: [/* @__PURE__ */ b("span", {
630
- className: "text-xs text-text-secondary",
631
- children: "Income Stability"
632
- }), /* @__PURE__ */ x("div", {
633
- className: "flex items-center gap-2",
634
- children: [/* @__PURE__ */ b("div", {
635
- className: "flex gap-0.5",
636
- children: [
637
- 1,
638
- 2,
639
- 3,
640
- 4,
641
- 5
642
- ].map((e) => /* @__PURE__ */ b("div", { className: t("h-2 w-4 rounded-sm", e <= 4 ? "bg-status-success-bg-subtle" : "bg-bg-sunken") }, e))
643
- }), /* @__PURE__ */ b("span", {
644
- className: "text-xs font-medium text-text-primary",
645
- children: "4/5"
646
- })]
647
- })]
648
- })
649
- ]
650
- })]
651
- })]
652
- })] })]
653
- }),
654
- /* @__PURE__ */ x("div", {
655
- className: "mt-8 flex flex-wrap gap-3",
656
- children: [
657
- /* @__PURE__ */ x("button", {
658
- type: "button",
659
- onClick: () => O("/investor/portfolio"),
660
- className: "flex items-center gap-2 rounded-lg border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
661
- children: [/* @__PURE__ */ b(h, { className: "h-4 w-4" }), "View Portfolio"]
662
- }),
663
- /* @__PURE__ */ x("button", {
664
- type: "button",
665
- onClick: () => O("/investor/opportunities"),
666
- className: "flex items-center gap-2 rounded-lg border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
667
- children: [/* @__PURE__ */ b(_, { className: "h-4 w-4" }), "Browse Opportunities"]
668
- }),
669
- /* @__PURE__ */ x("button", {
670
- type: "button",
671
- onClick: () => O("/investor/investments"),
672
- className: "flex items-center gap-2 rounded-lg border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
673
- children: [/* @__PURE__ */ b(y, { className: "h-4 w-4" }), "My Investments"]
674
- })
675
- ]
676
- })
677
- ]
678
- });
679
- }
680
- //#endregion
681
- export { O as InvestorAnalyticsPage };
682
-
683
- //# sourceMappingURL=InvestorAnalyticsPage.js.map