@burdenoff/microfe-cosmicintersection 2026.1108.2 → 2026.1109.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/cosmicintersection/api/databricksTransport.d.ts +13 -0
- package/dist/cosmicintersection/api/databricksTransport.d.ts.map +1 -0
- package/dist/cosmicintersection/api/databricksTransport.js +38 -0
- package/dist/cosmicintersection/api/databricksTransport.js.map +1 -0
- package/dist/cosmicintersection/components/ActionMenu.js +17 -17
- package/dist/cosmicintersection/components/DatabricksQueueForm.d.ts +13 -0
- package/dist/cosmicintersection/components/DatabricksQueueForm.d.ts.map +1 -0
- package/dist/cosmicintersection/components/DatabricksQueueForm.js +221 -0
- package/dist/cosmicintersection/components/DatabricksQueueForm.js.map +1 -0
- package/dist/cosmicintersection/components/DatabricksRunPanel.d.ts +6 -0
- package/dist/cosmicintersection/components/DatabricksRunPanel.d.ts.map +1 -0
- package/dist/cosmicintersection/components/DatabricksRunPanel.js +206 -0
- package/dist/cosmicintersection/components/DatabricksRunPanel.js.map +1 -0
- package/dist/cosmicintersection/components/EntityFormShell.js +7 -7
- package/dist/cosmicintersection/components/EntityTagsField.js +8 -8
- package/dist/cosmicintersection/components/ErrorState.js +4 -4
- package/dist/cosmicintersection/components/FileUploadField.js +8 -8
- package/dist/cosmicintersection/components/Pagination.js +6 -6
- package/dist/cosmicintersection/components/ReleaseDraftDialog.js +17 -17
- package/dist/cosmicintersection/components/RunTriageCard.js +12 -12
- package/dist/cosmicintersection/components/SchemaProposalPanel.js +35 -35
- package/dist/cosmicintersection/components/SchemaProposalPanel.js.map +1 -1
- package/dist/cosmicintersection/components/WorkspaceTagsPicker.js +12 -12
- package/dist/cosmicintersection/components/index.js +7 -7
- package/dist/cosmicintersection/context/CosmicIntersectionContext.d.ts +2 -0
- package/dist/cosmicintersection/context/CosmicIntersectionContext.d.ts.map +1 -1
- package/dist/cosmicintersection/context/CosmicIntersectionContext.js +17 -13
- package/dist/cosmicintersection/context/CosmicIntersectionContext.js.map +1 -1
- package/dist/cosmicintersection/hooks/useDatabricksExecutions.d.ts +69 -0
- package/dist/cosmicintersection/hooks/useDatabricksExecutions.d.ts.map +1 -0
- package/dist/cosmicintersection/hooks/useDatabricksExecutions.js +89 -0
- package/dist/cosmicintersection/hooks/useDatabricksExecutions.js.map +1 -0
- package/dist/cosmicintersection/hooks/useDatabricksQueueForm.d.ts +59 -0
- package/dist/cosmicintersection/hooks/useDatabricksQueueForm.d.ts.map +1 -0
- package/dist/cosmicintersection/hooks/useDatabricksQueueForm.js +158 -0
- package/dist/cosmicintersection/hooks/useDatabricksQueueForm.js.map +1 -0
- package/dist/cosmicintersection/lib/databricksForm.d.ts +4 -0
- package/dist/cosmicintersection/lib/databricksForm.d.ts.map +1 -0
- package/dist/cosmicintersection/lib/databricksForm.js +31 -0
- package/dist/cosmicintersection/lib/databricksForm.js.map +1 -0
- package/dist/cosmicintersection/lib/databricksIntent.d.ts +19 -0
- package/dist/cosmicintersection/lib/databricksIntent.d.ts.map +1 -0
- package/dist/cosmicintersection/lib/databricksIntent.js +60 -0
- package/dist/cosmicintersection/lib/databricksIntent.js.map +1 -0
- package/dist/cosmicintersection/lib/databricksPresentation.d.ts +5 -0
- package/dist/cosmicintersection/lib/databricksPresentation.d.ts.map +1 -0
- package/dist/cosmicintersection/lib/databricksPresentation.js +27 -0
- package/dist/cosmicintersection/lib/databricksPresentation.js.map +1 -0
- package/dist/cosmicintersection/pages/access/AccessPage.js +62 -62
- package/dist/cosmicintersection/pages/access/AccessPage.js.map +1 -1
- package/dist/cosmicintersection/pages/analyses/AnalysesPage.js +107 -107
- package/dist/cosmicintersection/pages/analyses/AnalysesPage.js.map +1 -1
- package/dist/cosmicintersection/pages/collections/CollectionDetailPage.js +24 -24
- package/dist/cosmicintersection/pages/collections/CollectionsPage.js +12 -12
- package/dist/cosmicintersection/pages/dashboard/DashboardPage.js +18 -18
- package/dist/cosmicintersection/pages/datasets/DatasetDetailPage.js +91 -91
- package/dist/cosmicintersection/pages/datasets/DatasetsPage.js +209 -209
- package/dist/cosmicintersection/pages/datasets/DatasetsPage.js.map +1 -1
- package/dist/cosmicintersection/pages/discovery/DiscoveryPage.js +98 -98
- package/dist/cosmicintersection/pages/discovery/DiscoveryPage.js.map +1 -1
- package/dist/cosmicintersection/pages/lineage/LineagePage.js +15 -15
- package/dist/cosmicintersection/pages/notebooks/NotebookDetailPage.js +139 -139
- package/dist/cosmicintersection/pages/notebooks/NotebookDetailPage.js.map +1 -1
- package/dist/cosmicintersection/pages/notebooks/NotebooksPage.js +34 -34
- package/dist/cosmicintersection/pages/pipelines/PipelineDetailPage.js +39 -39
- package/dist/cosmicintersection/pages/pipelines/PipelineDetailPage.js.map +1 -1
- package/dist/cosmicintersection/pages/pipelines/PipelineFormPage.js +107 -107
- package/dist/cosmicintersection/pages/pipelines/PipelineFormPage.js.map +1 -1
- package/dist/cosmicintersection/pages/pipelines/PipelinesPage.js +32 -32
- package/dist/cosmicintersection/pages/releases/ReleasesPage.js +213 -213
- package/dist/cosmicintersection/pages/releases/ReleasesPage.js.map +1 -1
- package/dist/cosmicintersection/pages/runs/RunDetailPage.d.ts.map +1 -1
- package/dist/cosmicintersection/pages/runs/RunDetailPage.js +250 -213
- package/dist/cosmicintersection/pages/runs/RunDetailPage.js.map +1 -1
- package/dist/cosmicintersection/pages/runs/RunsPage.js +31 -31
- package/dist/cosmicintersection/pages/sources/SourceDetailPage.js +41 -41
- package/dist/cosmicintersection/pages/sources/SourcesPage.js +122 -122
- package/dist/cosmicintersection/pages/sources/SourcesPage.js.map +1 -1
- package/dist/generated/wspace-operations.d.ts +243 -0
- package/dist/generated/wspace-operations.d.ts.map +1 -0
- package/dist/generated/wspace-operations.js +1472 -0
- package/dist/generated/wspace-operations.js.map +1 -0
- package/dist/generated/wspace-types.d.ts +183281 -30204
- package/dist/generated/wspace-types.d.ts.map +1 -1
- package/package.json +10 -7
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DatabricksRunPanel.js","names":[],"sources":["../../../src/cosmicintersection/components/DatabricksRunPanel.tsx"],"sourcesContent":["import { useEffect, useMemo, useState } from 'react';\nimport { Button, Card, CardContent, CardHeader, CardTitle } from '@burdenoff/fe-libs/ui';\nimport { QueryClient, QueryClientProvider } from '@tanstack/react-query';\n\nimport type { CosDatabricksExecutionFieldsFragment } from '../../generated/wspace-operations';\nimport type { DatabricksRequestScope } from '../api/databricksTransport';\nimport { useCosmicIntersection } from '../context/CosmicIntersectionContext';\nimport { SafeLink } from './SafeLink';\nimport { databricksIntentKey, safeLogsUrl } from '../lib/databricksPresentation';\nimport DatabricksQueueForm from './DatabricksQueueForm';\nimport { useDatabricksExecutions } from '../hooks/useDatabricksExecutions';\n\ntype Execution = CosDatabricksExecutionFieldsFragment;\nconst CANCELLABLE = new Set(['QUEUED', 'SUBMITTING', 'RUNNING', 'REQUIRES_ATTENTION']);\n\nfunction CapturedRunPanel({\n scope,\n runId,\n canQueue,\n onRunChanged,\n}: {\n scope: DatabricksRequestScope;\n runId: string;\n canQueue: boolean;\n onRunChanged(): Promise<void>;\n}) {\n const {\n items,\n hasMore,\n loading,\n executions,\n error,\n actionId,\n offset,\n setOffset,\n setError,\n refresh,\n act,\n request,\n intentKey,\n } = useDatabricksExecutions({ scope, runId, onRunChanged });\n\n return (\n <Card>\n <CardHeader>\n <CardTitle>Databricks jobs</CardTitle>\n </CardHeader>\n <CardContent className=\"space-y-4\">\n <p className=\"text-sm text-text-secondary\">\n Jobs run in your Databricks workspace. Databricks usage is billed by your account.\n Cancelling requests a stop; a job may continue until Databricks confirms it stopped.\n </p>\n <Button\n variant=\"outline\"\n disabled={loading || actionId !== null}\n onClick={() => {\n setError(null);\n void refresh().catch(() =>\n setError(\n 'Could not confirm status. Retry the status read before taking another action.'\n )\n );\n }}\n >\n {loading ? 'Refreshing…' : 'Refresh job status'}\n </Button>\n {error ? (\n <p role=\"alert\" className=\"text-sm text-status-error-text\">\n {error}\n </p>\n ) : null}\n {executions.data?.intentRecoveryUnavailable ? (\n <p role=\"alert\" className=\"text-sm text-status-error-text\">\n The saved request could not be recovered. Existing jobs remain available for inspection\n and cancellation. Do not submit another job until its request identity is recovered.\n </p>\n ) : null}\n {executions.isError ? (\n <p role=\"alert\" className=\"text-sm text-status-error-text\">\n Could not confirm Databricks status. Retry the status read before taking another action.\n </p>\n ) : null}\n {!loading && !items.length && !error && !executions.isError ? (\n <p>No Databricks jobs on this page.</p>\n ) : null}\n <ul className=\"space-y-3\" aria-label=\"Databricks executions\">\n {items.map((item) => (\n <ExecutionCard\n key={item.id}\n item={item}\n busy={actionId !== null}\n onCancel={() => void act(item, false)}\n onResume={() => void act(item, true)}\n />\n ))}\n </ul>\n <div className=\"flex gap-2\" aria-label=\"Databricks execution pages\">\n <Button\n variant=\"outline\"\n disabled={!offset || loading || actionId !== null}\n onClick={() => {\n setError(null);\n setOffset(Math.max(0, offset - 10));\n }}\n >\n Previous jobs\n </Button>\n <Button\n variant=\"outline\"\n disabled={!hasMore || loading || actionId !== null}\n onClick={() => {\n setError(null);\n setOffset(offset + 10);\n }}\n >\n Next jobs\n </Button>\n </div>\n <DatabricksQueueForm\n canQueue={canQueue}\n request={request}\n runId={runId}\n workspaceId={scope.workspaceId}\n intentKey={intentKey}\n onQueued={refresh}\n statusReady={\n executions.isSuccess &&\n !loading &&\n !executions.data.intentRecoveryUnavailable &&\n error === null\n }\n />\n </CardContent>\n </Card>\n );\n}\n\nfunction ScopedRunPanel(props: {\n scope: DatabricksRequestScope;\n runId: string;\n canQueue: boolean;\n onRunChanged(): Promise<void>;\n}) {\n const [client] = useState(\n () =>\n new QueryClient({\n defaultOptions: { queries: { retry: false, refetchOnWindowFocus: false } },\n })\n );\n useEffect(\n () => () => {\n void client.cancelQueries();\n client.clear();\n },\n [client]\n );\n return (\n <QueryClientProvider client={client}>\n <CapturedRunPanel {...props} />\n </QueryClientProvider>\n );\n}\n\nexport default function DatabricksRunPanel({\n runId,\n canQueue,\n onRunChanged,\n}: {\n runId: string;\n canQueue: boolean;\n onRunChanged(): Promise<void>;\n}) {\n const context = useCosmicIntersection();\n const scope = useMemo(\n () => ({\n apiGatewayUrl: context.apiGatewayUrl,\n authToken: context.authToken,\n actorId: context.currentUser?.id ?? '',\n workspaceId: context.workspaceId ?? '',\n tenantId: context.tenantId,\n organizationId: context.organizationId,\n projectId: context.projectId,\n }),\n [\n context.apiGatewayUrl,\n context.authToken,\n context.currentUser?.id,\n context.workspaceId,\n context.tenantId,\n context.organizationId,\n context.projectId,\n ]\n );\n const intentKey = useMemo(() => {\n try {\n return databricksIntentKey(scope, runId);\n } catch {\n return null;\n }\n }, [scope, runId]);\n if (!scope.actorId || !scope.authToken || !scope.workspaceId || !scope.apiGatewayUrl) {\n return <p role=\"alert\">Select a workspace and sign in before opening Databricks jobs.</p>;\n }\n if (intentKey === null) {\n return (\n <p role=\"alert\">\n The Databricks gateway address is unsupported. Check the app configuration.\n </p>\n );\n }\n return (\n <ScopedRunPanel\n key={intentKey}\n scope={scope}\n runId={runId}\n canQueue={canQueue}\n onRunChanged={onRunChanged}\n />\n );\n}\n\nfunction ExecutionCard({\n item,\n busy,\n onCancel,\n onResume,\n}: {\n item: Execution;\n busy: boolean;\n onCancel(): void;\n onResume(): void;\n}) {\n const logsUrl = safeLogsUrl(item.logsUrl);\n return (\n <li className=\"space-y-2 rounded-card border border-border-default p-4\">\n <p className=\"font-medium\">\n Job {item.jobId} · {item.state.replaceAll('_', ' ')}\n </p>\n {item.state === 'REQUIRES_ATTENTION' ? (\n <p className=\"text-sm\">\n Monitoring needs attention. This does not mean the external job stopped. Repair its\n existing connection, then resume monitoring.\n </p>\n ) : null}\n {item.cancelRequested ? (\n <p className=\"text-sm\">Cancellation requested; waiting for a confirmed terminal state.</p>\n ) : null}\n <p className=\"text-sm text-text-secondary\">\n Deadline: {new Date(item.deadlineAt).toLocaleString()}\n </p>\n <p className=\"text-sm text-text-secondary\">\n Declared lineage: {item.inputDatasetIds.length} input datasets,{' '}\n {item.outputDatasetIds.length} output datasets.\n </p>\n {logsUrl ? (\n <SafeLink href={logsUrl} className=\"underline\">\n Open authenticated Databricks logs\n </SafeLink>\n ) : null}\n <div className=\"flex flex-wrap gap-2\">\n {CANCELLABLE.has(item.state) && !item.cancelRequested ? (\n <Button variant=\"outline\" disabled={busy} onClick={onCancel}>\n Request cancellation\n </Button>\n ) : null}\n {item.state === 'REQUIRES_ATTENTION' ? (\n <Button variant=\"outline\" disabled={busy} onClick={onResume}>\n Resume monitoring\n </Button>\n ) : null}\n </div>\n </li>\n );\n}\n"],"mappings":"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"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useTr as e } from "../../shared/hooks/useTr.js";
|
|
2
2
|
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { Button as r } from "@burdenoff/fe-libs/ui";
|
|
4
|
+
import { ArrowLeft as i, Save as a } from "lucide-react";
|
|
5
5
|
//#region src/cosmicintersection/components/EntityFormShell.tsx
|
|
6
6
|
function o({ title: o, description: s, purpose: c, backLabel: l, onBack: u, onSubmit: d, submitLabel: f, savingLabel: p, saving: m = !1, submitDisabled: h = !1, children: g }) {
|
|
7
7
|
let _ = e(), v = p ?? _("cosmicintersection.common.saving", "Saving…");
|
|
@@ -9,12 +9,12 @@ function o({ title: o, description: s, purpose: c, backLabel: l, onBack: u, onSu
|
|
|
9
9
|
className: "space-y-6 p-6",
|
|
10
10
|
children: [
|
|
11
11
|
/* @__PURE__ */ n("div", { children: [
|
|
12
|
-
/* @__PURE__ */ n(
|
|
12
|
+
/* @__PURE__ */ n(r, {
|
|
13
13
|
type: "button",
|
|
14
14
|
variant: "ghost",
|
|
15
15
|
size: "sm",
|
|
16
16
|
onClick: u,
|
|
17
|
-
children: [/* @__PURE__ */ t(
|
|
17
|
+
children: [/* @__PURE__ */ t(i, { className: "size-4" }), l]
|
|
18
18
|
}),
|
|
19
19
|
/* @__PURE__ */ t("h1", {
|
|
20
20
|
className: "mt-3 text-2xl font-bold text-text-primary",
|
|
@@ -36,16 +36,16 @@ function o({ title: o, description: s, purpose: c, backLabel: l, onBack: u, onSu
|
|
|
36
36
|
className: "space-y-4",
|
|
37
37
|
children: [g, /* @__PURE__ */ n("div", {
|
|
38
38
|
className: "flex justify-end gap-3",
|
|
39
|
-
children: [/* @__PURE__ */ t(
|
|
39
|
+
children: [/* @__PURE__ */ t(r, {
|
|
40
40
|
type: "button",
|
|
41
41
|
variant: "outline",
|
|
42
42
|
onClick: u,
|
|
43
43
|
disabled: m,
|
|
44
44
|
children: _("cosmicintersection.common.cancel", "Cancel")
|
|
45
|
-
}), /* @__PURE__ */ n(
|
|
45
|
+
}), /* @__PURE__ */ n(r, {
|
|
46
46
|
type: "submit",
|
|
47
47
|
disabled: m || h,
|
|
48
|
-
children: [/* @__PURE__ */ t(
|
|
48
|
+
children: [/* @__PURE__ */ t(a, { className: "size-4" }), m ? v : f]
|
|
49
49
|
})]
|
|
50
50
|
})]
|
|
51
51
|
})
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useState as e } from "react";
|
|
2
2
|
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { Badge as r, Button as i, Input as a } from "@burdenoff/fe-libs/ui";
|
|
4
|
+
import { Plus as o, Tag as s, X as c } from "lucide-react";
|
|
5
5
|
//#region src/cosmicintersection/components/EntityTagsField.tsx
|
|
6
6
|
function l({ value: l, onChange: u, label: d = "Tags", placeholder: f = "Add a tag and press Enter", disabled: p = !1, className: m }) {
|
|
7
7
|
let [h, g] = e(""), _ = () => {
|
|
@@ -15,7 +15,7 @@ function l({ value: l, onChange: u, label: d = "Tags", placeholder: f = "Add a t
|
|
|
15
15
|
children: [
|
|
16
16
|
/* @__PURE__ */ n("div", {
|
|
17
17
|
className: "flex items-center gap-2 text-sm font-medium text-text-primary",
|
|
18
|
-
children: [/* @__PURE__ */ t(
|
|
18
|
+
children: [/* @__PURE__ */ t(s, {
|
|
19
19
|
className: "size-4 text-text-secondary",
|
|
20
20
|
"aria-hidden": "true"
|
|
21
21
|
}), /* @__PURE__ */ t("span", { children: d })]
|
|
@@ -27,7 +27,7 @@ function l({ value: l, onChange: u, label: d = "Tags", placeholder: f = "Add a t
|
|
|
27
27
|
children: l.length === 0 ? /* @__PURE__ */ t("span", {
|
|
28
28
|
className: "text-sm text-text-secondary",
|
|
29
29
|
children: "No tags yet."
|
|
30
|
-
}) : l.map((e) => /* @__PURE__ */ n(
|
|
30
|
+
}) : l.map((e) => /* @__PURE__ */ n(r, {
|
|
31
31
|
variant: "secondary",
|
|
32
32
|
className: "gap-1.5",
|
|
33
33
|
role: "listitem",
|
|
@@ -40,7 +40,7 @@ function l({ value: l, onChange: u, label: d = "Tags", placeholder: f = "Add a t
|
|
|
40
40
|
disabled: p,
|
|
41
41
|
"aria-label": `Remove ${e}`,
|
|
42
42
|
className: "rounded-full text-text-secondary transition-colors hover:text-text-primary focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-border-focus disabled:opacity-50",
|
|
43
|
-
children: /* @__PURE__ */ t(
|
|
43
|
+
children: /* @__PURE__ */ t(c, {
|
|
44
44
|
className: "size-3",
|
|
45
45
|
"aria-hidden": "true"
|
|
46
46
|
})
|
|
@@ -49,7 +49,7 @@ function l({ value: l, onChange: u, label: d = "Tags", placeholder: f = "Add a t
|
|
|
49
49
|
}),
|
|
50
50
|
/* @__PURE__ */ n("div", {
|
|
51
51
|
className: "flex items-center gap-2",
|
|
52
|
-
children: [/* @__PURE__ */ t(
|
|
52
|
+
children: [/* @__PURE__ */ t(a, {
|
|
53
53
|
value: h,
|
|
54
54
|
onChange: (e) => g(e.target.value),
|
|
55
55
|
placeholder: f,
|
|
@@ -59,13 +59,13 @@ function l({ value: l, onChange: u, label: d = "Tags", placeholder: f = "Add a t
|
|
|
59
59
|
onKeyDown: (e) => {
|
|
60
60
|
e.key === "Enter" && (e.preventDefault(), _());
|
|
61
61
|
}
|
|
62
|
-
}), /* @__PURE__ */ n(
|
|
62
|
+
}), /* @__PURE__ */ n(i, {
|
|
63
63
|
type: "button",
|
|
64
64
|
variant: "outline",
|
|
65
65
|
size: "sm",
|
|
66
66
|
onClick: _,
|
|
67
67
|
disabled: p || !h.trim(),
|
|
68
|
-
children: [/* @__PURE__ */ t(
|
|
68
|
+
children: [/* @__PURE__ */ t(o, { className: "size-4" }), "Add"]
|
|
69
69
|
})]
|
|
70
70
|
})
|
|
71
71
|
]
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useTr as e } from "../../shared/hooks/useTr.js";
|
|
2
2
|
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { Button as r } from "@burdenoff/fe-libs/ui";
|
|
4
|
+
import { AlertTriangle as i } from "lucide-react";
|
|
5
5
|
//#region src/cosmicintersection/components/ErrorState.tsx
|
|
6
6
|
function a({ title: a, message: o, onRetry: s, retryLabel: c, className: l }) {
|
|
7
7
|
let u = e(), d = a ?? u("cosmicintersection.common.error", "Something went wrong"), f = o ?? u("cosmicintersection.common.errorDescription", "We could not load this data. Please try again."), p = c ?? u("cosmicintersection.common.retry", "Retry");
|
|
@@ -11,7 +11,7 @@ function a({ title: a, message: o, onRetry: s, retryLabel: c, className: l }) {
|
|
|
11
11
|
children: [
|
|
12
12
|
/* @__PURE__ */ t("div", {
|
|
13
13
|
className: "flex size-12 items-center justify-center rounded-full bg-status-error-bg text-status-error-text",
|
|
14
|
-
children: /* @__PURE__ */ t(
|
|
14
|
+
children: /* @__PURE__ */ t(i, {
|
|
15
15
|
className: "size-6",
|
|
16
16
|
"aria-hidden": "true"
|
|
17
17
|
})
|
|
@@ -26,7 +26,7 @@ function a({ title: a, message: o, onRetry: s, retryLabel: c, className: l }) {
|
|
|
26
26
|
children: f
|
|
27
27
|
})]
|
|
28
28
|
}),
|
|
29
|
-
s ? /* @__PURE__ */ t(
|
|
29
|
+
s ? /* @__PURE__ */ t(r, {
|
|
30
30
|
type: "button",
|
|
31
31
|
variant: "outline",
|
|
32
32
|
size: "sm",
|
|
@@ -2,8 +2,8 @@ import { notify as e } from "../lib/toast.js";
|
|
|
2
2
|
import { useTr as t } from "../../shared/hooks/useTr.js";
|
|
3
3
|
import { useId as n, useRef as r, useState as i } from "react";
|
|
4
4
|
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { Button as s } from "@burdenoff/fe-libs/ui";
|
|
6
|
+
import { Download as c, FileUp as l, Loader2 as u, Paperclip as d, X as f } from "lucide-react";
|
|
7
7
|
import { gql as p } from "@apollo/client";
|
|
8
8
|
import { useApolloClient as m, useQuery as h } from "@apollo/client/react";
|
|
9
9
|
//#region src/cosmicintersection/components/FileUploadField.tsx
|
|
@@ -88,7 +88,7 @@ function x({ value: p, onChange: h, label: v, hint: y, folderId: x, accept: S, d
|
|
|
88
88
|
className: "flex flex-wrap items-center gap-3",
|
|
89
89
|
children: [/* @__PURE__ */ a("div", {
|
|
90
90
|
className: "flex size-12 shrink-0 items-center justify-center rounded-card border border-dashed border-border-default bg-bg-sunken text-text-secondary",
|
|
91
|
-
children: /* @__PURE__ */ a(
|
|
91
|
+
children: /* @__PURE__ */ a(d, {
|
|
92
92
|
className: "size-5",
|
|
93
93
|
"aria-hidden": "true"
|
|
94
94
|
})
|
|
@@ -96,20 +96,20 @@ function x({ value: p, onChange: h, label: v, hint: y, folderId: x, accept: S, d
|
|
|
96
96
|
className: "space-y-1",
|
|
97
97
|
children: [/* @__PURE__ */ o("div", {
|
|
98
98
|
className: "flex items-center gap-2",
|
|
99
|
-
children: [/* @__PURE__ */ o(
|
|
99
|
+
children: [/* @__PURE__ */ o(s, {
|
|
100
100
|
type: "button",
|
|
101
101
|
variant: "secondary",
|
|
102
102
|
size: "sm",
|
|
103
103
|
disabled: C || k,
|
|
104
104
|
onClick: () => D.current?.click(),
|
|
105
|
-
children: [k ? /* @__PURE__ */ a(
|
|
106
|
-
}), p && !k ? /* @__PURE__ */ o(
|
|
105
|
+
children: [k ? /* @__PURE__ */ a(u, { className: "size-4 animate-spin" }) : /* @__PURE__ */ a(l, { className: "size-4" }), k ? T("cosmicintersection.common.uploading", "Uploading…") : p ? T("cosmicintersection.common.replaceFile", "Replace file") : v]
|
|
106
|
+
}), p && !k ? /* @__PURE__ */ o(s, {
|
|
107
107
|
type: "button",
|
|
108
108
|
variant: "ghost",
|
|
109
109
|
size: "sm",
|
|
110
110
|
onClick: () => void F(),
|
|
111
111
|
disabled: C,
|
|
112
|
-
children: [/* @__PURE__ */ a(
|
|
112
|
+
children: [/* @__PURE__ */ a(f, { className: "size-4" }), T("cosmicintersection.common.remove", "Remove")]
|
|
113
113
|
}) : null]
|
|
114
114
|
}), p ? /* @__PURE__ */ o("div", {
|
|
115
115
|
className: "flex flex-wrap items-center gap-2 text-xs text-text-secondary",
|
|
@@ -121,7 +121,7 @@ function x({ value: p, onChange: h, label: v, hint: y, folderId: x, accept: S, d
|
|
|
121
121
|
target: "_blank",
|
|
122
122
|
rel: "noopener noreferrer",
|
|
123
123
|
className: "inline-flex items-center gap-1 text-text-primary underline-offset-2 hover:underline",
|
|
124
|
-
children: [/* @__PURE__ */ a(
|
|
124
|
+
children: [/* @__PURE__ */ a(c, {
|
|
125
125
|
className: "size-3.5",
|
|
126
126
|
"aria-hidden": "true"
|
|
127
127
|
}), T("cosmicintersection.common.download", "Download")]
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useTr as e } from "../../shared/hooks/useTr.js";
|
|
2
2
|
import { useState as t } from "react";
|
|
3
3
|
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { Button as i } from "@burdenoff/fe-libs/ui";
|
|
5
|
+
import { ChevronLeft as a, ChevronRight as o } from "lucide-react";
|
|
6
6
|
//#region src/cosmicintersection/components/Pagination.tsx
|
|
7
7
|
var s = 50;
|
|
8
8
|
function c(e = {}) {
|
|
@@ -42,21 +42,21 @@ function l({ offset: t, limit: s, loadedCount: c, hasMore: l, onPrev: u, onNext:
|
|
|
42
42
|
b
|
|
43
43
|
]
|
|
44
44
|
}),
|
|
45
|
-
/* @__PURE__ */ r(
|
|
45
|
+
/* @__PURE__ */ r(i, {
|
|
46
46
|
size: "sm",
|
|
47
47
|
variant: "outline",
|
|
48
48
|
onClick: u,
|
|
49
49
|
disabled: !v || p,
|
|
50
50
|
"aria-label": h("cosmicintersection.common.prev", "Previous page"),
|
|
51
|
-
children: [/* @__PURE__ */ n(
|
|
51
|
+
children: [/* @__PURE__ */ n(a, { className: "size-4" }), h("cosmicintersection.common.prev", "Prev")]
|
|
52
52
|
}),
|
|
53
|
-
/* @__PURE__ */ r(
|
|
53
|
+
/* @__PURE__ */ r(i, {
|
|
54
54
|
size: "sm",
|
|
55
55
|
variant: "outline",
|
|
56
56
|
onClick: d,
|
|
57
57
|
disabled: !y || p,
|
|
58
58
|
"aria-label": h("cosmicintersection.common.next", "Next page"),
|
|
59
|
-
children: [h("cosmicintersection.common.next", "Next"), /* @__PURE__ */ n(
|
|
59
|
+
children: [h("cosmicintersection.common.next", "Next"), /* @__PURE__ */ n(o, { className: "size-4" })]
|
|
60
60
|
})
|
|
61
61
|
]
|
|
62
62
|
})]
|
|
@@ -4,8 +4,8 @@ import { useCosAiDraftReleaseMutation as n, useCosCreateReleaseMutation as r } f
|
|
|
4
4
|
import { AiGeneratedDisclaimer as i, AiRunAttribution as a } from "./AiRunAttribution.js";
|
|
5
5
|
import { useRef as o, useState as s } from "react";
|
|
6
6
|
import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
7
|
+
import { Button as d, Input as f, Label as p, Textarea as m } from "@burdenoff/fe-libs/ui";
|
|
8
|
+
import { Sparkles as h } from "lucide-react";
|
|
9
9
|
//#region src/cosmicintersection/components/ReleaseDraftDialog.tsx
|
|
10
10
|
function g({ notebook: g, open: _, onOpenChange: v }) {
|
|
11
11
|
let { navigate: y } = e(), [b, { loading: x }] = n(), [S, { loading: C }] = r(), [w, T] = s(null), [E, D] = s(""), [O, k] = s(""), [A, j] = s(""), [M, N] = s(""), [P, F] = s(""), I = o(null), L = x || C, R = (e) => {
|
|
@@ -52,18 +52,18 @@ function g({ notebook: g, open: _, onOpenChange: v }) {
|
|
|
52
52
|
g.title,
|
|
53
53
|
"” and its completed analyses. Nothing is created until you confirm, and publishing always stays a separate, explicit step."
|
|
54
54
|
]
|
|
55
|
-
})] }), w ? null : x ? /* @__PURE__ */ l(
|
|
55
|
+
})] }), w ? null : x ? /* @__PURE__ */ l(d, {
|
|
56
56
|
type: "button",
|
|
57
57
|
variant: "outline",
|
|
58
58
|
size: "sm",
|
|
59
59
|
onClick: z,
|
|
60
60
|
children: "Cancel"
|
|
61
|
-
}) : /* @__PURE__ */ u(
|
|
61
|
+
}) : /* @__PURE__ */ u(d, {
|
|
62
62
|
type: "button",
|
|
63
63
|
variant: "outline",
|
|
64
64
|
size: "sm",
|
|
65
65
|
onClick: () => void B(),
|
|
66
|
-
children: [/* @__PURE__ */ l(
|
|
66
|
+
children: [/* @__PURE__ */ l(h, { className: "size-4" }), "Draft from notebook"]
|
|
67
67
|
})]
|
|
68
68
|
}),
|
|
69
69
|
x ? /* @__PURE__ */ l("p", {
|
|
@@ -91,10 +91,10 @@ function g({ notebook: g, open: _, onOpenChange: v }) {
|
|
|
91
91
|
children: [
|
|
92
92
|
/* @__PURE__ */ u("div", {
|
|
93
93
|
className: "space-y-1.5",
|
|
94
|
-
children: [/* @__PURE__ */ l(
|
|
94
|
+
children: [/* @__PURE__ */ l(p, {
|
|
95
95
|
htmlFor: "cos-draft-title",
|
|
96
96
|
children: "Title"
|
|
97
|
-
}), /* @__PURE__ */ l(
|
|
97
|
+
}), /* @__PURE__ */ l(f, {
|
|
98
98
|
id: "cos-draft-title",
|
|
99
99
|
value: E,
|
|
100
100
|
onChange: (e) => D(e.target.value)
|
|
@@ -102,10 +102,10 @@ function g({ notebook: g, open: _, onOpenChange: v }) {
|
|
|
102
102
|
}),
|
|
103
103
|
/* @__PURE__ */ u("div", {
|
|
104
104
|
className: "space-y-1.5",
|
|
105
|
-
children: [/* @__PURE__ */ l(
|
|
105
|
+
children: [/* @__PURE__ */ l(p, {
|
|
106
106
|
htmlFor: "cos-draft-abstract",
|
|
107
107
|
children: "Abstract"
|
|
108
|
-
}), /* @__PURE__ */ l(
|
|
108
|
+
}), /* @__PURE__ */ l(m, {
|
|
109
109
|
id: "cos-draft-abstract",
|
|
110
110
|
value: O,
|
|
111
111
|
onChange: (e) => k(e.target.value),
|
|
@@ -117,10 +117,10 @@ function g({ notebook: g, open: _, onOpenChange: v }) {
|
|
|
117
117
|
children: [
|
|
118
118
|
/* @__PURE__ */ u("div", {
|
|
119
119
|
className: "space-y-1.5",
|
|
120
|
-
children: [/* @__PURE__ */ l(
|
|
120
|
+
children: [/* @__PURE__ */ l(p, {
|
|
121
121
|
htmlFor: "cos-draft-version",
|
|
122
122
|
children: "Version"
|
|
123
|
-
}), /* @__PURE__ */ l(
|
|
123
|
+
}), /* @__PURE__ */ l(f, {
|
|
124
124
|
id: "cos-draft-version",
|
|
125
125
|
value: A,
|
|
126
126
|
onChange: (e) => j(e.target.value)
|
|
@@ -128,10 +128,10 @@ function g({ notebook: g, open: _, onOpenChange: v }) {
|
|
|
128
128
|
}),
|
|
129
129
|
/* @__PURE__ */ u("div", {
|
|
130
130
|
className: "space-y-1.5",
|
|
131
|
-
children: [/* @__PURE__ */ l(
|
|
131
|
+
children: [/* @__PURE__ */ l(p, {
|
|
132
132
|
htmlFor: "cos-draft-license",
|
|
133
133
|
children: "License"
|
|
134
|
-
}), /* @__PURE__ */ l(
|
|
134
|
+
}), /* @__PURE__ */ l(f, {
|
|
135
135
|
id: "cos-draft-license",
|
|
136
136
|
value: P,
|
|
137
137
|
onChange: (e) => F(e.target.value)
|
|
@@ -139,10 +139,10 @@ function g({ notebook: g, open: _, onOpenChange: v }) {
|
|
|
139
139
|
}),
|
|
140
140
|
/* @__PURE__ */ u("div", {
|
|
141
141
|
className: "space-y-1.5",
|
|
142
|
-
children: [/* @__PURE__ */ l(
|
|
142
|
+
children: [/* @__PURE__ */ l(p, {
|
|
143
143
|
htmlFor: "cos-draft-authors",
|
|
144
144
|
children: "Authors (comma-separated)"
|
|
145
|
-
}), /* @__PURE__ */ l(
|
|
145
|
+
}), /* @__PURE__ */ l(f, {
|
|
146
146
|
id: "cos-draft-authors",
|
|
147
147
|
value: M,
|
|
148
148
|
onChange: (e) => N(e.target.value)
|
|
@@ -164,13 +164,13 @@ function g({ notebook: g, open: _, onOpenChange: v }) {
|
|
|
164
164
|
/* @__PURE__ */ u("div", {
|
|
165
165
|
className: "flex flex-wrap items-center gap-2 border-t border-border-default pt-4",
|
|
166
166
|
children: [
|
|
167
|
-
/* @__PURE__ */ l(
|
|
167
|
+
/* @__PURE__ */ l(d, {
|
|
168
168
|
type: "button",
|
|
169
169
|
onClick: () => void V(),
|
|
170
170
|
disabled: L,
|
|
171
171
|
children: C ? "Creating draft…" : "Create draft release"
|
|
172
172
|
}),
|
|
173
|
-
/* @__PURE__ */ l(
|
|
173
|
+
/* @__PURE__ */ l(d, {
|
|
174
174
|
type: "button",
|
|
175
175
|
variant: "outline",
|
|
176
176
|
onClick: () => R(!1),
|
|
@@ -4,8 +4,8 @@ import { useCosAiTriageRunMutation as n, useCosPublishDatasetMutation as r, useC
|
|
|
4
4
|
import { AiRunAttribution as s } from "./AiRunAttribution.js";
|
|
5
5
|
import { useRef as c, useState as l } from "react";
|
|
6
6
|
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
7
|
+
import { Badge as f, Button as p, Dialog as m, DialogContent as h, DialogDescription as g, DialogFooter as _, DialogHeader as v, DialogTitle as y } from "@burdenoff/fe-libs/ui";
|
|
8
|
+
import { ExternalLink as b, Sparkles as x } from "lucide-react";
|
|
9
9
|
//#region src/cosmicintersection/components/RunTriageCard.tsx
|
|
10
10
|
var S = {
|
|
11
11
|
INFO: "bg-status-info-bg-subtle text-status-info-text border-status-info-border",
|
|
@@ -76,26 +76,26 @@ function T({ run: T, onChanged: E }) {
|
|
|
76
76
|
className: "flex flex-wrap items-center justify-between gap-2",
|
|
77
77
|
children: [/* @__PURE__ */ d("div", {
|
|
78
78
|
className: "flex items-center gap-2",
|
|
79
|
-
children: [/* @__PURE__ */ u(
|
|
79
|
+
children: [/* @__PURE__ */ u(x, {
|
|
80
80
|
className: "size-5 text-text-secondary",
|
|
81
81
|
"aria-hidden": "true"
|
|
82
82
|
}), /* @__PURE__ */ u("h2", {
|
|
83
83
|
className: "text-lg font-semibold text-text-primary",
|
|
84
84
|
children: "AI triage"
|
|
85
85
|
})]
|
|
86
|
-
}), U ? k ? /* @__PURE__ */ u(
|
|
86
|
+
}), U ? k ? /* @__PURE__ */ u(p, {
|
|
87
87
|
type: "button",
|
|
88
88
|
variant: "outline",
|
|
89
89
|
size: "sm",
|
|
90
90
|
onClick: G,
|
|
91
91
|
children: "Cancel"
|
|
92
|
-
}) : /* @__PURE__ */ d(
|
|
92
|
+
}) : /* @__PURE__ */ d(p, {
|
|
93
93
|
type: "button",
|
|
94
94
|
variant: "outline",
|
|
95
95
|
size: "sm",
|
|
96
96
|
onClick: () => void K(),
|
|
97
97
|
disabled: W,
|
|
98
|
-
children: [/* @__PURE__ */ u(
|
|
98
|
+
children: [/* @__PURE__ */ u(x, { className: "size-4" }), R ? "Re-run triage" : "Triage this run"]
|
|
99
99
|
}) : /* @__PURE__ */ u("p", {
|
|
100
100
|
className: "text-sm text-text-tertiary",
|
|
101
101
|
children: "Triage is available once the run finishes."
|
|
@@ -111,7 +111,7 @@ function T({ run: T, onChanged: E }) {
|
|
|
111
111
|
children: [
|
|
112
112
|
/* @__PURE__ */ d("div", {
|
|
113
113
|
className: "flex flex-wrap items-center gap-2",
|
|
114
|
-
children: [/* @__PURE__ */ u(
|
|
114
|
+
children: [/* @__PURE__ */ u(f, {
|
|
115
115
|
variant: "secondary",
|
|
116
116
|
className: "text-sm",
|
|
117
117
|
children: R.action.replace(/_/g, " ")
|
|
@@ -191,7 +191,7 @@ function T({ run: T, onChanged: E }) {
|
|
|
191
191
|
onClick: () => D(n),
|
|
192
192
|
className: "inline-flex items-center gap-1.5 text-text-link underline-offset-2 hover:underline focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-border-focus",
|
|
193
193
|
children: [
|
|
194
|
-
/* @__PURE__ */ u(
|
|
194
|
+
/* @__PURE__ */ u(b, {
|
|
195
195
|
className: "size-3.5",
|
|
196
196
|
"aria-hidden": "true"
|
|
197
197
|
}),
|
|
@@ -230,7 +230,7 @@ function T({ run: T, onChanged: E }) {
|
|
|
230
230
|
X ? /* @__PURE__ */ d("div", {
|
|
231
231
|
className: "flex flex-wrap items-center gap-3 border-t border-border-default pt-4",
|
|
232
232
|
children: [
|
|
233
|
-
Z ? /* @__PURE__ */ u(
|
|
233
|
+
Z ? /* @__PURE__ */ u(p, {
|
|
234
234
|
type: "button",
|
|
235
235
|
onClick: () => void J(),
|
|
236
236
|
disabled: W,
|
|
@@ -257,16 +257,16 @@ function T({ run: T, onChanged: E }) {
|
|
|
257
257
|
})
|
|
258
258
|
]
|
|
259
259
|
}) : null,
|
|
260
|
-
/* @__PURE__ */ u(
|
|
260
|
+
/* @__PURE__ */ u(m, {
|
|
261
261
|
open: B,
|
|
262
262
|
onOpenChange: V,
|
|
263
|
-
children: /* @__PURE__ */ d(
|
|
263
|
+
children: /* @__PURE__ */ d(h, { children: [/* @__PURE__ */ d(v, { children: [/* @__PURE__ */ u(y, { children: "Publish dataset?" }), /* @__PURE__ */ u(g, { children: "Applying this recommendation publishes the dataset, making it available to consumers. This is a human action the AI cannot perform on its own." })] }), /* @__PURE__ */ d(_, { children: [/* @__PURE__ */ u(p, {
|
|
264
264
|
type: "button",
|
|
265
265
|
variant: "outline",
|
|
266
266
|
onClick: () => V(!1),
|
|
267
267
|
disabled: L,
|
|
268
268
|
children: "Cancel"
|
|
269
|
-
}), /* @__PURE__ */ u(
|
|
269
|
+
}), /* @__PURE__ */ u(p, {
|
|
270
270
|
type: "button",
|
|
271
271
|
onClick: () => void Y(),
|
|
272
272
|
disabled: L,
|
|
@@ -3,8 +3,8 @@ import { useCosAddSchemaFieldMutation as t, useCosAiProposeSchemaFieldsMutation
|
|
|
3
3
|
import { AiRunAttribution as r } from "./AiRunAttribution.js";
|
|
4
4
|
import { useRef as i, useState as a } from "react";
|
|
5
5
|
import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import { Badge as l, Button as u, Checkbox as d, Input as f, Select as p, SelectContent as m, SelectItem as h, SelectTrigger as g, SelectValue as _, Table as v, TableBody as y, TableCell as b, TableHead as x, TableHeader as S, TableRow as C, Textarea as w } from "@burdenoff/fe-libs/ui";
|
|
7
|
+
import { Check as T, Sparkles as E, TriangleAlert as D, X as ee } from "lucide-react";
|
|
8
8
|
//#region src/cosmicintersection/components/SchemaProposalPanel.tsx
|
|
9
9
|
var O = [
|
|
10
10
|
"STRING",
|
|
@@ -99,19 +99,19 @@ function j({ datasetId: j, onAccepted: M }) {
|
|
|
99
99
|
children: [/* @__PURE__ */ s("p", {
|
|
100
100
|
className: "text-sm text-text-secondary",
|
|
101
101
|
children: "Let the AI draft schema fields from the dataset’s sample — you stay the author and accept column by column."
|
|
102
|
-
}), P ? /* @__PURE__ */ s(
|
|
102
|
+
}), P ? /* @__PURE__ */ s(u, {
|
|
103
103
|
type: "button",
|
|
104
104
|
variant: "outline",
|
|
105
105
|
size: "sm",
|
|
106
106
|
onClick: J,
|
|
107
107
|
children: "Cancel"
|
|
108
|
-
}) : /* @__PURE__ */ c(
|
|
108
|
+
}) : /* @__PURE__ */ c(u, {
|
|
109
109
|
type: "button",
|
|
110
110
|
variant: "outline",
|
|
111
111
|
size: "sm",
|
|
112
112
|
onClick: () => void Y(),
|
|
113
113
|
disabled: I,
|
|
114
|
-
children: [/* @__PURE__ */ s(
|
|
114
|
+
children: [/* @__PURE__ */ s(E, { className: "size-4" }), L ? "Re-run proposal" : "Propose fields with AI"]
|
|
115
115
|
})]
|
|
116
116
|
}),
|
|
117
117
|
P ? /* @__PURE__ */ s("p", {
|
|
@@ -139,43 +139,43 @@ function j({ datasetId: j, onAccepted: M }) {
|
|
|
139
139
|
children: G.size > 0 ? `All proposals handled — ${G.size} accepted.` : "No proposals to review."
|
|
140
140
|
}) : /* @__PURE__ */ s("div", {
|
|
141
141
|
className: "overflow-x-auto rounded-card border border-border-default bg-bg-elevated",
|
|
142
|
-
children: /* @__PURE__ */ c(
|
|
143
|
-
/* @__PURE__ */ s(
|
|
142
|
+
children: /* @__PURE__ */ c(v, { children: [/* @__PURE__ */ s(S, { children: /* @__PURE__ */ c(C, { children: [
|
|
143
|
+
/* @__PURE__ */ s(x, {
|
|
144
144
|
className: "w-10",
|
|
145
145
|
"aria-label": "Select"
|
|
146
146
|
}),
|
|
147
|
-
/* @__PURE__ */ s(
|
|
148
|
-
/* @__PURE__ */ s(
|
|
149
|
-
/* @__PURE__ */ s(
|
|
150
|
-
/* @__PURE__ */ s(
|
|
151
|
-
/* @__PURE__ */ s(
|
|
152
|
-
/* @__PURE__ */ s(
|
|
153
|
-
/* @__PURE__ */ s(
|
|
147
|
+
/* @__PURE__ */ s(x, { children: "Name" }),
|
|
148
|
+
/* @__PURE__ */ s(x, { children: "Type" }),
|
|
149
|
+
/* @__PURE__ */ s(x, { children: "Unit" }),
|
|
150
|
+
/* @__PURE__ */ s(x, { children: "Nullable" }),
|
|
151
|
+
/* @__PURE__ */ s(x, { children: "Provenance note" }),
|
|
152
|
+
/* @__PURE__ */ s(x, { children: "Confidence" }),
|
|
153
|
+
/* @__PURE__ */ s(x, {
|
|
154
154
|
className: "w-24 text-right",
|
|
155
155
|
children: "Actions"
|
|
156
156
|
})
|
|
157
|
-
] }) }), /* @__PURE__ */ s(
|
|
157
|
+
] }) }), /* @__PURE__ */ s(y, { children: X.map((e) => {
|
|
158
158
|
let t = z[e.name] ?? A(e), n = e.alreadyDefined || I;
|
|
159
|
-
return /* @__PURE__ */ c(
|
|
160
|
-
/* @__PURE__ */ s(
|
|
159
|
+
return /* @__PURE__ */ c(C, { children: [
|
|
160
|
+
/* @__PURE__ */ s(b, { children: /* @__PURE__ */ s(d, {
|
|
161
161
|
"aria-label": `Select ${e.name}`,
|
|
162
162
|
checked: V.has(e.name),
|
|
163
163
|
onCheckedChange: (t) => te(e.name, t === !0),
|
|
164
164
|
disabled: e.alreadyDefined
|
|
165
165
|
}) }),
|
|
166
|
-
/* @__PURE__ */ c(
|
|
166
|
+
/* @__PURE__ */ c(b, { children: [
|
|
167
167
|
/* @__PURE__ */ s("p", {
|
|
168
168
|
className: "font-medium text-text-primary",
|
|
169
169
|
children: e.name
|
|
170
170
|
}),
|
|
171
|
-
e.alreadyDefined ? /* @__PURE__ */ s(
|
|
171
|
+
e.alreadyDefined ? /* @__PURE__ */ s(l, {
|
|
172
172
|
variant: "outline",
|
|
173
173
|
className: "mt-1 text-xs",
|
|
174
174
|
children: "Already defined"
|
|
175
175
|
}) : null,
|
|
176
176
|
e.conflicts.length > 0 ? /* @__PURE__ */ c("p", {
|
|
177
177
|
className: "mt-1 inline-flex items-start gap-1 text-xs text-status-warning-text",
|
|
178
|
-
children: [/* @__PURE__ */ s(
|
|
178
|
+
children: [/* @__PURE__ */ s(D, {
|
|
179
179
|
className: "mt-0.5 size-3 shrink-0",
|
|
180
180
|
"aria-hidden": "true"
|
|
181
181
|
}), e.conflicts.join("; ")]
|
|
@@ -185,20 +185,20 @@ function j({ datasetId: j, onAccepted: M }) {
|
|
|
185
185
|
children: e.reasons.join("; ")
|
|
186
186
|
}) : null
|
|
187
187
|
] }),
|
|
188
|
-
/* @__PURE__ */ s(
|
|
188
|
+
/* @__PURE__ */ s(b, { children: /* @__PURE__ */ c(p, {
|
|
189
189
|
value: t.fieldType,
|
|
190
190
|
onValueChange: (t) => $(e.name, { fieldType: t }),
|
|
191
191
|
disabled: n,
|
|
192
|
-
children: [/* @__PURE__ */ s(
|
|
192
|
+
children: [/* @__PURE__ */ s(g, {
|
|
193
193
|
"aria-label": `Type for ${e.name}`,
|
|
194
194
|
className: "w-32",
|
|
195
|
-
children: /* @__PURE__ */ s(
|
|
196
|
-
}), /* @__PURE__ */ s(
|
|
195
|
+
children: /* @__PURE__ */ s(_, {})
|
|
196
|
+
}), /* @__PURE__ */ s(m, { children: O.map((e) => /* @__PURE__ */ s(h, {
|
|
197
197
|
value: e,
|
|
198
198
|
children: k(e)
|
|
199
199
|
}, e)) })]
|
|
200
200
|
}) }),
|
|
201
|
-
/* @__PURE__ */ s(
|
|
201
|
+
/* @__PURE__ */ s(b, { children: /* @__PURE__ */ s(f, {
|
|
202
202
|
"aria-label": `Unit for ${e.name}`,
|
|
203
203
|
value: t.unit,
|
|
204
204
|
onChange: (t) => $(e.name, { unit: t.target.value }),
|
|
@@ -206,15 +206,15 @@ function j({ datasetId: j, onAccepted: M }) {
|
|
|
206
206
|
className: "w-24",
|
|
207
207
|
disabled: n
|
|
208
208
|
}) }),
|
|
209
|
-
/* @__PURE__ */ s(
|
|
209
|
+
/* @__PURE__ */ s(b, { children: /* @__PURE__ */ s(d, {
|
|
210
210
|
"aria-label": `Nullable for ${e.name}`,
|
|
211
211
|
checked: t.nullable,
|
|
212
212
|
onCheckedChange: (t) => $(e.name, { nullable: t === !0 }),
|
|
213
213
|
disabled: n
|
|
214
214
|
}) }),
|
|
215
|
-
/* @__PURE__ */ s(
|
|
215
|
+
/* @__PURE__ */ s(b, {
|
|
216
216
|
className: "min-w-56",
|
|
217
|
-
children: /* @__PURE__ */ s(
|
|
217
|
+
children: /* @__PURE__ */ s(w, {
|
|
218
218
|
"aria-label": `Provenance for ${e.name}`,
|
|
219
219
|
value: t.provenanceNote,
|
|
220
220
|
onChange: (t) => $(e.name, { provenanceNote: t.target.value }),
|
|
@@ -222,28 +222,28 @@ function j({ datasetId: j, onAccepted: M }) {
|
|
|
222
222
|
disabled: n
|
|
223
223
|
})
|
|
224
224
|
}),
|
|
225
|
-
/* @__PURE__ */ c(
|
|
225
|
+
/* @__PURE__ */ c(b, {
|
|
226
226
|
className: "text-sm tabular-nums text-text-secondary",
|
|
227
227
|
children: [Math.round(e.confidence * 100), "%"]
|
|
228
228
|
}),
|
|
229
|
-
/* @__PURE__ */ s(
|
|
229
|
+
/* @__PURE__ */ s(b, { children: /* @__PURE__ */ c("div", {
|
|
230
230
|
className: "flex justify-end gap-1",
|
|
231
|
-
children: [/* @__PURE__ */ s(
|
|
231
|
+
children: [/* @__PURE__ */ s(u, {
|
|
232
232
|
type: "button",
|
|
233
233
|
variant: "outline",
|
|
234
234
|
size: "sm",
|
|
235
235
|
"aria-label": `Accept ${e.name}`,
|
|
236
236
|
onClick: () => void Z(e),
|
|
237
237
|
disabled: n,
|
|
238
|
-
children: /* @__PURE__ */ s(
|
|
239
|
-
}), /* @__PURE__ */ s(
|
|
238
|
+
children: /* @__PURE__ */ s(T, { className: "size-4" })
|
|
239
|
+
}), /* @__PURE__ */ s(u, {
|
|
240
240
|
type: "button",
|
|
241
241
|
variant: "outline",
|
|
242
242
|
size: "sm",
|
|
243
243
|
"aria-label": `Reject ${e.name}`,
|
|
244
244
|
onClick: () => ne(e.name),
|
|
245
245
|
disabled: I,
|
|
246
|
-
children: /* @__PURE__ */ s(
|
|
246
|
+
children: /* @__PURE__ */ s(ee, { className: "size-4" })
|
|
247
247
|
})]
|
|
248
248
|
}) })
|
|
249
249
|
] }, e.name);
|
|
@@ -251,7 +251,7 @@ function j({ datasetId: j, onAccepted: M }) {
|
|
|
251
251
|
}),
|
|
252
252
|
V.size > 0 ? /* @__PURE__ */ c("div", {
|
|
253
253
|
className: "flex items-center gap-2",
|
|
254
|
-
children: [/* @__PURE__ */ s(
|
|
254
|
+
children: [/* @__PURE__ */ s(u, {
|
|
255
255
|
type: "button",
|
|
256
256
|
size: "sm",
|
|
257
257
|
onClick: () => void Q(),
|