@burdenoff/microfe-theglobalfuel 2026.709.1 → 2026.709.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (231) hide show
  1. package/README.md +3 -0
  2. package/dist/dev/main.d.ts +2 -0
  3. package/dist/dev/main.d.ts.map +1 -0
  4. package/dist/generated/global-operations.d.ts +2 -0
  5. package/dist/generated/global-operations.d.ts.map +1 -0
  6. package/dist/generated/global-types.d.ts +18199 -0
  7. package/dist/generated/global-types.d.ts.map +1 -0
  8. package/dist/generated/wspace-operations.d.ts +2 -0
  9. package/dist/generated/wspace-operations.d.ts.map +1 -0
  10. package/dist/generated/wspace-types.d.ts +43046 -0
  11. package/dist/generated/wspace-types.d.ts.map +1 -0
  12. package/dist/index.d.ts +2 -0
  13. package/dist/index.d.ts.map +1 -0
  14. package/dist/theglobalfuel/TheGlobalFuelRoot.d.ts +5 -0
  15. package/dist/theglobalfuel/TheGlobalFuelRoot.d.ts.map +1 -0
  16. package/dist/theglobalfuel/TheGlobalFuelRoot.js +106 -104
  17. package/dist/theglobalfuel/TheGlobalFuelRoot.js.map +1 -1
  18. package/dist/theglobalfuel/TheGlobalFuelRoutes.d.ts +4 -0
  19. package/dist/theglobalfuel/TheGlobalFuelRoutes.d.ts.map +1 -0
  20. package/dist/theglobalfuel/TheGlobalFuelRoutes.js +60 -38
  21. package/dist/theglobalfuel/TheGlobalFuelRoutes.js.map +1 -1
  22. package/dist/theglobalfuel/components/DataTable.d.ts +30 -0
  23. package/dist/theglobalfuel/components/DataTable.d.ts.map +1 -0
  24. package/dist/theglobalfuel/components/DataTable.js.map +1 -1
  25. package/dist/theglobalfuel/components/EmptyState.d.ts +18 -0
  26. package/dist/theglobalfuel/components/EmptyState.d.ts.map +1 -0
  27. package/dist/theglobalfuel/components/EvidenceUpload.d.ts +14 -0
  28. package/dist/theglobalfuel/components/EvidenceUpload.d.ts.map +1 -0
  29. package/dist/theglobalfuel/components/FileLink.d.ts +15 -0
  30. package/dist/theglobalfuel/components/FileLink.d.ts.map +1 -0
  31. package/dist/theglobalfuel/components/FilterTabs.d.ts +18 -0
  32. package/dist/theglobalfuel/components/FilterTabs.d.ts.map +1 -0
  33. package/dist/theglobalfuel/components/MetricsCard.d.ts +23 -0
  34. package/dist/theglobalfuel/components/MetricsCard.d.ts.map +1 -0
  35. package/dist/theglobalfuel/components/MiniBar.d.ts +16 -0
  36. package/dist/theglobalfuel/components/MiniBar.d.ts.map +1 -0
  37. package/dist/theglobalfuel/components/PageLayout.d.ts +18 -0
  38. package/dist/theglobalfuel/components/PageLayout.d.ts.map +1 -0
  39. package/dist/theglobalfuel/components/PageLayout.js +2 -1
  40. package/dist/theglobalfuel/components/PageLayout.js.map +1 -1
  41. package/dist/theglobalfuel/components/Pagination.d.ts +22 -0
  42. package/dist/theglobalfuel/components/Pagination.d.ts.map +1 -0
  43. package/dist/theglobalfuel/components/StateViews.d.ts +24 -0
  44. package/dist/theglobalfuel/components/StateViews.d.ts.map +1 -0
  45. package/dist/theglobalfuel/components/StatusBadge.d.ts +9 -0
  46. package/dist/theglobalfuel/components/StatusBadge.d.ts.map +1 -0
  47. package/dist/theglobalfuel/components/Tabs.d.ts +17 -0
  48. package/dist/theglobalfuel/components/Tabs.d.ts.map +1 -0
  49. package/dist/theglobalfuel/components/TheDiscussion.d.ts +18 -0
  50. package/dist/theglobalfuel/components/TheDiscussion.d.ts.map +1 -0
  51. package/dist/theglobalfuel/components/TheTags.d.ts +17 -0
  52. package/dist/theglobalfuel/components/TheTags.d.ts.map +1 -0
  53. package/dist/theglobalfuel/components/WorldMap.d.ts +18 -0
  54. package/dist/theglobalfuel/components/WorldMap.d.ts.map +1 -0
  55. package/dist/theglobalfuel/components/WorldMap.js.map +1 -1
  56. package/dist/theglobalfuel/components/index.d.ts +21 -0
  57. package/dist/theglobalfuel/components/index.d.ts.map +1 -0
  58. package/dist/theglobalfuel/components/viz/AllocationBar.d.ts +21 -0
  59. package/dist/theglobalfuel/components/viz/AllocationBar.d.ts.map +1 -0
  60. package/dist/theglobalfuel/components/viz/AreaChart.d.ts +18 -0
  61. package/dist/theglobalfuel/components/viz/AreaChart.d.ts.map +1 -0
  62. package/dist/theglobalfuel/components/viz/AvatarStack.d.ts +13 -0
  63. package/dist/theglobalfuel/components/viz/AvatarStack.d.ts.map +1 -0
  64. package/dist/theglobalfuel/components/viz/BarChart.d.ts +17 -0
  65. package/dist/theglobalfuel/components/viz/BarChart.d.ts.map +1 -0
  66. package/dist/theglobalfuel/components/viz/CertificateCard.d.ts +14 -0
  67. package/dist/theglobalfuel/components/viz/CertificateCard.d.ts.map +1 -0
  68. package/dist/theglobalfuel/components/viz/DonutChart.d.ts +20 -0
  69. package/dist/theglobalfuel/components/viz/DonutChart.d.ts.map +1 -0
  70. package/dist/theglobalfuel/components/viz/HBarFunnel.d.ts +17 -0
  71. package/dist/theglobalfuel/components/viz/HBarFunnel.d.ts.map +1 -0
  72. package/dist/theglobalfuel/components/viz/Heatmap.d.ts +26 -0
  73. package/dist/theglobalfuel/components/viz/Heatmap.d.ts.map +1 -0
  74. package/dist/theglobalfuel/components/viz/KanbanBoard.d.ts +17 -0
  75. package/dist/theglobalfuel/components/viz/KanbanBoard.d.ts.map +1 -0
  76. package/dist/theglobalfuel/components/viz/LineChart.d.ts +20 -0
  77. package/dist/theglobalfuel/components/viz/LineChart.d.ts.map +1 -0
  78. package/dist/theglobalfuel/components/viz/OrgTree.d.ts +14 -0
  79. package/dist/theglobalfuel/components/viz/OrgTree.d.ts.map +1 -0
  80. package/dist/theglobalfuel/components/viz/PathSteps.d.ts +17 -0
  81. package/dist/theglobalfuel/components/viz/PathSteps.d.ts.map +1 -0
  82. package/dist/theglobalfuel/components/viz/ProgressRing.d.ts +20 -0
  83. package/dist/theglobalfuel/components/viz/ProgressRing.d.ts.map +1 -0
  84. package/dist/theglobalfuel/components/viz/RatingStars.d.ts +14 -0
  85. package/dist/theglobalfuel/components/viz/RatingStars.d.ts.map +1 -0
  86. package/dist/theglobalfuel/components/viz/SegmentedTabs.d.ts +26 -0
  87. package/dist/theglobalfuel/components/viz/SegmentedTabs.d.ts.map +1 -0
  88. package/dist/theglobalfuel/components/viz/SkillBar.d.ts +17 -0
  89. package/dist/theglobalfuel/components/viz/SkillBar.d.ts.map +1 -0
  90. package/dist/theglobalfuel/components/viz/Sparkline.d.ts +16 -0
  91. package/dist/theglobalfuel/components/viz/Sparkline.d.ts.map +1 -0
  92. package/dist/theglobalfuel/components/viz/StatCard.d.ts +22 -0
  93. package/dist/theglobalfuel/components/viz/StatCard.d.ts.map +1 -0
  94. package/dist/theglobalfuel/components/viz/StepProgress.d.ts +17 -0
  95. package/dist/theglobalfuel/components/viz/StepProgress.d.ts.map +1 -0
  96. package/dist/theglobalfuel/components/viz/Timeline.d.ts +21 -0
  97. package/dist/theglobalfuel/components/viz/Timeline.d.ts.map +1 -0
  98. package/dist/theglobalfuel/components/viz/index.d.ts +35 -0
  99. package/dist/theglobalfuel/components/viz/index.d.ts.map +1 -0
  100. package/dist/theglobalfuel/components/viz/lib/Avatar.d.ts +15 -0
  101. package/dist/theglobalfuel/components/viz/lib/Avatar.d.ts.map +1 -0
  102. package/dist/theglobalfuel/components/viz/lib/CartesianFrame.d.ts +44 -0
  103. package/dist/theglobalfuel/components/viz/lib/CartesianFrame.d.ts.map +1 -0
  104. package/dist/theglobalfuel/components/viz/lib/ResponsiveSvg.d.ts +27 -0
  105. package/dist/theglobalfuel/components/viz/lib/ResponsiveSvg.d.ts.map +1 -0
  106. package/dist/theglobalfuel/components/viz/lib/format.d.ts +10 -0
  107. package/dist/theglobalfuel/components/viz/lib/format.d.ts.map +1 -0
  108. package/dist/theglobalfuel/components/viz/lib/geometry.d.ts +41 -0
  109. package/dist/theglobalfuel/components/viz/lib/geometry.d.ts.map +1 -0
  110. package/dist/theglobalfuel/components/viz/lib/hooks.d.ts +18 -0
  111. package/dist/theglobalfuel/components/viz/lib/hooks.d.ts.map +1 -0
  112. package/dist/theglobalfuel/components/viz/lib/palette.d.ts +31 -0
  113. package/dist/theglobalfuel/components/viz/lib/palette.d.ts.map +1 -0
  114. package/dist/theglobalfuel/components/viz/lib/types.d.ts +27 -0
  115. package/dist/theglobalfuel/components/viz/lib/types.d.ts.map +1 -0
  116. package/dist/theglobalfuel/context/TheGlobalFuelContext.d.ts +16 -0
  117. package/dist/theglobalfuel/context/TheGlobalFuelContext.d.ts.map +1 -0
  118. package/dist/theglobalfuel/context/index.d.ts +6 -0
  119. package/dist/theglobalfuel/context/index.d.ts.map +1 -0
  120. package/dist/theglobalfuel/hooks/index.d.ts +15 -0
  121. package/dist/theglobalfuel/hooks/index.d.ts.map +1 -0
  122. package/dist/theglobalfuel/hooks/index.js +3 -0
  123. package/dist/theglobalfuel/hooks/useCursorPager.d.ts +26 -0
  124. package/dist/theglobalfuel/hooks/useCursorPager.d.ts.map +1 -0
  125. package/dist/theglobalfuel/hooks/useNotify.d.ts +23 -0
  126. package/dist/theglobalfuel/hooks/useNotify.d.ts.map +1 -0
  127. package/dist/theglobalfuel/hooks/useTheAnalytics.d.ts +38 -0
  128. package/dist/theglobalfuel/hooks/useTheAnalytics.d.ts.map +1 -0
  129. package/dist/theglobalfuel/hooks/useTheAnalytics.js +1 -0
  130. package/dist/theglobalfuel/hooks/useTheAnalytics.js.map +1 -1
  131. package/dist/theglobalfuel/hooks/useTheComments.d.ts +36 -0
  132. package/dist/theglobalfuel/hooks/useTheComments.d.ts.map +1 -0
  133. package/dist/theglobalfuel/hooks/useTheFiles.d.ts +47 -0
  134. package/dist/theglobalfuel/hooks/useTheFiles.d.ts.map +1 -0
  135. package/dist/theglobalfuel/hooks/useTheGlobalFuelApi.d.ts +79 -0
  136. package/dist/theglobalfuel/hooks/useTheGlobalFuelApi.d.ts.map +1 -0
  137. package/dist/theglobalfuel/hooks/useTheGlobalFuelApi.js +2 -9
  138. package/dist/theglobalfuel/hooks/useTheGlobalFuelApi.js.map +1 -1
  139. package/dist/theglobalfuel/hooks/useTheNativeControls.d.ts +20 -0
  140. package/dist/theglobalfuel/hooks/useTheNativeControls.d.ts.map +1 -0
  141. package/dist/theglobalfuel/hooks/useTheNativeControls.js +22 -0
  142. package/dist/theglobalfuel/hooks/useTheNativeControls.js.map +1 -0
  143. package/dist/theglobalfuel/hooks/useThePageView.d.ts +10 -0
  144. package/dist/theglobalfuel/hooks/useThePageView.d.ts.map +1 -0
  145. package/dist/theglobalfuel/hooks/useThePageView.js +13 -0
  146. package/dist/theglobalfuel/hooks/useThePageView.js.map +1 -0
  147. package/dist/theglobalfuel/hooks/useTheTags.d.ts +44 -0
  148. package/dist/theglobalfuel/hooks/useTheTags.d.ts.map +1 -0
  149. package/dist/theglobalfuel/hooks/useTheTranslation.d.ts +4 -0
  150. package/dist/theglobalfuel/hooks/useTheTranslation.d.ts.map +1 -0
  151. package/dist/theglobalfuel/hooks/useTheTranslation.js +12 -0
  152. package/dist/theglobalfuel/hooks/useTheTranslation.js.map +1 -0
  153. package/dist/theglobalfuel/index.d.ts +11 -0
  154. package/dist/theglobalfuel/index.d.ts.map +1 -0
  155. package/dist/theglobalfuel/pages/assets/AssetDetailPage.d.ts +13 -0
  156. package/dist/theglobalfuel/pages/assets/AssetDetailPage.d.ts.map +1 -0
  157. package/dist/theglobalfuel/pages/assets/AssetDetailPage.js +452 -415
  158. package/dist/theglobalfuel/pages/assets/AssetDetailPage.js.map +1 -1
  159. package/dist/theglobalfuel/pages/assets/AssetsPage.d.ts +10 -0
  160. package/dist/theglobalfuel/pages/assets/AssetsPage.d.ts.map +1 -0
  161. package/dist/theglobalfuel/pages/assets/AssetsPage.js +138 -135
  162. package/dist/theglobalfuel/pages/assets/AssetsPage.js.map +1 -1
  163. package/dist/theglobalfuel/pages/compliance/CompliancePage.d.ts +11 -0
  164. package/dist/theglobalfuel/pages/compliance/CompliancePage.d.ts.map +1 -0
  165. package/dist/theglobalfuel/pages/compliance/CompliancePage.js +233 -229
  166. package/dist/theglobalfuel/pages/compliance/CompliancePage.js.map +1 -1
  167. package/dist/theglobalfuel/pages/contracts/ContractDetailPage.d.ts +9 -0
  168. package/dist/theglobalfuel/pages/contracts/ContractDetailPage.d.ts.map +1 -0
  169. package/dist/theglobalfuel/pages/contracts/ContractDetailPage.js +410 -389
  170. package/dist/theglobalfuel/pages/contracts/ContractDetailPage.js.map +1 -1
  171. package/dist/theglobalfuel/pages/contracts/ContractsPage.d.ts +8 -0
  172. package/dist/theglobalfuel/pages/contracts/ContractsPage.d.ts.map +1 -0
  173. package/dist/theglobalfuel/pages/contracts/ContractsPage.js +140 -137
  174. package/dist/theglobalfuel/pages/contracts/ContractsPage.js.map +1 -1
  175. package/dist/theglobalfuel/pages/dashboard/DashboardPage.d.ts +17 -0
  176. package/dist/theglobalfuel/pages/dashboard/DashboardPage.d.ts.map +1 -0
  177. package/dist/theglobalfuel/pages/dashboard/DashboardPage.js +83 -83
  178. package/dist/theglobalfuel/pages/dashboard/DashboardPage.js.map +1 -1
  179. package/dist/theglobalfuel/pages/emissions/EmissionsPage.d.ts +13 -0
  180. package/dist/theglobalfuel/pages/emissions/EmissionsPage.d.ts.map +1 -0
  181. package/dist/theglobalfuel/pages/emissions/EmissionsPage.js +154 -150
  182. package/dist/theglobalfuel/pages/emissions/EmissionsPage.js.map +1 -1
  183. package/dist/theglobalfuel/pages/inventory/InventoryPage.d.ts +11 -0
  184. package/dist/theglobalfuel/pages/inventory/InventoryPage.d.ts.map +1 -0
  185. package/dist/theglobalfuel/pages/inventory/InventoryPage.js +151 -147
  186. package/dist/theglobalfuel/pages/inventory/InventoryPage.js.map +1 -1
  187. package/dist/theglobalfuel/pages/production/ProductionPage.d.ts +11 -0
  188. package/dist/theglobalfuel/pages/production/ProductionPage.d.ts.map +1 -0
  189. package/dist/theglobalfuel/pages/production/ProductionPage.js +175 -171
  190. package/dist/theglobalfuel/pages/production/ProductionPage.js.map +1 -1
  191. package/dist/theglobalfuel/pages/provenance/ProvenancePage.d.ts +23 -0
  192. package/dist/theglobalfuel/pages/provenance/ProvenancePage.d.ts.map +1 -0
  193. package/dist/theglobalfuel/pages/provenance/ProvenancePage.js +153 -146
  194. package/dist/theglobalfuel/pages/provenance/ProvenancePage.js.map +1 -1
  195. package/dist/theglobalfuel/pages/reserves/ReservesPage.d.ts +10 -0
  196. package/dist/theglobalfuel/pages/reserves/ReservesPage.d.ts.map +1 -0
  197. package/dist/theglobalfuel/pages/reserves/ReservesPage.js +168 -164
  198. package/dist/theglobalfuel/pages/reserves/ReservesPage.js.map +1 -1
  199. package/dist/theglobalfuel/pages/shipments/ShipmentsPage.d.ts +11 -0
  200. package/dist/theglobalfuel/pages/shipments/ShipmentsPage.d.ts.map +1 -0
  201. package/dist/theglobalfuel/pages/shipments/ShipmentsPage.js +179 -175
  202. package/dist/theglobalfuel/pages/shipments/ShipmentsPage.js.map +1 -1
  203. package/dist/theglobalfuel/services/assistantApi.d.ts +25 -0
  204. package/dist/theglobalfuel/services/assistantApi.d.ts.map +1 -0
  205. package/dist/theglobalfuel/services/assistantApi.js.map +1 -1
  206. package/dist/theglobalfuel/services/createSandboxAssistantTransport.d.ts +38 -0
  207. package/dist/theglobalfuel/services/createSandboxAssistantTransport.d.ts.map +1 -0
  208. package/dist/theglobalfuel/services/createSandboxAssistantTransport.js.map +1 -1
  209. package/dist/theglobalfuel/services/index.d.ts +7 -0
  210. package/dist/theglobalfuel/services/index.d.ts.map +1 -0
  211. package/dist/theglobalfuel/types/assistant.d.ts +65 -0
  212. package/dist/theglobalfuel/types/assistant.d.ts.map +1 -0
  213. package/dist/theglobalfuel/types/index.d.ts +376 -0
  214. package/dist/theglobalfuel/types/index.d.ts.map +1 -0
  215. package/dist/theglobalfuel/utils/cn.d.ts +4 -0
  216. package/dist/theglobalfuel/utils/cn.d.ts.map +1 -0
  217. package/dist/theglobalfuel/utils/formatters.d.ts +44 -0
  218. package/dist/theglobalfuel/utils/formatters.d.ts.map +1 -0
  219. package/dist/theglobalfuel/utils/i18n.d.ts +5 -0
  220. package/dist/theglobalfuel/utils/i18n.d.ts.map +1 -0
  221. package/dist/theglobalfuel/utils/i18n.js +15 -0
  222. package/dist/theglobalfuel/utils/i18n.js.map +1 -0
  223. package/dist/theglobalfuel/utils/index.d.ts +10 -0
  224. package/dist/theglobalfuel/utils/index.d.ts.map +1 -0
  225. package/dist/theglobalfuel/utils/navigation.d.ts +14 -0
  226. package/dist/theglobalfuel/utils/navigation.d.ts.map +1 -0
  227. package/dist/theglobalfuel/utils/pageContext.d.ts +26 -0
  228. package/dist/theglobalfuel/utils/pageContext.d.ts.map +1 -0
  229. package/dist/theglobalfuel/utils/transitions.d.ts +17 -0
  230. package/dist/theglobalfuel/utils/transitions.d.ts.map +1 -0
  231. package/package.json +1 -1
@@ -1,28 +1,30 @@
1
1
  import { PageLayout as e } from "../../components/PageLayout.js";
2
2
  import { MetricsCard as t } from "../../components/MetricsCard.js";
3
- import { formatDate as n, formatEnumLabel as r, formatVolume as i, toBackendDate as a } from "../../utils/formatters.js";
4
- import { StatusBadge as o } from "../../components/StatusBadge.js";
5
- import { DataTable as ee } from "../../components/DataTable.js";
6
- import { ErrorView as te, LoadingView as ne } from "../../components/StateViews.js";
7
- import { EmptyState as re } from "../../components/EmptyState.js";
8
- import { AllocationBar as ie } from "../../components/viz/AllocationBar.js";
9
- import { PathSteps as ae } from "../../components/viz/PathSteps.js";
10
- import { useTheContracts as oe, useTheDeliverShipment as se, useTheScheduleShipment as ce, useTheShipments as s, useTheTransitionShipment as le } from "../../hooks/useTheGlobalFuelApi.js";
11
- import { useCursorPager as ue } from "../../hooks/useCursorPager.js";
12
- import { useNotify as de } from "../../hooks/useNotify.js";
3
+ import { formatDate as n, formatEnumLabel as r, formatVolume as i, toBackendDate as ee } from "../../utils/formatters.js";
4
+ import { StatusBadge as a } from "../../components/StatusBadge.js";
5
+ import { DataTable as te } from "../../components/DataTable.js";
6
+ import { ErrorView as ne, LoadingView as re } from "../../components/StateViews.js";
7
+ import { EmptyState as ie } from "../../components/EmptyState.js";
8
+ import { AllocationBar as ae } from "../../components/viz/AllocationBar.js";
9
+ import { PathSteps as oe } from "../../components/viz/PathSteps.js";
10
+ import { useTheContracts as se, useTheDeliverShipment as ce, useTheScheduleShipment as le, useTheShipments as o, useTheTransitionShipment as ue } from "../../hooks/useTheGlobalFuelApi.js";
11
+ import { useCursorPager as de } from "../../hooks/useCursorPager.js";
12
+ import { useNotify as fe } from "../../hooks/useNotify.js";
13
+ import { useThePageView as pe } from "../../hooks/useThePageView.js";
14
+ import { useTheTranslation as me } from "../../hooks/useTheTranslation.js";
13
15
  import "../../hooks/index.js";
14
- import { SHIPMENT_DELIVERABLE_FROM as fe, SHIPMENT_TRANSITIONS as pe, nextStatuses as me } from "../../utils/transitions.js";
15
- import { FilterTabs as he } from "../../components/FilterTabs.js";
16
- import { Pagination as ge } from "../../components/Pagination.js";
17
- import { EvidenceUpload as _e } from "../../components/EvidenceUpload.js";
18
- import { FileLink as ve } from "../../components/FileLink.js";
16
+ import { SHIPMENT_DELIVERABLE_FROM as he, SHIPMENT_TRANSITIONS as ge, nextStatuses as _e } from "../../utils/transitions.js";
17
+ import { FilterTabs as ve } from "../../components/FilterTabs.js";
18
+ import { Pagination as ye } from "../../components/Pagination.js";
19
+ import { EvidenceUpload as be } from "../../components/EvidenceUpload.js";
20
+ import { FileLink as xe } from "../../components/FileLink.js";
19
21
  import "../../components/index.js";
20
- import { useMemo as c, useState as l } from "react";
21
- import { ArrowRight as ye, CalendarClock as be, MapPin as xe, PackageCheck as u, Plus as d, Ship as f, Truck as Se } from "lucide-react";
22
- import { Fragment as Ce, jsx as p, jsxs as m } from "react/jsx-runtime";
23
- import { Button as h, Input as g, Label as _, ResponsiveDialog as we, ResponsiveDialogContent as Te, ResponsiveDialogDescription as Ee, ResponsiveDialogFooter as De, ResponsiveDialogHeader as Oe, ResponsiveDialogTitle as ke, Select as v, SelectContent as y, SelectItem as b, SelectTrigger as x, SelectValue as S, Textarea as Ae } from "@burdenoff/fe-libs/ui";
22
+ import { useMemo as s, useState as c } from "react";
23
+ import { ArrowRight as Se, CalendarClock as Ce, MapPin as we, PackageCheck as l, Plus as u, Ship as d, Truck as Te } from "lucide-react";
24
+ import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
25
+ import { Button as h, Input as g, Label as _, ResponsiveDialog as Ee, ResponsiveDialogContent as De, ResponsiveDialogDescription as Oe, ResponsiveDialogFooter as ke, ResponsiveDialogHeader as Ae, ResponsiveDialogTitle as je, Select as v, SelectContent as y, SelectItem as b, SelectTrigger as x, SelectValue as S, Textarea as Me } from "@burdenoff/fe-libs/ui";
24
26
  //#region src/theglobalfuel/pages/shipments/ShipmentsPage.tsx
25
- var je = [
27
+ var Ne = [
26
28
  {
27
29
  value: "ALL",
28
30
  label: "All"
@@ -47,14 +49,14 @@ var je = [
47
49
  value: "CANCELLED",
48
50
  label: "Cancelled"
49
51
  }
50
- ], Me = [
52
+ ], Pe = [
51
53
  "PIPELINE",
52
54
  "TANKER",
53
55
  "VESSEL_BULK",
54
56
  "RAIL",
55
57
  "TRUCK",
56
58
  "GRID"
57
- ], Ne = [
59
+ ], Fe = [
58
60
  "BARRELS",
59
61
  "CUBIC_METERS",
60
62
  "TONNES",
@@ -62,35 +64,35 @@ var je = [
62
64
  "MWH",
63
65
  "GJ",
64
66
  "MCF"
65
- ], C = 25, Pe = [
67
+ ], C = 25, Ie = [
66
68
  "SCHEDULED",
67
69
  "LOADING",
68
70
  "IN_TRANSIT",
69
71
  "DELIVERED",
70
72
  "CANCELLED"
71
- ], Fe = {
73
+ ], Le = {
72
74
  SCHEDULED: "Scheduled",
73
75
  LOADING: "Loading",
74
76
  IN_TRANSIT: "In transit",
75
77
  DELIVERED: "Delivered",
76
78
  CANCELLED: "Cancelled"
77
- }, Ie = {
79
+ }, Re = {
78
80
  SCHEDULED: "var(--color-text-muted)",
79
81
  LOADING: "var(--color-accent-blue)",
80
82
  IN_TRANSIT: "var(--color-status-warning-text)",
81
83
  DELIVERED: "var(--color-status-success-text)",
82
84
  CANCELLED: "var(--color-status-error-text)"
83
- }, Le = (e) => {
84
- let t = e.status === "CANCELLED", n = e.status === "DELIVERED", i = e.status === "IN_TRANSIT", a = n || i, o = t ? "Cancelled" : n ? "Delivered" : i ? "In transit" : r(e.status);
85
+ }, ze = (e) => {
86
+ let t = e.status === "CANCELLED", n = e.status === "DELIVERED", i = e.status === "IN_TRANSIT", ee = n || i, a = t ? "Cancelled" : n ? "Delivered" : i ? "In transit" : r(e.status);
85
87
  return [
86
88
  {
87
89
  label: (e.origin ?? "").trim(),
88
90
  meta: "Origin",
89
- state: t ? "todo" : a ? "done" : "active"
91
+ state: t ? "todo" : ee ? "done" : "active"
90
92
  },
91
93
  {
92
94
  label: r(e.mode),
93
- meta: o,
95
+ meta: a,
94
96
  state: t ? "locked" : n ? "done" : i ? "active" : "todo"
95
97
  },
96
98
  {
@@ -112,64 +114,65 @@ var je = [
112
114
  notes: ""
113
115
  };
114
116
  function T() {
115
- let [T, Re] = l("ALL"), [E, ze] = l("ALL"), D = ue(), [Be, O] = l(!1), [k, A] = l(w), [j, M] = l(null), [N, P] = l(null), [Ve, F] = l(null), [I, He] = l(null), L = de(), R = E === "ALL" ? void 0 : E, { data: z, isLoading: Ue, isError: We, refetch: Ge } = s(R, T === "ALL" ? void 0 : T, {
117
+ pe("shipments");
118
+ let T = me(), [E, Be] = c("ALL"), [D, Ve] = c("ALL"), O = de(), [He, k] = c(!1), [A, j] = c(w), [M, N] = c(null), [P, F] = c(null), [Ue, I] = c(null), [L, We] = c(null), R = fe(), z = D === "ALL" ? void 0 : D, { data: B, isLoading: Ge, isError: Ke, refetch: qe } = o(z, E === "ALL" ? void 0 : E, {
116
119
  limit: C,
117
- offset: D.page * C
118
- }), B = s(R, void 0, { limit: 200 }), V = oe({ pagination: { limit: 100 } }), H = c(() => V.data?.items ?? [], [V.data]), U = c(() => {
120
+ offset: O.page * C
121
+ }), V = o(z, void 0, { limit: 200 }), H = se({ pagination: { limit: 100 } }), U = s(() => H.data?.items ?? [], [H.data]), W = s(() => {
119
122
  let e = /* @__PURE__ */ new Map();
120
- for (let t of H) e.set(t.id, t);
123
+ for (let t of U) e.set(t.id, t);
121
124
  return e;
122
- }, [H]), W = ce(), G = se(), Ke = le(), K = c(() => z?.items ?? [], [z]), q = c(() => B.data?.items ?? [], [B.data]), qe = q.filter((e) => e.status === "SCHEDULED").length, Je = q.filter((e) => e.status === "IN_TRANSIT").length, Ye = q.filter((e) => e.status === "DELIVERED").length, J = c(() => {
125
+ }, [U]), G = le(), K = ce(), Je = ue(), q = s(() => B?.items ?? [], [B]), J = s(() => V.data?.items ?? [], [V.data]), Ye = J.filter((e) => e.status === "SCHEDULED").length, Xe = J.filter((e) => e.status === "IN_TRANSIT").length, Ze = J.filter((e) => e.status === "DELIVERED").length, Y = s(() => {
123
126
  let e = {};
124
- for (let t of q) e[t.status] = (e[t.status] ?? 0) + 1;
127
+ for (let t of J) e[t.status] = (e[t.status] ?? 0) + 1;
125
128
  return e;
126
- }, [q]), Xe = je.map((e) => ({
129
+ }, [J]), Qe = Ne.map((e) => ({
127
130
  value: e.value,
128
131
  label: e.label,
129
- count: e.value === "ALL" ? q.length : J[e.value] ?? 0
130
- })), Y = c(() => Pe.filter((e) => (J[e] ?? 0) > 0).map((e) => ({
131
- label: Fe[e],
132
- value: J[e] ?? 0,
133
- color: Ie[e]
134
- })), [J]), X = c(() => q.filter((e) => (e.origin ?? "").trim() && (e.destination ?? "").trim()), [q]), Ze = c(() => {
132
+ count: e.value === "ALL" ? J.length : Y[e.value] ?? 0
133
+ })), $e = s(() => Ie.filter((e) => (Y[e] ?? 0) > 0).map((e) => ({
134
+ label: Le[e],
135
+ value: Y[e] ?? 0,
136
+ color: Re[e]
137
+ })), [Y]), X = s(() => J.filter((e) => (e.origin ?? "").trim() && (e.destination ?? "").trim()), [J]), et = s(() => {
135
138
  let e = /* @__PURE__ */ new Set();
136
139
  for (let t of X) e.add(`${(t.origin ?? "").trim()} → ${(t.destination ?? "").trim()}`);
137
140
  return e.size;
138
- }, [X]), Z = c(() => X.find((e) => e.id === I) ?? X[0] ?? null, [X, I]), Q = () => {
139
- A(w), M(null), P(null);
140
- }, Qe = async () => {
141
- if (!k.contractId) {
142
- P("Select the contract this shipment fulfils.");
141
+ }, [X]), Z = s(() => X.find((e) => e.id === L) ?? X[0] ?? null, [X, L]), Q = () => {
142
+ j(w), N(null), F(null);
143
+ }, tt = async () => {
144
+ if (!A.contractId) {
145
+ F("Select the contract this shipment fulfils.");
143
146
  return;
144
147
  }
145
- if (!k.reference.trim()) {
146
- P("A shipment reference is required.");
148
+ if (!A.reference.trim()) {
149
+ F("A shipment reference is required.");
147
150
  return;
148
151
  }
149
- let e = Number(k.volume);
150
- if (!k.volume || Number.isNaN(e) || e <= 0) {
151
- P("Enter a volume greater than zero."), L.error("Enter a volume greater than zero.");
152
+ let e = Number(A.volume);
153
+ if (!A.volume || Number.isNaN(e) || e <= 0) {
154
+ F("Enter a volume greater than zero."), R.error("Enter a volume greater than zero.");
152
155
  return;
153
156
  }
154
- P(null);
157
+ F(null);
155
158
  try {
156
- await W.mutateAsync({
157
- contractId: k.contractId,
158
- reference: k.reference.trim(),
159
- mode: k.mode,
160
- carrier: k.carrier.trim() || null,
161
- origin: k.origin.trim() || null,
162
- destination: k.destination.trim() || null,
159
+ await G.mutateAsync({
160
+ contractId: A.contractId,
161
+ reference: A.reference.trim(),
162
+ mode: A.mode,
163
+ carrier: A.carrier.trim() || null,
164
+ origin: A.origin.trim() || null,
165
+ destination: A.destination.trim() || null,
163
166
  volume: e,
164
- unit: k.unit,
165
- scheduledAt: a(k.scheduledAt) ?? null,
166
- documentFileId: j?.fileId ?? null,
167
- notes: k.notes.trim() || null
168
- }), L.success("Shipment scheduled"), O(!1), Q();
167
+ unit: A.unit,
168
+ scheduledAt: ee(A.scheduledAt) ?? null,
169
+ documentFileId: M?.fileId ?? null,
170
+ notes: A.notes.trim() || null
171
+ }), R.success("Shipment scheduled"), k(!1), Q();
169
172
  } catch (e) {
170
- P(e instanceof Error ? e.message : "Failed to schedule shipment."), L.fromError(e);
173
+ F(e instanceof Error ? e.message : "Failed to schedule shipment."), R.fromError(e);
171
174
  }
172
- }, $e = [
175
+ }, nt = [
173
176
  {
174
177
  key: "reference",
175
178
  header: "Shipment",
@@ -189,7 +192,7 @@ function T() {
189
192
  header: "Contract",
190
193
  hideOnMobile: !0,
191
194
  render: (e) => {
192
- let t = U.get(e.contractId);
195
+ let t = W.get(e.contractId);
193
196
  return t ? /* @__PURE__ */ m("div", {
194
197
  className: "min-w-0",
195
198
  children: [/* @__PURE__ */ p("p", {
@@ -217,7 +220,7 @@ function T() {
217
220
  {
218
221
  key: "status",
219
222
  header: "Status",
220
- render: (e) => /* @__PURE__ */ p(o, { status: e.status })
223
+ render: (e) => /* @__PURE__ */ p(a, { status: e.status })
221
224
  },
222
225
  {
223
226
  key: "route",
@@ -235,7 +238,7 @@ function T() {
235
238
  className: "truncate",
236
239
  children: t ?? "—"
237
240
  }),
238
- /* @__PURE__ */ p(ye, { className: "h-3.5 w-3.5 shrink-0 text-text-tertiary" }),
241
+ /* @__PURE__ */ p(Se, { className: "h-3.5 w-3.5 shrink-0 text-text-tertiary" }),
239
242
  /* @__PURE__ */ p("span", {
240
243
  className: "truncate",
241
244
  children: n ?? "—"
@@ -269,7 +272,7 @@ function T() {
269
272
  key: "document",
270
273
  header: "Document",
271
274
  hideOnMobile: !0,
272
- render: (e) => e.document?.id ? /* @__PURE__ */ p(ve, { fileId: e.document.id }) : /* @__PURE__ */ p("span", {
275
+ render: (e) => e.document?.id ? /* @__PURE__ */ p(xe, { fileId: e.document.id }) : /* @__PURE__ */ p("span", {
273
276
  className: "text-text-tertiary",
274
277
  children: "—"
275
278
  })
@@ -279,7 +282,7 @@ function T() {
279
282
  header: "",
280
283
  align: "right",
281
284
  render: (e) => {
282
- let t = me(pe, e.status), n = fe.includes(e.status), i = Ve === e.id;
285
+ let t = _e(ge, e.status), n = he.includes(e.status), i = Ue === e.id;
283
286
  return t.length === 0 && !n ? /* @__PURE__ */ p("span", {
284
287
  className: "text-text-tertiary",
285
288
  children: "—"
@@ -289,13 +292,13 @@ function T() {
289
292
  value: e.status,
290
293
  disabled: i,
291
294
  onValueChange: (t) => {
292
- t !== e.status && (F(e.id), Ke.mutate({
295
+ t !== e.status && (I(e.id), Je.mutate({
293
296
  id: e.id,
294
297
  status: t
295
298
  }, {
296
- onSuccess: () => L.success("Shipment updated"),
297
- onError: (e) => L.fromError(e),
298
- onSettled: () => F(null)
299
+ onSuccess: () => R.success("Shipment updated"),
300
+ onError: (e) => R.fromError(e),
301
+ onSettled: () => I(null)
299
302
  }));
300
303
  },
301
304
  children: [/* @__PURE__ */ p(x, {
@@ -309,23 +312,24 @@ function T() {
309
312
  }), n && /* @__PURE__ */ m(h, {
310
313
  size: "sm",
311
314
  variant: "outline",
312
- disabled: G.isPending || i,
313
- onClick: () => G.mutate(e.id, {
314
- onSuccess: () => L.success("Shipment delivered"),
315
- onError: (e) => L.fromError(e)
315
+ disabled: K.isPending || i,
316
+ onClick: () => K.mutate(e.id, {
317
+ onSuccess: () => R.success("Shipment delivered"),
318
+ onError: (e) => R.fromError(e)
316
319
  }),
317
- children: [/* @__PURE__ */ p(u, { className: "mr-1.5 h-4 w-4" }), " Mark delivered"]
320
+ children: [/* @__PURE__ */ p(l, { className: "mr-1.5 h-4 w-4" }), " Mark delivered"]
318
321
  })]
319
322
  });
320
323
  }
321
324
  }
322
- ], $ = T !== "ALL" || E !== "ALL";
325
+ ], $ = E !== "ALL" || D !== "ALL";
323
326
  return /* @__PURE__ */ m(e, {
324
- title: "Shipments",
325
- description: "Cargo movements delivering offtake contracts — pipelines, tankers, vessels, rail & grid.",
327
+ title: T("theglobalfuel.pages.shipments.title", "Shipments"),
328
+ description: T("theglobalfuel.pages.shipments.description", "Cargo movements delivering offtake contracts — pipelines, tankers, vessels, rail & grid."),
329
+ dataTour: "theglobalfuel-shipments-page",
326
330
  actions: /* @__PURE__ */ m(h, {
327
- onClick: () => O(!0),
328
- children: [/* @__PURE__ */ p(d, { className: "mr-1.5 h-4 w-4" }), " Schedule shipment"]
331
+ onClick: () => k(!0),
332
+ children: [/* @__PURE__ */ p(u, { className: "mr-1.5 h-4 w-4" }), " Schedule shipment"]
329
333
  }),
330
334
  children: [
331
335
  /* @__PURE__ */ m("div", {
@@ -333,25 +337,25 @@ function T() {
333
337
  children: [
334
338
  /* @__PURE__ */ p(t, {
335
339
  featured: !0,
336
- icon: /* @__PURE__ */ p(f, { className: "h-5 w-5" }),
337
- value: q.length,
340
+ icon: /* @__PURE__ */ p(d, { className: "h-5 w-5" }),
341
+ value: J.length,
338
342
  label: "Total shipments"
339
343
  }),
340
344
  /* @__PURE__ */ p(t, {
341
- icon: /* @__PURE__ */ p(be, { className: "h-5 w-5" }),
342
- value: qe,
345
+ icon: /* @__PURE__ */ p(Ce, { className: "h-5 w-5" }),
346
+ value: Ye,
343
347
  label: "Scheduled"
344
348
  }),
345
349
  /* @__PURE__ */ p(t, {
346
350
  accent: "warning",
347
- icon: /* @__PURE__ */ p(Se, { className: "h-5 w-5" }),
348
- value: Je,
351
+ icon: /* @__PURE__ */ p(Te, { className: "h-5 w-5" }),
352
+ value: Xe,
349
353
  label: "In transit"
350
354
  }),
351
355
  /* @__PURE__ */ p(t, {
352
356
  accent: "success",
353
- icon: /* @__PURE__ */ p(u, { className: "h-5 w-5" }),
354
- value: Ye,
357
+ icon: /* @__PURE__ */ p(l, { className: "h-5 w-5" }),
358
+ value: Ze,
355
359
  label: "Delivered"
356
360
  })
357
361
  ]
@@ -365,15 +369,15 @@ function T() {
365
369
  children: [/* @__PURE__ */ p("h3", {
366
370
  className: "text-sm font-semibold text-text-secondary",
367
371
  children: "Status distribution"
368
- }), /* @__PURE__ */ p(f, {
372
+ }), /* @__PURE__ */ p(d, {
369
373
  className: "h-4 w-4 shrink-0 text-text-muted",
370
374
  "aria-hidden": "true"
371
375
  })]
372
- }), Y.length > 0 ? /* @__PURE__ */ p(ie, {
373
- segments: Y,
376
+ }), $e.length > 0 ? /* @__PURE__ */ p(ae, {
377
+ segments: $e,
374
378
  height: 14,
375
379
  label: "By status",
376
- rightLabel: `${q.length} shipment${q.length === 1 ? "" : "s"}`
380
+ rightLabel: `${J.length} shipment${J.length === 1 ? "" : "s"}`
377
381
  }) : /* @__PURE__ */ p("p", {
378
382
  className: "py-6 text-sm text-text-tertiary",
379
383
  children: "No shipments yet — schedule one to see the status mix."
@@ -388,19 +392,19 @@ function T() {
388
392
  }), /* @__PURE__ */ m("span", {
389
393
  className: "inline-flex items-center gap-1.5 text-xs text-text-tertiary",
390
394
  children: [
391
- /* @__PURE__ */ p(xe, {
395
+ /* @__PURE__ */ p(we, {
392
396
  className: "h-3.5 w-3.5",
393
397
  "aria-hidden": "true"
394
398
  }),
395
- Ze,
399
+ et,
396
400
  " lane",
397
- Ze === 1 ? "" : "s"
401
+ et === 1 ? "" : "s"
398
402
  ]
399
403
  })]
400
- }), Z ? /* @__PURE__ */ m(Ce, { children: [
404
+ }), Z ? /* @__PURE__ */ m(f, { children: [
401
405
  /* @__PURE__ */ m(v, {
402
406
  value: Z.id,
403
- onValueChange: He,
407
+ onValueChange: We,
404
408
  children: [/* @__PURE__ */ p(x, {
405
409
  "aria-label": "Trace a shipment route",
406
410
  children: /* @__PURE__ */ p(S, {})
@@ -415,11 +419,11 @@ function T() {
415
419
  ]
416
420
  }, e.id)) })]
417
421
  }),
418
- /* @__PURE__ */ p(ae, { steps: Le(Z) }),
422
+ /* @__PURE__ */ p(oe, { steps: ze(Z) }),
419
423
  /* @__PURE__ */ m("div", {
420
424
  className: "flex flex-wrap items-center gap-x-3 gap-y-1.5 text-xs text-text-tertiary",
421
425
  children: [
422
- /* @__PURE__ */ p(o, { status: Z.status }),
426
+ /* @__PURE__ */ p(a, { status: Z.status }),
423
427
  /* @__PURE__ */ p("span", { children: r(Z.mode) }),
424
428
  /* @__PURE__ */ p("span", {
425
429
  className: "tabular-nums text-text-secondary",
@@ -439,16 +443,16 @@ function T() {
439
443
  }),
440
444
  /* @__PURE__ */ m("div", {
441
445
  className: "mb-5 flex flex-wrap items-center gap-3",
442
- children: [/* @__PURE__ */ p(he, {
443
- options: Xe,
444
- value: T,
446
+ children: [/* @__PURE__ */ p(ve, {
447
+ options: Qe,
448
+ value: E,
445
449
  onChange: (e) => {
446
- Re(e), D.reset();
450
+ Be(e), O.reset();
447
451
  }
448
452
  }), /* @__PURE__ */ m(v, {
449
- value: E,
453
+ value: D,
450
454
  onValueChange: (e) => {
451
- ze(e), D.reset();
455
+ Ve(e), O.reset();
452
456
  },
453
457
  children: [/* @__PURE__ */ p(x, {
454
458
  className: "w-56",
@@ -457,7 +461,7 @@ function T() {
457
461
  }), /* @__PURE__ */ m(y, { children: [/* @__PURE__ */ p(b, {
458
462
  value: "ALL",
459
463
  children: "All contracts"
460
- }), H.map((e) => /* @__PURE__ */ m(b, {
464
+ }), U.map((e) => /* @__PURE__ */ m(b, {
461
465
  value: e.id,
462
466
  children: [
463
467
  e.reference,
@@ -467,41 +471,41 @@ function T() {
467
471
  }, e.id))] })]
468
472
  })]
469
473
  }),
470
- Ue ? /* @__PURE__ */ p(ne, { label: "Loading shipments…" }) : We ? /* @__PURE__ */ p(te, {
474
+ Ge ? /* @__PURE__ */ p(re, { label: "Loading shipments…" }) : Ke ? /* @__PURE__ */ p(ne, {
471
475
  message: "Couldn't load shipments.",
472
- onRetry: () => Ge()
473
- }) : K.length === 0 ? /* @__PURE__ */ p(re, {
476
+ onRetry: () => qe()
477
+ }) : q.length === 0 ? /* @__PURE__ */ p(ie, {
474
478
  illustration: "empty-data",
475
- icon: /* @__PURE__ */ p(f, { className: "h-10 w-10" }),
479
+ icon: /* @__PURE__ */ p(d, { className: "h-10 w-10" }),
476
480
  title: $ ? "No matching shipments" : "No shipments yet",
477
481
  description: $ ? "No shipments match these filters. Try a different status or contract." : "Schedule your first shipment to start tracking cargo against your offtake contracts.",
478
482
  action: /* @__PURE__ */ m(h, {
479
- onClick: () => O(!0),
480
- children: [/* @__PURE__ */ p(d, { className: "mr-1.5 h-4 w-4" }), " Schedule shipment"]
483
+ onClick: () => k(!0),
484
+ children: [/* @__PURE__ */ p(u, { className: "mr-1.5 h-4 w-4" }), " Schedule shipment"]
481
485
  })
482
- }) : /* @__PURE__ */ m(Ce, { children: [/* @__PURE__ */ p(ee, {
483
- columns: $e,
484
- rows: K,
486
+ }) : /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(te, {
487
+ columns: nt,
488
+ rows: q,
485
489
  rowKey: (e) => e.id,
486
490
  defaultSort: {
487
491
  key: "scheduledAt",
488
492
  dir: "desc"
489
493
  }
490
- }), /* @__PURE__ */ p(ge, {
491
- page: D.page,
494
+ }), /* @__PURE__ */ p(ye, {
495
+ page: O.page,
492
496
  pageSize: C,
493
- itemCount: K.length,
494
- hasMore: z?.pageInfo?.hasMore ?? !1,
495
- onPageChange: D.onPageChange
497
+ itemCount: q.length,
498
+ hasMore: B?.pageInfo?.hasMore ?? !1,
499
+ onPageChange: O.onPageChange
496
500
  })] }),
497
- /* @__PURE__ */ p(we, {
498
- open: Be,
501
+ /* @__PURE__ */ p(Ee, {
502
+ open: He,
499
503
  onOpenChange: (e) => {
500
- O(e), e || Q();
504
+ k(e), e || Q();
501
505
  },
502
- children: /* @__PURE__ */ m(Te, { children: [/* @__PURE__ */ m(Oe, { children: [/* @__PURE__ */ p(ke, { children: "Schedule shipment" }), /* @__PURE__ */ p(Ee, { children: "Book a cargo movement against an offtake contract and track it to delivery." })] }), /* @__PURE__ */ m("form", {
506
+ children: /* @__PURE__ */ m(De, { children: [/* @__PURE__ */ m(Ae, { children: [/* @__PURE__ */ p(je, { children: "Schedule shipment" }), /* @__PURE__ */ p(Oe, { children: "Book a cargo movement against an offtake contract and track it to delivery." })] }), /* @__PURE__ */ m("form", {
503
507
  onSubmit: (e) => {
504
- e.preventDefault(), Qe();
508
+ e.preventDefault(), tt();
505
509
  },
506
510
  children: [/* @__PURE__ */ m("div", {
507
511
  className: "grid gap-4 py-2",
@@ -512,10 +516,10 @@ function T() {
512
516
  htmlFor: "shipContract",
513
517
  children: "Contract *"
514
518
  }), /* @__PURE__ */ m(v, {
515
- value: k.contractId,
519
+ value: A.contractId,
516
520
  onValueChange: (e) => {
517
- let t = U.get(e);
518
- A((n) => ({
521
+ let t = W.get(e);
522
+ j((n) => ({
519
523
  ...n,
520
524
  contractId: e,
521
525
  unit: t?.unit ?? n.unit
@@ -524,11 +528,11 @@ function T() {
524
528
  children: [/* @__PURE__ */ p(x, {
525
529
  id: "shipContract",
526
530
  children: /* @__PURE__ */ p(S, { placeholder: "Select a contract" })
527
- }), /* @__PURE__ */ p(y, { children: H.length === 0 ? /* @__PURE__ */ p(b, {
531
+ }), /* @__PURE__ */ p(y, { children: U.length === 0 ? /* @__PURE__ */ p(b, {
528
532
  value: "none",
529
533
  disabled: !0,
530
534
  children: "No contracts available"
531
- }) : H.map((e) => /* @__PURE__ */ m(b, {
535
+ }) : U.map((e) => /* @__PURE__ */ m(b, {
532
536
  value: e.id,
533
537
  children: [
534
538
  e.reference,
@@ -547,9 +551,9 @@ function T() {
547
551
  children: "Reference *"
548
552
  }), /* @__PURE__ */ p(g, {
549
553
  id: "shipRef",
550
- value: k.reference,
551
- onChange: (e) => A({
552
- ...k,
554
+ value: A.reference,
555
+ onChange: (e) => j({
556
+ ...A,
553
557
  reference: e.target.value
554
558
  }),
555
559
  placeholder: "SHP-2026-0142"
@@ -560,15 +564,15 @@ function T() {
560
564
  htmlFor: "shipMode",
561
565
  children: "Mode"
562
566
  }), /* @__PURE__ */ m(v, {
563
- value: k.mode,
564
- onValueChange: (e) => A({
565
- ...k,
567
+ value: A.mode,
568
+ onValueChange: (e) => j({
569
+ ...A,
566
570
  mode: e
567
571
  }),
568
572
  children: [/* @__PURE__ */ p(x, {
569
573
  id: "shipMode",
570
574
  children: /* @__PURE__ */ p(S, {})
571
- }), /* @__PURE__ */ p(y, { children: Me.map((e) => /* @__PURE__ */ p(b, {
575
+ }), /* @__PURE__ */ p(y, { children: Pe.map((e) => /* @__PURE__ */ p(b, {
572
576
  value: e,
573
577
  children: r(e)
574
578
  }, e)) })]
@@ -584,9 +588,9 @@ function T() {
584
588
  children: "Origin"
585
589
  }), /* @__PURE__ */ p(g, {
586
590
  id: "shipOrigin",
587
- value: k.origin,
588
- onChange: (e) => A({
589
- ...k,
591
+ value: A.origin,
592
+ onChange: (e) => j({
593
+ ...A,
590
594
  origin: e.target.value
591
595
  }),
592
596
  placeholder: "Ras Tanura Terminal"
@@ -598,9 +602,9 @@ function T() {
598
602
  children: "Destination"
599
603
  }), /* @__PURE__ */ p(g, {
600
604
  id: "shipDest",
601
- value: k.destination,
602
- onChange: (e) => A({
603
- ...k,
605
+ value: A.destination,
606
+ onChange: (e) => j({
607
+ ...A,
604
608
  destination: e.target.value
605
609
  }),
606
610
  placeholder: "Rotterdam"
@@ -620,9 +624,9 @@ function T() {
620
624
  type: "number",
621
625
  min: "0",
622
626
  step: "any",
623
- value: k.volume,
624
- onChange: (e) => A({
625
- ...k,
627
+ value: A.volume,
628
+ onChange: (e) => j({
629
+ ...A,
626
630
  volume: e.target.value
627
631
  }),
628
632
  placeholder: "500000"
@@ -634,15 +638,15 @@ function T() {
634
638
  htmlFor: "shipUnit",
635
639
  children: "Unit"
636
640
  }), /* @__PURE__ */ m(v, {
637
- value: k.unit,
638
- onValueChange: (e) => A({
639
- ...k,
641
+ value: A.unit,
642
+ onValueChange: (e) => j({
643
+ ...A,
640
644
  unit: e
641
645
  }),
642
646
  children: [/* @__PURE__ */ p(x, {
643
647
  id: "shipUnit",
644
648
  children: /* @__PURE__ */ p(S, {})
645
- }), /* @__PURE__ */ p(y, { children: Ne.map((e) => /* @__PURE__ */ p(b, {
649
+ }), /* @__PURE__ */ p(y, { children: Fe.map((e) => /* @__PURE__ */ p(b, {
646
650
  value: e,
647
651
  children: r(e)
648
652
  }, e)) })]
@@ -656,9 +660,9 @@ function T() {
656
660
  }), /* @__PURE__ */ p(g, {
657
661
  id: "shipScheduled",
658
662
  type: "date",
659
- value: k.scheduledAt,
660
- onChange: (e) => A({
661
- ...k,
663
+ value: A.scheduledAt,
664
+ onChange: (e) => j({
665
+ ...A,
662
666
  scheduledAt: e.target.value
663
667
  })
664
668
  })]
@@ -672,19 +676,19 @@ function T() {
672
676
  children: "Carrier"
673
677
  }), /* @__PURE__ */ p(g, {
674
678
  id: "shipCarrier",
675
- value: k.carrier,
676
- onChange: (e) => A({
677
- ...k,
679
+ value: A.carrier,
680
+ onChange: (e) => j({
681
+ ...A,
678
682
  carrier: e.target.value
679
683
  }),
680
684
  placeholder: "Frontline Ltd."
681
685
  })]
682
686
  }),
683
- /* @__PURE__ */ p(_e, {
687
+ /* @__PURE__ */ p(be, {
684
688
  id: "shipDocument",
685
689
  label: "Bill of lading (optional)",
686
- value: j,
687
- onChange: M,
690
+ value: M,
691
+ onChange: N,
688
692
  hint: "Attach the bill of lading or shipping document (PDF or image)."
689
693
  }),
690
694
  /* @__PURE__ */ m("div", {
@@ -692,33 +696,33 @@ function T() {
692
696
  children: [/* @__PURE__ */ p(_, {
693
697
  htmlFor: "shipNotes",
694
698
  children: "Notes"
695
- }), /* @__PURE__ */ p(Ae, {
699
+ }), /* @__PURE__ */ p(Me, {
696
700
  id: "shipNotes",
697
- value: k.notes,
698
- onChange: (e) => A({
699
- ...k,
701
+ value: A.notes,
702
+ onChange: (e) => j({
703
+ ...A,
700
704
  notes: e.target.value
701
705
  }),
702
706
  placeholder: "Optional context — laycan window, inspector, terms.",
703
707
  rows: 2
704
708
  })]
705
709
  }),
706
- N && /* @__PURE__ */ p("p", {
710
+ P && /* @__PURE__ */ p("p", {
707
711
  className: "text-sm text-status-error-text",
708
- children: N
712
+ children: P
709
713
  })
710
714
  ]
711
- }), /* @__PURE__ */ m(De, { children: [/* @__PURE__ */ p(h, {
715
+ }), /* @__PURE__ */ m(ke, { children: [/* @__PURE__ */ p(h, {
712
716
  type: "button",
713
717
  variant: "outline",
714
718
  onClick: () => {
715
- O(!1), Q();
719
+ k(!1), Q();
716
720
  },
717
721
  children: "Cancel"
718
722
  }), /* @__PURE__ */ p(h, {
719
723
  type: "submit",
720
- disabled: W.isPending,
721
- children: W.isPending ? "Scheduling…" : "Schedule shipment"
724
+ disabled: G.isPending,
725
+ children: G.isPending ? "Scheduling…" : "Schedule shipment"
722
726
  })] })]
723
727
  })] })
724
728
  })