@burdenoff/microfe-movethewheels 2026.703.3 → 2026.703.5

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 (173) hide show
  1. package/dist/{AIAssistantPage-C3cPsWt-.js → AIAssistantPage-D2gaEL1U.js} +16 -15
  2. package/dist/AnalyticsPage-DZMlEoBi.js +194 -0
  3. package/dist/CreateOrderPage-CWHx8yys.js +490 -0
  4. package/dist/CustomerDetailsPage-nR4oZ_ju.js +615 -0
  5. package/dist/CustomersPage-Bbvwvn8k.js +205 -0
  6. package/dist/DashboardPage-DrEhNf7N.js +542 -0
  7. package/dist/DataTable-CqMUD4er.js +340 -0
  8. package/dist/DocumentsCard-edDkgnJj.js +169 -0
  9. package/dist/DriverDetailsPage-whEMOWs9.js +490 -0
  10. package/dist/DriversPage-CHF2ZEzd.js +221 -0
  11. package/dist/FinancePage-Dn9GrW-1.js +175 -0
  12. package/dist/{FleetPage-DqkFi3s3.js → FleetPage-CrtGPy-p.js} +36 -35
  13. package/dist/{FormError-BlOjnXOq.js → FormError-BKcb_wT-.js} +1 -1
  14. package/dist/{ImportExportPage-DKJRCezl.js → ImportExportPage-WYdwZomZ.js} +52 -72
  15. package/dist/InventoryPage-l5A1f753.js +259 -0
  16. package/dist/LiveTrackingPage-DhEaNKZ4.js +429 -0
  17. package/dist/MarketplacePage-B9RYOb1Y.js +426 -0
  18. package/dist/MetricCard-y3bWHKUQ.js +191 -0
  19. package/dist/Notice-DOO-tjpV.js +46 -0
  20. package/dist/OrderDetailsPage-CwYHwk1K.js +584 -0
  21. package/dist/OrdersListPage-DhZJoQeI.js +386 -0
  22. package/dist/{PageLayout-D4LDHJJq.js → PageLayout-BniRJaQ6.js} +1 -1
  23. package/dist/{ProductDetailsPage-C9uOiYLp.js → ProductDetailsPage-1Gm9JKy0.js} +56 -56
  24. package/dist/ProductsPage-C8sn-1tN.js +186 -0
  25. package/dist/ReportsPage-D1tb0dcz.js +377 -0
  26. package/dist/RouteDetailsPage-CkMyR9b_.js +610 -0
  27. package/dist/{RoutesPage-DMfoicM1.js → RoutesPage-QkENzsE5.js} +58 -47
  28. package/dist/{SettingsPage-Bn-v0mbQ.js → SettingsPage-DV3_tU_X.js} +16 -38
  29. package/dist/Sparkline-K2RMJ58u.js +16729 -0
  30. package/dist/{StatusBadge-BZurYHMy.js → StatusBadge-BNHXYvZx.js} +7 -7
  31. package/dist/TrackingPage-BZrg4RCu.js +368 -0
  32. package/dist/VehicleDetailsPage-D-8XPZ2G.js +393 -0
  33. package/dist/VehiclesPage-D5BELbtM.js +184 -0
  34. package/dist/{WarehouseDetailsPage-L_6sWigM.js → WarehouseDetailsPage-Cmg-8Frn.js} +70 -70
  35. package/dist/WarehousesPage-C1Y1M867.js +182 -0
  36. package/dist/{arrow-left-n48Y-Wis.js → arrow-left-ClW4Isj7.js} +1 -1
  37. package/dist/arrow-right-CmKOmIkh.js +11 -0
  38. package/dist/arrow-up-BJijRLAZ.js +17 -0
  39. package/dist/{box-D9Pal4HM.js → box-BT3NsRQP.js} +1 -1
  40. package/dist/boxes-B_OGvQiW.js +54 -0
  41. package/dist/{chart-column-BFIJysDR.js → chart-column-DQTTdUPk.js} +1 -1
  42. package/dist/charts-Tj_PPTfA.js +2018 -0
  43. package/dist/chevron-left-B1rZyWWb.js +8 -0
  44. package/dist/{chevron-right-EMIIyyJ1.js → chevron-right-BIcwUJZq.js} +1 -1
  45. package/dist/chunk-BdsCSvBP.js +20 -0
  46. package/dist/{circle-alert-iY24lSlp.js → circle-alert-CNkuDNc6.js} +1 -1
  47. package/dist/circle-check-Cs1OVjtV.js +13 -0
  48. package/dist/{circle-check-big-w0TrLKMF.js → circle-check-big-C-p4eNwn.js} +1 -1
  49. package/dist/{clock-DJZtdl8u.js → clock-dRGG4rkF.js} +1 -1
  50. package/dist/{dollar-sign-CgKQRz_e.js → dollar-sign-B6RoYHHz.js} +1 -1
  51. package/dist/{download-DRXxoiQR.js → download-DP04iWTd.js} +1 -1
  52. package/dist/{file-text-DWWY6_f5.js → file-text-BuDx4hZp.js} +1 -1
  53. package/dist/{filter-DloLC2eE.js → filter-BD483_8g.js} +1 -1
  54. package/dist/{wrench-CANXWxF-.js → fuel-DLH1ag04.js} +3 -6
  55. package/dist/index.css +2 -0
  56. package/dist/index.js +150 -172
  57. package/dist/{map-CkJaULb2.js → map-DNQn9fyY.js} +1 -1
  58. package/dist/{map-pin-BGiCvyCs.js → map-pin-CqN1bbT1.js} +1 -1
  59. package/dist/mapMarkers-NCV9MRKR.js +28 -0
  60. package/dist/maps-yzLqiK_C.js +5070 -0
  61. package/dist/{navigation-D36prnAn.js → navigation-CgGUt2tR.js} +1 -1
  62. package/dist/{package-BChUzpJS.js → package-DmRF7iQD.js} +1 -1
  63. package/dist/{phone-Ac9s3mo_.js → phone-Cl32EXKW.js} +1 -1
  64. package/dist/{plus-Z76q-FZm.js → plus-DlANgOFx.js} +1 -1
  65. package/dist/{refresh-cw-DKt6f5T6.js → refresh-cw-rW59D4b7.js} +1 -1
  66. package/dist/route-CWjPrtAN.js +22 -0
  67. package/dist/{save-CojywNhG.js → save-UDlog7hg.js} +1 -1
  68. package/dist/{search-CDGefqb3.js → search-DNIG5Ck7.js} +1 -1
  69. package/dist/{square-pen-CopE9GmB.js → square-pen-BcfB3Grd.js} +1 -1
  70. package/dist/{star-nHlLjDKR.js → star-CVZHFwDx.js} +1 -1
  71. package/dist/{store-BR9Voi5E.js → store-bwnmCK9f.js} +1 -1
  72. package/dist/{trash-2-BKhar6Hs.js → trash-2-B80G12d4.js} +1 -1
  73. package/dist/{trending-up-Dohgd4t_.js → trending-up-CH4R4KOa.js} +1 -1
  74. package/dist/{triangle-alert-i-XQL9Rd.js → triangle-alert-CmS8AUU6.js} +1 -1
  75. package/dist/{truck-C0v_hbLR.js → truck-9rLDncav.js} +1 -1
  76. package/dist/upload-DanJY1Vo.js +21 -0
  77. package/dist/{useAssistant-D4v3oxD3.js → useAssistant-CnEwkTLm.js} +11 -28
  78. package/dist/{useCustomers-BmTNGxiI.js → useCustomers-ChJao1ET.js} +30 -27
  79. package/dist/{useFleet-DKqXZ16m.js → useFleet-g5Yri0G8.js} +82 -70
  80. package/dist/{useImportExport-DHr-SWSw.js → useImportExport-MYwIT3rE.js} +1 -1
  81. package/dist/{useInventory-DkyiVY_A.js → useInventory-BSOn-R1c.js} +84 -39
  82. package/dist/{useOrders-Cfk1GLiq.js → useOrders-BSiqo61w.js} +59 -48
  83. package/dist/{useReports-CTqZr-AB.js → useReports-fWESfsF9.js} +41 -35
  84. package/dist/{useRoutes-BQWO607N.js → useRoutes-zD8Yp323.js} +50 -42
  85. package/dist/{useSettings-CkDH_-gM.js → useSettings-B1lsWeZ1.js} +6 -6
  86. package/dist/{useTracking-B-va1kO3.js → useTracking-BKG0I2ln.js} +3 -3
  87. package/dist/{user-jyFU3lXk.js → user-DU51el3m.js} +1 -1
  88. package/dist/user-check-IMhk-qkX.js +20 -0
  89. package/dist/{users-DZ-ilS6B.js → users-B8KhJBGg.js} +1 -1
  90. package/dist/{warehouse-6m5kXMLu.js → warehouse-CcMMioeY.js} +1 -1
  91. package/dist/wrench-Dg-sgH2e.js +8 -0
  92. package/dist/x-C4ObLVEa.js +11 -0
  93. package/package.json +5 -1
  94. package/src/movethewheels/components/DataTable.tsx +252 -84
  95. package/src/movethewheels/components/DocumentsCard.tsx +102 -0
  96. package/src/movethewheels/components/GlassPanel.tsx +71 -0
  97. package/src/movethewheels/components/MetricCard.tsx +171 -73
  98. package/src/movethewheels/components/Notice.tsx +61 -0
  99. package/src/movethewheels/components/StatusBadge.tsx +7 -6
  100. package/src/movethewheels/components/charts/ChartShell.tsx +78 -0
  101. package/src/movethewheels/components/charts/Sparkline.tsx +85 -0
  102. package/src/movethewheels/components/charts/StatusDonut.tsx +115 -0
  103. package/src/movethewheels/components/charts/TrendChart.tsx +179 -0
  104. package/src/movethewheels/components/charts/VolumeBar.tsx +97 -0
  105. package/src/movethewheels/components/charts/chartTokens.ts +43 -0
  106. package/src/movethewheels/components/charts/index.ts +9 -0
  107. package/src/movethewheels/components/index.ts +51 -1
  108. package/src/movethewheels/components/maps/LogisticsMap.tsx +94 -0
  109. package/src/movethewheels/components/maps/MapCanvas.tsx +118 -0
  110. package/src/movethewheels/components/maps/RouteMap.tsx +71 -0
  111. package/src/movethewheels/components/maps/TrackingMap.tsx +102 -0
  112. package/src/movethewheels/components/maps/index.ts +16 -0
  113. package/src/movethewheels/components/maps/leaflet-setup.ts +124 -0
  114. package/src/movethewheels/components/maps/map-markers.css +121 -0
  115. package/src/movethewheels/hooks/index.ts +9 -0
  116. package/src/movethewheels/hooks/useAnalytics.ts +109 -4
  117. package/src/movethewheels/hooks/useCustomers.ts +11 -4
  118. package/src/movethewheels/hooks/useEntityDocuments.ts +132 -0
  119. package/src/movethewheels/hooks/useFleet.ts +26 -7
  120. package/src/movethewheels/hooks/useInventory.ts +70 -7
  121. package/src/movethewheels/hooks/useOrders.ts +32 -2
  122. package/src/movethewheels/hooks/useReports.ts +14 -4
  123. package/src/movethewheels/hooks/useRoutes.ts +20 -3
  124. package/src/movethewheels/pages/AnalyticsPage.tsx +93 -73
  125. package/src/movethewheels/pages/CreateOrderPage.tsx +48 -20
  126. package/src/movethewheels/pages/CustomerDetailsPage.tsx +239 -33
  127. package/src/movethewheels/pages/CustomersPage.tsx +53 -28
  128. package/src/movethewheels/pages/DashboardPage.tsx +238 -12
  129. package/src/movethewheels/pages/DriverDetailsPage.tsx +17 -31
  130. package/src/movethewheels/pages/DriversPage.tsx +59 -31
  131. package/src/movethewheels/pages/FinancePage.tsx +103 -82
  132. package/src/movethewheels/pages/InventoryPage.tsx +15 -3
  133. package/src/movethewheels/pages/LiveTrackingPage.tsx +124 -16
  134. package/src/movethewheels/pages/MarketplacePage.tsx +265 -50
  135. package/src/movethewheels/pages/OrderDetailsPage.tsx +214 -10
  136. package/src/movethewheels/pages/OrdersListPage.tsx +118 -47
  137. package/src/movethewheels/pages/ProductsPage.tsx +52 -28
  138. package/src/movethewheels/pages/ReportsPage.tsx +88 -4
  139. package/src/movethewheels/pages/RouteDetailsPage.tsx +119 -19
  140. package/src/movethewheels/pages/RoutesPage.tsx +22 -6
  141. package/src/movethewheels/pages/SettingsPage.tsx +5 -21
  142. package/src/movethewheels/pages/TrackingPage.tsx +76 -6
  143. package/src/movethewheels/pages/VehicleDetailsPage.tsx +4 -34
  144. package/src/movethewheels/pages/VehiclesPage.tsx +58 -27
  145. package/src/movethewheels/pages/WarehouseDetailsPage.tsx +1 -1
  146. package/src/movethewheels/pages/WarehousesPage.tsx +47 -36
  147. package/src/movethewheels/types/index.ts +9 -1
  148. package/src/movethewheels/utils/download.ts +62 -0
  149. package/src/movethewheels/utils/mapMarkers.ts +58 -0
  150. package/dist/AnalyticsPage-Dz6g2MvK.js +0 -215
  151. package/dist/CreateOrderPage-C5iwnjp4.js +0 -479
  152. package/dist/CustomerDetailsPage-B6nwFyLO.js +0 -406
  153. package/dist/CustomersPage-BKxMS1AV.js +0 -161
  154. package/dist/DashboardPage-BVjQi0EB.js +0 -387
  155. package/dist/DataTable-DmciIKKM.js +0 -249
  156. package/dist/DriverDetailsPage-CN3WQ0B9.js +0 -507
  157. package/dist/DriversPage-CH9rjQC-.js +0 -165
  158. package/dist/FinancePage-DEDykSOP.js +0 -158
  159. package/dist/InventoryPage-e0ze63iX.js +0 -253
  160. package/dist/LiveTrackingPage-DCX-K-LR.js +0 -379
  161. package/dist/MarketplacePage-CIQ97_zp.js +0 -247
  162. package/dist/MetricCard-BY0QrMD4.js +0 -146
  163. package/dist/OrderDetailsPage-DYiZ-9UK.js +0 -429
  164. package/dist/OrdersListPage-Cn90P1Xx.js +0 -307
  165. package/dist/ProductsPage-QJfHHpqB.js +0 -169
  166. package/dist/ReportsPage-Zp53q3_8.js +0 -284
  167. package/dist/RouteDetailsPage-DUStXSf9.js +0 -531
  168. package/dist/TrackingPage-W-jtdM3Y.js +0 -325
  169. package/dist/VehicleDetailsPage-Bceo5oz3.js +0 -410
  170. package/dist/VehiclesPage-ApKThYeG.js +0 -165
  171. package/dist/WarehousesPage-DCbXXXWE.js +0 -162
  172. package/dist/useAnalytics-DS8n0xgg.js +0 -297
  173. /package/dist/{formatters-CF2S2l1m.js → formatters-FWJDwTFv.js} +0 -0
@@ -1,15 +1,17 @@
1
- import { d as e, f as t, g as n, h as r, i, l as a, lt as o, u as s } from "./PageLayout-D4LDHJJq.js";
2
- import { t as c } from "./download-DRXxoiQR.js";
3
- import { t as l } from "./file-text-DWWY6_f5.js";
4
- import { t as u } from "./useImportExport-DHr-SWSw.js";
5
- import { useRef as d, useState as f } from "react";
6
- import { jsx as p, jsxs as m } from "react/jsx-runtime";
7
- import { EmphasisPanel as h, IllustratedEmptyState as g, PagePurpose as _ } from "@burdenoff/fe-libs/ui";
1
+ import { d as e, f as t, g as n, h as r, i, l as a, u as o, ut as s } from "./PageLayout-BniRJaQ6.js";
2
+ import { t as c } from "./download-DP04iWTd.js";
3
+ import { t as l } from "./file-text-BuDx4hZp.js";
4
+ import { t as u } from "./upload-DanJY1Vo.js";
5
+ import { t as d } from "./x-C4ObLVEa.js";
6
+ import { t as f } from "./useImportExport-MYwIT3rE.js";
7
+ import { useRef as p, useState as m } from "react";
8
+ import { jsx as h, jsxs as g } from "react/jsx-runtime";
9
+ import { EmphasisPanel as _, IllustratedEmptyState as v, PagePurpose as y } from "@burdenoff/fe-libs/ui";
8
10
  //#region node_modules/lucide-react/dist/esm/icons/check.js
9
- var v = o("Check", [["path", {
11
+ var b = s("Check", [["path", {
10
12
  d: "M20 6 9 17l-5-5",
11
13
  key: "1gmf2c"
12
- }]]), y = o("FileSpreadsheet", [
14
+ }]]), x = s("FileSpreadsheet", [
13
15
  ["path", {
14
16
  d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",
15
17
  key: "1rqfz7"
@@ -34,29 +36,7 @@ var v = o("Check", [["path", {
34
36
  d: "M14 17h2",
35
37
  key: "10kma7"
36
38
  }]
37
- ]), b = o("Upload", [
38
- ["path", {
39
- d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",
40
- key: "ih7n3h"
41
- }],
42
- ["polyline", {
43
- points: "17 8 12 3 7 8",
44
- key: "t8dd8p"
45
- }],
46
- ["line", {
47
- x1: "12",
48
- x2: "12",
49
- y1: "3",
50
- y2: "15",
51
- key: "widbto"
52
- }]
53
- ]), x = o("X", [["path", {
54
- d: "M18 6 6 18",
55
- key: "1bl5f8"
56
- }], ["path", {
57
- d: "m6 6 12 12",
58
- key: "d8bk6v"
59
- }]]), S = [
39
+ ]), S = [
60
40
  {
61
41
  name: "Orders",
62
42
  description: "Import orders from CSV or JSON",
@@ -104,10 +84,10 @@ var v = o("Check", [["path", {
104
84
  }
105
85
  ];
106
86
  function w() {
107
- let { exportData: o, importData: w, isBusy: T } = u(), [E, D] = f([]), [O, k] = f(null), A = d(null), j = d(null), M = (e) => D((t) => [e, ...t]), N = async (e, t) => {
87
+ let { exportData: s, importData: w, isBusy: T } = f(), [E, D] = m([]), [O, k] = m(null), A = p(null), j = p(null), M = (e) => D((t) => [e, ...t]), N = async (e, t) => {
108
88
  k(`${e.resource}:${t}`);
109
89
  try {
110
- let n = await o(e.resource, t);
90
+ let n = await s(e.resource, t);
111
91
  if (n.success && n.payload) {
112
92
  let r = JSON.stringify(n.payload, null, 2), i = new Blob([r], { type: "application/json" }), a = URL.createObjectURL(i), o = document.createElement("a");
113
93
  o.href = a, o.download = `${e.resource}-export.${t.toLowerCase() === "csv" ? "csv" : "json"}`, document.body.appendChild(o), o.click(), o.remove(), URL.revokeObjectURL(a);
@@ -133,16 +113,16 @@ function w() {
133
113
  }, P = (e) => {
134
114
  j.current = e, A.current?.click();
135
115
  };
136
- return /* @__PURE__ */ m(i, {
116
+ return /* @__PURE__ */ g(i, {
137
117
  title: "Import / Export",
138
118
  subtitle: "Import and export your data",
139
- icon: /* @__PURE__ */ p(l, { size: 24 }),
119
+ icon: /* @__PURE__ */ h(l, { size: 24 }),
140
120
  children: [
141
- /* @__PURE__ */ p(_, {
142
- icon: /* @__PURE__ */ p(l, { size: 18 }),
121
+ /* @__PURE__ */ h(y, {
122
+ icon: /* @__PURE__ */ h(l, { size: 18 }),
143
123
  children: "Move data in and out in bulk. Import orders, customers, products or inventory from CSV/JSON to onboard or migrate without re-keying, and export any dataset for accounting, BI tools or backups — no manual copy-paste required."
144
124
  }),
145
- /* @__PURE__ */ p("input", {
125
+ /* @__PURE__ */ h("input", {
146
126
  ref: A,
147
127
  type: "file",
148
128
  accept: ".csv,.json,application/json,text/csv",
@@ -177,65 +157,65 @@ function w() {
177
157
  }
178
158
  }
179
159
  }),
180
- /* @__PURE__ */ m("div", {
160
+ /* @__PURE__ */ g("div", {
181
161
  className: "grid grid-cols-1 lg:grid-cols-2 gap-6",
182
- children: [/* @__PURE__ */ m(h, {
162
+ children: [/* @__PURE__ */ g(_, {
183
163
  className: "space-y-4",
184
- children: [/* @__PURE__ */ m("h2", {
164
+ children: [/* @__PURE__ */ g("h2", {
185
165
  className: "flex items-center gap-2 text-base font-semibold text-text-primary",
186
- children: [/* @__PURE__ */ p(b, { size: 18 }), " Import Data"]
187
- }), /* @__PURE__ */ p("div", {
166
+ children: [/* @__PURE__ */ h(u, { size: 18 }), " Import Data"]
167
+ }), /* @__PURE__ */ h("div", {
188
168
  className: "space-y-4",
189
- children: S.map((e) => /* @__PURE__ */ m("div", {
169
+ children: S.map((e) => /* @__PURE__ */ g("div", {
190
170
  className: "flex items-center justify-between p-4 border rounded-lg hover:border-primary/50 transition-colors",
191
- children: [/* @__PURE__ */ m("div", {
171
+ children: [/* @__PURE__ */ g("div", {
192
172
  className: "flex items-center gap-3",
193
- children: [/* @__PURE__ */ p("div", {
173
+ children: [/* @__PURE__ */ h("div", {
194
174
  className: "w-10 h-10 rounded-lg bg-action-primary-bg/10 flex items-center justify-center",
195
- children: /* @__PURE__ */ p(y, {
175
+ children: /* @__PURE__ */ h(x, {
196
176
  size: 20,
197
177
  className: "text-primary"
198
178
  })
199
- }), /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("p", {
179
+ }), /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("p", {
200
180
  className: "font-medium",
201
181
  children: e.name
202
- }), /* @__PURE__ */ p("p", {
182
+ }), /* @__PURE__ */ h("p", {
203
183
  className: "text-sm text-text-secondary",
204
184
  children: e.description
205
185
  })] })]
206
- }), /* @__PURE__ */ m("div", {
186
+ }), /* @__PURE__ */ g("div", {
207
187
  className: "text-right",
208
- children: [/* @__PURE__ */ p(a, {
188
+ children: [/* @__PURE__ */ h(a, {
209
189
  variant: "outline",
210
190
  children: "CSV, JSON"
211
- }), /* @__PURE__ */ p(s, {
191
+ }), /* @__PURE__ */ h(o, {
212
192
  variant: "outline",
213
193
  size: "sm",
214
194
  className: "ml-2",
215
195
  "aria-label": `Import ${e.name}`,
216
196
  disabled: T,
217
197
  onClick: () => P(e),
218
- children: /* @__PURE__ */ p(b, { size: 14 })
198
+ children: /* @__PURE__ */ h(u, { size: 14 })
219
199
  })]
220
200
  })]
221
201
  }, e.name))
222
202
  })]
223
- }), /* @__PURE__ */ m(e, { children: [/* @__PURE__ */ p(r, { children: /* @__PURE__ */ m(n, {
203
+ }), /* @__PURE__ */ g(e, { children: [/* @__PURE__ */ h(r, { children: /* @__PURE__ */ g(n, {
224
204
  className: "flex items-center gap-2",
225
- children: [/* @__PURE__ */ p(c, { size: 18 }), " Export Data"]
226
- }) }), /* @__PURE__ */ p(t, {
205
+ children: [/* @__PURE__ */ h(c, { size: 18 }), " Export Data"]
206
+ }) }), /* @__PURE__ */ h(t, {
227
207
  className: "space-y-4",
228
- children: C.map((e) => /* @__PURE__ */ m("div", {
208
+ children: C.map((e) => /* @__PURE__ */ g("div", {
229
209
  className: "flex items-center justify-between p-4 border rounded-lg hover:border-primary/50 transition-colors",
230
- children: [/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("p", {
210
+ children: [/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("p", {
231
211
  className: "font-medium",
232
212
  children: e.name
233
- }), /* @__PURE__ */ p("p", {
213
+ }), /* @__PURE__ */ h("p", {
234
214
  className: "text-sm text-text-secondary",
235
215
  children: e.description
236
- })] }), /* @__PURE__ */ p("div", {
216
+ })] }), /* @__PURE__ */ h("div", {
237
217
  className: "flex gap-1",
238
- children: e.formats.map((t) => /* @__PURE__ */ p(s, {
218
+ children: e.formats.map((t) => /* @__PURE__ */ h(o, {
239
219
  variant: "outline",
240
220
  size: "sm",
241
221
  disabled: O === `${e.resource}:${t}`,
@@ -246,26 +226,26 @@ function w() {
246
226
  }, e.name))
247
227
  })] })]
248
228
  }),
249
- /* @__PURE__ */ m(e, { children: [/* @__PURE__ */ p(r, { children: /* @__PURE__ */ p(n, { children: "Recent Activity" }) }), /* @__PURE__ */ p(t, { children: E.length === 0 ? /* @__PURE__ */ p(g, {
229
+ /* @__PURE__ */ g(e, { children: [/* @__PURE__ */ h(r, { children: /* @__PURE__ */ h(n, { children: "Recent Activity" }) }), /* @__PURE__ */ h(t, { children: E.length === 0 ? /* @__PURE__ */ h(v, {
250
230
  illustration: "empty-data",
251
231
  title: "No import or export activity yet",
252
232
  description: "Your recent imports and exports will show up here once you run one."
253
- }) : /* @__PURE__ */ p("div", {
233
+ }) : /* @__PURE__ */ h("div", {
254
234
  className: "space-y-3",
255
- children: E.map((e, t) => /* @__PURE__ */ m("div", {
235
+ children: E.map((e, t) => /* @__PURE__ */ g("div", {
256
236
  className: "flex items-center justify-between p-3 bg-bg-sunken/50 rounded-lg",
257
- children: [/* @__PURE__ */ m("div", {
237
+ children: [/* @__PURE__ */ g("div", {
258
238
  className: "flex items-center gap-3",
259
- children: [e.type === "import" ? /* @__PURE__ */ p(b, {
239
+ children: [e.type === "import" ? /* @__PURE__ */ h(u, {
260
240
  size: 16,
261
241
  className: "text-primary"
262
- }) : /* @__PURE__ */ p(c, {
242
+ }) : /* @__PURE__ */ h(c, {
263
243
  size: 16,
264
244
  className: "text-primary"
265
- }), /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("p", {
245
+ }), /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("p", {
266
246
  className: "font-medium",
267
247
  children: e.name
268
- }), /* @__PURE__ */ m("p", {
248
+ }), /* @__PURE__ */ g("p", {
269
249
  className: "text-sm text-text-secondary",
270
250
  children: [
271
251
  e.type === "import" ? "Imported" : "Exported",
@@ -276,10 +256,10 @@ function w() {
276
256
  e.message
277
257
  ]
278
258
  })] })]
279
- }), /* @__PURE__ */ m(a, {
259
+ }), /* @__PURE__ */ g(a, {
280
260
  variant: e.success ? "default" : "destructive",
281
261
  className: "gap-1",
282
- children: [e.success ? /* @__PURE__ */ p(v, { size: 12 }) : /* @__PURE__ */ p(x, { size: 12 }), e.success ? "done" : "failed"]
262
+ children: [e.success ? /* @__PURE__ */ h(b, { size: 12 }) : /* @__PURE__ */ h(d, { size: 12 }), e.success ? "done" : "failed"]
283
263
  })]
284
264
  }, t))
285
265
  }) })] })
@@ -0,0 +1,259 @@
1
+ import { M as e, a as t, d as n, f as r, i, l as a, lt as o, st as s, u as c } from "./PageLayout-BniRJaQ6.js";
2
+ import { t as l } from "./boxes-B_OGvQiW.js";
3
+ import { t as u } from "./chevron-right-BIcwUJZq.js";
4
+ import { t as d } from "./dollar-sign-B6RoYHHz.js";
5
+ import { t as f } from "./package-DmRF7iQD.js";
6
+ import { t as p } from "./plus-DlANgOFx.js";
7
+ import { t as m } from "./triangle-alert-CmS8AUU6.js";
8
+ import { t as h } from "./warehouse-CcMMioeY.js";
9
+ import { n as g, t as _ } from "./useInventory-BSOn-R1c.js";
10
+ import { n as v, r as y, t as b } from "./MetricCard-y3bWHKUQ.js";
11
+ import { n as x } from "./formatters-FWJDwTFv.js";
12
+ import { jsx as S, jsxs as C } from "react/jsx-runtime";
13
+ import { CTAOverflowMenu as w, EmphasisPanel as T, PagePurpose as E } from "@burdenoff/fe-libs/ui";
14
+ import { useI18n as D } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
15
+ //#region src/movethewheels/pages/InventoryPage.tsx
16
+ function O() {
17
+ let { t: O } = D(), k = (e, t) => {
18
+ let n = O(e);
19
+ return n === e ? t : n;
20
+ }, { basePath: A, navigate: j } = s(), { inventory: M, products: N, warehouses: P, isLoading: F, error: I, refetch: L } = _(), { stats: R } = g(), z = (e) => j?.(o(A, e)), B = (e, t) => {
21
+ (e.key === "Enter" || e.key === " ") && (e.preventDefault(), t());
22
+ }, V = M.filter((e) => e.availableQuantity <= e.reorderLevel);
23
+ return /* @__PURE__ */ C(i, {
24
+ title: k("movethewheels.inventory.title", "Inventory"),
25
+ subtitle: k("movethewheels.inventory.subtitle", "Manage your products and warehouses"),
26
+ icon: /* @__PURE__ */ S(f, { size: 24 }),
27
+ headerActions: /* @__PURE__ */ S(w, {
28
+ primary: {
29
+ label: k("movethewheels.inventory.actions.addProduct", "Add Product"),
30
+ icon: /* @__PURE__ */ S(p, { size: 16 }),
31
+ onSelect: () => z("inventory/products/new")
32
+ },
33
+ actions: [{
34
+ label: k("movethewheels.inventory.actions.products", "Products"),
35
+ onSelect: () => z("inventory/products")
36
+ }, {
37
+ label: k("movethewheels.inventory.actions.warehouses", "Warehouses"),
38
+ onSelect: () => z("inventory/warehouses")
39
+ }]
40
+ }),
41
+ children: [
42
+ /* @__PURE__ */ S(E, {
43
+ icon: /* @__PURE__ */ S(f, { size: 18 }),
44
+ children: k("movethewheels.inventory.purpose", "A real-time view of what you have and where. Track stock value and quantities across warehouses, catch low-stock items before they run out, and drill into products or warehouses to manage what you can promise on an order.")
45
+ }),
46
+ I && !F ? /* @__PURE__ */ S(n, {
47
+ className: "border-status-error-border",
48
+ children: /* @__PURE__ */ C(r, {
49
+ className: "p-6 text-center space-y-3",
50
+ children: [
51
+ /* @__PURE__ */ S("p", {
52
+ className: "text-status-error-text font-medium",
53
+ children: k("movethewheels.inventory.error.title", "Couldn't load inventory")
54
+ }),
55
+ /* @__PURE__ */ S("p", {
56
+ className: "text-sm text-text-secondary",
57
+ children: I.message
58
+ }),
59
+ /* @__PURE__ */ S(c, {
60
+ variant: "outline",
61
+ onClick: L,
62
+ children: k("movethewheels.inventory.error.retry", "Retry")
63
+ })
64
+ ]
65
+ })
66
+ }) : F ? /* @__PURE__ */ S(y, {
67
+ columns: 4,
68
+ children: Array.from({ length: 4 }).map((e, t) => /* @__PURE__ */ S(v, {}, t))
69
+ }) : /* @__PURE__ */ C(y, {
70
+ columns: 4,
71
+ children: [
72
+ /* @__PURE__ */ S(b, {
73
+ label: k("movethewheels.inventory.metrics.totalProducts", "Total Products"),
74
+ value: R.totalProducts,
75
+ icon: /* @__PURE__ */ S(f, { size: 20 }),
76
+ accent: "brand",
77
+ onClick: () => z("inventory/products")
78
+ }),
79
+ /* @__PURE__ */ S(b, {
80
+ label: k("movethewheels.inventory.metrics.totalItems", "Total Items"),
81
+ value: R.totalItems.toLocaleString(),
82
+ icon: /* @__PURE__ */ S(l, { size: 20 }),
83
+ accent: "success"
84
+ }),
85
+ /* @__PURE__ */ S(b, {
86
+ label: k("movethewheels.inventory.metrics.inventoryValue", "Inventory Value"),
87
+ value: x(R.totalValue),
88
+ icon: /* @__PURE__ */ S(d, { size: 20 }),
89
+ accent: "blue"
90
+ }),
91
+ /* @__PURE__ */ S(b, {
92
+ label: k("movethewheels.inventory.metrics.warehouses", "Warehouses"),
93
+ value: R.totalWarehouses,
94
+ icon: /* @__PURE__ */ S(h, { size: 20 }),
95
+ accent: "neutral",
96
+ onClick: () => z("inventory/warehouses")
97
+ })
98
+ ]
99
+ }),
100
+ V.length > 0 && /* @__PURE__ */ C(T, {
101
+ className: "space-y-4",
102
+ children: [/* @__PURE__ */ C("h2", {
103
+ className: "flex items-center gap-2 text-base font-semibold text-status-warning-text",
104
+ children: [
105
+ /* @__PURE__ */ S(m, { size: 18 }),
106
+ k("movethewheels.inventory.lowStock.title", "Low Stock Alert"),
107
+ " (",
108
+ V.length,
109
+ " ",
110
+ k("movethewheels.inventory.lowStock.items", "items"),
111
+ ")"
112
+ ]
113
+ }), /* @__PURE__ */ S("div", { children: /* @__PURE__ */ S("div", {
114
+ className: "space-y-3",
115
+ children: V.slice(0, 5).map((e) => {
116
+ let t = N.find((t) => t.id === e.productId);
117
+ return /* @__PURE__ */ C("div", {
118
+ className: "flex items-center justify-between p-3 bg-status-warning-bg/10 rounded-lg",
119
+ children: [/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
120
+ className: "font-medium",
121
+ children: t?.name || k("movethewheels.inventory.lowStock.unknownProduct", "Unknown Product")
122
+ }), /* @__PURE__ */ C("p", {
123
+ className: "text-sm text-text-secondary",
124
+ children: [
125
+ k("movethewheels.inventory.lowStock.sku", "SKU:"),
126
+ " ",
127
+ t?.sku
128
+ ]
129
+ })] }), /* @__PURE__ */ C("div", {
130
+ className: "text-right",
131
+ children: [/* @__PURE__ */ C("p", {
132
+ className: "font-medium text-status-warning-text",
133
+ children: [
134
+ e.availableQuantity,
135
+ " ",
136
+ k("movethewheels.inventory.lowStock.left", "left")
137
+ ]
138
+ }), /* @__PURE__ */ C("p", {
139
+ className: "text-sm text-text-secondary",
140
+ children: [
141
+ k("movethewheels.inventory.lowStock.reorderAt", "Reorder at:"),
142
+ " ",
143
+ e.reorderLevel
144
+ ]
145
+ })]
146
+ })]
147
+ }, e.id);
148
+ })
149
+ }) })]
150
+ }),
151
+ /* @__PURE__ */ C("div", {
152
+ className: "grid grid-cols-1 lg:grid-cols-2 gap-6",
153
+ children: [/* @__PURE__ */ S(t, {
154
+ title: k("movethewheels.inventory.warehouses.title", "Warehouses"),
155
+ actions: /* @__PURE__ */ C(c, {
156
+ variant: "ghost",
157
+ size: "sm",
158
+ onClick: () => z("inventory/warehouses"),
159
+ children: [
160
+ k("movethewheels.inventory.common.viewAll", "View all"),
161
+ " ",
162
+ /* @__PURE__ */ S(u, { size: 16 })
163
+ ]
164
+ }),
165
+ children: /* @__PURE__ */ S(n, { children: /* @__PURE__ */ S(r, {
166
+ className: "p-0",
167
+ children: /* @__PURE__ */ S("div", {
168
+ className: "divide-y",
169
+ children: P.map((t) => /* @__PURE__ */ S("div", {
170
+ role: "button",
171
+ tabIndex: 0,
172
+ "aria-label": `View warehouse ${t.name}`,
173
+ className: "p-4 hover:bg-bg-sunken/50 cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-action-primary-bg",
174
+ onClick: () => z(`inventory/warehouses/${t.id}`),
175
+ onKeyDown: (e) => B(e, () => z(`inventory/warehouses/${t.id}`)),
176
+ children: /* @__PURE__ */ C("div", {
177
+ className: "flex items-center justify-between",
178
+ children: [/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
179
+ className: "font-medium",
180
+ children: t.name
181
+ }), /* @__PURE__ */ C("p", {
182
+ className: "text-sm text-text-secondary",
183
+ children: [
184
+ t.address.city,
185
+ ", ",
186
+ t.address.state
187
+ ]
188
+ })] }), /* @__PURE__ */ C("div", {
189
+ className: "text-right",
190
+ children: [/* @__PURE__ */ S(a, {
191
+ variant: t.isActive ? "default" : "secondary",
192
+ children: t.isActive ? k("movethewheels.inventory.warehouses.active", "Active") : k("movethewheels.inventory.warehouses.inactive", "Inactive")
193
+ }), /* @__PURE__ */ C("div", {
194
+ className: "mt-2",
195
+ children: [/* @__PURE__ */ S("p", {
196
+ className: "text-xs text-text-secondary",
197
+ children: k("movethewheels.inventory.warehouses.utilization", "Utilization")
198
+ }), /* @__PURE__ */ S(e, {
199
+ value: t.capacity.usedSpace / t.capacity.totalSpace * 100,
200
+ className: "w-24 h-2"
201
+ })]
202
+ })]
203
+ })]
204
+ })
205
+ }, t.id))
206
+ })
207
+ }) })
208
+ }), /* @__PURE__ */ S(t, {
209
+ title: k("movethewheels.inventory.products.title", "Recent Products"),
210
+ actions: /* @__PURE__ */ C(c, {
211
+ variant: "ghost",
212
+ size: "sm",
213
+ onClick: () => z("inventory/products"),
214
+ children: [
215
+ k("movethewheels.inventory.common.viewAll", "View all"),
216
+ " ",
217
+ /* @__PURE__ */ S(u, { size: 16 })
218
+ ]
219
+ }),
220
+ children: /* @__PURE__ */ S(n, { children: /* @__PURE__ */ S(r, {
221
+ className: "p-0",
222
+ children: /* @__PURE__ */ S("div", {
223
+ className: "divide-y",
224
+ children: N.slice(0, 5).map((e) => /* @__PURE__ */ S("div", {
225
+ role: "button",
226
+ tabIndex: 0,
227
+ "aria-label": `View product ${e.name}`,
228
+ className: "p-4 hover:bg-bg-sunken/50 cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-action-primary-bg",
229
+ onClick: () => z(`inventory/products/${e.id}`),
230
+ onKeyDown: (t) => B(t, () => z(`inventory/products/${e.id}`)),
231
+ children: /* @__PURE__ */ C("div", {
232
+ className: "flex items-center justify-between",
233
+ children: [/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
234
+ className: "font-medium",
235
+ children: e.name
236
+ }), /* @__PURE__ */ S("p", {
237
+ className: "text-sm text-text-secondary",
238
+ children: e.sku
239
+ })] }), /* @__PURE__ */ C("div", {
240
+ className: "text-right",
241
+ children: [/* @__PURE__ */ S("p", {
242
+ className: "font-medium",
243
+ children: x(e.value)
244
+ }), /* @__PURE__ */ S(a, {
245
+ variant: "outline",
246
+ children: e.category
247
+ })]
248
+ })]
249
+ })
250
+ }, e.id))
251
+ })
252
+ }) })
253
+ })]
254
+ })
255
+ ]
256
+ });
257
+ }
258
+ //#endregion
259
+ export { O as default };