@burdenoff/microfe-labsofscience 2026.626.1 → 2026.628.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (172) hide show
  1. package/dist/index.js +4 -4
  2. package/dist/labsofscience/LabsOfScienceRoot.js +68 -124
  3. package/dist/labsofscience/LabsOfScienceRoot.js.map +1 -1
  4. package/dist/labsofscience/LabsOfScienceRoutes.js +61 -185
  5. package/dist/labsofscience/LabsOfScienceRoutes.js.map +1 -1
  6. package/dist/labsofscience/components/QueryStates.js +40 -0
  7. package/dist/labsofscience/components/QueryStates.js.map +1 -0
  8. package/dist/labsofscience/components/StatusBadge.js +40 -23
  9. package/dist/labsofscience/components/StatusBadge.js.map +1 -1
  10. package/dist/labsofscience/context/LabsOfScienceContext.js +22 -30
  11. package/dist/labsofscience/context/LabsOfScienceContext.js.map +1 -1
  12. package/dist/labsofscience/hooks/useLabsOfScienceApi.js +500 -172
  13. package/dist/labsofscience/hooks/useLabsOfScienceApi.js.map +1 -1
  14. package/dist/labsofscience/pages/OverviewPage.js +195 -0
  15. package/dist/labsofscience/pages/OverviewPage.js.map +1 -0
  16. package/dist/labsofscience/pages/datasets/DatasetDetailPage.js +162 -0
  17. package/dist/labsofscience/pages/datasets/DatasetDetailPage.js.map +1 -0
  18. package/dist/labsofscience/pages/datasets/DatasetFormDialog.js +137 -0
  19. package/dist/labsofscience/pages/datasets/DatasetFormDialog.js.map +1 -0
  20. package/dist/labsofscience/pages/datasets/DatasetsListPage.js +155 -0
  21. package/dist/labsofscience/pages/datasets/DatasetsListPage.js.map +1 -0
  22. package/dist/labsofscience/pages/experiments/ExperimentDetailPage.js +220 -0
  23. package/dist/labsofscience/pages/experiments/ExperimentDetailPage.js.map +1 -0
  24. package/dist/labsofscience/pages/experiments/ExperimentFormDialog.js +170 -0
  25. package/dist/labsofscience/pages/experiments/ExperimentFormDialog.js.map +1 -0
  26. package/dist/labsofscience/pages/experiments/ExperimentsListPage.js +134 -0
  27. package/dist/labsofscience/pages/experiments/ExperimentsListPage.js.map +1 -0
  28. package/dist/labsofscience/pages/experiments/RunDialogs.js +180 -0
  29. package/dist/labsofscience/pages/experiments/RunDialogs.js.map +1 -0
  30. package/dist/labsofscience/pages/instruments/InstrumentDetailPage.js +130 -0
  31. package/dist/labsofscience/pages/instruments/InstrumentDetailPage.js.map +1 -0
  32. package/dist/labsofscience/pages/instruments/InstrumentFormDialog.js +132 -0
  33. package/dist/labsofscience/pages/instruments/InstrumentFormDialog.js.map +1 -0
  34. package/dist/labsofscience/pages/instruments/InstrumentsListPage.js +126 -0
  35. package/dist/labsofscience/pages/instruments/InstrumentsListPage.js.map +1 -0
  36. package/dist/labsofscience/pages/inventory/AdjustInventoryDialog.js +89 -0
  37. package/dist/labsofscience/pages/inventory/AdjustInventoryDialog.js.map +1 -0
  38. package/dist/labsofscience/pages/inventory/InventoryDetailPage.js +138 -0
  39. package/dist/labsofscience/pages/inventory/InventoryDetailPage.js.map +1 -0
  40. package/dist/labsofscience/pages/inventory/InventoryFormDialog.js +211 -0
  41. package/dist/labsofscience/pages/inventory/InventoryFormDialog.js.map +1 -0
  42. package/dist/labsofscience/pages/inventory/InventoryListPage.js +178 -0
  43. package/dist/labsofscience/pages/inventory/InventoryListPage.js.map +1 -0
  44. package/dist/labsofscience/pages/notebook/NotebookEntryFormDialog.js +118 -0
  45. package/dist/labsofscience/pages/notebook/NotebookEntryFormDialog.js.map +1 -0
  46. package/dist/labsofscience/pages/notebook/NotebookListPage.js +144 -0
  47. package/dist/labsofscience/pages/notebook/NotebookListPage.js.map +1 -0
  48. package/dist/labsofscience/pages/pipelines/PipelineFormDialog.js +146 -0
  49. package/dist/labsofscience/pages/pipelines/PipelineFormDialog.js.map +1 -0
  50. package/dist/labsofscience/pages/pipelines/PipelinesPage.js +212 -0
  51. package/dist/labsofscience/pages/pipelines/PipelinesPage.js.map +1 -0
  52. package/dist/labsofscience/pages/pipelines/RunPipelineDialog.js +109 -0
  53. package/dist/labsofscience/pages/pipelines/RunPipelineDialog.js.map +1 -0
  54. package/dist/labsofscience/pages/projects/ProjectDetailPage.js +174 -0
  55. package/dist/labsofscience/pages/projects/ProjectDetailPage.js.map +1 -0
  56. package/dist/labsofscience/pages/projects/ProjectFormDialog.js +169 -0
  57. package/dist/labsofscience/pages/projects/ProjectFormDialog.js.map +1 -0
  58. package/dist/labsofscience/pages/projects/ProjectsListPage.js +141 -0
  59. package/dist/labsofscience/pages/projects/ProjectsListPage.js.map +1 -0
  60. package/dist/labsofscience/pages/protocols/ProtocolDetailPage.js +133 -0
  61. package/dist/labsofscience/pages/protocols/ProtocolDetailPage.js.map +1 -0
  62. package/dist/labsofscience/pages/protocols/ProtocolFormDialog.js +151 -0
  63. package/dist/labsofscience/pages/protocols/ProtocolFormDialog.js.map +1 -0
  64. package/dist/labsofscience/pages/protocols/ProtocolsListPage.js +140 -0
  65. package/dist/labsofscience/pages/protocols/ProtocolsListPage.js.map +1 -0
  66. package/dist/labsofscience/pages/shared/DetailComponents.js +64 -0
  67. package/dist/labsofscience/pages/shared/DetailComponents.js.map +1 -0
  68. package/dist/labsofscience/pages/shared/tags.js +16 -0
  69. package/dist/labsofscience/pages/shared/tags.js.map +1 -0
  70. package/dist/labsofscience/store/labsofscienceStore.js +6 -11
  71. package/dist/labsofscience/store/labsofscienceStore.js.map +1 -1
  72. package/dist/labsofscience/utils/formatters.js +28 -13
  73. package/dist/labsofscience/utils/formatters.js.map +1 -1
  74. package/package.json +1 -1
  75. package/dist/labsofscience/components/InvestmentCard.js +0 -98
  76. package/dist/labsofscience/components/InvestmentCard.js.map +0 -1
  77. package/dist/labsofscience/components/RatingDisplay.js +0 -35
  78. package/dist/labsofscience/components/RatingDisplay.js.map +0 -1
  79. package/dist/labsofscience/mocks/data.js +0 -1517
  80. package/dist/labsofscience/mocks/data.js.map +0 -1
  81. package/dist/labsofscience/mocks/users.js +0 -34
  82. package/dist/labsofscience/mocks/users.js.map +0 -1
  83. package/dist/labsofscience/pages/HomePage.js +0 -940
  84. package/dist/labsofscience/pages/HomePage.js.map +0 -1
  85. package/dist/labsofscience/pages/admin/AdminAnalyticsPage.js +0 -651
  86. package/dist/labsofscience/pages/admin/AdminAnalyticsPage.js.map +0 -1
  87. package/dist/labsofscience/pages/admin/AdminDashboard.js +0 -672
  88. package/dist/labsofscience/pages/admin/AdminDashboard.js.map +0 -1
  89. package/dist/labsofscience/pages/admin/AdminFinancialPage.js +0 -427
  90. package/dist/labsofscience/pages/admin/AdminFinancialPage.js.map +0 -1
  91. package/dist/labsofscience/pages/admin/AdminOrdersPage.js +0 -665
  92. package/dist/labsofscience/pages/admin/AdminOrdersPage.js.map +0 -1
  93. package/dist/labsofscience/pages/admin/AdminProfilePage.js +0 -261
  94. package/dist/labsofscience/pages/admin/AdminProfilePage.js.map +0 -1
  95. package/dist/labsofscience/pages/admin/AdminSettingsPage.js +0 -651
  96. package/dist/labsofscience/pages/admin/AdminSettingsPage.js.map +0 -1
  97. package/dist/labsofscience/pages/admin/CartManagementPage.js +0 -874
  98. package/dist/labsofscience/pages/admin/CartManagementPage.js.map +0 -1
  99. package/dist/labsofscience/pages/admin/UserManagementPage.js +0 -898
  100. package/dist/labsofscience/pages/admin/UserManagementPage.js.map +0 -1
  101. package/dist/labsofscience/pages/cart-owner/AnalyticsDashboard.js +0 -839
  102. package/dist/labsofscience/pages/cart-owner/AnalyticsDashboard.js.map +0 -1
  103. package/dist/labsofscience/pages/cart-owner/BusinessSettingsPage.js +0 -705
  104. package/dist/labsofscience/pages/cart-owner/BusinessSettingsPage.js.map +0 -1
  105. package/dist/labsofscience/pages/cart-owner/CartOwnerDashboard.js +0 -791
  106. package/dist/labsofscience/pages/cart-owner/CartOwnerDashboard.js.map +0 -1
  107. package/dist/labsofscience/pages/cart-owner/CartOwnerProfilePage.js +0 -891
  108. package/dist/labsofscience/pages/cart-owner/CartOwnerProfilePage.js.map +0 -1
  109. package/dist/labsofscience/pages/cart-owner/CartServiceConfigPage.js +0 -636
  110. package/dist/labsofscience/pages/cart-owner/CartServiceConfigPage.js.map +0 -1
  111. package/dist/labsofscience/pages/cart-owner/InventoryManagementPage.js +0 -911
  112. package/dist/labsofscience/pages/cart-owner/InventoryManagementPage.js.map +0 -1
  113. package/dist/labsofscience/pages/cart-owner/OrderManagementPage.js +0 -879
  114. package/dist/labsofscience/pages/cart-owner/OrderManagementPage.js.map +0 -1
  115. package/dist/labsofscience/pages/cart-owner/StaffManagementPage.js +0 -839
  116. package/dist/labsofscience/pages/cart-owner/StaffManagementPage.js.map +0 -1
  117. package/dist/labsofscience/pages/common/HelpSupportPage.js +0 -1324
  118. package/dist/labsofscience/pages/common/HelpSupportPage.js.map +0 -1
  119. package/dist/labsofscience/pages/common/NotificationCenterPage.js +0 -672
  120. package/dist/labsofscience/pages/common/NotificationCenterPage.js.map +0 -1
  121. package/dist/labsofscience/pages/common/SettingsPage.js +0 -973
  122. package/dist/labsofscience/pages/common/SettingsPage.js.map +0 -1
  123. package/dist/labsofscience/pages/customer/BookingDetailsPage.js +0 -637
  124. package/dist/labsofscience/pages/customer/BookingDetailsPage.js.map +0 -1
  125. package/dist/labsofscience/pages/customer/CartDetailPage.js +0 -653
  126. package/dist/labsofscience/pages/customer/CartDetailPage.js.map +0 -1
  127. package/dist/labsofscience/pages/customer/CartDiscoveryPage.js +0 -559
  128. package/dist/labsofscience/pages/customer/CartDiscoveryPage.js.map +0 -1
  129. package/dist/labsofscience/pages/customer/CheckoutPage.js +0 -530
  130. package/dist/labsofscience/pages/customer/CheckoutPage.js.map +0 -1
  131. package/dist/labsofscience/pages/customer/CustomerDashboard.js +0 -531
  132. package/dist/labsofscience/pages/customer/CustomerDashboard.js.map +0 -1
  133. package/dist/labsofscience/pages/customer/CustomerProfilePage.js +0 -658
  134. package/dist/labsofscience/pages/customer/CustomerProfilePage.js.map +0 -1
  135. package/dist/labsofscience/pages/customer/DirectServiceBookingPage.js +0 -633
  136. package/dist/labsofscience/pages/customer/DirectServiceBookingPage.js.map +0 -1
  137. package/dist/labsofscience/pages/customer/FavoritesPage.js +0 -484
  138. package/dist/labsofscience/pages/customer/FavoritesPage.js.map +0 -1
  139. package/dist/labsofscience/pages/customer/OrderHistoryPage.js +0 -445
  140. package/dist/labsofscience/pages/customer/OrderHistoryPage.js.map +0 -1
  141. package/dist/labsofscience/pages/customer/OrderTrackingPage.js +0 -425
  142. package/dist/labsofscience/pages/customer/OrderTrackingPage.js.map +0 -1
  143. package/dist/labsofscience/pages/customer/PaymentMethodsPage.js +0 -495
  144. package/dist/labsofscience/pages/customer/PaymentMethodsPage.js.map +0 -1
  145. package/dist/labsofscience/pages/customer/ReviewsPage.js +0 -613
  146. package/dist/labsofscience/pages/customer/ReviewsPage.js.map +0 -1
  147. package/dist/labsofscience/pages/customer/SavedAddressesPage.js +0 -450
  148. package/dist/labsofscience/pages/customer/SavedAddressesPage.js.map +0 -1
  149. package/dist/labsofscience/pages/investor/InvestmentDetailsPage.js +0 -881
  150. package/dist/labsofscience/pages/investor/InvestmentDetailsPage.js.map +0 -1
  151. package/dist/labsofscience/pages/investor/InvestmentOpportunitiesPage.js +0 -946
  152. package/dist/labsofscience/pages/investor/InvestmentOpportunitiesPage.js.map +0 -1
  153. package/dist/labsofscience/pages/investor/InvestorAnalyticsPage.js +0 -687
  154. package/dist/labsofscience/pages/investor/InvestorAnalyticsPage.js.map +0 -1
  155. package/dist/labsofscience/pages/investor/InvestorDashboard.js +0 -455
  156. package/dist/labsofscience/pages/investor/InvestorDashboard.js.map +0 -1
  157. package/dist/labsofscience/pages/investor/InvestorInvestmentsPage.js +0 -406
  158. package/dist/labsofscience/pages/investor/InvestorInvestmentsPage.js.map +0 -1
  159. package/dist/labsofscience/pages/investor/InvestorPortfolioPage.js +0 -575
  160. package/dist/labsofscience/pages/investor/InvestorPortfolioPage.js.map +0 -1
  161. package/dist/labsofscience/pages/investor/InvestorProfilePage.js +0 -1070
  162. package/dist/labsofscience/pages/investor/InvestorProfilePage.js.map +0 -1
  163. package/dist/labsofscience/pages/worker/TaskDetailsPage.js +0 -537
  164. package/dist/labsofscience/pages/worker/TaskDetailsPage.js.map +0 -1
  165. package/dist/labsofscience/pages/worker/WorkerDashboard.js +0 -665
  166. package/dist/labsofscience/pages/worker/WorkerDashboard.js.map +0 -1
  167. package/dist/labsofscience/pages/worker/WorkerOrdersPage.js +0 -681
  168. package/dist/labsofscience/pages/worker/WorkerOrdersPage.js.map +0 -1
  169. package/dist/labsofscience/pages/worker/WorkerProfilePage.js +0 -692
  170. package/dist/labsofscience/pages/worker/WorkerProfilePage.js.map +0 -1
  171. package/dist/labsofscience/pages/worker/WorkerSchedulePage.js +0 -588
  172. package/dist/labsofscience/pages/worker/WorkerSchedulePage.js.map +0 -1
@@ -1,658 +0,0 @@
1
- import { useLabsOfScience as e } from "../../context/LabsOfScienceContext.js";
2
- import { cn as t } from "../../utils/cn.js";
3
- import { PageLayout as n } from "../../components/PageLayout.js";
4
- import { useOrders as r } from "../../hooks/useLabsOfScienceApi.js";
5
- import { formatCurrency as i, formatDate as a } from "../../utils/formatters.js";
6
- import { useState as o } from "react";
7
- import { AlertTriangle as s, Award as ee, BarChart3 as c, Bell as l, Camera as u, CheckCircle2 as d, ChevronRight as f, Edit3 as p, Heart as m, IndianRupee as h, MapPin as g, Save as _, Settings as v, Shield as y, ShoppingBag as b, User as x, UserCircle as S, X as C } from "lucide-react";
8
- import { jsx as w, jsxs as T } from "react/jsx-runtime";
9
- import { EmphasisPanel as E, NextSteps as D, PagePurpose as O } from "@burdenoff/fe-libs/ui";
10
- //#region src/labsofscience/pages/customer/CustomerProfilePage.tsx
11
- var k = [
12
- "vegetarian",
13
- "vegan",
14
- "jain",
15
- "keto",
16
- "gluten-free",
17
- "low-carb"
18
- ], A = [
19
- "nuts",
20
- "dairy",
21
- "eggs",
22
- "soy",
23
- "shellfish",
24
- "gluten"
25
- ], j = [{
26
- id: "addr-1",
27
- label: "Home",
28
- street: "123, MG Road",
29
- area: "Near Central Mall",
30
- city: "Bangalore",
31
- state: "Karnataka",
32
- pincode: "560001",
33
- isDefault: !0
34
- }, {
35
- id: "addr-2",
36
- label: "Office",
37
- street: "456 Tech Park Road",
38
- area: "Whitefield",
39
- city: "Bangalore",
40
- state: "Karnataka",
41
- pincode: "560066",
42
- isDefault: !1
43
- }];
44
- function M() {
45
- let { navigateTo: M, currentUser: N } = e(), { data: P = [], isLoading: F } = r({ customerId: N?.id }), [I, L] = o("profile"), [R, z] = o(!1), B = {
46
- firstName: N?.firstName || N?.name?.split(" ")[0] || "Customer",
47
- lastName: N?.lastName || N?.name?.split(" ").slice(1).join(" ") || "",
48
- email: N?.email || "",
49
- phone: "+91 98765 43210",
50
- profilePicture: N?.avatar,
51
- isEmailVerified: !0,
52
- isPhoneVerified: !0,
53
- createdAt: (/* @__PURE__ */ new Date()).toISOString(),
54
- updatedAt: (/* @__PURE__ */ new Date()).toISOString()
55
- }, [V, H] = o({
56
- firstName: B.firstName,
57
- lastName: B.lastName,
58
- email: B.email,
59
- phone: B.phone,
60
- emergencyContact: {
61
- name: "Priya Sharma",
62
- phone: "+91 98765 43211",
63
- relationship: "Spouse"
64
- },
65
- dietary: ["vegetarian"],
66
- allergies: ["nuts", "dairy"],
67
- notifications: {
68
- orderUpdates: !0,
69
- promotions: !0,
70
- newsletter: !1,
71
- sms: !0
72
- }
73
- }), [U, W] = o({ ...V }), G = {
74
- totalOrders: P.length,
75
- totalSpent: P.reduce((e, t) => e + t.total, 0),
76
- loyaltyPoints: Math.floor(P.reduce((e, t) => e + t.total, 0) / 10),
77
- avgOrderValue: P.length > 0 ? Math.floor(P.reduce((e, t) => e + t.total, 0) / P.length) : 0,
78
- favoriteCategory: "South Indian",
79
- memberSince: B.createdAt
80
- }, K = F, q = () => {
81
- W({ ...V }), z(!0);
82
- }, J = () => {
83
- W({ ...V }), z(!1);
84
- }, Y = () => {
85
- H({ ...U }), z(!1), alert("Profile updated successfully");
86
- }, X = () => {
87
- H({ ...U }), alert("Preferences saved successfully");
88
- }, Z = (e, t) => {
89
- W((n) => ({
90
- ...n,
91
- [e]: t
92
- }));
93
- }, Q = (e, t) => {
94
- W((n) => ({
95
- ...n,
96
- emergencyContact: {
97
- ...n.emergencyContact,
98
- [e]: t
99
- }
100
- }));
101
- }, te = (e, t) => {
102
- W((n) => ({
103
- ...n,
104
- notifications: {
105
- ...n.notifications,
106
- [e]: t
107
- }
108
- }));
109
- }, $ = (e, t, n) => {
110
- W((r) => {
111
- let i = r[e], a = n ? [...i, t] : i.filter((e) => e !== t);
112
- return {
113
- ...r,
114
- [e]: a
115
- };
116
- });
117
- }, ne = [
118
- {
119
- key: "profile",
120
- label: "Profile Info",
121
- icon: S
122
- },
123
- {
124
- key: "preferences",
125
- label: "Preferences",
126
- icon: v
127
- },
128
- {
129
- key: "stats",
130
- label: "My Stats",
131
- icon: c
132
- }
133
- ];
134
- return K ? /* @__PURE__ */ w(n, {
135
- title: "My Profile",
136
- children: /* @__PURE__ */ T("div", {
137
- className: "flex flex-col items-center justify-center py-16 text-center",
138
- children: [/* @__PURE__ */ w("div", { className: "animate-spin rounded-full h-12 w-12 border-b-2 border-foreground mx-auto mb-4" }), /* @__PURE__ */ w("p", {
139
- className: "text-sm text-text-secondary",
140
- children: "Loading profile..."
141
- })]
142
- })
143
- }) : /* @__PURE__ */ T(n, {
144
- title: "My Profile",
145
- description: "Manage your personal information and preferences",
146
- children: [
147
- /* @__PURE__ */ w(O, {
148
- icon: /* @__PURE__ */ w(S, { className: "h-4 w-4" }),
149
- className: "mb-6",
150
- children: "Your account home. Keep your contact details, delivery preferences and dietary needs/allergies up to date so carts can serve you better — and see your lifetime ordering stats and loyalty points. The three tabs below cover your info, preferences and stats."
151
- }),
152
- /* @__PURE__ */ w(D, {
153
- storageKey: "labsofscience-customer-profile",
154
- steps: [
155
- {
156
- id: "edit",
157
- label: "Complete your profile",
158
- description: "Add your phone, emergency contact and verify your details.",
159
- icon: /* @__PURE__ */ w(p, { className: "h-4 w-4" }),
160
- onClick: () => {
161
- L("profile"), q();
162
- }
163
- },
164
- {
165
- id: "prefs",
166
- label: "Set dietary preferences",
167
- description: "Tell us about allergies and diets for safer recommendations.",
168
- icon: /* @__PURE__ */ w(m, { className: "h-4 w-4" }),
169
- onClick: () => L("preferences")
170
- },
171
- {
172
- id: "addresses",
173
- label: "Manage delivery addresses",
174
- description: "Save home and work addresses for faster checkout.",
175
- icon: /* @__PURE__ */ w(g, { className: "h-4 w-4" }),
176
- onClick: () => M("/customer/addresses")
177
- }
178
- ]
179
- }),
180
- /* @__PURE__ */ T(E, {
181
- className: "flex flex-col items-center sm:flex-row sm:items-start gap-6 p-6",
182
- children: [
183
- /* @__PURE__ */ T("div", {
184
- className: "relative",
185
- children: [/* @__PURE__ */ w("div", {
186
- className: "h-24 w-24 rounded-full bg-bg-sunken overflow-hidden",
187
- children: B.profilePicture ? /* @__PURE__ */ w("img", {
188
- src: B.profilePicture,
189
- alt: `${B.firstName} ${B.lastName}`,
190
- className: "h-full w-full object-cover"
191
- }) : /* @__PURE__ */ w("div", {
192
- className: "flex h-full w-full items-center justify-center text-text-secondary",
193
- children: /* @__PURE__ */ w(x, { className: "h-10 w-10" })
194
- })
195
- }), /* @__PURE__ */ w("button", {
196
- type: "button",
197
- className: "absolute bottom-0 right-0 flex h-8 w-8 items-center justify-center rounded-full bg-foreground text-background shadow-sm hover:opacity-90 transition-opacity",
198
- children: /* @__PURE__ */ w(u, { className: "h-4 w-4" })
199
- })]
200
- }),
201
- /* @__PURE__ */ T("div", {
202
- className: "flex-1 text-center sm:text-left",
203
- children: [
204
- /* @__PURE__ */ T("h2", {
205
- className: "text-xl font-semibold text-text-primary",
206
- children: [
207
- V.firstName,
208
- " ",
209
- V.lastName
210
- ]
211
- }),
212
- /* @__PURE__ */ w("p", {
213
- className: "mt-1 text-sm text-text-secondary",
214
- children: V.email
215
- }),
216
- /* @__PURE__ */ w("p", {
217
- className: "mt-0.5 text-sm text-text-secondary",
218
- children: V.phone
219
- }),
220
- /* @__PURE__ */ T("div", {
221
- className: "flex flex-wrap items-center justify-center sm:justify-start gap-2 mt-2",
222
- children: [/* @__PURE__ */ T("span", {
223
- className: t("inline-flex items-center gap-1 rounded-full px-2.5 py-0.5 text-xs font-medium", B.isEmailVerified ? "bg-status-success-bg-subtle text-status-success-text" : "bg-status-error-bg/20 text-status-error-text"),
224
- children: [/* @__PURE__ */ w(d, { className: "h-3 w-3" }), B.isEmailVerified ? "Email Verified" : "Email Not Verified"]
225
- }), /* @__PURE__ */ T("span", {
226
- className: t("inline-flex items-center gap-1 rounded-full px-2.5 py-0.5 text-xs font-medium", B.isPhoneVerified ? "bg-status-success-bg-subtle text-status-success-text" : "bg-status-error-bg/20 text-status-error-text"),
227
- children: [/* @__PURE__ */ w(d, { className: "h-3 w-3" }), B.isPhoneVerified ? "Phone Verified" : "Phone Not Verified"]
228
- })]
229
- })
230
- ]
231
- }),
232
- /* @__PURE__ */ T("div", {
233
- className: "text-center sm:text-right",
234
- children: [/* @__PURE__ */ w("p", {
235
- className: "text-2xl font-bold text-text-primary",
236
- children: G.loyaltyPoints
237
- }), /* @__PURE__ */ w("p", {
238
- className: "text-xs text-text-secondary",
239
- children: "Loyalty Points"
240
- })]
241
- })
242
- ]
243
- }),
244
- /* @__PURE__ */ T("div", {
245
- className: "mt-6 rounded-lg border border-border-seam bg-bg-surface",
246
- children: [/* @__PURE__ */ w("div", {
247
- className: "border-b border-border-seam",
248
- children: /* @__PURE__ */ w("nav", {
249
- className: "flex -mb-px overflow-x-auto",
250
- children: ne.map((e) => {
251
- let n = e.icon;
252
- return /* @__PURE__ */ T("button", {
253
- type: "button",
254
- className: t("flex items-center gap-2 py-3.5 px-5 text-sm font-medium whitespace-nowrap transition-colors", I === e.key ? "border-b-2 border-foreground text-text-primary" : "text-text-secondary hover:text-text-primary"),
255
- onClick: () => L(e.key),
256
- children: [/* @__PURE__ */ w(n, { className: "h-4 w-4" }), e.label]
257
- }, e.key);
258
- })
259
- })
260
- }), /* @__PURE__ */ T("div", {
261
- className: "p-5 md:p-6",
262
- children: [
263
- I === "profile" && /* @__PURE__ */ T("div", {
264
- className: "space-y-6",
265
- children: [
266
- /* @__PURE__ */ T("div", {
267
- className: "flex justify-between items-center",
268
- children: [/* @__PURE__ */ w("h3", {
269
- className: "text-lg font-semibold text-text-primary",
270
- children: "Personal Information"
271
- }), R ? /* @__PURE__ */ T("div", {
272
- className: "flex gap-2",
273
- children: [/* @__PURE__ */ T("button", {
274
- type: "button",
275
- onClick: Y,
276
- className: "flex items-center gap-1.5 rounded-lg bg-foreground px-3 py-1.5 text-xs font-medium text-background hover:opacity-90 transition-opacity",
277
- children: [/* @__PURE__ */ w(_, { className: "h-3 w-3" }), "Save"]
278
- }), /* @__PURE__ */ T("button", {
279
- type: "button",
280
- onClick: J,
281
- className: "flex items-center gap-1.5 rounded-lg border border-border-seam px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-accent transition-colors",
282
- children: [/* @__PURE__ */ w(C, { className: "h-3 w-3" }), "Cancel"]
283
- })]
284
- }) : /* @__PURE__ */ T("button", {
285
- type: "button",
286
- onClick: q,
287
- className: "flex items-center gap-1.5 rounded-lg border border-border-seam px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-accent transition-colors",
288
- children: [/* @__PURE__ */ w(p, { className: "h-3 w-3" }), "Edit Profile"]
289
- })]
290
- }),
291
- /* @__PURE__ */ T("div", {
292
- className: "grid grid-cols-1 md:grid-cols-2 gap-5",
293
- children: [
294
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
295
- className: "block text-sm font-medium text-text-primary mb-1.5",
296
- children: "First Name"
297
- }), /* @__PURE__ */ w("input", {
298
- type: "text",
299
- value: R ? U.firstName : V.firstName,
300
- onChange: (e) => Z("firstName", e.target.value),
301
- disabled: !R,
302
- className: t("w-full rounded-lg border border-border-seam px-3 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]", !R && "bg-bg-sunken cursor-not-allowed", R && "bg-bg-surface")
303
- })] }),
304
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
305
- className: "block text-sm font-medium text-text-primary mb-1.5",
306
- children: "Last Name"
307
- }), /* @__PURE__ */ w("input", {
308
- type: "text",
309
- value: R ? U.lastName : V.lastName,
310
- onChange: (e) => Z("lastName", e.target.value),
311
- disabled: !R,
312
- className: t("w-full rounded-lg border border-border-seam px-3 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]", !R && "bg-bg-sunken cursor-not-allowed", R && "bg-bg-surface")
313
- })] }),
314
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
315
- className: "block text-sm font-medium text-text-primary mb-1.5",
316
- children: "Email"
317
- }), /* @__PURE__ */ w("input", {
318
- type: "email",
319
- value: R ? U.email : V.email,
320
- onChange: (e) => Z("email", e.target.value),
321
- disabled: !R,
322
- className: t("w-full rounded-lg border border-border-seam px-3 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]", !R && "bg-bg-sunken cursor-not-allowed", R && "bg-bg-surface")
323
- })] }),
324
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
325
- className: "block text-sm font-medium text-text-primary mb-1.5",
326
- children: "Phone"
327
- }), /* @__PURE__ */ w("input", {
328
- type: "tel",
329
- value: R ? U.phone : V.phone,
330
- onChange: (e) => Z("phone", e.target.value),
331
- disabled: !R,
332
- className: t("w-full rounded-lg border border-border-seam px-3 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]", !R && "bg-bg-sunken cursor-not-allowed", R && "bg-bg-surface")
333
- })] })
334
- ]
335
- }),
336
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("h4", {
337
- className: "text-base font-semibold text-text-primary mb-3",
338
- children: "Primary Address"
339
- }), /* @__PURE__ */ T("div", {
340
- className: "rounded-lg bg-bg-sunken/50 p-4",
341
- children: [
342
- /* @__PURE__ */ w("p", {
343
- className: "text-sm font-medium text-text-primary",
344
- children: j[0].street
345
- }),
346
- /* @__PURE__ */ w("p", {
347
- className: "text-sm text-text-secondary",
348
- children: j[0].area
349
- }),
350
- /* @__PURE__ */ T("p", {
351
- className: "text-sm text-text-secondary",
352
- children: [
353
- j[0].city,
354
- ", ",
355
- j[0].state,
356
- " - ",
357
- j[0].pincode
358
- ]
359
- }),
360
- /* @__PURE__ */ T("button", {
361
- type: "button",
362
- onClick: () => M("/customer/addresses"),
363
- className: "mt-2 flex items-center gap-1 text-xs font-medium text-text-secondary hover:text-text-primary transition-colors",
364
- children: [
365
- /* @__PURE__ */ w(g, { className: "h-3 w-3" }),
366
- "Manage Addresses",
367
- /* @__PURE__ */ w(f, { className: "h-3 w-3" })
368
- ]
369
- })
370
- ]
371
- })] }),
372
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ T("h4", {
373
- className: "text-base font-semibold text-text-primary mb-3 flex items-center gap-2",
374
- children: [/* @__PURE__ */ w(s, { className: "h-4 w-4 text-text-secondary" }), "Emergency Contact"]
375
- }), /* @__PURE__ */ T("div", {
376
- className: "grid grid-cols-1 md:grid-cols-3 gap-4",
377
- children: [
378
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
379
- className: "block text-sm font-medium text-text-primary mb-1.5",
380
- children: "Name"
381
- }), /* @__PURE__ */ w("input", {
382
- type: "text",
383
- value: R ? U.emergencyContact.name : V.emergencyContact.name,
384
- onChange: (e) => Q("name", e.target.value),
385
- disabled: !R,
386
- className: t("w-full rounded-lg border border-border-seam px-3 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]", !R && "bg-bg-sunken cursor-not-allowed", R && "bg-bg-surface")
387
- })] }),
388
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
389
- className: "block text-sm font-medium text-text-primary mb-1.5",
390
- children: "Phone"
391
- }), /* @__PURE__ */ w("input", {
392
- type: "tel",
393
- value: R ? U.emergencyContact.phone : V.emergencyContact.phone,
394
- onChange: (e) => Q("phone", e.target.value),
395
- disabled: !R,
396
- className: t("w-full rounded-lg border border-border-seam px-3 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]", !R && "bg-bg-sunken cursor-not-allowed", R && "bg-bg-surface")
397
- })] }),
398
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
399
- className: "block text-sm font-medium text-text-primary mb-1.5",
400
- children: "Relationship"
401
- }), /* @__PURE__ */ w("input", {
402
- type: "text",
403
- value: R ? U.emergencyContact.relationship : V.emergencyContact.relationship,
404
- onChange: (e) => Q("relationship", e.target.value),
405
- disabled: !R,
406
- className: t("w-full rounded-lg border border-border-seam px-3 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]", !R && "bg-bg-sunken cursor-not-allowed", R && "bg-bg-surface")
407
- })] })
408
- ]
409
- })] }),
410
- R && /* @__PURE__ */ T("div", {
411
- className: "flex gap-3 pt-4 border-t border-border-seam",
412
- children: [/* @__PURE__ */ T("button", {
413
- type: "button",
414
- onClick: Y,
415
- className: "flex items-center gap-2 rounded-lg bg-foreground px-4 py-2.5 text-sm font-medium text-background hover:opacity-90 transition-opacity",
416
- children: [/* @__PURE__ */ w(_, { className: "h-4 w-4" }), "Save Changes"]
417
- }), /* @__PURE__ */ w("button", {
418
- type: "button",
419
- onClick: J,
420
- className: "flex items-center gap-2 rounded-lg border border-border-seam px-4 py-2.5 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
421
- children: "Cancel"
422
- })]
423
- })
424
- ]
425
- }),
426
- I === "preferences" && /* @__PURE__ */ T("div", {
427
- className: "space-y-8",
428
- children: [
429
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ T("h3", {
430
- className: "text-lg font-semibold text-text-primary mb-4 flex items-center gap-2",
431
- children: [/* @__PURE__ */ w(l, { className: "h-4 w-4 text-text-secondary" }), "Notification Preferences"]
432
- }), /* @__PURE__ */ w("div", {
433
- className: "space-y-3",
434
- children: [
435
- {
436
- key: "orderUpdates",
437
- label: "Order status updates"
438
- },
439
- {
440
- key: "promotions",
441
- label: "Promotional offers and discounts"
442
- },
443
- {
444
- key: "newsletter",
445
- label: "Newsletter and food recommendations"
446
- },
447
- {
448
- key: "sms",
449
- label: "SMS notifications"
450
- }
451
- ].map((e) => /* @__PURE__ */ T("label", {
452
- className: "flex items-center gap-3 cursor-pointer",
453
- children: [/* @__PURE__ */ w("input", {
454
- type: "checkbox",
455
- checked: U.notifications[e.key],
456
- onChange: (t) => te(e.key, t.target.checked),
457
- className: "h-4 w-4 rounded border-border-seam text-text-primary focus:ring-[var(--color-focus-ring)]"
458
- }), /* @__PURE__ */ w("span", {
459
- className: "text-sm text-text-primary",
460
- children: e.label
461
- })]
462
- }, e.key))
463
- })] }),
464
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ T("h3", {
465
- className: "text-lg font-semibold text-text-primary mb-4 flex items-center gap-2",
466
- children: [/* @__PURE__ */ w(m, { className: "h-4 w-4 text-text-secondary" }), "Dietary Preferences"]
467
- }), /* @__PURE__ */ w("div", {
468
- className: "grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-3",
469
- children: k.map((e) => /* @__PURE__ */ T("label", {
470
- className: "flex items-center gap-2 cursor-pointer",
471
- children: [/* @__PURE__ */ w("input", {
472
- type: "checkbox",
473
- checked: U.dietary.includes(e),
474
- onChange: (t) => $("dietary", e, t.target.checked),
475
- className: "h-4 w-4 rounded border-border-seam text-text-primary focus:ring-[var(--color-focus-ring)]"
476
- }), /* @__PURE__ */ w("span", {
477
- className: "text-sm text-text-primary capitalize",
478
- children: e
479
- })]
480
- }, e))
481
- })] }),
482
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ T("h3", {
483
- className: "text-lg font-semibold text-text-primary mb-4 flex items-center gap-2",
484
- children: [/* @__PURE__ */ w(s, { className: "h-4 w-4 text-status-error-text" }), "Food Allergies"]
485
- }), /* @__PURE__ */ w("div", {
486
- className: "grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-3",
487
- children: A.map((e) => /* @__PURE__ */ T("label", {
488
- className: "flex items-center gap-2 cursor-pointer",
489
- children: [/* @__PURE__ */ w("input", {
490
- type: "checkbox",
491
- checked: U.allergies.includes(e),
492
- onChange: (t) => $("allergies", e, t.target.checked),
493
- className: "h-4 w-4 rounded border-border-seam text-status-error-text focus:ring-destructive"
494
- }), /* @__PURE__ */ w("span", {
495
- className: "text-sm text-text-primary capitalize",
496
- children: e
497
- })]
498
- }, e))
499
- })] }),
500
- /* @__PURE__ */ w("div", {
501
- className: "pt-4 border-t border-border-seam",
502
- children: /* @__PURE__ */ T("button", {
503
- type: "button",
504
- onClick: X,
505
- className: "flex items-center gap-2 rounded-lg bg-foreground px-4 py-2.5 text-sm font-medium text-background hover:opacity-90 transition-opacity",
506
- children: [/* @__PURE__ */ w(_, { className: "h-4 w-4" }), "Save Preferences"]
507
- })
508
- })
509
- ]
510
- }),
511
- I === "stats" && /* @__PURE__ */ T("div", {
512
- className: "space-y-8",
513
- children: [/* @__PURE__ */ T("div", {
514
- className: "grid grid-cols-1 md:grid-cols-3 gap-4",
515
- children: [
516
- /* @__PURE__ */ T("div", {
517
- className: "rounded-lg bg-status-info-bg-subtle p-5 border border-status-info-border",
518
- children: [/* @__PURE__ */ T("div", {
519
- className: "flex items-center gap-2 mb-2",
520
- children: [/* @__PURE__ */ w(b, { className: "h-4 w-4 text-status-info-text" }), /* @__PURE__ */ w("h4", {
521
- className: "text-sm font-medium text-status-info-text",
522
- children: "Total Orders"
523
- })]
524
- }), /* @__PURE__ */ w("p", {
525
- className: "text-3xl font-bold text-status-info-text",
526
- children: G.totalOrders
527
- })]
528
- }),
529
- /* @__PURE__ */ T("div", {
530
- className: "rounded-lg bg-status-success-bg-subtle p-5 border border-status-success-border",
531
- children: [/* @__PURE__ */ T("div", {
532
- className: "flex items-center gap-2 mb-2",
533
- children: [/* @__PURE__ */ w(h, { className: "h-4 w-4 text-status-success-text" }), /* @__PURE__ */ w("h4", {
534
- className: "text-sm font-medium text-status-success-text",
535
- children: "Total Spent"
536
- })]
537
- }), /* @__PURE__ */ w("p", {
538
- className: "text-3xl font-bold text-status-success-text",
539
- children: i(G.totalSpent, { minimumFractionDigits: 0 })
540
- })]
541
- }),
542
- /* @__PURE__ */ T("div", {
543
- className: "rounded-lg bg-[color-mix(in_oklab,var(--color-accent-purple)_14%,transparent)] p-5 border border-accent-purple",
544
- children: [/* @__PURE__ */ T("div", {
545
- className: "flex items-center gap-2 mb-2",
546
- children: [/* @__PURE__ */ w(ee, { className: "h-4 w-4 text-accent-purple" }), /* @__PURE__ */ w("h4", {
547
- className: "text-sm font-medium text-accent-purple",
548
- children: "Loyalty Points"
549
- })]
550
- }), /* @__PURE__ */ w("p", {
551
- className: "text-3xl font-bold text-accent-purple",
552
- children: G.loyaltyPoints
553
- })]
554
- })
555
- ]
556
- }), /* @__PURE__ */ T("div", {
557
- className: "grid grid-cols-1 md:grid-cols-2 gap-6",
558
- children: [/* @__PURE__ */ T("div", {
559
- className: "rounded-lg border border-border-seam bg-bg-surface p-5",
560
- children: [/* @__PURE__ */ T("h4", {
561
- className: "text-base font-semibold text-text-primary mb-4 flex items-center gap-2",
562
- children: [/* @__PURE__ */ w(c, { className: "h-4 w-4 text-text-secondary" }), "Order Statistics"]
563
- }), /* @__PURE__ */ T("div", {
564
- className: "space-y-3",
565
- children: [
566
- /* @__PURE__ */ T("div", {
567
- className: "flex justify-between",
568
- children: [/* @__PURE__ */ w("span", {
569
- className: "text-sm text-text-secondary",
570
- children: "Average Order Value"
571
- }), /* @__PURE__ */ w("span", {
572
- className: "text-sm font-medium text-text-primary",
573
- children: i(G.avgOrderValue, { minimumFractionDigits: 0 })
574
- })]
575
- }),
576
- /* @__PURE__ */ T("div", {
577
- className: "flex justify-between",
578
- children: [/* @__PURE__ */ w("span", {
579
- className: "text-sm text-text-secondary",
580
- children: "Favorite Category"
581
- }), /* @__PURE__ */ w("span", {
582
- className: "text-sm font-medium text-text-primary",
583
- children: G.favoriteCategory
584
- })]
585
- }),
586
- /* @__PURE__ */ T("div", {
587
- className: "flex justify-between",
588
- children: [/* @__PURE__ */ w("span", {
589
- className: "text-sm text-text-secondary",
590
- children: "Member Since"
591
- }), /* @__PURE__ */ w("span", {
592
- className: "text-sm font-medium text-text-primary",
593
- children: a(G.memberSince, {
594
- hour: void 0,
595
- minute: void 0,
596
- hour12: void 0
597
- })
598
- })]
599
- })
600
- ]
601
- })]
602
- }), /* @__PURE__ */ T("div", {
603
- className: "rounded-lg border border-border-seam bg-bg-surface p-5",
604
- children: [/* @__PURE__ */ T("h4", {
605
- className: "text-base font-semibold text-text-primary mb-4 flex items-center gap-2",
606
- children: [/* @__PURE__ */ w(y, { className: "h-4 w-4 text-text-secondary" }), "Account Status"]
607
- }), /* @__PURE__ */ T("div", {
608
- className: "space-y-3",
609
- children: [
610
- /* @__PURE__ */ T("div", {
611
- className: "flex justify-between items-center",
612
- children: [/* @__PURE__ */ w("span", {
613
- className: "text-sm text-text-secondary",
614
- children: "Email Verification"
615
- }), /* @__PURE__ */ w("span", {
616
- className: t("inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-xs font-medium", B.isEmailVerified ? "bg-status-success-bg-subtle text-status-success-text" : "bg-status-error-bg/20 text-status-error-text"),
617
- children: B.isEmailVerified ? "Verified" : "Not Verified"
618
- })]
619
- }),
620
- /* @__PURE__ */ T("div", {
621
- className: "flex justify-between items-center",
622
- children: [/* @__PURE__ */ w("span", {
623
- className: "text-sm text-text-secondary",
624
- children: "Phone Verification"
625
- }), /* @__PURE__ */ w("span", {
626
- className: t("inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-xs font-medium", B.isPhoneVerified ? "bg-status-success-bg-subtle text-status-success-text" : "bg-status-error-bg/20 text-status-error-text"),
627
- children: B.isPhoneVerified ? "Verified" : "Not Verified"
628
- })]
629
- }),
630
- /* @__PURE__ */ T("div", {
631
- className: "flex justify-between",
632
- children: [/* @__PURE__ */ w("span", {
633
- className: "text-sm text-text-secondary",
634
- children: "Last Updated"
635
- }), /* @__PURE__ */ w("span", {
636
- className: "text-sm font-medium text-text-primary",
637
- children: a(B.updatedAt, {
638
- hour: void 0,
639
- minute: void 0,
640
- hour12: void 0
641
- })
642
- })]
643
- })
644
- ]
645
- })]
646
- })]
647
- })]
648
- })
649
- ]
650
- })]
651
- })
652
- ]
653
- });
654
- }
655
- //#endregion
656
- export { M as CustomerProfilePage };
657
-
658
- //# sourceMappingURL=CustomerProfilePage.js.map