@burdenoff/microfe-coolandlovely 2026.625.2 → 2026.628.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (165) hide show
  1. package/dist/coolandlovely/CoolAndLovelyRoot.js +66 -122
  2. package/dist/coolandlovely/CoolAndLovelyRoot.js.map +1 -1
  3. package/dist/coolandlovely/CoolAndLovelyRoutes.js +87 -175
  4. package/dist/coolandlovely/CoolAndLovelyRoutes.js.map +1 -1
  5. package/dist/coolandlovely/components/Field.js +81 -0
  6. package/dist/coolandlovely/components/Field.js.map +1 -0
  7. package/dist/coolandlovely/components/StateViews.js +34 -0
  8. package/dist/coolandlovely/components/StateViews.js.map +1 -0
  9. package/dist/coolandlovely/components/StatusBadge.js +25 -22
  10. package/dist/coolandlovely/components/StatusBadge.js.map +1 -1
  11. package/dist/coolandlovely/components/TagList.js +21 -0
  12. package/dist/coolandlovely/components/TagList.js.map +1 -0
  13. package/dist/coolandlovely/components/Thumbnail.js +29 -0
  14. package/dist/coolandlovely/components/Thumbnail.js.map +1 -0
  15. package/dist/coolandlovely/context/CoolAndLovelyContext.js +10 -10
  16. package/dist/coolandlovely/context/CoolAndLovelyContext.js.map +1 -1
  17. package/dist/coolandlovely/hooks/index.js +1 -0
  18. package/dist/coolandlovely/hooks/useCoolAndLovelyApi.js +462 -169
  19. package/dist/coolandlovely/hooks/useCoolAndLovelyApi.js.map +1 -1
  20. package/dist/coolandlovely/pages/HomePage.js +251 -845
  21. package/dist/coolandlovely/pages/HomePage.js.map +1 -1
  22. package/dist/coolandlovely/pages/brands/BrandDetailPage.js +319 -0
  23. package/dist/coolandlovely/pages/brands/BrandDetailPage.js.map +1 -0
  24. package/dist/coolandlovely/pages/brands/BrandFormPage.js +190 -0
  25. package/dist/coolandlovely/pages/brands/BrandFormPage.js.map +1 -0
  26. package/dist/coolandlovely/pages/brands/BrandsListPage.js +158 -0
  27. package/dist/coolandlovely/pages/brands/BrandsListPage.js.map +1 -0
  28. package/dist/coolandlovely/pages/collaborations/CollaborationDetailPage.js +253 -0
  29. package/dist/coolandlovely/pages/collaborations/CollaborationDetailPage.js.map +1 -0
  30. package/dist/coolandlovely/pages/collaborations/CollaborationFormPage.js +206 -0
  31. package/dist/coolandlovely/pages/collaborations/CollaborationFormPage.js.map +1 -0
  32. package/dist/coolandlovely/pages/collaborations/CollaborationsListPage.js +129 -0
  33. package/dist/coolandlovely/pages/collaborations/CollaborationsListPage.js.map +1 -0
  34. package/dist/coolandlovely/pages/collections/CollectionDetailPage.js +217 -0
  35. package/dist/coolandlovely/pages/collections/CollectionDetailPage.js.map +1 -0
  36. package/dist/coolandlovely/pages/collections/CollectionFormPage.js +217 -0
  37. package/dist/coolandlovely/pages/collections/CollectionFormPage.js.map +1 -0
  38. package/dist/coolandlovely/pages/collections/CollectionsListPage.js +122 -0
  39. package/dist/coolandlovely/pages/collections/CollectionsListPage.js.map +1 -0
  40. package/dist/coolandlovely/pages/items/StyleItemDetailPage.js +230 -0
  41. package/dist/coolandlovely/pages/items/StyleItemDetailPage.js.map +1 -0
  42. package/dist/coolandlovely/pages/items/StyleItemFormPage.js +276 -0
  43. package/dist/coolandlovely/pages/items/StyleItemFormPage.js.map +1 -0
  44. package/dist/coolandlovely/pages/items/StyleItemsListPage.js +170 -0
  45. package/dist/coolandlovely/pages/items/StyleItemsListPage.js.map +1 -0
  46. package/dist/coolandlovely/pages/lookbooks/LookbookDetailPage.js +124 -0
  47. package/dist/coolandlovely/pages/lookbooks/LookbookDetailPage.js.map +1 -0
  48. package/dist/coolandlovely/pages/lookbooks/LookbooksListPage.js +156 -0
  49. package/dist/coolandlovely/pages/lookbooks/LookbooksListPage.js.map +1 -0
  50. package/dist/coolandlovely/pages/looks/LookDetailPage.js +238 -0
  51. package/dist/coolandlovely/pages/looks/LookDetailPage.js.map +1 -0
  52. package/dist/coolandlovely/pages/looks/LookFormPage.js +209 -0
  53. package/dist/coolandlovely/pages/looks/LookFormPage.js.map +1 -0
  54. package/dist/coolandlovely/pages/looks/LooksListPage.js +181 -0
  55. package/dist/coolandlovely/pages/looks/LooksListPage.js.map +1 -0
  56. package/dist/coolandlovely/pages/profile/StyleProfilePage.js +224 -0
  57. package/dist/coolandlovely/pages/profile/StyleProfilePage.js.map +1 -0
  58. package/dist/coolandlovely/pages/wardrobe/WardrobeFormPage.js +173 -0
  59. package/dist/coolandlovely/pages/wardrobe/WardrobeFormPage.js.map +1 -0
  60. package/dist/coolandlovely/pages/wardrobe/WardrobeListPage.js +172 -0
  61. package/dist/coolandlovely/pages/wardrobe/WardrobeListPage.js.map +1 -0
  62. package/dist/coolandlovely/store/coolandlovelyStore.js +2 -6
  63. package/dist/coolandlovely/store/coolandlovelyStore.js.map +1 -1
  64. package/dist/coolandlovely/utils/formatters.js +31 -23
  65. package/dist/coolandlovely/utils/formatters.js.map +1 -1
  66. package/dist/coolandlovely/utils/icons.js +34 -0
  67. package/dist/coolandlovely/utils/icons.js.map +1 -0
  68. package/dist/index.js +4 -4
  69. package/package.json +1 -1
  70. package/dist/coolandlovely/components/InvestmentCard.js +0 -98
  71. package/dist/coolandlovely/components/InvestmentCard.js.map +0 -1
  72. package/dist/coolandlovely/components/RatingDisplay.js +0 -35
  73. package/dist/coolandlovely/components/RatingDisplay.js.map +0 -1
  74. package/dist/coolandlovely/mocks/data.js +0 -1517
  75. package/dist/coolandlovely/mocks/data.js.map +0 -1
  76. package/dist/coolandlovely/mocks/users.js +0 -34
  77. package/dist/coolandlovely/mocks/users.js.map +0 -1
  78. package/dist/coolandlovely/pages/admin/AdminAnalyticsPage.js +0 -651
  79. package/dist/coolandlovely/pages/admin/AdminAnalyticsPage.js.map +0 -1
  80. package/dist/coolandlovely/pages/admin/AdminDashboard.js +0 -673
  81. package/dist/coolandlovely/pages/admin/AdminDashboard.js.map +0 -1
  82. package/dist/coolandlovely/pages/admin/AdminFinancialPage.js +0 -427
  83. package/dist/coolandlovely/pages/admin/AdminFinancialPage.js.map +0 -1
  84. package/dist/coolandlovely/pages/admin/AdminOrdersPage.js +0 -665
  85. package/dist/coolandlovely/pages/admin/AdminOrdersPage.js.map +0 -1
  86. package/dist/coolandlovely/pages/admin/AdminProfilePage.js +0 -264
  87. package/dist/coolandlovely/pages/admin/AdminProfilePage.js.map +0 -1
  88. package/dist/coolandlovely/pages/admin/AdminSettingsPage.js +0 -654
  89. package/dist/coolandlovely/pages/admin/AdminSettingsPage.js.map +0 -1
  90. package/dist/coolandlovely/pages/admin/CartManagementPage.js +0 -874
  91. package/dist/coolandlovely/pages/admin/CartManagementPage.js.map +0 -1
  92. package/dist/coolandlovely/pages/admin/UserManagementPage.js +0 -898
  93. package/dist/coolandlovely/pages/admin/UserManagementPage.js.map +0 -1
  94. package/dist/coolandlovely/pages/cart-owner/AnalyticsDashboard.js +0 -842
  95. package/dist/coolandlovely/pages/cart-owner/AnalyticsDashboard.js.map +0 -1
  96. package/dist/coolandlovely/pages/cart-owner/BusinessSettingsPage.js +0 -705
  97. package/dist/coolandlovely/pages/cart-owner/BusinessSettingsPage.js.map +0 -1
  98. package/dist/coolandlovely/pages/cart-owner/CartOwnerDashboard.js +0 -802
  99. package/dist/coolandlovely/pages/cart-owner/CartOwnerDashboard.js.map +0 -1
  100. package/dist/coolandlovely/pages/cart-owner/CartOwnerProfilePage.js +0 -891
  101. package/dist/coolandlovely/pages/cart-owner/CartOwnerProfilePage.js.map +0 -1
  102. package/dist/coolandlovely/pages/cart-owner/CartServiceConfigPage.js +0 -639
  103. package/dist/coolandlovely/pages/cart-owner/CartServiceConfigPage.js.map +0 -1
  104. package/dist/coolandlovely/pages/cart-owner/InventoryManagementPage.js +0 -914
  105. package/dist/coolandlovely/pages/cart-owner/InventoryManagementPage.js.map +0 -1
  106. package/dist/coolandlovely/pages/cart-owner/OrderManagementPage.js +0 -882
  107. package/dist/coolandlovely/pages/cart-owner/OrderManagementPage.js.map +0 -1
  108. package/dist/coolandlovely/pages/cart-owner/StaffManagementPage.js +0 -831
  109. package/dist/coolandlovely/pages/cart-owner/StaffManagementPage.js.map +0 -1
  110. package/dist/coolandlovely/pages/common/HelpSupportPage.js +0 -1325
  111. package/dist/coolandlovely/pages/common/HelpSupportPage.js.map +0 -1
  112. package/dist/coolandlovely/pages/common/NotificationCenterPage.js +0 -671
  113. package/dist/coolandlovely/pages/common/NotificationCenterPage.js.map +0 -1
  114. package/dist/coolandlovely/pages/common/SettingsPage.js +0 -973
  115. package/dist/coolandlovely/pages/common/SettingsPage.js.map +0 -1
  116. package/dist/coolandlovely/pages/customer/BookingDetailsPage.js +0 -630
  117. package/dist/coolandlovely/pages/customer/BookingDetailsPage.js.map +0 -1
  118. package/dist/coolandlovely/pages/customer/CartDetailPage.js +0 -623
  119. package/dist/coolandlovely/pages/customer/CartDetailPage.js.map +0 -1
  120. package/dist/coolandlovely/pages/customer/CartDiscoveryPage.js +0 -558
  121. package/dist/coolandlovely/pages/customer/CartDiscoveryPage.js.map +0 -1
  122. package/dist/coolandlovely/pages/customer/CheckoutPage.js +0 -529
  123. package/dist/coolandlovely/pages/customer/CheckoutPage.js.map +0 -1
  124. package/dist/coolandlovely/pages/customer/CustomerDashboard.js +0 -538
  125. package/dist/coolandlovely/pages/customer/CustomerDashboard.js.map +0 -1
  126. package/dist/coolandlovely/pages/customer/CustomerProfilePage.js +0 -658
  127. package/dist/coolandlovely/pages/customer/CustomerProfilePage.js.map +0 -1
  128. package/dist/coolandlovely/pages/customer/DirectServiceBookingPage.js +0 -632
  129. package/dist/coolandlovely/pages/customer/DirectServiceBookingPage.js.map +0 -1
  130. package/dist/coolandlovely/pages/customer/FavoritesPage.js +0 -487
  131. package/dist/coolandlovely/pages/customer/FavoritesPage.js.map +0 -1
  132. package/dist/coolandlovely/pages/customer/OrderHistoryPage.js +0 -447
  133. package/dist/coolandlovely/pages/customer/OrderHistoryPage.js.map +0 -1
  134. package/dist/coolandlovely/pages/customer/OrderTrackingPage.js +0 -425
  135. package/dist/coolandlovely/pages/customer/OrderTrackingPage.js.map +0 -1
  136. package/dist/coolandlovely/pages/customer/PaymentMethodsPage.js +0 -494
  137. package/dist/coolandlovely/pages/customer/PaymentMethodsPage.js.map +0 -1
  138. package/dist/coolandlovely/pages/customer/ReviewsPage.js +0 -616
  139. package/dist/coolandlovely/pages/customer/ReviewsPage.js.map +0 -1
  140. package/dist/coolandlovely/pages/customer/SavedAddressesPage.js +0 -449
  141. package/dist/coolandlovely/pages/customer/SavedAddressesPage.js.map +0 -1
  142. package/dist/coolandlovely/pages/investor/InvestmentDetailsPage.js +0 -887
  143. package/dist/coolandlovely/pages/investor/InvestmentDetailsPage.js.map +0 -1
  144. package/dist/coolandlovely/pages/investor/InvestmentOpportunitiesPage.js +0 -945
  145. package/dist/coolandlovely/pages/investor/InvestmentOpportunitiesPage.js.map +0 -1
  146. package/dist/coolandlovely/pages/investor/InvestorAnalyticsPage.js +0 -687
  147. package/dist/coolandlovely/pages/investor/InvestorAnalyticsPage.js.map +0 -1
  148. package/dist/coolandlovely/pages/investor/InvestorDashboard.js +0 -455
  149. package/dist/coolandlovely/pages/investor/InvestorDashboard.js.map +0 -1
  150. package/dist/coolandlovely/pages/investor/InvestorInvestmentsPage.js +0 -405
  151. package/dist/coolandlovely/pages/investor/InvestorInvestmentsPage.js.map +0 -1
  152. package/dist/coolandlovely/pages/investor/InvestorPortfolioPage.js +0 -602
  153. package/dist/coolandlovely/pages/investor/InvestorPortfolioPage.js.map +0 -1
  154. package/dist/coolandlovely/pages/investor/InvestorProfilePage.js +0 -1070
  155. package/dist/coolandlovely/pages/investor/InvestorProfilePage.js.map +0 -1
  156. package/dist/coolandlovely/pages/worker/TaskDetailsPage.js +0 -533
  157. package/dist/coolandlovely/pages/worker/TaskDetailsPage.js.map +0 -1
  158. package/dist/coolandlovely/pages/worker/WorkerDashboard.js +0 -671
  159. package/dist/coolandlovely/pages/worker/WorkerDashboard.js.map +0 -1
  160. package/dist/coolandlovely/pages/worker/WorkerOrdersPage.js +0 -680
  161. package/dist/coolandlovely/pages/worker/WorkerOrdersPage.js.map +0 -1
  162. package/dist/coolandlovely/pages/worker/WorkerProfilePage.js +0 -692
  163. package/dist/coolandlovely/pages/worker/WorkerProfilePage.js.map +0 -1
  164. package/dist/coolandlovely/pages/worker/WorkerSchedulePage.js +0 -583
  165. package/dist/coolandlovely/pages/worker/WorkerSchedulePage.js.map +0 -1
@@ -1,671 +0,0 @@
1
- import { useCoolAndLovely as e } from "../../context/CoolAndLovelyContext.js";
2
- import { cn as t } from "../../utils/cn.js";
3
- import { PageLayout as n } from "../../components/PageLayout.js";
4
- import { 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/coolandlovely/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 CoolAndLovely 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-accent-blue",
177
- bg: "bg-accent-blue-subtle/10",
178
- label: "Order"
179
- },
180
- payment: {
181
- icon: h,
182
- color: "text-status-success-text",
183
- bg: "bg-status-success-bg-subtle/10",
184
- label: "Payment"
185
- },
186
- promotion: {
187
- icon: v,
188
- color: "text-accent-orange",
189
- bg: "bg-accent-orange-subtle/10",
190
- label: "Promo"
191
- },
192
- system: {
193
- icon: c,
194
- color: "text-accent-purple",
195
- bg: "bg-accent-purple-subtle/10",
196
- label: "System"
197
- },
198
- review: {
199
- icon: S,
200
- color: "text-status-warning-text",
201
- bg: "bg-status-warning-bg-subtle/10",
202
- label: "Review"
203
- },
204
- staff: {
205
- icon: D,
206
- color: "text-accent-indigo",
207
- bg: "bg-accent-indigo-subtle/10",
208
- label: "Staff"
209
- },
210
- investment: {
211
- icon: w,
212
- color: "text-status-success-text",
213
- bg: "bg-status-success-bg-subtle/10",
214
- label: "Investment"
215
- },
216
- alert: {
217
- icon: l,
218
- color: "text-status-error-text",
219
- bg: "bg-status-error-bg-subtle/10",
220
- label: "Alert"
221
- },
222
- delivery: {
223
- icon: T,
224
- color: "text-accent-cyan",
225
- bg: "bg-accent-cyan-subtle/10",
226
- label: "Delivery"
227
- },
228
- account: {
229
- icon: E,
230
- color: "text-accent-teal",
231
- bg: "bg-accent-teal-subtle/10",
232
- label: "Account"
233
- }
234
- }, I = {
235
- urgent: "bg-status-error-bg-subtle/20 text-status-error-text",
236
- high: "bg-accent-orange-subtle/20 text-accent-orange",
237
- medium: "bg-accent-blue-subtle/20 text-accent-blue",
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-subtle 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-subtle 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
- className: "mb-6",
390
- icon: /* @__PURE__ */ A(d, { className: "h-4 w-4" }),
391
- children: "Everything the platform wants you to know, gathered in one feed. Catch up on orders, alerts and updates, filter by type, mark things read or clear them — so nothing important slips past and you stay in control of what needs your attention."
392
- }),
393
- /* @__PURE__ */ j(M, {
394
- className: "grid grid-cols-2 gap-3 sm:grid-cols-5 mb-6 p-4",
395
- children: [
396
- /* @__PURE__ */ j("div", {
397
- className: "rounded-lg border border-border-subtle 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-accent-blue-subtle/30 bg-accent-blue-subtle/5 p-3 text-center",
408
- children: [/* @__PURE__ */ A("p", {
409
- className: "text-2xl font-bold text-accent-blue",
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/30 bg-status-error-bg-subtle/5 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/30 bg-status-success-bg-subtle/5 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/30 bg-status-warning-bg-subtle/5 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-subtle 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-subtle 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-subtle 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-subtle 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
- title: "No notifications",
529
- 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.",
530
- action: x ? /* @__PURE__ */ A("button", {
531
- type: "button",
532
- onClick: () => S(""),
533
- className: "rounded-lg border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
534
- children: "Clear Search"
535
- }) : g === "all" ? void 0 : /* @__PURE__ */ A("button", {
536
- type: "button",
537
- onClick: () => v("all"),
538
- className: "rounded-lg border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
539
- children: "View All Notifications"
540
- })
541
- }) : /* @__PURE__ */ A("div", {
542
- className: "space-y-6",
543
- children: J.map((e) => /* @__PURE__ */ j("div", { children: [/* @__PURE__ */ j("div", {
544
- className: "flex items-center gap-3 mb-2",
545
- children: [
546
- /* @__PURE__ */ A("h3", {
547
- className: "text-xs font-semibold uppercase tracking-wider text-text-secondary",
548
- children: e.label
549
- }),
550
- /* @__PURE__ */ A("div", { className: "flex-1 border-t border-border-subtle" }),
551
- /* @__PURE__ */ j("span", {
552
- className: "text-xs text-text-secondary",
553
- children: [
554
- e.items.length,
555
- " notification",
556
- e.items.length === 1 ? "" : "s"
557
- ]
558
- })
559
- ]
560
- }), /* @__PURE__ */ A("div", {
561
- className: "rounded-lg border border-border-subtle bg-bg-surface divide-y divide-border overflow-hidden",
562
- children: e.items.map((e) => {
563
- let n = F[e.type] ?? F.system, r = n.icon;
564
- return /* @__PURE__ */ j("div", {
565
- className: t("flex items-start gap-3 px-4 py-4 border-l-4 transition-colors", L[e.priority], !e.isRead && "bg-accent/30"),
566
- children: [
567
- /* @__PURE__ */ A("div", {
568
- className: t("flex h-10 w-10 shrink-0 items-center justify-center rounded-full", n.bg),
569
- children: /* @__PURE__ */ A(r, { className: t("h-5 w-5", n.color) })
570
- }),
571
- /* @__PURE__ */ j("div", {
572
- className: "flex-1 min-w-0",
573
- children: [
574
- /* @__PURE__ */ j("div", {
575
- className: "flex items-center gap-2 flex-wrap",
576
- children: [
577
- /* @__PURE__ */ A("h4", {
578
- className: t("text-sm text-text-primary", e.isRead ? "font-medium" : "font-semibold"),
579
- children: e.title
580
- }),
581
- !e.isRead && /* @__PURE__ */ A("span", { className: "h-2 w-2 rounded-full bg-action-primary-bg shrink-0" }),
582
- /* @__PURE__ */ A("span", {
583
- className: t("inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium", I[e.priority]),
584
- children: e.priority
585
- })
586
- ]
587
- }),
588
- /* @__PURE__ */ A("p", {
589
- className: "mt-1 text-sm text-text-secondary leading-relaxed",
590
- children: e.message
591
- }),
592
- /* @__PURE__ */ j("div", {
593
- className: "mt-2 flex items-center gap-3 flex-wrap",
594
- children: [
595
- /* @__PURE__ */ j("span", {
596
- className: "flex items-center gap-1 text-xs text-text-secondary",
597
- children: [/* @__PURE__ */ A(m, { className: "h-3 w-3" }), i(e.createdAt)]
598
- }),
599
- /* @__PURE__ */ A("span", {
600
- className: t("inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium", n.bg, n.color),
601
- children: n.label
602
- }),
603
- e.metadata?.orderId && /* @__PURE__ */ j("span", {
604
- className: "text-xs text-text-secondary",
605
- children: ["#", e.metadata.orderId]
606
- })
607
- ]
608
- }),
609
- /* @__PURE__ */ j("div", {
610
- className: "mt-3 flex items-center gap-2 flex-wrap",
611
- children: [
612
- e.actionUrl && /* @__PURE__ */ A("button", {
613
- type: "button",
614
- onClick: () => Q(e),
615
- 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",
616
- children: e.actionText ?? "View"
617
- }),
618
- !e.isRead && /* @__PURE__ */ j("button", {
619
- type: "button",
620
- onClick: () => Y(e.id),
621
- title: "Mark as read",
622
- className: "flex items-center gap-1 rounded-lg border border-border-subtle px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-accent transition-colors",
623
- children: [/* @__PURE__ */ A(f, { className: "h-3 w-3" }), "Mark Read"]
624
- }),
625
- /* @__PURE__ */ j("button", {
626
- type: "button",
627
- onClick: () => Z(e.id),
628
- title: "Delete notification",
629
- className: "flex items-center gap-1 rounded-lg border border-border-subtle px-3 py-1.5 text-xs font-medium text-status-error-text hover:bg-status-error-bg/10 transition-colors",
630
- children: [/* @__PURE__ */ A(C, { className: "h-3 w-3" }), "Delete"]
631
- })
632
- ]
633
- })
634
- ]
635
- }),
636
- /* @__PURE__ */ A("div", {
637
- className: "shrink-0 pt-1",
638
- children: e.isRead ? /* @__PURE__ */ A(_, { className: "h-4 w-4 text-text-secondary/40" }) : /* @__PURE__ */ A(d, { className: "h-4 w-4 text-primary" })
639
- })
640
- ]
641
- }, e.id);
642
- })
643
- })] }, e.label))
644
- }),
645
- q.length > 0 && /* @__PURE__ */ j("div", {
646
- className: "mt-6 flex items-center justify-between rounded-lg border border-border-subtle bg-bg-surface px-4 py-3",
647
- children: [/* @__PURE__ */ j("p", {
648
- className: "text-sm text-text-secondary",
649
- children: [
650
- "Showing ",
651
- q.length,
652
- " of ",
653
- l.length,
654
- " notifications"
655
- ]
656
- }), g !== "all" && /* @__PURE__ */ j("button", {
657
- type: "button",
658
- onClick: () => {
659
- v("all"), S("");
660
- },
661
- className: "flex items-center gap-1.5 text-sm font-medium text-primary hover:underline",
662
- children: [/* @__PURE__ */ A(y, { className: "h-3.5 w-3.5" }), "Show All"]
663
- })]
664
- })
665
- ]
666
- });
667
- }
668
- //#endregion
669
- export { H as NotificationCenterPage };
670
-
671
- //# sourceMappingURL=NotificationCenterPage.js.map