@burdenoff/microfe-movethewheels 2026.920.3 → 2026.923.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 (79) hide show
  1. package/dist/components/CarbonFootprintPanel.js +1 -1
  2. package/dist/components/CustomerPicker.js +76 -65
  3. package/dist/components/DataTable.js +140 -139
  4. package/dist/components/DocumentsCard.js +14 -8
  5. package/dist/generated/wspace-types.d.ts +2719 -8
  6. package/dist/hooks/index.js +1 -1
  7. package/dist/hooks/useAnalytics.js +21 -1
  8. package/dist/hooks/useCustomers.js +94 -78
  9. package/dist/hooks/useDebouncedValue.js +11 -0
  10. package/dist/hooks/useEntityDocuments.js +28 -18
  11. package/dist/hooks/useEpod.js +24 -17
  12. package/dist/hooks/useFleet.js +148 -125
  13. package/dist/hooks/useInventory.js +255 -186
  14. package/dist/hooks/useMultiModalShipments.js +35 -27
  15. package/dist/hooks/useOrders.js +139 -134
  16. package/dist/hooks/useRoutes.js +97 -75
  17. package/dist/hooks/useTracking.js +100 -88
  18. package/dist/index.js +6 -6
  19. package/dist/movethewheels/components/CustomerPicker.d.ts +3 -1
  20. package/dist/movethewheels/components/DataTable.d.ts +5 -1
  21. package/dist/movethewheels/hooks/useCustomers.d.ts +0 -1
  22. package/dist/movethewheels/hooks/useDebouncedValue.d.ts +1 -0
  23. package/dist/movethewheels/hooks/useEntityDocuments.d.ts +2 -0
  24. package/dist/movethewheels/hooks/useEpod.d.ts +6 -1
  25. package/dist/movethewheels/hooks/useFleet.d.ts +49 -5
  26. package/dist/movethewheels/hooks/useInventory.d.ts +24 -17
  27. package/dist/movethewheels/hooks/useMultiModalShipments.d.ts +6 -1
  28. package/dist/movethewheels/hooks/useOrders.d.ts +48 -5
  29. package/dist/movethewheels/hooks/useRoutes.d.ts +18 -1
  30. package/dist/movethewheels/hooks/useTracking.d.ts +12 -11
  31. package/dist/movethewheels/types/index.d.ts +12 -5
  32. package/dist/pages/CreateOrderPage.js +191 -129
  33. package/dist/pages/CustomersPage.js +61 -54
  34. package/dist/pages/DeliveryCapturePage.js +131 -109
  35. package/dist/pages/DriversPage.js +100 -92
  36. package/dist/pages/InventoryPage.js +239 -236
  37. package/dist/pages/MultiModalShipmentPage.js +163 -130
  38. package/dist/pages/OrderDetailsPage.js +190 -106
  39. package/dist/pages/OrdersListPage.js +66 -60
  40. package/dist/pages/ProductDetailsPage.js +241 -200
  41. package/dist/pages/ProductsPage.js +59 -52
  42. package/dist/pages/RouteDetailsPage.js +324 -293
  43. package/dist/pages/RoutesPage.js +55 -48
  44. package/dist/pages/VehiclesPage.js +63 -56
  45. package/dist/pages/WarehousesPage.js +60 -53
  46. package/package.json +1 -1
  47. package/src/generated/wspace-types.ts +3136 -8
  48. package/src/movethewheels/components/CarbonFootprintPanel.tsx +0 -1
  49. package/src/movethewheels/components/CustomerPicker.tsx +14 -0
  50. package/src/movethewheels/components/DataTable.tsx +34 -18
  51. package/src/movethewheels/components/DocumentsCard.tsx +6 -1
  52. package/src/movethewheels/components/maps/leaflet-setup.ts +1 -8
  53. package/src/movethewheels/hooks/useAnalytics.ts +27 -0
  54. package/src/movethewheels/hooks/useCustomers.ts +64 -24
  55. package/src/movethewheels/hooks/useDebouncedValue.ts +12 -0
  56. package/src/movethewheels/hooks/useEntityDocuments.ts +43 -25
  57. package/src/movethewheels/hooks/useEpod.ts +14 -7
  58. package/src/movethewheels/hooks/useFleet.ts +66 -38
  59. package/src/movethewheels/hooks/useFleetIntelligence.ts +1 -4
  60. package/src/movethewheels/hooks/useInventory.ts +211 -90
  61. package/src/movethewheels/hooks/useMultiModalShipments.ts +15 -11
  62. package/src/movethewheels/hooks/useOrders.ts +48 -14
  63. package/src/movethewheels/hooks/useRoutes.ts +81 -24
  64. package/src/movethewheels/hooks/useTracking.ts +130 -98
  65. package/src/movethewheels/pages/CreateOrderPage.tsx +93 -2
  66. package/src/movethewheels/pages/CustomersPage.tsx +11 -1
  67. package/src/movethewheels/pages/DeliveryCapturePage.tsx +31 -1
  68. package/src/movethewheels/pages/DriversPage.tsx +24 -12
  69. package/src/movethewheels/pages/InventoryPage.tsx +57 -32
  70. package/src/movethewheels/pages/MultiModalShipmentPage.tsx +52 -3
  71. package/src/movethewheels/pages/OrderDetailsPage.tsx +91 -6
  72. package/src/movethewheels/pages/OrdersListPage.tsx +20 -3
  73. package/src/movethewheels/pages/ProductDetailsPage.tsx +52 -3
  74. package/src/movethewheels/pages/ProductsPage.tsx +11 -1
  75. package/src/movethewheels/pages/RouteDetailsPage.tsx +45 -5
  76. package/src/movethewheels/pages/RoutesPage.tsx +11 -1
  77. package/src/movethewheels/pages/VehiclesPage.tsx +19 -2
  78. package/src/movethewheels/pages/WarehousesPage.tsx +11 -1
  79. package/src/movethewheels/types/index.ts +12 -5
@@ -12,75 +12,77 @@ import { PageLayout as d } from "../components/PageLayout.js";
12
12
  import { MetricCard as f, MetricGrid as p } from "../components/MetricCard.js";
13
13
  import { DataTable as m } from "../components/DataTable.js";
14
14
  import { formatCurrency as h } from "../utils/formatters.js";
15
- import { useState as g } from "react";
16
- import { jsx as _, jsxs as v } from "react/jsx-runtime";
17
- import { CTAOverflowMenu as y, PagePurpose as b } from "@burdenoff/fe-libs/ui";
15
+ import { useDebouncedValue as g } from "../hooks/useDebouncedValue.js";
16
+ import { useState as _ } from "react";
17
+ import { jsx as v, jsxs as y } from "react/jsx-runtime";
18
+ import { CTAOverflowMenu as b, PagePurpose as x } from "@burdenoff/fe-libs/ui";
18
19
  //#region src/movethewheels/pages/ProductsPage.tsx
19
- function x() {
20
- let { basePath: x, navigate: S } = s(), [C, w] = g(0), [T, E] = g(25), { products: D, hasMore: O, isLoading: k, error: A, refetch: j } = l({
21
- limit: T,
22
- offset: C * T
23
- }), { stats: M } = c(), N = (e) => S?.(o(x, e));
24
- return /* @__PURE__ */ v(d, {
20
+ function S() {
21
+ let { basePath: S, navigate: C } = s(), [w, T] = _(0), [E, D] = _(25), [O, k] = _(""), A = g(O), { products: j, totalProducts: M, hasMore: N, isLoading: P, error: F, refetch: I } = l({
22
+ limit: E,
23
+ offset: w * E,
24
+ search: A
25
+ }), { stats: L } = c(), R = (e) => C?.(o(S, e));
26
+ return /* @__PURE__ */ y(d, {
25
27
  title: "Products",
26
- subtitle: `${M.total} products`,
27
- icon: /* @__PURE__ */ _(t, { size: 24 }),
28
- headerActions: /* @__PURE__ */ _(y, {
28
+ subtitle: `${L.total} products`,
29
+ icon: /* @__PURE__ */ v(t, { size: 24 }),
30
+ headerActions: /* @__PURE__ */ v(b, {
29
31
  primary: {
30
32
  label: "Add Product",
31
- icon: /* @__PURE__ */ _(n, { size: 16 }),
32
- onSelect: () => N("inventory/products/new")
33
+ icon: /* @__PURE__ */ v(n, { size: 16 }),
34
+ onSelect: () => R("inventory/products/new")
33
35
  },
34
36
  actions: [{
35
37
  label: "Refresh",
36
- icon: /* @__PURE__ */ _(r, { size: 16 }),
37
- onSelect: () => j()
38
+ icon: /* @__PURE__ */ v(r, { size: 16 }),
39
+ onSelect: () => I()
38
40
  }, {
39
41
  label: "Export",
40
- icon: /* @__PURE__ */ _(e, { size: 16 }),
41
- onSelect: () => N("import-export")
42
+ icon: /* @__PURE__ */ v(e, { size: 16 }),
43
+ onSelect: () => R("import-export")
42
44
  }]
43
45
  }),
44
46
  children: [
45
- /* @__PURE__ */ _(b, {
46
- icon: /* @__PURE__ */ _(t, { size: 18 }),
47
+ /* @__PURE__ */ v(x, {
48
+ icon: /* @__PURE__ */ v(t, { size: 18 }),
47
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."
48
50
  }),
49
- /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
51
+ /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
50
52
  className: "mb-3 text-sm font-medium text-text-secondary",
51
53
  children: "Catalog at a glance"
52
- }), /* @__PURE__ */ v(p, {
54
+ }), /* @__PURE__ */ y(p, {
53
55
  columns: 3,
54
56
  children: [
55
- /* @__PURE__ */ _(f, {
57
+ /* @__PURE__ */ v(f, {
56
58
  label: "Total products",
57
- value: M.total,
58
- icon: /* @__PURE__ */ _(t, { size: 20 }),
59
+ value: L.total,
60
+ icon: /* @__PURE__ */ v(t, { size: 20 }),
59
61
  accent: "brand"
60
62
  }),
61
- /* @__PURE__ */ _(f, {
63
+ /* @__PURE__ */ v(f, {
62
64
  label: "Special handling",
63
- value: M.specialHandling,
64
- icon: /* @__PURE__ */ _(a, { size: 20 }),
65
+ value: L.specialHandling,
66
+ icon: /* @__PURE__ */ v(a, { size: 20 }),
65
67
  accent: "warning",
66
68
  subtitle: "Fragile or hazardous"
67
69
  }),
68
- /* @__PURE__ */ _(f, {
70
+ /* @__PURE__ */ v(f, {
69
71
  label: "Temp-controlled",
70
- value: M.temperatureControlled,
71
- icon: /* @__PURE__ */ _(i, { size: 20 }),
72
+ value: L.temperatureControlled,
73
+ icon: /* @__PURE__ */ v(i, { size: 20 }),
72
74
  accent: "blue"
73
75
  })
74
76
  ]
75
77
  })] }),
76
- /* @__PURE__ */ _(m, {
78
+ /* @__PURE__ */ v(m, {
77
79
  columns: [
78
80
  {
79
81
  id: "sku",
80
82
  header: "SKU",
81
83
  accessorKey: "sku",
82
84
  sortable: !0,
83
- cell: (e) => /* @__PURE__ */ _("span", {
85
+ cell: (e) => /* @__PURE__ */ v("span", {
84
86
  className: "font-mono",
85
87
  children: e.sku
86
88
  })
@@ -90,10 +92,10 @@ function x() {
90
92
  header: "Product Name",
91
93
  accessorKey: "name",
92
94
  sortable: !0,
93
- cell: (e) => /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
95
+ cell: (e) => /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
94
96
  className: "font-medium",
95
97
  children: e.name
96
- }), /* @__PURE__ */ _("p", {
98
+ }), /* @__PURE__ */ v("p", {
97
99
  className: "text-sm text-text-secondary line-clamp-1",
98
100
  children: e.description
99
101
  })] })
@@ -103,7 +105,7 @@ function x() {
103
105
  header: "Category",
104
106
  accessorKey: "category",
105
107
  sortable: !0,
106
- cell: (e) => /* @__PURE__ */ _(u, {
108
+ cell: (e) => /* @__PURE__ */ v(u, {
107
109
  variant: "outline",
108
110
  children: e.category
109
111
  })
@@ -125,7 +127,7 @@ function x() {
125
127
  header: "Value",
126
128
  accessorKey: "value",
127
129
  sortable: !0,
128
- cell: (e) => /* @__PURE__ */ _("span", {
130
+ cell: (e) => /* @__PURE__ */ v("span", {
129
131
  className: "font-medium",
130
132
  children: h(e.value)
131
133
  })
@@ -133,20 +135,20 @@ function x() {
133
135
  {
134
136
  id: "flags",
135
137
  header: "Flags",
136
- cell: (e) => /* @__PURE__ */ v("div", {
138
+ cell: (e) => /* @__PURE__ */ y("div", {
137
139
  className: "flex gap-1",
138
140
  children: [
139
- e.fragile && /* @__PURE__ */ _(u, {
141
+ e.fragile && /* @__PURE__ */ v(u, {
140
142
  variant: "destructive",
141
143
  className: "text-xs",
142
144
  children: "Fragile"
143
145
  }),
144
- e.hazardous && /* @__PURE__ */ _(u, {
146
+ e.hazardous && /* @__PURE__ */ v(u, {
145
147
  variant: "destructive",
146
148
  className: "text-xs",
147
149
  children: "Hazardous"
148
150
  }),
149
- e.temperatureControlled && /* @__PURE__ */ _(u, {
151
+ e.temperatureControlled && /* @__PURE__ */ v(u, {
150
152
  variant: "secondary",
151
153
  className: "text-xs",
152
154
  children: "Temp Control"
@@ -155,10 +157,10 @@ function x() {
155
157
  })
156
158
  }
157
159
  ],
158
- data: D,
159
- isLoading: k,
160
- error: A,
161
- onRetry: j,
160
+ data: j,
161
+ isLoading: P,
162
+ error: F,
163
+ onRetry: I,
162
164
  searchable: !0,
163
165
  searchPlaceholder: "Search products...",
164
166
  searchFields: [
@@ -166,15 +168,20 @@ function x() {
166
168
  "sku",
167
169
  "category"
168
170
  ],
169
- onRowClick: (e) => N(`inventory/products/${e.id}`),
171
+ searchQuery: O,
172
+ onSearchQueryChange: (e) => {
173
+ k(e), T(0);
174
+ },
175
+ onRowClick: (e) => R(`inventory/products/${e.id}`),
170
176
  getRowId: (e) => e.id,
171
- pageIndex: C,
172
- pageSize: T,
173
- onPageChange: w,
177
+ pageIndex: w,
178
+ pageSize: E,
179
+ onPageChange: T,
174
180
  onPageSizeChange: (e) => {
175
- E(e), w(0);
181
+ D(e), T(0);
176
182
  },
177
- hasNextPage: O,
183
+ totalItems: M,
184
+ hasNextPage: N,
178
185
  emptyIllustration: "empty-files",
179
186
  emptyTitle: "No products yet",
180
187
  emptyDescription: "Add products to your catalog so they can be added to orders and stocked in warehouses."
@@ -183,4 +190,4 @@ function x() {
183
190
  });
184
191
  }
185
192
  //#endregion
186
- export { x as default };
193
+ export { S as default };