@gen-epix/ui-client-casedb 4.1.0 → 4.2.0

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.
Files changed (41) hide show
  1. package/dist/_chunks/AddCasesToEventDialog.js +98 -98
  2. package/dist/_chunks/AddCasesToEventDialog.js.map +1 -1
  3. package/dist/_chunks/CaseContentForm.js +10 -10
  4. package/dist/_chunks/CaseInfoDialog.js +220 -220
  5. package/dist/_chunks/CaseInfoDialog.js.map +1 -1
  6. package/dist/_chunks/CaseSetInfoDialog.js +224 -224
  7. package/dist/_chunks/CaseSetInfoDialog.js.map +1 -1
  8. package/dist/_chunks/Dashboard.js +295 -295
  9. package/dist/_chunks/Dashboard.js.map +1 -1
  10. package/dist/_chunks/FindSimilarCasesDialog.js +76 -76
  11. package/dist/_chunks/FindSimilarCasesDialog.js.map +1 -1
  12. package/dist/_chunks/LegendaItem.js.map +1 -1
  13. package/dist/_chunks/PanelSeparator.js +3 -3
  14. package/dist/_chunks/PanelSeparator.js.map +1 -1
  15. package/dist/_chunks/Upload.js +318 -318
  16. package/dist/_chunks/Upload.js.map +1 -1
  17. package/dist/_chunks/chunk-BV7QT456.js +1 -1
  18. package/dist/_chunks/chunk-BV7QT456.js.map +1 -1
  19. package/dist/_chunks/cloneDeep.js +1 -1
  20. package/dist/_chunks/cloneDeep.js.map +1 -1
  21. package/dist/_chunks/esm.js +3 -3
  22. package/dist/_chunks/esm.js.map +1 -1
  23. package/dist/_chunks/index.module.js +1 -1
  24. package/dist/_chunks/index.module.js.map +1 -1
  25. package/dist/_chunks/react.js +1 -1
  26. package/dist/_chunks/react.js.map +1 -1
  27. package/dist/_chunks/shallow.js +2 -2
  28. package/dist/_chunks/shallow.js.map +1 -1
  29. package/dist/_chunks/vanilla.js +1 -1
  30. package/dist/_chunks/vanilla.js.map +1 -1
  31. package/dist/_chunks/yup.js +24 -24
  32. package/dist/_chunks/yup.js.map +1 -1
  33. package/dist/components/form/fields/ArrangementEditor/index.js +30 -30
  34. package/dist/components/ui/CreateEventDialog/index.js +40 -40
  35. package/dist/components/ui/CreateEventDialog/index.js.map +1 -1
  36. package/dist/components/ui/SequenceDownloadDialog/index.js +22 -22
  37. package/dist/pages/UserEffectiveRightsTesterAdminPage/index.js +59 -59
  38. package/dist/pages/UserEffectiveRightsTesterAdminPage/index.js.map +1 -1
  39. package/package.json +68 -67
  40. package/dist/_chunks/index.esm.js +0 -1465
  41. package/dist/_chunks/index.esm.js.map +0 -1
@@ -10,30 +10,30 @@ import { t as u } from "./CompletCaseTypeLoader.js";
10
10
  import { t as d } from "./shallow.js";
11
11
  import { UPLOAD_STEP as f } from "../models/upload.js";
12
12
  import { UploadStoreContext as p } from "../stores/uploadStore/index.js";
13
- import { c as m, o as h } from "./index.esm.js";
14
- import { t as g } from "./yup.js";
15
- import { useCaseTypeOptionsQuery as _, useCaseTypesQuery as v } from "../dataHooks/useCaseTypesQuery/index.js";
16
- import { useDataCollectionOptionsQuery as y } from "../dataHooks/useDataCollectionsQuery/index.js";
17
- import { useColMapQuery as b, useColsQuery as x } from "../dataHooks/useColsQuery/index.js";
18
- import { CaseContentFormDialog as S } from "../components/ui/CaseContentFormDialog/index.js";
19
- import { useSequencingProtocolOptionsQuery as C } from "../dataHooks/useSequencingProtocolsQuery/index.js";
20
- import { useAssemblyProtocolOptionsQuery as w } from "../dataHooks/useAssemblyProtocolsQuery/index.js";
21
- import { mixed as T, object as E, string as D } from "yup";
22
- import { CaseDbCaseApi as O, CaseDbDataIssueType as k, CaseDbEtlStatus as A, CaseDbUploadAction as j } from "@gen-epix/api-casedb";
13
+ import { t as m } from "./yup.js";
14
+ import { useCaseTypeOptionsQuery as h, useCaseTypesQuery as g } from "../dataHooks/useCaseTypesQuery/index.js";
15
+ import { useDataCollectionOptionsQuery as _ } from "../dataHooks/useDataCollectionsQuery/index.js";
16
+ import { useColMapQuery as v, useColsQuery as y } from "../dataHooks/useColsQuery/index.js";
17
+ import { CaseContentFormDialog as b } from "../components/ui/CaseContentFormDialog/index.js";
18
+ import { useSequencingProtocolOptionsQuery as x } from "../dataHooks/useSequencingProtocolsQuery/index.js";
19
+ import { useAssemblyProtocolOptionsQuery as S } from "../dataHooks/useAssemblyProtocolsQuery/index.js";
20
+ import { mixed as C, object as w, string as T } from "yup";
21
+ import { CaseDbCaseApi as E, CaseDbDataIssueType as D, CaseDbEtlStatus as O, CaseDbUploadAction as k } from "@gen-epix/api-casedb";
23
22
  import { QueryClientService as ee } from "@gen-epix/ui-client-common/classes/services/QueryClientService";
24
- import { ObjectUtil as M } from "@gen-epix/ui-core/utils/ObjectUtil";
25
- import { FORM_FIELD_DEFINITION_TYPE as N } from "@gen-epix/ui-core-form/models/form";
26
- import { ConfigService as te } from "@gen-epix/ui-client-common/classes/services/ConfigService";
27
- import { Alert as P, AlertTitle as F, Autocomplete as ne, Box as I, Button as L, Container as R, ListItemIcon as z, ListItemText as B, MenuItem as re, Table as V, TableBody as H, TableCell as U, TableHead as ie, TableRow as ae, TextField as oe, Tooltip as se, Typography as ce, useTheme as le } from "@mui/material";
28
- import { use as W, useCallback as G, useEffect as K, useId as ue, useMemo as q, useRef as J, useState as Y } from "react";
23
+ import { ObjectUtil as A } from "@gen-epix/ui-core/utils/ObjectUtil";
24
+ import { FORM_FIELD_DEFINITION_TYPE as j } from "@gen-epix/ui-core-form/models/form";
25
+ import { ConfigService as M } from "@gen-epix/ui-client-common/classes/services/ConfigService";
26
+ import { Alert as N, AlertTitle as P, Autocomplete as F, Box as I, Button as L, Container as te, ListItemIcon as ne, ListItemText as R, MenuItem as z, Table as B, TableBody as V, TableCell as H, TableHead as U, TableRow as re, TextField as ie, Tooltip as ae, Typography as oe, useTheme as se } from "@mui/material";
27
+ import { use as W, useCallback as G, useEffect as K, useId as ce, useMemo as q, useRef as J, useState as Y } from "react";
29
28
  import { useTranslation as X } from "react-i18next";
30
- import { TableStoreContextProvider as de, createTableStore as fe, useTableStoreContext as pe } from "@gen-epix/ui-client-common/stores/tableStore";
29
+ import { TableStoreContextProvider as le, createTableStore as ue, useTableStoreContext as de } from "@gen-epix/ui-client-common/stores/tableStore";
31
30
  import { Fragment as Z, jsx as Q, jsxs as $ } from "react/jsx-runtime";
32
- import { ResponseHandler as me } from "@gen-epix/ui-client-common/components/ui/ResponseHandler";
33
- import { useItemQuery as he } from "@gen-epix/ui-client-common/hooks/useItemQuery";
34
- import { useArray as ge } from "@gen-epix/ui-core/hooks/useArray";
35
- import _e from "@mui/material/Box";
36
- import { Stepper as ve } from "@gen-epix/ui-core-components/components/Stepper";
31
+ import { ResponseHandler as fe } from "@gen-epix/ui-client-common/components/ui/ResponseHandler";
32
+ import { useItemQuery as pe } from "@gen-epix/ui-client-common/hooks/useItemQuery";
33
+ import { useArray as me } from "@gen-epix/ui-core/hooks/useArray";
34
+ import he from "@mui/material/Box";
35
+ import { Stepper as ge } from "@gen-epix/ui-core-components/components/Stepper";
36
+ import { useForm as _e, useWatch as ve } from "react-hook-form";
37
37
  import { GenericForm as ye } from "@gen-epix/ui-core-form/components/helpers/GenericForm";
38
38
  import { useQueryMemo as be } from "@gen-epix/ui-client-common/hooks/useQueryMemo";
39
39
  import { useIdentifierIssuerOwnOrganizationOptionsQuery as xe } from "@gen-epix/ui-client-common/dataHooks/useIdentifierIssuerOwnOrganizationQuery";
@@ -80,70 +80,70 @@ var Ve = ({ backLabel: e, onGoBackButtonClick: t, onProceedButtonClick: n, proce
80
80
  })]
81
81
  });
82
82
  }, He = () => {
83
- let { t: e } = X(), n = v(), r = _(), a = y(), o = x(), s = ue(), c = W(p), u = l(c, (e) => e.caseTypeId), d = l(c, (e) => e.fileList), f = l(c, (e) => e.fileName), m = l(c, (e) => e.fileParsingError), b = l(c, (e) => e.goToNextStep), S = l(c, (e) => e.createdInDataCollectionOptions), C = l(c, (e) => e.rawData), w = l(c, (e) => e.setCols), k = l(c, (e) => e.setCaseTypeId), A = l(c, (e) => e.setCompleteCaseType), j = l(c, (e) => e.setCreatedInDataCollectionId), ee = l(c, (e) => e.setFileList), M = l(c, (e) => e.setSheet), te = l(c, (e) => e.setDataCollectionOptions), ne = l(c, (e) => e.sheet), I = l(c, (e) => e.sheetOptions), L = q(() => E().shape({
84
- caseTypeId: D().uuid4().required(),
85
- createdInDataCollectionId: D().uuid4().required(),
86
- fileList: T().required(e`File is required`),
87
- sheet: D().when("fileList", {
83
+ let { t: e } = X(), n = g(), r = h(), a = _(), o = y(), s = ce(), c = W(p), u = l(c, (e) => e.caseTypeId), d = l(c, (e) => e.fileList), f = l(c, (e) => e.fileName), v = l(c, (e) => e.fileParsingError), b = l(c, (e) => e.goToNextStep), x = l(c, (e) => e.createdInDataCollectionOptions), S = l(c, (e) => e.rawData), D = l(c, (e) => e.setCols), O = l(c, (e) => e.setCaseTypeId), k = l(c, (e) => e.setCompleteCaseType), ee = l(c, (e) => e.setCreatedInDataCollectionId), A = l(c, (e) => e.setFileList), M = l(c, (e) => e.setSheet), F = l(c, (e) => e.setDataCollectionOptions), I = l(c, (e) => e.sheet), L = l(c, (e) => e.sheetOptions), ne = q(() => w().shape({
84
+ caseTypeId: T().uuid4().required(),
85
+ createdInDataCollectionId: T().uuid4().required(),
86
+ fileList: C().required(e`File is required`),
87
+ sheet: T().when("fileList", {
88
88
  is: t.isXlsxFile(f),
89
89
  otherwise: (e) => e.notRequired(),
90
90
  then: (t) => t.required(e`Sheet is required`)
91
91
  })
92
- }), [f, e]), z = h({
92
+ }), [f, e]), R = _e({
93
93
  defaultValues: {
94
94
  caseTypeId: null,
95
95
  createdInDataCollectionId: null,
96
96
  fileList: null,
97
97
  sheet: null
98
98
  },
99
- resolver: g(L),
99
+ resolver: m(ne),
100
100
  values: {
101
101
  caseTypeId: c.getState().caseTypeId ?? null,
102
102
  createdInDataCollectionId: c.getState().createdInDataCollectionId ?? null,
103
103
  fileList: c.getState().fileList ?? null,
104
104
  sheet: c.getState().sheet ?? null
105
105
  }
106
- }), { handleSubmit: B, setError: re, setValue: V } = z;
106
+ }), { handleSubmit: z, setError: B, setValue: V } = R;
107
107
  K(() => {
108
- Array.isArray(o?.data) && w(o.data);
109
- }, [o.data, w]), K(() => {
110
- a?.options?.length && te(a.options);
111
- }, [a?.options, te]);
112
- let { data: H, error: U, isLoading: ie } = he({
108
+ Array.isArray(o?.data) && D(o.data);
109
+ }, [o.data, D]), K(() => {
110
+ a?.options?.length && F(a.options);
111
+ }, [a?.options, F]);
112
+ let { data: H, error: U, isLoading: re } = pe({
113
113
  baseQueryKey: i.COMPLETE_CASE_TYPES,
114
114
  itemId: u,
115
115
  useQueryOptions: {
116
116
  enabled: !!u,
117
- queryFn: async ({ signal: e }) => (await O.getInstance().completeCaseTypesGetOne(u, { signal: e })).data
117
+ queryFn: async ({ signal: e }) => (await E.getInstance().completeCaseTypesGetOne(u, { signal: e })).data
118
118
  }
119
119
  });
120
120
  K(() => {
121
- H && A(H);
122
- }, [H, A]);
123
- let ae = G(async (e) => {
124
- await ee(e);
125
- }, [ee]), oe = G(async (e) => {
121
+ H && k(H);
122
+ }, [H, k]);
123
+ let ie = G(async (e) => {
124
+ await A(e);
125
+ }, [A]), ae = G(async (e) => {
126
126
  await M(e);
127
127
  }, [M]), se = G((e) => {
128
- k(e);
129
- }, [k]), le = G((e) => {
130
- j(e);
131
- }, [j]), J = q(() => {
128
+ O(e);
129
+ }, [O]), J = G((e) => {
130
+ ee(e);
131
+ }, [ee]), Y = q(() => {
132
132
  let n = [{
133
133
  accept: ".csv,.tsv,.txt,.xlsx",
134
- definition: N.FILE,
134
+ definition: j.FILE,
135
135
  label: e`File`,
136
136
  name: "fileList",
137
- onChange: ae
137
+ onChange: ie
138
138
  }];
139
139
  return t.isXlsxFile(f) && n.push({
140
- definition: N.SELECT,
140
+ definition: j.SELECT,
141
141
  label: e`Sheet`,
142
142
  name: "sheet",
143
- onChange: oe,
144
- options: I
143
+ onChange: ae,
144
+ options: L
145
145
  }), n.push({
146
- definition: N.AUTOCOMPLETE,
146
+ definition: j.AUTOCOMPLETE,
147
147
  disabled: !d,
148
148
  label: e`Case type`,
149
149
  loading: r.isLoading,
@@ -151,50 +151,50 @@ var Ve = ({ backLabel: e, onGoBackButtonClick: t, onProceedButtonClick: n, proce
151
151
  onChange: se,
152
152
  options: r.options
153
153
  }, {
154
- definition: N.SELECT,
154
+ definition: j.SELECT,
155
155
  disabled: !d || !u,
156
156
  label: e`Create in data collection`,
157
- loading: a.isLoading || ie,
157
+ loading: a.isLoading || re,
158
158
  name: "createdInDataCollectionId",
159
- onChange: le,
160
- options: S
159
+ onChange: J,
160
+ options: x
161
161
  }), n;
162
162
  }, [
163
163
  e,
164
- ae,
164
+ ie,
165
165
  f,
166
166
  r.options,
167
167
  r.isLoading,
168
168
  d,
169
169
  se,
170
- S,
170
+ x,
171
171
  a.isLoading,
172
- ie,
172
+ re,
173
173
  u,
174
- le,
175
- I,
176
- oe
174
+ J,
175
+ L,
176
+ ae
177
177
  ]);
178
178
  K(() => {
179
- m ? re("fileList", {
180
- message: m,
179
+ v ? B("fileList", {
180
+ message: v,
181
181
  type: "manual"
182
- }) : re("fileList", void 0);
182
+ }) : B("fileList", void 0);
183
183
  }, [
184
- m,
185
- re,
184
+ v,
185
+ B,
186
186
  V
187
187
  ]);
188
- let Y = G(async () => {
188
+ let le = G(async () => {
189
189
  await b();
190
- }, [b]), de = ge([
190
+ }, [b]), ue = me([
191
191
  n,
192
192
  r,
193
193
  a,
194
194
  o
195
- ]), fe = G(async () => {
196
- await B(Y)();
197
- }, [B, Y]), pe = q(() => !(o.isLoading === !1 && o.data?.length === 0 || r.isLoading === !1 && r.options?.length === 0 || a.isLoading === !1 && a.options?.length === 0), [
195
+ ]), de = G(async () => {
196
+ await z(le)();
197
+ }, [z, le]), he = q(() => !(o.isLoading === !1 && o.data?.length === 0 || r.isLoading === !1 && r.options?.length === 0 || a.isLoading === !1 && a.options?.length === 0), [
198
198
  o.data?.length,
199
199
  o.isLoading,
200
200
  r.isLoading,
@@ -202,69 +202,69 @@ var Ve = ({ backLabel: e, onGoBackButtonClick: t, onProceedButtonClick: n, proce
202
202
  a.isLoading,
203
203
  a.options?.length
204
204
  ]);
205
- return /* @__PURE__ */ Q(me, {
205
+ return /* @__PURE__ */ Q(fe, {
206
206
  error: U,
207
207
  inlineSpinner: !0,
208
- loadables: de,
209
- children: /* @__PURE__ */ $(R, {
208
+ loadables: ue,
209
+ children: /* @__PURE__ */ $(te, {
210
210
  maxWidth: "lg",
211
- children: [!pe && /* @__PURE__ */ Q(P, {
211
+ children: [!he && /* @__PURE__ */ Q(N, {
212
212
  severity: "warning",
213
213
  sx: { mb: 2 },
214
214
  children: e("Upload is disabled because you have insufficient data access to proceed. Contact your organization administrator for assistance.")
215
- }), pe && /* @__PURE__ */ $(Z, { children: [
216
- C && C.length > 0 && /* @__PURE__ */ $(P, {
215
+ }), he && /* @__PURE__ */ $(Z, { children: [
216
+ S && S.length > 0 && /* @__PURE__ */ $(N, {
217
217
  severity: "info",
218
218
  sx: { mb: 2 },
219
219
  children: [
220
- /* @__PURE__ */ Q(F, { children: e("{{fileName}} loaded successfully", { fileName: f }) }),
221
- ne && /* @__PURE__ */ Q(ce, { children: e("Sheet name: {{sheet}}", { sheet: ne || "" }) }),
222
- /* @__PURE__ */ Q(ce, { children: e("Number of columns: {{columnCount}}", { columnCount: C[0].length }) }),
223
- /* @__PURE__ */ Q(ce, { children: e("Number of data rows: {{rowCount}}", { rowCount: C.length - 1 }) })
220
+ /* @__PURE__ */ Q(P, { children: e("{{fileName}} loaded successfully", { fileName: f }) }),
221
+ I && /* @__PURE__ */ Q(oe, { children: e("Sheet name: {{sheet}}", { sheet: I || "" }) }),
222
+ /* @__PURE__ */ Q(oe, { children: e("Number of columns: {{columnCount}}", { columnCount: S[0].length }) }),
223
+ /* @__PURE__ */ Q(oe, { children: e("Number of data rows: {{rowCount}}", { rowCount: S.length - 1 }) })
224
224
  ]
225
225
  }),
226
226
  /* @__PURE__ */ Q(ye, {
227
- formFieldDefinitions: J,
227
+ formFieldDefinitions: Y,
228
228
  formId: s,
229
- formMethods: z,
230
- onSubmit: B(Y),
231
- schema: L
229
+ formMethods: R,
230
+ onSubmit: z(le),
231
+ schema: ne
232
232
  }),
233
- /* @__PURE__ */ Q(Ve, { onProceedButtonClick: fe })
233
+ /* @__PURE__ */ Q(Ve, { onProceedButtonClick: de })
234
234
  ] })]
235
235
  })
236
236
  });
237
237
  }, Ue = /* @__PURE__ */ e(r(), 1), We = /* @__PURE__ */ e(o(), 1), Ge = () => {
238
- let { t: e } = X(), n = b(), r = xe(), i = W(p), a = l(i, (e) => e.completeCaseType), o = l(i, (e) => e.rawData), s = l(i, (e) => e.fileName), c = l(i, (e) => e.goToNextStep), u = l(i, (e) => e.goToPreviousStep), d = l(i, (e) => e.setMappedColumns), f = ge([n, r]), _ = ue(), v = q(() => t.getColumnMappingSchema(o, a), [a, o]), y = q(() => t.getDefaultColumnMappingFormValues(o[0], i.getState().mappedColumns, r.options), [
238
+ let { t: e } = X(), n = v(), r = xe(), i = W(p), a = l(i, (e) => e.completeCaseType), o = l(i, (e) => e.rawData), s = l(i, (e) => e.fileName), c = l(i, (e) => e.goToNextStep), u = l(i, (e) => e.goToPreviousStep), d = l(i, (e) => e.setMappedColumns), f = me([n, r]), h = ce(), g = q(() => t.getColumnMappingSchema(o, a), [a, o]), _ = q(() => t.getDefaultColumnMappingFormValues(o[0], i.getState().mappedColumns, r.options), [
239
239
  o,
240
240
  i,
241
241
  r.options
242
- ]), x = h({
243
- defaultValues: { ...y },
244
- resolver: g(v),
245
- values: { ...y }
246
- }), { clearErrors: S, control: C, handleSubmit: w } = x, T = m({ control: C }), E = q(() => t.getColumnMappingFormFieldDefinitions(a, o[0], s).map((e) => ({
242
+ ]), y = _e({
243
+ defaultValues: { ..._ },
244
+ resolver: m(g),
245
+ values: { ..._ }
246
+ }), { clearErrors: b, control: x, handleSubmit: S } = y, C = ve({ control: x }), w = q(() => t.getColumnMappingFormFieldDefinitions(a, o[0], s).map((e) => ({
247
247
  ...e,
248
- onChange: () => S()
248
+ onChange: () => b()
249
249
  })), [
250
250
  a,
251
251
  o,
252
252
  s,
253
- S
253
+ b
254
254
  ]);
255
255
  K(() => {
256
256
  (async () => {
257
- await d(t.getMappedColumnsFromFormData(T, o, n.map, a));
257
+ await d(t.getMappedColumnsFromFormData(C, o, n.map, a));
258
258
  })();
259
259
  }, [
260
260
  d,
261
- T,
261
+ C,
262
262
  o,
263
263
  n.map,
264
264
  a
265
265
  ]);
266
- let D = q(() => {
267
- let e = o[0].map((e, t) => t), r = t.getMappedColumnsFromFormData(T, o, n.map, a).map((e) => e.originalIndex);
266
+ let T = q(() => {
267
+ let e = o[0].map((e, t) => t), r = t.getMappedColumnsFromFormData(C, o, n.map, a).map((e) => e.originalIndex);
268
268
  return (0, We.default)(e, r).map((e) => ({
269
269
  originalIndex: e,
270
270
  originalLabel: o[0][e]
@@ -272,9 +272,9 @@ var Ve = ({ backLabel: e, onGoBackButtonClick: t, onProceedButtonClick: n, proce
272
272
  }, [
273
273
  n.map,
274
274
  o,
275
- T,
275
+ C,
276
276
  a
277
- ]), O = G(async (e) => {
277
+ ]), E = G(async (e) => {
278
278
  await d(t.getMappedColumnsFromFormData(e, o, n.map, a)), await c();
279
279
  }, [
280
280
  o,
@@ -282,9 +282,9 @@ var Ve = ({ backLabel: e, onGoBackButtonClick: t, onProceedButtonClick: n, proce
282
282
  c,
283
283
  d,
284
284
  a
285
- ]), k = q(() => t.getSampleIdColIds(a), [a]), A = G((t, n) => {
286
- let i = parseInt(t.name, 10), a = (0, Ue.default)(o.slice(1).map((e) => e[i] ?? "")).filter((e) => !!e).slice(0, 5).join(", ").trim() || e("<no data>"), s = n, c = T[t.name];
287
- return k.includes(c) && (s = /* @__PURE__ */ $(Z, { children: [/* @__PURE__ */ Q(I, { children: n }), /* @__PURE__ */ Q(I, {
285
+ ]), D = q(() => t.getSampleIdColIds(a), [a]), O = G((t, n) => {
286
+ let i = parseInt(t.name, 10), a = (0, Ue.default)(o.slice(1).map((e) => e[i] ?? "")).filter((e) => !!e).slice(0, 5).join(", ").trim() || e("<no data>"), s = n, c = C[t.name];
287
+ return D.includes(c) && (s = /* @__PURE__ */ $(Z, { children: [/* @__PURE__ */ Q(I, { children: n }), /* @__PURE__ */ Q(I, {
288
288
  sx: { marginTop: 1 },
289
289
  children: /* @__PURE__ */ Q(Se, {
290
290
  label: e("{{columnLabel}}: Identifier issuer", { columnLabel: t.label }),
@@ -292,48 +292,48 @@ var Ve = ({ backLabel: e, onGoBackButtonClick: t, onProceedButtonClick: n, proce
292
292
  name: c,
293
293
  options: r.options
294
294
  })
295
- })] })), /* @__PURE__ */ $(ae, { children: [
296
- /* @__PURE__ */ Q(U, { children: t.label }),
297
- /* @__PURE__ */ Q(U, { children: s }),
298
- /* @__PURE__ */ Q(U, { children: a })
295
+ })] })), /* @__PURE__ */ $(re, { children: [
296
+ /* @__PURE__ */ Q(H, { children: t.label }),
297
+ /* @__PURE__ */ Q(H, { children: s }),
298
+ /* @__PURE__ */ Q(H, { children: a })
299
299
  ] }, t.name);
300
300
  }, [
301
- T,
301
+ C,
302
302
  r.isLoading,
303
303
  r.options,
304
304
  o,
305
- k,
305
+ D,
306
306
  e
307
- ]), j = G((t) => /* @__PURE__ */ $(V, {
307
+ ]), k = G((t) => /* @__PURE__ */ $(B, {
308
308
  size: "small",
309
- children: [/* @__PURE__ */ Q(ie, {
309
+ children: [/* @__PURE__ */ Q(U, {
310
310
  sx: {
311
311
  backgroundColor: (e) => e.palette.background.paper,
312
312
  position: "sticky",
313
313
  top: 0,
314
314
  zIndex: (e) => e.zIndex.appBar - 1
315
315
  },
316
- children: /* @__PURE__ */ $(ae, { children: [
317
- /* @__PURE__ */ Q(U, {
316
+ children: /* @__PURE__ */ $(re, { children: [
317
+ /* @__PURE__ */ Q(H, {
318
318
  sx: { width: "33%" },
319
319
  children: e`Source`
320
320
  }),
321
- /* @__PURE__ */ Q(U, {
321
+ /* @__PURE__ */ Q(H, {
322
322
  sx: { width: "33%" },
323
- children: te.getInstance().config.applicationName
323
+ children: M.getInstance().config.applicationName
324
324
  }),
325
- /* @__PURE__ */ Q(U, {
325
+ /* @__PURE__ */ Q(H, {
326
326
  sx: { width: "34%" },
327
327
  children: e`Data preview (first 5 unique values)`
328
328
  })
329
329
  ] })
330
- }), /* @__PURE__ */ Q(H, { children: t })]
330
+ }), /* @__PURE__ */ Q(V, { children: t })]
331
331
  }), [e]), ee = G(async () => {
332
- await w(O)();
333
- }, [w, O]), M = G(() => {
332
+ await S(E)();
333
+ }, [S, E]), A = G(() => {
334
334
  u();
335
335
  }, [u]);
336
- return /* @__PURE__ */ Q(me, {
336
+ return /* @__PURE__ */ Q(fe, {
337
337
  loadables: f,
338
338
  children: /* @__PURE__ */ $(I, {
339
339
  sx: {
@@ -342,24 +342,24 @@ var Ve = ({ backLabel: e, onGoBackButtonClick: t, onProceedButtonClick: n, proce
342
342
  height: "100%"
343
343
  },
344
344
  children: [
345
- /* @__PURE__ */ Q(R, {
345
+ /* @__PURE__ */ Q(te, {
346
346
  maxWidth: "lg",
347
347
  sx: { marginBottom: 2 },
348
- children: /* @__PURE__ */ $(P, {
349
- severity: D.length === 0 ? "info" : "warning",
348
+ children: /* @__PURE__ */ $(N, {
349
+ severity: T.length === 0 ? "info" : "warning",
350
350
  children: [
351
- /* @__PURE__ */ Q(F, { children: D.length === 0 ? e("All columns in {{fileName}} have been mapped to known columns in {{applicationName}}", {
352
- applicationName: te.getInstance().config.applicationName,
351
+ /* @__PURE__ */ Q(P, { children: T.length === 0 ? e("All columns in {{fileName}} have been mapped to known columns in {{applicationName}}", {
352
+ applicationName: M.getInstance().config.applicationName,
353
353
  fileName: s
354
354
  }) : e("{{numUnmappedColumns}} column(s) in {{fileName}} are not mapped", {
355
355
  fileName: s,
356
- numUnmappedColumns: D.length
356
+ numUnmappedColumns: T.length
357
357
  }) }),
358
- D.map((t) => /* @__PURE__ */ Q(I, { children: e("The column \"{{columnName}}\" (column {{columnIndex}}) has not been mapped.", {
358
+ T.map((t) => /* @__PURE__ */ Q(I, { children: e("The column \"{{columnName}}\" (column {{columnIndex}}) has not been mapped.", {
359
359
  columnIndex: t.originalIndex + 1,
360
360
  columnName: t.originalLabel
361
361
  }) }, t.originalIndex)),
362
- D.length === 0 && e("You can proceed to the next step.")
362
+ T.length === 0 && e("You can proceed to the next step.")
363
363
  ]
364
364
  })
365
365
  }),
@@ -376,19 +376,19 @@ var Ve = ({ backLabel: e, onGoBackButtonClick: t, onProceedButtonClick: n, proce
376
376
  right: 0,
377
377
  top: 0
378
378
  },
379
- children: /* @__PURE__ */ Q(R, { children: /* @__PURE__ */ Q(ye, {
380
- formFieldDefinitions: E,
381
- formId: _,
382
- formMethods: x,
383
- onSubmit: w(O),
384
- renderField: A,
385
- schema: v,
386
- wrapForm: j
379
+ children: /* @__PURE__ */ Q(te, { children: /* @__PURE__ */ Q(ye, {
380
+ formFieldDefinitions: w,
381
+ formId: h,
382
+ formMethods: y,
383
+ onSubmit: S(E),
384
+ renderField: O,
385
+ schema: g,
386
+ wrapForm: k
387
387
  }) })
388
388
  })
389
389
  }),
390
390
  /* @__PURE__ */ Q(I, { children: /* @__PURE__ */ Q(Ve, {
391
- onGoBackButtonClick: M,
391
+ onGoBackButtonClick: A,
392
392
  onProceedButtonClick: ee
393
393
  }) })
394
394
  ]
@@ -404,7 +404,7 @@ var Ve = ({ backLabel: e, onGoBackButtonClick: t, onProceedButtonClick: n, proce
404
404
  children: n && /* @__PURE__ */ Q(e, { ...t })
405
405
  });
406
406
  }, qe = Ne(({ onActionsChange: e, onClose: t, onSubmit: n, onTitleChange: r, openProps: i }) => {
407
- let { t: a } = X(), o = ue(), s = q(() => i.completeCaseType.cols[i.colId], [i.completeCaseType.cols, i.colId]);
407
+ let { t: a } = X(), o = ce(), s = q(() => i.completeCaseType.cols[i.colId], [i.completeCaseType.cols, i.colId]);
408
408
  K(() => {
409
409
  r(a("Edit values for {{colLabel}} (for selected rows)", { colLabel: s.label }));
410
410
  }, [
@@ -415,7 +415,7 @@ var Ve = ({ backLabel: e, onGoBackButtonClick: t, onProceedButtonClick: n, proce
415
415
  let l = q(() => c.createYupSchema({
416
416
  completeCaseType: i.completeCaseType,
417
417
  includedColIds: [i.colId]
418
- }), [i.completeCaseType, i.colId]), u = h({ resolver: g(l) }), { handleSubmit: d } = u, { fieldDefinitions: f } = q(() => c.createFormDefinitions({
418
+ }), [i.completeCaseType, i.colId]), u = _e({ resolver: m(l) }), { handleSubmit: d } = u, { fieldDefinitions: f } = q(() => c.createFormDefinitions({
419
419
  completeCaseType: i.completeCaseType,
420
420
  includedColIds: [i.colId]
421
421
  }), [i.completeCaseType, i.colId]), p = G((e) => {
@@ -440,9 +440,9 @@ var Ve = ({ backLabel: e, onGoBackButtonClick: t, onProceedButtonClick: n, proce
440
440
  a
441
441
  ]), /* @__PURE__ */ $(I, { children: [i.shouldShowRightsWarning && /* @__PURE__ */ Q(I, {
442
442
  sx: { marginBottom: 2 },
443
- children: /* @__PURE__ */ $(P, {
443
+ children: /* @__PURE__ */ $(N, {
444
444
  severity: "warning",
445
- children: [/* @__PURE__ */ Q(F, { children: a`You do not have the necessary rights to edit all rows in this column.` }), a`Only the cases that you have write access to for this column will be updated. Please review the changes carefully before submitting.`]
445
+ children: [/* @__PURE__ */ Q(P, { children: a`You do not have the necessary rights to edit all rows in this column.` }), a`Only the cases that you have write access to for this column will be updated. Please review the changes carefully before submitting.`]
446
446
  })
447
447
  }), /* @__PURE__ */ Q(ye, {
448
448
  formFieldDefinitions: f,
@@ -457,14 +457,14 @@ var Ve = ({ backLabel: e, onGoBackButtonClick: t, onProceedButtonClick: n, proce
457
457
  maxWidth: "md",
458
458
  testId: "UploadEditColumnValuesDialog"
459
459
  }), Je = ({ caseRightsColMap: e, caseUploadResults: t, completeCaseType: n, getOriginalCellValue: r, onCaseContentEditSubmit: i, onColContentEditSubmit: o, tableStore: s }) => {
460
- let c = le(), { t: l } = X(), u = J(null), d = J(null), f = q(() => [
461
- k.UNAUTHORIZED,
462
- k.INVALID,
463
- k.CONFLICT,
464
- k.MISSING,
465
- k.DERIVED,
466
- k.TRANSFORMED
467
- ], []), p = q(() => [k.UNAUTHORIZED, k.INVALID], []), m = q(() => [k.MISSING, k.CONFLICT], []), h = G((r) => {
460
+ let c = se(), { t: l } = X(), u = J(null), d = J(null), f = q(() => [
461
+ D.UNAUTHORIZED,
462
+ D.INVALID,
463
+ D.CONFLICT,
464
+ D.MISSING,
465
+ D.DERIVED,
466
+ D.TRANSFORMED
467
+ ], []), p = q(() => [D.UNAUTHORIZED, D.INVALID], []), m = q(() => [D.MISSING, D.CONFLICT], []), h = G((r) => {
468
468
  d.current?.open({
469
469
  colId: r.column.id,
470
470
  completeCaseType: n,
@@ -501,16 +501,16 @@ var Ve = ({ backLabel: e, onGoBackButtonClick: t, onProceedButtonClick: n, proce
501
501
  sx: { marginTop: +(n > 0) },
502
502
  children: t
503
503
  }, e)) });
504
- }, [v]), b = G((e) => v(e).map((e) => e.message).join(", "), [v]), x = G((e, t, n) => t.filter((t) => !(t.col_id !== e || t.data_issue_type === k.TRANSFORMED && t.original_value === n)).sort((e, t) => f.indexOf(e.data_issue_type) - f.indexOf(t.data_issue_type)), [f]), C = G(() => /* @__PURE__ */ Q(se, {
504
+ }, [v]), x = G((e) => v(e).map((e) => e.message).join(", "), [v]), S = G((e, t, n) => t.filter((t) => !(t.col_id !== e || t.data_issue_type === D.TRANSFORMED && t.original_value === n)).sort((e, t) => f.indexOf(e.data_issue_type) - f.indexOf(t.data_issue_type)), [f]), C = G(() => /* @__PURE__ */ Q(ae, {
505
505
  "aria-hidden": !1,
506
506
  arrow: !0,
507
507
  title: l("Indicates if there are any issues with the case"),
508
508
  children: /* @__PURE__ */ Q(Ee, { fontSize: "small" })
509
509
  }), [l]), w = G(({ row: e }) => {
510
- let t = e.data_issues.filter((e) => e.data_issue_type === k.INVALID || e.data_issue_type === k.UNAUTHORIZED);
511
- if (t.length > 0) return /* @__PURE__ */ Q(se, {
510
+ let t = e.data_issues.filter((e) => e.data_issue_type === D.INVALID || e.data_issue_type === D.UNAUTHORIZED);
511
+ if (t.length > 0) return /* @__PURE__ */ Q(ae, {
512
512
  "aria-hidden": !1,
513
- "aria-label": b(t),
513
+ "aria-label": x(t),
514
514
  arrow: !0,
515
515
  title: y(t),
516
516
  children: /* @__PURE__ */ Q(Ee, {
@@ -523,9 +523,9 @@ var Ve = ({ backLabel: e, onGoBackButtonClick: t, onProceedButtonClick: n, proce
523
523
  });
524
524
  }, [
525
525
  y,
526
- b,
526
+ x,
527
527
  c.palette.error.main
528
- ]), T = G(() => /* @__PURE__ */ Q(se, {
528
+ ]), T = G(() => /* @__PURE__ */ Q(ae, {
529
529
  "aria-hidden": !1,
530
530
  arrow: !0,
531
531
  title: l("Indicates if case is new (will be created)"),
@@ -538,8 +538,8 @@ var Ve = ({ backLabel: e, onGoBackButtonClick: t, onProceedButtonClick: n, proce
538
538
  marginTop: "5px",
539
539
  position: "absolute"
540
540
  }
541
- }), [l]), D = G(({ id: e, row: t }) => {
542
- let r = a.getRowValue(t.validated_content, n.cols[e], n).long, i = x(e, t.data_issues, r);
541
+ }), [l]), O = G(({ id: e, row: t }) => {
542
+ let r = a.getRowValue(t.validated_content, n.cols[e], n).long, i = S(e, t.data_issues, r);
543
543
  if (i.length === 0) return /* @__PURE__ */ Q(Z, { children: r });
544
544
  let o = c.palette.info.main;
545
545
  p.includes(i[0].data_issue_type) ? o = c.palette.error.main : m.includes(i[0].data_issue_type) && (o = c.palette.warning.main);
@@ -558,7 +558,7 @@ var Ve = ({ backLabel: e, onGoBackButtonClick: t, onProceedButtonClick: n, proce
558
558
  position: "relative",
559
559
  width: c.spacing(2)
560
560
  },
561
- children: /* @__PURE__ */ Q(se, {
561
+ children: /* @__PURE__ */ Q(ae, {
562
562
  arrow: !0,
563
563
  title: y(i),
564
564
  children: /* @__PURE__ */ Q(Ee, {
@@ -582,11 +582,11 @@ var Ve = ({ backLabel: e, onGoBackButtonClick: t, onProceedButtonClick: n, proce
582
582
  }, [
583
583
  n,
584
584
  p,
585
- x,
585
+ S,
586
586
  y,
587
587
  c,
588
588
  m
589
- ]), O = q(() => {
589
+ ]), k = q(() => {
590
590
  let i = [];
591
591
  if (!t?.length) return i;
592
592
  i.push(je.createReadableIndexColumn()), i.push(je.createSelectableColumn()), i.push({
@@ -621,7 +621,7 @@ var Ve = ({ backLabel: e, onGoBackButtonClick: t, onProceedButtonClick: n, proce
621
621
  Object.keys(e.validated_content || {}).forEach((e) => o.add(e)), e.data_issues.forEach((e) => o.add(e.col_id));
622
622
  }), n.ordered_col_ids.forEach((s) => {
623
623
  if (!o.has(s)) return;
624
- let c = n.cols[s], u = t.flatMap((e) => e.data_issues.filter((e) => e.col_id === c.id)), d = u.length === 0 || u.some((e) => e.data_issue_type !== k.DERIVED), f = e[c.id]?.length;
624
+ let c = n.cols[s], u = t.flatMap((e) => e.data_issues.filter((e) => e.col_id === c.id)), d = u.length === 0 || u.some((e) => e.data_issue_type !== D.DERIVED), f = e[c.id]?.length;
625
625
  c && i.push({
626
626
  cellTitleGetter: (e) => {
627
627
  let t = e.row.data_issues.find((e) => e.col_id === c.id);
@@ -643,7 +643,7 @@ var Ve = ({ backLabel: e, onGoBackButtonClick: t, onProceedButtonClick: n, proce
643
643
  hideInFilter: !0,
644
644
  id: c.id,
645
645
  isInitiallyVisible: d,
646
- renderCell: D,
646
+ renderCell: O,
647
647
  type: "text",
648
648
  valueGetter: (e) => a.getRowValue(e.row.validated_content, c, n).short,
649
649
  widthPx: 250
@@ -659,7 +659,7 @@ var Ve = ({ backLabel: e, onGoBackButtonClick: t, onProceedButtonClick: n, proce
659
659
  }), i.push(je.createActionsColumn({
660
660
  getActions: (e) => {
661
661
  let t = [];
662
- return t.push(/* @__PURE__ */ $(re, {
662
+ return t.push(/* @__PURE__ */ $(z, {
663
663
  onClick: () => {
664
664
  u.current?.open({
665
665
  caseContent: e.row.validated_content,
@@ -669,7 +669,7 @@ var Ve = ({ backLabel: e, onGoBackButtonClick: t, onProceedButtonClick: n, proce
669
669
  formId: "edit-case-form"
670
670
  });
671
671
  },
672
- children: [/* @__PURE__ */ Q(z, { children: /* @__PURE__ */ Q(Te, {}) }), /* @__PURE__ */ Q(B, { children: l`Edit` })]
672
+ children: [/* @__PURE__ */ Q(ne, { children: /* @__PURE__ */ Q(Te, {}) }), /* @__PURE__ */ Q(R, { children: l`Edit` })]
673
673
  }, "editCase")), t;
674
674
  },
675
675
  t: l
@@ -684,11 +684,11 @@ var Ve = ({ backLabel: e, onGoBackButtonClick: t, onProceedButtonClick: n, proce
684
684
  l,
685
685
  e,
686
686
  h,
687
- D,
687
+ O,
688
688
  r
689
689
  ]);
690
690
  return Me({
691
- columns: O,
691
+ columns: k,
692
692
  createFiltersFromColumns: !0,
693
693
  rows: t,
694
694
  store: s
@@ -698,7 +698,7 @@ var Ve = ({ backLabel: e, onGoBackButtonClick: t, onProceedButtonClick: n, proce
698
698
  float: "right"
699
699
  } } }) }),
700
700
  /* @__PURE__ */ Q(Oe, { font: c["gen-epix-ui-client-casedb"].lineList.font }),
701
- /* @__PURE__ */ Q(S, {
701
+ /* @__PURE__ */ Q(b, {
702
702
  onSubmit: g,
703
703
  ref: u
704
704
  }),
@@ -708,7 +708,7 @@ var Ve = ({ backLabel: e, onGoBackButtonClick: t, onProceedButtonClick: n, proce
708
708
  })
709
709
  ] });
710
710
  }, Ye = ({ onGoBackButtonClick: e, onProceedButtonClick: t }) => {
711
- let { t: n } = X(), r = pe(), i = W(p), a = l(i, (e) => e.completeCaseType), o = l(r, (e) => e.selectedIds), s = !o.length || o.length > a.props.create_max_n_cases;
711
+ let { t: n } = X(), r = de(), i = W(p), a = l(i, (e) => e.completeCaseType), o = l(r, (e) => e.selectedIds), s = !o.length || o.length > a.props.create_max_n_cases;
712
712
  return /* @__PURE__ */ Q(Ve, {
713
713
  onGoBackButtonClick: e,
714
714
  onProceedButtonClick: t,
@@ -719,11 +719,11 @@ var Ve = ({ backLabel: e, onGoBackButtonClick: t, onProceedButtonClick: n, proce
719
719
  let { t } = X(), n = W(p), r = l(n, (e) => e.goToNextStep), i = l(n, (e) => e.goToPreviousStep), o = l(n, (e) => e.completeCaseType), s = l(n, (e) => e.casesForVerificationFromSourceData), c = l(n, (e) => e.createdInDataCollectionId), u = l(n, (e) => e.validateCasesQueryKey), f = l(n, (e) => e.caseRightsColMap), [m, h] = Y(!1), [g, _] = Y(!1), [v, y] = Y(null), b = J([]), x = J(null), S = J(null), C = G((e, t, n) => s[t.rowIndex]?.case?.content[e.id] ?? "", [s]), w = be({
720
720
  enabled: s.length > 0,
721
721
  gcTime: Infinity,
722
- queryFn: async ({ signal: t }) => (await O.getInstance().uploadCases(M.deepNullifyEmptyStrings({
722
+ queryFn: async ({ signal: t }) => (await E.getInstance().uploadCases(A.deepNullifyEmptyStrings({
723
723
  case_batch: { cases: s },
724
724
  case_type_id: e,
725
725
  default_created_in_data_collection_id: c ?? void 0,
726
- on_exists: j.UPDATE,
726
+ on_exists: k.UPDATE,
727
727
  verify_only: !0
728
728
  }), { signal: t })).data,
729
729
  queryKey: u,
@@ -732,10 +732,10 @@ var Ve = ({ backLabel: e, onGoBackButtonClick: t, onProceedButtonClick: n, proce
732
732
  id: s[t].id
733
733
  })),
734
734
  staleTime: Infinity
735
- }), T = ge([w]), E = q(() => fe({ idSelectorCallback: (e) => e.id }), []), D = l(E, d((e) => e.setSelectedIds)), N = G(async (t) => {
735
+ }), T = me([w]), j = q(() => ue({ idSelectorCallback: (e) => e.id }), []), M = l(j, d((e) => e.setSelectedIds)), F = G(async (t) => {
736
736
  _(!0);
737
737
  try {
738
- let n = (await O.getInstance().uploadCases(M.deepNullifyEmptyStrings({
738
+ let n = (await E.getInstance().uploadCases(A.deepNullifyEmptyStrings({
739
739
  case_batch: { cases: t.map(({ content: e, row: t }, n) => {
740
740
  let r = s.find((e) => e.id === t.id);
741
741
  return { case: {
@@ -752,7 +752,7 @@ var Ve = ({ backLabel: e, onGoBackButtonClick: t, onProceedButtonClick: n, proce
752
752
  }) },
753
753
  case_type_id: e,
754
754
  default_created_in_data_collection_id: c ?? void 0,
755
- on_exists: j.UPDATE,
755
+ on_exists: k.UPDATE,
756
756
  verify_only: !0
757
757
  }))).data, r = new Map(t.map(({ row: e }, t) => [e.id, n.cases[t]]));
758
758
  ee.getInstance().queryClient.setQueryData(u, { cases: w.data.map((e) => {
@@ -765,10 +765,10 @@ var Ve = ({ backLabel: e, onGoBackButtonClick: t, onProceedButtonClick: n, proce
765
765
  let i = [];
766
766
  if (t.forEach(({ row: e }, t) => {
767
767
  let r = n.cases[t];
768
- r.status !== A.SKIPPED && r.status !== A.SUCCESS && r.status !== A.UPDATED && (b.current.includes(e.id) || (b.current.push(e.id), i.push(e.id)));
768
+ r.status !== O.SKIPPED && r.status !== O.SUCCESS && r.status !== O.UPDATED && (b.current.includes(e.id) || (b.current.push(e.id), i.push(e.id)));
769
769
  }), i.length > 0) {
770
- let e = E.getState().selectedIds, t = i.filter((t) => !e.includes(t));
771
- t.length > 0 && D([...e, ...t]);
770
+ let e = j.getState().selectedIds, t = i.filter((t) => !e.includes(t));
771
+ t.length > 0 && M([...e, ...t]);
772
772
  }
773
773
  } catch (e) {
774
774
  y(e);
@@ -781,12 +781,12 @@ var Ve = ({ backLabel: e, onGoBackButtonClick: t, onProceedButtonClick: n, proce
781
781
  s,
782
782
  o,
783
783
  c,
784
- D,
785
- E,
784
+ M,
785
+ j,
786
786
  u
787
- ]), te = G(async (e) => {
788
- let t = E.getState().selectedIds;
789
- await N(w.data.filter((e) => t.includes(e.id)).map((t) => ({
787
+ ]), L = G(async (e) => {
788
+ let t = j.getState().selectedIds;
789
+ await F(w.data.filter((e) => t.includes(e.id)).map((t) => ({
790
790
  content: {
791
791
  ...t.validated_content,
792
792
  ...e[t.id]
@@ -795,17 +795,17 @@ var Ve = ({ backLabel: e, onGoBackButtonClick: t, onProceedButtonClick: n, proce
795
795
  })));
796
796
  }, [
797
797
  w.data,
798
- N,
799
- E
800
- ]), ne = G(async (e, t) => {
798
+ F,
799
+ j
800
+ ]), te = G(async (e, t) => {
801
801
  let n = w.data.find((t) => t.id === e);
802
- await N([{
802
+ await F([{
803
803
  content: t,
804
804
  row: n
805
805
  }]);
806
- }, [w.data, N]);
806
+ }, [w.data, F]);
807
807
  K(() => {
808
- let e = E.subscribe((e, t) => {
808
+ let e = j.subscribe((e, t) => {
809
809
  if (e.selectedIds === t.selectedIds) return;
810
810
  b.current = e.selectedIds;
811
811
  let n = e.selectedIds.length > o.props.create_max_n_cases;
@@ -814,12 +814,12 @@ var Ve = ({ backLabel: e, onGoBackButtonClick: t, onProceedButtonClick: n, proce
814
814
  return () => {
815
815
  e();
816
816
  };
817
- }, [o.props.create_max_n_cases, E]), K(() => {
818
- let e = (w.data ?? []).filter((e) => !e.data_issues.some((e) => e.data_issue_type === k.INVALID || e.data_issue_type === k.UNAUTHORIZED)).map((e) => e.id);
819
- D(e);
820
- }, [w.data, D]);
821
- let L = G(async () => {
822
- let e = E.getState().selectedIds, t = w.data.filter((t) => e.includes(t.id) && !t.data_issues.some((e) => e.data_issue_type === k.INVALID));
817
+ }, [o.props.create_max_n_cases, j]), K(() => {
818
+ let e = (w.data ?? []).filter((e) => !e.data_issues.some((e) => e.data_issue_type === D.INVALID || e.data_issue_type === D.UNAUTHORIZED)).map((e) => e.id);
819
+ M(e);
820
+ }, [w.data, M]);
821
+ let ne = G(async () => {
822
+ let e = j.getState().selectedIds, t = w.data.filter((t) => e.includes(t.id) && !t.data_issues.some((e) => e.data_issue_type === D.INVALID));
823
823
  n.setState((e) => ({
824
824
  ...e,
825
825
  selectedIdsForUpload: t.map((e) => e.id),
@@ -829,7 +829,7 @@ var Ve = ({ backLabel: e, onGoBackButtonClick: t, onProceedButtonClick: n, proce
829
829
  w.data,
830
830
  r,
831
831
  n,
832
- E
832
+ j
833
833
  ]), R = G(async () => {
834
834
  n.setState((e) => ({
835
835
  ...e,
@@ -841,11 +841,11 @@ var Ve = ({ backLabel: e, onGoBackButtonClick: t, onProceedButtonClick: n, proce
841
841
  w.data,
842
842
  n
843
843
  ]), z = G(async () => {
844
- if (w.data.some((e) => E.getState().selectedIds.includes(e.id) && (e.data_issues.some((e) => e.data_issue_type === k.INVALID) || e.status === A.FAILED))) {
844
+ if (w.data.some((e) => j.getState().selectedIds.includes(e.id) && (e.data_issues.some((e) => e.data_issue_type === D.INVALID) || e.status === O.FAILED))) {
845
845
  x.current?.open();
846
846
  return;
847
847
  }
848
- if (w.data.some((e) => !E.getState().selectedIds.includes(e.id) && !e.data_issues.some((e) => e.data_issue_type === k.INVALID))) {
848
+ if (w.data.some((e) => !j.getState().selectedIds.includes(e.id) && !e.data_issues.some((e) => e.data_issue_type === D.INVALID))) {
849
849
  S.current?.open();
850
850
  return;
851
851
  }
@@ -853,7 +853,7 @@ var Ve = ({ backLabel: e, onGoBackButtonClick: t, onProceedButtonClick: n, proce
853
853
  }, [
854
854
  w.data,
855
855
  R,
856
- E
856
+ j
857
857
  ]), B = G(() => {
858
858
  i();
859
859
  }, [i]);
@@ -866,9 +866,9 @@ var Ve = ({ backLabel: e, onGoBackButtonClick: t, onProceedButtonClick: n, proce
866
866
  width: "100%"
867
867
  },
868
868
  children: [
869
- /* @__PURE__ */ Q(de, {
870
- store: E,
871
- children: /* @__PURE__ */ $(me, {
869
+ /* @__PURE__ */ Q(le, {
870
+ store: j,
871
+ children: /* @__PURE__ */ $(fe, {
872
872
  error: v,
873
873
  inlineSpinner: !0,
874
874
  loadables: T,
@@ -877,9 +877,9 @@ var Ve = ({ backLabel: e, onGoBackButtonClick: t, onProceedButtonClick: n, proce
877
877
  children: [
878
878
  m && /* @__PURE__ */ Q(I, {
879
879
  sx: { marginY: 2 },
880
- children: /* @__PURE__ */ Q(P, {
880
+ children: /* @__PURE__ */ Q(N, {
881
881
  severity: "error",
882
- children: /* @__PURE__ */ Q(F, { children: t("You have exceeded the maximum number of {{maxCases}} cases for this case type. Please reduce the number of selected cases before proceeding.", { maxCases: o.props.create_max_n_cases }) })
882
+ children: /* @__PURE__ */ Q(P, { children: t("You have exceeded the maximum number of {{maxCases}} cases for this case type. Please reduce the number of selected cases before proceeding.", { maxCases: o.props.create_max_n_cases }) })
883
883
  })
884
884
  }),
885
885
  /* @__PURE__ */ Q(Je, {
@@ -887,9 +887,9 @@ var Ve = ({ backLabel: e, onGoBackButtonClick: t, onProceedButtonClick: n, proce
887
887
  caseUploadResults: w.data || [],
888
888
  completeCaseType: o,
889
889
  getOriginalCellValue: C,
890
- onCaseContentEditSubmit: ne,
891
- onColContentEditSubmit: te,
892
- tableStore: E
890
+ onCaseContentEditSubmit: te,
891
+ onColContentEditSubmit: L,
892
+ tableStore: j
893
893
  }),
894
894
  /* @__PURE__ */ Q(Ye, {
895
895
  onGoBackButtonClick: B,
@@ -906,7 +906,7 @@ var Ve = ({ backLabel: e, onGoBackButtonClick: t, onProceedButtonClick: n, proce
906
906
  body: t`Some of the selected cases contain issues. If you proceed, these cases will be excluded. Are you sure you want to proceed without them?`,
907
907
  cancelLabel: t`Cancel`,
908
908
  confirmLabel: t`Proceed`,
909
- onConfirm: L,
909
+ onConfirm: ne,
910
910
  ref: x,
911
911
  title: t`Issues found with selected cases`
912
912
  }),
@@ -963,22 +963,22 @@ var Ve = ({ backLabel: e, onGoBackButtonClick: t, onProceedButtonClick: n, proce
963
963
  f,
964
964
  g
965
965
  ]);
966
- let A = G(async () => {
966
+ let ee = G(async () => {
967
967
  await i();
968
- }, [i]), j = G(() => {
968
+ }, [i]), A = G(() => {
969
969
  C(!0);
970
- }, []), ee = G(() => {
970
+ }, []), j = G(() => {
971
971
  a();
972
972
  }, [a]), M = G(async () => {
973
973
  let e = n.createCaseTypeLink(_);
974
974
  await ze.getInstance().router.navigate(e);
975
- }, [_]), N;
976
- return N = E ? /* @__PURE__ */ $(I, { children: [E instanceof s && /* @__PURE__ */ $(P, {
975
+ }, [_]), F;
976
+ return F = E ? /* @__PURE__ */ $(I, { children: [E instanceof s && /* @__PURE__ */ $(N, {
977
977
  severity: "error",
978
- children: [/* @__PURE__ */ Q(F, { children: e("Failed to create cases during upload.") }), e("An error occurred while creating cases. Please try again or contact support if the issue persists. Cases may have been partially created. No files were uploaded.")]
979
- }), /* @__PURE__ */ Q(Ie, { error: E })] }) : w ? /* @__PURE__ */ $(I, { children: [/* @__PURE__ */ Q(I, { children: /* @__PURE__ */ Q(P, {
978
+ children: [/* @__PURE__ */ Q(P, { children: e("Failed to create cases during upload.") }), e("An error occurred while creating cases. Please try again or contact support if the issue persists. Cases may have been partially created. No files were uploaded.")]
979
+ }), /* @__PURE__ */ Q(Ie, { error: E })] }) : w ? /* @__PURE__ */ $(I, { children: [/* @__PURE__ */ Q(I, { children: /* @__PURE__ */ Q(N, {
980
980
  severity: "success",
981
- children: /* @__PURE__ */ Q(F, { children: e("Upload completed.") })
981
+ children: /* @__PURE__ */ Q(P, { children: e("Upload completed.") })
982
982
  }) }), /* @__PURE__ */ Q(I, {
983
983
  sx: {
984
984
  display: "flex",
@@ -992,7 +992,7 @@ var Ve = ({ backLabel: e, onGoBackButtonClick: t, onProceedButtonClick: n, proce
992
992
  variant: "contained",
993
993
  children: h
994
994
  }) : /* @__PURE__ */ $(Z, { children: [/* @__PURE__ */ Q(L, {
995
- onClick: A,
995
+ onClick: ee,
996
996
  variant: "outlined",
997
997
  children: e("Upload more cases")
998
998
  }), /* @__PURE__ */ Q(L, {
@@ -1003,9 +1003,9 @@ var Ve = ({ backLabel: e, onGoBackButtonClick: t, onProceedButtonClick: n, proce
1003
1003
  })] }) : S ? /* @__PURE__ */ $(I, { children: [
1004
1004
  /* @__PURE__ */ Q(I, {
1005
1005
  sx: { marginBottom: 4 },
1006
- children: /* @__PURE__ */ $(P, {
1006
+ children: /* @__PURE__ */ $(N, {
1007
1007
  severity: "info",
1008
- children: [/* @__PURE__ */ Q(F, { children: e("Uploading cases and files.") }), e("Please wait while the cases and associated files are being uploaded. This may take a while depending on the number and size of the files being uploaded.")]
1008
+ children: [/* @__PURE__ */ Q(P, { children: e("Uploading cases and files.") }), e("Please wait while the cases and associated files are being uploaded. This may take a while depending on the number and size of the files being uploaded.")]
1009
1009
  })
1010
1010
  }),
1011
1011
  /* @__PURE__ */ Q(I, {
@@ -1022,161 +1022,161 @@ var Ve = ({ backLabel: e, onGoBackButtonClick: t, onProceedButtonClick: n, proce
1022
1022
  ] }) : /* @__PURE__ */ $(I, { children: [/* @__PURE__ */ $(I, { children: [
1023
1023
  /* @__PURE__ */ Q(I, {
1024
1024
  sx: { marginY: 2 },
1025
- children: /* @__PURE__ */ Q(P, {
1025
+ children: /* @__PURE__ */ Q(N, {
1026
1026
  severity: "info",
1027
- children: /* @__PURE__ */ Q(F, { children: e("{{numCases}} cases are ready to be uploaded.", { numCases: k.length }) })
1027
+ children: /* @__PURE__ */ Q(P, { children: e("{{numCases}} cases are ready to be uploaded.", { numCases: k.length }) })
1028
1028
  })
1029
1029
  }),
1030
1030
  O.mappedSequenceFiles.length > 0 && /* @__PURE__ */ Q(I, {
1031
1031
  sx: { marginY: 2 },
1032
- children: /* @__PURE__ */ Q(P, {
1032
+ children: /* @__PURE__ */ Q(N, {
1033
1033
  severity: "info",
1034
- children: /* @__PURE__ */ Q(F, { children: e("{{numSequenceFiles}} genome files are ready to be uploaded.", { numSequenceFiles: O.mappedSequenceFiles.length }) })
1034
+ children: /* @__PURE__ */ Q(P, { children: e("{{numSequenceFiles}} genome files are ready to be uploaded.", { numSequenceFiles: O.mappedSequenceFiles.length }) })
1035
1035
  })
1036
1036
  }),
1037
1037
  O.mappedReadsFiles.length > 0 && /* @__PURE__ */ Q(I, {
1038
1038
  sx: { marginY: 2 },
1039
- children: /* @__PURE__ */ Q(P, {
1039
+ children: /* @__PURE__ */ Q(N, {
1040
1040
  severity: "info",
1041
- children: /* @__PURE__ */ Q(F, { children: e("{{numReadsFiles}} reads files are ready to be uploaded.", { numReadsFiles: O.mappedReadsFiles.length }) })
1041
+ children: /* @__PURE__ */ Q(P, { children: e("{{numReadsFiles}} reads files are ready to be uploaded.", { numReadsFiles: O.mappedReadsFiles.length }) })
1042
1042
  })
1043
1043
  }),
1044
1044
  u.length - k.length > 0 && /* @__PURE__ */ Q(I, {
1045
1045
  sx: { marginY: 2 },
1046
- children: /* @__PURE__ */ Q(P, {
1046
+ children: /* @__PURE__ */ Q(N, {
1047
1047
  severity: "warning",
1048
- children: /* @__PURE__ */ Q(F, { children: e("{{numCases}} cases were not selected and will not be uploaded.", { numCases: u.length - k.length }) })
1048
+ children: /* @__PURE__ */ Q(P, { children: e("{{numCases}} cases were not selected and will not be uploaded.", { numCases: u.length - k.length }) })
1049
1049
  })
1050
1050
  }),
1051
1051
  O.unmappedSequenceFiles.length > 0 && /* @__PURE__ */ Q(I, {
1052
1052
  sx: { marginY: 2 },
1053
- children: /* @__PURE__ */ Q(P, {
1053
+ children: /* @__PURE__ */ Q(N, {
1054
1054
  severity: "warning",
1055
- children: /* @__PURE__ */ Q(F, { children: e("{{unmappedSequenceFiles}} unmapped genome files will not be uploaded.", { unmappedSequenceFiles: O.unmappedSequenceFiles.length }) })
1055
+ children: /* @__PURE__ */ Q(P, { children: e("{{unmappedSequenceFiles}} unmapped genome files will not be uploaded.", { unmappedSequenceFiles: O.unmappedSequenceFiles.length }) })
1056
1056
  })
1057
1057
  }),
1058
1058
  O.unmappedReadsFiles.length > 0 && /* @__PURE__ */ Q(I, {
1059
1059
  sx: { marginY: 2 },
1060
- children: /* @__PURE__ */ Q(P, {
1060
+ children: /* @__PURE__ */ Q(N, {
1061
1061
  severity: "warning",
1062
- children: /* @__PURE__ */ Q(F, { children: e("{{unmappedReadsFiles}} unmapped reads files will not be uploaded.", { unmappedReadsFiles: O.unmappedReadsFiles.length }) })
1062
+ children: /* @__PURE__ */ Q(P, { children: e("{{unmappedReadsFiles}} unmapped reads files will not be uploaded.", { unmappedReadsFiles: O.unmappedReadsFiles.length }) })
1063
1063
  })
1064
1064
  })
1065
1065
  ] }), /* @__PURE__ */ Q(Ve, {
1066
- onGoBackButtonClick: ee,
1067
- onProceedButtonClick: j,
1066
+ onGoBackButtonClick: j,
1067
+ onProceedButtonClick: A,
1068
1068
  proceedLabel: "Start upload"
1069
- })] }), /* @__PURE__ */ Q(R, {
1069
+ })] }), /* @__PURE__ */ Q(te, {
1070
1070
  maxWidth: "xl",
1071
1071
  sx: { height: "100%" },
1072
- children: N
1072
+ children: F
1073
1073
  });
1074
- }, Qe = (e) => Array.from(e?.files ?? []), $e = ({ hasGenomeFiles: e, hasReadsFiles: t, hasSelectedFiles: n }) => E().shape({
1075
- assemblyProtocolId: e ? D().uuid4().required() : D().nullable().notRequired(),
1076
- sampleIdColId: n ? D().uuid4().required() : D().nullable().notRequired(),
1077
- sequencingProtocolId: t ? D().uuid4().required() : D().nullable().notRequired()
1074
+ }, Qe = (e) => Array.from(e?.files ?? []), $e = ({ hasGenomeFiles: e, hasReadsFiles: t, hasSelectedFiles: n }) => w().shape({
1075
+ assemblyProtocolId: e ? T().uuid4().required() : T().nullable().notRequired(),
1076
+ sampleIdColId: n ? T().uuid4().required() : T().nullable().notRequired(),
1077
+ sequencingProtocolId: t ? T().uuid4().required() : T().nullable().notRequired()
1078
1078
  }), et = () => {
1079
- let { t: e } = X(), n = le(), r = W(p), i = l(r, (e) => e.completeCaseType), a = l(r, (e) => e.mappedColumns), o = l(r, (e) => e.validatedCases), s = l(r, (e) => e.goToNextStep), c = l(r, (e) => e.goToPreviousStep), u = l(r, (e) => e.setSequenceFilesDataTransfer), d = l(r, (e) => e.sampleIdColId), f = l(r, (e) => e.sequenceFilesDataTransfer), [m, _] = Y(f), v = ue(), y = C(), b = w(), x = ge([y, b]), S = q(() => a.filter((e) => e.isSampleIdColumn).map((e) => ({
1079
+ let { t: e } = X(), n = se(), r = W(p), i = l(r, (e) => e.completeCaseType), a = l(r, (e) => e.mappedColumns), o = l(r, (e) => e.validatedCases), s = l(r, (e) => e.goToNextStep), c = l(r, (e) => e.goToPreviousStep), u = l(r, (e) => e.setSequenceFilesDataTransfer), d = l(r, (e) => e.sampleIdColId), f = l(r, (e) => e.sequenceFilesDataTransfer), [h, g] = Y(f), _ = ce(), v = x(), y = S(), b = me([v, y]), C = q(() => a.filter((e) => e.isSampleIdColumn).map((e) => ({
1080
1080
  label: e.col.label,
1081
1081
  value: e.col.id
1082
- })), [a]), T = q(() => Qe(m), [m]), E = T.length > 0, D = q(() => T.some((e) => t.isGenomeFile(e.name)), [T]), O = q(() => T.some((e) => t.isReadsFile(e.name)), [T]), k = q(() => $e({
1083
- hasGenomeFiles: D,
1084
- hasReadsFiles: O,
1085
- hasSelectedFiles: E
1082
+ })), [a]), w = q(() => Qe(h), [h]), T = w.length > 0, E = q(() => w.some((e) => t.isGenomeFile(e.name)), [w]), D = q(() => w.some((e) => t.isReadsFile(e.name)), [w]), O = q(() => $e({
1083
+ hasGenomeFiles: E,
1084
+ hasReadsFiles: D,
1085
+ hasSelectedFiles: T
1086
1086
  }), [
1087
+ E,
1087
1088
  D,
1088
- O,
1089
- E
1090
- ]), A = q(() => ({
1089
+ T
1090
+ ]), k = q(() => ({
1091
1091
  assemblyProtocolId: r.getState().assemblyProtocolId ?? null,
1092
1092
  sampleIdColId: r.getState().sampleIdColId ?? null,
1093
1093
  sequencingProtocolId: r.getState().sequencingProtocolId ?? null
1094
- }), [r]), j = h({
1095
- defaultValues: A,
1096
- resolver: g(k),
1097
- values: A
1098
- }), { handleSubmit: ee, setValue: M } = j;
1094
+ }), [r]), ee = _e({
1095
+ defaultValues: k,
1096
+ resolver: m(O),
1097
+ values: k
1098
+ }), { handleSubmit: A, setValue: M } = ee;
1099
1099
  K(() => {
1100
- y.isLoading || b.isLoading || (r.getState().sequencingProtocolId || (M("sequencingProtocolId", y.options[0]?.value || null), r.setState({ sequencingProtocolId: y.options[0]?.value || null })), r.getState().assemblyProtocolId || (M("assemblyProtocolId", b.options[0]?.value || null), r.setState({ assemblyProtocolId: b.options[0]?.value || null })), r.getState().sampleIdColId || (M("sampleIdColId", S[0]?.value || null), r.setState({ sampleIdColId: S[0]?.value || null })));
1100
+ v.isLoading || y.isLoading || (r.getState().sequencingProtocolId || (M("sequencingProtocolId", v.options[0]?.value || null), r.setState({ sequencingProtocolId: v.options[0]?.value || null })), r.getState().assemblyProtocolId || (M("assemblyProtocolId", y.options[0]?.value || null), r.setState({ assemblyProtocolId: y.options[0]?.value || null })), r.getState().sampleIdColId || (M("sampleIdColId", C[0]?.value || null), r.setState({ sampleIdColId: C[0]?.value || null })));
1101
1101
  }, [
1102
- b.isLoading,
1103
- b.options,
1104
1102
  y.isLoading,
1105
1103
  y.options,
1104
+ v.isLoading,
1105
+ v.options,
1106
1106
  M,
1107
1107
  r,
1108
- S
1108
+ C
1109
1109
  ]);
1110
- let te = G((e) => {
1110
+ let F = G((e) => {
1111
1111
  r.setState({ sequencingProtocolId: e });
1112
- }, [r]), ne = G((e) => {
1113
- r.setState({ assemblyProtocolId: e });
1114
1112
  }, [r]), L = G((e) => {
1113
+ r.setState({ assemblyProtocolId: e });
1114
+ }, [r]), te = G((e) => {
1115
1115
  r.setState({ sampleIdColId: e });
1116
- }, [r]), R = q(() => [
1116
+ }, [r]), ne = q(() => [
1117
1117
  {
1118
- definition: N.SELECT,
1118
+ definition: j.SELECT,
1119
1119
  label: e`Genome files: assembly protocol`,
1120
- loading: b.isLoading,
1120
+ loading: y.isLoading,
1121
1121
  name: "assemblyProtocolId",
1122
- onChange: ne,
1123
- options: b.options
1122
+ onChange: L,
1123
+ options: y.options
1124
1124
  },
1125
1125
  {
1126
- definition: N.SELECT,
1126
+ definition: j.SELECT,
1127
1127
  label: e`Reads files: sequencing protocol`,
1128
- loading: y.isLoading,
1128
+ loading: v.isLoading,
1129
1129
  name: "sequencingProtocolId",
1130
- onChange: te,
1131
- options: y.options
1130
+ onChange: F,
1131
+ options: v.options
1132
1132
  },
1133
1133
  {
1134
- definition: N.SELECT,
1134
+ definition: j.SELECT,
1135
1135
  label: e`Sample ID column`,
1136
1136
  name: "sampleIdColId",
1137
- onChange: L,
1138
- options: S
1137
+ onChange: te,
1138
+ options: C
1139
1139
  }
1140
1140
  ], [
1141
- b.isLoading,
1142
- b.options,
1143
- ne,
1144
- L,
1145
- te,
1146
- S,
1147
1141
  y.isLoading,
1148
1142
  y.options,
1143
+ L,
1144
+ te,
1145
+ F,
1146
+ C,
1147
+ v.isLoading,
1148
+ v.options,
1149
1149
  e
1150
- ]), z = q(() => a.some((e) => e.isSampleIdColumn && e.sampleIdentifierIssuerId), [a]), B = q(() => d ? o.some((e) => e.validated_content[d]?.trim().length > 0) : !1, [d, o]), re = q(() => t.getCompleteCaseTypeColStats(i), [i]), V = q(() => re.sequenceColumns.length > 0, [re]), H = q(() => re.readsColumns.length > 0, [re]), U = q(() => z && B && (V || H), [
1150
+ ]), R = q(() => a.some((e) => e.isSampleIdColumn && e.sampleIdentifierIssuerId), [a]), z = q(() => d ? o.some((e) => e.validated_content[d]?.trim().length > 0) : !1, [d, o]), B = q(() => t.getCompleteCaseTypeColStats(i), [i]), V = q(() => B.sequenceColumns.length > 0, [B]), H = q(() => B.readsColumns.length > 0, [B]), U = q(() => R && z && (V || H), [
1151
+ R,
1151
1152
  z,
1152
- B,
1153
1153
  V,
1154
1154
  H
1155
- ]), ie = q(() => {
1155
+ ]), re = q(() => {
1156
1156
  let e = "";
1157
1157
  return V && (e += ".fa,.fasta,.fa.gz,.fasta.gz,"), H && (e += ".fq,.fastq,.fq.gz,.fastq.gz,"), e;
1158
- }, [H, V]), ae = G(async () => {
1159
- u(U ? m : new DataTransfer()), await ee(async () => {
1158
+ }, [H, V]), ie = G(async () => {
1159
+ u(U ? h : new DataTransfer()), await A(async () => {
1160
1160
  await s();
1161
1161
  })();
1162
1162
  }, [
1163
1163
  U,
1164
- m,
1164
+ h,
1165
1165
  s,
1166
- ee,
1166
+ A,
1167
1167
  u
1168
- ]), oe = G(() => {
1168
+ ]), ae = G(() => {
1169
1169
  c();
1170
- }, [c]), se = G((e) => {
1171
- _(e), u(e);
1172
- }, [u]), ce = G((e) => /* @__PURE__ */ Q(I, {
1170
+ }, [c]), oe = G((e) => {
1171
+ g(e), u(e);
1172
+ }, [u]), J = G((e) => /* @__PURE__ */ Q(I, {
1173
1173
  sx: {
1174
1174
  display: "grid",
1175
1175
  gap: n.spacing(1),
1176
1176
  gridTemplateColumns: "1fr 1fr 1fr"
1177
1177
  },
1178
1178
  children: e
1179
- }), [n]), J = q(() => z ? B ? H ? V ? null : {
1179
+ }), [n]), le = q(() => R ? z ? H ? V ? null : {
1180
1180
  message: e`The selected case type does not support uploading sequence files.`,
1181
1181
  title: e("Uploading of sequence files is disabled.")
1182
1182
  } : {
@@ -1191,12 +1191,12 @@ var Ve = ({ backLabel: e, onGoBackButtonClick: t, onProceedButtonClick: n, proce
1191
1191
  }, [
1192
1192
  H,
1193
1193
  V,
1194
- B,
1195
1194
  z,
1195
+ R,
1196
1196
  e
1197
- ]), de = G(() => {}, []);
1198
- return /* @__PURE__ */ Q(me, {
1199
- loadables: x,
1197
+ ]), ue = G(() => {}, []);
1198
+ return /* @__PURE__ */ Q(fe, {
1199
+ loadables: b,
1200
1200
  children: /* @__PURE__ */ $(I, {
1201
1201
  sx: {
1202
1202
  display: "grid",
@@ -1207,9 +1207,9 @@ var Ve = ({ backLabel: e, onGoBackButtonClick: t, onProceedButtonClick: n, proce
1207
1207
  children: [
1208
1208
  !U && /* @__PURE__ */ Q(I, {
1209
1209
  sx: { marginBottom: 2 },
1210
- children: /* @__PURE__ */ $(P, {
1210
+ children: /* @__PURE__ */ $(N, {
1211
1211
  severity: "error",
1212
- children: [/* @__PURE__ */ Q(F, { children: J.title }), J.message]
1212
+ children: [/* @__PURE__ */ Q(P, { children: le.title }), le.message]
1213
1213
  })
1214
1214
  }),
1215
1215
  /* @__PURE__ */ $(I, {
@@ -1218,26 +1218,26 @@ var Ve = ({ backLabel: e, onGoBackButtonClick: t, onProceedButtonClick: n, proce
1218
1218
  /* @__PURE__ */ Q(I, {
1219
1219
  sx: { maxWidth: n.spacing(128) },
1220
1220
  children: /* @__PURE__ */ Q(ye, {
1221
- formFieldDefinitions: R,
1222
- formId: v,
1223
- formMethods: j,
1224
- onSubmit: de,
1225
- schema: k,
1226
- wrapForm: ce
1221
+ formFieldDefinitions: ne,
1222
+ formId: _,
1223
+ formMethods: ee,
1224
+ onSubmit: ue,
1225
+ schema: O,
1226
+ wrapForm: J
1227
1227
  })
1228
1228
  }),
1229
1229
  !V && /* @__PURE__ */ Q(I, {
1230
1230
  sx: { marginY: 1 },
1231
- children: /* @__PURE__ */ $(P, {
1231
+ children: /* @__PURE__ */ $(N, {
1232
1232
  severity: "info",
1233
- children: [/* @__PURE__ */ Q(F, { children: e("Uploading of sequences has been disabled.") }), /* @__PURE__ */ Q(I, { children: e("Uploading of sequences is not supported for the selected case type.") })]
1233
+ children: [/* @__PURE__ */ Q(P, { children: e("Uploading of sequences has been disabled.") }), /* @__PURE__ */ Q(I, { children: e("Uploading of sequences is not supported for the selected case type.") })]
1234
1234
  })
1235
1235
  }),
1236
1236
  !H && /* @__PURE__ */ Q(I, {
1237
1237
  sx: { marginY: 1 },
1238
- children: /* @__PURE__ */ $(P, {
1238
+ children: /* @__PURE__ */ $(N, {
1239
1239
  severity: "info",
1240
- children: [/* @__PURE__ */ Q(F, { children: e("Uploading of read files has been disabled.") }), /* @__PURE__ */ Q(I, { children: e("Uploading of read files is not supported for the selected case type.") })]
1240
+ children: [/* @__PURE__ */ Q(P, { children: e("Uploading of read files has been disabled.") }), /* @__PURE__ */ Q(I, { children: e("Uploading of read files is not supported for the selected case type.") })]
1241
1241
  })
1242
1242
  })
1243
1243
  ]
@@ -1254,26 +1254,26 @@ var Ve = ({ backLabel: e, onGoBackButtonClick: t, onProceedButtonClick: n, proce
1254
1254
  top: 0
1255
1255
  },
1256
1256
  children: U && /* @__PURE__ */ Q(Be, {
1257
- accept: ie,
1257
+ accept: re,
1258
1258
  initialDataTransfer: f,
1259
1259
  numFilesAllowed: Infinity,
1260
- onDataTransferChange: se
1260
+ onDataTransferChange: oe
1261
1261
  })
1262
1262
  })
1263
1263
  }),
1264
1264
  /* @__PURE__ */ Q(Ve, {
1265
- onGoBackButtonClick: oe,
1266
- onProceedButtonClick: ae,
1265
+ onGoBackButtonClick: ae,
1266
+ onProceedButtonClick: ie,
1267
1267
  proceedLabel: U ? void 0 : e`Proceed`
1268
1268
  })
1269
1269
  ]
1270
1270
  })
1271
1271
  });
1272
1272
  }, tt = () => {
1273
- let { t: e } = X(), n = le(), r = W(p), i = l(r, (e) => e.goToNextStep), o = l(r, (e) => e.goToPreviousStep), s = l(r, (e) => e.completeCaseType), c = l(r, (e) => e.sampleIdColId), u = l(r, (e) => e.sequenceFilesDataTransfer), f = l(r, d((e) => {
1273
+ let { t: e } = X(), n = se(), r = W(p), i = l(r, (e) => e.goToNextStep), o = l(r, (e) => e.goToPreviousStep), s = l(r, (e) => e.completeCaseType), c = l(r, (e) => e.sampleIdColId), u = l(r, (e) => e.sequenceFilesDataTransfer), f = l(r, d((e) => {
1274
1274
  let t = e.selectedIdsForUpload;
1275
1275
  return e.validatedCases.filter((e) => t.includes(e.id));
1276
- })), m = l(r, (e) => e.setSequenceMapping), h = q(() => t.getCompleteCaseTypeColStats(s), [s]), g = ue(), _ = ue(), v = J(r.getState().sequenceMapping), y = G(async () => {
1276
+ })), m = l(r, (e) => e.setSequenceMapping), h = q(() => t.getCompleteCaseTypeColStats(s), [s]), g = ce(), _ = ce(), v = J(r.getState().sequenceMapping), y = G(async () => {
1277
1277
  m(v.current), await i();
1278
1278
  }, [m, i]), b = G(() => {
1279
1279
  o();
@@ -1294,19 +1294,19 @@ var Ve = ({ backLabel: e, onGoBackButtonClick: t, onProceedButtonClick: n, proce
1294
1294
  K(() => {
1295
1295
  x();
1296
1296
  }, [x]);
1297
- let S = q(() => fe({ idSelectorCallback: (e) => e.id }), []), C = G((e, t) => e.some((e) => {
1297
+ let S = q(() => ue({ idSelectorCallback: (e) => e.id }), []), C = G((e, t) => e.some((e) => {
1298
1298
  let n = a.getRowValue(e.validated_content, t, s);
1299
1299
  return n && !n?.isMissing;
1300
1300
  }), [s]), w = q(() => Array.from(u.files).map((e) => e.name).filter((e) => e.endsWith(".fasta") || e.endsWith(".fa") || e.endsWith(".fa.gz") || e.endsWith(".fasta.gz")), [u.files]), T = q(() => Array.from(u.files).map((e) => e.name).filter((e) => e.endsWith(".fastq") || e.endsWith(".fq") || e.endsWith(".fq.gz") || e.endsWith(".fastaq.gz")), [u.files]), E = G((e) => {
1301
1301
  let { dropDownOptions: t, dropDownValue: n, label: r, onChange: i } = e;
1302
- return /* @__PURE__ */ Q(ne, {
1302
+ return /* @__PURE__ */ Q(F, {
1303
1303
  freeSolo: !0,
1304
1304
  fullWidth: !0,
1305
1305
  onChange: (e, t) => {
1306
1306
  i(t), m(v.current), x();
1307
1307
  },
1308
1308
  options: t,
1309
- renderInput: (e) => /* @__PURE__ */ Q(oe, {
1309
+ renderInput: (e) => /* @__PURE__ */ Q(ie, {
1310
1310
  ...e,
1311
1311
  label: r,
1312
1312
  size: "small"
@@ -1457,11 +1457,11 @@ var Ve = ({ backLabel: e, onGoBackButtonClick: t, onProceedButtonClick: n, proce
1457
1457
  },
1458
1458
  children: [/* @__PURE__ */ Q(I, {
1459
1459
  sx: { paddingBottom: 1 },
1460
- children: /* @__PURE__ */ $(P, {
1460
+ children: /* @__PURE__ */ $(N, {
1461
1461
  severity: "info",
1462
- children: [/* @__PURE__ */ Q(F, { id: g }), /* @__PURE__ */ Q(I, { id: _ })]
1462
+ children: [/* @__PURE__ */ Q(P, { id: g }), /* @__PURE__ */ Q(I, { id: _ })]
1463
1463
  })
1464
- }), /* @__PURE__ */ $(de, {
1464
+ }), /* @__PURE__ */ $(le, {
1465
1465
  store: S,
1466
1466
  children: [/* @__PURE__ */ Q(Oe, {
1467
1467
  font: n["gen-epix-ui-client-casedb"].lineList.font,
@@ -1473,7 +1473,7 @@ var Ve = ({ backLabel: e, onGoBackButtonClick: t, onProceedButtonClick: n, proce
1473
1473
  })]
1474
1474
  });
1475
1475
  }, nt = () => {
1476
- let { t: e } = X(), t = le(), n = W(p), r = l(n, (e) => e.completeCaseType), i = l(n, (e) => e.activeStep), a = l(n, (e) => e.stepOrder), o = q(() => ({
1476
+ let { t: e } = X(), t = se(), n = W(p), r = l(n, (e) => e.completeCaseType), i = l(n, (e) => e.activeStep), a = l(n, (e) => e.stepOrder), o = q(() => ({
1477
1477
  [f.CREATE_CASES]: e`Submit`,
1478
1478
  [f.MAP_COLUMNS]: e`Map columns`,
1479
1479
  [f.MAP_SEQUENCES]: e`Map sequences`,
@@ -1489,7 +1489,7 @@ var Ve = ({ backLabel: e, onGoBackButtonClick: t, onProceedButtonClick: n, proce
1489
1489
  o,
1490
1490
  a
1491
1491
  ]);
1492
- return /* @__PURE__ */ $(_e, {
1492
+ return /* @__PURE__ */ $(he, {
1493
1493
  sx: {
1494
1494
  display: "grid",
1495
1495
  gridTemplateRows: "max-content auto",
@@ -1497,11 +1497,11 @@ var Ve = ({ backLabel: e, onGoBackButtonClick: t, onProceedButtonClick: n, proce
1497
1497
  position: "relative",
1498
1498
  width: "100%"
1499
1499
  },
1500
- children: [/* @__PURE__ */ Q(R, { children: /* @__PURE__ */ Q(ve, {
1500
+ children: [/* @__PURE__ */ Q(te, { children: /* @__PURE__ */ Q(ge, {
1501
1501
  activeStep: String(i),
1502
1502
  steps: c,
1503
1503
  sx: { marginY: 2 }
1504
- }) }), /* @__PURE__ */ $(_e, {
1504
+ }) }), /* @__PURE__ */ $(he, {
1505
1505
  sx: {
1506
1506
  height: `calc(100% - ${t.spacing(4)})`,
1507
1507
  marginBottom: 2,