@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
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
import type { TopBarVariant } from '../types'
|
|
2
|
+
import type { FormEnhancements } from '../types/form-builder'
|
|
3
|
+
import type {
|
|
4
|
+
ControlModel,
|
|
5
|
+
ControlModelBinding,
|
|
6
|
+
ControlSchema,
|
|
7
|
+
ControlWorkspaceOptions,
|
|
8
|
+
UseControlWorkspaceReturn,
|
|
9
|
+
} from './useControlSchema'
|
|
10
|
+
import { mergeControlWorkspaceOptions, resolveControlModel } from './useControlSchema'
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Merges `initialValues`/external `modelValue`/`values` on top of a base
|
|
14
|
+
* `ControlWorkspaceOptions.initialValues`, matching the layering FormBuilder expects: base
|
|
15
|
+
* defaults, then caller-supplied initial values, then live external values win last. Shared by
|
|
16
|
+
* {@link controlWorkspaceProps} and {@link bioTemplatePresetWorkspaceProps} so both "generate a
|
|
17
|
+
* workspace from options, initialValues, and v-model" views merge options identically.
|
|
18
|
+
*/
|
|
19
|
+
export function resolveControlOptionsWithExternalValues<TOptions extends ControlWorkspaceOptions>(
|
|
20
|
+
base: TOptions,
|
|
21
|
+
initialValues: Record<string, unknown> | undefined,
|
|
22
|
+
externalValues: Record<string, unknown> | undefined,
|
|
23
|
+
): TOptions {
|
|
24
|
+
if (initialValues === undefined && externalValues === undefined) return base
|
|
25
|
+
|
|
26
|
+
return {
|
|
27
|
+
...base,
|
|
28
|
+
initialValues: {
|
|
29
|
+
...(base.initialValues ?? {}),
|
|
30
|
+
...(initialValues ?? {}),
|
|
31
|
+
...(externalValues ?? {}),
|
|
32
|
+
},
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface ControlWorkspaceModelProps {
|
|
37
|
+
model?: ControlModel | ControlModelBinding
|
|
38
|
+
controls?: ControlSchema
|
|
39
|
+
controlOptions?: ControlWorkspaceOptions
|
|
40
|
+
initialValues?: Record<string, unknown>
|
|
41
|
+
modelValue?: Record<string, unknown>
|
|
42
|
+
values?: Record<string, unknown>
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export interface ResolvedControlWorkspaceModel {
|
|
46
|
+
/** `modelValue` if provided, else `values` — the single external v-model source of truth. */
|
|
47
|
+
externalValues: Record<string, unknown> | undefined
|
|
48
|
+
/** `model` resolved through `resolveControlModel()`, or undefined for a raw `controls` schema. */
|
|
49
|
+
resolvedModel: ControlModelBinding | undefined
|
|
50
|
+
/** `controls` if provided, else the resolved model's controls, else `{}`. */
|
|
51
|
+
resolvedControls: ControlSchema
|
|
52
|
+
/** `controlOptions` merged over the resolved model's own options, with initialValues/external values layered on top. */
|
|
53
|
+
resolvedControlOptions: ControlWorkspaceOptions
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Resolves ControlWorkspaceView's `model`/`controls`/`controlOptions`/`initialValues`/
|
|
58
|
+
* `modelValue`/`values` props into the schema + options pair `useControlWorkspace()` needs.
|
|
59
|
+
* Pure and framework-free so callers wrap each field in their own `computed()`.
|
|
60
|
+
*
|
|
61
|
+
* @example Recommended
|
|
62
|
+
* ```ts
|
|
63
|
+
* const resolved = computed(() => controlWorkspaceProps(props))
|
|
64
|
+
* const resolvedControls = computed(() => resolved.value.resolvedControls)
|
|
65
|
+
* ```
|
|
66
|
+
*/
|
|
67
|
+
export function controlWorkspaceProps(props: ControlWorkspaceModelProps): ResolvedControlWorkspaceModel {
|
|
68
|
+
const externalValues = props.modelValue ?? props.values
|
|
69
|
+
const resolvedModel = resolveControlModel(props.model)
|
|
70
|
+
const resolvedControls: ControlSchema = props.controls ?? resolvedModel?.controls ?? {}
|
|
71
|
+
const baseControlOptions = mergeControlWorkspaceOptions(resolvedModel?.controlOptions, props.controlOptions)
|
|
72
|
+
const resolvedControlOptions = resolveControlOptionsWithExternalValues(
|
|
73
|
+
baseControlOptions,
|
|
74
|
+
props.initialValues,
|
|
75
|
+
externalValues,
|
|
76
|
+
)
|
|
77
|
+
|
|
78
|
+
return { externalValues, resolvedModel, resolvedControls, resolvedControlOptions }
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export interface DoseDesignWorkspacePassthroughProps {
|
|
82
|
+
workspace?: UseControlWorkspaceReturn<ControlSchema>
|
|
83
|
+
controlOptions?: ControlWorkspaceOptions
|
|
84
|
+
initialValues?: Record<string, unknown>
|
|
85
|
+
modelValue?: Record<string, unknown>
|
|
86
|
+
values?: Record<string, unknown>
|
|
87
|
+
title?: string
|
|
88
|
+
subtitle?: string
|
|
89
|
+
topBarVariant?: TopBarVariant
|
|
90
|
+
sidebarWidth?: string
|
|
91
|
+
sidebarVariant?: 'default' | 'analysis'
|
|
92
|
+
responsiveSidebar?: boolean
|
|
93
|
+
sidebarPosition?: 'left' | 'right'
|
|
94
|
+
sidebarTitle?: string
|
|
95
|
+
sidebarSubtitle?: string
|
|
96
|
+
sidebarBadge?: string | number
|
|
97
|
+
floating?: boolean
|
|
98
|
+
dense?: boolean
|
|
99
|
+
showSettings?: boolean
|
|
100
|
+
showFormActions?: boolean
|
|
101
|
+
formEnhancements?: FormEnhancements<Record<string, unknown>>
|
|
102
|
+
formLoading?: boolean
|
|
103
|
+
formDisabled?: boolean
|
|
104
|
+
formReadonly?: boolean
|
|
105
|
+
formSize?: 'sm' | 'md' | 'lg'
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Maps DoseDesignWorkspaceView's props straight through to the identically-named
|
|
110
|
+
* ControlWorkspaceView props it wraps — the ~25-key pass-through list that used to be spelled
|
|
111
|
+
* out attribute-by-attribute in the template. `model` is the caller's already-resolved dose
|
|
112
|
+
* design model, not the raw (possibly absent) `props.model`.
|
|
113
|
+
*
|
|
114
|
+
* @example Recommended
|
|
115
|
+
* ```vue
|
|
116
|
+
* <ControlWorkspaceView v-bind="doseDesignWorkspaceProps(props, resolvedModel)" />
|
|
117
|
+
* ```
|
|
118
|
+
*/
|
|
119
|
+
export function doseDesignWorkspaceProps(
|
|
120
|
+
props: DoseDesignWorkspacePassthroughProps,
|
|
121
|
+
model: ControlModel | ControlModelBinding,
|
|
122
|
+
) {
|
|
123
|
+
return {
|
|
124
|
+
model,
|
|
125
|
+
workspace: props.workspace,
|
|
126
|
+
controlOptions: props.controlOptions,
|
|
127
|
+
initialValues: props.initialValues,
|
|
128
|
+
modelValue: props.modelValue,
|
|
129
|
+
values: props.values,
|
|
130
|
+
title: props.title,
|
|
131
|
+
subtitle: props.subtitle,
|
|
132
|
+
topBarVariant: props.topBarVariant,
|
|
133
|
+
sidebarWidth: props.sidebarWidth,
|
|
134
|
+
sidebarVariant: props.sidebarVariant,
|
|
135
|
+
responsiveSidebar: props.responsiveSidebar,
|
|
136
|
+
sidebarPosition: props.sidebarPosition,
|
|
137
|
+
sidebarTitle: props.sidebarTitle,
|
|
138
|
+
sidebarSubtitle: props.sidebarSubtitle,
|
|
139
|
+
sidebarBadge: props.sidebarBadge,
|
|
140
|
+
floating: props.floating,
|
|
141
|
+
dense: props.dense,
|
|
142
|
+
showSettings: props.showSettings,
|
|
143
|
+
showFormActions: props.showFormActions,
|
|
144
|
+
formEnhancements: props.formEnhancements,
|
|
145
|
+
formLoading: props.formLoading,
|
|
146
|
+
formDisabled: props.formDisabled,
|
|
147
|
+
formReadonly: props.formReadonly,
|
|
148
|
+
formSize: props.formSize,
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
export interface BioTemplateExperimentWorkspaceStatusProps {
|
|
153
|
+
status?: {
|
|
154
|
+
loading?: boolean
|
|
155
|
+
saving?: boolean
|
|
156
|
+
error?: string | null
|
|
157
|
+
hasExperiment?: boolean
|
|
158
|
+
currentExperimentId?: number
|
|
159
|
+
lastLoadedAt?: Date | null
|
|
160
|
+
lastSavedAt?: Date | null
|
|
161
|
+
}
|
|
162
|
+
loading?: boolean
|
|
163
|
+
error?: string | null
|
|
164
|
+
hasExperiment?: boolean
|
|
165
|
+
currentExperimentId?: number
|
|
166
|
+
lastLoadedAt?: Date | null
|
|
167
|
+
lastSavedAt?: Date | null
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
export interface ResolvedBioTemplateExperimentStatus {
|
|
171
|
+
loading: boolean
|
|
172
|
+
error: string | null | undefined
|
|
173
|
+
hasExperiment: boolean
|
|
174
|
+
currentExperimentId: number | undefined
|
|
175
|
+
lastLoadedAt: Date | null | undefined
|
|
176
|
+
lastSavedAt: Date | null | undefined
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* Merges BioTemplateExperimentWorkspaceView's grouped `status` prop over its individual
|
|
181
|
+
* `loading`/`error`/`hasExperiment`/... props: `status` wins whenever the corresponding field
|
|
182
|
+
* on it is set, otherwise the flat prop (or its default) is used. Centralizes the six
|
|
183
|
+
* independent fallback rules generated plugin pages rely on when they pass a request/experiment
|
|
184
|
+
* `status` object instead of wiring each field by hand.
|
|
185
|
+
*/
|
|
186
|
+
export function bioTemplateExperimentWorkspaceProps(
|
|
187
|
+
props: BioTemplateExperimentWorkspaceStatusProps,
|
|
188
|
+
): ResolvedBioTemplateExperimentStatus {
|
|
189
|
+
const status = props.status
|
|
190
|
+
return {
|
|
191
|
+
loading: status?.loading !== undefined || status?.saving !== undefined
|
|
192
|
+
? Boolean(status?.loading) || Boolean(status?.saving)
|
|
193
|
+
: Boolean(props.loading),
|
|
194
|
+
error: status?.error !== undefined ? status.error : props.error,
|
|
195
|
+
hasExperiment: status?.hasExperiment ?? props.hasExperiment ?? false,
|
|
196
|
+
currentExperimentId: status?.currentExperimentId ?? props.currentExperimentId,
|
|
197
|
+
lastLoadedAt: status?.lastLoadedAt !== undefined ? status.lastLoadedAt : props.lastLoadedAt,
|
|
198
|
+
lastSavedAt: status?.lastSavedAt !== undefined ? status.lastSavedAt : props.lastSavedAt,
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
export interface BioTemplatePackWorkspacePassthroughProps {
|
|
203
|
+
message?: string
|
|
204
|
+
dense?: boolean
|
|
205
|
+
readonly?: boolean
|
|
206
|
+
showStatus?: boolean
|
|
207
|
+
showTemplateSummary?: boolean
|
|
208
|
+
loadLabel?: string
|
|
209
|
+
resetLabel?: string
|
|
210
|
+
saveLabel?: string
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* Assembles the prop object BioTemplatePackWorkspaceView binds onto the
|
|
215
|
+
* BioTemplateExperimentWorkspaceView it wraps: its own display props passed straight through,
|
|
216
|
+
* plus the pack-derived `target`/`label`/`status`/`actions` computed by the caller.
|
|
217
|
+
*/
|
|
218
|
+
export function bioTemplatePackWorkspaceProps<TTarget, TStatus, TActions>(
|
|
219
|
+
props: BioTemplatePackWorkspacePassthroughProps,
|
|
220
|
+
derived: {
|
|
221
|
+
target: TTarget
|
|
222
|
+
label: string
|
|
223
|
+
status: TStatus
|
|
224
|
+
actions: TActions
|
|
225
|
+
},
|
|
226
|
+
) {
|
|
227
|
+
return {
|
|
228
|
+
target: derived.target,
|
|
229
|
+
kind: 'collection' as const,
|
|
230
|
+
label: derived.label,
|
|
231
|
+
message: props.message,
|
|
232
|
+
status: derived.status,
|
|
233
|
+
actions: derived.actions,
|
|
234
|
+
dense: props.dense,
|
|
235
|
+
readonly: props.readonly,
|
|
236
|
+
showStatus: props.showStatus,
|
|
237
|
+
showTemplateSummary: props.showTemplateSummary,
|
|
238
|
+
loadLabel: props.loadLabel,
|
|
239
|
+
resetLabel: props.resetLabel,
|
|
240
|
+
saveLabel: props.saveLabel,
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
export interface BioTemplatePresetWorkspaceOptionsProps<TOptions extends ControlWorkspaceOptions> {
|
|
245
|
+
workspaceOptions?: TOptions
|
|
246
|
+
initialValues?: Record<string, unknown>
|
|
247
|
+
modelValue?: Record<string, unknown>
|
|
248
|
+
values?: Record<string, unknown>
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
* Resolves BioTemplatePresetWorkspaceView's `workspaceOptions`/`initialValues`/`modelValue`/
|
|
253
|
+
* `values` props into the single options object `useBioTemplatePresetWorkspace()` needs,
|
|
254
|
+
* reusing the same base/initialValues/external-values layering as {@link controlWorkspaceProps}.
|
|
255
|
+
*/
|
|
256
|
+
export function bioTemplatePresetWorkspaceProps<TOptions extends ControlWorkspaceOptions>(
|
|
257
|
+
props: BioTemplatePresetWorkspaceOptionsProps<TOptions>,
|
|
258
|
+
): { externalValues: Record<string, unknown> | undefined; resolvedWorkspaceOptions: TOptions } {
|
|
259
|
+
const externalValues = props.modelValue ?? props.values
|
|
260
|
+
const resolvedWorkspaceOptions = resolveControlOptionsWithExternalValues(
|
|
261
|
+
(props.workspaceOptions ?? {}) as TOptions,
|
|
262
|
+
props.initialValues,
|
|
263
|
+
externalValues,
|
|
264
|
+
)
|
|
265
|
+
|
|
266
|
+
return { externalValues, resolvedWorkspaceOptions }
|
|
267
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
// Styles (import to ensure bundling)
|
|
2
2
|
import './styles/index.css'
|
|
3
3
|
|
|
4
|
+
// Typed API errors
|
|
5
|
+
export * from './apiErrors'
|
|
6
|
+
|
|
4
7
|
// Vue Plugin for global component registration
|
|
5
8
|
export { MINTSdk, default } from './install'
|
|
6
9
|
|
|
@@ -41,6 +44,22 @@ export {
|
|
|
41
44
|
deriveShade,
|
|
42
45
|
type Hsl,
|
|
43
46
|
} from './utils/color'
|
|
47
|
+
export {
|
|
48
|
+
PLUGIN_SECRET_FORMAT_KEY,
|
|
49
|
+
PLUGIN_SECRET_FORMAT_REF,
|
|
50
|
+
PLUGIN_SECRET_REF_KEY,
|
|
51
|
+
clearPluginSecret,
|
|
52
|
+
isPluginSecretLocked,
|
|
53
|
+
isPluginSecretRef,
|
|
54
|
+
keepPluginSecret,
|
|
55
|
+
pluginSecretId,
|
|
56
|
+
pluginSecretLabel,
|
|
57
|
+
pluginSecretState,
|
|
58
|
+
setPluginSecret,
|
|
59
|
+
usesPluginSecretReferences,
|
|
60
|
+
type PluginSecretRef,
|
|
61
|
+
type PluginSecretState,
|
|
62
|
+
} from './utils/pluginSecrets'
|
|
44
63
|
export {
|
|
45
64
|
LCMS_DEFAULT_CONTROL_POSITIONS,
|
|
46
65
|
createLcmsControlWellEditData,
|
package/src/permissions.ts
CHANGED
|
@@ -2,7 +2,6 @@ export const ADMIN_ROLE = 'admin'
|
|
|
2
2
|
|
|
3
3
|
export const ADMIN_PANEL_PERMISSIONS = [
|
|
4
4
|
'users.view',
|
|
5
|
-
'users.invite',
|
|
6
5
|
'users.manage',
|
|
7
6
|
'platform.configure',
|
|
8
7
|
'platform.view_logs',
|
|
@@ -41,11 +40,36 @@ export interface AccessPolicy {
|
|
|
41
40
|
plugin?: string
|
|
42
41
|
}
|
|
43
42
|
|
|
43
|
+
/**
|
|
44
|
+
* An object that carries an access rule.
|
|
45
|
+
*
|
|
46
|
+
* The nested `access` policy is the supported shape. The four flat fields are
|
|
47
|
+
* the pre-1.2 spelling of the same four `AccessPolicy` fields; they still work
|
|
48
|
+
* but are deprecated, and `normalizeAccessPolicy()` lets the nested policy win
|
|
49
|
+
* wherever both are given.
|
|
50
|
+
*/
|
|
44
51
|
export interface AccessControlled {
|
|
52
|
+
/** The access policy. Preferred over the flat fields below. */
|
|
45
53
|
access?: AccessPolicy
|
|
54
|
+
/**
|
|
55
|
+
* @deprecated Since MINT 1.2; use `access.visibleFor` instead. The flat
|
|
56
|
+
* duplicate is removed in 1.3.
|
|
57
|
+
*/
|
|
46
58
|
visibleFor?: AccessAudienceInput
|
|
59
|
+
/**
|
|
60
|
+
* @deprecated Since MINT 1.2; use `access.requiresAdmin` instead. The flat
|
|
61
|
+
* duplicate is removed in 1.3.
|
|
62
|
+
*/
|
|
47
63
|
requiresAdmin?: boolean
|
|
64
|
+
/**
|
|
65
|
+
* @deprecated Since MINT 1.2; use `access.permissions` instead. The flat
|
|
66
|
+
* duplicate is removed in 1.3.
|
|
67
|
+
*/
|
|
48
68
|
permissions?: readonly string[]
|
|
69
|
+
/**
|
|
70
|
+
* @deprecated Since MINT 1.2; use `access.anyPermissions` instead. The flat
|
|
71
|
+
* duplicate is removed in 1.3.
|
|
72
|
+
*/
|
|
49
73
|
anyPermissions?: readonly string[]
|
|
50
74
|
}
|
|
51
75
|
|
|
@@ -105,17 +129,32 @@ export function canAccessPlugin(
|
|
|
105
129
|
return Array.isArray(access) && access.includes(pluginName)
|
|
106
130
|
}
|
|
107
131
|
|
|
132
|
+
/**
|
|
133
|
+
* Flatten an access rule — either shape, or a mix of both — into one policy.
|
|
134
|
+
*
|
|
135
|
+
* ## Precedence
|
|
136
|
+
*
|
|
137
|
+
* 1. A defined field on the nested `access` policy wins. It is the supported
|
|
138
|
+
* spelling, so an object that carries both shapes is read as "the nested
|
|
139
|
+
* policy, with the deprecated flat fields as leftovers".
|
|
140
|
+
* 2. Otherwise the flat field on the rule itself is used.
|
|
141
|
+
* 3. A field set to `undefined` on either side counts as unset and never
|
|
142
|
+
* masks the other side.
|
|
143
|
+
*
|
|
144
|
+
* Only `AccessPolicy` fields the flat shape never had (`audience`,
|
|
145
|
+
* `requiresAuth`, `plugin`) can come from the nested policy alone; the four
|
|
146
|
+
* duplicated fields are the ones this ordering exists for.
|
|
147
|
+
*/
|
|
108
148
|
export function normalizeAccessPolicy(rule: AccessControlled | AccessPolicy | undefined): AccessPolicy {
|
|
109
149
|
if (!rule) return {}
|
|
110
|
-
const { access: nested, ...
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
...('requiresAdmin' in rule && rule.requiresAdmin !== undefined ? { requiresAdmin: rule.requiresAdmin } : {}),
|
|
116
|
-
...('permissions' in rule && rule.permissions !== undefined ? { permissions: rule.permissions } : {}),
|
|
117
|
-
...('anyPermissions' in rule && rule.anyPermissions !== undefined ? { anyPermissions: rule.anyPermissions } : {}),
|
|
150
|
+
const { access: nested, ...flat } = rule as AccessPolicy & { access?: AccessPolicy }
|
|
151
|
+
const policy = { ...flat } as Record<string, unknown>
|
|
152
|
+
|
|
153
|
+
for (const [field, value] of Object.entries(nested ?? {})) {
|
|
154
|
+
if (value !== undefined) policy[field] = value
|
|
118
155
|
}
|
|
156
|
+
|
|
157
|
+
return policy as AccessPolicy
|
|
119
158
|
}
|
|
120
159
|
|
|
121
160
|
export function canAccessByPolicy(
|
package/src/stores/auth.ts
CHANGED
package/src/stores/experiment.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { defineStore } from 'pinia'
|
|
2
2
|
import { ref } from 'vue'
|
|
3
3
|
import { useApi } from '../composables/useApi'
|
|
4
|
+
import { readErrorMessage } from '../utils/errors'
|
|
4
5
|
import type { ExperimentSummary, PlatformContext } from '../types'
|
|
5
6
|
|
|
6
7
|
function getPlatformApiUrl(): string | undefined {
|
|
@@ -9,12 +10,6 @@ function getPlatformApiUrl(): string | undefined {
|
|
|
9
10
|
?.platformApiUrl
|
|
10
11
|
}
|
|
11
12
|
|
|
12
|
-
function readErrorMessage(value: unknown): string {
|
|
13
|
-
if (value instanceof Error && value.message) return value.message
|
|
14
|
-
if (typeof value === 'string' && value.trim()) return value
|
|
15
|
-
return 'Failed to load experiment'
|
|
16
|
-
}
|
|
17
|
-
|
|
18
13
|
/**
|
|
19
14
|
* The single source of truth for the experiment a plugin is currently working on.
|
|
20
15
|
*
|
|
@@ -89,7 +84,7 @@ export const useExperimentStore = defineStore('mint-experiment', () => {
|
|
|
89
84
|
} catch (err) {
|
|
90
85
|
if (token !== selectionToken) return null
|
|
91
86
|
current.value = null
|
|
92
|
-
error.value = readErrorMessage(err)
|
|
87
|
+
error.value = readErrorMessage(err, 'Failed to load experiment')
|
|
93
88
|
return null
|
|
94
89
|
} finally {
|
|
95
90
|
// Only the newest request owns the loading flag; otherwise a superseded
|
package/src/stores/index.ts
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
1
|
export { useAuthStore } from './auth'
|
|
2
|
-
export {
|
|
2
|
+
export {
|
|
3
|
+
useSettingsStore,
|
|
4
|
+
tryUseSettingsStore,
|
|
5
|
+
colorPalettes,
|
|
6
|
+
paletteCssVariables,
|
|
7
|
+
tableDensityToSize,
|
|
8
|
+
PALETTE_CSS_VARIABLES,
|
|
9
|
+
type SettingsState,
|
|
10
|
+
} from './settings'
|
|
3
11
|
export { useExperimentStore } from './experiment'
|
package/src/stores/settings.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineStore } from 'pinia'
|
|
1
|
+
import { defineStore, getActivePinia } from 'pinia'
|
|
2
2
|
import { ref, watch } from 'vue'
|
|
3
3
|
import type { ThemeMode, ColorPalette, TableDensity } from '../types'
|
|
4
4
|
|
|
@@ -62,6 +62,46 @@ export const colorPalettes: Record<ColorPalette, { name: string; hues: [number,
|
|
|
62
62
|
pastel: { name: 'Pastel', hues: [200, 340] },
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
+
/**
|
|
66
|
+
* Custom properties a non-default palette overrides on `<html>`.
|
|
67
|
+
*
|
|
68
|
+
* The saturation/lightness pairs are lifted from the canonical indigo/orange
|
|
69
|
+
* tokens in `styles/variables.css` so only the hue moves; the `default`
|
|
70
|
+
* palette writes nothing at all and the stylesheet values stand.
|
|
71
|
+
*/
|
|
72
|
+
export const PALETTE_CSS_VARIABLES = [
|
|
73
|
+
'--color-primary',
|
|
74
|
+
'--color-primary-hover',
|
|
75
|
+
'--color-primary-soft',
|
|
76
|
+
'--color-cta',
|
|
77
|
+
'--color-cta-hover',
|
|
78
|
+
] as const
|
|
79
|
+
|
|
80
|
+
/** Build the `<html>` custom-property overrides for a palette. */
|
|
81
|
+
export function paletteCssVariables(palette: ColorPalette): Record<string, string> {
|
|
82
|
+
if (palette === 'default') return {}
|
|
83
|
+
const [primaryHue, accentHue] = colorPalettes[palette].hues
|
|
84
|
+
return {
|
|
85
|
+
'--color-primary': `hsl(${primaryHue} 84% 67%)`,
|
|
86
|
+
'--color-primary-hover': `hsl(${primaryHue} 75% 59%)`,
|
|
87
|
+
'--color-primary-soft': `hsl(${primaryHue} 84% 67% / 0.12)`,
|
|
88
|
+
'--color-cta': `hsl(${accentHue} 95% 53%)`,
|
|
89
|
+
'--color-cta-hover': `hsl(${accentHue} 90% 48%)`,
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/** `DataFrame`-style size that each table density maps onto. */
|
|
94
|
+
const DENSITY_TABLE_SIZE: Record<TableDensity, 'sm' | 'md' | 'lg'> = {
|
|
95
|
+
compact: 'sm',
|
|
96
|
+
normal: 'md',
|
|
97
|
+
comfortable: 'lg',
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/** Map a table density onto the `size` prop shared by the SDK table components. */
|
|
101
|
+
export function tableDensityToSize(density: TableDensity): 'sm' | 'md' | 'lg' {
|
|
102
|
+
return DENSITY_TABLE_SIZE[density]
|
|
103
|
+
}
|
|
104
|
+
|
|
65
105
|
function loadSettings(): SettingsState {
|
|
66
106
|
try {
|
|
67
107
|
const stored = localStorage.getItem(STORAGE_KEY)
|
|
@@ -152,6 +192,8 @@ export const useSettingsStore = defineStore('mint-settings', () => {
|
|
|
152
192
|
tableDensity.value = loaded.tableDensity
|
|
153
193
|
|
|
154
194
|
applyTheme()
|
|
195
|
+
applyPalette()
|
|
196
|
+
applyDensity()
|
|
155
197
|
}
|
|
156
198
|
|
|
157
199
|
function applyTheme() {
|
|
@@ -160,11 +202,36 @@ export const useSettingsStore = defineStore('mint-settings', () => {
|
|
|
160
202
|
document.documentElement.classList.toggle('dark', dark)
|
|
161
203
|
}
|
|
162
204
|
|
|
205
|
+
/**
|
|
206
|
+
* Write the selected palette's hues onto `<html>` as custom-property
|
|
207
|
+
* overrides. The `default` palette clears them so `styles/variables.css`
|
|
208
|
+
* keeps ownership of the brand colors.
|
|
209
|
+
*/
|
|
210
|
+
function applyPalette() {
|
|
211
|
+
if (typeof document === 'undefined') return
|
|
212
|
+
const style = document.documentElement.style
|
|
213
|
+
const overrides = paletteCssVariables(colorPalette.value)
|
|
214
|
+
for (const name of PALETTE_CSS_VARIABLES) {
|
|
215
|
+
const value = overrides[name]
|
|
216
|
+
if (value) style.setProperty(name, value)
|
|
217
|
+
else style.removeProperty(name)
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
/** Mirror the table density onto `<html data-density>` for CSS consumers. */
|
|
222
|
+
function applyDensity() {
|
|
223
|
+
if (typeof document === 'undefined') return
|
|
224
|
+
document.documentElement.dataset.density = tableDensity.value
|
|
225
|
+
}
|
|
226
|
+
|
|
163
227
|
watch(theme, () => {
|
|
164
228
|
applyTheme()
|
|
165
229
|
persistSettings()
|
|
166
230
|
})
|
|
167
231
|
|
|
232
|
+
watch(colorPalette, applyPalette)
|
|
233
|
+
watch(tableDensity, applyDensity)
|
|
234
|
+
|
|
168
235
|
if (typeof window !== 'undefined' && typeof window.matchMedia === 'function') {
|
|
169
236
|
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', (event) => {
|
|
170
237
|
systemPrefersDark.value = event.matches
|
|
@@ -206,6 +273,11 @@ export const useSettingsStore = defineStore('mint-settings', () => {
|
|
|
206
273
|
return colorPalettes[colorPalette.value].hues
|
|
207
274
|
}
|
|
208
275
|
|
|
276
|
+
/** The `size` the SDK table components default to for the current density. */
|
|
277
|
+
function getTableSize(): 'sm' | 'md' | 'lg' {
|
|
278
|
+
return tableDensityToSize(tableDensity.value)
|
|
279
|
+
}
|
|
280
|
+
|
|
209
281
|
function isDark(): boolean {
|
|
210
282
|
return theme.value === 'system' ? systemPrefersDark.value : theme.value === 'dark'
|
|
211
283
|
}
|
|
@@ -222,11 +294,31 @@ export const useSettingsStore = defineStore('mint-settings', () => {
|
|
|
222
294
|
tableDensity,
|
|
223
295
|
initialize,
|
|
224
296
|
applyTheme,
|
|
297
|
+
applyPalette,
|
|
298
|
+
applyDensity,
|
|
225
299
|
persistSettings,
|
|
226
300
|
resetToDefaults,
|
|
227
301
|
getPaletteHues,
|
|
302
|
+
getTableSize,
|
|
228
303
|
isDark,
|
|
229
304
|
getApiBaseUrl,
|
|
230
305
|
getWsBaseUrl,
|
|
231
306
|
}
|
|
232
307
|
})
|
|
308
|
+
|
|
309
|
+
/**
|
|
310
|
+
* Read the settings store without requiring Pinia to be installed.
|
|
311
|
+
*
|
|
312
|
+
* SDK components are mounted standalone (unit tests, Histoire stories, plugin
|
|
313
|
+
* previews) where no Pinia instance exists. They use this to pick up a user's
|
|
314
|
+
* preferences when the platform is running and fall back to their own defaults
|
|
315
|
+
* otherwise, instead of throwing.
|
|
316
|
+
*/
|
|
317
|
+
export function tryUseSettingsStore(): ReturnType<typeof useSettingsStore> | null {
|
|
318
|
+
if (!getActivePinia()) return null
|
|
319
|
+
try {
|
|
320
|
+
return useSettingsStore()
|
|
321
|
+
} catch {
|
|
322
|
+
return null
|
|
323
|
+
}
|
|
324
|
+
}
|
|
@@ -126,11 +126,11 @@
|
|
|
126
126
|
margin-right: 0.125rem;
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
129
|
+
/* Empty / loading / error placeholder host (content comes from EmptyState) */
|
|
130
|
+
.mint-audit-trail__state {
|
|
131
|
+
display: flex;
|
|
132
|
+
align-items: center;
|
|
133
|
+
justify-content: center;
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
/* Size variants */
|
|
@@ -194,3 +194,10 @@
|
|
|
194
194
|
background-color: var(--bg-hover);
|
|
195
195
|
color: var(--text-primary);
|
|
196
196
|
}
|
|
197
|
+
|
|
198
|
+
/* Empty / loading / error placeholder host (content comes from EmptyState) */
|
|
199
|
+
.mint-batch-progress__state {
|
|
200
|
+
display: flex;
|
|
201
|
+
align-items: center;
|
|
202
|
+
justify-content: center;
|
|
203
|
+
}
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
border-radius: 50%;
|
|
62
62
|
background: white;
|
|
63
63
|
cursor: pointer;
|
|
64
|
-
border: 2px solid var(--
|
|
64
|
+
border: 2px solid var(--color-primary);
|
|
65
65
|
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
|
|
66
66
|
transition: transform 0.15s ease;
|
|
67
67
|
}
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
border-radius: 50%;
|
|
81
81
|
background: white;
|
|
82
82
|
cursor: pointer;
|
|
83
|
-
border: 2px solid var(--
|
|
83
|
+
border: 2px solid var(--color-primary);
|
|
84
84
|
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
|
|
85
85
|
transition: transform 0.15s ease;
|
|
86
86
|
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/* DataStateInternal — shared loading / error / empty presentation for data components */
|
|
2
|
+
|
|
3
|
+
.mint-data-state {
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
align-items: center;
|
|
7
|
+
justify-content: center;
|
|
8
|
+
background-color: var(--bg-primary);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.mint-data-state--loading {
|
|
12
|
+
gap: 0.75rem;
|
|
13
|
+
padding: 2.5rem 2rem;
|
|
14
|
+
color: var(--text-muted);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.mint-data-state--loading.mint-data-state--sm {
|
|
18
|
+
padding: 1.25rem 1rem;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.mint-data-state--loading.mint-data-state--lg {
|
|
22
|
+
padding: 3.5rem 2rem;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.mint-data-state__loading-text {
|
|
26
|
+
font-size: 0.875rem;
|
|
27
|
+
color: var(--text-muted);
|
|
28
|
+
margin: 0 !important;
|
|
29
|
+
padding: 0 !important;
|
|
30
|
+
}
|