@burdenoff/microfe-semanticfed 2026.1109.14 → 2026.1109.15
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/semanticfed/components/AskQuestionPanel.d.ts +0 -14
- package/dist/semanticfed/components/AskQuestionPanel.js +198 -160
- package/dist/semanticfed/components/AskQuestionPanel.js.map +1 -1
- package/dist/semanticfed/components/OnboardingChecklist.js +172 -128
- package/dist/semanticfed/components/OnboardingChecklist.js.map +1 -1
- package/dist/semanticfed/components/PageHeader.d.ts +11 -0
- package/dist/semanticfed/components/PageHeader.js +21 -0
- package/dist/semanticfed/components/PageHeader.js.map +1 -0
- package/dist/semanticfed/components/SavedQueryRunsPanel.js +217 -193
- package/dist/semanticfed/components/SavedQueryRunsPanel.js.map +1 -1
- package/dist/semanticfed/components/SummaryCard.d.ts +10 -0
- package/dist/semanticfed/components/SummaryCard.js +21 -0
- package/dist/semanticfed/components/SummaryCard.js.map +1 -0
- package/dist/semanticfed/components/TableHeaders.d.ts +16 -0
- package/dist/semanticfed/components/TableHeaders.js +21 -0
- package/dist/semanticfed/components/TableHeaders.js.map +1 -0
- package/dist/semanticfed/components/askConversation.d.ts +16 -0
- package/dist/semanticfed/components/askConversation.js +7 -0
- package/dist/semanticfed/components/askConversation.js.map +1 -0
- package/dist/semanticfed/components/lineage/LineageDetails.d.ts +14 -0
- package/dist/semanticfed/components/lineage/LineageDetails.js +151 -0
- package/dist/semanticfed/components/lineage/LineageDetails.js.map +1 -0
- package/dist/semanticfed/components/lineage/LineageLanes.d.ts +11 -0
- package/dist/semanticfed/components/lineage/LineageLanes.js +78 -0
- package/dist/semanticfed/components/lineage/LineageLanes.js.map +1 -0
- package/dist/semanticfed/components/lineage/LineageToolbar.d.ts +14 -0
- package/dist/semanticfed/components/lineage/LineageToolbar.js +69 -0
- package/dist/semanticfed/components/lineage/LineageToolbar.js.map +1 -0
- package/dist/semanticfed/components/lineage/LineageWarnings.d.ts +13 -0
- package/dist/semanticfed/components/lineage/LineageWarnings.js +43 -0
- package/dist/semanticfed/components/lineage/LineageWarnings.js.map +1 -0
- package/dist/semanticfed/components/lineage/lineageModel.d.ts +26 -0
- package/dist/semanticfed/components/lineage/lineageModel.js +104 -0
- package/dist/semanticfed/components/lineage/lineageModel.js.map +1 -0
- package/dist/semanticfed/components/lineage/useLineageTrace.d.ts +17 -0
- package/dist/semanticfed/components/lineage/useLineageTrace.js +34 -0
- package/dist/semanticfed/components/lineage/useLineageTrace.js.map +1 -0
- package/dist/semanticfed/components/queryConsole/QueryHistoryCard.d.ts +10 -0
- package/dist/semanticfed/components/queryConsole/QueryHistoryCard.js +47 -0
- package/dist/semanticfed/components/queryConsole/QueryHistoryCard.js.map +1 -0
- package/dist/semanticfed/components/queryConsole/SchemaBrowser.d.ts +13 -0
- package/dist/semanticfed/components/queryConsole/SchemaBrowser.js +89 -0
- package/dist/semanticfed/components/queryConsole/SchemaBrowser.js.map +1 -0
- package/dist/semanticfed/components/queryConsole/SqlEditorCard.d.ts +14 -0
- package/dist/semanticfed/components/queryConsole/SqlEditorCard.js +69 -0
- package/dist/semanticfed/components/queryConsole/SqlEditorCard.js.map +1 -0
- package/dist/semanticfed/components/queryConsole/SqlResultCard.d.ts +14 -0
- package/dist/semanticfed/components/queryConsole/SqlResultCard.js +71 -0
- package/dist/semanticfed/components/queryConsole/SqlResultCard.js.map +1 -0
- package/dist/semanticfed/components/queryConsole/consoleHistory.d.ts +23 -0
- package/dist/semanticfed/components/queryConsole/consoleHistory.js +19 -0
- package/dist/semanticfed/components/queryConsole/consoleHistory.js.map +1 -0
- package/dist/semanticfed/hooks/useNlQuery.js +13 -10
- package/dist/semanticfed/hooks/useNlQuery.js.map +1 -1
- package/dist/semanticfed/pages/AgentsPage.js +113 -142
- package/dist/semanticfed/pages/AgentsPage.js.map +1 -1
- package/dist/semanticfed/pages/AuditPage.js +94 -75
- package/dist/semanticfed/pages/AuditPage.js.map +1 -1
- package/dist/semanticfed/pages/CollaborationPage.js +60 -64
- package/dist/semanticfed/pages/CollaborationPage.js.map +1 -1
- package/dist/semanticfed/pages/ConfigurationPage.js +82 -63
- package/dist/semanticfed/pages/ConfigurationPage.js.map +1 -1
- package/dist/semanticfed/pages/KnowledgeGraphPage.js +120 -119
- package/dist/semanticfed/pages/KnowledgeGraphPage.js.map +1 -1
- package/dist/semanticfed/pages/LineagePage.js +108 -424
- package/dist/semanticfed/pages/LineagePage.js.map +1 -1
- package/dist/semanticfed/pages/OntologyPage.js +70 -97
- package/dist/semanticfed/pages/OntologyPage.js.map +1 -1
- package/dist/semanticfed/pages/PoliciesPage.js +104 -133
- package/dist/semanticfed/pages/PoliciesPage.js.map +1 -1
- package/dist/semanticfed/pages/ProtocolPage.js +70 -74
- package/dist/semanticfed/pages/ProtocolPage.js.map +1 -1
- package/dist/semanticfed/pages/QueryConsolePage.js +160 -327
- package/dist/semanticfed/pages/QueryConsolePage.js.map +1 -1
- package/dist/semanticfed/pages/RegistryPage.js +90 -101
- package/dist/semanticfed/pages/RegistryPage.js.map +1 -1
- package/dist/semanticfed/pages/TopologyPage.js +68 -99
- package/dist/semanticfed/pages/TopologyPage.js.map +1 -1
- package/dist/semanticfed/utils/contentKeys.d.ts +16 -0
- package/dist/semanticfed/utils/contentKeys.js +14 -0
- package/dist/semanticfed/utils/contentKeys.js.map +1 -0
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LineagePage.js","names":["_Fragment","KIND_ICON","Plug","Database","Table2","Boxes","Ruler","Hash","Columns3","Layers","FileCode2","KIND_LABEL","LANES","EDGE_LABEL","DIRECTIONS","DEPTH_OPTIONS","traceLocally","reached","rootId","models","graph","n","walk","frontier","hops","depth","next","edge","from","to","forward","direction","formatObservedAt","value","date","LineagePage","useI18n","tx","translateWithFallback","t","key","fallback","params","workspace","useSemWorkspaceLineage","selectedId","setSelectedId","useState","setDirection","setDepth","search","setSearch","nodesById","useMemo","node","selected","root","lineageRootFor","record","useSemRecordLineage","highlighted","lineageEdges","query","matches","counts","byKind","upstreamEdges","downstreamEdges","nodeLabel","id","nodeKindLabel","isEmpty","warnings","truncated","kind","Icon","Badge","Card","CardContent","Loader2","AlertTriangle","lineageErrorMessage","GitBranch","CardHeader","CardTitle","warning","index","Fragment","Input","Button","d","X","laneNodes","lane","isSelected","inLineage","dimmed","cn","EdgeList","ArrowUpLeft","ArrowDownRight","testId","title","edges","emptyText","other","otherEnd","observed","onSelect"],"sources":["../../../src/semanticfed/pages/LineagePage.tsx"],"sourcesContent":["/**\n * Lineage page (BOFF-4279) — end-to-end lineage of the workspace's semantic\n * layer, read from the `semLineage` API.\n *\n * The workspace graph is laid out in lanes in the direction data flows\n * (sources → tables → entities → fields → models → queries). Selecting a node\n * asks the API for that record's upstream / downstream lineage and highlights\n * it; tables and unregistered columns (which have no SemanticFed record to\n * start a traversal from) are traced over the workspace graph instead.\n */\nimport { useMemo, useState } from 'react';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell';\nimport {\n Badge,\n Button,\n Card,\n CardContent,\n CardHeader,\n CardTitle,\n Input,\n} from '@burdenoff/fe-libs/ui';\nimport {\n AlertTriangle,\n ArrowDownRight,\n ArrowUpLeft,\n Boxes,\n Columns3,\n Database,\n FileCode2,\n GitBranch,\n Hash,\n Layers,\n Loader2,\n Plug,\n Ruler,\n Table2,\n X,\n} from 'lucide-react';\nimport type { LucideIcon } from 'lucide-react';\n\nimport {\n type SemLineageDirection,\n type SemLineageEdge,\n type SemLineageGraph,\n type SemLineageNode,\n type SemLineageNodeKind,\n lineageErrorMessage,\n lineageRootFor,\n useSemRecordLineage,\n useSemWorkspaceLineage,\n} from '../hooks/useLineage';\nimport { cn } from '../utils/cn';\nimport { translateWithFallback } from '../utils/i18n';\n\nconst KIND_ICON: Record<SemLineageNodeKind, LucideIcon> = {\n CONNECTOR: Plug,\n DATA_SOURCE: Database,\n TABLE: Table2,\n ENTITY: Boxes,\n DIMENSION: Ruler,\n METRIC: Hash,\n COLUMN: Columns3,\n MODEL: Layers,\n QUERY: FileCode2,\n};\n\nconst KIND_LABEL: Record<SemLineageNodeKind, string> = {\n CONNECTOR: 'Connector',\n DATA_SOURCE: 'Data source',\n TABLE: 'Table',\n ENTITY: 'Entity',\n DIMENSION: 'Dimension',\n METRIC: 'Metric',\n COLUMN: 'Column',\n MODEL: 'Model',\n QUERY: 'Query',\n};\n\ninterface Lane {\n id: string;\n label: string;\n kinds: SemLineageNodeKind[];\n}\n\n/** Lanes in the direction data flows. */\nconst LANES: Lane[] = [\n { id: 'sources', label: 'Sources', kinds: ['CONNECTOR', 'DATA_SOURCE'] },\n { id: 'tables', label: 'Tables', kinds: ['TABLE'] },\n { id: 'entities', label: 'Entities', kinds: ['ENTITY'] },\n { id: 'fields', label: 'Fields', kinds: ['DIMENSION', 'METRIC', 'COLUMN'] },\n { id: 'models', label: 'Models', kinds: ['MODEL'] },\n { id: 'queries', label: 'Queries', kinds: ['QUERY'] },\n];\n\nconst EDGE_LABEL: Record<SemLineageEdge['kind'], string> = {\n PROVIDES: 'provides',\n HOSTS: 'hosts',\n MAPS_TO: 'maps to',\n DEFINES: 'defines',\n MEMBER_OF: 'member of',\n JOINS: 'joins',\n SERVES: 'serves',\n READ_BY: 'read by',\n EXECUTED_ON: 'executed on',\n};\n\nconst DIRECTIONS: SemLineageDirection[] = ['UPSTREAM', 'BOTH', 'DOWNSTREAM'];\nconst DEPTH_OPTIONS = [1, 2, 3, 5, 10] as const;\n\n/**\n * Upstream / downstream reach of a node over a graph that is already loaded,\n * for node kinds the API cannot start from. Mirrors the service's traversal:\n * JOINS edges are context, not data flow, so they are never followed, and a\n * model reached along the way is included but not expanded (otherwise one\n * entity would pull in every other entity and query of its model).\n */\nfunction traceLocally(\n graph: SemLineageGraph,\n rootId: string,\n direction: SemLineageDirection,\n depth: number | null\n): Set<string> {\n const reached = new Set<string>([rootId]);\n const models = new Set(graph.nodes.filter((n) => n.kind === 'MODEL').map((n) => n.id));\n const walk = (forward: boolean) => {\n let frontier = new Set([rootId]);\n let hops = 0;\n while (frontier.size > 0 && (depth === null || hops < depth)) {\n const next = new Set<string>();\n for (const edge of graph.edges) {\n if (edge.kind === 'JOINS') continue;\n const [from, to] = forward ? [edge.from, edge.to] : [edge.to, edge.from];\n if (from !== rootId && models.has(from)) continue;\n if (frontier.has(from) && !reached.has(to)) {\n reached.add(to);\n next.add(to);\n }\n }\n frontier = next;\n hops += 1;\n }\n };\n if (direction !== 'DOWNSTREAM') walk(false);\n if (direction !== 'UPSTREAM') walk(true);\n return reached;\n}\n\nfunction formatObservedAt(value: string | null): string | null {\n if (!value) return null;\n const date = new Date(value);\n return Number.isNaN(date.getTime()) ? null : date.toLocaleString();\n}\n\nexport function LineagePage() {\n const { t } = useI18n();\n const tx = (key: string, fallback: string, params?: Record<string, string | number>) =>\n translateWithFallback(t, key, fallback, params);\n\n const workspace = useSemWorkspaceLineage();\n const [selectedId, setSelectedId] = useState<string | null>(null);\n const [direction, setDirection] = useState<SemLineageDirection>('BOTH');\n const [depth, setDepth] = useState<number | null>(null);\n const [search, setSearch] = useState('');\n\n const graph = workspace.data;\n const nodesById = useMemo(\n () => new Map((graph?.nodes ?? []).map((node) => [node.id, node] as const)),\n [graph]\n );\n const selected = selectedId ? (nodesById.get(selectedId) ?? null) : null;\n const root = selected ? lineageRootFor(selected) : null;\n const record = useSemRecordLineage(root, direction, depth);\n\n // The node ids in the selected node's lineage: from the API for records,\n // traced over the workspace graph for tables and columns.\n const highlighted = useMemo<Set<string> | null>(() => {\n if (!graph || !selected) return null;\n if (root) return record.data ? new Set(record.data.nodes.map((n) => n.id)) : null;\n return traceLocally(graph, selected.id, direction, depth);\n }, [graph, selected, root, record.data, direction, depth]);\n\n const lineageEdges = useMemo<SemLineageEdge[]>(() => {\n if (!selected) return [];\n if (root) return record.data?.edges ?? [];\n if (!graph || !highlighted) return [];\n return graph.edges.filter((e) => highlighted.has(e.from) && highlighted.has(e.to));\n }, [selected, root, record.data, graph, highlighted]);\n\n const query = search.trim().toLowerCase();\n const matches = (node: SemLineageNode) =>\n query === '' ||\n node.label.toLowerCase().includes(query) ||\n (node.detail ?? '').toLowerCase().includes(query);\n\n const counts = useMemo(() => {\n const byKind: Partial<Record<SemLineageNodeKind, number>> = {};\n for (const node of graph?.nodes ?? []) byKind[node.kind] = (byKind[node.kind] ?? 0) + 1;\n return byKind;\n }, [graph]);\n\n const upstreamEdges = selected ? lineageEdges.filter((e) => e.to === selected.id) : [];\n const downstreamEdges = selected ? lineageEdges.filter((e) => e.from === selected.id) : [];\n const nodeLabel = (id: string) => nodesById.get(id)?.label ?? id;\n const nodeKindLabel = (id: string) => {\n const node = nodesById.get(id);\n return node ? tx(`semanticfed.lineage.kinds.${node.kind}`, KIND_LABEL[node.kind]) : '';\n };\n\n const isEmpty = workspace.isSuccess && (graph?.nodes.length ?? 0) === 0;\n const warnings = [...(graph?.warnings ?? [])];\n const truncated = Boolean(graph?.truncated || record.data?.truncated);\n\n return (\n <div className=\"space-y-6 p-4 sm:p-6\" data-testid=\"semanticfed-lineage-page\">\n <div\n className=\"flex flex-wrap items-center justify-between gap-3\"\n data-tour=\"semanticfed-lineage-header\"\n >\n <div>\n <h1 className=\"text-2xl font-semibold\">{tx('semanticfed.lineage.title', 'Lineage')}</h1>\n <p className=\"text-sm text-muted-foreground\">\n {tx(\n 'semanticfed.lineage.description',\n 'End-to-end lineage from connectors and data sources through tables, entities and fields to the models and saved queries that use them. Select anything to trace where its data comes from and what depends on it.'\n )}\n </p>\n </div>\n <div className=\"flex flex-wrap gap-2\" data-testid=\"lineage-counts\">\n {(Object.keys(KIND_LABEL) as SemLineageNodeKind[])\n .filter((kind) => counts[kind])\n .map((kind) => {\n const Icon = KIND_ICON[kind];\n return (\n <Badge key={kind} variant=\"outline\" className=\"gap-1\">\n <Icon className=\"h-3 w-3\" />\n {counts[kind]} {tx(`semanticfed.lineage.kinds.${kind}`, KIND_LABEL[kind])}\n </Badge>\n );\n })}\n </div>\n </div>\n\n {workspace.isPending && (\n <Card>\n <CardContent className=\"flex items-center gap-3 p-6 text-sm text-muted-foreground\">\n <Loader2 className=\"h-5 w-5 animate-spin\" />\n {tx('semanticfed.lineage.loading', 'Computing lineage…')}\n </CardContent>\n </Card>\n )}\n\n {workspace.isError && (\n <Card>\n <CardContent\n className=\"flex items-center gap-3 p-6 text-sm text-destructive\"\n data-testid=\"lineage-error\"\n >\n <AlertTriangle className=\"h-5 w-5\" />\n {lineageErrorMessage(workspace.error)}\n </CardContent>\n </Card>\n )}\n\n {isEmpty && (\n <Card>\n <CardContent\n className=\"flex items-center gap-3 p-6 text-sm text-muted-foreground\"\n data-testid=\"lineage-empty\"\n >\n <GitBranch className=\"h-5 w-5\" />\n {tx(\n 'semanticfed.lineage.empty',\n 'No lineage yet. Connect a data source and model an entity on it; lineage appears here as soon as records exist.'\n )}\n </CardContent>\n </Card>\n )}\n\n {(warnings.length > 0 || truncated) && (\n <Card data-testid=\"lineage-warnings\">\n <CardHeader className=\"pb-2\">\n <CardTitle className=\"flex items-center gap-2 text-base\">\n <AlertTriangle className=\"h-4 w-4 text-destructive\" />\n {tx('semanticfed.lineage.warnings.title', 'Lineage warnings')}\n </CardTitle>\n </CardHeader>\n <CardContent className=\"space-y-1 text-sm\">\n {truncated && (\n <p className=\"text-muted-foreground\">\n {tx(\n 'semanticfed.lineage.warnings.truncated',\n 'This workspace is larger than one lineage pass reads, so the graph is partial.'\n )}\n </p>\n )}\n {warnings.slice(0, 20).map((warning, index) => (\n <button\n key={`${warning.nodeId ?? 'graph'}-${index}`}\n type=\"button\"\n className=\"block text-left text-muted-foreground hover:text-foreground\"\n onClick={() => warning.nodeId && setSelectedId(warning.nodeId)}\n >\n {warning.nodeId ? (\n <span className=\"font-medium\">{nodeLabel(warning.nodeId)}: </span>\n ) : null}\n {warning.message}\n </button>\n ))}\n </CardContent>\n </Card>\n )}\n\n {graph && graph.nodes.length > 0 && (\n <>\n <div className=\"flex flex-wrap items-center gap-2\">\n <Input\n aria-label={tx('semanticfed.lineage.search', 'Filter nodes')}\n placeholder={tx('semanticfed.lineage.search', 'Filter nodes')}\n value={search}\n onChange={(e) => setSearch(e.target.value)}\n className=\"w-full sm:w-64\"\n data-testid=\"lineage-search\"\n />\n <div\n className=\"flex rounded-md border\"\n role=\"group\"\n aria-label={tx('semanticfed.lineage.direction', 'Direction')}\n >\n {DIRECTIONS.map((d) => (\n <Button\n key={d}\n type=\"button\"\n size=\"sm\"\n variant={direction === d ? 'default' : 'ghost'}\n onClick={() => setDirection(d)}\n aria-pressed={direction === d}\n data-testid={`lineage-direction-${d}`}\n >\n {d === 'UPSTREAM'\n ? tx('semanticfed.lineage.upstream', 'Upstream')\n : d === 'DOWNSTREAM'\n ? tx('semanticfed.lineage.downstream', 'Downstream')\n : tx('semanticfed.lineage.both', 'Both')}\n </Button>\n ))}\n </div>\n <label className=\"flex items-center gap-2 text-sm text-muted-foreground\">\n {tx('semanticfed.lineage.depth', 'Depth')}\n <select\n className=\"rounded border bg-background p-1.5 text-sm text-foreground\"\n value={depth ?? ''}\n onChange={(e) => setDepth(e.target.value ? Number(e.target.value) : null)}\n data-testid=\"lineage-depth\"\n >\n <option value=\"\">{tx('semanticfed.lineage.depthAll', 'All')}</option>\n {DEPTH_OPTIONS.map((d) => (\n <option key={d} value={d}>\n {d}\n </option>\n ))}\n </select>\n </label>\n {selected && (\n <Button\n type=\"button\"\n size=\"sm\"\n variant=\"outline\"\n onClick={() => setSelectedId(null)}\n className=\"gap-1\"\n data-testid=\"lineage-clear\"\n >\n <X className=\"h-3 w-3\" />\n {tx('semanticfed.lineage.clear', 'Clear selection')}\n </Button>\n )}\n </div>\n\n <div className=\"grid gap-4 xl:grid-cols-[minmax(0,1fr)_22rem]\">\n <div className=\"min-w-0 overflow-x-auto\">\n <div\n className=\"grid min-w-0 grid-cols-1 gap-3 md:min-w-[60rem] md:grid-cols-6\"\n data-testid=\"lineage-lanes\"\n >\n {LANES.map((lane) => {\n const laneNodes = graph.nodes.filter(\n (node) => lane.kinds.includes(node.kind) && matches(node)\n );\n return (\n <section\n key={lane.id}\n className=\"min-w-0 space-y-2\"\n data-testid={`lineage-lane-${lane.id}`}\n >\n <h2 className=\"text-xs font-semibold uppercase tracking-wide text-muted-foreground\">\n {tx(`semanticfed.lineage.lanes.${lane.id}`, lane.label)}{' '}\n <span className=\"font-normal\">({laneNodes.length})</span>\n </h2>\n {laneNodes.length === 0 && <p className=\"text-xs text-muted-foreground\">—</p>}\n {laneNodes.map((node) => {\n const Icon = KIND_ICON[node.kind];\n const isSelected = node.id === selectedId;\n const inLineage = highlighted?.has(node.id) ?? false;\n const dimmed = highlighted !== null && !inLineage;\n return (\n <button\n key={node.id}\n type=\"button\"\n onClick={() => setSelectedId(isSelected ? null : node.id)}\n aria-pressed={isSelected}\n title={node.detail ?? node.label}\n data-testid=\"lineage-node\"\n data-node-id={node.id}\n data-node-kind={node.kind}\n data-in-lineage={inLineage ? 'true' : 'false'}\n className={cn(\n 'w-full rounded-md border bg-card p-2 text-left text-sm transition-colors hover:bg-accent',\n isSelected && 'border-primary ring-2 ring-primary',\n inLineage && !isSelected && 'border-primary bg-accent',\n dimmed && 'opacity-40'\n )}\n >\n <span className=\"flex items-center gap-1.5 font-medium\">\n <Icon className=\"h-3.5 w-3.5 shrink-0 text-muted-foreground\" />\n <span className=\"truncate\">{node.label}</span>\n </span>\n {(node.detail || node.status) && (\n <span className=\"mt-0.5 block truncate text-xs text-muted-foreground\">\n {[node.status, node.detail].filter(Boolean).join(' · ')}\n </span>\n )}\n </button>\n );\n })}\n </section>\n );\n })}\n </div>\n </div>\n\n <Card className=\"min-w-0 self-start\" data-testid=\"lineage-details\">\n <CardHeader className=\"pb-3\">\n <CardTitle className=\"flex items-center gap-2 text-base\">\n <GitBranch className=\"h-4 w-4\" />\n {selected\n ? selected.label\n : tx('semanticfed.lineage.details.title', 'Lineage details')}\n </CardTitle>\n </CardHeader>\n <CardContent className=\"space-y-4 text-sm\">\n {!selected && (\n <p className=\"text-muted-foreground\">\n {tx(\n 'semanticfed.lineage.details.hint',\n 'Select a source, table, entity, field, model or query to trace its lineage.'\n )}\n </p>\n )}\n {selected && (\n <>\n <div className=\"space-y-1\">\n <Badge variant=\"outline\">\n {tx(\n `semanticfed.lineage.kinds.${selected.kind}`,\n KIND_LABEL[selected.kind]\n )}\n </Badge>\n {selected.detail && (\n <p className=\"break-words font-mono text-xs text-muted-foreground\">\n {selected.detail}\n </p>\n )}\n {selected.status && (\n <p className=\"text-xs text-muted-foreground\">{selected.status}</p>\n )}\n </div>\n {root && record.isPending && (\n <p className=\"flex items-center gap-2 text-muted-foreground\">\n <Loader2 className=\"h-4 w-4 animate-spin\" />\n {tx('semanticfed.lineage.tracing', 'Tracing lineage…')}\n </p>\n )}\n {root && record.isError && (\n <p className=\"text-destructive\" data-testid=\"lineage-record-error\">\n {lineageErrorMessage(record.error)}\n </p>\n )}\n {highlighted && (\n <p className=\"text-muted-foreground\" data-testid=\"lineage-reach\">\n {tx(\n 'semanticfed.lineage.details.reach',\n '{{count}} nodes in this lineage',\n { count: Math.max(highlighted.size - 1, 0) }\n )}\n </p>\n )}\n <EdgeList\n title={tx('semanticfed.lineage.details.upstream', 'Comes from')}\n icon={ArrowUpLeft}\n edges={upstreamEdges}\n otherEnd={(e) => e.from}\n nodeLabel={nodeLabel}\n nodeKindLabel={nodeKindLabel}\n onSelect={setSelectedId}\n emptyText={tx('semanticfed.lineage.details.noUpstream', 'Nothing upstream')}\n testId=\"lineage-upstream\"\n />\n <EdgeList\n title={tx('semanticfed.lineage.details.downstream', 'Feeds into')}\n icon={ArrowDownRight}\n edges={downstreamEdges}\n otherEnd={(e) => e.to}\n nodeLabel={nodeLabel}\n nodeKindLabel={nodeKindLabel}\n onSelect={setSelectedId}\n emptyText={tx(\n 'semanticfed.lineage.details.noDownstream',\n 'Nothing downstream'\n )}\n testId=\"lineage-downstream\"\n />\n </>\n )}\n </CardContent>\n </Card>\n </div>\n </>\n )}\n </div>\n );\n}\n\ninterface EdgeListProps {\n title: string;\n icon: LucideIcon;\n edges: SemLineageEdge[];\n otherEnd: (edge: SemLineageEdge) => string;\n nodeLabel: (id: string) => string;\n nodeKindLabel: (id: string) => string;\n onSelect: (id: string) => void;\n emptyText: string;\n testId: string;\n}\n\nfunction EdgeList({\n title,\n icon: Icon,\n edges,\n otherEnd,\n nodeLabel,\n nodeKindLabel,\n onSelect,\n emptyText,\n testId,\n}: EdgeListProps) {\n return (\n <div className=\"space-y-2\" data-testid={testId}>\n <h3 className=\"flex items-center gap-1.5 text-xs font-semibold uppercase tracking-wide text-muted-foreground\">\n <Icon className=\"h-3.5 w-3.5\" />\n {title} ({edges.length})\n </h3>\n {edges.length === 0 && <p className=\"text-xs text-muted-foreground\">{emptyText}</p>}\n <ul className=\"space-y-1.5\">\n {edges.map((edge) => {\n const other = otherEnd(edge);\n const observed = formatObservedAt(edge.observedAt);\n return (\n <li key={edge.id} className=\"rounded border p-2\">\n <button\n type=\"button\"\n className=\"font-medium hover:underline\"\n onClick={() => onSelect(other)}\n >\n {nodeLabel(other)}\n </button>\n <span className=\"ml-1 text-xs text-muted-foreground\">\n {nodeKindLabel(other)} · {EDGE_LABEL[edge.kind]}\n </span>\n {edge.detail && (\n <p className=\"mt-0.5 break-words font-mono text-xs text-muted-foreground\">\n {edge.detail}\n </p>\n )}\n {observed && <p className=\"mt-0.5 text-xs text-muted-foreground\">{observed}</p>}\n </li>\n );\n })}\n </ul>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;AAsDA,IAAMC,IAAoD;CACxD,WAAWC;CACX,aAAaC;CACb,OAAOC;CACP,QAAQC;CACR,WAAWC;CACX,QAAQC;CACR,QAAQC;CACR,OAAOC;CACP,OAAOC;AACT,GAEMC,IAAiD;CACrD,WAAW;CACX,aAAa;CACb,OAAO;CACP,QAAQ;CACR,WAAW;CACX,QAAQ;CACR,QAAQ;CACR,OAAO;CACP,OAAO;AACT,GASMC,KAAgB;CACpB;EAAE,IAAI;EAAW,OAAO;EAAW,OA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
+
{"version":3,"file":"LineagePage.js","names":["_Fragment","LineageHeader","counts","useMemo","byKind","node","graph","tx","KIND_LABEL","kind","Icon","KIND_ICON","Badge","kindLabel","LineageStatus","pending","Card","CardContent","Loader2","error","AlertTriangle","lineageErrorMessage","empty","GitBranch","LineagePage","useTr","selectedId","setSelectedId","useState","direction","setDirection","depth","setDepth","search","setSearch","trace","useLineageTrace","nodeLabel","nodesById","id","workspace","LineageWarnings","Fragment","LineageToolbar","selected","LineageLanes","LineageDetails"],"sources":["../../../src/semanticfed/pages/LineagePage.tsx"],"sourcesContent":["/**\n * Lineage page (BOFF-4279) — end-to-end lineage of the workspace's semantic\n * layer, read from the `semLineage` API.\n *\n * The workspace graph is laid out in lanes in the direction data flows\n * (sources → tables → entities → fields → models → queries). Selecting a node\n * asks the API for that record's upstream / downstream lineage and highlights\n * it; tables and unregistered columns (which have no SemanticFed record to\n * start a traversal from) are traced over the workspace graph instead.\n */\nimport { useMemo, useState } from 'react';\nimport { Badge, Card, CardContent } from '@burdenoff/fe-libs/ui';\nimport { AlertTriangle, GitBranch, Loader2 } from 'lucide-react';\n\nimport { LineageDetails } from '../components/lineage/LineageDetails';\nimport { LineageLanes } from '../components/lineage/LineageLanes';\nimport { LineageToolbar } from '../components/lineage/LineageToolbar';\nimport { LineageWarnings } from '../components/lineage/LineageWarnings';\nimport {\n KIND_ICON,\n KIND_LABEL,\n kindLabel,\n type LineageTx,\n} from '../components/lineage/lineageModel';\nimport { useLineageTrace } from '../components/lineage/useLineageTrace';\nimport {\n type SemLineageDirection,\n type SemLineageGraph,\n type SemLineageNodeKind,\n lineageErrorMessage,\n} from '../hooks/useLineage';\nimport { useTr } from '../hooks/useTr';\n\n/** Header with the number of nodes of each kind in the workspace graph. */\nfunction LineageHeader({ graph, tx }: { graph: SemLineageGraph | undefined; tx: LineageTx }) {\n const counts = useMemo(() => {\n const byKind: Partial<Record<SemLineageNodeKind, number>> = {};\n for (const node of graph?.nodes ?? []) byKind[node.kind] = (byKind[node.kind] ?? 0) + 1;\n return byKind;\n }, [graph]);\n return (\n <div\n className=\"flex flex-wrap items-center justify-between gap-3\"\n data-tour=\"semanticfed-lineage-header\"\n >\n <div>\n <h1 className=\"text-2xl font-semibold\">{tx('semanticfed.lineage.title', 'Lineage')}</h1>\n <p className=\"text-sm text-muted-foreground\">\n {tx(\n 'semanticfed.lineage.description',\n 'End-to-end lineage from connectors and data sources through tables, entities and fields to the models and saved queries that use them. Select anything to trace where its data comes from and what depends on it.'\n )}\n </p>\n </div>\n <div className=\"flex flex-wrap gap-2\" data-testid=\"lineage-counts\">\n {(Object.keys(KIND_LABEL) as SemLineageNodeKind[])\n .filter((kind) => counts[kind])\n .map((kind) => {\n const Icon = KIND_ICON[kind];\n return (\n <Badge key={kind} variant=\"outline\" className=\"gap-1\">\n <Icon className=\"h-3 w-3\" />\n {counts[kind]} {kindLabel(tx, kind)}\n </Badge>\n );\n })}\n </div>\n </div>\n );\n}\n\n/** Loading, failed and empty states of the workspace graph. */\nfunction LineageStatus({\n pending,\n error,\n empty,\n tx,\n}: {\n pending: boolean;\n error: unknown;\n empty: boolean;\n tx: LineageTx;\n}) {\n if (pending) {\n return (\n <Card>\n <CardContent className=\"flex items-center gap-3 p-6 text-sm text-muted-foreground\">\n <Loader2 className=\"h-5 w-5 animate-spin\" />\n {tx('semanticfed.lineage.loading', 'Computing lineage…')}\n </CardContent>\n </Card>\n );\n }\n if (error) {\n return (\n <Card>\n <CardContent\n className=\"flex items-center gap-3 p-6 text-sm text-destructive\"\n data-testid=\"lineage-error\"\n >\n <AlertTriangle className=\"h-5 w-5\" />\n {lineageErrorMessage(error)}\n </CardContent>\n </Card>\n );\n }\n if (empty) {\n return (\n <Card>\n <CardContent\n className=\"flex items-center gap-3 p-6 text-sm text-muted-foreground\"\n data-testid=\"lineage-empty\"\n >\n <GitBranch className=\"h-5 w-5\" />\n {tx(\n 'semanticfed.lineage.empty',\n 'No lineage yet. Connect a data source and model an entity on it; lineage appears here as soon as records exist.'\n )}\n </CardContent>\n </Card>\n );\n }\n return null;\n}\n\nexport function LineagePage() {\n const tx = useTr();\n const [selectedId, setSelectedId] = useState<string | null>(null);\n const [direction, setDirection] = useState<SemLineageDirection>('BOTH');\n const [depth, setDepth] = useState<number | null>(null);\n const [search, setSearch] = useState('');\n const trace = useLineageTrace(selectedId, direction, depth);\n const { workspace, graph, nodesById, selected } = trace;\n\n const nodeLabel = (id: string) => nodesById.get(id)?.label ?? id;\n const nodeKindLabel = (id: string) => {\n const node = nodesById.get(id);\n return node ? kindLabel(tx, node.kind) : '';\n };\n\n return (\n <div className=\"space-y-6 p-4 sm:p-6\" data-testid=\"semanticfed-lineage-page\">\n <LineageHeader graph={graph} tx={tx} />\n\n <LineageStatus\n pending={workspace.isPending}\n error={workspace.isError ? workspace.error : null}\n empty={workspace.isSuccess && (graph?.nodes.length ?? 0) === 0}\n tx={tx}\n />\n\n <LineageWarnings\n warnings={graph?.warnings ?? []}\n truncated={trace.truncated}\n nodeLabel={nodeLabel}\n onSelect={setSelectedId}\n tx={tx}\n />\n\n {graph && graph.nodes.length > 0 && (\n <>\n <LineageToolbar\n search={search}\n onSearchChange={setSearch}\n direction={direction}\n onDirectionChange={setDirection}\n depth={depth}\n onDepthChange={setDepth}\n hasSelection={selected !== null}\n onClearSelection={() => setSelectedId(null)}\n tx={tx}\n />\n\n <div className=\"grid gap-4 xl:grid-cols-[minmax(0,1fr)_22rem]\">\n <LineageLanes\n graph={graph}\n search={search}\n selectedId={selectedId}\n highlighted={trace.highlighted}\n onSelect={setSelectedId}\n tx={tx}\n />\n <LineageDetails\n selected={selected}\n tracing={trace.tracing}\n traceError={trace.traceError}\n highlighted={trace.highlighted}\n edges={trace.edges}\n nodeLabel={nodeLabel}\n nodeKindLabel={nodeKindLabel}\n onSelect={setSelectedId}\n tx={tx}\n />\n </div>\n </>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;AAkCA,SAASC,EAAc,EAAE,UAAO,SAA6D;CAC3F,IA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AAA,GACD,kBAACmB,GAAD;KACY;KACV,SAASX,EAAM;KACf,YAAYA,EAAM;KAClB,aAAaA,EAAM;KACnB,OAAOA,EAAM;KACF;KACI,gBAtDJ,MAAe;MACpC,IAAM9B,IAAOiC,EAAU,IAAIC,CAAE;MAC7B,OAAOlC,IAAOQ,EAAUN,GAAIF,EAAK,IAAI,IAAI;KAC3C;KAoDY,UAAUsB;KACN;IACL,CAAA,CACE;GACL,CAAA,CAAA,EAAA,CAAA;EAED;;AAET"}
|
|
@@ -1,162 +1,135 @@
|
|
|
1
1
|
import { useSemanticFedStore as e } from "../store/semanticfedStore.js";
|
|
2
2
|
import { translateWithFallback as t } from "../utils/i18n.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
3
|
+
import { SummaryCard as n } from "../components/SummaryCard.js";
|
|
4
|
+
import { PageHeader as r } from "../components/PageHeader.js";
|
|
5
|
+
import { ArrowUpRight as i, FileCode2 as a, GitBranch as o, Layers as s, Plus as c, Search as l } from "lucide-react";
|
|
6
|
+
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
7
|
+
import { Badge as f, Button as p, Card as m, CardContent as h, CardHeader as g, CardTitle as _ } from "@burdenoff/fe-libs/ui";
|
|
8
|
+
import { useI18n as v } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
7
9
|
// src/semanticfed/pages/OntologyPage.tsx
|
|
8
|
-
var
|
|
10
|
+
var y = {
|
|
9
11
|
OWL: "bg-status-info-bg-subtle text-status-info-text",
|
|
10
12
|
RDFS: "bg-chart-4/10 text-chart-4",
|
|
11
13
|
SKOS: "bg-status-success-bg-subtle text-status-success-text",
|
|
12
14
|
SHACL: "bg-status-warning-bg-subtle text-status-warning-text"
|
|
13
15
|
};
|
|
14
|
-
function
|
|
15
|
-
let { t:
|
|
16
|
-
published:
|
|
17
|
-
draft:
|
|
18
|
-
deprecated:
|
|
19
|
-
},
|
|
20
|
-
return /* @__PURE__ */
|
|
16
|
+
function b() {
|
|
17
|
+
let { t: b } = v(), { ontologies: x } = e(), S = (e, n, r) => t(b, e, n, r), C = {
|
|
18
|
+
published: S("semanticfed.ontology.status.published", "Published"),
|
|
19
|
+
draft: S("semanticfed.ontology.status.draft", "Draft"),
|
|
20
|
+
deprecated: S("semanticfed.ontology.status.deprecated", "Deprecated")
|
|
21
|
+
}, w = x.reduce((e, t) => e + t.classCount, 0), T = x.reduce((e, t) => e + t.propertyCount, 0), E = x.filter((e) => e.status === "published").length;
|
|
22
|
+
return /* @__PURE__ */ d("div", {
|
|
21
23
|
className: "space-y-6 p-6",
|
|
22
24
|
children: [
|
|
23
|
-
/* @__PURE__ */
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
children: b("semanticfed.ontology.title", "Ontology Manager")
|
|
28
|
-
}), /* @__PURE__ */ c("p", {
|
|
29
|
-
className: "text-sm text-muted-foreground",
|
|
30
|
-
children: b("semanticfed.ontology.description", "Browse, create, and manage OWL/RDFS/SKOS ontologies that define the semantic schema of your knowledge graphs.")
|
|
31
|
-
})] }), /* @__PURE__ */ l("div", {
|
|
25
|
+
/* @__PURE__ */ u(r, {
|
|
26
|
+
title: S("semanticfed.ontology.title", "Ontology Manager"),
|
|
27
|
+
description: S("semanticfed.ontology.description", "Browse, create, and manage OWL/RDFS/SKOS ontologies that define the semantic schema of your knowledge graphs."),
|
|
28
|
+
actions: /* @__PURE__ */ d("div", {
|
|
32
29
|
className: "flex gap-2",
|
|
33
|
-
children: [/* @__PURE__ */
|
|
30
|
+
children: [/* @__PURE__ */ d(p, {
|
|
34
31
|
variant: "outline",
|
|
35
32
|
size: "sm",
|
|
36
33
|
children: [
|
|
37
|
-
/* @__PURE__ */
|
|
34
|
+
/* @__PURE__ */ u(l, { className: "mr-2 h-4 w-4" }),
|
|
38
35
|
" ",
|
|
39
|
-
|
|
36
|
+
S("semanticfed.ontology.actions.search", "Search")
|
|
40
37
|
]
|
|
41
|
-
}), /* @__PURE__ */
|
|
38
|
+
}), /* @__PURE__ */ d(p, {
|
|
42
39
|
size: "sm",
|
|
43
|
-
children: [/* @__PURE__ */ c
|
|
40
|
+
children: [/* @__PURE__ */ u(c, { className: "mr-2 h-4 w-4" }), S("semanticfed.ontology.actions.newOntology", "New Ontology")]
|
|
44
41
|
})]
|
|
45
|
-
})
|
|
42
|
+
})
|
|
46
43
|
}),
|
|
47
|
-
/* @__PURE__ */
|
|
44
|
+
/* @__PURE__ */ d("div", {
|
|
48
45
|
className: "grid gap-4 md:grid-cols-4",
|
|
49
46
|
children: [
|
|
50
|
-
/* @__PURE__ */
|
|
47
|
+
/* @__PURE__ */ u(n, {
|
|
48
|
+
title: S("semanticfed.ontology.summary.ontologies.title", "Ontologies"),
|
|
49
|
+
value: x.length,
|
|
50
|
+
subtitle: S("semanticfed.ontology.summary.ontologies.subtitle", "{count} published", { count: E })
|
|
51
|
+
}),
|
|
52
|
+
/* @__PURE__ */ u(n, {
|
|
53
|
+
title: S("semanticfed.ontology.summary.totalClasses.title", "Total Classes"),
|
|
54
|
+
value: w,
|
|
55
|
+
subtitle: S("semanticfed.ontology.summary.totalClasses.subtitle", "across all ontologies")
|
|
56
|
+
}),
|
|
57
|
+
/* @__PURE__ */ u(n, {
|
|
58
|
+
title: S("semanticfed.ontology.summary.totalProperties.title", "Total Properties"),
|
|
59
|
+
value: T,
|
|
60
|
+
subtitle: S("semanticfed.ontology.summary.totalProperties.subtitle", "object + data properties")
|
|
61
|
+
}),
|
|
62
|
+
/* @__PURE__ */ d(m, { children: [/* @__PURE__ */ u(g, {
|
|
51
63
|
className: "pb-2",
|
|
52
|
-
children: /* @__PURE__ */
|
|
64
|
+
children: /* @__PURE__ */ u(_, {
|
|
53
65
|
className: "text-sm font-medium",
|
|
54
|
-
children:
|
|
66
|
+
children: S("semanticfed.ontology.summary.formats.title", "Formats")
|
|
55
67
|
})
|
|
56
|
-
}), /* @__PURE__ */
|
|
57
|
-
className: "text-2xl font-bold",
|
|
58
|
-
children: y.length
|
|
59
|
-
}), /* @__PURE__ */ c("p", {
|
|
60
|
-
className: "text-xs text-muted-foreground",
|
|
61
|
-
children: b("semanticfed.ontology.summary.ontologies.subtitle", "{count} published", { count: w })
|
|
62
|
-
})] })] }),
|
|
63
|
-
/* @__PURE__ */ l(f, { children: [/* @__PURE__ */ c(m, {
|
|
64
|
-
className: "pb-2",
|
|
65
|
-
children: /* @__PURE__ */ c(h, {
|
|
66
|
-
className: "text-sm font-medium",
|
|
67
|
-
children: b("semanticfed.ontology.summary.totalClasses.title", "Total Classes")
|
|
68
|
-
})
|
|
69
|
-
}), /* @__PURE__ */ l(p, { children: [/* @__PURE__ */ c("div", {
|
|
70
|
-
className: "text-2xl font-bold",
|
|
71
|
-
children: S
|
|
72
|
-
}), /* @__PURE__ */ c("p", {
|
|
73
|
-
className: "text-xs text-muted-foreground",
|
|
74
|
-
children: b("semanticfed.ontology.summary.totalClasses.subtitle", "across all ontologies")
|
|
75
|
-
})] })] }),
|
|
76
|
-
/* @__PURE__ */ l(f, { children: [/* @__PURE__ */ c(m, {
|
|
77
|
-
className: "pb-2",
|
|
78
|
-
children: /* @__PURE__ */ c(h, {
|
|
79
|
-
className: "text-sm font-medium",
|
|
80
|
-
children: b("semanticfed.ontology.summary.totalProperties.title", "Total Properties")
|
|
81
|
-
})
|
|
82
|
-
}), /* @__PURE__ */ l(p, { children: [/* @__PURE__ */ c("div", {
|
|
83
|
-
className: "text-2xl font-bold",
|
|
84
|
-
children: C
|
|
85
|
-
}), /* @__PURE__ */ c("p", {
|
|
86
|
-
className: "text-xs text-muted-foreground",
|
|
87
|
-
children: b("semanticfed.ontology.summary.totalProperties.subtitle", "object + data properties")
|
|
88
|
-
})] })] }),
|
|
89
|
-
/* @__PURE__ */ l(f, { children: [/* @__PURE__ */ c(m, {
|
|
90
|
-
className: "pb-2",
|
|
91
|
-
children: /* @__PURE__ */ c(h, {
|
|
92
|
-
className: "text-sm font-medium",
|
|
93
|
-
children: b("semanticfed.ontology.summary.formats.title", "Formats")
|
|
94
|
-
})
|
|
95
|
-
}), /* @__PURE__ */ l(p, { children: [/* @__PURE__ */ c("div", {
|
|
68
|
+
}), /* @__PURE__ */ d(h, { children: [/* @__PURE__ */ u("div", {
|
|
96
69
|
className: "flex flex-wrap gap-1",
|
|
97
|
-
children: Array.from(new Set(
|
|
98
|
-
className: `rounded px-2 py-0.5 text-xs font-medium ${
|
|
70
|
+
children: Array.from(new Set(x.map((e) => e.format))).map((e) => /* @__PURE__ */ u("span", {
|
|
71
|
+
className: `rounded px-2 py-0.5 text-xs font-medium ${y[e] ?? ""}`,
|
|
99
72
|
children: e
|
|
100
73
|
}, e))
|
|
101
|
-
}), /* @__PURE__ */
|
|
74
|
+
}), /* @__PURE__ */ u("p", {
|
|
102
75
|
className: "mt-1 text-xs text-muted-foreground",
|
|
103
|
-
children:
|
|
76
|
+
children: S("semanticfed.ontology.summary.formats.subtitle", "W3C standards")
|
|
104
77
|
})] })] })
|
|
105
78
|
]
|
|
106
79
|
}),
|
|
107
|
-
/* @__PURE__ */
|
|
80
|
+
/* @__PURE__ */ u("div", {
|
|
108
81
|
className: "grid gap-4 md:grid-cols-2 lg:grid-cols-3",
|
|
109
|
-
children:
|
|
82
|
+
children: x.map((e) => /* @__PURE__ */ d(m, {
|
|
110
83
|
className: "group transition-shadow hover:shadow-md",
|
|
111
|
-
children: [/* @__PURE__ */
|
|
84
|
+
children: [/* @__PURE__ */ u(g, {
|
|
112
85
|
className: "pb-3",
|
|
113
|
-
children: /* @__PURE__ */
|
|
86
|
+
children: /* @__PURE__ */ d("div", {
|
|
114
87
|
className: "flex items-start justify-between",
|
|
115
|
-
children: [/* @__PURE__ */
|
|
88
|
+
children: [/* @__PURE__ */ d("div", {
|
|
116
89
|
className: "flex items-center gap-2",
|
|
117
|
-
children: [/* @__PURE__ */
|
|
90
|
+
children: [/* @__PURE__ */ u(a, { className: "h-5 w-5 text-muted-foreground" }), /* @__PURE__ */ u(_, {
|
|
118
91
|
className: "text-base",
|
|
119
92
|
children: e.name
|
|
120
93
|
})]
|
|
121
|
-
}), /* @__PURE__ */
|
|
94
|
+
}), /* @__PURE__ */ u(i, { className: "h-4 w-4 text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100" })]
|
|
122
95
|
})
|
|
123
|
-
}), /* @__PURE__ */
|
|
96
|
+
}), /* @__PURE__ */ d(h, {
|
|
124
97
|
className: "space-y-3",
|
|
125
98
|
children: [
|
|
126
|
-
/* @__PURE__ */
|
|
99
|
+
/* @__PURE__ */ u("p", {
|
|
127
100
|
className: "truncate font-mono text-xs text-muted-foreground",
|
|
128
101
|
children: e.namespace
|
|
129
102
|
}),
|
|
130
|
-
/* @__PURE__ */
|
|
103
|
+
/* @__PURE__ */ d("div", {
|
|
131
104
|
className: "flex items-center gap-2",
|
|
132
105
|
children: [
|
|
133
|
-
/* @__PURE__ */
|
|
106
|
+
/* @__PURE__ */ u(f, {
|
|
134
107
|
variant: e.status === "published" ? "default" : e.status === "draft" ? "secondary" : "outline",
|
|
135
|
-
children:
|
|
108
|
+
children: C[e.status] ?? e.status
|
|
136
109
|
}),
|
|
137
|
-
/* @__PURE__ */
|
|
138
|
-
className: `rounded px-1.5 py-0.5 text-[10px] font-medium ${
|
|
110
|
+
/* @__PURE__ */ u("span", {
|
|
111
|
+
className: `rounded px-1.5 py-0.5 text-[10px] font-medium ${y[e.format] ?? ""}`,
|
|
139
112
|
children: e.format
|
|
140
113
|
}),
|
|
141
|
-
/* @__PURE__ */
|
|
114
|
+
/* @__PURE__ */ d("span", {
|
|
142
115
|
className: "flex items-center gap-1 text-xs text-muted-foreground",
|
|
143
116
|
children: [
|
|
144
|
-
/* @__PURE__ */
|
|
117
|
+
/* @__PURE__ */ u(o, { className: "h-3 w-3" }),
|
|
145
118
|
" v",
|
|
146
119
|
e.version
|
|
147
120
|
]
|
|
148
121
|
})
|
|
149
122
|
]
|
|
150
123
|
}),
|
|
151
|
-
/* @__PURE__ */
|
|
124
|
+
/* @__PURE__ */ d("div", {
|
|
152
125
|
className: "flex items-center justify-between text-xs text-muted-foreground",
|
|
153
126
|
children: [
|
|
154
|
-
/* @__PURE__ */
|
|
127
|
+
/* @__PURE__ */ d("span", {
|
|
155
128
|
className: "flex items-center gap-1",
|
|
156
|
-
children: [/* @__PURE__ */
|
|
129
|
+
children: [/* @__PURE__ */ u(s, { className: "h-3 w-3" }), S("semanticfed.ontology.card.classes", "{count} classes", { count: e.classCount })]
|
|
157
130
|
}),
|
|
158
|
-
/* @__PURE__ */
|
|
159
|
-
/* @__PURE__ */
|
|
131
|
+
/* @__PURE__ */ u("span", { children: S("semanticfed.ontology.card.properties", "{count} properties", { count: e.propertyCount }) }),
|
|
132
|
+
/* @__PURE__ */ u("span", { children: e.updatedAt })
|
|
160
133
|
]
|
|
161
134
|
})
|
|
162
135
|
]
|
|
@@ -166,6 +139,6 @@ function v() {
|
|
|
166
139
|
]
|
|
167
140
|
});
|
|
168
141
|
}
|
|
169
|
-
export {
|
|
142
|
+
export { b as OntologyPage };
|
|
170
143
|
|
|
171
144
|
//# sourceMappingURL=OntologyPage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OntologyPage.js","names":["formatColors","OntologyPage","useI18n","useSemanticFedStore","tx","translateWithFallback","t","key","fallback","params","statusLabels","totalClasses","ontologies","sum","o","totalProperties","publishedCount","Button","Search","Plus","Card","CardHeader","CardTitle","CardContent","fmt","FileCode2","ont","ArrowUpRight","Badge","GitBranch","Layers"],"sources":["../../../src/semanticfed/pages/OntologyPage.tsx"],"sourcesContent":["import { useI18n } from '@burdenoff/fe-libs/shared/providers/shell';\nimport { Badge, Button, Card, CardContent, CardHeader, CardTitle } from '@burdenoff/fe-libs/ui';\nimport { ArrowUpRight, FileCode2, GitBranch, Layers, Plus, Search } from 'lucide-react';\nimport { useSemanticFedStore } from '../store/semanticfedStore';\nimport { translateWithFallback } from '../utils/i18n';\n\nconst formatColors: Record<string, string> = {\n OWL: 'bg-status-info-bg-subtle text-status-info-text',\n RDFS: 'bg-chart-4/10 text-chart-4',\n SKOS: 'bg-status-success-bg-subtle text-status-success-text',\n SHACL: 'bg-status-warning-bg-subtle text-status-warning-text',\n};\n\nexport function OntologyPage() {\n const { t } = useI18n();\n const { ontologies } = useSemanticFedStore();\n const tx = (key: string, fallback: string, params?: Record<string, string | number>) =>\n translateWithFallback(t, key, fallback, params);\n\n const statusLabels: Record<string, string> = {\n published: tx('semanticfed.ontology.status.published', 'Published'),\n draft: tx('semanticfed.ontology.status.draft', 'Draft'),\n deprecated: tx('semanticfed.ontology.status.deprecated', 'Deprecated'),\n };\n\n const totalClasses = ontologies.reduce((sum, o) => sum + o.classCount, 0);\n const totalProperties = ontologies.reduce((sum, o) => sum + o.propertyCount, 0);\n const publishedCount = ontologies.filter((o) => o.status === 'published').length;\n\n return (\n <div className=\"space-y-6 p-6\">\n <div className=\"flex items-center justify-between\">\n <div>\n <h1 className=\"text-2xl font-semibold\">\n {tx('semanticfed.ontology.title', 'Ontology Manager')}\n </h1>\n <p className=\"text-sm text-muted-foreground\">\n {tx(\n 'semanticfed.ontology.description',\n 'Browse, create, and manage OWL/RDFS/SKOS ontologies that define the semantic schema of your knowledge graphs.'\n )}\n </p>\n </div>\n <div className=\"flex gap-2\">\n <Button variant=\"outline\" size=\"sm\">\n <Search className=\"mr-2 h-4 w-4\" />{' '}\n {tx('semanticfed.ontology.actions.search', 'Search')}\n </Button>\n <Button size=\"sm\">\n <Plus className=\"mr-2 h-4 w-4\" />\n {tx('semanticfed.ontology.actions.newOntology', 'New Ontology')}\n </Button>\n </div>\n </div>\n\n <div className=\"grid gap-4 md:grid-cols-4\">\n <Card>\n <CardHeader className=\"pb-2\">\n <CardTitle className=\"text-sm font-medium\">\n {tx('semanticfed.ontology.summary.ontologies.title', 'Ontologies')}\n </CardTitle>\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold\">{ontologies.length}</div>\n <p className=\"text-xs text-muted-foreground\">\n {tx('semanticfed.ontology.summary.ontologies.subtitle', '{count} published', {\n count: publishedCount,\n })}\n </p>\n </CardContent>\n </Card>\n <Card>\n <CardHeader className=\"pb-2\">\n <CardTitle className=\"text-sm font-medium\">\n {tx('semanticfed.ontology.summary.totalClasses.title', 'Total Classes')}\n </CardTitle>\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold\">{totalClasses}</div>\n <p className=\"text-xs text-muted-foreground\">\n {tx('semanticfed.ontology.summary.totalClasses.subtitle', 'across all ontologies')}\n </p>\n </CardContent>\n </Card>\n <Card>\n <CardHeader className=\"pb-2\">\n <CardTitle className=\"text-sm font-medium\">\n {tx('semanticfed.ontology.summary.totalProperties.title', 'Total Properties')}\n </CardTitle>\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold\">{totalProperties}</div>\n <p className=\"text-xs text-muted-foreground\">\n {tx(\n 'semanticfed.ontology.summary.totalProperties.subtitle',\n 'object + data properties'\n )}\n </p>\n </CardContent>\n </Card>\n <Card>\n <CardHeader className=\"pb-2\">\n <CardTitle className=\"text-sm font-medium\">\n {tx('semanticfed.ontology.summary.formats.title', 'Formats')}\n </CardTitle>\n </CardHeader>\n <CardContent>\n <div className=\"flex flex-wrap gap-1\">\n {Array.from(new Set(ontologies.map((o) => o.format))).map((fmt) => (\n <span\n key={fmt}\n className={`rounded px-2 py-0.5 text-xs font-medium ${formatColors[fmt] ?? ''}`}\n >\n {fmt}\n </span>\n ))}\n </div>\n <p className=\"mt-1 text-xs text-muted-foreground\">\n {tx('semanticfed.ontology.summary.formats.subtitle', 'W3C standards')}\n </p>\n </CardContent>\n </Card>\n </div>\n\n <div className=\"grid gap-4 md:grid-cols-2 lg:grid-cols-3\">\n {ontologies.map((ont) => (\n <Card key={ont.id} className=\"group transition-shadow hover:shadow-md\">\n <CardHeader className=\"pb-3\">\n <div className=\"flex items-start justify-between\">\n <div className=\"flex items-center gap-2\">\n <FileCode2 className=\"h-5 w-5 text-muted-foreground\" />\n <CardTitle className=\"text-base\">{ont.name}</CardTitle>\n </div>\n <ArrowUpRight className=\"h-4 w-4 text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100\" />\n </div>\n </CardHeader>\n <CardContent className=\"space-y-3\">\n <p className=\"truncate font-mono text-xs text-muted-foreground\">{ont.namespace}</p>\n\n <div className=\"flex items-center gap-2\">\n <Badge\n variant={\n ont.status === 'published'\n ? 'default'\n : ont.status === 'draft'\n ? 'secondary'\n : 'outline'\n }\n >\n {statusLabels[ont.status] ?? ont.status}\n </Badge>\n <span\n className={`rounded px-1.5 py-0.5 text-[10px] font-medium ${formatColors[ont.format] ?? ''}`}\n >\n {ont.format}\n </span>\n <span className=\"flex items-center gap-1 text-xs text-muted-foreground\">\n <GitBranch className=\"h-3 w-3\" /> v{ont.version}\n </span>\n </div>\n\n <div className=\"flex items-center justify-between text-xs text-muted-foreground\">\n <span className=\"flex items-center gap-1\">\n <Layers className=\"h-3 w-3\" />\n {tx('semanticfed.ontology.card.classes', '{count} classes', {\n count: ont.classCount,\n })}\n </span>\n <span>\n {tx('semanticfed.ontology.card.properties', '{count} properties', {\n count: ont.propertyCount,\n })}\n </span>\n <span>{ont.updatedAt}</span>\n </div>\n </CardContent>\n </Card>\n ))}\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;AAMA,IAAMA,IAAuC;CAC3C,KAAK;CACL,MAAM;CACN,MAAM;CACN,OAAO;AACT;AAEA,SAAgBC,IAAe;CAC7B,IAAM,EAAE,SAAMC,EAAQ,GAChB,EAAE,kBAAeC,EAAoB,GACrCC,KAAM,GAAa,GAAkB,MACzCC,EAAsBC,GAAGC,GAAKC,GAAUC,CAAM,GAE1CC,IAAuC;EAC3C,WAAWN,EAAG,yCAAyC,WAAW;EAClE,OAAOA,EAAG,qCAAqC,OAAO;EACtD,YAAYA,EAAG,0CAA0C,YAAY;CACvE,GAEMO,IAAeC,EAAW,QAAQ,GAAK,MAAMC,IAAMC,EAAE,YAAY,CAAC,GAClEC,IAAkBH,EAAW,QAAQ,GAAK,MAAMC,IA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;IAlDK,GAAAA,EAAI,EAkDT,CACP;GACE,CAAA;EACF;;AAET"}
|
|
1
|
+
{"version":3,"file":"OntologyPage.js","names":["formatColors","OntologyPage","useI18n","useSemanticFedStore","tx","translateWithFallback","t","key","fallback","params","statusLabels","totalClasses","ontologies","sum","o","totalProperties","publishedCount","PageHeader","Button","Search","Plus","SummaryCard","Card","CardHeader","CardTitle","CardContent","fmt","FileCode2","ont","ArrowUpRight","Badge","GitBranch","Layers"],"sources":["../../../src/semanticfed/pages/OntologyPage.tsx"],"sourcesContent":["import { useI18n } from '@burdenoff/fe-libs/shared/providers/shell';\nimport { Badge, Button, Card, CardContent, CardHeader, CardTitle } from '@burdenoff/fe-libs/ui';\nimport { ArrowUpRight, FileCode2, GitBranch, Layers, Plus, Search } from 'lucide-react';\nimport { useSemanticFedStore } from '../store/semanticfedStore';\nimport { translateWithFallback } from '../utils/i18n';\nimport { SummaryCard } from '../components/SummaryCard';\nimport { PageHeader } from '../components/PageHeader';\n\nconst formatColors: Record<string, string> = {\n OWL: 'bg-status-info-bg-subtle text-status-info-text',\n RDFS: 'bg-chart-4/10 text-chart-4',\n SKOS: 'bg-status-success-bg-subtle text-status-success-text',\n SHACL: 'bg-status-warning-bg-subtle text-status-warning-text',\n};\n\nexport function OntologyPage() {\n const { t } = useI18n();\n const { ontologies } = useSemanticFedStore();\n const tx = (key: string, fallback: string, params?: Record<string, string | number>) =>\n translateWithFallback(t, key, fallback, params);\n\n const statusLabels: Record<string, string> = {\n published: tx('semanticfed.ontology.status.published', 'Published'),\n draft: tx('semanticfed.ontology.status.draft', 'Draft'),\n deprecated: tx('semanticfed.ontology.status.deprecated', 'Deprecated'),\n };\n\n const totalClasses = ontologies.reduce((sum, o) => sum + o.classCount, 0);\n const totalProperties = ontologies.reduce((sum, o) => sum + o.propertyCount, 0);\n const publishedCount = ontologies.filter((o) => o.status === 'published').length;\n\n return (\n <div className=\"space-y-6 p-6\">\n <PageHeader\n title={tx('semanticfed.ontology.title', 'Ontology Manager')}\n description={tx(\n 'semanticfed.ontology.description',\n 'Browse, create, and manage OWL/RDFS/SKOS ontologies that define the semantic schema of your knowledge graphs.'\n )}\n actions={\n <div className=\"flex gap-2\">\n <Button variant=\"outline\" size=\"sm\">\n <Search className=\"mr-2 h-4 w-4\" />{' '}\n {tx('semanticfed.ontology.actions.search', 'Search')}\n </Button>\n <Button size=\"sm\">\n <Plus className=\"mr-2 h-4 w-4\" />\n {tx('semanticfed.ontology.actions.newOntology', 'New Ontology')}\n </Button>\n </div>\n }\n />\n\n <div className=\"grid gap-4 md:grid-cols-4\">\n <SummaryCard\n title={tx('semanticfed.ontology.summary.ontologies.title', 'Ontologies')}\n value={ontologies.length}\n subtitle={tx('semanticfed.ontology.summary.ontologies.subtitle', '{count} published', {\n count: publishedCount,\n })}\n />\n <SummaryCard\n title={tx('semanticfed.ontology.summary.totalClasses.title', 'Total Classes')}\n value={totalClasses}\n subtitle={tx(\n 'semanticfed.ontology.summary.totalClasses.subtitle',\n 'across all ontologies'\n )}\n />\n <SummaryCard\n title={tx('semanticfed.ontology.summary.totalProperties.title', 'Total Properties')}\n value={totalProperties}\n subtitle={tx(\n 'semanticfed.ontology.summary.totalProperties.subtitle',\n 'object + data properties'\n )}\n />\n <Card>\n <CardHeader className=\"pb-2\">\n <CardTitle className=\"text-sm font-medium\">\n {tx('semanticfed.ontology.summary.formats.title', 'Formats')}\n </CardTitle>\n </CardHeader>\n <CardContent>\n <div className=\"flex flex-wrap gap-1\">\n {Array.from(new Set(ontologies.map((o) => o.format))).map((fmt) => (\n <span\n key={fmt}\n className={`rounded px-2 py-0.5 text-xs font-medium ${formatColors[fmt] ?? ''}`}\n >\n {fmt}\n </span>\n ))}\n </div>\n <p className=\"mt-1 text-xs text-muted-foreground\">\n {tx('semanticfed.ontology.summary.formats.subtitle', 'W3C standards')}\n </p>\n </CardContent>\n </Card>\n </div>\n\n <div className=\"grid gap-4 md:grid-cols-2 lg:grid-cols-3\">\n {ontologies.map((ont) => (\n <Card key={ont.id} className=\"group transition-shadow hover:shadow-md\">\n <CardHeader className=\"pb-3\">\n <div className=\"flex items-start justify-between\">\n <div className=\"flex items-center gap-2\">\n <FileCode2 className=\"h-5 w-5 text-muted-foreground\" />\n <CardTitle className=\"text-base\">{ont.name}</CardTitle>\n </div>\n <ArrowUpRight className=\"h-4 w-4 text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100\" />\n </div>\n </CardHeader>\n <CardContent className=\"space-y-3\">\n <p className=\"truncate font-mono text-xs text-muted-foreground\">{ont.namespace}</p>\n\n <div className=\"flex items-center gap-2\">\n <Badge\n variant={\n ont.status === 'published'\n ? 'default'\n : ont.status === 'draft'\n ? 'secondary'\n : 'outline'\n }\n >\n {statusLabels[ont.status] ?? ont.status}\n </Badge>\n <span\n className={`rounded px-1.5 py-0.5 text-[10px] font-medium ${formatColors[ont.format] ?? ''}`}\n >\n {ont.format}\n </span>\n <span className=\"flex items-center gap-1 text-xs text-muted-foreground\">\n <GitBranch className=\"h-3 w-3\" /> v{ont.version}\n </span>\n </div>\n\n <div className=\"flex items-center justify-between text-xs text-muted-foreground\">\n <span className=\"flex items-center gap-1\">\n <Layers className=\"h-3 w-3\" />\n {tx('semanticfed.ontology.card.classes', '{count} classes', {\n count: ont.classCount,\n })}\n </span>\n <span>\n {tx('semanticfed.ontology.card.properties', '{count} properties', {\n count: ont.propertyCount,\n })}\n </span>\n <span>{ont.updatedAt}</span>\n </div>\n </CardContent>\n </Card>\n ))}\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;AAQA,IAAMA,IAAuC;CAC3C,KAAK;CACL,MAAM;CACN,MAAM;CACN,OAAO;AACT;AAEA,SAAgBC,IAAe;CAC7B,IAAM,EAAE,SAAMC,EAAQ,GAChB,EAAE,kBAAeC,EAAoB,GACrCC,KAAM,GAAa,GAAkB,MACzCC,EAAsBC,GAAGC,GAAKC,GAAUC,CAAM,GAE1CC,IAAuC;EAC3C,WAAWN,EAAG,yCAAyC,WAAW;EAClE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