@burdenoff/microfe-theglobalfuel 2026.528.1 → 2026.704.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dev/main.d.ts +2 -0
- package/dist/dev/main.d.ts.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +6 -4
- package/dist/node_modules/{clsx → .bun/clsx@2.1.1/node_modules/clsx}/dist/clsx.js +1 -1
- package/dist/node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.js.map +1 -0
- package/dist/node_modules/{tailwind-merge → .bun/tailwind-merge@3.5.0/node_modules/tailwind-merge}/dist/bundle-mjs.js +170 -212
- package/dist/node_modules/.bun/tailwind-merge@3.5.0/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -0
- package/dist/theglobalfuel/TheGlobalFuelRoot.d.ts +5 -0
- package/dist/theglobalfuel/TheGlobalFuelRoot.d.ts.map +1 -0
- package/dist/theglobalfuel/TheGlobalFuelRoot.js +109 -161
- package/dist/theglobalfuel/TheGlobalFuelRoot.js.map +1 -1
- package/dist/theglobalfuel/TheGlobalFuelRoutes.d.ts +4 -0
- package/dist/theglobalfuel/TheGlobalFuelRoutes.d.ts.map +1 -0
- package/dist/theglobalfuel/TheGlobalFuelRoutes.js +70 -85
- package/dist/theglobalfuel/TheGlobalFuelRoutes.js.map +1 -1
- package/dist/theglobalfuel/components/DataTable.d.ts +28 -0
- package/dist/theglobalfuel/components/DataTable.d.ts.map +1 -0
- package/dist/theglobalfuel/components/DataTable.js +71 -0
- package/dist/theglobalfuel/components/DataTable.js.map +1 -0
- package/dist/theglobalfuel/components/EmptyState.d.ts +18 -0
- package/dist/theglobalfuel/components/EmptyState.d.ts.map +1 -0
- package/dist/theglobalfuel/components/EmptyState.js +35 -0
- package/dist/theglobalfuel/components/EmptyState.js.map +1 -0
- package/dist/theglobalfuel/components/EvidenceUpload.d.ts +14 -0
- package/dist/theglobalfuel/components/EvidenceUpload.d.ts.map +1 -0
- package/dist/theglobalfuel/components/EvidenceUpload.js +93 -0
- package/dist/theglobalfuel/components/EvidenceUpload.js.map +1 -0
- package/dist/theglobalfuel/components/FileLink.d.ts +15 -0
- package/dist/theglobalfuel/components/FileLink.d.ts.map +1 -0
- package/dist/theglobalfuel/components/FileLink.js +36 -0
- package/dist/theglobalfuel/components/FileLink.js.map +1 -0
- package/dist/theglobalfuel/components/FilterTabs.d.ts +18 -0
- package/dist/theglobalfuel/components/FilterTabs.d.ts.map +1 -0
- package/dist/theglobalfuel/components/FilterTabs.js +27 -0
- package/dist/theglobalfuel/components/FilterTabs.js.map +1 -0
- package/dist/theglobalfuel/components/MetricsCard.d.ts +23 -0
- package/dist/theglobalfuel/components/MetricsCard.d.ts.map +1 -0
- package/dist/theglobalfuel/components/MetricsCard.js +64 -0
- package/dist/theglobalfuel/components/MetricsCard.js.map +1 -0
- package/dist/theglobalfuel/components/MiniBar.d.ts +16 -0
- package/dist/theglobalfuel/components/MiniBar.d.ts.map +1 -0
- package/dist/theglobalfuel/components/MiniBar.js +22 -0
- package/dist/theglobalfuel/components/MiniBar.js.map +1 -0
- package/dist/theglobalfuel/components/PageLayout.d.ts +16 -0
- package/dist/theglobalfuel/components/PageLayout.d.ts.map +1 -0
- package/dist/theglobalfuel/components/PageLayout.js +38 -0
- package/dist/theglobalfuel/components/PageLayout.js.map +1 -0
- package/dist/theglobalfuel/components/Pagination.d.ts +22 -0
- package/dist/theglobalfuel/components/Pagination.d.ts.map +1 -0
- package/dist/theglobalfuel/components/Pagination.js +50 -0
- package/dist/theglobalfuel/components/Pagination.js.map +1 -0
- package/dist/theglobalfuel/components/StateViews.d.ts +24 -0
- package/dist/theglobalfuel/components/StateViews.d.ts.map +1 -0
- package/dist/theglobalfuel/components/StateViews.js +49 -0
- package/dist/theglobalfuel/components/StateViews.js.map +1 -0
- package/dist/theglobalfuel/components/StatusBadge.d.ts +9 -0
- package/dist/theglobalfuel/components/StatusBadge.d.ts.map +1 -0
- package/dist/theglobalfuel/components/StatusBadge.js +73 -0
- package/dist/theglobalfuel/components/StatusBadge.js.map +1 -0
- package/dist/theglobalfuel/components/Tabs.d.ts +17 -0
- package/dist/theglobalfuel/components/Tabs.d.ts.map +1 -0
- package/dist/theglobalfuel/components/Tabs.js +31 -0
- package/dist/theglobalfuel/components/Tabs.js.map +1 -0
- package/dist/theglobalfuel/components/TheDiscussion.d.ts +18 -0
- package/dist/theglobalfuel/components/TheDiscussion.d.ts.map +1 -0
- package/dist/theglobalfuel/components/TheDiscussion.js +109 -0
- package/dist/theglobalfuel/components/TheDiscussion.js.map +1 -0
- package/dist/theglobalfuel/components/TheTags.d.ts +17 -0
- package/dist/theglobalfuel/components/TheTags.d.ts.map +1 -0
- package/dist/theglobalfuel/components/TheTags.js +149 -0
- package/dist/theglobalfuel/components/TheTags.js.map +1 -0
- package/dist/theglobalfuel/components/index.d.ts +19 -0
- package/dist/theglobalfuel/components/index.d.ts.map +1 -0
- package/dist/theglobalfuel/components/index.js +14 -0
- package/dist/theglobalfuel/context/TheGlobalFuelContext.d.ts +16 -0
- package/dist/theglobalfuel/context/TheGlobalFuelContext.d.ts.map +1 -0
- package/dist/theglobalfuel/context/TheGlobalFuelContext.js +85 -0
- package/dist/theglobalfuel/context/TheGlobalFuelContext.js.map +1 -0
- package/dist/theglobalfuel/context/index.d.ts +6 -0
- package/dist/theglobalfuel/context/index.d.ts.map +1 -0
- package/dist/theglobalfuel/context/index.js +1 -0
- package/dist/theglobalfuel/hooks/index.d.ts +10 -0
- package/dist/theglobalfuel/hooks/index.d.ts.map +1 -0
- package/dist/theglobalfuel/hooks/index.js +5 -0
- package/dist/theglobalfuel/hooks/useCursorPager.d.ts +33 -0
- package/dist/theglobalfuel/hooks/useCursorPager.d.ts.map +1 -0
- package/dist/theglobalfuel/hooks/useCursorPager.js +25 -0
- package/dist/theglobalfuel/hooks/useCursorPager.js.map +1 -0
- package/dist/theglobalfuel/hooks/useTheComments.d.ts +36 -0
- package/dist/theglobalfuel/hooks/useTheComments.d.ts.map +1 -0
- package/dist/theglobalfuel/hooks/useTheComments.js +45 -0
- package/dist/theglobalfuel/hooks/useTheComments.js.map +1 -0
- package/dist/theglobalfuel/hooks/useTheFiles.d.ts +47 -0
- package/dist/theglobalfuel/hooks/useTheFiles.d.ts.map +1 -0
- package/dist/theglobalfuel/hooks/useTheFiles.js +81 -0
- package/dist/theglobalfuel/hooks/useTheFiles.js.map +1 -0
- package/dist/theglobalfuel/hooks/useTheGlobalFuelApi.d.ts +75 -0
- package/dist/theglobalfuel/hooks/useTheGlobalFuelApi.d.ts.map +1 -0
- package/dist/theglobalfuel/hooks/useTheGlobalFuelApi.js +353 -0
- package/dist/theglobalfuel/hooks/useTheGlobalFuelApi.js.map +1 -0
- package/dist/theglobalfuel/hooks/useTheTags.d.ts +44 -0
- package/dist/theglobalfuel/hooks/useTheTags.d.ts.map +1 -0
- package/dist/theglobalfuel/hooks/useTheTags.js +89 -0
- package/dist/theglobalfuel/hooks/useTheTags.js.map +1 -0
- package/dist/theglobalfuel/index.d.ts +9 -0
- package/dist/theglobalfuel/index.d.ts.map +1 -0
- package/dist/theglobalfuel/index.js +5 -2
- package/dist/theglobalfuel/pages/assets/AssetDetailPage.d.ts +13 -0
- package/dist/theglobalfuel/pages/assets/AssetDetailPage.d.ts.map +1 -0
- package/dist/theglobalfuel/pages/assets/AssetDetailPage.js +869 -0
- package/dist/theglobalfuel/pages/assets/AssetDetailPage.js.map +1 -0
- package/dist/theglobalfuel/pages/assets/AssetsPage.d.ts +10 -0
- package/dist/theglobalfuel/pages/assets/AssetsPage.d.ts.map +1 -0
- package/dist/theglobalfuel/pages/assets/AssetsPage.js +547 -0
- package/dist/theglobalfuel/pages/assets/AssetsPage.js.map +1 -0
- package/dist/theglobalfuel/pages/compliance/CompliancePage.d.ts +11 -0
- package/dist/theglobalfuel/pages/compliance/CompliancePage.d.ts.map +1 -0
- package/dist/theglobalfuel/pages/compliance/CompliancePage.js +511 -0
- package/dist/theglobalfuel/pages/compliance/CompliancePage.js.map +1 -0
- package/dist/theglobalfuel/pages/contracts/ContractDetailPage.d.ts +9 -0
- package/dist/theglobalfuel/pages/contracts/ContractDetailPage.d.ts.map +1 -0
- package/dist/theglobalfuel/pages/contracts/ContractDetailPage.js +878 -0
- package/dist/theglobalfuel/pages/contracts/ContractDetailPage.js.map +1 -0
- package/dist/theglobalfuel/pages/contracts/ContractsPage.d.ts +8 -0
- package/dist/theglobalfuel/pages/contracts/ContractsPage.d.ts.map +1 -0
- package/dist/theglobalfuel/pages/contracts/ContractsPage.js +588 -0
- package/dist/theglobalfuel/pages/contracts/ContractsPage.js.map +1 -0
- package/dist/theglobalfuel/pages/dashboard/DashboardPage.d.ts +13 -0
- package/dist/theglobalfuel/pages/dashboard/DashboardPage.d.ts.map +1 -0
- package/dist/theglobalfuel/pages/dashboard/DashboardPage.js +507 -0
- package/dist/theglobalfuel/pages/dashboard/DashboardPage.js.map +1 -0
- package/dist/theglobalfuel/pages/emissions/EmissionsPage.d.ts +12 -0
- package/dist/theglobalfuel/pages/emissions/EmissionsPage.d.ts.map +1 -0
- package/dist/theglobalfuel/pages/emissions/EmissionsPage.js +479 -0
- package/dist/theglobalfuel/pages/emissions/EmissionsPage.js.map +1 -0
- package/dist/theglobalfuel/pages/inventory/InventoryPage.d.ts +11 -0
- package/dist/theglobalfuel/pages/inventory/InventoryPage.d.ts.map +1 -0
- package/dist/theglobalfuel/pages/inventory/InventoryPage.js +592 -0
- package/dist/theglobalfuel/pages/inventory/InventoryPage.js.map +1 -0
- package/dist/theglobalfuel/pages/production/ProductionPage.d.ts +11 -0
- package/dist/theglobalfuel/pages/production/ProductionPage.d.ts.map +1 -0
- package/dist/theglobalfuel/pages/production/ProductionPage.js +421 -0
- package/dist/theglobalfuel/pages/production/ProductionPage.js.map +1 -0
- package/dist/theglobalfuel/pages/reserves/ReservesPage.d.ts +10 -0
- package/dist/theglobalfuel/pages/reserves/ReservesPage.d.ts.map +1 -0
- package/dist/theglobalfuel/pages/reserves/ReservesPage.js +439 -0
- package/dist/theglobalfuel/pages/reserves/ReservesPage.js.map +1 -0
- package/dist/theglobalfuel/pages/shipments/ShipmentsPage.d.ts +10 -0
- package/dist/theglobalfuel/pages/shipments/ShipmentsPage.d.ts.map +1 -0
- package/dist/theglobalfuel/pages/shipments/ShipmentsPage.js +550 -0
- package/dist/theglobalfuel/pages/shipments/ShipmentsPage.js.map +1 -0
- package/dist/theglobalfuel/types/index.d.ts +376 -0
- package/dist/theglobalfuel/types/index.d.ts.map +1 -0
- package/dist/theglobalfuel/utils/cn.d.ts +4 -0
- package/dist/theglobalfuel/utils/cn.d.ts.map +1 -0
- package/dist/theglobalfuel/utils/cn.js +2 -2
- package/dist/theglobalfuel/utils/formatters.d.ts +36 -0
- package/dist/theglobalfuel/utils/formatters.d.ts.map +1 -0
- package/dist/theglobalfuel/utils/formatters.js +94 -0
- package/dist/theglobalfuel/utils/formatters.js.map +1 -0
- package/dist/theglobalfuel/utils/i18n.d.ts +6 -0
- package/dist/theglobalfuel/utils/i18n.d.ts.map +1 -0
- package/dist/theglobalfuel/utils/index.d.ts +9 -0
- package/dist/theglobalfuel/utils/index.d.ts.map +1 -0
- package/dist/theglobalfuel/utils/navigation.d.ts +14 -0
- package/dist/theglobalfuel/utils/navigation.d.ts.map +1 -0
- package/dist/theglobalfuel/utils/navigation.js +2 -1
- package/dist/theglobalfuel/utils/navigation.js.map +1 -1
- package/package.json +3 -3
- package/dist/node_modules/clsx/dist/clsx.js.map +0 -1
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +0 -1
- package/dist/theglobalfuel/pages/AiIntelligencePage.js +0 -190
- package/dist/theglobalfuel/pages/AiIntelligencePage.js.map +0 -1
- package/dist/theglobalfuel/pages/AnalyticsPage.js +0 -241
- package/dist/theglobalfuel/pages/AnalyticsPage.js.map +0 -1
- package/dist/theglobalfuel/pages/CompliancePage.js +0 -173
- package/dist/theglobalfuel/pages/CompliancePage.js.map +0 -1
- package/dist/theglobalfuel/pages/DashboardPage.js +0 -145
- package/dist/theglobalfuel/pages/DashboardPage.js.map +0 -1
- package/dist/theglobalfuel/pages/FinancialPage.js +0 -204
- package/dist/theglobalfuel/pages/FinancialPage.js.map +0 -1
- package/dist/theglobalfuel/pages/FleetManagementPage.js +0 -244
- package/dist/theglobalfuel/pages/FleetManagementPage.js.map +0 -1
- package/dist/theglobalfuel/pages/MarketplacePage.js +0 -260
- package/dist/theglobalfuel/pages/MarketplacePage.js.map +0 -1
- package/dist/theglobalfuel/pages/OperationsPage.js +0 -190
- package/dist/theglobalfuel/pages/OperationsPage.js.map +0 -1
- package/dist/theglobalfuel/pages/QualityControlPage.js +0 -215
- package/dist/theglobalfuel/pages/QualityControlPage.js.map +0 -1
- package/dist/theglobalfuel/pages/ReportsPage.js +0 -247
- package/dist/theglobalfuel/pages/ReportsPage.js.map +0 -1
- package/dist/theglobalfuel/pages/ResourcesPage.js +0 -225
- package/dist/theglobalfuel/pages/ResourcesPage.js.map +0 -1
- package/dist/theglobalfuel/pages/RiskManagementPage.js +0 -230
- package/dist/theglobalfuel/pages/RiskManagementPage.js.map +0 -1
- package/dist/theglobalfuel/pages/SupplyChainPage.js +0 -214
- package/dist/theglobalfuel/pages/SupplyChainPage.js.map +0 -1
- package/dist/theglobalfuel/pages/SustainabilityPage.js +0 -261
- package/dist/theglobalfuel/pages/SustainabilityPage.js.map +0 -1
- package/dist/theglobalfuel/pages/TrainingPage.js +0 -253
- package/dist/theglobalfuel/pages/TrainingPage.js.map +0 -1
- package/dist/theglobalfuel/providers/TheGlobalFuelProvider.js +0 -27
- package/dist/theglobalfuel/providers/TheGlobalFuelProvider.js.map +0 -1
- package/dist/theglobalfuel/store/theglobalfuelStore.js +0 -712
- package/dist/theglobalfuel/store/theglobalfuelStore.js.map +0 -1
- package/dist/theglobalfuel/utils/i18n.js +0 -15
- package/dist/theglobalfuel/utils/i18n.js.map +0 -1
|
@@ -1,175 +1,123 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { joinPath as e } from "./utils/navigation.js";
|
|
2
|
+
import { TheGlobalFuelProvider as t } from "./context/TheGlobalFuelContext.js";
|
|
3
3
|
import { TheGlobalFuelRoutes as n } from "./TheGlobalFuelRoutes.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
4
|
+
import { useCallback as r, useEffect as i } from "react";
|
|
5
|
+
import { QueryClient as a, QueryClientProvider as o } from "@tanstack/react-query";
|
|
6
|
+
import { FeatureFlagProvider as s } from "@burdenoff/fe-libs/shared/feature-flags";
|
|
7
|
+
import { useI18n as c } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
8
|
+
import { Boxes as l, Factory as u, FileText as d, Gauge as f, Layers as p, LayoutDashboard as m, Leaf as h, ShieldCheck as g, Truck as _ } from "lucide-react";
|
|
9
|
+
import { jsx as v } from "react/jsx-runtime";
|
|
10
10
|
//#region src/theglobalfuel/TheGlobalFuelRoot.tsx
|
|
11
|
-
var
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
},
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
{
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
path: r(j, "training"),
|
|
96
|
-
icon: /* @__PURE__ */ E(g, { size: 16 }),
|
|
97
|
-
order: 10
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
id: "theglobalfuel-ai-intelligence",
|
|
101
|
-
label: N("theglobalfuel.nav.aiIntelligence", "AI Intelligence"),
|
|
102
|
-
path: r(j, "ai-intelligence"),
|
|
103
|
-
icon: /* @__PURE__ */ E(l, { size: 16 }),
|
|
104
|
-
order: 11
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
id: "theglobalfuel-marketplace",
|
|
108
|
-
label: N("theglobalfuel.nav.marketplace", "Marketplace"),
|
|
109
|
-
path: r(j, "marketplace"),
|
|
110
|
-
icon: /* @__PURE__ */ E(w, { size: 16 }),
|
|
111
|
-
order: 12
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
id: "theglobalfuel-analytics",
|
|
115
|
-
label: N("theglobalfuel.nav.analytics", "Analytics"),
|
|
116
|
-
path: r(j, "analytics"),
|
|
117
|
-
icon: /* @__PURE__ */ E(c, { size: 16 }),
|
|
118
|
-
order: 13
|
|
119
|
-
},
|
|
120
|
-
{
|
|
121
|
-
id: "theglobalfuel-reports",
|
|
122
|
-
label: N("theglobalfuel.nav.reports", "Reports"),
|
|
123
|
-
path: r(j, "reports"),
|
|
124
|
-
icon: /* @__PURE__ */ E(f, { size: 16 }),
|
|
125
|
-
order: 14
|
|
126
|
-
},
|
|
127
|
-
{
|
|
128
|
-
id: "theglobalfuel-resources",
|
|
129
|
-
label: N("theglobalfuel.nav.resources", "Resources"),
|
|
130
|
-
path: r(j, "resources"),
|
|
131
|
-
icon: /* @__PURE__ */ E(x, { size: 16 }),
|
|
132
|
-
order: 15
|
|
133
|
-
},
|
|
134
|
-
{
|
|
135
|
-
id: "theglobalfuel-settings",
|
|
136
|
-
label: N("theglobalfuel.nav.settings", "Settings"),
|
|
137
|
-
path: r(j, "settings"),
|
|
138
|
-
icon: /* @__PURE__ */ E(S, { size: 16 }),
|
|
139
|
-
order: 16
|
|
140
|
-
},
|
|
141
|
-
{
|
|
142
|
-
id: "theglobalfuel-login",
|
|
143
|
-
label: N("theglobalfuel.nav.login", "Login"),
|
|
144
|
-
path: r(j, "login"),
|
|
145
|
-
icon: /* @__PURE__ */ E(b, { size: 16 }),
|
|
146
|
-
order: 17
|
|
147
|
-
}
|
|
148
|
-
]
|
|
149
|
-
});
|
|
11
|
+
var y = new a({ defaultOptions: { queries: {
|
|
12
|
+
staleTime: 300 * 1e3,
|
|
13
|
+
retry: 1,
|
|
14
|
+
refetchOnWindowFocus: !1
|
|
15
|
+
} } }), b = (a) => {
|
|
16
|
+
let { registerNavItems: b, registerFooterItems: x, basePath: S = "/" } = a, { t: C } = c(), w = r((e, t) => {
|
|
17
|
+
let n = C(e);
|
|
18
|
+
return n === e ? t : n;
|
|
19
|
+
}, [C]);
|
|
20
|
+
return i(() => {
|
|
21
|
+
if (b) return b([
|
|
22
|
+
{
|
|
23
|
+
id: "theglobalfuel-dashboard",
|
|
24
|
+
label: w("theglobalfuel.nav.dashboard", "Dashboard"),
|
|
25
|
+
path: e(S, ""),
|
|
26
|
+
icon: /* @__PURE__ */ v(m, { size: 20 }),
|
|
27
|
+
order: 0,
|
|
28
|
+
group: "products"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
id: "theglobalfuel-assets",
|
|
32
|
+
label: w("theglobalfuel.nav.assets", "Assets"),
|
|
33
|
+
path: e(S, "assets"),
|
|
34
|
+
icon: /* @__PURE__ */ v(u, { size: 20 }),
|
|
35
|
+
order: 1,
|
|
36
|
+
group: "products"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
id: "theglobalfuel-production",
|
|
40
|
+
label: w("theglobalfuel.nav.production", "Production"),
|
|
41
|
+
path: e(S, "production"),
|
|
42
|
+
icon: /* @__PURE__ */ v(f, { size: 20 }),
|
|
43
|
+
order: 2,
|
|
44
|
+
group: "products"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
id: "theglobalfuel-reserves",
|
|
48
|
+
label: w("theglobalfuel.nav.reserves", "Reserves"),
|
|
49
|
+
path: e(S, "reserves"),
|
|
50
|
+
icon: /* @__PURE__ */ v(p, { size: 20 }),
|
|
51
|
+
order: 3,
|
|
52
|
+
group: "products"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
id: "theglobalfuel-contracts",
|
|
56
|
+
label: w("theglobalfuel.nav.contracts", "Offtake Contracts"),
|
|
57
|
+
path: e(S, "contracts"),
|
|
58
|
+
icon: /* @__PURE__ */ v(d, { size: 20 }),
|
|
59
|
+
order: 4,
|
|
60
|
+
group: "products"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
id: "theglobalfuel-shipments",
|
|
64
|
+
label: w("theglobalfuel.nav.shipments", "Shipments"),
|
|
65
|
+
path: e(S, "shipments"),
|
|
66
|
+
icon: /* @__PURE__ */ v(_, { size: 20 }),
|
|
67
|
+
order: 5,
|
|
68
|
+
group: "products"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
id: "theglobalfuel-inventory",
|
|
72
|
+
label: w("theglobalfuel.nav.inventory", "Inventory"),
|
|
73
|
+
path: e(S, "inventory"),
|
|
74
|
+
icon: /* @__PURE__ */ v(l, { size: 20 }),
|
|
75
|
+
order: 6,
|
|
76
|
+
group: "products"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
id: "theglobalfuel-emissions",
|
|
80
|
+
label: w("theglobalfuel.nav.emissions", "Emissions"),
|
|
81
|
+
path: e(S, "emissions"),
|
|
82
|
+
icon: /* @__PURE__ */ v(h, { size: 20 }),
|
|
83
|
+
order: 7,
|
|
84
|
+
group: "products"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
id: "theglobalfuel-compliance",
|
|
88
|
+
label: w("theglobalfuel.nav.compliance", "Compliance"),
|
|
89
|
+
path: e(S, "compliance"),
|
|
90
|
+
icon: /* @__PURE__ */ v(g, { size: 20 }),
|
|
91
|
+
order: 8,
|
|
92
|
+
group: "products"
|
|
93
|
+
}
|
|
94
|
+
]);
|
|
150
95
|
}, [
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
]),
|
|
155
|
-
if (
|
|
96
|
+
b,
|
|
97
|
+
S,
|
|
98
|
+
w
|
|
99
|
+
]), i(() => {
|
|
100
|
+
if (x) return x([{
|
|
156
101
|
id: "theglobalfuel-status",
|
|
157
|
-
label:
|
|
102
|
+
label: w("theglobalfuel.footer.ready", "TheGlobalFuel Ready"),
|
|
158
103
|
type: "status",
|
|
159
104
|
section: "left",
|
|
160
105
|
order: 10
|
|
161
106
|
}]);
|
|
162
|
-
}, [
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
children: /* @__PURE__ */
|
|
107
|
+
}, [x, w]), /* @__PURE__ */ v(o, {
|
|
108
|
+
client: y,
|
|
109
|
+
children: /* @__PURE__ */ v(s, {
|
|
110
|
+
workspaceId: null,
|
|
111
|
+
gateway: "global",
|
|
112
|
+
defaultEnabled: !0,
|
|
113
|
+
children: /* @__PURE__ */ v(t, {
|
|
114
|
+
...a,
|
|
115
|
+
children: /* @__PURE__ */ v(n, {})
|
|
116
|
+
})
|
|
169
117
|
})
|
|
170
118
|
});
|
|
171
119
|
};
|
|
172
120
|
//#endregion
|
|
173
|
-
export {
|
|
121
|
+
export { b as TheGlobalFuelRoot };
|
|
174
122
|
|
|
175
123
|
//# sourceMappingURL=TheGlobalFuelRoot.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TheGlobalFuelRoot.js","names":[],"sources":["../../src/theglobalfuel/TheGlobalFuelRoot.tsx"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"TheGlobalFuelRoot.js","names":[],"sources":["../../src/theglobalfuel/TheGlobalFuelRoot.tsx"],"sourcesContent":["/**\n * TheGlobalFuel Root Component\n * @module theglobalfuel\n *\n * Host-contract entry point. Registers the product's sidebar nav (nine sections\n * that map 1:1 to the wspace-theglobalfuel-svc `the*` backend) and mounts the\n * routed pages inside the shared QueryClient + FeatureFlag providers.\n */\n\nimport type { FC } from 'react';\nimport { useCallback, useEffect } from 'react';\nimport { QueryClient, QueryClientProvider } from '@tanstack/react-query';\nimport { FeatureFlagProvider } from '@burdenoff/fe-libs/shared/feature-flags';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport {\n LayoutDashboard,\n Factory,\n Gauge,\n Layers,\n FileText,\n Truck,\n Boxes,\n Leaf,\n ShieldCheck,\n} from 'lucide-react';\nimport { TheGlobalFuelProvider } from './context/TheGlobalFuelContext';\nimport { TheGlobalFuelRoutes } from './TheGlobalFuelRoutes';\nimport { joinPath } from './utils/navigation';\nimport type { TheGlobalFuelRootProps, NavItem } from './types';\n\nconst queryClient = new QueryClient({\n defaultOptions: {\n queries: {\n staleTime: 5 * 60 * 1000,\n retry: 1,\n refetchOnWindowFocus: false,\n },\n },\n});\n\nexport const TheGlobalFuelRoot: FC<TheGlobalFuelRootProps> = (props) => {\n const { registerNavItems, registerFooterItems, basePath = '/' } = props;\n const { t: translate } = useI18n();\n const t = useCallback(\n (key: string, fallback: string): string => {\n const value = translate(key);\n return value === key ? fallback : value;\n },\n [translate]\n );\n\n // Register navigation items with the shell on mount. Ids/paths/orders match\n // the app-shell static NavRegistration block so the two are a single,\n // consistent source of truth.\n useEffect(() => {\n if (!registerNavItems) return;\n\n const navItems: NavItem[] = [\n {\n id: 'theglobalfuel-dashboard',\n label: t('theglobalfuel.nav.dashboard', 'Dashboard'),\n path: joinPath(basePath, ''),\n icon: <LayoutDashboard size={20} />,\n order: 0,\n group: 'products',\n },\n {\n id: 'theglobalfuel-assets',\n label: t('theglobalfuel.nav.assets', 'Assets'),\n path: joinPath(basePath, 'assets'),\n icon: <Factory size={20} />,\n order: 1,\n group: 'products',\n },\n {\n id: 'theglobalfuel-production',\n label: t('theglobalfuel.nav.production', 'Production'),\n path: joinPath(basePath, 'production'),\n icon: <Gauge size={20} />,\n order: 2,\n group: 'products',\n },\n {\n id: 'theglobalfuel-reserves',\n label: t('theglobalfuel.nav.reserves', 'Reserves'),\n path: joinPath(basePath, 'reserves'),\n icon: <Layers size={20} />,\n order: 3,\n group: 'products',\n },\n {\n id: 'theglobalfuel-contracts',\n label: t('theglobalfuel.nav.contracts', 'Offtake Contracts'),\n path: joinPath(basePath, 'contracts'),\n icon: <FileText size={20} />,\n order: 4,\n group: 'products',\n },\n {\n id: 'theglobalfuel-shipments',\n label: t('theglobalfuel.nav.shipments', 'Shipments'),\n path: joinPath(basePath, 'shipments'),\n icon: <Truck size={20} />,\n order: 5,\n group: 'products',\n },\n {\n id: 'theglobalfuel-inventory',\n label: t('theglobalfuel.nav.inventory', 'Inventory'),\n path: joinPath(basePath, 'inventory'),\n icon: <Boxes size={20} />,\n order: 6,\n group: 'products',\n },\n {\n id: 'theglobalfuel-emissions',\n label: t('theglobalfuel.nav.emissions', 'Emissions'),\n path: joinPath(basePath, 'emissions'),\n icon: <Leaf size={20} />,\n order: 7,\n group: 'products',\n },\n {\n id: 'theglobalfuel-compliance',\n label: t('theglobalfuel.nav.compliance', 'Compliance'),\n path: joinPath(basePath, 'compliance'),\n icon: <ShieldCheck size={20} />,\n order: 8,\n group: 'products',\n },\n ];\n\n return registerNavItems(navItems);\n }, [registerNavItems, basePath, t]);\n\n useEffect(() => {\n if (!registerFooterItems) return;\n return registerFooterItems([\n {\n id: 'theglobalfuel-status',\n label: t('theglobalfuel.footer.ready', 'TheGlobalFuel Ready'),\n type: 'status',\n section: 'left',\n order: 10,\n },\n ]);\n }, [registerFooterItems, t]);\n\n return (\n <QueryClientProvider client={queryClient}>\n <FeatureFlagProvider workspaceId={null} gateway=\"global\" defaultEnabled={true}>\n <TheGlobalFuelProvider {...props}>\n <TheGlobalFuelRoutes />\n </TheGlobalFuelProvider>\n </FeatureFlagProvider>\n </QueryClientProvider>\n );\n};\n"],"mappings":";;;;;;;;;;AA8BA,IAAM,IAAc,IAAI,EAAY,EAClC,gBAAgB,EACd,SAAS;CACP,WAAW,MAAS;CACpB,OAAO;CACP,sBAAsB;CACvB,EACF,EACF,CAAC,EAEW,KAAiD,MAAU;CACtE,IAAM,EAAE,qBAAkB,wBAAqB,cAAW,QAAQ,GAC5D,EAAE,GAAG,MAAc,GAAS,EAC5B,IAAI,GACP,GAAa,MAA6B;EACzC,IAAM,IAAQ,EAAU,EAAI;AAC5B,SAAO,MAAU,IAAM,IAAW;IAEpC,CAAC,EAAU,CACZ;AAmGD,QA9FA,QAAgB;AACT,QA6EL,QAAO,EA3EqB;GAC1B;IACE,IAAI;IACJ,OAAO,EAAE,+BAA+B,YAAY;IACpD,MAAM,EAAS,GAAU,GAAG;IAC5B,MAAM,kBAAC,GAAD,EAAiB,MAAM,IAAM,CAAA;IACnC,OAAO;IACP,OAAO;IACR;GACD;IACE,IAAI;IACJ,OAAO,EAAE,4BAA4B,SAAS;IAC9C,MAAM,EAAS,GAAU,SAAS;IAClC,MAAM,kBAAC,GAAD,EAAS,MAAM,IAAM,CAAA;IAC3B,OAAO;IACP,OAAO;IACR;GACD;IACE,IAAI;IACJ,OAAO,EAAE,gCAAgC,aAAa;IACtD,MAAM,EAAS,GAAU,aAAa;IACtC,MAAM,kBAAC,GAAD,EAAO,MAAM,IAAM,CAAA;IACzB,OAAO;IACP,OAAO;IACR;GACD;IACE,IAAI;IACJ,OAAO,EAAE,8BAA8B,WAAW;IAClD,MAAM,EAAS,GAAU,WAAW;IACpC,MAAM,kBAAC,GAAD,EAAQ,MAAM,IAAM,CAAA;IAC1B,OAAO;IACP,OAAO;IACR;GACD;IACE,IAAI;IACJ,OAAO,EAAE,+BAA+B,oBAAoB;IAC5D,MAAM,EAAS,GAAU,YAAY;IACrC,MAAM,kBAAC,GAAD,EAAU,MAAM,IAAM,CAAA;IAC5B,OAAO;IACP,OAAO;IACR;GACD;IACE,IAAI;IACJ,OAAO,EAAE,+BAA+B,YAAY;IACpD,MAAM,EAAS,GAAU,YAAY;IACrC,MAAM,kBAAC,GAAD,EAAO,MAAM,IAAM,CAAA;IACzB,OAAO;IACP,OAAO;IACR;GACD;IACE,IAAI;IACJ,OAAO,EAAE,+BAA+B,YAAY;IACpD,MAAM,EAAS,GAAU,YAAY;IACrC,MAAM,kBAAC,GAAD,EAAO,MAAM,IAAM,CAAA;IACzB,OAAO;IACP,OAAO;IACR;GACD;IACE,IAAI;IACJ,OAAO,EAAE,+BAA+B,YAAY;IACpD,MAAM,EAAS,GAAU,YAAY;IACrC,MAAM,kBAAC,GAAD,EAAM,MAAM,IAAM,CAAA;IACxB,OAAO;IACP,OAAO;IACR;GACD;IACE,IAAI;IACJ,OAAO,EAAE,gCAAgC,aAAa;IACtD,MAAM,EAAS,GAAU,aAAa;IACtC,MAAM,kBAAC,GAAD,EAAa,MAAM,IAAM,CAAA;IAC/B,OAAO;IACP,OAAO;IACR;GACF,CAEgC;IAChC;EAAC;EAAkB;EAAU;EAAE,CAAC,EAEnC,QAAgB;AACT,QACL,QAAO,EAAoB,CACzB;GACE,IAAI;GACJ,OAAO,EAAE,8BAA8B,sBAAsB;GAC7D,MAAM;GACN,SAAS;GACT,OAAO;GACR,CACF,CAAC;IACD,CAAC,GAAqB,EAAE,CAAC,EAG1B,kBAAC,GAAD;EAAqB,QAAQ;YAC3B,kBAAC,GAAD;GAAqB,aAAa;GAAM,SAAQ;GAAS,gBAAgB;aACvE,kBAAC,GAAD;IAAuB,GAAI;cACzB,kBAAC,GAAD,EAAuB,CAAA;IACD,CAAA;GACJ,CAAA;EACF,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TheGlobalFuelRoutes.d.ts","sourceRoot":"","sources":["../../src/theglobalfuel/TheGlobalFuelRoutes.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,KAAK,EAAE,EAAkB,MAAM,OAAO,CAAC;AAkDhD,eAAO,MAAM,mBAAmB,EAAE,EA6CjC,CAAC"}
|
|
@@ -1,91 +1,76 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { Navigate as i, Route as a, Routes as o } from "react-router-dom";
|
|
5
|
-
import { jsx as
|
|
1
|
+
import { useTheGlobalFuel as e } from "./context/TheGlobalFuelContext.js";
|
|
2
|
+
import { DashboardPage as t } from "./pages/dashboard/DashboardPage.js";
|
|
3
|
+
import { Suspense as n, lazy as r } from "react";
|
|
4
|
+
import { Navigate as i, Route as a, Routes as o, useLocation as s } from "react-router-dom";
|
|
5
|
+
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
6
|
+
import { Spinner as u } from "@burdenoff/fe-libs/ui";
|
|
6
7
|
//#region src/theglobalfuel/TheGlobalFuelRoutes.tsx
|
|
7
|
-
var
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
path: "supply-chain",
|
|
68
|
-
element: /* @__PURE__ */ s(b, {})
|
|
69
|
-
}),
|
|
70
|
-
/* @__PURE__ */ s(a, {
|
|
71
|
-
path: "sustainability",
|
|
72
|
-
element: /* @__PURE__ */ s(x, {})
|
|
73
|
-
}),
|
|
74
|
-
/* @__PURE__ */ s(a, {
|
|
75
|
-
path: "training",
|
|
76
|
-
element: /* @__PURE__ */ s(S, {})
|
|
77
|
-
}),
|
|
78
|
-
/* @__PURE__ */ s(a, {
|
|
79
|
-
path: "*",
|
|
80
|
-
element: /* @__PURE__ */ s(i, {
|
|
81
|
-
to: "",
|
|
82
|
-
replace: !0
|
|
8
|
+
var d = r(() => import("./pages/assets/AssetsPage.js").then((e) => ({ default: e.AssetsPage }))), f = r(() => import("./pages/assets/AssetDetailPage.js").then((e) => ({ default: e.AssetDetailPage }))), p = r(() => import("./pages/production/ProductionPage.js").then((e) => ({ default: e.ProductionPage }))), m = r(() => import("./pages/reserves/ReservesPage.js").then((e) => ({ default: e.ReservesPage }))), h = r(() => import("./pages/contracts/ContractsPage.js").then((e) => ({ default: e.ContractsPage }))), g = r(() => import("./pages/contracts/ContractDetailPage.js").then((e) => ({ default: e.ContractDetailPage }))), _ = r(() => import("./pages/shipments/ShipmentsPage.js").then((e) => ({ default: e.ShipmentsPage }))), v = r(() => import("./pages/inventory/InventoryPage.js").then((e) => ({ default: e.InventoryPage }))), y = r(() => import("./pages/emissions/EmissionsPage.js").then((e) => ({ default: e.EmissionsPage }))), b = r(() => import("./pages/compliance/CompliancePage.js").then((e) => ({ default: e.CompliancePage }))), x = () => /* @__PURE__ */ c("div", {
|
|
9
|
+
className: "flex min-h-[400px] items-center justify-center",
|
|
10
|
+
children: /* @__PURE__ */ c(u, { size: "lg" })
|
|
11
|
+
}), S = () => {
|
|
12
|
+
let { basePath: r, isStandalone: u } = e(), S = s(), C = r === "/" ? "" : (r ?? "").replace(/\/$/, "");
|
|
13
|
+
return C && !u && !(S.pathname === C || S.pathname.startsWith(C + "/")) ? null : /* @__PURE__ */ c("div", {
|
|
14
|
+
className: "flex min-h-full flex-col",
|
|
15
|
+
children: /* @__PURE__ */ c(n, {
|
|
16
|
+
fallback: /* @__PURE__ */ c(x, {}),
|
|
17
|
+
children: /* @__PURE__ */ l(o, { children: [
|
|
18
|
+
/* @__PURE__ */ c(a, {
|
|
19
|
+
index: !0,
|
|
20
|
+
element: /* @__PURE__ */ c(t, {})
|
|
21
|
+
}),
|
|
22
|
+
/* @__PURE__ */ c(a, {
|
|
23
|
+
path: "assets",
|
|
24
|
+
element: /* @__PURE__ */ c(d, {})
|
|
25
|
+
}),
|
|
26
|
+
/* @__PURE__ */ c(a, {
|
|
27
|
+
path: "assets/:id",
|
|
28
|
+
element: /* @__PURE__ */ c(f, {})
|
|
29
|
+
}),
|
|
30
|
+
/* @__PURE__ */ c(a, {
|
|
31
|
+
path: "production",
|
|
32
|
+
element: /* @__PURE__ */ c(p, {})
|
|
33
|
+
}),
|
|
34
|
+
/* @__PURE__ */ c(a, {
|
|
35
|
+
path: "reserves",
|
|
36
|
+
element: /* @__PURE__ */ c(m, {})
|
|
37
|
+
}),
|
|
38
|
+
/* @__PURE__ */ c(a, {
|
|
39
|
+
path: "contracts",
|
|
40
|
+
element: /* @__PURE__ */ c(h, {})
|
|
41
|
+
}),
|
|
42
|
+
/* @__PURE__ */ c(a, {
|
|
43
|
+
path: "contracts/:id",
|
|
44
|
+
element: /* @__PURE__ */ c(g, {})
|
|
45
|
+
}),
|
|
46
|
+
/* @__PURE__ */ c(a, {
|
|
47
|
+
path: "shipments",
|
|
48
|
+
element: /* @__PURE__ */ c(_, {})
|
|
49
|
+
}),
|
|
50
|
+
/* @__PURE__ */ c(a, {
|
|
51
|
+
path: "inventory",
|
|
52
|
+
element: /* @__PURE__ */ c(v, {})
|
|
53
|
+
}),
|
|
54
|
+
/* @__PURE__ */ c(a, {
|
|
55
|
+
path: "emissions",
|
|
56
|
+
element: /* @__PURE__ */ c(y, {})
|
|
57
|
+
}),
|
|
58
|
+
/* @__PURE__ */ c(a, {
|
|
59
|
+
path: "compliance",
|
|
60
|
+
element: /* @__PURE__ */ c(b, {})
|
|
61
|
+
}),
|
|
62
|
+
/* @__PURE__ */ c(a, {
|
|
63
|
+
path: "*",
|
|
64
|
+
element: /* @__PURE__ */ c(i, {
|
|
65
|
+
to: "",
|
|
66
|
+
replace: !0
|
|
67
|
+
})
|
|
83
68
|
})
|
|
84
|
-
})
|
|
85
|
-
|
|
69
|
+
] })
|
|
70
|
+
})
|
|
86
71
|
});
|
|
87
|
-
}
|
|
72
|
+
};
|
|
88
73
|
//#endregion
|
|
89
|
-
export {
|
|
74
|
+
export { S as TheGlobalFuelRoutes };
|
|
90
75
|
|
|
91
76
|
//# sourceMappingURL=TheGlobalFuelRoutes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TheGlobalFuelRoutes.js","names":[],"sources":["../../src/theglobalfuel/TheGlobalFuelRoutes.tsx"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"TheGlobalFuelRoutes.js","names":[],"sources":["../../src/theglobalfuel/TheGlobalFuelRoutes.tsx"],"sourcesContent":["/**\n * TheGlobalFuel Routes\n * @module theglobalfuel\n *\n * Domain routes. The dashboard is eager-loaded (primary landing); all other\n * pages are lazy-loaded. Every route maps to a real `the*` backend capability.\n */\n\nimport { type FC, lazy, Suspense } from 'react';\nimport { Routes, Route, Navigate, useLocation } from 'react-router-dom';\nimport { Spinner } from '@burdenoff/fe-libs/ui';\nimport { useTheGlobalFuel } from './context/TheGlobalFuelContext';\n\n// Eager — primary landing\nimport { DashboardPage } from './pages/dashboard/DashboardPage';\n\n// Registry — Assets, Production, Reserves\nconst AssetsPage = lazy(() =>\n import('./pages/assets/AssetsPage').then((m) => ({ default: m.AssetsPage }))\n);\nconst AssetDetailPage = lazy(() =>\n import('./pages/assets/AssetDetailPage').then((m) => ({ default: m.AssetDetailPage }))\n);\nconst ProductionPage = lazy(() =>\n import('./pages/production/ProductionPage').then((m) => ({ default: m.ProductionPage }))\n);\nconst ReservesPage = lazy(() =>\n import('./pages/reserves/ReservesPage').then((m) => ({ default: m.ReservesPage }))\n);\n\n// Commerce — Offtake Contracts, Shipments, Inventory\nconst ContractsPage = lazy(() =>\n import('./pages/contracts/ContractsPage').then((m) => ({ default: m.ContractsPage }))\n);\nconst ContractDetailPage = lazy(() =>\n import('./pages/contracts/ContractDetailPage').then((m) => ({ default: m.ContractDetailPage }))\n);\nconst ShipmentsPage = lazy(() =>\n import('./pages/shipments/ShipmentsPage').then((m) => ({ default: m.ShipmentsPage }))\n);\nconst InventoryPage = lazy(() =>\n import('./pages/inventory/InventoryPage').then((m) => ({ default: m.InventoryPage }))\n);\n\n// Sustainability — Emissions, Compliance\nconst EmissionsPage = lazy(() =>\n import('./pages/emissions/EmissionsPage').then((m) => ({ default: m.EmissionsPage }))\n);\nconst CompliancePage = lazy(() =>\n import('./pages/compliance/CompliancePage').then((m) => ({ default: m.CompliancePage }))\n);\n\nconst PageLoader: FC = () => (\n <div className=\"flex min-h-[400px] items-center justify-center\">\n <Spinner size=\"lg\" />\n </div>\n);\n\nexport const TheGlobalFuelRoutes: FC = () => {\n const { basePath, isStandalone } = useTheGlobalFuel();\n const location = useLocation();\n\n const normalizedBasePath = basePath === '/' ? '' : (basePath ?? '').replace(/\\/$/, '');\n\n // Guard: only render if the current path matches basePath (integrated mode).\n if (normalizedBasePath && !isStandalone) {\n const pathMatches =\n location.pathname === normalizedBasePath ||\n location.pathname.startsWith(normalizedBasePath + '/');\n if (!pathMatches) {\n return null;\n }\n }\n\n return (\n <div className=\"flex min-h-full flex-col\">\n <Suspense fallback={<PageLoader />}>\n <Routes>\n <Route index element={<DashboardPage />} />\n\n <Route path=\"assets\" element={<AssetsPage />} />\n <Route path=\"assets/:id\" element={<AssetDetailPage />} />\n\n <Route path=\"production\" element={<ProductionPage />} />\n\n <Route path=\"reserves\" element={<ReservesPage />} />\n\n <Route path=\"contracts\" element={<ContractsPage />} />\n <Route path=\"contracts/:id\" element={<ContractDetailPage />} />\n\n <Route path=\"shipments\" element={<ShipmentsPage />} />\n\n <Route path=\"inventory\" element={<InventoryPage />} />\n\n <Route path=\"emissions\" element={<EmissionsPage />} />\n\n <Route path=\"compliance\" element={<CompliancePage />} />\n\n <Route path=\"*\" element={<Navigate to=\"\" replace />} />\n </Routes>\n </Suspense>\n </div>\n );\n};\n"],"mappings":";;;;;;;AAiBA,IAAM,IAAa,QACjB,OAAO,gCAA6B,MAAM,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAC7E,EACK,IAAkB,QACtB,OAAO,qCAAkC,MAAM,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,CACvF,EACK,IAAiB,QACrB,OAAO,wCAAqC,MAAM,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,CACzF,EACK,IAAe,QACnB,OAAO,oCAAiC,MAAM,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,CACnF,EAGK,IAAgB,QACpB,OAAO,sCAAmC,MAAM,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,CACtF,EACK,IAAqB,QACzB,OAAO,2CAAwC,MAAM,OAAO,EAAE,SAAS,EAAE,oBAAoB,EAAE,CAChG,EACK,IAAgB,QACpB,OAAO,sCAAmC,MAAM,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,CACtF,EACK,IAAgB,QACpB,OAAO,sCAAmC,MAAM,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,CACtF,EAGK,IAAgB,QACpB,OAAO,sCAAmC,MAAM,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,CACtF,EACK,IAAiB,QACrB,OAAO,wCAAqC,MAAM,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,CACzF,EAEK,UACJ,kBAAC,OAAD;CAAK,WAAU;WACb,kBAAC,GAAD,EAAS,MAAK,MAAO,CAAA;CACjB,CAAA,EAGK,UAAgC;CAC3C,IAAM,EAAE,aAAU,oBAAiB,GAAkB,EAC/C,IAAW,GAAa,EAExB,IAAqB,MAAa,MAAM,MAAM,KAAY,IAAI,QAAQ,OAAO,GAAG;AAYtF,QATI,KAAsB,CAAC,KAIrB,EAFF,EAAS,aAAa,KACtB,EAAS,SAAS,WAAW,IAAqB,IAAI,IAE/C,OAKT,kBAAC,OAAD;EAAK,WAAU;YACb,kBAAC,GAAD;GAAU,UAAU,kBAAC,GAAD,EAAc,CAAA;aAChC,kBAAC,GAAD,EAAA,UAAA;IACE,kBAAC,GAAD;KAAO,OAAA;KAAM,SAAS,kBAAC,GAAD,EAAiB,CAAA;KAAI,CAAA;IAE3C,kBAAC,GAAD;KAAO,MAAK;KAAS,SAAS,kBAAC,GAAD,EAAc,CAAA;KAAI,CAAA;IAChD,kBAAC,GAAD;KAAO,MAAK;KAAa,SAAS,kBAAC,GAAD,EAAmB,CAAA;KAAI,CAAA;IAEzD,kBAAC,GAAD;KAAO,MAAK;KAAa,SAAS,kBAAC,GAAD,EAAkB,CAAA;KAAI,CAAA;IAExD,kBAAC,GAAD;KAAO,MAAK;KAAW,SAAS,kBAAC,GAAD,EAAgB,CAAA;KAAI,CAAA;IAEpD,kBAAC,GAAD;KAAO,MAAK;KAAY,SAAS,kBAAC,GAAD,EAAiB,CAAA;KAAI,CAAA;IACtD,kBAAC,GAAD;KAAO,MAAK;KAAgB,SAAS,kBAAC,GAAD,EAAsB,CAAA;KAAI,CAAA;IAE/D,kBAAC,GAAD;KAAO,MAAK;KAAY,SAAS,kBAAC,GAAD,EAAiB,CAAA;KAAI,CAAA;IAEtD,kBAAC,GAAD;KAAO,MAAK;KAAY,SAAS,kBAAC,GAAD,EAAiB,CAAA;KAAI,CAAA;IAEtD,kBAAC,GAAD;KAAO,MAAK;KAAY,SAAS,kBAAC,GAAD,EAAiB,CAAA;KAAI,CAAA;IAEtD,kBAAC,GAAD;KAAO,MAAK;KAAa,SAAS,kBAAC,GAAD,EAAkB,CAAA;KAAI,CAAA;IAExD,kBAAC,GAAD;KAAO,MAAK;KAAI,SAAS,kBAAC,GAAD;MAAU,IAAG;MAAG,SAAA;MAAU,CAAA;KAAI,CAAA;IAChD,EAAA,CAAA;GACA,CAAA;EACP,CAAA"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface Column<T> {
|
|
4
|
+
key: string;
|
|
5
|
+
header: ReactNode;
|
|
6
|
+
render: (row: T) => ReactNode;
|
|
7
|
+
align?: 'left' | 'right' | 'center';
|
|
8
|
+
className?: string;
|
|
9
|
+
/** Hide below the `md` breakpoint for a mobile-friendly layout. */
|
|
10
|
+
hideOnMobile?: boolean;
|
|
11
|
+
/** Provide to make this column click-sortable (returns a comparable value). */
|
|
12
|
+
sortValue?: (row: T) => string | number;
|
|
13
|
+
}
|
|
14
|
+
interface DataTableProps<T> {
|
|
15
|
+
columns: Column<T>[];
|
|
16
|
+
rows: T[];
|
|
17
|
+
rowKey: (row: T) => string;
|
|
18
|
+
onRowClick?: (row: T) => void;
|
|
19
|
+
className?: string;
|
|
20
|
+
/** Default sort: a column key + direction. */
|
|
21
|
+
defaultSort?: {
|
|
22
|
+
key: string;
|
|
23
|
+
dir: 'asc' | 'desc';
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
export declare function DataTable<T>({ columns, rows, rowKey, onRowClick, className, defaultSort, }: DataTableProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
export {};
|
|
28
|
+
//# sourceMappingURL=DataTable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DataTable.d.ts","sourceRoot":"","sources":["../../../src/theglobalfuel/components/DataTable.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAqB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAK1D,MAAM,WAAW,MAAM,CAAC,CAAC;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,SAAS,CAAC;IAClB,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,SAAS,CAAC;IAC9B,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mEAAmE;IACnE,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,+EAA+E;IAC/E,SAAS,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,MAAM,GAAG,MAAM,CAAC;CACzC;AAED,UAAU,cAAc,CAAC,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;IACrB,IAAI,EAAE,CAAC,EAAE,CAAC;IACV,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,MAAM,CAAC;IAC3B,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,IAAI,CAAC;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,8CAA8C;IAC9C,WAAW,CAAC,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,KAAK,GAAG,MAAM,CAAA;KAAE,CAAC;CACpD;AAQD,wBAAgB,SAAS,CAAC,CAAC,EAAE,EAC3B,OAAO,EACP,IAAI,EACJ,MAAM,EACN,UAAU,EACV,SAAS,EACT,WAAW,GACZ,EAAE,cAAc,CAAC,CAAC,CAAC,2CAqGnB"}
|