@burdenoff/microfe-subscriberbot 2026.615.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.
- package/README.md +12 -0
- package/dist/index.js +7 -0
- package/dist/node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.js +18 -0
- package/dist/node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.js.map +1 -0
- package/dist/node_modules/.bun/tailwind-merge@3.5.0/node_modules/tailwind-merge/dist/bundle-mjs.js +1674 -0
- package/dist/node_modules/.bun/tailwind-merge@3.5.0/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -0
- package/dist/subscriberbot/SubscriberBotRoot.js +177 -0
- package/dist/subscriberbot/SubscriberBotRoot.js.map +1 -0
- package/dist/subscriberbot/SubscriberBotRoutes.js +215 -0
- package/dist/subscriberbot/SubscriberBotRoutes.js.map +1 -0
- package/dist/subscriberbot/components/EmptyState.js +28 -0
- package/dist/subscriberbot/components/EmptyState.js.map +1 -0
- package/dist/subscriberbot/components/InvestmentCard.js +96 -0
- package/dist/subscriberbot/components/InvestmentCard.js.map +1 -0
- package/dist/subscriberbot/components/MetricsCard.js +46 -0
- package/dist/subscriberbot/components/MetricsCard.js.map +1 -0
- package/dist/subscriberbot/components/PageLayout.js +26 -0
- package/dist/subscriberbot/components/PageLayout.js.map +1 -0
- package/dist/subscriberbot/components/RatingDisplay.js +35 -0
- package/dist/subscriberbot/components/RatingDisplay.js.map +1 -0
- package/dist/subscriberbot/components/StatusBadge.js +45 -0
- package/dist/subscriberbot/components/StatusBadge.js.map +1 -0
- package/dist/subscriberbot/context/SubscriberBotContext.js +93 -0
- package/dist/subscriberbot/context/SubscriberBotContext.js.map +1 -0
- package/dist/subscriberbot/context/index.js +1 -0
- package/dist/subscriberbot/hooks/useSubscriberBotApi.js +223 -0
- package/dist/subscriberbot/hooks/useSubscriberBotApi.js.map +1 -0
- package/dist/subscriberbot/index.js +7 -0
- package/dist/subscriberbot/mocks/data.js +1517 -0
- package/dist/subscriberbot/mocks/data.js.map +1 -0
- package/dist/subscriberbot/mocks/users.js +34 -0
- package/dist/subscriberbot/mocks/users.js.map +1 -0
- package/dist/subscriberbot/pages/HomePage.js +921 -0
- package/dist/subscriberbot/pages/HomePage.js.map +1 -0
- package/dist/subscriberbot/pages/admin/AdminAnalyticsPage.js +645 -0
- package/dist/subscriberbot/pages/admin/AdminAnalyticsPage.js.map +1 -0
- package/dist/subscriberbot/pages/admin/AdminDashboard.js +639 -0
- package/dist/subscriberbot/pages/admin/AdminDashboard.js.map +1 -0
- package/dist/subscriberbot/pages/admin/AdminFinancialPage.js +421 -0
- package/dist/subscriberbot/pages/admin/AdminFinancialPage.js.map +1 -0
- package/dist/subscriberbot/pages/admin/AdminOrdersPage.js +660 -0
- package/dist/subscriberbot/pages/admin/AdminOrdersPage.js.map +1 -0
- package/dist/subscriberbot/pages/admin/AdminProfilePage.js +259 -0
- package/dist/subscriberbot/pages/admin/AdminProfilePage.js.map +1 -0
- package/dist/subscriberbot/pages/admin/AdminSettingsPage.js +649 -0
- package/dist/subscriberbot/pages/admin/AdminSettingsPage.js.map +1 -0
- package/dist/subscriberbot/pages/admin/CartManagementPage.js +869 -0
- package/dist/subscriberbot/pages/admin/CartManagementPage.js.map +1 -0
- package/dist/subscriberbot/pages/admin/UserManagementPage.js +893 -0
- package/dist/subscriberbot/pages/admin/UserManagementPage.js.map +1 -0
- package/dist/subscriberbot/pages/cart-owner/AnalyticsDashboard.js +834 -0
- package/dist/subscriberbot/pages/cart-owner/AnalyticsDashboard.js.map +1 -0
- package/dist/subscriberbot/pages/cart-owner/BusinessSettingsPage.js +700 -0
- package/dist/subscriberbot/pages/cart-owner/BusinessSettingsPage.js.map +1 -0
- package/dist/subscriberbot/pages/cart-owner/CartOwnerDashboard.js +760 -0
- package/dist/subscriberbot/pages/cart-owner/CartOwnerDashboard.js.map +1 -0
- package/dist/subscriberbot/pages/cart-owner/CartOwnerProfilePage.js +886 -0
- package/dist/subscriberbot/pages/cart-owner/CartOwnerProfilePage.js.map +1 -0
- package/dist/subscriberbot/pages/cart-owner/CartServiceConfigPage.js +631 -0
- package/dist/subscriberbot/pages/cart-owner/CartServiceConfigPage.js.map +1 -0
- package/dist/subscriberbot/pages/cart-owner/InventoryManagementPage.js +913 -0
- package/dist/subscriberbot/pages/cart-owner/InventoryManagementPage.js.map +1 -0
- package/dist/subscriberbot/pages/cart-owner/OrderManagementPage.js +881 -0
- package/dist/subscriberbot/pages/cart-owner/OrderManagementPage.js.map +1 -0
- package/dist/subscriberbot/pages/cart-owner/StaffManagementPage.js +833 -0
- package/dist/subscriberbot/pages/cart-owner/StaffManagementPage.js.map +1 -0
- package/dist/subscriberbot/pages/common/HelpSupportPage.js +1325 -0
- package/dist/subscriberbot/pages/common/HelpSupportPage.js.map +1 -0
- package/dist/subscriberbot/pages/common/NotificationCenterPage.js +665 -0
- package/dist/subscriberbot/pages/common/NotificationCenterPage.js.map +1 -0
- package/dist/subscriberbot/pages/common/SettingsPage.js +964 -0
- package/dist/subscriberbot/pages/common/SettingsPage.js.map +1 -0
- package/dist/subscriberbot/pages/customer/BookingDetailsPage.js +593 -0
- package/dist/subscriberbot/pages/customer/BookingDetailsPage.js.map +1 -0
- package/dist/subscriberbot/pages/customer/CartDetailPage.js +620 -0
- package/dist/subscriberbot/pages/customer/CartDetailPage.js.map +1 -0
- package/dist/subscriberbot/pages/customer/CartDiscoveryPage.js +547 -0
- package/dist/subscriberbot/pages/customer/CartDiscoveryPage.js.map +1 -0
- package/dist/subscriberbot/pages/customer/CheckoutPage.js +532 -0
- package/dist/subscriberbot/pages/customer/CheckoutPage.js.map +1 -0
- package/dist/subscriberbot/pages/customer/CustomerDashboard.js +496 -0
- package/dist/subscriberbot/pages/customer/CustomerDashboard.js.map +1 -0
- package/dist/subscriberbot/pages/customer/CustomerProfilePage.js +621 -0
- package/dist/subscriberbot/pages/customer/CustomerProfilePage.js.map +1 -0
- package/dist/subscriberbot/pages/customer/DirectServiceBookingPage.js +623 -0
- package/dist/subscriberbot/pages/customer/DirectServiceBookingPage.js.map +1 -0
- package/dist/subscriberbot/pages/customer/FavoritesPage.js +477 -0
- package/dist/subscriberbot/pages/customer/FavoritesPage.js.map +1 -0
- package/dist/subscriberbot/pages/customer/OrderHistoryPage.js +438 -0
- package/dist/subscriberbot/pages/customer/OrderHistoryPage.js.map +1 -0
- package/dist/subscriberbot/pages/customer/OrderTrackingPage.js +388 -0
- package/dist/subscriberbot/pages/customer/OrderTrackingPage.js.map +1 -0
- package/dist/subscriberbot/pages/customer/PaymentMethodsPage.js +488 -0
- package/dist/subscriberbot/pages/customer/PaymentMethodsPage.js.map +1 -0
- package/dist/subscriberbot/pages/customer/ReviewsPage.js +606 -0
- package/dist/subscriberbot/pages/customer/ReviewsPage.js.map +1 -0
- package/dist/subscriberbot/pages/customer/SavedAddressesPage.js +443 -0
- package/dist/subscriberbot/pages/customer/SavedAddressesPage.js.map +1 -0
- package/dist/subscriberbot/pages/investor/InvestmentDetailsPage.js +849 -0
- package/dist/subscriberbot/pages/investor/InvestmentDetailsPage.js.map +1 -0
- package/dist/subscriberbot/pages/investor/InvestmentOpportunitiesPage.js +939 -0
- package/dist/subscriberbot/pages/investor/InvestmentOpportunitiesPage.js.map +1 -0
- package/dist/subscriberbot/pages/investor/InvestorAnalyticsPage.js +681 -0
- package/dist/subscriberbot/pages/investor/InvestorAnalyticsPage.js.map +1 -0
- package/dist/subscriberbot/pages/investor/InvestorDashboard.js +419 -0
- package/dist/subscriberbot/pages/investor/InvestorDashboard.js.map +1 -0
- package/dist/subscriberbot/pages/investor/InvestorInvestmentsPage.js +399 -0
- package/dist/subscriberbot/pages/investor/InvestorInvestmentsPage.js.map +1 -0
- package/dist/subscriberbot/pages/investor/InvestorPortfolioPage.js +569 -0
- package/dist/subscriberbot/pages/investor/InvestorPortfolioPage.js.map +1 -0
- package/dist/subscriberbot/pages/investor/InvestorProfilePage.js +1065 -0
- package/dist/subscriberbot/pages/investor/InvestorProfilePage.js.map +1 -0
- package/dist/subscriberbot/pages/worker/TaskDetailsPage.js +496 -0
- package/dist/subscriberbot/pages/worker/TaskDetailsPage.js.map +1 -0
- package/dist/subscriberbot/pages/worker/WorkerDashboard.js +634 -0
- package/dist/subscriberbot/pages/worker/WorkerDashboard.js.map +1 -0
- package/dist/subscriberbot/pages/worker/WorkerOrdersPage.js +675 -0
- package/dist/subscriberbot/pages/worker/WorkerOrdersPage.js.map +1 -0
- package/dist/subscriberbot/pages/worker/WorkerProfilePage.js +687 -0
- package/dist/subscriberbot/pages/worker/WorkerProfilePage.js.map +1 -0
- package/dist/subscriberbot/pages/worker/WorkerSchedulePage.js +578 -0
- package/dist/subscriberbot/pages/worker/WorkerSchedulePage.js.map +1 -0
- package/dist/subscriberbot/store/index.js +1 -0
- package/dist/subscriberbot/store/subscriberbotStore.js +38 -0
- package/dist/subscriberbot/store/subscriberbotStore.js.map +1 -0
- package/dist/subscriberbot/utils/cn.js +10 -0
- package/dist/subscriberbot/utils/cn.js.map +1 -0
- package/dist/subscriberbot/utils/formatters.js +51 -0
- package/dist/subscriberbot/utils/formatters.js.map +1 -0
- package/dist/subscriberbot/utils/navigation.js +9 -0
- package/dist/subscriberbot/utils/navigation.js.map +1 -0
- package/package.json +106 -0
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
import { useSubscriberBot as e } from "./context/SubscriberBotContext.js";
|
|
2
|
+
import { HomePage as t } from "./pages/HomePage.js";
|
|
3
|
+
import { Suspense as n, lazy as r } from "react";
|
|
4
|
+
import { Navigate as ee, Route as i, Routes as a, useLocation as te } from "react-router-dom";
|
|
5
|
+
import { jsx as o, jsxs as ne } from "react/jsx-runtime";
|
|
6
|
+
//#region src/subscriberbot/SubscriberBotRoutes.tsx
|
|
7
|
+
var s = r(() => import("./pages/customer/CustomerDashboard.js").then((e) => ({ default: e.CustomerDashboard }))), c = r(() => import("./pages/customer/CartDiscoveryPage.js").then((e) => ({ default: e.CartDiscoveryPage }))), l = r(() => import("./pages/customer/CartDetailPage.js").then((e) => ({ default: e.CartDetailPage }))), u = r(() => import("./pages/customer/CheckoutPage.js").then((e) => ({ default: e.CheckoutPage }))), d = r(() => import("./pages/customer/OrderTrackingPage.js").then((e) => ({ default: e.OrderTrackingPage }))), f = r(() => import("./pages/customer/OrderHistoryPage.js").then((e) => ({ default: e.OrderHistoryPage }))), p = r(() => import("./pages/customer/CustomerProfilePage.js").then((e) => ({ default: e.CustomerProfilePage }))), m = r(() => import("./pages/customer/SavedAddressesPage.js").then((e) => ({ default: e.SavedAddressesPage }))), h = r(() => import("./pages/customer/FavoritesPage.js").then((e) => ({ default: e.FavoritesPage }))), g = r(() => import("./pages/customer/ReviewsPage.js").then((e) => ({ default: e.ReviewsPage }))), _ = r(() => import("./pages/customer/PaymentMethodsPage.js").then((e) => ({ default: e.PaymentMethodsPage }))), v = r(() => import("./pages/customer/DirectServiceBookingPage.js").then((e) => ({ default: e.DirectServiceBookingPage }))), y = r(() => import("./pages/customer/BookingDetailsPage.js").then((e) => ({ default: e.BookingDetailsPage }))), b = r(() => import("./pages/cart-owner/CartOwnerDashboard.js").then((e) => ({ default: e.CartOwnerDashboard }))), x = r(() => import("./pages/cart-owner/CartServiceConfigPage.js").then((e) => ({ default: e.CartServiceConfigPage }))), S = r(() => import("./pages/cart-owner/InventoryManagementPage.js").then((e) => ({ default: e.InventoryManagementPage }))), C = r(() => import("./pages/cart-owner/OrderManagementPage.js").then((e) => ({ default: e.OrderManagementPage }))), w = r(() => import("./pages/cart-owner/AnalyticsDashboard.js").then((e) => ({ default: e.AnalyticsDashboard }))), T = r(() => import("./pages/cart-owner/StaffManagementPage.js").then((e) => ({ default: e.StaffManagementPage }))), E = r(() => import("./pages/cart-owner/BusinessSettingsPage.js").then((e) => ({ default: e.BusinessSettingsPage }))), D = r(() => import("./pages/cart-owner/CartOwnerProfilePage.js").then((e) => ({ default: e.CartOwnerProfilePage }))), O = r(() => import("./pages/worker/WorkerDashboard.js").then((e) => ({ default: e.WorkerDashboard }))), k = r(() => import("./pages/worker/WorkerOrdersPage.js").then((e) => ({ default: e.WorkerOrdersPage }))), re = r(() => import("./pages/worker/WorkerSchedulePage.js").then((e) => ({ default: e.WorkerSchedulePage }))), A = r(() => import("./pages/worker/WorkerProfilePage.js").then((e) => ({ default: e.WorkerProfilePage }))), j = r(() => import("./pages/worker/TaskDetailsPage.js").then((e) => ({ default: e.TaskDetailsPage }))), M = r(() => import("./pages/investor/InvestorDashboard.js").then((e) => ({ default: e.InvestorDashboard }))), N = r(() => import("./pages/investor/InvestorPortfolioPage.js").then((e) => ({ default: e.InvestorPortfolioPage }))), P = r(() => import("./pages/investor/InvestmentOpportunitiesPage.js").then((e) => ({ default: e.InvestmentOpportunitiesPage }))), F = r(() => import("./pages/investor/InvestmentDetailsPage.js").then((e) => ({ default: e.InvestmentDetailsPage }))), I = r(() => import("./pages/investor/InvestorInvestmentsPage.js").then((e) => ({ default: e.InvestorInvestmentsPage }))), L = r(() => import("./pages/investor/InvestorAnalyticsPage.js").then((e) => ({ default: e.InvestorAnalyticsPage }))), R = r(() => import("./pages/investor/InvestorProfilePage.js").then((e) => ({ default: e.InvestorProfilePage }))), z = r(() => import("./pages/admin/AdminDashboard.js").then((e) => ({ default: e.AdminDashboard }))), B = r(() => import("./pages/admin/UserManagementPage.js").then((e) => ({ default: e.UserManagementPage }))), V = r(() => import("./pages/admin/CartManagementPage.js").then((e) => ({ default: e.CartManagementPage }))), H = r(() => import("./pages/admin/AdminAnalyticsPage.js").then((e) => ({ default: e.AdminAnalyticsPage }))), U = r(() => import("./pages/admin/AdminOrdersPage.js").then((e) => ({ default: e.AdminOrdersPage }))), W = r(() => import("./pages/admin/AdminProfilePage.js").then((e) => ({ default: e.AdminProfilePage }))), G = r(() => import("./pages/admin/AdminSettingsPage.js").then((e) => ({ default: e.AdminSettingsPage }))), K = r(() => import("./pages/admin/AdminFinancialPage.js").then((e) => ({ default: e.AdminFinancialPage }))), q = r(() => import("./pages/common/NotificationCenterPage.js").then((e) => ({ default: e.NotificationCenterPage }))), J = r(() => import("./pages/common/SettingsPage.js").then((e) => ({ default: e.SettingsPage }))), Y = r(() => import("./pages/common/HelpSupportPage.js").then((e) => ({ default: e.HelpSupportPage }))), X = () => /* @__PURE__ */ o("div", {
|
|
8
|
+
className: "flex items-center justify-center min-h-[400px]",
|
|
9
|
+
children: /* @__PURE__ */ o("div", { className: "animate-spin rounded-full h-8 w-8 border-b-2 border-primary" })
|
|
10
|
+
}), Z = () => {
|
|
11
|
+
let { basePath: r, isStandalone: Z } = e(), Q = te(), $ = r === "/" ? "" : (r ?? "").replace(/\/$/, "");
|
|
12
|
+
return $ && !Z && !(Q.pathname === $ || Q.pathname.startsWith($ + "/")) ? null : /* @__PURE__ */ o("div", {
|
|
13
|
+
className: "flex flex-col min-h-full",
|
|
14
|
+
children: /* @__PURE__ */ o(n, {
|
|
15
|
+
fallback: /* @__PURE__ */ o(X, {}),
|
|
16
|
+
children: /* @__PURE__ */ ne(a, { children: [
|
|
17
|
+
/* @__PURE__ */ o(i, {
|
|
18
|
+
index: !0,
|
|
19
|
+
element: /* @__PURE__ */ o(t, {})
|
|
20
|
+
}),
|
|
21
|
+
/* @__PURE__ */ o(i, {
|
|
22
|
+
path: "customer/dashboard",
|
|
23
|
+
element: /* @__PURE__ */ o(s, {})
|
|
24
|
+
}),
|
|
25
|
+
/* @__PURE__ */ o(i, {
|
|
26
|
+
path: "customer/discover",
|
|
27
|
+
element: /* @__PURE__ */ o(c, {})
|
|
28
|
+
}),
|
|
29
|
+
/* @__PURE__ */ o(i, {
|
|
30
|
+
path: "customer/cart/:cartId",
|
|
31
|
+
element: /* @__PURE__ */ o(l, {})
|
|
32
|
+
}),
|
|
33
|
+
/* @__PURE__ */ o(i, {
|
|
34
|
+
path: "customer/cart/:cartId/direct-service",
|
|
35
|
+
element: /* @__PURE__ */ o(v, {})
|
|
36
|
+
}),
|
|
37
|
+
/* @__PURE__ */ o(i, {
|
|
38
|
+
path: "customer/checkout",
|
|
39
|
+
element: /* @__PURE__ */ o(u, {})
|
|
40
|
+
}),
|
|
41
|
+
/* @__PURE__ */ o(i, {
|
|
42
|
+
path: "customer/orders/:orderId/track",
|
|
43
|
+
element: /* @__PURE__ */ o(d, {})
|
|
44
|
+
}),
|
|
45
|
+
/* @__PURE__ */ o(i, {
|
|
46
|
+
path: "customer/orders",
|
|
47
|
+
element: /* @__PURE__ */ o(f, {})
|
|
48
|
+
}),
|
|
49
|
+
/* @__PURE__ */ o(i, {
|
|
50
|
+
path: "customer/profile",
|
|
51
|
+
element: /* @__PURE__ */ o(p, {})
|
|
52
|
+
}),
|
|
53
|
+
/* @__PURE__ */ o(i, {
|
|
54
|
+
path: "customer/addresses",
|
|
55
|
+
element: /* @__PURE__ */ o(m, {})
|
|
56
|
+
}),
|
|
57
|
+
/* @__PURE__ */ o(i, {
|
|
58
|
+
path: "customer/favorites",
|
|
59
|
+
element: /* @__PURE__ */ o(h, {})
|
|
60
|
+
}),
|
|
61
|
+
/* @__PURE__ */ o(i, {
|
|
62
|
+
path: "customer/reviews",
|
|
63
|
+
element: /* @__PURE__ */ o(g, {})
|
|
64
|
+
}),
|
|
65
|
+
/* @__PURE__ */ o(i, {
|
|
66
|
+
path: "customer/payment-methods",
|
|
67
|
+
element: /* @__PURE__ */ o(_, {})
|
|
68
|
+
}),
|
|
69
|
+
/* @__PURE__ */ o(i, {
|
|
70
|
+
path: "customer/booking/:bookingId",
|
|
71
|
+
element: /* @__PURE__ */ o(y, {})
|
|
72
|
+
}),
|
|
73
|
+
/* @__PURE__ */ o(i, {
|
|
74
|
+
path: "cart-owner/dashboard",
|
|
75
|
+
element: /* @__PURE__ */ o(b, {})
|
|
76
|
+
}),
|
|
77
|
+
/* @__PURE__ */ o(i, {
|
|
78
|
+
path: "cart-owner/service-config",
|
|
79
|
+
element: /* @__PURE__ */ o(x, {})
|
|
80
|
+
}),
|
|
81
|
+
/* @__PURE__ */ o(i, {
|
|
82
|
+
path: "cart-owner/inventory",
|
|
83
|
+
element: /* @__PURE__ */ o(S, {})
|
|
84
|
+
}),
|
|
85
|
+
/* @__PURE__ */ o(i, {
|
|
86
|
+
path: "cart-owner/orders",
|
|
87
|
+
element: /* @__PURE__ */ o(C, {})
|
|
88
|
+
}),
|
|
89
|
+
/* @__PURE__ */ o(i, {
|
|
90
|
+
path: "cart-owner/analytics",
|
|
91
|
+
element: /* @__PURE__ */ o(w, {})
|
|
92
|
+
}),
|
|
93
|
+
/* @__PURE__ */ o(i, {
|
|
94
|
+
path: "cart-owner/staff",
|
|
95
|
+
element: /* @__PURE__ */ o(T, {})
|
|
96
|
+
}),
|
|
97
|
+
/* @__PURE__ */ o(i, {
|
|
98
|
+
path: "cart-owner/settings",
|
|
99
|
+
element: /* @__PURE__ */ o(E, {})
|
|
100
|
+
}),
|
|
101
|
+
/* @__PURE__ */ o(i, {
|
|
102
|
+
path: "cart-owner/profile",
|
|
103
|
+
element: /* @__PURE__ */ o(D, {})
|
|
104
|
+
}),
|
|
105
|
+
/* @__PURE__ */ o(i, {
|
|
106
|
+
path: "worker/dashboard",
|
|
107
|
+
element: /* @__PURE__ */ o(O, {})
|
|
108
|
+
}),
|
|
109
|
+
/* @__PURE__ */ o(i, {
|
|
110
|
+
path: "worker/orders",
|
|
111
|
+
element: /* @__PURE__ */ o(k, {})
|
|
112
|
+
}),
|
|
113
|
+
/* @__PURE__ */ o(i, {
|
|
114
|
+
path: "worker/schedule",
|
|
115
|
+
element: /* @__PURE__ */ o(re, {})
|
|
116
|
+
}),
|
|
117
|
+
/* @__PURE__ */ o(i, {
|
|
118
|
+
path: "worker/profile",
|
|
119
|
+
element: /* @__PURE__ */ o(A, {})
|
|
120
|
+
}),
|
|
121
|
+
/* @__PURE__ */ o(i, {
|
|
122
|
+
path: "worker/task/:taskId",
|
|
123
|
+
element: /* @__PURE__ */ o(j, {})
|
|
124
|
+
}),
|
|
125
|
+
/* @__PURE__ */ o(i, {
|
|
126
|
+
path: "investor/dashboard",
|
|
127
|
+
element: /* @__PURE__ */ o(M, {})
|
|
128
|
+
}),
|
|
129
|
+
/* @__PURE__ */ o(i, {
|
|
130
|
+
path: "investor/portfolio",
|
|
131
|
+
element: /* @__PURE__ */ o(N, {})
|
|
132
|
+
}),
|
|
133
|
+
/* @__PURE__ */ o(i, {
|
|
134
|
+
path: "investor/opportunities",
|
|
135
|
+
element: /* @__PURE__ */ o(P, {})
|
|
136
|
+
}),
|
|
137
|
+
/* @__PURE__ */ o(i, {
|
|
138
|
+
path: "investor/opportunity/:id",
|
|
139
|
+
element: /* @__PURE__ */ o(F, {})
|
|
140
|
+
}),
|
|
141
|
+
/* @__PURE__ */ o(i, {
|
|
142
|
+
path: "investor/investments/:id",
|
|
143
|
+
element: /* @__PURE__ */ o(F, {})
|
|
144
|
+
}),
|
|
145
|
+
/* @__PURE__ */ o(i, {
|
|
146
|
+
path: "investor/investments",
|
|
147
|
+
element: /* @__PURE__ */ o(I, {})
|
|
148
|
+
}),
|
|
149
|
+
/* @__PURE__ */ o(i, {
|
|
150
|
+
path: "investor/analytics",
|
|
151
|
+
element: /* @__PURE__ */ o(L, {})
|
|
152
|
+
}),
|
|
153
|
+
/* @__PURE__ */ o(i, {
|
|
154
|
+
path: "investor/profile",
|
|
155
|
+
element: /* @__PURE__ */ o(R, {})
|
|
156
|
+
}),
|
|
157
|
+
/* @__PURE__ */ o(i, {
|
|
158
|
+
path: "admin/dashboard",
|
|
159
|
+
element: /* @__PURE__ */ o(z, {})
|
|
160
|
+
}),
|
|
161
|
+
/* @__PURE__ */ o(i, {
|
|
162
|
+
path: "admin/users",
|
|
163
|
+
element: /* @__PURE__ */ o(B, {})
|
|
164
|
+
}),
|
|
165
|
+
/* @__PURE__ */ o(i, {
|
|
166
|
+
path: "admin/carts",
|
|
167
|
+
element: /* @__PURE__ */ o(V, {})
|
|
168
|
+
}),
|
|
169
|
+
/* @__PURE__ */ o(i, {
|
|
170
|
+
path: "admin/analytics",
|
|
171
|
+
element: /* @__PURE__ */ o(H, {})
|
|
172
|
+
}),
|
|
173
|
+
/* @__PURE__ */ o(i, {
|
|
174
|
+
path: "admin/orders",
|
|
175
|
+
element: /* @__PURE__ */ o(U, {})
|
|
176
|
+
}),
|
|
177
|
+
/* @__PURE__ */ o(i, {
|
|
178
|
+
path: "admin/profile",
|
|
179
|
+
element: /* @__PURE__ */ o(W, {})
|
|
180
|
+
}),
|
|
181
|
+
/* @__PURE__ */ o(i, {
|
|
182
|
+
path: "admin/settings",
|
|
183
|
+
element: /* @__PURE__ */ o(G, {})
|
|
184
|
+
}),
|
|
185
|
+
/* @__PURE__ */ o(i, {
|
|
186
|
+
path: "admin/financial",
|
|
187
|
+
element: /* @__PURE__ */ o(K, {})
|
|
188
|
+
}),
|
|
189
|
+
/* @__PURE__ */ o(i, {
|
|
190
|
+
path: "notifications",
|
|
191
|
+
element: /* @__PURE__ */ o(q, {})
|
|
192
|
+
}),
|
|
193
|
+
/* @__PURE__ */ o(i, {
|
|
194
|
+
path: "settings",
|
|
195
|
+
element: /* @__PURE__ */ o(J, {})
|
|
196
|
+
}),
|
|
197
|
+
/* @__PURE__ */ o(i, {
|
|
198
|
+
path: "help",
|
|
199
|
+
element: /* @__PURE__ */ o(Y, {})
|
|
200
|
+
}),
|
|
201
|
+
/* @__PURE__ */ o(i, {
|
|
202
|
+
path: "*",
|
|
203
|
+
element: /* @__PURE__ */ o(ee, {
|
|
204
|
+
to: "/",
|
|
205
|
+
replace: !0
|
|
206
|
+
})
|
|
207
|
+
})
|
|
208
|
+
] })
|
|
209
|
+
})
|
|
210
|
+
});
|
|
211
|
+
};
|
|
212
|
+
//#endregion
|
|
213
|
+
export { Z as SubscriberBotRoutes };
|
|
214
|
+
|
|
215
|
+
//# sourceMappingURL=SubscriberBotRoutes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SubscriberBotRoutes.js","names":[],"sources":["../../src/subscriberbot/SubscriberBotRoutes.tsx"],"sourcesContent":["/**\n * SubscriberBot Routes\n * @module subscriberbot\n */\n\nimport { type FC, lazy, Suspense } from 'react';\nimport { Routes, Route, Navigate, useLocation } from 'react-router-dom';\nimport { useSubscriberBot } from './context/SubscriberBotContext';\n\n// Eager load - HomePage (primary landing page)\nimport { HomePage } from './pages/HomePage';\n\n// Lazy loaded pages - Customer\nconst CustomerDashboard = lazy(() =>\n import('./pages/customer/CustomerDashboard').then((m) => ({ default: m.CustomerDashboard }))\n);\nconst CartDiscoveryPage = lazy(() =>\n import('./pages/customer/CartDiscoveryPage').then((m) => ({ default: m.CartDiscoveryPage }))\n);\nconst CartDetailPage = lazy(() =>\n import('./pages/customer/CartDetailPage').then((m) => ({ default: m.CartDetailPage }))\n);\nconst CheckoutPage = lazy(() =>\n import('./pages/customer/CheckoutPage').then((m) => ({ default: m.CheckoutPage }))\n);\nconst OrderTrackingPage = lazy(() =>\n import('./pages/customer/OrderTrackingPage').then((m) => ({ default: m.OrderTrackingPage }))\n);\nconst OrderHistoryPage = lazy(() =>\n import('./pages/customer/OrderHistoryPage').then((m) => ({ default: m.OrderHistoryPage }))\n);\nconst CustomerProfilePage = lazy(() =>\n import('./pages/customer/CustomerProfilePage').then((m) => ({ default: m.CustomerProfilePage }))\n);\nconst SavedAddressesPage = lazy(() =>\n import('./pages/customer/SavedAddressesPage').then((m) => ({ default: m.SavedAddressesPage }))\n);\nconst FavoritesPage = lazy(() =>\n import('./pages/customer/FavoritesPage').then((m) => ({ default: m.FavoritesPage }))\n);\nconst ReviewsPage = lazy(() =>\n import('./pages/customer/ReviewsPage').then((m) => ({ default: m.ReviewsPage }))\n);\nconst PaymentMethodsPage = lazy(() =>\n import('./pages/customer/PaymentMethodsPage').then((m) => ({ default: m.PaymentMethodsPage }))\n);\nconst DirectServiceBookingPage = lazy(() =>\n import('./pages/customer/DirectServiceBookingPage').then((m) => ({\n default: m.DirectServiceBookingPage,\n }))\n);\nconst BookingDetailsPage = lazy(() =>\n import('./pages/customer/BookingDetailsPage').then((m) => ({ default: m.BookingDetailsPage }))\n);\n\n// Lazy loaded pages - Cart Owner\nconst CartOwnerDashboard = lazy(() =>\n import('./pages/cart-owner/CartOwnerDashboard').then((m) => ({ default: m.CartOwnerDashboard }))\n);\nconst CartServiceConfigPage = lazy(() =>\n import('./pages/cart-owner/CartServiceConfigPage').then((m) => ({\n default: m.CartServiceConfigPage,\n }))\n);\nconst InventoryManagementPage = lazy(() =>\n import('./pages/cart-owner/InventoryManagementPage').then((m) => ({\n default: m.InventoryManagementPage,\n }))\n);\nconst OrderManagementPage = lazy(() =>\n import('./pages/cart-owner/OrderManagementPage').then((m) => ({\n default: m.OrderManagementPage,\n }))\n);\nconst AnalyticsDashboard = lazy(() =>\n import('./pages/cart-owner/AnalyticsDashboard').then((m) => ({ default: m.AnalyticsDashboard }))\n);\nconst StaffManagementPage = lazy(() =>\n import('./pages/cart-owner/StaffManagementPage').then((m) => ({\n default: m.StaffManagementPage,\n }))\n);\nconst BusinessSettingsPage = lazy(() =>\n import('./pages/cart-owner/BusinessSettingsPage').then((m) => ({\n default: m.BusinessSettingsPage,\n }))\n);\nconst CartOwnerProfilePage = lazy(() =>\n import('./pages/cart-owner/CartOwnerProfilePage').then((m) => ({\n default: m.CartOwnerProfilePage,\n }))\n);\n\n// Lazy loaded pages - Worker\nconst WorkerDashboard = lazy(() =>\n import('./pages/worker/WorkerDashboard').then((m) => ({ default: m.WorkerDashboard }))\n);\nconst WorkerOrdersPage = lazy(() =>\n import('./pages/worker/WorkerOrdersPage').then((m) => ({ default: m.WorkerOrdersPage }))\n);\nconst WorkerSchedulePage = lazy(() =>\n import('./pages/worker/WorkerSchedulePage').then((m) => ({ default: m.WorkerSchedulePage }))\n);\nconst WorkerProfilePage = lazy(() =>\n import('./pages/worker/WorkerProfilePage').then((m) => ({ default: m.WorkerProfilePage }))\n);\nconst TaskDetailsPage = lazy(() =>\n import('./pages/worker/TaskDetailsPage').then((m) => ({ default: m.TaskDetailsPage }))\n);\n\n// Lazy loaded pages - Investor\nconst InvestorDashboard = lazy(() =>\n import('./pages/investor/InvestorDashboard').then((m) => ({ default: m.InvestorDashboard }))\n);\nconst InvestorPortfolioPage = lazy(() =>\n import('./pages/investor/InvestorPortfolioPage').then((m) => ({\n default: m.InvestorPortfolioPage,\n }))\n);\nconst InvestmentOpportunitiesPage = lazy(() =>\n import('./pages/investor/InvestmentOpportunitiesPage').then((m) => ({\n default: m.InvestmentOpportunitiesPage,\n }))\n);\nconst InvestmentDetailsPage = lazy(() =>\n import('./pages/investor/InvestmentDetailsPage').then((m) => ({\n default: m.InvestmentDetailsPage,\n }))\n);\nconst InvestorInvestmentsPage = lazy(() =>\n import('./pages/investor/InvestorInvestmentsPage').then((m) => ({\n default: m.InvestorInvestmentsPage,\n }))\n);\nconst InvestorAnalyticsPage = lazy(() =>\n import('./pages/investor/InvestorAnalyticsPage').then((m) => ({\n default: m.InvestorAnalyticsPage,\n }))\n);\nconst InvestorProfilePage = lazy(() =>\n import('./pages/investor/InvestorProfilePage').then((m) => ({\n default: m.InvestorProfilePage,\n }))\n);\n\n// Lazy loaded pages - Admin\nconst AdminDashboard = lazy(() =>\n import('./pages/admin/AdminDashboard').then((m) => ({ default: m.AdminDashboard }))\n);\nconst UserManagementPage = lazy(() =>\n import('./pages/admin/UserManagementPage').then((m) => ({ default: m.UserManagementPage }))\n);\nconst CartManagementPage = lazy(() =>\n import('./pages/admin/CartManagementPage').then((m) => ({ default: m.CartManagementPage }))\n);\nconst AdminAnalyticsPage = lazy(() =>\n import('./pages/admin/AdminAnalyticsPage').then((m) => ({ default: m.AdminAnalyticsPage }))\n);\nconst AdminOrdersPage = lazy(() =>\n import('./pages/admin/AdminOrdersPage').then((m) => ({ default: m.AdminOrdersPage }))\n);\nconst AdminProfilePage = lazy(() =>\n import('./pages/admin/AdminProfilePage').then((m) => ({ default: m.AdminProfilePage }))\n);\nconst AdminSettingsPage = lazy(() =>\n import('./pages/admin/AdminSettingsPage').then((m) => ({ default: m.AdminSettingsPage }))\n);\nconst AdminFinancialPage = lazy(() =>\n import('./pages/admin/AdminFinancialPage').then((m) => ({ default: m.AdminFinancialPage }))\n);\n\n// Lazy loaded pages - Common\nconst NotificationCenterPage = lazy(() =>\n import('./pages/common/NotificationCenterPage').then((m) => ({\n default: m.NotificationCenterPage,\n }))\n);\nconst SettingsPage = lazy(() =>\n import('./pages/common/SettingsPage').then((m) => ({ default: m.SettingsPage }))\n);\nconst HelpSupportPage = lazy(() =>\n import('./pages/common/HelpSupportPage').then((m) => ({ default: m.HelpSupportPage }))\n);\n\n// Loading fallback component\nconst PageLoader: FC = () => (\n <div className=\"flex items-center justify-center min-h-[400px]\">\n <div className=\"animate-spin rounded-full h-8 w-8 border-b-2 border-primary\" />\n </div>\n);\n\nexport const SubscriberBotRoutes: FC = () => {\n const { basePath, isStandalone } = useSubscriberBot();\n const location = useLocation();\n\n // Normalize base path\n const normalizedBasePath = basePath === '/' ? '' : (basePath ?? '').replace(/\\/$/, '');\n\n // Guard: Only render if path matches basePath (when integrated)\n if (normalizedBasePath && !isStandalone) {\n const pathMatches =\n location.pathname === normalizedBasePath ||\n location.pathname.startsWith(normalizedBasePath + '/');\n\n if (!pathMatches) {\n return null;\n }\n }\n\n return (\n <div className=\"flex flex-col min-h-full\">\n <Suspense fallback={<PageLoader />}>\n <Routes>\n {/* Home - Eager loaded */}\n <Route index element={<HomePage />} />\n\n {/* Customer Routes */}\n <Route path=\"customer/dashboard\" element={<CustomerDashboard />} />\n <Route path=\"customer/discover\" element={<CartDiscoveryPage />} />\n <Route path=\"customer/cart/:cartId\" element={<CartDetailPage />} />\n <Route\n path=\"customer/cart/:cartId/direct-service\"\n element={<DirectServiceBookingPage />}\n />\n <Route path=\"customer/checkout\" element={<CheckoutPage />} />\n <Route path=\"customer/orders/:orderId/track\" element={<OrderTrackingPage />} />\n <Route path=\"customer/orders\" element={<OrderHistoryPage />} />\n <Route path=\"customer/profile\" element={<CustomerProfilePage />} />\n <Route path=\"customer/addresses\" element={<SavedAddressesPage />} />\n <Route path=\"customer/favorites\" element={<FavoritesPage />} />\n <Route path=\"customer/reviews\" element={<ReviewsPage />} />\n <Route path=\"customer/payment-methods\" element={<PaymentMethodsPage />} />\n <Route path=\"customer/booking/:bookingId\" element={<BookingDetailsPage />} />\n\n {/* Cart Owner Routes */}\n <Route path=\"cart-owner/dashboard\" element={<CartOwnerDashboard />} />\n <Route path=\"cart-owner/service-config\" element={<CartServiceConfigPage />} />\n <Route path=\"cart-owner/inventory\" element={<InventoryManagementPage />} />\n <Route path=\"cart-owner/orders\" element={<OrderManagementPage />} />\n <Route path=\"cart-owner/analytics\" element={<AnalyticsDashboard />} />\n <Route path=\"cart-owner/staff\" element={<StaffManagementPage />} />\n <Route path=\"cart-owner/settings\" element={<BusinessSettingsPage />} />\n <Route path=\"cart-owner/profile\" element={<CartOwnerProfilePage />} />\n\n {/* Worker Routes */}\n <Route path=\"worker/dashboard\" element={<WorkerDashboard />} />\n <Route path=\"worker/orders\" element={<WorkerOrdersPage />} />\n <Route path=\"worker/schedule\" element={<WorkerSchedulePage />} />\n <Route path=\"worker/profile\" element={<WorkerProfilePage />} />\n <Route path=\"worker/task/:taskId\" element={<TaskDetailsPage />} />\n\n {/* Investor Routes */}\n <Route path=\"investor/dashboard\" element={<InvestorDashboard />} />\n <Route path=\"investor/portfolio\" element={<InvestorPortfolioPage />} />\n <Route path=\"investor/opportunities\" element={<InvestmentOpportunitiesPage />} />\n <Route path=\"investor/opportunity/:id\" element={<InvestmentDetailsPage />} />\n <Route path=\"investor/investments/:id\" element={<InvestmentDetailsPage />} />\n <Route path=\"investor/investments\" element={<InvestorInvestmentsPage />} />\n <Route path=\"investor/analytics\" element={<InvestorAnalyticsPage />} />\n <Route path=\"investor/profile\" element={<InvestorProfilePage />} />\n\n {/* Admin Routes */}\n <Route path=\"admin/dashboard\" element={<AdminDashboard />} />\n <Route path=\"admin/users\" element={<UserManagementPage />} />\n <Route path=\"admin/carts\" element={<CartManagementPage />} />\n <Route path=\"admin/analytics\" element={<AdminAnalyticsPage />} />\n <Route path=\"admin/orders\" element={<AdminOrdersPage />} />\n <Route path=\"admin/profile\" element={<AdminProfilePage />} />\n <Route path=\"admin/settings\" element={<AdminSettingsPage />} />\n <Route path=\"admin/financial\" element={<AdminFinancialPage />} />\n\n {/* Common Routes */}\n <Route path=\"notifications\" element={<NotificationCenterPage />} />\n <Route path=\"settings\" element={<SettingsPage />} />\n <Route path=\"help\" element={<HelpSupportPage />} />\n\n {/* Fallback */}\n <Route path=\"*\" element={<Navigate to=\"/\" replace />} />\n </Routes>\n </Suspense>\n </div>\n );\n};\n"],"mappings":";;;;;;AAaA,IAAM,IAAoB,QACxB,OAAO,yCAAsC,MAAM,OAAO,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAC7F,EACK,IAAoB,QACxB,OAAO,yCAAsC,MAAM,OAAO,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAC7F,EACK,IAAiB,QACrB,OAAO,sCAAmC,MAAM,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,CACvF,EACK,IAAe,QACnB,OAAO,oCAAiC,MAAM,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,CACnF,EACK,IAAoB,QACxB,OAAO,yCAAsC,MAAM,OAAO,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAC7F,EACK,IAAmB,QACvB,OAAO,wCAAqC,MAAM,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,CAC3F,EACK,IAAsB,QAC1B,OAAO,2CAAwC,MAAM,OAAO,EAAE,SAAS,EAAE,qBAAqB,EAAE,CACjG,EACK,IAAqB,QACzB,OAAO,0CAAuC,MAAM,OAAO,EAAE,SAAS,EAAE,oBAAoB,EAAE,CAC/F,EACK,IAAgB,QACpB,OAAO,qCAAkC,MAAM,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,CACrF,EACK,IAAc,QAClB,OAAO,mCAAgC,MAAM,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,CACjF,EACK,IAAqB,QACzB,OAAO,0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ptyState.tsx
|
|
4
|
+
var r = ({ icon: r, title: i, description: a, action: o, className: s }) => /* @__PURE__ */ n("div", {
|
|
5
|
+
className: e("flex flex-col items-center justify-center py-12 px-4 text-center", s),
|
|
6
|
+
children: [
|
|
7
|
+
r && /* @__PURE__ */ t("div", {
|
|
8
|
+
className: "mb-4 text-muted-foreground opacity-50",
|
|
9
|
+
children: r
|
|
10
|
+
}),
|
|
11
|
+
/* @__PURE__ */ t("h3", {
|
|
12
|
+
className: "text-lg font-medium text-foreground",
|
|
13
|
+
children: i
|
|
14
|
+
}),
|
|
15
|
+
a && /* @__PURE__ */ t("p", {
|
|
16
|
+
className: "mt-2 text-sm text-muted-foreground max-w-sm",
|
|
17
|
+
children: a
|
|
18
|
+
}),
|
|
19
|
+
o && /* @__PURE__ */ t("div", {
|
|
20
|
+
className: "mt-6",
|
|
21
|
+
children: o
|
|
22
|
+
})
|
|
23
|
+
]
|
|
24
|
+
});
|
|
25
|
+
//#endregion
|
|
26
|
+
export { r as EmptyState };
|
|
27
|
+
|
|
28
|
+
//# sourceMappingURL=EmptyState.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EmptyState.js","names":[],"sources":["../../../src/subscriberbot/components/EmptyState.tsx"],"sourcesContent":["/**\n * Empty State Component\n * @module subscriberbot/components\n */\n\nimport type { FC, ReactNode } from 'react';\nimport { cn } from '../utils/cn';\n\ninterface EmptyStateProps {\n icon?: ReactNode;\n title: string;\n description?: string;\n action?: ReactNode;\n className?: string;\n}\n\nexport const EmptyState: FC<EmptyStateProps> = ({\n icon,\n title,\n description,\n action,\n className,\n}) => {\n return (\n <div\n className={cn('flex flex-col items-center justify-center py-12 px-4 text-center', className)}\n >\n {icon && <div className=\"mb-4 text-muted-foreground opacity-50\">{icon}</div>}\n <h3 className=\"text-lg font-medium text-foreground\">{title}</h3>\n {description && <p className=\"mt-2 text-sm text-muted-foreground max-w-sm\">{description}</p>}\n {action && <div className=\"mt-6\">{action}</div>}\n </div>\n );\n};\n"],"mappings":";;;AAgBA,IAAa,KAAmC,EAC9C,SACA,UACA,gBACA,WACA,mBAGE,kBAAC,OAAD;CACE,WAAW,EAAG,oEAAoE,EAAU;WAD9F;EAGG,KAAQ,kBAAC,OAAD;GAAK,WAAU;aAAyC;GAAW,CAAA;EAC5E,kBAAC,MAAD;GAAI,WAAU;aAAuC;GAAW,CAAA;EAC/D,KAAe,kBAAC,KAAD;GAAG,WAAU;aAA+C;GAAgB,CAAA;EAC3F,KAAU,kBAAC,OAAD;GAAK,WAAU;aAAQ;GAAa,CAAA;EAC3C"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { cn as e } from "../utils/cn.js";
|
|
2
|
+
import { StatusBadge as t } from "./StatusBadge.js";
|
|
3
|
+
import { AlertTriangle as n, Shield as r, TrendingUp as i } from "lucide-react";
|
|
4
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
5
|
+
//#region src/subscriberbot/components/InvestmentCard.tsx
|
|
6
|
+
var s = {
|
|
7
|
+
low: {
|
|
8
|
+
label: "Low Risk",
|
|
9
|
+
icon: r,
|
|
10
|
+
color: "text-green-600 dark:text-green-400"
|
|
11
|
+
},
|
|
12
|
+
medium: {
|
|
13
|
+
label: "Medium Risk",
|
|
14
|
+
icon: n,
|
|
15
|
+
color: "text-yellow-600 dark:text-yellow-400"
|
|
16
|
+
},
|
|
17
|
+
high: {
|
|
18
|
+
label: "High Risk",
|
|
19
|
+
icon: n,
|
|
20
|
+
color: "text-red-600 dark:text-red-400"
|
|
21
|
+
}
|
|
22
|
+
}, c = ({ id: n, cartName: r, targetAmount: c, raisedAmount: l, currency: u = "INR", expectedReturns: d, riskLevel: f, status: p, onClick: m, className: h }) => {
|
|
23
|
+
let g = c > 0 ? Math.min(l / c * 100, 100) : 0, _ = s[f], v = _.icon, y = (e) => new Intl.NumberFormat(void 0, {
|
|
24
|
+
style: "currency",
|
|
25
|
+
currency: u,
|
|
26
|
+
maximumFractionDigits: 0
|
|
27
|
+
}).format(e);
|
|
28
|
+
return /* @__PURE__ */ o("div", {
|
|
29
|
+
role: "button",
|
|
30
|
+
tabIndex: 0,
|
|
31
|
+
onClick: () => m?.(n),
|
|
32
|
+
onKeyDown: (e) => {
|
|
33
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), m?.(n));
|
|
34
|
+
},
|
|
35
|
+
className: e("rounded-lg border border-border bg-card p-4 shadow-sm transition-colors", "hover:border-accent-foreground/20 hover:shadow-md cursor-pointer", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", h),
|
|
36
|
+
children: [
|
|
37
|
+
/* @__PURE__ */ o("div", {
|
|
38
|
+
className: "flex items-start justify-between",
|
|
39
|
+
children: [/* @__PURE__ */ a("h3", {
|
|
40
|
+
className: "text-base font-semibold text-foreground truncate",
|
|
41
|
+
children: r
|
|
42
|
+
}), /* @__PURE__ */ a(t, { status: p })]
|
|
43
|
+
}),
|
|
44
|
+
/* @__PURE__ */ o("div", {
|
|
45
|
+
className: "mt-4",
|
|
46
|
+
children: [
|
|
47
|
+
/* @__PURE__ */ o("div", {
|
|
48
|
+
className: "flex items-center justify-between text-sm",
|
|
49
|
+
children: [/* @__PURE__ */ a("span", {
|
|
50
|
+
className: "text-muted-foreground",
|
|
51
|
+
children: "Raised"
|
|
52
|
+
}), /* @__PURE__ */ o("span", {
|
|
53
|
+
className: "font-medium text-foreground",
|
|
54
|
+
children: [Math.round(g), "%"]
|
|
55
|
+
})]
|
|
56
|
+
}),
|
|
57
|
+
/* @__PURE__ */ a("div", {
|
|
58
|
+
className: "mt-1.5 h-2 w-full rounded-full bg-muted overflow-hidden",
|
|
59
|
+
children: /* @__PURE__ */ a("div", {
|
|
60
|
+
className: "h-full rounded-full bg-primary transition-all duration-300",
|
|
61
|
+
style: { width: `${g}%` }
|
|
62
|
+
})
|
|
63
|
+
}),
|
|
64
|
+
/* @__PURE__ */ o("div", {
|
|
65
|
+
className: "mt-1.5 flex items-center justify-between text-xs text-muted-foreground",
|
|
66
|
+
children: [/* @__PURE__ */ a("span", { children: y(l) }), /* @__PURE__ */ a("span", { children: y(c) })]
|
|
67
|
+
})
|
|
68
|
+
]
|
|
69
|
+
}),
|
|
70
|
+
/* @__PURE__ */ o("div", {
|
|
71
|
+
className: "mt-4 flex items-center justify-between",
|
|
72
|
+
children: [/* @__PURE__ */ o("div", {
|
|
73
|
+
className: "flex items-center gap-1.5 text-sm",
|
|
74
|
+
children: [
|
|
75
|
+
/* @__PURE__ */ a(i, { className: "h-3.5 w-3.5 text-green-600 dark:text-green-400" }),
|
|
76
|
+
/* @__PURE__ */ a("span", {
|
|
77
|
+
className: "font-medium text-foreground",
|
|
78
|
+
children: d
|
|
79
|
+
}),
|
|
80
|
+
/* @__PURE__ */ a("span", {
|
|
81
|
+
className: "text-muted-foreground",
|
|
82
|
+
children: "returns"
|
|
83
|
+
})
|
|
84
|
+
]
|
|
85
|
+
}), /* @__PURE__ */ o("div", {
|
|
86
|
+
className: e("flex items-center gap-1 text-xs font-medium", _.color),
|
|
87
|
+
children: [/* @__PURE__ */ a(v, { className: "h-3.5 w-3.5" }), /* @__PURE__ */ a("span", { children: _.label })]
|
|
88
|
+
})]
|
|
89
|
+
})
|
|
90
|
+
]
|
|
91
|
+
});
|
|
92
|
+
};
|
|
93
|
+
//#endregion
|
|
94
|
+
export { c as InvestmentCard };
|
|
95
|
+
|
|
96
|
+
//# sourceMappingURL=InvestmentCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InvestmentCard.js","names":[],"sources":["../../../src/subscriberbot/components/InvestmentCard.tsx"],"sourcesContent":["/**\n * Investment Card Component\n * @module subscriberbot/components\n *\n * Displays an investment opportunity with cart name, target/raised amounts,\n * progress bar, expected returns, risk level, and status.\n */\n\nimport type { FC } from 'react';\nimport { TrendingUp, AlertTriangle, Shield } from 'lucide-react';\nimport { cn } from '../utils/cn';\nimport { StatusBadge } from './StatusBadge';\nimport type { InvestmentStatus, RiskLevel } from '../types';\n\ninterface InvestmentCardProps {\n id: string;\n cartName: string;\n targetAmount: number;\n raisedAmount: number;\n currency?: string;\n expectedReturns: string;\n riskLevel: RiskLevel;\n status: InvestmentStatus;\n onClick?: (id: string) => void;\n className?: string;\n}\n\nconst riskConfig: Record<RiskLevel, { label: string; icon: typeof Shield; color: string }> = {\n low: {\n label: 'Low Risk',\n icon: Shield,\n color: 'text-green-600 dark:text-green-400',\n },\n medium: {\n label: 'Medium Risk',\n icon: AlertTriangle,\n color: 'text-yellow-600 dark:text-yellow-400',\n },\n high: {\n label: 'High Risk',\n icon: AlertTriangle,\n color: 'text-red-600 dark:text-red-400',\n },\n};\n\nexport const InvestmentCard: FC<InvestmentCardProps> = ({\n id,\n cartName,\n targetAmount,\n raisedAmount,\n currency = 'INR',\n expectedReturns,\n riskLevel,\n status,\n onClick,\n className,\n}) => {\n const progress = targetAmount > 0 ? Math.min((raisedAmount / targetAmount) * 100, 100) : 0;\n const risk = riskConfig[riskLevel];\n const RiskIcon = risk.icon;\n\n const formatAmount = (amount: number) =>\n new Intl.NumberFormat(undefined, {\n style: 'currency',\n currency,\n maximumFractionDigits: 0,\n }).format(amount);\n\n return (\n <div\n role=\"button\"\n tabIndex={0}\n onClick={() => onClick?.(id)}\n onKeyDown={(e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n onClick?.(id);\n }\n }}\n className={cn(\n 'rounded-lg border border-border bg-card p-4 shadow-sm transition-colors',\n 'hover:border-accent-foreground/20 hover:shadow-md cursor-pointer',\n 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',\n className\n )}\n >\n {/* Header */}\n <div className=\"flex items-start justify-between\">\n <h3 className=\"text-base font-semibold text-foreground truncate\">{cartName}</h3>\n <StatusBadge status={status} />\n </div>\n\n {/* Progress Bar */}\n <div className=\"mt-4\">\n <div className=\"flex items-center justify-between text-sm\">\n <span className=\"text-muted-foreground\">Raised</span>\n <span className=\"font-medium text-foreground\">{Math.round(progress)}%</span>\n </div>\n <div className=\"mt-1.5 h-2 w-full rounded-full bg-muted overflow-hidden\">\n <div\n className=\"h-full rounded-full bg-primary transition-all duration-300\"\n style={{ width: `${progress}%` }}\n />\n </div>\n <div className=\"mt-1.5 flex items-center justify-between text-xs text-muted-foreground\">\n <span>{formatAmount(raisedAmount)}</span>\n <span>{formatAmount(targetAmount)}</span>\n </div>\n </div>\n\n {/* Details */}\n <div className=\"mt-4 flex items-center justify-between\">\n <div className=\"flex items-center gap-1.5 text-sm\">\n <TrendingUp className=\"h-3.5 w-3.5 text-green-600 dark:text-green-400\" />\n <span className=\"font-medium text-foreground\">{expectedReturns}</span>\n <span className=\"text-muted-foreground\">returns</span>\n </div>\n <div className={cn('flex items-center gap-1 text-xs font-medium', risk.color)}>\n <RiskIcon className=\"h-3.5 w-3.5\" />\n <span>{risk.label}</span>\n </div>\n </div>\n </div>\n );\n};\n"],"mappings":";;;;;AA2BA,IAAM,IAAuF;CAC3F,KAAK;EACH,OAAO;EACP,MAAM;EACN,OAAO;EACR;CACD,QAAQ;EACN,OAAO;EACP,MAAM;EACN,OAAO;EACR;CACD,MAAM;EACJ,OAAO;EACP,MAAM;EACN,OAAO;EACR;CACF,EAEY,KAA2C,EACtD,OACA,aACA,iBACA,iBACA,cAAW,OACX,oBACA,cACA,WACA,YACA,mBACI;CACJ,IAAM,IAAW,IAAe,IAAI,KAAK,IAAK,IAAe,IAAgB,KAAK,IAAI,GAAG,GACnF,IAAO,EAAW,IAClB,IAAW,EAAK,MAEhB,KAAgB,MACpB,IAAI,KAAK,aAAa,KAAA,GAAW;EAC/B,OAAO;EACP;EACA,uBAAuB;EACxB,CAAC,CAAC,OAAO,EAAO;AAEnB,QACE,kBAAC,OAAD;EACE,MAAK;EACL,UAAU;EACV,eAAe,IAAU,EAAG;EAC5B,YAAY,MAAM;AAChB,IAAI,EAAE,QAAQ,WAAW,EAAE,QAAQ,SACjC,EAAE,gBAAgB,EAClB,IAAU,EAAG;;EAGjB,WAAW,EACT,2EACA,oEACA,2EACA,EACD;YAfH;GAkBE,kBAAC,OAAD;IAAK,WAAU;cAAf,CACE,kBAAC,MAAD;KAAI,WAAU;eAAoD;KAAc,CAAA,EAChF,kBAAC,GAAD,EAAqB,WAAU,CAAA,CAC3B;;GAGN,kBAAC,OAAD;IAAK,WAAU;cAAf;KACE,kBAAC,OAAD;MAAK,WAAU;gBAAf,CACE,kBAAC,QAAD;OAAM,WAAU;iBAAwB;OAAa,CAAA,EACrD,kBAAC,QAAD;OAAM,WAAU;iBAAhB,CAA+C,KAAK,MAAM,EAAS,EAAC,IAAQ;SACxE;;KACN,kBAAC,OAAD;MAAK,WAAU;gBACb,kBAAC,OAAD;OACE,WAAU;OACV,OAAO,EAAE,OAAO,GAAG,EAAS,IAAI;OAChC,CAAA;MACE,CAAA;KACN,kBAAC,OAAD;MAAK,WAAU;gBAAf,CACE,kBAAC,QAAD,EAAA,UAAO,EAAa,EAAa,EAAQ,CAAA,EACzC,kBAAC,QAAD,EAAA,UAAO,EAAa,EAAa,EAAQ,CAAA,CACrC;;KACF;;GAGN,kBAAC,OAAD;IAAK,WAAU;cAAf,CACE,kBAAC,OAAD;KAAK,WAAU;eAAf;MACE,kBAAC,GAAD,EAAY,WAAU,kDAAmD,CAAA;MACzE,kBAAC,QAAD;OAAM,WAAU;iBAA+B;OAAuB,CAAA;MACtE,kBAAC,QAAD;OAAM,WAAU;iBAAwB;OAAc,CAAA;MAClD;QACN,kBAAC,OAAD;KAAK,WAAW,EAAG,+CAA+C,EAAK,MAAM;eAA7E,CACE,kBAAC,GAAD,EAAU,WAAU,eAAgB,CAAA,EACpC,kBAAC,QAAD,EAAA,UAAO,EAAK,OAAa,CAAA,CACrB;OACF;;GACF"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { cn as e } from "../utils/cn.js";
|
|
2
|
+
import { Minus as t, TrendingDown as n, TrendingUp as r } from "lucide-react";
|
|
3
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
4
|
+
//#region src/subscriberbot/components/MetricsCard.tsx
|
|
5
|
+
var o = {
|
|
6
|
+
up: {
|
|
7
|
+
icon: r,
|
|
8
|
+
color: "text-green-600 dark:text-green-400"
|
|
9
|
+
},
|
|
10
|
+
down: {
|
|
11
|
+
icon: n,
|
|
12
|
+
color: "text-red-600 dark:text-red-400"
|
|
13
|
+
},
|
|
14
|
+
neutral: {
|
|
15
|
+
icon: t,
|
|
16
|
+
color: "text-muted-foreground"
|
|
17
|
+
}
|
|
18
|
+
}, s = ({ icon: t, value: n, label: r, trend: s, trendValue: c, className: l }) => {
|
|
19
|
+
let u = s ? o[s] : null, d = u?.icon;
|
|
20
|
+
return /* @__PURE__ */ a("div", {
|
|
21
|
+
className: e("rounded-lg border border-border bg-card p-6 shadow-sm", l),
|
|
22
|
+
children: [/* @__PURE__ */ a("div", {
|
|
23
|
+
className: "flex items-center justify-between",
|
|
24
|
+
children: [/* @__PURE__ */ i("div", {
|
|
25
|
+
className: "text-muted-foreground",
|
|
26
|
+
children: t
|
|
27
|
+
}), s && u && d && /* @__PURE__ */ a("div", {
|
|
28
|
+
className: e("flex items-center gap-1 text-xs font-medium", u.color),
|
|
29
|
+
children: [/* @__PURE__ */ i(d, { className: "h-3.5 w-3.5" }), c && /* @__PURE__ */ i("span", { children: c })]
|
|
30
|
+
})]
|
|
31
|
+
}), /* @__PURE__ */ a("div", {
|
|
32
|
+
className: "mt-3",
|
|
33
|
+
children: [/* @__PURE__ */ i("p", {
|
|
34
|
+
className: "text-2xl font-bold text-foreground",
|
|
35
|
+
children: n
|
|
36
|
+
}), /* @__PURE__ */ i("p", {
|
|
37
|
+
className: "mt-1 text-sm text-muted-foreground",
|
|
38
|
+
children: r
|
|
39
|
+
})]
|
|
40
|
+
})]
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
//#endregion
|
|
44
|
+
export { s as MetricsCard };
|
|
45
|
+
|
|
46
|
+
//# sourceMappingURL=MetricsCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MetricsCard.js","names":[],"sources":["../../../src/subscriberbot/components/MetricsCard.tsx"],"sourcesContent":["/**\n * Metrics Card Component\n * @module subscriberbot/components\n */\n\nimport type { FC, ReactNode } from 'react';\nimport { TrendingUp, TrendingDown, Minus } from 'lucide-react';\nimport { cn } from '../utils/cn';\nimport type { TrendDirection } from '../types';\n\ninterface MetricsCardProps {\n icon: ReactNode;\n value: string | number;\n label: string;\n trend?: TrendDirection;\n trendValue?: string;\n className?: string;\n}\n\nconst trendConfig: Record<TrendDirection, { icon: typeof TrendingUp; color: string }> = {\n up: { icon: TrendingUp, color: 'text-green-600 dark:text-green-400' },\n down: { icon: TrendingDown, color: 'text-red-600 dark:text-red-400' },\n neutral: { icon: Minus, color: 'text-muted-foreground' },\n};\n\nexport const MetricsCard: FC<MetricsCardProps> = ({\n icon,\n value,\n label,\n trend,\n trendValue,\n className,\n}) => {\n const trendInfo = trend ? trendConfig[trend] : null;\n const TrendIcon = trendInfo?.icon;\n\n return (\n <div className={cn('rounded-lg border border-border bg-card p-6 shadow-sm', className)}>\n <div className=\"flex items-center justify-between\">\n <div className=\"text-muted-foreground\">{icon}</div>\n {trend && trendInfo && TrendIcon && (\n <div className={cn('flex items-center gap-1 text-xs font-medium', trendInfo.color)}>\n <TrendIcon className=\"h-3.5 w-3.5\" />\n {trendValue && <span>{trendValue}</span>}\n </div>\n )}\n </div>\n <div className=\"mt-3\">\n <p className=\"text-2xl font-bold text-foreground\">{value}</p>\n <p className=\"mt-1 text-sm text-muted-foreground\">{label}</p>\n </div>\n </div>\n );\n};\n"],"mappings":";;;;AAmBA,IAAM,IAAkF;CACtF,IAAI;EAAE,MAAM;EAAY,OAAO;EAAsC;CACrE,MAAM;EAAE,MAAM;EAAc,OAAO;EAAkC;CACrE,SAAS;EAAE,MAAM;EAAO,OAAO;EAAyB;CACzD,EAEY,KAAqC,EAChD,SACA,UACA,UACA,UACA,eACA,mBACI;CACJ,IAAM,IAAY,IAAQ,EAAY,KAAS,MACzC,IAAY,GAAW;AAE7B,QACE,kBAAC,OAAD;EAAK,WAAW,EAAG,yDAAyD,EAAU;YAAtF,CACE,kBAAC,OAAD;GAAK,WAAU;aAAf,CACE,kBAAC,OAAD;IAAK,WAAU;cAAyB;IAAW,CAAA,EAClD,KAAS,KAAa,KACrB,kBAAC,OAAD;IAAK,WAAW,EAAG,+CAA+C,EAAU,MAAM;cAAlF,CACE,kBAAC,GAAD,EAAW,WAAU,eAAgB,CAAA,EACpC,KAAc,kBAAC,QAAD,EAAA,UAAO,GAAkB,CAAA,CACpC;MAEJ;MACN,kBAAC,OAAD;GAAK,WAAU;aAAf,CACE,kBAAC,KAAD;IAAG,WAAU;cAAsC;IAAU,CAAA,EAC7D,kBAAC,KAAD;IAAG,WAAU;cAAsC;IAAU,CAAA,CACzD;KACF"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { cn as e } from "../utils/cn.js";
|
|
2
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
3
|
+
//#region src/subscriberbot/components/PageLayout.tsx
|
|
4
|
+
var r = ({ title: r, description: i, actions: a, children: o, className: s }) => /* @__PURE__ */ n("div", {
|
|
5
|
+
className: e("flex flex-col h-full", s),
|
|
6
|
+
children: [/* @__PURE__ */ n("div", {
|
|
7
|
+
className: "flex items-center justify-between px-6 py-4 border-b border-border bg-card",
|
|
8
|
+
children: [/* @__PURE__ */ n("div", { children: [/* @__PURE__ */ t("h1", {
|
|
9
|
+
className: "text-2xl font-semibold text-foreground",
|
|
10
|
+
children: r
|
|
11
|
+
}), i && /* @__PURE__ */ t("p", {
|
|
12
|
+
className: "mt-1 text-sm text-muted-foreground",
|
|
13
|
+
children: i
|
|
14
|
+
})] }), a && /* @__PURE__ */ t("div", {
|
|
15
|
+
className: "flex items-center gap-3",
|
|
16
|
+
children: a
|
|
17
|
+
})]
|
|
18
|
+
}), /* @__PURE__ */ t("div", {
|
|
19
|
+
className: "flex-1 overflow-auto p-6",
|
|
20
|
+
children: o
|
|
21
|
+
})]
|
|
22
|
+
});
|
|
23
|
+
//#endregion
|
|
24
|
+
export { r as PageLayout };
|
|
25
|
+
|
|
26
|
+
//# sourceMappingURL=PageLayout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PageLayout.js","names":[],"sources":["../../../src/subscriberbot/components/PageLayout.tsx"],"sourcesContent":["/**\n * Page Layout Component\n * @module subscriberbot/components\n */\n\nimport type { FC, ReactNode } from 'react';\nimport { cn } from '../utils/cn';\n\ninterface PageLayoutProps {\n title: ReactNode;\n description?: string;\n actions?: ReactNode;\n children: ReactNode;\n className?: string;\n}\n\nexport const PageLayout: FC<PageLayoutProps> = ({\n title,\n description,\n actions,\n children,\n className,\n}) => {\n return (\n <div className={cn('flex flex-col h-full', className)}>\n {/* Page Header */}\n <div className=\"flex items-center justify-between px-6 py-4 border-b border-border bg-card\">\n <div>\n <h1 className=\"text-2xl font-semibold text-foreground\">{title}</h1>\n {description && <p className=\"mt-1 text-sm text-muted-foreground\">{description}</p>}\n </div>\n {actions && <div className=\"flex items-center gap-3\">{actions}</div>}\n </div>\n\n {/* Page Content */}\n <div className=\"flex-1 overflow-auto p-6\">{children}</div>\n </div>\n );\n};\n"],"mappings":";;;AAgBA,IAAa,KAAmC,EAC9C,UACA,gBACA,YACA,aACA,mBAGE,kBAAC,OAAD;CAAK,WAAW,EAAG,wBAAwB,EAAU;WAArD,CAEE,kBAAC,OAAD;EAAK,WAAU;YAAf,CACE,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,MAAD;GAAI,WAAU;aAA0C;GAAW,CAAA,EAClE,KAAe,kBAAC,KAAD;GAAG,WAAU;aAAsC;GAAgB,CAAA,CAC/E,EAAA,CAAA,EACL,KAAW,kBAAC,OAAD;GAAK,WAAU;aAA2B;GAAc,CAAA,CAChE;KAGN,kBAAC,OAAD;EAAK,WAAU;EAA4B;EAAe,CAAA,CACtD"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { cn as e } from "../utils/cn.js";
|
|
2
|
+
import { Star as t } from "lucide-react";
|
|
3
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
|
+
//#region src/subscriberbot/components/RatingDisplay.tsx
|
|
5
|
+
var i = ({ value: i, count: a, maxStars: o = 5, size: s = "sm", className: c }) => {
|
|
6
|
+
let l = s === "sm" ? "h-3.5 w-3.5" : "h-4.5 w-4.5", u = Math.min(Math.max(i, 0), o);
|
|
7
|
+
return /* @__PURE__ */ r("div", {
|
|
8
|
+
className: e("flex items-center gap-1", c),
|
|
9
|
+
children: [
|
|
10
|
+
/* @__PURE__ */ n("div", {
|
|
11
|
+
className: "flex items-center",
|
|
12
|
+
children: Array.from({ length: o }, (r, i) => {
|
|
13
|
+
let a = i < Math.floor(u);
|
|
14
|
+
return /* @__PURE__ */ n(t, { className: e(l, a ? "fill-yellow-400 text-yellow-400" : !a && i < u ? "fill-yellow-400/50 text-yellow-400" : "fill-none text-muted-foreground/40") }, i);
|
|
15
|
+
})
|
|
16
|
+
}),
|
|
17
|
+
/* @__PURE__ */ n("span", {
|
|
18
|
+
className: "text-xs font-medium text-foreground",
|
|
19
|
+
children: u.toFixed(1)
|
|
20
|
+
}),
|
|
21
|
+
a !== void 0 && /* @__PURE__ */ r("span", {
|
|
22
|
+
className: "text-xs text-muted-foreground",
|
|
23
|
+
children: [
|
|
24
|
+
"(",
|
|
25
|
+
a,
|
|
26
|
+
")"
|
|
27
|
+
]
|
|
28
|
+
})
|
|
29
|
+
]
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
//#endregion
|
|
33
|
+
export { i as RatingDisplay };
|
|
34
|
+
|
|
35
|
+
//# sourceMappingURL=RatingDisplay.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RatingDisplay.js","names":[],"sources":["../../../src/subscriberbot/components/RatingDisplay.tsx"],"sourcesContent":["/**\n * Rating Display Component\n * @module subscriberbot/components\n *\n * Star rating display with value and review count.\n */\n\nimport type { FC } from 'react';\nimport { Star } from 'lucide-react';\nimport { cn } from '../utils/cn';\n\ninterface RatingDisplayProps {\n value: number;\n count?: number;\n maxStars?: number;\n size?: 'sm' | 'md';\n className?: string;\n}\n\nexport const RatingDisplay: FC<RatingDisplayProps> = ({\n value,\n count,\n maxStars = 5,\n size = 'sm',\n className,\n}) => {\n const starSize = size === 'sm' ? 'h-3.5 w-3.5' : 'h-4.5 w-4.5';\n const clampedValue = Math.min(Math.max(value, 0), maxStars);\n\n return (\n <div className={cn('flex items-center gap-1', className)}>\n <div className=\"flex items-center\">\n {Array.from({ length: maxStars }, (_, i) => {\n const filled = i < Math.floor(clampedValue);\n const halfFilled = !filled && i < clampedValue;\n\n return (\n <Star\n key={i}\n className={cn(\n starSize,\n filled\n ? 'fill-yellow-400 text-yellow-400'\n : halfFilled\n ? 'fill-yellow-400/50 text-yellow-400'\n : 'fill-none text-muted-foreground/40'\n )}\n />\n );\n })}\n </div>\n <span className=\"text-xs font-medium text-foreground\">{clampedValue.toFixed(1)}</span>\n {count !== undefined && <span className=\"text-xs text-muted-foreground\">({count})</span>}\n </div>\n );\n};\n"],"mappings":";;;;AAmBA,IAAa,KAAyC,EACpD,UACA,UACA,cAAW,GACX,UAAO,MACP,mBACI;CACJ,IAAM,IAAW,MAAS,OAAO,gBAAgB,eAC3C,IAAe,KAAK,IAAI,KAAK,IAAI,GAAO,EAAE,EAAE,EAAS;AAE3D,QACE,kBAAC,OAAD;EAAK,WAAW,EAAG,2BAA2B,EAAU;YAAxD;GACE,kBAAC,OAAD;IAAK,WAAU;cACZ,MAAM,KAAK,EAAE,QAAQ,GAAU,GAAG,GAAG,MAAM;KAC1C,IAAM,IAAS,IAAI,KAAK,MAAM,EAAa;AAG3C,YACE,kBAAC,GAAD,EAEE,WAAW,EACT,GACA,IACI,oCARS,CAAC,KAAU,IAAI,IAUtB,uCACA,qCACP,EACD,EATK,EASL;MAEJ;IACE,CAAA;GACN,kBAAC,QAAD;IAAM,WAAU;cAAuC,EAAa,QAAQ,EAAE;IAAQ,CAAA;GACrF,MAAU,KAAA,KAAa,kBAAC,QAAD;IAAM,WAAU;cAAhB;KAAgD;KAAE;KAAM;KAAQ;;GACpF"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { cn as e } from "../utils/cn.js";
|
|
2
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
3
|
+
//#region src/subscriberbot/components/StatusBadge.tsx
|
|
4
|
+
var n = {
|
|
5
|
+
success: "bg-green-500/20 text-green-600 dark:text-green-400",
|
|
6
|
+
warning: "bg-yellow-500/20 text-yellow-600 dark:text-yellow-400",
|
|
7
|
+
destructive: "bg-destructive/20 text-destructive",
|
|
8
|
+
secondary: "bg-secondary text-secondary-foreground",
|
|
9
|
+
info: "bg-blue-500/20 text-blue-600 dark:text-blue-400",
|
|
10
|
+
outline: "border border-border text-foreground"
|
|
11
|
+
}, r = {
|
|
12
|
+
open: "success",
|
|
13
|
+
closed: "destructive",
|
|
14
|
+
busy: "warning",
|
|
15
|
+
temporarily_closed: "warning",
|
|
16
|
+
pending: "secondary",
|
|
17
|
+
confirmed: "info",
|
|
18
|
+
preparing: "warning",
|
|
19
|
+
ready: "success",
|
|
20
|
+
out_for_delivery: "info",
|
|
21
|
+
delivered: "success",
|
|
22
|
+
cancelled: "destructive",
|
|
23
|
+
refunded: "outline",
|
|
24
|
+
funded: "success",
|
|
25
|
+
returning: "info",
|
|
26
|
+
active: "success",
|
|
27
|
+
inactive: "secondary",
|
|
28
|
+
draft: "secondary",
|
|
29
|
+
archived: "outline",
|
|
30
|
+
error: "destructive",
|
|
31
|
+
failed: "destructive",
|
|
32
|
+
processing: "warning",
|
|
33
|
+
completed: "success"
|
|
34
|
+
};
|
|
35
|
+
function i(e) {
|
|
36
|
+
return e.replace(/_/g, " ").replace(/\b\w/g, (e) => e.toUpperCase());
|
|
37
|
+
}
|
|
38
|
+
var a = ({ status: a, className: o }) => /* @__PURE__ */ t("span", {
|
|
39
|
+
className: e("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium", n[r[a.toLowerCase()] || "secondary"], o),
|
|
40
|
+
children: i(a)
|
|
41
|
+
});
|
|
42
|
+
//#endregion
|
|
43
|
+
export { a as StatusBadge };
|
|
44
|
+
|
|
45
|
+
//# sourceMappingURL=StatusBadge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StatusBadge.js","names":[],"sources":["../../../src/subscriberbot/components/StatusBadge.tsx"],"sourcesContent":["/**\n * Status Badge Component\n * @module subscriberbot/components\n *\n * A colored badge based on status value with semantic color mapping\n * for various order, cart, and investment statuses.\n */\n\nimport type { FC } from 'react';\nimport { cn } from '../utils/cn';\n\ninterface StatusBadgeProps {\n status: string;\n className?: string;\n}\n\ntype BadgeVariant = 'success' | 'warning' | 'destructive' | 'secondary' | 'info' | 'outline';\n\nconst variantStyles: Record<BadgeVariant, string> = {\n success: 'bg-green-500/20 text-green-600 dark:text-green-400',\n warning: 'bg-yellow-500/20 text-yellow-600 dark:text-yellow-400',\n destructive: 'bg-destructive/20 text-destructive',\n secondary: 'bg-secondary text-secondary-foreground',\n info: 'bg-blue-500/20 text-blue-600 dark:text-blue-400',\n outline: 'border border-border text-foreground',\n};\n\nconst statusVariantMap: Record<string, BadgeVariant> = {\n // Cart statuses\n open: 'success',\n closed: 'destructive',\n busy: 'warning',\n temporarily_closed: 'warning',\n\n // Order statuses\n pending: 'secondary',\n confirmed: 'info',\n preparing: 'warning',\n ready: 'success',\n out_for_delivery: 'info',\n delivered: 'success',\n cancelled: 'destructive',\n refunded: 'outline',\n\n // Investment statuses\n funded: 'success',\n returning: 'info',\n\n // Generic statuses\n active: 'success',\n inactive: 'secondary',\n draft: 'secondary',\n archived: 'outline',\n error: 'destructive',\n failed: 'destructive',\n processing: 'warning',\n completed: 'success',\n};\n\nfunction formatStatusLabel(status: string): string {\n return status.replace(/_/g, ' ').replace(/\\b\\w/g, (char) => char.toUpperCase());\n}\n\nexport const StatusBadge: FC<StatusBadgeProps> = ({ status, className }) => {\n const variant = statusVariantMap[status.toLowerCase()] || 'secondary';\n\n return (\n <span\n className={cn(\n 'inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium',\n variantStyles[variant],\n className\n )}\n >\n {formatStatusLabel(status)}\n </span>\n );\n};\n"],"mappings":";;;AAkBA,IAAM,IAA8C;CAClD,SAAS;CACT,SAAS;CACT,aAAa;CACb,WAAW;CACX,MAAM;CACN,SAAS;CACV,EAEK,IAAiD;CAErD,MAAM;CACN,QAAQ;CACR,MAAM;CACN,oBAAoB;CAGpB,SAAS;CACT,WAAW;CACX,WAAW;CACX,OAAO;CACP,kBAAkB;CAClB,WAAW;CACX,WAAW;CACX,UAAU;CAGV,QAAQ;CACR,WAAW;CAGX,QAAQ;CACR,UAAU;CACV,OAAO;CACP,UAAU;CACV,OAAO;CACP,QAAQ;CACR,YAAY;CACZ,WAAW;CACZ;AAED,SAAS,EAAkB,GAAwB;AACjD,QAAO,EAAO,QAAQ,MAAM,IAAI,CAAC,QAAQ,UAAU,MAAS,EAAK,aAAa,CAAC;;AAGjF,IAAa,KAAqC,EAAE,WAAQ,mBAIxD,kBAAC,QAAD;CACE,WAAW,EACT,2EACA,EANU,EAAiB,EAAO,aAAa,KAAK,cAOpD,EACD;WAEA,EAAkB,EAAO;CACrB,CAAA"}
|