@burdenoff/microfe-movethewheels 2026.1031.3 → 2026.1031.4

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 (58) hide show
  1. package/dist/MoveTheWheelsRoot.js +136 -127
  2. package/dist/MoveTheWheelsRoutes.js +140 -135
  3. package/dist/components/DocumentsCard.js +11 -11
  4. package/dist/components/ProofOfDeliveryCard.js +13 -13
  5. package/dist/components/ShipmentRiskDialog.js +24 -24
  6. package/dist/components/ShippingQuoteResults.js +46 -46
  7. package/dist/components/TrackingAlertList.js +17 -17
  8. package/dist/generated/tracking-quality-operations.d.ts +56 -0
  9. package/dist/hooks/useOrderDispatch.js +17 -17
  10. package/dist/movethewheels/pages/SettingsPage.d.ts +1 -0
  11. package/dist/movethewheels/providers/ModuleSettingsProvider.d.ts +17 -0
  12. package/dist/movethewheels/utils/formatters.d.ts +23 -3
  13. package/dist/movethewheels/utils/moduleSettings.d.ts +52 -0
  14. package/dist/node_modules/lucide-react/dist/esm/icons/bell.js +11 -0
  15. package/dist/node_modules/lucide-react/dist/esm/icons/key-round.js +14 -0
  16. package/dist/node_modules/lucide-react/dist/esm/icons/plug.js +22 -0
  17. package/dist/node_modules/lucide-react/dist/esm/icons/rotate-ccw.js +11 -0
  18. package/dist/node_modules/lucide-react/dist/esm/icons/settings.js +13 -0
  19. package/dist/pages/AnalyticsPage.js +27 -27
  20. package/dist/pages/CreateOrderPage.js +340 -317
  21. package/dist/pages/CustomerDetailsPage.js +246 -246
  22. package/dist/pages/CustomersPage.js +19 -19
  23. package/dist/pages/DashboardPage.js +24 -24
  24. package/dist/pages/DeliveryCapturePage.js +74 -74
  25. package/dist/pages/DriverDetailsPage.js +337 -337
  26. package/dist/pages/DriversPage.js +26 -26
  27. package/dist/pages/FinancePage.js +26 -26
  28. package/dist/pages/InventoryPage.js +28 -28
  29. package/dist/pages/LiveTrackingPage.js +108 -108
  30. package/dist/pages/MarketplacePage.js +44 -44
  31. package/dist/pages/OrderDetailsPage.js +306 -306
  32. package/dist/pages/OrdersListPage.js +27 -27
  33. package/dist/pages/ProductDetailsPage.js +89 -89
  34. package/dist/pages/ProductsPage.js +73 -73
  35. package/dist/pages/RouteDetailsPage.js +282 -285
  36. package/dist/pages/RoutesPage.js +78 -78
  37. package/dist/pages/SettingsPage.js +459 -0
  38. package/dist/pages/TrackingPage.js +41 -41
  39. package/dist/pages/VehicleDetailsPage.js +207 -207
  40. package/dist/pages/VehiclesPage.js +17 -16
  41. package/dist/pages/WarehouseDetailsPage.js +132 -132
  42. package/dist/providers/ModuleSettingsProvider.js +74 -0
  43. package/dist/utils/formatters.js +53 -26
  44. package/dist/utils/moduleSettings.js +132 -0
  45. package/package.json +3 -2
  46. package/src/generated/tracking-quality-operations.ts +62 -0
  47. package/src/movethewheels/MoveTheWheelsRoot.tsx +14 -3
  48. package/src/movethewheels/MoveTheWheelsRoutes.tsx +9 -0
  49. package/src/movethewheels/pages/CreateOrderPage.tsx +38 -6
  50. package/src/movethewheels/pages/ProductsPage.tsx +2 -2
  51. package/src/movethewheels/pages/RouteDetailsPage.tsx +3 -6
  52. package/src/movethewheels/pages/RoutesPage.tsx +2 -2
  53. package/src/movethewheels/pages/SettingsPage.tsx +516 -0
  54. package/src/movethewheels/pages/VehicleDetailsPage.tsx +4 -2
  55. package/src/movethewheels/pages/VehiclesPage.tsx +2 -1
  56. package/src/movethewheels/providers/ModuleSettingsProvider.tsx +133 -0
  57. package/src/movethewheels/utils/formatters.ts +69 -10
  58. package/src/movethewheels/utils/moduleSettings.ts +224 -0
@@ -7,13 +7,13 @@ import { Search as a } from "../node_modules/lucide-react/dist/esm/icons/search.
7
7
  import { Truck as o } from "../node_modules/lucide-react/dist/esm/icons/truck.js";
8
8
  import { joinPath as s } from "../utils/navigation.js";
9
9
  import { useMoveTheWheels as c } from "../providers/MoveTheWheelsProvider.js";
10
- import { useOrderTracking as l } from "../hooks/useTracking.js";
11
- import { Button as u, Card as d, CardContent as f, CardHeader as p, CardTitle as m, Input as h } from "../components/ui.js";
12
- import { EmptyState as g, PageLayout as _ } from "../components/PageLayout.js";
13
- import { TrackingMap as v } from "../components/maps/TrackingMap.js";
10
+ import { formatAddress as l, formatDate as u } from "../utils/formatters.js";
11
+ import { useOrderTracking as d } from "../hooks/useTracking.js";
12
+ import { Button as f, Card as p, CardContent as m, CardHeader as h, CardTitle as g, Input as _ } from "../components/ui.js";
13
+ import { EmptyState as v, PageLayout as y } from "../components/PageLayout.js";
14
+ import { TrackingMap as b } from "../components/maps/TrackingMap.js";
14
15
  import "../components/maps/index.js";
15
- import { StatusBadge as y } from "../components/StatusBadge.js";
16
- import { formatAddress as b, formatDate as x } from "../utils/formatters.js";
16
+ import { StatusBadge as x } from "../components/StatusBadge.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";
@@ -26,7 +26,7 @@ function N() {
26
26
  let { t: N } = A(), P = (e, t) => {
27
27
  let n = N(e);
28
28
  return n === e ? t : n;
29
- }, { basePath: F, navigate: I } = c(), [L] = E(), R = L.get("order") || "", [z, B] = T(R), [V, H] = T(R), { tracking: U, order: W, isLoading: G, error: K } = l(V || void 0), q = (e) => {
29
+ }, { basePath: F, navigate: I } = c(), [L] = E(), R = L.get("order") || "", [z, B] = T(R), [V, H] = T(R), { tracking: U, order: W, isLoading: G, error: K } = d(V || void 0), q = (e) => {
30
30
  e.preventDefault(), H(z);
31
31
  }, J = (e) => {
32
32
  I && I(s(F, e));
@@ -64,11 +64,11 @@ function N() {
64
64
  hasAny: !!(n || r || c || o.length > 0)
65
65
  };
66
66
  }, [W, U]);
67
- return /* @__PURE__ */ k(_, {
67
+ return /* @__PURE__ */ k(y, {
68
68
  title: P("movethewheels.tracking.title", "Track Shipment"),
69
69
  subtitle: P("movethewheels.tracking.subtitle", "Enter a tracking number or order ID to track your shipment"),
70
70
  icon: /* @__PURE__ */ O(r, { size: 24 }),
71
- headerActions: /* @__PURE__ */ k(u, {
71
+ headerActions: /* @__PURE__ */ k(f, {
72
72
  variant: "outline",
73
73
  onClick: () => J("tracking/live"),
74
74
  children: [/* @__PURE__ */ O(r, { size: 16 }), P("movethewheels.tracking.actions.liveMapView", "Live Map View")]
@@ -78,20 +78,20 @@ function N() {
78
78
  icon: /* @__PURE__ */ O(r, { size: 18 }),
79
79
  children: P("movethewheels.tracking.purpose", "Look up any single shipment by its tracking number or order ID to see exactly where it is, its progress through pickup and delivery, the current location and any alerts — the same view you can share with a customer.")
80
80
  }),
81
- /* @__PURE__ */ O(d, { children: /* @__PURE__ */ O(f, {
81
+ /* @__PURE__ */ O(p, { children: /* @__PURE__ */ O(m, {
82
82
  className: "p-6",
83
83
  children: /* @__PURE__ */ k("form", {
84
84
  onSubmit: q,
85
85
  className: "flex flex-col gap-4 sm:flex-row",
86
86
  children: [/* @__PURE__ */ k("div", {
87
87
  className: "flex-1 relative",
88
- children: [/* @__PURE__ */ O(a, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-text-secondary" }), /* @__PURE__ */ O(h, {
88
+ children: [/* @__PURE__ */ O(a, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-text-secondary" }), /* @__PURE__ */ O(_, {
89
89
  value: z,
90
90
  onChange: (e) => B(e.target.value),
91
91
  placeholder: P("movethewheels.tracking.search.placeholder", "Enter tracking number or order ID (e.g., order-1 or TRK123456789)"),
92
92
  className: "pl-10 h-12 text-lg"
93
93
  })]
94
- }), /* @__PURE__ */ O(u, {
94
+ }), /* @__PURE__ */ O(f, {
95
95
  type: "submit",
96
96
  size: "lg",
97
97
  className: "w-full sm:w-auto",
@@ -100,9 +100,9 @@ function N() {
100
100
  })]
101
101
  })
102
102
  }) }),
103
- K && /* @__PURE__ */ O(d, {
103
+ K && /* @__PURE__ */ O(p, {
104
104
  className: "border-status-error-border",
105
- children: /* @__PURE__ */ O(f, {
105
+ children: /* @__PURE__ */ O(m, {
106
106
  className: "p-6",
107
107
  children: /* @__PURE__ */ k("div", {
108
108
  className: "flex items-center gap-4",
@@ -116,14 +116,14 @@ function N() {
116
116
  })
117
117
  })
118
118
  }),
119
- !V && !K && /* @__PURE__ */ O(g, {
119
+ !V && !K && /* @__PURE__ */ O(v, {
120
120
  illustration: "onboarding",
121
121
  title: P("movethewheels.tracking.empty.title", "Enter a tracking number"),
122
122
  description: P("movethewheels.tracking.empty.description", "Use your tracking number or order ID to see the current status of your shipment")
123
123
  }),
124
- W && !U && /* @__PURE__ */ O(d, {
124
+ W && !U && /* @__PURE__ */ O(p, {
125
125
  "data-testid": "tracking-empty-state",
126
- children: /* @__PURE__ */ O(f, {
126
+ children: /* @__PURE__ */ O(m, {
127
127
  className: "p-6 sm:p-8",
128
128
  children: /* @__PURE__ */ k("div", {
129
129
  className: "flex flex-col gap-6 sm:flex-row sm:items-start",
@@ -154,7 +154,7 @@ function N() {
154
154
  /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("p", {
155
155
  className: "text-sm text-text-secondary",
156
156
  children: P("movethewheels.tracking.emptyState.status", "Status")
157
- }), /* @__PURE__ */ O(y, {
157
+ }), /* @__PURE__ */ O(x, {
158
158
  status: W.status,
159
159
  type: "order"
160
160
  })] }),
@@ -198,7 +198,7 @@ function N() {
198
198
  " ",
199
199
  W.orderNumber
200
200
  ]
201
- }), /* @__PURE__ */ O(y, {
201
+ }), /* @__PURE__ */ O(x, {
202
202
  status: W.status,
203
203
  type: "order"
204
204
  })]
@@ -217,7 +217,7 @@ function N() {
217
217
  children: P("movethewheels.tracking.details.estimatedDelivery", "Estimated Delivery")
218
218
  }), /* @__PURE__ */ O("p", {
219
219
  className: "font-medium",
220
- children: U?.estimatedArrival ? x(U.estimatedArrival, "full") : W.scheduledDelivery ? x(W.scheduledDelivery, "full") : P("movethewheels.tracking.details.tbd", "TBD")
220
+ children: U?.estimatedArrival ? u(U.estimatedArrival, "full") : W.scheduledDelivery ? u(W.scheduledDelivery, "full") : P("movethewheels.tracking.details.tbd", "TBD")
221
221
  })] }),
222
222
  /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("p", {
223
223
  className: "text-sm text-text-secondary",
@@ -235,14 +235,14 @@ function N() {
235
235
  children: P("movethewheels.tracking.details.lastUpdated", "Last Updated")
236
236
  }), /* @__PURE__ */ O("p", {
237
237
  className: "font-medium",
238
- children: U?.lastUpdated ? x(U.lastUpdated, "relative") : P("movethewheels.tracking.details.noUpdates", "No tracking updates yet")
238
+ children: U?.lastUpdated ? u(U.lastUpdated, "relative") : P("movethewheels.tracking.details.noUpdates", "No tracking updates yet")
239
239
  })] })
240
240
  ]
241
241
  })] }),
242
- /* @__PURE__ */ k(d, { children: [/* @__PURE__ */ O(p, { children: /* @__PURE__ */ k(m, {
242
+ /* @__PURE__ */ k(p, { children: [/* @__PURE__ */ O(h, { children: /* @__PURE__ */ k(g, {
243
243
  className: "flex items-center gap-2",
244
244
  children: [/* @__PURE__ */ O(r, { size: 18 }), P("movethewheels.tracking.routeMap.title", "Route map")]
245
- }) }), /* @__PURE__ */ O(f, { children: /* @__PURE__ */ O(v, {
245
+ }) }), /* @__PURE__ */ O(m, { children: /* @__PURE__ */ O(b, {
246
246
  className: "overflow-hidden rounded-lg border border-border-seam",
247
247
  height: 320,
248
248
  origin: Y?.origin ?? null,
@@ -251,10 +251,10 @@ function N() {
251
251
  current: Y?.current ?? null,
252
252
  emptyMessage: P("movethewheels.tracking.routeMap.empty", "No location coordinates recorded for this shipment yet")
253
253
  }) })] }),
254
- /* @__PURE__ */ k(d, { children: [/* @__PURE__ */ O(p, { children: /* @__PURE__ */ k(m, {
254
+ /* @__PURE__ */ k(p, { children: [/* @__PURE__ */ O(h, { children: /* @__PURE__ */ k(g, {
255
255
  className: "flex items-center gap-2",
256
256
  children: [/* @__PURE__ */ O(n, { size: 18 }), P("movethewheels.tracking.progress.title", "Shipment Progress")]
257
- }) }), /* @__PURE__ */ k(f, { children: [/* @__PURE__ */ O("div", {
257
+ }) }), /* @__PURE__ */ k(m, { children: [/* @__PURE__ */ O("div", {
258
258
  className: "relative",
259
259
  children: /* @__PURE__ */ O("div", {
260
260
  className: "flex justify-between mb-4",
@@ -323,13 +323,13 @@ function N() {
323
323
  children: [
324
324
  /* @__PURE__ */ k("div", {
325
325
  className: "flex items-center gap-2",
326
- children: [/* @__PURE__ */ O(y, {
326
+ children: [/* @__PURE__ */ O(x, {
327
327
  status: e.status,
328
328
  type: "order",
329
329
  size: "sm"
330
330
  }), /* @__PURE__ */ O("span", {
331
331
  className: "text-sm text-text-secondary",
332
- children: x(e.timestamp, "full")
332
+ children: u(e.timestamp, "full")
333
333
  })]
334
334
  }),
335
335
  e.notes && /* @__PURE__ */ O("p", {
@@ -341,16 +341,16 @@ function N() {
341
341
  children: [/* @__PURE__ */ O(r, {
342
342
  size: 12,
343
343
  className: "inline mr-1"
344
- }), b(e.location)]
344
+ }), l(e.location)]
345
345
  })
346
346
  ]
347
347
  })]
348
348
  }, t))
349
349
  })] })] }),
350
- U?.alerts && U.alerts.length > 0 && /* @__PURE__ */ k(d, { children: [/* @__PURE__ */ O(p, { children: /* @__PURE__ */ k(m, {
350
+ U?.alerts && U.alerts.length > 0 && /* @__PURE__ */ k(p, { children: [/* @__PURE__ */ O(h, { children: /* @__PURE__ */ k(g, {
351
351
  className: "flex items-center gap-2",
352
352
  children: [/* @__PURE__ */ O(e, { size: 18 }), P("movethewheels.tracking.alerts.title", "Alerts")]
353
- }) }), /* @__PURE__ */ O(f, { children: /* @__PURE__ */ O("div", {
353
+ }) }), /* @__PURE__ */ O(m, { children: /* @__PURE__ */ O("div", {
354
354
  className: "space-y-3",
355
355
  children: U.alerts.map((t) => /* @__PURE__ */ k("div", {
356
356
  className: `flex items-start gap-3 p-3 rounded-lg ${t.severity === "critical" ? "bg-status-error-bg-subtle" : (t.severity, "bg-status-warning-bg-subtle")}`,
@@ -362,7 +362,7 @@ function N() {
362
362
  children: t.message
363
363
  }), /* @__PURE__ */ k("p", {
364
364
  className: "text-xs text-text-secondary",
365
- children: [t.timestamp ? x(t.timestamp, "relative") : P("movethewheels.tracking.alerts.timeUnknown", "Time not recorded"), t.resolvedAt && ` - ${P("movethewheels.tracking.alerts.resolved", "Resolved")}`]
365
+ children: [t.timestamp ? u(t.timestamp, "relative") : P("movethewheels.tracking.alerts.timeUnknown", "Time not recorded"), t.resolvedAt && ` - ${P("movethewheels.tracking.alerts.resolved", "Resolved")}`]
366
366
  })] })]
367
367
  }, t.id))
368
368
  }) })] })
@@ -370,10 +370,10 @@ function N() {
370
370
  }), /* @__PURE__ */ k("div", {
371
371
  className: "space-y-6",
372
372
  children: [
373
- /* @__PURE__ */ k(d, { children: [/* @__PURE__ */ O(p, { children: /* @__PURE__ */ k(m, {
373
+ /* @__PURE__ */ k(p, { children: [/* @__PURE__ */ O(h, { children: /* @__PURE__ */ k(g, {
374
374
  className: "flex items-center gap-2",
375
375
  children: [/* @__PURE__ */ O(r, { size: 18 }), P("movethewheels.tracking.location.title", "Current Location")]
376
- }) }), /* @__PURE__ */ k(f, { children: [Y?.current ? /* @__PURE__ */ O(v, {
376
+ }) }), /* @__PURE__ */ k(m, { children: [Y?.current ? /* @__PURE__ */ O(b, {
377
377
  className: "mb-4 overflow-hidden rounded-lg border border-border-seam",
378
378
  height: 180,
379
379
  current: Y.current,
@@ -396,7 +396,7 @@ function N() {
396
396
  children: [
397
397
  P("movethewheels.tracking.location.updated", "Updated"),
398
398
  " ",
399
- x(U.currentLocation.timestamp, "relative")
399
+ u(U.currentLocation.timestamp, "relative")
400
400
  ]
401
401
  }) : /* @__PURE__ */ O("p", {
402
402
  className: "text-xs text-text-secondary mt-1",
@@ -405,22 +405,22 @@ function N() {
405
405
  className: "text-sm text-text-secondary",
406
406
  children: P("movethewheels.tracking.location.unknown", "Location not recorded")
407
407
  }) : null] })] }),
408
- /* @__PURE__ */ k(d, { children: [/* @__PURE__ */ O(p, { children: /* @__PURE__ */ O(m, { children: P("movethewheels.tracking.deliveryAddress.title", "Delivery Address") }) }), /* @__PURE__ */ k(f, { children: [/* @__PURE__ */ O("p", {
408
+ /* @__PURE__ */ k(p, { children: [/* @__PURE__ */ O(h, { children: /* @__PURE__ */ O(g, { children: P("movethewheels.tracking.deliveryAddress.title", "Delivery Address") }) }), /* @__PURE__ */ k(m, { children: [/* @__PURE__ */ O("p", {
409
409
  className: "text-sm",
410
410
  children: W.customerInfo.name
411
411
  }), /* @__PURE__ */ O("p", {
412
412
  className: "text-sm text-text-secondary mt-2",
413
- children: b(W.deliveryAddress)
413
+ children: l(W.deliveryAddress)
414
414
  })] })] }),
415
415
  /* @__PURE__ */ O(C, { deliveryJobId: W.id }),
416
- /* @__PURE__ */ O(d, { children: /* @__PURE__ */ k(f, {
416
+ /* @__PURE__ */ O(p, { children: /* @__PURE__ */ k(m, {
417
417
  className: "p-4 space-y-2",
418
- children: [/* @__PURE__ */ O(u, {
418
+ children: [/* @__PURE__ */ O(f, {
419
419
  variant: "outline",
420
420
  className: "w-full",
421
421
  onClick: () => J(`orders/${W.id}`),
422
422
  children: P("movethewheels.tracking.actions.viewOrderDetails", "View Order Details")
423
- }), /* @__PURE__ */ O(u, {
423
+ }), /* @__PURE__ */ O(f, {
424
424
  variant: "outline",
425
425
  className: "w-full",
426
426
  children: P("movethewheels.tracking.actions.contactDriver", "Contact Driver")
@@ -429,11 +429,11 @@ function N() {
429
429
  ]
430
430
  })]
431
431
  }),
432
- V && !W && !G && !K && /* @__PURE__ */ O(g, {
432
+ V && !W && !G && !K && /* @__PURE__ */ O(v, {
433
433
  illustration: "empty-search",
434
434
  title: P("movethewheels.tracking.notFound.title", "Shipment not found"),
435
435
  description: `${P("movethewheels.tracking.notFound.descriptionPrefix", "No shipment found with tracking number")} "${V}"`,
436
- action: /* @__PURE__ */ O(u, {
436
+ action: /* @__PURE__ */ O(f, {
437
437
  variant: "outline",
438
438
  onClick: () => B(""),
439
439
  children: P("movethewheels.tracking.notFound.tryAnother", "Try another number")