@morscherlab/mint-sdk 1.2.0-beta.2 → 1.2.0-beta.20
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 +65 -5
- package/dist/{ExperimentPopover-tLwJ7XF4.js → ExperimentPopover-CJdNlCZb.js} +24 -15
- package/dist/ExperimentPopover-CJdNlCZb.js.map +1 -0
- package/dist/{ExperimentSelectorModal-DyPAUCLw.js → ExperimentSelectorModal-DCXmwKNS.js} +5 -5
- package/dist/ExperimentSelectorModal-DCXmwKNS.js.map +1 -0
- package/dist/{SettingsModal-BgKY93zh.js → SettingsModal-BYR20I4c.js} +5 -8
- package/dist/SettingsModal-BYR20I4c.js.map +1 -0
- package/dist/{EmptyState-p90quq8Z.js → Skeleton-BAF3CKY7.js} +111 -93
- package/dist/Skeleton-BAF3CKY7.js.map +1 -0
- package/dist/__tests__/components/DataStates.test.d.ts +1 -0
- package/dist/__tests__/components/ExperimentTimeline.test.d.ts +1 -0
- package/dist/__tests__/components/FileBrowserModal.test.d.ts +1 -0
- package/dist/__tests__/components/FilePicker.state.test.d.ts +1 -0
- package/dist/__tests__/components/FilePicker.test.d.ts +1 -0
- package/dist/__tests__/components/PlotlyChart.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__/components/iconButtonIconSizing.test.d.ts +1 -0
- package/dist/__tests__/composables/useFileBrowser.test.d.ts +1 -0
- package/dist/__tests__/composables/useListReorder.test.d.ts +1 -0
- package/dist/__tests__/composables/usePlatformFilePickerAdapter.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/apiErrors.d.ts +26 -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/BaseInput.vue.d.ts +1 -1
- package/dist/components/BaseSelect.vue.d.ts +1 -1
- package/dist/components/BaseTextarea.vue.d.ts +1 -1
- package/dist/components/BatchProgressList.vue.d.ts +17 -0
- package/dist/components/BioTemplateExperimentWorkspaceView.vue.d.ts +4 -4
- package/dist/components/BioTemplatePackWorkspaceView.vue.d.ts +2 -2
- package/dist/components/ConcentrationInput.vue.d.ts +1 -1
- package/dist/components/DataFrame.vue.d.ts +14 -2
- package/dist/components/DatePicker.vue.d.ts +2 -2
- package/dist/components/DateTimePicker.vue.d.ts +3 -1
- 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/FileBrowserModal.vue.d.ts +99 -0
- package/dist/components/FilePicker.vue.d.ts +32 -0
- package/dist/components/FileUploader.vue.d.ts +5 -2
- package/dist/components/FitPanel.vue.d.ts +1 -1
- package/dist/components/FormulaInput.vue.d.ts +1 -1
- package/dist/components/GeneratedPlotlyResult.vue.d.ts +1 -3
- package/dist/components/JobsStatusTray.vue.d.ts +9 -2
- package/dist/components/LcmsSequenceTable.vue.d.ts +29 -1
- package/dist/components/MobileSupportGate.vue.d.ts +1 -1
- package/dist/components/MoleculeInput.vue.d.ts +1 -1
- package/dist/components/NumberInput.vue.d.ts +1 -1
- package/dist/components/PlotlyChart.vue.d.ts +59 -0
- 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/ResourceCard.vue.d.ts +1 -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/SequenceInput.vue.d.ts +1 -1
- package/dist/components/SettingsModal.vue.d.ts +1 -1
- package/dist/components/SmartGroupFieldRecipe.vue.d.ts +2 -1
- package/dist/components/StatusIndicator.vue.d.ts +1 -1
- package/dist/components/TagsInput.vue.d.ts +1 -1
- package/dist/components/TimePicker.vue.d.ts +2 -1
- package/dist/components/TimeRangeInput.vue.d.ts +1 -1
- package/dist/components/UnitInput.vue.d.ts +1 -1
- 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 +30 -1
- package/dist/components/fileBrowserPresentation.d.ts +10 -0
- package/dist/components/index.d.ts +13 -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/FileBrowserDialogInternal.vue.d.ts +34 -0
- package/dist/components/internal/FileBrowserListingInternal.vue.d.ts +25 -0
- package/dist/components/internal/FileBrowserToolbarInternal.vue.d.ts +26 -0
- package/dist/components/internal/FilePickerPreviewInternal.vue.d.ts +18 -0
- package/dist/components/internal/FilePickerTreeInternal.vue.d.ts +31 -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-DIum5hkx.js} +5882 -3200
- package/dist/components-DIum5hkx.js.map +1 -0
- package/dist/composables/controlSchemaTypes.d.ts +34 -0
- package/dist/composables/filePicker/localFiles.d.ts +3 -0
- package/dist/composables/filePicker/usePickerNavigation.d.ts +96 -0
- package/dist/composables/filePicker/usePickerSelection.d.ts +31 -0
- package/dist/composables/filePicker/validation.d.ts +5 -0
- package/dist/composables/flattenWorkspaceBindings.d.ts +61 -0
- package/dist/composables/index.d.ts +11 -2
- package/dist/composables/index.js +10 -10
- package/dist/composables/pluginWorkspaceModel.d.ts +164 -0
- package/dist/composables/useApi.d.ts +14 -7
- 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/useFileBrowser.d.ts +55 -0
- package/dist/composables/useFilePicker.d.ts +189 -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/usePlatformFilePickerAdapter.d.ts +11 -0
- 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-mFXsTA4g.js} +502 -86
- package/dist/composables-mFXsTA4g.js.map +1 -0
- package/dist/{useApi-J6zFkHmn.js → errors-BLuqMee5.js} +179 -16
- package/dist/errors-BLuqMee5.js.map +1 -0
- package/dist/{experiment-Cq145oEW.js → experiment-CVDRAnqp.js} +3 -8
- package/dist/experiment-CVDRAnqp.js.map +1 -0
- package/dist/{experiment-utils-CLnzPPq5.js → experiment-utils-CV2Wza3z.js} +70 -51
- package/dist/experiment-utils-CV2Wza3z.js.map +1 -0
- package/dist/index.d.ts +2 -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 +15135 -32397
- package/dist/templates/builderReadUtils.d.ts +1 -1
- package/dist/templates/index.js +2 -4
- package/dist/{templates-DsP51i-S.js → templates-CmGfmBRA.js} +303 -106
- package/dist/templates-CmGfmBRA.js.map +1 -0
- package/dist/types/auth.d.ts +1 -0
- package/dist/types/fileBrowserTypes.d.ts +77 -0
- package/dist/types/filePicker.d.ts +77 -0
- package/dist/types/form-builder.d.ts +1 -1
- package/dist/types/index.d.ts +2 -0
- package/dist/{useControlSchema-BDx2Olha.js → useControlSchema-DldpxNOP.js} +499 -1162
- package/dist/useControlSchema-DldpxNOP.js.map +1 -0
- package/dist/{useDropdownState-DSb3BC3N.js → useDropdownState-C7hRiVQf.js} +22 -6
- package/dist/useDropdownState-C7hRiVQf.js.map +1 -0
- package/dist/{useExperimentSelector-CV4iNfMS.js → useExperimentSelector-CEcIaueJ.js} +4 -4
- package/dist/{useExperimentSelector-CV4iNfMS.js.map → useExperimentSelector-CEcIaueJ.js.map} +1 -1
- package/dist/{useFormBuilder-BLxG3BOX.js → useFormBuilder-z5L_dUIy.js} +2 -2
- package/dist/{useFormBuilder-BLxG3BOX.js.map → useFormBuilder-z5L_dUIy.js.map} +1 -1
- 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/dist/{useProtocolTemplates-CS_SQl6U.js → validation-uwoJGEb6.js} +811 -212
- package/dist/validation-uwoJGEb6.js.map +1 -0
- package/package.json +1 -1
- package/src/__tests__/apiErrors.test.ts +81 -0
- 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/ExperimentPopover.test.ts +30 -0
- package/src/__tests__/components/ExperimentTimeline.test.ts +63 -0
- package/src/__tests__/components/FileBrowserModal.test.ts +460 -0
- package/src/__tests__/components/FilePicker.state.test.ts +287 -0
- package/src/__tests__/components/FilePicker.test.ts +487 -0
- package/src/__tests__/components/GeneratedPlotlyResult.test.ts +52 -5
- package/src/__tests__/components/GroupAssigner.test.ts +53 -0
- package/src/__tests__/components/LcmsSequenceTable.test.ts +22 -0
- package/src/__tests__/components/PlotlyChart.test.ts +305 -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 +107 -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__/components/iconButtonIconSizing.test.ts +18 -0
- package/src/__tests__/composables/useApi.test.ts +92 -9
- package/src/__tests__/composables/useAuth.test.ts +2 -0
- package/src/__tests__/composables/useDropdownState.test.ts +58 -1
- package/src/__tests__/composables/useFileBrowser.test.ts +305 -0
- package/src/__tests__/composables/useGeneratedAnalysis.test.ts +7 -2
- package/src/__tests__/composables/useListReorder.test.ts +145 -0
- package/src/__tests__/composables/usePlatformFilePickerAdapter.test.ts +67 -0
- package/src/__tests__/composables/usePluginClient.test.ts +143 -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/apiErrors.ts +85 -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 +12 -7
- 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/FileBrowserModal.story.vue +203 -0
- package/src/components/FileBrowserModal.vue +384 -0
- package/src/components/FilePicker.story.vue +44 -0
- package/src/components/FilePicker.vue +284 -0
- package/src/components/FileUploader.vue +32 -18
- 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 +34 -69
- 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 -9
- 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/PlotlyChart.story.vue +61 -0
- package/src/components/PlotlyChart.vue +233 -0
- 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 +50 -7
- 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/fileBrowserPresentation.ts +39 -0
- package/src/components/index.ts +14 -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/FileBrowserDialogInternal.vue +75 -0
- package/src/components/internal/FileBrowserListingInternal.vue +197 -0
- package/src/components/internal/FileBrowserToolbarInternal.vue +136 -0
- package/src/components/internal/FilePickerPreviewInternal.vue +100 -0
- package/src/components/internal/FilePickerTreeInternal.vue +238 -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/filePicker/localFiles.ts +58 -0
- package/src/composables/filePicker/usePickerNavigation.ts +220 -0
- package/src/composables/filePicker/usePickerSelection.ts +259 -0
- package/src/composables/filePicker/validation.ts +41 -0
- package/src/composables/flattenWorkspaceBindings.ts +104 -0
- package/src/composables/formBuilderRegistry.ts +5 -0
- package/src/composables/index.ts +50 -0
- package/src/composables/pluginWorkspaceModel.ts +182 -0
- package/src/composables/useApi.ts +57 -13
- 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/useFileBrowser.ts +314 -0
- package/src/composables/useFileImport.ts +2 -7
- package/src/composables/useFilePicker.ts +366 -0
- package/src/composables/useFocusTrap.ts +91 -0
- package/src/composables/useGeneratedAnalysis.ts +32 -27
- 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/usePlatformFilePickerAdapter.ts +104 -0
- package/src/composables/usePluginClient.ts +50 -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 +19 -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/file-browser-modal.css +489 -0
- package/src/styles/components/file-picker.css +502 -0
- package/src/styles/components/form-builder.css +5 -5
- package/src/styles/components/icon-button.css +9 -0
- 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 +12 -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/fileBrowserTypes.ts +85 -0
- package/src/types/filePicker.ts +72 -0
- package/src/types/form-builder.ts +1 -0
- package/src/types/index.ts +14 -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 → apiErrors.test.d.ts} +0 -0
|
@@ -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
|
+
})
|
|
@@ -3,6 +3,25 @@ import { describe, expect, it } from 'vitest'
|
|
|
3
3
|
import SegmentedControl from '../../components/SegmentedControl.vue'
|
|
4
4
|
|
|
5
5
|
describe('SegmentedControl', () => {
|
|
6
|
+
it('defaults to card while allowing an explicit simple variant', async () => {
|
|
7
|
+
const wrapper = mount(SegmentedControl, {
|
|
8
|
+
props: {
|
|
9
|
+
modelValue: 'table',
|
|
10
|
+
options: [{ value: 'table', label: 'Table', description: 'View rows' }],
|
|
11
|
+
},
|
|
12
|
+
})
|
|
13
|
+
|
|
14
|
+
expect(wrapper.classes()).toContain('mint-segmented-control--card')
|
|
15
|
+
expect(wrapper.get('button').classes()).toContain('mint-segmented-control__option--card')
|
|
16
|
+
expect(wrapper.get('.mint-segmented-control__description').text()).toBe('View rows')
|
|
17
|
+
|
|
18
|
+
await wrapper.setProps({ variant: 'simple' })
|
|
19
|
+
|
|
20
|
+
expect(wrapper.classes()).toContain('mint-segmented-control--simple')
|
|
21
|
+
expect(wrapper.get('button').classes()).toContain('mint-segmented-control__option--simple')
|
|
22
|
+
expect(wrapper.find('.mint-segmented-control__description').exists()).toBe(false)
|
|
23
|
+
})
|
|
24
|
+
|
|
6
25
|
it('accepts string and number shorthand options', async () => {
|
|
7
26
|
const wrapper = mount(SegmentedControl, {
|
|
8
27
|
props: {
|
|
@@ -66,4 +85,92 @@ describe('SegmentedControl', () => {
|
|
|
66
85
|
|
|
67
86
|
expect(wrapper.emitted('update:modelValue')).toBeUndefined()
|
|
68
87
|
})
|
|
88
|
+
|
|
89
|
+
describe('roving tabindex', () => {
|
|
90
|
+
const options = [
|
|
91
|
+
{ value: 'table', label: 'Table' },
|
|
92
|
+
{ value: 'chart', label: 'Chart' },
|
|
93
|
+
{ value: 'raw', label: 'Raw' },
|
|
94
|
+
]
|
|
95
|
+
|
|
96
|
+
it('makes only the checked option tabbable', () => {
|
|
97
|
+
const wrapper = mount(SegmentedControl, {
|
|
98
|
+
props: { modelValue: 'chart', options },
|
|
99
|
+
})
|
|
100
|
+
|
|
101
|
+
expect(wrapper.findAll('button').map(button => button.attributes('tabindex')))
|
|
102
|
+
.toEqual(['-1', '0', '-1'])
|
|
103
|
+
})
|
|
104
|
+
|
|
105
|
+
it('falls back to the first selectable option when nothing matches', () => {
|
|
106
|
+
const wrapper = mount(SegmentedControl, {
|
|
107
|
+
props: { modelValue: 'missing', options },
|
|
108
|
+
})
|
|
109
|
+
|
|
110
|
+
expect(wrapper.findAll('button').map(button => button.attributes('tabindex')))
|
|
111
|
+
.toEqual(['0', '-1', '-1'])
|
|
112
|
+
})
|
|
113
|
+
|
|
114
|
+
it('activates the adjacent option with the arrow keys, wrapping at the ends', async () => {
|
|
115
|
+
const wrapper = mount(SegmentedControl, {
|
|
116
|
+
props: { modelValue: 'chart', options },
|
|
117
|
+
attachTo: document.body,
|
|
118
|
+
})
|
|
119
|
+
|
|
120
|
+
const buttons = wrapper.findAll('button')
|
|
121
|
+
await buttons[1].trigger('keydown', { key: 'ArrowRight' })
|
|
122
|
+
expect(wrapper.emitted('update:modelValue')?.[0]).toEqual(['raw'])
|
|
123
|
+
|
|
124
|
+
await buttons[1].trigger('keydown', { key: 'ArrowLeft' })
|
|
125
|
+
expect(wrapper.emitted('update:modelValue')?.[1]).toEqual(['table'])
|
|
126
|
+
|
|
127
|
+
await wrapper.setProps({ modelValue: 'raw' })
|
|
128
|
+
await wrapper.findAll('button')[2].trigger('keydown', { key: 'ArrowRight' })
|
|
129
|
+
expect(wrapper.emitted('update:modelValue')?.[2]).toEqual(['table'])
|
|
130
|
+
|
|
131
|
+
wrapper.unmount()
|
|
132
|
+
})
|
|
133
|
+
|
|
134
|
+
it('jumps to the first and last option with Home and End', async () => {
|
|
135
|
+
const wrapper = mount(SegmentedControl, {
|
|
136
|
+
props: { modelValue: 'chart', options },
|
|
137
|
+
})
|
|
138
|
+
|
|
139
|
+
const buttons = wrapper.findAll('button')
|
|
140
|
+
await buttons[1].trigger('keydown', { key: 'Home' })
|
|
141
|
+
expect(wrapper.emitted('update:modelValue')?.[0]).toEqual(['table'])
|
|
142
|
+
|
|
143
|
+
await buttons[1].trigger('keydown', { key: 'End' })
|
|
144
|
+
expect(wrapper.emitted('update:modelValue')?.[1]).toEqual(['raw'])
|
|
145
|
+
})
|
|
146
|
+
|
|
147
|
+
it('skips disabled options during arrow navigation', async () => {
|
|
148
|
+
const wrapper = mount(SegmentedControl, {
|
|
149
|
+
props: {
|
|
150
|
+
modelValue: 'table',
|
|
151
|
+
options,
|
|
152
|
+
disabledValues: ['chart'],
|
|
153
|
+
},
|
|
154
|
+
})
|
|
155
|
+
|
|
156
|
+
await wrapper.findAll('button')[0].trigger('keydown', { key: 'ArrowRight' })
|
|
157
|
+
|
|
158
|
+
expect(wrapper.emitted('update:modelValue')?.[0]).toEqual(['raw'])
|
|
159
|
+
})
|
|
160
|
+
|
|
161
|
+
it('moves focus onto the newly activated option', async () => {
|
|
162
|
+
const wrapper = mount(SegmentedControl, {
|
|
163
|
+
props: { modelValue: 'table', options },
|
|
164
|
+
attachTo: document.body,
|
|
165
|
+
})
|
|
166
|
+
|
|
167
|
+
await wrapper.findAll('button')[0].trigger('keydown', { key: 'ArrowRight' })
|
|
168
|
+
await wrapper.setProps({ modelValue: 'chart' })
|
|
169
|
+
await wrapper.vm.$nextTick()
|
|
170
|
+
|
|
171
|
+
expect(document.activeElement).toBe(wrapper.findAll('button')[1].element)
|
|
172
|
+
|
|
173
|
+
wrapper.unmount()
|
|
174
|
+
})
|
|
175
|
+
})
|
|
69
176
|
})
|
|
@@ -35,4 +35,65 @@ describe('TimePicker', () => {
|
|
|
35
35
|
|
|
36
36
|
wrapper.unmount()
|
|
37
37
|
})
|
|
38
|
+
|
|
39
|
+
it('publishes the highlighted slot through aria-activedescendant', async () => {
|
|
40
|
+
const wrapper = mount(TimePicker, {
|
|
41
|
+
props: { modelValue: '14:30' },
|
|
42
|
+
attachTo: document.body,
|
|
43
|
+
})
|
|
44
|
+
|
|
45
|
+
const input = wrapper.get('input')
|
|
46
|
+
expect(input.attributes('aria-activedescendant')).toBeUndefined()
|
|
47
|
+
|
|
48
|
+
await wrapper.get('.mint-time-picker').trigger('keydown', { key: 'ArrowDown' })
|
|
49
|
+
await wrapper.vm.$nextTick()
|
|
50
|
+
|
|
51
|
+
const listbox = wrapper.get('.mint-time-picker__list')
|
|
52
|
+
expect(input.attributes('aria-controls')).toBe(listbox.attributes('id'))
|
|
53
|
+
|
|
54
|
+
const activeId = input.attributes('aria-activedescendant')
|
|
55
|
+
expect(activeId).toBeDefined()
|
|
56
|
+
expect(wrapper.find(`#${activeId}`).exists()).toBe(true)
|
|
57
|
+
|
|
58
|
+
wrapper.unmount()
|
|
59
|
+
})
|
|
60
|
+
|
|
61
|
+
it('jumps to the first and last selectable slot with Home and End', async () => {
|
|
62
|
+
const wrapper = mount(TimePicker, {
|
|
63
|
+
props: { min: '09:00', max: '10:00', step: 30 },
|
|
64
|
+
attachTo: document.body,
|
|
65
|
+
})
|
|
66
|
+
|
|
67
|
+
const root = wrapper.get('.mint-time-picker')
|
|
68
|
+
await root.trigger('keydown', { key: 'ArrowDown' })
|
|
69
|
+
await root.trigger('keydown', { key: 'End' })
|
|
70
|
+
await wrapper.vm.$nextTick()
|
|
71
|
+
|
|
72
|
+
const slots = wrapper.findAll('.mint-time-picker__slot')
|
|
73
|
+
expect(slots.at(-1)?.classes()).toContain('mint-time-picker__slot--highlighted')
|
|
74
|
+
|
|
75
|
+
await root.trigger('keydown', { key: 'Home' })
|
|
76
|
+
await wrapper.vm.$nextTick()
|
|
77
|
+
expect(wrapper.findAll('.mint-time-picker__slot')[0].classes())
|
|
78
|
+
.toContain('mint-time-picker__slot--highlighted')
|
|
79
|
+
|
|
80
|
+
wrapper.unmount()
|
|
81
|
+
})
|
|
82
|
+
|
|
83
|
+
it('returns focus to the input when Escape closes the list', async () => {
|
|
84
|
+
const wrapper = mount(TimePicker, { attachTo: document.body })
|
|
85
|
+
const input = wrapper.get<HTMLInputElement>('input').element
|
|
86
|
+
|
|
87
|
+
await wrapper.get('.mint-time-picker').trigger('keydown', { key: 'ArrowDown' })
|
|
88
|
+
expect(wrapper.find('.mint-time-picker__dropdown').exists()).toBe(true)
|
|
89
|
+
|
|
90
|
+
await wrapper.get('.mint-time-picker').trigger('keydown', { key: 'Escape' })
|
|
91
|
+
await wrapper.vm.$nextTick()
|
|
92
|
+
await wrapper.vm.$nextTick()
|
|
93
|
+
|
|
94
|
+
expect(wrapper.find('.mint-time-picker__dropdown').exists()).toBe(false)
|
|
95
|
+
expect(document.activeElement).toBe(input)
|
|
96
|
+
|
|
97
|
+
wrapper.unmount()
|
|
98
|
+
})
|
|
38
99
|
})
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { mount } from '@vue/test-utils'
|
|
2
|
+
import { describe, expect, it } from 'vitest'
|
|
3
|
+
import WellEditPopupInternal from '../../components/internal/WellEditPopupInternal.vue'
|
|
4
|
+
|
|
5
|
+
function mountPopup(attachTo?: HTMLElement) {
|
|
6
|
+
return mount(WellEditPopupInternal, {
|
|
7
|
+
props: {
|
|
8
|
+
wellId: 'A1',
|
|
9
|
+
position: { x: 10, y: 10 },
|
|
10
|
+
},
|
|
11
|
+
attachTo,
|
|
12
|
+
global: {
|
|
13
|
+
stubs: { teleport: true },
|
|
14
|
+
},
|
|
15
|
+
})
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
describe('WellEditPopupInternal focus trap', () => {
|
|
19
|
+
it('moves focus into the popup on mount', async () => {
|
|
20
|
+
const host = document.createElement('div')
|
|
21
|
+
document.body.appendChild(host)
|
|
22
|
+
const wrapper = mountPopup(host)
|
|
23
|
+
await wrapper.vm.$nextTick()
|
|
24
|
+
await wrapper.vm.$nextTick()
|
|
25
|
+
|
|
26
|
+
expect(wrapper.find('.mint-well-edit-popup').element.contains(document.activeElement)).toBe(true)
|
|
27
|
+
|
|
28
|
+
wrapper.unmount()
|
|
29
|
+
host.remove()
|
|
30
|
+
})
|
|
31
|
+
|
|
32
|
+
it('restores focus to the previously focused element on unmount', async () => {
|
|
33
|
+
const host = document.createElement('div')
|
|
34
|
+
document.body.appendChild(host)
|
|
35
|
+
const trigger = document.createElement('button')
|
|
36
|
+
host.appendChild(trigger)
|
|
37
|
+
trigger.focus()
|
|
38
|
+
expect(document.activeElement).toBe(trigger)
|
|
39
|
+
|
|
40
|
+
const wrapper = mountPopup(host)
|
|
41
|
+
await wrapper.vm.$nextTick()
|
|
42
|
+
await wrapper.vm.$nextTick()
|
|
43
|
+
expect(document.activeElement).not.toBe(trigger)
|
|
44
|
+
|
|
45
|
+
wrapper.unmount()
|
|
46
|
+
expect(document.activeElement).toBe(trigger)
|
|
47
|
+
|
|
48
|
+
host.remove()
|
|
49
|
+
})
|
|
50
|
+
|
|
51
|
+
it('wraps Tab from the last focusable element back to the first', async () => {
|
|
52
|
+
const host = document.createElement('div')
|
|
53
|
+
document.body.appendChild(host)
|
|
54
|
+
const wrapper = mountPopup(host)
|
|
55
|
+
await wrapper.vm.$nextTick()
|
|
56
|
+
await wrapper.vm.$nextTick()
|
|
57
|
+
|
|
58
|
+
const focusable = (wrapper.element as HTMLElement).querySelectorAll<HTMLElement>(
|
|
59
|
+
'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])',
|
|
60
|
+
)
|
|
61
|
+
expect(focusable.length).toBeGreaterThan(1)
|
|
62
|
+
const last = focusable[focusable.length - 1]
|
|
63
|
+
const first = focusable[0]
|
|
64
|
+
last.focus()
|
|
65
|
+
|
|
66
|
+
const event = new KeyboardEvent('keydown', { key: 'Tab', bubbles: true, cancelable: true })
|
|
67
|
+
document.dispatchEvent(event)
|
|
68
|
+
|
|
69
|
+
expect(document.activeElement).toBe(first)
|
|
70
|
+
|
|
71
|
+
wrapper.unmount()
|
|
72
|
+
host.remove()
|
|
73
|
+
})
|
|
74
|
+
|
|
75
|
+
it('wraps Shift+Tab from the first focusable element back to the last', async () => {
|
|
76
|
+
const host = document.createElement('div')
|
|
77
|
+
document.body.appendChild(host)
|
|
78
|
+
const wrapper = mountPopup(host)
|
|
79
|
+
await wrapper.vm.$nextTick()
|
|
80
|
+
await wrapper.vm.$nextTick()
|
|
81
|
+
|
|
82
|
+
const focusable = (wrapper.element as HTMLElement).querySelectorAll<HTMLElement>(
|
|
83
|
+
'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])',
|
|
84
|
+
)
|
|
85
|
+
const first = focusable[0]
|
|
86
|
+
const last = focusable[focusable.length - 1]
|
|
87
|
+
first.focus()
|
|
88
|
+
|
|
89
|
+
const event = new KeyboardEvent('keydown', { key: 'Tab', shiftKey: true, bubbles: true, cancelable: true })
|
|
90
|
+
document.dispatchEvent(event)
|
|
91
|
+
|
|
92
|
+
expect(document.activeElement).toBe(last)
|
|
93
|
+
|
|
94
|
+
wrapper.unmount()
|
|
95
|
+
host.remove()
|
|
96
|
+
})
|
|
97
|
+
|
|
98
|
+
it('closes on Escape', async () => {
|
|
99
|
+
const wrapper = mountPopup()
|
|
100
|
+
await wrapper.vm.$nextTick()
|
|
101
|
+
|
|
102
|
+
const event = new KeyboardEvent('keydown', { key: 'Escape', bubbles: true })
|
|
103
|
+
document.dispatchEvent(event)
|
|
104
|
+
|
|
105
|
+
expect(wrapper.emitted('close')).toHaveLength(1)
|
|
106
|
+
wrapper.unmount()
|
|
107
|
+
})
|
|
108
|
+
})
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { describe, expect, it, vi } from 'vitest'
|
|
2
|
+
import { nextTick } from 'vue'
|
|
2
3
|
import {
|
|
3
4
|
nextClickedWellSelection,
|
|
4
5
|
useWellPlateInteraction,
|
|
@@ -41,6 +42,14 @@ function dragEvent(data: Record<string, string> = {}): DragEvent {
|
|
|
41
42
|
} as unknown as DragEvent
|
|
42
43
|
}
|
|
43
44
|
|
|
45
|
+
function keyEvent(key: string, altKey = true): KeyboardEvent {
|
|
46
|
+
return {
|
|
47
|
+
key,
|
|
48
|
+
altKey,
|
|
49
|
+
preventDefault: vi.fn(),
|
|
50
|
+
} as unknown as KeyboardEvent
|
|
51
|
+
}
|
|
52
|
+
|
|
44
53
|
function createInteraction(overrides: Partial<Parameters<typeof useWellPlateInteraction>[0]> = {}) {
|
|
45
54
|
const emitted: Record<string, unknown[]> = {}
|
|
46
55
|
const selected = { value: [] as string[] }
|
|
@@ -168,4 +177,54 @@ describe('WellPlate interaction helpers', () => {
|
|
|
168
177
|
['A1', 'A2', 'B1', 'B2'],
|
|
169
178
|
])
|
|
170
179
|
})
|
|
180
|
+
|
|
181
|
+
it('moves a well with the keyboard pick-up/drop chord in drag mode', async () => {
|
|
182
|
+
const { emitted, interaction, selectionMode } = createInteraction()
|
|
183
|
+
selectionMode.value = 'drag'
|
|
184
|
+
const source = well({ id: 'A1', row: 0, col: 0, sampleType: 'sample' })
|
|
185
|
+
const target = well({ id: 'B2', row: 1, col: 1 })
|
|
186
|
+
|
|
187
|
+
interaction.handleWellMoveKeydown(source, keyEvent('Enter'))
|
|
188
|
+
expect(interaction.dragSourceWell.value).toBe('A1')
|
|
189
|
+
|
|
190
|
+
interaction.handleWellMoveKeydown(target, keyEvent('Enter'))
|
|
191
|
+
|
|
192
|
+
expect(emitted.move).toEqual([['A1', 'B2']])
|
|
193
|
+
expect(interaction.dragSourceWell.value).toBeNull()
|
|
194
|
+
|
|
195
|
+
await nextTick()
|
|
196
|
+
expect(interaction.moveAnnouncement.value).toBe('Well A1 moved to B2.')
|
|
197
|
+
})
|
|
198
|
+
|
|
199
|
+
it('cancels a keyboard pick-up with Escape and refuses empty wells', () => {
|
|
200
|
+
const { emitted, interaction, selectionMode } = createInteraction()
|
|
201
|
+
selectionMode.value = 'drag'
|
|
202
|
+
|
|
203
|
+
interaction.handleWellMoveKeydown(well({ id: 'A2', row: 0, col: 1 }), keyEvent('Enter'))
|
|
204
|
+
expect(interaction.dragSourceWell.value).toBeNull()
|
|
205
|
+
|
|
206
|
+
interaction.handleWellMoveKeydown(
|
|
207
|
+
well({ id: 'A1', row: 0, col: 0, sampleType: 'sample' }),
|
|
208
|
+
keyEvent('Enter'),
|
|
209
|
+
)
|
|
210
|
+
expect(interaction.dragSourceWell.value).toBe('A1')
|
|
211
|
+
|
|
212
|
+
interaction.handleWellMoveKeydown(
|
|
213
|
+
well({ id: 'A1', row: 0, col: 0, sampleType: 'sample' }),
|
|
214
|
+
keyEvent('Escape', false),
|
|
215
|
+
)
|
|
216
|
+
expect(interaction.dragSourceWell.value).toBeNull()
|
|
217
|
+
expect(emitted.move).toBeUndefined()
|
|
218
|
+
})
|
|
219
|
+
|
|
220
|
+
it('ignores the move chord outside drag selection mode', () => {
|
|
221
|
+
const { interaction } = createInteraction()
|
|
222
|
+
|
|
223
|
+
interaction.handleWellMoveKeydown(
|
|
224
|
+
well({ id: 'A1', row: 0, col: 0, sampleType: 'sample' }),
|
|
225
|
+
keyEvent('Enter'),
|
|
226
|
+
)
|
|
227
|
+
|
|
228
|
+
expect(interaction.dragSourceWell.value).toBeNull()
|
|
229
|
+
})
|
|
171
230
|
})
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { readFileSync } from 'node:fs'
|
|
2
|
+
import { resolve } from 'node:path'
|
|
3
|
+
import { describe, expect, it } from 'vitest'
|
|
4
|
+
|
|
5
|
+
// jsdom has no layout, so this pins the stylesheet contract instead: a bare
|
|
6
|
+
// <svg> passed to IconButton's slot must be sized by the icon box, otherwise it
|
|
7
|
+
// collapses to zero width as a flex item (FilePicker source toggles, beta.14).
|
|
8
|
+
describe('IconButton icon sizing', () => {
|
|
9
|
+
it('should size a bare slot svg to the icon box when the caller passes no dimensions', () => {
|
|
10
|
+
const css = readFileSync(
|
|
11
|
+
resolve(__dirname, '../../styles/components/icon-button.css'),
|
|
12
|
+
'utf8',
|
|
13
|
+
)
|
|
14
|
+
expect(css).toMatch(
|
|
15
|
+
/\.mint-icon-button__icon--sm > svg,\s*\.mint-icon-button__icon--md > svg,\s*\.mint-icon-button__icon--lg > svg \{\s*width: 100%;\s*height: 100%;\s*\}/,
|
|
16
|
+
)
|
|
17
|
+
})
|
|
18
|
+
})
|