@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
@@ -1,23 +1,25 @@
1
1
  import { Calculator as e } from "../node_modules/lucide-react/dist/esm/icons/calculator.js";
2
- import { Plane as t } from "../node_modules/lucide-react/dist/esm/icons/plane.js";
3
- import { Plus as n } from "../node_modules/lucide-react/dist/esm/icons/plus.js";
4
- import { Ship as r } from "../node_modules/lucide-react/dist/esm/icons/ship.js";
5
- import { TrainFront as i } from "../node_modules/lucide-react/dist/esm/icons/train-front.js";
2
+ import { ChevronLeft as t } from "../node_modules/lucide-react/dist/esm/icons/chevron-left.js";
3
+ import { ChevronRight as n } from "../node_modules/lucide-react/dist/esm/icons/chevron-right.js";
4
+ import { Plane as r } from "../node_modules/lucide-react/dist/esm/icons/plane.js";
5
+ import { Plus as i } from "../node_modules/lucide-react/dist/esm/icons/plus.js";
6
+ import { Ship as a } from "../node_modules/lucide-react/dist/esm/icons/ship.js";
7
+ import { TrainFront as o } from "../node_modules/lucide-react/dist/esm/icons/train-front.js";
6
8
  import { Trash2 as ee } from "../node_modules/lucide-react/dist/esm/icons/trash-2.js";
7
- import { Truck as a } from "../node_modules/lucide-react/dist/esm/icons/truck.js";
8
- import { Badge as o, Button as s, Card as c, CardContent as l, CardHeader as u, CardTitle as d, Input as f, Label as p, Select as m, SelectContent as h, SelectItem as g, SelectTrigger as _, SelectValue as v, Separator as te } from "../components/ui.js";
9
- import { EmptyState as ne, LoadingState as y, PageLayout as b, PageSection as x } from "../components/PageLayout.js";
10
- import { FormError as S } from "../components/FormError.js";
11
- import { useMultiModalShipments as re } from "../hooks/useMultiModalShipments.js";
12
- import { useState as C } from "react";
13
- import { Fragment as w, jsx as T, jsxs as E } from "react/jsx-runtime";
14
- import { EmphasisPanel as D, PagePurpose as O } from "@burdenoff/fe-libs/ui";
9
+ import { Truck as s } from "../node_modules/lucide-react/dist/esm/icons/truck.js";
10
+ import { Badge as c, Button as l, Card as u, CardContent as d, CardHeader as f, CardTitle as p, Input as m, Label as h, Select as g, SelectContent as _, SelectItem as v, SelectTrigger as y, SelectValue as b, Separator as x } from "../components/ui.js";
11
+ import { EmptyState as te, LoadingState as ne, PageLayout as S, PageSection as C } from "../components/PageLayout.js";
12
+ import { FormError as w } from "../components/FormError.js";
13
+ import { useMultiModalShipments as T } from "../hooks/useMultiModalShipments.js";
14
+ import { useState as E } from "react";
15
+ import { Fragment as re, jsx as D, jsxs as O } from "react/jsx-runtime";
16
+ import { EmphasisPanel as ie, PagePurpose as ae } from "@burdenoff/fe-libs/ui";
15
17
  //#region src/movethewheels/pages/MultiModalShipmentPage.tsx
16
18
  var k = {
17
- ROAD: a,
18
- AIR: t,
19
- OCEAN: r,
20
- RAIL: i
19
+ ROAD: s,
20
+ AIR: r,
21
+ OCEAN: a,
22
+ RAIL: o
21
23
  }, A = {
22
24
  ROAD: "Road",
23
25
  AIR: "Air",
@@ -43,210 +45,213 @@ function M(e, t) {
43
45
  }
44
46
  }
45
47
  function N() {
46
- let { shipments: t, isLoading: i, error: a, calculateFreightRate: N, planMultiModalShipment: P } = re(), [F, I] = C(""), [L, R] = C(""), [z, B] = C(""), [V, H] = C([j()]), [U, W] = C({}), [G, K] = C({}), [q, J] = C(!1), [Y, X] = C(null), [Z, Q] = C(null), $ = (e, t) => {
47
- H((n) => n.map((n, r) => r === e ? {
48
+ let [r, o] = E(0), { shipments: s, totalShipments: N, hasMore: oe, isLoading: P, error: F, calculateFreightRate: I, planMultiModalShipment: se } = T({
49
+ limit: 10,
50
+ offset: r * 10
51
+ }), [L, R] = E(""), [z, B] = E(""), [V, H] = E(""), [U, W] = E([j()]), [G, K] = E({}), [ce, q] = E({}), [J, Y] = E(!1), [le, X] = E(null), [Z, Q] = E(null), $ = (e, t) => {
52
+ W((n) => n.map((n, r) => r === e ? {
48
53
  ...n,
49
54
  ...t
50
- } : n)), W((t) => ({
55
+ } : n)), K((t) => ({
51
56
  ...t,
52
57
  [e]: null
53
58
  }));
54
- }, ie = () => H((e) => [...e, j()]), ae = (e) => {
55
- H((t) => t.filter((t, n) => n !== e)), W((t) => {
59
+ }, ue = () => W((e) => [...e, j()]), de = (e) => {
60
+ W((t) => t.filter((t, n) => n !== e)), K((t) => {
56
61
  let n = { ...t };
57
62
  return delete n[e], n;
58
63
  });
59
- }, oe = async (e) => {
60
- let t = V[e];
64
+ }, fe = async (e) => {
65
+ let t = U[e];
61
66
  if (t) {
62
- K((t) => ({
67
+ q((t) => ({
63
68
  ...t,
64
69
  [e]: null
65
70
  }));
66
71
  try {
67
- let n = await N(t);
68
- W((t) => ({
72
+ let n = await I(t);
73
+ K((t) => ({
69
74
  ...t,
70
75
  [e]: n
71
76
  }));
72
77
  } catch (t) {
73
- K((n) => ({
78
+ q((n) => ({
74
79
  ...n,
75
80
  [e]: t instanceof Error ? t.message : "Failed to calculate rate"
76
81
  }));
77
82
  }
78
83
  }
79
- }, se = Object.values(U).reduce((e, t) => e + (t?.calculatedCost ?? 0), 0), ce = new Set(V.map((e) => e.mode));
80
- return /* @__PURE__ */ E(b, {
84
+ }, pe = Object.values(G).reduce((e, t) => e + (t?.calculatedCost ?? 0), 0), me = new Set(U.map((e) => e.mode));
85
+ return /* @__PURE__ */ O(S, {
81
86
  hero: !0,
82
87
  titleAccent: "Multi-Modal Freight",
83
88
  title: "Multi-Modal Freight",
84
89
  subtitle: "Plan a shipment across road, air, ocean and rail legs with real per-mode rate calculation",
85
- icon: /* @__PURE__ */ T(r, { size: 24 }),
90
+ icon: /* @__PURE__ */ D(a, { size: 24 }),
86
91
  children: [
87
- /* @__PURE__ */ T(O, {
88
- icon: /* @__PURE__ */ T(r, { size: 18 }),
92
+ /* @__PURE__ */ D(ae, {
93
+ icon: /* @__PURE__ */ D(a, { size: 18 }),
89
94
  children: "Compose a single shipment from multiple real transport legs — each leg picks its own mode (road/air/ocean/rail) and gets priced with that mode's real pricing driver (air: chargeable weight; ocean: revenue-ton or per-container; rail: tonne-km; road: distance + weight). Calculate a leg's rate before booking, then plan the full multi-leg shipment in one step."
90
95
  }),
91
- /* @__PURE__ */ T(D, { children: "Live carrier booking/API integration is out of scope for this core (it needs named-carrier partnership agreements) — this plans the shipment and its legs with real calculated costs that your ops team can then execute against your chosen carriers." }),
92
- /* @__PURE__ */ T(x, {
96
+ /* @__PURE__ */ D(ie, { children: "Live carrier booking/API integration is out of scope for this core (it needs named-carrier partnership agreements) — this plans the shipment and its legs with real calculated costs that your ops team can then execute against your chosen carriers." }),
97
+ /* @__PURE__ */ D(C, {
93
98
  title: "Plan a New Multi-Modal Shipment",
94
- children: /* @__PURE__ */ T(c, { children: /* @__PURE__ */ T(l, { children: /* @__PURE__ */ E("form", {
99
+ children: /* @__PURE__ */ D(u, { children: /* @__PURE__ */ D(d, { children: /* @__PURE__ */ O("form", {
95
100
  onSubmit: async (e) => {
96
- if (e.preventDefault(), X(null), Q(null), !F.trim()) {
101
+ if (e.preventDefault(), X(null), Q(null), !L.trim()) {
97
102
  X("Shipment number is required.");
98
103
  return;
99
104
  }
100
- if (V.length === 0) {
105
+ if (U.length === 0) {
101
106
  X("Add at least one transport leg.");
102
107
  return;
103
108
  }
104
- J(!0);
109
+ Y(!0);
105
110
  try {
106
- let e = await P({
107
- shipmentNumber: F.trim(),
108
- origin: { address: L },
109
- destination: { address: z },
110
- legs: V
111
+ let e = await se({
112
+ shipmentNumber: L.trim(),
113
+ origin: { address: z },
114
+ destination: { address: V },
115
+ legs: U
111
116
  });
112
- Q(`Shipment ${e.shipmentNumber} planned with ${e.legs.length} leg(s).`), I(""), R(""), B(""), H([j()]), W({});
117
+ Q(`Shipment ${e.shipmentNumber} planned with ${e.legs.length} leg(s).`), R(""), B(""), H(""), W([j()]), K({}), o(0);
113
118
  } catch (e) {
114
119
  X(e instanceof Error ? e.message : "Failed to plan shipment");
115
120
  } finally {
116
- J(!1);
121
+ Y(!1);
117
122
  }
118
123
  },
119
124
  className: "space-y-6 pt-4",
120
125
  children: [
121
- /* @__PURE__ */ T(S, { message: Y }),
122
- Z && /* @__PURE__ */ T("div", {
126
+ /* @__PURE__ */ D(w, { message: le }),
127
+ Z && /* @__PURE__ */ D("div", {
123
128
  className: "rounded-lg border border-status-success-border bg-status-success-bg-subtle px-4 py-3 text-sm text-status-success-text",
124
129
  children: Z
125
130
  }),
126
- /* @__PURE__ */ E("div", {
131
+ /* @__PURE__ */ O("div", {
127
132
  className: "grid grid-cols-1 gap-4 sm:grid-cols-3",
128
133
  children: [
129
- /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T(p, {
134
+ /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D(h, {
130
135
  htmlFor: "shipmentNumber",
131
136
  children: "Shipment Number"
132
- }), /* @__PURE__ */ T(f, {
137
+ }), /* @__PURE__ */ D(m, {
133
138
  id: "shipmentNumber",
134
- value: F,
135
- onChange: (e) => I(e.target.value),
139
+ value: L,
140
+ onChange: (e) => R(e.target.value),
136
141
  placeholder: "SHP-MM-0001",
137
142
  required: !0
138
143
  })] }),
139
- /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T(p, {
144
+ /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D(h, {
140
145
  htmlFor: "originAddress",
141
146
  children: "Origin"
142
- }), /* @__PURE__ */ T(f, {
147
+ }), /* @__PURE__ */ D(m, {
143
148
  id: "originAddress",
144
- value: L,
145
- onChange: (e) => R(e.target.value),
149
+ value: z,
150
+ onChange: (e) => B(e.target.value),
146
151
  placeholder: "Shanghai, CN"
147
152
  })] }),
148
- /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T(p, {
153
+ /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D(h, {
149
154
  htmlFor: "destinationAddress",
150
155
  children: "Destination"
151
- }), /* @__PURE__ */ T(f, {
156
+ }), /* @__PURE__ */ D(m, {
152
157
  id: "destinationAddress",
153
- value: z,
154
- onChange: (e) => B(e.target.value),
158
+ value: V,
159
+ onChange: (e) => H(e.target.value),
155
160
  placeholder: "Los Angeles, US"
156
161
  })] })
157
162
  ]
158
163
  }),
159
- /* @__PURE__ */ T(te, {}),
160
- /* @__PURE__ */ T("div", {
164
+ /* @__PURE__ */ D(x, {}),
165
+ /* @__PURE__ */ D("div", {
161
166
  className: "space-y-4",
162
- children: V.map((t, n) => {
163
- let r = k[t.mode], i = U[n], a = G[n];
164
- return /* @__PURE__ */ E(c, {
167
+ children: U.map((t, n) => {
168
+ let r = k[t.mode], i = G[n], a = ce[n];
169
+ return /* @__PURE__ */ O(u, {
165
170
  className: "border-border-subtle",
166
- children: [/* @__PURE__ */ E(u, {
171
+ children: [/* @__PURE__ */ O(f, {
167
172
  className: "flex flex-row items-center justify-between",
168
- children: [/* @__PURE__ */ E(d, {
173
+ children: [/* @__PURE__ */ O(p, {
169
174
  className: "flex items-center gap-2 text-base",
170
175
  children: [
171
- /* @__PURE__ */ T(r, { size: 16 }),
176
+ /* @__PURE__ */ D(r, { size: 16 }),
172
177
  " Leg ",
173
178
  n + 1
174
179
  ]
175
- }), V.length > 1 && /* @__PURE__ */ T(s, {
180
+ }), U.length > 1 && /* @__PURE__ */ D(l, {
176
181
  type: "button",
177
182
  variant: "ghost",
178
183
  size: "sm",
179
- onClick: () => ae(n),
184
+ onClick: () => de(n),
180
185
  "aria-label": `Remove leg ${n + 1}`,
181
- children: /* @__PURE__ */ T(ee, { size: 14 })
186
+ children: /* @__PURE__ */ D(ee, { size: 14 })
182
187
  })]
183
- }), /* @__PURE__ */ E(l, {
188
+ }), /* @__PURE__ */ O(d, {
184
189
  className: "space-y-4",
185
190
  children: [
186
- /* @__PURE__ */ E("div", {
191
+ /* @__PURE__ */ O("div", {
187
192
  className: "grid grid-cols-1 gap-4 sm:grid-cols-3",
188
193
  children: [
189
- /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T(p, { children: "Mode" }), /* @__PURE__ */ E(m, {
194
+ /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D(h, { children: "Mode" }), /* @__PURE__ */ O(g, {
190
195
  value: t.mode,
191
196
  onValueChange: (e) => $(n, { mode: e }),
192
- children: [/* @__PURE__ */ T(_, { children: /* @__PURE__ */ T(v, {}) }), /* @__PURE__ */ T(h, { children: [
197
+ children: [/* @__PURE__ */ D(y, { children: /* @__PURE__ */ D(b, {}) }), /* @__PURE__ */ D(_, { children: [
193
198
  "ROAD",
194
199
  "AIR",
195
200
  "OCEAN",
196
201
  "RAIL"
197
- ].map((e) => /* @__PURE__ */ T(g, {
202
+ ].map((e) => /* @__PURE__ */ D(v, {
198
203
  value: e,
199
204
  children: A[e]
200
205
  }, e)) })]
201
206
  })] }),
202
- /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T(p, { children: "Leg Origin" }), /* @__PURE__ */ T(f, {
207
+ /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D(h, { children: "Leg Origin" }), /* @__PURE__ */ D(m, {
203
208
  value: t.origin.address ?? "",
204
209
  onChange: (e) => $(n, { origin: { address: e.target.value } }),
205
210
  placeholder: "Origin port/airport/terminal"
206
211
  })] }),
207
- /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T(p, { children: "Leg Destination" }), /* @__PURE__ */ T(f, {
212
+ /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D(h, { children: "Leg Destination" }), /* @__PURE__ */ D(m, {
208
213
  value: t.destination.address ?? "",
209
214
  onChange: (e) => $(n, { destination: { address: e.target.value } }),
210
215
  placeholder: "Destination port/airport/terminal"
211
216
  })] })
212
217
  ]
213
218
  }),
214
- (t.mode === "ROAD" || t.mode === "RAIL") && /* @__PURE__ */ E("div", {
219
+ (t.mode === "ROAD" || t.mode === "RAIL") && /* @__PURE__ */ O("div", {
215
220
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
216
- children: [/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T(p, { children: "Distance (km)" }), /* @__PURE__ */ T(f, {
221
+ children: [/* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D(h, { children: "Distance (km)" }), /* @__PURE__ */ D(m, {
217
222
  type: "number",
218
223
  min: 0,
219
224
  value: t.distanceKm ?? "",
220
225
  onChange: (e) => $(n, { distanceKm: Number(e.target.value) || void 0 })
221
- })] }), /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T(p, { children: "Weight (kg)" }), /* @__PURE__ */ T(f, {
226
+ })] }), /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D(h, { children: "Weight (kg)" }), /* @__PURE__ */ D(m, {
222
227
  type: "number",
223
228
  min: 0,
224
229
  value: t.weightKg ?? "",
225
230
  onChange: (e) => $(n, { weightKg: Number(e.target.value) || void 0 })
226
231
  })] })]
227
232
  }),
228
- t.mode === "AIR" && /* @__PURE__ */ E("div", {
233
+ t.mode === "AIR" && /* @__PURE__ */ O("div", {
229
234
  className: "grid grid-cols-1 gap-4 sm:grid-cols-4",
230
235
  children: [
231
- /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T(p, { children: "Weight (kg)" }), /* @__PURE__ */ T(f, {
236
+ /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D(h, { children: "Weight (kg)" }), /* @__PURE__ */ D(m, {
232
237
  type: "number",
233
238
  min: 0,
234
239
  value: t.weightKg ?? "",
235
240
  onChange: (e) => $(n, { weightKg: Number(e.target.value) || void 0 })
236
241
  })] }),
237
- /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T(p, { children: "Length (cm)" }), /* @__PURE__ */ T(f, {
242
+ /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D(h, { children: "Length (cm)" }), /* @__PURE__ */ D(m, {
238
243
  type: "number",
239
244
  min: 0,
240
245
  value: t.lengthCm ?? "",
241
246
  onChange: (e) => $(n, { lengthCm: Number(e.target.value) || void 0 })
242
247
  })] }),
243
- /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T(p, { children: "Width (cm)" }), /* @__PURE__ */ T(f, {
248
+ /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D(h, { children: "Width (cm)" }), /* @__PURE__ */ D(m, {
244
249
  type: "number",
245
250
  min: 0,
246
251
  value: t.widthCm ?? "",
247
252
  onChange: (e) => $(n, { widthCm: Number(e.target.value) || void 0 })
248
253
  })] }),
249
- /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T(p, { children: "Height (cm)" }), /* @__PURE__ */ T(f, {
254
+ /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D(h, { children: "Height (cm)" }), /* @__PURE__ */ D(m, {
250
255
  type: "number",
251
256
  min: 0,
252
257
  value: t.heightCm ?? "",
@@ -254,62 +259,62 @@ function N() {
254
259
  })] })
255
260
  ]
256
261
  }),
257
- t.mode === "OCEAN" && /* @__PURE__ */ E("div", {
262
+ t.mode === "OCEAN" && /* @__PURE__ */ O("div", {
258
263
  className: "grid grid-cols-1 gap-4 sm:grid-cols-4",
259
- children: [/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T(p, { children: "Container Type" }), /* @__PURE__ */ E(m, {
264
+ children: [/* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D(h, { children: "Container Type" }), /* @__PURE__ */ O(g, {
260
265
  value: t.containerType ?? "LCL",
261
266
  onValueChange: (e) => $(n, { containerType: e }),
262
- children: [/* @__PURE__ */ T(_, { children: /* @__PURE__ */ T(v, {}) }), /* @__PURE__ */ E(h, { children: [
263
- /* @__PURE__ */ T(g, {
267
+ children: [/* @__PURE__ */ D(y, { children: /* @__PURE__ */ D(b, {}) }), /* @__PURE__ */ O(_, { children: [
268
+ /* @__PURE__ */ D(v, {
264
269
  value: "LCL",
265
270
  children: "LCL (shared container)"
266
271
  }),
267
- /* @__PURE__ */ T(g, {
272
+ /* @__PURE__ */ D(v, {
268
273
  value: "FCL_20FT",
269
274
  children: "FCL 20ft"
270
275
  }),
271
- /* @__PURE__ */ T(g, {
276
+ /* @__PURE__ */ D(v, {
272
277
  value: "FCL_40FT",
273
278
  children: "FCL 40ft"
274
279
  }),
275
- /* @__PURE__ */ T(g, {
280
+ /* @__PURE__ */ D(v, {
276
281
  value: "FCL_40FT_HC",
277
282
  children: "FCL 40ft High-Cube"
278
283
  })
279
284
  ] })]
280
- })] }), (t.containerType ?? "LCL") === "LCL" ? /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T(p, { children: "Weight (kg)" }), /* @__PURE__ */ T(f, {
285
+ })] }), (t.containerType ?? "LCL") === "LCL" ? /* @__PURE__ */ O(re, { children: [/* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D(h, { children: "Weight (kg)" }), /* @__PURE__ */ D(m, {
281
286
  type: "number",
282
287
  min: 0,
283
288
  value: t.weightKg ?? "",
284
289
  onChange: (e) => $(n, { weightKg: Number(e.target.value) || void 0 })
285
- })] }), /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T(p, { children: "Volume (CBM)" }), /* @__PURE__ */ T(f, {
290
+ })] }), /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D(h, { children: "Volume (CBM)" }), /* @__PURE__ */ D(m, {
286
291
  type: "number",
287
292
  min: 0,
288
293
  value: t.volumeCbm ?? "",
289
294
  onChange: (e) => $(n, { volumeCbm: Number(e.target.value) || void 0 })
290
- })] })] }) : /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T(p, { children: "Container Count" }), /* @__PURE__ */ T(f, {
295
+ })] })] }) : /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D(h, { children: "Container Count" }), /* @__PURE__ */ D(m, {
291
296
  type: "number",
292
297
  min: 1,
293
298
  value: t.containerCount ?? 1,
294
299
  onChange: (e) => $(n, { containerCount: Number(e.target.value) || 1 })
295
300
  })] })]
296
301
  }),
297
- /* @__PURE__ */ E("div", {
302
+ /* @__PURE__ */ O("div", {
298
303
  className: "flex items-center gap-3",
299
304
  children: [
300
- /* @__PURE__ */ E(s, {
305
+ /* @__PURE__ */ O(l, {
301
306
  type: "button",
302
307
  variant: "secondary",
303
308
  size: "sm",
304
- onClick: () => void oe(n),
305
- children: [/* @__PURE__ */ T(e, {
309
+ onClick: () => void fe(n),
310
+ children: [/* @__PURE__ */ D(e, {
306
311
  size: 14,
307
312
  className: "mr-1.5"
308
313
  }), " Calculate Rate"]
309
314
  }),
310
- i && /* @__PURE__ */ E("span", {
315
+ i && /* @__PURE__ */ O("span", {
311
316
  className: "text-sm font-medium text-text-primary",
312
- children: [M(i.calculatedCost, i.currency), i.chargeableWeightKg != null && /* @__PURE__ */ E("span", {
317
+ children: [M(i.calculatedCost, i.currency), i.chargeableWeightKg != null && /* @__PURE__ */ O("span", {
313
318
  className: "ml-2 text-xs text-text-secondary",
314
319
  children: [
315
320
  "(",
@@ -318,17 +323,17 @@ function N() {
318
323
  ]
319
324
  })]
320
325
  }),
321
- a && /* @__PURE__ */ T("span", {
326
+ a && /* @__PURE__ */ D("span", {
322
327
  className: "text-sm text-status-error-text",
323
328
  children: a
324
329
  })
325
330
  ]
326
331
  }),
327
- i && i.breakdown.length > 0 && /* @__PURE__ */ T("ul", {
332
+ i && i.breakdown.length > 0 && /* @__PURE__ */ D("ul", {
328
333
  className: "space-y-1 rounded-md bg-surface-subtle px-3 py-2 text-xs text-text-secondary",
329
- children: i.breakdown.map((e) => /* @__PURE__ */ E("li", {
334
+ children: i.breakdown.map((e) => /* @__PURE__ */ O("li", {
330
335
  className: "flex justify-between",
331
- children: [/* @__PURE__ */ T("span", { children: e.label }), /* @__PURE__ */ T("span", { children: M(e.amount, i.currency) })]
336
+ children: [/* @__PURE__ */ D("span", { children: e.label }), /* @__PURE__ */ D("span", { children: M(e.amount, i.currency) })]
332
337
  }, e.label))
333
338
  })
334
339
  ]
@@ -336,72 +341,72 @@ function N() {
336
341
  }, n);
337
342
  })
338
343
  }),
339
- /* @__PURE__ */ E("div", {
344
+ /* @__PURE__ */ O("div", {
340
345
  className: "flex items-center justify-between",
341
- children: [/* @__PURE__ */ E(s, {
346
+ children: [/* @__PURE__ */ O(l, {
342
347
  type: "button",
343
348
  variant: "outline",
344
349
  size: "sm",
345
- onClick: ie,
346
- children: [/* @__PURE__ */ T(n, {
350
+ onClick: ue,
351
+ children: [/* @__PURE__ */ D(i, {
347
352
  size: 14,
348
353
  className: "mr-1.5"
349
354
  }), " Add Leg"]
350
- }), /* @__PURE__ */ E("div", {
355
+ }), /* @__PURE__ */ O("div", {
351
356
  className: "flex items-center gap-3",
352
- children: [ce.size > 1 && /* @__PURE__ */ T(o, {
357
+ children: [me.size > 1 && /* @__PURE__ */ D(c, {
353
358
  variant: "secondary",
354
359
  children: "Multi-modal"
355
- }), /* @__PURE__ */ E("span", {
360
+ }), /* @__PURE__ */ O("span", {
356
361
  className: "text-sm text-text-secondary",
357
362
  children: [
358
363
  "Estimated total:",
359
364
  " ",
360
- /* @__PURE__ */ T("strong", { children: M(se, U[0]?.currency ?? "USD") })
365
+ /* @__PURE__ */ D("strong", { children: M(pe, G[0]?.currency ?? "USD") })
361
366
  ]
362
367
  })]
363
368
  })]
364
369
  }),
365
- /* @__PURE__ */ T(s, {
370
+ /* @__PURE__ */ D(l, {
366
371
  type: "submit",
367
- disabled: q,
368
- children: q ? "Planning shipment..." : "Plan Shipment"
372
+ disabled: J,
373
+ children: J ? "Planning shipment..." : "Plan Shipment"
369
374
  })
370
375
  ]
371
376
  }) }) })
372
377
  }),
373
- /* @__PURE__ */ T(x, {
378
+ /* @__PURE__ */ D(C, {
374
379
  title: "Planned Multi-Modal Shipments",
375
- children: i ? /* @__PURE__ */ T(y, { message: "Loading multi-modal shipments..." }) : a ? /* @__PURE__ */ T(S, { message: a.message }) : t.length === 0 ? /* @__PURE__ */ T(ne, {
376
- icon: /* @__PURE__ */ T(r, { size: 32 }),
380
+ children: P ? /* @__PURE__ */ D(ne, { message: "Loading multi-modal shipments..." }) : F ? /* @__PURE__ */ D(w, { message: F.message }) : s.length === 0 ? /* @__PURE__ */ D(te, {
381
+ icon: /* @__PURE__ */ D(a, { size: 32 }),
377
382
  title: "No multi-modal shipments yet",
378
383
  description: "Plan a shipment above to see it here once it spans more than one transport mode."
379
- }) : /* @__PURE__ */ T("div", {
384
+ }) : /* @__PURE__ */ O("div", {
380
385
  className: "space-y-4",
381
- children: t.map((e) => /* @__PURE__ */ E(c, { children: [/* @__PURE__ */ E(u, {
386
+ children: [s.map((e) => /* @__PURE__ */ O(u, { children: [/* @__PURE__ */ O(f, {
382
387
  className: "flex flex-row items-center justify-between",
383
- children: [/* @__PURE__ */ T(d, {
388
+ children: [/* @__PURE__ */ D(p, {
384
389
  className: "text-base",
385
390
  children: e.shipmentNumber
386
- }), /* @__PURE__ */ E("div", {
391
+ }), /* @__PURE__ */ O("div", {
387
392
  className: "flex items-center gap-2",
388
- children: [/* @__PURE__ */ T(o, {
393
+ children: [/* @__PURE__ */ D(c, {
389
394
  variant: "outline",
390
395
  children: e.status
391
- }), /* @__PURE__ */ T("span", {
396
+ }), /* @__PURE__ */ D("span", {
392
397
  className: "text-sm font-medium",
393
398
  children: M(e.totalFreightCost, e.freightCurrency)
394
399
  })]
395
400
  })]
396
- }), /* @__PURE__ */ T(l, { children: /* @__PURE__ */ T("div", {
401
+ }), /* @__PURE__ */ D(d, { children: /* @__PURE__ */ D("div", {
397
402
  className: "flex flex-wrap gap-2",
398
403
  children: e.legs.map((e) => {
399
404
  let t = k[e.mode];
400
- return /* @__PURE__ */ E(o, {
405
+ return /* @__PURE__ */ O(c, {
401
406
  variant: "secondary",
402
407
  className: "flex items-center gap-1",
403
408
  children: [
404
- /* @__PURE__ */ T(t, { size: 12 }),
409
+ /* @__PURE__ */ D(t, { size: 12 }),
405
410
  " ",
406
411
  A[e.mode],
407
412
  ":",
@@ -410,7 +415,35 @@ function N() {
410
415
  ]
411
416
  }, e.id);
412
417
  })
413
- }) })] }, e.id))
418
+ }) })] }, e.id)), N > 10 && /* @__PURE__ */ O("div", {
419
+ className: "flex items-center justify-between border-t border-border-seam pt-4",
420
+ children: [/* @__PURE__ */ O("span", {
421
+ className: "text-sm text-text-secondary",
422
+ children: [
423
+ "Showing ",
424
+ r * 10 + 1,
425
+ "–",
426
+ Math.min((r + 1) * 10, N),
427
+ " of ",
428
+ N
429
+ ]
430
+ }), /* @__PURE__ */ O("div", {
431
+ className: "flex gap-2",
432
+ children: [/* @__PURE__ */ O(l, {
433
+ variant: "outline",
434
+ size: "sm",
435
+ disabled: r === 0 || P,
436
+ onClick: () => o((e) => Math.max(0, e - 1)),
437
+ children: [/* @__PURE__ */ D(t, { size: 16 }), " Previous"]
438
+ }), /* @__PURE__ */ O(l, {
439
+ variant: "outline",
440
+ size: "sm",
441
+ disabled: !oe || P,
442
+ onClick: () => o((e) => e + 1),
443
+ children: ["Next ", /* @__PURE__ */ D(n, { size: 16 })]
444
+ })]
445
+ })]
446
+ })]
414
447
  })
415
448
  })
416
449
  ]