@tetrascience-npm/tetrascience-react-ui 0.5.0-beta.70.1 → 0.5.0-beta.72.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/components/composed/PlateMapEditor/PlateMapEditor.cjs +1 -1
- package/dist/components/composed/PlateMapEditor/PlateMapEditor.cjs.map +1 -1
- package/dist/components/composed/PlateMapEditor/PlateMapEditor.js +288 -369
- package/dist/components/composed/PlateMapEditor/PlateMapEditor.js.map +1 -1
- package/dist/components/composed/PlateMapEditor/PlateMapForm.cjs +2 -0
- package/dist/components/composed/PlateMapEditor/PlateMapForm.cjs.map +1 -0
- package/dist/components/composed/PlateMapEditor/PlateMapForm.js +43 -0
- package/dist/components/composed/PlateMapEditor/PlateMapForm.js.map +1 -0
- package/dist/components/composed/PlateMapEditor/PlateMapGrid.cjs +2 -0
- package/dist/components/composed/PlateMapEditor/PlateMapGrid.cjs.map +1 -0
- package/dist/components/composed/PlateMapEditor/PlateMapGrid.js +154 -0
- package/dist/components/composed/PlateMapEditor/PlateMapGrid.js.map +1 -0
- package/dist/components/composed/PlateMapEditor/PlateMapManifest.cjs +2 -0
- package/dist/components/composed/PlateMapEditor/PlateMapManifest.cjs.map +1 -0
- package/dist/components/composed/PlateMapEditor/PlateMapManifest.js +44 -0
- package/dist/components/composed/PlateMapEditor/PlateMapManifest.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +122 -0
- package/dist/index.js +642 -636
- package/dist/index.js.map +1 -1
- package/dist/index.tailwind.css +1 -1
- package/package.json +1 -1
|
@@ -1,422 +1,341 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as v, jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import * as o from "react";
|
|
3
|
-
import { plateOptionsFromCsvTriage as
|
|
4
|
-
import { PlateMapActionsMenu as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
function Tt(n, r) {
|
|
16
|
-
return `${n}${oe}${r}`;
|
|
3
|
+
import { plateOptionsFromCsvTriage as ut } from "./csvPlateTriage.js";
|
|
4
|
+
import { PlateMapActionsMenu as mt } from "./PlateMapActionsMenu.js";
|
|
5
|
+
import { PlateMapForm as pt } from "./PlateMapForm.js";
|
|
6
|
+
import { PlateMapGrid as ht } from "./PlateMapGrid.js";
|
|
7
|
+
import { PlateMapManifest as xt } from "./PlateMapManifest.js";
|
|
8
|
+
import { PlateMapPlateSelector as vt } from "./PlateMapPlateSelector.js";
|
|
9
|
+
import { Badge as Pt } from "../../ui/badge.js";
|
|
10
|
+
import { Card as F, CardContent as _, CardHeader as X, CardTitle as Z, CardAction as gt } from "../../ui/card.js";
|
|
11
|
+
import { cn as Mt } from "../../../lib/utils.js";
|
|
12
|
+
const ee = "::", St = "plateBarcode", Et = "Plate Barcode";
|
|
13
|
+
function bt(t, n) {
|
|
14
|
+
return `${t}${ee}${n}`;
|
|
17
15
|
}
|
|
18
|
-
function
|
|
19
|
-
const
|
|
20
|
-
return
|
|
16
|
+
function te(t, n) {
|
|
17
|
+
const l = `${t}${ee}`;
|
|
18
|
+
return n.startsWith(l) ? n.slice(l.length) : void 0;
|
|
21
19
|
}
|
|
22
|
-
function
|
|
23
|
-
return { ...
|
|
20
|
+
function wt(t, n) {
|
|
21
|
+
return { ...t ?? {}, ...n };
|
|
24
22
|
}
|
|
25
|
-
function
|
|
26
|
-
const
|
|
27
|
-
return
|
|
23
|
+
function Ct(t, n) {
|
|
24
|
+
const l = /* @__PURE__ */ new Map();
|
|
25
|
+
return t.forEach((s) => l.set(s.id, s)), (n ?? []).forEach((s) => l.set(s.id, s)), [...l.values()];
|
|
28
26
|
}
|
|
29
|
-
function
|
|
30
|
-
const
|
|
31
|
-
return
|
|
27
|
+
function At(t, n) {
|
|
28
|
+
const l = t.find((s) => s.id === n);
|
|
29
|
+
return l || (n ? void 0 : t[0]);
|
|
32
30
|
}
|
|
33
|
-
function
|
|
34
|
-
if (!
|
|
35
|
-
const
|
|
36
|
-
return
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
}),
|
|
31
|
+
function Nt(t, n) {
|
|
32
|
+
if (!n) return t;
|
|
33
|
+
const l = /* @__PURE__ */ new Map();
|
|
34
|
+
return t.forEach((s, m) => {
|
|
35
|
+
const c = te(n, m);
|
|
36
|
+
c && l.set(c, s);
|
|
37
|
+
}), l;
|
|
40
38
|
}
|
|
41
|
-
function
|
|
42
|
-
importedPlates:
|
|
43
|
-
selectedPlateId:
|
|
44
|
-
isControlled:
|
|
45
|
-
providedPlateCount:
|
|
39
|
+
function Wt({
|
|
40
|
+
importedPlates: t,
|
|
41
|
+
selectedPlateId: n,
|
|
42
|
+
isControlled: l,
|
|
43
|
+
providedPlateCount: s
|
|
46
44
|
}) {
|
|
47
|
-
const
|
|
48
|
-
return
|
|
45
|
+
const m = t[0]?.id;
|
|
46
|
+
return m ? t.some((c) => c.id === n) ? void 0 : m : !l && s === 0 ? null : void 0;
|
|
49
47
|
}
|
|
50
|
-
function
|
|
51
|
-
return
|
|
48
|
+
function kt(t, n) {
|
|
49
|
+
return t > 0 || !!n;
|
|
52
50
|
}
|
|
53
|
-
function
|
|
54
|
-
return !
|
|
51
|
+
function yt(t, n) {
|
|
52
|
+
return !t || !!n;
|
|
55
53
|
}
|
|
56
|
-
function
|
|
57
|
-
return !
|
|
58
|
-
|
|
59
|
-
|
|
54
|
+
function zt({ title: t, badges: n }) {
|
|
55
|
+
return !t && !n ? null : /* @__PURE__ */ v("div", { className: "flex flex-wrap items-center justify-between gap-2", children: [
|
|
56
|
+
t ? /* @__PURE__ */ a("h2", { className: "text-lg font-semibold", children: t }) : /* @__PURE__ */ a("span", {}),
|
|
57
|
+
n ? /* @__PURE__ */ a("div", { className: "flex flex-wrap gap-2", children: n }) : null
|
|
60
58
|
] });
|
|
61
59
|
}
|
|
62
|
-
function
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
columns: s,
|
|
72
|
-
values: i,
|
|
73
|
-
onChange: p,
|
|
74
|
-
selection: u,
|
|
75
|
-
onSelectionChange: P,
|
|
76
|
-
fields: y,
|
|
60
|
+
function $t({
|
|
61
|
+
format: t,
|
|
62
|
+
rows: n,
|
|
63
|
+
columns: l,
|
|
64
|
+
values: s,
|
|
65
|
+
onChange: m,
|
|
66
|
+
selection: c,
|
|
67
|
+
onSelectionChange: C,
|
|
68
|
+
fields: M,
|
|
77
69
|
tableColumns: S,
|
|
78
|
-
colorForWell:
|
|
79
|
-
emptyEntry:
|
|
80
|
-
mergeOnApply:
|
|
81
|
-
isPopulated:
|
|
82
|
-
cycleFieldOnWellDoubleClick:
|
|
83
|
-
title:
|
|
84
|
-
badges:
|
|
85
|
-
banner:
|
|
86
|
-
legend:
|
|
87
|
-
formExtras:
|
|
88
|
-
formSlot:
|
|
89
|
-
footer:
|
|
90
|
-
plateTitle:
|
|
91
|
-
plateToolbar:
|
|
92
|
-
plates:
|
|
93
|
-
activePlateId:
|
|
94
|
-
onPlateChange:
|
|
95
|
-
onAddPlate:
|
|
96
|
-
onRemovePlate:
|
|
97
|
-
addPlateLabel:
|
|
98
|
-
removePlateLabel:
|
|
99
|
-
plateSelectorLabel:
|
|
100
|
-
plateSelectorVariant:
|
|
101
|
-
plateBarcodeField:
|
|
102
|
-
plateBarcodeColumnHeader:
|
|
103
|
-
hidePlateBarcodeColumn:
|
|
104
|
-
groups:
|
|
105
|
-
activeGroupId:
|
|
106
|
-
onGroupClick:
|
|
107
|
-
renderHoverSummary:
|
|
108
|
-
cellSize:
|
|
109
|
-
emptyWellFillColor:
|
|
110
|
-
wellShape:
|
|
111
|
-
framedPlate:
|
|
112
|
-
wrapWell:
|
|
113
|
-
highlightedWellIds:
|
|
114
|
-
onHoveredWellChange:
|
|
115
|
-
manifestFilterable:
|
|
116
|
-
manifestGroupable:
|
|
117
|
-
autoScaleGrid:
|
|
118
|
-
minCellSize:
|
|
119
|
-
maxCellSize:
|
|
120
|
-
className:
|
|
121
|
-
templates:
|
|
122
|
-
templateId:
|
|
123
|
-
onTemplateChange:
|
|
124
|
-
onClearTemplate:
|
|
125
|
-
onImportCsv:
|
|
126
|
-
onExportCsv:
|
|
127
|
-
onImportTemplate:
|
|
128
|
-
onExportTemplate:
|
|
129
|
-
csvAccept:
|
|
130
|
-
templateAccept:
|
|
131
|
-
label:
|
|
132
|
-
align:
|
|
133
|
-
side:
|
|
134
|
-
importTemplateLabel:
|
|
135
|
-
exportTemplateLabel:
|
|
136
|
-
importCsvLabel:
|
|
137
|
-
exportCsvLabel:
|
|
138
|
-
clearLabel:
|
|
70
|
+
colorForWell: ne,
|
|
71
|
+
emptyEntry: A,
|
|
72
|
+
mergeOnApply: re,
|
|
73
|
+
isPopulated: ae,
|
|
74
|
+
cycleFieldOnWellDoubleClick: y,
|
|
75
|
+
title: oe,
|
|
76
|
+
badges: se,
|
|
77
|
+
banner: le,
|
|
78
|
+
legend: ie,
|
|
79
|
+
formExtras: ce,
|
|
80
|
+
formSlot: de,
|
|
81
|
+
footer: L,
|
|
82
|
+
plateTitle: fe = "Plate",
|
|
83
|
+
plateToolbar: ue,
|
|
84
|
+
plates: N,
|
|
85
|
+
activePlateId: R,
|
|
86
|
+
onPlateChange: E,
|
|
87
|
+
onAddPlate: I,
|
|
88
|
+
onRemovePlate: me,
|
|
89
|
+
addPlateLabel: pe,
|
|
90
|
+
removePlateLabel: he,
|
|
91
|
+
plateSelectorLabel: xe,
|
|
92
|
+
plateSelectorVariant: ve,
|
|
93
|
+
plateBarcodeField: Pe,
|
|
94
|
+
plateBarcodeColumnHeader: D = Et,
|
|
95
|
+
hidePlateBarcodeColumn: H = !1,
|
|
96
|
+
groups: ge,
|
|
97
|
+
activeGroupId: Me,
|
|
98
|
+
onGroupClick: Se,
|
|
99
|
+
renderHoverSummary: Ee,
|
|
100
|
+
cellSize: be,
|
|
101
|
+
emptyWellFillColor: we,
|
|
102
|
+
wellShape: Ce,
|
|
103
|
+
framedPlate: Ae,
|
|
104
|
+
wrapWell: Ne,
|
|
105
|
+
highlightedWellIds: We,
|
|
106
|
+
onHoveredWellChange: ke,
|
|
107
|
+
manifestFilterable: ye,
|
|
108
|
+
manifestGroupable: ze,
|
|
109
|
+
autoScaleGrid: Te,
|
|
110
|
+
minCellSize: Be,
|
|
111
|
+
maxCellSize: Fe,
|
|
112
|
+
className: _e,
|
|
113
|
+
templates: Le,
|
|
114
|
+
templateId: Re,
|
|
115
|
+
onTemplateChange: Ie,
|
|
116
|
+
onClearTemplate: De,
|
|
117
|
+
onImportCsv: z,
|
|
118
|
+
onExportCsv: He,
|
|
119
|
+
onImportTemplate: Ke,
|
|
120
|
+
onExportTemplate: $e,
|
|
121
|
+
csvAccept: je,
|
|
122
|
+
templateAccept: Oe,
|
|
123
|
+
label: Ue,
|
|
124
|
+
align: Ve,
|
|
125
|
+
side: Ge,
|
|
126
|
+
importTemplateLabel: Ye,
|
|
127
|
+
exportTemplateLabel: qe,
|
|
128
|
+
importCsvLabel: Je,
|
|
129
|
+
exportCsvLabel: Qe,
|
|
130
|
+
clearLabel: Xe
|
|
139
131
|
}) {
|
|
140
|
-
const
|
|
141
|
-
() =>
|
|
142
|
-
[W,
|
|
143
|
-
), h =
|
|
144
|
-
(e) => !
|
|
145
|
-
[
|
|
146
|
-
),
|
|
132
|
+
const [K, $] = o.useState({}), [Ze, j] = o.useState(null), [O, U] = o.useState(), [V, et] = o.useState([]), [tt, G] = o.useState(), nt = re ?? wt, W = o.useMemo(() => Ct(V, N), [V, N]), P = R !== void 0, k = R ?? tt, Y = o.useMemo(
|
|
133
|
+
() => At(W, k),
|
|
134
|
+
[W, k]
|
|
135
|
+
), h = Y?.barcode, d = h, p = !!d, x = Pe ?? St, q = o.useRef(d), g = o.useMemo(() => Nt(s, d), [d, s]), J = o.useCallback(
|
|
136
|
+
(e) => !p || !d ? e : bt(d, e),
|
|
137
|
+
[d, p]
|
|
138
|
+
), rt = o.useCallback(
|
|
147
139
|
(e) => {
|
|
148
|
-
|
|
140
|
+
P || G(e), E?.(e);
|
|
149
141
|
},
|
|
150
|
-
[
|
|
151
|
-
),
|
|
152
|
-
async (e,
|
|
153
|
-
if (
|
|
154
|
-
const
|
|
155
|
-
|
|
156
|
-
const
|
|
157
|
-
importedPlates:
|
|
158
|
-
selectedPlateId:
|
|
159
|
-
isControlled:
|
|
160
|
-
providedPlateCount:
|
|
142
|
+
[P, E]
|
|
143
|
+
), at = o.useCallback(
|
|
144
|
+
async (e, r) => {
|
|
145
|
+
if (r) {
|
|
146
|
+
const i = ut(r);
|
|
147
|
+
et(i);
|
|
148
|
+
const f = Wt({
|
|
149
|
+
importedPlates: i,
|
|
150
|
+
selectedPlateId: k,
|
|
151
|
+
isControlled: P,
|
|
152
|
+
providedPlateCount: N?.length ?? 0
|
|
161
153
|
});
|
|
162
|
-
|
|
154
|
+
f !== void 0 && (P || G(f ?? void 0), f && E?.(f));
|
|
163
155
|
}
|
|
164
|
-
await
|
|
156
|
+
await z?.(e, r);
|
|
165
157
|
},
|
|
166
|
-
[
|
|
167
|
-
),
|
|
168
|
-
(e) => !
|
|
169
|
-
[h,
|
|
170
|
-
),
|
|
158
|
+
[P, z, E, N, k]
|
|
159
|
+
), b = o.useCallback(
|
|
160
|
+
(e) => !p || !h ? e : { ...e, [x]: h },
|
|
161
|
+
[h, x, p]
|
|
162
|
+
), w = o.useCallback(
|
|
171
163
|
(e) => {
|
|
172
|
-
if (!
|
|
173
|
-
|
|
164
|
+
if (!p || !d) {
|
|
165
|
+
m(e);
|
|
174
166
|
return;
|
|
175
167
|
}
|
|
176
|
-
const
|
|
177
|
-
[...
|
|
178
|
-
|
|
179
|
-
}), e.forEach((
|
|
180
|
-
|
|
181
|
-
}),
|
|
168
|
+
const r = new Map(s);
|
|
169
|
+
[...r.keys()].forEach((i) => {
|
|
170
|
+
te(d, i) && r.delete(i);
|
|
171
|
+
}), e.forEach((i, f) => {
|
|
172
|
+
r.set(J(f), b(i));
|
|
173
|
+
}), m(r);
|
|
182
174
|
},
|
|
183
|
-
[
|
|
175
|
+
[d, p, m, b, J, s]
|
|
184
176
|
);
|
|
185
177
|
o.useEffect(() => {
|
|
186
|
-
|
|
187
|
-
}, [
|
|
188
|
-
const
|
|
189
|
-
if (!
|
|
190
|
-
const e =
|
|
178
|
+
q.current !== d && (q.current = d, $({}), j(null), U(void 0), c.size > 0 && C(/* @__PURE__ */ new Set()));
|
|
179
|
+
}, [d, C, c.size]);
|
|
180
|
+
const u = o.useMemo(() => {
|
|
181
|
+
if (!y) return;
|
|
182
|
+
const e = M.find((r) => r.key === y);
|
|
191
183
|
if (!(e?.kind !== "select" || !e.options?.length))
|
|
192
184
|
return e;
|
|
193
|
-
}, [
|
|
194
|
-
if (
|
|
195
|
-
const e = new Map(
|
|
196
|
-
|
|
197
|
-
const
|
|
198
|
-
e.set(
|
|
199
|
-
}),
|
|
200
|
-
},
|
|
201
|
-
if (
|
|
202
|
-
const e = new Map(
|
|
203
|
-
|
|
204
|
-
},
|
|
185
|
+
}, [y, M]), ot = () => {
|
|
186
|
+
if (c.size === 0) return;
|
|
187
|
+
const e = new Map(g);
|
|
188
|
+
c.forEach((r) => {
|
|
189
|
+
const f = e.get(r) ?? A(r), T = b(nt(f, K, r));
|
|
190
|
+
e.set(r, T);
|
|
191
|
+
}), w(e);
|
|
192
|
+
}, st = () => {
|
|
193
|
+
if (c.size === 0) return;
|
|
194
|
+
const e = new Map(g);
|
|
195
|
+
c.forEach((r) => e.delete(r)), w(e);
|
|
196
|
+
}, lt = o.useCallback(
|
|
205
197
|
(e) => {
|
|
206
|
-
if (!
|
|
207
|
-
const
|
|
208
|
-
if (!
|
|
209
|
-
const
|
|
210
|
-
|
|
198
|
+
if (!u?.options?.length) return;
|
|
199
|
+
const r = new Map(g), i = r.get(e), f = i?.[u.key], T = u.options.findIndex((B) => B.value === f), Q = u.options[(T + 1) % u.options.length];
|
|
200
|
+
if (!Q) return;
|
|
201
|
+
const ft = i ?? A(e);
|
|
202
|
+
r.set(e, b({ ...ft, [u.key]: Q.value })), w(r), U((B) => ({ wellId: e, key: (B?.key ?? 0) + 1 }));
|
|
211
203
|
},
|
|
212
|
-
[
|
|
213
|
-
),
|
|
214
|
-
|
|
215
|
-
}, pt = () => P(/* @__PURE__ */ new Set()), L = w ? b.get(w) : void 0, xt = L ? y.map((e) => {
|
|
216
|
-
const t = L[e.key];
|
|
217
|
-
if (t == null || t === "") return null;
|
|
218
|
-
if (e.kind === "select")
|
|
219
|
-
return (e.options ?? []).find((c) => c.value === t)?.label ?? String(t);
|
|
220
|
-
if (e.kind === "multiselect") {
|
|
221
|
-
const a = Array.isArray(t) ? t : [];
|
|
222
|
-
return a.length === 0 ? null : a.map((c) => (e.options ?? []).find((M) => M.value === c)?.label ?? c).join(", ");
|
|
223
|
-
}
|
|
224
|
-
return e.kind === "boolean" ? t ? e.label : null : String(t);
|
|
225
|
-
}).filter(Boolean) : [], ht = w ? Me?.(L, w) ?? [w, ...xt].join(" • ") : " ", vt = o.useMemo(() => !x || !h || $ || S.some(
|
|
226
|
-
(a) => a.field === v || a.id === v
|
|
204
|
+
[w, u, A, g, b]
|
|
205
|
+
), it = o.useMemo(() => !p || !h || H || S.some(
|
|
206
|
+
(i) => i.field === x || i.id === x
|
|
227
207
|
) ? S : [{
|
|
228
|
-
id:
|
|
229
|
-
header:
|
|
208
|
+
id: x,
|
|
209
|
+
header: D,
|
|
230
210
|
minWidth: 150,
|
|
231
|
-
render: ({ row:
|
|
232
|
-
const
|
|
233
|
-
return /* @__PURE__ */
|
|
211
|
+
render: ({ row: i }) => {
|
|
212
|
+
const f = i[x] ?? h;
|
|
213
|
+
return /* @__PURE__ */ a(Pt, { variant: "outline", children: String(f) });
|
|
234
214
|
}
|
|
235
|
-
}, ...S], [h,
|
|
236
|
-
return /* @__PURE__ */
|
|
237
|
-
/* @__PURE__ */
|
|
238
|
-
|
|
239
|
-
/* @__PURE__ */
|
|
240
|
-
/* @__PURE__ */
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
]
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
/* @__PURE__ */
|
|
259
|
-
|
|
260
|
-
Nt,
|
|
215
|
+
}, ...S], [h, x, H, p, D, S]), ct = kt(W.length, I), dt = yt(P, E);
|
|
216
|
+
return /* @__PURE__ */ v("div", { "data-slot": "plate-map-editor", className: Mt("flex flex-col gap-4", _e), children: [
|
|
217
|
+
/* @__PURE__ */ a(zt, { title: oe, badges: se }),
|
|
218
|
+
le,
|
|
219
|
+
/* @__PURE__ */ v("div", { className: "flex flex-wrap gap-3 md:flex-nowrap", children: [
|
|
220
|
+
/* @__PURE__ */ a(F, { className: "flex w-full max-w-[360px] min-w-[300px] basis-[360px] flex-col", size: "sm", children: /* @__PURE__ */ a(_, { className: "flex h-full flex-1 flex-col gap-3", children: /* @__PURE__ */ a(
|
|
221
|
+
pt,
|
|
222
|
+
{
|
|
223
|
+
fields: M,
|
|
224
|
+
value: K,
|
|
225
|
+
onChange: $,
|
|
226
|
+
selectionSize: c.size,
|
|
227
|
+
onApply: ot,
|
|
228
|
+
onClear: st,
|
|
229
|
+
extras: ce,
|
|
230
|
+
legend: ie,
|
|
231
|
+
formSlot: de
|
|
232
|
+
}
|
|
233
|
+
) }) }),
|
|
234
|
+
/* @__PURE__ */ v(F, { className: "flex min-w-[360px] flex-1 flex-col", size: "sm", children: [
|
|
235
|
+
/* @__PURE__ */ v(X, { className: "border-b", children: [
|
|
236
|
+
/* @__PURE__ */ v("div", { className: "flex min-w-0 flex-wrap items-center gap-2", children: [
|
|
237
|
+
/* @__PURE__ */ a(Z, { className: "min-w-0", children: fe }),
|
|
238
|
+
ct ? /* @__PURE__ */ a(
|
|
239
|
+
vt,
|
|
261
240
|
{
|
|
262
241
|
plates: W,
|
|
263
|
-
activePlateId:
|
|
264
|
-
onPlateChange:
|
|
265
|
-
onAddPlate:
|
|
266
|
-
onRemovePlate:
|
|
267
|
-
addPlateLabel:
|
|
268
|
-
removePlateLabel:
|
|
269
|
-
label:
|
|
270
|
-
variant:
|
|
242
|
+
activePlateId: Y?.id,
|
|
243
|
+
onPlateChange: dt ? rt : void 0,
|
|
244
|
+
onAddPlate: I,
|
|
245
|
+
onRemovePlate: me,
|
|
246
|
+
addPlateLabel: pe,
|
|
247
|
+
removePlateLabel: he,
|
|
248
|
+
label: xe,
|
|
249
|
+
variant: ve
|
|
271
250
|
}
|
|
272
251
|
) : null
|
|
273
252
|
] }),
|
|
274
|
-
/* @__PURE__ */
|
|
275
|
-
|
|
253
|
+
/* @__PURE__ */ a(gt, { className: "flex flex-wrap items-center gap-2", children: /* @__PURE__ */ a(
|
|
254
|
+
mt,
|
|
276
255
|
{
|
|
277
|
-
templates:
|
|
278
|
-
templateId:
|
|
279
|
-
onTemplateChange:
|
|
280
|
-
onClearTemplate:
|
|
281
|
-
hasEntries:
|
|
282
|
-
onImportCsv:
|
|
283
|
-
onExportCsv:
|
|
284
|
-
onImportTemplate:
|
|
285
|
-
onExportTemplate:
|
|
286
|
-
csvAccept:
|
|
287
|
-
templateAccept:
|
|
288
|
-
label:
|
|
289
|
-
align:
|
|
290
|
-
side:
|
|
291
|
-
importTemplateLabel:
|
|
292
|
-
exportTemplateLabel:
|
|
293
|
-
importCsvLabel:
|
|
294
|
-
exportCsvLabel:
|
|
295
|
-
clearLabel:
|
|
256
|
+
templates: Le,
|
|
257
|
+
templateId: Re,
|
|
258
|
+
onTemplateChange: Ie,
|
|
259
|
+
onClearTemplate: De,
|
|
260
|
+
hasEntries: s.size > 0,
|
|
261
|
+
onImportCsv: z ? at : void 0,
|
|
262
|
+
onExportCsv: He,
|
|
263
|
+
onImportTemplate: Ke,
|
|
264
|
+
onExportTemplate: $e,
|
|
265
|
+
csvAccept: je,
|
|
266
|
+
templateAccept: Oe,
|
|
267
|
+
label: Ue,
|
|
268
|
+
align: Ve,
|
|
269
|
+
side: Ge,
|
|
270
|
+
importTemplateLabel: Ye,
|
|
271
|
+
exportTemplateLabel: qe,
|
|
272
|
+
importCsvLabel: Je,
|
|
273
|
+
exportCsvLabel: Qe,
|
|
274
|
+
clearLabel: Xe
|
|
296
275
|
}
|
|
297
276
|
) })
|
|
298
277
|
] }),
|
|
299
|
-
/* @__PURE__ */
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
colorForWell: ie,
|
|
335
|
-
emptyWellFillColor: ke,
|
|
336
|
-
wellShape: We,
|
|
337
|
-
framed: ze,
|
|
338
|
-
wrapWell: Fe,
|
|
339
|
-
highlightedWellIds: Te,
|
|
340
|
-
onWellHover: (e) => {
|
|
341
|
-
V(e), Be?.(e);
|
|
342
|
-
},
|
|
343
|
-
onWellDoubleClick: m ? ft : void 0,
|
|
344
|
-
selectionFillMode: m ? "well" : "selection",
|
|
345
|
-
flashWellId: G?.wellId,
|
|
346
|
-
flashWellKey: G?.key,
|
|
347
|
-
cellSize: Ce,
|
|
348
|
-
autoScale: je,
|
|
349
|
-
minCellSize: De,
|
|
350
|
-
maxCellSize: Re
|
|
351
|
-
}
|
|
352
|
-
),
|
|
353
|
-
T && T.length > 0 ? /* @__PURE__ */ d(le, { children: [
|
|
354
|
-
/* @__PURE__ */ l(ae, { className: "mt-2" }),
|
|
355
|
-
/* @__PURE__ */ l("div", { className: "flex max-h-28 flex-wrap gap-3 overflow-y-auto pt-1", children: T.map((e) => {
|
|
356
|
-
const t = e.id === Ee, a = e.count ?? e.wellIds?.length;
|
|
357
|
-
return /* @__PURE__ */ d(
|
|
358
|
-
"button",
|
|
359
|
-
{
|
|
360
|
-
type: "button",
|
|
361
|
-
disabled: e.disabled,
|
|
362
|
-
onClick: () => Ae?.(e),
|
|
363
|
-
className: re(
|
|
364
|
-
"flex w-16 flex-col items-center gap-1 rounded-md px-1 py-1 text-center text-xs transition-colors",
|
|
365
|
-
"text-muted-foreground hover:bg-muted/60",
|
|
366
|
-
t && "bg-muted text-foreground ring-1 ring-primary/40",
|
|
367
|
-
e.disabled && "pointer-events-none opacity-50"
|
|
368
|
-
),
|
|
369
|
-
title: e.label,
|
|
370
|
-
children: [
|
|
371
|
-
/* @__PURE__ */ l(
|
|
372
|
-
"span",
|
|
373
|
-
{
|
|
374
|
-
className: "size-7 rounded-full border",
|
|
375
|
-
style: {
|
|
376
|
-
backgroundColor: e.color,
|
|
377
|
-
borderColor: e.borderColor
|
|
378
|
-
},
|
|
379
|
-
"aria-hidden": !0
|
|
380
|
-
}
|
|
381
|
-
),
|
|
382
|
-
/* @__PURE__ */ l("span", { className: "w-full truncate text-foreground", children: e.label }),
|
|
383
|
-
a === void 0 ? null : /* @__PURE__ */ d("span", { className: "text-[0.7rem] leading-none text-muted-foreground", children: [
|
|
384
|
-
a,
|
|
385
|
-
" wells"
|
|
386
|
-
] })
|
|
387
|
-
]
|
|
388
|
-
},
|
|
389
|
-
e.id
|
|
390
|
-
);
|
|
391
|
-
}) })
|
|
392
|
-
] }) : null
|
|
393
|
-
] })
|
|
278
|
+
/* @__PURE__ */ a(_, { children: /* @__PURE__ */ a(
|
|
279
|
+
ht,
|
|
280
|
+
{
|
|
281
|
+
format: t,
|
|
282
|
+
rows: n,
|
|
283
|
+
columns: l,
|
|
284
|
+
values: g,
|
|
285
|
+
selection: c,
|
|
286
|
+
onSelectionChange: C,
|
|
287
|
+
colorForWell: ne,
|
|
288
|
+
fields: M,
|
|
289
|
+
renderHoverSummary: Ee,
|
|
290
|
+
hoveredWellId: Ze,
|
|
291
|
+
onHoveredWellChange: (e) => {
|
|
292
|
+
j(e), ke?.(e);
|
|
293
|
+
},
|
|
294
|
+
toolbar: ue,
|
|
295
|
+
emptyWellFillColor: we,
|
|
296
|
+
wellShape: Ce,
|
|
297
|
+
framed: Ae,
|
|
298
|
+
wrapWell: Ne,
|
|
299
|
+
highlightedWellIds: We,
|
|
300
|
+
onWellDoubleClick: u ? lt : void 0,
|
|
301
|
+
selectionFillMode: u ? "well" : "selection",
|
|
302
|
+
flashWellId: O?.wellId,
|
|
303
|
+
flashWellKey: O?.key,
|
|
304
|
+
cellSize: be,
|
|
305
|
+
autoScale: Te,
|
|
306
|
+
minCellSize: Be,
|
|
307
|
+
maxCellSize: Fe,
|
|
308
|
+
groups: ge,
|
|
309
|
+
activeGroupId: Me,
|
|
310
|
+
onGroupClick: Se
|
|
311
|
+
}
|
|
312
|
+
) })
|
|
394
313
|
] })
|
|
395
314
|
] }),
|
|
396
|
-
/* @__PURE__ */
|
|
397
|
-
/* @__PURE__ */
|
|
398
|
-
/* @__PURE__ */
|
|
399
|
-
|
|
315
|
+
/* @__PURE__ */ v(F, { size: "sm", children: [
|
|
316
|
+
/* @__PURE__ */ a(X, { className: "border-b", children: /* @__PURE__ */ a(Z, { children: "Sample manifest" }) }),
|
|
317
|
+
/* @__PURE__ */ a(_, { children: /* @__PURE__ */ a(
|
|
318
|
+
xt,
|
|
400
319
|
{
|
|
401
|
-
values:
|
|
402
|
-
onChange:
|
|
403
|
-
columns:
|
|
404
|
-
fields:
|
|
405
|
-
selection:
|
|
406
|
-
onSelectionChange:
|
|
407
|
-
emptyEntry:
|
|
408
|
-
isPopulated:
|
|
409
|
-
filterable:
|
|
410
|
-
groupable:
|
|
320
|
+
values: g,
|
|
321
|
+
onChange: w,
|
|
322
|
+
columns: it,
|
|
323
|
+
fields: M,
|
|
324
|
+
selection: c,
|
|
325
|
+
onSelectionChange: C,
|
|
326
|
+
emptyEntry: A,
|
|
327
|
+
isPopulated: ae,
|
|
328
|
+
filterable: ye,
|
|
329
|
+
groupable: ze
|
|
411
330
|
}
|
|
412
331
|
) })
|
|
413
332
|
] }),
|
|
414
|
-
|
|
333
|
+
L ? /* @__PURE__ */ a("div", { className: "flex justify-end gap-2 pt-2", children: L }) : null
|
|
415
334
|
] });
|
|
416
335
|
}
|
|
417
336
|
export {
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
337
|
+
Pt as PlateBadge,
|
|
338
|
+
$t as PlateMapEditor,
|
|
339
|
+
bt as getPlateMapScopedWellId
|
|
421
340
|
};
|
|
422
341
|
//# sourceMappingURL=PlateMapEditor.js.map
|