@burdenoff/microfe-movethewheels 2026.624.1 → 2026.626.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 (119) hide show
  1. package/dist/{AIAssistantPage-BrHX2lQn.js → AIAssistantPage-AvsMbunM.js} +39 -33
  2. package/dist/{AnalyticsPage-DI6Wcaw5.js → AnalyticsPage-CCLfHgQZ.js} +44 -33
  3. package/dist/CreateOrderPage-CjlnEtk3.js +510 -0
  4. package/dist/CustomerDetailsPage-I6cdDHUi.js +265 -0
  5. package/dist/CustomersPage-CGGfD4ki.js +163 -0
  6. package/dist/{DashboardPage-3ZOnwg1a.js → DashboardPage-D2HRqwg9.js} +122 -111
  7. package/dist/DataTable-CD9ZhpLB.js +249 -0
  8. package/dist/DriverDetailsPage-rg_pGNuP.js +330 -0
  9. package/dist/DriversPage-DKiynISH.js +167 -0
  10. package/dist/FinancePage-Vg8WPs38.js +158 -0
  11. package/dist/{FleetPage-CPS7r4J3.js → FleetPage-DddXt8r8.js} +124 -85
  12. package/dist/ImportExportPage-BW6qO3kc.js +248 -0
  13. package/dist/InventoryPage-rMGuaJN-.js +222 -0
  14. package/dist/LiveTrackingPage-DQ1q4Id3.js +375 -0
  15. package/dist/MarketplacePage-DKrXAv62.js +219 -0
  16. package/dist/MetricCard-B7yMyvMX.js +146 -0
  17. package/dist/OrderDetailsPage-CFASgsYX.js +431 -0
  18. package/dist/OrdersListPage-BHeT8S5o.js +309 -0
  19. package/dist/{PageLayout-xDTiBTDS.js → PageLayout-D3N8MCTm.js} +213 -195
  20. package/dist/ProductDetailsPage-CFGcbaHo.js +195 -0
  21. package/dist/ProductsPage--xEpbQ8A.js +171 -0
  22. package/dist/{ReportsPage-B8OyWGzl.js → ReportsPage-Bb7_90rK.js} +57 -49
  23. package/dist/RouteDetailsPage-CVtDVb1N.js +282 -0
  24. package/dist/RoutesPage-s57PtgcQ.js +163 -0
  25. package/dist/SettingsPage-BYNCBOpN.js +298 -0
  26. package/dist/{StatusBadge-C--7NhoW.js → StatusBadge-CijYQXtb.js} +5 -2
  27. package/dist/{TrackingPage-BldUm_g7.js → TrackingPage-CcRc_dva.js} +88 -83
  28. package/dist/VehicleDetailsPage-3YDMPsPs.js +220 -0
  29. package/dist/VehiclesPage-UlxPWP9K.js +167 -0
  30. package/dist/WarehouseDetailsPage-Db7KeN-d.js +238 -0
  31. package/dist/WarehousesPage-CuTO-OPp.js +164 -0
  32. package/dist/{arrow-left-Bk5GsGNk.js → arrow-left-CBpZKkpq.js} +1 -1
  33. package/dist/{box-BAMv2-7M.js → box-CAaiElsb.js} +1 -1
  34. package/dist/{chart-column-CAfkf4o6.js → chart-column-D1Ym15-S.js} +1 -1
  35. package/dist/{chevron-right-Czrt_Qew.js → chevron-right-BIFGi0UA.js} +1 -1
  36. package/dist/{circle-alert-CEuV9Pij.js → circle-alert-DjmNo5_L.js} +1 -1
  37. package/dist/{circle-check-big-Cx8aO6B-.js → circle-check-big-CjuPVo3_.js} +1 -1
  38. package/dist/{clock-Be95bq7_.js → clock-BjkdnddD.js} +1 -1
  39. package/dist/{dollar-sign-kJqItPli.js → dollar-sign-IB4O0wuQ.js} +1 -1
  40. package/dist/{download-caab0D3V.js → download-Dpa9vqoG.js} +1 -1
  41. package/dist/{file-text-b1qhrJn1.js → file-text-C8Uioy11.js} +1 -1
  42. package/dist/{filter-BWmLTZB-.js → filter-Da5OZaHI.js} +1 -1
  43. package/dist/index.js +16 -16
  44. package/dist/{map-CS2aFgyO.js → map-_Per4sT9.js} +1 -1
  45. package/dist/{map-pin-96FeqL7H.js → map-pin-BSaf5IDL.js} +1 -1
  46. package/dist/{navigation-i6UXEjTC.js → navigation-DaTbrhw2.js} +1 -1
  47. package/dist/{package-KhSi3xaT.js → package-BE7U0wQE.js} +1 -1
  48. package/dist/{phone-B-h3tbsr.js → phone-DV4StZiA.js} +1 -1
  49. package/dist/{plus-D2BYAzMn.js → plus-Dl1rLeJR.js} +1 -1
  50. package/dist/{refresh-cw-D5Sy01s-.js → refresh-cw-CWfERAit.js} +1 -1
  51. package/dist/{route-CBDXuwH9.js → route-Dp9JiN_E.js} +1 -1
  52. package/dist/{save-CMc7h-Vi.js → save-XH8vydOn.js} +1 -1
  53. package/dist/{search-DVrUQbOg.js → search-OxoIiL_C.js} +1 -1
  54. package/dist/{settings-BwzIRYv3.js → settings-3Rw5NwFF.js} +1 -1
  55. package/dist/{square-pen-DmW36Bau.js → square-pen-hLIbFQFV.js} +1 -1
  56. package/dist/{star-Cv2MzxZL.js → star-YsVV3MNQ.js} +1 -1
  57. package/dist/{store-CLH957vl.js → store-RCBl7HB-.js} +1 -1
  58. package/dist/{trending-up-l8M0BO_w.js → trending-up-C-85AwGT.js} +1 -1
  59. package/dist/{triangle-alert-BI45s6bH.js → triangle-alert-BOhfGgmh.js} +1 -1
  60. package/dist/{truck-DX3lNQkz.js → truck-CtDjNFbi.js} +1 -1
  61. package/dist/{user-D8EY1uvt.js → user-Dz5TJZFs.js} +1 -1
  62. package/dist/{users-CfG0J8wP.js → users-g2N0eL-Z.js} +1 -1
  63. package/dist/{warehouse-Dt_bAr82.js → warehouse-D3WWDeTX.js} +1 -1
  64. package/dist/{wrench-C50eI_Iy.js → wrench-CmxY1n4I.js} +1 -1
  65. package/package.json +2 -2
  66. package/src/movethewheels/components/DataTable.tsx +41 -6
  67. package/src/movethewheels/components/MetricCard.tsx +51 -20
  68. package/src/movethewheels/components/PageLayout.tsx +60 -5
  69. package/src/movethewheels/components/StatusBadge.tsx +2 -1
  70. package/src/movethewheels/pages/AIAssistantPage.tsx +11 -3
  71. package/src/movethewheels/pages/AnalyticsPage.tsx +31 -25
  72. package/src/movethewheels/pages/CreateOrderPage.tsx +56 -17
  73. package/src/movethewheels/pages/CustomerDetailsPage.tsx +63 -38
  74. package/src/movethewheels/pages/CustomersPage.tsx +51 -12
  75. package/src/movethewheels/pages/DashboardPage.tsx +62 -48
  76. package/src/movethewheels/pages/DriverDetailsPage.tsx +57 -26
  77. package/src/movethewheels/pages/DriversPage.tsx +45 -12
  78. package/src/movethewheels/pages/FinancePage.tsx +45 -41
  79. package/src/movethewheels/pages/FleetPage.tsx +82 -34
  80. package/src/movethewheels/pages/ImportExportPage.tsx +46 -29
  81. package/src/movethewheels/pages/InventoryPage.tsx +37 -33
  82. package/src/movethewheels/pages/LiveTrackingPage.tsx +58 -20
  83. package/src/movethewheels/pages/MarketplacePage.tsx +37 -3
  84. package/src/movethewheels/pages/OrderDetailsPage.tsx +74 -46
  85. package/src/movethewheels/pages/OrdersListPage.tsx +81 -14
  86. package/src/movethewheels/pages/ProductDetailsPage.tsx +36 -11
  87. package/src/movethewheels/pages/ProductsPage.tsx +41 -12
  88. package/src/movethewheels/pages/ReportsPage.tsx +23 -19
  89. package/src/movethewheels/pages/RouteDetailsPage.tsx +71 -31
  90. package/src/movethewheels/pages/RoutesPage.tsx +48 -9
  91. package/src/movethewheels/pages/SettingsPage.tsx +68 -26
  92. package/src/movethewheels/pages/TrackingPage.tsx +52 -49
  93. package/src/movethewheels/pages/VehicleDetailsPage.tsx +49 -24
  94. package/src/movethewheels/pages/VehiclesPage.tsx +41 -15
  95. package/src/movethewheels/pages/WarehouseDetailsPage.tsx +55 -30
  96. package/src/movethewheels/pages/WarehousesPage.tsx +46 -9
  97. package/dist/CreateOrderPage-DfkSi6JF.js +0 -471
  98. package/dist/CustomerDetailsPage-DzAIu_tH.js +0 -239
  99. package/dist/CustomersPage-d21ixOYa.js +0 -119
  100. package/dist/DataTable-CZGz3SJu.js +0 -239
  101. package/dist/DriverDetailsPage-YuZSlPSV.js +0 -297
  102. package/dist/DriversPage-BOhqEBTv.js +0 -127
  103. package/dist/FinancePage-CnjUNXOb.js +0 -154
  104. package/dist/ImportExportPage-zNjs7xsV.js +0 -232
  105. package/dist/InventoryPage-C9g5d3SW.js +0 -223
  106. package/dist/LiveTrackingPage-DoBvtdBG.js +0 -332
  107. package/dist/MarketplacePage-BEj5hcBF.js +0 -192
  108. package/dist/MetricCard-DeHVeVwl.js +0 -135
  109. package/dist/OrderDetailsPage-D-9lDZYU.js +0 -398
  110. package/dist/OrdersListPage-CJzHbgY3.js +0 -257
  111. package/dist/ProductDetailsPage-3rKtzXpy.js +0 -168
  112. package/dist/ProductsPage-B0P_wjBJ.js +0 -131
  113. package/dist/RouteDetailsPage-DGjKTUMj.js +0 -240
  114. package/dist/RoutesPage-CpopY8xN.js +0 -116
  115. package/dist/SettingsPage-BvXSa3gi.js +0 -247
  116. package/dist/VehicleDetailsPage-Dqv--MVW.js +0 -194
  117. package/dist/VehiclesPage-CCBHRDHu.js +0 -127
  118. package/dist/WarehouseDetailsPage-ZObC_c7W.js +0 -215
  119. package/dist/WarehousesPage-CpgZEVW9.js +0 -121
@@ -1,239 +0,0 @@
1
- import { d as e, f as t, g as n, h as r, i, it as a, l as o, n as s, r as c, u as l } from "./PageLayout-xDTiBTDS.js";
2
- import { t as u } from "./arrow-left-Bk5GsGNk.js";
3
- import { t as d } from "./file-text-b1qhrJn1.js";
4
- import { n as f, t as p } from "./phone-B-h3tbsr.js";
5
- import { t as m } from "./map-pin-96FeqL7H.js";
6
- import { t as h } from "./square-pen-DmW36Bau.js";
7
- import { t as g } from "./star-Cv2MzxZL.js";
8
- import { t as _ } from "./users-CfG0J8wP.js";
9
- import { r as v } from "./graphqlClient-CdJyR_ed.js";
10
- import { t as y } from "./useCustomers-bS3a4ytk.js";
11
- import { i as b } from "./StatusBadge-C--7NhoW.js";
12
- import { r as x, t as S } from "./formatters-_vJlC-47.js";
13
- import { t as C } from "./navigation-BgnOfsVd.js";
14
- import { useParams as w } from "react-router-dom";
15
- import { jsx as T, jsxs as E } from "react/jsx-runtime";
16
- //#region node_modules/lucide-react/dist/esm/icons/building.js
17
- var D = a("Building", [
18
- ["rect", {
19
- width: "16",
20
- height: "20",
21
- x: "4",
22
- y: "2",
23
- rx: "2",
24
- ry: "2",
25
- key: "76otgf"
26
- }],
27
- ["path", {
28
- d: "M9 22v-4h6v4",
29
- key: "r93iot"
30
- }],
31
- ["path", {
32
- d: "M8 6h.01",
33
- key: "1dz90k"
34
- }],
35
- ["path", {
36
- d: "M16 6h.01",
37
- key: "1x0f13"
38
- }],
39
- ["path", {
40
- d: "M12 6h.01",
41
- key: "1vi96p"
42
- }],
43
- ["path", {
44
- d: "M12 10h.01",
45
- key: "1nrarc"
46
- }],
47
- ["path", {
48
- d: "M12 14h.01",
49
- key: "1etili"
50
- }],
51
- ["path", {
52
- d: "M16 10h.01",
53
- key: "1m94wz"
54
- }],
55
- ["path", {
56
- d: "M16 14h.01",
57
- key: "1gbofw"
58
- }],
59
- ["path", {
60
- d: "M8 10h.01",
61
- key: "19clt8"
62
- }],
63
- ["path", {
64
- d: "M8 14h.01",
65
- key: "6423bh"
66
- }]
67
- ]);
68
- //#endregion
69
- //#region src/movethewheels/pages/CustomerDetailsPage.tsx
70
- function O() {
71
- let { customerId: a } = w(), { basePath: O, navigate: k } = v(), { customer: A, isLoading: j, error: M, refetch: N } = y(a), P = () => k?.(C(O, "customers"));
72
- return a ? j ? /* @__PURE__ */ T(c, { message: "Loading customer details..." }) : M || !A ? /* @__PURE__ */ T(s, {
73
- title: "Customer not found",
74
- onRetry: N
75
- }) : /* @__PURE__ */ T(i, {
76
- title: A.name,
77
- subtitle: A.company || A.email,
78
- icon: /* @__PURE__ */ T(_, { size: 24 }),
79
- headerActions: /* @__PURE__ */ E("div", {
80
- className: "flex gap-2",
81
- children: [/* @__PURE__ */ E(l, {
82
- variant: "outline",
83
- onClick: P,
84
- children: [/* @__PURE__ */ T(u, { size: 16 }), " Back"]
85
- }), /* @__PURE__ */ E(l, { children: [/* @__PURE__ */ T(h, { size: 16 }), " Edit"] })]
86
- }),
87
- headerContent: /* @__PURE__ */ E("div", {
88
- className: "flex items-center gap-4",
89
- children: [
90
- /* @__PURE__ */ T(b, { type: A.type }),
91
- /* @__PURE__ */ T(o, {
92
- variant: A.isActive ? "default" : "secondary",
93
- children: A.isActive ? "Active" : "Inactive"
94
- }),
95
- /* @__PURE__ */ E("div", {
96
- className: "flex items-center gap-1",
97
- children: [/* @__PURE__ */ T(g, {
98
- size: 16,
99
- className: "text-yellow-500 fill-yellow-500"
100
- }), /* @__PURE__ */ T("span", {
101
- className: "font-medium",
102
- children: A.rating.toFixed(1)
103
- })]
104
- })
105
- ]
106
- }),
107
- children: /* @__PURE__ */ E("div", {
108
- className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
109
- children: [/* @__PURE__ */ E("div", {
110
- className: "lg:col-span-2 space-y-6",
111
- children: [
112
- /* @__PURE__ */ E(e, { children: [/* @__PURE__ */ T(r, { children: /* @__PURE__ */ T(n, { children: "Contact Information" }) }), /* @__PURE__ */ T(t, { children: /* @__PURE__ */ E("div", {
113
- className: "grid grid-cols-1 md:grid-cols-2 gap-6",
114
- children: [/* @__PURE__ */ E("div", {
115
- className: "space-y-4",
116
- children: [/* @__PURE__ */ E("div", {
117
- className: "flex items-center gap-3",
118
- children: [/* @__PURE__ */ T(f, {
119
- size: 18,
120
- className: "text-text-secondary"
121
- }), /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
122
- className: "text-sm text-text-secondary",
123
- children: "Email"
124
- }), /* @__PURE__ */ T("p", {
125
- className: "font-medium",
126
- children: A.email
127
- })] })]
128
- }), /* @__PURE__ */ E("div", {
129
- className: "flex items-center gap-3",
130
- children: [/* @__PURE__ */ T(p, {
131
- size: 18,
132
- className: "text-text-secondary"
133
- }), /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
134
- className: "text-sm text-text-secondary",
135
- children: "Phone"
136
- }), /* @__PURE__ */ T("p", {
137
- className: "font-medium",
138
- children: A.phone
139
- })] })]
140
- })]
141
- }), /* @__PURE__ */ E("div", {
142
- className: "space-y-4",
143
- children: [A.company && /* @__PURE__ */ E("div", {
144
- className: "flex items-center gap-3",
145
- children: [/* @__PURE__ */ T(D, {
146
- size: 18,
147
- className: "text-text-secondary"
148
- }), /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
149
- className: "text-sm text-text-secondary",
150
- children: "Company"
151
- }), /* @__PURE__ */ T("p", {
152
- className: "font-medium",
153
- children: A.company
154
- })] })]
155
- }), A.website && /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
156
- className: "text-sm text-text-secondary",
157
- children: "Website"
158
- }), /* @__PURE__ */ T("a", {
159
- href: A.website,
160
- className: "text-primary hover:underline",
161
- children: A.website
162
- })] })]
163
- })]
164
- }) })] }),
165
- /* @__PURE__ */ E(e, { children: [/* @__PURE__ */ T(r, { children: /* @__PURE__ */ E(n, {
166
- className: "flex items-center gap-2",
167
- children: [/* @__PURE__ */ T(m, { size: 18 }), " Address"]
168
- }) }), /* @__PURE__ */ T(t, { children: /* @__PURE__ */ T("p", { children: S(A.address) }) })] }),
169
- A.notes && /* @__PURE__ */ E(e, { children: [/* @__PURE__ */ T(r, { children: /* @__PURE__ */ E(n, {
170
- className: "flex items-center gap-2",
171
- children: [/* @__PURE__ */ T(d, { size: 18 }), " Notes"]
172
- }) }), /* @__PURE__ */ T(t, { children: /* @__PURE__ */ T("p", { children: A.notes }) })] })
173
- ]
174
- }), /* @__PURE__ */ E("div", {
175
- className: "space-y-6",
176
- children: [/* @__PURE__ */ E(e, { children: [/* @__PURE__ */ T(r, { children: /* @__PURE__ */ T(n, { children: "Business Details" }) }), /* @__PURE__ */ E(t, {
177
- className: "space-y-3",
178
- children: [
179
- A.businessLicense && /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
180
- className: "text-sm text-text-secondary",
181
- children: "Business License"
182
- }), /* @__PURE__ */ T("p", {
183
- className: "font-mono",
184
- children: A.businessLicense
185
- })] }),
186
- A.taxId && /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
187
- className: "text-sm text-text-secondary",
188
- children: "Tax ID"
189
- }), /* @__PURE__ */ T("p", {
190
- className: "font-mono",
191
- children: A.taxId
192
- })] }),
193
- /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
194
- className: "text-sm text-text-secondary",
195
- children: "Preferred Contact"
196
- }), /* @__PURE__ */ T("p", {
197
- className: "capitalize",
198
- children: A.preferredContactMethod
199
- })] }),
200
- /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
201
- className: "text-sm text-text-secondary",
202
- children: "Marketing Opt-in"
203
- }), /* @__PURE__ */ T(o, {
204
- variant: A.marketingOptIn ? "default" : "secondary",
205
- children: A.marketingOptIn ? "Yes" : "No"
206
- })] })
207
- ]
208
- })] }), /* @__PURE__ */ E(e, { children: [/* @__PURE__ */ T(r, { children: /* @__PURE__ */ T(n, { children: "Account Info" }) }), /* @__PURE__ */ E(t, {
209
- className: "space-y-3",
210
- children: [/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
211
- className: "text-sm text-text-secondary",
212
- children: "Created"
213
- }), /* @__PURE__ */ T("p", { children: x(A.createdAt, "full") })] }), /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
214
- className: "text-sm text-text-secondary",
215
- children: "Last Updated"
216
- }), /* @__PURE__ */ T("p", { children: x(A.updatedAt, "relative") })] })]
217
- })] })]
218
- })]
219
- })
220
- }) : /* @__PURE__ */ T(i, {
221
- title: "New Customer",
222
- subtitle: "Add a new customer",
223
- icon: /* @__PURE__ */ T(_, { size: 24 }),
224
- headerActions: /* @__PURE__ */ E(l, {
225
- variant: "outline",
226
- onClick: P,
227
- children: [/* @__PURE__ */ T(u, { size: 16 }), " Back"]
228
- }),
229
- children: /* @__PURE__ */ T(e, { children: /* @__PURE__ */ T(t, {
230
- className: "p-8 text-center",
231
- children: /* @__PURE__ */ T("p", {
232
- className: "text-text-secondary",
233
- children: "Customer creation form would go here"
234
- })
235
- }) })
236
- });
237
- }
238
- //#endregion
239
- export { O as default };
@@ -1,119 +0,0 @@
1
- import { i as e, l as t, o as n, s as r, u as i } from "./PageLayout-xDTiBTDS.js";
2
- import { t as a } from "./DataTable-CZGz3SJu.js";
3
- import { t as o } from "./download-caab0D3V.js";
4
- import { t as s } from "./plus-D2BYAzMn.js";
5
- import { t as c } from "./refresh-cw-D5Sy01s-.js";
6
- import { t as l } from "./star-Cv2MzxZL.js";
7
- import { t as u } from "./users-CfG0J8wP.js";
8
- import { r as d } from "./graphqlClient-CdJyR_ed.js";
9
- import { r as f } from "./useCustomers-bS3a4ytk.js";
10
- import { i as p } from "./StatusBadge-C--7NhoW.js";
11
- import { r as m } from "./formatters-_vJlC-47.js";
12
- import { t as h } from "./navigation-BgnOfsVd.js";
13
- import { jsx as g, jsxs as _ } from "react/jsx-runtime";
14
- //#region src/movethewheels/pages/CustomersPage.tsx
15
- function v() {
16
- let { basePath: v, navigate: y } = d(), { customers: b, totalCustomers: x, isLoading: S, refetch: C } = f({ limit: 100 }), w = (e) => y?.(h(v, e));
17
- return /* @__PURE__ */ g(e, {
18
- title: "Customers",
19
- subtitle: `${x} customers`,
20
- icon: /* @__PURE__ */ g(u, { size: 24 }),
21
- headerActions: /* @__PURE__ */ _("div", {
22
- className: "flex gap-2",
23
- children: [
24
- /* @__PURE__ */ _(i, {
25
- variant: "outline",
26
- onClick: C,
27
- children: [/* @__PURE__ */ g(c, { size: 16 }), " Refresh"]
28
- }),
29
- /* @__PURE__ */ _(i, {
30
- variant: "outline",
31
- children: [/* @__PURE__ */ g(o, { size: 16 }), " Export"]
32
- }),
33
- /* @__PURE__ */ _(i, {
34
- onClick: () => w("customers/new"),
35
- children: [/* @__PURE__ */ g(s, { size: 16 }), " Add Customer"]
36
- })
37
- ]
38
- }),
39
- children: /* @__PURE__ */ g(a, {
40
- columns: [
41
- {
42
- id: "customer",
43
- header: "Customer",
44
- cell: (e) => /* @__PURE__ */ _("div", {
45
- className: "flex items-center gap-3",
46
- children: [/* @__PURE__ */ g(n, { children: /* @__PURE__ */ g(r, { children: e.name.split(" ").map((e) => e[0]).join("") }) }), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
47
- className: "font-medium",
48
- children: e.name
49
- }), /* @__PURE__ */ g("p", {
50
- className: "text-sm text-text-secondary",
51
- children: e.email
52
- })] })]
53
- })
54
- },
55
- {
56
- id: "type",
57
- header: "Type",
58
- accessorKey: "type",
59
- cell: (e) => /* @__PURE__ */ g(p, { type: e.type })
60
- },
61
- {
62
- id: "company",
63
- header: "Company",
64
- accessorKey: "company",
65
- cell: (e) => e.company || "-"
66
- },
67
- {
68
- id: "phone",
69
- header: "Phone",
70
- accessorKey: "phone"
71
- },
72
- {
73
- id: "location",
74
- header: "Location",
75
- cell: (e) => `${e.address.city}, ${e.address.state}`
76
- },
77
- {
78
- id: "rating",
79
- header: "Rating",
80
- cell: (e) => /* @__PURE__ */ _("div", {
81
- className: "flex items-center gap-1",
82
- children: [/* @__PURE__ */ g(l, {
83
- size: 14,
84
- className: "text-yellow-500 fill-yellow-500"
85
- }), /* @__PURE__ */ g("span", { children: e.rating.toFixed(1) })]
86
- })
87
- },
88
- {
89
- id: "status",
90
- header: "Status",
91
- cell: (e) => /* @__PURE__ */ g(t, {
92
- variant: e.isActive ? "default" : "secondary",
93
- children: e.isActive ? "Active" : "Inactive"
94
- })
95
- },
96
- {
97
- id: "created",
98
- header: "Created",
99
- accessorKey: "createdAt",
100
- sortable: !0,
101
- cell: (e) => m(e.createdAt, "short")
102
- }
103
- ],
104
- data: b,
105
- isLoading: S,
106
- searchable: !0,
107
- searchPlaceholder: "Search customers...",
108
- searchFields: [
109
- "name",
110
- "email",
111
- "company"
112
- ],
113
- onRowClick: (e) => w(`customers/${e.id}`),
114
- getRowId: (e) => e.id
115
- })
116
- });
117
- }
118
- //#endregion
119
- export { v as default };
@@ -1,239 +0,0 @@
1
- import { A as e, B as t, F as n, G as r, H as i, I as a, K as o, L as s, P as c, R as l, U as u, W as d, it as f, q as p, rt as m, u as h } from "./PageLayout-xDTiBTDS.js";
2
- import { t as g } from "./chevron-right-Czrt_Qew.js";
3
- import { t as _ } from "./search-DVrUQbOg.js";
4
- import { useMemo as v, useState as y } from "react";
5
- import { jsx as b, jsxs as x } from "react/jsx-runtime";
6
- //#region node_modules/lucide-react/dist/esm/icons/arrow-down.js
7
- var S = f("ArrowDown", [["path", {
8
- d: "M12 5v14",
9
- key: "s699le"
10
- }], ["path", {
11
- d: "m19 12-7 7-7-7",
12
- key: "1idqje"
13
- }]]), C = f("ArrowUpDown", [
14
- ["path", {
15
- d: "m21 16-4 4-4-4",
16
- key: "f6ql7i"
17
- }],
18
- ["path", {
19
- d: "M17 20V4",
20
- key: "1ejh1v"
21
- }],
22
- ["path", {
23
- d: "m3 8 4-4 4 4",
24
- key: "11wl7u"
25
- }],
26
- ["path", {
27
- d: "M7 4v16",
28
- key: "1glfcx"
29
- }]
30
- ]), w = f("ArrowUp", [["path", {
31
- d: "m5 12 7-7 7 7",
32
- key: "hav0vg"
33
- }], ["path", {
34
- d: "M12 19V5",
35
- key: "x0mq9r"
36
- }]]), T = f("ChevronLeft", [["path", {
37
- d: "m15 18-6-6 6-6",
38
- key: "1wnfg3"
39
- }]]), E = f("ChevronsLeft", [["path", {
40
- d: "m11 17-5-5 5-5",
41
- key: "13zhaf"
42
- }], ["path", {
43
- d: "m18 17-5-5 5-5",
44
- key: "h8a8et"
45
- }]]), D = f("ChevronsRight", [["path", {
46
- d: "m6 17 5-5-5-5",
47
- key: "xnjwq"
48
- }], ["path", {
49
- d: "m13 17 5-5-5-5",
50
- key: "17xmmf"
51
- }]]);
52
- //#endregion
53
- //#region src/movethewheels/components/DataTable.tsx
54
- function O({ columns: f, data: O, isLoading: ee = !1, searchable: k = !1, searchPlaceholder: A = "Search...", searchFields: j, pagination: M = !0, pageSize: N = 10, pageSizeOptions: P = [
55
- 5,
56
- 10,
57
- 20,
58
- 50
59
- ], onRowClick: F, rowClassName: I, emptyMessage: L = "No data found", className: R, getRowId: z }) {
60
- let [B, V] = y(""), [H, U] = y(null), [W, G] = y(null), [K, q] = y(1), [J, Y] = y(N), X = v(() => {
61
- if (!B || !j || j.length === 0) return O;
62
- let e = B.toLowerCase();
63
- return O.filter((t) => j.some((n) => {
64
- let r = t[n];
65
- return r != null && String(r).toLowerCase().includes(e);
66
- }));
67
- }, [
68
- O,
69
- B,
70
- j
71
- ]), Z = v(() => {
72
- if (!H || !W) return X;
73
- let e = f.find((e) => e.id === H);
74
- return e?.accessorKey ? [...X].sort((t, n) => {
75
- let r = t[e.accessorKey], i = n[e.accessorKey];
76
- if (r == null) return 1;
77
- if (i == null) return -1;
78
- let a = 0;
79
- return a = typeof r == "string" && typeof i == "string" ? r.localeCompare(i) : typeof r == "number" && typeof i == "number" ? r - i : r instanceof Date && i instanceof Date ? r.getTime() - i.getTime() : String(r).localeCompare(String(i)), W === "asc" ? a : -a;
80
- }) : X;
81
- }, [
82
- X,
83
- H,
84
- W,
85
- f
86
- ]), Q = v(() => {
87
- if (!M) return Z;
88
- let e = (K - 1) * J;
89
- return Z.slice(e, e + J);
90
- }, [
91
- Z,
92
- K,
93
- J,
94
- M
95
- ]), $ = Math.ceil(Z.length / J), te = (e) => {
96
- H === e ? W === "asc" ? G("desc") : W === "desc" && (U(null), G(null)) : (U(e), G("asc"));
97
- }, ne = (e) => H === e ? b(W === "asc" ? w : S, { className: "w-4 h-4 text-primary" }) : /* @__PURE__ */ b(C, { className: "w-4 h-4 text-text-secondary/50" }), re = (e, t) => {
98
- if (t.cell) return t.cell(e);
99
- if (t.accessorKey) {
100
- let n = e[t.accessorKey];
101
- return n == null ? "-" : n instanceof Date ? n.toLocaleDateString() : String(n);
102
- }
103
- return "-";
104
- };
105
- return ee ? /* @__PURE__ */ x("div", {
106
- className: m("space-y-4", R),
107
- children: [k && /* @__PURE__ */ b("div", {
108
- className: "flex items-center gap-4",
109
- children: /* @__PURE__ */ b(t, { className: "h-10 w-64" })
110
- }), /* @__PURE__ */ b("div", {
111
- className: "rounded-md border",
112
- children: /* @__PURE__ */ x(i, { children: [/* @__PURE__ */ b(o, { children: /* @__PURE__ */ b(p, { children: f.map((e) => /* @__PURE__ */ b(r, { children: /* @__PURE__ */ b(t, { className: "h-4 w-20" }) }, e.id)) }) }), /* @__PURE__ */ b(u, { children: Array.from({ length: 5 }).map((e, n) => /* @__PURE__ */ b(p, { children: f.map((e) => /* @__PURE__ */ b(d, { children: /* @__PURE__ */ b(t, { className: "h-4 w-full max-w-[100px]" }) }, e.id)) }, n)) })] })
113
- })]
114
- }) : /* @__PURE__ */ x("div", {
115
- className: m("space-y-4", R),
116
- children: [
117
- k && /* @__PURE__ */ b("div", {
118
- className: "flex items-center gap-4",
119
- children: /* @__PURE__ */ x("div", {
120
- className: "relative flex-1 max-w-sm",
121
- children: [/* @__PURE__ */ b(_, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-text-secondary" }), /* @__PURE__ */ b(e, {
122
- placeholder: A,
123
- value: B,
124
- onChange: (e) => {
125
- V(e.target.value), q(1);
126
- },
127
- className: "pl-9"
128
- })]
129
- })
130
- }),
131
- /* @__PURE__ */ b("div", {
132
- className: "rounded-md border",
133
- children: /* @__PURE__ */ x(i, { children: [/* @__PURE__ */ b(o, { children: /* @__PURE__ */ b(p, { children: f.map((e) => /* @__PURE__ */ b(r, {
134
- className: m(e.sortable && "cursor-pointer select-none hover:bg-bg-sunken/50", e.headerClassName),
135
- onClick: () => e.sortable && te(e.id),
136
- children: /* @__PURE__ */ x("div", {
137
- className: "flex items-center gap-2",
138
- children: [e.header, e.sortable && ne(e.id)]
139
- })
140
- }, e.id)) }) }), /* @__PURE__ */ b(u, { children: Q.length === 0 ? /* @__PURE__ */ b(p, { children: /* @__PURE__ */ b(d, {
141
- colSpan: f.length,
142
- className: "h-24 text-center",
143
- children: /* @__PURE__ */ b("p", {
144
- className: "text-text-secondary",
145
- children: L
146
- })
147
- }) }) : Q.map((e, t) => {
148
- let n = z ? z(e) : t, r = typeof I == "function" ? I(e) : I;
149
- return /* @__PURE__ */ b(p, {
150
- className: m(F && "cursor-pointer hover:bg-bg-sunken/50", r),
151
- onClick: () => F?.(e),
152
- children: f.map((t) => /* @__PURE__ */ b(d, {
153
- className: t.className,
154
- children: re(e, t)
155
- }, t.id))
156
- }, n);
157
- }) })] })
158
- }),
159
- M && Z.length > 0 && /* @__PURE__ */ x("div", {
160
- className: "flex items-center justify-between",
161
- children: [/* @__PURE__ */ x("div", {
162
- className: "flex items-center gap-2 text-sm text-text-secondary",
163
- children: [
164
- /* @__PURE__ */ x("span", { children: [
165
- "Showing ",
166
- (K - 1) * J + 1,
167
- " to",
168
- " ",
169
- Math.min(K * J, Z.length),
170
- " of ",
171
- Z.length
172
- ] }),
173
- /* @__PURE__ */ x(c, {
174
- value: String(J),
175
- onValueChange: (e) => {
176
- Y(Number(e)), q(1);
177
- },
178
- children: [/* @__PURE__ */ b(s, {
179
- className: "w-[70px] h-8",
180
- children: /* @__PURE__ */ b(l, {})
181
- }), /* @__PURE__ */ b(n, { children: P.map((e) => /* @__PURE__ */ b(a, {
182
- value: String(e),
183
- children: e
184
- }, e)) })]
185
- }),
186
- /* @__PURE__ */ b("span", { children: "per page" })
187
- ]
188
- }), /* @__PURE__ */ x("div", {
189
- className: "flex items-center gap-1",
190
- children: [
191
- /* @__PURE__ */ b(h, {
192
- variant: "outline",
193
- size: "icon",
194
- className: "h-8 w-8",
195
- onClick: () => q(1),
196
- disabled: K === 1,
197
- children: /* @__PURE__ */ b(E, { className: "h-4 w-4" })
198
- }),
199
- /* @__PURE__ */ b(h, {
200
- variant: "outline",
201
- size: "icon",
202
- className: "h-8 w-8",
203
- onClick: () => q((e) => Math.max(1, e - 1)),
204
- disabled: K === 1,
205
- children: /* @__PURE__ */ b(T, { className: "h-4 w-4" })
206
- }),
207
- /* @__PURE__ */ x("span", {
208
- className: "px-3 text-sm",
209
- children: [
210
- "Page ",
211
- K,
212
- " of ",
213
- $
214
- ]
215
- }),
216
- /* @__PURE__ */ b(h, {
217
- variant: "outline",
218
- size: "icon",
219
- className: "h-8 w-8",
220
- onClick: () => q((e) => Math.min($, e + 1)),
221
- disabled: K === $,
222
- children: /* @__PURE__ */ b(g, { className: "h-4 w-4" })
223
- }),
224
- /* @__PURE__ */ b(h, {
225
- variant: "outline",
226
- size: "icon",
227
- className: "h-8 w-8",
228
- onClick: () => q($),
229
- disabled: K === $,
230
- children: /* @__PURE__ */ b(D, { className: "h-4 w-4" })
231
- })
232
- ]
233
- })]
234
- })
235
- ]
236
- });
237
- }
238
- //#endregion
239
- export { O as t };