@morscherlab/mint-sdk 1.1.0 → 1.1.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/{EmptyState-DgBRoYAy.js → EmptyState-LMPS3keb.js} +3 -193
- package/dist/EmptyState-LMPS3keb.js.map +1 -0
- package/dist/{ExperimentPopover-BFw3QX8L.js → ExperimentPopover-D6_RGzTY.js} +113 -35
- package/dist/ExperimentPopover-D6_RGzTY.js.map +1 -0
- package/dist/{ExperimentSelectorModal-BBWXC7KW.js → ExperimentSelectorModal-CDNsNudn.js} +9 -11
- package/dist/ExperimentSelectorModal-CDNsNudn.js.map +1 -0
- package/dist/{SettingsModal-Dpg-X1OM.js → SettingsModal-BGBimSIA.js} +5 -5
- package/dist/{SettingsModal-Dpg-X1OM.js.map → SettingsModal-BGBimSIA.js.map} +1 -1
- package/dist/__stories__/experiment-helpers.d.ts +3 -0
- package/dist/__tests__/stores/experiment.test.d.ts +1 -0
- package/dist/{analysisArtifactTypes-ejqR8MX3.js → analysisArtifactTypes-DQ0MjwHZ.js} +1 -1
- package/dist/{analysisArtifactTypes-ejqR8MX3.js.map → analysisArtifactTypes-DQ0MjwHZ.js.map} +1 -1
- package/dist/components/ExperimentPopover.vue.d.ts +5 -0
- package/dist/components/ExperimentSelectorModal.vue.d.ts +1 -5
- package/dist/components/PluginWorkspaceView.props.d.ts +1 -4
- package/dist/components/PluginWorkspaceView.vue.d.ts +0 -1
- package/dist/components/SmartGroupFieldRecipe.vue.d.ts +2 -2
- package/dist/components/index.js +7 -7
- package/dist/{components-Ci_BTx00.js → components-BbOyjE2T.js} +24 -29
- package/dist/components-BbOyjE2T.js.map +1 -0
- package/dist/composables/experiment-utils.d.ts +10 -0
- package/dist/composables/index.d.ts +2 -2
- package/dist/composables/index.js +11 -10
- package/dist/composables/useAppExperiment.d.ts +29 -17
- package/dist/composables/usePlatformContext.d.ts +3 -3
- package/dist/{composables-C0VEJ73O.js → composables-CW8NRXLB.js} +5 -5
- package/dist/{composables-C0VEJ73O.js.map → composables-CW8NRXLB.js.map} +1 -1
- package/dist/experiment-Y9Iz7KYi.js +95 -0
- package/dist/experiment-Y9Iz7KYi.js.map +1 -0
- package/dist/{experiment-utils-CxkruZ3G.js → experiment-utils-7Yw-h0tD.js} +16 -2
- package/dist/{experiment-utils-CxkruZ3G.js.map → experiment-utils-7Yw-h0tD.js.map} +1 -1
- package/dist/index.js +16 -15
- package/dist/index.js.map +1 -1
- package/dist/install.js +7 -7
- package/dist/{plotly.min-BR53hja4.js → plotly.min-c2Sez60c.js} +1 -1
- package/dist/{plotly.min-BR53hja4.js.map → plotly.min-c2Sez60c.js.map} +1 -1
- package/dist/stores/auth.d.ts +6 -6
- package/dist/stores/experiment.d.ts +166 -0
- package/dist/stores/index.d.ts +1 -0
- package/dist/stores/index.js +3 -2
- package/dist/styles.css +188 -0
- package/dist/templates/index.js +4 -4
- package/dist/{templates-Cdj93S9C.js → templates-CJRFiWUX.js} +2 -2
- package/dist/{templates-Cdj93S9C.js.map → templates-CJRFiWUX.js.map} +1 -1
- package/dist/types/auth.d.ts +1 -1
- package/dist/types/index.js +1 -1
- package/dist/types/platform.d.ts +1 -1
- package/dist/{auth-B87xM--s.js → useApi-CDBq6z23.js} +191 -2
- package/dist/useApi-CDBq6z23.js.map +1 -0
- package/dist/{useControlSchema-B_qgU4rW.js → useControlSchema-BEAgLyyx.js} +5 -4
- package/dist/{useControlSchema-B_qgU4rW.js.map → useControlSchema-BEAgLyyx.js.map} +1 -1
- package/dist/{useDropdownState-gVaMXtwW.js → useDropdownState-Be-ug_ci.js} +2 -2
- package/dist/{useDropdownState-gVaMXtwW.js.map → useDropdownState-Be-ug_ci.js.map} +1 -1
- package/dist/{useExperimentSelector-BuQZRgMt.js → useExperimentSelector-Dld4841S.js} +4 -3
- package/dist/{useExperimentSelector-BuQZRgMt.js.map → useExperimentSelector-Dld4841S.js.map} +1 -1
- package/dist/{useFormBuilder-D1G5J5Z5.js → useFormBuilder-CR9pBApW.js} +2 -2
- package/dist/{useFormBuilder-D1G5J5Z5.js.map → useFormBuilder-CR9pBApW.js.map} +1 -1
- package/dist/{useProtocolTemplates-DeaOmMaw.js → useProtocolTemplates-DXeIHMwV.js} +38 -42
- package/dist/useProtocolTemplates-DXeIHMwV.js.map +1 -0
- package/package.json +1 -1
- package/src/__stories__/experiment-helpers.ts +12 -9
- package/src/__tests__/components/AppTopBar.test.ts +10 -6
- package/src/__tests__/components/ExperimentPopover.test.ts +64 -0
- package/src/__tests__/components/ExperimentSelectorModal.test.ts +86 -41
- package/src/__tests__/components/PluginWorkspaceView.test.ts +103 -19
- package/src/__tests__/components/SettingsModal.test.ts +1 -1
- package/src/__tests__/composables/experiment-utils.test.ts +33 -0
- package/src/__tests__/composables/useAppExperiment.test.ts +331 -92
- package/src/__tests__/composables/useAuth.test.ts +2 -2
- package/src/__tests__/composables/usePlatformContext.test.ts +5 -1
- package/src/__tests__/stores/experiment.test.ts +300 -0
- package/src/components/AppTopBar.vue +0 -2
- package/src/components/ExperimentPopover.story.vue +59 -0
- package/src/components/ExperimentPopover.vue +96 -6
- package/src/components/ExperimentSelectorModal.story.vue +6 -16
- package/src/components/ExperimentSelectorModal.vue +8 -4
- package/src/components/PluginWorkspaceView.props.ts +1 -4
- package/src/components/PluginWorkspaceView.story.vue +12 -5
- package/src/components/PluginWorkspaceView.vue +0 -2
- package/src/composables/experiment-utils.ts +22 -0
- package/src/composables/index.ts +1 -2
- package/src/composables/useAppExperiment.ts +57 -67
- package/src/composables/useAuth.ts +1 -1
- package/src/stores/experiment.ts +120 -0
- package/src/stores/index.ts +1 -0
- package/src/styles/components/experiment-popover.css +105 -0
- package/src/types/auth.ts +1 -1
- package/src/types/platform.ts +1 -1
- package/dist/EmptyState-DgBRoYAy.js.map +0 -1
- package/dist/ExperimentPopover-BFw3QX8L.js.map +0 -1
- package/dist/ExperimentSelectorModal-BBWXC7KW.js.map +0 -1
- package/dist/auth-B87xM--s.js.map +0 -1
- package/dist/components-Ci_BTx00.js.map +0 -1
- package/dist/useProtocolTemplates-DeaOmMaw.js.map +0 -1
|
@@ -11,6 +11,16 @@ export declare const EXPERIMENT_STATUS_LABELS: Record<ExperimentStatus, string>;
|
|
|
11
11
|
export declare function formatExperimentStatus(status?: ExperimentStatus | string | null): string;
|
|
12
12
|
export declare function getExperimentStatusVariant(status?: ExperimentStatus | string | null): PillVariant;
|
|
13
13
|
export declare function resolveExperimentCode(experiment: ExperimentCodeSource): string | undefined;
|
|
14
|
+
type RouteQueryValue = string | null | undefined | readonly (string | null | undefined)[];
|
|
15
|
+
type RouteQueryLike = Record<string, RouteQueryValue>;
|
|
16
|
+
/**
|
|
17
|
+
* Reads the experiment id a deep link was opened with.
|
|
18
|
+
*
|
|
19
|
+
* Returns an id and never a label: a display name belongs to the platform, so
|
|
20
|
+
* callers must resolve it (see `useExperimentStore().selectById`) rather than
|
|
21
|
+
* derive one from the query or the id itself.
|
|
22
|
+
*/
|
|
23
|
+
export declare function experimentIdFromRoute(query: RouteQueryLike): number | null;
|
|
14
24
|
export declare const DATE_PRESET_OPTIONS: SelectOption<string>[];
|
|
15
25
|
export declare const SORT_OPTIONS: SelectOption<string>[];
|
|
16
26
|
export {};
|
|
@@ -28,12 +28,12 @@ export { useExperimentSelector, type UseExperimentSelectorOptions, type UseExper
|
|
|
28
28
|
export { useAnalysisArtifacts, ANALYSIS_FILE_ARTIFACT_SCHEMA, type UseAnalysisArtifactsOptions, type UseAnalysisArtifactsReturn, } from './useAnalysisArtifacts';
|
|
29
29
|
export { buildAnalysisArtifactTargetQuery, parseAnalysisArtifactTarget, } from './analysisArtifactTarget';
|
|
30
30
|
export { resolveCurrentPluginId } from './platformContextHelpers';
|
|
31
|
-
export { formatExperimentDate, formatExperimentStatus, getExperimentStatusVariant, resolveExperimentCode, datePresetToISO, EXPERIMENT_STATUS_OPTIONS, EXPERIMENT_STATUS_VARIANT_MAP, EXPERIMENT_STATUS_LABELS, DATE_PRESET_OPTIONS, SORT_OPTIONS, } from './experiment-utils';
|
|
31
|
+
export { formatExperimentDate, formatExperimentStatus, getExperimentStatusVariant, resolveExperimentCode, experimentIdFromRoute, datePresetToISO, EXPERIMENT_STATUS_OPTIONS, EXPERIMENT_STATUS_VARIANT_MAP, EXPERIMENT_STATUS_LABELS, DATE_PRESET_OPTIONS, SORT_OPTIONS, } from './experiment-utils';
|
|
32
32
|
export { useExperimentData, type UseExperimentDataOptions, type UseExperimentDataReturn, } from './useExperimentData';
|
|
33
33
|
export { extractSampleNamesFromDesignData, extractSampleOptionsFromDesignData, unwrapExperimentDesignData, type ExperimentDesignDataResponse, type ExtractExperimentSamplesOptions, } from './experimentDesignData';
|
|
34
34
|
export { useExperimentSamples, type ExperimentDesignDataSource, type ExperimentIdSource, type UseExperimentSamplesOptions, type UseExperimentSamplesReturn, } from './useExperimentSamples';
|
|
35
35
|
export { getFieldRegistryEntry, getTypeDefault, type RegistryEntry, } from './formBuilderRegistry';
|
|
36
|
-
export { useAppExperiment, APP_EXPERIMENT_KEY, type
|
|
36
|
+
export { useAppExperiment, APP_EXPERIMENT_KEY, type UseAppExperimentOptions, type UseAppExperimentReturn, type AppExperimentState, type AppExperimentPopoverBinding, type AppExperimentSelectorModalBinding, } from './useAppExperiment';
|
|
37
37
|
export { useExperimentSave, type UseExperimentSaveOptions, type UseExperimentSaveReturn, } from './useExperimentSave';
|
|
38
38
|
export { useTemplateCollection, type TemplateCollectionInput, type UseTemplateCollectionOptions, type UseTemplateCollectionReturn, } from './useTemplateCollection';
|
|
39
39
|
export { useRequestSyncState, type RequestSyncRunOptions, type RequestSyncSuccessKind, type UseRequestSyncStateReturn, } from './useRequestSyncState';
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { a as SORT_OPTIONS, c as
|
|
2
|
-
import {
|
|
3
|
-
import { A as useConcentrationUnits, B as useAnalysisArtifacts, C as controlsToViewIds, D as getTypeDefault, E as getFieldRegistryEntry, Et as useSelectionLimit, F as ATOMIC_WEIGHTS, G as resolveCurrentPluginId, I as useChemicalFormula, J as usePluginJobs, K as createGeneratedAnalysisTransport, N as useSequenceUtils, S as controlsToTopBarSettingsConfig, St as useTimeUtils, T as getDefaultControlView, Tt as useListSelection, _ as controlsToFormSchema, _t as isTimeInRange, a as defineDoseCalculatorControlProps, b as controlsToSettingsSchema, bt as snapToSlot, c as defineWellPlateDoseComponentBindings, ct as compareTime, d as defineControlModel, dt as findNearestTimeSlotIndex, ft as formatDuration, gt as generateTimeSlots, h as controlValuesToComponentProps, ht as fromMinutes, i as useControlSchema, l as defineWellPlateDoseControlProps, lt as durationMinutes, m as controlValuesToComponentBindingsById, mt as formatTimeSlot, n as defineControls, o as defineDoseDesignControlModel, p as controlValuesToComponentBindings, pt as formatTime, q as useGeneratedAnalysis, r as getControlDefaults, s as defineWellPlateControlProps, st as addMinutes, t as defineControlComponentBindings, u as useControlWorkspace, ut as findAvailableSlots, v as controlsToSectionFormSchema, vt as parseTime, w as controlsToViewItems, x as controlsToSidebarPanels, xt as toMinutes, y as controlsToSectionFormSchemas, yt as rangesOverlap } from "../useControlSchema-
|
|
4
|
-
import { A as extractSamplesFromDesignData, B as useJobsStatusTray, D as readFileAsText, E as parseDelimitedText, F as unwrapExperimentDesignData, G as useAppExperiment, H as DEFAULT_MOBILE_VIEWPORT_QUERY, I as DEFAULT_COLORS, J as candidateMatchesSearch, K as useTheme, L as useWellPlateEditor, N as extractSampleNamesFromDesignData, O as useFileImport, P as extractSampleOptionsFromDesignData, Q as useSortedItems, R as useDoseCalculator, T as detectDelimiter, U as useMobileSupportGate, V as usePluginJobCenter, W as APP_EXPERIMENT_KEY, X as useTextSearch, Y as normalizeSearchQuery, Z as compareSortValues, _ as useScheduleDrag, a as useReagentSeries, b as useExpansionSet, c as useBioTemplatePresetWorkspace, d as getBioTemplateComponentProps, f as toBioTemplateComponentPropsByComponent, g as useExperimentSave, h as useTemplateCollection, i as generateDilutionSeries, j as useAutoGroup, k as validateImportFile, l as useBioTemplatePackWorkspace, m as useBioTemplateControls, n as DEFAULT_PRESETS, o as useGroupAssignment, p as useBioTemplateComponents, q as useToast, r as DEFAULT_UNITS, s as useRackEditor, t as useProtocolTemplates, u as useBioTemplateWorkspace, v as useExperimentSamples, x as useSampleGroups, y as useExperimentData, z as combinePluginJobSources } from "../useProtocolTemplates-
|
|
5
|
-
import {
|
|
6
|
-
import { t as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
1
|
+
import { a as SORT_OPTIONS, c as formatExperimentDate, d as resolveExperimentCode, i as EXPERIMENT_STATUS_VARIANT_MAP, l as formatExperimentStatus, n as EXPERIMENT_STATUS_LABELS, o as datePresetToISO, p as useEventListener, r as EXPERIMENT_STATUS_OPTIONS, s as experimentIdFromRoute, t as DATE_PRESET_OPTIONS, u as getExperimentStatusVariant } from "../experiment-utils-7Yw-h0tD.js";
|
|
2
|
+
import { r as useRequestSyncState } from "../EmptyState-LMPS3keb.js";
|
|
3
|
+
import { A as useConcentrationUnits, B as useAnalysisArtifacts, C as controlsToViewIds, D as getTypeDefault, E as getFieldRegistryEntry, Et as useSelectionLimit, F as ATOMIC_WEIGHTS, G as resolveCurrentPluginId, I as useChemicalFormula, J as usePluginJobs, K as createGeneratedAnalysisTransport, N as useSequenceUtils, S as controlsToTopBarSettingsConfig, St as useTimeUtils, T as getDefaultControlView, Tt as useListSelection, _ as controlsToFormSchema, _t as isTimeInRange, a as defineDoseCalculatorControlProps, b as controlsToSettingsSchema, bt as snapToSlot, c as defineWellPlateDoseComponentBindings, ct as compareTime, d as defineControlModel, dt as findNearestTimeSlotIndex, ft as formatDuration, gt as generateTimeSlots, h as controlValuesToComponentProps, ht as fromMinutes, i as useControlSchema, l as defineWellPlateDoseControlProps, lt as durationMinutes, m as controlValuesToComponentBindingsById, mt as formatTimeSlot, n as defineControls, o as defineDoseDesignControlModel, p as controlValuesToComponentBindings, pt as formatTime, q as useGeneratedAnalysis, r as getControlDefaults, s as defineWellPlateControlProps, st as addMinutes, t as defineControlComponentBindings, u as useControlWorkspace, ut as findAvailableSlots, v as controlsToSectionFormSchema, vt as parseTime, w as controlsToViewItems, x as controlsToSidebarPanels, xt as toMinutes, y as controlsToSectionFormSchemas, yt as rangesOverlap } from "../useControlSchema-BEAgLyyx.js";
|
|
4
|
+
import { A as extractSamplesFromDesignData, B as useJobsStatusTray, D as readFileAsText, E as parseDelimitedText, F as unwrapExperimentDesignData, G as useAppExperiment, H as DEFAULT_MOBILE_VIEWPORT_QUERY, I as DEFAULT_COLORS, J as candidateMatchesSearch, K as useTheme, L as useWellPlateEditor, N as extractSampleNamesFromDesignData, O as useFileImport, P as extractSampleOptionsFromDesignData, Q as useSortedItems, R as useDoseCalculator, T as detectDelimiter, U as useMobileSupportGate, V as usePluginJobCenter, W as APP_EXPERIMENT_KEY, X as useTextSearch, Y as normalizeSearchQuery, Z as compareSortValues, _ as useScheduleDrag, a as useReagentSeries, b as useExpansionSet, c as useBioTemplatePresetWorkspace, d as getBioTemplateComponentProps, f as toBioTemplateComponentPropsByComponent, g as useExperimentSave, h as useTemplateCollection, i as generateDilutionSeries, j as useAutoGroup, k as validateImportFile, l as useBioTemplatePackWorkspace, m as useBioTemplateControls, n as DEFAULT_PRESETS, o as useGroupAssignment, p as useBioTemplateComponents, q as useToast, r as DEFAULT_UNITS, s as useRackEditor, t as useProtocolTemplates, u as useBioTemplateWorkspace, v as useExperimentSamples, x as useSampleGroups, y as useExperimentData, z as combinePluginJobSources } from "../useProtocolTemplates-DXeIHMwV.js";
|
|
5
|
+
import { r as useApi, t as AuthenticationRequiredError } from "../useApi-CDBq6z23.js";
|
|
6
|
+
import { i as usePlatformContext, n as evaluateCondition, r as useForm, t as useFormBuilder } from "../useFormBuilder-CR9pBApW.js";
|
|
7
|
+
import { t as ANALYSIS_FILE_ARTIFACT_SCHEMA } from "../analysisArtifactTypes-DQ0MjwHZ.js";
|
|
8
|
+
import { B as toBioTemplateComponentProps, H as toBioTemplateComponentPropsById, L as toBioTemplateComponentBindings, P as getBioTemplateComponentBindings, R as toBioTemplateComponentBindingsById, l as requireBioTemplateControlSchema, o as getBioTemplateControlSchema } from "../templates-CJRFiWUX.js";
|
|
9
|
+
import { n as useDebouncedWatch, t as useExperimentSelector } from "../useExperimentSelector-Dld4841S.js";
|
|
10
|
+
import { A as useAsync, C as createPluginResourceClient, D as buildAnalysisArtifactTargetQuery, E as useCommandHistory, M as resolvePluginFrontendBase, N as usePasskey, O as parseAnalysisArtifactTarget, P as useAuth, S as wellIdsInRectangle, T as useOptimisticMutation, _ as createWellPlateWells, a as pluginFormDataFromPayload, b as useWellPainting, c as usePluginClient, d as buildPluginEndpointUrl, f as resolvePluginBaseUrl, g as createRowConditions, h as createColumnConditions, i as getPluginPageSelectorItems, j as useAsyncBatch, k as usePluginConfig, l as usePluginEventStream, m as useWellPlateValidation, n as downloadBlob, o as uploadPluginEndpoint, p as runWellPlateValidation, r as downloadPluginEndpoint, s as useCurrentExperiment, t as createPluginClient, u as usePluginSettings, v as useWellPlateAdapter, w as useResourceCrud, x as wellIdToCoordinate, y as coordinateToWellId } from "../composables-CW8NRXLB.js";
|
|
11
|
+
export { ANALYSIS_FILE_ARTIFACT_SCHEMA, APP_EXPERIMENT_KEY, ATOMIC_WEIGHTS, AuthenticationRequiredError, DATE_PRESET_OPTIONS, DEFAULT_COLORS, DEFAULT_MOBILE_VIEWPORT_QUERY, DEFAULT_PRESETS, DEFAULT_UNITS, EXPERIMENT_STATUS_LABELS, EXPERIMENT_STATUS_OPTIONS, EXPERIMENT_STATUS_VARIANT_MAP, SORT_OPTIONS, addMinutes, buildAnalysisArtifactTargetQuery, buildPluginEndpointUrl, candidateMatchesSearch, combinePluginJobSources, compareSortValues, compareTime, controlValuesToComponentBindings, controlValuesToComponentBindingsById, controlValuesToComponentProps, controlsToFormSchema, controlsToSectionFormSchema, controlsToSectionFormSchemas, controlsToSettingsSchema, controlsToSidebarPanels, controlsToTopBarSettingsConfig, controlsToViewIds, controlsToViewItems, coordinateToWellId, createColumnConditions, createGeneratedAnalysisTransport, createPluginClient, createPluginResourceClient, createRowConditions, createWellPlateWells, datePresetToISO, defineControlComponentBindings, defineControlModel, defineControls, defineDoseCalculatorControlProps, defineDoseDesignControlModel, defineWellPlateControlProps, defineWellPlateDoseComponentBindings, defineWellPlateDoseControlProps, detectDelimiter, downloadBlob, downloadPluginEndpoint, durationMinutes, evaluateCondition, experimentIdFromRoute, extractSampleNamesFromDesignData, extractSampleOptionsFromDesignData, extractSamplesFromDesignData, findAvailableSlots, findNearestTimeSlotIndex, formatDuration, formatExperimentDate, formatExperimentStatus, formatTime, formatTimeSlot, fromMinutes, generateDilutionSeries, generateTimeSlots, getBioTemplateComponentBindings, getBioTemplateComponentProps, getBioTemplateControlSchema, getControlDefaults, getDefaultControlView, getExperimentStatusVariant, getFieldRegistryEntry, getPluginPageSelectorItems, getTypeDefault, isTimeInRange, normalizeSearchQuery, parseAnalysisArtifactTarget, parseDelimitedText, parseTime, pluginFormDataFromPayload, rangesOverlap, readFileAsText, requireBioTemplateControlSchema, resolveCurrentPluginId, resolveExperimentCode, resolvePluginBaseUrl, resolvePluginFrontendBase, runWellPlateValidation, snapToSlot, toBioTemplateComponentBindings, toBioTemplateComponentBindingsById, toBioTemplateComponentProps, toBioTemplateComponentPropsByComponent, toBioTemplateComponentPropsById, toMinutes, unwrapExperimentDesignData, uploadPluginEndpoint, useAnalysisArtifacts, useApi, useAppExperiment, useAsync, useAsyncBatch, useAuth, useAutoGroup, useBioTemplateComponents, useBioTemplateControls, useBioTemplatePackWorkspace, useBioTemplatePresetWorkspace, useBioTemplateWorkspace, useChemicalFormula, useCommandHistory, useConcentrationUnits, useControlSchema, useControlWorkspace, useCurrentExperiment, useDebouncedWatch, useDoseCalculator, useEventListener, useExpansionSet, useExperimentData, useExperimentSamples, useExperimentSave, useExperimentSelector, useFileImport, useForm, useFormBuilder, useGeneratedAnalysis, useGroupAssignment, useJobsStatusTray, useListSelection, useMobileSupportGate, useOptimisticMutation, usePasskey, usePlatformContext, usePluginClient, usePluginConfig, usePluginEventStream, usePluginJobCenter, usePluginJobs, usePluginSettings, useProtocolTemplates, useRackEditor, useReagentSeries, useRequestSyncState, useResourceCrud, useSampleGroups, useScheduleDrag, useSelectionLimit, useSequenceUtils, useSortedItems, useTemplateCollection, useTextSearch, useTheme, useTimeUtils, useToast, useWellPainting, useWellPlateAdapter, useWellPlateEditor, useWellPlateValidation, validateImportFile, wellIdToCoordinate, wellIdsInRectangle };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Ref, ComputedRef, InjectionKey } from 'vue';
|
|
2
2
|
import { ExperimentSummary, ExperimentStatus } from '../types';
|
|
3
|
-
export type AppExperimentRecord = Pick<ExperimentSummary, 'id' | 'name' | 'status' | 'experiment_code'>;
|
|
4
|
-
export type AppExperimentSource = AppExperimentRecord | null | undefined | Ref<AppExperimentRecord | null | undefined> | ComputedRef<AppExperimentRecord | null | undefined> | (() => AppExperimentRecord | null | undefined);
|
|
5
3
|
export interface UseAppExperimentOptions {
|
|
6
|
-
/**
|
|
7
|
-
|
|
4
|
+
/**
|
|
5
|
+
* Called when the shared store adopts an experiment — a modal selection or a
|
|
6
|
+
* resolved deep link. The record always comes from the platform.
|
|
7
|
+
*/
|
|
8
8
|
onSelect?: (experiment: ExperimentSummary) => void | Promise<void>;
|
|
9
9
|
onSave?: () => string | null | Promise<string | null>;
|
|
10
10
|
onDetach?: () => void;
|
|
@@ -15,6 +15,10 @@ export interface AppExperimentPopoverBinding {
|
|
|
15
15
|
experimentName?: string;
|
|
16
16
|
experimentCode?: string;
|
|
17
17
|
experimentStatus?: ExperimentStatus;
|
|
18
|
+
/** An experiment is bound but its record has not arrived yet. */
|
|
19
|
+
isResolving: boolean;
|
|
20
|
+
/** Resolution failed; the binding is kept so the user can retry or detach. */
|
|
21
|
+
error?: string;
|
|
18
22
|
showSave: boolean;
|
|
19
23
|
showDetach: boolean;
|
|
20
24
|
saveDisabled: boolean;
|
|
@@ -27,25 +31,26 @@ export interface AppExperimentSelectorModalBinding {
|
|
|
27
31
|
currentExperimentId: number | null;
|
|
28
32
|
}
|
|
29
33
|
export interface UseAppExperimentReturn {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
experimentName: ComputedRef<string | undefined>;
|
|
35
|
+
experimentCode: ComputedRef<string | undefined>;
|
|
36
|
+
experimentStatus: ComputedRef<ExperimentStatus | undefined>;
|
|
37
|
+
experimentId: ComputedRef<number | null>;
|
|
38
|
+
isResolving: ComputedRef<boolean>;
|
|
39
|
+
error: ComputedRef<string | null>;
|
|
36
40
|
popover: ComputedRef<AppExperimentPopoverBinding>;
|
|
37
41
|
selectorModal: ComputedRef<AppExperimentSelectorModalBinding>;
|
|
38
42
|
openModal: () => void;
|
|
39
43
|
closeModal: () => void;
|
|
40
|
-
handleSelect: (experiment: ExperimentSummary) => void;
|
|
41
44
|
handleSave: () => Promise<void>;
|
|
42
45
|
handleDetach: () => void;
|
|
43
46
|
}
|
|
44
47
|
export interface AppExperimentState {
|
|
45
|
-
experimentName:
|
|
46
|
-
experimentCode:
|
|
47
|
-
experimentStatus:
|
|
48
|
-
experimentId:
|
|
48
|
+
experimentName: ComputedRef<string | undefined>;
|
|
49
|
+
experimentCode: ComputedRef<string | undefined>;
|
|
50
|
+
experimentStatus: ComputedRef<ExperimentStatus | undefined>;
|
|
51
|
+
experimentId: ComputedRef<number | null>;
|
|
52
|
+
isResolving: ComputedRef<boolean>;
|
|
53
|
+
error: ComputedRef<string | null>;
|
|
49
54
|
showModal: Ref<boolean>;
|
|
50
55
|
saveLoading: Ref<boolean>;
|
|
51
56
|
saveSuccessMessage: Ref<string | undefined>;
|
|
@@ -57,10 +62,17 @@ export interface AppExperimentState {
|
|
|
57
62
|
popover: ComputedRef<AppExperimentPopoverBinding>;
|
|
58
63
|
selectorModal: ComputedRef<AppExperimentSelectorModalBinding>;
|
|
59
64
|
openModal: () => void;
|
|
60
|
-
handleSelect: (experiment: ExperimentSummary) => void;
|
|
61
65
|
handleSave: () => Promise<void>;
|
|
62
66
|
handleDetach: () => void;
|
|
63
67
|
}
|
|
64
68
|
export declare const APP_EXPERIMENT_KEY: InjectionKey<AppExperimentState>;
|
|
65
|
-
/**
|
|
69
|
+
/**
|
|
70
|
+
* Projects the current experiment from the shared store into an AppTopBar app
|
|
71
|
+
* shell, and owns the shell-local concerns the store has no opinion on: the
|
|
72
|
+
* selector modal's open state and the save flow.
|
|
73
|
+
*
|
|
74
|
+
* The composable never writes a selection of its own. `ExperimentSelectorModal`
|
|
75
|
+
* commits to the store and this reads back, so a displayed name can only ever
|
|
76
|
+
* have come from the platform.
|
|
77
|
+
*/
|
|
66
78
|
export declare function useAppExperiment(options?: UseAppExperimentOptions): UseAppExperimentReturn;
|
|
@@ -54,7 +54,7 @@ export declare function usePlatformContext(options?: PlatformContextOptions): {
|
|
|
54
54
|
platformApiUrl?: string | undefined;
|
|
55
55
|
platformOrigin?: string | undefined;
|
|
56
56
|
user?: {
|
|
57
|
-
id:
|
|
57
|
+
id: number;
|
|
58
58
|
username: string;
|
|
59
59
|
role: string;
|
|
60
60
|
role_obj?: {
|
|
@@ -114,7 +114,7 @@ export declare function usePlatformContext(options?: PlatformContextOptions): {
|
|
|
114
114
|
platformApiUrl?: string | undefined;
|
|
115
115
|
platformOrigin?: string | undefined;
|
|
116
116
|
user?: {
|
|
117
|
-
id:
|
|
117
|
+
id: number;
|
|
118
118
|
username: string;
|
|
119
119
|
role: string;
|
|
120
120
|
role_obj?: {
|
|
@@ -172,7 +172,7 @@ export declare function usePlatformContext(options?: PlatformContextOptions): {
|
|
|
172
172
|
settings?: import('..').PluginSettings | undefined;
|
|
173
173
|
} | undefined>;
|
|
174
174
|
user: import('vue').ComputedRef<{
|
|
175
|
-
id:
|
|
175
|
+
id: number;
|
|
176
176
|
username: string;
|
|
177
177
|
role: string;
|
|
178
178
|
role_obj?: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { H as getInjectedPlatformContext, V as currentExperimentFromContext, W as resolveCurrentExperimentId } from "./useControlSchema-
|
|
3
|
-
import {
|
|
4
|
-
import { i as usePlatformContext } from "./useFormBuilder-
|
|
1
|
+
import { r as useRequestSyncState } from "./EmptyState-LMPS3keb.js";
|
|
2
|
+
import { H as getInjectedPlatformContext, V as currentExperimentFromContext, W as resolveCurrentExperimentId } from "./useControlSchema-BEAgLyyx.js";
|
|
3
|
+
import { i as useAuthStore, n as authenticationRequiredError, o as useSettingsStore, r as useApi, t as AuthenticationRequiredError } from "./useApi-CDBq6z23.js";
|
|
4
|
+
import { i as usePlatformContext } from "./useFormBuilder-CR9pBApW.js";
|
|
5
5
|
import { computed, getCurrentInstance, onMounted, onUnmounted, ref, shallowRef, toValue, watch } from "vue";
|
|
6
6
|
import axios from "axios";
|
|
7
7
|
//#region src/composables/useAuth.ts
|
|
@@ -2041,4 +2041,4 @@ function useCurrentExperiment(options = {}) {
|
|
|
2041
2041
|
//#endregion
|
|
2042
2042
|
export { useAsync as A, createPluginResourceClient as C, buildAnalysisArtifactTargetQuery as D, useCommandHistory as E, resolvePluginFrontendBase as M, usePasskey as N, parseAnalysisArtifactTarget as O, useAuth as P, wellIdsInRectangle as S, useOptimisticMutation as T, createWellPlateWells as _, pluginFormDataFromPayload as a, useWellPainting as b, usePluginClient as c, buildPluginEndpointUrl as d, resolvePluginBaseUrl as f, createRowConditions as g, createColumnConditions as h, getPluginPageSelectorItems as i, useAsyncBatch as j, usePluginConfig as k, usePluginEventStream as l, useWellPlateValidation as m, downloadBlob as n, uploadPluginEndpoint as o, runWellPlateValidation as p, downloadPluginEndpoint as r, useCurrentExperiment as s, createPluginClient as t, usePluginSettings as u, useWellPlateAdapter as v, useResourceCrud as w, wellIdToCoordinate as x, coordinateToWellId as y };
|
|
2043
2043
|
|
|
2044
|
-
//# sourceMappingURL=composables-
|
|
2044
|
+
//# sourceMappingURL=composables-CW8NRXLB.js.map
|