@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,661 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
/** Full application top bar with brand logo, page selector or plugin switcher, centered pill nav, experiment popover, and avatar menu. */
|
|
3
|
+
import { ref, computed, inject, onMounted, onUnmounted } from 'vue'
|
|
4
|
+
import type {
|
|
5
|
+
TopBarPage,
|
|
6
|
+
TopBarTab,
|
|
7
|
+
TopBarTabOption,
|
|
8
|
+
TopBarSettingsConfig,
|
|
9
|
+
TopBarVariant,
|
|
10
|
+
PillNavItem,
|
|
11
|
+
PageSelectorItem,
|
|
12
|
+
PluginSwitcherInfo,
|
|
13
|
+
PluginSwitcherPlugin,
|
|
14
|
+
AccountMenuItem,
|
|
15
|
+
} from '../types/components'
|
|
16
|
+
import ThemeToggle from './ThemeToggle.vue'
|
|
17
|
+
import SettingsModal from './SettingsModal.vue'
|
|
18
|
+
import ExperimentPopover from './ExperimentPopover.vue'
|
|
19
|
+
import ExperimentSelectorModal from './ExperimentSelectorModal.vue'
|
|
20
|
+
import AppPageSelector from './AppPageSelector.vue'
|
|
21
|
+
import AppPillNav from './AppPillNav.vue'
|
|
22
|
+
import AppAvatarMenu from './AppAvatarMenu.vue'
|
|
23
|
+
import AppPluginSwitcher from './AppPluginSwitcher.vue'
|
|
24
|
+
import { usePlatformContext } from '../composables/usePlatformContext'
|
|
25
|
+
import { APP_EXPERIMENT_KEY } from '../composables/useAppExperiment'
|
|
26
|
+
|
|
27
|
+
const SVG_PATH_PREFIX = 'M'
|
|
28
|
+
|
|
29
|
+
interface Props {
|
|
30
|
+
// Legacy title & breadcrumb
|
|
31
|
+
title?: string
|
|
32
|
+
subtitle?: string
|
|
33
|
+
showLogo?: boolean
|
|
34
|
+
variant?: TopBarVariant
|
|
35
|
+
pluginName?: string
|
|
36
|
+
pages?: TopBarPage[]
|
|
37
|
+
currentPageId?: string
|
|
38
|
+
tabs?: TopBarTab[]
|
|
39
|
+
currentTabId?: string
|
|
40
|
+
homePath?: string
|
|
41
|
+
|
|
42
|
+
// New layout — left page selector / plugin switcher
|
|
43
|
+
pageSelector?: PageSelectorItem[]
|
|
44
|
+
currentPageSelectorId?: string
|
|
45
|
+
pluginSwitcher?: PluginSwitcherInfo
|
|
46
|
+
|
|
47
|
+
// New layout — centered pill nav
|
|
48
|
+
pillNav?: PillNavItem[]
|
|
49
|
+
currentPillId?: string
|
|
50
|
+
|
|
51
|
+
// New right cluster — avatar menu + optional notifications
|
|
52
|
+
accountMenu?: AccountMenuItem[]
|
|
53
|
+
showNotifications?: boolean
|
|
54
|
+
hasNotificationDot?: boolean
|
|
55
|
+
|
|
56
|
+
// Legacy right cluster (still works; AvatarMenu takes precedence over Profile)
|
|
57
|
+
showThemeToggle?: boolean
|
|
58
|
+
showSettings?: boolean
|
|
59
|
+
settingsConfig?: TopBarSettingsConfig
|
|
60
|
+
showStandaloneLabel?: boolean
|
|
61
|
+
standaloneLabel?: string
|
|
62
|
+
showAdmin?: boolean
|
|
63
|
+
adminPath?: string
|
|
64
|
+
showProfile?: boolean
|
|
65
|
+
userName?: string
|
|
66
|
+
userInitial?: string
|
|
67
|
+
userEmail?: string
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
71
|
+
showLogo: true,
|
|
72
|
+
variant: 'card',
|
|
73
|
+
homePath: '/',
|
|
74
|
+
showThemeToggle: false,
|
|
75
|
+
showSettings: false,
|
|
76
|
+
showStandaloneLabel: true,
|
|
77
|
+
standaloneLabel: 'Standalone',
|
|
78
|
+
showAdmin: false,
|
|
79
|
+
adminPath: '/admin',
|
|
80
|
+
showProfile: false,
|
|
81
|
+
showNotifications: false,
|
|
82
|
+
hasNotificationDot: false,
|
|
83
|
+
})
|
|
84
|
+
|
|
85
|
+
const emit = defineEmits<{
|
|
86
|
+
'page-select': [page: TopBarPage]
|
|
87
|
+
'tab-select': [tab: TopBarTab]
|
|
88
|
+
'tab-option-select': [option: TopBarTabOption, tab: TopBarTab]
|
|
89
|
+
'profile-click': []
|
|
90
|
+
'admin-click': []
|
|
91
|
+
// New
|
|
92
|
+
'page-selector-select': [page: PageSelectorItem]
|
|
93
|
+
'pill-select': [item: PillNavItem]
|
|
94
|
+
'plugin-switcher-select': [plugin: PluginSwitcherPlugin]
|
|
95
|
+
'plugin-switcher-install': []
|
|
96
|
+
'account-menu-select': [item: AccountMenuItem]
|
|
97
|
+
'sign-out': []
|
|
98
|
+
'notifications-click': []
|
|
99
|
+
}>()
|
|
100
|
+
|
|
101
|
+
const settingsOpen = ref(false)
|
|
102
|
+
const { isIntegrated, plugin } = usePlatformContext()
|
|
103
|
+
const isStandalone = computed(() => !isIntegrated.value)
|
|
104
|
+
const appExperiment = inject(APP_EXPERIMENT_KEY, null)
|
|
105
|
+
|
|
106
|
+
const pluginIcon = computed(() => {
|
|
107
|
+
const icon = plugin.value?.icon
|
|
108
|
+
return icon && icon.startsWith(SVG_PATH_PREFIX) ? icon : null
|
|
109
|
+
})
|
|
110
|
+
|
|
111
|
+
const profileInitial = computed(() => {
|
|
112
|
+
if (props.userInitial) return props.userInitial
|
|
113
|
+
if (props.userName) return props.userName.charAt(0).toUpperCase()
|
|
114
|
+
return 'U'
|
|
115
|
+
})
|
|
116
|
+
|
|
117
|
+
const hasPageSelector = computed(() => !!props.pageSelector?.length)
|
|
118
|
+
const hasPluginSwitcher = computed(() => !!props.pluginSwitcher)
|
|
119
|
+
const hasPillNav = computed(() => !!props.pillNav?.length)
|
|
120
|
+
const hasAccountMenu = computed(() => !!props.accountMenu?.length)
|
|
121
|
+
const hasLegacyBreadcrumb = computed(
|
|
122
|
+
() => !hasPageSelector.value && !hasPluginSwitcher.value && (!!props.pluginName || !!props.pages?.length),
|
|
123
|
+
)
|
|
124
|
+
const hasTitleGroup = computed(
|
|
125
|
+
() =>
|
|
126
|
+
!hasPageSelector.value &&
|
|
127
|
+
!hasPluginSwitcher.value &&
|
|
128
|
+
!!props.title &&
|
|
129
|
+
!!props.subtitle &&
|
|
130
|
+
!props.pluginName &&
|
|
131
|
+
!props.pages?.length,
|
|
132
|
+
)
|
|
133
|
+
const hasTitleOnly = computed(
|
|
134
|
+
() =>
|
|
135
|
+
!hasPageSelector.value &&
|
|
136
|
+
!hasPluginSwitcher.value &&
|
|
137
|
+
!hasTitleGroup.value &&
|
|
138
|
+
!hasLegacyBreadcrumb.value &&
|
|
139
|
+
!!props.title,
|
|
140
|
+
)
|
|
141
|
+
|
|
142
|
+
const showPagesDropdown = ref(false)
|
|
143
|
+
const dropdownRef = ref<HTMLElement | null>(null)
|
|
144
|
+
const openTabDropdown = ref<string | null>(null)
|
|
145
|
+
const tabDropdownRefs = ref<Map<string, HTMLElement>>(new Map())
|
|
146
|
+
|
|
147
|
+
function togglePagesDropdown() {
|
|
148
|
+
showPagesDropdown.value = !showPagesDropdown.value
|
|
149
|
+
openTabDropdown.value = null
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
function handlePageClick(page: TopBarPage) {
|
|
153
|
+
if (page.disabled) return
|
|
154
|
+
emit('page-select', page)
|
|
155
|
+
showPagesDropdown.value = false
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
function toggleTabDropdown(tabId: string) {
|
|
159
|
+
showPagesDropdown.value = false
|
|
160
|
+
openTabDropdown.value = openTabDropdown.value === tabId ? null : tabId
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
function handleTabClick(tab: TopBarTab) {
|
|
164
|
+
if (tab.disabled) return
|
|
165
|
+
if (tab.children?.length) {
|
|
166
|
+
toggleTabDropdown(tab.id)
|
|
167
|
+
} else {
|
|
168
|
+
emit('tab-select', tab)
|
|
169
|
+
openTabDropdown.value = null
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
function handleTabOptionClick(option: TopBarTabOption, tab: TopBarTab) {
|
|
174
|
+
if (option.disabled) return
|
|
175
|
+
emit('tab-option-select', option, tab)
|
|
176
|
+
openTabDropdown.value = null
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
function setTabDropdownRef(el: HTMLElement | null, tabId: string) {
|
|
180
|
+
if (el) {
|
|
181
|
+
tabDropdownRefs.value.set(tabId, el)
|
|
182
|
+
} else {
|
|
183
|
+
tabDropdownRefs.value.delete(tabId)
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
function handleClickOutside(event: MouseEvent) {
|
|
188
|
+
const target = event.target as Node
|
|
189
|
+
|
|
190
|
+
if (showPagesDropdown.value && dropdownRef.value && !dropdownRef.value.contains(target)) {
|
|
191
|
+
showPagesDropdown.value = false
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
if (openTabDropdown.value !== null) {
|
|
195
|
+
const clickedInside = Array.from(tabDropdownRefs.value.values()).some((el) => el.contains(target))
|
|
196
|
+
if (!clickedInside) {
|
|
197
|
+
openTabDropdown.value = null
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
onMounted(() => {
|
|
203
|
+
document.addEventListener('click', handleClickOutside)
|
|
204
|
+
})
|
|
205
|
+
|
|
206
|
+
onUnmounted(() => {
|
|
207
|
+
document.removeEventListener('click', handleClickOutside)
|
|
208
|
+
})
|
|
209
|
+
</script>
|
|
210
|
+
|
|
211
|
+
<template>
|
|
212
|
+
<header
|
|
213
|
+
:class="[
|
|
214
|
+
'mld-topbar',
|
|
215
|
+
`mld-topbar--${props.variant}`,
|
|
216
|
+
]"
|
|
217
|
+
>
|
|
218
|
+
<div class="mld-topbar__container">
|
|
219
|
+
<!-- Left: brand -->
|
|
220
|
+
<div class="mld-topbar__brand">
|
|
221
|
+
<a
|
|
222
|
+
v-if="homePath && (homePath.startsWith('http') || homePath.startsWith('/'))"
|
|
223
|
+
:href="homePath"
|
|
224
|
+
class="mld-topbar-home-link"
|
|
225
|
+
>
|
|
226
|
+
<slot name="icon">
|
|
227
|
+
<div v-if="pluginIcon" class="mld-topbar__logo">
|
|
228
|
+
<div class="mld-topbar__logo-icon">
|
|
229
|
+
<svg class="mld-topbar__logo-svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
230
|
+
<path :d="pluginIcon" />
|
|
231
|
+
</svg>
|
|
232
|
+
</div>
|
|
233
|
+
</div>
|
|
234
|
+
<slot v-else name="logo">
|
|
235
|
+
<div v-if="showLogo" class="mld-topbar__logo">
|
|
236
|
+
<div class="mld-topbar__logo-icon">
|
|
237
|
+
<span class="mld-topbar__logo-text">M</span>
|
|
238
|
+
</div>
|
|
239
|
+
</div>
|
|
240
|
+
</slot>
|
|
241
|
+
</slot>
|
|
242
|
+
</a>
|
|
243
|
+
<router-link
|
|
244
|
+
v-else-if="homePath"
|
|
245
|
+
:to="homePath"
|
|
246
|
+
class="mld-topbar-home-link"
|
|
247
|
+
>
|
|
248
|
+
<slot name="icon">
|
|
249
|
+
<div v-if="pluginIcon" class="mld-topbar__logo">
|
|
250
|
+
<div class="mld-topbar__logo-icon">
|
|
251
|
+
<svg class="mld-topbar__logo-svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
252
|
+
<path :d="pluginIcon" />
|
|
253
|
+
</svg>
|
|
254
|
+
</div>
|
|
255
|
+
</div>
|
|
256
|
+
<slot v-else name="logo">
|
|
257
|
+
<div v-if="showLogo" class="mld-topbar__logo">
|
|
258
|
+
<div class="mld-topbar__logo-icon">
|
|
259
|
+
<span class="mld-topbar__logo-text">M</span>
|
|
260
|
+
</div>
|
|
261
|
+
</div>
|
|
262
|
+
</slot>
|
|
263
|
+
</slot>
|
|
264
|
+
</router-link>
|
|
265
|
+
<template v-else>
|
|
266
|
+
<slot name="icon">
|
|
267
|
+
<div v-if="pluginIcon" class="mld-topbar__logo">
|
|
268
|
+
<div class="mld-topbar__logo-icon">
|
|
269
|
+
<svg class="mld-topbar__logo-svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
270
|
+
<path :d="pluginIcon" />
|
|
271
|
+
</svg>
|
|
272
|
+
</div>
|
|
273
|
+
</div>
|
|
274
|
+
<slot v-else name="logo">
|
|
275
|
+
<div v-if="showLogo" class="mld-topbar__logo">
|
|
276
|
+
<div class="mld-topbar__logo-icon">
|
|
277
|
+
<span class="mld-topbar__logo-text">M</span>
|
|
278
|
+
</div>
|
|
279
|
+
</div>
|
|
280
|
+
</slot>
|
|
281
|
+
</slot>
|
|
282
|
+
</template>
|
|
283
|
+
</div>
|
|
284
|
+
|
|
285
|
+
<!-- Left: page selector or plugin switcher (new) -->
|
|
286
|
+
<AppPluginSwitcher
|
|
287
|
+
v-if="hasPluginSwitcher && pluginSwitcher"
|
|
288
|
+
:current="pluginSwitcher.current"
|
|
289
|
+
:plugins="pluginSwitcher.plugins"
|
|
290
|
+
:install-to="pluginSwitcher.installTo"
|
|
291
|
+
:install-href="pluginSwitcher.installHref"
|
|
292
|
+
@select="emit('plugin-switcher-select', $event)"
|
|
293
|
+
@install-click="emit('plugin-switcher-install')"
|
|
294
|
+
/>
|
|
295
|
+
<AppPageSelector
|
|
296
|
+
v-else-if="hasPageSelector && pageSelector"
|
|
297
|
+
:pages="pageSelector"
|
|
298
|
+
:current-page-id="currentPageSelectorId"
|
|
299
|
+
@select="emit('page-selector-select', $event)"
|
|
300
|
+
>
|
|
301
|
+
<template v-if="$slots['page-selector-icon']" #icon="slotProps">
|
|
302
|
+
<slot name="page-selector-icon" v-bind="slotProps" />
|
|
303
|
+
</template>
|
|
304
|
+
<template v-if="$slots['page-selector-item-icon']" #item-icon="slotProps">
|
|
305
|
+
<slot name="page-selector-item-icon" v-bind="slotProps" />
|
|
306
|
+
</template>
|
|
307
|
+
</AppPageSelector>
|
|
308
|
+
|
|
309
|
+
<!-- Left: legacy title / breadcrumb (backward compat) -->
|
|
310
|
+
<div v-if="hasTitleGroup" class="mld-topbar-title-group">
|
|
311
|
+
<span class="mld-topbar-title">{{ title }}</span>
|
|
312
|
+
<span class="mld-topbar-subtitle">{{ subtitle }}</span>
|
|
313
|
+
</div>
|
|
314
|
+
|
|
315
|
+
<div v-else-if="hasLegacyBreadcrumb" ref="dropdownRef" class="mld-topbar-breadcrumb">
|
|
316
|
+
<button
|
|
317
|
+
v-if="pages?.length"
|
|
318
|
+
type="button"
|
|
319
|
+
class="mld-topbar-plugin-name"
|
|
320
|
+
@click.stop="togglePagesDropdown"
|
|
321
|
+
>
|
|
322
|
+
{{ pluginName }}
|
|
323
|
+
<svg
|
|
324
|
+
class="mld-topbar-chevron"
|
|
325
|
+
:class="{ 'mld-topbar-chevron--open': showPagesDropdown }"
|
|
326
|
+
width="16"
|
|
327
|
+
height="16"
|
|
328
|
+
viewBox="0 0 24 24"
|
|
329
|
+
fill="none"
|
|
330
|
+
stroke="currentColor"
|
|
331
|
+
stroke-width="2"
|
|
332
|
+
stroke-linecap="round"
|
|
333
|
+
stroke-linejoin="round"
|
|
334
|
+
>
|
|
335
|
+
<path d="m6 9 6 6 6-6" />
|
|
336
|
+
</svg>
|
|
337
|
+
</button>
|
|
338
|
+
<span v-else class="mld-topbar-plugin-name--static">{{ pluginName }}</span>
|
|
339
|
+
|
|
340
|
+
<svg
|
|
341
|
+
v-if="title"
|
|
342
|
+
class="mld-topbar-separator"
|
|
343
|
+
width="16"
|
|
344
|
+
height="16"
|
|
345
|
+
viewBox="0 0 24 24"
|
|
346
|
+
fill="none"
|
|
347
|
+
stroke="currentColor"
|
|
348
|
+
stroke-width="2"
|
|
349
|
+
stroke-linecap="round"
|
|
350
|
+
stroke-linejoin="round"
|
|
351
|
+
>
|
|
352
|
+
<path d="m9 18 6-6-6-6" />
|
|
353
|
+
</svg>
|
|
354
|
+
<span v-if="title" class="mld-topbar-current-page">{{ title }}</span>
|
|
355
|
+
|
|
356
|
+
<div v-show="showPagesDropdown" class="mld-topbar-dropdown">
|
|
357
|
+
<template v-for="page in pages" :key="page.id">
|
|
358
|
+
<a
|
|
359
|
+
v-if="page.href"
|
|
360
|
+
:href="page.href"
|
|
361
|
+
:class="['mld-topbar-dropdown-item', { 'mld-topbar-dropdown-item--active': page.id === currentPageId, 'mld-topbar-dropdown-item--disabled': page.disabled }]"
|
|
362
|
+
@click="showPagesDropdown = false"
|
|
363
|
+
>
|
|
364
|
+
<span class="mld-topbar-dropdown-item__label">{{ page.label }}</span>
|
|
365
|
+
<span v-if="page.description" class="mld-topbar-dropdown-item__description">{{ page.description }}</span>
|
|
366
|
+
</a>
|
|
367
|
+
<router-link
|
|
368
|
+
v-else-if="page.to"
|
|
369
|
+
:to="page.to"
|
|
370
|
+
:class="['mld-topbar-dropdown-item', { 'mld-topbar-dropdown-item--active': page.id === currentPageId, 'mld-topbar-dropdown-item--disabled': page.disabled }]"
|
|
371
|
+
@click="showPagesDropdown = false"
|
|
372
|
+
>
|
|
373
|
+
<span class="mld-topbar-dropdown-item__label">{{ page.label }}</span>
|
|
374
|
+
<span v-if="page.description" class="mld-topbar-dropdown-item__description">{{ page.description }}</span>
|
|
375
|
+
</router-link>
|
|
376
|
+
<button
|
|
377
|
+
v-else
|
|
378
|
+
type="button"
|
|
379
|
+
:class="['mld-topbar-dropdown-item', { 'mld-topbar-dropdown-item--active': page.id === currentPageId, 'mld-topbar-dropdown-item--disabled': page.disabled }]"
|
|
380
|
+
@click="handlePageClick(page)"
|
|
381
|
+
>
|
|
382
|
+
<span class="mld-topbar-dropdown-item__label">{{ page.label }}</span>
|
|
383
|
+
<span v-if="page.description" class="mld-topbar-dropdown-item__description">{{ page.description }}</span>
|
|
384
|
+
</button>
|
|
385
|
+
</template>
|
|
386
|
+
</div>
|
|
387
|
+
</div>
|
|
388
|
+
|
|
389
|
+
<span v-else-if="hasTitleOnly" class="mld-topbar__title-only">{{ title }}</span>
|
|
390
|
+
|
|
391
|
+
<!-- Nav slot (inline, after brand/selector) -->
|
|
392
|
+
<slot name="nav" />
|
|
393
|
+
|
|
394
|
+
<!-- Center: pill nav (new) -->
|
|
395
|
+
<div v-if="hasPillNav || $slots.center" class="mld-topbar__center">
|
|
396
|
+
<slot name="center">
|
|
397
|
+
<AppPillNav
|
|
398
|
+
v-if="hasPillNav && pillNav"
|
|
399
|
+
:items="pillNav"
|
|
400
|
+
:current-item-id="currentPillId"
|
|
401
|
+
@select="emit('pill-select', $event)"
|
|
402
|
+
/>
|
|
403
|
+
</slot>
|
|
404
|
+
</div>
|
|
405
|
+
|
|
406
|
+
<!-- Center: legacy tabs (when no pillNav) — wrapped in the same centered
|
|
407
|
+
container as AppPillNav so legacy :tabs consumers get centered pill
|
|
408
|
+
layout without migrating to :pill-nav. -->
|
|
409
|
+
<div v-if="!hasPillNav && tabs?.length" class="mld-topbar__center">
|
|
410
|
+
<div class="mld-topbar__tabs">
|
|
411
|
+
<template v-for="tab in tabs" :key="tab.id">
|
|
412
|
+
<div
|
|
413
|
+
:ref="(el) => tab.children?.length ? setTabDropdownRef(el as HTMLElement, tab.id) : null"
|
|
414
|
+
class="mld-topbar-tab-wrapper"
|
|
415
|
+
>
|
|
416
|
+
<button
|
|
417
|
+
v-if="tab.children?.length"
|
|
418
|
+
type="button"
|
|
419
|
+
:class="[
|
|
420
|
+
'mld-topbar-tab',
|
|
421
|
+
{ 'mld-topbar-tab--active': tab.id === currentTabId || tab.children.some(c => c.id === currentTabId) },
|
|
422
|
+
{ 'mld-topbar-tab--disabled': tab.disabled }
|
|
423
|
+
]"
|
|
424
|
+
@click.stop="handleTabClick(tab)"
|
|
425
|
+
>
|
|
426
|
+
{{ tab.label }}
|
|
427
|
+
<svg
|
|
428
|
+
class="mld-topbar-tab-chevron"
|
|
429
|
+
:class="{ 'mld-topbar-tab-chevron--open': openTabDropdown === tab.id }"
|
|
430
|
+
width="14"
|
|
431
|
+
height="14"
|
|
432
|
+
viewBox="0 0 24 24"
|
|
433
|
+
fill="none"
|
|
434
|
+
stroke="currentColor"
|
|
435
|
+
stroke-width="2"
|
|
436
|
+
stroke-linecap="round"
|
|
437
|
+
stroke-linejoin="round"
|
|
438
|
+
>
|
|
439
|
+
<path d="m6 9 6 6 6-6" />
|
|
440
|
+
</svg>
|
|
441
|
+
</button>
|
|
442
|
+
|
|
443
|
+
<a
|
|
444
|
+
v-else-if="tab.href"
|
|
445
|
+
:href="tab.href"
|
|
446
|
+
:class="[
|
|
447
|
+
'mld-topbar-tab',
|
|
448
|
+
{ 'mld-topbar-tab--active': tab.id === currentTabId },
|
|
449
|
+
{ 'mld-topbar-tab--disabled': tab.disabled }
|
|
450
|
+
]"
|
|
451
|
+
>
|
|
452
|
+
{{ tab.label }}
|
|
453
|
+
</a>
|
|
454
|
+
<router-link
|
|
455
|
+
v-else-if="tab.to"
|
|
456
|
+
:to="tab.to"
|
|
457
|
+
:class="[
|
|
458
|
+
'mld-topbar-tab',
|
|
459
|
+
{ 'mld-topbar-tab--active': tab.id === currentTabId },
|
|
460
|
+
{ 'mld-topbar-tab--disabled': tab.disabled }
|
|
461
|
+
]"
|
|
462
|
+
>
|
|
463
|
+
{{ tab.label }}
|
|
464
|
+
</router-link>
|
|
465
|
+
<button
|
|
466
|
+
v-else
|
|
467
|
+
type="button"
|
|
468
|
+
:class="[
|
|
469
|
+
'mld-topbar-tab',
|
|
470
|
+
{ 'mld-topbar-tab--active': tab.id === currentTabId },
|
|
471
|
+
{ 'mld-topbar-tab--disabled': tab.disabled }
|
|
472
|
+
]"
|
|
473
|
+
@click="handleTabClick(tab)"
|
|
474
|
+
>
|
|
475
|
+
{{ tab.label }}
|
|
476
|
+
</button>
|
|
477
|
+
|
|
478
|
+
<div v-if="tab.children?.length" v-show="openTabDropdown === tab.id" class="mld-topbar-tab-dropdown">
|
|
479
|
+
<template v-for="option in tab.children" :key="option.id">
|
|
480
|
+
<a
|
|
481
|
+
v-if="option.href"
|
|
482
|
+
:href="option.href"
|
|
483
|
+
:class="[
|
|
484
|
+
'mld-topbar-dropdown-item',
|
|
485
|
+
{ 'mld-topbar-dropdown-item--active': option.id === currentTabId },
|
|
486
|
+
{ 'mld-topbar-dropdown-item--disabled': option.disabled }
|
|
487
|
+
]"
|
|
488
|
+
@click="openTabDropdown = null"
|
|
489
|
+
>
|
|
490
|
+
<span class="mld-topbar-dropdown-item__label">{{ option.label }}</span>
|
|
491
|
+
<span v-if="option.description" class="mld-topbar-dropdown-item__description">{{ option.description }}</span>
|
|
492
|
+
</a>
|
|
493
|
+
<router-link
|
|
494
|
+
v-else-if="option.to"
|
|
495
|
+
:to="option.to"
|
|
496
|
+
:class="[
|
|
497
|
+
'mld-topbar-dropdown-item',
|
|
498
|
+
{ 'mld-topbar-dropdown-item--active': option.id === currentTabId },
|
|
499
|
+
{ 'mld-topbar-dropdown-item--disabled': option.disabled }
|
|
500
|
+
]"
|
|
501
|
+
@click="openTabDropdown = null"
|
|
502
|
+
>
|
|
503
|
+
<span class="mld-topbar-dropdown-item__label">{{ option.label }}</span>
|
|
504
|
+
<span v-if="option.description" class="mld-topbar-dropdown-item__description">{{ option.description }}</span>
|
|
505
|
+
</router-link>
|
|
506
|
+
<button
|
|
507
|
+
v-else
|
|
508
|
+
type="button"
|
|
509
|
+
:class="[
|
|
510
|
+
'mld-topbar-dropdown-item',
|
|
511
|
+
{ 'mld-topbar-dropdown-item--active': option.id === currentTabId },
|
|
512
|
+
{ 'mld-topbar-dropdown-item--disabled': option.disabled }
|
|
513
|
+
]"
|
|
514
|
+
@click="handleTabOptionClick(option, tab)"
|
|
515
|
+
>
|
|
516
|
+
<span class="mld-topbar-dropdown-item__label">{{ option.label }}</span>
|
|
517
|
+
<span v-if="option.description" class="mld-topbar-dropdown-item__description">{{ option.description }}</span>
|
|
518
|
+
</button>
|
|
519
|
+
</template>
|
|
520
|
+
</div>
|
|
521
|
+
</div>
|
|
522
|
+
</template>
|
|
523
|
+
</div>
|
|
524
|
+
</div>
|
|
525
|
+
|
|
526
|
+
<!-- Right section -->
|
|
527
|
+
<div class="mld-topbar__right">
|
|
528
|
+
<span v-if="showStandaloneLabel && isStandalone && !appExperiment" class="mld-topbar__standalone-badge">
|
|
529
|
+
{{ standaloneLabel }}
|
|
530
|
+
</span>
|
|
531
|
+
|
|
532
|
+
<ExperimentPopover
|
|
533
|
+
v-if="appExperiment && !isStandalone"
|
|
534
|
+
:experiment-name="appExperiment.experimentName.value"
|
|
535
|
+
:experiment-code="appExperiment.experimentCode.value"
|
|
536
|
+
:experiment-status="appExperiment.experimentStatus.value"
|
|
537
|
+
:show-save="appExperiment.showSave.value"
|
|
538
|
+
:show-detach="appExperiment.showDetach.value"
|
|
539
|
+
:save-disabled="appExperiment.saveDisabled.value"
|
|
540
|
+
:save-disabled-message="appExperiment.saveDisabledMessage.value"
|
|
541
|
+
:save-loading="appExperiment.saveLoading.value"
|
|
542
|
+
:save-success-message="appExperiment.saveSuccessMessage.value"
|
|
543
|
+
@select="appExperiment.openModal()"
|
|
544
|
+
@save="appExperiment.handleSave()"
|
|
545
|
+
@detach="appExperiment.handleDetach()"
|
|
546
|
+
/>
|
|
547
|
+
|
|
548
|
+
<span v-if="appExperiment && isStandalone" class="mld-topbar__standalone-badge">
|
|
549
|
+
{{ standaloneLabel }}
|
|
550
|
+
</span>
|
|
551
|
+
|
|
552
|
+
<slot name="actions" />
|
|
553
|
+
|
|
554
|
+
<!-- Notifications (new) -->
|
|
555
|
+
<button
|
|
556
|
+
v-if="showNotifications"
|
|
557
|
+
type="button"
|
|
558
|
+
class="mld-topbar__icon-btn"
|
|
559
|
+
aria-label="Notifications"
|
|
560
|
+
@click="emit('notifications-click')"
|
|
561
|
+
>
|
|
562
|
+
<svg class="mld-topbar__icon-btn-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
563
|
+
<path d="M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9" />
|
|
564
|
+
<path d="M10.3 21a1.94 1.94 0 0 0 3.4 0" />
|
|
565
|
+
</svg>
|
|
566
|
+
<span v-if="hasNotificationDot" class="mld-topbar__icon-btn-dot" aria-hidden="true" />
|
|
567
|
+
</button>
|
|
568
|
+
|
|
569
|
+
<!-- Legacy: theme toggle -->
|
|
570
|
+
<ThemeToggle v-if="showThemeToggle" size="sm" />
|
|
571
|
+
|
|
572
|
+
<!-- Legacy: settings gear -->
|
|
573
|
+
<button
|
|
574
|
+
v-if="showSettings"
|
|
575
|
+
type="button"
|
|
576
|
+
class="mld-topbar__settings-btn"
|
|
577
|
+
aria-label="Open settings"
|
|
578
|
+
@click="settingsOpen = true"
|
|
579
|
+
>
|
|
580
|
+
<svg class="mld-topbar__settings-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
581
|
+
<path d="M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915" /><circle cx="12" cy="12" r="3" />
|
|
582
|
+
</svg>
|
|
583
|
+
</button>
|
|
584
|
+
|
|
585
|
+
<!-- Legacy: admin link -->
|
|
586
|
+
<router-link
|
|
587
|
+
v-if="showAdmin"
|
|
588
|
+
:to="adminPath"
|
|
589
|
+
class="mld-topbar__admin-btn"
|
|
590
|
+
aria-label="Admin Dashboard"
|
|
591
|
+
@click="emit('admin-click')"
|
|
592
|
+
>
|
|
593
|
+
<svg class="mld-topbar__admin-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
594
|
+
<path d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z" /><path d="m9 12 2 2 4-4" />
|
|
595
|
+
</svg>
|
|
596
|
+
</router-link>
|
|
597
|
+
|
|
598
|
+
<!-- New: avatar menu (takes precedence over legacy profile button) -->
|
|
599
|
+
<AppAvatarMenu
|
|
600
|
+
v-if="hasAccountMenu || $slots['account-menu-items']"
|
|
601
|
+
:user-name="userName"
|
|
602
|
+
:user-initial="userInitial"
|
|
603
|
+
:user-email="userEmail"
|
|
604
|
+
:items="accountMenu"
|
|
605
|
+
@select="emit('account-menu-select', $event)"
|
|
606
|
+
@sign-out="emit('sign-out')"
|
|
607
|
+
>
|
|
608
|
+
<template v-if="$slots['account-menu-items']" #items="slotProps">
|
|
609
|
+
<slot name="account-menu-items" v-bind="slotProps" />
|
|
610
|
+
</template>
|
|
611
|
+
<template v-if="$slots['account-menu-item-icon']" #item-icon="slotProps">
|
|
612
|
+
<slot name="account-menu-item-icon" v-bind="slotProps" />
|
|
613
|
+
</template>
|
|
614
|
+
</AppAvatarMenu>
|
|
615
|
+
|
|
616
|
+
<!-- Legacy: profile button (only when avatar menu not provided) -->
|
|
617
|
+
<button
|
|
618
|
+
v-else-if="showProfile"
|
|
619
|
+
type="button"
|
|
620
|
+
class="mld-topbar__profile-btn"
|
|
621
|
+
aria-label="Edit profile"
|
|
622
|
+
@click="emit('profile-click')"
|
|
623
|
+
>
|
|
624
|
+
<div class="mld-topbar__profile-avatar">
|
|
625
|
+
{{ profileInitial }}
|
|
626
|
+
</div>
|
|
627
|
+
<span v-if="userName" class="mld-topbar__profile-name">{{ userName }}</span>
|
|
628
|
+
</button>
|
|
629
|
+
</div>
|
|
630
|
+
</div>
|
|
631
|
+
</header>
|
|
632
|
+
|
|
633
|
+
<SettingsModal
|
|
634
|
+
v-if="showSettings"
|
|
635
|
+
v-model="settingsOpen"
|
|
636
|
+
:title="settingsConfig?.title"
|
|
637
|
+
:tabs="settingsConfig?.tabs"
|
|
638
|
+
:show-appearance="settingsConfig?.showAppearance ?? true"
|
|
639
|
+
:size="settingsConfig?.size"
|
|
640
|
+
>
|
|
641
|
+
<template v-for="tab in (settingsConfig?.tabs ?? [])" :key="tab.id" #[`tab-${tab.id}`]>
|
|
642
|
+
<slot :name="`settings-tab-${tab.id}`" />
|
|
643
|
+
</template>
|
|
644
|
+
<template #appearance>
|
|
645
|
+
<slot name="settings-appearance" />
|
|
646
|
+
</template>
|
|
647
|
+
</SettingsModal>
|
|
648
|
+
|
|
649
|
+
<ExperimentSelectorModal
|
|
650
|
+
v-if="appExperiment && !isStandalone"
|
|
651
|
+
:model-value="appExperiment.showModal.value"
|
|
652
|
+
:current-experiment-id="appExperiment.experimentId.value"
|
|
653
|
+
@update:model-value="$event ? appExperiment.openModal() : appExperiment.closeModal()"
|
|
654
|
+
@select="appExperiment.handleSelect($event)"
|
|
655
|
+
@deselect="appExperiment.handleDetach()"
|
|
656
|
+
/>
|
|
657
|
+
</template>
|
|
658
|
+
|
|
659
|
+
<style>
|
|
660
|
+
@import '../styles/components/app-top-bar.css';
|
|
661
|
+
</style>
|