@morscherlab/mint-sdk 1.0.0-alpha.2
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 +326 -0
- package/dist/__stories__/experiment-helpers.d.ts +25 -0
- package/dist/__tests__/components/AppLayout.test.d.ts +1 -0
- package/dist/__tests__/components/AppSidebar.test.d.ts +1 -0
- package/dist/__tests__/components/AppTopBar.test.d.ts +1 -0
- package/dist/__tests__/components/BaseInput.test.d.ts +1 -0
- package/dist/__tests__/components/BasePill.test.d.ts +1 -0
- package/dist/__tests__/components/Calendar.test.d.ts +1 -0
- package/dist/__tests__/components/CollapsibleCard.test.d.ts +1 -0
- package/dist/__tests__/components/DataFrame.test.d.ts +1 -0
- package/dist/__tests__/components/DropdownButton.test.d.ts +1 -0
- package/dist/__tests__/composables/formBuilderRegistry.test.d.ts +1 -0
- package/dist/__tests__/composables/useAppExperiment.test.d.ts +1 -0
- package/dist/__tests__/composables/useAuth.test.d.ts +1 -0
- package/dist/__tests__/composables/useAutoGroup.test.d.ts +1 -0
- package/dist/__tests__/composables/useExperimentData.test.d.ts +13 -0
- package/dist/__tests__/composables/useExperimentSave.test.d.ts +1 -0
- package/dist/__tests__/composables/useForm.test.d.ts +1 -0
- package/dist/__tests__/composables/useFormBuilder.test.d.ts +1 -0
- package/dist/__tests__/composables/usePlatformContext.test.d.ts +1 -0
- package/dist/__tests__/composables/usePluginApi.test.d.ts +13 -0
- package/dist/__tests__/composables/usePluginConfig.test.d.ts +14 -0
- package/dist/__tests__/utils/color.test.d.ts +1 -0
- package/dist/auth-BYmxZdJl.js +297 -0
- package/dist/auth-BYmxZdJl.js.map +1 -0
- package/dist/components/AlertBox.vue.d.ts +34 -0
- package/dist/components/AppAvatarMenu.vue.d.ts +58 -0
- package/dist/components/AppContainer.vue.d.ts +28 -0
- package/dist/components/AppLayout.vue.d.ts +31 -0
- package/dist/components/AppPageSelector.vue.d.ts +43 -0
- package/dist/components/AppPillNav.vue.d.ts +11 -0
- package/dist/components/AppPluginSwitcher.vue.d.ts +38 -0
- package/dist/components/AppSidebar.vue.d.ts +47 -0
- package/dist/components/AppTopBar.vue.d.ts +111 -0
- package/dist/components/AuditTrail.vue.d.ts +38 -0
- package/dist/components/AutoGroupModal.vue.d.ts +124 -0
- package/dist/components/Avatar.vue.d.ts +14 -0
- package/dist/components/BaseButton.vue.d.ts +37 -0
- package/dist/components/BaseCheckbox.vue.d.ts +17 -0
- package/dist/components/BaseInput.vue.d.ts +34 -0
- package/dist/components/BaseModal.vue.d.ts +46 -0
- package/dist/components/BasePill.vue.d.ts +57 -0
- package/dist/components/BaseRadioGroup.vue.d.ts +21 -0
- package/dist/components/BaseSelect.vue.d.ts +20 -0
- package/dist/components/BaseSlider.vue.d.ts +22 -0
- package/dist/components/BaseTabs.vue.d.ts +14 -0
- package/dist/components/BaseTextarea.vue.d.ts +30 -0
- package/dist/components/BaseToggle.vue.d.ts +19 -0
- package/dist/components/BatchProgressList.vue.d.ts +43 -0
- package/dist/components/Breadcrumb.vue.d.ts +33 -0
- package/dist/components/Calendar.vue.d.ts +107 -0
- package/dist/components/ChartContainer.vue.d.ts +31 -0
- package/dist/components/ChemicalFormula.vue.d.ts +8 -0
- package/dist/components/CollapsibleCard.vue.d.ts +41 -0
- package/dist/components/ColorSlider.vue.d.ts +34 -0
- package/dist/components/ConcentrationInput.vue.d.ts +25 -0
- package/dist/components/ConfirmDialog.vue.d.ts +42 -0
- package/dist/components/DataFrame.vue.d.ts +107 -0
- package/dist/components/DatePicker.vue.d.ts +25 -0
- package/dist/components/DateTimePicker.vue.d.ts +30 -0
- package/dist/components/Divider.vue.d.ts +14 -0
- package/dist/components/DoseCalculator.vue.d.ts +19 -0
- package/dist/components/DropdownButton.vue.d.ts +47 -0
- package/dist/components/EmptyState.vue.d.ts +36 -0
- package/dist/components/ExperimentCodeBadge.vue.d.ts +14 -0
- package/dist/components/ExperimentDataViewer.vue.d.ts +29 -0
- package/dist/components/ExperimentPopover.vue.d.ts +32 -0
- package/dist/components/ExperimentSelectorModal.vue.d.ts +28 -0
- package/dist/components/ExperimentTimeline.vue.d.ts +44 -0
- package/dist/components/FileUploader.vue.d.ts +40 -0
- package/dist/components/FitPanel.vue.d.ts +46 -0
- package/dist/components/FormActions.vue.d.ts +33 -0
- package/dist/components/FormBuilder.vue.d.ts +287 -0
- package/dist/components/FormField.vue.d.ts +28 -0
- package/dist/components/FormFieldRenderer.vue.d.ts +31 -0
- package/dist/components/FormSection.vue.d.ts +43 -0
- package/dist/components/FormulaInput.vue.d.ts +25 -0
- package/dist/components/GroupAssigner.vue.d.ts +25 -0
- package/dist/components/GroupingModal.vue.d.ts +12 -0
- package/dist/components/IconButton.vue.d.ts +34 -0
- package/dist/components/LoadingSpinner.vue.d.ts +12 -0
- package/dist/components/MoleculeInput.vue.d.ts +27 -0
- package/dist/components/MultiSelect.vue.d.ts +19 -0
- package/dist/components/NumberInput.vue.d.ts +22 -0
- package/dist/components/PlateMapEditor.vue.d.ts +50 -0
- package/dist/components/ProgressBar.vue.d.ts +23 -0
- package/dist/components/ProtocolStepEditor.vue.d.ts +24 -0
- package/dist/components/RackEditor.vue.d.ts +40 -0
- package/dist/components/ReagentEditor.vue.d.ts +30 -0
- package/dist/components/ReagentList.vue.d.ts +32 -0
- package/dist/components/ResourceCard.vue.d.ts +50 -0
- package/dist/components/SampleHierarchyTree.vue.d.ts +26 -0
- package/dist/components/SampleLegend.vue.d.ts +32 -0
- package/dist/components/SampleSelector.vue.d.ts +29 -0
- package/dist/components/ScheduleCalendar.vue.d.ts +110 -0
- package/dist/components/ScientificNumber.vue.d.ts +14 -0
- package/dist/components/SegmentedControl.vue.d.ts +20 -0
- package/dist/components/SequenceInput.vue.d.ts +54 -0
- package/dist/components/SettingsButton.vue.d.ts +30 -0
- package/dist/components/SettingsModal.vue.d.ts +36 -0
- package/dist/components/Skeleton.vue.d.ts +11 -0
- package/dist/components/StatusIndicator.vue.d.ts +13 -0
- package/dist/components/StepWizard.vue.d.ts +65 -0
- package/dist/components/TagsInput.vue.d.ts +39 -0
- package/dist/components/ThemeToggle.vue.d.ts +7 -0
- package/dist/components/TimePicker.vue.d.ts +29 -0
- package/dist/components/TimeRangeInput.vue.d.ts +27 -0
- package/dist/components/ToastNotification.vue.d.ts +2 -0
- package/dist/components/Tooltip.vue.d.ts +35 -0
- package/dist/components/UnitInput.vue.d.ts +39 -0
- package/dist/components/WellEditPopup.vue.d.ts +25 -0
- package/dist/components/WellPlate.vue.d.ts +73 -0
- package/dist/components/index.d.ts +87 -0
- package/dist/components/index.js +3 -0
- package/dist/components-CKf-UpGi.js +15089 -0
- package/dist/components-CKf-UpGi.js.map +1 -0
- package/dist/composables/experiment-utils.d.ts +8 -0
- package/dist/composables/formBuilderRegistry.d.ts +13 -0
- package/dist/composables/index.d.ts +28 -0
- package/dist/composables/index.js +3 -0
- package/dist/composables/useApi.d.ts +20 -0
- package/dist/composables/useAppExperiment.d.ts +37 -0
- package/dist/composables/useAsync.d.ts +128 -0
- package/dist/composables/useAuth.d.ts +47 -0
- package/dist/composables/useAutoGroup.d.ts +106 -0
- package/dist/composables/useChemicalFormula.d.ts +21 -0
- package/dist/composables/useConcentrationUnits.d.ts +29 -0
- package/dist/composables/useDoseCalculator.d.ts +58 -0
- package/dist/composables/useExperimentData.d.ts +18 -0
- package/dist/composables/useExperimentSave.d.ts +36 -0
- package/dist/composables/useExperimentSelector.d.ts +30 -0
- package/dist/composables/useForm.d.ts +92 -0
- package/dist/composables/useFormBuilder.d.ts +24 -0
- package/dist/composables/usePasskey.d.ts +10 -0
- package/dist/composables/usePlatformContext.d.ts +131 -0
- package/dist/composables/usePluginApi.d.ts +29 -0
- package/dist/composables/usePluginConfig.d.ts +13 -0
- package/dist/composables/useProtocolTemplates.d.ts +44 -0
- package/dist/composables/useRackEditor.d.ts +31 -0
- package/dist/composables/useReagentSeries.d.ts +23 -0
- package/dist/composables/useScheduleDrag.d.ts +78 -0
- package/dist/composables/useSequenceUtils.d.ts +14 -0
- package/dist/composables/useTheme.d.ts +8 -0
- package/dist/composables/useTimeUtils.d.ts +29 -0
- package/dist/composables/useToast.d.ts +22 -0
- package/dist/composables/useWellPlateEditor.d.ts +33 -0
- package/dist/composables-D0QfFzq1.js +805 -0
- package/dist/composables-D0QfFzq1.js.map +1 -0
- package/dist/histoire.setup.d.ts +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +7 -0
- package/dist/install.d.ts +16 -0
- package/dist/install.js +23 -0
- package/dist/install.js.map +1 -0
- package/dist/stores/auth.d.ts +146 -0
- package/dist/stores/index.d.ts +2 -0
- package/dist/stores/index.js +2 -0
- package/dist/stores/settings.d.ts +75 -0
- package/dist/styles.css +29728 -0
- package/dist/tailwind.preset.d.ts +58 -0
- package/dist/tailwind.preset.js +66 -0
- package/dist/tailwind.preset.js.map +1 -0
- package/dist/types/auth.d.ts +42 -0
- package/dist/types/auto-group.d.ts +34 -0
- package/dist/types/components.d.ts +528 -0
- package/dist/types/form-builder.d.ts +167 -0
- package/dist/types/index.d.ts +5 -0
- package/dist/types/index.js +0 -0
- package/dist/types/platform.d.ts +75 -0
- package/dist/useScheduleDrag-DAJueTbK.js +7181 -0
- package/dist/useScheduleDrag-DAJueTbK.js.map +1 -0
- package/dist/utils/color.d.ts +24 -0
- package/package.json +114 -0
- package/src/__stories__/experiment-helpers.ts +83 -0
- package/src/__tests__/components/AppLayout.test.ts +163 -0
- package/src/__tests__/components/AppSidebar.test.ts +292 -0
- package/src/__tests__/components/AppTopBar.test.ts +683 -0
- package/src/__tests__/components/BaseInput.test.ts +99 -0
- package/src/__tests__/components/BasePill.test.ts +291 -0
- package/src/__tests__/components/Calendar.test.ts +566 -0
- package/src/__tests__/components/CollapsibleCard.test.ts +524 -0
- package/src/__tests__/components/DataFrame.test.ts +767 -0
- package/src/__tests__/components/DropdownButton.test.ts +471 -0
- package/src/__tests__/composables/formBuilderRegistry.test.ts +187 -0
- package/src/__tests__/composables/useAppExperiment.test.ts +560 -0
- package/src/__tests__/composables/useAuth.test.ts +188 -0
- package/src/__tests__/composables/useAutoGroup.test.ts +860 -0
- package/src/__tests__/composables/useExperimentData.test.ts +127 -0
- package/src/__tests__/composables/useExperimentSave.test.ts +347 -0
- package/src/__tests__/composables/useForm.test.ts +205 -0
- package/src/__tests__/composables/useFormBuilder.test.ts +917 -0
- package/src/__tests__/composables/usePlatformContext.test.ts +116 -0
- package/src/__tests__/composables/usePluginApi.test.ts +81 -0
- package/src/__tests__/composables/usePluginConfig.test.ts +176 -0
- package/src/__tests__/utils/color.test.ts +96 -0
- package/src/components/AlertBox.story.vue +204 -0
- package/src/components/AlertBox.vue +88 -0
- package/src/components/AppAvatarMenu.story.vue +155 -0
- package/src/components/AppAvatarMenu.vue +184 -0
- package/src/components/AppContainer.story.vue +104 -0
- package/src/components/AppContainer.vue +34 -0
- package/src/components/AppLayout.story.vue +292 -0
- package/src/components/AppLayout.vue +75 -0
- package/src/components/AppPageSelector.vue +159 -0
- package/src/components/AppPillNav.vue +66 -0
- package/src/components/AppPluginSwitcher.vue +241 -0
- package/src/components/AppSidebar.story.vue +309 -0
- package/src/components/AppSidebar.vue +119 -0
- package/src/components/AppTopBar.story.vue +304 -0
- package/src/components/AppTopBar.vue +661 -0
- package/src/components/AuditTrail.story.vue +163 -0
- package/src/components/AuditTrail.vue +151 -0
- package/src/components/AutoGroupModal.story.vue +273 -0
- package/src/components/AutoGroupModal.vue +566 -0
- package/src/components/Avatar.story.vue +115 -0
- package/src/components/Avatar.vue +79 -0
- package/src/components/BaseButton.story.vue +96 -0
- package/src/components/BaseButton.vue +73 -0
- package/src/components/BaseCheckbox.story.vue +73 -0
- package/src/components/BaseCheckbox.vue +69 -0
- package/src/components/BaseInput.story.vue +98 -0
- package/src/components/BaseInput.vue +74 -0
- package/src/components/BaseModal.story.vue +237 -0
- package/src/components/BaseModal.vue +182 -0
- package/src/components/BasePill.story.vue +142 -0
- package/src/components/BasePill.vue +89 -0
- package/src/components/BaseRadioGroup.story.vue +145 -0
- package/src/components/BaseRadioGroup.vue +124 -0
- package/src/components/BaseSelect.story.vue +120 -0
- package/src/components/BaseSelect.vue +71 -0
- package/src/components/BaseSlider.story.vue +122 -0
- package/src/components/BaseSlider.vue +126 -0
- package/src/components/BaseTabs.story.vue +127 -0
- package/src/components/BaseTabs.vue +59 -0
- package/src/components/BaseTextarea.story.vue +91 -0
- package/src/components/BaseTextarea.vue +62 -0
- package/src/components/BaseToggle.story.vue +81 -0
- package/src/components/BaseToggle.vue +76 -0
- package/src/components/BatchProgressList.story.vue +92 -0
- package/src/components/BatchProgressList.vue +184 -0
- package/src/components/Breadcrumb.story.vue +106 -0
- package/src/components/Breadcrumb.vue +75 -0
- package/src/components/Calendar.story.vue +106 -0
- package/src/components/Calendar.vue +363 -0
- package/src/components/ChartContainer.story.vue +113 -0
- package/src/components/ChartContainer.vue +64 -0
- package/src/components/ChemicalFormula.story.vue +102 -0
- package/src/components/ChemicalFormula.vue +39 -0
- package/src/components/CollapsibleCard.story.vue +135 -0
- package/src/components/CollapsibleCard.vue +167 -0
- package/src/components/ColorSlider.story.vue +120 -0
- package/src/components/ColorSlider.vue +164 -0
- package/src/components/ConcentrationInput.story.vue +77 -0
- package/src/components/ConcentrationInput.vue +185 -0
- package/src/components/ConfirmDialog.story.vue +248 -0
- package/src/components/ConfirmDialog.vue +93 -0
- package/src/components/DataFrame.story.vue +148 -0
- package/src/components/DataFrame.vue +419 -0
- package/src/components/DatePicker.story.vue +119 -0
- package/src/components/DatePicker.vue +330 -0
- package/src/components/DateTimePicker.story.vue +112 -0
- package/src/components/DateTimePicker.vue +392 -0
- package/src/components/Divider.story.vue +80 -0
- package/src/components/Divider.vue +49 -0
- package/src/components/DoseCalculator.story.vue +68 -0
- package/src/components/DoseCalculator.vue +476 -0
- package/src/components/DropdownButton.story.vue +102 -0
- package/src/components/DropdownButton.vue +181 -0
- package/src/components/EmptyState.story.vue +135 -0
- package/src/components/EmptyState.vue +69 -0
- package/src/components/ExperimentCodeBadge.story.vue +77 -0
- package/src/components/ExperimentCodeBadge.vue +64 -0
- package/src/components/ExperimentDataViewer.story.vue +174 -0
- package/src/components/ExperimentDataViewer.vue +288 -0
- package/src/components/ExperimentPopover.story.vue +384 -0
- package/src/components/ExperimentPopover.vue +241 -0
- package/src/components/ExperimentSelectorModal.story.vue +391 -0
- package/src/components/ExperimentSelectorModal.vue +387 -0
- package/src/components/ExperimentTimeline.story.vue +161 -0
- package/src/components/ExperimentTimeline.vue +382 -0
- package/src/components/FileUploader.story.vue +107 -0
- package/src/components/FileUploader.vue +386 -0
- package/src/components/FitPanel.story.vue +125 -0
- package/src/components/FitPanel.vue +120 -0
- package/src/components/FormActions.vue +92 -0
- package/src/components/FormBuilder.vue +214 -0
- package/src/components/FormField.story.vue +132 -0
- package/src/components/FormField.vue +59 -0
- package/src/components/FormFieldRenderer.vue +58 -0
- package/src/components/FormSection.vue +90 -0
- package/src/components/FormulaInput.story.vue +96 -0
- package/src/components/FormulaInput.vue +125 -0
- package/src/components/GroupAssigner.story.vue +83 -0
- package/src/components/GroupAssigner.vue +284 -0
- package/src/components/GroupingModal.story.vue +52 -0
- package/src/components/GroupingModal.vue +422 -0
- package/src/components/IconButton.story.vue +135 -0
- package/src/components/IconButton.vue +73 -0
- package/src/components/LoadingSpinner.story.vue +70 -0
- package/src/components/LoadingSpinner.vue +50 -0
- package/src/components/MoleculeInput.story.vue +66 -0
- package/src/components/MoleculeInput.vue +426 -0
- package/src/components/MultiSelect.story.vue +132 -0
- package/src/components/MultiSelect.vue +118 -0
- package/src/components/NumberInput.story.vue +122 -0
- package/src/components/NumberInput.vue +160 -0
- package/src/components/PlateMapEditor.story.vue +92 -0
- package/src/components/PlateMapEditor.vue +513 -0
- package/src/components/ProgressBar.story.vue +148 -0
- package/src/components/ProgressBar.vue +114 -0
- package/src/components/ProtocolStepEditor.story.vue +69 -0
- package/src/components/ProtocolStepEditor.vue +522 -0
- package/src/components/RackEditor.story.vue +100 -0
- package/src/components/RackEditor.vue +371 -0
- package/src/components/ReagentEditor.story.vue +153 -0
- package/src/components/ReagentEditor.vue +418 -0
- package/src/components/ReagentList.story.vue +137 -0
- package/src/components/ReagentList.vue +463 -0
- package/src/components/ResourceCard.story.vue +150 -0
- package/src/components/ResourceCard.vue +161 -0
- package/src/components/SampleHierarchyTree.story.vue +161 -0
- package/src/components/SampleHierarchyTree.vue +256 -0
- package/src/components/SampleLegend.story.vue +91 -0
- package/src/components/SampleLegend.vue +119 -0
- package/src/components/SampleSelector.story.vue +111 -0
- package/src/components/SampleSelector.vue +1033 -0
- package/src/components/ScheduleCalendar.story.vue +195 -0
- package/src/components/ScheduleCalendar.vue +569 -0
- package/src/components/ScientificNumber.story.vue +127 -0
- package/src/components/ScientificNumber.vue +197 -0
- package/src/components/SegmentedControl.story.vue +132 -0
- package/src/components/SegmentedControl.vue +79 -0
- package/src/components/SequenceInput.story.vue +119 -0
- package/src/components/SequenceInput.vue +209 -0
- package/src/components/SettingsButton.story.vue +58 -0
- package/src/components/SettingsButton.vue +76 -0
- package/src/components/SettingsModal.story.vue +145 -0
- package/src/components/SettingsModal.vue +146 -0
- package/src/components/Skeleton.story.vue +141 -0
- package/src/components/Skeleton.vue +74 -0
- package/src/components/StatusIndicator.story.vue +99 -0
- package/src/components/StatusIndicator.vue +40 -0
- package/src/components/StepWizard.story.vue +155 -0
- package/src/components/StepWizard.vue +223 -0
- package/src/components/TagsInput.story.vue +155 -0
- package/src/components/TagsInput.vue +265 -0
- package/src/components/ThemeToggle.story.vue +36 -0
- package/src/components/ThemeToggle.vue +54 -0
- package/src/components/TimePicker.story.vue +96 -0
- package/src/components/TimePicker.vue +273 -0
- package/src/components/TimeRangeInput.story.vue +104 -0
- package/src/components/TimeRangeInput.vue +122 -0
- package/src/components/ToastNotification.story.vue +157 -0
- package/src/components/ToastNotification.vue +62 -0
- package/src/components/Tooltip.story.vue +138 -0
- package/src/components/Tooltip.vue +119 -0
- package/src/components/UnitInput.story.vue +194 -0
- package/src/components/UnitInput.vue +213 -0
- package/src/components/WellEditPopup.vue +234 -0
- package/src/components/WellPlate.story.vue +282 -0
- package/src/components/WellPlate.vue +830 -0
- package/src/components/index.ts +118 -0
- package/src/composables/experiment-utils.ts +57 -0
- package/src/composables/formBuilderRegistry.ts +79 -0
- package/src/composables/index.ts +140 -0
- package/src/composables/useApi.ts +167 -0
- package/src/composables/useAppExperiment.ts +159 -0
- package/src/composables/useAsync.ts +323 -0
- package/src/composables/useAuth.ts +445 -0
- package/src/composables/useAutoGroup.ts +641 -0
- package/src/composables/useChemicalFormula.ts +275 -0
- package/src/composables/useConcentrationUnits.ts +246 -0
- package/src/composables/useDoseCalculator.ts +370 -0
- package/src/composables/useExperimentData.ts +86 -0
- package/src/composables/useExperimentSave.ts +192 -0
- package/src/composables/useExperimentSelector.ts +292 -0
- package/src/composables/useForm.ts +416 -0
- package/src/composables/useFormBuilder.ts +383 -0
- package/src/composables/usePasskey.ts +216 -0
- package/src/composables/usePlatformContext.ts +299 -0
- package/src/composables/usePluginApi.ts +39 -0
- package/src/composables/usePluginConfig.ts +93 -0
- package/src/composables/useProtocolTemplates.ts +518 -0
- package/src/composables/useRackEditor.ts +222 -0
- package/src/composables/useReagentSeries.ts +91 -0
- package/src/composables/useScheduleDrag.ts +245 -0
- package/src/composables/useSequenceUtils.ts +105 -0
- package/src/composables/useTheme.ts +58 -0
- package/src/composables/useTimeUtils.ts +131 -0
- package/src/composables/useToast.ts +40 -0
- package/src/composables/useWellPlateEditor.ts +421 -0
- package/src/histoire.setup.ts +17 -0
- package/src/index.ts +367 -0
- package/src/install.ts +32 -0
- package/src/stores/auth.ts +152 -0
- package/src/stores/index.ts +2 -0
- package/src/stores/settings.ts +218 -0
- package/src/styles/components/alert-box.css +150 -0
- package/src/styles/components/app-avatar-menu.css +155 -0
- package/src/styles/components/app-container.css +33 -0
- package/src/styles/components/app-layout.css +98 -0
- package/src/styles/components/app-page-selector.css +191 -0
- package/src/styles/components/app-pill-nav.css +57 -0
- package/src/styles/components/app-plugin-switcher.css +209 -0
- package/src/styles/components/app-sidebar.css +145 -0
- package/src/styles/components/app-top-bar.css +492 -0
- package/src/styles/components/audit-trail.css +143 -0
- package/src/styles/components/auto-group-modal.css +644 -0
- package/src/styles/components/avatar.css +73 -0
- package/src/styles/components/batch-progress-list.css +196 -0
- package/src/styles/components/breadcrumb.css +64 -0
- package/src/styles/components/button.css +188 -0
- package/src/styles/components/calendar.css +192 -0
- package/src/styles/components/chart-container.css +69 -0
- package/src/styles/components/checkbox.css +123 -0
- package/src/styles/components/chemical-formula.css +46 -0
- package/src/styles/components/collapsible-card.css +253 -0
- package/src/styles/components/color-slider.css +110 -0
- package/src/styles/components/concentration-input.css +156 -0
- package/src/styles/components/confirm-dialog.css +183 -0
- package/src/styles/components/dataframe.css +382 -0
- package/src/styles/components/date-picker.css +243 -0
- package/src/styles/components/datetime-picker.css +229 -0
- package/src/styles/components/divider.css +63 -0
- package/src/styles/components/dose-calculator.css +301 -0
- package/src/styles/components/dropdown-button.css +280 -0
- package/src/styles/components/empty-state.css +151 -0
- package/src/styles/components/experiment-code-badge.css +33 -0
- package/src/styles/components/experiment-data-viewer.css +138 -0
- package/src/styles/components/experiment-popover.css +562 -0
- package/src/styles/components/experiment-selector-modal.css +285 -0
- package/src/styles/components/experiment-timeline.css +529 -0
- package/src/styles/components/file-uploader.css +310 -0
- package/src/styles/components/fit-panel.css +67 -0
- package/src/styles/components/form-builder.css +69 -0
- package/src/styles/components/form-field.css +48 -0
- package/src/styles/components/formula-input.css +103 -0
- package/src/styles/components/group-assigner.css +200 -0
- package/src/styles/components/grouping-modal.css +323 -0
- package/src/styles/components/icon-button.css +192 -0
- package/src/styles/components/input.css +66 -0
- package/src/styles/components/loading-spinner.css +67 -0
- package/src/styles/components/modal.css +350 -0
- package/src/styles/components/molecule-input.css +186 -0
- package/src/styles/components/multi-select.css +131 -0
- package/src/styles/components/number-input.css +199 -0
- package/src/styles/components/pill.css +188 -0
- package/src/styles/components/plate-map-editor.css +464 -0
- package/src/styles/components/progress-bar.css +133 -0
- package/src/styles/components/protocol-step-editor.css +449 -0
- package/src/styles/components/rack-editor.css +265 -0
- package/src/styles/components/radio-group.css +240 -0
- package/src/styles/components/reagent-editor.css +510 -0
- package/src/styles/components/reagent-list.css +407 -0
- package/src/styles/components/resource-card.css +360 -0
- package/src/styles/components/sample-hierarchy-tree.css +314 -0
- package/src/styles/components/sample-legend.css +201 -0
- package/src/styles/components/sample-selector.css +751 -0
- package/src/styles/components/schedule-calendar.css +478 -0
- package/src/styles/components/scientific-number.css +63 -0
- package/src/styles/components/segmented-control.css +197 -0
- package/src/styles/components/select.css +77 -0
- package/src/styles/components/sequence-input.css +184 -0
- package/src/styles/components/settings-button.css +94 -0
- package/src/styles/components/settings-modal.css +95 -0
- package/src/styles/components/skeleton.css +49 -0
- package/src/styles/components/slider.css +74 -0
- package/src/styles/components/status-indicator.css +66 -0
- package/src/styles/components/step-wizard.css +192 -0
- package/src/styles/components/tabs.css +95 -0
- package/src/styles/components/tags-input.css +195 -0
- package/src/styles/components/textarea.css +82 -0
- package/src/styles/components/theme-toggle.css +69 -0
- package/src/styles/components/time-picker.css +171 -0
- package/src/styles/components/time-range-input.css +42 -0
- package/src/styles/components/toast.css +91 -0
- package/src/styles/components/toggle.css +146 -0
- package/src/styles/components/tooltip.css +91 -0
- package/src/styles/components/unit-input.css +123 -0
- package/src/styles/components/well-edit-popup.css +252 -0
- package/src/styles/components/well-plate.css +307 -0
- package/src/styles/index.css +87 -0
- package/src/styles/variables.css +1117 -0
- package/src/tailwind.preset.ts +61 -0
- package/src/types/auth.ts +55 -0
- package/src/types/auto-group.ts +40 -0
- package/src/types/components.ts +710 -0
- package/src/types/form-builder.ts +197 -0
- package/src/types/index.ts +207 -0
- package/src/types/platform.ts +116 -0
- package/src/utils/color.ts +96 -0
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
/** Dropdown menu for switching between installed plugins with color swatches, version badges, and an install link. */
|
|
3
|
+
import { ref, onMounted, onUnmounted } from 'vue'
|
|
4
|
+
import type { PluginSwitcherPlugin } from '../types/components'
|
|
5
|
+
|
|
6
|
+
interface Props {
|
|
7
|
+
current: PluginSwitcherPlugin
|
|
8
|
+
plugins?: PluginSwitcherPlugin[]
|
|
9
|
+
installLabel?: string
|
|
10
|
+
installTo?: string
|
|
11
|
+
installHref?: string
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
15
|
+
plugins: () => [] as PluginSwitcherPlugin[],
|
|
16
|
+
installLabel: 'Install plugin…',
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
const emit = defineEmits<{
|
|
20
|
+
select: [plugin: PluginSwitcherPlugin]
|
|
21
|
+
'install-click': []
|
|
22
|
+
}>()
|
|
23
|
+
|
|
24
|
+
const isOpen = ref(false)
|
|
25
|
+
const rootRef = ref<HTMLElement | null>(null)
|
|
26
|
+
|
|
27
|
+
function initialsOf(plugin: PluginSwitcherPlugin) {
|
|
28
|
+
const label = plugin.label || plugin.id
|
|
29
|
+
return label.slice(0, 2).toUpperCase()
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function toggle() {
|
|
33
|
+
isOpen.value = !isOpen.value
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function handleSelect(plugin: PluginSwitcherPlugin) {
|
|
37
|
+
if (plugin.id === props.current.id) {
|
|
38
|
+
isOpen.value = false
|
|
39
|
+
return
|
|
40
|
+
}
|
|
41
|
+
emit('select', plugin)
|
|
42
|
+
isOpen.value = false
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
function handleInstall() {
|
|
46
|
+
emit('install-click')
|
|
47
|
+
isOpen.value = false
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function handleClickOutside(event: MouseEvent) {
|
|
51
|
+
if (!isOpen.value) return
|
|
52
|
+
const target = event.target as Node
|
|
53
|
+
if (rootRef.value && !rootRef.value.contains(target)) {
|
|
54
|
+
isOpen.value = false
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function handleKeydown(event: KeyboardEvent) {
|
|
59
|
+
if (event.key === 'Escape' && isOpen.value) {
|
|
60
|
+
isOpen.value = false
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
onMounted(() => {
|
|
65
|
+
document.addEventListener('click', handleClickOutside)
|
|
66
|
+
document.addEventListener('keydown', handleKeydown)
|
|
67
|
+
})
|
|
68
|
+
|
|
69
|
+
onUnmounted(() => {
|
|
70
|
+
document.removeEventListener('click', handleClickOutside)
|
|
71
|
+
document.removeEventListener('keydown', handleKeydown)
|
|
72
|
+
})
|
|
73
|
+
</script>
|
|
74
|
+
|
|
75
|
+
<template>
|
|
76
|
+
<div ref="rootRef" class="mld-plugin-switcher">
|
|
77
|
+
<button
|
|
78
|
+
type="button"
|
|
79
|
+
class="mld-plugin-switcher__trigger"
|
|
80
|
+
:class="{ 'mld-plugin-switcher__trigger--open': isOpen }"
|
|
81
|
+
:aria-expanded="isOpen"
|
|
82
|
+
aria-haspopup="menu"
|
|
83
|
+
@click.stop="toggle"
|
|
84
|
+
>
|
|
85
|
+
<span class="mld-plugin-switcher__label">{{ current.label }}</span>
|
|
86
|
+
<span v-if="current.version" class="mld-plugin-switcher__version">v{{ current.version }}</span>
|
|
87
|
+
<span class="mld-plugin-switcher__chevron-wrap" aria-hidden="true">
|
|
88
|
+
<svg
|
|
89
|
+
class="mld-plugin-switcher__chevron"
|
|
90
|
+
:class="{ 'mld-plugin-switcher__chevron--open': isOpen }"
|
|
91
|
+
viewBox="0 0 24 24"
|
|
92
|
+
fill="none"
|
|
93
|
+
stroke="currentColor"
|
|
94
|
+
stroke-width="2"
|
|
95
|
+
stroke-linecap="round"
|
|
96
|
+
stroke-linejoin="round"
|
|
97
|
+
>
|
|
98
|
+
<path d="m6 9 6 6 6-6" />
|
|
99
|
+
</svg>
|
|
100
|
+
</span>
|
|
101
|
+
</button>
|
|
102
|
+
|
|
103
|
+
<div v-if="isOpen" class="mld-plugin-switcher__menu" role="menu">
|
|
104
|
+
<div class="mld-plugin-switcher__menu-title">Switch plugin</div>
|
|
105
|
+
<template v-for="plugin in plugins" :key="plugin.id">
|
|
106
|
+
<a
|
|
107
|
+
v-if="plugin.href"
|
|
108
|
+
:href="plugin.href"
|
|
109
|
+
:class="[
|
|
110
|
+
'mld-plugin-switcher__item',
|
|
111
|
+
{ 'mld-plugin-switcher__item--active': plugin.id === current.id },
|
|
112
|
+
]"
|
|
113
|
+
role="menuitem"
|
|
114
|
+
@click="handleSelect(plugin)"
|
|
115
|
+
>
|
|
116
|
+
<span
|
|
117
|
+
class="mld-plugin-switcher__item-swatch"
|
|
118
|
+
:style="{ background: plugin.color ?? 'var(--color-primary)' }"
|
|
119
|
+
>
|
|
120
|
+
{{ initialsOf(plugin) }}
|
|
121
|
+
</span>
|
|
122
|
+
<span class="mld-plugin-switcher__item-label">{{ plugin.label }}</span>
|
|
123
|
+
<span v-if="plugin.version" class="mld-plugin-switcher__item-version">v{{ plugin.version }}</span>
|
|
124
|
+
<svg
|
|
125
|
+
v-if="plugin.id === current.id"
|
|
126
|
+
class="mld-plugin-switcher__item-check"
|
|
127
|
+
viewBox="0 0 24 24"
|
|
128
|
+
fill="none"
|
|
129
|
+
stroke="currentColor"
|
|
130
|
+
stroke-width="2.5"
|
|
131
|
+
stroke-linecap="round"
|
|
132
|
+
stroke-linejoin="round"
|
|
133
|
+
aria-hidden="true"
|
|
134
|
+
>
|
|
135
|
+
<path d="M5 13l4 4L19 7" />
|
|
136
|
+
</svg>
|
|
137
|
+
</a>
|
|
138
|
+
<router-link
|
|
139
|
+
v-else-if="plugin.to"
|
|
140
|
+
:to="plugin.to"
|
|
141
|
+
:class="[
|
|
142
|
+
'mld-plugin-switcher__item',
|
|
143
|
+
{ 'mld-plugin-switcher__item--active': plugin.id === current.id },
|
|
144
|
+
]"
|
|
145
|
+
role="menuitem"
|
|
146
|
+
@click="handleSelect(plugin)"
|
|
147
|
+
>
|
|
148
|
+
<span
|
|
149
|
+
class="mld-plugin-switcher__item-swatch"
|
|
150
|
+
:style="{ background: plugin.color ?? 'var(--color-primary)' }"
|
|
151
|
+
>
|
|
152
|
+
{{ initialsOf(plugin) }}
|
|
153
|
+
</span>
|
|
154
|
+
<span class="mld-plugin-switcher__item-label">{{ plugin.label }}</span>
|
|
155
|
+
<span v-if="plugin.version" class="mld-plugin-switcher__item-version">v{{ plugin.version }}</span>
|
|
156
|
+
<svg
|
|
157
|
+
v-if="plugin.id === current.id"
|
|
158
|
+
class="mld-plugin-switcher__item-check"
|
|
159
|
+
viewBox="0 0 24 24"
|
|
160
|
+
fill="none"
|
|
161
|
+
stroke="currentColor"
|
|
162
|
+
stroke-width="2.5"
|
|
163
|
+
stroke-linecap="round"
|
|
164
|
+
stroke-linejoin="round"
|
|
165
|
+
aria-hidden="true"
|
|
166
|
+
>
|
|
167
|
+
<path d="M5 13l4 4L19 7" />
|
|
168
|
+
</svg>
|
|
169
|
+
</router-link>
|
|
170
|
+
<button
|
|
171
|
+
v-else
|
|
172
|
+
type="button"
|
|
173
|
+
:class="[
|
|
174
|
+
'mld-plugin-switcher__item',
|
|
175
|
+
{ 'mld-plugin-switcher__item--active': plugin.id === current.id },
|
|
176
|
+
]"
|
|
177
|
+
role="menuitem"
|
|
178
|
+
@click="handleSelect(plugin)"
|
|
179
|
+
>
|
|
180
|
+
<span
|
|
181
|
+
class="mld-plugin-switcher__item-swatch"
|
|
182
|
+
:style="{ background: plugin.color ?? 'var(--color-primary)' }"
|
|
183
|
+
>
|
|
184
|
+
{{ initialsOf(plugin) }}
|
|
185
|
+
</span>
|
|
186
|
+
<span class="mld-plugin-switcher__item-label">{{ plugin.label }}</span>
|
|
187
|
+
<span v-if="plugin.version" class="mld-plugin-switcher__item-version">v{{ plugin.version }}</span>
|
|
188
|
+
<svg
|
|
189
|
+
v-if="plugin.id === current.id"
|
|
190
|
+
class="mld-plugin-switcher__item-check"
|
|
191
|
+
viewBox="0 0 24 24"
|
|
192
|
+
fill="none"
|
|
193
|
+
stroke="currentColor"
|
|
194
|
+
stroke-width="2.5"
|
|
195
|
+
stroke-linecap="round"
|
|
196
|
+
stroke-linejoin="round"
|
|
197
|
+
aria-hidden="true"
|
|
198
|
+
>
|
|
199
|
+
<path d="M5 13l4 4L19 7" />
|
|
200
|
+
</svg>
|
|
201
|
+
</button>
|
|
202
|
+
</template>
|
|
203
|
+
|
|
204
|
+
<template v-if="plugins.length && (installHref || installTo || $slots.install)">
|
|
205
|
+
<div class="mld-plugin-switcher__divider" role="separator" />
|
|
206
|
+
</template>
|
|
207
|
+
<slot name="install">
|
|
208
|
+
<a
|
|
209
|
+
v-if="installHref"
|
|
210
|
+
:href="installHref"
|
|
211
|
+
class="mld-plugin-switcher__install"
|
|
212
|
+
role="menuitem"
|
|
213
|
+
@click="handleInstall"
|
|
214
|
+
>
|
|
215
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
|
216
|
+
<line x1="12" y1="5" x2="12" y2="19" />
|
|
217
|
+
<line x1="5" y1="12" x2="19" y2="12" />
|
|
218
|
+
</svg>
|
|
219
|
+
<span>{{ installLabel }}</span>
|
|
220
|
+
</a>
|
|
221
|
+
<router-link
|
|
222
|
+
v-else-if="installTo"
|
|
223
|
+
:to="installTo"
|
|
224
|
+
class="mld-plugin-switcher__install"
|
|
225
|
+
role="menuitem"
|
|
226
|
+
@click="handleInstall"
|
|
227
|
+
>
|
|
228
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
|
229
|
+
<line x1="12" y1="5" x2="12" y2="19" />
|
|
230
|
+
<line x1="5" y1="12" x2="19" y2="12" />
|
|
231
|
+
</svg>
|
|
232
|
+
<span>{{ installLabel }}</span>
|
|
233
|
+
</router-link>
|
|
234
|
+
</slot>
|
|
235
|
+
</div>
|
|
236
|
+
</div>
|
|
237
|
+
</template>
|
|
238
|
+
|
|
239
|
+
<style>
|
|
240
|
+
@import '../styles/components/app-plugin-switcher.css';
|
|
241
|
+
</style>
|
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { ref, reactive } from 'vue'
|
|
3
|
+
import AppSidebar from './AppSidebar.vue'
|
|
4
|
+
import BaseSlider from './BaseSlider.vue'
|
|
5
|
+
import BaseSelect from './BaseSelect.vue'
|
|
6
|
+
import BaseToggle from './BaseToggle.vue'
|
|
7
|
+
import BaseButton from './BaseButton.vue'
|
|
8
|
+
import BaseInput from './BaseInput.vue'
|
|
9
|
+
import NumberInput from './NumberInput.vue'
|
|
10
|
+
import FileUploader from './FileUploader.vue'
|
|
11
|
+
import FormField from './FormField.vue'
|
|
12
|
+
import type { SidebarToolSection } from '../types'
|
|
13
|
+
|
|
14
|
+
/* --- Icon paths (Lucide-style) --- */
|
|
15
|
+
const icons = {
|
|
16
|
+
upload: ['M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4', 'M17 8l-5-5-5 5', 'M12 3v12'],
|
|
17
|
+
fileText: ['M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z', 'M14 2v6h6', 'M16 13H8', 'M16 17H8', 'M10 9H8'],
|
|
18
|
+
shuffle: ['M16 3h5v5', 'M4 20L21 3', 'M21 16v5h-5', 'M15 15l6 6', 'M4 4l5 5'],
|
|
19
|
+
zap: 'M13 2L3 14h9l-1 8 10-12h-9l1-8',
|
|
20
|
+
route: ['M18 6l-6 6-4-4-6 6'],
|
|
21
|
+
settings: ['M12 2L2 7l10 5 10-5-10-5z', 'M2 17l10 5 10-5', 'M2 12l10 5 10-5'],
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/* --- Sequence builder panels --- */
|
|
25
|
+
const sequencePanels: Record<string, SidebarToolSection[]> = {
|
|
26
|
+
sequence: [
|
|
27
|
+
{
|
|
28
|
+
id: 'import',
|
|
29
|
+
label: 'Import Layout',
|
|
30
|
+
subtitle: 'Upload from Excel',
|
|
31
|
+
icon: icons.upload,
|
|
32
|
+
iconColor: '#3b82f6',
|
|
33
|
+
iconBg: '#dbeafe',
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
id: 'naming',
|
|
37
|
+
label: 'Experiment & Naming',
|
|
38
|
+
subtitle: 'exp001_260210_XP_M...',
|
|
39
|
+
icon: icons.fileText,
|
|
40
|
+
iconColor: '#6366f1',
|
|
41
|
+
iconBg: '#e0e7ff',
|
|
42
|
+
showToggle: true,
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
id: 'randomize',
|
|
46
|
+
label: 'Randomize Samples',
|
|
47
|
+
subtitle: 'Sequential order',
|
|
48
|
+
icon: icons.shuffle,
|
|
49
|
+
iconColor: '#6366f1',
|
|
50
|
+
iconBg: '#e0e7ff',
|
|
51
|
+
showToggle: true,
|
|
52
|
+
defaultOpen: false,
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
id: 'acquisition',
|
|
56
|
+
label: 'Acquisition',
|
|
57
|
+
subtitle: 'NEG, VIAL',
|
|
58
|
+
icon: icons.zap,
|
|
59
|
+
iconColor: '#ef4444',
|
|
60
|
+
iconBg: '#fee2e2',
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
id: 'method',
|
|
64
|
+
label: 'Method & Path',
|
|
65
|
+
subtitle: 'Select method',
|
|
66
|
+
icon: icons.route,
|
|
67
|
+
iconColor: '#8b5cf6',
|
|
68
|
+
iconBg: '#ede9fe',
|
|
69
|
+
defaultOpen: false,
|
|
70
|
+
},
|
|
71
|
+
],
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/* --- Simple panels for basic demo --- */
|
|
75
|
+
const simplePanels: Record<string, SidebarToolSection[]> = {
|
|
76
|
+
analysis: [
|
|
77
|
+
{
|
|
78
|
+
id: 'parameters',
|
|
79
|
+
label: 'Parameters',
|
|
80
|
+
subtitle: 'Analysis settings',
|
|
81
|
+
icon: ['M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z', 'M12 8a4 4 0 1 0 0 8 4 4 0 0 0 0-8z'],
|
|
82
|
+
iconColor: '#6366f1',
|
|
83
|
+
iconBg: '#e0e7ff',
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
id: 'filters',
|
|
87
|
+
label: 'Filters',
|
|
88
|
+
subtitle: 'Refine results',
|
|
89
|
+
icon: ['M22 3H2l8 9.46V19l4 2v-8.54L22 3'],
|
|
90
|
+
iconColor: '#0ea5e9',
|
|
91
|
+
iconBg: '#e0f2fe',
|
|
92
|
+
defaultOpen: false,
|
|
93
|
+
},
|
|
94
|
+
],
|
|
95
|
+
results: [
|
|
96
|
+
{
|
|
97
|
+
id: 'display',
|
|
98
|
+
label: 'Display Options',
|
|
99
|
+
subtitle: 'Chart and table settings',
|
|
100
|
+
icon: ['M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z', 'M12 9a3 3 0 1 0 0 6 3 3 0 0 0 0-6z'],
|
|
101
|
+
iconColor: '#8b5cf6',
|
|
102
|
+
iconBg: '#ede9fe',
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
id: 'export',
|
|
106
|
+
label: 'Export',
|
|
107
|
+
subtitle: 'Download data',
|
|
108
|
+
icon: ['M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4', 'M7 10l5 5 5-5', 'M12 15V3'],
|
|
109
|
+
iconColor: '#10b981',
|
|
110
|
+
iconBg: '#d1fae5',
|
|
111
|
+
defaultOpen: false,
|
|
112
|
+
},
|
|
113
|
+
],
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
const threshold = ref(50)
|
|
117
|
+
const method = ref('linear')
|
|
118
|
+
const methods = [
|
|
119
|
+
{ value: 'linear', label: 'Linear' },
|
|
120
|
+
{ value: 'quadratic', label: 'Quadratic' },
|
|
121
|
+
{ value: 'logistic', label: 'Logistic' },
|
|
122
|
+
]
|
|
123
|
+
const showOutliers = ref(true)
|
|
124
|
+
const logScale = ref(false)
|
|
125
|
+
const polarity = ref('negative')
|
|
126
|
+
const container = ref('vial')
|
|
127
|
+
const expNumber = ref(1)
|
|
128
|
+
const initials = ref('XP')
|
|
129
|
+
const toggleState = reactive<Record<string, boolean>>({ naming: true, randomize: false })
|
|
130
|
+
|
|
131
|
+
function handleToggle(id: string, value: boolean) {
|
|
132
|
+
toggleState[id] = value
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
function initSimpleToolkit() {
|
|
136
|
+
return {
|
|
137
|
+
activeView: 'analysis',
|
|
138
|
+
floating: false,
|
|
139
|
+
width: '260px',
|
|
140
|
+
side: 'left' as const,
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
</script>
|
|
144
|
+
|
|
145
|
+
<template>
|
|
146
|
+
<Story title="Layout/AppSidebar">
|
|
147
|
+
<Variant title="Sequence Builder">
|
|
148
|
+
<div style="padding: 2rem; height: 700px; position: relative; background: var(--bg-primary, #f1f5f9);">
|
|
149
|
+
<AppSidebar
|
|
150
|
+
:panels="sequencePanels"
|
|
151
|
+
active-view="sequence"
|
|
152
|
+
:toggle-state="toggleState"
|
|
153
|
+
width="300px"
|
|
154
|
+
@update:toggle="handleToggle"
|
|
155
|
+
>
|
|
156
|
+
<template #section-import>
|
|
157
|
+
<FileUploader accept=".xlsx,.xls" placeholder="Drop Excel or click" />
|
|
158
|
+
<div style="display: flex; gap: 0.5rem;">
|
|
159
|
+
<BaseButton size="sm" variant="secondary" style="flex: 1;">96-Well</BaseButton>
|
|
160
|
+
<BaseButton size="sm" variant="secondary" style="flex: 1;">54-Vial</BaseButton>
|
|
161
|
+
</div>
|
|
162
|
+
</template>
|
|
163
|
+
<template #section-naming>
|
|
164
|
+
<div style="display: flex; justify-content: space-between; align-items: center;">
|
|
165
|
+
<span style="font-size: 0.75rem; font-weight: 600; color: var(--text-secondary, #4b5563);">File Prefix</span>
|
|
166
|
+
<span style="font-size: 0.75rem; color: var(--text-muted, #9ca3af);">Custom</span>
|
|
167
|
+
</div>
|
|
168
|
+
<div style="display: flex; gap: 0.5rem;">
|
|
169
|
+
<FormField label="Exp #" style="flex: 1;">
|
|
170
|
+
<NumberInput v-model="expNumber" :min="1" />
|
|
171
|
+
</FormField>
|
|
172
|
+
<FormField label="Initials" style="flex: 0 0 4rem;">
|
|
173
|
+
<BaseInput v-model="initials" />
|
|
174
|
+
</FormField>
|
|
175
|
+
</div>
|
|
176
|
+
<FormField label="Folder Name">
|
|
177
|
+
<span style="font-size: 0.8125rem; color: var(--text-secondary, #4b5563);">Metabolites</span>
|
|
178
|
+
</FormField>
|
|
179
|
+
<BaseInput model-value="exp001_260210_XP_Metabolites" readonly />
|
|
180
|
+
<p style="font-size: 0.6875rem; color: var(--text-muted, #9ca3af); margin: 0;">
|
|
181
|
+
Toggle to save experiment to database for tracking and analysis.
|
|
182
|
+
</p>
|
|
183
|
+
</template>
|
|
184
|
+
<template #section-randomize>
|
|
185
|
+
<BaseSelect
|
|
186
|
+
model-value="sequential"
|
|
187
|
+
:options="[
|
|
188
|
+
{ value: 'sequential', label: 'Sequential' },
|
|
189
|
+
{ value: 'random', label: 'Random' },
|
|
190
|
+
{ value: 'block', label: 'Block randomize' },
|
|
191
|
+
]"
|
|
192
|
+
label="Order"
|
|
193
|
+
/>
|
|
194
|
+
</template>
|
|
195
|
+
<template #section-acquisition>
|
|
196
|
+
<div style="display: flex; gap: 0.5rem;">
|
|
197
|
+
<FormField label="Polarity" style="flex: 1;">
|
|
198
|
+
<BaseSelect v-model="polarity" :options="[{ value: 'negative', label: 'Negative' }, { value: 'positive', label: 'Positive' }]" />
|
|
199
|
+
</FormField>
|
|
200
|
+
<FormField label="Container" style="flex: 1;">
|
|
201
|
+
<BaseSelect v-model="container" :options="[{ value: 'vial', label: 'Vial' }, { value: 'plate', label: 'Plate' }]" />
|
|
202
|
+
</FormField>
|
|
203
|
+
</div>
|
|
204
|
+
</template>
|
|
205
|
+
<template #section-method>
|
|
206
|
+
<BaseToggle model-value label="Use custom method paths" />
|
|
207
|
+
<BaseSelect
|
|
208
|
+
model-value=""
|
|
209
|
+
placeholder="-- Select Method --"
|
|
210
|
+
:options="[]"
|
|
211
|
+
label="Method"
|
|
212
|
+
/>
|
|
213
|
+
</template>
|
|
214
|
+
<template #footer>
|
|
215
|
+
<BaseButton variant="cta" style="width: 100%;">Generate Sequence</BaseButton>
|
|
216
|
+
</template>
|
|
217
|
+
</AppSidebar>
|
|
218
|
+
</div>
|
|
219
|
+
</Variant>
|
|
220
|
+
|
|
221
|
+
<Variant title="Simple Toolkit" :init-state="initSimpleToolkit">
|
|
222
|
+
<template #default="{ state }">
|
|
223
|
+
<div style="padding: 2rem; height: 500px; position: relative; background: var(--bg-primary, #f1f5f9);">
|
|
224
|
+
<div style="margin-bottom: 1rem; display: flex; gap: 0.5rem;">
|
|
225
|
+
<button
|
|
226
|
+
v-for="v in ['analysis', 'results', 'settings']"
|
|
227
|
+
:key="v"
|
|
228
|
+
:style="{
|
|
229
|
+
padding: '0.375rem 0.75rem',
|
|
230
|
+
borderRadius: '0.25rem',
|
|
231
|
+
border: '1px solid var(--border-color, #e5e7eb)',
|
|
232
|
+
background: state.activeView === v ? 'var(--color-primary, #3b82f6)' : 'var(--bg-card, #fff)',
|
|
233
|
+
color: state.activeView === v ? '#fff' : 'var(--text-primary, #111827)',
|
|
234
|
+
cursor: 'pointer',
|
|
235
|
+
fontSize: '0.875rem',
|
|
236
|
+
}"
|
|
237
|
+
@click="state.activeView = v"
|
|
238
|
+
>
|
|
239
|
+
{{ v }}
|
|
240
|
+
</button>
|
|
241
|
+
</div>
|
|
242
|
+
<AppSidebar
|
|
243
|
+
:panels="simplePanels"
|
|
244
|
+
:active-view="state.activeView"
|
|
245
|
+
:floating="state.floating"
|
|
246
|
+
:width="state.width"
|
|
247
|
+
:side="state.side"
|
|
248
|
+
>
|
|
249
|
+
<template #section-parameters>
|
|
250
|
+
<BaseSlider v-model="threshold" label="Threshold" :min="0" :max="100" />
|
|
251
|
+
<BaseSelect v-model="method" label="Method" :options="methods" />
|
|
252
|
+
</template>
|
|
253
|
+
<template #section-filters>
|
|
254
|
+
<BaseToggle v-model="showOutliers" label="Exclude outliers" />
|
|
255
|
+
</template>
|
|
256
|
+
<template #section-display>
|
|
257
|
+
<BaseToggle v-model="showOutliers" label="Show outliers" />
|
|
258
|
+
<BaseToggle v-model="logScale" label="Log scale" />
|
|
259
|
+
</template>
|
|
260
|
+
<template #section-export>
|
|
261
|
+
<BaseButton size="sm" variant="secondary">Export CSV</BaseButton>
|
|
262
|
+
<BaseButton size="sm" variant="secondary">Export PNG</BaseButton>
|
|
263
|
+
</template>
|
|
264
|
+
</AppSidebar>
|
|
265
|
+
</div>
|
|
266
|
+
</template>
|
|
267
|
+
|
|
268
|
+
<template #controls="{ state }">
|
|
269
|
+
<HstSelect
|
|
270
|
+
v-model="state.activeView"
|
|
271
|
+
title="Active View"
|
|
272
|
+
:options="['analysis', 'results', 'settings'].map(v => ({ label: v, value: v }))"
|
|
273
|
+
/>
|
|
274
|
+
<HstCheckbox v-model="state.floating" title="Floating" />
|
|
275
|
+
<HstText v-model="state.width" title="Width" />
|
|
276
|
+
<HstSelect
|
|
277
|
+
v-model="state.side"
|
|
278
|
+
title="Side"
|
|
279
|
+
:options="[{ label: 'left', value: 'left' }, { label: 'right', value: 'right' }]"
|
|
280
|
+
/>
|
|
281
|
+
</template>
|
|
282
|
+
</Variant>
|
|
283
|
+
|
|
284
|
+
<Variant title="With Header and Footer">
|
|
285
|
+
<div style="padding: 2rem; height: 500px; position: relative; background: var(--bg-primary, #f1f5f9);">
|
|
286
|
+
<AppSidebar
|
|
287
|
+
:panels="simplePanels"
|
|
288
|
+
active-view="analysis"
|
|
289
|
+
>
|
|
290
|
+
<template #header>
|
|
291
|
+
<span style="font-weight: 600; font-size: 0.875rem; color: var(--text-primary, #111827);">
|
|
292
|
+
Analysis Tools
|
|
293
|
+
</span>
|
|
294
|
+
</template>
|
|
295
|
+
<template #section-parameters>
|
|
296
|
+
<BaseSlider v-model="threshold" label="Threshold" :min="0" :max="100" />
|
|
297
|
+
<BaseSelect v-model="method" label="Method" :options="methods" />
|
|
298
|
+
</template>
|
|
299
|
+
<template #section-filters>
|
|
300
|
+
<BaseToggle v-model="showOutliers" label="Exclude outliers" />
|
|
301
|
+
</template>
|
|
302
|
+
<template #footer>
|
|
303
|
+
<BaseButton size="sm" variant="ghost" style="width: 100%;">Reset Defaults</BaseButton>
|
|
304
|
+
</template>
|
|
305
|
+
</AppSidebar>
|
|
306
|
+
</div>
|
|
307
|
+
</Variant>
|
|
308
|
+
</Story>
|
|
309
|
+
</template>
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
/**
|
|
3
|
+
* AppSidebar - Context-sensitive toolkit panel
|
|
4
|
+
*
|
|
5
|
+
* Shows tool sections relevant to the active view. Sections are defined
|
|
6
|
+
* via the `panels` config (mapping view IDs to section arrays) and rendered
|
|
7
|
+
* as CollapsibleCards. Actual controls are provided through named slots:
|
|
8
|
+
* `#section-{sectionId}`.
|
|
9
|
+
*
|
|
10
|
+
* When the active view has no matching panels, the sidebar hides entirely.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```vue
|
|
14
|
+
* <AppSidebar :panels="toolPanels" :active-view="activeTab">
|
|
15
|
+
* <template #section-parameters>
|
|
16
|
+
* <BaseSlider v-model="threshold" label="Threshold" />
|
|
17
|
+
* </template>
|
|
18
|
+
* <template #section-display>
|
|
19
|
+
* <BaseToggle v-model="showOutliers" label="Show outliers" />
|
|
20
|
+
* </template>
|
|
21
|
+
* <template #header>Plugin Tools</template>
|
|
22
|
+
* </AppSidebar>
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
import { computed } from 'vue'
|
|
26
|
+
import type { SidebarToolSection } from '../types'
|
|
27
|
+
import CollapsibleCard from './CollapsibleCard.vue'
|
|
28
|
+
|
|
29
|
+
interface Props {
|
|
30
|
+
/** Map of view IDs to their tool sections */
|
|
31
|
+
panels?: Record<string, SidebarToolSection[]>
|
|
32
|
+
/** Which view's panels to display */
|
|
33
|
+
activeView?: string
|
|
34
|
+
/** Floating variant with absolute positioning */
|
|
35
|
+
floating?: boolean
|
|
36
|
+
/** Compact layout: smaller headers, tighter spacing, no icon backgrounds */
|
|
37
|
+
dense?: boolean
|
|
38
|
+
/** Width when visible */
|
|
39
|
+
width?: string
|
|
40
|
+
/** Position sidebar on left or right side */
|
|
41
|
+
side?: 'left' | 'right'
|
|
42
|
+
/** Toggle state map: sectionId → boolean */
|
|
43
|
+
toggleState?: Record<string, boolean>
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
47
|
+
panels: () => ({}),
|
|
48
|
+
activeView: '',
|
|
49
|
+
floating: true,
|
|
50
|
+
dense: false,
|
|
51
|
+
width: '280px',
|
|
52
|
+
side: 'left',
|
|
53
|
+
toggleState: () => ({}),
|
|
54
|
+
})
|
|
55
|
+
|
|
56
|
+
defineEmits<{
|
|
57
|
+
'update:toggle': [sectionId: string, value: boolean]
|
|
58
|
+
}>()
|
|
59
|
+
|
|
60
|
+
const activeSections = computed<SidebarToolSection[]>(() => {
|
|
61
|
+
if (!props.activeView || !props.panels[props.activeView]) return []
|
|
62
|
+
return props.panels[props.activeView]
|
|
63
|
+
})
|
|
64
|
+
|
|
65
|
+
const isVisible = computed(() => activeSections.value.length > 0)
|
|
66
|
+
|
|
67
|
+
const sidebarClasses = computed(() => [
|
|
68
|
+
'mld-sidebar',
|
|
69
|
+
`mld-sidebar--${props.side}`,
|
|
70
|
+
props.floating ? 'mld-sidebar--floating' : 'mld-sidebar--static',
|
|
71
|
+
props.dense ? 'mld-sidebar--dense' : '',
|
|
72
|
+
!isVisible.value ? 'mld-sidebar--hidden' : '',
|
|
73
|
+
])
|
|
74
|
+
|
|
75
|
+
const sidebarStyle = computed(() => ({
|
|
76
|
+
width: props.width,
|
|
77
|
+
}))
|
|
78
|
+
</script>
|
|
79
|
+
|
|
80
|
+
<template>
|
|
81
|
+
<aside
|
|
82
|
+
:class="sidebarClasses"
|
|
83
|
+
:style="sidebarStyle"
|
|
84
|
+
>
|
|
85
|
+
<!-- Header slot -->
|
|
86
|
+
<div v-if="$slots.header" class="mld-sidebar__header">
|
|
87
|
+
<slot name="header" />
|
|
88
|
+
</div>
|
|
89
|
+
|
|
90
|
+
<!-- Tool sections -->
|
|
91
|
+
<div class="mld-sidebar__sections">
|
|
92
|
+
<CollapsibleCard
|
|
93
|
+
v-for="section in activeSections"
|
|
94
|
+
:key="section.id"
|
|
95
|
+
:title="section.label"
|
|
96
|
+
:subtitle="section.subtitle"
|
|
97
|
+
:icon="section.icon"
|
|
98
|
+
:icon-color="section.iconColor"
|
|
99
|
+
:icon-bg="section.iconBg"
|
|
100
|
+
:dense="dense"
|
|
101
|
+
:default-open="section.defaultOpen !== false"
|
|
102
|
+
:show-toggle="section.showToggle"
|
|
103
|
+
:toggle-value="toggleState[section.id] ?? false"
|
|
104
|
+
@update:toggle-value="$emit('update:toggle', section.id, $event)"
|
|
105
|
+
>
|
|
106
|
+
<slot :name="`section-${section.id}`" />
|
|
107
|
+
</CollapsibleCard>
|
|
108
|
+
</div>
|
|
109
|
+
|
|
110
|
+
<!-- Footer slot -->
|
|
111
|
+
<div v-if="$slots.footer" class="mld-sidebar__footer">
|
|
112
|
+
<slot name="footer" />
|
|
113
|
+
</div>
|
|
114
|
+
</aside>
|
|
115
|
+
</template>
|
|
116
|
+
|
|
117
|
+
<style>
|
|
118
|
+
@import '../styles/components/app-sidebar.css';
|
|
119
|
+
</style>
|