@burdenoff/microfe-movethewheels 2026.827.1 → 2026.830.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 (39) hide show
  1. package/dist/MoveTheWheelsRoot.js +86 -83
  2. package/dist/MoveTheWheelsRoutes.js +107 -104
  3. package/dist/hooks/index.js +1 -0
  4. package/dist/hooks/useImportExport.js +22 -51
  5. package/dist/hooks/useReports.js +63 -73
  6. package/dist/hooks/useSettings.js +52 -44
  7. package/dist/index.js +38 -37
  8. package/dist/movethewheels/hooks/index.d.ts +1 -0
  9. package/dist/movethewheels/hooks/useImportExport.d.ts +10 -0
  10. package/dist/movethewheels/pages/MarketplacePage.d.ts +7 -4
  11. package/dist/movethewheels/shared/hooks/useTr.d.ts +16 -0
  12. package/dist/pages/AIAssistantPage.js +45 -43
  13. package/dist/pages/DashboardPage.js +6 -6
  14. package/dist/pages/FleetPage.js +7 -7
  15. package/dist/pages/InventoryPage.js +6 -6
  16. package/dist/pages/MarketplacePage.js +11 -432
  17. package/dist/pages/OrdersListPage.js +5 -5
  18. package/dist/pages/ReportsPage.js +120 -109
  19. package/dist/pages/SettingsPage.js +175 -154
  20. package/dist/pages/TrackingPage.js +5 -5
  21. package/dist/shared/hooks/useTr.js +12 -0
  22. package/package.json +2 -2
  23. package/src/movethewheels/MoveTheWheelsRoot.tsx +28 -24
  24. package/src/movethewheels/MoveTheWheelsRoutes.tsx +5 -2
  25. package/src/movethewheels/hooks/index.ts +3 -0
  26. package/src/movethewheels/hooks/useImportExport.ts +36 -72
  27. package/src/movethewheels/hooks/useReports.ts +73 -87
  28. package/src/movethewheels/hooks/useSettings.ts +50 -53
  29. package/src/movethewheels/pages/AIAssistantPage.tsx +50 -32
  30. package/src/movethewheels/pages/MarketplacePage.tsx +16 -539
  31. package/src/movethewheels/pages/ReportsPage.tsx +23 -0
  32. package/src/movethewheels/pages/SettingsPage.tsx +154 -70
  33. package/src/movethewheels/shared/hooks/useTr.ts +37 -0
  34. package/dist/generated/global-operations.d.ts +0 -1
  35. package/dist/generated/global-types.d.ts +0 -23526
  36. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-down.js +0 -8
  37. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-up.js +0 -8
  38. package/src/generated/global-operations.ts +0 -2
  39. package/src/generated/global-types.ts +0 -27259
@@ -1,56 +1,27 @@
1
- import { useMoveTheWheels as e } from "../providers/MoveTheWheelsProvider.js";
2
- import { executeGraphQL as t } from "../utils/graphqlClient.js";
3
- import { useCallback as n, useMemo as r, useState as i } from "react";
1
+ import { useCallback as e, useState as t } from "react";
4
2
  //#region src/movethewheels/hooks/useImportExport.ts
5
- var a = "\n mutation MovethewheelsExportData($input: MovethewheelsExportDataInput!) {\n exportData(input: $input) {\n success\n message\n payload\n }\n }\n", o = "\n mutation MovethewheelsImportData($input: MovethewheelsImportDataInput!) {\n importData(input: $input) {\n success\n message\n payload\n }\n }\n";
6
- function s() {
7
- let { apiGatewayUrl: s, authToken: c, workspaceToken: l, workspaceId: u, tenantId: d, currentUser: f } = e(), [p, m] = i(!1), [h, g] = i(null), _ = r(() => ({
8
- apiGatewayUrl: s,
9
- authToken: c,
10
- workspaceToken: l,
11
- workspaceId: u,
12
- tenantId: d,
13
- actorId: f?.id
14
- }), [
15
- s,
16
- c,
17
- l,
18
- u,
19
- d,
20
- f?.id
21
- ]);
3
+ function n() {
4
+ let [n, r] = t(!1), [i, a] = t(null), o = e(async (e) => {
5
+ r(!0), a(null);
6
+ try {
7
+ return await e();
8
+ } catch (e) {
9
+ let t = e instanceof Error ? e : /* @__PURE__ */ Error("Import/export failed");
10
+ throw a(t), t;
11
+ } finally {
12
+ r(!1);
13
+ }
14
+ }, []);
22
15
  return {
23
- exportData: n(async (e, n) => {
24
- m(!0), g(null);
25
- try {
26
- return (await t(_, a, { input: {
27
- resource: e,
28
- format: n
29
- } })).exportData;
30
- } catch (e) {
31
- let t = e instanceof Error ? e : /* @__PURE__ */ Error("Export failed");
32
- throw g(t), t;
33
- } finally {
34
- m(!1);
35
- }
36
- }, [_]),
37
- importData: n(async (e, n) => {
38
- m(!0), g(null);
39
- try {
40
- return (await t(_, o, { input: {
41
- resource: e,
42
- payload: n
43
- } })).importData;
44
- } catch (e) {
45
- let t = e instanceof Error ? e : /* @__PURE__ */ Error("Import failed");
46
- throw g(t), t;
47
- } finally {
48
- m(!1);
49
- }
50
- }, [_]),
51
- isBusy: p,
52
- error: h
16
+ exportData: e(async (e, t) => o(async () => {
17
+ throw Error(`Export for "${e}" is not available: the import/export surface was withdrawn from the service.`);
18
+ }), [o]),
19
+ importData: e(async (e, t) => o(async () => {
20
+ throw Error(`Import for "${e}" is not available: the import surface was withdrawn from the service.`);
21
+ }), [o]),
22
+ isBusy: n,
23
+ error: i
53
24
  };
54
25
  }
55
26
  //#endregion
56
- export { s as useImportExport };
27
+ export { n as useImportExport };
@@ -1,85 +1,75 @@
1
1
  import { useMoveTheWheels as e } from "../providers/MoveTheWheelsProvider.js";
2
- import { executeGraphQL as t } from "../utils/graphqlClient.js";
3
- import { useCallback as n, useEffect as r, useMemo as i, useState as a } from "react";
2
+ import { useCallback as t, useEffect as n, useState as r } from "react";
4
3
  //#region src/movethewheels/hooks/useReports.ts
5
- var o = "\n id\n name\n description\n type\n status\n schedule\n lastGenerated\n createdAt\n updatedAt\n", s = `
6
- query MovethewheelsReports($filter: MovethewheelsReportFilterInput, $pagination: PaginationInput) {
7
- movethewheelsReports(filter: $filter, pagination: $pagination) {
8
- ${o}
9
- }
10
- }
11
- `, c = `
12
- mutation CreateMovethewheelsReport($input: CreateMovethewheelsReportInput!) {
13
- createMovethewheelsReport(input: $input) {
14
- ${o}
15
- }
16
- }
17
- `, l = `
18
- mutation GenerateMovethewheelsReport($input: GenerateMovethewheelsReportInput!) {
19
- generateMovethewheelsReport(input: $input) {
20
- generatedAt
21
- result
22
- report {
23
- ${o}
24
- }
25
- }
26
- }
27
- `;
28
- function u(o = {}) {
29
- let { limit: u = 100, offset: d = 0 } = o, { apiGatewayUrl: f, authToken: p, workspaceToken: m, workspaceId: h, tenantId: g, currentUser: _ } = e(), [v, y] = a([]), [b, x] = a(!1), [S, C] = a(!1), [w, T] = a(null), E = i(() => ({
30
- apiGatewayUrl: f,
31
- authToken: p,
32
- workspaceToken: m,
33
- workspaceId: h,
34
- tenantId: g,
35
- actorId: _?.id
36
- }), [
37
- f,
38
- p,
39
- m,
40
- h,
41
- g,
42
- _?.id
43
- ]), D = n(async () => {
44
- C(!0), T(null);
4
+ function i() {
5
+ return typeof crypto < "u" && "randomUUID" in crypto ? crypto.randomUUID() : `${Date.now()}-${Math.random().toString(36).slice(2)}`;
6
+ }
7
+ function a(e) {
8
+ return `movethewheels:reports:${e ?? "default"}`;
9
+ }
10
+ function o(e) {
11
+ if (typeof window > "u") return [];
12
+ try {
13
+ let t = window.localStorage.getItem(a(e));
14
+ if (!t) return [];
15
+ let n = JSON.parse(t);
16
+ return Array.isArray(n) ? n : [];
17
+ } catch {
18
+ return [];
19
+ }
20
+ }
21
+ function s(e, t) {
22
+ if (!(typeof window > "u")) try {
23
+ window.localStorage.setItem(a(e), JSON.stringify(t));
24
+ } catch {}
25
+ }
26
+ function c(a = {}) {
27
+ let { limit: c = 100, offset: l = 0 } = a, { workspaceId: u } = e(), [d, f] = r([]), [p, m] = r(!1), [h, g] = r(!1), [_, v] = r(null), y = t(() => {
28
+ g(!0), v(null);
45
29
  try {
46
- let e = await t(E, s, { pagination: {
47
- limit: u,
48
- offset: d
49
- } });
50
- x(e.movethewheelsReports.length === u), y(e.movethewheelsReports);
30
+ let e = o(u).slice(l, l + c);
31
+ m(e.length === c), f(e);
51
32
  } catch (e) {
52
- T(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to load reports"));
33
+ v(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to load reports"));
53
34
  } finally {
54
- C(!1);
35
+ g(!1);
55
36
  }
56
37
  }, [
57
- E,
58
38
  u,
59
- d
39
+ c,
40
+ l
60
41
  ]);
61
- return r(() => {
62
- D();
63
- }, [D]), {
64
- reports: v,
65
- hasMore: b,
66
- isLoading: S,
67
- error: w,
68
- refetch: n(() => {
69
- D();
70
- }, [D]),
71
- createReport: n(async (e) => {
72
- let n = (await t(E, c, { input: e })).createMovethewheelsReport;
73
- return y((e) => [n, ...e]), n;
74
- }, [E]),
75
- generateReport: n(async (e, n) => {
76
- let r = (await t(E, l, { input: {
77
- reportId: e,
78
- parameters: n
79
- } })).generateMovethewheelsReport;
80
- return y((t) => t.map((t) => t.id === e ? r.report : t)), r;
81
- }, [E])
42
+ return n(() => {
43
+ y();
44
+ }, [y]), {
45
+ reports: d,
46
+ hasMore: p,
47
+ isLoading: h,
48
+ error: _,
49
+ refetch: t(() => {
50
+ y();
51
+ }, [y]),
52
+ createReport: t(async (e) => {
53
+ let t = (/* @__PURE__ */ new Date()).toISOString(), n = {
54
+ id: i(),
55
+ name: e.name,
56
+ description: e.description ?? null,
57
+ type: e.type,
58
+ status: e.status ?? "ready",
59
+ schedule: e.schedule ?? null,
60
+ lastGenerated: null,
61
+ createdAt: t,
62
+ updatedAt: t
63
+ };
64
+ return f((e) => {
65
+ let t = [n, ...e];
66
+ return s(u, t), t;
67
+ }), n;
68
+ }, [u]),
69
+ generateReport: t(async (e, t) => {
70
+ throw Error("Report generation is not available: the movethewheelsReports surface was withdrawn from the service.");
71
+ }, [])
82
72
  };
83
73
  }
84
74
  //#endregion
85
- export { u as useReports };
75
+ export { c as useReports };
@@ -1,59 +1,67 @@
1
1
  import { useMoveTheWheels as e } from "../providers/MoveTheWheelsProvider.js";
2
- import { executeGraphQL as t } from "../utils/graphqlClient.js";
3
- import { useCallback as n, useEffect as r, useMemo as i, useState as a } from "react";
2
+ import { useCallback as t, useEffect as n, useMemo as r, useState as i } from "react";
4
3
  //#region src/movethewheels/hooks/useSettings.ts
5
- var o = "\n query MovethewheelsModuleSettings {\n moduleSettings {\n preferences\n updatedAt\n workspaceId\n }\n }\n", s = "\n mutation UpdateMovethewheelsModuleSettings($input: UpdateMovethewheelsModuleSettingsInput!) {\n updateModuleSettings(input: $input) {\n preferences\n updatedAt\n workspaceId\n }\n }\n";
6
- function c() {
7
- let { apiGatewayUrl: c, authToken: l, workspaceToken: u, workspaceId: d, tenantId: f, currentUser: p } = e(), [m, h] = a(null), [g, _] = a(!1), [v, y] = a(!1), [b, x] = a(null), S = i(() => ({
8
- apiGatewayUrl: c,
9
- authToken: l,
10
- workspaceToken: u,
11
- workspaceId: d,
12
- tenantId: f,
13
- actorId: p?.id
14
- }), [
15
- c,
16
- l,
17
- u,
18
- d,
19
- f,
20
- p?.id
21
- ]), C = n(async () => {
22
- _(!0), x(null);
4
+ function a(e) {
5
+ if (typeof window > "u") return null;
6
+ try {
7
+ let t = window.localStorage.getItem(`movethewheels:moduleSettings:${e}`);
8
+ if (!t) return null;
9
+ let n = JSON.parse(t);
10
+ return n && typeof n == "object" && "preferences" in n ? n : null;
11
+ } catch {
12
+ return null;
13
+ }
14
+ }
15
+ function o(e) {
16
+ if (!(typeof window > "u")) try {
17
+ window.localStorage.setItem(`movethewheels:moduleSettings:${e.workspaceId}`, JSON.stringify(e));
18
+ } catch {}
19
+ }
20
+ function s() {
21
+ let { workspaceId: s } = e(), [c, l] = i(null), [u, d] = i(!1), [f, p] = i(!1), [m, h] = i(null), g = t(() => {
22
+ d(!0), h(null);
23
23
  try {
24
- h((await t(S, o)).moduleSettings);
24
+ l((s ? a(s) : null) ?? {
25
+ preferences: {},
26
+ updatedAt: (/* @__PURE__ */ new Date()).toISOString(),
27
+ workspaceId: s ?? ""
28
+ });
25
29
  } catch (e) {
26
- x(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to load settings"));
30
+ h(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to load settings"));
27
31
  } finally {
28
- _(!1);
32
+ d(!1);
29
33
  }
30
- }, [S]);
31
- r(() => {
32
- C();
33
- }, [C]);
34
- let w = n(() => {
35
- C();
36
- }, [C]), T = n(async (e) => {
37
- y(!0), x(null);
34
+ }, [s]);
35
+ n(() => {
36
+ g();
37
+ }, [g]);
38
+ let _ = t(() => {
39
+ g();
40
+ }, [g]), v = t(async (e) => {
41
+ p(!0), h(null);
38
42
  try {
39
- let n = await t(S, s, { input: { preferences: e } });
40
- return h(n.updateModuleSettings), n.updateModuleSettings;
43
+ let t = {
44
+ preferences: e,
45
+ updatedAt: (/* @__PURE__ */ new Date()).toISOString(),
46
+ workspaceId: s ?? ""
47
+ };
48
+ return o(t), l(t), t;
41
49
  } catch (e) {
42
50
  let t = e instanceof Error ? e : /* @__PURE__ */ Error("Failed to save settings");
43
- throw x(t), t;
51
+ throw h(t), t;
44
52
  } finally {
45
- y(!1);
53
+ p(!1);
46
54
  }
47
- }, [S]);
55
+ }, [s]);
48
56
  return {
49
- settings: m,
50
- preferences: i(() => m?.preferences ?? {}, [m]),
51
- isLoading: g,
52
- isSaving: v,
53
- error: b,
54
- refetch: w,
55
- savePreferences: T
57
+ settings: c,
58
+ preferences: r(() => c?.preferences ?? {}, [c]),
59
+ isLoading: u,
60
+ isSaving: f,
61
+ error: m,
62
+ refetch: _,
63
+ savePreferences: v
56
64
  };
57
65
  }
58
66
  //#endregion
59
- export { c as useModuleSettings };
67
+ export { s as useModuleSettings };
package/dist/index.js CHANGED
@@ -1,40 +1,41 @@
1
1
  import { useMoveTheWheels as e, useMoveTheWheelsNavigate as t } from "./providers/MoveTheWheelsProvider.js";
2
- import { MoveTheWheelsRoot as n } from "./MoveTheWheelsRoot.js";
3
- import { useMoveTheWheelsStore as r } from "./store/movethewheelsStore.js";
4
- import { useSandboxAssistantTransport as i } from "./services/createSandboxAssistantTransport.js";
5
- import { useOrder as a, useOrderStats as o, useOrders as s } from "./hooks/useOrders.js";
6
- import { useDriver as c, useDriverStatusCounts as l, useDrivers as u, useFleet as d, useFleetStats as f, useVehicle as p, useVehicleDrivers as m, useVehicles as h } from "./hooks/useFleet.js";
7
- import { useInventory as g, useInventoryStats as _, useInventoryTransactions as v, useProduct as y, useProductStockLevels as b, useProducts as x, useWarehouse as S, useWarehouses as C } from "./hooks/useInventory.js";
8
- import { useCustomer as w, useCustomerStats as T, useCustomers as E } from "./hooks/useCustomers.js";
9
- import { useRoute as D, useRouteStats as O, useRoutes as k } from "./hooks/useRoutes.js";
10
- import { useAnalytics as A, useDashboardMetrics as j, useEmissionsSummary as M, useFinanceMetrics as N, useFleetAnalytics as P, useOrderAnalytics as F, usePerformanceAnalytics as I, useRevenueAnalytics as L } from "./hooks/useAnalytics.js";
11
- import { useDriverTracking as R, useGeofence as z, useLiveTracking as B, useOrderTracking as V, useTracking as H, useTrackingAlerts as U, useVehicleTracking as W } from "./hooks/useTracking.js";
12
- import { useReports as G } from "./hooks/useReports.js";
13
- import { useImportExport as K } from "./hooks/useImportExport.js";
14
- import { useModuleSettings as q } from "./hooks/useSettings.js";
15
- import { useEntityDocuments as J } from "./hooks/useEntityDocuments.js";
16
- import { useCaptureEpod as Y, useEpod as X, useEpodPhotoUpload as Z, useEpodPhotoUrl as Q, useMyPendingEpodDeliveryJobs as $ } from "./hooks/useEpod.js";
2
+ import { useTr as n } from "./shared/hooks/useTr.js";
3
+ import { useOrder as r, useOrderStats as i, useOrders as a } from "./hooks/useOrders.js";
4
+ import { useDriver as o, useDriverStatusCounts as s, useDrivers as c, useFleet as l, useFleetStats as u, useVehicle as d, useVehicleDrivers as f, useVehicles as p } from "./hooks/useFleet.js";
5
+ import { useInventory as m, useInventoryStats as h, useInventoryTransactions as g, useProduct as _, useProductStockLevels as v, useProducts as y, useWarehouse as b, useWarehouses as x } from "./hooks/useInventory.js";
6
+ import { useCustomer as S, useCustomerStats as C, useCustomers as w } from "./hooks/useCustomers.js";
7
+ import { useRoute as T, useRouteStats as E, useRoutes as D } from "./hooks/useRoutes.js";
8
+ import { useAnalytics as O, useDashboardMetrics as k, useEmissionsSummary as A, useFinanceMetrics as j, useFleetAnalytics as M, useOrderAnalytics as N, usePerformanceAnalytics as P, useRevenueAnalytics as F } from "./hooks/useAnalytics.js";
9
+ import { useDriverTracking as I, useGeofence as L, useLiveTracking as R, useOrderTracking as z, useTracking as B, useTrackingAlerts as V, useVehicleTracking as H } from "./hooks/useTracking.js";
10
+ import { useReports as U } from "./hooks/useReports.js";
11
+ import { useImportExport as W } from "./hooks/useImportExport.js";
12
+ import { useModuleSettings as G } from "./hooks/useSettings.js";
13
+ import { useEntityDocuments as K } from "./hooks/useEntityDocuments.js";
14
+ import { useCaptureEpod as q, useEpod as J, useEpodPhotoUpload as Y, useEpodPhotoUrl as X, useMyPendingEpodDeliveryJobs as Z } from "./hooks/useEpod.js";
17
15
  import "./hooks/index.js";
18
- import { Avatar as ee, AvatarFallback as te, AvatarImage as ne, Badge as re, Button as ie, Card as ae, CardContent as oe, CardDescription as se, CardFooter as ce, CardHeader as le, CardTitle as ue, Checkbox as de, Dialog as fe, DialogContent as pe, DialogDescription as me, DialogFooter as he, DialogHeader as ge, DialogTitle as _e, DialogTrigger as ve, DropdownMenu as ye, DropdownMenuContent as be, DropdownMenuItem as xe, DropdownMenuSeparator as Se, DropdownMenuTrigger as Ce, Input as we, Label as Te, Progress as Ee, ScrollArea as De, Select as Oe, SelectContent as ke, SelectItem as Ae, SelectTrigger as je, SelectValue as Me, Separator as Ne, Skeleton as Pe, Switch as Fe, Table as Ie, TableBody as Le, TableCell as Re, TableHead as ze, TableHeader as Be, TableRow as Ve, Tabs as He, TabsContent as Ue, TabsList as We, TabsTrigger as Ge, Textarea as Ke, Tooltip as qe, TooltipContent as Je, TooltipProvider as Ye, TooltipTrigger as Xe } from "./components/ui.js";
19
- import { EmptyState as Ze, ErrorState as Qe, LoadingState as $e, PageLayout as et, PageSection as tt } from "./components/PageLayout.js";
20
- import { chartTokens as nt, seriesColor as rt } from "./components/charts/chartTokens.js";
21
- import { Sparkline as it } from "./components/charts/Sparkline.js";
22
- import { MetricCard as at, MetricCardSkeleton as ot, MetricGrid as st } from "./components/MetricCard.js";
23
- import { GlassPanel as ct } from "./components/GlassPanel.js";
24
- import { ChartEmpty as lt, ChartTooltip as ut } from "./components/charts/ChartShell.js";
25
- import { TrendChart as dt } from "./components/charts/TrendChart.js";
26
- import { VolumeBar as ft } from "./components/charts/VolumeBar.js";
27
- import { StatusDonut as pt } from "./components/charts/StatusDonut.js";
28
- import { createCurrentIcon as mt, createPinIcon as ht, createStopIcon as gt, isRealCoord as _t } from "./components/maps/leaflet-setup.js";
29
- import { MapCanvas as vt } from "./components/maps/MapCanvas.js";
30
- import { LogisticsMap as yt } from "./components/maps/LogisticsMap.js";
31
- import { RouteMap as bt } from "./components/maps/RouteMap.js";
32
- import { TrackingMap as xt } from "./components/maps/TrackingMap.js";
33
- import { PaymentStatusBadge as St, PriorityBadge as Ct, StatusBadge as wt, TypeBadge as Tt, VehicleTypeBadge as Et } from "./components/StatusBadge.js";
34
- import { DataTable as Dt } from "./components/DataTable.js";
35
- import { FormError as Ot } from "./components/FormError.js";
36
- import { Notice as kt, useNotice as At } from "./components/Notice.js";
37
- import { DocumentsCard as jt } from "./components/DocumentsCard.js";
38
- import { CarbonFootprintPanel as Mt } from "./components/CarbonFootprintPanel.js";
16
+ import { MoveTheWheelsRoot as Q } from "./MoveTheWheelsRoot.js";
17
+ import { useMoveTheWheelsStore as $ } from "./store/movethewheelsStore.js";
18
+ import { useSandboxAssistantTransport as ee } from "./services/createSandboxAssistantTransport.js";
19
+ import { Avatar as te, AvatarFallback as ne, AvatarImage as re, Badge as ie, Button as ae, Card as oe, CardContent as se, CardDescription as ce, CardFooter as le, CardHeader as ue, CardTitle as de, Checkbox as fe, Dialog as pe, DialogContent as me, DialogDescription as he, DialogFooter as ge, DialogHeader as _e, DialogTitle as ve, DialogTrigger as ye, DropdownMenu as be, DropdownMenuContent as xe, DropdownMenuItem as Se, DropdownMenuSeparator as Ce, DropdownMenuTrigger as we, Input as Te, Label as Ee, Progress as De, ScrollArea as Oe, Select as ke, SelectContent as Ae, SelectItem as je, SelectTrigger as Me, SelectValue as Ne, Separator as Pe, Skeleton as Fe, Switch as Ie, Table as Le, TableBody as Re, TableCell as ze, TableHead as Be, TableHeader as Ve, TableRow as He, Tabs as Ue, TabsContent as We, TabsList as Ge, TabsTrigger as Ke, Textarea as qe, Tooltip as Je, TooltipContent as Ye, TooltipProvider as Xe, TooltipTrigger as Ze } from "./components/ui.js";
20
+ import { EmptyState as Qe, ErrorState as $e, LoadingState as et, PageLayout as tt, PageSection as nt } from "./components/PageLayout.js";
21
+ import { chartTokens as rt, seriesColor as it } from "./components/charts/chartTokens.js";
22
+ import { Sparkline as at } from "./components/charts/Sparkline.js";
23
+ import { MetricCard as ot, MetricCardSkeleton as st, MetricGrid as ct } from "./components/MetricCard.js";
24
+ import { GlassPanel as lt } from "./components/GlassPanel.js";
25
+ import { ChartEmpty as ut, ChartTooltip as dt } from "./components/charts/ChartShell.js";
26
+ import { TrendChart as ft } from "./components/charts/TrendChart.js";
27
+ import { VolumeBar as pt } from "./components/charts/VolumeBar.js";
28
+ import { StatusDonut as mt } from "./components/charts/StatusDonut.js";
29
+ import { createCurrentIcon as ht, createPinIcon as gt, createStopIcon as _t, isRealCoord as vt } from "./components/maps/leaflet-setup.js";
30
+ import { MapCanvas as yt } from "./components/maps/MapCanvas.js";
31
+ import { LogisticsMap as bt } from "./components/maps/LogisticsMap.js";
32
+ import { RouteMap as xt } from "./components/maps/RouteMap.js";
33
+ import { TrackingMap as St } from "./components/maps/TrackingMap.js";
34
+ import { PaymentStatusBadge as Ct, PriorityBadge as wt, StatusBadge as Tt, TypeBadge as Et, VehicleTypeBadge as Dt } from "./components/StatusBadge.js";
35
+ import { DataTable as Ot } from "./components/DataTable.js";
36
+ import { FormError as kt } from "./components/FormError.js";
37
+ import { Notice as At, useNotice as jt } from "./components/Notice.js";
38
+ import { DocumentsCard as Mt } from "./components/DocumentsCard.js";
39
+ import { CarbonFootprintPanel as Nt } from "./components/CarbonFootprintPanel.js";
39
40
  import "./components/index.js";
40
- export { ee as Avatar, te as AvatarFallback, ne as AvatarImage, re as Badge, ie as Button, Mt as CarbonFootprintPanel, ae as Card, oe as CardContent, se as CardDescription, ce as CardFooter, le as CardHeader, ue as CardTitle, lt as ChartEmpty, ut as ChartTooltip, de as Checkbox, Dt as DataTable, fe as Dialog, pe as DialogContent, me as DialogDescription, he as DialogFooter, ge as DialogHeader, _e as DialogTitle, ve as DialogTrigger, jt as DocumentsCard, ye as DropdownMenu, be as DropdownMenuContent, xe as DropdownMenuItem, Se as DropdownMenuSeparator, Ce as DropdownMenuTrigger, Ze as EmptyState, Qe as ErrorState, Ot as FormError, ct as GlassPanel, we as Input, Te as Label, $e as LoadingState, yt as LogisticsMap, vt as MapCanvas, at as MetricCard, ot as MetricCardSkeleton, st as MetricGrid, n as MoveTheWheelsRoot, kt as Notice, et as PageLayout, tt as PageSection, St as PaymentStatusBadge, Ct as PriorityBadge, Ee as Progress, bt as RouteMap, De as ScrollArea, Oe as Select, ke as SelectContent, Ae as SelectItem, je as SelectTrigger, Me as SelectValue, Ne as Separator, Pe as Skeleton, it as Sparkline, wt as StatusBadge, pt as StatusDonut, Fe as Switch, Ie as Table, Le as TableBody, Re as TableCell, ze as TableHead, Be as TableHeader, Ve as TableRow, He as Tabs, Ue as TabsContent, We as TabsList, Ge as TabsTrigger, Ke as Textarea, qe as Tooltip, Je as TooltipContent, Ye as TooltipProvider, Xe as TooltipTrigger, xt as TrackingMap, dt as TrendChart, Tt as TypeBadge, Et as VehicleTypeBadge, ft as VolumeBar, nt as chartTokens, mt as createCurrentIcon, ht as createPinIcon, gt as createStopIcon, _t as isRealCoord, rt as seriesColor, A as useAnalytics, Y as useCaptureEpod, w as useCustomer, T as useCustomerStats, E as useCustomers, j as useDashboardMetrics, c as useDriver, l as useDriverStatusCounts, R as useDriverTracking, u as useDrivers, M as useEmissionsSummary, J as useEntityDocuments, X as useEpod, Z as useEpodPhotoUpload, Q as useEpodPhotoUrl, N as useFinanceMetrics, d as useFleet, P as useFleetAnalytics, f as useFleetStats, z as useGeofence, K as useImportExport, g as useInventory, _ as useInventoryStats, v as useInventoryTransactions, B as useLiveTracking, q as useModuleSettings, e as useMoveTheWheels, t as useMoveTheWheelsNavigate, r as useMoveTheWheelsStore, $ as useMyPendingEpodDeliveryJobs, At as useNotice, a as useOrder, F as useOrderAnalytics, o as useOrderStats, V as useOrderTracking, s as useOrders, I as usePerformanceAnalytics, y as useProduct, b as useProductStockLevels, x as useProducts, G as useReports, L as useRevenueAnalytics, D as useRoute, O as useRouteStats, k as useRoutes, i as useSandboxAssistantTransport, H as useTracking, U as useTrackingAlerts, p as useVehicle, m as useVehicleDrivers, W as useVehicleTracking, h as useVehicles, S as useWarehouse, C as useWarehouses };
41
+ export { te as Avatar, ne as AvatarFallback, re as AvatarImage, ie as Badge, ae as Button, Nt as CarbonFootprintPanel, oe as Card, se as CardContent, ce as CardDescription, le as CardFooter, ue as CardHeader, de as CardTitle, ut as ChartEmpty, dt as ChartTooltip, fe as Checkbox, Ot as DataTable, pe as Dialog, me as DialogContent, he as DialogDescription, ge as DialogFooter, _e as DialogHeader, ve as DialogTitle, ye as DialogTrigger, Mt as DocumentsCard, be as DropdownMenu, xe as DropdownMenuContent, Se as DropdownMenuItem, Ce as DropdownMenuSeparator, we as DropdownMenuTrigger, Qe as EmptyState, $e as ErrorState, kt as FormError, lt as GlassPanel, Te as Input, Ee as Label, et as LoadingState, bt as LogisticsMap, yt as MapCanvas, ot as MetricCard, st as MetricCardSkeleton, ct as MetricGrid, Q as MoveTheWheelsRoot, At as Notice, tt as PageLayout, nt as PageSection, Ct as PaymentStatusBadge, wt as PriorityBadge, De as Progress, xt as RouteMap, Oe as ScrollArea, ke as Select, Ae as SelectContent, je as SelectItem, Me as SelectTrigger, Ne as SelectValue, Pe as Separator, Fe as Skeleton, at as Sparkline, Tt as StatusBadge, mt as StatusDonut, Ie as Switch, Le as Table, Re as TableBody, ze as TableCell, Be as TableHead, Ve as TableHeader, He as TableRow, Ue as Tabs, We as TabsContent, Ge as TabsList, Ke as TabsTrigger, qe as Textarea, Je as Tooltip, Ye as TooltipContent, Xe as TooltipProvider, Ze as TooltipTrigger, St as TrackingMap, ft as TrendChart, Et as TypeBadge, Dt as VehicleTypeBadge, pt as VolumeBar, rt as chartTokens, ht as createCurrentIcon, gt as createPinIcon, _t as createStopIcon, vt as isRealCoord, it as seriesColor, O as useAnalytics, q as useCaptureEpod, S as useCustomer, C as useCustomerStats, w as useCustomers, k as useDashboardMetrics, o as useDriver, s as useDriverStatusCounts, I as useDriverTracking, c as useDrivers, A as useEmissionsSummary, K as useEntityDocuments, J as useEpod, Y as useEpodPhotoUpload, X as useEpodPhotoUrl, j as useFinanceMetrics, l as useFleet, M as useFleetAnalytics, u as useFleetStats, L as useGeofence, W as useImportExport, m as useInventory, h as useInventoryStats, g as useInventoryTransactions, R as useLiveTracking, G as useModuleSettings, e as useMoveTheWheels, t as useMoveTheWheelsNavigate, $ as useMoveTheWheelsStore, Z as useMyPendingEpodDeliveryJobs, jt as useNotice, r as useOrder, N as useOrderAnalytics, i as useOrderStats, z as useOrderTracking, a as useOrders, P as usePerformanceAnalytics, _ as useProduct, v as useProductStockLevels, y as useProducts, U as useReports, F as useRevenueAnalytics, T as useRoute, E as useRouteStats, D as useRoutes, ee as useSandboxAssistantTransport, n as useTr, B as useTracking, V as useTrackingAlerts, d as useVehicle, f as useVehicleDrivers, H as useVehicleTracking, p as useVehicles, b as useWarehouse, x as useWarehouses };
@@ -3,6 +3,7 @@
3
3
  *
4
4
  * All custom hooks for data access and operations.
5
5
  */
6
+ export { useTr } from '../shared/hooks/useTr';
6
7
  export { useOrders, useOrder, useOrderStats } from './useOrders';
7
8
  export { useFleet, useVehicles, useVehicle, useVehicleDrivers, useDrivers, useDriver, useDriverStatusCounts, useFleetStats, type DriverStatusCounts, } from './useFleet';
8
9
  export { useInventory, useProducts, useProduct, useProductStockLevels, useWarehouses, useWarehouse, useInventoryStats, useInventoryTransactions, type InventoryStats, type InventoryTransaction, type InventoryTransactionType, type ProductStockLevel, } from './useInventory';
@@ -9,5 +9,15 @@ interface UseImportExportResult {
9
9
  isBusy: boolean;
10
10
  error: Error | null;
11
11
  }
12
+ /**
13
+ * Import/export surface withdrawn from wspace-movethewheels-svc by migration
14
+ * 20260707000001_movethewheels_reuse_cleanup. The service now exposes
15
+ * `exportMtwEntities` (async job, returns MtwExportJob) but no import
16
+ * counterpart, so the old synchronous exportData/importData mutations are no
17
+ * longer resolvable. This hook keeps the same contract for consumers but
18
+ * rejects calls with a clear message until a replacement import/export flow is
19
+ * designed. The original operations are preserved in
20
+ * src/operations/wspace/movethewheels/mutations/marketplace-reports.withdrawn.graphql.
21
+ */
12
22
  export declare function useImportExport(): UseImportExportResult;
13
23
  export {};
@@ -1,9 +1,12 @@
1
1
  /**
2
2
  * Marketplace Page
3
3
  *
4
- * Browse third-party logistics service providers and their offerings. Providers
5
- * are paginated server-side (offset); clicking a provider expands its offerings
6
- * inline. The Filters control narrows the current page by type, verification and
7
- * minimum rating.
4
+ * The collaborative logistics marketplace (service providers / service offerings)
5
+ * was withdrawn from wspace-movethewheels-svc by migration
6
+ * 20260707000001_movethewheels_reuse_cleanup. The original query and mutation
7
+ * documents are preserved verbatim in
8
+ * src/operations/wspace/movethewheels/{queries,mutations}/marketplace-reports.withdrawn.graphql
9
+ * so they can be restored if the surface returns. Until then the page renders a
10
+ * static "coming soon" state.
8
11
  */
9
12
  export default function MarketplacePage(): import("react").JSX.Element;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * useTr — translation hook with fallback semantics.
3
+ *
4
+ * Wraps `useI18n().t()` so that when a key has no translation (i.e. the
5
+ * provider returns the key itself), the caller's English fallback is used
6
+ * instead. This keeps consumer call sites consistent and avoids leaking
7
+ * untranslated keys into the UI.
8
+ *
9
+ * Supports optional interpolation params using `{{key}}` placeholders.
10
+ *
11
+ * @example
12
+ * const tr = useTr();
13
+ * return <h1>{tr('movethewheels.dashboard.title', 'Dashboard')}</h1>;
14
+ * return <p>{tr('movethewheels.delete.confirm', 'Delete {{count}} items?', { count: 5 })}</p>;
15
+ */
16
+ export declare function useTr(): (key: string, fallback: string, params?: Record<string, string | number>) => string;
@@ -3,70 +3,72 @@ import { Bot as t } from "../node_modules/lucide-react/dist/esm/icons/bot.js";
3
3
  import { MessageCircle as n } from "../node_modules/lucide-react/dist/esm/icons/message-circle.js";
4
4
  import { ShieldCheck as r } from "../node_modules/lucide-react/dist/esm/icons/shield-check.js";
5
5
  import { Wallet as i } from "../node_modules/lucide-react/dist/esm/icons/wallet.js";
6
- import { Card as a, CardContent as o, CardHeader as s, CardTitle as c } from "../components/ui.js";
7
- import { EmptyState as l, PageLayout as u } from "../components/PageLayout.js";
8
- import { jsx as d, jsxs as f } from "react/jsx-runtime";
9
- import { GlassCard as p, PagePurpose as m } from "@burdenoff/fe-libs/ui";
6
+ import { useTr as a } from "../shared/hooks/useTr.js";
7
+ import "../hooks/index.js";
8
+ import { Card as o, CardContent as s, CardHeader as c, CardTitle as l } from "../components/ui.js";
9
+ import { EmptyState as u, PageLayout as d } from "../components/PageLayout.js";
10
+ import { jsx as f, jsxs as p } from "react/jsx-runtime";
11
+ import { GlassCard as m, PagePurpose as h } from "@burdenoff/fe-libs/ui";
10
12
  //#region src/movethewheels/pages/AIAssistantPage.tsx
11
- var h = [
12
- {
13
- icon: e,
14
- title: "Agent activity feed",
15
- description: "A live log of what the AI decided, on which shipments, with trigger, model, latency and cost — so an autonomous run is never a black box."
16
- },
17
- {
18
- icon: r,
19
- title: "Dispatch decision cards",
20
- description: "Proposed driver/vehicle assignments and carrier recommendations with rationale and confidence, requiring an explicit accept or reject before anything is written."
21
- },
22
- {
23
- icon: i,
24
- title: "AI credit visibility",
25
- description: "Per-workspace AI spend for admins, so cost is visible before the invoice."
26
- }
27
- ];
28
13
  function g() {
29
- return /* @__PURE__ */ f(u, {
30
- title: "AI Operations",
31
- subtitle: "What the AI is doing on your workspace, and why",
32
- icon: /* @__PURE__ */ d(t, { size: 24 }),
14
+ let g = a(), _ = [
15
+ {
16
+ icon: e,
17
+ title: g("movethewheels.ai.roadmap.agentActivity.title", "Agent activity feed"),
18
+ description: g("movethewheels.ai.roadmap.agentActivity.description", "A live log of what the AI decided, on which shipments, with trigger, model, latency and cost — so an autonomous run is never a black box.")
19
+ },
20
+ {
21
+ icon: r,
22
+ title: g("movethewheels.ai.roadmap.dispatchDecisionCards.title", "Dispatch decision cards"),
23
+ description: g("movethewheels.ai.roadmap.dispatchDecisionCards.description", "Proposed driver/vehicle assignments and carrier recommendations with rationale and confidence, requiring an explicit accept or reject before anything is written.")
24
+ },
25
+ {
26
+ icon: i,
27
+ title: g("movethewheels.ai.roadmap.aiCreditVisibility.title", "AI credit visibility"),
28
+ description: g("movethewheels.ai.roadmap.aiCreditVisibility.description", "Per-workspace AI spend for admins, so cost is visible before the invoice.")
29
+ }
30
+ ];
31
+ return /* @__PURE__ */ p(d, {
32
+ title: g("movethewheels.ai.title", "AI Operations"),
33
+ subtitle: g("movethewheels.ai.subtitle", "What the AI is doing on your workspace, and why"),
34
+ icon: /* @__PURE__ */ f(t, { size: 24 }),
33
35
  children: [
34
- /* @__PURE__ */ d(m, {
35
- icon: /* @__PURE__ */ d(t, { size: 18 }),
36
- children: "This page will surface AI-driven dispatch decisions and their outcomes once the shared AI runtime lands. It does not host a chat box — chat with your live operational data is always available from the assistant icon anywhere in the app."
36
+ /* @__PURE__ */ f(h, {
37
+ icon: /* @__PURE__ */ f(t, { size: 18 }),
38
+ children: g("movethewheels.ai.purpose", "This page will surface AI-driven dispatch decisions and their outcomes once the shared AI runtime lands. It does not host a chat box — chat with your live operational data is always available from the assistant icon anywhere in the app.")
37
39
  }),
38
- /* @__PURE__ */ d(p, {
40
+ /* @__PURE__ */ f(m, {
39
41
  treatment: "glass",
40
42
  className: "p-4",
41
- children: /* @__PURE__ */ f("div", {
43
+ children: /* @__PURE__ */ p("div", {
42
44
  className: "flex items-start gap-3",
43
- children: [/* @__PURE__ */ d(n, {
45
+ children: [/* @__PURE__ */ f(n, {
44
46
  size: 20,
45
47
  className: "text-primary flex-shrink-0 mt-0.5"
46
- }), /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("p", {
48
+ }), /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("p", {
47
49
  className: "text-sm font-medium text-text-primary",
48
- children: "Looking to ask a question about your operations?"
49
- }), /* @__PURE__ */ d("p", {
50
+ children: g("movethewheels.ai.callout.title", "Looking to ask a question about your operations?")
51
+ }), /* @__PURE__ */ f("p", {
50
52
  className: "text-sm text-text-secondary mt-1",
51
- children: "Open the assistant from its icon in the corner of the screen — it answers from your live orders, shipments, fleet and inventory data, and it is the only chat surface in this product."
53
+ children: g("movethewheels.ai.callout.description", "Open the assistant from its icon in the corner of the screen — it answers from your live orders, shipments, fleet and inventory data, and it is the only chat surface in this product.")
52
54
  })] })]
53
55
  })
54
56
  }),
55
- /* @__PURE__ */ f(a, { children: [/* @__PURE__ */ d(s, { children: /* @__PURE__ */ d(c, { children: "On the roadmap" }) }), /* @__PURE__ */ f(o, { children: [/* @__PURE__ */ d(l, {
57
+ /* @__PURE__ */ p(o, { children: [/* @__PURE__ */ f(c, { children: /* @__PURE__ */ f(l, { children: g("movethewheels.ai.roadmap.title", "On the roadmap") }) }), /* @__PURE__ */ p(s, { children: [/* @__PURE__ */ f(u, {
56
58
  illustration: "empty-agents",
57
- title: "Autonomous dispatch operations aren't live yet",
58
- description: "Autonomous dispatch isn't available yet — these capabilities are still in development. Nothing below is available today."
59
- }), /* @__PURE__ */ d("ul", {
59
+ title: g("movethewheels.ai.emptyState.title", "Autonomous dispatch operations aren't live yet"),
60
+ description: g("movethewheels.ai.emptyState.description", "Autonomous dispatch isn't available yet — these capabilities are still in development. Nothing below is available today.")
61
+ }), /* @__PURE__ */ f("ul", {
60
62
  className: "mt-4 space-y-4",
61
- children: h.map((e) => /* @__PURE__ */ f("li", {
63
+ children: _.map((e) => /* @__PURE__ */ p("li", {
62
64
  className: "flex items-start gap-3",
63
- children: [/* @__PURE__ */ d(e.icon, {
65
+ children: [/* @__PURE__ */ f(e.icon, {
64
66
  size: 18,
65
67
  className: "text-text-secondary flex-shrink-0 mt-0.5"
66
- }), /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("p", {
68
+ }), /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("p", {
67
69
  className: "text-sm font-medium text-text-primary",
68
70
  children: e.title
69
- }), /* @__PURE__ */ d("p", {
71
+ }), /* @__PURE__ */ f("p", {
70
72
  className: "text-xs text-text-secondary",
71
73
  children: e.description
72
74
  })] })]