@burdenoff/microfe-movethewheels 2026.1101.1 → 2026.1101.2

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.
@@ -0,0 +1,51 @@
1
+ import { formatAddress as e } from "./formatters.js";
2
+ //#region src/movethewheels/utils/driverNavigation.ts
3
+ var t = "https://www.google.com/maps/dir/?api=1";
4
+ function n(t) {
5
+ if (!t) return null;
6
+ if (typeof t.latitude == "number" && typeof t.longitude == "number" && Number.isFinite(t.latitude) && Number.isFinite(t.longitude)) return `${t.latitude},${t.longitude}`;
7
+ let n = e(t).trim();
8
+ return n.length > 0 ? n : null;
9
+ }
10
+ function r(e) {
11
+ let r = n(e);
12
+ return r ? `${t}&${new URLSearchParams({
13
+ destination: r,
14
+ travelmode: "driving"
15
+ }).toString()}` : null;
16
+ }
17
+ function i(e) {
18
+ let r = e.map((e) => n(e)).filter((e) => e !== null).slice(0, 10);
19
+ if (r.length === 0) return null;
20
+ let i = r[r.length - 1], a = r.slice(0, -1), o = new URLSearchParams({
21
+ destination: i,
22
+ travelmode: "driving"
23
+ });
24
+ return a.length > 0 && o.set("waypoints", a.join("|")), `${t}&${o.toString()}`;
25
+ }
26
+ function a(e) {
27
+ if (!e) return null;
28
+ let t = e.replace(/[^\d+]/g, "");
29
+ return t.length >= 3 ? `tel:${t}` : null;
30
+ }
31
+ function o(e) {
32
+ return `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}-${String(e.getDate()).padStart(2, "0")}`;
33
+ }
34
+ function s(e, t) {
35
+ let [n, r, i] = e.split("-").map(Number);
36
+ return o(new Date(n, r - 1, i + t));
37
+ }
38
+ function c(e) {
39
+ let [t, n, r] = e.split("-").map(Number);
40
+ return new Date(t, n - 1, r).getTimezoneOffset();
41
+ }
42
+ function l() {
43
+ try {
44
+ let e = Intl.DateTimeFormat().resolvedOptions().timeZone;
45
+ return typeof e == "string" && e.length > 0 ? e : null;
46
+ } catch {
47
+ return null;
48
+ }
49
+ }
50
+ //#endregion
51
+ export { l as deviceTimeZone, o as localDateString, a as phoneHref, i as routeNavigationUrl, s as shiftLocalDate, r as stopNavigationUrl, c as timezoneOffsetFor };
@@ -30,7 +30,7 @@ function o(t, n) {
30
30
  }
31
31
  function s(e, t = "short") {
32
32
  let r = typeof e == "string" ? new Date(e) : e;
33
- return t === "relative" ? l(r) : t === "time" ? new Intl.DateTimeFormat("en-US", {
33
+ return t === "relative" ? u(r) : t === "time" ? new Intl.DateTimeFormat("en-US", {
34
34
  hour: "numeric",
35
35
  minute: "2-digit",
36
36
  hour12: !0,
@@ -64,6 +64,15 @@ function c(e) {
64
64
  }).format(t);
65
65
  }
66
66
  function l(e) {
67
+ let t = typeof e == "string" ? new Date(e) : e;
68
+ return new Intl.DateTimeFormat("en-US", {
69
+ hour: "numeric",
70
+ minute: "2-digit",
71
+ hour12: !0,
72
+ ...n()
73
+ }).format(t);
74
+ }
75
+ function u(e) {
67
76
  let t = typeof e == "string" ? new Date(e) : e, n = Math.floor(((/* @__PURE__ */ new Date()).getTime() - t.getTime()) / 1e3);
68
77
  if (n < 60) return "Just now";
69
78
  let r = Math.floor(n / 60);
@@ -73,19 +82,19 @@ function l(e) {
73
82
  let a = Math.floor(i / 24);
74
83
  return a < 7 ? `${a} ${a === 1 ? "day" : "days"} ago` : s(t);
75
84
  }
76
- var u = new Intl.NumberFormat("en-US", { maximumFractionDigits: 2 }), d = new Intl.NumberFormat("en-US", { maximumFractionDigits: 1 });
77
- function f(t) {
78
- return e.weightUnit === "LB" ? `${u.format(t / i)} lb` : Math.abs(t) >= 1e3 ? `${u.format(t / 1e3)} tonnes` : `${u.format(t)} kg`;
79
- }
85
+ var d = new Intl.NumberFormat("en-US", { maximumFractionDigits: 2 }), f = new Intl.NumberFormat("en-US", { maximumFractionDigits: 1 });
80
86
  function p(t) {
87
+ return e.weightUnit === "LB" ? `${d.format(t / i)} lb` : Math.abs(t) >= 1e3 ? `${d.format(t / 1e3)} tonnes` : `${d.format(t)} kg`;
88
+ }
89
+ function m(t) {
81
90
  if (e.distanceUnit === "MI") {
82
91
  let e = t / r;
83
- return Math.abs(e) < .1 ? `${Math.round(e * 5280)} ft` : `${d.format(e)} mi`;
92
+ return Math.abs(e) < .1 ? `${Math.round(e * 5280)} ft` : `${f.format(e)} mi`;
84
93
  }
85
- return Math.abs(t) < 1 ? `${Math.round(t * 1e3)} m` : `${d.format(t)} km`;
94
+ return Math.abs(t) < 1 ? `${Math.round(t * 1e3)} m` : `${f.format(t)} km`;
86
95
  }
87
- function m(e) {
96
+ function h(e) {
88
97
  return e.split(" ").map((e) => e[0]).join("").toUpperCase().slice(0, 2);
89
98
  }
90
99
  //#endregion
91
- export { a as formatAddress, o as formatCurrency, s as formatDate, c as formatDateTime, p as formatDistance, f as formatWeight, m as getInitials, t as setFormatPreferences };
100
+ export { a as formatAddress, o as formatCurrency, s as formatDate, c as formatDateTime, m as formatDistance, l as formatTime, p as formatWeight, h as getInitials, t as setFormatPreferences };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burdenoff/microfe-movethewheels",
3
- "version": "2026.1101.1",
3
+ "version": "2026.1101.2",
4
4
  "description": "Burdenoff MoveTheWheels Microfrontend - Logistics & Supply Chain Management Platform",
5
5
  "type": "module",
6
6
  "files": [
@@ -37,7 +37,7 @@
37
37
  "format": "prettier --write \"src/**/*.{ts,tsx}\"",
38
38
  "type:check": "bash scripts/build-limits.sh tsc --noEmit",
39
39
  "validate:schema-drift": "graphql-schema-drift",
40
- "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 verify:live-logistics-contract && bun run verify:empty-reuse-retry && bun run verify:empty-reuse-recovery && bun run verify:trip-utilization-input && bun run verify:trip-draft-context && bun run verify:stock-binding-input && bun run verify:stock-observation-input && bun run verify:pending-pick-input && bun run verify:pick-review-ack && bun run verify:driver-license-expiry && bun run verify:tracking-alerts && bun run verify:freight-input && bun run verify:freight-recovery && bun run verify:freight-commercial && bun run verify:freight-invoice && bun run verify:procedure-input && bun run verify:consolidation && bun run verify:multimodal-single-attempt && bun run verify:workspace-predispatch && bun run verify:tracking-quality-outcomes && bun run verify:shipment-status-authority && bun run verify:free-time-permissions && bun run verify:core-codegen && bun run verify:order-vehicle-hold && bun run verify:pallet-preview && bun run verify:entity-export && bun run verify:entity-import && bun run verify:module-settings && bun run verify:carrier-integrations && bun run verify:consumed-fuel-preview && bun run build && bun run build-storybook'",
40
+ "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 verify:live-logistics-contract && bun run verify:empty-reuse-retry && bun run verify:empty-reuse-recovery && bun run verify:trip-utilization-input && bun run verify:trip-draft-context && bun run verify:stock-binding-input && bun run verify:stock-observation-input && bun run verify:pending-pick-input && bun run verify:pick-review-ack && bun run verify:driver-license-expiry && bun run verify:tracking-alerts && bun run verify:freight-input && bun run verify:freight-recovery && bun run verify:freight-commercial && bun run verify:freight-invoice && bun run verify:procedure-input && bun run verify:consolidation && bun run verify:multimodal-single-attempt && bun run verify:workspace-predispatch && bun run verify:tracking-quality-outcomes && bun run verify:shipment-status-authority && bun run verify:free-time-permissions && bun run verify:core-codegen && bun run verify:order-vehicle-hold && bun run verify:pallet-preview && bun run verify:entity-export && bun run verify:entity-import && bun run verify:module-settings && bun run verify:carrier-integrations && bun run verify:driver-day && bun run verify:consumed-fuel-preview && bun run build && bun run build-storybook'",
41
41
  "storybook": "storybook dev -p 6006",
42
42
  "build-storybook": "storybook build",
43
43
  "test:storybook": "vitest run --project=storybook",
@@ -75,6 +75,7 @@
75
75
  "verify:entity-export": "bun test scripts/check-entity-export.test.ts",
76
76
  "verify:entity-import": "bun test scripts/check-entity-import.test.ts",
77
77
  "verify:module-settings": "bun test scripts/check-module-settings.test.ts",
78
+ "verify:driver-day": "bun test scripts/verify-driver-day.test.ts && bun scripts/verify-acknowledged-pending-delivery.mjs",
78
79
  "verify:carrier-integrations": "bun test scripts/check-carrier-integrations.test.ts",
79
80
  "verify:pallet-preview": "bun test scripts/check-pallet-preview.test.ts && bun scripts/verify-pallet-preview-hook.mjs",
80
81
  "verify:consumed-fuel-preview": "bun test scripts/check-consumed-fuel-preview.test.ts && bun scripts/verify-consumed-fuel-preview-hook.mjs && bun scripts/verify-consumed-fuel-preview-component.mjs"