@burdenoff/microfe-theglobalfuel 2026.1014.1 → 2026.1022.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.
Files changed (53) hide show
  1. package/dist/theglobalfuel/components/viz/AvatarStack.js +1 -0
  2. package/dist/theglobalfuel/components/viz/CertificateCard.js +1 -0
  3. package/dist/theglobalfuel/components/viz/HBarFunnel.js +1 -0
  4. package/dist/theglobalfuel/components/viz/Heatmap.js +1 -0
  5. package/dist/theglobalfuel/components/viz/KanbanBoard.js +1 -0
  6. package/dist/theglobalfuel/components/viz/OrgTree.js +1 -0
  7. package/dist/theglobalfuel/components/viz/ProgressRing.js +1 -0
  8. package/dist/theglobalfuel/components/viz/RatingStars.js +1 -0
  9. package/dist/theglobalfuel/components/viz/SegmentedTabs.js +1 -0
  10. package/dist/theglobalfuel/components/viz/SkillBar.js +1 -0
  11. package/dist/theglobalfuel/components/viz/lib/Avatar.js +1 -0
  12. package/dist/theglobalfuel/hooks/useTheComments.d.ts +2 -2
  13. package/dist/theglobalfuel/hooks/useTheComments.d.ts.map +1 -1
  14. package/dist/theglobalfuel/hooks/useTheFiles.d.ts +1 -1
  15. package/dist/theglobalfuel/hooks/useTheFiles.d.ts.map +1 -1
  16. package/dist/theglobalfuel/hooks/useTheGlobalFuelApi.d.ts +16 -16
  17. package/dist/theglobalfuel/hooks/useTheGlobalFuelApi.d.ts.map +1 -1
  18. package/dist/theglobalfuel/hooks/useTheTags.d.ts +2 -2
  19. package/dist/theglobalfuel/hooks/useTheTags.d.ts.map +1 -1
  20. package/dist/theglobalfuel/index.js +1 -0
  21. package/dist/theglobalfuel/pages/alerts/AlertsPage.js +1 -0
  22. package/dist/theglobalfuel/pages/alerts/AlertsPage.js.map +1 -1
  23. package/dist/theglobalfuel/pages/analytics/AnalyticsPage.js +1 -0
  24. package/dist/theglobalfuel/pages/analytics/AnalyticsPage.js.map +1 -1
  25. package/dist/theglobalfuel/pages/assets/AssetDetailPage.js +1 -0
  26. package/dist/theglobalfuel/pages/assets/AssetDetailPage.js.map +1 -1
  27. package/dist/theglobalfuel/pages/assets/AssetsPage.d.ts.map +1 -1
  28. package/dist/theglobalfuel/pages/assets/AssetsPage.js +4 -0
  29. package/dist/theglobalfuel/pages/assets/AssetsPage.js.map +1 -1
  30. package/dist/theglobalfuel/pages/compliance/CompliancePage.js +1 -0
  31. package/dist/theglobalfuel/pages/compliance/CompliancePage.js.map +1 -1
  32. package/dist/theglobalfuel/pages/contracts/ContractDetailPage.js +1 -0
  33. package/dist/theglobalfuel/pages/contracts/ContractDetailPage.js.map +1 -1
  34. package/dist/theglobalfuel/pages/contracts/ContractsPage.js +1 -0
  35. package/dist/theglobalfuel/pages/contracts/ContractsPage.js.map +1 -1
  36. package/dist/theglobalfuel/pages/esg-disclosures/EsgDisclosuresPage.js +1 -0
  37. package/dist/theglobalfuel/pages/esg-disclosures/EsgDisclosuresPage.js.map +1 -1
  38. package/dist/theglobalfuel/pages/inventory/InventoryPage.js +1 -0
  39. package/dist/theglobalfuel/pages/inventory/InventoryPage.js.map +1 -1
  40. package/dist/theglobalfuel/pages/production/ProductionPage.js +1 -0
  41. package/dist/theglobalfuel/pages/production/ProductionPage.js.map +1 -1
  42. package/dist/theglobalfuel/pages/provenance/ProvenancePage.js +1 -0
  43. package/dist/theglobalfuel/pages/provenance/ProvenancePage.js.map +1 -1
  44. package/dist/theglobalfuel/pages/reports/ReportsPage.js +1 -0
  45. package/dist/theglobalfuel/pages/reports/ReportsPage.js.map +1 -1
  46. package/dist/theglobalfuel/pages/reserves/ReservesPage.js +1 -0
  47. package/dist/theglobalfuel/pages/reserves/ReservesPage.js.map +1 -1
  48. package/dist/theglobalfuel/pages/shipments/ShipmentsPage.js +1 -0
  49. package/dist/theglobalfuel/pages/shipments/ShipmentsPage.js.map +1 -1
  50. package/dist/theglobalfuel/utils/cn.js +2 -2
  51. package/dist/theglobalfuel/utils/index.js +7 -0
  52. package/dist/theglobalfuel/utils/provenance.js +1 -1
  53. package/package.json +1 -1
@@ -1,2 +1,3 @@
1
+ import "../../utils/cn.js";
1
2
  import "./lib/Avatar.js";
2
3
  import "react/jsx-runtime";
@@ -1,3 +1,4 @@
1
+ import "../../utils/cn.js";
1
2
  import "./lib/palette.js";
2
3
  import "lucide-react";
3
4
  import "react/jsx-runtime";
@@ -1,3 +1,4 @@
1
+ import "../../utils/cn.js";
1
2
  import "./lib/palette.js";
2
3
  import "./lib/hooks.js";
3
4
  import "react/jsx-runtime";
@@ -1,3 +1,4 @@
1
+ import "../../utils/cn.js";
1
2
  import "./lib/palette.js";
2
3
  import "./lib/hooks.js";
3
4
  import "react/jsx-runtime";
@@ -1,2 +1,3 @@
1
+ import "../../utils/cn.js";
1
2
  import "./lib/palette.js";
2
3
  import "react/jsx-runtime";
@@ -1,2 +1,3 @@
1
+ import "../../utils/cn.js";
1
2
  import "./lib/Avatar.js";
2
3
  import "react/jsx-runtime";
@@ -1,3 +1,4 @@
1
+ import "../../utils/cn.js";
1
2
  import "./lib/palette.js";
2
3
  import "./lib/hooks.js";
3
4
  import "react/jsx-runtime";
@@ -1,3 +1,4 @@
1
+ import "../../utils/cn.js";
1
2
  import "./lib/palette.js";
2
3
  import "lucide-react";
3
4
  import "react/jsx-runtime";
@@ -1,3 +1,4 @@
1
+ import "../../utils/cn.js";
1
2
  import "./lib/palette.js";
2
3
  import "react";
3
4
  import "react/jsx-runtime";
@@ -1,3 +1,4 @@
1
+ import "../../utils/cn.js";
1
2
  import "./lib/palette.js";
2
3
  import "./lib/hooks.js";
3
4
  import "react/jsx-runtime";
@@ -1 +1,2 @@
1
+ import "../../../utils/cn.js";
1
2
  import "react/jsx-runtime";
@@ -26,10 +26,10 @@ export interface TheComment {
26
26
  replyCount: number;
27
27
  }
28
28
  /** Top-level (root) comments for an eco entity, oldest first. */
29
- export declare const useTheComments: (entityType: string, entityId: string | undefined) => import('@tanstack/react-query').UseQueryResult<NoInfer<{
29
+ export declare const useTheComments: (entityType: string, entityId: string | undefined) => import('@tanstack/react-query').UseQueryResult<{
30
30
  items: TheComment[];
31
31
  total: number;
32
- }>, Error>;
32
+ }, Error>;
33
33
  export declare const useTheCreateComment: (entityType: string, entityId: string) => import('@tanstack/react-query').UseMutationResult<{
34
34
  id: string;
35
35
  }, Error, string, unknown>;
@@ -1 +1 @@
1
- {"version":3,"file":"useTheComments.d.ts","sourceRoot":"","sources":["../../../src/theglobalfuel/hooks/useTheComments.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAOH,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE;QACP,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;QACpB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;KACzB,CAAC;IACF,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,OAAO,CAAC;IAChB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,UAAU,EAAE,MAAM,CAAC;CACpB;AAKD,iEAAiE;AACjE,eAAO,MAAM,cAAc,GAAI,YAAY,MAAM,EAAE,UAAU,MAAM,GAAG,SAAS;;;UAwC9E,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,YAAY,MAAM,EAAE,UAAU,MAAM;QAKN,MAAM;0BAmBvE,CAAC"}
1
+ {"version":3,"file":"useTheComments.d.ts","sourceRoot":"","sources":["../../../src/theglobalfuel/hooks/useTheComments.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAOH,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE;QACP,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;QACpB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;KACzB,CAAC;IACF,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,OAAO,CAAC;IAChB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,UAAU,EAAE,MAAM,CAAC;CACpB;AAKD,iEAAiE;AACjE,eAAO,MAAM,cAAc,GAAI,YAAY,MAAM,EAAE,UAAU,MAAM,GAAG,SAAS;;;SAwC9E,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,YAAY,MAAM,EAAE,UAAU,MAAM;QAKN,MAAM;0BAmBvE,CAAC"}
@@ -43,5 +43,5 @@ export interface TheFileMeta {
43
43
  mimeType: string;
44
44
  size: string;
45
45
  }
46
- export declare const useTheFile: (id: string | null | undefined) => import('@tanstack/react-query').UseQueryResult<NoInfer<TheFileMeta | null>, Error>;
46
+ export declare const useTheFile: (id: string | null | undefined) => import('@tanstack/react-query').UseQueryResult<TheFileMeta | null, Error>;
47
47
  //# sourceMappingURL=useTheFiles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useTheFiles.d.ts","sourceRoot":"","sources":["../../../src/theglobalfuel/hooks/useTheFiles.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AA8BH,8EAA8E;AAC9E,eAAO,MAAM,WAAW,GAAU,KAAK,EACrC,OAAO,MAAM,EACb,WAAW,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAClC,UAAU,MAAM,KACf,OAAO,CAAC,KAAK,CAmBf,CAAC;AAMF,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB;AA+BD,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,eAAe,CAAC,CAAC;IACjD,WAAW,EAAE,OAAO,CAAC;IACrB,iDAAiD;IACjD,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,KAA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MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,eAAO,MAAM,UAAU,GAAI,IAAI,MAAM,GAAG,IAAI,GAAG,SAAS,8EAsBvD,CAAC"}
@@ -6,8 +6,8 @@ export interface AssetFilters {
6
6
  status?: TheAssetStatus;
7
7
  pagination?: PaginationInput;
8
8
  }
9
- export declare const useTheAssets: (filters?: AssetFilters) => import('@tanstack/react-query').UseQueryResult<NoInfer<TheConnection<TheAsset>>, Error>;
10
- export declare const useTheAsset: (id: string | undefined) => import('@tanstack/react-query').UseQueryResult<NoInfer<TheAsset | null>, Error>;
9
+ export declare const useTheAssets: (filters?: AssetFilters) => import('@tanstack/react-query').UseQueryResult<TheConnection<TheAsset>, Error>;
10
+ export declare const useTheAsset: (id: string | undefined) => import('@tanstack/react-query').UseQueryResult<TheAsset | null, Error>;
11
11
  export declare const useTheCreateAsset: () => import('@tanstack/react-query').UseMutationResult<TheAsset, Error, TheCreateAssetInput, unknown>;
12
12
  export declare const useTheUpdateAsset: () => import('@tanstack/react-query').UseMutationResult<TheAsset, Error, {
13
13
  id: string;
@@ -22,9 +22,9 @@ export interface ProductionFilters {
22
22
  assetId?: string;
23
23
  pagination?: PaginationInput;
24
24
  }
25
- export declare const useTheProductionRecords: (filters?: ProductionFilters) => import('@tanstack/react-query').UseQueryResult<NoInfer<TheConnection<TheProductionRecord>>, Error>;
25
+ export declare const useTheProductionRecords: (filters?: ProductionFilters) => import('@tanstack/react-query').UseQueryResult<TheConnection<TheProductionRecord>, Error>;
26
26
  export declare const useTheRecordProduction: () => import('@tanstack/react-query').UseMutationResult<TheProductionRecord, Error, TheRecordProductionInput, unknown>;
27
- export declare const useTheReserveEstimates: (assetId?: string, category?: TheReserveCategory, pagination?: PaginationInput) => import('@tanstack/react-query').UseQueryResult<NoInfer<TheConnection<TheReserveEstimate>>, Error>;
27
+ export declare const useTheReserveEstimates: (assetId?: string, category?: TheReserveCategory, pagination?: PaginationInput) => import('@tanstack/react-query').UseQueryResult<TheConnection<TheReserveEstimate>, Error>;
28
28
  export declare const useTheCreateReserveEstimate: () => import('@tanstack/react-query').UseMutationResult<TheReserveEstimate, Error, TheCreateReserveEstimateInput, unknown>;
29
29
  export interface ContractFilters {
30
30
  commodity?: TheCommodityType;
@@ -32,8 +32,8 @@ export interface ContractFilters {
32
32
  status?: TheContractStatus;
33
33
  pagination?: PaginationInput;
34
34
  }
35
- export declare const useTheContracts: (filters?: ContractFilters) => import('@tanstack/react-query').UseQueryResult<NoInfer<TheConnection<TheOfftakeContract>>, Error>;
36
- export declare const useTheContract: (id: string | undefined) => import('@tanstack/react-query').UseQueryResult<NoInfer<TheOfftakeContract | null>, Error>;
35
+ export declare const useTheContracts: (filters?: ContractFilters) => import('@tanstack/react-query').UseQueryResult<TheConnection<TheOfftakeContract>, Error>;
36
+ export declare const useTheContract: (id: string | undefined) => import('@tanstack/react-query').UseQueryResult<TheOfftakeContract | null, Error>;
37
37
  export declare const useTheCreateContract: () => import('@tanstack/react-query').UseMutationResult<TheOfftakeContract, Error, TheCreateOfftakeContractInput, unknown>;
38
38
  export declare const useTheUpdateContract: () => import('@tanstack/react-query').UseMutationResult<TheOfftakeContract, Error, {
39
39
  id: string;
@@ -43,7 +43,7 @@ export declare const useTheTransitionContract: () => import('@tanstack/react-que
43
43
  id: string;
44
44
  status: TheContractStatus;
45
45
  }, unknown>;
46
- export declare const useTheShipments: (contractId?: string, status?: TheShipmentStatus, pagination?: PaginationInput) => import('@tanstack/react-query').UseQueryResult<NoInfer<TheConnection<TheShipment>>, Error>;
46
+ export declare const useTheShipments: (contractId?: string, status?: TheShipmentStatus, pagination?: PaginationInput) => import('@tanstack/react-query').UseQueryResult<TheConnection<TheShipment>, Error>;
47
47
  export declare const useTheTransitionShipment: () => import('@tanstack/react-query').UseMutationResult<TheShipment, Error, {
48
48
  id: string;
49
49
  status: TheShipmentStatus;
@@ -64,7 +64,7 @@ export interface InventoryFilters {
64
64
  status?: TheInventoryStatus;
65
65
  pagination?: PaginationInput;
66
66
  }
67
- export declare const useTheInventoryLots: (filters?: InventoryFilters) => import('@tanstack/react-query').UseQueryResult<NoInfer<TheConnection<TheInventoryLot>>, Error>;
67
+ export declare const useTheInventoryLots: (filters?: InventoryFilters) => import('@tanstack/react-query').UseQueryResult<TheConnection<TheInventoryLot>, Error>;
68
68
  export declare const useTheCreateInventoryLot: () => import('@tanstack/react-query').UseMutationResult<TheInventoryLot, Error, TheCreateInventoryLotInput, unknown>;
69
69
  export declare const useTheSetInventoryLotStatus: () => import('@tanstack/react-query').UseMutationResult<TheInventoryLot, Error, {
70
70
  id: string;
@@ -75,11 +75,11 @@ export interface EmissionFilters {
75
75
  scope?: TheEmissionScope;
76
76
  pagination?: PaginationInput;
77
77
  }
78
- export declare const useTheEmissionRecords: (filters?: EmissionFilters) => import('@tanstack/react-query').UseQueryResult<NoInfer<TheConnection<TheEmissionRecord>>, Error>;
78
+ export declare const useTheEmissionRecords: (filters?: EmissionFilters) => import('@tanstack/react-query').UseQueryResult<TheConnection<TheEmissionRecord>, Error>;
79
79
  export declare const useTheRecordEmission: () => import('@tanstack/react-query').UseMutationResult<TheEmissionRecord, Error, TheRecordEmissionInput, unknown>;
80
80
  export declare const useTheVerifyEmission: () => import('@tanstack/react-query').UseMutationResult<TheEmissionRecord, Error, string, unknown>;
81
- export declare const useTheComplianceCerts: (assetId?: string, category?: TheComplianceCategory, status?: TheComplianceStatus, pagination?: PaginationInput) => import('@tanstack/react-query').UseQueryResult<NoInfer<TheConnection<TheComplianceCert>>, Error>;
82
- export declare const useTheComplianceCert: (id: string | undefined) => import('@tanstack/react-query').UseQueryResult<NoInfer<TheComplianceCert | null>, Error>;
81
+ export declare const useTheComplianceCerts: (assetId?: string, category?: TheComplianceCategory, status?: TheComplianceStatus, pagination?: PaginationInput) => import('@tanstack/react-query').UseQueryResult<TheConnection<TheComplianceCert>, Error>;
82
+ export declare const useTheComplianceCert: (id: string | undefined) => import('@tanstack/react-query').UseQueryResult<TheComplianceCert | null, Error>;
83
83
  export declare const useTheCreateComplianceCert: () => import('@tanstack/react-query').UseMutationResult<TheComplianceCert, Error, TheCreateComplianceCertInput, unknown>;
84
84
  export declare const useTheTransitionComplianceCert: () => import('@tanstack/react-query').UseMutationResult<TheComplianceCert, Error, {
85
85
  id: string;
@@ -92,8 +92,8 @@ export interface SafetyIncidentFilters {
92
92
  status?: TheSafetyIncidentStatus;
93
93
  pagination?: PaginationInput;
94
94
  }
95
- export declare const useTheSafetyIncidents: (filters?: SafetyIncidentFilters) => import('@tanstack/react-query').UseQueryResult<NoInfer<TheConnection<TheSafetyIncident>>, Error>;
96
- export declare const useTheSafetyIncident: (id: string | undefined) => import('@tanstack/react-query').UseQueryResult<NoInfer<TheSafetyIncident | null>, Error>;
95
+ export declare const useTheSafetyIncidents: (filters?: SafetyIncidentFilters) => import('@tanstack/react-query').UseQueryResult<TheConnection<TheSafetyIncident>, Error>;
96
+ export declare const useTheSafetyIncident: (id: string | undefined) => import('@tanstack/react-query').UseQueryResult<TheSafetyIncident | null, Error>;
97
97
  export declare const useTheReportSafetyIncident: () => import('@tanstack/react-query').UseMutationResult<TheSafetyIncident, Error, TheReportSafetyIncidentInput, unknown>;
98
98
  export declare const useTheTransitionSafetyIncident: () => import('@tanstack/react-query').UseMutationResult<TheSafetyIncident, Error, {
99
99
  id: string;
@@ -103,18 +103,18 @@ export declare const useTheUpdateIncidentInvestigation: () => import('@tanstack/
103
103
  id: string;
104
104
  investigationNotes: string;
105
105
  }, unknown>;
106
- export declare const useTheCorrectiveActions: (incidentId?: string, status?: TheCorrectiveActionStatus, pagination?: PaginationInput) => import('@tanstack/react-query').UseQueryResult<NoInfer<TheConnection<TheCorrectiveAction>>, Error>;
106
+ export declare const useTheCorrectiveActions: (incidentId?: string, status?: TheCorrectiveActionStatus, pagination?: PaginationInput) => import('@tanstack/react-query').UseQueryResult<TheConnection<TheCorrectiveAction>, Error>;
107
107
  export declare const useTheCreateCorrectiveAction: () => import('@tanstack/react-query').UseMutationResult<TheCorrectiveAction, Error, TheCreateCorrectiveActionInput, unknown>;
108
108
  export declare const useTheTransitionCorrectiveAction: () => import('@tanstack/react-query').UseMutationResult<TheCorrectiveAction, Error, {
109
109
  id: string;
110
110
  status: TheCorrectiveActionStatus;
111
111
  }, unknown>;
112
- export declare const useTheSafetyDashboard: () => import('@tanstack/react-query').UseQueryResult<NoInfer<TheSafetyDashboard>, Error>;
112
+ export declare const useTheSafetyDashboard: () => import('@tanstack/react-query').UseQueryResult<TheSafetyDashboard, Error>;
113
113
  export interface EsgDisclosureFilters {
114
114
  framework?: TheEsgFramework;
115
115
  pagination?: PaginationInput;
116
116
  }
117
- export declare const useTheEsgDisclosures: (filters?: EsgDisclosureFilters) => import('@tanstack/react-query').UseQueryResult<NoInfer<TheConnection<TheEsgDisclosure>>, Error>;
117
+ export declare const useTheEsgDisclosures: (filters?: EsgDisclosureFilters) => import('@tanstack/react-query').UseQueryResult<TheConnection<TheEsgDisclosure>, Error>;
118
118
  export declare const useTheGenerateEsgDisclosure: () => import('@tanstack/react-query').UseMutationResult<TheEsgDisclosure, Error, TheGenerateEsgDisclosureInput, unknown>;
119
119
  export declare const useTheFinalizeEsgDisclosure: () => import('@tanstack/react-query').UseMutationResult<TheEsgDisclosure, Error, string, unknown>;
120
120
  //# sourceMappingURL=useTheGlobalFuelApi.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useTheGlobalFuelApi.d.ts","sourceRoot":"","sources":["../../../src/theglobalfuel/hooks/useTheGlobalFuelApi.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAMH,OAAO,KAAK,EACV,aAAa,EACb,QAAQ,EACR,YAAY,EACZ,cAAc,EACd,gBAAgB,EAChB,mBAAmB,EACnB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,eAAe,EACf,iBAAiB,EACjB,WAAW,EACX,iBAAiB,EACjB,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,E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AgC;QAIA,MAAM;YAAU,yBAAyB;WAerF,CAAC;AAEF,eAAO,MAAM,qBAAqB,0FAqBjC,CAAC;AAMF,MAAM,WAAW,oBAAoB;IACnC,SAAS,CAAC,EAAE,eAAe,CAAC;IAC5B,UAAU,CAAC,EAAE,eAAe,CAAC;CAC9B;AAED,eAAO,MAAM,oBAAoB,GAAI,UAAS,oBAAyB,oGAkBtE,CAAC;AAEF,eAAO,MAAM,2BAA2B,0HAgBvC,CAAC;AAEF,eAAO,MAAM,2BAA2B,mGAgBvC,CAAC"}
1
+ {"version":3,"file":"useTheGlobalFuelApi.d.ts","sourceRoot":"","sources":["../../../src/theglobalfuel/hooks/useTheGlobalFuelApi.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAMH,OAAO,KAAK,EACV,aAAa,EACb,QAAQ,EACR,YAAY,EACZ,cAAc,EACd,gBAAgB,EAChB,mBAAmB,EACnB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,eAAe,EACf,iBAAiB,EACjB,WAAW,EACX,iBAAiB,EACjB,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,qBAAqB,EACrB,mBAAmB,EACnB,gBAAgB,EAChB,eAAe,EACf,6BAA6B,EAC7B,mBAAmB,EACnB,mBAAmB,EACnB,wBAAwB,EACxB,6BAA6B,EAC7B,6BAA6B,EAC7B,6BAA6B,EAC7B,sBAAsB,EACtB,sBAAsB,EACtB,0BAA0B,EAC1B,sBAAsB,EACtB,4BAA4B,EAC5B,iBAAiB,EACjB,yBAAyB,EACzB,yBAAyB,EACzB,uBAAuB,EACvB,mBAAmB,EACnB,yBAAyB,EACzB,kBAAkB,EAClB,4BAA4B,EAC5B,8BAA8B,EAC9B,eAAe,EAChB,MAAM,UAAU,CAAC;AA6IlB,MAAM,WAAW,YAAY;IAC3B,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAC7B,IAAI,CAAC,EAAE,YAAY,CAAC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AAM;YAAU,mBAAmB;WAe/E,CAAC;AAMF,MAAM,WAAW,qBAAqB;IACpC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,yBAAyB,CAAC;IACrC,QAAQ,CAAC,EAAE,yBAAyB,CAAC;IACrC,MAAM,CAAC,EAAE,uBAAuB,CAAC;IACjC,UAAU,CAAC,EAAE,eAAe,CAAC;CAC9B;AAED,eAAO,MAAM,qBAAqB,GAAI,UAAS,qBAA0B,4FA0BxE,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,IAAI,MAAM,GAAG,SAAS,oFAgB1D,CAAC;AAEF,eAAO,MAAM,0BAA0B,0HAmBtC,CAAC;AAEF,eAAO,MAAM,8BAA8B;QAIE,MAAM;YAAU,uBAAuB;WAgBnF,CAAC;AAEF,eAAO,MAAM,iCAAiC;QAIW,MAAM;wBAAsB,MAAM;WAe1F,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAClC,aAAa,MAAM,EACnB,SAAS,yBAAyB,EAClC,aAAa,eAAe,8FAqB7B,CAAC;AAEF,eAAO,MAAM,4BAA4B,8HAmBxC,CAAC;AAEF,eAAO,MAAM,gCAAgC;QAIA,MAAM;YAAU,yBAAyB;WAerF,CAAC;AAEF,eAAO,MAAM,qBAAqB,iFAqBjC,CAAC;AAMF,MAAM,WAAW,oBAAoB;IACnC,SAAS,CAAC,EAAE,eAAe,CAAC;IAC5B,UAAU,CAAC,EAAE,eAAe,CAAC;CAC9B;AAED,eAAO,MAAM,oBAAoB,GAAI,UAAS,oBAAyB,2FAkBtE,CAAC;AAEF,eAAO,MAAM,2BAA2B,0HAgBvC,CAAC;AAEF,eAAO,MAAM,2BAA2B,mGAgBvC,CAAC"}
@@ -28,9 +28,9 @@ export interface TheTagAssignment {
28
28
  tag: TheTag;
29
29
  }
30
30
  /** Current tag assignments for an eco entity. */
31
- export declare const useTheEntityTags: (entityType: string, entityId: string | undefined) => import('@tanstack/react-query').UseQueryResult<NoInfer<TheTagAssignment[]>, Error>;
31
+ export declare const useTheEntityTags: (entityType: string, entityId: string | undefined) => import('@tanstack/react-query').UseQueryResult<TheTagAssignment[], Error>;
32
32
  /** Search existing tags (enabled only for a non-empty query). */
33
- export declare const useTheTagSearch: (query: string) => import('@tanstack/react-query').UseQueryResult<NoInfer<TheTag[]>, Error>;
33
+ export declare const useTheTagSearch: (query: string) => import('@tanstack/react-query').UseQueryResult<TheTag[], Error>;
34
34
  /** Assign an existing tag to the entity. */
35
35
  export declare const useTheAssignTag: (entityType: string, entityId: string) => import('@tanstack/react-query').UseMutationResult<{
36
36
  id: string;
@@ -1 +1 @@
1
- {"version":3,"file":"useTheTags.d.ts","sourceRoot":"","sources":["../../../src/theglobalfuel/hooks/useTheTags.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAOH,MAAM,WAAW,MAAM;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;CACb;AAiBD,iDAAiD;AACjD,eAAO,MAAM,gBAAgB,GAAI,YAAY,MAAM,EAAE,UAAU,MAAM,GAAG,SAAS,uFAmBhF,CAAC;AAEF,iEAAiE;AACjE,eAAO,MAAM,eAAe,GAAI,OAAO,MAAM,6EAiB5C,CAAC;AAEF,4CAA4C;AAC5C,eAAO,MAAM,eAAe,GAAI,YAAY,MAAM,EAAE,UAAU,MAAM;QAKZ,MAAM;0BAW7D,CAAC;AAEF,oDAAoD;AACpD,eAAO,MAAM,yBAAyB,GAAI,YAAY,MAAM,EAAE,UAAU,MAAM,uFAgB7E,CAAC;AA+BF,2EAA2E;AAC3E,eAAO,MAAM,wBAAwB,GAAI,YAAY,MAAM,EAAE,UAAU,MAAM;QAalB,MAAM;0BAkBhE,CAAC"}
1
+ {"version":3,"file":"useTheTags.d.ts","sourceRoot":"","sources":["../../../src/theglobalfuel/hooks/useTheTags.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAOH,MAAM,WAAW,MAAM;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;CACb;AAiBD,iDAAiD;AACjD,eAAO,MAAM,gBAAgB,GAAI,YAAY,MAAM,EAAE,UAAU,MAAM,GAAG,SAAS,8EAmBhF,CAAC;AAEF,iEAAiE;AACjE,eAAO,MAAM,eAAe,GAAI,OAAO,MAAM,oEAiB5C,CAAC;AAEF,4CAA4C;AAC5C,eAAO,MAAM,eAAe,GAAI,YAAY,MAAM,EAAE,UAAU,MAAM;QAKZ,MAAM;0BAW7D,CAAC;AAEF,oDAAoD;AACpD,eAAO,MAAM,yBAAyB,GAAI,YAAY,MAAM,EAAE,UAAU,MAAM,uFAgB7E,CAAC;AA+BF,2EAA2E;AAC3E,eAAO,MAAM,wBAAwB,GAAI,YAAY,MAAM,EAAE,UAAU,MAAM;QAalB,MAAM;0BAkBhE,CAAC"}
@@ -6,3 +6,4 @@ import "./context/index.js";
6
6
  import "./TheGlobalFuelRoot.js";
7
7
  import "./utils/pageContext.js";
8
8
  import "./services/createSandboxAssistantTransport.js";
9
+ import "./utils/index.js";
@@ -9,6 +9,7 @@ import { useTheAssets as l, useTheComplianceCerts as u, useTheContracts as ee, u
9
9
  import { useThePageView as ie } from "../../hooks/useThePageView.js";
10
10
  import { useTheTranslation as f } from "../../hooks/useTheTranslation.js";
11
11
  import "../../hooks/index.js";
12
+ import "../../utils/index.js";
12
13
  import { FilterTabs as p } from "../../components/FilterTabs.js";
13
14
  import "../../components/index.js";
14
15
  import { useMemo as m, useState as h } from "react";
@@ -1 +1 @@
1
- {"version":3,"file":"AlertsPage.js","names":[],"sources":["../../../../src/theglobalfuel/pages/alerts/AlertsPage.tsx"],"sourcesContent":["/**\n * Alerts — operational, commercial and compliance exceptions.\n * @module theglobalfuel/pages/alerts\n *\n * A deterministic rule engine over the live `the*` records. Every alert states\n * the rule that produced it and links to the record that triggered it, so an\n * operator can always answer \"why am I seeing this\" and act on it in one click.\n *\n * The rules run client-side over data already fetched for the rest of the\n * product — no alert store, no polling job, and therefore no possibility of an\n * alert disagreeing with the record it points at. Rules that would need history\n * (trend breaks, anomaly detection) deliberately are NOT approximated here;\n * those belong to the backend decision engine.\n */\n\nimport { useMemo, useState } from 'react';\nimport { BellRing, ShieldAlert, Ship, FileSignature, Leaf, Gauge, Boxes } from 'lucide-react';\nimport { GlassCard } from '@burdenoff/fe-libs/ui';\nimport {\n PageLayout,\n LoadingView,\n ErrorView,\n EmptyState,\n FilterTabs,\n type FilterOption,\n} from '../../components';\nimport { useTheGlobalFuel } from '../../context';\nimport {\n useTheAssets,\n useTheProductionRecords,\n useTheEmissionRecords,\n useTheComplianceCerts,\n useTheContracts,\n useTheShipments,\n useTheInventoryLots,\n useThePageView,\n useTheTranslation,\n} from '../../hooks';\nimport { cn } from '../../utils/cn';\nimport { formatNumber, formatDate, formatEnumLabel } from '../../utils';\n\nconst PAGE: { limit: number } = { limit: 200 };\nconst DAY_MS = 24 * 60 * 60 * 1000;\n\n/** Days a certificate may have left before it is flagged. */\nconst CERT_EXPIRY_WARNING_DAYS = 90;\n/** Days a shipment may sit IN_TRANSIT before it is flagged as stalled. */\nconst SHIPMENT_STALE_DAYS = 30;\n/** Downtime hours in a single production record that count as significant. */\nconst DOWNTIME_ALERT_HOURS = 72;\n/** Fulfilment fraction a contract must reach when inside the closing window. */\nconst CONTRACT_AT_RISK_FRACTION = 0.75;\n/** Days before a contract's end date that its fulfilment starts being checked. */\nconst CONTRACT_CLOSING_DAYS = 60;\n\ntype Severity = 'critical' | 'warning' | 'info';\n\ninterface Alert {\n id: string;\n severity: Severity;\n category: string;\n icon: React.ReactNode;\n title: string;\n detail: string;\n /** The rule that produced this alert, shown verbatim to the operator. */\n rule: string;\n /** In-product route to the record that triggered the alert. */\n route: string;\n}\n\nconst SEVERITY_ORDER: Record<Severity, number> = { critical: 0, warning: 1, info: 2 };\n\nconst SEVERITY_STYLE: Record<Severity, string> = {\n critical: 'border-status-error-border bg-status-error-bg-subtle text-status-error-text',\n warning: 'border-status-warning-border bg-status-warning-bg-subtle text-status-warning-text',\n info: 'border-border-seam bg-bg-sunken text-text-secondary',\n};\n\nconst SEVERITY_LABEL: Record<Severity, string> = {\n critical: 'Critical',\n warning: 'Warning',\n info: 'Info',\n};\n\n/** Days from `now` until `iso`; negative when already past. */\nfunction daysUntil(iso: string, now: number): number {\n return (new Date(iso).getTime() - now) / DAY_MS;\n}\n\n/** Days elapsed between `iso` and `now`; negative when in the future. */\nfunction daysSince(iso: string, now: number): number {\n return (now - new Date(iso).getTime()) / DAY_MS;\n}\n\nexport function AlertsPage() {\n useThePageView('alerts');\n const t = useTheTranslation();\n const { navigateTo } = useTheGlobalFuel();\n // Every rule below is evaluated against one clock reading taken at mount, so\n // the whole alert set is internally consistent and cannot shift mid-render.\n const [evaluatedAt] = useState(() => Date.now());\n\n const assets = useTheAssets({ pagination: PAGE });\n const production = useTheProductionRecords({ pagination: PAGE });\n const emissions = useTheEmissionRecords({ pagination: PAGE });\n const compliance = useTheComplianceCerts(undefined, undefined, undefined, PAGE);\n const contracts = useTheContracts({ pagination: PAGE });\n const shipments = useTheShipments(undefined, undefined, PAGE);\n const inventory = useTheInventoryLots({ pagination: PAGE });\n\n const sources = [assets, production, emissions, compliance, contracts, shipments, inventory];\n const isLoading = sources.some((s) => s.isLoading);\n const isError = sources.every((s) => s.isError);\n\n const assetName = useMemo(() => {\n const map = new Map<string, string>();\n for (const a of assets.data?.items ?? []) map.set(a.id, a.name);\n return map;\n }, [assets.data]);\n\n const alerts = useMemo<Alert[]>(() => {\n const out: Alert[] = [];\n\n // ── Compliance: expired and expiring certificates ────────────────────────\n for (const cert of compliance.data?.items ?? []) {\n const label = cert.certNumber ? `${cert.title} (${cert.certNumber})` : cert.title;\n if (cert.status === 'EXPIRED' || cert.status === 'REVOKED') {\n out.push({\n id: `cert-status-${cert.id}`,\n severity: 'critical',\n category: 'Compliance',\n icon: <ShieldAlert className=\"h-4 w-4\" />,\n title: `${formatEnumLabel(cert.category)} is ${formatEnumLabel(cert.status).toLowerCase()}`,\n detail: label,\n rule: 'Certificate status is EXPIRED or REVOKED.',\n route: 'compliance',\n });\n continue;\n }\n if (!cert.expiresAt) continue;\n const left = daysUntil(cert.expiresAt, evaluatedAt);\n if (left < 0) {\n out.push({\n id: `cert-past-${cert.id}`,\n severity: 'critical',\n category: 'Compliance',\n icon: <ShieldAlert className=\"h-4 w-4\" />,\n title: `${formatEnumLabel(cert.category)} expired ${formatNumber(Math.abs(Math.floor(left)))} days ago`,\n detail: `${label} · expired ${formatDate(cert.expiresAt)}`,\n rule: 'Certificate expiry date is in the past but its status has not been updated.',\n route: 'compliance',\n });\n } else if (left <= CERT_EXPIRY_WARNING_DAYS) {\n out.push({\n id: `cert-soon-${cert.id}`,\n severity: 'warning',\n category: 'Compliance',\n icon: <ShieldAlert className=\"h-4 w-4\" />,\n title: `${formatEnumLabel(cert.category)} expires in ${formatNumber(Math.floor(left))} days`,\n detail: `${label} · expires ${formatDate(cert.expiresAt)}`,\n rule: `Certificate expires within ${CERT_EXPIRY_WARNING_DAYS} days.`,\n route: 'compliance',\n });\n }\n }\n\n // ── Commerce: contracts at risk and over-delivered ───────────────────────\n for (const c of contracts.data?.items ?? []) {\n if (c.contractedVolume <= 0) continue;\n const fraction = c.deliveredVolume / c.contractedVolume;\n\n if (fraction > 1) {\n out.push({\n id: `contract-over-${c.id}`,\n severity: 'warning',\n category: 'Contracts',\n icon: <FileSignature className=\"h-4 w-4\" />,\n title: `${c.reference} is over-delivered`,\n detail: `${formatNumber(c.deliveredVolume)} of ${formatNumber(c.contractedVolume)} ${formatEnumLabel(c.unit)} delivered to ${c.counterparty}.`,\n rule: 'Delivered volume exceeds the contracted volume.',\n route: `contracts/${c.id}`,\n });\n }\n\n if ((c.status === 'ACTIVE' || c.status === 'SIGNED') && c.endDate) {\n const left = daysUntil(c.endDate, evaluatedAt);\n if (left < 0 && fraction < 1) {\n out.push({\n id: `contract-lapsed-${c.id}`,\n severity: 'critical',\n category: 'Contracts',\n icon: <FileSignature className=\"h-4 w-4\" />,\n title: `${c.reference} passed its end date under-delivered`,\n detail: `${Math.round(fraction * 100)}% delivered · ended ${formatDate(c.endDate)}.`,\n rule: 'Contract end date has passed while the contract is still live and under-delivered.',\n route: `contracts/${c.id}`,\n });\n } else if (\n left >= 0 &&\n left <= CONTRACT_CLOSING_DAYS &&\n fraction < CONTRACT_AT_RISK_FRACTION\n ) {\n out.push({\n id: `contract-risk-${c.id}`,\n severity: 'warning',\n category: 'Contracts',\n icon: <FileSignature className=\"h-4 w-4\" />,\n title: `${c.reference} is behind schedule`,\n detail: `${Math.round(fraction * 100)}% delivered with ${formatNumber(Math.floor(left))} days left.`,\n rule: `Under ${Math.round(CONTRACT_AT_RISK_FRACTION * 100)}% delivered inside the final ${CONTRACT_CLOSING_DAYS} days.`,\n route: `contracts/${c.id}`,\n });\n }\n }\n }\n\n // ── Logistics: stalled movements ─────────────────────────────────────────\n for (const s of shipments.data?.items ?? []) {\n if (s.status !== 'IN_TRANSIT' && s.status !== 'LOADING') continue;\n const reference = s.departedAt ?? s.scheduledAt ?? s.createdAt;\n const elapsed = daysSince(reference, evaluatedAt);\n if (elapsed <= SHIPMENT_STALE_DAYS) continue;\n out.push({\n id: `shipment-stalled-${s.id}`,\n severity: 'warning',\n category: 'Shipments',\n icon: <Ship className=\"h-4 w-4\" />,\n title: `${s.reference} has been ${formatEnumLabel(s.status).toLowerCase()} for ${formatNumber(Math.floor(elapsed))} days`,\n detail: [s.carrier, s.trackingId, [s.origin, s.destination].filter(Boolean).join(' → ')]\n .filter(Boolean)\n .join(' · '),\n rule: `Shipment has been LOADING or IN_TRANSIT for more than ${SHIPMENT_STALE_DAYS} days.`,\n route: 'shipments',\n });\n }\n\n // ── Production: significant downtime ─────────────────────────────────────\n for (const r of production.data?.items ?? []) {\n if ((r.downtimeHours ?? 0) < DOWNTIME_ALERT_HOURS) continue;\n out.push({\n id: `downtime-${r.id}`,\n severity: 'warning',\n category: 'Production',\n icon: <Gauge className=\"h-4 w-4\" />,\n title: `${formatNumber(r.downtimeHours)} h downtime recorded`,\n detail: `${assetName.get(r.assetId) ?? r.assetId} · ${formatDate(r.periodStart)} – ${formatDate(r.periodEnd)}`,\n rule: `A single production record carries at least ${DOWNTIME_ALERT_HOURS} hours of downtime.`,\n route: `assets/${r.assetId}`,\n });\n }\n\n // ── ESG: unverified emissions ────────────────────────────────────────────\n const emissionRows = emissions.data?.items ?? [];\n const unverified = emissionRows.filter((e) => !e.verified);\n if (unverified.length > 0) {\n const tonnes = unverified.reduce((sum, e) => sum + (e.co2eTonnes ?? 0), 0);\n out.push({\n id: 'emissions-unverified',\n severity: 'info',\n category: 'ESG',\n icon: <Leaf className=\"h-4 w-4\" />,\n title: `${formatNumber(unverified.length)} emission records are not third-party verified`,\n detail: `${formatNumber(tonnes)} tCO₂e reported but unverified — these cannot be presented as assured in a disclosure.`,\n rule: 'Emission record has verified = false.',\n route: 'emissions',\n });\n }\n\n // ── Inventory: written-off lots ──────────────────────────────────────────\n const writtenOff = (inventory.data?.items ?? []).filter((l) => l.status === 'WRITTEN_OFF');\n if (writtenOff.length > 0) {\n out.push({\n id: 'inventory-written-off',\n severity: 'info',\n category: 'Inventory',\n icon: <Boxes className=\"h-4 w-4\" />,\n title: `${formatNumber(writtenOff.length)} inventory lots written off`,\n detail: writtenOff\n .slice(0, 4)\n .map((l) => l.lotCode)\n .join(', '),\n rule: 'Inventory lot status is WRITTEN_OFF.',\n route: 'inventory',\n });\n }\n\n return out.sort(\n (a, b) =>\n SEVERITY_ORDER[a.severity] - SEVERITY_ORDER[b.severity] || a.title.localeCompare(b.title)\n );\n }, [\n compliance.data,\n contracts.data,\n shipments.data,\n production.data,\n emissions.data,\n inventory.data,\n assetName,\n evaluatedAt,\n ]);\n\n const counts = useMemo(\n () => ({\n all: alerts.length,\n critical: alerts.filter((a) => a.severity === 'critical').length,\n warning: alerts.filter((a) => a.severity === 'warning').length,\n info: alerts.filter((a) => a.severity === 'info').length,\n }),\n [alerts]\n );\n\n const [filter, setFilter] = useState<Severity | 'all'>('all');\n const filterOptions: FilterOption<Severity | 'all'>[] = [\n { value: 'all', label: 'All', count: counts.all },\n { value: 'critical', label: 'Critical', count: counts.critical },\n { value: 'warning', label: 'Warning', count: counts.warning },\n { value: 'info', label: 'Info', count: counts.info },\n ];\n\n const visible = filter === 'all' ? alerts : alerts.filter((a) => a.severity === filter);\n\n const description = t(\n 'theglobalfuel.pages.alerts.description',\n 'Compliance, commercial and operational exceptions detected across your records.'\n );\n const pageTitle = t('theglobalfuel.pages.alerts.title', 'Alerts');\n\n if (isLoading) {\n return (\n <PageLayout title={pageTitle} description={description} dataTour=\"theglobalfuel-alerts-page\">\n <LoadingView label=\"Evaluating alert rules…\" />\n </PageLayout>\n );\n }\n\n if (isError) {\n return (\n <PageLayout title={pageTitle} description={description} dataTour=\"theglobalfuel-alerts-page\">\n <ErrorView\n message=\"Couldn't load the records alerts are evaluated over.\"\n onRetry={() => sources.forEach((s) => void s.refetch())}\n />\n </PageLayout>\n );\n }\n\n return (\n <PageLayout\n title={pageTitle}\n description={description}\n dataTour=\"theglobalfuel-alerts-page\"\n actions={<FilterTabs options={filterOptions} value={filter} onChange={setFilter} />}\n >\n {alerts.length === 0 ? (\n <EmptyState\n illustration=\"empty-notifications\"\n icon={<BellRing className=\"h-10 w-10\" />}\n title=\"No open exceptions\"\n description=\"No certificate is expiring, no contract is behind, no shipment is stalled and no production record shows significant downtime.\"\n />\n ) : visible.length === 0 ? (\n <EmptyState\n illustration=\"empty-search\"\n icon={<BellRing className=\"h-10 w-10\" />}\n title={`No ${SEVERITY_LABEL[filter as Severity].toLowerCase()} alerts`}\n description=\"Switch the filter to see the other severities.\"\n />\n ) : (\n <div className=\"flex flex-col gap-3\">\n {visible.map((alert) => (\n <GlassCard key={alert.id} treatment=\"glass\" className=\"p-0\">\n <button\n type=\"button\"\n onClick={() => navigateTo(alert.route)}\n className=\"flex w-full items-start gap-4 p-4 text-left transition-colors hover:bg-bg-sunken\"\n aria-label={`Open the record for: ${alert.title}`}\n >\n <span\n className={cn(\n 'mt-0.5 flex size-9 shrink-0 items-center justify-center rounded-lg border',\n SEVERITY_STYLE[alert.severity]\n )}\n >\n {alert.icon}\n </span>\n <div className=\"min-w-0 flex-1\">\n <div className=\"flex flex-wrap items-center gap-2\">\n <span\n className={cn(\n 'rounded-full border px-2 py-0.5 text-xs font-medium',\n SEVERITY_STYLE[alert.severity]\n )}\n >\n {SEVERITY_LABEL[alert.severity]}\n </span>\n <span className=\"text-xs uppercase tracking-wide text-text-tertiary\">\n {alert.category}\n </span>\n </div>\n <p className=\"mt-1.5 text-sm font-semibold text-text-primary\">{alert.title}</p>\n {alert.detail && (\n <p className=\"mt-0.5 truncate text-sm text-text-secondary\">{alert.detail}</p>\n )}\n <p className=\"mt-1.5 text-xs text-text-tertiary\">Rule: {alert.rule}</p>\n </div>\n </button>\n </GlassCard>\n ))}\n </div>\n )}\n </PageLayout>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAyCA,IAAM,IAA0B,EAAE,OAAO,KAAK,EACxC,IAAS,OAAU,KAAK,KAGxB,IAA2B,IAE3B,IAAsB,IAEtB,IAAuB,IAEvB,IAA4B,KAE5B,IAAwB,IAiBxB,IAA2C;CAAE,UAAU;CAAG,SAAS;CAAG,MAAM;CAAG,EAE/E,IAA2C;CAC/C,UAAU;CACV,SAAS;CACT,MAAM;CACP,EAEK,IAA2C;CAC/C,UAAU;CACV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QAAW,CAAA;OAE/E,kBAAC,KAAD;QAAG,WAAU;kBAAb,CAAiD,UAAO,EAAM,KAAS;;OACnE;QACC;;IACC,EApCI,EAAM,GAoCV,CACZ;GACE,CAAA;EAEG,CAAA"}
1
+ {"version":3,"file":"AlertsPage.js","names":[],"sources":["../../../../src/theglobalfuel/pages/alerts/AlertsPage.tsx"],"sourcesContent":["/**\n * Alerts — operational, commercial and compliance exceptions.\n * @module theglobalfuel/pages/alerts\n *\n * A deterministic rule engine over the live `the*` records. Every alert states\n * the rule that produced it and links to the record that triggered it, so an\n * operator can always answer \"why am I seeing this\" and act on it in one click.\n *\n * The rules run client-side over data already fetched for the rest of the\n * product — no alert store, no polling job, and therefore no possibility of an\n * alert disagreeing with the record it points at. Rules that would need history\n * (trend breaks, anomaly detection) deliberately are NOT approximated here;\n * those belong to the backend decision engine.\n */\n\nimport { useMemo, useState } from 'react';\nimport { BellRing, ShieldAlert, Ship, FileSignature, Leaf, Gauge, Boxes } from 'lucide-react';\nimport { GlassCard } from '@burdenoff/fe-libs/ui';\nimport {\n PageLayout,\n LoadingView,\n ErrorView,\n EmptyState,\n FilterTabs,\n type FilterOption,\n} from '../../components';\nimport { useTheGlobalFuel } from '../../context';\nimport {\n useTheAssets,\n useTheProductionRecords,\n useTheEmissionRecords,\n useTheComplianceCerts,\n useTheContracts,\n useTheShipments,\n useTheInventoryLots,\n useThePageView,\n useTheTranslation,\n} from '../../hooks';\nimport { cn } from '../../utils/cn';\nimport { formatNumber, formatDate, formatEnumLabel } from '../../utils';\n\nconst PAGE: { limit: number } = { limit: 200 };\nconst DAY_MS = 24 * 60 * 60 * 1000;\n\n/** Days a certificate may have left before it is flagged. */\nconst CERT_EXPIRY_WARNING_DAYS = 90;\n/** Days a shipment may sit IN_TRANSIT before it is flagged as stalled. */\nconst SHIPMENT_STALE_DAYS = 30;\n/** Downtime hours in a single production record that count as significant. */\nconst DOWNTIME_ALERT_HOURS = 72;\n/** Fulfilment fraction a contract must reach when inside the closing window. */\nconst CONTRACT_AT_RISK_FRACTION = 0.75;\n/** Days before a contract's end date that its fulfilment starts being checked. */\nconst CONTRACT_CLOSING_DAYS = 60;\n\ntype Severity = 'critical' | 'warning' | 'info';\n\ninterface Alert {\n id: string;\n severity: Severity;\n category: string;\n icon: React.ReactNode;\n title: string;\n detail: string;\n /** The rule that produced this alert, shown verbatim to the operator. */\n rule: string;\n /** In-product route to the record that triggered the alert. */\n route: string;\n}\n\nconst SEVERITY_ORDER: Record<Severity, number> = { critical: 0, warning: 1, info: 2 };\n\nconst SEVERITY_STYLE: Record<Severity, string> = {\n critical: 'border-status-error-border bg-status-error-bg-subtle text-status-error-text',\n warning: 'border-status-warning-border bg-status-warning-bg-subtle text-status-warning-text',\n info: 'border-border-seam bg-bg-sunken text-text-secondary',\n};\n\nconst SEVERITY_LABEL: Record<Severity, string> = {\n critical: 'Critical',\n warning: 'Warning',\n info: 'Info',\n};\n\n/** Days from `now` until `iso`; negative when already past. */\nfunction daysUntil(iso: string, now: number): number {\n return (new Date(iso).getTime() - now) / DAY_MS;\n}\n\n/** Days elapsed between `iso` and `now`; negative when in the future. */\nfunction daysSince(iso: string, now: number): number {\n return (now - new Date(iso).getTime()) / DAY_MS;\n}\n\nexport function AlertsPage() {\n useThePageView('alerts');\n const t = useTheTranslation();\n const { navigateTo } = useTheGlobalFuel();\n // Every rule below is evaluated against one clock reading taken at mount, so\n // the whole alert set is internally consistent and cannot shift mid-render.\n const [evaluatedAt] = useState(() => Date.now());\n\n const assets = useTheAssets({ pagination: PAGE });\n const production = useTheProductionRecords({ pagination: PAGE });\n const emissions = useTheEmissionRecords({ pagination: PAGE });\n const compliance = useTheComplianceCerts(undefined, undefined, undefined, PAGE);\n const contracts = useTheContracts({ pagination: PAGE });\n const shipments = useTheShipments(undefined, undefined, PAGE);\n const inventory = useTheInventoryLots({ pagination: PAGE });\n\n const sources = [assets, production, emissions, compliance, contracts, shipments, inventory];\n const isLoading = sources.some((s) => s.isLoading);\n const isError = sources.every((s) => s.isError);\n\n const assetName = useMemo(() => {\n const map = new Map<string, string>();\n for (const a of assets.data?.items ?? []) map.set(a.id, a.name);\n return map;\n }, [assets.data]);\n\n const alerts = useMemo<Alert[]>(() => {\n const out: Alert[] = [];\n\n // ── Compliance: expired and expiring certificates ────────────────────────\n for (const cert of compliance.data?.items ?? []) {\n const label = cert.certNumber ? `${cert.title} (${cert.certNumber})` : cert.title;\n if (cert.status === 'EXPIRED' || cert.status === 'REVOKED') {\n out.push({\n id: `cert-status-${cert.id}`,\n severity: 'critical',\n category: 'Compliance',\n icon: <ShieldAlert className=\"h-4 w-4\" />,\n title: `${formatEnumLabel(cert.category)} is ${formatEnumLabel(cert.status).toLowerCase()}`,\n detail: label,\n rule: 'Certificate status is EXPIRED or REVOKED.',\n route: 'compliance',\n });\n continue;\n }\n if (!cert.expiresAt) continue;\n const left = daysUntil(cert.expiresAt, evaluatedAt);\n if (left < 0) {\n out.push({\n id: `cert-past-${cert.id}`,\n severity: 'critical',\n category: 'Compliance',\n icon: <ShieldAlert className=\"h-4 w-4\" />,\n title: `${formatEnumLabel(cert.category)} expired ${formatNumber(Math.abs(Math.floor(left)))} days ago`,\n detail: `${label} · expired ${formatDate(cert.expiresAt)}`,\n rule: 'Certificate expiry date is in the past but its status has not been updated.',\n route: 'compliance',\n });\n } else if (left <= CERT_EXPIRY_WARNING_DAYS) {\n out.push({\n id: `cert-soon-${cert.id}`,\n severity: 'warning',\n category: 'Compliance',\n icon: <ShieldAlert className=\"h-4 w-4\" />,\n title: `${formatEnumLabel(cert.category)} expires in ${formatNumber(Math.floor(left))} days`,\n detail: `${label} · expires ${formatDate(cert.expiresAt)}`,\n rule: `Certificate expires within ${CERT_EXPIRY_WARNING_DAYS} days.`,\n route: 'compliance',\n });\n }\n }\n\n // ── Commerce: contracts at risk and over-delivered ───────────────────────\n for (const c of contracts.data?.items ?? []) {\n if (c.contractedVolume <= 0) continue;\n const fraction = c.deliveredVolume / c.contractedVolume;\n\n if (fraction > 1) {\n out.push({\n id: `contract-over-${c.id}`,\n severity: 'warning',\n category: 'Contracts',\n icon: <FileSignature className=\"h-4 w-4\" />,\n title: `${c.reference} is over-delivered`,\n detail: `${formatNumber(c.deliveredVolume)} of ${formatNumber(c.contractedVolume)} ${formatEnumLabel(c.unit)} delivered to ${c.counterparty}.`,\n rule: 'Delivered volume exceeds the contracted volume.',\n route: `contracts/${c.id}`,\n });\n }\n\n if ((c.status === 'ACTIVE' || c.status === 'SIGNED') && c.endDate) {\n const left = daysUntil(c.endDate, evaluatedAt);\n if (left < 0 && fraction < 1) {\n out.push({\n id: `contract-lapsed-${c.id}`,\n severity: 'critical',\n category: 'Contracts',\n icon: <FileSignature className=\"h-4 w-4\" />,\n title: `${c.reference} passed its end date under-delivered`,\n detail: `${Math.round(fraction * 100)}% delivered · ended ${formatDate(c.endDate)}.`,\n rule: 'Contract end date has passed while the contract is still live and under-delivered.',\n route: `contracts/${c.id}`,\n });\n } else if (\n left >= 0 &&\n left <= CONTRACT_CLOSING_DAYS &&\n fraction < CONTRACT_AT_RISK_FRACTION\n ) {\n out.push({\n id: `contract-risk-${c.id}`,\n severity: 'warning',\n category: 'Contracts',\n icon: <FileSignature className=\"h-4 w-4\" />,\n title: `${c.reference} is behind schedule`,\n detail: `${Math.round(fraction * 100)}% delivered with ${formatNumber(Math.floor(left))} days left.`,\n rule: `Under ${Math.round(CONTRACT_AT_RISK_FRACTION * 100)}% delivered inside the final ${CONTRACT_CLOSING_DAYS} days.`,\n route: `contracts/${c.id}`,\n });\n }\n }\n }\n\n // ── Logistics: stalled movements ─────────────────────────────────────────\n for (const s of shipments.data?.items ?? []) {\n if (s.status !== 'IN_TRANSIT' && s.status !== 'LOADING') continue;\n const reference = s.departedAt ?? s.scheduledAt ?? s.createdAt;\n const elapsed = daysSince(reference, evaluatedAt);\n if (elapsed <= SHIPMENT_STALE_DAYS) continue;\n out.push({\n id: `shipment-stalled-${s.id}`,\n severity: 'warning',\n category: 'Shipments',\n icon: <Ship className=\"h-4 w-4\" />,\n title: `${s.reference} has been ${formatEnumLabel(s.status).toLowerCase()} for ${formatNumber(Math.floor(elapsed))} days`,\n detail: [s.carrier, s.trackingId, [s.origin, s.destination].filter(Boolean).join(' → ')]\n .filter(Boolean)\n .join(' · '),\n rule: `Shipment has been LOADING or IN_TRANSIT for more than ${SHIPMENT_STALE_DAYS} days.`,\n route: 'shipments',\n });\n }\n\n // ── Production: significant downtime ─────────────────────────────────────\n for (const r of production.data?.items ?? []) {\n if ((r.downtimeHours ?? 0) < DOWNTIME_ALERT_HOURS) continue;\n out.push({\n id: `downtime-${r.id}`,\n severity: 'warning',\n category: 'Production',\n icon: <Gauge className=\"h-4 w-4\" />,\n title: `${formatNumber(r.downtimeHours)} h downtime recorded`,\n detail: `${assetName.get(r.assetId) ?? r.assetId} · ${formatDate(r.periodStart)} – ${formatDate(r.periodEnd)}`,\n rule: `A single production record carries at least ${DOWNTIME_ALERT_HOURS} hours of downtime.`,\n route: `assets/${r.assetId}`,\n });\n }\n\n // ── ESG: unverified emissions ────────────────────────────────────────────\n const emissionRows = emissions.data?.items ?? [];\n const unverified = emissionRows.filter((e) => !e.verified);\n if (unverified.length > 0) {\n const tonnes = unverified.reduce((sum, e) => sum + (e.co2eTonnes ?? 0), 0);\n out.push({\n id: 'emissions-unverified',\n severity: 'info',\n category: 'ESG',\n icon: <Leaf className=\"h-4 w-4\" />,\n title: `${formatNumber(unverified.length)} emission records are not third-party verified`,\n detail: `${formatNumber(tonnes)} tCO₂e reported but unverified — these cannot be presented as assured in a disclosure.`,\n rule: 'Emission record has verified = false.',\n route: 'emissions',\n });\n }\n\n // ── Inventory: written-off lots ──────────────────────────────────────────\n const writtenOff = (inventory.data?.items ?? []).filter((l) => l.status === 'WRITTEN_OFF');\n if (writtenOff.length > 0) {\n out.push({\n id: 'inventory-written-off',\n severity: 'info',\n category: 'Inventory',\n icon: <Boxes className=\"h-4 w-4\" />,\n title: `${formatNumber(writtenOff.length)} inventory lots written off`,\n detail: writtenOff\n .slice(0, 4)\n .map((l) => l.lotCode)\n .join(', '),\n rule: 'Inventory lot status is WRITTEN_OFF.',\n route: 'inventory',\n });\n }\n\n return out.sort(\n (a, b) =>\n SEVERITY_ORDER[a.severity] - SEVERITY_ORDER[b.severity] || a.title.localeCompare(b.title)\n );\n }, [\n compliance.data,\n contracts.data,\n shipments.data,\n production.data,\n emissions.data,\n inventory.data,\n assetName,\n evaluatedAt,\n ]);\n\n const counts = useMemo(\n () => ({\n all: alerts.length,\n critical: alerts.filter((a) => a.severity === 'critical').length,\n warning: alerts.filter((a) => a.severity === 'warning').length,\n info: alerts.filter((a) => a.severity === 'info').length,\n }),\n [alerts]\n );\n\n const [filter, setFilter] = useState<Severity | 'all'>('all');\n const filterOptions: FilterOption<Severity | 'all'>[] = [\n { value: 'all', label: 'All', count: counts.all },\n { value: 'critical', label: 'Critical', count: counts.critical },\n { value: 'warning', label: 'Warning', count: counts.warning },\n { value: 'info', label: 'Info', count: counts.info },\n ];\n\n const visible = filter === 'all' ? alerts : alerts.filter((a) => a.severity === filter);\n\n const description = t(\n 'theglobalfuel.pages.alerts.description',\n 'Compliance, commercial and operational exceptions detected across your records.'\n );\n const pageTitle = t('theglobalfuel.pages.alerts.title', 'Alerts');\n\n if (isLoading) {\n return (\n <PageLayout title={pageTitle} description={description} dataTour=\"theglobalfuel-alerts-page\">\n <LoadingView label=\"Evaluating alert rules…\" />\n </PageLayout>\n );\n }\n\n if (isError) {\n return (\n <PageLayout title={pageTitle} description={description} dataTour=\"theglobalfuel-alerts-page\">\n <ErrorView\n message=\"Couldn't load the records alerts are evaluated over.\"\n onRetry={() => sources.forEach((s) => void s.refetch())}\n />\n </PageLayout>\n );\n }\n\n return (\n <PageLayout\n title={pageTitle}\n description={description}\n dataTour=\"theglobalfuel-alerts-page\"\n actions={<FilterTabs options={filterOptions} value={filter} onChange={setFilter} />}\n >\n {alerts.length === 0 ? (\n <EmptyState\n illustration=\"empty-notifications\"\n icon={<BellRing className=\"h-10 w-10\" />}\n title=\"No open exceptions\"\n description=\"No certificate is expiring, no contract is behind, no shipment is stalled and no production record shows significant downtime.\"\n />\n ) : visible.length === 0 ? (\n <EmptyState\n illustration=\"empty-search\"\n icon={<BellRing className=\"h-10 w-10\" />}\n title={`No ${SEVERITY_LABEL[filter as Severity].toLowerCase()} alerts`}\n description=\"Switch the filter to see the other severities.\"\n />\n ) : (\n <div className=\"flex flex-col gap-3\">\n {visible.map((alert) => (\n <GlassCard key={alert.id} treatment=\"glass\" className=\"p-0\">\n <button\n type=\"button\"\n onClick={() => navigateTo(alert.route)}\n className=\"flex w-full items-start gap-4 p-4 text-left transition-colors hover:bg-bg-sunken\"\n aria-label={`Open the record for: ${alert.title}`}\n >\n <span\n className={cn(\n 'mt-0.5 flex size-9 shrink-0 items-center justify-center rounded-lg border',\n SEVERITY_STYLE[alert.severity]\n )}\n >\n {alert.icon}\n </span>\n <div className=\"min-w-0 flex-1\">\n <div className=\"flex flex-wrap items-center gap-2\">\n <span\n className={cn(\n 'rounded-full border px-2 py-0.5 text-xs font-medium',\n SEVERITY_STYLE[alert.severity]\n )}\n >\n {SEVERITY_LABEL[alert.severity]}\n </span>\n <span className=\"text-xs uppercase tracking-wide text-text-tertiary\">\n {alert.category}\n </span>\n </div>\n <p className=\"mt-1.5 text-sm font-semibold text-text-primary\">{alert.title}</p>\n {alert.detail && (\n <p className=\"mt-0.5 truncate text-sm text-text-secondary\">{alert.detail}</p>\n )}\n <p className=\"mt-1.5 text-xs text-text-tertiary\">Rule: {alert.rule}</p>\n </div>\n </button>\n </GlassCard>\n ))}\n </div>\n )}\n </PageLayout>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAyCA,IAAM,IAA0B,EAAE,OAAO,KAAK,EACxC,IAAS,OAAU,KAAK,KAGxB,IAA2B,IAE3B,IAAsB,IAEtB,IAAuB,IAEvB,IAA4B,KAE5B,IAAwB,IAiBxB,IAA2C;CAAE,UAAU;CAAG,SAAS;CAAG,MAAM;CAA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U;kBAAkD,EAAM;QAAU,CAAA;OAC9E,EAAM,UACL,kBAAC,KAAD;QAAG,WAAU;kBAA+C,EAAM;QAAW,CAAA;OAE/E,kBAAC,KAAD;QAAG,WAAU;kBAAb,CAAiD,UAAO,EAAM,KAAS;;OACnE;QACC;;IACC,EApCI,EAAM,GAoCV,CACZ;GACE,CAAA;EAEG,CAAA"}
@@ -14,6 +14,7 @@ import { useTheTranslation as he } from "../../hooks/useTheTranslation.js";
14
14
  import "../../hooks/index.js";
15
15
  import { toCsv as ge } from "../../utils/csv.js";
16
16
  import { downloadTextFile as _e } from "../../utils/provenance.js";
17
+ import "../../utils/index.js";
17
18
  import { FilterTabs as ve } from "../../components/FilterTabs.js";
18
19
  import "../../components/index.js";
19
20
  import { useMemo as l, useState as u } from "react";