@burdenoff/microfe-movethewheels 2026.731.1 → 2026.801.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.
@@ -1,6 +1,6 @@
1
1
  import { useMoveTheWheels as e } from "./providers/MoveTheWheelsProvider.js";
2
2
  import { Suspense as t, lazy as n } from "react";
3
- import { Route as r, Routes as i, useNavigate as a } from "react-router-dom";
3
+ import { Route as r, Routes as i, useNavigate as a } from "react-router";
4
4
  import { jsx as o, jsxs as s } from "react/jsx-runtime";
5
5
  import { NotFoundPage as c } from "@burdenoff/fe-libs/shared/pages";
6
6
  //#region src/movethewheels/MoveTheWheelsRoutes.tsx
@@ -32,6 +32,19 @@ function u(e) {
32
32
  };
33
33
  }
34
34
  function d(e) {
35
+ return {
36
+ mode: e.mode,
37
+ distanceKm: e.distanceKm,
38
+ weightKg: e.weightKg,
39
+ lengthCm: e.lengthCm,
40
+ widthCm: e.widthCm,
41
+ heightCm: e.heightCm,
42
+ volumeCbm: e.volumeCbm,
43
+ containerType: e.containerType,
44
+ containerCount: e.containerCount
45
+ };
46
+ }
47
+ function f(e) {
35
48
  return {
36
49
  id: e.id,
37
50
  legNumber: e.legNumber,
@@ -53,7 +66,7 @@ function d(e) {
53
66
  currency: e.currency
54
67
  };
55
68
  }
56
- function f(e) {
69
+ function p(e) {
57
70
  return {
58
71
  id: e.id,
59
72
  shipmentNumber: e.shipmentNumber,
@@ -65,10 +78,10 @@ function f(e) {
65
78
  origin: e.origin ?? {},
66
79
  destination: e.destination ?? {},
67
80
  createdAt: e.createdAt,
68
- legs: (e.legs ?? []).map(d)
81
+ legs: (e.legs ?? []).map(f)
69
82
  };
70
83
  }
71
- function p() {
84
+ function m() {
72
85
  let { apiGatewayUrl: t, authToken: n, workspaceToken: r, workspaceId: a, tenantId: o, currentUser: s } = e();
73
86
  return i(() => ({
74
87
  apiGatewayUrl: t,
@@ -86,30 +99,30 @@ function p() {
86
99
  s?.id
87
100
  ]);
88
101
  }
89
- function m() {
90
- let e = p(), [i, o] = a([]), [d, m] = a(!1), [h, g] = a(null), _ = n(async () => {
91
- m(!0), g(null);
102
+ function h() {
103
+ let e = m(), [i, o] = a([]), [f, h] = a(!1), [g, _] = a(null), v = n(async () => {
104
+ h(!0), _(null);
92
105
  try {
93
106
  o((await t(e, s, { pagination: {
94
107
  limit: 100,
95
108
  offset: 0
96
- } })).shipments.map(f));
109
+ } })).shipments.map(p));
97
110
  } catch (e) {
98
- g(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to load multi-modal shipments"));
111
+ _(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to load multi-modal shipments"));
99
112
  } finally {
100
- m(!1);
113
+ h(!1);
101
114
  }
102
115
  }, [e]);
103
116
  return r(() => {
104
- _();
105
- }, [_]), {
117
+ v();
118
+ }, [v]), {
106
119
  shipments: i,
107
- isLoading: d,
108
- error: h,
109
- refetch: () => void _(),
110
- calculateFreightRate: n(async (n) => (await t(e, c, { input: u(n) })).calculateFreightRate, [e]),
120
+ isLoading: f,
121
+ error: g,
122
+ refetch: () => void v(),
123
+ calculateFreightRate: n(async (n) => (await t(e, c, { input: d(n) })).calculateFreightRate, [e]),
111
124
  planMultiModalShipment: n(async (n) => {
112
- let r = f((await t(e, l, { input: {
125
+ let r = p((await t(e, l, { input: {
113
126
  shipmentNumber: n.shipmentNumber,
114
127
  customerId: n.customerId,
115
128
  origin: n.origin,
@@ -121,4 +134,4 @@ function m() {
121
134
  };
122
135
  }
123
136
  //#endregion
124
- export { m as useMultiModalShipments };
137
+ export { h as useMultiModalShipments };
@@ -13,7 +13,7 @@ import { Button as u, Card as d, CardContent as f, CardHeader as p, CardTitle as
13
13
  import { EmptyState as w, PageLayout as T } from "../components/PageLayout.js";
14
14
  import { FormError as E } from "../components/FormError.js";
15
15
  import { useEffect as D, useState as O } from "react";
16
- import { useParams as k } from "react-router-dom";
16
+ import { useParams as k } from "react-router";
17
17
  import { jsx as A, jsxs as j } from "react/jsx-runtime";
18
18
  import { EmphasisPanel as M, NextSteps as ne, PagePurpose as re } from "@burdenoff/fe-libs/ui";
19
19
  //#region src/movethewheels/pages/CreateOrderPage.tsx
@@ -21,7 +21,7 @@ import { FormError as j } from "../components/FormError.js";
21
21
  import { Notice as ie, useNotice as ae } from "../components/Notice.js";
22
22
  import { formatAddress as M, formatCurrency as N, formatDate as P } from "../utils/formatters.js";
23
23
  import { useEffect as oe, useState as F } from "react";
24
- import { useParams as se } from "react-router-dom";
24
+ import { useParams as se } from "react-router";
25
25
  import { Fragment as ce, jsx as I, jsxs as L } from "react/jsx-runtime";
26
26
  import { EmphasisPanel as R, NextSteps as le, PagePurpose as z } from "@burdenoff/fe-libs/ui";
27
27
  //#region src/movethewheels/pages/CustomerDetailsPage.tsx
@@ -17,7 +17,7 @@ import { FormError as E } from "../components/FormError.js";
17
17
  import { formatCurrency as D, formatDate as O } from "../utils/formatters.js";
18
18
  import { DocumentsCard as k } from "../components/DocumentsCard.js";
19
19
  import { useEffect as A, useState as j } from "react";
20
- import { useLocation as M, useParams as N } from "react-router-dom";
20
+ import { useLocation as M, useParams as N } from "react-router";
21
21
  import { jsx as P, jsxs as F } from "react/jsx-runtime";
22
22
  import { EmphasisPanel as I, NextSteps as L, PagePurpose as R } from "@burdenoff/fe-libs/ui";
23
23
  //#region src/movethewheels/pages/DriverDetailsPage.tsx
@@ -27,7 +27,7 @@ import { formatAddress as E, formatCurrency as D, formatDate as O } from "../uti
27
27
  import { DocumentsCard as Ce } from "../components/DocumentsCard.js";
28
28
  import { ProofOfDeliveryCard as we } from "../components/ProofOfDeliveryCard.js";
29
29
  import { useState as k } from "react";
30
- import { useParams as Te } from "react-router-dom";
30
+ import { useParams as Te } from "react-router";
31
31
  import { jsx as A, jsxs as j } from "react/jsx-runtime";
32
32
  import { EmphasisPanel as Ee, NextSteps as De, PagePurpose as Oe } from "@burdenoff/fe-libs/ui";
33
33
  //#region src/movethewheels/pages/OrderDetailsPage.tsx
@@ -13,7 +13,7 @@ import { ErrorState as y, LoadingState as b, PageLayout as x } from "../componen
13
13
  import { FormError as S } from "../components/FormError.js";
14
14
  import { formatCurrency as C } from "../utils/formatters.js";
15
15
  import { useEffect as w, useState as T } from "react";
16
- import { useLocation as E, useParams as D } from "react-router-dom";
16
+ import { useLocation as E, useParams as D } from "react-router";
17
17
  import { jsx as O, jsxs as k } from "react/jsx-runtime";
18
18
  import { EmphasisPanel as A, NextSteps as j, PagePurpose as M } from "@burdenoff/fe-libs/ui";
19
19
  //#region src/movethewheels/pages/ProductDetailsPage.tsx
@@ -26,7 +26,7 @@ import { Notice as L, useNotice as R } from "../components/Notice.js";
26
26
  import { formatAddress as z, formatCurrency as B, formatDate as V } from "../utils/formatters.js";
27
27
  import { firstRealLatLng as H } from "../utils/mapMarkers.js";
28
28
  import { useEffect as U, useState as W } from "react";
29
- import { useLocation as G, useParams as K } from "react-router-dom";
29
+ import { useLocation as G, useParams as K } from "react-router";
30
30
  import { jsx as q, jsxs as J } from "react/jsx-runtime";
31
31
  import { EmphasisPanel as Y, NextSteps as X, PagePurpose as Z } from "@burdenoff/fe-libs/ui";
32
32
  //#region src/movethewheels/pages/RouteDetailsPage.tsx
@@ -17,7 +17,7 @@ import { formatAddress as b, formatDate as x } from "../utils/formatters.js";
17
17
  import { firstRealLatLng as S } from "../utils/mapMarkers.js";
18
18
  import { ProofOfDeliveryCard as C } from "../components/ProofOfDeliveryCard.js";
19
19
  import { useMemo as w, useState as T } from "react";
20
- import { useSearchParams as E } from "react-router-dom";
20
+ import { useSearchParams as E } from "react-router";
21
21
  import { jsx as D, jsxs as O } from "react/jsx-runtime";
22
22
  import { EmphasisPanel as k, PagePurpose as A } from "@burdenoff/fe-libs/ui";
23
23
  import { useI18n as j } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
@@ -15,7 +15,7 @@ import { FormError as k } from "../components/FormError.js";
15
15
  import { formatDate as A } from "../utils/formatters.js";
16
16
  import { DocumentsCard as j } from "../components/DocumentsCard.js";
17
17
  import { useEffect as M, useState as N } from "react";
18
- import { useLocation as P, useParams as F } from "react-router-dom";
18
+ import { useLocation as P, useParams as F } from "react-router";
19
19
  import { jsx as I, jsxs as L } from "react/jsx-runtime";
20
20
  import { EmphasisPanel as R, NextSteps as z, PagePurpose as B } from "@burdenoff/fe-libs/ui";
21
21
  //#region src/movethewheels/pages/VehicleDetailsPage.tsx
@@ -14,7 +14,7 @@ import { ErrorState as E, LoadingState as D, PageLayout as O } from "../componen
14
14
  import { FormError as k } from "../components/FormError.js";
15
15
  import { formatAddress as A } from "../utils/formatters.js";
16
16
  import { useEffect as j, useState as M } from "react";
17
- import { useLocation as N, useParams as P } from "react-router-dom";
17
+ import { useLocation as N, useParams as P } from "react-router";
18
18
  import { jsx as F, jsxs as I } from "react/jsx-runtime";
19
19
  import { EmphasisPanel as L, NextSteps as R, PagePurpose as z } from "@burdenoff/fe-libs/ui";
20
20
  //#region src/movethewheels/pages/WarehouseDetailsPage.tsx
@@ -1,6 +1,6 @@
1
1
  import { joinPath as e } from "../utils/navigation.js";
2
2
  import { createContext as t, useContext as n, useMemo as r } from "react";
3
- import { MemoryRouter as i } from "react-router-dom";
3
+ import { MemoryRouter as i } from "react-router";
4
4
  import { jsx as a } from "react/jsx-runtime";
5
5
  //#region src/movethewheels/providers/MoveTheWheelsProvider.tsx
6
6
  var o = t(null), s = ({ children: e, ...t }) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burdenoff/microfe-movethewheels",
3
- "version": "2026.731.1",
3
+ "version": "2026.801.1",
4
4
  "description": "Burdenoff MoveTheWheels Microfrontend - Logistics & Supply Chain Management Platform",
5
5
  "type": "module",
6
6
  "files": [
@@ -26,13 +26,13 @@
26
26
  "types": "./dist/index.d.ts",
27
27
  "scripts": {
28
28
  "dev": "vite --port 5191",
29
- "build": "tsc && vite build",
29
+ "build": "tsc && bash scripts/build-limits.sh --gate vite build",
30
30
  "lint": "eslint .",
31
31
  "lint:sanity": "if [ \"${CI:-}\" = \"true\" ]; then bun run lint; else bun run lint -- --cache --cache-location .eslintcache; fi",
32
32
  "format": "prettier --write \"src/**/*.{ts,tsx}\"",
33
- "type:check": "tsc --noEmit",
33
+ "type:check": "bash scripts/build-limits.sh tsc --noEmit",
34
34
  "validate:schema-drift": "graphql-schema-drift",
35
- "sanity": "bun run codegen && bun run validate:schema-drift && bun run lint:sanity && bun run format && bun run type:check && bun run build && bun run build-storybook",
35
+ "sanity": "bash scripts/build-limits.sh --gate bash -c 'bun run codegen && bun run validate:schema-drift && bun run lint:sanity && bun run format && bun run type:check && bun run build && bun run build-storybook'",
36
36
  "storybook": "storybook dev -p 6006",
37
37
  "build-storybook": "storybook build",
38
38
  "test:storybook": "test-storybook",
@@ -48,7 +48,7 @@
48
48
  },
49
49
  "dependencies": {
50
50
  "@apollo/client": "^4.0.11",
51
- "@burdenoff/fe-libs": "2026.726.1",
51
+ "@burdenoff/fe-libs": "2026.801.1",
52
52
  "@react-leaflet/core": "^3.0.0",
53
53
  "@tanstack/react-query": "^5.90.16",
54
54
  "clsx": "^2.1.1",
@@ -58,7 +58,7 @@
58
58
  "react": "^19.0.0",
59
59
  "react-dom": "^19.0.0",
60
60
  "react-leaflet": "^5.0.0",
61
- "react-router-dom": "^7.1.3",
61
+ "react-router": "^8.3.0",
62
62
  "recharts": "^2.15.0",
63
63
  "tailwind-merge": "^3.4.0",
64
64
  "zustand": "^5.0.3"
package/src/dev/main.tsx CHANGED
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import { StrictMode, useEffect, useState } from 'react';
5
5
  import { createRoot } from 'react-dom/client';
6
- import { BrowserRouter, Routes, Route, Navigate, useNavigate } from 'react-router-dom';
6
+ import { BrowserRouter, Routes, Route, Navigate, useNavigate } from 'react-router';
7
7
  import { MoveTheWheelsRoot } from '../movethewheels';
8
8
  import './styles.css';
9
9
 
@@ -5,7 +5,7 @@
5
5
  * Uses lazy loading for code splitting.
6
6
  */
7
7
 
8
- import { Routes, Route, useNavigate } from 'react-router-dom';
8
+ import { Routes, Route, useNavigate } from 'react-router';
9
9
  import { lazy, Suspense } from 'react';
10
10
  import { NotFoundPage } from '@burdenoff/fe-libs/shared/pages';
11
11
  import { useMoveTheWheels } from './providers/MoveTheWheelsProvider';
@@ -188,6 +188,27 @@ function toApiLeg(leg: ShipmentLegDraft) {
188
188
  };
189
189
  }
190
190
 
191
+ // FreightRateInput (shipment.gql) is intentionally narrower than
192
+ // CreateShipmentLegInput — it has no origin/destination/carrierName, only
193
+ // the fields that actually drive a rate calculation. Sending the full leg
194
+ // shape (as toApiLeg does for planMultiModalShipment/addShipmentLeg) trips
195
+ // GraphQL input-coercion on unknown fields, which the gateway surfaces as a
196
+ // masked "Unexpected error." 500 instead of a validation error — so this
197
+ // mapper must stay in lockstep with FreightRateInput's exact field set.
198
+ function toFreightRateInput(leg: ShipmentLegDraft) {
199
+ return {
200
+ mode: leg.mode,
201
+ distanceKm: leg.distanceKm,
202
+ weightKg: leg.weightKg,
203
+ lengthCm: leg.lengthCm,
204
+ widthCm: leg.widthCm,
205
+ heightCm: leg.heightCm,
206
+ volumeCbm: leg.volumeCbm,
207
+ containerType: leg.containerType,
208
+ containerCount: leg.containerCount,
209
+ };
210
+ }
211
+
191
212
  function mapLeg(leg: ApiShipmentLeg): ShipmentLeg {
192
213
  return {
193
214
  id: leg.id,
@@ -277,7 +298,7 @@ export function useMultiModalShipments() {
277
298
  const data = await executeGraphQL<{ calculateFreightRate: FreightRateQuote }>(
278
299
  graphQLOptions,
279
300
  CALCULATE_FREIGHT_RATE_QUERY,
280
- { input: toApiLeg(leg) }
301
+ { input: toFreightRateInput(leg) }
281
302
  );
282
303
  return data.calculateFreightRate;
283
304
  },
@@ -5,7 +5,7 @@
5
5
  */
6
6
 
7
7
  import { useEffect, useState } from 'react';
8
- import { useParams } from 'react-router-dom';
8
+ import { useParams } from 'react-router';
9
9
  import { Package, ArrowLeft, Save, Plus, Trash2, Users, MapPin } from 'lucide-react';
10
10
  import { PageLayout, EmptyState } from '../components/PageLayout';
11
11
  import { FormError } from '../components/FormError';
@@ -3,7 +3,7 @@
3
3
  */
4
4
 
5
5
  import { useEffect, useState } from 'react';
6
- import { useParams } from 'react-router-dom';
6
+ import { useParams } from 'react-router';
7
7
  import {
8
8
  Users,
9
9
  ArrowLeft,
@@ -3,7 +3,7 @@
3
3
  */
4
4
 
5
5
  import { useEffect, useState } from 'react';
6
- import { useLocation, useParams } from 'react-router-dom';
6
+ import { useLocation, useParams } from 'react-router';
7
7
  import {
8
8
  Users,
9
9
  ArrowLeft,
@@ -5,7 +5,7 @@
5
5
  */
6
6
 
7
7
  import { useState } from 'react';
8
- import { useParams } from 'react-router-dom';
8
+ import { useParams } from 'react-router';
9
9
  import {
10
10
  Package,
11
11
  ArrowLeft,
@@ -3,7 +3,7 @@
3
3
  */
4
4
 
5
5
  import { useEffect, useState } from 'react';
6
- import { useLocation, useParams } from 'react-router-dom';
6
+ import { useLocation, useParams } from 'react-router';
7
7
  import { Package, ArrowLeft, Edit, Box, DollarSign, Tag, Save } from 'lucide-react';
8
8
  import { PageLayout, LoadingState, ErrorState } from '../components/PageLayout';
9
9
  import {
@@ -3,7 +3,7 @@
3
3
  */
4
4
 
5
5
  import { useEffect, useState } from 'react';
6
- import { useParams, useLocation } from 'react-router-dom';
6
+ import { useParams, useLocation } from 'react-router';
7
7
  import {
8
8
  Navigation,
9
9
  ArrowLeft,
@@ -5,7 +5,7 @@
5
5
  */
6
6
 
7
7
  import { useMemo, useState } from 'react';
8
- import { useSearchParams } from 'react-router-dom';
8
+ import { useSearchParams } from 'react-router';
9
9
  import { MapPin, Search, Package, Truck, Clock, CheckCircle, AlertCircle } from 'lucide-react';
10
10
  import { PageLayout, EmptyState } from '../components/PageLayout';
11
11
  import { StatusBadge } from '../components/StatusBadge';
@@ -3,7 +3,7 @@
3
3
  */
4
4
 
5
5
  import { useEffect, useState } from 'react';
6
- import { useParams, useLocation } from 'react-router-dom';
6
+ import { useParams, useLocation } from 'react-router';
7
7
  import { Truck, ArrowLeft, MapPin, Fuel, Wrench, Edit, Save } from 'lucide-react';
8
8
  import { PageLayout, LoadingState, ErrorState } from '../components/PageLayout';
9
9
  import { StatusBadge, VehicleTypeBadge } from '../components/StatusBadge';
@@ -3,7 +3,7 @@
3
3
  */
4
4
 
5
5
  import { useEffect, useState } from 'react';
6
- import { useLocation, useParams } from 'react-router-dom';
6
+ import { useLocation, useParams } from 'react-router';
7
7
  import { Warehouse, ArrowLeft, Edit, MapPin, Clock, Users, Box, Save } from 'lucide-react';
8
8
  import { PageLayout, LoadingState, ErrorState } from '../components/PageLayout';
9
9
  import {
@@ -6,7 +6,7 @@
6
6
  */
7
7
 
8
8
  import { createContext, useContext, useMemo, type FC, type PropsWithChildren } from 'react';
9
- import { MemoryRouter } from 'react-router-dom';
9
+ import { MemoryRouter } from 'react-router';
10
10
  import type { MoveTheWheelsRootProps, MoveTheWheelsContextValue } from '../types';
11
11
  import { joinPath } from '../utils/navigation';
12
12