@morscherlab/mint-sdk 1.0.0-beta.3 → 1.0.0-beta.4
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 +9 -2
- package/dist/__tests__/composables/experiment-utils.test.d.ts +1 -0
- package/dist/__tests__/composables/useApi.test.d.ts +1 -0
- package/dist/components/AppContainer.vue.d.ts +1 -1
- package/dist/components/AppLayout.vue.d.ts +20 -1
- package/dist/components/AppSidebar.vue.d.ts +56 -4
- package/dist/components/AppTopBar.vue.d.ts +7 -25
- package/dist/components/BioTemplateExperimentWorkspaceView.vue.d.ts +3 -1
- package/dist/components/BioTemplatePackWorkspaceView.vue.d.ts +1 -0
- package/dist/components/BioTemplatePresetWorkspaceView.vue.d.ts +5 -0
- package/dist/components/ComponentBindingRenderer.vue.d.ts +44 -0
- package/dist/components/ControlWorkspaceView.vue.d.ts +24 -7
- package/dist/components/DoseDesignWorkspaceView.vue.d.ts +149 -0
- package/dist/components/ExperimentTimeline.vue.d.ts +1 -1
- package/dist/components/FormBuilder.vue.d.ts +9 -9
- package/dist/components/PlateMapEditor.vue.d.ts +1 -1
- package/dist/components/PluginWorkspaceView.vue.d.ts +310 -0
- package/dist/components/SettingsModal.vue.d.ts +1 -1
- package/dist/components/WellPlate.vue.d.ts +2 -2
- package/dist/components/index.d.ts +3 -12
- package/dist/components/index.js +3 -3
- package/dist/components/{AppPageSelector.vue.d.ts → internal/AppPageSelectorInternal.vue.d.ts} +1 -1
- package/dist/components/{AppPillNav.vue.d.ts → internal/AppPillNavInternal.vue.d.ts} +3 -1
- package/dist/components/{CalendarGridPanel.vue.d.ts → internal/CalendarGridPanelInternal.vue.d.ts} +1 -1
- package/dist/components/internal/FormSectionRenderer.vue.d.ts +4 -4
- package/dist/components/{WellEditPopup.vue.d.ts → internal/WellEditPopupInternal.vue.d.ts} +1 -1
- package/dist/{components-D_Sr0adg.js → components-BkGF4B4y.js} +4484 -3967
- package/dist/components-BkGF4B4y.js.map +1 -0
- package/dist/composables/experiment-utils.d.ts +8 -0
- package/dist/composables/index.d.ts +5 -7
- package/dist/composables/index.js +4 -4
- package/dist/composables/useAppExperiment.d.ts +31 -2
- package/dist/composables/useBioTemplateComponents.d.ts +5 -3
- package/dist/composables/useBioTemplatePackWorkspace.d.ts +3 -2
- package/dist/composables/useBioTemplatePresetWorkspace.d.ts +6 -5
- package/dist/composables/useBioTemplateWorkspace.d.ts +5 -4
- package/dist/composables/useControlSchema.d.ts +43 -21
- package/dist/composables/usePluginClient.d.ts +5 -2
- package/dist/{composables-C3dpXQN5.js → composables-CHsME9H1.js} +40 -28
- package/dist/composables-CHsME9H1.js.map +1 -0
- package/dist/index.d.ts +5 -12
- package/dist/index.js +5 -5
- package/dist/install.js +2 -2
- package/dist/styles.css +3625 -3651
- package/dist/templates/componentBindings.d.ts +13 -0
- package/dist/templates/index.d.ts +3 -3
- package/dist/templates/index.js +2 -2
- package/dist/{templates-50NPjaxL.js → templates-B5jmTWuk.js} +111 -56
- package/dist/templates-B5jmTWuk.js.map +1 -0
- package/dist/types/components.d.ts +6 -25
- package/dist/types/index.d.ts +1 -1
- package/dist/{useScheduleDrag-D4oWdh41.js → useScheduleDrag-BgzpQT53.js} +160 -117
- package/dist/useScheduleDrag-BgzpQT53.js.map +1 -0
- package/package.json +1 -1
- package/src/__tests__/components/ActionItem.test.ts +6 -6
- package/src/__tests__/components/AppLayout.test.ts +44 -0
- package/src/__tests__/components/AppPageSelector.test.ts +8 -8
- package/src/__tests__/components/AppPillNav.test.ts +53 -6
- package/src/__tests__/components/AppSidebar.test.ts +126 -0
- package/src/__tests__/components/AppToastContainer.test.ts +0 -11
- package/src/__tests__/components/AppTopBar.test.ts +182 -119
- package/src/__tests__/components/BioTemplateExperimentWorkspaceView.test.ts +7 -1
- package/src/__tests__/components/BioTemplatePackWorkspaceView.test.ts +15 -1
- package/src/__tests__/components/BioTemplatePresetWorkspaceView.test.ts +26 -1
- package/src/__tests__/components/CalendarGridPanel.test.ts +3 -3
- package/src/__tests__/components/ComponentBindingRenderer.test.ts +161 -0
- package/src/__tests__/components/ControlWorkspaceView.test.ts +134 -63
- package/src/__tests__/components/DateTimePicker.test.ts +2 -2
- package/src/__tests__/components/DoseDesignWorkspaceView.test.ts +185 -0
- package/src/__tests__/components/PluginWorkspaceView.test.ts +548 -0
- package/src/__tests__/composables/experiment-utils.test.ts +30 -0
- package/src/__tests__/composables/useApi.test.ts +30 -0
- package/src/__tests__/composables/useAppExperiment.test.ts +100 -1
- package/src/__tests__/composables/useBioTemplatePackWorkspace.test.ts +6 -3
- package/src/__tests__/composables/useBioTemplatePresetWorkspace.test.ts +6 -6
- package/src/__tests__/composables/useBioTemplateWorkspace.test.ts +6 -1
- package/src/__tests__/composables/useControlSchema.test.ts +150 -36
- package/src/__tests__/composables/usePluginClient.test.ts +99 -2
- package/src/__tests__/docs/frontendDocsCatalog.test.ts +120 -25
- package/src/__tests__/templates/templates.test.ts +12 -0
- package/src/components/AppAvatarMenu.vue +3 -3
- package/src/components/AppLayout.story.vue +39 -0
- package/src/components/AppLayout.vue +83 -2
- package/src/components/AppPluginSwitcher.vue +5 -5
- package/src/components/AppSidebar.story.vue +113 -5
- package/src/components/AppSidebar.vue +144 -24
- package/src/components/AppTopBar.story.vue +2 -5
- package/src/components/AppTopBar.vue +35 -425
- package/src/components/BioTemplateExperimentWorkspaceView.story.vue +2 -2
- package/src/components/BioTemplateExperimentWorkspaceView.vue +6 -0
- package/src/components/BioTemplatePackWorkspaceView.story.vue +4 -4
- package/src/components/BioTemplatePackWorkspaceView.vue +1 -0
- package/src/components/BioTemplatePresetWorkspaceView.story.vue +14 -2
- package/src/components/BioTemplatePresetWorkspaceView.vue +11 -2
- package/src/components/BioTemplateRenderer.vue +15 -227
- package/src/components/ComponentBindingRenderer.story.vue +57 -0
- package/src/components/ComponentBindingRenderer.vue +308 -0
- package/src/components/ControlWorkspaceView.story.vue +20 -9
- package/src/components/ControlWorkspaceView.vue +43 -12
- package/src/components/DatePicker.vue +2 -2
- package/src/components/DateTimePicker.vue +2 -2
- package/src/components/DoseDesignWorkspaceView.story.vue +77 -0
- package/src/components/DoseDesignWorkspaceView.vue +255 -0
- package/src/components/ExperimentPopover.vue +2 -6
- package/src/components/ExperimentSelectorModal.vue +6 -5
- package/src/components/FormBuilder.story.vue +190 -0
- package/src/components/PluginWorkspaceView.story.vue +334 -0
- package/src/components/PluginWorkspaceView.vue +708 -0
- package/src/components/SettingsModal.story.vue +87 -0
- package/src/components/WellPlate.vue +2 -2
- package/src/components/index.ts +3 -12
- package/src/components/{AppPageSelector.vue → internal/AppPageSelectorInternal.vue} +9 -9
- package/src/components/internal/AppPillNavInternal.vue +194 -0
- package/src/components/{CalendarGridPanel.vue → internal/CalendarGridPanelInternal.vue} +1 -1
- package/src/components/{WellEditPopup.vue → internal/WellEditPopupInternal.vue} +3 -3
- package/src/composables/experiment-utils.ts +26 -0
- package/src/composables/index.ts +21 -7
- package/src/composables/useApi.ts +9 -2
- package/src/composables/useAppExperiment.ts +85 -13
- package/src/composables/useBioTemplateComponents.ts +12 -0
- package/src/composables/useBioTemplatePackWorkspace.ts +6 -2
- package/src/composables/useBioTemplatePresetWorkspace.ts +10 -21
- package/src/composables/useBioTemplateWorkspace.ts +6 -4
- package/src/composables/useControlSchema.ts +157 -69
- package/src/composables/usePluginClient.ts +50 -9
- package/src/index.ts +6 -563
- package/src/styles/components/app-layout.css +82 -0
- package/src/styles/components/app-pill-nav.css +70 -0
- package/src/styles/components/app-sidebar.css +119 -0
- package/src/styles/components/app-top-bar.css +0 -235
- package/src/styles/index.css +0 -1
- package/src/templates/componentBindings.ts +38 -0
- package/src/templates/index.ts +4 -0
- package/src/types/components.ts +6 -31
- package/src/types/index.ts +2 -6
- package/dist/__tests__/composables/usePluginApi.test.d.ts +0 -13
- package/dist/components/FormFieldRenderer.vue.d.ts +0 -28
- package/dist/components/FormSection.vue.d.ts +0 -30
- package/dist/components/GroupingModal.vue.d.ts +0 -12
- package/dist/components/SettingsButton.vue.d.ts +0 -30
- package/dist/components/ToastNotification.vue.d.ts +0 -2
- package/dist/components-D_Sr0adg.js.map +0 -1
- package/dist/composables/usePluginApi.d.ts +0 -22
- package/dist/composables-C3dpXQN5.js.map +0 -1
- package/dist/templates-50NPjaxL.js.map +0 -1
- package/dist/useScheduleDrag-D4oWdh41.js.map +0 -1
- package/src/__tests__/components/FormCompatibility.test.ts +0 -94
- package/src/__tests__/components/GroupingModal.test.ts +0 -73
- package/src/__tests__/components/SettingsButton.test.ts +0 -44
- package/src/__tests__/composables/usePluginApi.test.ts +0 -81
- package/src/components/AppPillNav.vue +0 -71
- package/src/components/FormFieldRenderer.vue +0 -35
- package/src/components/FormSection.vue +0 -37
- package/src/components/GroupingModal.story.vue +0 -52
- package/src/components/GroupingModal.vue +0 -61
- package/src/components/SettingsButton.story.vue +0 -58
- package/src/components/SettingsButton.vue +0 -64
- package/src/components/ToastNotification.vue +0 -9
- package/src/composables/usePluginApi.ts +0 -32
- package/src/styles/components/settings-button.css +0 -31
- /package/dist/__tests__/components/{FormCompatibility.test.d.ts → ComponentBindingRenderer.test.d.ts} +0 -0
- /package/dist/__tests__/components/{GroupingModal.test.d.ts → DoseDesignWorkspaceView.test.d.ts} +0 -0
- /package/dist/__tests__/components/{SettingsButton.test.d.ts → PluginWorkspaceView.test.d.ts} +0 -0
- /package/dist/components/{ActionItem.vue.d.ts → internal/ActionItemInternal.vue.d.ts} +0 -0
- /package/src/components/{ActionItem.vue → internal/ActionItemInternal.vue} +0 -0
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
import { DatePreset, ExperimentStatus, SelectOption, PillVariant } from '../types';
|
|
2
|
+
interface ExperimentCodeSource {
|
|
3
|
+
id?: number | null;
|
|
4
|
+
experiment_code?: string | null;
|
|
5
|
+
}
|
|
2
6
|
export declare function formatExperimentDate(dateStr: string): string;
|
|
3
7
|
export declare function datePresetToISO(preset: DatePreset): string;
|
|
4
8
|
export declare const EXPERIMENT_STATUS_OPTIONS: SelectOption<string>[];
|
|
5
9
|
export declare const EXPERIMENT_STATUS_VARIANT_MAP: Record<ExperimentStatus, PillVariant>;
|
|
6
10
|
export declare const EXPERIMENT_STATUS_LABELS: Record<ExperimentStatus, string>;
|
|
11
|
+
export declare function formatExperimentStatus(status?: ExperimentStatus | string | null): string;
|
|
12
|
+
export declare function getExperimentStatusVariant(status?: ExperimentStatus | string | null): PillVariant;
|
|
13
|
+
export declare function resolveExperimentCode(experiment: ExperimentCodeSource): string | undefined;
|
|
7
14
|
export declare const DATE_PRESET_OPTIONS: SelectOption<string>[];
|
|
8
15
|
export declare const SORT_OPTIONS: SelectOption<string>[];
|
|
16
|
+
export {};
|
|
@@ -22,10 +22,10 @@ export { useAutoGroup, DEFAULT_COLORS, extractSamplesFromDesignData } from './us
|
|
|
22
22
|
export { useReagentSeries, generateDilutionSeries, DEFAULT_PRESETS, DEFAULT_UNITS, type LevelEntry, type DilutionPreset, type UseReagentSeriesReturn, } from './useReagentSeries';
|
|
23
23
|
export { usePluginConfig, type UsePluginConfigReturn } from './usePluginConfig';
|
|
24
24
|
export { useExperimentSelector, type UseExperimentSelectorOptions, type UseExperimentSelectorReturn, } from './useExperimentSelector';
|
|
25
|
-
export { formatExperimentDate, datePresetToISO, EXPERIMENT_STATUS_OPTIONS, EXPERIMENT_STATUS_VARIANT_MAP, EXPERIMENT_STATUS_LABELS, DATE_PRESET_OPTIONS, SORT_OPTIONS, } from './experiment-utils';
|
|
25
|
+
export { formatExperimentDate, formatExperimentStatus, getExperimentStatusVariant, resolveExperimentCode, datePresetToISO, EXPERIMENT_STATUS_OPTIONS, EXPERIMENT_STATUS_VARIANT_MAP, EXPERIMENT_STATUS_LABELS, DATE_PRESET_OPTIONS, SORT_OPTIONS, } from './experiment-utils';
|
|
26
26
|
export { useExperimentData, type UseExperimentDataOptions, type UseExperimentDataReturn, } from './useExperimentData';
|
|
27
27
|
export { getFieldRegistryEntry, getTypeDefault, type RegistryEntry, } from './formBuilderRegistry';
|
|
28
|
-
export { useAppExperiment, APP_EXPERIMENT_KEY, type UseAppExperimentOptions, type UseAppExperimentReturn, type AppExperimentState, } from './useAppExperiment';
|
|
28
|
+
export { useAppExperiment, APP_EXPERIMENT_KEY, type AppExperimentRecord, type AppExperimentSource, type UseAppExperimentOptions, type UseAppExperimentReturn, type AppExperimentState, type AppExperimentPopoverBinding, type AppExperimentSelectorModalBinding, } from './useAppExperiment';
|
|
29
29
|
export { useExperimentSave, type UseExperimentSaveOptions, type UseExperimentSaveReturn, } from './useExperimentSave';
|
|
30
30
|
export { useTemplateCollection, type TemplateCollectionInput, type UseTemplateCollectionOptions, type UseTemplateCollectionReturn, } from './useTemplateCollection';
|
|
31
31
|
export { useRequestSyncState, type RequestSyncRunOptions, type RequestSyncSuccessKind, type UseRequestSyncStateReturn, } from './useRequestSyncState';
|
|
@@ -36,12 +36,10 @@ export { useSampleGroups, type DisplaySampleSubGroup, type SampleGroupSource, ty
|
|
|
36
36
|
export { useExpansionSet, type ExpansionSetSource, type UseExpansionSetOptions, type UseExpansionSetReturn, } from './useExpansionSet';
|
|
37
37
|
export { compareSortValues, useSortedItems, type CompareSortValuesOptions, type SortComparator, type SortComparatorContext, type SortDescriptor, type SortedItemsSource, type SortOrder, type UseSortedItemsOptions, type UseSortedItemsReturn, } from './useSortedItems';
|
|
38
38
|
export { candidateMatchesSearch, normalizeSearchQuery, useTextSearch, type TextSearchCandidate, type TextSearchSource, type UseTextSearchOptions, type UseTextSearchReturn, } from './useTextSearch';
|
|
39
|
-
|
|
40
|
-
export { usePluginApi, type UsePluginApiOptions, } from './usePluginApi';
|
|
41
|
-
export { controlsToFormSchema, controlsToSectionFormSchema, controlsToSectionFormSchemas, controlsToSidebarPanels, controlsToSettingsSchema, controlsToTopBarSettingsConfig, controlsToTopBarTabs, controlsToViewIds, controlsToViewItems, controlValuesToComponentProps, defineControlModel, defineDoseDesignControlModel, defineDoseCalculatorControlProps, defineControls, defineWellPlateControlProps, defineWellPlateDoseControlProps, getDefaultControlView, getControlDefaults, useControlSchema, useControlWorkspace, type ControlDefinition, type ControlComponentPropSource, type ControlComponentPropsByIdMap, type ControlComponentPropsMap, type DoseDesignControlModelOptions, type DoseCalculatorControlPropsOptions, type ControlFormSchema, type ControlInput, type ControlModel, type ControlModelBinding, type ControlModelSectionConfig, type ControlModelViewConfig, type ControlOption, type ControlOptionValue, type ControlPrimitive, type ControlSchema, type ControlSchemaOptions, type ControlShorthand, type ControlWorkspaceOptions, type ControlFormBinding, type ControlSettingsBinding, type ControlSidebarBinding, type ControlSectionConfig, type ControlSidebarConfig, type ControlTopBarSettingsBinding, type ControlViewConfig, type ControlValues, type UseControlSchemaReturn, type ControlWorkspaceAppTopBarPillBinding, type ControlWorkspaceAppTopBarTabsBinding, type ControlWorkspaceComponentBindings, type ControlWorkspaceFormBinding, type ControlWorkspacePillNavBinding, type ControlWorkspaceSidebarBinding, type ControlWorkspaceTopBarBinding, type ControlWorkspaceTopBarSettingsBinding, type UseControlWorkspaceReturn, type WellPlateControlPropsOptions, type WellPlateDoseControlPropsOptions, } from './useControlSchema';
|
|
39
|
+
export { controlsToFormSchema, controlsToSectionFormSchema, controlsToSectionFormSchemas, controlsToSidebarPanels, controlsToSettingsSchema, controlsToTopBarSettingsConfig, controlsToViewIds, controlsToViewItems, controlValuesToComponentBindings, controlValuesToComponentBindingsById, controlValuesToComponentProps, defineControlComponentBindings, defineControlModel, defineDoseDesignControlModel, defineDoseCalculatorControlProps, defineControls, defineWellPlateControlProps, defineWellPlateDoseComponentBindings, defineWellPlateDoseControlProps, getDefaultControlView, getControlDefaults, useControlSchema, useControlWorkspace, type ControlDefinition, type ControlComponentBinding, type ControlComponentBindingConfig, type ControlComponentBindingRecordConfig, type ControlComponentBindingsById, type ControlComponentBindingsConfig, type ControlComponentPropSource, type ControlComponentPropsByIdMap, type ControlComponentPropsMap, type DoseDesignControlModelOptions, type DoseCalculatorControlPropsOptions, type ControlFormSchema, type ControlInput, type ControlModel, type ControlModelBinding, type ControlModelSectionConfig, type ControlModelViewConfig, type ControlOption, type ControlOptionValue, type ControlPrimitive, type ControlSchema, type ControlSchemaOptions, type ControlShorthand, type ControlWorkspaceOptions, type ControlFormBinding, type ControlSettingsBinding, type ControlSidebarBinding, type ControlSectionConfig, type ControlSidebarConfig, type ControlTopBarSettingsBinding, type ControlViewConfig, type ControlValues, type UseControlSchemaReturn, type ControlWorkspaceAppTopBarPillBinding, type ControlWorkspaceComponentBindings, type ControlWorkspaceFormBinding, type ControlWorkspacePillNavBinding, type ControlWorkspaceSidebarBinding, type ControlWorkspaceTopBarBinding, type ControlWorkspaceTopBarSettingsBinding, type UseControlWorkspaceReturn, type WellPlateControlPropsOptions, type WellPlateDoseControlPropsOptions, } from './useControlSchema';
|
|
42
40
|
export { getBioTemplateControlSchema, requireBioTemplateControlSchema, useBioTemplateControls, type BioTemplateControlSchema, type BioTemplateControlTarget, } from './useBioTemplateControls';
|
|
43
|
-
export { getBioTemplateComponentProps, getBioTemplateComponentBindings, toBioTemplateComponentProps, toBioTemplateComponentPropsByComponent, toBioTemplateComponentPropsById, useBioTemplateComponents, type BioTemplateComponentBinding, type BioTemplateComponentPropsByComponent, type BioTemplateComponentPropsBinding, type BioTemplateComponentPropsById, type BioTemplateComponentPropsLookupOptions, type BioTemplateComponentTarget, type UseBioTemplateComponentsReturn, } from './useBioTemplateComponents';
|
|
41
|
+
export { getBioTemplateComponentProps, getBioTemplateComponentBindings, toBioTemplateComponentBindings, toBioTemplateComponentBindingsById, toBioTemplateComponentProps, toBioTemplateComponentPropsByComponent, toBioTemplateComponentPropsById, useBioTemplateComponents, type BioTemplateComponentBinding, type BioTemplateComponentBindingsById, type BioTemplateComponentPropsByComponent, type BioTemplateComponentPropsBinding, type BioTemplateComponentPropsById, type BioTemplateComponentPropsLookupOptions, type BioTemplateResolvedComponentBinding, type BioTemplateComponentTarget, type UseBioTemplateComponentsReturn, } from './useBioTemplateComponents';
|
|
44
42
|
export { useBioTemplateWorkspace, type BioTemplateRendererBinding, type BioTemplateWorkspaceBindings, type BioTemplateWorkspaceTarget, type UseBioTemplateWorkspaceReturn, } from './useBioTemplateWorkspace';
|
|
45
43
|
export { useBioTemplatePresetWorkspace, type BioTemplatePresetWorkspaceBindings, type UseBioTemplatePresetWorkspaceOptions, type UseBioTemplatePresetWorkspaceReturn, } from './useBioTemplatePresetWorkspace';
|
|
46
44
|
export { useBioTemplatePackWorkspace, type UseBioTemplatePackWorkspaceOptions, type UseBioTemplatePackWorkspaceReturn, } from './useBioTemplatePackWorkspace';
|
|
47
|
-
export { buildPluginEndpointUrl, createPluginClient, resolvePluginBaseUrl, usePluginClient, usePluginSettings, useCurrentExperiment, type BuildPluginEndpointUrlOptions, type PluginContract, type PluginEndpointContract, type PluginEndpointDefinition, type PluginHttpMethod, type PluginNavItemContract, type CreatePluginClientOptions, type UseCurrentExperimentOptions, type UseCurrentExperimentReturn, } from './usePluginClient';
|
|
45
|
+
export { buildPluginEndpointUrl, createPluginClient, getPluginPageSelectorItems, resolvePluginBaseUrl, usePluginClient, usePluginSettings, useCurrentExperiment, type BuildPluginEndpointUrlOptions, type PluginContract, type PluginEndpointContract, type PluginEndpointDefinition, type PluginHttpMethod, type PluginNavItemContract, type CreatePluginClientOptions, type UseCurrentExperimentOptions, type UseCurrentExperimentReturn, } from './usePluginClient';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $n as
|
|
2
|
-
import { $ as
|
|
3
|
-
import { a as
|
|
4
|
-
export { APP_EXPERIMENT_KEY, ATOMIC_WEIGHTS, DATE_PRESET_OPTIONS, DEFAULT_COLORS, DEFAULT_PRESETS, DEFAULT_UNITS, EXPERIMENT_STATUS_LABELS, EXPERIMENT_STATUS_OPTIONS, EXPERIMENT_STATUS_VARIANT_MAP, SORT_OPTIONS, addMinutes, buildPluginEndpointUrl, candidateMatchesSearch, compareSortValues, compareTime, controlValuesToComponentProps, controlsToFormSchema, controlsToSectionFormSchema, controlsToSectionFormSchemas, controlsToSettingsSchema, controlsToSidebarPanels, controlsToTopBarSettingsConfig,
|
|
1
|
+
import { $n as findNearestTimeSlotIndex, Bn as useSequenceUtils, Cn as defineDoseCalculatorControlProps, Dn as defineWellPlateDoseControlProps, En as defineWellPlateDoseComponentBindings, Hn as ATOMIC_WEIGHTS, Ln as useConcentrationUnits, Mn as useControlWorkspace, Nn as getFieldRegistryEntry, On as getControlDefaults, Pn as getTypeDefault, Qn as findAvailableSlots, Sn as defineControls, Tn as defineWellPlateControlProps, Un as useChemicalFormula, Xn as compareTime, Yn as addMinutes, Zn as durationMinutes, _n as controlsToTopBarSettingsConfig, ar as isTimeInRange, bn as defineControlComponentBindings, cr as snapToSlot, dn as controlValuesToComponentProps, er as formatDuration, fn as controlsToFormSchema, g as toBioTemplateComponentProps, gn as controlsToSidebarPanels, gr as useEventListener, hn as controlsToSettingsSchema, hr as useSelectionLimit, ir as generateTimeSlots, jn as useControlSchema, kn as getDefaultControlView, l as requireBioTemplateControlSchema, ln as controlValuesToComponentBindings, lr as toMinutes, m as toBioTemplateComponentBindingsById, mn as controlsToSectionFormSchemas, mr as useListSelection, nr as formatTimeSlot, o as getBioTemplateControlSchema, or as parseTime, p as toBioTemplateComponentBindings, pn as controlsToSectionFormSchema, rr as fromMinutes, sr as rangesOverlap, tr as formatTime, u as getBioTemplateComponentBindings, un as controlValuesToComponentBindingsById, ur as useTimeUtils, v as toBioTemplateComponentPropsById, vn as controlsToViewIds, wn as defineDoseDesignControlModel, xn as defineControlModel, yn as controlsToViewItems } from "../templates-B5jmTWuk.js";
|
|
2
|
+
import { $ as useTheme, A as useAutoGroup, B as DATE_PRESET_OPTIONS, C as useSampleGroups, D as DEFAULT_COLORS, F as usePlatformContext, G as datePresetToISO, H as EXPERIMENT_STATUS_OPTIONS, I as useExperimentSelector, J as getExperimentStatusVariant, K as formatExperimentDate, L as useRequestSyncState, M as useDoseCalculator, N as APP_EXPERIMENT_KEY, O as extractSamplesFromDesignData, P as useAppExperiment, Q as useForm, R as useDebouncedWatch, S as useExpansionSet, U as EXPERIMENT_STATUS_VARIANT_MAP, V as EXPERIMENT_STATUS_LABELS, W as SORT_OPTIONS, X as evaluateCondition, Y as resolveExperimentCode, Z as useFormBuilder, _ as useTemplateCollection, a as DEFAULT_UNITS, at as useSortedItems, c as useGroupAssignment, d as useBioTemplatePackWorkspace, et as useToast, f as useBioTemplateWorkspace, g as useBioTemplateControls, h as useBioTemplateComponents, i as DEFAULT_PRESETS, it as compareSortValues, j as useWellPlateEditor, l as useRackEditor, m as toBioTemplateComponentPropsByComponent, n as useExperimentData, nt as normalizeSearchQuery, o as generateDilutionSeries, p as getBioTemplateComponentProps, q as formatExperimentStatus, r as useProtocolTemplates, rt as useTextSearch, s as useReagentSeries, t as useScheduleDrag, tt as candidateMatchesSearch, u as useBioTemplatePresetWorkspace, v as useExperimentSave, z as useApi } from "../useScheduleDrag-BgzpQT53.js";
|
|
3
|
+
import { a as useCurrentExperiment, c as usePluginConfig, d as usePasskey, f as useAuth, i as resolvePluginBaseUrl, l as useAsync, n as createPluginClient, o as usePluginClient, r as getPluginPageSelectorItems, s as usePluginSettings, t as buildPluginEndpointUrl, u as useAsyncBatch } from "../composables-CHsME9H1.js";
|
|
4
|
+
export { APP_EXPERIMENT_KEY, ATOMIC_WEIGHTS, DATE_PRESET_OPTIONS, DEFAULT_COLORS, DEFAULT_PRESETS, DEFAULT_UNITS, EXPERIMENT_STATUS_LABELS, EXPERIMENT_STATUS_OPTIONS, EXPERIMENT_STATUS_VARIANT_MAP, SORT_OPTIONS, addMinutes, buildPluginEndpointUrl, candidateMatchesSearch, compareSortValues, compareTime, controlValuesToComponentBindings, controlValuesToComponentBindingsById, controlValuesToComponentProps, controlsToFormSchema, controlsToSectionFormSchema, controlsToSectionFormSchemas, controlsToSettingsSchema, controlsToSidebarPanels, controlsToTopBarSettingsConfig, controlsToViewIds, controlsToViewItems, createPluginClient, datePresetToISO, defineControlComponentBindings, defineControlModel, defineControls, defineDoseCalculatorControlProps, defineDoseDesignControlModel, defineWellPlateControlProps, defineWellPlateDoseComponentBindings, defineWellPlateDoseControlProps, durationMinutes, evaluateCondition, extractSamplesFromDesignData, findAvailableSlots, findNearestTimeSlotIndex, formatDuration, formatExperimentDate, formatExperimentStatus, formatTime, formatTimeSlot, fromMinutes, generateDilutionSeries, generateTimeSlots, getBioTemplateComponentBindings, getBioTemplateComponentProps, getBioTemplateControlSchema, getControlDefaults, getDefaultControlView, getExperimentStatusVariant, getFieldRegistryEntry, getPluginPageSelectorItems, getTypeDefault, isTimeInRange, normalizeSearchQuery, parseTime, rangesOverlap, requireBioTemplateControlSchema, resolveExperimentCode, resolvePluginBaseUrl, snapToSlot, toBioTemplateComponentBindings, toBioTemplateComponentBindingsById, toBioTemplateComponentProps, toBioTemplateComponentPropsByComponent, toBioTemplateComponentPropsById, toMinutes, useApi, useAppExperiment, useAsync, useAsyncBatch, useAuth, useAutoGroup, useBioTemplateComponents, useBioTemplateControls, useBioTemplatePackWorkspace, useBioTemplatePresetWorkspace, useBioTemplateWorkspace, useChemicalFormula, useConcentrationUnits, useControlSchema, useControlWorkspace, useCurrentExperiment, useDebouncedWatch, useDoseCalculator, useEventListener, useExpansionSet, useExperimentData, useExperimentSave, useExperimentSelector, useForm, useFormBuilder, useGroupAssignment, useListSelection, usePasskey, usePlatformContext, usePluginClient, usePluginConfig, usePluginSettings, useProtocolTemplates, useRackEditor, useReagentSeries, useRequestSyncState, useSampleGroups, useScheduleDrag, useSelectionLimit, useSequenceUtils, useSortedItems, useTemplateCollection, useTextSearch, useTheme, useTimeUtils, useToast, useWellPlateEditor };
|
|
@@ -1,18 +1,45 @@
|
|
|
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);
|
|
3
5
|
export interface UseAppExperimentOptions {
|
|
6
|
+
/** Current experiment source to mirror into the app shell. Accepts a value, ref, computed, or getter. */
|
|
7
|
+
experiment?: AppExperimentSource;
|
|
4
8
|
onSelect?: (experiment: ExperimentSummary) => void | Promise<void>;
|
|
5
9
|
onSave?: () => string | null | Promise<string | null>;
|
|
6
10
|
onDetach?: () => void;
|
|
7
11
|
saveDisabled?: Ref<boolean> | ComputedRef<boolean>;
|
|
8
12
|
saveDisabledMessage?: string | Ref<string | undefined> | ComputedRef<string | undefined>;
|
|
9
13
|
}
|
|
14
|
+
export interface AppExperimentPopoverBinding {
|
|
15
|
+
experimentName?: string;
|
|
16
|
+
experimentCode?: string;
|
|
17
|
+
experimentStatus?: ExperimentStatus;
|
|
18
|
+
showSave: boolean;
|
|
19
|
+
showDetach: boolean;
|
|
20
|
+
saveDisabled: boolean;
|
|
21
|
+
saveDisabledMessage?: string;
|
|
22
|
+
saveLoading: boolean;
|
|
23
|
+
saveSuccessMessage?: string;
|
|
24
|
+
}
|
|
25
|
+
export interface AppExperimentSelectorModalBinding {
|
|
26
|
+
modelValue: boolean;
|
|
27
|
+
currentExperimentId: number | null;
|
|
28
|
+
}
|
|
10
29
|
export interface UseAppExperimentReturn {
|
|
11
|
-
set: (experiment:
|
|
30
|
+
set: (experiment: AppExperimentRecord) => void;
|
|
12
31
|
clear: () => void;
|
|
13
32
|
experimentName: Readonly<Ref<string | undefined>>;
|
|
14
33
|
experimentCode: Readonly<Ref<string | undefined>>;
|
|
34
|
+
experimentStatus: Readonly<Ref<ExperimentStatus | undefined>>;
|
|
15
35
|
experimentId: Readonly<Ref<number | null>>;
|
|
36
|
+
popover: ComputedRef<AppExperimentPopoverBinding>;
|
|
37
|
+
selectorModal: ComputedRef<AppExperimentSelectorModalBinding>;
|
|
38
|
+
openModal: () => void;
|
|
39
|
+
closeModal: () => void;
|
|
40
|
+
handleSelect: (experiment: ExperimentSummary) => void;
|
|
41
|
+
handleSave: () => Promise<void>;
|
|
42
|
+
handleDetach: () => void;
|
|
16
43
|
}
|
|
17
44
|
export interface AppExperimentState {
|
|
18
45
|
experimentName: Ref<string | undefined>;
|
|
@@ -27,11 +54,13 @@ export interface AppExperimentState {
|
|
|
27
54
|
closeModal: () => void;
|
|
28
55
|
saveDisabled: ComputedRef<boolean>;
|
|
29
56
|
saveDisabledMessage: ComputedRef<string | undefined>;
|
|
57
|
+
popover: ComputedRef<AppExperimentPopoverBinding>;
|
|
58
|
+
selectorModal: ComputedRef<AppExperimentSelectorModalBinding>;
|
|
30
59
|
openModal: () => void;
|
|
31
60
|
handleSelect: (experiment: ExperimentSummary) => void;
|
|
32
61
|
handleSave: () => Promise<void>;
|
|
33
62
|
handleDetach: () => void;
|
|
34
63
|
}
|
|
35
64
|
export declare const APP_EXPERIMENT_KEY: InjectionKey<AppExperimentState>;
|
|
36
|
-
/** Manages the
|
|
65
|
+
/** Manages the current experiment selection, save flow, and detach action for a plugin's AppTopBar app shell. */
|
|
37
66
|
export declare function useAppExperiment(options?: UseAppExperimentOptions): UseAppExperimentReturn;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import { getBioTemplateComponentBindings, toBioTemplateComponentImports, toBioTemplateComponentProps, toBioTemplateComponentPropsById, toBioTemplateComponentSnippets, toBioTemplateComponentUsage, BioTemplateComponentBinding, BioTemplateComponentImport, BioTemplateComponentPropsByComponent, BioTemplateComponentPropsBinding, BioTemplateComponentPropsById, BioTemplateComponentPropsLookupOptions, BioTemplateComponentSnippet, BioTemplateComponentTarget, BioTemplateComponentUsage } from '../templates/componentBindings';
|
|
1
|
+
import { getBioTemplateComponentBindings, toBioTemplateComponentImports, toBioTemplateComponentBindings, toBioTemplateComponentBindingsById, toBioTemplateComponentProps, toBioTemplateComponentPropsById, toBioTemplateComponentSnippets, toBioTemplateComponentUsage, BioTemplateComponentBinding, BioTemplateComponentBindingsById, BioTemplateComponentImport, BioTemplateComponentPropsByComponent, BioTemplateComponentPropsBinding, BioTemplateComponentPropsById, BioTemplateComponentPropsLookupOptions, BioTemplateResolvedComponentBinding, BioTemplateComponentSnippet, BioTemplateComponentTarget, BioTemplateComponentUsage } from '../templates/componentBindings';
|
|
2
2
|
import { BioTemplateEnvelope, TemplateCollectionEnvelope } from '../templates/types';
|
|
3
|
-
export { getBioTemplateComponentBindings, toBioTemplateComponentImports, toBioTemplateComponentProps, toBioTemplateComponentPropsById, toBioTemplateComponentSnippets, toBioTemplateComponentUsage, };
|
|
4
|
-
export type { BioTemplateComponentBinding, BioTemplateComponentImport, BioTemplateComponentPropsByComponent, BioTemplateComponentPropsBinding, BioTemplateComponentPropsById, BioTemplateComponentPropsLookupOptions, BioTemplateComponentSnippet, BioTemplateComponentTarget, BioTemplateComponentUsage, };
|
|
3
|
+
export { getBioTemplateComponentBindings, toBioTemplateComponentBindings, toBioTemplateComponentBindingsById, toBioTemplateComponentImports, toBioTemplateComponentProps, toBioTemplateComponentPropsById, toBioTemplateComponentSnippets, toBioTemplateComponentUsage, };
|
|
4
|
+
export type { BioTemplateComponentBinding, BioTemplateComponentBindingsById, BioTemplateComponentImport, BioTemplateComponentPropsByComponent, BioTemplateComponentPropsBinding, BioTemplateComponentPropsById, BioTemplateComponentPropsLookupOptions, BioTemplateResolvedComponentBinding, BioTemplateComponentSnippet, BioTemplateComponentTarget, BioTemplateComponentUsage, };
|
|
5
5
|
export interface UseBioTemplateComponentsReturn {
|
|
6
6
|
bindings: BioTemplateComponentBinding[];
|
|
7
7
|
imports: BioTemplateComponentImport[];
|
|
8
|
+
componentBindings: BioTemplateResolvedComponentBinding[];
|
|
9
|
+
componentBindingsById: BioTemplateComponentBindingsById;
|
|
8
10
|
componentProps: BioTemplateComponentPropsBinding[];
|
|
9
11
|
componentPropsById: BioTemplateComponentPropsById;
|
|
10
12
|
componentPropsByComponent: BioTemplateComponentPropsByComponent;
|
|
@@ -2,7 +2,7 @@ import { ComputedRef, Ref } from 'vue';
|
|
|
2
2
|
import { BioTemplatePackEntry, TemplateCollectionEnvelope, TemplatePackId } from '../templates';
|
|
3
3
|
import { UseTemplateCollectionOptions, UseTemplateCollectionReturn } from './useTemplateCollection';
|
|
4
4
|
import { BioTemplateRendererBinding, BioTemplateWorkspaceBindings, UseBioTemplateWorkspaceReturn } from './useBioTemplateWorkspace';
|
|
5
|
-
import { BioTemplateComponentBinding, BioTemplateComponentImport, BioTemplateComponentPropsByComponent, BioTemplateComponentPropsBinding, BioTemplateComponentPropsById, BioTemplateComponentSnippet, BioTemplateComponentUsage } from './useBioTemplateComponents';
|
|
5
|
+
import { BioTemplateComponentBinding, BioTemplateComponentBindingsById, BioTemplateComponentImport, BioTemplateComponentPropsByComponent, BioTemplateComponentPropsBinding, BioTemplateComponentPropsById, BioTemplateComponentSnippet, BioTemplateComponentUsage } from './useBioTemplateComponents';
|
|
6
6
|
export type UseBioTemplatePackWorkspaceOptions = UseTemplateCollectionOptions;
|
|
7
7
|
export interface UseBioTemplatePackWorkspaceReturn {
|
|
8
8
|
packId: TemplatePackId;
|
|
@@ -21,11 +21,12 @@ export interface UseBioTemplatePackWorkspaceReturn {
|
|
|
21
21
|
workspace: ComputedRef<UseBioTemplateWorkspaceReturn>;
|
|
22
22
|
form: ComputedRef<UseBioTemplateWorkspaceReturn['form']>;
|
|
23
23
|
sidebar: ComputedRef<UseBioTemplateWorkspaceReturn['sidebar']>;
|
|
24
|
-
topBar: ComputedRef<UseBioTemplateWorkspaceReturn['topBar']>;
|
|
24
|
+
topBar: ComputedRef<UseBioTemplateWorkspaceReturn['topBar']['value']>;
|
|
25
25
|
pillNav: ComputedRef<UseBioTemplateWorkspaceReturn['pillNav']>;
|
|
26
26
|
topBarSettings: ComputedRef<UseBioTemplateWorkspaceReturn['topBarSettings']>;
|
|
27
27
|
bindings: ComputedRef<BioTemplateWorkspaceBindings>;
|
|
28
28
|
componentBindings: ComputedRef<BioTemplateComponentBinding[]>;
|
|
29
|
+
componentBindingsById: ComputedRef<BioTemplateComponentBindingsById>;
|
|
29
30
|
componentImports: ComputedRef<BioTemplateComponentImport[]>;
|
|
30
31
|
componentProps: ComputedRef<BioTemplateComponentPropsBinding[]>;
|
|
31
32
|
componentPropsById: ComputedRef<BioTemplateComponentPropsById>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ComputedRef, Ref } from 'vue';
|
|
2
2
|
import { PillNavItem } from '../types';
|
|
3
3
|
import { BioTemplateControlValues, BioTemplatePresetEntry, TemplateCollectionEnvelope, TemplatePresetId } from '../templates';
|
|
4
|
-
import {
|
|
4
|
+
import { ControlWorkspaceOptions, ControlWorkspaceFormBinding, ControlWorkspacePillNavBinding, ControlWorkspaceSidebarBinding, ControlWorkspaceTopBarBinding, ControlWorkspaceTopBarSettingsBinding, UseControlSchemaReturn } from './useControlSchema';
|
|
5
5
|
import { UseTemplateCollectionOptions, UseTemplateCollectionReturn } from './useTemplateCollection';
|
|
6
6
|
import { BioTemplateRendererBinding, UseBioTemplateWorkspaceReturn } from './useBioTemplateWorkspace';
|
|
7
|
-
import { BioTemplateComponentBinding, BioTemplateComponentImport, BioTemplateComponentPropsByComponent, BioTemplateComponentPropsBinding, BioTemplateComponentPropsById, BioTemplateComponentSnippet, BioTemplateComponentUsage } from './useBioTemplateComponents';
|
|
7
|
+
import { BioTemplateComponentBinding, BioTemplateComponentBindingsById, BioTemplateComponentImport, BioTemplateComponentPropsByComponent, BioTemplateComponentPropsBinding, BioTemplateComponentPropsById, BioTemplateComponentSnippet, BioTemplateComponentUsage } from './useBioTemplateComponents';
|
|
8
8
|
import { BioTemplateControlSchema } from './useBioTemplateControls';
|
|
9
9
|
export interface UseBioTemplatePresetWorkspaceOptions extends UseTemplateCollectionOptions {
|
|
10
10
|
/** Optional schema-rendering options for the generated FormBuilder/AppSidebar controls. */
|
|
@@ -32,13 +32,14 @@ export interface UseBioTemplatePresetWorkspaceReturn {
|
|
|
32
32
|
activeControlView: Ref<string>;
|
|
33
33
|
form: ControlWorkspaceFormBinding;
|
|
34
34
|
sidebar: ControlWorkspaceSidebarBinding;
|
|
35
|
-
topBar: ControlWorkspaceTopBarBinding
|
|
35
|
+
topBar: ComputedRef<ControlWorkspaceTopBarBinding>;
|
|
36
36
|
pillNav: ControlWorkspacePillNavBinding;
|
|
37
37
|
topBarSettings: ControlWorkspaceTopBarSettingsBinding;
|
|
38
38
|
bindings: BioTemplatePresetWorkspaceBindings;
|
|
39
39
|
renderer: ComputedRef<BioTemplateRendererBinding>;
|
|
40
40
|
workspace: ComputedRef<UseBioTemplateWorkspaceReturn>;
|
|
41
41
|
componentBindings: ComputedRef<BioTemplateComponentBinding[]>;
|
|
42
|
+
componentBindingsById: ComputedRef<BioTemplateComponentBindingsById>;
|
|
42
43
|
componentImports: ComputedRef<BioTemplateComponentImport[]>;
|
|
43
44
|
componentProps: ComputedRef<BioTemplateComponentPropsBinding[]>;
|
|
44
45
|
componentPropsById: ComputedRef<BioTemplateComponentPropsById>;
|
|
@@ -58,11 +59,11 @@ export interface BioTemplatePresetWorkspaceBindings {
|
|
|
58
59
|
renderer: ComputedRef<BioTemplateRendererBinding>;
|
|
59
60
|
form: ControlWorkspaceFormBinding;
|
|
60
61
|
sidebar: ControlWorkspaceSidebarBinding;
|
|
61
|
-
topBar: ComputedRef<
|
|
62
|
-
topBarTabs: ComputedRef<ControlWorkspaceAppTopBarTabsBinding>;
|
|
62
|
+
topBar: ComputedRef<ControlWorkspaceTopBarBinding>;
|
|
63
63
|
topBarSettings: ControlWorkspaceTopBarSettingsBinding;
|
|
64
64
|
pillNav: ControlWorkspacePillNavBinding;
|
|
65
65
|
componentBindings: ComputedRef<BioTemplateComponentBinding[]>;
|
|
66
|
+
componentBindingsById: ComputedRef<BioTemplateComponentBindingsById>;
|
|
66
67
|
componentProps: ComputedRef<BioTemplateComponentPropsBinding[]>;
|
|
67
68
|
componentPropsById: ComputedRef<BioTemplateComponentPropsById>;
|
|
68
69
|
componentPropsByComponent: ComputedRef<BioTemplateComponentPropsByComponent>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BioTemplateEnvelope, TemplateCollectionEnvelope } from '../templates';
|
|
2
|
-
import { ControlWorkspaceFormBinding, ControlWorkspaceOptions, ControlWorkspacePillNavBinding, ControlWorkspaceSidebarBinding,
|
|
2
|
+
import { ControlWorkspaceFormBinding, ControlWorkspaceOptions, ControlWorkspacePillNavBinding, ControlWorkspaceSidebarBinding, ControlWorkspaceTopBarSettingsBinding, UseControlSchemaReturn, UseControlWorkspaceReturn } from './useControlSchema';
|
|
3
3
|
import { BioTemplateControlSchema, BioTemplateControlTarget } from './useBioTemplateControls';
|
|
4
|
-
import { BioTemplateComponentBinding, BioTemplateComponentImport, BioTemplateComponentPropsByComponent, BioTemplateComponentPropsBinding, BioTemplateComponentPropsById, BioTemplateComponentSnippet, BioTemplateComponentUsage, UseBioTemplateComponentsReturn } from './useBioTemplateComponents';
|
|
4
|
+
import { BioTemplateComponentBinding, BioTemplateComponentBindingsById, BioTemplateComponentImport, BioTemplateComponentPropsByComponent, BioTemplateComponentPropsBinding, BioTemplateComponentPropsById, BioTemplateComponentSnippet, BioTemplateComponentUsage, UseBioTemplateComponentsReturn } from './useBioTemplateComponents';
|
|
5
5
|
export type BioTemplateWorkspaceTarget = BioTemplateControlTarget;
|
|
6
6
|
export interface BioTemplateRendererBinding {
|
|
7
7
|
target: BioTemplateEnvelope<unknown> | TemplateCollectionEnvelope;
|
|
@@ -11,10 +11,10 @@ export interface BioTemplateWorkspaceBindings {
|
|
|
11
11
|
form: ControlWorkspaceFormBinding;
|
|
12
12
|
sidebar: ControlWorkspaceSidebarBinding;
|
|
13
13
|
topBar: UseControlWorkspaceReturn<BioTemplateControlSchema>['bindings']['topBar'];
|
|
14
|
-
topBarTabs: UseControlWorkspaceReturn<BioTemplateControlSchema>['bindings']['topBarTabs'];
|
|
15
14
|
topBarSettings: ControlWorkspaceTopBarSettingsBinding;
|
|
16
15
|
pillNav: ControlWorkspacePillNavBinding;
|
|
17
16
|
componentBindings: BioTemplateComponentBinding[];
|
|
17
|
+
componentBindingsById: BioTemplateComponentBindingsById;
|
|
18
18
|
componentProps: BioTemplateComponentPropsBinding[];
|
|
19
19
|
componentPropsById: BioTemplateComponentPropsById;
|
|
20
20
|
componentPropsByComponent: BioTemplateComponentPropsByComponent;
|
|
@@ -32,12 +32,13 @@ export interface UseBioTemplateWorkspaceReturn {
|
|
|
32
32
|
activeView: UseControlWorkspaceReturn<BioTemplateControlSchema>['activeView'];
|
|
33
33
|
form: ControlWorkspaceFormBinding;
|
|
34
34
|
sidebar: ControlWorkspaceSidebarBinding;
|
|
35
|
-
topBar:
|
|
35
|
+
topBar: UseControlWorkspaceReturn<BioTemplateControlSchema>['topBar'];
|
|
36
36
|
pillNav: ControlWorkspacePillNavBinding;
|
|
37
37
|
topBarSettings: ControlWorkspaceTopBarSettingsBinding;
|
|
38
38
|
bindings: BioTemplateWorkspaceBindings;
|
|
39
39
|
renderer: BioTemplateRendererBinding | null;
|
|
40
40
|
componentBindings: BioTemplateComponentBinding[];
|
|
41
|
+
componentBindingsById: BioTemplateComponentBindingsById;
|
|
41
42
|
componentImports: BioTemplateComponentImport[];
|
|
42
43
|
componentProps: BioTemplateComponentPropsBinding[];
|
|
43
44
|
componentPropsById: BioTemplateComponentPropsById;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComputedRef, Ref } from 'vue';
|
|
2
|
-
import { PillNavItem, SidebarToolSection, SelectOption, SettingsModalSchema, TopBarSettingsConfig
|
|
2
|
+
import { PillNavItem, SidebarToolSection, SelectOption, SettingsModalSchema, TopBarSettingsConfig } from '../types';
|
|
3
3
|
import { FieldCondition, FieldValidation, FormFieldSchema, FormFieldType, FormSchema, FormSectionSchema } from '../types/form-builder';
|
|
4
4
|
import { WellConcentration } from './useDoseCalculator';
|
|
5
5
|
export type ControlOptionValue = string | number | boolean;
|
|
@@ -27,7 +27,7 @@ export interface ControlViewConfig {
|
|
|
27
27
|
to?: string;
|
|
28
28
|
href?: string;
|
|
29
29
|
disabled?: boolean;
|
|
30
|
-
children?:
|
|
30
|
+
children?: PillNavItem['children'];
|
|
31
31
|
}
|
|
32
32
|
export interface ControlSidebarConfig extends Omit<ControlSectionConfig, 'id' | 'title' | 'description' | 'columns'> {
|
|
33
33
|
enabled?: boolean;
|
|
@@ -111,6 +111,10 @@ export interface ControlModel extends Omit<ControlWorkspaceOptions, 'sections' |
|
|
|
111
111
|
controls?: ControlSchema;
|
|
112
112
|
sections?: Record<string, ControlModelSectionConfig>;
|
|
113
113
|
views?: Record<string, ControlModelViewConfig>;
|
|
114
|
+
/** Optional SDK component bindings returned with generated component props for custom workspace slots. */
|
|
115
|
+
componentBindings?: ControlComponentBindingsConfig;
|
|
116
|
+
/** Alias for componentBindings in raw control models. */
|
|
117
|
+
components?: ControlComponentBindingsConfig;
|
|
114
118
|
/** Optional ControlWorkspaceView componentProps mapping returned with the generated controls/options. */
|
|
115
119
|
componentProps?: ControlComponentPropsMap;
|
|
116
120
|
/** Optional named componentProps mappings returned for multiple SDK components. */
|
|
@@ -119,6 +123,7 @@ export interface ControlModel extends Omit<ControlWorkspaceOptions, 'sections' |
|
|
|
119
123
|
export interface ControlModelBinding {
|
|
120
124
|
controls: ControlSchema;
|
|
121
125
|
controlOptions: ControlWorkspaceOptions;
|
|
126
|
+
componentBindings?: ControlComponentBindingsConfig;
|
|
122
127
|
componentProps?: ControlComponentPropsMap;
|
|
123
128
|
componentPropsById?: ControlComponentPropsByIdMap;
|
|
124
129
|
}
|
|
@@ -153,39 +158,47 @@ export interface ControlWorkspaceSidebarBinding extends ControlSidebarBinding {
|
|
|
153
158
|
export interface ControlWorkspaceTopBarSettingsBinding extends ControlTopBarSettingsBinding {
|
|
154
159
|
onSettingsValuesChange: (values: Record<string, unknown>) => void;
|
|
155
160
|
}
|
|
156
|
-
export interface ControlWorkspaceTopBarBinding {
|
|
157
|
-
tabs: TopBarTab[];
|
|
158
|
-
currentTabId: string;
|
|
159
|
-
onTabSelect: (tab: TopBarTab) => void;
|
|
160
|
-
}
|
|
161
161
|
export interface ControlWorkspacePillNavBinding {
|
|
162
162
|
items: PillNavItem[];
|
|
163
163
|
currentItemId: string;
|
|
164
164
|
onSelect: (item: PillNavItem) => void;
|
|
165
165
|
}
|
|
166
|
-
export interface
|
|
166
|
+
export interface ControlWorkspaceTopBarBinding extends ControlWorkspaceTopBarSettingsBinding {
|
|
167
167
|
pillNav: PillNavItem[];
|
|
168
168
|
currentPillId: string;
|
|
169
169
|
onPillSelect: (item: PillNavItem) => void;
|
|
170
170
|
}
|
|
171
|
-
export
|
|
172
|
-
tabs: TopBarTab[];
|
|
173
|
-
currentTabId: string;
|
|
174
|
-
onTabSelect: (tab: TopBarTab) => void;
|
|
175
|
-
}
|
|
171
|
+
export type ControlWorkspaceAppTopBarPillBinding = ControlWorkspaceTopBarBinding;
|
|
176
172
|
export interface ControlWorkspaceComponentBindings {
|
|
177
173
|
form: ControlWorkspaceFormBinding;
|
|
178
174
|
sidebar: ControlWorkspaceSidebarBinding;
|
|
179
|
-
topBar: ComputedRef<
|
|
180
|
-
topBarTabs: ComputedRef<ControlWorkspaceAppTopBarTabsBinding>;
|
|
175
|
+
topBar: ComputedRef<ControlWorkspaceTopBarBinding>;
|
|
181
176
|
topBarSettings: ControlWorkspaceTopBarSettingsBinding;
|
|
182
177
|
pillNav: ControlWorkspacePillNavBinding;
|
|
178
|
+
componentBindings: ComputedRef<ControlComponentBinding[]>;
|
|
179
|
+
componentBindingsById: ComputedRef<ControlComponentBindingsById>;
|
|
183
180
|
componentProps: ComputedRef<Record<string, unknown>>;
|
|
184
181
|
componentPropsById: ComputedRef<Record<string, Record<string, unknown>>>;
|
|
185
182
|
}
|
|
186
183
|
export type ControlComponentPropSource<TValues extends Record<string, unknown> = Record<string, unknown>> = (keyof TValues & string) | ((values: TValues) => unknown);
|
|
187
184
|
export type ControlComponentPropsMap<TValues extends Record<string, unknown> = Record<string, unknown>> = readonly (keyof TValues & string)[] | Record<string, ControlComponentPropSource<TValues>>;
|
|
188
185
|
export type ControlComponentPropsByIdMap<TValues extends Record<string, unknown> = Record<string, unknown>> = Record<string, ControlComponentPropsMap<TValues>>;
|
|
186
|
+
export interface ControlComponentBindingConfig<TValues extends Record<string, unknown> = Record<string, unknown>> {
|
|
187
|
+
id?: string;
|
|
188
|
+
component: string;
|
|
189
|
+
props?: ControlComponentPropsMap<TValues>;
|
|
190
|
+
}
|
|
191
|
+
export interface ControlComponentBindingRecordConfig<TValues extends Record<string, unknown> = Record<string, unknown>> {
|
|
192
|
+
component: string;
|
|
193
|
+
props?: ControlComponentPropsMap<TValues>;
|
|
194
|
+
}
|
|
195
|
+
export type ControlComponentBindingsConfig<TValues extends Record<string, unknown> = Record<string, unknown>> = readonly ControlComponentBindingConfig<TValues>[] | Record<string, ControlComponentBindingRecordConfig<TValues>>;
|
|
196
|
+
export interface ControlComponentBinding {
|
|
197
|
+
id: string;
|
|
198
|
+
component: string;
|
|
199
|
+
props: Record<string, unknown>;
|
|
200
|
+
}
|
|
201
|
+
export type ControlComponentBindingsById = Record<string, ControlComponentBinding>;
|
|
189
202
|
export interface WellPlateControlPropsOptions<TValues extends Record<string, unknown> = Record<string, unknown>> {
|
|
190
203
|
selectedWells?: ControlComponentPropSource<TValues>;
|
|
191
204
|
format?: ControlComponentPropSource<TValues>;
|
|
@@ -241,7 +254,6 @@ export interface UseControlSchemaReturn<TControls extends ControlSchema> {
|
|
|
241
254
|
sidebarPanels: Record<string, SidebarToolSection[]>;
|
|
242
255
|
viewIds: string[];
|
|
243
256
|
viewItems: PillNavItem[];
|
|
244
|
-
topBarTabs: TopBarTab[];
|
|
245
257
|
defaultView: string;
|
|
246
258
|
sectionSchemas: Record<string, ControlFormSchema>;
|
|
247
259
|
sidebar: ControlSidebarBinding;
|
|
@@ -254,10 +266,12 @@ export interface UseControlWorkspaceReturn<TControls extends ControlSchema> exte
|
|
|
254
266
|
activeView: Ref<string>;
|
|
255
267
|
form: ControlWorkspaceFormBinding;
|
|
256
268
|
sidebar: ControlWorkspaceSidebarBinding;
|
|
257
|
-
topBar: ControlWorkspaceTopBarBinding
|
|
269
|
+
topBar: ComputedRef<ControlWorkspaceTopBarBinding>;
|
|
258
270
|
pillNav: ControlWorkspacePillNavBinding;
|
|
259
271
|
topBarSettings: ControlWorkspaceTopBarSettingsBinding;
|
|
260
272
|
bindings: ControlWorkspaceComponentBindings;
|
|
273
|
+
componentBindings: ComputedRef<ControlComponentBinding[]>;
|
|
274
|
+
componentBindingsById: ComputedRef<ControlComponentBindingsById>;
|
|
261
275
|
componentProps: ComputedRef<Record<string, unknown>>;
|
|
262
276
|
componentPropsById: ComputedRef<Record<string, Record<string, unknown>>>;
|
|
263
277
|
setActiveView: (viewId: string) => void;
|
|
@@ -265,6 +279,8 @@ export interface UseControlWorkspaceReturn<TControls extends ControlSchema> exte
|
|
|
265
279
|
resetValues: (values?: Record<string, unknown>) => void;
|
|
266
280
|
getComponentProps: (mapping?: ControlComponentPropsMap<ControlValues<TControls> & Record<string, unknown>>) => Record<string, unknown>;
|
|
267
281
|
getComponentPropsById: (mappings?: ControlComponentPropsByIdMap<ControlValues<TControls> & Record<string, unknown>>) => Record<string, Record<string, unknown>>;
|
|
282
|
+
getComponentBindings: (bindings?: ControlComponentBindingsConfig<ControlValues<TControls> & Record<string, unknown>>) => ControlComponentBinding[];
|
|
283
|
+
getComponentBindingsById: (bindings?: ControlComponentBindingsConfig<ControlValues<TControls> & Record<string, unknown>>) => ControlComponentBindingsById;
|
|
268
284
|
}
|
|
269
285
|
export type ControlValues<TControls extends ControlSchema> = {
|
|
270
286
|
[K in keyof TControls]: ControlValue<TControls[K]>;
|
|
@@ -277,18 +293,26 @@ type ControlValue<TControl> = TControl extends {
|
|
|
277
293
|
type OptionValue<TOption> = TOption extends SelectOption<infer TValue> ? TValue : TOption;
|
|
278
294
|
/** Preserve literal control keys while marking an object as a MINT control schema. */
|
|
279
295
|
export declare function defineControls<TControls extends ControlSchema>(controls: TControls): TControls;
|
|
280
|
-
/**
|
|
296
|
+
/** Preserve literal SDK component binding ids while marking an object as generated workspace component bindings. */
|
|
297
|
+
export declare function defineControlComponentBindings<TBindings extends ControlComponentBindingsConfig>(bindings: TBindings): TBindings;
|
|
298
|
+
/** Create a complete workspace component binding from a simple controls data model for ControlWorkspaceView, generated forms, and sidebars. */
|
|
281
299
|
export declare function defineControlModel(model: ControlModel): ControlModelBinding;
|
|
282
300
|
/** Build default values for a control schema, matching FormBuilder field defaults. */
|
|
283
301
|
export declare function getControlDefaults<TControls extends ControlSchema>(controls: TControls): ControlValues<TControls>;
|
|
284
302
|
/** Map control workspace values into component props for direct `v-bind` usage. */
|
|
285
303
|
export declare function controlValuesToComponentProps<TValues extends Record<string, unknown>>(values: TValues, mapping?: ControlComponentPropsMap<TValues>): Record<string, unknown>;
|
|
304
|
+
/** Map control workspace values into named SDK component bindings for direct slot rendering. */
|
|
305
|
+
export declare function controlValuesToComponentBindings<TValues extends Record<string, unknown>>(values: TValues, bindings?: ControlComponentBindingsConfig<TValues>): ControlComponentBinding[];
|
|
306
|
+
/** Map control workspace values into SDK component bindings keyed by binding id. */
|
|
307
|
+
export declare function controlValuesToComponentBindingsById<TValues extends Record<string, unknown>>(values: TValues, bindings?: ControlComponentBindingsConfig<TValues>): ControlComponentBindingsById;
|
|
286
308
|
/** Return a default WellPlate prop mapping for generated control workspaces. */
|
|
287
309
|
export declare function defineWellPlateControlProps<TValues extends Record<string, unknown> = Record<string, unknown>>(options?: WellPlateControlPropsOptions<TValues>): ControlComponentPropsMap<TValues>;
|
|
288
310
|
/** Return a default DoseCalculator prop mapping for generated control workspaces. */
|
|
289
311
|
export declare function defineDoseCalculatorControlProps<TValues extends Record<string, unknown> = Record<string, unknown>>(options?: DoseCalculatorControlPropsOptions<TValues>): ControlComponentPropsMap<TValues>;
|
|
290
312
|
/** Return named WellPlate + DoseCalculator prop mappings for one dose-design control model. */
|
|
291
313
|
export declare function defineWellPlateDoseControlProps<TValues extends Record<string, unknown> = Record<string, unknown>>(options?: WellPlateDoseControlPropsOptions<TValues>): ControlComponentPropsByIdMap<TValues>;
|
|
314
|
+
/** Return named WellPlate + DoseCalculator component bindings for one dose-design control model. */
|
|
315
|
+
export declare function defineWellPlateDoseComponentBindings<TValues extends Record<string, unknown> = Record<string, unknown>>(options?: WellPlateDoseControlPropsOptions<TValues>): ControlComponentBindingsConfig<TValues>;
|
|
292
316
|
/** Return a complete ControlWorkspaceView model for WellPlate + DoseCalculator dose design. */
|
|
293
317
|
export declare function defineDoseDesignControlModel(options?: DoseDesignControlModelOptions): ControlModelBinding;
|
|
294
318
|
export declare function mergeControlWorkspaceOptions(base?: ControlWorkspaceOptions, override?: ControlWorkspaceOptions): ControlWorkspaceOptions;
|
|
@@ -302,10 +326,8 @@ export declare function controlsToSettingsSchema(controls: ControlSchema, option
|
|
|
302
326
|
export declare function controlsToTopBarSettingsConfig(controls: ControlSchema, options?: ControlSchemaOptions, config?: Omit<TopBarSettingsConfig, 'schema' | 'controls' | 'controlOptions'>): TopBarSettingsConfig;
|
|
303
327
|
/** Return generated control view IDs that have at least one sidebar panel. */
|
|
304
328
|
export declare function controlsToViewIds(controls: ControlSchema, options?: ControlSchemaOptions): string[];
|
|
305
|
-
/** Return
|
|
329
|
+
/** Return AppTopBar pillNav-compatible view items for switching generated control sidebars. */
|
|
306
330
|
export declare function controlsToViewItems(controls: ControlSchema, options?: ControlSchemaOptions): PillNavItem[];
|
|
307
|
-
/** Return AppTopBar-compatible tabs for the same views that drive generated AppSidebar panels. */
|
|
308
|
-
export declare function controlsToTopBarTabs(controls: ControlSchema, options?: ControlSchemaOptions): TopBarTab[];
|
|
309
331
|
/** Return the first generated sidebar view ID, or an empty string when controls render no sidebar panels. */
|
|
310
332
|
export declare function getDefaultControlView(controls: ControlSchema, options?: ControlSchemaOptions): string;
|
|
311
333
|
/** Return a headerless single-section FormBuilder schema for rendering inside an AppSidebar section slot. */
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ComputedRef, Ref } from 'vue';
|
|
2
|
+
import { ExperimentSummary, PageSelectorItem } from '../types';
|
|
2
3
|
export type PluginHttpMethod = 'get' | 'post' | 'put' | 'patch' | 'delete';
|
|
3
4
|
export interface PluginEndpointContract {
|
|
4
5
|
name: string;
|
|
@@ -71,7 +72,7 @@ export interface UseCurrentExperimentOptions {
|
|
|
71
72
|
apiBaseUrl?: string;
|
|
72
73
|
immediate?: boolean;
|
|
73
74
|
}
|
|
74
|
-
export interface UseCurrentExperimentReturn<TExperiment =
|
|
75
|
+
export interface UseCurrentExperimentReturn<TExperiment = ExperimentSummary> {
|
|
75
76
|
/** Current experiment id resolved from platform injection or URL conventions. */
|
|
76
77
|
experimentId: ComputedRef<number | undefined>;
|
|
77
78
|
/** Whether a current experiment id is available. */
|
|
@@ -93,6 +94,8 @@ export interface UseCurrentExperimentReturn<TExperiment = unknown> {
|
|
|
93
94
|
}
|
|
94
95
|
export type PluginEndpointCaller = (payload?: unknown) => Promise<unknown>;
|
|
95
96
|
export type GeneratedPluginClient = Record<string, (...args: any[]) => Promise<any>>;
|
|
97
|
+
/** Convert PluginMetadata.nav_items into AppTopBar pageSelector items for topbar page switches, homepage PluginCards, and fallback views. */
|
|
98
|
+
export declare function getPluginPageSelectorItems(contract: PluginContract): PageSelectorItem[];
|
|
96
99
|
/** Resolve the runtime plugin API base URL from env, explicit options, platform injection, or contract metadata. */
|
|
97
100
|
export declare function resolvePluginBaseUrl(contract: PluginContract, explicitBaseUrl?: string): string;
|
|
98
101
|
/** Build the concrete URL for a generated plugin endpoint without making a request. */
|
|
@@ -106,4 +109,4 @@ export declare function usePluginSettings<TSettings = Record<string, unknown>>()
|
|
|
106
109
|
settings: ComputedRef<TSettings | undefined>;
|
|
107
110
|
};
|
|
108
111
|
/** Read and optionally load the current platform experiment for integrated plugin views. */
|
|
109
|
-
export declare function useCurrentExperiment<TExperiment =
|
|
112
|
+
export declare function useCurrentExperiment<TExperiment = ExperimentSummary>(options?: UseCurrentExperimentOptions): UseCurrentExperimentReturn<TExperiment>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as usePlatformContext,
|
|
1
|
+
import { F as usePlatformContext, L as useRequestSyncState, b as getInjectedPlatformContext, x as resolveCurrentExperimentId, y as currentExperimentFromContext, z as useApi } from "./useScheduleDrag-BgzpQT53.js";
|
|
2
2
|
import { r as useSettingsStore, t as useAuthStore } from "./auth-QQj2kkze.js";
|
|
3
3
|
import { computed, getCurrentInstance, onMounted, onUnmounted, ref, shallowRef, watch } from "vue";
|
|
4
4
|
import axios from "axios";
|
|
@@ -659,40 +659,52 @@ function usePluginConfig(pluginName) {
|
|
|
659
659
|
};
|
|
660
660
|
}
|
|
661
661
|
//#endregion
|
|
662
|
-
//#region src/composables/usePluginApi.ts
|
|
663
|
-
/**
|
|
664
|
-
* Legacy plugin API client resolving the plugin base URL from VITE_API_PREFIX or a fallback prefix.
|
|
665
|
-
*
|
|
666
|
-
* @deprecated Use `useGeneratedPluginClient()` from `mint sdk generate` for new
|
|
667
|
-
* plugin frontends. This helper remains as a compatibility shim for older
|
|
668
|
-
* plugins that still hand-wire API prefixes.
|
|
669
|
-
*
|
|
670
|
-
* Migration shape for generated plugins:
|
|
671
|
-
* ```ts
|
|
672
|
-
* import { useGeneratedPluginClient } from '../generated/mint-plugin'
|
|
673
|
-
*
|
|
674
|
-
* const pluginClient = useGeneratedPluginClient()
|
|
675
|
-
* ```
|
|
676
|
-
*/
|
|
677
|
-
function usePluginApi(options = {}) {
|
|
678
|
-
return useApi({ baseUrl: options.fallbackPrefix || "/api" });
|
|
679
|
-
}
|
|
680
|
-
//#endregion
|
|
681
662
|
//#region src/composables/usePluginClient.ts
|
|
663
|
+
function normalizeApiBaseUrl(baseUrl) {
|
|
664
|
+
if (!baseUrl) return void 0;
|
|
665
|
+
return baseUrl.length > 1 ? baseUrl.replace(/\/+$/, "") : baseUrl;
|
|
666
|
+
}
|
|
682
667
|
function normalizeApiPrefix(prefix) {
|
|
683
668
|
if (!prefix) return void 0;
|
|
684
|
-
if (prefix.startsWith("/api/")) return prefix;
|
|
669
|
+
if (prefix.startsWith("/api/")) return normalizeApiBaseUrl(prefix);
|
|
685
670
|
if (prefix === "/api") return prefix;
|
|
686
|
-
if (prefix.startsWith("/")) return `/api${prefix}
|
|
687
|
-
return `/api/${prefix}
|
|
671
|
+
if (prefix.startsWith("/")) return normalizeApiBaseUrl(`/api${prefix}`);
|
|
672
|
+
return normalizeApiBaseUrl(`/api/${prefix}`);
|
|
673
|
+
}
|
|
674
|
+
function normalizePluginNavPath(path) {
|
|
675
|
+
const raw = path.trim() || "/";
|
|
676
|
+
return (raw.startsWith("/") ? raw : `/${raw}`).replace(/\/+$/, "") || "/";
|
|
677
|
+
}
|
|
678
|
+
function pluginPageIdFromPath(path, fallbackIndex) {
|
|
679
|
+
const normalizedPath = normalizePluginNavPath(path);
|
|
680
|
+
if (normalizedPath === "/") return "dashboard";
|
|
681
|
+
return normalizedPath.replace(/^\/+/, "").replace(/\/+/g, "-") || `page-${fallbackIndex + 1}`;
|
|
682
|
+
}
|
|
683
|
+
/** Convert PluginMetadata.nav_items into AppTopBar pageSelector items for topbar page switches, homepage PluginCards, and fallback views. */
|
|
684
|
+
function getPluginPageSelectorItems(contract) {
|
|
685
|
+
const pluginIcon = contract.plugin.icon ?? "";
|
|
686
|
+
const navItems = contract.plugin.navItems ?? [];
|
|
687
|
+
return (navItems.length > 0 ? navItems : [{
|
|
688
|
+
path: "/",
|
|
689
|
+
label: contract.plugin.name ?? "Dashboard",
|
|
690
|
+
id: "dashboard",
|
|
691
|
+
icon: pluginIcon || void 0,
|
|
692
|
+
description: contract.plugin.description
|
|
693
|
+
}]).map((item, index) => ({
|
|
694
|
+
id: item.id || pluginPageIdFromPath(item.path, index),
|
|
695
|
+
label: item.label,
|
|
696
|
+
to: normalizePluginNavPath(item.path),
|
|
697
|
+
icon: item.icon || pluginIcon || void 0,
|
|
698
|
+
hint: item.description || contract.plugin.name
|
|
699
|
+
}));
|
|
688
700
|
}
|
|
689
701
|
/** Resolve the runtime plugin API base URL from env, explicit options, platform injection, or contract metadata. */
|
|
690
702
|
function resolvePluginBaseUrl(contract, explicitBaseUrl) {
|
|
691
|
-
if (explicitBaseUrl) return explicitBaseUrl;
|
|
703
|
+
if (explicitBaseUrl) return normalizeApiBaseUrl(explicitBaseUrl) ?? explicitBaseUrl;
|
|
692
704
|
const injected = getInjectedPlatformContext();
|
|
693
|
-
const platformPrefix = injected?.plugin?.api_prefix || normalizeApiPrefix(injected?.plugin?.route_prefix);
|
|
705
|
+
const platformPrefix = normalizeApiBaseUrl(injected?.plugin?.api_prefix) || normalizeApiPrefix(injected?.plugin?.route_prefix);
|
|
694
706
|
if (platformPrefix) return platformPrefix;
|
|
695
|
-
return contract.plugin.apiPrefix || "/api";
|
|
707
|
+
return normalizeApiBaseUrl(contract.plugin.apiPrefix) || "/api";
|
|
696
708
|
}
|
|
697
709
|
function encodePath(path, payload, pathParams) {
|
|
698
710
|
let nextPath = path;
|
|
@@ -882,6 +894,6 @@ function useCurrentExperiment(options = {}) {
|
|
|
882
894
|
};
|
|
883
895
|
}
|
|
884
896
|
//#endregion
|
|
885
|
-
export {
|
|
897
|
+
export { useCurrentExperiment as a, usePluginConfig as c, usePasskey as d, useAuth as f, resolvePluginBaseUrl as i, useAsync as l, createPluginClient as n, usePluginClient as o, getPluginPageSelectorItems as r, usePluginSettings as s, buildPluginEndpointUrl as t, useAsyncBatch as u };
|
|
886
898
|
|
|
887
|
-
//# sourceMappingURL=composables-
|
|
899
|
+
//# sourceMappingURL=composables-CHsME9H1.js.map
|