@burdenoff/microfe-movethewheels 2026.510.105
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.
- package/README.md +82 -0
- package/dist/AIAssistantPage-hD0VYJdH.js +210 -0
- package/dist/AnalyticsPage-DHTHCUtr.js +201 -0
- package/dist/CreateOrderPage-Cprg4Y9V.js +471 -0
- package/dist/CustomerDetailsPage-DNDEw7IW.js +239 -0
- package/dist/CustomersPage-CDjjeCEL.js +119 -0
- package/dist/DashboardPage-8iTPXRAG.js +374 -0
- package/dist/DataTable-CRIKfdIN.js +239 -0
- package/dist/DriverDetailsPage-CRyRCno7.js +297 -0
- package/dist/DriversPage-16O8fVmf.js +127 -0
- package/dist/FinancePage-BYUxK5dR.js +154 -0
- package/dist/FleetPage-CHYETCWT.js +293 -0
- package/dist/ImportExportPage-C3MKKxfc.js +232 -0
- package/dist/InventoryPage--822AxZM.js +223 -0
- package/dist/LiveTrackingPage-Dp3rTJDr.js +332 -0
- package/dist/MarketplacePage-DjEqudfM.js +192 -0
- package/dist/MetricCard-GTbxAk1a.js +135 -0
- package/dist/OrderDetailsPage-BIuYG0ub.js +398 -0
- package/dist/OrdersListPage-CW5V0Uvh.js +257 -0
- package/dist/PageLayout-B7b0vl0R.js +1894 -0
- package/dist/ProductDetailsPage-Q3X7AT-7.js +168 -0
- package/dist/ProductsPage-CUj9JpnW.js +131 -0
- package/dist/ReportsPage-DblO5CdJ.js +227 -0
- package/dist/RouteDetailsPage-CLctgk6A.js +240 -0
- package/dist/RoutesPage-8hrv6RWT.js +116 -0
- package/dist/SettingsPage-BJ5BQeqn.js +247 -0
- package/dist/StatusBadge-BrrwraIA.js +206 -0
- package/dist/TrackingPage-BGqHDh-w.js +322 -0
- package/dist/VehicleDetailsPage-XnDH4iQR.js +194 -0
- package/dist/VehiclesPage-Cs4XxHkA.js +127 -0
- package/dist/WarehouseDetailsPage-GemdMvr_.js +215 -0
- package/dist/WarehousesPage-QTiuDuXy.js +121 -0
- package/dist/arrow-left-6CiLhqVp.js +11 -0
- package/dist/box-BunB_4UH.js +18 -0
- package/dist/chart-column-DWwVEVQ-.js +22 -0
- package/dist/chevron-right-DhZVf20o.js +8 -0
- package/dist/circle-alert-D5f6RZxt.js +26 -0
- package/dist/circle-check-big-D-JMHcTe.js +11 -0
- package/dist/clock-CvwBKbQP.js +13 -0
- package/dist/dev/main.d.ts +1 -0
- package/dist/dollar-sign-CP9qeU5d.js +14 -0
- package/dist/download-CIuG04pJ.js +21 -0
- package/dist/file-text-Dd_thxkn.js +26 -0
- package/dist/filter-DyRMX9CU.js +8 -0
- package/dist/formatters-_vJlC-47.js +50 -0
- package/dist/generated/global-operations.d.ts +1 -0
- package/dist/generated/global-types.d.ts +20715 -0
- package/dist/generated/wspace-operations.d.ts +3704 -0
- package/dist/generated/wspace-types.d.ts +53362 -0
- package/dist/graphqlClient-CdJyR_ed.js +55 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +772 -0
- package/dist/map-BqH1cBJi.js +18 -0
- package/dist/map-pin-CFBOmh-A.js +13 -0
- package/dist/movethewheels/MoveTheWheelsRoot.d.ts +25 -0
- package/dist/movethewheels/MoveTheWheelsRoutes.d.ts +7 -0
- package/dist/movethewheels/components/DataTable.d.ts +32 -0
- package/dist/movethewheels/components/MetricCard.d.ts +43 -0
- package/dist/movethewheels/components/PageLayout.d.ts +68 -0
- package/dist/movethewheels/components/StatusBadge.d.ts +49 -0
- package/dist/movethewheels/components/index.d.ts +10 -0
- package/dist/movethewheels/components/ui.d.ts +22 -0
- package/dist/movethewheels/constants/index.d.ts +24 -0
- package/dist/movethewheels/constants/mockData.d.ts +33 -0
- package/dist/movethewheels/hooks/index.d.ts +12 -0
- package/dist/movethewheels/hooks/useAnalytics.d.ts +118 -0
- package/dist/movethewheels/hooks/useCustomers.d.ts +37 -0
- package/dist/movethewheels/hooks/useFleet.d.ts +71 -0
- package/dist/movethewheels/hooks/useInventory.d.ts +60 -0
- package/dist/movethewheels/hooks/useOrders.d.ts +47 -0
- package/dist/movethewheels/hooks/useRoutes.d.ts +41 -0
- package/dist/movethewheels/hooks/useTracking.d.ts +69 -0
- package/dist/movethewheels/index.d.ts +30 -0
- package/dist/movethewheels/pages/AIAssistantPage.d.ts +4 -0
- package/dist/movethewheels/pages/AnalyticsPage.d.ts +4 -0
- package/dist/movethewheels/pages/CreateOrderPage.d.ts +6 -0
- package/dist/movethewheels/pages/CustomerDetailsPage.d.ts +4 -0
- package/dist/movethewheels/pages/CustomersPage.d.ts +4 -0
- package/dist/movethewheels/pages/DashboardPage.d.ts +6 -0
- package/dist/movethewheels/pages/DriverDetailsPage.d.ts +4 -0
- package/dist/movethewheels/pages/DriversPage.d.ts +4 -0
- package/dist/movethewheels/pages/FinancePage.d.ts +4 -0
- package/dist/movethewheels/pages/FleetPage.d.ts +6 -0
- package/dist/movethewheels/pages/ImportExportPage.d.ts +4 -0
- package/dist/movethewheels/pages/InventoryPage.d.ts +4 -0
- package/dist/movethewheels/pages/LiveTrackingPage.d.ts +6 -0
- package/dist/movethewheels/pages/MarketplacePage.d.ts +4 -0
- package/dist/movethewheels/pages/OrderDetailsPage.d.ts +6 -0
- package/dist/movethewheels/pages/OrdersListPage.d.ts +6 -0
- package/dist/movethewheels/pages/ProductDetailsPage.d.ts +4 -0
- package/dist/movethewheels/pages/ProductsPage.d.ts +4 -0
- package/dist/movethewheels/pages/ReportsPage.d.ts +4 -0
- package/dist/movethewheels/pages/RouteDetailsPage.d.ts +4 -0
- package/dist/movethewheels/pages/RoutesPage.d.ts +4 -0
- package/dist/movethewheels/pages/SettingsPage.d.ts +4 -0
- package/dist/movethewheels/pages/TrackingPage.d.ts +6 -0
- package/dist/movethewheels/pages/VehicleDetailsPage.d.ts +4 -0
- package/dist/movethewheels/pages/VehiclesPage.d.ts +4 -0
- package/dist/movethewheels/pages/WarehouseDetailsPage.d.ts +4 -0
- package/dist/movethewheels/pages/WarehousesPage.d.ts +4 -0
- package/dist/movethewheels/providers/MoveTheWheelsProvider.d.ts +16 -0
- package/dist/movethewheels/store/movethewheelsStore.d.ts +73 -0
- package/dist/movethewheels/types/index.d.ts +655 -0
- package/dist/movethewheels/utils/cn.d.ts +6 -0
- package/dist/movethewheels/utils/formatters.d.ts +60 -0
- package/dist/movethewheels/utils/graphqlClient.d.ts +11 -0
- package/dist/movethewheels/utils/index.d.ts +7 -0
- package/dist/movethewheels/utils/navigation.d.ts +23 -0
- package/dist/navigation-BgnOfsVd.js +6 -0
- package/dist/navigation-C2fY_aS9.js +8 -0
- package/dist/package-DVZbDRcV.js +22 -0
- package/dist/phone-KdwpVmC4.js +18 -0
- package/dist/plus-Bl7uX6Ji.js +11 -0
- package/dist/refresh-cw-BYjl3K-8.js +22 -0
- package/dist/route-Ce_poKFi.js +51 -0
- package/dist/save-C-qDVat-.js +18 -0
- package/dist/search-5pdn5eOO.js +13 -0
- package/dist/settings-C4kIDsYg.js +28 -0
- package/dist/square-pen-BwQ67vLE.js +11 -0
- package/dist/star-BlVsC3Ad.js +8 -0
- package/dist/store-DTmQT5M0.js +26 -0
- package/dist/trending-up-C1faflCI.js +11 -0
- package/dist/triangle-alert-CUoVAA4L.js +18 -0
- package/dist/truck-BmDAzu05.js +30 -0
- package/dist/useAnalytics-ph7eTIK6.js +297 -0
- package/dist/useCustomers-bS3a4ytk.js +186 -0
- package/dist/useFleet-BdETplNE.js +398 -0
- package/dist/useInventory-Dwn18FPz.js +323 -0
- package/dist/useOrders-D_3_hGMp.js +324 -0
- package/dist/useRoutes-v4aBaS-E.js +224 -0
- package/dist/useTracking-De2KIUNu.js +261 -0
- package/dist/user-BplzDrLP.js +13 -0
- package/dist/users-i-igmsP4.js +24 -0
- package/dist/warehouse-DewG0PXh.js +25 -0
- package/dist/wrench-CoSDEIC7.js +31 -0
- package/package.json +107 -0
- package/src/dev/main.tsx +110 -0
- package/src/dev/styles.css +139 -0
- package/src/generated/global-operations.ts +2 -0
- package/src/generated/global-types.ts +24048 -0
- package/src/generated/wspace-operations.ts +3734 -0
- package/src/generated/wspace-types.ts +60715 -0
- package/src/index.ts +4 -0
- package/src/movethewheels/MoveTheWheelsRoot.tsx +258 -0
- package/src/movethewheels/MoveTheWheelsRoutes.tsx +119 -0
- package/src/movethewheels/components/DataTable.tsx +367 -0
- package/src/movethewheels/components/MetricCard.tsx +180 -0
- package/src/movethewheels/components/PageLayout.tsx +234 -0
- package/src/movethewheels/components/StatusBadge.tsx +243 -0
- package/src/movethewheels/components/index.ts +26 -0
- package/src/movethewheels/components/ui.tsx +124 -0
- package/src/movethewheels/constants/index.ts +65 -0
- package/src/movethewheels/constants/mockData.ts +1342 -0
- package/src/movethewheels/hooks/index.ts +55 -0
- package/src/movethewheels/hooks/useAnalytics.ts +476 -0
- package/src/movethewheels/hooks/useCustomers.ts +359 -0
- package/src/movethewheels/hooks/useFleet.ts +778 -0
- package/src/movethewheels/hooks/useInventory.ts +632 -0
- package/src/movethewheels/hooks/useOrders.ts +703 -0
- package/src/movethewheels/hooks/useRoutes.ts +453 -0
- package/src/movethewheels/hooks/useTracking.ts +505 -0
- package/src/movethewheels/index.ts +68 -0
- package/src/movethewheels/pages/AIAssistantPage.tsx +160 -0
- package/src/movethewheels/pages/AnalyticsPage.tsx +190 -0
- package/src/movethewheels/pages/CreateOrderPage.tsx +454 -0
- package/src/movethewheels/pages/CustomerDetailsPage.tsx +207 -0
- package/src/movethewheels/pages/CustomersPage.tsx +115 -0
- package/src/movethewheels/pages/DashboardPage.tsx +414 -0
- package/src/movethewheels/pages/DriverDetailsPage.tsx +261 -0
- package/src/movethewheels/pages/DriversPage.tsx +118 -0
- package/src/movethewheels/pages/FinancePage.tsx +141 -0
- package/src/movethewheels/pages/FleetPage.tsx +289 -0
- package/src/movethewheels/pages/ImportExportPage.tsx +165 -0
- package/src/movethewheels/pages/InventoryPage.tsx +212 -0
- package/src/movethewheels/pages/LiveTrackingPage.tsx +325 -0
- package/src/movethewheels/pages/MarketplacePage.tsx +235 -0
- package/src/movethewheels/pages/OrderDetailsPage.tsx +387 -0
- package/src/movethewheels/pages/OrdersListPage.tsx +241 -0
- package/src/movethewheels/pages/ProductDetailsPage.tsx +155 -0
- package/src/movethewheels/pages/ProductsPage.tsx +124 -0
- package/src/movethewheels/pages/ReportsPage.tsx +164 -0
- package/src/movethewheels/pages/RouteDetailsPage.tsx +245 -0
- package/src/movethewheels/pages/RoutesPage.tsx +104 -0
- package/src/movethewheels/pages/SettingsPage.tsx +242 -0
- package/src/movethewheels/pages/TrackingPage.tsx +419 -0
- package/src/movethewheels/pages/VehicleDetailsPage.tsx +218 -0
- package/src/movethewheels/pages/VehiclesPage.tsx +124 -0
- package/src/movethewheels/pages/WarehouseDetailsPage.tsx +216 -0
- package/src/movethewheels/pages/WarehousesPage.tsx +122 -0
- package/src/movethewheels/providers/MoveTheWheelsProvider.tsx +66 -0
- package/src/movethewheels/store/movethewheelsStore.ts +136 -0
- package/src/movethewheels/types/index.ts +744 -0
- package/src/movethewheels/utils/cn.ts +9 -0
- package/src/movethewheels/utils/formatters.ts +215 -0
- package/src/movethewheels/utils/graphqlClient.ts +63 -0
- package/src/movethewheels/utils/index.ts +8 -0
- package/src/movethewheels/utils/navigation.ts +70 -0
- package/src/operations/global/.gitkeep +0 -0
- package/src/operations/wspace/movethewheels/fragments/core.graphql +191 -0
- package/src/operations/wspace/movethewheels/mutations/entities.graphql +87 -0
- package/src/operations/wspace/movethewheels/mutations/logistics.graphql +86 -0
- package/src/operations/wspace/movethewheels/mutations/marketplace-reports.graphql +81 -0
- package/src/operations/wspace/movethewheels/mutations/orders.graphql +21 -0
- package/src/operations/wspace/movethewheels/queries/dashboard.graphql +61 -0
- package/src/operations/wspace/movethewheels/queries/entities.graphql +83 -0
- package/src/operations/wspace/movethewheels/queries/logistics.graphql +84 -0
- package/src/operations/wspace/movethewheels/queries/marketplace-reports.graphql +40 -0
- package/src/operations/wspace/movethewheels/queries/orders.graphql +43 -0
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
import { r as e, t } from "./graphqlClient-CdJyR_ed.js";
|
|
2
|
+
import { useCallback as n, useEffect as r, useMemo as i, useState as a } from "react";
|
|
3
|
+
//#region src/movethewheels/hooks/useRoutes.ts
|
|
4
|
+
var o = "\n query ListRoutes($filter: RouteFilterInput, $pagination: PaginationInput) {\n routes(filter: $filter, pagination: $pagination) {\n id\n name\n status\n shipmentId\n vehicleId\n driverId\n waypoints\n estimatedDistance\n estimatedDuration\n actualDistance\n actualDuration\n createdAt\n }\n }\n", s = "\n query GetRoute($id: ID!) {\n route(id: $id) {\n id\n name\n status\n shipmentId\n vehicleId\n driverId\n waypoints\n estimatedDistance\n estimatedDuration\n actualDistance\n actualDuration\n createdAt\n }\n }\n", c = "\n mutation CreateRoute($input: CreateRouteInput!) {\n createRoute(input: $input) {\n id\n name\n status\n shipmentId\n vehicleId\n driverId\n waypoints\n estimatedDistance\n estimatedDuration\n actualDistance\n actualDuration\n createdAt\n }\n }\n", l = "\n mutation UpdateRoute($id: ID!, $input: UpdateRouteInput!) {\n updateRoute(id: $id, input: $input) {\n id\n name\n status\n shipmentId\n vehicleId\n driverId\n waypoints\n estimatedDistance\n estimatedDuration\n actualDistance\n actualDuration\n createdAt\n }\n }\n", u = "\n mutation DeleteRoute($id: ID!) {\n deleteRoute(id: $id)\n }\n", d = "\n mutation OptimizeRoute($id: ID!) {\n optimizeRoute(id: $id) {\n id\n name\n status\n shipmentId\n vehicleId\n driverId\n waypoints\n estimatedDistance\n estimatedDuration\n actualDistance\n actualDuration\n createdAt\n }\n }\n";
|
|
5
|
+
function f(e) {
|
|
6
|
+
switch (e) {
|
|
7
|
+
case "IN_PROGRESS": return "in_progress";
|
|
8
|
+
case "COMPLETED": return "completed";
|
|
9
|
+
case "CANCELLED": return "cancelled";
|
|
10
|
+
default: return "planned";
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
function p(e) {
|
|
14
|
+
if (e) switch (e) {
|
|
15
|
+
case "in_progress": return "IN_PROGRESS";
|
|
16
|
+
case "completed": return "COMPLETED";
|
|
17
|
+
case "cancelled": return "CANCELLED";
|
|
18
|
+
default: return "PLANNED";
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
function m(e) {
|
|
22
|
+
return Array.isArray(e) ? e.map((e, t) => {
|
|
23
|
+
let n = e ?? {};
|
|
24
|
+
return {
|
|
25
|
+
id: String(n.id ?? `stop-${t + 1}`),
|
|
26
|
+
orderId: String(n.orderId ?? ""),
|
|
27
|
+
sequence: Number(n.sequence ?? t + 1),
|
|
28
|
+
address: {
|
|
29
|
+
street: String(n.street ?? ""),
|
|
30
|
+
city: String(n.city ?? ""),
|
|
31
|
+
state: String(n.state ?? ""),
|
|
32
|
+
postalCode: String(n.postalCode ?? ""),
|
|
33
|
+
country: String(n.country ?? ""),
|
|
34
|
+
latitude: Number(n.latitude ?? 0),
|
|
35
|
+
longitude: Number(n.longitude ?? 0)
|
|
36
|
+
},
|
|
37
|
+
type: n.type === "pickup" ? "pickup" : "delivery",
|
|
38
|
+
scheduledTime: n.scheduledTime ? new Date(String(n.scheduledTime)) : /* @__PURE__ */ new Date(),
|
|
39
|
+
actualTime: n.actualTime ? new Date(String(n.actualTime)) : void 0,
|
|
40
|
+
duration: Number(n.duration ?? 0),
|
|
41
|
+
status: n.status ?? "pending",
|
|
42
|
+
notes: n.notes ? String(n.notes) : void 0
|
|
43
|
+
};
|
|
44
|
+
}) : [];
|
|
45
|
+
}
|
|
46
|
+
function h(e) {
|
|
47
|
+
return {
|
|
48
|
+
id: e.id,
|
|
49
|
+
name: e.name,
|
|
50
|
+
driverId: e.driverId ?? "",
|
|
51
|
+
vehicleId: e.vehicleId ?? "",
|
|
52
|
+
status: f(e.status),
|
|
53
|
+
stops: m(e.waypoints),
|
|
54
|
+
distance: e.estimatedDistance ?? 0,
|
|
55
|
+
estimatedDuration: e.estimatedDuration ?? 0,
|
|
56
|
+
actualDuration: e.actualDuration ?? void 0,
|
|
57
|
+
startTime: void 0,
|
|
58
|
+
endTime: void 0,
|
|
59
|
+
optimized: !1,
|
|
60
|
+
trafficConditions: [],
|
|
61
|
+
createdAt: new Date(e.createdAt)
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
function g() {
|
|
65
|
+
let { apiGatewayUrl: t, authToken: n, workspaceToken: r, workspaceId: a, tenantId: o, currentUser: s } = e();
|
|
66
|
+
return i(() => ({
|
|
67
|
+
apiGatewayUrl: t,
|
|
68
|
+
authToken: n,
|
|
69
|
+
workspaceToken: r,
|
|
70
|
+
workspaceId: a,
|
|
71
|
+
tenantId: o,
|
|
72
|
+
actorId: s?.id
|
|
73
|
+
}), [
|
|
74
|
+
t,
|
|
75
|
+
n,
|
|
76
|
+
r,
|
|
77
|
+
a,
|
|
78
|
+
o,
|
|
79
|
+
s?.id
|
|
80
|
+
]);
|
|
81
|
+
}
|
|
82
|
+
function _(e = {}) {
|
|
83
|
+
let { driverId: i, vehicleId: s, status: f } = e, m = g(), [_, v] = a([]), [y, b] = a(!1), [x, S] = a(null), C = n(async () => {
|
|
84
|
+
b(!0), S(null);
|
|
85
|
+
try {
|
|
86
|
+
v((await t(m, o, {
|
|
87
|
+
filter: {
|
|
88
|
+
driverId: i,
|
|
89
|
+
vehicleId: s,
|
|
90
|
+
status: f ? p(f) : void 0
|
|
91
|
+
},
|
|
92
|
+
pagination: {
|
|
93
|
+
limit: 500,
|
|
94
|
+
offset: 0
|
|
95
|
+
}
|
|
96
|
+
})).routes.map(h));
|
|
97
|
+
} catch (e) {
|
|
98
|
+
S(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to load routes"));
|
|
99
|
+
} finally {
|
|
100
|
+
b(!1);
|
|
101
|
+
}
|
|
102
|
+
}, [
|
|
103
|
+
i,
|
|
104
|
+
m,
|
|
105
|
+
f,
|
|
106
|
+
s
|
|
107
|
+
]);
|
|
108
|
+
r(() => {
|
|
109
|
+
C();
|
|
110
|
+
}, [C]);
|
|
111
|
+
let w = n(() => {
|
|
112
|
+
C();
|
|
113
|
+
}, [C]), T = n(async (e) => {
|
|
114
|
+
let n = h((await t(m, c, { input: {
|
|
115
|
+
name: e.name ?? `Route ${(/* @__PURE__ */ new Date()).toLocaleDateString()}`,
|
|
116
|
+
status: p(e.status),
|
|
117
|
+
shipmentId: void 0,
|
|
118
|
+
vehicleId: e.vehicleId,
|
|
119
|
+
driverId: e.driverId,
|
|
120
|
+
waypoints: e.stops ?? [],
|
|
121
|
+
estimatedDistance: e.distance ?? 0,
|
|
122
|
+
estimatedDuration: e.estimatedDuration ?? 0,
|
|
123
|
+
actualDistance: e.distance,
|
|
124
|
+
actualDuration: e.actualDuration
|
|
125
|
+
} })).createRoute);
|
|
126
|
+
return v((e) => [n, ...e]), n;
|
|
127
|
+
}, [m]), E = n(async (e, n) => {
|
|
128
|
+
let r = h((await t(m, l, {
|
|
129
|
+
id: e,
|
|
130
|
+
input: {
|
|
131
|
+
name: n.name,
|
|
132
|
+
status: p(n.status),
|
|
133
|
+
shipmentId: void 0,
|
|
134
|
+
vehicleId: n.vehicleId,
|
|
135
|
+
driverId: n.driverId,
|
|
136
|
+
waypoints: n.stops,
|
|
137
|
+
estimatedDistance: n.distance,
|
|
138
|
+
estimatedDuration: n.estimatedDuration,
|
|
139
|
+
actualDistance: n.distance,
|
|
140
|
+
actualDuration: n.actualDuration
|
|
141
|
+
}
|
|
142
|
+
})).updateRoute);
|
|
143
|
+
return v((t) => t.map((t) => t.id === e ? r : t)), r;
|
|
144
|
+
}, [m]), D = n(async (e) => {
|
|
145
|
+
await t(m, u, { id: e }), v((t) => t.filter((t) => t.id !== e));
|
|
146
|
+
}, [m]), O = n(async (e) => {
|
|
147
|
+
let n = {
|
|
148
|
+
...h((await t(m, d, { id: e })).optimizeRoute),
|
|
149
|
+
optimized: !0
|
|
150
|
+
};
|
|
151
|
+
return v((t) => t.map((t) => t.id === e ? n : t)), n;
|
|
152
|
+
}, [m]), k = n(async (e, t, n) => {
|
|
153
|
+
let r = _.find((t) => t.id === e);
|
|
154
|
+
if (!r) throw Error("Route not found");
|
|
155
|
+
let i = r.stops.map((e) => e.id === t ? {
|
|
156
|
+
...e,
|
|
157
|
+
status: n,
|
|
158
|
+
actualTime: n === "completed" ? /* @__PURE__ */ new Date() : e.actualTime
|
|
159
|
+
} : e);
|
|
160
|
+
return E(e, {
|
|
161
|
+
stops: i,
|
|
162
|
+
status: i.every((e) => e.status === "completed") ? "completed" : r.status
|
|
163
|
+
});
|
|
164
|
+
}, [_, E]);
|
|
165
|
+
return {
|
|
166
|
+
routes: _,
|
|
167
|
+
totalRoutes: _.length,
|
|
168
|
+
isLoading: y,
|
|
169
|
+
error: x,
|
|
170
|
+
refetch: w,
|
|
171
|
+
createRoute: T,
|
|
172
|
+
updateRoute: E,
|
|
173
|
+
deleteRoute: D,
|
|
174
|
+
optimizeRoute: O,
|
|
175
|
+
updateStopStatus: k
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
function v(e) {
|
|
179
|
+
let i = g(), [o, c] = a(null), [l, u] = a(!1), [d, f] = a(null), p = n(async () => {
|
|
180
|
+
if (!e) {
|
|
181
|
+
c(null);
|
|
182
|
+
return;
|
|
183
|
+
}
|
|
184
|
+
u(!0), f(null);
|
|
185
|
+
try {
|
|
186
|
+
let n = await t(i, s, { id: e });
|
|
187
|
+
c(n.route ? h(n.route) : null);
|
|
188
|
+
} catch (e) {
|
|
189
|
+
f(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to load route"));
|
|
190
|
+
} finally {
|
|
191
|
+
u(!1);
|
|
192
|
+
}
|
|
193
|
+
}, [i, e]);
|
|
194
|
+
return r(() => {
|
|
195
|
+
p();
|
|
196
|
+
}, [p]), {
|
|
197
|
+
route: o,
|
|
198
|
+
isLoading: l,
|
|
199
|
+
error: d,
|
|
200
|
+
refetch: () => void p()
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
function y() {
|
|
204
|
+
let { routes: e, isLoading: t, error: n } = _();
|
|
205
|
+
return {
|
|
206
|
+
stats: i(() => {
|
|
207
|
+
let t = e.reduce((e, t) => e + t.distance, 0), n = e.reduce((e, t) => e + t.estimatedDuration, 0), r = e.length;
|
|
208
|
+
return {
|
|
209
|
+
totalRoutes: r,
|
|
210
|
+
totalDistance: t,
|
|
211
|
+
totalDuration: n,
|
|
212
|
+
avgDistance: r > 0 ? t / r : 0,
|
|
213
|
+
avgDuration: r > 0 ? n / r : 0,
|
|
214
|
+
completedRoutes: e.filter((e) => e.status === "completed").length,
|
|
215
|
+
inProgressRoutes: e.filter((e) => e.status === "in_progress").length,
|
|
216
|
+
plannedRoutes: e.filter((e) => e.status === "planned").length
|
|
217
|
+
};
|
|
218
|
+
}, [e]),
|
|
219
|
+
isLoading: t,
|
|
220
|
+
error: n
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
//#endregion
|
|
224
|
+
export { y as n, _ as r, v as t };
|
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
import { r as e, t } from "./graphqlClient-CdJyR_ed.js";
|
|
2
|
+
import { r as n, t as r } from "./useOrders-D_3_hGMp.js";
|
|
3
|
+
import { a as i, n as a, o, t as s } from "./useFleet-BdETplNE.js";
|
|
4
|
+
import { useCallback as c, useEffect as l, useMemo as u, useState as d } from "react";
|
|
5
|
+
//#region src/movethewheels/hooks/useTracking.ts
|
|
6
|
+
var f = "\n query ListShipments($filter: ShipmentFilterInput, $pagination: PaginationInput) {\n shipments(filter: $filter, pagination: $pagination) {\n id\n shipmentNumber\n orderId\n status\n estimatedDelivery\n }\n }\n", p = "\n query GetShipment($id: ID!) {\n shipment(id: $id) {\n id\n shipmentNumber\n orderId\n status\n estimatedDelivery\n trackingEvents {\n id\n shipmentId\n eventType\n location\n details\n timestamp\n }\n }\n }\n", m = "\n query GetOrderTracking($orderId: ID!) {\n orderTracking(orderId: $orderId) {\n id\n shipmentId\n eventType\n location\n details\n timestamp\n }\n }\n", h = "\n query GetActiveDeliveries {\n activeDeliveries {\n id\n shipmentNumber\n orderId\n status\n estimatedDelivery\n }\n }\n", g = "\n query GetTrackingAlerts {\n trackingAlerts {\n shipmentId\n shipmentNumber\n alertType\n message\n }\n }\n";
|
|
7
|
+
function _(e, t) {
|
|
8
|
+
let n = {
|
|
9
|
+
latitude: Number(e.location?.latitude ?? 0),
|
|
10
|
+
longitude: Number(e.location?.longitude ?? 0),
|
|
11
|
+
address: e.location?.address ?? void 0,
|
|
12
|
+
timestamp: new Date(e.timestamp)
|
|
13
|
+
};
|
|
14
|
+
return {
|
|
15
|
+
id: e.id,
|
|
16
|
+
entityId: t,
|
|
17
|
+
entityType: "order",
|
|
18
|
+
currentLocation: n,
|
|
19
|
+
locationHistory: [n],
|
|
20
|
+
status: e.eventType.toLowerCase(),
|
|
21
|
+
estimatedArrival: void 0,
|
|
22
|
+
nextCheckpoint: e.details ?? void 0,
|
|
23
|
+
alerts: [],
|
|
24
|
+
lastUpdated: new Date(e.timestamp)
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
function v() {
|
|
28
|
+
let { apiGatewayUrl: t, authToken: n, workspaceToken: r, workspaceId: i, tenantId: a, currentUser: o } = e();
|
|
29
|
+
return u(() => ({
|
|
30
|
+
apiGatewayUrl: t,
|
|
31
|
+
authToken: n,
|
|
32
|
+
workspaceToken: r,
|
|
33
|
+
workspaceId: i,
|
|
34
|
+
tenantId: a,
|
|
35
|
+
actorId: o?.id
|
|
36
|
+
}), [
|
|
37
|
+
t,
|
|
38
|
+
n,
|
|
39
|
+
r,
|
|
40
|
+
i,
|
|
41
|
+
a,
|
|
42
|
+
o?.id
|
|
43
|
+
]);
|
|
44
|
+
}
|
|
45
|
+
function y(e = {}) {
|
|
46
|
+
let { entityId: n, entityType: r } = e, i = v(), [a, o] = d([]), [s, u] = d(!1), [p, m] = d(null), h = c(async () => {
|
|
47
|
+
u(!0), m(null);
|
|
48
|
+
try {
|
|
49
|
+
o((await t(i, f, { pagination: {
|
|
50
|
+
limit: 200,
|
|
51
|
+
offset: 0
|
|
52
|
+
} })).shipments.map((e) => ({
|
|
53
|
+
id: e.id,
|
|
54
|
+
entityId: e.orderId,
|
|
55
|
+
entityType: "order",
|
|
56
|
+
currentLocation: {
|
|
57
|
+
latitude: 0,
|
|
58
|
+
longitude: 0,
|
|
59
|
+
timestamp: /* @__PURE__ */ new Date()
|
|
60
|
+
},
|
|
61
|
+
locationHistory: [],
|
|
62
|
+
status: e.status.toLowerCase(),
|
|
63
|
+
estimatedArrival: e.estimatedDelivery ? new Date(e.estimatedDelivery) : void 0,
|
|
64
|
+
nextCheckpoint: e.shipmentNumber,
|
|
65
|
+
alerts: [],
|
|
66
|
+
lastUpdated: /* @__PURE__ */ new Date()
|
|
67
|
+
})).filter((e) => !(n && e.entityId !== n || r && e.entityType !== r)));
|
|
68
|
+
} catch (e) {
|
|
69
|
+
m(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to load tracking data"));
|
|
70
|
+
} finally {
|
|
71
|
+
u(!1);
|
|
72
|
+
}
|
|
73
|
+
}, [
|
|
74
|
+
n,
|
|
75
|
+
r,
|
|
76
|
+
i
|
|
77
|
+
]);
|
|
78
|
+
return l(() => {
|
|
79
|
+
h();
|
|
80
|
+
}, [h]), {
|
|
81
|
+
tracking: a,
|
|
82
|
+
isLoading: s,
|
|
83
|
+
error: p,
|
|
84
|
+
refetch: () => void h()
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
function b(e) {
|
|
88
|
+
let n = v(), { order: i } = r(e), [a, o] = d(null), [s, u] = d(!1), [f, p] = d(null), h = c(async () => {
|
|
89
|
+
if (!e) {
|
|
90
|
+
o(null);
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
u(!0), p(null);
|
|
94
|
+
try {
|
|
95
|
+
let r = await t(n, m, { orderId: e }), i = r.orderTracking[r.orderTracking.length - 1];
|
|
96
|
+
o(i ? _(i, e) : null);
|
|
97
|
+
} catch (e) {
|
|
98
|
+
p(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to load order tracking"));
|
|
99
|
+
} finally {
|
|
100
|
+
u(!1);
|
|
101
|
+
}
|
|
102
|
+
}, [n, e]);
|
|
103
|
+
return l(() => {
|
|
104
|
+
h();
|
|
105
|
+
}, [h]), {
|
|
106
|
+
tracking: a,
|
|
107
|
+
order: i,
|
|
108
|
+
isLoading: s,
|
|
109
|
+
error: f,
|
|
110
|
+
refetch: () => void h()
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
function x(e) {
|
|
114
|
+
let { vehicle: t, isLoading: n, error: r, refetch: a } = i(e);
|
|
115
|
+
return {
|
|
116
|
+
tracking: u(() => !t || !t.currentLocation ? null : {
|
|
117
|
+
id: `vehicle-track-${t.id}`,
|
|
118
|
+
entityId: t.id,
|
|
119
|
+
entityType: "vehicle",
|
|
120
|
+
currentLocation: t.currentLocation,
|
|
121
|
+
locationHistory: [t.currentLocation],
|
|
122
|
+
status: t.status,
|
|
123
|
+
lastUpdated: t.currentLocation.timestamp ?? /* @__PURE__ */ new Date(),
|
|
124
|
+
alerts: []
|
|
125
|
+
}, [t]),
|
|
126
|
+
vehicle: t,
|
|
127
|
+
isLoading: n,
|
|
128
|
+
error: r,
|
|
129
|
+
refetch: a
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
function S(e) {
|
|
133
|
+
let { driver: t, isLoading: n, error: r, refetch: i } = s(e);
|
|
134
|
+
return {
|
|
135
|
+
tracking: u(() => !t || !t.currentLocation ? null : {
|
|
136
|
+
id: `driver-track-${t.id}`,
|
|
137
|
+
entityId: t.id,
|
|
138
|
+
entityType: "driver",
|
|
139
|
+
currentLocation: t.currentLocation,
|
|
140
|
+
locationHistory: [t.currentLocation],
|
|
141
|
+
status: t.status,
|
|
142
|
+
lastUpdated: t.currentLocation.timestamp ?? /* @__PURE__ */ new Date(),
|
|
143
|
+
alerts: []
|
|
144
|
+
}, [t]),
|
|
145
|
+
driver: t,
|
|
146
|
+
isLoading: n,
|
|
147
|
+
error: r,
|
|
148
|
+
refetch: i
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
function C() {
|
|
152
|
+
let e = v(), { orders: r } = n(), { vehicles: i } = o(), { drivers: s } = a(), [u, f] = d([]), [m, g] = d(!1), [y, b] = d(null), x = c(async () => {
|
|
153
|
+
g(!0), b(null);
|
|
154
|
+
try {
|
|
155
|
+
let n = await t(e, h);
|
|
156
|
+
f((await Promise.all(n.activeDeliveries.map(async (n) => {
|
|
157
|
+
let a = (await t(e, p, { id: n.id })).shipment?.trackingEvents ?? [], o = a[a.length - 1], c = r.find((e) => e.id === n.orderId);
|
|
158
|
+
return c ? {
|
|
159
|
+
order: c,
|
|
160
|
+
driver: c.driverId ? s.find((e) => e.id === c.driverId || e.userId === c.driverId) ?? null : null,
|
|
161
|
+
vehicle: c.vehicleId ? i.find((e) => e.id === c.vehicleId) ?? null : null,
|
|
162
|
+
tracking: o ? _(o, n.orderId) : null,
|
|
163
|
+
estimatedArrival: n.estimatedDelivery ? new Date(n.estimatedDelivery) : void 0
|
|
164
|
+
} : null;
|
|
165
|
+
}))).filter((e) => e !== null));
|
|
166
|
+
} catch (e) {
|
|
167
|
+
b(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to load live tracking"));
|
|
168
|
+
} finally {
|
|
169
|
+
g(!1);
|
|
170
|
+
}
|
|
171
|
+
}, [
|
|
172
|
+
s,
|
|
173
|
+
e,
|
|
174
|
+
r,
|
|
175
|
+
i
|
|
176
|
+
]);
|
|
177
|
+
return l(() => {
|
|
178
|
+
x();
|
|
179
|
+
}, [x]), {
|
|
180
|
+
activeDeliveries: u,
|
|
181
|
+
isLoading: m,
|
|
182
|
+
error: y,
|
|
183
|
+
refetch: () => void x()
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
function w() {
|
|
187
|
+
let e = v(), [n, r] = d([]), [i, a] = d(!1), [o, s] = d(null), f = c(async () => {
|
|
188
|
+
a(!0), s(null);
|
|
189
|
+
try {
|
|
190
|
+
r((await t(e, g)).trackingAlerts.map((e) => ({
|
|
191
|
+
id: `${e.shipmentId}-${e.alertType}`,
|
|
192
|
+
type: "delay",
|
|
193
|
+
severity: "medium",
|
|
194
|
+
message: `${e.shipmentNumber}: ${e.message}`,
|
|
195
|
+
timestamp: /* @__PURE__ */ new Date(),
|
|
196
|
+
acknowledged: !1
|
|
197
|
+
})));
|
|
198
|
+
} catch (e) {
|
|
199
|
+
s(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to load tracking alerts"));
|
|
200
|
+
} finally {
|
|
201
|
+
a(!1);
|
|
202
|
+
}
|
|
203
|
+
}, [e]);
|
|
204
|
+
return l(() => {
|
|
205
|
+
f();
|
|
206
|
+
}, [f]), {
|
|
207
|
+
alerts: n,
|
|
208
|
+
unacknowledgedAlerts: u(() => n.filter((e) => !e.acknowledged), [n]),
|
|
209
|
+
acknowledgeAlert: c(async (e) => {
|
|
210
|
+
r((t) => t.map((t) => t.id === e ? {
|
|
211
|
+
...t,
|
|
212
|
+
acknowledged: !0
|
|
213
|
+
} : t));
|
|
214
|
+
}, []),
|
|
215
|
+
isLoading: i,
|
|
216
|
+
error: o,
|
|
217
|
+
refetch: () => void f()
|
|
218
|
+
};
|
|
219
|
+
}
|
|
220
|
+
function T(e, t) {
|
|
221
|
+
let { vehicles: n } = o(), { drivers: r } = a();
|
|
222
|
+
return {
|
|
223
|
+
entitiesInRange: u(() => {
|
|
224
|
+
let i = [];
|
|
225
|
+
return n.forEach((n) => {
|
|
226
|
+
if (!n.currentLocation) return;
|
|
227
|
+
let r = E(e.latitude, e.longitude, n.currentLocation.latitude, n.currentLocation.longitude);
|
|
228
|
+
r <= t && i.push({
|
|
229
|
+
type: "vehicle",
|
|
230
|
+
entity: n,
|
|
231
|
+
distance: r
|
|
232
|
+
});
|
|
233
|
+
}), r.forEach((n) => {
|
|
234
|
+
if (!n.currentLocation) return;
|
|
235
|
+
let r = E(e.latitude, e.longitude, n.currentLocation.latitude, n.currentLocation.longitude);
|
|
236
|
+
r <= t && i.push({
|
|
237
|
+
type: "driver",
|
|
238
|
+
entity: n,
|
|
239
|
+
distance: r
|
|
240
|
+
});
|
|
241
|
+
}), i.sort((e, t) => e.distance - t.distance);
|
|
242
|
+
}, [
|
|
243
|
+
e.latitude,
|
|
244
|
+
e.longitude,
|
|
245
|
+
r,
|
|
246
|
+
t,
|
|
247
|
+
n
|
|
248
|
+
]),
|
|
249
|
+
isLoading: !1,
|
|
250
|
+
error: null
|
|
251
|
+
};
|
|
252
|
+
}
|
|
253
|
+
function E(e, t, n, r) {
|
|
254
|
+
let i = D(n - e), a = D(r - t), o = Math.sin(i / 2) * Math.sin(i / 2) + Math.cos(D(e)) * Math.cos(D(n)) * Math.sin(a / 2) * Math.sin(a / 2);
|
|
255
|
+
return 6371 * (2 * Math.atan2(Math.sqrt(o), Math.sqrt(1 - o)));
|
|
256
|
+
}
|
|
257
|
+
function D(e) {
|
|
258
|
+
return Math.PI / 180 * e;
|
|
259
|
+
}
|
|
260
|
+
//#endregion
|
|
261
|
+
export { y as a, b as i, T as n, w as o, C as r, x as s, S as t };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { it as e } from "./PageLayout-B7b0vl0R.js";
|
|
2
|
+
//#region node_modules/lucide-react/dist/esm/icons/user.js
|
|
3
|
+
var t = e("User", [["path", {
|
|
4
|
+
d: "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",
|
|
5
|
+
key: "975kel"
|
|
6
|
+
}], ["circle", {
|
|
7
|
+
cx: "12",
|
|
8
|
+
cy: "7",
|
|
9
|
+
r: "4",
|
|
10
|
+
key: "17ys0d"
|
|
11
|
+
}]]);
|
|
12
|
+
//#endregion
|
|
13
|
+
export { t };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { it as e } from "./PageLayout-B7b0vl0R.js";
|
|
2
|
+
//#region node_modules/lucide-react/dist/esm/icons/users.js
|
|
3
|
+
var t = e("Users", [
|
|
4
|
+
["path", {
|
|
5
|
+
d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",
|
|
6
|
+
key: "1yyitq"
|
|
7
|
+
}],
|
|
8
|
+
["circle", {
|
|
9
|
+
cx: "9",
|
|
10
|
+
cy: "7",
|
|
11
|
+
r: "4",
|
|
12
|
+
key: "nufk8"
|
|
13
|
+
}],
|
|
14
|
+
["path", {
|
|
15
|
+
d: "M22 21v-2a4 4 0 0 0-3-3.87",
|
|
16
|
+
key: "kshegd"
|
|
17
|
+
}],
|
|
18
|
+
["path", {
|
|
19
|
+
d: "M16 3.13a4 4 0 0 1 0 7.75",
|
|
20
|
+
key: "1da9ce"
|
|
21
|
+
}]
|
|
22
|
+
]);
|
|
23
|
+
//#endregion
|
|
24
|
+
export { t };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { it as e } from "./PageLayout-B7b0vl0R.js";
|
|
2
|
+
//#region node_modules/lucide-react/dist/esm/icons/warehouse.js
|
|
3
|
+
var t = e("Warehouse", [
|
|
4
|
+
["path", {
|
|
5
|
+
d: "M22 8.35V20a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V8.35A2 2 0 0 1 3.26 6.5l8-3.2a2 2 0 0 1 1.48 0l8 3.2A2 2 0 0 1 22 8.35Z",
|
|
6
|
+
key: "gksnxg"
|
|
7
|
+
}],
|
|
8
|
+
["path", {
|
|
9
|
+
d: "M6 18h12",
|
|
10
|
+
key: "9pbo8z"
|
|
11
|
+
}],
|
|
12
|
+
["path", {
|
|
13
|
+
d: "M6 14h12",
|
|
14
|
+
key: "4cwo0f"
|
|
15
|
+
}],
|
|
16
|
+
["rect", {
|
|
17
|
+
width: "12",
|
|
18
|
+
height: "12",
|
|
19
|
+
x: "6",
|
|
20
|
+
y: "10",
|
|
21
|
+
key: "apd30q"
|
|
22
|
+
}]
|
|
23
|
+
]);
|
|
24
|
+
//#endregion
|
|
25
|
+
export { t };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { it as e } from "./PageLayout-B7b0vl0R.js";
|
|
2
|
+
//#region node_modules/lucide-react/dist/esm/icons/fuel.js
|
|
3
|
+
var t = e("Fuel", [
|
|
4
|
+
["line", {
|
|
5
|
+
x1: "3",
|
|
6
|
+
x2: "15",
|
|
7
|
+
y1: "22",
|
|
8
|
+
y2: "22",
|
|
9
|
+
key: "xegly4"
|
|
10
|
+
}],
|
|
11
|
+
["line", {
|
|
12
|
+
x1: "4",
|
|
13
|
+
x2: "14",
|
|
14
|
+
y1: "9",
|
|
15
|
+
y2: "9",
|
|
16
|
+
key: "xcnuvu"
|
|
17
|
+
}],
|
|
18
|
+
["path", {
|
|
19
|
+
d: "M14 22V4a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v18",
|
|
20
|
+
key: "16j0yd"
|
|
21
|
+
}],
|
|
22
|
+
["path", {
|
|
23
|
+
d: "M14 13h2a2 2 0 0 1 2 2v2a2 2 0 0 0 2 2a2 2 0 0 0 2-2V9.83a2 2 0 0 0-.59-1.42L18 5",
|
|
24
|
+
key: "7cu91f"
|
|
25
|
+
}]
|
|
26
|
+
]), n = e("Wrench", [["path", {
|
|
27
|
+
d: "M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",
|
|
28
|
+
key: "cbrjhi"
|
|
29
|
+
}]]);
|
|
30
|
+
//#endregion
|
|
31
|
+
export { t as n, n as t };
|
package/package.json
ADDED
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@burdenoff/microfe-movethewheels",
|
|
3
|
+
"version": "2026.510.105",
|
|
4
|
+
"description": "Burdenoff MoveTheWheels Microfrontend - Logistics & Supply Chain Management Platform",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"files": [
|
|
7
|
+
"src",
|
|
8
|
+
"dist",
|
|
9
|
+
"package.json"
|
|
10
|
+
],
|
|
11
|
+
"imports": {
|
|
12
|
+
"#src/*": "./src/*",
|
|
13
|
+
"#movethewheels/*": "./src/movethewheels/*"
|
|
14
|
+
},
|
|
15
|
+
"exports": {
|
|
16
|
+
".": {
|
|
17
|
+
"types": "./dist/index.d.ts",
|
|
18
|
+
"import": "./dist/movethewheels.js"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"main": "./dist/movethewheels.js",
|
|
22
|
+
"types": "./dist/index.d.ts",
|
|
23
|
+
"scripts": {
|
|
24
|
+
"dev": "vite --port 5191",
|
|
25
|
+
"build": "tsc && vite build",
|
|
26
|
+
"lint": "eslint .",
|
|
27
|
+
"lint:sanity": "if [ \"${CI:-}\" = \"true\" ]; then bun run lint; else bun run lint -- --cache --cache-location .eslintcache; fi",
|
|
28
|
+
"format": "prettier --write \"src/**/*.{ts,tsx}\"",
|
|
29
|
+
"type:check": "tsc --noEmit",
|
|
30
|
+
"sanity": "bun run codegen && bun run lint:sanity && bun run format && bun run type:check && bun run build",
|
|
31
|
+
"schema:pull": "graphql-codegen --project schema-wspace && graphql-codegen --project schema-global",
|
|
32
|
+
"codegen": "graphql-codegen --project wspace && graphql-codegen --project global",
|
|
33
|
+
"codegen:all": "bun run schema:pull && bun run codegen",
|
|
34
|
+
"switch:status": "bun scripts/deps-mode.ts status",
|
|
35
|
+
"switch:remote": "bun scripts/deps-mode.ts remote",
|
|
36
|
+
"switch:local": "bun scripts/deps-mode.ts local",
|
|
37
|
+
"switch:check": "bun scripts/deps-mode.ts check",
|
|
38
|
+
"prepare": "lefthook install || true",
|
|
39
|
+
"format:check": "prettier --check \"src/**/*.{ts,tsx}\""
|
|
40
|
+
},
|
|
41
|
+
"dependencies": {
|
|
42
|
+
"@apollo/client": "^4.0.11",
|
|
43
|
+
"@burdenoff/fe-libs": "2026.507.125",
|
|
44
|
+
"@tanstack/react-query": "^5.90.16",
|
|
45
|
+
"clsx": "^2.1.1",
|
|
46
|
+
"graphql": "^16.12.0",
|
|
47
|
+
"lucide-react": "^0.468.0",
|
|
48
|
+
"react": "^19.0.0",
|
|
49
|
+
"react-dom": "^19.0.0",
|
|
50
|
+
"react-router-dom": "^7.1.3",
|
|
51
|
+
"recharts": "^2.15.0",
|
|
52
|
+
"tailwind-merge": "^3.4.0",
|
|
53
|
+
"zustand": "^5.0.3"
|
|
54
|
+
},
|
|
55
|
+
"devDependencies": {
|
|
56
|
+
"@eslint/js": "^9.39.2",
|
|
57
|
+
"@graphql-codegen/add": "^5.0.0",
|
|
58
|
+
"@graphql-codegen/cli": "^5.0.0",
|
|
59
|
+
"@graphql-codegen/import-types-preset": "^3.0.0",
|
|
60
|
+
"@graphql-codegen/schema-ast": "^4.0.0",
|
|
61
|
+
"@graphql-codegen/typescript": "^4.0.0",
|
|
62
|
+
"@graphql-codegen/typescript-operations": "^4.0.0",
|
|
63
|
+
"@graphql-codegen/typescript-react-apollo": "^4.0.0",
|
|
64
|
+
"@types/react": "^19.0.2",
|
|
65
|
+
"@types/react-dom": "^19.0.2",
|
|
66
|
+
"@vitejs/plugin-react": "^4.3.4",
|
|
67
|
+
"autoprefixer": "^10.4.20",
|
|
68
|
+
"eslint": "^9.18.0",
|
|
69
|
+
"eslint-plugin-react-hooks": "^7.0.1",
|
|
70
|
+
"eslint-plugin-react-refresh": "^0.4.26",
|
|
71
|
+
"globals": "^16.4.0",
|
|
72
|
+
"lefthook": "^2.1.1",
|
|
73
|
+
"postcss": "^8.4.49",
|
|
74
|
+
"prettier": "^3.4.2",
|
|
75
|
+
"tailwindcss": "^4.0.0",
|
|
76
|
+
"typescript": "^5.9.0",
|
|
77
|
+
"typescript-eslint": "^8.54.0",
|
|
78
|
+
"vite": "8.0.8",
|
|
79
|
+
"vite-plugin-dts": "3.9.1"
|
|
80
|
+
},
|
|
81
|
+
"peerDependencies": {
|
|
82
|
+
"@apollo/client": "^4.0.11",
|
|
83
|
+
"react": "^19.0.0",
|
|
84
|
+
"react-dom": "^19.0.0",
|
|
85
|
+
"zustand": "^5.0.0"
|
|
86
|
+
},
|
|
87
|
+
"publishConfig": {
|
|
88
|
+
"access": "restricted"
|
|
89
|
+
},
|
|
90
|
+
"overrides": {
|
|
91
|
+
"lodash": ">=4.17.21",
|
|
92
|
+
"lodash-es": ">=4.17.21",
|
|
93
|
+
"dompurify": ">=3.3.4",
|
|
94
|
+
"fast-xml-parser": ">=4.5.5",
|
|
95
|
+
"@xmldom/xmldom": ">=0.8.12",
|
|
96
|
+
"swiper": ">=12.1.2",
|
|
97
|
+
"brace-expansion": ">=1.1.13",
|
|
98
|
+
"follow-redirects": ">=1.15.12",
|
|
99
|
+
"smol-toml": ">=1.6.1",
|
|
100
|
+
"axios": ">=1.15.0",
|
|
101
|
+
"flatted": ">=3.4.1",
|
|
102
|
+
"yaml": ">=2.8.3",
|
|
103
|
+
"picomatch": ">=2.3.2",
|
|
104
|
+
"immutable": ">=3.8.3",
|
|
105
|
+
"minimatch": ">=3.1.3"
|
|
106
|
+
}
|
|
107
|
+
}
|