@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,616 +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 { formatDate as i } from "../../utils/formatters.js";
6
- import { RatingDisplay as a } from "../../components/RatingDisplay.js";
7
- import { useCallback as o, useState as s } from "react";
8
- import { CheckCircle2 as c, Info as l, MessageCircle as u, MessageSquare as d, PenSquare as f, Search as p, Star as m, ThumbsUp as h, X as g } from "lucide-react";
9
- import { jsx as _, jsxs as v } from "react/jsx-runtime";
10
- import { EmphasisPanel as y, PagePurpose as b } from "@burdenoff/fe-libs/ui";
11
- //#region src/coolandlovely/pages/customer/ReviewsPage.tsx
12
- var x = "user-001", S = {
13
- 1: "Terrible",
14
- 2: "Poor",
15
- 3: "Average",
16
- 4: "Good",
17
- 5: "Excellent"
18
- }, C = [
19
- {
20
- id: "review-001",
21
- userId: x,
22
- userName: "Rahul Sharma",
23
- userAvatar: "https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?w=100",
24
- itemId: "FOOD-001",
25
- itemName: "Dosa Express",
26
- itemType: "cart",
27
- cartId: "FOOD-001",
28
- cartName: "Dosa Express",
29
- orderId: "ORD-2024-001",
30
- rating: 5,
31
- title: "Excellent breakfast spot!",
32
- comment: "Amazing dosas and filter coffee. The masala dosa was perfectly crispy and the potato filling was delicious. Service was quick and friendly. Highly recommend for authentic South Indian breakfast!",
33
- helpfulCount: 12,
34
- isHelpful: !0,
35
- isVerified: !0,
36
- createdAt: "2024-06-20T09:30:00Z",
37
- response: {
38
- message: "Thank you so much for your wonderful review! We're thrilled you enjoyed the dosas. We look forward to serving you again soon!",
39
- respondedBy: "Dosa Express Team",
40
- respondedAt: "2024-06-20T15:45:00Z"
41
- }
42
- },
43
- {
44
- id: "review-002",
45
- userId: "user-002",
46
- userName: "Priya Patel",
47
- userAvatar: "https://images.unsplash.com/photo-1494790108377-be9c29b29330?w=100",
48
- itemId: "prod-002",
49
- itemName: "Pani Puri",
50
- itemType: "product",
51
- cartId: "FOOD-002",
52
- cartName: "Chaat Corner",
53
- orderId: "ORD-2024-002",
54
- rating: 4,
55
- title: "Good but could be spicier",
56
- comment: "The pani puri was good overall. The puris were crispy and fresh. However, the pani could have been more spicy and tangy. The portions were generous though.",
57
- helpfulCount: 8,
58
- isHelpful: !1,
59
- isVerified: !0,
60
- createdAt: "2024-06-18T19:15:00Z"
61
- },
62
- {
63
- id: "review-003",
64
- userId: "user-003",
65
- userName: "Amit Kumar",
66
- userAvatar: "https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?w=100",
67
- itemId: "FOOD-002",
68
- itemName: "Chaat Corner",
69
- itemType: "cart",
70
- cartId: "FOOD-002",
71
- cartName: "Chaat Corner",
72
- orderId: "ORD-2024-003",
73
- rating: 5,
74
- title: "Authentic Mumbai street food!",
75
- comment: "This place brings back memories of Mumbai streets. Every item I ordered was authentic and delicious. The bhel puri and vada pav were exceptional. Will definitely order again!",
76
- images: ["https://images.unsplash.com/photo-1601050690597-df0568f70950?w=400"],
77
- helpfulCount: 15,
78
- isHelpful: !1,
79
- isVerified: !0,
80
- createdAt: "2024-06-17T20:30:00Z"
81
- },
82
- {
83
- id: "review-004",
84
- userId: x,
85
- userName: "Rahul Sharma",
86
- userAvatar: "https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?w=100",
87
- itemId: "prod-001",
88
- itemName: "Masala Dosa",
89
- itemType: "product",
90
- cartId: "FOOD-001",
91
- cartName: "Dosa Express",
92
- orderId: "ORD-2024-004",
93
- rating: 5,
94
- title: "Perfect masala dosa!",
95
- comment: "The masala dosa here is absolutely perfect. Crispy, golden brown, and the potato masala inside is perfectly spiced. Comes with great chutneys and sambar.",
96
- helpfulCount: 6,
97
- isHelpful: !1,
98
- isVerified: !0,
99
- createdAt: "2024-06-15T08:45:00Z",
100
- response: {
101
- message: "Glad you loved it, Rahul! Our chef takes great care with every dosa. See you soon!",
102
- respondedBy: "Dosa Express Team",
103
- respondedAt: "2024-06-15T14:00:00Z"
104
- }
105
- },
106
- {
107
- id: "review-005",
108
- userId: "user-004",
109
- userName: "Sneha Reddy",
110
- userAvatar: "https://images.unsplash.com/photo-1438761681033-6461ffad8d80?w=100",
111
- itemId: "FOOD-001",
112
- itemName: "Dosa Express",
113
- itemType: "cart",
114
- cartId: "FOOD-001",
115
- cartName: "Dosa Express",
116
- orderId: "ORD-2024-005",
117
- rating: 3,
118
- title: "Average experience",
119
- comment: "The food was okay but delivery took longer than expected. The taste was good but not exceptional. The packaging could be better to keep food warm.",
120
- helpfulCount: 4,
121
- isHelpful: !1,
122
- isVerified: !0,
123
- createdAt: "2024-06-12T12:20:00Z"
124
- }
125
- ];
126
- function w({ value: e, onChange: n }) {
127
- let [r, i] = s(0), a = r || e;
128
- return /* @__PURE__ */ v("div", {
129
- className: "flex items-center gap-3",
130
- children: [/* @__PURE__ */ _("div", {
131
- className: "flex items-center gap-0.5",
132
- children: [
133
- 1,
134
- 2,
135
- 3,
136
- 4,
137
- 5
138
- ].map((e) => /* @__PURE__ */ _("button", {
139
- type: "button",
140
- onClick: () => n(e),
141
- onMouseEnter: () => i(e),
142
- onMouseLeave: () => i(0),
143
- className: "p-0.5 transition-transform",
144
- children: /* @__PURE__ */ _(m, { className: t("h-6 w-6", e <= a ? "fill-status-warning-text text-status-warning-text" : "fill-none text-text-secondary/40") })
145
- }, e))
146
- }), /* @__PURE__ */ _("span", {
147
- className: "text-sm font-medium text-text-secondary",
148
- children: S[a] ?? ""
149
- })]
150
- });
151
- }
152
- function T() {
153
- let { navigateTo: S } = e(), [T, E] = s(C), [D, O] = s(!1), [k, A] = s({
154
- rating: 5,
155
- title: "",
156
- comment: ""
157
- }), [j, M] = s({
158
- searchQuery: "",
159
- type: "all",
160
- rating: "",
161
- sortBy: "recent"
162
- }), [N, P] = s(null), F = (e) => {
163
- P(e), setTimeout(() => P(null), 3e3);
164
- }, I = o(() => {
165
- let e = [...T];
166
- if (j.type === "my-reviews" ? e = e.filter((e) => e.userId === x) : j.type !== "all" && (e = e.filter((e) => e.itemType === j.type)), j.rating) {
167
- let t = parseInt(j.rating, 10);
168
- e = e.filter((e) => e.rating === t);
169
- }
170
- if (j.searchQuery) {
171
- let t = j.searchQuery.toLowerCase();
172
- e = e.filter((e) => e.itemName.toLowerCase().includes(t) || e.title.toLowerCase().includes(t) || e.comment.toLowerCase().includes(t) || e.cartName.toLowerCase().includes(t));
173
- }
174
- switch (j.sortBy) {
175
- case "recent":
176
- e.sort((e, t) => new Date(t.createdAt).getTime() - new Date(e.createdAt).getTime());
177
- break;
178
- case "helpful":
179
- e.sort((e, t) => t.helpfulCount - e.helpfulCount);
180
- break;
181
- case "rating-high":
182
- e.sort((e, t) => t.rating - e.rating);
183
- break;
184
- case "rating-low":
185
- e.sort((e, t) => e.rating - t.rating);
186
- break;
187
- }
188
- return e;
189
- }, [T, j])(), L = T.filter((e) => e.userId === x).length, R = T.length > 0 ? (T.reduce((e, t) => e + t.rating, 0) / T.length).toFixed(1) : "0", z = () => {
190
- if (!k.title.trim() || !k.comment.trim()) {
191
- alert("Please fill in the Review Title and Comment.");
192
- return;
193
- }
194
- let e = {
195
- id: `review-${Date.now()}`,
196
- userId: x,
197
- userName: "Rahul Sharma",
198
- userAvatar: "https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?w=100",
199
- itemId: "FOOD-001",
200
- itemName: "Dosa Express",
201
- itemType: "cart",
202
- cartId: "FOOD-001",
203
- cartName: "Dosa Express",
204
- orderId: `ORD-2024-${Date.now()}`,
205
- rating: k.rating,
206
- title: k.title,
207
- comment: k.comment,
208
- helpfulCount: 0,
209
- isHelpful: !1,
210
- isVerified: !0,
211
- createdAt: (/* @__PURE__ */ new Date()).toISOString()
212
- };
213
- E((t) => [e, ...t]), A({
214
- rating: 5,
215
- title: "",
216
- comment: ""
217
- }), O(!1), F("Review submitted successfully!");
218
- }, B = (e) => {
219
- E((t) => t.map((t) => t.id === e ? {
220
- ...t,
221
- isHelpful: !t.isHelpful,
222
- helpfulCount: t.isHelpful ? t.helpfulCount - 1 : t.helpfulCount + 1
223
- } : t));
224
- };
225
- return /* @__PURE__ */ v(n, {
226
- title: "Reviews & Ratings",
227
- description: `${I.length} reviews found`,
228
- actions: /* @__PURE__ */ v("button", {
229
- type: "button",
230
- onClick: () => O(!0),
231
- className: t("flex items-center gap-2 rounded-lg px-4 py-2 text-sm font-medium transition-opacity", "bg-foreground text-background hover:opacity-90"),
232
- children: [/* @__PURE__ */ _(f, { className: "h-4 w-4" }), "Write Review"]
233
- }),
234
- children: [
235
- N && /* @__PURE__ */ v("div", {
236
- className: "mb-4 rounded-lg border border-status-success-border/30 bg-status-success-bg-subtle/10 p-3 flex items-center gap-2",
237
- children: [/* @__PURE__ */ _(c, { className: "h-4 w-4 text-status-success-text shrink-0" }), /* @__PURE__ */ _("p", {
238
- className: "text-sm text-status-success-text",
239
- children: N
240
- })]
241
- }),
242
- /* @__PURE__ */ _(b, {
243
- className: "mb-6",
244
- icon: /* @__PURE__ */ _(d, { className: "h-4 w-4" }),
245
- children: "Read what other customers think and share your own experience. Filter by rating or type to find the most helpful feedback, mark reviews that helped you, and write your own — your honest review helps carts improve and other shoppers choose well."
246
- }),
247
- /* @__PURE__ */ _(y, {
248
- className: "mb-6 p-5",
249
- children: /* @__PURE__ */ v("div", {
250
- className: "flex flex-wrap items-center justify-between gap-4",
251
- children: [/* @__PURE__ */ v("div", {
252
- className: "flex flex-wrap items-center gap-5 text-sm text-text-secondary",
253
- children: [/* @__PURE__ */ v("span", { children: [T.length, " total reviews"] }), /* @__PURE__ */ v("span", { children: [L, " your reviews"] })]
254
- }), /* @__PURE__ */ v("div", {
255
- className: "flex items-center gap-2",
256
- children: [/* @__PURE__ */ _("span", {
257
- className: "text-xs text-text-secondary",
258
- children: "Average rating"
259
- }), /* @__PURE__ */ v("span", {
260
- className: "flex items-center gap-1 text-2xl font-bold text-text-primary",
261
- children: [R, /* @__PURE__ */ _(m, { className: "h-5 w-5 fill-status-warning-text text-status-warning-text" })]
262
- })]
263
- })]
264
- })
265
- }),
266
- /* @__PURE__ */ _("div", {
267
- className: "rounded-lg border border-border-seam bg-bg-surface p-4 mb-6 bg-gloss-card shadow-pop",
268
- children: /* @__PURE__ */ v("div", {
269
- className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-3",
270
- children: [
271
- /* @__PURE__ */ v("div", {
272
- className: "relative",
273
- children: [/* @__PURE__ */ _(p, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-text-secondary" }), /* @__PURE__ */ _("input", {
274
- type: "text",
275
- placeholder: "Search reviews...",
276
- value: j.searchQuery,
277
- onChange: (e) => M((t) => ({
278
- ...t,
279
- searchQuery: e.target.value
280
- })),
281
- className: "w-full rounded-lg border border-border-subtle bg-bg-surface py-2 pl-9 pr-3 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
282
- })]
283
- }),
284
- /* @__PURE__ */ v("select", {
285
- value: j.type,
286
- onChange: (e) => M((t) => ({
287
- ...t,
288
- type: e.target.value
289
- })),
290
- className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
291
- children: [
292
- /* @__PURE__ */ _("option", {
293
- value: "all",
294
- children: "All Reviews"
295
- }),
296
- /* @__PURE__ */ _("option", {
297
- value: "cart",
298
- children: "Cart Reviews"
299
- }),
300
- /* @__PURE__ */ _("option", {
301
- value: "product",
302
- children: "Product Reviews"
303
- }),
304
- /* @__PURE__ */ _("option", {
305
- value: "my-reviews",
306
- children: "My Reviews"
307
- })
308
- ]
309
- }),
310
- /* @__PURE__ */ v("select", {
311
- value: j.rating,
312
- onChange: (e) => M((t) => ({
313
- ...t,
314
- rating: e.target.value
315
- })),
316
- className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
317
- children: [
318
- /* @__PURE__ */ _("option", {
319
- value: "",
320
- children: "All Ratings"
321
- }),
322
- /* @__PURE__ */ _("option", {
323
- value: "5",
324
- children: "5 Stars"
325
- }),
326
- /* @__PURE__ */ _("option", {
327
- value: "4",
328
- children: "4 Stars"
329
- }),
330
- /* @__PURE__ */ _("option", {
331
- value: "3",
332
- children: "3 Stars"
333
- }),
334
- /* @__PURE__ */ _("option", {
335
- value: "2",
336
- children: "2 Stars"
337
- }),
338
- /* @__PURE__ */ _("option", {
339
- value: "1",
340
- children: "1 Star"
341
- })
342
- ]
343
- }),
344
- /* @__PURE__ */ v("select", {
345
- value: j.sortBy,
346
- onChange: (e) => M((t) => ({
347
- ...t,
348
- sortBy: e.target.value
349
- })),
350
- className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
351
- children: [
352
- /* @__PURE__ */ _("option", {
353
- value: "recent",
354
- children: "Most Recent"
355
- }),
356
- /* @__PURE__ */ _("option", {
357
- value: "helpful",
358
- children: "Most Helpful"
359
- }),
360
- /* @__PURE__ */ _("option", {
361
- value: "rating-high",
362
- children: "Highest Rating"
363
- }),
364
- /* @__PURE__ */ _("option", {
365
- value: "rating-low",
366
- children: "Lowest Rating"
367
- })
368
- ]
369
- })
370
- ]
371
- })
372
- }),
373
- I.length === 0 ? /* @__PURE__ */ _(r, {
374
- illustration: j.searchQuery || j.rating || j.type !== "all" ? "empty-search" : "empty-generic",
375
- title: "No reviews found",
376
- description: "Be the first to write a review!",
377
- action: /* @__PURE__ */ _("button", {
378
- type: "button",
379
- onClick: () => O(!0),
380
- className: "rounded-lg bg-foreground px-4 py-2 text-sm font-medium text-background hover:opacity-90 transition-opacity",
381
- children: "Write a Review"
382
- })
383
- }) : /* @__PURE__ */ _("div", {
384
- className: "space-y-4",
385
- children: I.map((e) => {
386
- let n = e.userId === x;
387
- return /* @__PURE__ */ v("div", {
388
- className: t("rounded-lg border bg-bg-surface p-5", n ? "border-foreground/20" : "border-border-subtle"),
389
- children: [
390
- /* @__PURE__ */ v("div", {
391
- className: "flex items-start gap-3 mb-3",
392
- children: [
393
- /* @__PURE__ */ _("img", {
394
- src: e.userAvatar,
395
- alt: e.userName,
396
- className: "h-10 w-10 rounded-full object-cover shrink-0"
397
- }),
398
- /* @__PURE__ */ v("div", {
399
- className: "flex-1 min-w-0",
400
- children: [/* @__PURE__ */ v("div", {
401
- className: "flex items-center gap-2 flex-wrap",
402
- children: [
403
- /* @__PURE__ */ _("span", {
404
- className: "text-sm font-semibold text-text-primary",
405
- children: e.userName
406
- }),
407
- e.isVerified && /* @__PURE__ */ v("span", {
408
- className: "inline-flex items-center gap-1 rounded-full bg-status-success-bg-subtle/10 px-2 py-0.5 text-[10px] font-medium text-status-success-text",
409
- children: [/* @__PURE__ */ _(c, { className: "h-3 w-3" }), "Verified"]
410
- }),
411
- n && /* @__PURE__ */ _("span", {
412
- className: "inline-flex items-center rounded-full bg-accent-blue-subtle/10 px-2 py-0.5 text-[10px] font-medium text-accent-blue",
413
- children: "Your Review"
414
- })
415
- ]
416
- }), /* @__PURE__ */ v("div", {
417
- className: "flex flex-wrap items-center gap-2 text-xs text-text-secondary mt-0.5",
418
- children: [/* @__PURE__ */ v("span", { children: [e.itemType === "cart" ? /* @__PURE__ */ _(d, { className: "inline h-3 w-3 mr-0.5" }) : /* @__PURE__ */ _(m, { className: "inline h-3 w-3 mr-0.5" }), e.itemName] }), /* @__PURE__ */ _("span", { children: i(e.createdAt, {
419
- hour: void 0,
420
- minute: void 0,
421
- hour12: void 0
422
- }) })]
423
- })]
424
- }),
425
- /* @__PURE__ */ v("div", {
426
- className: "shrink-0",
427
- children: [/* @__PURE__ */ _(a, {
428
- value: e.rating,
429
- size: "sm"
430
- }), /* @__PURE__ */ v("p", {
431
- className: "text-xs text-text-secondary mt-0.5 text-right",
432
- children: ["From: ", e.cartName]
433
- })]
434
- })
435
- ]
436
- }),
437
- /* @__PURE__ */ v("div", {
438
- className: "mb-3",
439
- children: [/* @__PURE__ */ _("h4", {
440
- className: "text-sm font-semibold text-text-primary mb-1",
441
- children: e.title
442
- }), /* @__PURE__ */ _("p", {
443
- className: "text-sm text-text-primary leading-relaxed",
444
- children: e.comment
445
- })]
446
- }),
447
- e.images && e.images.length > 0 && /* @__PURE__ */ _("div", {
448
- className: "mb-3 flex gap-2 overflow-x-auto pb-1",
449
- children: e.images.map((e, t) => /* @__PURE__ */ _("img", {
450
- src: e,
451
- alt: `Review image ${t + 1}`,
452
- className: "h-20 w-20 rounded-lg object-cover shrink-0"
453
- }, t))
454
- }),
455
- e.response && /* @__PURE__ */ v("div", {
456
- className: "mb-3 rounded-lg border border-accent-blue-subtle/20 bg-accent-blue-subtle/5 p-3",
457
- children: [/* @__PURE__ */ v("div", {
458
- className: "flex flex-wrap items-center gap-2 mb-1.5",
459
- children: [
460
- /* @__PURE__ */ _(u, { className: "h-3.5 w-3.5 text-accent-blue" }),
461
- /* @__PURE__ */ v("span", {
462
- className: "text-xs font-medium text-accent-blue",
463
- children: ["Response from ", e.response.respondedBy]
464
- }),
465
- /* @__PURE__ */ _("span", {
466
- className: "text-[10px] text-accent-blue",
467
- children: i(e.response.respondedAt, {
468
- hour: void 0,
469
- minute: void 0,
470
- hour12: void 0
471
- })
472
- })
473
- ]
474
- }), /* @__PURE__ */ _("p", {
475
- className: "text-xs text-accent-blue leading-relaxed",
476
- children: e.response.message
477
- })]
478
- }),
479
- /* @__PURE__ */ v("div", {
480
- className: "flex items-center justify-between pt-3 border-t border-border-subtle",
481
- children: [/* @__PURE__ */ v("button", {
482
- type: "button",
483
- onClick: () => B(e.id),
484
- className: t("flex items-center gap-1.5 text-xs transition-colors", e.isHelpful ? "text-accent-blue font-medium" : "text-text-secondary hover:text-text-primary"),
485
- children: [
486
- /* @__PURE__ */ _(h, { className: t("h-3.5 w-3.5", e.isHelpful && "fill-current") }),
487
- "Helpful (",
488
- e.helpfulCount,
489
- ")"
490
- ]
491
- }), /* @__PURE__ */ v("div", {
492
- className: "flex items-center gap-3 text-xs text-text-secondary",
493
- children: [/* @__PURE__ */ v("span", { children: ["Order: ", e.orderId] }), /* @__PURE__ */ _("button", {
494
- type: "button",
495
- onClick: () => S(`/customer/carts/${e.cartId}`),
496
- className: "font-medium hover:text-text-primary transition-colors",
497
- children: "View Cart"
498
- })]
499
- })]
500
- })
501
- ]
502
- }, e.id);
503
- })
504
- }),
505
- D && /* @__PURE__ */ _("div", {
506
- className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",
507
- children: /* @__PURE__ */ _("div", {
508
- className: "w-full max-w-2xl max-h-[90vh] overflow-y-auto rounded-lg border border-border-subtle bg-bg-surface shadow-lg",
509
- children: /* @__PURE__ */ v("div", {
510
- className: "p-5",
511
- children: [
512
- /* @__PURE__ */ v("div", {
513
- className: "flex items-center justify-between mb-5",
514
- children: [/* @__PURE__ */ _("h3", {
515
- className: "text-lg font-semibold text-text-primary",
516
- children: "Write a Review"
517
- }), /* @__PURE__ */ _("button", {
518
- type: "button",
519
- onClick: () => O(!1),
520
- className: "rounded-md p-2 text-text-secondary hover:bg-accent hover:text-text-primary transition-colors",
521
- children: /* @__PURE__ */ _(g, { className: "h-4 w-4" })
522
- })]
523
- }),
524
- /* @__PURE__ */ v("div", {
525
- className: "space-y-4",
526
- children: [
527
- /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ v("label", {
528
- className: "block text-sm font-medium text-text-primary mb-2",
529
- children: ["Rating ", /* @__PURE__ */ _("span", {
530
- className: "text-status-error-text",
531
- children: "*"
532
- })]
533
- }), /* @__PURE__ */ _(w, {
534
- value: k.rating,
535
- onChange: (e) => A((t) => ({
536
- ...t,
537
- rating: e
538
- }))
539
- })] }),
540
- /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ v("label", {
541
- className: "block text-sm font-medium text-text-primary mb-1.5",
542
- children: ["Review Title ", /* @__PURE__ */ _("span", {
543
- className: "text-status-error-text",
544
- children: "*"
545
- })]
546
- }), /* @__PURE__ */ _("input", {
547
- type: "text",
548
- placeholder: "Summarize your experience",
549
- value: k.title,
550
- onChange: (e) => A((t) => ({
551
- ...t,
552
- title: e.target.value
553
- })),
554
- className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
555
- })] }),
556
- /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ v("label", {
557
- className: "block text-sm font-medium text-text-primary mb-1.5",
558
- children: ["Your Review ", /* @__PURE__ */ _("span", {
559
- className: "text-status-error-text",
560
- children: "*"
561
- })]
562
- }), /* @__PURE__ */ _("textarea", {
563
- rows: 5,
564
- placeholder: "Share your experience with others...",
565
- value: k.comment,
566
- onChange: (e) => A((t) => ({
567
- ...t,
568
- comment: e.target.value
569
- })),
570
- className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] resize-none"
571
- })] }),
572
- /* @__PURE__ */ v("div", {
573
- className: "rounded-lg bg-bg-sunken p-4",
574
- children: [/* @__PURE__ */ v("div", {
575
- className: "flex items-center gap-2 mb-2",
576
- children: [/* @__PURE__ */ _(l, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ _("h4", {
577
- className: "text-sm font-medium text-text-primary",
578
- children: "Review Guidelines"
579
- })]
580
- }), /* @__PURE__ */ v("ul", {
581
- className: "text-xs text-text-secondary space-y-1",
582
- children: [
583
- /* @__PURE__ */ _("li", { children: "- Be honest and helpful to other customers" }),
584
- /* @__PURE__ */ _("li", { children: "- Focus on your experience with the food and service" }),
585
- /* @__PURE__ */ _("li", { children: "- Avoid personal information or inappropriate content" }),
586
- /* @__PURE__ */ _("li", { children: "- Reviews are public and cannot be deleted once submitted" })
587
- ]
588
- })]
589
- })
590
- ]
591
- }),
592
- /* @__PURE__ */ v("div", {
593
- className: "flex items-center gap-3 pt-5",
594
- children: [/* @__PURE__ */ _("button", {
595
- type: "button",
596
- onClick: z,
597
- className: "rounded-lg bg-foreground px-4 py-2 text-sm font-medium text-background hover:opacity-90 transition-opacity",
598
- children: "Submit Review"
599
- }), /* @__PURE__ */ _("button", {
600
- type: "button",
601
- onClick: () => O(!1),
602
- className: "rounded-lg border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
603
- children: "Cancel"
604
- })]
605
- })
606
- ]
607
- })
608
- })
609
- })
610
- ]
611
- });
612
- }
613
- //#endregion
614
- export { T as ReviewsPage };
615
-
616
- //# sourceMappingURL=ReviewsPage.js.map