@burdenoff/microfe-movethewheels 2026.703.4 → 2026.703.6

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 (150) hide show
  1. package/dist/{AIAssistantPage-3YOnHO9Y.js → AIAssistantPage-BmILdHgO.js} +16 -15
  2. package/dist/AnalyticsPage-BSlsiSDE.js +194 -0
  3. package/dist/{CreateOrderPage-DRAgGo9i.js → CreateOrderPage-DaCgVaO3.js} +40 -40
  4. package/dist/{CustomerDetailsPage-BCeMmOFe.js → CustomerDetailsPage-DErpbafW.js} +71 -71
  5. package/dist/CustomersPage-C1lRU6xs.js +205 -0
  6. package/dist/DashboardPage-Q5-5EKAU.js +542 -0
  7. package/dist/{DataTable-XvUcTjwi.js → DataTable-KjzbwnRL.js} +31 -31
  8. package/dist/{DocumentsCard-U2lSe-cn.js → DocumentsCard-T9y6cv4-.js} +25 -25
  9. package/dist/{DriverDetailsPage-BQrYd_Lp.js → DriverDetailsPage-DnHGkDC7.js} +64 -64
  10. package/dist/DriversPage-C0ujWVOn.js +221 -0
  11. package/dist/FinancePage-CA2XEgsQ.js +175 -0
  12. package/dist/{FleetPage-3ZHsB-TN.js → FleetPage-DrvXW7wK.js} +22 -22
  13. package/dist/{FormError-cuLV2jVD.js → FormError-CRsMP7TQ.js} +1 -1
  14. package/dist/{ImportExportPage-C6f7DqhM.js → ImportExportPage-Cac9HjFx.js} +12 -12
  15. package/dist/InventoryPage-Ezf4gqKI.js +259 -0
  16. package/dist/LiveTrackingPage-CzbVwDqK.js +429 -0
  17. package/dist/{MarketplacePage-Bh_2ns4v.js → MarketplacePage-BHDmSQmo.js} +116 -116
  18. package/dist/MetricCard-DQlDNqmK.js +191 -0
  19. package/dist/{Notice-CSoDYKw9.js → Notice-GmA7JDR3.js} +2 -2
  20. package/dist/{OrderDetailsPage-zCj0lW0j.js → OrderDetailsPage-CR0Wc1aN.js} +58 -58
  21. package/dist/OrdersListPage-C8Bu6wXM.js +386 -0
  22. package/dist/{PageLayout-D4LDHJJq.js → PageLayout-DX1Ou6V6.js} +164 -134
  23. package/dist/{ProductDetailsPage-wsxAQkA0.js → ProductDetailsPage-B_ns2MOe.js} +55 -55
  24. package/dist/ProductsPage-c92BsEoA.js +186 -0
  25. package/dist/ReportsPage-CPLXtLT2.js +377 -0
  26. package/dist/{RouteDetailsPage-DyMJE9AS.js → RouteDetailsPage-DOfcRiFv.js} +208 -181
  27. package/dist/{RoutesPage-Dtc669yc.js → RoutesPage-BZGublby.js} +12 -12
  28. package/dist/{SettingsPage-CpH9xhQg.js → SettingsPage-5cweX_xh.js} +15 -15
  29. package/dist/Sparkline-zSXvG6vA.js +16729 -0
  30. package/dist/{StatusBadge-C87mDpDP.js → StatusBadge-oZjownr1.js} +7 -7
  31. package/dist/TrackingPage-Ln9qVflK.js +368 -0
  32. package/dist/{VehicleDetailsPage-DldYNsYV.js → VehicleDetailsPage-CrkzE0dN.js} +53 -53
  33. package/dist/VehiclesPage-CTQWH7af.js +184 -0
  34. package/dist/{WarehouseDetailsPage-CMG7or6G.js → WarehouseDetailsPage-CwDLaG65.js} +64 -64
  35. package/dist/WarehousesPage-KW02DvZg.js +182 -0
  36. package/dist/{arrow-left-n48Y-Wis.js → arrow-left-DJDw_Yqv.js} +1 -1
  37. package/dist/{arrow-right-Q3XQpTPR.js → arrow-right-Cb2fLTPJ.js} +1 -1
  38. package/dist/{arrow-up-xNF1zJUG.js → arrow-up-PxaOIyiT.js} +1 -1
  39. package/dist/{box-Eu05PXDh.js → box-hSJVtvGf.js} +1 -1
  40. package/dist/boxes-DDnxEkT5.js +54 -0
  41. package/dist/{chart-column-ouzgxIv_.js → chart-column-xXgAZvRl.js} +1 -1
  42. package/dist/charts-CfCwQg6o.js +2018 -0
  43. package/dist/{chevron-left-B2_r0Elx.js → chevron-left-dhEGJYdh.js} +1 -1
  44. package/dist/{chevron-right-eV4LjaSi.js → chevron-right-Cud2NDvm.js} +1 -1
  45. package/dist/chunk-BdsCSvBP.js +20 -0
  46. package/dist/{circle-alert-Bzh2DBSF.js → circle-alert-Rx0p3D5w.js} +1 -1
  47. package/dist/circle-check-BCxRFdFo.js +13 -0
  48. package/dist/{circle-check-big-CGMSpQmD.js → circle-check-big-BcIJ8xjx.js} +1 -1
  49. package/dist/{clock-Bl3ptexL.js → clock-B2_YxJgB.js} +1 -1
  50. package/dist/{dollar-sign-CAVU95SO.js → dollar-sign-CQmAICv4.js} +1 -1
  51. package/dist/{download-C5NbvVDc.js → download-CG4Tponq.js} +1 -1
  52. package/dist/{file-text-D-1uvLZG.js → file-text-CzH-zMub.js} +1 -1
  53. package/dist/{filter-DUfUg6BO.js → filter-C0u2Lwfn.js} +1 -1
  54. package/dist/{fuel-B6_lnKDs.js → fuel-C2KELcM-.js} +1 -1
  55. package/dist/index.css +2 -0
  56. package/dist/index.js +214 -225
  57. package/dist/{map-C-M-FQLR.js → map-FuPu5aTw.js} +1 -1
  58. package/dist/{map-pin-Dznl5l40.js → map-pin-czpLv9uy.js} +1 -1
  59. package/dist/mapMarkers-NCV9MRKR.js +28 -0
  60. package/dist/maps-D9m7PKrs.js +5070 -0
  61. package/dist/{navigation-BJSJl-VG.js → navigation-D5_pdCSS.js} +1 -1
  62. package/dist/{package-CcRttV2N.js → package-B0sdi6lU.js} +1 -1
  63. package/dist/{phone-DVSZHt_j.js → phone-V2nuzPu9.js} +1 -1
  64. package/dist/{plus-C_XZDwBz.js → plus-BqQxkfoU.js} +1 -1
  65. package/dist/{refresh-cw-CfgN67l3.js → refresh-cw-CEOAPEcV.js} +1 -1
  66. package/dist/route-CZWcW-Dw.js +22 -0
  67. package/dist/{save-DJE8Fpdv.js → save-DDFvrxWl.js} +1 -1
  68. package/dist/{search-D_VyGcZT.js → search-D7Ya6jxj.js} +1 -1
  69. package/dist/{square-pen-D-6JYrVQ.js → square-pen-DoZZS4Lw.js} +1 -1
  70. package/dist/{star-BpRlUZuU.js → star-B7PgVu5j.js} +1 -1
  71. package/dist/{store-B-8HMuyZ.js → store-YVzcIG4A.js} +1 -1
  72. package/dist/{trash-2-8vmv-XV_.js → trash-2-BegnBzwI.js} +1 -1
  73. package/dist/{trending-up-Dz6PqPRj.js → trending-up-DBd3XNdb.js} +1 -1
  74. package/dist/{triangle-alert-D7Y3J_4z.js → triangle-alert-Bxk3Kgs6.js} +1 -1
  75. package/dist/{truck-D-y2IDzv.js → truck-Clrn0oHp.js} +1 -1
  76. package/dist/{upload-CHZofOqb.js → upload-Df5JmMwH.js} +1 -1
  77. package/dist/{useAssistant-DVW4QgQb.js → useAssistant-Cb8nnIVC.js} +11 -28
  78. package/dist/{useCustomers-BPW4__PR.js → useCustomers-Dq2IR2HQ.js} +1 -1
  79. package/dist/{useFleet-ChBkxAd6.js → useFleet-CapnWBcA.js} +1 -1
  80. package/dist/{useImportExport-DrPDHEDK.js → useImportExport-BoGzrlJy.js} +1 -1
  81. package/dist/{useInventory-CAAVMRp6.js → useInventory-Ci6M2d9f.js} +1 -1
  82. package/dist/{useOrders-B465S2nt.js → useOrders-BuQU1OHX.js} +1 -1
  83. package/dist/{useReports-jQ3GpNOm.js → useReports-DIx8W7CO.js} +1 -1
  84. package/dist/{useRoutes-hS3d5-xr.js → useRoutes-D7EvI_pm.js} +1 -1
  85. package/dist/{useSettings-BB8X2RLh.js → useSettings-BhX251UQ.js} +6 -6
  86. package/dist/{useTracking-RjGz9PZG.js → useTracking-C40jmZ6W.js} +3 -3
  87. package/dist/{user-DzfTn4dE.js → user-BlcJrbtE.js} +1 -1
  88. package/dist/{user-check-BEKRCi7v.js → user-check-DtnQmimP.js} +1 -1
  89. package/dist/{users-CCrq-w0C.js → users-Cvwko-Dx.js} +1 -1
  90. package/dist/{warehouse-CaqfmMKh.js → warehouse-LWLVTk6G.js} +1 -1
  91. package/dist/{wrench-q_rgJfaP.js → wrench-Cme0RbyR.js} +1 -1
  92. package/dist/{x-tMeDMcCw.js → x-D8C9Pg5V.js} +1 -1
  93. package/package.json +5 -1
  94. package/src/movethewheels/components/GlassPanel.tsx +71 -0
  95. package/src/movethewheels/components/MetricCard.tsx +171 -73
  96. package/src/movethewheels/components/StatusBadge.tsx +7 -6
  97. package/src/movethewheels/components/charts/ChartShell.tsx +78 -0
  98. package/src/movethewheels/components/charts/Sparkline.tsx +85 -0
  99. package/src/movethewheels/components/charts/StatusDonut.tsx +115 -0
  100. package/src/movethewheels/components/charts/TrendChart.tsx +179 -0
  101. package/src/movethewheels/components/charts/VolumeBar.tsx +97 -0
  102. package/src/movethewheels/components/charts/chartTokens.ts +43 -0
  103. package/src/movethewheels/components/charts/index.ts +9 -0
  104. package/src/movethewheels/components/index.ts +44 -1
  105. package/src/movethewheels/components/maps/LogisticsMap.tsx +94 -0
  106. package/src/movethewheels/components/maps/MapCanvas.tsx +118 -0
  107. package/src/movethewheels/components/maps/RouteMap.tsx +71 -0
  108. package/src/movethewheels/components/maps/TrackingMap.tsx +102 -0
  109. package/src/movethewheels/components/maps/index.ts +16 -0
  110. package/src/movethewheels/components/maps/leaflet-setup.ts +124 -0
  111. package/src/movethewheels/components/maps/map-markers.css +121 -0
  112. package/src/movethewheels/hooks/useAnalytics.ts +14 -4
  113. package/src/movethewheels/pages/AnalyticsPage.tsx +93 -73
  114. package/src/movethewheels/pages/CreateOrderPage.tsx +4 -4
  115. package/src/movethewheels/pages/CustomersPage.tsx +29 -20
  116. package/src/movethewheels/pages/DashboardPage.tsx +238 -12
  117. package/src/movethewheels/pages/DriverDetailsPage.tsx +1 -1
  118. package/src/movethewheels/pages/DriversPage.tsx +35 -24
  119. package/src/movethewheels/pages/FinancePage.tsx +68 -30
  120. package/src/movethewheels/pages/InventoryPage.tsx +15 -3
  121. package/src/movethewheels/pages/LiveTrackingPage.tsx +124 -16
  122. package/src/movethewheels/pages/OrdersListPage.tsx +46 -38
  123. package/src/movethewheels/pages/ProductsPage.tsx +28 -24
  124. package/src/movethewheels/pages/ReportsPage.tsx +23 -0
  125. package/src/movethewheels/pages/RouteDetailsPage.tsx +46 -7
  126. package/src/movethewheels/pages/SettingsPage.tsx +2 -2
  127. package/src/movethewheels/pages/TrackingPage.tsx +76 -6
  128. package/src/movethewheels/pages/VehicleDetailsPage.tsx +1 -1
  129. package/src/movethewheels/pages/VehiclesPage.tsx +34 -24
  130. package/src/movethewheels/pages/WarehouseDetailsPage.tsx +1 -1
  131. package/src/movethewheels/pages/WarehousesPage.tsx +28 -22
  132. package/src/movethewheels/types/index.ts +1 -1
  133. package/src/movethewheels/utils/graphqlClient.ts +81 -31
  134. package/src/movethewheels/utils/mapMarkers.ts +58 -0
  135. package/dist/AnalyticsPage-CMpI1070.js +0 -215
  136. package/dist/CustomersPage-CaNBMXmM.js +0 -172
  137. package/dist/DashboardPage-DIKlXde3.js +0 -387
  138. package/dist/DriversPage-PYmdFiby.js +0 -176
  139. package/dist/FinancePage-Cwh9Bw4M.js +0 -136
  140. package/dist/InventoryPage-DpiqVu1v.js +0 -253
  141. package/dist/LiveTrackingPage-FAzzlVnX.js +0 -379
  142. package/dist/MetricCard-CVBVpu7o.js +0 -146
  143. package/dist/OrdersListPage-CAMsuUck.js +0 -384
  144. package/dist/ProductsPage-DC5qDLfz.js +0 -180
  145. package/dist/ReportsPage-BwUJ37eO.js +0 -356
  146. package/dist/TrackingPage-DaNEFG_h.js +0 -325
  147. package/dist/VehiclesPage-BFw13iMt.js +0 -176
  148. package/dist/WarehousesPage-Wkytnt86.js +0 -173
  149. package/dist/useAnalytics-D7HW2XRb.js +0 -347
  150. /package/dist/{formatters-BQr-aR5W.js → formatters-FWJDwTFv.js} +0 -0
@@ -1,19 +1,19 @@
1
- import { A as e, ct as t, d as n, f as r, g as i, h as a, i as o, j as s, l as c, lt as l, n as u, ot as d, r as f, u as p } from "./PageLayout-D4LDHJJq.js";
2
- import { t as m } from "./arrow-left-n48Y-Wis.js";
3
- import { t as h } from "./box-Eu05PXDh.js";
4
- import { t as g } from "./dollar-sign-CAVU95SO.js";
5
- import { t as _ } from "./package-CcRttV2N.js";
6
- import { t as v } from "./save-DJE8Fpdv.js";
7
- import { t as y } from "./square-pen-D-6JYrVQ.js";
8
- import { r as b, t as x } from "./useInventory-CAAVMRp6.js";
9
- import { t as S } from "./FormError-cuLV2jVD.js";
10
- import { n as C } from "./formatters-BQr-aR5W.js";
1
+ import { A as e, d as t, f as n, g as r, h as i, i as a, j as o, l as s, lt as c, n as l, r as u, st as d, u as f, ut as p } from "./PageLayout-DX1Ou6V6.js";
2
+ import { t as m } from "./arrow-left-DJDw_Yqv.js";
3
+ import { t as h } from "./box-hSJVtvGf.js";
4
+ import { t as g } from "./dollar-sign-CQmAICv4.js";
5
+ import { t as _ } from "./package-B0sdi6lU.js";
6
+ import { t as v } from "./save-DDFvrxWl.js";
7
+ import { t as y } from "./square-pen-DoZZS4Lw.js";
8
+ import { r as b, t as x } from "./useInventory-Ci6M2d9f.js";
9
+ import { t as S } from "./FormError-CRsMP7TQ.js";
10
+ import { n as C } from "./formatters-FWJDwTFv.js";
11
11
  import { useState as w } from "react";
12
12
  import { useParams as T } from "react-router-dom";
13
13
  import { jsx as E, jsxs as D } from "react/jsx-runtime";
14
14
  import { EmphasisPanel as O, NextSteps as k, PagePurpose as A } from "@burdenoff/fe-libs/ui";
15
15
  //#region node_modules/lucide-react/dist/esm/icons/tag.js
16
- var j = l("Tag", [["path", {
16
+ var j = p("Tag", [["path", {
17
17
  d: "M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",
18
18
  key: "vktsd0"
19
19
  }], ["circle", {
@@ -26,43 +26,43 @@ var j = l("Tag", [["path", {
26
26
  //#endregion
27
27
  //#region src/movethewheels/pages/ProductDetailsPage.tsx
28
28
  function M() {
29
- let { basePath: n, navigate: r } = d(), { createProduct: i } = x(), [a, c] = w({
29
+ let { basePath: t, navigate: n } = d(), { createProduct: r } = x(), [i, s] = w({
30
30
  name: "",
31
31
  sku: "",
32
32
  category: "",
33
33
  brand: "",
34
34
  weight: ""
35
- }), [l, u] = w(!1), [f, h] = w(null), g = () => r?.(t(n, "inventory/products")), y = async (e) => {
36
- if (e.preventDefault(), !a.name.trim() || !a.sku.trim()) {
35
+ }), [l, u] = w(!1), [p, h] = w(null), g = () => n?.(c(t, "inventory/products")), y = async (e) => {
36
+ if (e.preventDefault(), !i.name.trim() || !i.sku.trim()) {
37
37
  h("Product name and SKU are required.");
38
38
  return;
39
39
  }
40
40
  u(!0), h(null);
41
41
  try {
42
- let e = a.weight.trim() ? Number(a.weight) : void 0, o = await i({
43
- name: a.name.trim(),
44
- sku: a.sku.trim(),
45
- category: a.category.trim() || void 0,
46
- brand: a.brand.trim() || void 0,
42
+ let e = i.weight.trim() ? Number(i.weight) : void 0, a = await r({
43
+ name: i.name.trim(),
44
+ sku: i.sku.trim(),
45
+ category: i.category.trim() || void 0,
46
+ brand: i.brand.trim() || void 0,
47
47
  weight: e !== void 0 && !Number.isNaN(e) ? e : void 0
48
48
  });
49
- r?.(t(n, `inventory/products/${o.id}`));
49
+ n?.(c(t, `inventory/products/${a.id}`));
50
50
  } catch (e) {
51
51
  console.error("Failed to create product:", e), h(e instanceof Error ? e.message : "Failed to create product. Please try again."), u(!1);
52
52
  }
53
53
  };
54
- return /* @__PURE__ */ D(o, {
54
+ return /* @__PURE__ */ D(a, {
55
55
  title: "Add Product",
56
56
  subtitle: "Add an item to your catalog",
57
57
  icon: /* @__PURE__ */ E(_, { size: 24 }),
58
58
  headerActions: /* @__PURE__ */ D("div", {
59
59
  className: "flex gap-2",
60
- children: [/* @__PURE__ */ D(p, {
60
+ children: [/* @__PURE__ */ D(f, {
61
61
  variant: "outline",
62
62
  onClick: g,
63
63
  disabled: l,
64
64
  children: [/* @__PURE__ */ E(m, { size: 16 }), " Cancel"]
65
- }), /* @__PURE__ */ D(p, {
65
+ }), /* @__PURE__ */ D(f, {
66
66
  onClick: y,
67
67
  disabled: l,
68
68
  children: [
@@ -78,7 +78,7 @@ function M() {
78
78
  }), /* @__PURE__ */ D("form", {
79
79
  onSubmit: y,
80
80
  className: "max-w-2xl space-y-6",
81
- children: [/* @__PURE__ */ E(S, { message: f }), /* @__PURE__ */ D(O, { children: [/* @__PURE__ */ E("h2", {
81
+ children: [/* @__PURE__ */ E(S, { message: p }), /* @__PURE__ */ D(O, { children: [/* @__PURE__ */ E("h2", {
82
82
  className: "text-base font-semibold text-text-primary mb-4",
83
83
  children: "Product Details"
84
84
  }), /* @__PURE__ */ D("div", {
@@ -87,7 +87,7 @@ function M() {
87
87
  className: "grid grid-cols-1 md:grid-cols-2 gap-4",
88
88
  children: [/* @__PURE__ */ D("div", {
89
89
  className: "space-y-2",
90
- children: [/* @__PURE__ */ D(s, {
90
+ children: [/* @__PURE__ */ D(o, {
91
91
  htmlFor: "name",
92
92
  children: ["Name ", /* @__PURE__ */ E("span", {
93
93
  className: "text-status-error-text",
@@ -95,8 +95,8 @@ function M() {
95
95
  })]
96
96
  }), /* @__PURE__ */ E(e, {
97
97
  id: "name",
98
- value: a.name,
99
- onChange: (e) => c((t) => ({
98
+ value: i.name,
99
+ onChange: (e) => s((t) => ({
100
100
  ...t,
101
101
  name: e.target.value
102
102
  })),
@@ -105,7 +105,7 @@ function M() {
105
105
  })]
106
106
  }), /* @__PURE__ */ D("div", {
107
107
  className: "space-y-2",
108
- children: [/* @__PURE__ */ D(s, {
108
+ children: [/* @__PURE__ */ D(o, {
109
109
  htmlFor: "sku",
110
110
  children: ["SKU ", /* @__PURE__ */ E("span", {
111
111
  className: "text-status-error-text",
@@ -113,8 +113,8 @@ function M() {
113
113
  })]
114
114
  }), /* @__PURE__ */ E(e, {
115
115
  id: "sku",
116
- value: a.sku,
117
- onChange: (e) => c((t) => ({
116
+ value: i.sku,
117
+ onChange: (e) => s((t) => ({
118
118
  ...t,
119
119
  sku: e.target.value
120
120
  })),
@@ -127,13 +127,13 @@ function M() {
127
127
  children: [
128
128
  /* @__PURE__ */ D("div", {
129
129
  className: "space-y-2",
130
- children: [/* @__PURE__ */ E(s, {
130
+ children: [/* @__PURE__ */ E(o, {
131
131
  htmlFor: "category",
132
132
  children: "Category"
133
133
  }), /* @__PURE__ */ E(e, {
134
134
  id: "category",
135
- value: a.category,
136
- onChange: (e) => c((t) => ({
135
+ value: i.category,
136
+ onChange: (e) => s((t) => ({
137
137
  ...t,
138
138
  category: e.target.value
139
139
  })),
@@ -142,13 +142,13 @@ function M() {
142
142
  }),
143
143
  /* @__PURE__ */ D("div", {
144
144
  className: "space-y-2",
145
- children: [/* @__PURE__ */ E(s, {
145
+ children: [/* @__PURE__ */ E(o, {
146
146
  htmlFor: "brand",
147
147
  children: "Brand"
148
148
  }), /* @__PURE__ */ E(e, {
149
149
  id: "brand",
150
- value: a.brand,
151
- onChange: (e) => c((t) => ({
150
+ value: i.brand,
151
+ onChange: (e) => s((t) => ({
152
152
  ...t,
153
153
  brand: e.target.value
154
154
  })),
@@ -157,7 +157,7 @@ function M() {
157
157
  }),
158
158
  /* @__PURE__ */ D("div", {
159
159
  className: "space-y-2",
160
- children: [/* @__PURE__ */ E(s, {
160
+ children: [/* @__PURE__ */ E(o, {
161
161
  htmlFor: "weight",
162
162
  children: "Weight (kg)"
163
163
  }), /* @__PURE__ */ E(e, {
@@ -165,8 +165,8 @@ function M() {
165
165
  type: "number",
166
166
  min: "0",
167
167
  step: "0.01",
168
- value: a.weight,
169
- onChange: (e) => c((t) => ({
168
+ value: i.weight,
169
+ onChange: (e) => s((t) => ({
170
170
  ...t,
171
171
  weight: e.target.value
172
172
  })),
@@ -180,42 +180,42 @@ function M() {
180
180
  });
181
181
  }
182
182
  function N() {
183
- let { productId: e } = T(), { basePath: s, navigate: l } = d(), { product: v, isLoading: x, error: S, refetch: w } = b(e), N = () => l?.(t(s, "inventory/products")), P = (e) => l?.(t(s, e));
184
- return e ? x ? /* @__PURE__ */ E(f, { message: "Loading product details..." }) : S || !v ? /* @__PURE__ */ E(u, {
183
+ let { productId: e } = T(), { basePath: o, navigate: p } = d(), { product: v, isLoading: x, error: S, refetch: w } = b(e), N = () => p?.(c(o, "inventory/products")), P = (e) => p?.(c(o, e));
184
+ return e ? x ? /* @__PURE__ */ E(u, { message: "Loading product details..." }) : S || !v ? /* @__PURE__ */ E(l, {
185
185
  title: "Product not found",
186
186
  onRetry: w
187
- }) : /* @__PURE__ */ D(o, {
187
+ }) : /* @__PURE__ */ D(a, {
188
188
  title: v.name,
189
189
  subtitle: `SKU: ${v.sku}`,
190
190
  icon: /* @__PURE__ */ E(_, { size: 24 }),
191
191
  headerActions: /* @__PURE__ */ D("div", {
192
192
  className: "flex gap-2",
193
- children: [/* @__PURE__ */ D(p, {
193
+ children: [/* @__PURE__ */ D(f, {
194
194
  variant: "outline",
195
195
  onClick: N,
196
196
  children: [/* @__PURE__ */ E(m, { size: 16 }), " Back"]
197
- }), /* @__PURE__ */ D(p, { children: [/* @__PURE__ */ E(y, { size: 16 }), " Edit"] })]
197
+ }), /* @__PURE__ */ D(f, { children: [/* @__PURE__ */ E(y, { size: 16 }), " Edit"] })]
198
198
  }),
199
199
  headerContent: /* @__PURE__ */ D("div", {
200
200
  className: "flex gap-2",
201
201
  children: [
202
- /* @__PURE__ */ E(c, {
202
+ /* @__PURE__ */ E(s, {
203
203
  variant: "outline",
204
204
  children: v.category
205
205
  }),
206
- v.brand && /* @__PURE__ */ E(c, {
206
+ v.brand && /* @__PURE__ */ E(s, {
207
207
  variant: "secondary",
208
208
  children: v.brand
209
209
  }),
210
- v.fragile && /* @__PURE__ */ E(c, {
210
+ v.fragile && /* @__PURE__ */ E(s, {
211
211
  variant: "destructive",
212
212
  children: "Fragile"
213
213
  }),
214
- v.hazardous && /* @__PURE__ */ E(c, {
214
+ v.hazardous && /* @__PURE__ */ E(s, {
215
215
  variant: "destructive",
216
216
  children: "Hazardous"
217
217
  }),
218
- v.temperatureControlled && /* @__PURE__ */ E(c, {
218
+ v.temperatureControlled && /* @__PURE__ */ E(s, {
219
219
  variant: "secondary",
220
220
  children: "Temp Controlled"
221
221
  })
@@ -247,11 +247,11 @@ function N() {
247
247
  children: [/* @__PURE__ */ D("div", {
248
248
  className: "lg:col-span-2 space-y-6",
249
249
  children: [
250
- /* @__PURE__ */ D(n, { children: [/* @__PURE__ */ E(a, { children: /* @__PURE__ */ E(i, { children: "Description" }) }), /* @__PURE__ */ E(r, { children: /* @__PURE__ */ E("p", { children: v.description }) })] }),
251
- /* @__PURE__ */ D(n, { children: [/* @__PURE__ */ E(a, { children: /* @__PURE__ */ D(i, {
250
+ /* @__PURE__ */ D(t, { children: [/* @__PURE__ */ E(i, { children: /* @__PURE__ */ E(r, { children: "Description" }) }), /* @__PURE__ */ E(n, { children: /* @__PURE__ */ E("p", { children: v.description }) })] }),
251
+ /* @__PURE__ */ D(t, { children: [/* @__PURE__ */ E(i, { children: /* @__PURE__ */ D(r, {
252
252
  className: "flex items-center gap-2",
253
253
  children: [/* @__PURE__ */ E(h, { size: 18 }), " Dimensions & Weight"]
254
- }) }), /* @__PURE__ */ E(r, { children: /* @__PURE__ */ D("div", {
254
+ }) }), /* @__PURE__ */ E(n, { children: /* @__PURE__ */ D("div", {
255
255
  className: "grid grid-cols-2 md:grid-cols-4 gap-4",
256
256
  children: [
257
257
  /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("p", {
@@ -296,10 +296,10 @@ function N() {
296
296
  })] })
297
297
  ]
298
298
  }) })] }),
299
- v.attributes.length > 0 && /* @__PURE__ */ D(n, { children: [/* @__PURE__ */ E(a, { children: /* @__PURE__ */ D(i, {
299
+ v.attributes.length > 0 && /* @__PURE__ */ D(t, { children: [/* @__PURE__ */ E(i, { children: /* @__PURE__ */ D(r, {
300
300
  className: "flex items-center gap-2",
301
301
  children: [/* @__PURE__ */ E(j, { size: 18 }), " Attributes"]
302
- }) }), /* @__PURE__ */ E(r, { children: /* @__PURE__ */ E("div", {
302
+ }) }), /* @__PURE__ */ E(n, { children: /* @__PURE__ */ E("div", {
303
303
  className: "grid grid-cols-2 md:grid-cols-3 gap-4",
304
304
  children: v.attributes.map((e, t) => /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("p", {
305
305
  className: "text-sm text-text-secondary",
@@ -325,7 +325,7 @@ function N() {
325
325
  className: "text-sm text-text-secondary",
326
326
  children: "Unit price"
327
327
  })
328
- ] }), /* @__PURE__ */ D(n, { children: [/* @__PURE__ */ E(a, { children: /* @__PURE__ */ E(i, { children: "Identifiers" }) }), /* @__PURE__ */ D(r, {
328
+ ] }), /* @__PURE__ */ D(t, { children: [/* @__PURE__ */ E(i, { children: /* @__PURE__ */ E(r, { children: "Identifiers" }) }), /* @__PURE__ */ D(n, {
329
329
  className: "space-y-3",
330
330
  children: [/* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("p", {
331
331
  className: "text-sm text-text-secondary",
@@ -0,0 +1,186 @@
1
+ import { i as e, l as t, lt as n, st as r, ut as i } from "./PageLayout-DX1Ou6V6.js";
2
+ import { t as a } from "./DataTable-KjzbwnRL.js";
3
+ import { t as o } from "./download-CG4Tponq.js";
4
+ import { t as s } from "./package-B0sdi6lU.js";
5
+ import { t as c } from "./plus-BqQxkfoU.js";
6
+ import { t as l } from "./refresh-cw-CEOAPEcV.js";
7
+ import { t as u } from "./triangle-alert-Bxk3Kgs6.js";
8
+ import { a as d, i as f } from "./useInventory-Ci6M2d9f.js";
9
+ import { r as p, t as m } from "./MetricCard-DQlDNqmK.js";
10
+ import { n as h } from "./formatters-FWJDwTFv.js";
11
+ import { useState as g } from "react";
12
+ import { jsx as _, jsxs as v } from "react/jsx-runtime";
13
+ import { CTAOverflowMenu as y, PagePurpose as b } from "@burdenoff/fe-libs/ui";
14
+ //#region node_modules/lucide-react/dist/esm/icons/thermometer.js
15
+ var x = i("Thermometer", [["path", {
16
+ d: "M14 4v10.54a4 4 0 1 1-4 0V4a2 2 0 0 1 4 0Z",
17
+ key: "17jzev"
18
+ }]]);
19
+ //#endregion
20
+ //#region src/movethewheels/pages/ProductsPage.tsx
21
+ function S() {
22
+ let { basePath: i, navigate: S } = r(), [C, w] = g(0), [T, E] = g(25), { products: D, hasMore: O, isLoading: k, refetch: A } = d({
23
+ limit: T,
24
+ offset: C * T
25
+ }), { stats: j } = f(), M = (e) => S?.(n(i, e));
26
+ return /* @__PURE__ */ v(e, {
27
+ title: "Products",
28
+ subtitle: `${j.total} products`,
29
+ icon: /* @__PURE__ */ _(s, { size: 24 }),
30
+ headerActions: /* @__PURE__ */ _(y, {
31
+ primary: {
32
+ label: "Add Product",
33
+ icon: /* @__PURE__ */ _(c, { size: 16 }),
34
+ onSelect: () => M("inventory/products/new")
35
+ },
36
+ actions: [{
37
+ label: "Refresh",
38
+ icon: /* @__PURE__ */ _(l, { size: 16 }),
39
+ onSelect: () => A()
40
+ }, {
41
+ label: "Export",
42
+ icon: /* @__PURE__ */ _(o, { size: 16 }),
43
+ onSelect: () => M("import-export")
44
+ }]
45
+ }),
46
+ children: [
47
+ /* @__PURE__ */ _(b, {
48
+ icon: /* @__PURE__ */ _(s, { size: 18 }),
49
+ children: "The catalog of items you ship. Each product's dimensions, weight, value and handling flags (fragile, hazardous, temperature-controlled) drive how it's packed, priced and routed — keep them accurate so shipments are quoted and handled correctly."
50
+ }),
51
+ /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
52
+ className: "mb-3 text-sm font-medium text-text-secondary",
53
+ children: "Catalog at a glance"
54
+ }), /* @__PURE__ */ v(p, {
55
+ columns: 3,
56
+ children: [
57
+ /* @__PURE__ */ _(m, {
58
+ label: "Total products",
59
+ value: j.total,
60
+ icon: /* @__PURE__ */ _(s, { size: 20 }),
61
+ accent: "brand"
62
+ }),
63
+ /* @__PURE__ */ _(m, {
64
+ label: "Special handling",
65
+ value: j.specialHandling,
66
+ icon: /* @__PURE__ */ _(u, { size: 20 }),
67
+ accent: "warning",
68
+ subtitle: "Fragile or hazardous"
69
+ }),
70
+ /* @__PURE__ */ _(m, {
71
+ label: "Temp-controlled",
72
+ value: j.temperatureControlled,
73
+ icon: /* @__PURE__ */ _(x, { size: 20 }),
74
+ accent: "blue"
75
+ })
76
+ ]
77
+ })] }),
78
+ /* @__PURE__ */ _(a, {
79
+ columns: [
80
+ {
81
+ id: "sku",
82
+ header: "SKU",
83
+ accessorKey: "sku",
84
+ sortable: !0,
85
+ cell: (e) => /* @__PURE__ */ _("span", {
86
+ className: "font-mono",
87
+ children: e.sku
88
+ })
89
+ },
90
+ {
91
+ id: "name",
92
+ header: "Product Name",
93
+ accessorKey: "name",
94
+ sortable: !0,
95
+ cell: (e) => /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
96
+ className: "font-medium",
97
+ children: e.name
98
+ }), /* @__PURE__ */ _("p", {
99
+ className: "text-sm text-text-secondary line-clamp-1",
100
+ children: e.description
101
+ })] })
102
+ },
103
+ {
104
+ id: "category",
105
+ header: "Category",
106
+ accessorKey: "category",
107
+ sortable: !0,
108
+ cell: (e) => /* @__PURE__ */ _(t, {
109
+ variant: "outline",
110
+ children: e.category
111
+ })
112
+ },
113
+ {
114
+ id: "dimensions",
115
+ header: "Dimensions",
116
+ cell: (e) => `${e.dimensions.length}x${e.dimensions.width}x${e.dimensions.height} ${e.dimensions.unit}`
117
+ },
118
+ {
119
+ id: "weight",
120
+ header: "Weight",
121
+ accessorKey: "weight",
122
+ sortable: !0,
123
+ cell: (e) => `${e.weight} kg`
124
+ },
125
+ {
126
+ id: "value",
127
+ header: "Value",
128
+ accessorKey: "value",
129
+ sortable: !0,
130
+ cell: (e) => /* @__PURE__ */ _("span", {
131
+ className: "font-medium",
132
+ children: h(e.value)
133
+ })
134
+ },
135
+ {
136
+ id: "flags",
137
+ header: "Flags",
138
+ cell: (e) => /* @__PURE__ */ v("div", {
139
+ className: "flex gap-1",
140
+ children: [
141
+ e.fragile && /* @__PURE__ */ _(t, {
142
+ variant: "destructive",
143
+ className: "text-xs",
144
+ children: "Fragile"
145
+ }),
146
+ e.hazardous && /* @__PURE__ */ _(t, {
147
+ variant: "destructive",
148
+ className: "text-xs",
149
+ children: "Hazardous"
150
+ }),
151
+ e.temperatureControlled && /* @__PURE__ */ _(t, {
152
+ variant: "secondary",
153
+ className: "text-xs",
154
+ children: "Temp Control"
155
+ })
156
+ ]
157
+ })
158
+ }
159
+ ],
160
+ data: D,
161
+ isLoading: k,
162
+ searchable: !0,
163
+ searchPlaceholder: "Search products...",
164
+ searchFields: [
165
+ "name",
166
+ "sku",
167
+ "category"
168
+ ],
169
+ onRowClick: (e) => M(`inventory/products/${e.id}`),
170
+ getRowId: (e) => e.id,
171
+ pageIndex: C,
172
+ pageSize: T,
173
+ onPageChange: w,
174
+ onPageSizeChange: (e) => {
175
+ E(e), w(0);
176
+ },
177
+ hasNextPage: O,
178
+ emptyIllustration: "empty-files",
179
+ emptyTitle: "No products yet",
180
+ emptyDescription: "Add products to your catalog so they can be added to orders and stocked in warehouses."
181
+ })
182
+ ]
183
+ });
184
+ }
185
+ //#endregion
186
+ export { S as default };