@burdenoff/microfe-theglobalfuel 2026.528.1 → 2026.704.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dev/main.d.ts +2 -0
- package/dist/dev/main.d.ts.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +6 -4
- package/dist/node_modules/{clsx → .bun/clsx@2.1.1/node_modules/clsx}/dist/clsx.js +1 -1
- package/dist/node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.js.map +1 -0
- package/dist/node_modules/{tailwind-merge → .bun/tailwind-merge@3.5.0/node_modules/tailwind-merge}/dist/bundle-mjs.js +170 -212
- package/dist/node_modules/.bun/tailwind-merge@3.5.0/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -0
- package/dist/theglobalfuel/TheGlobalFuelRoot.d.ts +5 -0
- package/dist/theglobalfuel/TheGlobalFuelRoot.d.ts.map +1 -0
- package/dist/theglobalfuel/TheGlobalFuelRoot.js +109 -161
- package/dist/theglobalfuel/TheGlobalFuelRoot.js.map +1 -1
- package/dist/theglobalfuel/TheGlobalFuelRoutes.d.ts +4 -0
- package/dist/theglobalfuel/TheGlobalFuelRoutes.d.ts.map +1 -0
- package/dist/theglobalfuel/TheGlobalFuelRoutes.js +70 -85
- package/dist/theglobalfuel/TheGlobalFuelRoutes.js.map +1 -1
- package/dist/theglobalfuel/components/DataTable.d.ts +28 -0
- package/dist/theglobalfuel/components/DataTable.d.ts.map +1 -0
- package/dist/theglobalfuel/components/DataTable.js +71 -0
- package/dist/theglobalfuel/components/DataTable.js.map +1 -0
- package/dist/theglobalfuel/components/EmptyState.d.ts +18 -0
- package/dist/theglobalfuel/components/EmptyState.d.ts.map +1 -0
- package/dist/theglobalfuel/components/EmptyState.js +35 -0
- package/dist/theglobalfuel/components/EmptyState.js.map +1 -0
- package/dist/theglobalfuel/components/EvidenceUpload.d.ts +14 -0
- package/dist/theglobalfuel/components/EvidenceUpload.d.ts.map +1 -0
- package/dist/theglobalfuel/components/EvidenceUpload.js +93 -0
- package/dist/theglobalfuel/components/EvidenceUpload.js.map +1 -0
- package/dist/theglobalfuel/components/FileLink.d.ts +15 -0
- package/dist/theglobalfuel/components/FileLink.d.ts.map +1 -0
- package/dist/theglobalfuel/components/FileLink.js +36 -0
- package/dist/theglobalfuel/components/FileLink.js.map +1 -0
- package/dist/theglobalfuel/components/FilterTabs.d.ts +18 -0
- package/dist/theglobalfuel/components/FilterTabs.d.ts.map +1 -0
- package/dist/theglobalfuel/components/FilterTabs.js +27 -0
- package/dist/theglobalfuel/components/FilterTabs.js.map +1 -0
- package/dist/theglobalfuel/components/MetricsCard.d.ts +23 -0
- package/dist/theglobalfuel/components/MetricsCard.d.ts.map +1 -0
- package/dist/theglobalfuel/components/MetricsCard.js +64 -0
- package/dist/theglobalfuel/components/MetricsCard.js.map +1 -0
- package/dist/theglobalfuel/components/MiniBar.d.ts +16 -0
- package/dist/theglobalfuel/components/MiniBar.d.ts.map +1 -0
- package/dist/theglobalfuel/components/MiniBar.js +22 -0
- package/dist/theglobalfuel/components/MiniBar.js.map +1 -0
- package/dist/theglobalfuel/components/PageLayout.d.ts +16 -0
- package/dist/theglobalfuel/components/PageLayout.d.ts.map +1 -0
- package/dist/theglobalfuel/components/PageLayout.js +38 -0
- package/dist/theglobalfuel/components/PageLayout.js.map +1 -0
- package/dist/theglobalfuel/components/Pagination.d.ts +22 -0
- package/dist/theglobalfuel/components/Pagination.d.ts.map +1 -0
- package/dist/theglobalfuel/components/Pagination.js +50 -0
- package/dist/theglobalfuel/components/Pagination.js.map +1 -0
- package/dist/theglobalfuel/components/StateViews.d.ts +24 -0
- package/dist/theglobalfuel/components/StateViews.d.ts.map +1 -0
- package/dist/theglobalfuel/components/StateViews.js +49 -0
- package/dist/theglobalfuel/components/StateViews.js.map +1 -0
- package/dist/theglobalfuel/components/StatusBadge.d.ts +9 -0
- package/dist/theglobalfuel/components/StatusBadge.d.ts.map +1 -0
- package/dist/theglobalfuel/components/StatusBadge.js +73 -0
- package/dist/theglobalfuel/components/StatusBadge.js.map +1 -0
- package/dist/theglobalfuel/components/Tabs.d.ts +17 -0
- package/dist/theglobalfuel/components/Tabs.d.ts.map +1 -0
- package/dist/theglobalfuel/components/Tabs.js +31 -0
- package/dist/theglobalfuel/components/Tabs.js.map +1 -0
- package/dist/theglobalfuel/components/TheDiscussion.d.ts +18 -0
- package/dist/theglobalfuel/components/TheDiscussion.d.ts.map +1 -0
- package/dist/theglobalfuel/components/TheDiscussion.js +109 -0
- package/dist/theglobalfuel/components/TheDiscussion.js.map +1 -0
- package/dist/theglobalfuel/components/TheTags.d.ts +17 -0
- package/dist/theglobalfuel/components/TheTags.d.ts.map +1 -0
- package/dist/theglobalfuel/components/TheTags.js +149 -0
- package/dist/theglobalfuel/components/TheTags.js.map +1 -0
- package/dist/theglobalfuel/components/index.d.ts +19 -0
- package/dist/theglobalfuel/components/index.d.ts.map +1 -0
- package/dist/theglobalfuel/components/index.js +14 -0
- package/dist/theglobalfuel/context/TheGlobalFuelContext.d.ts +16 -0
- package/dist/theglobalfuel/context/TheGlobalFuelContext.d.ts.map +1 -0
- package/dist/theglobalfuel/context/TheGlobalFuelContext.js +85 -0
- package/dist/theglobalfuel/context/TheGlobalFuelContext.js.map +1 -0
- package/dist/theglobalfuel/context/index.d.ts +6 -0
- package/dist/theglobalfuel/context/index.d.ts.map +1 -0
- package/dist/theglobalfuel/context/index.js +1 -0
- package/dist/theglobalfuel/hooks/index.d.ts +10 -0
- package/dist/theglobalfuel/hooks/index.d.ts.map +1 -0
- package/dist/theglobalfuel/hooks/index.js +5 -0
- package/dist/theglobalfuel/hooks/useCursorPager.d.ts +33 -0
- package/dist/theglobalfuel/hooks/useCursorPager.d.ts.map +1 -0
- package/dist/theglobalfuel/hooks/useCursorPager.js +25 -0
- package/dist/theglobalfuel/hooks/useCursorPager.js.map +1 -0
- package/dist/theglobalfuel/hooks/useTheComments.d.ts +36 -0
- package/dist/theglobalfuel/hooks/useTheComments.d.ts.map +1 -0
- package/dist/theglobalfuel/hooks/useTheComments.js +45 -0
- package/dist/theglobalfuel/hooks/useTheComments.js.map +1 -0
- package/dist/theglobalfuel/hooks/useTheFiles.d.ts +47 -0
- package/dist/theglobalfuel/hooks/useTheFiles.d.ts.map +1 -0
- package/dist/theglobalfuel/hooks/useTheFiles.js +81 -0
- package/dist/theglobalfuel/hooks/useTheFiles.js.map +1 -0
- package/dist/theglobalfuel/hooks/useTheGlobalFuelApi.d.ts +75 -0
- package/dist/theglobalfuel/hooks/useTheGlobalFuelApi.d.ts.map +1 -0
- package/dist/theglobalfuel/hooks/useTheGlobalFuelApi.js +353 -0
- package/dist/theglobalfuel/hooks/useTheGlobalFuelApi.js.map +1 -0
- package/dist/theglobalfuel/hooks/useTheTags.d.ts +44 -0
- package/dist/theglobalfuel/hooks/useTheTags.d.ts.map +1 -0
- package/dist/theglobalfuel/hooks/useTheTags.js +89 -0
- package/dist/theglobalfuel/hooks/useTheTags.js.map +1 -0
- package/dist/theglobalfuel/index.d.ts +9 -0
- package/dist/theglobalfuel/index.d.ts.map +1 -0
- package/dist/theglobalfuel/index.js +5 -2
- package/dist/theglobalfuel/pages/assets/AssetDetailPage.d.ts +13 -0
- package/dist/theglobalfuel/pages/assets/AssetDetailPage.d.ts.map +1 -0
- package/dist/theglobalfuel/pages/assets/AssetDetailPage.js +869 -0
- package/dist/theglobalfuel/pages/assets/AssetDetailPage.js.map +1 -0
- package/dist/theglobalfuel/pages/assets/AssetsPage.d.ts +10 -0
- package/dist/theglobalfuel/pages/assets/AssetsPage.d.ts.map +1 -0
- package/dist/theglobalfuel/pages/assets/AssetsPage.js +547 -0
- package/dist/theglobalfuel/pages/assets/AssetsPage.js.map +1 -0
- package/dist/theglobalfuel/pages/compliance/CompliancePage.d.ts +11 -0
- package/dist/theglobalfuel/pages/compliance/CompliancePage.d.ts.map +1 -0
- package/dist/theglobalfuel/pages/compliance/CompliancePage.js +511 -0
- package/dist/theglobalfuel/pages/compliance/CompliancePage.js.map +1 -0
- package/dist/theglobalfuel/pages/contracts/ContractDetailPage.d.ts +9 -0
- package/dist/theglobalfuel/pages/contracts/ContractDetailPage.d.ts.map +1 -0
- package/dist/theglobalfuel/pages/contracts/ContractDetailPage.js +878 -0
- package/dist/theglobalfuel/pages/contracts/ContractDetailPage.js.map +1 -0
- package/dist/theglobalfuel/pages/contracts/ContractsPage.d.ts +8 -0
- package/dist/theglobalfuel/pages/contracts/ContractsPage.d.ts.map +1 -0
- package/dist/theglobalfuel/pages/contracts/ContractsPage.js +588 -0
- package/dist/theglobalfuel/pages/contracts/ContractsPage.js.map +1 -0
- package/dist/theglobalfuel/pages/dashboard/DashboardPage.d.ts +13 -0
- package/dist/theglobalfuel/pages/dashboard/DashboardPage.d.ts.map +1 -0
- package/dist/theglobalfuel/pages/dashboard/DashboardPage.js +507 -0
- package/dist/theglobalfuel/pages/dashboard/DashboardPage.js.map +1 -0
- package/dist/theglobalfuel/pages/emissions/EmissionsPage.d.ts +12 -0
- package/dist/theglobalfuel/pages/emissions/EmissionsPage.d.ts.map +1 -0
- package/dist/theglobalfuel/pages/emissions/EmissionsPage.js +479 -0
- package/dist/theglobalfuel/pages/emissions/EmissionsPage.js.map +1 -0
- package/dist/theglobalfuel/pages/inventory/InventoryPage.d.ts +11 -0
- package/dist/theglobalfuel/pages/inventory/InventoryPage.d.ts.map +1 -0
- package/dist/theglobalfuel/pages/inventory/InventoryPage.js +592 -0
- package/dist/theglobalfuel/pages/inventory/InventoryPage.js.map +1 -0
- package/dist/theglobalfuel/pages/production/ProductionPage.d.ts +11 -0
- package/dist/theglobalfuel/pages/production/ProductionPage.d.ts.map +1 -0
- package/dist/theglobalfuel/pages/production/ProductionPage.js +421 -0
- package/dist/theglobalfuel/pages/production/ProductionPage.js.map +1 -0
- package/dist/theglobalfuel/pages/reserves/ReservesPage.d.ts +10 -0
- package/dist/theglobalfuel/pages/reserves/ReservesPage.d.ts.map +1 -0
- package/dist/theglobalfuel/pages/reserves/ReservesPage.js +439 -0
- package/dist/theglobalfuel/pages/reserves/ReservesPage.js.map +1 -0
- package/dist/theglobalfuel/pages/shipments/ShipmentsPage.d.ts +10 -0
- package/dist/theglobalfuel/pages/shipments/ShipmentsPage.d.ts.map +1 -0
- package/dist/theglobalfuel/pages/shipments/ShipmentsPage.js +550 -0
- package/dist/theglobalfuel/pages/shipments/ShipmentsPage.js.map +1 -0
- package/dist/theglobalfuel/types/index.d.ts +376 -0
- package/dist/theglobalfuel/types/index.d.ts.map +1 -0
- package/dist/theglobalfuel/utils/cn.d.ts +4 -0
- package/dist/theglobalfuel/utils/cn.d.ts.map +1 -0
- package/dist/theglobalfuel/utils/cn.js +2 -2
- package/dist/theglobalfuel/utils/formatters.d.ts +36 -0
- package/dist/theglobalfuel/utils/formatters.d.ts.map +1 -0
- package/dist/theglobalfuel/utils/formatters.js +94 -0
- package/dist/theglobalfuel/utils/formatters.js.map +1 -0
- package/dist/theglobalfuel/utils/i18n.d.ts +6 -0
- package/dist/theglobalfuel/utils/i18n.d.ts.map +1 -0
- package/dist/theglobalfuel/utils/index.d.ts +9 -0
- package/dist/theglobalfuel/utils/index.d.ts.map +1 -0
- package/dist/theglobalfuel/utils/navigation.d.ts +14 -0
- package/dist/theglobalfuel/utils/navigation.d.ts.map +1 -0
- package/dist/theglobalfuel/utils/navigation.js +2 -1
- package/dist/theglobalfuel/utils/navigation.js.map +1 -1
- package/package.json +3 -3
- package/dist/node_modules/clsx/dist/clsx.js.map +0 -1
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +0 -1
- package/dist/theglobalfuel/pages/AiIntelligencePage.js +0 -190
- package/dist/theglobalfuel/pages/AiIntelligencePage.js.map +0 -1
- package/dist/theglobalfuel/pages/AnalyticsPage.js +0 -241
- package/dist/theglobalfuel/pages/AnalyticsPage.js.map +0 -1
- package/dist/theglobalfuel/pages/CompliancePage.js +0 -173
- package/dist/theglobalfuel/pages/CompliancePage.js.map +0 -1
- package/dist/theglobalfuel/pages/DashboardPage.js +0 -145
- package/dist/theglobalfuel/pages/DashboardPage.js.map +0 -1
- package/dist/theglobalfuel/pages/FinancialPage.js +0 -204
- package/dist/theglobalfuel/pages/FinancialPage.js.map +0 -1
- package/dist/theglobalfuel/pages/FleetManagementPage.js +0 -244
- package/dist/theglobalfuel/pages/FleetManagementPage.js.map +0 -1
- package/dist/theglobalfuel/pages/MarketplacePage.js +0 -260
- package/dist/theglobalfuel/pages/MarketplacePage.js.map +0 -1
- package/dist/theglobalfuel/pages/OperationsPage.js +0 -190
- package/dist/theglobalfuel/pages/OperationsPage.js.map +0 -1
- package/dist/theglobalfuel/pages/QualityControlPage.js +0 -215
- package/dist/theglobalfuel/pages/QualityControlPage.js.map +0 -1
- package/dist/theglobalfuel/pages/ReportsPage.js +0 -247
- package/dist/theglobalfuel/pages/ReportsPage.js.map +0 -1
- package/dist/theglobalfuel/pages/ResourcesPage.js +0 -225
- package/dist/theglobalfuel/pages/ResourcesPage.js.map +0 -1
- package/dist/theglobalfuel/pages/RiskManagementPage.js +0 -230
- package/dist/theglobalfuel/pages/RiskManagementPage.js.map +0 -1
- package/dist/theglobalfuel/pages/SupplyChainPage.js +0 -214
- package/dist/theglobalfuel/pages/SupplyChainPage.js.map +0 -1
- package/dist/theglobalfuel/pages/SustainabilityPage.js +0 -261
- package/dist/theglobalfuel/pages/SustainabilityPage.js.map +0 -1
- package/dist/theglobalfuel/pages/TrainingPage.js +0 -253
- package/dist/theglobalfuel/pages/TrainingPage.js.map +0 -1
- package/dist/theglobalfuel/providers/TheGlobalFuelProvider.js +0 -27
- package/dist/theglobalfuel/providers/TheGlobalFuelProvider.js.map +0 -1
- package/dist/theglobalfuel/store/theglobalfuelStore.js +0 -712
- package/dist/theglobalfuel/store/theglobalfuelStore.js.map +0 -1
- package/dist/theglobalfuel/utils/i18n.js +0 -15
- package/dist/theglobalfuel/utils/i18n.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PageLayout.js","names":[],"sources":["../../../src/theglobalfuel/components/PageLayout.tsx"],"sourcesContent":["/**\n * Page Layout Component\n * @module theglobalfuel/components\n *\n * Boff UI 2.0 page wrapper. Supports a living-glass {@link AuroraBackground}\n * hero backdrop and a gradient hero title for the MFE's primary page.\n */\n\nimport type { FC, ReactNode } from 'react';\nimport { AuroraBackground, GradientText } from '@burdenoff/fe-libs/ui';\nimport { cn } from '../utils/cn';\n\ninterface PageLayoutProps {\n title: ReactNode;\n description?: string;\n actions?: ReactNode;\n children: ReactNode;\n className?: string;\n /** Render the title as a gradient hero heading (reserve for the ONE primary page). */\n titleGradient?: boolean;\n /** Drop a subtle living-glass aurora behind the header (primary page only). */\n aurora?: boolean;\n}\n\nexport const PageLayout: FC<PageLayoutProps> = ({\n title,\n description,\n actions,\n children,\n className,\n titleGradient = false,\n aurora = false,\n}) => {\n return (\n <div className={cn('flex flex-col h-full', className)}>\n <div\n className={cn(\n 'relative flex flex-col gap-3 px-6 py-4 border-b border-border-seam sm:flex-row sm:items-center sm:justify-between sm:gap-4',\n aurora ? 'overflow-hidden bg-gloss-card' : 'bg-bg-surface'\n )}\n >\n {aurora && <AuroraBackground intensity=\"subtle\" />}\n <div className=\"min-w-0\">\n {titleGradient && typeof title === 'string' ? (\n <GradientText as=\"h1\" className=\"text-2xl font-semibold tracking-tight\">\n {title}\n </GradientText>\n ) : (\n <h1 className=\"text-2xl font-semibold text-text-primary\">{title}</h1>\n )}\n {description && <p className=\"mt-1 text-sm text-text-secondary\">{description}</p>}\n </div>\n {actions && (\n <div className=\"flex flex-wrap items-center gap-3 shrink-0 max-sm:w-full\">{actions}</div>\n )}\n </div>\n\n <div className=\"flex-1 overflow-auto p-6\">{children}</div>\n </div>\n );\n};\n"],"mappings":";;;;AAwBA,IAAa,KAAmC,EAC9C,UACA,gBACA,YACA,aACA,cACA,mBAAgB,IAChB,YAAS,SAGP,kBAAC,OAAD;CAAK,WAAW,EAAG,wBAAwB,EAAU;WAArD,CACE,kBAAC,OAAD;EACE,WAAW,EACT,8HACA,IAAS,kCAAkC,gBAC5C;YAJH;GAMG,KAAU,kBAAC,GAAD,EAAkB,WAAU,UAAW,CAAA;GAClD,kBAAC,OAAD;IAAK,WAAU;cAAf,CACG,KAAiB,OAAO,KAAU,WACjC,kBAAC,GAAD;KAAc,IAAG;KAAK,WAAU;eAC7B;KACY,CAAA,GAEf,kBAAC,MAAD;KAAI,WAAU;eAA4C;KAAW,CAAA,EAEtE,KAAe,kBAAC,KAAD;KAAG,WAAU;eAAoC;KAAgB,CAAA,CAC7E;;GACL,KACC,kBAAC,OAAD;IAAK,WAAU;cAA4D;IAAc,CAAA;GAEvF;KAEN,kBAAC,OAAD;EAAK,WAAU;EAA4B;EAAe,CAAA,CACtD"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pagination — cursor-aware Prev/Next control for The* connection lists.
|
|
3
|
+
* @module theglobalfuel/components
|
|
4
|
+
*
|
|
5
|
+
* The svc list connections return `pageInfo { cursor, hasMore }` and paginate by
|
|
6
|
+
* cursor (offset is a no-op). Pages track a 0-indexed `page` for display and a
|
|
7
|
+
* cursor stack for navigation; this control exposes Prev/Next, disabling Prev on
|
|
8
|
+
* page 0 and Next when the server reports no more rows.
|
|
9
|
+
*/
|
|
10
|
+
interface PaginationProps {
|
|
11
|
+
page: number;
|
|
12
|
+
pageSize: number;
|
|
13
|
+
/** Number of rows on the current page. */
|
|
14
|
+
itemCount: number;
|
|
15
|
+
/** Server flag: are there more rows after this page? */
|
|
16
|
+
hasMore: boolean;
|
|
17
|
+
onPageChange: (page: number) => void;
|
|
18
|
+
className?: string;
|
|
19
|
+
}
|
|
20
|
+
export declare function Pagination({ page, pageSize, itemCount, hasMore, onPageChange, className, }: PaginationProps): import("react/jsx-runtime").JSX.Element | null;
|
|
21
|
+
export {};
|
|
22
|
+
//# sourceMappingURL=Pagination.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Pagination.d.ts","sourceRoot":"","sources":["../../../src/theglobalfuel/components/Pagination.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAMH,UAAU,eAAe;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,0CAA0C;IAC1C,SAAS,EAAE,MAAM,CAAC;IAClB,wDAAwD;IACxD,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,UAAU,CAAC,EACzB,IAAI,EACJ,QAAQ,EACR,SAAS,EACT,OAAO,EACP,YAAY,EACZ,SAAS,GACV,EAAE,eAAe,kDAuCjB"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { cn as e } from "../utils/cn.js";
|
|
2
|
+
import { ChevronLeft as t, ChevronRight as n } from "lucide-react";
|
|
3
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
4
|
+
import { Button as a } from "@burdenoff/fe-libs/ui";
|
|
5
|
+
//#region src/theglobalfuel/components/Pagination.tsx
|
|
6
|
+
function o({ page: o, pageSize: s, itemCount: c, hasMore: l, onPageChange: u, className: d }) {
|
|
7
|
+
if (o === 0 && !l) return null;
|
|
8
|
+
let f = c === 0 ? 0 : o * s + 1, p = o * s + c;
|
|
9
|
+
return /* @__PURE__ */ i("div", {
|
|
10
|
+
className: e("mt-4 flex flex-col items-center justify-between gap-3 sm:flex-row", d),
|
|
11
|
+
children: [/* @__PURE__ */ i("p", {
|
|
12
|
+
className: "text-sm text-text-secondary tabular-nums",
|
|
13
|
+
"aria-live": "polite",
|
|
14
|
+
children: [
|
|
15
|
+
"Showing ",
|
|
16
|
+
f,
|
|
17
|
+
"–",
|
|
18
|
+
p
|
|
19
|
+
]
|
|
20
|
+
}), /* @__PURE__ */ i("div", {
|
|
21
|
+
className: "flex items-center gap-2",
|
|
22
|
+
children: [
|
|
23
|
+
/* @__PURE__ */ i(a, {
|
|
24
|
+
variant: "outline",
|
|
25
|
+
size: "sm",
|
|
26
|
+
onClick: () => u(o - 1),
|
|
27
|
+
disabled: o === 0,
|
|
28
|
+
"aria-label": "Previous page",
|
|
29
|
+
children: [/* @__PURE__ */ r(t, { className: "mr-1 h-4 w-4" }), " Previous"]
|
|
30
|
+
}),
|
|
31
|
+
/* @__PURE__ */ i("span", {
|
|
32
|
+
className: "min-w-[4.5rem] text-center text-sm text-text-secondary tabular-nums",
|
|
33
|
+
children: ["Page ", o + 1]
|
|
34
|
+
}),
|
|
35
|
+
/* @__PURE__ */ i(a, {
|
|
36
|
+
variant: "outline",
|
|
37
|
+
size: "sm",
|
|
38
|
+
onClick: () => u(o + 1),
|
|
39
|
+
disabled: !l,
|
|
40
|
+
"aria-label": "Next page",
|
|
41
|
+
children: ["Next ", /* @__PURE__ */ r(n, { className: "ml-1 h-4 w-4" })]
|
|
42
|
+
})
|
|
43
|
+
]
|
|
44
|
+
})]
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
//#endregion
|
|
48
|
+
export { o as Pagination };
|
|
49
|
+
|
|
50
|
+
//# sourceMappingURL=Pagination.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Pagination.js","names":[],"sources":["../../../src/theglobalfuel/components/Pagination.tsx"],"sourcesContent":["/**\n * Pagination — cursor-aware Prev/Next control for The* connection lists.\n * @module theglobalfuel/components\n *\n * The svc list connections return `pageInfo { cursor, hasMore }` and paginate by\n * cursor (offset is a no-op). Pages track a 0-indexed `page` for display and a\n * cursor stack for navigation; this control exposes Prev/Next, disabling Prev on\n * page 0 and Next when the server reports no more rows.\n */\n\nimport { ChevronLeft, ChevronRight } from 'lucide-react';\nimport { Button } from '@burdenoff/fe-libs/ui';\nimport { cn } from '../utils/cn';\n\ninterface PaginationProps {\n page: number;\n pageSize: number;\n /** Number of rows on the current page. */\n itemCount: number;\n /** Server flag: are there more rows after this page? */\n hasMore: boolean;\n onPageChange: (page: number) => void;\n className?: string;\n}\n\nexport function Pagination({\n page,\n pageSize,\n itemCount,\n hasMore,\n onPageChange,\n className,\n}: PaginationProps) {\n // Nothing to paginate: single page that also has no more rows.\n if (page === 0 && !hasMore) return null;\n\n const from = itemCount === 0 ? 0 : page * pageSize + 1;\n const to = page * pageSize + itemCount;\n\n return (\n <div\n className={cn('mt-4 flex flex-col items-center justify-between gap-3 sm:flex-row', className)}\n >\n <p className=\"text-sm text-text-secondary tabular-nums\" aria-live=\"polite\">\n Showing {from}–{to}\n </p>\n <div className=\"flex items-center gap-2\">\n <Button\n variant=\"outline\"\n size=\"sm\"\n onClick={() => onPageChange(page - 1)}\n disabled={page === 0}\n aria-label=\"Previous page\"\n >\n <ChevronLeft className=\"mr-1 h-4 w-4\" /> Previous\n </Button>\n <span className=\"min-w-[4.5rem] text-center text-sm text-text-secondary tabular-nums\">\n Page {page + 1}\n </span>\n <Button\n variant=\"outline\"\n size=\"sm\"\n onClick={() => onPageChange(page + 1)}\n disabled={!hasMore}\n aria-label=\"Next page\"\n >\n Next <ChevronRight className=\"ml-1 h-4 w-4\" />\n </Button>\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;AAyBA,SAAgB,EAAW,EACzB,SACA,aACA,cACA,YACA,iBACA,gBACkB;AAElB,KAAI,MAAS,KAAK,CAAC,EAAS,QAAO;CAEnC,IAAM,IAAO,MAAc,IAAI,IAAI,IAAO,IAAW,GAC/C,IAAK,IAAO,IAAW;AAE7B,QACE,kBAAC,OAAD;EACE,WAAW,EAAG,qEAAqE,EAAU;YAD/F,CAGE,kBAAC,KAAD;GAAG,WAAU;GAA2C,aAAU;aAAlE;IAA2E;IAChE;IAAK;IAAE;IACd;MACJ,kBAAC,OAAD;GAAK,WAAU;aAAf;IACE,kBAAC,GAAD;KACE,SAAQ;KACR,MAAK;KACL,eAAe,EAAa,IAAO,EAAE;KACrC,UAAU,MAAS;KACnB,cAAW;eALb,CAOE,kBAAC,GAAD,EAAa,WAAU,gBAAiB,CAAA,EAAA,YACjC;;IACT,kBAAC,QAAD;KAAM,WAAU;eAAhB,CAAsF,SAC9E,IAAO,EACR;;IACP,kBAAC,GAAD;KACE,SAAQ;KACR,MAAK;KACL,eAAe,EAAa,IAAO,EAAE;KACrC,UAAU,CAAC;KACX,cAAW;eALb,CAMC,SACM,kBAAC,GAAD,EAAc,WAAU,gBAAiB,CAAA,CACvC;;IACL;KACF"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
interface LoadingViewProps {
|
|
4
|
+
label?: string;
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const LoadingView: FC<LoadingViewProps>;
|
|
8
|
+
interface ErrorViewProps {
|
|
9
|
+
title?: string;
|
|
10
|
+
message?: string;
|
|
11
|
+
onRetry?: () => void;
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare const ErrorView: FC<ErrorViewProps>;
|
|
15
|
+
interface SectionProps {
|
|
16
|
+
title: string;
|
|
17
|
+
description?: string;
|
|
18
|
+
action?: ReactNode;
|
|
19
|
+
children: ReactNode;
|
|
20
|
+
className?: string;
|
|
21
|
+
}
|
|
22
|
+
export declare const Section: FC<SectionProps>;
|
|
23
|
+
export {};
|
|
24
|
+
//# sourceMappingURL=StateViews.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StateViews.d.ts","sourceRoot":"","sources":["../../../src/theglobalfuel/components/StateViews.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAK3C,UAAU,gBAAgB;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CAK5C,CAAC;AAEF,UAAU,cAAc;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,SAAS,EAAE,EAAE,CAAC,cAAc,CA2BxC,CAAC;AAEF,UAAU,YAAY;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,OAAO,EAAE,EAAE,CAAC,YAAY,CAWpC,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { cn as e } from "../utils/cn.js";
|
|
2
|
+
import { AlertCircle as t } from "lucide-react";
|
|
3
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
|
+
import { Spinner as i } from "@burdenoff/fe-libs/ui";
|
|
5
|
+
//#region src/theglobalfuel/components/StateViews.tsx
|
|
6
|
+
var a = ({ label: t = "Loading…", className: a }) => /* @__PURE__ */ r("div", {
|
|
7
|
+
className: e("flex min-h-[40vh] flex-col items-center justify-center gap-3", a),
|
|
8
|
+
children: [/* @__PURE__ */ n(i, { size: "lg" }), /* @__PURE__ */ n("p", {
|
|
9
|
+
className: "text-sm text-text-secondary",
|
|
10
|
+
children: t
|
|
11
|
+
})]
|
|
12
|
+
}), o = ({ title: i = "Something went wrong", message: a, onRetry: o, className: s }) => /* @__PURE__ */ r("div", {
|
|
13
|
+
className: e("flex min-h-[40vh] flex-col items-center justify-center gap-4 text-center", s),
|
|
14
|
+
children: [
|
|
15
|
+
/* @__PURE__ */ n(t, { className: "h-10 w-10 text-status-error-text" }),
|
|
16
|
+
/* @__PURE__ */ r("div", { children: [/* @__PURE__ */ n("h2", {
|
|
17
|
+
className: "text-lg font-semibold text-text-primary",
|
|
18
|
+
children: i
|
|
19
|
+
}), a && /* @__PURE__ */ n("p", {
|
|
20
|
+
className: "mt-1 max-w-md text-sm text-text-secondary",
|
|
21
|
+
children: a
|
|
22
|
+
})] }),
|
|
23
|
+
o && /* @__PURE__ */ n("button", {
|
|
24
|
+
type: "button",
|
|
25
|
+
onClick: o,
|
|
26
|
+
className: "rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90",
|
|
27
|
+
children: "Retry"
|
|
28
|
+
})
|
|
29
|
+
]
|
|
30
|
+
}), s = ({ title: t, description: i, action: a, children: o, className: s }) => /* @__PURE__ */ r("section", {
|
|
31
|
+
className: e("mt-8 first:mt-0", s),
|
|
32
|
+
children: [/* @__PURE__ */ r("div", {
|
|
33
|
+
className: "mb-3 flex items-end justify-between gap-3",
|
|
34
|
+
children: [/* @__PURE__ */ r("div", { children: [/* @__PURE__ */ n("h2", {
|
|
35
|
+
className: "text-base font-semibold text-text-primary",
|
|
36
|
+
children: t
|
|
37
|
+
}), i && /* @__PURE__ */ n("p", {
|
|
38
|
+
className: "mt-0.5 text-sm text-text-secondary",
|
|
39
|
+
children: i
|
|
40
|
+
})] }), a && /* @__PURE__ */ n("div", {
|
|
41
|
+
className: "shrink-0",
|
|
42
|
+
children: a
|
|
43
|
+
})]
|
|
44
|
+
}), o]
|
|
45
|
+
});
|
|
46
|
+
//#endregion
|
|
47
|
+
export { o as ErrorView, a as LoadingView, s as Section };
|
|
48
|
+
|
|
49
|
+
//# sourceMappingURL=StateViews.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StateViews.js","names":[],"sources":["../../../src/theglobalfuel/components/StateViews.tsx"],"sourcesContent":["/**\n * Shared loading / error / section state views\n * @module theglobalfuel/components\n */\n\nimport type { FC, ReactNode } from 'react';\nimport { AlertCircle } from 'lucide-react';\nimport { Spinner } from '@burdenoff/fe-libs/ui';\nimport { cn } from '../utils/cn';\n\ninterface LoadingViewProps {\n label?: string;\n className?: string;\n}\n\nexport const LoadingView: FC<LoadingViewProps> = ({ label = 'Loading…', className }) => (\n <div className={cn('flex min-h-[40vh] flex-col items-center justify-center gap-3', className)}>\n <Spinner size=\"lg\" />\n <p className=\"text-sm text-text-secondary\">{label}</p>\n </div>\n);\n\ninterface ErrorViewProps {\n title?: string;\n message?: string;\n onRetry?: () => void;\n className?: string;\n}\n\nexport const ErrorView: FC<ErrorViewProps> = ({\n title = 'Something went wrong',\n message,\n onRetry,\n className,\n}) => (\n <div\n className={cn(\n 'flex min-h-[40vh] flex-col items-center justify-center gap-4 text-center',\n className\n )}\n >\n <AlertCircle className=\"h-10 w-10 text-status-error-text\" />\n <div>\n <h2 className=\"text-lg font-semibold text-text-primary\">{title}</h2>\n {message && <p className=\"mt-1 max-w-md text-sm text-text-secondary\">{message}</p>}\n </div>\n {onRetry && (\n <button\n type=\"button\"\n onClick={onRetry}\n className=\"rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90\"\n >\n Retry\n </button>\n )}\n </div>\n);\n\ninterface SectionProps {\n title: string;\n description?: string;\n action?: ReactNode;\n children: ReactNode;\n className?: string;\n}\n\nexport const Section: FC<SectionProps> = ({ title, description, action, children, className }) => (\n <section className={cn('mt-8 first:mt-0', className)}>\n <div className=\"mb-3 flex items-end justify-between gap-3\">\n <div>\n <h2 className=\"text-base font-semibold text-text-primary\">{title}</h2>\n {description && <p className=\"mt-0.5 text-sm text-text-secondary\">{description}</p>}\n </div>\n {action && <div className=\"shrink-0\">{action}</div>}\n </div>\n {children}\n </section>\n);\n"],"mappings":";;;;;AAeA,IAAa,KAAqC,EAAE,WAAQ,YAAY,mBACtE,kBAAC,OAAD;CAAK,WAAW,EAAG,gEAAgE,EAAU;WAA7F,CACE,kBAAC,GAAD,EAAS,MAAK,MAAO,CAAA,EACrB,kBAAC,KAAD;EAAG,WAAU;YAA+B;EAAU,CAAA,CAClD;IAUK,KAAiC,EAC5C,WAAQ,wBACR,YACA,YACA,mBAEA,kBAAC,OAAD;CACE,WAAW,EACT,4EACA,EACD;WAJH;EAME,kBAAC,GAAD,EAAa,WAAU,oCAAqC,CAAA;EAC5D,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,MAAD;GAAI,WAAU;aAA2C;GAAW,CAAA,EACnE,KAAW,kBAAC,KAAD;GAAG,WAAU;aAA6C;GAAY,CAAA,CAC9E,EAAA,CAAA;EACL,KACC,kBAAC,UAAD;GACE,MAAK;GACL,SAAS;GACT,WAAU;aACX;GAEQ,CAAA;EAEP;IAWK,KAA6B,EAAE,UAAO,gBAAa,WAAQ,aAAU,mBAChF,kBAAC,WAAD;CAAS,WAAW,EAAG,mBAAmB,EAAU;WAApD,CACE,kBAAC,OAAD;EAAK,WAAU;YAAf,CACE,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,MAAD;GAAI,WAAU;aAA6C;GAAW,CAAA,EACrE,KAAe,kBAAC,KAAD;GAAG,WAAU;aAAsC;GAAgB,CAAA,CAC/E,EAAA,CAAA,EACL,KAAU,kBAAC,OAAD;GAAK,WAAU;aAAY;GAAa,CAAA,CAC/C;KACL,EACO"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StatusBadge.d.ts","sourceRoot":"","sources":["../../../src/theglobalfuel/components/StatusBadge.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAIhC,UAAU,gBAAgB;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AA+ED,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CAsB5C,CAAC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { cn as e } from "../utils/cn.js";
|
|
2
|
+
import { formatEnumLabel as t } from "../utils/formatters.js";
|
|
3
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
|
+
//#region src/theglobalfuel/components/StatusBadge.tsx
|
|
5
|
+
var i = {
|
|
6
|
+
success: "bg-status-success-bg-subtle text-status-success-text",
|
|
7
|
+
warning: "bg-status-warning-bg-subtle text-status-warning-text",
|
|
8
|
+
destructive: "bg-status-error-bg-subtle text-status-error-text",
|
|
9
|
+
secondary: "bg-bg-sunken text-text-secondary",
|
|
10
|
+
info: "bg-[var(--color-accent-soft)] text-text-primary",
|
|
11
|
+
outline: "border border-border-seam text-text-primary"
|
|
12
|
+
}, a = new Set([
|
|
13
|
+
"PRODUCING",
|
|
14
|
+
"ACTIVE",
|
|
15
|
+
"IN_TRANSIT",
|
|
16
|
+
"LOADING"
|
|
17
|
+
]), o = {
|
|
18
|
+
EXPLORATION: "secondary",
|
|
19
|
+
APPRAISAL: "info",
|
|
20
|
+
DEVELOPMENT: "warning",
|
|
21
|
+
PRODUCING: "success",
|
|
22
|
+
SUSPENDED: "warning",
|
|
23
|
+
DECOMMISSIONING: "warning",
|
|
24
|
+
RETIRED: "outline",
|
|
25
|
+
DRAFT: "secondary",
|
|
26
|
+
NEGOTIATION: "info",
|
|
27
|
+
SIGNED: "info",
|
|
28
|
+
ACTIVE: "success",
|
|
29
|
+
COMPLETED: "success",
|
|
30
|
+
TERMINATED: "destructive",
|
|
31
|
+
BUY: "info",
|
|
32
|
+
SELL: "secondary",
|
|
33
|
+
FIXED: "outline",
|
|
34
|
+
INDEX_LINKED: "outline",
|
|
35
|
+
FORMULA: "outline",
|
|
36
|
+
SPOT: "secondary",
|
|
37
|
+
SCHEDULED: "secondary",
|
|
38
|
+
LOADING: "info",
|
|
39
|
+
IN_TRANSIT: "warning",
|
|
40
|
+
DELIVERED: "success",
|
|
41
|
+
CANCELLED: "destructive",
|
|
42
|
+
AVAILABLE: "success",
|
|
43
|
+
RESERVED: "info",
|
|
44
|
+
CONSUMED: "outline",
|
|
45
|
+
WRITTEN_OFF: "destructive",
|
|
46
|
+
PENDING: "secondary",
|
|
47
|
+
SUBMITTED: "info",
|
|
48
|
+
APPROVED: "success",
|
|
49
|
+
REJECTED: "destructive",
|
|
50
|
+
EXPIRED: "warning",
|
|
51
|
+
REVOKED: "destructive",
|
|
52
|
+
SCOPE_1: "destructive",
|
|
53
|
+
SCOPE_2: "warning",
|
|
54
|
+
SCOPE_3: "info",
|
|
55
|
+
PROVED: "success",
|
|
56
|
+
PROBABLE: "info",
|
|
57
|
+
POSSIBLE: "warning",
|
|
58
|
+
CONTINGENT: "secondary",
|
|
59
|
+
PROSPECTIVE: "outline"
|
|
60
|
+
}, s = ({ status: s, className: c }) => {
|
|
61
|
+
let l = s.toUpperCase(), u = o[l] ?? "secondary", d = a.has(l);
|
|
62
|
+
return /* @__PURE__ */ r("span", {
|
|
63
|
+
className: e("inline-flex items-center gap-1.5 rounded-full px-2.5 py-0.5 text-xs font-medium", i[u], c),
|
|
64
|
+
children: [d && /* @__PURE__ */ n("span", {
|
|
65
|
+
"aria-hidden": "true",
|
|
66
|
+
className: "size-1.5 rounded-full bg-current motion-safe:animate-vc-glow-pulse"
|
|
67
|
+
}), t(s)]
|
|
68
|
+
});
|
|
69
|
+
};
|
|
70
|
+
//#endregion
|
|
71
|
+
export { s as StatusBadge };
|
|
72
|
+
|
|
73
|
+
//# sourceMappingURL=StatusBadge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StatusBadge.js","names":[],"sources":["../../../src/theglobalfuel/components/StatusBadge.tsx"],"sourcesContent":["/**\n * Status Badge Component\n * @module theglobalfuel/components\n *\n * A colored badge for TheGlobalFuel domain statuses (asset lifecycle, contract\n * lifecycle & side, shipment status, inventory status, compliance status,\n * emission scope, reserve category, pricing basis) with semantic color mapping.\n * Accepts the raw server enum value.\n */\n\nimport type { FC } from 'react';\nimport { cn } from '../utils/cn';\nimport { formatEnumLabel } from '../utils/formatters';\n\ninterface StatusBadgeProps {\n status: string;\n className?: string;\n}\n\ntype BadgeVariant = 'success' | 'warning' | 'destructive' | 'secondary' | 'info' | 'outline';\n\nconst variantStyles: Record<BadgeVariant, string> = {\n success: 'bg-status-success-bg-subtle text-status-success-text',\n warning: 'bg-status-warning-bg-subtle text-status-warning-text',\n destructive: 'bg-status-error-bg-subtle text-status-error-text',\n secondary: 'bg-bg-sunken text-text-secondary',\n info: 'bg-[var(--color-accent-soft)] text-text-primary',\n outline: 'border border-border-seam text-text-primary',\n};\n\n// Statuses that represent a \"live\" / in-progress condition get a subtle,\n// opacity-only glow pulse (reduced-motion safe via motion-safe:).\nconst liveStatuses = new Set(['PRODUCING', 'ACTIVE', 'IN_TRANSIT', 'LOADING']);\n\nconst statusVariantMap: Record<string, BadgeVariant> = {\n // Asset lifecycle\n EXPLORATION: 'secondary',\n APPRAISAL: 'info',\n DEVELOPMENT: 'warning',\n PRODUCING: 'success',\n SUSPENDED: 'warning',\n DECOMMISSIONING: 'warning',\n RETIRED: 'outline',\n\n // Offtake-contract lifecycle\n DRAFT: 'secondary',\n NEGOTIATION: 'info',\n SIGNED: 'info',\n ACTIVE: 'success',\n COMPLETED: 'success',\n TERMINATED: 'destructive',\n\n // Contract side\n BUY: 'info',\n SELL: 'secondary',\n\n // Pricing basis\n FIXED: 'outline',\n INDEX_LINKED: 'outline',\n FORMULA: 'outline',\n SPOT: 'secondary',\n\n // Shipment status\n SCHEDULED: 'secondary',\n LOADING: 'info',\n IN_TRANSIT: 'warning',\n DELIVERED: 'success',\n CANCELLED: 'destructive',\n\n // Inventory status\n AVAILABLE: 'success',\n RESERVED: 'info',\n CONSUMED: 'outline',\n WRITTEN_OFF: 'destructive',\n\n // Compliance status\n PENDING: 'secondary',\n SUBMITTED: 'info',\n APPROVED: 'success',\n REJECTED: 'destructive',\n EXPIRED: 'warning',\n REVOKED: 'destructive',\n\n // Emission scope\n SCOPE_1: 'destructive',\n SCOPE_2: 'warning',\n SCOPE_3: 'info',\n\n // Reserve category\n PROVED: 'success',\n PROBABLE: 'info',\n POSSIBLE: 'warning',\n CONTINGENT: 'secondary',\n PROSPECTIVE: 'outline',\n};\n\nexport const StatusBadge: FC<StatusBadgeProps> = ({ status, className }) => {\n const key = status.toUpperCase();\n const variant = statusVariantMap[key] ?? 'secondary';\n const isLive = liveStatuses.has(key);\n\n return (\n <span\n className={cn(\n 'inline-flex items-center gap-1.5 rounded-full px-2.5 py-0.5 text-xs font-medium',\n variantStyles[variant],\n className\n )}\n >\n {isLive && (\n <span\n aria-hidden=\"true\"\n className=\"size-1.5 rounded-full bg-current motion-safe:animate-vc-glow-pulse\"\n />\n )}\n {formatEnumLabel(status)}\n </span>\n );\n};\n"],"mappings":";;;;AAqBA,IAAM,IAA8C;CAClD,SAAS;CACT,SAAS;CACT,aAAa;CACb,WAAW;CACX,MAAM;CACN,SAAS;CACV,EAIK,IAAe,IAAI,IAAI;CAAC;CAAa;CAAU;CAAc;CAAU,CAAC,EAExE,IAAiD;CAErD,aAAa;CACb,WAAW;CACX,aAAa;CACb,WAAW;CACX,WAAW;CACX,iBAAiB;CACjB,SAAS;CAGT,OAAO;CACP,aAAa;CACb,QAAQ;CACR,QAAQ;CACR,WAAW;CACX,YAAY;CAGZ,KAAK;CACL,MAAM;CAGN,OAAO;CACP,cAAc;CACd,SAAS;CACT,MAAM;CAGN,WAAW;CACX,SAAS;CACT,YAAY;CACZ,WAAW;CACX,WAAW;CAGX,WAAW;CACX,UAAU;CACV,UAAU;CACV,aAAa;CAGb,SAAS;CACT,WAAW;CACX,UAAU;CACV,UAAU;CACV,SAAS;CACT,SAAS;CAGT,SAAS;CACT,SAAS;CACT,SAAS;CAGT,QAAQ;CACR,UAAU;CACV,UAAU;CACV,YAAY;CACZ,aAAa;CACd,EAEY,KAAqC,EAAE,WAAQ,mBAAgB;CAC1E,IAAM,IAAM,EAAO,aAAa,EAC1B,IAAU,EAAiB,MAAQ,aACnC,IAAS,EAAa,IAAI,EAAI;AAEpC,QACE,kBAAC,QAAD;EACE,WAAW,EACT,mFACA,EAAc,IACd,EACD;YALH,CAOG,KACC,kBAAC,QAAD;GACE,eAAY;GACZ,WAAU;GACV,CAAA,EAEH,EAAgB,EAAO,CACnB"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface TabItem<V extends string> {
|
|
4
|
+
value: V;
|
|
5
|
+
label: string;
|
|
6
|
+
icon?: ReactNode;
|
|
7
|
+
count?: number;
|
|
8
|
+
}
|
|
9
|
+
interface TabsProps<V extends string> {
|
|
10
|
+
items: TabItem<V>[];
|
|
11
|
+
value: V;
|
|
12
|
+
onChange: (value: V) => void;
|
|
13
|
+
className?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare function Tabs<V extends string>({ items, value, onChange, className }: TabsProps<V>): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=Tabs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tabs.d.ts","sourceRoot":"","sources":["../../../src/theglobalfuel/components/Tabs.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,MAAM,WAAW,OAAO,CAAC,CAAC,SAAS,MAAM;IACvC,KAAK,EAAE,CAAC,CAAC;IACT,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,UAAU,SAAS,CAAC,CAAC,SAAS,MAAM;IAClC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC;IACpB,KAAK,EAAE,CAAC,CAAC;IACT,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,IAAI,CAAC,CAAC,SAAS,MAAM,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,SAAS,CAAC,CAAC,CAAC,2CAyCzF"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { cn as e } from "../utils/cn.js";
|
|
2
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
3
|
+
//#region src/theglobalfuel/components/Tabs.tsx
|
|
4
|
+
function r({ items: r, value: i, onChange: a, className: o }) {
|
|
5
|
+
return /* @__PURE__ */ t("div", {
|
|
6
|
+
role: "tablist",
|
|
7
|
+
className: e("flex flex-wrap items-center gap-1 border-b border-border-seam", o),
|
|
8
|
+
children: r.map((r) => {
|
|
9
|
+
let o = r.value === i;
|
|
10
|
+
return /* @__PURE__ */ n("button", {
|
|
11
|
+
type: "button",
|
|
12
|
+
role: "tab",
|
|
13
|
+
"aria-selected": o,
|
|
14
|
+
onClick: () => a(r.value),
|
|
15
|
+
className: e("relative -mb-px inline-flex items-center gap-2 border-b-2 px-4 py-2.5 text-sm font-medium transition-colors", o ? "border-accent text-text-primary" : "border-transparent text-text-secondary hover:text-text-primary"),
|
|
16
|
+
children: [
|
|
17
|
+
r.icon,
|
|
18
|
+
r.label,
|
|
19
|
+
typeof r.count == "number" && /* @__PURE__ */ t("span", {
|
|
20
|
+
className: e("rounded-full px-1.5 py-0.5 text-xs tabular-nums", o ? "bg-[var(--color-accent-soft)] text-text-primary" : "bg-bg-sunken text-text-secondary"),
|
|
21
|
+
children: r.count
|
|
22
|
+
})
|
|
23
|
+
]
|
|
24
|
+
}, r.value);
|
|
25
|
+
})
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
//#endregion
|
|
29
|
+
export { r as Tabs };
|
|
30
|
+
|
|
31
|
+
//# sourceMappingURL=Tabs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tabs.js","names":[],"sources":["../../../src/theglobalfuel/components/Tabs.tsx"],"sourcesContent":["/**\n * Tabs — a top-level segmented navigation control for multi-section pages\n * (Monitoring: Sensors/Measurements/Thresholds; Carbon: Ledger/Factors/Targets).\n * @module theglobalfuel/components\n *\n * Visually heavier than {@link FilterTabs} (underline-style page tabs vs a pill\n * filter). Purely presentational — the parent owns the active-tab state.\n */\n\nimport type { ReactNode } from 'react';\nimport { cn } from '../utils/cn';\n\nexport interface TabItem<V extends string> {\n value: V;\n label: string;\n icon?: ReactNode;\n count?: number;\n}\n\ninterface TabsProps<V extends string> {\n items: TabItem<V>[];\n value: V;\n onChange: (value: V) => void;\n className?: string;\n}\n\nexport function Tabs<V extends string>({ items, value, onChange, className }: TabsProps<V>) {\n return (\n <div\n role=\"tablist\"\n className={cn('flex flex-wrap items-center gap-1 border-b border-border-seam', className)}\n >\n {items.map((item) => {\n const active = item.value === value;\n return (\n <button\n key={item.value}\n type=\"button\"\n role=\"tab\"\n aria-selected={active}\n onClick={() => onChange(item.value)}\n className={cn(\n 'relative -mb-px inline-flex items-center gap-2 border-b-2 px-4 py-2.5 text-sm font-medium transition-colors',\n active\n ? 'border-accent text-text-primary'\n : 'border-transparent text-text-secondary hover:text-text-primary'\n )}\n >\n {item.icon}\n {item.label}\n {typeof item.count === 'number' && (\n <span\n className={cn(\n 'rounded-full px-1.5 py-0.5 text-xs tabular-nums',\n active\n ? 'bg-[var(--color-accent-soft)] text-text-primary'\n : 'bg-bg-sunken text-text-secondary'\n )}\n >\n {item.count}\n </span>\n )}\n </button>\n );\n })}\n </div>\n );\n}\n"],"mappings":";;;AA0BA,SAAgB,EAAuB,EAAE,UAAO,UAAO,aAAU,gBAA2B;AAC1F,QACE,kBAAC,OAAD;EACE,MAAK;EACL,WAAW,EAAG,iEAAiE,EAAU;YAExF,EAAM,KAAK,MAAS;GACnB,IAAM,IAAS,EAAK,UAAU;AAC9B,UACE,kBAAC,UAAD;IAEE,MAAK;IACL,MAAK;IACL,iBAAe;IACf,eAAe,EAAS,EAAK,MAAM;IACnC,WAAW,EACT,+GACA,IACI,oCACA,iEACL;cAXH;KAaG,EAAK;KACL,EAAK;KACL,OAAO,EAAK,SAAU,YACrB,kBAAC,QAAD;MACE,WAAW,EACT,mDACA,IACI,oDACA,mCACL;gBAEA,EAAK;MACD,CAAA;KAEF;MA1BF,EAAK,MA0BH;IAEX;EACE,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TheDiscussion — a comment thread on any eco entity (Integration B).
|
|
3
|
+
* @module theglobalfuel/components/TheDiscussion
|
|
4
|
+
*
|
|
5
|
+
* Reuses the platform EntityComment API (`getEntityComments` /
|
|
6
|
+
* `createEntityComment`) keyed by `(entityType, entityId)` — no eco-svc change.
|
|
7
|
+
* Renders root comments (author, body, time) + a composer. Robust to empty
|
|
8
|
+
* state and errors.
|
|
9
|
+
*/
|
|
10
|
+
interface TheDiscussionProps {
|
|
11
|
+
entityType: string;
|
|
12
|
+
entityId: string;
|
|
13
|
+
title?: string;
|
|
14
|
+
description?: string;
|
|
15
|
+
}
|
|
16
|
+
export declare function TheDiscussion({ entityType, entityId, title, description, }: TheDiscussionProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=TheDiscussion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TheDiscussion.d.ts","sourceRoot":"","sources":["../../../src/theglobalfuel/components/TheDiscussion.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAWH,UAAU,kBAAkB;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAaD,wBAAgB,aAAa,CAAC,EAC5B,UAAU,EACV,QAAQ,EACR,KAAoB,EACpB,WAAkE,GACnE,EAAE,kBAAkB,2CAoGpB"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { useTheGlobalFuel as e } from "../context/TheGlobalFuelContext.js";
|
|
2
|
+
import { formatDateTime as t } from "../utils/formatters.js";
|
|
3
|
+
import { ErrorView as n, LoadingView as r, Section as i } from "./StateViews.js";
|
|
4
|
+
import { EmptyState as a } from "./EmptyState.js";
|
|
5
|
+
import "../context/index.js";
|
|
6
|
+
import { useTheComments as o, useTheCreateComment as s } from "../hooks/useTheComments.js";
|
|
7
|
+
import "../hooks/index.js";
|
|
8
|
+
import { useState as c } from "react";
|
|
9
|
+
import { MessageSquare as l, Send as u } from "lucide-react";
|
|
10
|
+
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
11
|
+
import { Button as p, Textarea as m } from "@burdenoff/fe-libs/ui";
|
|
12
|
+
//#region src/theglobalfuel/components/TheDiscussion.tsx
|
|
13
|
+
function h(e) {
|
|
14
|
+
if (!e) return "You";
|
|
15
|
+
let t = [e.firstName, e.lastName].filter(Boolean).join(" ").trim();
|
|
16
|
+
return e.name || t || e.username || e.email || "You";
|
|
17
|
+
}
|
|
18
|
+
function g(e) {
|
|
19
|
+
let t = e.trim();
|
|
20
|
+
return t ? t[0].toUpperCase() : "?";
|
|
21
|
+
}
|
|
22
|
+
function _({ entityType: _, entityId: v, title: y = "Discussion", description: b = "Coordinate review and verification with your team." }) {
|
|
23
|
+
let { currentUser: x } = e(), { data: S, isLoading: C, isError: w, refetch: T } = o(_, v), E = s(_, v), [D, O] = c(""), [k, A] = c(null), j = h(x), M = (e) => x?.id && e.authorId === x.id ? j : "Workspace member", N = async () => {
|
|
24
|
+
let e = D.trim();
|
|
25
|
+
if (e) {
|
|
26
|
+
A(null);
|
|
27
|
+
try {
|
|
28
|
+
await E.mutateAsync(e), O("");
|
|
29
|
+
} catch (e) {
|
|
30
|
+
A(e instanceof Error ? e.message : "Failed to post comment.");
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}, P = S?.items ?? [];
|
|
34
|
+
return /* @__PURE__ */ d(i, {
|
|
35
|
+
title: y,
|
|
36
|
+
description: b,
|
|
37
|
+
children: /* @__PURE__ */ f("div", {
|
|
38
|
+
className: "rounded-xl border border-border-seam bg-bg-surface/40 p-4",
|
|
39
|
+
children: [/* @__PURE__ */ f("div", {
|
|
40
|
+
className: "flex gap-3",
|
|
41
|
+
children: [/* @__PURE__ */ d("div", {
|
|
42
|
+
className: "flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-action-primary-bg/15 text-sm font-semibold text-action-primary-bg",
|
|
43
|
+
children: g(j)
|
|
44
|
+
}), /* @__PURE__ */ f("div", {
|
|
45
|
+
className: "flex-1",
|
|
46
|
+
children: [/* @__PURE__ */ d(m, {
|
|
47
|
+
value: D,
|
|
48
|
+
onChange: (e) => O(e.target.value),
|
|
49
|
+
placeholder: "Add a comment for your team…",
|
|
50
|
+
rows: 2
|
|
51
|
+
}), /* @__PURE__ */ f("div", {
|
|
52
|
+
className: "mt-2 flex items-center justify-end gap-2",
|
|
53
|
+
children: [k && /* @__PURE__ */ d("span", {
|
|
54
|
+
className: "mr-auto text-xs text-status-error-text",
|
|
55
|
+
children: k
|
|
56
|
+
}), /* @__PURE__ */ f(p, {
|
|
57
|
+
size: "sm",
|
|
58
|
+
onClick: N,
|
|
59
|
+
disabled: !D.trim() || E.isPending,
|
|
60
|
+
children: [/* @__PURE__ */ d(u, { className: "mr-1.5 h-4 w-4" }), E.isPending ? "Posting…" : "Comment"]
|
|
61
|
+
})]
|
|
62
|
+
})]
|
|
63
|
+
})]
|
|
64
|
+
}), /* @__PURE__ */ d("div", {
|
|
65
|
+
className: "mt-4 border-t border-border-seam pt-4",
|
|
66
|
+
children: C ? /* @__PURE__ */ d(r, { label: "Loading discussion…" }) : w ? /* @__PURE__ */ d(n, {
|
|
67
|
+
message: "Couldn't load the discussion.",
|
|
68
|
+
onRetry: () => T()
|
|
69
|
+
}) : P.length === 0 ? /* @__PURE__ */ d(a, {
|
|
70
|
+
illustration: "empty-data",
|
|
71
|
+
icon: /* @__PURE__ */ d(l, { className: "h-9 w-9" }),
|
|
72
|
+
title: "No comments yet",
|
|
73
|
+
description: "Start the discussion by adding the first comment."
|
|
74
|
+
}) : /* @__PURE__ */ d("ul", {
|
|
75
|
+
className: "flex flex-col gap-4",
|
|
76
|
+
children: P.map((e) => {
|
|
77
|
+
let n = M(e), r = e.content.text ?? e.content.markdown ?? "";
|
|
78
|
+
return /* @__PURE__ */ f("li", {
|
|
79
|
+
className: "flex gap-3",
|
|
80
|
+
children: [/* @__PURE__ */ d("div", {
|
|
81
|
+
className: "flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-bg-sunken text-sm font-semibold text-text-secondary",
|
|
82
|
+
children: g(n)
|
|
83
|
+
}), /* @__PURE__ */ f("div", {
|
|
84
|
+
className: "min-w-0 flex-1",
|
|
85
|
+
children: [/* @__PURE__ */ f("div", {
|
|
86
|
+
className: "flex flex-wrap items-baseline gap-x-2",
|
|
87
|
+
children: [/* @__PURE__ */ d("span", {
|
|
88
|
+
className: "text-sm font-semibold text-text-primary",
|
|
89
|
+
children: n
|
|
90
|
+
}), /* @__PURE__ */ f("span", {
|
|
91
|
+
className: "text-xs text-text-tertiary",
|
|
92
|
+
children: [t(e.createdAt), e.edited ? " · edited" : ""]
|
|
93
|
+
})]
|
|
94
|
+
}), /* @__PURE__ */ d("p", {
|
|
95
|
+
className: "mt-0.5 whitespace-pre-wrap break-words text-sm text-text-secondary",
|
|
96
|
+
children: r
|
|
97
|
+
})]
|
|
98
|
+
})]
|
|
99
|
+
}, e.id);
|
|
100
|
+
})
|
|
101
|
+
})
|
|
102
|
+
})]
|
|
103
|
+
})
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
//#endregion
|
|
107
|
+
export { _ as TheDiscussion };
|
|
108
|
+
|
|
109
|
+
//# sourceMappingURL=TheDiscussion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TheDiscussion.js","names":[],"sources":["../../../src/theglobalfuel/components/TheDiscussion.tsx"],"sourcesContent":["/**\n * TheDiscussion — a comment thread on any eco entity (Integration B).\n * @module theglobalfuel/components/TheDiscussion\n *\n * Reuses the platform EntityComment API (`getEntityComments` /\n * `createEntityComment`) keyed by `(entityType, entityId)` — no eco-svc change.\n * Renders root comments (author, body, time) + a composer. Robust to empty\n * state and errors.\n */\n\nimport { useState } from 'react';\nimport { MessageSquare, Send } from 'lucide-react';\nimport { Button, Textarea } from '@burdenoff/fe-libs/ui';\nimport { Section, LoadingView, ErrorView } from './StateViews';\nimport { EmptyState } from './EmptyState';\nimport { useTheGlobalFuel } from '../context';\nimport { useTheComments, useTheCreateComment, type TheComment } from '../hooks';\nimport { formatDateTime } from '../utils/formatters';\n\ninterface TheDiscussionProps {\n entityType: string;\n entityId: string;\n title?: string;\n description?: string;\n}\n\nfunction displayName(user: ReturnType<typeof useTheGlobalFuel>['currentUser']): string {\n if (!user) return 'You';\n const full = [user.firstName, user.lastName].filter(Boolean).join(' ').trim();\n return user.name || full || user.username || user.email || 'You';\n}\n\nfunction initialFor(label: string): string {\n const trimmed = label.trim();\n return trimmed ? trimmed[0]!.toUpperCase() : '?';\n}\n\nexport function TheDiscussion({\n entityType,\n entityId,\n title = 'Discussion',\n description = 'Coordinate review and verification with your team.',\n}: TheDiscussionProps) {\n const { currentUser } = useTheGlobalFuel();\n const { data, isLoading, isError, refetch } = useTheComments(entityType, entityId);\n const createComment = useTheCreateComment(entityType, entityId);\n\n const [draft, setDraft] = useState('');\n const [error, setError] = useState<string | null>(null);\n\n const selfName = displayName(currentUser);\n\n const authorLabel = (comment: TheComment): string =>\n currentUser?.id && comment.authorId === currentUser.id ? selfName : 'Workspace member';\n\n const handleSubmit = async () => {\n const text = draft.trim();\n if (!text) return;\n setError(null);\n try {\n await createComment.mutateAsync(text);\n setDraft('');\n } catch (err) {\n setError(err instanceof Error ? err.message : 'Failed to post comment.');\n }\n };\n\n const comments = data?.items ?? [];\n\n return (\n <Section title={title} description={description}>\n <div className=\"rounded-xl border border-border-seam bg-bg-surface/40 p-4\">\n {/* Composer */}\n <div className=\"flex gap-3\">\n <div className=\"flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-action-primary-bg/15 text-sm font-semibold text-action-primary-bg\">\n {initialFor(selfName)}\n </div>\n <div className=\"flex-1\">\n <Textarea\n value={draft}\n onChange={(e) => setDraft(e.target.value)}\n placeholder=\"Add a comment for your team…\"\n rows={2}\n />\n <div className=\"mt-2 flex items-center justify-end gap-2\">\n {error && <span className=\"mr-auto text-xs text-status-error-text\">{error}</span>}\n <Button\n size=\"sm\"\n onClick={handleSubmit}\n disabled={!draft.trim() || createComment.isPending}\n >\n <Send className=\"mr-1.5 h-4 w-4\" />\n {createComment.isPending ? 'Posting…' : 'Comment'}\n </Button>\n </div>\n </div>\n </div>\n\n {/* Thread */}\n <div className=\"mt-4 border-t border-border-seam pt-4\">\n {isLoading ? (\n <LoadingView label=\"Loading discussion…\" />\n ) : isError ? (\n <ErrorView message=\"Couldn't load the discussion.\" onRetry={() => refetch()} />\n ) : comments.length === 0 ? (\n <EmptyState\n illustration=\"empty-data\"\n icon={<MessageSquare className=\"h-9 w-9\" />}\n title=\"No comments yet\"\n description=\"Start the discussion by adding the first comment.\"\n />\n ) : (\n <ul className=\"flex flex-col gap-4\">\n {comments.map((comment) => {\n const label = authorLabel(comment);\n const body = comment.content.text ?? comment.content.markdown ?? '';\n return (\n <li key={comment.id} className=\"flex gap-3\">\n <div className=\"flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-bg-sunken text-sm font-semibold text-text-secondary\">\n {initialFor(label)}\n </div>\n <div className=\"min-w-0 flex-1\">\n <div className=\"flex flex-wrap items-baseline gap-x-2\">\n <span className=\"text-sm font-semibold text-text-primary\">{label}</span>\n <span className=\"text-xs text-text-tertiary\">\n {formatDateTime(comment.createdAt)}\n {comment.edited ? ' · edited' : ''}\n </span>\n </div>\n <p className=\"mt-0.5 whitespace-pre-wrap break-words text-sm text-text-secondary\">\n {body}\n </p>\n </div>\n </li>\n );\n })}\n </ul>\n )}\n </div>\n </div>\n </Section>\n );\n}\n"],"mappings":";;;;;;;;;;;;AA0BA,SAAS,EAAY,GAAkE;AACrF,KAAI,CAAC,EAAM,QAAO;CAClB,IAAM,IAAO,CAAC,EAAK,WAAW,EAAK,SAAS,CAAC,OAAO,QAAQ,CAAC,KAAK,IAAI,CAAC,MAAM;AAC7E,QAAO,EAAK,QAAQ,KAAQ,EAAK,YAAY,EAAK,SAAS;;AAG7D,SAAS,EAAW,GAAuB;CACzC,IAAM,IAAU,EAAM,MAAM;AAC5B,QAAO,IAAU,EAAQ,GAAI,aAAa,GAAG;;AAG/C,SAAgB,EAAc,EAC5B,eACA,aACA,WAAQ,cACR,iBAAc,wDACO;CACrB,IAAM,EAAE,mBAAgB,GAAkB,EACpC,EAAE,SAAM,cAAW,YAAS,eAAY,EAAe,GAAY,EAAS,EAC5E,IAAgB,EAAoB,GAAY,EAAS,EAEzD,CAAC,GAAO,KAAY,EAAS,GAAG,EAChC,CAAC,GAAO,KAAY,EAAwB,KAAK,EAEjD,IAAW,EAAY,EAAY,EAEnC,KAAe,MACnB,GAAa,MAAM,EAAQ,aAAa,EAAY,KAAK,IAAW,oBAEhE,IAAe,YAAY;EAC/B,IAAM,IAAO,EAAM,MAAM;AACpB,SACL;KAAS,KAAK;AACd,OAAI;AAEF,IADA,MAAM,EAAc,YAAY,EAAK,EACrC,EAAS,GAAG;YACL,GAAK;AACZ,MAAS,aAAe,QAAQ,EAAI,UAAU,0BAA0B;;;IAItE,IAAW,GAAM,SAAS,EAAE;AAElC,QACE,kBAAC,GAAD;EAAgB;EAAoB;YAClC,kBAAC,OAAD;GAAK,WAAU;aAAf,CAEE,kBAAC,OAAD;IAAK,WAAU;cAAf,CACE,kBAAC,OAAD;KAAK,WAAU;eACZ,EAAW,EAAS;KACjB,CAAA,EACN,kBAAC,OAAD;KAAK,WAAU;eAAf,CACE,kBAAC,GAAD;MACE,OAAO;MACP,WAAW,MAAM,EAAS,EAAE,OAAO,MAAM;MACzC,aAAY;MACZ,MAAM;MACN,CAAA,EACF,kBAAC,OAAD;MAAK,WAAU;gBAAf,CACG,KAAS,kBAAC,QAAD;OAAM,WAAU;iBAA0C;OAAa,CAAA,EACjF,kBAAC,GAAD;OACE,MAAK;OACL,SAAS;OACT,UAAU,CAAC,EAAM,MAAM,IAAI,EAAc;iBAH3C,CAKE,kBAAC,GAAD,EAAM,WAAU,kBAAmB,CAAA,EAClC,EAAc,YAAY,aAAa,UACjC;SACL;QACF;OACF;OAGN,kBAAC,OAAD;IAAK,WAAU;cACZ,IACC,kBAAC,GAAD,EAAa,OAAM,uBAAwB,CAAA,GACzC,IACF,kBAAC,GAAD;KAAW,SAAQ;KAAgC,eAAe,GAAS;KAAI,CAAA,GAC7E,EAAS,WAAW,IACtB,kBAAC,GAAD;KACE,cAAa;KACb,MAAM,kBAAC,GAAD,EAAe,WAAU,WAAY,CAAA;KAC3C,OAAM;KACN,aAAY;KACZ,CAAA,GAEF,kBAAC,MAAD;KAAI,WAAU;eACX,EAAS,KAAK,MAAY;MACzB,IAAM,IAAQ,EAAY,EAAQ,EAC5B,IAAO,EAAQ,QAAQ,QAAQ,EAAQ,QAAQ,YAAY;AACjE,aACE,kBAAC,MAAD;OAAqB,WAAU;iBAA/B,CACE,kBAAC,OAAD;QAAK,WAAU;kBACZ,EAAW,EAAM;QACd,CAAA,EACN,kBAAC,OAAD;QAAK,WAAU;kBAAf,CACE,kBAAC,OAAD;SAAK,WAAU;mBAAf,CACE,kBAAC,QAAD;UAAM,WAAU;oBAA2C;UAAa,CAAA,EACxE,kBAAC,QAAD;UAAM,WAAU;oBAAhB,CACG,EAAe,EAAQ,UAAU,EACjC,EAAQ,SAAS,cAAc,GAC3B;YACH;YACN,kBAAC,KAAD;SAAG,WAAU;mBACV;SACC,CAAA,CACA;UACH;SAhBI,EAAQ,GAgBZ;OAEP;KACC,CAAA;IAEH,CAAA,CACF;;EACE,CAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TheTags — a lightweight tag control for eco entities (Integration C).
|
|
3
|
+
* @module theglobalfuel/components/TheTags
|
|
4
|
+
*
|
|
5
|
+
* The eco svc exposes no tags field, so this drives the platform tag store
|
|
6
|
+
* directly: `getEntityTags` (display), `searchTags` (+ `createTag`) to pick or
|
|
7
|
+
* create, `assignTag`/`removeTagAssignment` to link — all via the workspace
|
|
8
|
+
* gateway. No eco-svc change.
|
|
9
|
+
*/
|
|
10
|
+
interface TheTagsProps {
|
|
11
|
+
entityType: string;
|
|
12
|
+
entityId: string;
|
|
13
|
+
label?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare function TheTags({ entityType, entityId, label }: TheTagsProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=TheTags.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TheTags.d.ts","sourceRoot":"","sources":["../../../src/theglobalfuel/components/TheTags.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAoBH,UAAU,YAAY;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,OAAO,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,KAAc,EAAE,EAAE,YAAY,2CAuL7E"}
|