@morscherlab/mint-sdk 1.2.0 → 1.2.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/{ExperimentSelectorModal-DCXmwKNS.js → ExperimentSelectorModal-DHE9k8TP.js} +3 -3
- package/dist/{ExperimentSelectorModal-DCXmwKNS.js.map → ExperimentSelectorModal-DHE9k8TP.js.map} +1 -1
- package/dist/{SettingsModal-BYR20I4c.js → SettingsModal-DOcCf0Vo.js} +39 -16
- package/dist/SettingsModal-DOcCf0Vo.js.map +1 -0
- package/dist/{Skeleton-BAF3CKY7.js → Skeleton-jhF9wUkU.js} +17 -7
- package/dist/Skeleton-jhF9wUkU.js.map +1 -0
- package/dist/__tests__/components/FormField.test.d.ts +1 -0
- package/dist/__tests__/components/NumberInput.test.d.ts +1 -0
- package/dist/__tests__/composables/localFiles.test.d.ts +1 -0
- package/dist/__tests__/composables/usePickerSelection.test.d.ts +1 -0
- package/dist/__tests__/styles/tokenOnlyColors.test.d.ts +1 -0
- package/dist/components/AppSidebar.vue.d.ts +7 -7
- package/dist/components/BasePill.vue.d.ts +3 -0
- package/dist/components/BaseTabs.vue.d.ts +1 -4
- package/dist/components/FileUploader.vue.d.ts +3 -0
- package/dist/components/FormField.vue.d.ts +8 -1
- package/dist/components/PluginWorkspaceView.props.d.ts +3 -3
- package/dist/components/index.js +5 -5
- package/dist/{components-DIum5hkx.js → components-Cp8DcNrU.js} +472 -259
- package/dist/components-Cp8DcNrU.js.map +1 -0
- package/dist/composables/index.js +7 -7
- package/dist/composables/pluginWorkspaceModel.d.ts +0 -3
- package/dist/composables/useToast.d.ts +22 -1
- package/dist/{composables-mFXsTA4g.js → composables-D_4qqOlp.js} +6 -6
- package/dist/{composables-mFXsTA4g.js.map → composables-D_4qqOlp.js.map} +1 -1
- package/dist/index.js +10 -10
- package/dist/install.js +2 -2
- package/dist/styles.css +560 -303
- package/dist/templates/index.js +2 -2
- package/dist/{templates-CmGfmBRA.js → templates-Dd9bBSs6.js} +2 -2
- package/dist/{templates-CmGfmBRA.js.map → templates-Dd9bBSs6.js.map} +1 -1
- package/dist/types/components.d.ts +21 -0
- package/dist/types/form-builder.d.ts +2 -0
- package/dist/types/generated-ui.d.ts +2 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/{useControlSchema-DldpxNOP.js → useControlSchema-BB2GRPhW.js} +151 -71
- package/dist/useControlSchema-BB2GRPhW.js.map +1 -0
- package/dist/{useExperimentSelector-CEcIaueJ.js → useExperimentSelector-G_CAOFTX.js} +2 -2
- package/dist/{useExperimentSelector-CEcIaueJ.js.map → useExperimentSelector-G_CAOFTX.js.map} +1 -1
- package/dist/{useFormBuilder-z5L_dUIy.js → useFormBuilder-BnGSdSRG.js} +2 -2
- package/dist/{useFormBuilder-z5L_dUIy.js.map → useFormBuilder-BnGSdSRG.js.map} +1 -1
- package/dist/{validation-uwoJGEb6.js → validation-CTxuzLIX.js} +21 -9
- package/dist/validation-CTxuzLIX.js.map +1 -0
- package/package.json +1 -1
- package/src/__tests__/components/AppSidebar.test.ts +84 -94
- package/src/__tests__/components/AppToastContainer.test.ts +55 -1
- package/src/__tests__/components/BioTemplatePresetWorkspaceView.test.ts +0 -21
- package/src/__tests__/components/ControlWorkspaceView.test.ts +0 -2
- package/src/__tests__/components/DoseDesignWorkspaceView.test.ts +0 -2
- package/src/__tests__/components/FormBuilder.test.ts +26 -0
- package/src/__tests__/components/FormField.test.ts +26 -0
- package/src/__tests__/components/GeneratedPathInput.test.ts +18 -0
- package/src/__tests__/components/NumberInput.test.ts +105 -0
- package/src/__tests__/components/PluginWorkspaceView.internal.test.ts +1 -2
- package/src/__tests__/components/PluginWorkspaceView.test.ts +1 -2
- package/src/__tests__/composables/localFiles.test.ts +57 -0
- package/src/__tests__/composables/usePickerSelection.test.ts +98 -0
- package/src/__tests__/generatedUi.test.ts +111 -0
- package/src/__tests__/styles/tokenOnlyColors.test.ts +16 -0
- package/src/components/AppLayout.story.vue +1 -1
- package/src/components/AppSidebar.story.vue +7 -10
- package/src/components/AppSidebar.vue +178 -58
- package/src/components/AppToastContainer.vue +65 -23
- package/src/components/BasePill.story.vue +2 -0
- package/src/components/BasePill.vue +4 -0
- package/src/components/BaseTabs.story.vue +0 -42
- package/src/components/BaseTabs.vue +3 -6
- package/src/components/FileUploader.vue +10 -1
- package/src/components/FormField.vue +10 -3
- package/src/components/GeneratedPathInput.vue +11 -7
- package/src/components/NumberInput.story.vue +32 -13
- package/src/components/NumberInput.vue +116 -55
- package/src/components/PluginWorkspaceView.props.ts +3 -3
- package/src/components/internal/FormFieldRendererInternal.vue +17 -0
- package/src/components/internal/WorkspaceSidebarInternal.vue +1 -2
- package/src/composables/filePicker/localFiles.ts +21 -14
- package/src/composables/filePicker/usePickerSelection.ts +15 -4
- package/src/composables/pluginWorkspaceModel.ts +0 -3
- package/src/composables/usePluginWorkspace.ts +1 -2
- package/src/composables/useToast.ts +21 -5
- package/src/generated/schema.ts +58 -18
- package/src/styles/components/app-sidebar.css +282 -121
- package/src/styles/components/form-builder.css +1 -1
- package/src/styles/components/form-field.css +28 -0
- package/src/styles/components/number-input.css +73 -91
- package/src/styles/components/pill.css +49 -51
- package/src/styles/components/segmented-control.css +16 -11
- package/src/styles/components/tabs.css +18 -34
- package/src/styles/components/toast.css +136 -27
- package/src/styles/variables.css +25 -5
- package/src/types/components.ts +23 -0
- package/src/types/form-builder.ts +2 -0
- package/src/types/generated-ui.ts +2 -0
- package/src/types/index.ts +2 -0
- package/dist/SettingsModal-BYR20I4c.js.map +0 -1
- package/dist/Skeleton-BAF3CKY7.js.map +0 -1
- package/dist/components-DIum5hkx.js.map +0 -1
- package/dist/useControlSchema-DldpxNOP.js.map +0 -1
- package/dist/validation-uwoJGEb6.js.map +0 -1
|
@@ -36,12 +36,33 @@ export interface ModalTab {
|
|
|
36
36
|
disabled?: boolean;
|
|
37
37
|
}
|
|
38
38
|
export type AlertType = 'success' | 'error' | 'warning' | 'info';
|
|
39
|
+
export interface ToastAction {
|
|
40
|
+
label: string;
|
|
41
|
+
onClick: () => void;
|
|
42
|
+
primary?: boolean;
|
|
43
|
+
}
|
|
39
44
|
export interface Toast {
|
|
40
45
|
id: number;
|
|
46
|
+
/** Legacy single-line body; kept as an alias of `title`. */
|
|
41
47
|
message: string;
|
|
42
48
|
type: 'success' | 'error' | 'warning' | 'info';
|
|
43
49
|
duration?: number;
|
|
50
|
+
title?: string;
|
|
51
|
+
detail?: string;
|
|
52
|
+
/** At most two; extra entries are dropped. */
|
|
53
|
+
actions?: ToastAction[];
|
|
54
|
+
/** Render the close button (default true). */
|
|
55
|
+
dismissible?: boolean;
|
|
56
|
+
/** `ttl` (default) shrinks over `duration`; `indeterminate` never auto-dismisses; `none` hides the bar. */
|
|
57
|
+
progress?: 'ttl' | 'indeterminate' | 'none';
|
|
58
|
+
/** Collapsed-stack count; renders the `×N` pill when above 1. */
|
|
59
|
+
count?: number;
|
|
44
60
|
}
|
|
61
|
+
export type ToastOptions = Omit<Toast, 'id' | 'message' | 'type'> & {
|
|
62
|
+
title: string;
|
|
63
|
+
type?: Toast['type'];
|
|
64
|
+
message?: string;
|
|
65
|
+
};
|
|
45
66
|
export interface TabItem {
|
|
46
67
|
id: string;
|
|
47
68
|
label: string;
|
|
@@ -87,6 +87,8 @@ export interface FormFieldSchema extends AccessControlled {
|
|
|
87
87
|
colSpan?: number;
|
|
88
88
|
/** Extra props passed directly to the underlying component. */
|
|
89
89
|
props?: Record<string, unknown>;
|
|
90
|
+
/** Element type for `tags` fields; `number` parses each entered tag back to a number. */
|
|
91
|
+
itemType?: 'string' | 'number';
|
|
90
92
|
}
|
|
91
93
|
export type FormOptionInput = SelectOption<unknown> | OptionPrimitive;
|
|
92
94
|
export interface FormSectionSchema {
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type { ContainerDirection, ButtonVariant, ButtonSize, ActionMenuItem, InputType, ModalSize, ModalVariant, ModalLayout, ModalTab, 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';
|
|
1
|
+
export type { ContainerDirection, ButtonVariant, ButtonSize, ActionMenuItem, InputType, ModalSize, ModalVariant, ModalLayout, ModalTab, AlertType, Toast, ToastAction, ToastOptions, 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
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';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { f as MintApiError, i as useApi, p as mintApiErrorFromResponse, u as tryUseSettingsStore } from "./errors-BLuqMee5.js";
|
|
2
2
|
import { c as formatExperimentDate, f as BaseModal_default, h as BaseButton_default, m as useEventListener, p as useFocusTrap } from "./experiment-utils-CV2Wza3z.js";
|
|
3
|
-
import { a as BaseSelect_default, i as BasePill_default, n as useRequestSyncState, o as normalizeOptionInput, r as EmptyState_default, s as BaseInput_default, t as Skeleton_default } from "./Skeleton-
|
|
3
|
+
import { a as BaseSelect_default, i as BasePill_default, n as useRequestSyncState, o as normalizeOptionInput, r as EmptyState_default, s as BaseInput_default, t as Skeleton_default } from "./Skeleton-jhF9wUkU.js";
|
|
4
4
|
import { t as useDropdownState } from "./useDropdownState-C7hRiVQf.js";
|
|
5
5
|
import { hasAllPermissions } from "./permissions.js";
|
|
6
6
|
import { Fragment, Teleport, Transition, TransitionGroup, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createStaticVNode, createTextVNode, createVNode, defineComponent, getCurrentInstance, getCurrentScope, isRef, nextTick, normalizeClass, normalizeStyle, onBeforeUnmount, onMounted, onScopeDispose, onUnmounted, openBlock, reactive, ref, renderList, renderSlot, shallowRef, toDisplayString, toValue, unref, useId, useSlots, vModelText, watch, withCtx, withDirectives, withKeys, withModifiers } from "vue";
|
|
@@ -2155,6 +2155,14 @@ var SecretInput_default = /* @__PURE__ */ defineComponent({
|
|
|
2155
2155
|
//#region src/components/NumberInput.vue?vue&type=script&setup=true&lang.ts
|
|
2156
2156
|
var _hoisted_1$10 = { class: "mint-number-input__field" };
|
|
2157
2157
|
var _hoisted_2$9 = [
|
|
2158
|
+
"role",
|
|
2159
|
+
"tabindex",
|
|
2160
|
+
"aria-valuenow",
|
|
2161
|
+
"aria-valuemin",
|
|
2162
|
+
"aria-valuemax",
|
|
2163
|
+
"aria-orientation"
|
|
2164
|
+
];
|
|
2165
|
+
var _hoisted_3$8 = [
|
|
2158
2166
|
"value",
|
|
2159
2167
|
"min",
|
|
2160
2168
|
"max",
|
|
@@ -2162,23 +2170,16 @@ var _hoisted_2$9 = [
|
|
|
2162
2170
|
"disabled",
|
|
2163
2171
|
"placeholder"
|
|
2164
2172
|
];
|
|
2165
|
-
var
|
|
2166
|
-
key:
|
|
2173
|
+
var _hoisted_4$8 = {
|
|
2174
|
+
key: 1,
|
|
2167
2175
|
class: "mint-number-input__unit"
|
|
2168
2176
|
};
|
|
2169
|
-
var
|
|
2177
|
+
var _hoisted_5$7 = {
|
|
2170
2178
|
class: "mint-number-input__steppers",
|
|
2171
2179
|
"aria-hidden": "true"
|
|
2172
2180
|
};
|
|
2173
|
-
var _hoisted_5$7 = ["disabled"];
|
|
2174
2181
|
var _hoisted_6$7 = ["disabled"];
|
|
2175
|
-
var _hoisted_7$7 = [
|
|
2176
|
-
"value",
|
|
2177
|
-
"min",
|
|
2178
|
-
"max",
|
|
2179
|
-
"step",
|
|
2180
|
-
"disabled"
|
|
2181
|
-
];
|
|
2182
|
+
var _hoisted_7$7 = ["disabled"];
|
|
2182
2183
|
//#endregion
|
|
2183
2184
|
//#region src/components/NumberInput.vue
|
|
2184
2185
|
var NumberInput_default = /* @__PURE__ */ defineComponent({
|
|
@@ -2202,7 +2203,7 @@ var NumberInput_default = /* @__PURE__ */ defineComponent({
|
|
|
2202
2203
|
},
|
|
2203
2204
|
emits: ["update:modelValue"],
|
|
2204
2205
|
setup(__props, { emit: __emit }) {
|
|
2205
|
-
/** Numeric input with
|
|
2206
|
+
/** Numeric input with always-visible steppers, optional unit label, and (with min+max) an in-field drag-to-scrub range fill. */
|
|
2206
2207
|
const props = __props;
|
|
2207
2208
|
const emit = __emit;
|
|
2208
2209
|
const isSliderMode = computed(() => props.min !== void 0 && props.max !== void 0);
|
|
@@ -2212,7 +2213,7 @@ var NumberInput_default = /* @__PURE__ */ defineComponent({
|
|
|
2212
2213
|
if (min === void 0 || max === void 0 || props.modelValue === void 0) return 0;
|
|
2213
2214
|
const range = max - min;
|
|
2214
2215
|
if (range === 0) return 0;
|
|
2215
|
-
return (props.modelValue - min) / range * 100;
|
|
2216
|
+
return Math.min(100, Math.max(0, (props.modelValue - min) / range * 100));
|
|
2216
2217
|
});
|
|
2217
2218
|
const canDecrement = computed(() => {
|
|
2218
2219
|
if (props.modelValue === void 0) return true;
|
|
@@ -2230,24 +2231,82 @@ var NumberInput_default = /* @__PURE__ */ defineComponent({
|
|
|
2230
2231
|
if (props.max !== void 0 && result > props.max) result = props.max;
|
|
2231
2232
|
return result;
|
|
2232
2233
|
}
|
|
2234
|
+
/** Clamp and trim float noise (0.1 + 0.2 → 0.3) without losing real precision. */
|
|
2235
|
+
function settle(value) {
|
|
2236
|
+
return Number(clamp(value).toFixed(10));
|
|
2237
|
+
}
|
|
2238
|
+
/** Snap to the step grid anchored at `min`, for pointer scrubbing. */
|
|
2239
|
+
function snap(value) {
|
|
2240
|
+
const origin = props.min ?? 0;
|
|
2241
|
+
return settle(origin + Math.round((value - origin) / props.step) * props.step);
|
|
2242
|
+
}
|
|
2233
2243
|
function handleInput(event) {
|
|
2234
2244
|
const target = event.target;
|
|
2235
2245
|
const value = target.value === "" ? void 0 : Number(target.value);
|
|
2236
2246
|
if (value !== void 0 && !isNaN(value)) emit("update:modelValue", clamp(value));
|
|
2237
2247
|
else emit("update:modelValue", void 0);
|
|
2238
2248
|
}
|
|
2239
|
-
function
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
if (!
|
|
2249
|
+
function nudge(delta) {
|
|
2250
|
+
if (props.disabled) return;
|
|
2251
|
+
if (delta < 0 && !canDecrement.value) return;
|
|
2252
|
+
if (delta > 0 && !canIncrement.value) return;
|
|
2253
|
+
emit("update:modelValue", settle((props.modelValue ?? (delta < 0 ? props.max ?? 0 : props.min ?? 0)) + delta));
|
|
2243
2254
|
}
|
|
2244
2255
|
function decrement() {
|
|
2245
|
-
|
|
2246
|
-
emit("update:modelValue", clamp((props.modelValue ?? props.max ?? 0) - props.step));
|
|
2256
|
+
nudge(-props.step);
|
|
2247
2257
|
}
|
|
2248
2258
|
function increment() {
|
|
2249
|
-
|
|
2250
|
-
|
|
2259
|
+
nudge(props.step);
|
|
2260
|
+
}
|
|
2261
|
+
function handleKeydown(event, allowJump = false) {
|
|
2262
|
+
if (props.disabled) return;
|
|
2263
|
+
switch (event.key) {
|
|
2264
|
+
case "ArrowUp":
|
|
2265
|
+
increment();
|
|
2266
|
+
break;
|
|
2267
|
+
case "ArrowDown":
|
|
2268
|
+
decrement();
|
|
2269
|
+
break;
|
|
2270
|
+
case "PageUp":
|
|
2271
|
+
nudge(props.step * 10);
|
|
2272
|
+
break;
|
|
2273
|
+
case "PageDown":
|
|
2274
|
+
nudge(-props.step * 10);
|
|
2275
|
+
break;
|
|
2276
|
+
case "Home":
|
|
2277
|
+
if (!allowJump || props.min === void 0) return;
|
|
2278
|
+
emit("update:modelValue", props.min);
|
|
2279
|
+
break;
|
|
2280
|
+
case "End":
|
|
2281
|
+
if (!allowJump || props.max === void 0) return;
|
|
2282
|
+
emit("update:modelValue", props.max);
|
|
2283
|
+
break;
|
|
2284
|
+
default: return;
|
|
2285
|
+
}
|
|
2286
|
+
event.preventDefault();
|
|
2287
|
+
}
|
|
2288
|
+
function scrubTo(clientX, area) {
|
|
2289
|
+
const rect = area.getBoundingClientRect();
|
|
2290
|
+
if (rect.width === 0 || props.min === void 0 || props.max === void 0) return;
|
|
2291
|
+
const ratio = Math.min(1, Math.max(0, (clientX - rect.left) / rect.width));
|
|
2292
|
+
emit("update:modelValue", snap(props.min + ratio * (props.max - props.min)));
|
|
2293
|
+
}
|
|
2294
|
+
function handleScrubStart(event) {
|
|
2295
|
+
if (props.disabled || !isSliderMode.value) return;
|
|
2296
|
+
if (event.target.tagName === "INPUT") return;
|
|
2297
|
+
const area = event.currentTarget;
|
|
2298
|
+
event.preventDefault();
|
|
2299
|
+
area.setPointerCapture?.(event.pointerId);
|
|
2300
|
+
scrubTo(event.clientX, area);
|
|
2301
|
+
const move = (e) => scrubTo(e.clientX, area);
|
|
2302
|
+
const stop = () => {
|
|
2303
|
+
area.removeEventListener("pointermove", move);
|
|
2304
|
+
area.removeEventListener("pointerup", stop);
|
|
2305
|
+
area.removeEventListener("pointercancel", stop);
|
|
2306
|
+
};
|
|
2307
|
+
area.addEventListener("pointermove", move);
|
|
2308
|
+
area.addEventListener("pointerup", stop);
|
|
2309
|
+
area.addEventListener("pointercancel", stop);
|
|
2251
2310
|
}
|
|
2252
2311
|
return (_ctx, _cache) => {
|
|
2253
2312
|
return openBlock(), createElementBlock("div", { class: normalizeClass([
|
|
@@ -2256,7 +2315,25 @@ var NumberInput_default = /* @__PURE__ */ defineComponent({
|
|
|
2256
2315
|
isSliderMode.value ? "mint-number-input--slider" : "mint-number-input--stepper",
|
|
2257
2316
|
__props.error ? "mint-number-input--error" : "",
|
|
2258
2317
|
__props.disabled ? "mint-number-input--disabled" : ""
|
|
2259
|
-
]) }, [createElementVNode("div", _hoisted_1$10, [
|
|
2318
|
+
]) }, [createElementVNode("div", _hoisted_1$10, [createElementVNode("div", {
|
|
2319
|
+
class: "mint-number-input__scrub",
|
|
2320
|
+
style: normalizeStyle(isSliderMode.value ? { "--mint-number-input-fill": `${sliderPercent.value}%` } : void 0),
|
|
2321
|
+
role: isSliderMode.value ? "slider" : void 0,
|
|
2322
|
+
tabindex: isSliderMode.value && !__props.disabled ? 0 : void 0,
|
|
2323
|
+
"aria-valuenow": isSliderMode.value ? __props.modelValue : void 0,
|
|
2324
|
+
"aria-valuemin": isSliderMode.value ? __props.min : void 0,
|
|
2325
|
+
"aria-valuemax": isSliderMode.value ? __props.max : void 0,
|
|
2326
|
+
"aria-orientation": isSliderMode.value ? "horizontal" : void 0,
|
|
2327
|
+
onPointerdown: handleScrubStart,
|
|
2328
|
+
onKeydown: _cache[0] || (_cache[0] = withModifiers(($event) => isSliderMode.value && handleKeydown($event, true), ["self"]))
|
|
2329
|
+
}, [
|
|
2330
|
+
isSliderMode.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [_cache[1] || (_cache[1] = createElementVNode("span", {
|
|
2331
|
+
class: "mint-number-input__wash",
|
|
2332
|
+
"aria-hidden": "true"
|
|
2333
|
+
}, null, -1)), _cache[2] || (_cache[2] = createElementVNode("span", {
|
|
2334
|
+
class: "mint-number-input__rule",
|
|
2335
|
+
"aria-hidden": "true"
|
|
2336
|
+
}, null, -1))], 64)) : createCommentVNode("", true),
|
|
2260
2337
|
createElementVNode("input", {
|
|
2261
2338
|
type: "number",
|
|
2262
2339
|
value: __props.modelValue,
|
|
@@ -2266,50 +2343,37 @@ var NumberInput_default = /* @__PURE__ */ defineComponent({
|
|
|
2266
2343
|
disabled: __props.disabled,
|
|
2267
2344
|
placeholder: __props.placeholder,
|
|
2268
2345
|
class: normalizeClass(["mint-number-input__input", `mint-number-input__input--${__props.size}`]),
|
|
2269
|
-
onInput: handleInput
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
}, [createElementVNode("path", { d: "M1 1l4 4 4-4" })], -1)])], 8, _hoisted_6$7)])
|
|
2301
|
-
]), isSliderMode.value ? (openBlock(), createElementBlock("input", {
|
|
2302
|
-
key: 0,
|
|
2303
|
-
type: "range",
|
|
2304
|
-
value: __props.modelValue ?? __props.min,
|
|
2305
|
-
min: __props.min,
|
|
2306
|
-
max: __props.max,
|
|
2307
|
-
step: __props.step,
|
|
2308
|
-
disabled: __props.disabled,
|
|
2309
|
-
style: normalizeStyle({ "--mint-slider-fill": `${sliderPercent.value}%` }),
|
|
2310
|
-
class: "mint-number-input__slider",
|
|
2311
|
-
onInput: handleSliderInput
|
|
2312
|
-
}, null, 44, _hoisted_7$7)) : createCommentVNode("", true)], 2);
|
|
2346
|
+
onInput: handleInput,
|
|
2347
|
+
onKeydown: handleKeydown
|
|
2348
|
+
}, null, 42, _hoisted_3$8),
|
|
2349
|
+
__props.unit ? (openBlock(), createElementBlock("span", _hoisted_4$8, toDisplayString(__props.unit), 1)) : createCommentVNode("", true)
|
|
2350
|
+
], 44, _hoisted_2$9), createElementVNode("div", _hoisted_5$7, [createElementVNode("button", {
|
|
2351
|
+
type: "button",
|
|
2352
|
+
tabindex: "-1",
|
|
2353
|
+
"aria-label": "Decrease value",
|
|
2354
|
+
disabled: __props.disabled || !canDecrement.value,
|
|
2355
|
+
class: "mint-number-input__stepper mint-number-input__stepper--down",
|
|
2356
|
+
onClick: decrement
|
|
2357
|
+
}, [..._cache[3] || (_cache[3] = [createElementVNode("svg", {
|
|
2358
|
+
viewBox: "0 0 10 10",
|
|
2359
|
+
fill: "none",
|
|
2360
|
+
stroke: "currentColor",
|
|
2361
|
+
"stroke-width": "1.6",
|
|
2362
|
+
"stroke-linecap": "round"
|
|
2363
|
+
}, [createElementVNode("path", { d: "M2 5h6" })], -1)])], 8, _hoisted_6$7), createElementVNode("button", {
|
|
2364
|
+
type: "button",
|
|
2365
|
+
tabindex: "-1",
|
|
2366
|
+
"aria-label": "Increase value",
|
|
2367
|
+
disabled: __props.disabled || !canIncrement.value,
|
|
2368
|
+
class: "mint-number-input__stepper mint-number-input__stepper--up",
|
|
2369
|
+
onClick: increment
|
|
2370
|
+
}, [..._cache[4] || (_cache[4] = [createElementVNode("svg", {
|
|
2371
|
+
viewBox: "0 0 10 10",
|
|
2372
|
+
fill: "none",
|
|
2373
|
+
stroke: "currentColor",
|
|
2374
|
+
"stroke-width": "1.6",
|
|
2375
|
+
"stroke-linecap": "round"
|
|
2376
|
+
}, [createElementVNode("path", { d: "M5 2v6" }), createElementVNode("path", { d: "M2 5h6" })], -1)])], 8, _hoisted_7$7)])])], 2);
|
|
2313
2377
|
};
|
|
2314
2378
|
}
|
|
2315
2379
|
});
|
|
@@ -2386,7 +2450,9 @@ var FileUploader_default = /* @__PURE__ */ defineComponent({
|
|
|
2386
2450
|
showFiles: {
|
|
2387
2451
|
type: Boolean,
|
|
2388
2452
|
default: true
|
|
2389
|
-
}
|
|
2453
|
+
},
|
|
2454
|
+
files: {},
|
|
2455
|
+
rootName: {}
|
|
2390
2456
|
},
|
|
2391
2457
|
emits: [
|
|
2392
2458
|
"upload",
|
|
@@ -2401,6 +2467,11 @@ var FileUploader_default = /* @__PURE__ */ defineComponent({
|
|
|
2401
2467
|
const inputRef = ref();
|
|
2402
2468
|
const selectedFiles = ref([]);
|
|
2403
2469
|
const folderName = ref(null);
|
|
2470
|
+
watch(() => [props.files, props.rootName], ([files, rootName]) => {
|
|
2471
|
+
if (files === void 0) return;
|
|
2472
|
+
selectedFiles.value = [...files];
|
|
2473
|
+
folderName.value = rootName ?? extractFolderName(files);
|
|
2474
|
+
}, { immediate: true });
|
|
2404
2475
|
const isFolder = computed(() => props.mode === "folder");
|
|
2405
2476
|
const isMixed = computed(() => props.mode === "file+folder");
|
|
2406
2477
|
const acceptLabel = computed(() => {
|
|
@@ -4722,6 +4793,11 @@ var GeneratedPathInput_default = /* @__PURE__ */ _plugin_vue_export_helper_defau
|
|
|
4722
4793
|
const props = __props;
|
|
4723
4794
|
const emit = __emit;
|
|
4724
4795
|
const mode = ref("file");
|
|
4796
|
+
const selections = computed(() => Array.isArray(props.modelValue) ? props.modelValue : props.modelValue ? [props.modelValue] : []);
|
|
4797
|
+
const selectedFiles = computed(() => selections.value.flatMap((selection) => selection.files));
|
|
4798
|
+
watch(selections, (current) => {
|
|
4799
|
+
if (current.length) mode.value = current.every((selection) => selection.rootName) ? "folder" : "file";
|
|
4800
|
+
}, { immediate: true });
|
|
4725
4801
|
const artifactOpen = ref(false);
|
|
4726
4802
|
const artifactLoading = ref(false);
|
|
4727
4803
|
const artifactError = ref("");
|
|
@@ -4750,7 +4826,7 @@ var GeneratedPathInput_default = /* @__PURE__ */ _plugin_vue_export_helper_defau
|
|
|
4750
4826
|
}
|
|
4751
4827
|
function removeFiles(files) {
|
|
4752
4828
|
const removed = new Set(files);
|
|
4753
|
-
const remaining =
|
|
4829
|
+
const remaining = selections.value.flatMap((selection) => {
|
|
4754
4830
|
const indexes = selection.files.map((file, index) => removed.has(file) ? -1 : index).filter((index) => index >= 0);
|
|
4755
4831
|
if (!indexes.length) return [];
|
|
4756
4832
|
return [{
|
|
@@ -4831,12 +4907,16 @@ var GeneratedPathInput_default = /* @__PURE__ */ _plugin_vue_export_helper_defau
|
|
|
4831
4907
|
(openBlock(), createBlock(FileUploader_default, {
|
|
4832
4908
|
key: mode.value,
|
|
4833
4909
|
mode: mode.value,
|
|
4910
|
+
files: selectedFiles.value,
|
|
4911
|
+
"root-name": selections.value[0]?.rootName,
|
|
4834
4912
|
multiple: __props.multiple && mode.value === "file",
|
|
4835
4913
|
disabled: __props.disabled,
|
|
4836
4914
|
onUpload: selectFiles,
|
|
4837
4915
|
onRemove: removeFiles
|
|
4838
4916
|
}, null, 8, [
|
|
4839
4917
|
"mode",
|
|
4918
|
+
"files",
|
|
4919
|
+
"root-name",
|
|
4840
4920
|
"multiple",
|
|
4841
4921
|
"disabled"
|
|
4842
4922
|
])),
|
|
@@ -4857,7 +4937,7 @@ var GeneratedPathInput_default = /* @__PURE__ */ _plugin_vue_export_helper_defau
|
|
|
4857
4937
|
]);
|
|
4858
4938
|
};
|
|
4859
4939
|
}
|
|
4860
|
-
}), [["__scopeId", "data-v-
|
|
4940
|
+
}), [["__scopeId", "data-v-9147bd02"]]);
|
|
4861
4941
|
//#endregion
|
|
4862
4942
|
//#region src/composables/useChemicalFormula.ts
|
|
4863
4943
|
var ATOMIC_WEIGHTS = {
|
|
@@ -7188,4 +7268,4 @@ function useControlSchema(controls, options = {}) {
|
|
|
7188
7268
|
//#endregion
|
|
7189
7269
|
export { resolveJobCapabilities as $, useConcentrationUnits as A, formatTimeSlot as At, currentExperimentFromContext as B, MultiSelect_default as Bt, controlsToViewIds as C, addMinutes as Ct, getTypeDefault as D, findNearestTimeSlotIndex as Dt, getFieldRegistryEntry as E, findAvailableSlots as Et, ATOMIC_WEIGHTS as F, rangesOverlap as Ft, createGeneratedAnalysisTransport as G, BaseToggle_default as Gt, parseExperimentId as H, useSelectionLimit as Ht, useChemicalFormula as I, snapToSlot as It, isActiveJobStatus as J, BaseTextarea_default as Jt, useGeneratedAnalysis as K, BaseCheckbox_default as Kt, GeneratedPathInput_default as L, toMinutes as Lt, SequenceInput_default as M, generateTimeSlots as Mt, useSequenceUtils as N, isTimeInRange as Nt, ConcentrationInput_default as O, formatDuration as Ot, FormulaInput_default as P, parseTime as Pt, normalizeJobState as Q, ArtifactSelectorModal_default as R, useTimeUtils as Rt, controlsToTopBarSettingsConfig as S, TimePicker_default as St, getDefaultControlView as T, durationMinutes as Tt, resolveCurrentExperimentId as U, BaseSlider_default as Ut, getInjectedPlatformContext as V, useListSelection as Vt, resolveCurrentPluginId as W, BaseRadioGroup_default as Wt, jobStatusLabel as X, isTerminalJobStatus as Y, normalizeJobPercent as Z, controlsToFormSchema as _, pluginSecretLabel as _t, defineDoseCalculatorControlProps as a, AlertBox_default as at, controlsToSettingsSchema as b, usesPluginSecretReferences as bt, defineWellPlateDoseComponentBindings as c, SecretInput_default as ct, defineControlModel as d, PLUGIN_SECRET_REF_KEY as dt, useEventStream as et, resolveControlModel as f, clearPluginSecret as ft, mergeControlWorkspaceOptions as g, pluginSecretId as gt, controlValuesToComponentProps as h, keepPluginSecret as ht, useControlSchema as i, _plugin_vue_export_helper_default as it, MoleculeInput_default as j, fromMinutes as jt, UnitInput_default as k, formatTime as kt, defineWellPlateDoseControlProps as l, PLUGIN_SECRET_FORMAT_KEY as lt, controlValuesToComponentBindingsById as m, isPluginSecretRef as mt, defineControls as n, isObjectLike as nt, defineDoseDesignControlModel as o, FileUploader_default as ot, controlValuesToComponentBindings as p, isPluginSecretLocked as pt, usePluginJobs as q, Tooltip_default as qt, getControlDefaults as r, isRecord as rt, defineWellPlateControlProps as s, NumberInput_default as st, defineControlComponentBindings as t, DateTimePicker_default as tt, useControlWorkspace as u, PLUGIN_SECRET_FORMAT_REF as ut, controlsToSectionFormSchema as v, pluginSecretState as vt, controlsToViewItems as w, compareTime as wt, controlsToSidebarPanels as x, TagsInput_default as xt, controlsToSectionFormSchemas as y, setPluginSecret as yt, useAnalysisArtifacts as z, DatePicker_default as zt };
|
|
7190
7270
|
|
|
7191
|
-
//# sourceMappingURL=useControlSchema-
|
|
7271
|
+
//# sourceMappingURL=useControlSchema-BB2GRPhW.js.map
|