@burdenoff/microfe-labsofscience 2026.626.1 → 2026.628.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (172) hide show
  1. package/dist/index.js +4 -4
  2. package/dist/labsofscience/LabsOfScienceRoot.js +68 -124
  3. package/dist/labsofscience/LabsOfScienceRoot.js.map +1 -1
  4. package/dist/labsofscience/LabsOfScienceRoutes.js +61 -185
  5. package/dist/labsofscience/LabsOfScienceRoutes.js.map +1 -1
  6. package/dist/labsofscience/components/QueryStates.js +40 -0
  7. package/dist/labsofscience/components/QueryStates.js.map +1 -0
  8. package/dist/labsofscience/components/StatusBadge.js +40 -23
  9. package/dist/labsofscience/components/StatusBadge.js.map +1 -1
  10. package/dist/labsofscience/context/LabsOfScienceContext.js +22 -30
  11. package/dist/labsofscience/context/LabsOfScienceContext.js.map +1 -1
  12. package/dist/labsofscience/hooks/useLabsOfScienceApi.js +500 -172
  13. package/dist/labsofscience/hooks/useLabsOfScienceApi.js.map +1 -1
  14. package/dist/labsofscience/pages/OverviewPage.js +195 -0
  15. package/dist/labsofscience/pages/OverviewPage.js.map +1 -0
  16. package/dist/labsofscience/pages/datasets/DatasetDetailPage.js +162 -0
  17. package/dist/labsofscience/pages/datasets/DatasetDetailPage.js.map +1 -0
  18. package/dist/labsofscience/pages/datasets/DatasetFormDialog.js +137 -0
  19. package/dist/labsofscience/pages/datasets/DatasetFormDialog.js.map +1 -0
  20. package/dist/labsofscience/pages/datasets/DatasetsListPage.js +155 -0
  21. package/dist/labsofscience/pages/datasets/DatasetsListPage.js.map +1 -0
  22. package/dist/labsofscience/pages/experiments/ExperimentDetailPage.js +220 -0
  23. package/dist/labsofscience/pages/experiments/ExperimentDetailPage.js.map +1 -0
  24. package/dist/labsofscience/pages/experiments/ExperimentFormDialog.js +170 -0
  25. package/dist/labsofscience/pages/experiments/ExperimentFormDialog.js.map +1 -0
  26. package/dist/labsofscience/pages/experiments/ExperimentsListPage.js +134 -0
  27. package/dist/labsofscience/pages/experiments/ExperimentsListPage.js.map +1 -0
  28. package/dist/labsofscience/pages/experiments/RunDialogs.js +180 -0
  29. package/dist/labsofscience/pages/experiments/RunDialogs.js.map +1 -0
  30. package/dist/labsofscience/pages/instruments/InstrumentDetailPage.js +130 -0
  31. package/dist/labsofscience/pages/instruments/InstrumentDetailPage.js.map +1 -0
  32. package/dist/labsofscience/pages/instruments/InstrumentFormDialog.js +132 -0
  33. package/dist/labsofscience/pages/instruments/InstrumentFormDialog.js.map +1 -0
  34. package/dist/labsofscience/pages/instruments/InstrumentsListPage.js +126 -0
  35. package/dist/labsofscience/pages/instruments/InstrumentsListPage.js.map +1 -0
  36. package/dist/labsofscience/pages/inventory/AdjustInventoryDialog.js +89 -0
  37. package/dist/labsofscience/pages/inventory/AdjustInventoryDialog.js.map +1 -0
  38. package/dist/labsofscience/pages/inventory/InventoryDetailPage.js +138 -0
  39. package/dist/labsofscience/pages/inventory/InventoryDetailPage.js.map +1 -0
  40. package/dist/labsofscience/pages/inventory/InventoryFormDialog.js +211 -0
  41. package/dist/labsofscience/pages/inventory/InventoryFormDialog.js.map +1 -0
  42. package/dist/labsofscience/pages/inventory/InventoryListPage.js +178 -0
  43. package/dist/labsofscience/pages/inventory/InventoryListPage.js.map +1 -0
  44. package/dist/labsofscience/pages/notebook/NotebookEntryFormDialog.js +118 -0
  45. package/dist/labsofscience/pages/notebook/NotebookEntryFormDialog.js.map +1 -0
  46. package/dist/labsofscience/pages/notebook/NotebookListPage.js +144 -0
  47. package/dist/labsofscience/pages/notebook/NotebookListPage.js.map +1 -0
  48. package/dist/labsofscience/pages/pipelines/PipelineFormDialog.js +146 -0
  49. package/dist/labsofscience/pages/pipelines/PipelineFormDialog.js.map +1 -0
  50. package/dist/labsofscience/pages/pipelines/PipelinesPage.js +212 -0
  51. package/dist/labsofscience/pages/pipelines/PipelinesPage.js.map +1 -0
  52. package/dist/labsofscience/pages/pipelines/RunPipelineDialog.js +109 -0
  53. package/dist/labsofscience/pages/pipelines/RunPipelineDialog.js.map +1 -0
  54. package/dist/labsofscience/pages/projects/ProjectDetailPage.js +174 -0
  55. package/dist/labsofscience/pages/projects/ProjectDetailPage.js.map +1 -0
  56. package/dist/labsofscience/pages/projects/ProjectFormDialog.js +169 -0
  57. package/dist/labsofscience/pages/projects/ProjectFormDialog.js.map +1 -0
  58. package/dist/labsofscience/pages/projects/ProjectsListPage.js +141 -0
  59. package/dist/labsofscience/pages/projects/ProjectsListPage.js.map +1 -0
  60. package/dist/labsofscience/pages/protocols/ProtocolDetailPage.js +133 -0
  61. package/dist/labsofscience/pages/protocols/ProtocolDetailPage.js.map +1 -0
  62. package/dist/labsofscience/pages/protocols/ProtocolFormDialog.js +151 -0
  63. package/dist/labsofscience/pages/protocols/ProtocolFormDialog.js.map +1 -0
  64. package/dist/labsofscience/pages/protocols/ProtocolsListPage.js +140 -0
  65. package/dist/labsofscience/pages/protocols/ProtocolsListPage.js.map +1 -0
  66. package/dist/labsofscience/pages/shared/DetailComponents.js +64 -0
  67. package/dist/labsofscience/pages/shared/DetailComponents.js.map +1 -0
  68. package/dist/labsofscience/pages/shared/tags.js +16 -0
  69. package/dist/labsofscience/pages/shared/tags.js.map +1 -0
  70. package/dist/labsofscience/store/labsofscienceStore.js +6 -11
  71. package/dist/labsofscience/store/labsofscienceStore.js.map +1 -1
  72. package/dist/labsofscience/utils/formatters.js +28 -13
  73. package/dist/labsofscience/utils/formatters.js.map +1 -1
  74. package/package.json +1 -1
  75. package/dist/labsofscience/components/InvestmentCard.js +0 -98
  76. package/dist/labsofscience/components/InvestmentCard.js.map +0 -1
  77. package/dist/labsofscience/components/RatingDisplay.js +0 -35
  78. package/dist/labsofscience/components/RatingDisplay.js.map +0 -1
  79. package/dist/labsofscience/mocks/data.js +0 -1517
  80. package/dist/labsofscience/mocks/data.js.map +0 -1
  81. package/dist/labsofscience/mocks/users.js +0 -34
  82. package/dist/labsofscience/mocks/users.js.map +0 -1
  83. package/dist/labsofscience/pages/HomePage.js +0 -940
  84. package/dist/labsofscience/pages/HomePage.js.map +0 -1
  85. package/dist/labsofscience/pages/admin/AdminAnalyticsPage.js +0 -651
  86. package/dist/labsofscience/pages/admin/AdminAnalyticsPage.js.map +0 -1
  87. package/dist/labsofscience/pages/admin/AdminDashboard.js +0 -672
  88. package/dist/labsofscience/pages/admin/AdminDashboard.js.map +0 -1
  89. package/dist/labsofscience/pages/admin/AdminFinancialPage.js +0 -427
  90. package/dist/labsofscience/pages/admin/AdminFinancialPage.js.map +0 -1
  91. package/dist/labsofscience/pages/admin/AdminOrdersPage.js +0 -665
  92. package/dist/labsofscience/pages/admin/AdminOrdersPage.js.map +0 -1
  93. package/dist/labsofscience/pages/admin/AdminProfilePage.js +0 -261
  94. package/dist/labsofscience/pages/admin/AdminProfilePage.js.map +0 -1
  95. package/dist/labsofscience/pages/admin/AdminSettingsPage.js +0 -651
  96. package/dist/labsofscience/pages/admin/AdminSettingsPage.js.map +0 -1
  97. package/dist/labsofscience/pages/admin/CartManagementPage.js +0 -874
  98. package/dist/labsofscience/pages/admin/CartManagementPage.js.map +0 -1
  99. package/dist/labsofscience/pages/admin/UserManagementPage.js +0 -898
  100. package/dist/labsofscience/pages/admin/UserManagementPage.js.map +0 -1
  101. package/dist/labsofscience/pages/cart-owner/AnalyticsDashboard.js +0 -839
  102. package/dist/labsofscience/pages/cart-owner/AnalyticsDashboard.js.map +0 -1
  103. package/dist/labsofscience/pages/cart-owner/BusinessSettingsPage.js +0 -705
  104. package/dist/labsofscience/pages/cart-owner/BusinessSettingsPage.js.map +0 -1
  105. package/dist/labsofscience/pages/cart-owner/CartOwnerDashboard.js +0 -791
  106. package/dist/labsofscience/pages/cart-owner/CartOwnerDashboard.js.map +0 -1
  107. package/dist/labsofscience/pages/cart-owner/CartOwnerProfilePage.js +0 -891
  108. package/dist/labsofscience/pages/cart-owner/CartOwnerProfilePage.js.map +0 -1
  109. package/dist/labsofscience/pages/cart-owner/CartServiceConfigPage.js +0 -636
  110. package/dist/labsofscience/pages/cart-owner/CartServiceConfigPage.js.map +0 -1
  111. package/dist/labsofscience/pages/cart-owner/InventoryManagementPage.js +0 -911
  112. package/dist/labsofscience/pages/cart-owner/InventoryManagementPage.js.map +0 -1
  113. package/dist/labsofscience/pages/cart-owner/OrderManagementPage.js +0 -879
  114. package/dist/labsofscience/pages/cart-owner/OrderManagementPage.js.map +0 -1
  115. package/dist/labsofscience/pages/cart-owner/StaffManagementPage.js +0 -839
  116. package/dist/labsofscience/pages/cart-owner/StaffManagementPage.js.map +0 -1
  117. package/dist/labsofscience/pages/common/HelpSupportPage.js +0 -1324
  118. package/dist/labsofscience/pages/common/HelpSupportPage.js.map +0 -1
  119. package/dist/labsofscience/pages/common/NotificationCenterPage.js +0 -672
  120. package/dist/labsofscience/pages/common/NotificationCenterPage.js.map +0 -1
  121. package/dist/labsofscience/pages/common/SettingsPage.js +0 -973
  122. package/dist/labsofscience/pages/common/SettingsPage.js.map +0 -1
  123. package/dist/labsofscience/pages/customer/BookingDetailsPage.js +0 -637
  124. package/dist/labsofscience/pages/customer/BookingDetailsPage.js.map +0 -1
  125. package/dist/labsofscience/pages/customer/CartDetailPage.js +0 -653
  126. package/dist/labsofscience/pages/customer/CartDetailPage.js.map +0 -1
  127. package/dist/labsofscience/pages/customer/CartDiscoveryPage.js +0 -559
  128. package/dist/labsofscience/pages/customer/CartDiscoveryPage.js.map +0 -1
  129. package/dist/labsofscience/pages/customer/CheckoutPage.js +0 -530
  130. package/dist/labsofscience/pages/customer/CheckoutPage.js.map +0 -1
  131. package/dist/labsofscience/pages/customer/CustomerDashboard.js +0 -531
  132. package/dist/labsofscience/pages/customer/CustomerDashboard.js.map +0 -1
  133. package/dist/labsofscience/pages/customer/CustomerProfilePage.js +0 -658
  134. package/dist/labsofscience/pages/customer/CustomerProfilePage.js.map +0 -1
  135. package/dist/labsofscience/pages/customer/DirectServiceBookingPage.js +0 -633
  136. package/dist/labsofscience/pages/customer/DirectServiceBookingPage.js.map +0 -1
  137. package/dist/labsofscience/pages/customer/FavoritesPage.js +0 -484
  138. package/dist/labsofscience/pages/customer/FavoritesPage.js.map +0 -1
  139. package/dist/labsofscience/pages/customer/OrderHistoryPage.js +0 -445
  140. package/dist/labsofscience/pages/customer/OrderHistoryPage.js.map +0 -1
  141. package/dist/labsofscience/pages/customer/OrderTrackingPage.js +0 -425
  142. package/dist/labsofscience/pages/customer/OrderTrackingPage.js.map +0 -1
  143. package/dist/labsofscience/pages/customer/PaymentMethodsPage.js +0 -495
  144. package/dist/labsofscience/pages/customer/PaymentMethodsPage.js.map +0 -1
  145. package/dist/labsofscience/pages/customer/ReviewsPage.js +0 -613
  146. package/dist/labsofscience/pages/customer/ReviewsPage.js.map +0 -1
  147. package/dist/labsofscience/pages/customer/SavedAddressesPage.js +0 -450
  148. package/dist/labsofscience/pages/customer/SavedAddressesPage.js.map +0 -1
  149. package/dist/labsofscience/pages/investor/InvestmentDetailsPage.js +0 -881
  150. package/dist/labsofscience/pages/investor/InvestmentDetailsPage.js.map +0 -1
  151. package/dist/labsofscience/pages/investor/InvestmentOpportunitiesPage.js +0 -946
  152. package/dist/labsofscience/pages/investor/InvestmentOpportunitiesPage.js.map +0 -1
  153. package/dist/labsofscience/pages/investor/InvestorAnalyticsPage.js +0 -687
  154. package/dist/labsofscience/pages/investor/InvestorAnalyticsPage.js.map +0 -1
  155. package/dist/labsofscience/pages/investor/InvestorDashboard.js +0 -455
  156. package/dist/labsofscience/pages/investor/InvestorDashboard.js.map +0 -1
  157. package/dist/labsofscience/pages/investor/InvestorInvestmentsPage.js +0 -406
  158. package/dist/labsofscience/pages/investor/InvestorInvestmentsPage.js.map +0 -1
  159. package/dist/labsofscience/pages/investor/InvestorPortfolioPage.js +0 -575
  160. package/dist/labsofscience/pages/investor/InvestorPortfolioPage.js.map +0 -1
  161. package/dist/labsofscience/pages/investor/InvestorProfilePage.js +0 -1070
  162. package/dist/labsofscience/pages/investor/InvestorProfilePage.js.map +0 -1
  163. package/dist/labsofscience/pages/worker/TaskDetailsPage.js +0 -537
  164. package/dist/labsofscience/pages/worker/TaskDetailsPage.js.map +0 -1
  165. package/dist/labsofscience/pages/worker/WorkerDashboard.js +0 -665
  166. package/dist/labsofscience/pages/worker/WorkerDashboard.js.map +0 -1
  167. package/dist/labsofscience/pages/worker/WorkerOrdersPage.js +0 -681
  168. package/dist/labsofscience/pages/worker/WorkerOrdersPage.js.map +0 -1
  169. package/dist/labsofscience/pages/worker/WorkerProfilePage.js +0 -692
  170. package/dist/labsofscience/pages/worker/WorkerProfilePage.js.map +0 -1
  171. package/dist/labsofscience/pages/worker/WorkerSchedulePage.js +0 -588
  172. package/dist/labsofscience/pages/worker/WorkerSchedulePage.js.map +0 -1
@@ -1,672 +0,0 @@
1
- import { useLabsOfScience as e } from "../../context/LabsOfScienceContext.js";
2
- import { cn as t } from "../../utils/cn.js";
3
- import { PageLayout as n } from "../../components/PageLayout.js";
4
- import { EmptyState as r } from "../../components/EmptyState.js";
5
- import { formatRelativeTime as i } from "../../utils/formatters.js";
6
- import { useCallback as a, useMemo as o, useState as s } from "react";
7
- import { AlertCircle as c, AlertTriangle as l, ArrowUpDown as u, Bell as d, Check as f, CheckCheck as p, Clock as m, CreditCard as h, Inbox as g, MailOpen as _, Megaphone as v, RefreshCw as y, Search as b, ShoppingBag as x, Star as S, Trash2 as C, TrendingUp as w, Truck as T, UserCheck as E, Users as D, X as O } from "lucide-react";
8
- import { Fragment as k, jsx as A, jsxs as j } from "react/jsx-runtime";
9
- import { EmphasisPanel as M, PagePurpose as N } from "@burdenoff/fe-libs/ui";
10
- //#region src/labsofscience/pages/common/NotificationCenterPage.tsx
11
- var P = [
12
- {
13
- id: "n-001",
14
- type: "order_update",
15
- title: "Order Delivered Successfully!",
16
- message: "Your order #ORD-001 from Dosa Express has been delivered. Rate your experience to help others!",
17
- priority: "medium",
18
- isRead: !1,
19
- createdAt: (/* @__PURE__ */ new Date(Date.now() - 480 * 1e3)).toISOString(),
20
- actionUrl: "/customer/order/ORD-001",
21
- actionText: "Rate Order",
22
- metadata: {
23
- orderId: "ORD-001",
24
- cartId: "FOOD-001"
25
- }
26
- },
27
- {
28
- id: "n-002",
29
- type: "payment",
30
- title: "Payment Confirmed",
31
- message: "Your payment of ₹495 for order #ORD-002 at Quick Cuts Salon has been processed successfully.",
32
- priority: "medium",
33
- isRead: !1,
34
- createdAt: (/* @__PURE__ */ new Date(Date.now() - 2100 * 1e3)).toISOString(),
35
- metadata: {
36
- orderId: "ORD-002",
37
- amount: 495
38
- }
39
- },
40
- {
41
- id: "n-003",
42
- type: "promotion",
43
- title: "20% Off Beauty Services This Weekend!",
44
- message: "Glow Beauty Services is offering 20% off on all treatments this weekend only. Don't miss out!",
45
- priority: "low",
46
- isRead: !1,
47
- createdAt: (/* @__PURE__ */ new Date(Date.now() - 7200 * 1e3)).toISOString(),
48
- actionUrl: "/customer/cart/SERV-002",
49
- actionText: "Book Now",
50
- metadata: { cartId: "SERV-002" }
51
- },
52
- {
53
- id: "n-004",
54
- type: "review",
55
- title: "New Review Response",
56
- message: "Dosa Express replied to your review: \"Thank you so much for your kind words! We hope to serve you again soon.\"",
57
- priority: "low",
58
- isRead: !1,
59
- createdAt: (/* @__PURE__ */ new Date(Date.now() - 14400 * 1e3)).toISOString(),
60
- actionUrl: "/customer/reviews",
61
- actionText: "View Reply"
62
- },
63
- {
64
- id: "n-005",
65
- type: "system",
66
- title: "App Update Available",
67
- message: "Version 2.4.0 of LabsOfScience is available with improved performance, new category filters, and bug fixes.",
68
- priority: "medium",
69
- isRead: !1,
70
- createdAt: (/* @__PURE__ */ new Date(Date.now() - 420 * 60 * 1e3)).toISOString(),
71
- actionUrl: "/settings",
72
- actionText: "Update Now"
73
- },
74
- {
75
- id: "n-006",
76
- type: "order_update",
77
- title: "Appointment Confirmed",
78
- message: "Your appointment at Quick Cuts Salon has been confirmed for tomorrow at 3:00 PM. The stylist Suresh will be serving you.",
79
- priority: "medium",
80
- isRead: !0,
81
- createdAt: (/* @__PURE__ */ new Date(Date.now() - 1440 * 60 * 1e3)).toISOString(),
82
- actionUrl: "/customer/order/ORD-002",
83
- actionText: "View Details",
84
- metadata: { orderId: "ORD-002" }
85
- },
86
- {
87
- id: "n-007",
88
- type: "investment",
89
- title: "Monthly Returns Credited",
90
- message: "You received ₹1,250 in monthly returns from your Quick Cuts Salon investment. Total portfolio value: ₹2,12,500.",
91
- priority: "medium",
92
- isRead: !0,
93
- createdAt: (/* @__PURE__ */ new Date(Date.now() - 1440 * 60 * 1e3)).toISOString(),
94
- actionUrl: "/investor/portfolio",
95
- actionText: "View Portfolio",
96
- metadata: { amount: 1250 }
97
- },
98
- {
99
- id: "n-008",
100
- type: "delivery",
101
- title: "Delivery Worker Assigned",
102
- message: "Ravi Kumar (rated 4.8) has been assigned to deliver your order from Biryani Pot. Estimated arrival: 25 minutes.",
103
- priority: "high",
104
- isRead: !0,
105
- createdAt: (/* @__PURE__ */ new Date(Date.now() - 1.5 * 24 * 60 * 60 * 1e3)).toISOString(),
106
- metadata: { orderId: "ORD-003" }
107
- },
108
- {
109
- id: "n-009",
110
- type: "alert",
111
- title: "Unusual Login Attempt Detected",
112
- message: "We detected a login attempt from a new device in Mumbai. If this was not you, please change your password immediately.",
113
- priority: "urgent",
114
- isRead: !0,
115
- createdAt: (/* @__PURE__ */ new Date(Date.now() - 2880 * 60 * 1e3)).toISOString(),
116
- actionUrl: "/settings",
117
- actionText: "Review Activity"
118
- },
119
- {
120
- id: "n-010",
121
- type: "promotion",
122
- title: "Flash Sale: Mobile Accessories",
123
- message: "Gadget Zone Brigade is running a flash sale! Up to 30% off on bluetooth headphones, cases, and chargers.",
124
- priority: "low",
125
- isRead: !0,
126
- createdAt: (/* @__PURE__ */ new Date(Date.now() - 4320 * 60 * 1e3)).toISOString(),
127
- actionUrl: "/customer/cart/RETAIL-003",
128
- actionText: "Shop Now",
129
- metadata: { cartId: "RETAIL-003" }
130
- },
131
- {
132
- id: "n-011",
133
- type: "system",
134
- title: "Scheduled Platform Maintenance",
135
- message: "Platform maintenance is scheduled for Sunday 2:00 AM - 4:00 AM IST. Some services may be briefly unavailable during this window.",
136
- priority: "high",
137
- isRead: !0,
138
- createdAt: (/* @__PURE__ */ new Date(Date.now() - 5760 * 60 * 1e3)).toISOString()
139
- },
140
- {
141
- id: "n-012",
142
- type: "account",
143
- title: "KYC Verification Complete",
144
- message: "Your KYC verification has been completed successfully. You now have full access to all platform features including investments.",
145
- priority: "medium",
146
- isRead: !0,
147
- createdAt: (/* @__PURE__ */ new Date(Date.now() - 7200 * 60 * 1e3)).toISOString()
148
- },
149
- {
150
- id: "n-013",
151
- type: "staff",
152
- title: "Staff Schedule Updated",
153
- message: "Priya Sharma has updated her availability for this week. She will be unavailable on Wednesday and Thursday.",
154
- priority: "medium",
155
- isRead: !0,
156
- createdAt: (/* @__PURE__ */ new Date(Date.now() - 8640 * 60 * 1e3)).toISOString(),
157
- actionUrl: "/owner/staff",
158
- actionText: "View Schedule"
159
- },
160
- {
161
- id: "n-014",
162
- type: "payment",
163
- title: "Refund Processed",
164
- message: "Your refund of ₹280 for order #ORD-005 has been processed. The amount will reflect in your account within 3-5 business days.",
165
- priority: "medium",
166
- isRead: !0,
167
- createdAt: (/* @__PURE__ */ new Date(Date.now() - 10080 * 60 * 1e3)).toISOString(),
168
- metadata: {
169
- orderId: "ORD-005",
170
- amount: 280
171
- }
172
- }
173
- ], F = {
174
- order_update: {
175
- icon: x,
176
- color: "text-status-info-text",
177
- bg: "bg-status-info-bg-subtle",
178
- label: "Order"
179
- },
180
- payment: {
181
- icon: h,
182
- color: "text-status-success-text",
183
- bg: "bg-status-success-bg-subtle",
184
- label: "Payment"
185
- },
186
- promotion: {
187
- icon: v,
188
- color: "text-status-warning-text",
189
- bg: "bg-status-warning-bg-subtle",
190
- label: "Promo"
191
- },
192
- system: {
193
- icon: c,
194
- color: "text-accent-purple",
195
- bg: "bg-[color-mix(in_oklab,var(--color-accent-purple)_14%,transparent)]",
196
- label: "System"
197
- },
198
- review: {
199
- icon: S,
200
- color: "text-status-warning-text",
201
- bg: "bg-status-warning-bg-subtle",
202
- label: "Review"
203
- },
204
- staff: {
205
- icon: D,
206
- color: "text-status-info-text",
207
- bg: "bg-status-info-bg-subtle",
208
- label: "Staff"
209
- },
210
- investment: {
211
- icon: w,
212
- color: "text-status-success-text",
213
- bg: "bg-status-success-bg-subtle",
214
- label: "Investment"
215
- },
216
- alert: {
217
- icon: l,
218
- color: "text-status-error-text",
219
- bg: "bg-status-error-bg-subtle",
220
- label: "Alert"
221
- },
222
- delivery: {
223
- icon: T,
224
- color: "text-status-info-text",
225
- bg: "bg-status-info-bg-subtle",
226
- label: "Delivery"
227
- },
228
- account: {
229
- icon: E,
230
- color: "text-status-info-text",
231
- bg: "bg-status-info-bg-subtle",
232
- label: "Account"
233
- }
234
- }, I = {
235
- urgent: "bg-status-error-bg-subtle text-status-error-text",
236
- high: "bg-status-warning-bg-subtle text-status-warning-text",
237
- medium: "bg-status-info-bg-subtle text-status-info-text",
238
- low: "bg-bg-sunken text-text-secondary"
239
- }, L = {
240
- urgent: "border-l-red-500",
241
- high: "border-l-orange-500",
242
- medium: "border-l-blue-500",
243
- low: "border-l-border"
244
- }, R = {
245
- urgent: 4,
246
- high: 3,
247
- medium: 2,
248
- low: 1
249
- }, z = [
250
- {
251
- id: "all",
252
- label: "All",
253
- icon: g
254
- },
255
- {
256
- id: "orders",
257
- label: "Orders",
258
- icon: x
259
- },
260
- {
261
- id: "promotions",
262
- label: "Promotions",
263
- icon: v
264
- },
265
- {
266
- id: "system",
267
- label: "System",
268
- icon: c
269
- },
270
- {
271
- id: "unread",
272
- label: "Unread",
273
- icon: d
274
- }
275
- ];
276
- function B(e) {
277
- let t = new Date(e), n = /* @__PURE__ */ new Date(), r = new Date(n.getFullYear(), n.getMonth(), n.getDate()), i = /* @__PURE__ */ new Date(r.getTime() - 1440 * 60 * 1e3);
278
- return t >= r ? "Today" : t >= i ? "Yesterday" : "Earlier";
279
- }
280
- function V(e) {
281
- let t = [], n = /* @__PURE__ */ new Map(), r = [
282
- "Today",
283
- "Yesterday",
284
- "Earlier"
285
- ];
286
- for (let t of e) {
287
- let e = B(t.createdAt);
288
- n.has(e) || n.set(e, []), n.get(e).push(t);
289
- }
290
- for (let e of r) {
291
- let r = n.get(e);
292
- r && r.length > 0 && t.push({
293
- label: e,
294
- items: r
295
- });
296
- }
297
- return t;
298
- }
299
- function H() {
300
- let { navigateTo: c } = e(), [l, h] = s(P), [g, v] = s("all"), [x, S] = s(""), [w, T] = s("recent"), [E, D] = s(!1), H = o(() => l.filter((e) => !e.isRead).length, [l]), U = o(() => l.filter((e) => e.priority === "urgent").length, [l]), W = o(() => l.filter((e) => B(e.createdAt) === "Today").length, [l]), G = o(() => {
301
- let e = /* @__PURE__ */ new Date(Date.now() - 10080 * 60 * 1e3);
302
- return l.filter((t) => new Date(t.createdAt) >= e).length;
303
- }, [l]), K = o(() => {
304
- let e = {
305
- all: 0,
306
- orders: 0,
307
- promotions: 0,
308
- system: 0,
309
- unread: 0
310
- };
311
- for (let t of l) e.all++, t.isRead || e.unread++, (t.type === "order_update" || t.type === "delivery") && e.orders++, t.type === "promotion" && e.promotions++, (t.type === "system" || t.type === "alert" || t.type === "account") && e.system++;
312
- return e;
313
- }, [l]), q = o(() => {
314
- let e = [...l];
315
- switch (g) {
316
- case "orders":
317
- e = e.filter((e) => e.type === "order_update" || e.type === "delivery");
318
- break;
319
- case "promotions":
320
- e = e.filter((e) => e.type === "promotion");
321
- break;
322
- case "system":
323
- e = e.filter((e) => e.type === "system" || e.type === "alert" || e.type === "account");
324
- break;
325
- case "unread":
326
- e = e.filter((e) => !e.isRead);
327
- break;
328
- }
329
- if (x) {
330
- let t = x.toLowerCase();
331
- e = e.filter((e) => e.title.toLowerCase().includes(t) || e.message.toLowerCase().includes(t));
332
- }
333
- switch (w) {
334
- case "recent":
335
- e.sort((e, t) => new Date(t.createdAt).getTime() - new Date(e.createdAt).getTime());
336
- break;
337
- case "priority":
338
- e.sort((e, t) => R[t.priority] - R[e.priority]);
339
- break;
340
- case "unread":
341
- e.sort((e, t) => e.isRead === t.isRead ? 0 : e.isRead ? 1 : -1);
342
- break;
343
- }
344
- return e;
345
- }, [
346
- l,
347
- g,
348
- x,
349
- w
350
- ]), J = o(() => V(q), [q]), Y = a((e) => {
351
- h((t) => t.map((t) => t.id === e ? {
352
- ...t,
353
- isRead: !0
354
- } : t));
355
- }, []), X = a(() => {
356
- h((e) => e.map((e) => ({
357
- ...e,
358
- isRead: !0
359
- })));
360
- }, []), Z = a((e) => {
361
- h((t) => t.filter((t) => t.id !== e));
362
- }, []), Q = a((e) => {
363
- e.isRead || Y(e.id), e.actionUrl && c(e.actionUrl);
364
- }, [Y, c]), $ = a(() => {
365
- window.confirm("Are you sure you want to clear all notifications?") && h([]);
366
- }, []);
367
- return /* @__PURE__ */ j(n, {
368
- title: "Notifications",
369
- description: H > 0 ? `${H} unread notification${H === 1 ? "" : "s"}` : "All caught up!",
370
- actions: /* @__PURE__ */ j("div", {
371
- className: "flex items-center gap-2",
372
- children: [l.length > 0 && /* @__PURE__ */ j("button", {
373
- type: "button",
374
- onClick: $,
375
- className: "flex items-center gap-1.5 rounded-lg border border-border-seam px-3 py-2 text-sm font-medium text-text-secondary hover:text-text-primary hover:bg-accent transition-colors",
376
- children: [/* @__PURE__ */ A(C, { className: "h-4 w-4" }), /* @__PURE__ */ A("span", {
377
- className: "hidden sm:inline",
378
- children: "Clear All"
379
- })]
380
- }), H > 0 && /* @__PURE__ */ j("button", {
381
- type: "button",
382
- onClick: X,
383
- className: "flex items-center gap-1.5 rounded-lg border border-border-seam px-3 py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
384
- children: [/* @__PURE__ */ A(p, { className: "h-4 w-4" }), "Mark All Read"]
385
- })]
386
- }),
387
- children: [
388
- /* @__PURE__ */ A(N, {
389
- icon: /* @__PURE__ */ A(d, { className: "h-4 w-4" }),
390
- className: "mb-6",
391
- children: "Stay on top of what matters across the platform — order updates, payments, promotions, reviews and security alerts all land here. Filter by type, mark things read, and tap an action to jump straight to the order, cart or setting a notification is about."
392
- }),
393
- /* @__PURE__ */ j(M, {
394
- className: "grid grid-cols-2 gap-3 sm:grid-cols-5 mb-6",
395
- children: [
396
- /* @__PURE__ */ j("div", {
397
- className: "rounded-lg border border-border-seam bg-bg-surface p-3 text-center",
398
- children: [/* @__PURE__ */ A("p", {
399
- className: "text-2xl font-bold text-text-primary",
400
- children: l.length
401
- }), /* @__PURE__ */ A("p", {
402
- className: "text-xs text-text-secondary",
403
- children: "Total"
404
- })]
405
- }),
406
- /* @__PURE__ */ j("div", {
407
- className: "rounded-lg border border-status-info-border bg-status-info-bg-subtle p-3 text-center",
408
- children: [/* @__PURE__ */ A("p", {
409
- className: "text-2xl font-bold text-status-info-text",
410
- children: H
411
- }), /* @__PURE__ */ A("p", {
412
- className: "text-xs text-text-secondary",
413
- children: "Unread"
414
- })]
415
- }),
416
- /* @__PURE__ */ j("div", {
417
- className: "rounded-lg border border-status-error-border bg-status-error-bg-subtle p-3 text-center",
418
- children: [/* @__PURE__ */ A("p", {
419
- className: "text-2xl font-bold text-status-error-text",
420
- children: U
421
- }), /* @__PURE__ */ A("p", {
422
- className: "text-xs text-text-secondary",
423
- children: "Urgent"
424
- })]
425
- }),
426
- /* @__PURE__ */ j("div", {
427
- className: "rounded-lg border border-status-success-border bg-status-success-bg-subtle p-3 text-center",
428
- children: [/* @__PURE__ */ A("p", {
429
- className: "text-2xl font-bold text-status-success-text",
430
- children: W
431
- }), /* @__PURE__ */ A("p", {
432
- className: "text-xs text-text-secondary",
433
- children: "Today"
434
- })]
435
- }),
436
- /* @__PURE__ */ j("div", {
437
- className: "rounded-lg border border-status-warning-border bg-status-warning-bg-subtle p-3 text-center",
438
- children: [/* @__PURE__ */ A("p", {
439
- className: "text-2xl font-bold text-status-warning-text",
440
- children: G
441
- }), /* @__PURE__ */ A("p", {
442
- className: "text-xs text-text-secondary",
443
- children: "This Week"
444
- })]
445
- })
446
- ]
447
- }),
448
- /* @__PURE__ */ A("div", {
449
- className: "flex items-center gap-2 mb-4 overflow-x-auto pb-1",
450
- children: z.map((e) => {
451
- let n = e.icon;
452
- return /* @__PURE__ */ j("button", {
453
- type: "button",
454
- onClick: () => v(e.id),
455
- className: t("flex items-center gap-1.5 whitespace-nowrap rounded-full border px-3 py-1.5 text-sm font-medium transition-colors", g === e.id ? "border-primary bg-action-primary-bg/10 text-text-primary" : "border-border-seam text-text-secondary hover:text-text-primary hover:border-accent-foreground/20"),
456
- children: [
457
- /* @__PURE__ */ A(n, { className: "h-3.5 w-3.5" }),
458
- e.label,
459
- /* @__PURE__ */ A("span", {
460
- className: t("inline-flex h-5 min-w-[20px] items-center justify-center rounded-full px-1 text-xs", g === e.id ? "bg-action-primary-bg text-action-primary-text" : "bg-bg-sunken text-text-secondary"),
461
- children: K[e.id]
462
- })
463
- ]
464
- }, e.id);
465
- })
466
- }),
467
- /* @__PURE__ */ j("div", {
468
- className: "flex items-center gap-3 mb-6",
469
- children: [/* @__PURE__ */ j("div", {
470
- className: "relative flex-1",
471
- children: [
472
- /* @__PURE__ */ A(b, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-secondary" }),
473
- /* @__PURE__ */ A("input", {
474
- type: "text",
475
- placeholder: "Search notifications...",
476
- value: x,
477
- onChange: (e) => S(e.target.value),
478
- className: "w-full rounded-lg border border-border-seam bg-bg-surface py-2.5 pl-10 pr-9 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
479
- }),
480
- x && /* @__PURE__ */ A("button", {
481
- type: "button",
482
- onClick: () => S(""),
483
- className: "absolute right-3 top-1/2 -translate-y-1/2 text-text-secondary hover:text-text-primary",
484
- children: /* @__PURE__ */ A(O, { className: "h-4 w-4" })
485
- })
486
- ]
487
- }), /* @__PURE__ */ j("div", {
488
- className: "relative",
489
- children: [/* @__PURE__ */ j("button", {
490
- type: "button",
491
- onClick: () => D(!E),
492
- className: "flex items-center gap-1.5 rounded-lg border border-border-seam px-3 py-2.5 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
493
- children: [/* @__PURE__ */ A(u, { className: "h-4 w-4" }), /* @__PURE__ */ A("span", {
494
- className: "hidden sm:inline",
495
- children: "Sort"
496
- })]
497
- }), E && /* @__PURE__ */ j(k, { children: [/* @__PURE__ */ A("div", {
498
- className: "fixed inset-0 z-10",
499
- onClick: () => D(!1)
500
- }), /* @__PURE__ */ A("div", {
501
- className: "absolute right-0 top-full mt-1 z-20 w-44 rounded-lg border border-border-seam bg-bg-surface shadow-lg py-1",
502
- children: [
503
- {
504
- value: "recent",
505
- label: "Most Recent"
506
- },
507
- {
508
- value: "priority",
509
- label: "By Priority"
510
- },
511
- {
512
- value: "unread",
513
- label: "Unread First"
514
- }
515
- ].map((e) => /* @__PURE__ */ A("button", {
516
- type: "button",
517
- onClick: () => {
518
- T(e.value), D(!1);
519
- },
520
- className: t("w-full text-left px-3 py-2 text-sm transition-colors", w === e.value ? "bg-action-primary-bg/10 text-text-primary font-medium" : "text-text-secondary hover:bg-accent hover:text-text-primary"),
521
- children: e.label
522
- }, e.value))
523
- })] })]
524
- })]
525
- }),
526
- q.length === 0 ? /* @__PURE__ */ A(r, {
527
- illustration: "empty-notifications",
528
- icon: /* @__PURE__ */ A(d, { className: "h-12 w-12" }),
529
- title: "No notifications",
530
- description: x ? "No notifications match your search. Try different keywords." : g === "unread" ? "You're all caught up! No unread notifications." : "No notifications in this category yet.",
531
- action: x ? /* @__PURE__ */ A("button", {
532
- type: "button",
533
- onClick: () => S(""),
534
- className: "rounded-lg border border-border-seam px-4 py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
535
- children: "Clear Search"
536
- }) : g === "all" ? void 0 : /* @__PURE__ */ A("button", {
537
- type: "button",
538
- onClick: () => v("all"),
539
- className: "rounded-lg border border-border-seam px-4 py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
540
- children: "View All Notifications"
541
- })
542
- }) : /* @__PURE__ */ A("div", {
543
- className: "space-y-6",
544
- children: J.map((e) => /* @__PURE__ */ j("div", { children: [/* @__PURE__ */ j("div", {
545
- className: "flex items-center gap-3 mb-2",
546
- children: [
547
- /* @__PURE__ */ A("h3", {
548
- className: "text-xs font-semibold uppercase tracking-wider text-text-secondary",
549
- children: e.label
550
- }),
551
- /* @__PURE__ */ A("div", { className: "flex-1 border-t border-border-seam" }),
552
- /* @__PURE__ */ j("span", {
553
- className: "text-xs text-text-secondary",
554
- children: [
555
- e.items.length,
556
- " notification",
557
- e.items.length === 1 ? "" : "s"
558
- ]
559
- })
560
- ]
561
- }), /* @__PURE__ */ A("div", {
562
- className: "rounded-lg border border-border-seam bg-bg-surface divide-y divide-border overflow-hidden",
563
- children: e.items.map((e) => {
564
- let n = F[e.type] ?? F.system, r = n.icon;
565
- return /* @__PURE__ */ j("div", {
566
- className: t("flex items-start gap-3 px-4 py-4 border-l-4 transition-colors", L[e.priority], !e.isRead && "bg-accent/30"),
567
- children: [
568
- /* @__PURE__ */ A("div", {
569
- className: t("flex h-10 w-10 shrink-0 items-center justify-center rounded-full", n.bg),
570
- children: /* @__PURE__ */ A(r, { className: t("h-5 w-5", n.color) })
571
- }),
572
- /* @__PURE__ */ j("div", {
573
- className: "flex-1 min-w-0",
574
- children: [
575
- /* @__PURE__ */ j("div", {
576
- className: "flex items-center gap-2 flex-wrap",
577
- children: [
578
- /* @__PURE__ */ A("h4", {
579
- className: t("text-sm text-text-primary", e.isRead ? "font-medium" : "font-semibold"),
580
- children: e.title
581
- }),
582
- !e.isRead && /* @__PURE__ */ A("span", { className: "h-2 w-2 rounded-full bg-action-primary-bg shrink-0" }),
583
- /* @__PURE__ */ A("span", {
584
- className: t("inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium", I[e.priority]),
585
- children: e.priority
586
- })
587
- ]
588
- }),
589
- /* @__PURE__ */ A("p", {
590
- className: "mt-1 text-sm text-text-secondary leading-relaxed",
591
- children: e.message
592
- }),
593
- /* @__PURE__ */ j("div", {
594
- className: "mt-2 flex items-center gap-3 flex-wrap",
595
- children: [
596
- /* @__PURE__ */ j("span", {
597
- className: "flex items-center gap-1 text-xs text-text-secondary",
598
- children: [/* @__PURE__ */ A(m, { className: "h-3 w-3" }), i(e.createdAt)]
599
- }),
600
- /* @__PURE__ */ A("span", {
601
- className: t("inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium", n.bg, n.color),
602
- children: n.label
603
- }),
604
- e.metadata?.orderId && /* @__PURE__ */ j("span", {
605
- className: "text-xs text-text-secondary",
606
- children: ["#", e.metadata.orderId]
607
- })
608
- ]
609
- }),
610
- /* @__PURE__ */ j("div", {
611
- className: "mt-3 flex items-center gap-2 flex-wrap",
612
- children: [
613
- e.actionUrl && /* @__PURE__ */ A("button", {
614
- type: "button",
615
- onClick: () => Q(e),
616
- className: "rounded-lg bg-action-primary-bg px-3 py-1.5 text-xs font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors",
617
- children: e.actionText ?? "View"
618
- }),
619
- !e.isRead && /* @__PURE__ */ j("button", {
620
- type: "button",
621
- onClick: () => Y(e.id),
622
- title: "Mark as read",
623
- className: "flex items-center gap-1 rounded-lg border border-border-seam px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-accent transition-colors",
624
- children: [/* @__PURE__ */ A(f, { className: "h-3 w-3" }), "Mark Read"]
625
- }),
626
- /* @__PURE__ */ j("button", {
627
- type: "button",
628
- onClick: () => Z(e.id),
629
- title: "Delete notification",
630
- className: "flex items-center gap-1 rounded-lg border border-border-seam px-3 py-1.5 text-xs font-medium text-status-error-text hover:bg-status-error-bg/10 transition-colors",
631
- children: [/* @__PURE__ */ A(C, { className: "h-3 w-3" }), "Delete"]
632
- })
633
- ]
634
- })
635
- ]
636
- }),
637
- /* @__PURE__ */ A("div", {
638
- className: "shrink-0 pt-1",
639
- children: e.isRead ? /* @__PURE__ */ A(_, { className: "h-4 w-4 text-text-secondary/40" }) : /* @__PURE__ */ A(d, { className: "h-4 w-4 text-primary" })
640
- })
641
- ]
642
- }, e.id);
643
- })
644
- })] }, e.label))
645
- }),
646
- q.length > 0 && /* @__PURE__ */ j("div", {
647
- className: "mt-6 flex items-center justify-between rounded-lg border border-border-seam bg-bg-surface px-4 py-3",
648
- children: [/* @__PURE__ */ j("p", {
649
- className: "text-sm text-text-secondary",
650
- children: [
651
- "Showing ",
652
- q.length,
653
- " of ",
654
- l.length,
655
- " notifications"
656
- ]
657
- }), g !== "all" && /* @__PURE__ */ j("button", {
658
- type: "button",
659
- onClick: () => {
660
- v("all"), S("");
661
- },
662
- className: "flex items-center gap-1.5 text-sm font-medium text-primary hover:underline",
663
- children: [/* @__PURE__ */ A(y, { className: "h-3.5 w-3.5" }), "Show All"]
664
- })]
665
- })
666
- ]
667
- });
668
- }
669
- //#endregion
670
- export { H as NotificationCenterPage };
671
-
672
- //# sourceMappingURL=NotificationCenterPage.js.map