@burdenoff/microfe-adaptercloud 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 (153) hide show
  1. package/dist/adaptercloud/AdapterCloudRoot.js +65 -121
  2. package/dist/adaptercloud/AdapterCloudRoot.js.map +1 -1
  3. package/dist/adaptercloud/AdapterCloudRoutes.js +70 -182
  4. package/dist/adaptercloud/AdapterCloudRoutes.js.map +1 -1
  5. package/dist/adaptercloud/components/DataState.js +42 -0
  6. package/dist/adaptercloud/components/DataState.js.map +1 -0
  7. package/dist/adaptercloud/components/SeverityBadge.js +12 -0
  8. package/dist/adaptercloud/components/SeverityBadge.js.map +1 -0
  9. package/dist/adaptercloud/components/StatusBadge.js +43 -44
  10. package/dist/adaptercloud/components/StatusBadge.js.map +1 -1
  11. package/dist/adaptercloud/context/AdapterCloudContext.js +22 -30
  12. package/dist/adaptercloud/context/AdapterCloudContext.js.map +1 -1
  13. package/dist/adaptercloud/hooks/useAdapterCloudApi.js +397 -194
  14. package/dist/adaptercloud/hooks/useAdapterCloudApi.js.map +1 -1
  15. package/dist/adaptercloud/index.js +1 -0
  16. package/dist/adaptercloud/pages/OverviewPage.js +334 -0
  17. package/dist/adaptercloud/pages/OverviewPage.js.map +1 -0
  18. package/dist/adaptercloud/pages/adapters/AdapterDetailPage.js +187 -0
  19. package/dist/adaptercloud/pages/adapters/AdapterDetailPage.js.map +1 -0
  20. package/dist/adaptercloud/pages/adapters/AdapterFormPage.js +278 -0
  21. package/dist/adaptercloud/pages/adapters/AdapterFormPage.js.map +1 -0
  22. package/dist/adaptercloud/pages/adapters/AdaptersListPage.js +172 -0
  23. package/dist/adaptercloud/pages/adapters/AdaptersListPage.js.map +1 -0
  24. package/dist/adaptercloud/pages/connections/ConnectionDetailPage.js +247 -0
  25. package/dist/adaptercloud/pages/connections/ConnectionDetailPage.js.map +1 -0
  26. package/dist/adaptercloud/pages/connections/ConnectionFormPage.js +271 -0
  27. package/dist/adaptercloud/pages/connections/ConnectionFormPage.js.map +1 -0
  28. package/dist/adaptercloud/pages/connections/ConnectionsListPage.js +167 -0
  29. package/dist/adaptercloud/pages/connections/ConnectionsListPage.js.map +1 -0
  30. package/dist/adaptercloud/pages/costs/CostsPage.js +169 -0
  31. package/dist/adaptercloud/pages/costs/CostsPage.js.map +1 -0
  32. package/dist/adaptercloud/pages/drift/DriftListPage.js +132 -0
  33. package/dist/adaptercloud/pages/drift/DriftListPage.js.map +1 -0
  34. package/dist/adaptercloud/pages/policies/PoliciesListPage.js +171 -0
  35. package/dist/adaptercloud/pages/policies/PoliciesListPage.js.map +1 -0
  36. package/dist/adaptercloud/pages/policies/PolicyDetailPage.js +185 -0
  37. package/dist/adaptercloud/pages/policies/PolicyDetailPage.js.map +1 -0
  38. package/dist/adaptercloud/pages/policies/PolicyFormPage.js +215 -0
  39. package/dist/adaptercloud/pages/policies/PolicyFormPage.js.map +1 -0
  40. package/dist/adaptercloud/pages/resources/ResourceDetailPage.js +207 -0
  41. package/dist/adaptercloud/pages/resources/ResourceDetailPage.js.map +1 -0
  42. package/dist/adaptercloud/pages/resources/ResourcesListPage.js +182 -0
  43. package/dist/adaptercloud/pages/resources/ResourcesListPage.js.map +1 -0
  44. package/dist/adaptercloud/pages/sync-runs/SyncRunsListPage.js +196 -0
  45. package/dist/adaptercloud/pages/sync-runs/SyncRunsListPage.js.map +1 -0
  46. package/dist/adaptercloud/pages/violations/ViolationsListPage.js +258 -0
  47. package/dist/adaptercloud/pages/violations/ViolationsListPage.js.map +1 -0
  48. package/dist/adaptercloud/store/adaptercloudStore.js +1 -7
  49. package/dist/adaptercloud/store/adaptercloudStore.js.map +1 -1
  50. package/dist/adaptercloud/utils/domain.js +105 -0
  51. package/dist/adaptercloud/utils/domain.js.map +1 -0
  52. package/dist/adaptercloud/utils/formatters.js +1 -12
  53. package/dist/adaptercloud/utils/formatters.js.map +1 -1
  54. package/dist/index.js +5 -4
  55. package/package.json +1 -1
  56. package/dist/adaptercloud/components/InvestmentCard.js +0 -98
  57. package/dist/adaptercloud/components/InvestmentCard.js.map +0 -1
  58. package/dist/adaptercloud/components/RatingDisplay.js +0 -35
  59. package/dist/adaptercloud/components/RatingDisplay.js.map +0 -1
  60. package/dist/adaptercloud/mocks/data.js +0 -1517
  61. package/dist/adaptercloud/mocks/data.js.map +0 -1
  62. package/dist/adaptercloud/mocks/users.js +0 -34
  63. package/dist/adaptercloud/mocks/users.js.map +0 -1
  64. package/dist/adaptercloud/pages/HomePage.js +0 -934
  65. package/dist/adaptercloud/pages/HomePage.js.map +0 -1
  66. package/dist/adaptercloud/pages/admin/AdminAnalyticsPage.js +0 -653
  67. package/dist/adaptercloud/pages/admin/AdminAnalyticsPage.js.map +0 -1
  68. package/dist/adaptercloud/pages/admin/AdminDashboard.js +0 -665
  69. package/dist/adaptercloud/pages/admin/AdminDashboard.js.map +0 -1
  70. package/dist/adaptercloud/pages/admin/AdminFinancialPage.js +0 -426
  71. package/dist/adaptercloud/pages/admin/AdminFinancialPage.js.map +0 -1
  72. package/dist/adaptercloud/pages/admin/AdminOrdersPage.js +0 -665
  73. package/dist/adaptercloud/pages/admin/AdminOrdersPage.js.map +0 -1
  74. package/dist/adaptercloud/pages/admin/AdminProfilePage.js +0 -261
  75. package/dist/adaptercloud/pages/admin/AdminProfilePage.js.map +0 -1
  76. package/dist/adaptercloud/pages/admin/AdminSettingsPage.js +0 -663
  77. package/dist/adaptercloud/pages/admin/AdminSettingsPage.js.map +0 -1
  78. package/dist/adaptercloud/pages/admin/CartManagementPage.js +0 -874
  79. package/dist/adaptercloud/pages/admin/CartManagementPage.js.map +0 -1
  80. package/dist/adaptercloud/pages/admin/UserManagementPage.js +0 -898
  81. package/dist/adaptercloud/pages/admin/UserManagementPage.js.map +0 -1
  82. package/dist/adaptercloud/pages/cart-owner/AnalyticsDashboard.js +0 -840
  83. package/dist/adaptercloud/pages/cart-owner/AnalyticsDashboard.js.map +0 -1
  84. package/dist/adaptercloud/pages/cart-owner/BusinessSettingsPage.js +0 -714
  85. package/dist/adaptercloud/pages/cart-owner/BusinessSettingsPage.js.map +0 -1
  86. package/dist/adaptercloud/pages/cart-owner/CartOwnerDashboard.js +0 -788
  87. package/dist/adaptercloud/pages/cart-owner/CartOwnerDashboard.js.map +0 -1
  88. package/dist/adaptercloud/pages/cart-owner/CartOwnerProfilePage.js +0 -888
  89. package/dist/adaptercloud/pages/cart-owner/CartOwnerProfilePage.js.map +0 -1
  90. package/dist/adaptercloud/pages/cart-owner/CartServiceConfigPage.js +0 -634
  91. package/dist/adaptercloud/pages/cart-owner/CartServiceConfigPage.js.map +0 -1
  92. package/dist/adaptercloud/pages/cart-owner/InventoryManagementPage.js +0 -907
  93. package/dist/adaptercloud/pages/cart-owner/InventoryManagementPage.js.map +0 -1
  94. package/dist/adaptercloud/pages/cart-owner/OrderManagementPage.js +0 -875
  95. package/dist/adaptercloud/pages/cart-owner/OrderManagementPage.js.map +0 -1
  96. package/dist/adaptercloud/pages/cart-owner/StaffManagementPage.js +0 -827
  97. package/dist/adaptercloud/pages/cart-owner/StaffManagementPage.js.map +0 -1
  98. package/dist/adaptercloud/pages/common/HelpSupportPage.js +0 -1329
  99. package/dist/adaptercloud/pages/common/HelpSupportPage.js.map +0 -1
  100. package/dist/adaptercloud/pages/common/NotificationCenterPage.js +0 -671
  101. package/dist/adaptercloud/pages/common/NotificationCenterPage.js.map +0 -1
  102. package/dist/adaptercloud/pages/common/SettingsPage.js +0 -982
  103. package/dist/adaptercloud/pages/common/SettingsPage.js.map +0 -1
  104. package/dist/adaptercloud/pages/customer/BookingDetailsPage.js +0 -596
  105. package/dist/adaptercloud/pages/customer/BookingDetailsPage.js.map +0 -1
  106. package/dist/adaptercloud/pages/customer/CartDetailPage.js +0 -623
  107. package/dist/adaptercloud/pages/customer/CartDetailPage.js.map +0 -1
  108. package/dist/adaptercloud/pages/customer/CartDiscoveryPage.js +0 -552
  109. package/dist/adaptercloud/pages/customer/CartDiscoveryPage.js.map +0 -1
  110. package/dist/adaptercloud/pages/customer/CheckoutPage.js +0 -534
  111. package/dist/adaptercloud/pages/customer/CheckoutPage.js.map +0 -1
  112. package/dist/adaptercloud/pages/customer/CustomerDashboard.js +0 -525
  113. package/dist/adaptercloud/pages/customer/CustomerDashboard.js.map +0 -1
  114. package/dist/adaptercloud/pages/customer/CustomerProfilePage.js +0 -623
  115. package/dist/adaptercloud/pages/customer/CustomerProfilePage.js.map +0 -1
  116. package/dist/adaptercloud/pages/customer/DirectServiceBookingPage.js +0 -629
  117. package/dist/adaptercloud/pages/customer/DirectServiceBookingPage.js.map +0 -1
  118. package/dist/adaptercloud/pages/customer/FavoritesPage.js +0 -480
  119. package/dist/adaptercloud/pages/customer/FavoritesPage.js.map +0 -1
  120. package/dist/adaptercloud/pages/customer/OrderHistoryPage.js +0 -444
  121. package/dist/adaptercloud/pages/customer/OrderHistoryPage.js.map +0 -1
  122. package/dist/adaptercloud/pages/customer/OrderTrackingPage.js +0 -391
  123. package/dist/adaptercloud/pages/customer/OrderTrackingPage.js.map +0 -1
  124. package/dist/adaptercloud/pages/customer/PaymentMethodsPage.js +0 -504
  125. package/dist/adaptercloud/pages/customer/PaymentMethodsPage.js.map +0 -1
  126. package/dist/adaptercloud/pages/customer/ReviewsPage.js +0 -609
  127. package/dist/adaptercloud/pages/customer/ReviewsPage.js.map +0 -1
  128. package/dist/adaptercloud/pages/customer/SavedAddressesPage.js +0 -459
  129. package/dist/adaptercloud/pages/customer/SavedAddressesPage.js.map +0 -1
  130. package/dist/adaptercloud/pages/investor/InvestmentDetailsPage.js +0 -851
  131. package/dist/adaptercloud/pages/investor/InvestmentDetailsPage.js.map +0 -1
  132. package/dist/adaptercloud/pages/investor/InvestmentOpportunitiesPage.js +0 -942
  133. package/dist/adaptercloud/pages/investor/InvestmentOpportunitiesPage.js.map +0 -1
  134. package/dist/adaptercloud/pages/investor/InvestorAnalyticsPage.js +0 -683
  135. package/dist/adaptercloud/pages/investor/InvestorAnalyticsPage.js.map +0 -1
  136. package/dist/adaptercloud/pages/investor/InvestorDashboard.js +0 -452
  137. package/dist/adaptercloud/pages/investor/InvestorDashboard.js.map +0 -1
  138. package/dist/adaptercloud/pages/investor/InvestorInvestmentsPage.js +0 -402
  139. package/dist/adaptercloud/pages/investor/InvestorInvestmentsPage.js.map +0 -1
  140. package/dist/adaptercloud/pages/investor/InvestorPortfolioPage.js +0 -571
  141. package/dist/adaptercloud/pages/investor/InvestorPortfolioPage.js.map +0 -1
  142. package/dist/adaptercloud/pages/investor/InvestorProfilePage.js +0 -1067
  143. package/dist/adaptercloud/pages/investor/InvestorProfilePage.js.map +0 -1
  144. package/dist/adaptercloud/pages/worker/TaskDetailsPage.js +0 -526
  145. package/dist/adaptercloud/pages/worker/TaskDetailsPage.js.map +0 -1
  146. package/dist/adaptercloud/pages/worker/WorkerDashboard.js +0 -659
  147. package/dist/adaptercloud/pages/worker/WorkerDashboard.js.map +0 -1
  148. package/dist/adaptercloud/pages/worker/WorkerOrdersPage.js +0 -678
  149. package/dist/adaptercloud/pages/worker/WorkerOrdersPage.js.map +0 -1
  150. package/dist/adaptercloud/pages/worker/WorkerProfilePage.js +0 -689
  151. package/dist/adaptercloud/pages/worker/WorkerProfilePage.js.map +0 -1
  152. package/dist/adaptercloud/pages/worker/WorkerSchedulePage.js +0 -582
  153. package/dist/adaptercloud/pages/worker/WorkerSchedulePage.js.map +0 -1
@@ -1,609 +0,0 @@
1
- import { useAdapterCloud as e } from "../../context/AdapterCloudContext.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 } from "@burdenoff/fe-libs/ui";
11
- //#region src/adaptercloud/pages/customer/ReviewsPage.tsx
12
- var b = "user-001", x = {
13
- 1: "Terrible",
14
- 2: "Poor",
15
- 3: "Average",
16
- 4: "Good",
17
- 5: "Excellent"
18
- }, S = [
19
- {
20
- id: "review-001",
21
- userId: b,
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: b,
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 C({ 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: x[a] ?? ""
149
- })]
150
- });
151
- }
152
- function w() {
153
- let { navigateTo: x } = e(), [w, T] = s(S), [E, D] = s(!1), [O, k] = s({
154
- rating: 5,
155
- title: "",
156
- comment: ""
157
- }), [A, j] = s({
158
- searchQuery: "",
159
- type: "all",
160
- rating: "",
161
- sortBy: "recent"
162
- }), [M, N] = s(null), P = (e) => {
163
- N(e), setTimeout(() => N(null), 3e3);
164
- }, F = o(() => {
165
- let e = [...w];
166
- if (A.type === "my-reviews" ? e = e.filter((e) => e.userId === b) : A.type !== "all" && (e = e.filter((e) => e.itemType === A.type)), A.rating) {
167
- let t = parseInt(A.rating, 10);
168
- e = e.filter((e) => e.rating === t);
169
- }
170
- if (A.searchQuery) {
171
- let t = A.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 (A.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
- }, [w, A])(), I = w.filter((e) => e.userId === b).length, L = w.length > 0 ? (w.reduce((e, t) => e + t.rating, 0) / w.length).toFixed(1) : "0", R = () => {
190
- if (!O.title.trim() || !O.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: b,
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: O.rating,
206
- title: O.title,
207
- comment: O.comment,
208
- helpfulCount: 0,
209
- isHelpful: !1,
210
- isVerified: !0,
211
- createdAt: (/* @__PURE__ */ new Date()).toISOString()
212
- };
213
- T((t) => [e, ...t]), k({
214
- rating: 5,
215
- title: "",
216
- comment: ""
217
- }), D(!1), P("Review submitted successfully!");
218
- }, z = (e) => {
219
- T((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: `${F.length} reviews found`,
228
- purpose: "The feedback you've left for carts you've ordered from. Revisit and edit your reviews, and rate recent orders that are still waiting for one — your ratings help other customers and reward great carts.",
229
- actions: /* @__PURE__ */ v("button", {
230
- type: "button",
231
- onClick: () => D(!0),
232
- 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"),
233
- children: [/* @__PURE__ */ _(f, { className: "h-4 w-4" }), "Write Review"]
234
- }),
235
- children: [
236
- M && /* @__PURE__ */ v("div", {
237
- className: "mb-4 rounded-lg border border-status-success-border/30 bg-status-success-bg-subtle/10 p-3 flex items-center gap-2",
238
- children: [/* @__PURE__ */ _(c, { className: "h-4 w-4 text-status-success-text shrink-0" }), /* @__PURE__ */ _("p", {
239
- className: "text-sm text-status-success-text",
240
- children: M
241
- })]
242
- }),
243
- /* @__PURE__ */ v(y, {
244
- className: "mb-6 flex flex-wrap items-center gap-4 text-sm text-text-secondary py-4",
245
- children: [
246
- /* @__PURE__ */ v("span", { children: [w.length, " total reviews"] }),
247
- /* @__PURE__ */ v("span", { children: [I, " your reviews"] }),
248
- /* @__PURE__ */ v("span", {
249
- className: "flex items-center gap-1",
250
- children: [
251
- "Average: ",
252
- L,
253
- /* @__PURE__ */ _(m, { className: "h-3.5 w-3.5 fill-status-warning-text text-status-warning-text" })
254
- ]
255
- })
256
- ]
257
- }),
258
- /* @__PURE__ */ _("div", {
259
- className: "rounded-lg border border-border-seam bg-bg-surface p-4 mb-6 bg-gloss-card shadow-pop",
260
- children: /* @__PURE__ */ v("div", {
261
- className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-3",
262
- children: [
263
- /* @__PURE__ */ v("div", {
264
- className: "relative",
265
- children: [/* @__PURE__ */ _(p, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-text-secondary" }), /* @__PURE__ */ _("input", {
266
- type: "text",
267
- placeholder: "Search reviews...",
268
- value: A.searchQuery,
269
- onChange: (e) => j((t) => ({
270
- ...t,
271
- searchQuery: e.target.value
272
- })),
273
- 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)]"
274
- })]
275
- }),
276
- /* @__PURE__ */ v("select", {
277
- value: A.type,
278
- onChange: (e) => j((t) => ({
279
- ...t,
280
- type: e.target.value
281
- })),
282
- 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)]",
283
- children: [
284
- /* @__PURE__ */ _("option", {
285
- value: "all",
286
- children: "All Reviews"
287
- }),
288
- /* @__PURE__ */ _("option", {
289
- value: "cart",
290
- children: "Cart Reviews"
291
- }),
292
- /* @__PURE__ */ _("option", {
293
- value: "product",
294
- children: "Product Reviews"
295
- }),
296
- /* @__PURE__ */ _("option", {
297
- value: "my-reviews",
298
- children: "My Reviews"
299
- })
300
- ]
301
- }),
302
- /* @__PURE__ */ v("select", {
303
- value: A.rating,
304
- onChange: (e) => j((t) => ({
305
- ...t,
306
- rating: e.target.value
307
- })),
308
- 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)]",
309
- children: [
310
- /* @__PURE__ */ _("option", {
311
- value: "",
312
- children: "All Ratings"
313
- }),
314
- /* @__PURE__ */ _("option", {
315
- value: "5",
316
- children: "5 Stars"
317
- }),
318
- /* @__PURE__ */ _("option", {
319
- value: "4",
320
- children: "4 Stars"
321
- }),
322
- /* @__PURE__ */ _("option", {
323
- value: "3",
324
- children: "3 Stars"
325
- }),
326
- /* @__PURE__ */ _("option", {
327
- value: "2",
328
- children: "2 Stars"
329
- }),
330
- /* @__PURE__ */ _("option", {
331
- value: "1",
332
- children: "1 Star"
333
- })
334
- ]
335
- }),
336
- /* @__PURE__ */ v("select", {
337
- value: A.sortBy,
338
- onChange: (e) => j((t) => ({
339
- ...t,
340
- sortBy: e.target.value
341
- })),
342
- 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)]",
343
- children: [
344
- /* @__PURE__ */ _("option", {
345
- value: "recent",
346
- children: "Most Recent"
347
- }),
348
- /* @__PURE__ */ _("option", {
349
- value: "helpful",
350
- children: "Most Helpful"
351
- }),
352
- /* @__PURE__ */ _("option", {
353
- value: "rating-high",
354
- children: "Highest Rating"
355
- }),
356
- /* @__PURE__ */ _("option", {
357
- value: "rating-low",
358
- children: "Lowest Rating"
359
- })
360
- ]
361
- })
362
- ]
363
- })
364
- }),
365
- F.length === 0 ? /* @__PURE__ */ _(r, {
366
- illustration: "empty-data",
367
- icon: /* @__PURE__ */ _(d, { className: "h-12 w-12" }),
368
- title: "No reviews found",
369
- description: "Be the first to write a review!",
370
- action: /* @__PURE__ */ _("button", {
371
- type: "button",
372
- onClick: () => D(!0),
373
- className: "rounded-lg bg-foreground px-4 py-2 text-sm font-medium text-background hover:opacity-90 transition-opacity",
374
- children: "Write a Review"
375
- })
376
- }) : /* @__PURE__ */ _("div", {
377
- className: "space-y-4",
378
- children: F.map((e) => {
379
- let n = e.userId === b;
380
- return /* @__PURE__ */ v("div", {
381
- className: t("rounded-lg border bg-bg-surface p-5", n ? "border-foreground/20" : "border-border-subtle"),
382
- children: [
383
- /* @__PURE__ */ v("div", {
384
- className: "flex items-start gap-3 mb-3",
385
- children: [
386
- /* @__PURE__ */ _("img", {
387
- src: e.userAvatar,
388
- alt: e.userName,
389
- className: "h-10 w-10 rounded-full object-cover shrink-0"
390
- }),
391
- /* @__PURE__ */ v("div", {
392
- className: "flex-1 min-w-0",
393
- children: [/* @__PURE__ */ v("div", {
394
- className: "flex items-center gap-2 flex-wrap",
395
- children: [
396
- /* @__PURE__ */ _("span", {
397
- className: "text-sm font-semibold text-text-primary",
398
- children: e.userName
399
- }),
400
- e.isVerified && /* @__PURE__ */ v("span", {
401
- 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",
402
- children: [/* @__PURE__ */ _(c, { className: "h-3 w-3" }), "Verified"]
403
- }),
404
- n && /* @__PURE__ */ _("span", {
405
- className: "inline-flex items-center rounded-full bg-accent-blue-subtle/10 px-2 py-0.5 text-[10px] font-medium text-accent-blue",
406
- children: "Your Review"
407
- })
408
- ]
409
- }), /* @__PURE__ */ v("div", {
410
- className: "flex flex-wrap items-center gap-2 text-xs text-text-secondary mt-0.5",
411
- 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, {
412
- hour: void 0,
413
- minute: void 0,
414
- hour12: void 0
415
- }) })]
416
- })]
417
- }),
418
- /* @__PURE__ */ v("div", {
419
- className: "shrink-0",
420
- children: [/* @__PURE__ */ _(a, {
421
- value: e.rating,
422
- size: "sm"
423
- }), /* @__PURE__ */ v("p", {
424
- className: "text-xs text-text-secondary mt-0.5 text-right",
425
- children: ["From: ", e.cartName]
426
- })]
427
- })
428
- ]
429
- }),
430
- /* @__PURE__ */ v("div", {
431
- className: "mb-3",
432
- children: [/* @__PURE__ */ _("h4", {
433
- className: "text-sm font-semibold text-text-primary mb-1",
434
- children: e.title
435
- }), /* @__PURE__ */ _("p", {
436
- className: "text-sm text-text-primary leading-relaxed",
437
- children: e.comment
438
- })]
439
- }),
440
- e.images && e.images.length > 0 && /* @__PURE__ */ _("div", {
441
- className: "mb-3 flex gap-2 overflow-x-auto pb-1",
442
- children: e.images.map((e, t) => /* @__PURE__ */ _("img", {
443
- src: e,
444
- alt: `Review image ${t + 1}`,
445
- className: "h-20 w-20 rounded-lg object-cover shrink-0"
446
- }, t))
447
- }),
448
- e.response && /* @__PURE__ */ v("div", {
449
- className: "mb-3 rounded-lg border border-accent-blue-subtle/20 bg-accent-blue-subtle/5 p-3",
450
- children: [/* @__PURE__ */ v("div", {
451
- className: "flex flex-wrap items-center gap-2 mb-1.5",
452
- children: [
453
- /* @__PURE__ */ _(u, { className: "h-3.5 w-3.5 text-accent-blue" }),
454
- /* @__PURE__ */ v("span", {
455
- className: "text-xs font-medium text-accent-blue",
456
- children: ["Response from ", e.response.respondedBy]
457
- }),
458
- /* @__PURE__ */ _("span", {
459
- className: "text-[10px] text-accent-blue",
460
- children: i(e.response.respondedAt, {
461
- hour: void 0,
462
- minute: void 0,
463
- hour12: void 0
464
- })
465
- })
466
- ]
467
- }), /* @__PURE__ */ _("p", {
468
- className: "text-xs text-accent-blue leading-relaxed",
469
- children: e.response.message
470
- })]
471
- }),
472
- /* @__PURE__ */ v("div", {
473
- className: "flex items-center justify-between pt-3 border-t border-border-subtle",
474
- children: [/* @__PURE__ */ v("button", {
475
- type: "button",
476
- onClick: () => z(e.id),
477
- 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"),
478
- children: [
479
- /* @__PURE__ */ _(h, { className: t("h-3.5 w-3.5", e.isHelpful && "fill-current") }),
480
- "Helpful (",
481
- e.helpfulCount,
482
- ")"
483
- ]
484
- }), /* @__PURE__ */ v("div", {
485
- className: "flex items-center gap-3 text-xs text-text-secondary",
486
- children: [/* @__PURE__ */ v("span", { children: ["Order: ", e.orderId] }), /* @__PURE__ */ _("button", {
487
- type: "button",
488
- onClick: () => x(`/customer/carts/${e.cartId}`),
489
- className: "font-medium hover:text-text-primary transition-colors",
490
- children: "View Cart"
491
- })]
492
- })]
493
- })
494
- ]
495
- }, e.id);
496
- })
497
- }),
498
- E && /* @__PURE__ */ _("div", {
499
- className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",
500
- children: /* @__PURE__ */ _("div", {
501
- className: "w-full max-w-2xl max-h-[90vh] overflow-y-auto rounded-lg border border-border-subtle bg-bg-surface shadow-lg",
502
- children: /* @__PURE__ */ v("div", {
503
- className: "p-5",
504
- children: [
505
- /* @__PURE__ */ v("div", {
506
- className: "flex items-center justify-between mb-5",
507
- children: [/* @__PURE__ */ _("h3", {
508
- className: "text-lg font-semibold text-text-primary",
509
- children: "Write a Review"
510
- }), /* @__PURE__ */ _("button", {
511
- type: "button",
512
- onClick: () => D(!1),
513
- className: "rounded-md p-2 text-text-secondary hover:bg-accent hover:text-text-primary transition-colors",
514
- children: /* @__PURE__ */ _(g, { className: "h-4 w-4" })
515
- })]
516
- }),
517
- /* @__PURE__ */ v("div", {
518
- className: "space-y-4",
519
- children: [
520
- /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ v("label", {
521
- className: "block text-sm font-medium text-text-primary mb-2",
522
- children: ["Rating ", /* @__PURE__ */ _("span", {
523
- className: "text-status-error-text",
524
- children: "*"
525
- })]
526
- }), /* @__PURE__ */ _(C, {
527
- value: O.rating,
528
- onChange: (e) => k((t) => ({
529
- ...t,
530
- rating: e
531
- }))
532
- })] }),
533
- /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ v("label", {
534
- className: "block text-sm font-medium text-text-primary mb-1.5",
535
- children: ["Review Title ", /* @__PURE__ */ _("span", {
536
- className: "text-status-error-text",
537
- children: "*"
538
- })]
539
- }), /* @__PURE__ */ _("input", {
540
- type: "text",
541
- placeholder: "Summarize your experience",
542
- value: O.title,
543
- onChange: (e) => k((t) => ({
544
- ...t,
545
- title: e.target.value
546
- })),
547
- 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)]"
548
- })] }),
549
- /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ v("label", {
550
- className: "block text-sm font-medium text-text-primary mb-1.5",
551
- children: ["Your Review ", /* @__PURE__ */ _("span", {
552
- className: "text-status-error-text",
553
- children: "*"
554
- })]
555
- }), /* @__PURE__ */ _("textarea", {
556
- rows: 5,
557
- placeholder: "Share your experience with others...",
558
- value: O.comment,
559
- onChange: (e) => k((t) => ({
560
- ...t,
561
- comment: e.target.value
562
- })),
563
- 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"
564
- })] }),
565
- /* @__PURE__ */ v("div", {
566
- className: "rounded-lg bg-bg-sunken p-4",
567
- children: [/* @__PURE__ */ v("div", {
568
- className: "flex items-center gap-2 mb-2",
569
- children: [/* @__PURE__ */ _(l, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ _("h4", {
570
- className: "text-sm font-medium text-text-primary",
571
- children: "Review Guidelines"
572
- })]
573
- }), /* @__PURE__ */ v("ul", {
574
- className: "text-xs text-text-secondary space-y-1",
575
- children: [
576
- /* @__PURE__ */ _("li", { children: "- Be honest and helpful to other customers" }),
577
- /* @__PURE__ */ _("li", { children: "- Focus on your experience with the food and service" }),
578
- /* @__PURE__ */ _("li", { children: "- Avoid personal information or inappropriate content" }),
579
- /* @__PURE__ */ _("li", { children: "- Reviews are public and cannot be deleted once submitted" })
580
- ]
581
- })]
582
- })
583
- ]
584
- }),
585
- /* @__PURE__ */ v("div", {
586
- className: "flex items-center gap-3 pt-5",
587
- children: [/* @__PURE__ */ _("button", {
588
- type: "button",
589
- onClick: R,
590
- className: "rounded-lg bg-foreground px-4 py-2 text-sm font-medium text-background hover:opacity-90 transition-opacity",
591
- children: "Submit Review"
592
- }), /* @__PURE__ */ _("button", {
593
- type: "button",
594
- onClick: () => D(!1),
595
- className: "rounded-lg border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
596
- children: "Cancel"
597
- })]
598
- })
599
- ]
600
- })
601
- })
602
- })
603
- ]
604
- });
605
- }
606
- //#endregion
607
- export { w as ReviewsPage };
608
-
609
- //# sourceMappingURL=ReviewsPage.js.map