@burdenoff/microfe-labsofscience 2026.827.1 → 2026.1014.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/labsofscience/LabsOfScienceRoot.d.ts.map +1 -1
- package/dist/labsofscience/LabsOfScienceRoot.js +54 -57
- package/dist/labsofscience/LabsOfScienceRoot.js.map +1 -1
- package/dist/labsofscience/components/BottomNav.d.ts.map +1 -1
- package/dist/labsofscience/components/BottomNav.js +67 -63
- package/dist/labsofscience/components/BottomNav.js.map +1 -1
- package/dist/labsofscience/hooks/index.d.ts +1 -0
- package/dist/labsofscience/hooks/index.d.ts.map +1 -1
- package/dist/labsofscience/hooks/useTr.d.ts +17 -0
- package/dist/labsofscience/hooks/useTr.d.ts.map +1 -0
- package/dist/labsofscience/hooks/useTr.js +14 -0
- package/dist/labsofscience/hooks/useTr.js.map +1 -0
- package/dist/labsofscience/pages/OverviewPage.d.ts.map +1 -1
- package/dist/labsofscience/pages/OverviewPage.js +187 -161
- package/dist/labsofscience/pages/OverviewPage.js.map +1 -1
- package/dist/labsofscience/pages/datasets/DatasetsListPage.d.ts.map +1 -1
- package/dist/labsofscience/pages/datasets/DatasetsListPage.js +129 -128
- package/dist/labsofscience/pages/datasets/DatasetsListPage.js.map +1 -1
- package/dist/labsofscience/pages/experiments/ExperimentsListPage.d.ts.map +1 -1
- package/dist/labsofscience/pages/experiments/ExperimentsListPage.js +148 -147
- package/dist/labsofscience/pages/experiments/ExperimentsListPage.js.map +1 -1
- package/dist/labsofscience/pages/instruments/InstrumentsListPage.d.ts.map +1 -1
- package/dist/labsofscience/pages/instruments/InstrumentsListPage.js +140 -139
- package/dist/labsofscience/pages/instruments/InstrumentsListPage.js.map +1 -1
- package/dist/labsofscience/pages/inventory/InventoryListPage.d.ts.map +1 -1
- package/dist/labsofscience/pages/inventory/InventoryListPage.js +169 -168
- package/dist/labsofscience/pages/inventory/InventoryListPage.js.map +1 -1
- package/dist/labsofscience/pages/notebook/NotebookListPage.d.ts.map +1 -1
- package/dist/labsofscience/pages/notebook/NotebookListPage.js +123 -122
- package/dist/labsofscience/pages/notebook/NotebookListPage.js.map +1 -1
- package/dist/labsofscience/pages/projects/ProjectsListPage.d.ts.map +1 -1
- package/dist/labsofscience/pages/projects/ProjectsListPage.js +141 -140
- package/dist/labsofscience/pages/projects/ProjectsListPage.js.map +1 -1
- package/dist/labsofscience/pages/protocols/ProtocolsListPage.d.ts.map +1 -1
- package/dist/labsofscience/pages/protocols/ProtocolsListPage.js +123 -122
- package/dist/labsofscience/pages/protocols/ProtocolsListPage.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,357 +1,383 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
1
|
+
import { useTr as e } from "../hooks/useTr.js";
|
|
2
|
+
import { useLabsOfScience as t } from "../context/LabsOfScienceContext.js";
|
|
3
|
+
import { PageLayout as n } from "../components/PageLayout.js";
|
|
4
|
+
import { MetricsCard as r } from "../components/MetricsCard.js";
|
|
5
|
+
import { StatusBadge as i } from "../components/StatusBadge.js";
|
|
6
|
+
import { LoadingState as a } from "../components/QueryStates.js";
|
|
7
|
+
import { useLabActorNames as o } from "../hooks/useLabActorNames.js";
|
|
8
|
+
import { useDatasets as ee, useExperiments as s, useLabRecentActivity as c, usePipelines as l, useProjects as u, useProtocols as d, useWorkspaceTotals as te } from "../hooks/useLabsOfScienceApi.js";
|
|
9
|
+
import { formatRelativeTime as f } from "../utils/formatters.js";
|
|
10
|
+
import { ProjectFormDialog as p } from "./projects/ProjectFormDialog.js";
|
|
11
|
+
import { ExperimentFormDialog as m } from "./experiments/ExperimentFormDialog.js";
|
|
12
|
+
import { NotebookEntryFormDialog as h } from "./notebook/NotebookEntryFormDialog.js";
|
|
13
|
+
import { RunPipelineDialog as g } from "./pipelines/RunPipelineDialog.js";
|
|
14
|
+
import { useMemo as _, useState as v } from "react";
|
|
15
|
+
import { Activity as y, ArrowRight as b, BookOpen as x, Boxes as S, Cpu as C, Database as w, FlaskConical as T, FolderKanban as E, GitBranch as D, Microscope as O } from "lucide-react";
|
|
16
|
+
import { jsx as k, jsxs as A } from "react/jsx-runtime";
|
|
17
|
+
import { Button as j } from "@burdenoff/fe-libs/ui";
|
|
17
18
|
//#region src/labsofscience/pages/OverviewPage.tsx
|
|
18
|
-
var
|
|
19
|
+
var M = {
|
|
19
20
|
limit: 5,
|
|
20
21
|
offset: 0
|
|
21
|
-
},
|
|
22
|
+
}, N = 20, P = [
|
|
22
23
|
{
|
|
23
24
|
id: "project",
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
labelKey: "labsofscience.overview.quickActions.project.label",
|
|
26
|
+
fallbackLabel: "New project",
|
|
27
|
+
hintKey: "labsofscience.overview.quickActions.project.hint",
|
|
28
|
+
fallbackHint: "Start a research project",
|
|
29
|
+
disabledHintKey: "labsofscience.overview.quickActions.project.disabledHint",
|
|
30
|
+
fallbackDisabledHint: "Start a research project",
|
|
31
|
+
icon: E
|
|
27
32
|
},
|
|
28
33
|
{
|
|
29
34
|
id: "experiment",
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
35
|
+
labelKey: "labsofscience.overview.quickActions.experiment.label",
|
|
36
|
+
fallbackLabel: "New experiment",
|
|
37
|
+
hintKey: "labsofscience.overview.quickActions.experiment.hint",
|
|
38
|
+
fallbackHint: "Design an experiment",
|
|
39
|
+
disabledHintKey: "labsofscience.overview.quickActions.experiment.disabledHint",
|
|
40
|
+
fallbackDisabledHint: "Design an experiment",
|
|
41
|
+
icon: T
|
|
33
42
|
},
|
|
34
43
|
{
|
|
35
44
|
id: "notebook",
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
45
|
+
labelKey: "labsofscience.overview.quickActions.notebook.label",
|
|
46
|
+
fallbackLabel: "New notebook entry",
|
|
47
|
+
hintKey: "labsofscience.overview.quickActions.notebook.hint",
|
|
48
|
+
fallbackHint: "Record in the ELN",
|
|
49
|
+
disabledHintKey: "labsofscience.overview.quickActions.notebook.disabledHint",
|
|
50
|
+
fallbackDisabledHint: "Record in the ELN",
|
|
51
|
+
icon: x
|
|
39
52
|
},
|
|
40
53
|
{
|
|
41
54
|
id: "pipeline",
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
55
|
+
labelKey: "labsofscience.overview.quickActions.pipeline.label",
|
|
56
|
+
fallbackLabel: "Run a pipeline",
|
|
57
|
+
hintKey: "labsofscience.overview.quickActions.pipeline.hint",
|
|
58
|
+
fallbackHint: "Execute an analysis",
|
|
59
|
+
disabledHintKey: "labsofscience.overview.quickActions.pipeline.disabledHint",
|
|
60
|
+
fallbackDisabledHint: "Create a pipeline first",
|
|
61
|
+
icon: D
|
|
45
62
|
}
|
|
46
63
|
];
|
|
47
|
-
function
|
|
48
|
-
let { navigateTo:
|
|
49
|
-
|
|
50
|
-
let re = d({ pagination: F }), ie = Y.isLoading && Z.isLoading && Q.isLoading && te.isLoading && ne.isLoading, ae = Z.data?.items ?? [], oe = Q.data?.items ?? [], $ = re.data?.items ?? [], se = b(() => {
|
|
51
|
-
let e = Y.data;
|
|
64
|
+
function F() {
|
|
65
|
+
let { navigateTo: i, currentUser: y, workspaceId: F } = t(), R = e(), [z, B] = v(!1), [V, H] = v(!1), [U, W] = v(!1), [G, K] = v(!1), q = te(), J = c(N), Y = u({ pagination: M }), X = s({ pagination: M }), Z = ee({ pagination: M }), ne = d({ pagination: M }), Q = l({ pagination: M }), re = q.isLoading && Y.isLoading && X.isLoading && Z.isLoading && ne.isLoading, ie = Y.data?.items ?? [], ae = X.data?.items ?? [], $ = Q.data?.items ?? [], oe = _(() => {
|
|
66
|
+
let e = q.data;
|
|
52
67
|
return [
|
|
53
68
|
{
|
|
54
69
|
id: "projects",
|
|
55
|
-
icon:
|
|
70
|
+
icon: E,
|
|
56
71
|
value: e?.projects ?? 0,
|
|
57
|
-
|
|
72
|
+
labelKey: "labsofscience.overview.kpi.projects",
|
|
73
|
+
fallbackLabel: "Projects",
|
|
58
74
|
featured: !0,
|
|
59
75
|
path: "projects"
|
|
60
76
|
},
|
|
61
77
|
{
|
|
62
78
|
id: "experiments",
|
|
63
|
-
icon:
|
|
79
|
+
icon: T,
|
|
64
80
|
value: e?.experiments ?? 0,
|
|
65
|
-
|
|
81
|
+
labelKey: "labsofscience.overview.kpi.experiments",
|
|
82
|
+
fallbackLabel: "Experiments",
|
|
66
83
|
path: "experiments"
|
|
67
84
|
},
|
|
68
85
|
{
|
|
69
86
|
id: "datasets",
|
|
70
|
-
icon:
|
|
87
|
+
icon: w,
|
|
71
88
|
value: e?.datasets ?? 0,
|
|
72
|
-
|
|
89
|
+
labelKey: "labsofscience.overview.kpi.datasets",
|
|
90
|
+
fallbackLabel: "Datasets",
|
|
73
91
|
path: "datasets"
|
|
74
92
|
},
|
|
75
93
|
{
|
|
76
94
|
id: "protocols",
|
|
77
|
-
icon:
|
|
95
|
+
icon: O,
|
|
78
96
|
value: e?.protocols ?? 0,
|
|
79
|
-
|
|
97
|
+
labelKey: "labsofscience.overview.kpi.protocols",
|
|
98
|
+
fallbackLabel: "Protocols",
|
|
80
99
|
path: "protocols"
|
|
81
100
|
},
|
|
82
101
|
{
|
|
83
102
|
id: "notebook",
|
|
84
|
-
icon:
|
|
103
|
+
icon: x,
|
|
85
104
|
value: e?.notebookEntries ?? 0,
|
|
86
|
-
|
|
105
|
+
labelKey: "labsofscience.overview.kpi.notebookEntries",
|
|
106
|
+
fallbackLabel: "Notebook entries",
|
|
87
107
|
path: "notebook"
|
|
88
108
|
},
|
|
89
109
|
{
|
|
90
110
|
id: "pipelines",
|
|
91
|
-
icon:
|
|
111
|
+
icon: D,
|
|
92
112
|
value: e?.pipelines ?? 0,
|
|
93
|
-
|
|
113
|
+
labelKey: "labsofscience.overview.kpi.pipelines",
|
|
114
|
+
fallbackLabel: "Analysis pipelines",
|
|
94
115
|
path: "pipelines"
|
|
95
116
|
},
|
|
96
117
|
{
|
|
97
118
|
id: "inventory",
|
|
98
|
-
icon:
|
|
119
|
+
icon: S,
|
|
99
120
|
value: e?.inventoryItems ?? 0,
|
|
100
|
-
|
|
121
|
+
labelKey: "labsofscience.overview.kpi.inventoryItems",
|
|
122
|
+
fallbackLabel: "Inventory items",
|
|
101
123
|
path: "inventory"
|
|
102
124
|
},
|
|
103
125
|
{
|
|
104
126
|
id: "instruments",
|
|
105
|
-
icon:
|
|
127
|
+
icon: C,
|
|
106
128
|
value: e?.instruments ?? 0,
|
|
107
|
-
|
|
129
|
+
labelKey: "labsofscience.overview.kpi.instruments",
|
|
130
|
+
fallbackLabel: "Instruments",
|
|
108
131
|
path: "instruments"
|
|
109
132
|
}
|
|
110
133
|
];
|
|
111
|
-
}, [
|
|
112
|
-
return /* @__PURE__ */
|
|
134
|
+
}, [q.data]), { nameOf: se } = o(_(() => J.data?.map((e) => e.actorId) ?? [], [J.data]));
|
|
135
|
+
return /* @__PURE__ */ A(n, {
|
|
113
136
|
hero: !0,
|
|
114
|
-
title:
|
|
115
|
-
let e =
|
|
116
|
-
return e ?
|
|
117
|
-
}, [
|
|
118
|
-
description: "Projects, experiments, data and the bench — one governed, reproducible research workspace.",
|
|
119
|
-
actions: /* @__PURE__ */
|
|
120
|
-
onClick: () =>
|
|
121
|
-
children: [/* @__PURE__ */
|
|
137
|
+
title: _(() => {
|
|
138
|
+
let e = y?.firstName || y?.name;
|
|
139
|
+
return e ? R("labsofscience.overview.greeting", "Welcome back, {{name}}", { name: e }) : R("labsofscience.overview.defaultGreeting", "Research overview");
|
|
140
|
+
}, [y, R]),
|
|
141
|
+
description: R("labsofscience.overview.description", "Projects, experiments, data and the bench — one governed, reproducible research workspace."),
|
|
142
|
+
actions: /* @__PURE__ */ A(j, {
|
|
143
|
+
onClick: () => i("projects"),
|
|
144
|
+
children: [/* @__PURE__ */ k(E, { className: "mr-2 h-4 w-4" }), R("labsofscience.overview.projectsButton", "Projects")]
|
|
122
145
|
}),
|
|
123
146
|
children: [
|
|
124
|
-
|
|
147
|
+
re ? /* @__PURE__ */ k(a, { label: R("labsofscience.overview.loadingWorkspace", "Loading your research workspace…") }) : /* @__PURE__ */ A("div", {
|
|
125
148
|
className: "space-y-8",
|
|
126
149
|
children: [
|
|
127
|
-
/* @__PURE__ */
|
|
150
|
+
/* @__PURE__ */ k("div", {
|
|
128
151
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",
|
|
129
|
-
children:
|
|
152
|
+
children: oe.map((e) => {
|
|
130
153
|
let t = e.icon;
|
|
131
|
-
return /* @__PURE__ */
|
|
154
|
+
return /* @__PURE__ */ k("button", {
|
|
132
155
|
type: "button",
|
|
133
|
-
onClick: () =>
|
|
156
|
+
onClick: () => i(e.path),
|
|
134
157
|
className: "text-left",
|
|
135
|
-
children: /* @__PURE__ */
|
|
158
|
+
children: /* @__PURE__ */ k(r, {
|
|
136
159
|
featured: e.featured,
|
|
137
|
-
icon: /* @__PURE__ */
|
|
160
|
+
icon: /* @__PURE__ */ k(t, {}),
|
|
138
161
|
value: e.value,
|
|
139
|
-
label: e.
|
|
162
|
+
label: R(e.labelKey, e.fallbackLabel)
|
|
140
163
|
})
|
|
141
164
|
}, e.id);
|
|
142
165
|
})
|
|
143
166
|
}),
|
|
144
|
-
/* @__PURE__ */
|
|
167
|
+
/* @__PURE__ */ A("section", {
|
|
145
168
|
className: "rounded-2xl border border-border-seam bg-bg-surface p-4 shadow-sm md:p-5",
|
|
146
|
-
children: [/* @__PURE__ */
|
|
169
|
+
children: [/* @__PURE__ */ A("div", {
|
|
147
170
|
className: "flex flex-col gap-1 sm:flex-row sm:items-end sm:justify-between",
|
|
148
|
-
children: [/* @__PURE__ */
|
|
171
|
+
children: [/* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("h2", {
|
|
149
172
|
className: "text-sm font-semibold text-text-primary",
|
|
150
|
-
children: "Research launchpad"
|
|
151
|
-
}), /* @__PURE__ */
|
|
173
|
+
children: R("labsofscience.overview.launchpad.title", "Research launchpad")
|
|
174
|
+
}), /* @__PURE__ */ k("p", {
|
|
152
175
|
className: "text-sm text-text-secondary",
|
|
153
|
-
children: "Create records directly against the live science backend."
|
|
154
|
-
})] }), /* @__PURE__ */
|
|
176
|
+
children: R("labsofscience.overview.launchpad.subtitle", "Create records directly against the live science backend.")
|
|
177
|
+
})] }), /* @__PURE__ */ A(j, {
|
|
155
178
|
variant: "ghost",
|
|
156
179
|
size: "sm",
|
|
157
|
-
onClick: () =>
|
|
158
|
-
children: ["Open directory", /* @__PURE__ */
|
|
180
|
+
onClick: () => i("projects"),
|
|
181
|
+
children: [R("labsofscience.overview.launchpad.openDirectory", "Open directory"), /* @__PURE__ */ k(b, { className: "ml-1 h-3.5 w-3.5" })]
|
|
159
182
|
})]
|
|
160
|
-
}), /* @__PURE__ */
|
|
183
|
+
}), /* @__PURE__ */ k("div", {
|
|
161
184
|
className: "mt-4 grid grid-cols-1 gap-3 sm:grid-cols-2 xl:grid-cols-4",
|
|
162
|
-
children:
|
|
185
|
+
children: P.map((e) => {
|
|
163
186
|
let t = e.icon, n = e.id === "pipeline" && $.length === 0;
|
|
164
|
-
return /* @__PURE__ */
|
|
187
|
+
return /* @__PURE__ */ A("button", {
|
|
165
188
|
type: "button",
|
|
166
189
|
disabled: n,
|
|
167
190
|
onClick: () => {
|
|
168
|
-
e.id === "project" &&
|
|
191
|
+
e.id === "project" && B(!0), e.id === "experiment" && H(!0), e.id === "notebook" && W(!0), e.id === "pipeline" && K(!0);
|
|
169
192
|
},
|
|
170
193
|
className: "group flex items-center gap-3 rounded-xl border border-border-seam bg-bg-sunken p-4 text-left transition hover:bg-bg-surface disabled:cursor-not-allowed disabled:opacity-60",
|
|
171
|
-
children: [/* @__PURE__ */
|
|
194
|
+
children: [/* @__PURE__ */ k("span", {
|
|
172
195
|
className: "flex size-10 flex-shrink-0 items-center justify-center rounded-xl bg-[var(--color-accent-soft)] text-text-primary transition group-hover:scale-105 [&>svg]:size-4",
|
|
173
|
-
children: /* @__PURE__ */
|
|
174
|
-
}), /* @__PURE__ */
|
|
196
|
+
children: /* @__PURE__ */ k(t, {})
|
|
197
|
+
}), /* @__PURE__ */ A("span", {
|
|
175
198
|
className: "min-w-0",
|
|
176
|
-
children: [/* @__PURE__ */
|
|
199
|
+
children: [/* @__PURE__ */ k("span", {
|
|
177
200
|
className: "block text-sm font-medium text-text-primary",
|
|
178
|
-
children: e.
|
|
179
|
-
}), /* @__PURE__ */
|
|
201
|
+
children: R(e.labelKey, e.fallbackLabel)
|
|
202
|
+
}), /* @__PURE__ */ k("span", {
|
|
180
203
|
className: "mt-0.5 block text-xs text-text-secondary",
|
|
181
|
-
children: n ?
|
|
204
|
+
children: n ? R(e.disabledHintKey, e.fallbackDisabledHint) : R(e.hintKey, e.fallbackHint)
|
|
182
205
|
})]
|
|
183
206
|
})]
|
|
184
207
|
}, e.id);
|
|
185
208
|
})
|
|
186
209
|
})]
|
|
187
210
|
}),
|
|
188
|
-
/* @__PURE__ */
|
|
211
|
+
/* @__PURE__ */ A("div", {
|
|
189
212
|
className: "grid grid-cols-1 gap-6 lg:grid-cols-3",
|
|
190
|
-
children: [/* @__PURE__ */
|
|
213
|
+
children: [/* @__PURE__ */ k("div", {
|
|
191
214
|
className: "lg:col-span-2",
|
|
192
|
-
children: /* @__PURE__ */
|
|
215
|
+
children: /* @__PURE__ */ A("div", {
|
|
193
216
|
className: "grid grid-cols-1 gap-6 md:grid-cols-2",
|
|
194
|
-
children: [/* @__PURE__ */
|
|
195
|
-
title: "Recent projects",
|
|
196
|
-
emptyLabel: "No projects yet",
|
|
197
|
-
|
|
198
|
-
|
|
217
|
+
children: [/* @__PURE__ */ k(I, {
|
|
218
|
+
title: R("labsofscience.overview.recentProjects.title", "Recent projects"),
|
|
219
|
+
emptyLabel: R("labsofscience.overview.recentProjects.empty", "No projects yet"),
|
|
220
|
+
viewAllLabel: R("labsofscience.overview.viewAll", "View all"),
|
|
221
|
+
onViewAll: () => i("projects"),
|
|
222
|
+
items: ie.map((e) => ({
|
|
199
223
|
id: e.id,
|
|
200
224
|
primary: e.name,
|
|
201
|
-
secondary: e.code ? `${e.code} · ${e.field ?? "General"}` : e.field ?? "General",
|
|
225
|
+
secondary: e.code ? `${e.code} · ${e.field ?? R("labsofscience.field.general", "General")}` : e.field ?? R("labsofscience.field.general", "General"),
|
|
202
226
|
status: e.status,
|
|
203
|
-
meta:
|
|
204
|
-
onClick: () =>
|
|
227
|
+
meta: R("labsofscience.overview.updatedAt", "Updated {{time}}", { time: f(e.updatedAt) }),
|
|
228
|
+
onClick: () => i(`projects/${e.id}`)
|
|
205
229
|
}))
|
|
206
|
-
}), /* @__PURE__ */
|
|
207
|
-
title: "Recent experiments",
|
|
208
|
-
emptyLabel: "No experiments yet",
|
|
209
|
-
|
|
210
|
-
|
|
230
|
+
}), /* @__PURE__ */ k(I, {
|
|
231
|
+
title: R("labsofscience.overview.recentExperiments.title", "Recent experiments"),
|
|
232
|
+
emptyLabel: R("labsofscience.overview.recentExperiments.empty", "No experiments yet"),
|
|
233
|
+
viewAllLabel: R("labsofscience.overview.viewAll", "View all"),
|
|
234
|
+
onViewAll: () => i("experiments"),
|
|
235
|
+
items: ae.map((e) => ({
|
|
211
236
|
id: e.id,
|
|
212
237
|
primary: e.title,
|
|
213
|
-
secondary: e.hypothesis ?? "No hypothesis recorded",
|
|
238
|
+
secondary: e.hypothesis ?? R("labsofscience.overview.noHypothesis", "No hypothesis recorded"),
|
|
214
239
|
status: e.status,
|
|
215
|
-
meta:
|
|
216
|
-
onClick: () =>
|
|
240
|
+
meta: R("labsofscience.overview.updatedAt", "Updated {{time}}", { time: f(e.updatedAt) }),
|
|
241
|
+
onClick: () => i(`experiments/${e.id}`)
|
|
217
242
|
}))
|
|
218
243
|
})]
|
|
219
244
|
})
|
|
220
|
-
}), /* @__PURE__ */
|
|
221
|
-
items:
|
|
222
|
-
nameOf:
|
|
223
|
-
isLoading:
|
|
224
|
-
workspaceId:
|
|
245
|
+
}), /* @__PURE__ */ k(L, {
|
|
246
|
+
items: J.data ?? [],
|
|
247
|
+
nameOf: se,
|
|
248
|
+
isLoading: J.isLoading,
|
|
249
|
+
workspaceId: F
|
|
225
250
|
})]
|
|
226
251
|
})
|
|
227
252
|
]
|
|
228
253
|
}),
|
|
229
|
-
/* @__PURE__ */
|
|
254
|
+
/* @__PURE__ */ k(p, {
|
|
255
|
+
open: z,
|
|
256
|
+
onOpenChange: B,
|
|
257
|
+
onSaved: (e) => i(`projects/${e.id}`)
|
|
258
|
+
}),
|
|
259
|
+
/* @__PURE__ */ k(m, {
|
|
230
260
|
open: V,
|
|
231
261
|
onOpenChange: H,
|
|
232
|
-
onSaved: (e) =>
|
|
262
|
+
onSaved: (e) => i(`experiments/${e.id}`)
|
|
233
263
|
}),
|
|
234
|
-
/* @__PURE__ */
|
|
264
|
+
/* @__PURE__ */ k(h, {
|
|
235
265
|
open: U,
|
|
236
266
|
onOpenChange: W,
|
|
237
|
-
onSaved: (e) =>
|
|
267
|
+
onSaved: (e) => i(`notebook/${e.id}`)
|
|
238
268
|
}),
|
|
239
|
-
/* @__PURE__ */
|
|
269
|
+
/* @__PURE__ */ k(g, {
|
|
240
270
|
open: G,
|
|
241
271
|
onOpenChange: K,
|
|
242
|
-
onSaved: (e) => r(`notebook/${e.id}`)
|
|
243
|
-
}),
|
|
244
|
-
/* @__PURE__ */ M(y, {
|
|
245
|
-
open: q,
|
|
246
|
-
onOpenChange: J,
|
|
247
272
|
pipelines: $
|
|
248
273
|
})
|
|
249
274
|
]
|
|
250
275
|
});
|
|
251
276
|
}
|
|
252
|
-
function
|
|
253
|
-
return /* @__PURE__ */
|
|
277
|
+
function I({ title: e, items: t, emptyLabel: n, viewAllLabel: r, onViewAll: a }) {
|
|
278
|
+
return /* @__PURE__ */ A("section", {
|
|
254
279
|
className: "rounded-xl border border-border-seam bg-bg-surface",
|
|
255
|
-
children: [/* @__PURE__ */
|
|
280
|
+
children: [/* @__PURE__ */ A("header", {
|
|
256
281
|
className: "flex items-center justify-between border-b border-border-seam px-5 py-3",
|
|
257
|
-
children: [/* @__PURE__ */
|
|
282
|
+
children: [/* @__PURE__ */ k("h2", {
|
|
258
283
|
className: "text-sm font-semibold text-text-primary",
|
|
259
284
|
children: e
|
|
260
|
-
}), /* @__PURE__ */
|
|
285
|
+
}), /* @__PURE__ */ A(j, {
|
|
261
286
|
variant: "ghost",
|
|
262
287
|
size: "sm",
|
|
263
|
-
onClick:
|
|
264
|
-
children: [
|
|
288
|
+
onClick: a,
|
|
289
|
+
children: [r, /* @__PURE__ */ k(b, { className: "ml-1 h-3.5 w-3.5" })]
|
|
265
290
|
})]
|
|
266
|
-
}), t.length === 0 ? /* @__PURE__ */
|
|
291
|
+
}), t.length === 0 ? /* @__PURE__ */ k("p", {
|
|
267
292
|
className: "px-5 py-8 text-center text-sm text-text-secondary",
|
|
268
293
|
children: n
|
|
269
|
-
}) : /* @__PURE__ */
|
|
294
|
+
}) : /* @__PURE__ */ k("ul", {
|
|
270
295
|
className: "divide-y divide-border-seam",
|
|
271
|
-
children: t.map((e) => /* @__PURE__ */
|
|
296
|
+
children: t.map((e) => /* @__PURE__ */ k("li", { children: /* @__PURE__ */ A("button", {
|
|
272
297
|
type: "button",
|
|
273
298
|
onClick: e.onClick,
|
|
274
299
|
className: "flex w-full items-start justify-between gap-3 px-5 py-3 text-left transition-colors hover:bg-bg-sunken",
|
|
275
|
-
children: [/* @__PURE__ */
|
|
300
|
+
children: [/* @__PURE__ */ A("div", {
|
|
276
301
|
className: "min-w-0",
|
|
277
302
|
children: [
|
|
278
|
-
/* @__PURE__ */
|
|
303
|
+
/* @__PURE__ */ k("p", {
|
|
279
304
|
className: "truncate text-sm font-medium text-text-primary",
|
|
280
305
|
children: e.primary
|
|
281
306
|
}),
|
|
282
|
-
/* @__PURE__ */
|
|
307
|
+
/* @__PURE__ */ k("p", {
|
|
283
308
|
className: "mt-0.5 truncate text-xs text-text-secondary",
|
|
284
309
|
children: e.secondary
|
|
285
310
|
}),
|
|
286
|
-
/* @__PURE__ */
|
|
311
|
+
/* @__PURE__ */ k("p", {
|
|
287
312
|
className: "mt-1 text-xs text-text-tertiary",
|
|
288
313
|
children: e.meta
|
|
289
314
|
})
|
|
290
315
|
]
|
|
291
|
-
}), /* @__PURE__ */
|
|
316
|
+
}), /* @__PURE__ */ k(i, { status: e.status })]
|
|
292
317
|
}) }, e.id))
|
|
293
318
|
})]
|
|
294
319
|
});
|
|
295
320
|
}
|
|
296
|
-
function
|
|
297
|
-
|
|
321
|
+
function L({ items: t, nameOf: n, isLoading: r, workspaceId: i }) {
|
|
322
|
+
let a = e();
|
|
323
|
+
return /* @__PURE__ */ A("section", {
|
|
298
324
|
className: "rounded-xl border border-border-seam bg-bg-surface",
|
|
299
|
-
children: [/* @__PURE__ */
|
|
325
|
+
children: [/* @__PURE__ */ k("header", {
|
|
300
326
|
className: "flex items-center justify-between border-b border-border-seam px-5 py-3",
|
|
301
|
-
children: /* @__PURE__ */
|
|
327
|
+
children: /* @__PURE__ */ A("div", {
|
|
302
328
|
className: "flex items-center gap-2",
|
|
303
|
-
children: [/* @__PURE__ */
|
|
329
|
+
children: [/* @__PURE__ */ k(y, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ k("h2", {
|
|
304
330
|
className: "text-sm font-semibold text-text-primary",
|
|
305
|
-
children: "Recent activity"
|
|
331
|
+
children: a("labsofscience.overview.recentActivity.title", "Recent activity")
|
|
306
332
|
})]
|
|
307
333
|
})
|
|
308
|
-
}),
|
|
334
|
+
}), r ? /* @__PURE__ */ k("p", {
|
|
309
335
|
className: "px-5 py-8 text-center text-sm text-text-secondary",
|
|
310
|
-
children: "Loading activity…"
|
|
311
|
-
}) :
|
|
336
|
+
children: a("labsofscience.overview.recentActivity.loading", "Loading activity…")
|
|
337
|
+
}) : t.length === 0 ? /* @__PURE__ */ k("p", {
|
|
312
338
|
className: "px-5 py-8 text-center text-sm text-text-secondary",
|
|
313
|
-
children:
|
|
314
|
-
}) : /* @__PURE__ */
|
|
339
|
+
children: i ? a("labsofscience.overview.recentActivity.emptyWorkspace", "No recent activity in this workspace") : a("labsofscience.overview.recentActivity.emptyUnavailable", "Activity feed unavailable")
|
|
340
|
+
}) : /* @__PURE__ */ k("ul", {
|
|
315
341
|
className: "divide-y divide-border-seam",
|
|
316
|
-
children:
|
|
342
|
+
children: t.map((e) => /* @__PURE__ */ A("li", {
|
|
317
343
|
className: "px-5 py-3",
|
|
318
344
|
children: [
|
|
319
|
-
/* @__PURE__ */
|
|
345
|
+
/* @__PURE__ */ A("p", {
|
|
320
346
|
className: "text-sm text-text-primary",
|
|
321
347
|
children: [
|
|
322
|
-
/* @__PURE__ */
|
|
348
|
+
/* @__PURE__ */ k("span", {
|
|
323
349
|
className: "font-medium",
|
|
324
|
-
children:
|
|
350
|
+
children: n(e.actorId)
|
|
325
351
|
}),
|
|
326
352
|
" ",
|
|
327
|
-
/* @__PURE__ */
|
|
353
|
+
/* @__PURE__ */ k("span", {
|
|
328
354
|
className: "text-text-secondary",
|
|
329
|
-
children:
|
|
355
|
+
children: R(e.action)
|
|
330
356
|
}),
|
|
331
|
-
e.resourceType && /* @__PURE__ */
|
|
357
|
+
e.resourceType && /* @__PURE__ */ A("span", {
|
|
332
358
|
className: "text-text-secondary",
|
|
333
359
|
children: [" ", e.resourceType.toLowerCase()]
|
|
334
360
|
})
|
|
335
361
|
]
|
|
336
362
|
}),
|
|
337
|
-
e.description ? /* @__PURE__ */
|
|
363
|
+
e.description ? /* @__PURE__ */ k("p", {
|
|
338
364
|
className: "mt-0.5 text-xs text-text-secondary",
|
|
339
365
|
children: e.description
|
|
340
366
|
}) : null,
|
|
341
|
-
/* @__PURE__ */
|
|
367
|
+
/* @__PURE__ */ k("p", {
|
|
342
368
|
className: "mt-1 text-xs text-text-tertiary",
|
|
343
|
-
children:
|
|
369
|
+
children: f(e.timestamp)
|
|
344
370
|
})
|
|
345
371
|
]
|
|
346
372
|
}, e.id))
|
|
347
373
|
})]
|
|
348
374
|
});
|
|
349
375
|
}
|
|
350
|
-
function
|
|
376
|
+
function R(e) {
|
|
351
377
|
let t = e.lastIndexOf("."), n = t >= 0 ? e.slice(t + 1) : e;
|
|
352
378
|
return `${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()}`;
|
|
353
379
|
}
|
|
354
380
|
//#endregion
|
|
355
|
-
export {
|
|
381
|
+
export { F as OverviewPage };
|
|
356
382
|
|
|
357
383
|
//# sourceMappingURL=OverviewPage.js.map
|