@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.
Files changed (208) hide show
  1. package/README.md +82 -0
  2. package/dist/AIAssistantPage-hD0VYJdH.js +210 -0
  3. package/dist/AnalyticsPage-DHTHCUtr.js +201 -0
  4. package/dist/CreateOrderPage-Cprg4Y9V.js +471 -0
  5. package/dist/CustomerDetailsPage-DNDEw7IW.js +239 -0
  6. package/dist/CustomersPage-CDjjeCEL.js +119 -0
  7. package/dist/DashboardPage-8iTPXRAG.js +374 -0
  8. package/dist/DataTable-CRIKfdIN.js +239 -0
  9. package/dist/DriverDetailsPage-CRyRCno7.js +297 -0
  10. package/dist/DriversPage-16O8fVmf.js +127 -0
  11. package/dist/FinancePage-BYUxK5dR.js +154 -0
  12. package/dist/FleetPage-CHYETCWT.js +293 -0
  13. package/dist/ImportExportPage-C3MKKxfc.js +232 -0
  14. package/dist/InventoryPage--822AxZM.js +223 -0
  15. package/dist/LiveTrackingPage-Dp3rTJDr.js +332 -0
  16. package/dist/MarketplacePage-DjEqudfM.js +192 -0
  17. package/dist/MetricCard-GTbxAk1a.js +135 -0
  18. package/dist/OrderDetailsPage-BIuYG0ub.js +398 -0
  19. package/dist/OrdersListPage-CW5V0Uvh.js +257 -0
  20. package/dist/PageLayout-B7b0vl0R.js +1894 -0
  21. package/dist/ProductDetailsPage-Q3X7AT-7.js +168 -0
  22. package/dist/ProductsPage-CUj9JpnW.js +131 -0
  23. package/dist/ReportsPage-DblO5CdJ.js +227 -0
  24. package/dist/RouteDetailsPage-CLctgk6A.js +240 -0
  25. package/dist/RoutesPage-8hrv6RWT.js +116 -0
  26. package/dist/SettingsPage-BJ5BQeqn.js +247 -0
  27. package/dist/StatusBadge-BrrwraIA.js +206 -0
  28. package/dist/TrackingPage-BGqHDh-w.js +322 -0
  29. package/dist/VehicleDetailsPage-XnDH4iQR.js +194 -0
  30. package/dist/VehiclesPage-Cs4XxHkA.js +127 -0
  31. package/dist/WarehouseDetailsPage-GemdMvr_.js +215 -0
  32. package/dist/WarehousesPage-QTiuDuXy.js +121 -0
  33. package/dist/arrow-left-6CiLhqVp.js +11 -0
  34. package/dist/box-BunB_4UH.js +18 -0
  35. package/dist/chart-column-DWwVEVQ-.js +22 -0
  36. package/dist/chevron-right-DhZVf20o.js +8 -0
  37. package/dist/circle-alert-D5f6RZxt.js +26 -0
  38. package/dist/circle-check-big-D-JMHcTe.js +11 -0
  39. package/dist/clock-CvwBKbQP.js +13 -0
  40. package/dist/dev/main.d.ts +1 -0
  41. package/dist/dollar-sign-CP9qeU5d.js +14 -0
  42. package/dist/download-CIuG04pJ.js +21 -0
  43. package/dist/file-text-Dd_thxkn.js +26 -0
  44. package/dist/filter-DyRMX9CU.js +8 -0
  45. package/dist/formatters-_vJlC-47.js +50 -0
  46. package/dist/generated/global-operations.d.ts +1 -0
  47. package/dist/generated/global-types.d.ts +20715 -0
  48. package/dist/generated/wspace-operations.d.ts +3704 -0
  49. package/dist/generated/wspace-types.d.ts +53362 -0
  50. package/dist/graphqlClient-CdJyR_ed.js +55 -0
  51. package/dist/index.d.ts +4 -0
  52. package/dist/index.js +772 -0
  53. package/dist/map-BqH1cBJi.js +18 -0
  54. package/dist/map-pin-CFBOmh-A.js +13 -0
  55. package/dist/movethewheels/MoveTheWheelsRoot.d.ts +25 -0
  56. package/dist/movethewheels/MoveTheWheelsRoutes.d.ts +7 -0
  57. package/dist/movethewheels/components/DataTable.d.ts +32 -0
  58. package/dist/movethewheels/components/MetricCard.d.ts +43 -0
  59. package/dist/movethewheels/components/PageLayout.d.ts +68 -0
  60. package/dist/movethewheels/components/StatusBadge.d.ts +49 -0
  61. package/dist/movethewheels/components/index.d.ts +10 -0
  62. package/dist/movethewheels/components/ui.d.ts +22 -0
  63. package/dist/movethewheels/constants/index.d.ts +24 -0
  64. package/dist/movethewheels/constants/mockData.d.ts +33 -0
  65. package/dist/movethewheels/hooks/index.d.ts +12 -0
  66. package/dist/movethewheels/hooks/useAnalytics.d.ts +118 -0
  67. package/dist/movethewheels/hooks/useCustomers.d.ts +37 -0
  68. package/dist/movethewheels/hooks/useFleet.d.ts +71 -0
  69. package/dist/movethewheels/hooks/useInventory.d.ts +60 -0
  70. package/dist/movethewheels/hooks/useOrders.d.ts +47 -0
  71. package/dist/movethewheels/hooks/useRoutes.d.ts +41 -0
  72. package/dist/movethewheels/hooks/useTracking.d.ts +69 -0
  73. package/dist/movethewheels/index.d.ts +30 -0
  74. package/dist/movethewheels/pages/AIAssistantPage.d.ts +4 -0
  75. package/dist/movethewheels/pages/AnalyticsPage.d.ts +4 -0
  76. package/dist/movethewheels/pages/CreateOrderPage.d.ts +6 -0
  77. package/dist/movethewheels/pages/CustomerDetailsPage.d.ts +4 -0
  78. package/dist/movethewheels/pages/CustomersPage.d.ts +4 -0
  79. package/dist/movethewheels/pages/DashboardPage.d.ts +6 -0
  80. package/dist/movethewheels/pages/DriverDetailsPage.d.ts +4 -0
  81. package/dist/movethewheels/pages/DriversPage.d.ts +4 -0
  82. package/dist/movethewheels/pages/FinancePage.d.ts +4 -0
  83. package/dist/movethewheels/pages/FleetPage.d.ts +6 -0
  84. package/dist/movethewheels/pages/ImportExportPage.d.ts +4 -0
  85. package/dist/movethewheels/pages/InventoryPage.d.ts +4 -0
  86. package/dist/movethewheels/pages/LiveTrackingPage.d.ts +6 -0
  87. package/dist/movethewheels/pages/MarketplacePage.d.ts +4 -0
  88. package/dist/movethewheels/pages/OrderDetailsPage.d.ts +6 -0
  89. package/dist/movethewheels/pages/OrdersListPage.d.ts +6 -0
  90. package/dist/movethewheels/pages/ProductDetailsPage.d.ts +4 -0
  91. package/dist/movethewheels/pages/ProductsPage.d.ts +4 -0
  92. package/dist/movethewheels/pages/ReportsPage.d.ts +4 -0
  93. package/dist/movethewheels/pages/RouteDetailsPage.d.ts +4 -0
  94. package/dist/movethewheels/pages/RoutesPage.d.ts +4 -0
  95. package/dist/movethewheels/pages/SettingsPage.d.ts +4 -0
  96. package/dist/movethewheels/pages/TrackingPage.d.ts +6 -0
  97. package/dist/movethewheels/pages/VehicleDetailsPage.d.ts +4 -0
  98. package/dist/movethewheels/pages/VehiclesPage.d.ts +4 -0
  99. package/dist/movethewheels/pages/WarehouseDetailsPage.d.ts +4 -0
  100. package/dist/movethewheels/pages/WarehousesPage.d.ts +4 -0
  101. package/dist/movethewheels/providers/MoveTheWheelsProvider.d.ts +16 -0
  102. package/dist/movethewheels/store/movethewheelsStore.d.ts +73 -0
  103. package/dist/movethewheels/types/index.d.ts +655 -0
  104. package/dist/movethewheels/utils/cn.d.ts +6 -0
  105. package/dist/movethewheels/utils/formatters.d.ts +60 -0
  106. package/dist/movethewheels/utils/graphqlClient.d.ts +11 -0
  107. package/dist/movethewheels/utils/index.d.ts +7 -0
  108. package/dist/movethewheels/utils/navigation.d.ts +23 -0
  109. package/dist/navigation-BgnOfsVd.js +6 -0
  110. package/dist/navigation-C2fY_aS9.js +8 -0
  111. package/dist/package-DVZbDRcV.js +22 -0
  112. package/dist/phone-KdwpVmC4.js +18 -0
  113. package/dist/plus-Bl7uX6Ji.js +11 -0
  114. package/dist/refresh-cw-BYjl3K-8.js +22 -0
  115. package/dist/route-Ce_poKFi.js +51 -0
  116. package/dist/save-C-qDVat-.js +18 -0
  117. package/dist/search-5pdn5eOO.js +13 -0
  118. package/dist/settings-C4kIDsYg.js +28 -0
  119. package/dist/square-pen-BwQ67vLE.js +11 -0
  120. package/dist/star-BlVsC3Ad.js +8 -0
  121. package/dist/store-DTmQT5M0.js +26 -0
  122. package/dist/trending-up-C1faflCI.js +11 -0
  123. package/dist/triangle-alert-CUoVAA4L.js +18 -0
  124. package/dist/truck-BmDAzu05.js +30 -0
  125. package/dist/useAnalytics-ph7eTIK6.js +297 -0
  126. package/dist/useCustomers-bS3a4ytk.js +186 -0
  127. package/dist/useFleet-BdETplNE.js +398 -0
  128. package/dist/useInventory-Dwn18FPz.js +323 -0
  129. package/dist/useOrders-D_3_hGMp.js +324 -0
  130. package/dist/useRoutes-v4aBaS-E.js +224 -0
  131. package/dist/useTracking-De2KIUNu.js +261 -0
  132. package/dist/user-BplzDrLP.js +13 -0
  133. package/dist/users-i-igmsP4.js +24 -0
  134. package/dist/warehouse-DewG0PXh.js +25 -0
  135. package/dist/wrench-CoSDEIC7.js +31 -0
  136. package/package.json +107 -0
  137. package/src/dev/main.tsx +110 -0
  138. package/src/dev/styles.css +139 -0
  139. package/src/generated/global-operations.ts +2 -0
  140. package/src/generated/global-types.ts +24048 -0
  141. package/src/generated/wspace-operations.ts +3734 -0
  142. package/src/generated/wspace-types.ts +60715 -0
  143. package/src/index.ts +4 -0
  144. package/src/movethewheels/MoveTheWheelsRoot.tsx +258 -0
  145. package/src/movethewheels/MoveTheWheelsRoutes.tsx +119 -0
  146. package/src/movethewheels/components/DataTable.tsx +367 -0
  147. package/src/movethewheels/components/MetricCard.tsx +180 -0
  148. package/src/movethewheels/components/PageLayout.tsx +234 -0
  149. package/src/movethewheels/components/StatusBadge.tsx +243 -0
  150. package/src/movethewheels/components/index.ts +26 -0
  151. package/src/movethewheels/components/ui.tsx +124 -0
  152. package/src/movethewheels/constants/index.ts +65 -0
  153. package/src/movethewheels/constants/mockData.ts +1342 -0
  154. package/src/movethewheels/hooks/index.ts +55 -0
  155. package/src/movethewheels/hooks/useAnalytics.ts +476 -0
  156. package/src/movethewheels/hooks/useCustomers.ts +359 -0
  157. package/src/movethewheels/hooks/useFleet.ts +778 -0
  158. package/src/movethewheels/hooks/useInventory.ts +632 -0
  159. package/src/movethewheels/hooks/useOrders.ts +703 -0
  160. package/src/movethewheels/hooks/useRoutes.ts +453 -0
  161. package/src/movethewheels/hooks/useTracking.ts +505 -0
  162. package/src/movethewheels/index.ts +68 -0
  163. package/src/movethewheels/pages/AIAssistantPage.tsx +160 -0
  164. package/src/movethewheels/pages/AnalyticsPage.tsx +190 -0
  165. package/src/movethewheels/pages/CreateOrderPage.tsx +454 -0
  166. package/src/movethewheels/pages/CustomerDetailsPage.tsx +207 -0
  167. package/src/movethewheels/pages/CustomersPage.tsx +115 -0
  168. package/src/movethewheels/pages/DashboardPage.tsx +414 -0
  169. package/src/movethewheels/pages/DriverDetailsPage.tsx +261 -0
  170. package/src/movethewheels/pages/DriversPage.tsx +118 -0
  171. package/src/movethewheels/pages/FinancePage.tsx +141 -0
  172. package/src/movethewheels/pages/FleetPage.tsx +289 -0
  173. package/src/movethewheels/pages/ImportExportPage.tsx +165 -0
  174. package/src/movethewheels/pages/InventoryPage.tsx +212 -0
  175. package/src/movethewheels/pages/LiveTrackingPage.tsx +325 -0
  176. package/src/movethewheels/pages/MarketplacePage.tsx +235 -0
  177. package/src/movethewheels/pages/OrderDetailsPage.tsx +387 -0
  178. package/src/movethewheels/pages/OrdersListPage.tsx +241 -0
  179. package/src/movethewheels/pages/ProductDetailsPage.tsx +155 -0
  180. package/src/movethewheels/pages/ProductsPage.tsx +124 -0
  181. package/src/movethewheels/pages/ReportsPage.tsx +164 -0
  182. package/src/movethewheels/pages/RouteDetailsPage.tsx +245 -0
  183. package/src/movethewheels/pages/RoutesPage.tsx +104 -0
  184. package/src/movethewheels/pages/SettingsPage.tsx +242 -0
  185. package/src/movethewheels/pages/TrackingPage.tsx +419 -0
  186. package/src/movethewheels/pages/VehicleDetailsPage.tsx +218 -0
  187. package/src/movethewheels/pages/VehiclesPage.tsx +124 -0
  188. package/src/movethewheels/pages/WarehouseDetailsPage.tsx +216 -0
  189. package/src/movethewheels/pages/WarehousesPage.tsx +122 -0
  190. package/src/movethewheels/providers/MoveTheWheelsProvider.tsx +66 -0
  191. package/src/movethewheels/store/movethewheelsStore.ts +136 -0
  192. package/src/movethewheels/types/index.ts +744 -0
  193. package/src/movethewheels/utils/cn.ts +9 -0
  194. package/src/movethewheels/utils/formatters.ts +215 -0
  195. package/src/movethewheels/utils/graphqlClient.ts +63 -0
  196. package/src/movethewheels/utils/index.ts +8 -0
  197. package/src/movethewheels/utils/navigation.ts +70 -0
  198. package/src/operations/global/.gitkeep +0 -0
  199. package/src/operations/wspace/movethewheels/fragments/core.graphql +191 -0
  200. package/src/operations/wspace/movethewheels/mutations/entities.graphql +87 -0
  201. package/src/operations/wspace/movethewheels/mutations/logistics.graphql +86 -0
  202. package/src/operations/wspace/movethewheels/mutations/marketplace-reports.graphql +81 -0
  203. package/src/operations/wspace/movethewheels/mutations/orders.graphql +21 -0
  204. package/src/operations/wspace/movethewheels/queries/dashboard.graphql +61 -0
  205. package/src/operations/wspace/movethewheels/queries/entities.graphql +83 -0
  206. package/src/operations/wspace/movethewheels/queries/logistics.graphql +84 -0
  207. package/src/operations/wspace/movethewheels/queries/marketplace-reports.graphql +40 -0
  208. package/src/operations/wspace/movethewheels/queries/orders.graphql +43 -0
@@ -0,0 +1,11 @@
1
+ interface GraphQLRequestOptions {
2
+ apiGatewayUrl?: string;
3
+ authToken?: string;
4
+ workspaceToken?: string;
5
+ workspaceId?: string;
6
+ tenantId?: string;
7
+ actorId?: string;
8
+ }
9
+ export declare function resolveGraphqlUrl(apiGatewayUrl?: string): string;
10
+ export declare function executeGraphQL<TData>(options: GraphQLRequestOptions, query: string, variables?: Record<string, unknown>): Promise<TData>;
11
+ export {};
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Utils barrel export
3
+ */
4
+ export { cn } from './cn';
5
+ export * from './formatters';
6
+ export * from './graphqlClient';
7
+ export * from './navigation';
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Navigation utilities for the MoveTheWheels microfrontend.
3
+ */
4
+ /**
5
+ * Join path segments correctly, avoiding double slashes.
6
+ */
7
+ export declare function joinPath(base: string, path: string): string;
8
+ /**
9
+ * Get the relative path from a full path given a base path.
10
+ */
11
+ export declare function getRelativePath(fullPath: string, basePath: string): string;
12
+ /**
13
+ * Check if a path matches a pattern (supports wildcards).
14
+ */
15
+ export declare function pathMatches(path: string, pattern: string): boolean;
16
+ /**
17
+ * Build a URL with query parameters.
18
+ */
19
+ export declare function buildUrl(base: string, params?: Record<string, string | number | boolean>): string;
20
+ /**
21
+ * Parse query parameters from a URL.
22
+ */
23
+ export declare function parseQueryParams(search: string): Record<string, string>;
@@ -0,0 +1,6 @@
1
+ //#region src/movethewheels/utils/navigation.ts
2
+ function e(e, t) {
3
+ return (e.endsWith("/") ? e.slice(0, -1) : e) + (t.startsWith("/") ? t : `/${t}`);
4
+ }
5
+ //#endregion
6
+ export { e as t };
@@ -0,0 +1,8 @@
1
+ import { it as e } from "./PageLayout-B7b0vl0R.js";
2
+ //#region node_modules/lucide-react/dist/esm/icons/navigation.js
3
+ var t = e("Navigation", [["polygon", {
4
+ points: "3 11 22 2 13 21 11 13 3 11",
5
+ key: "1ltx0t"
6
+ }]]);
7
+ //#endregion
8
+ export { t };
@@ -0,0 +1,22 @@
1
+ import { it as e } from "./PageLayout-B7b0vl0R.js";
2
+ //#region node_modules/lucide-react/dist/esm/icons/package.js
3
+ var t = e("Package", [
4
+ ["path", {
5
+ d: "M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",
6
+ key: "1a0edw"
7
+ }],
8
+ ["path", {
9
+ d: "M12 22V12",
10
+ key: "d0xqtd"
11
+ }],
12
+ ["path", {
13
+ d: "m3.3 7 7.703 4.734a2 2 0 0 0 1.994 0L20.7 7",
14
+ key: "yx3hmr"
15
+ }],
16
+ ["path", {
17
+ d: "m7.5 4.27 9 5.15",
18
+ key: "1c824w"
19
+ }]
20
+ ]);
21
+ //#endregion
22
+ export { t };
@@ -0,0 +1,18 @@
1
+ import { it as e } from "./PageLayout-B7b0vl0R.js";
2
+ //#region node_modules/lucide-react/dist/esm/icons/mail.js
3
+ var t = e("Mail", [["rect", {
4
+ width: "20",
5
+ height: "16",
6
+ x: "2",
7
+ y: "4",
8
+ rx: "2",
9
+ key: "18n3k1"
10
+ }], ["path", {
11
+ d: "m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",
12
+ key: "1ocrg3"
13
+ }]]), n = e("Phone", [["path", {
14
+ d: "M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",
15
+ key: "foiqr5"
16
+ }]]);
17
+ //#endregion
18
+ export { t as n, n as t };
@@ -0,0 +1,11 @@
1
+ import { it as e } from "./PageLayout-B7b0vl0R.js";
2
+ //#region node_modules/lucide-react/dist/esm/icons/plus.js
3
+ var t = e("Plus", [["path", {
4
+ d: "M5 12h14",
5
+ key: "1ays0h"
6
+ }], ["path", {
7
+ d: "M12 5v14",
8
+ key: "s699le"
9
+ }]]);
10
+ //#endregion
11
+ export { t };
@@ -0,0 +1,22 @@
1
+ import { it as e } from "./PageLayout-B7b0vl0R.js";
2
+ //#region node_modules/lucide-react/dist/esm/icons/refresh-cw.js
3
+ var t = e("RefreshCw", [
4
+ ["path", {
5
+ d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",
6
+ key: "v9h5vc"
7
+ }],
8
+ ["path", {
9
+ d: "M21 3v5h-5",
10
+ key: "1q7to0"
11
+ }],
12
+ ["path", {
13
+ d: "M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",
14
+ key: "3uifl3"
15
+ }],
16
+ ["path", {
17
+ d: "M8 16H3v5",
18
+ key: "1cv678"
19
+ }]
20
+ ]);
21
+ //#endregion
22
+ export { t };
@@ -0,0 +1,51 @@
1
+ import { it as e } from "./PageLayout-B7b0vl0R.js";
2
+ //#region node_modules/lucide-react/dist/esm/icons/bot.js
3
+ var t = e("Bot", [
4
+ ["path", {
5
+ d: "M12 8V4H8",
6
+ key: "hb8ula"
7
+ }],
8
+ ["rect", {
9
+ width: "16",
10
+ height: "12",
11
+ x: "4",
12
+ y: "8",
13
+ rx: "2",
14
+ key: "enze0r"
15
+ }],
16
+ ["path", {
17
+ d: "M2 14h2",
18
+ key: "vft8re"
19
+ }],
20
+ ["path", {
21
+ d: "M20 14h2",
22
+ key: "4cs60a"
23
+ }],
24
+ ["path", {
25
+ d: "M15 13v2",
26
+ key: "1xurst"
27
+ }],
28
+ ["path", {
29
+ d: "M9 13v2",
30
+ key: "rq6x2g"
31
+ }]
32
+ ]), n = e("Route", [
33
+ ["circle", {
34
+ cx: "6",
35
+ cy: "19",
36
+ r: "3",
37
+ key: "1kj8tv"
38
+ }],
39
+ ["path", {
40
+ d: "M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15",
41
+ key: "1d8sl"
42
+ }],
43
+ ["circle", {
44
+ cx: "18",
45
+ cy: "5",
46
+ r: "3",
47
+ key: "gq8acd"
48
+ }]
49
+ ]);
50
+ //#endregion
51
+ export { t as n, n as t };
@@ -0,0 +1,18 @@
1
+ import { it as e } from "./PageLayout-B7b0vl0R.js";
2
+ //#region node_modules/lucide-react/dist/esm/icons/save.js
3
+ var t = e("Save", [
4
+ ["path", {
5
+ d: "M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",
6
+ key: "1c8476"
7
+ }],
8
+ ["path", {
9
+ d: "M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",
10
+ key: "1ydtos"
11
+ }],
12
+ ["path", {
13
+ d: "M7 3v4a1 1 0 0 0 1 1h7",
14
+ key: "t51u73"
15
+ }]
16
+ ]);
17
+ //#endregion
18
+ export { t };
@@ -0,0 +1,13 @@
1
+ import { it as e } from "./PageLayout-B7b0vl0R.js";
2
+ //#region node_modules/lucide-react/dist/esm/icons/search.js
3
+ var t = e("Search", [["circle", {
4
+ cx: "11",
5
+ cy: "11",
6
+ r: "8",
7
+ key: "4ej97u"
8
+ }], ["path", {
9
+ d: "m21 21-4.3-4.3",
10
+ key: "1qie3q"
11
+ }]]);
12
+ //#endregion
13
+ export { t };
@@ -0,0 +1,28 @@
1
+ import { it as e } from "./PageLayout-B7b0vl0R.js";
2
+ //#region node_modules/lucide-react/dist/esm/icons/globe.js
3
+ var t = e("Globe", [
4
+ ["circle", {
5
+ cx: "12",
6
+ cy: "12",
7
+ r: "10",
8
+ key: "1mglay"
9
+ }],
10
+ ["path", {
11
+ d: "M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",
12
+ key: "13o1zl"
13
+ }],
14
+ ["path", {
15
+ d: "M2 12h20",
16
+ key: "9i4pu4"
17
+ }]
18
+ ]), n = e("Settings", [["path", {
19
+ d: "M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",
20
+ key: "1qme2f"
21
+ }], ["circle", {
22
+ cx: "12",
23
+ cy: "12",
24
+ r: "3",
25
+ key: "1v7zrd"
26
+ }]]);
27
+ //#endregion
28
+ export { t as n, n as t };
@@ -0,0 +1,11 @@
1
+ import { it as e } from "./PageLayout-B7b0vl0R.js";
2
+ //#region node_modules/lucide-react/dist/esm/icons/square-pen.js
3
+ var t = e("SquarePen", [["path", {
4
+ d: "M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",
5
+ key: "1m0v6g"
6
+ }], ["path", {
7
+ d: "M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",
8
+ key: "ohrbg2"
9
+ }]]);
10
+ //#endregion
11
+ export { t };
@@ -0,0 +1,8 @@
1
+ import { it as e } from "./PageLayout-B7b0vl0R.js";
2
+ //#region node_modules/lucide-react/dist/esm/icons/star.js
3
+ var t = e("Star", [["path", {
4
+ d: "M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",
5
+ key: "r04s7s"
6
+ }]]);
7
+ //#endregion
8
+ export { t };
@@ -0,0 +1,26 @@
1
+ import { it as e } from "./PageLayout-B7b0vl0R.js";
2
+ //#region node_modules/lucide-react/dist/esm/icons/store.js
3
+ var t = e("Store", [
4
+ ["path", {
5
+ d: "m2 7 4.41-4.41A2 2 0 0 1 7.83 2h8.34a2 2 0 0 1 1.42.59L22 7",
6
+ key: "ztvudi"
7
+ }],
8
+ ["path", {
9
+ d: "M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8",
10
+ key: "1b2hhj"
11
+ }],
12
+ ["path", {
13
+ d: "M15 22v-4a2 2 0 0 0-2-2h-2a2 2 0 0 0-2 2v4",
14
+ key: "2ebpfo"
15
+ }],
16
+ ["path", {
17
+ d: "M2 7h20",
18
+ key: "1fcdvo"
19
+ }],
20
+ ["path", {
21
+ d: "M22 7v3a2 2 0 0 1-2 2a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 16 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 12 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 8 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 4 12a2 2 0 0 1-2-2V7",
22
+ key: "6c3vgh"
23
+ }]
24
+ ]);
25
+ //#endregion
26
+ export { t };
@@ -0,0 +1,11 @@
1
+ import { it as e } from "./PageLayout-B7b0vl0R.js";
2
+ //#region node_modules/lucide-react/dist/esm/icons/trending-up.js
3
+ var t = e("TrendingUp", [["polyline", {
4
+ points: "22 7 13.5 15.5 8.5 10.5 2 17",
5
+ key: "126l90"
6
+ }], ["polyline", {
7
+ points: "16 7 22 7 22 13",
8
+ key: "kwv8wd"
9
+ }]]);
10
+ //#endregion
11
+ export { t };
@@ -0,0 +1,18 @@
1
+ import { it as e } from "./PageLayout-B7b0vl0R.js";
2
+ //#region node_modules/lucide-react/dist/esm/icons/triangle-alert.js
3
+ var t = e("TriangleAlert", [
4
+ ["path", {
5
+ d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",
6
+ key: "wmoenq"
7
+ }],
8
+ ["path", {
9
+ d: "M12 9v4",
10
+ key: "juzpu7"
11
+ }],
12
+ ["path", {
13
+ d: "M12 17h.01",
14
+ key: "p32p05"
15
+ }]
16
+ ]);
17
+ //#endregion
18
+ export { t };
@@ -0,0 +1,30 @@
1
+ import { it as e } from "./PageLayout-B7b0vl0R.js";
2
+ //#region node_modules/lucide-react/dist/esm/icons/truck.js
3
+ var t = e("Truck", [
4
+ ["path", {
5
+ d: "M14 18V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v11a1 1 0 0 0 1 1h2",
6
+ key: "wrbu53"
7
+ }],
8
+ ["path", {
9
+ d: "M15 18H9",
10
+ key: "1lyqi6"
11
+ }],
12
+ ["path", {
13
+ d: "M19 18h2a1 1 0 0 0 1-1v-3.65a1 1 0 0 0-.22-.624l-3.48-4.35A1 1 0 0 0 17.52 8H14",
14
+ key: "lysw3i"
15
+ }],
16
+ ["circle", {
17
+ cx: "17",
18
+ cy: "18",
19
+ r: "2",
20
+ key: "332jqn"
21
+ }],
22
+ ["circle", {
23
+ cx: "7",
24
+ cy: "18",
25
+ r: "2",
26
+ key: "19iecd"
27
+ }]
28
+ ]);
29
+ //#endregion
30
+ export { t };
@@ -0,0 +1,297 @@
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/useAnalytics.ts
4
+ var o = "\n query GetMovethewheelsAnalytics {\n analytics {\n orderTrend {\n label\n value\n }\n deliveryTrend {\n label\n value\n }\n revenueTrend {\n label\n value\n }\n }\n dashboardMetrics {\n totalOrders\n activeDeliveries\n availableDrivers\n activeVehicles\n lowStockItems\n totalRevenue\n }\n fleetStats {\n totalVehicles\n activeVehicles\n maintenanceVehicles\n }\n }\n", s = "\n query GetDashboardMetrics {\n dashboardMetrics {\n totalOrders\n activeDeliveries\n availableDrivers\n activeVehicles\n lowStockItems\n totalRevenue\n }\n orderStats {\n total\n pending\n inTransit\n delivered\n cancelled\n failed\n }\n fleetStats {\n totalVehicles\n activeVehicles\n maintenanceVehicles\n totalDrivers\n availableDrivers\n onDeliveryDrivers\n }\n financeMetrics {\n revenue {\n totalRevenue\n averageOrderValue\n }\n }\n }\n", c = "\n query GetOrderAnalytics {\n orderStats {\n pending\n inTransit\n delivered\n cancelled\n failed\n }\n analytics {\n orderTrend {\n label\n value\n }\n }\n }\n";
5
+ function l() {
6
+ return {
7
+ overview: {
8
+ totalOrders: 0,
9
+ totalRevenue: 0,
10
+ activeVehicles: 0,
11
+ onTimeDeliveryRate: 0,
12
+ customerSatisfaction: 0
13
+ },
14
+ trends: {
15
+ dailyOrders: [],
16
+ revenue: []
17
+ },
18
+ fleet: {
19
+ utilization: 0,
20
+ totalVehicles: 0,
21
+ activeVehicles: 0,
22
+ maintenanceVehicles: 0,
23
+ outOfServiceVehicles: 0,
24
+ fuelEfficiency: 0
25
+ },
26
+ performance: {
27
+ onTimePickup: 0,
28
+ onTimeDelivery: 0,
29
+ damagedItems: 0,
30
+ customerComplaints: 0,
31
+ driverRatings: 0
32
+ }
33
+ };
34
+ }
35
+ function u(s = {}) {
36
+ let { apiGatewayUrl: c, authToken: u, workspaceToken: d, workspaceId: f, tenantId: p, currentUser: m } = e(), [h, g] = a(l()), [_, v] = a(!1), [y, b] = a(null), x = i(() => ({
37
+ apiGatewayUrl: c,
38
+ authToken: u,
39
+ workspaceToken: d,
40
+ workspaceId: f,
41
+ tenantId: p,
42
+ actorId: m?.id
43
+ }), [
44
+ c,
45
+ u,
46
+ d,
47
+ f,
48
+ p,
49
+ m?.id
50
+ ]), S = n(async () => {
51
+ v(!0), b(null);
52
+ try {
53
+ let e = await t(x, o);
54
+ g({
55
+ overview: {
56
+ totalOrders: e.dashboardMetrics.totalOrders,
57
+ totalRevenue: e.dashboardMetrics.totalRevenue,
58
+ activeVehicles: e.dashboardMetrics.activeVehicles,
59
+ onTimeDeliveryRate: 0,
60
+ customerSatisfaction: 0
61
+ },
62
+ trends: {
63
+ dailyOrders: e.analytics.orderTrend.map((e) => ({
64
+ date: e.label,
65
+ orders: Math.round(e.value)
66
+ })),
67
+ revenue: e.analytics.revenueTrend.map((e) => ({
68
+ month: e.label,
69
+ revenue: e.value
70
+ }))
71
+ },
72
+ fleet: {
73
+ utilization: e.fleetStats.totalVehicles > 0 ? e.fleetStats.activeVehicles / e.fleetStats.totalVehicles * 100 : 0,
74
+ totalVehicles: e.fleetStats.totalVehicles,
75
+ activeVehicles: e.fleetStats.activeVehicles,
76
+ maintenanceVehicles: e.fleetStats.maintenanceVehicles,
77
+ outOfServiceVehicles: Math.max(e.fleetStats.totalVehicles - e.fleetStats.activeVehicles - e.fleetStats.maintenanceVehicles, 0),
78
+ fuelEfficiency: 0
79
+ },
80
+ performance: {
81
+ onTimePickup: 0,
82
+ onTimeDelivery: 0,
83
+ damagedItems: 0,
84
+ customerComplaints: 0,
85
+ driverRatings: 0
86
+ }
87
+ });
88
+ } catch (e) {
89
+ b(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to load analytics"));
90
+ } finally {
91
+ v(!1);
92
+ }
93
+ }, [x]);
94
+ return r(() => {
95
+ S();
96
+ }, [S]), {
97
+ analytics: h,
98
+ isLoading: _,
99
+ error: y,
100
+ refetch: n(() => {
101
+ S();
102
+ }, [S])
103
+ };
104
+ }
105
+ function d() {
106
+ let { apiGatewayUrl: n, authToken: o, workspaceToken: c, workspaceId: l, tenantId: u, currentUser: d } = e(), [f, p] = a({
107
+ orders: {
108
+ total: 0,
109
+ pending: 0,
110
+ inTransit: 0,
111
+ delivered: 0,
112
+ today: 0
113
+ },
114
+ fleet: {
115
+ totalVehicles: 0,
116
+ activeVehicles: 0,
117
+ totalDrivers: 0,
118
+ availableDrivers: 0
119
+ },
120
+ revenue: {
121
+ total: 0,
122
+ avgOrderValue: 0,
123
+ currency: "USD"
124
+ },
125
+ performance: {
126
+ onTimeDeliveryRate: 0,
127
+ avgDriverRating: 0
128
+ }
129
+ }), [m, h] = a(!1), [g, _] = a(null), v = i(() => ({
130
+ apiGatewayUrl: n,
131
+ authToken: o,
132
+ workspaceToken: c,
133
+ workspaceId: l,
134
+ tenantId: u,
135
+ actorId: d?.id
136
+ }), [
137
+ n,
138
+ o,
139
+ c,
140
+ l,
141
+ u,
142
+ d?.id
143
+ ]);
144
+ return r(() => {
145
+ (async () => {
146
+ h(!0), _(null);
147
+ try {
148
+ let e = await t(v, s);
149
+ p({
150
+ orders: {
151
+ total: e.orderStats.total,
152
+ pending: e.orderStats.pending,
153
+ inTransit: e.orderStats.inTransit,
154
+ delivered: e.orderStats.delivered,
155
+ today: 0
156
+ },
157
+ fleet: {
158
+ totalVehicles: e.fleetStats.totalVehicles,
159
+ activeVehicles: e.fleetStats.activeVehicles,
160
+ totalDrivers: e.fleetStats.totalDrivers,
161
+ availableDrivers: e.fleetStats.availableDrivers
162
+ },
163
+ revenue: {
164
+ total: e.financeMetrics.revenue.totalRevenue,
165
+ avgOrderValue: e.financeMetrics.revenue.averageOrderValue,
166
+ currency: "USD"
167
+ },
168
+ performance: {
169
+ onTimeDeliveryRate: 0,
170
+ avgDriverRating: 0
171
+ }
172
+ });
173
+ } catch (e) {
174
+ _(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to load dashboard metrics"));
175
+ } finally {
176
+ h(!1);
177
+ }
178
+ })();
179
+ }, [v]), {
180
+ metrics: f,
181
+ isLoading: m,
182
+ error: g
183
+ };
184
+ }
185
+ function f(e = "monthly") {
186
+ let { analytics: t, isLoading: n, error: r } = u();
187
+ return {
188
+ revenueData: i(() => e === "daily" ? t.trends.dailyOrders.map((e) => ({
189
+ label: e.date,
190
+ value: e.orders
191
+ })) : t.trends.revenue.map((e) => ({
192
+ label: e.month,
193
+ value: e.revenue
194
+ })), [
195
+ t.trends.dailyOrders,
196
+ t.trends.revenue,
197
+ e
198
+ ]),
199
+ isLoading: n,
200
+ error: r
201
+ };
202
+ }
203
+ function p() {
204
+ let { apiGatewayUrl: n, authToken: o, workspaceToken: s, workspaceId: l, tenantId: u, currentUser: d } = e(), [f, p] = a({
205
+ byStatus: [],
206
+ byType: [],
207
+ byPriority: [],
208
+ trends: []
209
+ }), [m, h] = a(!1), [g, _] = a(null), v = i(() => ({
210
+ apiGatewayUrl: n,
211
+ authToken: o,
212
+ workspaceToken: s,
213
+ workspaceId: l,
214
+ tenantId: u,
215
+ actorId: d?.id
216
+ }), [
217
+ n,
218
+ o,
219
+ s,
220
+ l,
221
+ u,
222
+ d?.id
223
+ ]);
224
+ return r(() => {
225
+ (async () => {
226
+ h(!0), _(null);
227
+ try {
228
+ let e = await t(v, c);
229
+ p({
230
+ byStatus: [
231
+ {
232
+ status: "pending",
233
+ count: e.orderStats.pending
234
+ },
235
+ {
236
+ status: "in_transit",
237
+ count: e.orderStats.inTransit
238
+ },
239
+ {
240
+ status: "delivered",
241
+ count: e.orderStats.delivered
242
+ },
243
+ {
244
+ status: "cancelled",
245
+ count: e.orderStats.cancelled
246
+ },
247
+ {
248
+ status: "failed",
249
+ count: e.orderStats.failed
250
+ }
251
+ ],
252
+ byType: [],
253
+ byPriority: [],
254
+ trends: e.analytics.orderTrend.map((e) => ({
255
+ date: e.label,
256
+ orders: Math.round(e.value)
257
+ }))
258
+ });
259
+ } catch (e) {
260
+ _(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to load order analytics"));
261
+ } finally {
262
+ h(!1);
263
+ }
264
+ })();
265
+ }, [v]), {
266
+ orderData: f,
267
+ isLoading: m,
268
+ error: g
269
+ };
270
+ }
271
+ function m() {
272
+ let { analytics: e, isLoading: t, error: n } = u();
273
+ return {
274
+ fleetData: i(() => ({
275
+ vehicleUtilization: e.fleet.utilization,
276
+ avgFuelLevel: 0,
277
+ vehiclesByType: [],
278
+ driverPerformance: [],
279
+ fleetStats: e.fleet
280
+ }), [e.fleet]),
281
+ isLoading: t,
282
+ error: n
283
+ };
284
+ }
285
+ function h() {
286
+ let { analytics: e, isLoading: t, error: n } = u();
287
+ return {
288
+ performanceData: i(() => ({
289
+ ...e.performance,
290
+ driverRatings: []
291
+ }), [e.performance]),
292
+ isLoading: t,
293
+ error: n
294
+ };
295
+ }
296
+ //#endregion
297
+ export { h as a, p as i, d as n, f as o, m as r, u as t };