@burdenoff/microfe-theglobalfuel 2026.705.5 → 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 (241) 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/index.js +3 -1
  15. package/dist/theglobalfuel/TheGlobalFuelRoot.d.ts +5 -0
  16. package/dist/theglobalfuel/TheGlobalFuelRoot.d.ts.map +1 -0
  17. package/dist/theglobalfuel/TheGlobalFuelRoot.js +106 -104
  18. package/dist/theglobalfuel/TheGlobalFuelRoot.js.map +1 -1
  19. package/dist/theglobalfuel/TheGlobalFuelRoutes.d.ts +4 -0
  20. package/dist/theglobalfuel/TheGlobalFuelRoutes.d.ts.map +1 -0
  21. package/dist/theglobalfuel/TheGlobalFuelRoutes.js +60 -38
  22. package/dist/theglobalfuel/TheGlobalFuelRoutes.js.map +1 -1
  23. package/dist/theglobalfuel/components/DataTable.d.ts +30 -0
  24. package/dist/theglobalfuel/components/DataTable.d.ts.map +1 -0
  25. package/dist/theglobalfuel/components/DataTable.js.map +1 -1
  26. package/dist/theglobalfuel/components/EmptyState.d.ts +18 -0
  27. package/dist/theglobalfuel/components/EmptyState.d.ts.map +1 -0
  28. package/dist/theglobalfuel/components/EvidenceUpload.d.ts +14 -0
  29. package/dist/theglobalfuel/components/EvidenceUpload.d.ts.map +1 -0
  30. package/dist/theglobalfuel/components/FileLink.d.ts +15 -0
  31. package/dist/theglobalfuel/components/FileLink.d.ts.map +1 -0
  32. package/dist/theglobalfuel/components/FilterTabs.d.ts +18 -0
  33. package/dist/theglobalfuel/components/FilterTabs.d.ts.map +1 -0
  34. package/dist/theglobalfuel/components/MetricsCard.d.ts +23 -0
  35. package/dist/theglobalfuel/components/MetricsCard.d.ts.map +1 -0
  36. package/dist/theglobalfuel/components/MiniBar.d.ts +16 -0
  37. package/dist/theglobalfuel/components/MiniBar.d.ts.map +1 -0
  38. package/dist/theglobalfuel/components/PageLayout.d.ts +18 -0
  39. package/dist/theglobalfuel/components/PageLayout.d.ts.map +1 -0
  40. package/dist/theglobalfuel/components/PageLayout.js +2 -1
  41. package/dist/theglobalfuel/components/PageLayout.js.map +1 -1
  42. package/dist/theglobalfuel/components/Pagination.d.ts +22 -0
  43. package/dist/theglobalfuel/components/Pagination.d.ts.map +1 -0
  44. package/dist/theglobalfuel/components/StateViews.d.ts +24 -0
  45. package/dist/theglobalfuel/components/StateViews.d.ts.map +1 -0
  46. package/dist/theglobalfuel/components/StatusBadge.d.ts +9 -0
  47. package/dist/theglobalfuel/components/StatusBadge.d.ts.map +1 -0
  48. package/dist/theglobalfuel/components/Tabs.d.ts +17 -0
  49. package/dist/theglobalfuel/components/Tabs.d.ts.map +1 -0
  50. package/dist/theglobalfuel/components/TheDiscussion.d.ts +18 -0
  51. package/dist/theglobalfuel/components/TheDiscussion.d.ts.map +1 -0
  52. package/dist/theglobalfuel/components/TheTags.d.ts +17 -0
  53. package/dist/theglobalfuel/components/TheTags.d.ts.map +1 -0
  54. package/dist/theglobalfuel/components/WorldMap.d.ts +18 -0
  55. package/dist/theglobalfuel/components/WorldMap.d.ts.map +1 -0
  56. package/dist/theglobalfuel/components/WorldMap.js.map +1 -1
  57. package/dist/theglobalfuel/components/index.d.ts +21 -0
  58. package/dist/theglobalfuel/components/index.d.ts.map +1 -0
  59. package/dist/theglobalfuel/components/viz/AllocationBar.d.ts +21 -0
  60. package/dist/theglobalfuel/components/viz/AllocationBar.d.ts.map +1 -0
  61. package/dist/theglobalfuel/components/viz/AreaChart.d.ts +18 -0
  62. package/dist/theglobalfuel/components/viz/AreaChart.d.ts.map +1 -0
  63. package/dist/theglobalfuel/components/viz/AvatarStack.d.ts +13 -0
  64. package/dist/theglobalfuel/components/viz/AvatarStack.d.ts.map +1 -0
  65. package/dist/theglobalfuel/components/viz/BarChart.d.ts +17 -0
  66. package/dist/theglobalfuel/components/viz/BarChart.d.ts.map +1 -0
  67. package/dist/theglobalfuel/components/viz/CertificateCard.d.ts +14 -0
  68. package/dist/theglobalfuel/components/viz/CertificateCard.d.ts.map +1 -0
  69. package/dist/theglobalfuel/components/viz/DonutChart.d.ts +20 -0
  70. package/dist/theglobalfuel/components/viz/DonutChart.d.ts.map +1 -0
  71. package/dist/theglobalfuel/components/viz/HBarFunnel.d.ts +17 -0
  72. package/dist/theglobalfuel/components/viz/HBarFunnel.d.ts.map +1 -0
  73. package/dist/theglobalfuel/components/viz/Heatmap.d.ts +26 -0
  74. package/dist/theglobalfuel/components/viz/Heatmap.d.ts.map +1 -0
  75. package/dist/theglobalfuel/components/viz/KanbanBoard.d.ts +17 -0
  76. package/dist/theglobalfuel/components/viz/KanbanBoard.d.ts.map +1 -0
  77. package/dist/theglobalfuel/components/viz/LineChart.d.ts +20 -0
  78. package/dist/theglobalfuel/components/viz/LineChart.d.ts.map +1 -0
  79. package/dist/theglobalfuel/components/viz/OrgTree.d.ts +14 -0
  80. package/dist/theglobalfuel/components/viz/OrgTree.d.ts.map +1 -0
  81. package/dist/theglobalfuel/components/viz/PathSteps.d.ts +17 -0
  82. package/dist/theglobalfuel/components/viz/PathSteps.d.ts.map +1 -0
  83. package/dist/theglobalfuel/components/viz/ProgressRing.d.ts +20 -0
  84. package/dist/theglobalfuel/components/viz/ProgressRing.d.ts.map +1 -0
  85. package/dist/theglobalfuel/components/viz/RatingStars.d.ts +14 -0
  86. package/dist/theglobalfuel/components/viz/RatingStars.d.ts.map +1 -0
  87. package/dist/theglobalfuel/components/viz/SegmentedTabs.d.ts +26 -0
  88. package/dist/theglobalfuel/components/viz/SegmentedTabs.d.ts.map +1 -0
  89. package/dist/theglobalfuel/components/viz/SkillBar.d.ts +17 -0
  90. package/dist/theglobalfuel/components/viz/SkillBar.d.ts.map +1 -0
  91. package/dist/theglobalfuel/components/viz/Sparkline.d.ts +16 -0
  92. package/dist/theglobalfuel/components/viz/Sparkline.d.ts.map +1 -0
  93. package/dist/theglobalfuel/components/viz/StatCard.d.ts +22 -0
  94. package/dist/theglobalfuel/components/viz/StatCard.d.ts.map +1 -0
  95. package/dist/theglobalfuel/components/viz/StepProgress.d.ts +17 -0
  96. package/dist/theglobalfuel/components/viz/StepProgress.d.ts.map +1 -0
  97. package/dist/theglobalfuel/components/viz/Timeline.d.ts +21 -0
  98. package/dist/theglobalfuel/components/viz/Timeline.d.ts.map +1 -0
  99. package/dist/theglobalfuel/components/viz/index.d.ts +35 -0
  100. package/dist/theglobalfuel/components/viz/index.d.ts.map +1 -0
  101. package/dist/theglobalfuel/components/viz/lib/Avatar.d.ts +15 -0
  102. package/dist/theglobalfuel/components/viz/lib/Avatar.d.ts.map +1 -0
  103. package/dist/theglobalfuel/components/viz/lib/CartesianFrame.d.ts +44 -0
  104. package/dist/theglobalfuel/components/viz/lib/CartesianFrame.d.ts.map +1 -0
  105. package/dist/theglobalfuel/components/viz/lib/ResponsiveSvg.d.ts +27 -0
  106. package/dist/theglobalfuel/components/viz/lib/ResponsiveSvg.d.ts.map +1 -0
  107. package/dist/theglobalfuel/components/viz/lib/format.d.ts +10 -0
  108. package/dist/theglobalfuel/components/viz/lib/format.d.ts.map +1 -0
  109. package/dist/theglobalfuel/components/viz/lib/geometry.d.ts +41 -0
  110. package/dist/theglobalfuel/components/viz/lib/geometry.d.ts.map +1 -0
  111. package/dist/theglobalfuel/components/viz/lib/hooks.d.ts +18 -0
  112. package/dist/theglobalfuel/components/viz/lib/hooks.d.ts.map +1 -0
  113. package/dist/theglobalfuel/components/viz/lib/palette.d.ts +31 -0
  114. package/dist/theglobalfuel/components/viz/lib/palette.d.ts.map +1 -0
  115. package/dist/theglobalfuel/components/viz/lib/types.d.ts +27 -0
  116. package/dist/theglobalfuel/components/viz/lib/types.d.ts.map +1 -0
  117. package/dist/theglobalfuel/context/TheGlobalFuelContext.d.ts +16 -0
  118. package/dist/theglobalfuel/context/TheGlobalFuelContext.d.ts.map +1 -0
  119. package/dist/theglobalfuel/context/index.d.ts +6 -0
  120. package/dist/theglobalfuel/context/index.d.ts.map +1 -0
  121. package/dist/theglobalfuel/hooks/index.d.ts +15 -0
  122. package/dist/theglobalfuel/hooks/index.d.ts.map +1 -0
  123. package/dist/theglobalfuel/hooks/index.js +4 -0
  124. package/dist/theglobalfuel/hooks/useCursorPager.d.ts +26 -0
  125. package/dist/theglobalfuel/hooks/useCursorPager.d.ts.map +1 -0
  126. package/dist/theglobalfuel/hooks/useNotify.d.ts +23 -0
  127. package/dist/theglobalfuel/hooks/useNotify.d.ts.map +1 -0
  128. package/dist/theglobalfuel/hooks/useTheAnalytics.d.ts +38 -0
  129. package/dist/theglobalfuel/hooks/useTheAnalytics.d.ts.map +1 -0
  130. package/dist/theglobalfuel/hooks/useTheAnalytics.js +46 -0
  131. package/dist/theglobalfuel/hooks/useTheAnalytics.js.map +1 -0
  132. package/dist/theglobalfuel/hooks/useTheComments.d.ts +36 -0
  133. package/dist/theglobalfuel/hooks/useTheComments.d.ts.map +1 -0
  134. package/dist/theglobalfuel/hooks/useTheFiles.d.ts +47 -0
  135. package/dist/theglobalfuel/hooks/useTheFiles.d.ts.map +1 -0
  136. package/dist/theglobalfuel/hooks/useTheGlobalFuelApi.d.ts +79 -0
  137. package/dist/theglobalfuel/hooks/useTheGlobalFuelApi.d.ts.map +1 -0
  138. package/dist/theglobalfuel/hooks/useTheGlobalFuelApi.js +2 -9
  139. package/dist/theglobalfuel/hooks/useTheGlobalFuelApi.js.map +1 -1
  140. package/dist/theglobalfuel/hooks/useTheNativeControls.d.ts +20 -0
  141. package/dist/theglobalfuel/hooks/useTheNativeControls.d.ts.map +1 -0
  142. package/dist/theglobalfuel/hooks/useTheNativeControls.js +22 -0
  143. package/dist/theglobalfuel/hooks/useTheNativeControls.js.map +1 -0
  144. package/dist/theglobalfuel/hooks/useThePageView.d.ts +10 -0
  145. package/dist/theglobalfuel/hooks/useThePageView.d.ts.map +1 -0
  146. package/dist/theglobalfuel/hooks/useThePageView.js +13 -0
  147. package/dist/theglobalfuel/hooks/useThePageView.js.map +1 -0
  148. package/dist/theglobalfuel/hooks/useTheTags.d.ts +44 -0
  149. package/dist/theglobalfuel/hooks/useTheTags.d.ts.map +1 -0
  150. package/dist/theglobalfuel/hooks/useTheTranslation.d.ts +4 -0
  151. package/dist/theglobalfuel/hooks/useTheTranslation.d.ts.map +1 -0
  152. package/dist/theglobalfuel/hooks/useTheTranslation.js +12 -0
  153. package/dist/theglobalfuel/hooks/useTheTranslation.js.map +1 -0
  154. package/dist/theglobalfuel/index.d.ts +11 -0
  155. package/dist/theglobalfuel/index.d.ts.map +1 -0
  156. package/dist/theglobalfuel/index.js +2 -0
  157. package/dist/theglobalfuel/pages/assets/AssetDetailPage.d.ts +13 -0
  158. package/dist/theglobalfuel/pages/assets/AssetDetailPage.d.ts.map +1 -0
  159. package/dist/theglobalfuel/pages/assets/AssetDetailPage.js +395 -353
  160. package/dist/theglobalfuel/pages/assets/AssetDetailPage.js.map +1 -1
  161. package/dist/theglobalfuel/pages/assets/AssetsPage.d.ts +10 -0
  162. package/dist/theglobalfuel/pages/assets/AssetsPage.d.ts.map +1 -0
  163. package/dist/theglobalfuel/pages/assets/AssetsPage.js +152 -146
  164. package/dist/theglobalfuel/pages/assets/AssetsPage.js.map +1 -1
  165. package/dist/theglobalfuel/pages/compliance/CompliancePage.d.ts +11 -0
  166. package/dist/theglobalfuel/pages/compliance/CompliancePage.d.ts.map +1 -0
  167. package/dist/theglobalfuel/pages/compliance/CompliancePage.js +233 -229
  168. package/dist/theglobalfuel/pages/compliance/CompliancePage.js.map +1 -1
  169. package/dist/theglobalfuel/pages/contracts/ContractDetailPage.d.ts +9 -0
  170. package/dist/theglobalfuel/pages/contracts/ContractDetailPage.d.ts.map +1 -0
  171. package/dist/theglobalfuel/pages/contracts/ContractDetailPage.js +410 -389
  172. package/dist/theglobalfuel/pages/contracts/ContractDetailPage.js.map +1 -1
  173. package/dist/theglobalfuel/pages/contracts/ContractsPage.d.ts +8 -0
  174. package/dist/theglobalfuel/pages/contracts/ContractsPage.d.ts.map +1 -0
  175. package/dist/theglobalfuel/pages/contracts/ContractsPage.js +237 -231
  176. package/dist/theglobalfuel/pages/contracts/ContractsPage.js.map +1 -1
  177. package/dist/theglobalfuel/pages/dashboard/DashboardPage.d.ts +17 -0
  178. package/dist/theglobalfuel/pages/dashboard/DashboardPage.d.ts.map +1 -0
  179. package/dist/theglobalfuel/pages/dashboard/DashboardPage.js +255 -250
  180. package/dist/theglobalfuel/pages/dashboard/DashboardPage.js.map +1 -1
  181. package/dist/theglobalfuel/pages/emissions/EmissionsPage.d.ts +13 -0
  182. package/dist/theglobalfuel/pages/emissions/EmissionsPage.d.ts.map +1 -0
  183. package/dist/theglobalfuel/pages/emissions/EmissionsPage.js +154 -150
  184. package/dist/theglobalfuel/pages/emissions/EmissionsPage.js.map +1 -1
  185. package/dist/theglobalfuel/pages/inventory/InventoryPage.d.ts +11 -0
  186. package/dist/theglobalfuel/pages/inventory/InventoryPage.d.ts.map +1 -0
  187. package/dist/theglobalfuel/pages/inventory/InventoryPage.js +151 -147
  188. package/dist/theglobalfuel/pages/inventory/InventoryPage.js.map +1 -1
  189. package/dist/theglobalfuel/pages/production/ProductionPage.d.ts +11 -0
  190. package/dist/theglobalfuel/pages/production/ProductionPage.d.ts.map +1 -0
  191. package/dist/theglobalfuel/pages/production/ProductionPage.js +175 -171
  192. package/dist/theglobalfuel/pages/production/ProductionPage.js.map +1 -1
  193. package/dist/theglobalfuel/pages/provenance/ProvenancePage.d.ts +23 -0
  194. package/dist/theglobalfuel/pages/provenance/ProvenancePage.d.ts.map +1 -0
  195. package/dist/theglobalfuel/pages/provenance/ProvenancePage.js +153 -146
  196. package/dist/theglobalfuel/pages/provenance/ProvenancePage.js.map +1 -1
  197. package/dist/theglobalfuel/pages/reserves/ReservesPage.d.ts +10 -0
  198. package/dist/theglobalfuel/pages/reserves/ReservesPage.d.ts.map +1 -0
  199. package/dist/theglobalfuel/pages/reserves/ReservesPage.js +168 -164
  200. package/dist/theglobalfuel/pages/reserves/ReservesPage.js.map +1 -1
  201. package/dist/theglobalfuel/pages/shipments/ShipmentsPage.d.ts +11 -0
  202. package/dist/theglobalfuel/pages/shipments/ShipmentsPage.d.ts.map +1 -0
  203. package/dist/theglobalfuel/pages/shipments/ShipmentsPage.js +179 -175
  204. package/dist/theglobalfuel/pages/shipments/ShipmentsPage.js.map +1 -1
  205. package/dist/theglobalfuel/services/assistantApi.d.ts +25 -0
  206. package/dist/theglobalfuel/services/assistantApi.d.ts.map +1 -0
  207. package/dist/theglobalfuel/services/assistantApi.js +225 -0
  208. package/dist/theglobalfuel/services/assistantApi.js.map +1 -0
  209. package/dist/theglobalfuel/services/createSandboxAssistantTransport.d.ts +38 -0
  210. package/dist/theglobalfuel/services/createSandboxAssistantTransport.d.ts.map +1 -0
  211. package/dist/theglobalfuel/services/createSandboxAssistantTransport.js +120 -0
  212. package/dist/theglobalfuel/services/createSandboxAssistantTransport.js.map +1 -0
  213. package/dist/theglobalfuel/services/index.d.ts +7 -0
  214. package/dist/theglobalfuel/services/index.d.ts.map +1 -0
  215. package/dist/theglobalfuel/types/assistant.d.ts +65 -0
  216. package/dist/theglobalfuel/types/assistant.d.ts.map +1 -0
  217. package/dist/theglobalfuel/types/index.d.ts +376 -0
  218. package/dist/theglobalfuel/types/index.d.ts.map +1 -0
  219. package/dist/theglobalfuel/utils/cn.d.ts +4 -0
  220. package/dist/theglobalfuel/utils/cn.d.ts.map +1 -0
  221. package/dist/theglobalfuel/utils/formatters.d.ts +44 -0
  222. package/dist/theglobalfuel/utils/formatters.d.ts.map +1 -0
  223. package/dist/theglobalfuel/utils/i18n.d.ts +5 -0
  224. package/dist/theglobalfuel/utils/i18n.d.ts.map +1 -0
  225. package/dist/theglobalfuel/utils/i18n.js +15 -0
  226. package/dist/theglobalfuel/utils/i18n.js.map +1 -0
  227. package/dist/theglobalfuel/utils/index.d.ts +10 -0
  228. package/dist/theglobalfuel/utils/index.d.ts.map +1 -0
  229. package/dist/theglobalfuel/utils/navigation.d.ts +14 -0
  230. package/dist/theglobalfuel/utils/navigation.d.ts.map +1 -0
  231. package/dist/theglobalfuel/utils/pageContext.d.ts +26 -0
  232. package/dist/theglobalfuel/utils/pageContext.d.ts.map +1 -0
  233. package/dist/theglobalfuel/utils/pageContext.js +65 -0
  234. package/dist/theglobalfuel/utils/pageContext.js.map +1 -0
  235. package/dist/theglobalfuel/utils/transitions.d.ts +17 -0
  236. package/dist/theglobalfuel/utils/transitions.d.ts.map +1 -0
  237. package/package.json +5 -1
  238. package/dist/node_modules/clsx/dist/clsx.js +0 -18
  239. package/dist/node_modules/clsx/dist/clsx.js.map +0 -1
  240. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +0 -1716
  241. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +0 -1
@@ -1,24 +1,28 @@
1
1
  import { useTheGlobalFuel as e } from "../../context/TheGlobalFuelContext.js";
2
- import { PageLayout as ee } from "../../components/PageLayout.js";
3
- import { formatEnumLabel as t, formatMoney as n, formatUnit as r, formatVolume as i, toBackendDate as a } from "../../utils/formatters.js";
2
+ import { PageLayout as t } from "../../components/PageLayout.js";
3
+ import { formatEnumLabel as n, formatMoney as ee, formatUnit as r, formatVolume as i, toBackendDate as a } from "../../utils/formatters.js";
4
4
  import { StatusBadge as o } from "../../components/StatusBadge.js";
5
5
  import { MiniBar as s } from "../../components/MiniBar.js";
6
6
  import { DataTable as c } from "../../components/DataTable.js";
7
- import { ErrorView as l, LoadingView as u } from "../../components/StateViews.js";
8
- import { EmptyState as d } from "../../components/EmptyState.js";
7
+ import { ErrorView as te, LoadingView as ne } from "../../components/StateViews.js";
8
+ import { EmptyState as re } from "../../components/EmptyState.js";
9
9
  import "../../context/index.js";
10
- import { useTheContracts as f, useTheCreateContract as p } from "../../hooks/useTheGlobalFuelApi.js";
11
- import { useCursorPager as te } from "../../hooks/useCursorPager.js";
12
- import { useNotify as ne } from "../../hooks/useNotify.js";
10
+ import { useTheContracts as l, useTheCreateContract as u } from "../../hooks/useTheGlobalFuelApi.js";
11
+ import { useCursorPager as d } from "../../hooks/useCursorPager.js";
12
+ import { useNotify as f } from "../../hooks/useNotify.js";
13
+ import { useTheAnalytics as p } from "../../hooks/useTheAnalytics.js";
14
+ import { useThePageView as ie } from "../../hooks/useThePageView.js";
15
+ import { useTheNativeControls as ae } from "../../hooks/useTheNativeControls.js";
16
+ import { useTheTranslation as oe } from "../../hooks/useTheTranslation.js";
13
17
  import "../../hooks/index.js";
14
- import { FilterTabs as re } from "../../components/FilterTabs.js";
15
- import { Pagination as ie } from "../../components/Pagination.js";
16
- import { useMemo as ae, useState as m } from "react";
18
+ import { FilterTabs as se } from "../../components/FilterTabs.js";
19
+ import { Pagination as ce } from "../../components/Pagination.js";
20
+ import { useMemo as le, useState as m } from "react";
17
21
  import { FileSignature as h, Plus as g } from "lucide-react";
18
- import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
19
- import { Button as b, Input as x, Label as S, ResponsiveDialog as oe, ResponsiveDialogContent as se, ResponsiveDialogDescription as ce, ResponsiveDialogFooter as le, ResponsiveDialogHeader as ue, ResponsiveDialogTitle as de, Select as C, SelectContent as w, SelectItem as T, SelectTrigger as E, SelectValue as D, Textarea as fe } from "@burdenoff/fe-libs/ui";
22
+ import { Fragment as ue, jsx as _, jsxs as v } from "react/jsx-runtime";
23
+ import { Button as y, Input as b, Label as x, ResponsiveDialog as S, ResponsiveDialogContent as de, ResponsiveDialogDescription as fe, ResponsiveDialogFooter as pe, ResponsiveDialogHeader as me, ResponsiveDialogTitle as he, Select as C, SelectContent as w, SelectItem as T, SelectTrigger as E, SelectValue as D, Textarea as O } from "@burdenoff/fe-libs/ui";
20
24
  //#region src/theglobalfuel/pages/contracts/ContractsPage.tsx
21
- var O = [
25
+ var k = [
22
26
  {
23
27
  value: "ALL",
24
28
  label: "All"
@@ -51,12 +55,12 @@ var O = [
51
55
  value: "TERMINATED",
52
56
  label: "Terminated"
53
57
  }
54
- ], k = ["BUY", "SELL"], A = [
58
+ ], A = ["BUY", "SELL"], j = [
55
59
  "FIXED",
56
60
  "INDEX_LINKED",
57
61
  "FORMULA",
58
62
  "SPOT"
59
- ], j = [
63
+ ], M = [
60
64
  "CRUDE_OIL",
61
65
  "NATURAL_GAS",
62
66
  "LNG",
@@ -70,7 +74,7 @@ var O = [
70
74
  "GOLD",
71
75
  "LITHIUM",
72
76
  "RARE_EARTH"
73
- ], M = [
77
+ ], N = [
74
78
  "BARRELS",
75
79
  "CUBIC_METERS",
76
80
  "TONNES",
@@ -78,7 +82,7 @@ var O = [
78
82
  "MWH",
79
83
  "GJ",
80
84
  "MCF"
81
- ], N = 25, P = (e) => Math.max(0, Math.min(100, e)), F = (e) => e.contractedVolume > 0 ? P(e.deliveredVolume / e.contractedVolume * 100) : 0, I = {
85
+ ], P = 25, F = (e) => Math.max(0, Math.min(100, e)), I = (e) => e.contractedVolume > 0 ? F(e.deliveredVolume / e.contractedVolume * 100) : 0, L = {
82
86
  reference: "",
83
87
  counterparty: "",
84
88
  commodity: "CRUDE_OIL",
@@ -94,30 +98,31 @@ var O = [
94
98
  endDate: "",
95
99
  notes: ""
96
100
  };
97
- function L() {
98
- let { navigateTo: P } = e(), L = ne(), [R, z] = m("ALL"), [B, V] = m("ALL"), [H, pe] = m("ALL"), U = te(), [me, W] = m(!1), [G, K] = m(I), [q, J] = m(null), { data: Y, isLoading: he, isError: ge, refetch: _e } = f({
99
- status: R === "ALL" ? void 0 : R,
100
- side: B === "ALL" ? void 0 : B,
101
- commodity: H === "ALL" ? void 0 : H,
101
+ function R() {
102
+ ie("contracts");
103
+ let F = oe(), { navigateTo: R } = e(), z = f(), { haptic: ge } = ae(), { trackContractCreateClicked: _e, trackContractCreated: ve } = p(), [B, V] = m("ALL"), [H, ye] = m("ALL"), [U, be] = m("ALL"), W = d(), [xe, G] = m(!1), [K, q] = m(L), [J, Y] = m(null), { data: X, isLoading: Se, isError: Ce, refetch: we } = l({
104
+ status: B === "ALL" ? void 0 : B,
105
+ side: H === "ALL" ? void 0 : H,
106
+ commodity: U === "ALL" ? void 0 : U,
102
107
  pagination: {
103
- limit: N,
104
- offset: U.page * N
108
+ limit: P,
109
+ offset: W.page * P
105
110
  }
106
- }), X = p(), Z = ae(() => Y?.items ?? [], [Y]), Q = [
111
+ }), Z = u(), Q = le(() => X?.items ?? [], [X]), Te = [
107
112
  {
108
113
  key: "reference",
109
114
  header: "Contract",
110
- render: (e) => /* @__PURE__ */ y("div", {
115
+ render: (e) => /* @__PURE__ */ v("div", {
111
116
  className: "flex items-center gap-3",
112
- children: [/* @__PURE__ */ v("div", {
117
+ children: [/* @__PURE__ */ _("div", {
113
118
  className: "flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-[var(--color-accent-soft)] text-accent",
114
- children: /* @__PURE__ */ v(h, { className: "h-4 w-4" })
115
- }), /* @__PURE__ */ y("div", {
119
+ children: /* @__PURE__ */ _(h, { className: "h-4 w-4" })
120
+ }), /* @__PURE__ */ v("div", {
116
121
  className: "min-w-0",
117
- children: [/* @__PURE__ */ v("p", {
122
+ children: [/* @__PURE__ */ _("p", {
118
123
  className: "truncate font-semibold text-text-primary",
119
124
  children: e.reference
120
- }), /* @__PURE__ */ v("p", {
125
+ }), /* @__PURE__ */ _("p", {
121
126
  className: "truncate text-xs text-text-tertiary",
122
127
  children: e.counterparty
123
128
  })]
@@ -127,21 +132,21 @@ function L() {
127
132
  {
128
133
  key: "side",
129
134
  header: "Side",
130
- render: (e) => /* @__PURE__ */ v(o, { status: e.side })
135
+ render: (e) => /* @__PURE__ */ _(o, { status: e.side })
131
136
  },
132
137
  {
133
138
  key: "commodity",
134
139
  header: "Commodity",
135
140
  hideOnMobile: !0,
136
- render: (e) => /* @__PURE__ */ v("span", {
141
+ render: (e) => /* @__PURE__ */ _("span", {
137
142
  className: "text-text-secondary",
138
- children: t(e.commodity)
143
+ children: n(e.commodity)
139
144
  })
140
145
  },
141
146
  {
142
147
  key: "status",
143
148
  header: "Status",
144
- render: (e) => /* @__PURE__ */ v(o, { status: e.status })
149
+ render: (e) => /* @__PURE__ */ _(o, { status: e.status })
145
150
  },
146
151
  {
147
152
  key: "price",
@@ -149,9 +154,9 @@ function L() {
149
154
  align: "right",
150
155
  hideOnMobile: !0,
151
156
  sortValue: (e) => e.pricePerUnit,
152
- render: (e) => /* @__PURE__ */ y("span", {
157
+ render: (e) => /* @__PURE__ */ v("span", {
153
158
  className: "tabular-nums text-text-secondary",
154
- children: [n(e.pricePerUnit, e.currency), /* @__PURE__ */ y("span", {
159
+ children: [ee(e.pricePerUnit, e.currency), /* @__PURE__ */ v("span", {
155
160
  className: "text-text-tertiary",
156
161
  children: ["/", r(e.unit)]
157
162
  })]
@@ -160,14 +165,14 @@ function L() {
160
165
  {
161
166
  key: "delivery",
162
167
  header: "Delivered",
163
- sortValue: (e) => F(e),
164
- render: (e) => /* @__PURE__ */ y("div", {
168
+ sortValue: (e) => I(e),
169
+ render: (e) => /* @__PURE__ */ v("div", {
165
170
  className: "min-w-[9rem]",
166
- children: [/* @__PURE__ */ v(s, {
167
- value: F(e),
171
+ children: [/* @__PURE__ */ _(s, {
172
+ value: I(e),
168
173
  barClassName: "bg-[var(--color-status-success-text)]",
169
174
  className: "mb-1"
170
- }), /* @__PURE__ */ y("p", {
175
+ }), /* @__PURE__ */ v("p", {
171
176
  className: "text-xs tabular-nums text-text-tertiary",
172
177
  children: [
173
178
  i(e.deliveredVolume, e.unit),
@@ -182,7 +187,7 @@ function L() {
182
187
  header: "Updated",
183
188
  align: "right",
184
189
  hideOnMobile: !0,
185
- render: (e) => /* @__PURE__ */ v("span", {
190
+ render: (e) => /* @__PURE__ */ _("span", {
186
191
  className: "text-text-tertiary",
187
192
  children: new Date(e.updatedAt).toLocaleDateString(void 0, {
188
193
  day: "numeric",
@@ -192,292 +197,293 @@ function L() {
192
197
  })
193
198
  }
194
199
  ], $ = () => {
195
- K(I), J(null);
196
- }, ve = async () => {
197
- if (!G.reference.trim()) {
198
- J("Contract reference is required.");
200
+ q(L), Y(null);
201
+ }, Ee = async () => {
202
+ if (!K.reference.trim()) {
203
+ Y("Contract reference is required.");
199
204
  return;
200
205
  }
201
- if (!G.counterparty.trim()) {
202
- J("Counterparty is required.");
206
+ if (!K.counterparty.trim()) {
207
+ Y("Counterparty is required.");
203
208
  return;
204
209
  }
205
- J(null);
210
+ Y(null), ge("light"), _e();
206
211
  try {
207
- let e = await X.mutateAsync({
208
- reference: G.reference.trim(),
209
- counterparty: G.counterparty.trim(),
210
- commodity: G.commodity,
211
- side: G.side,
212
- pricingBasis: G.pricingBasis,
213
- pricePerUnit: G.pricePerUnit ? Number(G.pricePerUnit) : null,
214
- priceIndex: G.priceIndex.trim() || null,
215
- currency: G.currency.trim().toUpperCase() || "USD",
216
- contractedVolume: G.contractedVolume ? Number(G.contractedVolume) : null,
217
- unit: G.unit,
218
- deliveryLocation: G.deliveryLocation.trim() || null,
219
- startDate: a(G.startDate) ?? null,
220
- endDate: a(G.endDate) ?? null,
221
- notes: G.notes.trim() || null
212
+ let e = await Z.mutateAsync({
213
+ reference: K.reference.trim(),
214
+ counterparty: K.counterparty.trim(),
215
+ commodity: K.commodity,
216
+ side: K.side,
217
+ pricingBasis: K.pricingBasis,
218
+ pricePerUnit: K.pricePerUnit ? Number(K.pricePerUnit) : null,
219
+ priceIndex: K.priceIndex.trim() || null,
220
+ currency: K.currency.trim().toUpperCase() || "USD",
221
+ contractedVolume: K.contractedVolume ? Number(K.contractedVolume) : null,
222
+ unit: K.unit,
223
+ deliveryLocation: K.deliveryLocation.trim() || null,
224
+ startDate: a(K.startDate) ?? null,
225
+ endDate: a(K.endDate) ?? null,
226
+ notes: K.notes.trim() || null
222
227
  });
223
- L.success("Contract created"), W(!1), $(), P(`contracts/${e.id}`);
228
+ ve(e.id), z.success("Contract created"), G(!1), $(), R(`contracts/${e.id}`);
224
229
  } catch (e) {
225
- J(e instanceof Error ? e.message : "Failed to create contract."), L.fromError(e);
230
+ Y(e instanceof Error ? e.message : "Failed to create contract."), z.fromError(e);
226
231
  }
227
232
  };
228
- return /* @__PURE__ */ y(ee, {
229
- title: "Offtake Contracts",
230
- description: "Commodity purchase & sale agreements — pricing, contracted volume and delivery progress.",
231
- actions: /* @__PURE__ */ y(b, {
232
- onClick: () => W(!0),
233
- children: [/* @__PURE__ */ v(g, { className: "mr-1.5 h-4 w-4" }), " New contract"]
233
+ return /* @__PURE__ */ v(t, {
234
+ title: F("theglobalfuel.pages.contracts.title", "Offtake Contracts"),
235
+ description: F("theglobalfuel.pages.contracts.description", "Commodity purchase & sale agreements — pricing, contracted volume and delivery progress."),
236
+ dataTour: "theglobalfuel-contracts-page",
237
+ actions: /* @__PURE__ */ v(y, {
238
+ onClick: () => G(!0),
239
+ children: [/* @__PURE__ */ _(g, { className: "mr-1.5 h-4 w-4" }), " New contract"]
234
240
  }),
235
241
  children: [
236
- /* @__PURE__ */ y("div", {
242
+ /* @__PURE__ */ v("div", {
237
243
  className: "mb-5 flex flex-wrap items-center gap-3",
238
244
  children: [
239
- /* @__PURE__ */ v(re, {
240
- options: O,
241
- value: R,
245
+ /* @__PURE__ */ _(se, {
246
+ options: k,
247
+ value: B,
242
248
  onChange: (e) => {
243
- z(e), U.reset();
249
+ V(e), W.reset();
244
250
  }
245
251
  }),
246
- /* @__PURE__ */ y(C, {
247
- value: B,
252
+ /* @__PURE__ */ v(C, {
253
+ value: H,
248
254
  onValueChange: (e) => {
249
- V(e), U.reset();
255
+ ye(e), W.reset();
250
256
  },
251
- children: [/* @__PURE__ */ v(E, {
257
+ children: [/* @__PURE__ */ _(E, {
252
258
  className: "w-40",
253
259
  "aria-label": "Filter by side",
254
- children: /* @__PURE__ */ v(D, { placeholder: "All sides" })
255
- }), /* @__PURE__ */ y(w, { children: [/* @__PURE__ */ v(T, {
260
+ children: /* @__PURE__ */ _(D, { placeholder: "All sides" })
261
+ }), /* @__PURE__ */ v(w, { children: [/* @__PURE__ */ _(T, {
256
262
  value: "ALL",
257
263
  children: "All sides"
258
- }), k.map((e) => /* @__PURE__ */ v(T, {
264
+ }), A.map((e) => /* @__PURE__ */ _(T, {
259
265
  value: e,
260
- children: t(e)
266
+ children: n(e)
261
267
  }, e))] })]
262
268
  }),
263
- /* @__PURE__ */ y(C, {
264
- value: H,
269
+ /* @__PURE__ */ v(C, {
270
+ value: U,
265
271
  onValueChange: (e) => {
266
- pe(e), U.reset();
272
+ be(e), W.reset();
267
273
  },
268
- children: [/* @__PURE__ */ v(E, {
274
+ children: [/* @__PURE__ */ _(E, {
269
275
  className: "w-48",
270
276
  "aria-label": "Filter by commodity",
271
- children: /* @__PURE__ */ v(D, { placeholder: "All commodities" })
272
- }), /* @__PURE__ */ y(w, { children: [/* @__PURE__ */ v(T, {
277
+ children: /* @__PURE__ */ _(D, { placeholder: "All commodities" })
278
+ }), /* @__PURE__ */ v(w, { children: [/* @__PURE__ */ _(T, {
273
279
  value: "ALL",
274
280
  children: "All commodities"
275
- }), j.map((e) => /* @__PURE__ */ v(T, {
281
+ }), M.map((e) => /* @__PURE__ */ _(T, {
276
282
  value: e,
277
- children: t(e)
283
+ children: n(e)
278
284
  }, e))] })]
279
285
  })
280
286
  ]
281
287
  }),
282
- he ? /* @__PURE__ */ v(u, { label: "Loading contracts…" }) : ge ? /* @__PURE__ */ v(l, {
288
+ Se ? /* @__PURE__ */ _(ne, { label: "Loading contracts…" }) : Ce ? /* @__PURE__ */ _(te, {
283
289
  message: "Couldn't load contracts.",
284
- onRetry: () => _e()
285
- }) : Z.length === 0 ? /* @__PURE__ */ v(d, {
290
+ onRetry: () => we()
291
+ }) : Q.length === 0 ? /* @__PURE__ */ _(re, {
286
292
  illustration: "empty-data",
287
- icon: /* @__PURE__ */ v(h, { className: "h-10 w-10" }),
293
+ icon: /* @__PURE__ */ _(h, { className: "h-10 w-10" }),
288
294
  title: "No contracts yet",
289
- description: R === "ALL" && B === "ALL" && H === "ALL" ? "Create your first offtake contract to track pricing, volume and delivery." : "No contracts match these filters.",
290
- action: /* @__PURE__ */ y(b, {
291
- onClick: () => W(!0),
292
- children: [/* @__PURE__ */ v(g, { className: "mr-1.5 h-4 w-4" }), " New contract"]
295
+ description: B === "ALL" && H === "ALL" && U === "ALL" ? "Create your first offtake contract to track pricing, volume and delivery." : "No contracts match these filters.",
296
+ action: /* @__PURE__ */ v(y, {
297
+ onClick: () => G(!0),
298
+ children: [/* @__PURE__ */ _(g, { className: "mr-1.5 h-4 w-4" }), " New contract"]
293
299
  })
294
- }) : /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(c, {
295
- columns: Q,
296
- rows: Z,
300
+ }) : /* @__PURE__ */ v(ue, { children: [/* @__PURE__ */ _(c, {
301
+ columns: Te,
302
+ rows: Q,
297
303
  rowKey: (e) => e.id,
298
- onRowClick: (e) => P(`contracts/${e.id}`),
304
+ onRowClick: (e) => R(`contracts/${e.id}`),
299
305
  rowLabel: (e) => `Open ${e.reference}`
300
- }), /* @__PURE__ */ v(ie, {
301
- page: U.page,
302
- pageSize: N,
303
- itemCount: Z.length,
304
- hasMore: Y?.pageInfo?.hasMore ?? !1,
305
- onPageChange: U.onPageChange
306
+ }), /* @__PURE__ */ _(ce, {
307
+ page: W.page,
308
+ pageSize: P,
309
+ itemCount: Q.length,
310
+ hasMore: X?.pageInfo?.hasMore ?? !1,
311
+ onPageChange: W.onPageChange
306
312
  })] }),
307
- /* @__PURE__ */ v(oe, {
308
- open: me,
313
+ /* @__PURE__ */ _(S, {
314
+ open: xe,
309
315
  onOpenChange: (e) => {
310
- W(e), e || $();
316
+ G(e), e || $();
311
317
  },
312
- children: /* @__PURE__ */ y(se, { children: [/* @__PURE__ */ y(ue, { children: [/* @__PURE__ */ v(de, { children: "New offtake contract" }), /* @__PURE__ */ v(ce, { children: "Register a commodity purchase or sale agreement with a counterparty." })] }), /* @__PURE__ */ y("form", {
318
+ children: /* @__PURE__ */ v(de, { children: [/* @__PURE__ */ v(me, { children: [/* @__PURE__ */ _(he, { children: "New offtake contract" }), /* @__PURE__ */ _(fe, { children: "Register a commodity purchase or sale agreement with a counterparty." })] }), /* @__PURE__ */ v("form", {
313
319
  onSubmit: (e) => {
314
- e.preventDefault(), ve();
320
+ e.preventDefault(), Ee();
315
321
  },
316
- children: [/* @__PURE__ */ y("div", {
322
+ children: [/* @__PURE__ */ v("div", {
317
323
  className: "grid gap-4 py-2",
318
324
  children: [
319
- /* @__PURE__ */ y("div", {
325
+ /* @__PURE__ */ v("div", {
320
326
  className: "grid gap-2 sm:grid-cols-2",
321
- children: [/* @__PURE__ */ y("div", {
327
+ children: [/* @__PURE__ */ v("div", {
322
328
  className: "grid gap-1.5",
323
- children: [/* @__PURE__ */ v(S, {
329
+ children: [/* @__PURE__ */ _(x, {
324
330
  htmlFor: "reference",
325
331
  children: "Reference *"
326
- }), /* @__PURE__ */ v(x, {
332
+ }), /* @__PURE__ */ _(b, {
327
333
  id: "reference",
328
- value: G.reference,
329
- onChange: (e) => K({
330
- ...G,
334
+ value: K.reference,
335
+ onChange: (e) => q({
336
+ ...K,
331
337
  reference: e.target.value
332
338
  }),
333
339
  placeholder: "OFT-2026-0142"
334
340
  })]
335
- }), /* @__PURE__ */ y("div", {
341
+ }), /* @__PURE__ */ v("div", {
336
342
  className: "grid gap-1.5",
337
- children: [/* @__PURE__ */ v(S, {
343
+ children: [/* @__PURE__ */ _(x, {
338
344
  htmlFor: "counterparty",
339
345
  children: "Counterparty *"
340
- }), /* @__PURE__ */ v(x, {
346
+ }), /* @__PURE__ */ _(b, {
341
347
  id: "counterparty",
342
- value: G.counterparty,
343
- onChange: (e) => K({
344
- ...G,
348
+ value: K.counterparty,
349
+ onChange: (e) => q({
350
+ ...K,
345
351
  counterparty: e.target.value
346
352
  }),
347
353
  placeholder: "Vitol S.A."
348
354
  })]
349
355
  })]
350
356
  }),
351
- /* @__PURE__ */ y("div", {
357
+ /* @__PURE__ */ v("div", {
352
358
  className: "grid gap-2 sm:grid-cols-2",
353
- children: [/* @__PURE__ */ y("div", {
359
+ children: [/* @__PURE__ */ v("div", {
354
360
  className: "grid gap-1.5",
355
- children: [/* @__PURE__ */ v(S, {
361
+ children: [/* @__PURE__ */ _(x, {
356
362
  htmlFor: "commodity",
357
363
  children: "Commodity *"
358
- }), /* @__PURE__ */ y(C, {
359
- value: G.commodity,
360
- onValueChange: (e) => K({
361
- ...G,
364
+ }), /* @__PURE__ */ v(C, {
365
+ value: K.commodity,
366
+ onValueChange: (e) => q({
367
+ ...K,
362
368
  commodity: e
363
369
  }),
364
- children: [/* @__PURE__ */ v(E, {
370
+ children: [/* @__PURE__ */ _(E, {
365
371
  id: "commodity",
366
- children: /* @__PURE__ */ v(D, {})
367
- }), /* @__PURE__ */ v(w, { children: j.map((e) => /* @__PURE__ */ v(T, {
372
+ children: /* @__PURE__ */ _(D, {})
373
+ }), /* @__PURE__ */ _(w, { children: M.map((e) => /* @__PURE__ */ _(T, {
368
374
  value: e,
369
- children: t(e)
375
+ children: n(e)
370
376
  }, e)) })]
371
377
  })]
372
- }), /* @__PURE__ */ y("div", {
378
+ }), /* @__PURE__ */ v("div", {
373
379
  className: "grid gap-1.5",
374
- children: [/* @__PURE__ */ v(S, {
380
+ children: [/* @__PURE__ */ _(x, {
375
381
  htmlFor: "side",
376
382
  children: "Side"
377
- }), /* @__PURE__ */ y(C, {
378
- value: G.side,
379
- onValueChange: (e) => K({
380
- ...G,
383
+ }), /* @__PURE__ */ v(C, {
384
+ value: K.side,
385
+ onValueChange: (e) => q({
386
+ ...K,
381
387
  side: e
382
388
  }),
383
- children: [/* @__PURE__ */ v(E, {
389
+ children: [/* @__PURE__ */ _(E, {
384
390
  id: "side",
385
- children: /* @__PURE__ */ v(D, {})
386
- }), /* @__PURE__ */ v(w, { children: k.map((e) => /* @__PURE__ */ v(T, {
391
+ children: /* @__PURE__ */ _(D, {})
392
+ }), /* @__PURE__ */ _(w, { children: A.map((e) => /* @__PURE__ */ _(T, {
387
393
  value: e,
388
- children: t(e)
394
+ children: n(e)
389
395
  }, e)) })]
390
396
  })]
391
397
  })]
392
398
  }),
393
- /* @__PURE__ */ y("div", {
399
+ /* @__PURE__ */ v("div", {
394
400
  className: "grid gap-2 sm:grid-cols-2",
395
- children: [/* @__PURE__ */ y("div", {
401
+ children: [/* @__PURE__ */ v("div", {
396
402
  className: "grid gap-1.5",
397
- children: [/* @__PURE__ */ v(S, {
403
+ children: [/* @__PURE__ */ _(x, {
398
404
  htmlFor: "pricingBasis",
399
405
  children: "Pricing basis"
400
- }), /* @__PURE__ */ y(C, {
401
- value: G.pricingBasis,
402
- onValueChange: (e) => K({
403
- ...G,
406
+ }), /* @__PURE__ */ v(C, {
407
+ value: K.pricingBasis,
408
+ onValueChange: (e) => q({
409
+ ...K,
404
410
  pricingBasis: e
405
411
  }),
406
- children: [/* @__PURE__ */ v(E, {
412
+ children: [/* @__PURE__ */ _(E, {
407
413
  id: "pricingBasis",
408
- children: /* @__PURE__ */ v(D, {})
409
- }), /* @__PURE__ */ v(w, { children: A.map((e) => /* @__PURE__ */ v(T, {
414
+ children: /* @__PURE__ */ _(D, {})
415
+ }), /* @__PURE__ */ _(w, { children: j.map((e) => /* @__PURE__ */ _(T, {
410
416
  value: e,
411
- children: t(e)
417
+ children: n(e)
412
418
  }, e)) })]
413
419
  })]
414
- }), /* @__PURE__ */ y("div", {
420
+ }), /* @__PURE__ */ v("div", {
415
421
  className: "grid gap-1.5",
416
- children: [/* @__PURE__ */ v(S, {
422
+ children: [/* @__PURE__ */ _(x, {
417
423
  htmlFor: "priceIndex",
418
424
  children: "Price index"
419
- }), /* @__PURE__ */ v(x, {
425
+ }), /* @__PURE__ */ _(b, {
420
426
  id: "priceIndex",
421
- value: G.priceIndex,
422
- onChange: (e) => K({
423
- ...G,
427
+ value: K.priceIndex,
428
+ onChange: (e) => q({
429
+ ...K,
424
430
  priceIndex: e.target.value
425
431
  }),
426
432
  placeholder: "Brent, TTF, Henry Hub"
427
433
  })]
428
434
  })]
429
435
  }),
430
- /* @__PURE__ */ y("div", {
436
+ /* @__PURE__ */ v("div", {
431
437
  className: "grid gap-2 sm:grid-cols-3",
432
438
  children: [
433
- /* @__PURE__ */ y("div", {
439
+ /* @__PURE__ */ v("div", {
434
440
  className: "grid gap-1.5",
435
- children: [/* @__PURE__ */ v(S, {
441
+ children: [/* @__PURE__ */ _(x, {
436
442
  htmlFor: "pricePerUnit",
437
443
  children: "Price / unit"
438
- }), /* @__PURE__ */ v(x, {
444
+ }), /* @__PURE__ */ _(b, {
439
445
  id: "pricePerUnit",
440
446
  type: "number",
441
447
  min: "0",
442
448
  step: "any",
443
- value: G.pricePerUnit,
444
- onChange: (e) => K({
445
- ...G,
449
+ value: K.pricePerUnit,
450
+ onChange: (e) => q({
451
+ ...K,
446
452
  pricePerUnit: e.target.value
447
453
  }),
448
454
  placeholder: "82.50"
449
455
  })]
450
456
  }),
451
- /* @__PURE__ */ y("div", {
457
+ /* @__PURE__ */ v("div", {
452
458
  className: "grid gap-1.5",
453
- children: [/* @__PURE__ */ v(S, {
459
+ children: [/* @__PURE__ */ _(x, {
454
460
  htmlFor: "currency",
455
461
  children: "Currency"
456
- }), /* @__PURE__ */ v(x, {
462
+ }), /* @__PURE__ */ _(b, {
457
463
  id: "currency",
458
- value: G.currency,
459
- onChange: (e) => K({
460
- ...G,
464
+ value: K.currency,
465
+ onChange: (e) => q({
466
+ ...K,
461
467
  currency: e.target.value
462
468
  }),
463
469
  placeholder: "USD"
464
470
  })]
465
471
  }),
466
- /* @__PURE__ */ y("div", {
472
+ /* @__PURE__ */ v("div", {
467
473
  className: "grid gap-1.5",
468
- children: [/* @__PURE__ */ v(S, {
474
+ children: [/* @__PURE__ */ _(x, {
469
475
  htmlFor: "unit",
470
476
  children: "Unit"
471
- }), /* @__PURE__ */ y(C, {
472
- value: G.unit,
473
- onValueChange: (e) => K({
474
- ...G,
477
+ }), /* @__PURE__ */ v(C, {
478
+ value: K.unit,
479
+ onValueChange: (e) => q({
480
+ ...K,
475
481
  unit: e
476
482
  }),
477
- children: [/* @__PURE__ */ v(E, {
483
+ children: [/* @__PURE__ */ _(E, {
478
484
  id: "unit",
479
- children: /* @__PURE__ */ v(D, {})
480
- }), /* @__PURE__ */ v(w, { children: M.map((e) => /* @__PURE__ */ v(T, {
485
+ children: /* @__PURE__ */ _(D, {})
486
+ }), /* @__PURE__ */ _(w, { children: N.map((e) => /* @__PURE__ */ _(T, {
481
487
  value: e,
482
488
  children: r(e)
483
489
  }, e)) })]
@@ -485,105 +491,105 @@ function L() {
485
491
  })
486
492
  ]
487
493
  }),
488
- /* @__PURE__ */ y("div", {
494
+ /* @__PURE__ */ v("div", {
489
495
  className: "grid gap-2 sm:grid-cols-2",
490
- children: [/* @__PURE__ */ y("div", {
496
+ children: [/* @__PURE__ */ v("div", {
491
497
  className: "grid gap-1.5",
492
- children: [/* @__PURE__ */ v(S, {
498
+ children: [/* @__PURE__ */ _(x, {
493
499
  htmlFor: "contractedVolume",
494
500
  children: "Contracted volume"
495
- }), /* @__PURE__ */ v(x, {
501
+ }), /* @__PURE__ */ _(b, {
496
502
  id: "contractedVolume",
497
503
  type: "number",
498
504
  min: "0",
499
505
  step: "any",
500
- value: G.contractedVolume,
501
- onChange: (e) => K({
502
- ...G,
506
+ value: K.contractedVolume,
507
+ onChange: (e) => q({
508
+ ...K,
503
509
  contractedVolume: e.target.value
504
510
  }),
505
511
  placeholder: "500000"
506
512
  })]
507
- }), /* @__PURE__ */ y("div", {
513
+ }), /* @__PURE__ */ v("div", {
508
514
  className: "grid gap-1.5",
509
- children: [/* @__PURE__ */ v(S, {
515
+ children: [/* @__PURE__ */ _(x, {
510
516
  htmlFor: "deliveryLocation",
511
517
  children: "Delivery location"
512
- }), /* @__PURE__ */ v(x, {
518
+ }), /* @__PURE__ */ _(b, {
513
519
  id: "deliveryLocation",
514
- value: G.deliveryLocation,
515
- onChange: (e) => K({
516
- ...G,
520
+ value: K.deliveryLocation,
521
+ onChange: (e) => q({
522
+ ...K,
517
523
  deliveryLocation: e.target.value
518
524
  }),
519
525
  placeholder: "Rotterdam"
520
526
  })]
521
527
  })]
522
528
  }),
523
- /* @__PURE__ */ y("div", {
529
+ /* @__PURE__ */ v("div", {
524
530
  className: "grid gap-2 sm:grid-cols-2",
525
- children: [/* @__PURE__ */ y("div", {
531
+ children: [/* @__PURE__ */ v("div", {
526
532
  className: "grid gap-1.5",
527
- children: [/* @__PURE__ */ v(S, {
533
+ children: [/* @__PURE__ */ _(x, {
528
534
  htmlFor: "startDate",
529
535
  children: "Start date"
530
- }), /* @__PURE__ */ v(x, {
536
+ }), /* @__PURE__ */ _(b, {
531
537
  id: "startDate",
532
538
  type: "date",
533
- value: G.startDate,
534
- onChange: (e) => K({
535
- ...G,
539
+ value: K.startDate,
540
+ onChange: (e) => q({
541
+ ...K,
536
542
  startDate: e.target.value
537
543
  })
538
544
  })]
539
- }), /* @__PURE__ */ y("div", {
545
+ }), /* @__PURE__ */ v("div", {
540
546
  className: "grid gap-1.5",
541
- children: [/* @__PURE__ */ v(S, {
547
+ children: [/* @__PURE__ */ _(x, {
542
548
  htmlFor: "endDate",
543
549
  children: "End date"
544
- }), /* @__PURE__ */ v(x, {
550
+ }), /* @__PURE__ */ _(b, {
545
551
  id: "endDate",
546
552
  type: "date",
547
- value: G.endDate,
548
- onChange: (e) => K({
549
- ...G,
553
+ value: K.endDate,
554
+ onChange: (e) => q({
555
+ ...K,
550
556
  endDate: e.target.value
551
557
  })
552
558
  })]
553
559
  })]
554
560
  }),
555
- /* @__PURE__ */ y("div", {
561
+ /* @__PURE__ */ v("div", {
556
562
  className: "grid gap-1.5",
557
- children: [/* @__PURE__ */ v(S, {
563
+ children: [/* @__PURE__ */ _(x, {
558
564
  htmlFor: "notes",
559
565
  children: "Notes"
560
- }), /* @__PURE__ */ v(fe, {
566
+ }), /* @__PURE__ */ _(O, {
561
567
  id: "notes",
562
568
  rows: 2,
563
- value: G.notes,
564
- onChange: (e) => K({
565
- ...G,
569
+ value: K.notes,
570
+ onChange: (e) => q({
571
+ ...K,
566
572
  notes: e.target.value
567
573
  }),
568
574
  placeholder: "Optional context about this contract."
569
575
  })]
570
576
  }),
571
- q && /* @__PURE__ */ v("p", {
577
+ J && /* @__PURE__ */ _("p", {
572
578
  className: "text-sm text-status-error-text",
573
- children: q
579
+ children: J
574
580
  })
575
581
  ]
576
- }), /* @__PURE__ */ y(le, { children: [/* @__PURE__ */ v(b, {
582
+ }), /* @__PURE__ */ v(pe, { children: [/* @__PURE__ */ _(y, {
577
583
  type: "button",
578
584
  variant: "outline",
579
585
  onClick: () => {
580
- W(!1), $();
586
+ G(!1), $();
581
587
  },
582
588
  children: "Cancel"
583
- }), /* @__PURE__ */ v(b, {
589
+ }), /* @__PURE__ */ _(y, {
584
590
  type: "submit",
585
- disabled: X.isPending,
586
- children: X.isPending ? "Creating…" : "Create contract"
591
+ disabled: Z.isPending,
592
+ children: Z.isPending ? "Creating…" : "Create contract"
587
593
  })] })]
588
594
  })] })
589
595
  })
@@ -591,6 +597,6 @@ function L() {
591
597
  });
592
598
  }
593
599
  //#endregion
594
- export { L as ContractsPage };
600
+ export { R as ContractsPage };
595
601
 
596
602
  //# sourceMappingURL=ContractsPage.js.map