@burdenoff/microfe-coolandlovely 2026.614.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 (284) hide show
  1. package/README.md +12 -0
  2. package/dist/coolandlovely/CoolAndLovelyRoot.d.ts +5 -0
  3. package/dist/coolandlovely/CoolAndLovelyRoot.d.ts.map +1 -0
  4. package/dist/coolandlovely/CoolAndLovelyRoot.js +177 -0
  5. package/dist/coolandlovely/CoolAndLovelyRoot.js.map +1 -0
  6. package/dist/coolandlovely/CoolAndLovelyRoutes.d.ts +4 -0
  7. package/dist/coolandlovely/CoolAndLovelyRoutes.d.ts.map +1 -0
  8. package/dist/coolandlovely/CoolAndLovelyRoutes.js +215 -0
  9. package/dist/coolandlovely/CoolAndLovelyRoutes.js.map +1 -0
  10. package/dist/coolandlovely/components/CartCard.d.ts +18 -0
  11. package/dist/coolandlovely/components/CartCard.d.ts.map +1 -0
  12. package/dist/coolandlovely/components/EmptyState.d.ts +12 -0
  13. package/dist/coolandlovely/components/EmptyState.d.ts.map +1 -0
  14. package/dist/coolandlovely/components/EmptyState.js +28 -0
  15. package/dist/coolandlovely/components/EmptyState.js.map +1 -0
  16. package/dist/coolandlovely/components/InvestmentCard.d.ts +18 -0
  17. package/dist/coolandlovely/components/InvestmentCard.d.ts.map +1 -0
  18. package/dist/coolandlovely/components/InvestmentCard.js +96 -0
  19. package/dist/coolandlovely/components/InvestmentCard.js.map +1 -0
  20. package/dist/coolandlovely/components/MetricsCard.d.ts +14 -0
  21. package/dist/coolandlovely/components/MetricsCard.d.ts.map +1 -0
  22. package/dist/coolandlovely/components/MetricsCard.js +46 -0
  23. package/dist/coolandlovely/components/MetricsCard.js.map +1 -0
  24. package/dist/coolandlovely/components/OrderCard.d.ts +18 -0
  25. package/dist/coolandlovely/components/OrderCard.d.ts.map +1 -0
  26. package/dist/coolandlovely/components/PageLayout.d.ts +12 -0
  27. package/dist/coolandlovely/components/PageLayout.d.ts.map +1 -0
  28. package/dist/coolandlovely/components/PageLayout.js +26 -0
  29. package/dist/coolandlovely/components/PageLayout.js.map +1 -0
  30. package/dist/coolandlovely/components/RatingDisplay.d.ts +12 -0
  31. package/dist/coolandlovely/components/RatingDisplay.d.ts.map +1 -0
  32. package/dist/coolandlovely/components/RatingDisplay.js +35 -0
  33. package/dist/coolandlovely/components/RatingDisplay.js.map +1 -0
  34. package/dist/coolandlovely/components/StatusBadge.d.ts +9 -0
  35. package/dist/coolandlovely/components/StatusBadge.d.ts.map +1 -0
  36. package/dist/coolandlovely/components/StatusBadge.js +45 -0
  37. package/dist/coolandlovely/components/StatusBadge.js.map +1 -0
  38. package/dist/coolandlovely/components/index.d.ts +13 -0
  39. package/dist/coolandlovely/components/index.d.ts.map +1 -0
  40. package/dist/coolandlovely/context/CoolAndLovelyContext.d.ts +16 -0
  41. package/dist/coolandlovely/context/CoolAndLovelyContext.d.ts.map +1 -0
  42. package/dist/coolandlovely/context/CoolAndLovelyContext.js +93 -0
  43. package/dist/coolandlovely/context/CoolAndLovelyContext.js.map +1 -0
  44. package/dist/coolandlovely/context/index.d.ts +6 -0
  45. package/dist/coolandlovely/context/index.d.ts.map +1 -0
  46. package/dist/coolandlovely/context/index.js +1 -0
  47. package/dist/coolandlovely/hooks/index.d.ts +2 -0
  48. package/dist/coolandlovely/hooks/index.d.ts.map +1 -0
  49. package/dist/coolandlovely/hooks/useCoolAndLovelyApi.d.ts +44 -0
  50. package/dist/coolandlovely/hooks/useCoolAndLovelyApi.d.ts.map +1 -0
  51. package/dist/coolandlovely/hooks/useCoolAndLovelyApi.js +223 -0
  52. package/dist/coolandlovely/hooks/useCoolAndLovelyApi.js.map +1 -0
  53. package/dist/coolandlovely/index.d.ts +11 -0
  54. package/dist/coolandlovely/index.d.ts.map +1 -0
  55. package/dist/coolandlovely/index.js +7 -0
  56. package/dist/coolandlovely/mocks/data.d.ts +61 -0
  57. package/dist/coolandlovely/mocks/data.d.ts.map +1 -0
  58. package/dist/coolandlovely/mocks/data.js +1517 -0
  59. package/dist/coolandlovely/mocks/data.js.map +1 -0
  60. package/dist/coolandlovely/mocks/index.d.ts +7 -0
  61. package/dist/coolandlovely/mocks/index.d.ts.map +1 -0
  62. package/dist/coolandlovely/mocks/users.d.ts +18 -0
  63. package/dist/coolandlovely/mocks/users.d.ts.map +1 -0
  64. package/dist/coolandlovely/mocks/users.js +34 -0
  65. package/dist/coolandlovely/mocks/users.js.map +1 -0
  66. package/dist/coolandlovely/pages/HomePage.d.ts +10 -0
  67. package/dist/coolandlovely/pages/HomePage.d.ts.map +1 -0
  68. package/dist/coolandlovely/pages/HomePage.js +921 -0
  69. package/dist/coolandlovely/pages/HomePage.js.map +1 -0
  70. package/dist/coolandlovely/pages/admin/AdminAnalyticsPage.d.ts +11 -0
  71. package/dist/coolandlovely/pages/admin/AdminAnalyticsPage.d.ts.map +1 -0
  72. package/dist/coolandlovely/pages/admin/AdminAnalyticsPage.js +645 -0
  73. package/dist/coolandlovely/pages/admin/AdminAnalyticsPage.js.map +1 -0
  74. package/dist/coolandlovely/pages/admin/AdminDashboard.d.ts +10 -0
  75. package/dist/coolandlovely/pages/admin/AdminDashboard.d.ts.map +1 -0
  76. package/dist/coolandlovely/pages/admin/AdminDashboard.js +639 -0
  77. package/dist/coolandlovely/pages/admin/AdminDashboard.js.map +1 -0
  78. package/dist/coolandlovely/pages/admin/AdminFinancialPage.d.ts +11 -0
  79. package/dist/coolandlovely/pages/admin/AdminFinancialPage.d.ts.map +1 -0
  80. package/dist/coolandlovely/pages/admin/AdminFinancialPage.js +421 -0
  81. package/dist/coolandlovely/pages/admin/AdminFinancialPage.js.map +1 -0
  82. package/dist/coolandlovely/pages/admin/AdminOrdersPage.d.ts +10 -0
  83. package/dist/coolandlovely/pages/admin/AdminOrdersPage.d.ts.map +1 -0
  84. package/dist/coolandlovely/pages/admin/AdminOrdersPage.js +660 -0
  85. package/dist/coolandlovely/pages/admin/AdminOrdersPage.js.map +1 -0
  86. package/dist/coolandlovely/pages/admin/AdminProfilePage.d.ts +10 -0
  87. package/dist/coolandlovely/pages/admin/AdminProfilePage.d.ts.map +1 -0
  88. package/dist/coolandlovely/pages/admin/AdminProfilePage.js +259 -0
  89. package/dist/coolandlovely/pages/admin/AdminProfilePage.js.map +1 -0
  90. package/dist/coolandlovely/pages/admin/AdminSettingsPage.d.ts +10 -0
  91. package/dist/coolandlovely/pages/admin/AdminSettingsPage.d.ts.map +1 -0
  92. package/dist/coolandlovely/pages/admin/AdminSettingsPage.js +649 -0
  93. package/dist/coolandlovely/pages/admin/AdminSettingsPage.js.map +1 -0
  94. package/dist/coolandlovely/pages/admin/CartManagementPage.d.ts +10 -0
  95. package/dist/coolandlovely/pages/admin/CartManagementPage.d.ts.map +1 -0
  96. package/dist/coolandlovely/pages/admin/CartManagementPage.js +869 -0
  97. package/dist/coolandlovely/pages/admin/CartManagementPage.js.map +1 -0
  98. package/dist/coolandlovely/pages/admin/UserManagementPage.d.ts +10 -0
  99. package/dist/coolandlovely/pages/admin/UserManagementPage.d.ts.map +1 -0
  100. package/dist/coolandlovely/pages/admin/UserManagementPage.js +893 -0
  101. package/dist/coolandlovely/pages/admin/UserManagementPage.js.map +1 -0
  102. package/dist/coolandlovely/pages/cart-owner/AnalyticsDashboard.d.ts +12 -0
  103. package/dist/coolandlovely/pages/cart-owner/AnalyticsDashboard.d.ts.map +1 -0
  104. package/dist/coolandlovely/pages/cart-owner/AnalyticsDashboard.js +834 -0
  105. package/dist/coolandlovely/pages/cart-owner/AnalyticsDashboard.js.map +1 -0
  106. package/dist/coolandlovely/pages/cart-owner/BusinessSettingsPage.d.ts +11 -0
  107. package/dist/coolandlovely/pages/cart-owner/BusinessSettingsPage.d.ts.map +1 -0
  108. package/dist/coolandlovely/pages/cart-owner/BusinessSettingsPage.js +700 -0
  109. package/dist/coolandlovely/pages/cart-owner/BusinessSettingsPage.js.map +1 -0
  110. package/dist/coolandlovely/pages/cart-owner/CartOwnerDashboard.d.ts +11 -0
  111. package/dist/coolandlovely/pages/cart-owner/CartOwnerDashboard.d.ts.map +1 -0
  112. package/dist/coolandlovely/pages/cart-owner/CartOwnerDashboard.js +760 -0
  113. package/dist/coolandlovely/pages/cart-owner/CartOwnerDashboard.js.map +1 -0
  114. package/dist/coolandlovely/pages/cart-owner/CartOwnerProfilePage.d.ts +12 -0
  115. package/dist/coolandlovely/pages/cart-owner/CartOwnerProfilePage.d.ts.map +1 -0
  116. package/dist/coolandlovely/pages/cart-owner/CartOwnerProfilePage.js +886 -0
  117. package/dist/coolandlovely/pages/cart-owner/CartOwnerProfilePage.js.map +1 -0
  118. package/dist/coolandlovely/pages/cart-owner/CartServiceConfigPage.d.ts +11 -0
  119. package/dist/coolandlovely/pages/cart-owner/CartServiceConfigPage.d.ts.map +1 -0
  120. package/dist/coolandlovely/pages/cart-owner/CartServiceConfigPage.js +631 -0
  121. package/dist/coolandlovely/pages/cart-owner/CartServiceConfigPage.js.map +1 -0
  122. package/dist/coolandlovely/pages/cart-owner/InventoryManagementPage.d.ts +11 -0
  123. package/dist/coolandlovely/pages/cart-owner/InventoryManagementPage.d.ts.map +1 -0
  124. package/dist/coolandlovely/pages/cart-owner/InventoryManagementPage.js +913 -0
  125. package/dist/coolandlovely/pages/cart-owner/InventoryManagementPage.js.map +1 -0
  126. package/dist/coolandlovely/pages/cart-owner/OrderManagementPage.d.ts +10 -0
  127. package/dist/coolandlovely/pages/cart-owner/OrderManagementPage.d.ts.map +1 -0
  128. package/dist/coolandlovely/pages/cart-owner/OrderManagementPage.js +881 -0
  129. package/dist/coolandlovely/pages/cart-owner/OrderManagementPage.js.map +1 -0
  130. package/dist/coolandlovely/pages/cart-owner/StaffManagementPage.d.ts +11 -0
  131. package/dist/coolandlovely/pages/cart-owner/StaffManagementPage.d.ts.map +1 -0
  132. package/dist/coolandlovely/pages/cart-owner/StaffManagementPage.js +833 -0
  133. package/dist/coolandlovely/pages/cart-owner/StaffManagementPage.js.map +1 -0
  134. package/dist/coolandlovely/pages/common/HelpSupportPage.d.ts +11 -0
  135. package/dist/coolandlovely/pages/common/HelpSupportPage.d.ts.map +1 -0
  136. package/dist/coolandlovely/pages/common/HelpSupportPage.js +1325 -0
  137. package/dist/coolandlovely/pages/common/HelpSupportPage.js.map +1 -0
  138. package/dist/coolandlovely/pages/common/NotificationCenterPage.d.ts +11 -0
  139. package/dist/coolandlovely/pages/common/NotificationCenterPage.d.ts.map +1 -0
  140. package/dist/coolandlovely/pages/common/NotificationCenterPage.js +665 -0
  141. package/dist/coolandlovely/pages/common/NotificationCenterPage.js.map +1 -0
  142. package/dist/coolandlovely/pages/common/SettingsPage.d.ts +9 -0
  143. package/dist/coolandlovely/pages/common/SettingsPage.d.ts.map +1 -0
  144. package/dist/coolandlovely/pages/common/SettingsPage.js +964 -0
  145. package/dist/coolandlovely/pages/common/SettingsPage.js.map +1 -0
  146. package/dist/coolandlovely/pages/customer/BookingDetailsPage.d.ts +12 -0
  147. package/dist/coolandlovely/pages/customer/BookingDetailsPage.d.ts.map +1 -0
  148. package/dist/coolandlovely/pages/customer/BookingDetailsPage.js +593 -0
  149. package/dist/coolandlovely/pages/customer/BookingDetailsPage.js.map +1 -0
  150. package/dist/coolandlovely/pages/customer/CartDetailPage.d.ts +13 -0
  151. package/dist/coolandlovely/pages/customer/CartDetailPage.d.ts.map +1 -0
  152. package/dist/coolandlovely/pages/customer/CartDetailPage.js +620 -0
  153. package/dist/coolandlovely/pages/customer/CartDetailPage.js.map +1 -0
  154. package/dist/coolandlovely/pages/customer/CartDiscoveryPage.d.ts +11 -0
  155. package/dist/coolandlovely/pages/customer/CartDiscoveryPage.d.ts.map +1 -0
  156. package/dist/coolandlovely/pages/customer/CartDiscoveryPage.js +547 -0
  157. package/dist/coolandlovely/pages/customer/CartDiscoveryPage.js.map +1 -0
  158. package/dist/coolandlovely/pages/customer/CheckoutPage.d.ts +9 -0
  159. package/dist/coolandlovely/pages/customer/CheckoutPage.d.ts.map +1 -0
  160. package/dist/coolandlovely/pages/customer/CheckoutPage.js +532 -0
  161. package/dist/coolandlovely/pages/customer/CheckoutPage.js.map +1 -0
  162. package/dist/coolandlovely/pages/customer/CustomerDashboard.d.ts +10 -0
  163. package/dist/coolandlovely/pages/customer/CustomerDashboard.d.ts.map +1 -0
  164. package/dist/coolandlovely/pages/customer/CustomerDashboard.js +496 -0
  165. package/dist/coolandlovely/pages/customer/CustomerDashboard.js.map +1 -0
  166. package/dist/coolandlovely/pages/customer/CustomerProfilePage.d.ts +10 -0
  167. package/dist/coolandlovely/pages/customer/CustomerProfilePage.d.ts.map +1 -0
  168. package/dist/coolandlovely/pages/customer/CustomerProfilePage.js +621 -0
  169. package/dist/coolandlovely/pages/customer/CustomerProfilePage.js.map +1 -0
  170. package/dist/coolandlovely/pages/customer/DirectServiceBookingPage.d.ts +12 -0
  171. package/dist/coolandlovely/pages/customer/DirectServiceBookingPage.d.ts.map +1 -0
  172. package/dist/coolandlovely/pages/customer/DirectServiceBookingPage.js +623 -0
  173. package/dist/coolandlovely/pages/customer/DirectServiceBookingPage.js.map +1 -0
  174. package/dist/coolandlovely/pages/customer/FavoritesPage.d.ts +11 -0
  175. package/dist/coolandlovely/pages/customer/FavoritesPage.d.ts.map +1 -0
  176. package/dist/coolandlovely/pages/customer/FavoritesPage.js +477 -0
  177. package/dist/coolandlovely/pages/customer/FavoritesPage.js.map +1 -0
  178. package/dist/coolandlovely/pages/customer/OrderHistoryPage.d.ts +9 -0
  179. package/dist/coolandlovely/pages/customer/OrderHistoryPage.d.ts.map +1 -0
  180. package/dist/coolandlovely/pages/customer/OrderHistoryPage.js +438 -0
  181. package/dist/coolandlovely/pages/customer/OrderHistoryPage.js.map +1 -0
  182. package/dist/coolandlovely/pages/customer/OrderTrackingPage.d.ts +9 -0
  183. package/dist/coolandlovely/pages/customer/OrderTrackingPage.d.ts.map +1 -0
  184. package/dist/coolandlovely/pages/customer/OrderTrackingPage.js +388 -0
  185. package/dist/coolandlovely/pages/customer/OrderTrackingPage.js.map +1 -0
  186. package/dist/coolandlovely/pages/customer/PaymentMethodsPage.d.ts +11 -0
  187. package/dist/coolandlovely/pages/customer/PaymentMethodsPage.d.ts.map +1 -0
  188. package/dist/coolandlovely/pages/customer/PaymentMethodsPage.js +488 -0
  189. package/dist/coolandlovely/pages/customer/PaymentMethodsPage.js.map +1 -0
  190. package/dist/coolandlovely/pages/customer/ReviewsPage.d.ts +11 -0
  191. package/dist/coolandlovely/pages/customer/ReviewsPage.d.ts.map +1 -0
  192. package/dist/coolandlovely/pages/customer/ReviewsPage.js +606 -0
  193. package/dist/coolandlovely/pages/customer/ReviewsPage.js.map +1 -0
  194. package/dist/coolandlovely/pages/customer/SavedAddressesPage.d.ts +10 -0
  195. package/dist/coolandlovely/pages/customer/SavedAddressesPage.d.ts.map +1 -0
  196. package/dist/coolandlovely/pages/customer/SavedAddressesPage.js +443 -0
  197. package/dist/coolandlovely/pages/customer/SavedAddressesPage.js.map +1 -0
  198. package/dist/coolandlovely/pages/investor/InvestmentDetailsPage.d.ts +10 -0
  199. package/dist/coolandlovely/pages/investor/InvestmentDetailsPage.d.ts.map +1 -0
  200. package/dist/coolandlovely/pages/investor/InvestmentDetailsPage.js +849 -0
  201. package/dist/coolandlovely/pages/investor/InvestmentDetailsPage.js.map +1 -0
  202. package/dist/coolandlovely/pages/investor/InvestmentOpportunitiesPage.d.ts +10 -0
  203. package/dist/coolandlovely/pages/investor/InvestmentOpportunitiesPage.d.ts.map +1 -0
  204. package/dist/coolandlovely/pages/investor/InvestmentOpportunitiesPage.js +939 -0
  205. package/dist/coolandlovely/pages/investor/InvestmentOpportunitiesPage.js.map +1 -0
  206. package/dist/coolandlovely/pages/investor/InvestorAnalyticsPage.d.ts +11 -0
  207. package/dist/coolandlovely/pages/investor/InvestorAnalyticsPage.d.ts.map +1 -0
  208. package/dist/coolandlovely/pages/investor/InvestorAnalyticsPage.js +681 -0
  209. package/dist/coolandlovely/pages/investor/InvestorAnalyticsPage.js.map +1 -0
  210. package/dist/coolandlovely/pages/investor/InvestorDashboard.d.ts +9 -0
  211. package/dist/coolandlovely/pages/investor/InvestorDashboard.d.ts.map +1 -0
  212. package/dist/coolandlovely/pages/investor/InvestorDashboard.js +419 -0
  213. package/dist/coolandlovely/pages/investor/InvestorDashboard.js.map +1 -0
  214. package/dist/coolandlovely/pages/investor/InvestorInvestmentsPage.d.ts +10 -0
  215. package/dist/coolandlovely/pages/investor/InvestorInvestmentsPage.d.ts.map +1 -0
  216. package/dist/coolandlovely/pages/investor/InvestorInvestmentsPage.js +399 -0
  217. package/dist/coolandlovely/pages/investor/InvestorInvestmentsPage.js.map +1 -0
  218. package/dist/coolandlovely/pages/investor/InvestorPortfolioPage.d.ts +10 -0
  219. package/dist/coolandlovely/pages/investor/InvestorPortfolioPage.d.ts.map +1 -0
  220. package/dist/coolandlovely/pages/investor/InvestorPortfolioPage.js +569 -0
  221. package/dist/coolandlovely/pages/investor/InvestorPortfolioPage.js.map +1 -0
  222. package/dist/coolandlovely/pages/investor/InvestorProfilePage.d.ts +12 -0
  223. package/dist/coolandlovely/pages/investor/InvestorProfilePage.d.ts.map +1 -0
  224. package/dist/coolandlovely/pages/investor/InvestorProfilePage.js +1065 -0
  225. package/dist/coolandlovely/pages/investor/InvestorProfilePage.js.map +1 -0
  226. package/dist/coolandlovely/pages/worker/TaskDetailsPage.d.ts +22 -0
  227. package/dist/coolandlovely/pages/worker/TaskDetailsPage.d.ts.map +1 -0
  228. package/dist/coolandlovely/pages/worker/TaskDetailsPage.js +496 -0
  229. package/dist/coolandlovely/pages/worker/TaskDetailsPage.js.map +1 -0
  230. package/dist/coolandlovely/pages/worker/WorkerDashboard.d.ts +18 -0
  231. package/dist/coolandlovely/pages/worker/WorkerDashboard.d.ts.map +1 -0
  232. package/dist/coolandlovely/pages/worker/WorkerDashboard.js +634 -0
  233. package/dist/coolandlovely/pages/worker/WorkerDashboard.js.map +1 -0
  234. package/dist/coolandlovely/pages/worker/WorkerOrdersPage.d.ts +18 -0
  235. package/dist/coolandlovely/pages/worker/WorkerOrdersPage.d.ts.map +1 -0
  236. package/dist/coolandlovely/pages/worker/WorkerOrdersPage.js +675 -0
  237. package/dist/coolandlovely/pages/worker/WorkerOrdersPage.js.map +1 -0
  238. package/dist/coolandlovely/pages/worker/WorkerProfilePage.d.ts +18 -0
  239. package/dist/coolandlovely/pages/worker/WorkerProfilePage.d.ts.map +1 -0
  240. package/dist/coolandlovely/pages/worker/WorkerProfilePage.js +687 -0
  241. package/dist/coolandlovely/pages/worker/WorkerProfilePage.js.map +1 -0
  242. package/dist/coolandlovely/pages/worker/WorkerSchedulePage.d.ts +17 -0
  243. package/dist/coolandlovely/pages/worker/WorkerSchedulePage.d.ts.map +1 -0
  244. package/dist/coolandlovely/pages/worker/WorkerSchedulePage.js +578 -0
  245. package/dist/coolandlovely/pages/worker/WorkerSchedulePage.js.map +1 -0
  246. package/dist/coolandlovely/store/coolandlovelyStore.d.ts +60 -0
  247. package/dist/coolandlovely/store/coolandlovelyStore.d.ts.map +1 -0
  248. package/dist/coolandlovely/store/coolandlovelyStore.js +38 -0
  249. package/dist/coolandlovely/store/coolandlovelyStore.js.map +1 -0
  250. package/dist/coolandlovely/store/index.d.ts +6 -0
  251. package/dist/coolandlovely/store/index.d.ts.map +1 -0
  252. package/dist/coolandlovely/store/index.js +1 -0
  253. package/dist/coolandlovely/types/index.d.ts +458 -0
  254. package/dist/coolandlovely/types/index.d.ts.map +1 -0
  255. package/dist/coolandlovely/utils/cn.d.ts +4 -0
  256. package/dist/coolandlovely/utils/cn.d.ts.map +1 -0
  257. package/dist/coolandlovely/utils/cn.js +10 -0
  258. package/dist/coolandlovely/utils/cn.js.map +1 -0
  259. package/dist/coolandlovely/utils/formatters.d.ts +78 -0
  260. package/dist/coolandlovely/utils/formatters.d.ts.map +1 -0
  261. package/dist/coolandlovely/utils/formatters.js +51 -0
  262. package/dist/coolandlovely/utils/formatters.js.map +1 -0
  263. package/dist/coolandlovely/utils/index.d.ts +8 -0
  264. package/dist/coolandlovely/utils/index.d.ts.map +1 -0
  265. package/dist/coolandlovely/utils/navigation.d.ts +20 -0
  266. package/dist/coolandlovely/utils/navigation.d.ts.map +1 -0
  267. package/dist/coolandlovely/utils/navigation.js +9 -0
  268. package/dist/coolandlovely/utils/navigation.js.map +1 -0
  269. package/dist/generated/global-operations.d.ts +2 -0
  270. package/dist/generated/global-operations.d.ts.map +1 -0
  271. package/dist/generated/global-types.d.ts +23527 -0
  272. package/dist/generated/global-types.d.ts.map +1 -0
  273. package/dist/generated/wspace-operations.d.ts +2 -0
  274. package/dist/generated/wspace-operations.d.ts.map +1 -0
  275. package/dist/generated/wspace-types.d.ts +57851 -0
  276. package/dist/generated/wspace-types.d.ts.map +1 -0
  277. package/dist/index.d.ts +6 -0
  278. package/dist/index.d.ts.map +1 -0
  279. package/dist/index.js +7 -0
  280. package/dist/node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.js +18 -0
  281. package/dist/node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.js.map +1 -0
  282. package/dist/node_modules/.bun/tailwind-merge@3.5.0/node_modules/tailwind-merge/dist/bundle-mjs.js +1674 -0
  283. package/dist/node_modules/.bun/tailwind-merge@3.5.0/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -0
  284. package/package.json +106 -0
@@ -0,0 +1,893 @@
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 { useCallback as r, useEffect as i, useMemo as a, useState as o } from "react";
5
+ import { ChevronLeft as s, ChevronRight as c, Edit3 as l, Loader2 as u, Search as d, Shield as f, Smartphone as p, Trash2 as m, UserCheck as h, UserX as g, Users as _, X as v } from "lucide-react";
6
+ import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
7
+ //#region src/coolandlovely/pages/admin/UserManagementPage.tsx
8
+ var S = [
9
+ {
10
+ id: "user-001",
11
+ email: "rahul.sharma@gmail.com",
12
+ phone: "+91 98765 43210",
13
+ firstName: "Rahul",
14
+ lastName: "Sharma",
15
+ role: "customer",
16
+ isEmailVerified: !0,
17
+ isPhoneVerified: !0,
18
+ profilePicture: "https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?w=100",
19
+ status: "active",
20
+ lastLoginTime: "2024-06-23T16:45:00Z",
21
+ totalOrders: 45,
22
+ totalSpent: 12350,
23
+ registrationDate: "2024-01-15T08:30:00Z",
24
+ deviceInfo: "iPhone 14 Pro"
25
+ },
26
+ {
27
+ id: "user-002",
28
+ email: "priya.patel@gmail.com",
29
+ phone: "+91 98765 43211",
30
+ firstName: "Priya",
31
+ lastName: "Patel",
32
+ role: "cart_owner",
33
+ isEmailVerified: !0,
34
+ isPhoneVerified: !0,
35
+ profilePicture: "https://images.unsplash.com/photo-1494790108377-be9c29b29330?w=100",
36
+ status: "active",
37
+ lastLoginTime: "2024-06-24T09:15:00Z",
38
+ totalEarnings: 285e3,
39
+ kycStatus: "verified",
40
+ registrationDate: "2023-08-20T10:15:00Z",
41
+ deviceInfo: "Android Samsung"
42
+ },
43
+ {
44
+ id: "user-003",
45
+ email: "amit.kumar@gmail.com",
46
+ phone: "+91 98765 43212",
47
+ firstName: "Amit",
48
+ lastName: "Kumar",
49
+ role: "worker",
50
+ isEmailVerified: !0,
51
+ isPhoneVerified: !1,
52
+ profilePicture: "https://images.unsplash.com/photo-1500648767791-00dcc994a43e?w=100",
53
+ status: "suspended",
54
+ lastLoginTime: "2024-06-15T14:30:00Z",
55
+ totalEarnings: 45e3,
56
+ kycStatus: "pending",
57
+ registrationDate: "2024-02-10T12:45:00Z",
58
+ deviceInfo: "Web Browser"
59
+ },
60
+ {
61
+ id: "user-004",
62
+ email: "sneha.investor@gmail.com",
63
+ phone: "+91 98765 43213",
64
+ firstName: "Sneha",
65
+ lastName: "Reddy",
66
+ role: "investor",
67
+ isEmailVerified: !0,
68
+ isPhoneVerified: !0,
69
+ profilePicture: "https://images.unsplash.com/photo-1438761681033-6461ffad8d80?w=100",
70
+ status: "active",
71
+ lastLoginTime: "2024-06-24T10:30:00Z",
72
+ kycStatus: "verified",
73
+ riskScore: 2.1,
74
+ registrationDate: "2023-12-01T15:20:00Z",
75
+ deviceInfo: "MacBook Pro"
76
+ },
77
+ {
78
+ id: "user-005",
79
+ email: "new.user@gmail.com",
80
+ phone: "+91 98765 43214",
81
+ firstName: "New",
82
+ lastName: "User",
83
+ role: "customer",
84
+ isEmailVerified: !1,
85
+ isPhoneVerified: !1,
86
+ profilePicture: "",
87
+ status: "pending",
88
+ registrationDate: "2024-06-24T09:00:00Z",
89
+ deviceInfo: "iPhone 15"
90
+ }
91
+ ];
92
+ function C() {
93
+ let { navigateTo: C } = e(), [w, T] = o([]), [E, D] = o(!0), [O, k] = o(null), [A, j] = o(!1), [M, N] = o("edit"), [P, F] = o({
94
+ firstName: "",
95
+ lastName: "",
96
+ email: "",
97
+ phone: "",
98
+ role: ""
99
+ }), [I, L] = o(1), [R, z] = o({
100
+ role: "",
101
+ status: "",
102
+ searchQuery: "",
103
+ sortBy: "recent",
104
+ registrationDate: ""
105
+ }), [B] = o({
106
+ totalUsers: 2456,
107
+ activeUsers: 2134,
108
+ newUsers: 89,
109
+ verifiedUsers: 2021,
110
+ customers: 1845,
111
+ cartOwners: 342,
112
+ workers: 156,
113
+ investors: 113
114
+ }), V = r(() => {
115
+ D(!0), setTimeout(() => {
116
+ let e = [...S];
117
+ if (R.searchQuery) {
118
+ let t = R.searchQuery.toLowerCase();
119
+ e = e.filter((e) => e.firstName.toLowerCase().includes(t) || e.lastName.toLowerCase().includes(t) || e.email.toLowerCase().includes(t) || e.phone.includes(t));
120
+ }
121
+ if (R.role && (e = e.filter((e) => e.role === R.role)), R.status && (e = e.filter((e) => e.status === R.status)), R.registrationDate) {
122
+ let t = parseInt(R.registrationDate), n = /* @__PURE__ */ new Date(Date.now() - t * 864e5);
123
+ e = e.filter((e) => new Date(e.registrationDate) >= n);
124
+ }
125
+ switch (R.sortBy) {
126
+ case "name":
127
+ e.sort((e, t) => e.firstName.localeCompare(t.firstName));
128
+ break;
129
+ case "activity":
130
+ e.sort((e, t) => {
131
+ let n = e.lastLoginTime ? new Date(e.lastLoginTime).getTime() : 0;
132
+ return (t.lastLoginTime ? new Date(t.lastLoginTime).getTime() : 0) - n;
133
+ });
134
+ break;
135
+ default: e.sort((e, t) => new Date(t.registrationDate).getTime() - new Date(e.registrationDate).getTime());
136
+ }
137
+ T(e), D(!1);
138
+ }, 800);
139
+ }, [R]);
140
+ i(() => {
141
+ V();
142
+ }, [V]);
143
+ let H = (e, t) => {
144
+ z((n) => ({
145
+ ...n,
146
+ [e]: t
147
+ })), L(1);
148
+ }, U = (e, t) => {
149
+ if (t === "suspend" || t === "activate" || t === "verify") {
150
+ let n = t === "suspend" ? `User ${e.firstName} ${e.lastName} suspended` : t === "activate" ? `User ${e.firstName} ${e.lastName} activated` : `User ${e.firstName} ${e.lastName} verified`;
151
+ alert(n), V();
152
+ return;
153
+ }
154
+ k(e), N(t), F({
155
+ firstName: e.firstName,
156
+ lastName: e.lastName,
157
+ email: e.email,
158
+ phone: e.phone,
159
+ role: e.role
160
+ }), j(!0);
161
+ }, W = () => {
162
+ O && (alert(`User ${O.firstName} ${O.lastName} deleted`), j(!1), V());
163
+ }, G = () => {
164
+ alert("User updated successfully"), j(!1), V();
165
+ }, K = (e) => new Date(e).toLocaleDateString("en-IN", {
166
+ year: "numeric",
167
+ month: "short",
168
+ day: "numeric"
169
+ }), q = (e) => `₹${e.toLocaleString("en-IN")}`, J = a(() => {
170
+ let e = (I - 1) * 10;
171
+ return w.slice(e, e + 10);
172
+ }, [w, I]), Y = (e) => /* @__PURE__ */ b("span", {
173
+ className: t("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium", {
174
+ customer: "bg-blue-500/20 text-blue-600 dark:text-blue-400",
175
+ cart_owner: "bg-green-500/20 text-green-600 dark:text-green-400",
176
+ worker: "bg-yellow-500/20 text-yellow-600 dark:text-yellow-400",
177
+ investor: "bg-purple-500/20 text-purple-600 dark:text-purple-400",
178
+ admin: "bg-red-500/20 text-red-600 dark:text-red-400"
179
+ }[e]),
180
+ children: {
181
+ customer: "Customer",
182
+ cart_owner: "Cart Owner",
183
+ worker: "Worker",
184
+ investor: "Investor",
185
+ admin: "Admin"
186
+ }[e] ?? e
187
+ }), X = (e) => /* @__PURE__ */ b("span", {
188
+ className: t("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium capitalize", {
189
+ active: "bg-green-500/20 text-green-600 dark:text-green-400",
190
+ inactive: "bg-secondary text-secondary-foreground",
191
+ suspended: "bg-red-500/20 text-red-600 dark:text-red-400",
192
+ pending: "bg-yellow-500/20 text-yellow-600 dark:text-yellow-400"
193
+ }[e]),
194
+ children: e
195
+ });
196
+ return E ? /* @__PURE__ */ b(n, {
197
+ title: "User Management",
198
+ description: "Loading users...",
199
+ children: /* @__PURE__ */ x("div", {
200
+ className: "flex flex-col items-center justify-center py-20",
201
+ children: [/* @__PURE__ */ b(u, { className: "h-10 w-10 animate-spin text-muted-foreground mb-4" }), /* @__PURE__ */ b("p", {
202
+ className: "text-muted-foreground",
203
+ children: "Loading users..."
204
+ })]
205
+ })
206
+ }) : /* @__PURE__ */ x(n, {
207
+ title: "User Management",
208
+ description: `${B.totalUsers.toLocaleString("en-IN")} registered users on the platform`,
209
+ children: [
210
+ /* @__PURE__ */ b("div", {
211
+ className: "grid grid-cols-2 sm:grid-cols-4 lg:grid-cols-8 gap-3 mb-6",
212
+ children: [
213
+ {
214
+ label: "Total Users",
215
+ value: B.totalUsers.toLocaleString("en-IN"),
216
+ cls: ""
217
+ },
218
+ {
219
+ label: "Active",
220
+ value: B.activeUsers.toLocaleString("en-IN"),
221
+ cls: "bg-green-500/10 border-green-500/30"
222
+ },
223
+ {
224
+ label: "New (30d)",
225
+ value: B.newUsers.toString(),
226
+ cls: "bg-blue-500/10 border-blue-500/30"
227
+ },
228
+ {
229
+ label: "Verified",
230
+ value: B.verifiedUsers.toLocaleString("en-IN"),
231
+ cls: "bg-purple-500/10 border-purple-500/30"
232
+ },
233
+ {
234
+ label: "Customers",
235
+ value: B.customers.toLocaleString("en-IN"),
236
+ cls: ""
237
+ },
238
+ {
239
+ label: "Cart Owners",
240
+ value: B.cartOwners.toString(),
241
+ cls: ""
242
+ },
243
+ {
244
+ label: "Workers",
245
+ value: B.workers.toString(),
246
+ cls: ""
247
+ },
248
+ {
249
+ label: "Investors",
250
+ value: B.investors.toString(),
251
+ cls: ""
252
+ }
253
+ ].map((e) => /* @__PURE__ */ x("div", {
254
+ className: t("rounded-lg border border-border bg-card p-3", e.cls),
255
+ children: [/* @__PURE__ */ b("p", {
256
+ className: "text-xs text-muted-foreground",
257
+ children: e.label
258
+ }), /* @__PURE__ */ b("p", {
259
+ className: "text-lg font-bold text-foreground",
260
+ children: e.value
261
+ })]
262
+ }, e.label))
263
+ }),
264
+ /* @__PURE__ */ b("div", {
265
+ className: "rounded-lg border border-border bg-card p-4 mb-6",
266
+ children: /* @__PURE__ */ x("div", {
267
+ className: "grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-5 gap-3",
268
+ children: [
269
+ /* @__PURE__ */ x("div", {
270
+ className: "relative",
271
+ children: [/* @__PURE__ */ b(d, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" }), /* @__PURE__ */ b("input", {
272
+ type: "text",
273
+ placeholder: "Search users...",
274
+ value: R.searchQuery,
275
+ onChange: (e) => H("searchQuery", e.target.value),
276
+ className: "w-full rounded-lg border border-border bg-card py-2 pl-10 pr-4 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring"
277
+ })]
278
+ }),
279
+ /* @__PURE__ */ x("select", {
280
+ value: R.role,
281
+ onChange: (e) => H("role", e.target.value),
282
+ className: "rounded-lg border border-border bg-card py-2 px-3 text-sm text-foreground focus:outline-none focus:ring-2 focus:ring-ring",
283
+ children: [
284
+ /* @__PURE__ */ b("option", {
285
+ value: "",
286
+ children: "All Roles"
287
+ }),
288
+ /* @__PURE__ */ b("option", {
289
+ value: "customer",
290
+ children: "Customers"
291
+ }),
292
+ /* @__PURE__ */ b("option", {
293
+ value: "cart_owner",
294
+ children: "Cart Owners"
295
+ }),
296
+ /* @__PURE__ */ b("option", {
297
+ value: "worker",
298
+ children: "Workers"
299
+ }),
300
+ /* @__PURE__ */ b("option", {
301
+ value: "investor",
302
+ children: "Investors"
303
+ })
304
+ ]
305
+ }),
306
+ /* @__PURE__ */ x("select", {
307
+ value: R.status,
308
+ onChange: (e) => H("status", e.target.value),
309
+ className: "rounded-lg border border-border bg-card py-2 px-3 text-sm text-foreground focus:outline-none focus:ring-2 focus:ring-ring",
310
+ children: [
311
+ /* @__PURE__ */ b("option", {
312
+ value: "",
313
+ children: "All Status"
314
+ }),
315
+ /* @__PURE__ */ b("option", {
316
+ value: "active",
317
+ children: "Active"
318
+ }),
319
+ /* @__PURE__ */ b("option", {
320
+ value: "inactive",
321
+ children: "Inactive"
322
+ }),
323
+ /* @__PURE__ */ b("option", {
324
+ value: "suspended",
325
+ children: "Suspended"
326
+ }),
327
+ /* @__PURE__ */ b("option", {
328
+ value: "pending",
329
+ children: "Pending"
330
+ })
331
+ ]
332
+ }),
333
+ /* @__PURE__ */ x("select", {
334
+ value: R.registrationDate,
335
+ onChange: (e) => H("registrationDate", e.target.value),
336
+ className: "rounded-lg border border-border bg-card py-2 px-3 text-sm text-foreground focus:outline-none focus:ring-2 focus:ring-ring",
337
+ children: [
338
+ /* @__PURE__ */ b("option", {
339
+ value: "",
340
+ children: "All Time"
341
+ }),
342
+ /* @__PURE__ */ b("option", {
343
+ value: "1",
344
+ children: "Last 24 hours"
345
+ }),
346
+ /* @__PURE__ */ b("option", {
347
+ value: "7",
348
+ children: "Last 7 days"
349
+ }),
350
+ /* @__PURE__ */ b("option", {
351
+ value: "30",
352
+ children: "Last 30 days"
353
+ }),
354
+ /* @__PURE__ */ b("option", {
355
+ value: "90",
356
+ children: "Last 90 days"
357
+ })
358
+ ]
359
+ }),
360
+ /* @__PURE__ */ x("select", {
361
+ value: R.sortBy,
362
+ onChange: (e) => H("sortBy", e.target.value),
363
+ className: "rounded-lg border border-border bg-card py-2 px-3 text-sm text-foreground focus:outline-none focus:ring-2 focus:ring-ring",
364
+ children: [
365
+ /* @__PURE__ */ b("option", {
366
+ value: "recent",
367
+ children: "Most Recent"
368
+ }),
369
+ /* @__PURE__ */ b("option", {
370
+ value: "name",
371
+ children: "Name A-Z"
372
+ }),
373
+ /* @__PURE__ */ b("option", {
374
+ value: "activity",
375
+ children: "Last Activity"
376
+ })
377
+ ]
378
+ })
379
+ ]
380
+ })
381
+ }),
382
+ /* @__PURE__ */ x("div", {
383
+ className: "rounded-lg border border-border bg-card overflow-hidden",
384
+ children: [
385
+ /* @__PURE__ */ b("div", {
386
+ className: "block md:hidden space-y-4 p-4",
387
+ children: J.map((e) => /* @__PURE__ */ x("div", {
388
+ className: "rounded-lg border border-border bg-muted/30 p-4",
389
+ children: [
390
+ /* @__PURE__ */ x("div", {
391
+ className: "flex items-center mb-3",
392
+ children: [e.profilePicture ? /* @__PURE__ */ b("img", {
393
+ src: e.profilePicture,
394
+ alt: `${e.firstName} ${e.lastName}`,
395
+ className: "w-12 h-12 rounded-full object-cover mr-3"
396
+ }) : /* @__PURE__ */ b("div", {
397
+ className: "w-12 h-12 rounded-full bg-muted flex items-center justify-center mr-3",
398
+ children: /* @__PURE__ */ b(_, { className: "h-6 w-6 text-muted-foreground" })
399
+ }), /* @__PURE__ */ x("div", {
400
+ className: "flex-1 min-w-0",
401
+ children: [
402
+ /* @__PURE__ */ x("h3", {
403
+ className: "font-medium text-foreground",
404
+ children: [
405
+ e.firstName,
406
+ " ",
407
+ e.lastName
408
+ ]
409
+ }),
410
+ /* @__PURE__ */ b("p", {
411
+ className: "text-sm text-muted-foreground truncate",
412
+ children: e.email
413
+ }),
414
+ /* @__PURE__ */ b("p", {
415
+ className: "text-sm text-muted-foreground",
416
+ children: e.phone
417
+ })
418
+ ]
419
+ })]
420
+ }),
421
+ /* @__PURE__ */ x("div", {
422
+ className: "flex flex-wrap gap-2 mb-3",
423
+ children: [Y(e.role), X(e.status)]
424
+ }),
425
+ /* @__PURE__ */ x("div", {
426
+ className: "grid grid-cols-2 gap-4 text-sm mb-3",
427
+ children: [/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
428
+ className: "text-muted-foreground",
429
+ children: "Registered"
430
+ }), /* @__PURE__ */ b("p", {
431
+ className: "text-foreground",
432
+ children: K(e.registrationDate)
433
+ })] }), /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
434
+ className: "text-muted-foreground",
435
+ children: "Last Login"
436
+ }), /* @__PURE__ */ b("p", {
437
+ className: "text-foreground",
438
+ children: e.lastLoginTime ? K(e.lastLoginTime) : "Never"
439
+ })] })]
440
+ }),
441
+ /* @__PURE__ */ x("div", {
442
+ className: "flex flex-wrap gap-3 mb-3",
443
+ children: [
444
+ /* @__PURE__ */ x("div", {
445
+ className: "flex items-center",
446
+ children: [/* @__PURE__ */ b("span", { className: t("w-2 h-2 rounded-full mr-2", e.isEmailVerified ? "bg-green-500" : "bg-red-500") }), /* @__PURE__ */ b("span", {
447
+ className: "text-sm text-muted-foreground",
448
+ children: "Email"
449
+ })]
450
+ }),
451
+ /* @__PURE__ */ x("div", {
452
+ className: "flex items-center",
453
+ children: [/* @__PURE__ */ b("span", { className: t("w-2 h-2 rounded-full mr-2", e.isPhoneVerified ? "bg-green-500" : "bg-red-500") }), /* @__PURE__ */ b("span", {
454
+ className: "text-sm text-muted-foreground",
455
+ children: "Phone"
456
+ })]
457
+ }),
458
+ e.kycStatus && /* @__PURE__ */ x("div", {
459
+ className: "flex items-center",
460
+ children: [/* @__PURE__ */ b("span", { className: t("w-2 h-2 rounded-full mr-2", e.kycStatus === "verified" ? "bg-green-500" : e.kycStatus === "pending" ? "bg-yellow-500" : "bg-red-500") }), /* @__PURE__ */ b("span", {
461
+ className: "text-sm text-muted-foreground",
462
+ children: "KYC"
463
+ })]
464
+ })
465
+ ]
466
+ }),
467
+ /* @__PURE__ */ x("div", {
468
+ className: "flex flex-wrap gap-2",
469
+ children: [
470
+ /* @__PURE__ */ b("button", {
471
+ type: "button",
472
+ onClick: () => U(e, "edit"),
473
+ className: "rounded-lg border border-border px-3 py-1.5 text-sm font-medium text-foreground hover:bg-accent transition-colors",
474
+ children: "Edit"
475
+ }),
476
+ e.status === "active" ? /* @__PURE__ */ b("button", {
477
+ type: "button",
478
+ onClick: () => U(e, "suspend"),
479
+ className: "rounded-lg border border-border px-3 py-1.5 text-sm font-medium text-red-600 hover:bg-red-500/10 transition-colors",
480
+ children: "Suspend"
481
+ }) : /* @__PURE__ */ b("button", {
482
+ type: "button",
483
+ onClick: () => U(e, "activate"),
484
+ className: "rounded-lg border border-border px-3 py-1.5 text-sm font-medium text-green-600 hover:bg-green-500/10 transition-colors",
485
+ children: "Activate"
486
+ }),
487
+ e.kycStatus === "pending" && /* @__PURE__ */ b("button", {
488
+ type: "button",
489
+ onClick: () => U(e, "verify"),
490
+ className: "rounded-lg bg-primary px-3 py-1.5 text-sm font-medium text-primary-foreground hover:bg-primary/90 transition-colors",
491
+ children: "Verify"
492
+ })
493
+ ]
494
+ })
495
+ ]
496
+ }, e.id))
497
+ }),
498
+ /* @__PURE__ */ b("div", {
499
+ className: "hidden md:block overflow-x-auto",
500
+ children: /* @__PURE__ */ x("table", {
501
+ className: "w-full",
502
+ children: [/* @__PURE__ */ b("thead", { children: /* @__PURE__ */ x("tr", {
503
+ className: "border-b border-border bg-muted/50",
504
+ children: [
505
+ /* @__PURE__ */ b("th", {
506
+ className: "px-4 py-3 text-left text-xs font-medium text-muted-foreground uppercase tracking-wider",
507
+ children: "User"
508
+ }),
509
+ /* @__PURE__ */ b("th", {
510
+ className: "px-4 py-3 text-left text-xs font-medium text-muted-foreground uppercase tracking-wider",
511
+ children: "Role & Status"
512
+ }),
513
+ /* @__PURE__ */ b("th", {
514
+ className: "px-4 py-3 text-left text-xs font-medium text-muted-foreground uppercase tracking-wider",
515
+ children: "Activity"
516
+ }),
517
+ /* @__PURE__ */ b("th", {
518
+ className: "px-4 py-3 text-left text-xs font-medium text-muted-foreground uppercase tracking-wider",
519
+ children: "Performance"
520
+ }),
521
+ /* @__PURE__ */ b("th", {
522
+ className: "px-4 py-3 text-left text-xs font-medium text-muted-foreground uppercase tracking-wider",
523
+ children: "Verification"
524
+ }),
525
+ /* @__PURE__ */ b("th", {
526
+ className: "px-4 py-3 text-left text-xs font-medium text-muted-foreground uppercase tracking-wider",
527
+ children: "Actions"
528
+ })
529
+ ]
530
+ }) }), /* @__PURE__ */ b("tbody", {
531
+ className: "divide-y divide-border",
532
+ children: J.map((e) => /* @__PURE__ */ x("tr", {
533
+ className: "hover:bg-accent/50 transition-colors",
534
+ children: [
535
+ /* @__PURE__ */ b("td", {
536
+ className: "px-4 py-3",
537
+ children: /* @__PURE__ */ x("div", {
538
+ className: "flex items-center gap-3",
539
+ children: [e.profilePicture ? /* @__PURE__ */ b("img", {
540
+ src: e.profilePicture,
541
+ alt: `${e.firstName}`,
542
+ className: "w-10 h-10 rounded-full object-cover"
543
+ }) : /* @__PURE__ */ b("div", {
544
+ className: "w-10 h-10 rounded-full bg-muted flex items-center justify-center",
545
+ children: /* @__PURE__ */ b(_, { className: "h-5 w-5 text-muted-foreground" })
546
+ }), /* @__PURE__ */ x("div", { children: [
547
+ /* @__PURE__ */ x("p", {
548
+ className: "text-sm font-medium text-foreground",
549
+ children: [
550
+ e.firstName,
551
+ " ",
552
+ e.lastName
553
+ ]
554
+ }),
555
+ /* @__PURE__ */ b("p", {
556
+ className: "text-xs text-muted-foreground",
557
+ children: e.email
558
+ }),
559
+ /* @__PURE__ */ b("p", {
560
+ className: "text-xs text-muted-foreground",
561
+ children: e.phone
562
+ })
563
+ ] })]
564
+ })
565
+ }),
566
+ /* @__PURE__ */ b("td", {
567
+ className: "px-4 py-3",
568
+ children: /* @__PURE__ */ x("div", {
569
+ className: "space-y-1",
570
+ children: [
571
+ Y(e.role),
572
+ /* @__PURE__ */ b("br", {}),
573
+ X(e.status)
574
+ ]
575
+ })
576
+ }),
577
+ /* @__PURE__ */ x("td", {
578
+ className: "px-4 py-3 text-sm",
579
+ children: [
580
+ /* @__PURE__ */ x("p", {
581
+ className: "text-foreground",
582
+ children: ["Registered: ", K(e.registrationDate)]
583
+ }),
584
+ e.lastLoginTime && /* @__PURE__ */ x("p", {
585
+ className: "text-muted-foreground",
586
+ children: ["Last login: ", K(e.lastLoginTime)]
587
+ }),
588
+ e.deviceInfo && /* @__PURE__ */ x("p", {
589
+ className: "text-muted-foreground flex items-center gap-1",
590
+ children: [/* @__PURE__ */ b(p, { className: "h-3 w-3" }), e.deviceInfo]
591
+ })
592
+ ]
593
+ }),
594
+ /* @__PURE__ */ x("td", {
595
+ className: "px-4 py-3 text-sm",
596
+ children: [
597
+ e.role === "customer" && e.totalOrders != null && /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ x("p", {
598
+ className: "text-foreground",
599
+ children: [e.totalOrders, " orders"]
600
+ }), /* @__PURE__ */ x("p", {
601
+ className: "text-muted-foreground",
602
+ children: [q(e.totalSpent ?? 0), " spent"]
603
+ })] }),
604
+ (e.role === "cart_owner" || e.role === "worker") && e.totalEarnings != null && /* @__PURE__ */ x("p", {
605
+ className: "text-foreground",
606
+ children: [q(e.totalEarnings), " earned"]
607
+ }),
608
+ e.role === "investor" && e.riskScore != null && /* @__PURE__ */ x("p", {
609
+ className: "text-foreground",
610
+ children: [
611
+ "Risk: ",
612
+ e.riskScore,
613
+ "/5"
614
+ ]
615
+ })
616
+ ]
617
+ }),
618
+ /* @__PURE__ */ b("td", {
619
+ className: "px-4 py-3",
620
+ children: /* @__PURE__ */ x("div", {
621
+ className: "space-y-1",
622
+ children: [
623
+ /* @__PURE__ */ x("div", {
624
+ className: "flex items-center gap-2",
625
+ children: [/* @__PURE__ */ b("span", { className: t("w-2 h-2 rounded-full", e.isEmailVerified ? "bg-green-500" : "bg-red-500") }), /* @__PURE__ */ b("span", {
626
+ className: "text-sm text-muted-foreground",
627
+ children: "Email"
628
+ })]
629
+ }),
630
+ /* @__PURE__ */ x("div", {
631
+ className: "flex items-center gap-2",
632
+ children: [/* @__PURE__ */ b("span", { className: t("w-2 h-2 rounded-full", e.isPhoneVerified ? "bg-green-500" : "bg-red-500") }), /* @__PURE__ */ b("span", {
633
+ className: "text-sm text-muted-foreground",
634
+ children: "Phone"
635
+ })]
636
+ }),
637
+ e.kycStatus && /* @__PURE__ */ x("div", {
638
+ className: "flex items-center gap-2",
639
+ children: [/* @__PURE__ */ b("span", { className: t("w-2 h-2 rounded-full", e.kycStatus === "verified" ? "bg-green-500" : e.kycStatus === "pending" ? "bg-yellow-500" : "bg-red-500") }), /* @__PURE__ */ b("span", {
640
+ className: "text-sm text-muted-foreground",
641
+ children: "KYC"
642
+ })]
643
+ })
644
+ ]
645
+ })
646
+ }),
647
+ /* @__PURE__ */ b("td", {
648
+ className: "px-4 py-3",
649
+ children: /* @__PURE__ */ x("div", {
650
+ className: "flex gap-1",
651
+ children: [
652
+ /* @__PURE__ */ b("button", {
653
+ type: "button",
654
+ onClick: () => U(e, "edit"),
655
+ title: "Edit",
656
+ className: "rounded p-1.5 text-muted-foreground hover:text-foreground hover:bg-accent transition-colors",
657
+ children: /* @__PURE__ */ b(l, { className: "h-4 w-4" })
658
+ }),
659
+ e.status === "active" ? /* @__PURE__ */ b("button", {
660
+ type: "button",
661
+ onClick: () => U(e, "suspend"),
662
+ title: "Suspend",
663
+ className: "rounded p-1.5 text-muted-foreground hover:text-red-600 hover:bg-red-500/10 transition-colors",
664
+ children: /* @__PURE__ */ b(g, { className: "h-4 w-4" })
665
+ }) : /* @__PURE__ */ b("button", {
666
+ type: "button",
667
+ onClick: () => U(e, "activate"),
668
+ title: "Activate",
669
+ className: "rounded p-1.5 text-muted-foreground hover:text-green-600 hover:bg-green-500/10 transition-colors",
670
+ children: /* @__PURE__ */ b(h, { className: "h-4 w-4" })
671
+ }),
672
+ e.kycStatus === "pending" && /* @__PURE__ */ b("button", {
673
+ type: "button",
674
+ onClick: () => U(e, "verify"),
675
+ title: "Verify",
676
+ className: "rounded p-1.5 text-muted-foreground hover:text-blue-600 hover:bg-blue-500/10 transition-colors",
677
+ children: /* @__PURE__ */ b(f, { className: "h-4 w-4" })
678
+ })
679
+ ]
680
+ })
681
+ })
682
+ ]
683
+ }, e.id))
684
+ })]
685
+ })
686
+ }),
687
+ w.length === 0 && /* @__PURE__ */ x("div", {
688
+ className: "flex flex-col items-center justify-center py-12 px-4",
689
+ children: [/* @__PURE__ */ b(_, { className: "h-10 w-10 text-muted-foreground/50 mb-3" }), /* @__PURE__ */ b("p", {
690
+ className: "text-sm text-muted-foreground",
691
+ children: "No users found matching your criteria"
692
+ })]
693
+ })
694
+ ]
695
+ }),
696
+ /* @__PURE__ */ x("div", {
697
+ className: "mt-6 flex flex-col sm:flex-row sm:items-center justify-between gap-4",
698
+ children: [/* @__PURE__ */ x("p", {
699
+ className: "text-sm text-muted-foreground text-center sm:text-left",
700
+ children: [
701
+ "Showing",
702
+ " ",
703
+ /* @__PURE__ */ b("span", {
704
+ className: "font-medium",
705
+ children: Math.min((I - 1) * 10 + 1, w.length)
706
+ }),
707
+ " ",
708
+ "to",
709
+ " ",
710
+ /* @__PURE__ */ b("span", {
711
+ className: "font-medium",
712
+ children: Math.min(I * 10, w.length)
713
+ }),
714
+ " ",
715
+ "of ",
716
+ /* @__PURE__ */ b("span", {
717
+ className: "font-medium",
718
+ children: w.length
719
+ }),
720
+ " results"
721
+ ]
722
+ }), /* @__PURE__ */ x("div", {
723
+ className: "flex justify-center sm:justify-end gap-2",
724
+ children: [/* @__PURE__ */ x("button", {
725
+ type: "button",
726
+ disabled: I === 1,
727
+ onClick: () => L((e) => Math.max(1, e - 1)),
728
+ className: "flex items-center gap-1.5 rounded-lg border border-border px-3 py-2 text-sm font-medium text-foreground hover:bg-accent transition-colors disabled:opacity-50 disabled:cursor-not-allowed",
729
+ children: [/* @__PURE__ */ b(s, { className: "h-4 w-4" }), "Previous"]
730
+ }), /* @__PURE__ */ x("button", {
731
+ type: "button",
732
+ disabled: I * 10 >= w.length,
733
+ onClick: () => L((e) => e + 1),
734
+ className: "flex items-center gap-1.5 rounded-lg border border-border px-3 py-2 text-sm font-medium text-foreground hover:bg-accent transition-colors disabled:opacity-50 disabled:cursor-not-allowed",
735
+ children: ["Next", /* @__PURE__ */ b(c, { className: "h-4 w-4" })]
736
+ })]
737
+ })]
738
+ }),
739
+ A && O && /* @__PURE__ */ b("div", {
740
+ className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",
741
+ children: /* @__PURE__ */ x("div", {
742
+ className: "w-full max-w-md rounded-lg border border-border bg-card shadow-lg max-h-[90vh] overflow-y-auto",
743
+ children: [/* @__PURE__ */ x("div", {
744
+ className: "flex items-center justify-between p-4 border-b border-border",
745
+ children: [/* @__PURE__ */ b("h3", {
746
+ className: "text-lg font-semibold text-foreground",
747
+ children: M === "edit" ? "Edit User" : "Delete User"
748
+ }), /* @__PURE__ */ b("button", {
749
+ type: "button",
750
+ onClick: () => j(!1),
751
+ className: "rounded p-1.5 text-muted-foreground hover:text-foreground hover:bg-accent transition-colors",
752
+ children: /* @__PURE__ */ b(v, { className: "h-5 w-5" })
753
+ })]
754
+ }), /* @__PURE__ */ b("div", {
755
+ className: "p-4",
756
+ children: M === "delete" ? /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ x("p", {
757
+ className: "text-muted-foreground mb-4",
758
+ children: [
759
+ "Are you sure you want to delete user \"",
760
+ O.firstName,
761
+ " ",
762
+ O.lastName,
763
+ "\"? This action cannot be undone."
764
+ ]
765
+ }), /* @__PURE__ */ x("div", {
766
+ className: "flex gap-3",
767
+ children: [/* @__PURE__ */ b("button", {
768
+ type: "button",
769
+ onClick: () => j(!1),
770
+ className: "flex-1 rounded-lg border border-border py-2 text-sm font-medium text-foreground hover:bg-accent transition-colors",
771
+ children: "Cancel"
772
+ }), /* @__PURE__ */ b("button", {
773
+ type: "button",
774
+ onClick: W,
775
+ className: "flex-1 rounded-lg bg-red-600 hover:bg-red-700 py-2 text-sm font-medium text-white transition-colors",
776
+ children: "Delete User"
777
+ })]
778
+ })] }) : /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ x("div", {
779
+ className: "space-y-4",
780
+ children: [
781
+ /* @__PURE__ */ x("div", {
782
+ className: "grid grid-cols-2 gap-4",
783
+ children: [/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
784
+ className: "block text-sm font-medium text-muted-foreground mb-1",
785
+ children: "First Name"
786
+ }), /* @__PURE__ */ b("input", {
787
+ type: "text",
788
+ value: P.firstName,
789
+ onChange: (e) => F((t) => ({
790
+ ...t,
791
+ firstName: e.target.value
792
+ })),
793
+ className: "w-full rounded-lg border border-border bg-card py-2 px-3 text-sm text-foreground focus:outline-none focus:ring-2 focus:ring-ring"
794
+ })] }), /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
795
+ className: "block text-sm font-medium text-muted-foreground mb-1",
796
+ children: "Last Name"
797
+ }), /* @__PURE__ */ b("input", {
798
+ type: "text",
799
+ value: P.lastName,
800
+ onChange: (e) => F((t) => ({
801
+ ...t,
802
+ lastName: e.target.value
803
+ })),
804
+ className: "w-full rounded-lg border border-border bg-card py-2 px-3 text-sm text-foreground focus:outline-none focus:ring-2 focus:ring-ring"
805
+ })] })]
806
+ }),
807
+ /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
808
+ className: "block text-sm font-medium text-muted-foreground mb-1",
809
+ children: "Email"
810
+ }), /* @__PURE__ */ b("input", {
811
+ type: "email",
812
+ value: P.email,
813
+ onChange: (e) => F((t) => ({
814
+ ...t,
815
+ email: e.target.value
816
+ })),
817
+ className: "w-full rounded-lg border border-border bg-card py-2 px-3 text-sm text-foreground focus:outline-none focus:ring-2 focus:ring-ring"
818
+ })] }),
819
+ /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
820
+ className: "block text-sm font-medium text-muted-foreground mb-1",
821
+ children: "Phone"
822
+ }), /* @__PURE__ */ b("input", {
823
+ type: "tel",
824
+ value: P.phone,
825
+ onChange: (e) => F((t) => ({
826
+ ...t,
827
+ phone: e.target.value
828
+ })),
829
+ className: "w-full rounded-lg border border-border bg-card py-2 px-3 text-sm text-foreground focus:outline-none focus:ring-2 focus:ring-ring"
830
+ })] }),
831
+ /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
832
+ className: "block text-sm font-medium text-muted-foreground mb-1",
833
+ children: "Role"
834
+ }), /* @__PURE__ */ x("select", {
835
+ value: P.role,
836
+ onChange: (e) => F((t) => ({
837
+ ...t,
838
+ role: e.target.value
839
+ })),
840
+ className: "w-full rounded-lg border border-border bg-card py-2 px-3 text-sm text-foreground focus:outline-none focus:ring-2 focus:ring-ring",
841
+ children: [
842
+ /* @__PURE__ */ b("option", {
843
+ value: "customer",
844
+ children: "Customer"
845
+ }),
846
+ /* @__PURE__ */ b("option", {
847
+ value: "cart_owner",
848
+ children: "Cart Owner"
849
+ }),
850
+ /* @__PURE__ */ b("option", {
851
+ value: "worker",
852
+ children: "Worker"
853
+ }),
854
+ /* @__PURE__ */ b("option", {
855
+ value: "investor",
856
+ children: "Investor"
857
+ })
858
+ ]
859
+ })] })
860
+ ]
861
+ }), /* @__PURE__ */ x("div", {
862
+ className: "flex gap-3 mt-6",
863
+ children: [
864
+ /* @__PURE__ */ b("button", {
865
+ type: "button",
866
+ onClick: () => j(!1),
867
+ className: "flex-1 rounded-lg border border-border py-2 text-sm font-medium text-foreground hover:bg-accent transition-colors",
868
+ children: "Cancel"
869
+ }),
870
+ /* @__PURE__ */ b("button", {
871
+ type: "button",
872
+ onClick: G,
873
+ className: "flex-1 rounded-lg bg-primary py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90 transition-colors",
874
+ children: "Save Changes"
875
+ }),
876
+ /* @__PURE__ */ b("button", {
877
+ type: "button",
878
+ onClick: () => N("delete"),
879
+ className: "rounded-lg border border-border py-2 px-3 text-sm font-medium text-red-600 hover:bg-red-500/10 transition-colors",
880
+ children: /* @__PURE__ */ b(m, { className: "h-4 w-4" })
881
+ })
882
+ ]
883
+ })] })
884
+ })]
885
+ })
886
+ })
887
+ ]
888
+ });
889
+ }
890
+ //#endregion
891
+ export { C as UserManagementPage };
892
+
893
+ //# sourceMappingURL=UserManagementPage.js.map