@morscherlab/mint-sdk 1.2.0-beta.1 → 1.2.0-beta.10
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 +35 -5
- package/dist/{ExperimentPopover-tLwJ7XF4.js → ExperimentPopover-oL0fg_A0.js} +6 -4
- package/dist/ExperimentPopover-oL0fg_A0.js.map +1 -0
- package/dist/{ExperimentSelectorModal-DyPAUCLw.js → ExperimentSelectorModal-BeEOomw_.js} +5 -5
- package/dist/ExperimentSelectorModal-BeEOomw_.js.map +1 -0
- package/dist/{SettingsModal-BgKY93zh.js → SettingsModal-Dphh3RrI.js} +5 -8
- package/dist/SettingsModal-Dphh3RrI.js.map +1 -0
- package/dist/{EmptyState-p90quq8Z.js → Skeleton-DxtwJ5gt.js} +111 -93
- package/dist/Skeleton-DxtwJ5gt.js.map +1 -0
- package/dist/__tests__/components/ExperimentTimeline.test.d.ts +1 -0
- package/dist/__tests__/components/PluginWorkspaceView.internal.test.d.ts +1 -0
- package/dist/__tests__/components/SecretInput.test.d.ts +1 -0
- package/dist/__tests__/components/WellEditPopupInternal.test.d.ts +1 -0
- package/dist/__tests__/composables/useListReorder.test.d.ts +1 -0
- package/dist/__tests__/composables/usePluginConfig.test.d.ts +15 -0
- package/dist/__tests__/styles/cssTokens.test.d.ts +1 -0
- package/dist/components/ActionMenu.vue.d.ts +1 -1
- package/dist/components/AppAvatarMenu.vue.d.ts +4 -0
- package/dist/components/AppPluginSwitcher.vue.d.ts +2 -0
- package/dist/components/AppSidebar.vue.d.ts +1 -1
- package/dist/components/AuditTrail.vue.d.ts +13 -0
- package/dist/components/AutoGroupModal.vue.d.ts +1 -1
- package/dist/components/BatchProgressList.vue.d.ts +17 -0
- package/dist/components/BioTemplateExperimentWorkspaceView.vue.d.ts +2 -2
- package/dist/components/DataFrame.vue.d.ts +14 -2
- package/dist/components/DatePicker.vue.d.ts +1 -1
- package/dist/components/DateTimePicker.vue.d.ts +2 -0
- package/dist/components/DropdownButton.vue.d.ts +2 -0
- package/dist/components/ExperimentDataViewer.vue.d.ts +26 -1
- package/dist/components/ExperimentPopover.vue.d.ts +1 -0
- package/dist/components/ExperimentTimeline.vue.d.ts +29 -1
- package/dist/components/FitPanel.vue.d.ts +1 -1
- package/dist/components/JobsStatusTray.vue.d.ts +9 -2
- package/dist/components/LcmsSequenceTable.vue.d.ts +29 -1
- package/dist/components/PluginWorkspaceView.props.d.ts +29 -1
- package/dist/components/PluginWorkspaceView.vue.d.ts +5 -5
- package/dist/components/ProgressBar.vue.d.ts +1 -1
- package/dist/components/ProtocolStepEditor.vue.d.ts +1 -0
- package/dist/components/ReagentList.vue.d.ts +29 -1
- package/dist/components/SampleHierarchyTree.vue.d.ts +29 -1
- package/dist/components/SampleLegend.vue.d.ts +1 -1
- package/dist/components/SampleSelector.drag.d.ts +13 -0
- package/dist/components/SampleSelector.tree.d.ts +2 -0
- package/dist/components/SampleSelector.vue.d.ts +35 -2
- package/dist/components/ScheduleCalendar.vue.d.ts +20 -0
- package/dist/components/SecretInput.vue.d.ts +28 -0
- package/dist/components/SettingsModal.vue.d.ts +1 -1
- package/dist/components/SmartGroupFieldRecipe.vue.d.ts +2 -1
- package/dist/components/TimePicker.vue.d.ts +1 -0
- package/dist/components/WellPlate.geometry.d.ts +15 -0
- package/dist/components/WellPlate.interaction.d.ts +13 -0
- package/dist/components/WellPlate.vue.d.ts +29 -0
- package/dist/components/index.d.ts +9 -0
- package/dist/components/index.js +8 -8
- package/dist/components/internal/AppTopBarPageSelectorInternal.vue.d.ts +2 -0
- package/dist/components/internal/DataStateInternal.vue.d.ts +43 -0
- package/dist/components/internal/WellEditPopupInternal.vue.d.ts +3 -1
- package/dist/components/internal/WorkspaceControlsInternal.vue.d.ts +23 -0
- package/dist/components/internal/WorkspaceShellInternal.vue.d.ts +70 -0
- package/dist/components/internal/WorkspaceSidebarInternal.vue.d.ts +43 -0
- package/dist/{components-DkHddRMl.js → components-CgAUzF8F.js} +2497 -2235
- package/dist/components-CgAUzF8F.js.map +1 -0
- package/dist/composables/controlSchemaTypes.d.ts +34 -0
- package/dist/composables/flattenWorkspaceBindings.d.ts +61 -0
- package/dist/composables/index.d.ts +9 -2
- package/dist/composables/index.js +10 -10
- package/dist/composables/pluginWorkspaceModel.d.ts +164 -0
- package/dist/composables/useAsync.d.ts +5 -1
- package/dist/composables/useBioTemplateWorkspace.d.ts +4 -20
- package/dist/composables/useCommandHistory.d.ts +5 -1
- package/dist/composables/useDropdownState.d.ts +18 -2
- package/dist/composables/useEventStream.d.ts +9 -0
- package/dist/composables/useFocusTrap.d.ts +21 -0
- package/dist/composables/useGeneratedAnalysis.d.ts +3 -1
- package/dist/composables/useJobsStatusTray.d.ts +25 -1
- package/dist/composables/useListReorder.d.ts +90 -0
- package/dist/composables/useMenuKeyboard.d.ts +29 -0
- package/dist/composables/useOptimisticMutation.d.ts +5 -1
- package/dist/composables/usePluginClient.d.ts +2 -0
- package/dist/composables/usePluginConfig.d.ts +27 -0
- package/dist/composables/usePluginWorkspace.d.ts +51 -0
- package/dist/composables/useRequestSyncState.d.ts +42 -2
- package/dist/composables/useResourceCrud.d.ts +5 -1
- package/dist/composables/useRovingFocus.d.ts +24 -0
- package/dist/composables/useScheduleDrag.d.ts +1 -0
- package/dist/composables/useWellPainting.d.ts +5 -1
- package/dist/composables/useWellPlateAdapter.d.ts +5 -1
- package/dist/composables/useWellPlateValidation.d.ts +5 -1
- package/dist/composables/workspaceRecipes.d.ts +188 -0
- package/dist/{composables-C_i90sGS.js → composables-B_pia3hO.js} +209 -82
- package/dist/composables-B_pia3hO.js.map +1 -0
- package/dist/{useApi-J6zFkHmn.js → errors-_W0-LbA6.js} +103 -3
- package/dist/errors-_W0-LbA6.js.map +1 -0
- package/dist/{experiment-Cq145oEW.js → experiment-Cwl9AYxw.js} +3 -8
- package/dist/experiment-Cwl9AYxw.js.map +1 -0
- package/dist/{experiment-utils-CLnzPPq5.js → experiment-utils-DV3DrvE_.js} +70 -51
- package/dist/experiment-utils-DV3DrvE_.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +15 -15
- package/dist/install.js +2 -7
- package/dist/install.js.map +1 -1
- package/dist/permissions.d.ts +42 -1
- package/dist/permissions.js +20 -10
- package/dist/permissions.js.map +1 -1
- package/dist/stores/auth.d.ts +6 -0
- package/dist/stores/index.d.ts +1 -1
- package/dist/stores/index.js +3 -3
- package/dist/stores/settings.d.ts +31 -1
- package/dist/styles.css +11247 -29501
- package/dist/templates/builderReadUtils.d.ts +1 -1
- package/dist/templates/index.js +2 -4
- package/dist/{templates-DsP51i-S.js → templates-Qq113pyZ.js} +303 -106
- package/dist/templates-Qq113pyZ.js.map +1 -0
- package/dist/types/auth.d.ts +1 -0
- package/dist/types/form-builder.d.ts +1 -1
- package/dist/{useControlSchema-BDx2Olha.js → useControlSchema-aMZlb4Sc.js} +462 -1130
- package/dist/useControlSchema-aMZlb4Sc.js.map +1 -0
- package/dist/{useDropdownState-DSb3BC3N.js → useDropdownState-DitCtrTT.js} +22 -6
- package/dist/useDropdownState-DitCtrTT.js.map +1 -0
- package/dist/{useExperimentSelector-CV4iNfMS.js → useExperimentSelector-I8HC8hUu.js} +4 -4
- package/dist/{useExperimentSelector-CV4iNfMS.js.map → useExperimentSelector-I8HC8hUu.js.map} +1 -1
- package/dist/{useFormBuilder-BLxG3BOX.js → useFormBuilder-TCxNnqeb.js} +2 -2
- package/dist/{useFormBuilder-BLxG3BOX.js.map → useFormBuilder-TCxNnqeb.js.map} +1 -1
- package/dist/{useProtocolTemplates-CS_SQl6U.js → useProtocolTemplates-BmX_iVBR.js} +766 -212
- package/dist/useProtocolTemplates-BmX_iVBR.js.map +1 -0
- package/dist/utils/color.d.ts +13 -0
- package/dist/utils/errors.d.ts +9 -0
- package/dist/utils/pluginSecrets.d.ts +53 -0
- package/dist/utils/records.d.ts +4 -0
- package/package.json +1 -1
- package/src/__tests__/components/ActionMenu.test.ts +94 -0
- package/src/__tests__/components/AppAvatarMenu.test.ts +123 -0
- package/src/__tests__/components/BaseTabs.test.ts +67 -0
- package/src/__tests__/components/DataFrame.test.ts +183 -11
- package/src/__tests__/components/DataStates.test.ts +176 -0
- package/src/__tests__/components/DatePicker.test.ts +76 -0
- package/src/__tests__/components/DateTimePicker.test.ts +36 -0
- package/src/__tests__/components/DropdownButton.test.ts +134 -0
- package/src/__tests__/components/ExperimentTimeline.test.ts +63 -0
- package/src/__tests__/components/GroupAssigner.test.ts +53 -0
- package/src/__tests__/components/LcmsSequenceTable.test.ts +22 -0
- package/src/__tests__/components/PluginWorkspaceView.internal.test.ts +230 -0
- package/src/__tests__/components/RackEditor.test.ts +35 -0
- package/src/__tests__/components/ReagentList.test.ts +64 -2
- package/src/__tests__/components/RetiredStyles.test.ts +31 -0
- package/src/__tests__/components/SampleSelector.drag.test.ts +51 -1
- package/src/__tests__/components/ScheduleCalendar.test.ts +63 -0
- package/src/__tests__/components/SecretInput.test.ts +87 -0
- package/src/__tests__/components/SegmentedControl.test.ts +88 -0
- package/src/__tests__/components/TimePicker.test.ts +61 -0
- package/src/__tests__/components/WellEditPopupInternal.test.ts +108 -0
- package/src/__tests__/components/WellPlate.interaction.test.ts +59 -0
- package/src/__tests__/composables/useAuth.test.ts +2 -0
- package/src/__tests__/composables/useDropdownState.test.ts +58 -1
- package/src/__tests__/composables/useListReorder.test.ts +145 -0
- package/src/__tests__/composables/usePluginClient.test.ts +140 -0
- package/src/__tests__/composables/usePluginConfig.test.ts +497 -0
- package/src/__tests__/composables/useRequestSyncState.test.ts +140 -0
- package/src/__tests__/docs/frontendDocsCatalog.test.ts +39 -7
- package/src/__tests__/stores/settings.test.ts +71 -1
- package/src/__tests__/styles/cssTokens.test.ts +131 -0
- package/src/__tests__/utils/permissions.test.ts +68 -0
- package/src/components/ActionMenu.vue +45 -88
- package/src/components/AlertBox.vue +0 -4
- package/src/components/AppAvatarMenu.vue +26 -7
- package/src/components/AppLayout.vue +0 -4
- package/src/components/AppPluginSwitcher.story.vue +87 -0
- package/src/components/AppPluginSwitcher.vue +2 -5
- package/src/components/AppSidebar.vue +0 -4
- package/src/components/AppToastContainer.vue +6 -8
- package/src/components/AppTopBar.vue +0 -4
- package/src/components/ArtifactSaveDialog.vue +0 -4
- package/src/components/ArtifactSelectorModal.vue +0 -4
- package/src/components/AuditTrail.story.vue +18 -0
- package/src/components/AuditTrail.vue +27 -7
- package/src/components/AutoGroupModal.vue +0 -4
- package/src/components/Avatar.vue +0 -4
- package/src/components/BaseButton.vue +0 -4
- package/src/components/BaseCheckbox.vue +0 -4
- package/src/components/BaseInput.vue +0 -4
- package/src/components/BaseModal.vue +8 -60
- package/src/components/BasePill.vue +0 -4
- package/src/components/BaseRadioGroup.vue +0 -4
- package/src/components/BaseSelect.vue +0 -4
- package/src/components/BaseSlider.vue +0 -4
- package/src/components/BaseTabs.vue +26 -5
- package/src/components/BaseTextarea.vue +0 -4
- package/src/components/BaseToggle.vue +0 -4
- package/src/components/BatchProgressList.story.vue +18 -0
- package/src/components/BatchProgressList.vue +32 -4
- package/src/components/BioTemplateExperimentWorkspaceView.vue +10 -21
- package/src/components/BioTemplatePackWorkspaceView.vue +11 -15
- package/src/components/BioTemplatePresetWorkspaceView.vue +8 -13
- package/src/components/Breadcrumb.vue +0 -4
- package/src/components/Calendar.vue +0 -4
- package/src/components/ChartContainer.story.vue +1 -1
- package/src/components/ChartContainer.vue +0 -4
- package/src/components/ChemicalFormula.vue +0 -4
- package/src/components/CollapsibleCard.vue +0 -4
- package/src/components/ColorSlider.vue +0 -4
- package/src/components/ComponentBindingRenderer.vue +1 -3
- package/src/components/ConcentrationInput.vue +0 -4
- package/src/components/ConfirmDialog.vue +0 -4
- package/src/components/ControlWorkspaceView.vue +11 -22
- package/src/components/DataFrame.story.vue +14 -0
- package/src/components/DataFrame.vue +97 -23
- package/src/components/DatePicker.vue +73 -27
- package/src/components/DateTimePicker.vue +45 -17
- package/src/components/Divider.vue +0 -4
- package/src/components/DoseCalculator.vue +0 -4
- package/src/components/DoseDesignWorkspaceView.vue +6 -25
- package/src/components/DropdownButton.vue +24 -6
- package/src/components/EmptyState.vue +0 -4
- package/src/components/ExperimentCodeBadge.vue +0 -4
- package/src/components/ExperimentDataViewer.story.vue +3 -0
- package/src/components/ExperimentDataViewer.vue +33 -13
- package/src/components/ExperimentPopover.vue +2 -5
- package/src/components/ExperimentSelectorModal.vue +0 -4
- package/src/components/ExperimentTimeline.story.vue +18 -0
- package/src/components/ExperimentTimeline.vue +81 -75
- package/src/components/FileUploader.vue +0 -4
- package/src/components/FitPanel.vue +0 -4
- package/src/components/FormActions.story.vue +96 -0
- package/src/components/FormActions.vue +0 -4
- package/src/components/FormBuilder.vue +0 -4
- package/src/components/FormField.vue +0 -4
- package/src/components/FormulaInput.vue +0 -4
- package/src/components/GeneratedPathInput.story.vue +68 -0
- package/src/components/GeneratedPlotlyResult.story.vue +96 -0
- package/src/components/GeneratedPlotlyResult.vue +3 -3
- package/src/components/GeneratedPluginView.story.vue +145 -0
- package/src/components/GeneratedPluginView.vue +10 -10
- package/src/components/GeneratedResultRenderer.story.vue +117 -0
- package/src/components/GeneratedResultRenderer.vue +4 -4
- package/src/components/GroupAssigner.vue +67 -5
- package/src/components/IconButton.vue +0 -4
- package/src/components/InstrumentAlertLog.vue +0 -4
- package/src/components/InstrumentStateBadge.vue +0 -4
- package/src/components/InstrumentStatusCard.vue +0 -4
- package/src/components/JobsStatusTray.vue +16 -5
- package/src/components/LcmsSequenceTable.vue +81 -50
- package/src/components/LoadingSpinner.vue +0 -4
- package/src/components/MobileSupportGate.vue +0 -4
- package/src/components/MoleculeInput.vue +0 -4
- package/src/components/MultiSelect.vue +0 -4
- package/src/components/NumberInput.vue +0 -4
- package/src/components/PlateMapEditor.vue +3 -14
- package/src/components/PluginIcon.vue +0 -4
- package/src/components/PluginWorkspaceView.props.ts +38 -0
- package/src/components/PluginWorkspaceView.vue +53 -224
- package/src/components/ProgressBar.vue +0 -4
- package/src/components/ProtocolStepEditor.vue +2 -4
- package/src/components/RackEditor.vue +51 -70
- package/src/components/ReagentEditor.vue +0 -4
- package/src/components/ReagentList.story.vue +18 -0
- package/src/components/ReagentList.vue +127 -82
- package/src/components/ResourceCard.vue +0 -4
- package/src/components/RuntimeUpdateNotice.story.vue +49 -0
- package/src/components/RuntimeUpdateNotice.vue +4 -4
- package/src/components/SampleHierarchyTree.story.vue +18 -0
- package/src/components/SampleHierarchyTree.vue +32 -9
- package/src/components/SampleLegend.vue +2 -8
- package/src/components/SampleSelector.drag.ts +51 -0
- package/src/components/SampleSelector.story.vue +6 -0
- package/src/components/SampleSelector.tree.ts +2 -0
- package/src/components/SampleSelector.vue +49 -10
- package/src/components/SampleSelectorGroupNode.vue +19 -0
- package/src/components/ScheduleCalendar.story.vue +6 -0
- package/src/components/ScheduleCalendar.vue +82 -7
- package/src/components/ScientificNumber.vue +0 -4
- package/src/components/SecretInput.story.vue +79 -0
- package/src/components/SecretInput.vue +150 -0
- package/src/components/SectionCard.vue +0 -4
- package/src/components/SegmentedControl.vue +48 -5
- package/src/components/SequenceInput.vue +0 -4
- package/src/components/SequenceProgressBar.story.vue +110 -0
- package/src/components/SequenceProgressBar.vue +0 -4
- package/src/components/SettingsModal.vue +0 -4
- package/src/components/Skeleton.vue +0 -4
- package/src/components/SmartGroupFieldRecipe.vue +8 -6
- package/src/components/SmartGroupManual.vue +0 -4
- package/src/components/StatusIndicator.vue +0 -4
- package/src/components/StepWizard.vue +0 -4
- package/src/components/TagsInput.vue +4 -6
- package/src/components/ThemeToggle.vue +0 -4
- package/src/components/TimePicker.vue +36 -7
- package/src/components/TimeRangeInput.vue +0 -4
- package/src/components/Tooltip.story.vue +3 -3
- package/src/components/Tooltip.vue +0 -4
- package/src/components/UnitInput.vue +0 -4
- package/src/components/WellPlate.geometry.ts +60 -1
- package/src/components/WellPlate.interaction.ts +44 -0
- package/src/components/WellPlate.story.vue +8 -0
- package/src/components/WellPlate.vue +53 -7
- package/src/components/index.ts +9 -0
- package/src/components/internal/AppTopBarPageSelectorInternal.vue +2 -5
- package/src/components/internal/AppTopBarPillNavInternal.vue +0 -4
- package/src/components/internal/DataStateInternal.vue +74 -0
- package/src/components/internal/FormSectionRenderer.vue +0 -4
- package/src/components/internal/WellEditPopupInternal.vue +20 -5
- package/src/components/internal/WorkspaceControlsInternal.vue +20 -0
- package/src/components/internal/WorkspaceShellInternal.vue +125 -0
- package/src/components/internal/WorkspaceSidebarInternal.vue +82 -0
- package/src/composables/controlSchemaTypes.ts +34 -0
- package/src/composables/experimentDesignData.ts +1 -3
- package/src/composables/flattenWorkspaceBindings.ts +104 -0
- package/src/composables/formBuilderRegistry.ts +5 -0
- package/src/composables/index.ts +43 -0
- package/src/composables/pluginWorkspaceModel.ts +182 -0
- package/src/composables/useAsync.ts +5 -1
- package/src/composables/useAuth.ts +3 -0
- package/src/composables/useBioTemplatePackWorkspace.ts +15 -9
- package/src/composables/useBioTemplatePresetWorkspace.ts +14 -15
- package/src/composables/useBioTemplateWorkspace.ts +18 -43
- package/src/composables/useCommandHistory.ts +5 -1
- package/src/composables/useDropdownState.ts +35 -5
- package/src/composables/useEventStream.ts +14 -2
- package/src/composables/useFileImport.ts +2 -7
- package/src/composables/useFocusTrap.ts +91 -0
- package/src/composables/useGeneratedAnalysis.ts +22 -10
- package/src/composables/useJobsStatusTray.ts +184 -17
- package/src/composables/useListReorder.story.vue +143 -0
- package/src/composables/useListReorder.ts +242 -0
- package/src/composables/useMenuKeyboard.ts +90 -0
- package/src/composables/useOptimisticMutation.ts +6 -16
- package/src/composables/usePluginClient.ts +47 -4
- package/src/composables/usePluginConfig.ts +252 -0
- package/src/composables/usePluginWorkspace.ts +208 -0
- package/src/composables/useRackEditor.ts +2 -11
- package/src/composables/useRequestSyncState.ts +98 -28
- package/src/composables/useResourceCrud.ts +6 -16
- package/src/composables/useRovingFocus.ts +66 -0
- package/src/composables/useScheduleDrag.ts +37 -0
- package/src/composables/useWellPainting.ts +10 -30
- package/src/composables/useWellPlateAdapter.ts +5 -1
- package/src/composables/useWellPlateEditor.ts +1 -11
- package/src/composables/useWellPlateValidation.ts +5 -1
- package/src/composables/workspaceRecipes.ts +267 -0
- package/src/index.ts +16 -0
- package/src/permissions.ts +48 -9
- package/src/stores/auth.ts +1 -0
- package/src/stores/experiment.ts +2 -7
- package/src/stores/index.ts +9 -1
- package/src/stores/settings.ts +93 -1
- package/src/styles/components/audit-trail.css +5 -5
- package/src/styles/components/batch-progress-list.css +7 -0
- package/src/styles/components/color-slider.css +2 -2
- package/src/styles/components/data-state.css +30 -0
- package/src/styles/components/dataframe.css +29 -35
- package/src/styles/components/experiment-data-viewer.css +4 -4
- package/src/styles/components/experiment-timeline.css +3 -30
- package/src/styles/components/form-builder.css +5 -5
- package/src/styles/components/lcms-sequence-table.css +16 -1
- package/src/styles/components/multi-select.css +1 -1
- package/src/styles/components/reagent-list.css +38 -31
- package/src/styles/components/sample-hierarchy-tree.css +5 -19
- package/src/styles/components/sample-selector.css +9 -2
- package/src/styles/components/schedule-calendar.css +8 -0
- package/src/styles/components/scientific-number.css +1 -1
- package/src/styles/components/secret-input.css +60 -0
- package/src/styles/components/well-plate.css +8 -0
- package/src/styles/index.css +9 -0
- package/src/styles/variables.css +29 -0
- package/src/templates/builderPresetControls.ts +1 -1
- package/src/templates/builderReadUtils.ts +1 -3
- package/src/templates/componentPlateHelpers.ts +3 -1
- package/src/templates/componentTargetResolvers.ts +1 -3
- package/src/templates/controlSchemaTargets.ts +1 -3
- package/src/templates/doseResponseAdapters.ts +2 -13
- package/src/templates/elisaAssayCollectionBuilder.ts +2 -2
- package/src/templates/plateMapBuilder.ts +2 -2
- package/src/templates/qpcrPlateBuilder.ts +1 -1
- package/src/templates/templateValidators.ts +1 -1
- package/src/templates/timeCourseBuilder.ts +2 -2
- package/src/templates/wellPlateScreenCollectionBuilder.ts +2 -2
- package/src/types/auth.ts +1 -0
- package/src/types/form-builder.ts +1 -0
- package/src/utils/color.ts +51 -0
- package/src/utils/errors.ts +29 -0
- package/src/utils/formModelSync.ts +1 -3
- package/src/utils/pluginIcon.ts +1 -3
- package/src/utils/pluginSecrets.ts +102 -0
- package/src/utils/records.ts +9 -0
- package/dist/EmptyState-p90quq8Z.js.map +0 -1
- package/dist/ExperimentPopover-tLwJ7XF4.js.map +0 -1
- package/dist/ExperimentSelectorModal-DyPAUCLw.js.map +0 -1
- package/dist/SettingsModal-BgKY93zh.js.map +0 -1
- package/dist/components-DkHddRMl.js.map +0 -1
- package/dist/composables/autoGroupConstants.d.ts +0 -1
- package/dist/composables/autoGroupGrouping.d.ts +0 -3
- package/dist/composables/useAutoGroupInputSources.d.ts +0 -32
- package/dist/composables-C_i90sGS.js.map +0 -1
- package/dist/experiment-Cq145oEW.js.map +0 -1
- package/dist/experiment-utils-CLnzPPq5.js.map +0 -1
- package/dist/templates/builderDefaults.d.ts +0 -1
- package/dist/templates/plateGeometry.d.ts +0 -4
- package/dist/templates-DsP51i-S.js.map +0 -1
- package/dist/useApi-J6zFkHmn.js.map +0 -1
- package/dist/useControlSchema-BDx2Olha.js.map +0 -1
- package/dist/useDropdownState-DSb3BC3N.js.map +0 -1
- package/dist/useProtocolTemplates-CS_SQl6U.js.map +0 -1
- package/src/__tests__/composables/useAutoGroupInputSources.test.ts +0 -127
- package/src/composables/autoGroupConstants.ts +0 -4
- package/src/composables/autoGroupGrouping.ts +0 -148
- package/src/composables/useAutoGroupInputSources.ts +0 -147
- package/src/templates/builderDefaults.ts +0 -11
- package/src/templates/plateGeometry.ts +0 -62
- /package/dist/__tests__/{composables/useAutoGroupInputSources.test.d.ts → components/DataStates.test.d.ts} +0 -0
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
import { mount } from '@vue/test-utils'
|
|
2
|
+
import { computed, h, nextTick } from 'vue'
|
|
3
|
+
import { createPinia } from 'pinia'
|
|
4
|
+
import { describe, expect, it, vi } from 'vitest'
|
|
5
|
+
import AppLayout from '../../components/AppLayout.vue'
|
|
6
|
+
import AppSidebar from '../../components/AppSidebar.vue'
|
|
7
|
+
import AppTopBar from '../../components/AppTopBar.vue'
|
|
8
|
+
import PluginWorkspaceView from '../../components/PluginWorkspaceView.vue'
|
|
9
|
+
import WorkspaceControlsInternal from '../../components/internal/WorkspaceControlsInternal.vue'
|
|
10
|
+
import WorkspaceShellInternal from '../../components/internal/WorkspaceShellInternal.vue'
|
|
11
|
+
import WorkspaceSidebarInternal from '../../components/internal/WorkspaceSidebarInternal.vue'
|
|
12
|
+
import type { PillNavItem, SidebarToolSection } from '../../types'
|
|
13
|
+
|
|
14
|
+
vi.mock('../../composables/usePlatformContext', () => ({
|
|
15
|
+
usePlatformContext: vi.fn(() => ({
|
|
16
|
+
isIntegrated: computed(() => false),
|
|
17
|
+
context: { value: { isIntegrated: false, theme: 'system' } },
|
|
18
|
+
plugin: computed(() => undefined),
|
|
19
|
+
user: computed(() => undefined),
|
|
20
|
+
theme: computed(() => 'system' as const),
|
|
21
|
+
features: computed(() => undefined),
|
|
22
|
+
navigate: vi.fn(),
|
|
23
|
+
notify: vi.fn(),
|
|
24
|
+
sendToPlatform: vi.fn(),
|
|
25
|
+
})),
|
|
26
|
+
}))
|
|
27
|
+
|
|
28
|
+
vi.mock('../../composables/useTheme', () => ({
|
|
29
|
+
useTheme: vi.fn(() => ({
|
|
30
|
+
isDark: computed(() => false),
|
|
31
|
+
theme: computed(() => 'light'),
|
|
32
|
+
toggleTheme: vi.fn(),
|
|
33
|
+
})),
|
|
34
|
+
}))
|
|
35
|
+
|
|
36
|
+
const pillNav: PillNavItem[] = [
|
|
37
|
+
{ id: 'data', label: 'Data' },
|
|
38
|
+
{ id: 'results', label: 'Results' },
|
|
39
|
+
]
|
|
40
|
+
|
|
41
|
+
const panels: Record<string, SidebarToolSection[]> = {
|
|
42
|
+
data: [
|
|
43
|
+
{ id: 'import', label: 'Import', defaultOpen: true },
|
|
44
|
+
],
|
|
45
|
+
results: [
|
|
46
|
+
{ id: 'display', label: 'Display', defaultOpen: true },
|
|
47
|
+
],
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
interface WorkspaceSlotProps {
|
|
51
|
+
activeView: string
|
|
52
|
+
setActiveView: (viewId: string) => void
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const globalOptions = {
|
|
56
|
+
plugins: [createPinia()],
|
|
57
|
+
stubs: {
|
|
58
|
+
'router-link': {
|
|
59
|
+
props: ['to', 'custom'],
|
|
60
|
+
template: `
|
|
61
|
+
<slot
|
|
62
|
+
v-if="custom"
|
|
63
|
+
:href="typeof to === 'string' ? to : '#'"
|
|
64
|
+
:navigate="() => {}"
|
|
65
|
+
/>
|
|
66
|
+
<a v-else :href="typeof to === 'string' ? to : '#'"><slot /></a>
|
|
67
|
+
`,
|
|
68
|
+
},
|
|
69
|
+
BaseModal: {
|
|
70
|
+
template: '<div><slot /></div>',
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
describe('PluginWorkspaceView internal split', () => {
|
|
76
|
+
it('renders through WorkspaceShellInternal, WorkspaceSidebarInternal and WorkspaceControlsInternal', () => {
|
|
77
|
+
const wrapper = mount(PluginWorkspaceView, {
|
|
78
|
+
props: {
|
|
79
|
+
title: 'MS Uploader',
|
|
80
|
+
subtitle: 'Import and visualize',
|
|
81
|
+
pillNav,
|
|
82
|
+
panels,
|
|
83
|
+
sidebarTitle: 'Tools',
|
|
84
|
+
sidebarSubtitle: 'Current file',
|
|
85
|
+
},
|
|
86
|
+
slots: {
|
|
87
|
+
actions: () => h('button', { 'data-test': 'topbar-action' }, 'Run'),
|
|
88
|
+
'section-import': () => h('button', { 'data-test': 'import-action' }, 'Upload'),
|
|
89
|
+
default: ({ activeView }: WorkspaceSlotProps) => h('main', { 'data-test': 'content' }, activeView),
|
|
90
|
+
},
|
|
91
|
+
global: globalOptions,
|
|
92
|
+
})
|
|
93
|
+
|
|
94
|
+
// The public adapter renders its three internal pieces...
|
|
95
|
+
expect(wrapper.findComponent(WorkspaceShellInternal).exists()).toBe(true)
|
|
96
|
+
expect(wrapper.findComponent(WorkspaceSidebarInternal).exists()).toBe(true)
|
|
97
|
+
expect(wrapper.findComponent(WorkspaceControlsInternal).exists()).toBe(true)
|
|
98
|
+
|
|
99
|
+
// ...each of which wraps the same underlying SDK components with the same DOM output
|
|
100
|
+
// the pre-split component produced.
|
|
101
|
+
expect(wrapper.findComponent(AppLayout).props()).toMatchObject({
|
|
102
|
+
floating: true,
|
|
103
|
+
responsiveSidebar: true,
|
|
104
|
+
sidebarPosition: 'left',
|
|
105
|
+
})
|
|
106
|
+
expect(wrapper.findComponent(AppTopBar).props()).toMatchObject({
|
|
107
|
+
title: 'MS Uploader',
|
|
108
|
+
subtitle: 'Import and visualize',
|
|
109
|
+
pillNav,
|
|
110
|
+
currentPillId: 'data',
|
|
111
|
+
})
|
|
112
|
+
expect(wrapper.findComponent(AppSidebar).props()).toMatchObject({
|
|
113
|
+
panels,
|
|
114
|
+
activeView: 'data',
|
|
115
|
+
title: 'Tools',
|
|
116
|
+
subtitle: 'Current file',
|
|
117
|
+
variant: 'analysis',
|
|
118
|
+
floating: false,
|
|
119
|
+
dense: true,
|
|
120
|
+
})
|
|
121
|
+
expect(wrapper.get('[data-test="topbar-action"]').text()).toBe('Run')
|
|
122
|
+
expect(wrapper.get('[data-test="import-action"]').text()).toBe('Upload')
|
|
123
|
+
expect(wrapper.get('[data-test="content"]').text()).toBe('data')
|
|
124
|
+
|
|
125
|
+
// WorkspaceControlsInternal receives exactly the scoped-slot payload the default slot sees.
|
|
126
|
+
expect(wrapper.findComponent(WorkspaceControlsInternal).props('controls')).toMatchObject({
|
|
127
|
+
activeView: 'data',
|
|
128
|
+
values: {},
|
|
129
|
+
})
|
|
130
|
+
})
|
|
131
|
+
|
|
132
|
+
it('keeps topbar navigation and sidebar panels synchronized through the internal split', async () => {
|
|
133
|
+
const wrapper = mount(PluginWorkspaceView, {
|
|
134
|
+
props: {
|
|
135
|
+
title: 'Analysis',
|
|
136
|
+
pillNav,
|
|
137
|
+
panels,
|
|
138
|
+
},
|
|
139
|
+
slots: {
|
|
140
|
+
default: ({ activeView }: WorkspaceSlotProps) => h('main', { 'data-test': 'content' }, activeView),
|
|
141
|
+
},
|
|
142
|
+
global: globalOptions,
|
|
143
|
+
})
|
|
144
|
+
|
|
145
|
+
wrapper.findComponent(AppTopBar).vm.$emit('pill-select', { id: 'results', label: 'Results' })
|
|
146
|
+
await nextTick()
|
|
147
|
+
|
|
148
|
+
expect(wrapper.findComponent(AppTopBar).props('currentPillId')).toBe('results')
|
|
149
|
+
expect(wrapper.findComponent(AppSidebar).props('activeView')).toBe('results')
|
|
150
|
+
expect(wrapper.findComponent(WorkspaceSidebarInternal).props('sidebar')).toMatchObject({ activeView: 'results' })
|
|
151
|
+
expect(wrapper.get('[data-test="content"]').text()).toBe('results')
|
|
152
|
+
expect(wrapper.emitted('update:activeView')).toEqual([['results']])
|
|
153
|
+
expect(wrapper.emitted('pill-select')).toEqual([[{ id: 'results', label: 'Results' }]])
|
|
154
|
+
})
|
|
155
|
+
|
|
156
|
+
it('relays sidebar collapse, toggle, and form events unchanged through WorkspaceSidebarInternal', async () => {
|
|
157
|
+
const wrapper = mount(PluginWorkspaceView, {
|
|
158
|
+
props: {
|
|
159
|
+
title: 'Analysis',
|
|
160
|
+
panels,
|
|
161
|
+
forms: {
|
|
162
|
+
data: { sections: [] },
|
|
163
|
+
},
|
|
164
|
+
},
|
|
165
|
+
global: globalOptions,
|
|
166
|
+
})
|
|
167
|
+
|
|
168
|
+
const sidebar = wrapper.findComponent(AppSidebar)
|
|
169
|
+
sidebar.vm.$emit('update:collapsed', true)
|
|
170
|
+
sidebar.vm.$emit('update:toggle', 'import', false)
|
|
171
|
+
sidebar.vm.$emit('section-action', 'import', 'refresh')
|
|
172
|
+
sidebar.vm.$emit('form-submit', 'data', { value: 1 })
|
|
173
|
+
sidebar.vm.$emit('form-cancel', 'data')
|
|
174
|
+
await nextTick()
|
|
175
|
+
|
|
176
|
+
expect(wrapper.emitted('update:sidebarCollapsed')).toEqual([[true]])
|
|
177
|
+
expect(wrapper.emitted('update:toggle')).toEqual([['import', false]])
|
|
178
|
+
expect(wrapper.emitted('section-action')).toEqual([['import', 'refresh']])
|
|
179
|
+
expect(wrapper.emitted('form-submit')).toEqual([['data', { value: 1 }]])
|
|
180
|
+
expect(wrapper.emitted('form-cancel')).toEqual([['data']])
|
|
181
|
+
})
|
|
182
|
+
|
|
183
|
+
it('can render without a sidebar surface, omitting WorkspaceSidebarInternal entirely', () => {
|
|
184
|
+
const wrapper = mount(PluginWorkspaceView, {
|
|
185
|
+
props: {
|
|
186
|
+
title: 'Simple Plugin',
|
|
187
|
+
showSidebar: false,
|
|
188
|
+
},
|
|
189
|
+
slots: {
|
|
190
|
+
default: () => h('main', { 'data-test': 'content' }, 'Ready'),
|
|
191
|
+
},
|
|
192
|
+
global: globalOptions,
|
|
193
|
+
})
|
|
194
|
+
|
|
195
|
+
expect(wrapper.findComponent(WorkspaceSidebarInternal).exists()).toBe(false)
|
|
196
|
+
expect(wrapper.findComponent(AppSidebar).exists()).toBe(false)
|
|
197
|
+
expect(wrapper.findComponent(AppTopBar).props('title')).toBe('Simple Plugin')
|
|
198
|
+
expect(wrapper.get('[data-test="content"]').text()).toBe('Ready')
|
|
199
|
+
})
|
|
200
|
+
|
|
201
|
+
it('lets a consumer-supplied sidebar slot override WorkspaceSidebarInternal', () => {
|
|
202
|
+
const wrapper = mount(PluginWorkspaceView, {
|
|
203
|
+
props: {
|
|
204
|
+
title: 'Custom Sidebar',
|
|
205
|
+
panels,
|
|
206
|
+
},
|
|
207
|
+
slots: {
|
|
208
|
+
sidebar: () => h('aside', { 'data-test': 'custom-sidebar' }, 'Custom'),
|
|
209
|
+
},
|
|
210
|
+
global: globalOptions,
|
|
211
|
+
})
|
|
212
|
+
|
|
213
|
+
expect(wrapper.findComponent(WorkspaceSidebarInternal).exists()).toBe(false)
|
|
214
|
+
expect(wrapper.findComponent(AppSidebar).exists()).toBe(false)
|
|
215
|
+
expect(wrapper.get('[data-test="custom-sidebar"]').text()).toBe('Custom')
|
|
216
|
+
})
|
|
217
|
+
|
|
218
|
+
it('lets a consumer-supplied topbar slot override WorkspaceShellInternal default AppTopBar rendering', () => {
|
|
219
|
+
const wrapper = mount(PluginWorkspaceView, {
|
|
220
|
+
props: { title: 'Custom Top Bar' },
|
|
221
|
+
slots: {
|
|
222
|
+
topbar: () => h('header', { 'data-test': 'custom-topbar' }, 'Custom'),
|
|
223
|
+
},
|
|
224
|
+
global: globalOptions,
|
|
225
|
+
})
|
|
226
|
+
|
|
227
|
+
expect(wrapper.findComponent(AppTopBar).exists()).toBe(false)
|
|
228
|
+
expect(wrapper.get('[data-test="custom-topbar"]').text()).toBe('Custom')
|
|
229
|
+
})
|
|
230
|
+
})
|
|
@@ -122,4 +122,39 @@ describe('RackEditor', () => {
|
|
|
122
122
|
}),
|
|
123
123
|
])
|
|
124
124
|
})
|
|
125
|
+
|
|
126
|
+
it('reorders rack tabs with Alt and the arrow keys', async () => {
|
|
127
|
+
const racks = makeRacks()
|
|
128
|
+
racks.push({ ...racks[0], id: 'rack-2', name: 'Rack 2', slot: 'G', wells: {} })
|
|
129
|
+
|
|
130
|
+
const wrapper = mount(RackEditor, { props: { modelValue: racks } })
|
|
131
|
+
|
|
132
|
+
await wrapper.findAll('.mint-rack-editor__tab')[0].trigger('keydown', {
|
|
133
|
+
key: 'ArrowRight',
|
|
134
|
+
altKey: true,
|
|
135
|
+
})
|
|
136
|
+
await nextTick()
|
|
137
|
+
|
|
138
|
+
expect(wrapper.emitted('rack-reorder')?.at(-1)?.[0]).toEqual(['rack-2', 'rack-1'])
|
|
139
|
+
expect(wrapper.findAll('.mint-rack-editor__tab').map(tab => tab.text()))
|
|
140
|
+
.toEqual([expect.stringContaining('Rack 2'), expect.stringContaining('Rack 1')])
|
|
141
|
+
expect(wrapper.get('[role="status"]').attributes('aria-live')).toBe('polite')
|
|
142
|
+
})
|
|
143
|
+
|
|
144
|
+
it('does not reorder rack tabs from the keyboard when reordering is off', async () => {
|
|
145
|
+
const racks = makeRacks()
|
|
146
|
+
racks.push({ ...racks[0], id: 'rack-2', name: 'Rack 2', slot: 'G', wells: {} })
|
|
147
|
+
|
|
148
|
+
const wrapper = mount(RackEditor, {
|
|
149
|
+
props: { modelValue: racks, allowReorder: false },
|
|
150
|
+
})
|
|
151
|
+
|
|
152
|
+
await wrapper.findAll('.mint-rack-editor__tab')[0].trigger('keydown', {
|
|
153
|
+
key: 'ArrowRight',
|
|
154
|
+
altKey: true,
|
|
155
|
+
})
|
|
156
|
+
await nextTick()
|
|
157
|
+
|
|
158
|
+
expect(wrapper.emitted('rack-reorder')).toBeUndefined()
|
|
159
|
+
})
|
|
125
160
|
})
|
|
@@ -63,7 +63,7 @@ describe('ReagentList', () => {
|
|
|
63
63
|
},
|
|
64
64
|
})
|
|
65
65
|
|
|
66
|
-
await wrapper.findAll('th')[1].trigger('click')
|
|
66
|
+
await wrapper.findAll('th')[1].get('.mint-reagent-list__sort-btn').trigger('click')
|
|
67
67
|
|
|
68
68
|
const rows = wrapper.findAll('tbody tr')
|
|
69
69
|
expect(rows.map(row => row.text())).toEqual([
|
|
@@ -72,11 +72,73 @@ describe('ReagentList', () => {
|
|
|
72
72
|
expect.stringContaining('Pyruvate'),
|
|
73
73
|
])
|
|
74
74
|
|
|
75
|
-
await wrapper.findAll('th')[1].trigger('click')
|
|
75
|
+
await wrapper.findAll('th')[1].get('.mint-reagent-list__sort-btn').trigger('click')
|
|
76
76
|
expect(wrapper.findAll('tbody tr').map(row => row.text())).toEqual([
|
|
77
77
|
expect.stringContaining('Lactate'),
|
|
78
78
|
expect.stringContaining('Glucose'),
|
|
79
79
|
expect.stringContaining('Pyruvate'),
|
|
80
80
|
])
|
|
81
81
|
})
|
|
82
|
+
|
|
83
|
+
it('exposes sortable headers as buttons that sort from the keyboard', async () => {
|
|
84
|
+
const wrapper = mount(ReagentList, {
|
|
85
|
+
props: { modelValue: reagents, readonly: true, columns: ['name', 'catalog'] },
|
|
86
|
+
})
|
|
87
|
+
|
|
88
|
+
const nameHeader = () => wrapper.findAll('th')[0]
|
|
89
|
+
expect(nameHeader().attributes('aria-sort')).toBe('none')
|
|
90
|
+
expect(nameHeader().get('.mint-reagent-list__sort-btn').element.tagName).toBe('BUTTON')
|
|
91
|
+
|
|
92
|
+
await nameHeader().get('.mint-reagent-list__sort-btn').trigger('keydown', { key: 'Enter' })
|
|
93
|
+
expect(nameHeader().attributes('aria-sort')).toBe('ascending')
|
|
94
|
+
|
|
95
|
+
await nameHeader().get('.mint-reagent-list__sort-btn').trigger('keydown', { key: ' ' })
|
|
96
|
+
expect(nameHeader().attributes('aria-sort')).toBe('descending')
|
|
97
|
+
})
|
|
98
|
+
|
|
99
|
+
it('omits aria-sort when sorting is disabled', () => {
|
|
100
|
+
const wrapper = mount(ReagentList, {
|
|
101
|
+
props: { modelValue: reagents, readonly: true, sortable: false, columns: ['name'] },
|
|
102
|
+
})
|
|
103
|
+
|
|
104
|
+
expect(wrapper.findAll('th')[0].attributes('aria-sort')).toBeUndefined()
|
|
105
|
+
})
|
|
106
|
+
|
|
107
|
+
it('reorders reagents from the drag handle with Alt and the arrow keys', async () => {
|
|
108
|
+
const wrapper = mount(ReagentList, {
|
|
109
|
+
props: { modelValue: reagents, columns: ['name'] },
|
|
110
|
+
})
|
|
111
|
+
|
|
112
|
+
const handle = wrapper.findAll('.mint-reagent-list__drag-handle-btn')[0]
|
|
113
|
+
expect(handle.attributes('aria-label')).toContain('Reorder Glucose')
|
|
114
|
+
|
|
115
|
+
await handle.trigger('keydown', { key: 'ArrowDown', altKey: true })
|
|
116
|
+
|
|
117
|
+
expect(wrapper.emitted('reorder')?.[0]).toEqual(['reagent-1', 0, 1])
|
|
118
|
+
expect(
|
|
119
|
+
(wrapper.emitted('update:modelValue')?.[0]?.[0] as Reagent[]).map(reagent => reagent.id),
|
|
120
|
+
).toEqual(['reagent-2', 'reagent-1'])
|
|
121
|
+
})
|
|
122
|
+
|
|
123
|
+
it('does not reorder from the keyboard while readonly', async () => {
|
|
124
|
+
const wrapper = mount(ReagentList, {
|
|
125
|
+
props: { modelValue: reagents, readonly: true, columns: ['name'] },
|
|
126
|
+
})
|
|
127
|
+
|
|
128
|
+
expect(wrapper.find('.mint-reagent-list__drag-handle-btn').exists()).toBe(false)
|
|
129
|
+
})
|
|
130
|
+
|
|
131
|
+
it('announces a keyboard reorder in a polite live region', async () => {
|
|
132
|
+
const wrapper = mount(ReagentList, {
|
|
133
|
+
props: { modelValue: reagents, columns: ['name'] },
|
|
134
|
+
})
|
|
135
|
+
|
|
136
|
+
await wrapper.findAll('.mint-reagent-list__drag-handle-btn')[0]
|
|
137
|
+
.trigger('keydown', { key: 'ArrowDown', altKey: true })
|
|
138
|
+
await wrapper.vm.$nextTick()
|
|
139
|
+
|
|
140
|
+
const liveRegion = wrapper.get('[role="status"]')
|
|
141
|
+
expect(liveRegion.attributes('aria-live')).toBe('polite')
|
|
142
|
+
expect(liveRegion.text()).toBe('Glucose moved to position 2 of 2.')
|
|
143
|
+
})
|
|
82
144
|
})
|
|
@@ -6,9 +6,21 @@ const retiredSelectors: Record<string, readonly string[]> = {
|
|
|
6
6
|
'app-plugin-switcher.css': [
|
|
7
7
|
'mint-plugin-switcher__swatch',
|
|
8
8
|
],
|
|
9
|
+
'audit-trail.css': [
|
|
10
|
+
'mint-audit-trail__empty',
|
|
11
|
+
],
|
|
12
|
+
'dataframe.css': [
|
|
13
|
+
'mint-dataframe__empty',
|
|
14
|
+
'mint-dataframe__empty-icon',
|
|
15
|
+
'mint-dataframe__empty-text',
|
|
16
|
+
'mint-dataframe__loading-spinner',
|
|
17
|
+
],
|
|
9
18
|
'dose-calculator.css': [
|
|
10
19
|
'mint-dose-calculator__mw-input',
|
|
11
20
|
],
|
|
21
|
+
'experiment-data-viewer.css': [
|
|
22
|
+
'mint-data-viewer__empty',
|
|
23
|
+
],
|
|
12
24
|
'experiment-popover.css': [
|
|
13
25
|
'mint-experiment-popover__check-icon',
|
|
14
26
|
'mint-experiment-popover__divider',
|
|
@@ -24,13 +36,31 @@ const retiredSelectors: Record<string, readonly string[]> = {
|
|
|
24
36
|
'mint-experiment-selector__filters',
|
|
25
37
|
'mint-experiment-selector__status-filter',
|
|
26
38
|
],
|
|
39
|
+
'experiment-timeline.css': [
|
|
40
|
+
'mint-timeline__empty',
|
|
41
|
+
'mint-timeline__empty-btn',
|
|
42
|
+
'mint-timeline__empty-content',
|
|
43
|
+
'mint-timeline__empty-text',
|
|
44
|
+
],
|
|
45
|
+
'lcms-sequence-table.css': [
|
|
46
|
+
'mint-lcms-sequence-table__empty',
|
|
47
|
+
],
|
|
27
48
|
'protocol-step-editor.css': [
|
|
28
49
|
'mint-protocol-editor__field-row',
|
|
29
50
|
],
|
|
30
51
|
'reagent-editor.css': [
|
|
31
52
|
'mint-reagent-editor__row',
|
|
32
53
|
],
|
|
54
|
+
'reagent-list.css': [
|
|
55
|
+
'mint-reagent-list__empty',
|
|
56
|
+
'mint-reagent-list__empty-btn',
|
|
57
|
+
'mint-reagent-list__empty-icon',
|
|
58
|
+
'mint-reagent-list__empty-text',
|
|
59
|
+
],
|
|
33
60
|
'sample-hierarchy-tree.css': [
|
|
61
|
+
'mint-sample-tree__empty',
|
|
62
|
+
'mint-sample-tree__empty-icon',
|
|
63
|
+
'mint-sample-tree__empty-text',
|
|
34
64
|
'mint-sample-tree__node--selected',
|
|
35
65
|
],
|
|
36
66
|
'sample-selector.css': [
|
|
@@ -38,6 +68,7 @@ const retiredSelectors: Record<string, readonly string[]> = {
|
|
|
38
68
|
'mint-popover-enter-from',
|
|
39
69
|
'mint-popover-leave-active',
|
|
40
70
|
'mint-popover-leave-to',
|
|
71
|
+
'mint-sample-selector__empty',
|
|
41
72
|
'mint-sample-selector__level-badge',
|
|
42
73
|
'mint-sample-selector__level-btn',
|
|
43
74
|
'mint-sample-selector__level-desc',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ref } from 'vue'
|
|
1
|
+
import { nextTick, ref } from 'vue'
|
|
2
2
|
import { describe, expect, it } from 'vitest'
|
|
3
3
|
import type { SampleGroup } from '../../types'
|
|
4
4
|
import { useSampleSelectorDrag } from '../../components/SampleSelector.drag'
|
|
@@ -9,6 +9,10 @@ type TestDragEvent = Omit<DragEvent, 'dataTransfer'> & {
|
|
|
9
9
|
defaultPrevented: boolean
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
+
function keyboardEvent(key: string, altKey = true): KeyboardEvent {
|
|
13
|
+
return { key, altKey, preventDefault: () => {} } as unknown as KeyboardEvent
|
|
14
|
+
}
|
|
15
|
+
|
|
12
16
|
function createDragEvent(options: { clientY?: number; top?: number; height?: number } = {}) {
|
|
13
17
|
const data: Record<string, string> = {}
|
|
14
18
|
const transfer = {
|
|
@@ -123,4 +127,50 @@ describe('SampleSelector drag helpers', () => {
|
|
|
123
127
|
|
|
124
128
|
expect(drag.reorderTarget.value).toBe('Liver / High / 10min')
|
|
125
129
|
})
|
|
130
|
+
|
|
131
|
+
it('reorders sibling groups with Alt and the arrow keys', async () => {
|
|
132
|
+
const state = ref<SampleGroup[]>([
|
|
133
|
+
{ name: 'Liver / High / 5min', color: '#111111', samples: ['L1'] },
|
|
134
|
+
{ name: 'Liver / High / 10min', color: '#222222', samples: ['L2'] },
|
|
135
|
+
{ name: 'Liver / High / 20min', color: '#333333', samples: ['L3'] },
|
|
136
|
+
])
|
|
137
|
+
const drag = useSampleSelectorDrag(state)
|
|
138
|
+
|
|
139
|
+
drag.handleGroupReorderKeydown('Liver / High / 5min', 'sub', keyboardEvent('ArrowDown'))
|
|
140
|
+
|
|
141
|
+
expect(state.value.map(group => group.name)).toEqual([
|
|
142
|
+
'Liver / High / 10min',
|
|
143
|
+
'Liver / High / 5min',
|
|
144
|
+
'Liver / High / 20min',
|
|
145
|
+
])
|
|
146
|
+
|
|
147
|
+
await nextTick()
|
|
148
|
+
expect(drag.announcement.value).toBe('Liver / High / 5min moved down to position 2 of 3.')
|
|
149
|
+
})
|
|
150
|
+
|
|
151
|
+
it('keeps a group inside its own family and ignores arrows without Alt', () => {
|
|
152
|
+
const state = ref<SampleGroup[]>([
|
|
153
|
+
{ name: 'Liver / High / 5min', color: '#111111', samples: ['L1'] },
|
|
154
|
+
{ name: 'Muscle / High / 5min', color: '#222222', samples: ['M1'] },
|
|
155
|
+
])
|
|
156
|
+
const drag = useSampleSelectorDrag(state)
|
|
157
|
+
const before = state.value
|
|
158
|
+
|
|
159
|
+
drag.handleGroupReorderKeydown('Liver / High / 5min', 'sub', keyboardEvent('ArrowDown'))
|
|
160
|
+
drag.handleGroupReorderKeydown('Liver / High / 5min', 'sub', keyboardEvent('ArrowDown', false))
|
|
161
|
+
|
|
162
|
+
expect(state.value).toBe(before)
|
|
163
|
+
})
|
|
164
|
+
|
|
165
|
+
it('reorders whole major families with Alt and the arrow keys', () => {
|
|
166
|
+
const state = ref<SampleGroup[]>([
|
|
167
|
+
{ name: 'Liver / High', color: '#111111', samples: ['L1'] },
|
|
168
|
+
{ name: 'Muscle / High', color: '#222222', samples: ['M1'] },
|
|
169
|
+
])
|
|
170
|
+
const drag = useSampleSelectorDrag(state)
|
|
171
|
+
|
|
172
|
+
drag.handleGroupReorderKeydown('Muscle', 'major', keyboardEvent('ArrowUp'))
|
|
173
|
+
|
|
174
|
+
expect(state.value.map(group => group.name)).toEqual(['Muscle / High', 'Liver / High'])
|
|
175
|
+
})
|
|
126
176
|
})
|
|
@@ -41,4 +41,67 @@ describe('ScheduleCalendar', () => {
|
|
|
41
41
|
expect(wrapper.findAll('.mint-schedule__month-cell')).toHaveLength(42)
|
|
42
42
|
expect(wrapper.find('.mint-schedule__title').text()).toBe('May 2024')
|
|
43
43
|
})
|
|
44
|
+
|
|
45
|
+
it('reschedules an event with Alt and the arrow keys', async () => {
|
|
46
|
+
const wrapper = mount(ScheduleCalendar, {
|
|
47
|
+
props: {
|
|
48
|
+
modelValue: new Date('2024-05-15T12:00:00'),
|
|
49
|
+
dayStartHour: 6,
|
|
50
|
+
dayEndHour: 10,
|
|
51
|
+
slotDuration: 30,
|
|
52
|
+
showNowIndicator: false,
|
|
53
|
+
events: [
|
|
54
|
+
{
|
|
55
|
+
id: 'run-1',
|
|
56
|
+
title: 'LCMS run',
|
|
57
|
+
start: '2024-05-15T07:00:00',
|
|
58
|
+
end: '2024-05-15T08:00:00',
|
|
59
|
+
},
|
|
60
|
+
],
|
|
61
|
+
},
|
|
62
|
+
})
|
|
63
|
+
|
|
64
|
+
const event = wrapper.get('.mint-schedule__event')
|
|
65
|
+
expect(event.attributes('tabindex')).toBe('0')
|
|
66
|
+
expect(event.attributes('aria-label')).toContain('Press Alt with the up or down arrow keys')
|
|
67
|
+
|
|
68
|
+
await event.trigger('keydown', { key: 'ArrowDown', altKey: true })
|
|
69
|
+
|
|
70
|
+
const update = wrapper.emitted('event-update')?.[0]?.[0] as {
|
|
71
|
+
newStart: Date
|
|
72
|
+
newEnd: Date
|
|
73
|
+
}
|
|
74
|
+
expect(update.newStart.getHours()).toBe(7)
|
|
75
|
+
expect(update.newStart.getMinutes()).toBe(30)
|
|
76
|
+
expect(update.newEnd.getHours()).toBe(8)
|
|
77
|
+
expect(update.newEnd.getMinutes()).toBe(30)
|
|
78
|
+
|
|
79
|
+
await wrapper.vm.$nextTick()
|
|
80
|
+
expect(wrapper.get('[role="status"]').attributes('aria-live')).toBe('polite')
|
|
81
|
+
})
|
|
82
|
+
|
|
83
|
+
it('does not reschedule from the keyboard while readonly', async () => {
|
|
84
|
+
const wrapper = mount(ScheduleCalendar, {
|
|
85
|
+
props: {
|
|
86
|
+
modelValue: new Date('2024-05-15T12:00:00'),
|
|
87
|
+
dayStartHour: 6,
|
|
88
|
+
dayEndHour: 10,
|
|
89
|
+
slotDuration: 30,
|
|
90
|
+
showNowIndicator: false,
|
|
91
|
+
readonly: true,
|
|
92
|
+
events: [
|
|
93
|
+
{
|
|
94
|
+
id: 'run-1',
|
|
95
|
+
title: 'LCMS run',
|
|
96
|
+
start: '2024-05-15T07:00:00',
|
|
97
|
+
end: '2024-05-15T08:00:00',
|
|
98
|
+
},
|
|
99
|
+
],
|
|
100
|
+
},
|
|
101
|
+
})
|
|
102
|
+
|
|
103
|
+
await wrapper.get('.mint-schedule__event').trigger('keydown', { key: 'ArrowDown', altKey: true })
|
|
104
|
+
|
|
105
|
+
expect(wrapper.emitted('event-update')).toBeUndefined()
|
|
106
|
+
})
|
|
44
107
|
})
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { describe, expect, it } from 'vitest'
|
|
2
|
+
import { mount } from '@vue/test-utils'
|
|
3
|
+
import SecretInput from '../../components/SecretInput.vue'
|
|
4
|
+
import {
|
|
5
|
+
isPluginSecretRef,
|
|
6
|
+
keepPluginSecret,
|
|
7
|
+
pluginSecretLabel,
|
|
8
|
+
pluginSecretState,
|
|
9
|
+
} from '../../utils/pluginSecrets'
|
|
10
|
+
|
|
11
|
+
const storedRef = { $secret: 'sec_0f2a4c6e8a0c2e4a6c8e0a2c4e6a8c0e', set: true }
|
|
12
|
+
const lockedRef = { $secret: null, locked: true }
|
|
13
|
+
|
|
14
|
+
describe('pluginSecrets helpers', () => {
|
|
15
|
+
it('should classify each marker the settings response can publish', () => {
|
|
16
|
+
expect([
|
|
17
|
+
pluginSecretState(storedRef),
|
|
18
|
+
pluginSecretState(null),
|
|
19
|
+
pluginSecretState(lockedRef),
|
|
20
|
+
pluginSecretLabel(storedRef),
|
|
21
|
+
pluginSecretLabel(null),
|
|
22
|
+
pluginSecretLabel(lockedRef),
|
|
23
|
+
]).toEqual(['set', 'unset', 'environment', 'Set', 'Not set', 'Provided by environment'])
|
|
24
|
+
})
|
|
25
|
+
|
|
26
|
+
it('should only treat reserved marker shapes as references', () => {
|
|
27
|
+
expect([
|
|
28
|
+
isPluginSecretRef(storedRef),
|
|
29
|
+
isPluginSecretRef({ $mint: 'placeholder' }),
|
|
30
|
+
isPluginSecretRef({ $secret: 'x', label: 'not a marker' }),
|
|
31
|
+
isPluginSecretRef('plain-string'),
|
|
32
|
+
keepPluginSecret(storedRef),
|
|
33
|
+
keepPluginSecret('typed'),
|
|
34
|
+
]).toEqual([true, false, false, false, { ...storedRef }, null])
|
|
35
|
+
})
|
|
36
|
+
})
|
|
37
|
+
|
|
38
|
+
describe('SecretInput', () => {
|
|
39
|
+
it('should show the stored state without exposing a value', () => {
|
|
40
|
+
const wrapper = mount(SecretInput, { props: { modelValue: storedRef } })
|
|
41
|
+
|
|
42
|
+
expect([
|
|
43
|
+
wrapper.find('.mint-secret-input__badge').text(),
|
|
44
|
+
wrapper.find('input').exists(),
|
|
45
|
+
]).toEqual(['Set', false])
|
|
46
|
+
})
|
|
47
|
+
|
|
48
|
+
it('should submit the typed string once the user enters a new value', async () => {
|
|
49
|
+
const wrapper = mount(SecretInput, { props: { modelValue: storedRef } })
|
|
50
|
+
|
|
51
|
+
await wrapper.findAll('button')[0]!.trigger('click')
|
|
52
|
+
await wrapper.setProps({ modelValue: '' })
|
|
53
|
+
await wrapper.find('input').setValue('typed-secret')
|
|
54
|
+
|
|
55
|
+
expect(wrapper.emitted('update:modelValue')).toEqual([[''], ['typed-secret']])
|
|
56
|
+
})
|
|
57
|
+
|
|
58
|
+
it('should submit null when the user clears a stored secret', async () => {
|
|
59
|
+
const wrapper = mount(SecretInput, { props: { modelValue: storedRef } })
|
|
60
|
+
|
|
61
|
+
const clear = wrapper.findAll('button').at(-1)!
|
|
62
|
+
await clear.trigger('click')
|
|
63
|
+
|
|
64
|
+
expect(wrapper.emitted('update:modelValue')).toEqual([[null]])
|
|
65
|
+
})
|
|
66
|
+
|
|
67
|
+
it('should restore the stored reference when an edit is cancelled', async () => {
|
|
68
|
+
const wrapper = mount(SecretInput, { props: { modelValue: storedRef } })
|
|
69
|
+
|
|
70
|
+
await wrapper.findAll('button')[0]!.trigger('click')
|
|
71
|
+
await wrapper.setProps({ modelValue: 'partial' })
|
|
72
|
+
await wrapper.findAll('button')[0]!.trigger('click')
|
|
73
|
+
|
|
74
|
+
expect(wrapper.emitted('update:modelValue')?.at(-1)).toEqual([{ ...storedRef }])
|
|
75
|
+
})
|
|
76
|
+
|
|
77
|
+
it('should keep an environment-provided secret read-only', async () => {
|
|
78
|
+
const wrapper = mount(SecretInput, { props: { modelValue: lockedRef } })
|
|
79
|
+
|
|
80
|
+
expect([
|
|
81
|
+
wrapper.find('.mint-secret-input__badge').text(),
|
|
82
|
+
wrapper.find('.mint-secret-input__hint').exists(),
|
|
83
|
+
wrapper.findAll('button').every(button => button.attributes('disabled') !== undefined),
|
|
84
|
+
wrapper.emitted('update:modelValue'),
|
|
85
|
+
]).toEqual(['Provided by environment', true, true, undefined])
|
|
86
|
+
})
|
|
87
|
+
})
|