@burdenoff/microfe-coolandlovely 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 (165) hide show
  1. package/dist/coolandlovely/CoolAndLovelyRoot.js +66 -122
  2. package/dist/coolandlovely/CoolAndLovelyRoot.js.map +1 -1
  3. package/dist/coolandlovely/CoolAndLovelyRoutes.js +87 -175
  4. package/dist/coolandlovely/CoolAndLovelyRoutes.js.map +1 -1
  5. package/dist/coolandlovely/components/Field.js +81 -0
  6. package/dist/coolandlovely/components/Field.js.map +1 -0
  7. package/dist/coolandlovely/components/StateViews.js +34 -0
  8. package/dist/coolandlovely/components/StateViews.js.map +1 -0
  9. package/dist/coolandlovely/components/StatusBadge.js +25 -22
  10. package/dist/coolandlovely/components/StatusBadge.js.map +1 -1
  11. package/dist/coolandlovely/components/TagList.js +21 -0
  12. package/dist/coolandlovely/components/TagList.js.map +1 -0
  13. package/dist/coolandlovely/components/Thumbnail.js +29 -0
  14. package/dist/coolandlovely/components/Thumbnail.js.map +1 -0
  15. package/dist/coolandlovely/context/CoolAndLovelyContext.js +10 -10
  16. package/dist/coolandlovely/context/CoolAndLovelyContext.js.map +1 -1
  17. package/dist/coolandlovely/hooks/index.js +1 -0
  18. package/dist/coolandlovely/hooks/useCoolAndLovelyApi.js +462 -169
  19. package/dist/coolandlovely/hooks/useCoolAndLovelyApi.js.map +1 -1
  20. package/dist/coolandlovely/pages/HomePage.js +251 -845
  21. package/dist/coolandlovely/pages/HomePage.js.map +1 -1
  22. package/dist/coolandlovely/pages/brands/BrandDetailPage.js +319 -0
  23. package/dist/coolandlovely/pages/brands/BrandDetailPage.js.map +1 -0
  24. package/dist/coolandlovely/pages/brands/BrandFormPage.js +190 -0
  25. package/dist/coolandlovely/pages/brands/BrandFormPage.js.map +1 -0
  26. package/dist/coolandlovely/pages/brands/BrandsListPage.js +158 -0
  27. package/dist/coolandlovely/pages/brands/BrandsListPage.js.map +1 -0
  28. package/dist/coolandlovely/pages/collaborations/CollaborationDetailPage.js +253 -0
  29. package/dist/coolandlovely/pages/collaborations/CollaborationDetailPage.js.map +1 -0
  30. package/dist/coolandlovely/pages/collaborations/CollaborationFormPage.js +206 -0
  31. package/dist/coolandlovely/pages/collaborations/CollaborationFormPage.js.map +1 -0
  32. package/dist/coolandlovely/pages/collaborations/CollaborationsListPage.js +129 -0
  33. package/dist/coolandlovely/pages/collaborations/CollaborationsListPage.js.map +1 -0
  34. package/dist/coolandlovely/pages/collections/CollectionDetailPage.js +217 -0
  35. package/dist/coolandlovely/pages/collections/CollectionDetailPage.js.map +1 -0
  36. package/dist/coolandlovely/pages/collections/CollectionFormPage.js +217 -0
  37. package/dist/coolandlovely/pages/collections/CollectionFormPage.js.map +1 -0
  38. package/dist/coolandlovely/pages/collections/CollectionsListPage.js +122 -0
  39. package/dist/coolandlovely/pages/collections/CollectionsListPage.js.map +1 -0
  40. package/dist/coolandlovely/pages/items/StyleItemDetailPage.js +230 -0
  41. package/dist/coolandlovely/pages/items/StyleItemDetailPage.js.map +1 -0
  42. package/dist/coolandlovely/pages/items/StyleItemFormPage.js +276 -0
  43. package/dist/coolandlovely/pages/items/StyleItemFormPage.js.map +1 -0
  44. package/dist/coolandlovely/pages/items/StyleItemsListPage.js +170 -0
  45. package/dist/coolandlovely/pages/items/StyleItemsListPage.js.map +1 -0
  46. package/dist/coolandlovely/pages/lookbooks/LookbookDetailPage.js +124 -0
  47. package/dist/coolandlovely/pages/lookbooks/LookbookDetailPage.js.map +1 -0
  48. package/dist/coolandlovely/pages/lookbooks/LookbooksListPage.js +156 -0
  49. package/dist/coolandlovely/pages/lookbooks/LookbooksListPage.js.map +1 -0
  50. package/dist/coolandlovely/pages/looks/LookDetailPage.js +238 -0
  51. package/dist/coolandlovely/pages/looks/LookDetailPage.js.map +1 -0
  52. package/dist/coolandlovely/pages/looks/LookFormPage.js +209 -0
  53. package/dist/coolandlovely/pages/looks/LookFormPage.js.map +1 -0
  54. package/dist/coolandlovely/pages/looks/LooksListPage.js +181 -0
  55. package/dist/coolandlovely/pages/looks/LooksListPage.js.map +1 -0
  56. package/dist/coolandlovely/pages/profile/StyleProfilePage.js +224 -0
  57. package/dist/coolandlovely/pages/profile/StyleProfilePage.js.map +1 -0
  58. package/dist/coolandlovely/pages/wardrobe/WardrobeFormPage.js +173 -0
  59. package/dist/coolandlovely/pages/wardrobe/WardrobeFormPage.js.map +1 -0
  60. package/dist/coolandlovely/pages/wardrobe/WardrobeListPage.js +172 -0
  61. package/dist/coolandlovely/pages/wardrobe/WardrobeListPage.js.map +1 -0
  62. package/dist/coolandlovely/store/coolandlovelyStore.js +2 -6
  63. package/dist/coolandlovely/store/coolandlovelyStore.js.map +1 -1
  64. package/dist/coolandlovely/utils/formatters.js +31 -23
  65. package/dist/coolandlovely/utils/formatters.js.map +1 -1
  66. package/dist/coolandlovely/utils/icons.js +34 -0
  67. package/dist/coolandlovely/utils/icons.js.map +1 -0
  68. package/dist/index.js +4 -4
  69. package/package.json +1 -1
  70. package/dist/coolandlovely/components/InvestmentCard.js +0 -98
  71. package/dist/coolandlovely/components/InvestmentCard.js.map +0 -1
  72. package/dist/coolandlovely/components/RatingDisplay.js +0 -35
  73. package/dist/coolandlovely/components/RatingDisplay.js.map +0 -1
  74. package/dist/coolandlovely/mocks/data.js +0 -1517
  75. package/dist/coolandlovely/mocks/data.js.map +0 -1
  76. package/dist/coolandlovely/mocks/users.js +0 -34
  77. package/dist/coolandlovely/mocks/users.js.map +0 -1
  78. package/dist/coolandlovely/pages/admin/AdminAnalyticsPage.js +0 -651
  79. package/dist/coolandlovely/pages/admin/AdminAnalyticsPage.js.map +0 -1
  80. package/dist/coolandlovely/pages/admin/AdminDashboard.js +0 -673
  81. package/dist/coolandlovely/pages/admin/AdminDashboard.js.map +0 -1
  82. package/dist/coolandlovely/pages/admin/AdminFinancialPage.js +0 -427
  83. package/dist/coolandlovely/pages/admin/AdminFinancialPage.js.map +0 -1
  84. package/dist/coolandlovely/pages/admin/AdminOrdersPage.js +0 -665
  85. package/dist/coolandlovely/pages/admin/AdminOrdersPage.js.map +0 -1
  86. package/dist/coolandlovely/pages/admin/AdminProfilePage.js +0 -264
  87. package/dist/coolandlovely/pages/admin/AdminProfilePage.js.map +0 -1
  88. package/dist/coolandlovely/pages/admin/AdminSettingsPage.js +0 -654
  89. package/dist/coolandlovely/pages/admin/AdminSettingsPage.js.map +0 -1
  90. package/dist/coolandlovely/pages/admin/CartManagementPage.js +0 -874
  91. package/dist/coolandlovely/pages/admin/CartManagementPage.js.map +0 -1
  92. package/dist/coolandlovely/pages/admin/UserManagementPage.js +0 -898
  93. package/dist/coolandlovely/pages/admin/UserManagementPage.js.map +0 -1
  94. package/dist/coolandlovely/pages/cart-owner/AnalyticsDashboard.js +0 -842
  95. package/dist/coolandlovely/pages/cart-owner/AnalyticsDashboard.js.map +0 -1
  96. package/dist/coolandlovely/pages/cart-owner/BusinessSettingsPage.js +0 -705
  97. package/dist/coolandlovely/pages/cart-owner/BusinessSettingsPage.js.map +0 -1
  98. package/dist/coolandlovely/pages/cart-owner/CartOwnerDashboard.js +0 -802
  99. package/dist/coolandlovely/pages/cart-owner/CartOwnerDashboard.js.map +0 -1
  100. package/dist/coolandlovely/pages/cart-owner/CartOwnerProfilePage.js +0 -891
  101. package/dist/coolandlovely/pages/cart-owner/CartOwnerProfilePage.js.map +0 -1
  102. package/dist/coolandlovely/pages/cart-owner/CartServiceConfigPage.js +0 -639
  103. package/dist/coolandlovely/pages/cart-owner/CartServiceConfigPage.js.map +0 -1
  104. package/dist/coolandlovely/pages/cart-owner/InventoryManagementPage.js +0 -914
  105. package/dist/coolandlovely/pages/cart-owner/InventoryManagementPage.js.map +0 -1
  106. package/dist/coolandlovely/pages/cart-owner/OrderManagementPage.js +0 -882
  107. package/dist/coolandlovely/pages/cart-owner/OrderManagementPage.js.map +0 -1
  108. package/dist/coolandlovely/pages/cart-owner/StaffManagementPage.js +0 -831
  109. package/dist/coolandlovely/pages/cart-owner/StaffManagementPage.js.map +0 -1
  110. package/dist/coolandlovely/pages/common/HelpSupportPage.js +0 -1325
  111. package/dist/coolandlovely/pages/common/HelpSupportPage.js.map +0 -1
  112. package/dist/coolandlovely/pages/common/NotificationCenterPage.js +0 -671
  113. package/dist/coolandlovely/pages/common/NotificationCenterPage.js.map +0 -1
  114. package/dist/coolandlovely/pages/common/SettingsPage.js +0 -973
  115. package/dist/coolandlovely/pages/common/SettingsPage.js.map +0 -1
  116. package/dist/coolandlovely/pages/customer/BookingDetailsPage.js +0 -630
  117. package/dist/coolandlovely/pages/customer/BookingDetailsPage.js.map +0 -1
  118. package/dist/coolandlovely/pages/customer/CartDetailPage.js +0 -623
  119. package/dist/coolandlovely/pages/customer/CartDetailPage.js.map +0 -1
  120. package/dist/coolandlovely/pages/customer/CartDiscoveryPage.js +0 -558
  121. package/dist/coolandlovely/pages/customer/CartDiscoveryPage.js.map +0 -1
  122. package/dist/coolandlovely/pages/customer/CheckoutPage.js +0 -529
  123. package/dist/coolandlovely/pages/customer/CheckoutPage.js.map +0 -1
  124. package/dist/coolandlovely/pages/customer/CustomerDashboard.js +0 -538
  125. package/dist/coolandlovely/pages/customer/CustomerDashboard.js.map +0 -1
  126. package/dist/coolandlovely/pages/customer/CustomerProfilePage.js +0 -658
  127. package/dist/coolandlovely/pages/customer/CustomerProfilePage.js.map +0 -1
  128. package/dist/coolandlovely/pages/customer/DirectServiceBookingPage.js +0 -632
  129. package/dist/coolandlovely/pages/customer/DirectServiceBookingPage.js.map +0 -1
  130. package/dist/coolandlovely/pages/customer/FavoritesPage.js +0 -487
  131. package/dist/coolandlovely/pages/customer/FavoritesPage.js.map +0 -1
  132. package/dist/coolandlovely/pages/customer/OrderHistoryPage.js +0 -447
  133. package/dist/coolandlovely/pages/customer/OrderHistoryPage.js.map +0 -1
  134. package/dist/coolandlovely/pages/customer/OrderTrackingPage.js +0 -425
  135. package/dist/coolandlovely/pages/customer/OrderTrackingPage.js.map +0 -1
  136. package/dist/coolandlovely/pages/customer/PaymentMethodsPage.js +0 -494
  137. package/dist/coolandlovely/pages/customer/PaymentMethodsPage.js.map +0 -1
  138. package/dist/coolandlovely/pages/customer/ReviewsPage.js +0 -616
  139. package/dist/coolandlovely/pages/customer/ReviewsPage.js.map +0 -1
  140. package/dist/coolandlovely/pages/customer/SavedAddressesPage.js +0 -449
  141. package/dist/coolandlovely/pages/customer/SavedAddressesPage.js.map +0 -1
  142. package/dist/coolandlovely/pages/investor/InvestmentDetailsPage.js +0 -887
  143. package/dist/coolandlovely/pages/investor/InvestmentDetailsPage.js.map +0 -1
  144. package/dist/coolandlovely/pages/investor/InvestmentOpportunitiesPage.js +0 -945
  145. package/dist/coolandlovely/pages/investor/InvestmentOpportunitiesPage.js.map +0 -1
  146. package/dist/coolandlovely/pages/investor/InvestorAnalyticsPage.js +0 -687
  147. package/dist/coolandlovely/pages/investor/InvestorAnalyticsPage.js.map +0 -1
  148. package/dist/coolandlovely/pages/investor/InvestorDashboard.js +0 -455
  149. package/dist/coolandlovely/pages/investor/InvestorDashboard.js.map +0 -1
  150. package/dist/coolandlovely/pages/investor/InvestorInvestmentsPage.js +0 -405
  151. package/dist/coolandlovely/pages/investor/InvestorInvestmentsPage.js.map +0 -1
  152. package/dist/coolandlovely/pages/investor/InvestorPortfolioPage.js +0 -602
  153. package/dist/coolandlovely/pages/investor/InvestorPortfolioPage.js.map +0 -1
  154. package/dist/coolandlovely/pages/investor/InvestorProfilePage.js +0 -1070
  155. package/dist/coolandlovely/pages/investor/InvestorProfilePage.js.map +0 -1
  156. package/dist/coolandlovely/pages/worker/TaskDetailsPage.js +0 -533
  157. package/dist/coolandlovely/pages/worker/TaskDetailsPage.js.map +0 -1
  158. package/dist/coolandlovely/pages/worker/WorkerDashboard.js +0 -671
  159. package/dist/coolandlovely/pages/worker/WorkerDashboard.js.map +0 -1
  160. package/dist/coolandlovely/pages/worker/WorkerOrdersPage.js +0 -680
  161. package/dist/coolandlovely/pages/worker/WorkerOrdersPage.js.map +0 -1
  162. package/dist/coolandlovely/pages/worker/WorkerProfilePage.js +0 -692
  163. package/dist/coolandlovely/pages/worker/WorkerProfilePage.js.map +0 -1
  164. package/dist/coolandlovely/pages/worker/WorkerSchedulePage.js +0 -583
  165. package/dist/coolandlovely/pages/worker/WorkerSchedulePage.js.map +0 -1
@@ -1,687 +0,0 @@
1
- import { useCoolAndLovely as e } from "../../context/CoolAndLovelyContext.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, PagePurpose as C } from "@burdenoff/fe-libs/ui";
10
- //#region src/coolandlovely/pages/investor/InvestorAnalyticsPage.tsx
11
- var w = {
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 T(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 E(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 D(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 O(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 k() {
166
- let { navigateTo: k } = e(), [A, j] = s(!0), [M, N] = s("6m"), [P, F] = s(null), [I, L] = s("idle");
167
- o(() => {
168
- j(!0);
169
- let e = setTimeout(() => {
170
- F(w), j(!1);
171
- }, 600);
172
- return () => clearTimeout(e);
173
- }, [M]);
174
- let R = a(() => {
175
- L("exporting"), setTimeout(() => {
176
- L("done"), setTimeout(() => L("idle"), 2e3);
177
- }, 1200);
178
- }, []);
179
- if (A || !P) 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 z = T(P.riskAnalysis.riskScore), B = D(P.riskAnalysis.diversificationScore), V = [...P.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
- actions: /* @__PURE__ */ x("div", {
198
- className: "flex items-center gap-3",
199
- children: [/* @__PURE__ */ x("select", {
200
- value: M,
201
- onChange: (e) => N(e.target.value),
202
- 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)]",
203
- children: [
204
- /* @__PURE__ */ b("option", {
205
- value: "1m",
206
- children: "Last Month"
207
- }),
208
- /* @__PURE__ */ b("option", {
209
- value: "3m",
210
- children: "Last 3 Months"
211
- }),
212
- /* @__PURE__ */ b("option", {
213
- value: "6m",
214
- children: "Last 6 Months"
215
- }),
216
- /* @__PURE__ */ b("option", {
217
- value: "1y",
218
- children: "Last Year"
219
- }),
220
- /* @__PURE__ */ b("option", {
221
- value: "all",
222
- children: "All Time"
223
- })
224
- ]
225
- }), /* @__PURE__ */ x("button", {
226
- type: "button",
227
- onClick: R,
228
- disabled: I === "exporting",
229
- className: t("flex items-center gap-2 rounded-lg px-4 py-2 text-sm font-medium transition-colors", I === "exporting" ? "cursor-not-allowed bg-bg-sunken text-text-secondary" : I === "done" ? "bg-status-success-bg-subtle text-white" : "bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg/90"),
230
- children: [/* @__PURE__ */ b(p, { className: "h-4 w-4" }), I === "exporting" ? "Exporting..." : I === "done" ? "Exported!" : "Export Report"]
231
- })]
232
- }),
233
- children: [
234
- /* @__PURE__ */ b(C, {
235
- className: "mb-6",
236
- icon: /* @__PURE__ */ b(d, { className: "h-4 w-4" }),
237
- children: "Understand how your portfolio is really performing. See total value, returns, ROI and risk at a glance, spot your best and worst performers, adjust the time range, and export a report — turning raw numbers into decisions about where to invest next."
238
- }),
239
- /* @__PURE__ */ x(S, {
240
- className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4 p-4",
241
- children: [
242
- /* @__PURE__ */ b(r, {
243
- icon: /* @__PURE__ */ b(y, { className: "h-5 w-5" }),
244
- value: i(P.portfolioMetrics.totalValue, { minimumFractionDigits: 0 }),
245
- label: "Portfolio Value",
246
- trend: "up",
247
- trendValue: `+${P.portfolioMetrics.portfolioGrowth}% total growth`
248
- }),
249
- /* @__PURE__ */ b(r, {
250
- icon: /* @__PURE__ */ b(v, { className: "h-5 w-5" }),
251
- value: i(P.portfolioMetrics.totalReturns, { minimumFractionDigits: 0 }),
252
- label: "Total Returns",
253
- trend: "up",
254
- trendValue: "Profit earned so far"
255
- }),
256
- /* @__PURE__ */ b(r, {
257
- icon: /* @__PURE__ */ b(_, { className: "h-5 w-5" }),
258
- value: `${P.portfolioMetrics.averageRoi}%`,
259
- label: "Average ROI",
260
- trend: "up",
261
- trendValue: "Across all investments"
262
- }),
263
- /* @__PURE__ */ b(r, {
264
- icon: /* @__PURE__ */ b(c, { className: "h-5 w-5" }),
265
- value: `${P.riskAnalysis.riskScore}/5`,
266
- label: "Risk Score",
267
- trend: "neutral",
268
- trendValue: z.label
269
- })
270
- ]
271
- }),
272
- /* @__PURE__ */ x("div", {
273
- className: "mt-4 grid grid-cols-1 gap-4 sm:grid-cols-2",
274
- children: [/* @__PURE__ */ x("div", {
275
- className: "flex items-center gap-3 rounded-lg border border-border-seam bg-bg-surface p-4 bg-gloss-card shadow-pop",
276
- children: [/* @__PURE__ */ b("div", {
277
- className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-status-success-bg-subtle/10",
278
- children: /* @__PURE__ */ b(u, { className: "h-5 w-5 text-status-success-text" })
279
- }), /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
280
- className: "text-xs text-text-secondary",
281
- children: "Best Performing"
282
- }), /* @__PURE__ */ b("p", {
283
- className: "text-sm font-semibold text-status-success-text",
284
- children: P.portfolioMetrics.bestPerforming
285
- })] })]
286
- }), /* @__PURE__ */ x("div", {
287
- className: "flex items-center gap-3 rounded-lg border border-border-seam bg-bg-surface p-4 bg-gloss-card shadow-pop",
288
- children: [/* @__PURE__ */ b("div", {
289
- className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-status-error-bg-subtle/10",
290
- children: /* @__PURE__ */ b(l, { className: "h-5 w-5 text-status-error-text" })
291
- }), /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
292
- className: "text-xs text-text-secondary",
293
- children: "Worst Performing"
294
- }), /* @__PURE__ */ b("p", {
295
- className: "text-sm font-semibold text-text-primary",
296
- children: P.portfolioMetrics.worstPerforming
297
- })] })]
298
- })]
299
- }),
300
- /* @__PURE__ */ x("div", {
301
- className: "mt-6 grid grid-cols-1 gap-6 lg:grid-cols-2",
302
- children: [/* @__PURE__ */ x("section", { children: [/* @__PURE__ */ x("div", {
303
- className: "mb-4 flex items-center gap-2",
304
- children: [/* @__PURE__ */ b(d, { className: "h-5 w-5 text-text-secondary" }), /* @__PURE__ */ b("h2", {
305
- className: "text-lg font-semibold text-text-primary",
306
- children: "Performance by Cart"
307
- })]
308
- }), /* @__PURE__ */ b("div", {
309
- className: "space-y-3",
310
- children: V.map((e, n) => /* @__PURE__ */ x("div", {
311
- className: "flex items-center justify-between rounded-lg border border-border-subtle bg-bg-surface p-3",
312
- children: [/* @__PURE__ */ x("div", {
313
- className: "flex items-center gap-3",
314
- children: [/* @__PURE__ */ b("div", {
315
- 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",
316
- children: n + 1
317
- }), /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
318
- className: "text-sm font-medium text-text-primary",
319
- children: e.cartName
320
- }), /* @__PURE__ */ x("p", {
321
- className: "text-xs text-text-secondary",
322
- children: [i(e.investedAmount, { minimumFractionDigits: 0 }), " invested"]
323
- })] })]
324
- }), /* @__PURE__ */ x("div", {
325
- className: "text-right",
326
- children: [/* @__PURE__ */ x("p", {
327
- className: t("text-sm font-semibold", e.returns >= 0 ? "text-status-success-text" : "text-status-error-text"),
328
- children: [e.returns >= 0 ? "+" : "", i(e.returns, { minimumFractionDigits: 0 })]
329
- }), /* @__PURE__ */ x("p", {
330
- className: t("text-xs", e.roi >= 0 ? "text-status-success-text" : "text-status-error-text"),
331
- children: [
332
- e.roi >= 0 ? "+" : "",
333
- e.roi,
334
- "% ROI"
335
- ]
336
- })]
337
- })]
338
- }, e.cartName))
339
- })] }), /* @__PURE__ */ x("section", { children: [/* @__PURE__ */ x("div", {
340
- className: "mb-4 flex items-center gap-2",
341
- children: [/* @__PURE__ */ b(h, { className: "h-5 w-5 text-text-secondary" }), /* @__PURE__ */ b("h2", {
342
- className: "text-lg font-semibold text-text-primary",
343
- children: "Category Distribution"
344
- })]
345
- }), /* @__PURE__ */ b("div", {
346
- className: "space-y-4",
347
- children: P.performanceByCategory.map((e) => /* @__PURE__ */ x("div", {
348
- className: "rounded-lg border border-border-subtle bg-bg-surface p-3",
349
- children: [
350
- /* @__PURE__ */ x("div", {
351
- className: "mb-2 flex items-center justify-between",
352
- children: [/* @__PURE__ */ b("span", {
353
- className: "text-sm font-medium text-text-primary",
354
- children: e.category
355
- }), /* @__PURE__ */ x("span", {
356
- className: "text-sm text-text-secondary",
357
- children: [e.percentage, "%"]
358
- })]
359
- }),
360
- /* @__PURE__ */ b("div", {
361
- className: "mb-2 h-2 w-full overflow-hidden rounded-full bg-bg-sunken",
362
- children: /* @__PURE__ */ b("div", {
363
- className: "h-full rounded-full bg-action-primary-bg transition-all duration-300",
364
- style: { width: `${e.percentage}%` }
365
- })
366
- }),
367
- /* @__PURE__ */ x("div", {
368
- className: "flex items-center justify-between",
369
- children: [/* @__PURE__ */ x("span", {
370
- className: "text-xs text-text-secondary",
371
- children: [i(e.investedAmount, { minimumFractionDigits: 0 }), " invested"]
372
- }), /* @__PURE__ */ x("span", {
373
- className: t("text-xs font-semibold", e.returns >= 0 ? "text-status-success-text" : "text-status-error-text"),
374
- children: [e.returns >= 0 ? "+" : "", i(e.returns, { minimumFractionDigits: 0 })]
375
- })]
376
- })
377
- ]
378
- }, e.category))
379
- })] })]
380
- }),
381
- /* @__PURE__ */ x("section", {
382
- className: "mt-8",
383
- children: [/* @__PURE__ */ x("div", {
384
- className: "mb-4 flex items-center gap-2",
385
- children: [/* @__PURE__ */ b(f, { className: "h-5 w-5 text-text-secondary" }), /* @__PURE__ */ b("h2", {
386
- className: "text-lg font-semibold text-text-primary",
387
- children: "Portfolio Growth Trend"
388
- })]
389
- }), /* @__PURE__ */ b("div", {
390
- className: "overflow-hidden rounded-lg border border-border-subtle bg-bg-surface",
391
- children: /* @__PURE__ */ b("div", {
392
- className: "overflow-x-auto",
393
- children: /* @__PURE__ */ x("table", {
394
- className: "w-full",
395
- children: [/* @__PURE__ */ b("thead", { children: /* @__PURE__ */ x("tr", {
396
- className: "border-b border-border-subtle bg-bg-sunken/50",
397
- children: [
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: "Month"
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: "Invested"
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: "Portfolio Value"
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: "Returns"
413
- }),
414
- /* @__PURE__ */ b("th", {
415
- className: "px-4 py-3 text-left text-xs font-medium uppercase tracking-wider text-text-secondary sm:px-6",
416
- children: "Growth %"
417
- })
418
- ]
419
- }) }), /* @__PURE__ */ b("tbody", {
420
- className: "divide-y divide-border",
421
- children: P.monthlyPerformance.map((e) => {
422
- let n = e.invested > 0 ? ((e.value - e.invested) / e.invested * 100).toFixed(1) : "0.0";
423
- return /* @__PURE__ */ x("tr", {
424
- className: "hover:bg-accent/50 transition-colors",
425
- children: [
426
- /* @__PURE__ */ b("td", {
427
- className: "whitespace-nowrap px-4 py-4 text-sm font-medium text-text-primary sm:px-6",
428
- children: e.month
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.invested, { minimumFractionDigits: 0 })
433
- }),
434
- /* @__PURE__ */ b("td", {
435
- className: "whitespace-nowrap px-4 py-4 text-sm text-text-primary sm:px-6",
436
- children: i(e.value, { minimumFractionDigits: 0 })
437
- }),
438
- /* @__PURE__ */ b("td", {
439
- className: "whitespace-nowrap px-4 py-4 text-sm sm:px-6",
440
- children: /* @__PURE__ */ x("span", {
441
- className: t("font-semibold", e.returns >= 0 ? "text-status-success-text" : "text-status-error-text"),
442
- children: [e.returns >= 0 ? "+" : "", i(e.returns, { minimumFractionDigits: 0 })]
443
- })
444
- }),
445
- /* @__PURE__ */ b("td", {
446
- className: "whitespace-nowrap px-4 py-4 text-sm sm:px-6",
447
- children: /* @__PURE__ */ x("span", {
448
- className: t("font-medium", parseFloat(n) >= 0 ? "text-status-success-text" : "text-status-error-text"),
449
- children: [
450
- parseFloat(n) >= 0 ? "+" : "",
451
- n,
452
- "%"
453
- ]
454
- })
455
- })
456
- ]
457
- }, e.month);
458
- })
459
- })]
460
- })
461
- })
462
- })]
463
- }),
464
- /* @__PURE__ */ x("div", {
465
- className: "mt-8 grid grid-cols-1 gap-6 lg:grid-cols-2",
466
- children: [/* @__PURE__ */ x("section", { children: [/* @__PURE__ */ x("div", {
467
- className: "mb-4 flex items-center gap-2",
468
- children: [/* @__PURE__ */ b(g, { className: "h-5 w-5 text-text-secondary" }), /* @__PURE__ */ b("h2", {
469
- className: "text-lg font-semibold text-text-primary",
470
- children: "Risk Analysis"
471
- })]
472
- }), /* @__PURE__ */ b("div", {
473
- className: "rounded-lg border border-border-seam bg-bg-surface p-4 sm:p-6 bg-gloss-card shadow-pop",
474
- children: /* @__PURE__ */ x("div", {
475
- className: "space-y-5",
476
- children: [
477
- /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ x("div", {
478
- className: "mb-2 flex items-center justify-between",
479
- children: [/* @__PURE__ */ b("span", {
480
- className: "text-sm text-text-primary",
481
- children: "Risk Score"
482
- }), /* @__PURE__ */ x("span", {
483
- className: t("text-sm font-semibold", z.color),
484
- children: [
485
- P.riskAnalysis.riskScore,
486
- "/5 (",
487
- z.label,
488
- ")"
489
- ]
490
- })]
491
- }), /* @__PURE__ */ b("div", {
492
- className: "h-3 w-full overflow-hidden rounded-full bg-bg-sunken",
493
- children: /* @__PURE__ */ b("div", {
494
- className: t("h-full rounded-full transition-all duration-300", E(P.riskAnalysis.riskScore)),
495
- style: { width: `${P.riskAnalysis.riskScore / 5 * 100}%` }
496
- })
497
- })] }),
498
- /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ x("div", {
499
- className: "mb-2 flex items-center justify-between",
500
- children: [/* @__PURE__ */ b("span", {
501
- className: "text-sm text-text-primary",
502
- children: "Diversification"
503
- }), /* @__PURE__ */ x("span", {
504
- className: t("text-sm font-semibold", B.color),
505
- children: [
506
- P.riskAnalysis.diversificationScore,
507
- "/10 (",
508
- B.label,
509
- ")"
510
- ]
511
- })]
512
- }), /* @__PURE__ */ b("div", {
513
- className: "h-3 w-full overflow-hidden rounded-full bg-bg-sunken",
514
- children: /* @__PURE__ */ b("div", {
515
- className: t("h-full rounded-full transition-all duration-300", O(P.riskAnalysis.diversificationScore)),
516
- style: { width: `${P.riskAnalysis.diversificationScore / 10 * 100}%` }
517
- })
518
- })] }),
519
- /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ x("div", {
520
- className: "mb-2 flex items-center justify-between",
521
- children: [/* @__PURE__ */ b("span", {
522
- className: "text-sm text-text-primary",
523
- children: "Volatility"
524
- }), /* @__PURE__ */ x("span", {
525
- className: t("text-sm font-semibold", T(P.riskAnalysis.volatilityScore).color),
526
- children: [P.riskAnalysis.volatilityScore, "/5"]
527
- })]
528
- }), /* @__PURE__ */ b("div", {
529
- className: "h-3 w-full overflow-hidden rounded-full bg-bg-sunken",
530
- children: /* @__PURE__ */ b("div", {
531
- className: t("h-full rounded-full transition-all duration-300", E(P.riskAnalysis.volatilityScore)),
532
- style: { width: `${P.riskAnalysis.volatilityScore / 5 * 100}%` }
533
- })
534
- })] }),
535
- /* @__PURE__ */ x("div", {
536
- className: "grid grid-cols-2 gap-3 border-t border-border-subtle pt-4",
537
- children: [/* @__PURE__ */ x("div", {
538
- className: "rounded-lg bg-bg-sunken/50 p-3 text-center",
539
- children: [/* @__PURE__ */ b("p", {
540
- className: "text-lg font-bold text-text-primary",
541
- children: P.performanceByCart.length
542
- }), /* @__PURE__ */ b("p", {
543
- className: "text-xs text-text-secondary",
544
- children: "Active Investments"
545
- })]
546
- }), /* @__PURE__ */ x("div", {
547
- className: "rounded-lg bg-bg-sunken/50 p-3 text-center",
548
- children: [/* @__PURE__ */ b("p", {
549
- className: "text-lg font-bold text-text-primary",
550
- children: P.performanceByCategory.length
551
- }), /* @__PURE__ */ b("p", {
552
- className: "text-xs text-text-secondary",
553
- children: "Sectors Covered"
554
- })]
555
- })]
556
- })
557
- ]
558
- })
559
- })] }), /* @__PURE__ */ x("section", { children: [/* @__PURE__ */ x("div", {
560
- className: "mb-4 flex items-center gap-2",
561
- children: [/* @__PURE__ */ b(m, { className: "h-5 w-5 text-status-warning-text" }), /* @__PURE__ */ b("h2", {
562
- className: "text-lg font-semibold text-text-primary",
563
- children: "Recommendations"
564
- })]
565
- }), /* @__PURE__ */ x("div", {
566
- className: "rounded-lg border border-border-seam bg-bg-surface p-4 sm:p-6 bg-gloss-card shadow-pop",
567
- children: [/* @__PURE__ */ b("div", {
568
- className: "space-y-3",
569
- children: P.riskAnalysis.recommendations.map((e, t) => /* @__PURE__ */ x("div", {
570
- className: "flex items-start gap-3 rounded-lg border border-border-subtle bg-bg-sunken/30 p-3",
571
- children: [/* @__PURE__ */ b("div", {
572
- 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",
573
- children: t + 1
574
- }), /* @__PURE__ */ b("p", {
575
- className: "text-sm leading-relaxed text-text-primary",
576
- children: e
577
- })]
578
- }, t))
579
- }), /* @__PURE__ */ x("div", {
580
- className: "mt-5 rounded-lg border border-border-subtle bg-bg-sunken/50 p-4",
581
- children: [/* @__PURE__ */ b("h4", {
582
- className: "mb-2 text-sm font-semibold text-text-primary",
583
- children: "Overall Assessment"
584
- }), /* @__PURE__ */ x("div", {
585
- className: "space-y-2",
586
- children: [
587
- /* @__PURE__ */ x("div", {
588
- className: "flex items-center justify-between",
589
- children: [/* @__PURE__ */ b("span", {
590
- className: "text-xs text-text-secondary",
591
- children: "Portfolio Health"
592
- }), /* @__PURE__ */ x("div", {
593
- className: "flex items-center gap-2",
594
- children: [/* @__PURE__ */ b("div", {
595
- className: "flex gap-0.5",
596
- children: [
597
- 1,
598
- 2,
599
- 3,
600
- 4,
601
- 5
602
- ].map((e) => /* @__PURE__ */ b("div", { className: t("h-2 w-4 rounded-sm", e <= 4 ? "bg-status-success-bg-subtle" : "bg-bg-sunken") }, e))
603
- }), /* @__PURE__ */ b("span", {
604
- className: "text-xs font-medium text-text-primary",
605
- children: "4/5"
606
- })]
607
- })]
608
- }),
609
- /* @__PURE__ */ x("div", {
610
- className: "flex items-center justify-between",
611
- children: [/* @__PURE__ */ b("span", {
612
- className: "text-xs text-text-secondary",
613
- children: "Growth Potential"
614
- }), /* @__PURE__ */ x("div", {
615
- className: "flex items-center gap-2",
616
- children: [/* @__PURE__ */ b("div", {
617
- className: "flex gap-0.5",
618
- children: [
619
- 1,
620
- 2,
621
- 3,
622
- 4,
623
- 5
624
- ].map((e) => /* @__PURE__ */ b("div", { className: t("h-2 w-4 rounded-sm", e <= 3 ? "bg-status-warning-bg-subtle" : "bg-bg-sunken") }, e))
625
- }), /* @__PURE__ */ b("span", {
626
- className: "text-xs font-medium text-text-primary",
627
- children: "3/5"
628
- })]
629
- })]
630
- }),
631
- /* @__PURE__ */ x("div", {
632
- className: "flex items-center justify-between",
633
- children: [/* @__PURE__ */ b("span", {
634
- className: "text-xs text-text-secondary",
635
- children: "Income Stability"
636
- }), /* @__PURE__ */ x("div", {
637
- className: "flex items-center gap-2",
638
- children: [/* @__PURE__ */ b("div", {
639
- className: "flex gap-0.5",
640
- children: [
641
- 1,
642
- 2,
643
- 3,
644
- 4,
645
- 5
646
- ].map((e) => /* @__PURE__ */ b("div", { className: t("h-2 w-4 rounded-sm", e <= 4 ? "bg-status-success-bg-subtle" : "bg-bg-sunken") }, e))
647
- }), /* @__PURE__ */ b("span", {
648
- className: "text-xs font-medium text-text-primary",
649
- children: "4/5"
650
- })]
651
- })]
652
- })
653
- ]
654
- })]
655
- })]
656
- })] })]
657
- }),
658
- /* @__PURE__ */ x("div", {
659
- className: "mt-8 flex flex-wrap gap-3",
660
- children: [
661
- /* @__PURE__ */ x("button", {
662
- type: "button",
663
- onClick: () => k("/investor/portfolio"),
664
- 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",
665
- children: [/* @__PURE__ */ b(h, { className: "h-4 w-4" }), "View Portfolio"]
666
- }),
667
- /* @__PURE__ */ x("button", {
668
- type: "button",
669
- onClick: () => k("/investor/opportunities"),
670
- 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",
671
- children: [/* @__PURE__ */ b(_, { className: "h-4 w-4" }), "Browse Opportunities"]
672
- }),
673
- /* @__PURE__ */ x("button", {
674
- type: "button",
675
- onClick: () => k("/investor/investments"),
676
- 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",
677
- children: [/* @__PURE__ */ b(y, { className: "h-4 w-4" }), "My Investments"]
678
- })
679
- ]
680
- })
681
- ]
682
- });
683
- }
684
- //#endregion
685
- export { k as InvestorAnalyticsPage };
686
-
687
- //# sourceMappingURL=InvestorAnalyticsPage.js.map