@morscherlab/mint-sdk 1.1.0-beta.2 → 1.1.0-beta.20
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/README.md +18 -4
- package/dist/{EmptyState-D1c4RdC7.js → EmptyState-DgBRoYAy.js} +22 -13
- package/dist/EmptyState-DgBRoYAy.js.map +1 -0
- package/dist/{ExperimentSelectorModal-B7w6k3Y8.js → ExperimentSelectorModal-BBWXC7KW.js} +3 -3
- package/dist/{ExperimentSelectorModal-B7w6k3Y8.js.map → ExperimentSelectorModal-BBWXC7KW.js.map} +1 -1
- package/dist/{SettingsModal-DPDwCbXK.js → SettingsModal-Dpg-X1OM.js} +3 -3
- package/dist/{SettingsModal-DPDwCbXK.js.map → SettingsModal-Dpg-X1OM.js.map} +1 -1
- package/dist/__tests__/components/BaseToggle.test.d.ts +1 -0
- package/dist/__tests__/components/SectionCard.test.d.ts +1 -0
- package/dist/__tests__/composables/analysisArtifactTarget.test.d.ts +1 -0
- package/dist/__tests__/types/GeneratedJsonSchema.test.d.ts +1 -0
- package/dist/analysisArtifactTypes-ejqR8MX3.js.map +1 -1
- package/dist/components/BaseSelect.vue.d.ts +1 -1
- package/dist/components/BaseToggle.vue.d.ts +2 -0
- package/dist/components/FitPanel.vue.d.ts +1 -1
- package/dist/components/PluginWorkspaceView.props.d.ts +1 -1
- package/dist/components/SectionCard.vue.d.ts +47 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +6 -6
- package/dist/{components-UfkPN1bK.js → components-Ci_BTx00.js} +711 -633
- package/dist/components-Ci_BTx00.js.map +1 -0
- package/dist/composables/analysisArtifactTarget.d.ts +5 -0
- package/dist/composables/index.d.ts +3 -1
- package/dist/composables/index.js +8 -8
- package/dist/composables/platformContextHelpers.d.ts +2 -0
- package/dist/composables/useAnalysisArtifacts.d.ts +3 -1
- package/dist/composables/useGeneratedAnalysis.d.ts +1 -1
- package/dist/composables/usePluginClient.d.ts +11 -5
- package/dist/{composables-B512bWJP.js → composables-C0VEJ73O.js} +40 -5
- package/dist/composables-C0VEJ73O.js.map +1 -0
- package/dist/index.js +11 -11
- package/dist/install.js +5 -5
- package/dist/styles.css +314 -17
- package/dist/tailwind.preset.d.ts +5 -0
- package/dist/tailwind.preset.js +7 -2
- package/dist/tailwind.preset.js.map +1 -1
- package/dist/templates/index.js +3 -3
- package/dist/{templates-Cttbjbyc.js → templates-Cdj93S9C.js} +2 -2
- package/dist/{templates-Cttbjbyc.js.map → templates-Cdj93S9C.js.map} +1 -1
- package/dist/types/analysisArtifactTypes.d.ts +8 -0
- package/dist/types/components.d.ts +2 -0
- package/dist/types/generated-ui.d.ts +13 -0
- package/dist/types/index.d.ts +2 -2
- package/dist/{useControlSchema-Dallso-L.js → useControlSchema-B_qgU4rW.js} +48 -19
- package/dist/useControlSchema-B_qgU4rW.js.map +1 -0
- package/dist/{useExperimentSelector-BMjzNcf2.js → useExperimentSelector-BuQZRgMt.js} +2 -2
- package/dist/{useExperimentSelector-BMjzNcf2.js.map → useExperimentSelector-BuQZRgMt.js.map} +1 -1
- package/dist/{useFormBuilder-BXaaDI41.js → useFormBuilder-D1G5J5Z5.js} +2 -2
- package/dist/{useFormBuilder-BXaaDI41.js.map → useFormBuilder-D1G5J5Z5.js.map} +1 -1
- package/dist/{useProtocolTemplates-BP7_4RGQ.js → useProtocolTemplates-DeaOmMaw.js} +4 -4
- package/dist/{useProtocolTemplates-BP7_4RGQ.js.map → useProtocolTemplates-DeaOmMaw.js.map} +1 -1
- package/package.json +1 -1
- package/src/__tests__/components/BaseSelect.test.ts +52 -0
- package/src/__tests__/components/BaseToggle.test.ts +40 -0
- package/src/__tests__/components/GeneratedPluginView.test.ts +10 -0
- package/src/__tests__/components/PluginWorkspaceView.test.ts +68 -14
- package/src/__tests__/components/SectionCard.test.ts +181 -0
- package/src/__tests__/composables/analysisArtifactTarget.test.ts +77 -0
- package/src/__tests__/composables/useAnalysisArtifacts.test.ts +74 -1
- package/src/__tests__/composables/useGeneratedAnalysis.test.ts +2 -0
- package/src/__tests__/composables/usePluginClient.test.ts +36 -1
- package/src/__tests__/types/GeneratedJsonSchema.test.ts +62 -0
- package/src/components/BaseSelect.vue +16 -2
- package/src/components/BaseToggle.vue +3 -1
- package/src/components/GeneratedPluginView.vue +1 -1
- package/src/components/PluginWorkspaceView.props.ts +1 -1
- package/src/components/PluginWorkspaceView.vue +1 -5
- package/src/components/SectionCard.story.vue +163 -0
- package/src/components/SectionCard.vue +98 -0
- package/src/components/index.ts +1 -0
- package/src/composables/analysisArtifactTarget.ts +53 -0
- package/src/composables/index.ts +6 -0
- package/src/composables/platformContextHelpers.ts +10 -3
- package/src/composables/useAnalysisArtifacts.ts +48 -0
- package/src/composables/useGeneratedAnalysis.ts +30 -12
- package/src/composables/usePluginClient.ts +12 -5
- package/src/styles/components/button.css +1 -3
- package/src/styles/components/section-card.css +161 -0
- package/src/styles/index.css +1 -0
- package/src/styles/variables.css +25 -0
- package/src/tailwind.preset.ts +5 -0
- package/src/types/analysisArtifactTypes.ts +9 -0
- package/src/types/components.ts +12 -0
- package/src/types/generated-ui.ts +13 -0
- package/src/types/index.ts +3 -0
- package/dist/EmptyState-D1c4RdC7.js.map +0 -1
- package/dist/components-UfkPN1bK.js.map +0 -1
- package/dist/composables-B512bWJP.js.map +0 -1
- package/dist/useControlSchema-Dallso-L.js.map +0 -1
|
@@ -31,6 +31,14 @@ export interface AnalysisArtifactDetail extends AnalysisArtifactSummary {
|
|
|
31
31
|
export interface AnalysisArtifactListResponse {
|
|
32
32
|
artifacts: AnalysisArtifactSummary[];
|
|
33
33
|
}
|
|
34
|
+
/** Stable identity used when one plugin opens another plugin's artifact. */
|
|
35
|
+
export interface AnalysisArtifactTarget {
|
|
36
|
+
experimentId: number;
|
|
37
|
+
artifactPluginId: string;
|
|
38
|
+
artifactKey: string;
|
|
39
|
+
/** Optional lookup hint. The stable identity remains the three fields above. */
|
|
40
|
+
artifactId?: number;
|
|
41
|
+
}
|
|
34
42
|
/** Body of PATCH /experiments/{id}/analysis-artifacts/{artifactId}. */
|
|
35
43
|
export interface AnalysisArtifactMetadataUpdate {
|
|
36
44
|
display_name?: string;
|
|
@@ -41,6 +41,8 @@ export interface FormFieldProps {
|
|
|
41
41
|
hint?: string;
|
|
42
42
|
required?: boolean;
|
|
43
43
|
}
|
|
44
|
+
export type SectionCardAccent = 'primary' | 'experiment' | 'project' | 'success' | 'error' | 'warning' | 'info';
|
|
45
|
+
export type SectionCardDivider = 'strong' | 'light';
|
|
44
46
|
export type SidebarBadgeTone = 'primary' | 'cta' | 'success' | 'warning' | 'error' | 'info' | 'neutral';
|
|
45
47
|
export interface SidebarToolSectionAction {
|
|
46
48
|
id: string;
|
|
@@ -9,14 +9,25 @@ export interface GeneratedJsonSchema {
|
|
|
9
9
|
enum?: unknown[];
|
|
10
10
|
minimum?: number;
|
|
11
11
|
maximum?: number;
|
|
12
|
+
exclusiveMinimum?: number;
|
|
12
13
|
minLength?: number;
|
|
13
14
|
maxLength?: number;
|
|
15
|
+
pattern?: string;
|
|
16
|
+
minItems?: number;
|
|
17
|
+
maxItems?: number;
|
|
18
|
+
writeOnly?: boolean;
|
|
14
19
|
properties?: Record<string, GeneratedJsonSchema>;
|
|
15
20
|
additionalProperties?: boolean | GeneratedJsonSchema;
|
|
16
21
|
required?: string[];
|
|
17
22
|
anyOf?: GeneratedJsonSchema[];
|
|
18
23
|
allOf?: GeneratedJsonSchema[];
|
|
24
|
+
oneOf?: GeneratedJsonSchema[];
|
|
25
|
+
prefixItems?: GeneratedJsonSchema[];
|
|
19
26
|
items?: GeneratedJsonSchema;
|
|
27
|
+
discriminator?: {
|
|
28
|
+
propertyName: string;
|
|
29
|
+
mapping?: Record<string, string>;
|
|
30
|
+
};
|
|
20
31
|
$ref?: string;
|
|
21
32
|
$defs?: Record<string, GeneratedJsonSchema>;
|
|
22
33
|
'x-mint-component'?: 'path';
|
|
@@ -89,6 +100,8 @@ export interface GeneratedJobDefinition {
|
|
|
89
100
|
title: string;
|
|
90
101
|
description: string;
|
|
91
102
|
cpu: number;
|
|
103
|
+
/** Whether integrated submission requires a platform or current-plugin administrator. */
|
|
104
|
+
requires_admin?: boolean;
|
|
92
105
|
/** Defaults to process for manifests generated before lifecycle profiles. */
|
|
93
106
|
lifecycle?: GeneratedJobLifecycle;
|
|
94
107
|
/** Defaults to `{ kind: 'process' }` for older manifests. */
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export type { ContainerDirection, ButtonVariant, ButtonSize, InputType, ModalSize, ModalVariant, AlertType, Toast, TabItem, TabItemInput, OptionPrimitive, SelectOption, SelectOptionInput, RadioOption, RadioOptionInput, FormFieldProps, SidebarBadgeTone, SidebarToolSection, SidebarToolSectionAction, CollapsibleState, TopBarVariant, TopBarSettingsConfig, PillNavOption, PillNavOptionInput, PillNavItem, PillNavItemInput, PageSelectorItem, PageSelectorItemInput, PluginSwitcherPlugin, PluginSwitcherInfo, AccountMenuItem, WellPlateFormat, WellState, WellPlateSelectionMode, WellPlateSize, WellShape, Well, HeatmapColorScale, HeatmapConfig, SlotPosition, WellExtendedData, WellEditData, WellEditField, WellSampleDropData, WellSampleDropContext, WellSampleDropParser, WellLegendItem, PlateCondition, ColumnCondition, RowCondition, Rack, RackSampleDropContext, RackSampleDropMapper, SampleType, PlateMap, PlateMapEditorState, ProtocolStepType, ProtocolStepStatus, ProtocolStep, SampleGroup, GroupItem, FileUploaderMode, SegmentedOption, SegmentedOptionInput, SegmentedControlVariant, SegmentedControlSize, MultiSelectOption, MultiSelectOptionInput, MultiSelectSize, PillVariant, PillColor, PillSize, CalendarSelectionMode, CalendarMarker, CalendarDayContext, SortDirection, SortState, DataFrameColumn, PaginationState, SpinnerSize, SpinnerVariant, DividerSpacing, StatusType, ProgressVariant, ProgressSize, AvatarSize, EmptyStateColor, EmptyStateSize, BreadcrumbItem, BreadcrumbItemInput, TooltipPosition, ConfirmVariant, SettingsTab, SettingsTabInput, SettingsModalLayout, SettingsGroup, SettingsModalSchema, SettingsUserType, SettingsAudience, SettingsAudienceInput, NumberNotation, UnitOption, WizardStep, WizardStepState, AuditEntryType, AuditEntry, BatchItemStatus, BatchItem, BatchSummary, TimePickerFormat, TimeRange, ScheduleView, ScheduleEventStatus, ScheduleEvent, ScheduleBlockedSlot, ScheduleSlotContext, ScheduleEventCreateContext, ScheduleEventUpdateContext, SummarySectionItem, SummarySection, SummaryData, ResourceStatus, ResourceSpec, MoleculeData, ExperimentStatus, DatePreset, ExperimentSortField, ExperimentTypeOption, ExperimentSummary, ExperimentListResponse, ExperimentFilters, FitState, FitResultSummary, StorageCondition, ReagentColumn, Reagent, TreeNodeType, BadgeVariant, TreeNode, } from './components';
|
|
1
|
+
export type { ContainerDirection, ButtonVariant, ButtonSize, InputType, ModalSize, ModalVariant, AlertType, Toast, TabItem, TabItemInput, OptionPrimitive, SelectOption, SelectOptionInput, RadioOption, RadioOptionInput, FormFieldProps, SectionCardAccent, SectionCardDivider, SidebarBadgeTone, SidebarToolSection, SidebarToolSectionAction, CollapsibleState, TopBarVariant, TopBarSettingsConfig, PillNavOption, PillNavOptionInput, PillNavItem, PillNavItemInput, PageSelectorItem, PageSelectorItemInput, PluginSwitcherPlugin, PluginSwitcherInfo, AccountMenuItem, WellPlateFormat, WellState, WellPlateSelectionMode, WellPlateSize, WellShape, Well, HeatmapColorScale, HeatmapConfig, SlotPosition, WellExtendedData, WellEditData, WellEditField, WellSampleDropData, WellSampleDropContext, WellSampleDropParser, WellLegendItem, PlateCondition, ColumnCondition, RowCondition, Rack, RackSampleDropContext, RackSampleDropMapper, SampleType, PlateMap, PlateMapEditorState, ProtocolStepType, ProtocolStepStatus, ProtocolStep, SampleGroup, GroupItem, FileUploaderMode, SegmentedOption, SegmentedOptionInput, SegmentedControlVariant, SegmentedControlSize, MultiSelectOption, MultiSelectOptionInput, MultiSelectSize, PillVariant, PillColor, PillSize, CalendarSelectionMode, CalendarMarker, CalendarDayContext, SortDirection, SortState, DataFrameColumn, PaginationState, SpinnerSize, SpinnerVariant, DividerSpacing, StatusType, ProgressVariant, ProgressSize, AvatarSize, EmptyStateColor, EmptyStateSize, BreadcrumbItem, BreadcrumbItemInput, TooltipPosition, ConfirmVariant, SettingsTab, SettingsTabInput, SettingsModalLayout, SettingsGroup, SettingsModalSchema, SettingsUserType, SettingsAudience, SettingsAudienceInput, NumberNotation, UnitOption, WizardStep, WizardStepState, AuditEntryType, AuditEntry, BatchItemStatus, BatchItem, BatchSummary, TimePickerFormat, TimeRange, ScheduleView, ScheduleEventStatus, ScheduleEvent, ScheduleBlockedSlot, ScheduleSlotContext, ScheduleEventCreateContext, ScheduleEventUpdateContext, SummarySectionItem, SummarySection, SummaryData, ResourceStatus, ResourceSpec, MoleculeData, ExperimentStatus, DatePreset, ExperimentSortField, ExperimentTypeOption, ExperimentSummary, ExperimentListResponse, ExperimentFilters, FitState, FitResultSummary, StorageCondition, ReagentColumn, Reagent, TreeNodeType, BadgeVariant, TreeNode, } from './components';
|
|
2
2
|
export type * from './generated-ui';
|
|
3
|
-
export type { AnalysisArtifactStatus, AnalysisArtifactStatusFilter, AnalysisArtifactSummary, AnalysisArtifactDetail, AnalysisArtifactListResponse, AnalysisArtifactMetadataUpdate, ArtifactSaveMode, ArtifactFileSource, JsonArtifactSavePayload, FileArtifactCreatePayload, FileArtifactUpdatePayload, HandlerFileArtifactCreatePayload, HandlerFileArtifactUpdatePayload, ArtifactSavePayload, HandlerArtifactSavePayload, ArtifactSaveDialogPayload, ArtifactSaveResult, ArtifactSaveHandler, HandlerArtifactSaveHandler, ArtifactSaveDialogHandler, } from './analysisArtifactTypes';
|
|
3
|
+
export type { AnalysisArtifactStatus, AnalysisArtifactStatusFilter, AnalysisArtifactSummary, AnalysisArtifactDetail, AnalysisArtifactListResponse, AnalysisArtifactTarget, AnalysisArtifactMetadataUpdate, ArtifactSaveMode, ArtifactFileSource, JsonArtifactSavePayload, FileArtifactCreatePayload, FileArtifactUpdatePayload, HandlerFileArtifactCreatePayload, HandlerFileArtifactUpdatePayload, ArtifactSavePayload, HandlerArtifactSavePayload, ArtifactSaveDialogPayload, ArtifactSaveResult, ArtifactSaveHandler, HandlerArtifactSaveHandler, ArtifactSaveDialogHandler, } from './analysisArtifactTypes';
|
|
4
4
|
export { ANALYSIS_FILE_ARTIFACT_SCHEMA } from './analysisArtifactTypes';
|
|
5
5
|
export type { JobListPayload, JobProgress, JobSnapshotPayload, JobState, JobStateInput, JobStatus, JobStreamData, } from './jobs';
|
|
6
6
|
export type { InstrumentAlert, InstrumentAlertBody, InstrumentAlertLevel, InstrumentState, InstrumentStatus, SampleInfo, SampleInfo as InstrumentSampleInfo, SequenceProgress, } from './instrument';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { d as BaseModal_default, f as useEventListener, p as BaseButton_default, s as formatExperimentDate } from "./experiment-utils-CxkruZ3G.js";
|
|
2
|
-
import { c as BaseSelect_default, l as normalizeOptionInput, n as Skeleton_default, o as useApi, r as useRequestSyncState, s as BasePill_default, t as EmptyState_default, u as BaseInput_default } from "./EmptyState-
|
|
2
|
+
import { c as BaseSelect_default, l as normalizeOptionInput, n as Skeleton_default, o as useApi, r as useRequestSyncState, s as BasePill_default, t as EmptyState_default, u as BaseInput_default } from "./EmptyState-DgBRoYAy.js";
|
|
3
3
|
import { t as useDropdownState } from "./useDropdownState-gVaMXtwW.js";
|
|
4
4
|
import { hasAllPermissions } from "./permissions.js";
|
|
5
5
|
import { Fragment, Teleport, Transition, TransitionGroup, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createStaticVNode, createTextVNode, createVNode, defineComponent, isRef, nextTick, normalizeClass, normalizeStyle, onBeforeUnmount, onMounted, onScopeDispose, onUnmounted, openBlock, reactive, ref, renderList, renderSlot, shallowRef, toDisplayString, toValue, unref, useSlots, vModelText, watch, withCtx, withDirectives, withKeys, withModifiers } from "vue";
|
|
@@ -1335,6 +1335,7 @@ var BaseToggle_default = /* @__PURE__ */ defineComponent({
|
|
|
1335
1335
|
default: false
|
|
1336
1336
|
},
|
|
1337
1337
|
label: {},
|
|
1338
|
+
ariaLabel: {},
|
|
1338
1339
|
description: {},
|
|
1339
1340
|
icon: {},
|
|
1340
1341
|
iconColor: {},
|
|
@@ -1416,7 +1417,7 @@ var BaseToggle_default = /* @__PURE__ */ defineComponent({
|
|
|
1416
1417
|
role: "switch",
|
|
1417
1418
|
tabindex: __props.disabled ? -1 : 0,
|
|
1418
1419
|
"aria-checked": __props.modelValue,
|
|
1419
|
-
"aria-label": __props.label || "Toggle",
|
|
1420
|
+
"aria-label": __props.ariaLabel || __props.label || "Toggle",
|
|
1420
1421
|
class: normalizeClass([
|
|
1421
1422
|
"mint-toggle__track",
|
|
1422
1423
|
`mint-toggle__track--${__props.size}`,
|
|
@@ -4005,11 +4006,11 @@ function createPluginJobs(options, manifestPath) {
|
|
|
4005
4006
|
try {
|
|
4006
4007
|
let jobInput;
|
|
4007
4008
|
try {
|
|
4008
|
-
jobInput = await submitToSession(session.value.id, clientRequestId, await stagePathInputs(inputs, session.value.id));
|
|
4009
|
+
jobInput = await submitToSession(session.value.id, clientRequestId, await stagePathInputs(inputs, session.value.id, definitionId));
|
|
4009
4010
|
} catch (cause) {
|
|
4010
4011
|
if (!isSessionNotFoundError(cause)) throw cause;
|
|
4011
4012
|
session.value = await resolveSession();
|
|
4012
|
-
jobInput = await submitToSession(session.value.id, clientRequestId, await stagePathInputs(inputs, session.value.id));
|
|
4013
|
+
jobInput = await submitToSession(session.value.id, clientRequestId, await stagePathInputs(inputs, session.value.id, definitionId));
|
|
4013
4014
|
}
|
|
4014
4015
|
const job = upsertJob(jobInput, definitionId);
|
|
4015
4016
|
if (!streamConnected) schedulePoll();
|
|
@@ -4032,9 +4033,9 @@ function createPluginJobs(options, manifestPath) {
|
|
|
4032
4033
|
});
|
|
4033
4034
|
}
|
|
4034
4035
|
}
|
|
4035
|
-
async function uploadPath(input) {
|
|
4036
|
+
async function uploadPath(input, definitionId) {
|
|
4036
4037
|
if (!session.value) throw new Error("Generated analysis session is not initialized");
|
|
4037
|
-
return uploadPathForSession(input, session.value.id);
|
|
4038
|
+
return uploadPathForSession(input, session.value.id, definitionId);
|
|
4038
4039
|
}
|
|
4039
4040
|
async function uploadStagedPart(input) {
|
|
4040
4041
|
const jobId = jobIdFromReference(input.job);
|
|
@@ -4066,7 +4067,7 @@ function createPluginJobs(options, manifestPath) {
|
|
|
4066
4067
|
finishJobOperation(jobId);
|
|
4067
4068
|
}
|
|
4068
4069
|
}
|
|
4069
|
-
async function uploadPathForSession(input, sessionId) {
|
|
4070
|
+
async function uploadPathForSession(input, sessionId, definitionId) {
|
|
4070
4071
|
if (!input.files.length || input.files.length !== input.relativePaths.length) throw new Error("Path upload requires one relative path for each file");
|
|
4071
4072
|
const body = new FormData();
|
|
4072
4073
|
body.append("session_id", sessionId);
|
|
@@ -4075,26 +4076,28 @@ function createPluginJobs(options, manifestPath) {
|
|
|
4075
4076
|
body.append("files", input.files[index]);
|
|
4076
4077
|
body.append("relative_paths", input.relativePaths[index]);
|
|
4077
4078
|
}
|
|
4079
|
+
const headers = { "X-Mint-Job-Session": sessionId };
|
|
4080
|
+
if (definitionId) headers["X-Mint-Job-Definition"] = definitionId;
|
|
4078
4081
|
return request("/jobs/uploads", {
|
|
4079
4082
|
method: "POST",
|
|
4080
4083
|
body,
|
|
4081
4084
|
signal: input.signal,
|
|
4082
|
-
headers
|
|
4085
|
+
headers
|
|
4083
4086
|
});
|
|
4084
4087
|
}
|
|
4085
|
-
async function stagePathInputs(inputs, sessionId) {
|
|
4086
|
-
return await stagePathValue(inputs, sessionId);
|
|
4088
|
+
async function stagePathInputs(inputs, sessionId, definitionId) {
|
|
4089
|
+
return await stagePathValue(inputs, sessionId, definitionId);
|
|
4087
4090
|
}
|
|
4088
|
-
async function stagePathValue(value, sessionId) {
|
|
4091
|
+
async function stagePathValue(value, sessionId, definitionId) {
|
|
4089
4092
|
if (typeof File !== "undefined" && value instanceof File) return { token: (await uploadPathForSession({
|
|
4090
4093
|
kind: "path",
|
|
4091
4094
|
files: [value],
|
|
4092
4095
|
relativePaths: [value.name]
|
|
4093
|
-
}, sessionId)).token };
|
|
4094
|
-
if (isPluginJobPathInput(value)) return { token: (await uploadPathForSession(value, sessionId)).token };
|
|
4095
|
-
if (Array.isArray(value)) return await Promise.all(value.map((item) => stagePathValue(item, sessionId)));
|
|
4096
|
+
}, sessionId, definitionId)).token };
|
|
4097
|
+
if (isPluginJobPathInput(value)) return { token: (await uploadPathForSession(value, sessionId, definitionId)).token };
|
|
4098
|
+
if (Array.isArray(value)) return await Promise.all(value.map((item) => stagePathValue(item, sessionId, definitionId)));
|
|
4096
4099
|
if (value && typeof value === "object") {
|
|
4097
|
-
const entries = await Promise.all(Object.entries(value).map(async ([key, child]) => [key, await stagePathValue(child, sessionId)]));
|
|
4100
|
+
const entries = await Promise.all(Object.entries(value).map(async ([key, child]) => [key, await stagePathValue(child, sessionId, definitionId)]));
|
|
4098
4101
|
return Object.fromEntries(entries);
|
|
4099
4102
|
}
|
|
4100
4103
|
return value;
|
|
@@ -4699,6 +4702,11 @@ function getInjectedPlatformContext() {
|
|
|
4699
4702
|
if (typeof window === "undefined") return void 0;
|
|
4700
4703
|
return window.__MINT_PLATFORM__;
|
|
4701
4704
|
}
|
|
4705
|
+
/** Return the platform's canonical plugin identity for the mounted frontend. */
|
|
4706
|
+
function resolveCurrentPluginId() {
|
|
4707
|
+
const pluginId = getInjectedPlatformContext()?.plugin?.id;
|
|
4708
|
+
return typeof pluginId === "string" && pluginId ? pluginId : void 0;
|
|
4709
|
+
}
|
|
4702
4710
|
function getInjectedExperimentContext() {
|
|
4703
4711
|
return getInjectedPlatformContext();
|
|
4704
4712
|
}
|
|
@@ -4711,8 +4719,9 @@ function currentExperimentIdFromContext(context = getInjectedExperimentContext()
|
|
|
4711
4719
|
}
|
|
4712
4720
|
function currentExperimentIdFromUrl() {
|
|
4713
4721
|
if (typeof window === "undefined") return void 0;
|
|
4714
|
-
const
|
|
4715
|
-
|
|
4722
|
+
const location = window.location;
|
|
4723
|
+
const params = new URLSearchParams(location?.search ?? "");
|
|
4724
|
+
return parseExperimentId(params.get("experimentId") ?? params.get("experiment_id")) ?? experimentIdFromPath(location?.pathname ?? "") ?? experimentIdFromPath((location?.hash ?? "").replace(/^#\/?/, "/"));
|
|
4716
4725
|
}
|
|
4717
4726
|
function resolveCurrentExperimentId(context = getInjectedExperimentContext()) {
|
|
4718
4727
|
return currentExperimentIdFromContext(context) ?? currentExperimentIdFromUrl();
|
|
@@ -4822,6 +4831,25 @@ function useAnalysisArtifacts(options = {}) {
|
|
|
4822
4831
|
loadingCount.value -= 1;
|
|
4823
4832
|
}
|
|
4824
4833
|
}
|
|
4834
|
+
async function resolveTarget(target) {
|
|
4835
|
+
const experimentId = currentExperimentId.value;
|
|
4836
|
+
if (experimentId !== target.experimentId) {
|
|
4837
|
+
request.setError(`Analysis artifact target belongs to experiment ${target.experimentId}, not ${experimentId ?? "the current selection"}.`);
|
|
4838
|
+
return null;
|
|
4839
|
+
}
|
|
4840
|
+
const summary = (await list()).find((artifact) => artifact.plugin_id === target.artifactPluginId && artifact.artifact_key === target.artifactKey && artifact.status === "active");
|
|
4841
|
+
if (!summary) {
|
|
4842
|
+
request.setError(`Analysis artifact ${target.artifactPluginId}/${target.artifactKey} is not available.`);
|
|
4843
|
+
return null;
|
|
4844
|
+
}
|
|
4845
|
+
const detail = await getDetail(summary.id);
|
|
4846
|
+
if (detail && (detail.experiment_id !== target.experimentId || detail.plugin_id !== target.artifactPluginId || detail.artifact_key !== target.artifactKey)) {
|
|
4847
|
+
selectedDetail.value = null;
|
|
4848
|
+
request.setError(`Analysis artifact ${target.artifactPluginId}/${target.artifactKey} did not match the requested identity.`);
|
|
4849
|
+
return null;
|
|
4850
|
+
}
|
|
4851
|
+
return detail;
|
|
4852
|
+
}
|
|
4825
4853
|
async function mutate(action, operation) {
|
|
4826
4854
|
const experimentId = currentExperimentIdOrError(action);
|
|
4827
4855
|
if (experimentId === void 0) return null;
|
|
@@ -4880,6 +4908,7 @@ function useAnalysisArtifacts(options = {}) {
|
|
|
4880
4908
|
list,
|
|
4881
4909
|
refresh: list,
|
|
4882
4910
|
getDetail,
|
|
4911
|
+
resolveTarget,
|
|
4883
4912
|
updateMetadata,
|
|
4884
4913
|
archive,
|
|
4885
4914
|
restore,
|
|
@@ -7632,6 +7661,6 @@ function useControlSchema(controls, options = {}) {
|
|
|
7632
7661
|
};
|
|
7633
7662
|
}
|
|
7634
7663
|
//#endregion
|
|
7635
|
-
export {
|
|
7664
|
+
export { normalizeJobState as $, useConcentrationUnits as A, BaseCheckbox_default as At, useAnalysisArtifacts as B, controlsToViewIds as C, DatePicker_default as Ct, getTypeDefault as D, BaseSlider_default as Dt, getFieldRegistryEntry as E, useSelectionLimit as Et, ATOMIC_WEIGHTS as F, resolveCurrentPluginId as G, getInjectedPlatformContext as H, useChemicalFormula as I, usePluginJobs as J, createGeneratedAnalysisTransport as K, GeneratedPathInput_default as L, SequenceInput_default as M, BaseTextarea_default as Mt, useSequenceUtils as N, ConcentrationInput_default as O, BaseRadioGroup_default as Ot, FormulaInput_default as P, normalizeJobPercent as Q, _plugin_vue_export_helper_default as R, controlsToTopBarSettingsConfig as S, useTimeUtils as St, getDefaultControlView as T, useListSelection as Tt, parseExperimentId as U, currentExperimentFromContext as V, resolveCurrentExperimentId as W, isTerminalJobStatus as X, isActiveJobStatus as Y, jobStatusLabel as Z, controlsToFormSchema as _, isTimeInRange as _t, defineDoseCalculatorControlProps as a, TagsInput_default as at, controlsToSettingsSchema as b, snapToSlot as bt, defineWellPlateDoseComponentBindings as c, compareTime as ct, defineControlModel as d, findNearestTimeSlotIndex as dt, resolveJobCapabilities as et, resolveControlModel as f, formatDuration as ft, mergeControlWorkspaceOptions as g, generateTimeSlots as gt, controlValuesToComponentProps as h, fromMinutes as ht, useControlSchema as i, NumberInput_default as it, MoleculeInput_default as j, Tooltip_default as jt, UnitInput_default as k, BaseToggle_default as kt, defineWellPlateDoseControlProps as l, durationMinutes as lt, controlValuesToComponentBindingsById as m, formatTimeSlot as mt, defineControls as n, AlertBox_default as nt, defineDoseDesignControlModel as o, TimePicker_default as ot, controlValuesToComponentBindings as p, formatTime as pt, useGeneratedAnalysis as q, getControlDefaults as r, FileUploader_default as rt, defineWellPlateControlProps as s, addMinutes as st, defineControlComponentBindings as t, DateTimePicker_default as tt, useControlWorkspace as u, findAvailableSlots as ut, controlsToSectionFormSchema as v, parseTime as vt, controlsToViewItems as w, MultiSelect_default as wt, controlsToSidebarPanels as x, toMinutes as xt, controlsToSectionFormSchemas as y, rangesOverlap as yt, ArtifactSelectorModal_default as z };
|
|
7636
7665
|
|
|
7637
|
-
//# sourceMappingURL=useControlSchema-
|
|
7666
|
+
//# sourceMappingURL=useControlSchema-B_qgU4rW.js.map
|